summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--3rdparty/libuv/LICENSE46
-rw-r--r--3rdparty/libuv/MAINTAINERS.md36
-rw-r--r--3rdparty/libuv/Makefile.am344
-rw-r--r--3rdparty/libuv/Makefile.mingw84
-rw-r--r--3rdparty/libuv/README.md245
-rw-r--r--3rdparty/libuv/docs/Makefile178
-rw-r--r--3rdparty/libuv/docs/src/async.rst57
-rw-r--r--3rdparty/libuv/docs/src/check.rst46
-rw-r--r--3rdparty/libuv/docs/src/conf.py348
-rw-r--r--3rdparty/libuv/docs/src/design.rst137
-rw-r--r--3rdparty/libuv/docs/src/dll.rst44
-rw-r--r--3rdparty/libuv/docs/src/dns.rst108
-rw-r--r--3rdparty/libuv/docs/src/errors.rst331
-rw-r--r--3rdparty/libuv/docs/src/fs.rst300
-rw-r--r--3rdparty/libuv/docs/src/fs_event.rst108
-rw-r--r--3rdparty/libuv/docs/src/fs_poll.rst72
-rw-r--r--3rdparty/libuv/docs/src/handle.rst181
-rw-r--r--3rdparty/libuv/docs/src/idle.rst54
-rw-r--r--3rdparty/libuv/docs/src/index.rst95
-rw-r--r--3rdparty/libuv/docs/src/loop.rst166
-rw-r--r--3rdparty/libuv/docs/src/migration_010_100.rst244
-rw-r--r--3rdparty/libuv/docs/src/misc.rst328
-rw-r--r--3rdparty/libuv/docs/src/pipe.rst104
-rw-r--r--3rdparty/libuv/docs/src/poll.rst103
-rw-r--r--3rdparty/libuv/docs/src/prepare.rst46
-rw-r--r--3rdparty/libuv/docs/src/process.rst225
-rw-r--r--3rdparty/libuv/docs/src/request.rst82
-rw-r--r--3rdparty/libuv/docs/src/signal.rst77
-rw-r--r--3rdparty/libuv/docs/src/sphinx-plugins/manpage.py46
-rw-r--r--3rdparty/libuv/docs/src/static/architecture.pngbin206767 -> 0 bytes
-rw-r--r--3rdparty/libuv/docs/src/static/diagrams.key/Data/st0-311.jpgbin19328 -> 0 bytes
-rw-r--r--3rdparty/libuv/docs/src/static/diagrams.key/Data/st1-475.jpgbin12655 -> 0 bytes
-rw-r--r--3rdparty/libuv/docs/src/static/diagrams.key/Index.zipbin71160 -> 0 bytes
-rw-r--r--3rdparty/libuv/docs/src/static/diagrams.key/Metadata/BuildVersionHistory.plist8
-rw-r--r--3rdparty/libuv/docs/src/static/diagrams.key/Metadata/DocumentIdentifier1
-rw-r--r--3rdparty/libuv/docs/src/static/diagrams.key/Metadata/Properties.plistbin340 -> 0 bytes
-rw-r--r--3rdparty/libuv/docs/src/static/diagrams.key/preview-micro.jpgbin1425 -> 0 bytes
-rw-r--r--3rdparty/libuv/docs/src/static/diagrams.key/preview-web.jpgbin8106 -> 0 bytes
-rw-r--r--3rdparty/libuv/docs/src/static/diagrams.key/preview.jpgbin107456 -> 0 bytes
-rw-r--r--3rdparty/libuv/docs/src/static/favicon.icobin15086 -> 0 bytes
-rw-r--r--3rdparty/libuv/docs/src/static/logo.pngbin33545 -> 0 bytes
-rw-r--r--3rdparty/libuv/docs/src/static/loop_iteration.pngbin80528 -> 0 bytes
-rw-r--r--3rdparty/libuv/docs/src/stream.rst219
-rw-r--r--3rdparty/libuv/docs/src/tcp.rst108
-rw-r--r--3rdparty/libuv/docs/src/threading.rst160
-rw-r--r--3rdparty/libuv/docs/src/threadpool.rst67
-rw-r--r--3rdparty/libuv/docs/src/timer.rst76
-rw-r--r--3rdparty/libuv/docs/src/tty.rst93
-rw-r--r--3rdparty/libuv/docs/src/udp.rst295
-rw-r--r--3rdparty/libuv/docs/src/version.rst60
-rw-r--r--3rdparty/libuv/gyp_uv.py93
-rw-r--r--3rdparty/libuv/img/banner.pngbin44102 -> 0 bytes
-rw-r--r--3rdparty/libuv/img/logos.svg152
-rw-r--r--3rdparty/libuv/include/android-ifaddrs.h54
-rw-r--r--3rdparty/libuv/include/pthread-fixes.h72
-rw-r--r--3rdparty/libuv/include/stdint-msvc2008.h247
-rw-r--r--3rdparty/libuv/include/tree.h768
-rw-r--r--3rdparty/libuv/include/uv-aix.h32
-rw-r--r--3rdparty/libuv/include/uv-bsd.h34
-rw-r--r--3rdparty/libuv/include/uv-darwin.h61
-rw-r--r--3rdparty/libuv/include/uv-errno.h418
-rw-r--r--3rdparty/libuv/include/uv-linux.h34
-rw-r--r--3rdparty/libuv/include/uv-sunos.h44
-rw-r--r--3rdparty/libuv/include/uv-threadpool.h37
-rw-r--r--3rdparty/libuv/include/uv-unix.h383
-rw-r--r--3rdparty/libuv/include/uv-version.h43
-rw-r--r--3rdparty/libuv/include/uv-win.h653
-rw-r--r--3rdparty/libuv/include/uv.h1482
-rw-r--r--3rdparty/libuv/libuv.nsi86
-rw-r--r--3rdparty/libuv/libuv.pc.in11
-rw-r--r--3rdparty/libuv/m4/.gitignore4
-rw-r--r--3rdparty/libuv/m4/as_case.m421
-rw-r--r--3rdparty/libuv/m4/libuv-check-flags.m4319
-rw-r--r--3rdparty/libuv/samples/.gitignore22
-rw-r--r--3rdparty/libuv/samples/socks5-proxy/.gitignore21
-rw-r--r--3rdparty/libuv/samples/socks5-proxy/LICENSE53
-rw-r--r--3rdparty/libuv/samples/socks5-proxy/Makefile46
-rw-r--r--3rdparty/libuv/samples/socks5-proxy/build.gyp46
-rw-r--r--3rdparty/libuv/samples/socks5-proxy/client.c737
-rw-r--r--3rdparty/libuv/samples/socks5-proxy/defs.h139
-rw-r--r--3rdparty/libuv/samples/socks5-proxy/getopt.c131
-rw-r--r--3rdparty/libuv/samples/socks5-proxy/main.c99
-rw-r--r--3rdparty/libuv/samples/socks5-proxy/s5.c271
-rw-r--r--3rdparty/libuv/samples/socks5-proxy/s5.h94
-rw-r--r--3rdparty/libuv/samples/socks5-proxy/server.c241
-rw-r--r--3rdparty/libuv/samples/socks5-proxy/util.c72
-rw-r--r--3rdparty/libuv/src/fs-poll.c255
-rw-r--r--3rdparty/libuv/src/heap-inl.h245
-rw-r--r--3rdparty/libuv/src/inet.c309
-rw-r--r--3rdparty/libuv/src/queue.h108
-rw-r--r--3rdparty/libuv/src/threadpool.c303
-rw-r--r--3rdparty/libuv/src/unix/aix.c1158
-rw-r--r--3rdparty/libuv/src/unix/android-ifaddrs.c703
-rw-r--r--3rdparty/libuv/src/unix/async.c290
-rw-r--r--3rdparty/libuv/src/unix/atomic-ops.h77
-rw-r--r--3rdparty/libuv/src/unix/core.c1104
-rw-r--r--3rdparty/libuv/src/unix/darwin-proctitle.c206
-rw-r--r--3rdparty/libuv/src/unix/darwin.c335
-rw-r--r--3rdparty/libuv/src/unix/dl.c80
-rw-r--r--3rdparty/libuv/src/unix/freebsd.c450
-rw-r--r--3rdparty/libuv/src/unix/fs.c1310
-rw-r--r--3rdparty/libuv/src/unix/fsevents.c904
-rw-r--r--3rdparty/libuv/src/unix/getaddrinfo.c202
-rw-r--r--3rdparty/libuv/src/unix/getnameinfo.c120
-rw-r--r--3rdparty/libuv/src/unix/internal.h316
-rw-r--r--3rdparty/libuv/src/unix/kqueue.c426
-rw-r--r--3rdparty/libuv/src/unix/linux-core.c899
-rw-r--r--3rdparty/libuv/src/unix/linux-inotify.c285
-rw-r--r--3rdparty/libuv/src/unix/linux-syscalls.c471
-rw-r--r--3rdparty/libuv/src/unix/linux-syscalls.h158
-rw-r--r--3rdparty/libuv/src/unix/loop-watcher.c68
-rw-r--r--3rdparty/libuv/src/unix/loop.c155
-rw-r--r--3rdparty/libuv/src/unix/netbsd.c370
-rw-r--r--3rdparty/libuv/src/unix/openbsd.c386
-rw-r--r--3rdparty/libuv/src/unix/pipe.c288
-rw-r--r--3rdparty/libuv/src/unix/poll.c113
-rw-r--r--3rdparty/libuv/src/unix/process.c563
-rw-r--r--3rdparty/libuv/src/unix/proctitle.c102
-rw-r--r--3rdparty/libuv/src/unix/pthread-fixes.c104
-rw-r--r--3rdparty/libuv/src/unix/signal.c467
-rw-r--r--3rdparty/libuv/src/unix/spinlock.h53
-rw-r--r--3rdparty/libuv/src/unix/stream.c1615
-rw-r--r--3rdparty/libuv/src/unix/sunos.c765
-rw-r--r--3rdparty/libuv/src/unix/tcp.c362
-rw-r--r--3rdparty/libuv/src/unix/thread.c525
-rw-r--r--3rdparty/libuv/src/unix/timer.c172
-rw-r--r--3rdparty/libuv/src/unix/tty.c279
-rw-r--r--3rdparty/libuv/src/unix/udp.c873
-rw-r--r--3rdparty/libuv/src/uv-common.c627
-rw-r--r--3rdparty/libuv/src/uv-common.h227
-rw-r--r--3rdparty/libuv/src/version.c45
-rw-r--r--3rdparty/libuv/src/win/async.c99
-rw-r--r--3rdparty/libuv/src/win/atomicops-inl.h56
-rw-r--r--3rdparty/libuv/src/win/core.c457
-rw-r--r--3rdparty/libuv/src/win/dl.c113
-rw-r--r--3rdparty/libuv/src/win/error.c170
-rw-r--r--3rdparty/libuv/src/win/fs-event.c552
-rw-r--r--3rdparty/libuv/src/win/fs.c2468
-rw-r--r--3rdparty/libuv/src/win/getaddrinfo.c358
-rw-r--r--3rdparty/libuv/src/win/getnameinfo.c150
-rw-r--r--3rdparty/libuv/src/win/handle-inl.h179
-rw-r--r--3rdparty/libuv/src/win/handle.c154
-rw-r--r--3rdparty/libuv/src/win/internal.h382
-rw-r--r--3rdparty/libuv/src/win/loop-watcher.c122
-rw-r--r--3rdparty/libuv/src/win/pipe.c2118
-rw-r--r--3rdparty/libuv/src/win/poll.c635
-rw-r--r--3rdparty/libuv/src/win/process-stdio.c510
-rw-r--r--3rdparty/libuv/src/win/process.c1247
-rw-r--r--3rdparty/libuv/src/win/req-inl.h224
-rw-r--r--3rdparty/libuv/src/win/req.c25
-rw-r--r--3rdparty/libuv/src/win/signal.c356
-rw-r--r--3rdparty/libuv/src/win/snprintf.c42
-rw-r--r--3rdparty/libuv/src/win/stream-inl.h56
-rw-r--r--3rdparty/libuv/src/win/stream.c249
-rw-r--r--3rdparty/libuv/src/win/tcp.c1507
-rw-r--r--3rdparty/libuv/src/win/thread.c697
-rw-r--r--3rdparty/libuv/src/win/timer.c200
-rw-r--r--3rdparty/libuv/src/win/tty.c2084
-rw-r--r--3rdparty/libuv/src/win/udp.c926
-rw-r--r--3rdparty/libuv/src/win/util.c1232
-rw-r--r--3rdparty/libuv/src/win/winapi.c146
-rw-r--r--3rdparty/libuv/src/win/winapi.h4710
-rw-r--r--3rdparty/libuv/src/win/winsock.c561
-rw-r--r--3rdparty/libuv/src/win/winsock.h190
-rw-r--r--3rdparty/libuv/test/benchmark-async-pummel.c119
-rw-r--r--3rdparty/libuv/test/benchmark-async.c141
-rw-r--r--3rdparty/libuv/test/benchmark-fs-stat.c136
-rw-r--r--3rdparty/libuv/test/benchmark-getaddrinfo.c92
-rw-r--r--3rdparty/libuv/test/benchmark-list.h163
-rw-r--r--3rdparty/libuv/test/benchmark-loop-count.c92
-rw-r--r--3rdparty/libuv/test/benchmark-million-async.c112
-rw-r--r--3rdparty/libuv/test/benchmark-million-timers.c86
-rw-r--r--3rdparty/libuv/test/benchmark-multi-accept.c447
-rw-r--r--3rdparty/libuv/test/benchmark-ping-pongs.c221
-rw-r--r--3rdparty/libuv/test/benchmark-pound.c351
-rw-r--r--3rdparty/libuv/test/benchmark-pump.c476
-rw-r--r--3rdparty/libuv/test/benchmark-sizes.c46
-rw-r--r--3rdparty/libuv/test/benchmark-spawn.c164
-rw-r--r--3rdparty/libuv/test/benchmark-tcp-write-batch.c144
-rw-r--r--3rdparty/libuv/test/benchmark-thread.c64
-rw-r--r--3rdparty/libuv/test/benchmark-udp-pummel.c243
-rw-r--r--3rdparty/libuv/test/blackhole-server.c121
-rw-r--r--3rdparty/libuv/test/dns-server.c340
-rw-r--r--3rdparty/libuv/test/echo-server.c378
-rw-r--r--3rdparty/libuv/test/fixtures/load_error.node1
-rw-r--r--3rdparty/libuv/test/run-benchmarks.c65
-rw-r--r--3rdparty/libuv/test/run-tests.c181
-rw-r--r--3rdparty/libuv/test/runner-unix.c400
-rw-r--r--3rdparty/libuv/test/runner-unix.h36
-rw-r--r--3rdparty/libuv/test/runner-win.c371
-rw-r--r--3rdparty/libuv/test/runner-win.h39
-rw-r--r--3rdparty/libuv/test/runner.c466
-rw-r--r--3rdparty/libuv/test/runner.h178
-rw-r--r--3rdparty/libuv/test/task.h220
-rw-r--r--3rdparty/libuv/test/test-active.c84
-rw-r--r--3rdparty/libuv/test/test-async-null-cb.c55
-rw-r--r--3rdparty/libuv/test/test-async.c134
-rw-r--r--3rdparty/libuv/test/test-barrier.c106
-rw-r--r--3rdparty/libuv/test/test-callback-order.c77
-rw-r--r--3rdparty/libuv/test/test-callback-stack.c205
-rw-r--r--3rdparty/libuv/test/test-close-fd.c76
-rw-r--r--3rdparty/libuv/test/test-close-order.c80
-rw-r--r--3rdparty/libuv/test/test-condvar.c173
-rw-r--r--3rdparty/libuv/test/test-connection-fail.c151
-rw-r--r--3rdparty/libuv/test/test-cwd-and-chdir.c51
-rw-r--r--3rdparty/libuv/test/test-default-loop-close.c59
-rw-r--r--3rdparty/libuv/test/test-delayed-accept.c189
-rw-r--r--3rdparty/libuv/test/test-dlerror.c55
-rw-r--r--3rdparty/libuv/test/test-embed.c138
-rw-r--r--3rdparty/libuv/test/test-emfile.c110
-rw-r--r--3rdparty/libuv/test/test-error.c50
-rw-r--r--3rdparty/libuv/test/test-fail-always.c29
-rw-r--r--3rdparty/libuv/test/test-fs-event.c907
-rw-r--r--3rdparty/libuv/test/test-fs-poll.c186
-rw-r--r--3rdparty/libuv/test/test-fs.c2664
-rw-r--r--3rdparty/libuv/test/test-get-currentexe.c86
-rw-r--r--3rdparty/libuv/test/test-get-loadavg.c35
-rw-r--r--3rdparty/libuv/test/test-get-memory.c38
-rw-r--r--3rdparty/libuv/test/test-getaddrinfo.c184
-rw-r--r--3rdparty/libuv/test/test-getnameinfo.c101
-rw-r--r--3rdparty/libuv/test/test-getsockname.c361
-rw-r--r--3rdparty/libuv/test/test-handle-fileno.c121
-rw-r--r--3rdparty/libuv/test/test-homedir.c49
-rw-r--r--3rdparty/libuv/test/test-hrtime.c54
-rw-r--r--3rdparty/libuv/test/test-idle.c99
-rw-r--r--3rdparty/libuv/test/test-ip4-addr.c46
-rw-r--r--3rdparty/libuv/test/test-ip6-addr.c141
-rw-r--r--3rdparty/libuv/test/test-ipc-send-recv.c411
-rw-r--r--3rdparty/libuv/test/test-ipc.c779
-rw-r--r--3rdparty/libuv/test/test-list.h732
-rw-r--r--3rdparty/libuv/test/test-loop-alive.c67
-rw-r--r--3rdparty/libuv/test/test-loop-close.c53
-rw-r--r--3rdparty/libuv/test/test-loop-configure.c38
-rw-r--r--3rdparty/libuv/test/test-loop-handles.c337
-rw-r--r--3rdparty/libuv/test/test-loop-stop.c71
-rw-r--r--3rdparty/libuv/test/test-loop-time.c63
-rw-r--r--3rdparty/libuv/test/test-multiple-listen.c109
-rw-r--r--3rdparty/libuv/test/test-mutexes.c162
-rw-r--r--3rdparty/libuv/test/test-osx-select.c140
-rw-r--r--3rdparty/libuv/test/test-pass-always.c28
-rw-r--r--3rdparty/libuv/test/test-ping-pong.c270
-rw-r--r--3rdparty/libuv/test/test-pipe-bind-error.c136
-rw-r--r--3rdparty/libuv/test/test-pipe-close-stdout-read-stdin.c104
-rw-r--r--3rdparty/libuv/test/test-pipe-connect-error.c95
-rw-r--r--3rdparty/libuv/test/test-pipe-connect-multiple.c104
-rw-r--r--3rdparty/libuv/test/test-pipe-connect-prepare.c83
-rw-r--r--3rdparty/libuv/test/test-pipe-getsockname.c263
-rw-r--r--3rdparty/libuv/test/test-pipe-pending-instances.c59
-rw-r--r--3rdparty/libuv/test/test-pipe-sendmsg.c169
-rw-r--r--3rdparty/libuv/test/test-pipe-server-close.c91
-rw-r--r--3rdparty/libuv/test/test-pipe-set-non-blocking.c99
-rw-r--r--3rdparty/libuv/test/test-platform-output.c126
-rw-r--r--3rdparty/libuv/test/test-poll-close-doesnt-corrupt-stack.c114
-rw-r--r--3rdparty/libuv/test/test-poll-close.c73
-rw-r--r--3rdparty/libuv/test/test-poll-closesocket.c89
-rw-r--r--3rdparty/libuv/test/test-poll.c560
-rw-r--r--3rdparty/libuv/test/test-process-title.c53
-rw-r--r--3rdparty/libuv/test/test-queue-foreach-delete.c200
-rw-r--r--3rdparty/libuv/test/test-ref.c442
-rw-r--r--3rdparty/libuv/test/test-run-nowait.c45
-rw-r--r--3rdparty/libuv/test/test-run-once.c48
-rw-r--r--3rdparty/libuv/test/test-semaphore.c111
-rw-r--r--3rdparty/libuv/test/test-shutdown-close.c108
-rw-r--r--3rdparty/libuv/test/test-shutdown-eof.c182
-rw-r--r--3rdparty/libuv/test/test-shutdown-twice.c84
-rw-r--r--3rdparty/libuv/test/test-signal-multiple-loops.c290
-rw-r--r--3rdparty/libuv/test/test-signal.c152
-rw-r--r--3rdparty/libuv/test/test-socket-buffer-size.c77
-rw-r--r--3rdparty/libuv/test/test-spawn.c1706
-rw-r--r--3rdparty/libuv/test/test-stdio-over-pipes.c255
-rw-r--r--3rdparty/libuv/test/test-tcp-bind-error.c216
-rw-r--r--3rdparty/libuv/test/test-tcp-bind6-error.c176
-rw-r--r--3rdparty/libuv/test/test-tcp-close-accept.c188
-rw-r--r--3rdparty/libuv/test/test-tcp-close-while-connecting.c86
-rw-r--r--3rdparty/libuv/test/test-tcp-close.c136
-rw-r--r--3rdparty/libuv/test/test-tcp-connect-error-after-write.c98
-rw-r--r--3rdparty/libuv/test/test-tcp-connect-error.c73
-rw-r--r--3rdparty/libuv/test/test-tcp-connect-timeout.c91
-rw-r--r--3rdparty/libuv/test/test-tcp-connect6-error.c71
-rw-r--r--3rdparty/libuv/test/test-tcp-create-socket-early.c206
-rw-r--r--3rdparty/libuv/test/test-tcp-flags.c52
-rw-r--r--3rdparty/libuv/test/test-tcp-oob.c128
-rw-r--r--3rdparty/libuv/test/test-tcp-open.c220
-rw-r--r--3rdparty/libuv/test/test-tcp-read-stop.c76
-rw-r--r--3rdparty/libuv/test/test-tcp-shutdown-after-write.c138
-rw-r--r--3rdparty/libuv/test/test-tcp-try-write.c135
-rw-r--r--3rdparty/libuv/test/test-tcp-unexpected-read.c117
-rw-r--r--3rdparty/libuv/test/test-tcp-write-after-connect.c68
-rw-r--r--3rdparty/libuv/test/test-tcp-write-fail.c115
-rw-r--r--3rdparty/libuv/test/test-tcp-write-queue-order.c137
-rw-r--r--3rdparty/libuv/test/test-tcp-write-to-half-open-connection.c141
-rw-r--r--3rdparty/libuv/test/test-tcp-writealot.c176
-rw-r--r--3rdparty/libuv/test/test-thread-equal.c45
-rw-r--r--3rdparty/libuv/test/test-thread.c211
-rw-r--r--3rdparty/libuv/test/test-threadpool-cancel.c362
-rw-r--r--3rdparty/libuv/test/test-threadpool.c76
-rw-r--r--3rdparty/libuv/test/test-timer-again.c141
-rw-r--r--3rdparty/libuv/test/test-timer-from-check.c80
-rw-r--r--3rdparty/libuv/test/test-timer.c303
-rw-r--r--3rdparty/libuv/test/test-tty.c184
-rw-r--r--3rdparty/libuv/test/test-udp-bind.c93
-rw-r--r--3rdparty/libuv/test/test-udp-create-socket-early.c132
-rw-r--r--3rdparty/libuv/test/test-udp-dgram-too-big.c91
-rw-r--r--3rdparty/libuv/test/test-udp-ipv6.c193
-rw-r--r--3rdparty/libuv/test/test-udp-multicast-interface.c99
-rw-r--r--3rdparty/libuv/test/test-udp-multicast-interface6.c103
-rw-r--r--3rdparty/libuv/test/test-udp-multicast-join.c150
-rw-r--r--3rdparty/libuv/test/test-udp-multicast-join6.c161
-rw-r--r--3rdparty/libuv/test/test-udp-multicast-ttl.c94
-rw-r--r--3rdparty/libuv/test/test-udp-open.c204
-rw-r--r--3rdparty/libuv/test/test-udp-options.c126
-rw-r--r--3rdparty/libuv/test/test-udp-send-and-recv.c214
-rw-r--r--3rdparty/libuv/test/test-udp-send-immediate.c148
-rw-r--r--3rdparty/libuv/test/test-udp-send-unreachable.c150
-rw-r--r--3rdparty/libuv/test/test-udp-try-send.c133
-rw-r--r--3rdparty/libuv/test/test-walk-handles.c77
-rw-r--r--3rdparty/libuv/test/test-watcher-cross-stop.c103
-rw-r--r--3rdparty/libuv/uv.gyp508
-rw-r--r--3rdparty/libuv/vcbuild.bat153
-rw-r--r--3rdparty/lua-zlib/.gitattributes1
-rw-r--r--3rdparty/lua-zlib/CMakeLists.txt62
-rw-r--r--3rdparty/lua-zlib/Makefile62
-rw-r--r--3rdparty/lua-zlib/README151
-rw-r--r--3rdparty/lua-zlib/amnon_david.gzbin65 -> 0 bytes
-rw-r--r--3rdparty/lua-zlib/cmake/Modules/FindLuaJIT.cmake63
-rw-r--r--3rdparty/lua-zlib/lua_zlib.c401
-rw-r--r--3rdparty/lua-zlib/rockspec35
-rw-r--r--3rdparty/lua-zlib/tap.lua24
-rw-r--r--3rdparty/lua-zlib/test.lua198
-rw-r--r--3rdparty/lua-zlib/tom_macwright.gz4
-rw-r--r--3rdparty/lua-zlib/tom_macwright.outbin245 -> 0 bytes
-rw-r--r--3rdparty/lua-zlib/zlib.def2
-rw-r--r--3rdparty/luafilesystem/.travis.yml33
-rw-r--r--3rdparty/luafilesystem/.travis/platform.sh15
-rw-r--r--3rdparty/luafilesystem/.travis/setup_lua.sh101
-rw-r--r--3rdparty/luafilesystem/LICENSE21
-rw-r--r--3rdparty/luafilesystem/Makefile25
-rw-r--r--3rdparty/luafilesystem/Makefile.win25
-rw-r--r--3rdparty/luafilesystem/README23
-rw-r--r--3rdparty/luafilesystem/config24
-rw-r--r--3rdparty/luafilesystem/config.win19
-rw-r--r--3rdparty/luafilesystem/doc/us/doc.css212
-rw-r--r--3rdparty/luafilesystem/doc/us/examples.html103
-rw-r--r--3rdparty/luafilesystem/doc/us/index.html218
-rw-r--r--3rdparty/luafilesystem/doc/us/license.html122
-rw-r--r--3rdparty/luafilesystem/doc/us/luafilesystem.pngbin8535 -> 0 bytes
-rw-r--r--3rdparty/luafilesystem/doc/us/manual.html280
-rw-r--r--3rdparty/luafilesystem/rockspecs/luafilesystem-1.3.0-1.rockspec27
-rw-r--r--3rdparty/luafilesystem/rockspecs/luafilesystem-1.4.0-1.rockspec27
-rw-r--r--3rdparty/luafilesystem/rockspecs/luafilesystem-1.4.0-2.rockspec43
-rw-r--r--3rdparty/luafilesystem/rockspecs/luafilesystem-1.4.1-1.rockspec43
-rw-r--r--3rdparty/luafilesystem/rockspecs/luafilesystem-1.4.1rc1-1.rockspec43
-rw-r--r--3rdparty/luafilesystem/rockspecs/luafilesystem-1.4.2-1.rockspec26
-rw-r--r--3rdparty/luafilesystem/rockspecs/luafilesystem-1.5.0-1.rockspec27
-rw-r--r--3rdparty/luafilesystem/rockspecs/luafilesystem-1.6.0-1.rockspec27
-rw-r--r--3rdparty/luafilesystem/rockspecs/luafilesystem-1.6.1-1.rockspec27
-rw-r--r--3rdparty/luafilesystem/rockspecs/luafilesystem-1.6.2-1.rockspec27
-rw-r--r--3rdparty/luafilesystem/rockspecs/luafilesystem-1.6.3-1.rockspec28
-rw-r--r--3rdparty/luafilesystem/rockspecs/luafilesystem-cvs-1.rockspec44
-rw-r--r--3rdparty/luafilesystem/rockspecs/luafilesystem-cvs-2.rockspec26
-rw-r--r--3rdparty/luafilesystem/rockspecs/luafilesystem-cvs-3.rockspec27
-rw-r--r--3rdparty/luafilesystem/src/.gitignore2
-rw-r--r--3rdparty/luafilesystem/src/lfs.c906
-rw-r--r--3rdparty/luafilesystem/src/lfs.def4
-rw-r--r--3rdparty/luafilesystem/src/lfs.h34
-rw-r--r--3rdparty/luafilesystem/tests/test.lua175
-rw-r--r--3rdparty/luafilesystem/vc6/lfs.def5
-rw-r--r--3rdparty/luafilesystem/vc6/luafilesystem.dsw33
-rw-r--r--3rdparty/luafilesystem/vc6/luafilesystem_dll.dsp127
-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/rapidjson/.gitignore24
-rw-r--r--3rdparty/rapidjson/.gitmodules3
-rw-r--r--3rdparty/rapidjson/.travis.yml54
-rw-r--r--3rdparty/rapidjson/CHANGELOG.md79
-rw-r--r--3rdparty/rapidjson/CMakeLists.txt128
-rw-r--r--3rdparty/rapidjson/CMakeModules/FindGTestSrc.cmake30
-rw-r--r--3rdparty/rapidjson/RapidJSON.pc.in7
-rw-r--r--3rdparty/rapidjson/RapidJSONConfig.cmake.in3
-rw-r--r--3rdparty/rapidjson/RapidJSONConfigVersion.cmake.in10
-rw-r--r--3rdparty/rapidjson/appveyor.yml28
-rw-r--r--3rdparty/rapidjson/bin/data/glossary.json22
-rw-r--r--3rdparty/rapidjson/bin/data/menu.json27
-rw-r--r--3rdparty/rapidjson/bin/data/readme.txt1
-rw-r--r--3rdparty/rapidjson/bin/data/sample.json3315
-rw-r--r--3rdparty/rapidjson/bin/data/webapp.json88
-rw-r--r--3rdparty/rapidjson/bin/data/widget.json26
-rw-r--r--3rdparty/rapidjson/bin/draft-04/schema150
-rw-r--r--3rdparty/rapidjson/bin/encodings/utf16be.jsonbin368 -> 0 bytes
-rw-r--r--3rdparty/rapidjson/bin/encodings/utf16bebom.jsonbin370 -> 0 bytes
-rw-r--r--3rdparty/rapidjson/bin/encodings/utf16le.jsonbin368 -> 0 bytes
-rw-r--r--3rdparty/rapidjson/bin/encodings/utf16lebom.jsonbin370 -> 0 bytes
-rw-r--r--3rdparty/rapidjson/bin/encodings/utf32be.jsonbin736 -> 0 bytes
-rw-r--r--3rdparty/rapidjson/bin/encodings/utf32bebom.jsonbin740 -> 0 bytes
-rw-r--r--3rdparty/rapidjson/bin/encodings/utf32le.jsonbin736 -> 0 bytes
-rw-r--r--3rdparty/rapidjson/bin/encodings/utf32lebom.jsonbin740 -> 0 bytes
-rw-r--r--3rdparty/rapidjson/bin/encodings/utf8.json7
-rw-r--r--3rdparty/rapidjson/bin/encodings/utf8bom.json7
-rw-r--r--3rdparty/rapidjson/bin/jsonchecker/fail1.json1
-rw-r--r--3rdparty/rapidjson/bin/jsonchecker/fail10.json1
-rw-r--r--3rdparty/rapidjson/bin/jsonchecker/fail11.json1
-rw-r--r--3rdparty/rapidjson/bin/jsonchecker/fail12.json1
-rw-r--r--3rdparty/rapidjson/bin/jsonchecker/fail13.json1
-rw-r--r--3rdparty/rapidjson/bin/jsonchecker/fail14.json1
-rw-r--r--3rdparty/rapidjson/bin/jsonchecker/fail15.json1
-rw-r--r--3rdparty/rapidjson/bin/jsonchecker/fail16.json1
-rw-r--r--3rdparty/rapidjson/bin/jsonchecker/fail17.json1
-rw-r--r--3rdparty/rapidjson/bin/jsonchecker/fail18.json1
-rw-r--r--3rdparty/rapidjson/bin/jsonchecker/fail19.json1
-rw-r--r--3rdparty/rapidjson/bin/jsonchecker/fail2.json1
-rw-r--r--3rdparty/rapidjson/bin/jsonchecker/fail20.json1
-rw-r--r--3rdparty/rapidjson/bin/jsonchecker/fail21.json1
-rw-r--r--3rdparty/rapidjson/bin/jsonchecker/fail22.json1
-rw-r--r--3rdparty/rapidjson/bin/jsonchecker/fail23.json1
-rw-r--r--3rdparty/rapidjson/bin/jsonchecker/fail24.json1
-rw-r--r--3rdparty/rapidjson/bin/jsonchecker/fail25.json1
-rw-r--r--3rdparty/rapidjson/bin/jsonchecker/fail26.json1
-rw-r--r--3rdparty/rapidjson/bin/jsonchecker/fail27.json2
-rw-r--r--3rdparty/rapidjson/bin/jsonchecker/fail28.json2
-rw-r--r--3rdparty/rapidjson/bin/jsonchecker/fail29.json1
-rw-r--r--3rdparty/rapidjson/bin/jsonchecker/fail3.json1
-rw-r--r--3rdparty/rapidjson/bin/jsonchecker/fail30.json1
-rw-r--r--3rdparty/rapidjson/bin/jsonchecker/fail31.json1
-rw-r--r--3rdparty/rapidjson/bin/jsonchecker/fail32.json1
-rw-r--r--3rdparty/rapidjson/bin/jsonchecker/fail33.json1
-rw-r--r--3rdparty/rapidjson/bin/jsonchecker/fail4.json1
-rw-r--r--3rdparty/rapidjson/bin/jsonchecker/fail5.json1
-rw-r--r--3rdparty/rapidjson/bin/jsonchecker/fail6.json1
-rw-r--r--3rdparty/rapidjson/bin/jsonchecker/fail7.json1
-rw-r--r--3rdparty/rapidjson/bin/jsonchecker/fail8.json1
-rw-r--r--3rdparty/rapidjson/bin/jsonchecker/fail9.json1
-rw-r--r--3rdparty/rapidjson/bin/jsonchecker/pass1.json58
-rw-r--r--3rdparty/rapidjson/bin/jsonchecker/pass2.json1
-rw-r--r--3rdparty/rapidjson/bin/jsonchecker/pass3.json6
-rw-r--r--3rdparty/rapidjson/bin/jsonchecker/readme.txt3
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/.gitignore1
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/.travis.yml4
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/LICENSE19
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/README.md148
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/bin/jsonschema_suite283
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/remotes/.DS_Storebin6148 -> 0 bytes
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/remotes/folder/folderInteger.json3
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/remotes/integer.json3
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/remotes/subSchemas.json8
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/.DS_Storebin6148 -> 0 bytes
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft3/additionalItems.json82
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft3/additionalProperties.json88
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft3/default.json49
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft3/dependencies.json108
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft3/disallow.json80
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft3/divisibleBy.json60
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft3/enum.json71
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft3/extends.json94
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft3/items.json46
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft3/maxItems.json28
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft3/maxLength.json33
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft3/maximum.json42
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft3/minItems.json28
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft3/minLength.json33
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft3/minimum.json42
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft3/optional/bignum.json107
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft3/optional/format.json222
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft3/optional/jsregex.json18
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft3/optional/zeroTerminatedFloats.json15
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft3/pattern.json34
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft3/patternProperties.json110
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft3/properties.json92
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft3/ref.json159
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft3/refRemote.json74
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft3/required.json53
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft3/type.json474
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft3/uniqueItems.json79
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft4/.DS_Storebin6148 -> 0 bytes
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft4/additionalItems.json82
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft4/additionalProperties.json88
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft4/allOf.json112
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft4/anyOf.json68
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft4/default.json49
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft4/definitions.json32
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft4/dependencies.json113
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft4/enum.json72
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft4/items.json46
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft4/maxItems.json28
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft4/maxLength.json33
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft4/maxProperties.json28
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft4/maximum.json42
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft4/minItems.json28
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft4/minLength.json33
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft4/minProperties.json28
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft4/minimum.json42
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft4/multipleOf.json60
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft4/not.json96
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft4/oneOf.json68
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft4/optional/bignum.json107
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft4/optional/format.json148
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft4/optional/zeroTerminatedFloats.json15
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft4/pattern.json34
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft4/patternProperties.json110
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft4/properties.json92
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft4/ref.json159
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft4/refRemote.json74
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft4/required.json39
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft4/type.json330
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft4/uniqueItems.json79
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tox.ini8
-rw-r--r--3rdparty/rapidjson/bin/types/booleans.json102
-rw-r--r--3rdparty/rapidjson/bin/types/floats.json102
-rw-r--r--3rdparty/rapidjson/bin/types/guids.json102
-rw-r--r--3rdparty/rapidjson/bin/types/integers.json102
-rw-r--r--3rdparty/rapidjson/bin/types/mixed.json592
-rw-r--r--3rdparty/rapidjson/bin/types/nulls.json102
-rw-r--r--3rdparty/rapidjson/bin/types/paragraphs.json102
-rw-r--r--3rdparty/rapidjson/bin/types/readme.txt1
-rw-r--r--3rdparty/rapidjson/doc/CMakeLists.txt25
-rw-r--r--3rdparty/rapidjson/doc/Doxyfile.in2368
-rw-r--r--3rdparty/rapidjson/doc/Doxyfile.zh-cn.in2368
-rw-r--r--3rdparty/rapidjson/doc/diagram/architecture.dot50
-rw-r--r--3rdparty/rapidjson/doc/diagram/architecture.pngbin16569 -> 0 bytes
-rw-r--r--3rdparty/rapidjson/doc/diagram/insituparsing.dot65
-rw-r--r--3rdparty/rapidjson/doc/diagram/insituparsing.pngbin37281 -> 0 bytes
-rw-r--r--3rdparty/rapidjson/doc/diagram/iterative-parser-states-diagram.dot62
-rw-r--r--3rdparty/rapidjson/doc/diagram/iterative-parser-states-diagram.pngbin92378 -> 0 bytes
-rw-r--r--3rdparty/rapidjson/doc/diagram/makefile8
-rw-r--r--3rdparty/rapidjson/doc/diagram/move1.dot47
-rw-r--r--3rdparty/rapidjson/doc/diagram/move1.pngbin16081 -> 0 bytes
-rw-r--r--3rdparty/rapidjson/doc/diagram/move2.dot62
-rw-r--r--3rdparty/rapidjson/doc/diagram/move2.pngbin41517 -> 0 bytes
-rw-r--r--3rdparty/rapidjson/doc/diagram/move3.dot60
-rw-r--r--3rdparty/rapidjson/doc/diagram/move3.pngbin36371 -> 0 bytes
-rw-r--r--3rdparty/rapidjson/doc/diagram/normalparsing.dot56
-rw-r--r--3rdparty/rapidjson/doc/diagram/normalparsing.pngbin32887 -> 0 bytes
-rw-r--r--3rdparty/rapidjson/doc/diagram/simpledom.dot54
-rw-r--r--3rdparty/rapidjson/doc/diagram/simpledom.pngbin43670 -> 0 bytes
-rw-r--r--3rdparty/rapidjson/doc/diagram/tutorial.dot58
-rw-r--r--3rdparty/rapidjson/doc/diagram/tutorial.pngbin44634 -> 0 bytes
-rw-r--r--3rdparty/rapidjson/doc/diagram/utilityclass.dot73
-rw-r--r--3rdparty/rapidjson/doc/diagram/utilityclass.pngbin99993 -> 0 bytes
-rw-r--r--3rdparty/rapidjson/doc/dom.md277
-rw-r--r--3rdparty/rapidjson/doc/dom.zh-cn.md281
-rw-r--r--3rdparty/rapidjson/doc/encoding.md146
-rw-r--r--3rdparty/rapidjson/doc/encoding.zh-cn.md152
-rw-r--r--3rdparty/rapidjson/doc/faq.md289
-rw-r--r--3rdparty/rapidjson/doc/faq.zh-cn.md290
-rw-r--r--3rdparty/rapidjson/doc/features.md98
-rw-r--r--3rdparty/rapidjson/doc/features.zh-cn.md97
-rw-r--r--3rdparty/rapidjson/doc/internals.md365
-rw-r--r--3rdparty/rapidjson/doc/logo/rapidjson.pngbin5259 -> 0 bytes
-rw-r--r--3rdparty/rapidjson/doc/logo/rapidjson.svg119
-rw-r--r--3rdparty/rapidjson/doc/misc/DoxygenLayout.xml194
-rw-r--r--3rdparty/rapidjson/doc/misc/doxygenextra.css274
-rw-r--r--3rdparty/rapidjson/doc/misc/footer.html27
-rw-r--r--3rdparty/rapidjson/doc/misc/header.html33
-rw-r--r--3rdparty/rapidjson/doc/performance.md26
-rw-r--r--3rdparty/rapidjson/doc/performance.zh-cn.md26
-rw-r--r--3rdparty/rapidjson/doc/pointer.md234
-rw-r--r--3rdparty/rapidjson/doc/pointer.zh-cn.md234
-rw-r--r--3rdparty/rapidjson/doc/sax.md475
-rw-r--r--3rdparty/rapidjson/doc/sax.zh-cn.md476
-rw-r--r--3rdparty/rapidjson/doc/schema.md237
-rw-r--r--3rdparty/rapidjson/doc/schema.zh-cn.md237
-rw-r--r--3rdparty/rapidjson/doc/stream.md426
-rw-r--r--3rdparty/rapidjson/doc/stream.zh-cn.md426
-rw-r--r--3rdparty/rapidjson/doc/tutorial.md517
-rw-r--r--3rdparty/rapidjson/doc/tutorial.zh-cn.md515
-rw-r--r--3rdparty/rapidjson/example/CMakeLists.txt36
-rw-r--r--3rdparty/rapidjson/example/capitalize/capitalize.cpp66
-rw-r--r--3rdparty/rapidjson/example/condense/condense.cpp32
-rw-r--r--3rdparty/rapidjson/example/jsonx/jsonx.cpp200
-rw-r--r--3rdparty/rapidjson/example/messagereader/messagereader.cpp105
-rw-r--r--3rdparty/rapidjson/example/pretty/pretty.cpp30
-rw-r--r--3rdparty/rapidjson/example/prettyauto/prettyauto.cpp56
-rw-r--r--3rdparty/rapidjson/example/schemavalidator/schemavalidator.cpp72
-rw-r--r--3rdparty/rapidjson/example/serialize/serialize.cpp173
-rw-r--r--3rdparty/rapidjson/example/simpledom/simpledom.cpp29
-rw-r--r--3rdparty/rapidjson/example/simplereader/simplereader.cpp38
-rw-r--r--3rdparty/rapidjson/example/simplewriter/simplewriter.cpp35
-rw-r--r--3rdparty/rapidjson/example/tutorial/tutorial.cpp151
-rw-r--r--3rdparty/rapidjson/include/rapidjson/allocators.h263
-rw-r--r--3rdparty/rapidjson/include/rapidjson/document.h2189
-rw-r--r--3rdparty/rapidjson/include/rapidjson/encodedstream.h270
-rw-r--r--3rdparty/rapidjson/include/rapidjson/encodings.h712
-rw-r--r--3rdparty/rapidjson/include/rapidjson/error/en.h74
-rw-r--r--3rdparty/rapidjson/include/rapidjson/error/error.h155
-rw-r--r--3rdparty/rapidjson/include/rapidjson/filereadstream.h99
-rw-r--r--3rdparty/rapidjson/include/rapidjson/filewritestream.h104
-rw-r--r--3rdparty/rapidjson/include/rapidjson/fwd.h151
-rw-r--r--3rdparty/rapidjson/include/rapidjson/internal/biginteger.h290
-rw-r--r--3rdparty/rapidjson/include/rapidjson/internal/diyfp.h258
-rw-r--r--3rdparty/rapidjson/include/rapidjson/internal/dtoa.h243
-rw-r--r--3rdparty/rapidjson/include/rapidjson/internal/ieee754.h78
-rw-r--r--3rdparty/rapidjson/include/rapidjson/internal/itoa.h304
-rw-r--r--3rdparty/rapidjson/include/rapidjson/internal/meta.h181
-rw-r--r--3rdparty/rapidjson/include/rapidjson/internal/pow10.h55
-rw-r--r--3rdparty/rapidjson/include/rapidjson/internal/regex.h696
-rw-r--r--3rdparty/rapidjson/include/rapidjson/internal/stack.h230
-rw-r--r--3rdparty/rapidjson/include/rapidjson/internal/strfunc.h55
-rw-r--r--3rdparty/rapidjson/include/rapidjson/internal/strtod.h269
-rw-r--r--3rdparty/rapidjson/include/rapidjson/internal/swap.h46
-rw-r--r--3rdparty/rapidjson/include/rapidjson/istreamwrapper.h105
-rw-r--r--3rdparty/rapidjson/include/rapidjson/memorybuffer.h70
-rw-r--r--3rdparty/rapidjson/include/rapidjson/memorystream.h71
-rw-r--r--3rdparty/rapidjson/include/rapidjson/msinttypes/inttypes.h316
-rw-r--r--3rdparty/rapidjson/include/rapidjson/msinttypes/stdint.h300
-rw-r--r--3rdparty/rapidjson/include/rapidjson/ostreamwrapper.h76
-rw-r--r--3rdparty/rapidjson/include/rapidjson/pointer.h1345
-rw-r--r--3rdparty/rapidjson/include/rapidjson/prettywriter.h223
-rw-r--r--3rdparty/rapidjson/include/rapidjson/rapidjson.h569
-rw-r--r--3rdparty/rapidjson/include/rapidjson/reader.h1696
-rw-r--r--3rdparty/rapidjson/include/rapidjson/schema.h1979
-rw-r--r--3rdparty/rapidjson/include/rapidjson/stream.h179
-rw-r--r--3rdparty/rapidjson/include/rapidjson/stringbuffer.h117
-rw-r--r--3rdparty/rapidjson/include/rapidjson/writer.h558
-rw-r--r--3rdparty/rapidjson/library.json12
-rw-r--r--3rdparty/rapidjson/license.txt57
-rw-r--r--3rdparty/rapidjson/rapidjson.autopkg75
-rw-r--r--3rdparty/rapidjson/readme.md129
-rw-r--r--3rdparty/rapidjson/readme.zh-cn.md121
-rw-r--r--3rdparty/rapidjson/test/CMakeLists.txt20
-rw-r--r--3rdparty/rapidjson/test/perftest/CMakeLists.txt17
-rw-r--r--3rdparty/rapidjson/test/perftest/misctest.cpp974
-rw-r--r--3rdparty/rapidjson/test/perftest/perftest.cpp24
-rw-r--r--3rdparty/rapidjson/test/perftest/perftest.h180
-rw-r--r--3rdparty/rapidjson/test/perftest/platformtest.cpp166
-rw-r--r--3rdparty/rapidjson/test/perftest/rapidjsontest.cpp422
-rw-r--r--3rdparty/rapidjson/test/perftest/schematest.cpp216
-rw-r--r--3rdparty/rapidjson/test/unittest/CMakeLists.txt61
-rw-r--r--3rdparty/rapidjson/test/unittest/allocatorstest.cpp102
-rw-r--r--3rdparty/rapidjson/test/unittest/bigintegertest.cpp133
-rw-r--r--3rdparty/rapidjson/test/unittest/documenttest.cpp589
-rw-r--r--3rdparty/rapidjson/test/unittest/dtoatest.cpp91
-rw-r--r--3rdparty/rapidjson/test/unittest/encodedstreamtest.cpp313
-rw-r--r--3rdparty/rapidjson/test/unittest/encodingstest.cpp425
-rw-r--r--3rdparty/rapidjson/test/unittest/filestreamtest.cpp112
-rw-r--r--3rdparty/rapidjson/test/unittest/fwdtest.cpp227
-rw-r--r--3rdparty/rapidjson/test/unittest/istreamwrappertest.cpp171
-rw-r--r--3rdparty/rapidjson/test/unittest/itoatest.cpp158
-rw-r--r--3rdparty/rapidjson/test/unittest/jsoncheckertest.cpp99
-rw-r--r--3rdparty/rapidjson/test/unittest/namespacetest.cpp70
-rw-r--r--3rdparty/rapidjson/test/unittest/ostreamwrappertest.cpp91
-rw-r--r--3rdparty/rapidjson/test/unittest/pointertest.cpp1524
-rw-r--r--3rdparty/rapidjson/test/unittest/prettywritertest.cpp180
-rw-r--r--3rdparty/rapidjson/test/unittest/readertest.cpp1517
-rw-r--r--3rdparty/rapidjson/test/unittest/regextest.cpp576
-rw-r--r--3rdparty/rapidjson/test/unittest/schematest.cpp1157
-rw-r--r--3rdparty/rapidjson/test/unittest/simdtest.cpp159
-rw-r--r--3rdparty/rapidjson/test/unittest/strfunctest.cpp30
-rw-r--r--3rdparty/rapidjson/test/unittest/stringbuffertest.cpp163
-rw-r--r--3rdparty/rapidjson/test/unittest/strtodtest.cpp132
-rw-r--r--3rdparty/rapidjson/test/unittest/unittest.cpp50
-rw-r--r--3rdparty/rapidjson/test/unittest/unittest.h135
-rw-r--r--3rdparty/rapidjson/test/unittest/valuetest.cpp1498
-rw-r--r--3rdparty/rapidjson/test/unittest/writertest.cpp441
-rw-r--r--3rdparty/rapidjson/travis-doxygen.sh122
-rw-r--r--artwork/monochrome-matrix.pngbin33194 -> 33047 bytes
-rw-r--r--benchmarks/eminline_native.cpp15
-rw-r--r--benchmarks/eminline_noasm.cpp24
-rw-r--r--benchmarks/main.cpp6
-rw-r--r--docs/emscripten.txt60
-rw-r--r--docs/hlsl.txt2
-rw-r--r--docs/luaengine.md35
-rw-r--r--hash/c128_cart.xml45
-rw-r--r--hash/c64_cart.xml16
-rw-r--r--hash/casloopy.xml2
-rw-r--r--hash/electron_cass.xml10418
-rw-r--r--hash/fidel_scc.xml20
-rw-r--r--hash/k28m2.xml81
-rw-r--r--hash/m5_cart.xml143
-rw-r--r--hash/m5_flop.xml16
-rw-r--r--hash/pico.xml2
-rw-r--r--hash/snotec.xml38
-rw-r--r--hlsl/artwork_support/distortion.fx101
-rw-r--r--hlsl/artwork_support/post.fx535
-rw-r--r--hlsl/deconverge.fx43
-rw-r--r--hlsl/distortion.fx52
-rw-r--r--hlsl/downsample.fx32
-rw-r--r--hlsl/focus.fx33
-rw-r--r--hlsl/ntsc.fx2
-rw-r--r--hlsl/phosphor.fx2
-rw-r--r--hlsl/post.fx94
-rw-r--r--hlsl/prescale.fx44
-rw-r--r--hlsl/primary.fx23
-rw-r--r--language/Afrikaans/strings.po205
-rw-r--r--language/Albanian/strings.po205
-rw-r--r--language/Arabic/strings.po205
-rw-r--r--language/Basque/strings.po206
-rw-r--r--language/Belarusian/strings.po208
-rw-r--r--language/Bosnian/strings.po205
-rw-r--r--language/Bulgarian/strings.po207
-rw-r--r--language/Burmese/strings.po205
-rw-r--r--language/Catalan/strings.po206
-rw-r--r--language/Chinese (Simple)/strings.po205
-rw-r--r--language/Chinese (Traditional)/strings.po206
-rw-r--r--language/Croatian/strings.po207
-rw-r--r--language/Czech/strings.po206
-rw-r--r--language/Danish/strings.po207
-rw-r--r--language/Dutch/strings.po207
-rw-r--r--language/English/strings.po208
-rw-r--r--language/Estonian/strings.po206
-rw-r--r--language/Finnish/strings.po207
-rw-r--r--language/French (Canada)/strings.po207
-rw-r--r--language/French/strings.po207
-rw-r--r--language/Georgian/strings.po205
-rw-r--r--language/German/strings.po207
-rw-r--r--language/Greek/strings.po206
-rw-r--r--language/Hebrew/strings.po206
-rw-r--r--language/Hindi/strings.po205
-rw-r--r--language/Hungarian/strings.po206
-rw-r--r--language/Indonesian/strings.po206
-rw-r--r--language/Italian/strings.po207
-rw-r--r--language/Japanese/strings.po207
-rw-r--r--language/Korean/strings.po207
-rw-r--r--language/Latvian/strings.po207
-rw-r--r--language/Lithuanian/strings.po207
-rw-r--r--language/Macedonian/strings.po205
-rw-r--r--language/Norwegian/strings.po206
-rw-r--r--language/Persian/strings.po205
-rw-r--r--language/Polish/strings.po208
-rw-r--r--language/Portuguese (Brazil)/strings.po207
-rw-r--r--language/Portuguese/strings.po206
-rw-r--r--language/Romanian/strings.po208
-rw-r--r--language/Russian/strings.po208
-rw-r--r--language/Serbian (Cyrillic)/strings.po207
-rw-r--r--language/Serbian/strings.po207
-rw-r--r--language/Slovak/strings.po207
-rw-r--r--language/Slovenian/strings.po208
-rw-r--r--language/Spanish (Mexico)/strings.po207
-rw-r--r--language/Spanish/strings.po207
-rw-r--r--language/Swedish/strings.po206
-rw-r--r--language/Thai/strings.po205
-rw-r--r--language/Turkish/strings.po207
-rw-r--r--language/Ukrainian/strings.po207
-rw-r--r--language/Vietnamese/strings.po206
-rw-r--r--makefile227
-rw-r--r--plugins/boot.lua24
-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.lua20
-rw-r--r--plugins/dummy/plugin.json9
-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/LICENSE22
-rw-r--r--plugins/json/README.md2
-rw-r--r--plugins/json/init.lua732
-rw-r--r--plugins/json/plugin.json8
-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/jedutil/baseline/ampal18p8/pal10h8-as-ampal18p8.txt97
-rw-r--r--regtests/jedutil/baseline/ampal18p8/pal10l8-as-ampal18p8.txt97
-rw-r--r--regtests/jedutil/baseline/ampal18p8/pal12h6-as-ampal18p8.txt75
-rw-r--r--regtests/jedutil/baseline/ampal18p8/pal12l6-as-ampal18p8.txt75
-rw-r--r--regtests/jedutil/baseline/ampal18p8/pal14h4-as-ampal18p8.txt53
-rw-r--r--regtests/jedutil/baseline/ampal18p8/pal14l4-as-ampal18p8.txt53
-rw-r--r--regtests/jedutil/baseline/ampal18p8/pal16h2-as-ampal18p8.txt31
-rw-r--r--regtests/jedutil/baseline/ampal18p8/pal16l2-as-ampal18p8.txt31
-rw-r--r--regtests/jedutil/baseline/ampal18p8/pal16l8-as-ampal18p8.txt89
-rw-r--r--regtests/jedutil/eqns/PALASM/ampal18p8/pal10h8-as-ampal18p8.pds119
-rw-r--r--regtests/jedutil/eqns/PALASM/ampal18p8/pal10l8-as-ampal18p8.pds119
-rw-r--r--regtests/jedutil/eqns/PALASM/ampal18p8/pal12h6-as-ampal18p8.pds101
-rw-r--r--regtests/jedutil/eqns/PALASM/ampal18p8/pal12l6-as-ampal18p8.pds101
-rw-r--r--regtests/jedutil/eqns/PALASM/ampal18p8/pal14h4-as-ampal18p8.pds83
-rw-r--r--regtests/jedutil/eqns/PALASM/ampal18p8/pal14l4-as-ampal18p8.pds83
-rw-r--r--regtests/jedutil/eqns/PALASM/ampal18p8/pal16h2-as-ampal18p8.pds65
-rw-r--r--regtests/jedutil/eqns/PALASM/ampal18p8/pal16l2-as-ampal18p8.pds65
-rw-r--r--regtests/jedutil/eqns/PALASM/ampal18p8/pal16l8-as-ampal18p8.pds119
-rw-r--r--regtests/jedutil/eqns/pal10l8/pal10l8.eqn (renamed from 3rdparty/libuv/test/fixtures/empty_file)0
-rw-r--r--regtests/jedutil/eqns/pal12h6/pal12h6.eqn0
-rw-r--r--regtests/jedutil/eqns/pal12l6/pal12l6.eqn0
-rw-r--r--regtests/jedutil/eqns/pal14h4/pal14h4.eqn0
-rw-r--r--regtests/jedutil/eqns/pal14l4/pal14l4.eqn0
-rw-r--r--regtests/jedutil/eqns/pal16c1/pal16c1.eqn0
-rw-r--r--regtests/jedutil/eqns/pal16h2/pal16h2.eqn0
-rw-r--r--regtests/jedutil/eqns/pal16l2/pal16l2.eqn0
-rw-r--r--regtests/jedutil/eqns/pal16l8/pal16l8.eqn0
-rw-r--r--regtests/jedutil/eqns/pal16r4/pal16r4.eqn0
-rw-r--r--regtests/jedutil/eqns/pal16r6/pal16r6.eqn0
-rw-r--r--regtests/jedutil/eqns/pal16r8/pal16r8.eqn0
-rw-r--r--regtests/jedutil/eqns/pal20l10/pal20l10.eqn0
-rw-r--r--regtests/jedutil/eqns/pal20l8/pal20l8.eqn0
-rw-r--r--regtests/jedutil/eqns/pal20r4/pal20r4.eqn0
-rw-r--r--regtests/jedutil/eqns/pal20r6/pal20r6.eqn0
-rw-r--r--regtests/jedutil/eqns/pal20r8/pal20r8.eqn0
-rw-r--r--regtests/jedutil/eqns/readme.txt0
-rw-r--r--regtests/jedutil/jeds/ampal18p8/pal10h8-as-ampal18p8.jed90
-rw-r--r--regtests/jedutil/jeds/ampal18p8/pal10l8-as-ampal18p8.jed90
-rw-r--r--regtests/jedutil/jeds/ampal18p8/pal12h6-as-ampal18p8.jed90
-rw-r--r--regtests/jedutil/jeds/ampal18p8/pal12l6-as-ampal18p8.jed90
-rw-r--r--regtests/jedutil/jeds/ampal18p8/pal14h4-as-ampal18p8.jed90
-rw-r--r--regtests/jedutil/jeds/ampal18p8/pal14l4-as-ampal18p8.jed90
-rw-r--r--regtests/jedutil/jeds/ampal18p8/pal16h2-as-ampal18p8.jed90
-rw-r--r--regtests/jedutil/jeds/ampal18p8/pal16l2-as-ampal18p8.jed90
-rw-r--r--regtests/jedutil/jeds/ampal18p8/pal16l8-as-ampal18p8.jed90
-rw-r--r--scripts/build/makedep.py4
-rw-r--r--scripts/genie.lua56
-rw-r--r--scripts/src/3rdparty.lua275
-rw-r--r--scripts/src/benchmarks.lua74
-rw-r--r--scripts/src/bus.lua14
-rw-r--r--scripts/src/cpu.lua9
-rw-r--r--scripts/src/emu.lua62
-rw-r--r--scripts/src/machine.lua12
-rw-r--r--scripts/src/main.lua15
-rw-r--r--scripts/src/osd/modules.lua36
-rw-r--r--scripts/src/osd/osdmini.lua2
-rw-r--r--scripts/src/osd/osdmini_cfg.lua2
-rw-r--r--scripts/src/osd/sdl.lua123
-rw-r--r--scripts/src/osd/sdl_cfg.lua36
-rw-r--r--scripts/src/osd/windows.lua1
-rw-r--r--scripts/src/osd/windows_cfg.lua2
-rw-r--r--scripts/src/tests.lua98
-rw-r--r--scripts/src/tools.lua111
-rw-r--r--scripts/src/video.lua24
-rw-r--r--scripts/target/mame/arcade.lua6
-rw-r--r--scripts/target/mame/mess.lua13
-rw-r--r--scripts/toolchain.lua59
-rw-r--r--shaders/dx11/fs_line.binbin260 -> 0 bytes
-rw-r--r--shaders/dx11/fs_quad.binbin260 -> 0 bytes
-rw-r--r--shaders/dx11/fs_quad_texture.binbin396 -> 0 bytes
-rw-r--r--shaders/dx11/vs_line.binbin465 -> 0 bytes
-rw-r--r--shaders/dx11/vs_quad.binbin465 -> 0 bytes
-rw-r--r--shaders/dx11/vs_quad_texture.binbin575 -> 0 bytes
-rw-r--r--shaders/dx9/fs_line.binbin141 -> 0 bytes
-rw-r--r--shaders/dx9/fs_quad.binbin141 -> 0 bytes
-rw-r--r--shaders/dx9/fs_quad_texture.binbin241 -> 0 bytes
-rw-r--r--shaders/dx9/vs_line.binbin294 -> 0 bytes
-rw-r--r--shaders/dx9/vs_quad.binbin294 -> 0 bytes
-rw-r--r--shaders/dx9/vs_quad_texture.binbin330 -> 0 bytes
-rw-r--r--shaders/gles/fs_line.binbin89 -> 0 bytes
-rw-r--r--shaders/gles/fs_quad.binbin89 -> 0 bytes
-rw-r--r--shaders/gles/fs_quad_texture.binbin238 -> 0 bytes
-rw-r--r--shaders/gles/vs_line.binbin324 -> 0 bytes
-rw-r--r--shaders/gles/vs_quad.binbin324 -> 0 bytes
-rw-r--r--shaders/gles/vs_quad_texture.binbin419 -> 0 bytes
-rw-r--r--shaders/glsl/fs_line.binbin83 -> 0 bytes
-rw-r--r--shaders/glsl/fs_quad.binbin83 -> 0 bytes
-rw-r--r--shaders/glsl/fs_quad_texture.binbin181 -> 0 bytes
-rw-r--r--shaders/glsl/vs_line.binbin294 -> 0 bytes
-rw-r--r--shaders/glsl/vs_quad.binbin294 -> 0 bytes
-rw-r--r--shaders/glsl/vs_quad_texture.binbin377 -> 0 bytes
-rw-r--r--shaders/metal/fs_line.binbin404 -> 0 bytes
-rw-r--r--shaders/metal/fs_quad.binbin404 -> 0 bytes
-rw-r--r--shaders/metal/fs_quad_texture.binbin634 -> 0 bytes
-rw-r--r--shaders/metal/vs_line.binbin653 -> 0 bytes
-rw-r--r--shaders/metal/vs_quad.binbin653 -> 0 bytes
-rw-r--r--shaders/metal/vs_quad_texture.binbin757 -> 0 bytes
-rw-r--r--src/devices/bus/a2bus/a2pic.cpp20
-rw-r--r--src/devices/bus/abcbus/lux10828.cpp8
-rw-r--r--src/devices/bus/amiga/zorro/zorro.h4
-rw-r--r--src/devices/bus/centronics/epson_lx810l.cpp4
-rw-r--r--src/devices/bus/isa/3c505.cpp22
-rw-r--r--src/devices/bus/isa/3c505.h1
-rw-r--r--src/devices/bus/isa/omti8621.cpp108
-rw-r--r--src/devices/bus/isa/omti8621.h3
-rw-r--r--src/devices/bus/isa/sc499.cpp25
-rw-r--r--src/devices/bus/isa/sc499.h1
-rw-r--r--src/devices/bus/m5/rom.cpp63
-rw-r--r--src/devices/bus/m5/rom.h50
-rw-r--r--src/devices/bus/m5/slot.cpp276
-rw-r--r--src/devices/bus/m5/slot.h118
-rw-r--r--src/devices/bus/neogeo/bootleg_prot.cpp4
-rw-r--r--src/devices/bus/ti99_peb/bwg.cpp2
-rw-r--r--src/devices/bus/ti99_peb/hfdc.cpp4
-rw-r--r--src/devices/cpu/alto2/alto2cpu.cpp4
-rw-r--r--src/devices/cpu/arm/arm.cpp6
-rw-r--r--src/devices/cpu/asap/asap.cpp8
-rw-r--r--src/devices/cpu/dsp32/dsp32.cpp12
-rw-r--r--src/devices/cpu/h8/h8.cpp2
-rw-r--r--src/devices/cpu/hd61700/hd61700.cpp4
-rw-r--r--src/devices/cpu/hphybrid/hphybrid.cpp9
-rw-r--r--src/devices/cpu/i386/i386.cpp92
-rw-r--r--src/devices/cpu/i386/i386.h9
-rw-r--r--src/devices/cpu/i386/i386op32.inc16
-rw-r--r--src/devices/cpu/i386/i386ops.h1
-rw-r--r--src/devices/cpu/i386/i386ops.inc63
-rw-r--r--src/devices/cpu/i386/i386priv.h41
-rw-r--r--src/devices/cpu/i386/i486ops.inc8
-rw-r--r--src/devices/cpu/i4004/i4004.cpp4
-rw-r--r--src/devices/cpu/i8089/i8089.cpp4
-rw-r--r--src/devices/cpu/i86/i86.txt15
-rw-r--r--src/devices/cpu/i960/i960.cpp8
-rw-r--r--src/devices/cpu/m37710/m37710il.h8
-rw-r--r--src/devices/cpu/m6800/6800dasm.cpp16
-rw-r--r--src/devices/cpu/m6800/6800ops.inc26
-rw-r--r--src/devices/cpu/m6800/6800tbl.inc28
-rw-r--r--src/devices/cpu/m6800/m6800.cpp4
-rw-r--r--src/devices/cpu/m6800/m6800.h2
-rw-r--r--src/devices/cpu/m68000/m68kcpu.cpp36
-rw-r--r--src/devices/cpu/m68000/m68kcpu.h4
-rw-r--r--src/devices/cpu/m68000/m68kmake.cpp2
-rw-r--r--src/devices/cpu/m68000/m68kops.cpp34874
-rw-r--r--src/devices/cpu/m68000/m68kops.h1995
-rw-r--r--src/devices/cpu/m68000/makefile20
-rw-r--r--src/devices/cpu/mips/mips3.cpp67
-rw-r--r--src/devices/cpu/mips/mips3.h6
-rw-r--r--src/devices/cpu/mips/mips3com.cpp12
-rw-r--r--src/devices/cpu/mips/mips3com.h1
-rw-r--r--src/devices/cpu/mips/mips3drc.cpp6
-rw-r--r--src/devices/cpu/pdp1/pdp1.cpp2
-rw-r--r--src/devices/cpu/pdp1/tx0.cpp2
-rw-r--r--src/devices/cpu/powerpc/ppc.h7
-rw-r--r--src/devices/cpu/powerpc/ppccom.cpp28
-rw-r--r--src/devices/cpu/powerpc/ppcdrc.cpp10
-rw-r--r--src/devices/cpu/se3208/se3208.cpp32
-rw-r--r--src/devices/cpu/t11/t11.cpp4
-rw-r--r--src/devices/cpu/vtlb.cpp310
-rw-r--r--src/devices/cpu/vtlb.h88
-rw-r--r--src/devices/cpu/z80/z80.cpp144
-rw-r--r--src/devices/cpu/z80/z80.h4
-rw-r--r--src/devices/imagedev/floppy.cpp8
-rw-r--r--src/devices/machine/com8116.cpp42
-rw-r--r--src/devices/machine/com8116.h6
-rw-r--r--src/devices/machine/corvushd.cpp2
-rw-r--r--src/devices/machine/dmac.cpp39
-rw-r--r--src/devices/machine/dmac.h2
-rw-r--r--src/devices/machine/hp_taco.cpp1467
-rw-r--r--src/devices/machine/hp_taco.h169
-rw-r--r--src/devices/machine/i8271.cpp20
-rw-r--r--src/devices/machine/i8271.h1
-rw-r--r--src/devices/machine/k033906.cpp4
-rw-r--r--src/devices/machine/k033906.h4
-rw-r--r--src/devices/machine/pic8259.cpp5
-rw-r--r--src/devices/machine/ram.cpp13
-rw-r--r--src/devices/machine/ram.h4
-rw-r--r--src/devices/sound/votrax.h2
-rw-r--r--src/devices/video/ef9364.cpp359
-rw-r--r--src/devices/video/ef9364.h104
-rw-r--r--src/devices/video/ef9365.cpp2
-rw-r--r--src/devices/video/i82730.cpp4
-rw-r--r--src/devices/video/jangou_blitter.cpp194
-rw-r--r--src/devices/video/jangou_blitter.h71
-rw-r--r--src/devices/video/mc6845.cpp3
-rw-r--r--src/devices/video/upd7220.cpp9
-rw-r--r--src/devices/video/vooddefs.h1848
-rw-r--r--src/devices/video/voodoo.cpp2875
-rw-r--r--src/devices/video/voodoo.h1794
-rw-r--r--src/devices/video/voodoo_pci.cpp4
-rw-r--r--src/emu/cheat.cpp16
-rw-r--r--src/emu/cheat.h4
-rw-r--r--src/emu/clifront.cpp29
-rw-r--r--src/emu/debug/debugcmd.cpp5
-rw-r--r--src/emu/debug/debugcpu.cpp21
-rw-r--r--src/emu/debug/debugvw.cpp29
-rw-r--r--src/emu/debug/debugvw.h2
-rw-r--r--src/emu/debug/dvdisasm.cpp10
-rw-r--r--src/emu/debug/dvstate.cpp18
-rw-r--r--src/emu/debug/textbuf.cpp6
-rw-r--r--src/emu/diexec.cpp1
-rw-r--r--src/emu/diexec.h2
-rw-r--r--src/emu/diimage.cpp28
-rw-r--r--src/emu/dimemory.cpp5
-rw-r--r--src/emu/dimemory.h18
-rw-r--r--src/emu/disound.cpp5
-rw-r--r--src/emu/divtlb.cpp341
-rw-r--r--src/emu/divtlb.h89
-rw-r--r--src/emu/drivers/empty.cpp7
-rw-r--r--src/emu/emualloc.cpp29
-rw-r--r--src/emu/emualloc.h3
-rw-r--r--src/emu/emuopts.cpp70
-rw-r--r--src/emu/emuopts.h32
-rw-r--r--src/emu/info.cpp24
-rw-r--r--src/emu/info.h2
-rw-r--r--src/emu/inpttype.h18
-rw-r--r--src/emu/ioport.cpp218
-rw-r--r--src/emu/ioport.h34
-rw-r--r--src/emu/luaengine.cpp703
-rw-r--r--src/emu/luaengine.h37
-rw-r--r--src/emu/machine.cpp147
-rw-r--r--src/emu/machine.h12
-rw-r--r--src/emu/mame.cpp34
-rw-r--r--src/emu/mame.h11
-rw-r--r--src/emu/memory.cpp106
-rw-r--r--src/emu/memory.h13
-rw-r--r--src/emu/render.cpp15
-rw-r--r--src/emu/render.h17
-rw-r--r--src/emu/rendfont.cpp126
-rw-r--r--src/emu/rendfont.h14
-rw-r--r--src/emu/rendutil.cpp4
-rw-r--r--src/emu/rendutil.h2
-rw-r--r--src/emu/romload.cpp12
-rw-r--r--src/emu/save.cpp5
-rw-r--r--src/emu/sound/wavwrite.cpp2
-rw-r--r--src/emu/ui/auditmenu.cpp200
-rw-r--r--src/emu/ui/auditmenu.h37
-rw-r--r--src/emu/ui/barcode.cpp6
-rw-r--r--src/emu/ui/cheatopt.cpp224
-rw-r--r--src/emu/ui/cheatopt.h25
-rw-r--r--src/emu/ui/cmddata.h404
-rw-r--r--src/emu/ui/cmdrender.h151
-rw-r--r--src/emu/ui/ctrlmenu.cpp149
-rw-r--r--src/emu/ui/ctrlmenu.h41
-rw-r--r--src/emu/ui/custmenu.cpp580
-rw-r--r--src/emu/ui/custmenu.h131
-rw-r--r--src/emu/ui/custui.cpp1049
-rw-r--r--src/emu/ui/custui.h182
-rw-r--r--src/emu/ui/datfile.cpp650
-rw-r--r--src/emu/ui/datfile.h92
-rw-r--r--src/emu/ui/datmenu.cpp303
-rw-r--r--src/emu/ui/datmenu.h52
-rw-r--r--src/emu/ui/defimg.h261
-rw-r--r--src/emu/ui/dirmenu.cpp691
-rw-r--r--src/emu/ui/dirmenu.h128
-rw-r--r--src/emu/ui/dsplmenu.cpp227
-rw-r--r--src/emu/ui/dsplmenu.h44
-rw-r--r--src/emu/ui/filemngr.cpp4
-rw-r--r--src/emu/ui/filesel.cpp5
-rw-r--r--src/emu/ui/icorender.h233
-rw-r--r--src/emu/ui/imgcntrl.cpp14
-rw-r--r--src/emu/ui/inifile.cpp454
-rw-r--r--src/emu/ui/inifile.h122
-rw-r--r--src/emu/ui/inputmap.cpp2
-rw-r--r--src/emu/ui/mainmenu.cpp139
-rw-r--r--src/emu/ui/mainmenu.h8
-rw-r--r--src/emu/ui/menu.cpp2019
-rw-r--r--src/emu/ui/menu.h166
-rw-r--r--src/emu/ui/miscmenu.cpp127
-rw-r--r--src/emu/ui/miscmenu.h25
-rw-r--r--src/emu/ui/moptions.cpp92
-rw-r--r--src/emu/ui/moptions.h148
-rw-r--r--src/emu/ui/optsmenu.cpp308
-rw-r--r--src/emu/ui/optsmenu.h47
-rw-r--r--src/emu/ui/selector.cpp244
-rw-r--r--src/emu/ui/selector.h51
-rw-r--r--src/emu/ui/selgame.cpp2405
-rw-r--r--src/emu/ui/selgame.h66
-rw-r--r--src/emu/ui/selsoft.cpp1976
-rw-r--r--src/emu/ui/selsoft.h112
-rw-r--r--src/emu/ui/simpleselgame.cpp445
-rw-r--r--src/emu/ui/simpleselgame.h48
-rw-r--r--src/emu/ui/sliders.cpp6
-rw-r--r--src/emu/ui/slotopt.cpp4
-rw-r--r--src/emu/ui/sndmenu.cpp174
-rw-r--r--src/emu/ui/sndmenu.h42
-rw-r--r--src/emu/ui/starimg.h37
-rw-r--r--src/emu/ui/swlist.cpp7
-rw-r--r--src/emu/ui/toolbar.h181
-rw-r--r--src/emu/ui/ui.cpp440
-rw-r--r--src/emu/ui/ui.h227
-rw-r--r--src/emu/ui/uicmd14.pngbin3254 -> 0 bytes
-rw-r--r--src/emu/ui/utils.cpp173
-rw-r--r--src/emu/ui/utils.h345
-rw-r--r--src/emu/ui/videoopt.cpp2
-rw-r--r--src/emu/uiinput.cpp27
-rw-r--r--src/emu/uiinput.h6
-rw-r--r--src/emu/video.cpp69
-rw-r--r--src/emu/video.h23
-rw-r--r--src/ldplayer/ldplayer.cpp26
-rw-r--r--src/lib/netlist/devices/net_lib.cpp3
-rw-r--r--src/lib/util/aviio.cpp2
-rw-r--r--src/lib/util/corealloc.h2
-rw-r--r--src/lib/util/options.cpp23
-rw-r--r--src/lib/util/options.h5
-rw-r--r--src/mame/arcade.lst74
-rw-r--r--src/mame/audio/laserbat.cpp93
-rw-r--r--src/mame/audio/zaccaria.cpp466
-rw-r--r--src/mame/audio/zaccaria.h135
-rw-r--r--src/mame/drivers/1943.cpp60
-rw-r--r--src/mame/drivers/1945kiii.cpp197
-rw-r--r--src/mame/drivers/8080bw.cpp2
-rw-r--r--src/mame/drivers/adam.cpp2
-rw-r--r--src/mame/drivers/aerofgt.cpp6
-rw-r--r--src/mame/drivers/amazonlf.cpp91
-rw-r--r--src/mame/drivers/amiga.cpp17
-rw-r--r--src/mame/drivers/apple1.cpp736
-rw-r--r--src/mame/drivers/apple2e.cpp135
-rw-r--r--src/mame/drivers/arcadecl.cpp2
-rw-r--r--src/mame/drivers/argox.cpp85
-rw-r--r--src/mame/drivers/arkanoid.cpp81
-rw-r--r--src/mame/drivers/asteroid.cpp18
-rw-r--r--src/mame/drivers/at.cpp4
-rw-r--r--src/mame/drivers/atarig1.cpp94
-rw-r--r--src/mame/drivers/atarisy1.cpp111
-rw-r--r--src/mame/drivers/atarisy2.cpp174
-rw-r--r--src/mame/drivers/atetris.cpp6
-rw-r--r--src/mame/drivers/atom.cpp10
-rw-r--r--src/mame/drivers/blmbycar.cpp95
-rw-r--r--src/mame/drivers/bublbobl.cpp37
-rw-r--r--src/mame/drivers/bw12.cpp4
-rw-r--r--src/mame/drivers/camplynx.cpp4
-rw-r--r--src/mame/drivers/chihiro.cpp11
-rw-r--r--src/mame/drivers/cobra.cpp60
-rw-r--r--src/mame/drivers/cyberbal.cpp31
-rw-r--r--src/mame/drivers/deco156.cpp32
-rw-r--r--src/mame/drivers/deshoros.cpp2
-rw-r--r--src/mame/drivers/elecbowl.cpp8
-rw-r--r--src/mame/drivers/electron.cpp37
-rw-r--r--src/mame/drivers/ep64.cpp2
-rw-r--r--src/mame/drivers/esd16.cpp35
-rw-r--r--src/mame/drivers/fantland.cpp2
-rw-r--r--src/mame/drivers/fidel6502.cpp824
-rw-r--r--src/mame/drivers/fidel68k.cpp473
-rw-r--r--src/mame/drivers/fidelz80.cpp989
-rw-r--r--src/mame/drivers/funkball.cpp4
-rw-r--r--src/mame/drivers/gaelco2.cpp6
-rw-r--r--src/mame/drivers/galaxi.cpp69
-rw-r--r--src/mame/drivers/galaxian.cpp22
-rw-r--r--src/mame/drivers/galaxy.cpp8
-rw-r--r--src/mame/drivers/galpanic.cpp50
-rw-r--r--src/mame/drivers/gauntlet.cpp104
-rw-r--r--src/mame/drivers/gkigt.cpp24
-rw-r--r--src/mame/drivers/glass.cpp60
-rw-r--r--src/mame/drivers/goldstar.cpp463
-rw-r--r--src/mame/drivers/goupil.cpp511
-rw-r--r--src/mame/drivers/gticlub.cpp8
-rw-r--r--src/mame/drivers/harddriv.cpp22
-rw-r--r--src/mame/drivers/hh_cop400.cpp23
-rw-r--r--src/mame/drivers/hh_hmcs40.cpp9
-rw-r--r--src/mame/drivers/hh_melps4.cpp7
-rw-r--r--src/mame/drivers/hh_pic16.cpp7
-rw-r--r--src/mame/drivers/hh_tms1k.cpp986
-rw-r--r--src/mame/drivers/hh_ucom4.cpp93
-rw-r--r--src/mame/drivers/horizon.cpp2
-rw-r--r--src/mame/drivers/hornet.cpp12
-rw-r--r--src/mame/drivers/hp9845.cpp75
-rw-r--r--src/mame/drivers/iteagle.cpp24
-rw-r--r--src/mame/drivers/itgamble.cpp2
-rw-r--r--src/mame/drivers/jangou.cpp205
-rw-r--r--src/mame/drivers/k28.cpp518
-rw-r--r--src/mame/drivers/kaneko16.cpp67
-rw-r--r--src/mame/drivers/kchamp.cpp4
-rw-r--r--src/mame/drivers/kurukuru.cpp307
-rw-r--r--src/mame/drivers/ladyfrog.cpp19
-rw-r--r--src/mame/drivers/laserbat.cpp89
-rw-r--r--src/mame/drivers/m5.cpp985
-rw-r--r--src/mame/drivers/magictg.cpp10
-rw-r--r--src/mame/drivers/maygay1b.cpp4
-rw-r--r--src/mame/drivers/mbdtower.cpp4
-rw-r--r--src/mame/drivers/mc1000.cpp1
-rw-r--r--src/mame/drivers/megasys1.cpp123
-rw-r--r--src/mame/drivers/merit.cpp43
-rw-r--r--src/mame/drivers/midtunit.cpp377
-rw-r--r--src/mame/drivers/mitchell.cpp149
-rw-r--r--src/mame/drivers/mmodular.cpp24
-rw-r--r--src/mame/drivers/model3.cpp233
-rw-r--r--src/mame/drivers/mpz80.cpp2
-rw-r--r--src/mame/drivers/mrgame.cpp2
-rw-r--r--src/mame/drivers/namcops2.cpp13
-rw-r--r--src/mame/drivers/naomi.cpp56
-rw-r--r--src/mame/drivers/nibble.cpp362
-rw-r--r--src/mame/drivers/nightgal.cpp477
-rw-r--r--src/mame/drivers/notetaker.cpp311
-rw-r--r--src/mame/drivers/nwk-tr.cpp15
-rw-r--r--src/mame/drivers/overdriv.cpp94
-rw-r--r--src/mame/drivers/pc2000.cpp1
-rw-r--r--src/mame/drivers/pc9801.cpp133
-rw-r--r--src/mame/drivers/playch10.cpp2
-rw-r--r--src/mame/drivers/prestige.cpp1
-rw-r--r--src/mame/drivers/pulsar.cpp5
-rw-r--r--src/mame/drivers/punchout.cpp58
-rw-r--r--src/mame/drivers/r9751.cpp180
-rw-r--r--src/mame/drivers/rampart.cpp10
-rw-r--r--src/mame/drivers/relief.cpp6
-rw-r--r--src/mame/drivers/savquest.cpp4
-rw-r--r--src/mame/drivers/sdk86.cpp4
-rw-r--r--src/mame/drivers/seattle.cpp4
-rw-r--r--src/mame/drivers/segac2.cpp6
-rw-r--r--src/mame/drivers/segas16b.cpp1
-rw-r--r--src/mame/drivers/seibuspi.cpp49
-rw-r--r--src/mame/drivers/sigmab52.cpp73
-rw-r--r--src/mame/drivers/slapfght.cpp166
-rw-r--r--src/mame/drivers/snk.cpp47
-rw-r--r--src/mame/drivers/starwars.cpp11
-rw-r--r--src/mame/drivers/stv.cpp316
-rw-r--r--src/mame/drivers/suna16.cpp2
-rw-r--r--src/mame/drivers/super6.cpp6
-rw-r--r--src/mame/drivers/taito_f3.cpp70
-rw-r--r--src/mame/drivers/tb303.cpp42
-rw-r--r--src/mame/drivers/ticalc1x.cpp79
-rw-r--r--src/mame/drivers/tispeak.cpp259
-rw-r--r--src/mame/drivers/tispellb.cpp9
-rw-r--r--src/mame/drivers/tr606.cpp43
-rw-r--r--src/mame/drivers/tsispch.cpp8
-rw-r--r--src/mame/drivers/vc4000.cpp2
-rw-r--r--src/mame/drivers/vegas.cpp14
-rw-r--r--src/mame/drivers/vigilant.cpp25
-rw-r--r--src/mame/drivers/viper.cpp211
-rw-r--r--src/mame/drivers/wrally.cpp40
-rw-r--r--src/mame/drivers/xor100.cpp8
-rw-r--r--src/mame/drivers/xybots.cpp4
-rw-r--r--src/mame/drivers/zaccaria.cpp267
-rw-r--r--src/mame/includes/apple1.h92
-rw-r--r--src/mame/includes/arcadecl.h3
-rw-r--r--src/mame/includes/arkanoid.h2
-rw-r--r--src/mame/includes/atarig1.h4
-rw-r--r--src/mame/includes/atarisy1.h8
-rw-r--r--src/mame/includes/atarisy2.h14
-rw-r--r--src/mame/includes/badlands.h5
-rw-r--r--src/mame/includes/blmbycar.h35
-rw-r--r--src/mame/includes/chihiro.h21
-rw-r--r--src/mame/includes/cyberbal.h4
-rw-r--r--src/mame/includes/electron.h15
-rw-r--r--src/mame/includes/fidelz80.h21
-rw-r--r--src/mame/includes/galpanic.h23
-rw-r--r--src/mame/includes/gauntlet.h18
-rw-r--r--src/mame/includes/glass.h40
-rw-r--r--src/mame/includes/hh_tms1k.h5
-rw-r--r--src/mame/includes/hh_ucom4.h2
-rw-r--r--src/mame/includes/laserbat.h44
-rw-r--r--src/mame/includes/m5.h108
-rw-r--r--src/mame/includes/maygay1b.h4
-rw-r--r--src/mame/includes/megasys1.h4
-rw-r--r--src/mame/includes/overdriv.h16
-rw-r--r--src/mame/includes/punchout.h2
-rw-r--r--src/mame/includes/rampart.h3
-rw-r--r--src/mame/includes/relief.h6
-rw-r--r--src/mame/includes/slapstic.h22
-rw-r--r--src/mame/includes/snk.h1
-rw-r--r--src/mame/includes/xbox.h36
-rw-r--r--src/mame/includes/zaccaria.h86
-rw-r--r--src/mame/layout/cnfball2.lay185
-rw-r--r--src/mame/layout/cnsector.lay23
-rw-r--r--src/mame/layout/cqback.lay178
-rw-r--r--src/mame/layout/fidel_bcc.lay69
-rw-r--r--src/mame/layout/fidel_csc.lay493
-rw-r--r--src/mame/layout/fidel_eag.lay432
-rw-r--r--src/mame/layout/fidel_fev.lay492
-rw-r--r--src/mame/layout/fidel_sc12.lay509
-rw-r--r--src/mame/layout/fidel_vsc.lay683
-rw-r--r--src/mame/layout/h2hfootb.lay3
-rw-r--r--src/mame/layout/k28.lay68
-rw-r--r--src/mame/layout/k28m2.lay26
-rw-r--r--src/mame/layout/lostreas.lay181
-rw-r--r--src/mame/layout/mathmagi.lay27
-rw-r--r--src/mame/layout/mcompgin.lay20
-rw-r--r--src/mame/layout/snmath.lay2
-rw-r--r--src/mame/layout/zodiac.lay83
-rw-r--r--src/mame/machine/315-5838_317-0229_comp.cpp124
-rw-r--r--src/mame/machine/315-5838_317-0229_comp.h16
-rw-r--r--src/mame/machine/apple1.cpp404
-rw-r--r--src/mame/machine/arkanoid.cpp8
-rw-r--r--src/mame/machine/atarigen.cpp112
-rw-r--r--src/mame/machine/atarigen.h14
-rw-r--r--src/mame/machine/awboard.cpp5
-rw-r--r--src/mame/machine/bbc.cpp20
-rw-r--r--src/mame/machine/beta.cpp4
-rw-r--r--src/mame/machine/electron.cpp12
-rw-r--r--src/mame/machine/gaelco2.cpp78
-rw-r--r--src/mame/machine/harddriv.cpp32
-rw-r--r--src/mame/machine/iteagle_fpga.cpp43
-rw-r--r--src/mame/machine/iteagle_fpga.h2
-rw-r--r--src/mame/machine/n64.cpp2
-rw-r--r--src/mame/machine/pc9801_cd.cpp34
-rw-r--r--src/mame/machine/pc9801_cd.h23
-rw-r--r--src/mame/machine/pc9801_kbd.cpp8
-rw-r--r--src/mame/machine/pc9801_kbd.h1
-rw-r--r--src/mame/machine/slapstic.cpp19
-rw-r--r--src/mame/machine/xbox.cpp157
-rw-r--r--src/mame/mame.cpp21
-rw-r--r--src/mame/mame.lst2
-rw-r--r--src/mame/mess.cpp23
-rw-r--r--src/mame/mess.lst56
-rw-r--r--src/mame/video/apollo.cpp4
-rw-r--r--src/mame/video/apple1.cpp392
-rw-r--r--src/mame/video/blmbycar.cpp6
-rw-r--r--src/mame/video/chihiro.cpp94
-rw-r--r--src/mame/video/galpanic.cpp31
-rw-r--r--src/mame/video/glass.cpp14
-rw-r--r--src/mame/video/laserbat.cpp155
-rw-r--r--src/mame/video/megasys1.cpp31
-rw-r--r--src/mame/video/seibuspi.cpp6
-rw-r--r--src/mame/video/snk.cpp13
-rw-r--r--src/mame/video/timeplt.cpp3
-rw-r--r--src/mame/video/x68k.cpp2
-rw-r--r--src/osd/modules/font/font_sdl.cpp4
-rw-r--r--src/osd/modules/opengl/SDL1211_opengl.h6553
-rw-r--r--src/osd/modules/opengl/osd_opengl.h20
-rw-r--r--src/osd/modules/osdwindow.h10
-rw-r--r--src/osd/modules/render/bgfx/fs_line.sc11
-rw-r--r--src/osd/modules/render/bgfx/fs_quad.sc11
-rw-r--r--src/osd/modules/render/bgfx/fs_quad_texture.sc14
-rw-r--r--src/osd/modules/render/bgfx/makefile13
-rw-r--r--src/osd/modules/render/bgfx/varying.def.sc7
-rw-r--r--src/osd/modules/render/bgfx/vs_line.sc13
-rw-r--r--src/osd/modules/render/bgfx/vs_quad.sc13
-rw-r--r--src/osd/modules/render/bgfx/vs_quad_texture.sc14
-rw-r--r--src/osd/modules/render/binpacker.cpp195
-rw-r--r--src/osd/modules/render/binpacker.h183
-rw-r--r--src/osd/modules/render/d3d/d3dcomm.h3
-rw-r--r--src/osd/modules/render/d3d/d3dhlsl.cpp222
-rw-r--r--src/osd/modules/render/d3d/d3dhlsl.h11
-rw-r--r--src/osd/modules/render/draw13.cpp36
-rw-r--r--src/osd/modules/render/drawbgfx.cpp1187
-rw-r--r--src/osd/modules/render/drawbgfx.h108
-rw-r--r--src/osd/modules/render/drawd3d.cpp267
-rw-r--r--src/osd/modules/render/drawd3d.h19
-rw-r--r--src/osd/modules/render/drawdd.cpp1317
-rw-r--r--src/osd/modules/render/drawogl.cpp66
-rw-r--r--src/osd/modules/render/drawsdl.cpp235
-rw-r--r--src/osd/modules/sound/direct_sound.cpp9
-rw-r--r--src/osd/modules/sound/js_sound.cpp6
-rw-r--r--src/osd/modules/sound/js_sound.js213
-rw-r--r--src/osd/modules/sound/sdl_sound.cpp4
-rw-r--r--src/osd/modules/sound/xaudio2_sound.cpp40
-rw-r--r--src/osd/modules/sync/osdsync.h16
-rw-r--r--src/osd/modules/sync/sync_mini.cpp57
-rw-r--r--src/osd/modules/sync/sync_ntc.cpp279
-rw-r--r--src/osd/modules/sync/sync_os2.cpp280
-rw-r--r--src/osd/modules/sync/sync_sdl.cpp136
-rw-r--r--src/osd/modules/sync/sync_tc.cpp117
-rw-r--r--src/osd/modules/sync/sync_windows.cpp177
-rw-r--r--src/osd/modules/sync/work_osd.cpp50
-rw-r--r--src/osd/osdcore.h87
-rw-r--r--src/osd/osdmini/minimisc.cpp4
-rw-r--r--src/osd/osdmini/minisync.cpp66
-rw-r--r--src/osd/sdl/SDLMain_tmpl.h13
-rw-r--r--src/osd/sdl/SDLMain_tmpl.mm386
-rw-r--r--src/osd/sdl/input.cpp246
-rw-r--r--src/osd/sdl/osdsdl.h8
-rw-r--r--src/osd/sdl/sdlfile.cpp2
-rw-r--r--src/osd/sdl/sdlinc.h9
-rw-r--r--src/osd/sdl/sdlmain.cpp60
-rw-r--r--src/osd/sdl/sdlos_unix.cpp106
-rw-r--r--src/osd/sdl/testkeys.cpp72
-rw-r--r--src/osd/sdl/video.cpp237
-rw-r--r--src/osd/sdl/video.h14
-rw-r--r--src/osd/sdl/window.cpp198
-rw-r--r--src/osd/sdl/window.h25
-rw-r--r--src/osd/windows/input.cpp39
-rw-r--r--src/osd/windows/output.cpp4
-rw-r--r--src/osd/windows/video.cpp7
-rw-r--r--src/osd/windows/video.h6
-rw-r--r--src/osd/windows/window.cpp62
-rw-r--r--src/osd/windows/window.h3
-rw-r--r--src/osd/windows/winmain.cpp3
-rw-r--r--src/osd/windows/winmain.h6
-rw-r--r--src/tools/jedutil.cpp126
1467 files changed, 59536 insertions, 222124 deletions
diff --git a/3rdparty/libuv/LICENSE b/3rdparty/libuv/LICENSE
deleted file mode 100644
index 4d411670e3f..00000000000
--- a/3rdparty/libuv/LICENSE
+++ /dev/null
@@ -1,46 +0,0 @@
-libuv is part of the Node project: http://nodejs.org/
-libuv may be distributed alone under Node's license:
-
-====
-
-Copyright Joyent, Inc. and other Node contributors. All rights reserved.
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to
-deal in the Software without restriction, including without limitation the
-rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-sell copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-IN THE SOFTWARE.
-
-====
-
-This license applies to all parts of libuv that are not externally
-maintained libraries.
-
-The externally maintained libraries used by libuv are:
-
- - tree.h (from FreeBSD), copyright Niels Provos. Two clause BSD license.
-
- - inet_pton and inet_ntop implementations, contained in src/inet.c, are
- copyright the Internet Systems Consortium, Inc., and licensed under the ISC
- license.
-
- - stdint-msvc2008.h (from msinttypes), copyright Alexander Chemeris. Three
- clause BSD license.
-
- - pthread-fixes.h, pthread-fixes.c, copyright Google Inc. and Sony Mobile
- Communications AB. Three clause BSD license.
-
- - android-ifaddrs.h, android-ifaddrs.c, copyright Berkeley Software Design
- Inc, Kenneth MacKay and Emergya (Cloud4all, FP7/2007-2013, grant agreement
- n° 289016). Three clause BSD license.
diff --git a/3rdparty/libuv/MAINTAINERS.md b/3rdparty/libuv/MAINTAINERS.md
deleted file mode 100644
index 4db2f5130c0..00000000000
--- a/3rdparty/libuv/MAINTAINERS.md
+++ /dev/null
@@ -1,36 +0,0 @@
-
-# Project Maintainers
-
-libuv is currently managed by the following individuals:
-
-* **Ben Noordhuis** ([@bnoordhuis](https://github.com/bnoordhuis))
- - GPG key: D77B 1E34 243F BAF0 5F8E 9CC3 4F55 C8C8 46AB 89B9 (pubkey-bnoordhuis)
-* **Bert Belder** ([@piscisaureus](https://github.com/piscisaureus))
-* **Fedor Indutny** ([@indutny](https://github.com/indutny))
- - GPG key: AF2E EA41 EC34 47BF DD86 FED9 D706 3CCE 19B7 E890 (pubkey-indutny)
-* **Saúl Ibarra Corretgé** ([@saghul](https://github.com/saghul))
- - GPG key: FDF5 1936 4458 319F A823 3DC9 410E 5553 AE9B C059 (pubkey-saghul)
-
-## Storing a maintainer key in Git
-
-It's quite handy to store a maintainer's signature as a git blob, and have
-that object tagged and signed with such key.
-
-Export your public key:
-
- $ gpg --armor --export saghul@gmail.com > saghul.asc
-
-Store it as a blob on the repo:
-
- $ git hash-object -w saghul.asc
-
-The previous command returns a hash, copy it. For the sake of this explanation,
-we'll assume it's 'abcd1234'. Storing the blob in git is not enough, it could
-be garbage collected since nothing references it, so we'll create a tag for it:
-
- $ git tag -s pubkey-saghul abcd1234
-
-Commit the changes and push:
-
- $ git push origin pubkey-saghul
-
diff --git a/3rdparty/libuv/Makefile.am b/3rdparty/libuv/Makefile.am
deleted file mode 100644
index 0ef781ff198..00000000000
--- a/3rdparty/libuv/Makefile.am
+++ /dev/null
@@ -1,344 +0,0 @@
-# Copyright (c) 2013, Ben Noordhuis <info@bnoordhuis.nl>
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-ACLOCAL_AMFLAGS = -I m4
-
-AM_CPPFLAGS = -I$(top_srcdir)/include \
- -I$(top_srcdir)/src
-
-include_HEADERS=include/uv.h include/uv-errno.h include/uv-threadpool.h include/uv-version.h
-
-CLEANFILES =
-
-lib_LTLIBRARIES = libuv.la
-libuv_la_CFLAGS = @CFLAGS@
-libuv_la_LDFLAGS = -no-undefined -version-info 1:0:0
-libuv_la_SOURCES = src/fs-poll.c \
- src/heap-inl.h \
- src/inet.c \
- src/queue.h \
- src/threadpool.c \
- src/uv-common.c \
- src/uv-common.h \
- src/version.c
-
-if SUNOS
-# Can't be turned into a CC_CHECK_CFLAGS in configure.ac, it makes compilers
-# on other platforms complain that the argument is unused during compilation.
-libuv_la_CFLAGS += -pthread
-endif
-
-if WINNT
-
-include_HEADERS += include/uv-win.h include/tree.h
-AM_CPPFLAGS += -I$(top_srcdir)/src/win \
- -DWIN32_LEAN_AND_MEAN \
- -D_WIN32_WINNT=0x0600
-LIBS += -lws2_32 -lpsapi -liphlpapi -lshell32 -luserenv
-libuv_la_SOURCES += src/win/async.c \
- src/win/atomicops-inl.h \
- src/win/core.c \
- src/win/dl.c \
- src/win/error.c \
- src/win/fs-event.c \
- src/win/fs.c \
- src/win/getaddrinfo.c \
- src/win/getnameinfo.c \
- src/win/handle.c \
- src/win/handle-inl.h \
- src/win/internal.h \
- src/win/loop-watcher.c \
- src/win/pipe.c \
- src/win/poll.c \
- src/win/process-stdio.c \
- src/win/process.c \
- src/win/req.c \
- src/win/req-inl.h \
- src/win/signal.c \
- src/win/stream.c \
- src/win/stream-inl.h \
- src/win/tcp.c \
- src/win/thread.c \
- src/win/timer.c \
- src/win/tty.c \
- src/win/udp.c \
- src/win/util.c \
- src/win/winapi.c \
- src/win/winapi.h \
- src/win/winsock.c \
- src/win/winsock.h
-
-else # WINNT
-
-include_HEADERS += include/uv-unix.h
-AM_CPPFLAGS += -I$(top_srcdir)/src/unix
-libuv_la_SOURCES += src/unix/async.c \
- src/unix/atomic-ops.h \
- src/unix/core.c \
- src/unix/dl.c \
- src/unix/fs.c \
- src/unix/getaddrinfo.c \
- src/unix/getnameinfo.c \
- src/unix/internal.h \
- src/unix/loop-watcher.c \
- src/unix/loop.c \
- src/unix/pipe.c \
- src/unix/poll.c \
- src/unix/process.c \
- src/unix/signal.c \
- src/unix/spinlock.h \
- src/unix/stream.c \
- src/unix/tcp.c \
- src/unix/thread.c \
- src/unix/timer.c \
- src/unix/tty.c \
- src/unix/udp.c
-
-endif # WINNT
-
-EXTRA_DIST = test/fixtures/empty_file \
- test/fixtures/load_error.node \
- include \
- test \
- docs \
- img \
- samples \
- android-configure \
- CONTRIBUTING.md \
- LICENSE \
- README.md \
- checksparse.sh \
- vcbuild.bat \
- Makefile.mingw \
- common.gypi \
- gyp_uv.py \
- uv.gyp
-
-
-
-TESTS = test/run-tests
-check_PROGRAMS = test/run-tests
-test_run_tests_CFLAGS =
-test_run_tests_SOURCES = test/blackhole-server.c \
- test/dns-server.c \
- test/echo-server.c \
- test/run-tests.c \
- test/runner.c \
- test/runner.h \
- test/task.h \
- test/test-active.c \
- test/test-async.c \
- test/test-async-null-cb.c \
- test/test-barrier.c \
- test/test-callback-order.c \
- test/test-callback-stack.c \
- test/test-close-fd.c \
- test/test-close-order.c \
- test/test-condvar.c \
- test/test-connection-fail.c \
- test/test-cwd-and-chdir.c \
- test/test-default-loop-close.c \
- test/test-delayed-accept.c \
- test/test-dlerror.c \
- test/test-embed.c \
- test/test-emfile.c \
- test/test-error.c \
- test/test-fail-always.c \
- test/test-fs-event.c \
- test/test-fs-poll.c \
- test/test-fs.c \
- test/test-get-currentexe.c \
- test/test-get-loadavg.c \
- test/test-get-memory.c \
- test/test-getaddrinfo.c \
- test/test-getnameinfo.c \
- test/test-getsockname.c \
- test/test-handle-fileno.c \
- test/test-homedir.c \
- test/test-hrtime.c \
- test/test-idle.c \
- test/test-ip4-addr.c \
- test/test-ip6-addr.c \
- test/test-ipc-send-recv.c \
- test/test-ipc.c \
- test/test-list.h \
- test/test-loop-handles.c \
- test/test-loop-alive.c \
- test/test-loop-close.c \
- test/test-loop-stop.c \
- test/test-loop-time.c \
- test/test-loop-configure.c \
- test/test-multiple-listen.c \
- test/test-mutexes.c \
- test/test-osx-select.c \
- test/test-pass-always.c \
- test/test-ping-pong.c \
- test/test-pipe-bind-error.c \
- test/test-pipe-connect-error.c \
- test/test-pipe-connect-multiple.c \
- test/test-pipe-connect-prepare.c \
- test/test-pipe-getsockname.c \
- test/test-pipe-pending-instances.c \
- test/test-pipe-sendmsg.c \
- test/test-pipe-server-close.c \
- test/test-pipe-close-stdout-read-stdin.c \
- test/test-pipe-set-non-blocking.c \
- test/test-platform-output.c \
- test/test-poll-close.c \
- test/test-poll-close-doesnt-corrupt-stack.c \
- test/test-poll-closesocket.c \
- test/test-poll.c \
- test/test-process-title.c \
- test/test-queue-foreach-delete.c \
- test/test-ref.c \
- test/test-run-nowait.c \
- test/test-run-once.c \
- test/test-semaphore.c \
- test/test-shutdown-close.c \
- test/test-shutdown-eof.c \
- test/test-shutdown-twice.c \
- test/test-signal-multiple-loops.c \
- test/test-signal.c \
- test/test-socket-buffer-size.c \
- test/test-spawn.c \
- test/test-stdio-over-pipes.c \
- test/test-tcp-bind-error.c \
- test/test-tcp-bind6-error.c \
- test/test-tcp-close-accept.c \
- test/test-tcp-close-while-connecting.c \
- test/test-tcp-close.c \
- test/test-tcp-create-socket-early.c \
- test/test-tcp-connect-error-after-write.c \
- test/test-tcp-connect-error.c \
- test/test-tcp-connect-timeout.c \
- test/test-tcp-connect6-error.c \
- test/test-tcp-flags.c \
- test/test-tcp-open.c \
- test/test-tcp-read-stop.c \
- test/test-tcp-shutdown-after-write.c \
- test/test-tcp-unexpected-read.c \
- test/test-tcp-oob.c \
- test/test-tcp-write-to-half-open-connection.c \
- test/test-tcp-write-after-connect.c \
- test/test-tcp-writealot.c \
- test/test-tcp-write-fail.c \
- test/test-tcp-try-write.c \
- test/test-tcp-write-queue-order.c \
- test/test-thread-equal.c \
- test/test-thread.c \
- test/test-threadpool-cancel.c \
- test/test-threadpool.c \
- test/test-timer-again.c \
- test/test-timer-from-check.c \
- test/test-timer.c \
- test/test-tty.c \
- test/test-udp-bind.c \
- test/test-udp-create-socket-early.c \
- test/test-udp-dgram-too-big.c \
- test/test-udp-ipv6.c \
- test/test-udp-multicast-interface.c \
- test/test-udp-multicast-interface6.c \
- test/test-udp-multicast-join.c \
- test/test-udp-multicast-join6.c \
- test/test-udp-multicast-ttl.c \
- test/test-udp-open.c \
- test/test-udp-options.c \
- test/test-udp-send-and-recv.c \
- test/test-udp-send-immediate.c \
- test/test-udp-send-unreachable.c \
- test/test-udp-try-send.c \
- test/test-walk-handles.c \
- test/test-watcher-cross-stop.c
-test_run_tests_LDADD = libuv.la
-
-if WINNT
-test_run_tests_SOURCES += test/runner-win.c \
- test/runner-win.h
-else
-test_run_tests_SOURCES += test/runner-unix.c \
- test/runner-unix.h
-endif
-
-if AIX
-test_run_tests_CFLAGS += -D_ALL_SOURCE -D_XOPEN_SOURCE=500 -D_LINUX_SOURCE_COMPAT
-endif
-
-if SUNOS
-test_run_tests_CFLAGS += -D__EXTENSIONS__ -D_XOPEN_SOURCE=500
-endif
-
-
-if AIX
-libuv_la_CFLAGS += -D_ALL_SOURCE -D_XOPEN_SOURCE=500 -D_LINUX_SOURCE_COMPAT
-include_HEADERS += include/uv-aix.h
-libuv_la_SOURCES += src/unix/aix.c
-endif
-
-if ANDROID
-include_HEADERS += include/android-ifaddrs.h \
- include/pthread-fixes.h
-libuv_la_SOURCES += src/unix/android-ifaddrs.c \
- src/unix/pthread-fixes.c
-endif
-
-if DARWIN
-include_HEADERS += include/uv-darwin.h
-libuv_la_CFLAGS += -D_DARWIN_USE_64_BIT_INODE=1
-libuv_la_CFLAGS += -D_DARWIN_UNLIMITED_SELECT=1
-libuv_la_SOURCES += src/unix/darwin.c \
- src/unix/darwin-proctitle.c \
- src/unix/fsevents.c \
- src/unix/kqueue.c \
- src/unix/proctitle.c
-endif
-
-if DRAGONFLY
-include_HEADERS += include/uv-bsd.h
-endif
-
-if FREEBSD
-include_HEADERS += include/uv-bsd.h
-libuv_la_SOURCES += src/unix/freebsd.c src/unix/kqueue.c
-endif
-
-if LINUX
-include_HEADERS += include/uv-linux.h
-libuv_la_CFLAGS += -D_GNU_SOURCE
-libuv_la_SOURCES += src/unix/linux-core.c \
- src/unix/linux-inotify.c \
- src/unix/linux-syscalls.c \
- src/unix/linux-syscalls.h \
- src/unix/proctitle.c
-endif
-
-if NETBSD
-include_HEADERS += include/uv-bsd.h
-libuv_la_SOURCES += src/unix/kqueue.c src/unix/netbsd.c
-endif
-
-if OPENBSD
-include_HEADERS += include/uv-bsd.h
-libuv_la_SOURCES += src/unix/kqueue.c src/unix/openbsd.c
-endif
-
-if SUNOS
-include_HEADERS += include/uv-sunos.h
-libuv_la_CFLAGS += -D__EXTENSIONS__ -D_XOPEN_SOURCE=500
-libuv_la_SOURCES += src/unix/sunos.c
-endif
-
-if HAVE_PKG_CONFIG
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = @PACKAGE_NAME@.pc
-endif
diff --git a/3rdparty/libuv/Makefile.mingw b/3rdparty/libuv/Makefile.mingw
deleted file mode 100644
index 156f15dab15..00000000000
--- a/3rdparty/libuv/Makefile.mingw
+++ /dev/null
@@ -1,84 +0,0 @@
-# Copyright (c) 2013, Ben Noordhuis <info@bnoordhuis.nl>
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-CC ?= gcc
-
-CFLAGS += -Wall \
- -Wextra \
- -Wno-unused-parameter \
- -Iinclude \
- -Isrc \
- -Isrc/win \
- -DWIN32_LEAN_AND_MEAN \
- -D_WIN32_WINNT=0x0600
-
-INCLUDES = include/stdint-msvc2008.h \
- include/tree.h \
- include/uv-errno.h \
- include/uv-threadpool.h \
- include/uv-version.h \
- include/uv-win.h \
- include/uv.h \
- src/heap-inl.h \
- src/queue.h \
- src/uv-common.h \
- src/win/atomicops-inl.h \
- src/win/handle-inl.h \
- src/win/internal.h \
- src/win/req-inl.h \
- src/win/stream-inl.h \
- src/win/winapi.h \
- src/win/winsock.h
-
-OBJS = src/fs-poll.o \
- src/inet.o \
- src/threadpool.o \
- src/uv-common.o \
- src/version.o \
- src/win/async.o \
- src/win/core.o \
- src/win/dl.o \
- src/win/error.o \
- src/win/fs-event.o \
- src/win/fs.o \
- src/win/getaddrinfo.o \
- src/win/getnameinfo.o \
- src/win/handle.o \
- src/win/loop-watcher.o \
- src/win/pipe.o \
- src/win/poll.o \
- src/win/process-stdio.o \
- src/win/process.o \
- src/win/req.o \
- src/win/signal.o \
- src/win/stream.o \
- src/win/tcp.o \
- src/win/thread.o \
- src/win/timer.o \
- src/win/tty.o \
- src/win/udp.o \
- src/win/util.o \
- src/win/winapi.o \
- src/win/winsock.o
-
-all: libuv.a
-
-clean:
- -$(RM) $(OBJS) libuv.a
-
-libuv.a: $(OBJS)
- $(AR) crs $@ $^
-
-$(OBJS): %.o : %.c $(INCLUDES)
- $(CC) $(CFLAGS) -c -o $@ $<
diff --git a/3rdparty/libuv/README.md b/3rdparty/libuv/README.md
deleted file mode 100644
index dfd24ba79d1..00000000000
--- a/3rdparty/libuv/README.md
+++ /dev/null
@@ -1,245 +0,0 @@
-![libuv][libuv_banner]
-
-## Overview
-
-libuv is a multi-platform support library with a focus on asynchronous I/O. It
-was primarily developed for use by [Node.js](http://nodejs.org), but it's also
-used by [Luvit](http://luvit.io/), [Julia](http://julialang.org/),
-[pyuv](https://github.com/saghul/pyuv), and [others](https://github.com/libuv/libuv/wiki/Projects-that-use-libuv).
-
-## Feature highlights
-
- * Full-featured event loop backed by epoll, kqueue, IOCP, event ports.
-
- * Asynchronous TCP and UDP sockets
-
- * Asynchronous DNS resolution
-
- * Asynchronous file and file system operations
-
- * File system events
-
- * ANSI escape code controlled TTY
-
- * IPC with socket sharing, using Unix domain sockets or named pipes (Windows)
-
- * Child processes
-
- * Thread pool
-
- * Signal handling
-
- * High resolution clock
-
- * Threading and synchronization primitives
-
-## Versioning
-
-Starting with version 1.0.0 libuv follows the [semantic versioning](http://semver.org/)
-scheme. The API change and backwards compatibility rules are those indicated by
-SemVer. libuv will keep a stable ABI across major releases.
-
-## Community
-
- * [Mailing list](http://groups.google.com/group/libuv)
- * [IRC chatroom (#libuv@irc.freenode.org)](http://webchat.freenode.net?channels=libuv&uio=d4)
-
-## Documentation
-
-### Official API documentation
-
-Located in the docs/ subdirectory. It uses the [Sphinx](http://sphinx-doc.org/)
-framework, which makes it possible to build the documentation in multiple
-formats.
-
-Show different supported building options:
-
- $ make help
-
-Build documentation as HTML:
-
- $ make html
-
-Build documentation as man pages:
-
- $ make man
-
-Build documentation as ePub:
-
- $ make epub
-
-NOTE: Windows users need to use make.bat instead of plain 'make'.
-
-Documentation can be browsed online [here](http://docs.libuv.org).
-
-The [tests and benchmarks](https://github.com/libuv/libuv/tree/master/test)
-also serve as API specification and usage examples.
-
-### Other resources
-
- * [An Introduction to libuv](http://nikhilm.github.com/uvbook/)
- &mdash; An overview of libuv with tutorials.
- * [LXJS 2012 talk](http://www.youtube.com/watch?v=nGn60vDSxQ4)
- &mdash; High-level introductory talk about libuv.
- * [libuv-dox](https://github.com/thlorenz/libuv-dox)
- &mdash; Documenting types and methods of libuv, mostly by reading uv.h.
- * [learnuv](https://github.com/thlorenz/learnuv)
- &mdash; Learn uv for fun and profit, a self guided workshop to libuv.
-
-These resources are not handled by libuv maintainers and might be out of
-date. Please verify it before opening new issues.
-
-## Downloading
-
-libuv can be downloaded either from the
-[GitHub repository](https://github.com/libuv/libuv)
-or from the [downloads site](http://dist.libuv.org/dist/).
-
-Starting with libuv 1.7.0, binaries for Windows are also provided. This is to
-be considered EXPERIMENTAL.
-
-Before verifying the git tags or signature files, importing the relevant keys
-is necessary. Key IDs are listed in the
-[MAINTAINERS](https://github.com/libuv/libuv/blob/master/MAINTAINERS.md)
-file, but are also available as git blob objects for easier use.
-
-Importing a key the usual way:
-
- $ gpg --keyserver pool.sks-keyservers.net \
- --recv-keys AE9BC059
-
-Importing a key from a git blob object:
-
- $ git show pubkey-saghul | gpg --import
-
-### Verifying releases
-
-Git tags are signed with the developer's key, they can be verified as follows:
-
- $ git verify-tag v1.6.1
-
-Starting with libuv 1.7.0, the tarballs stored in the
-[downloads site](http://dist.libuv.org/dist/) are signed and an accompanying
-signature file sit alongside each. Once both the release tarball and the
-signature file are downloaded, the file can be verified as follows:
-
- $ gpg --verify libuv-1.7.0.tar.gz.sign
-
-## Build Instructions
-
-For GCC there are two build methods: via autotools or via [GYP][].
-GYP is a meta-build system which can generate MSVS, Makefile, and XCode
-backends. It is best used for integration into other projects.
-
-To build with autotools:
-
- $ sh autogen.sh
- $ ./configure
- $ make
- $ make check
- $ make install
-
-### Windows
-
-First, [Python][] 2.6 or 2.7 must be installed as it is required by [GYP][].
-If python is not in your path, set the environment variable `PYTHON` to its
-location. For example: `set PYTHON=C:\Python27\python.exe`
-
-To build with Visual Studio, launch a git shell (e.g. Cmd or PowerShell)
-and run vcbuild.bat which will checkout the GYP code into build/gyp and
-generate uv.sln as well as related project files.
-
-To have GYP generate build script for another system, checkout GYP into the
-project tree manually:
-
- $ git clone https://chromium.googlesource.com/external/gyp.git build/gyp
-
-### Unix
-
-Run:
-
- $ ./gyp_uv.py -f make
- $ make -C out
-
-Run `./gyp_uv.py -f make -Dtarget_arch=x32` to build [x32][] binaries.
-
-### OS X
-
-Run:
-
- $ ./gyp_uv.py -f xcode
- $ xcodebuild -ARCHS="x86_64" -project uv.xcodeproj \
- -configuration Release -target All
-
-Using Homebrew:
-
- $ brew install --HEAD libuv
-
-Note to OS X users:
-
-Make sure that you specify the architecture you wish to build for in the
-"ARCHS" flag. You can specify more than one by delimiting with a space
-(e.g. "x86_64 i386").
-
-### Android
-
-Run:
-
- $ source ./android-configure NDK_PATH gyp
- $ make -C out
-
-Note for UNIX users: compile your project with `-D_LARGEFILE_SOURCE` and
-`-D_FILE_OFFSET_BITS=64`. GYP builds take care of that automatically.
-
-### Using Ninja
-
-To use ninja for build on ninja supported platforms, run:
-
- $ ./gyp_uv.py -f ninja
- $ ninja -C out/Debug #for debug build OR
- $ ninja -C out/Release
-
-
-### Running tests
-
-Run:
-
- $ ./gyp_uv.py -f make
- $ make -C out
- $ ./out/Debug/run-tests
-
-## Supported Platforms
-
-Microsoft Windows operating systems since Windows XP SP2. It can be built
-with either Visual Studio or MinGW. Consider using
-[Visual Studio Express 2010][] or later if you do not have a full Visual
-Studio license.
-
-Linux using the GCC toolchain.
-
-OS X using the GCC or XCode toolchain.
-
-Solaris 121 and later using GCC toolchain.
-
-AIX 6 and later using GCC toolchain (see notes).
-
-### AIX Notes
-
-AIX support for filesystem events requires the non-default IBM `bos.ahafs`
-package to be installed. This package provides the AIX Event Infrastructure
-that is detected by `autoconf`.
-[IBM documentation](http://www.ibm.com/developerworks/aix/library/au-aix_event_infrastructure/)
-describes the package in more detail.
-
-AIX support for filesystem events is not compiled when building with `gyp`.
-
-## Patches
-
-See the [guidelines for contributing][].
-
-[node.js]: http://nodejs.org/
-[GYP]: http://code.google.com/p/gyp/
-[Python]: https://www.python.org/downloads/
-[Visual Studio Express 2010]: http://www.microsoft.com/visualstudio/eng/products/visual-studio-2010-express
-[guidelines for contributing]: https://github.com/libuv/libuv/blob/master/CONTRIBUTING.md
-[libuv_banner]: https://raw.githubusercontent.com/libuv/libuv/master/img/banner.png
diff --git a/3rdparty/libuv/docs/Makefile b/3rdparty/libuv/docs/Makefile
deleted file mode 100644
index 1e0fc8f0220..00000000000
--- a/3rdparty/libuv/docs/Makefile
+++ /dev/null
@@ -1,178 +0,0 @@
-# Makefile for Sphinx documentation
-#
-
-# You can set these variables from the command line.
-SPHINXOPTS =
-SPHINXBUILD = sphinx-build
-PAPER =
-BUILDDIR = build
-SRCDIR = src
-
-# User-friendly check for sphinx-build
-ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
-$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
-endif
-
-# Internal variables.
-PAPEROPT_a4 = -D latex_paper_size=a4
-PAPEROPT_letter = -D latex_paper_size=letter
-ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SRCDIR)
-# the i18n builder cannot share the environment and doctrees with the others
-I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SRCDIR)
-
-.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
-
-help:
- @echo "Please use \`make <target>' where <target> is one of"
- @echo " html to make standalone HTML files"
- @echo " dirhtml to make HTML files named index.html in directories"
- @echo " singlehtml to make a single large HTML file"
- @echo " pickle to make pickle files"
- @echo " json to make JSON files"
- @echo " htmlhelp to make HTML files and a HTML help project"
- @echo " qthelp to make HTML files and a qthelp project"
- @echo " devhelp to make HTML files and a Devhelp project"
- @echo " epub to make an epub"
- @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
- @echo " latexpdf to make LaTeX files and run them through pdflatex"
- @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
- @echo " text to make text files"
- @echo " man to make manual pages"
- @echo " texinfo to make Texinfo files"
- @echo " info to make Texinfo files and run them through makeinfo"
- @echo " gettext to make PO message catalogs"
- @echo " changes to make an overview of all changed/added/deprecated items"
- @echo " xml to make Docutils-native XML files"
- @echo " pseudoxml to make pseudoxml-XML files for display purposes"
- @echo " linkcheck to check all external links for integrity"
- @echo " doctest to run all doctests embedded in the documentation (if enabled)"
-
-clean:
- rm -rf $(BUILDDIR)/*
-
-html:
- $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
- @echo
- @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
-
-dirhtml:
- $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
- @echo
- @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
-
-singlehtml:
- $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
- @echo
- @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
-
-pickle:
- $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
- @echo
- @echo "Build finished; now you can process the pickle files."
-
-json:
- $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
- @echo
- @echo "Build finished; now you can process the JSON files."
-
-htmlhelp:
- $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
- @echo
- @echo "Build finished; now you can run HTML Help Workshop with the" \
- ".hhp project file in $(BUILDDIR)/htmlhelp."
-
-qthelp:
- $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
- @echo
- @echo "Build finished; now you can run "qcollectiongenerator" with the" \
- ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
- @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/libuv.qhcp"
- @echo "To view the help file:"
- @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/libuv.qhc"
-
-devhelp:
- $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
- @echo
- @echo "Build finished."
- @echo "To view the help file:"
- @echo "# mkdir -p $$HOME/.local/share/devhelp/libuv"
- @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/libuv"
- @echo "# devhelp"
-
-epub:
- $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
- @echo
- @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
-
-latex:
- $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
- @echo
- @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
- @echo "Run \`make' in that directory to run these through (pdf)latex" \
- "(use \`make latexpdf' here to do that automatically)."
-
-latexpdf:
- $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
- @echo "Running LaTeX files through pdflatex..."
- $(MAKE) -C $(BUILDDIR)/latex all-pdf
- @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
-
-latexpdfja:
- $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
- @echo "Running LaTeX files through platex and dvipdfmx..."
- $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
- @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
-
-text:
- $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
- @echo
- @echo "Build finished. The text files are in $(BUILDDIR)/text."
-
-man:
- $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
- @echo
- @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
-
-texinfo:
- $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
- @echo
- @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
- @echo "Run \`make' in that directory to run these through makeinfo" \
- "(use \`make info' here to do that automatically)."
-
-info:
- $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
- @echo "Running Texinfo files through makeinfo..."
- make -C $(BUILDDIR)/texinfo info
- @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
-
-gettext:
- $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
- @echo
- @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
-
-changes:
- $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
- @echo
- @echo "The overview file is in $(BUILDDIR)/changes."
-
-linkcheck:
- $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
- @echo
- @echo "Link check complete; look for any errors in the above output " \
- "or in $(BUILDDIR)/linkcheck/output.txt."
-
-doctest:
- $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
- @echo "Testing of doctests in the sources finished, look at the " \
- "results in $(BUILDDIR)/doctest/output.txt."
-
-xml:
- $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
- @echo
- @echo "Build finished. The XML files are in $(BUILDDIR)/xml."
-
-pseudoxml:
- $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
- @echo
- @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
diff --git a/3rdparty/libuv/docs/src/async.rst b/3rdparty/libuv/docs/src/async.rst
deleted file mode 100644
index 5c400458244..00000000000
--- a/3rdparty/libuv/docs/src/async.rst
+++ /dev/null
@@ -1,57 +0,0 @@
-
-.. _async:
-
-:c:type:`uv_async_t` --- Async handle
-=====================================
-
-Async handles allow the user to "wakeup" the event loop and get a callback
-called from another thread.
-
-
-Data types
-----------
-
-.. c:type:: uv_async_t
-
- Async handle type.
-
-.. c:type:: void (*uv_async_cb)(uv_async_t* handle)
-
- Type definition for callback passed to :c:func:`uv_async_init`.
-
-
-Public members
-^^^^^^^^^^^^^^
-
-N/A
-
-.. seealso:: The :c:type:`uv_handle_t` members also apply.
-
-
-API
----
-
-.. c:function:: int uv_async_init(uv_loop_t* loop, uv_async_t* async, uv_async_cb async_cb)
-
- Initialize the handle. A NULL callback is allowed.
-
- .. note::
- Unlike other handle initialization functions, it immediately starts the handle.
-
-.. c:function:: int uv_async_send(uv_async_t* async)
-
- 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 :c:func:`uv_async_send`, that is, not every call to it will
- yield an execution of the callback. For example: if :c:func:`uv_async_send` is called 5
- times in a row before the callback is called, the callback will only be called once. If
- :c:func:`uv_async_send` is called again after the callback was called, it will be called
- again.
-
-.. seealso::
- The :c:type:`uv_handle_t` API functions also apply.
diff --git a/3rdparty/libuv/docs/src/check.rst b/3rdparty/libuv/docs/src/check.rst
deleted file mode 100644
index 36c93cf03d9..00000000000
--- a/3rdparty/libuv/docs/src/check.rst
+++ /dev/null
@@ -1,46 +0,0 @@
-
-.. _check:
-
-:c:type:`uv_check_t` --- Check handle
-=====================================
-
-Check handles will run the given callback once per loop iteration, right
-after polling for i/o.
-
-
-Data types
-----------
-
-.. c:type:: uv_check_t
-
- Check handle type.
-
-.. c:type:: void (*uv_check_cb)(uv_check_t* handle)
-
- Type definition for callback passed to :c:func:`uv_check_start`.
-
-
-Public members
-^^^^^^^^^^^^^^
-
-N/A
-
-.. seealso:: The :c:type:`uv_handle_t` members also apply.
-
-
-API
----
-
-.. c:function:: int uv_check_init(uv_loop_t* loop, uv_check_t* check)
-
- Initialize the handle.
-
-.. c:function:: int uv_check_start(uv_check_t* check, uv_check_cb cb)
-
- Start the handle with the given callback.
-
-.. c:function:: int uv_check_stop(uv_check_t* check)
-
- Stop the handle, the callback will no longer be called.
-
-.. seealso:: The :c:type:`uv_handle_t` API functions also apply.
diff --git a/3rdparty/libuv/docs/src/conf.py b/3rdparty/libuv/docs/src/conf.py
deleted file mode 100644
index b9eaa137432..00000000000
--- a/3rdparty/libuv/docs/src/conf.py
+++ /dev/null
@@ -1,348 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# libuv API documentation documentation build configuration file, created by
-# sphinx-quickstart on Sun Jul 27 11:47:51 2014.
-#
-# This file is execfile()d with the current directory set to its
-# containing dir.
-#
-# Note that not all possible configuration values are present in this
-# autogenerated file.
-#
-# All configuration values have a default; values that are commented out
-# serve to show the default.
-
-import os
-import re
-import sys
-
-
-def get_libuv_version():
- with open('../../include/uv-version.h') as f:
- data = f.read()
- try:
- m = re.search(r"""^#define UV_VERSION_MAJOR (\d)$""", data, re.MULTILINE)
- major = int(m.group(1))
- m = re.search(r"""^#define UV_VERSION_MINOR (\d)$""", data, re.MULTILINE)
- minor = int(m.group(1))
- m = re.search(r"""^#define UV_VERSION_PATCH (\d)$""", data, re.MULTILINE)
- patch = int(m.group(1))
- m = re.search(r"""^#define UV_VERSION_IS_RELEASE (\d)$""", data, re.MULTILINE)
- is_release = int(m.group(1))
- m = re.search(r"""^#define UV_VERSION_SUFFIX \"(\w*)\"$""", data, re.MULTILINE)
- suffix = m.group(1)
- return '%d.%d.%d%s' % (major, minor, patch, '-%s' % suffix if not is_release else '')
- except Exception:
- return 'unknown'
-
-# If extensions (or modules to document with autodoc) are in another directory,
-# add these directories to sys.path here. If the directory is relative to the
-# documentation root, use os.path.abspath to make it absolute, like shown here.
-sys.path.insert(0, os.path.abspath('sphinx-plugins'))
-
-# -- General configuration ------------------------------------------------
-
-# If your documentation needs a minimal Sphinx version, state it here.
-#needs_sphinx = '1.0'
-
-# Add any Sphinx extension module names here, as strings. They can be
-# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
-# ones.
-extensions = ['manpage']
-
-# Add any paths that contain templates here, relative to this directory.
-templates_path = ['templates']
-
-# The suffix of source filenames.
-source_suffix = '.rst'
-
-# The encoding of source files.
-#source_encoding = 'utf-8-sig'
-
-# The master toctree document.
-master_doc = 'index'
-
-# General information about the project.
-project = u'libuv API documentation'
-copyright = u'libuv contributors'
-
-# The version info for the project you're documenting, acts as replacement for
-# |version| and |release|, also used in various other places throughout the
-# built documents.
-#
-# The short X.Y version.
-version = get_libuv_version()
-# The full version, including alpha/beta/rc tags.
-release = version
-
-# The language for content autogenerated by Sphinx. Refer to documentation
-# for a list of supported languages.
-#language = None
-
-# There are two options for replacing |today|: either, you set today to some
-# non-false value, then it is used:
-#today = ''
-# Else, today_fmt is used as the format for a strftime call.
-#today_fmt = '%B %d, %Y'
-
-# List of patterns, relative to source directory, that match files and
-# directories to ignore when looking for source files.
-exclude_patterns = []
-
-# The reST default role (used for this markup: `text`) to use for all
-# documents.
-#default_role = None
-
-# If true, '()' will be appended to :func: etc. cross-reference text.
-#add_function_parentheses = True
-
-# If true, the current module name will be prepended to all description
-# unit titles (such as .. function::).
-#add_module_names = True
-
-# If true, sectionauthor and moduleauthor directives will be shown in the
-# output. They are ignored by default.
-#show_authors = False
-
-# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'sphinx'
-
-# A list of ignored prefixes for module index sorting.
-#modindex_common_prefix = []
-
-# If true, keep warnings as "system message" paragraphs in the built documents.
-#keep_warnings = False
-
-
-# -- Options for HTML output ----------------------------------------------
-
-# The theme to use for HTML and HTML Help pages. See the documentation for
-# a list of builtin themes.
-html_theme = 'nature'
-
-# Theme options are theme-specific and customize the look and feel of a theme
-# further. For a list of options available for each theme, see the
-# documentation.
-#html_theme_options = {}
-
-# Add any paths that contain custom themes here, relative to this directory.
-#html_theme_path = []
-
-# The name for this set of Sphinx documents. If None, it defaults to
-# "<project> v<release> documentation".
-html_title = 'libuv API documentation'
-
-# A shorter title for the navigation bar. Default is the same as html_title.
-html_short_title = 'libuv %s API documentation' % version
-
-# The name of an image file (relative to this directory) to place at the top
-# of the sidebar.
-html_logo = 'static/logo.png'
-
-# The name of an image file (within the static path) to use as favicon of the
-# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
-# pixels large.
-html_favicon = 'static/favicon.ico'
-
-# Add any paths that contain custom static files (such as style sheets) here,
-# relative to this directory. They are copied after the builtin static files,
-# so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ['static']
-
-# Add any extra paths that contain custom files (such as robots.txt or
-# .htaccess) here, relative to this directory. These files are copied
-# directly to the root of the documentation.
-#html_extra_path = []
-
-# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
-# using the given strftime format.
-#html_last_updated_fmt = '%b %d, %Y'
-
-# If true, SmartyPants will be used to convert quotes and dashes to
-# typographically correct entities.
-#html_use_smartypants = True
-
-# Custom sidebar templates, maps document names to template names.
-#html_sidebars = {}
-
-# Additional templates that should be rendered to pages, maps page names to
-# template names.
-#html_additional_pages = {}
-
-# If false, no module index is generated.
-#html_domain_indices = True
-
-# If false, no index is generated.
-#html_use_index = True
-
-# If true, the index is split into individual pages for each letter.
-#html_split_index = False
-
-# If true, links to the reST sources are added to the pages.
-#html_show_sourcelink = True
-
-# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
-#html_show_sphinx = True
-
-# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
-#html_show_copyright = True
-
-# If true, an OpenSearch description file will be output, and all pages will
-# contain a <link> tag referring to it. The value of this option must be the
-# base URL from which the finished HTML is served.
-#html_use_opensearch = ''
-
-# This is the file name suffix for HTML files (e.g. ".xhtml").
-#html_file_suffix = None
-
-# Output file base name for HTML help builder.
-htmlhelp_basename = 'libuv'
-
-
-# -- Options for LaTeX output ---------------------------------------------
-
-latex_elements = {
-# The paper size ('letterpaper' or 'a4paper').
-#'papersize': 'letterpaper',
-
-# The font size ('10pt', '11pt' or '12pt').
-#'pointsize': '10pt',
-
-# Additional stuff for the LaTeX preamble.
-#'preamble': '',
-}
-
-# Grouping the document tree into LaTeX files. List of tuples
-# (source start file, target name, title,
-# author, documentclass [howto, manual, or own class]).
-latex_documents = [
- ('index', 'libuv.tex', u'libuv API documentation',
- u'libuv contributors', 'manual'),
-]
-
-# The name of an image file (relative to this directory) to place at the top of
-# the title page.
-#latex_logo = None
-
-# For "manual" documents, if this is true, then toplevel headings are parts,
-# not chapters.
-#latex_use_parts = False
-
-# If true, show page references after internal links.
-#latex_show_pagerefs = False
-
-# If true, show URL addresses after external links.
-#latex_show_urls = False
-
-# Documents to append as an appendix to all manuals.
-#latex_appendices = []
-
-# If false, no module index is generated.
-#latex_domain_indices = True
-
-
-# -- Options for manual page output ---------------------------------------
-
-# One entry per manual page. List of tuples
-# (source start file, name, description, authors, manual section).
-man_pages = [
- ('index', 'libuv', u'libuv API documentation',
- [u'libuv contributors'], 1)
-]
-
-# If true, show URL addresses after external links.
-#man_show_urls = False
-
-
-# -- Options for Texinfo output -------------------------------------------
-
-# Grouping the document tree into Texinfo files. List of tuples
-# (source start file, target name, title, author,
-# dir menu entry, description, category)
-texinfo_documents = [
- ('index', 'libuv', u'libuv API documentation',
- u'libuv contributors', 'libuv', 'Cross-platform asynchronous I/O',
- 'Miscellaneous'),
-]
-
-# Documents to append as an appendix to all manuals.
-#texinfo_appendices = []
-
-# If false, no module index is generated.
-#texinfo_domain_indices = True
-
-# How to display URL addresses: 'footnote', 'no', or 'inline'.
-#texinfo_show_urls = 'footnote'
-
-# If true, do not generate a @detailmenu in the "Top" node's menu.
-#texinfo_no_detailmenu = False
-
-
-# -- Options for Epub output ----------------------------------------------
-
-# Bibliographic Dublin Core info.
-epub_title = u'libuv API documentation'
-epub_author = u'libuv contributors'
-epub_publisher = u'libuv contributors'
-epub_copyright = u'2014, libuv contributors'
-
-# The basename for the epub file. It defaults to the project name.
-epub_basename = u'libuv'
-
-# The HTML theme for the epub output. Since the default themes are not optimized
-# for small screen space, using the same theme for HTML and epub output is
-# usually not wise. This defaults to 'epub', a theme designed to save visual
-# space.
-#epub_theme = 'epub'
-
-# The language of the text. It defaults to the language option
-# or en if the language is not set.
-#epub_language = ''
-
-# The scheme of the identifier. Typical schemes are ISBN or URL.
-#epub_scheme = ''
-
-# The unique identifier of the text. This can be a ISBN number
-# or the project homepage.
-#epub_identifier = ''
-
-# A unique identification for the text.
-#epub_uid = ''
-
-# A tuple containing the cover image and cover page html template filenames.
-#epub_cover = ()
-
-# A sequence of (type, uri, title) tuples for the guide element of content.opf.
-#epub_guide = ()
-
-# HTML files that should be inserted before the pages created by sphinx.
-# The format is a list of tuples containing the path and title.
-#epub_pre_files = []
-
-# HTML files shat should be inserted after the pages created by sphinx.
-# The format is a list of tuples containing the path and title.
-#epub_post_files = []
-
-# A list of files that should not be packed into the epub file.
-epub_exclude_files = ['search.html']
-
-# The depth of the table of contents in toc.ncx.
-#epub_tocdepth = 3
-
-# Allow duplicate toc entries.
-#epub_tocdup = True
-
-# Choose between 'default' and 'includehidden'.
-#epub_tocscope = 'default'
-
-# Fix unsupported image types using the PIL.
-#epub_fix_images = False
-
-# Scale large images.
-#epub_max_image_width = 0
-
-# How to display URL addresses: 'footnote', 'no', or 'inline'.
-#epub_show_urls = 'inline'
-
-# If false, no index is generated.
-#epub_use_index = True
diff --git a/3rdparty/libuv/docs/src/design.rst b/3rdparty/libuv/docs/src/design.rst
deleted file mode 100644
index 34c3cff68e5..00000000000
--- a/3rdparty/libuv/docs/src/design.rst
+++ /dev/null
@@ -1,137 +0,0 @@
-
-.. _design:
-
-Design overview
-===============
-
-libuv is cross-platform support library which was originally written for NodeJS. It's designed
-around the event-driven asynchronous I/O model.
-
-The library provides much more than simply abstraction over different I/O polling mechanisms:
-'handles' and 'streams' provide a high level abstraction for sockets and other entities;
-cross-platform file I/O and threading functionality is also provided, amongst other things.
-
-Here is a diagram illustrating the different parts that compose libuv and what subsystem they
-relate to:
-
-.. image:: static/architecture.png
- :scale: 75%
- :align: center
-
-
-Handles and requests
-^^^^^^^^^^^^^^^^^^^^
-
-libuv provides users with 2 abstractions to work with, in combination with the event loop:
-handles and requests.
-
-Handles represent long-lived objects capable of performing certain operations while active. Some
-examples: a prepare handle gets its callback called once every loop iteration when active, and
-a TCP server handle get its connection callback called every time there is a new connection.
-
-Requests represent (typically) short-lived operations. These operations can be performed over a
-handle: write requests are used to write data on a handle; or standalone: getaddrinfo requests
-don't need a handle they run directly on the loop.
-
-
-The I/O loop
-^^^^^^^^^^^^
-
-The I/O (or event) loop is the central part of libuv. It establishes the content for all I/O
-operations, and it's meant to be tied to a single thread. One can run multiple event loops
-as long as each runs in a different thread. The libuv event loop (or any other API involving
-the loop or handles, for that matter) **is not thread-safe** except where stated otherwise.
-
-The event loop follows the rather usual single threaded asynchronous I/O approach: all (network)
-I/O is performed on non-blocking sockets which are polled using the best mechanism available
-on the given platform: epoll on Linux, kqueue on OSX and other BSDs, event ports on SunOS and IOCP
-on Windows. As part of a loop iteration the loop will block waiting for I/O activity on sockets
-which have been added to the poller and callbacks will be fired indicating socket conditions
-(readable, writable hangup) so handles can read, write or perform the desired I/O operation.
-
-In order to better understand how the event loop operates, the following diagram illustrates all
-stages of a loop iteration:
-
-.. image:: static/loop_iteration.png
- :scale: 75%
- :align: center
-
-
-#. The loop concept of 'now' is updated. The event loop caches the current time at the start of
- the event loop tick in order to reduce the number of time-related system calls.
-
-#. If the loop is *alive* an iteration is started, otherwise the loop will exit immediately. So,
- when is a loop considered to be *alive*? If a loop has active and ref'd handles, active
- requests or closing handles it's considered to be *alive*.
-
-#. Due timers are run. All active timers scheduled for a time before the loop's concept of *now*
- get their callbacks called.
-
-#. Pending callbacks are called. All I/O callbacks are called right after polling for I/O, for the
- most part. There are cases, however, in which calling such a callback is deferred for the next
- loop iteration. If the previous iteration deferred any I/O callback it will be run at this point.
-
-#. Idle handle callbacks are called. Despite the unfortunate name, idle handles are run on every
- loop iteration, if they are active.
-
-#. Prepare handle callbacks are called. Prepare handles get their callbacks called right before
- the loop will block for I/O.
-
-#. Poll timeout is calculated. Before blocking for I/O the loop calculates for how long it should
- block. These are the rules when calculating the timeout:
-
- * If the loop was run with the ``UV_RUN_NOWAIT`` flag, the timeout is 0.
- * If the loop is going to be stopped (:c:func:`uv_stop` was called), the timeout is 0.
- * If there are no active handles or requests, the timeout is 0.
- * If there are any idle handles active, the timeout is 0.
- * If there are any handles pending to be closed, the timeout is 0.
- * If none of the above cases was matched, the timeout of the closest timer is taken, or
- if there are no active timers, infinity.
-
-#. The loop blocks for I/O. At this point the loop will block for I/O for the timeout calculated
- on the previous step. All I/O related handles that were monitoring a given file descriptor
- for a read or write operation get their callbacks called at this point.
-
-#. Check handle callbacks are called. Check handles get their callbacks called right after the
- loop has blocked for I/O. Check handles are essentially the counterpart of prepare handles.
-
-#. Close callbacks are called. If a handle was closed by calling :c:func:`uv_close` it will
- get the close callback called.
-
-#. Special case in case the loop was run with ``UV_RUN_ONCE``, as it implies forward progress.
- It's possible that no I/O callbacks were fired after blocking for I/O, but some time has passed
- so there might be timers which are due, those timers get their callbacks called.
-
-#. Iteration ends. If the loop was run with ``UV_RUN_NOWAIT`` or ``UV_RUN_ONCE`` modes the
- iteration is ended and :c:func:`uv_run` will return. If the loop was run with ``UV_RUN_DEFAULT``
- it will continue from the start if it's still *alive*, otherwise it will also end.
-
-
-.. important::
- libuv uses a thread pool to make asynchronous file I/O operations possible, but
- network I/O is **always** performed in a single thread, each loop's thread.
-
-.. note::
- While the polling mechanism is different, libuv makes the execution model consistent
- across Unix systems and Windows.
-
-
-File I/O
-^^^^^^^^
-
-Unlike network I/O, there are no platform-specific file I/O primitives libuv could rely on,
-so the current approach is to run blocking file I/O operations in a thread pool.
-
-For a thorough explanation of the cross-platform file I/O landscape, checkout
-`this post <http://blog.libtorrent.org/2012/10/asynchronous-disk-io/>`_.
-
-libuv currently uses a global thread pool on which all loops can queue work on. 3 types of
-operations are currently run on this pool:
-
- * Filesystem operations
- * DNS functions (getaddrinfo and getnameinfo)
- * User specified code via :c:func:`uv_queue_work`
-
-.. warning::
- See the :c:ref:`threadpool` section for more details, but keep in mind the thread pool size
- is quite limited.
diff --git a/3rdparty/libuv/docs/src/dll.rst b/3rdparty/libuv/docs/src/dll.rst
deleted file mode 100644
index fb13f908159..00000000000
--- a/3rdparty/libuv/docs/src/dll.rst
+++ /dev/null
@@ -1,44 +0,0 @@
-
-.. _dll:
-
-Shared library handling
-=======================
-
-libuv provides cross platform utilities for loading shared libraries and
-retrieving symbols from them, using the following API.
-
-
-Data types
-----------
-
-.. c:type:: uv_lib_t
-
- Shared library data type.
-
-
-Public members
-^^^^^^^^^^^^^^
-
-N/A
-
-
-API
----
-
-.. c:function:: int uv_dlopen(const char* filename, uv_lib_t* lib)
-
- Opens a shared library. The filename is in utf-8. Returns 0 on success and
- -1 on error. Call :c:func:`uv_dlerror` to get the error message.
-
-.. c:function:: void uv_dlclose(uv_lib_t* lib)
-
- Close the shared library.
-
-.. c:function:: int uv_dlsym(uv_lib_t* lib, const char* name, void** ptr)
-
- Retrieves a data pointer from a dynamic library. It is legal for a symbol
- to map to NULL. Returns 0 on success and -1 if the symbol was not found.
-
-.. c:function:: const char* uv_dlerror(const uv_lib_t* lib)
-
- Returns the last uv_dlopen() or uv_dlsym() error message.
diff --git a/3rdparty/libuv/docs/src/dns.rst b/3rdparty/libuv/docs/src/dns.rst
deleted file mode 100644
index 1d881580966..00000000000
--- a/3rdparty/libuv/docs/src/dns.rst
+++ /dev/null
@@ -1,108 +0,0 @@
-
-.. _dns:
-
-DNS utility functions
-=====================
-
-libuv provides asynchronous variants of `getaddrinfo` and `getnameinfo`.
-
-
-Data types
-----------
-
-.. c:type:: uv_getaddrinfo_t
-
- `getaddrinfo` request type.
-
-.. c:type:: void (*uv_getaddrinfo_cb)(uv_getaddrinfo_t* req, int status, struct addrinfo* res)
-
- Callback which will be called with the getaddrinfo request result once
- complete. In case it was cancelled, `status` will have a value of
- ``UV_ECANCELED``.
-
-.. c:type:: uv_getnameinfo_t
-
- `getnameinfo` request type.
-
-.. c:type:: void (*uv_getnameinfo_cb)(uv_getnameinfo_t* req, int status, const char* hostname, const char* service)
-
- Callback which will be called with the getnameinfo request result once
- complete. In case it was cancelled, `status` will have a value of
- ``UV_ECANCELED``.
-
-
-Public members
-^^^^^^^^^^^^^^
-
-.. c:member:: uv_loop_t* uv_getaddrinfo_t.loop
-
- Loop that started this getaddrinfo request and where completion will be
- reported. Readonly.
-
-.. c:member:: struct addrinfo* uv_getaddrinfo_t.addrinfo
-
- Pointer to a `struct addrinfo` containing the result. Must be freed by the user
- with :c:func:`uv_freeaddrinfo`.
-
- .. versionchanged:: 1.3.0 the field is declared as public.
-
-.. c:member:: uv_loop_t* uv_getnameinfo_t.loop
-
- Loop that started this getnameinfo request and where completion will be
- reported. Readonly.
-
-.. c:member:: char[NI_MAXHOST] uv_getnameinfo_t.host
-
- Char array containing the resulting host. It's null terminated.
-
- .. versionchanged:: 1.3.0 the field is declared as public.
-
-.. c:member:: char[NI_MAXSERV] uv_getnameinfo_t.service
-
- Char array containing the resulting service. It's null terminated.
-
- .. versionchanged:: 1.3.0 the field is declared as public.
-
-.. seealso:: The :c:type:`uv_req_t` members also apply.
-
-
-API
----
-
-.. c:function:: int uv_getaddrinfo(uv_loop_t* loop, uv_getaddrinfo_t* req, uv_getaddrinfo_cb getaddrinfo_cb, const char* node, const char* service, const struct addrinfo* hints)
-
- Asynchronous :man:`getaddrinfo(3)`.
-
- Either node or service may be NULL but not both.
-
- `hints` is a pointer to a struct addrinfo with additional address type
- constraints, or NULL. Consult `man -s 3 getaddrinfo` for more details.
-
- Returns 0 on success or an error code < 0 on failure. If successful, the
- callback will get called sometime in the future with the lookup result,
- which is either:
-
- * status == 0, the res argument points to a valid `struct addrinfo`, or
- * status < 0, the res argument is NULL. See the UV_EAI_* constants.
-
- Call :c:func:`uv_freeaddrinfo` to free the addrinfo structure.
-
- .. versionchanged:: 1.3.0 the callback parameter is now allowed to be NULL,
- in which case the request will run **synchronously**.
-
-.. c:function:: void uv_freeaddrinfo(struct addrinfo* ai)
-
- Free the struct addrinfo. Passing NULL is allowed and is a no-op.
-
-.. c:function:: int uv_getnameinfo(uv_loop_t* loop, uv_getnameinfo_t* req, uv_getnameinfo_cb getnameinfo_cb, const struct sockaddr* addr, int flags)
-
- Asynchronous :man:`getnameinfo(3)`.
-
- Returns 0 on success or an error code < 0 on failure. If successful, the
- callback will get called sometime in the future with the lookup result.
- Consult `man -s 3 getnameinfo` for more details.
-
- .. versionchanged:: 1.3.0 the callback parameter is now allowed to be NULL,
- in which case the request will run **synchronously**.
-
-.. seealso:: The :c:type:`uv_req_t` API functions also apply.
diff --git a/3rdparty/libuv/docs/src/errors.rst b/3rdparty/libuv/docs/src/errors.rst
deleted file mode 100644
index cec25f5187e..00000000000
--- a/3rdparty/libuv/docs/src/errors.rst
+++ /dev/null
@@ -1,331 +0,0 @@
-
-.. _errors:
-
-Error handling
-==============
-
-In libuv errors are negative numbered constants. As a rule of thumb, whenever
-there is a status parameter, or an API functions returns an integer, a negative
-number will imply an error.
-
-.. note::
- Implementation detail: on Unix error codes are the negated `errno` (or `-errno`), while on
- Windows they are defined by libuv to arbitrary negative numbers.
-
-
-Error constants
----------------
-
-.. c:macro:: UV_E2BIG
-
- argument list too long
-
-.. c:macro:: UV_EACCES
-
- permission denied
-
-.. c:macro:: UV_EADDRINUSE
-
- address already in use
-
-.. c:macro:: UV_EADDRNOTAVAIL
-
- address not available
-
-.. c:macro:: UV_EAFNOSUPPORT
-
- address family not supported
-
-.. c:macro:: UV_EAGAIN
-
- resource temporarily unavailable
-
-.. c:macro:: UV_EAI_ADDRFAMILY
-
- address family not supported
-
-.. c:macro:: UV_EAI_AGAIN
-
- temporary failure
-
-.. c:macro:: UV_EAI_BADFLAGS
-
- bad ai_flags value
-
-.. c:macro:: UV_EAI_BADHINTS
-
- invalid value for hints
-
-.. c:macro:: UV_EAI_CANCELED
-
- request canceled
-
-.. c:macro:: UV_EAI_FAIL
-
- permanent failure
-
-.. c:macro:: UV_EAI_FAMILY
-
- ai_family not supported
-
-.. c:macro:: UV_EAI_MEMORY
-
- out of memory
-
-.. c:macro:: UV_EAI_NODATA
-
- no address
-
-.. c:macro:: UV_EAI_NONAME
-
- unknown node or service
-
-.. c:macro:: UV_EAI_OVERFLOW
-
- argument buffer overflow
-
-.. c:macro:: UV_EAI_PROTOCOL
-
- resolved protocol is unknown
-
-.. c:macro:: UV_EAI_SERVICE
-
- service not available for socket type
-
-.. c:macro:: UV_EAI_SOCKTYPE
-
- socket type not supported
-
-.. c:macro:: UV_EALREADY
-
- connection already in progress
-
-.. c:macro:: UV_EBADF
-
- bad file descriptor
-
-.. c:macro:: UV_EBUSY
-
- resource busy or locked
-
-.. c:macro:: UV_ECANCELED
-
- operation canceled
-
-.. c:macro:: UV_ECHARSET
-
- invalid Unicode character
-
-.. c:macro:: UV_ECONNABORTED
-
- software caused connection abort
-
-.. c:macro:: UV_ECONNREFUSED
-
- connection refused
-
-.. c:macro:: UV_ECONNRESET
-
- connection reset by peer
-
-.. c:macro:: UV_EDESTADDRREQ
-
- destination address required
-
-.. c:macro:: UV_EEXIST
-
- file already exists
-
-.. c:macro:: UV_EFAULT
-
- bad address in system call argument
-
-.. c:macro:: UV_EFBIG
-
- file too large
-
-.. c:macro:: UV_EHOSTUNREACH
-
- host is unreachable
-
-.. c:macro:: UV_EINTR
-
- interrupted system call
-
-.. c:macro:: UV_EINVAL
-
- invalid argument
-
-.. c:macro:: UV_EIO
-
- i/o error
-
-.. c:macro:: UV_EISCONN
-
- socket is already connected
-
-.. c:macro:: UV_EISDIR
-
- illegal operation on a directory
-
-.. c:macro:: UV_ELOOP
-
- too many symbolic links encountered
-
-.. c:macro:: UV_EMFILE
-
- too many open files
-
-.. c:macro:: UV_EMSGSIZE
-
- message too long
-
-.. c:macro:: UV_ENAMETOOLONG
-
- name too long
-
-.. c:macro:: UV_ENETDOWN
-
- network is down
-
-.. c:macro:: UV_ENETUNREACH
-
- network is unreachable
-
-.. c:macro:: UV_ENFILE
-
- file table overflow
-
-.. c:macro:: UV_ENOBUFS
-
- no buffer space available
-
-.. c:macro:: UV_ENODEV
-
- no such device
-
-.. c:macro:: UV_ENOENT
-
- no such file or directory
-
-.. c:macro:: UV_ENOMEM
-
- not enough memory
-
-.. c:macro:: UV_ENONET
-
- machine is not on the network
-
-.. c:macro:: UV_ENOPROTOOPT
-
- protocol not available
-
-.. c:macro:: UV_ENOSPC
-
- no space left on device
-
-.. c:macro:: UV_ENOSYS
-
- function not implemented
-
-.. c:macro:: UV_ENOTCONN
-
- socket is not connected
-
-.. c:macro:: UV_ENOTDIR
-
- not a directory
-
-.. c:macro:: UV_ENOTEMPTY
-
- directory not empty
-
-.. c:macro:: UV_ENOTSOCK
-
- socket operation on non-socket
-
-.. c:macro:: UV_ENOTSUP
-
- operation not supported on socket
-
-.. c:macro:: UV_EPERM
-
- operation not permitted
-
-.. c:macro:: UV_EPIPE
-
- broken pipe
-
-.. c:macro:: UV_EPROTO
-
- protocol error
-
-.. c:macro:: UV_EPROTONOSUPPORT
-
- protocol not supported
-
-.. c:macro:: UV_EPROTOTYPE
-
- protocol wrong type for socket
-
-.. c:macro:: UV_ERANGE
-
- result too large
-
-.. c:macro:: UV_EROFS
-
- read-only file system
-
-.. c:macro:: UV_ESHUTDOWN
-
- cannot send after transport endpoint shutdown
-
-.. c:macro:: UV_ESPIPE
-
- invalid seek
-
-.. c:macro:: UV_ESRCH
-
- no such process
-
-.. c:macro:: UV_ETIMEDOUT
-
- connection timed out
-
-.. c:macro:: UV_ETXTBSY
-
- text file is busy
-
-.. c:macro:: UV_EXDEV
-
- cross-device link not permitted
-
-.. c:macro:: UV_UNKNOWN
-
- unknown error
-
-.. c:macro:: UV_EOF
-
- end of file
-
-.. c:macro:: UV_ENXIO
-
- no such device or address
-
-.. c:macro:: UV_EMLINK
-
- too many links
-
-
-API
----
-
-.. c:function:: const char* uv_strerror(int err)
-
- Returns the error message for the given error code. Leaks a few bytes
- of memory when you call it with an unknown error code.
-
-.. c:function:: const char* uv_err_name(int err)
-
- Returns the error name for the given error code. Leaks a few bytes
- of memory when you call it with an unknown error code.
diff --git a/3rdparty/libuv/docs/src/fs.rst b/3rdparty/libuv/docs/src/fs.rst
deleted file mode 100644
index 69e283f4c67..00000000000
--- a/3rdparty/libuv/docs/src/fs.rst
+++ /dev/null
@@ -1,300 +0,0 @@
-
-.. _fs:
-
-Filesystem operations
-=====================
-
-libuv provides a wide variety of cross-platform sync and async filesystem
-operations. All functions defined in this document take a callback, which is
-allowed to be NULL. If the callback is NULL the request is completed synchronously,
-otherwise it will be performed asynchronously.
-
-All file operations are run on the threadpool, see :ref:`threadpool` for information
-on the threadpool size.
-
-
-Data types
-----------
-
-.. c:type:: uv_fs_t
-
- Filesystem request type.
-
-.. c:type:: uv_timespec_t
-
- Portable equivalent of ``struct timespec``.
-
- ::
-
- typedef struct {
- long tv_sec;
- long tv_nsec;
- } uv_timespec_t;
-
-.. c:type:: uv_stat_t
-
- Portable equivalent of ``struct stat``.
-
- ::
-
- typedef struct {
- uint64_t st_dev;
- uint64_t st_mode;
- uint64_t st_nlink;
- uint64_t st_uid;
- uint64_t st_gid;
- uint64_t st_rdev;
- uint64_t st_ino;
- uint64_t st_size;
- uint64_t st_blksize;
- uint64_t st_blocks;
- uint64_t st_flags;
- uint64_t st_gen;
- uv_timespec_t st_atim;
- uv_timespec_t st_mtim;
- uv_timespec_t st_ctim;
- uv_timespec_t st_birthtim;
- } uv_stat_t;
-
-.. c:type:: uv_fs_type
-
- Filesystem request type.
-
- ::
-
- typedef enum {
- UV_FS_UNKNOWN = -1,
- UV_FS_CUSTOM,
- UV_FS_OPEN,
- UV_FS_CLOSE,
- UV_FS_READ,
- UV_FS_WRITE,
- UV_FS_SENDFILE,
- UV_FS_STAT,
- UV_FS_LSTAT,
- UV_FS_FSTAT,
- UV_FS_FTRUNCATE,
- UV_FS_UTIME,
- UV_FS_FUTIME,
- UV_FS_ACCESS,
- UV_FS_CHMOD,
- UV_FS_FCHMOD,
- UV_FS_FSYNC,
- UV_FS_FDATASYNC,
- UV_FS_UNLINK,
- UV_FS_RMDIR,
- UV_FS_MKDIR,
- UV_FS_MKDTEMP,
- UV_FS_RENAME,
- UV_FS_SCANDIR,
- UV_FS_LINK,
- UV_FS_SYMLINK,
- UV_FS_READLINK,
- UV_FS_CHOWN,
- UV_FS_FCHOWN
- } uv_fs_type;
-
-.. c:type:: uv_dirent_t
-
- Cross platform (reduced) equivalent of ``struct dirent``.
- Used in :c:func:`uv_fs_scandir_next`.
-
- ::
-
- typedef enum {
- UV_DIRENT_UNKNOWN,
- UV_DIRENT_FILE,
- UV_DIRENT_DIR,
- UV_DIRENT_LINK,
- UV_DIRENT_FIFO,
- UV_DIRENT_SOCKET,
- UV_DIRENT_CHAR,
- UV_DIRENT_BLOCK
- } uv_dirent_type_t;
-
- typedef struct uv_dirent_s {
- const char* name;
- uv_dirent_type_t type;
- } uv_dirent_t;
-
-
-Public members
-^^^^^^^^^^^^^^
-
-.. c:member:: uv_loop_t* uv_fs_t.loop
-
- Loop that started this request and where completion will be reported.
- Readonly.
-
-.. c:member:: uv_fs_type uv_fs_t.fs_type
-
- FS request type.
-
-.. c:member:: const char* uv_fs_t.path
-
- Path affecting the request.
-
-.. c:member:: ssize_t uv_fs_t.result
-
- Result of the request. < 0 means error, success otherwise. On requests such
- as :c:func:`uv_fs_read` or :c:func:`uv_fs_write` it indicates the amount of
- data that was read or written, respectively.
-
-.. c:member:: uv_stat_t uv_fs_t.statbuf
-
- Stores the result of :c:func:`uv_fs_stat` and other stat requests.
-
-.. c:member:: void* uv_fs_t.ptr
-
- Stores the result of :c:func:`uv_fs_readlink` and serves as an alias to
- `statbuf`.
-
-.. seealso:: The :c:type:`uv_req_t` members also apply.
-
-
-API
----
-
-.. c:function:: void uv_fs_req_cleanup(uv_fs_t* req)
-
- Cleanup request. Must be called after a request is finished to deallocate
- any memory libuv might have allocated.
-
-.. c:function:: int uv_fs_close(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_fs_cb cb)
-
- Equivalent to :man:`close(2)`.
-
-.. c:function:: int uv_fs_open(uv_loop_t* loop, uv_fs_t* req, const char* path, int flags, int mode, uv_fs_cb cb)
-
- Equivalent to :man:`open(2)`.
-
- .. note::
- On Windows libuv uses `CreateFileW` and thus the file is always opened
- in binary mode. Because of this the O_BINARY and O_TEXT flags are not
- supported.
-
-.. c:function:: int uv_fs_read(uv_loop_t* loop, uv_fs_t* req, uv_file file, const uv_buf_t bufs[], unsigned int nbufs, int64_t offset, uv_fs_cb cb)
-
- Equivalent to :man:`preadv(2)`.
-
-.. c:function:: int uv_fs_unlink(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb)
-
- Equivalent to :man:`unlink(2)`.
-
-.. c:function:: int uv_fs_write(uv_loop_t* loop, uv_fs_t* req, uv_file file, const uv_buf_t bufs[], unsigned int nbufs, int64_t offset, uv_fs_cb cb)
-
- Equivalent to :man:`pwritev(2)`.
-
-.. c:function:: int uv_fs_mkdir(uv_loop_t* loop, uv_fs_t* req, const char* path, int mode, uv_fs_cb cb)
-
- Equivalent to :man:`mkdir(2)`.
-
- .. note::
- `mode` is currently not implemented on Windows.
-
-.. c:function:: int uv_fs_mkdtemp(uv_loop_t* loop, uv_fs_t* req, const char* tpl, uv_fs_cb cb)
-
- Equivalent to :man:`mkdtemp(3)`.
-
- .. note::
- The result can be found as a null terminated string at `req->path`.
-
-.. c:function:: int uv_fs_rmdir(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb)
-
- Equivalent to :man:`rmdir(2)`.
-
-.. c:function:: int uv_fs_scandir(uv_loop_t* loop, uv_fs_t* req, const char* path, int flags, uv_fs_cb cb)
-.. c:function:: int uv_fs_scandir_next(uv_fs_t* req, uv_dirent_t* ent)
-
- Equivalent to :man:`scandir(3)`, with a slightly different API. Once the callback
- for the request is called, the user can use :c:func:`uv_fs_scandir_next` to
- get `ent` populated with the next directory entry data. When there are no
- more entries ``UV_EOF`` will be returned.
-
- .. note::
- Unlike `scandir(3)`, this function does not return the "." and ".." entries.
-
- .. note::
- On Linux, getting the type of an entry is only supported by some filesystems (btrfs, ext2,
- ext3 and ext4 at the time of this writing), check the :man:`getdents(2)` man page.
-
-.. c:function:: int uv_fs_stat(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb)
-.. c:function:: int uv_fs_fstat(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_fs_cb cb)
-.. c:function:: int uv_fs_lstat(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb)
-
- Equivalent to :man:`stat(2)`, :man:`fstat(2)` and :man:`fstat(2)` respectively.
-
-.. c:function:: int uv_fs_rename(uv_loop_t* loop, uv_fs_t* req, const char* path, const char* new_path, uv_fs_cb cb)
-
- Equivalent to :man:`rename(2)`.
-
-.. c:function:: int uv_fs_fsync(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_fs_cb cb)
-
- Equivalent to :man:`fsync(2)`.
-
-.. c:function:: int uv_fs_fdatasync(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_fs_cb cb)
-
- Equivalent to :man:`fdatasync(2)`.
-
-.. c:function:: int uv_fs_ftruncate(uv_loop_t* loop, uv_fs_t* req, uv_file file, int64_t offset, uv_fs_cb cb)
-
- Equivalent to :man:`ftruncate(2)`.
-
-.. c:function:: int uv_fs_sendfile(uv_loop_t* loop, uv_fs_t* req, uv_file out_fd, uv_file in_fd, int64_t in_offset, size_t length, uv_fs_cb cb)
-
- Limited equivalent to :man:`sendfile(2)`.
-
-.. c:function:: int uv_fs_access(uv_loop_t* loop, uv_fs_t* req, const char* path, int mode, uv_fs_cb cb)
-
- Equivalent to :man:`access(2)` on Unix. Windows uses ``GetFileAttributesW()``.
-
-.. c:function:: int uv_fs_chmod(uv_loop_t* loop, uv_fs_t* req, const char* path, int mode, uv_fs_cb cb)
-.. c:function:: int uv_fs_fchmod(uv_loop_t* loop, uv_fs_t* req, uv_file file, int mode, uv_fs_cb cb)
-
- Equivalent to :man:`chmod(2)` and :man:`fchmod(2)` respectively.
-
-.. c:function:: int uv_fs_utime(uv_loop_t* loop, uv_fs_t* req, const char* path, double atime, double mtime, uv_fs_cb cb)
-.. c:function:: int uv_fs_futime(uv_loop_t* loop, uv_fs_t* req, uv_file file, double atime, double mtime, uv_fs_cb cb)
-
- Equivalent to :man:`utime(2)` and :man:`futime(2)` respectively.
-
-.. c:function:: int uv_fs_link(uv_loop_t* loop, uv_fs_t* req, const char* path, const char* new_path, uv_fs_cb cb)
-
- Equivalent to :man:`link(2)`.
-
-.. c:function:: int uv_fs_symlink(uv_loop_t* loop, uv_fs_t* req, const char* path, const char* new_path, int flags, uv_fs_cb cb)
-
- Equivalent to :man:`symlink(2)`.
-
- .. note::
- On Windows the `flags` parameter can be specified to control how the symlink will
- be created:
-
- * ``UV_FS_SYMLINK_DIR``: indicates that `path` points to a directory.
-
- * ``UV_FS_SYMLINK_JUNCTION``: request that the symlink is created
- using junction points.
-
-.. c:function:: int uv_fs_readlink(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb)
-
- Equivalent to :man:`readlink(2)`.
-
-.. c:function:: int uv_fs_realpath(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb)
-
- Equivalent to :man:`realpath(3)` on Unix. Windows uses ``GetFinalPathNameByHandle()``.
-
- .. note::
- This function is not implemented on Windows XP and Windows Server 2003.
- On these systems, UV_ENOSYS is returned.
-
- .. versionadded:: 1.8.0
-
-.. c:function:: int uv_fs_chown(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_uid_t uid, uv_gid_t gid, uv_fs_cb cb)
-.. c:function:: int uv_fs_fchown(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_uid_t uid, uv_gid_t gid, uv_fs_cb cb)
-
- Equivalent to :man:`chown(2)` and :man:`fchown(2)` respectively.
-
- .. note::
- These functions are not implemented on Windows.
-
-.. seealso:: The :c:type:`uv_req_t` API functions also apply.
diff --git a/3rdparty/libuv/docs/src/fs_event.rst b/3rdparty/libuv/docs/src/fs_event.rst
deleted file mode 100644
index c2d7f520236..00000000000
--- a/3rdparty/libuv/docs/src/fs_event.rst
+++ /dev/null
@@ -1,108 +0,0 @@
-
-.. _fs_event:
-
-:c:type:`uv_fs_event_t` --- FS Event handle
-===========================================
-
-FS Event handles allow the user to monitor a given path for changes, for example,
-if the file was renamed or there was a generic change in it. This handle uses
-the best backend for the job on each platform.
-
-
-Data types
-----------
-
-.. c:type:: uv_fs_event_t
-
- FS Event handle type.
-
-.. c:type:: void (*uv_fs_event_cb)(uv_fs_event_t* handle, const char* filename, int events, int status)
-
- Callback passed to :c:func:`uv_fs_event_start` which will be called repeatedly
- after the handle is started. If the handle was started with a directory the
- `filename` parameter will be a relative path to a file contained in the directory.
- The `events` parameter is an ORed mask of :c:type:`uv_fs_event` elements.
-
-.. c:type:: uv_fs_event
-
- Event types that :c:type:`uv_fs_event_t` handles monitor.
-
- ::
-
- enum uv_fs_event {
- UV_RENAME = 1,
- UV_CHANGE = 2
- };
-
-.. c:type:: uv_fs_event_flags
-
- Flags that can be passed to :c:func:`uv_fs_event_start` to control its
- behavior.
-
- ::
-
- enum uv_fs_event_flags {
- /*
- * By default, if the fs event watcher is given a directory name, we will
- * watch for all events in that directory. This flags overrides this behavior
- * and makes fs_event report only changes to the directory entry itself. This
- * flag does not affect individual files watched.
- * This flag is currently not implemented yet on any backend.
- */
- UV_FS_EVENT_WATCH_ENTRY = 1,
- /*
- * By default uv_fs_event will try to use a kernel interface such as inotify
- * or kqueue to detect events. This may not work on remote filesystems such
- * as NFS mounts. This flag makes fs_event fall back to calling stat() on a
- * regular interval.
- * This flag is currently not implemented yet on any backend.
- */
- UV_FS_EVENT_STAT = 2,
- /*
- * By default, event watcher, when watching directory, is not registering
- * (is ignoring) changes in it's subdirectories.
- * This flag will override this behaviour on platforms that support it.
- */
- UV_FS_EVENT_RECURSIVE = 4
- };
-
-
-Public members
-^^^^^^^^^^^^^^
-
-N/A
-
-.. seealso:: The :c:type:`uv_handle_t` members also apply.
-
-
-API
----
-
-.. c:function:: int uv_fs_event_init(uv_loop_t* loop, uv_fs_event_t* handle)
-
- Initialize the handle.
-
-.. c:function:: int uv_fs_event_start(uv_fs_event_t* handle, uv_fs_event_cb cb, const char* path, unsigned int flags)
-
- Start the handle with the given callback, which will watch the specified
- `path` for changes. `flags` can be an ORed mask of :c:type:`uv_fs_event_flags`.
-
- .. note:: Currently the only supported flag is ``UV_FS_EVENT_RECURSIVE`` and
- only on OSX and Windows.
-
-.. c:function:: int uv_fs_event_stop(uv_fs_event_t* handle)
-
- Stop the handle, the callback will no longer be called.
-
-.. c:function:: int uv_fs_event_getpath(uv_fs_event_t* handle, char* buffer, size_t* size)
-
- Get the path being monitored by the handle. The buffer must be preallocated
- by the user. Returns 0 on success or an error code < 0 in case of failure.
- On success, `buffer` will contain the path and `size` its length. If the buffer
- is not big enough UV_ENOBUFS will be returned and len will be set to the
- required size.
-
- .. versionchanged:: 1.3.0 the returned length no longer includes the terminating null byte,
- and the buffer is not null terminated.
-
-.. seealso:: The :c:type:`uv_handle_t` API functions also apply.
diff --git a/3rdparty/libuv/docs/src/fs_poll.rst b/3rdparty/libuv/docs/src/fs_poll.rst
deleted file mode 100644
index 4efb2440e0b..00000000000
--- a/3rdparty/libuv/docs/src/fs_poll.rst
+++ /dev/null
@@ -1,72 +0,0 @@
-
-.. _fs_poll:
-
-:c:type:`uv_fs_poll_t` --- FS Poll handle
-=========================================
-
-FS Poll handles allow the user to monitor a given path for changes. Unlike
-:c:type:`uv_fs_event_t`, fs poll handles use `stat` to detect when a file has
-changed so they can work on file systems where fs event handles can't.
-
-
-Data types
-----------
-
-.. c:type:: uv_fs_poll_t
-
- FS Poll handle type.
-
-.. c:type:: void (*uv_fs_poll_cb)(uv_fs_poll_t* handle, int status, const uv_stat_t* prev, const uv_stat_t* curr)
-
- Callback passed to :c:func:`uv_fs_poll_start` which will be called repeatedly
- after the handle is started, when any change happens to the monitored path.
-
- The callback is invoked with `status < 0` if `path` does not exist
- or is inaccessible. The watcher is *not* stopped but your callback is
- not called again until something changes (e.g. when the file is created
- or the error reason changes).
-
- When `status == 0`, the callback receives pointers to the old and new
- :c:type:`uv_stat_t` structs. They are valid for the duration of the
- callback only.
-
-
-Public members
-^^^^^^^^^^^^^^
-
-N/A
-
-.. seealso:: The :c:type:`uv_handle_t` members also apply.
-
-
-API
----
-
-.. c:function:: int uv_fs_poll_init(uv_loop_t* loop, uv_fs_poll_t* handle)
-
- Initialize the handle.
-
-.. c:function:: int uv_fs_poll_start(uv_fs_poll_t* handle, uv_fs_poll_cb poll_cb, const char* path, unsigned int interval)
-
- Check the file at `path` for changes every `interval` milliseconds.
-
- .. note::
- For maximum portability, use multi-second intervals. Sub-second intervals will not detect
- all changes on many file systems.
-
-.. c:function:: int uv_fs_poll_stop(uv_fs_poll_t* handle)
-
- Stop the handle, the callback will no longer be called.
-
-.. c:function:: int uv_fs_poll_getpath(uv_fs_poll_t* handle, char* buffer, size_t* size)
-
- Get the path being monitored by the handle. The buffer must be preallocated
- by the user. Returns 0 on success or an error code < 0 in case of failure.
- On success, `buffer` will contain the path and `size` its length. If the buffer
- is not big enough UV_ENOBUFS will be returned and len will be set to the
- required size.
-
- .. versionchanged:: 1.3.0 the returned length no longer includes the terminating null byte,
- and the buffer is not null terminated.
-
-.. seealso:: The :c:type:`uv_handle_t` API functions also apply.
diff --git a/3rdparty/libuv/docs/src/handle.rst b/3rdparty/libuv/docs/src/handle.rst
deleted file mode 100644
index 6ba597a21ab..00000000000
--- a/3rdparty/libuv/docs/src/handle.rst
+++ /dev/null
@@ -1,181 +0,0 @@
-
-.. _handle:
-
-:c:type:`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.
-
-
-Data types
-----------
-
-.. c:type:: uv_handle_t
-
- The base libuv handle type.
-
-.. c:type:: uv_any_handle
-
- Union of all handle types.
-
-.. c:type:: void (*uv_alloc_cb)(uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf)
-
- Type definition for callback passed to :c:func:`uv_read_start` and
- :c:func:`uv_udp_recv_start`. The user must fill the supplied :c:type:`uv_buf_t`
- structure with whatever size, as long as it's > 0. A suggested size (65536 at the moment)
- is provided, but it doesn't need to be honored. Setting the buffer's length to 0
- will trigger a ``UV_ENOBUFS`` error in the :c:type:`uv_udp_recv_cb` or
- :c:type:`uv_read_cb` callback.
-
-.. c:type:: void (*uv_close_cb)(uv_handle_t* handle)
-
- Type definition for callback passed to :c:func:`uv_close`.
-
-
-Public members
-^^^^^^^^^^^^^^
-
-.. c:member:: uv_loop_t* uv_handle_t.loop
-
- Pointer to the :c:type:`uv_loop_t` where the handle is running on. Readonly.
-
-.. c:member:: void* uv_handle_t.data
-
- Space for user-defined arbitrary data. libuv does not use this field.
-
-
-API
----
-
-.. c:function:: int uv_is_active(const uv_handle_t* handle)
-
- Returns non-zero if the handle is active, zero 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. handle - basically any handle that
- deals with i/o - is 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.
-
-.. c:function:: int uv_is_closing(const uv_handle_t* handle)
-
- Returns non-zero if the handle is closing or closed, zero otherwise.
-
- .. note::
- This function should only be used between the initialization of the handle and the
- arrival of the close callback.
-
-.. c:function:: void uv_close(uv_handle_t* handle, uv_close_cb close_cb)
-
- Request handle to be closed. `close_cb` 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
- `close_cb` 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.
-
-.. c:function:: void uv_ref(uv_handle_t* handle)
-
- Reference the given handle. References are idempotent, that is, if a handle
- is already referenced calling this function again will have no effect.
-
- See :ref:`refcount`.
-
-.. c:function:: void uv_unref(uv_handle_t* handle)
-
- 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 :ref:`refcount`.
-
-.. c:function:: int uv_has_ref(const uv_handle_t* handle)
-
- Returns non-zero if the handle referenced, zero otherwise.
-
- See :ref:`refcount`.
-
-.. c:function:: size_t uv_handle_size(uv_handle_type type)
-
- Returns the size of the given handle type. Useful for FFI binding writers
- who don't want to know the structure layout.
-
-
-Miscellaneous API functions
----------------------------
-
-The following API functions take a :c:type:`uv_handle_t` argument but they work
-just for some handle types.
-
-.. c:function:: int uv_send_buffer_size(uv_handle_t* handle, int* value)
-
- Gets or sets the size of the send buffer that the operating
- system uses for the socket.
-
- If `*value` == 0, it will return the current send buffer size,
- otherwise it will use `*value` 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.
-
-.. c:function:: int uv_recv_buffer_size(uv_handle_t* handle, int* value)
-
- Gets or sets the size of the receive buffer that the operating
- system uses for the socket.
-
- If `*value` == 0, it will return the current receive buffer size,
- otherwise it will use `*value` 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.
-
-.. c:function:: int uv_fileno(const uv_handle_t* handle, uv_os_fd_t* fd)
-
- 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.
-
-
-.. _refcount:
-
-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 :c:func:`uv_unref`
-after calling :c:func:`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 :c:func:`uv_is_active`
-for a more detailed explanation on what being `active` involves.
diff --git a/3rdparty/libuv/docs/src/idle.rst b/3rdparty/libuv/docs/src/idle.rst
deleted file mode 100644
index 1f51c4a19e4..00000000000
--- a/3rdparty/libuv/docs/src/idle.rst
+++ /dev/null
@@ -1,54 +0,0 @@
-
-.. _idle:
-
-:c:type:`uv_idle_t` --- Idle handle
-===================================
-
-Idle handles will run the given callback once per loop iteration, right
-before the :c:type:`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".
-
-
-Data types
-----------
-
-.. c:type:: uv_idle_t
-
- Idle handle type.
-
-.. c:type:: void (*uv_idle_cb)(uv_idle_t* handle)
-
- Type definition for callback passed to :c:func:`uv_idle_start`.
-
-
-Public members
-^^^^^^^^^^^^^^
-
-N/A
-
-.. seealso:: The :c:type:`uv_handle_t` members also apply.
-
-
-API
----
-
-.. c:function:: int uv_idle_init(uv_loop_t* loop, uv_idle_t* idle)
-
- Initialize the handle.
-
-.. c:function:: int uv_idle_start(uv_idle_t* idle, uv_idle_cb cb)
-
- Start the handle with the given callback.
-
-.. c:function:: int uv_idle_stop(uv_idle_t* idle)
-
- Stop the handle, the callback will no longer be called.
-
-.. seealso:: The :c:type:`uv_handle_t` API functions also apply.
diff --git a/3rdparty/libuv/docs/src/index.rst b/3rdparty/libuv/docs/src/index.rst
deleted file mode 100644
index fa89c4bffe5..00000000000
--- a/3rdparty/libuv/docs/src/index.rst
+++ /dev/null
@@ -1,95 +0,0 @@
-
-Welcome to the libuv API documentation
-======================================
-
-Overview
---------
-
-libuv is a multi-platform support library with a focus on asynchronous I/O. It
-was primarily developed for use by `Node.js`_, but it's also used by `Luvit`_,
-`Julia`_, `pyuv`_, and `others`_.
-
-.. note::
- In case you find errors in this documentation you can help by sending
- `pull requests <https://github.com/libuv/libuv>`_!
-
-.. _Node.js: http://nodejs.org
-.. _Luvit: http://luvit.io
-.. _Julia: http://julialang.org
-.. _pyuv: https://github.com/saghul/pyuv
-.. _others: https://github.com/libuv/libuv/wiki/Projects-that-use-libuv
-
-
-Features
---------
-
-* Full-featured event loop backed by epoll, kqueue, IOCP, event ports.
-* Asynchronous TCP and UDP sockets
-* Asynchronous DNS resolution
-* Asynchronous file and file system operations
-* File system events
-* ANSI escape code controlled TTY
-* IPC with socket sharing, using Unix domain sockets or named pipes (Windows)
-* Child processes
-* Thread pool
-* Signal handling
-* High resolution clock
-* Threading and synchronization primitives
-
-
-Downloads
----------
-
-libuv can be downloaded from `here <http://dist.libuv.org/dist/>`_.
-
-
-Installation
-------------
-
-Installation instructions can be found on `the README <https://github.com/libuv/libuv/blob/master/README.md>`_.
-
-
-Upgrading
----------
-
-Migration guides for different libuv versions, starting with 1.0.
-
-.. toctree::
- :maxdepth: 1
-
- migration_010_100
-
-
-Documentation
--------------
-
-.. toctree::
- :maxdepth: 1
-
- design
- errors
- version
- loop
- handle
- request
- timer
- prepare
- check
- idle
- async
- poll
- signal
- process
- stream
- tcp
- pipe
- tty
- udp
- fs_event
- fs_poll
- fs
- threadpool
- dns
- dll
- threading
- misc
diff --git a/3rdparty/libuv/docs/src/loop.rst b/3rdparty/libuv/docs/src/loop.rst
deleted file mode 100644
index 2a01d796375..00000000000
--- a/3rdparty/libuv/docs/src/loop.rst
+++ /dev/null
@@ -1,166 +0,0 @@
-
-.. _loop:
-
-:c:type:`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.
-
-
-Data types
-----------
-
-.. c:type:: uv_loop_t
-
- Loop data type.
-
-.. c:type:: uv_run_mode
-
- Mode used to run the loop with :c:func:`uv_run`.
-
- ::
-
- typedef enum {
- UV_RUN_DEFAULT = 0,
- UV_RUN_ONCE,
- UV_RUN_NOWAIT
- } uv_run_mode;
-
-.. c:type:: void (*uv_walk_cb)(uv_handle_t* handle, void* arg)
-
- Type definition for callback passed to :c:func:`uv_walk`.
-
-
-Public members
-^^^^^^^^^^^^^^
-
-.. c:member:: void* uv_loop_t.data
-
- Space for user-defined arbitrary data. libuv does not use this field. libuv does, however,
- initialize it to NULL in :c:func:`uv_loop_init`, and it poisons the value (on debug builds)
- on :c:func:`uv_loop_close`.
-
-
-API
----
-
-.. c:function:: int uv_loop_init(uv_loop_t* loop)
-
- Initializes the given `uv_loop_t` structure.
-
-.. c:function:: int uv_loop_configure(uv_loop_t* loop, uv_loop_option option, ...)
-
- .. versionadded:: 1.0.2
-
- Set additional loop options. You should normally call this before the
- first call to :c:func:`uv_run` unless mentioned otherwise.
-
- Returns 0 on success or a UV_E* error code on failure. Be prepared to
- handle UV_ENOSYS; it means the loop option is not supported by the platform.
-
- Supported options:
-
- - UV_LOOP_BLOCK_SIGNAL: Block a signal when polling for new events. The
- second argument to :c:func:`uv_loop_configure` is the signal number.
-
- This operation is currently only implemented for SIGPROF signals,
- to suppress unnecessary wakeups when using a sampling profiler.
- Requesting other signals will fail with UV_EINVAL.
-
-.. c:function:: int uv_loop_close(uv_loop_t* loop)
-
- Closes all internal loop resources. This function must only be called once
- the loop has finished its execution or it will return UV_EBUSY. After this
- function returns the user shall free the memory allocated for the loop.
-
-.. c:function:: uv_loop_t* uv_default_loop(void)
-
- Returns the initialized default loop. It may return NULL in case of
- allocation failure.
-
- This function is just a convenient way for having a global loop throughout
- an application, the default loop is in no way different than the ones
- initialized with :c:func:`uv_loop_init`. As such, the default loop can (and
- should) be closed with :c:func:`uv_loop_close` so the resources associated
- with it are freed.
-
-.. c:function:: int uv_run(uv_loop_t* loop, uv_run_mode mode)
-
- This function runs the event loop. It will act differently depending on the
- specified mode:
-
- - UV_RUN_DEFAULT: Runs the event loop until there are no more active and
- referenced handles or requests. Returns non-zero if :c:func:`uv_stop`
- was called and there are still active handles or requests. Returns
- zero in all other cases.
- - UV_RUN_ONCE: Poll for i/o once. Note that this function blocks if
- there are no pending callbacks. Returns zero when done (no active handles
- or requests left), or non-zero if more callbacks are expected (meaning
- you should run the event loop again sometime in the future).
- - UV_RUN_NOWAIT: Poll for i/o once but don't block if there are no
- pending callbacks. Returns zero if done (no active handles
- or requests left), or non-zero if more callbacks are expected (meaning
- you should run the event loop again sometime in the future).
-
-.. c:function:: int uv_loop_alive(const uv_loop_t* loop)
-
- Returns non-zero if there are active handles or request in the loop.
-
-.. c:function:: void uv_stop(uv_loop_t* loop)
-
- Stop the event loop, causing :c:func:`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.
-
-.. c:function:: size_t uv_loop_size(void)
-
- Returns the size of the `uv_loop_t` structure. Useful for FFI binding
- writers who don't want to know the structure layout.
-
-.. c:function:: int uv_backend_fd(const uv_loop_t* loop)
-
- Get backend file descriptor. Only kqueue, epoll and event ports are
- supported.
-
- This can be used in conjunction with `uv_run(loop, UV_RUN_NOWAIT)` to
- poll in one thread and run the event loop's callbacks in another see
- test/test-embed.c for an example.
-
- .. 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.
-
-.. c:function:: int uv_backend_timeout(const uv_loop_t* loop)
-
- Get the poll timeout. The return value is in milliseconds, or -1 for no
- timeout.
-
-.. c:function:: uint64_t uv_now(const uv_loop_t* loop)
-
- Return the current timestamp in milliseconds. The timestamp is cached at
- the start of the event loop tick, see :c:func:`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 :c:func:`uv_hrtime` if you need sub-millisecond granularity.
-
-.. c:function:: void uv_update_time(uv_loop_t* loop)
-
- 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.
-
-.. c:function:: void uv_walk(uv_loop_t* loop, uv_walk_cb walk_cb, void* arg)
-
- Walk the list of handles: `walk_cb` will be executed with the given `arg`.
diff --git a/3rdparty/libuv/docs/src/migration_010_100.rst b/3rdparty/libuv/docs/src/migration_010_100.rst
deleted file mode 100644
index bb6ac1a8092..00000000000
--- a/3rdparty/libuv/docs/src/migration_010_100.rst
+++ /dev/null
@@ -1,244 +0,0 @@
-
-.. _migration_010_100:
-
-libuv 0.10 -> 1.0.0 migration guide
-===================================
-
-Some APIs changed quite a bit throughout the 1.0.0 development process. Here
-is a migration guide for the most significant changes that happened after 0.10
-was released.
-
-
-Loop initialization and closing
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-In libuv 0.10 (and previous versions), loops were created with `uv_loop_new`, which
-allocated memory for a new loop and initialized it; and destroyed with `uv_loop_delete`,
-which destroyed the loop and freed the memory. Starting with 1.0, those are deprecated
-and the user is responsible for allocating the memory and then initializing the loop.
-
-libuv 0.10
-
-::
-
- uv_loop_t* loop = uv_loop_new();
- ...
- uv_loop_delete(loop);
-
-libuv 1.0
-
-::
-
- uv_loop_t* loop = malloc(sizeof *loop);
- uv_loop_init(loop);
- ...
- uv_loop_close(loop);
- free(loop);
-
-.. note::
- Error handling was omitted for brevity. Check the documentation for :c:func:`uv_loop_init`
- and :c:func:`uv_loop_close`.
-
-
-Error handling
-~~~~~~~~~~~~~~
-
-Error handling had a major overhaul in libuv 1.0. In general, functions and status parameters
-would get 0 for success and -1 for failure on libuv 0.10, and the user had to use `uv_last_error`
-to fetch the error code, which was a positive number.
-
-In 1.0, functions and status parameters contain the actual error code, which is 0 for success, or
-a negative number in case of error.
-
-libuv 0.10
-
-::
-
- ... assume 'server' is a TCP server which is already listening
- r = uv_listen((uv_stream_t*) server, 511, NULL);
- if (r == -1) {
- uv_err_t err = uv_last_error(uv_default_loop());
- /* err.code contains UV_EADDRINUSE */
- }
-
-libuv 1.0
-
-::
-
- ... assume 'server' is a TCP server which is already listening
- r = uv_listen((uv_stream_t*) server, 511, NULL);
- if (r < 0) {
- /* r contains UV_EADDRINUSE */
- }
-
-
-Threadpool changes
-~~~~~~~~~~~~~~~~~~
-
-In libuv 0.10 Unix used a threadpool which defaulted to 4 threads, while Windows used the
-`QueueUserWorkItem` API, which uses a Windows internal threadpool, which defaults to 512
-threads per process.
-
-In 1.0, we unified both implementations, so Windows now uses the same implementation Unix
-does. The threadpool size can be set by exporting the ``UV_THREADPOOL_SIZE`` environment
-variable. See :c:ref:`threadpool`.
-
-
-Allocation callback API change
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-In libuv 0.10 the callback had to return a filled :c:type:`uv_buf_t` by value:
-
-::
-
- uv_buf_t alloc_cb(uv_handle_t* handle, size_t size) {
- return uv_buf_init(malloc(size), size);
- }
-
-In libuv 1.0 a pointer to a buffer is passed to the callback, which the user
-needs to fill:
-
-::
-
- void alloc_cb(uv_handle_t* handle, size_t size, uv_buf_t* buf) {
- buf->base = malloc(size);
- buf->len = size;
- }
-
-
-Unification of IPv4 / IPv6 APIs
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-libuv 1.0 unified the IPv4 and IPv6 APIS. There is no longer a `uv_tcp_bind` and `uv_tcp_bind6`
-duality, there is only :c:func:`uv_tcp_bind` now.
-
-IPv4 functions took ``struct sockaddr_in`` structures by value, and IPv6 functions took
-``struct sockaddr_in6``. Now functions take a ``struct sockaddr*`` (note it's a pointer).
-It can be stack allocated.
-
-libuv 0.10
-
-::
-
- struct sockaddr_in addr = uv_ip4_addr("0.0.0.0", 1234);
- ...
- uv_tcp_bind(&server, addr)
-
-libuv 1.0
-
-::
-
- struct sockaddr_in addr;
- uv_ip4_addr("0.0.0.0", 1234, &addr)
- ...
- uv_tcp_bind(&server, (const struct sockaddr*) &addr, 0);
-
-The IPv4 and IPv6 struct creating functions (:c:func:`uv_ip4_addr` and :c:func:`uv_ip6_addr`)
-have also changed, make sure you check the documentation.
-
-..note::
- This change applies to all functions that made a distinction between IPv4 and IPv6
- addresses.
-
-
-Streams / UDP data receive callback API change
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-The streams and UDP data receive callbacks now get a pointer to a :c:type:`uv_buf_t` buffer,
-not a structure by value.
-
-libuv 0.10
-
-::
-
- void on_read(uv_stream_t* handle,
- ssize_t nread,
- uv_buf_t buf) {
- ...
- }
-
- void recv_cb(uv_udp_t* handle,
- ssize_t nread,
- uv_buf_t buf,
- struct sockaddr* addr,
- unsigned flags) {
- ...
- }
-
-libuv 1.0
-
-::
-
- void on_read(uv_stream_t* handle,
- ssize_t nread,
- const uv_buf_t* buf) {
- ...
- }
-
- void recv_cb(uv_udp_t* handle,
- ssize_t nread,
- const uv_buf_t* buf,
- const struct sockaddr* addr,
- unsigned flags) {
- ...
- }
-
-
-Receiving handles over pipes API change
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-In libuv 0.10 (and earlier versions) the `uv_read2_start` function was used to start reading
-data on a pipe, which could also result in the reception of handles over it. The callback
-for such function looked like this:
-
-::
-
- void on_read(uv_pipe_t* pipe,
- ssize_t nread,
- uv_buf_t buf,
- uv_handle_type pending) {
- ...
- }
-
-In libuv 1.0, `uv_read2_start` was removed, and the user needs to check if there are pending
-handles using :c:func:`uv_pipe_pending_count` and :c:func:`uv_pipe_pending_type` while in
-the read callback:
-
-::
-
- void on_read(uv_stream_t* handle,
- ssize_t nread,
- const uv_buf_t* buf) {
- ...
- while (uv_pipe_pending_count((uv_pipe_t*) handle) != 0) {
- pending = uv_pipe_pending_type((uv_pipe_t*) handle);
- ...
- }
- ...
- }
-
-
-Extracting the file descriptor out of a handle
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-While it wasn't supported by the API, users often accessed the libuv internals in
-order to get access to the file descriptor of a TCP handle, for example.
-
-::
-
- fd = handle->io_watcher.fd;
-
-This is now properly exposed through the :c:func:`uv_fileno` function.
-
-
-uv_fs_readdir rename and API change
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-`uv_fs_readdir` returned a list of strings in the `req->ptr` field upon completion in
-libuv 0.10. In 1.0, this function got renamed to :c:func:`uv_fs_scandir`, since it's
-actually implemented using ``scandir(3)``.
-
-In addition, instead of allocating a full list strings, the user is able to get one
-result at a time by using the :c:func:`uv_fs_scandir_next` function. This function
-does not need to make a roundtrip to the threadpool, because libuv will keep the
-list of *dents* returned by ``scandir(3)`` around.
diff --git a/3rdparty/libuv/docs/src/misc.rst b/3rdparty/libuv/docs/src/misc.rst
deleted file mode 100644
index 2ce0887db0c..00000000000
--- a/3rdparty/libuv/docs/src/misc.rst
+++ /dev/null
@@ -1,328 +0,0 @@
-
-.. _misc:
-
-Miscellaneous utilities
-=======================
-
-This section contains miscellaneous functions that don't really belong in any
-other section.
-
-
-Data types
-----------
-
-.. c:type:: uv_buf_t
-
- Buffer data type.
-
- .. c:member:: char* uv_buf_t.base
-
- Pointer to the base of the buffer. Readonly.
-
- .. c:member:: size_t uv_buf_t.len
-
- Total bytes in the buffer. Readonly.
-
- .. note::
- On Windows this field is ULONG.
-
-.. c:type:: void* (*uv_malloc_func)(size_t size)
-
- Replacement function for :man:`malloc(3)`.
- See :c:func:`uv_replace_allocator`.
-
-.. c:type:: void* (*uv_realloc_func)(void* ptr, size_t size)
-
- Replacement function for :man:`realloc(3)`.
- See :c:func:`uv_replace_allocator`.
-
-.. c:type:: void* (*uv_calloc_func)(size_t count, size_t size)
-
- Replacement function for :man:`calloc(3)`.
- See :c:func:`uv_replace_allocator`.
-
-.. c:type:: void (*uv_free_func)(void* ptr)
-
- Replacement function for :man:`free(3)`.
- See :c:func:`uv_replace_allocator`.
-
-.. c:type:: uv_file
-
- Cross platform representation of a file handle.
-
-.. c:type:: uv_os_sock_t
-
- Cross platform representation of a socket handle.
-
-.. c:type:: uv_os_fd_t
-
- Abstract representation of a file descriptor. On Unix systems this is a
- `typedef` of `int` and on Windows a `HANDLE`.
-
-.. c:type:: uv_rusage_t
-
- Data type for resource usage results.
-
- ::
-
- typedef struct {
- uv_timeval_t ru_utime; /* user CPU time used */
- uv_timeval_t ru_stime; /* system CPU time used */
- uint64_t ru_maxrss; /* maximum resident set size */
- uint64_t ru_ixrss; /* integral shared memory size */
- uint64_t ru_idrss; /* integral unshared data size */
- uint64_t ru_isrss; /* integral unshared stack size */
- uint64_t ru_minflt; /* page reclaims (soft page faults) */
- uint64_t ru_majflt; /* page faults (hard page faults) */
- uint64_t ru_nswap; /* swaps */
- uint64_t ru_inblock; /* block input operations */
- uint64_t ru_oublock; /* block output operations */
- uint64_t ru_msgsnd; /* IPC messages sent */
- uint64_t ru_msgrcv; /* IPC messages received */
- uint64_t ru_nsignals; /* signals received */
- uint64_t ru_nvcsw; /* voluntary context switches */
- uint64_t ru_nivcsw; /* involuntary context switches */
- } uv_rusage_t;
-
-.. c:type:: uv_cpu_info_t
-
- Data type for CPU information.
-
- ::
-
- typedef struct uv_cpu_info_s {
- char* model;
- int speed;
- struct uv_cpu_times_s {
- uint64_t user;
- uint64_t nice;
- uint64_t sys;
- uint64_t idle;
- uint64_t irq;
- } cpu_times;
- } uv_cpu_info_t;
-
-.. c:type:: uv_interface_address_t
-
- Data type for interface addresses.
-
- ::
-
- typedef struct uv_interface_address_s {
- char* name;
- char phys_addr[6];
- int is_internal;
- union {
- struct sockaddr_in address4;
- struct sockaddr_in6 address6;
- } address;
- union {
- struct sockaddr_in netmask4;
- struct sockaddr_in6 netmask6;
- } netmask;
- } uv_interface_address_t;
-
-
-API
----
-
-.. c:function:: uv_handle_type uv_guess_handle(uv_file file)
-
- Used to detect what type of stream should be used with a given file
- descriptor. Usually this will be used during initialization to guess the
- type of the stdio streams.
-
- For :man:`isatty(3)` equivalent functionality use this function and test
- for ``UV_TTY``.
-
-.. c:function:: int uv_replace_allocator(uv_malloc_func malloc_func, uv_realloc_func realloc_func, uv_calloc_func calloc_func, uv_free_func free_func)
-
- .. versionadded:: 1.6.0
-
- Override the use of the standard library's :man:`malloc(3)`,
- :man:`calloc(3)`, :man:`realloc(3)`, :man:`free(3)`, memory allocation
- functions.
-
- This function must be called before any other libuv function is called or
- after all resources have been freed and thus libuv doesn't reference
- any allocated memory chunk.
-
- On success, it returns 0, if any of the function pointers is NULL it
- returns UV_EINVAL.
-
- .. warning:: There is no protection against changing the allocator multiple
- times. If the user changes it they are responsible for making
- sure the allocator is changed while no memory was allocated with
- the previous allocator, or that they are compatible.
-
-.. c:function:: uv_buf_t uv_buf_init(char* base, unsigned int len)
-
- Constructor for :c:type:`uv_buf_t`.
-
- Due to platform differences the user cannot rely on the ordering of the
- `base` and `len` members of the uv_buf_t struct. The user is responsible for
- freeing `base` after the uv_buf_t is done. Return struct passed by value.
-
-.. c:function:: char** uv_setup_args(int argc, char** argv)
-
- Store the program arguments. Required for getting / setting the process title.
-
-.. c:function:: int uv_get_process_title(char* buffer, size_t size)
-
- Gets the title of the current process.
-
-.. c:function:: int uv_set_process_title(const char* title)
-
- Sets the current process title.
-
-.. c:function:: int uv_resident_set_memory(size_t* rss)
-
- Gets the resident set size (RSS) for the current process.
-
-.. c:function:: int uv_uptime(double* uptime)
-
- Gets the current system uptime.
-
-.. c:function:: int uv_getrusage(uv_rusage_t* rusage)
-
- Gets the resource usage measures for the current process.
-
- .. note::
- On Windows not all fields are set, the unsupported fields are filled with zeroes.
-
-.. c:function:: int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count)
-
- Gets information about the CPUs on the system. The `cpu_infos` array will
- have `count` elements and needs to be freed with :c:func:`uv_free_cpu_info`.
-
-.. c:function:: void uv_free_cpu_info(uv_cpu_info_t* cpu_infos, int count)
-
- Frees the `cpu_infos` array previously allocated with :c:func:`uv_cpu_info`.
-
-.. c:function:: int uv_interface_addresses(uv_interface_address_t** addresses, int* count)
-
- Gets address information about the network interfaces on the system. An
- array of `count` elements is allocated and returned in `addresses`. It must
- be freed by the user, calling :c:func:`uv_free_interface_addresses`.
-
-.. c:function:: void uv_free_interface_addresses(uv_interface_address_t* addresses, int count)
-
- Free an array of :c:type:`uv_interface_address_t` which was returned by
- :c:func:`uv_interface_addresses`.
-
-.. c:function:: void uv_loadavg(double avg[3])
-
- Gets the load average. See: `<http://en.wikipedia.org/wiki/Load_(computing)>`_
-
- .. note::
- Returns [0,0,0] on Windows (i.e., it's not implemented).
-
-.. c:function:: int uv_ip4_addr(const char* ip, int port, struct sockaddr_in* addr)
-
- Convert a string containing an IPv4 addresses to a binary structure.
-
-.. c:function:: int uv_ip6_addr(const char* ip, int port, struct sockaddr_in6* addr)
-
- Convert a string containing an IPv6 addresses to a binary structure.
-
-.. c:function:: int uv_ip4_name(const struct sockaddr_in* src, char* dst, size_t size)
-
- Convert a binary structure containing an IPv4 address to a string.
-
-.. c:function:: int uv_ip6_name(const struct sockaddr_in6* src, char* dst, size_t size)
-
- Convert a binary structure containing an IPv6 address to a string.
-
-.. c:function:: int uv_inet_ntop(int af, const void* src, char* dst, size_t size)
-.. c:function:: int uv_inet_pton(int af, const char* src, void* dst)
-
- Cross-platform IPv6-capable implementation of :man:`inet_ntop(3)`
- and :man:`inet_pton(3)`. On success they return 0. In case of error
- the target `dst` pointer is unmodified.
-
-.. c:function:: int uv_exepath(char* buffer, size_t* size)
-
- Gets the executable path.
-
-.. c:function:: int uv_cwd(char* buffer, size_t* size)
-
- Gets the current working directory.
-
- .. versionchanged:: 1.1.0
-
- On Unix the path no longer ends in a slash.
-
-.. c:function:: int uv_chdir(const char* dir)
-
- Changes the current working directory.
-
-.. c:function:: int uv_os_homedir(char* buffer, size_t* size)
-
- Gets the current user's home directory. On Windows, `uv_os_homedir()` first
- checks the `USERPROFILE` environment variable using
- `GetEnvironmentVariableW()`. If `USERPROFILE` is not set,
- `GetUserProfileDirectoryW()` is called. On all other operating systems,
- `uv_os_homedir()` first checks the `HOME` environment variable using
- :man:`getenv(3)`. If `HOME` is not set, :man:`getpwuid_r(3)` is called. The
- user's home directory is stored in `buffer`. When `uv_os_homedir()` is
- called, `size` indicates the maximum size of `buffer`. On success or
- `UV_ENOBUFS` failure, `size` is set to the string length of `buffer`.
-
- .. warning::
- `uv_os_homedir()` is not thread safe.
-
- .. versionadded:: 1.6.0
-
-.. uint64_t uv_get_free_memory(void)
-.. c:function:: uint64_t uv_get_total_memory(void)
-
- Gets memory information (in bytes).
-
-.. c:function:: uint64_t uv_hrtime(void)
-
- Returns the current high-resolution real time. This is expressed in
- nanoseconds. It is relative to an arbitrary time in the past. It is not
- related to the time of day and therefore not subject to clock drift. The
- primary use is for measuring performance between intervals.
-
- .. note::
- Not every platform can support nanosecond resolution; however, this value will always
- be in nanoseconds.
-
-.. c:function:: void uv_print_all_handles(uv_loop_t* loop, FILE* stream)
-
- Prints all handles associated with the given `loop` to the given `stream`.
-
- Example:
-
- ::
-
- uv_print_all_handles(uv_default_loop(), stderr);
- /*
- [--I] signal 0x1a25ea8
- [-AI] async 0x1a25cf0
- [R--] idle 0x1a7a8c8
- */
-
- The format is `[flags] handle-type handle-address`. For `flags`:
-
- - `R` is printed for a handle that is referenced
- - `A` is printed for a handle that is active
- - `I` is printed for a handle that is internal
-
- .. warning::
- This function is meant for ad hoc debugging, there is no API/ABI
- stability guarantees.
-
- .. versionadded:: 1.8.0
-
-.. c:function:: void uv_print_active_handles(uv_loop_t* loop, FILE* stream)
-
- This is the same as :c:func:`uv_print_all_handles` except only active handles
- are printed.
-
- .. warning::
- This function is meant for ad hoc debugging, there is no API/ABI
- stability guarantees.
-
- .. versionadded:: 1.8.0
diff --git a/3rdparty/libuv/docs/src/pipe.rst b/3rdparty/libuv/docs/src/pipe.rst
deleted file mode 100644
index d33b0f2b977..00000000000
--- a/3rdparty/libuv/docs/src/pipe.rst
+++ /dev/null
@@ -1,104 +0,0 @@
-
-.. _pipe:
-
-:c:type:`uv_pipe_t` --- Pipe handle
-===================================
-
-Pipe handles provide an abstraction over local domain sockets on Unix and named
-pipes on Windows.
-
-:c:type:`uv_pipe_t` is a 'subclass' of :c:type:`uv_stream_t`.
-
-
-Data types
-----------
-
-.. c:type:: uv_pipe_t
-
- Pipe handle type.
-
-
-Public members
-^^^^^^^^^^^^^^
-
-N/A
-
-.. seealso:: The :c:type:`uv_stream_t` members also apply.
-
-
-API
----
-
-.. c:function:: int uv_pipe_init(uv_loop_t* loop, uv_pipe_t* handle, int ipc)
-
- Initialize a pipe handle. The `ipc` argument is a boolean to indicate if
- this pipe will be used for handle passing between processes.
-
-.. c:function:: int uv_pipe_open(uv_pipe_t* handle, uv_file file)
-
- Open an existing file descriptor or HANDLE as a pipe.
-
- .. versionchanged:: 1.2.1 the file descriptor is set to non-blocking mode.
-
- .. note::
- The passed file descriptor or HANDLE is not checked for its type, but
- it's required that it represents a valid pipe.
-
-.. c:function:: int uv_pipe_bind(uv_pipe_t* handle, const char* 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.
-
-.. c:function:: void uv_pipe_connect(uv_connect_t* req, uv_pipe_t* handle, const char* name, uv_connect_cb cb)
-
- 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.
-
-.. c:function:: int uv_pipe_getsockname(const uv_pipe_t* handle, char* buffer, size_t* size)
-
- Get the name of the Unix domain socket or the named pipe.
-
- A preallocated buffer must be provided. The size parameter holds the length
- of the buffer and it's set to the number of bytes written to the buffer on
- output. If the buffer is not big enough ``UV_ENOBUFS`` will be returned and
- len will contain the required size.
-
- .. versionchanged:: 1.3.0 the returned length no longer includes the terminating null byte,
- and the buffer is not null terminated.
-
-.. c:function:: int uv_pipe_getpeername(const uv_pipe_t* handle, char* buffer, size_t* size)
-
- Get the name of the Unix domain socket or the named pipe to which the handle
- is connected.
-
- A preallocated buffer must be provided. The size parameter holds the length
- of the buffer and it's set to the number of bytes written to the buffer on
- output. If the buffer is not big enough ``UV_ENOBUFS`` will be returned and
- len will contain the required size.
-
- .. versionadded:: 1.3.0
-
-.. c:function:: void uv_pipe_pending_instances(uv_pipe_t* handle, int count)
-
- Set the number of pending pipe instance handles when the pipe server is
- waiting for connections.
-
- .. note::
- This setting applies to Windows only.
-
-.. c:function:: int uv_pipe_pending_count(uv_pipe_t* handle)
-.. c:function:: uv_handle_type uv_pipe_pending_type(uv_pipe_t* handle)
-
- Used to receive handles over IPC pipes.
-
- First - call :c:func:`uv_pipe_pending_count`, if it's > 0 then initialize
- a handle of the given `type`, returned by :c:func:`uv_pipe_pending_type`
- and call ``uv_accept(pipe, handle)``.
-
-.. seealso:: The :c:type:`uv_stream_t` API functions also apply.
diff --git a/3rdparty/libuv/docs/src/poll.rst b/3rdparty/libuv/docs/src/poll.rst
deleted file mode 100644
index 6dc41839ac1..00000000000
--- a/3rdparty/libuv/docs/src/poll.rst
+++ /dev/null
@@ -1,103 +0,0 @@
-
-.. _poll:
-
-:c:type:`uv_poll_t` --- Poll handle
-===================================
-
-Poll handles are used to watch file descriptors for readability and
-writability, similar to the purpose of :man:`poll(2)`.
-
-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;
-:c:type:`uv_tcp_t`, :c:type:`uv_udp_t`, etc. provide an implementation that is faster and
-more scalable than what can be achieved with :c:type:`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 :c:func:`uv_poll_stop` or :c:func:`uv_close`.
-
-.. note::
- On windows only sockets can be polled with poll handles. On Unix any file
- descriptor that would be accepted by :man:`poll(2)` can be used.
-
-
-Data types
-----------
-
-.. c:type:: uv_poll_t
-
- Poll handle type.
-
-.. c:type:: void (*uv_poll_cb)(uv_poll_t* handle, int status, int events)
-
- Type definition for callback passed to :c:func:`uv_poll_start`.
-
-.. c:type:: uv_poll_event
-
- Poll event types
-
- ::
-
- enum uv_poll_event {
- UV_READABLE = 1,
- UV_WRITABLE = 2
- };
-
-
-Public members
-^^^^^^^^^^^^^^
-
-N/A
-
-.. seealso:: The :c:type:`uv_handle_t` members also apply.
-
-
-API
----
-
-.. c:function:: int uv_poll_init(uv_loop_t* loop, uv_poll_t* handle, int fd)
-
- Initialize the handle using a file descriptor.
-
- .. versionchanged:: 1.2.2 the file descriptor is set to non-blocking mode.
-
-.. c:function:: int uv_poll_init_socket(uv_loop_t* loop, uv_poll_t* handle, uv_os_sock_t socket)
-
- Initialize the handle using a socket descriptor. On Unix this is identical
- to :c:func:`uv_poll_init`. On windows it takes a SOCKET handle.
-
- .. versionchanged:: 1.2.2 the socket is set to non-blocking mode.
-
-.. c:function:: int uv_poll_start(uv_poll_t* handle, int events, uv_poll_cb cb)
-
- Starts polling the file descriptor. `events` is a bitmask consisting made up
- of UV_READABLE and UV_WRITABLE. As soon as an event is detected the callback
- will be called with `status` set to 0, and the detected events set on the
- `events` field.
-
- If an error happens while polling, `status` will be < 0 and corresponds
- with one of the UV_E* error codes (see :ref:`errors`). The user should
- not close the socket while the handle is active. If the user does that
- anyway, the callback *may* be called reporting an error status, but this
- is **not** guaranteed.
-
- .. note::
- Calling :c:func:`uv_poll_start` on a handle that is already active is fine. Doing so
- will update the events mask that is being watched for.
-
-.. c:function:: int uv_poll_stop(uv_poll_t* poll)
-
- Stop polling the file descriptor, the callback will no longer be called.
-
-.. seealso:: The :c:type:`uv_handle_t` API functions also apply.
diff --git a/3rdparty/libuv/docs/src/prepare.rst b/3rdparty/libuv/docs/src/prepare.rst
deleted file mode 100644
index aca58155809..00000000000
--- a/3rdparty/libuv/docs/src/prepare.rst
+++ /dev/null
@@ -1,46 +0,0 @@
-
-.. _prepare:
-
-:c:type:`uv_prepare_t` --- Prepare handle
-=========================================
-
-Prepare handles will run the given callback once per loop iteration, right
-before polling for i/o.
-
-
-Data types
-----------
-
-.. c:type:: uv_prepare_t
-
- Prepare handle type.
-
-.. c:type:: void (*uv_prepare_cb)(uv_prepare_t* handle)
-
- Type definition for callback passed to :c:func:`uv_prepare_start`.
-
-
-Public members
-^^^^^^^^^^^^^^
-
-N/A
-
-.. seealso:: The :c:type:`uv_handle_t` members also apply.
-
-
-API
----
-
-.. c:function:: int uv_prepare_init(uv_loop_t* loop, uv_prepare_t* prepare)
-
- Initialize the handle.
-
-.. c:function:: int uv_prepare_start(uv_prepare_t* prepare, uv_prepare_cb cb)
-
- Start the handle with the given callback.
-
-.. c:function:: int uv_prepare_stop(uv_prepare_t* prepare)
-
- Stop the handle, the callback will no longer be called.
-
-.. seealso:: The :c:type:`uv_handle_t` API functions also apply.
diff --git a/3rdparty/libuv/docs/src/process.rst b/3rdparty/libuv/docs/src/process.rst
deleted file mode 100644
index b0380ddfb72..00000000000
--- a/3rdparty/libuv/docs/src/process.rst
+++ /dev/null
@@ -1,225 +0,0 @@
-
-.. _process:
-
-:c:type:`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.
-
-
-Data types
-----------
-
-.. c:type:: uv_process_t
-
- Process handle type.
-
-.. c:type:: uv_process_options_t
-
- Options for spawning the process (passed to :c:func:`uv_spawn`.
-
- ::
-
- typedef struct uv_process_options_s {
- uv_exit_cb exit_cb;
- const char* file;
- char** args;
- char** env;
- const char* cwd;
- unsigned int flags;
- int stdio_count;
- uv_stdio_container_t* stdio;
- uv_uid_t uid;
- uv_gid_t gid;
- } uv_process_options_t;
-
-.. c:type:: void (*uv_exit_cb)(uv_process_t*, int64_t exit_status, int term_signal)
-
- Type definition for callback passed in :c:type:`uv_process_options_t` which
- will indicate the exit status and the signal that caused the process to
- terminate, if any.
-
-.. c:type:: uv_process_flags
-
- Flags to be set on the flags field of :c:type:`uv_process_options_t`.
-
- ::
-
- enum uv_process_flags {
- /*
- * Set the child process' user id.
- */
- UV_PROCESS_SETUID = (1 << 0),
- /*
- * Set the child process' group id.
- */
- UV_PROCESS_SETGID = (1 << 1),
- /*
- * 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.
- */
- UV_PROCESS_WINDOWS_VERBATIM_ARGUMENTS = (1 << 2),
- /*
- * 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.
- */
- UV_PROCESS_DETACHED = (1 << 3),
- /*
- * Hide the subprocess console window that would normally be created. This
- * option is only meaningful on Windows systems. On Unix it is silently
- * ignored.
- */
- UV_PROCESS_WINDOWS_HIDE = (1 << 4)
- };
-
-.. c:type:: uv_stdio_container_t
-
- Container for each stdio handle or fd passed to a child process.
-
- ::
-
- typedef struct uv_stdio_container_s {
- uv_stdio_flags flags;
- union {
- uv_stream_t* stream;
- int fd;
- } data;
- } uv_stdio_container_t;
-
-.. c:type:: uv_stdio_flags
-
- Flags specifying how a stdio should be transmitted to the child process.
-
- ::
-
- typedef enum {
- UV_IGNORE = 0x00,
- UV_CREATE_PIPE = 0x01,
- UV_INHERIT_FD = 0x02,
- UV_INHERIT_STREAM = 0x04,
- /*
- * When UV_CREATE_PIPE is specified, UV_READABLE_PIPE and UV_WRITABLE_PIPE
- * determine the direction of flow, from the child process' perspective. Both
- * flags may be specified to create a duplex data stream.
- */
- UV_READABLE_PIPE = 0x10,
- UV_WRITABLE_PIPE = 0x20
- } uv_stdio_flags;
-
-
-Public members
-^^^^^^^^^^^^^^
-
-.. c:member:: uv_process_t.pid
-
- The PID of the spawned process. It's set after calling :c:func:`uv_spawn`.
-
-.. note::
- The :c:type:`uv_handle_t` members also apply.
-
-.. c:member:: uv_process_options_t.exit_cb
-
- Callback called after the process exits.
-
-.. c:member:: uv_process_options_t.file
-
- Path pointing to the program to be executed.
-
-.. c:member:: uv_process_options_t.args
-
- Command line arguments. args[0] 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 the
- ``UV_PROCESS_WINDOWS_VERBATIM_ARGUMENTS`` flag on :c:type:`uv_process_flags`.
-
-.. c:member:: uv_process_options_t.env
-
- Environment for the new process. If NULL the parents environment is used.
-
-.. c:member:: uv_process_options_t.cwd
-
- Current working directory for the subprocess.
-
-.. c:member:: uv_process_options_t.flags
-
- Various flags that control how :c:func:`uv_spawn` behaves. See
- :c:type:`uv_process_flags`.
-
-.. c:member:: uv_process_options_t.stdio_count
-.. c:member:: uv_process_options_t.stdio
-
- The `stdio` field points to an array of :c:type:`uv_stdio_container_t`
- structs that describe the file descriptors that will be made available to
- the child process. The convention is that stdio[0] points to stdin,
- fd 1 is used for stdout, and fd 2 is stderr.
-
- .. note::
- On Windows file descriptors greater than 2 are available to the child process only if
- the child processes uses the MSVCRT runtime.
-
-.. c:member:: uv_process_options_t.uid
-.. c:member:: uv_process_options_t.gid
-
- Libuv can change the child process' user/group id. This happens only when
- the appropriate bits are set in the flags fields.
-
- .. note::
- This is not supported on Windows, :c:func:`uv_spawn` will fail and set the error
- to ``UV_ENOTSUP``.
-
-.. c:member:: uv_stdio_container_t.flags
-
- Flags specifying how the stdio container should be passed to the child. See
- :c:type:`uv_stdio_flags`.
-
-.. c:member:: uv_stdio_container_t.data
-
- Union containing either the stream or fd to be passed on to the child
- process.
-
-
-API
----
-
-.. c:function:: void uv_disable_stdio_inheritance(void)
-
- 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.
-
-.. c:function:: int uv_spawn(uv_loop_t* loop, uv_process_t* handle, const uv_process_options_t* options)
-
- Initializes the process handle and starts the process. If the process is
- successfully spawned, this function will return 0. Otherwise, the
- negative error code corresponding to the reason it couldn't spawn is
- returned.
-
- 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.
-
-.. c:function:: int uv_process_kill(uv_process_t* handle, int signum)
-
- Sends the specified signal to the given process handle. Check the documentation
- on :c:ref:`signal` for signal support, specially on Windows.
-
-.. c:function:: int uv_kill(int pid, int signum)
-
- Sends the specified signal to the given PID. Check the documentation
- on :c:ref:`signal` for signal support, specially on Windows.
-
-.. seealso:: The :c:type:`uv_handle_t` API functions also apply.
diff --git a/3rdparty/libuv/docs/src/request.rst b/3rdparty/libuv/docs/src/request.rst
deleted file mode 100644
index 660b80ae957..00000000000
--- a/3rdparty/libuv/docs/src/request.rst
+++ /dev/null
@@ -1,82 +0,0 @@
-
-.. _request:
-
-:c:type:`uv_req_t` --- Base request
-===================================
-
-`uv_req_t` is the base type for all libuv request types.
-
-Structures are aligned so that any libuv request can be cast to `uv_req_t`.
-All API functions defined here work with any request type.
-
-
-Data types
-----------
-
-.. c:type:: uv_req_t
-
- The base libuv request structure.
-
-.. c:type:: uv_any_req
-
- Union of all request types.
-
-
-Public members
-^^^^^^^^^^^^^^
-
-.. c:member:: void* uv_req_t.data
-
- Space for user-defined arbitrary data. libuv does not use this field.
-
-.. c:member:: uv_req_type uv_req_t.type
-
- Indicated the type of request. Readonly.
-
- ::
-
- typedef enum {
- UV_UNKNOWN_REQ = 0,
- UV_REQ,
- UV_CONNECT,
- UV_WRITE,
- UV_SHUTDOWN,
- UV_UDP_SEND,
- UV_FS,
- UV_WORK,
- UV_GETADDRINFO,
- UV_GETNAMEINFO,
- UV_REQ_TYPE_PRIVATE,
- UV_REQ_TYPE_MAX,
- } uv_req_type;
-
-
-API
----
-
-.. c:function:: int uv_cancel(uv_req_t* req)
-
- Cancel a pending request. Fails if the request is executing or has finished
- executing.
-
- Returns 0 on success, or an error code < 0 on failure.
-
- Only cancellation of :c:type:`uv_fs_t`, :c:type:`uv_getaddrinfo_t`,
- :c:type:`uv_getnameinfo_t` and :c:type:`uv_work_t` requests is
- currently supported.
-
- Cancelled requests have their callbacks invoked some time in the future.
- It's **not** safe to free the memory associated with the request until the
- callback is called.
-
- Here is how cancellation is reported to the callback:
-
- * A :c:type:`uv_fs_t` request has its req->result field set to `UV_ECANCELED`.
-
- * A :c:type:`uv_work_t`, :c:type:`uv_getaddrinfo_t` or c:type:`uv_getnameinfo_t`
- request has its callback invoked with status == `UV_ECANCELED`.
-
-.. c:function:: size_t uv_req_size(uv_req_type type)
-
- Returns the size of the given request type. Useful for FFI binding writers
- who don't want to know the structure layout.
diff --git a/3rdparty/libuv/docs/src/signal.rst b/3rdparty/libuv/docs/src/signal.rst
deleted file mode 100644
index dc1223b90ac..00000000000
--- a/3rdparty/libuv/docs/src/signal.rst
+++ /dev/null
@@ -1,77 +0,0 @@
-
-.. _signal:
-
-:c:type:`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 :c:type:`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 :c:type:`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.
-
-
-Data types
-----------
-
-.. c:type:: uv_signal_t
-
- Signal handle type.
-
-.. c:type:: void (*uv_signal_cb)(uv_signal_t* handle, int signum)
-
- Type definition for callback passed to :c:func:`uv_signal_start`.
-
-
-Public members
-^^^^^^^^^^^^^^
-
-.. c:member:: int uv_signal_t.signum
-
- Signal being monitored by this handle. Readonly.
-
-.. seealso:: The :c:type:`uv_handle_t` members also apply.
-
-
-API
----
-
-.. c:function:: int uv_signal_init(uv_loop_t* loop, uv_signal_t* signal)
-
- Initialize the handle.
-
-.. c:function:: int uv_signal_start(uv_signal_t* signal, uv_signal_cb cb, int signum)
-
- Start the handle with the given callback, watching for the given signal.
-
-.. c:function:: int uv_signal_stop(uv_signal_t* signal)
-
- Stop the handle, the callback will no longer be called.
-
-.. seealso:: The :c:type:`uv_handle_t` API functions also apply.
diff --git a/3rdparty/libuv/docs/src/sphinx-plugins/manpage.py b/3rdparty/libuv/docs/src/sphinx-plugins/manpage.py
deleted file mode 100644
index 1d1dc379f41..00000000000
--- a/3rdparty/libuv/docs/src/sphinx-plugins/manpage.py
+++ /dev/null
@@ -1,46 +0,0 @@
-# encoding: utf-8
-
-#
-# Copyright (c) 2013 Dariusz Dwornikowski. All rights reserved.
-#
-# Adapted from https://github.com/tdi/sphinxcontrib-manpage
-# License: Apache 2
-#
-
-
-import re
-
-from docutils import nodes, utils
-from docutils.parsers.rst.roles import set_classes
-from string import Template
-
-
-def make_link_node(rawtext, app, name, manpage_num, options):
- ref = app.config.man_url_regex
- if not ref:
- ref = "http://linux.die.net/man/%s/%s" % (manpage_num, name)
- else:
- s = Template(ref)
- ref = s.substitute(num=manpage_num, topic=name)
- set_classes(options)
- node = nodes.reference(rawtext, "%s(%s)" % (name, manpage_num), refuri=ref, **options)
- return node
-
-
-def man_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
- app = inliner.document.settings.env.app
- p = re.compile("([a-zA-Z0-9_\.-_]+)\((\d)\)")
- m = p.match(text)
-
- manpage_num = m.group(2)
- name = m.group(1)
- node = make_link_node(rawtext, app, name, manpage_num, options)
- return [node], []
-
-
-def setup(app):
- app.info('Initializing manpage plugin')
- app.add_role('man', man_role)
- app.add_config_value('man_url_regex', None, 'env')
- return
-
diff --git a/3rdparty/libuv/docs/src/static/architecture.png b/3rdparty/libuv/docs/src/static/architecture.png
deleted file mode 100644
index 81e8749f249..00000000000
--- a/3rdparty/libuv/docs/src/static/architecture.png
+++ /dev/null
Binary files differ
diff --git a/3rdparty/libuv/docs/src/static/diagrams.key/Data/st0-311.jpg b/3rdparty/libuv/docs/src/static/diagrams.key/Data/st0-311.jpg
deleted file mode 100644
index 439f5810936..00000000000
--- a/3rdparty/libuv/docs/src/static/diagrams.key/Data/st0-311.jpg
+++ /dev/null
Binary files differ
diff --git a/3rdparty/libuv/docs/src/static/diagrams.key/Data/st1-475.jpg b/3rdparty/libuv/docs/src/static/diagrams.key/Data/st1-475.jpg
deleted file mode 100644
index ffb21ff2245..00000000000
--- a/3rdparty/libuv/docs/src/static/diagrams.key/Data/st1-475.jpg
+++ /dev/null
Binary files differ
diff --git a/3rdparty/libuv/docs/src/static/diagrams.key/Index.zip b/3rdparty/libuv/docs/src/static/diagrams.key/Index.zip
deleted file mode 100644
index 17aedace14f..00000000000
--- a/3rdparty/libuv/docs/src/static/diagrams.key/Index.zip
+++ /dev/null
Binary files differ
diff --git a/3rdparty/libuv/docs/src/static/diagrams.key/Metadata/BuildVersionHistory.plist b/3rdparty/libuv/docs/src/static/diagrams.key/Metadata/BuildVersionHistory.plist
deleted file mode 100644
index 39dd4fe62fb..00000000000
--- a/3rdparty/libuv/docs/src/static/diagrams.key/Metadata/BuildVersionHistory.plist
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<array>
- <string>Template: White (2014-02-28 09:41)</string>
- <string>M6.2.2-1878-1</string>
-</array>
-</plist>
diff --git a/3rdparty/libuv/docs/src/static/diagrams.key/Metadata/DocumentIdentifier b/3rdparty/libuv/docs/src/static/diagrams.key/Metadata/DocumentIdentifier
deleted file mode 100644
index ddb18f01f99..00000000000
--- a/3rdparty/libuv/docs/src/static/diagrams.key/Metadata/DocumentIdentifier
+++ /dev/null
@@ -1 +0,0 @@
-F69E9CD9-EEF1-4223-9DA4-A1EA7FE112BA \ No newline at end of file
diff --git a/3rdparty/libuv/docs/src/static/diagrams.key/Metadata/Properties.plist b/3rdparty/libuv/docs/src/static/diagrams.key/Metadata/Properties.plist
deleted file mode 100644
index 74bc69317de..00000000000
--- a/3rdparty/libuv/docs/src/static/diagrams.key/Metadata/Properties.plist
+++ /dev/null
Binary files differ
diff --git a/3rdparty/libuv/docs/src/static/diagrams.key/preview-micro.jpg b/3rdparty/libuv/docs/src/static/diagrams.key/preview-micro.jpg
deleted file mode 100644
index dd8decd6303..00000000000
--- a/3rdparty/libuv/docs/src/static/diagrams.key/preview-micro.jpg
+++ /dev/null
Binary files differ
diff --git a/3rdparty/libuv/docs/src/static/diagrams.key/preview-web.jpg b/3rdparty/libuv/docs/src/static/diagrams.key/preview-web.jpg
deleted file mode 100644
index aadd401f1f0..00000000000
--- a/3rdparty/libuv/docs/src/static/diagrams.key/preview-web.jpg
+++ /dev/null
Binary files differ
diff --git a/3rdparty/libuv/docs/src/static/diagrams.key/preview.jpg b/3rdparty/libuv/docs/src/static/diagrams.key/preview.jpg
deleted file mode 100644
index fc80025a4be..00000000000
--- a/3rdparty/libuv/docs/src/static/diagrams.key/preview.jpg
+++ /dev/null
Binary files differ
diff --git a/3rdparty/libuv/docs/src/static/favicon.ico b/3rdparty/libuv/docs/src/static/favicon.ico
deleted file mode 100644
index 2c40694cd28..00000000000
--- a/3rdparty/libuv/docs/src/static/favicon.ico
+++ /dev/null
Binary files differ
diff --git a/3rdparty/libuv/docs/src/static/logo.png b/3rdparty/libuv/docs/src/static/logo.png
deleted file mode 100644
index eaf1eee577b..00000000000
--- a/3rdparty/libuv/docs/src/static/logo.png
+++ /dev/null
Binary files differ
diff --git a/3rdparty/libuv/docs/src/static/loop_iteration.png b/3rdparty/libuv/docs/src/static/loop_iteration.png
deleted file mode 100644
index e769cf338b4..00000000000
--- a/3rdparty/libuv/docs/src/static/loop_iteration.png
+++ /dev/null
Binary files differ
diff --git a/3rdparty/libuv/docs/src/stream.rst b/3rdparty/libuv/docs/src/stream.rst
deleted file mode 100644
index 9f0aacd1643..00000000000
--- a/3rdparty/libuv/docs/src/stream.rst
+++ /dev/null
@@ -1,219 +0,0 @@
-
-.. _stream:
-
-:c:type:`uv_stream_t` --- Stream handle
-=======================================
-
-Stream handles provide an abstraction of a duplex communication channel.
-:c:type:`uv_stream_t` is an abstract type, libuv provides 3 stream implementations
-in the for of :c:type:`uv_tcp_t`, :c:type:`uv_pipe_t` and :c:type:`uv_tty_t`.
-
-
-Data types
-----------
-
-.. c:type:: uv_stream_t
-
- Stream handle type.
-
-.. c:type:: uv_connect_t
-
- Connect request type.
-
-.. c:type:: uv_shutdown_t
-
- Shutdown request type.
-
-.. c:type:: uv_write_t
-
- Write request type.
-
-.. c:type:: void (*uv_read_cb)(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf)
-
- Callback called when data was read on a stream.
-
- `nread` is > 0 if there is data available or < 0 on error. When we've
- reached EOF, `nread` will be set to ``UV_EOF``. When `nread` < 0,
- the `buf` parameter might not point to a valid buffer; in that case
- `buf.len` and `buf.base` are both set to 0.
-
- .. note::
- `nread` might be 0, which does *not* indicate an error or EOF. This
- is equivalent to ``EAGAIN`` or ``EWOULDBLOCK`` under ``read(2)``.
-
- The callee is responsible for stopping closing the stream when an error happens
- by calling :c:func:`uv_read_stop` or :c:func:`uv_close`. Trying to read
- from the stream again is undefined.
-
- The callee is responsible for freeing the buffer, libuv does not reuse it.
- The buffer may be a null buffer (where buf->base=NULL and buf->len=0) on
- error.
-
-.. c:type:: void (*uv_write_cb)(uv_write_t* req, int status)
-
- Callback called after data was written on a stream. `status` will be 0 in
- case of success, < 0 otherwise.
-
-.. c:type:: void (*uv_connect_cb)(uv_connect_t* req, int status)
-
- Callback called after a connection started by :c:func:`uv_connect` is done.
- `status` will be 0 in case of success, < 0 otherwise.
-
-.. c:type:: void (*uv_shutdown_cb)(uv_shutdown_t* req, int status)
-
- Callback called after s shutdown request has been completed. `status` will
- be 0 in case of success, < 0 otherwise.
-
-.. c:type:: void (*uv_connection_cb)(uv_stream_t* server, int status)
-
- Callback called when a stream server has received an incoming connection.
- The user can accept the connection by calling :c:func:`uv_accept`.
- `status` will be 0 in case of success, < 0 otherwise.
-
-
-Public members
-^^^^^^^^^^^^^^
-
-.. c:member:: size_t uv_stream_t.write_queue_size
-
- Contains the amount of queued bytes waiting to be sent. Readonly.
-
-.. c:member:: uv_stream_t* uv_connect_t.handle
-
- Pointer to the stream where this connection request is running.
-
-.. c:member:: uv_stream_t* uv_shutdown_t.handle
-
- Pointer to the stream where this shutdown request is running.
-
-.. c:member:: uv_stream_t* uv_write_t.handle
-
- Pointer to the stream where this write request is running.
-
-.. c:member:: uv_stream_t* uv_write_t.send_handle
-
- Pointer to the stream being sent using this write request..
-
-.. seealso:: The :c:type:`uv_handle_t` members also apply.
-
-
-API
----
-
-.. c:function:: int uv_shutdown(uv_shutdown_t* req, uv_stream_t* handle, uv_shutdown_cb cb)
-
- Shutdown the outgoing (write) side of a duplex stream. It waits for pending
- write requests to complete. The `handle` should refer to a initialized stream.
- `req` should be an uninitialized shutdown request struct. The `cb` is called
- after shutdown is complete.
-
-.. c:function:: int uv_listen(uv_stream_t* stream, int backlog, uv_connection_cb cb)
-
- Start listening for incoming connections. `backlog` indicates the number of
- connections the kernel might queue, same as :man:`listen(2)`. When a new
- incoming connection is received the :c:type:`uv_connection_cb` callback is
- called.
-
-.. c:function:: int uv_accept(uv_stream_t* server, uv_stream_t* client)
-
- This call is used in conjunction with :c:func:`uv_listen` to accept incoming
- connections. Call this function after receiving a :c:type:`uv_connection_cb`
- to accept the connection. Before calling this function the client handle must
- be initialized. < 0 return value indicates an error.
-
- When the :c:type:`uv_connection_cb` 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 :c:type:`uv_connection_cb` call.
-
- .. note::
- `server` and `client` must be handles running on the same loop.
-
-.. c:function:: int uv_read_start(uv_stream_t* stream, uv_alloc_cb alloc_cb, uv_read_cb read_cb)
-
- Read data from an incoming stream. The :c:type:`uv_read_cb` callback will
- be made several times until there is no more data to read or
- :c:func:`uv_read_stop` is called.
-
-.. c:function:: int uv_read_stop(uv_stream_t*)
-
- Stop reading data from the stream. The :c:type:`uv_read_cb` callback will
- no longer be called.
-
- This function is idempotent and may be safely called on a stopped stream.
-
-.. c:function:: int uv_write(uv_write_t* req, uv_stream_t* handle, const uv_buf_t bufs[], unsigned int nbufs, uv_write_cb cb)
-
- Write data to stream. Buffers are written in order. Example:
-
- ::
-
- uv_buf_t a[] = {
- { .base = "1", .len = 1 },
- { .base = "2", .len = 1 }
- };
-
- uv_buf_t b[] = {
- { .base = "3", .len = 1 },
- { .base = "4", .len = 1 }
- };
-
- uv_write_t req1;
- uv_write_t req2;
-
- /* writes "1234" */
- uv_write(&req1, stream, a, 2);
- uv_write(&req2, stream, b, 2);
-
-.. c:function:: int uv_write2(uv_write_t* req, uv_stream_t* handle, const uv_buf_t bufs[], unsigned int nbufs, uv_stream_t* send_handle, uv_write_cb cb)
-
- Extended write function for sending handles over a pipe. The pipe must be
- initialized with `ipc` == 1.
-
- .. 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.
-
-.. c:function:: int uv_try_write(uv_stream_t* handle, const uv_buf_t bufs[], unsigned int nbufs)
-
- Same as :c:func:`uv_write`, but won't queue a write request if it can't be
- completed immediately.
-
- Will return either:
-
- * > 0: number of bytes written (can be less than the supplied buffer size).
- * < 0: negative error code (``UV_EAGAIN`` is returned if no data can be sent
- immediately).
-
-.. c:function:: int uv_is_readable(const uv_stream_t* handle)
-
- Returns 1 if the stream is readable, 0 otherwise.
-
-.. c:function:: int uv_is_writable(const uv_stream_t* handle)
-
- Returns 1 if the stream is writable, 0 otherwise.
-
-.. c:function:: int uv_stream_set_blocking(uv_stream_t* handle, int 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 only works on Windows for :c:type:`uv_pipe_t` handles.
- On UNIX platforms, all :c:type:`uv_stream_t` handles are supported.
-
- 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.
-
- .. versionchanged:: 1.4.0 UNIX implementation added.
-
-.. seealso:: The :c:type:`uv_handle_t` API functions also apply.
diff --git a/3rdparty/libuv/docs/src/tcp.rst b/3rdparty/libuv/docs/src/tcp.rst
deleted file mode 100644
index ca0c9b4ac5a..00000000000
--- a/3rdparty/libuv/docs/src/tcp.rst
+++ /dev/null
@@ -1,108 +0,0 @@
-
-.. _tcp:
-
-:c:type:`uv_tcp_t` --- TCP handle
-=================================
-
-TCP handles are used to represent both TCP streams and servers.
-
-:c:type:`uv_tcp_t` is a 'subclass' of :c:type:`uv_stream_t`.
-
-
-Data types
-----------
-
-.. c:type:: uv_tcp_t
-
- TCP handle type.
-
-
-Public members
-^^^^^^^^^^^^^^
-
-N/A
-
-.. seealso:: The :c:type:`uv_stream_t` members also apply.
-
-
-API
----
-
-.. c:function:: int uv_tcp_init(uv_loop_t* loop, uv_tcp_t* handle)
-
- Initialize the handle. No socket is created as of yet.
-
-.. c:function:: int uv_tcp_init_ex(uv_loop_t* loop, uv_tcp_t* handle, unsigned int flags)
-
- Initialize the handle with the specified flags. At the moment only the lower 8 bits
- of the `flags` parameter are used as the socket domain. A socket will be created
- for the given domain. If the specified domain is ``AF_UNSPEC`` no socket is created,
- just like :c:func:`uv_tcp_init`.
-
- .. versionadded:: 1.7.0
-
-.. c:function:: int uv_tcp_open(uv_tcp_t* handle, uv_os_sock_t sock)
-
- Open an existing file descriptor or SOCKET as a TCP handle.
-
- .. versionchanged:: 1.2.1 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 stream socket.
-
-.. c:function:: int uv_tcp_nodelay(uv_tcp_t* handle, int enable)
-
- Enable / disable Nagle's algorithm.
-
-.. c:function:: int uv_tcp_keepalive(uv_tcp_t* handle, int enable, unsigned int delay)
-
- Enable / disable TCP keep-alive. `delay` is the initial delay in seconds,
- ignored when `enable` is zero.
-
-.. c:function:: int uv_tcp_simultaneous_accepts(uv_tcp_t* handle, int 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.
-
-.. c:function:: int uv_tcp_bind(uv_tcp_t* handle, const struct sockaddr* addr, unsigned int flags)
-
- Bind the handle to an address and port. `addr` should point to an
- initialized ``struct sockaddr_in`` or ``struct sockaddr_in6``.
-
- When the port is already taken, you can expect to see an ``UV_EADDRINUSE``
- error from either :c:func:`uv_tcp_bind`, :c:func:`uv_listen` or
- :c:func:`uv_tcp_connect`. That is, a successful call to this function does
- not guarantee that the call to :c:func:`uv_listen` or :c:func:`uv_tcp_connect`
- will succeed as well.
-
- `flags` can contain ``UV_TCP_IPV6ONLY``, in which case dual-stack support
- is disabled and only IPv6 is used.
-
-.. c:function:: int uv_tcp_getsockname(const uv_tcp_t* handle, struct sockaddr* name, int* namelen)
-
- Get the current address to which the handle is bound. `addr` must point to
- a valid and big enough chunk of memory, ``struct sockaddr_storage`` is
- recommended for IPv4 and IPv6 support.
-
-.. c:function:: int uv_tcp_getpeername(const uv_tcp_t* handle, struct sockaddr* name, int* namelen)
-
- Get the address of the peer connected to the handle. `addr` must point to
- a valid and big enough chunk of memory, ``struct sockaddr_storage`` is
- recommended for IPv4 and IPv6 support.
-
-.. c:function:: int uv_tcp_connect(uv_connect_t* req, uv_tcp_t* handle, const struct sockaddr* addr, uv_connect_cb cb)
-
- Establish an IPv4 or IPv6 TCP connection. Provide an initialized TCP handle
- and an uninitialized :c:type:`uv_connect_t`. `addr` should point to an
- initialized ``struct sockaddr_in`` or ``struct sockaddr_in6``.
-
- The callback is made when the connection has been established or when a
- connection error happened.
-
-.. seealso:: The :c:type:`uv_stream_t` API functions also apply.
diff --git a/3rdparty/libuv/docs/src/threading.rst b/3rdparty/libuv/docs/src/threading.rst
deleted file mode 100644
index e876dde1256..00000000000
--- a/3rdparty/libuv/docs/src/threading.rst
+++ /dev/null
@@ -1,160 +0,0 @@
-
-.. _threading:
-
-Threading and synchronization utilities
-=======================================
-
-libuv provides cross-platform implementations for multiple threading and
-synchronization primitives. The API largely follows the pthreads API.
-
-
-Data types
-----------
-
-.. c:type:: uv_thread_t
-
- Thread data type.
-
-.. c:type:: void (*uv_thread_cb)(void* arg)
-
- Callback that is invoked to initialize thread execution. `arg` is the same
- value that was passed to :c:func:`uv_thread_create`.
-
-.. c:type:: uv_key_t
-
- Thread-local key data type.
-
-.. c:type:: uv_once_t
-
- Once-only initializer data type.
-
-.. c:type:: uv_mutex_t
-
- Mutex data type.
-
-.. c:type:: uv_rwlock_t
-
- Read-write lock data type.
-
-.. c:type:: uv_sem_t
-
- Semaphore data type.
-
-.. c:type:: uv_cond_t
-
- Condition data type.
-
-.. c:type:: uv_barrier_t
-
- Barrier data type.
-
-
-API
----
-
-Threads
-^^^^^^^
-
-.. c:function:: int uv_thread_create(uv_thread_t* tid, uv_thread_cb entry, void* arg)
-
- .. versionchanged:: 1.4.1 returns a UV_E* error code on failure
-
-.. c:function:: uv_thread_t uv_thread_self(void)
-.. c:function:: int uv_thread_join(uv_thread_t *tid)
-.. c:function:: int uv_thread_equal(const uv_thread_t* t1, const uv_thread_t* t2)
-
-Thread-local storage
-^^^^^^^^^^^^^^^^^^^^
-
-.. note::
- The total thread-local storage size may be limited. That is, it may not be possible to
- create many TLS keys.
-
-.. c:function:: int uv_key_create(uv_key_t* key)
-.. c:function:: void uv_key_delete(uv_key_t* key)
-.. c:function:: void* uv_key_get(uv_key_t* key)
-.. c:function:: void uv_key_set(uv_key_t* key, void* value)
-
-Once-only initialization
-^^^^^^^^^^^^^^^^^^^^^^^^
-
-Runs a function once and only once. Concurrent calls to :c:func:`uv_once` with the
-same guard will block all callers except one (it's unspecified which one).
-The guard should be initialized statically with the UV_ONCE_INIT macro.
-
-.. c:function:: void uv_once(uv_once_t* guard, void (*callback)(void))
-
-Mutex locks
-^^^^^^^^^^^
-
-Functions return 0 on success or an error code < 0 (unless the
-return type is void, of course).
-
-.. c:function:: int uv_mutex_init(uv_mutex_t* handle)
-.. c:function:: void uv_mutex_destroy(uv_mutex_t* handle)
-.. c:function:: void uv_mutex_lock(uv_mutex_t* handle)
-.. c:function:: int uv_mutex_trylock(uv_mutex_t* handle)
-.. c:function:: void uv_mutex_unlock(uv_mutex_t* handle)
-
-Read-write locks
-^^^^^^^^^^^^^^^^
-
-Functions return 0 on success or an error code < 0 (unless the
-return type is void, of course).
-
-.. c:function:: int uv_rwlock_init(uv_rwlock_t* rwlock)
-.. c:function:: void uv_rwlock_destroy(uv_rwlock_t* rwlock)
-.. c:function:: void uv_rwlock_rdlock(uv_rwlock_t* rwlock)
-.. c:function:: int uv_rwlock_tryrdlock(uv_rwlock_t* rwlock)
-.. c:function:: void uv_rwlock_rdunlock(uv_rwlock_t* rwlock)
-.. c:function:: void uv_rwlock_wrlock(uv_rwlock_t* rwlock)
-.. c:function:: int uv_rwlock_trywrlock(uv_rwlock_t* rwlock)
-.. c:function:: void uv_rwlock_wrunlock(uv_rwlock_t* rwlock)
-
-Semaphores
-^^^^^^^^^^
-
-Functions return 0 on success or an error code < 0 (unless the
-return type is void, of course).
-
-.. c:function:: int uv_sem_init(uv_sem_t* sem, unsigned int value)
-.. c:function:: void uv_sem_destroy(uv_sem_t* sem)
-.. c:function:: void uv_sem_post(uv_sem_t* sem)
-.. c:function:: void uv_sem_wait(uv_sem_t* sem)
-.. c:function:: int uv_sem_trywait(uv_sem_t* sem)
-
-Conditions
-^^^^^^^^^^
-
-Functions return 0 on success or an error code < 0 (unless the
-return type is void, of course).
-
-.. note::
- Callers should be prepared to deal with spurious wakeups on :c:func:`uv_cond_wait` and
- :c:func:`uv_cond_timedwait`.
-
-.. c:function:: int uv_cond_init(uv_cond_t* cond)
-.. c:function:: void uv_cond_destroy(uv_cond_t* cond)
-.. c:function:: void uv_cond_signal(uv_cond_t* cond)
-.. c:function:: void uv_cond_broadcast(uv_cond_t* cond)
-.. c:function:: void uv_cond_wait(uv_cond_t* cond, uv_mutex_t* mutex)
-.. c:function:: int uv_cond_timedwait(uv_cond_t* cond, uv_mutex_t* mutex, uint64_t timeout)
-
-Barriers
-^^^^^^^^
-
-Functions return 0 on success or an error code < 0 (unless the
-return type is void, of course).
-
-.. note::
- :c:func:`uv_barrier_wait` returns a value > 0 to an arbitrarily chosen "serializer" thread
- to facilitate cleanup, i.e.
-
- ::
-
- if (uv_barrier_wait(&barrier) > 0)
- uv_barrier_destroy(&barrier);
-
-.. c:function:: int uv_barrier_init(uv_barrier_t* barrier, unsigned int count)
-.. c:function:: void uv_barrier_destroy(uv_barrier_t* barrier)
-.. c:function:: int uv_barrier_wait(uv_barrier_t* barrier)
diff --git a/3rdparty/libuv/docs/src/threadpool.rst b/3rdparty/libuv/docs/src/threadpool.rst
deleted file mode 100644
index 18949507e75..00000000000
--- a/3rdparty/libuv/docs/src/threadpool.rst
+++ /dev/null
@@ -1,67 +0,0 @@
-
-.. _threadpool:
-
-Thread pool work scheduling
-===========================
-
-libuv provides a threadpool which can be used to run user code and get notified
-in the loop thread. This thread pool is internally used to run all filesystem
-operations, as well as getaddrinfo and getnameinfo requests.
-
-Its default size is 4, but it can be changed at startup time by setting the
-``UV_THREADPOOL_SIZE`` environment variable to any value (the absolute maximum
-is 128).
-
-The threadpool is global and shared across all event loops. When a particular
-function makes use of the threadpool (i.e. when using :c:func:`uv_queue_work`)
-libuv preallocates and initializes the maximum number of threads allowed by
-``UV_THREADPOOL_SIZE``. This causes a relatively minor memory overhead
-(~1MB for 128 threads) but increases the performance of threading at runtime.
-
-.. note::
- Note that even though a global thread pool which is shared across all events
- loops is used, the functions are not thread safe.
-
-
-Data types
-----------
-
-.. c:type:: uv_work_t
-
- Work request type.
-
-.. c:type:: void (*uv_work_cb)(uv_work_t* req)
-
- Callback passed to :c:func:`uv_queue_work` which will be run on the thread
- pool.
-
-.. c:type:: void (*uv_after_work_cb)(uv_work_t* req, int status)
-
- Callback passed to :c:func:`uv_queue_work` which will be called on the loop
- thread after the work on the threadpool has been completed. If the work
- was cancelled using :c:func:`uv_cancel` `status` will be ``UV_ECANCELED``.
-
-
-Public members
-^^^^^^^^^^^^^^
-
-.. c:member:: uv_loop_t* uv_work_t.loop
-
- Loop that started this request and where completion will be reported.
- Readonly.
-
-.. seealso:: The :c:type:`uv_req_t` members also apply.
-
-
-API
----
-
-.. c:function:: int uv_queue_work(uv_loop_t* loop, uv_work_t* req, uv_work_cb work_cb, uv_after_work_cb after_work_cb)
-
- Initializes a work request which will run the given `work_cb` in a thread
- from the threadpool. Once `work_cb` is completed, `after_work_cb` will be
- called on the loop thread.
-
- This request can be cancelled with :c:func:`uv_cancel`.
-
-.. seealso:: The :c:type:`uv_req_t` API functions also apply.
diff --git a/3rdparty/libuv/docs/src/timer.rst b/3rdparty/libuv/docs/src/timer.rst
deleted file mode 100644
index 31d733efc39..00000000000
--- a/3rdparty/libuv/docs/src/timer.rst
+++ /dev/null
@@ -1,76 +0,0 @@
-
-.. _timer:
-
-:c:type:`uv_timer_t` --- Timer handle
-=====================================
-
-Timer handles are used to schedule callbacks to be called in the future.
-
-
-Data types
-----------
-
-.. c:type:: uv_timer_t
-
- Timer handle type.
-
-.. c:type:: void (*uv_timer_cb)(uv_timer_t* handle)
-
- Type definition for callback passed to :c:func:`uv_timer_start`.
-
-
-Public members
-^^^^^^^^^^^^^^
-
-N/A
-
-.. seealso:: The :c:type:`uv_handle_t` members also apply.
-
-
-API
----
-
-.. c:function:: int uv_timer_init(uv_loop_t* loop, uv_timer_t* handle)
-
- Initialize the handle.
-
-.. c:function:: int uv_timer_start(uv_timer_t* handle, uv_timer_cb cb, uint64_t timeout, uint64_t repeat)
-
- 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.
-
-.. c:function:: int uv_timer_stop(uv_timer_t* handle)
-
- Stop the timer, the callback will not be called anymore.
-
-.. c:function:: int uv_timer_again(uv_timer_t* handle)
-
- 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 returns
- UV_EINVAL.
-
-.. c:function:: void uv_timer_set_repeat(uv_timer_t* handle, uint64_t repeat)
-
- Set the repeat interval value in milliseconds. The timer will be scheduled
- to run on the given interval, regardless of the callback execution
- duration, and will follow normal timer semantics in the case of a
- time-slice overrun.
-
- For example, if a 50ms repeating timer first runs for 17ms, it will be
- scheduled to run again 33ms later. If other tasks consume more than the
- 33ms following the first timer callback, then the callback will run as soon
- as possible.
-
- .. 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.
-
-.. c:function:: uint64_t uv_timer_get_repeat(const uv_timer_t* handle)
-
- Get the timer repeat value.
-
-.. seealso:: The :c:type:`uv_handle_t` API functions also apply.
diff --git a/3rdparty/libuv/docs/src/tty.rst b/3rdparty/libuv/docs/src/tty.rst
deleted file mode 100644
index 655dca9ca20..00000000000
--- a/3rdparty/libuv/docs/src/tty.rst
+++ /dev/null
@@ -1,93 +0,0 @@
-
-.. _tty:
-
-:c:type:`uv_tty_t` --- TTY handle
-=================================
-
-TTY handles represent a stream for the console.
-
-:c:type:`uv_tty_t` is a 'subclass' of :c:type:`uv_stream_t`.
-
-
-Data types
-----------
-
-.. c:type:: uv_tty_t
-
- TTY handle type.
-
-.. c:type:: uv_tty_mode_t
-
- .. versionadded:: 1.2.0
-
- TTY mode type:
-
- ::
-
- typedef enum {
- /* Initial/normal terminal mode */
- UV_TTY_MODE_NORMAL,
- /* Raw input mode (On Windows, ENABLE_WINDOW_INPUT is also enabled) */
- UV_TTY_MODE_RAW,
- /* Binary-safe I/O mode for IPC (Unix-only) */
- UV_TTY_MODE_IO
- } uv_tty_mode_t;
-
-
-
-Public members
-^^^^^^^^^^^^^^
-
-N/A
-
-.. seealso:: The :c:type:`uv_stream_t` members also apply.
-
-
-API
----
-
-.. c:function:: int uv_tty_init(uv_loop_t* loop, uv_tty_t* handle, uv_file fd, int readable)
-
- 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 :c:func:`uv_read_start` with
- this stream. stdin is readable, stdout is not.
-
- On Unix this function will try to open ``/dev/tty`` and use it if the passed
- file descriptor refers to a TTY. This lets libuv put the tty in non-blocking
- mode without affecting other processes that share the tty.
-
- .. note::
- If opening ``/dev/tty`` fails, libuv falls back to blocking writes for
- non-readable TTY streams.
-
- .. versionchanged:: 1.5.0: trying to initialize a TTY stream with a file
- descriptor that refers to a file returns `UV_EINVAL`
- on UNIX.
-
-.. c:function:: int uv_tty_set_mode(uv_tty_t* handle, uv_tty_mode_t mode)
-
- .. versionchanged:: 1.2.0: the mode is specified as a
- :c:type:`uv_tty_mode_t` value.
-
- Set the TTY using the specified terminal mode.
-
-.. c:function:: int uv_tty_reset_mode(void)
-
- 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
- :c:func:`uv_tty_set_mode`.
-
-.. c:function:: int uv_tty_get_winsize(uv_tty_t* handle, int* width, int* height)
-
- Gets the current Window size. On success it returns 0.
-
-.. seealso:: The :c:type:`uv_stream_t` API functions also apply.
diff --git a/3rdparty/libuv/docs/src/udp.rst b/3rdparty/libuv/docs/src/udp.rst
deleted file mode 100644
index dd46603394e..00000000000
--- a/3rdparty/libuv/docs/src/udp.rst
+++ /dev/null
@@ -1,295 +0,0 @@
-
-.. _udp:
-
-:c:type:`uv_udp_t` --- UDP handle
-=================================
-
-UDP handles encapsulate UDP communication for both clients and servers.
-
-
-Data types
-----------
-
-.. c:type:: uv_udp_t
-
- UDP handle type.
-
-.. c:type:: uv_udp_send_t
-
- UDP send request type.
-
-.. c:type:: uv_udp_flags
-
- Flags used in :c:func:`uv_udp_bind` and :c:type:`uv_udp_recv_cb`..
-
- ::
-
- enum uv_udp_flags {
- /* Disables dual stack mode. */
- UV_UDP_IPV6ONLY = 1,
- /*
- * Indicates message was truncated because read buffer was too small. The
- * remainder was discarded by the OS. Used in uv_udp_recv_cb.
- */
- UV_UDP_PARTIAL = 2,
- /*
- * Indicates if SO_REUSEADDR will be set when binding the handle in
- * uv_udp_bind.
- * This sets the SO_REUSEPORT socket flag on the BSDs and OS X. On other
- * Unix platforms, it sets the SO_REUSEADDR flag. What that means is that
- * multiple threads or processes can bind to the same address without error
- * (provided they all set the flag) but only the last one to bind will receive
- * any traffic, in effect "stealing" the port from the previous listener.
- */
- UV_UDP_REUSEADDR = 4
- };
-
-.. c:type:: void (*uv_udp_send_cb)(uv_udp_send_t* req, int status)
-
- Type definition for callback passed to :c:func:`uv_udp_send`, which is
- called after the data was sent.
-
-.. c:type:: void (*uv_udp_recv_cb)(uv_udp_t* handle, ssize_t nread, const uv_buf_t* buf, const struct sockaddr* addr, unsigned flags)
-
- Type definition for callback passed to :c:func:`uv_udp_recv_start`, which
- is called when the endpoint receives data.
-
- * `handle`: UDP handle
- * `nread`: Number of bytes that have been received.
- 0 if there is no more data to read. You may discard or repurpose
- the read buffer. Note that 0 may also mean that an empty datagram
- was received (in this case `addr` is not NULL). < 0 if a transmission
- error was detected.
- * `buf`: :c:type:`uv_buf_t` with the received data.
- * `addr`: ``struct sockaddr*`` containing the address of the sender.
- Can be NULL. Valid for the duration of the callback only.
- * `flags`: One or more or'ed UV_UDP_* constants. Right now only
- ``UV_UDP_PARTIAL`` is used.
-
- .. note::
- The receive callback will be called with `nread` == 0 and `addr` == NULL when there is
- nothing to read, and with `nread` == 0 and `addr` != NULL when an empty UDP packet is
- received.
-
-.. c:type:: uv_membership
-
- Membership type for a multicast address.
-
- ::
-
- typedef enum {
- UV_LEAVE_GROUP = 0,
- UV_JOIN_GROUP
- } uv_membership;
-
-
-Public members
-^^^^^^^^^^^^^^
-
-.. c:member:: size_t uv_udp_t.send_queue_size
-
- Number of bytes queued for sending. This field strictly shows how much
- information is currently queued.
-
-.. c:member:: size_t uv_udp_t.send_queue_count
-
- Number of send requests currently in the queue awaiting to be processed.
-
-.. c:member:: uv_udp_t* uv_udp_send_t.handle
-
- UDP handle where this send request is taking place.
-
-.. seealso:: The :c:type:`uv_handle_t` members also apply.
-
-
-API
----
-
-.. c:function:: int uv_udp_init(uv_loop_t* loop, uv_udp_t* handle)
-
- Initialize a new UDP handle. The actual socket is created lazily.
- Returns 0 on success.
-
-.. c:function:: int uv_udp_init_ex(uv_loop_t* loop, uv_udp_t* handle, unsigned int flags)
-
- Initialize the handle with the specified flags. At the moment the lower 8 bits
- of the `flags` parameter are used as the socket domain. A socket will be created
- for the given domain. If the specified domain is ``AF_UNSPEC`` no socket is created,
- just like :c:func:`uv_udp_init`.
-
- .. versionadded:: 1.7.0
-
-.. c:function:: int uv_udp_open(uv_udp_t* handle, uv_os_sock_t sock)
-
- 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.
-
- .. versionchanged:: 1.2.1 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.
-
-.. c:function:: int uv_udp_bind(uv_udp_t* handle, const struct sockaddr* addr, unsigned int flags)
-
- Bind the UDP handle to an IP address and port.
-
- :param handle: UDP handle. Should have been initialized with
- :c:func:`uv_udp_init`.
-
- :param addr: `struct sockaddr_in` or `struct sockaddr_in6`
- with the address and port to bind to.
-
- :param flags: Indicate how the socket will be bound,
- ``UV_UDP_IPV6ONLY`` and ``UV_UDP_REUSEADDR`` are supported.
-
- :returns: 0 on success, or an error code < 0 on failure.
-
-.. c:function:: int uv_udp_getsockname(const uv_udp_t* handle, struct sockaddr* name, int* namelen)
-
- Get the local IP and port of the UDP handle.
-
- :param handle: UDP handle. Should have been initialized with
- :c:func:`uv_udp_init` and bound.
-
- :param name: Pointer to the structure to be filled with the address data.
- In order to support IPv4 and IPv6 `struct sockaddr_storage` should be
- used.
-
- :param namelen: On input it indicates the data of the `name` field. On
- output it indicates how much of it was filled.
-
- :returns: 0 on success, or an error code < 0 on failure.
-
-.. c:function:: int uv_udp_set_membership(uv_udp_t* handle, const char* multicast_addr, const char* interface_addr, uv_membership membership)
-
- Set membership for a multicast address
-
- :param handle: UDP handle. Should have been initialized with
- :c:func:`uv_udp_init`.
-
- :param multicast_addr: Multicast address to set membership for.
-
- :param interface_addr: Interface address.
-
- :param membership: Should be ``UV_JOIN_GROUP`` or ``UV_LEAVE_GROUP``.
-
- :returns: 0 on success, or an error code < 0 on failure.
-
-.. c:function:: int uv_udp_set_multicast_loop(uv_udp_t* handle, int on)
-
- Set IP multicast loop flag. Makes multicast packets loop back to
- local sockets.
-
- :param handle: UDP handle. Should have been initialized with
- :c:func:`uv_udp_init`.
-
- :param on: 1 for on, 0 for off.
-
- :returns: 0 on success, or an error code < 0 on failure.
-
-.. c:function:: int uv_udp_set_multicast_ttl(uv_udp_t* handle, int ttl)
-
- Set the multicast ttl.
-
- :param handle: UDP handle. Should have been initialized with
- :c:func:`uv_udp_init`.
-
- :param ttl: 1 through 255.
-
- :returns: 0 on success, or an error code < 0 on failure.
-
-.. c:function:: int uv_udp_set_multicast_interface(uv_udp_t* handle, const char* interface_addr)
-
- Set the multicast interface to send or receive data on.
-
- :param handle: UDP handle. Should have been initialized with
- :c:func:`uv_udp_init`.
-
- :param interface_addr: interface address.
-
- :returns: 0 on success, or an error code < 0 on failure.
-
-.. c:function:: int uv_udp_set_broadcast(uv_udp_t* handle, int on)
-
- Set broadcast on or off.
-
- :param handle: UDP handle. Should have been initialized with
- :c:func:`uv_udp_init`.
-
- :param on: 1 for on, 0 for off.
-
- :returns: 0 on success, or an error code < 0 on failure.
-
-.. c:function:: int uv_udp_set_ttl(uv_udp_t* handle, int ttl)
-
- Set the time to live.
-
- :param handle: UDP handle. Should have been initialized with
- :c:func:`uv_udp_init`.
-
- :param ttl: 1 through 255.
-
- :returns: 0 on success, or an error code < 0 on failure.
-
-.. c:function:: int uv_udp_send(uv_udp_send_t* req, uv_udp_t* handle, const uv_buf_t bufs[], unsigned int nbufs, const struct sockaddr* addr, uv_udp_send_cb send_cb)
-
- Send data over the UDP socket. If the socket has not previously been bound
- with :c:func:`uv_udp_bind` it will be bound to 0.0.0.0
- (the "all interfaces" IPv4 address) and a random port number.
-
- :param req: UDP request handle. Need not be initialized.
-
- :param handle: UDP handle. Should have been initialized with
- :c:func:`uv_udp_init`.
-
- :param bufs: List of buffers to send.
-
- :param nbufs: Number of buffers in `bufs`.
-
- :param addr: `struct sockaddr_in` or `struct sockaddr_in6` with the
- address and port of the remote peer.
-
- :param send_cb: Callback to invoke when the data has been sent out.
-
- :returns: 0 on success, or an error code < 0 on failure.
-
-.. c:function:: int uv_udp_try_send(uv_udp_t* handle, const uv_buf_t bufs[], unsigned int nbufs, const struct sockaddr* addr)
-
- Same as :c:func:`uv_udp_send`, but won't queue a send request if it can't
- be completed immediately.
-
- :returns: >= 0: number of bytes sent (it matches the given buffer size).
- < 0: negative error code (``UV_EAGAIN`` is returned when the message
- can't be sent immediately).
-
-.. c:function:: int uv_udp_recv_start(uv_udp_t* handle, uv_alloc_cb alloc_cb, uv_udp_recv_cb recv_cb)
-
- Prepare for receiving data. If the socket has not previously been bound
- with :c:func:`uv_udp_bind` it is bound to 0.0.0.0 (the "all interfaces"
- IPv4 address) and a random port number.
-
- :param handle: UDP handle. Should have been initialized with
- :c:func:`uv_udp_init`.
-
- :param alloc_cb: Callback to invoke when temporary storage is needed.
-
- :param recv_cb: Callback to invoke with received data.
-
- :returns: 0 on success, or an error code < 0 on failure.
-
-.. c:function:: int uv_udp_recv_stop(uv_udp_t* handle)
-
- Stop listening for incoming datagrams.
-
- :param handle: UDP handle. Should have been initialized with
- :c:func:`uv_udp_init`.
-
- :returns: 0 on success, or an error code < 0 on failure.
-
-.. seealso:: The :c:type:`uv_handle_t` API functions also apply.
diff --git a/3rdparty/libuv/docs/src/version.rst b/3rdparty/libuv/docs/src/version.rst
deleted file mode 100644
index e1715b2d3c5..00000000000
--- a/3rdparty/libuv/docs/src/version.rst
+++ /dev/null
@@ -1,60 +0,0 @@
-
-.. _version:
-
-Version-checking macros and functions
-=====================================
-
-Starting with version 1.0.0 libuv follows the `semantic versioning`_
-scheme. This means that new APIs can be introduced throughout the lifetime of
-a major release. In this section you'll find all macros and functions that
-will allow you to write or compile code conditionally, in order to work with
-multiple libuv versions.
-
-.. _semantic versioning: http://semver.org
-
-
-Macros
-------
-
-.. c:macro:: UV_VERSION_MAJOR
-
- libuv version's major number.
-
-.. c:macro:: UV_VERSION_MINOR
-
- libuv version's minor number.
-
-.. c:macro:: UV_VERSION_PATCH
-
- libuv version's patch number.
-
-.. c:macro:: UV_VERSION_IS_RELEASE
-
- Set to 1 to indicate a release version of libuv, 0 for a development
- snapshot.
-
-.. c:macro:: UV_VERSION_SUFFIX
-
- libuv version suffix. Certain development releases such as Release Candidates
- might have a suffix such as "rc".
-
-.. c:macro:: UV_VERSION_HEX
-
- Returns the libuv version packed into a single integer. 8 bits are used for
- each component, with the patch number stored in the 8 least significant
- bits. E.g. for libuv 1.2.3 this would be 0x010203.
-
- .. versionadded:: 1.7.0
-
-
-Functions
----------
-
-.. c:function:: unsigned int uv_version(void)
-
- Returns :c:macro:`UV_VERSION_HEX`.
-
-.. c:function:: const char* uv_version_string(void)
-
- Returns the libuv version number as a string. For non-release versions the
- version suffix is included.
diff --git a/3rdparty/libuv/gyp_uv.py b/3rdparty/libuv/gyp_uv.py
deleted file mode 100644
index 39933f624d5..00000000000
--- a/3rdparty/libuv/gyp_uv.py
+++ /dev/null
@@ -1,93 +0,0 @@
-#!/usr/bin/env python
-
-import os
-import platform
-import sys
-
-try:
- import multiprocessing.synchronize
- gyp_parallel_support = True
-except ImportError:
- gyp_parallel_support = False
-
-
-CC = os.environ.get('CC', 'cc')
-script_dir = os.path.dirname(__file__)
-uv_root = os.path.normpath(script_dir)
-output_dir = os.path.join(os.path.abspath(uv_root), 'out')
-
-sys.path.insert(0, os.path.join(uv_root, 'build', 'gyp', 'pylib'))
-try:
- import gyp
-except ImportError:
- print('You need to install gyp in build/gyp first. See the README.')
- sys.exit(42)
-
-
-def host_arch():
- machine = platform.machine()
- if machine == 'i386': return 'ia32'
- if machine == 'x86_64': return 'x64'
- if machine.startswith('arm'): return 'arm'
- if machine.startswith('mips'): return 'mips'
- return machine # Return as-is and hope for the best.
-
-
-def run_gyp(args):
- rc = gyp.main(args)
- if rc != 0:
- print 'Error running GYP'
- sys.exit(rc)
-
-
-if __name__ == '__main__':
- args = sys.argv[1:]
-
- # GYP bug.
- # On msvs it will crash if it gets an absolute path.
- # On Mac/make it will crash if it doesn't get an absolute path.
- if sys.platform == 'win32':
- args.append(os.path.join(uv_root, 'uv.gyp'))
- common_fn = os.path.join(uv_root, 'common.gypi')
- options_fn = os.path.join(uv_root, 'options.gypi')
- # we force vs 2010 over 2008 which would otherwise be the default for gyp
- if not os.environ.get('GYP_MSVS_VERSION'):
- os.environ['GYP_MSVS_VERSION'] = '2010'
- else:
- args.append(os.path.join(os.path.abspath(uv_root), 'uv.gyp'))
- common_fn = os.path.join(os.path.abspath(uv_root), 'common.gypi')
- options_fn = os.path.join(os.path.abspath(uv_root), 'options.gypi')
-
- if os.path.exists(common_fn):
- args.extend(['-I', common_fn])
-
- if os.path.exists(options_fn):
- args.extend(['-I', options_fn])
-
- args.append('--depth=' + uv_root)
-
- # There's a bug with windows which doesn't allow this feature.
- if sys.platform != 'win32':
- if '-f' not in args:
- args.extend('-f make'.split())
- if 'eclipse' not in args and 'ninja' not in args:
- args.extend(['-Goutput_dir=' + output_dir])
- args.extend(['--generator-output', output_dir])
-
- if not any(a.startswith('-Dhost_arch=') for a in args):
- args.append('-Dhost_arch=%s' % host_arch())
-
- if not any(a.startswith('-Dtarget_arch=') for a in args):
- args.append('-Dtarget_arch=%s' % host_arch())
-
- if not any(a.startswith('-Duv_library=') for a in args):
- args.append('-Duv_library=static_library')
-
- # Some platforms (OpenBSD for example) don't have multiprocessing.synchronize
- # so gyp must be run with --no-parallel
- if not gyp_parallel_support:
- args.append('--no-parallel')
-
- gyp_args = list(args)
- print gyp_args
- run_gyp(gyp_args)
diff --git a/3rdparty/libuv/img/banner.png b/3rdparty/libuv/img/banner.png
deleted file mode 100644
index 7187daa2e57..00000000000
--- a/3rdparty/libuv/img/banner.png
+++ /dev/null
Binary files differ
diff --git a/3rdparty/libuv/img/logos.svg b/3rdparty/libuv/img/logos.svg
deleted file mode 100644
index d6185f8b191..00000000000
--- a/3rdparty/libuv/img/logos.svg
+++ /dev/null
@@ -1,152 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="792pt"
- height="612pt"
- id="svg3069"
- version="1.1"
- inkscape:version="0.48.4 r9939"
- sodipodi:docname="New document 3">
- <defs
- id="defs3071">
- <clipPath
- clipPathUnits="userSpaceOnUse"
- id="clipPath70">
- <path
- inkscape:connector-curvature="0"
- d="M 0,5952.81 0,0 l 8418.9,0 0,5952.81 -8418.9,0 z"
- id="path72" />
- </clipPath>
- <clipPath
- clipPathUnits="userSpaceOnUse"
- id="clipPath70-6">
- <path
- inkscape:connector-curvature="0"
- d="M 0,5952.81 0,0 l 8418.9,0 0,5952.81 -8418.9,0 z"
- id="path72-5" />
- </clipPath>
- </defs>
- <sodipodi:namedview
- inkscape:document-units="in"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="0.43415836"
- inkscape:cx="508.42646"
- inkscape:cy="359.27024"
- inkscape:current-layer="layer1"
- id="namedview3073"
- showgrid="false"
- inkscape:window-width="1010"
- inkscape:window-height="702"
- inkscape:window-x="441"
- inkscape:window-y="267"
- inkscape:window-maximized="0" />
- <metadata
- id="metadata3075">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1">
- <g
- transform="matrix(0.2288071,0,0,-0.2288071,130.84779,1169.4436)"
- id="g66">
- <g
- id="g68"
- clip-path="url(#clipPath70)">
- <path
- inkscape:connector-curvature="0"
- d="m 3274.33,2372.2 c -42.27,-8.61 -87.28,-37.29 -122.12,-43.75 -77.01,-14.25 -122.4,-0.53 -81.76,16.27 59.03,24.45 253.75,30.55 274.1,175.05 20.36,144.5 6.1,209.66 -4.07,246.29 -4.87,17.57 -15.81,43.49 -25.9,65.76 -2.85,15.73 -6.59,29.07 -9.86,38.57 -1.82,4.29 -3.65,9.81 -5.46,16.78 0,0 -2.54,17.81 5.6,35.1 7.2,15.34 31.95,48.62 33.62,80.79 0.03,1.95 0.11,3.9 0.08,5.85 -0.1,2.18 -0.28,4.33 -0.63,6.48 l -0.18,1.9 c -3.17,18.05 -13.53,30.62 -27.6,39.98 -9.06,6.02 -21.4,7.92 -28.17,16.51 5.4,17.01 22.63,23.06 29.82,36.95 4.48,12.34 0.82,25.3 -5.99,37.08 -13.13,14.72 -38.92,27.49 -62.07,36.15 -28.97,10.87 -58.44,19.45 -78.35,35.06 -21.03,11.19 -35.17,32.83 -22.26,61.45 3.35,7.44 4.85,14.93 4.75,22.04 l -0.09,2.09 c -0.03,1.45 -0.23,2.76 -0.41,4.1 -0.15,1.04 -0.32,2.06 -0.55,3.08 l -0.47,1.77 -0.56,2.02 c -5.3,17.86 -33.44,22.88 -43.47,23.78 -22.72,2.04 -37.4,8.2 -49.46,12.01 9.7,-5.04 19.46,-11.78 31.9,-16.79 7.87,-3.21 19.17,-5.12 28.68,-8.29 l 0.09,0.02 c 0,0 17.55,-3.56 22.38,-15.78 4.84,-12.2 2.03,-22.9 0,-29.75 l -0.74,-1.99 c -1.75,-5.35 -3.72,-10.51 -4.13,-15.84 -1.65,-21.04 11.26,-32 18.12,-49.6 12.35,-11.73 29.93,-23.88 54.32,-34.88 21.92,-9.9 48.15,-15.89 64.4,-25.7 9.41,-5.68 26.55,-19.41 26.16,-29.4 -0.3,-7.65 -14.43,-18.09 -20.12,-25.7 -4.07,-5.42 -6.09,-12.62 -9.73,-17.74 -3.17,-5 -7.24,-8.22 -11.92,-8.22 -6.1,0 -20.01,-2.36 -10.86,-3.04 9.16,-0.68 32.91,-11.87 32.91,-11.87 l -0.02,-0.03 c 32.1,-13.28 53.67,-37.88 41.87,-72.96 -9.88,-29.39 -32.61,-53.97 -34.2,-86.3 -1.7,-34.4 14.07,-62.72 16.09,-90 3.41,-45.9 -3.18,-77.51 -12.06,-112.01 -4.17,-16.14 -6.39,-32.04 -10.06,-47.74 -15.68,-66.87 -56.09,-95.84 -110.68,-126.73 -23.67,-13.39 -49.07,-38.07 -74.45,-45.9 -4.09,-1.26 -10.39,0.66 -14.11,0 -23.38,-4.22 -44.42,-15.81 -68.41,-20.19 -22.59,-4.17 -46.27,-2.17 -73.08,-8.96 -13.6,-4.85 -31.03,-12.11 -41.21,-16.43 -15.74,-7.17 -31.16,-14.63 -46.55,-22.15 l -51.11,-29.2 c 0,0 -28.48,-16.49 3.06,-4.28 25.38,9.83 112.62,53.25 76.08,27.75 -25.2,-12.66 -38.87,-30.64 -61.16,-45.98 0,0 -74.99,-37.19 -86.24,-47.57 -12.37,-11.42 -27.49,-5.1 -37.41,-16.3 -11.65,-13.13 -25.94,-21.01 -36.13,-24.41 -10.17,-3.42 -21.7,-25.78 -37.31,-37.31 -15.61,-11.54 -49.52,-8.15 -79.38,-21.04 -29.85,-12.89 -60.79,-13.06 -60.79,-13.06 -2.96,-0.28 -5.83,-0.46 -8.58,-0.53 -1.18,-0.03 -2.27,-0.02 -3.4,-0.02 -17.46,-0.09 -30.81,3.32 -41.04,7.08 -12.47,4.58 -17.05,2.28 -14.25,0.76 2.8,-1.51 10.92,-9.11 10.92,-9.11 -34.83,0.04 -44.33,23.18 -60.37,40.37 7.29,1.04 28.08,-4.04 17.52,2.08 -20.85,9.97 -61.01,10.69 -61.8,34.67 -0.6,18.81 8.06,14.69 8.06,14.69 14.61,-25.44 59.69,-27.93 92.57,-27.57 61.24,0.74 102.68,34.32 142.82,53.32 13.01,7.82 28.21,18.1 28.21,18.1 l -0.08,-0.3 c 12.67,8.25 25.48,16.25 36.31,26.22 18.9,17.37 31.67,40.04 48.31,59.27 1.93,3.27 5.99,7.26 10.81,11.28 4.69,4.4 9.73,8.5 15.34,12.09 l 0.21,-0.45 2.18,1.46 -0.39,0.82 c 40.39,22.9 78.03,48.25 109.79,79.02 l 0.21,0.36 c 4.56,4.13 28.46,30.81 40,43.76 13.61,18.15 23.42,41.08 29.11,64.18 2.05,8.36 0.75,18.51 4.01,27.56 5.07,14.03 17.81,26.51 26.17,40.39 8.65,14.43 14.37,30.14 20.12,45.9 25.17,69.17 54.28,124.25 108.66,161.6 26.2,18.01 58.02,29.63 76.46,56.95 -13.39,-13.59 -30.82,-23.5 -51.87,-30.09 -59.79,-19.7 -98.68,-70.15 -118.23,-102.2 -15.01,-26.98 -26.61,-57.04 -35.14,-89.93 -2.83,40.54 -12.84,72.15 -26.17,102.84 -11.85,27.29 -22.33,56.15 -44.27,73.46 0,0 -0.84,-0.06 -4.25,1.99 -3.39,2.02 56.57,3.53 56.57,3.53 10.49,-0.38 21.17,-1.89 31.99,-3.29 2.03,0.22 4.51,0.1 7.56,-0.43 32.96,-5.82 67.21,6.45 88.55,21.98 11.08,8.06 30.34,14.52 46.32,18.89 0.26,0.69 1.82,1.47 5.81,2.23 0,0 24.42,7.63 50.37,14.76 17.58,4.81 30.38,8.5 39.27,12.89 5.15,3.28 10.05,7.22 13.85,11.91 7.61,9.39 7.76,20.66 14.1,36.73 6.31,16.03 15.96,28.49 16.1,42.24 0.45,45.08 -42.25,80.98 -88.54,56.95 45.58,11.75 77.9,-10.49 72.44,-53.28 -6.74,-52.87 -86.39,-92.05 -134.83,-112.01 -19.2,-7.91 -41.68,-17.9 -64.38,-20.19 -32.74,-3.32 -62.41,3.67 -90.56,1.84 -36.1,-2.38 -60.11,-21.47 -90.55,-23.89 -26.16,-2.07 -22.61,15.61 -45.31,17.62 -4.7,2.68 -18.98,0 -33.18,0.74 -39.25,-10.37 -64.5,7.57 -96.58,22.04 -23.14,10.45 -47.82,19.96 -72.44,22.04 -61.81,5.24 -99.39,-3.35 -149.91,2.01 -14.25,1.51 -43.81,3.31 -57.85,8.57 -43.71,16.35 -77.17,10.42 -124.65,11.1 -34.54,0.5 -66.59,2.31 -88.15,-1.47 -5.88,-1.06 -11.84,-2.57 -18.12,-3.67 -46.27,-8.09 -116.76,-12.28 -114.69,-53.26 3.44,2.35 2.48,8.74 8.04,9.18 -0.2,-7.53 -0.39,-15.05 2.01,-20.21 -26.91,0.7 -42.78,19.28 -42.25,40.41 0.9,35.93 58.71,50.95 98.59,60.61 39.98,9.64 81.5,20.94 110.69,25.7 -69.91,-10.27 -143.86,-16.88 -197.22,-42.25 -0.75,2.76 -1.23,5.42 -1.55,7.98 -4.22,19.4 -13.43,49.15 -19.91,78.07 -7.46,33.24 4.06,91.59 4.06,91.59 l 0.29,-0.34 c 4.81,29.66 10.94,42.88 16.88,60.61 12.65,37.82 53.52,49.69 82.13,53.28 -24.12,-17.04 -39.54,-38.17 -49.29,-66.46 -1.2,-10.04 -2.14,-19.46 -2.84,-27.77 21.65,67.41 82.07,92.64 82.07,92.64 l 19.34,20.86 -0.25,-0.95 c 33.36,32.26 77.42,57.26 133.43,58.83 28.22,0.79 62.32,-6.64 62.23,-34.32 -0.04,-15.65 -12.28,-28.93 -28.97,-36.27 4.91,-0.97 9.4,-0.29 13.47,1.39 l 17.34,19.41 c 5.74,14.18 5.23,32.1 -4.44,42.9 25.52,21.82 65.26,-2.65 62.36,-31.6 7.47,6.3 12.03,18.2 6.89,27.64 34.34,20.18 53.56,-28.74 88.11,-17.31 -3.25,9.79 -19.89,7.81 -24.95,15.97 45.17,6.46 84.78,-9.42 130.08,-5.82 2.84,-2.47 5.91,-4.93 9.19,-7.36 -84.73,-9.38 -15.9,-9.33 -15.9,-9.33 10.85,0.99 36.92,2.81 47.06,1.01 16.58,-3 27.29,1.04 41.95,6.77 0.35,-0.64 1.82,-0.58 2.71,1.08 7.6,3 16.35,6.31 27.47,9.31 4.31,0.61 8.64,1.72 12.84,3.09 l 1.81,0.37 0.26,0.29 c 5.8,2.02 11.27,4.44 15.96,6.71 42.69,20.52 78.1,68.84 114.56,94.19 60.42,41.99 117.63,-9.88 159.69,-43.54 l -0.27,-0.39 c 10.55,-7.2 24.46,-16.08 39.61,-25.35 39.58,-17.23 91.79,-32.28 119.67,-59.84 22.31,-22.04 29.9,-50.42 39.49,-79.88 8.96,-27.47 26.34,-51.77 36.12,-82.6 1.88,1.58 2.99,3.96 3.63,6.8 -0.27,2.63 -0.7,5.41 0.08,7.13 l 0.53,-0.48 c -0.11,5.38 -1.3,11.69 -3.14,18.33 -8.29,16.88 -22.78,36.11 -21,51.15 0,0 51.42,-26.57 109.76,-52.96 20.09,-9.09 38.48,-24.08 54.53,-41.21 l 4.69,0.1 c -0.55,-1.2 -0.5,-2.93 -0.33,-4.76 28.36,-31.78 48.46,-69.63 55.45,-91.51 1.44,-4.49 3.07,-9.04 4.83,-13.57 l 0.01,-0.05 c 2.2,-5.71 4.57,-11.35 7.02,-16.78 l 0.05,0.08 c 1.03,-1.85 1.68,-3.66 2.37,-5.49 8.42,-18.22 16.69,-33.01 18.99,-37.06 7.41,-9.21 13.39,-21.04 19.78,-31.05 2.22,-24.89 3.41,-50.09 3.41,-75.56 0,-199.46 -69.36,-382.69 -185.2,-527 -6.7,-0.78 -15.83,-2.33 -27.9,-4.8 z m -52.92,-82.53 c -40.52,-13.23 -81.83,-38.11 -108.21,-40.61 -79.4,-7.5 -93.63,27.79 -30.19,33.61 23.94,2.2 59.29,4.91 87.52,18.29 41.64,19.78 84.29,38.98 112.76,53.23 -19.47,-22.6 -40.15,-44.11 -61.88,-64.52 z m -865.53,-3.85 c -6.73,-2.26 -6.73,1.07 -6.73,1.07 0,0 -12.2,17.42 -14.09,33.64 -1.91,16.07 2.23,30.38 6.26,32.5 4.07,2.2 4.95,-7.16 8.26,-18.88 3.33,-11.84 19.78,-36.13 19.78,-36.13 2.34,-5 -6.65,-9.95 -13.48,-12.2 z m 42.43,-7.43 c -7.73,-2.57 -7.72,1.26 -7.72,1.26 0,0 -13.94,19.78 -16.06,38.24 -2.14,18.26 2.66,34.52 7.3,36.95 4.67,2.51 5.67,-8.16 9.42,-21.52 3.76,-13.43 22.6,-41.09 22.6,-41.09 2.67,-5.68 -7.71,-11.25 -15.54,-13.84 z m 14.34,51.42 c -2.66,23.12 3.53,43.78 9.47,46.91 5.98,3.19 7.21,-10.35 11.96,-27.27 4.76,-17.04 28.77,-52.08 28.77,-52.08 3.4,-7.18 -9.92,-14.29 -19.94,-17.55 -9.92,-3.24 -9.89,1.54 -9.89,1.54 0,0 -17.72,25.08 -20.37,48.45 z m 344.3,264.59 c 4.16,3.72 8.54,-4.1 16.65,-12.97 8.18,-8.98 36.92,-23.11 36.92,-23.11 4.63,-3.42 -4.59,-11.97 -12.08,-17.13 -7.47,-5.16 -8.66,-2.13 -8.66,-2.13 0,0 -21.16,9.99 -29.17,23.65 -7.97,13.46 -7.84,27.91 -3.66,31.69 z m -68.15,-36.32 c 5.11,4.79 10.57,-5.35 20.77,-16.86 10.31,-11.78 46.52,-30.52 46.52,-30.52 5.9,-4.44 -5.63,-15.55 -14.96,-22.21 -9.36,-6.66 -10.92,-2.72 -10.92,-2.72 0,0 -26.46,13.4 -36.55,31.17 -9.99,17.53 -10,36.37 -4.86,41.14 z m -60.8,-81.74 c -9,18.83 -8.22,38.34 -3.02,43.06 5.25,4.73 10.2,-6.14 19.69,-18.82 9.63,-12.88 44.35,-34.41 44.35,-34.41 5.56,-5 -6.19,-15.86 -15.65,-22.26 -9.41,-6.35 -10.8,-2.21 -10.8,-2.21 0,0 -25.38,15.51 -34.57,34.64 z m -55.66,-46.52 c -7.53,19.87 -5.51,39.81 -0.21,44.23 5.4,4.43 9.44,-7.08 17.74,-20.66 8.43,-13.86 40.51,-38.43 40.51,-38.43 5.09,-5.51 -6.92,-15.77 -16.52,-21.57 -9.48,-5.72 -10.46,-1.32 -10.46,-1.32 0,0 -23.45,17.66 -31.06,37.75 z m -75.01,-121.98 c -9.98,-3.02 -9.89,1.61 -9.89,1.61 0,0 -16.92,24.38 -18.9,46.94 -1.96,22.39 4.85,42.34 10.86,45.31 6.07,3.02 6.94,-10.05 11.14,-26.43 4.3,-16.56 27.21,-50.59 27.21,-50.59 3.18,-6.96 -10.3,-13.73 -20.42,-16.84 z m 20.3,78.13 c -4.88,22.44 -0.13,43.46 5.88,47.35 6.06,3.95 8.61,-9.17 15.12,-25.14 6.57,-16.04 35.41,-47.57 35.41,-47.57 4.31,-6.67 -9.23,-15.5 -19.66,-20.14 -10.27,-4.55 -10.72,0.28 -10.72,0.28 0,0 -21.1,22.52 -26.03,45.22 z m 271.98,527.71 c 0,0 5.87,-0.99 3.22,-9.29 -2.64,-8.28 -3.15,-33.94 4.88,-45 8.07,-11.09 -5.53,-6.88 -16.15,4.32 -10.63,11.15 -18.15,31.7 -15.86,45.66 0,0 -0.61,5.87 23.91,4.31 z m -37.52,-67.96 c 12.88,-14.37 -6.84,-10.53 -23.34,3.63 -16.48,14.11 -29.99,41.66 -28.75,61.54 0,0 -1.69,8.15 32.94,9.54 0,0 8.42,-0.53 5.81,-12.53 -2.47,-11.98 0.45,-47.93 13.34,-62.18 z m -87.89,-74.93 c 75.07,-4.92 128.89,21.11 167.01,47.73 10.04,7 23.31,24.05 40.27,12.85 -7.23,-14.98 -26.39,-24.85 -42.26,-33.04 -27.81,-14.37 -52.47,-26.94 -84.52,-34.9 54.02,8.26 92.4,30.76 132.81,51.42 4.95,-10.38 10.51,-31.21 14.16,-48.84 l 0.52,0.05 c 0,0 3.67,-9.88 2.58,-19.53 0.15,-4.6 -0.78,-8.56 -4.07,-10.74 -1.11,-1.42 -2.44,-2.73 -4.11,-3.82 -14.75,-9.67 -58.52,-31.04 -93.63,-33.58 -1.16,-0.07 -2.27,-0.22 -3.42,-0.33 l -2.59,-0.73 -0.07,0.48 c -31.84,-3.69 -52.44,-16.81 -11.72,-10.12 40.74,6.72 128,21.57 96.21,9.62 l 0.11,0.02 c -39.69,-15.51 -91.77,-30.69 -142.89,-25.71 -33.03,3.2 -67.2,19.4 -96.58,34.89 -29.34,15.45 -57.18,35.77 -88.54,42.22 -23.87,4.94 -43.59,-1.94 -64.39,-5.5 -13.85,-2.34 -33.15,-7.95 -41.54,0.7 -3.54,4.19 -0.72,8.49 -0.72,8.49 7.94,19.62 31.07,31.19 50.3,36.72 60.36,17.37 118.83,-14.55 177.08,-18.35 z m 17.01,65.76 c 12.62,-18.31 -9.29,-10.98 -26.04,7.72 -16.76,18.69 -28.07,52.35 -23.77,75.03 0,0 -0.73,9.53 38.96,5.89 0,0 9.52,-1.89 4.9,-15.19 -4.73,-13.42 -6.64,-55.1 5.95,-73.45 z m -79.92,8.72 c 12.44,-20.82 -10.82,-11.69 -27.75,9.78 -16.94,21.37 -27.09,59.1 -20.93,83.8 0,0 -0.14,10.62 42.73,4.68 0,0 10.14,-2.56 4.23,-17.09 -5.93,-14.48 -10.72,-60.33 1.72,-81.17 z m -82.62,11.5 c 12.72,-21.08 -10.85,-12.08 -28.06,9.58 -17.23,21.59 -27.69,59.9 -21.58,85.21 0,0 -0.23,10.74 43.13,5.29 0,0 10.28,-2.5 4.37,-17.35 -5.89,-14.84 -10.51,-61.7 2.14,-82.73 z m -75.72,-23.8 c 15.61,-27.27 -11.73,-15.72 -32.57,12.24 -20.82,27.97 -34.79,77.68 -29.28,110.62 0,0 -0.8,14.07 48.83,7.3 0,0 11.92,-3.09 6.02,-22.58 -5.92,-19.36 -8.62,-80.28 7,-107.58 z m -80.38,20.29 c 15.56,-23.8 -11.82,-14.71 -32.58,9.48 -20.74,24.17 -34.4,68.31 -28.65,98.18 0,0 -0.78,12.63 49.05,8.82 0,0 11.91,-2.29 5.83,-19.98 -6.03,-17.69 -9.15,-72.64 6.35,-96.5 z m -85.14,27.74 c 10.98,-20.46 -10.36,-11.36 -25.48,9.78 -15.12,21.03 -23.44,58.05 -17.05,82.25 0,0 0.14,10.39 39.73,4.3 0,0 9.4,-2.58 3.46,-16.71 -5.88,-14.2 -11.63,-59.14 -0.66,-79.62 z m -64.93,17.69 c 10.31,-16.32 -8.4,-9.23 -22.34,7.51 -13.92,16.76 -22.72,46.32 -18.28,65.79 0,0 -0.36,8.33 33.87,3.93 0,0 8.22,-1.94 3.71,-13.4 -4.32,-11.4 -7.32,-47.51 3.04,-63.83 z m -68.19,-11.78 c 12.6,-18.31 -9.3,-10.98 -26.05,7.74 -16.75,18.69 -28.06,52.34 -23.76,75.03 0,0 -0.74,9.51 38.95,5.89 0,0 9.52,-1.89 4.9,-15.21 -4.74,-13.41 -6.63,-55.07 5.96,-73.45 z m -55.02,4.85 c 12.88,-14.35 -6.83,-10.55 -23.32,3.6 -16.5,14.13 -30.01,41.69 -28.77,61.56 0,0 -1.68,8.15 32.94,9.54 0,0 8.42,-0.53 5.83,-12.55 -2.48,-11.98 0.43,-47.93 13.32,-62.15 z m 755.27,-755.37 c -38.14,-13.18 -105.91,-46.26 -160.35,-73.94 -13.01,-0.6 -26.11,-0.94 -39.29,-0.94 -465.3,0 -842.48,377.19 -842.48,842.49 0,360.48 226.45,668 544.82,788.29 1.61,-1.49 3.31,-2.93 5.11,-4.33 3.61,-2.81 9.58,-4.3 12.67,-8 4.11,-4.94 2.4,-14.97 4.19,-21.16 5.55,-19.11 17.35,-36.65 37,-50.99 2.87,-2.12 8.35,-3.14 10.85,-5.95 5.47,-6.21 3.88,-16.65 8.01,-23.83 4.35,-7.55 11.76,-16.67 20.9,-23.69 5.01,-3.86 12.5,-5.92 17.18,-10.52 3.79,-3.71 4.84,-10.39 7.55,-15.95 7.34,-15.01 26.73,-32.41 36.04,-48.12 1.23,-2.07 2.19,-4.27 3,-6.51 3.88,-7.99 13.26,-24.92 26.05,-32.75 0,0 1.33,-23.51 24.78,-50.31 -47.5,2.56 -93.32,29.42 -128.56,2.74 -10.17,11.1 -42.79,19.8 -56.75,4.23 -10.31,17.92 -64.99,29.36 -75.62,1.04 -77.73,34.87 -171.54,-14.85 -201.69,-64.76 -5.6,-2.67 -10.83,-5.48 -15.77,-8.37 -21.28,6.4 -50.1,8.67 -81.29,-13.82 -30.74,-22.18 -62.88,-121.66 -57.35,-190.53 0.6,-7.38 14.59,-24.8 19.62,-59.7 5,-34.62 8.81,-45.99 8.81,-45.99 -6.84,-11.93 -15,-17.26 -16.11,-31.22 -2.41,-30.21 23.42,-46.63 47.62,-62.1 8.61,-4.01 18.36,-6.89 28.94,-7.27 6.39,-10.12 31.01,-44.33 71.72,-44.33 1,0 2.03,0.07 3.03,0.13 15.54,-13.07 31.75,-16.58 20.56,-0.47 -0.92,1.33 -1.71,2.82 -2.45,4.35 7.48,-4.43 16.54,-8.77 24.61,-9.56 0.16,-0.01 3.96,-0.97 7.13,-0.97 1.12,0 4.46,0 5.64,2.57 1.17,2.58 -1.21,5.35 -1.99,6.23 -3.26,3.76 -6.93,13.54 -9.69,22.65 2.98,-5.46 6.23,-10.66 9.87,-15.13 19.37,-23.78 46.47,-35.02 31.34,-11.36 -4.86,7.58 -7.63,17.91 -8.98,28.88 7.5,-9.25 20.42,-19.99 41.43,-24.29 17.36,-16.51 38.94,-23.26 26.01,-5.71 -3.3,4.49 -5.46,10.27 -6.75,16.59 10.47,-12.55 28.17,-28.68 49.88,-28.68 l 1.58,0.04 0.44,0.02 c 14.89,-10.07 27.36,-11.75 16.22,2.77 -4.83,6.32 -7.46,15.08 -8.64,24.34 9.84,-20.08 28.82,-47.69 61.49,-56.57 0.24,-0.09 5.87,-1.65 10.52,-1.65 3.63,0 5.91,0.93 7,2.92 1.58,2.85 -0.5,6.17 -1.18,7.26 -2.11,3.38 -4.07,7.59 -5.77,11.74 14.67,-8.6 25.51,-9.33 14.1,4.68 -5.9,7.22 -9.05,17.42 -10.34,27.95 7.97,-21.31 24.22,-51.23 56.3,-70.83 0.24,-0.11 6.01,-2.84 12.42,-2.84 3.09,0 5.84,0.65 8.23,1.85 2.04,1.05 3.38,2.77 3.93,4.98 1.67,6.68 -4.67,16.16 -5.24,16.93 -2.64,5.2 -7.48,16.18 -9.86,25.78 l 0.24,-0.19 c 23.19,-18.71 53.29,-27.37 34.72,-8.72 -11.27,11.35 -15.62,30.79 -16,46.67 6.77,-19.01 23.24,-51.94 57.35,-58.45 0.23,-0.02 5.52,-1.04 9.42,-1.04 2.17,0 4.78,0.25 5.69,2.33 0.4,0.88 0.56,2.3 -0.99,4.04 -2.55,2.86 -6.18,11.52 -8.1,18.52 1.62,-1.24 3.19,-2.55 4.89,-3.63 16.54,-10.85 36.06,-16.54 38.61,-13.02 5.29,-4.34 13.57,-10.03 24.82,-14.99 1.05,-2.39 2.09,-4.82 2.93,-7.24 0,0 5.25,-14.59 7.27,-22.48 -26.76,6.93 -72.56,20.35 -106.65,12.83 -26.92,-5.92 -97.1,-44.72 -80.12,-71.99 1.13,-1.82 2.58,-3.09 4.24,-4.11 l 1.05,-0.4 c 6.7,-3.57 18.52,-5.67 30.95,-5.57 l 4.52,0.13 c 7.22,0.39 26.15,3.12 32.56,5.2 18.77,6.1 35.53,2.43 35.53,2.43 l -0.24,-0.17 c 13.34,-1.55 27.41,-6.24 41.94,-13.66 15.61,-7.94 36.85,-21.06 42.26,-27.53 9.76,-11.73 -5.19,-39.21 -10.76,-56.13 -0.27,-1 -0.61,-2.04 -0.93,-3.08 l -0.4,-1.4 -0.05,0.03 c -0.79,-2.37 -1.76,-4.86 -2.8,-7.4 -0.95,1.19 -1.79,2.34 -2.43,3.42 -5.34,8.98 -8.21,16.84 -10.97,13.23 -2.76,-3.62 -2.89,-17.96 2.36,-31.49 0.54,-1.4 1.2,-2.73 1.91,-4.06 -6.05,-11.06 -13.38,-22.64 -21.11,-33.75 -6.02,5.7 -12.11,12.11 -15.05,17.23 -6.87,11.76 -10.53,22.09 -14.04,17.35 -3.54,-4.72 -3.64,-23.77 3.09,-41.67 2.2,-5.83 5.55,-11.11 9.07,-15.73 -5.34,-6.74 -10.55,-12.95 -15.3,-18.23 -2.13,-2.34 -4.65,-4.99 -7.32,-7.74 -7.34,7.56 -16.63,17.94 -20.38,25.45 -6.54,13.12 -9.91,24.3 -13.63,19.54 -3.71,-4.8 -4.43,-24.95 1.75,-44.43 2.55,-7.98 6.93,-15.27 11.27,-21.19 -7.96,-7.58 -16.6,-15.59 -25.47,-23.67 -5.38,7.14 -10.69,14.98 -13.12,20.98 -5.83,14.19 -8.6,26.23 -12.54,21.61 -3.88,-4.63 -5.58,-25.57 -0.35,-46.44 1.29,-5.15 3.26,-10.09 5.5,-14.67 -8.79,-7.86 -17.3,-15.38 -25.11,-22.19 -2.29,4.97 -4.2,9.69 -5.26,13.58 -4.58,16.9 -6.3,30.85 -10.81,26.57 -4.51,-4.18 -8.35,-26.68 -5.05,-50.59 0.31,-2.3 0.76,-4.57 1.27,-6.85 l -2.2,-1.89 c -5.11,-4.41 -10.66,-9.72 -16.39,-15.56 -1.43,4.49 -2.54,8.7 -3.12,12.19 -2.91,17.61 -3.35,31.7 -7.98,28.33 -4.6,-3.31 -10.11,-25.03 -9,-49.33 0.17,-3.82 0.63,-7.68 1.27,-11.45 -6.74,-7.6 -13.41,-15.44 -19.69,-23.09 -3.64,9.35 -6.93,19.01 -8.2,26 -3.33,18.42 -4.03,33.23 -8.74,29.6 -4.31,-3.29 -9.05,-23.01 -8.53,-45.96 -4.7,-3.44 -10.79,-19.44 -10.99,-37.57 -0.09,-6.17 1.01,-12.49 2.51,-18.2 -3.05,-4.3 -8.38,-7.28 -12.11,-12.52 -19.24,-26.91 -11.39,-58.98 30.18,-66.11 12.74,-39.25 45.04,-58.31 94.58,-58.76 6.65,-0.06 13.6,2.26 20.12,1.85 7.36,-0.49 13.42,-3.48 20.13,-3.69 36.11,-1.1 55.04,10.39 82.49,18.39 20.47,5.94 41.6,7.84 54.34,12.84 19.51,7.65 28.78,28.62 44.26,38.56 5.77,3.7 16.64,5.44 26.17,11.01 8.04,4.73 15,13.32 22.13,16.53 6.23,2.82 16.6,2.26 24.14,5.51 12.64,5.48 26.6,17.31 42.27,25.73 32.81,17.55 59.51,30.53 94.57,45.89 16.75,7.34 34.47,24.6 44.27,25.71 11.62,1.34 25.15,-8.36 34.21,-7.34 18.46,-21.95 24.89,-52.62 24.12,-92.06 1.09,-0.11 0.29,-9.78 0.29,-9.78 0,0 6.45,-84.66 -125.77,-130.38 z M 2319.1,3773.92 c 13.83,-3.85 29.29,-11.71 14.56,-35.21 -9.06,9.68 -12.13,22.44 -14.56,35.21 z m 26.38,-30.96 c 4.42,7.74 0.02,11.68 2.36,16.37 39.74,-5.12 43.17,-33.03 26,-72.62 -26.49,8.95 -33.54,26.66 -38.58,44.64 4.25,4.61 7.55,6.9 10.22,11.61 z m 43.39,-7.87 c 36.99,-16.3 42.8,-57.19 17.22,-110.53 -8.74,5.74 -15.55,12.62 -20.46,20.22 -3.89,6.03 -9.35,15.9 -8.18,24.01 0.82,5.58 5.24,13.07 7.5,19.31 6.47,17.93 8.99,34.11 3.92,46.99 z m 177.23,-155.25 c -0.64,1.95 0.67,1.89 2.28,3.33 55.29,-11.22 59.69,-65.17 35.95,-105.83 -11.26,-19.25 -22.27,-29.38 -39.55,-24.01 -14.3,4.46 -16.25,15.95 -23.14,23.85 28.17,41.04 27.62,71.27 24.46,102.66 z m -63.91,40.61 c -0.24,5.01 -1.15,10.58 0.87,15.52 4.77,-0.4 13.12,-1.61 19.95,-5.23 31.05,-16.4 43.9,-75.07 25.85,-109.56 -7.75,-14.78 -15.59,-21.96 -30.09,-17.81 -23.4,6.72 -30.19,33.21 -39.62,44.17 25.51,27.2 24.04,51.08 23.04,72.91 z m -74.76,73.65 1.52,0.74 c 60.84,-21.44 95.74,-61.97 40.45,-136.4 -21.08,10.57 -32.94,24.68 -38.43,40.68 -3.23,9.38 -5.72,10.51 -3.53,22.15 4.69,25.14 6.27,52.87 -0.01,72.83 z m 236.11,-312.56 c -2.27,-1.01 -3.87,-1.76 -3.87,-1.76 -7.39,-3.78 -15.16,-6.03 -22.54,-7.31 -45.74,9.82 -59.56,61.95 -59.56,61.95 42.74,18.79 66.89,72.89 51.68,102.65 0.43,1.11 1.42,0.93 2.42,0.7 19.37,-8.54 39.75,-22.88 49.66,-38.41 18.83,-29.45 24.41,-73.75 8.73,-109.34 -6.98,-1.61 -11.46,-3.21 -17.08,-5.19 -0.95,-0.25 -1.94,-0.54 -2.92,-0.88 l -5.22,-1.92 -0.53,-0.21 -0.82,-0.27 0.05,-0.01 z m 73.78,36.96 c -3.13,-2.66 -6.21,-5.27 -9.06,-7.69 -2.62,-5.02 -10.66,-11.66 -20.93,-16.01 8.15,24.72 9.13,50.99 9.7,70.45 16.84,-8.75 28.08,-20.77 34.57,-34.43 -2.08,-1.8 -4.21,-3.66 -6.4,-5.55 -2.88,5.37 -6.87,10.23 -12.09,14.35 2.36,-6.86 3.71,-13.9 4.21,-21.12 z m -92.4,328 c 412.7,0 756.05,-296.74 828.41,-688.48 -7.89,5.56 -16.59,10.5 -26.45,14.61 -20.63,92.05 -65.01,150.17 -156.18,183.4 -30.56,11.13 -59.51,24.02 -89.66,37.15 1.74,97.97 -112.11,95.91 -183.06,146.34 -30.86,21.99 -65.84,62.56 -101.14,70.06 -68.27,14.52 -110.27,-33.06 -150.59,-66.3 -9.89,10.8 -24.72,21.35 -46.23,30.94 0,0 -38.48,54.88 -56.43,65.21 -1.19,0.68 -1.98,1.3 -2.5,1.92 -9.92,4.65 -22.34,7.27 -31.12,13.07 -8.67,5.7 -10.31,19.19 -18.99,25.7 -4.25,3.19 -10.84,6.65 -16.6,8.96 -6.96,2.79 -18.88,2.27 -25.88,6.1 -8.63,4.73 -9.32,20.11 -15.57,27.74 -6.89,8.43 -15.75,15.32 -30.08,20.14 -5.81,1.93 -14.59,2.06 -19.84,4.87 -5.86,3.17 -7.29,13.09 -11.83,19.17 -10.55,14.18 -28.36,25.18 -48.68,32.36 -4.37,1.54 -10.25,1.54 -13.45,3.69 -3.77,2.51 -4.21,8.78 -6.49,13.58 70.85,19.35 145.38,29.77 222.36,29.77 z m 836.59,-742.56 c -8.56,14.67 -16.48,28.78 -19.38,41.21 5.81,-3.84 10.91,-8.12 15.58,-12.68 1.44,-9.45 2.67,-18.97 3.8,-28.53 z m -836.59,785.09 c -91.12,0 -179,-13.85 -261.73,-39.43 -0.93,1.64 -1.92,3.24 -3.23,4.52 -7.64,7.44 -16.71,13.1 -35.56,8.27 -6.68,8.65 -15.49,15.6 -29.86,18.55 l -0.45,-0.77 c 1.82,-17.15 4.28,-34.48 17.33,-46.35 l -0.19,-2.08 C 1997.3,3605.11 1759.91,3282.33 1759.91,2904 c 0,-488.79 396.23,-885.02 885.01,-885.02 488.78,0 885.04,396.23 885.04,885.02 0,488.81 -396.26,885.03 -885.04,885.03 z M 2195.1,3323.54 c 0,0 -34.81,-7.93 -44.29,-69.48 0,0 -1.65,-31.07 8.08,-24.19 -8.2,37.31 27.27,54.21 35.41,58.01 11.45,5.09 20.91,3.38 21.63,-6.34 0.78,-10.49 -11.21,-15.13 -14.8,-25.94 12.73,7.18 41.2,24 38.24,45.9 -2.18,16.1 -17.34,30.4 -44.27,22.04 z m 457.68,-37.78 c -59.82,35.02 -214.44,28.94 -250.75,31.75 -35.74,2.72 -53.6,-42.72 -53.6,-42.72 -0.47,-9.62 7.4,1.41 7.4,1.41 23.35,42.08 43.88,34.38 43.88,34.38 73.99,-21.61 87.17,-130.29 90.25,-155.48 3.06,-25 9.38,-8.72 9.38,-8.72 7.19,62.54 -38.41,138.76 -48,148.55 -9.58,9.73 -0.43,15.23 30.13,6.68 92.03,-25.84 100.65,-173.22 106.2,-191.09 5.54,-17.8 9,-0.68 9,-0.68 -12.45,135.51 -63.96,168.92 -77.69,187.56 -5.7,7.73 40.82,8.9 61.31,-4.43 115.64,-74.71 102.66,-217.79 113.07,-197.37 10.55,20.85 -29.1,150.34 -84.81,194.41 -11.15,8.79 38.66,-6.58 57.02,-23.49 87,-80.41 97.7,-167.53 104.39,-192.7 6.57,-25 9.78,-16.53 9.78,-16.53 1.21,85.15 -66.26,193.01 -126.96,228.47 z m 167.67,59.29 c 12.83,6.96 27.96,52.1 59.04,33.35 23.1,-13.93 34.1,-17.46 34.1,-17.46 0,0 -16.13,-4.53 -23.47,-16.63 -7.34,-12.1 -16.14,-21.41 -41.81,-17.62 -26.95,4.02 -31.88,-0.21 -45.46,-2.42 0,0 4.76,13.79 17.6,20.78 z m -49.59,-36.2 c 19.79,-4.3 38.04,-11.99 56.34,-23.86 20.27,-13.17 42.21,-37.36 72.44,-34.91 9.64,0.77 27.16,10.1 34.21,14.7 8.82,5.75 29.74,19.45 24.15,40.39 -2.48,9.3 -13.54,10.78 -20.13,18.37 -9.13,10.56 -8.78,20.93 -16.09,33.05 15.93,-3.2 25.06,-12.64 42.24,-14.7 -27.07,24.28 -58.26,44.78 -96.58,58.78 2.88,1.63 4.71,8.31 14.09,11.01 8.45,2.44 35.7,-1.72 18.11,1.85 -17.66,4.94 -28.62,-0.09 -40.23,-7.36 -26.68,-16.67 -48.41,-54.95 -76.48,-71.6 -12.18,-7.27 -24.09,-5.6 -34.22,-18.39 6.56,-13.1 13.21,-5.39 22.15,-7.33 z m 209.28,23.88 c -6.66,-3.87 4.19,-7.38 6.03,-9.19 7.67,-7.55 24.8,-21.4 30.18,-33.05 11,-23.83 7.62,-60.3 -12.08,-73.48 -13.27,-8.86 -78.22,-33.08 -106.63,-33.05 -79.93,0.11 -88.04,87.86 -136.84,117.54 0.87,-8.4 7,-25.99 13.98,-35.11 27.44,-35.83 53.66,-109.66 130.81,-97.33 27.26,4.36 78.26,23.19 98.72,35.98 22.22,13.85 38.72,67.03 16.08,96.46 -10.14,13.18 -34.41,29.88 -40.25,31.23"
- style="fill:#403c3d;fill-opacity:1;fill-rule:evenodd;stroke:none"
- id="path76" />
- </g>
- </g>
- <path
- inkscape:connector-curvature="0"
- d="m 376.40655,56.024215 0,23.8525 24.42625,0 0,-23.8525 -24.42625,0 z m 0.09,131.692505 24.24875,0 0,-96.436255 -24.24875,0 0,96.436255 z m 305.7425,-96.436255 -35.3525,96.436255 -18.88,0 -35.5375,-96.436255 25.3575,0 19.61875,59.602505 19.43625,-59.602505 25.3575,0 z m -97.74375,96.436255 -23.5075,0 0,-8.885 c -6.29375,6.66375 -14.31625,9.995 -24.06125,9.995 -9.505,0 -17.09375,-2.83625 -22.76875,-8.51375 -6.54125,-6.53875 -9.80875,-15.67 -9.80875,-27.39375 l 0,-61.638755 24.2475,0 0,58.306255 c 0,6.04875 1.70625,10.61625 5.12125,13.6975 2.80625,2.5925 6.34375,3.8875 10.61125,3.8875 4.39,0 7.99,-1.295 10.79625,-3.8875 3.4125,-3.08125 5.12125,-7.64875 5.12125,-13.6975 l 0,-58.306255 24.24875,0 0,96.436255 z m -114.8675,-48.31 c 0,-8.51375 -0.67125,-14.6225 -2.0125,-18.32375 -2.44125,-6.17 -7.1375,-9.255 -14.09,-9.255 -6.95625,0 -11.6525,3.085 -14.09125,9.255 -1.34125,3.70125 -2.0125,9.81 -2.0125,18.32375 0,8.515 0.67125,14.62375 2.0125,18.32375 2.43875,6.295 7.135,9.44125 14.09125,9.44125 6.9525,0 11.64875,-3.14625 14.09,-9.44125 1.34125,-3.7 2.0125,-9.80875 2.0125,-18.32375 z m 24.24875,0 c 0,9.8725 -0.43375,17.2775 -1.29625,22.2125 -1.35875,8.02125 -4.1975,14.19125 -8.51375,18.5075 -5.80375,5.805 -13.63625,8.7 -23.50875,8.7 -9.8725,0 -17.8925,-3.3925 -24.06125,-10.18 l 0,9.07 -23.3225,0 0,-131.788755 24.2475,0 0,43.86875 c 5.77875,-6.415 13.53,-9.625 23.24625,-9.625 9.83875,0 17.64875,2.9 23.42875,8.7 4.305,4.318755 7.1325,10.488755 8.48625,18.508755 0.8625,4.93625 1.29375,12.28 1.29375,22.02625 z m -130.04375,48.31 -13.69625,0 c -9.255,0 -16.4125,-2.8975 -21.47125,-8.69875 -4.4425,-5.05875 -6.6625,-11.35125 -6.6625,-18.88 l 0,-104.210005 24.2475,0 0,102.730005 c 0,5.80125 2.8075,8.69875 8.42375,8.69875 l 9.15875,0 0,20.36"
- style="fill:#403c3d;fill-opacity:1;fill-rule:nonzero;stroke:none"
- id="path74" />
- <g
- transform="matrix(0.23169071,0,0,-0.23371708,-280.79355,1099.9435)"
- id="g66-4">
- <g
- id="g68-1"
- clip-path="url(#clipPath70-6)">
- <g
- id="g3197"
- transform="translate(-350.10267,-350.10267)">
- <path
- id="path76-6"
- style="fill:#e9e9e9;fill-opacity:1;fill-rule:evenodd;stroke:none"
- d="m 3504.81,2908.41 c 0,-483.58 -391.32,-875.6 -874.02,-875.6 -482.71,0 -874,392.02 -874,875.6 0,483.61 391.29,875.63 874,875.63 482.7,0 874.02,-392.02 874.02,-875.63"
- inkscape:connector-curvature="0" />
- <path
- id="path78"
- style="fill:#403c3d;fill-opacity:1;fill-rule:evenodd;stroke:none"
- d="m 3482.08,2908.41 c 0,-471 -381.13,-852.83 -851.29,-852.83 -470.16,0 -851.27,381.83 -851.27,852.83 0,471.02 381.11,852.85 851.27,852.85 470.16,0 851.29,-381.83 851.29,-852.85"
- inkscape:connector-curvature="0" />
- <path
- id="path80"
- style="fill:#adda1a;fill-opacity:1;fill-rule:nonzero;stroke:none"
- d="m 3473.33,3029.95 c -6.42,7.53 -13.81,14.41 -22.76,20.33 3.77,-16.2 15.99,-35.21 27.12,-54.62 -1.18,11.52 -2.73,22.91 -4.36,34.29 z M 3070.25,2284 c -63.63,-5.85 -49.36,-41.32 30.29,-33.77 29.21,2.77 76.64,33.01 121.13,44.56 22.41,21.66 43.74,44.44 63.68,68.43 -27,-14.62 -77.9,-37.33 -127.3,-60.84 -28.31,-13.46 -63.77,-16.17 -87.8,-18.38 z m 409,691.11 c -9.21,11.12 -16.63,28.08 -26.56,40.46 -2.32,4.07 -10.61,18.92 -19.05,37.24 -0.7,1.84 -1.35,3.66 -2.39,5.51 l -0.05,-0.07 c -2.45,5.45 -4.83,11.12 -7.04,16.85 l -0.01,0.06 c -1.76,4.55 -3.39,9.12 -4.84,13.64 -7.01,21.99 -27.18,60.03 -55.62,91.97 -0.17,1.83 -0.23,3.57 0.33,4.78 l -4.7,-0.11 c -16.1,17.22 -34.56,32.28 -54.71,41.42 -58.53,26.53 -110.11,53.23 -110.11,53.23 -1.79,-15.12 12.75,-34.44 21.07,-51.41 1.85,-6.68 3.04,-13.01 3.15,-18.42 l -0.53,0.48 c -0.79,-1.72 -0.36,-4.51 -0.09,-7.16 -0.63,-2.86 -1.75,-5.25 -3.64,-6.83 -9.8,30.98 -27.24,55.39 -36.22,83.01 -9.63,29.6 -17.24,58.12 -39.62,80.27 -27.97,27.69 -80.34,42.83 -120.05,60.13 -15.2,9.33 -29.15,18.25 -39.73,25.48 l 0.27,0.4 c -42.2,33.83 -99.59,85.95 -160.2,43.76 -36.58,-25.48 -72.09,-74.05 -114.92,-94.66 -4.7,-2.29 -10.18,-4.72 -16.01,-6.75 l -0.25,-0.29 -1.82,-0.38 c -4.22,-1.37 -8.56,-2.48 -12.88,-3.09 -11.15,-3.02 -19.94,-6.36 -27.56,-9.36 -0.89,-1.67 -2.36,-1.72 -2.72,-1.08 -14.7,-5.76 -25.44,-9.82 -42.09,-6.82 -10.16,1.82 -36.31,-0.01 -47.19,-1.01 0,0 -69.05,-0.05 15.93,9.37 -3.27,2.46 -6.36,4.92 -9.21,7.4 -45.43,-3.61 -85.18,12.35 -130.49,5.85 5.09,-8.21 21.77,-6.21 25.04,-16.05 -34.67,-11.48 -53.95,37.68 -88.39,17.4 5.15,-9.48 0.58,-21.45 -6.91,-27.78 2.9,29.09 -36.96,53.69 -62.56,31.76 9.7,-10.86 10.2,-28.86 4.46,-43.12 l -17.4,-19.5 c -4.08,-1.69 -8.59,-2.37 -13.51,-1.4 16.74,7.37 29.01,20.73 29.06,36.46 0.09,27.81 -34.12,35.28 -62.43,34.49 -56.18,-1.59 -100.39,-26.71 -133.84,-59.13 l 0.24,0.95 -19.4,-20.96 c 0,0 -60.6,-25.35 -82.33,-93.09 0.7,8.35 1.64,17.81 2.85,27.9 9.79,28.43 25.25,49.66 49.44,66.79 -28.7,-3.61 -69.69,-15.54 -82.38,-53.55 -5.96,-17.81 -12.11,-31.1 -16.94,-60.9 l -0.29,0.34 c 0,0 -11.55,-58.65 -4.07,-92.05 6.5,-29.06 15.74,-58.97 19.98,-78.46 0.31,-2.57 0.8,-5.25 1.55,-8.02 53.53,25.5 127.71,32.14 197.84,42.47 -29.28,-4.79 -70.93,-16.14 -111.03,-25.84 -40.01,-9.7 -98.01,-24.8 -98.91,-60.92 -0.53,-21.23 15.39,-39.9 42.38,-40.6 -2.4,5.18 -2.21,12.74 -2.01,20.32 -5.57,-0.46 -4.61,-6.86 -8.07,-9.23 -2.07,41.18 68.63,45.39 115.05,53.52 6.31,1.1 12.28,2.63 18.18,3.7 21.63,3.79 53.78,1.97 88.43,1.46 47.63,-0.67 81.2,5.28 125.04,-11.15 14.08,-5.29 43.74,-7.09 58.03,-8.62 50.68,-5.38 88.38,3.26 150.38,-2.01 24.7,-2.09 49.47,-11.64 72.68,-22.15 32.18,-14.54 57.5,-32.58 96.88,-22.16 14.24,-0.73 28.56,1.95 33.28,-0.73 22.77,-2.03 19.21,-19.81 45.45,-17.71 30.54,2.43 54.62,21.61 90.84,24.01 28.24,1.84 57.99,-5.19 90.84,-1.86 22.77,2.31 45.33,12.35 64.59,20.29 48.59,20.07 128.49,59.45 135.25,112.57 5.48,43.01 -26.95,65.35 -72.67,53.55 46.44,24.15 89.27,-11.93 88.81,-57.23 -0.13,-13.82 -9.81,-26.35 -16.14,-42.45 -6.37,-16.16 -6.51,-27.48 -14.14,-36.9 -3.81,-4.74 -8.73,-8.7 -13.9,-11.99 -8.91,-4.41 -21.76,-8.11 -39.39,-12.95 -26.03,-7.17 -50.53,-14.82 -50.53,-14.82 -4,-0.78 -5.56,-1.56 -5.83,-2.26 -16.03,-4.39 -35.35,-10.88 -46.46,-18.98 -21.4,-15.61 -55.77,-27.94 -88.83,-22.1 -3.06,0.55 -5.56,0.66 -7.59,0.44 -10.86,1.42 -21.56,2.92 -32.09,3.3 0,0 -60.14,-1.51 -56.74,-3.53 3.41,-2.07 4.26,-2.02 4.26,-2.02 22.01,-17.39 32.52,-46.38 44.41,-73.8 13.37,-30.85 23.4,-62.63 26.25,-103.36 8.55,33.04 20.19,63.26 35.25,90.38 19.61,32.19 58.62,82.91 118.6,102.69 21.12,6.63 38.61,16.58 52.03,30.26 -18.49,-27.47 -50.41,-39.13 -76.7,-57.24 -54.55,-37.54 -83.75,-92.88 -109,-162.4 -5.76,-15.84 -11.5,-31.64 -20.18,-46.15 -8.38,-13.93 -21.17,-26.48 -26.25,-40.58 -3.28,-9.09 -1.97,-19.3 -4.03,-27.7 -5.7,-23.21 -15.54,-46.26 -29.19,-64.5 -11.59,-13.02 -35.57,-39.82 -40.13,-43.98 l -0.22,-0.36 c -31.85,-30.92 -69.62,-56.39 -110.13,-79.41 l 0.39,-0.82 -2.18,-1.47 -0.22,0.45 c -5.62,-3.61 -10.68,-7.72 -15.38,-12.15 -4.84,-4.03 -8.91,-8.05 -10.85,-11.33 -16.68,-19.34 -29.5,-42.11 -48.46,-59.56 -10.87,-10.02 -23.71,-18.07 -36.43,-26.37 l 0.09,0.31 c 0,0 -15.25,-10.33 -28.3,-18.19 -40.26,-19.09 -81.84,-52.85 -143.27,-53.58 -32.98,-0.36 -78.22,2.15 -92.87,27.71 0,0 -8.68,4.13 -8.07,-14.77 0.78,-24.11 41.07,-24.82 61.99,-34.85 10.59,-6.14 -10.26,-1.04 -17.57,-2.08 16.08,-17.27 25.62,-40.53 60.55,-40.57 0,0 -8.15,7.62 -10.95,9.16 -2.81,1.52 1.78,3.83 14.29,-0.78 10.26,-3.78 23.65,-7.19 41.17,-7.09 1.13,0 2.23,-0.02 3.41,0 2.76,0.08 5.63,0.26 8.61,0.54 0,0 31.03,0.17 60.97,13.12 29.96,12.96 63.98,9.55 79.64,21.14 15.66,11.58 27.23,34.07 37.43,37.5 10.22,3.42 24.55,11.33 36.24,24.55 9.96,11.24 25.12,4.89 37.52,16.37 11.29,10.44 86.52,47.81 86.52,47.81 22.36,15.41 36.07,33.48 61.35,46.2 36.66,25.62 -50.85,-18.01 -76.31,-27.89 -31.65,-12.26 -3.07,4.31 -3.07,4.31 l 51.26,29.33 c 15.44,7.57 30.91,15.07 46.7,22.26 10.21,4.35 27.69,11.65 41.34,16.53 26.89,6.81 50.65,4.82 73.31,8.99 24.06,4.41 45.17,16.05 68.63,20.3 3.73,0.66 10.05,-1.26 14.14,0 25.47,7.85 50.95,32.67 74.69,46.13 54.76,31.04 95.31,60.15 111.03,127.36 3.69,15.78 5.91,31.75 10.09,47.96 8.91,34.68 15.52,66.46 12.1,112.58 -2.02,27.41 -17.84,55.88 -16.14,90.44 1.6,32.49 24.4,57.21 34.31,86.74 11.84,35.26 -9.8,59.99 -42,73.32 l 0.02,0.03 c 0,0 -23.83,11.25 -33.01,11.93 -9.19,0.69 4.77,3.06 10.89,3.06 4.7,0 8.77,3.24 11.96,8.26 3.64,5.15 5.68,12.38 9.75,17.83 5.72,7.65 19.89,18.14 20.19,25.82 0.39,10.04 -16.8,23.84 -26.25,29.55 -16.3,9.86 -42.61,15.88 -64.59,25.84 -24.47,11.05 -42.11,23.26 -54.5,35.05 -6.87,17.68 -19.82,28.7 -18.17,49.84 0.41,5.36 2.38,10.54 4.14,15.93 l 0.74,1.99 c 2.04,6.89 4.85,17.63 0,29.9 -4.84,12.28 -22.46,15.85 -22.46,15.85 l -0.07,-0.01 c -9.55,3.18 -20.88,5.11 -28.78,8.33 -12.47,5.03 -22.27,11.8 -32.01,16.88 12.11,-3.84 26.84,-10.03 49.63,-12.08 10.06,-0.89 38.28,-5.95 43.6,-23.9 l 0.56,-2.02 0.47,-1.79 c 0.23,-1.02 0.4,-2.05 0.56,-3.09 0.18,-1.35 0.38,-2.66 0.41,-4.12 l 0.09,-2.09 c 0.1,-7.16 -1.4,-14.68 -4.77,-22.16 -12.95,-28.75 1.23,-50.51 22.34,-61.76 19.97,-15.69 49.52,-24.31 78.59,-35.23 23.22,-8.71 49.09,-21.54 62.26,-36.33 6.84,-11.84 10.51,-24.87 6.01,-37.26 -7.2,-13.97 -24.49,-20.05 -29.91,-37.14 6.8,-8.64 19.17,-10.55 28.26,-16.59 14.11,-9.41 24.5,-22.04 27.69,-40.18 l 0.18,-1.91 c 0.34,-2.16 0.53,-4.32 0.63,-6.51 0.03,-1.96 -0.05,-3.92 -0.08,-5.88 -1.68,-32.34 -26.5,-65.77 -33.73,-81.2 -8.16,-17.37 -5.61,-35.28 -5.61,-35.28 1.81,-7 3.64,-12.54 5.48,-16.85 3.27,-9.56 7.03,-22.96 9.88,-38.76 10.13,-22.39 21.09,-48.44 25.98,-66.09 10.22,-36.81 24.51,-102.3 4.09,-247.53 -20.41,-145.21 -215.75,-151.34 -274.96,-175.91 -40.77,-16.9 4.76,-30.67 82.01,-16.35 34.95,6.5 80.11,35.32 122.51,43.97 17.97,3.67 29.54,5.36 36.09,5.44 114.98,145.4 183.81,329.08 183.81,528.99 0,22.48 -1.13,44.67 -2.83,66.7"
- inkscape:connector-curvature="0" />
- <path
- id="path82"
- style="fill:#f4f4f4;fill-opacity:1;fill-rule:nonzero;stroke:none"
- d="m 2527.18,3484.46 c 28.26,41.24 27.7,71.63 24.53,103.17 -0.63,1.96 0.68,1.9 2.29,3.34 55.47,-11.28 59.88,-65.49 36.07,-106.35 -11.3,-19.34 -22.34,-29.53 -39.67,-24.13 -14.35,4.48 -16.31,16.03 -23.22,23.97 z m -22.94,26.32 c -23.48,6.74 -30.28,33.38 -39.75,44.39 25.59,27.33 24.12,51.34 23.12,73.26 -0.25,5.04 -1.16,10.64 0.87,15.61 4.78,-0.4 13.16,-1.62 20.01,-5.26 31.15,-16.48 44.04,-75.44 25.93,-110.1 -7.77,-14.86 -15.64,-22.08 -30.18,-17.9 z m -49.53,55.34 c -21.15,10.63 -33.04,24.8 -38.55,40.89 -3.24,9.42 -5.73,10.56 -3.54,22.26 4.71,25.26 6.29,53.13 -0.01,73.19 l 1.52,0.74 c 61.04,-21.54 96.06,-62.27 40.58,-137.08 z m 160.36,-21.48 c 0.43,1.12 1.42,0.94 2.43,0.7 19.43,-8.58 39.87,-22.99 49.81,-38.59 18.89,-29.6 24.49,-74.11 8.75,-109.89 -6.99,-1.61 -11.49,-3.22 -17.12,-5.22 -0.96,-0.25 -1.96,-0.53 -2.93,-0.88 l -5.24,-1.92 -0.53,-0.22 -0.83,-0.27 0.06,-0.02 c -2.29,-1 -3.88,-1.76 -3.88,-1.76 -7.42,-3.8 -15.21,-6.06 -22.62,-7.34 -45.89,9.86 -59.74,62.26 -59.74,62.26 42.87,18.87 67.1,73.24 51.84,103.15 z m 88.05,-72.17 c 16.89,-8.8 28.17,-20.87 34.68,-34.6 -2.09,-1.82 -4.23,-3.69 -6.42,-5.58 -2.89,5.4 -6.88,10.28 -12.13,14.42 2.37,-6.9 3.73,-13.96 4.23,-21.22 -3.14,-2.68 -6.23,-5.31 -9.09,-7.73 -2.63,-5.05 -10.69,-11.72 -20.99,-16.09 8.17,24.85 9.15,51.24 9.72,70.8 z m -311.91,160.11 c -8.77,5.76 -15.6,12.68 -20.53,20.31 -3.9,6.06 -9.38,15.98 -8.2,24.13 0.81,5.61 5.25,13.13 7.51,19.41 6.49,18.02 9.03,34.28 3.94,47.21 37.11,-16.36 42.93,-57.47 17.28,-111.06 z m -71.06,107.31 c 4.27,4.64 7.57,6.94 10.26,11.67 4.42,7.78 0.01,11.73 2.36,16.45 39.87,-5.15 43.3,-33.2 26.09,-72.98 -26.57,9 -33.65,26.79 -38.71,44.86 z m -16.21,42.78 c 13.88,-3.86 29.39,-11.76 14.6,-35.37 -9.08,9.72 -12.16,22.55 -14.6,35.37"
- inkscape:connector-curvature="0" />
- <path
- id="path84"
- style="fill:#f6836c;fill-opacity:1;fill-rule:nonzero;stroke:none"
- d="m 2529.01,2752.37 c -23.94,4.97 -43.72,-1.93 -64.59,-5.52 -13.88,-2.35 -33.24,-7.99 -41.67,0.71 -3.55,4.21 -0.72,8.52 -0.72,8.52 7.97,19.73 31.16,31.35 50.46,36.91 60.55,17.46 119.21,-14.63 177.64,-18.45 75.3,-4.94 129.29,21.21 167.54,47.98 10.06,7.04 23.37,24.16 40.39,12.92 -7.25,-15.06 -26.47,-24.97 -42.4,-33.22 -27.89,-14.43 -52.63,-27.06 -84.78,-35.07 54.18,8.3 92.69,30.91 133.23,51.69 4.96,-10.44 10.54,-31.37 14.21,-49.1 l 0.51,0.06 c 0,0 3.69,-9.93 2.6,-19.63 0.14,-4.63 -0.79,-8.61 -4.09,-10.8 -1.11,-1.42 -2.45,-2.74 -4.12,-3.84 -14.8,-9.71 -58.71,-31.2 -93.93,-33.75 -1.16,-0.06 -2.28,-0.21 -3.43,-0.33 l -2.59,-0.73 -0.08,0.49 c -31.94,-3.71 -52.6,-16.9 -11.76,-10.17 40.88,6.75 128.41,21.66 96.52,9.67 l 0.11,0.01 c -39.82,-15.58 -92.06,-30.84 -143.33,-25.84 -33.14,3.22 -67.42,19.51 -96.89,35.07 -29.44,15.53 -57.36,35.95 -88.83,42.42"
- inkscape:connector-curvature="0" />
- <path
- id="path86"
- style="fill:#f4f4f4;fill-opacity:1;fill-rule:nonzero;stroke:none"
- d="m 2326.23,2354.71 c 4.08,2.22 4.97,-7.19 8.29,-18.98 3.33,-11.89 19.84,-36.31 19.84,-36.31 2.35,-5.03 -6.67,-9.99 -13.52,-12.26 -6.76,-2.27 -6.76,1.09 -6.76,1.09 0,0 -12.23,17.5 -14.12,33.81 -1.92,16.13 2.23,30.52 6.27,32.65 z m 40.64,1.81 c 4.69,2.53 5.68,-8.19 9.45,-21.63 3.78,-13.49 22.67,-41.28 22.67,-41.28 2.68,-5.7 -7.73,-11.3 -15.59,-13.92 -7.76,-2.56 -7.75,1.26 -7.75,1.26 0,0 -13.98,19.89 -16.1,38.44 -2.15,18.35 2.67,34.69 7.32,37.13 z m 40.42,22 c 6,3.2 7.23,-10.4 12,-27.41 4.77,-17.13 28.86,-52.33 28.86,-52.33 3.41,-7.23 -9.95,-14.37 -20.01,-17.65 -9.95,-3.25 -9.92,1.56 -9.92,1.56 0,0 -17.78,25.2 -20.43,48.68 -2.68,23.23 3.53,44 9.5,47.15 z m 57.45,25.09 c 6.09,3.05 6.97,-10.1 11.18,-26.55 4.31,-16.64 27.29,-50.85 27.29,-50.85 3.2,-6.99 -10.33,-13.79 -20.48,-16.91 -10.02,-3.04 -9.92,1.62 -9.92,1.62 0,0 -16.98,24.48 -18.95,47.17 -1.98,22.49 4.86,42.54 10.88,45.52 z m 44.26,31.78 c 6.07,3.98 8.64,-9.21 15.17,-25.27 6.58,-16.12 35.51,-47.78 35.51,-47.78 4.33,-6.72 -9.26,-15.58 -19.72,-20.26 -10.3,-4.57 -10.76,0.29 -10.76,0.29 0,0 -21.15,22.63 -26.1,45.45 -4.9,22.54 -0.14,43.66 5.9,47.57 z m 48.77,40.94 c 5.41,4.47 9.46,-7.11 17.8,-20.77 8.45,-13.93 40.63,-38.61 40.63,-38.61 5.1,-5.54 -6.94,-15.85 -16.57,-21.68 -9.51,-5.74 -10.49,-1.34 -10.49,-1.34 0,0 -23.53,17.77 -31.17,37.94 -7.55,19.98 -5.51,40.01 -0.2,44.46 z m 185.39,120.94 c 4.18,3.75 8.57,-4.11 16.71,-13.01 8.21,-9.05 37.03,-23.24 37.03,-23.24 4.66,-3.43 -4.6,-12.04 -12.11,-17.22 -7.5,-5.19 -8.69,-2.14 -8.69,-2.14 0,0 -21.23,10.05 -29.26,23.76 -7.99,13.54 -7.86,28.06 -3.68,31.85 z m -83.83,-151.23 c -9.45,-6.38 -10.83,-2.22 -10.83,-2.22 0,0 -25.47,15.59 -34.69,34.81 -9.02,18.94 -8.25,38.54 -3.03,43.27 5.27,4.75 10.24,-6.17 19.76,-18.9 9.66,-12.94 44.48,-34.59 44.48,-34.59 5.58,-5.02 -6.2,-15.95 -15.69,-22.37 z m 15.48,114.75 c 5.12,4.8 10.6,-5.38 20.83,-16.95 10.35,-11.84 46.67,-30.68 46.67,-30.68 5.91,-4.46 -5.65,-15.61 -15.02,-22.3 -9.37,-6.71 -10.94,-2.75 -10.94,-2.75 0,0 -26.56,13.47 -36.67,31.33 -10.02,17.62 -10.04,36.54 -4.87,41.35 z m 101.12,357.36 c 0,0 5.89,-0.99 3.23,-9.33 -2.65,-8.32 -3.16,-34.13 4.89,-45.23 8.1,-11.15 -5.54,-6.92 -16.19,4.34 -10.67,11.21 -18.21,31.85 -15.91,45.89 0,0 -0.61,5.9 23.98,4.33 z m -37.63,-68.3 c 12.91,-14.43 -6.86,-10.58 -23.41,3.64 -16.55,14.19 -30.1,41.88 -28.85,61.86 0,0 -1.69,8.18 33.05,9.59 0,0 8.44,-0.55 5.83,-12.61 -2.48,-12.03 0.45,-48.16 13.38,-62.48 z m -71.11,-9.21 c 12.65,-18.42 -9.32,-11.03 -26.12,7.75 -16.81,18.79 -28.16,52.61 -23.84,75.41 0,0 -0.74,9.57 39.08,5.91 0,0 9.54,-1.9 4.91,-15.26 -4.74,-13.49 -6.65,-55.37 5.97,-73.81 z m -108.01,18.58 c -16.99,21.48 -27.18,59.39 -21,84.23 0,0 -0.14,10.67 42.87,4.7 0,0 10.17,-2.58 4.24,-17.17 -5.94,-14.56 -10.76,-60.64 1.73,-81.59 12.48,-20.92 -10.85,-11.75 -27.84,9.83 z m -83.19,11.35 c -17.28,21.7 -27.77,60.21 -21.65,85.66 0,0 -0.23,10.79 43.27,5.3 0,0 10.31,-2.5 4.38,-17.43 -5.91,-14.92 -10.54,-62 2.15,-83.15 12.76,-21.18 -10.88,-12.13 -28.15,9.62 z m -80.49,-21.24 c -20.89,28.13 -34.89,78.07 -29.36,111.18 0,0 -0.81,14.15 48.98,7.34 0,0 11.95,-3.12 6.04,-22.7 -5.94,-19.46 -8.65,-80.67 7.02,-108.11 15.66,-27.4 -11.77,-15.8 -32.68,12.29 z m -80.64,17.63 c -20.8,24.29 -34.51,68.64 -28.73,98.66 0,0 -0.78,12.7 49.2,8.87 0,0 11.96,-2.3 5.84,-20.09 -6.04,-17.77 -9.17,-73 6.38,-96.98 15.61,-23.92 -11.86,-14.78 -32.69,9.54 z m -78.28,28.17 c -15.16,21.15 -23.52,58.34 -17.11,82.67 0,0 0.15,10.43 39.86,4.32 0,0 9.42,-2.59 3.47,-16.79 -5.9,-14.27 -11.67,-59.43 -0.66,-80.02 11.02,-20.57 -10.39,-11.43 -25.56,9.82 z m -61.99,15.5 c -13.96,16.84 -22.79,46.55 -18.34,66.13 0,0 -0.35,8.36 33.98,3.94 0,0 8.25,-1.95 3.73,-13.46 -4.34,-11.46 -7.34,-47.75 3.05,-64.16 10.34,-16.4 -8.43,-9.27 -22.42,7.55 z m -72.12,-11.61 c -16.8,18.79 -28.15,52.6 -23.84,75.42 0,0 -0.74,9.55 39.08,5.91 0,0 9.55,-1.9 4.91,-15.28 -4.74,-13.48 -6.65,-55.36 5.98,-73.82 12.64,-18.41 -9.33,-11.03 -26.13,7.77 z m -52.45,0.72 c -16.56,14.2 -30.11,41.9 -28.86,61.87 0,0 -1.69,8.18 33.03,9.58 0,0 8.46,-0.53 5.86,-12.6 -2.5,-12.04 0.43,-48.17 13.36,-62.48 12.91,-14.42 -6.86,-10.6 -23.39,3.63"
- inkscape:connector-curvature="0" />
- <path
- id="path88"
- style="fill:#f4f4f4;fill-opacity:1;fill-rule:nonzero;stroke:none"
- d="m 2806.87,3351.66 c 12.87,7 28.05,52.37 59.22,33.53 23.17,-14 34.21,-17.55 34.21,-17.55 0,0 -16.18,-4.55 -23.54,-16.71 -7.37,-12.16 -16.19,-21.52 -41.94,-17.7 -27.04,4.02 -31.99,-0.22 -45.6,-2.44 0,0 4.76,13.86 17.65,20.87"
- inkscape:connector-curvature="0" />
- <path
- id="path90"
- style="fill:#403c3d;fill-opacity:1;fill-rule:evenodd;stroke:none"
- d="m 2731.38,3432.29 c -2.89,5.4 -6.88,10.28 -12.13,14.42 2.37,-6.9 3.73,-13.96 4.23,-21.22 -3.14,-2.68 -6.23,-5.31 -9.09,-7.73 -2.63,-5.05 -10.69,-11.72 -20.99,-16.09 8.17,24.85 9.15,51.24 9.72,70.8 16.89,-8.8 28.17,-20.87 34.68,-34.6 -2.09,-1.82 -4.23,-3.69 -6.42,-5.58 z m -55.32,-35.43 c -6.99,-1.61 -11.49,-3.22 -17.12,-5.22 -0.96,-0.25 -1.96,-0.53 -2.93,-0.88 l -5.24,-1.92 -0.53,-0.22 -0.83,-0.27 0.06,-0.02 c -2.29,-1 -3.88,-1.76 -3.88,-1.76 -7.42,-3.8 -15.21,-6.06 -22.62,-7.34 -45.89,9.86 -59.74,62.26 -59.74,62.26 42.87,18.87 67.1,73.24 51.84,103.15 0.43,1.12 1.42,0.94 2.43,0.7 19.43,-8.58 39.87,-22.99 49.81,-38.59 18.89,-29.6 24.49,-74.11 8.75,-109.89 z m -125.66,63.63 c -14.35,4.48 -16.31,16.03 -23.22,23.97 28.26,41.24 27.7,71.63 24.53,103.17 -0.63,1.96 0.68,1.9 2.29,3.34 55.47,-11.28 59.88,-65.49 36.07,-106.35 -11.3,-19.34 -22.34,-29.53 -39.67,-24.13 z m -46.16,50.29 c -23.48,6.74 -30.28,33.38 -39.75,44.39 25.59,27.33 24.12,51.34 23.12,73.26 -0.25,5.04 -1.16,10.64 0.87,15.61 4.78,-0.4 13.16,-1.62 20.01,-5.26 31.15,-16.48 44.04,-75.44 25.93,-110.1 -7.77,-14.86 -15.64,-22.08 -30.18,-17.9 z m -49.53,55.34 c -21.15,10.63 -33.04,24.8 -38.55,40.89 -3.24,9.42 -5.73,10.56 -3.54,22.26 4.71,25.26 6.29,53.13 -0.01,73.19 l 1.52,0.74 c 61.04,-21.54 96.06,-62.27 40.58,-137.08 z m -400.52,-594.93 c 0,0 8.46,-0.53 5.86,-12.6 -2.5,-12.04 0.43,-48.17 13.36,-62.48 12.91,-14.42 -6.86,-10.6 -23.39,3.63 -16.56,14.2 -30.11,41.9 -28.86,61.87 0,0 -1.69,8.18 33.03,9.58 z m 24.44,3.25 c 0,0 -0.74,9.55 39.08,5.91 0,0 9.55,-1.9 4.91,-15.28 -4.74,-13.48 -6.65,-55.36 5.98,-73.82 12.64,-18.41 -9.33,-11.03 -26.13,7.77 -16.8,18.79 -28.15,52.6 -23.84,75.42 z m 77.62,2.32 c 0,0 -0.35,8.36 33.98,3.94 0,0 8.25,-1.95 3.73,-13.46 -4.34,-11.46 -7.34,-47.75 3.05,-64.16 10.34,-16.4 -8.43,-9.27 -22.42,7.55 -13.96,16.84 -22.79,46.55 -18.34,66.13 z m 63.22,1.04 c 0,0 0.15,10.43 39.86,4.32 0,0 9.42,-2.59 3.47,-16.79 -5.9,-14.27 -11.67,-59.43 -0.66,-80.02 11.02,-20.57 -10.39,-11.43 -25.56,9.82 -15.16,21.15 -23.52,58.34 -17.11,82.67 z m 66.66,-12.18 c 0,0 -0.78,12.7 49.2,8.87 0,0 11.96,-2.3 5.84,-20.09 -6.04,-17.77 -9.17,-73 6.38,-96.98 15.61,-23.92 -11.86,-14.78 -32.69,9.54 -20.8,24.29 -34.51,68.64 -28.73,98.66 z m 80.01,-5.11 c 0,0 -0.81,14.15 48.98,7.34 0,0 11.95,-3.12 6.04,-22.7 -5.94,-19.46 -8.65,-80.67 7.02,-108.11 15.66,-27.4 -11.77,-15.8 -32.68,12.29 -20.89,28.13 -34.89,78.07 -29.36,111.18 z m 88.2,-4.28 c 0,0 -0.23,10.79 43.27,5.3 0,0 10.31,-2.5 4.38,-17.43 -5.91,-14.92 -10.54,-62 2.15,-83.15 12.76,-21.18 -10.88,-12.13 -28.15,9.62 -17.28,21.7 -27.77,60.21 -21.65,85.66 z m 83.84,-12.78 c 0,0 -0.14,10.67 42.87,4.7 0,0 10.17,-2.58 4.24,-17.17 -5.94,-14.56 -10.76,-60.64 1.73,-81.59 12.48,-20.92 -10.85,-11.75 -27.84,9.83 -16.99,21.48 -27.18,59.39 -21,84.23 z m 79.05,-19.65 c 0,0 -0.74,9.57 39.08,5.91 0,0 9.54,-1.9 4.91,-15.26 -4.74,-13.49 -6.65,-55.37 5.97,-73.81 12.65,-18.42 -9.32,-11.03 -26.12,7.75 -16.81,18.79 -28.16,52.61 -23.84,75.41 z m 101.86,1.14 c 0,0 8.44,-0.55 5.83,-12.61 -2.48,-12.03 0.45,-48.16 13.38,-62.48 12.91,-14.43 -6.86,-10.58 -23.41,3.64 -16.55,14.19 -30.1,41.88 -28.85,61.86 0,0 -1.69,8.18 33.05,9.59 z m 98.58,-102.42 c 10.06,7.04 23.37,24.16 40.39,12.92 -7.25,-15.06 -26.47,-24.97 -42.4,-33.22 -27.89,-14.43 -52.63,-27.06 -84.78,-35.07 54.18,8.3 92.69,30.91 133.23,51.69 4.96,-10.44 10.54,-31.37 14.21,-49.1 l 0.51,0.06 c 0,0 3.69,-9.93 2.6,-19.63 0.14,-4.63 -0.79,-8.61 -4.09,-10.8 -1.11,-1.42 -2.45,-2.74 -4.12,-3.84 -14.8,-9.71 -58.71,-31.2 -93.93,-33.75 -1.16,-0.06 -2.28,-0.21 -3.43,-0.33 l -2.59,-0.73 -0.08,0.49 c -31.94,-3.71 -52.6,-16.9 -11.76,-10.17 40.88,6.75 128.41,21.66 96.52,9.67 l 0.11,0.01 c -39.82,-15.58 -92.06,-30.84 -143.33,-25.84 -33.14,3.22 -67.42,19.51 -96.89,35.07 -29.44,15.53 -57.36,35.95 -88.83,42.42 -23.94,4.97 -43.72,-1.93 -64.59,-5.52 -13.88,-2.35 -33.24,-7.99 -41.67,0.71 -3.55,4.21 -0.72,8.52 -0.72,8.52 7.97,19.73 31.16,31.35 50.46,36.91 60.55,17.46 119.21,-14.63 177.64,-18.45 75.3,-4.94 129.29,21.21 167.54,47.98 z m -41.74,95.63 c 0,0 5.89,-0.99 3.23,-9.33 -2.65,-8.32 -3.16,-34.13 4.89,-45.23 8.1,-11.15 -5.54,-6.92 -16.19,4.34 -10.67,11.21 -18.21,31.85 -15.91,45.89 0,0 -0.61,5.9 23.98,4.33 z m 8.86,-374.35 c -7.5,-5.19 -8.69,-2.14 -8.69,-2.14 0,0 -21.23,10.05 -29.26,23.76 -7.99,13.54 -7.86,28.06 -3.68,31.85 4.18,3.75 8.57,-4.11 16.71,-13.01 8.21,-9.05 37.03,-23.24 37.03,-23.24 4.66,-3.43 -4.6,-12.04 -12.11,-17.22 z m -57.5,-52.94 c -9.37,-6.71 -10.94,-2.75 -10.94,-2.75 0,0 -26.56,13.47 -36.67,31.33 -10.02,17.62 -10.04,36.54 -4.87,41.35 5.12,4.8 10.6,-5.38 20.83,-16.95 10.35,-11.84 46.67,-30.68 46.67,-30.68 5.91,-4.46 -5.65,-15.61 -15.02,-22.3 z m -67.96,-44.82 c -9.45,-6.38 -10.83,-2.22 -10.83,-2.22 0,0 -25.47,15.59 -34.69,34.81 -9.02,18.94 -8.25,38.54 -3.03,43.27 5.27,4.75 10.24,-6.17 19.76,-18.9 9.66,-12.94 44.48,-34.59 44.48,-34.59 5.58,-5.02 -6.2,-15.95 -15.69,-22.37 z m -59.7,-50.77 c -9.51,-5.74 -10.49,-1.34 -10.49,-1.34 0,0 -23.53,17.77 -31.17,37.94 -7.55,19.98 -5.51,40.01 -0.2,44.46 5.41,4.47 9.46,-7.11 17.8,-20.77 8.45,-13.93 40.63,-38.61 40.63,-38.61 5.1,-5.54 -6.94,-15.85 -16.57,-21.68 z m -59.67,-53.19 c -10.3,-4.57 -10.76,0.29 -10.76,0.29 0,0 -21.15,22.63 -26.1,45.45 -4.9,22.54 -0.14,43.66 5.9,47.57 6.07,3.98 8.64,-9.21 15.17,-25.27 6.58,-16.12 35.51,-47.78 35.51,-47.78 4.33,-6.72 -9.26,-15.58 -19.72,-20.26 z m -57.23,-32.78 c -10.02,-3.04 -9.92,1.62 -9.92,1.62 0,0 -16.98,24.48 -18.95,47.17 -1.98,22.49 4.86,42.54 10.88,45.52 6.09,3.05 6.97,-10.1 11.18,-26.55 4.31,-16.64 27.29,-50.85 27.29,-50.85 3.2,-6.99 -10.33,-13.79 -20.48,-16.91 z m -54.59,-28.17 c -9.95,-3.25 -9.92,1.56 -9.92,1.56 0,0 -17.78,25.2 -20.43,48.68 -2.68,23.23 3.53,44 9.5,47.15 6,3.2 7.23,-10.4 12,-27.41 4.77,-17.13 28.86,-52.33 28.86,-52.33 3.41,-7.23 -9.95,-14.37 -20.01,-17.65 z m -44.74,-1.44 c -7.76,-2.56 -7.75,1.26 -7.75,1.26 0,0 -13.98,19.89 -16.1,38.44 -2.15,18.35 2.67,34.69 7.32,37.13 4.69,2.53 5.68,-8.19 9.45,-21.63 3.78,-13.49 22.67,-41.28 22.67,-41.28 2.68,-5.7 -7.73,-11.3 -15.59,-13.92 z m -42.56,7.47 c -6.76,-2.27 -6.76,1.09 -6.76,1.09 0,0 -12.23,17.5 -14.12,33.81 -1.92,16.13 2.23,30.52 6.27,32.65 4.08,2.22 4.97,-7.19 8.29,-18.98 3.33,-11.89 19.84,-36.31 19.84,-36.31 2.35,-5.03 -6.67,-9.99 -13.52,-12.26 z m 50.37,1345.42 c -8.77,5.76 -15.6,12.68 -20.53,20.31 -3.9,6.06 -9.38,15.98 -8.2,24.13 0.81,5.61 5.25,13.13 7.51,19.41 6.49,18.02 9.03,34.28 3.94,47.21 37.11,-16.36 42.93,-57.47 17.28,-111.06 z m -71.06,107.31 c 4.27,4.64 7.57,6.94 10.26,11.67 4.42,7.78 0.01,11.73 2.36,16.45 39.87,-5.15 43.3,-33.2 26.09,-72.98 -26.57,9 -33.65,26.79 -38.71,44.86 z m -16.21,42.78 c 13.88,-3.86 29.39,-11.76 14.6,-35.37 -9.08,9.72 -12.16,22.55 -14.6,35.37 z m 1173.75,-787.01 c -11.13,19.41 -23.35,38.42 -27.12,54.62 8.95,-5.92 16.34,-12.8 22.76,-20.33 -1.34,9.41 -2.92,18.74 -4.57,28.06 -9.71,7.73 -20.63,14.52 -33.49,19.89 -20.69,92.5 -65.21,150.91 -156.67,184.3 -30.66,11.19 -59.7,24.15 -89.94,37.34 1.75,98.46 -112.47,96.39 -183.64,147.07 -30.95,22.1 -66.05,62.87 -101.46,70.41 -68.48,14.6 -110.62,-33.23 -151.06,-66.63 -9.93,10.85 -24.8,21.45 -46.38,31.1 0,0 -38.6,55.15 -56.6,65.52 -1.19,0.69 -2,1.32 -2.52,1.93 -9.94,4.68 -22.41,7.31 -31.21,13.14 -8.7,5.73 -10.35,19.28 -19.05,25.84 -4.26,3.2 -10.87,6.67 -16.65,8.99 -6.98,2.81 -18.94,2.29 -25.97,6.14 -8.65,4.75 -9.34,20.2 -15.61,27.87 -6.91,8.47 -15.8,15.4 -30.18,20.24 -5.83,1.94 -14.63,2.07 -19.9,4.9 -5.88,3.18 -7.32,13.15 -11.87,19.26 -10.58,14.26 -28.45,25.31 -48.83,32.52 -4.39,1.55 -10.28,1.55 -13.49,3.71 -4.03,2.7 -4.19,9.73 -6.94,14.64 -4.25,7.58 -9.92,15.28 -19.06,19.99 -3.91,2.04 -9.92,1.85 -13.75,4.03 -4.5,2.58 -5.71,8.88 -9.5,12.57 -7.66,7.48 -16.76,13.16 -35.67,8.31 -6.7,8.69 -15.55,15.67 -29.96,18.64 l -0.44,-0.77 c 1.82,-17.24 4.29,-34.66 17.38,-46.59 -3.32,-19.81 5.98,-34.36 21.01,-46.08 3.62,-2.83 9.62,-4.32 12.72,-8.05 4.11,-4.96 2.41,-15.04 4.2,-21.26 5.56,-19.2 17.41,-36.84 37.11,-51.25 2.88,-2.12 8.38,-3.14 10.88,-5.97 5.5,-6.25 3.9,-16.74 8.05,-23.95 4.36,-7.59 11.79,-16.75 20.96,-23.81 5.03,-3.88 12.53,-5.95 17.23,-10.57 3.81,-3.73 4.86,-10.44 7.58,-16.02 7.35,-15.1 26.81,-32.59 36.15,-48.37 1.23,-2.08 2.2,-4.3 3.01,-6.54 3.89,-8.03 13.3,-25.05 26.13,-32.91 0,0 1.34,-23.63 24.86,-50.57 -47.65,2.58 -93.62,29.56 -128.96,2.76 -10.2,11.15 -42.93,19.9 -56.94,4.25 -10.33,18.01 -65.18,29.5 -75.85,1.04 -77.98,35.05 -172.08,-14.92 -202.33,-65.08 -5.61,-2.68 -10.86,-5.51 -15.82,-8.41 -21.34,6.43 -50.25,8.71 -81.54,-13.89 -30.84,-22.29 -63.08,-122.26 -57.53,-191.48 0.6,-7.41 14.64,-24.92 19.68,-59.99 5.02,-34.8 8.83,-46.22 8.83,-46.22 -6.86,-11.99 -15.04,-17.35 -16.15,-31.38 -2.42,-30.36 23.49,-46.85 47.76,-62.4 8.65,-4.04 18.42,-6.93 29.04,-7.32 6.41,-10.15 31.11,-44.55 71.94,-44.55 1.01,0 2.04,0.07 3.04,0.13 15.59,-13.13 31.86,-16.66 20.63,-0.47 -0.93,1.33 -1.72,2.83 -2.46,4.38 7.51,-4.47 16.59,-8.82 24.69,-9.61 0.16,-0.02 3.98,-0.98 7.14,-0.98 1.14,0 4.48,0 5.66,2.57 1.18,2.6 -1.2,5.38 -1.99,6.28 -3.27,3.77 -6.95,13.59 -9.72,22.76 3,-5.5 6.25,-10.71 9.9,-15.21 19.43,-23.89 46.63,-35.2 31.44,-11.41 -4.87,7.61 -7.65,17.99 -9.01,29.01 7.53,-9.28 20.49,-20.09 41.56,-24.4 17.42,-16.59 39.07,-23.38 26.1,-5.74 -3.32,4.51 -5.48,10.33 -6.77,16.68 10.5,-12.62 28.26,-28.83 50.03,-28.83 l 1.59,0.03 0.44,0.02 c 14.94,-10.11 27.45,-11.8 16.27,2.79 -4.84,6.36 -7.48,15.16 -8.67,24.45 9.87,-20.16 28.91,-47.92 61.69,-56.83 0.24,-0.1 5.89,-1.65 10.55,-1.65 3.63,0 5.93,0.93 7.02,2.92 1.59,2.87 -0.5,6.19 -1.19,7.28 -2.11,3.41 -4.08,7.64 -5.78,11.82 14.71,-8.64 25.59,-9.38 14.13,4.7 -5.91,7.26 -9.06,17.5 -10.36,28.08 8,-21.41 24.29,-51.48 56.48,-71.19 0.23,-0.11 6.03,-2.83 12.45,-2.83 3.1,0 5.87,0.64 8.26,1.84 2.05,1.07 3.39,2.8 3.94,5 1.68,6.71 -4.68,16.25 -5.25,17.03 -2.65,5.22 -7.5,16.25 -9.89,25.91 l 0.24,-0.2 c 23.26,-18.8 53.46,-27.51 34.83,-8.75 -11.31,11.4 -15.67,30.94 -16.06,46.89 6.8,-19.1 23.32,-52.18 57.54,-58.74 0.23,-0.02 5.53,-1.04 9.45,-1.04 2.17,0 4.79,0.24 5.71,2.34 0.39,0.88 0.55,2.32 -1,4.06 -2.56,2.89 -6.19,11.58 -8.12,18.61 1.62,-1.24 3.2,-2.56 4.89,-3.65 16.6,-10.91 36.19,-16.61 38.75,-13.08 5.3,-4.36 13.61,-10.09 24.89,-15.06 1.06,-2.42 2.1,-4.84 2.95,-7.27 0,0 5.26,-14.67 7.29,-22.61 -26.85,6.97 -72.8,20.47 -106.99,12.91 -27.01,-5.96 -97.4,-44.95 -80.38,-72.36 1.14,-1.83 2.59,-3.1 4.26,-4.14 l 1.05,-0.4 c 6.73,-3.59 18.58,-5.69 31.05,-5.59 l 4.53,0.13 c 7.25,0.4 26.23,3.13 32.67,5.22 18.82,6.13 35.64,2.45 35.64,2.45 l -0.25,-0.17 c 13.38,-1.57 27.5,-6.27 42.08,-13.73 15.66,-7.98 36.97,-21.16 42.4,-27.67 9.78,-11.78 -5.21,-39.4 -10.8,-56.41 -0.27,-1 -0.61,-2.05 -0.94,-3.09 l -0.39,-1.41 -0.06,0.04 c -0.79,-2.39 -1.76,-4.89 -2.81,-7.45 -0.95,1.2 -1.8,2.36 -2.43,3.44 -5.35,9.03 -8.24,16.93 -11,13.3 -2.77,-3.64 -2.9,-18.05 2.36,-31.66 0.54,-1.4 1.2,-2.73 1.91,-4.06 -6.06,-11.12 -13.42,-22.77 -21.18,-33.92 -6.03,5.72 -12.13,12.17 -15.09,17.31 -6.89,11.83 -10.56,22.21 -14.08,17.43 -3.56,-4.74 -3.65,-23.89 3.1,-41.86 2.2,-5.87 5.57,-11.18 9.09,-15.82 -5.35,-6.76 -10.57,-13.01 -15.34,-18.31 -2.14,-2.37 -4.66,-5.02 -7.34,-7.8 -7.36,7.62 -16.68,18.03 -20.45,25.58 -6.56,13.19 -9.94,24.43 -13.67,19.64 -3.72,-4.82 -4.45,-25.07 1.76,-44.65 2.55,-8.02 6.95,-15.34 11.3,-21.3 -7.98,-7.6 -16.65,-15.65 -25.55,-23.79 -5.4,7.18 -10.72,15.06 -13.16,21.1 -5.85,14.26 -8.62,26.35 -12.58,21.72 -3.89,-4.67 -5.6,-25.71 -0.35,-46.68 1.29,-5.17 3.26,-10.14 5.51,-14.74 -8.82,-7.89 -17.35,-15.45 -25.18,-22.31 -2.3,5.01 -4.22,9.75 -5.28,13.66 -4.6,16.98 -6.32,31 -10.84,26.71 -4.53,-4.2 -8.38,-26.82 -5.07,-50.86 0.31,-2.3 0.76,-4.59 1.27,-6.88 l -2.21,-1.9 c -5.11,-4.43 -10.68,-9.77 -16.44,-15.64 -1.43,4.52 -2.54,8.74 -3.13,12.25 -2.91,17.7 -3.36,31.85 -7.99,28.47 -4.62,-3.32 -10.15,-25.15 -9.04,-49.57 0.17,-3.84 0.64,-7.72 1.27,-11.52 -6.76,-7.62 -13.45,-15.51 -19.75,-23.18 -3.65,9.38 -6.95,19.1 -8.23,26.11 -3.34,18.53 -4.03,33.4 -8.76,29.75 -4.33,-3.29 -9.08,-23.12 -8.56,-46.19 -4.71,-3.45 -10.82,-19.53 -11.02,-37.76 -0.09,-6.2 1.01,-12.55 2.51,-18.29 -3.05,-4.31 -8.4,-7.29 -12.14,-12.57 -19.3,-27.05 -11.43,-59.27 30.28,-66.44 12.78,-39.46 45.17,-58.61 94.87,-59.05 6.68,-0.07 13.64,2.27 20.18,1.86 7.38,-0.5 13.46,-3.5 20.2,-3.71 36.22,-1.09 55.22,10.43 82.74,18.48 20.55,5.96 41.74,7.89 54.52,12.9 19.57,7.68 28.87,28.77 44.4,38.76 5.78,3.71 16.69,5.46 26.25,11.06 8.07,4.75 15.05,13.39 22.2,16.6 6.24,2.85 16.65,2.28 24.22,5.55 12.67,5.51 26.68,17.4 42.4,25.86 32.91,17.63 59.7,30.68 94.87,46.11 16.8,7.38 34.58,24.72 44.41,25.84 11.65,1.35 25.22,-8.4 34.31,-7.37 18.52,-22.06 24.98,-52.89 24.2,-92.52 1.1,-0.11 0.29,-9.83 0.29,-9.83 0,0 6.47,-85.09 -126.17,-131.03 -41.25,-14.28 -117.07,-51.81 -173.39,-80.72 218.91,6.81 416.91,96.33 564.01,238.52 -44.49,-11.55 -91.92,-41.79 -121.13,-44.56 -79.65,-7.55 -93.92,27.92 -30.29,33.77 24.03,2.21 59.49,4.92 87.8,18.38 49.4,23.51 100.3,46.22 127.3,60.84 4.41,5.31 8.63,10.78 12.92,16.2 -6.55,-0.08 -18.12,-1.77 -36.09,-5.44 -42.4,-8.65 -87.56,-37.47 -122.51,-43.97 -77.25,-14.32 -122.78,-0.55 -82.01,16.35 59.21,24.57 254.55,30.7 274.96,175.91 20.42,145.23 6.13,210.72 -4.09,247.53 -4.89,17.65 -15.85,43.7 -25.98,66.09 -2.85,15.8 -6.61,29.2 -9.88,38.76 -1.84,4.31 -3.67,9.85 -5.48,16.85 0,0 -2.55,17.91 5.61,35.28 7.23,15.43 32.05,48.86 33.73,81.2 0.03,1.96 0.11,3.92 0.08,5.88 -0.1,2.19 -0.29,4.35 -0.63,6.51 l -0.18,1.91 c -3.19,18.14 -13.58,30.77 -27.69,40.18 -9.09,6.04 -21.46,7.95 -28.26,16.59 5.42,17.09 22.71,23.17 29.91,37.14 4.5,12.39 0.83,25.42 -6.01,37.26 -13.17,14.79 -39.04,27.62 -62.26,36.33 -29.07,10.92 -58.62,19.54 -78.59,35.23 -21.11,11.25 -35.29,33.01 -22.34,61.76 3.37,7.48 4.87,15 4.77,22.16 l -0.09,2.09 c -0.03,1.46 -0.23,2.77 -0.41,4.12 -0.16,1.04 -0.33,2.07 -0.56,3.09 l -0.47,1.79 -0.56,2.02 c -5.32,17.95 -33.54,23.01 -43.6,23.9 -22.79,2.05 -37.52,8.24 -49.63,12.08 9.74,-5.08 19.54,-11.85 32.01,-16.88 7.9,-3.22 19.23,-5.15 28.78,-8.33 l 0.07,0.01 c 0,0 17.62,-3.57 22.46,-15.85 4.85,-12.27 2.04,-23.01 0,-29.9 l -0.74,-1.99 c -1.76,-5.39 -3.73,-10.57 -4.14,-15.93 -1.65,-21.14 11.3,-32.16 18.17,-49.84 12.39,-11.79 30.03,-24 54.5,-35.05 21.98,-9.96 48.29,-15.98 64.59,-25.84 9.45,-5.71 26.64,-19.51 26.25,-29.55 -0.3,-7.68 -14.47,-18.17 -20.19,-25.82 -4.07,-5.45 -6.11,-12.68 -9.75,-17.83 -3.19,-5.02 -7.26,-8.26 -11.96,-8.26 -6.12,0 -20.08,-2.37 -10.89,-3.06 9.18,-0.68 33.01,-11.93 33.01,-11.93 l -0.02,-0.03 c 32.2,-13.33 53.84,-38.06 42,-73.32 -9.91,-29.53 -32.71,-54.25 -34.31,-86.74 -1.7,-34.56 14.12,-63.03 16.14,-90.44 3.42,-46.12 -3.19,-77.9 -12.1,-112.58 -4.18,-16.21 -6.4,-32.18 -10.09,-47.96 -15.72,-67.21 -56.27,-96.32 -111.03,-127.36 -23.74,-13.46 -49.22,-38.28 -74.69,-46.13 -4.09,-1.26 -10.41,0.66 -14.14,0 -23.46,-4.25 -44.57,-15.89 -68.63,-20.3 -22.66,-4.17 -46.42,-2.18 -73.31,-8.99 -13.65,-4.88 -31.13,-12.18 -41.34,-16.53 -15.79,-7.19 -31.26,-14.69 -46.7,-22.26 L 2782.7,2380 c 0,0 -28.58,-16.57 3.07,-4.31 25.46,9.88 112.97,53.51 76.31,27.89 -25.28,-12.72 -38.99,-30.79 -61.35,-46.2 0,0 -75.23,-37.37 -86.52,-47.81 -12.4,-11.48 -27.56,-5.13 -37.52,-16.37 -11.69,-13.22 -26.02,-21.13 -36.24,-24.55 -10.2,-3.43 -21.77,-25.92 -37.43,-37.5 -15.66,-11.59 -49.68,-8.18 -79.64,-21.14 -29.94,-12.95 -60.97,-13.12 -60.97,-13.12 -2.98,-0.28 -5.85,-0.46 -8.61,-0.54 -1.18,-0.02 -2.28,0 -3.41,0 -17.52,-0.1 -30.91,3.31 -41.17,7.09 -12.51,4.61 -17.1,2.3 -14.29,0.78 2.8,-1.54 10.95,-9.16 10.95,-9.16 -34.93,0.04 -44.47,23.3 -60.55,40.57 7.31,1.04 28.16,-4.06 17.57,2.08 -20.92,10.03 -61.21,10.74 -61.99,34.85 -0.61,18.9 8.07,14.77 8.07,14.77 14.65,-25.56 59.89,-28.07 92.87,-27.71 61.43,0.73 103.01,34.49 143.27,53.58 13.05,7.86 28.3,18.19 28.3,18.19 l -0.09,-0.31 c 12.72,8.3 25.56,16.35 36.43,26.37 18.96,17.45 31.78,40.22 48.46,59.56 1.94,3.28 6.01,7.3 10.85,11.33 4.7,4.43 9.76,8.54 15.38,12.15 l 0.22,-0.45 2.18,1.47 -0.39,0.82 c 40.51,23.02 78.28,48.49 110.13,79.41 l 0.22,0.36 c 4.56,4.16 28.54,30.96 40.13,43.98 13.65,18.24 23.49,41.29 29.19,64.5 2.06,8.4 0.75,18.61 4.03,27.7 5.08,14.1 17.87,26.65 26.25,40.58 8.68,14.51 14.42,30.31 20.18,46.15 25.25,69.52 54.45,124.86 109,162.4 26.29,18.11 58.21,29.77 76.7,57.24 -13.42,-13.68 -30.91,-23.63 -52.03,-30.26 -59.98,-19.78 -98.99,-70.5 -118.6,-102.69 -15.06,-27.12 -26.7,-57.34 -35.25,-90.38 -2.85,40.73 -12.88,72.51 -26.25,103.36 -11.89,27.42 -22.4,56.41 -44.41,73.8 0,0 -0.85,-0.05 -4.26,2.02 -3.4,2.02 56.74,3.53 56.74,3.53 10.53,-0.38 21.23,-1.88 32.09,-3.3 2.03,0.22 4.53,0.11 7.59,-0.44 33.06,-5.84 67.43,6.49 88.83,22.1 11.11,8.1 30.43,14.59 46.46,18.98 0.27,0.7 1.83,1.48 5.83,2.26 0,0 24.5,7.65 50.53,14.82 17.63,4.84 30.48,8.54 39.39,12.95 5.17,3.29 10.09,7.25 13.9,11.99 7.63,9.42 7.77,20.74 14.14,36.9 6.33,16.1 16.01,28.63 16.14,42.45 0.46,45.3 -42.37,81.38 -88.81,57.23 45.72,11.8 78.15,-10.54 72.67,-53.55 -6.76,-53.12 -86.66,-92.5 -135.25,-112.57 -19.26,-7.94 -41.82,-17.98 -64.59,-20.29 -32.85,-3.33 -62.6,3.7 -90.84,1.86 -36.22,-2.4 -60.3,-21.58 -90.84,-24.01 -26.24,-2.1 -22.68,15.68 -45.45,17.71 -4.72,2.68 -19.04,0 -33.28,0.73 -39.38,-10.42 -64.7,7.62 -96.88,22.16 -23.21,10.51 -47.98,20.06 -72.68,22.15 -62,5.27 -99.7,-3.37 -150.38,2.01 -14.29,1.53 -43.95,3.33 -58.03,8.62 -43.84,16.43 -77.41,10.48 -125.04,11.15 -34.65,0.51 -66.8,2.33 -88.43,-1.46 -5.9,-1.07 -11.87,-2.6 -18.18,-3.7 -46.42,-8.13 -117.12,-12.34 -115.05,-53.52 3.46,2.37 2.5,8.77 8.07,9.23 -0.2,-7.58 -0.39,-15.14 2.01,-20.32 -26.99,0.7 -42.91,19.37 -42.38,40.6 0.9,36.12 58.9,51.22 98.91,60.92 40.1,9.7 81.75,21.05 111.03,25.84 -70.13,-10.33 -144.31,-16.97 -197.84,-42.47 -0.75,2.77 -1.24,5.45 -1.55,8.02 -4.24,19.49 -13.48,49.4 -19.98,78.46 -7.48,33.4 4.07,92.05 4.07,92.05 l 0.29,-0.34 c 4.83,29.8 10.98,43.09 16.94,60.9 12.69,38.01 53.68,49.94 82.38,53.55 -24.19,-17.13 -39.65,-38.36 -49.44,-66.79 -1.21,-10.09 -2.15,-19.55 -2.85,-27.9 21.73,67.74 82.33,93.09 82.33,93.09 l 19.4,20.96 -0.24,-0.95 c 33.45,32.42 77.66,57.54 133.84,59.13 28.31,0.79 62.52,-6.68 62.43,-34.49 -0.05,-15.73 -12.32,-29.09 -29.06,-36.46 4.92,-0.97 9.43,-0.29 13.51,1.4 l 17.4,19.5 c 5.74,14.26 5.24,32.26 -4.46,43.12 25.6,21.93 65.46,-2.67 62.56,-31.76 7.49,6.33 12.06,18.3 6.91,27.78 34.44,20.28 53.72,-28.88 88.39,-17.4 -3.27,9.84 -19.95,7.84 -25.04,16.05 45.31,6.5 85.06,-9.46 130.49,-5.85 2.85,-2.48 5.94,-4.94 9.21,-7.4 -84.98,-9.42 -15.93,-9.37 -15.93,-9.37 10.88,1 37.03,2.83 47.19,1.01 16.65,-3 27.39,1.06 42.09,6.82 0.36,-0.64 1.83,-0.59 2.72,1.08 7.62,3 16.41,6.34 27.56,9.36 4.32,0.61 8.66,1.72 12.88,3.09 l 1.82,0.38 0.25,0.29 c 5.83,2.03 11.31,4.46 16.01,6.75 42.83,20.61 78.34,69.18 114.92,94.66 60.61,42.19 118,-9.93 160.2,-43.76 l -0.27,-0.4 c 10.58,-7.23 24.53,-16.15 39.73,-25.48 39.71,-17.3 92.08,-32.44 120.05,-60.13 22.38,-22.15 29.99,-50.67 39.62,-80.27 8.98,-27.62 26.42,-52.03 36.22,-83.01 1.89,1.58 3.01,3.97 3.64,6.83 -0.27,2.65 -0.7,5.44 0.09,7.16 l 0.53,-0.48 c -0.11,5.41 -1.3,11.74 -3.15,18.42 -8.32,16.97 -22.86,36.29 -21.07,51.41 0,0 51.58,-26.7 110.11,-53.23 20.15,-9.14 38.61,-24.2 54.71,-41.42 l 4.7,0.11 c -0.56,-1.21 -0.5,-2.95 -0.33,-4.78 28.44,-31.94 48.61,-69.98 55.62,-91.97 1.45,-4.52 3.08,-9.09 4.84,-13.64 l 0.01,-0.06 c 2.21,-5.73 4.59,-11.4 7.04,-16.85 l 0.05,0.07 c 1.04,-1.85 1.69,-3.67 2.39,-5.51 8.44,-18.32 16.73,-33.17 19.05,-37.24 9.93,-12.38 17.35,-29.34 26.56,-40.46 -0.53,6.85 -0.88,13.75 -1.56,20.55 z m -826.19,277.09 c 87.27,-80.81 98.01,-168.37 104.71,-193.66 6.6,-25.12 9.82,-16.62 9.82,-16.62 1.21,85.58 -66.47,193.97 -127.36,229.62 -60,35.19 -215.11,29.07 -251.54,31.9 -35.85,2.74 -53.77,-42.93 -53.77,-42.93 -0.46,-9.67 7.43,1.42 7.43,1.42 23.42,42.28 44.01,34.55 44.01,34.55 74.22,-21.72 87.45,-130.94 90.54,-156.26 3.07,-25.11 9.41,-8.76 9.41,-8.76 7.21,62.85 -38.53,139.45 -48.15,149.3 -9.61,9.76 -0.43,15.3 30.23,6.7 92.32,-25.96 100.96,-174.08 106.52,-192.04 5.57,-17.89 9.03,-0.68 9.03,-0.68 -12.48,136.19 -64.16,169.77 -77.93,188.5 -5.72,7.77 40.96,8.94 61.5,-4.45 116.01,-75.08 102.99,-218.89 113.43,-198.36 10.58,20.95 -29.19,151.09 -85.08,195.37 -11.18,8.84 38.79,-6.6 57.2,-23.6 z m 214.59,112.44 c 23.17,-14 34.21,-17.55 34.21,-17.55 0,0 -16.18,-4.55 -23.54,-16.71 -7.37,-12.16 -16.19,-21.52 -41.94,-17.7 -27.04,4.02 -31.99,-0.22 -45.6,-2.44 0,0 4.76,13.86 17.65,20.87 12.87,7 28.05,52.37 59.22,33.53 z m 2.05,33.45 c 8.47,2.44 35.81,-1.73 18.17,1.85 -17.72,4.96 -28.72,-0.09 -40.36,-7.4 -26.76,-16.75 -48.56,-55.22 -76.72,-71.95 -12.22,-7.31 -24.17,-5.63 -34.33,-18.48 6.58,-13.17 13.26,-5.42 22.22,-7.38 19.86,-4.32 38.16,-12.04 56.52,-23.96 20.33,-13.25 42.35,-37.56 72.67,-35.09 9.67,0.77 27.24,10.15 34.32,14.77 8.84,5.77 29.83,19.54 24.22,40.6 -2.49,9.33 -13.59,10.83 -20.2,18.46 -9.15,10.61 -8.8,21.03 -16.13,33.21 15.98,-3.22 25.13,-12.71 42.37,-14.77 -27.15,24.39 -58.44,45 -96.88,59.07 2.88,1.64 4.72,8.35 14.13,11.07 z M 2223.96,3307.9 c -2.19,16.18 -17.4,30.55 -44.41,22.16 0,0 -34.92,-7.98 -44.43,-69.84 0,0 -1.66,-31.21 8.1,-24.31 -8.22,37.5 27.37,54.49 35.53,58.3 11.48,5.13 20.97,3.4 21.69,-6.37 0.79,-10.54 -11.24,-15.2 -14.84,-26.07 12.77,7.22 41.33,24.13 38.36,46.13 z m 668.31,-133.09 c 27.34,4.37 78.51,23.3 99.04,36.15 22.28,13.93 38.84,67.36 16.13,96.94 -10.17,13.24 -34.52,30.03 -40.38,31.38 -6.68,-3.88 4.2,-7.41 6.05,-9.22 7.7,-7.6 24.88,-21.51 30.28,-33.22 11.03,-23.95 7.65,-60.6 -12.12,-73.85 -13.32,-8.9 -78.47,-33.25 -106.97,-33.21 -80.17,0.11 -88.31,88.29 -137.27,118.12 0.87,-8.43 7.02,-26.13 14.02,-35.28 27.53,-36 53.83,-110.21 131.22,-97.81"
- inkscape:connector-curvature="0" />
- <path
- id="path92"
- style="fill:#5d802f;fill-opacity:1;fill-rule:nonzero;stroke:none"
- d="m 2433.33,2370.61 c 0.44,-4.18 2.32,-8.2 3.64,-12.03 0.27,19.49 1.09,47.95 21.49,59.93 3.2,1.86 6.38,2.84 9.52,2.84 8.01,0 13.14,-5.65 16.36,-12.02 -0.35,15.85 1.93,31.07 12.45,38.27 5.18,3.59 10,5.32 14.61,5.32 13.21,0 18.54,-13.65 21.4,-20.98 0.47,-1.15 0.86,-2.18 1.27,-3.11 5.43,-12.42 19.9,-37.76 26.67,-43.33 2.68,2.13 6.03,4.9 7.08,6.42 -0.37,0.5 -0.99,1.17 -1.78,2.1 -42.06,48.68 -29.05,81.43 -10.7,100.35 1.31,1.51 4.77,4.85 9.87,4.85 6.26,0 11.15,-4.56 14.53,-13.49 5.33,-14.1 26.51,-41.61 30.55,-44.43 l 0.99,-0.49 c 2.07,-1.05 4.66,-2.36 6.14,-2.36 l 1.2,0.74 c 1.32,1.41 2.02,2.65 2.41,3.58 -8.82,10.66 -39.16,50.51 -27.93,82.65 1.66,4.78 6.74,19.34 18.65,19.34 10.99,0 18.37,-13.19 20.89,-18.44 6.44,-8.21 23.48,-28.51 32.54,-33.85 2.24,-1.27 4.78,-1.95 7.56,-1.95 4.48,0 8.36,1.68 10.27,2.81 -10.65,8.04 -31.32,39.91 -24.68,67.59 2.94,12.3 13.27,17.81 22.2,17.81 4.37,0 8.25,-1.27 10.93,-3.61 1.01,-0.87 3.11,-3.14 5.94,-6.27 7.87,-8.61 26.27,-28.86 37.27,-32.77 2.14,-0.75 4.09,-1.15 5.87,-1.15 4.13,0 6.86,2.09 9.5,4.82 -0.73,0.56 -1.66,1.22 -2.86,2.02 -4.97,3.36 -29.76,28.79 -19.55,60.6 3.72,11.63 12.01,12.88 15.4,12.88 7.95,0 15.18,-5.84 18.19,-9.31 5.35,-6.09 26.76,-24.07 32.16,-24.45 4.01,0.71 2.25,2.71 8.31,10.37 5,11.5 -10.48,12.08 -25.14,16.79 -8.01,2.57 -25.83,21.87 -41.9,14.16 -16.06,-7.69 -172.23,-113.68 -103.34,-29.72 28.99,35.32 66.68,50.35 63.89,59.45 -4.26,13.83 -48.2,14.69 -60.75,23.8 -6.53,4.73 -12.16,-5.39 -16.07,-14.7 -39.01,-152.94 -175.78,-233.82 -188.79,-242.48 0,0 -35.95,-22.04 -26.53,-21.68 9.43,0.34 27.02,3.64 30.27,-26.87"
- inkscape:connector-curvature="0" />
- <path
- id="path94"
- style="fill:#5d802f;fill-opacity:1;fill-rule:nonzero;stroke:none"
- d="m 2747.21,2810.08 c -62.51,-19.99 -119.08,-11.38 -119.08,-11.38 -22.18,0.52 -23.98,27.54 -27.27,49.98 -3.36,23 22.07,-23.5 53.19,-30.48 29.63,-6.74 40.8,-4.57 37.8,18.39 -3.21,24.06 27.8,-3.65 46.52,-7.14 0,0 2.3,-1.48 12,-0.96 9.68,0.53 27.48,-6.91 -3.16,-18.41"
- inkscape:connector-curvature="0" />
- </g>
- </g>
- </g>
- </g>
-</svg>
diff --git a/3rdparty/libuv/include/android-ifaddrs.h b/3rdparty/libuv/include/android-ifaddrs.h
deleted file mode 100644
index 9cd19fec129..00000000000
--- a/3rdparty/libuv/include/android-ifaddrs.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 1995, 1999
- * Berkeley Software Design, Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. ``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 Berkeley Software Design, Inc. 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.
- *
- * BSDI ifaddrs.h,v 2.5 2000/02/23 14:51:59 dab Exp
- */
-
-#ifndef _IFADDRS_H_
-#define _IFADDRS_H_
-
-struct ifaddrs {
- struct ifaddrs *ifa_next;
- char *ifa_name;
- unsigned int ifa_flags;
- struct sockaddr *ifa_addr;
- struct sockaddr *ifa_netmask;
- struct sockaddr *ifa_dstaddr;
- void *ifa_data;
-};
-
-/*
- * This may have been defined in <net/if.h>. Note that if <net/if.h> is
- * to be included it must be included before this header file.
- */
-#ifndef ifa_broadaddr
-#define ifa_broadaddr ifa_dstaddr /* broadcast address interface */
-#endif
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-extern int getifaddrs(struct ifaddrs **ifap);
-extern void freeifaddrs(struct ifaddrs *ifa);
-__END_DECLS
-
-#endif
diff --git a/3rdparty/libuv/include/pthread-fixes.h b/3rdparty/libuv/include/pthread-fixes.h
deleted file mode 100644
index 88c6b66987a..00000000000
--- a/3rdparty/libuv/include/pthread-fixes.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* Copyright (c) 2013, Sony Mobile Communications AB
- * Copyright (c) 2012, Google Inc.
- 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 Google Inc. 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
- 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.
-*/
-
-#ifndef GOOGLE_BREAKPAD_COMMON_ANDROID_TESTING_PTHREAD_FIXES_H
-#define GOOGLE_BREAKPAD_COMMON_ANDROID_TESTING_PTHREAD_FIXES_H
-
-#include <pthread.h>
-
-
-/*Android doesn't provide pthread_barrier_t for now.*/
-#ifndef PTHREAD_BARRIER_SERIAL_THREAD
-
-/* Anything except 0 will do here.*/
-#define PTHREAD_BARRIER_SERIAL_THREAD 0x12345
-
-typedef struct {
- pthread_mutex_t mutex;
- pthread_cond_t cond;
- unsigned count;
-} pthread_barrier_t;
-
-int pthread_barrier_init(pthread_barrier_t* barrier,
- const void* barrier_attr,
- unsigned count);
-
-int pthread_barrier_wait(pthread_barrier_t* barrier);
-int pthread_barrier_destroy(pthread_barrier_t *barrier);
-#endif /* defined(PTHREAD_BARRIER_SERIAL_THREAD) */
-
-int pthread_yield(void);
-
-/* Workaround pthread_sigmask() returning EINVAL on versions < 4.1 by
- * replacing all calls to pthread_sigmask with sigprocmask. See:
- * https://android.googlesource.com/platform/bionic/+/9bf330b5
- * https://code.google.com/p/android/issues/detail?id=15337
- */
-int uv__pthread_sigmask(int how, const sigset_t* set, sigset_t* oset);
-
-#ifdef pthread_sigmask
-#undef pthread_sigmask
-#endif
-#define pthread_sigmask(how, set, oldset) uv__pthread_sigmask(how, set, oldset)
-
-#endif /* GOOGLE_BREAKPAD_COMMON_ANDROID_TESTING_PTHREAD_FIXES_H */
diff --git a/3rdparty/libuv/include/stdint-msvc2008.h b/3rdparty/libuv/include/stdint-msvc2008.h
deleted file mode 100644
index d02608a5972..00000000000
--- a/3rdparty/libuv/include/stdint-msvc2008.h
+++ /dev/null
@@ -1,247 +0,0 @@
-// ISO C9x compliant stdint.h for Microsoft Visual Studio
-// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
-//
-// Copyright (c) 2006-2008 Alexander Chemeris
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// 1. Redistributions of source code must retain the above copyright notice,
-// this list of conditions and the following disclaimer.
-//
-// 2. 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.
-//
-// 3. The name of the author may be used to endorse or promote products
-// derived from this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _MSC_VER // [
-#error "Use this header only with Microsoft Visual C++ compilers!"
-#endif // _MSC_VER ]
-
-#ifndef _MSC_STDINT_H_ // [
-#define _MSC_STDINT_H_
-
-#if _MSC_VER > 1000
-#pragma once
-#endif
-
-#include <limits.h>
-
-// For Visual Studio 6 in C++ mode and for many Visual Studio versions when
-// compiling for ARM we should wrap <wchar.h> include with 'extern "C++" {}'
-// or compiler give many errors like this:
-// error C2733: second C linkage of overloaded function 'wmemchr' not allowed
-#ifdef __cplusplus
-extern "C" {
-#endif
-# include <wchar.h>
-#ifdef __cplusplus
-}
-#endif
-
-// Define _W64 macros to mark types changing their size, like intptr_t.
-#ifndef _W64
-# if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
-# define _W64 __w64
-# else
-# define _W64
-# endif
-#endif
-
-
-// 7.18.1 Integer types
-
-// 7.18.1.1 Exact-width integer types
-
-// Visual Studio 6 and Embedded Visual C++ 4 doesn't
-// realize that, e.g. char has the same size as __int8
-// so we give up on __intX for them.
-#if (_MSC_VER < 1300)
- typedef signed char int8_t;
- typedef signed short int16_t;
- typedef signed int int32_t;
- typedef unsigned char uint8_t;
- typedef unsigned short uint16_t;
- typedef unsigned int uint32_t;
-#else
- typedef signed __int8 int8_t;
- typedef signed __int16 int16_t;
- typedef signed __int32 int32_t;
- typedef unsigned __int8 uint8_t;
- typedef unsigned __int16 uint16_t;
- typedef unsigned __int32 uint32_t;
-#endif
-typedef signed __int64 int64_t;
-typedef unsigned __int64 uint64_t;
-
-
-// 7.18.1.2 Minimum-width integer types
-typedef int8_t int_least8_t;
-typedef int16_t int_least16_t;
-typedef int32_t int_least32_t;
-typedef int64_t int_least64_t;
-typedef uint8_t uint_least8_t;
-typedef uint16_t uint_least16_t;
-typedef uint32_t uint_least32_t;
-typedef uint64_t uint_least64_t;
-
-// 7.18.1.3 Fastest minimum-width integer types
-typedef int8_t int_fast8_t;
-typedef int16_t int_fast16_t;
-typedef int32_t int_fast32_t;
-typedef int64_t int_fast64_t;
-typedef uint8_t uint_fast8_t;
-typedef uint16_t uint_fast16_t;
-typedef uint32_t uint_fast32_t;
-typedef uint64_t uint_fast64_t;
-
-// 7.18.1.4 Integer types capable of holding object pointers
-#ifdef _WIN64 // [
- typedef signed __int64 intptr_t;
- typedef unsigned __int64 uintptr_t;
-#else // _WIN64 ][
- typedef _W64 signed int intptr_t;
- typedef _W64 unsigned int uintptr_t;
-#endif // _WIN64 ]
-
-// 7.18.1.5 Greatest-width integer types
-typedef int64_t intmax_t;
-typedef uint64_t uintmax_t;
-
-
-// 7.18.2 Limits of specified-width integer types
-
-#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 220 at page 257 and footnote 221 at page 259
-
-// 7.18.2.1 Limits of exact-width integer types
-#define INT8_MIN ((int8_t)_I8_MIN)
-#define INT8_MAX _I8_MAX
-#define INT16_MIN ((int16_t)_I16_MIN)
-#define INT16_MAX _I16_MAX
-#define INT32_MIN ((int32_t)_I32_MIN)
-#define INT32_MAX _I32_MAX
-#define INT64_MIN ((int64_t)_I64_MIN)
-#define INT64_MAX _I64_MAX
-#define UINT8_MAX _UI8_MAX
-#define UINT16_MAX _UI16_MAX
-#define UINT32_MAX _UI32_MAX
-#define UINT64_MAX _UI64_MAX
-
-// 7.18.2.2 Limits of minimum-width integer types
-#define INT_LEAST8_MIN INT8_MIN
-#define INT_LEAST8_MAX INT8_MAX
-#define INT_LEAST16_MIN INT16_MIN
-#define INT_LEAST16_MAX INT16_MAX
-#define INT_LEAST32_MIN INT32_MIN
-#define INT_LEAST32_MAX INT32_MAX
-#define INT_LEAST64_MIN INT64_MIN
-#define INT_LEAST64_MAX INT64_MAX
-#define UINT_LEAST8_MAX UINT8_MAX
-#define UINT_LEAST16_MAX UINT16_MAX
-#define UINT_LEAST32_MAX UINT32_MAX
-#define UINT_LEAST64_MAX UINT64_MAX
-
-// 7.18.2.3 Limits of fastest minimum-width integer types
-#define INT_FAST8_MIN INT8_MIN
-#define INT_FAST8_MAX INT8_MAX
-#define INT_FAST16_MIN INT16_MIN
-#define INT_FAST16_MAX INT16_MAX
-#define INT_FAST32_MIN INT32_MIN
-#define INT_FAST32_MAX INT32_MAX
-#define INT_FAST64_MIN INT64_MIN
-#define INT_FAST64_MAX INT64_MAX
-#define UINT_FAST8_MAX UINT8_MAX
-#define UINT_FAST16_MAX UINT16_MAX
-#define UINT_FAST32_MAX UINT32_MAX
-#define UINT_FAST64_MAX UINT64_MAX
-
-// 7.18.2.4 Limits of integer types capable of holding object pointers
-#ifdef _WIN64 // [
-# define INTPTR_MIN INT64_MIN
-# define INTPTR_MAX INT64_MAX
-# define UINTPTR_MAX UINT64_MAX
-#else // _WIN64 ][
-# define INTPTR_MIN INT32_MIN
-# define INTPTR_MAX INT32_MAX
-# define UINTPTR_MAX UINT32_MAX
-#endif // _WIN64 ]
-
-// 7.18.2.5 Limits of greatest-width integer types
-#define INTMAX_MIN INT64_MIN
-#define INTMAX_MAX INT64_MAX
-#define UINTMAX_MAX UINT64_MAX
-
-// 7.18.3 Limits of other integer types
-
-#ifdef _WIN64 // [
-# define PTRDIFF_MIN _I64_MIN
-# define PTRDIFF_MAX _I64_MAX
-#else // _WIN64 ][
-# define PTRDIFF_MIN _I32_MIN
-# define PTRDIFF_MAX _I32_MAX
-#endif // _WIN64 ]
-
-#define SIG_ATOMIC_MIN INT_MIN
-#define SIG_ATOMIC_MAX INT_MAX
-
-#ifndef SIZE_MAX // [
-# ifdef _WIN64 // [
-# define SIZE_MAX _UI64_MAX
-# else // _WIN64 ][
-# define SIZE_MAX _UI32_MAX
-# endif // _WIN64 ]
-#endif // SIZE_MAX ]
-
-// WCHAR_MIN and WCHAR_MAX are also defined in <wchar.h>
-#ifndef WCHAR_MIN // [
-# define WCHAR_MIN 0
-#endif // WCHAR_MIN ]
-#ifndef WCHAR_MAX // [
-# define WCHAR_MAX _UI16_MAX
-#endif // WCHAR_MAX ]
-
-#define WINT_MIN 0
-#define WINT_MAX _UI16_MAX
-
-#endif // __STDC_LIMIT_MACROS ]
-
-
-// 7.18.4 Limits of other integer types
-
-#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [ See footnote 224 at page 260
-
-// 7.18.4.1 Macros for minimum-width integer constants
-
-#define INT8_C(val) val##i8
-#define INT16_C(val) val##i16
-#define INT32_C(val) val##i32
-#define INT64_C(val) val##i64
-
-#define UINT8_C(val) val##ui8
-#define UINT16_C(val) val##ui16
-#define UINT32_C(val) val##ui32
-#define UINT64_C(val) val##ui64
-
-// 7.18.4.2 Macros for greatest-width integer constants
-#define INTMAX_C INT64_C
-#define UINTMAX_C UINT64_C
-
-#endif // __STDC_CONSTANT_MACROS ]
-
-
-#endif // _MSC_STDINT_H_ ]
diff --git a/3rdparty/libuv/include/tree.h b/3rdparty/libuv/include/tree.h
deleted file mode 100644
index f936416e3d8..00000000000
--- a/3rdparty/libuv/include/tree.h
+++ /dev/null
@@ -1,768 +0,0 @@
-/*-
- * Copyright 2002 Niels Provos <provos@citi.umich.edu>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef UV_TREE_H_
-#define UV_TREE_H_
-
-#ifndef UV__UNUSED
-# if __GNUC__
-# define UV__UNUSED __attribute__((unused))
-# else
-# define UV__UNUSED
-# endif
-#endif
-
-/*
- * This file defines data structures for different types of trees:
- * splay trees and red-black trees.
- *
- * A splay tree is a self-organizing data structure. Every operation
- * on the tree causes a splay to happen. The splay moves the requested
- * node to the root of the tree and partly rebalances it.
- *
- * This has the benefit that request locality causes faster lookups as
- * the requested nodes move to the top of the tree. On the other hand,
- * every lookup causes memory writes.
- *
- * The Balance Theorem bounds the total access time for m operations
- * and n inserts on an initially empty tree as O((m + n)lg n). The
- * amortized cost for a sequence of m accesses to a splay tree is O(lg n);
- *
- * A red-black tree is a binary search tree with the node color as an
- * extra attribute. It fulfills a set of conditions:
- * - every search path from the root to a leaf consists of the
- * same number of black nodes,
- * - each red node (except for the root) has a black parent,
- * - each leaf node is black.
- *
- * Every operation on a red-black tree is bounded as O(lg n).
- * The maximum height of a red-black tree is 2lg (n+1).
- */
-
-#define SPLAY_HEAD(name, type) \
-struct name { \
- struct type *sph_root; /* root of the tree */ \
-}
-
-#define SPLAY_INITIALIZER(root) \
- { NULL }
-
-#define SPLAY_INIT(root) do { \
- (root)->sph_root = NULL; \
-} while (/*CONSTCOND*/ 0)
-
-#define SPLAY_ENTRY(type) \
-struct { \
- struct type *spe_left; /* left element */ \
- struct type *spe_right; /* right element */ \
-}
-
-#define SPLAY_LEFT(elm, field) (elm)->field.spe_left
-#define SPLAY_RIGHT(elm, field) (elm)->field.spe_right
-#define SPLAY_ROOT(head) (head)->sph_root
-#define SPLAY_EMPTY(head) (SPLAY_ROOT(head) == NULL)
-
-/* SPLAY_ROTATE_{LEFT,RIGHT} expect that tmp hold SPLAY_{RIGHT,LEFT} */
-#define SPLAY_ROTATE_RIGHT(head, tmp, field) do { \
- SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(tmp, field); \
- SPLAY_RIGHT(tmp, field) = (head)->sph_root; \
- (head)->sph_root = tmp; \
-} while (/*CONSTCOND*/ 0)
-
-#define SPLAY_ROTATE_LEFT(head, tmp, field) do { \
- SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(tmp, field); \
- SPLAY_LEFT(tmp, field) = (head)->sph_root; \
- (head)->sph_root = tmp; \
-} while (/*CONSTCOND*/ 0)
-
-#define SPLAY_LINKLEFT(head, tmp, field) do { \
- SPLAY_LEFT(tmp, field) = (head)->sph_root; \
- tmp = (head)->sph_root; \
- (head)->sph_root = SPLAY_LEFT((head)->sph_root, field); \
-} while (/*CONSTCOND*/ 0)
-
-#define SPLAY_LINKRIGHT(head, tmp, field) do { \
- SPLAY_RIGHT(tmp, field) = (head)->sph_root; \
- tmp = (head)->sph_root; \
- (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field); \
-} while (/*CONSTCOND*/ 0)
-
-#define SPLAY_ASSEMBLE(head, node, left, right, field) do { \
- SPLAY_RIGHT(left, field) = SPLAY_LEFT((head)->sph_root, field); \
- SPLAY_LEFT(right, field) = SPLAY_RIGHT((head)->sph_root, field); \
- SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(node, field); \
- SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(node, field); \
-} while (/*CONSTCOND*/ 0)
-
-/* Generates prototypes and inline functions */
-
-#define SPLAY_PROTOTYPE(name, type, field, cmp) \
-void name##_SPLAY(struct name *, struct type *); \
-void name##_SPLAY_MINMAX(struct name *, int); \
-struct type *name##_SPLAY_INSERT(struct name *, struct type *); \
-struct type *name##_SPLAY_REMOVE(struct name *, struct type *); \
- \
-/* Finds the node with the same key as elm */ \
-static __inline struct type * \
-name##_SPLAY_FIND(struct name *head, struct type *elm) \
-{ \
- if (SPLAY_EMPTY(head)) \
- return(NULL); \
- name##_SPLAY(head, elm); \
- if ((cmp)(elm, (head)->sph_root) == 0) \
- return (head->sph_root); \
- return (NULL); \
-} \
- \
-static __inline struct type * \
-name##_SPLAY_NEXT(struct name *head, struct type *elm) \
-{ \
- name##_SPLAY(head, elm); \
- if (SPLAY_RIGHT(elm, field) != NULL) { \
- elm = SPLAY_RIGHT(elm, field); \
- while (SPLAY_LEFT(elm, field) != NULL) { \
- elm = SPLAY_LEFT(elm, field); \
- } \
- } else \
- elm = NULL; \
- return (elm); \
-} \
- \
-static __inline struct type * \
-name##_SPLAY_MIN_MAX(struct name *head, int val) \
-{ \
- name##_SPLAY_MINMAX(head, val); \
- return (SPLAY_ROOT(head)); \
-}
-
-/* Main splay operation.
- * Moves node close to the key of elm to top
- */
-#define SPLAY_GENERATE(name, type, field, cmp) \
-struct type * \
-name##_SPLAY_INSERT(struct name *head, struct type *elm) \
-{ \
- if (SPLAY_EMPTY(head)) { \
- SPLAY_LEFT(elm, field) = SPLAY_RIGHT(elm, field) = NULL; \
- } else { \
- int __comp; \
- name##_SPLAY(head, elm); \
- __comp = (cmp)(elm, (head)->sph_root); \
- if(__comp < 0) { \
- SPLAY_LEFT(elm, field) = SPLAY_LEFT((head)->sph_root, field); \
- SPLAY_RIGHT(elm, field) = (head)->sph_root; \
- SPLAY_LEFT((head)->sph_root, field) = NULL; \
- } else if (__comp > 0) { \
- SPLAY_RIGHT(elm, field) = SPLAY_RIGHT((head)->sph_root, field); \
- SPLAY_LEFT(elm, field) = (head)->sph_root; \
- SPLAY_RIGHT((head)->sph_root, field) = NULL; \
- } else \
- return ((head)->sph_root); \
- } \
- (head)->sph_root = (elm); \
- return (NULL); \
-} \
- \
-struct type * \
-name##_SPLAY_REMOVE(struct name *head, struct type *elm) \
-{ \
- struct type *__tmp; \
- if (SPLAY_EMPTY(head)) \
- return (NULL); \
- name##_SPLAY(head, elm); \
- if ((cmp)(elm, (head)->sph_root) == 0) { \
- if (SPLAY_LEFT((head)->sph_root, field) == NULL) { \
- (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field); \
- } else { \
- __tmp = SPLAY_RIGHT((head)->sph_root, field); \
- (head)->sph_root = SPLAY_LEFT((head)->sph_root, field); \
- name##_SPLAY(head, elm); \
- SPLAY_RIGHT((head)->sph_root, field) = __tmp; \
- } \
- return (elm); \
- } \
- return (NULL); \
-} \
- \
-void \
-name##_SPLAY(struct name *head, struct type *elm) \
-{ \
- struct type __node, *__left, *__right, *__tmp; \
- int __comp; \
- \
- SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL; \
- __left = __right = &__node; \
- \
- while ((__comp = (cmp)(elm, (head)->sph_root)) != 0) { \
- if (__comp < 0) { \
- __tmp = SPLAY_LEFT((head)->sph_root, field); \
- if (__tmp == NULL) \
- break; \
- if ((cmp)(elm, __tmp) < 0){ \
- SPLAY_ROTATE_RIGHT(head, __tmp, field); \
- if (SPLAY_LEFT((head)->sph_root, field) == NULL) \
- break; \
- } \
- SPLAY_LINKLEFT(head, __right, field); \
- } else if (__comp > 0) { \
- __tmp = SPLAY_RIGHT((head)->sph_root, field); \
- if (__tmp == NULL) \
- break; \
- if ((cmp)(elm, __tmp) > 0){ \
- SPLAY_ROTATE_LEFT(head, __tmp, field); \
- if (SPLAY_RIGHT((head)->sph_root, field) == NULL) \
- break; \
- } \
- SPLAY_LINKRIGHT(head, __left, field); \
- } \
- } \
- SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \
-} \
- \
-/* Splay with either the minimum or the maximum element \
- * Used to find minimum or maximum element in tree. \
- */ \
-void name##_SPLAY_MINMAX(struct name *head, int __comp) \
-{ \
- struct type __node, *__left, *__right, *__tmp; \
- \
- SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL; \
- __left = __right = &__node; \
- \
- while (1) { \
- if (__comp < 0) { \
- __tmp = SPLAY_LEFT((head)->sph_root, field); \
- if (__tmp == NULL) \
- break; \
- if (__comp < 0){ \
- SPLAY_ROTATE_RIGHT(head, __tmp, field); \
- if (SPLAY_LEFT((head)->sph_root, field) == NULL) \
- break; \
- } \
- SPLAY_LINKLEFT(head, __right, field); \
- } else if (__comp > 0) { \
- __tmp = SPLAY_RIGHT((head)->sph_root, field); \
- if (__tmp == NULL) \
- break; \
- if (__comp > 0) { \
- SPLAY_ROTATE_LEFT(head, __tmp, field); \
- if (SPLAY_RIGHT((head)->sph_root, field) == NULL) \
- break; \
- } \
- SPLAY_LINKRIGHT(head, __left, field); \
- } \
- } \
- SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \
-}
-
-#define SPLAY_NEGINF -1
-#define SPLAY_INF 1
-
-#define SPLAY_INSERT(name, x, y) name##_SPLAY_INSERT(x, y)
-#define SPLAY_REMOVE(name, x, y) name##_SPLAY_REMOVE(x, y)
-#define SPLAY_FIND(name, x, y) name##_SPLAY_FIND(x, y)
-#define SPLAY_NEXT(name, x, y) name##_SPLAY_NEXT(x, y)
-#define SPLAY_MIN(name, x) (SPLAY_EMPTY(x) ? NULL \
- : name##_SPLAY_MIN_MAX(x, SPLAY_NEGINF))
-#define SPLAY_MAX(name, x) (SPLAY_EMPTY(x) ? NULL \
- : name##_SPLAY_MIN_MAX(x, SPLAY_INF))
-
-#define SPLAY_FOREACH(x, name, head) \
- for ((x) = SPLAY_MIN(name, head); \
- (x) != NULL; \
- (x) = SPLAY_NEXT(name, head, x))
-
-/* Macros that define a red-black tree */
-#define RB_HEAD(name, type) \
-struct name { \
- struct type *rbh_root; /* root of the tree */ \
-}
-
-#define RB_INITIALIZER(root) \
- { NULL }
-
-#define RB_INIT(root) do { \
- (root)->rbh_root = NULL; \
-} while (/*CONSTCOND*/ 0)
-
-#define RB_BLACK 0
-#define RB_RED 1
-#define RB_ENTRY(type) \
-struct { \
- struct type *rbe_left; /* left element */ \
- struct type *rbe_right; /* right element */ \
- struct type *rbe_parent; /* parent element */ \
- int rbe_color; /* node color */ \
-}
-
-#define RB_LEFT(elm, field) (elm)->field.rbe_left
-#define RB_RIGHT(elm, field) (elm)->field.rbe_right
-#define RB_PARENT(elm, field) (elm)->field.rbe_parent
-#define RB_COLOR(elm, field) (elm)->field.rbe_color
-#define RB_ROOT(head) (head)->rbh_root
-#define RB_EMPTY(head) (RB_ROOT(head) == NULL)
-
-#define RB_SET(elm, parent, field) do { \
- RB_PARENT(elm, field) = parent; \
- RB_LEFT(elm, field) = RB_RIGHT(elm, field) = NULL; \
- RB_COLOR(elm, field) = RB_RED; \
-} while (/*CONSTCOND*/ 0)
-
-#define RB_SET_BLACKRED(black, red, field) do { \
- RB_COLOR(black, field) = RB_BLACK; \
- RB_COLOR(red, field) = RB_RED; \
-} while (/*CONSTCOND*/ 0)
-
-#ifndef RB_AUGMENT
-#define RB_AUGMENT(x) do {} while (0)
-#endif
-
-#define RB_ROTATE_LEFT(head, elm, tmp, field) do { \
- (tmp) = RB_RIGHT(elm, field); \
- if ((RB_RIGHT(elm, field) = RB_LEFT(tmp, field)) != NULL) { \
- RB_PARENT(RB_LEFT(tmp, field), field) = (elm); \
- } \
- RB_AUGMENT(elm); \
- if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field)) != NULL) { \
- if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \
- RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \
- else \
- RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \
- } else \
- (head)->rbh_root = (tmp); \
- RB_LEFT(tmp, field) = (elm); \
- RB_PARENT(elm, field) = (tmp); \
- RB_AUGMENT(tmp); \
- if ((RB_PARENT(tmp, field))) \
- RB_AUGMENT(RB_PARENT(tmp, field)); \
-} while (/*CONSTCOND*/ 0)
-
-#define RB_ROTATE_RIGHT(head, elm, tmp, field) do { \
- (tmp) = RB_LEFT(elm, field); \
- if ((RB_LEFT(elm, field) = RB_RIGHT(tmp, field)) != NULL) { \
- RB_PARENT(RB_RIGHT(tmp, field), field) = (elm); \
- } \
- RB_AUGMENT(elm); \
- if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field)) != NULL) { \
- if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \
- RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \
- else \
- RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \
- } else \
- (head)->rbh_root = (tmp); \
- RB_RIGHT(tmp, field) = (elm); \
- RB_PARENT(elm, field) = (tmp); \
- RB_AUGMENT(tmp); \
- if ((RB_PARENT(tmp, field))) \
- RB_AUGMENT(RB_PARENT(tmp, field)); \
-} while (/*CONSTCOND*/ 0)
-
-/* Generates prototypes and inline functions */
-#define RB_PROTOTYPE(name, type, field, cmp) \
- RB_PROTOTYPE_INTERNAL(name, type, field, cmp,)
-#define RB_PROTOTYPE_STATIC(name, type, field, cmp) \
- RB_PROTOTYPE_INTERNAL(name, type, field, cmp, UV__UNUSED static)
-#define RB_PROTOTYPE_INTERNAL(name, type, field, cmp, attr) \
-attr void name##_RB_INSERT_COLOR(struct name *, struct type *); \
-attr void name##_RB_REMOVE_COLOR(struct name *, struct type *, struct type *);\
-attr struct type *name##_RB_REMOVE(struct name *, struct type *); \
-attr struct type *name##_RB_INSERT(struct name *, struct type *); \
-attr struct type *name##_RB_FIND(struct name *, struct type *); \
-attr struct type *name##_RB_NFIND(struct name *, struct type *); \
-attr struct type *name##_RB_NEXT(struct type *); \
-attr struct type *name##_RB_PREV(struct type *); \
-attr struct type *name##_RB_MINMAX(struct name *, int); \
- \
-
-/* Main rb operation.
- * Moves node close to the key of elm to top
- */
-#define RB_GENERATE(name, type, field, cmp) \
- RB_GENERATE_INTERNAL(name, type, field, cmp,)
-#define RB_GENERATE_STATIC(name, type, field, cmp) \
- RB_GENERATE_INTERNAL(name, type, field, cmp, UV__UNUSED static)
-#define RB_GENERATE_INTERNAL(name, type, field, cmp, attr) \
-attr void \
-name##_RB_INSERT_COLOR(struct name *head, struct type *elm) \
-{ \
- struct type *parent, *gparent, *tmp; \
- while ((parent = RB_PARENT(elm, field)) != NULL && \
- RB_COLOR(parent, field) == RB_RED) { \
- gparent = RB_PARENT(parent, field); \
- if (parent == RB_LEFT(gparent, field)) { \
- tmp = RB_RIGHT(gparent, field); \
- if (tmp && RB_COLOR(tmp, field) == RB_RED) { \
- RB_COLOR(tmp, field) = RB_BLACK; \
- RB_SET_BLACKRED(parent, gparent, field); \
- elm = gparent; \
- continue; \
- } \
- if (RB_RIGHT(parent, field) == elm) { \
- RB_ROTATE_LEFT(head, parent, tmp, field); \
- tmp = parent; \
- parent = elm; \
- elm = tmp; \
- } \
- RB_SET_BLACKRED(parent, gparent, field); \
- RB_ROTATE_RIGHT(head, gparent, tmp, field); \
- } else { \
- tmp = RB_LEFT(gparent, field); \
- if (tmp && RB_COLOR(tmp, field) == RB_RED) { \
- RB_COLOR(tmp, field) = RB_BLACK; \
- RB_SET_BLACKRED(parent, gparent, field); \
- elm = gparent; \
- continue; \
- } \
- if (RB_LEFT(parent, field) == elm) { \
- RB_ROTATE_RIGHT(head, parent, tmp, field); \
- tmp = parent; \
- parent = elm; \
- elm = tmp; \
- } \
- RB_SET_BLACKRED(parent, gparent, field); \
- RB_ROTATE_LEFT(head, gparent, tmp, field); \
- } \
- } \
- RB_COLOR(head->rbh_root, field) = RB_BLACK; \
-} \
- \
-attr void \
-name##_RB_REMOVE_COLOR(struct name *head, struct type *parent, \
- struct type *elm) \
-{ \
- struct type *tmp; \
- while ((elm == NULL || RB_COLOR(elm, field) == RB_BLACK) && \
- elm != RB_ROOT(head)) { \
- if (RB_LEFT(parent, field) == elm) { \
- tmp = RB_RIGHT(parent, field); \
- if (RB_COLOR(tmp, field) == RB_RED) { \
- RB_SET_BLACKRED(tmp, parent, field); \
- RB_ROTATE_LEFT(head, parent, tmp, field); \
- tmp = RB_RIGHT(parent, field); \
- } \
- if ((RB_LEFT(tmp, field) == NULL || \
- RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) && \
- (RB_RIGHT(tmp, field) == NULL || \
- RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) { \
- RB_COLOR(tmp, field) = RB_RED; \
- elm = parent; \
- parent = RB_PARENT(elm, field); \
- } else { \
- if (RB_RIGHT(tmp, field) == NULL || \
- RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK) { \
- struct type *oleft; \
- if ((oleft = RB_LEFT(tmp, field)) \
- != NULL) \
- RB_COLOR(oleft, field) = RB_BLACK; \
- RB_COLOR(tmp, field) = RB_RED; \
- RB_ROTATE_RIGHT(head, tmp, oleft, field); \
- tmp = RB_RIGHT(parent, field); \
- } \
- RB_COLOR(tmp, field) = RB_COLOR(parent, field); \
- RB_COLOR(parent, field) = RB_BLACK; \
- if (RB_RIGHT(tmp, field)) \
- RB_COLOR(RB_RIGHT(tmp, field), field) = RB_BLACK; \
- RB_ROTATE_LEFT(head, parent, tmp, field); \
- elm = RB_ROOT(head); \
- break; \
- } \
- } else { \
- tmp = RB_LEFT(parent, field); \
- if (RB_COLOR(tmp, field) == RB_RED) { \
- RB_SET_BLACKRED(tmp, parent, field); \
- RB_ROTATE_RIGHT(head, parent, tmp, field); \
- tmp = RB_LEFT(parent, field); \
- } \
- if ((RB_LEFT(tmp, field) == NULL || \
- RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) && \
- (RB_RIGHT(tmp, field) == NULL || \
- RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) { \
- RB_COLOR(tmp, field) = RB_RED; \
- elm = parent; \
- parent = RB_PARENT(elm, field); \
- } else { \
- if (RB_LEFT(tmp, field) == NULL || \
- RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) { \
- struct type *oright; \
- if ((oright = RB_RIGHT(tmp, field)) \
- != NULL) \
- RB_COLOR(oright, field) = RB_BLACK; \
- RB_COLOR(tmp, field) = RB_RED; \
- RB_ROTATE_LEFT(head, tmp, oright, field); \
- tmp = RB_LEFT(parent, field); \
- } \
- RB_COLOR(tmp, field) = RB_COLOR(parent, field); \
- RB_COLOR(parent, field) = RB_BLACK; \
- if (RB_LEFT(tmp, field)) \
- RB_COLOR(RB_LEFT(tmp, field), field) = RB_BLACK; \
- RB_ROTATE_RIGHT(head, parent, tmp, field); \
- elm = RB_ROOT(head); \
- break; \
- } \
- } \
- } \
- if (elm) \
- RB_COLOR(elm, field) = RB_BLACK; \
-} \
- \
-attr struct type * \
-name##_RB_REMOVE(struct name *head, struct type *elm) \
-{ \
- struct type *child, *parent, *old = elm; \
- int color; \
- if (RB_LEFT(elm, field) == NULL) \
- child = RB_RIGHT(elm, field); \
- else if (RB_RIGHT(elm, field) == NULL) \
- child = RB_LEFT(elm, field); \
- else { \
- struct type *left; \
- elm = RB_RIGHT(elm, field); \
- while ((left = RB_LEFT(elm, field)) != NULL) \
- elm = left; \
- child = RB_RIGHT(elm, field); \
- parent = RB_PARENT(elm, field); \
- color = RB_COLOR(elm, field); \
- if (child) \
- RB_PARENT(child, field) = parent; \
- if (parent) { \
- if (RB_LEFT(parent, field) == elm) \
- RB_LEFT(parent, field) = child; \
- else \
- RB_RIGHT(parent, field) = child; \
- RB_AUGMENT(parent); \
- } else \
- RB_ROOT(head) = child; \
- if (RB_PARENT(elm, field) == old) \
- parent = elm; \
- (elm)->field = (old)->field; \
- if (RB_PARENT(old, field)) { \
- if (RB_LEFT(RB_PARENT(old, field), field) == old) \
- RB_LEFT(RB_PARENT(old, field), field) = elm; \
- else \
- RB_RIGHT(RB_PARENT(old, field), field) = elm; \
- RB_AUGMENT(RB_PARENT(old, field)); \
- } else \
- RB_ROOT(head) = elm; \
- RB_PARENT(RB_LEFT(old, field), field) = elm; \
- if (RB_RIGHT(old, field)) \
- RB_PARENT(RB_RIGHT(old, field), field) = elm; \
- if (parent) { \
- left = parent; \
- do { \
- RB_AUGMENT(left); \
- } while ((left = RB_PARENT(left, field)) != NULL); \
- } \
- goto color; \
- } \
- parent = RB_PARENT(elm, field); \
- color = RB_COLOR(elm, field); \
- if (child) \
- RB_PARENT(child, field) = parent; \
- if (parent) { \
- if (RB_LEFT(parent, field) == elm) \
- RB_LEFT(parent, field) = child; \
- else \
- RB_RIGHT(parent, field) = child; \
- RB_AUGMENT(parent); \
- } else \
- RB_ROOT(head) = child; \
-color: \
- if (color == RB_BLACK) \
- name##_RB_REMOVE_COLOR(head, parent, child); \
- return (old); \
-} \
- \
-/* Inserts a node into the RB tree */ \
-attr struct type * \
-name##_RB_INSERT(struct name *head, struct type *elm) \
-{ \
- struct type *tmp; \
- struct type *parent = NULL; \
- int comp = 0; \
- tmp = RB_ROOT(head); \
- while (tmp) { \
- parent = tmp; \
- comp = (cmp)(elm, parent); \
- if (comp < 0) \
- tmp = RB_LEFT(tmp, field); \
- else if (comp > 0) \
- tmp = RB_RIGHT(tmp, field); \
- else \
- return (tmp); \
- } \
- RB_SET(elm, parent, field); \
- if (parent != NULL) { \
- if (comp < 0) \
- RB_LEFT(parent, field) = elm; \
- else \
- RB_RIGHT(parent, field) = elm; \
- RB_AUGMENT(parent); \
- } else \
- RB_ROOT(head) = elm; \
- name##_RB_INSERT_COLOR(head, elm); \
- return (NULL); \
-} \
- \
-/* Finds the node with the same key as elm */ \
-attr struct type * \
-name##_RB_FIND(struct name *head, struct type *elm) \
-{ \
- struct type *tmp = RB_ROOT(head); \
- int comp; \
- while (tmp) { \
- comp = cmp(elm, tmp); \
- if (comp < 0) \
- tmp = RB_LEFT(tmp, field); \
- else if (comp > 0) \
- tmp = RB_RIGHT(tmp, field); \
- else \
- return (tmp); \
- } \
- return (NULL); \
-} \
- \
-/* Finds the first node greater than or equal to the search key */ \
-attr struct type * \
-name##_RB_NFIND(struct name *head, struct type *elm) \
-{ \
- struct type *tmp = RB_ROOT(head); \
- struct type *res = NULL; \
- int comp; \
- while (tmp) { \
- comp = cmp(elm, tmp); \
- if (comp < 0) { \
- res = tmp; \
- tmp = RB_LEFT(tmp, field); \
- } \
- else if (comp > 0) \
- tmp = RB_RIGHT(tmp, field); \
- else \
- return (tmp); \
- } \
- return (res); \
-} \
- \
-/* ARGSUSED */ \
-attr struct type * \
-name##_RB_NEXT(struct type *elm) \
-{ \
- if (RB_RIGHT(elm, field)) { \
- elm = RB_RIGHT(elm, field); \
- while (RB_LEFT(elm, field)) \
- elm = RB_LEFT(elm, field); \
- } else { \
- if (RB_PARENT(elm, field) && \
- (elm == RB_LEFT(RB_PARENT(elm, field), field))) \
- elm = RB_PARENT(elm, field); \
- else { \
- while (RB_PARENT(elm, field) && \
- (elm == RB_RIGHT(RB_PARENT(elm, field), field))) \
- elm = RB_PARENT(elm, field); \
- elm = RB_PARENT(elm, field); \
- } \
- } \
- return (elm); \
-} \
- \
-/* ARGSUSED */ \
-attr struct type * \
-name##_RB_PREV(struct type *elm) \
-{ \
- if (RB_LEFT(elm, field)) { \
- elm = RB_LEFT(elm, field); \
- while (RB_RIGHT(elm, field)) \
- elm = RB_RIGHT(elm, field); \
- } else { \
- if (RB_PARENT(elm, field) && \
- (elm == RB_RIGHT(RB_PARENT(elm, field), field))) \
- elm = RB_PARENT(elm, field); \
- else { \
- while (RB_PARENT(elm, field) && \
- (elm == RB_LEFT(RB_PARENT(elm, field), field))) \
- elm = RB_PARENT(elm, field); \
- elm = RB_PARENT(elm, field); \
- } \
- } \
- return (elm); \
-} \
- \
-attr struct type * \
-name##_RB_MINMAX(struct name *head, int val) \
-{ \
- struct type *tmp = RB_ROOT(head); \
- struct type *parent = NULL; \
- while (tmp) { \
- parent = tmp; \
- if (val < 0) \
- tmp = RB_LEFT(tmp, field); \
- else \
- tmp = RB_RIGHT(tmp, field); \
- } \
- return (parent); \
-}
-
-#define RB_NEGINF -1
-#define RB_INF 1
-
-#define RB_INSERT(name, x, y) name##_RB_INSERT(x, y)
-#define RB_REMOVE(name, x, y) name##_RB_REMOVE(x, y)
-#define RB_FIND(name, x, y) name##_RB_FIND(x, y)
-#define RB_NFIND(name, x, y) name##_RB_NFIND(x, y)
-#define RB_NEXT(name, x, y) name##_RB_NEXT(y)
-#define RB_PREV(name, x, y) name##_RB_PREV(y)
-#define RB_MIN(name, x) name##_RB_MINMAX(x, RB_NEGINF)
-#define RB_MAX(name, x) name##_RB_MINMAX(x, RB_INF)
-
-#define RB_FOREACH(x, name, head) \
- for ((x) = RB_MIN(name, head); \
- (x) != NULL; \
- (x) = name##_RB_NEXT(x))
-
-#define RB_FOREACH_FROM(x, name, y) \
- for ((x) = (y); \
- ((x) != NULL) && ((y) = name##_RB_NEXT(x), (x) != NULL); \
- (x) = (y))
-
-#define RB_FOREACH_SAFE(x, name, head, y) \
- for ((x) = RB_MIN(name, head); \
- ((x) != NULL) && ((y) = name##_RB_NEXT(x), (x) != NULL); \
- (x) = (y))
-
-#define RB_FOREACH_REVERSE(x, name, head) \
- for ((x) = RB_MAX(name, head); \
- (x) != NULL; \
- (x) = name##_RB_PREV(x))
-
-#define RB_FOREACH_REVERSE_FROM(x, name, y) \
- for ((x) = (y); \
- ((x) != NULL) && ((y) = name##_RB_PREV(x), (x) != NULL); \
- (x) = (y))
-
-#define RB_FOREACH_REVERSE_SAFE(x, name, head, y) \
- for ((x) = RB_MAX(name, head); \
- ((x) != NULL) && ((y) = name##_RB_PREV(x), (x) != NULL); \
- (x) = (y))
-
-#endif /* UV_TREE_H_ */
diff --git a/3rdparty/libuv/include/uv-aix.h b/3rdparty/libuv/include/uv-aix.h
deleted file mode 100644
index 7dc992fa6d7..00000000000
--- a/3rdparty/libuv/include/uv-aix.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#ifndef UV_AIX_H
-#define UV_AIX_H
-
-#define UV_PLATFORM_LOOP_FIELDS \
- int fs_fd; \
-
-#define UV_PLATFORM_FS_EVENT_FIELDS \
- uv__io_t event_watcher; \
- char *dir_filename; \
-
-#endif /* UV_AIX_H */
diff --git a/3rdparty/libuv/include/uv-bsd.h b/3rdparty/libuv/include/uv-bsd.h
deleted file mode 100644
index 2d72b3d7711..00000000000
--- a/3rdparty/libuv/include/uv-bsd.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#ifndef UV_BSD_H
-#define UV_BSD_H
-
-#define UV_PLATFORM_FS_EVENT_FIELDS \
- uv__io_t event_watcher; \
-
-#define UV_IO_PRIVATE_PLATFORM_FIELDS \
- int rcount; \
- int wcount; \
-
-#define UV_HAVE_KQUEUE 1
-
-#endif /* UV_BSD_H */
diff --git a/3rdparty/libuv/include/uv-darwin.h b/3rdparty/libuv/include/uv-darwin.h
deleted file mode 100644
index d226415820b..00000000000
--- a/3rdparty/libuv/include/uv-darwin.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#ifndef UV_DARWIN_H
-#define UV_DARWIN_H
-
-#if defined(__APPLE__) && defined(__MACH__)
-# include <mach/mach.h>
-# include <mach/task.h>
-# include <mach/semaphore.h>
-# include <TargetConditionals.h>
-# define UV_PLATFORM_SEM_T semaphore_t
-#endif
-
-#define UV_IO_PRIVATE_PLATFORM_FIELDS \
- int rcount; \
- int wcount; \
-
-#define UV_PLATFORM_LOOP_FIELDS \
- uv_thread_t cf_thread; \
- void* _cf_reserved; \
- void* cf_state; \
- uv_mutex_t cf_mutex; \
- uv_sem_t cf_sem; \
- void* cf_signals[2]; \
-
-#define UV_PLATFORM_FS_EVENT_FIELDS \
- uv__io_t event_watcher; \
- char* realpath; \
- int realpath_len; \
- int cf_flags; \
- uv_async_t* cf_cb; \
- void* cf_events[2]; \
- void* cf_member[2]; \
- int cf_error; \
- uv_mutex_t cf_mutex; \
-
-#define UV_STREAM_PRIVATE_PLATFORM_FIELDS \
- void* select; \
-
-#define UV_HAVE_KQUEUE 1
-
-#endif /* UV_DARWIN_H */
diff --git a/3rdparty/libuv/include/uv-errno.h b/3rdparty/libuv/include/uv-errno.h
deleted file mode 100644
index 53f30296c1c..00000000000
--- a/3rdparty/libuv/include/uv-errno.h
+++ /dev/null
@@ -1,418 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#ifndef UV_ERRNO_H_
-#define UV_ERRNO_H_
-
-#include <errno.h>
-
-#define UV__EOF (-4095)
-#define UV__UNKNOWN (-4094)
-
-#define UV__EAI_ADDRFAMILY (-3000)
-#define UV__EAI_AGAIN (-3001)
-#define UV__EAI_BADFLAGS (-3002)
-#define UV__EAI_CANCELED (-3003)
-#define UV__EAI_FAIL (-3004)
-#define UV__EAI_FAMILY (-3005)
-#define UV__EAI_MEMORY (-3006)
-#define UV__EAI_NODATA (-3007)
-#define UV__EAI_NONAME (-3008)
-#define UV__EAI_OVERFLOW (-3009)
-#define UV__EAI_SERVICE (-3010)
-#define UV__EAI_SOCKTYPE (-3011)
-#define UV__EAI_BADHINTS (-3013)
-#define UV__EAI_PROTOCOL (-3014)
-
-/* Only map to the system errno on non-Windows platforms. It's apparently
- * a fairly common practice for Windows programmers to redefine errno codes.
- */
-#if defined(E2BIG) && !defined(_WIN32)
-# define UV__E2BIG (-E2BIG)
-#else
-# define UV__E2BIG (-4093)
-#endif
-
-#if defined(EACCES) && !defined(_WIN32)
-# define UV__EACCES (-EACCES)
-#else
-# define UV__EACCES (-4092)
-#endif
-
-#if defined(EADDRINUSE) && !defined(_WIN32)
-# define UV__EADDRINUSE (-EADDRINUSE)
-#else
-# define UV__EADDRINUSE (-4091)
-#endif
-
-#if defined(EADDRNOTAVAIL) && !defined(_WIN32)
-# define UV__EADDRNOTAVAIL (-EADDRNOTAVAIL)
-#else
-# define UV__EADDRNOTAVAIL (-4090)
-#endif
-
-#if defined(EAFNOSUPPORT) && !defined(_WIN32)
-# define UV__EAFNOSUPPORT (-EAFNOSUPPORT)
-#else
-# define UV__EAFNOSUPPORT (-4089)
-#endif
-
-#if defined(EAGAIN) && !defined(_WIN32)
-# define UV__EAGAIN (-EAGAIN)
-#else
-# define UV__EAGAIN (-4088)
-#endif
-
-#if defined(EALREADY) && !defined(_WIN32)
-# define UV__EALREADY (-EALREADY)
-#else
-# define UV__EALREADY (-4084)
-#endif
-
-#if defined(EBADF) && !defined(_WIN32)
-# define UV__EBADF (-EBADF)
-#else
-# define UV__EBADF (-4083)
-#endif
-
-#if defined(EBUSY) && !defined(_WIN32)
-# define UV__EBUSY (-EBUSY)
-#else
-# define UV__EBUSY (-4082)
-#endif
-
-#if defined(ECANCELED) && !defined(_WIN32)
-# define UV__ECANCELED (-ECANCELED)
-#else
-# define UV__ECANCELED (-4081)
-#endif
-
-#if defined(ECHARSET) && !defined(_WIN32)
-# define UV__ECHARSET (-ECHARSET)
-#else
-# define UV__ECHARSET (-4080)
-#endif
-
-#if defined(ECONNABORTED) && !defined(_WIN32)
-# define UV__ECONNABORTED (-ECONNABORTED)
-#else
-# define UV__ECONNABORTED (-4079)
-#endif
-
-#if defined(ECONNREFUSED) && !defined(_WIN32)
-# define UV__ECONNREFUSED (-ECONNREFUSED)
-#else
-# define UV__ECONNREFUSED (-4078)
-#endif
-
-#if defined(ECONNRESET) && !defined(_WIN32)
-# define UV__ECONNRESET (-ECONNRESET)
-#else
-# define UV__ECONNRESET (-4077)
-#endif
-
-#if defined(EDESTADDRREQ) && !defined(_WIN32)
-# define UV__EDESTADDRREQ (-EDESTADDRREQ)
-#else
-# define UV__EDESTADDRREQ (-4076)
-#endif
-
-#if defined(EEXIST) && !defined(_WIN32)
-# define UV__EEXIST (-EEXIST)
-#else
-# define UV__EEXIST (-4075)
-#endif
-
-#if defined(EFAULT) && !defined(_WIN32)
-# define UV__EFAULT (-EFAULT)
-#else
-# define UV__EFAULT (-4074)
-#endif
-
-#if defined(EHOSTUNREACH) && !defined(_WIN32)
-# define UV__EHOSTUNREACH (-EHOSTUNREACH)
-#else
-# define UV__EHOSTUNREACH (-4073)
-#endif
-
-#if defined(EINTR) && !defined(_WIN32)
-# define UV__EINTR (-EINTR)
-#else
-# define UV__EINTR (-4072)
-#endif
-
-#if defined(EINVAL) && !defined(_WIN32)
-# define UV__EINVAL (-EINVAL)
-#else
-# define UV__EINVAL (-4071)
-#endif
-
-#if defined(EIO) && !defined(_WIN32)
-# define UV__EIO (-EIO)
-#else
-# define UV__EIO (-4070)
-#endif
-
-#if defined(EISCONN) && !defined(_WIN32)
-# define UV__EISCONN (-EISCONN)
-#else
-# define UV__EISCONN (-4069)
-#endif
-
-#if defined(EISDIR) && !defined(_WIN32)
-# define UV__EISDIR (-EISDIR)
-#else
-# define UV__EISDIR (-4068)
-#endif
-
-#if defined(ELOOP) && !defined(_WIN32)
-# define UV__ELOOP (-ELOOP)
-#else
-# define UV__ELOOP (-4067)
-#endif
-
-#if defined(EMFILE) && !defined(_WIN32)
-# define UV__EMFILE (-EMFILE)
-#else
-# define UV__EMFILE (-4066)
-#endif
-
-#if defined(EMSGSIZE) && !defined(_WIN32)
-# define UV__EMSGSIZE (-EMSGSIZE)
-#else
-# define UV__EMSGSIZE (-4065)
-#endif
-
-#if defined(ENAMETOOLONG) && !defined(_WIN32)
-# define UV__ENAMETOOLONG (-ENAMETOOLONG)
-#else
-# define UV__ENAMETOOLONG (-4064)
-#endif
-
-#if defined(ENETDOWN) && !defined(_WIN32)
-# define UV__ENETDOWN (-ENETDOWN)
-#else
-# define UV__ENETDOWN (-4063)
-#endif
-
-#if defined(ENETUNREACH) && !defined(_WIN32)
-# define UV__ENETUNREACH (-ENETUNREACH)
-#else
-# define UV__ENETUNREACH (-4062)
-#endif
-
-#if defined(ENFILE) && !defined(_WIN32)
-# define UV__ENFILE (-ENFILE)
-#else
-# define UV__ENFILE (-4061)
-#endif
-
-#if defined(ENOBUFS) && !defined(_WIN32)
-# define UV__ENOBUFS (-ENOBUFS)
-#else
-# define UV__ENOBUFS (-4060)
-#endif
-
-#if defined(ENODEV) && !defined(_WIN32)
-# define UV__ENODEV (-ENODEV)
-#else
-# define UV__ENODEV (-4059)
-#endif
-
-#if defined(ENOENT) && !defined(_WIN32)
-# define UV__ENOENT (-ENOENT)
-#else
-# define UV__ENOENT (-4058)
-#endif
-
-#if defined(ENOMEM) && !defined(_WIN32)
-# define UV__ENOMEM (-ENOMEM)
-#else
-# define UV__ENOMEM (-4057)
-#endif
-
-#if defined(ENONET) && !defined(_WIN32)
-# define UV__ENONET (-ENONET)
-#else
-# define UV__ENONET (-4056)
-#endif
-
-#if defined(ENOSPC) && !defined(_WIN32)
-# define UV__ENOSPC (-ENOSPC)
-#else
-# define UV__ENOSPC (-4055)
-#endif
-
-#if defined(ENOSYS) && !defined(_WIN32)
-# define UV__ENOSYS (-ENOSYS)
-#else
-# define UV__ENOSYS (-4054)
-#endif
-
-#if defined(ENOTCONN) && !defined(_WIN32)
-# define UV__ENOTCONN (-ENOTCONN)
-#else
-# define UV__ENOTCONN (-4053)
-#endif
-
-#if defined(ENOTDIR) && !defined(_WIN32)
-# define UV__ENOTDIR (-ENOTDIR)
-#else
-# define UV__ENOTDIR (-4052)
-#endif
-
-#if defined(ENOTEMPTY) && !defined(_WIN32)
-# define UV__ENOTEMPTY (-ENOTEMPTY)
-#else
-# define UV__ENOTEMPTY (-4051)
-#endif
-
-#if defined(ENOTSOCK) && !defined(_WIN32)
-# define UV__ENOTSOCK (-ENOTSOCK)
-#else
-# define UV__ENOTSOCK (-4050)
-#endif
-
-#if defined(ENOTSUP) && !defined(_WIN32)
-# define UV__ENOTSUP (-ENOTSUP)
-#else
-# define UV__ENOTSUP (-4049)
-#endif
-
-#if defined(EPERM) && !defined(_WIN32)
-# define UV__EPERM (-EPERM)
-#else
-# define UV__EPERM (-4048)
-#endif
-
-#if defined(EPIPE) && !defined(_WIN32)
-# define UV__EPIPE (-EPIPE)
-#else
-# define UV__EPIPE (-4047)
-#endif
-
-#if defined(EPROTO) && !defined(_WIN32)
-# define UV__EPROTO (-EPROTO)
-#else
-# define UV__EPROTO (-4046)
-#endif
-
-#if defined(EPROTONOSUPPORT) && !defined(_WIN32)
-# define UV__EPROTONOSUPPORT (-EPROTONOSUPPORT)
-#else
-# define UV__EPROTONOSUPPORT (-4045)
-#endif
-
-#if defined(EPROTOTYPE) && !defined(_WIN32)
-# define UV__EPROTOTYPE (-EPROTOTYPE)
-#else
-# define UV__EPROTOTYPE (-4044)
-#endif
-
-#if defined(EROFS) && !defined(_WIN32)
-# define UV__EROFS (-EROFS)
-#else
-# define UV__EROFS (-4043)
-#endif
-
-#if defined(ESHUTDOWN) && !defined(_WIN32)
-# define UV__ESHUTDOWN (-ESHUTDOWN)
-#else
-# define UV__ESHUTDOWN (-4042)
-#endif
-
-#if defined(ESPIPE) && !defined(_WIN32)
-# define UV__ESPIPE (-ESPIPE)
-#else
-# define UV__ESPIPE (-4041)
-#endif
-
-#if defined(ESRCH) && !defined(_WIN32)
-# define UV__ESRCH (-ESRCH)
-#else
-# define UV__ESRCH (-4040)
-#endif
-
-#if defined(ETIMEDOUT) && !defined(_WIN32)
-# define UV__ETIMEDOUT (-ETIMEDOUT)
-#else
-# define UV__ETIMEDOUT (-4039)
-#endif
-
-#if defined(ETXTBSY) && !defined(_WIN32)
-# define UV__ETXTBSY (-ETXTBSY)
-#else
-# define UV__ETXTBSY (-4038)
-#endif
-
-#if defined(EXDEV) && !defined(_WIN32)
-# define UV__EXDEV (-EXDEV)
-#else
-# define UV__EXDEV (-4037)
-#endif
-
-#if defined(EFBIG) && !defined(_WIN32)
-# define UV__EFBIG (-EFBIG)
-#else
-# define UV__EFBIG (-4036)
-#endif
-
-#if defined(ENOPROTOOPT) && !defined(_WIN32)
-# define UV__ENOPROTOOPT (-ENOPROTOOPT)
-#else
-# define UV__ENOPROTOOPT (-4035)
-#endif
-
-#if defined(ERANGE) && !defined(_WIN32)
-# define UV__ERANGE (-ERANGE)
-#else
-# define UV__ERANGE (-4034)
-#endif
-
-#if defined(ENXIO) && !defined(_WIN32)
-# define UV__ENXIO (-ENXIO)
-#else
-# define UV__ENXIO (-4033)
-#endif
-
-#if defined(EMLINK) && !defined(_WIN32)
-# define UV__EMLINK (-EMLINK)
-#else
-# define UV__EMLINK (-4032)
-#endif
-
-/* EHOSTDOWN is not visible on BSD-like systems when _POSIX_C_SOURCE is
- * defined. Fortunately, its value is always 64 so it's possible albeit
- * icky to hard-code it.
- */
-#if defined(EHOSTDOWN) && !defined(_WIN32)
-# define UV__EHOSTDOWN (-EHOSTDOWN)
-#elif defined(__APPLE__) || \
- defined(__DragonFly__) || \
- defined(__FreeBSD__) || \
- defined(__NetBSD__) || \
- defined(__OpenBSD__)
-# define UV__EHOSTDOWN (-64)
-#else
-# define UV__EHOSTDOWN (-4031)
-#endif
-
-#endif /* UV_ERRNO_H_ */
diff --git a/3rdparty/libuv/include/uv-linux.h b/3rdparty/libuv/include/uv-linux.h
deleted file mode 100644
index 9b38405a190..00000000000
--- a/3rdparty/libuv/include/uv-linux.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#ifndef UV_LINUX_H
-#define UV_LINUX_H
-
-#define UV_PLATFORM_LOOP_FIELDS \
- uv__io_t inotify_read_watcher; \
- void* inotify_watchers; \
- int inotify_fd; \
-
-#define UV_PLATFORM_FS_EVENT_FIELDS \
- void* watchers[2]; \
- int wd; \
-
-#endif /* UV_LINUX_H */
diff --git a/3rdparty/libuv/include/uv-sunos.h b/3rdparty/libuv/include/uv-sunos.h
deleted file mode 100644
index 042166424e5..00000000000
--- a/3rdparty/libuv/include/uv-sunos.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#ifndef UV_SUNOS_H
-#define UV_SUNOS_H
-
-#include <sys/port.h>
-#include <port.h>
-
-/* For the sake of convenience and reduced #ifdef-ery in src/unix/sunos.c,
- * add the fs_event fields even when this version of SunOS doesn't support
- * file watching.
- */
-#define UV_PLATFORM_LOOP_FIELDS \
- uv__io_t fs_event_watcher; \
- int fs_fd; \
-
-#if defined(PORT_SOURCE_FILE)
-
-# define UV_PLATFORM_FS_EVENT_FIELDS \
- file_obj_t fo; \
- int fd; \
-
-#endif /* defined(PORT_SOURCE_FILE) */
-
-#endif /* UV_SUNOS_H */
diff --git a/3rdparty/libuv/include/uv-threadpool.h b/3rdparty/libuv/include/uv-threadpool.h
deleted file mode 100644
index 9708ebdd530..00000000000
--- a/3rdparty/libuv/include/uv-threadpool.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-/*
- * This file is private to libuv. It provides common functionality to both
- * Windows and Unix backends.
- */
-
-#ifndef UV_THREADPOOL_H_
-#define UV_THREADPOOL_H_
-
-struct uv__work {
- void (*work)(struct uv__work *w);
- void (*done)(struct uv__work *w, int status);
- struct uv_loop_s* loop;
- void* wq[2];
-};
-
-#endif /* UV_THREADPOOL_H_ */
diff --git a/3rdparty/libuv/include/uv-unix.h b/3rdparty/libuv/include/uv-unix.h
deleted file mode 100644
index 82d193bdca4..00000000000
--- a/3rdparty/libuv/include/uv-unix.h
+++ /dev/null
@@ -1,383 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#ifndef UV_UNIX_H
-#define UV_UNIX_H
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <dirent.h>
-
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-
-#include <termios.h>
-#include <pwd.h>
-
-#include <semaphore.h>
-#include <pthread.h>
-#ifdef __ANDROID__
-#include "pthread-fixes.h"
-#endif
-#include <signal.h>
-
-#include "uv-threadpool.h"
-
-#if defined(__linux__)
-# include "uv-linux.h"
-#elif defined(_AIX)
-# include "uv-aix.h"
-#elif defined(__sun)
-# include "uv-sunos.h"
-#elif defined(__APPLE__)
-# include "uv-darwin.h"
-#elif defined(__DragonFly__) || \
- defined(__FreeBSD__) || \
- defined(__OpenBSD__) || \
- defined(__NetBSD__)
-# include "uv-bsd.h"
-#endif
-
-#ifndef NI_MAXHOST
-# define NI_MAXHOST 1025
-#endif
-
-#ifndef NI_MAXSERV
-# define NI_MAXSERV 32
-#endif
-
-#ifndef UV_IO_PRIVATE_PLATFORM_FIELDS
-# define UV_IO_PRIVATE_PLATFORM_FIELDS /* empty */
-#endif
-
-struct uv__io_s;
-struct uv__async;
-struct uv_loop_s;
-
-typedef void (*uv__io_cb)(struct uv_loop_s* loop,
- struct uv__io_s* w,
- unsigned int events);
-typedef struct uv__io_s uv__io_t;
-
-struct uv__io_s {
- uv__io_cb cb;
- void* pending_queue[2];
- void* watcher_queue[2];
- unsigned int pevents; /* Pending event mask i.e. mask at next tick. */
- unsigned int events; /* Current event mask. */
- int fd;
- UV_IO_PRIVATE_PLATFORM_FIELDS
-};
-
-typedef void (*uv__async_cb)(struct uv_loop_s* loop,
- struct uv__async* w,
- unsigned int nevents);
-
-struct uv__async {
- uv__async_cb cb;
- uv__io_t io_watcher;
- int wfd;
-};
-
-#ifndef UV_PLATFORM_SEM_T
-# define UV_PLATFORM_SEM_T sem_t
-#endif
-
-#ifndef UV_PLATFORM_LOOP_FIELDS
-# define UV_PLATFORM_LOOP_FIELDS /* empty */
-#endif
-
-#ifndef UV_PLATFORM_FS_EVENT_FIELDS
-# define UV_PLATFORM_FS_EVENT_FIELDS /* empty */
-#endif
-
-#ifndef UV_STREAM_PRIVATE_PLATFORM_FIELDS
-# define UV_STREAM_PRIVATE_PLATFORM_FIELDS /* empty */
-#endif
-
-/* Note: May be cast to struct iovec. See writev(2). */
-typedef struct uv_buf_t {
- char* base;
- size_t len;
-} uv_buf_t;
-
-typedef int uv_file;
-typedef int uv_os_sock_t;
-typedef int uv_os_fd_t;
-
-#define UV_ONCE_INIT PTHREAD_ONCE_INIT
-
-typedef pthread_once_t uv_once_t;
-typedef pthread_t uv_thread_t;
-typedef pthread_mutex_t uv_mutex_t;
-typedef pthread_rwlock_t uv_rwlock_t;
-typedef UV_PLATFORM_SEM_T uv_sem_t;
-typedef pthread_cond_t uv_cond_t;
-typedef pthread_key_t uv_key_t;
-
-#if defined(__APPLE__) && defined(__MACH__)
-
-typedef struct {
- unsigned int n;
- unsigned int count;
- uv_mutex_t mutex;
- uv_sem_t turnstile1;
- uv_sem_t turnstile2;
-} uv_barrier_t;
-
-#else /* defined(__APPLE__) && defined(__MACH__) */
-
-typedef pthread_barrier_t uv_barrier_t;
-
-#endif /* defined(__APPLE__) && defined(__MACH__) */
-
-/* Platform-specific definitions for uv_spawn support. */
-typedef gid_t uv_gid_t;
-typedef uid_t uv_uid_t;
-
-typedef struct dirent uv__dirent_t;
-
-#if defined(DT_UNKNOWN)
-# define HAVE_DIRENT_TYPES
-# if defined(DT_REG)
-# define UV__DT_FILE DT_REG
-# else
-# define UV__DT_FILE -1
-# endif
-# if defined(DT_DIR)
-# define UV__DT_DIR DT_DIR
-# else
-# define UV__DT_DIR -2
-# endif
-# if defined(DT_LNK)
-# define UV__DT_LINK DT_LNK
-# else
-# define UV__DT_LINK -3
-# endif
-# if defined(DT_FIFO)
-# define UV__DT_FIFO DT_FIFO
-# else
-# define UV__DT_FIFO -4
-# endif
-# if defined(DT_SOCK)
-# define UV__DT_SOCKET DT_SOCK
-# else
-# define UV__DT_SOCKET -5
-# endif
-# if defined(DT_CHR)
-# define UV__DT_CHAR DT_CHR
-# else
-# define UV__DT_CHAR -6
-# endif
-# if defined(DT_BLK)
-# define UV__DT_BLOCK DT_BLK
-# else
-# define UV__DT_BLOCK -7
-# endif
-#endif
-
-/* Platform-specific definitions for uv_dlopen support. */
-#define UV_DYNAMIC /* empty */
-
-typedef struct {
- void* handle;
- char* errmsg;
-} uv_lib_t;
-
-#define UV_LOOP_PRIVATE_FIELDS \
- unsigned long flags; \
- int backend_fd; \
- void* pending_queue[2]; \
- void* watcher_queue[2]; \
- uv__io_t** watchers; \
- unsigned int nwatchers; \
- unsigned int nfds; \
- void* wq[2]; \
- uv_mutex_t wq_mutex; \
- uv_async_t wq_async; \
- uv_rwlock_t cloexec_lock; \
- uv_handle_t* closing_handles; \
- void* process_handles[2]; \
- void* prepare_handles[2]; \
- void* check_handles[2]; \
- void* idle_handles[2]; \
- void* async_handles[2]; \
- struct uv__async async_watcher; \
- struct { \
- void* min; \
- unsigned int nelts; \
- } timer_heap; \
- uint64_t timer_counter; \
- uint64_t time; \
- int signal_pipefd[2]; \
- uv__io_t signal_io_watcher; \
- uv_signal_t child_watcher; \
- int emfile_fd; \
- UV_PLATFORM_LOOP_FIELDS \
-
-#define UV_REQ_TYPE_PRIVATE /* empty */
-
-#define UV_REQ_PRIVATE_FIELDS /* empty */
-
-#define UV_PRIVATE_REQ_TYPES /* empty */
-
-#define UV_WRITE_PRIVATE_FIELDS \
- void* queue[2]; \
- unsigned int write_index; \
- uv_buf_t* bufs; \
- unsigned int nbufs; \
- int error; \
- uv_buf_t bufsml[4]; \
-
-#define UV_CONNECT_PRIVATE_FIELDS \
- void* queue[2]; \
-
-#define UV_SHUTDOWN_PRIVATE_FIELDS /* empty */
-
-#define UV_UDP_SEND_PRIVATE_FIELDS \
- void* queue[2]; \
- struct sockaddr_storage addr; \
- unsigned int nbufs; \
- uv_buf_t* bufs; \
- ssize_t status; \
- uv_udp_send_cb send_cb; \
- uv_buf_t bufsml[4]; \
-
-#define UV_HANDLE_PRIVATE_FIELDS \
- uv_handle_t* next_closing; \
- unsigned int flags; \
-
-#define UV_STREAM_PRIVATE_FIELDS \
- uv_connect_t *connect_req; \
- uv_shutdown_t *shutdown_req; \
- uv__io_t io_watcher; \
- void* write_queue[2]; \
- void* write_completed_queue[2]; \
- uv_connection_cb connection_cb; \
- int delayed_error; \
- int accepted_fd; \
- void* queued_fds; \
- UV_STREAM_PRIVATE_PLATFORM_FIELDS \
-
-#define UV_TCP_PRIVATE_FIELDS /* empty */
-
-#define UV_UDP_PRIVATE_FIELDS \
- uv_alloc_cb alloc_cb; \
- uv_udp_recv_cb recv_cb; \
- uv__io_t io_watcher; \
- void* write_queue[2]; \
- void* write_completed_queue[2]; \
-
-#define UV_PIPE_PRIVATE_FIELDS \
- const char* pipe_fname; /* strdup'ed */
-
-#define UV_POLL_PRIVATE_FIELDS \
- uv__io_t io_watcher;
-
-#define UV_PREPARE_PRIVATE_FIELDS \
- uv_prepare_cb prepare_cb; \
- void* queue[2]; \
-
-#define UV_CHECK_PRIVATE_FIELDS \
- uv_check_cb check_cb; \
- void* queue[2]; \
-
-#define UV_IDLE_PRIVATE_FIELDS \
- uv_idle_cb idle_cb; \
- void* queue[2]; \
-
-#define UV_ASYNC_PRIVATE_FIELDS \
- uv_async_cb async_cb; \
- void* queue[2]; \
- int pending; \
-
-#define UV_TIMER_PRIVATE_FIELDS \
- uv_timer_cb timer_cb; \
- void* heap_node[3]; \
- uint64_t timeout; \
- uint64_t repeat; \
- uint64_t start_id;
-
-#define UV_GETADDRINFO_PRIVATE_FIELDS \
- struct uv__work work_req; \
- uv_getaddrinfo_cb cb; \
- struct addrinfo* hints; \
- char* hostname; \
- char* service; \
- struct addrinfo* addrinfo; \
- int retcode;
-
-#define UV_GETNAMEINFO_PRIVATE_FIELDS \
- struct uv__work work_req; \
- uv_getnameinfo_cb getnameinfo_cb; \
- struct sockaddr_storage storage; \
- int flags; \
- char host[NI_MAXHOST]; \
- char service[NI_MAXSERV]; \
- int retcode;
-
-#define UV_PROCESS_PRIVATE_FIELDS \
- void* queue[2]; \
- int status; \
-
-#define UV_FS_PRIVATE_FIELDS \
- const char *new_path; \
- uv_file file; \
- int flags; \
- mode_t mode; \
- unsigned int nbufs; \
- uv_buf_t* bufs; \
- off_t off; \
- uv_uid_t uid; \
- uv_gid_t gid; \
- double atime; \
- double mtime; \
- struct uv__work work_req; \
- uv_buf_t bufsml[4]; \
-
-#define UV_WORK_PRIVATE_FIELDS \
- struct uv__work work_req;
-
-#define UV_TTY_PRIVATE_FIELDS \
- struct termios orig_termios; \
- int mode;
-
-#define UV_SIGNAL_PRIVATE_FIELDS \
- /* RB_ENTRY(uv_signal_s) tree_entry; */ \
- struct { \
- struct uv_signal_s* rbe_left; \
- struct uv_signal_s* rbe_right; \
- struct uv_signal_s* rbe_parent; \
- int rbe_color; \
- } tree_entry; \
- /* Use two counters here so we don have to fiddle with atomics. */ \
- unsigned int caught_signals; \
- unsigned int dispatched_signals;
-
-#define UV_FS_EVENT_PRIVATE_FIELDS \
- uv_fs_event_cb cb; \
- UV_PLATFORM_FS_EVENT_FIELDS \
-
-#endif /* UV_UNIX_H */
diff --git a/3rdparty/libuv/include/uv-version.h b/3rdparty/libuv/include/uv-version.h
deleted file mode 100644
index 6e61f55ed20..00000000000
--- a/3rdparty/libuv/include/uv-version.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#ifndef UV_VERSION_H
-#define UV_VERSION_H
-
- /*
- * Versions with the same major number are ABI stable. API is allowed to
- * evolve between minor releases, but only in a backwards compatible way.
- * Make sure you update the -soname directives in configure.ac
- * and uv.gyp whenever you bump UV_VERSION_MAJOR or UV_VERSION_MINOR (but
- * not UV_VERSION_PATCH.)
- */
-
-#define UV_VERSION_MAJOR 1
-#define UV_VERSION_MINOR 8
-#define UV_VERSION_PATCH 0
-#define UV_VERSION_IS_RELEASE 1
-#define UV_VERSION_SUFFIX ""
-
-#define UV_VERSION_HEX ((UV_VERSION_MAJOR << 16) | \
- (UV_VERSION_MINOR << 8) | \
- (UV_VERSION_PATCH))
-
-#endif /* UV_VERSION_H */
diff --git a/3rdparty/libuv/include/uv-win.h b/3rdparty/libuv/include/uv-win.h
deleted file mode 100644
index 300be476203..00000000000
--- a/3rdparty/libuv/include/uv-win.h
+++ /dev/null
@@ -1,653 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#ifndef _WIN32_WINNT
-# define _WIN32_WINNT 0x0502
-#endif
-
-#if !defined(_SSIZE_T_) && !defined(_SSIZE_T_DEFINED)
-typedef intptr_t ssize_t;
-# define _SSIZE_T_
-# define _SSIZE_T_DEFINED
-#endif
-
-#include <winsock2.h>
-
-#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)
-typedef struct pollfd {
- SOCKET fd;
- short events;
- short revents;
-} WSAPOLLFD, *PWSAPOLLFD, *LPWSAPOLLFD;
-#endif
-
-#ifndef LOCALE_INVARIANT
-# define LOCALE_INVARIANT 0x007f
-#endif
-
-#include <mswsock.h>
-#include <ws2tcpip.h>
-#include <windows.h>
-
-#include <process.h>
-#include <signal.h>
-#include <sys/stat.h>
-
-#if defined(_MSC_VER) && _MSC_VER < 1600
-# include "stdint-msvc2008.h"
-#else
-# include <stdint.h>
-#endif
-
-#include "tree.h"
-#include "uv-threadpool.h"
-
-#define MAX_PIPENAME_LEN 256
-
-#ifndef S_IFLNK
-# define S_IFLNK 0xA000
-#endif
-
-/* Additional signals supported by uv_signal and or uv_kill. The CRT defines
- * the following signals already:
- *
- * #define SIGINT 2
- * #define SIGILL 4
- * #define SIGABRT_COMPAT 6
- * #define SIGFPE 8
- * #define SIGSEGV 11
- * #define SIGTERM 15
- * #define SIGBREAK 21
- * #define SIGABRT 22
- *
- * The additional signals have values that are common on other Unix
- * variants (Linux and Darwin)
- */
-#define SIGHUP 1
-#define SIGKILL 9
-#define SIGWINCH 28
-
-/* The CRT defines SIGABRT_COMPAT as 6, which equals SIGABRT on many */
-/* unix-like platforms. However MinGW doesn't define it, so we do. */
-#ifndef SIGABRT_COMPAT
-# define SIGABRT_COMPAT 6
-#endif
-
-/*
- * Guids and typedefs for winsock extension functions
- * Mingw32 doesn't have these :-(
- */
-#ifndef WSAID_ACCEPTEX
-# define WSAID_ACCEPTEX \
- {0xb5367df1, 0xcbac, 0x11cf, \
- {0x95, 0xca, 0x00, 0x80, 0x5f, 0x48, 0xa1, 0x92}}
-
-# define WSAID_CONNECTEX \
- {0x25a207b9, 0xddf3, 0x4660, \
- {0x8e, 0xe9, 0x76, 0xe5, 0x8c, 0x74, 0x06, 0x3e}}
-
-# define WSAID_GETACCEPTEXSOCKADDRS \
- {0xb5367df2, 0xcbac, 0x11cf, \
- {0x95, 0xca, 0x00, 0x80, 0x5f, 0x48, 0xa1, 0x92}}
-
-# define WSAID_DISCONNECTEX \
- {0x7fda2e11, 0x8630, 0x436f, \
- {0xa0, 0x31, 0xf5, 0x36, 0xa6, 0xee, 0xc1, 0x57}}
-
-# define WSAID_TRANSMITFILE \
- {0xb5367df0, 0xcbac, 0x11cf, \
- {0x95, 0xca, 0x00, 0x80, 0x5f, 0x48, 0xa1, 0x92}}
-
- typedef BOOL PASCAL (*LPFN_ACCEPTEX)
- (SOCKET sListenSocket,
- SOCKET sAcceptSocket,
- PVOID lpOutputBuffer,
- DWORD dwReceiveDataLength,
- DWORD dwLocalAddressLength,
- DWORD dwRemoteAddressLength,
- LPDWORD lpdwBytesReceived,
- LPOVERLAPPED lpOverlapped);
-
- typedef BOOL PASCAL (*LPFN_CONNECTEX)
- (SOCKET s,
- const struct sockaddr* name,
- int namelen,
- PVOID lpSendBuffer,
- DWORD dwSendDataLength,
- LPDWORD lpdwBytesSent,
- LPOVERLAPPED lpOverlapped);
-
- typedef void PASCAL (*LPFN_GETACCEPTEXSOCKADDRS)
- (PVOID lpOutputBuffer,
- DWORD dwReceiveDataLength,
- DWORD dwLocalAddressLength,
- DWORD dwRemoteAddressLength,
- LPSOCKADDR* LocalSockaddr,
- LPINT LocalSockaddrLength,
- LPSOCKADDR* RemoteSockaddr,
- LPINT RemoteSockaddrLength);
-
- typedef BOOL PASCAL (*LPFN_DISCONNECTEX)
- (SOCKET hSocket,
- LPOVERLAPPED lpOverlapped,
- DWORD dwFlags,
- DWORD reserved);
-
- typedef BOOL PASCAL (*LPFN_TRANSMITFILE)
- (SOCKET hSocket,
- HANDLE hFile,
- DWORD nNumberOfBytesToWrite,
- DWORD nNumberOfBytesPerSend,
- LPOVERLAPPED lpOverlapped,
- LPTRANSMIT_FILE_BUFFERS lpTransmitBuffers,
- DWORD dwFlags);
-
- typedef PVOID RTL_SRWLOCK;
- typedef RTL_SRWLOCK SRWLOCK, *PSRWLOCK;
-#endif
-
-typedef int (WSAAPI* LPFN_WSARECV)
- (SOCKET socket,
- LPWSABUF buffers,
- DWORD buffer_count,
- LPDWORD bytes,
- LPDWORD flags,
- LPWSAOVERLAPPED overlapped,
- LPWSAOVERLAPPED_COMPLETION_ROUTINE completion_routine);
-
-typedef int (WSAAPI* LPFN_WSARECVFROM)
- (SOCKET socket,
- LPWSABUF buffers,
- DWORD buffer_count,
- LPDWORD bytes,
- LPDWORD flags,
- struct sockaddr* addr,
- LPINT addr_len,
- LPWSAOVERLAPPED overlapped,
- LPWSAOVERLAPPED_COMPLETION_ROUTINE completion_routine);
-
-#ifndef _NTDEF_
- typedef LONG NTSTATUS;
- typedef NTSTATUS *PNTSTATUS;
-#endif
-
-#ifndef RTL_CONDITION_VARIABLE_INIT
- typedef PVOID CONDITION_VARIABLE, *PCONDITION_VARIABLE;
-#endif
-
-typedef struct _AFD_POLL_HANDLE_INFO {
- HANDLE Handle;
- ULONG Events;
- NTSTATUS Status;
-} AFD_POLL_HANDLE_INFO, *PAFD_POLL_HANDLE_INFO;
-
-typedef struct _AFD_POLL_INFO {
- LARGE_INTEGER Timeout;
- ULONG NumberOfHandles;
- ULONG Exclusive;
- AFD_POLL_HANDLE_INFO Handles[1];
-} AFD_POLL_INFO, *PAFD_POLL_INFO;
-
-#define UV_MSAFD_PROVIDER_COUNT 3
-
-
-/**
- * It should be possible to cast uv_buf_t[] to WSABUF[]
- * see http://msdn.microsoft.com/en-us/library/ms741542(v=vs.85).aspx
- */
-typedef struct uv_buf_t {
- ULONG len;
- char* base;
-} uv_buf_t;
-
-typedef int uv_file;
-typedef SOCKET uv_os_sock_t;
-typedef HANDLE uv_os_fd_t;
-
-typedef HANDLE uv_thread_t;
-
-typedef HANDLE uv_sem_t;
-
-typedef CRITICAL_SECTION uv_mutex_t;
-
-/* This condition variable implementation is based on the SetEvent solution
- * (section 3.2) at http://www.cs.wustl.edu/~schmidt/win32-cv-1.html
- * We could not use the SignalObjectAndWait solution (section 3.4) because
- * it want the 2nd argument (type uv_mutex_t) of uv_cond_wait() and
- * uv_cond_timedwait() to be HANDLEs, but we use CRITICAL_SECTIONs.
- */
-
-typedef union {
- CONDITION_VARIABLE cond_var;
- struct {
- unsigned int waiters_count;
- CRITICAL_SECTION waiters_count_lock;
- HANDLE signal_event;
- HANDLE broadcast_event;
- } fallback;
-} uv_cond_t;
-
-typedef union {
- struct {
- unsigned int num_readers_;
- CRITICAL_SECTION num_readers_lock_;
- HANDLE write_semaphore_;
- } state_;
- /* TODO: remove me in v2.x. */
- struct {
- SRWLOCK unused_;
- } unused1_;
- /* TODO: remove me in v2.x. */
- struct {
- uv_mutex_t unused1_;
- uv_mutex_t unused2_;
- } unused2_;
-} uv_rwlock_t;
-
-typedef struct {
- unsigned int n;
- unsigned int count;
- uv_mutex_t mutex;
- uv_sem_t turnstile1;
- uv_sem_t turnstile2;
-} uv_barrier_t;
-
-typedef struct {
- DWORD tls_index;
-} uv_key_t;
-
-#define UV_ONCE_INIT { 0, NULL }
-
-typedef struct uv_once_s {
- unsigned char ran;
- HANDLE event;
-} uv_once_t;
-
-/* Platform-specific definitions for uv_spawn support. */
-typedef unsigned char uv_uid_t;
-typedef unsigned char uv_gid_t;
-
-typedef struct uv__dirent_s {
- int d_type;
- char d_name[1];
-} uv__dirent_t;
-
-#define HAVE_DIRENT_TYPES
-#define UV__DT_DIR UV_DIRENT_DIR
-#define UV__DT_FILE UV_DIRENT_FILE
-#define UV__DT_LINK UV_DIRENT_LINK
-#define UV__DT_FIFO UV_DIRENT_FIFO
-#define UV__DT_SOCKET UV_DIRENT_SOCKET
-#define UV__DT_CHAR UV_DIRENT_CHAR
-#define UV__DT_BLOCK UV_DIRENT_BLOCK
-
-/* Platform-specific definitions for uv_dlopen support. */
-#define UV_DYNAMIC FAR WINAPI
-typedef struct {
- HMODULE handle;
- char* errmsg;
-} uv_lib_t;
-
-RB_HEAD(uv_timer_tree_s, uv_timer_s);
-
-#define UV_LOOP_PRIVATE_FIELDS \
- /* The loop's I/O completion port */ \
- HANDLE iocp; \
- /* The current time according to the event loop. in msecs. */ \
- uint64_t time; \
- /* Tail of a single-linked circular queue of pending reqs. If the queue */ \
- /* is empty, tail_ is NULL. If there is only one item, */ \
- /* tail_->next_req == tail_ */ \
- uv_req_t* pending_reqs_tail; \
- /* Head of a single-linked list of closed handles */ \
- uv_handle_t* endgame_handles; \
- /* The head of the timers tree */ \
- struct uv_timer_tree_s timers; \
- /* Lists of active loop (prepare / check / idle) watchers */ \
- uv_prepare_t* prepare_handles; \
- uv_check_t* check_handles; \
- uv_idle_t* idle_handles; \
- /* This pointer will refer to the prepare/check/idle handle whose */ \
- /* callback is scheduled to be called next. This is needed to allow */ \
- /* safe removal from one of the lists above while that list being */ \
- /* iterated over. */ \
- uv_prepare_t* next_prepare_handle; \
- uv_check_t* next_check_handle; \
- uv_idle_t* next_idle_handle; \
- /* This handle holds the peer sockets for the fast variant of uv_poll_t */ \
- SOCKET poll_peer_sockets[UV_MSAFD_PROVIDER_COUNT]; \
- /* Counter to keep track of active tcp streams */ \
- unsigned int active_tcp_streams; \
- /* Counter to keep track of active udp streams */ \
- unsigned int active_udp_streams; \
- /* Counter to started timer */ \
- uint64_t timer_counter; \
- /* Threadpool */ \
- void* wq[2]; \
- uv_mutex_t wq_mutex; \
- uv_async_t wq_async;
-
-#define UV_REQ_TYPE_PRIVATE \
- /* TODO: remove the req suffix */ \
- UV_ACCEPT, \
- UV_FS_EVENT_REQ, \
- UV_POLL_REQ, \
- UV_PROCESS_EXIT, \
- UV_READ, \
- UV_UDP_RECV, \
- UV_WAKEUP, \
- UV_SIGNAL_REQ,
-
-#define UV_REQ_PRIVATE_FIELDS \
- union { \
- /* Used by I/O operations */ \
- struct { \
- OVERLAPPED overlapped; \
- size_t queued_bytes; \
- } io; \
- } u; \
- struct uv_req_s* next_req;
-
-#define UV_WRITE_PRIVATE_FIELDS \
- int ipc_header; \
- uv_buf_t write_buffer; \
- HANDLE event_handle; \
- HANDLE wait_handle;
-
-#define UV_CONNECT_PRIVATE_FIELDS \
- /* empty */
-
-#define UV_SHUTDOWN_PRIVATE_FIELDS \
- /* empty */
-
-#define UV_UDP_SEND_PRIVATE_FIELDS \
- /* empty */
-
-#define UV_PRIVATE_REQ_TYPES \
- typedef struct uv_pipe_accept_s { \
- UV_REQ_FIELDS \
- HANDLE pipeHandle; \
- struct uv_pipe_accept_s* next_pending; \
- } uv_pipe_accept_t; \
- \
- typedef struct uv_tcp_accept_s { \
- UV_REQ_FIELDS \
- SOCKET accept_socket; \
- char accept_buffer[sizeof(struct sockaddr_storage) * 2 + 32]; \
- HANDLE event_handle; \
- HANDLE wait_handle; \
- struct uv_tcp_accept_s* next_pending; \
- } uv_tcp_accept_t; \
- \
- typedef struct uv_read_s { \
- UV_REQ_FIELDS \
- HANDLE event_handle; \
- HANDLE wait_handle; \
- } uv_read_t;
-
-#define uv_stream_connection_fields \
- unsigned int write_reqs_pending; \
- uv_shutdown_t* shutdown_req;
-
-#define uv_stream_server_fields \
- uv_connection_cb connection_cb;
-
-#define UV_STREAM_PRIVATE_FIELDS \
- unsigned int reqs_pending; \
- int activecnt; \
- uv_read_t read_req; \
- union { \
- struct { uv_stream_connection_fields } conn; \
- struct { uv_stream_server_fields } serv; \
- } stream;
-
-#define uv_tcp_server_fields \
- uv_tcp_accept_t* accept_reqs; \
- unsigned int processed_accepts; \
- uv_tcp_accept_t* pending_accepts; \
- LPFN_ACCEPTEX func_acceptex;
-
-#define uv_tcp_connection_fields \
- uv_buf_t read_buffer; \
- LPFN_CONNECTEX func_connectex;
-
-#define UV_TCP_PRIVATE_FIELDS \
- SOCKET socket; \
- int delayed_error; \
- union { \
- struct { uv_tcp_server_fields } serv; \
- struct { uv_tcp_connection_fields } conn; \
- } tcp;
-
-#define UV_UDP_PRIVATE_FIELDS \
- SOCKET socket; \
- unsigned int reqs_pending; \
- int activecnt; \
- uv_req_t recv_req; \
- uv_buf_t recv_buffer; \
- struct sockaddr_storage recv_from; \
- int recv_from_len; \
- uv_udp_recv_cb recv_cb; \
- uv_alloc_cb alloc_cb; \
- LPFN_WSARECV func_wsarecv; \
- LPFN_WSARECVFROM func_wsarecvfrom;
-
-#define uv_pipe_server_fields \
- int pending_instances; \
- uv_pipe_accept_t* accept_reqs; \
- uv_pipe_accept_t* pending_accepts;
-
-#define uv_pipe_connection_fields \
- uv_timer_t* eof_timer; \
- uv_write_t ipc_header_write_req; \
- int ipc_pid; \
- uint64_t remaining_ipc_rawdata_bytes; \
- struct { \
- void* queue[2]; \
- int queue_len; \
- } pending_ipc_info; \
- uv_write_t* non_overlapped_writes_tail; \
- uv_mutex_t readfile_mutex; \
- volatile HANDLE readfile_thread;
-
-#define UV_PIPE_PRIVATE_FIELDS \
- HANDLE handle; \
- WCHAR* name; \
- union { \
- struct { uv_pipe_server_fields } serv; \
- struct { uv_pipe_connection_fields } conn; \
- } pipe;
-
-/* TODO: put the parser states in an union - TTY handles are always */
-/* half-duplex so read-state can safely overlap write-state. */
-#define UV_TTY_PRIVATE_FIELDS \
- HANDLE handle; \
- union { \
- struct { \
- /* Used for readable TTY handles */ \
- HANDLE read_line_handle; \
- uv_buf_t read_line_buffer; \
- HANDLE read_raw_wait; \
- /* Fields used for translating win keystrokes into vt100 characters */ \
- char last_key[8]; \
- unsigned char last_key_offset; \
- unsigned char last_key_len; \
- WCHAR last_utf16_high_surrogate; \
- INPUT_RECORD last_input_record; \
- } rd; \
- struct { \
- /* Used for writable TTY handles */ \
- /* utf8-to-utf16 conversion state */ \
- unsigned int utf8_codepoint; \
- unsigned char utf8_bytes_left; \
- /* eol conversion state */ \
- unsigned char previous_eol; \
- /* ansi parser state */ \
- unsigned char ansi_parser_state; \
- unsigned char ansi_csi_argc; \
- unsigned short ansi_csi_argv[4]; \
- COORD saved_position; \
- WORD saved_attributes; \
- } wr; \
- } tty;
-
-#define UV_POLL_PRIVATE_FIELDS \
- SOCKET socket; \
- /* Used in fast mode */ \
- SOCKET peer_socket; \
- AFD_POLL_INFO afd_poll_info_1; \
- AFD_POLL_INFO afd_poll_info_2; \
- /* Used in fast and slow mode. */ \
- uv_req_t poll_req_1; \
- uv_req_t poll_req_2; \
- unsigned char submitted_events_1; \
- unsigned char submitted_events_2; \
- unsigned char mask_events_1; \
- unsigned char mask_events_2; \
- unsigned char events;
-
-#define UV_TIMER_PRIVATE_FIELDS \
- RB_ENTRY(uv_timer_s) tree_entry; \
- uint64_t due; \
- uint64_t repeat; \
- uint64_t start_id; \
- uv_timer_cb timer_cb;
-
-#define UV_ASYNC_PRIVATE_FIELDS \
- struct uv_req_s async_req; \
- uv_async_cb async_cb; \
- /* char to avoid alignment issues */ \
- char volatile async_sent;
-
-#define UV_PREPARE_PRIVATE_FIELDS \
- uv_prepare_t* prepare_prev; \
- uv_prepare_t* prepare_next; \
- uv_prepare_cb prepare_cb;
-
-#define UV_CHECK_PRIVATE_FIELDS \
- uv_check_t* check_prev; \
- uv_check_t* check_next; \
- uv_check_cb check_cb;
-
-#define UV_IDLE_PRIVATE_FIELDS \
- uv_idle_t* idle_prev; \
- uv_idle_t* idle_next; \
- uv_idle_cb idle_cb;
-
-#define UV_HANDLE_PRIVATE_FIELDS \
- uv_handle_t* endgame_next; \
- unsigned int flags;
-
-#define UV_GETADDRINFO_PRIVATE_FIELDS \
- struct uv__work work_req; \
- uv_getaddrinfo_cb getaddrinfo_cb; \
- void* alloc; \
- WCHAR* node; \
- WCHAR* service; \
- /* The addrinfoW field is used to store a pointer to the hints, and */ \
- /* later on to store the result of GetAddrInfoW. The final result will */ \
- /* be converted to struct addrinfo* and stored in the addrinfo field. */ \
- struct addrinfoW* addrinfow; \
- struct addrinfo* addrinfo; \
- int retcode;
-
-#define UV_GETNAMEINFO_PRIVATE_FIELDS \
- struct uv__work work_req; \
- uv_getnameinfo_cb getnameinfo_cb; \
- struct sockaddr_storage storage; \
- int flags; \
- char host[NI_MAXHOST]; \
- char service[NI_MAXSERV]; \
- int retcode;
-
-#define UV_PROCESS_PRIVATE_FIELDS \
- struct uv_process_exit_s { \
- UV_REQ_FIELDS \
- } exit_req; \
- BYTE* child_stdio_buffer; \
- int exit_signal; \
- HANDLE wait_handle; \
- HANDLE process_handle; \
- volatile char exit_cb_pending;
-
-#define UV_FS_PRIVATE_FIELDS \
- struct uv__work work_req; \
- int flags; \
- DWORD sys_errno_; \
- union { \
- /* TODO: remove me in 0.9. */ \
- WCHAR* pathw; \
- int fd; \
- } file; \
- union { \
- struct { \
- int mode; \
- WCHAR* new_pathw; \
- int file_flags; \
- int fd_out; \
- unsigned int nbufs; \
- uv_buf_t* bufs; \
- int64_t offset; \
- uv_buf_t bufsml[4]; \
- } info; \
- struct { \
- double atime; \
- double mtime; \
- } time; \
- } fs;
-
-#define UV_WORK_PRIVATE_FIELDS \
- struct uv__work work_req;
-
-#define UV_FS_EVENT_PRIVATE_FIELDS \
- struct uv_fs_event_req_s { \
- UV_REQ_FIELDS \
- } req; \
- HANDLE dir_handle; \
- int req_pending; \
- uv_fs_event_cb cb; \
- WCHAR* filew; \
- WCHAR* short_filew; \
- WCHAR* dirw; \
- char* buffer;
-
-#define UV_SIGNAL_PRIVATE_FIELDS \
- RB_ENTRY(uv_signal_s) tree_entry; \
- struct uv_req_s signal_req; \
- unsigned long pending_signum;
-
-int uv_utf16_to_utf8(const WCHAR* utf16Buffer, size_t utf16Size,
- char* utf8Buffer, size_t utf8Size);
-int uv_utf8_to_utf16(const char* utf8Buffer, WCHAR* utf16Buffer,
- size_t utf16Size);
-
-#ifndef F_OK
-#define F_OK 0
-#endif
-#ifndef R_OK
-#define R_OK 4
-#endif
-#ifndef W_OK
-#define W_OK 2
-#endif
-#ifndef X_OK
-#define X_OK 1
-#endif
diff --git a/3rdparty/libuv/include/uv.h b/3rdparty/libuv/include/uv.h
deleted file mode 100644
index dd3111a960e..00000000000
--- a/3rdparty/libuv/include/uv.h
+++ /dev/null
@@ -1,1482 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-/* See https://github.com/libuv/libuv#documentation for documentation. */
-
-#ifndef UV_H
-#define UV_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef _WIN32
- /* Windows - set up dll import/export decorators. */
-# if defined(BUILDING_UV_SHARED)
- /* Building shared library. */
-# define UV_EXTERN __declspec(dllexport)
-# elif defined(USING_UV_SHARED)
- /* Using shared library. */
-# define UV_EXTERN __declspec(dllimport)
-# else
- /* Building static library. */
-# define UV_EXTERN /* nothing */
-# endif
-#elif __GNUC__ >= 4
-# define UV_EXTERN __attribute__((visibility("default")))
-#else
-# define UV_EXTERN /* nothing */
-#endif
-
-#include "uv-errno.h"
-#include "uv-version.h"
-#include <stddef.h>
-#include <stdio.h>
-
-#if defined(_MSC_VER) && _MSC_VER < 1600
-# include "stdint-msvc2008.h"
-#else
-# include <stdint.h>
-#endif
-
-#if defined(_WIN32)
-# include "uv-win.h"
-#else
-# include "uv-unix.h"
-#endif
-
-/* Expand this list if necessary. */
-#define UV_ERRNO_MAP(XX) \
- XX(E2BIG, "argument list too long") \
- XX(EACCES, "permission denied") \
- XX(EADDRINUSE, "address already in use") \
- XX(EADDRNOTAVAIL, "address not available") \
- XX(EAFNOSUPPORT, "address family not supported") \
- XX(EAGAIN, "resource temporarily unavailable") \
- XX(EAI_ADDRFAMILY, "address family not supported") \
- XX(EAI_AGAIN, "temporary failure") \
- XX(EAI_BADFLAGS, "bad ai_flags value") \
- XX(EAI_BADHINTS, "invalid value for hints") \
- XX(EAI_CANCELED, "request canceled") \
- XX(EAI_FAIL, "permanent failure") \
- XX(EAI_FAMILY, "ai_family not supported") \
- XX(EAI_MEMORY, "out of memory") \
- XX(EAI_NODATA, "no address") \
- XX(EAI_NONAME, "unknown node or service") \
- XX(EAI_OVERFLOW, "argument buffer overflow") \
- XX(EAI_PROTOCOL, "resolved protocol is unknown") \
- XX(EAI_SERVICE, "service not available for socket type") \
- XX(EAI_SOCKTYPE, "socket type not supported") \
- XX(EALREADY, "connection already in progress") \
- XX(EBADF, "bad file descriptor") \
- XX(EBUSY, "resource busy or locked") \
- XX(ECANCELED, "operation canceled") \
- XX(ECHARSET, "invalid Unicode character") \
- XX(ECONNABORTED, "software caused connection abort") \
- XX(ECONNREFUSED, "connection refused") \
- XX(ECONNRESET, "connection reset by peer") \
- XX(EDESTADDRREQ, "destination address required") \
- XX(EEXIST, "file already exists") \
- XX(EFAULT, "bad address in system call argument") \
- XX(EFBIG, "file too large") \
- XX(EHOSTUNREACH, "host is unreachable") \
- XX(EINTR, "interrupted system call") \
- XX(EINVAL, "invalid argument") \
- XX(EIO, "i/o error") \
- XX(EISCONN, "socket is already connected") \
- XX(EISDIR, "illegal operation on a directory") \
- XX(ELOOP, "too many symbolic links encountered") \
- XX(EMFILE, "too many open files") \
- XX(EMSGSIZE, "message too long") \
- XX(ENAMETOOLONG, "name too long") \
- XX(ENETDOWN, "network is down") \
- XX(ENETUNREACH, "network is unreachable") \
- XX(ENFILE, "file table overflow") \
- XX(ENOBUFS, "no buffer space available") \
- XX(ENODEV, "no such device") \
- XX(ENOENT, "no such file or directory") \
- XX(ENOMEM, "not enough memory") \
- XX(ENONET, "machine is not on the network") \
- XX(ENOPROTOOPT, "protocol not available") \
- XX(ENOSPC, "no space left on device") \
- XX(ENOSYS, "function not implemented") \
- XX(ENOTCONN, "socket is not connected") \
- XX(ENOTDIR, "not a directory") \
- XX(ENOTEMPTY, "directory not empty") \
- XX(ENOTSOCK, "socket operation on non-socket") \
- XX(ENOTSUP, "operation not supported on socket") \
- XX(EPERM, "operation not permitted") \
- XX(EPIPE, "broken pipe") \
- XX(EPROTO, "protocol error") \
- XX(EPROTONOSUPPORT, "protocol not supported") \
- XX(EPROTOTYPE, "protocol wrong type for socket") \
- XX(ERANGE, "result too large") \
- XX(EROFS, "read-only file system") \
- XX(ESHUTDOWN, "cannot send after transport endpoint shutdown") \
- XX(ESPIPE, "invalid seek") \
- XX(ESRCH, "no such process") \
- XX(ETIMEDOUT, "connection timed out") \
- XX(ETXTBSY, "text file is busy") \
- XX(EXDEV, "cross-device link not permitted") \
- XX(UNKNOWN, "unknown error") \
- XX(EOF, "end of file") \
- XX(ENXIO, "no such device or address") \
- XX(EMLINK, "too many links") \
- XX(EHOSTDOWN, "host is down") \
-
-#define UV_HANDLE_TYPE_MAP(XX) \
- XX(ASYNC, async) \
- XX(CHECK, check) \
- XX(FS_EVENT, fs_event) \
- XX(FS_POLL, fs_poll) \
- XX(HANDLE, handle) \
- XX(IDLE, idle) \
- XX(NAMED_PIPE, pipe) \
- XX(POLL, poll) \
- XX(PREPARE, prepare) \
- XX(PROCESS, process) \
- XX(STREAM, stream) \
- XX(TCP, tcp) \
- XX(TIMER, timer) \
- XX(TTY, tty) \
- XX(UDP, udp) \
- XX(SIGNAL, signal) \
-
-#define UV_REQ_TYPE_MAP(XX) \
- XX(REQ, req) \
- XX(CONNECT, connect) \
- XX(WRITE, write) \
- XX(SHUTDOWN, shutdown) \
- XX(UDP_SEND, udp_send) \
- XX(FS, fs) \
- XX(WORK, work) \
- XX(GETADDRINFO, getaddrinfo) \
- XX(GETNAMEINFO, getnameinfo) \
-
-typedef enum {
-#define XX(code, _) UV_ ## code = UV__ ## code,
- UV_ERRNO_MAP(XX)
-#undef XX
- UV_ERRNO_MAX = UV__EOF - 1
-} uv_errno_t;
-
-typedef enum {
- UV_UNKNOWN_HANDLE = 0,
-#define XX(uc, lc) UV_##uc,
- UV_HANDLE_TYPE_MAP(XX)
-#undef XX
- UV_FILE,
- UV_HANDLE_TYPE_MAX
-} uv_handle_type;
-
-typedef enum {
- UV_UNKNOWN_REQ = 0,
-#define XX(uc, lc) UV_##uc,
- UV_REQ_TYPE_MAP(XX)
-#undef XX
- UV_REQ_TYPE_PRIVATE
- UV_REQ_TYPE_MAX
-} uv_req_type;
-
-
-/* Handle types. */
-typedef struct uv_loop_s uv_loop_t;
-typedef struct uv_handle_s uv_handle_t;
-typedef struct uv_stream_s uv_stream_t;
-typedef struct uv_tcp_s uv_tcp_t;
-typedef struct uv_udp_s uv_udp_t;
-typedef struct uv_pipe_s uv_pipe_t;
-typedef struct uv_tty_s uv_tty_t;
-typedef struct uv_poll_s uv_poll_t;
-typedef struct uv_timer_s uv_timer_t;
-typedef struct uv_prepare_s uv_prepare_t;
-typedef struct uv_check_s uv_check_t;
-typedef struct uv_idle_s uv_idle_t;
-typedef struct uv_async_s uv_async_t;
-typedef struct uv_process_s uv_process_t;
-typedef struct uv_fs_event_s uv_fs_event_t;
-typedef struct uv_fs_poll_s uv_fs_poll_t;
-typedef struct uv_signal_s uv_signal_t;
-
-/* Request types. */
-typedef struct uv_req_s uv_req_t;
-typedef struct uv_getaddrinfo_s uv_getaddrinfo_t;
-typedef struct uv_getnameinfo_s uv_getnameinfo_t;
-typedef struct uv_shutdown_s uv_shutdown_t;
-typedef struct uv_write_s uv_write_t;
-typedef struct uv_connect_s uv_connect_t;
-typedef struct uv_udp_send_s uv_udp_send_t;
-typedef struct uv_fs_s uv_fs_t;
-typedef struct uv_work_s uv_work_t;
-
-/* None of the above. */
-typedef struct uv_cpu_info_s uv_cpu_info_t;
-typedef struct uv_interface_address_s uv_interface_address_t;
-typedef struct uv_dirent_s uv_dirent_t;
-
-typedef enum {
- UV_LOOP_BLOCK_SIGNAL
-} uv_loop_option;
-
-typedef enum {
- UV_RUN_DEFAULT = 0,
- UV_RUN_ONCE,
- UV_RUN_NOWAIT
-} uv_run_mode;
-
-
-UV_EXTERN unsigned int uv_version(void);
-UV_EXTERN const char* uv_version_string(void);
-
-typedef void* (*uv_malloc_func)(size_t size);
-typedef void* (*uv_realloc_func)(void* ptr, size_t size);
-typedef void* (*uv_calloc_func)(size_t count, size_t size);
-typedef void (*uv_free_func)(void* ptr);
-
-UV_EXTERN int uv_replace_allocator(uv_malloc_func malloc_func,
- uv_realloc_func realloc_func,
- uv_calloc_func calloc_func,
- uv_free_func free_func);
-
-UV_EXTERN uv_loop_t* uv_default_loop(void);
-UV_EXTERN int uv_loop_init(uv_loop_t* loop);
-UV_EXTERN int uv_loop_close(uv_loop_t* loop);
-/*
- * NOTE:
- * This function is DEPRECATED (to be removed after 0.12), users should
- * allocate the loop manually and use uv_loop_init instead.
- */
-UV_EXTERN uv_loop_t* uv_loop_new(void);
-/*
- * NOTE:
- * This function is DEPRECATED (to be removed after 0.12). Users should use
- * uv_loop_close and free the memory manually instead.
- */
-UV_EXTERN void uv_loop_delete(uv_loop_t*);
-UV_EXTERN size_t uv_loop_size(void);
-UV_EXTERN int uv_loop_alive(const uv_loop_t* loop);
-UV_EXTERN int uv_loop_configure(uv_loop_t* loop, uv_loop_option option, ...);
-
-UV_EXTERN int uv_run(uv_loop_t*, uv_run_mode mode);
-UV_EXTERN void uv_stop(uv_loop_t*);
-
-UV_EXTERN void uv_ref(uv_handle_t*);
-UV_EXTERN void uv_unref(uv_handle_t*);
-UV_EXTERN int uv_has_ref(const uv_handle_t*);
-
-UV_EXTERN void uv_update_time(uv_loop_t*);
-UV_EXTERN uint64_t uv_now(const uv_loop_t*);
-
-UV_EXTERN int uv_backend_fd(const uv_loop_t*);
-UV_EXTERN int uv_backend_timeout(const uv_loop_t*);
-
-typedef void (*uv_alloc_cb)(uv_handle_t* handle,
- size_t suggested_size,
- uv_buf_t* buf);
-typedef void (*uv_read_cb)(uv_stream_t* stream,
- ssize_t nread,
- const uv_buf_t* buf);
-typedef void (*uv_write_cb)(uv_write_t* req, int status);
-typedef void (*uv_connect_cb)(uv_connect_t* req, int status);
-typedef void (*uv_shutdown_cb)(uv_shutdown_t* req, int status);
-typedef void (*uv_connection_cb)(uv_stream_t* server, int status);
-typedef void (*uv_close_cb)(uv_handle_t* handle);
-typedef void (*uv_poll_cb)(uv_poll_t* handle, int status, int events);
-typedef void (*uv_timer_cb)(uv_timer_t* handle);
-typedef void (*uv_async_cb)(uv_async_t* handle);
-typedef void (*uv_prepare_cb)(uv_prepare_t* handle);
-typedef void (*uv_check_cb)(uv_check_t* handle);
-typedef void (*uv_idle_cb)(uv_idle_t* handle);
-typedef void (*uv_exit_cb)(uv_process_t*, int64_t exit_status, int term_signal);
-typedef void (*uv_walk_cb)(uv_handle_t* handle, void* arg);
-typedef void (*uv_fs_cb)(uv_fs_t* req);
-typedef void (*uv_work_cb)(uv_work_t* req);
-typedef void (*uv_after_work_cb)(uv_work_t* req, int status);
-typedef void (*uv_getaddrinfo_cb)(uv_getaddrinfo_t* req,
- int status,
- struct addrinfo* res);
-typedef void (*uv_getnameinfo_cb)(uv_getnameinfo_t* req,
- int status,
- const char* hostname,
- const char* service);
-
-typedef struct {
- long tv_sec;
- long tv_nsec;
-} uv_timespec_t;
-
-
-typedef struct {
- uint64_t st_dev;
- uint64_t st_mode;
- uint64_t st_nlink;
- uint64_t st_uid;
- uint64_t st_gid;
- uint64_t st_rdev;
- uint64_t st_ino;
- uint64_t st_size;
- uint64_t st_blksize;
- uint64_t st_blocks;
- uint64_t st_flags;
- uint64_t st_gen;
- uv_timespec_t st_atim;
- uv_timespec_t st_mtim;
- uv_timespec_t st_ctim;
- uv_timespec_t st_birthtim;
-} uv_stat_t;
-
-
-typedef void (*uv_fs_event_cb)(uv_fs_event_t* handle,
- const char* filename,
- int events,
- int status);
-
-typedef void (*uv_fs_poll_cb)(uv_fs_poll_t* handle,
- int status,
- const uv_stat_t* prev,
- const uv_stat_t* curr);
-
-typedef void (*uv_signal_cb)(uv_signal_t* handle, int signum);
-
-
-typedef enum {
- UV_LEAVE_GROUP = 0,
- UV_JOIN_GROUP
-} uv_membership;
-
-
-UV_EXTERN const char* uv_strerror(int err);
-UV_EXTERN const char* uv_err_name(int err);
-
-
-#define UV_REQ_FIELDS \
- /* public */ \
- void* data; \
- /* read-only */ \
- uv_req_type type; \
- /* private */ \
- void* active_queue[2]; \
- void* reserved[4]; \
- UV_REQ_PRIVATE_FIELDS \
-
-/* Abstract base class of all requests. */
-struct uv_req_s {
- UV_REQ_FIELDS
-};
-
-
-/* Platform-specific request types. */
-UV_PRIVATE_REQ_TYPES
-
-
-UV_EXTERN int uv_shutdown(uv_shutdown_t* req,
- uv_stream_t* handle,
- uv_shutdown_cb cb);
-
-struct uv_shutdown_s {
- UV_REQ_FIELDS
- uv_stream_t* handle;
- uv_shutdown_cb cb;
- UV_SHUTDOWN_PRIVATE_FIELDS
-};
-
-
-#define UV_HANDLE_FIELDS \
- /* public */ \
- void* data; \
- /* read-only */ \
- uv_loop_t* loop; \
- uv_handle_type type; \
- /* private */ \
- uv_close_cb close_cb; \
- void* handle_queue[2]; \
- union { \
- int fd; \
- void* reserved[4]; \
- } u; \
- UV_HANDLE_PRIVATE_FIELDS \
-
-/* The abstract base class of all handles. */
-struct uv_handle_s {
- UV_HANDLE_FIELDS
-};
-
-UV_EXTERN size_t uv_handle_size(uv_handle_type type);
-UV_EXTERN size_t uv_req_size(uv_req_type type);
-
-UV_EXTERN int uv_is_active(const uv_handle_t* handle);
-
-UV_EXTERN void uv_walk(uv_loop_t* loop, uv_walk_cb walk_cb, void* arg);
-
-/* Helpers for ad hoc debugging, no API/ABI stability guaranteed. */
-UV_EXTERN void uv_print_all_handles(uv_loop_t* loop, FILE* stream);
-UV_EXTERN void uv_print_active_handles(uv_loop_t* loop, FILE* stream);
-
-UV_EXTERN void uv_close(uv_handle_t* handle, uv_close_cb close_cb);
-
-UV_EXTERN int uv_send_buffer_size(uv_handle_t* handle, int* value);
-UV_EXTERN int uv_recv_buffer_size(uv_handle_t* handle, int* value);
-
-UV_EXTERN int uv_fileno(const uv_handle_t* handle, uv_os_fd_t* fd);
-
-UV_EXTERN uv_buf_t uv_buf_init(char* base, unsigned int len);
-
-
-#define UV_STREAM_FIELDS \
- /* number of bytes queued for writing */ \
- size_t write_queue_size; \
- uv_alloc_cb alloc_cb; \
- uv_read_cb read_cb; \
- /* private */ \
- UV_STREAM_PRIVATE_FIELDS
-
-/*
- * uv_stream_t is a subclass of uv_handle_t.
- *
- * uv_stream is an abstract class.
- *
- * uv_stream_t is the parent class of uv_tcp_t, uv_pipe_t and uv_tty_t.
- */
-struct uv_stream_s {
- UV_HANDLE_FIELDS
- UV_STREAM_FIELDS
-};
-
-UV_EXTERN int uv_listen(uv_stream_t* stream, int backlog, uv_connection_cb cb);
-UV_EXTERN int uv_accept(uv_stream_t* server, uv_stream_t* client);
-
-UV_EXTERN int uv_read_start(uv_stream_t*,
- uv_alloc_cb alloc_cb,
- uv_read_cb read_cb);
-UV_EXTERN int uv_read_stop(uv_stream_t*);
-
-UV_EXTERN int uv_write(uv_write_t* req,
- uv_stream_t* handle,
- const uv_buf_t bufs[],
- unsigned int nbufs,
- uv_write_cb cb);
-UV_EXTERN int uv_write2(uv_write_t* req,
- uv_stream_t* handle,
- const uv_buf_t bufs[],
- unsigned int nbufs,
- uv_stream_t* send_handle,
- uv_write_cb cb);
-UV_EXTERN int uv_try_write(uv_stream_t* handle,
- const uv_buf_t bufs[],
- unsigned int nbufs);
-
-/* uv_write_t is a subclass of uv_req_t. */
-struct uv_write_s {
- UV_REQ_FIELDS
- uv_write_cb cb;
- uv_stream_t* send_handle;
- uv_stream_t* handle;
- UV_WRITE_PRIVATE_FIELDS
-};
-
-
-UV_EXTERN int uv_is_readable(const uv_stream_t* handle);
-UV_EXTERN int uv_is_writable(const uv_stream_t* handle);
-
-UV_EXTERN int uv_stream_set_blocking(uv_stream_t* handle, int blocking);
-
-UV_EXTERN int uv_is_closing(const uv_handle_t* handle);
-
-
-/*
- * uv_tcp_t is a subclass of uv_stream_t.
- *
- * Represents a TCP stream or TCP server.
- */
-struct uv_tcp_s {
- UV_HANDLE_FIELDS
- UV_STREAM_FIELDS
- UV_TCP_PRIVATE_FIELDS
-};
-
-UV_EXTERN int uv_tcp_init(uv_loop_t*, uv_tcp_t* handle);
-UV_EXTERN int uv_tcp_init_ex(uv_loop_t*, uv_tcp_t* handle, unsigned int flags);
-UV_EXTERN int uv_tcp_open(uv_tcp_t* handle, uv_os_sock_t sock);
-UV_EXTERN int uv_tcp_nodelay(uv_tcp_t* handle, int enable);
-UV_EXTERN int uv_tcp_keepalive(uv_tcp_t* handle,
- int enable,
- unsigned int delay);
-UV_EXTERN int uv_tcp_simultaneous_accepts(uv_tcp_t* handle, int enable);
-
-enum uv_tcp_flags {
- /* Used with uv_tcp_bind, when an IPv6 address is used. */
- UV_TCP_IPV6ONLY = 1
-};
-
-UV_EXTERN int uv_tcp_bind(uv_tcp_t* handle,
- const struct sockaddr* addr,
- unsigned int flags);
-UV_EXTERN int uv_tcp_getsockname(const uv_tcp_t* handle,
- struct sockaddr* name,
- int* namelen);
-UV_EXTERN int uv_tcp_getpeername(const uv_tcp_t* handle,
- struct sockaddr* name,
- int* namelen);
-UV_EXTERN int uv_tcp_connect(uv_connect_t* req,
- uv_tcp_t* handle,
- const struct sockaddr* addr,
- uv_connect_cb cb);
-
-/* uv_connect_t is a subclass of uv_req_t. */
-struct uv_connect_s {
- UV_REQ_FIELDS
- uv_connect_cb cb;
- uv_stream_t* handle;
- UV_CONNECT_PRIVATE_FIELDS
-};
-
-
-/*
- * UDP support.
- */
-
-enum uv_udp_flags {
- /* Disables dual stack mode. */
- UV_UDP_IPV6ONLY = 1,
- /*
- * Indicates message was truncated because read buffer was too small. The
- * remainder was discarded by the OS. Used in uv_udp_recv_cb.
- */
- UV_UDP_PARTIAL = 2,
- /*
- * Indicates if SO_REUSEADDR will be set when binding the handle.
- * This sets the SO_REUSEPORT socket flag on the BSDs and OS X. On other
- * Unix platforms, it sets the SO_REUSEADDR flag. What that means is that
- * multiple threads or processes can bind to the same address without error
- * (provided they all set the flag) but only the last one to bind will receive
- * any traffic, in effect "stealing" the port from the previous listener.
- */
- UV_UDP_REUSEADDR = 4
-};
-
-typedef void (*uv_udp_send_cb)(uv_udp_send_t* req, int status);
-typedef void (*uv_udp_recv_cb)(uv_udp_t* handle,
- ssize_t nread,
- const uv_buf_t* buf,
- const struct sockaddr* addr,
- unsigned flags);
-
-/* uv_udp_t is a subclass of uv_handle_t. */
-struct uv_udp_s {
- UV_HANDLE_FIELDS
- /* read-only */
- /*
- * Number of bytes queued for sending. This field strictly shows how much
- * information is currently queued.
- */
- size_t send_queue_size;
- /*
- * Number of send requests currently in the queue awaiting to be processed.
- */
- size_t send_queue_count;
- UV_UDP_PRIVATE_FIELDS
-};
-
-/* uv_udp_send_t is a subclass of uv_req_t. */
-struct uv_udp_send_s {
- UV_REQ_FIELDS
- uv_udp_t* handle;
- uv_udp_send_cb cb;
- UV_UDP_SEND_PRIVATE_FIELDS
-};
-
-UV_EXTERN int uv_udp_init(uv_loop_t*, uv_udp_t* handle);
-UV_EXTERN int uv_udp_init_ex(uv_loop_t*, uv_udp_t* handle, unsigned int flags);
-UV_EXTERN int uv_udp_open(uv_udp_t* handle, uv_os_sock_t sock);
-UV_EXTERN int uv_udp_bind(uv_udp_t* handle,
- const struct sockaddr* addr,
- unsigned int flags);
-
-UV_EXTERN int uv_udp_getsockname(const uv_udp_t* handle,
- struct sockaddr* name,
- int* namelen);
-UV_EXTERN int uv_udp_set_membership(uv_udp_t* handle,
- const char* multicast_addr,
- const char* interface_addr,
- uv_membership membership);
-UV_EXTERN int uv_udp_set_multicast_loop(uv_udp_t* handle, int on);
-UV_EXTERN int uv_udp_set_multicast_ttl(uv_udp_t* handle, int ttl);
-UV_EXTERN int uv_udp_set_multicast_interface(uv_udp_t* handle,
- const char* interface_addr);
-UV_EXTERN int uv_udp_set_broadcast(uv_udp_t* handle, int on);
-UV_EXTERN int uv_udp_set_ttl(uv_udp_t* handle, int ttl);
-UV_EXTERN int uv_udp_send(uv_udp_send_t* req,
- uv_udp_t* handle,
- const uv_buf_t bufs[],
- unsigned int nbufs,
- const struct sockaddr* addr,
- uv_udp_send_cb send_cb);
-UV_EXTERN int uv_udp_try_send(uv_udp_t* handle,
- const uv_buf_t bufs[],
- unsigned int nbufs,
- const struct sockaddr* addr);
-UV_EXTERN int uv_udp_recv_start(uv_udp_t* handle,
- uv_alloc_cb alloc_cb,
- uv_udp_recv_cb recv_cb);
-UV_EXTERN int uv_udp_recv_stop(uv_udp_t* handle);
-
-
-/*
- * uv_tty_t is a subclass of uv_stream_t.
- *
- * Representing a stream for the console.
- */
-struct uv_tty_s {
- UV_HANDLE_FIELDS
- UV_STREAM_FIELDS
- UV_TTY_PRIVATE_FIELDS
-};
-
-typedef enum {
- /* Initial/normal terminal mode */
- UV_TTY_MODE_NORMAL,
- /* Raw input mode (On Windows, ENABLE_WINDOW_INPUT is also enabled) */
- UV_TTY_MODE_RAW,
- /* Binary-safe I/O mode for IPC (Unix-only) */
- UV_TTY_MODE_IO
-} uv_tty_mode_t;
-
-UV_EXTERN int uv_tty_init(uv_loop_t*, uv_tty_t*, uv_file fd, int readable);
-UV_EXTERN int uv_tty_set_mode(uv_tty_t*, uv_tty_mode_t mode);
-UV_EXTERN int uv_tty_reset_mode(void);
-UV_EXTERN int uv_tty_get_winsize(uv_tty_t*, int* width, int* height);
-
-#ifdef __cplusplus
-extern "C++" {
-
-inline int uv_tty_set_mode(uv_tty_t* handle, int mode) {
- return uv_tty_set_mode(handle, static_cast<uv_tty_mode_t>(mode));
-}
-
-}
-#endif
-
-UV_EXTERN uv_handle_type uv_guess_handle(uv_file file);
-
-/*
- * uv_pipe_t is a subclass of uv_stream_t.
- *
- * Representing a pipe stream or pipe server. On Windows this is a Named
- * Pipe. On Unix this is a Unix domain socket.
- */
-struct uv_pipe_s {
- UV_HANDLE_FIELDS
- UV_STREAM_FIELDS
- int ipc; /* non-zero if this pipe is used for passing handles */
- UV_PIPE_PRIVATE_FIELDS
-};
-
-UV_EXTERN int uv_pipe_init(uv_loop_t*, uv_pipe_t* handle, int ipc);
-UV_EXTERN int uv_pipe_open(uv_pipe_t*, uv_file file);
-UV_EXTERN int uv_pipe_bind(uv_pipe_t* handle, const char* name);
-UV_EXTERN void uv_pipe_connect(uv_connect_t* req,
- uv_pipe_t* handle,
- const char* name,
- uv_connect_cb cb);
-UV_EXTERN int uv_pipe_getsockname(const uv_pipe_t* handle,
- char* buffer,
- size_t* size);
-UV_EXTERN int uv_pipe_getpeername(const uv_pipe_t* handle,
- char* buffer,
- size_t* size);
-UV_EXTERN void uv_pipe_pending_instances(uv_pipe_t* handle, int count);
-UV_EXTERN int uv_pipe_pending_count(uv_pipe_t* handle);
-UV_EXTERN uv_handle_type uv_pipe_pending_type(uv_pipe_t* handle);
-
-
-struct uv_poll_s {
- UV_HANDLE_FIELDS
- uv_poll_cb poll_cb;
- UV_POLL_PRIVATE_FIELDS
-};
-
-enum uv_poll_event {
- UV_READABLE = 1,
- UV_WRITABLE = 2
-};
-
-UV_EXTERN int uv_poll_init(uv_loop_t* loop, uv_poll_t* handle, int fd);
-UV_EXTERN int uv_poll_init_socket(uv_loop_t* loop,
- uv_poll_t* handle,
- uv_os_sock_t socket);
-UV_EXTERN int uv_poll_start(uv_poll_t* handle, int events, uv_poll_cb cb);
-UV_EXTERN int uv_poll_stop(uv_poll_t* handle);
-
-
-struct uv_prepare_s {
- UV_HANDLE_FIELDS
- UV_PREPARE_PRIVATE_FIELDS
-};
-
-UV_EXTERN int uv_prepare_init(uv_loop_t*, uv_prepare_t* prepare);
-UV_EXTERN int uv_prepare_start(uv_prepare_t* prepare, uv_prepare_cb cb);
-UV_EXTERN int uv_prepare_stop(uv_prepare_t* prepare);
-
-
-struct uv_check_s {
- UV_HANDLE_FIELDS
- UV_CHECK_PRIVATE_FIELDS
-};
-
-UV_EXTERN int uv_check_init(uv_loop_t*, uv_check_t* check);
-UV_EXTERN int uv_check_start(uv_check_t* check, uv_check_cb cb);
-UV_EXTERN int uv_check_stop(uv_check_t* check);
-
-
-struct uv_idle_s {
- UV_HANDLE_FIELDS
- UV_IDLE_PRIVATE_FIELDS
-};
-
-UV_EXTERN int uv_idle_init(uv_loop_t*, uv_idle_t* idle);
-UV_EXTERN int uv_idle_start(uv_idle_t* idle, uv_idle_cb cb);
-UV_EXTERN int uv_idle_stop(uv_idle_t* idle);
-
-
-struct uv_async_s {
- UV_HANDLE_FIELDS
- UV_ASYNC_PRIVATE_FIELDS
-};
-
-UV_EXTERN int uv_async_init(uv_loop_t*,
- uv_async_t* async,
- uv_async_cb async_cb);
-UV_EXTERN int uv_async_send(uv_async_t* async);
-
-
-/*
- * uv_timer_t is a subclass of uv_handle_t.
- *
- * Used to get woken up at a specified time in the future.
- */
-struct uv_timer_s {
- UV_HANDLE_FIELDS
- UV_TIMER_PRIVATE_FIELDS
-};
-
-UV_EXTERN int uv_timer_init(uv_loop_t*, uv_timer_t* handle);
-UV_EXTERN int uv_timer_start(uv_timer_t* handle,
- uv_timer_cb cb,
- uint64_t timeout,
- uint64_t repeat);
-UV_EXTERN int uv_timer_stop(uv_timer_t* handle);
-UV_EXTERN int uv_timer_again(uv_timer_t* handle);
-UV_EXTERN void uv_timer_set_repeat(uv_timer_t* handle, uint64_t repeat);
-UV_EXTERN uint64_t uv_timer_get_repeat(const uv_timer_t* handle);
-
-
-/*
- * uv_getaddrinfo_t is a subclass of uv_req_t.
- *
- * Request object for uv_getaddrinfo.
- */
-struct uv_getaddrinfo_s {
- UV_REQ_FIELDS
- /* read-only */
- uv_loop_t* loop;
- /* struct addrinfo* addrinfo is marked as private, but it really isn't. */
- UV_GETADDRINFO_PRIVATE_FIELDS
-};
-
-
-UV_EXTERN int uv_getaddrinfo(uv_loop_t* loop,
- uv_getaddrinfo_t* req,
- uv_getaddrinfo_cb getaddrinfo_cb,
- const char* node,
- const char* service,
- const struct addrinfo* hints);
-UV_EXTERN void uv_freeaddrinfo(struct addrinfo* ai);
-
-
-/*
-* uv_getnameinfo_t is a subclass of uv_req_t.
-*
-* Request object for uv_getnameinfo.
-*/
-struct uv_getnameinfo_s {
- UV_REQ_FIELDS
- /* read-only */
- uv_loop_t* loop;
- /* host and service are marked as private, but they really aren't. */
- UV_GETNAMEINFO_PRIVATE_FIELDS
-};
-
-UV_EXTERN int uv_getnameinfo(uv_loop_t* loop,
- uv_getnameinfo_t* req,
- uv_getnameinfo_cb getnameinfo_cb,
- const struct sockaddr* addr,
- int flags);
-
-
-/* uv_spawn() options. */
-typedef enum {
- UV_IGNORE = 0x00,
- UV_CREATE_PIPE = 0x01,
- UV_INHERIT_FD = 0x02,
- UV_INHERIT_STREAM = 0x04,
-
- /*
- * When UV_CREATE_PIPE is specified, UV_READABLE_PIPE and UV_WRITABLE_PIPE
- * determine the direction of flow, from the child process' perspective. Both
- * flags may be specified to create a duplex data stream.
- */
- UV_READABLE_PIPE = 0x10,
- UV_WRITABLE_PIPE = 0x20
-} uv_stdio_flags;
-
-typedef struct uv_stdio_container_s {
- uv_stdio_flags flags;
-
- union {
- uv_stream_t* stream;
- int fd;
- } data;
-} uv_stdio_container_t;
-
-typedef struct uv_process_options_s {
- uv_exit_cb exit_cb; /* Called after the process exits. */
- const char* file; /* Path to program to execute. */
- /*
- * Command line arguments. args[0] 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 the note at
- * windows_verbatim_arguments.
- */
- char** args;
- /*
- * This will be set as the environ variable in the subprocess. If this is
- * NULL then the parents environ will be used.
- */
- char** env;
- /*
- * If non-null this represents a directory the subprocess should execute
- * in. Stands for current working directory.
- */
- const char* cwd;
- /*
- * Various flags that control how uv_spawn() behaves. See the definition of
- * `enum uv_process_flags` below.
- */
- unsigned int flags;
- /*
- * The `stdio` field points to an array of uv_stdio_container_t structs that
- * describe the file descriptors that will be made available to the child
- * process. The convention is that stdio[0] points to stdin, fd 1 is used for
- * stdout, and fd 2 is stderr.
- *
- * Note that on windows file descriptors greater than 2 are available to the
- * child process only if the child processes uses the MSVCRT runtime.
- */
- int stdio_count;
- uv_stdio_container_t* stdio;
- /*
- * Libuv can change the child process' user/group id. This happens only when
- * the appropriate bits are set in the flags fields. This is not supported on
- * windows; uv_spawn() will fail and set the error to UV_ENOTSUP.
- */
- uv_uid_t uid;
- uv_gid_t gid;
-} uv_process_options_t;
-
-/*
- * These are the flags that can be used for the uv_process_options.flags field.
- */
-enum uv_process_flags {
- /*
- * Set the child process' user id. The user id is supplied in the `uid` field
- * of the options struct. This does not work on windows; setting this flag
- * will cause uv_spawn() to fail.
- */
- UV_PROCESS_SETUID = (1 << 0),
- /*
- * Set the child process' group id. The user id is supplied in the `gid`
- * field of the options struct. This does not work on windows; setting this
- * flag will cause uv_spawn() to fail.
- */
- UV_PROCESS_SETGID = (1 << 1),
- /*
- * 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.
- */
- UV_PROCESS_WINDOWS_VERBATIM_ARGUMENTS = (1 << 2),
- /*
- * 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.
- */
- UV_PROCESS_DETACHED = (1 << 3),
- /*
- * Hide the subprocess console window that would normally be created. This
- * option is only meaningful on Windows systems. On Unix it is silently
- * ignored.
- */
- UV_PROCESS_WINDOWS_HIDE = (1 << 4)
-};
-
-/*
- * uv_process_t is a subclass of uv_handle_t.
- */
-struct uv_process_s {
- UV_HANDLE_FIELDS
- uv_exit_cb exit_cb;
- int pid;
- UV_PROCESS_PRIVATE_FIELDS
-};
-
-UV_EXTERN int uv_spawn(uv_loop_t* loop,
- uv_process_t* handle,
- const uv_process_options_t* options);
-UV_EXTERN int uv_process_kill(uv_process_t*, int signum);
-UV_EXTERN int uv_kill(int pid, int signum);
-
-
-/*
- * uv_work_t is a subclass of uv_req_t.
- */
-struct uv_work_s {
- UV_REQ_FIELDS
- uv_loop_t* loop;
- uv_work_cb work_cb;
- uv_after_work_cb after_work_cb;
- UV_WORK_PRIVATE_FIELDS
-};
-
-UV_EXTERN int uv_queue_work(uv_loop_t* loop,
- uv_work_t* req,
- uv_work_cb work_cb,
- uv_after_work_cb after_work_cb);
-
-UV_EXTERN int uv_cancel(uv_req_t* req);
-
-
-struct uv_cpu_info_s {
- char* model;
- int speed;
- struct uv_cpu_times_s {
- uint64_t user;
- uint64_t nice;
- uint64_t sys;
- uint64_t idle;
- uint64_t irq;
- } cpu_times;
-};
-
-struct uv_interface_address_s {
- char* name;
- char phys_addr[6];
- int is_internal;
- union {
- struct sockaddr_in address4;
- struct sockaddr_in6 address6;
- } address;
- union {
- struct sockaddr_in netmask4;
- struct sockaddr_in6 netmask6;
- } netmask;
-};
-
-typedef enum {
- UV_DIRENT_UNKNOWN,
- UV_DIRENT_FILE,
- UV_DIRENT_DIR,
- UV_DIRENT_LINK,
- UV_DIRENT_FIFO,
- UV_DIRENT_SOCKET,
- UV_DIRENT_CHAR,
- UV_DIRENT_BLOCK
-} uv_dirent_type_t;
-
-struct uv_dirent_s {
- const char* name;
- uv_dirent_type_t type;
-};
-
-UV_EXTERN char** uv_setup_args(int argc, char** argv);
-UV_EXTERN int uv_get_process_title(char* buffer, size_t size);
-UV_EXTERN int uv_set_process_title(const char* title);
-UV_EXTERN int uv_resident_set_memory(size_t* rss);
-UV_EXTERN int uv_uptime(double* uptime);
-
-typedef struct {
- long tv_sec;
- long tv_usec;
-} uv_timeval_t;
-
-typedef struct {
- uv_timeval_t ru_utime; /* user CPU time used */
- uv_timeval_t ru_stime; /* system CPU time used */
- uint64_t ru_maxrss; /* maximum resident set size */
- uint64_t ru_ixrss; /* integral shared memory size */
- uint64_t ru_idrss; /* integral unshared data size */
- uint64_t ru_isrss; /* integral unshared stack size */
- uint64_t ru_minflt; /* page reclaims (soft page faults) */
- uint64_t ru_majflt; /* page faults (hard page faults) */
- uint64_t ru_nswap; /* swaps */
- uint64_t ru_inblock; /* block input operations */
- uint64_t ru_oublock; /* block output operations */
- uint64_t ru_msgsnd; /* IPC messages sent */
- uint64_t ru_msgrcv; /* IPC messages received */
- uint64_t ru_nsignals; /* signals received */
- uint64_t ru_nvcsw; /* voluntary context switches */
- uint64_t ru_nivcsw; /* involuntary context switches */
-} uv_rusage_t;
-
-UV_EXTERN int uv_getrusage(uv_rusage_t* rusage);
-
-UV_EXTERN int uv_os_homedir(char* buffer, size_t* size);
-
-UV_EXTERN int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count);
-UV_EXTERN void uv_free_cpu_info(uv_cpu_info_t* cpu_infos, int count);
-
-UV_EXTERN int uv_interface_addresses(uv_interface_address_t** addresses,
- int* count);
-UV_EXTERN void uv_free_interface_addresses(uv_interface_address_t* addresses,
- int count);
-
-
-typedef enum {
- UV_FS_UNKNOWN = -1,
- UV_FS_CUSTOM,
- UV_FS_OPEN,
- UV_FS_CLOSE,
- UV_FS_READ,
- UV_FS_WRITE,
- UV_FS_SENDFILE,
- UV_FS_STAT,
- UV_FS_LSTAT,
- UV_FS_FSTAT,
- UV_FS_FTRUNCATE,
- UV_FS_UTIME,
- UV_FS_FUTIME,
- UV_FS_ACCESS,
- UV_FS_CHMOD,
- UV_FS_FCHMOD,
- UV_FS_FSYNC,
- UV_FS_FDATASYNC,
- UV_FS_UNLINK,
- UV_FS_RMDIR,
- UV_FS_MKDIR,
- UV_FS_MKDTEMP,
- UV_FS_RENAME,
- UV_FS_SCANDIR,
- UV_FS_LINK,
- UV_FS_SYMLINK,
- UV_FS_READLINK,
- UV_FS_CHOWN,
- UV_FS_FCHOWN,
- UV_FS_REALPATH
-} uv_fs_type;
-
-/* uv_fs_t is a subclass of uv_req_t. */
-struct uv_fs_s {
- UV_REQ_FIELDS
- uv_fs_type fs_type;
- uv_loop_t* loop;
- uv_fs_cb cb;
- ssize_t result;
- void* ptr;
- const char* path;
- uv_stat_t statbuf; /* Stores the result of uv_fs_stat() and uv_fs_fstat(). */
- UV_FS_PRIVATE_FIELDS
-};
-
-UV_EXTERN void uv_fs_req_cleanup(uv_fs_t* req);
-UV_EXTERN int uv_fs_close(uv_loop_t* loop,
- uv_fs_t* req,
- uv_file file,
- uv_fs_cb cb);
-UV_EXTERN int uv_fs_open(uv_loop_t* loop,
- uv_fs_t* req,
- const char* path,
- int flags,
- int mode,
- uv_fs_cb cb);
-UV_EXTERN int uv_fs_read(uv_loop_t* loop,
- uv_fs_t* req,
- uv_file file,
- const uv_buf_t bufs[],
- unsigned int nbufs,
- int64_t offset,
- uv_fs_cb cb);
-UV_EXTERN int uv_fs_unlink(uv_loop_t* loop,
- uv_fs_t* req,
- const char* path,
- uv_fs_cb cb);
-UV_EXTERN int uv_fs_write(uv_loop_t* loop,
- uv_fs_t* req,
- uv_file file,
- const uv_buf_t bufs[],
- unsigned int nbufs,
- int64_t offset,
- uv_fs_cb cb);
-UV_EXTERN int uv_fs_mkdir(uv_loop_t* loop,
- uv_fs_t* req,
- const char* path,
- int mode,
- uv_fs_cb cb);
-UV_EXTERN int uv_fs_mkdtemp(uv_loop_t* loop,
- uv_fs_t* req,
- const char* tpl,
- uv_fs_cb cb);
-UV_EXTERN int uv_fs_rmdir(uv_loop_t* loop,
- uv_fs_t* req,
- const char* path,
- uv_fs_cb cb);
-UV_EXTERN int uv_fs_scandir(uv_loop_t* loop,
- uv_fs_t* req,
- const char* path,
- int flags,
- uv_fs_cb cb);
-UV_EXTERN int uv_fs_scandir_next(uv_fs_t* req,
- uv_dirent_t* ent);
-UV_EXTERN int uv_fs_stat(uv_loop_t* loop,
- uv_fs_t* req,
- const char* path,
- uv_fs_cb cb);
-UV_EXTERN int uv_fs_fstat(uv_loop_t* loop,
- uv_fs_t* req,
- uv_file file,
- uv_fs_cb cb);
-UV_EXTERN int uv_fs_rename(uv_loop_t* loop,
- uv_fs_t* req,
- const char* path,
- const char* new_path,
- uv_fs_cb cb);
-UV_EXTERN int uv_fs_fsync(uv_loop_t* loop,
- uv_fs_t* req,
- uv_file file,
- uv_fs_cb cb);
-UV_EXTERN int uv_fs_fdatasync(uv_loop_t* loop,
- uv_fs_t* req,
- uv_file file,
- uv_fs_cb cb);
-UV_EXTERN int uv_fs_ftruncate(uv_loop_t* loop,
- uv_fs_t* req,
- uv_file file,
- int64_t offset,
- uv_fs_cb cb);
-UV_EXTERN int uv_fs_sendfile(uv_loop_t* loop,
- uv_fs_t* req,
- uv_file out_fd,
- uv_file in_fd,
- int64_t in_offset,
- size_t length,
- uv_fs_cb cb);
-UV_EXTERN int uv_fs_access(uv_loop_t* loop,
- uv_fs_t* req,
- const char* path,
- int mode,
- uv_fs_cb cb);
-UV_EXTERN int uv_fs_chmod(uv_loop_t* loop,
- uv_fs_t* req,
- const char* path,
- int mode,
- uv_fs_cb cb);
-UV_EXTERN int uv_fs_utime(uv_loop_t* loop,
- uv_fs_t* req,
- const char* path,
- double atime,
- double mtime,
- uv_fs_cb cb);
-UV_EXTERN int uv_fs_futime(uv_loop_t* loop,
- uv_fs_t* req,
- uv_file file,
- double atime,
- double mtime,
- uv_fs_cb cb);
-UV_EXTERN int uv_fs_lstat(uv_loop_t* loop,
- uv_fs_t* req,
- const char* path,
- uv_fs_cb cb);
-UV_EXTERN int uv_fs_link(uv_loop_t* loop,
- uv_fs_t* req,
- const char* path,
- const char* new_path,
- uv_fs_cb cb);
-
-/*
- * This flag can be used with uv_fs_symlink() on Windows to specify whether
- * path argument points to a directory.
- */
-#define UV_FS_SYMLINK_DIR 0x0001
-
-/*
- * This flag can be used with uv_fs_symlink() on Windows to specify whether
- * the symlink is to be created using junction points.
- */
-#define UV_FS_SYMLINK_JUNCTION 0x0002
-
-UV_EXTERN int uv_fs_symlink(uv_loop_t* loop,
- uv_fs_t* req,
- const char* path,
- const char* new_path,
- int flags,
- uv_fs_cb cb);
-UV_EXTERN int uv_fs_readlink(uv_loop_t* loop,
- uv_fs_t* req,
- const char* path,
- uv_fs_cb cb);
-UV_EXTERN int uv_fs_realpath(uv_loop_t* loop,
- uv_fs_t* req,
- const char* path,
- uv_fs_cb cb);
-UV_EXTERN int uv_fs_fchmod(uv_loop_t* loop,
- uv_fs_t* req,
- uv_file file,
- int mode,
- uv_fs_cb cb);
-UV_EXTERN int uv_fs_chown(uv_loop_t* loop,
- uv_fs_t* req,
- const char* path,
- uv_uid_t uid,
- uv_gid_t gid,
- uv_fs_cb cb);
-UV_EXTERN int uv_fs_fchown(uv_loop_t* loop,
- uv_fs_t* req,
- uv_file file,
- uv_uid_t uid,
- uv_gid_t gid,
- uv_fs_cb cb);
-
-
-enum uv_fs_event {
- UV_RENAME = 1,
- UV_CHANGE = 2
-};
-
-
-struct uv_fs_event_s {
- UV_HANDLE_FIELDS
- /* private */
- char* path;
- UV_FS_EVENT_PRIVATE_FIELDS
-};
-
-
-/*
- * uv_fs_stat() based polling file watcher.
- */
-struct uv_fs_poll_s {
- UV_HANDLE_FIELDS
- /* Private, don't touch. */
- void* poll_ctx;
-};
-
-UV_EXTERN int uv_fs_poll_init(uv_loop_t* loop, uv_fs_poll_t* handle);
-UV_EXTERN int uv_fs_poll_start(uv_fs_poll_t* handle,
- uv_fs_poll_cb poll_cb,
- const char* path,
- unsigned int interval);
-UV_EXTERN int uv_fs_poll_stop(uv_fs_poll_t* handle);
-UV_EXTERN int uv_fs_poll_getpath(uv_fs_poll_t* handle,
- char* buffer,
- size_t* size);
-
-
-struct uv_signal_s {
- UV_HANDLE_FIELDS
- uv_signal_cb signal_cb;
- int signum;
- UV_SIGNAL_PRIVATE_FIELDS
-};
-
-UV_EXTERN int uv_signal_init(uv_loop_t* loop, uv_signal_t* handle);
-UV_EXTERN int uv_signal_start(uv_signal_t* handle,
- uv_signal_cb signal_cb,
- int signum);
-UV_EXTERN int uv_signal_stop(uv_signal_t* handle);
-
-UV_EXTERN void uv_loadavg(double avg[3]);
-
-
-/*
- * Flags to be passed to uv_fs_event_start().
- */
-enum uv_fs_event_flags {
- /*
- * By default, if the fs event watcher is given a directory name, we will
- * watch for all events in that directory. This flags overrides this behavior
- * and makes fs_event report only changes to the directory entry itself. This
- * flag does not affect individual files watched.
- * This flag is currently not implemented yet on any backend.
- */
- UV_FS_EVENT_WATCH_ENTRY = 1,
-
- /*
- * By default uv_fs_event will try to use a kernel interface such as inotify
- * or kqueue to detect events. This may not work on remote filesystems such
- * as NFS mounts. This flag makes fs_event fall back to calling stat() on a
- * regular interval.
- * This flag is currently not implemented yet on any backend.
- */
- UV_FS_EVENT_STAT = 2,
-
- /*
- * By default, event watcher, when watching directory, is not registering
- * (is ignoring) changes in it's subdirectories.
- * This flag will override this behaviour on platforms that support it.
- */
- UV_FS_EVENT_RECURSIVE = 4
-};
-
-
-UV_EXTERN int uv_fs_event_init(uv_loop_t* loop, uv_fs_event_t* handle);
-UV_EXTERN int uv_fs_event_start(uv_fs_event_t* handle,
- uv_fs_event_cb cb,
- const char* path,
- unsigned int flags);
-UV_EXTERN int uv_fs_event_stop(uv_fs_event_t* handle);
-UV_EXTERN int uv_fs_event_getpath(uv_fs_event_t* handle,
- char* buffer,
- size_t* size);
-
-UV_EXTERN int uv_ip4_addr(const char* ip, int port, struct sockaddr_in* addr);
-UV_EXTERN int uv_ip6_addr(const char* ip, int port, struct sockaddr_in6* addr);
-
-UV_EXTERN int uv_ip4_name(const struct sockaddr_in* src, char* dst, size_t size);
-UV_EXTERN int uv_ip6_name(const struct sockaddr_in6* src, char* dst, size_t size);
-
-UV_EXTERN int uv_inet_ntop(int af, const void* src, char* dst, size_t size);
-UV_EXTERN int uv_inet_pton(int af, const char* src, void* dst);
-
-UV_EXTERN int uv_exepath(char* buffer, size_t* size);
-
-UV_EXTERN int uv_cwd(char* buffer, size_t* size);
-
-UV_EXTERN int uv_chdir(const char* dir);
-
-UV_EXTERN uint64_t uv_get_free_memory(void);
-UV_EXTERN uint64_t uv_get_total_memory(void);
-
-UV_EXTERN uint64_t uv_hrtime(void);
-
-UV_EXTERN void uv_disable_stdio_inheritance(void);
-
-UV_EXTERN int uv_dlopen(const char* filename, uv_lib_t* lib);
-UV_EXTERN void uv_dlclose(uv_lib_t* lib);
-UV_EXTERN int uv_dlsym(uv_lib_t* lib, const char* name, void** ptr);
-UV_EXTERN const char* uv_dlerror(const uv_lib_t* lib);
-
-UV_EXTERN int uv_mutex_init(uv_mutex_t* handle);
-UV_EXTERN void uv_mutex_destroy(uv_mutex_t* handle);
-UV_EXTERN void uv_mutex_lock(uv_mutex_t* handle);
-UV_EXTERN int uv_mutex_trylock(uv_mutex_t* handle);
-UV_EXTERN void uv_mutex_unlock(uv_mutex_t* handle);
-
-UV_EXTERN int uv_rwlock_init(uv_rwlock_t* rwlock);
-UV_EXTERN void uv_rwlock_destroy(uv_rwlock_t* rwlock);
-UV_EXTERN void uv_rwlock_rdlock(uv_rwlock_t* rwlock);
-UV_EXTERN int uv_rwlock_tryrdlock(uv_rwlock_t* rwlock);
-UV_EXTERN void uv_rwlock_rdunlock(uv_rwlock_t* rwlock);
-UV_EXTERN void uv_rwlock_wrlock(uv_rwlock_t* rwlock);
-UV_EXTERN int uv_rwlock_trywrlock(uv_rwlock_t* rwlock);
-UV_EXTERN void uv_rwlock_wrunlock(uv_rwlock_t* rwlock);
-
-UV_EXTERN int uv_sem_init(uv_sem_t* sem, unsigned int value);
-UV_EXTERN void uv_sem_destroy(uv_sem_t* sem);
-UV_EXTERN void uv_sem_post(uv_sem_t* sem);
-UV_EXTERN void uv_sem_wait(uv_sem_t* sem);
-UV_EXTERN int uv_sem_trywait(uv_sem_t* sem);
-
-UV_EXTERN int uv_cond_init(uv_cond_t* cond);
-UV_EXTERN void uv_cond_destroy(uv_cond_t* cond);
-UV_EXTERN void uv_cond_signal(uv_cond_t* cond);
-UV_EXTERN void uv_cond_broadcast(uv_cond_t* cond);
-
-UV_EXTERN int uv_barrier_init(uv_barrier_t* barrier, unsigned int count);
-UV_EXTERN void uv_barrier_destroy(uv_barrier_t* barrier);
-UV_EXTERN int uv_barrier_wait(uv_barrier_t* barrier);
-
-UV_EXTERN void uv_cond_wait(uv_cond_t* cond, uv_mutex_t* mutex);
-UV_EXTERN int uv_cond_timedwait(uv_cond_t* cond,
- uv_mutex_t* mutex,
- uint64_t timeout);
-
-UV_EXTERN void uv_once(uv_once_t* guard, void (*callback)(void));
-
-UV_EXTERN int uv_key_create(uv_key_t* key);
-UV_EXTERN void uv_key_delete(uv_key_t* key);
-UV_EXTERN void* uv_key_get(uv_key_t* key);
-UV_EXTERN void uv_key_set(uv_key_t* key, void* value);
-
-typedef void (*uv_thread_cb)(void* arg);
-
-UV_EXTERN int uv_thread_create(uv_thread_t* tid, uv_thread_cb entry, void* arg);
-UV_EXTERN uv_thread_t uv_thread_self(void);
-UV_EXTERN int uv_thread_join(uv_thread_t *tid);
-UV_EXTERN int uv_thread_equal(const uv_thread_t* t1, const uv_thread_t* t2);
-
-/* The presence of these unions force similar struct layout. */
-#define XX(_, name) uv_ ## name ## _t name;
-union uv_any_handle {
- UV_HANDLE_TYPE_MAP(XX)
-};
-
-union uv_any_req {
- UV_REQ_TYPE_MAP(XX)
-};
-#undef XX
-
-
-struct uv_loop_s {
- /* User data - use this for whatever. */
- void* data;
- /* Loop reference counting. */
- unsigned int active_handles;
- void* handle_queue[2];
- void* active_reqs[2];
- /* Internal flag to signal loop stop. */
- unsigned int stop_flag;
- UV_LOOP_PRIVATE_FIELDS
-};
-
-
-/* Don't export the private CPP symbols. */
-#undef UV_HANDLE_TYPE_PRIVATE
-#undef UV_REQ_TYPE_PRIVATE
-#undef UV_REQ_PRIVATE_FIELDS
-#undef UV_STREAM_PRIVATE_FIELDS
-#undef UV_TCP_PRIVATE_FIELDS
-#undef UV_PREPARE_PRIVATE_FIELDS
-#undef UV_CHECK_PRIVATE_FIELDS
-#undef UV_IDLE_PRIVATE_FIELDS
-#undef UV_ASYNC_PRIVATE_FIELDS
-#undef UV_TIMER_PRIVATE_FIELDS
-#undef UV_GETADDRINFO_PRIVATE_FIELDS
-#undef UV_GETNAMEINFO_PRIVATE_FIELDS
-#undef UV_FS_REQ_PRIVATE_FIELDS
-#undef UV_WORK_PRIVATE_FIELDS
-#undef UV_FS_EVENT_PRIVATE_FIELDS
-#undef UV_SIGNAL_PRIVATE_FIELDS
-#undef UV_LOOP_PRIVATE_FIELDS
-#undef UV_LOOP_PRIVATE_PLATFORM_FIELDS
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* UV_H */
diff --git a/3rdparty/libuv/libuv.nsi b/3rdparty/libuv/libuv.nsi
deleted file mode 100644
index 159756e196c..00000000000
--- a/3rdparty/libuv/libuv.nsi
+++ /dev/null
@@ -1,86 +0,0 @@
-; NSIS installer script for libuv
-
-!include "MUI2.nsh"
-
-Name "libuv"
-OutFile "libuv-${ARCH}-${VERSION}.exe"
-
-!include "x64.nsh"
-# Default install location, for 32-bit files
-InstallDir "$PROGRAMFILES\libuv"
-
-# Override install and registry locations if this is a 64-bit install.
-function .onInit
- ${If} ${ARCH} == "x64"
- SetRegView 64
- StrCpy $INSTDIR "$PROGRAMFILES64\libuv"
- ${EndIf}
-functionEnd
-
-;--------------------------------
-; Installer pages
-!insertmacro MUI_PAGE_WELCOME
-!insertmacro MUI_PAGE_DIRECTORY
-!insertmacro MUI_PAGE_INSTFILES
-!insertmacro MUI_PAGE_FINISH
-
-
-;--------------------------------
-; Uninstaller pages
-!insertmacro MUI_UNPAGE_WELCOME
-!insertmacro MUI_UNPAGE_CONFIRM
-!insertmacro MUI_UNPAGE_INSTFILES
-!insertmacro MUI_UNPAGE_FINISH
-
-;--------------------------------
-; Languages
-!insertmacro MUI_LANGUAGE "English"
-
-;--------------------------------
-; Installer sections
-
-Section "Files" SecInstall
- SectionIn RO
- SetOutPath "$INSTDIR"
- File "Release\*.dll"
- File "Release\*.lib"
- File "LICENSE"
- File "README.md"
-
- SetOutPath "$INSTDIR\include"
- File "include\uv.h"
- File "include\uv-errno.h"
- File "include\uv-threadpool.h"
- File "include\uv-version.h"
- File "include\uv-win.h"
- File "include\tree.h"
-
- WriteUninstaller "$INSTDIR\Uninstall.exe"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libuv-${ARCH}-${VERSION}" "DisplayName" "libuv-${ARCH}-${VERSION}"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libuv-${ARCH}-${VERSION}" "UninstallString" "$\"$INSTDIR\Uninstall.exe$\""
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libuv-${ARCH}-${VERSION}" "QuietUninstallString" "$\"$INSTDIR\Uninstall.exe$\" /S"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libuv-${ARCH}-${VERSION}" "HelpLink" "http://libuv.org/"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libuv-${ARCH}-${VERSION}" "URLInfoAbout" "http://libuv.org/"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libuv-${ARCH}-${VERSION}" "DisplayVersion" "${VERSION}"
- WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libuv-${ARCH}-${VERSION}" "NoModify" "1"
- WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libuv-${ARCH}-${VERSION}" "NoRepair" "1"
-SectionEnd
-
-Section "Uninstall"
- Delete "$INSTDIR\libuv.dll"
- Delete "$INSTDIR\libuv.lib"
- Delete "$INSTDIR\LICENSE"
- Delete "$INSTDIR\README.md"
-
- Delete "$INSTDIR\include\uv.h"
- Delete "$INSTDIR\include\uv-errno.h"
- Delete "$INSTDIR\include\uv-threadpool.h"
- Delete "$INSTDIR\include\uv-version.h"
- Delete "$INSTDIR\include\uv-win.h"
- Delete "$INSTDIR\include\tree.h"
-
- Delete "$INSTDIR\Uninstall.exe"
- RMDir "$INSTDIR"
- DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libuv-${ARCH}-${VERSION}"
-SectionEnd
-
diff --git a/3rdparty/libuv/libuv.pc.in b/3rdparty/libuv/libuv.pc.in
deleted file mode 100644
index 2933ec22526..00000000000
--- a/3rdparty/libuv/libuv.pc.in
+++ /dev/null
@@ -1,11 +0,0 @@
-prefix=@prefix@
-exec_prefix=@prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: @PACKAGE_NAME@
-Version: @PACKAGE_VERSION@
-Description: multi-platform support library with a focus on asynchronous I/O.
-
-Libs: -L${libdir} -luv @LIBS@
-Cflags: -I${includedir}
diff --git a/3rdparty/libuv/m4/.gitignore b/3rdparty/libuv/m4/.gitignore
deleted file mode 100644
index c44e4c2929a..00000000000
--- a/3rdparty/libuv/m4/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-# Ignore libtoolize-generated files.
-*.m4
-!as_case.m4
-!libuv-check-flags.m4
diff --git a/3rdparty/libuv/m4/as_case.m4 b/3rdparty/libuv/m4/as_case.m4
deleted file mode 100644
index c7ae0f0f5ed..00000000000
--- a/3rdparty/libuv/m4/as_case.m4
+++ /dev/null
@@ -1,21 +0,0 @@
-# AS_CASE(WORD, [PATTERN1], [IF-MATCHED1]...[DEFAULT])
-# ----------------------------------------------------
-# Expand into
-# | case WORD in
-# | PATTERN1) IF-MATCHED1 ;;
-# | ...
-# | *) DEFAULT ;;
-# | esac
-m4_define([_AS_CASE],
-[m4_if([$#], 0, [m4_fatal([$0: too few arguments: $#])],
- [$#], 1, [ *) $1 ;;],
- [$#], 2, [ $1) m4_default([$2], [:]) ;;],
- [ $1) m4_default([$2], [:]) ;;
-$0(m4_shiftn(2, $@))])dnl
-])
-m4_defun([AS_CASE],
-[m4_ifval([$2$3],
-[case $1 in
-_AS_CASE(m4_shift($@))
-esac])])
-
diff --git a/3rdparty/libuv/m4/libuv-check-flags.m4 b/3rdparty/libuv/m4/libuv-check-flags.m4
deleted file mode 100644
index 59c30635577..00000000000
--- a/3rdparty/libuv/m4/libuv-check-flags.m4
+++ /dev/null
@@ -1,319 +0,0 @@
-dnl Macros to check the presence of generic (non-typed) symbols.
-dnl Copyright (c) 2006-2008 Diego Pettenà <flameeyes gmail com>
-dnl Copyright (c) 2006-2008 xine project
-dnl
-dnl This program is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 3, or (at your option)
-dnl any later version.
-dnl
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with this program; if not, write to the Free Software
-dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-dnl 02110-1301, USA.
-dnl
-dnl As a special exception, the copyright owners of the
-dnl macro gives unlimited permission to copy, distribute and modify the
-dnl configure scripts that are the output of Autoconf when processing the
-dnl Macro. You need not follow the terms of the GNU General Public
-dnl License when using or distributing such scripts, even though portions
-dnl of the text of the Macro appear in them. The GNU General Public
-dnl License (GPL) does govern all other use of the material that
-dnl constitutes the Autoconf Macro.
-dnl
-dnl This special exception to the GPL applies to versions of the
-dnl Autoconf Macro released by this project. When you make and
-dnl distribute a modified version of the Autoconf Macro, you may extend
-dnl this special exception to the GPL to apply to your modified version as
-dnl well.
-
-dnl Check if the flag is supported by compiler
-dnl CC_CHECK_CFLAGS_SILENT([FLAG], [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND])
-
-AC_DEFUN([CC_CHECK_CFLAGS_SILENT], [
- AC_CACHE_VAL(AS_TR_SH([cc_cv_cflags_$1]),
- [ac_save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $1"
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([int a;])],
- [eval "AS_TR_SH([cc_cv_cflags_$1])='yes'"],
- [eval "AS_TR_SH([cc_cv_cflags_$1])='no'"])
- CFLAGS="$ac_save_CFLAGS"
- ])
-
- AS_IF([eval test x$]AS_TR_SH([cc_cv_cflags_$1])[ = xyes],
- [$2], [$3])
-])
-
-dnl Check if the flag is supported by compiler (cacheable)
-dnl CC_CHECK_CFLAGS([FLAG], [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND])
-
-AC_DEFUN([CC_CHECK_CFLAGS], [
- AC_CACHE_CHECK([if $CC supports $1 flag],
- AS_TR_SH([cc_cv_cflags_$1]),
- CC_CHECK_CFLAGS_SILENT([$1]) dnl Don't execute actions here!
- )
-
- AS_IF([eval test x$]AS_TR_SH([cc_cv_cflags_$1])[ = xyes],
- [$2], [$3])
-])
-
-dnl CC_CHECK_CFLAG_APPEND(FLAG, [action-if-found], [action-if-not-found])
-dnl Check for CFLAG and appends them to CFLAGS if supported
-AC_DEFUN([CC_CHECK_CFLAG_APPEND], [
- AC_CACHE_CHECK([if $CC supports $1 flag],
- AS_TR_SH([cc_cv_cflags_$1]),
- CC_CHECK_CFLAGS_SILENT([$1]) dnl Don't execute actions here!
- )
-
- AS_IF([eval test x$]AS_TR_SH([cc_cv_cflags_$1])[ = xyes],
- [CFLAGS="$CFLAGS $1"; DEBUG_CFLAGS="$DEBUG_CFLAGS $1"; $2], [$3])
-])
-
-dnl CC_CHECK_CFLAGS_APPEND([FLAG1 FLAG2], [action-if-found], [action-if-not])
-AC_DEFUN([CC_CHECK_CFLAGS_APPEND], [
- for flag in $1; do
- CC_CHECK_CFLAG_APPEND($flag, [$2], [$3])
- done
-])
-
-dnl Check if the flag is supported by linker (cacheable)
-dnl CC_CHECK_LDFLAGS([FLAG], [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND])
-
-AC_DEFUN([CC_CHECK_LDFLAGS], [
- AC_CACHE_CHECK([if $CC supports $1 flag],
- AS_TR_SH([cc_cv_ldflags_$1]),
- [ac_save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $1"
- AC_LANG_PUSH([C])
- AC_LINK_IFELSE([AC_LANG_SOURCE([int main() { return 1; }])],
- [eval "AS_TR_SH([cc_cv_ldflags_$1])='yes'"],
- [eval "AS_TR_SH([cc_cv_ldflags_$1])="])
- AC_LANG_POP([C])
- LDFLAGS="$ac_save_LDFLAGS"
- ])
-
- AS_IF([eval test x$]AS_TR_SH([cc_cv_ldflags_$1])[ = xyes],
- [$2], [$3])
-])
-
-dnl define the LDFLAGS_NOUNDEFINED variable with the correct value for
-dnl the current linker to avoid undefined references in a shared object.
-AC_DEFUN([CC_NOUNDEFINED], [
- dnl We check $host for which systems to enable this for.
- AC_REQUIRE([AC_CANONICAL_HOST])
-
- case $host in
- dnl FreeBSD (et al.) does not complete linking for shared objects when pthreads
- dnl are requested, as different implementations are present; to avoid problems
- dnl use -Wl,-z,defs only for those platform not behaving this way.
- *-freebsd* | *-openbsd*) ;;
- *)
- dnl First of all check for the --no-undefined variant of GNU ld. This allows
- dnl for a much more readable commandline, so that people can understand what
- dnl it does without going to look for what the heck -z defs does.
- for possible_flags in "-Wl,--no-undefined" "-Wl,-z,defs"; do
- CC_CHECK_LDFLAGS([$possible_flags], [LDFLAGS_NOUNDEFINED="$possible_flags"])
- break
- done
- ;;
- esac
-
- AC_SUBST([LDFLAGS_NOUNDEFINED])
-])
-
-dnl Check for a -Werror flag or equivalent. -Werror is the GCC
-dnl and ICC flag that tells the compiler to treat all the warnings
-dnl as fatal. We usually need this option to make sure that some
-dnl constructs (like attributes) are not simply ignored.
-dnl
-dnl Other compilers don't support -Werror per se, but they support
-dnl an equivalent flag:
-dnl - Sun Studio compiler supports -errwarn=%all
-AC_DEFUN([CC_CHECK_WERROR], [
- AC_CACHE_CHECK(
- [for $CC way to treat warnings as errors],
- [cc_cv_werror],
- [CC_CHECK_CFLAGS_SILENT([-Werror], [cc_cv_werror=-Werror],
- [CC_CHECK_CFLAGS_SILENT([-errwarn=%all], [cc_cv_werror=-errwarn=%all])])
- ])
-])
-
-AC_DEFUN([CC_CHECK_ATTRIBUTE], [
- AC_REQUIRE([CC_CHECK_WERROR])
- AC_CACHE_CHECK([if $CC supports __attribute__(( ifelse([$2], , [$1], [$2]) ))],
- AS_TR_SH([cc_cv_attribute_$1]),
- [ac_save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $cc_cv_werror"
- AC_LANG_PUSH([C])
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([$3])],
- [eval "AS_TR_SH([cc_cv_attribute_$1])='yes'"],
- [eval "AS_TR_SH([cc_cv_attribute_$1])='no'"])
- AC_LANG_POP([C])
- CFLAGS="$ac_save_CFLAGS"
- ])
-
- AS_IF([eval test x$]AS_TR_SH([cc_cv_attribute_$1])[ = xyes],
- [AC_DEFINE(
- AS_TR_CPP([SUPPORT_ATTRIBUTE_$1]), 1,
- [Define this if the compiler supports __attribute__(( ifelse([$2], , [$1], [$2]) ))]
- )
- $4],
- [$5])
-])
-
-AC_DEFUN([CC_ATTRIBUTE_CONSTRUCTOR], [
- CC_CHECK_ATTRIBUTE(
- [constructor],,
- [void __attribute__((constructor)) ctor() { int a; }],
- [$1], [$2])
-])
-
-AC_DEFUN([CC_ATTRIBUTE_FORMAT], [
- CC_CHECK_ATTRIBUTE(
- [format], [format(printf, n, n)],
- [void __attribute__((format(printf, 1, 2))) printflike(const char *fmt, ...) { fmt = (void *)0; }],
- [$1], [$2])
-])
-
-AC_DEFUN([CC_ATTRIBUTE_FORMAT_ARG], [
- CC_CHECK_ATTRIBUTE(
- [format_arg], [format_arg(printf)],
- [char *__attribute__((format_arg(1))) gettextlike(const char *fmt) { fmt = (void *)0; }],
- [$1], [$2])
-])
-
-AC_DEFUN([CC_ATTRIBUTE_VISIBILITY], [
- CC_CHECK_ATTRIBUTE(
- [visibility_$1], [visibility("$1")],
- [void __attribute__((visibility("$1"))) $1_function() { }],
- [$2], [$3])
-])
-
-AC_DEFUN([CC_ATTRIBUTE_NONNULL], [
- CC_CHECK_ATTRIBUTE(
- [nonnull], [nonnull()],
- [void __attribute__((nonnull())) some_function(void *foo, void *bar) { foo = (void*)0; bar = (void*)0; }],
- [$1], [$2])
-])
-
-AC_DEFUN([CC_ATTRIBUTE_UNUSED], [
- CC_CHECK_ATTRIBUTE(
- [unused], ,
- [void some_function(void *foo, __attribute__((unused)) void *bar);],
- [$1], [$2])
-])
-
-AC_DEFUN([CC_ATTRIBUTE_SENTINEL], [
- CC_CHECK_ATTRIBUTE(
- [sentinel], ,
- [void some_function(void *foo, ...) __attribute__((sentinel));],
- [$1], [$2])
-])
-
-AC_DEFUN([CC_ATTRIBUTE_DEPRECATED], [
- CC_CHECK_ATTRIBUTE(
- [deprecated], ,
- [void some_function(void *foo, ...) __attribute__((deprecated));],
- [$1], [$2])
-])
-
-AC_DEFUN([CC_ATTRIBUTE_ALIAS], [
- CC_CHECK_ATTRIBUTE(
- [alias], [weak, alias],
- [void other_function(void *foo) { }
- void some_function(void *foo) __attribute__((weak, alias("other_function")));],
- [$1], [$2])
-])
-
-AC_DEFUN([CC_ATTRIBUTE_MALLOC], [
- CC_CHECK_ATTRIBUTE(
- [malloc], ,
- [void * __attribute__((malloc)) my_alloc(int n);],
- [$1], [$2])
-])
-
-AC_DEFUN([CC_ATTRIBUTE_PACKED], [
- CC_CHECK_ATTRIBUTE(
- [packed], ,
- [struct astructure { char a; int b; long c; void *d; } __attribute__((packed));],
- [$1], [$2])
-])
-
-AC_DEFUN([CC_ATTRIBUTE_CONST], [
- CC_CHECK_ATTRIBUTE(
- [const], ,
- [int __attribute__((const)) twopow(int n) { return 1 << n; } ],
- [$1], [$2])
-])
-
-AC_DEFUN([CC_FLAG_VISIBILITY], [
- AC_REQUIRE([CC_CHECK_WERROR])
- AC_CACHE_CHECK([if $CC supports -fvisibility=hidden],
- [cc_cv_flag_visibility],
- [cc_flag_visibility_save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $cc_cv_werror"
- CC_CHECK_CFLAGS_SILENT([-fvisibility=hidden],
- cc_cv_flag_visibility='yes',
- cc_cv_flag_visibility='no')
- CFLAGS="$cc_flag_visibility_save_CFLAGS"])
-
- AS_IF([test "x$cc_cv_flag_visibility" = "xyes"],
- [AC_DEFINE([SUPPORT_FLAG_VISIBILITY], 1,
- [Define this if the compiler supports the -fvisibility flag])
- $1],
- [$2])
-])
-
-AC_DEFUN([CC_FUNC_EXPECT], [
- AC_REQUIRE([CC_CHECK_WERROR])
- AC_CACHE_CHECK([if compiler has __builtin_expect function],
- [cc_cv_func_expect],
- [ac_save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $cc_cv_werror"
- AC_LANG_PUSH([C])
- AC_COMPILE_IFELSE([AC_LANG_SOURCE(
- [int some_function() {
- int a = 3;
- return (int)__builtin_expect(a, 3);
- }])],
- [cc_cv_func_expect=yes],
- [cc_cv_func_expect=no])
- AC_LANG_POP([C])
- CFLAGS="$ac_save_CFLAGS"
- ])
-
- AS_IF([test "x$cc_cv_func_expect" = "xyes"],
- [AC_DEFINE([SUPPORT__BUILTIN_EXPECT], 1,
- [Define this if the compiler supports __builtin_expect() function])
- $1],
- [$2])
-])
-
-AC_DEFUN([CC_ATTRIBUTE_ALIGNED], [
- AC_REQUIRE([CC_CHECK_WERROR])
- AC_CACHE_CHECK([highest __attribute__ ((aligned ())) supported],
- [cc_cv_attribute_aligned],
- [ac_save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $cc_cv_werror"
- AC_LANG_PUSH([C])
- for cc_attribute_align_try in 64 32 16 8 4 2; do
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([
- int main() {
- static char c __attribute__ ((aligned($cc_attribute_align_try))) = 0;
- return c;
- }])], [cc_cv_attribute_aligned=$cc_attribute_align_try; break])
- done
- AC_LANG_POP([C])
- CFLAGS="$ac_save_CFLAGS"
- ])
-
- if test "x$cc_cv_attribute_aligned" != "x"; then
- AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX], [$cc_cv_attribute_aligned],
- [Define the highest alignment supported])
- fi
-]) \ No newline at end of file
diff --git a/3rdparty/libuv/samples/.gitignore b/3rdparty/libuv/samples/.gitignore
deleted file mode 100644
index f868091ba32..00000000000
--- a/3rdparty/libuv/samples/.gitignore
+++ /dev/null
@@ -1,22 +0,0 @@
-# Copyright StrongLoop, Inc. All rights reserved.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to
-# deal in the Software without restriction, including without limitation the
-# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-# sell copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-# IN THE SOFTWARE.
-
-*.mk
-*.Makefile
diff --git a/3rdparty/libuv/samples/socks5-proxy/.gitignore b/3rdparty/libuv/samples/socks5-proxy/.gitignore
deleted file mode 100644
index c177f374510..00000000000
--- a/3rdparty/libuv/samples/socks5-proxy/.gitignore
+++ /dev/null
@@ -1,21 +0,0 @@
-# Copyright StrongLoop, Inc. All rights reserved.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to
-# deal in the Software without restriction, including without limitation the
-# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-# sell copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-# IN THE SOFTWARE.
-
-/build/
diff --git a/3rdparty/libuv/samples/socks5-proxy/LICENSE b/3rdparty/libuv/samples/socks5-proxy/LICENSE
deleted file mode 100644
index 63c1447fc55..00000000000
--- a/3rdparty/libuv/samples/socks5-proxy/LICENSE
+++ /dev/null
@@ -1,53 +0,0 @@
-Files: *
-========
-
-Copyright StrongLoop, Inc. All rights reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to
-deal in the Software without restriction, including without limitation the
-rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-sell copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-IN THE SOFTWARE.
-
-
-Files: getopt.c
-===============
-
-Copyright (c) 1987, 1993, 1994
-The Regents of the University of California. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-2. 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.
-3. Neither the name of the University 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 REGENTS 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 REGENTS OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
diff --git a/3rdparty/libuv/samples/socks5-proxy/Makefile b/3rdparty/libuv/samples/socks5-proxy/Makefile
deleted file mode 100644
index ca43985ec80..00000000000
--- a/3rdparty/libuv/samples/socks5-proxy/Makefile
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright StrongLoop, Inc. All rights reserved.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to
-# deal in the Software without restriction, including without limitation the
-# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-# sell copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-# IN THE SOFTWARE.
-
-BUILDTYPE ?= Debug
-BUILDDIR ?= build
-GYP ?= gyp
-V ?=
-
-SOURCES := client.c defs.h getopt.c main.c s5.c s5.h server.c util.c
-
-.PHONY: all clean
-
-all: $(BUILDDIR)/$(BUILDTYPE)/s5-proxy
-
-clean:
- $(RM) $(BUILDDIR)
-
-$(BUILDDIR)/$(BUILDTYPE)/s5-proxy: $(BUILDDIR)/Makefile $(SOURCES)
- $(MAKE) -C $(BUILDDIR) V=$(V)
-
-$(BUILDDIR)/Makefile: ../../common.gypi build.gyp
- $(GYP) \
- -Duv_library=static_library \
- -Goutput_dir=. \
- -I../../common.gypi \
- -f make \
- --depth=. \
- --generator-output=$(BUILDDIR) \
- build.gyp
diff --git a/3rdparty/libuv/samples/socks5-proxy/build.gyp b/3rdparty/libuv/samples/socks5-proxy/build.gyp
deleted file mode 100644
index 771a1e146db..00000000000
--- a/3rdparty/libuv/samples/socks5-proxy/build.gyp
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright StrongLoop, Inc. All rights reserved.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to
-# deal in the Software without restriction, including without limitation the
-# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-# sell copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-# IN THE SOFTWARE.
-
-{
- 'targets': [
- {
- 'dependencies': ['../../uv.gyp:libuv'],
- 'target_name': 's5-proxy',
- 'type': 'executable',
- 'sources': [
- 'client.c',
- 'defs.h',
- 'main.c',
- 's5.c',
- 's5.h',
- 'server.c',
- 'util.c',
- ],
- 'conditions': [
- ['OS=="win"', {
- 'defines': ['HAVE_UNISTD_H=0'],
- 'sources': ['getopt.c']
- }, {
- 'defines': ['HAVE_UNISTD_H=1']
- }]
- ]
- }
- ]
-}
diff --git a/3rdparty/libuv/samples/socks5-proxy/client.c b/3rdparty/libuv/samples/socks5-proxy/client.c
deleted file mode 100644
index ae9913a1c6e..00000000000
--- a/3rdparty/libuv/samples/socks5-proxy/client.c
+++ /dev/null
@@ -1,737 +0,0 @@
-/* Copyright StrongLoop, Inc. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "defs.h"
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-
-/* A connection is modeled as an abstraction on top of two simple state
- * machines, one for reading and one for writing. Either state machine
- * is, when active, in one of three states: busy, done or stop; the fourth
- * and final state, dead, is an end state and only relevant when shutting
- * down the connection. A short overview:
- *
- * busy done stop
- * ----------|---------------------------|--------------------|------|
- * readable | waiting for incoming data | have incoming data | idle |
- * writable | busy writing out data | completed write | idle |
- *
- * We could remove the done state from the writable state machine. For our
- * purposes, it's functionally equivalent to the stop state.
- *
- * When the connection with upstream has been established, the client_ctx
- * moves into a state where incoming data from the client is sent upstream
- * and vice versa, incoming data from upstream is sent to the client. In
- * other words, we're just piping data back and forth. See conn_cycle()
- * for details.
- *
- * An interesting deviation from libuv's I/O model is that reads are discrete
- * rather than continuous events. In layman's terms, when a read operation
- * completes, the connection stops reading until further notice.
- *
- * The rationale for this approach is that we have to wait until the data
- * has been sent out again before we can reuse the read buffer.
- *
- * It also pleasingly unifies with the request model that libuv uses for
- * writes and everything else; libuv may switch to a request model for
- * reads in the future.
- */
-enum conn_state {
- c_busy, /* Busy; waiting for incoming data or for a write to complete. */
- c_done, /* Done; read incoming data or write finished. */
- c_stop, /* Stopped. */
- c_dead
-};
-
-/* Session states. */
-enum sess_state {
- s_handshake, /* Wait for client handshake. */
- s_handshake_auth, /* Wait for client authentication data. */
- s_req_start, /* Start waiting for request data. */
- s_req_parse, /* Wait for request data. */
- s_req_lookup, /* Wait for upstream hostname DNS lookup to complete. */
- s_req_connect, /* Wait for uv_tcp_connect() to complete. */
- s_proxy_start, /* Connected. Start piping data. */
- s_proxy, /* Connected. Pipe data back and forth. */
- s_kill, /* Tear down session. */
- s_almost_dead_0, /* Waiting for finalizers to complete. */
- s_almost_dead_1, /* Waiting for finalizers to complete. */
- s_almost_dead_2, /* Waiting for finalizers to complete. */
- s_almost_dead_3, /* Waiting for finalizers to complete. */
- s_almost_dead_4, /* Waiting for finalizers to complete. */
- s_dead /* Dead. Safe to free now. */
-};
-
-static void do_next(client_ctx *cx);
-static int do_handshake(client_ctx *cx);
-static int do_handshake_auth(client_ctx *cx);
-static int do_req_start(client_ctx *cx);
-static int do_req_parse(client_ctx *cx);
-static int do_req_lookup(client_ctx *cx);
-static int do_req_connect_start(client_ctx *cx);
-static int do_req_connect(client_ctx *cx);
-static int do_proxy_start(client_ctx *cx);
-static int do_proxy(client_ctx *cx);
-static int do_kill(client_ctx *cx);
-static int do_almost_dead(client_ctx *cx);
-static int conn_cycle(const char *who, conn *a, conn *b);
-static void conn_timer_reset(conn *c);
-static void conn_timer_expire(uv_timer_t *handle, int status);
-static void conn_getaddrinfo(conn *c, const char *hostname);
-static void conn_getaddrinfo_done(uv_getaddrinfo_t *req,
- int status,
- struct addrinfo *ai);
-static int conn_connect(conn *c);
-static void conn_connect_done(uv_connect_t *req, int status);
-static void conn_read(conn *c);
-static void conn_read_done(uv_stream_t *handle,
- ssize_t nread,
- const uv_buf_t *buf);
-static void conn_alloc(uv_handle_t *handle, size_t size, uv_buf_t *buf);
-static void conn_write(conn *c, const void *data, unsigned int len);
-static void conn_write_done(uv_write_t *req, int status);
-static void conn_close(conn *c);
-static void conn_close_done(uv_handle_t *handle);
-
-/* |incoming| has been initialized by server.c when this is called. */
-void client_finish_init(server_ctx *sx, client_ctx *cx) {
- conn *incoming;
- conn *outgoing;
-
- cx->sx = sx;
- cx->state = s_handshake;
- s5_init(&cx->parser);
-
- incoming = &cx->incoming;
- incoming->client = cx;
- incoming->result = 0;
- incoming->rdstate = c_stop;
- incoming->wrstate = c_stop;
- incoming->idle_timeout = sx->idle_timeout;
- CHECK(0 == uv_timer_init(sx->loop, &incoming->timer_handle));
-
- outgoing = &cx->outgoing;
- outgoing->client = cx;
- outgoing->result = 0;
- outgoing->rdstate = c_stop;
- outgoing->wrstate = c_stop;
- outgoing->idle_timeout = sx->idle_timeout;
- CHECK(0 == uv_tcp_init(cx->sx->loop, &outgoing->handle.tcp));
- CHECK(0 == uv_timer_init(cx->sx->loop, &outgoing->timer_handle));
-
- /* Wait for the initial packet. */
- conn_read(incoming);
-}
-
-/* This is the core state machine that drives the client <-> upstream proxy.
- * We move through the initial handshake and authentication steps first and
- * end up (if all goes well) in the proxy state where we're just proxying
- * data between the client and upstream.
- */
-static void do_next(client_ctx *cx) {
- int new_state;
-
- ASSERT(cx->state != s_dead);
- switch (cx->state) {
- case s_handshake:
- new_state = do_handshake(cx);
- break;
- case s_handshake_auth:
- new_state = do_handshake_auth(cx);
- break;
- case s_req_start:
- new_state = do_req_start(cx);
- break;
- case s_req_parse:
- new_state = do_req_parse(cx);
- break;
- case s_req_lookup:
- new_state = do_req_lookup(cx);
- break;
- case s_req_connect:
- new_state = do_req_connect(cx);
- break;
- case s_proxy_start:
- new_state = do_proxy_start(cx);
- break;
- case s_proxy:
- new_state = do_proxy(cx);
- break;
- case s_kill:
- new_state = do_kill(cx);
- break;
- case s_almost_dead_0:
- case s_almost_dead_1:
- case s_almost_dead_2:
- case s_almost_dead_3:
- case s_almost_dead_4:
- new_state = do_almost_dead(cx);
- break;
- default:
- UNREACHABLE();
- }
- cx->state = new_state;
-
- if (cx->state == s_dead) {
- if (DEBUG_CHECKS) {
- memset(cx, -1, sizeof(*cx));
- }
- free(cx);
- }
-}
-
-static int do_handshake(client_ctx *cx) {
- unsigned int methods;
- conn *incoming;
- s5_ctx *parser;
- uint8_t *data;
- size_t size;
- int err;
-
- parser = &cx->parser;
- incoming = &cx->incoming;
- ASSERT(incoming->rdstate == c_done);
- ASSERT(incoming->wrstate == c_stop);
- incoming->rdstate = c_stop;
-
- if (incoming->result < 0) {
- pr_err("read error: %s", uv_strerror(incoming->result));
- return do_kill(cx);
- }
-
- data = (uint8_t *) incoming->t.buf;
- size = (size_t) incoming->result;
- err = s5_parse(parser, &data, &size);
- if (err == s5_ok) {
- conn_read(incoming);
- return s_handshake; /* Need more data. */
- }
-
- if (size != 0) {
- /* Could allow a round-trip saving shortcut here if the requested auth
- * method is S5_AUTH_NONE (provided unauthenticated traffic is allowed.)
- * Requires client support however.
- */
- pr_err("junk in handshake");
- return do_kill(cx);
- }
-
- if (err != s5_auth_select) {
- pr_err("handshake error: %s", s5_strerror(err));
- return do_kill(cx);
- }
-
- methods = s5_auth_methods(parser);
- if ((methods & S5_AUTH_NONE) && can_auth_none(cx->sx, cx)) {
- s5_select_auth(parser, S5_AUTH_NONE);
- conn_write(incoming, "\5\0", 2); /* No auth required. */
- return s_req_start;
- }
-
- if ((methods & S5_AUTH_PASSWD) && can_auth_passwd(cx->sx, cx)) {
- /* TODO(bnoordhuis) Implement username/password auth. */
- }
-
- conn_write(incoming, "\5\377", 2); /* No acceptable auth. */
- return s_kill;
-}
-
-/* TODO(bnoordhuis) Implement username/password auth. */
-static int do_handshake_auth(client_ctx *cx) {
- UNREACHABLE();
- return do_kill(cx);
-}
-
-static int do_req_start(client_ctx *cx) {
- conn *incoming;
-
- incoming = &cx->incoming;
- ASSERT(incoming->rdstate == c_stop);
- ASSERT(incoming->wrstate == c_done);
- incoming->wrstate = c_stop;
-
- if (incoming->result < 0) {
- pr_err("write error: %s", uv_strerror(incoming->result));
- return do_kill(cx);
- }
-
- conn_read(incoming);
- return s_req_parse;
-}
-
-static int do_req_parse(client_ctx *cx) {
- conn *incoming;
- conn *outgoing;
- s5_ctx *parser;
- uint8_t *data;
- size_t size;
- int err;
-
- parser = &cx->parser;
- incoming = &cx->incoming;
- outgoing = &cx->outgoing;
- ASSERT(incoming->rdstate == c_done);
- ASSERT(incoming->wrstate == c_stop);
- ASSERT(outgoing->rdstate == c_stop);
- ASSERT(outgoing->wrstate == c_stop);
- incoming->rdstate = c_stop;
-
- if (incoming->result < 0) {
- pr_err("read error: %s", uv_strerror(incoming->result));
- return do_kill(cx);
- }
-
- data = (uint8_t *) incoming->t.buf;
- size = (size_t) incoming->result;
- err = s5_parse(parser, &data, &size);
- if (err == s5_ok) {
- conn_read(incoming);
- return s_req_parse; /* Need more data. */
- }
-
- if (size != 0) {
- pr_err("junk in request %u", (unsigned) size);
- return do_kill(cx);
- }
-
- if (err != s5_exec_cmd) {
- pr_err("request error: %s", s5_strerror(err));
- return do_kill(cx);
- }
-
- if (parser->cmd == s5_cmd_tcp_bind) {
- /* Not supported but relatively straightforward to implement. */
- pr_warn("BIND requests are not supported.");
- return do_kill(cx);
- }
-
- if (parser->cmd == s5_cmd_udp_assoc) {
- /* Not supported. Might be hard to implement because libuv has no
- * functionality for detecting the MTU size which the RFC mandates.
- */
- pr_warn("UDP ASSOC requests are not supported.");
- return do_kill(cx);
- }
- ASSERT(parser->cmd == s5_cmd_tcp_connect);
-
- if (parser->atyp == s5_atyp_host) {
- conn_getaddrinfo(outgoing, (const char *) parser->daddr);
- return s_req_lookup;
- }
-
- if (parser->atyp == s5_atyp_ipv4) {
- memset(&outgoing->t.addr4, 0, sizeof(outgoing->t.addr4));
- outgoing->t.addr4.sin_family = AF_INET;
- outgoing->t.addr4.sin_port = htons(parser->dport);
- memcpy(&outgoing->t.addr4.sin_addr,
- parser->daddr,
- sizeof(outgoing->t.addr4.sin_addr));
- } else if (parser->atyp == s5_atyp_ipv6) {
- memset(&outgoing->t.addr6, 0, sizeof(outgoing->t.addr6));
- outgoing->t.addr6.sin6_family = AF_INET6;
- outgoing->t.addr6.sin6_port = htons(parser->dport);
- memcpy(&outgoing->t.addr6.sin6_addr,
- parser->daddr,
- sizeof(outgoing->t.addr6.sin6_addr));
- } else {
- UNREACHABLE();
- }
-
- return do_req_connect_start(cx);
-}
-
-static int do_req_lookup(client_ctx *cx) {
- s5_ctx *parser;
- conn *incoming;
- conn *outgoing;
-
- parser = &cx->parser;
- incoming = &cx->incoming;
- outgoing = &cx->outgoing;
- ASSERT(incoming->rdstate == c_stop);
- ASSERT(incoming->wrstate == c_stop);
- ASSERT(outgoing->rdstate == c_stop);
- ASSERT(outgoing->wrstate == c_stop);
-
- if (outgoing->result < 0) {
- /* TODO(bnoordhuis) Escape control characters in parser->daddr. */
- pr_err("lookup error for \"%s\": %s",
- parser->daddr,
- uv_strerror(outgoing->result));
- /* Send back a 'Host unreachable' reply. */
- conn_write(incoming, "\5\4\0\1\0\0\0\0\0\0", 10);
- return s_kill;
- }
-
- /* Don't make assumptions about the offset of sin_port/sin6_port. */
- switch (outgoing->t.addr.sa_family) {
- case AF_INET:
- outgoing->t.addr4.sin_port = htons(parser->dport);
- break;
- case AF_INET6:
- outgoing->t.addr6.sin6_port = htons(parser->dport);
- break;
- default:
- UNREACHABLE();
- }
-
- return do_req_connect_start(cx);
-}
-
-/* Assumes that cx->outgoing.t.sa contains a valid AF_INET/AF_INET6 address. */
-static int do_req_connect_start(client_ctx *cx) {
- conn *incoming;
- conn *outgoing;
- int err;
-
- incoming = &cx->incoming;
- outgoing = &cx->outgoing;
- ASSERT(incoming->rdstate == c_stop);
- ASSERT(incoming->wrstate == c_stop);
- ASSERT(outgoing->rdstate == c_stop);
- ASSERT(outgoing->wrstate == c_stop);
-
- if (!can_access(cx->sx, cx, &outgoing->t.addr)) {
- pr_warn("connection not allowed by ruleset");
- /* Send a 'Connection not allowed by ruleset' reply. */
- conn_write(incoming, "\5\2\0\1\0\0\0\0\0\0", 10);
- return s_kill;
- }
-
- err = conn_connect(outgoing);
- if (err != 0) {
- pr_err("connect error: %s\n", uv_strerror(err));
- return do_kill(cx);
- }
-
- return s_req_connect;
-}
-
-static int do_req_connect(client_ctx *cx) {
- const struct sockaddr_in6 *in6;
- const struct sockaddr_in *in;
- char addr_storage[sizeof(*in6)];
- conn *incoming;
- conn *outgoing;
- uint8_t *buf;
- int addrlen;
-
- incoming = &cx->incoming;
- outgoing = &cx->outgoing;
- ASSERT(incoming->rdstate == c_stop);
- ASSERT(incoming->wrstate == c_stop);
- ASSERT(outgoing->rdstate == c_stop);
- ASSERT(outgoing->wrstate == c_stop);
-
- /* Build and send the reply. Not very pretty but gets the job done. */
- buf = (uint8_t *) incoming->t.buf;
- if (outgoing->result == 0) {
- /* The RFC mandates that the SOCKS server must include the local port
- * and address in the reply. So that's what we do.
- */
- addrlen = sizeof(addr_storage);
- CHECK(0 == uv_tcp_getsockname(&outgoing->handle.tcp,
- (struct sockaddr *) addr_storage,
- &addrlen));
- buf[0] = 5; /* Version. */
- buf[1] = 0; /* Success. */
- buf[2] = 0; /* Reserved. */
- if (addrlen == sizeof(*in)) {
- buf[3] = 1; /* IPv4. */
- in = (const struct sockaddr_in *) &addr_storage;
- memcpy(buf + 4, &in->sin_addr, 4);
- memcpy(buf + 8, &in->sin_port, 2);
- conn_write(incoming, buf, 10);
- } else if (addrlen == sizeof(*in6)) {
- buf[3] = 4; /* IPv6. */
- in6 = (const struct sockaddr_in6 *) &addr_storage;
- memcpy(buf + 4, &in6->sin6_addr, 16);
- memcpy(buf + 20, &in6->sin6_port, 2);
- conn_write(incoming, buf, 22);
- } else {
- UNREACHABLE();
- }
- return s_proxy_start;
- } else {
- pr_err("upstream connection error: %s\n", uv_strerror(outgoing->result));
- /* Send a 'Connection refused' reply. */
- conn_write(incoming, "\5\5\0\1\0\0\0\0\0\0", 10);
- return s_kill;
- }
-
- UNREACHABLE();
- return s_kill;
-}
-
-static int do_proxy_start(client_ctx *cx) {
- conn *incoming;
- conn *outgoing;
-
- incoming = &cx->incoming;
- outgoing = &cx->outgoing;
- ASSERT(incoming->rdstate == c_stop);
- ASSERT(incoming->wrstate == c_done);
- ASSERT(outgoing->rdstate == c_stop);
- ASSERT(outgoing->wrstate == c_stop);
- incoming->wrstate = c_stop;
-
- if (incoming->result < 0) {
- pr_err("write error: %s", uv_strerror(incoming->result));
- return do_kill(cx);
- }
-
- conn_read(incoming);
- conn_read(outgoing);
- return s_proxy;
-}
-
-/* Proxy incoming data back and forth. */
-static int do_proxy(client_ctx *cx) {
- if (conn_cycle("client", &cx->incoming, &cx->outgoing)) {
- return do_kill(cx);
- }
-
- if (conn_cycle("upstream", &cx->outgoing, &cx->incoming)) {
- return do_kill(cx);
- }
-
- return s_proxy;
-}
-
-static int do_kill(client_ctx *cx) {
- int new_state;
-
- if (cx->state >= s_almost_dead_0) {
- return cx->state;
- }
-
- /* Try to cancel the request. The callback still runs but if the
- * cancellation succeeded, it gets called with status=UV_ECANCELED.
- */
- new_state = s_almost_dead_1;
- if (cx->state == s_req_lookup) {
- new_state = s_almost_dead_0;
- uv_cancel(&cx->outgoing.t.req);
- }
-
- conn_close(&cx->incoming);
- conn_close(&cx->outgoing);
- return new_state;
-}
-
-static int do_almost_dead(client_ctx *cx) {
- ASSERT(cx->state >= s_almost_dead_0);
- return cx->state + 1; /* Another finalizer completed. */
-}
-
-static int conn_cycle(const char *who, conn *a, conn *b) {
- if (a->result < 0) {
- if (a->result != UV_EOF) {
- pr_err("%s error: %s", who, uv_strerror(a->result));
- }
- return -1;
- }
-
- if (b->result < 0) {
- return -1;
- }
-
- if (a->wrstate == c_done) {
- a->wrstate = c_stop;
- }
-
- /* The logic is as follows: read when we don't write and write when we don't
- * read. That gives us back-pressure handling for free because if the peer
- * sends data faster than we consume it, TCP congestion control kicks in.
- */
- if (a->wrstate == c_stop) {
- if (b->rdstate == c_stop) {
- conn_read(b);
- } else if (b->rdstate == c_done) {
- conn_write(a, b->t.buf, b->result);
- b->rdstate = c_stop; /* Triggers the call to conn_read() above. */
- }
- }
-
- return 0;
-}
-
-static void conn_timer_reset(conn *c) {
- CHECK(0 == uv_timer_start(&c->timer_handle,
- conn_timer_expire,
- c->idle_timeout,
- 0));
-}
-
-static void conn_timer_expire(uv_timer_t *handle, int status) {
- conn *c;
-
- CHECK(0 == status);
- c = CONTAINER_OF(handle, conn, timer_handle);
- c->result = UV_ETIMEDOUT;
- do_next(c->client);
-}
-
-static void conn_getaddrinfo(conn *c, const char *hostname) {
- struct addrinfo hints;
-
- memset(&hints, 0, sizeof(hints));
- hints.ai_family = AF_UNSPEC;
- hints.ai_socktype = SOCK_STREAM;
- hints.ai_protocol = IPPROTO_TCP;
- CHECK(0 == uv_getaddrinfo(c->client->sx->loop,
- &c->t.addrinfo_req,
- conn_getaddrinfo_done,
- hostname,
- NULL,
- &hints));
- conn_timer_reset(c);
-}
-
-static void conn_getaddrinfo_done(uv_getaddrinfo_t *req,
- int status,
- struct addrinfo *ai) {
- conn *c;
-
- c = CONTAINER_OF(req, conn, t.addrinfo_req);
- c->result = status;
-
- if (status == 0) {
- /* FIXME(bnoordhuis) Should try all addresses. */
- if (ai->ai_family == AF_INET) {
- c->t.addr4 = *(const struct sockaddr_in *) ai->ai_addr;
- } else if (ai->ai_family == AF_INET6) {
- c->t.addr6 = *(const struct sockaddr_in6 *) ai->ai_addr;
- } else {
- UNREACHABLE();
- }
- }
-
- uv_freeaddrinfo(ai);
- do_next(c->client);
-}
-
-/* Assumes that c->t.sa contains a valid AF_INET or AF_INET6 address. */
-static int conn_connect(conn *c) {
- ASSERT(c->t.addr.sa_family == AF_INET ||
- c->t.addr.sa_family == AF_INET6);
- conn_timer_reset(c);
- return uv_tcp_connect(&c->t.connect_req,
- &c->handle.tcp,
- &c->t.addr,
- conn_connect_done);
-}
-
-static void conn_connect_done(uv_connect_t *req, int status) {
- conn *c;
-
- if (status == UV_ECANCELED) {
- return; /* Handle has been closed. */
- }
-
- c = CONTAINER_OF(req, conn, t.connect_req);
- c->result = status;
- do_next(c->client);
-}
-
-static void conn_read(conn *c) {
- ASSERT(c->rdstate == c_stop);
- CHECK(0 == uv_read_start(&c->handle.stream, conn_alloc, conn_read_done));
- c->rdstate = c_busy;
- conn_timer_reset(c);
-}
-
-static void conn_read_done(uv_stream_t *handle,
- ssize_t nread,
- const uv_buf_t *buf) {
- conn *c;
-
- c = CONTAINER_OF(handle, conn, handle);
- ASSERT(c->t.buf == buf->base);
- ASSERT(c->rdstate == c_busy);
- c->rdstate = c_done;
- c->result = nread;
-
- uv_read_stop(&c->handle.stream);
- do_next(c->client);
-}
-
-static void conn_alloc(uv_handle_t *handle, size_t size, uv_buf_t *buf) {
- conn *c;
-
- c = CONTAINER_OF(handle, conn, handle);
- ASSERT(c->rdstate == c_busy);
- buf->base = c->t.buf;
- buf->len = sizeof(c->t.buf);
-}
-
-static void conn_write(conn *c, const void *data, unsigned int len) {
- uv_buf_t buf;
-
- ASSERT(c->wrstate == c_stop || c->wrstate == c_done);
- c->wrstate = c_busy;
-
- /* It's okay to cast away constness here, uv_write() won't modify the
- * memory.
- */
- buf.base = (char *) data;
- buf.len = len;
-
- CHECK(0 == uv_write(&c->write_req,
- &c->handle.stream,
- &buf,
- 1,
- conn_write_done));
- conn_timer_reset(c);
-}
-
-static void conn_write_done(uv_write_t *req, int status) {
- conn *c;
-
- if (status == UV_ECANCELED) {
- return; /* Handle has been closed. */
- }
-
- c = CONTAINER_OF(req, conn, write_req);
- ASSERT(c->wrstate == c_busy);
- c->wrstate = c_done;
- c->result = status;
- do_next(c->client);
-}
-
-static void conn_close(conn *c) {
- ASSERT(c->rdstate != c_dead);
- ASSERT(c->wrstate != c_dead);
- c->rdstate = c_dead;
- c->wrstate = c_dead;
- c->timer_handle.data = c;
- c->handle.handle.data = c;
- uv_close(&c->handle.handle, conn_close_done);
- uv_close((uv_handle_t *) &c->timer_handle, conn_close_done);
-}
-
-static void conn_close_done(uv_handle_t *handle) {
- conn *c;
-
- c = handle->data;
- do_next(c->client);
-}
diff --git a/3rdparty/libuv/samples/socks5-proxy/defs.h b/3rdparty/libuv/samples/socks5-proxy/defs.h
deleted file mode 100644
index 99ee8160c8a..00000000000
--- a/3rdparty/libuv/samples/socks5-proxy/defs.h
+++ /dev/null
@@ -1,139 +0,0 @@
-/* Copyright StrongLoop, Inc. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#ifndef DEFS_H_
-#define DEFS_H_
-
-#include "s5.h"
-#include "uv.h"
-
-#include <assert.h>
-#include <netinet/in.h> /* sockaddr_in, sockaddr_in6 */
-#include <stddef.h> /* size_t, ssize_t */
-#include <stdint.h>
-#include <sys/socket.h> /* sockaddr */
-
-struct client_ctx;
-
-typedef struct {
- const char *bind_host;
- unsigned short bind_port;
- unsigned int idle_timeout;
-} server_config;
-
-typedef struct {
- unsigned int idle_timeout; /* Connection idle timeout in ms. */
- uv_tcp_t tcp_handle;
- uv_loop_t *loop;
-} server_ctx;
-
-typedef struct {
- unsigned char rdstate;
- unsigned char wrstate;
- unsigned int idle_timeout;
- struct client_ctx *client; /* Backlink to owning client context. */
- ssize_t result;
- union {
- uv_handle_t handle;
- uv_stream_t stream;
- uv_tcp_t tcp;
- uv_udp_t udp;
- } handle;
- uv_timer_t timer_handle; /* For detecting timeouts. */
- uv_write_t write_req;
- /* We only need one of these at a time so make them share memory. */
- union {
- uv_getaddrinfo_t addrinfo_req;
- uv_connect_t connect_req;
- uv_req_t req;
- struct sockaddr_in6 addr6;
- struct sockaddr_in addr4;
- struct sockaddr addr;
- char buf[2048]; /* Scratch space. Used to read data into. */
- } t;
-} conn;
-
-typedef struct client_ctx {
- unsigned int state;
- server_ctx *sx; /* Backlink to owning server context. */
- s5_ctx parser; /* The SOCKS protocol parser. */
- conn incoming; /* Connection with the SOCKS client. */
- conn outgoing; /* Connection with upstream. */
-} client_ctx;
-
-/* server.c */
-int server_run(const server_config *cf, uv_loop_t *loop);
-int can_auth_none(const server_ctx *sx, const client_ctx *cx);
-int can_auth_passwd(const server_ctx *sx, const client_ctx *cx);
-int can_access(const server_ctx *sx,
- const client_ctx *cx,
- const struct sockaddr *addr);
-
-/* client.c */
-void client_finish_init(server_ctx *sx, client_ctx *cx);
-
-/* util.c */
-#if defined(__GNUC__)
-# define ATTRIBUTE_FORMAT_PRINTF(a, b) __attribute__((format(printf, a, b)))
-#else
-# define ATTRIBUTE_FORMAT_PRINTF(a, b)
-#endif
-void pr_info(const char *fmt, ...) ATTRIBUTE_FORMAT_PRINTF(1, 2);
-void pr_warn(const char *fmt, ...) ATTRIBUTE_FORMAT_PRINTF(1, 2);
-void pr_err(const char *fmt, ...) ATTRIBUTE_FORMAT_PRINTF(1, 2);
-void *xmalloc(size_t size);
-
-/* main.c */
-const char *_getprogname(void);
-
-/* getopt.c */
-#if !HAVE_UNISTD_H
-extern char *optarg;
-int getopt(int argc, char **argv, const char *options);
-#endif
-
-/* ASSERT() is for debug checks, CHECK() for run-time sanity checks.
- * DEBUG_CHECKS is for expensive debug checks that we only want to
- * enable in debug builds but still want type-checked by the compiler
- * in release builds.
- */
-#if defined(NDEBUG)
-# define ASSERT(exp)
-# define CHECK(exp) do { if (!(exp)) abort(); } while (0)
-# define DEBUG_CHECKS (0)
-#else
-# define ASSERT(exp) assert(exp)
-# define CHECK(exp) assert(exp)
-# define DEBUG_CHECKS (1)
-#endif
-
-#define UNREACHABLE() CHECK(!"Unreachable code reached.")
-
-/* This macro looks complicated but it's not: it calculates the address
- * of the embedding struct through the address of the embedded struct.
- * In other words, if struct A embeds struct B, then we can obtain
- * the address of A by taking the address of B and subtracting the
- * field offset of B in A.
- */
-#define CONTAINER_OF(ptr, type, field) \
- ((type *) ((char *) (ptr) - ((char *) &((type *) 0)->field)))
-
-#endif /* DEFS_H_ */
diff --git a/3rdparty/libuv/samples/socks5-proxy/getopt.c b/3rdparty/libuv/samples/socks5-proxy/getopt.c
deleted file mode 100644
index 8481b2264f2..00000000000
--- a/3rdparty/libuv/samples/socks5-proxy/getopt.c
+++ /dev/null
@@ -1,131 +0,0 @@
-/* $NetBSD: getopt.c,v 1.26 2003/08/07 16:43:40 agc Exp $ */
-
-/*
- * Copyright (c) 1987, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. 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.
- * 3. Neither the name of the University 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 REGENTS 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 REGENTS 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.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getopt.c 8.3 (Berkeley) 4/27/95";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-extern const char *_getprogname(void);
-
-int opterr = 1, /* if error message should be printed */
- optind = 1, /* index into parent argv vector */
- optopt, /* character checked for validity */
- optreset; /* reset getopt */
-char *optarg; /* argument associated with option */
-
-#define BADCH (int)'?'
-#define BADARG (int)':'
-#define EMSG ""
-
-/*
- * getopt --
- * Parse argc/argv argument vector.
- */
-int
-getopt(nargc, nargv, ostr)
- int nargc;
- char * const nargv[];
- const char *ostr;
-{
- static char *place = EMSG; /* option letter processing */
- char *oli; /* option letter list index */
-
- if (optreset || *place == 0) { /* update scanning pointer */
- optreset = 0;
- place = nargv[optind];
- if (optind >= nargc || *place++ != '-') {
- /* Argument is absent or is not an option */
- place = EMSG;
- return (-1);
- }
- optopt = *place++;
- if (optopt == '-' && *place == 0) {
- /* "--" => end of options */
- ++optind;
- place = EMSG;
- return (-1);
- }
- if (optopt == 0) {
- /* Solitary '-', treat as a '-' option
- if the program (eg su) is looking for it. */
- place = EMSG;
- if (strchr(ostr, '-') == NULL)
- return (-1);
- optopt = '-';
- }
- } else
- optopt = *place++;
-
- /* See if option letter is one the caller wanted... */
- if (optopt == ':' || (oli = strchr(ostr, optopt)) == NULL) {
- if (*place == 0)
- ++optind;
- if (opterr && *ostr != ':')
- (void)fprintf(stderr,
- "%s: illegal option -- %c\n", _getprogname(),
- optopt);
- return (BADCH);
- }
-
- /* Does this option need an argument? */
- if (oli[1] != ':') {
- /* don't need argument */
- optarg = NULL;
- if (*place == 0)
- ++optind;
- } else {
- /* Option-argument is either the rest of this argument or the
- entire next argument. */
- if (*place)
- optarg = place;
- else if (nargc > ++optind)
- optarg = nargv[optind];
- else {
- /* option-argument absent */
- place = EMSG;
- if (*ostr == ':')
- return (BADARG);
- if (opterr)
- (void)fprintf(stderr,
- "%s: option requires an argument -- %c\n",
- _getprogname(), optopt);
- return (BADCH);
- }
- place = EMSG;
- ++optind;
- }
- return (optopt); /* return option letter */
-}
diff --git a/3rdparty/libuv/samples/socks5-proxy/main.c b/3rdparty/libuv/samples/socks5-proxy/main.c
deleted file mode 100644
index 04020cbd3ad..00000000000
--- a/3rdparty/libuv/samples/socks5-proxy/main.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/* Copyright StrongLoop, Inc. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "defs.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#if HAVE_UNISTD_H
-#include <unistd.h> /* getopt */
-#endif
-
-#define DEFAULT_BIND_HOST "127.0.0.1"
-#define DEFAULT_BIND_PORT 1080
-#define DEFAULT_IDLE_TIMEOUT (60 * 1000)
-
-static void parse_opts(server_config *cf, int argc, char **argv);
-static void usage(void);
-
-static const char *progname = __FILE__; /* Reset in main(). */
-
-int main(int argc, char **argv) {
- server_config config;
- int err;
-
- progname = argv[0];
- memset(&config, 0, sizeof(config));
- config.bind_host = DEFAULT_BIND_HOST;
- config.bind_port = DEFAULT_BIND_PORT;
- config.idle_timeout = DEFAULT_IDLE_TIMEOUT;
- parse_opts(&config, argc, argv);
-
- err = server_run(&config, uv_default_loop());
- if (err) {
- exit(1);
- }
-
- return 0;
-}
-
-const char *_getprogname(void) {
- return progname;
-}
-
-static void parse_opts(server_config *cf, int argc, char **argv) {
- int opt;
-
- while (-1 != (opt = getopt(argc, argv, "H:hp:"))) {
- switch (opt) {
- case 'H':
- cf->bind_host = optarg;
- break;
-
- case 'p':
- if (1 != sscanf(optarg, "%hu", &cf->bind_port)) {
- pr_err("bad port number: %s", optarg);
- usage();
- }
- break;
-
- default:
- usage();
- }
- }
-}
-
-static void usage(void) {
- printf("Usage:\n"
- "\n"
- " %s [-b <address> [-h] [-p <port>]\n"
- "\n"
- "Options:\n"
- "\n"
- " -b <hostname|address> Bind to this address or hostname.\n"
- " Default: \"127.0.0.1\"\n"
- " -h Show this help message.\n"
- " -p <port> Bind to this port number. Default: 1080\n"
- "",
- progname);
- exit(1);
-}
diff --git a/3rdparty/libuv/samples/socks5-proxy/s5.c b/3rdparty/libuv/samples/socks5-proxy/s5.c
deleted file mode 100644
index 4f08e345247..00000000000
--- a/3rdparty/libuv/samples/socks5-proxy/s5.c
+++ /dev/null
@@ -1,271 +0,0 @@
-/* Copyright StrongLoop, Inc. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "s5.h"
-#include <errno.h>
-#include <stdint.h>
-#include <stdlib.h> /* abort() */
-#include <string.h> /* memset() */
-
-enum {
- s5_version,
- s5_nmethods,
- s5_methods,
- s5_auth_pw_version,
- s5_auth_pw_userlen,
- s5_auth_pw_username,
- s5_auth_pw_passlen,
- s5_auth_pw_password,
- s5_req_version,
- s5_req_cmd,
- s5_req_reserved,
- s5_req_atyp,
- s5_req_atyp_host,
- s5_req_daddr,
- s5_req_dport0,
- s5_req_dport1,
- s5_dead
-};
-
-void s5_init(s5_ctx *cx) {
- memset(cx, 0, sizeof(*cx));
- cx->state = s5_version;
-}
-
-s5_err s5_parse(s5_ctx *cx, uint8_t **data, size_t *size) {
- s5_err err;
- uint8_t *p;
- uint8_t c;
- size_t i;
- size_t n;
-
- p = *data;
- n = *size;
- i = 0;
-
- while (i < n) {
- c = p[i];
- i += 1;
- switch (cx->state) {
- case s5_version:
- if (c != 5) {
- err = s5_bad_version;
- goto out;
- }
- cx->state = s5_nmethods;
- break;
-
- case s5_nmethods:
- cx->arg0 = 0;
- cx->arg1 = c; /* Number of bytes to read. */
- cx->state = s5_methods;
- break;
-
- case s5_methods:
- if (cx->arg0 < cx->arg1) {
- switch (c) {
- case 0:
- cx->methods |= S5_AUTH_NONE;
- break;
- case 1:
- cx->methods |= S5_AUTH_GSSAPI;
- break;
- case 2:
- cx->methods |= S5_AUTH_PASSWD;
- break;
- /* Ignore everything we don't understand. */
- }
- cx->arg0 += 1;
- }
- if (cx->arg0 == cx->arg1) {
- err = s5_auth_select;
- goto out;
- }
- break;
-
- case s5_auth_pw_version:
- if (c != 1) {
- err = s5_bad_version;
- goto out;
- }
- cx->state = s5_auth_pw_userlen;
- break;
-
- case s5_auth_pw_userlen:
- cx->arg0 = 0;
- cx->userlen = c;
- cx->state = s5_auth_pw_username;
- break;
-
- case s5_auth_pw_username:
- if (cx->arg0 < cx->userlen) {
- cx->username[cx->arg0] = c;
- cx->arg0 += 1;
- }
- if (cx->arg0 == cx->userlen) {
- cx->username[cx->userlen] = '\0';
- cx->state = s5_auth_pw_passlen;
- }
- break;
-
- case s5_auth_pw_passlen:
- cx->arg0 = 0;
- cx->passlen = c;
- cx->state = s5_auth_pw_password;
- break;
-
- case s5_auth_pw_password:
- if (cx->arg0 < cx->passlen) {
- cx->password[cx->arg0] = c;
- cx->arg0 += 1;
- }
- if (cx->arg0 == cx->passlen) {
- cx->password[cx->passlen] = '\0';
- cx->state = s5_req_version;
- err = s5_auth_verify;
- goto out;
- }
- break;
-
- case s5_req_version:
- if (c != 5) {
- err = s5_bad_version;
- goto out;
- }
- cx->state = s5_req_cmd;
- break;
-
- case s5_req_cmd:
- switch (c) {
- case 1: /* TCP connect */
- cx->cmd = s5_cmd_tcp_connect;
- break;
- case 3: /* UDP associate */
- cx->cmd = s5_cmd_udp_assoc;
- break;
- default:
- err = s5_bad_cmd;
- goto out;
- }
- cx->state = s5_req_reserved;
- break;
-
- case s5_req_reserved:
- cx->state = s5_req_atyp;
- break;
-
- case s5_req_atyp:
- cx->arg0 = 0;
- switch (c) {
- case 1: /* IPv4, four octets. */
- cx->state = s5_req_daddr;
- cx->atyp = s5_atyp_ipv4;
- cx->arg1 = 4;
- break;
- case 3: /* Hostname. First byte is length. */
- cx->state = s5_req_atyp_host;
- cx->atyp = s5_atyp_host;
- cx->arg1 = 0;
- break;
- case 4: /* IPv6, sixteen octets. */
- cx->state = s5_req_daddr;
- cx->atyp = s5_atyp_ipv6;
- cx->arg1 = 16;
- break;
- default:
- err = s5_bad_atyp;
- goto out;
- }
- break;
-
- case s5_req_atyp_host:
- cx->arg1 = c;
- cx->state = s5_req_daddr;
- break;
-
- case s5_req_daddr:
- if (cx->arg0 < cx->arg1) {
- cx->daddr[cx->arg0] = c;
- cx->arg0 += 1;
- }
- if (cx->arg0 == cx->arg1) {
- cx->daddr[cx->arg1] = '\0';
- cx->state = s5_req_dport0;
- }
- break;
-
- case s5_req_dport0:
- cx->dport = c << 8;
- cx->state = s5_req_dport1;
- break;
-
- case s5_req_dport1:
- cx->dport |= c;
- cx->state = s5_dead;
- err = s5_exec_cmd;
- goto out;
-
- case s5_dead:
- break;
-
- default:
- abort();
- }
- }
- err = s5_ok;
-
-out:
- *data = p + i;
- *size = n - i;
- return err;
-}
-
-unsigned int s5_auth_methods(const s5_ctx *cx) {
- return cx->methods;
-}
-
-int s5_select_auth(s5_ctx *cx, s5_auth_method method) {
- int err;
-
- err = 0;
- switch (method) {
- case S5_AUTH_NONE:
- cx->state = s5_req_version;
- break;
- case S5_AUTH_PASSWD:
- cx->state = s5_auth_pw_version;
- break;
- default:
- err = -EINVAL;
- }
-
- return err;
-}
-
-const char *s5_strerror(s5_err err) {
-#define S5_ERR_GEN(_, name, errmsg) case s5_ ## name: return errmsg;
- switch (err) {
- S5_ERR_MAP(S5_ERR_GEN)
- default: ; /* Silence s5_max_errors -Wswitch warning. */
- }
-#undef S5_ERR_GEN
- return "Unknown error.";
-}
diff --git a/3rdparty/libuv/samples/socks5-proxy/s5.h b/3rdparty/libuv/samples/socks5-proxy/s5.h
deleted file mode 100644
index 715f322287d..00000000000
--- a/3rdparty/libuv/samples/socks5-proxy/s5.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/* Copyright StrongLoop, Inc. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#ifndef S5_H_
-#define S5_H_
-
-#include <stddef.h>
-#include <stdint.h>
-
-#define S5_ERR_MAP(V) \
- V(-1, bad_version, "Bad protocol version.") \
- V(-2, bad_cmd, "Bad protocol command.") \
- V(-3, bad_atyp, "Bad address type.") \
- V(0, ok, "No error.") \
- V(1, auth_select, "Select authentication method.") \
- V(2, auth_verify, "Verify authentication.") \
- V(3, exec_cmd, "Execute command.") \
-
-typedef enum {
-#define S5_ERR_GEN(code, name, _) s5_ ## name = code,
- S5_ERR_MAP(S5_ERR_GEN)
-#undef S5_ERR_GEN
- s5_max_errors
-} s5_err;
-
-typedef enum {
- S5_AUTH_NONE = 1 << 0,
- S5_AUTH_GSSAPI = 1 << 1,
- S5_AUTH_PASSWD = 1 << 2
-} s5_auth_method;
-
-typedef enum {
- s5_auth_allow,
- s5_auth_deny
-} s5_auth_result;
-
-typedef enum {
- s5_atyp_ipv4,
- s5_atyp_ipv6,
- s5_atyp_host
-} s5_atyp;
-
-typedef enum {
- s5_cmd_tcp_connect,
- s5_cmd_tcp_bind,
- s5_cmd_udp_assoc
-} s5_cmd;
-
-typedef struct {
- uint32_t arg0; /* Scratch space for the state machine. */
- uint32_t arg1; /* Scratch space for the state machine. */
- uint8_t state;
- uint8_t methods;
- uint8_t cmd;
- uint8_t atyp;
- uint8_t userlen;
- uint8_t passlen;
- uint16_t dport;
- uint8_t username[257];
- uint8_t password[257];
- uint8_t daddr[257]; /* TODO(bnoordhuis) Merge with username/password. */
-} s5_ctx;
-
-void s5_init(s5_ctx *ctx);
-
-s5_err s5_parse(s5_ctx *cx, uint8_t **data, size_t *size);
-
-/* Only call after s5_parse() has returned s5_want_auth_method. */
-unsigned int s5_auth_methods(const s5_ctx *cx);
-
-/* Call after s5_parse() has returned s5_want_auth_method. */
-int s5_select_auth(s5_ctx *cx, s5_auth_method method);
-
-const char *s5_strerror(s5_err err);
-
-#endif /* S5_H_ */
diff --git a/3rdparty/libuv/samples/socks5-proxy/server.c b/3rdparty/libuv/samples/socks5-proxy/server.c
deleted file mode 100644
index 3f1ba42c9e1..00000000000
--- a/3rdparty/libuv/samples/socks5-proxy/server.c
+++ /dev/null
@@ -1,241 +0,0 @@
-/* Copyright StrongLoop, Inc. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "defs.h"
-#include <netinet/in.h> /* INET6_ADDRSTRLEN */
-#include <stdlib.h>
-#include <string.h>
-
-#ifndef INET6_ADDRSTRLEN
-# define INET6_ADDRSTRLEN 63
-#endif
-
-typedef struct {
- uv_getaddrinfo_t getaddrinfo_req;
- server_config config;
- server_ctx *servers;
- uv_loop_t *loop;
-} server_state;
-
-static void do_bind(uv_getaddrinfo_t *req, int status, struct addrinfo *ai);
-static void on_connection(uv_stream_t *server, int status);
-
-int server_run(const server_config *cf, uv_loop_t *loop) {
- struct addrinfo hints;
- server_state state;
- int err;
-
- memset(&state, 0, sizeof(state));
- state.servers = NULL;
- state.config = *cf;
- state.loop = loop;
-
- /* Resolve the address of the interface that we should bind to.
- * The getaddrinfo callback starts the server and everything else.
- */
- memset(&hints, 0, sizeof(hints));
- hints.ai_family = AF_UNSPEC;
- hints.ai_socktype = SOCK_STREAM;
- hints.ai_protocol = IPPROTO_TCP;
-
- err = uv_getaddrinfo(loop,
- &state.getaddrinfo_req,
- do_bind,
- cf->bind_host,
- NULL,
- &hints);
- if (err != 0) {
- pr_err("getaddrinfo: %s", uv_strerror(err));
- return err;
- }
-
- /* Start the event loop. Control continues in do_bind(). */
- if (uv_run(loop, UV_RUN_DEFAULT)) {
- abort();
- }
-
- /* Please Valgrind. */
- uv_loop_delete(loop);
- free(state.servers);
- return 0;
-}
-
-/* Bind a server to each address that getaddrinfo() reported. */
-static void do_bind(uv_getaddrinfo_t *req, int status, struct addrinfo *addrs) {
- char addrbuf[INET6_ADDRSTRLEN + 1];
- unsigned int ipv4_naddrs;
- unsigned int ipv6_naddrs;
- server_state *state;
- server_config *cf;
- struct addrinfo *ai;
- const void *addrv;
- const char *what;
- uv_loop_t *loop;
- server_ctx *sx;
- unsigned int n;
- int err;
- union {
- struct sockaddr addr;
- struct sockaddr_in addr4;
- struct sockaddr_in6 addr6;
- } s;
-
- state = CONTAINER_OF(req, server_state, getaddrinfo_req);
- loop = state->loop;
- cf = &state->config;
-
- if (status < 0) {
- pr_err("getaddrinfo(\"%s\"): %s", cf->bind_host, uv_strerror(status));
- uv_freeaddrinfo(addrs);
- return;
- }
-
- ipv4_naddrs = 0;
- ipv6_naddrs = 0;
- for (ai = addrs; ai != NULL; ai = ai->ai_next) {
- if (ai->ai_family == AF_INET) {
- ipv4_naddrs += 1;
- } else if (ai->ai_family == AF_INET6) {
- ipv6_naddrs += 1;
- }
- }
-
- if (ipv4_naddrs == 0 && ipv6_naddrs == 0) {
- pr_err("%s has no IPv4/6 addresses", cf->bind_host);
- uv_freeaddrinfo(addrs);
- return;
- }
-
- state->servers =
- xmalloc((ipv4_naddrs + ipv6_naddrs) * sizeof(state->servers[0]));
-
- n = 0;
- for (ai = addrs; ai != NULL; ai = ai->ai_next) {
- if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6) {
- continue;
- }
-
- if (ai->ai_family == AF_INET) {
- s.addr4 = *(const struct sockaddr_in *) ai->ai_addr;
- s.addr4.sin_port = htons(cf->bind_port);
- addrv = &s.addr4.sin_addr;
- } else if (ai->ai_family == AF_INET6) {
- s.addr6 = *(const struct sockaddr_in6 *) ai->ai_addr;
- s.addr6.sin6_port = htons(cf->bind_port);
- addrv = &s.addr6.sin6_addr;
- } else {
- UNREACHABLE();
- }
-
- if (uv_inet_ntop(s.addr.sa_family, addrv, addrbuf, sizeof(addrbuf))) {
- UNREACHABLE();
- }
-
- sx = state->servers + n;
- sx->loop = loop;
- sx->idle_timeout = state->config.idle_timeout;
- CHECK(0 == uv_tcp_init(loop, &sx->tcp_handle));
-
- what = "uv_tcp_bind";
- err = uv_tcp_bind(&sx->tcp_handle, &s.addr, 0);
- if (err == 0) {
- what = "uv_listen";
- err = uv_listen((uv_stream_t *) &sx->tcp_handle, 128, on_connection);
- }
-
- if (err != 0) {
- pr_err("%s(\"%s:%hu\"): %s",
- what,
- addrbuf,
- cf->bind_port,
- uv_strerror(err));
- while (n > 0) {
- n -= 1;
- uv_close((uv_handle_t *) (state->servers + n), NULL);
- }
- break;
- }
-
- pr_info("listening on %s:%hu", addrbuf, cf->bind_port);
- n += 1;
- }
-
- uv_freeaddrinfo(addrs);
-}
-
-static void on_connection(uv_stream_t *server, int status) {
- server_ctx *sx;
- client_ctx *cx;
-
- CHECK(status == 0);
- sx = CONTAINER_OF(server, server_ctx, tcp_handle);
- cx = xmalloc(sizeof(*cx));
- CHECK(0 == uv_tcp_init(sx->loop, &cx->incoming.handle.tcp));
- CHECK(0 == uv_accept(server, &cx->incoming.handle.stream));
- client_finish_init(sx, cx);
-}
-
-int can_auth_none(const server_ctx *sx, const client_ctx *cx) {
- return 1;
-}
-
-int can_auth_passwd(const server_ctx *sx, const client_ctx *cx) {
- return 0;
-}
-
-int can_access(const server_ctx *sx,
- const client_ctx *cx,
- const struct sockaddr *addr) {
- const struct sockaddr_in6 *addr6;
- const struct sockaddr_in *addr4;
- const uint32_t *p;
- uint32_t a;
- uint32_t b;
- uint32_t c;
- uint32_t d;
-
- /* TODO(bnoordhuis) Implement proper access checks. For now, just reject
- * traffic to localhost.
- */
- if (addr->sa_family == AF_INET) {
- addr4 = (const struct sockaddr_in *) addr;
- d = ntohl(addr4->sin_addr.s_addr);
- return (d >> 24) != 0x7F;
- }
-
- if (addr->sa_family == AF_INET6) {
- addr6 = (const struct sockaddr_in6 *) addr;
- p = (const uint32_t *) &addr6->sin6_addr.s6_addr;
- a = ntohl(p[0]);
- b = ntohl(p[1]);
- c = ntohl(p[2]);
- d = ntohl(p[3]);
- if (a == 0 && b == 0 && c == 0 && d == 1) {
- return 0; /* "::1" style address. */
- }
- if (a == 0 && b == 0 && c == 0xFFFF && (d >> 24) == 0x7F) {
- return 0; /* "::ffff:127.x.x.x" style address. */
- }
- return 1;
- }
-
- return 0;
-}
diff --git a/3rdparty/libuv/samples/socks5-proxy/util.c b/3rdparty/libuv/samples/socks5-proxy/util.c
deleted file mode 100644
index af34f055936..00000000000
--- a/3rdparty/libuv/samples/socks5-proxy/util.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/* Copyright StrongLoop, Inc. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "defs.h"
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-static void pr_do(FILE *stream,
- const char *label,
- const char *fmt,
- va_list ap);
-
-void *xmalloc(size_t size) {
- void *ptr;
-
- ptr = malloc(size);
- if (ptr == NULL) {
- pr_err("out of memory, need %lu bytes", (unsigned long) size);
- exit(1);
- }
-
- return ptr;
-}
-
-void pr_info(const char *fmt, ...) {
- va_list ap;
- va_start(ap, fmt);
- pr_do(stdout, "info", fmt, ap);
- va_end(ap);
-}
-
-void pr_warn(const char *fmt, ...) {
- va_list ap;
- va_start(ap, fmt);
- pr_do(stderr, "warn", fmt, ap);
- va_end(ap);
-}
-
-void pr_err(const char *fmt, ...) {
- va_list ap;
- va_start(ap, fmt);
- pr_do(stderr, "error", fmt, ap);
- va_end(ap);
-}
-
-static void pr_do(FILE *stream,
- const char *label,
- const char *fmt,
- va_list ap) {
- char fmtbuf[1024];
- vsnprintf(fmtbuf, sizeof(fmtbuf), fmt, ap);
- fprintf(stream, "%s:%s: %s\n", _getprogname(), label, fmtbuf);
-}
diff --git a/3rdparty/libuv/src/fs-poll.c b/3rdparty/libuv/src/fs-poll.c
deleted file mode 100644
index 44d47b88ed2..00000000000
--- a/3rdparty/libuv/src/fs-poll.c
+++ /dev/null
@@ -1,255 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "uv-common.h"
-
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-
-struct poll_ctx {
- uv_fs_poll_t* parent_handle; /* NULL if parent has been stopped or closed */
- int busy_polling;
- unsigned int interval;
- uint64_t start_time;
- uv_loop_t* loop;
- uv_fs_poll_cb poll_cb;
- uv_timer_t timer_handle;
- uv_fs_t fs_req; /* TODO(bnoordhuis) mark fs_req internal */
- uv_stat_t statbuf;
- char path[1]; /* variable length */
-};
-
-static int statbuf_eq(const uv_stat_t* a, const uv_stat_t* b);
-static void poll_cb(uv_fs_t* req);
-static void timer_cb(uv_timer_t* timer);
-static void timer_close_cb(uv_handle_t* handle);
-
-static uv_stat_t zero_statbuf;
-
-
-int uv_fs_poll_init(uv_loop_t* loop, uv_fs_poll_t* handle) {
- uv__handle_init(loop, (uv_handle_t*)handle, UV_FS_POLL);
- return 0;
-}
-
-
-int uv_fs_poll_start(uv_fs_poll_t* handle,
- uv_fs_poll_cb cb,
- const char* path,
- unsigned int interval) {
- struct poll_ctx* ctx;
- uv_loop_t* loop;
- size_t len;
- int err;
-
- if (uv__is_active(handle))
- return 0;
-
- loop = handle->loop;
- len = strlen(path);
- ctx = uv__calloc(1, sizeof(*ctx) + len);
-
- if (ctx == NULL)
- return UV_ENOMEM;
-
- ctx->loop = loop;
- ctx->poll_cb = cb;
- ctx->interval = interval ? interval : 1;
- ctx->start_time = uv_now(loop);
- ctx->parent_handle = handle;
- memcpy(ctx->path, path, len + 1);
-
- err = uv_timer_init(loop, &ctx->timer_handle);
- if (err < 0)
- goto error;
-
- ctx->timer_handle.flags |= UV__HANDLE_INTERNAL;
- uv__handle_unref(&ctx->timer_handle);
-
- err = uv_fs_stat(loop, &ctx->fs_req, ctx->path, poll_cb);
- if (err < 0)
- goto error;
-
- handle->poll_ctx = ctx;
- uv__handle_start(handle);
-
- return 0;
-
-error:
- uv__free(ctx);
- return err;
-}
-
-
-int uv_fs_poll_stop(uv_fs_poll_t* handle) {
- struct poll_ctx* ctx;
-
- if (!uv__is_active(handle))
- return 0;
-
- ctx = handle->poll_ctx;
- assert(ctx != NULL);
- assert(ctx->parent_handle != NULL);
- ctx->parent_handle = NULL;
- handle->poll_ctx = NULL;
-
- /* Close the timer if it's active. If it's inactive, there's a stat request
- * in progress and poll_cb will take care of the cleanup.
- */
- if (uv__is_active(&ctx->timer_handle))
- uv_close((uv_handle_t*)&ctx->timer_handle, timer_close_cb);
-
- uv__handle_stop(handle);
-
- return 0;
-}
-
-
-int uv_fs_poll_getpath(uv_fs_poll_t* handle, char* buffer, size_t* size) {
- struct poll_ctx* ctx;
- size_t required_len;
-
- if (!uv__is_active(handle)) {
- *size = 0;
- return UV_EINVAL;
- }
-
- ctx = handle->poll_ctx;
- assert(ctx != NULL);
-
- required_len = strlen(ctx->path);
- if (required_len > *size) {
- *size = required_len;
- return UV_ENOBUFS;
- }
-
- memcpy(buffer, ctx->path, required_len);
- *size = required_len;
-
- return 0;
-}
-
-
-void uv__fs_poll_close(uv_fs_poll_t* handle) {
- uv_fs_poll_stop(handle);
-}
-
-
-static void timer_cb(uv_timer_t* timer) {
- struct poll_ctx* ctx;
-
- ctx = container_of(timer, struct poll_ctx, timer_handle);
- assert(ctx->parent_handle != NULL);
- assert(ctx->parent_handle->poll_ctx == ctx);
- ctx->start_time = uv_now(ctx->loop);
-
- if (uv_fs_stat(ctx->loop, &ctx->fs_req, ctx->path, poll_cb))
- abort();
-}
-
-
-static void poll_cb(uv_fs_t* req) {
- uv_stat_t* statbuf;
- struct poll_ctx* ctx;
- uint64_t interval;
-
- ctx = container_of(req, struct poll_ctx, fs_req);
-
- if (ctx->parent_handle == NULL) { /* handle has been stopped or closed */
- uv_close((uv_handle_t*)&ctx->timer_handle, timer_close_cb);
- uv_fs_req_cleanup(req);
- return;
- }
-
- if (req->result != 0) {
- if (ctx->busy_polling != req->result) {
- ctx->poll_cb(ctx->parent_handle,
- req->result,
- &ctx->statbuf,
- &zero_statbuf);
- ctx->busy_polling = req->result;
- }
- goto out;
- }
-
- statbuf = &req->statbuf;
-
- if (ctx->busy_polling != 0)
- if (ctx->busy_polling < 0 || !statbuf_eq(&ctx->statbuf, statbuf))
- ctx->poll_cb(ctx->parent_handle, 0, &ctx->statbuf, statbuf);
-
- ctx->statbuf = *statbuf;
- ctx->busy_polling = 1;
-
-out:
- uv_fs_req_cleanup(req);
-
- if (ctx->parent_handle == NULL) { /* handle has been stopped by callback */
- uv_close((uv_handle_t*)&ctx->timer_handle, timer_close_cb);
- return;
- }
-
- /* Reschedule timer, subtract the delay from doing the stat(). */
- interval = ctx->interval;
- interval -= (uv_now(ctx->loop) - ctx->start_time) % interval;
-
- if (uv_timer_start(&ctx->timer_handle, timer_cb, interval, 0))
- abort();
-}
-
-
-static void timer_close_cb(uv_handle_t* handle) {
- uv__free(container_of(handle, struct poll_ctx, timer_handle));
-}
-
-
-static int statbuf_eq(const uv_stat_t* a, const uv_stat_t* b) {
- return a->st_ctim.tv_nsec == b->st_ctim.tv_nsec
- && a->st_mtim.tv_nsec == b->st_mtim.tv_nsec
- && a->st_birthtim.tv_nsec == b->st_birthtim.tv_nsec
- && a->st_ctim.tv_sec == b->st_ctim.tv_sec
- && a->st_mtim.tv_sec == b->st_mtim.tv_sec
- && a->st_birthtim.tv_sec == b->st_birthtim.tv_sec
- && a->st_size == b->st_size
- && a->st_mode == b->st_mode
- && a->st_uid == b->st_uid
- && a->st_gid == b->st_gid
- && a->st_ino == b->st_ino
- && a->st_dev == b->st_dev
- && a->st_flags == b->st_flags
- && a->st_gen == b->st_gen;
-}
-
-
-#if defined(_WIN32)
-
-#include "win/internal.h"
-#include "win/handle-inl.h"
-
-void uv__fs_poll_endgame(uv_loop_t* loop, uv_fs_poll_t* handle) {
- assert(handle->flags & UV__HANDLE_CLOSING);
- assert(!(handle->flags & UV_HANDLE_CLOSED));
- uv__handle_close(handle);
-}
-
-#endif /* _WIN32 */
diff --git a/3rdparty/libuv/src/heap-inl.h b/3rdparty/libuv/src/heap-inl.h
deleted file mode 100644
index 1e2ed60e094..00000000000
--- a/3rdparty/libuv/src/heap-inl.h
+++ /dev/null
@@ -1,245 +0,0 @@
-/* Copyright (c) 2013, Ben Noordhuis <info@bnoordhuis.nl>
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifndef UV_SRC_HEAP_H_
-#define UV_SRC_HEAP_H_
-
-#include <stddef.h> /* NULL */
-
-#if defined(__GNUC__)
-# define HEAP_EXPORT(declaration) __attribute__((unused)) static declaration
-#else
-# define HEAP_EXPORT(declaration) static declaration
-#endif
-
-struct heap_node {
- struct heap_node* left;
- struct heap_node* right;
- struct heap_node* parent;
-};
-
-/* A binary min heap. The usual properties hold: the root is the lowest
- * element in the set, the height of the tree is at most log2(nodes) and
- * it's always a complete binary tree.
- *
- * The heap function try hard to detect corrupted tree nodes at the cost
- * of a minor reduction in performance. Compile with -DNDEBUG to disable.
- */
-struct heap {
- struct heap_node* min;
- unsigned int nelts;
-};
-
-/* Return non-zero if a < b. */
-typedef int (*heap_compare_fn)(const struct heap_node* a,
- const struct heap_node* b);
-
-/* Public functions. */
-HEAP_EXPORT(void heap_init(struct heap* heap));
-HEAP_EXPORT(struct heap_node* heap_min(const struct heap* heap));
-HEAP_EXPORT(void heap_insert(struct heap* heap,
- struct heap_node* newnode,
- heap_compare_fn less_than));
-HEAP_EXPORT(void heap_remove(struct heap* heap,
- struct heap_node* node,
- heap_compare_fn less_than));
-HEAP_EXPORT(void heap_dequeue(struct heap* heap, heap_compare_fn less_than));
-
-/* Implementation follows. */
-
-HEAP_EXPORT(void heap_init(struct heap* heap)) {
- heap->min = NULL;
- heap->nelts = 0;
-}
-
-HEAP_EXPORT(struct heap_node* heap_min(const struct heap* heap)) {
- return heap->min;
-}
-
-/* Swap parent with child. Child moves closer to the root, parent moves away. */
-static void heap_node_swap(struct heap* heap,
- struct heap_node* parent,
- struct heap_node* child) {
- struct heap_node* sibling;
- struct heap_node t;
-
- t = *parent;
- *parent = *child;
- *child = t;
-
- parent->parent = child;
- if (child->left == child) {
- child->left = parent;
- sibling = child->right;
- } else {
- child->right = parent;
- sibling = child->left;
- }
- if (sibling != NULL)
- sibling->parent = child;
-
- if (parent->left != NULL)
- parent->left->parent = parent;
- if (parent->right != NULL)
- parent->right->parent = parent;
-
- if (child->parent == NULL)
- heap->min = child;
- else if (child->parent->left == parent)
- child->parent->left = child;
- else
- child->parent->right = child;
-}
-
-HEAP_EXPORT(void heap_insert(struct heap* heap,
- struct heap_node* newnode,
- heap_compare_fn less_than)) {
- struct heap_node** parent;
- struct heap_node** child;
- unsigned int path;
- unsigned int n;
- unsigned int k;
-
- newnode->left = NULL;
- newnode->right = NULL;
- newnode->parent = NULL;
-
- /* Calculate the path from the root to the insertion point. This is a min
- * heap so we always insert at the left-most free node of the bottom row.
- */
- path = 0;
- for (k = 0, n = 1 + heap->nelts; n >= 2; k += 1, n /= 2)
- path = (path << 1) | (n & 1);
-
- /* Now traverse the heap using the path we calculated in the previous step. */
- parent = child = &heap->min;
- while (k > 0) {
- parent = child;
- if (path & 1)
- child = &(*child)->right;
- else
- child = &(*child)->left;
- path >>= 1;
- k -= 1;
- }
-
- /* Insert the new node. */
- newnode->parent = *parent;
- *child = newnode;
- heap->nelts += 1;
-
- /* Walk up the tree and check at each node if the heap property holds.
- * It's a min heap so parent < child must be true.
- */
- while (newnode->parent != NULL && less_than(newnode, newnode->parent))
- heap_node_swap(heap, newnode->parent, newnode);
-}
-
-HEAP_EXPORT(void heap_remove(struct heap* heap,
- struct heap_node* node,
- heap_compare_fn less_than)) {
- struct heap_node* smallest;
- struct heap_node** max;
- struct heap_node* child;
- unsigned int path;
- unsigned int k;
- unsigned int n;
-
- if (heap->nelts == 0)
- return;
-
- /* Calculate the path from the min (the root) to the max, the left-most node
- * of the bottom row.
- */
- path = 0;
- for (k = 0, n = heap->nelts; n >= 2; k += 1, n /= 2)
- path = (path << 1) | (n & 1);
-
- /* Now traverse the heap using the path we calculated in the previous step. */
- max = &heap->min;
- while (k > 0) {
- if (path & 1)
- max = &(*max)->right;
- else
- max = &(*max)->left;
- path >>= 1;
- k -= 1;
- }
-
- heap->nelts -= 1;
-
- /* Unlink the max node. */
- child = *max;
- *max = NULL;
-
- if (child == node) {
- /* We're removing either the max or the last node in the tree. */
- if (child == heap->min) {
- heap->min = NULL;
- }
- return;
- }
-
- /* Replace the to be deleted node with the max node. */
- child->left = node->left;
- child->right = node->right;
- child->parent = node->parent;
-
- if (child->left != NULL) {
- child->left->parent = child;
- }
-
- if (child->right != NULL) {
- child->right->parent = child;
- }
-
- if (node->parent == NULL) {
- heap->min = child;
- } else if (node->parent->left == node) {
- node->parent->left = child;
- } else {
- node->parent->right = child;
- }
-
- /* Walk down the subtree and check at each node if the heap property holds.
- * It's a min heap so parent < child must be true. If the parent is bigger,
- * swap it with the smallest child.
- */
- for (;;) {
- smallest = child;
- if (child->left != NULL && less_than(child->left, smallest))
- smallest = child->left;
- if (child->right != NULL && less_than(child->right, smallest))
- smallest = child->right;
- if (smallest == child)
- break;
- heap_node_swap(heap, child, smallest);
- }
-
- /* Walk up the subtree and check that each parent is less than the node
- * this is required, because `max` node is not guaranteed to be the
- * actual maximum in tree
- */
- while (child->parent != NULL && less_than(child, child->parent))
- heap_node_swap(heap, child->parent, child);
-}
-
-HEAP_EXPORT(void heap_dequeue(struct heap* heap, heap_compare_fn less_than)) {
- heap_remove(heap, heap->min, less_than);
-}
-
-#undef HEAP_EXPORT
-
-#endif /* UV_SRC_HEAP_H_ */
diff --git a/3rdparty/libuv/src/inet.c b/3rdparty/libuv/src/inet.c
deleted file mode 100644
index da63a688c4e..00000000000
--- a/3rdparty/libuv/src/inet.c
+++ /dev/null
@@ -1,309 +0,0 @@
-/*
- * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
- * Copyright (c) 1996-1999 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
- * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-
-#if defined(_MSC_VER) && _MSC_VER < 1600
-# include "stdint-msvc2008.h"
-#else
-# include <stdint.h>
-#endif
-
-#include "uv.h"
-#include "uv-common.h"
-
-#define UV__INET_ADDRSTRLEN 16
-#define UV__INET6_ADDRSTRLEN 46
-
-
-static int inet_ntop4(const unsigned char *src, char *dst, size_t size);
-static int inet_ntop6(const unsigned char *src, char *dst, size_t size);
-static int inet_pton4(const char *src, unsigned char *dst);
-static int inet_pton6(const char *src, unsigned char *dst);
-
-
-int uv_inet_ntop(int af, const void* src, char* dst, size_t size) {
- switch (af) {
- case AF_INET:
- return (inet_ntop4(src, dst, size));
- case AF_INET6:
- return (inet_ntop6(src, dst, size));
- default:
- return UV_EAFNOSUPPORT;
- }
- /* NOTREACHED */
-}
-
-
-static int inet_ntop4(const unsigned char *src, char *dst, size_t size) {
- static const char fmt[] = "%u.%u.%u.%u";
- char tmp[UV__INET_ADDRSTRLEN];
- int l;
-
- l = snprintf(tmp, sizeof(tmp), fmt, src[0], src[1], src[2], src[3]);
- if (l <= 0 || (size_t) l >= size) {
- return UV_ENOSPC;
- }
- strncpy(dst, tmp, size);
- dst[size - 1] = '\0';
- return 0;
-}
-
-
-static int inet_ntop6(const unsigned char *src, char *dst, size_t size) {
- /*
- * Note that int32_t and int16_t need only be "at least" large enough
- * to contain a value of the specified size. On some systems, like
- * Crays, there is no such thing as an integer variable with 16 bits.
- * Keep this in mind if you think this function should have been coded
- * to use pointer overlays. All the world's not a VAX.
- */
- char tmp[UV__INET6_ADDRSTRLEN], *tp;
- struct { int base, len; } best, cur;
- unsigned int words[sizeof(struct in6_addr) / sizeof(uint16_t)];
- int i;
-
- /*
- * Preprocess:
- * Copy the input (bytewise) array into a wordwise array.
- * Find the longest run of 0x00's in src[] for :: shorthanding.
- */
- memset(words, '\0', sizeof words);
- for (i = 0; i < (int) sizeof(struct in6_addr); i++)
- words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3));
- best.base = -1;
- best.len = 0;
- cur.base = -1;
- cur.len = 0;
- for (i = 0; i < (int) ARRAY_SIZE(words); i++) {
- if (words[i] == 0) {
- if (cur.base == -1)
- cur.base = i, cur.len = 1;
- else
- cur.len++;
- } else {
- if (cur.base != -1) {
- if (best.base == -1 || cur.len > best.len)
- best = cur;
- cur.base = -1;
- }
- }
- }
- if (cur.base != -1) {
- if (best.base == -1 || cur.len > best.len)
- best = cur;
- }
- if (best.base != -1 && best.len < 2)
- best.base = -1;
-
- /*
- * Format the result.
- */
- tp = tmp;
- for (i = 0; i < (int) ARRAY_SIZE(words); i++) {
- /* Are we inside the best run of 0x00's? */
- if (best.base != -1 && i >= best.base &&
- i < (best.base + best.len)) {
- if (i == best.base)
- *tp++ = ':';
- continue;
- }
- /* Are we following an initial run of 0x00s or any real hex? */
- if (i != 0)
- *tp++ = ':';
- /* Is this address an encapsulated IPv4? */
- if (i == 6 && best.base == 0 && (best.len == 6 ||
- (best.len == 7 && words[7] != 0x0001) ||
- (best.len == 5 && words[5] == 0xffff))) {
- int err = inet_ntop4(src+12, tp, sizeof tmp - (tp - tmp));
- if (err)
- return err;
- tp += strlen(tp);
- break;
- }
- tp += sprintf(tp, "%x", words[i]);
- }
- /* Was it a trailing run of 0x00's? */
- if (best.base != -1 && (best.base + best.len) == ARRAY_SIZE(words))
- *tp++ = ':';
- *tp++ = '\0';
-
- /*
- * Check for overflow, copy, and we're done.
- */
- if ((size_t)(tp - tmp) > size) {
- return UV_ENOSPC;
- }
- strcpy(dst, tmp);
- return 0;
-}
-
-
-int uv_inet_pton(int af, const char* src, void* dst) {
- if (src == NULL || dst == NULL)
- return UV_EINVAL;
-
- switch (af) {
- case AF_INET:
- return (inet_pton4(src, dst));
- case AF_INET6: {
- int len;
- char tmp[UV__INET6_ADDRSTRLEN], *s, *p;
- s = (char*) src;
- p = strchr(src, '%');
- if (p != NULL) {
- s = tmp;
- len = p - src;
- if (len > UV__INET6_ADDRSTRLEN-1)
- return UV_EINVAL;
- memcpy(s, src, len);
- s[len] = '\0';
- }
- return inet_pton6(s, dst);
- }
- default:
- return UV_EAFNOSUPPORT;
- }
- /* NOTREACHED */
-}
-
-
-static int inet_pton4(const char *src, unsigned char *dst) {
- static const char digits[] = "0123456789";
- int saw_digit, octets, ch;
- unsigned char tmp[sizeof(struct in_addr)], *tp;
-
- saw_digit = 0;
- octets = 0;
- *(tp = tmp) = 0;
- while ((ch = *src++) != '\0') {
- const char *pch;
-
- if ((pch = strchr(digits, ch)) != NULL) {
- unsigned int nw = *tp * 10 + (pch - digits);
-
- if (saw_digit && *tp == 0)
- return UV_EINVAL;
- if (nw > 255)
- return UV_EINVAL;
- *tp = nw;
- if (!saw_digit) {
- if (++octets > 4)
- return UV_EINVAL;
- saw_digit = 1;
- }
- } else if (ch == '.' && saw_digit) {
- if (octets == 4)
- return UV_EINVAL;
- *++tp = 0;
- saw_digit = 0;
- } else
- return UV_EINVAL;
- }
- if (octets < 4)
- return UV_EINVAL;
- memcpy(dst, tmp, sizeof(struct in_addr));
- return 0;
-}
-
-
-static int inet_pton6(const char *src, unsigned char *dst) {
- static const char xdigits_l[] = "0123456789abcdef",
- xdigits_u[] = "0123456789ABCDEF";
- unsigned char tmp[sizeof(struct in6_addr)], *tp, *endp, *colonp;
- const char *xdigits, *curtok;
- int ch, seen_xdigits;
- unsigned int val;
-
- memset((tp = tmp), '\0', sizeof tmp);
- endp = tp + sizeof tmp;
- colonp = NULL;
- /* Leading :: requires some special handling. */
- if (*src == ':')
- if (*++src != ':')
- return UV_EINVAL;
- curtok = src;
- seen_xdigits = 0;
- val = 0;
- while ((ch = *src++) != '\0') {
- const char *pch;
-
- if ((pch = strchr((xdigits = xdigits_l), ch)) == NULL)
- pch = strchr((xdigits = xdigits_u), ch);
- if (pch != NULL) {
- val <<= 4;
- val |= (pch - xdigits);
- if (++seen_xdigits > 4)
- return UV_EINVAL;
- continue;
- }
- if (ch == ':') {
- curtok = src;
- if (!seen_xdigits) {
- if (colonp)
- return UV_EINVAL;
- colonp = tp;
- continue;
- } else if (*src == '\0') {
- return UV_EINVAL;
- }
- if (tp + sizeof(uint16_t) > endp)
- return UV_EINVAL;
- *tp++ = (unsigned char) (val >> 8) & 0xff;
- *tp++ = (unsigned char) val & 0xff;
- seen_xdigits = 0;
- val = 0;
- continue;
- }
- if (ch == '.' && ((tp + sizeof(struct in_addr)) <= endp)) {
- int err = inet_pton4(curtok, tp);
- if (err == 0) {
- tp += sizeof(struct in_addr);
- seen_xdigits = 0;
- break; /*%< '\\0' was seen by inet_pton4(). */
- }
- }
- return UV_EINVAL;
- }
- if (seen_xdigits) {
- if (tp + sizeof(uint16_t) > endp)
- return UV_EINVAL;
- *tp++ = (unsigned char) (val >> 8) & 0xff;
- *tp++ = (unsigned char) val & 0xff;
- }
- if (colonp != NULL) {
- /*
- * Since some memmove()'s erroneously fail to handle
- * overlapping regions, we'll do the shift by hand.
- */
- const int n = tp - colonp;
- int i;
-
- if (tp == endp)
- return UV_EINVAL;
- for (i = 1; i <= n; i++) {
- endp[- i] = colonp[n - i];
- colonp[n - i] = 0;
- }
- tp = endp;
- }
- if (tp != endp)
- return UV_EINVAL;
- memcpy(dst, tmp, sizeof tmp);
- return 0;
-}
diff --git a/3rdparty/libuv/src/queue.h b/3rdparty/libuv/src/queue.h
deleted file mode 100644
index ff3540a0a51..00000000000
--- a/3rdparty/libuv/src/queue.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/* Copyright (c) 2013, Ben Noordhuis <info@bnoordhuis.nl>
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifndef QUEUE_H_
-#define QUEUE_H_
-
-#include <stddef.h>
-
-typedef void *QUEUE[2];
-
-/* Private macros. */
-#define QUEUE_NEXT(q) (*(QUEUE **) &((*(q))[0]))
-#define QUEUE_PREV(q) (*(QUEUE **) &((*(q))[1]))
-#define QUEUE_PREV_NEXT(q) (QUEUE_NEXT(QUEUE_PREV(q)))
-#define QUEUE_NEXT_PREV(q) (QUEUE_PREV(QUEUE_NEXT(q)))
-
-/* Public macros. */
-#define QUEUE_DATA(ptr, type, field) \
- ((type *) ((char *) (ptr) - offsetof(type, field)))
-
-/* Important note: mutating the list while QUEUE_FOREACH is
- * iterating over its elements results in undefined behavior.
- */
-#define QUEUE_FOREACH(q, h) \
- for ((q) = QUEUE_NEXT(h); (q) != (h); (q) = QUEUE_NEXT(q))
-
-#define QUEUE_EMPTY(q) \
- ((const QUEUE *) (q) == (const QUEUE *) QUEUE_NEXT(q))
-
-#define QUEUE_HEAD(q) \
- (QUEUE_NEXT(q))
-
-#define QUEUE_INIT(q) \
- do { \
- QUEUE_NEXT(q) = (q); \
- QUEUE_PREV(q) = (q); \
- } \
- while (0)
-
-#define QUEUE_ADD(h, n) \
- do { \
- QUEUE_PREV_NEXT(h) = QUEUE_NEXT(n); \
- QUEUE_NEXT_PREV(n) = QUEUE_PREV(h); \
- QUEUE_PREV(h) = QUEUE_PREV(n); \
- QUEUE_PREV_NEXT(h) = (h); \
- } \
- while (0)
-
-#define QUEUE_SPLIT(h, q, n) \
- do { \
- QUEUE_PREV(n) = QUEUE_PREV(h); \
- QUEUE_PREV_NEXT(n) = (n); \
- QUEUE_NEXT(n) = (q); \
- QUEUE_PREV(h) = QUEUE_PREV(q); \
- QUEUE_PREV_NEXT(h) = (h); \
- QUEUE_PREV(q) = (n); \
- } \
- while (0)
-
-#define QUEUE_MOVE(h, n) \
- do { \
- if (QUEUE_EMPTY(h)) \
- QUEUE_INIT(n); \
- else { \
- QUEUE* q = QUEUE_HEAD(h); \
- QUEUE_SPLIT(h, q, n); \
- } \
- } \
- while (0)
-
-#define QUEUE_INSERT_HEAD(h, q) \
- do { \
- QUEUE_NEXT(q) = QUEUE_NEXT(h); \
- QUEUE_PREV(q) = (h); \
- QUEUE_NEXT_PREV(q) = (q); \
- QUEUE_NEXT(h) = (q); \
- } \
- while (0)
-
-#define QUEUE_INSERT_TAIL(h, q) \
- do { \
- QUEUE_NEXT(q) = (h); \
- QUEUE_PREV(q) = QUEUE_PREV(h); \
- QUEUE_PREV_NEXT(q) = (q); \
- QUEUE_PREV(h) = (q); \
- } \
- while (0)
-
-#define QUEUE_REMOVE(q) \
- do { \
- QUEUE_PREV_NEXT(q) = QUEUE_NEXT(q); \
- QUEUE_NEXT_PREV(q) = QUEUE_PREV(q); \
- } \
- while (0)
-
-#endif /* QUEUE_H_ */
diff --git a/3rdparty/libuv/src/threadpool.c b/3rdparty/libuv/src/threadpool.c
deleted file mode 100644
index 2c5152b4200..00000000000
--- a/3rdparty/libuv/src/threadpool.c
+++ /dev/null
@@ -1,303 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv-common.h"
-
-#if !defined(_WIN32)
-# include "unix/internal.h"
-#else
-# include "win/req-inl.h"
-/* TODO(saghul): unify internal req functions */
-static void uv__req_init(uv_loop_t* loop,
- uv_req_t* req,
- uv_req_type type) {
- uv_req_init(loop, req);
- req->type = type;
- uv__req_register(loop, req);
-}
-# define uv__req_init(loop, req, type) \
- uv__req_init((loop), (uv_req_t*)(req), (type))
-#endif
-
-#include <stdlib.h>
-
-#define MAX_THREADPOOL_SIZE 128
-
-static uv_once_t once = UV_ONCE_INIT;
-static uv_cond_t cond;
-static uv_mutex_t mutex;
-static unsigned int idle_threads;
-static unsigned int nthreads;
-static uv_thread_t* threads;
-static uv_thread_t default_threads[4];
-static QUEUE exit_message;
-static QUEUE wq;
-static volatile int initialized;
-
-
-static void uv__cancelled(struct uv__work* w) {
- abort();
-}
-
-
-/* To avoid deadlock with uv_cancel() it's crucial that the worker
- * never holds the global mutex and the loop-local mutex at the same time.
- */
-static void worker(void* arg) {
- struct uv__work* w;
- QUEUE* q;
-
- (void) arg;
-
- for (;;) {
- uv_mutex_lock(&mutex);
-
- while (QUEUE_EMPTY(&wq)) {
- idle_threads += 1;
- uv_cond_wait(&cond, &mutex);
- idle_threads -= 1;
- }
-
- q = QUEUE_HEAD(&wq);
-
- if (q == &exit_message)
- uv_cond_signal(&cond);
- else {
- QUEUE_REMOVE(q);
- QUEUE_INIT(q); /* Signal uv_cancel() that the work req is
- executing. */
- }
-
- uv_mutex_unlock(&mutex);
-
- if (q == &exit_message)
- break;
-
- w = QUEUE_DATA(q, struct uv__work, wq);
- w->work(w);
-
- uv_mutex_lock(&w->loop->wq_mutex);
- w->work = NULL; /* Signal uv_cancel() that the work req is done
- executing. */
- QUEUE_INSERT_TAIL(&w->loop->wq, &w->wq);
- uv_async_send(&w->loop->wq_async);
- uv_mutex_unlock(&w->loop->wq_mutex);
- }
-}
-
-
-static void post(QUEUE* q) {
- uv_mutex_lock(&mutex);
- QUEUE_INSERT_TAIL(&wq, q);
- if (idle_threads > 0)
- uv_cond_signal(&cond);
- uv_mutex_unlock(&mutex);
-}
-
-
-#ifndef _WIN32
-UV_DESTRUCTOR(static void cleanup(void)) {
- unsigned int i;
-
- if (initialized == 0)
- return;
-
- post(&exit_message);
-
- for (i = 0; i < nthreads; i++)
- if (uv_thread_join(threads + i))
- abort();
-
- if (threads != default_threads)
- uv__free(threads);
-
- uv_mutex_destroy(&mutex);
- uv_cond_destroy(&cond);
-
- threads = NULL;
- nthreads = 0;
- initialized = 0;
-}
-#endif
-
-
-static void init_once(void) {
- unsigned int i;
- const char* val;
-
- nthreads = ARRAY_SIZE(default_threads);
- val = getenv("UV_THREADPOOL_SIZE");
- if (val != NULL)
- nthreads = atoi(val);
- if (nthreads == 0)
- nthreads = 1;
- if (nthreads > MAX_THREADPOOL_SIZE)
- nthreads = MAX_THREADPOOL_SIZE;
-
- threads = default_threads;
- if (nthreads > ARRAY_SIZE(default_threads)) {
- threads = uv__malloc(nthreads * sizeof(threads[0]));
- if (threads == NULL) {
- nthreads = ARRAY_SIZE(default_threads);
- threads = default_threads;
- }
- }
-
- if (uv_cond_init(&cond))
- abort();
-
- if (uv_mutex_init(&mutex))
- abort();
-
- QUEUE_INIT(&wq);
-
- for (i = 0; i < nthreads; i++)
- if (uv_thread_create(threads + i, worker, NULL))
- abort();
-
- initialized = 1;
-}
-
-
-void uv__work_submit(uv_loop_t* loop,
- struct uv__work* w,
- void (*work)(struct uv__work* w),
- void (*done)(struct uv__work* w, int status)) {
- uv_once(&once, init_once);
- w->loop = loop;
- w->work = work;
- w->done = done;
- post(&w->wq);
-}
-
-
-static int uv__work_cancel(uv_loop_t* loop, uv_req_t* req, struct uv__work* w) {
- int cancelled;
-
- uv_mutex_lock(&mutex);
- uv_mutex_lock(&w->loop->wq_mutex);
-
- cancelled = !QUEUE_EMPTY(&w->wq) && w->work != NULL;
- if (cancelled)
- QUEUE_REMOVE(&w->wq);
-
- uv_mutex_unlock(&w->loop->wq_mutex);
- uv_mutex_unlock(&mutex);
-
- if (!cancelled)
- return UV_EBUSY;
-
- w->work = uv__cancelled;
- uv_mutex_lock(&loop->wq_mutex);
- QUEUE_INSERT_TAIL(&loop->wq, &w->wq);
- uv_async_send(&loop->wq_async);
- uv_mutex_unlock(&loop->wq_mutex);
-
- return 0;
-}
-
-
-void uv__work_done(uv_async_t* handle) {
- struct uv__work* w;
- uv_loop_t* loop;
- QUEUE* q;
- QUEUE wq;
- int err;
-
- loop = container_of(handle, uv_loop_t, wq_async);
- uv_mutex_lock(&loop->wq_mutex);
- QUEUE_MOVE(&loop->wq, &wq);
- uv_mutex_unlock(&loop->wq_mutex);
-
- while (!QUEUE_EMPTY(&wq)) {
- q = QUEUE_HEAD(&wq);
- QUEUE_REMOVE(q);
-
- w = container_of(q, struct uv__work, wq);
- err = (w->work == uv__cancelled) ? UV_ECANCELED : 0;
- w->done(w, err);
- }
-}
-
-
-static void uv__queue_work(struct uv__work* w) {
- uv_work_t* req = container_of(w, uv_work_t, work_req);
-
- req->work_cb(req);
-}
-
-
-static void uv__queue_done(struct uv__work* w, int err) {
- uv_work_t* req;
-
- req = container_of(w, uv_work_t, work_req);
- uv__req_unregister(req->loop, req);
-
- if (req->after_work_cb == NULL)
- return;
-
- req->after_work_cb(req, err);
-}
-
-
-int uv_queue_work(uv_loop_t* loop,
- uv_work_t* req,
- uv_work_cb work_cb,
- uv_after_work_cb after_work_cb) {
- if (work_cb == NULL)
- return UV_EINVAL;
-
- uv__req_init(loop, req, UV_WORK);
- req->loop = loop;
- req->work_cb = work_cb;
- req->after_work_cb = after_work_cb;
- uv__work_submit(loop, &req->work_req, uv__queue_work, uv__queue_done);
- return 0;
-}
-
-
-int uv_cancel(uv_req_t* req) {
- struct uv__work* wreq;
- uv_loop_t* loop;
-
- switch (req->type) {
- case UV_FS:
- loop = ((uv_fs_t*) req)->loop;
- wreq = &((uv_fs_t*) req)->work_req;
- break;
- case UV_GETADDRINFO:
- loop = ((uv_getaddrinfo_t*) req)->loop;
- wreq = &((uv_getaddrinfo_t*) req)->work_req;
- break;
- case UV_GETNAMEINFO:
- loop = ((uv_getnameinfo_t*) req)->loop;
- wreq = &((uv_getnameinfo_t*) req)->work_req;
- break;
- case UV_WORK:
- loop = ((uv_work_t*) req)->loop;
- wreq = &((uv_work_t*) req)->work_req;
- break;
- default:
- return UV_EINVAL;
- }
-
- return uv__work_cancel(loop, req, wreq);
-}
diff --git a/3rdparty/libuv/src/unix/aix.c b/3rdparty/libuv/src/unix/aix.c
deleted file mode 100644
index c90b7e5cb9b..00000000000
--- a/3rdparty/libuv/src/unix/aix.c
+++ /dev/null
@@ -1,1158 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "internal.h"
-
-#include <stdio.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <errno.h>
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <net/if.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include <sys/time.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <utmp.h>
-#include <libgen.h>
-
-#include <sys/protosw.h>
-#include <libperfstat.h>
-#include <procinfo.h>
-#include <sys/proc.h>
-#include <sys/procfs.h>
-
-#include <sys/poll.h>
-
-#include <sys/pollset.h>
-#include <ctype.h>
-#ifdef HAVE_SYS_AHAFS_EVPRODS_H
-#include <sys/ahafs_evProds.h>
-#endif
-
-#include <sys/mntctl.h>
-#include <sys/vmount.h>
-#include <limits.h>
-#include <strings.h>
-#include <sys/vnode.h>
-
-#define RDWR_BUF_SIZE 4096
-#define EQ(a,b) (strcmp(a,b) == 0)
-
-int uv__platform_loop_init(uv_loop_t* loop) {
- loop->fs_fd = -1;
-
- /* Passing maxfd of -1 should mean the limit is determined
- * by the user's ulimit or the global limit as per the doc */
- loop->backend_fd = pollset_create(-1);
-
- if (loop->backend_fd == -1)
- return -1;
-
- return 0;
-}
-
-
-void uv__platform_loop_delete(uv_loop_t* loop) {
- if (loop->fs_fd != -1) {
- uv__close(loop->fs_fd);
- loop->fs_fd = -1;
- }
-
- if (loop->backend_fd != -1) {
- pollset_destroy(loop->backend_fd);
- loop->backend_fd = -1;
- }
-}
-
-
-void uv__io_poll(uv_loop_t* loop, int timeout) {
- struct pollfd events[1024];
- struct pollfd pqry;
- struct pollfd* pe;
- struct poll_ctl pc;
- QUEUE* q;
- uv__io_t* w;
- uint64_t base;
- uint64_t diff;
- int nevents;
- int count;
- int nfds;
- int i;
- int rc;
- int add_failed;
-
- if (loop->nfds == 0) {
- assert(QUEUE_EMPTY(&loop->watcher_queue));
- return;
- }
-
- while (!QUEUE_EMPTY(&loop->watcher_queue)) {
- q = QUEUE_HEAD(&loop->watcher_queue);
- QUEUE_REMOVE(q);
- QUEUE_INIT(q);
-
- w = QUEUE_DATA(q, uv__io_t, watcher_queue);
- assert(w->pevents != 0);
- assert(w->fd >= 0);
- assert(w->fd < (int) loop->nwatchers);
-
- pc.events = w->pevents;
- pc.fd = w->fd;
-
- add_failed = 0;
- if (w->events == 0) {
- pc.cmd = PS_ADD;
- if (pollset_ctl(loop->backend_fd, &pc, 1)) {
- if (errno != EINVAL) {
- assert(0 && "Failed to add file descriptor (pc.fd) to pollset");
- abort();
- }
- /* Check if the fd is already in the pollset */
- pqry.fd = pc.fd;
- rc = pollset_query(loop->backend_fd, &pqry);
- switch (rc) {
- case -1:
- assert(0 && "Failed to query pollset for file descriptor");
- abort();
- case 0:
- assert(0 && "Pollset does not contain file descriptor");
- abort();
- }
- /* If we got here then the pollset already contained the file descriptor even though
- * we didn't think it should. This probably shouldn't happen, but we can continue. */
- add_failed = 1;
- }
- }
- if (w->events != 0 || add_failed) {
- /* Modify, potentially removing events -- need to delete then add.
- * Could maybe mod if we knew for sure no events are removed, but
- * content of w->events is handled above as not reliable (falls back)
- * so may require a pollset_query() which would have to be pretty cheap
- * compared to a PS_DELETE to be worth optimizing. Alternatively, could
- * lazily remove events, squelching them in the mean time. */
- pc.cmd = PS_DELETE;
- if (pollset_ctl(loop->backend_fd, &pc, 1)) {
- assert(0 && "Failed to delete file descriptor (pc.fd) from pollset");
- abort();
- }
- pc.cmd = PS_ADD;
- if (pollset_ctl(loop->backend_fd, &pc, 1)) {
- assert(0 && "Failed to add file descriptor (pc.fd) to pollset");
- abort();
- }
- }
-
- w->events = w->pevents;
- }
-
- assert(timeout >= -1);
- base = loop->time;
- count = 48; /* Benchmarks suggest this gives the best throughput. */
-
- for (;;) {
- nfds = pollset_poll(loop->backend_fd,
- events,
- ARRAY_SIZE(events),
- timeout);
-
- /* Update loop->time unconditionally. It's tempting to skip the update when
- * timeout == 0 (i.e. non-blocking poll) but there is no guarantee that the
- * operating system didn't reschedule our process while in the syscall.
- */
- SAVE_ERRNO(uv__update_time(loop));
-
- if (nfds == 0) {
- assert(timeout != -1);
- return;
- }
-
- if (nfds == -1) {
- if (errno != EINTR) {
- abort();
- }
-
- if (timeout == -1)
- continue;
-
- if (timeout == 0)
- return;
-
- /* Interrupted by a signal. Update timeout and poll again. */
- goto update_timeout;
- }
-
- nevents = 0;
-
- assert(loop->watchers != NULL);
- loop->watchers[loop->nwatchers] = (void*) events;
- loop->watchers[loop->nwatchers + 1] = (void*) (uintptr_t) nfds;
-
- for (i = 0; i < nfds; i++) {
- pe = events + i;
- pc.cmd = PS_DELETE;
- pc.fd = pe->fd;
-
- /* Skip invalidated events, see uv__platform_invalidate_fd */
- if (pc.fd == -1)
- continue;
-
- assert(pc.fd >= 0);
- assert((unsigned) pc.fd < loop->nwatchers);
-
- w = loop->watchers[pc.fd];
-
- if (w == NULL) {
- /* File descriptor that we've stopped watching, disarm it.
- *
- * Ignore all errors because we may be racing with another thread
- * when the file descriptor is closed.
- */
- pollset_ctl(loop->backend_fd, &pc, 1);
- continue;
- }
-
- w->cb(loop, w, pe->revents);
- nevents++;
- }
-
- loop->watchers[loop->nwatchers] = NULL;
- loop->watchers[loop->nwatchers + 1] = NULL;
-
- if (nevents != 0) {
- if (nfds == ARRAY_SIZE(events) && --count != 0) {
- /* Poll for more events but don't block this time. */
- timeout = 0;
- continue;
- }
- return;
- }
-
- if (timeout == 0)
- return;
-
- if (timeout == -1)
- continue;
-
-update_timeout:
- assert(timeout > 0);
-
- diff = loop->time - base;
- if (diff >= (uint64_t) timeout)
- return;
-
- timeout -= diff;
- }
-}
-
-
-uint64_t uv__hrtime(uv_clocktype_t type) {
- uint64_t G = 1000000000;
- timebasestruct_t t;
- read_wall_time(&t, TIMEBASE_SZ);
- time_base_to_time(&t, TIMEBASE_SZ);
- return (uint64_t) t.tb_high * G + t.tb_low;
-}
-
-
-/*
- * We could use a static buffer for the path manipulations that we need outside
- * of the function, but this function could be called by multiple consumers and
- * we don't want to potentially create a race condition in the use of snprintf.
- * There is no direct way of getting the exe path in AIX - either through /procfs
- * or through some libc APIs. The below approach is to parse the argv[0]'s pattern
- * and use it in conjunction with PATH environment variable to craft one.
- */
-int uv_exepath(char* buffer, size_t* size) {
- int res;
- char args[PATH_MAX];
- char abspath[PATH_MAX];
- size_t abspath_size;
- struct procsinfo pi;
-
- if (buffer == NULL || size == NULL || *size == 0)
- return -EINVAL;
-
- pi.pi_pid = getpid();
- res = getargs(&pi, sizeof(pi), args, sizeof(args));
- if (res < 0)
- return -EINVAL;
-
- /*
- * Possibilities for args:
- * i) an absolute path such as: /home/user/myprojects/nodejs/node
- * ii) a relative path such as: ./node or ../myprojects/nodejs/node
- * iii) a bare filename such as "node", after exporting PATH variable
- * to its location.
- */
-
- /* Case i) and ii) absolute or relative paths */
- if (strchr(args, '/') != NULL) {
- if (realpath(args, abspath) != abspath)
- return -errno;
-
- abspath_size = strlen(abspath);
-
- *size -= 1;
- if (*size > abspath_size)
- *size = abspath_size;
-
- memcpy(buffer, abspath, *size);
- buffer[*size] = '\0';
-
- return 0;
- } else {
- /* Case iii). Search PATH environment variable */
- char trypath[PATH_MAX];
- char *clonedpath = NULL;
- char *token = NULL;
- char *path = getenv("PATH");
-
- if (path == NULL)
- return -EINVAL;
-
- clonedpath = uv__strdup(path);
- if (clonedpath == NULL)
- return -ENOMEM;
-
- token = strtok(clonedpath, ":");
- while (token != NULL) {
- snprintf(trypath, sizeof(trypath) - 1, "%s/%s", token, args);
- if (realpath(trypath, abspath) == abspath) {
- /* Check the match is executable */
- if (access(abspath, X_OK) == 0) {
- abspath_size = strlen(abspath);
-
- *size -= 1;
- if (*size > abspath_size)
- *size = abspath_size;
-
- memcpy(buffer, abspath, *size);
- buffer[*size] = '\0';
-
- uv__free(clonedpath);
- return 0;
- }
- }
- token = strtok(NULL, ":");
- }
- uv__free(clonedpath);
-
- /* Out of tokens (path entries), and no match found */
- return -EINVAL;
- }
-}
-
-
-uint64_t uv_get_free_memory(void) {
- perfstat_memory_total_t mem_total;
- int result = perfstat_memory_total(NULL, &mem_total, sizeof(mem_total), 1);
- if (result == -1) {
- return 0;
- }
- return mem_total.real_free * 4096;
-}
-
-
-uint64_t uv_get_total_memory(void) {
- perfstat_memory_total_t mem_total;
- int result = perfstat_memory_total(NULL, &mem_total, sizeof(mem_total), 1);
- if (result == -1) {
- return 0;
- }
- return mem_total.real_total * 4096;
-}
-
-
-void uv_loadavg(double avg[3]) {
- perfstat_cpu_total_t ps_total;
- int result = perfstat_cpu_total(NULL, &ps_total, sizeof(ps_total), 1);
- if (result == -1) {
- avg[0] = 0.; avg[1] = 0.; avg[2] = 0.;
- return;
- }
- avg[0] = ps_total.loadavg[0] / (double)(1 << SBITS);
- avg[1] = ps_total.loadavg[1] / (double)(1 << SBITS);
- avg[2] = ps_total.loadavg[2] / (double)(1 << SBITS);
-}
-
-
-#ifdef HAVE_SYS_AHAFS_EVPRODS_H
-static char *uv__rawname(char *cp) {
- static char rawbuf[FILENAME_MAX+1];
- char *dp = rindex(cp, '/');
-
- if (dp == 0)
- return 0;
-
- *dp = 0;
- strcpy(rawbuf, cp);
- *dp = '/';
- strcat(rawbuf, "/r");
- strcat(rawbuf, dp+1);
- return rawbuf;
-}
-
-
-/*
- * Determine whether given pathname is a directory
- * Returns 0 if the path is a directory, -1 if not
- *
- * Note: Opportunity here for more detailed error information but
- * that requires changing callers of this function as well
- */
-static int uv__path_is_a_directory(char* filename) {
- struct stat statbuf;
-
- if (stat(filename, &statbuf) < 0)
- return -1; /* failed: not a directory, assume it is a file */
-
- if (statbuf.st_type == VDIR)
- return 0;
-
- return -1;
-}
-
-
-/*
- * Check whether AHAFS is mounted.
- * Returns 0 if AHAFS is mounted, or an error code < 0 on failure
- */
-static int uv__is_ahafs_mounted(void){
- int rv, i = 2;
- struct vmount *p;
- int size_multiplier = 10;
- size_t siz = sizeof(struct vmount)*size_multiplier;
- struct vmount *vmt;
- const char *dev = "/aha";
- char *obj, *stub;
-
- p = uv__malloc(siz);
- if (p == NULL)
- return -errno;
-
- /* Retrieve all mounted filesystems */
- rv = mntctl(MCTL_QUERY, siz, (char*)p);
- if (rv < 0)
- return -errno;
- if (rv == 0) {
- /* buffer was not large enough, reallocate to correct size */
- siz = *(int*)p;
- uv__free(p);
- p = uv__malloc(siz);
- if (p == NULL)
- return -errno;
- rv = mntctl(MCTL_QUERY, siz, (char*)p);
- if (rv < 0)
- return -errno;
- }
-
- /* Look for dev in filesystems mount info */
- for(vmt = p, i = 0; i < rv; i++) {
- obj = vmt2dataptr(vmt, VMT_OBJECT); /* device */
- stub = vmt2dataptr(vmt, VMT_STUB); /* mount point */
-
- if (EQ(obj, dev) || EQ(uv__rawname(obj), dev) || EQ(stub, dev)) {
- uv__free(p); /* Found a match */
- return 0;
- }
- vmt = (struct vmount *) ((char *) vmt + vmt->vmt_length);
- }
-
- /* /aha is required for monitoring filesystem changes */
- return -1;
-}
-
-/*
- * Recursive call to mkdir() to create intermediate folders, if any
- * Returns code from mkdir call
- */
-static int uv__makedir_p(const char *dir) {
- char tmp[256];
- char *p = NULL;
- size_t len;
- int err;
-
- snprintf(tmp, sizeof(tmp),"%s",dir);
- len = strlen(tmp);
- if (tmp[len - 1] == '/')
- tmp[len - 1] = 0;
- for (p = tmp + 1; *p; p++) {
- if (*p == '/') {
- *p = 0;
- err = mkdir(tmp, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
- if(err != 0)
- return err;
- *p = '/';
- }
- }
- return mkdir(tmp, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
-}
-
-/*
- * Creates necessary subdirectories in the AIX Event Infrastructure
- * file system for monitoring the object specified.
- * Returns code from mkdir call
- */
-static int uv__make_subdirs_p(const char *filename) {
- char cmd[2048];
- char *p;
- int rc = 0;
-
- /* Strip off the monitor file name */
- p = strrchr(filename, '/');
-
- if (p == NULL)
- return 0;
-
- if (uv__path_is_a_directory((char*)filename) == 0) {
- sprintf(cmd, "/aha/fs/modDir.monFactory");
- } else {
- sprintf(cmd, "/aha/fs/modFile.monFactory");
- }
-
- strncat(cmd, filename, (p - filename));
- rc = uv__makedir_p(cmd);
-
- if (rc == -1 && errno != EEXIST){
- return -errno;
- }
-
- return rc;
-}
-
-
-/*
- * Checks if /aha is mounted, then proceeds to set up the monitoring
- * objects for the specified file.
- * Returns 0 on success, or an error code < 0 on failure
- */
-static int uv__setup_ahafs(const char* filename, int *fd) {
- int rc = 0;
- char mon_file_write_string[RDWR_BUF_SIZE];
- char mon_file[PATH_MAX];
- int file_is_directory = 0; /* -1 == NO, 0 == YES */
-
- /* Create monitor file name for object */
- file_is_directory = uv__path_is_a_directory((char*)filename);
-
- if (file_is_directory == 0)
- sprintf(mon_file, "/aha/fs/modDir.monFactory");
- else
- sprintf(mon_file, "/aha/fs/modFile.monFactory");
-
- if ((strlen(mon_file) + strlen(filename) + 5) > PATH_MAX)
- return -ENAMETOOLONG;
-
- /* Make the necessary subdirectories for the monitor file */
- rc = uv__make_subdirs_p(filename);
- if (rc == -1 && errno != EEXIST)
- return rc;
-
- strcat(mon_file, filename);
- strcat(mon_file, ".mon");
-
- *fd = 0; errno = 0;
-
- /* Open the monitor file, creating it if necessary */
- *fd = open(mon_file, O_CREAT|O_RDWR);
- if (*fd < 0)
- return -errno;
-
- /* Write out the monitoring specifications.
- * In this case, we are monitoring for a state change event type
- * CHANGED=YES
- * We will be waiting in select call, rather than a read:
- * WAIT_TYPE=WAIT_IN_SELECT
- * We only want minimal information for files:
- * INFO_LVL=1
- * For directories, we want more information to track what file
- * caused the change
- * INFO_LVL=2
- */
-
- if (file_is_directory == 0)
- sprintf(mon_file_write_string, "CHANGED=YES;WAIT_TYPE=WAIT_IN_SELECT;INFO_LVL=2");
- else
- sprintf(mon_file_write_string, "CHANGED=YES;WAIT_TYPE=WAIT_IN_SELECT;INFO_LVL=1");
-
- rc = write(*fd, mon_file_write_string, strlen(mon_file_write_string)+1);
- if (rc < 0)
- return -errno;
-
- return 0;
-}
-
-/*
- * Skips a specified number of lines in the buffer passed in.
- * Walks the buffer pointed to by p and attempts to skip n lines.
- * Returns the total number of lines skipped
- */
-static int uv__skip_lines(char **p, int n) {
- int lines = 0;
-
- while(n > 0) {
- *p = strchr(*p, '\n');
- if (!p)
- return lines;
-
- (*p)++;
- n--;
- lines++;
- }
- return lines;
-}
-
-
-/*
- * Parse the event occurrence data to figure out what event just occurred
- * and take proper action.
- *
- * The buf is a pointer to the buffer containing the event occurrence data
- * Returns 0 on success, -1 if unrecoverable error in parsing
- *
- */
-static int uv__parse_data(char *buf, int *events, uv_fs_event_t* handle) {
- int evp_rc, i;
- char *p;
- char filename[PATH_MAX]; /* To be used when handling directories */
-
- p = buf;
- *events = 0;
-
- /* Clean the filename buffer*/
- for(i = 0; i < PATH_MAX; i++) {
- filename[i] = 0;
- }
- i = 0;
-
- /* Check for BUF_WRAP */
- if (strncmp(buf, "BUF_WRAP", strlen("BUF_WRAP")) == 0) {
- assert(0 && "Buffer wrap detected, Some event occurrences lost!");
- return 0;
- }
-
- /* Since we are using the default buffer size (4K), and have specified
- * INFO_LVL=1, we won't see any EVENT_OVERFLOW conditions. Applications
- * should check for this keyword if they are using an INFO_LVL of 2 or
- * higher, and have a buffer size of <= 4K
- */
-
- /* Skip to RC_FROM_EVPROD */
- if (uv__skip_lines(&p, 9) != 9)
- return -1;
-
- if (sscanf(p, "RC_FROM_EVPROD=%d\nEND_EVENT_DATA", &evp_rc) == 1) {
- if (uv__path_is_a_directory(handle->path) == 0) { /* Directory */
- if (evp_rc == AHAFS_MODDIR_UNMOUNT || evp_rc == AHAFS_MODDIR_REMOVE_SELF) {
- /* The directory is no longer available for monitoring */
- *events = UV_RENAME;
- handle->dir_filename = NULL;
- } else {
- /* A file was added/removed inside the directory */
- *events = UV_CHANGE;
-
- /* Get the EVPROD_INFO */
- if (uv__skip_lines(&p, 1) != 1)
- return -1;
-
- /* Scan out the name of the file that triggered the event*/
- if (sscanf(p, "BEGIN_EVPROD_INFO\n%sEND_EVPROD_INFO", filename) == 1) {
- handle->dir_filename = uv__strdup((const char*)&filename);
- } else
- return -1;
- }
- } else { /* Regular File */
- if (evp_rc == AHAFS_MODFILE_RENAME)
- *events = UV_RENAME;
- else
- *events = UV_CHANGE;
- }
- }
- else
- return -1;
-
- return 0;
-}
-
-
-/* This is the internal callback */
-static void uv__ahafs_event(uv_loop_t* loop, uv__io_t* event_watch, unsigned int fflags) {
- char result_data[RDWR_BUF_SIZE];
- int bytes, rc = 0;
- uv_fs_event_t* handle;
- int events = 0;
- int i = 0;
- char fname[PATH_MAX];
- char *p;
-
- handle = container_of(event_watch, uv_fs_event_t, event_watcher);
-
- /* Clean all the buffers*/
- for(i = 0; i < PATH_MAX; i++) {
- fname[i] = 0;
- }
- i = 0;
-
- /* At this point, we assume that polling has been done on the
- * file descriptor, so we can just read the AHAFS event occurrence
- * data and parse its results without having to block anything
- */
- bytes = pread(event_watch->fd, result_data, RDWR_BUF_SIZE, 0);
-
- assert((bytes <= 0) && "uv__ahafs_event - Error reading monitor file");
-
- /* Parse the data */
- if(bytes > 0)
- rc = uv__parse_data(result_data, &events, handle);
-
- /* For directory changes, the name of the files that triggered the change
- * are never absolute pathnames
- */
- if (uv__path_is_a_directory(handle->path) == 0) {
- p = handle->dir_filename;
- while(*p != NULL){
- fname[i]= *p;
- i++;
- p++;
- }
- } else {
- /* For file changes, figure out whether filename is absolute or not */
- if (handle->path[0] == '/') {
- p = strrchr(handle->path, '/');
- p++;
-
- while(*p != NULL) {
- fname[i]= *p;
- i++;
- p++;
- }
- }
- }
-
- /* Unrecoverable error */
- if (rc == -1)
- return;
- else /* Call the actual JavaScript callback function */
- handle->cb(handle, (const char*)&fname, events, 0);
-}
-#endif
-
-
-int uv_fs_event_init(uv_loop_t* loop, uv_fs_event_t* handle) {
-#ifdef HAVE_SYS_AHAFS_EVPRODS_H
- uv__handle_init(loop, (uv_handle_t*)handle, UV_FS_EVENT);
- return 0;
-#else
- return -ENOSYS;
-#endif
-}
-
-
-int uv_fs_event_start(uv_fs_event_t* handle,
- uv_fs_event_cb cb,
- const char* filename,
- unsigned int flags) {
-#ifdef HAVE_SYS_AHAFS_EVPRODS_H
- int fd, rc, i = 0, res = 0;
- char cwd[PATH_MAX];
- char absolute_path[PATH_MAX];
- char fname[PATH_MAX];
- char *p;
-
- /* Clean all the buffers*/
- for(i = 0; i < PATH_MAX; i++) {
- cwd[i] = 0;
- absolute_path[i] = 0;
- fname[i] = 0;
- }
- i = 0;
-
- /* Figure out whether filename is absolute or not */
- if (filename[0] == '/') {
- /* We have absolute pathname, create the relative pathname*/
- sprintf(absolute_path, filename);
- p = strrchr(filename, '/');
- p++;
- } else {
- if (filename[0] == '.' && filename[1] == '/') {
- /* We have a relative pathname, compose the absolute pathname */
- sprintf(fname, filename);
- snprintf(cwd, PATH_MAX-1, "/proc/%lu/cwd", (unsigned long) getpid());
- res = readlink(cwd, absolute_path, sizeof(absolute_path) - 1);
- if (res < 0)
- return res;
- p = strrchr(absolute_path, '/');
- p++;
- p++;
- } else {
- /* We have a relative pathname, compose the absolute pathname */
- sprintf(fname, filename);
- snprintf(cwd, PATH_MAX-1, "/proc/%lu/cwd", (unsigned long) getpid());
- res = readlink(cwd, absolute_path, sizeof(absolute_path) - 1);
- if (res < 0)
- return res;
- p = strrchr(absolute_path, '/');
- p++;
- }
- /* Copy to filename buffer */
- while(filename[i] != NULL) {
- *p = filename[i];
- i++;
- p++;
- }
- }
-
- if (uv__is_ahafs_mounted() < 0) /* /aha checks failed */
- return UV_ENOSYS;
-
- /* Setup ahafs */
- rc = uv__setup_ahafs((const char *)absolute_path, &fd);
- if (rc != 0)
- return rc;
-
- /* Setup/Initialize all the libuv routines */
- uv__handle_start(handle);
- uv__io_init(&handle->event_watcher, uv__ahafs_event, fd);
- handle->path = uv__strdup((const char*)&absolute_path);
- handle->cb = cb;
-
- uv__io_start(handle->loop, &handle->event_watcher, UV__POLLIN);
-
- return 0;
-#else
- return -ENOSYS;
-#endif
-}
-
-
-int uv_fs_event_stop(uv_fs_event_t* handle) {
-#ifdef HAVE_SYS_AHAFS_EVPRODS_H
- if (!uv__is_active(handle))
- return 0;
-
- uv__io_close(handle->loop, &handle->event_watcher);
- uv__handle_stop(handle);
-
- if (uv__path_is_a_directory(handle->path) == 0) {
- uv__free(handle->dir_filename);
- handle->dir_filename = NULL;
- }
-
- uv__free(handle->path);
- handle->path = NULL;
- uv__close(handle->event_watcher.fd);
- handle->event_watcher.fd = -1;
-
- return 0;
-#else
- return -ENOSYS;
-#endif
-}
-
-
-void uv__fs_event_close(uv_fs_event_t* handle) {
-#ifdef HAVE_SYS_AHAFS_EVPRODS_H
- uv_fs_event_stop(handle);
-#else
- UNREACHABLE();
-#endif
-}
-
-
-char** uv_setup_args(int argc, char** argv) {
- return argv;
-}
-
-
-int uv_set_process_title(const char* title) {
- return 0;
-}
-
-
-int uv_get_process_title(char* buffer, size_t size) {
- if (size > 0) {
- buffer[0] = '\0';
- }
- return 0;
-}
-
-
-int uv_resident_set_memory(size_t* rss) {
- char pp[64];
- psinfo_t psinfo;
- int err;
- int fd;
-
- snprintf(pp, sizeof(pp), "/proc/%lu/psinfo", (unsigned long) getpid());
-
- fd = open(pp, O_RDONLY);
- if (fd == -1)
- return -errno;
-
- /* FIXME(bnoordhuis) Handle EINTR. */
- err = -EINVAL;
- if (read(fd, &psinfo, sizeof(psinfo)) == sizeof(psinfo)) {
- *rss = (size_t)psinfo.pr_rssize * 1024;
- err = 0;
- }
- uv__close(fd);
-
- return err;
-}
-
-
-int uv_uptime(double* uptime) {
- struct utmp *utmp_buf;
- size_t entries = 0;
- time_t boot_time;
-
- utmpname(UTMP_FILE);
-
- setutent();
-
- while ((utmp_buf = getutent()) != NULL) {
- if (utmp_buf->ut_user[0] && utmp_buf->ut_type == USER_PROCESS)
- ++entries;
- if (utmp_buf->ut_type == BOOT_TIME)
- boot_time = utmp_buf->ut_time;
- }
-
- endutent();
-
- if (boot_time == 0)
- return -ENOSYS;
-
- *uptime = time(NULL) - boot_time;
- return 0;
-}
-
-
-int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) {
- uv_cpu_info_t* cpu_info;
- perfstat_cpu_total_t ps_total;
- perfstat_cpu_t* ps_cpus;
- perfstat_id_t cpu_id;
- int result, ncpus, idx = 0;
-
- result = perfstat_cpu_total(NULL, &ps_total, sizeof(ps_total), 1);
- if (result == -1) {
- return -ENOSYS;
- }
-
- ncpus = result = perfstat_cpu(NULL, NULL, sizeof(perfstat_cpu_t), 0);
- if (result == -1) {
- return -ENOSYS;
- }
-
- ps_cpus = (perfstat_cpu_t*) uv__malloc(ncpus * sizeof(perfstat_cpu_t));
- if (!ps_cpus) {
- return -ENOMEM;
- }
-
- strcpy(cpu_id.name, FIRST_CPU);
- result = perfstat_cpu(&cpu_id, ps_cpus, sizeof(perfstat_cpu_t), ncpus);
- if (result == -1) {
- uv__free(ps_cpus);
- return -ENOSYS;
- }
-
- *cpu_infos = (uv_cpu_info_t*) uv__malloc(ncpus * sizeof(uv_cpu_info_t));
- if (!*cpu_infos) {
- uv__free(ps_cpus);
- return -ENOMEM;
- }
-
- *count = ncpus;
-
- cpu_info = *cpu_infos;
- while (idx < ncpus) {
- cpu_info->speed = (int)(ps_total.processorHZ / 1000000);
- cpu_info->model = uv__strdup(ps_total.description);
- cpu_info->cpu_times.user = ps_cpus[idx].user;
- cpu_info->cpu_times.sys = ps_cpus[idx].sys;
- cpu_info->cpu_times.idle = ps_cpus[idx].idle;
- cpu_info->cpu_times.irq = ps_cpus[idx].wait;
- cpu_info->cpu_times.nice = 0;
- cpu_info++;
- idx++;
- }
-
- uv__free(ps_cpus);
- return 0;
-}
-
-
-void uv_free_cpu_info(uv_cpu_info_t* cpu_infos, int count) {
- int i;
-
- for (i = 0; i < count; ++i) {
- uv__free(cpu_infos[i].model);
- }
-
- uv__free(cpu_infos);
-}
-
-
-int uv_interface_addresses(uv_interface_address_t** addresses,
- int* count) {
- uv_interface_address_t* address;
- int sockfd, size = 1;
- struct ifconf ifc;
- struct ifreq *ifr, *p, flg;
-
- *count = 0;
-
- if (0 > (sockfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP))) {
- return -errno;
- }
-
- if (ioctl(sockfd, SIOCGSIZIFCONF, &size) == -1) {
- SAVE_ERRNO(uv__close(sockfd));
- return -errno;
- }
-
- ifc.ifc_req = (struct ifreq*)uv__malloc(size);
- ifc.ifc_len = size;
- if (ioctl(sockfd, SIOCGIFCONF, &ifc) == -1) {
- SAVE_ERRNO(uv__close(sockfd));
- return -errno;
- }
-
-#define ADDR_SIZE(p) MAX((p).sa_len, sizeof(p))
-
- /* Count all up and running ipv4/ipv6 addresses */
- ifr = ifc.ifc_req;
- while ((char*)ifr < (char*)ifc.ifc_req + ifc.ifc_len) {
- p = ifr;
- ifr = (struct ifreq*)
- ((char*)ifr + sizeof(ifr->ifr_name) + ADDR_SIZE(ifr->ifr_addr));
-
- if (!(p->ifr_addr.sa_family == AF_INET6 ||
- p->ifr_addr.sa_family == AF_INET))
- continue;
-
- memcpy(flg.ifr_name, p->ifr_name, sizeof(flg.ifr_name));
- if (ioctl(sockfd, SIOCGIFFLAGS, &flg) == -1) {
- SAVE_ERRNO(uv__close(sockfd));
- return -errno;
- }
-
- if (!(flg.ifr_flags & IFF_UP && flg.ifr_flags & IFF_RUNNING))
- continue;
-
- (*count)++;
- }
-
- /* Alloc the return interface structs */
- *addresses = (uv_interface_address_t*)
- uv__malloc(*count * sizeof(uv_interface_address_t));
- if (!(*addresses)) {
- uv__close(sockfd);
- return -ENOMEM;
- }
- address = *addresses;
-
- ifr = ifc.ifc_req;
- while ((char*)ifr < (char*)ifc.ifc_req + ifc.ifc_len) {
- p = ifr;
- ifr = (struct ifreq*)
- ((char*)ifr + sizeof(ifr->ifr_name) + ADDR_SIZE(ifr->ifr_addr));
-
- if (!(p->ifr_addr.sa_family == AF_INET6 ||
- p->ifr_addr.sa_family == AF_INET))
- continue;
-
- memcpy(flg.ifr_name, p->ifr_name, sizeof(flg.ifr_name));
- if (ioctl(sockfd, SIOCGIFFLAGS, &flg) == -1) {
- uv__close(sockfd);
- return -ENOSYS;
- }
-
- if (!(flg.ifr_flags & IFF_UP && flg.ifr_flags & IFF_RUNNING))
- continue;
-
- /* All conditions above must match count loop */
-
- address->name = uv__strdup(p->ifr_name);
-
- if (p->ifr_addr.sa_family == AF_INET6) {
- address->address.address6 = *((struct sockaddr_in6*) &p->ifr_addr);
- } else {
- address->address.address4 = *((struct sockaddr_in*) &p->ifr_addr);
- }
-
- /* TODO: Retrieve netmask using SIOCGIFNETMASK ioctl */
-
- address->is_internal = flg.ifr_flags & IFF_LOOPBACK ? 1 : 0;
-
- address++;
- }
-
-#undef ADDR_SIZE
-
- uv__close(sockfd);
- return 0;
-}
-
-
-void uv_free_interface_addresses(uv_interface_address_t* addresses,
- int count) {
- int i;
-
- for (i = 0; i < count; ++i) {
- uv__free(addresses[i].name);
- }
-
- uv__free(addresses);
-}
-
-void uv__platform_invalidate_fd(uv_loop_t* loop, int fd) {
- struct pollfd* events;
- uintptr_t i;
- uintptr_t nfds;
- struct poll_ctl pc;
-
- assert(loop->watchers != NULL);
-
- events = (struct pollfd*) loop->watchers[loop->nwatchers];
- nfds = (uintptr_t) loop->watchers[loop->nwatchers + 1];
-
- if (events != NULL)
- /* Invalidate events with same file descriptor */
- for (i = 0; i < nfds; i++)
- if ((int) events[i].fd == fd)
- events[i].fd = -1;
-
- /* Remove the file descriptor from the poll set */
- pc.events = 0;
- pc.cmd = PS_DELETE;
- pc.fd = fd;
- if(loop->backend_fd >= 0)
- pollset_ctl(loop->backend_fd, &pc, 1);
-}
diff --git a/3rdparty/libuv/src/unix/android-ifaddrs.c b/3rdparty/libuv/src/unix/android-ifaddrs.c
deleted file mode 100644
index 30f681b7d04..00000000000
--- a/3rdparty/libuv/src/unix/android-ifaddrs.c
+++ /dev/null
@@ -1,703 +0,0 @@
-/*
-Copyright (c) 2013, Kenneth MacKay
-Copyright (c) 2014, Emergya (Cloud4all, FP7/2007-2013 grant agreement #289016)
-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.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#include "android-ifaddrs.h"
-#include "uv-common.h"
-
-#include <string.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <unistd.h>
-#include <sys/socket.h>
-#include <net/if_arp.h>
-#include <netinet/in.h>
-#include <linux/netlink.h>
-#include <linux/rtnetlink.h>
-
-typedef struct NetlinkList
-{
- struct NetlinkList *m_next;
- struct nlmsghdr *m_data;
- unsigned int m_size;
-} NetlinkList;
-
-static int netlink_socket(void)
-{
- struct sockaddr_nl l_addr;
-
- int l_socket = socket(PF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
- if(l_socket < 0)
- {
- return -1;
- }
-
- memset(&l_addr, 0, sizeof(l_addr));
- l_addr.nl_family = AF_NETLINK;
- if(bind(l_socket, (struct sockaddr *)&l_addr, sizeof(l_addr)) < 0)
- {
- close(l_socket);
- return -1;
- }
-
- return l_socket;
-}
-
-static int netlink_send(int p_socket, int p_request)
-{
- char l_buffer[NLMSG_ALIGN(sizeof(struct nlmsghdr)) + NLMSG_ALIGN(sizeof(struct rtgenmsg))];
-
- struct nlmsghdr *l_hdr;
- struct rtgenmsg *l_msg;
- struct sockaddr_nl l_addr;
-
- memset(l_buffer, 0, sizeof(l_buffer));
-
- l_hdr = (struct nlmsghdr *)l_buffer;
- l_msg = (struct rtgenmsg *)NLMSG_DATA(l_hdr);
-
- l_hdr->nlmsg_len = NLMSG_LENGTH(sizeof(*l_msg));
- l_hdr->nlmsg_type = p_request;
- l_hdr->nlmsg_flags = NLM_F_ROOT | NLM_F_MATCH | NLM_F_REQUEST;
- l_hdr->nlmsg_pid = 0;
- l_hdr->nlmsg_seq = p_socket;
- l_msg->rtgen_family = AF_UNSPEC;
-
- memset(&l_addr, 0, sizeof(l_addr));
- l_addr.nl_family = AF_NETLINK;
- return (sendto(p_socket, l_hdr, l_hdr->nlmsg_len, 0, (struct sockaddr *)&l_addr, sizeof(l_addr)));
-}
-
-static int netlink_recv(int p_socket, void *p_buffer, size_t p_len)
-{
- struct sockaddr_nl l_addr;
- struct msghdr l_msg;
-
- struct iovec l_iov;
- l_iov.iov_base = p_buffer;
- l_iov.iov_len = p_len;
-
- for(;;)
- {
- int l_result;
- l_msg.msg_name = (void *)&l_addr;
- l_msg.msg_namelen = sizeof(l_addr);
- l_msg.msg_iov = &l_iov;
- l_msg.msg_iovlen = 1;
- l_msg.msg_control = NULL;
- l_msg.msg_controllen = 0;
- l_msg.msg_flags = 0;
- l_result = recvmsg(p_socket, &l_msg, 0);
-
- if(l_result < 0)
- {
- if(errno == EINTR)
- {
- continue;
- }
- return -2;
- }
-
- /* Buffer was too small */
- if(l_msg.msg_flags & MSG_TRUNC)
- {
- return -1;
- }
- return l_result;
- }
-}
-
-static struct nlmsghdr *getNetlinkResponse(int p_socket, int *p_size, int *p_done)
-{
- size_t l_size = 4096;
- void *l_buffer = NULL;
-
- for(;;)
- {
- int l_read;
-
- uv__free(l_buffer);
- l_buffer = uv__malloc(l_size);
- if (l_buffer == NULL)
- {
- return NULL;
- }
-
- l_read = netlink_recv(p_socket, l_buffer, l_size);
- *p_size = l_read;
- if(l_read == -2)
- {
- uv__free(l_buffer);
- return NULL;
- }
- if(l_read >= 0)
- {
- pid_t l_pid = getpid();
- struct nlmsghdr *l_hdr;
- for(l_hdr = (struct nlmsghdr *)l_buffer; NLMSG_OK(l_hdr, (unsigned int)l_read); l_hdr = (struct nlmsghdr *)NLMSG_NEXT(l_hdr, l_read))
- {
- if((pid_t)l_hdr->nlmsg_pid != l_pid || (int)l_hdr->nlmsg_seq != p_socket)
- {
- continue;
- }
-
- if(l_hdr->nlmsg_type == NLMSG_DONE)
- {
- *p_done = 1;
- break;
- }
-
- if(l_hdr->nlmsg_type == NLMSG_ERROR)
- {
- uv__free(l_buffer);
- return NULL;
- }
- }
- return l_buffer;
- }
-
- l_size *= 2;
- }
-}
-
-static NetlinkList *newListItem(struct nlmsghdr *p_data, unsigned int p_size)
-{
- NetlinkList *l_item = uv__malloc(sizeof(NetlinkList));
- if (l_item == NULL)
- {
- return NULL;
- }
-
- l_item->m_next = NULL;
- l_item->m_data = p_data;
- l_item->m_size = p_size;
- return l_item;
-}
-
-static void freeResultList(NetlinkList *p_list)
-{
- NetlinkList *l_cur;
- while(p_list)
- {
- l_cur = p_list;
- p_list = p_list->m_next;
- uv__free(l_cur->m_data);
- uv__free(l_cur);
- }
-}
-
-static NetlinkList *getResultList(int p_socket, int p_request)
-{
- int l_size;
- int l_done;
- NetlinkList *l_list;
- NetlinkList *l_end;
-
- if(netlink_send(p_socket, p_request) < 0)
- {
- return NULL;
- }
-
- l_list = NULL;
- l_end = NULL;
-
- l_done = 0;
- while(!l_done)
- {
- NetlinkList *l_item;
-
- struct nlmsghdr *l_hdr = getNetlinkResponse(p_socket, &l_size, &l_done);
- /* Error */
- if(!l_hdr)
- {
- freeResultList(l_list);
- return NULL;
- }
-
- l_item = newListItem(l_hdr, l_size);
- if (!l_item)
- {
- freeResultList(l_list);
- return NULL;
- }
- if(!l_list)
- {
- l_list = l_item;
- }
- else
- {
- l_end->m_next = l_item;
- }
- l_end = l_item;
- }
- return l_list;
-}
-
-static size_t maxSize(size_t a, size_t b)
-{
- return (a > b ? a : b);
-}
-
-static size_t calcAddrLen(sa_family_t p_family, int p_dataSize)
-{
- switch(p_family)
- {
- case AF_INET:
- return sizeof(struct sockaddr_in);
- case AF_INET6:
- return sizeof(struct sockaddr_in6);
- case AF_PACKET:
- return maxSize(sizeof(struct sockaddr_ll), offsetof(struct sockaddr_ll, sll_addr) + p_dataSize);
- default:
- return maxSize(sizeof(struct sockaddr), offsetof(struct sockaddr, sa_data) + p_dataSize);
- }
-}
-
-static void makeSockaddr(sa_family_t p_family, struct sockaddr *p_dest, void *p_data, size_t p_size)
-{
- switch(p_family)
- {
- case AF_INET:
- memcpy(&((struct sockaddr_in*)p_dest)->sin_addr, p_data, p_size);
- break;
- case AF_INET6:
- memcpy(&((struct sockaddr_in6*)p_dest)->sin6_addr, p_data, p_size);
- break;
- case AF_PACKET:
- memcpy(((struct sockaddr_ll*)p_dest)->sll_addr, p_data, p_size);
- ((struct sockaddr_ll*)p_dest)->sll_halen = p_size;
- break;
- default:
- memcpy(p_dest->sa_data, p_data, p_size);
- break;
- }
- p_dest->sa_family = p_family;
-}
-
-static void addToEnd(struct ifaddrs **p_resultList, struct ifaddrs *p_entry)
-{
- if(!*p_resultList)
- {
- *p_resultList = p_entry;
- }
- else
- {
- struct ifaddrs *l_cur = *p_resultList;
- while(l_cur->ifa_next)
- {
- l_cur = l_cur->ifa_next;
- }
- l_cur->ifa_next = p_entry;
- }
-}
-
-static int interpretLink(struct nlmsghdr *p_hdr, struct ifaddrs **p_resultList)
-{
- struct ifaddrs *l_entry;
-
- char *l_index;
- char *l_name;
- char *l_addr;
- char *l_data;
-
- struct ifinfomsg *l_info = (struct ifinfomsg *)NLMSG_DATA(p_hdr);
-
- size_t l_nameSize = 0;
- size_t l_addrSize = 0;
- size_t l_dataSize = 0;
-
- size_t l_rtaSize = NLMSG_PAYLOAD(p_hdr, sizeof(struct ifinfomsg));
- struct rtattr *l_rta;
- for(l_rta = IFLA_RTA(l_info); RTA_OK(l_rta, l_rtaSize); l_rta = RTA_NEXT(l_rta, l_rtaSize))
- {
- size_t l_rtaDataSize = RTA_PAYLOAD(l_rta);
- switch(l_rta->rta_type)
- {
- case IFLA_ADDRESS:
- case IFLA_BROADCAST:
- l_addrSize += NLMSG_ALIGN(calcAddrLen(AF_PACKET, l_rtaDataSize));
- break;
- case IFLA_IFNAME:
- l_nameSize += NLMSG_ALIGN(l_rtaSize + 1);
- break;
- case IFLA_STATS:
- l_dataSize += NLMSG_ALIGN(l_rtaSize);
- break;
- default:
- break;
- }
- }
-
- l_entry = uv__malloc(sizeof(struct ifaddrs) + sizeof(int) + l_nameSize + l_addrSize + l_dataSize);
- if (l_entry == NULL)
- {
- return -1;
- }
- memset(l_entry, 0, sizeof(struct ifaddrs));
- l_entry->ifa_name = "";
-
- l_index = ((char *)l_entry) + sizeof(struct ifaddrs);
- l_name = l_index + sizeof(int);
- l_addr = l_name + l_nameSize;
- l_data = l_addr + l_addrSize;
-
- /* Save the interface index so we can look it up when handling the
- * addresses.
- */
- memcpy(l_index, &l_info->ifi_index, sizeof(int));
-
- l_entry->ifa_flags = l_info->ifi_flags;
-
- l_rtaSize = NLMSG_PAYLOAD(p_hdr, sizeof(struct ifinfomsg));
- for(l_rta = IFLA_RTA(l_info); RTA_OK(l_rta, l_rtaSize); l_rta = RTA_NEXT(l_rta, l_rtaSize))
- {
- void *l_rtaData = RTA_DATA(l_rta);
- size_t l_rtaDataSize = RTA_PAYLOAD(l_rta);
- switch(l_rta->rta_type)
- {
- case IFLA_ADDRESS:
- case IFLA_BROADCAST:
- {
- size_t l_addrLen = calcAddrLen(AF_PACKET, l_rtaDataSize);
- makeSockaddr(AF_PACKET, (struct sockaddr *)l_addr, l_rtaData, l_rtaDataSize);
- ((struct sockaddr_ll *)l_addr)->sll_ifindex = l_info->ifi_index;
- ((struct sockaddr_ll *)l_addr)->sll_hatype = l_info->ifi_type;
- if(l_rta->rta_type == IFLA_ADDRESS)
- {
- l_entry->ifa_addr = (struct sockaddr *)l_addr;
- }
- else
- {
- l_entry->ifa_broadaddr = (struct sockaddr *)l_addr;
- }
- l_addr += NLMSG_ALIGN(l_addrLen);
- break;
- }
- case IFLA_IFNAME:
- strncpy(l_name, l_rtaData, l_rtaDataSize);
- l_name[l_rtaDataSize] = '\0';
- l_entry->ifa_name = l_name;
- break;
- case IFLA_STATS:
- memcpy(l_data, l_rtaData, l_rtaDataSize);
- l_entry->ifa_data = l_data;
- break;
- default:
- break;
- }
- }
-
- addToEnd(p_resultList, l_entry);
- return 0;
-}
-
-static struct ifaddrs *findInterface(int p_index, struct ifaddrs **p_links, int p_numLinks)
-{
- int l_num = 0;
- struct ifaddrs *l_cur = *p_links;
- while(l_cur && l_num < p_numLinks)
- {
- char *l_indexPtr = ((char *)l_cur) + sizeof(struct ifaddrs);
- int l_index;
- memcpy(&l_index, l_indexPtr, sizeof(int));
- if(l_index == p_index)
- {
- return l_cur;
- }
-
- l_cur = l_cur->ifa_next;
- ++l_num;
- }
- return NULL;
-}
-
-static int interpretAddr(struct nlmsghdr *p_hdr, struct ifaddrs **p_resultList, int p_numLinks)
-{
- struct ifaddrmsg *l_info = (struct ifaddrmsg *)NLMSG_DATA(p_hdr);
- struct ifaddrs *l_interface = findInterface(l_info->ifa_index, p_resultList, p_numLinks);
-
- size_t l_nameSize = 0;
- size_t l_addrSize = 0;
-
- int l_addedNetmask = 0;
-
- size_t l_rtaSize = NLMSG_PAYLOAD(p_hdr, sizeof(struct ifaddrmsg));
- struct rtattr *l_rta;
- struct ifaddrs *l_entry;
-
- char *l_name;
- char *l_addr;
-
- for(l_rta = IFLA_RTA(l_info); RTA_OK(l_rta, l_rtaSize); l_rta = RTA_NEXT(l_rta, l_rtaSize))
- {
- size_t l_rtaDataSize = RTA_PAYLOAD(l_rta);
- if(l_info->ifa_family == AF_PACKET)
- {
- continue;
- }
-
- switch(l_rta->rta_type)
- {
- case IFA_ADDRESS:
- case IFA_LOCAL:
- if((l_info->ifa_family == AF_INET || l_info->ifa_family == AF_INET6) && !l_addedNetmask)
- {
- /* Make room for netmask */
- l_addrSize += NLMSG_ALIGN(calcAddrLen(l_info->ifa_family, l_rtaDataSize));
- l_addedNetmask = 1;
- }
- case IFA_BROADCAST:
- l_addrSize += NLMSG_ALIGN(calcAddrLen(l_info->ifa_family, l_rtaDataSize));
- break;
- case IFA_LABEL:
- l_nameSize += NLMSG_ALIGN(l_rtaSize + 1);
- break;
- default:
- break;
- }
- }
-
- l_entry = uv__malloc(sizeof(struct ifaddrs) + l_nameSize + l_addrSize);
- if (l_entry == NULL)
- {
- return -1;
- }
- memset(l_entry, 0, sizeof(struct ifaddrs));
- l_entry->ifa_name = (l_interface ? l_interface->ifa_name : "");
-
- l_name = ((char *)l_entry) + sizeof(struct ifaddrs);
- l_addr = l_name + l_nameSize;
-
- l_entry->ifa_flags = l_info->ifa_flags;
- if(l_interface)
- {
- l_entry->ifa_flags |= l_interface->ifa_flags;
- }
-
- l_rtaSize = NLMSG_PAYLOAD(p_hdr, sizeof(struct ifaddrmsg));
- for(l_rta = IFLA_RTA(l_info); RTA_OK(l_rta, l_rtaSize); l_rta = RTA_NEXT(l_rta, l_rtaSize))
- {
- void *l_rtaData = RTA_DATA(l_rta);
- size_t l_rtaDataSize = RTA_PAYLOAD(l_rta);
- switch(l_rta->rta_type)
- {
- case IFA_ADDRESS:
- case IFA_BROADCAST:
- case IFA_LOCAL:
- {
- size_t l_addrLen = calcAddrLen(l_info->ifa_family, l_rtaDataSize);
- makeSockaddr(l_info->ifa_family, (struct sockaddr *)l_addr, l_rtaData, l_rtaDataSize);
- if(l_info->ifa_family == AF_INET6)
- {
- if(IN6_IS_ADDR_LINKLOCAL((struct in6_addr *)l_rtaData) || IN6_IS_ADDR_MC_LINKLOCAL((struct in6_addr *)l_rtaData))
- {
- ((struct sockaddr_in6 *)l_addr)->sin6_scope_id = l_info->ifa_index;
- }
- }
-
- /* Apparently in a point-to-point network IFA_ADDRESS contains
- * the dest address and IFA_LOCAL contains the local address
- */
- if(l_rta->rta_type == IFA_ADDRESS)
- {
- if(l_entry->ifa_addr)
- {
- l_entry->ifa_dstaddr = (struct sockaddr *)l_addr;
- }
- else
- {
- l_entry->ifa_addr = (struct sockaddr *)l_addr;
- }
- }
- else if(l_rta->rta_type == IFA_LOCAL)
- {
- if(l_entry->ifa_addr)
- {
- l_entry->ifa_dstaddr = l_entry->ifa_addr;
- }
- l_entry->ifa_addr = (struct sockaddr *)l_addr;
- }
- else
- {
- l_entry->ifa_broadaddr = (struct sockaddr *)l_addr;
- }
- l_addr += NLMSG_ALIGN(l_addrLen);
- break;
- }
- case IFA_LABEL:
- strncpy(l_name, l_rtaData, l_rtaDataSize);
- l_name[l_rtaDataSize] = '\0';
- l_entry->ifa_name = l_name;
- break;
- default:
- break;
- }
- }
-
- if(l_entry->ifa_addr && (l_entry->ifa_addr->sa_family == AF_INET || l_entry->ifa_addr->sa_family == AF_INET6))
- {
- unsigned l_maxPrefix = (l_entry->ifa_addr->sa_family == AF_INET ? 32 : 128);
- unsigned l_prefix = (l_info->ifa_prefixlen > l_maxPrefix ? l_maxPrefix : l_info->ifa_prefixlen);
- char l_mask[16] = {0};
- unsigned i;
- for(i=0; i<(l_prefix/8); ++i)
- {
- l_mask[i] = 0xff;
- }
- if(l_prefix % 8)
- {
- l_mask[i] = 0xff << (8 - (l_prefix % 8));
- }
-
- makeSockaddr(l_entry->ifa_addr->sa_family, (struct sockaddr *)l_addr, l_mask, l_maxPrefix / 8);
- l_entry->ifa_netmask = (struct sockaddr *)l_addr;
- }
-
- addToEnd(p_resultList, l_entry);
- return 0;
-}
-
-static int interpretLinks(int p_socket, NetlinkList *p_netlinkList, struct ifaddrs **p_resultList)
-{
-
- int l_numLinks = 0;
- pid_t l_pid = getpid();
- for(; p_netlinkList; p_netlinkList = p_netlinkList->m_next)
- {
- unsigned int l_nlsize = p_netlinkList->m_size;
- struct nlmsghdr *l_hdr;
- for(l_hdr = p_netlinkList->m_data; NLMSG_OK(l_hdr, l_nlsize); l_hdr = NLMSG_NEXT(l_hdr, l_nlsize))
- {
- if((pid_t)l_hdr->nlmsg_pid != l_pid || (int)l_hdr->nlmsg_seq != p_socket)
- {
- continue;
- }
-
- if(l_hdr->nlmsg_type == NLMSG_DONE)
- {
- break;
- }
-
- if(l_hdr->nlmsg_type == RTM_NEWLINK)
- {
- if(interpretLink(l_hdr, p_resultList) == -1)
- {
- return -1;
- }
- ++l_numLinks;
- }
- }
- }
- return l_numLinks;
-}
-
-static int interpretAddrs(int p_socket, NetlinkList *p_netlinkList, struct ifaddrs **p_resultList, int p_numLinks)
-{
- pid_t l_pid = getpid();
- for(; p_netlinkList; p_netlinkList = p_netlinkList->m_next)
- {
- unsigned int l_nlsize = p_netlinkList->m_size;
- struct nlmsghdr *l_hdr;
- for(l_hdr = p_netlinkList->m_data; NLMSG_OK(l_hdr, l_nlsize); l_hdr = NLMSG_NEXT(l_hdr, l_nlsize))
- {
- if((pid_t)l_hdr->nlmsg_pid != l_pid || (int)l_hdr->nlmsg_seq != p_socket)
- {
- continue;
- }
-
- if(l_hdr->nlmsg_type == NLMSG_DONE)
- {
- break;
- }
-
- if(l_hdr->nlmsg_type == RTM_NEWADDR)
- {
- if (interpretAddr(l_hdr, p_resultList, p_numLinks) == -1)
- {
- return -1;
- }
- }
- }
- }
- return 0;
-}
-
-int getifaddrs(struct ifaddrs **ifap)
-{
- int l_socket;
- int l_result;
- int l_numLinks;
- NetlinkList *l_linkResults;
- NetlinkList *l_addrResults;
-
- if(!ifap)
- {
- return -1;
- }
- *ifap = NULL;
-
- l_socket = netlink_socket();
- if(l_socket < 0)
- {
- return -1;
- }
-
- l_linkResults = getResultList(l_socket, RTM_GETLINK);
- if(!l_linkResults)
- {
- close(l_socket);
- return -1;
- }
-
- l_addrResults = getResultList(l_socket, RTM_GETADDR);
- if(!l_addrResults)
- {
- close(l_socket);
- freeResultList(l_linkResults);
- return -1;
- }
-
- l_result = 0;
- l_numLinks = interpretLinks(l_socket, l_linkResults, ifap);
- if(l_numLinks == -1 || interpretAddrs(l_socket, l_addrResults, ifap, l_numLinks) == -1)
- {
- l_result = -1;
- }
-
- freeResultList(l_linkResults);
- freeResultList(l_addrResults);
- close(l_socket);
- return l_result;
-}
-
-void freeifaddrs(struct ifaddrs *ifa)
-{
- struct ifaddrs *l_cur;
- while(ifa)
- {
- l_cur = ifa;
- ifa = ifa->ifa_next;
- uv__free(l_cur);
- }
-}
diff --git a/3rdparty/libuv/src/unix/async.c b/3rdparty/libuv/src/unix/async.c
deleted file mode 100644
index 184b598126e..00000000000
--- a/3rdparty/libuv/src/unix/async.c
+++ /dev/null
@@ -1,290 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-/* This file contains both the uv__async internal infrastructure and the
- * user-facing uv_async_t functions.
- */
-
-#include "uv.h"
-#include "internal.h"
-#include "atomic-ops.h"
-
-#include <errno.h>
-#include <stdio.h> /* snprintf() */
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-static void uv__async_event(uv_loop_t* loop,
- struct uv__async* w,
- unsigned int nevents);
-static int uv__async_eventfd(void);
-
-
-int uv_async_init(uv_loop_t* loop, uv_async_t* handle, uv_async_cb async_cb) {
- int err;
-
- err = uv__async_start(loop, &loop->async_watcher, uv__async_event);
- if (err)
- return err;
-
- uv__handle_init(loop, (uv_handle_t*)handle, UV_ASYNC);
- handle->async_cb = async_cb;
- handle->pending = 0;
-
- QUEUE_INSERT_TAIL(&loop->async_handles, &handle->queue);
- uv__handle_start(handle);
-
- return 0;
-}
-
-
-int uv_async_send(uv_async_t* handle) {
- /* Do a cheap read first. */
- if (ACCESS_ONCE(int, handle->pending) != 0)
- return 0;
-
- if (cmpxchgi(&handle->pending, 0, 1) == 0)
- uv__async_send(&handle->loop->async_watcher);
-
- return 0;
-}
-
-
-void uv__async_close(uv_async_t* handle) {
- QUEUE_REMOVE(&handle->queue);
- uv__handle_stop(handle);
-}
-
-
-static void uv__async_event(uv_loop_t* loop,
- struct uv__async* w,
- unsigned int nevents) {
- QUEUE queue;
- QUEUE* q;
- uv_async_t* h;
-
- QUEUE_MOVE(&loop->async_handles, &queue);
- while (!QUEUE_EMPTY(&queue)) {
- q = QUEUE_HEAD(&queue);
- h = QUEUE_DATA(q, uv_async_t, queue);
-
- QUEUE_REMOVE(q);
- QUEUE_INSERT_TAIL(&loop->async_handles, q);
-
- if (cmpxchgi(&h->pending, 1, 0) == 0)
- continue;
-
- if (h->async_cb == NULL)
- continue;
- h->async_cb(h);
- }
-}
-
-
-static void uv__async_io(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
- struct uv__async* wa;
- char buf[1024];
- unsigned n;
- ssize_t r;
-
- n = 0;
- for (;;) {
- r = read(w->fd, buf, sizeof(buf));
-
- if (r > 0)
- n += r;
-
- if (r == sizeof(buf))
- continue;
-
- if (r != -1)
- break;
-
- if (errno == EAGAIN || errno == EWOULDBLOCK)
- break;
-
- if (errno == EINTR)
- continue;
-
- abort();
- }
-
- wa = container_of(w, struct uv__async, io_watcher);
-
-#if defined(__linux__)
- if (wa->wfd == -1) {
- uint64_t val;
- assert(n == sizeof(val));
- memcpy(&val, buf, sizeof(val)); /* Avoid alignment issues. */
- wa->cb(loop, wa, val);
- return;
- }
-#endif
-
- wa->cb(loop, wa, n);
-}
-
-
-void uv__async_send(struct uv__async* wa) {
- const void* buf;
- ssize_t len;
- int fd;
- int r;
-
- buf = "";
- len = 1;
- fd = wa->wfd;
-
-#if defined(__linux__)
- if (fd == -1) {
- static const uint64_t val = 1;
- buf = &val;
- len = sizeof(val);
- fd = wa->io_watcher.fd; /* eventfd */
- }
-#endif
-
- do
- r = write(fd, buf, len);
- while (r == -1 && errno == EINTR);
-
- if (r == len)
- return;
-
- if (r == -1)
- if (errno == EAGAIN || errno == EWOULDBLOCK)
- return;
-
- abort();
-}
-
-
-void uv__async_init(struct uv__async* wa) {
- wa->io_watcher.fd = -1;
- wa->wfd = -1;
-}
-
-
-int uv__async_start(uv_loop_t* loop, struct uv__async* wa, uv__async_cb cb) {
- int pipefd[2];
- int err;
-
- if (wa->io_watcher.fd != -1)
- return 0;
-
- err = uv__async_eventfd();
- if (err >= 0) {
- pipefd[0] = err;
- pipefd[1] = -1;
- }
- else if (err == -ENOSYS) {
- err = uv__make_pipe(pipefd, UV__F_NONBLOCK);
-#if defined(__linux__)
- /* Save a file descriptor by opening one of the pipe descriptors as
- * read/write through the procfs. That file descriptor can then
- * function as both ends of the pipe.
- */
- if (err == 0) {
- char buf[32];
- int fd;
-
- snprintf(buf, sizeof(buf), "/proc/self/fd/%d", pipefd[0]);
- fd = uv__open_cloexec(buf, O_RDWR);
- if (fd >= 0) {
- uv__close(pipefd[0]);
- uv__close(pipefd[1]);
- pipefd[0] = fd;
- pipefd[1] = fd;
- }
- }
-#endif
- }
-
- if (err < 0)
- return err;
-
- uv__io_init(&wa->io_watcher, uv__async_io, pipefd[0]);
- uv__io_start(loop, &wa->io_watcher, UV__POLLIN);
- wa->wfd = pipefd[1];
- wa->cb = cb;
-
- return 0;
-}
-
-
-void uv__async_stop(uv_loop_t* loop, struct uv__async* wa) {
- if (wa->io_watcher.fd == -1)
- return;
-
- if (wa->wfd != -1) {
- if (wa->wfd != wa->io_watcher.fd)
- uv__close(wa->wfd);
- wa->wfd = -1;
- }
-
- uv__io_stop(loop, &wa->io_watcher, UV__POLLIN);
- uv__close(wa->io_watcher.fd);
- wa->io_watcher.fd = -1;
-}
-
-
-static int uv__async_eventfd() {
-#if defined(__linux__)
- static int no_eventfd2;
- static int no_eventfd;
- int fd;
-
- if (no_eventfd2)
- goto skip_eventfd2;
-
- fd = uv__eventfd2(0, UV__EFD_CLOEXEC | UV__EFD_NONBLOCK);
- if (fd != -1)
- return fd;
-
- if (errno != ENOSYS)
- return -errno;
-
- no_eventfd2 = 1;
-
-skip_eventfd2:
-
- if (no_eventfd)
- goto skip_eventfd;
-
- fd = uv__eventfd(0);
- if (fd != -1) {
- uv__cloexec(fd, 1);
- uv__nonblock(fd, 1);
- return fd;
- }
-
- if (errno != ENOSYS)
- return -errno;
-
- no_eventfd = 1;
-
-skip_eventfd:
-
-#endif
-
- return -ENOSYS;
-}
diff --git a/3rdparty/libuv/src/unix/atomic-ops.h b/3rdparty/libuv/src/unix/atomic-ops.h
deleted file mode 100644
index 84e471838be..00000000000
--- a/3rdparty/libuv/src/unix/atomic-ops.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* Copyright (c) 2013, Ben Noordhuis <info@bnoordhuis.nl>
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifndef UV_ATOMIC_OPS_H_
-#define UV_ATOMIC_OPS_H_
-
-#include "internal.h" /* UV_UNUSED */
-
-#if defined(__SUNPRO_C) || defined(__SUNPRO_CC)
-#include <atomic.h>
-#define __sync_val_compare_and_swap(p, o, n) atomic_cas_ptr(p, o, n)
-#endif
-
-UV_UNUSED(static int cmpxchgi(int* ptr, int oldval, int newval));
-UV_UNUSED(static long cmpxchgl(long* ptr, long oldval, long newval));
-UV_UNUSED(static void cpu_relax(void));
-
-/* Prefer hand-rolled assembly over the gcc builtins because the latter also
- * issue full memory barriers.
- */
-UV_UNUSED(static int cmpxchgi(int* ptr, int oldval, int newval)) {
-#if defined(__i386__) || defined(__x86_64__)
- int out;
- __asm__ __volatile__ ("lock; cmpxchg %2, %1;"
- : "=a" (out), "+m" (*(volatile int*) ptr)
- : "r" (newval), "0" (oldval)
- : "memory");
- return out;
-#elif defined(_AIX) && defined(__xlC__)
- const int out = (*(volatile int*) ptr);
- __compare_and_swap(ptr, &oldval, newval);
- return out;
-#else
- return __sync_val_compare_and_swap(ptr, oldval, newval);
-#endif
-}
-
-UV_UNUSED(static long cmpxchgl(long* ptr, long oldval, long newval)) {
-#if defined(__i386__) || defined(__x86_64__)
- long out;
- __asm__ __volatile__ ("lock; cmpxchg %2, %1;"
- : "=a" (out), "+m" (*(volatile long*) ptr)
- : "r" (newval), "0" (oldval)
- : "memory");
- return out;
-#elif defined(_AIX) && defined(__xlC__)
- const long out = (*(volatile int*) ptr);
-# if defined(__64BIT__)
- __compare_and_swaplp(ptr, &oldval, newval);
-# else
- __compare_and_swap(ptr, &oldval, newval);
-# endif /* if defined(__64BIT__) */
- return out;
-#else
- return __sync_val_compare_and_swap(ptr, oldval, newval);
-#endif
-}
-
-UV_UNUSED(static void cpu_relax(void)) {
-#if defined(__i386__) || defined(__x86_64__)
- __asm__ __volatile__ ("rep; nop"); /* a.k.a. PAUSE */
-#endif
-}
-
-#endif /* UV_ATOMIC_OPS_H_ */
diff --git a/3rdparty/libuv/src/unix/core.c b/3rdparty/libuv/src/unix/core.c
deleted file mode 100644
index cedd86ed34a..00000000000
--- a/3rdparty/libuv/src/unix/core.c
+++ /dev/null
@@ -1,1104 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "internal.h"
-
-#include <stddef.h> /* NULL */
-#include <stdio.h> /* printf */
-#include <stdlib.h>
-#include <string.h> /* strerror */
-#include <errno.h>
-#include <assert.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <limits.h> /* INT_MAX, PATH_MAX, IOV_MAX */
-#include <sys/uio.h> /* writev */
-#include <sys/resource.h> /* getrusage */
-#include <pwd.h>
-
-#ifdef __linux__
-# include <sys/ioctl.h>
-#endif
-
-#ifdef __sun
-# include <sys/types.h>
-# include <sys/wait.h>
-#endif
-
-#ifdef __APPLE__
-# include <mach-o/dyld.h> /* _NSGetExecutablePath */
-# include <sys/filio.h>
-# include <sys/ioctl.h>
-#endif
-
-#if defined(__FreeBSD__) || defined(__DragonFly__)
-# include <sys/sysctl.h>
-# include <sys/filio.h>
-# include <sys/ioctl.h>
-# include <sys/wait.h>
-# define UV__O_CLOEXEC O_CLOEXEC
-# if defined(__FreeBSD__) && __FreeBSD__ >= 10
-# define uv__accept4 accept4
-# define UV__SOCK_NONBLOCK SOCK_NONBLOCK
-# define UV__SOCK_CLOEXEC SOCK_CLOEXEC
-# endif
-# if !defined(F_DUP2FD_CLOEXEC) && defined(_F_DUP2FD_CLOEXEC)
-# define F_DUP2FD_CLOEXEC _F_DUP2FD_CLOEXEC
-# endif
-#endif
-
-#ifdef _AIX
-#include <sys/ioctl.h>
-#endif
-
-#if defined(__ANDROID_API__) && __ANDROID_API__ < 21
-# include <dlfcn.h> /* for dlsym */
-#endif
-
-static int uv__run_pending(uv_loop_t* loop);
-
-/* Verify that uv_buf_t is ABI-compatible with struct iovec. */
-STATIC_ASSERT(sizeof(uv_buf_t) == sizeof(struct iovec));
-STATIC_ASSERT(sizeof(&((uv_buf_t*) 0)->base) ==
- sizeof(((struct iovec*) 0)->iov_base));
-STATIC_ASSERT(sizeof(&((uv_buf_t*) 0)->len) ==
- sizeof(((struct iovec*) 0)->iov_len));
-STATIC_ASSERT(offsetof(uv_buf_t, base) == offsetof(struct iovec, iov_base));
-STATIC_ASSERT(offsetof(uv_buf_t, len) == offsetof(struct iovec, iov_len));
-
-
-uint64_t uv_hrtime(void) {
- return uv__hrtime(UV_CLOCK_PRECISE);
-}
-
-
-void uv_close(uv_handle_t* handle, uv_close_cb close_cb) {
- assert(!(handle->flags & (UV_CLOSING | UV_CLOSED)));
-
- handle->flags |= UV_CLOSING;
- handle->close_cb = close_cb;
-
- switch (handle->type) {
- case UV_NAMED_PIPE:
- uv__pipe_close((uv_pipe_t*)handle);
- break;
-
- case UV_TTY:
- uv__stream_close((uv_stream_t*)handle);
- break;
-
- case UV_TCP:
- uv__tcp_close((uv_tcp_t*)handle);
- break;
-
- case UV_UDP:
- uv__udp_close((uv_udp_t*)handle);
- break;
-
- case UV_PREPARE:
- uv__prepare_close((uv_prepare_t*)handle);
- break;
-
- case UV_CHECK:
- uv__check_close((uv_check_t*)handle);
- break;
-
- case UV_IDLE:
- uv__idle_close((uv_idle_t*)handle);
- break;
-
- case UV_ASYNC:
- uv__async_close((uv_async_t*)handle);
- break;
-
- case UV_TIMER:
- uv__timer_close((uv_timer_t*)handle);
- break;
-
- case UV_PROCESS:
- uv__process_close((uv_process_t*)handle);
- break;
-
- case UV_FS_EVENT:
- uv__fs_event_close((uv_fs_event_t*)handle);
- break;
-
- case UV_POLL:
- uv__poll_close((uv_poll_t*)handle);
- break;
-
- case UV_FS_POLL:
- uv__fs_poll_close((uv_fs_poll_t*)handle);
- break;
-
- case UV_SIGNAL:
- uv__signal_close((uv_signal_t*) handle);
- /* Signal handles may not be closed immediately. The signal code will */
- /* itself close uv__make_close_pending whenever appropriate. */
- return;
-
- default:
- assert(0);
- }
-
- uv__make_close_pending(handle);
-}
-
-int uv__socket_sockopt(uv_handle_t* handle, int optname, int* value) {
- int r;
- int fd;
- socklen_t len;
-
- if (handle == NULL || value == NULL)
- return -EINVAL;
-
- if (handle->type == UV_TCP || handle->type == UV_NAMED_PIPE)
- fd = uv__stream_fd((uv_stream_t*) handle);
- else if (handle->type == UV_UDP)
- fd = ((uv_udp_t *) handle)->io_watcher.fd;
- else
- return -ENOTSUP;
-
- len = sizeof(*value);
-
- if (*value == 0)
- r = getsockopt(fd, SOL_SOCKET, optname, value, &len);
- else
- r = setsockopt(fd, SOL_SOCKET, optname, (const void*) value, len);
-
- if (r < 0)
- return -errno;
-
- return 0;
-}
-
-void uv__make_close_pending(uv_handle_t* handle) {
- assert(handle->flags & UV_CLOSING);
- assert(!(handle->flags & UV_CLOSED));
- handle->next_closing = handle->loop->closing_handles;
- handle->loop->closing_handles = handle;
-}
-
-int uv__getiovmax(void) {
-#if defined(IOV_MAX)
- return IOV_MAX;
-#elif defined(_SC_IOV_MAX)
- static int iovmax = -1;
- if (iovmax == -1) {
- iovmax = sysconf(_SC_IOV_MAX);
- /* On some embedded devices (arm-linux-uclibc based ip camera),
- * sysconf(_SC_IOV_MAX) can not get the correct value. The return
- * value is -1 and the errno is EINPROGRESS. Degrade the value to 1.
- */
- if (iovmax == -1) iovmax = 1;
- }
- return iovmax;
-#else
- return 1024;
-#endif
-}
-
-
-static void uv__finish_close(uv_handle_t* handle) {
- /* Note: while the handle is in the UV_CLOSING state now, it's still possible
- * for it to be active in the sense that uv__is_active() returns true.
- * A good example is when the user calls uv_shutdown(), immediately followed
- * by uv_close(). The handle is considered active at this point because the
- * completion of the shutdown req is still pending.
- */
- assert(handle->flags & UV_CLOSING);
- assert(!(handle->flags & UV_CLOSED));
- handle->flags |= UV_CLOSED;
-
- switch (handle->type) {
- case UV_PREPARE:
- case UV_CHECK:
- case UV_IDLE:
- case UV_ASYNC:
- case UV_TIMER:
- case UV_PROCESS:
- case UV_FS_EVENT:
- case UV_FS_POLL:
- case UV_POLL:
- case UV_SIGNAL:
- break;
-
- case UV_NAMED_PIPE:
- case UV_TCP:
- case UV_TTY:
- uv__stream_destroy((uv_stream_t*)handle);
- break;
-
- case UV_UDP:
- uv__udp_finish_close((uv_udp_t*)handle);
- break;
-
- default:
- assert(0);
- break;
- }
-
- uv__handle_unref(handle);
- QUEUE_REMOVE(&handle->handle_queue);
-
- if (handle->close_cb) {
- handle->close_cb(handle);
- }
-}
-
-
-static void uv__run_closing_handles(uv_loop_t* loop) {
- uv_handle_t* p;
- uv_handle_t* q;
-
- p = loop->closing_handles;
- loop->closing_handles = NULL;
-
- while (p) {
- q = p->next_closing;
- uv__finish_close(p);
- p = q;
- }
-}
-
-
-int uv_is_closing(const uv_handle_t* handle) {
- return uv__is_closing(handle);
-}
-
-
-int uv_backend_fd(const uv_loop_t* loop) {
- return loop->backend_fd;
-}
-
-
-int uv_backend_timeout(const uv_loop_t* loop) {
- if (loop->stop_flag != 0)
- return 0;
-
- if (!uv__has_active_handles(loop) && !uv__has_active_reqs(loop))
- return 0;
-
- if (!QUEUE_EMPTY(&loop->idle_handles))
- return 0;
-
- if (!QUEUE_EMPTY(&loop->pending_queue))
- return 0;
-
- if (loop->closing_handles)
- return 0;
-
- return uv__next_timeout(loop);
-}
-
-
-static int uv__loop_alive(const uv_loop_t* loop) {
- return uv__has_active_handles(loop) ||
- uv__has_active_reqs(loop) ||
- loop->closing_handles != NULL;
-}
-
-
-int uv_loop_alive(const uv_loop_t* loop) {
- return uv__loop_alive(loop);
-}
-
-
-int uv_run(uv_loop_t* loop, uv_run_mode mode) {
- int timeout;
- int r;
- int ran_pending;
-
- r = uv__loop_alive(loop);
- if (!r)
- uv__update_time(loop);
-
- while (r != 0 && loop->stop_flag == 0) {
- uv__update_time(loop);
- uv__run_timers(loop);
- ran_pending = uv__run_pending(loop);
- uv__run_idle(loop);
- uv__run_prepare(loop);
-
- timeout = 0;
- if ((mode == UV_RUN_ONCE && !ran_pending) || mode == UV_RUN_DEFAULT)
- timeout = uv_backend_timeout(loop);
-
- uv__io_poll(loop, timeout);
- uv__run_check(loop);
- uv__run_closing_handles(loop);
-
- if (mode == UV_RUN_ONCE) {
- /* UV_RUN_ONCE implies forward progress: at least one callback must have
- * been invoked when it returns. uv__io_poll() can return without doing
- * I/O (meaning: no callbacks) when its timeout expires - which means we
- * have pending timers that satisfy the forward progress constraint.
- *
- * UV_RUN_NOWAIT makes no guarantees about progress so it's omitted from
- * the check.
- */
- uv__update_time(loop);
- uv__run_timers(loop);
- }
-
- r = uv__loop_alive(loop);
- if (mode == UV_RUN_ONCE || mode == UV_RUN_NOWAIT)
- break;
- }
-
- /* The if statement lets gcc compile it to a conditional store. Avoids
- * dirtying a cache line.
- */
- if (loop->stop_flag != 0)
- loop->stop_flag = 0;
-
- return r;
-}
-
-
-void uv_update_time(uv_loop_t* loop) {
- uv__update_time(loop);
-}
-
-
-int uv_is_active(const uv_handle_t* handle) {
- return uv__is_active(handle);
-}
-
-
-/* Open a socket in non-blocking close-on-exec mode, atomically if possible. */
-int uv__socket(int domain, int type, int protocol) {
- int sockfd;
- int err;
-
-#if defined(SOCK_NONBLOCK) && defined(SOCK_CLOEXEC)
- sockfd = socket(domain, type | SOCK_NONBLOCK | SOCK_CLOEXEC, protocol);
- if (sockfd != -1)
- return sockfd;
-
- if (errno != EINVAL)
- return -errno;
-#endif
-
- sockfd = socket(domain, type, protocol);
- if (sockfd == -1)
- return -errno;
-
- err = uv__nonblock(sockfd, 1);
- if (err == 0)
- err = uv__cloexec(sockfd, 1);
-
- if (err) {
- uv__close(sockfd);
- return err;
- }
-
-#if defined(SO_NOSIGPIPE)
- {
- int on = 1;
- setsockopt(sockfd, SOL_SOCKET, SO_NOSIGPIPE, &on, sizeof(on));
- }
-#endif
-
- return sockfd;
-}
-
-
-int uv__accept(int sockfd) {
- int peerfd;
- int err;
-
- assert(sockfd >= 0);
-
- while (1) {
-#if defined(__linux__) || __FreeBSD__ >= 10
- static int no_accept4;
-
- if (no_accept4)
- goto skip;
-
- peerfd = uv__accept4(sockfd,
- NULL,
- NULL,
- UV__SOCK_NONBLOCK|UV__SOCK_CLOEXEC);
- if (peerfd != -1)
- return peerfd;
-
- if (errno == EINTR)
- continue;
-
- if (errno != ENOSYS)
- return -errno;
-
- no_accept4 = 1;
-skip:
-#endif
-
- peerfd = accept(sockfd, NULL, NULL);
- if (peerfd == -1) {
- if (errno == EINTR)
- continue;
- return -errno;
- }
-
- err = uv__cloexec(peerfd, 1);
- if (err == 0)
- err = uv__nonblock(peerfd, 1);
-
- if (err) {
- uv__close(peerfd);
- return err;
- }
-
- return peerfd;
- }
-}
-
-
-int uv__close(int fd) {
- int saved_errno;
- int rc;
-
- assert(fd > -1); /* Catch uninitialized io_watcher.fd bugs. */
- assert(fd > STDERR_FILENO); /* Catch stdio close bugs. */
-
- saved_errno = errno;
- rc = close(fd);
- if (rc == -1) {
- rc = -errno;
- if (rc == -EINTR)
- rc = -EINPROGRESS; /* For platform/libc consistency. */
- errno = saved_errno;
- }
-
- return rc;
-}
-
-
-#if defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) || \
- defined(_AIX) || defined(__DragonFly__)
-
-int uv__nonblock(int fd, int set) {
- int r;
-
- do
- r = ioctl(fd, FIONBIO, &set);
- while (r == -1 && errno == EINTR);
-
- if (r)
- return -errno;
-
- return 0;
-}
-
-
-int uv__cloexec(int fd, int set) {
- int r;
-
- do
- r = ioctl(fd, set ? FIOCLEX : FIONCLEX);
- while (r == -1 && errno == EINTR);
-
- if (r)
- return -errno;
-
- return 0;
-}
-
-#else /* !(defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) || \
- defined(_AIX) || defined(__DragonFly__)) */
-
-int uv__nonblock(int fd, int set) {
- int flags;
- int r;
-
- do
- r = fcntl(fd, F_GETFL);
- while (r == -1 && errno == EINTR);
-
- if (r == -1)
- return -errno;
-
- /* Bail out now if already set/clear. */
- if (!!(r & O_NONBLOCK) == !!set)
- return 0;
-
- if (set)
- flags = r | O_NONBLOCK;
- else
- flags = r & ~O_NONBLOCK;
-
- do
- r = fcntl(fd, F_SETFL, flags);
- while (r == -1 && errno == EINTR);
-
- if (r)
- return -errno;
-
- return 0;
-}
-
-
-int uv__cloexec(int fd, int set) {
- int flags;
- int r;
-
- do
- r = fcntl(fd, F_GETFD);
- while (r == -1 && errno == EINTR);
-
- if (r == -1)
- return -errno;
-
- /* Bail out now if already set/clear. */
- if (!!(r & FD_CLOEXEC) == !!set)
- return 0;
-
- if (set)
- flags = r | FD_CLOEXEC;
- else
- flags = r & ~FD_CLOEXEC;
-
- do
- r = fcntl(fd, F_SETFD, flags);
- while (r == -1 && errno == EINTR);
-
- if (r)
- return -errno;
-
- return 0;
-}
-
-#endif /* defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) || \
- defined(_AIX) || defined(__DragonFly__) */
-
-
-/* This function is not execve-safe, there is a race window
- * between the call to dup() and fcntl(FD_CLOEXEC).
- */
-int uv__dup(int fd) {
- int err;
-
- fd = dup(fd);
-
- if (fd == -1)
- return -errno;
-
- err = uv__cloexec(fd, 1);
- if (err) {
- uv__close(fd);
- return err;
- }
-
- return fd;
-}
-
-
-ssize_t uv__recvmsg(int fd, struct msghdr* msg, int flags) {
- struct cmsghdr* cmsg;
- ssize_t rc;
- int* pfd;
- int* end;
-#if defined(__linux__)
- static int no_msg_cmsg_cloexec;
- if (no_msg_cmsg_cloexec == 0) {
- rc = recvmsg(fd, msg, flags | 0x40000000); /* MSG_CMSG_CLOEXEC */
- if (rc != -1)
- return rc;
- if (errno != EINVAL)
- return -errno;
- rc = recvmsg(fd, msg, flags);
- if (rc == -1)
- return -errno;
- no_msg_cmsg_cloexec = 1;
- } else {
- rc = recvmsg(fd, msg, flags);
- }
-#else
- rc = recvmsg(fd, msg, flags);
-#endif
- if (rc == -1)
- return -errno;
- if (msg->msg_controllen == 0)
- return rc;
- for (cmsg = CMSG_FIRSTHDR(msg); cmsg != NULL; cmsg = CMSG_NXTHDR(msg, cmsg))
- if (cmsg->cmsg_type == SCM_RIGHTS)
- for (pfd = (int*) CMSG_DATA(cmsg),
- end = (int*) ((char*) cmsg + cmsg->cmsg_len);
- pfd < end;
- pfd += 1)
- uv__cloexec(*pfd, 1);
- return rc;
-}
-
-
-int uv_cwd(char* buffer, size_t* size) {
- if (buffer == NULL || size == NULL)
- return -EINVAL;
-
- if (getcwd(buffer, *size) == NULL)
- return -errno;
-
- *size = strlen(buffer);
- if (*size > 1 && buffer[*size - 1] == '/') {
- buffer[*size-1] = '\0';
- (*size)--;
- }
-
- return 0;
-}
-
-
-int uv_chdir(const char* dir) {
- if (chdir(dir))
- return -errno;
-
- return 0;
-}
-
-
-void uv_disable_stdio_inheritance(void) {
- int fd;
-
- /* Set the CLOEXEC flag on all open descriptors. Unconditionally try the
- * first 16 file descriptors. After that, bail out after the first error.
- */
- for (fd = 0; ; fd++)
- if (uv__cloexec(fd, 1) && fd > 15)
- break;
-}
-
-
-int uv_fileno(const uv_handle_t* handle, uv_os_fd_t* fd) {
- int fd_out;
-
- switch (handle->type) {
- case UV_TCP:
- case UV_NAMED_PIPE:
- case UV_TTY:
- fd_out = uv__stream_fd((uv_stream_t*) handle);
- break;
-
- case UV_UDP:
- fd_out = ((uv_udp_t *) handle)->io_watcher.fd;
- break;
-
- case UV_POLL:
- fd_out = ((uv_poll_t *) handle)->io_watcher.fd;
- break;
-
- default:
- return -EINVAL;
- }
-
- if (uv__is_closing(handle) || fd_out == -1)
- return -EBADF;
-
- *fd = fd_out;
- return 0;
-}
-
-
-static int uv__run_pending(uv_loop_t* loop) {
- QUEUE* q;
- QUEUE pq;
- uv__io_t* w;
-
- if (QUEUE_EMPTY(&loop->pending_queue))
- return 0;
-
- QUEUE_MOVE(&loop->pending_queue, &pq);
-
- while (!QUEUE_EMPTY(&pq)) {
- q = QUEUE_HEAD(&pq);
- QUEUE_REMOVE(q);
- QUEUE_INIT(q);
- w = QUEUE_DATA(q, uv__io_t, pending_queue);
- w->cb(loop, w, UV__POLLOUT);
- }
-
- return 1;
-}
-
-
-static unsigned int next_power_of_two(unsigned int val) {
- val -= 1;
- val |= val >> 1;
- val |= val >> 2;
- val |= val >> 4;
- val |= val >> 8;
- val |= val >> 16;
- val += 1;
- return val;
-}
-
-static void maybe_resize(uv_loop_t* loop, unsigned int len) {
- uv__io_t** watchers;
- void* fake_watcher_list;
- void* fake_watcher_count;
- unsigned int nwatchers;
- unsigned int i;
-
- if (len <= loop->nwatchers)
- return;
-
- /* Preserve fake watcher list and count at the end of the watchers */
- if (loop->watchers != NULL) {
- fake_watcher_list = loop->watchers[loop->nwatchers];
- fake_watcher_count = loop->watchers[loop->nwatchers + 1];
- } else {
- fake_watcher_list = NULL;
- fake_watcher_count = NULL;
- }
-
- nwatchers = next_power_of_two(len + 2) - 2;
- watchers = uv__realloc(loop->watchers,
- (nwatchers + 2) * sizeof(loop->watchers[0]));
-
- if (watchers == NULL)
- abort();
- for (i = loop->nwatchers; i < nwatchers; i++)
- watchers[i] = NULL;
- watchers[nwatchers] = fake_watcher_list;
- watchers[nwatchers + 1] = fake_watcher_count;
-
- loop->watchers = watchers;
- loop->nwatchers = nwatchers;
-}
-
-
-void uv__io_init(uv__io_t* w, uv__io_cb cb, int fd) {
- assert(cb != NULL);
- assert(fd >= -1);
- QUEUE_INIT(&w->pending_queue);
- QUEUE_INIT(&w->watcher_queue);
- w->cb = cb;
- w->fd = fd;
- w->events = 0;
- w->pevents = 0;
-
-#if defined(UV_HAVE_KQUEUE)
- w->rcount = 0;
- w->wcount = 0;
-#endif /* defined(UV_HAVE_KQUEUE) */
-}
-
-
-void uv__io_start(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
- assert(0 == (events & ~(UV__POLLIN | UV__POLLOUT)));
- assert(0 != events);
- assert(w->fd >= 0);
- assert(w->fd < INT_MAX);
-
- w->pevents |= events;
- maybe_resize(loop, w->fd + 1);
-
-#if !defined(__sun)
- /* The event ports backend needs to rearm all file descriptors on each and
- * every tick of the event loop but the other backends allow us to
- * short-circuit here if the event mask is unchanged.
- */
- if (w->events == w->pevents) {
- if (w->events == 0 && !QUEUE_EMPTY(&w->watcher_queue)) {
- QUEUE_REMOVE(&w->watcher_queue);
- QUEUE_INIT(&w->watcher_queue);
- }
- return;
- }
-#endif
-
- if (QUEUE_EMPTY(&w->watcher_queue))
- QUEUE_INSERT_TAIL(&loop->watcher_queue, &w->watcher_queue);
-
- if (loop->watchers[w->fd] == NULL) {
- loop->watchers[w->fd] = w;
- loop->nfds++;
- }
-}
-
-
-void uv__io_stop(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
- assert(0 == (events & ~(UV__POLLIN | UV__POLLOUT)));
- assert(0 != events);
-
- if (w->fd == -1)
- return;
-
- assert(w->fd >= 0);
-
- /* Happens when uv__io_stop() is called on a handle that was never started. */
- if ((unsigned) w->fd >= loop->nwatchers)
- return;
-
- w->pevents &= ~events;
-
- if (w->pevents == 0) {
- QUEUE_REMOVE(&w->watcher_queue);
- QUEUE_INIT(&w->watcher_queue);
-
- if (loop->watchers[w->fd] != NULL) {
- assert(loop->watchers[w->fd] == w);
- assert(loop->nfds > 0);
- loop->watchers[w->fd] = NULL;
- loop->nfds--;
- w->events = 0;
- }
- }
- else if (QUEUE_EMPTY(&w->watcher_queue))
- QUEUE_INSERT_TAIL(&loop->watcher_queue, &w->watcher_queue);
-}
-
-
-void uv__io_close(uv_loop_t* loop, uv__io_t* w) {
- uv__io_stop(loop, w, UV__POLLIN | UV__POLLOUT);
- QUEUE_REMOVE(&w->pending_queue);
-
- /* Remove stale events for this file descriptor */
- uv__platform_invalidate_fd(loop, w->fd);
-}
-
-
-void uv__io_feed(uv_loop_t* loop, uv__io_t* w) {
- if (QUEUE_EMPTY(&w->pending_queue))
- QUEUE_INSERT_TAIL(&loop->pending_queue, &w->pending_queue);
-}
-
-
-int uv__io_active(const uv__io_t* w, unsigned int events) {
- assert(0 == (events & ~(UV__POLLIN | UV__POLLOUT)));
- assert(0 != events);
- return 0 != (w->pevents & events);
-}
-
-
-int uv_getrusage(uv_rusage_t* rusage) {
- struct rusage usage;
-
- if (getrusage(RUSAGE_SELF, &usage))
- return -errno;
-
- rusage->ru_utime.tv_sec = usage.ru_utime.tv_sec;
- rusage->ru_utime.tv_usec = usage.ru_utime.tv_usec;
-
- rusage->ru_stime.tv_sec = usage.ru_stime.tv_sec;
- rusage->ru_stime.tv_usec = usage.ru_stime.tv_usec;
-
- rusage->ru_maxrss = usage.ru_maxrss;
- rusage->ru_ixrss = usage.ru_ixrss;
- rusage->ru_idrss = usage.ru_idrss;
- rusage->ru_isrss = usage.ru_isrss;
- rusage->ru_minflt = usage.ru_minflt;
- rusage->ru_majflt = usage.ru_majflt;
- rusage->ru_nswap = usage.ru_nswap;
- rusage->ru_inblock = usage.ru_inblock;
- rusage->ru_oublock = usage.ru_oublock;
- rusage->ru_msgsnd = usage.ru_msgsnd;
- rusage->ru_msgrcv = usage.ru_msgrcv;
- rusage->ru_nsignals = usage.ru_nsignals;
- rusage->ru_nvcsw = usage.ru_nvcsw;
- rusage->ru_nivcsw = usage.ru_nivcsw;
-
- return 0;
-}
-
-
-int uv__open_cloexec(const char* path, int flags) {
- int err;
- int fd;
-
-#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD__ >= 9) || \
- defined(__DragonFly__)
- static int no_cloexec;
-
- if (!no_cloexec) {
- fd = open(path, flags | UV__O_CLOEXEC);
- if (fd != -1)
- return fd;
-
- if (errno != EINVAL)
- return -errno;
-
- /* O_CLOEXEC not supported. */
- no_cloexec = 1;
- }
-#endif
-
- fd = open(path, flags);
- if (fd == -1)
- return -errno;
-
- err = uv__cloexec(fd, 1);
- if (err) {
- uv__close(fd);
- return err;
- }
-
- return fd;
-}
-
-
-int uv__dup2_cloexec(int oldfd, int newfd) {
- int r;
-#if defined(__FreeBSD__) && __FreeBSD__ >= 10
- r = dup3(oldfd, newfd, O_CLOEXEC);
- if (r == -1)
- return -errno;
- return r;
-#elif defined(__FreeBSD__) && defined(F_DUP2FD_CLOEXEC)
- r = fcntl(oldfd, F_DUP2FD_CLOEXEC, newfd);
- if (r != -1)
- return r;
- if (errno != EINVAL)
- return -errno;
- /* Fall through. */
-#elif defined(__linux__)
- static int no_dup3;
- if (!no_dup3) {
- do
- r = uv__dup3(oldfd, newfd, UV__O_CLOEXEC);
- while (r == -1 && errno == EBUSY);
- if (r != -1)
- return r;
- if (errno != ENOSYS)
- return -errno;
- /* Fall through. */
- no_dup3 = 1;
- }
-#endif
- {
- int err;
- do
- r = dup2(oldfd, newfd);
-#if defined(__linux__)
- while (r == -1 && errno == EBUSY);
-#else
- while (0); /* Never retry. */
-#endif
-
- if (r == -1)
- return -errno;
-
- err = uv__cloexec(newfd, 1);
- if (err) {
- uv__close(newfd);
- return err;
- }
-
- return r;
- }
-}
-
-
-int uv_os_homedir(char* buffer, size_t* size) {
- struct passwd pw;
- struct passwd* result;
- char* buf;
- uid_t uid;
- size_t bufsize;
- size_t len;
- long initsize;
- int r;
-#if defined(__ANDROID_API__) && __ANDROID_API__ < 21
- int (*getpwuid_r)(uid_t, struct passwd*, char*, size_t, struct passwd**);
-#endif
-
- if (buffer == NULL || size == NULL || *size == 0)
- return -EINVAL;
-
- /* Check if the HOME environment variable is set first */
- buf = getenv("HOME");
-
- if (buf != NULL) {
- len = strlen(buf);
-
- if (len >= *size) {
- *size = len;
- return -ENOBUFS;
- }
-
- memcpy(buffer, buf, len + 1);
- *size = len;
-
- return 0;
- }
-
-#if defined(__ANDROID_API__) && __ANDROID_API__ < 21
- getpwuid_r = dlsym(RTLD_DEFAULT, "getpwuid_r");
- if (getpwuid_r == NULL)
- return -ENOSYS;
-#endif
-
- /* HOME is not set, so call getpwuid() */
- initsize = sysconf(_SC_GETPW_R_SIZE_MAX);
-
- if (initsize <= 0)
- bufsize = 4096;
- else
- bufsize = (size_t) initsize;
-
- uid = getuid();
- buf = NULL;
-
- for (;;) {
- uv__free(buf);
- buf = uv__malloc(bufsize);
-
- if (buf == NULL)
- return -ENOMEM;
-
- r = getpwuid_r(uid, &pw, buf, bufsize, &result);
-
- if (r != ERANGE)
- break;
-
- bufsize *= 2;
- }
-
- if (r != 0) {
- uv__free(buf);
- return -r;
- }
-
- if (result == NULL) {
- uv__free(buf);
- return -ENOENT;
- }
-
- len = strlen(pw.pw_dir);
-
- if (len >= *size) {
- *size = len;
- uv__free(buf);
- return -ENOBUFS;
- }
-
- memcpy(buffer, pw.pw_dir, len + 1);
- *size = len;
- uv__free(buf);
-
- return 0;
-}
diff --git a/3rdparty/libuv/src/unix/darwin-proctitle.c b/3rdparty/libuv/src/unix/darwin-proctitle.c
deleted file mode 100644
index 1142311609f..00000000000
--- a/3rdparty/libuv/src/unix/darwin-proctitle.c
+++ /dev/null
@@ -1,206 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include <dlfcn.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <TargetConditionals.h>
-
-#if !TARGET_OS_IPHONE
-# include <CoreFoundation/CoreFoundation.h>
-# include <ApplicationServices/ApplicationServices.h>
-#endif
-
-
-static int uv__pthread_setname_np(const char* name) {
- int (*dynamic_pthread_setname_np)(const char* name);
- char namebuf[64]; /* MAXTHREADNAMESIZE */
- int err;
-
- /* pthread_setname_np() first appeared in OS X 10.6 and iOS 3.2. */
- *(void **)(&dynamic_pthread_setname_np) =
- dlsym(RTLD_DEFAULT, "pthread_setname_np");
-
- if (dynamic_pthread_setname_np == NULL)
- return -ENOSYS;
-
- strncpy(namebuf, name, sizeof(namebuf) - 1);
- namebuf[sizeof(namebuf) - 1] = '\0';
-
- err = dynamic_pthread_setname_np(namebuf);
- if (err)
- return -err;
-
- return 0;
-}
-
-
-int uv__set_process_title(const char* title) {
-#if TARGET_OS_IPHONE
- return uv__pthread_setname_np(title);
-#else
- CFStringRef (*pCFStringCreateWithCString)(CFAllocatorRef,
- const char*,
- CFStringEncoding);
- CFBundleRef (*pCFBundleGetBundleWithIdentifier)(CFStringRef);
- void *(*pCFBundleGetDataPointerForName)(CFBundleRef, CFStringRef);
- void *(*pCFBundleGetFunctionPointerForName)(CFBundleRef, CFStringRef);
- CFTypeRef (*pLSGetCurrentApplicationASN)(void);
- OSStatus (*pLSSetApplicationInformationItem)(int,
- CFTypeRef,
- CFStringRef,
- CFStringRef,
- CFDictionaryRef*);
- void* application_services_handle;
- void* core_foundation_handle;
- CFBundleRef launch_services_bundle;
- CFStringRef* display_name_key;
- CFDictionaryRef (*pCFBundleGetInfoDictionary)(CFBundleRef);
- CFBundleRef (*pCFBundleGetMainBundle)(void);
- CFBundleRef hi_services_bundle;
- OSStatus (*pSetApplicationIsDaemon)(int);
- CFDictionaryRef (*pLSApplicationCheckIn)(int, CFDictionaryRef);
- void (*pLSSetApplicationLaunchServicesServerConnectionStatus)(uint64_t,
- void*);
- CFTypeRef asn;
- int err;
-
- err = -ENOENT;
- application_services_handle = dlopen("/System/Library/Frameworks/"
- "ApplicationServices.framework/"
- "Versions/A/ApplicationServices",
- RTLD_LAZY | RTLD_LOCAL);
- core_foundation_handle = dlopen("/System/Library/Frameworks/"
- "CoreFoundation.framework/"
- "Versions/A/CoreFoundation",
- RTLD_LAZY | RTLD_LOCAL);
-
- if (application_services_handle == NULL || core_foundation_handle == NULL)
- goto out;
-
- *(void **)(&pCFStringCreateWithCString) =
- dlsym(core_foundation_handle, "CFStringCreateWithCString");
- *(void **)(&pCFBundleGetBundleWithIdentifier) =
- dlsym(core_foundation_handle, "CFBundleGetBundleWithIdentifier");
- *(void **)(&pCFBundleGetDataPointerForName) =
- dlsym(core_foundation_handle, "CFBundleGetDataPointerForName");
- *(void **)(&pCFBundleGetFunctionPointerForName) =
- dlsym(core_foundation_handle, "CFBundleGetFunctionPointerForName");
-
- if (pCFStringCreateWithCString == NULL ||
- pCFBundleGetBundleWithIdentifier == NULL ||
- pCFBundleGetDataPointerForName == NULL ||
- pCFBundleGetFunctionPointerForName == NULL) {
- goto out;
- }
-
-#define S(s) pCFStringCreateWithCString(NULL, (s), kCFStringEncodingUTF8)
-
- launch_services_bundle =
- pCFBundleGetBundleWithIdentifier(S("com.apple.LaunchServices"));
-
- if (launch_services_bundle == NULL)
- goto out;
-
- *(void **)(&pLSGetCurrentApplicationASN) =
- pCFBundleGetFunctionPointerForName(launch_services_bundle,
- S("_LSGetCurrentApplicationASN"));
-
- if (pLSGetCurrentApplicationASN == NULL)
- goto out;
-
- *(void **)(&pLSSetApplicationInformationItem) =
- pCFBundleGetFunctionPointerForName(launch_services_bundle,
- S("_LSSetApplicationInformationItem"));
-
- if (pLSSetApplicationInformationItem == NULL)
- goto out;
-
- display_name_key = pCFBundleGetDataPointerForName(launch_services_bundle,
- S("_kLSDisplayNameKey"));
-
- if (display_name_key == NULL || *display_name_key == NULL)
- goto out;
-
- *(void **)(&pCFBundleGetInfoDictionary) = dlsym(core_foundation_handle,
- "CFBundleGetInfoDictionary");
- *(void **)(&pCFBundleGetMainBundle) = dlsym(core_foundation_handle,
- "CFBundleGetMainBundle");
- if (pCFBundleGetInfoDictionary == NULL || pCFBundleGetMainBundle == NULL)
- goto out;
-
- /* Black 10.9 magic, to remove (Not responding) mark in Activity Monitor */
- hi_services_bundle =
- pCFBundleGetBundleWithIdentifier(S("com.apple.HIServices"));
- err = -ENOENT;
- if (hi_services_bundle == NULL)
- goto out;
-
- *(void **)(&pSetApplicationIsDaemon) = pCFBundleGetFunctionPointerForName(
- hi_services_bundle,
- S("SetApplicationIsDaemon"));
- *(void **)(&pLSApplicationCheckIn) = pCFBundleGetFunctionPointerForName(
- launch_services_bundle,
- S("_LSApplicationCheckIn"));
- *(void **)(&pLSSetApplicationLaunchServicesServerConnectionStatus) =
- pCFBundleGetFunctionPointerForName(
- launch_services_bundle,
- S("_LSSetApplicationLaunchServicesServerConnectionStatus"));
- if (pSetApplicationIsDaemon == NULL ||
- pLSApplicationCheckIn == NULL ||
- pLSSetApplicationLaunchServicesServerConnectionStatus == NULL) {
- goto out;
- }
-
- if (pSetApplicationIsDaemon(1) != noErr)
- goto out;
-
- pLSSetApplicationLaunchServicesServerConnectionStatus(0, NULL);
-
- /* Check into process manager?! */
- pLSApplicationCheckIn(-2,
- pCFBundleGetInfoDictionary(pCFBundleGetMainBundle()));
-
- asn = pLSGetCurrentApplicationASN();
-
- err = -EINVAL;
- if (pLSSetApplicationInformationItem(-2, /* Magic value. */
- asn,
- *display_name_key,
- S(title),
- NULL) != noErr) {
- goto out;
- }
-
- uv__pthread_setname_np(title); /* Don't care if it fails. */
- err = 0;
-
-out:
- if (core_foundation_handle != NULL)
- dlclose(core_foundation_handle);
-
- if (application_services_handle != NULL)
- dlclose(application_services_handle);
-
- return err;
-#endif /* !TARGET_OS_IPHONE */
-}
diff --git a/3rdparty/libuv/src/unix/darwin.c b/3rdparty/libuv/src/unix/darwin.c
deleted file mode 100644
index cf95da21693..00000000000
--- a/3rdparty/libuv/src/unix/darwin.c
+++ /dev/null
@@ -1,335 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "internal.h"
-
-#include <assert.h>
-#include <stdint.h>
-#include <errno.h>
-
-#include <ifaddrs.h>
-#include <net/if.h>
-#include <net/if_dl.h>
-
-#include <mach/mach.h>
-#include <mach/mach_time.h>
-#include <mach-o/dyld.h> /* _NSGetExecutablePath */
-#include <sys/resource.h>
-#include <sys/sysctl.h>
-#include <unistd.h> /* sysconf */
-
-
-int uv__platform_loop_init(uv_loop_t* loop) {
- loop->cf_state = NULL;
-
- if (uv__kqueue_init(loop))
- return -errno;
-
- return 0;
-}
-
-
-void uv__platform_loop_delete(uv_loop_t* loop) {
- uv__fsevents_loop_delete(loop);
-}
-
-
-uint64_t uv__hrtime(uv_clocktype_t type) {
- static mach_timebase_info_data_t info;
-
- if ((ACCESS_ONCE(uint32_t, info.numer) == 0 ||
- ACCESS_ONCE(uint32_t, info.denom) == 0) &&
- mach_timebase_info(&info) != KERN_SUCCESS)
- abort();
-
- return mach_absolute_time() * info.numer / info.denom;
-}
-
-
-int uv_exepath(char* buffer, size_t* size) {
- /* realpath(exepath) may be > PATH_MAX so double it to be on the safe side. */
- char abspath[PATH_MAX * 2 + 1];
- char exepath[PATH_MAX + 1];
- uint32_t exepath_size;
- size_t abspath_size;
-
- if (buffer == NULL || size == NULL || *size == 0)
- return -EINVAL;
-
- exepath_size = sizeof(exepath);
- if (_NSGetExecutablePath(exepath, &exepath_size))
- return -EIO;
-
- if (realpath(exepath, abspath) != abspath)
- return -errno;
-
- abspath_size = strlen(abspath);
- if (abspath_size == 0)
- return -EIO;
-
- *size -= 1;
- if (*size > abspath_size)
- *size = abspath_size;
-
- memcpy(buffer, abspath, *size);
- buffer[*size] = '\0';
-
- return 0;
-}
-
-
-uint64_t uv_get_free_memory(void) {
- vm_statistics_data_t info;
- mach_msg_type_number_t count = sizeof(info) / sizeof(integer_t);
-
- if (host_statistics(mach_host_self(), HOST_VM_INFO,
- (host_info_t)&info, &count) != KERN_SUCCESS) {
- return -EINVAL; /* FIXME(bnoordhuis) Translate error. */
- }
-
- return (uint64_t) info.free_count * sysconf(_SC_PAGESIZE);
-}
-
-
-uint64_t uv_get_total_memory(void) {
- uint64_t info;
- int which[] = {CTL_HW, HW_MEMSIZE};
- size_t size = sizeof(info);
-
- if (sysctl(which, 2, &info, &size, NULL, 0))
- return -errno;
-
- return (uint64_t) info;
-}
-
-
-void uv_loadavg(double avg[3]) {
- struct loadavg info;
- size_t size = sizeof(info);
- int which[] = {CTL_VM, VM_LOADAVG};
-
- if (sysctl(which, 2, &info, &size, NULL, 0) < 0) return;
-
- avg[0] = (double) info.ldavg[0] / info.fscale;
- avg[1] = (double) info.ldavg[1] / info.fscale;
- avg[2] = (double) info.ldavg[2] / info.fscale;
-}
-
-
-int uv_resident_set_memory(size_t* rss) {
- mach_msg_type_number_t count;
- task_basic_info_data_t info;
- kern_return_t err;
-
- count = TASK_BASIC_INFO_COUNT;
- err = task_info(mach_task_self(),
- TASK_BASIC_INFO,
- (task_info_t) &info,
- &count);
- (void) &err;
- /* task_info(TASK_BASIC_INFO) cannot really fail. Anything other than
- * KERN_SUCCESS implies a libuv bug.
- */
- assert(err == KERN_SUCCESS);
- *rss = info.resident_size;
-
- return 0;
-}
-
-
-int uv_uptime(double* uptime) {
- time_t now;
- struct timeval info;
- size_t size = sizeof(info);
- static int which[] = {CTL_KERN, KERN_BOOTTIME};
-
- if (sysctl(which, 2, &info, &size, NULL, 0))
- return -errno;
-
- now = time(NULL);
- *uptime = now - info.tv_sec;
-
- return 0;
-}
-
-int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) {
- unsigned int ticks = (unsigned int)sysconf(_SC_CLK_TCK),
- multiplier = ((uint64_t)1000L / ticks);
- char model[512];
- uint64_t cpuspeed;
- size_t size;
- unsigned int i;
- natural_t numcpus;
- mach_msg_type_number_t msg_type;
- processor_cpu_load_info_data_t *info;
- uv_cpu_info_t* cpu_info;
-
- size = sizeof(model);
- if (sysctlbyname("machdep.cpu.brand_string", &model, &size, NULL, 0) &&
- sysctlbyname("hw.model", &model, &size, NULL, 0)) {
- return -errno;
- }
-
- size = sizeof(cpuspeed);
- if (sysctlbyname("hw.cpufrequency", &cpuspeed, &size, NULL, 0))
- return -errno;
-
- if (host_processor_info(mach_host_self(), PROCESSOR_CPU_LOAD_INFO, &numcpus,
- (processor_info_array_t*)&info,
- &msg_type) != KERN_SUCCESS) {
- return -EINVAL; /* FIXME(bnoordhuis) Translate error. */
- }
-
- *cpu_infos = uv__malloc(numcpus * sizeof(**cpu_infos));
- if (!(*cpu_infos)) {
- vm_deallocate(mach_task_self(), (vm_address_t)info, msg_type);
- return -ENOMEM;
- }
-
- *count = numcpus;
-
- for (i = 0; i < numcpus; i++) {
- cpu_info = &(*cpu_infos)[i];
-
- cpu_info->cpu_times.user = (uint64_t)(info[i].cpu_ticks[0]) * multiplier;
- cpu_info->cpu_times.nice = (uint64_t)(info[i].cpu_ticks[3]) * multiplier;
- cpu_info->cpu_times.sys = (uint64_t)(info[i].cpu_ticks[1]) * multiplier;
- cpu_info->cpu_times.idle = (uint64_t)(info[i].cpu_ticks[2]) * multiplier;
- cpu_info->cpu_times.irq = 0;
-
- cpu_info->model = uv__strdup(model);
- cpu_info->speed = cpuspeed/1000000;
- }
- vm_deallocate(mach_task_self(), (vm_address_t)info, msg_type);
-
- return 0;
-}
-
-
-void uv_free_cpu_info(uv_cpu_info_t* cpu_infos, int count) {
- int i;
-
- for (i = 0; i < count; i++) {
- uv__free(cpu_infos[i].model);
- }
-
- uv__free(cpu_infos);
-}
-
-
-int uv_interface_addresses(uv_interface_address_t** addresses, int* count) {
- struct ifaddrs *addrs, *ent;
- uv_interface_address_t* address;
- int i;
- struct sockaddr_dl *sa_addr;
-
- if (getifaddrs(&addrs))
- return -errno;
-
- *count = 0;
-
- /* Count the number of interfaces */
- for (ent = addrs; ent != NULL; ent = ent->ifa_next) {
- if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING)) ||
- (ent->ifa_addr == NULL) ||
- (ent->ifa_addr->sa_family == AF_LINK)) {
- continue;
- }
-
- (*count)++;
- }
-
- *addresses = uv__malloc(*count * sizeof(**addresses));
- if (!(*addresses)) {
- freeifaddrs(addrs);
- return -ENOMEM;
- }
-
- address = *addresses;
-
- for (ent = addrs; ent != NULL; ent = ent->ifa_next) {
- if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING)))
- continue;
-
- if (ent->ifa_addr == NULL)
- continue;
-
- /*
- * On Mac OS X getifaddrs returns information related to Mac Addresses for
- * various devices, such as firewire, etc. These are not relevant here.
- */
- if (ent->ifa_addr->sa_family == AF_LINK)
- continue;
-
- address->name = uv__strdup(ent->ifa_name);
-
- if (ent->ifa_addr->sa_family == AF_INET6) {
- address->address.address6 = *((struct sockaddr_in6*) ent->ifa_addr);
- } else {
- address->address.address4 = *((struct sockaddr_in*) ent->ifa_addr);
- }
-
- if (ent->ifa_netmask->sa_family == AF_INET6) {
- address->netmask.netmask6 = *((struct sockaddr_in6*) ent->ifa_netmask);
- } else {
- address->netmask.netmask4 = *((struct sockaddr_in*) ent->ifa_netmask);
- }
-
- address->is_internal = !!(ent->ifa_flags & IFF_LOOPBACK);
-
- address++;
- }
-
- /* Fill in physical addresses for each interface */
- for (ent = addrs; ent != NULL; ent = ent->ifa_next) {
- if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING)) ||
- (ent->ifa_addr == NULL) ||
- (ent->ifa_addr->sa_family != AF_LINK)) {
- continue;
- }
-
- address = *addresses;
-
- for (i = 0; i < (*count); i++) {
- if (strcmp(address->name, ent->ifa_name) == 0) {
- sa_addr = (struct sockaddr_dl*)(ent->ifa_addr);
- memcpy(address->phys_addr, LLADDR(sa_addr), sizeof(address->phys_addr));
- }
- address++;
- }
- }
-
- freeifaddrs(addrs);
-
- return 0;
-}
-
-
-void uv_free_interface_addresses(uv_interface_address_t* addresses,
- int count) {
- int i;
-
- for (i = 0; i < count; i++) {
- uv__free(addresses[i].name);
- }
-
- uv__free(addresses);
-}
diff --git a/3rdparty/libuv/src/unix/dl.c b/3rdparty/libuv/src/unix/dl.c
deleted file mode 100644
index fc1c052bb81..00000000000
--- a/3rdparty/libuv/src/unix/dl.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "internal.h"
-
-#include <dlfcn.h>
-#include <errno.h>
-#include <string.h>
-#include <locale.h>
-
-static int uv__dlerror(uv_lib_t* lib);
-
-
-int uv_dlopen(const char* filename, uv_lib_t* lib) {
- dlerror(); /* Reset error status. */
- lib->errmsg = NULL;
- lib->handle = dlopen(filename, RTLD_LAZY);
- return lib->handle ? 0 : uv__dlerror(lib);
-}
-
-
-void uv_dlclose(uv_lib_t* lib) {
- uv__free(lib->errmsg);
- lib->errmsg = NULL;
-
- if (lib->handle) {
- /* Ignore errors. No good way to signal them without leaking memory. */
- dlclose(lib->handle);
- lib->handle = NULL;
- }
-}
-
-
-int uv_dlsym(uv_lib_t* lib, const char* name, void** ptr) {
- dlerror(); /* Reset error status. */
- *ptr = dlsym(lib->handle, name);
- return uv__dlerror(lib);
-}
-
-
-const char* uv_dlerror(const uv_lib_t* lib) {
- return lib->errmsg ? lib->errmsg : "no error";
-}
-
-
-static int uv__dlerror(uv_lib_t* lib) {
- const char* errmsg;
-
- uv__free(lib->errmsg);
-
- errmsg = dlerror();
-
- if (errmsg) {
- lib->errmsg = uv__strdup(errmsg);
- return -1;
- }
- else {
- lib->errmsg = NULL;
- return 0;
- }
-}
diff --git a/3rdparty/libuv/src/unix/freebsd.c b/3rdparty/libuv/src/unix/freebsd.c
deleted file mode 100644
index b747abdf5bc..00000000000
--- a/3rdparty/libuv/src/unix/freebsd.c
+++ /dev/null
@@ -1,450 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "internal.h"
-
-#include <assert.h>
-#include <string.h>
-#include <errno.h>
-
-#include <ifaddrs.h>
-#include <net/if.h>
-#include <net/if_dl.h>
-
-#include <kvm.h>
-#include <paths.h>
-#include <sys/user.h>
-#include <sys/types.h>
-#include <sys/resource.h>
-#include <sys/sysctl.h>
-#include <vm/vm_param.h> /* VM_LOADAVG */
-#include <time.h>
-#include <stdlib.h>
-#include <unistd.h> /* sysconf */
-#include <fcntl.h>
-
-#undef NANOSEC
-#define NANOSEC ((uint64_t) 1e9)
-
-#ifndef CPUSTATES
-# define CPUSTATES 5U
-#endif
-#ifndef CP_USER
-# define CP_USER 0
-# define CP_NICE 1
-# define CP_SYS 2
-# define CP_IDLE 3
-# define CP_INTR 4
-#endif
-
-static char *process_title;
-
-
-int uv__platform_loop_init(uv_loop_t* loop) {
- return uv__kqueue_init(loop);
-}
-
-
-void uv__platform_loop_delete(uv_loop_t* loop) {
-}
-
-
-uint64_t uv__hrtime(uv_clocktype_t type) {
- struct timespec ts;
- clock_gettime(CLOCK_MONOTONIC, &ts);
- return (((uint64_t) ts.tv_sec) * NANOSEC + ts.tv_nsec);
-}
-
-
-#ifdef __DragonFly__
-int uv_exepath(char* buffer, size_t* size) {
- char abspath[PATH_MAX * 2 + 1];
- ssize_t abspath_size;
-
- if (buffer == NULL || size == NULL || *size == 0)
- return -EINVAL;
-
- abspath_size = readlink("/proc/curproc/file", abspath, sizeof(abspath));
- if (abspath_size < 0)
- return -errno;
-
- assert(abspath_size > 0);
- *size -= 1;
-
- if (*size > abspath_size)
- *size = abspath_size;
-
- memcpy(buffer, abspath, *size);
- buffer[*size] = '\0';
-
- return 0;
-}
-#else
-int uv_exepath(char* buffer, size_t* size) {
- char abspath[PATH_MAX * 2 + 1];
- int mib[4];
- size_t abspath_size;
-
- if (buffer == NULL || size == NULL || *size == 0)
- return -EINVAL;
-
- mib[0] = CTL_KERN;
- mib[1] = KERN_PROC;
- mib[2] = KERN_PROC_PATHNAME;
- mib[3] = -1;
-
- abspath_size = sizeof abspath;
- if (sysctl(mib, 4, abspath, &abspath_size, NULL, 0))
- return -errno;
-
- assert(abspath_size > 0);
- abspath_size -= 1;
- *size -= 1;
-
- if (*size > abspath_size)
- *size = abspath_size;
-
- memcpy(buffer, abspath, *size);
- buffer[*size] = '\0';
-
- return 0;
-}
-#endif
-
-uint64_t uv_get_free_memory(void) {
- int freecount;
- size_t size = sizeof(freecount);
-
- if (sysctlbyname("vm.stats.vm.v_free_count", &freecount, &size, NULL, 0))
- return -errno;
-
- return (uint64_t) freecount * sysconf(_SC_PAGESIZE);
-
-}
-
-
-uint64_t uv_get_total_memory(void) {
- unsigned long info;
- int which[] = {CTL_HW, HW_PHYSMEM};
-
- size_t size = sizeof(info);
-
- if (sysctl(which, 2, &info, &size, NULL, 0))
- return -errno;
-
- return (uint64_t) info;
-}
-
-
-void uv_loadavg(double avg[3]) {
- struct loadavg info;
- size_t size = sizeof(info);
- int which[] = {CTL_VM, VM_LOADAVG};
-
- if (sysctl(which, 2, &info, &size, NULL, 0) < 0) return;
-
- avg[0] = (double) info.ldavg[0] / info.fscale;
- avg[1] = (double) info.ldavg[1] / info.fscale;
- avg[2] = (double) info.ldavg[2] / info.fscale;
-}
-
-
-char** uv_setup_args(int argc, char** argv) {
- process_title = argc ? uv__strdup(argv[0]) : NULL;
- return argv;
-}
-
-
-int uv_set_process_title(const char* title) {
- int oid[4];
-
- uv__free(process_title);
- process_title = uv__strdup(title);
-
- oid[0] = CTL_KERN;
- oid[1] = KERN_PROC;
- oid[2] = KERN_PROC_ARGS;
- oid[3] = getpid();
-
- sysctl(oid,
- ARRAY_SIZE(oid),
- NULL,
- NULL,
- process_title,
- strlen(process_title) + 1);
-
- return 0;
-}
-
-
-int uv_get_process_title(char* buffer, size_t size) {
- if (process_title) {
- strncpy(buffer, process_title, size);
- } else {
- if (size > 0) {
- buffer[0] = '\0';
- }
- }
-
- return 0;
-}
-
-
-int uv_resident_set_memory(size_t* rss) {
- kvm_t *kd = NULL;
- struct kinfo_proc *kinfo = NULL;
- pid_t pid;
- int nprocs;
- size_t page_size = getpagesize();
-
- pid = getpid();
-
- kd = kvm_open(NULL, _PATH_DEVNULL, NULL, O_RDONLY, "kvm_open");
- if (kd == NULL) goto error;
-
- kinfo = kvm_getprocs(kd, KERN_PROC_PID, pid, &nprocs);
- if (kinfo == NULL) goto error;
-
-#ifdef __DragonFly__
- *rss = kinfo->kp_vm_rssize * page_size;
-#else
- *rss = kinfo->ki_rssize * page_size;
-#endif
-
- kvm_close(kd);
-
- return 0;
-
-error:
- if (kd) kvm_close(kd);
- return -EPERM;
-}
-
-
-int uv_uptime(double* uptime) {
- int r;
- struct timespec sp;
- r = clock_gettime(CLOCK_MONOTONIC, &sp);
- if (r)
- return -errno;
-
- *uptime = sp.tv_sec;
- return 0;
-}
-
-
-int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) {
- unsigned int ticks = (unsigned int)sysconf(_SC_CLK_TCK),
- multiplier = ((uint64_t)1000L / ticks), cpuspeed, maxcpus,
- cur = 0;
- uv_cpu_info_t* cpu_info;
- const char* maxcpus_key;
- const char* cptimes_key;
- char model[512];
- long* cp_times;
- int numcpus;
- size_t size;
- int i;
-
-#if defined(__DragonFly__)
- /* This is not quite correct but DragonFlyBSD doesn't seem to have anything
- * comparable to kern.smp.maxcpus or kern.cp_times (kern.cp_time is a total,
- * not per CPU). At least this stops uv_cpu_info() from failing completely.
- */
- maxcpus_key = "hw.ncpu";
- cptimes_key = "kern.cp_time";
-#else
- maxcpus_key = "kern.smp.maxcpus";
- cptimes_key = "kern.cp_times";
-#endif
-
- size = sizeof(model);
- if (sysctlbyname("hw.model", &model, &size, NULL, 0))
- return -errno;
-
- size = sizeof(numcpus);
- if (sysctlbyname("hw.ncpu", &numcpus, &size, NULL, 0))
- return -errno;
-
- *cpu_infos = uv__malloc(numcpus * sizeof(**cpu_infos));
- if (!(*cpu_infos))
- return -ENOMEM;
-
- *count = numcpus;
-
- size = sizeof(cpuspeed);
- if (sysctlbyname("hw.clockrate", &cpuspeed, &size, NULL, 0)) {
- SAVE_ERRNO(uv__free(*cpu_infos));
- return -errno;
- }
-
- /* kern.cp_times on FreeBSD i386 gives an array up to maxcpus instead of
- * ncpu.
- */
- size = sizeof(maxcpus);
- if (sysctlbyname(maxcpus_key, &maxcpus, &size, NULL, 0)) {
- SAVE_ERRNO(uv__free(*cpu_infos));
- return -errno;
- }
-
- size = maxcpus * CPUSTATES * sizeof(long);
-
- cp_times = uv__malloc(size);
- if (cp_times == NULL) {
- uv__free(*cpu_infos);
- return -ENOMEM;
- }
-
- if (sysctlbyname(cptimes_key, cp_times, &size, NULL, 0)) {
- SAVE_ERRNO(uv__free(cp_times));
- SAVE_ERRNO(uv__free(*cpu_infos));
- return -errno;
- }
-
- for (i = 0; i < numcpus; i++) {
- cpu_info = &(*cpu_infos)[i];
-
- cpu_info->cpu_times.user = (uint64_t)(cp_times[CP_USER+cur]) * multiplier;
- cpu_info->cpu_times.nice = (uint64_t)(cp_times[CP_NICE+cur]) * multiplier;
- cpu_info->cpu_times.sys = (uint64_t)(cp_times[CP_SYS+cur]) * multiplier;
- cpu_info->cpu_times.idle = (uint64_t)(cp_times[CP_IDLE+cur]) * multiplier;
- cpu_info->cpu_times.irq = (uint64_t)(cp_times[CP_INTR+cur]) * multiplier;
-
- cpu_info->model = uv__strdup(model);
- cpu_info->speed = cpuspeed;
-
- cur+=CPUSTATES;
- }
-
- uv__free(cp_times);
- return 0;
-}
-
-
-void uv_free_cpu_info(uv_cpu_info_t* cpu_infos, int count) {
- int i;
-
- for (i = 0; i < count; i++) {
- uv__free(cpu_infos[i].model);
- }
-
- uv__free(cpu_infos);
-}
-
-
-int uv_interface_addresses(uv_interface_address_t** addresses, int* count) {
- struct ifaddrs *addrs, *ent;
- uv_interface_address_t* address;
- int i;
- struct sockaddr_dl *sa_addr;
-
- if (getifaddrs(&addrs))
- return -errno;
-
- *count = 0;
-
- /* Count the number of interfaces */
- for (ent = addrs; ent != NULL; ent = ent->ifa_next) {
- if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING)) ||
- (ent->ifa_addr == NULL) ||
- (ent->ifa_addr->sa_family == AF_LINK)) {
- continue;
- }
-
- (*count)++;
- }
-
- *addresses = uv__malloc(*count * sizeof(**addresses));
- if (!(*addresses)) {
- freeifaddrs(addrs);
- return -ENOMEM;
- }
-
- address = *addresses;
-
- for (ent = addrs; ent != NULL; ent = ent->ifa_next) {
- if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING)))
- continue;
-
- if (ent->ifa_addr == NULL)
- continue;
-
- /*
- * On FreeBSD getifaddrs returns information related to the raw underlying
- * devices. We're not interested in this information yet.
- */
- if (ent->ifa_addr->sa_family == AF_LINK)
- continue;
-
- address->name = uv__strdup(ent->ifa_name);
-
- if (ent->ifa_addr->sa_family == AF_INET6) {
- address->address.address6 = *((struct sockaddr_in6*) ent->ifa_addr);
- } else {
- address->address.address4 = *((struct sockaddr_in*) ent->ifa_addr);
- }
-
- if (ent->ifa_netmask->sa_family == AF_INET6) {
- address->netmask.netmask6 = *((struct sockaddr_in6*) ent->ifa_netmask);
- } else {
- address->netmask.netmask4 = *((struct sockaddr_in*) ent->ifa_netmask);
- }
-
- address->is_internal = !!(ent->ifa_flags & IFF_LOOPBACK);
-
- address++;
- }
-
- /* Fill in physical addresses for each interface */
- for (ent = addrs; ent != NULL; ent = ent->ifa_next) {
- if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING)) ||
- (ent->ifa_addr == NULL) ||
- (ent->ifa_addr->sa_family != AF_LINK)) {
- continue;
- }
-
- address = *addresses;
-
- for (i = 0; i < (*count); i++) {
- if (strcmp(address->name, ent->ifa_name) == 0) {
- sa_addr = (struct sockaddr_dl*)(ent->ifa_addr);
- memcpy(address->phys_addr, LLADDR(sa_addr), sizeof(address->phys_addr));
- }
- address++;
- }
- }
-
- freeifaddrs(addrs);
-
- return 0;
-}
-
-
-void uv_free_interface_addresses(uv_interface_address_t* addresses,
- int count) {
- int i;
-
- for (i = 0; i < count; i++) {
- uv__free(addresses[i].name);
- }
-
- uv__free(addresses);
-}
diff --git a/3rdparty/libuv/src/unix/fs.c b/3rdparty/libuv/src/unix/fs.c
deleted file mode 100644
index 57b65be25a8..00000000000
--- a/3rdparty/libuv/src/unix/fs.c
+++ /dev/null
@@ -1,1310 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-/* Caveat emptor: this file deviates from the libuv convention of returning
- * negated errno codes. Most uv_fs_*() functions map directly to the system
- * call of the same name. For more complex wrappers, it's easier to just
- * return -1 with errno set. The dispatcher in uv__fs_work() takes care of
- * getting the errno to the right place (req->result or as the return value.)
- */
-
-#include "uv.h"
-#include "internal.h"
-
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/uio.h>
-#include <pthread.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <utime.h>
-#include <poll.h>
-
-#if defined(__DragonFly__) || \
- defined(__FreeBSD__) || \
- defined(__OpenBSD__) || \
- defined(__NetBSD__)
-# define HAVE_PREADV 1
-#else
-# define HAVE_PREADV 0
-#endif
-
-#if defined(__linux__) || defined(__sun)
-# include <sys/sendfile.h>
-#endif
-
-#define INIT(subtype) \
- do { \
- req->type = UV_FS; \
- if (cb != NULL) \
- uv__req_init(loop, req, UV_FS); \
- req->fs_type = UV_FS_ ## subtype; \
- req->result = 0; \
- req->ptr = NULL; \
- req->loop = loop; \
- req->path = NULL; \
- req->new_path = NULL; \
- req->cb = cb; \
- } \
- while (0)
-
-#define PATH \
- do { \
- assert(path != NULL); \
- if (cb == NULL) { \
- req->path = path; \
- } else { \
- req->path = uv__strdup(path); \
- if (req->path == NULL) { \
- uv__req_unregister(loop, req); \
- return -ENOMEM; \
- } \
- } \
- } \
- while (0)
-
-#define PATH2 \
- do { \
- if (cb == NULL) { \
- req->path = path; \
- req->new_path = new_path; \
- } else { \
- size_t path_len; \
- size_t new_path_len; \
- path_len = strlen(path) + 1; \
- new_path_len = strlen(new_path) + 1; \
- req->path = uv__malloc(path_len + new_path_len); \
- if (req->path == NULL) { \
- uv__req_unregister(loop, req); \
- return -ENOMEM; \
- } \
- req->new_path = req->path + path_len; \
- memcpy((void*) req->path, path, path_len); \
- memcpy((void*) req->new_path, new_path, new_path_len); \
- } \
- } \
- while (0)
-
-#define POST \
- do { \
- if (cb != NULL) { \
- uv__work_submit(loop, &req->work_req, uv__fs_work, uv__fs_done); \
- return 0; \
- } \
- else { \
- uv__fs_work(&req->work_req); \
- return req->result; \
- } \
- } \
- while (0)
-
-
-static ssize_t uv__fs_fdatasync(uv_fs_t* req) {
-#if defined(__linux__) || defined(__sun) || defined(__NetBSD__)
- return fdatasync(req->file);
-#elif defined(__APPLE__) && defined(F_FULLFSYNC)
- return fcntl(req->file, F_FULLFSYNC);
-#else
- return fsync(req->file);
-#endif
-}
-
-
-static ssize_t uv__fs_futime(uv_fs_t* req) {
-#if defined(__linux__)
- /* utimesat() has nanosecond resolution but we stick to microseconds
- * for the sake of consistency with other platforms.
- */
- static int no_utimesat;
- struct timespec ts[2];
- struct timeval tv[2];
- char path[sizeof("/proc/self/fd/") + 3 * sizeof(int)];
- int r;
-
- if (no_utimesat)
- goto skip;
-
- ts[0].tv_sec = req->atime;
- ts[0].tv_nsec = (unsigned long)(req->atime * 1000000) % 1000000 * 1000;
- ts[1].tv_sec = req->mtime;
- ts[1].tv_nsec = (unsigned long)(req->mtime * 1000000) % 1000000 * 1000;
-
- r = uv__utimesat(req->file, NULL, ts, 0);
- if (r == 0)
- return r;
-
- if (errno != ENOSYS)
- return r;
-
- no_utimesat = 1;
-
-skip:
-
- tv[0].tv_sec = req->atime;
- tv[0].tv_usec = (unsigned long)(req->atime * 1000000) % 1000000;
- tv[1].tv_sec = req->mtime;
- tv[1].tv_usec = (unsigned long)(req->mtime * 1000000) % 1000000;
- snprintf(path, sizeof(path), "/proc/self/fd/%d", (int) req->file);
-
- r = utimes(path, tv);
- if (r == 0)
- return r;
-
- switch (errno) {
- case ENOENT:
- if (fcntl(req->file, F_GETFL) == -1 && errno == EBADF)
- break;
- /* Fall through. */
-
- case EACCES:
- case ENOTDIR:
- errno = ENOSYS;
- break;
- }
-
- return r;
-
-#elif defined(__APPLE__) \
- || defined(__DragonFly__) \
- || defined(__FreeBSD__) \
- || defined(__NetBSD__) \
- || defined(__OpenBSD__) \
- || defined(__sun)
- struct timeval tv[2];
- tv[0].tv_sec = req->atime;
- tv[0].tv_usec = (unsigned long)(req->atime * 1000000) % 1000000;
- tv[1].tv_sec = req->mtime;
- tv[1].tv_usec = (unsigned long)(req->mtime * 1000000) % 1000000;
-# if defined(__sun)
- return futimesat(req->file, NULL, tv);
-# else
- return futimes(req->file, tv);
-# endif
-#else
- errno = ENOSYS;
- return -1;
-#endif
-}
-
-
-static ssize_t uv__fs_mkdtemp(uv_fs_t* req) {
- return mkdtemp((char*) req->path) ? 0 : -1;
-}
-
-
-static ssize_t uv__fs_open(uv_fs_t* req) {
- static int no_cloexec_support;
- int r;
-
- /* Try O_CLOEXEC before entering locks */
- if (no_cloexec_support == 0) {
-#ifdef O_CLOEXEC
- r = open(req->path, req->flags | O_CLOEXEC, req->mode);
- if (r >= 0)
- return r;
- if (errno != EINVAL)
- return r;
- no_cloexec_support = 1;
-#endif /* O_CLOEXEC */
- }
-
- if (req->cb != NULL)
- uv_rwlock_rdlock(&req->loop->cloexec_lock);
-
- r = open(req->path, req->flags, req->mode);
-
- /* In case of failure `uv__cloexec` will leave error in `errno`,
- * so it is enough to just set `r` to `-1`.
- */
- if (r >= 0 && uv__cloexec(r, 1) != 0) {
- r = uv__close(r);
- if (r != 0 && r != -EINPROGRESS)
- abort();
- r = -1;
- }
-
- if (req->cb != NULL)
- uv_rwlock_rdunlock(&req->loop->cloexec_lock);
-
- return r;
-}
-
-
-static ssize_t uv__fs_read(uv_fs_t* req) {
-#if defined(__linux__)
- static int no_preadv;
-#endif
- ssize_t result;
-
-#if defined(_AIX)
- struct stat buf;
- if(fstat(req->file, &buf))
- return -1;
- if(S_ISDIR(buf.st_mode)) {
- errno = EISDIR;
- return -1;
- }
-#endif /* defined(_AIX) */
- if (req->off < 0) {
- if (req->nbufs == 1)
- result = read(req->file, req->bufs[0].base, req->bufs[0].len);
- else
- result = readv(req->file, (struct iovec*) req->bufs, req->nbufs);
- } else {
- if (req->nbufs == 1) {
- result = pread(req->file, req->bufs[0].base, req->bufs[0].len, req->off);
- goto done;
- }
-
-#if HAVE_PREADV
- result = preadv(req->file, (struct iovec*) req->bufs, req->nbufs, req->off);
-#else
-# if defined(__linux__)
- if (no_preadv) retry:
-# endif
- {
- off_t nread;
- size_t index;
-
- nread = 0;
- index = 0;
- result = 1;
- do {
- if (req->bufs[index].len > 0) {
- result = pread(req->file,
- req->bufs[index].base,
- req->bufs[index].len,
- req->off + nread);
- if (result > 0)
- nread += result;
- }
- index++;
- } while (index < req->nbufs && result > 0);
- if (nread > 0)
- result = nread;
- }
-# if defined(__linux__)
- else {
- result = uv__preadv(req->file,
- (struct iovec*)req->bufs,
- req->nbufs,
- req->off);
- if (result == -1 && errno == ENOSYS) {
- no_preadv = 1;
- goto retry;
- }
- }
-# endif
-#endif
- }
-
-done:
- return result;
-}
-
-
-#if defined(__OpenBSD__) || (defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_8))
-static int uv__fs_scandir_filter(uv__dirent_t* dent) {
-#else
-static int uv__fs_scandir_filter(const uv__dirent_t* dent) {
-#endif
- return strcmp(dent->d_name, ".") != 0 && strcmp(dent->d_name, "..") != 0;
-}
-
-
-static ssize_t uv__fs_scandir(uv_fs_t* req) {
- uv__dirent_t **dents;
- int saved_errno;
- int n;
-
- dents = NULL;
- n = scandir(req->path, &dents, uv__fs_scandir_filter, alphasort);
-
- /* NOTE: We will use nbufs as an index field */
- req->nbufs = 0;
-
- if (n == 0)
- goto out; /* osx still needs to deallocate some memory */
- else if (n == -1)
- return n;
-
- req->ptr = dents;
-
- return n;
-
-out:
- saved_errno = errno;
- if (dents != NULL) {
- int i;
-
- for (i = 0; i < n; i++)
- uv__free(dents[i]);
- uv__free(dents);
- }
- errno = saved_errno;
-
- req->ptr = NULL;
-
- return n;
-}
-
-
-static ssize_t uv__fs_pathmax_size(const char* path) {
- ssize_t pathmax;
-
- pathmax = pathconf(path, _PC_PATH_MAX);
-
- if (pathmax == -1) {
-#if defined(PATH_MAX)
- return PATH_MAX;
-#else
- return 4096;
-#endif
- }
-
- return pathmax;
-}
-
-static ssize_t uv__fs_readlink(uv_fs_t* req) {
- ssize_t len;
- char* buf;
-
- len = uv__fs_pathmax_size(req->path);
- buf = uv__malloc(len + 1);
-
- if (buf == NULL) {
- errno = ENOMEM;
- return -1;
- }
-
- len = readlink(req->path, buf, len);
-
- if (len == -1) {
- uv__free(buf);
- return -1;
- }
-
- buf[len] = '\0';
- req->ptr = buf;
-
- return 0;
-}
-
-static ssize_t uv__fs_realpath(uv_fs_t* req) {
- ssize_t len;
- char* buf;
-
- len = uv__fs_pathmax_size(req->path);
- buf = uv__malloc(len + 1);
-
- if (buf == NULL) {
- errno = ENOMEM;
- return -1;
- }
-
- if (realpath(req->path, buf) == NULL) {
- uv__free(buf);
- return -1;
- }
-
- req->ptr = buf;
-
- return 0;
-}
-
-static ssize_t uv__fs_sendfile_emul(uv_fs_t* req) {
- struct pollfd pfd;
- int use_pread;
- off_t offset;
- ssize_t nsent;
- ssize_t nread;
- ssize_t nwritten;
- size_t buflen;
- size_t len;
- ssize_t n;
- int in_fd;
- int out_fd;
- char buf[8192];
-
- len = req->bufsml[0].len;
- in_fd = req->flags;
- out_fd = req->file;
- offset = req->off;
- use_pread = 1;
-
- /* Here are the rules regarding errors:
- *
- * 1. Read errors are reported only if nsent==0, otherwise we return nsent.
- * The user needs to know that some data has already been sent, to stop
- * them from sending it twice.
- *
- * 2. Write errors are always reported. Write errors are bad because they
- * mean data loss: we've read data but now we can't write it out.
- *
- * We try to use pread() and fall back to regular read() if the source fd
- * doesn't support positional reads, for example when it's a pipe fd.
- *
- * If we get EAGAIN when writing to the target fd, we poll() on it until
- * it becomes writable again.
- *
- * FIXME: If we get a write error when use_pread==1, it should be safe to
- * return the number of sent bytes instead of an error because pread()
- * is, in theory, idempotent. However, special files in /dev or /proc
- * may support pread() but not necessarily return the same data on
- * successive reads.
- *
- * FIXME: There is no way now to signal that we managed to send *some* data
- * before a write error.
- */
- for (nsent = 0; (size_t) nsent < len; ) {
- buflen = len - nsent;
-
- if (buflen > sizeof(buf))
- buflen = sizeof(buf);
-
- do
- if (use_pread)
- nread = pread(in_fd, buf, buflen, offset);
- else
- nread = read(in_fd, buf, buflen);
- while (nread == -1 && errno == EINTR);
-
- if (nread == 0)
- goto out;
-
- if (nread == -1) {
- if (use_pread && nsent == 0 && (errno == EIO || errno == ESPIPE)) {
- use_pread = 0;
- continue;
- }
-
- if (nsent == 0)
- nsent = -1;
-
- goto out;
- }
-
- for (nwritten = 0; nwritten < nread; ) {
- do
- n = write(out_fd, buf + nwritten, nread - nwritten);
- while (n == -1 && errno == EINTR);
-
- if (n != -1) {
- nwritten += n;
- continue;
- }
-
- if (errno != EAGAIN && errno != EWOULDBLOCK) {
- nsent = -1;
- goto out;
- }
-
- pfd.fd = out_fd;
- pfd.events = POLLOUT;
- pfd.revents = 0;
-
- do
- n = poll(&pfd, 1, -1);
- while (n == -1 && errno == EINTR);
-
- if (n == -1 || (pfd.revents & ~POLLOUT) != 0) {
- errno = EIO;
- nsent = -1;
- goto out;
- }
- }
-
- offset += nread;
- nsent += nread;
- }
-
-out:
- if (nsent != -1)
- req->off = offset;
-
- return nsent;
-}
-
-
-static ssize_t uv__fs_sendfile(uv_fs_t* req) {
- int in_fd;
- int out_fd;
-
- in_fd = req->flags;
- out_fd = req->file;
-
-#if defined(__linux__) || defined(__sun)
- {
- off_t off;
- ssize_t r;
-
- off = req->off;
- r = sendfile(out_fd, in_fd, &off, req->bufsml[0].len);
-
- /* sendfile() on SunOS returns EINVAL if the target fd is not a socket but
- * it still writes out data. Fortunately, we can detect it by checking if
- * the offset has been updated.
- */
- if (r != -1 || off > req->off) {
- r = off - req->off;
- req->off = off;
- return r;
- }
-
- if (errno == EINVAL ||
- errno == EIO ||
- errno == ENOTSOCK ||
- errno == EXDEV) {
- errno = 0;
- return uv__fs_sendfile_emul(req);
- }
-
- return -1;
- }
-#elif defined(__FreeBSD__) || defined(__APPLE__) || defined(__DragonFly__)
- {
- off_t len;
- ssize_t r;
-
- /* sendfile() on FreeBSD and Darwin returns EAGAIN if the target fd is in
- * non-blocking mode and not all data could be written. If a non-zero
- * number of bytes have been sent, we don't consider it an error.
- */
-
-#if defined(__FreeBSD__) || defined(__DragonFly__)
- len = 0;
- r = sendfile(in_fd, out_fd, req->off, req->bufsml[0].len, NULL, &len, 0);
-#else
- /* The darwin sendfile takes len as an input for the length to send,
- * so make sure to initialize it with the caller's value. */
- len = req->bufsml[0].len;
- r = sendfile(in_fd, out_fd, req->off, &len, NULL, 0);
-#endif
-
- /*
- * The man page for sendfile(2) on DragonFly states that `len` contains
- * a meaningful value ONLY in case of EAGAIN and EINTR.
- * Nothing is said about it's value in case of other errors, so better
- * not depend on the potential wrong assumption that is was not modified
- * by the syscall.
- */
- if (r == 0 || ((errno == EAGAIN || errno == EINTR) && len != 0)) {
- req->off += len;
- return (ssize_t) len;
- }
-
- if (errno == EINVAL ||
- errno == EIO ||
- errno == ENOTSOCK ||
- errno == EXDEV) {
- errno = 0;
- return uv__fs_sendfile_emul(req);
- }
-
- return -1;
- }
-#else
- /* Squelch compiler warnings. */
- (void) &in_fd;
- (void) &out_fd;
-
- return uv__fs_sendfile_emul(req);
-#endif
-}
-
-
-static ssize_t uv__fs_utime(uv_fs_t* req) {
- struct utimbuf buf;
- buf.actime = req->atime;
- buf.modtime = req->mtime;
- return utime(req->path, &buf); /* TODO use utimes() where available */
-}
-
-
-static ssize_t uv__fs_write(uv_fs_t* req) {
-#if defined(__linux__)
- static int no_pwritev;
-#endif
- ssize_t r;
-
- /* Serialize writes on OS X, concurrent write() and pwrite() calls result in
- * data loss. We can't use a per-file descriptor lock, the descriptor may be
- * a dup().
- */
-#if defined(__APPLE__)
- static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
-
- if (pthread_mutex_lock(&lock))
- abort();
-#endif
-
- if (req->off < 0) {
- if (req->nbufs == 1)
- r = write(req->file, req->bufs[0].base, req->bufs[0].len);
- else
- r = writev(req->file, (struct iovec*) req->bufs, req->nbufs);
- } else {
- if (req->nbufs == 1) {
- r = pwrite(req->file, req->bufs[0].base, req->bufs[0].len, req->off);
- goto done;
- }
-#if HAVE_PREADV
- r = pwritev(req->file, (struct iovec*) req->bufs, req->nbufs, req->off);
-#else
-# if defined(__linux__)
- if (no_pwritev) retry:
-# endif
- {
- off_t written;
- size_t index;
-
- written = 0;
- index = 0;
- r = 0;
- do {
- if (req->bufs[index].len > 0) {
- r = pwrite(req->file,
- req->bufs[index].base,
- req->bufs[index].len,
- req->off + written);
- if (r > 0)
- written += r;
- }
- index++;
- } while (index < req->nbufs && r >= 0);
- if (written > 0)
- r = written;
- }
-# if defined(__linux__)
- else {
- r = uv__pwritev(req->file,
- (struct iovec*) req->bufs,
- req->nbufs,
- req->off);
- if (r == -1 && errno == ENOSYS) {
- no_pwritev = 1;
- goto retry;
- }
- }
-# endif
-#endif
- }
-
-done:
-#if defined(__APPLE__)
- if (pthread_mutex_unlock(&lock))
- abort();
-#endif
-
- return r;
-}
-
-static void uv__to_stat(struct stat* src, uv_stat_t* dst) {
- dst->st_dev = src->st_dev;
- dst->st_mode = src->st_mode;
- dst->st_nlink = src->st_nlink;
- dst->st_uid = src->st_uid;
- dst->st_gid = src->st_gid;
- dst->st_rdev = src->st_rdev;
- dst->st_ino = src->st_ino;
- dst->st_size = src->st_size;
- dst->st_blksize = src->st_blksize;
- dst->st_blocks = src->st_blocks;
-
-#if defined(__APPLE__)
- dst->st_atim.tv_sec = src->st_atimespec.tv_sec;
- dst->st_atim.tv_nsec = src->st_atimespec.tv_nsec;
- dst->st_mtim.tv_sec = src->st_mtimespec.tv_sec;
- dst->st_mtim.tv_nsec = src->st_mtimespec.tv_nsec;
- dst->st_ctim.tv_sec = src->st_ctimespec.tv_sec;
- dst->st_ctim.tv_nsec = src->st_ctimespec.tv_nsec;
- dst->st_birthtim.tv_sec = src->st_birthtimespec.tv_sec;
- dst->st_birthtim.tv_nsec = src->st_birthtimespec.tv_nsec;
- dst->st_flags = src->st_flags;
- dst->st_gen = src->st_gen;
-#elif defined(__ANDROID__)
- dst->st_atim.tv_sec = src->st_atime;
- dst->st_atim.tv_nsec = src->st_atime_nsec;
- dst->st_mtim.tv_sec = src->st_mtime;
- dst->st_mtim.tv_nsec = src->st_mtime_nsec;
- dst->st_ctim.tv_sec = src->st_ctime;
- dst->st_ctim.tv_nsec = src->st_ctime_nsec;
- dst->st_birthtim.tv_sec = src->st_ctime;
- dst->st_birthtim.tv_nsec = src->st_ctime_nsec;
- dst->st_flags = 0;
- dst->st_gen = 0;
-#elif !defined(_AIX) && ( \
- defined(_BSD_SOURCE) || \
- defined(_SVID_SOURCE) || \
- defined(_XOPEN_SOURCE) || \
- defined(_DEFAULT_SOURCE))
- dst->st_atim.tv_sec = src->st_atim.tv_sec;
- dst->st_atim.tv_nsec = src->st_atim.tv_nsec;
- dst->st_mtim.tv_sec = src->st_mtim.tv_sec;
- dst->st_mtim.tv_nsec = src->st_mtim.tv_nsec;
- dst->st_ctim.tv_sec = src->st_ctim.tv_sec;
- dst->st_ctim.tv_nsec = src->st_ctim.tv_nsec;
-# if defined(__DragonFly__) || \
- defined(__FreeBSD__) || \
- defined(__OpenBSD__) || \
- defined(__NetBSD__)
- dst->st_birthtim.tv_sec = src->st_birthtim.tv_sec;
- dst->st_birthtim.tv_nsec = src->st_birthtim.tv_nsec;
- dst->st_flags = src->st_flags;
- dst->st_gen = src->st_gen;
-# else
- dst->st_birthtim.tv_sec = src->st_ctim.tv_sec;
- dst->st_birthtim.tv_nsec = src->st_ctim.tv_nsec;
- dst->st_flags = 0;
- dst->st_gen = 0;
-# endif
-#else
- dst->st_atim.tv_sec = src->st_atime;
- dst->st_atim.tv_nsec = 0;
- dst->st_mtim.tv_sec = src->st_mtime;
- dst->st_mtim.tv_nsec = 0;
- dst->st_ctim.tv_sec = src->st_ctime;
- dst->st_ctim.tv_nsec = 0;
- dst->st_birthtim.tv_sec = src->st_ctime;
- dst->st_birthtim.tv_nsec = 0;
- dst->st_flags = 0;
- dst->st_gen = 0;
-#endif
-}
-
-
-static int uv__fs_stat(const char *path, uv_stat_t *buf) {
- struct stat pbuf;
- int ret;
- ret = stat(path, &pbuf);
- uv__to_stat(&pbuf, buf);
- return ret;
-}
-
-
-static int uv__fs_lstat(const char *path, uv_stat_t *buf) {
- struct stat pbuf;
- int ret;
- ret = lstat(path, &pbuf);
- uv__to_stat(&pbuf, buf);
- return ret;
-}
-
-
-static int uv__fs_fstat(int fd, uv_stat_t *buf) {
- struct stat pbuf;
- int ret;
- ret = fstat(fd, &pbuf);
- uv__to_stat(&pbuf, buf);
- return ret;
-}
-
-
-typedef ssize_t (*uv__fs_buf_iter_processor)(uv_fs_t* req);
-static ssize_t uv__fs_buf_iter(uv_fs_t* req, uv__fs_buf_iter_processor process) {
- unsigned int iovmax;
- unsigned int nbufs;
- uv_buf_t* bufs;
- ssize_t total;
- ssize_t result;
-
- iovmax = uv__getiovmax();
- nbufs = req->nbufs;
- bufs = req->bufs;
- total = 0;
-
- while (nbufs > 0) {
- req->nbufs = nbufs;
- if (req->nbufs > iovmax)
- req->nbufs = iovmax;
-
- result = process(req);
- if (result <= 0) {
- if (total == 0)
- total = result;
- break;
- }
-
- if (req->off >= 0)
- req->off += result;
-
- req->bufs += req->nbufs;
- nbufs -= req->nbufs;
- total += result;
- }
-
- if (bufs != req->bufsml)
- uv__free(bufs);
- req->bufs = NULL;
-
- return total;
-}
-
-
-static void uv__fs_work(struct uv__work* w) {
- int retry_on_eintr;
- uv_fs_t* req;
- ssize_t r;
-
- req = container_of(w, uv_fs_t, work_req);
- retry_on_eintr = !(req->fs_type == UV_FS_CLOSE);
-
- do {
- errno = 0;
-
-#define X(type, action) \
- case UV_FS_ ## type: \
- r = action; \
- break;
-
- switch (req->fs_type) {
- X(ACCESS, access(req->path, req->flags));
- X(CHMOD, chmod(req->path, req->mode));
- X(CHOWN, chown(req->path, req->uid, req->gid));
- X(CLOSE, close(req->file));
- X(FCHMOD, fchmod(req->file, req->mode));
- X(FCHOWN, fchown(req->file, req->uid, req->gid));
- X(FDATASYNC, uv__fs_fdatasync(req));
- X(FSTAT, uv__fs_fstat(req->file, &req->statbuf));
- X(FSYNC, fsync(req->file));
- X(FTRUNCATE, ftruncate(req->file, req->off));
- X(FUTIME, uv__fs_futime(req));
- X(LSTAT, uv__fs_lstat(req->path, &req->statbuf));
- X(LINK, link(req->path, req->new_path));
- X(MKDIR, mkdir(req->path, req->mode));
- X(MKDTEMP, uv__fs_mkdtemp(req));
- X(OPEN, uv__fs_open(req));
- X(READ, uv__fs_buf_iter(req, uv__fs_read));
- X(SCANDIR, uv__fs_scandir(req));
- X(READLINK, uv__fs_readlink(req));
- X(REALPATH, uv__fs_realpath(req));
- X(RENAME, rename(req->path, req->new_path));
- X(RMDIR, rmdir(req->path));
- X(SENDFILE, uv__fs_sendfile(req));
- X(STAT, uv__fs_stat(req->path, &req->statbuf));
- X(SYMLINK, symlink(req->path, req->new_path));
- X(UNLINK, unlink(req->path));
- X(UTIME, uv__fs_utime(req));
- X(WRITE, uv__fs_buf_iter(req, uv__fs_write));
- default: abort();
- }
-#undef X
- } while (r == -1 && errno == EINTR && retry_on_eintr);
-
- if (r == -1)
- req->result = -errno;
- else
- req->result = r;
-
- if (r == 0 && (req->fs_type == UV_FS_STAT ||
- req->fs_type == UV_FS_FSTAT ||
- req->fs_type == UV_FS_LSTAT)) {
- req->ptr = &req->statbuf;
- }
-}
-
-
-static void uv__fs_done(struct uv__work* w, int status) {
- uv_fs_t* req;
-
- req = container_of(w, uv_fs_t, work_req);
- uv__req_unregister(req->loop, req);
-
- if (status == -ECANCELED) {
- assert(req->result == 0);
- req->result = -ECANCELED;
- }
-
- req->cb(req);
-}
-
-
-int uv_fs_access(uv_loop_t* loop,
- uv_fs_t* req,
- const char* path,
- int flags,
- uv_fs_cb cb) {
- INIT(ACCESS);
- PATH;
- req->flags = flags;
- POST;
-}
-
-
-int uv_fs_chmod(uv_loop_t* loop,
- uv_fs_t* req,
- const char* path,
- int mode,
- uv_fs_cb cb) {
- INIT(CHMOD);
- PATH;
- req->mode = mode;
- POST;
-}
-
-
-int uv_fs_chown(uv_loop_t* loop,
- uv_fs_t* req,
- const char* path,
- uv_uid_t uid,
- uv_gid_t gid,
- uv_fs_cb cb) {
- INIT(CHOWN);
- PATH;
- req->uid = uid;
- req->gid = gid;
- POST;
-}
-
-
-int uv_fs_close(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_fs_cb cb) {
- INIT(CLOSE);
- req->file = file;
- POST;
-}
-
-
-int uv_fs_fchmod(uv_loop_t* loop,
- uv_fs_t* req,
- uv_file file,
- int mode,
- uv_fs_cb cb) {
- INIT(FCHMOD);
- req->file = file;
- req->mode = mode;
- POST;
-}
-
-
-int uv_fs_fchown(uv_loop_t* loop,
- uv_fs_t* req,
- uv_file file,
- uv_uid_t uid,
- uv_gid_t gid,
- uv_fs_cb cb) {
- INIT(FCHOWN);
- req->file = file;
- req->uid = uid;
- req->gid = gid;
- POST;
-}
-
-
-int uv_fs_fdatasync(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_fs_cb cb) {
- INIT(FDATASYNC);
- req->file = file;
- POST;
-}
-
-
-int uv_fs_fstat(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_fs_cb cb) {
- INIT(FSTAT);
- req->file = file;
- POST;
-}
-
-
-int uv_fs_fsync(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_fs_cb cb) {
- INIT(FSYNC);
- req->file = file;
- POST;
-}
-
-
-int uv_fs_ftruncate(uv_loop_t* loop,
- uv_fs_t* req,
- uv_file file,
- int64_t off,
- uv_fs_cb cb) {
- INIT(FTRUNCATE);
- req->file = file;
- req->off = off;
- POST;
-}
-
-
-int uv_fs_futime(uv_loop_t* loop,
- uv_fs_t* req,
- uv_file file,
- double atime,
- double mtime,
- uv_fs_cb cb) {
- INIT(FUTIME);
- req->file = file;
- req->atime = atime;
- req->mtime = mtime;
- POST;
-}
-
-
-int uv_fs_lstat(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb) {
- INIT(LSTAT);
- PATH;
- POST;
-}
-
-
-int uv_fs_link(uv_loop_t* loop,
- uv_fs_t* req,
- const char* path,
- const char* new_path,
- uv_fs_cb cb) {
- INIT(LINK);
- PATH2;
- POST;
-}
-
-
-int uv_fs_mkdir(uv_loop_t* loop,
- uv_fs_t* req,
- const char* path,
- int mode,
- uv_fs_cb cb) {
- INIT(MKDIR);
- PATH;
- req->mode = mode;
- POST;
-}
-
-
-int uv_fs_mkdtemp(uv_loop_t* loop,
- uv_fs_t* req,
- const char* tpl,
- uv_fs_cb cb) {
- INIT(MKDTEMP);
- req->path = uv__strdup(tpl);
- if (req->path == NULL) {
- if (cb != NULL)
- uv__req_unregister(loop, req);
- return -ENOMEM;
- }
- POST;
-}
-
-
-int uv_fs_open(uv_loop_t* loop,
- uv_fs_t* req,
- const char* path,
- int flags,
- int mode,
- uv_fs_cb cb) {
- INIT(OPEN);
- PATH;
- req->flags = flags;
- req->mode = mode;
- POST;
-}
-
-
-int uv_fs_read(uv_loop_t* loop, uv_fs_t* req,
- uv_file file,
- const uv_buf_t bufs[],
- unsigned int nbufs,
- int64_t off,
- uv_fs_cb cb) {
- if (bufs == NULL || nbufs == 0)
- return -EINVAL;
-
- INIT(READ);
- req->file = file;
-
- req->nbufs = nbufs;
- req->bufs = req->bufsml;
- if (nbufs > ARRAY_SIZE(req->bufsml))
- req->bufs = uv__malloc(nbufs * sizeof(*bufs));
-
- if (req->bufs == NULL) {
- if (cb != NULL)
- uv__req_unregister(loop, req);
- return -ENOMEM;
- }
-
- memcpy(req->bufs, bufs, nbufs * sizeof(*bufs));
-
- req->off = off;
- POST;
-}
-
-
-int uv_fs_scandir(uv_loop_t* loop,
- uv_fs_t* req,
- const char* path,
- int flags,
- uv_fs_cb cb) {
- INIT(SCANDIR);
- PATH;
- req->flags = flags;
- POST;
-}
-
-
-int uv_fs_readlink(uv_loop_t* loop,
- uv_fs_t* req,
- const char* path,
- uv_fs_cb cb) {
- INIT(READLINK);
- PATH;
- POST;
-}
-
-
-int uv_fs_realpath(uv_loop_t* loop,
- uv_fs_t* req,
- const char * path,
- uv_fs_cb cb) {
- INIT(REALPATH);
- PATH;
- POST;
-}
-
-
-int uv_fs_rename(uv_loop_t* loop,
- uv_fs_t* req,
- const char* path,
- const char* new_path,
- uv_fs_cb cb) {
- INIT(RENAME);
- PATH2;
- POST;
-}
-
-
-int uv_fs_rmdir(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb) {
- INIT(RMDIR);
- PATH;
- POST;
-}
-
-
-int uv_fs_sendfile(uv_loop_t* loop,
- uv_fs_t* req,
- uv_file out_fd,
- uv_file in_fd,
- int64_t off,
- size_t len,
- uv_fs_cb cb) {
- INIT(SENDFILE);
- req->flags = in_fd; /* hack */
- req->file = out_fd;
- req->off = off;
- req->bufsml[0].len = len;
- POST;
-}
-
-
-int uv_fs_stat(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb) {
- INIT(STAT);
- PATH;
- POST;
-}
-
-
-int uv_fs_symlink(uv_loop_t* loop,
- uv_fs_t* req,
- const char* path,
- const char* new_path,
- int flags,
- uv_fs_cb cb) {
- INIT(SYMLINK);
- PATH2;
- req->flags = flags;
- POST;
-}
-
-
-int uv_fs_unlink(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb) {
- INIT(UNLINK);
- PATH;
- POST;
-}
-
-
-int uv_fs_utime(uv_loop_t* loop,
- uv_fs_t* req,
- const char* path,
- double atime,
- double mtime,
- uv_fs_cb cb) {
- INIT(UTIME);
- PATH;
- req->atime = atime;
- req->mtime = mtime;
- POST;
-}
-
-
-int uv_fs_write(uv_loop_t* loop,
- uv_fs_t* req,
- uv_file file,
- const uv_buf_t bufs[],
- unsigned int nbufs,
- int64_t off,
- uv_fs_cb cb) {
- if (bufs == NULL || nbufs == 0)
- return -EINVAL;
-
- INIT(WRITE);
- req->file = file;
-
- req->nbufs = nbufs;
- req->bufs = req->bufsml;
- if (nbufs > ARRAY_SIZE(req->bufsml))
- req->bufs = uv__malloc(nbufs * sizeof(*bufs));
-
- if (req->bufs == NULL) {
- if (cb != NULL)
- uv__req_unregister(loop, req);
- return -ENOMEM;
- }
-
- memcpy(req->bufs, bufs, nbufs * sizeof(*bufs));
-
- req->off = off;
- POST;
-}
-
-
-void uv_fs_req_cleanup(uv_fs_t* req) {
- /* Only necessary for asychronous requests, i.e., requests with a callback.
- * Synchronous ones don't copy their arguments and have req->path and
- * req->new_path pointing to user-owned memory. UV_FS_MKDTEMP is the
- * exception to the rule, it always allocates memory.
- */
- if (req->path != NULL && (req->cb != NULL || req->fs_type == UV_FS_MKDTEMP))
- uv__free((void*) req->path); /* Memory is shared with req->new_path. */
-
- req->path = NULL;
- req->new_path = NULL;
-
- if (req->fs_type == UV_FS_SCANDIR && req->ptr != NULL)
- uv__fs_scandir_cleanup(req);
-
- if (req->ptr != &req->statbuf)
- uv__free(req->ptr);
- req->ptr = NULL;
-}
diff --git a/3rdparty/libuv/src/unix/fsevents.c b/3rdparty/libuv/src/unix/fsevents.c
deleted file mode 100644
index d331a131726..00000000000
--- a/3rdparty/libuv/src/unix/fsevents.c
+++ /dev/null
@@ -1,904 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "internal.h"
-
-#if TARGET_OS_IPHONE
-
-/* iOS (currently) doesn't provide the FSEvents-API (nor CoreServices) */
-
-int uv__fsevents_init(uv_fs_event_t* handle) {
- return 0;
-}
-
-
-int uv__fsevents_close(uv_fs_event_t* handle) {
- return 0;
-}
-
-
-void uv__fsevents_loop_delete(uv_loop_t* loop) {
-}
-
-#else /* TARGET_OS_IPHONE */
-
-#include <dlfcn.h>
-#include <assert.h>
-#include <stdlib.h>
-#include <pthread.h>
-
-#include <CoreFoundation/CFRunLoop.h>
-#include <CoreServices/CoreServices.h>
-
-/* These are macros to avoid "initializer element is not constant" errors
- * with old versions of gcc.
- */
-#define kFSEventsModified (kFSEventStreamEventFlagItemFinderInfoMod | \
- kFSEventStreamEventFlagItemModified | \
- kFSEventStreamEventFlagItemInodeMetaMod | \
- kFSEventStreamEventFlagItemChangeOwner | \
- kFSEventStreamEventFlagItemXattrMod)
-
-#define kFSEventsRenamed (kFSEventStreamEventFlagItemCreated | \
- kFSEventStreamEventFlagItemRemoved | \
- kFSEventStreamEventFlagItemRenamed)
-
-#define kFSEventsSystem (kFSEventStreamEventFlagUserDropped | \
- kFSEventStreamEventFlagKernelDropped | \
- kFSEventStreamEventFlagEventIdsWrapped | \
- kFSEventStreamEventFlagHistoryDone | \
- kFSEventStreamEventFlagMount | \
- kFSEventStreamEventFlagUnmount | \
- kFSEventStreamEventFlagRootChanged)
-
-typedef struct uv__fsevents_event_s uv__fsevents_event_t;
-typedef struct uv__cf_loop_signal_s uv__cf_loop_signal_t;
-typedef struct uv__cf_loop_state_s uv__cf_loop_state_t;
-
-enum uv__cf_loop_signal_type_e {
- kUVCFLoopSignalRegular,
- kUVCFLoopSignalClosing
-};
-typedef enum uv__cf_loop_signal_type_e uv__cf_loop_signal_type_t;
-
-struct uv__cf_loop_signal_s {
- QUEUE member;
- uv_fs_event_t* handle;
- uv__cf_loop_signal_type_t type;
-};
-
-struct uv__fsevents_event_s {
- QUEUE member;
- int events;
- char path[1];
-};
-
-struct uv__cf_loop_state_s {
- CFRunLoopRef loop;
- CFRunLoopSourceRef signal_source;
- int fsevent_need_reschedule;
- FSEventStreamRef fsevent_stream;
- uv_sem_t fsevent_sem;
- uv_mutex_t fsevent_mutex;
- void* fsevent_handles[2];
- unsigned int fsevent_handle_count;
-};
-
-/* Forward declarations */
-static void uv__cf_loop_cb(void* arg);
-static void* uv__cf_loop_runner(void* arg);
-static int uv__cf_loop_signal(uv_loop_t* loop,
- uv_fs_event_t* handle,
- uv__cf_loop_signal_type_t type);
-
-/* Lazy-loaded by uv__fsevents_global_init(). */
-static CFArrayRef (*pCFArrayCreate)(CFAllocatorRef,
- const void**,
- CFIndex,
- const CFArrayCallBacks*);
-static void (*pCFRelease)(CFTypeRef);
-static void (*pCFRunLoopAddSource)(CFRunLoopRef,
- CFRunLoopSourceRef,
- CFStringRef);
-static CFRunLoopRef (*pCFRunLoopGetCurrent)(void);
-static void (*pCFRunLoopRemoveSource)(CFRunLoopRef,
- CFRunLoopSourceRef,
- CFStringRef);
-static void (*pCFRunLoopRun)(void);
-static CFRunLoopSourceRef (*pCFRunLoopSourceCreate)(CFAllocatorRef,
- CFIndex,
- CFRunLoopSourceContext*);
-static void (*pCFRunLoopSourceSignal)(CFRunLoopSourceRef);
-static void (*pCFRunLoopStop)(CFRunLoopRef);
-static void (*pCFRunLoopWakeUp)(CFRunLoopRef);
-static CFStringRef (*pCFStringCreateWithFileSystemRepresentation)(
- CFAllocatorRef,
- const char*);
-static CFStringEncoding (*pCFStringGetSystemEncoding)(void);
-static CFStringRef (*pkCFRunLoopDefaultMode);
-static FSEventStreamRef (*pFSEventStreamCreate)(CFAllocatorRef,
- FSEventStreamCallback,
- FSEventStreamContext*,
- CFArrayRef,
- FSEventStreamEventId,
- CFTimeInterval,
- FSEventStreamCreateFlags);
-static void (*pFSEventStreamFlushSync)(FSEventStreamRef);
-static void (*pFSEventStreamInvalidate)(FSEventStreamRef);
-static void (*pFSEventStreamRelease)(FSEventStreamRef);
-static void (*pFSEventStreamScheduleWithRunLoop)(FSEventStreamRef,
- CFRunLoopRef,
- CFStringRef);
-static Boolean (*pFSEventStreamStart)(FSEventStreamRef);
-static void (*pFSEventStreamStop)(FSEventStreamRef);
-
-#define UV__FSEVENTS_PROCESS(handle, block) \
- do { \
- QUEUE events; \
- QUEUE* q; \
- uv__fsevents_event_t* event; \
- int err; \
- uv_mutex_lock(&(handle)->cf_mutex); \
- /* Split-off all events and empty original queue */ \
- QUEUE_MOVE(&(handle)->cf_events, &events); \
- /* Get error (if any) and zero original one */ \
- err = (handle)->cf_error; \
- (handle)->cf_error = 0; \
- uv_mutex_unlock(&(handle)->cf_mutex); \
- /* Loop through events, deallocating each after processing */ \
- while (!QUEUE_EMPTY(&events)) { \
- q = QUEUE_HEAD(&events); \
- event = QUEUE_DATA(q, uv__fsevents_event_t, member); \
- QUEUE_REMOVE(q); \
- /* NOTE: Checking uv__is_active() is required here, because handle \
- * callback may close handle and invoking it after it will lead to \
- * incorrect behaviour */ \
- if (!uv__is_closing((handle)) && uv__is_active((handle))) \
- block \
- /* Free allocated data */ \
- uv__free(event); \
- } \
- if (err != 0 && !uv__is_closing((handle)) && uv__is_active((handle))) \
- (handle)->cb((handle), NULL, 0, err); \
- } while (0)
-
-
-/* Runs in UV loop's thread, when there're events to report to handle */
-static void uv__fsevents_cb(uv_async_t* cb) {
- uv_fs_event_t* handle;
-
- handle = cb->data;
-
- UV__FSEVENTS_PROCESS(handle, {
- handle->cb(handle, event->path[0] ? event->path : NULL, event->events, 0);
- });
-}
-
-
-/* Runs in CF thread, pushed event into handle's event list */
-static void uv__fsevents_push_event(uv_fs_event_t* handle,
- QUEUE* events,
- int err) {
- assert(events != NULL || err != 0);
- uv_mutex_lock(&handle->cf_mutex);
-
- /* Concatenate two queues */
- if (events != NULL)
- QUEUE_ADD(&handle->cf_events, events);
-
- /* Propagate error */
- if (err != 0)
- handle->cf_error = err;
- uv_mutex_unlock(&handle->cf_mutex);
-
- uv_async_send(handle->cf_cb);
-}
-
-
-/* Runs in CF thread, when there're events in FSEventStream */
-static void uv__fsevents_event_cb(ConstFSEventStreamRef streamRef,
- void* info,
- size_t numEvents,
- void* eventPaths,
- const FSEventStreamEventFlags eventFlags[],
- const FSEventStreamEventId eventIds[]) {
- size_t i;
- int len;
- char** paths;
- char* path;
- char* pos;
- uv_fs_event_t* handle;
- QUEUE* q;
- uv_loop_t* loop;
- uv__cf_loop_state_t* state;
- uv__fsevents_event_t* event;
- QUEUE head;
-
- loop = info;
- state = loop->cf_state;
- assert(state != NULL);
- paths = eventPaths;
-
- /* For each handle */
- uv_mutex_lock(&state->fsevent_mutex);
- QUEUE_FOREACH(q, &state->fsevent_handles) {
- handle = QUEUE_DATA(q, uv_fs_event_t, cf_member);
- QUEUE_INIT(&head);
-
- /* Process and filter out events */
- for (i = 0; i < numEvents; i++) {
- /* Ignore system events */
- if (eventFlags[i] & kFSEventsSystem)
- continue;
-
- path = paths[i];
- len = strlen(path);
-
- /* Filter out paths that are outside handle's request */
- if (strncmp(path, handle->realpath, handle->realpath_len) != 0)
- continue;
-
- if (handle->realpath_len > 1 || *handle->realpath != '/') {
- path += handle->realpath_len;
- len -= handle->realpath_len;
-
- /* Skip forward slash */
- if (*path != '\0') {
- path++;
- len--;
- }
- }
-
-#ifdef MAC_OS_X_VERSION_10_7
- /* Ignore events with path equal to directory itself */
- if (len == 0)
- continue;
-#endif /* MAC_OS_X_VERSION_10_7 */
-
- /* Do not emit events from subdirectories (without option set) */
- if ((handle->cf_flags & UV_FS_EVENT_RECURSIVE) == 0 && *path != 0) {
- pos = strchr(path + 1, '/');
- if (pos != NULL)
- continue;
- }
-
-#ifndef MAC_OS_X_VERSION_10_7
- path = "";
- len = 0;
-#endif /* MAC_OS_X_VERSION_10_7 */
-
- event = uv__malloc(sizeof(*event) + len);
- if (event == NULL)
- break;
-
- memset(event, 0, sizeof(*event));
- memcpy(event->path, path, len + 1);
-
- if ((eventFlags[i] & kFSEventsModified) != 0 &&
- (eventFlags[i] & kFSEventsRenamed) == 0)
- event->events = UV_CHANGE;
- else
- event->events = UV_RENAME;
-
- QUEUE_INSERT_TAIL(&head, &event->member);
- }
-
- if (!QUEUE_EMPTY(&head))
- uv__fsevents_push_event(handle, &head, 0);
- }
- uv_mutex_unlock(&state->fsevent_mutex);
-}
-
-
-/* Runs in CF thread */
-static int uv__fsevents_create_stream(uv_loop_t* loop, CFArrayRef paths) {
- uv__cf_loop_state_t* state;
- FSEventStreamContext ctx;
- FSEventStreamRef ref;
- CFAbsoluteTime latency;
- FSEventStreamCreateFlags flags;
-
- /* Initialize context */
- ctx.version = 0;
- ctx.info = loop;
- ctx.retain = NULL;
- ctx.release = NULL;
- ctx.copyDescription = NULL;
-
- latency = 0.05;
-
- /* Explanation of selected flags:
- * 1. NoDefer - without this flag, events that are happening continuously
- * (i.e. each event is happening after time interval less than `latency`,
- * counted from previous event), will be deferred and passed to callback
- * once they'll either fill whole OS buffer, or when this continuous stream
- * will stop (i.e. there'll be delay between events, bigger than
- * `latency`).
- * Specifying this flag will invoke callback after `latency` time passed
- * since event.
- * 2. FileEvents - fire callback for file changes too (by default it is firing
- * it only for directory changes).
- */
- flags = kFSEventStreamCreateFlagNoDefer | kFSEventStreamCreateFlagFileEvents;
-
- /*
- * NOTE: It might sound like a good idea to remember last seen StreamEventId,
- * but in reality one dir might have last StreamEventId less than, the other,
- * that is being watched now. Which will cause FSEventStream API to report
- * changes to files from the past.
- */
- ref = pFSEventStreamCreate(NULL,
- &uv__fsevents_event_cb,
- &ctx,
- paths,
- kFSEventStreamEventIdSinceNow,
- latency,
- flags);
- assert(ref != NULL);
-
- state = loop->cf_state;
- pFSEventStreamScheduleWithRunLoop(ref,
- state->loop,
- *pkCFRunLoopDefaultMode);
- if (!pFSEventStreamStart(ref)) {
- pFSEventStreamInvalidate(ref);
- pFSEventStreamRelease(ref);
- return -EMFILE;
- }
-
- state->fsevent_stream = ref;
- return 0;
-}
-
-
-/* Runs in CF thread */
-static void uv__fsevents_destroy_stream(uv_loop_t* loop) {
- uv__cf_loop_state_t* state;
-
- state = loop->cf_state;
-
- if (state->fsevent_stream == NULL)
- return;
-
- /* Flush all accumulated events */
- pFSEventStreamFlushSync(state->fsevent_stream);
-
- /* Stop emitting events */
- pFSEventStreamStop(state->fsevent_stream);
-
- /* Release stream */
- pFSEventStreamInvalidate(state->fsevent_stream);
- pFSEventStreamRelease(state->fsevent_stream);
- state->fsevent_stream = NULL;
-}
-
-
-/* Runs in CF thread, when there're new fsevent handles to add to stream */
-static void uv__fsevents_reschedule(uv_fs_event_t* handle,
- uv__cf_loop_signal_type_t type) {
- uv__cf_loop_state_t* state;
- QUEUE* q;
- uv_fs_event_t* curr;
- CFArrayRef cf_paths;
- CFStringRef* paths;
- unsigned int i;
- int err;
- unsigned int path_count;
-
- state = handle->loop->cf_state;
- paths = NULL;
- cf_paths = NULL;
- err = 0;
- /* NOTE: `i` is used in deallocation loop below */
- i = 0;
-
- /* Optimization to prevent O(n^2) time spent when starting to watch
- * many files simultaneously
- */
- uv_mutex_lock(&state->fsevent_mutex);
- if (state->fsevent_need_reschedule == 0) {
- uv_mutex_unlock(&state->fsevent_mutex);
- goto final;
- }
- state->fsevent_need_reschedule = 0;
- uv_mutex_unlock(&state->fsevent_mutex);
-
- /* Destroy previous FSEventStream */
- uv__fsevents_destroy_stream(handle->loop);
-
- /* Any failure below will be a memory failure */
- err = -ENOMEM;
-
- /* Create list of all watched paths */
- uv_mutex_lock(&state->fsevent_mutex);
- path_count = state->fsevent_handle_count;
- if (path_count != 0) {
- paths = uv__malloc(sizeof(*paths) * path_count);
- if (paths == NULL) {
- uv_mutex_unlock(&state->fsevent_mutex);
- goto final;
- }
-
- q = &state->fsevent_handles;
- for (; i < path_count; i++) {
- q = QUEUE_NEXT(q);
- assert(q != &state->fsevent_handles);
- curr = QUEUE_DATA(q, uv_fs_event_t, cf_member);
-
- assert(curr->realpath != NULL);
- paths[i] =
- pCFStringCreateWithFileSystemRepresentation(NULL, curr->realpath);
- if (paths[i] == NULL) {
- uv_mutex_unlock(&state->fsevent_mutex);
- goto final;
- }
- }
- }
- uv_mutex_unlock(&state->fsevent_mutex);
- err = 0;
-
- if (path_count != 0) {
- /* Create new FSEventStream */
- cf_paths = pCFArrayCreate(NULL, (const void**) paths, path_count, NULL);
- if (cf_paths == NULL) {
- err = -ENOMEM;
- goto final;
- }
- err = uv__fsevents_create_stream(handle->loop, cf_paths);
- }
-
-final:
- /* Deallocate all paths in case of failure */
- if (err != 0) {
- if (cf_paths == NULL) {
- while (i != 0)
- pCFRelease(paths[--i]);
- uv__free(paths);
- } else {
- /* CFArray takes ownership of both strings and original C-array */
- pCFRelease(cf_paths);
- }
-
- /* Broadcast error to all handles */
- uv_mutex_lock(&state->fsevent_mutex);
- QUEUE_FOREACH(q, &state->fsevent_handles) {
- curr = QUEUE_DATA(q, uv_fs_event_t, cf_member);
- uv__fsevents_push_event(curr, NULL, err);
- }
- uv_mutex_unlock(&state->fsevent_mutex);
- }
-
- /*
- * Main thread will block until the removal of handle from the list,
- * we must tell it when we're ready.
- *
- * NOTE: This is coupled with `uv_sem_wait()` in `uv__fsevents_close`
- */
- if (type == kUVCFLoopSignalClosing)
- uv_sem_post(&state->fsevent_sem);
-}
-
-
-static int uv__fsevents_global_init(void) {
- static pthread_mutex_t global_init_mutex = PTHREAD_MUTEX_INITIALIZER;
- static void* core_foundation_handle;
- static void* core_services_handle;
- int err;
-
- err = 0;
- pthread_mutex_lock(&global_init_mutex);
- if (core_foundation_handle != NULL)
- goto out;
-
- /* The libraries are never unloaded because we currently don't have a good
- * mechanism for keeping a reference count. It's unlikely to be an issue
- * but if it ever becomes one, we can turn the dynamic library handles into
- * per-event loop properties and have the dynamic linker keep track for us.
- */
- err = -ENOSYS;
- core_foundation_handle = dlopen("/System/Library/Frameworks/"
- "CoreFoundation.framework/"
- "Versions/A/CoreFoundation",
- RTLD_LAZY | RTLD_LOCAL);
- if (core_foundation_handle == NULL)
- goto out;
-
- core_services_handle = dlopen("/System/Library/Frameworks/"
- "CoreServices.framework/"
- "Versions/A/CoreServices",
- RTLD_LAZY | RTLD_LOCAL);
- if (core_services_handle == NULL)
- goto out;
-
- err = -ENOENT;
-#define V(handle, symbol) \
- do { \
- *(void **)(&p ## symbol) = dlsym((handle), #symbol); \
- if (p ## symbol == NULL) \
- goto out; \
- } \
- while (0)
- V(core_foundation_handle, CFArrayCreate);
- V(core_foundation_handle, CFRelease);
- V(core_foundation_handle, CFRunLoopAddSource);
- V(core_foundation_handle, CFRunLoopGetCurrent);
- V(core_foundation_handle, CFRunLoopRemoveSource);
- V(core_foundation_handle, CFRunLoopRun);
- V(core_foundation_handle, CFRunLoopSourceCreate);
- V(core_foundation_handle, CFRunLoopSourceSignal);
- V(core_foundation_handle, CFRunLoopStop);
- V(core_foundation_handle, CFRunLoopWakeUp);
- V(core_foundation_handle, CFStringCreateWithFileSystemRepresentation);
- V(core_foundation_handle, CFStringGetSystemEncoding);
- V(core_foundation_handle, kCFRunLoopDefaultMode);
- V(core_services_handle, FSEventStreamCreate);
- V(core_services_handle, FSEventStreamFlushSync);
- V(core_services_handle, FSEventStreamInvalidate);
- V(core_services_handle, FSEventStreamRelease);
- V(core_services_handle, FSEventStreamScheduleWithRunLoop);
- V(core_services_handle, FSEventStreamStart);
- V(core_services_handle, FSEventStreamStop);
-#undef V
- err = 0;
-
-out:
- if (err && core_services_handle != NULL) {
- dlclose(core_services_handle);
- core_services_handle = NULL;
- }
-
- if (err && core_foundation_handle != NULL) {
- dlclose(core_foundation_handle);
- core_foundation_handle = NULL;
- }
-
- pthread_mutex_unlock(&global_init_mutex);
- return err;
-}
-
-
-/* Runs in UV loop */
-static int uv__fsevents_loop_init(uv_loop_t* loop) {
- CFRunLoopSourceContext ctx;
- uv__cf_loop_state_t* state;
- pthread_attr_t attr_storage;
- pthread_attr_t* attr;
- int err;
-
- if (loop->cf_state != NULL)
- return 0;
-
- err = uv__fsevents_global_init();
- if (err)
- return err;
-
- state = uv__calloc(1, sizeof(*state));
- if (state == NULL)
- return -ENOMEM;
-
- err = uv_mutex_init(&loop->cf_mutex);
- if (err)
- goto fail_mutex_init;
-
- err = uv_sem_init(&loop->cf_sem, 0);
- if (err)
- goto fail_sem_init;
-
- QUEUE_INIT(&loop->cf_signals);
-
- err = uv_sem_init(&state->fsevent_sem, 0);
- if (err)
- goto fail_fsevent_sem_init;
-
- err = uv_mutex_init(&state->fsevent_mutex);
- if (err)
- goto fail_fsevent_mutex_init;
-
- QUEUE_INIT(&state->fsevent_handles);
- state->fsevent_need_reschedule = 0;
- state->fsevent_handle_count = 0;
-
- memset(&ctx, 0, sizeof(ctx));
- ctx.info = loop;
- ctx.perform = uv__cf_loop_cb;
- state->signal_source = pCFRunLoopSourceCreate(NULL, 0, &ctx);
- if (state->signal_source == NULL) {
- err = -ENOMEM;
- goto fail_signal_source_create;
- }
-
- /* In the unlikely event that pthread_attr_init() fails, create the thread
- * with the default stack size. We'll use a little more address space but
- * that in itself is not a fatal error.
- */
- attr = &attr_storage;
- if (pthread_attr_init(attr))
- attr = NULL;
-
- if (attr != NULL)
- if (pthread_attr_setstacksize(attr, 4 * PTHREAD_STACK_MIN))
- abort();
-
- loop->cf_state = state;
-
- /* uv_thread_t is an alias for pthread_t. */
- err = -pthread_create(&loop->cf_thread, attr, uv__cf_loop_runner, loop);
-
- if (attr != NULL)
- pthread_attr_destroy(attr);
-
- if (err)
- goto fail_thread_create;
-
- /* Synchronize threads */
- uv_sem_wait(&loop->cf_sem);
- return 0;
-
-fail_thread_create:
- loop->cf_state = NULL;
-
-fail_signal_source_create:
- uv_mutex_destroy(&state->fsevent_mutex);
-
-fail_fsevent_mutex_init:
- uv_sem_destroy(&state->fsevent_sem);
-
-fail_fsevent_sem_init:
- uv_sem_destroy(&loop->cf_sem);
-
-fail_sem_init:
- uv_mutex_destroy(&loop->cf_mutex);
-
-fail_mutex_init:
- uv__free(state);
- return err;
-}
-
-
-/* Runs in UV loop */
-void uv__fsevents_loop_delete(uv_loop_t* loop) {
- uv__cf_loop_signal_t* s;
- uv__cf_loop_state_t* state;
- QUEUE* q;
-
- if (loop->cf_state == NULL)
- return;
-
- if (uv__cf_loop_signal(loop, NULL, kUVCFLoopSignalRegular) != 0)
- abort();
-
- uv_thread_join(&loop->cf_thread);
- uv_sem_destroy(&loop->cf_sem);
- uv_mutex_destroy(&loop->cf_mutex);
-
- /* Free any remaining data */
- while (!QUEUE_EMPTY(&loop->cf_signals)) {
- q = QUEUE_HEAD(&loop->cf_signals);
- s = QUEUE_DATA(q, uv__cf_loop_signal_t, member);
- QUEUE_REMOVE(q);
- uv__free(s);
- }
-
- /* Destroy state */
- state = loop->cf_state;
- uv_sem_destroy(&state->fsevent_sem);
- uv_mutex_destroy(&state->fsevent_mutex);
- pCFRelease(state->signal_source);
- uv__free(state);
- loop->cf_state = NULL;
-}
-
-
-/* Runs in CF thread. This is the CF loop's body */
-static void* uv__cf_loop_runner(void* arg) {
- uv_loop_t* loop;
- uv__cf_loop_state_t* state;
-
- loop = arg;
- state = loop->cf_state;
- state->loop = pCFRunLoopGetCurrent();
-
- pCFRunLoopAddSource(state->loop,
- state->signal_source,
- *pkCFRunLoopDefaultMode);
-
- uv_sem_post(&loop->cf_sem);
-
- pCFRunLoopRun();
- pCFRunLoopRemoveSource(state->loop,
- state->signal_source,
- *pkCFRunLoopDefaultMode);
-
- return NULL;
-}
-
-
-/* Runs in CF thread, executed after `uv__cf_loop_signal()` */
-static void uv__cf_loop_cb(void* arg) {
- uv_loop_t* loop;
- uv__cf_loop_state_t* state;
- QUEUE* item;
- QUEUE split_head;
- uv__cf_loop_signal_t* s;
-
- loop = arg;
- state = loop->cf_state;
-
- uv_mutex_lock(&loop->cf_mutex);
- QUEUE_MOVE(&loop->cf_signals, &split_head);
- uv_mutex_unlock(&loop->cf_mutex);
-
- while (!QUEUE_EMPTY(&split_head)) {
- item = QUEUE_HEAD(&split_head);
- QUEUE_REMOVE(item);
-
- s = QUEUE_DATA(item, uv__cf_loop_signal_t, member);
-
- /* This was a termination signal */
- if (s->handle == NULL)
- pCFRunLoopStop(state->loop);
- else
- uv__fsevents_reschedule(s->handle, s->type);
-
- uv__free(s);
- }
-}
-
-
-/* Runs in UV loop to notify CF thread */
-int uv__cf_loop_signal(uv_loop_t* loop,
- uv_fs_event_t* handle,
- uv__cf_loop_signal_type_t type) {
- uv__cf_loop_signal_t* item;
- uv__cf_loop_state_t* state;
-
- item = uv__malloc(sizeof(*item));
- if (item == NULL)
- return -ENOMEM;
-
- item->handle = handle;
- item->type = type;
-
- uv_mutex_lock(&loop->cf_mutex);
- QUEUE_INSERT_TAIL(&loop->cf_signals, &item->member);
- uv_mutex_unlock(&loop->cf_mutex);
-
- state = loop->cf_state;
- assert(state != NULL);
- pCFRunLoopSourceSignal(state->signal_source);
- pCFRunLoopWakeUp(state->loop);
-
- return 0;
-}
-
-
-/* Runs in UV loop to initialize handle */
-int uv__fsevents_init(uv_fs_event_t* handle) {
- int err;
- uv__cf_loop_state_t* state;
-
- err = uv__fsevents_loop_init(handle->loop);
- if (err)
- return err;
-
- /* Get absolute path to file */
- handle->realpath = realpath(handle->path, NULL);
- if (handle->realpath == NULL)
- return -errno;
- handle->realpath_len = strlen(handle->realpath);
-
- /* Initialize event queue */
- QUEUE_INIT(&handle->cf_events);
- handle->cf_error = 0;
-
- /*
- * Events will occur in other thread.
- * Initialize callback for getting them back into event loop's thread
- */
- handle->cf_cb = uv__malloc(sizeof(*handle->cf_cb));
- if (handle->cf_cb == NULL) {
- err = -ENOMEM;
- goto fail_cf_cb_malloc;
- }
-
- handle->cf_cb->data = handle;
- uv_async_init(handle->loop, handle->cf_cb, uv__fsevents_cb);
- handle->cf_cb->flags |= UV__HANDLE_INTERNAL;
- uv_unref((uv_handle_t*) handle->cf_cb);
-
- err = uv_mutex_init(&handle->cf_mutex);
- if (err)
- goto fail_cf_mutex_init;
-
- /* Insert handle into the list */
- state = handle->loop->cf_state;
- uv_mutex_lock(&state->fsevent_mutex);
- QUEUE_INSERT_TAIL(&state->fsevent_handles, &handle->cf_member);
- state->fsevent_handle_count++;
- state->fsevent_need_reschedule = 1;
- uv_mutex_unlock(&state->fsevent_mutex);
-
- /* Reschedule FSEventStream */
- assert(handle != NULL);
- err = uv__cf_loop_signal(handle->loop, handle, kUVCFLoopSignalRegular);
- if (err)
- goto fail_loop_signal;
-
- return 0;
-
-fail_loop_signal:
- uv_mutex_destroy(&handle->cf_mutex);
-
-fail_cf_mutex_init:
- uv__free(handle->cf_cb);
- handle->cf_cb = NULL;
-
-fail_cf_cb_malloc:
- uv__free(handle->realpath);
- handle->realpath = NULL;
- handle->realpath_len = 0;
-
- return err;
-}
-
-
-/* Runs in UV loop to de-initialize handle */
-int uv__fsevents_close(uv_fs_event_t* handle) {
- int err;
- uv__cf_loop_state_t* state;
-
- if (handle->cf_cb == NULL)
- return -EINVAL;
-
- /* Remove handle from the list */
- state = handle->loop->cf_state;
- uv_mutex_lock(&state->fsevent_mutex);
- QUEUE_REMOVE(&handle->cf_member);
- state->fsevent_handle_count--;
- state->fsevent_need_reschedule = 1;
- uv_mutex_unlock(&state->fsevent_mutex);
-
- /* Reschedule FSEventStream */
- assert(handle != NULL);
- err = uv__cf_loop_signal(handle->loop, handle, kUVCFLoopSignalClosing);
- if (err)
- return -err;
-
- /* Wait for deinitialization */
- uv_sem_wait(&state->fsevent_sem);
-
- uv_close((uv_handle_t*) handle->cf_cb, (uv_close_cb) uv__free);
- handle->cf_cb = NULL;
-
- /* Free data in queue */
- UV__FSEVENTS_PROCESS(handle, {
- /* NOP */
- });
-
- uv_mutex_destroy(&handle->cf_mutex);
- uv__free(handle->realpath);
- handle->realpath = NULL;
- handle->realpath_len = 0;
-
- return 0;
-}
-
-#endif /* TARGET_OS_IPHONE */
diff --git a/3rdparty/libuv/src/unix/getaddrinfo.c b/3rdparty/libuv/src/unix/getaddrinfo.c
deleted file mode 100644
index 2049aea2f38..00000000000
--- a/3rdparty/libuv/src/unix/getaddrinfo.c
+++ /dev/null
@@ -1,202 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-/* Expose glibc-specific EAI_* error codes. Needs to be defined before we
- * include any headers.
- */
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE
-#endif
-
-#include "uv.h"
-#include "internal.h"
-
-#include <errno.h>
-#include <stddef.h> /* NULL */
-#include <stdlib.h>
-#include <string.h>
-
-/* EAI_* constants. */
-#include <netdb.h>
-
-
-int uv__getaddrinfo_translate_error(int sys_err) {
- switch (sys_err) {
- case 0: return 0;
-#if defined(EAI_ADDRFAMILY)
- case EAI_ADDRFAMILY: return UV_EAI_ADDRFAMILY;
-#endif
-#if defined(EAI_AGAIN)
- case EAI_AGAIN: return UV_EAI_AGAIN;
-#endif
-#if defined(EAI_BADFLAGS)
- case EAI_BADFLAGS: return UV_EAI_BADFLAGS;
-#endif
-#if defined(EAI_BADHINTS)
- case EAI_BADHINTS: return UV_EAI_BADHINTS;
-#endif
-#if defined(EAI_CANCELED)
- case EAI_CANCELED: return UV_EAI_CANCELED;
-#endif
-#if defined(EAI_FAIL)
- case EAI_FAIL: return UV_EAI_FAIL;
-#endif
-#if defined(EAI_FAMILY)
- case EAI_FAMILY: return UV_EAI_FAMILY;
-#endif
-#if defined(EAI_MEMORY)
- case EAI_MEMORY: return UV_EAI_MEMORY;
-#endif
-#if defined(EAI_NODATA)
- case EAI_NODATA: return UV_EAI_NODATA;
-#endif
-#if defined(EAI_NONAME)
-# if !defined(EAI_NODATA) || EAI_NODATA != EAI_NONAME
- case EAI_NONAME: return UV_EAI_NONAME;
-# endif
-#endif
-#if defined(EAI_OVERFLOW)
- case EAI_OVERFLOW: return UV_EAI_OVERFLOW;
-#endif
-#if defined(EAI_PROTOCOL)
- case EAI_PROTOCOL: return UV_EAI_PROTOCOL;
-#endif
-#if defined(EAI_SERVICE)
- case EAI_SERVICE: return UV_EAI_SERVICE;
-#endif
-#if defined(EAI_SOCKTYPE)
- case EAI_SOCKTYPE: return UV_EAI_SOCKTYPE;
-#endif
-#if defined(EAI_SYSTEM)
- case EAI_SYSTEM: return -errno;
-#endif
- }
- assert(!"unknown EAI_* error code");
- abort();
- return 0; /* Pacify compiler. */
-}
-
-
-static void uv__getaddrinfo_work(struct uv__work* w) {
- uv_getaddrinfo_t* req;
- int err;
-
- req = container_of(w, uv_getaddrinfo_t, work_req);
- err = getaddrinfo(req->hostname, req->service, req->hints, &req->addrinfo);
- req->retcode = uv__getaddrinfo_translate_error(err);
-}
-
-
-static void uv__getaddrinfo_done(struct uv__work* w, int status) {
- uv_getaddrinfo_t* req;
-
- req = container_of(w, uv_getaddrinfo_t, work_req);
- uv__req_unregister(req->loop, req);
-
- /* See initialization in uv_getaddrinfo(). */
- if (req->hints)
- uv__free(req->hints);
- else if (req->service)
- uv__free(req->service);
- else if (req->hostname)
- uv__free(req->hostname);
- else
- assert(0);
-
- req->hints = NULL;
- req->service = NULL;
- req->hostname = NULL;
-
- if (status == -ECANCELED) {
- assert(req->retcode == 0);
- req->retcode = UV_EAI_CANCELED;
- }
-
- if (req->cb)
- req->cb(req, req->retcode, req->addrinfo);
-}
-
-
-int uv_getaddrinfo(uv_loop_t* loop,
- uv_getaddrinfo_t* req,
- uv_getaddrinfo_cb cb,
- const char* hostname,
- const char* service,
- const struct addrinfo* hints) {
- size_t hostname_len;
- size_t service_len;
- size_t hints_len;
- size_t len;
- char* buf;
-
- if (req == NULL || (hostname == NULL && service == NULL))
- return -EINVAL;
-
- hostname_len = hostname ? strlen(hostname) + 1 : 0;
- service_len = service ? strlen(service) + 1 : 0;
- hints_len = hints ? sizeof(*hints) : 0;
- buf = uv__malloc(hostname_len + service_len + hints_len);
-
- if (buf == NULL)
- return -ENOMEM;
-
- uv__req_init(loop, req, UV_GETADDRINFO);
- req->loop = loop;
- req->cb = cb;
- req->addrinfo = NULL;
- req->hints = NULL;
- req->service = NULL;
- req->hostname = NULL;
- req->retcode = 0;
-
- /* order matters, see uv_getaddrinfo_done() */
- len = 0;
-
- if (hints) {
- req->hints = memcpy(buf + len, hints, sizeof(*hints));
- len += sizeof(*hints);
- }
-
- if (service) {
- req->service = memcpy(buf + len, service, service_len);
- len += service_len;
- }
-
- if (hostname)
- req->hostname = memcpy(buf + len, hostname, hostname_len);
-
- if (cb) {
- uv__work_submit(loop,
- &req->work_req,
- uv__getaddrinfo_work,
- uv__getaddrinfo_done);
- return 0;
- } else {
- uv__getaddrinfo_work(&req->work_req);
- uv__getaddrinfo_done(&req->work_req, 0);
- return req->retcode;
- }
-}
-
-
-void uv_freeaddrinfo(struct addrinfo* ai) {
- if (ai)
- freeaddrinfo(ai);
-}
diff --git a/3rdparty/libuv/src/unix/getnameinfo.c b/3rdparty/libuv/src/unix/getnameinfo.c
deleted file mode 100644
index daa798a450e..00000000000
--- a/3rdparty/libuv/src/unix/getnameinfo.c
+++ /dev/null
@@ -1,120 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
-*
-* Permission is hereby granted, free of charge, to any person obtaining a copy
-* of this software and associated documentation files (the "Software"), to
-* deal in the Software without restriction, including without limitation the
-* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-* sell copies of the Software, and to permit persons to whom the Software is
-* furnished to do so, subject to the following conditions:
-*
-* The above copyright notice and this permission notice shall be included in
-* all copies or substantial portions of the Software.
-*
-* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-* IN THE SOFTWARE.
-*/
-
-#include <assert.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "uv.h"
-#include "internal.h"
-
-
-static void uv__getnameinfo_work(struct uv__work* w) {
- uv_getnameinfo_t* req;
- int err;
- socklen_t salen;
-
- req = container_of(w, uv_getnameinfo_t, work_req);
-
- if (req->storage.ss_family == AF_INET)
- salen = sizeof(struct sockaddr_in);
- else if (req->storage.ss_family == AF_INET6)
- salen = sizeof(struct sockaddr_in6);
- else
- abort();
-
- err = getnameinfo((struct sockaddr*) &req->storage,
- salen,
- req->host,
- sizeof(req->host),
- req->service,
- sizeof(req->service),
- req->flags);
- req->retcode = uv__getaddrinfo_translate_error(err);
-}
-
-static void uv__getnameinfo_done(struct uv__work* w, int status) {
- uv_getnameinfo_t* req;
- char* host;
- char* service;
-
- req = container_of(w, uv_getnameinfo_t, work_req);
- uv__req_unregister(req->loop, req);
- host = service = NULL;
-
- if (status == -ECANCELED) {
- assert(req->retcode == 0);
- req->retcode = UV_EAI_CANCELED;
- } else if (req->retcode == 0) {
- host = req->host;
- service = req->service;
- }
-
- if (req->getnameinfo_cb)
- req->getnameinfo_cb(req, req->retcode, host, service);
-}
-
-/*
-* Entry point for getnameinfo
-* return 0 if a callback will be made
-* return error code if validation fails
-*/
-int uv_getnameinfo(uv_loop_t* loop,
- uv_getnameinfo_t* req,
- uv_getnameinfo_cb getnameinfo_cb,
- const struct sockaddr* addr,
- int flags) {
- if (req == NULL || addr == NULL)
- return UV_EINVAL;
-
- if (addr->sa_family == AF_INET) {
- memcpy(&req->storage,
- addr,
- sizeof(struct sockaddr_in));
- } else if (addr->sa_family == AF_INET6) {
- memcpy(&req->storage,
- addr,
- sizeof(struct sockaddr_in6));
- } else {
- return UV_EINVAL;
- }
-
- uv__req_init(loop, (uv_req_t*)req, UV_GETNAMEINFO);
-
- req->getnameinfo_cb = getnameinfo_cb;
- req->flags = flags;
- req->type = UV_GETNAMEINFO;
- req->loop = loop;
- req->retcode = 0;
-
- if (getnameinfo_cb) {
- uv__work_submit(loop,
- &req->work_req,
- uv__getnameinfo_work,
- uv__getnameinfo_done);
- return 0;
- } else {
- uv__getnameinfo_work(&req->work_req);
- uv__getnameinfo_done(&req->work_req, 0);
- return req->retcode;
- }
-}
diff --git a/3rdparty/libuv/src/unix/internal.h b/3rdparty/libuv/src/unix/internal.h
deleted file mode 100644
index 741fa57d69c..00000000000
--- a/3rdparty/libuv/src/unix/internal.h
+++ /dev/null
@@ -1,316 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#ifndef UV_UNIX_INTERNAL_H_
-#define UV_UNIX_INTERNAL_H_
-
-#include "uv-common.h"
-
-#include <assert.h>
-#include <stdlib.h> /* abort */
-#include <string.h> /* strrchr */
-#include <fcntl.h> /* O_CLOEXEC, may be */
-
-#if defined(__STRICT_ANSI__)
-# define inline __inline
-#endif
-
-#if defined(__linux__)
-# include "linux-syscalls.h"
-#endif /* __linux__ */
-
-#if defined(__sun)
-# include <sys/port.h>
-# include <port.h>
-#endif /* __sun */
-
-#if defined(_AIX)
-#define reqevents events
-#define rtnevents revents
-#include <sys/poll.h>
-#endif /* _AIX */
-
-#if defined(__APPLE__) && !TARGET_OS_IPHONE
-# include <CoreServices/CoreServices.h>
-#endif
-
-#define ACCESS_ONCE(type, var) \
- (*(volatile type*) &(var))
-
-#define ROUND_UP(a, b) \
- ((a) % (b) ? ((a) + (b)) - ((a) % (b)) : (a))
-
-#define UNREACHABLE() \
- do { \
- assert(0 && "unreachable code"); \
- abort(); \
- } \
- while (0)
-
-#define SAVE_ERRNO(block) \
- do { \
- int _saved_errno = errno; \
- do { block; } while (0); \
- errno = _saved_errno; \
- } \
- while (0)
-
-/* The __clang__ and __INTEL_COMPILER checks are superfluous because they
- * define __GNUC__. They are here to convey to you, dear reader, that these
- * macros are enabled when compiling with clang or icc.
- */
-#if defined(__clang__) || \
- defined(__GNUC__) || \
- defined(__INTEL_COMPILER) || \
- defined(__SUNPRO_C)
-# define UV_DESTRUCTOR(declaration) __attribute__((destructor)) declaration
-# define UV_UNUSED(declaration) __attribute__((unused)) declaration
-#else
-# define UV_DESTRUCTOR(declaration) declaration
-# define UV_UNUSED(declaration) declaration
-#endif
-
-#if defined(__linux__)
-# define UV__POLLIN UV__EPOLLIN
-# define UV__POLLOUT UV__EPOLLOUT
-# define UV__POLLERR UV__EPOLLERR
-# define UV__POLLHUP UV__EPOLLHUP
-#endif
-
-#if defined(__sun) || defined(_AIX)
-# define UV__POLLIN POLLIN
-# define UV__POLLOUT POLLOUT
-# define UV__POLLERR POLLERR
-# define UV__POLLHUP POLLHUP
-#endif
-
-#ifndef UV__POLLIN
-# define UV__POLLIN 1
-#endif
-
-#ifndef UV__POLLOUT
-# define UV__POLLOUT 2
-#endif
-
-#ifndef UV__POLLERR
-# define UV__POLLERR 4
-#endif
-
-#ifndef UV__POLLHUP
-# define UV__POLLHUP 8
-#endif
-
-#if !defined(O_CLOEXEC) && defined(__FreeBSD__)
-/*
- * It may be that we are just missing `__POSIX_VISIBLE >= 200809`.
- * Try using fixed value const and give up, if it doesn't work
- */
-# define O_CLOEXEC 0x00100000
-#endif
-
-typedef struct uv__stream_queued_fds_s uv__stream_queued_fds_t;
-
-/* handle flags */
-enum {
- UV_CLOSING = 0x01, /* uv_close() called but not finished. */
- UV_CLOSED = 0x02, /* close(2) finished. */
- UV_STREAM_READING = 0x04, /* uv_read_start() called. */
- UV_STREAM_SHUTTING = 0x08, /* uv_shutdown() called but not complete. */
- UV_STREAM_SHUT = 0x10, /* Write side closed. */
- UV_STREAM_READABLE = 0x20, /* The stream is readable */
- UV_STREAM_WRITABLE = 0x40, /* The stream is writable */
- UV_STREAM_BLOCKING = 0x80, /* Synchronous writes. */
- UV_STREAM_READ_PARTIAL = 0x100, /* read(2) read less than requested. */
- UV_STREAM_READ_EOF = 0x200, /* read(2) read EOF. */
- UV_TCP_NODELAY = 0x400, /* Disable Nagle. */
- UV_TCP_KEEPALIVE = 0x800, /* Turn on keep-alive. */
- UV_TCP_SINGLE_ACCEPT = 0x1000, /* Only accept() when idle. */
- UV_HANDLE_IPV6 = 0x10000, /* Handle is bound to a IPv6 socket. */
- UV_UDP_PROCESSING = 0x20000 /* Handle is running the send callback queue. */
-};
-
-/* loop flags */
-enum {
- UV_LOOP_BLOCK_SIGPROF = 1
-};
-
-typedef enum {
- UV_CLOCK_PRECISE = 0, /* Use the highest resolution clock available. */
- UV_CLOCK_FAST = 1 /* Use the fastest clock with <= 1ms granularity. */
-} uv_clocktype_t;
-
-struct uv__stream_queued_fds_s {
- unsigned int size;
- unsigned int offset;
- int fds[1];
-};
-
-
-/* core */
-int uv__nonblock(int fd, int set);
-int uv__close(int fd);
-int uv__cloexec(int fd, int set);
-int uv__socket(int domain, int type, int protocol);
-int uv__dup(int fd);
-ssize_t uv__recvmsg(int fd, struct msghdr *msg, int flags);
-void uv__make_close_pending(uv_handle_t* handle);
-int uv__getiovmax(void);
-
-void uv__io_init(uv__io_t* w, uv__io_cb cb, int fd);
-void uv__io_start(uv_loop_t* loop, uv__io_t* w, unsigned int events);
-void uv__io_stop(uv_loop_t* loop, uv__io_t* w, unsigned int events);
-void uv__io_close(uv_loop_t* loop, uv__io_t* w);
-void uv__io_feed(uv_loop_t* loop, uv__io_t* w);
-int uv__io_active(const uv__io_t* w, unsigned int events);
-void uv__io_poll(uv_loop_t* loop, int timeout); /* in milliseconds or -1 */
-
-/* async */
-void uv__async_send(struct uv__async* wa);
-void uv__async_init(struct uv__async* wa);
-int uv__async_start(uv_loop_t* loop, struct uv__async* wa, uv__async_cb cb);
-void uv__async_stop(uv_loop_t* loop, struct uv__async* wa);
-
-/* loop */
-void uv__run_idle(uv_loop_t* loop);
-void uv__run_check(uv_loop_t* loop);
-void uv__run_prepare(uv_loop_t* loop);
-
-/* stream */
-void uv__stream_init(uv_loop_t* loop, uv_stream_t* stream,
- uv_handle_type type);
-int uv__stream_open(uv_stream_t*, int fd, int flags);
-void uv__stream_destroy(uv_stream_t* stream);
-#if defined(__APPLE__)
-int uv__stream_try_select(uv_stream_t* stream, int* fd);
-#endif /* defined(__APPLE__) */
-void uv__server_io(uv_loop_t* loop, uv__io_t* w, unsigned int events);
-int uv__accept(int sockfd);
-int uv__dup2_cloexec(int oldfd, int newfd);
-int uv__open_cloexec(const char* path, int flags);
-
-/* tcp */
-int uv_tcp_listen(uv_tcp_t* tcp, int backlog, uv_connection_cb cb);
-int uv__tcp_nodelay(int fd, int on);
-int uv__tcp_keepalive(int fd, int on, unsigned int delay);
-
-/* pipe */
-int uv_pipe_listen(uv_pipe_t* handle, int backlog, uv_connection_cb cb);
-
-/* timer */
-void uv__run_timers(uv_loop_t* loop);
-int uv__next_timeout(const uv_loop_t* loop);
-
-/* signal */
-void uv__signal_close(uv_signal_t* handle);
-void uv__signal_global_once_init(void);
-void uv__signal_loop_cleanup(uv_loop_t* loop);
-
-/* platform specific */
-uint64_t uv__hrtime(uv_clocktype_t type);
-int uv__kqueue_init(uv_loop_t* loop);
-int uv__platform_loop_init(uv_loop_t* loop);
-void uv__platform_loop_delete(uv_loop_t* loop);
-void uv__platform_invalidate_fd(uv_loop_t* loop, int fd);
-
-/* various */
-void uv__async_close(uv_async_t* handle);
-void uv__check_close(uv_check_t* handle);
-void uv__fs_event_close(uv_fs_event_t* handle);
-void uv__idle_close(uv_idle_t* handle);
-void uv__pipe_close(uv_pipe_t* handle);
-void uv__poll_close(uv_poll_t* handle);
-void uv__prepare_close(uv_prepare_t* handle);
-void uv__process_close(uv_process_t* handle);
-void uv__stream_close(uv_stream_t* handle);
-void uv__tcp_close(uv_tcp_t* handle);
-void uv__timer_close(uv_timer_t* handle);
-void uv__udp_close(uv_udp_t* handle);
-void uv__udp_finish_close(uv_udp_t* handle);
-uv_handle_type uv__handle_type(int fd);
-
-#if defined(__APPLE__)
-int uv___stream_fd(const uv_stream_t* handle);
-#define uv__stream_fd(handle) (uv___stream_fd((const uv_stream_t*) (handle)))
-#else
-#define uv__stream_fd(handle) ((handle)->io_watcher.fd)
-#endif /* defined(__APPLE__) */
-
-#ifdef UV__O_NONBLOCK
-# define UV__F_NONBLOCK UV__O_NONBLOCK
-#else
-# define UV__F_NONBLOCK 1
-#endif
-
-int uv__make_socketpair(int fds[2], int flags);
-int uv__make_pipe(int fds[2], int flags);
-
-#if defined(__APPLE__)
-
-int uv__fsevents_init(uv_fs_event_t* handle);
-int uv__fsevents_close(uv_fs_event_t* handle);
-void uv__fsevents_loop_delete(uv_loop_t* loop);
-
-/* OSX < 10.7 has no file events, polyfill them */
-#ifndef MAC_OS_X_VERSION_10_7
-
-static const int kFSEventStreamCreateFlagFileEvents = 0x00000010;
-static const int kFSEventStreamEventFlagItemCreated = 0x00000100;
-static const int kFSEventStreamEventFlagItemRemoved = 0x00000200;
-static const int kFSEventStreamEventFlagItemInodeMetaMod = 0x00000400;
-static const int kFSEventStreamEventFlagItemRenamed = 0x00000800;
-static const int kFSEventStreamEventFlagItemModified = 0x00001000;
-static const int kFSEventStreamEventFlagItemFinderInfoMod = 0x00002000;
-static const int kFSEventStreamEventFlagItemChangeOwner = 0x00004000;
-static const int kFSEventStreamEventFlagItemXattrMod = 0x00008000;
-static const int kFSEventStreamEventFlagItemIsFile = 0x00010000;
-static const int kFSEventStreamEventFlagItemIsDir = 0x00020000;
-static const int kFSEventStreamEventFlagItemIsSymlink = 0x00040000;
-
-#endif /* __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070 */
-
-#endif /* defined(__APPLE__) */
-
-UV_UNUSED(static void uv__req_init(uv_loop_t* loop,
- uv_req_t* req,
- uv_req_type type)) {
- req->type = type;
- uv__req_register(loop, req);
-}
-#define uv__req_init(loop, req, type) \
- uv__req_init((loop), (uv_req_t*)(req), (type))
-
-UV_UNUSED(static void uv__update_time(uv_loop_t* loop)) {
- /* Use a fast time source if available. We only need millisecond precision.
- */
- loop->time = uv__hrtime(UV_CLOCK_FAST) / 1000000;
-}
-
-UV_UNUSED(static char* uv__basename_r(const char* path)) {
- char* s;
-
- s = strrchr(path, '/');
- if (s == NULL)
- return (char*) path;
-
- return s + 1;
-}
-
-#endif /* UV_UNIX_INTERNAL_H_ */
diff --git a/3rdparty/libuv/src/unix/kqueue.c b/3rdparty/libuv/src/unix/kqueue.c
deleted file mode 100644
index 495f20d285f..00000000000
--- a/3rdparty/libuv/src/unix/kqueue.c
+++ /dev/null
@@ -1,426 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "internal.h"
-
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-
-#include <sys/sysctl.h>
-#include <sys/types.h>
-#include <sys/event.h>
-#include <sys/time.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <time.h>
-
-static void uv__fs_event(uv_loop_t* loop, uv__io_t* w, unsigned int fflags);
-
-
-int uv__kqueue_init(uv_loop_t* loop) {
- loop->backend_fd = kqueue();
- if (loop->backend_fd == -1)
- return -errno;
-
- uv__cloexec(loop->backend_fd, 1);
-
- return 0;
-}
-
-
-void uv__io_poll(uv_loop_t* loop, int timeout) {
- struct kevent events[1024];
- struct kevent* ev;
- struct timespec spec;
- unsigned int nevents;
- unsigned int revents;
- QUEUE* q;
- uv__io_t* w;
- sigset_t* pset;
- sigset_t set;
- uint64_t base;
- uint64_t diff;
- int filter;
- int fflags;
- int count;
- int nfds;
- int fd;
- int op;
- int i;
-
- if (loop->nfds == 0) {
- assert(QUEUE_EMPTY(&loop->watcher_queue));
- return;
- }
-
- nevents = 0;
-
- while (!QUEUE_EMPTY(&loop->watcher_queue)) {
- q = QUEUE_HEAD(&loop->watcher_queue);
- QUEUE_REMOVE(q);
- QUEUE_INIT(q);
-
- w = QUEUE_DATA(q, uv__io_t, watcher_queue);
- assert(w->pevents != 0);
- assert(w->fd >= 0);
- assert(w->fd < (int) loop->nwatchers);
-
- if ((w->events & UV__POLLIN) == 0 && (w->pevents & UV__POLLIN) != 0) {
- filter = EVFILT_READ;
- fflags = 0;
- op = EV_ADD;
-
- if (w->cb == uv__fs_event) {
- filter = EVFILT_VNODE;
- fflags = NOTE_ATTRIB | NOTE_WRITE | NOTE_RENAME
- | NOTE_DELETE | NOTE_EXTEND | NOTE_REVOKE;
- op = EV_ADD | EV_ONESHOT; /* Stop the event from firing repeatedly. */
- }
-
- EV_SET(events + nevents, w->fd, filter, op, fflags, 0, 0);
-
- if (++nevents == ARRAY_SIZE(events)) {
- if (kevent(loop->backend_fd, events, nevents, NULL, 0, NULL))
- abort();
- nevents = 0;
- }
- }
-
- if ((w->events & UV__POLLOUT) == 0 && (w->pevents & UV__POLLOUT) != 0) {
- EV_SET(events + nevents, w->fd, EVFILT_WRITE, EV_ADD, 0, 0, 0);
-
- if (++nevents == ARRAY_SIZE(events)) {
- if (kevent(loop->backend_fd, events, nevents, NULL, 0, NULL))
- abort();
- nevents = 0;
- }
- }
-
- w->events = w->pevents;
- }
-
- pset = NULL;
- if (loop->flags & UV_LOOP_BLOCK_SIGPROF) {
- pset = &set;
- sigemptyset(pset);
- sigaddset(pset, SIGPROF);
- }
-
- assert(timeout >= -1);
- base = loop->time;
- count = 48; /* Benchmarks suggest this gives the best throughput. */
-
- for (;; nevents = 0) {
- if (timeout != -1) {
- spec.tv_sec = timeout / 1000;
- spec.tv_nsec = (timeout % 1000) * 1000000;
- }
-
- if (pset != NULL)
- pthread_sigmask(SIG_BLOCK, pset, NULL);
-
- nfds = kevent(loop->backend_fd,
- events,
- nevents,
- events,
- ARRAY_SIZE(events),
- timeout == -1 ? NULL : &spec);
-
- if (pset != NULL)
- pthread_sigmask(SIG_UNBLOCK, pset, NULL);
-
- /* Update loop->time unconditionally. It's tempting to skip the update when
- * timeout == 0 (i.e. non-blocking poll) but there is no guarantee that the
- * operating system didn't reschedule our process while in the syscall.
- */
- SAVE_ERRNO(uv__update_time(loop));
-
- if (nfds == 0) {
- assert(timeout != -1);
- return;
- }
-
- if (nfds == -1) {
- if (errno != EINTR)
- abort();
-
- if (timeout == 0)
- return;
-
- if (timeout == -1)
- continue;
-
- /* Interrupted by a signal. Update timeout and poll again. */
- goto update_timeout;
- }
-
- nevents = 0;
-
- assert(loop->watchers != NULL);
- loop->watchers[loop->nwatchers] = (void*) events;
- loop->watchers[loop->nwatchers + 1] = (void*) (uintptr_t) nfds;
- for (i = 0; i < nfds; i++) {
- ev = events + i;
- fd = ev->ident;
- /* Skip invalidated events, see uv__platform_invalidate_fd */
- if (fd == -1)
- continue;
- w = loop->watchers[fd];
-
- if (w == NULL) {
- /* File descriptor that we've stopped watching, disarm it. */
- /* TODO batch up */
- struct kevent events[1];
-
- EV_SET(events + 0, fd, ev->filter, EV_DELETE, 0, 0, 0);
- if (kevent(loop->backend_fd, events, 1, NULL, 0, NULL))
- if (errno != EBADF && errno != ENOENT)
- abort();
-
- continue;
- }
-
- if (ev->filter == EVFILT_VNODE) {
- assert(w->events == UV__POLLIN);
- assert(w->pevents == UV__POLLIN);
- w->cb(loop, w, ev->fflags); /* XXX always uv__fs_event() */
- nevents++;
- continue;
- }
-
- revents = 0;
-
- if (ev->filter == EVFILT_READ) {
- if (w->pevents & UV__POLLIN) {
- revents |= UV__POLLIN;
- w->rcount = ev->data;
- } else {
- /* TODO batch up */
- struct kevent events[1];
- EV_SET(events + 0, fd, ev->filter, EV_DELETE, 0, 0, 0);
- if (kevent(loop->backend_fd, events, 1, NULL, 0, NULL))
- if (errno != ENOENT)
- abort();
- }
- }
-
- if (ev->filter == EVFILT_WRITE) {
- if (w->pevents & UV__POLLOUT) {
- revents |= UV__POLLOUT;
- w->wcount = ev->data;
- } else {
- /* TODO batch up */
- struct kevent events[1];
- EV_SET(events + 0, fd, ev->filter, EV_DELETE, 0, 0, 0);
- if (kevent(loop->backend_fd, events, 1, NULL, 0, NULL))
- if (errno != ENOENT)
- abort();
- }
- }
-
- if (ev->flags & EV_ERROR)
- revents |= UV__POLLERR;
-
- if (revents == 0)
- continue;
-
- w->cb(loop, w, revents);
- nevents++;
- }
- loop->watchers[loop->nwatchers] = NULL;
- loop->watchers[loop->nwatchers + 1] = NULL;
-
- if (nevents != 0) {
- if (nfds == ARRAY_SIZE(events) && --count != 0) {
- /* Poll for more events but don't block this time. */
- timeout = 0;
- continue;
- }
- return;
- }
-
- if (timeout == 0)
- return;
-
- if (timeout == -1)
- continue;
-
-update_timeout:
- assert(timeout > 0);
-
- diff = loop->time - base;
- if (diff >= (uint64_t) timeout)
- return;
-
- timeout -= diff;
- }
-}
-
-
-void uv__platform_invalidate_fd(uv_loop_t* loop, int fd) {
- struct kevent* events;
- uintptr_t i;
- uintptr_t nfds;
-
- assert(loop->watchers != NULL);
-
- events = (struct kevent*) loop->watchers[loop->nwatchers];
- nfds = (uintptr_t) loop->watchers[loop->nwatchers + 1];
- if (events == NULL)
- return;
-
- /* Invalidate events with same file descriptor */
- for (i = 0; i < nfds; i++)
- if ((int) events[i].ident == fd)
- events[i].ident = -1;
-}
-
-
-static void uv__fs_event(uv_loop_t* loop, uv__io_t* w, unsigned int fflags) {
- uv_fs_event_t* handle;
- struct kevent ev;
- int events;
- const char* path;
-#if defined(F_GETPATH)
- /* MAXPATHLEN == PATH_MAX but the former is what XNU calls it internally. */
- char pathbuf[MAXPATHLEN];
-#endif
-
- handle = container_of(w, uv_fs_event_t, event_watcher);
-
- if (fflags & (NOTE_ATTRIB | NOTE_EXTEND))
- events = UV_CHANGE;
- else
- events = UV_RENAME;
-
- path = NULL;
-#if defined(F_GETPATH)
- /* Also works when the file has been unlinked from the file system. Passing
- * in the path when the file has been deleted is arguably a little strange
- * but it's consistent with what the inotify backend does.
- */
- if (fcntl(handle->event_watcher.fd, F_GETPATH, pathbuf) == 0)
- path = uv__basename_r(pathbuf);
-#endif
- handle->cb(handle, path, events, 0);
-
- if (handle->event_watcher.fd == -1)
- return;
-
- /* Watcher operates in one-shot mode, re-arm it. */
- fflags = NOTE_ATTRIB | NOTE_WRITE | NOTE_RENAME
- | NOTE_DELETE | NOTE_EXTEND | NOTE_REVOKE;
-
- EV_SET(&ev, w->fd, EVFILT_VNODE, EV_ADD | EV_ONESHOT, fflags, 0, 0);
-
- if (kevent(loop->backend_fd, &ev, 1, NULL, 0, NULL))
- abort();
-}
-
-
-int uv_fs_event_init(uv_loop_t* loop, uv_fs_event_t* handle) {
- uv__handle_init(loop, (uv_handle_t*)handle, UV_FS_EVENT);
- return 0;
-}
-
-
-int uv_fs_event_start(uv_fs_event_t* handle,
- uv_fs_event_cb cb,
- const char* path,
- unsigned int flags) {
-#if defined(__APPLE__)
- struct stat statbuf;
-#endif /* defined(__APPLE__) */
- int fd;
-
- if (uv__is_active(handle))
- return -EINVAL;
-
- /* TODO open asynchronously - but how do we report back errors? */
- fd = open(path, O_RDONLY);
- if (fd == -1)
- return -errno;
-
- uv__handle_start(handle);
- uv__io_init(&handle->event_watcher, uv__fs_event, fd);
- handle->path = uv__strdup(path);
- handle->cb = cb;
-
-#if defined(__APPLE__)
- /* Nullify field to perform checks later */
- handle->cf_cb = NULL;
- handle->realpath = NULL;
- handle->realpath_len = 0;
- handle->cf_flags = flags;
-
- if (fstat(fd, &statbuf))
- goto fallback;
- /* FSEvents works only with directories */
- if (!(statbuf.st_mode & S_IFDIR))
- goto fallback;
-
- /* The fallback fd is no longer needed */
- uv__close(fd);
- handle->event_watcher.fd = -1;
-
- return uv__fsevents_init(handle);
-
-fallback:
-#endif /* defined(__APPLE__) */
-
- uv__io_start(handle->loop, &handle->event_watcher, UV__POLLIN);
-
- return 0;
-}
-
-
-int uv_fs_event_stop(uv_fs_event_t* handle) {
- if (!uv__is_active(handle))
- return 0;
-
- uv__handle_stop(handle);
-
-#if defined(__APPLE__)
- if (uv__fsevents_close(handle))
-#endif /* defined(__APPLE__) */
- {
- uv__io_close(handle->loop, &handle->event_watcher);
- }
-
- uv__free(handle->path);
- handle->path = NULL;
-
- if (handle->event_watcher.fd != -1) {
- /* When FSEvents is used, we don't use the event_watcher's fd under certain
- * confitions. (see uv_fs_event_start) */
- uv__close(handle->event_watcher.fd);
- handle->event_watcher.fd = -1;
- }
-
- return 0;
-}
-
-
-void uv__fs_event_close(uv_fs_event_t* handle) {
- uv_fs_event_stop(handle);
-}
diff --git a/3rdparty/libuv/src/unix/linux-core.c b/3rdparty/libuv/src/unix/linux-core.c
deleted file mode 100644
index 3ff6fb15e93..00000000000
--- a/3rdparty/libuv/src/unix/linux-core.c
+++ /dev/null
@@ -1,899 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "internal.h"
-
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <errno.h>
-
-#include <net/if.h>
-#include <sys/param.h>
-#include <sys/prctl.h>
-#include <sys/sysinfo.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <time.h>
-
-#define HAVE_IFADDRS_H 1
-
-#ifdef __UCLIBC__
-# if __UCLIBC_MAJOR__ < 0 || __UCLIBC_MINOR__ < 9 || __UCLIBC_SUBLEVEL__ < 32
-# undef HAVE_IFADDRS_H
-# endif
-#endif
-
-#ifdef HAVE_IFADDRS_H
-# if defined(__ANDROID__)
-# include "android-ifaddrs.h"
-# else
-# include <ifaddrs.h>
-# endif
-# include <sys/socket.h>
-# include <net/ethernet.h>
-# include <linux/if_packet.h>
-#endif /* HAVE_IFADDRS_H */
-
-/* Available from 2.6.32 onwards. */
-#ifndef CLOCK_MONOTONIC_COARSE
-# define CLOCK_MONOTONIC_COARSE 6
-#endif
-
-/* This is rather annoying: CLOCK_BOOTTIME lives in <linux/time.h> but we can't
- * include that file because it conflicts with <time.h>. We'll just have to
- * define it ourselves.
- */
-#ifndef CLOCK_BOOTTIME
-# define CLOCK_BOOTTIME 7
-#endif
-
-static int read_models(unsigned int numcpus, uv_cpu_info_t* ci);
-static int read_times(unsigned int numcpus, uv_cpu_info_t* ci);
-static void read_speeds(unsigned int numcpus, uv_cpu_info_t* ci);
-static unsigned long read_cpufreq(unsigned int cpunum);
-
-
-int uv__platform_loop_init(uv_loop_t* loop) {
- int fd;
-
- fd = uv__epoll_create1(UV__EPOLL_CLOEXEC);
-
- /* epoll_create1() can fail either because it's not implemented (old kernel)
- * or because it doesn't understand the EPOLL_CLOEXEC flag.
- */
- if (fd == -1 && (errno == ENOSYS || errno == EINVAL)) {
- fd = uv__epoll_create(256);
-
- if (fd != -1)
- uv__cloexec(fd, 1);
- }
-
- loop->backend_fd = fd;
- loop->inotify_fd = -1;
- loop->inotify_watchers = NULL;
-
- if (fd == -1)
- return -errno;
-
- return 0;
-}
-
-
-void uv__platform_loop_delete(uv_loop_t* loop) {
- if (loop->inotify_fd == -1) return;
- uv__io_stop(loop, &loop->inotify_read_watcher, UV__POLLIN);
- uv__close(loop->inotify_fd);
- loop->inotify_fd = -1;
-}
-
-
-void uv__platform_invalidate_fd(uv_loop_t* loop, int fd) {
- struct uv__epoll_event* events;
- struct uv__epoll_event dummy;
- uintptr_t i;
- uintptr_t nfds;
-
- assert(loop->watchers != NULL);
-
- events = (struct uv__epoll_event*) loop->watchers[loop->nwatchers];
- nfds = (uintptr_t) loop->watchers[loop->nwatchers + 1];
- if (events != NULL)
- /* Invalidate events with same file descriptor */
- for (i = 0; i < nfds; i++)
- if ((int) events[i].data == fd)
- events[i].data = -1;
-
- /* Remove the file descriptor from the epoll.
- * This avoids a problem where the same file description remains open
- * in another process, causing repeated junk epoll events.
- *
- * We pass in a dummy epoll_event, to work around a bug in old kernels.
- */
- if (loop->backend_fd >= 0) {
- /* Work around a bug in kernels 3.10 to 3.19 where passing a struct that
- * has the EPOLLWAKEUP flag set generates spurious audit syslog warnings.
- */
- memset(&dummy, 0, sizeof(dummy));
- uv__epoll_ctl(loop->backend_fd, UV__EPOLL_CTL_DEL, fd, &dummy);
- }
-}
-
-
-void uv__io_poll(uv_loop_t* loop, int timeout) {
- /* A bug in kernels < 2.6.37 makes timeouts larger than ~30 minutes
- * effectively infinite on 32 bits architectures. To avoid blocking
- * indefinitely, we cap the timeout and poll again if necessary.
- *
- * Note that "30 minutes" is a simplification because it depends on
- * the value of CONFIG_HZ. The magic constant assumes CONFIG_HZ=1200,
- * that being the largest value I have seen in the wild (and only once.)
- */
- static const int max_safe_timeout = 1789569;
- static int no_epoll_pwait;
- static int no_epoll_wait;
- struct uv__epoll_event events[1024];
- struct uv__epoll_event* pe;
- struct uv__epoll_event e;
- int real_timeout;
- QUEUE* q;
- uv__io_t* w;
- sigset_t sigset;
- uint64_t sigmask;
- uint64_t base;
- int nevents;
- int count;
- int nfds;
- int fd;
- int op;
- int i;
-
- if (loop->nfds == 0) {
- assert(QUEUE_EMPTY(&loop->watcher_queue));
- return;
- }
-
- while (!QUEUE_EMPTY(&loop->watcher_queue)) {
- q = QUEUE_HEAD(&loop->watcher_queue);
- QUEUE_REMOVE(q);
- QUEUE_INIT(q);
-
- w = QUEUE_DATA(q, uv__io_t, watcher_queue);
- assert(w->pevents != 0);
- assert(w->fd >= 0);
- assert(w->fd < (int) loop->nwatchers);
-
- e.events = w->pevents;
- e.data = w->fd;
-
- if (w->events == 0)
- op = UV__EPOLL_CTL_ADD;
- else
- op = UV__EPOLL_CTL_MOD;
-
- /* XXX Future optimization: do EPOLL_CTL_MOD lazily if we stop watching
- * events, skip the syscall and squelch the events after epoll_wait().
- */
- if (uv__epoll_ctl(loop->backend_fd, op, w->fd, &e)) {
- if (errno != EEXIST)
- abort();
-
- assert(op == UV__EPOLL_CTL_ADD);
-
- /* We've reactivated a file descriptor that's been watched before. */
- if (uv__epoll_ctl(loop->backend_fd, UV__EPOLL_CTL_MOD, w->fd, &e))
- abort();
- }
-
- w->events = w->pevents;
- }
-
- sigmask = 0;
- if (loop->flags & UV_LOOP_BLOCK_SIGPROF) {
- sigemptyset(&sigset);
- sigaddset(&sigset, SIGPROF);
- sigmask |= 1 << (SIGPROF - 1);
- }
-
- assert(timeout >= -1);
- base = loop->time;
- count = 48; /* Benchmarks suggest this gives the best throughput. */
- real_timeout = timeout;
-
- for (;;) {
- /* See the comment for max_safe_timeout for an explanation of why
- * this is necessary. Executive summary: kernel bug workaround.
- */
- if (sizeof(int32_t) == sizeof(long) && timeout >= max_safe_timeout)
- timeout = max_safe_timeout;
-
- if (sigmask != 0 && no_epoll_pwait != 0)
- if (pthread_sigmask(SIG_BLOCK, &sigset, NULL))
- abort();
-
- if (no_epoll_wait != 0 || (sigmask != 0 && no_epoll_pwait == 0)) {
- nfds = uv__epoll_pwait(loop->backend_fd,
- events,
- ARRAY_SIZE(events),
- timeout,
- sigmask);
- if (nfds == -1 && errno == ENOSYS)
- no_epoll_pwait = 1;
- } else {
- nfds = uv__epoll_wait(loop->backend_fd,
- events,
- ARRAY_SIZE(events),
- timeout);
- if (nfds == -1 && errno == ENOSYS)
- no_epoll_wait = 1;
- }
-
- if (sigmask != 0 && no_epoll_pwait != 0)
- if (pthread_sigmask(SIG_UNBLOCK, &sigset, NULL))
- abort();
-
- /* Update loop->time unconditionally. It's tempting to skip the update when
- * timeout == 0 (i.e. non-blocking poll) but there is no guarantee that the
- * operating system didn't reschedule our process while in the syscall.
- */
- SAVE_ERRNO(uv__update_time(loop));
-
- if (nfds == 0) {
- assert(timeout != -1);
-
- timeout = real_timeout - timeout;
- if (timeout > 0)
- continue;
-
- return;
- }
-
- if (nfds == -1) {
- if (errno == ENOSYS) {
- /* epoll_wait() or epoll_pwait() failed, try the other system call. */
- assert(no_epoll_wait == 0 || no_epoll_pwait == 0);
- continue;
- }
-
- if (errno != EINTR)
- abort();
-
- if (timeout == -1)
- continue;
-
- if (timeout == 0)
- return;
-
- /* Interrupted by a signal. Update timeout and poll again. */
- goto update_timeout;
- }
-
- nevents = 0;
-
- assert(loop->watchers != NULL);
- loop->watchers[loop->nwatchers] = (void*) events;
- loop->watchers[loop->nwatchers + 1] = (void*) (uintptr_t) nfds;
- for (i = 0; i < nfds; i++) {
- pe = events + i;
- fd = pe->data;
-
- /* Skip invalidated events, see uv__platform_invalidate_fd */
- if (fd == -1)
- continue;
-
- assert(fd >= 0);
- assert((unsigned) fd < loop->nwatchers);
-
- w = loop->watchers[fd];
-
- if (w == NULL) {
- /* File descriptor that we've stopped watching, disarm it.
- *
- * Ignore all errors because we may be racing with another thread
- * when the file descriptor is closed.
- */
- uv__epoll_ctl(loop->backend_fd, UV__EPOLL_CTL_DEL, fd, pe);
- continue;
- }
-
- /* Give users only events they're interested in. Prevents spurious
- * callbacks when previous callback invocation in this loop has stopped
- * the current watcher. Also, filters out events that users has not
- * requested us to watch.
- */
- pe->events &= w->pevents | UV__POLLERR | UV__POLLHUP;
-
- /* Work around an epoll quirk where it sometimes reports just the
- * EPOLLERR or EPOLLHUP event. In order to force the event loop to
- * move forward, we merge in the read/write events that the watcher
- * is interested in; uv__read() and uv__write() will then deal with
- * the error or hangup in the usual fashion.
- *
- * Note to self: happens when epoll reports EPOLLIN|EPOLLHUP, the user
- * reads the available data, calls uv_read_stop(), then sometime later
- * calls uv_read_start() again. By then, libuv has forgotten about the
- * hangup and the kernel won't report EPOLLIN again because there's
- * nothing left to read. If anything, libuv is to blame here. The
- * current hack is just a quick bandaid; to properly fix it, libuv
- * needs to remember the error/hangup event. We should get that for
- * free when we switch over to edge-triggered I/O.
- */
- if (pe->events == UV__EPOLLERR || pe->events == UV__EPOLLHUP)
- pe->events |= w->pevents & (UV__EPOLLIN | UV__EPOLLOUT);
-
- if (pe->events != 0) {
- w->cb(loop, w, pe->events);
- nevents++;
- }
- }
- loop->watchers[loop->nwatchers] = NULL;
- loop->watchers[loop->nwatchers + 1] = NULL;
-
- if (nevents != 0) {
- if (nfds == ARRAY_SIZE(events) && --count != 0) {
- /* Poll for more events but don't block this time. */
- timeout = 0;
- continue;
- }
- return;
- }
-
- if (timeout == 0)
- return;
-
- if (timeout == -1)
- continue;
-
-update_timeout:
- assert(timeout > 0);
-
- real_timeout -= (loop->time - base);
- if (real_timeout <= 0)
- return;
-
- timeout = real_timeout;
- }
-}
-
-
-uint64_t uv__hrtime(uv_clocktype_t type) {
- static clock_t fast_clock_id = -1;
- struct timespec t;
- clock_t clock_id;
-
- /* Prefer CLOCK_MONOTONIC_COARSE if available but only when it has
- * millisecond granularity or better. CLOCK_MONOTONIC_COARSE is
- * serviced entirely from the vDSO, whereas CLOCK_MONOTONIC may
- * decide to make a costly system call.
- */
- /* TODO(bnoordhuis) Use CLOCK_MONOTONIC_COARSE for UV_CLOCK_PRECISE
- * when it has microsecond granularity or better (unlikely).
- */
- if (type == UV_CLOCK_FAST && fast_clock_id == -1) {
- if (clock_getres(CLOCK_MONOTONIC_COARSE, &t) == 0 &&
- t.tv_nsec <= 1 * 1000 * 1000) {
- fast_clock_id = CLOCK_MONOTONIC_COARSE;
- } else {
- fast_clock_id = CLOCK_MONOTONIC;
- }
- }
-
- clock_id = CLOCK_MONOTONIC;
- if (type == UV_CLOCK_FAST)
- clock_id = fast_clock_id;
-
- if (clock_gettime(clock_id, &t))
- return 0; /* Not really possible. */
-
- return t.tv_sec * (uint64_t) 1e9 + t.tv_nsec;
-}
-
-
-void uv_loadavg(double avg[3]) {
- struct sysinfo info;
-
- if (sysinfo(&info) < 0) return;
-
- avg[0] = (double) info.loads[0] / 65536.0;
- avg[1] = (double) info.loads[1] / 65536.0;
- avg[2] = (double) info.loads[2] / 65536.0;
-}
-
-
-int uv_exepath(char* buffer, size_t* size) {
- ssize_t n;
-
- if (buffer == NULL || size == NULL || *size == 0)
- return -EINVAL;
-
- n = *size - 1;
- if (n > 0)
- n = readlink("/proc/self/exe", buffer, n);
-
- if (n == -1)
- return -errno;
-
- buffer[n] = '\0';
- *size = n;
-
- return 0;
-}
-
-
-uint64_t uv_get_free_memory(void) {
- return (uint64_t) sysconf(_SC_PAGESIZE) * sysconf(_SC_AVPHYS_PAGES);
-}
-
-
-uint64_t uv_get_total_memory(void) {
- return (uint64_t) sysconf(_SC_PAGESIZE) * sysconf(_SC_PHYS_PAGES);
-}
-
-
-int uv_resident_set_memory(size_t* rss) {
- char buf[1024];
- const char* s;
- ssize_t n;
- long val;
- int fd;
- int i;
-
- do
- fd = open("/proc/self/stat", O_RDONLY);
- while (fd == -1 && errno == EINTR);
-
- if (fd == -1)
- return -errno;
-
- do
- n = read(fd, buf, sizeof(buf) - 1);
- while (n == -1 && errno == EINTR);
-
- uv__close(fd);
- if (n == -1)
- return -errno;
- buf[n] = '\0';
-
- s = strchr(buf, ' ');
- if (s == NULL)
- goto err;
-
- s += 1;
- if (*s != '(')
- goto err;
-
- s = strchr(s, ')');
- if (s == NULL)
- goto err;
-
- for (i = 1; i <= 22; i++) {
- s = strchr(s + 1, ' ');
- if (s == NULL)
- goto err;
- }
-
- errno = 0;
- val = strtol(s, NULL, 10);
- if (errno != 0)
- goto err;
- if (val < 0)
- goto err;
-
- *rss = val * getpagesize();
- return 0;
-
-err:
- return -EINVAL;
-}
-
-
-int uv_uptime(double* uptime) {
- static volatile int no_clock_boottime;
- struct timespec now;
- int r;
-
- /* Try CLOCK_BOOTTIME first, fall back to CLOCK_MONOTONIC if not available
- * (pre-2.6.39 kernels). CLOCK_MONOTONIC doesn't increase when the system
- * is suspended.
- */
- if (no_clock_boottime) {
- retry: r = clock_gettime(CLOCK_MONOTONIC, &now);
- }
- else if ((r = clock_gettime(CLOCK_BOOTTIME, &now)) && errno == EINVAL) {
- no_clock_boottime = 1;
- goto retry;
- }
-
- if (r)
- return -errno;
-
- *uptime = now.tv_sec;
- return 0;
-}
-
-
-int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) {
- unsigned int numcpus;
- uv_cpu_info_t* ci;
- int err;
-
- *cpu_infos = NULL;
- *count = 0;
-
- numcpus = sysconf(_SC_NPROCESSORS_ONLN);
- assert(numcpus != (unsigned int) -1);
- assert(numcpus != 0);
-
- ci = uv__calloc(numcpus, sizeof(*ci));
- if (ci == NULL)
- return -ENOMEM;
-
- err = read_models(numcpus, ci);
- if (err == 0)
- err = read_times(numcpus, ci);
-
- if (err) {
- uv_free_cpu_info(ci, numcpus);
- return err;
- }
-
- /* read_models() on x86 also reads the CPU speed from /proc/cpuinfo.
- * We don't check for errors here. Worst case, the field is left zero.
- */
- if (ci[0].speed == 0)
- read_speeds(numcpus, ci);
-
- *cpu_infos = ci;
- *count = numcpus;
-
- return 0;
-}
-
-
-static void read_speeds(unsigned int numcpus, uv_cpu_info_t* ci) {
- unsigned int num;
-
- for (num = 0; num < numcpus; num++)
- ci[num].speed = read_cpufreq(num) / 1000;
-}
-
-
-/* Also reads the CPU frequency on x86. The other architectures only have
- * a BogoMIPS field, which may not be very accurate.
- *
- * Note: Simply returns on error, uv_cpu_info() takes care of the cleanup.
- */
-static int read_models(unsigned int numcpus, uv_cpu_info_t* ci) {
- static const char model_marker[] = "model name\t: ";
- static const char speed_marker[] = "cpu MHz\t\t: ";
- const char* inferred_model;
- unsigned int model_idx;
- unsigned int speed_idx;
- char buf[1024];
- char* model;
- FILE* fp;
-
- /* Most are unused on non-ARM, non-MIPS and non-x86 architectures. */
- (void) &model_marker;
- (void) &speed_marker;
- (void) &speed_idx;
- (void) &model;
- (void) &buf;
- (void) &fp;
-
- model_idx = 0;
- speed_idx = 0;
-
-#if defined(__arm__) || \
- defined(__i386__) || \
- defined(__mips__) || \
- defined(__x86_64__)
- fp = fopen("/proc/cpuinfo", "r");
- if (fp == NULL)
- return -errno;
-
- while (fgets(buf, sizeof(buf), fp)) {
- if (model_idx < numcpus) {
- if (strncmp(buf, model_marker, sizeof(model_marker) - 1) == 0) {
- model = buf + sizeof(model_marker) - 1;
- model = uv__strndup(model, strlen(model) - 1); /* Strip newline. */
- if (model == NULL) {
- fclose(fp);
- return -ENOMEM;
- }
- ci[model_idx++].model = model;
- continue;
- }
- }
-#if defined(__arm__) || defined(__mips__)
- if (model_idx < numcpus) {
-#if defined(__arm__)
- /* Fallback for pre-3.8 kernels. */
- static const char model_marker[] = "Processor\t: ";
-#else /* defined(__mips__) */
- static const char model_marker[] = "cpu model\t\t: ";
-#endif
- if (strncmp(buf, model_marker, sizeof(model_marker) - 1) == 0) {
- model = buf + sizeof(model_marker) - 1;
- model = uv__strndup(model, strlen(model) - 1); /* Strip newline. */
- if (model == NULL) {
- fclose(fp);
- return -ENOMEM;
- }
- ci[model_idx++].model = model;
- continue;
- }
- }
-#else /* !__arm__ && !__mips__ */
- if (speed_idx < numcpus) {
- if (strncmp(buf, speed_marker, sizeof(speed_marker) - 1) == 0) {
- ci[speed_idx++].speed = atoi(buf + sizeof(speed_marker) - 1);
- continue;
- }
- }
-#endif /* __arm__ || __mips__ */
- }
-
- fclose(fp);
-#endif /* __arm__ || __i386__ || __mips__ || __x86_64__ */
-
- /* Now we want to make sure that all the models contain *something* because
- * it's not safe to leave them as null. Copy the last entry unless there
- * isn't one, in that case we simply put "unknown" into everything.
- */
- inferred_model = "unknown";
- if (model_idx > 0)
- inferred_model = ci[model_idx - 1].model;
-
- while (model_idx < numcpus) {
- model = uv__strndup(inferred_model, strlen(inferred_model));
- if (model == NULL)
- return -ENOMEM;
- ci[model_idx++].model = model;
- }
-
- return 0;
-}
-
-
-static int read_times(unsigned int numcpus, uv_cpu_info_t* ci) {
- unsigned long clock_ticks;
- struct uv_cpu_times_s ts;
- unsigned long user;
- unsigned long nice;
- unsigned long sys;
- unsigned long idle;
- unsigned long dummy;
- unsigned long irq;
- unsigned int num;
- unsigned int len;
- char buf[1024];
- FILE* fp;
-
- clock_ticks = sysconf(_SC_CLK_TCK);
- assert(clock_ticks != (unsigned long) -1);
- assert(clock_ticks != 0);
-
- fp = fopen("/proc/stat", "r");
- if (fp == NULL)
- return -errno;
-
- if (!fgets(buf, sizeof(buf), fp))
- abort();
-
- num = 0;
-
- while (fgets(buf, sizeof(buf), fp)) {
- if (num >= numcpus)
- break;
-
- if (strncmp(buf, "cpu", 3))
- break;
-
- /* skip "cpu<num> " marker */
- {
- unsigned int n;
- int r = sscanf(buf, "cpu%u ", &n);
- assert(r == 1);
- (void) r; /* silence build warning */
- for (len = sizeof("cpu0"); n /= 10; len++);
- }
-
- /* Line contains user, nice, system, idle, iowait, irq, softirq, steal,
- * guest, guest_nice but we're only interested in the first four + irq.
- *
- * Don't use %*s to skip fields or %ll to read straight into the uint64_t
- * fields, they're not allowed in C89 mode.
- */
- if (6 != sscanf(buf + len,
- "%lu %lu %lu %lu %lu %lu",
- &user,
- &nice,
- &sys,
- &idle,
- &dummy,
- &irq))
- abort();
-
- ts.user = clock_ticks * user;
- ts.nice = clock_ticks * nice;
- ts.sys = clock_ticks * sys;
- ts.idle = clock_ticks * idle;
- ts.irq = clock_ticks * irq;
- ci[num++].cpu_times = ts;
- }
- fclose(fp);
- assert(num == numcpus);
-
- return 0;
-}
-
-
-static unsigned long read_cpufreq(unsigned int cpunum) {
- unsigned long val;
- char buf[1024];
- FILE* fp;
-
- snprintf(buf,
- sizeof(buf),
- "/sys/devices/system/cpu/cpu%u/cpufreq/scaling_cur_freq",
- cpunum);
-
- fp = fopen(buf, "r");
- if (fp == NULL)
- return 0;
-
- if (fscanf(fp, "%lu", &val) != 1)
- val = 0;
-
- fclose(fp);
-
- return val;
-}
-
-
-void uv_free_cpu_info(uv_cpu_info_t* cpu_infos, int count) {
- int i;
-
- for (i = 0; i < count; i++) {
- uv__free(cpu_infos[i].model);
- }
-
- uv__free(cpu_infos);
-}
-
-
-int uv_interface_addresses(uv_interface_address_t** addresses,
- int* count) {
-#ifndef HAVE_IFADDRS_H
- return -ENOSYS;
-#else
- struct ifaddrs *addrs, *ent;
- uv_interface_address_t* address;
- int i;
- struct sockaddr_ll *sll;
-
- if (getifaddrs(&addrs))
- return -errno;
-
- *count = 0;
- *addresses = NULL;
-
- /* Count the number of interfaces */
- for (ent = addrs; ent != NULL; ent = ent->ifa_next) {
- if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING)) ||
- (ent->ifa_addr == NULL) ||
- (ent->ifa_addr->sa_family == PF_PACKET)) {
- continue;
- }
-
- (*count)++;
- }
-
- if (*count == 0)
- return 0;
-
- *addresses = uv__malloc(*count * sizeof(**addresses));
- if (!(*addresses)) {
- freeifaddrs(addrs);
- return -ENOMEM;
- }
-
- address = *addresses;
-
- for (ent = addrs; ent != NULL; ent = ent->ifa_next) {
- if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING)))
- continue;
-
- if (ent->ifa_addr == NULL)
- continue;
-
- /*
- * On Linux getifaddrs returns information related to the raw underlying
- * devices. We're not interested in this information yet.
- */
- if (ent->ifa_addr->sa_family == PF_PACKET)
- continue;
-
- address->name = uv__strdup(ent->ifa_name);
-
- if (ent->ifa_addr->sa_family == AF_INET6) {
- address->address.address6 = *((struct sockaddr_in6*) ent->ifa_addr);
- } else {
- address->address.address4 = *((struct sockaddr_in*) ent->ifa_addr);
- }
-
- if (ent->ifa_netmask->sa_family == AF_INET6) {
- address->netmask.netmask6 = *((struct sockaddr_in6*) ent->ifa_netmask);
- } else {
- address->netmask.netmask4 = *((struct sockaddr_in*) ent->ifa_netmask);
- }
-
- address->is_internal = !!(ent->ifa_flags & IFF_LOOPBACK);
-
- address++;
- }
-
- /* Fill in physical addresses for each interface */
- for (ent = addrs; ent != NULL; ent = ent->ifa_next) {
- if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING)) ||
- (ent->ifa_addr == NULL) ||
- (ent->ifa_addr->sa_family != PF_PACKET)) {
- continue;
- }
-
- address = *addresses;
-
- for (i = 0; i < (*count); i++) {
- if (strcmp(address->name, ent->ifa_name) == 0) {
- sll = (struct sockaddr_ll*)ent->ifa_addr;
- memcpy(address->phys_addr, sll->sll_addr, sizeof(address->phys_addr));
- }
- address++;
- }
- }
-
- freeifaddrs(addrs);
-
- return 0;
-#endif
-}
-
-
-void uv_free_interface_addresses(uv_interface_address_t* addresses,
- int count) {
- int i;
-
- for (i = 0; i < count; i++) {
- uv__free(addresses[i].name);
- }
-
- uv__free(addresses);
-}
-
-
-void uv__set_process_title(const char* title) {
-#if defined(PR_SET_NAME)
- prctl(PR_SET_NAME, title); /* Only copies first 16 characters. */
-#endif
-}
diff --git a/3rdparty/libuv/src/unix/linux-inotify.c b/3rdparty/libuv/src/unix/linux-inotify.c
deleted file mode 100644
index 282912115d8..00000000000
--- a/3rdparty/libuv/src/unix/linux-inotify.c
+++ /dev/null
@@ -1,285 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "tree.h"
-#include "internal.h"
-
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <errno.h>
-
-#include <sys/types.h>
-#include <unistd.h>
-
-struct watcher_list {
- RB_ENTRY(watcher_list) entry;
- QUEUE watchers;
- int iterating;
- char* path;
- int wd;
-};
-
-struct watcher_root {
- struct watcher_list* rbh_root;
-};
-#define CAST(p) ((struct watcher_root*)(p))
-
-
-static int compare_watchers(const struct watcher_list* a,
- const struct watcher_list* b) {
- if (a->wd < b->wd) return -1;
- if (a->wd > b->wd) return 1;
- return 0;
-}
-
-
-RB_GENERATE_STATIC(watcher_root, watcher_list, entry, compare_watchers)
-
-
-static void uv__inotify_read(uv_loop_t* loop,
- uv__io_t* w,
- unsigned int revents);
-
-
-static int new_inotify_fd(void) {
- int err;
- int fd;
-
- fd = uv__inotify_init1(UV__IN_NONBLOCK | UV__IN_CLOEXEC);
- if (fd != -1)
- return fd;
-
- if (errno != ENOSYS)
- return -errno;
-
- fd = uv__inotify_init();
- if (fd == -1)
- return -errno;
-
- err = uv__cloexec(fd, 1);
- if (err == 0)
- err = uv__nonblock(fd, 1);
-
- if (err) {
- uv__close(fd);
- return err;
- }
-
- return fd;
-}
-
-
-static int init_inotify(uv_loop_t* loop) {
- int err;
-
- if (loop->inotify_fd != -1)
- return 0;
-
- err = new_inotify_fd();
- if (err < 0)
- return err;
-
- loop->inotify_fd = err;
- uv__io_init(&loop->inotify_read_watcher, uv__inotify_read, loop->inotify_fd);
- uv__io_start(loop, &loop->inotify_read_watcher, UV__POLLIN);
-
- return 0;
-}
-
-
-static struct watcher_list* find_watcher(uv_loop_t* loop, int wd) {
- struct watcher_list w;
- w.wd = wd;
- return RB_FIND(watcher_root, CAST(&loop->inotify_watchers), &w);
-}
-
-static void maybe_free_watcher_list(struct watcher_list* w, uv_loop_t* loop) {
- /* if the watcher_list->watchers is being iterated over, we can't free it. */
- if ((!w->iterating) && QUEUE_EMPTY(&w->watchers)) {
- /* No watchers left for this path. Clean up. */
- RB_REMOVE(watcher_root, CAST(&loop->inotify_watchers), w);
- uv__inotify_rm_watch(loop->inotify_fd, w->wd);
- uv__free(w);
- }
-}
-
-static void uv__inotify_read(uv_loop_t* loop,
- uv__io_t* dummy,
- unsigned int events) {
- const struct uv__inotify_event* e;
- struct watcher_list* w;
- uv_fs_event_t* h;
- QUEUE queue;
- QUEUE* q;
- const char* path;
- ssize_t size;
- const char *p;
- /* needs to be large enough for sizeof(inotify_event) + strlen(path) */
- char buf[4096];
-
- while (1) {
- do
- size = read(loop->inotify_fd, buf, sizeof(buf));
- while (size == -1 && errno == EINTR);
-
- if (size == -1) {
- assert(errno == EAGAIN || errno == EWOULDBLOCK);
- break;
- }
-
- assert(size > 0); /* pre-2.6.21 thing, size=0 == read buffer too small */
-
- /* Now we have one or more inotify_event structs. */
- for (p = buf; p < buf + size; p += sizeof(*e) + e->len) {
- e = (const struct uv__inotify_event*)p;
-
- events = 0;
- if (e->mask & (UV__IN_ATTRIB|UV__IN_MODIFY))
- events |= UV_CHANGE;
- if (e->mask & ~(UV__IN_ATTRIB|UV__IN_MODIFY))
- events |= UV_RENAME;
-
- w = find_watcher(loop, e->wd);
- if (w == NULL)
- continue; /* Stale event, no watchers left. */
-
- /* inotify does not return the filename when monitoring a single file
- * for modifications. Repurpose the filename for API compatibility.
- * I'm not convinced this is a good thing, maybe it should go.
- */
- path = e->len ? (const char*) (e + 1) : uv__basename_r(w->path);
-
- /* We're about to iterate over the queue and call user's callbacks.
- * What can go wrong?
- * A callback could call uv_fs_event_stop()
- * and the queue can change under our feet.
- * So, we use QUEUE_MOVE() trick to safely iterate over the queue.
- * And we don't free the watcher_list until we're done iterating.
- *
- * First,
- * tell uv_fs_event_stop() (that could be called from a user's callback)
- * not to free watcher_list.
- */
- w->iterating = 1;
- QUEUE_MOVE(&w->watchers, &queue);
- while (!QUEUE_EMPTY(&queue)) {
- q = QUEUE_HEAD(&queue);
- h = QUEUE_DATA(q, uv_fs_event_t, watchers);
-
- QUEUE_REMOVE(q);
- QUEUE_INSERT_TAIL(&w->watchers, q);
-
- h->cb(h, path, events, 0);
- }
- /* done iterating, time to (maybe) free empty watcher_list */
- w->iterating = 0;
- maybe_free_watcher_list(w, loop);
- }
- }
-}
-
-
-int uv_fs_event_init(uv_loop_t* loop, uv_fs_event_t* handle) {
- uv__handle_init(loop, (uv_handle_t*)handle, UV_FS_EVENT);
- return 0;
-}
-
-
-int uv_fs_event_start(uv_fs_event_t* handle,
- uv_fs_event_cb cb,
- const char* path,
- unsigned int flags) {
- struct watcher_list* w;
- int events;
- int err;
- int wd;
-
- if (uv__is_active(handle))
- return -EINVAL;
-
- err = init_inotify(handle->loop);
- if (err)
- return err;
-
- events = UV__IN_ATTRIB
- | UV__IN_CREATE
- | UV__IN_MODIFY
- | UV__IN_DELETE
- | UV__IN_DELETE_SELF
- | UV__IN_MOVE_SELF
- | UV__IN_MOVED_FROM
- | UV__IN_MOVED_TO;
-
- wd = uv__inotify_add_watch(handle->loop->inotify_fd, path, events);
- if (wd == -1)
- return -errno;
-
- w = find_watcher(handle->loop, wd);
- if (w)
- goto no_insert;
-
- w = uv__malloc(sizeof(*w) + strlen(path) + 1);
- if (w == NULL)
- return -ENOMEM;
-
- w->wd = wd;
- w->path = strcpy((char*)(w + 1), path);
- QUEUE_INIT(&w->watchers);
- w->iterating = 0;
- RB_INSERT(watcher_root, CAST(&handle->loop->inotify_watchers), w);
-
-no_insert:
- uv__handle_start(handle);
- QUEUE_INSERT_TAIL(&w->watchers, &handle->watchers);
- handle->path = w->path;
- handle->cb = cb;
- handle->wd = wd;
-
- return 0;
-}
-
-
-int uv_fs_event_stop(uv_fs_event_t* handle) {
- struct watcher_list* w;
-
- if (!uv__is_active(handle))
- return 0;
-
- w = find_watcher(handle->loop, handle->wd);
- assert(w != NULL);
-
- handle->wd = -1;
- handle->path = NULL;
- uv__handle_stop(handle);
- QUEUE_REMOVE(&handle->watchers);
-
- maybe_free_watcher_list(w, handle->loop);
-
- return 0;
-}
-
-
-void uv__fs_event_close(uv_fs_event_t* handle) {
- uv_fs_event_stop(handle);
-}
diff --git a/3rdparty/libuv/src/unix/linux-syscalls.c b/3rdparty/libuv/src/unix/linux-syscalls.c
deleted file mode 100644
index 89998ded26b..00000000000
--- a/3rdparty/libuv/src/unix/linux-syscalls.c
+++ /dev/null
@@ -1,471 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "linux-syscalls.h"
-#include <unistd.h>
-#include <signal.h>
-#include <sys/syscall.h>
-#include <sys/types.h>
-#include <errno.h>
-
-#if defined(__has_feature)
-# if __has_feature(memory_sanitizer)
-# define MSAN_ACTIVE 1
-# include <sanitizer/msan_interface.h>
-# endif
-#endif
-
-#if defined(__i386__)
-# ifndef __NR_socketcall
-# define __NR_socketcall 102
-# endif
-#endif
-
-#if defined(__arm__)
-# if defined(__thumb__) || defined(__ARM_EABI__)
-# define UV_SYSCALL_BASE 0
-# else
-# define UV_SYSCALL_BASE 0x900000
-# endif
-#endif /* __arm__ */
-
-#ifndef __NR_accept4
-# if defined(__x86_64__)
-# define __NR_accept4 288
-# elif defined(__i386__)
- /* Nothing. Handled through socketcall(). */
-# elif defined(__arm__)
-# define __NR_accept4 (UV_SYSCALL_BASE + 366)
-# endif
-#endif /* __NR_accept4 */
-
-#ifndef __NR_eventfd
-# if defined(__x86_64__)
-# define __NR_eventfd 284
-# elif defined(__i386__)
-# define __NR_eventfd 323
-# elif defined(__arm__)
-# define __NR_eventfd (UV_SYSCALL_BASE + 351)
-# endif
-#endif /* __NR_eventfd */
-
-#ifndef __NR_eventfd2
-# if defined(__x86_64__)
-# define __NR_eventfd2 290
-# elif defined(__i386__)
-# define __NR_eventfd2 328
-# elif defined(__arm__)
-# define __NR_eventfd2 (UV_SYSCALL_BASE + 356)
-# endif
-#endif /* __NR_eventfd2 */
-
-#ifndef __NR_epoll_create
-# if defined(__x86_64__)
-# define __NR_epoll_create 213
-# elif defined(__i386__)
-# define __NR_epoll_create 254
-# elif defined(__arm__)
-# define __NR_epoll_create (UV_SYSCALL_BASE + 250)
-# endif
-#endif /* __NR_epoll_create */
-
-#ifndef __NR_epoll_create1
-# if defined(__x86_64__)
-# define __NR_epoll_create1 291
-# elif defined(__i386__)
-# define __NR_epoll_create1 329
-# elif defined(__arm__)
-# define __NR_epoll_create1 (UV_SYSCALL_BASE + 357)
-# endif
-#endif /* __NR_epoll_create1 */
-
-#ifndef __NR_epoll_ctl
-# if defined(__x86_64__)
-# define __NR_epoll_ctl 233 /* used to be 214 */
-# elif defined(__i386__)
-# define __NR_epoll_ctl 255
-# elif defined(__arm__)
-# define __NR_epoll_ctl (UV_SYSCALL_BASE + 251)
-# endif
-#endif /* __NR_epoll_ctl */
-
-#ifndef __NR_epoll_wait
-# if defined(__x86_64__)
-# define __NR_epoll_wait 232 /* used to be 215 */
-# elif defined(__i386__)
-# define __NR_epoll_wait 256
-# elif defined(__arm__)
-# define __NR_epoll_wait (UV_SYSCALL_BASE + 252)
-# endif
-#endif /* __NR_epoll_wait */
-
-#ifndef __NR_epoll_pwait
-# if defined(__x86_64__)
-# define __NR_epoll_pwait 281
-# elif defined(__i386__)
-# define __NR_epoll_pwait 319
-# elif defined(__arm__)
-# define __NR_epoll_pwait (UV_SYSCALL_BASE + 346)
-# endif
-#endif /* __NR_epoll_pwait */
-
-#ifndef __NR_inotify_init
-# if defined(__x86_64__)
-# define __NR_inotify_init 253
-# elif defined(__i386__)
-# define __NR_inotify_init 291
-# elif defined(__arm__)
-# define __NR_inotify_init (UV_SYSCALL_BASE + 316)
-# endif
-#endif /* __NR_inotify_init */
-
-#ifndef __NR_inotify_init1
-# if defined(__x86_64__)
-# define __NR_inotify_init1 294
-# elif defined(__i386__)
-# define __NR_inotify_init1 332
-# elif defined(__arm__)
-# define __NR_inotify_init1 (UV_SYSCALL_BASE + 360)
-# endif
-#endif /* __NR_inotify_init1 */
-
-#ifndef __NR_inotify_add_watch
-# if defined(__x86_64__)
-# define __NR_inotify_add_watch 254
-# elif defined(__i386__)
-# define __NR_inotify_add_watch 292
-# elif defined(__arm__)
-# define __NR_inotify_add_watch (UV_SYSCALL_BASE + 317)
-# endif
-#endif /* __NR_inotify_add_watch */
-
-#ifndef __NR_inotify_rm_watch
-# if defined(__x86_64__)
-# define __NR_inotify_rm_watch 255
-# elif defined(__i386__)
-# define __NR_inotify_rm_watch 293
-# elif defined(__arm__)
-# define __NR_inotify_rm_watch (UV_SYSCALL_BASE + 318)
-# endif
-#endif /* __NR_inotify_rm_watch */
-
-#ifndef __NR_pipe2
-# if defined(__x86_64__)
-# define __NR_pipe2 293
-# elif defined(__i386__)
-# define __NR_pipe2 331
-# elif defined(__arm__)
-# define __NR_pipe2 (UV_SYSCALL_BASE + 359)
-# endif
-#endif /* __NR_pipe2 */
-
-#ifndef __NR_recvmmsg
-# if defined(__x86_64__)
-# define __NR_recvmmsg 299
-# elif defined(__i386__)
-# define __NR_recvmmsg 337
-# elif defined(__arm__)
-# define __NR_recvmmsg (UV_SYSCALL_BASE + 365)
-# endif
-#endif /* __NR_recvmsg */
-
-#ifndef __NR_sendmmsg
-# if defined(__x86_64__)
-# define __NR_sendmmsg 307
-# elif defined(__i386__)
-# define __NR_sendmmsg 345
-# elif defined(__arm__)
-# define __NR_sendmmsg (UV_SYSCALL_BASE + 374)
-# endif
-#endif /* __NR_sendmmsg */
-
-#ifndef __NR_utimensat
-# if defined(__x86_64__)
-# define __NR_utimensat 280
-# elif defined(__i386__)
-# define __NR_utimensat 320
-# elif defined(__arm__)
-# define __NR_utimensat (UV_SYSCALL_BASE + 348)
-# endif
-#endif /* __NR_utimensat */
-
-#ifndef __NR_preadv
-# if defined(__x86_64__)
-# define __NR_preadv 295
-# elif defined(__i386__)
-# define __NR_preadv 333
-# elif defined(__arm__)
-# define __NR_preadv (UV_SYSCALL_BASE + 361)
-# endif
-#endif /* __NR_preadv */
-
-#ifndef __NR_pwritev
-# if defined(__x86_64__)
-# define __NR_pwritev 296
-# elif defined(__i386__)
-# define __NR_pwritev 334
-# elif defined(__arm__)
-# define __NR_pwritev (UV_SYSCALL_BASE + 362)
-# endif
-#endif /* __NR_pwritev */
-
-#ifndef __NR_dup3
-# if defined(__x86_64__)
-# define __NR_dup3 292
-# elif defined(__i386__)
-# define __NR_dup3 330
-# elif defined(__arm__)
-# define __NR_dup3 (UV_SYSCALL_BASE + 358)
-# endif
-#endif /* __NR_pwritev */
-
-
-int uv__accept4(int fd, struct sockaddr* addr, socklen_t* addrlen, int flags) {
-#if defined(__i386__)
- unsigned long args[4];
- int r;
-
- args[0] = (unsigned long) fd;
- args[1] = (unsigned long) addr;
- args[2] = (unsigned long) addrlen;
- args[3] = (unsigned long) flags;
-
- r = syscall(__NR_socketcall, 18 /* SYS_ACCEPT4 */, args);
-
- /* socketcall() raises EINVAL when SYS_ACCEPT4 is not supported but so does
- * a bad flags argument. Try to distinguish between the two cases.
- */
- if (r == -1)
- if (errno == EINVAL)
- if ((flags & ~(UV__SOCK_CLOEXEC|UV__SOCK_NONBLOCK)) == 0)
- errno = ENOSYS;
-
- return r;
-#elif defined(__NR_accept4)
- return syscall(__NR_accept4, fd, addr, addrlen, flags);
-#else
- return errno = ENOSYS, -1;
-#endif
-}
-
-
-int uv__eventfd(unsigned int count) {
-#if defined(__NR_eventfd)
- return syscall(__NR_eventfd, count);
-#else
- return errno = ENOSYS, -1;
-#endif
-}
-
-
-int uv__eventfd2(unsigned int count, int flags) {
-#if defined(__NR_eventfd2)
- return syscall(__NR_eventfd2, count, flags);
-#else
- return errno = ENOSYS, -1;
-#endif
-}
-
-
-int uv__epoll_create(int size) {
-#if defined(__NR_epoll_create)
- return syscall(__NR_epoll_create, size);
-#else
- return errno = ENOSYS, -1;
-#endif
-}
-
-
-int uv__epoll_create1(int flags) {
-#if defined(__NR_epoll_create1)
- return syscall(__NR_epoll_create1, flags);
-#else
- return errno = ENOSYS, -1;
-#endif
-}
-
-
-int uv__epoll_ctl(int epfd, int op, int fd, struct uv__epoll_event* events) {
-#if defined(__NR_epoll_ctl)
- return syscall(__NR_epoll_ctl, epfd, op, fd, events);
-#else
- return errno = ENOSYS, -1;
-#endif
-}
-
-
-int uv__epoll_wait(int epfd,
- struct uv__epoll_event* events,
- int nevents,
- int timeout) {
-#if defined(__NR_epoll_wait)
- int result;
- result = syscall(__NR_epoll_wait, epfd, events, nevents, timeout);
-#if MSAN_ACTIVE
- if (result > 0)
- __msan_unpoison(events, sizeof(events[0]) * result);
-#endif
- return result;
-#else
- return errno = ENOSYS, -1;
-#endif
-}
-
-
-int uv__epoll_pwait(int epfd,
- struct uv__epoll_event* events,
- int nevents,
- int timeout,
- uint64_t sigmask) {
-#if defined(__NR_epoll_pwait)
- int result;
- result = syscall(__NR_epoll_pwait,
- epfd,
- events,
- nevents,
- timeout,
- &sigmask,
- sizeof(sigmask));
-#if MSAN_ACTIVE
- if (result > 0)
- __msan_unpoison(events, sizeof(events[0]) * result);
-#endif
- return result;
-#else
- return errno = ENOSYS, -1;
-#endif
-}
-
-
-int uv__inotify_init(void) {
-#if defined(__NR_inotify_init)
- return syscall(__NR_inotify_init);
-#else
- return errno = ENOSYS, -1;
-#endif
-}
-
-
-int uv__inotify_init1(int flags) {
-#if defined(__NR_inotify_init1)
- return syscall(__NR_inotify_init1, flags);
-#else
- return errno = ENOSYS, -1;
-#endif
-}
-
-
-int uv__inotify_add_watch(int fd, const char* path, uint32_t mask) {
-#if defined(__NR_inotify_add_watch)
- return syscall(__NR_inotify_add_watch, fd, path, mask);
-#else
- return errno = ENOSYS, -1;
-#endif
-}
-
-
-int uv__inotify_rm_watch(int fd, int32_t wd) {
-#if defined(__NR_inotify_rm_watch)
- return syscall(__NR_inotify_rm_watch, fd, wd);
-#else
- return errno = ENOSYS, -1;
-#endif
-}
-
-
-int uv__pipe2(int pipefd[2], int flags) {
-#if defined(__NR_pipe2)
- int result;
- result = syscall(__NR_pipe2, pipefd, flags);
-#if MSAN_ACTIVE
- if (!result)
- __msan_unpoison(pipefd, sizeof(int[2]));
-#endif
- return result;
-#else
- return errno = ENOSYS, -1;
-#endif
-}
-
-
-int uv__sendmmsg(int fd,
- struct uv__mmsghdr* mmsg,
- unsigned int vlen,
- unsigned int flags) {
-#if defined(__NR_sendmmsg)
- return syscall(__NR_sendmmsg, fd, mmsg, vlen, flags);
-#else
- return errno = ENOSYS, -1;
-#endif
-}
-
-
-int uv__recvmmsg(int fd,
- struct uv__mmsghdr* mmsg,
- unsigned int vlen,
- unsigned int flags,
- struct timespec* timeout) {
-#if defined(__NR_recvmmsg)
- return syscall(__NR_recvmmsg, fd, mmsg, vlen, flags, timeout);
-#else
- return errno = ENOSYS, -1;
-#endif
-}
-
-
-int uv__utimesat(int dirfd,
- const char* path,
- const struct timespec times[2],
- int flags)
-{
-#if defined(__NR_utimensat)
- return syscall(__NR_utimensat, dirfd, path, times, flags);
-#else
- return errno = ENOSYS, -1;
-#endif
-}
-
-
-ssize_t uv__preadv(int fd, const struct iovec *iov, int iovcnt, int64_t offset) {
-#if defined(__NR_preadv)
- return syscall(__NR_preadv, fd, iov, iovcnt, (long)offset, (long)(offset >> 32));
-#else
- return errno = ENOSYS, -1;
-#endif
-}
-
-
-ssize_t uv__pwritev(int fd, const struct iovec *iov, int iovcnt, int64_t offset) {
-#if defined(__NR_pwritev)
- return syscall(__NR_pwritev, fd, iov, iovcnt, (long)offset, (long)(offset >> 32));
-#else
- return errno = ENOSYS, -1;
-#endif
-}
-
-
-int uv__dup3(int oldfd, int newfd, int flags) {
-#if defined(__NR_dup3)
- return syscall(__NR_dup3, oldfd, newfd, flags);
-#else
- return errno = ENOSYS, -1;
-#endif
-}
diff --git a/3rdparty/libuv/src/unix/linux-syscalls.h b/3rdparty/libuv/src/unix/linux-syscalls.h
deleted file mode 100644
index 96e79439cf0..00000000000
--- a/3rdparty/libuv/src/unix/linux-syscalls.h
+++ /dev/null
@@ -1,158 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#ifndef UV_LINUX_SYSCALL_H_
-#define UV_LINUX_SYSCALL_H_
-
-#undef _GNU_SOURCE
-#define _GNU_SOURCE
-
-#include <stdint.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/socket.h>
-
-#if defined(__alpha__)
-# define UV__O_CLOEXEC 0x200000
-#elif defined(__hppa__)
-# define UV__O_CLOEXEC 0x200000
-#elif defined(__sparc__)
-# define UV__O_CLOEXEC 0x400000
-#else
-# define UV__O_CLOEXEC 0x80000
-#endif
-
-#if defined(__alpha__)
-# define UV__O_NONBLOCK 0x4
-#elif defined(__hppa__)
-# define UV__O_NONBLOCK O_NONBLOCK
-#elif defined(__mips__)
-# define UV__O_NONBLOCK 0x80
-#elif defined(__sparc__)
-# define UV__O_NONBLOCK 0x4000
-#else
-# define UV__O_NONBLOCK 0x800
-#endif
-
-#define UV__EFD_CLOEXEC UV__O_CLOEXEC
-#define UV__EFD_NONBLOCK UV__O_NONBLOCK
-
-#define UV__IN_CLOEXEC UV__O_CLOEXEC
-#define UV__IN_NONBLOCK UV__O_NONBLOCK
-
-#define UV__SOCK_CLOEXEC UV__O_CLOEXEC
-#if defined(SOCK_NONBLOCK)
-# define UV__SOCK_NONBLOCK SOCK_NONBLOCK
-#else
-# define UV__SOCK_NONBLOCK UV__O_NONBLOCK
-#endif
-
-/* epoll flags */
-#define UV__EPOLL_CLOEXEC UV__O_CLOEXEC
-#define UV__EPOLL_CTL_ADD 1
-#define UV__EPOLL_CTL_DEL 2
-#define UV__EPOLL_CTL_MOD 3
-
-#define UV__EPOLLIN 1
-#define UV__EPOLLOUT 4
-#define UV__EPOLLERR 8
-#define UV__EPOLLHUP 16
-#define UV__EPOLLONESHOT 0x40000000
-#define UV__EPOLLET 0x80000000
-
-/* inotify flags */
-#define UV__IN_ACCESS 0x001
-#define UV__IN_MODIFY 0x002
-#define UV__IN_ATTRIB 0x004
-#define UV__IN_CLOSE_WRITE 0x008
-#define UV__IN_CLOSE_NOWRITE 0x010
-#define UV__IN_OPEN 0x020
-#define UV__IN_MOVED_FROM 0x040
-#define UV__IN_MOVED_TO 0x080
-#define UV__IN_CREATE 0x100
-#define UV__IN_DELETE 0x200
-#define UV__IN_DELETE_SELF 0x400
-#define UV__IN_MOVE_SELF 0x800
-
-#if defined(__x86_64__)
-struct uv__epoll_event {
- uint32_t events;
- uint64_t data;
-} __attribute__((packed));
-#else
-struct uv__epoll_event {
- uint32_t events;
- uint64_t data;
-};
-#endif
-
-struct uv__inotify_event {
- int32_t wd;
- uint32_t mask;
- uint32_t cookie;
- uint32_t len;
- /* char name[0]; */
-};
-
-struct uv__mmsghdr {
- struct msghdr msg_hdr;
- unsigned int msg_len;
-};
-
-int uv__accept4(int fd, struct sockaddr* addr, socklen_t* addrlen, int flags);
-int uv__eventfd(unsigned int count);
-int uv__epoll_create(int size);
-int uv__epoll_create1(int flags);
-int uv__epoll_ctl(int epfd, int op, int fd, struct uv__epoll_event *ev);
-int uv__epoll_wait(int epfd,
- struct uv__epoll_event* events,
- int nevents,
- int timeout);
-int uv__epoll_pwait(int epfd,
- struct uv__epoll_event* events,
- int nevents,
- int timeout,
- uint64_t sigmask);
-int uv__eventfd2(unsigned int count, int flags);
-int uv__inotify_init(void);
-int uv__inotify_init1(int flags);
-int uv__inotify_add_watch(int fd, const char* path, uint32_t mask);
-int uv__inotify_rm_watch(int fd, int32_t wd);
-int uv__pipe2(int pipefd[2], int flags);
-int uv__recvmmsg(int fd,
- struct uv__mmsghdr* mmsg,
- unsigned int vlen,
- unsigned int flags,
- struct timespec* timeout);
-int uv__sendmmsg(int fd,
- struct uv__mmsghdr* mmsg,
- unsigned int vlen,
- unsigned int flags);
-int uv__utimesat(int dirfd,
- const char* path,
- const struct timespec times[2],
- int flags);
-ssize_t uv__preadv(int fd, const struct iovec *iov, int iovcnt, int64_t offset);
-ssize_t uv__pwritev(int fd, const struct iovec *iov, int iovcnt, int64_t offset);
-int uv__dup3(int oldfd, int newfd, int flags);
-
-#endif /* UV_LINUX_SYSCALL_H_ */
diff --git a/3rdparty/libuv/src/unix/loop-watcher.c b/3rdparty/libuv/src/unix/loop-watcher.c
deleted file mode 100644
index 340bb0dfa11..00000000000
--- a/3rdparty/libuv/src/unix/loop-watcher.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "internal.h"
-
-#define UV_LOOP_WATCHER_DEFINE(name, type) \
- int uv_##name##_init(uv_loop_t* loop, uv_##name##_t* handle) { \
- uv__handle_init(loop, (uv_handle_t*)handle, UV_##type); \
- handle->name##_cb = NULL; \
- return 0; \
- } \
- \
- int uv_##name##_start(uv_##name##_t* handle, uv_##name##_cb cb) { \
- if (uv__is_active(handle)) return 0; \
- if (cb == NULL) return -EINVAL; \
- QUEUE_INSERT_HEAD(&handle->loop->name##_handles, &handle->queue); \
- handle->name##_cb = cb; \
- uv__handle_start(handle); \
- return 0; \
- } \
- \
- int uv_##name##_stop(uv_##name##_t* handle) { \
- if (!uv__is_active(handle)) return 0; \
- QUEUE_REMOVE(&handle->queue); \
- uv__handle_stop(handle); \
- return 0; \
- } \
- \
- void uv__run_##name(uv_loop_t* loop) { \
- uv_##name##_t* h; \
- QUEUE queue; \
- QUEUE* q; \
- QUEUE_MOVE(&loop->name##_handles, &queue); \
- while (!QUEUE_EMPTY(&queue)) { \
- q = QUEUE_HEAD(&queue); \
- h = QUEUE_DATA(q, uv_##name##_t, queue); \
- QUEUE_REMOVE(q); \
- QUEUE_INSERT_TAIL(&loop->name##_handles, q); \
- h->name##_cb(h); \
- } \
- } \
- \
- void uv__##name##_close(uv_##name##_t* handle) { \
- uv_##name##_stop(handle); \
- }
-
-UV_LOOP_WATCHER_DEFINE(prepare, PREPARE)
-UV_LOOP_WATCHER_DEFINE(check, CHECK)
-UV_LOOP_WATCHER_DEFINE(idle, IDLE)
diff --git a/3rdparty/libuv/src/unix/loop.c b/3rdparty/libuv/src/unix/loop.c
deleted file mode 100644
index 92e96f09ed0..00000000000
--- a/3rdparty/libuv/src/unix/loop.c
+++ /dev/null
@@ -1,155 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "tree.h"
-#include "internal.h"
-#include "heap-inl.h"
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-int uv_loop_init(uv_loop_t* loop) {
- int err;
-
- uv__signal_global_once_init();
-
- memset(loop, 0, sizeof(*loop));
- heap_init((struct heap*) &loop->timer_heap);
- QUEUE_INIT(&loop->wq);
- QUEUE_INIT(&loop->active_reqs);
- QUEUE_INIT(&loop->idle_handles);
- QUEUE_INIT(&loop->async_handles);
- QUEUE_INIT(&loop->check_handles);
- QUEUE_INIT(&loop->prepare_handles);
- QUEUE_INIT(&loop->handle_queue);
-
- loop->nfds = 0;
- loop->watchers = NULL;
- loop->nwatchers = 0;
- QUEUE_INIT(&loop->pending_queue);
- QUEUE_INIT(&loop->watcher_queue);
-
- loop->closing_handles = NULL;
- uv__update_time(loop);
- uv__async_init(&loop->async_watcher);
- loop->signal_pipefd[0] = -1;
- loop->signal_pipefd[1] = -1;
- loop->backend_fd = -1;
- loop->emfile_fd = -1;
-
- loop->timer_counter = 0;
- loop->stop_flag = 0;
-
- err = uv__platform_loop_init(loop);
- if (err)
- return err;
-
- err = uv_signal_init(loop, &loop->child_watcher);
- if (err)
- goto fail_signal_init;
-
- uv__handle_unref(&loop->child_watcher);
- loop->child_watcher.flags |= UV__HANDLE_INTERNAL;
- QUEUE_INIT(&loop->process_handles);
-
- err = uv_rwlock_init(&loop->cloexec_lock);
- if (err)
- goto fail_rwlock_init;
-
- err = uv_mutex_init(&loop->wq_mutex);
- if (err)
- goto fail_mutex_init;
-
- err = uv_async_init(loop, &loop->wq_async, uv__work_done);
- if (err)
- goto fail_async_init;
-
- uv__handle_unref(&loop->wq_async);
- loop->wq_async.flags |= UV__HANDLE_INTERNAL;
-
- return 0;
-
-fail_async_init:
- uv_mutex_destroy(&loop->wq_mutex);
-
-fail_mutex_init:
- uv_rwlock_destroy(&loop->cloexec_lock);
-
-fail_rwlock_init:
- uv__signal_loop_cleanup(loop);
-
-fail_signal_init:
- uv__platform_loop_delete(loop);
-
- return err;
-}
-
-
-void uv__loop_close(uv_loop_t* loop) {
- uv__signal_loop_cleanup(loop);
- uv__platform_loop_delete(loop);
- uv__async_stop(loop, &loop->async_watcher);
-
- if (loop->emfile_fd != -1) {
- uv__close(loop->emfile_fd);
- loop->emfile_fd = -1;
- }
-
- if (loop->backend_fd != -1) {
- uv__close(loop->backend_fd);
- loop->backend_fd = -1;
- }
-
- uv_mutex_lock(&loop->wq_mutex);
- assert(QUEUE_EMPTY(&loop->wq) && "thread pool work queue not empty!");
- assert(!uv__has_active_reqs(loop));
- uv_mutex_unlock(&loop->wq_mutex);
- uv_mutex_destroy(&loop->wq_mutex);
-
- /*
- * Note that all thread pool stuff is finished at this point and
- * it is safe to just destroy rw lock
- */
- uv_rwlock_destroy(&loop->cloexec_lock);
-
-#if 0
- assert(QUEUE_EMPTY(&loop->pending_queue));
- assert(QUEUE_EMPTY(&loop->watcher_queue));
- assert(loop->nfds == 0);
-#endif
-
- uv__free(loop->watchers);
- loop->watchers = NULL;
- loop->nwatchers = 0;
-}
-
-
-int uv__loop_configure(uv_loop_t* loop, uv_loop_option option, va_list ap) {
- if (option != UV_LOOP_BLOCK_SIGNAL)
- return UV_ENOSYS;
-
- if (va_arg(ap, int) != SIGPROF)
- return UV_EINVAL;
-
- loop->flags |= UV_LOOP_BLOCK_SIGPROF;
- return 0;
-}
diff --git a/3rdparty/libuv/src/unix/netbsd.c b/3rdparty/libuv/src/unix/netbsd.c
deleted file mode 100644
index ca48550f9d9..00000000000
--- a/3rdparty/libuv/src/unix/netbsd.c
+++ /dev/null
@@ -1,370 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "internal.h"
-
-#include <assert.h>
-#include <string.h>
-#include <errno.h>
-
-#include <kvm.h>
-#include <paths.h>
-#include <ifaddrs.h>
-#include <unistd.h>
-#include <time.h>
-#include <stdlib.h>
-#include <fcntl.h>
-
-#include <net/if.h>
-#include <net/if_dl.h>
-#include <sys/resource.h>
-#include <sys/types.h>
-#include <sys/sysctl.h>
-#include <uvm/uvm_extern.h>
-
-#include <unistd.h>
-#include <time.h>
-
-#undef NANOSEC
-#define NANOSEC ((uint64_t) 1e9)
-
-static char *process_title;
-
-
-int uv__platform_loop_init(uv_loop_t* loop) {
- return uv__kqueue_init(loop);
-}
-
-
-void uv__platform_loop_delete(uv_loop_t* loop) {
-}
-
-
-uint64_t uv__hrtime(uv_clocktype_t type) {
- struct timespec ts;
- clock_gettime(CLOCK_MONOTONIC, &ts);
- return (((uint64_t) ts.tv_sec) * NANOSEC + ts.tv_nsec);
-}
-
-
-void uv_loadavg(double avg[3]) {
- struct loadavg info;
- size_t size = sizeof(info);
- int which[] = {CTL_VM, VM_LOADAVG};
-
- if (sysctl(which, 2, &info, &size, NULL, 0) == -1) return;
-
- avg[0] = (double) info.ldavg[0] / info.fscale;
- avg[1] = (double) info.ldavg[1] / info.fscale;
- avg[2] = (double) info.ldavg[2] / info.fscale;
-}
-
-
-int uv_exepath(char* buffer, size_t* size) {
- int mib[4];
- size_t cb;
- pid_t mypid;
-
- if (buffer == NULL || size == NULL || *size == 0)
- return -EINVAL;
-
- mypid = getpid();
- mib[0] = CTL_KERN;
- mib[1] = KERN_PROC_ARGS;
- mib[2] = mypid;
- mib[3] = KERN_PROC_ARGV;
-
- cb = *size;
- if (sysctl(mib, 4, buffer, &cb, NULL, 0))
- return -errno;
- *size = strlen(buffer);
-
- return 0;
-}
-
-
-uint64_t uv_get_free_memory(void) {
- struct uvmexp info;
- size_t size = sizeof(info);
- int which[] = {CTL_VM, VM_UVMEXP};
-
- if (sysctl(which, 2, &info, &size, NULL, 0))
- return -errno;
-
- return (uint64_t) info.free * sysconf(_SC_PAGESIZE);
-}
-
-
-uint64_t uv_get_total_memory(void) {
-#if defined(HW_PHYSMEM64)
- uint64_t info;
- int which[] = {CTL_HW, HW_PHYSMEM64};
-#else
- unsigned int info;
- int which[] = {CTL_HW, HW_PHYSMEM};
-#endif
- size_t size = sizeof(info);
-
- if (sysctl(which, 2, &info, &size, NULL, 0))
- return -errno;
-
- return (uint64_t) info;
-}
-
-
-char** uv_setup_args(int argc, char** argv) {
- process_title = argc ? uv__strdup(argv[0]) : NULL;
- return argv;
-}
-
-
-int uv_set_process_title(const char* title) {
- if (process_title) uv__free(process_title);
-
- process_title = uv__strdup(title);
- setproctitle("%s", title);
-
- return 0;
-}
-
-
-int uv_get_process_title(char* buffer, size_t size) {
- if (process_title) {
- strncpy(buffer, process_title, size);
- } else {
- if (size > 0) {
- buffer[0] = '\0';
- }
- }
-
- return 0;
-}
-
-
-int uv_resident_set_memory(size_t* rss) {
- kvm_t *kd = NULL;
- struct kinfo_proc2 *kinfo = NULL;
- pid_t pid;
- int nprocs;
- int max_size = sizeof(struct kinfo_proc2);
- int page_size;
-
- page_size = getpagesize();
- pid = getpid();
-
- kd = kvm_open(NULL, NULL, NULL, KVM_NO_FILES, "kvm_open");
-
- if (kd == NULL) goto error;
-
- kinfo = kvm_getproc2(kd, KERN_PROC_PID, pid, max_size, &nprocs);
- if (kinfo == NULL) goto error;
-
- *rss = kinfo->p_vm_rssize * page_size;
-
- kvm_close(kd);
-
- return 0;
-
-error:
- if (kd) kvm_close(kd);
- return -EPERM;
-}
-
-
-int uv_uptime(double* uptime) {
- time_t now;
- struct timeval info;
- size_t size = sizeof(info);
- static int which[] = {CTL_KERN, KERN_BOOTTIME};
-
- if (sysctl(which, 2, &info, &size, NULL, 0))
- return -errno;
-
- now = time(NULL);
-
- *uptime = (double)(now - info.tv_sec);
- return 0;
-}
-
-
-int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) {
- unsigned int ticks = (unsigned int)sysconf(_SC_CLK_TCK);
- unsigned int multiplier = ((uint64_t)1000L / ticks);
- unsigned int cur = 0;
- uv_cpu_info_t* cpu_info;
- u_int64_t* cp_times;
- char model[512];
- u_int64_t cpuspeed;
- int numcpus;
- size_t size;
- int i;
-
- size = sizeof(model);
- if (sysctlbyname("machdep.cpu_brand", &model, &size, NULL, 0) &&
- sysctlbyname("hw.model", &model, &size, NULL, 0)) {
- return -errno;
- }
-
- size = sizeof(numcpus);
- if (sysctlbyname("hw.ncpu", &numcpus, &size, NULL, 0))
- return -errno;
- *count = numcpus;
-
- /* Only i386 and amd64 have machdep.tsc_freq */
- size = sizeof(cpuspeed);
- if (sysctlbyname("machdep.tsc_freq", &cpuspeed, &size, NULL, 0))
- cpuspeed = 0;
-
- size = numcpus * CPUSTATES * sizeof(*cp_times);
- cp_times = uv__malloc(size);
- if (cp_times == NULL)
- return -ENOMEM;
-
- if (sysctlbyname("kern.cp_time", cp_times, &size, NULL, 0))
- return -errno;
-
- *cpu_infos = uv__malloc(numcpus * sizeof(**cpu_infos));
- if (!(*cpu_infos)) {
- uv__free(cp_times);
- uv__free(*cpu_infos);
- return -ENOMEM;
- }
-
- for (i = 0; i < numcpus; i++) {
- cpu_info = &(*cpu_infos)[i];
- cpu_info->cpu_times.user = (uint64_t)(cp_times[CP_USER+cur]) * multiplier;
- cpu_info->cpu_times.nice = (uint64_t)(cp_times[CP_NICE+cur]) * multiplier;
- cpu_info->cpu_times.sys = (uint64_t)(cp_times[CP_SYS+cur]) * multiplier;
- cpu_info->cpu_times.idle = (uint64_t)(cp_times[CP_IDLE+cur]) * multiplier;
- cpu_info->cpu_times.irq = (uint64_t)(cp_times[CP_INTR+cur]) * multiplier;
- cpu_info->model = uv__strdup(model);
- cpu_info->speed = (int)(cpuspeed/(uint64_t) 1e6);
- cur += CPUSTATES;
- }
- uv__free(cp_times);
- return 0;
-}
-
-
-void uv_free_cpu_info(uv_cpu_info_t* cpu_infos, int count) {
- int i;
-
- for (i = 0; i < count; i++) {
- uv__free(cpu_infos[i].model);
- }
-
- uv__free(cpu_infos);
-}
-
-
-int uv_interface_addresses(uv_interface_address_t** addresses, int* count) {
- struct ifaddrs *addrs, *ent;
- uv_interface_address_t* address;
- int i;
- struct sockaddr_dl *sa_addr;
-
- if (getifaddrs(&addrs))
- return -errno;
-
- *count = 0;
-
- /* Count the number of interfaces */
- for (ent = addrs; ent != NULL; ent = ent->ifa_next) {
- if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING)) ||
- (ent->ifa_addr == NULL) ||
- (ent->ifa_addr->sa_family != PF_INET)) {
- continue;
- }
- (*count)++;
- }
-
- *addresses = uv__malloc(*count * sizeof(**addresses));
-
- if (!(*addresses)) {
- freeifaddrs(addrs);
- return -ENOMEM;
- }
-
- address = *addresses;
-
- for (ent = addrs; ent != NULL; ent = ent->ifa_next) {
- if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING)))
- continue;
-
- if (ent->ifa_addr == NULL)
- continue;
-
- if (ent->ifa_addr->sa_family != PF_INET)
- continue;
-
- address->name = uv__strdup(ent->ifa_name);
-
- if (ent->ifa_addr->sa_family == AF_INET6) {
- address->address.address6 = *((struct sockaddr_in6*) ent->ifa_addr);
- } else {
- address->address.address4 = *((struct sockaddr_in*) ent->ifa_addr);
- }
-
- if (ent->ifa_netmask->sa_family == AF_INET6) {
- address->netmask.netmask6 = *((struct sockaddr_in6*) ent->ifa_netmask);
- } else {
- address->netmask.netmask4 = *((struct sockaddr_in*) ent->ifa_netmask);
- }
-
- address->is_internal = !!(ent->ifa_flags & IFF_LOOPBACK);
-
- address++;
- }
-
- /* Fill in physical addresses for each interface */
- for (ent = addrs; ent != NULL; ent = ent->ifa_next) {
- if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING)) ||
- (ent->ifa_addr == NULL) ||
- (ent->ifa_addr->sa_family != AF_LINK)) {
- continue;
- }
-
- address = *addresses;
-
- for (i = 0; i < (*count); i++) {
- if (strcmp(address->name, ent->ifa_name) == 0) {
- sa_addr = (struct sockaddr_dl*)(ent->ifa_addr);
- memcpy(address->phys_addr, LLADDR(sa_addr), sizeof(address->phys_addr));
- }
- address++;
- }
- }
-
- freeifaddrs(addrs);
-
- return 0;
-}
-
-
-void uv_free_interface_addresses(uv_interface_address_t* addresses, int count) {
- int i;
-
- for (i = 0; i < count; i++) {
- uv__free(addresses[i].name);
- }
-
- uv__free(addresses);
-}
diff --git a/3rdparty/libuv/src/unix/openbsd.c b/3rdparty/libuv/src/unix/openbsd.c
deleted file mode 100644
index 6a3909a666c..00000000000
--- a/3rdparty/libuv/src/unix/openbsd.c
+++ /dev/null
@@ -1,386 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "internal.h"
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/resource.h>
-#include <sys/sched.h>
-#include <sys/time.h>
-#include <sys/sysctl.h>
-
-#include <ifaddrs.h>
-#include <net/if.h>
-#include <net/if_dl.h>
-
-#include <errno.h>
-#include <fcntl.h>
-#include <kvm.h>
-#include <paths.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#undef NANOSEC
-#define NANOSEC ((uint64_t) 1e9)
-
-
-static char *process_title;
-
-
-int uv__platform_loop_init(uv_loop_t* loop) {
- return uv__kqueue_init(loop);
-}
-
-
-void uv__platform_loop_delete(uv_loop_t* loop) {
-}
-
-
-uint64_t uv__hrtime(uv_clocktype_t type) {
- struct timespec ts;
- clock_gettime(CLOCK_MONOTONIC, &ts);
- return (((uint64_t) ts.tv_sec) * NANOSEC + ts.tv_nsec);
-}
-
-
-void uv_loadavg(double avg[3]) {
- struct loadavg info;
- size_t size = sizeof(info);
- int which[] = {CTL_VM, VM_LOADAVG};
-
- if (sysctl(which, 2, &info, &size, NULL, 0) < 0) return;
-
- avg[0] = (double) info.ldavg[0] / info.fscale;
- avg[1] = (double) info.ldavg[1] / info.fscale;
- avg[2] = (double) info.ldavg[2] / info.fscale;
-}
-
-
-int uv_exepath(char* buffer, size_t* size) {
- int mib[4];
- char **argsbuf = NULL;
- char **argsbuf_tmp;
- size_t argsbuf_size = 100U;
- size_t exepath_size;
- pid_t mypid;
- int err;
-
- if (buffer == NULL || size == NULL || *size == 0)
- return -EINVAL;
-
- mypid = getpid();
- for (;;) {
- err = -ENOMEM;
- argsbuf_tmp = uv__realloc(argsbuf, argsbuf_size);
- if (argsbuf_tmp == NULL)
- goto out;
- argsbuf = argsbuf_tmp;
- mib[0] = CTL_KERN;
- mib[1] = KERN_PROC_ARGS;
- mib[2] = mypid;
- mib[3] = KERN_PROC_ARGV;
- if (sysctl(mib, 4, argsbuf, &argsbuf_size, NULL, 0) == 0) {
- break;
- }
- if (errno != ENOMEM) {
- err = -errno;
- goto out;
- }
- argsbuf_size *= 2U;
- }
-
- if (argsbuf[0] == NULL) {
- err = -EINVAL; /* FIXME(bnoordhuis) More appropriate error. */
- goto out;
- }
-
- *size -= 1;
- exepath_size = strlen(argsbuf[0]);
- if (*size > exepath_size)
- *size = exepath_size;
-
- memcpy(buffer, argsbuf[0], *size);
- buffer[*size] = '\0';
- err = 0;
-
-out:
- uv__free(argsbuf);
-
- return err;
-}
-
-
-uint64_t uv_get_free_memory(void) {
- struct uvmexp info;
- size_t size = sizeof(info);
- int which[] = {CTL_VM, VM_UVMEXP};
-
- if (sysctl(which, 2, &info, &size, NULL, 0))
- return -errno;
-
- return (uint64_t) info.free * sysconf(_SC_PAGESIZE);
-}
-
-
-uint64_t uv_get_total_memory(void) {
- uint64_t info;
- int which[] = {CTL_HW, HW_PHYSMEM64};
- size_t size = sizeof(info);
-
- if (sysctl(which, 2, &info, &size, NULL, 0))
- return -errno;
-
- return (uint64_t) info;
-}
-
-
-char** uv_setup_args(int argc, char** argv) {
- process_title = argc ? uv__strdup(argv[0]) : NULL;
- return argv;
-}
-
-
-int uv_set_process_title(const char* title) {
- uv__free(process_title);
- process_title = uv__strdup(title);
- setproctitle(title);
- return 0;
-}
-
-
-int uv_get_process_title(char* buffer, size_t size) {
- if (process_title) {
- strncpy(buffer, process_title, size);
- } else {
- if (size > 0) {
- buffer[0] = '\0';
- }
- }
-
- return 0;
-}
-
-
-int uv_resident_set_memory(size_t* rss) {
- struct kinfo_proc kinfo;
- size_t page_size = getpagesize();
- size_t size = sizeof(struct kinfo_proc);
- int mib[6];
-
- mib[0] = CTL_KERN;
- mib[1] = KERN_PROC;
- mib[2] = KERN_PROC_PID;
- mib[3] = getpid();
- mib[4] = sizeof(struct kinfo_proc);
- mib[5] = 1;
-
- if (sysctl(mib, 6, &kinfo, &size, NULL, 0) < 0)
- return -errno;
-
- *rss = kinfo.p_vm_rssize * page_size;
- return 0;
-}
-
-
-int uv_uptime(double* uptime) {
- time_t now;
- struct timeval info;
- size_t size = sizeof(info);
- static int which[] = {CTL_KERN, KERN_BOOTTIME};
-
- if (sysctl(which, 2, &info, &size, NULL, 0))
- return -errno;
-
- now = time(NULL);
-
- *uptime = (double)(now - info.tv_sec);
- return 0;
-}
-
-
-int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) {
- unsigned int ticks = (unsigned int)sysconf(_SC_CLK_TCK),
- multiplier = ((uint64_t)1000L / ticks), cpuspeed;
- uint64_t info[CPUSTATES];
- char model[512];
- int numcpus = 1;
- int which[] = {CTL_HW,HW_MODEL,0};
- size_t size;
- int i;
- uv_cpu_info_t* cpu_info;
-
- size = sizeof(model);
- if (sysctl(which, 2, &model, &size, NULL, 0))
- return -errno;
-
- which[1] = HW_NCPU;
- size = sizeof(numcpus);
- if (sysctl(which, 2, &numcpus, &size, NULL, 0))
- return -errno;
-
- *cpu_infos = uv__malloc(numcpus * sizeof(**cpu_infos));
- if (!(*cpu_infos))
- return -ENOMEM;
-
- *count = numcpus;
-
- which[1] = HW_CPUSPEED;
- size = sizeof(cpuspeed);
- if (sysctl(which, 2, &cpuspeed, &size, NULL, 0)) {
- SAVE_ERRNO(uv__free(*cpu_infos));
- return -errno;
- }
-
- size = sizeof(info);
- which[0] = CTL_KERN;
- which[1] = KERN_CPTIME2;
- for (i = 0; i < numcpus; i++) {
- which[2] = i;
- size = sizeof(info);
- if (sysctl(which, 3, &info, &size, NULL, 0)) {
- SAVE_ERRNO(uv__free(*cpu_infos));
- return -errno;
- }
-
- cpu_info = &(*cpu_infos)[i];
-
- cpu_info->cpu_times.user = (uint64_t)(info[CP_USER]) * multiplier;
- cpu_info->cpu_times.nice = (uint64_t)(info[CP_NICE]) * multiplier;
- cpu_info->cpu_times.sys = (uint64_t)(info[CP_SYS]) * multiplier;
- cpu_info->cpu_times.idle = (uint64_t)(info[CP_IDLE]) * multiplier;
- cpu_info->cpu_times.irq = (uint64_t)(info[CP_INTR]) * multiplier;
-
- cpu_info->model = uv__strdup(model);
- cpu_info->speed = cpuspeed;
- }
-
- return 0;
-}
-
-
-void uv_free_cpu_info(uv_cpu_info_t* cpu_infos, int count) {
- int i;
-
- for (i = 0; i < count; i++) {
- uv__free(cpu_infos[i].model);
- }
-
- uv__free(cpu_infos);
-}
-
-
-int uv_interface_addresses(uv_interface_address_t** addresses,
- int* count) {
- struct ifaddrs *addrs, *ent;
- uv_interface_address_t* address;
- int i;
- struct sockaddr_dl *sa_addr;
-
- if (getifaddrs(&addrs) != 0)
- return -errno;
-
- *count = 0;
-
- /* Count the number of interfaces */
- for (ent = addrs; ent != NULL; ent = ent->ifa_next) {
- if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING)) ||
- (ent->ifa_addr == NULL) ||
- (ent->ifa_addr->sa_family != PF_INET)) {
- continue;
- }
- (*count)++;
- }
-
- *addresses = uv__malloc(*count * sizeof(**addresses));
-
- if (!(*addresses)) {
- freeifaddrs(addrs);
- return -ENOMEM;
- }
-
- address = *addresses;
-
- for (ent = addrs; ent != NULL; ent = ent->ifa_next) {
- if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING)))
- continue;
-
- if (ent->ifa_addr == NULL)
- continue;
-
- if (ent->ifa_addr->sa_family != PF_INET)
- continue;
-
- address->name = uv__strdup(ent->ifa_name);
-
- if (ent->ifa_addr->sa_family == AF_INET6) {
- address->address.address6 = *((struct sockaddr_in6*) ent->ifa_addr);
- } else {
- address->address.address4 = *((struct sockaddr_in*) ent->ifa_addr);
- }
-
- if (ent->ifa_netmask->sa_family == AF_INET6) {
- address->netmask.netmask6 = *((struct sockaddr_in6*) ent->ifa_netmask);
- } else {
- address->netmask.netmask4 = *((struct sockaddr_in*) ent->ifa_netmask);
- }
-
- address->is_internal = !!(ent->ifa_flags & IFF_LOOPBACK);
-
- address++;
- }
-
- /* Fill in physical addresses for each interface */
- for (ent = addrs; ent != NULL; ent = ent->ifa_next) {
- if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING)) ||
- (ent->ifa_addr == NULL) ||
- (ent->ifa_addr->sa_family != AF_LINK)) {
- continue;
- }
-
- address = *addresses;
-
- for (i = 0; i < (*count); i++) {
- if (strcmp(address->name, ent->ifa_name) == 0) {
- sa_addr = (struct sockaddr_dl*)(ent->ifa_addr);
- memcpy(address->phys_addr, LLADDR(sa_addr), sizeof(address->phys_addr));
- }
- address++;
- }
- }
-
- freeifaddrs(addrs);
-
- return 0;
-}
-
-
-void uv_free_interface_addresses(uv_interface_address_t* addresses,
- int count) {
- int i;
-
- for (i = 0; i < count; i++) {
- uv__free(addresses[i].name);
- }
-
- uv__free(addresses);
-}
diff --git a/3rdparty/libuv/src/unix/pipe.c b/3rdparty/libuv/src/unix/pipe.c
deleted file mode 100644
index 7f87a713bf4..00000000000
--- a/3rdparty/libuv/src/unix/pipe.c
+++ /dev/null
@@ -1,288 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "internal.h"
-
-#include <assert.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/un.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-
-int uv_pipe_init(uv_loop_t* loop, uv_pipe_t* handle, int ipc) {
- uv__stream_init(loop, (uv_stream_t*)handle, UV_NAMED_PIPE);
- handle->shutdown_req = NULL;
- handle->connect_req = NULL;
- handle->pipe_fname = NULL;
- handle->ipc = ipc;
- return 0;
-}
-
-
-int uv_pipe_bind(uv_pipe_t* handle, const char* name) {
- struct sockaddr_un saddr;
- const char* pipe_fname;
- int sockfd;
- int err;
-
- pipe_fname = NULL;
- sockfd = -1;
-
- /* Already bound? */
- if (uv__stream_fd(handle) >= 0)
- return -EINVAL;
-
- /* Make a copy of the file name, it outlives this function's scope. */
- pipe_fname = uv__strdup(name);
- if (pipe_fname == NULL)
- return -ENOMEM;
-
- /* We've got a copy, don't touch the original any more. */
- name = NULL;
-
- err = uv__socket(AF_UNIX, SOCK_STREAM, 0);
- if (err < 0)
- goto err_socket;
- sockfd = err;
-
- memset(&saddr, 0, sizeof saddr);
- strncpy(saddr.sun_path, pipe_fname, sizeof(saddr.sun_path) - 1);
- saddr.sun_path[sizeof(saddr.sun_path) - 1] = '\0';
- saddr.sun_family = AF_UNIX;
-
- if (bind(sockfd, (struct sockaddr*)&saddr, sizeof saddr)) {
- err = -errno;
- /* Convert ENOENT to EACCES for compatibility with Windows. */
- if (err == -ENOENT)
- err = -EACCES;
- goto err_bind;
- }
-
- /* Success. */
- handle->pipe_fname = pipe_fname; /* Is a strdup'ed copy. */
- handle->io_watcher.fd = sockfd;
- return 0;
-
-err_bind:
- uv__close(sockfd);
-
-err_socket:
- uv__free((void*)pipe_fname);
- return err;
-}
-
-
-int uv_pipe_listen(uv_pipe_t* handle, int backlog, uv_connection_cb cb) {
- if (uv__stream_fd(handle) == -1)
- return -EINVAL;
-
- if (listen(uv__stream_fd(handle), backlog))
- return -errno;
-
- handle->connection_cb = cb;
- handle->io_watcher.cb = uv__server_io;
- uv__io_start(handle->loop, &handle->io_watcher, UV__POLLIN);
- return 0;
-}
-
-
-void uv__pipe_close(uv_pipe_t* handle) {
- if (handle->pipe_fname) {
- /*
- * Unlink the file system entity before closing the file descriptor.
- * Doing it the other way around introduces a race where our process
- * unlinks a socket with the same name that's just been created by
- * another thread or process.
- */
- unlink(handle->pipe_fname);
- uv__free((void*)handle->pipe_fname);
- handle->pipe_fname = NULL;
- }
-
- uv__stream_close((uv_stream_t*)handle);
-}
-
-
-int uv_pipe_open(uv_pipe_t* handle, uv_file fd) {
- int err;
-
- err = uv__nonblock(fd, 1);
- if (err)
- return err;
-
-#if defined(__APPLE__)
- err = uv__stream_try_select((uv_stream_t*) handle, &fd);
- if (err)
- return err;
-#endif /* defined(__APPLE__) */
-
- return uv__stream_open((uv_stream_t*)handle,
- fd,
- UV_STREAM_READABLE | UV_STREAM_WRITABLE);
-}
-
-
-void uv_pipe_connect(uv_connect_t* req,
- uv_pipe_t* handle,
- const char* name,
- uv_connect_cb cb) {
- struct sockaddr_un saddr;
- int new_sock;
- int err;
- int r;
-
- new_sock = (uv__stream_fd(handle) == -1);
-
- if (new_sock) {
- err = uv__socket(AF_UNIX, SOCK_STREAM, 0);
- if (err < 0)
- goto out;
- handle->io_watcher.fd = err;
- }
-
- memset(&saddr, 0, sizeof saddr);
- strncpy(saddr.sun_path, name, sizeof(saddr.sun_path) - 1);
- saddr.sun_path[sizeof(saddr.sun_path) - 1] = '\0';
- saddr.sun_family = AF_UNIX;
-
- do {
- r = connect(uv__stream_fd(handle),
- (struct sockaddr*)&saddr, sizeof saddr);
- }
- while (r == -1 && errno == EINTR);
-
- if (r == -1 && errno != EINPROGRESS) {
- err = -errno;
- goto out;
- }
-
- err = 0;
- if (new_sock) {
- err = uv__stream_open((uv_stream_t*)handle,
- uv__stream_fd(handle),
- UV_STREAM_READABLE | UV_STREAM_WRITABLE);
- }
-
- if (err == 0)
- uv__io_start(handle->loop, &handle->io_watcher, UV__POLLIN | UV__POLLOUT);
-
-out:
- handle->delayed_error = err;
- handle->connect_req = req;
-
- uv__req_init(handle->loop, req, UV_CONNECT);
- req->handle = (uv_stream_t*)handle;
- req->cb = cb;
- QUEUE_INIT(&req->queue);
-
- /* Force callback to run on next tick in case of error. */
- if (err)
- uv__io_feed(handle->loop, &handle->io_watcher);
-
- /* Mimic the Windows pipe implementation, always
- * return 0 and let the callback handle errors.
- */
-}
-
-
-typedef int (*uv__peersockfunc)(int, struct sockaddr*, socklen_t*);
-
-
-static int uv__pipe_getsockpeername(const uv_pipe_t* handle,
- uv__peersockfunc func,
- char* buffer,
- size_t* size) {
- struct sockaddr_un sa;
- socklen_t addrlen;
- int err;
-
- addrlen = sizeof(sa);
- memset(&sa, 0, addrlen);
- err = func(uv__stream_fd(handle), (struct sockaddr*) &sa, &addrlen);
- if (err < 0) {
- *size = 0;
- return -errno;
- }
-
-#if defined(__linux__)
- if (sa.sun_path[0] == 0)
- /* Linux abstract namespace */
- addrlen -= offsetof(struct sockaddr_un, sun_path);
- else
-#endif
- addrlen = strlen(sa.sun_path);
-
-
- if (addrlen > *size) {
- *size = addrlen;
- return UV_ENOBUFS;
- }
-
- memcpy(buffer, sa.sun_path, addrlen);
- *size = addrlen;
-
- return 0;
-}
-
-
-int uv_pipe_getsockname(const uv_pipe_t* handle, char* buffer, size_t* size) {
- return uv__pipe_getsockpeername(handle, getsockname, buffer, size);
-}
-
-
-int uv_pipe_getpeername(const uv_pipe_t* handle, char* buffer, size_t* size) {
- return uv__pipe_getsockpeername(handle, getpeername, buffer, size);
-}
-
-
-void uv_pipe_pending_instances(uv_pipe_t* handle, int count) {
-}
-
-
-int uv_pipe_pending_count(uv_pipe_t* handle) {
- uv__stream_queued_fds_t* queued_fds;
-
- if (!handle->ipc)
- return 0;
-
- if (handle->accepted_fd == -1)
- return 0;
-
- if (handle->queued_fds == NULL)
- return 1;
-
- queued_fds = handle->queued_fds;
- return queued_fds->offset + 1;
-}
-
-
-uv_handle_type uv_pipe_pending_type(uv_pipe_t* handle) {
- if (!handle->ipc)
- return UV_UNKNOWN_HANDLE;
-
- if (handle->accepted_fd == -1)
- return UV_UNKNOWN_HANDLE;
- else
- return uv__handle_type(handle->accepted_fd);
-}
diff --git a/3rdparty/libuv/src/unix/poll.c b/3rdparty/libuv/src/unix/poll.c
deleted file mode 100644
index 37da3b95851..00000000000
--- a/3rdparty/libuv/src/unix/poll.c
+++ /dev/null
@@ -1,113 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "internal.h"
-
-#include <unistd.h>
-#include <assert.h>
-#include <errno.h>
-
-
-static void uv__poll_io(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
- uv_poll_t* handle;
- int pevents;
-
- handle = container_of(w, uv_poll_t, io_watcher);
-
- if (events & UV__POLLERR) {
- uv__io_stop(loop, w, UV__POLLIN | UV__POLLOUT);
- uv__handle_stop(handle);
- handle->poll_cb(handle, -EBADF, 0);
- return;
- }
-
- pevents = 0;
- if (events & UV__POLLIN)
- pevents |= UV_READABLE;
- if (events & UV__POLLOUT)
- pevents |= UV_WRITABLE;
-
- handle->poll_cb(handle, 0, pevents);
-}
-
-
-int uv_poll_init(uv_loop_t* loop, uv_poll_t* handle, int fd) {
- int err;
-
- err = uv__nonblock(fd, 1);
- if (err)
- return err;
-
- uv__handle_init(loop, (uv_handle_t*) handle, UV_POLL);
- uv__io_init(&handle->io_watcher, uv__poll_io, fd);
- handle->poll_cb = NULL;
- return 0;
-}
-
-
-int uv_poll_init_socket(uv_loop_t* loop, uv_poll_t* handle,
- uv_os_sock_t socket) {
- return uv_poll_init(loop, handle, socket);
-}
-
-
-static void uv__poll_stop(uv_poll_t* handle) {
- uv__io_stop(handle->loop, &handle->io_watcher, UV__POLLIN | UV__POLLOUT);
- uv__handle_stop(handle);
-}
-
-
-int uv_poll_stop(uv_poll_t* handle) {
- assert(!(handle->flags & (UV_CLOSING | UV_CLOSED)));
- uv__poll_stop(handle);
- return 0;
-}
-
-
-int uv_poll_start(uv_poll_t* handle, int pevents, uv_poll_cb poll_cb) {
- int events;
-
- assert((pevents & ~(UV_READABLE | UV_WRITABLE)) == 0);
- assert(!(handle->flags & (UV_CLOSING | UV_CLOSED)));
-
- uv__poll_stop(handle);
-
- if (pevents == 0)
- return 0;
-
- events = 0;
- if (pevents & UV_READABLE)
- events |= UV__POLLIN;
- if (pevents & UV_WRITABLE)
- events |= UV__POLLOUT;
-
- uv__io_start(handle->loop, &handle->io_watcher, events);
- uv__handle_start(handle);
- handle->poll_cb = poll_cb;
-
- return 0;
-}
-
-
-void uv__poll_close(uv_poll_t* handle) {
- uv__poll_stop(handle);
-}
diff --git a/3rdparty/libuv/src/unix/process.c b/3rdparty/libuv/src/unix/process.c
deleted file mode 100644
index 571f8cd778c..00000000000
--- a/3rdparty/libuv/src/unix/process.c
+++ /dev/null
@@ -1,563 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "internal.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <errno.h>
-
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <poll.h>
-
-#if defined(__APPLE__) && !TARGET_OS_IPHONE
-# include <crt_externs.h>
-# define environ (*_NSGetEnviron())
-#else
-extern char **environ;
-#endif
-
-#ifdef __linux__
-# include <grp.h>
-#endif
-
-
-static void uv__chld(uv_signal_t* handle, int signum) {
- uv_process_t* process;
- uv_loop_t* loop;
- int exit_status;
- int term_signal;
- int status;
- pid_t pid;
- QUEUE pending;
- QUEUE* q;
- QUEUE* h;
-
- assert(signum == SIGCHLD);
-
- QUEUE_INIT(&pending);
- loop = handle->loop;
-
- h = &loop->process_handles;
- q = QUEUE_HEAD(h);
- while (q != h) {
- process = QUEUE_DATA(q, uv_process_t, queue);
- q = QUEUE_NEXT(q);
-
- do
- pid = waitpid(process->pid, &status, WNOHANG);
- while (pid == -1 && errno == EINTR);
-
- if (pid == 0)
- continue;
-
- if (pid == -1) {
- if (errno != ECHILD)
- abort();
- continue;
- }
-
- process->status = status;
- QUEUE_REMOVE(&process->queue);
- QUEUE_INSERT_TAIL(&pending, &process->queue);
- }
-
- h = &pending;
- q = QUEUE_HEAD(h);
- while (q != h) {
- process = QUEUE_DATA(q, uv_process_t, queue);
- q = QUEUE_NEXT(q);
-
- QUEUE_REMOVE(&process->queue);
- QUEUE_INIT(&process->queue);
- uv__handle_stop(process);
-
- if (process->exit_cb == NULL)
- continue;
-
- exit_status = 0;
- if (WIFEXITED(process->status))
- exit_status = WEXITSTATUS(process->status);
-
- term_signal = 0;
- if (WIFSIGNALED(process->status))
- term_signal = WTERMSIG(process->status);
-
- process->exit_cb(process, exit_status, term_signal);
- }
- assert(QUEUE_EMPTY(&pending));
-}
-
-
-int uv__make_socketpair(int fds[2], int flags) {
-#if defined(__linux__)
- static int no_cloexec;
-
- if (no_cloexec)
- goto skip;
-
- if (socketpair(AF_UNIX, SOCK_STREAM | UV__SOCK_CLOEXEC | flags, 0, fds) == 0)
- return 0;
-
- /* Retry on EINVAL, it means SOCK_CLOEXEC is not supported.
- * Anything else is a genuine error.
- */
- if (errno != EINVAL)
- return -errno;
-
- no_cloexec = 1;
-
-skip:
-#endif
-
- if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds))
- return -errno;
-
- uv__cloexec(fds[0], 1);
- uv__cloexec(fds[1], 1);
-
- if (flags & UV__F_NONBLOCK) {
- uv__nonblock(fds[0], 1);
- uv__nonblock(fds[1], 1);
- }
-
- return 0;
-}
-
-
-int uv__make_pipe(int fds[2], int flags) {
-#if defined(__linux__)
- static int no_pipe2;
-
- if (no_pipe2)
- goto skip;
-
- if (uv__pipe2(fds, flags | UV__O_CLOEXEC) == 0)
- return 0;
-
- if (errno != ENOSYS)
- return -errno;
-
- no_pipe2 = 1;
-
-skip:
-#endif
-
- if (pipe(fds))
- return -errno;
-
- uv__cloexec(fds[0], 1);
- uv__cloexec(fds[1], 1);
-
- if (flags & UV__F_NONBLOCK) {
- uv__nonblock(fds[0], 1);
- uv__nonblock(fds[1], 1);
- }
-
- return 0;
-}
-
-
-/*
- * Used for initializing stdio streams like options.stdin_stream. Returns
- * zero on success. See also the cleanup section in uv_spawn().
- */
-static int uv__process_init_stdio(uv_stdio_container_t* container, int fds[2]) {
- int mask;
- int fd;
-
- mask = UV_IGNORE | UV_CREATE_PIPE | UV_INHERIT_FD | UV_INHERIT_STREAM;
-
- switch (container->flags & mask) {
- case UV_IGNORE:
- return 0;
-
- case UV_CREATE_PIPE:
- assert(container->data.stream != NULL);
- if (container->data.stream->type != UV_NAMED_PIPE)
- return -EINVAL;
- else
- return uv__make_socketpair(fds, 0);
-
- case UV_INHERIT_FD:
- case UV_INHERIT_STREAM:
- if (container->flags & UV_INHERIT_FD)
- fd = container->data.fd;
- else
- fd = uv__stream_fd(container->data.stream);
-
- if (fd == -1)
- return -EINVAL;
-
- fds[1] = fd;
- return 0;
-
- default:
- assert(0 && "Unexpected flags");
- return -EINVAL;
- }
-}
-
-
-static int uv__process_open_stream(uv_stdio_container_t* container,
- int pipefds[2],
- int writable) {
- int flags;
- int err;
-
- if (!(container->flags & UV_CREATE_PIPE) || pipefds[0] < 0)
- return 0;
-
- err = uv__close(pipefds[1]);
- if (err != 0 && err != -EINPROGRESS)
- abort();
-
- pipefds[1] = -1;
- uv__nonblock(pipefds[0], 1);
-
- if (container->data.stream->type == UV_NAMED_PIPE &&
- ((uv_pipe_t*)container->data.stream)->ipc)
- flags = UV_STREAM_READABLE | UV_STREAM_WRITABLE;
- else if (writable)
- flags = UV_STREAM_WRITABLE;
- else
- flags = UV_STREAM_READABLE;
-
- return uv__stream_open(container->data.stream, pipefds[0], flags);
-}
-
-
-static void uv__process_close_stream(uv_stdio_container_t* container) {
- if (!(container->flags & UV_CREATE_PIPE)) return;
- uv__stream_close((uv_stream_t*)container->data.stream);
-}
-
-
-static void uv__write_int(int fd, int val) {
- ssize_t n;
-
- do
- n = write(fd, &val, sizeof(val));
- while (n == -1 && errno == EINTR);
-
- if (n == -1 && errno == EPIPE)
- return; /* parent process has quit */
-
- assert(n == sizeof(val));
-}
-
-
-#if !(defined(__APPLE__) && (TARGET_OS_TV || TARGET_OS_WATCH))
-/* execvp is marked __WATCHOS_PROHIBITED __TVOS_PROHIBITED, so must be
- * avoided. Since this isn't called on those targets, the function
- * doesn't even need to be defined for them.
- */
-static void uv__process_child_init(const uv_process_options_t* options,
- int stdio_count,
- int (*pipes)[2],
- int error_fd) {
- int close_fd;
- int use_fd;
- int fd;
-
- if (options->flags & UV_PROCESS_DETACHED)
- setsid();
-
- /* First duplicate low numbered fds, since it's not safe to duplicate them,
- * they could get replaced. Example: swapping stdout and stderr; without
- * this fd 2 (stderr) would be duplicated into fd 1, thus making both
- * stdout and stderr go to the same fd, which was not the intention. */
- for (fd = 0; fd < stdio_count; fd++) {
- use_fd = pipes[fd][1];
- if (use_fd < 0 || use_fd >= fd)
- continue;
- pipes[fd][1] = fcntl(use_fd, F_DUPFD, stdio_count);
- if (pipes[fd][1] == -1) {
- uv__write_int(error_fd, -errno);
- _exit(127);
- }
- }
-
- for (fd = 0; fd < stdio_count; fd++) {
- close_fd = pipes[fd][0];
- use_fd = pipes[fd][1];
-
- if (use_fd < 0) {
- if (fd >= 3)
- continue;
- else {
- /* redirect stdin, stdout and stderr to /dev/null even if UV_IGNORE is
- * set
- */
- use_fd = open("/dev/null", fd == 0 ? O_RDONLY : O_RDWR);
- close_fd = use_fd;
-
- if (use_fd == -1) {
- uv__write_int(error_fd, -errno);
- _exit(127);
- }
- }
- }
-
- if (fd == use_fd)
- uv__cloexec(use_fd, 0);
- else
- fd = dup2(use_fd, fd);
-
- if (fd == -1) {
- uv__write_int(error_fd, -errno);
- _exit(127);
- }
-
- if (fd <= 2)
- uv__nonblock(fd, 0);
-
- if (close_fd >= stdio_count)
- uv__close(close_fd);
- }
-
- for (fd = 0; fd < stdio_count; fd++) {
- use_fd = pipes[fd][1];
-
- if (use_fd >= stdio_count)
- uv__close(use_fd);
- }
-
- if (options->cwd != NULL && chdir(options->cwd)) {
- uv__write_int(error_fd, -errno);
- _exit(127);
- }
-
- if (options->flags & (UV_PROCESS_SETUID | UV_PROCESS_SETGID)) {
- /* When dropping privileges from root, the `setgroups` call will
- * remove any extraneous groups. If we don't call this, then
- * even though our uid has dropped, we may still have groups
- * that enable us to do super-user things. This will fail if we
- * aren't root, so don't bother checking the return value, this
- * is just done as an optimistic privilege dropping function.
- */
- SAVE_ERRNO(setgroups(0, NULL));
- }
-
- if ((options->flags & UV_PROCESS_SETGID) && setgid(options->gid)) {
- uv__write_int(error_fd, -errno);
- _exit(127);
- }
-
- if ((options->flags & UV_PROCESS_SETUID) && setuid(options->uid)) {
- uv__write_int(error_fd, -errno);
- _exit(127);
- }
-
- if (options->env != NULL) {
- environ = options->env;
- }
-
- execvp(options->file, options->args);
- uv__write_int(error_fd, -errno);
- _exit(127);
-}
-#endif
-
-
-int uv_spawn(uv_loop_t* loop,
- uv_process_t* process,
- const uv_process_options_t* options) {
-#if defined(__APPLE__) && (TARGET_OS_TV || TARGET_OS_WATCH)
- /* fork is marked __WATCHOS_PROHIBITED __TVOS_PROHIBITED. */
- return -ENOSYS;
-#else
- int signal_pipe[2] = { -1, -1 };
- int (*pipes)[2];
- int stdio_count;
- ssize_t r;
- pid_t pid;
- int err;
- int exec_errorno;
- int i;
- int status;
-
- assert(options->file != NULL);
- assert(!(options->flags & ~(UV_PROCESS_DETACHED |
- UV_PROCESS_SETGID |
- UV_PROCESS_SETUID |
- UV_PROCESS_WINDOWS_HIDE |
- UV_PROCESS_WINDOWS_VERBATIM_ARGUMENTS)));
-
- uv__handle_init(loop, (uv_handle_t*)process, UV_PROCESS);
- QUEUE_INIT(&process->queue);
-
- stdio_count = options->stdio_count;
- if (stdio_count < 3)
- stdio_count = 3;
-
- err = -ENOMEM;
- pipes = uv__malloc(stdio_count * sizeof(*pipes));
- if (pipes == NULL)
- goto error;
-
- for (i = 0; i < stdio_count; i++) {
- pipes[i][0] = -1;
- pipes[i][1] = -1;
- }
-
- for (i = 0; i < options->stdio_count; i++) {
- err = uv__process_init_stdio(options->stdio + i, pipes[i]);
- if (err)
- goto error;
- }
-
- /* This pipe is used by the parent to wait until
- * the child has called `execve()`. We need this
- * to avoid the following race condition:
- *
- * if ((pid = fork()) > 0) {
- * kill(pid, SIGTERM);
- * }
- * else if (pid == 0) {
- * execve("/bin/cat", argp, envp);
- * }
- *
- * The parent sends a signal immediately after forking.
- * Since the child may not have called `execve()` yet,
- * there is no telling what process receives the signal,
- * our fork or /bin/cat.
- *
- * To avoid ambiguity, we create a pipe with both ends
- * marked close-on-exec. Then, after the call to `fork()`,
- * the parent polls the read end until it EOFs or errors with EPIPE.
- */
- err = uv__make_pipe(signal_pipe, 0);
- if (err)
- goto error;
-
- uv_signal_start(&loop->child_watcher, uv__chld, SIGCHLD);
-
- /* Acquire write lock to prevent opening new fds in worker threads */
- uv_rwlock_wrlock(&loop->cloexec_lock);
- pid = fork();
-
- if (pid == -1) {
- err = -errno;
- uv_rwlock_wrunlock(&loop->cloexec_lock);
- uv__close(signal_pipe[0]);
- uv__close(signal_pipe[1]);
- goto error;
- }
-
- if (pid == 0) {
- uv__process_child_init(options, stdio_count, pipes, signal_pipe[1]);
- abort();
- }
-
- /* Release lock in parent process */
- uv_rwlock_wrunlock(&loop->cloexec_lock);
- uv__close(signal_pipe[1]);
-
- process->status = 0;
- exec_errorno = 0;
- do
- r = read(signal_pipe[0], &exec_errorno, sizeof(exec_errorno));
- while (r == -1 && errno == EINTR);
-
- if (r == 0)
- ; /* okay, EOF */
- else if (r == sizeof(exec_errorno)) {
- do
- err = waitpid(pid, &status, 0); /* okay, read errorno */
- while (err == -1 && errno == EINTR);
- assert(err == pid);
- } else if (r == -1 && errno == EPIPE) {
- do
- err = waitpid(pid, &status, 0); /* okay, got EPIPE */
- while (err == -1 && errno == EINTR);
- assert(err == pid);
- } else
- abort();
-
- uv__close(signal_pipe[0]);
-
- for (i = 0; i < options->stdio_count; i++) {
- err = uv__process_open_stream(options->stdio + i, pipes[i], i == 0);
- if (err == 0)
- continue;
-
- while (i--)
- uv__process_close_stream(options->stdio + i);
-
- goto error;
- }
-
- /* Only activate this handle if exec() happened successfully */
- if (exec_errorno == 0) {
- QUEUE_INSERT_TAIL(&loop->process_handles, &process->queue);
- uv__handle_start(process);
- }
-
- process->pid = pid;
- process->exit_cb = options->exit_cb;
-
- uv__free(pipes);
- return exec_errorno;
-
-error:
- if (pipes != NULL) {
- for (i = 0; i < stdio_count; i++) {
- if (i < options->stdio_count)
- if (options->stdio[i].flags & (UV_INHERIT_FD | UV_INHERIT_STREAM))
- continue;
- if (pipes[i][0] != -1)
- close(pipes[i][0]);
- if (pipes[i][1] != -1)
- close(pipes[i][1]);
- }
- uv__free(pipes);
- }
-
- return err;
-#endif
-}
-
-
-int uv_process_kill(uv_process_t* process, int signum) {
- return uv_kill(process->pid, signum);
-}
-
-
-int uv_kill(int pid, int signum) {
- if (kill(pid, signum))
- return -errno;
- else
- return 0;
-}
-
-
-void uv__process_close(uv_process_t* handle) {
- QUEUE_REMOVE(&handle->queue);
- uv__handle_stop(handle);
- if (QUEUE_EMPTY(&handle->loop->process_handles))
- uv_signal_stop(&handle->loop->child_watcher);
-}
diff --git a/3rdparty/libuv/src/unix/proctitle.c b/3rdparty/libuv/src/unix/proctitle.c
deleted file mode 100644
index 19214e5ec97..00000000000
--- a/3rdparty/libuv/src/unix/proctitle.c
+++ /dev/null
@@ -1,102 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "internal.h"
-
-#include <stdlib.h>
-#include <string.h>
-
-extern void uv__set_process_title(const char* title);
-
-static void* args_mem;
-
-static struct {
- char* str;
- size_t len;
-} process_title;
-
-
-char** uv_setup_args(int argc, char** argv) {
- char** new_argv;
- size_t size;
- char* s;
- int i;
-
- if (argc <= 0)
- return argv;
-
- /* Calculate how much memory we need for the argv strings. */
- size = 0;
- for (i = 0; i < argc; i++)
- size += strlen(argv[i]) + 1;
-
- process_title.str = argv[0];
- process_title.len = argv[argc - 1] + strlen(argv[argc - 1]) - argv[0];
- assert(process_title.len + 1 == size); /* argv memory should be adjacent. */
-
- /* Add space for the argv pointers. */
- size += (argc + 1) * sizeof(char*);
-
- new_argv = uv__malloc(size);
- if (new_argv == NULL)
- return argv;
- args_mem = new_argv;
-
- /* Copy over the strings and set up the pointer table. */
- s = (char*) &new_argv[argc + 1];
- for (i = 0; i < argc; i++) {
- size = strlen(argv[i]) + 1;
- memcpy(s, argv[i], size);
- new_argv[i] = s;
- s += size;
- }
- new_argv[i] = NULL;
-
- return new_argv;
-}
-
-
-int uv_set_process_title(const char* title) {
- if (process_title.len == 0)
- return 0;
-
- /* No need to terminate, byte after is always '\0'. */
- strncpy(process_title.str, title, process_title.len);
- uv__set_process_title(title);
-
- return 0;
-}
-
-
-int uv_get_process_title(char* buffer, size_t size) {
- if (process_title.len > 0)
- strncpy(buffer, process_title.str, size);
- else if (size > 0)
- buffer[0] = '\0';
-
- return 0;
-}
-
-
-UV_DESTRUCTOR(static void free_args_mem(void)) {
- uv__free(args_mem); /* Keep valgrind happy. */
- args_mem = NULL;
-}
diff --git a/3rdparty/libuv/src/unix/pthread-fixes.c b/3rdparty/libuv/src/unix/pthread-fixes.c
deleted file mode 100644
index 3a71eb5aae7..00000000000
--- a/3rdparty/libuv/src/unix/pthread-fixes.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/* Copyright (c) 2013, Sony Mobile Communications AB
- * Copyright (c) 2012, Google Inc.
- 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 Google Inc. 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
- 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.
-*/
-
-/* Android versions < 4.1 have a broken pthread_sigmask.
- * Note that this block of code must come before any inclusion of
- * pthread-fixes.h so that the real pthread_sigmask can be referenced.
- * */
-#include <errno.h>
-#include <pthread.h>
-#include <signal.h>
-
-int uv__pthread_sigmask(int how, const sigset_t* set, sigset_t* oset) {
- static int workaround;
-
- if (workaround) {
- return sigprocmask(how, set, oset);
- } else if (pthread_sigmask(how, set, oset)) {
- if (errno == EINVAL && sigprocmask(how, set, oset) == 0) {
- workaround = 1;
- return 0;
- } else {
- return -1;
- }
- } else {
- return 0;
- }
-}
-
-/*Android doesn't provide pthread_barrier_t for now.*/
-#ifndef PTHREAD_BARRIER_SERIAL_THREAD
-
-#include "pthread-fixes.h"
-
-int pthread_barrier_init(pthread_barrier_t* barrier,
- const void* barrier_attr,
- unsigned count) {
- barrier->count = count;
- pthread_mutex_init(&barrier->mutex, NULL);
- pthread_cond_init(&barrier->cond, NULL);
- return 0;
-}
-
-int pthread_barrier_wait(pthread_barrier_t* barrier) {
- /* Lock the mutex*/
- pthread_mutex_lock(&barrier->mutex);
- /* Decrement the count. If this is the first thread to reach 0, wake up
- waiters, unlock the mutex, then return PTHREAD_BARRIER_SERIAL_THREAD.*/
- if (--barrier->count == 0) {
- /* First thread to reach the barrier */
- pthread_cond_broadcast(&barrier->cond);
- pthread_mutex_unlock(&barrier->mutex);
- return PTHREAD_BARRIER_SERIAL_THREAD;
- }
- /* Otherwise, wait for other threads until the count reaches 0, then
- return 0 to indicate this is not the first thread.*/
- do {
- pthread_cond_wait(&barrier->cond, &barrier->mutex);
- } while (barrier->count > 0);
-
- pthread_mutex_unlock(&barrier->mutex);
- return 0;
-}
-
-int pthread_barrier_destroy(pthread_barrier_t *barrier) {
- barrier->count = 0;
- pthread_cond_destroy(&barrier->cond);
- pthread_mutex_destroy(&barrier->mutex);
- return 0;
-}
-
-#endif /* defined(PTHREAD_BARRIER_SERIAL_THREAD) */
-
-int pthread_yield(void) {
- sched_yield();
- return 0;
-}
diff --git a/3rdparty/libuv/src/unix/signal.c b/3rdparty/libuv/src/unix/signal.c
deleted file mode 100644
index edd9085d3f3..00000000000
--- a/3rdparty/libuv/src/unix/signal.c
+++ /dev/null
@@ -1,467 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "internal.h"
-
-#include <assert.h>
-#include <errno.h>
-#include <signal.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-
-typedef struct {
- uv_signal_t* handle;
- int signum;
-} uv__signal_msg_t;
-
-RB_HEAD(uv__signal_tree_s, uv_signal_s);
-
-
-static int uv__signal_unlock(void);
-static void uv__signal_event(uv_loop_t* loop, uv__io_t* w, unsigned int events);
-static int uv__signal_compare(uv_signal_t* w1, uv_signal_t* w2);
-static void uv__signal_stop(uv_signal_t* handle);
-
-
-static pthread_once_t uv__signal_global_init_guard = PTHREAD_ONCE_INIT;
-static struct uv__signal_tree_s uv__signal_tree =
- RB_INITIALIZER(uv__signal_tree);
-static int uv__signal_lock_pipefd[2];
-
-
-RB_GENERATE_STATIC(uv__signal_tree_s,
- uv_signal_s, tree_entry,
- uv__signal_compare)
-
-
-static void uv__signal_global_init(void) {
- if (uv__make_pipe(uv__signal_lock_pipefd, 0))
- abort();
-
- if (uv__signal_unlock())
- abort();
-}
-
-
-void uv__signal_global_once_init(void) {
- pthread_once(&uv__signal_global_init_guard, uv__signal_global_init);
-}
-
-
-
-static int uv__signal_lock(void) {
- int r;
- char data;
-
- do {
- r = read(uv__signal_lock_pipefd[0], &data, sizeof data);
- } while (r < 0 && errno == EINTR);
-
- return (r < 0) ? -1 : 0;
-}
-
-
-static int uv__signal_unlock(void) {
- int r;
- char data = 42;
-
- do {
- r = write(uv__signal_lock_pipefd[1], &data, sizeof data);
- } while (r < 0 && errno == EINTR);
-
- return (r < 0) ? -1 : 0;
-}
-
-
-static void uv__signal_block_and_lock(sigset_t* saved_sigmask) {
- sigset_t new_mask;
-
- if (sigfillset(&new_mask))
- abort();
-
- if (pthread_sigmask(SIG_SETMASK, &new_mask, saved_sigmask))
- abort();
-
- if (uv__signal_lock())
- abort();
-}
-
-
-static void uv__signal_unlock_and_unblock(sigset_t* saved_sigmask) {
- if (uv__signal_unlock())
- abort();
-
- if (pthread_sigmask(SIG_SETMASK, saved_sigmask, NULL))
- abort();
-}
-
-
-static uv_signal_t* uv__signal_first_handle(int signum) {
- /* This function must be called with the signal lock held. */
- uv_signal_t lookup;
- uv_signal_t* handle;
-
- lookup.signum = signum;
- lookup.loop = NULL;
-
- handle = RB_NFIND(uv__signal_tree_s, &uv__signal_tree, &lookup);
-
- if (handle != NULL && handle->signum == signum)
- return handle;
-
- return NULL;
-}
-
-
-static void uv__signal_handler(int signum) {
- uv__signal_msg_t msg;
- uv_signal_t* handle;
- int saved_errno;
-
- saved_errno = errno;
- memset(&msg, 0, sizeof msg);
-
- if (uv__signal_lock()) {
- errno = saved_errno;
- return;
- }
-
- for (handle = uv__signal_first_handle(signum);
- handle != NULL && handle->signum == signum;
- handle = RB_NEXT(uv__signal_tree_s, &uv__signal_tree, handle)) {
- int r;
-
- msg.signum = signum;
- msg.handle = handle;
-
- /* write() should be atomic for small data chunks, so the entire message
- * should be written at once. In theory the pipe could become full, in
- * which case the user is out of luck.
- */
- do {
- r = write(handle->loop->signal_pipefd[1], &msg, sizeof msg);
- } while (r == -1 && errno == EINTR);
-
- assert(r == sizeof msg ||
- (r == -1 && (errno == EAGAIN || errno == EWOULDBLOCK)));
-
- if (r != -1)
- handle->caught_signals++;
- }
-
- uv__signal_unlock();
- errno = saved_errno;
-}
-
-
-static int uv__signal_register_handler(int signum) {
- /* When this function is called, the signal lock must be held. */
- struct sigaction sa;
-
- /* XXX use a separate signal stack? */
- memset(&sa, 0, sizeof(sa));
- if (sigfillset(&sa.sa_mask))
- abort();
- sa.sa_handler = uv__signal_handler;
-
- /* XXX save old action so we can restore it later on? */
- if (sigaction(signum, &sa, NULL))
- return -errno;
-
- return 0;
-}
-
-
-static void uv__signal_unregister_handler(int signum) {
- /* When this function is called, the signal lock must be held. */
- struct sigaction sa;
-
- memset(&sa, 0, sizeof(sa));
- sa.sa_handler = SIG_DFL;
-
- /* sigaction can only fail with EINVAL or EFAULT; an attempt to deregister a
- * signal implies that it was successfully registered earlier, so EINVAL
- * should never happen.
- */
- if (sigaction(signum, &sa, NULL))
- abort();
-}
-
-
-static int uv__signal_loop_once_init(uv_loop_t* loop) {
- int err;
-
- /* Return if already initialized. */
- if (loop->signal_pipefd[0] != -1)
- return 0;
-
- err = uv__make_pipe(loop->signal_pipefd, UV__F_NONBLOCK);
- if (err)
- return err;
-
- uv__io_init(&loop->signal_io_watcher,
- uv__signal_event,
- loop->signal_pipefd[0]);
- uv__io_start(loop, &loop->signal_io_watcher, UV__POLLIN);
-
- return 0;
-}
-
-
-void uv__signal_loop_cleanup(uv_loop_t* loop) {
- QUEUE* q;
-
- /* Stop all the signal watchers that are still attached to this loop. This
- * ensures that the (shared) signal tree doesn't contain any invalid entries
- * entries, and that signal handlers are removed when appropriate.
- * It's safe to use QUEUE_FOREACH here because the handles and the handle
- * queue are not modified by uv__signal_stop().
- */
- QUEUE_FOREACH(q, &loop->handle_queue) {
- uv_handle_t* handle = QUEUE_DATA(q, uv_handle_t, handle_queue);
-
- if (handle->type == UV_SIGNAL)
- uv__signal_stop((uv_signal_t*) handle);
- }
-
- if (loop->signal_pipefd[0] != -1) {
- uv__close(loop->signal_pipefd[0]);
- loop->signal_pipefd[0] = -1;
- }
-
- if (loop->signal_pipefd[1] != -1) {
- uv__close(loop->signal_pipefd[1]);
- loop->signal_pipefd[1] = -1;
- }
-}
-
-
-int uv_signal_init(uv_loop_t* loop, uv_signal_t* handle) {
- int err;
-
- err = uv__signal_loop_once_init(loop);
- if (err)
- return err;
-
- uv__handle_init(loop, (uv_handle_t*) handle, UV_SIGNAL);
- handle->signum = 0;
- handle->caught_signals = 0;
- handle->dispatched_signals = 0;
-
- return 0;
-}
-
-
-void uv__signal_close(uv_signal_t* handle) {
-
- uv__signal_stop(handle);
-
- /* If there are any caught signals "trapped" in the signal pipe, we can't
- * call the close callback yet. Otherwise, add the handle to the finish_close
- * queue.
- */
- if (handle->caught_signals == handle->dispatched_signals) {
- uv__make_close_pending((uv_handle_t*) handle);
- }
-}
-
-
-int uv_signal_start(uv_signal_t* handle, uv_signal_cb signal_cb, int signum) {
- sigset_t saved_sigmask;
- int err;
-
- assert(!(handle->flags & (UV_CLOSING | UV_CLOSED)));
-
- /* If the user supplies signum == 0, then return an error already. If the
- * signum is otherwise invalid then uv__signal_register will find out
- * eventually.
- */
- if (signum == 0)
- return -EINVAL;
-
- /* Short circuit: if the signal watcher is already watching {signum} don't
- * go through the process of deregistering and registering the handler.
- * Additionally, this avoids pending signals getting lost in the small time
- * time frame that handle->signum == 0.
- */
- if (signum == handle->signum) {
- handle->signal_cb = signal_cb;
- return 0;
- }
-
- /* If the signal handler was already active, stop it first. */
- if (handle->signum != 0) {
- uv__signal_stop(handle);
- }
-
- uv__signal_block_and_lock(&saved_sigmask);
-
- /* If at this point there are no active signal watchers for this signum (in
- * any of the loops), it's time to try and register a handler for it here.
- */
- if (uv__signal_first_handle(signum) == NULL) {
- err = uv__signal_register_handler(signum);
- if (err) {
- /* Registering the signal handler failed. Must be an invalid signal. */
- uv__signal_unlock_and_unblock(&saved_sigmask);
- return err;
- }
- }
-
- handle->signum = signum;
- RB_INSERT(uv__signal_tree_s, &uv__signal_tree, handle);
-
- uv__signal_unlock_and_unblock(&saved_sigmask);
-
- handle->signal_cb = signal_cb;
- uv__handle_start(handle);
-
- return 0;
-}
-
-
-static void uv__signal_event(uv_loop_t* loop,
- uv__io_t* w,
- unsigned int events) {
- uv__signal_msg_t* msg;
- uv_signal_t* handle;
- char buf[sizeof(uv__signal_msg_t) * 32];
- size_t bytes, end, i;
- int r;
-
- bytes = 0;
- end = 0;
-
- do {
- r = read(loop->signal_pipefd[0], buf + bytes, sizeof(buf) - bytes);
-
- if (r == -1 && errno == EINTR)
- continue;
-
- if (r == -1 && (errno == EAGAIN || errno == EWOULDBLOCK)) {
- /* If there are bytes in the buffer already (which really is extremely
- * unlikely if possible at all) we can't exit the function here. We'll
- * spin until more bytes are read instead.
- */
- if (bytes > 0)
- continue;
-
- /* Otherwise, there was nothing there. */
- return;
- }
-
- /* Other errors really should never happen. */
- if (r == -1)
- abort();
-
- bytes += r;
-
- /* `end` is rounded down to a multiple of sizeof(uv__signal_msg_t). */
- end = (bytes / sizeof(uv__signal_msg_t)) * sizeof(uv__signal_msg_t);
-
- for (i = 0; i < end; i += sizeof(uv__signal_msg_t)) {
- msg = (uv__signal_msg_t*) (buf + i);
- handle = msg->handle;
-
- if (msg->signum == handle->signum) {
- assert(!(handle->flags & UV_CLOSING));
- handle->signal_cb(handle, handle->signum);
- }
-
- handle->dispatched_signals++;
-
- /* If uv_close was called while there were caught signals that were not
- * yet dispatched, the uv__finish_close was deferred. Make close pending
- * now if this has happened.
- */
- if ((handle->flags & UV_CLOSING) &&
- (handle->caught_signals == handle->dispatched_signals)) {
- uv__make_close_pending((uv_handle_t*) handle);
- }
- }
-
- bytes -= end;
-
- /* If there are any "partial" messages left, move them to the start of the
- * the buffer, and spin. This should not happen.
- */
- if (bytes) {
- memmove(buf, buf + end, bytes);
- continue;
- }
- } while (end == sizeof buf);
-}
-
-
-static int uv__signal_compare(uv_signal_t* w1, uv_signal_t* w2) {
- /* Compare signums first so all watchers with the same signnum end up
- * adjacent.
- */
- if (w1->signum < w2->signum) return -1;
- if (w1->signum > w2->signum) return 1;
-
- /* Sort by loop pointer, so we can easily look up the first item after
- * { .signum = x, .loop = NULL }.
- */
- if (w1->loop < w2->loop) return -1;
- if (w1->loop > w2->loop) return 1;
-
- if (w1 < w2) return -1;
- if (w1 > w2) return 1;
-
- return 0;
-}
-
-
-int uv_signal_stop(uv_signal_t* handle) {
- assert(!(handle->flags & (UV_CLOSING | UV_CLOSED)));
- uv__signal_stop(handle);
- return 0;
-}
-
-
-static void uv__signal_stop(uv_signal_t* handle) {
- uv_signal_t* removed_handle;
- sigset_t saved_sigmask;
-
- /* If the watcher wasn't started, this is a no-op. */
- if (handle->signum == 0)
- return;
-
- uv__signal_block_and_lock(&saved_sigmask);
-
- removed_handle = RB_REMOVE(uv__signal_tree_s, &uv__signal_tree, handle);
- assert(removed_handle == handle);
- (void) removed_handle;
-
- /* Check if there are other active signal watchers observing this signal. If
- * not, unregister the signal handler.
- */
- if (uv__signal_first_handle(handle->signum) == NULL)
- uv__signal_unregister_handler(handle->signum);
-
- uv__signal_unlock_and_unblock(&saved_sigmask);
-
- handle->signum = 0;
- uv__handle_stop(handle);
-}
diff --git a/3rdparty/libuv/src/unix/spinlock.h b/3rdparty/libuv/src/unix/spinlock.h
deleted file mode 100644
index a20c83cc601..00000000000
--- a/3rdparty/libuv/src/unix/spinlock.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Copyright (c) 2013, Ben Noordhuis <info@bnoordhuis.nl>
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifndef UV_SPINLOCK_H_
-#define UV_SPINLOCK_H_
-
-#include "internal.h" /* ACCESS_ONCE, UV_UNUSED */
-#include "atomic-ops.h"
-
-#define UV_SPINLOCK_INITIALIZER { 0 }
-
-typedef struct {
- int lock;
-} uv_spinlock_t;
-
-UV_UNUSED(static void uv_spinlock_init(uv_spinlock_t* spinlock));
-UV_UNUSED(static void uv_spinlock_lock(uv_spinlock_t* spinlock));
-UV_UNUSED(static void uv_spinlock_unlock(uv_spinlock_t* spinlock));
-UV_UNUSED(static int uv_spinlock_trylock(uv_spinlock_t* spinlock));
-
-UV_UNUSED(static void uv_spinlock_init(uv_spinlock_t* spinlock)) {
- ACCESS_ONCE(int, spinlock->lock) = 0;
-}
-
-UV_UNUSED(static void uv_spinlock_lock(uv_spinlock_t* spinlock)) {
- while (!uv_spinlock_trylock(spinlock)) cpu_relax();
-}
-
-UV_UNUSED(static void uv_spinlock_unlock(uv_spinlock_t* spinlock)) {
- ACCESS_ONCE(int, spinlock->lock) = 0;
-}
-
-UV_UNUSED(static int uv_spinlock_trylock(uv_spinlock_t* spinlock)) {
- /* TODO(bnoordhuis) Maybe change to a ticket lock to guarantee fair queueing.
- * Not really critical until we have locks that are (frequently) contended
- * for by several threads.
- */
- return 0 == cmpxchgi(&spinlock->lock, 0, 1);
-}
-
-#endif /* UV_SPINLOCK_H_ */
diff --git a/3rdparty/libuv/src/unix/stream.c b/3rdparty/libuv/src/unix/stream.c
deleted file mode 100644
index 7d7ab2633b6..00000000000
--- a/3rdparty/libuv/src/unix/stream.c
+++ /dev/null
@@ -1,1615 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "internal.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <errno.h>
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/uio.h>
-#include <sys/un.h>
-#include <unistd.h>
-#include <limits.h> /* IOV_MAX */
-
-#if defined(__APPLE__)
-# include <sys/event.h>
-# include <sys/time.h>
-# include <sys/select.h>
-
-/* Forward declaration */
-typedef struct uv__stream_select_s uv__stream_select_t;
-
-struct uv__stream_select_s {
- uv_stream_t* stream;
- uv_thread_t thread;
- uv_sem_t close_sem;
- uv_sem_t async_sem;
- uv_async_t async;
- int events;
- int fake_fd;
- int int_fd;
- int fd;
- fd_set* sread;
- size_t sread_sz;
- fd_set* swrite;
- size_t swrite_sz;
-};
-#endif /* defined(__APPLE__) */
-
-static void uv__stream_connect(uv_stream_t*);
-static void uv__write(uv_stream_t* stream);
-static void uv__read(uv_stream_t* stream);
-static void uv__stream_io(uv_loop_t* loop, uv__io_t* w, unsigned int events);
-static void uv__write_callbacks(uv_stream_t* stream);
-static size_t uv__write_req_size(uv_write_t* req);
-
-
-void uv__stream_init(uv_loop_t* loop,
- uv_stream_t* stream,
- uv_handle_type type) {
- int err;
-
- uv__handle_init(loop, (uv_handle_t*)stream, type);
- stream->read_cb = NULL;
- stream->alloc_cb = NULL;
- stream->close_cb = NULL;
- stream->connection_cb = NULL;
- stream->connect_req = NULL;
- stream->shutdown_req = NULL;
- stream->accepted_fd = -1;
- stream->queued_fds = NULL;
- stream->delayed_error = 0;
- QUEUE_INIT(&stream->write_queue);
- QUEUE_INIT(&stream->write_completed_queue);
- stream->write_queue_size = 0;
-
- if (loop->emfile_fd == -1) {
- err = uv__open_cloexec("/dev/null", O_RDONLY);
- if (err < 0)
- /* In the rare case that "/dev/null" isn't mounted open "/"
- * instead.
- */
- err = uv__open_cloexec("/", O_RDONLY);
- if (err >= 0)
- loop->emfile_fd = err;
- }
-
-#if defined(__APPLE__)
- stream->select = NULL;
-#endif /* defined(__APPLE_) */
-
- uv__io_init(&stream->io_watcher, uv__stream_io, -1);
-}
-
-
-static void uv__stream_osx_interrupt_select(uv_stream_t* stream) {
-#if defined(__APPLE__)
- /* Notify select() thread about state change */
- uv__stream_select_t* s;
- int r;
-
- s = stream->select;
- if (s == NULL)
- return;
-
- /* Interrupt select() loop
- * NOTE: fake_fd and int_fd are socketpair(), thus writing to one will
- * emit read event on other side
- */
- do
- r = write(s->fake_fd, "x", 1);
- while (r == -1 && errno == EINTR);
-
- assert(r == 1);
-#else /* !defined(__APPLE__) */
- /* No-op on any other platform */
-#endif /* !defined(__APPLE__) */
-}
-
-
-#if defined(__APPLE__)
-static void uv__stream_osx_select(void* arg) {
- uv_stream_t* stream;
- uv__stream_select_t* s;
- char buf[1024];
- int events;
- int fd;
- int r;
- int max_fd;
-
- stream = arg;
- s = stream->select;
- fd = s->fd;
-
- if (fd > s->int_fd)
- max_fd = fd;
- else
- max_fd = s->int_fd;
-
- while (1) {
- /* Terminate on semaphore */
- if (uv_sem_trywait(&s->close_sem) == 0)
- break;
-
- /* Watch fd using select(2) */
- memset(s->sread, 0, s->sread_sz);
- memset(s->swrite, 0, s->swrite_sz);
-
- if (uv__io_active(&stream->io_watcher, UV__POLLIN))
- FD_SET(fd, s->sread);
- if (uv__io_active(&stream->io_watcher, UV__POLLOUT))
- FD_SET(fd, s->swrite);
- FD_SET(s->int_fd, s->sread);
-
- /* Wait indefinitely for fd events */
- r = select(max_fd + 1, s->sread, s->swrite, NULL, NULL);
- if (r == -1) {
- if (errno == EINTR)
- continue;
-
- /* XXX: Possible?! */
- abort();
- }
-
- /* Ignore timeouts */
- if (r == 0)
- continue;
-
- /* Empty socketpair's buffer in case of interruption */
- if (FD_ISSET(s->int_fd, s->sread))
- while (1) {
- r = read(s->int_fd, buf, sizeof(buf));
-
- if (r == sizeof(buf))
- continue;
-
- if (r != -1)
- break;
-
- if (errno == EAGAIN || errno == EWOULDBLOCK)
- break;
-
- if (errno == EINTR)
- continue;
-
- abort();
- }
-
- /* Handle events */
- events = 0;
- if (FD_ISSET(fd, s->sread))
- events |= UV__POLLIN;
- if (FD_ISSET(fd, s->swrite))
- events |= UV__POLLOUT;
-
- assert(events != 0 || FD_ISSET(s->int_fd, s->sread));
- if (events != 0) {
- ACCESS_ONCE(int, s->events) = events;
-
- uv_async_send(&s->async);
- uv_sem_wait(&s->async_sem);
-
- /* Should be processed at this stage */
- assert((s->events == 0) || (stream->flags & UV_CLOSING));
- }
- }
-}
-
-
-static void uv__stream_osx_select_cb(uv_async_t* handle) {
- uv__stream_select_t* s;
- uv_stream_t* stream;
- int events;
-
- s = container_of(handle, uv__stream_select_t, async);
- stream = s->stream;
-
- /* Get and reset stream's events */
- events = s->events;
- ACCESS_ONCE(int, s->events) = 0;
-
- assert(events != 0);
- assert(events == (events & (UV__POLLIN | UV__POLLOUT)));
-
- /* Invoke callback on event-loop */
- if ((events & UV__POLLIN) && uv__io_active(&stream->io_watcher, UV__POLLIN))
- uv__stream_io(stream->loop, &stream->io_watcher, UV__POLLIN);
-
- if ((events & UV__POLLOUT) && uv__io_active(&stream->io_watcher, UV__POLLOUT))
- uv__stream_io(stream->loop, &stream->io_watcher, UV__POLLOUT);
-
- if (stream->flags & UV_CLOSING)
- return;
-
- /* NOTE: It is important to do it here, otherwise `select()` might be called
- * before the actual `uv__read()`, leading to the blocking syscall
- */
- uv_sem_post(&s->async_sem);
-}
-
-
-static void uv__stream_osx_cb_close(uv_handle_t* async) {
- uv__stream_select_t* s;
-
- s = container_of(async, uv__stream_select_t, async);
- uv__free(s);
-}
-
-
-int uv__stream_try_select(uv_stream_t* stream, int* fd) {
- /*
- * kqueue doesn't work with some files from /dev mount on osx.
- * select(2) in separate thread for those fds
- */
-
- struct kevent filter[1];
- struct kevent events[1];
- struct timespec timeout;
- uv__stream_select_t* s;
- int fds[2];
- int err;
- int ret;
- int kq;
- int old_fd;
- int max_fd;
- size_t sread_sz;
- size_t swrite_sz;
-
- kq = kqueue();
- if (kq == -1) {
- perror("(libuv) kqueue()");
- return -errno;
- }
-
- EV_SET(&filter[0], *fd, EVFILT_READ, EV_ADD | EV_ENABLE, 0, 0, 0);
-
- /* Use small timeout, because we only want to capture EINVALs */
- timeout.tv_sec = 0;
- timeout.tv_nsec = 1;
-
- ret = kevent(kq, filter, 1, events, 1, &timeout);
- uv__close(kq);
-
- if (ret == -1)
- return -errno;
-
- if (ret == 0 || (events[0].flags & EV_ERROR) == 0 || events[0].data != EINVAL)
- return 0;
-
- /* At this point we definitely know that this fd won't work with kqueue */
-
- /*
- * Create fds for io watcher and to interrupt the select() loop.
- * NOTE: do it ahead of malloc below to allocate enough space for fd_sets
- */
- if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds))
- return -errno;
-
- max_fd = *fd;
- if (fds[1] > max_fd)
- max_fd = fds[1];
-
- sread_sz = ROUND_UP(max_fd + 1, sizeof(uint32_t) * NBBY) / NBBY;
- swrite_sz = sread_sz;
-
- s = uv__malloc(sizeof(*s) + sread_sz + swrite_sz);
- if (s == NULL) {
- err = -ENOMEM;
- goto failed_malloc;
- }
-
- s->events = 0;
- s->fd = *fd;
- s->sread = (fd_set*) ((char*) s + sizeof(*s));
- s->sread_sz = sread_sz;
- s->swrite = (fd_set*) ((char*) s->sread + sread_sz);
- s->swrite_sz = swrite_sz;
-
- err = uv_async_init(stream->loop, &s->async, uv__stream_osx_select_cb);
- if (err)
- goto failed_async_init;
-
- s->async.flags |= UV__HANDLE_INTERNAL;
- uv__handle_unref(&s->async);
-
- err = uv_sem_init(&s->close_sem, 0);
- if (err != 0)
- goto failed_close_sem_init;
-
- err = uv_sem_init(&s->async_sem, 0);
- if (err != 0)
- goto failed_async_sem_init;
-
- s->fake_fd = fds[0];
- s->int_fd = fds[1];
-
- old_fd = *fd;
- s->stream = stream;
- stream->select = s;
- *fd = s->fake_fd;
-
- err = uv_thread_create(&s->thread, uv__stream_osx_select, stream);
- if (err != 0)
- goto failed_thread_create;
-
- return 0;
-
-failed_thread_create:
- s->stream = NULL;
- stream->select = NULL;
- *fd = old_fd;
-
- uv_sem_destroy(&s->async_sem);
-
-failed_async_sem_init:
- uv_sem_destroy(&s->close_sem);
-
-failed_close_sem_init:
- uv__close(fds[0]);
- uv__close(fds[1]);
- uv_close((uv_handle_t*) &s->async, uv__stream_osx_cb_close);
- return err;
-
-failed_async_init:
- uv__free(s);
-
-failed_malloc:
- uv__close(fds[0]);
- uv__close(fds[1]);
-
- return err;
-}
-#endif /* defined(__APPLE__) */
-
-
-int uv__stream_open(uv_stream_t* stream, int fd, int flags) {
-#if defined(__APPLE__)
- int enable;
-#endif
-
- if (!(stream->io_watcher.fd == -1 || stream->io_watcher.fd == fd))
- return -EBUSY;
-
- assert(fd >= 0);
- stream->flags |= flags;
-
- if (stream->type == UV_TCP) {
- if ((stream->flags & UV_TCP_NODELAY) && uv__tcp_nodelay(fd, 1))
- return -errno;
-
- /* TODO Use delay the user passed in. */
- if ((stream->flags & UV_TCP_KEEPALIVE) && uv__tcp_keepalive(fd, 1, 60))
- return -errno;
- }
-
-#if defined(__APPLE__)
- enable = 1;
- if (setsockopt(fd, SOL_SOCKET, SO_OOBINLINE, &enable, sizeof(enable)) &&
- errno != ENOTSOCK &&
- errno != EINVAL) {
- return -errno;
- }
-#endif
-
- stream->io_watcher.fd = fd;
-
- return 0;
-}
-
-
-void uv__stream_flush_write_queue(uv_stream_t* stream, int error) {
- uv_write_t* req;
- QUEUE* q;
- while (!QUEUE_EMPTY(&stream->write_queue)) {
- q = QUEUE_HEAD(&stream->write_queue);
- QUEUE_REMOVE(q);
-
- req = QUEUE_DATA(q, uv_write_t, queue);
- req->error = error;
-
- QUEUE_INSERT_TAIL(&stream->write_completed_queue, &req->queue);
- }
-}
-
-
-void uv__stream_destroy(uv_stream_t* stream) {
- assert(!uv__io_active(&stream->io_watcher, UV__POLLIN | UV__POLLOUT));
- assert(stream->flags & UV_CLOSED);
-
- if (stream->connect_req) {
- uv__req_unregister(stream->loop, stream->connect_req);
- stream->connect_req->cb(stream->connect_req, -ECANCELED);
- stream->connect_req = NULL;
- }
-
- uv__stream_flush_write_queue(stream, -ECANCELED);
- uv__write_callbacks(stream);
-
- if (stream->shutdown_req) {
- /* The ECANCELED error code is a lie, the shutdown(2) syscall is a
- * fait accompli at this point. Maybe we should revisit this in v0.11.
- * A possible reason for leaving it unchanged is that it informs the
- * callee that the handle has been destroyed.
- */
- uv__req_unregister(stream->loop, stream->shutdown_req);
- stream->shutdown_req->cb(stream->shutdown_req, -ECANCELED);
- stream->shutdown_req = NULL;
- }
-
- assert(stream->write_queue_size == 0);
-}
-
-
-/* Implements a best effort approach to mitigating accept() EMFILE errors.
- * We have a spare file descriptor stashed away that we close to get below
- * the EMFILE limit. Next, we accept all pending connections and close them
- * immediately to signal the clients that we're overloaded - and we are, but
- * we still keep on trucking.
- *
- * There is one caveat: it's not reliable in a multi-threaded environment.
- * The file descriptor limit is per process. Our party trick fails if another
- * thread opens a file or creates a socket in the time window between us
- * calling close() and accept().
- */
-static int uv__emfile_trick(uv_loop_t* loop, int accept_fd) {
- int err;
- int emfile_fd;
-
- if (loop->emfile_fd == -1)
- return -EMFILE;
-
- uv__close(loop->emfile_fd);
- loop->emfile_fd = -1;
-
- do {
- err = uv__accept(accept_fd);
- if (err >= 0)
- uv__close(err);
- } while (err >= 0 || err == -EINTR);
-
- emfile_fd = uv__open_cloexec("/", O_RDONLY);
- if (emfile_fd >= 0)
- loop->emfile_fd = emfile_fd;
-
- return err;
-}
-
-
-#if defined(UV_HAVE_KQUEUE)
-# define UV_DEC_BACKLOG(w) w->rcount--;
-#else
-# define UV_DEC_BACKLOG(w) /* no-op */
-#endif /* defined(UV_HAVE_KQUEUE) */
-
-
-void uv__server_io(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
- uv_stream_t* stream;
- int err;
-
- stream = container_of(w, uv_stream_t, io_watcher);
- assert(events == UV__POLLIN);
- assert(stream->accepted_fd == -1);
- assert(!(stream->flags & UV_CLOSING));
-
- uv__io_start(stream->loop, &stream->io_watcher, UV__POLLIN);
-
- /* connection_cb can close the server socket while we're
- * in the loop so check it on each iteration.
- */
- while (uv__stream_fd(stream) != -1) {
- assert(stream->accepted_fd == -1);
-
-#if defined(UV_HAVE_KQUEUE)
- if (w->rcount <= 0)
- return;
-#endif /* defined(UV_HAVE_KQUEUE) */
-
- err = uv__accept(uv__stream_fd(stream));
- if (err < 0) {
- if (err == -EAGAIN || err == -EWOULDBLOCK)
- return; /* Not an error. */
-
- if (err == -ECONNABORTED)
- continue; /* Ignore. Nothing we can do about that. */
-
- if (err == -EMFILE || err == -ENFILE) {
- err = uv__emfile_trick(loop, uv__stream_fd(stream));
- if (err == -EAGAIN || err == -EWOULDBLOCK)
- break;
- }
-
- stream->connection_cb(stream, err);
- continue;
- }
-
- UV_DEC_BACKLOG(w)
- stream->accepted_fd = err;
- stream->connection_cb(stream, 0);
-
- if (stream->accepted_fd != -1) {
- /* The user hasn't yet accepted called uv_accept() */
- uv__io_stop(loop, &stream->io_watcher, UV__POLLIN);
- return;
- }
-
- if (stream->type == UV_TCP && (stream->flags & UV_TCP_SINGLE_ACCEPT)) {
- /* Give other processes a chance to accept connections. */
- struct timespec timeout = { 0, 1 };
- nanosleep(&timeout, NULL);
- }
- }
-}
-
-
-#undef UV_DEC_BACKLOG
-
-
-int uv_accept(uv_stream_t* server, uv_stream_t* client) {
- int err;
-
- /* TODO document this */
- assert(server->loop == client->loop);
-
- if (server->accepted_fd == -1)
- return -EAGAIN;
-
- switch (client->type) {
- case UV_NAMED_PIPE:
- case UV_TCP:
- err = uv__stream_open(client,
- server->accepted_fd,
- UV_STREAM_READABLE | UV_STREAM_WRITABLE);
- if (err) {
- /* TODO handle error */
- uv__close(server->accepted_fd);
- goto done;
- }
- break;
-
- case UV_UDP:
- err = uv_udp_open((uv_udp_t*) client, server->accepted_fd);
- if (err) {
- uv__close(server->accepted_fd);
- goto done;
- }
- break;
-
- default:
- return -EINVAL;
- }
-
-done:
- /* Process queued fds */
- if (server->queued_fds != NULL) {
- uv__stream_queued_fds_t* queued_fds;
-
- queued_fds = server->queued_fds;
-
- /* Read first */
- server->accepted_fd = queued_fds->fds[0];
-
- /* All read, free */
- assert(queued_fds->offset > 0);
- if (--queued_fds->offset == 0) {
- uv__free(queued_fds);
- server->queued_fds = NULL;
- } else {
- /* Shift rest */
- memmove(queued_fds->fds,
- queued_fds->fds + 1,
- queued_fds->offset * sizeof(*queued_fds->fds));
- }
- } else {
- server->accepted_fd = -1;
- if (err == 0)
- uv__io_start(server->loop, &server->io_watcher, UV__POLLIN);
- }
- return err;
-}
-
-
-int uv_listen(uv_stream_t* stream, int backlog, uv_connection_cb cb) {
- int err;
-
- switch (stream->type) {
- case UV_TCP:
- err = uv_tcp_listen((uv_tcp_t*)stream, backlog, cb);
- break;
-
- case UV_NAMED_PIPE:
- err = uv_pipe_listen((uv_pipe_t*)stream, backlog, cb);
- break;
-
- default:
- err = -EINVAL;
- }
-
- if (err == 0)
- uv__handle_start(stream);
-
- return err;
-}
-
-
-static void uv__drain(uv_stream_t* stream) {
- uv_shutdown_t* req;
- int err;
-
- assert(QUEUE_EMPTY(&stream->write_queue));
- uv__io_stop(stream->loop, &stream->io_watcher, UV__POLLOUT);
- uv__stream_osx_interrupt_select(stream);
-
- /* Shutdown? */
- if ((stream->flags & UV_STREAM_SHUTTING) &&
- !(stream->flags & UV_CLOSING) &&
- !(stream->flags & UV_STREAM_SHUT)) {
- assert(stream->shutdown_req);
-
- req = stream->shutdown_req;
- stream->shutdown_req = NULL;
- stream->flags &= ~UV_STREAM_SHUTTING;
- uv__req_unregister(stream->loop, req);
-
- err = 0;
- if (shutdown(uv__stream_fd(stream), SHUT_WR))
- err = -errno;
-
- if (err == 0)
- stream->flags |= UV_STREAM_SHUT;
-
- if (req->cb != NULL)
- req->cb(req, err);
- }
-}
-
-
-static size_t uv__write_req_size(uv_write_t* req) {
- size_t size;
-
- assert(req->bufs != NULL);
- size = uv__count_bufs(req->bufs + req->write_index,
- req->nbufs - req->write_index);
- assert(req->handle->write_queue_size >= size);
-
- return size;
-}
-
-
-static void uv__write_req_finish(uv_write_t* req) {
- uv_stream_t* stream = req->handle;
-
- /* Pop the req off tcp->write_queue. */
- QUEUE_REMOVE(&req->queue);
-
- /* Only free when there was no error. On error, we touch up write_queue_size
- * right before making the callback. The reason we don't do that right away
- * is that a write_queue_size > 0 is our only way to signal to the user that
- * they should stop writing - which they should if we got an error. Something
- * to revisit in future revisions of the libuv API.
- */
- if (req->error == 0) {
- if (req->bufs != req->bufsml)
- uv__free(req->bufs);
- req->bufs = NULL;
- }
-
- /* Add it to the write_completed_queue where it will have its
- * callback called in the near future.
- */
- QUEUE_INSERT_TAIL(&stream->write_completed_queue, &req->queue);
- uv__io_feed(stream->loop, &stream->io_watcher);
-}
-
-
-static int uv__handle_fd(uv_handle_t* handle) {
- switch (handle->type) {
- case UV_NAMED_PIPE:
- case UV_TCP:
- return ((uv_stream_t*) handle)->io_watcher.fd;
-
- case UV_UDP:
- return ((uv_udp_t*) handle)->io_watcher.fd;
-
- default:
- return -1;
- }
-}
-
-static void uv__write(uv_stream_t* stream) {
- struct iovec* iov;
- QUEUE* q;
- uv_write_t* req;
- int iovmax;
- int iovcnt;
- ssize_t n;
-
-start:
-
- assert(uv__stream_fd(stream) >= 0);
-
- if (QUEUE_EMPTY(&stream->write_queue))
- return;
-
- q = QUEUE_HEAD(&stream->write_queue);
- req = QUEUE_DATA(q, uv_write_t, queue);
- assert(req->handle == stream);
-
- /*
- * Cast to iovec. We had to have our own uv_buf_t instead of iovec
- * because Windows's WSABUF is not an iovec.
- */
- assert(sizeof(uv_buf_t) == sizeof(struct iovec));
- iov = (struct iovec*) &(req->bufs[req->write_index]);
- iovcnt = req->nbufs - req->write_index;
-
- iovmax = uv__getiovmax();
-
- /* Limit iov count to avoid EINVALs from writev() */
- if (iovcnt > iovmax)
- iovcnt = iovmax;
-
- /*
- * Now do the actual writev. Note that we've been updating the pointers
- * inside the iov each time we write. So there is no need to offset it.
- */
-
- if (req->send_handle) {
- struct msghdr msg;
- struct cmsghdr *cmsg;
- int fd_to_send = uv__handle_fd((uv_handle_t*) req->send_handle);
- char scratch[64] = {0};
-
- assert(fd_to_send >= 0);
-
- msg.msg_name = NULL;
- msg.msg_namelen = 0;
- msg.msg_iov = iov;
- msg.msg_iovlen = iovcnt;
- msg.msg_flags = 0;
-
- msg.msg_control = (void*) scratch;
- msg.msg_controllen = CMSG_SPACE(sizeof(fd_to_send));
-
- cmsg = CMSG_FIRSTHDR(&msg);
- cmsg->cmsg_level = SOL_SOCKET;
- cmsg->cmsg_type = SCM_RIGHTS;
- cmsg->cmsg_len = CMSG_LEN(sizeof(fd_to_send));
-
- /* silence aliasing warning */
- {
- void* pv = CMSG_DATA(cmsg);
- int* pi = pv;
- *pi = fd_to_send;
- }
-
- do {
- n = sendmsg(uv__stream_fd(stream), &msg, 0);
- }
-#if defined(__APPLE__)
- /*
- * Due to a possible kernel bug at least in OS X 10.10 "Yosemite",
- * EPROTOTYPE can be returned while trying to write to a socket that is
- * shutting down. If we retry the write, we should get the expected EPIPE
- * instead.
- */
- while (n == -1 && (errno == EINTR || errno == EPROTOTYPE));
-#else
- while (n == -1 && errno == EINTR);
-#endif
- } else {
- do {
- if (iovcnt == 1) {
- n = write(uv__stream_fd(stream), iov[0].iov_base, iov[0].iov_len);
- } else {
- n = writev(uv__stream_fd(stream), iov, iovcnt);
- }
- }
-#if defined(__APPLE__)
- /*
- * Due to a possible kernel bug at least in OS X 10.10 "Yosemite",
- * EPROTOTYPE can be returned while trying to write to a socket that is
- * shutting down. If we retry the write, we should get the expected EPIPE
- * instead.
- */
- while (n == -1 && (errno == EINTR || errno == EPROTOTYPE));
-#else
- while (n == -1 && errno == EINTR);
-#endif
- }
-
- if (n < 0) {
- if (errno != EAGAIN && errno != EWOULDBLOCK) {
- /* Error */
- req->error = -errno;
- uv__write_req_finish(req);
- uv__io_stop(stream->loop, &stream->io_watcher, UV__POLLOUT);
- if (!uv__io_active(&stream->io_watcher, UV__POLLIN))
- uv__handle_stop(stream);
- uv__stream_osx_interrupt_select(stream);
- return;
- } else if (stream->flags & UV_STREAM_BLOCKING) {
- /* If this is a blocking stream, try again. */
- goto start;
- }
- } else {
- /* Successful write */
-
- while (n >= 0) {
- uv_buf_t* buf = &(req->bufs[req->write_index]);
- size_t len = buf->len;
-
- assert(req->write_index < req->nbufs);
-
- if ((size_t)n < len) {
- buf->base += n;
- buf->len -= n;
- stream->write_queue_size -= n;
- n = 0;
-
- /* There is more to write. */
- if (stream->flags & UV_STREAM_BLOCKING) {
- /*
- * If we're blocking then we should not be enabling the write
- * watcher - instead we need to try again.
- */
- goto start;
- } else {
- /* Break loop and ensure the watcher is pending. */
- break;
- }
-
- } else {
- /* Finished writing the buf at index req->write_index. */
- req->write_index++;
-
- assert((size_t)n >= len);
- n -= len;
-
- assert(stream->write_queue_size >= len);
- stream->write_queue_size -= len;
-
- if (req->write_index == req->nbufs) {
- /* Then we're done! */
- assert(n == 0);
- uv__write_req_finish(req);
- /* TODO: start trying to write the next request. */
- return;
- }
- }
- }
- }
-
- /* Either we've counted n down to zero or we've got EAGAIN. */
- assert(n == 0 || n == -1);
-
- /* Only non-blocking streams should use the write_watcher. */
- assert(!(stream->flags & UV_STREAM_BLOCKING));
-
- /* We're not done. */
- uv__io_start(stream->loop, &stream->io_watcher, UV__POLLOUT);
-
- /* Notify select() thread about state change */
- uv__stream_osx_interrupt_select(stream);
-}
-
-
-static void uv__write_callbacks(uv_stream_t* stream) {
- uv_write_t* req;
- QUEUE* q;
-
- while (!QUEUE_EMPTY(&stream->write_completed_queue)) {
- /* Pop a req off write_completed_queue. */
- q = QUEUE_HEAD(&stream->write_completed_queue);
- req = QUEUE_DATA(q, uv_write_t, queue);
- QUEUE_REMOVE(q);
- uv__req_unregister(stream->loop, req);
-
- if (req->bufs != NULL) {
- stream->write_queue_size -= uv__write_req_size(req);
- if (req->bufs != req->bufsml)
- uv__free(req->bufs);
- req->bufs = NULL;
- }
-
- /* NOTE: call callback AFTER freeing the request data. */
- if (req->cb)
- req->cb(req, req->error);
- }
-
- assert(QUEUE_EMPTY(&stream->write_completed_queue));
-}
-
-
-uv_handle_type uv__handle_type(int fd) {
- struct sockaddr_storage ss;
- socklen_t len;
- int type;
-
- memset(&ss, 0, sizeof(ss));
- len = sizeof(ss);
-
- if (getsockname(fd, (struct sockaddr*)&ss, &len))
- return UV_UNKNOWN_HANDLE;
-
- len = sizeof type;
-
- if (getsockopt(fd, SOL_SOCKET, SO_TYPE, &type, &len))
- return UV_UNKNOWN_HANDLE;
-
- if (type == SOCK_STREAM) {
- switch (ss.ss_family) {
- case AF_UNIX:
- return UV_NAMED_PIPE;
- case AF_INET:
- case AF_INET6:
- return UV_TCP;
- }
- }
-
- if (type == SOCK_DGRAM &&
- (ss.ss_family == AF_INET || ss.ss_family == AF_INET6))
- return UV_UDP;
-
- return UV_UNKNOWN_HANDLE;
-}
-
-
-static void uv__stream_eof(uv_stream_t* stream, const uv_buf_t* buf) {
- stream->flags |= UV_STREAM_READ_EOF;
- uv__io_stop(stream->loop, &stream->io_watcher, UV__POLLIN);
- if (!uv__io_active(&stream->io_watcher, UV__POLLOUT))
- uv__handle_stop(stream);
- uv__stream_osx_interrupt_select(stream);
- stream->read_cb(stream, UV_EOF, buf);
- stream->flags &= ~UV_STREAM_READING;
-}
-
-
-static int uv__stream_queue_fd(uv_stream_t* stream, int fd) {
- uv__stream_queued_fds_t* queued_fds;
- unsigned int queue_size;
-
- queued_fds = stream->queued_fds;
- if (queued_fds == NULL) {
- queue_size = 8;
- queued_fds = uv__malloc((queue_size - 1) * sizeof(*queued_fds->fds) +
- sizeof(*queued_fds));
- if (queued_fds == NULL)
- return -ENOMEM;
- queued_fds->size = queue_size;
- queued_fds->offset = 0;
- stream->queued_fds = queued_fds;
-
- /* Grow */
- } else if (queued_fds->size == queued_fds->offset) {
- queue_size = queued_fds->size + 8;
- queued_fds = uv__realloc(queued_fds,
- (queue_size - 1) * sizeof(*queued_fds->fds) +
- sizeof(*queued_fds));
-
- /*
- * Allocation failure, report back.
- * NOTE: if it is fatal - sockets will be closed in uv__stream_close
- */
- if (queued_fds == NULL)
- return -ENOMEM;
- queued_fds->size = queue_size;
- stream->queued_fds = queued_fds;
- }
-
- /* Put fd in a queue */
- queued_fds->fds[queued_fds->offset++] = fd;
-
- return 0;
-}
-
-
-#define UV__CMSG_FD_COUNT 64
-#define UV__CMSG_FD_SIZE (UV__CMSG_FD_COUNT * sizeof(int))
-
-
-static int uv__stream_recv_cmsg(uv_stream_t* stream, struct msghdr* msg) {
- struct cmsghdr* cmsg;
-
- for (cmsg = CMSG_FIRSTHDR(msg); cmsg != NULL; cmsg = CMSG_NXTHDR(msg, cmsg)) {
- char* start;
- char* end;
- int err;
- void* pv;
- int* pi;
- unsigned int i;
- unsigned int count;
-
- if (cmsg->cmsg_type != SCM_RIGHTS) {
- fprintf(stderr, "ignoring non-SCM_RIGHTS ancillary data: %d\n",
- cmsg->cmsg_type);
- continue;
- }
-
- /* silence aliasing warning */
- pv = CMSG_DATA(cmsg);
- pi = pv;
-
- /* Count available fds */
- start = (char*) cmsg;
- end = (char*) cmsg + cmsg->cmsg_len;
- count = 0;
- while (start + CMSG_LEN(count * sizeof(*pi)) < end)
- count++;
- assert(start + CMSG_LEN(count * sizeof(*pi)) == end);
-
- for (i = 0; i < count; i++) {
- /* Already has accepted fd, queue now */
- if (stream->accepted_fd != -1) {
- err = uv__stream_queue_fd(stream, pi[i]);
- if (err != 0) {
- /* Close rest */
- for (; i < count; i++)
- uv__close(pi[i]);
- return err;
- }
- } else {
- stream->accepted_fd = pi[i];
- }
- }
- }
-
- return 0;
-}
-
-
-static void uv__read(uv_stream_t* stream) {
- uv_buf_t buf;
- ssize_t nread;
- struct msghdr msg;
- char cmsg_space[CMSG_SPACE(UV__CMSG_FD_SIZE)];
- int count;
- int err;
- int is_ipc;
-
- stream->flags &= ~UV_STREAM_READ_PARTIAL;
-
- /* Prevent loop starvation when the data comes in as fast as (or faster than)
- * we can read it. XXX Need to rearm fd if we switch to edge-triggered I/O.
- */
- count = 32;
-
- is_ipc = stream->type == UV_NAMED_PIPE && ((uv_pipe_t*) stream)->ipc;
-
- /* XXX: Maybe instead of having UV_STREAM_READING we just test if
- * tcp->read_cb is NULL or not?
- */
- while (stream->read_cb
- && (stream->flags & UV_STREAM_READING)
- && (count-- > 0)) {
- assert(stream->alloc_cb != NULL);
-
- stream->alloc_cb((uv_handle_t*)stream, 64 * 1024, &buf);
- if (buf.len == 0) {
- /* User indicates it can't or won't handle the read. */
- stream->read_cb(stream, UV_ENOBUFS, &buf);
- return;
- }
-
- assert(buf.base != NULL);
- assert(uv__stream_fd(stream) >= 0);
-
- if (!is_ipc) {
- do {
- nread = read(uv__stream_fd(stream), buf.base, buf.len);
- }
- while (nread < 0 && errno == EINTR);
- } else {
- /* ipc uses recvmsg */
- msg.msg_flags = 0;
- msg.msg_iov = (struct iovec*) &buf;
- msg.msg_iovlen = 1;
- msg.msg_name = NULL;
- msg.msg_namelen = 0;
- /* Set up to receive a descriptor even if one isn't in the message */
- msg.msg_controllen = sizeof(cmsg_space);
- msg.msg_control = cmsg_space;
-
- do {
- nread = uv__recvmsg(uv__stream_fd(stream), &msg, 0);
- }
- while (nread < 0 && errno == EINTR);
- }
-
- if (nread < 0) {
- /* Error */
- if (errno == EAGAIN || errno == EWOULDBLOCK) {
- /* Wait for the next one. */
- if (stream->flags & UV_STREAM_READING) {
- uv__io_start(stream->loop, &stream->io_watcher, UV__POLLIN);
- uv__stream_osx_interrupt_select(stream);
- }
- stream->read_cb(stream, 0, &buf);
- } else {
- /* Error. User should call uv_close(). */
- stream->read_cb(stream, -errno, &buf);
- if (stream->flags & UV_STREAM_READING) {
- stream->flags &= ~UV_STREAM_READING;
- uv__io_stop(stream->loop, &stream->io_watcher, UV__POLLIN);
- if (!uv__io_active(&stream->io_watcher, UV__POLLOUT))
- uv__handle_stop(stream);
- uv__stream_osx_interrupt_select(stream);
- }
- }
- return;
- } else if (nread == 0) {
- uv__stream_eof(stream, &buf);
- return;
- } else {
- /* Successful read */
- ssize_t buflen = buf.len;
-
- if (is_ipc) {
- err = uv__stream_recv_cmsg(stream, &msg);
- if (err != 0) {
- stream->read_cb(stream, err, &buf);
- return;
- }
- }
- stream->read_cb(stream, nread, &buf);
-
- /* Return if we didn't fill the buffer, there is no more data to read. */
- if (nread < buflen) {
- stream->flags |= UV_STREAM_READ_PARTIAL;
- return;
- }
- }
- }
-}
-
-
-#undef UV__CMSG_FD_COUNT
-#undef UV__CMSG_FD_SIZE
-
-
-int uv_shutdown(uv_shutdown_t* req, uv_stream_t* stream, uv_shutdown_cb cb) {
- assert((stream->type == UV_TCP || stream->type == UV_NAMED_PIPE) &&
- "uv_shutdown (unix) only supports uv_handle_t right now");
-
- if (!(stream->flags & UV_STREAM_WRITABLE) ||
- stream->flags & UV_STREAM_SHUT ||
- stream->flags & UV_STREAM_SHUTTING ||
- stream->flags & UV_CLOSED ||
- stream->flags & UV_CLOSING) {
- return -ENOTCONN;
- }
-
- assert(uv__stream_fd(stream) >= 0);
-
- /* Initialize request */
- uv__req_init(stream->loop, req, UV_SHUTDOWN);
- req->handle = stream;
- req->cb = cb;
- stream->shutdown_req = req;
- stream->flags |= UV_STREAM_SHUTTING;
-
- uv__io_start(stream->loop, &stream->io_watcher, UV__POLLOUT);
- uv__stream_osx_interrupt_select(stream);
-
- return 0;
-}
-
-
-static void uv__stream_io(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
- uv_stream_t* stream;
-
- stream = container_of(w, uv_stream_t, io_watcher);
-
- assert(stream->type == UV_TCP ||
- stream->type == UV_NAMED_PIPE ||
- stream->type == UV_TTY);
- assert(!(stream->flags & UV_CLOSING));
-
- if (stream->connect_req) {
- uv__stream_connect(stream);
- return;
- }
-
- assert(uv__stream_fd(stream) >= 0);
-
- /* Ignore POLLHUP here. Even it it's set, there may still be data to read. */
- if (events & (UV__POLLIN | UV__POLLERR | UV__POLLHUP))
- uv__read(stream);
-
- if (uv__stream_fd(stream) == -1)
- return; /* read_cb closed stream. */
-
- /* Short-circuit iff POLLHUP is set, the user is still interested in read
- * events and uv__read() reported a partial read but not EOF. If the EOF
- * flag is set, uv__read() called read_cb with err=UV_EOF and we don't
- * have to do anything. If the partial read flag is not set, we can't
- * report the EOF yet because there is still data to read.
- */
- if ((events & UV__POLLHUP) &&
- (stream->flags & UV_STREAM_READING) &&
- (stream->flags & UV_STREAM_READ_PARTIAL) &&
- !(stream->flags & UV_STREAM_READ_EOF)) {
- uv_buf_t buf = { NULL, 0 };
- uv__stream_eof(stream, &buf);
- }
-
- if (uv__stream_fd(stream) == -1)
- return; /* read_cb closed stream. */
-
- if (events & (UV__POLLOUT | UV__POLLERR | UV__POLLHUP)) {
- uv__write(stream);
- uv__write_callbacks(stream);
-
- /* Write queue drained. */
- if (QUEUE_EMPTY(&stream->write_queue))
- uv__drain(stream);
- }
-}
-
-
-/**
- * We get called here from directly following a call to connect(2).
- * In order to determine if we've errored out or succeeded must call
- * getsockopt.
- */
-static void uv__stream_connect(uv_stream_t* stream) {
- int error;
- uv_connect_t* req = stream->connect_req;
- socklen_t errorsize = sizeof(int);
-
- assert(stream->type == UV_TCP || stream->type == UV_NAMED_PIPE);
- assert(req);
-
- if (stream->delayed_error) {
- /* To smooth over the differences between unixes errors that
- * were reported synchronously on the first connect can be delayed
- * until the next tick--which is now.
- */
- error = stream->delayed_error;
- stream->delayed_error = 0;
- } else {
- /* Normal situation: we need to get the socket error from the kernel. */
- assert(uv__stream_fd(stream) >= 0);
- getsockopt(uv__stream_fd(stream),
- SOL_SOCKET,
- SO_ERROR,
- &error,
- &errorsize);
- error = -error;
- }
-
- if (error == -EINPROGRESS)
- return;
-
- stream->connect_req = NULL;
- uv__req_unregister(stream->loop, req);
-
- if (error < 0 || QUEUE_EMPTY(&stream->write_queue)) {
- uv__io_stop(stream->loop, &stream->io_watcher, UV__POLLOUT);
- }
-
- if (req->cb)
- req->cb(req, error);
-
- if (uv__stream_fd(stream) == -1)
- return;
-
- if (error < 0) {
- uv__stream_flush_write_queue(stream, -ECANCELED);
- uv__write_callbacks(stream);
- }
-}
-
-
-int uv_write2(uv_write_t* req,
- uv_stream_t* stream,
- const uv_buf_t bufs[],
- unsigned int nbufs,
- uv_stream_t* send_handle,
- uv_write_cb cb) {
- int empty_queue;
-
- assert(nbufs > 0);
- assert((stream->type == UV_TCP ||
- stream->type == UV_NAMED_PIPE ||
- stream->type == UV_TTY) &&
- "uv_write (unix) does not yet support other types of streams");
-
- if (uv__stream_fd(stream) < 0)
- return -EBADF;
-
- if (send_handle) {
- if (stream->type != UV_NAMED_PIPE || !((uv_pipe_t*)stream)->ipc)
- return -EINVAL;
-
- /* XXX We abuse uv_write2() to send over UDP handles to child processes.
- * Don't call uv__stream_fd() on those handles, it's a macro that on OS X
- * evaluates to a function that operates on a uv_stream_t with a couple of
- * OS X specific fields. On other Unices it does (handle)->io_watcher.fd,
- * which works but only by accident.
- */
- if (uv__handle_fd((uv_handle_t*) send_handle) < 0)
- return -EBADF;
- }
-
- /* It's legal for write_queue_size > 0 even when the write_queue is empty;
- * it means there are error-state requests in the write_completed_queue that
- * will touch up write_queue_size later, see also uv__write_req_finish().
- * We could check that write_queue is empty instead but that implies making
- * a write() syscall when we know that the handle is in error mode.
- */
- empty_queue = (stream->write_queue_size == 0);
-
- /* Initialize the req */
- uv__req_init(stream->loop, req, UV_WRITE);
- req->cb = cb;
- req->handle = stream;
- req->error = 0;
- req->send_handle = send_handle;
- QUEUE_INIT(&req->queue);
-
- req->bufs = req->bufsml;
- if (nbufs > ARRAY_SIZE(req->bufsml))
- req->bufs = uv__malloc(nbufs * sizeof(bufs[0]));
-
- if (req->bufs == NULL)
- return -ENOMEM;
-
- memcpy(req->bufs, bufs, nbufs * sizeof(bufs[0]));
- req->nbufs = nbufs;
- req->write_index = 0;
- stream->write_queue_size += uv__count_bufs(bufs, nbufs);
-
- /* Append the request to write_queue. */
- QUEUE_INSERT_TAIL(&stream->write_queue, &req->queue);
-
- /* If the queue was empty when this function began, we should attempt to
- * do the write immediately. Otherwise start the write_watcher and wait
- * for the fd to become writable.
- */
- if (stream->connect_req) {
- /* Still connecting, do nothing. */
- }
- else if (empty_queue) {
- uv__write(stream);
- }
- else {
- /*
- * blocking streams should never have anything in the queue.
- * if this assert fires then somehow the blocking stream isn't being
- * sufficiently flushed in uv__write.
- */
- assert(!(stream->flags & UV_STREAM_BLOCKING));
- uv__io_start(stream->loop, &stream->io_watcher, UV__POLLOUT);
- uv__stream_osx_interrupt_select(stream);
- }
-
- return 0;
-}
-
-
-/* The buffers to be written must remain valid until the callback is called.
- * This is not required for the uv_buf_t array.
- */
-int uv_write(uv_write_t* req,
- uv_stream_t* handle,
- const uv_buf_t bufs[],
- unsigned int nbufs,
- uv_write_cb cb) {
- return uv_write2(req, handle, bufs, nbufs, NULL, cb);
-}
-
-
-void uv_try_write_cb(uv_write_t* req, int status) {
- /* Should not be called */
- abort();
-}
-
-
-int uv_try_write(uv_stream_t* stream,
- const uv_buf_t bufs[],
- unsigned int nbufs) {
- int r;
- int has_pollout;
- size_t written;
- size_t req_size;
- uv_write_t req;
-
- /* Connecting or already writing some data */
- if (stream->connect_req != NULL || stream->write_queue_size != 0)
- return -EAGAIN;
-
- has_pollout = uv__io_active(&stream->io_watcher, UV__POLLOUT);
-
- r = uv_write(&req, stream, bufs, nbufs, uv_try_write_cb);
- if (r != 0)
- return r;
-
- /* Remove not written bytes from write queue size */
- written = uv__count_bufs(bufs, nbufs);
- if (req.bufs != NULL)
- req_size = uv__write_req_size(&req);
- else
- req_size = 0;
- written -= req_size;
- stream->write_queue_size -= req_size;
-
- /* Unqueue request, regardless of immediateness */
- QUEUE_REMOVE(&req.queue);
- uv__req_unregister(stream->loop, &req);
- if (req.bufs != req.bufsml)
- uv__free(req.bufs);
- req.bufs = NULL;
-
- /* Do not poll for writable, if we wasn't before calling this */
- if (!has_pollout) {
- uv__io_stop(stream->loop, &stream->io_watcher, UV__POLLOUT);
- uv__stream_osx_interrupt_select(stream);
- }
-
- if (written == 0 && req_size != 0)
- return -EAGAIN;
- else
- return written;
-}
-
-
-int uv_read_start(uv_stream_t* stream,
- uv_alloc_cb alloc_cb,
- uv_read_cb read_cb) {
- assert(stream->type == UV_TCP || stream->type == UV_NAMED_PIPE ||
- stream->type == UV_TTY);
-
- if (stream->flags & UV_CLOSING)
- return -EINVAL;
-
- /* The UV_STREAM_READING flag is irrelevant of the state of the tcp - it just
- * expresses the desired state of the user.
- */
- stream->flags |= UV_STREAM_READING;
-
- /* TODO: try to do the read inline? */
- /* TODO: keep track of tcp state. If we've gotten a EOF then we should
- * not start the IO watcher.
- */
- assert(uv__stream_fd(stream) >= 0);
- assert(alloc_cb);
-
- stream->read_cb = read_cb;
- stream->alloc_cb = alloc_cb;
-
- uv__io_start(stream->loop, &stream->io_watcher, UV__POLLIN);
- uv__handle_start(stream);
- uv__stream_osx_interrupt_select(stream);
-
- return 0;
-}
-
-
-int uv_read_stop(uv_stream_t* stream) {
- if (!(stream->flags & UV_STREAM_READING))
- return 0;
-
- stream->flags &= ~UV_STREAM_READING;
- uv__io_stop(stream->loop, &stream->io_watcher, UV__POLLIN);
- if (!uv__io_active(&stream->io_watcher, UV__POLLOUT))
- uv__handle_stop(stream);
- uv__stream_osx_interrupt_select(stream);
-
- stream->read_cb = NULL;
- stream->alloc_cb = NULL;
- return 0;
-}
-
-
-int uv_is_readable(const uv_stream_t* stream) {
- return !!(stream->flags & UV_STREAM_READABLE);
-}
-
-
-int uv_is_writable(const uv_stream_t* stream) {
- return !!(stream->flags & UV_STREAM_WRITABLE);
-}
-
-
-#if defined(__APPLE__)
-int uv___stream_fd(const uv_stream_t* handle) {
- const uv__stream_select_t* s;
-
- assert(handle->type == UV_TCP ||
- handle->type == UV_TTY ||
- handle->type == UV_NAMED_PIPE);
-
- s = handle->select;
- if (s != NULL)
- return s->fd;
-
- return handle->io_watcher.fd;
-}
-#endif /* defined(__APPLE__) */
-
-
-void uv__stream_close(uv_stream_t* handle) {
- unsigned int i;
- uv__stream_queued_fds_t* queued_fds;
-
-#if defined(__APPLE__)
- /* Terminate select loop first */
- if (handle->select != NULL) {
- uv__stream_select_t* s;
-
- s = handle->select;
-
- uv_sem_post(&s->close_sem);
- uv_sem_post(&s->async_sem);
- uv__stream_osx_interrupt_select(handle);
- uv_thread_join(&s->thread);
- uv_sem_destroy(&s->close_sem);
- uv_sem_destroy(&s->async_sem);
- uv__close(s->fake_fd);
- uv__close(s->int_fd);
- uv_close((uv_handle_t*) &s->async, uv__stream_osx_cb_close);
-
- handle->select = NULL;
- }
-#endif /* defined(__APPLE__) */
-
- uv__io_close(handle->loop, &handle->io_watcher);
- uv_read_stop(handle);
- uv__handle_stop(handle);
-
- if (handle->io_watcher.fd != -1) {
- /* Don't close stdio file descriptors. Nothing good comes from it. */
- if (handle->io_watcher.fd > STDERR_FILENO)
- uv__close(handle->io_watcher.fd);
- handle->io_watcher.fd = -1;
- }
-
- if (handle->accepted_fd != -1) {
- uv__close(handle->accepted_fd);
- handle->accepted_fd = -1;
- }
-
- /* Close all queued fds */
- if (handle->queued_fds != NULL) {
- queued_fds = handle->queued_fds;
- for (i = 0; i < queued_fds->offset; i++)
- uv__close(queued_fds->fds[i]);
- uv__free(handle->queued_fds);
- handle->queued_fds = NULL;
- }
-
- assert(!uv__io_active(&handle->io_watcher, UV__POLLIN | UV__POLLOUT));
-}
-
-
-int uv_stream_set_blocking(uv_stream_t* handle, int blocking) {
- /* Don't need to check the file descriptor, uv__nonblock()
- * will fail with EBADF if it's not valid.
- */
- return uv__nonblock(uv__stream_fd(handle), !blocking);
-}
diff --git a/3rdparty/libuv/src/unix/sunos.c b/3rdparty/libuv/src/unix/sunos.c
deleted file mode 100644
index 0c46817b446..00000000000
--- a/3rdparty/libuv/src/unix/sunos.c
+++ /dev/null
@@ -1,765 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "internal.h"
-
-#include <stdio.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <errno.h>
-
-#ifndef SUNOS_NO_IFADDRS
-# include <ifaddrs.h>
-#endif
-#include <net/if.h>
-#include <net/if_dl.h>
-
-#include <sys/loadavg.h>
-#include <sys/time.h>
-#include <unistd.h>
-#include <kstat.h>
-#include <fcntl.h>
-
-#include <sys/port.h>
-#include <port.h>
-
-#define PORT_FIRED 0x69
-#define PORT_UNUSED 0x0
-#define PORT_LOADED 0x99
-#define PORT_DELETED -1
-
-#if (!defined(_LP64)) && (_FILE_OFFSET_BITS - 0 == 64)
-#define PROCFS_FILE_OFFSET_BITS_HACK 1
-#undef _FILE_OFFSET_BITS
-#else
-#define PROCFS_FILE_OFFSET_BITS_HACK 0
-#endif
-
-#include <procfs.h>
-
-#if (PROCFS_FILE_OFFSET_BITS_HACK - 0 == 1)
-#define _FILE_OFFSET_BITS 64
-#endif
-
-
-int uv__platform_loop_init(uv_loop_t* loop) {
- int err;
- int fd;
-
- loop->fs_fd = -1;
- loop->backend_fd = -1;
-
- fd = port_create();
- if (fd == -1)
- return -errno;
-
- err = uv__cloexec(fd, 1);
- if (err) {
- uv__close(fd);
- return err;
- }
- loop->backend_fd = fd;
-
- return 0;
-}
-
-
-void uv__platform_loop_delete(uv_loop_t* loop) {
- if (loop->fs_fd != -1) {
- uv__close(loop->fs_fd);
- loop->fs_fd = -1;
- }
-
- if (loop->backend_fd != -1) {
- uv__close(loop->backend_fd);
- loop->backend_fd = -1;
- }
-}
-
-
-void uv__platform_invalidate_fd(uv_loop_t* loop, int fd) {
- struct port_event* events;
- uintptr_t i;
- uintptr_t nfds;
-
- assert(loop->watchers != NULL);
-
- events = (struct port_event*) loop->watchers[loop->nwatchers];
- nfds = (uintptr_t) loop->watchers[loop->nwatchers + 1];
- if (events == NULL)
- return;
-
- /* Invalidate events with same file descriptor */
- for (i = 0; i < nfds; i++)
- if ((int) events[i].portev_object == fd)
- events[i].portev_object = -1;
-}
-
-
-void uv__io_poll(uv_loop_t* loop, int timeout) {
- struct port_event events[1024];
- struct port_event* pe;
- struct timespec spec;
- QUEUE* q;
- uv__io_t* w;
- sigset_t* pset;
- sigset_t set;
- uint64_t base;
- uint64_t diff;
- unsigned int nfds;
- unsigned int i;
- int saved_errno;
- int nevents;
- int count;
- int err;
- int fd;
-
- if (loop->nfds == 0) {
- assert(QUEUE_EMPTY(&loop->watcher_queue));
- return;
- }
-
- while (!QUEUE_EMPTY(&loop->watcher_queue)) {
- q = QUEUE_HEAD(&loop->watcher_queue);
- QUEUE_REMOVE(q);
- QUEUE_INIT(q);
-
- w = QUEUE_DATA(q, uv__io_t, watcher_queue);
- assert(w->pevents != 0);
-
- if (port_associate(loop->backend_fd, PORT_SOURCE_FD, w->fd, w->pevents, 0))
- abort();
-
- w->events = w->pevents;
- }
-
- pset = NULL;
- if (loop->flags & UV_LOOP_BLOCK_SIGPROF) {
- pset = &set;
- sigemptyset(pset);
- sigaddset(pset, SIGPROF);
- }
-
- assert(timeout >= -1);
- base = loop->time;
- count = 48; /* Benchmarks suggest this gives the best throughput. */
-
- for (;;) {
- if (timeout != -1) {
- spec.tv_sec = timeout / 1000;
- spec.tv_nsec = (timeout % 1000) * 1000000;
- }
-
- /* Work around a kernel bug where nfds is not updated. */
- events[0].portev_source = 0;
-
- nfds = 1;
- saved_errno = 0;
-
- if (pset != NULL)
- pthread_sigmask(SIG_BLOCK, pset, NULL);
-
- err = port_getn(loop->backend_fd,
- events,
- ARRAY_SIZE(events),
- &nfds,
- timeout == -1 ? NULL : &spec);
-
- if (pset != NULL)
- pthread_sigmask(SIG_UNBLOCK, pset, NULL);
-
- if (err) {
- /* Work around another kernel bug: port_getn() may return events even
- * on error.
- */
- if (errno == EINTR || errno == ETIME)
- saved_errno = errno;
- else
- abort();
- }
-
- /* Update loop->time unconditionally. It's tempting to skip the update when
- * timeout == 0 (i.e. non-blocking poll) but there is no guarantee that the
- * operating system didn't reschedule our process while in the syscall.
- */
- SAVE_ERRNO(uv__update_time(loop));
-
- if (events[0].portev_source == 0) {
- if (timeout == 0)
- return;
-
- if (timeout == -1)
- continue;
-
- goto update_timeout;
- }
-
- if (nfds == 0) {
- assert(timeout != -1);
- return;
- }
-
- nevents = 0;
-
- assert(loop->watchers != NULL);
- loop->watchers[loop->nwatchers] = (void*) events;
- loop->watchers[loop->nwatchers + 1] = (void*) (uintptr_t) nfds;
- for (i = 0; i < nfds; i++) {
- pe = events + i;
- fd = pe->portev_object;
-
- /* Skip invalidated events, see uv__platform_invalidate_fd */
- if (fd == -1)
- continue;
-
- assert(fd >= 0);
- assert((unsigned) fd < loop->nwatchers);
-
- w = loop->watchers[fd];
-
- /* File descriptor that we've stopped watching, ignore. */
- if (w == NULL)
- continue;
-
- w->cb(loop, w, pe->portev_events);
- nevents++;
-
- if (w != loop->watchers[fd])
- continue; /* Disabled by callback. */
-
- /* Events Ports operates in oneshot mode, rearm timer on next run. */
- if (w->pevents != 0 && QUEUE_EMPTY(&w->watcher_queue))
- QUEUE_INSERT_TAIL(&loop->watcher_queue, &w->watcher_queue);
- }
- loop->watchers[loop->nwatchers] = NULL;
- loop->watchers[loop->nwatchers + 1] = NULL;
-
- if (nevents != 0) {
- if (nfds == ARRAY_SIZE(events) && --count != 0) {
- /* Poll for more events but don't block this time. */
- timeout = 0;
- continue;
- }
- return;
- }
-
- if (saved_errno == ETIME) {
- assert(timeout != -1);
- return;
- }
-
- if (timeout == 0)
- return;
-
- if (timeout == -1)
- continue;
-
-update_timeout:
- assert(timeout > 0);
-
- diff = loop->time - base;
- if (diff >= (uint64_t) timeout)
- return;
-
- timeout -= diff;
- }
-}
-
-
-uint64_t uv__hrtime(uv_clocktype_t type) {
- return gethrtime();
-}
-
-
-/*
- * We could use a static buffer for the path manipulations that we need outside
- * of the function, but this function could be called by multiple consumers and
- * we don't want to potentially create a race condition in the use of snprintf.
- */
-int uv_exepath(char* buffer, size_t* size) {
- ssize_t res;
- char buf[128];
-
- if (buffer == NULL || size == NULL || *size == 0)
- return -EINVAL;
-
- snprintf(buf, sizeof(buf), "/proc/%lu/path/a.out", (unsigned long) getpid());
-
- res = *size - 1;
- if (res > 0)
- res = readlink(buf, buffer, res);
-
- if (res == -1)
- return -errno;
-
- buffer[res] = '\0';
- *size = res;
- return 0;
-}
-
-
-uint64_t uv_get_free_memory(void) {
- return (uint64_t) sysconf(_SC_PAGESIZE) * sysconf(_SC_AVPHYS_PAGES);
-}
-
-
-uint64_t uv_get_total_memory(void) {
- return (uint64_t) sysconf(_SC_PAGESIZE) * sysconf(_SC_PHYS_PAGES);
-}
-
-
-void uv_loadavg(double avg[3]) {
- (void) getloadavg(avg, 3);
-}
-
-
-#if defined(PORT_SOURCE_FILE)
-
-static int uv__fs_event_rearm(uv_fs_event_t *handle) {
- if (handle->fd == -1)
- return -EBADF;
-
- if (port_associate(handle->loop->fs_fd,
- PORT_SOURCE_FILE,
- (uintptr_t) &handle->fo,
- FILE_ATTRIB | FILE_MODIFIED,
- handle) == -1) {
- return -errno;
- }
- handle->fd = PORT_LOADED;
-
- return 0;
-}
-
-
-static void uv__fs_event_read(uv_loop_t* loop,
- uv__io_t* w,
- unsigned int revents) {
- uv_fs_event_t *handle = NULL;
- timespec_t timeout;
- port_event_t pe;
- int events;
- int r;
-
- (void) w;
- (void) revents;
-
- do {
- uint_t n = 1;
-
- /*
- * Note that our use of port_getn() here (and not port_get()) is deliberate:
- * there is a bug in event ports (Sun bug 6456558) whereby a zeroed timeout
- * causes port_get() to return success instead of ETIME when there aren't
- * actually any events (!); by using port_getn() in lieu of port_get(),
- * we can at least workaround the bug by checking for zero returned events
- * and treating it as we would ETIME.
- */
- do {
- memset(&timeout, 0, sizeof timeout);
- r = port_getn(loop->fs_fd, &pe, 1, &n, &timeout);
- }
- while (r == -1 && errno == EINTR);
-
- if ((r == -1 && errno == ETIME) || n == 0)
- break;
-
- handle = (uv_fs_event_t*) pe.portev_user;
- assert((r == 0) && "unexpected port_get() error");
-
- events = 0;
- if (pe.portev_events & (FILE_ATTRIB | FILE_MODIFIED))
- events |= UV_CHANGE;
- if (pe.portev_events & ~(FILE_ATTRIB | FILE_MODIFIED))
- events |= UV_RENAME;
- assert(events != 0);
- handle->fd = PORT_FIRED;
- handle->cb(handle, NULL, events, 0);
-
- if (handle->fd != PORT_DELETED) {
- r = uv__fs_event_rearm(handle);
- if (r != 0)
- handle->cb(handle, NULL, 0, r);
- }
- }
- while (handle->fd != PORT_DELETED);
-}
-
-
-int uv_fs_event_init(uv_loop_t* loop, uv_fs_event_t* handle) {
- uv__handle_init(loop, (uv_handle_t*)handle, UV_FS_EVENT);
- return 0;
-}
-
-
-int uv_fs_event_start(uv_fs_event_t* handle,
- uv_fs_event_cb cb,
- const char* path,
- unsigned int flags) {
- int portfd;
- int first_run;
- int err;
-
- if (uv__is_active(handle))
- return -EINVAL;
-
- first_run = 0;
- if (handle->loop->fs_fd == -1) {
- portfd = port_create();
- if (portfd == -1)
- return -errno;
- handle->loop->fs_fd = portfd;
- first_run = 1;
- }
-
- uv__handle_start(handle);
- handle->path = uv__strdup(path);
- handle->fd = PORT_UNUSED;
- handle->cb = cb;
-
- memset(&handle->fo, 0, sizeof handle->fo);
- handle->fo.fo_name = handle->path;
- err = uv__fs_event_rearm(handle);
- if (err != 0)
- return err;
-
- if (first_run) {
- uv__io_init(&handle->loop->fs_event_watcher, uv__fs_event_read, portfd);
- uv__io_start(handle->loop, &handle->loop->fs_event_watcher, UV__POLLIN);
- }
-
- return 0;
-}
-
-
-int uv_fs_event_stop(uv_fs_event_t* handle) {
- if (!uv__is_active(handle))
- return 0;
-
- if (handle->fd == PORT_FIRED || handle->fd == PORT_LOADED) {
- port_dissociate(handle->loop->fs_fd,
- PORT_SOURCE_FILE,
- (uintptr_t) &handle->fo);
- }
-
- handle->fd = PORT_DELETED;
- uv__free(handle->path);
- handle->path = NULL;
- handle->fo.fo_name = NULL;
- uv__handle_stop(handle);
-
- return 0;
-}
-
-void uv__fs_event_close(uv_fs_event_t* handle) {
- uv_fs_event_stop(handle);
-}
-
-#else /* !defined(PORT_SOURCE_FILE) */
-
-int uv_fs_event_init(uv_loop_t* loop, uv_fs_event_t* handle) {
- return -ENOSYS;
-}
-
-
-int uv_fs_event_start(uv_fs_event_t* handle,
- uv_fs_event_cb cb,
- const char* filename,
- unsigned int flags) {
- return -ENOSYS;
-}
-
-
-int uv_fs_event_stop(uv_fs_event_t* handle) {
- return -ENOSYS;
-}
-
-
-void uv__fs_event_close(uv_fs_event_t* handle) {
- UNREACHABLE();
-}
-
-#endif /* defined(PORT_SOURCE_FILE) */
-
-
-char** uv_setup_args(int argc, char** argv) {
- return argv;
-}
-
-
-int uv_set_process_title(const char* title) {
- return 0;
-}
-
-
-int uv_get_process_title(char* buffer, size_t size) {
- if (size > 0) {
- buffer[0] = '\0';
- }
- return 0;
-}
-
-
-int uv_resident_set_memory(size_t* rss) {
- psinfo_t psinfo;
- int err;
- int fd;
-
- fd = open("/proc/self/psinfo", O_RDONLY);
- if (fd == -1)
- return -errno;
-
- /* FIXME(bnoordhuis) Handle EINTR. */
- err = -EINVAL;
- if (read(fd, &psinfo, sizeof(psinfo)) == sizeof(psinfo)) {
- *rss = (size_t)psinfo.pr_rssize * 1024;
- err = 0;
- }
- uv__close(fd);
-
- return err;
-}
-
-
-int uv_uptime(double* uptime) {
- kstat_ctl_t *kc;
- kstat_t *ksp;
- kstat_named_t *knp;
-
- long hz = sysconf(_SC_CLK_TCK);
-
- kc = kstat_open();
- if (kc == NULL)
- return -EPERM;
-
- ksp = kstat_lookup(kc, (char*) "unix", 0, (char*) "system_misc");
- if (kstat_read(kc, ksp, NULL) == -1) {
- *uptime = -1;
- } else {
- knp = (kstat_named_t*) kstat_data_lookup(ksp, (char*) "clk_intr");
- *uptime = knp->value.ul / hz;
- }
- kstat_close(kc);
-
- return 0;
-}
-
-
-int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) {
- int lookup_instance;
- kstat_ctl_t *kc;
- kstat_t *ksp;
- kstat_named_t *knp;
- uv_cpu_info_t* cpu_info;
-
- kc = kstat_open();
- if (kc == NULL)
- return -EPERM;
-
- /* Get count of cpus */
- lookup_instance = 0;
- while ((ksp = kstat_lookup(kc, (char*) "cpu_info", lookup_instance, NULL))) {
- lookup_instance++;
- }
-
- *cpu_infos = uv__malloc(lookup_instance * sizeof(**cpu_infos));
- if (!(*cpu_infos)) {
- kstat_close(kc);
- return -ENOMEM;
- }
-
- *count = lookup_instance;
-
- cpu_info = *cpu_infos;
- lookup_instance = 0;
- while ((ksp = kstat_lookup(kc, (char*) "cpu_info", lookup_instance, NULL))) {
- if (kstat_read(kc, ksp, NULL) == -1) {
- cpu_info->speed = 0;
- cpu_info->model = NULL;
- } else {
- knp = kstat_data_lookup(ksp, (char*) "clock_MHz");
- assert(knp->data_type == KSTAT_DATA_INT32 ||
- knp->data_type == KSTAT_DATA_INT64);
- cpu_info->speed = (knp->data_type == KSTAT_DATA_INT32) ? knp->value.i32
- : knp->value.i64;
-
- knp = kstat_data_lookup(ksp, (char*) "brand");
- assert(knp->data_type == KSTAT_DATA_STRING);
- cpu_info->model = uv__strdup(KSTAT_NAMED_STR_PTR(knp));
- }
-
- lookup_instance++;
- cpu_info++;
- }
-
- cpu_info = *cpu_infos;
- lookup_instance = 0;
- for (;;) {
- ksp = kstat_lookup(kc, (char*) "cpu", lookup_instance, (char*) "sys");
-
- if (ksp == NULL)
- break;
-
- if (kstat_read(kc, ksp, NULL) == -1) {
- cpu_info->cpu_times.user = 0;
- cpu_info->cpu_times.nice = 0;
- cpu_info->cpu_times.sys = 0;
- cpu_info->cpu_times.idle = 0;
- cpu_info->cpu_times.irq = 0;
- } else {
- knp = kstat_data_lookup(ksp, (char*) "cpu_ticks_user");
- assert(knp->data_type == KSTAT_DATA_UINT64);
- cpu_info->cpu_times.user = knp->value.ui64;
-
- knp = kstat_data_lookup(ksp, (char*) "cpu_ticks_kernel");
- assert(knp->data_type == KSTAT_DATA_UINT64);
- cpu_info->cpu_times.sys = knp->value.ui64;
-
- knp = kstat_data_lookup(ksp, (char*) "cpu_ticks_idle");
- assert(knp->data_type == KSTAT_DATA_UINT64);
- cpu_info->cpu_times.idle = knp->value.ui64;
-
- knp = kstat_data_lookup(ksp, (char*) "intr");
- assert(knp->data_type == KSTAT_DATA_UINT64);
- cpu_info->cpu_times.irq = knp->value.ui64;
- cpu_info->cpu_times.nice = 0;
- }
-
- lookup_instance++;
- cpu_info++;
- }
-
- kstat_close(kc);
-
- return 0;
-}
-
-
-void uv_free_cpu_info(uv_cpu_info_t* cpu_infos, int count) {
- int i;
-
- for (i = 0; i < count; i++) {
- uv__free(cpu_infos[i].model);
- }
-
- uv__free(cpu_infos);
-}
-
-
-int uv_interface_addresses(uv_interface_address_t** addresses, int* count) {
-#ifdef SUNOS_NO_IFADDRS
- return -ENOSYS;
-#else
- uv_interface_address_t* address;
- struct sockaddr_dl* sa_addr;
- struct ifaddrs* addrs;
- struct ifaddrs* ent;
- int i;
-
- if (getifaddrs(&addrs))
- return -errno;
-
- *count = 0;
-
- /* Count the number of interfaces */
- for (ent = addrs; ent != NULL; ent = ent->ifa_next) {
- if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING)) ||
- (ent->ifa_addr == NULL) ||
- (ent->ifa_addr->sa_family == PF_PACKET)) {
- continue;
- }
-
- (*count)++;
- }
-
- *addresses = uv__malloc(*count * sizeof(**addresses));
- if (!(*addresses)) {
- freeifaddrs(addrs);
- return -ENOMEM;
- }
-
- address = *addresses;
-
- for (ent = addrs; ent != NULL; ent = ent->ifa_next) {
- if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING)))
- continue;
-
- if (ent->ifa_addr == NULL)
- continue;
-
- address->name = uv__strdup(ent->ifa_name);
-
- if (ent->ifa_addr->sa_family == AF_INET6) {
- address->address.address6 = *((struct sockaddr_in6*) ent->ifa_addr);
- } else {
- address->address.address4 = *((struct sockaddr_in*) ent->ifa_addr);
- }
-
- if (ent->ifa_netmask->sa_family == AF_INET6) {
- address->netmask.netmask6 = *((struct sockaddr_in6*) ent->ifa_netmask);
- } else {
- address->netmask.netmask4 = *((struct sockaddr_in*) ent->ifa_netmask);
- }
-
- address->is_internal = !!((ent->ifa_flags & IFF_PRIVATE) ||
- (ent->ifa_flags & IFF_LOOPBACK));
-
- address++;
- }
-
- /* Fill in physical addresses for each interface */
- for (ent = addrs; ent != NULL; ent = ent->ifa_next) {
- if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING)) ||
- (ent->ifa_addr == NULL) ||
- (ent->ifa_addr->sa_family != AF_LINK)) {
- continue;
- }
-
- address = *addresses;
-
- for (i = 0; i < (*count); i++) {
- if (strcmp(address->name, ent->ifa_name) == 0) {
- sa_addr = (struct sockaddr_dl*)(ent->ifa_addr);
- memcpy(address->phys_addr, LLADDR(sa_addr), sizeof(address->phys_addr));
- }
- address++;
- }
- }
-
- freeifaddrs(addrs);
-
- return 0;
-#endif /* SUNOS_NO_IFADDRS */
-}
-
-
-void uv_free_interface_addresses(uv_interface_address_t* addresses,
- int count) {
- int i;
-
- for (i = 0; i < count; i++) {
- uv__free(addresses[i].name);
- }
-
- uv__free(addresses);
-}
diff --git a/3rdparty/libuv/src/unix/tcp.c b/3rdparty/libuv/src/unix/tcp.c
deleted file mode 100644
index 6d213a49778..00000000000
--- a/3rdparty/libuv/src/unix/tcp.c
+++ /dev/null
@@ -1,362 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "internal.h"
-
-#include <stdlib.h>
-#include <unistd.h>
-#include <assert.h>
-#include <errno.h>
-
-
-static int maybe_new_socket(uv_tcp_t* handle, int domain, int flags) {
- int sockfd;
- int err;
-
- if (domain == AF_UNSPEC || uv__stream_fd(handle) != -1) {
- handle->flags |= flags;
- return 0;
- }
-
- err = uv__socket(domain, SOCK_STREAM, 0);
- if (err < 0)
- return err;
- sockfd = err;
-
- err = uv__stream_open((uv_stream_t*) handle, sockfd, flags);
- if (err) {
- uv__close(sockfd);
- return err;
- }
-
- return 0;
-}
-
-
-int uv_tcp_init_ex(uv_loop_t* loop, uv_tcp_t* tcp, unsigned int flags) {
- int domain;
-
- /* Use the lower 8 bits for the domain */
- domain = flags & 0xFF;
- if (domain != AF_INET && domain != AF_INET6 && domain != AF_UNSPEC)
- return -EINVAL;
-
- if (flags & ~0xFF)
- return -EINVAL;
-
- uv__stream_init(loop, (uv_stream_t*)tcp, UV_TCP);
-
- /* If anything fails beyond this point we need to remove the handle from
- * the handle queue, since it was added by uv__handle_init in uv_stream_init.
- */
-
- if (domain != AF_UNSPEC) {
- int err = maybe_new_socket(tcp, domain, 0);
- if (err) {
- QUEUE_REMOVE(&tcp->handle_queue);
- return err;
- }
- }
-
- return 0;
-}
-
-
-int uv_tcp_init(uv_loop_t* loop, uv_tcp_t* tcp) {
- return uv_tcp_init_ex(loop, tcp, AF_UNSPEC);
-}
-
-
-int uv__tcp_bind(uv_tcp_t* tcp,
- const struct sockaddr* addr,
- unsigned int addrlen,
- unsigned int flags) {
- int err;
- int on;
-
- /* Cannot set IPv6-only mode on non-IPv6 socket. */
- if ((flags & UV_TCP_IPV6ONLY) && addr->sa_family != AF_INET6)
- return -EINVAL;
-
- err = maybe_new_socket(tcp,
- addr->sa_family,
- UV_STREAM_READABLE | UV_STREAM_WRITABLE);
- if (err)
- return err;
-
- on = 1;
- if (setsockopt(tcp->io_watcher.fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)))
- return -errno;
-
-#ifdef IPV6_V6ONLY
- if (addr->sa_family == AF_INET6) {
- on = (flags & UV_TCP_IPV6ONLY) != 0;
- if (setsockopt(tcp->io_watcher.fd,
- IPPROTO_IPV6,
- IPV6_V6ONLY,
- &on,
- sizeof on) == -1) {
- return -errno;
- }
- }
-#endif
-
- errno = 0;
- if (bind(tcp->io_watcher.fd, addr, addrlen) && errno != EADDRINUSE) {
- if (errno == EAFNOSUPPORT)
- /* OSX, other BSDs and SunoS fail with EAFNOSUPPORT when binding a
- * socket created with AF_INET to an AF_INET6 address or vice versa. */
- return -EINVAL;
- return -errno;
- }
- tcp->delayed_error = -errno;
-
- if (addr->sa_family == AF_INET6)
- tcp->flags |= UV_HANDLE_IPV6;
-
- return 0;
-}
-
-
-int uv__tcp_connect(uv_connect_t* req,
- uv_tcp_t* handle,
- const struct sockaddr* addr,
- unsigned int addrlen,
- uv_connect_cb cb) {
- int err;
- int r;
-
- assert(handle->type == UV_TCP);
-
- if (handle->connect_req != NULL)
- return -EALREADY; /* FIXME(bnoordhuis) -EINVAL or maybe -EBUSY. */
-
- err = maybe_new_socket(handle,
- addr->sa_family,
- UV_STREAM_READABLE | UV_STREAM_WRITABLE);
- if (err)
- return err;
-
- handle->delayed_error = 0;
-
- do
- r = connect(uv__stream_fd(handle), addr, addrlen);
- while (r == -1 && errno == EINTR);
-
- if (r == -1) {
- if (errno == EINPROGRESS)
- ; /* not an error */
- else if (errno == ECONNREFUSED)
- /* If we get a ECONNREFUSED wait until the next tick to report the
- * error. Solaris wants to report immediately--other unixes want to
- * wait.
- */
- handle->delayed_error = -errno;
- else
- return -errno;
- }
-
- uv__req_init(handle->loop, req, UV_CONNECT);
- req->cb = cb;
- req->handle = (uv_stream_t*) handle;
- QUEUE_INIT(&req->queue);
- handle->connect_req = req;
-
- uv__io_start(handle->loop, &handle->io_watcher, UV__POLLOUT);
-
- if (handle->delayed_error)
- uv__io_feed(handle->loop, &handle->io_watcher);
-
- return 0;
-}
-
-
-int uv_tcp_open(uv_tcp_t* handle, uv_os_sock_t sock) {
- int err;
-
- err = uv__nonblock(sock, 1);
- if (err)
- return err;
-
- return uv__stream_open((uv_stream_t*)handle,
- sock,
- UV_STREAM_READABLE | UV_STREAM_WRITABLE);
-}
-
-
-int uv_tcp_getsockname(const uv_tcp_t* handle,
- struct sockaddr* name,
- int* namelen) {
- socklen_t socklen;
-
- if (handle->delayed_error)
- return handle->delayed_error;
-
- if (uv__stream_fd(handle) < 0)
- return -EINVAL; /* FIXME(bnoordhuis) -EBADF */
-
- /* sizeof(socklen_t) != sizeof(int) on some systems. */
- socklen = (socklen_t) *namelen;
-
- if (getsockname(uv__stream_fd(handle), name, &socklen))
- return -errno;
-
- *namelen = (int) socklen;
- return 0;
-}
-
-
-int uv_tcp_getpeername(const uv_tcp_t* handle,
- struct sockaddr* name,
- int* namelen) {
- socklen_t socklen;
-
- if (handle->delayed_error)
- return handle->delayed_error;
-
- if (uv__stream_fd(handle) < 0)
- return -EINVAL; /* FIXME(bnoordhuis) -EBADF */
-
- /* sizeof(socklen_t) != sizeof(int) on some systems. */
- socklen = (socklen_t) *namelen;
-
- if (getpeername(uv__stream_fd(handle), name, &socklen))
- return -errno;
-
- *namelen = (int) socklen;
- return 0;
-}
-
-
-int uv_tcp_listen(uv_tcp_t* tcp, int backlog, uv_connection_cb cb) {
- static int single_accept = -1;
- int err;
-
- if (tcp->delayed_error)
- return tcp->delayed_error;
-
- if (single_accept == -1) {
- const char* val = getenv("UV_TCP_SINGLE_ACCEPT");
- single_accept = (val != NULL && atoi(val) != 0); /* Off by default. */
- }
-
- if (single_accept)
- tcp->flags |= UV_TCP_SINGLE_ACCEPT;
-
- err = maybe_new_socket(tcp, AF_INET, UV_STREAM_READABLE);
- if (err)
- return err;
-
- if (listen(tcp->io_watcher.fd, backlog))
- return -errno;
-
- tcp->connection_cb = cb;
-
- /* Start listening for connections. */
- tcp->io_watcher.cb = uv__server_io;
- uv__io_start(tcp->loop, &tcp->io_watcher, UV__POLLIN);
-
- return 0;
-}
-
-
-int uv__tcp_nodelay(int fd, int on) {
- if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on)))
- return -errno;
- return 0;
-}
-
-
-int uv__tcp_keepalive(int fd, int on, unsigned int delay) {
- if (setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof(on)))
- return -errno;
-
-#ifdef TCP_KEEPIDLE
- if (on && setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, &delay, sizeof(delay)))
- return -errno;
-#endif
-
- /* Solaris/SmartOS, if you don't support keep-alive,
- * then don't advertise it in your system headers...
- */
- /* FIXME(bnoordhuis) That's possibly because sizeof(delay) should be 1. */
-#if defined(TCP_KEEPALIVE) && !defined(__sun)
- if (on && setsockopt(fd, IPPROTO_TCP, TCP_KEEPALIVE, &delay, sizeof(delay)))
- return -errno;
-#endif
-
- return 0;
-}
-
-
-int uv_tcp_nodelay(uv_tcp_t* handle, int on) {
- int err;
-
- if (uv__stream_fd(handle) != -1) {
- err = uv__tcp_nodelay(uv__stream_fd(handle), on);
- if (err)
- return err;
- }
-
- if (on)
- handle->flags |= UV_TCP_NODELAY;
- else
- handle->flags &= ~UV_TCP_NODELAY;
-
- return 0;
-}
-
-
-int uv_tcp_keepalive(uv_tcp_t* handle, int on, unsigned int delay) {
- int err;
-
- if (uv__stream_fd(handle) != -1) {
- err =uv__tcp_keepalive(uv__stream_fd(handle), on, delay);
- if (err)
- return err;
- }
-
- if (on)
- handle->flags |= UV_TCP_KEEPALIVE;
- else
- handle->flags &= ~UV_TCP_KEEPALIVE;
-
- /* TODO Store delay if uv__stream_fd(handle) == -1 but don't want to enlarge
- * uv_tcp_t with an int that's almost never used...
- */
-
- return 0;
-}
-
-
-int uv_tcp_simultaneous_accepts(uv_tcp_t* handle, int enable) {
- if (enable)
- handle->flags &= ~UV_TCP_SINGLE_ACCEPT;
- else
- handle->flags |= UV_TCP_SINGLE_ACCEPT;
- return 0;
-}
-
-
-void uv__tcp_close(uv_tcp_t* handle) {
- uv__stream_close((uv_stream_t*)handle);
-}
diff --git a/3rdparty/libuv/src/unix/thread.c b/3rdparty/libuv/src/unix/thread.c
deleted file mode 100644
index c56a3170259..00000000000
--- a/3rdparty/libuv/src/unix/thread.c
+++ /dev/null
@@ -1,525 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "internal.h"
-
-#include <pthread.h>
-#include <assert.h>
-#include <errno.h>
-
-#include <sys/time.h>
-
-#undef NANOSEC
-#define NANOSEC ((uint64_t) 1e9)
-
-
-struct thread_ctx {
- void (*entry)(void* arg);
- void* arg;
-};
-
-
-static void* uv__thread_start(void *arg)
-{
- struct thread_ctx *ctx_p;
- struct thread_ctx ctx;
-
- ctx_p = arg;
- ctx = *ctx_p;
- uv__free(ctx_p);
- ctx.entry(ctx.arg);
-
- return 0;
-}
-
-
-int uv_thread_create(uv_thread_t *tid, void (*entry)(void *arg), void *arg) {
- struct thread_ctx* ctx;
- int err;
-
- ctx = uv__malloc(sizeof(*ctx));
- if (ctx == NULL)
- return UV_ENOMEM;
-
- ctx->entry = entry;
- ctx->arg = arg;
-
- err = pthread_create(tid, NULL, uv__thread_start, ctx);
-
- if (err)
- uv__free(ctx);
-
- return -err;
-}
-
-
-uv_thread_t uv_thread_self(void) {
- return pthread_self();
-}
-
-int uv_thread_join(uv_thread_t *tid) {
- return -pthread_join(*tid, NULL);
-}
-
-
-int uv_thread_equal(const uv_thread_t* t1, const uv_thread_t* t2) {
- return pthread_equal(*t1, *t2);
-}
-
-
-int uv_mutex_init(uv_mutex_t* mutex) {
-#if defined(NDEBUG) || !defined(PTHREAD_MUTEX_ERRORCHECK)
- return -pthread_mutex_init(mutex, NULL);
-#else
- pthread_mutexattr_t attr;
- int err;
-
- if (pthread_mutexattr_init(&attr))
- abort();
-
- if (pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK))
- abort();
-
- err = pthread_mutex_init(mutex, &attr);
-
- if (pthread_mutexattr_destroy(&attr))
- abort();
-
- return -err;
-#endif
-}
-
-
-void uv_mutex_destroy(uv_mutex_t* mutex) {
- if (pthread_mutex_destroy(mutex))
- abort();
-}
-
-
-void uv_mutex_lock(uv_mutex_t* mutex) {
- if (pthread_mutex_lock(mutex))
- abort();
-}
-
-
-int uv_mutex_trylock(uv_mutex_t* mutex) {
- int err;
-
- err = pthread_mutex_trylock(mutex);
- if (err) {
- if (err != EBUSY && err != EAGAIN)
- abort();
- return -EBUSY;
- }
-
- return 0;
-}
-
-
-void uv_mutex_unlock(uv_mutex_t* mutex) {
- if (pthread_mutex_unlock(mutex))
- abort();
-}
-
-
-int uv_rwlock_init(uv_rwlock_t* rwlock) {
- return -pthread_rwlock_init(rwlock, NULL);
-}
-
-
-void uv_rwlock_destroy(uv_rwlock_t* rwlock) {
- if (pthread_rwlock_destroy(rwlock))
- abort();
-}
-
-
-void uv_rwlock_rdlock(uv_rwlock_t* rwlock) {
- if (pthread_rwlock_rdlock(rwlock))
- abort();
-}
-
-
-int uv_rwlock_tryrdlock(uv_rwlock_t* rwlock) {
- int err;
-
- err = pthread_rwlock_tryrdlock(rwlock);
- if (err) {
- if (err != EBUSY && err != EAGAIN)
- abort();
- return -EBUSY;
- }
-
- return 0;
-}
-
-
-void uv_rwlock_rdunlock(uv_rwlock_t* rwlock) {
- if (pthread_rwlock_unlock(rwlock))
- abort();
-}
-
-
-void uv_rwlock_wrlock(uv_rwlock_t* rwlock) {
- if (pthread_rwlock_wrlock(rwlock))
- abort();
-}
-
-
-int uv_rwlock_trywrlock(uv_rwlock_t* rwlock) {
- int err;
-
- err = pthread_rwlock_trywrlock(rwlock);
- if (err) {
- if (err != EBUSY && err != EAGAIN)
- abort();
- return -EBUSY;
- }
-
- return 0;
-}
-
-
-void uv_rwlock_wrunlock(uv_rwlock_t* rwlock) {
- if (pthread_rwlock_unlock(rwlock))
- abort();
-}
-
-
-void uv_once(uv_once_t* guard, void (*callback)(void)) {
- if (pthread_once(guard, callback))
- abort();
-}
-
-#if defined(__APPLE__) && defined(__MACH__)
-
-int uv_sem_init(uv_sem_t* sem, unsigned int value) {
- kern_return_t err;
-
- err = semaphore_create(mach_task_self(), sem, SYNC_POLICY_FIFO, value);
- if (err == KERN_SUCCESS)
- return 0;
- if (err == KERN_INVALID_ARGUMENT)
- return -EINVAL;
- if (err == KERN_RESOURCE_SHORTAGE)
- return -ENOMEM;
-
- abort();
- return -EINVAL; /* Satisfy the compiler. */
-}
-
-
-void uv_sem_destroy(uv_sem_t* sem) {
- if (semaphore_destroy(mach_task_self(), *sem))
- abort();
-}
-
-
-void uv_sem_post(uv_sem_t* sem) {
- if (semaphore_signal(*sem))
- abort();
-}
-
-
-void uv_sem_wait(uv_sem_t* sem) {
- int r;
-
- do
- r = semaphore_wait(*sem);
- while (r == KERN_ABORTED);
-
- if (r != KERN_SUCCESS)
- abort();
-}
-
-
-int uv_sem_trywait(uv_sem_t* sem) {
- mach_timespec_t interval;
- kern_return_t err;
-
- interval.tv_sec = 0;
- interval.tv_nsec = 0;
-
- err = semaphore_timedwait(*sem, interval);
- if (err == KERN_SUCCESS)
- return 0;
- if (err == KERN_OPERATION_TIMED_OUT)
- return -EAGAIN;
-
- abort();
- return -EINVAL; /* Satisfy the compiler. */
-}
-
-#else /* !(defined(__APPLE__) && defined(__MACH__)) */
-
-int uv_sem_init(uv_sem_t* sem, unsigned int value) {
- if (sem_init(sem, 0, value))
- return -errno;
- return 0;
-}
-
-
-void uv_sem_destroy(uv_sem_t* sem) {
- if (sem_destroy(sem))
- abort();
-}
-
-
-void uv_sem_post(uv_sem_t* sem) {
- if (sem_post(sem))
- abort();
-}
-
-
-void uv_sem_wait(uv_sem_t* sem) {
- int r;
-
- do
- r = sem_wait(sem);
- while (r == -1 && errno == EINTR);
-
- if (r)
- abort();
-}
-
-
-int uv_sem_trywait(uv_sem_t* sem) {
- int r;
-
- do
- r = sem_trywait(sem);
- while (r == -1 && errno == EINTR);
-
- if (r) {
- if (errno == EAGAIN)
- return -EAGAIN;
- abort();
- }
-
- return 0;
-}
-
-#endif /* defined(__APPLE__) && defined(__MACH__) */
-
-
-#if defined(__APPLE__) && defined(__MACH__)
-
-int uv_cond_init(uv_cond_t* cond) {
- return -pthread_cond_init(cond, NULL);
-}
-
-#else /* !(defined(__APPLE__) && defined(__MACH__)) */
-
-int uv_cond_init(uv_cond_t* cond) {
- pthread_condattr_t attr;
- int err;
-
- err = pthread_condattr_init(&attr);
- if (err)
- return -err;
-
-#if !(defined(__ANDROID__) && defined(HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC))
- err = pthread_condattr_setclock(&attr, CLOCK_MONOTONIC);
- if (err)
- goto error2;
-#endif
-
- err = pthread_cond_init(cond, &attr);
- if (err)
- goto error2;
-
- err = pthread_condattr_destroy(&attr);
- if (err)
- goto error;
-
- return 0;
-
-error:
- pthread_cond_destroy(cond);
-error2:
- pthread_condattr_destroy(&attr);
- return -err;
-}
-
-#endif /* defined(__APPLE__) && defined(__MACH__) */
-
-void uv_cond_destroy(uv_cond_t* cond) {
- if (pthread_cond_destroy(cond))
- abort();
-}
-
-void uv_cond_signal(uv_cond_t* cond) {
- if (pthread_cond_signal(cond))
- abort();
-}
-
-void uv_cond_broadcast(uv_cond_t* cond) {
- if (pthread_cond_broadcast(cond))
- abort();
-}
-
-void uv_cond_wait(uv_cond_t* cond, uv_mutex_t* mutex) {
- if (pthread_cond_wait(cond, mutex))
- abort();
-}
-
-
-int uv_cond_timedwait(uv_cond_t* cond, uv_mutex_t* mutex, uint64_t timeout) {
- int r;
- struct timespec ts;
-
-#if defined(__APPLE__) && defined(__MACH__)
- ts.tv_sec = timeout / NANOSEC;
- ts.tv_nsec = timeout % NANOSEC;
- r = pthread_cond_timedwait_relative_np(cond, mutex, &ts);
-#else
- timeout += uv__hrtime(UV_CLOCK_PRECISE);
- ts.tv_sec = timeout / NANOSEC;
- ts.tv_nsec = timeout % NANOSEC;
-#if defined(__ANDROID__) && defined(HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC)
- /*
- * The bionic pthread implementation doesn't support CLOCK_MONOTONIC,
- * but has this alternative function instead.
- */
- r = pthread_cond_timedwait_monotonic_np(cond, mutex, &ts);
-#else
- r = pthread_cond_timedwait(cond, mutex, &ts);
-#endif /* __ANDROID__ */
-#endif
-
-
- if (r == 0)
- return 0;
-
- if (r == ETIMEDOUT)
- return -ETIMEDOUT;
-
- abort();
- return -EINVAL; /* Satisfy the compiler. */
-}
-
-
-#if defined(__APPLE__) && defined(__MACH__)
-
-int uv_barrier_init(uv_barrier_t* barrier, unsigned int count) {
- int err;
-
- barrier->n = count;
- barrier->count = 0;
-
- err = uv_mutex_init(&barrier->mutex);
- if (err)
- return -err;
-
- err = uv_sem_init(&barrier->turnstile1, 0);
- if (err)
- goto error2;
-
- err = uv_sem_init(&barrier->turnstile2, 1);
- if (err)
- goto error;
-
- return 0;
-
-error:
- uv_sem_destroy(&barrier->turnstile1);
-error2:
- uv_mutex_destroy(&barrier->mutex);
- return -err;
-
-}
-
-
-void uv_barrier_destroy(uv_barrier_t* barrier) {
- uv_sem_destroy(&barrier->turnstile2);
- uv_sem_destroy(&barrier->turnstile1);
- uv_mutex_destroy(&barrier->mutex);
-}
-
-
-int uv_barrier_wait(uv_barrier_t* barrier) {
- int serial_thread;
-
- uv_mutex_lock(&barrier->mutex);
- if (++barrier->count == barrier->n) {
- uv_sem_wait(&barrier->turnstile2);
- uv_sem_post(&barrier->turnstile1);
- }
- uv_mutex_unlock(&barrier->mutex);
-
- uv_sem_wait(&barrier->turnstile1);
- uv_sem_post(&barrier->turnstile1);
-
- uv_mutex_lock(&barrier->mutex);
- serial_thread = (--barrier->count == 0);
- if (serial_thread) {
- uv_sem_wait(&barrier->turnstile1);
- uv_sem_post(&barrier->turnstile2);
- }
- uv_mutex_unlock(&barrier->mutex);
-
- uv_sem_wait(&barrier->turnstile2);
- uv_sem_post(&barrier->turnstile2);
- return serial_thread;
-}
-
-#else /* !(defined(__APPLE__) && defined(__MACH__)) */
-
-int uv_barrier_init(uv_barrier_t* barrier, unsigned int count) {
- return -pthread_barrier_init(barrier, NULL, count);
-}
-
-
-void uv_barrier_destroy(uv_barrier_t* barrier) {
- if (pthread_barrier_destroy(barrier))
- abort();
-}
-
-
-int uv_barrier_wait(uv_barrier_t* barrier) {
- int r = pthread_barrier_wait(barrier);
- if (r && r != PTHREAD_BARRIER_SERIAL_THREAD)
- abort();
- return r == PTHREAD_BARRIER_SERIAL_THREAD;
-}
-
-#endif /* defined(__APPLE__) && defined(__MACH__) */
-
-int uv_key_create(uv_key_t* key) {
- return -pthread_key_create(key, NULL);
-}
-
-
-void uv_key_delete(uv_key_t* key) {
- if (pthread_key_delete(*key))
- abort();
-}
-
-
-void* uv_key_get(uv_key_t* key) {
- return pthread_getspecific(*key);
-}
-
-
-void uv_key_set(uv_key_t* key, void* value) {
- if (pthread_setspecific(*key, value))
- abort();
-}
diff --git a/3rdparty/libuv/src/unix/timer.c b/3rdparty/libuv/src/unix/timer.c
deleted file mode 100644
index ca3ec3db957..00000000000
--- a/3rdparty/libuv/src/unix/timer.c
+++ /dev/null
@@ -1,172 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "internal.h"
-#include "heap-inl.h"
-
-#include <assert.h>
-#include <limits.h>
-
-
-static int timer_less_than(const struct heap_node* ha,
- const struct heap_node* hb) {
- const uv_timer_t* a;
- const uv_timer_t* b;
-
- a = container_of(ha, const uv_timer_t, heap_node);
- b = container_of(hb, const uv_timer_t, heap_node);
-
- if (a->timeout < b->timeout)
- return 1;
- if (b->timeout < a->timeout)
- return 0;
-
- /* Compare start_id when both have the same timeout. start_id is
- * allocated with loop->timer_counter in uv_timer_start().
- */
- if (a->start_id < b->start_id)
- return 1;
- if (b->start_id < a->start_id)
- return 0;
-
- return 0;
-}
-
-
-int uv_timer_init(uv_loop_t* loop, uv_timer_t* handle) {
- uv__handle_init(loop, (uv_handle_t*)handle, UV_TIMER);
- handle->timer_cb = NULL;
- handle->repeat = 0;
- return 0;
-}
-
-
-int uv_timer_start(uv_timer_t* handle,
- uv_timer_cb cb,
- uint64_t timeout,
- uint64_t repeat) {
- uint64_t clamped_timeout;
-
- if (cb == NULL)
- return -EINVAL;
-
- if (uv__is_active(handle))
- uv_timer_stop(handle);
-
- clamped_timeout = handle->loop->time + timeout;
- if (clamped_timeout < timeout)
- clamped_timeout = (uint64_t) -1;
-
- handle->timer_cb = cb;
- handle->timeout = clamped_timeout;
- handle->repeat = repeat;
- /* start_id is the second index to be compared in uv__timer_cmp() */
- handle->start_id = handle->loop->timer_counter++;
-
- heap_insert((struct heap*) &handle->loop->timer_heap,
- (struct heap_node*) &handle->heap_node,
- timer_less_than);
- uv__handle_start(handle);
-
- return 0;
-}
-
-
-int uv_timer_stop(uv_timer_t* handle) {
- if (!uv__is_active(handle))
- return 0;
-
- heap_remove((struct heap*) &handle->loop->timer_heap,
- (struct heap_node*) &handle->heap_node,
- timer_less_than);
- uv__handle_stop(handle);
-
- return 0;
-}
-
-
-int uv_timer_again(uv_timer_t* handle) {
- if (handle->timer_cb == NULL)
- return -EINVAL;
-
- if (handle->repeat) {
- uv_timer_stop(handle);
- uv_timer_start(handle, handle->timer_cb, handle->repeat, handle->repeat);
- }
-
- return 0;
-}
-
-
-void uv_timer_set_repeat(uv_timer_t* handle, uint64_t repeat) {
- handle->repeat = repeat;
-}
-
-
-uint64_t uv_timer_get_repeat(const uv_timer_t* handle) {
- return handle->repeat;
-}
-
-
-int uv__next_timeout(const uv_loop_t* loop) {
- const struct heap_node* heap_node;
- const uv_timer_t* handle;
- uint64_t diff;
-
- heap_node = heap_min((const struct heap*) &loop->timer_heap);
- if (heap_node == NULL)
- return -1; /* block indefinitely */
-
- handle = container_of(heap_node, const uv_timer_t, heap_node);
- if (handle->timeout <= loop->time)
- return 0;
-
- diff = handle->timeout - loop->time;
- if (diff > INT_MAX)
- diff = INT_MAX;
-
- return diff;
-}
-
-
-void uv__run_timers(uv_loop_t* loop) {
- struct heap_node* heap_node;
- uv_timer_t* handle;
-
- for (;;) {
- heap_node = heap_min((struct heap*) &loop->timer_heap);
- if (heap_node == NULL)
- break;
-
- handle = container_of(heap_node, uv_timer_t, heap_node);
- if (handle->timeout > loop->time)
- break;
-
- uv_timer_stop(handle);
- uv_timer_again(handle);
- handle->timer_cb(handle);
- }
-}
-
-
-void uv__timer_close(uv_timer_t* handle) {
- uv_timer_stop(handle);
-}
diff --git a/3rdparty/libuv/src/unix/tty.c b/3rdparty/libuv/src/unix/tty.c
deleted file mode 100644
index 7cc5b714ed3..00000000000
--- a/3rdparty/libuv/src/unix/tty.c
+++ /dev/null
@@ -1,279 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "internal.h"
-#include "spinlock.h"
-
-#include <assert.h>
-#include <unistd.h>
-#include <termios.h>
-#include <errno.h>
-#include <sys/ioctl.h>
-
-static int orig_termios_fd = -1;
-static struct termios orig_termios;
-static uv_spinlock_t termios_spinlock = UV_SPINLOCK_INITIALIZER;
-
-
-int uv_tty_init(uv_loop_t* loop, uv_tty_t* tty, int fd, int readable) {
- uv_handle_type type;
- int flags;
- int newfd;
- int r;
-
- /* File descriptors that refer to files cannot be monitored with epoll.
- * That restriction also applies to character devices like /dev/random
- * (but obviously not /dev/tty.)
- */
- type = uv_guess_handle(fd);
- if (type == UV_FILE || type == UV_UNKNOWN_HANDLE)
- return -EINVAL;
-
- flags = 0;
- newfd = -1;
-
- /* Reopen the file descriptor when it refers to a tty. This lets us put the
- * tty in non-blocking mode without affecting other processes that share it
- * with us.
- *
- * Example: `node | cat` - if we put our fd 0 in non-blocking mode, it also
- * affects fd 1 of `cat` because both file descriptors refer to the same
- * struct file in the kernel. When we reopen our fd 0, it points to a
- * different struct file, hence changing its properties doesn't affect
- * other processes.
- */
- if (type == UV_TTY) {
- r = uv__open_cloexec("/dev/tty", O_RDWR);
-
- if (r < 0) {
- /* fallback to using blocking writes */
- if (!readable)
- flags |= UV_STREAM_BLOCKING;
- goto skip;
- }
-
- newfd = r;
-
- r = uv__dup2_cloexec(newfd, fd);
- if (r < 0 && r != -EINVAL) {
- /* EINVAL means newfd == fd which could conceivably happen if another
- * thread called close(fd) between our calls to isatty() and open().
- * That's a rather unlikely event but let's handle it anyway.
- */
- uv__close(newfd);
- return r;
- }
-
- fd = newfd;
- }
-
-skip:
- uv__stream_init(loop, (uv_stream_t*) tty, UV_TTY);
-
- /* If anything fails beyond this point we need to remove the handle from
- * the handle queue, since it was added by uv__handle_init in uv_stream_init.
- */
-
-#if defined(__APPLE__)
- r = uv__stream_try_select((uv_stream_t*) tty, &fd);
- if (r) {
- if (newfd != -1)
- uv__close(newfd);
- QUEUE_REMOVE(&tty->handle_queue);
- return r;
- }
-#endif
-
- if (readable)
- flags |= UV_STREAM_READABLE;
- else
- flags |= UV_STREAM_WRITABLE;
-
- if (!(flags & UV_STREAM_BLOCKING))
- uv__nonblock(fd, 1);
-
- uv__stream_open((uv_stream_t*) tty, fd, flags);
- tty->mode = UV_TTY_MODE_NORMAL;
-
- return 0;
-}
-
-static void uv__tty_make_raw(struct termios* tio) {
- assert(tio != NULL);
-
-#ifdef __sun
- /*
- * This implementation of cfmakeraw for Solaris and derivatives is taken from
- * http://www.perkin.org.uk/posts/solaris-portability-cfmakeraw.html.
- */
- tio->c_iflag &= ~(IMAXBEL | IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR |
- IGNCR | ICRNL | IXON);
- tio->c_oflag &= ~OPOST;
- tio->c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
- tio->c_cflag &= ~(CSIZE | PARENB);
- tio->c_cflag |= CS8;
-#else
- cfmakeraw(tio);
-#endif /* #ifdef __sun */
-}
-
-int uv_tty_set_mode(uv_tty_t* tty, uv_tty_mode_t mode) {
- struct termios tmp;
- int fd;
-
- if (tty->mode == (int) mode)
- return 0;
-
- fd = uv__stream_fd(tty);
- if (tty->mode == UV_TTY_MODE_NORMAL && mode != UV_TTY_MODE_NORMAL) {
- if (tcgetattr(fd, &tty->orig_termios))
- return -errno;
-
- /* This is used for uv_tty_reset_mode() */
- uv_spinlock_lock(&termios_spinlock);
- if (orig_termios_fd == -1) {
- orig_termios = tty->orig_termios;
- orig_termios_fd = fd;
- }
- uv_spinlock_unlock(&termios_spinlock);
- }
-
- tmp = tty->orig_termios;
- switch (mode) {
- case UV_TTY_MODE_NORMAL:
- break;
- case UV_TTY_MODE_RAW:
- tmp.c_iflag &= ~(BRKINT | ICRNL | INPCK | ISTRIP | IXON);
- tmp.c_oflag |= (ONLCR);
- tmp.c_cflag |= (CS8);
- tmp.c_lflag &= ~(ECHO | ICANON | IEXTEN | ISIG);
- tmp.c_cc[VMIN] = 1;
- tmp.c_cc[VTIME] = 0;
- break;
- case UV_TTY_MODE_IO:
- uv__tty_make_raw(&tmp);
- break;
- }
-
- /* Apply changes after draining */
- if (tcsetattr(fd, TCSADRAIN, &tmp))
- return -errno;
-
- tty->mode = mode;
- return 0;
-}
-
-
-int uv_tty_get_winsize(uv_tty_t* tty, int* width, int* height) {
- struct winsize ws;
-
- if (ioctl(uv__stream_fd(tty), TIOCGWINSZ, &ws))
- return -errno;
-
- *width = ws.ws_col;
- *height = ws.ws_row;
-
- return 0;
-}
-
-
-uv_handle_type uv_guess_handle(uv_file file) {
- struct sockaddr sa;
- struct stat s;
- socklen_t len;
- int type;
-
- if (file < 0)
- return UV_UNKNOWN_HANDLE;
-
- if (isatty(file))
- return UV_TTY;
-
- if (fstat(file, &s))
- return UV_UNKNOWN_HANDLE;
-
- if (S_ISREG(s.st_mode))
- return UV_FILE;
-
- if (S_ISCHR(s.st_mode))
- return UV_FILE; /* XXX UV_NAMED_PIPE? */
-
- if (S_ISFIFO(s.st_mode))
- return UV_NAMED_PIPE;
-
- if (!S_ISSOCK(s.st_mode))
- return UV_UNKNOWN_HANDLE;
-
- len = sizeof(type);
- if (getsockopt(file, SOL_SOCKET, SO_TYPE, &type, &len))
- return UV_UNKNOWN_HANDLE;
-
- len = sizeof(sa);
- if (getsockname(file, &sa, &len))
- return UV_UNKNOWN_HANDLE;
-
- if (type == SOCK_DGRAM)
- if (sa.sa_family == AF_INET || sa.sa_family == AF_INET6)
- return UV_UDP;
-
- if (type == SOCK_STREAM) {
-#if defined(_AIX)
- /* on AIX the getsockname call returns an empty sa structure
- * for sockets of type AF_UNIX. For all other types it will
- * return a properly filled in structure.
- */
- if (len == 0)
- return UV_NAMED_PIPE;
-#endif /* defined(_AIX) */
-
- if (sa.sa_family == AF_INET || sa.sa_family == AF_INET6)
- return UV_TCP;
- if (sa.sa_family == AF_UNIX)
- return UV_NAMED_PIPE;
- }
-
- return UV_UNKNOWN_HANDLE;
-}
-
-
-/* This function is async signal-safe, meaning that it's safe to call from
- * inside a signal handler _unless_ execution was inside uv_tty_set_mode()'s
- * critical section when the signal was raised.
- */
-int uv_tty_reset_mode(void) {
- int saved_errno;
- int err;
-
- saved_errno = errno;
- if (!uv_spinlock_trylock(&termios_spinlock))
- return -EBUSY; /* In uv_tty_set_mode(). */
-
- err = 0;
- if (orig_termios_fd != -1)
- if (tcsetattr(orig_termios_fd, TCSANOW, &orig_termios))
- err = -errno;
-
- uv_spinlock_unlock(&termios_spinlock);
- errno = saved_errno;
-
- return err;
-}
diff --git a/3rdparty/libuv/src/unix/udp.c b/3rdparty/libuv/src/unix/udp.c
deleted file mode 100644
index 39ade8de338..00000000000
--- a/3rdparty/libuv/src/unix/udp.c
+++ /dev/null
@@ -1,873 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "internal.h"
-
-#include <assert.h>
-#include <string.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#if defined(IPV6_JOIN_GROUP) && !defined(IPV6_ADD_MEMBERSHIP)
-# define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP
-#endif
-
-#if defined(IPV6_LEAVE_GROUP) && !defined(IPV6_DROP_MEMBERSHIP)
-# define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP
-#endif
-
-
-static void uv__udp_run_completed(uv_udp_t* handle);
-static void uv__udp_io(uv_loop_t* loop, uv__io_t* w, unsigned int revents);
-static void uv__udp_recvmsg(uv_udp_t* handle);
-static void uv__udp_sendmsg(uv_udp_t* handle);
-static int uv__udp_maybe_deferred_bind(uv_udp_t* handle,
- int domain,
- unsigned int flags);
-
-
-void uv__udp_close(uv_udp_t* handle) {
- uv__io_close(handle->loop, &handle->io_watcher);
- uv__handle_stop(handle);
-
- if (handle->io_watcher.fd != -1) {
- uv__close(handle->io_watcher.fd);
- handle->io_watcher.fd = -1;
- }
-}
-
-
-void uv__udp_finish_close(uv_udp_t* handle) {
- uv_udp_send_t* req;
- QUEUE* q;
-
- assert(!uv__io_active(&handle->io_watcher, UV__POLLIN | UV__POLLOUT));
- assert(handle->io_watcher.fd == -1);
-
- while (!QUEUE_EMPTY(&handle->write_queue)) {
- q = QUEUE_HEAD(&handle->write_queue);
- QUEUE_REMOVE(q);
-
- req = QUEUE_DATA(q, uv_udp_send_t, queue);
- req->status = -ECANCELED;
- QUEUE_INSERT_TAIL(&handle->write_completed_queue, &req->queue);
- }
-
- uv__udp_run_completed(handle);
-
- assert(handle->send_queue_size == 0);
- assert(handle->send_queue_count == 0);
-
- /* Now tear down the handle. */
- handle->recv_cb = NULL;
- handle->alloc_cb = NULL;
- /* but _do not_ touch close_cb */
-}
-
-
-static void uv__udp_run_completed(uv_udp_t* handle) {
- uv_udp_send_t* req;
- QUEUE* q;
-
- assert(!(handle->flags & UV_UDP_PROCESSING));
- handle->flags |= UV_UDP_PROCESSING;
-
- while (!QUEUE_EMPTY(&handle->write_completed_queue)) {
- q = QUEUE_HEAD(&handle->write_completed_queue);
- QUEUE_REMOVE(q);
-
- req = QUEUE_DATA(q, uv_udp_send_t, queue);
- uv__req_unregister(handle->loop, req);
-
- handle->send_queue_size -= uv__count_bufs(req->bufs, req->nbufs);
- handle->send_queue_count--;
-
- if (req->bufs != req->bufsml)
- uv__free(req->bufs);
- req->bufs = NULL;
-
- if (req->send_cb == NULL)
- continue;
-
- /* req->status >= 0 == bytes written
- * req->status < 0 == errno
- */
- if (req->status >= 0)
- req->send_cb(req, 0);
- else
- req->send_cb(req, req->status);
- }
-
- if (QUEUE_EMPTY(&handle->write_queue)) {
- /* Pending queue and completion queue empty, stop watcher. */
- uv__io_stop(handle->loop, &handle->io_watcher, UV__POLLOUT);
- if (!uv__io_active(&handle->io_watcher, UV__POLLIN))
- uv__handle_stop(handle);
- }
-
- handle->flags &= ~UV_UDP_PROCESSING;
-}
-
-
-static void uv__udp_io(uv_loop_t* loop, uv__io_t* w, unsigned int revents) {
- uv_udp_t* handle;
-
- handle = container_of(w, uv_udp_t, io_watcher);
- assert(handle->type == UV_UDP);
-
- if (revents & UV__POLLIN)
- uv__udp_recvmsg(handle);
-
- if (revents & UV__POLLOUT) {
- uv__udp_sendmsg(handle);
- uv__udp_run_completed(handle);
- }
-}
-
-
-static void uv__udp_recvmsg(uv_udp_t* handle) {
- struct sockaddr_storage peer;
- struct msghdr h;
- ssize_t nread;
- uv_buf_t buf;
- int flags;
- int count;
-
- assert(handle->recv_cb != NULL);
- assert(handle->alloc_cb != NULL);
-
- /* Prevent loop starvation when the data comes in as fast as (or faster than)
- * we can read it. XXX Need to rearm fd if we switch to edge-triggered I/O.
- */
- count = 32;
-
- memset(&h, 0, sizeof(h));
- h.msg_name = &peer;
-
- do {
- handle->alloc_cb((uv_handle_t*) handle, 64 * 1024, &buf);
- if (buf.len == 0) {
- handle->recv_cb(handle, UV_ENOBUFS, &buf, NULL, 0);
- return;
- }
- assert(buf.base != NULL);
-
- h.msg_namelen = sizeof(peer);
- h.msg_iov = (void*) &buf;
- h.msg_iovlen = 1;
-
- do {
- nread = recvmsg(handle->io_watcher.fd, &h, 0);
- }
- while (nread == -1 && errno == EINTR);
-
- if (nread == -1) {
- if (errno == EAGAIN || errno == EWOULDBLOCK)
- handle->recv_cb(handle, 0, &buf, NULL, 0);
- else
- handle->recv_cb(handle, -errno, &buf, NULL, 0);
- }
- else {
- const struct sockaddr *addr;
- if (h.msg_namelen == 0)
- addr = NULL;
- else
- addr = (const struct sockaddr*) &peer;
-
- flags = 0;
- if (h.msg_flags & MSG_TRUNC)
- flags |= UV_UDP_PARTIAL;
-
- handle->recv_cb(handle, nread, &buf, addr, flags);
- }
- }
- /* recv_cb callback may decide to pause or close the handle */
- while (nread != -1
- && count-- > 0
- && handle->io_watcher.fd != -1
- && handle->recv_cb != NULL);
-}
-
-
-static void uv__udp_sendmsg(uv_udp_t* handle) {
- uv_udp_send_t* req;
- QUEUE* q;
- struct msghdr h;
- ssize_t size;
-
- while (!QUEUE_EMPTY(&handle->write_queue)) {
- q = QUEUE_HEAD(&handle->write_queue);
- assert(q != NULL);
-
- req = QUEUE_DATA(q, uv_udp_send_t, queue);
- assert(req != NULL);
-
- memset(&h, 0, sizeof h);
- h.msg_name = &req->addr;
- h.msg_namelen = (req->addr.ss_family == AF_INET6 ?
- sizeof(struct sockaddr_in6) : sizeof(struct sockaddr_in));
- h.msg_iov = (struct iovec*) req->bufs;
- h.msg_iovlen = req->nbufs;
-
- do {
- size = sendmsg(handle->io_watcher.fd, &h, 0);
- } while (size == -1 && errno == EINTR);
-
- if (size == -1 && (errno == EAGAIN || errno == EWOULDBLOCK))
- break;
-
- req->status = (size == -1 ? -errno : size);
-
- /* Sending a datagram is an atomic operation: either all data
- * is written or nothing is (and EMSGSIZE is raised). That is
- * why we don't handle partial writes. Just pop the request
- * off the write queue and onto the completed queue, done.
- */
- QUEUE_REMOVE(&req->queue);
- QUEUE_INSERT_TAIL(&handle->write_completed_queue, &req->queue);
- uv__io_feed(handle->loop, &handle->io_watcher);
- }
-}
-
-
-/* On the BSDs, SO_REUSEPORT implies SO_REUSEADDR but with some additional
- * refinements for programs that use multicast.
- *
- * Linux as of 3.9 has a SO_REUSEPORT socket option but with semantics that
- * are different from the BSDs: it _shares_ the port rather than steal it
- * from the current listener. While useful, it's not something we can emulate
- * on other platforms so we don't enable it.
- */
-static int uv__set_reuse(int fd) {
- int yes;
-
-#if defined(SO_REUSEPORT) && !defined(__linux__)
- yes = 1;
- if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &yes, sizeof(yes)))
- return -errno;
-#else
- yes = 1;
- if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(yes)))
- return -errno;
-#endif
-
- return 0;
-}
-
-
-int uv__udp_bind(uv_udp_t* handle,
- const struct sockaddr* addr,
- unsigned int addrlen,
- unsigned int flags) {
- int err;
- int yes;
- int fd;
-
- /* Check for bad flags. */
- if (flags & ~(UV_UDP_IPV6ONLY | UV_UDP_REUSEADDR))
- return -EINVAL;
-
- /* Cannot set IPv6-only mode on non-IPv6 socket. */
- if ((flags & UV_UDP_IPV6ONLY) && addr->sa_family != AF_INET6)
- return -EINVAL;
-
- fd = handle->io_watcher.fd;
- if (fd == -1) {
- err = uv__socket(addr->sa_family, SOCK_DGRAM, 0);
- if (err < 0)
- return err;
- fd = err;
- handle->io_watcher.fd = fd;
- }
-
- if (flags & UV_UDP_REUSEADDR) {
- err = uv__set_reuse(fd);
- if (err)
- goto out;
- }
-
- if (flags & UV_UDP_IPV6ONLY) {
-#ifdef IPV6_V6ONLY
- yes = 1;
- if (setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, &yes, sizeof yes) == -1) {
- err = -errno;
- goto out;
- }
-#else
- err = -ENOTSUP;
- goto out;
-#endif
- }
-
- if (bind(fd, addr, addrlen)) {
- err = -errno;
- if (errno == EAFNOSUPPORT)
- /* OSX, other BSDs and SunoS fail with EAFNOSUPPORT when binding a
- * socket created with AF_INET to an AF_INET6 address or vice versa. */
- err = -EINVAL;
- goto out;
- }
-
- if (addr->sa_family == AF_INET6)
- handle->flags |= UV_HANDLE_IPV6;
-
- return 0;
-
-out:
- uv__close(handle->io_watcher.fd);
- handle->io_watcher.fd = -1;
- return err;
-}
-
-
-static int uv__udp_maybe_deferred_bind(uv_udp_t* handle,
- int domain,
- unsigned int flags) {
- unsigned char taddr[sizeof(struct sockaddr_in6)];
- socklen_t addrlen;
-
- if (handle->io_watcher.fd != -1)
- return 0;
-
- switch (domain) {
- case AF_INET:
- {
- struct sockaddr_in* addr = (void*)&taddr;
- memset(addr, 0, sizeof *addr);
- addr->sin_family = AF_INET;
- addr->sin_addr.s_addr = INADDR_ANY;
- addrlen = sizeof *addr;
- break;
- }
- case AF_INET6:
- {
- struct sockaddr_in6* addr = (void*)&taddr;
- memset(addr, 0, sizeof *addr);
- addr->sin6_family = AF_INET6;
- addr->sin6_addr = in6addr_any;
- addrlen = sizeof *addr;
- break;
- }
- default:
- assert(0 && "unsupported address family");
- abort();
- }
-
- return uv__udp_bind(handle, (const struct sockaddr*) &taddr, addrlen, flags);
-}
-
-
-int uv__udp_send(uv_udp_send_t* req,
- uv_udp_t* handle,
- const uv_buf_t bufs[],
- unsigned int nbufs,
- const struct sockaddr* addr,
- unsigned int addrlen,
- uv_udp_send_cb send_cb) {
- int err;
- int empty_queue;
-
- assert(nbufs > 0);
-
- err = uv__udp_maybe_deferred_bind(handle, addr->sa_family, 0);
- if (err)
- return err;
-
- /* It's legal for send_queue_count > 0 even when the write_queue is empty;
- * it means there are error-state requests in the write_completed_queue that
- * will touch up send_queue_size/count later.
- */
- empty_queue = (handle->send_queue_count == 0);
-
- uv__req_init(handle->loop, req, UV_UDP_SEND);
- assert(addrlen <= sizeof(req->addr));
- memcpy(&req->addr, addr, addrlen);
- req->send_cb = send_cb;
- req->handle = handle;
- req->nbufs = nbufs;
-
- req->bufs = req->bufsml;
- if (nbufs > ARRAY_SIZE(req->bufsml))
- req->bufs = uv__malloc(nbufs * sizeof(bufs[0]));
-
- if (req->bufs == NULL) {
- uv__req_unregister(handle->loop, req);
- return -ENOMEM;
- }
-
- memcpy(req->bufs, bufs, nbufs * sizeof(bufs[0]));
- handle->send_queue_size += uv__count_bufs(req->bufs, req->nbufs);
- handle->send_queue_count++;
- QUEUE_INSERT_TAIL(&handle->write_queue, &req->queue);
- uv__handle_start(handle);
-
- if (empty_queue && !(handle->flags & UV_UDP_PROCESSING)) {
- uv__udp_sendmsg(handle);
- } else {
- uv__io_start(handle->loop, &handle->io_watcher, UV__POLLOUT);
- }
-
- return 0;
-}
-
-
-int uv__udp_try_send(uv_udp_t* handle,
- const uv_buf_t bufs[],
- unsigned int nbufs,
- const struct sockaddr* addr,
- unsigned int addrlen) {
- int err;
- struct msghdr h;
- ssize_t size;
-
- assert(nbufs > 0);
-
- /* already sending a message */
- if (handle->send_queue_count != 0)
- return -EAGAIN;
-
- err = uv__udp_maybe_deferred_bind(handle, addr->sa_family, 0);
- if (err)
- return err;
-
- memset(&h, 0, sizeof h);
- h.msg_name = (struct sockaddr*) addr;
- h.msg_namelen = addrlen;
- h.msg_iov = (struct iovec*) bufs;
- h.msg_iovlen = nbufs;
-
- do {
- size = sendmsg(handle->io_watcher.fd, &h, 0);
- } while (size == -1 && errno == EINTR);
-
- if (size == -1) {
- if (errno == EAGAIN || errno == EWOULDBLOCK)
- return -EAGAIN;
- else
- return -errno;
- }
-
- return size;
-}
-
-
-static int uv__udp_set_membership4(uv_udp_t* handle,
- const struct sockaddr_in* multicast_addr,
- const char* interface_addr,
- uv_membership membership) {
- struct ip_mreq mreq;
- int optname;
- int err;
-
- memset(&mreq, 0, sizeof mreq);
-
- if (interface_addr) {
- err = uv_inet_pton(AF_INET, interface_addr, &mreq.imr_interface.s_addr);
- if (err)
- return err;
- } else {
- mreq.imr_interface.s_addr = htonl(INADDR_ANY);
- }
-
- mreq.imr_multiaddr.s_addr = multicast_addr->sin_addr.s_addr;
-
- switch (membership) {
- case UV_JOIN_GROUP:
- optname = IP_ADD_MEMBERSHIP;
- break;
- case UV_LEAVE_GROUP:
- optname = IP_DROP_MEMBERSHIP;
- break;
- default:
- return -EINVAL;
- }
-
- if (setsockopt(handle->io_watcher.fd,
- IPPROTO_IP,
- optname,
- &mreq,
- sizeof(mreq))) {
- return -errno;
- }
-
- return 0;
-}
-
-
-static int uv__udp_set_membership6(uv_udp_t* handle,
- const struct sockaddr_in6* multicast_addr,
- const char* interface_addr,
- uv_membership membership) {
- int optname;
- struct ipv6_mreq mreq;
- struct sockaddr_in6 addr6;
-
- memset(&mreq, 0, sizeof mreq);
-
- if (interface_addr) {
- if (uv_ip6_addr(interface_addr, 0, &addr6))
- return -EINVAL;
- mreq.ipv6mr_interface = addr6.sin6_scope_id;
- } else {
- mreq.ipv6mr_interface = 0;
- }
-
- mreq.ipv6mr_multiaddr = multicast_addr->sin6_addr;
-
- switch (membership) {
- case UV_JOIN_GROUP:
- optname = IPV6_ADD_MEMBERSHIP;
- break;
- case UV_LEAVE_GROUP:
- optname = IPV6_DROP_MEMBERSHIP;
- break;
- default:
- return -EINVAL;
- }
-
- if (setsockopt(handle->io_watcher.fd,
- IPPROTO_IPV6,
- optname,
- &mreq,
- sizeof(mreq))) {
- return -errno;
- }
-
- return 0;
-}
-
-
-int uv_udp_init_ex(uv_loop_t* loop, uv_udp_t* handle, unsigned int flags) {
- int domain;
- int err;
- int fd;
-
- /* Use the lower 8 bits for the domain */
- domain = flags & 0xFF;
- if (domain != AF_INET && domain != AF_INET6 && domain != AF_UNSPEC)
- return -EINVAL;
-
- if (flags & ~0xFF)
- return -EINVAL;
-
- if (domain != AF_UNSPEC) {
- err = uv__socket(domain, SOCK_DGRAM, 0);
- if (err < 0)
- return err;
- fd = err;
- } else {
- fd = -1;
- }
-
- uv__handle_init(loop, (uv_handle_t*)handle, UV_UDP);
- handle->alloc_cb = NULL;
- handle->recv_cb = NULL;
- handle->send_queue_size = 0;
- handle->send_queue_count = 0;
- uv__io_init(&handle->io_watcher, uv__udp_io, fd);
- QUEUE_INIT(&handle->write_queue);
- QUEUE_INIT(&handle->write_completed_queue);
- return 0;
-}
-
-
-int uv_udp_init(uv_loop_t* loop, uv_udp_t* handle) {
- return uv_udp_init_ex(loop, handle, AF_UNSPEC);
-}
-
-
-int uv_udp_open(uv_udp_t* handle, uv_os_sock_t sock) {
- int err;
-
- /* Check for already active socket. */
- if (handle->io_watcher.fd != -1)
- return -EBUSY;
-
- err = uv__nonblock(sock, 1);
- if (err)
- return err;
-
- err = uv__set_reuse(sock);
- if (err)
- return err;
-
- handle->io_watcher.fd = sock;
- return 0;
-}
-
-
-int uv_udp_set_membership(uv_udp_t* handle,
- const char* multicast_addr,
- const char* interface_addr,
- uv_membership membership) {
- int err;
- struct sockaddr_in addr4;
- struct sockaddr_in6 addr6;
-
- if (uv_ip4_addr(multicast_addr, 0, &addr4) == 0) {
- err = uv__udp_maybe_deferred_bind(handle, AF_INET, UV_UDP_REUSEADDR);
- if (err)
- return err;
- return uv__udp_set_membership4(handle, &addr4, interface_addr, membership);
- } else if (uv_ip6_addr(multicast_addr, 0, &addr6) == 0) {
- err = uv__udp_maybe_deferred_bind(handle, AF_INET6, UV_UDP_REUSEADDR);
- if (err)
- return err;
- return uv__udp_set_membership6(handle, &addr6, interface_addr, membership);
- } else {
- return -EINVAL;
- }
-}
-
-static int uv__setsockopt(uv_udp_t* handle,
- int option4,
- int option6,
- const void* val,
- size_t size) {
- int r;
-
- if (handle->flags & UV_HANDLE_IPV6)
- r = setsockopt(handle->io_watcher.fd,
- IPPROTO_IPV6,
- option6,
- val,
- size);
- else
- r = setsockopt(handle->io_watcher.fd,
- IPPROTO_IP,
- option4,
- val,
- size);
- if (r)
- return -errno;
-
- return 0;
-}
-
-static int uv__setsockopt_maybe_char(uv_udp_t* handle,
- int option4,
- int option6,
- int val) {
-#if defined(__sun) || defined(_AIX)
- char arg = val;
-#elif defined(__OpenBSD__)
- unsigned char arg = val;
-#else
- int arg = val;
-#endif
-
- if (val < 0 || val > 255)
- return -EINVAL;
-
- return uv__setsockopt(handle, option4, option6, &arg, sizeof(arg));
-}
-
-
-int uv_udp_set_broadcast(uv_udp_t* handle, int on) {
- if (setsockopt(handle->io_watcher.fd,
- SOL_SOCKET,
- SO_BROADCAST,
- &on,
- sizeof(on))) {
- return -errno;
- }
-
- return 0;
-}
-
-
-int uv_udp_set_ttl(uv_udp_t* handle, int ttl) {
- if (ttl < 1 || ttl > 255)
- return -EINVAL;
-
-/*
- * On Solaris and derivatives such as SmartOS, the length of socket options
- * is sizeof(int) for IP_TTL and IPV6_UNICAST_HOPS,
- * so hardcode the size of these options on this platform,
- * and use the general uv__setsockopt_maybe_char call on other platforms.
- */
-#if defined(__sun) || defined(_AIX) || defined(__OpenBSD__)
- return uv__setsockopt(handle,
- IP_TTL,
- IPV6_UNICAST_HOPS,
- &ttl,
- sizeof(ttl));
-#endif /* defined(__sun) || defined(_AIX) || defined (__OpenBSD__) */
-
- return uv__setsockopt_maybe_char(handle,
- IP_TTL,
- IPV6_UNICAST_HOPS,
- ttl);
-}
-
-
-int uv_udp_set_multicast_ttl(uv_udp_t* handle, int ttl) {
-/*
- * On Solaris and derivatives such as SmartOS, the length of socket options
- * is sizeof(int) for IPV6_MULTICAST_HOPS and sizeof(char) for
- * IP_MULTICAST_TTL, so hardcode the size of the option in the IPv6 case,
- * and use the general uv__setsockopt_maybe_char call otherwise.
- */
-#if defined(__sun) || defined(_AIX)
- if (handle->flags & UV_HANDLE_IPV6)
- return uv__setsockopt(handle,
- IP_MULTICAST_TTL,
- IPV6_MULTICAST_HOPS,
- &ttl,
- sizeof(ttl));
-#endif /* defined(__sun) || defined(_AIX) */
-
- return uv__setsockopt_maybe_char(handle,
- IP_MULTICAST_TTL,
- IPV6_MULTICAST_HOPS,
- ttl);
-}
-
-
-int uv_udp_set_multicast_loop(uv_udp_t* handle, int on) {
-/*
- * On Solaris and derivatives such as SmartOS, the length of socket options
- * is sizeof(int) for IPV6_MULTICAST_LOOP and sizeof(char) for
- * IP_MULTICAST_LOOP, so hardcode the size of the option in the IPv6 case,
- * and use the general uv__setsockopt_maybe_char call otherwise.
- */
-#if defined(__sun) || defined(_AIX)
- if (handle->flags & UV_HANDLE_IPV6)
- return uv__setsockopt(handle,
- IP_MULTICAST_LOOP,
- IPV6_MULTICAST_LOOP,
- &on,
- sizeof(on));
-#endif /* defined(__sun) || defined(_AIX) */
-
- return uv__setsockopt_maybe_char(handle,
- IP_MULTICAST_LOOP,
- IPV6_MULTICAST_LOOP,
- on);
-}
-
-int uv_udp_set_multicast_interface(uv_udp_t* handle, const char* interface_addr) {
- struct sockaddr_storage addr_st;
- struct sockaddr_in* addr4;
- struct sockaddr_in6* addr6;
-
- addr4 = (struct sockaddr_in*) &addr_st;
- addr6 = (struct sockaddr_in6*) &addr_st;
-
- if (!interface_addr) {
- memset(&addr_st, 0, sizeof addr_st);
- if (handle->flags & UV_HANDLE_IPV6) {
- addr_st.ss_family = AF_INET6;
- addr6->sin6_scope_id = 0;
- } else {
- addr_st.ss_family = AF_INET;
- addr4->sin_addr.s_addr = htonl(INADDR_ANY);
- }
- } else if (uv_ip4_addr(interface_addr, 0, addr4) == 0) {
- /* nothing, address was parsed */
- } else if (uv_ip6_addr(interface_addr, 0, addr6) == 0) {
- /* nothing, address was parsed */
- } else {
- return -EINVAL;
- }
-
- if (addr_st.ss_family == AF_INET) {
- if (setsockopt(handle->io_watcher.fd,
- IPPROTO_IP,
- IP_MULTICAST_IF,
- (void*) &addr4->sin_addr,
- sizeof(addr4->sin_addr)) == -1) {
- return -errno;
- }
- } else if (addr_st.ss_family == AF_INET6) {
- if (setsockopt(handle->io_watcher.fd,
- IPPROTO_IPV6,
- IPV6_MULTICAST_IF,
- &addr6->sin6_scope_id,
- sizeof(addr6->sin6_scope_id)) == -1) {
- return -errno;
- }
- } else {
- assert(0 && "unexpected address family");
- abort();
- }
-
- return 0;
-}
-
-
-int uv_udp_getsockname(const uv_udp_t* handle,
- struct sockaddr* name,
- int* namelen) {
- socklen_t socklen;
-
- if (handle->io_watcher.fd == -1)
- return -EINVAL; /* FIXME(bnoordhuis) -EBADF */
-
- /* sizeof(socklen_t) != sizeof(int) on some systems. */
- socklen = (socklen_t) *namelen;
-
- if (getsockname(handle->io_watcher.fd, name, &socklen))
- return -errno;
-
- *namelen = (int) socklen;
- return 0;
-}
-
-
-int uv__udp_recv_start(uv_udp_t* handle,
- uv_alloc_cb alloc_cb,
- uv_udp_recv_cb recv_cb) {
- int err;
-
- if (alloc_cb == NULL || recv_cb == NULL)
- return -EINVAL;
-
- if (uv__io_active(&handle->io_watcher, UV__POLLIN))
- return -EALREADY; /* FIXME(bnoordhuis) Should be -EBUSY. */
-
- err = uv__udp_maybe_deferred_bind(handle, AF_INET, 0);
- if (err)
- return err;
-
- handle->alloc_cb = alloc_cb;
- handle->recv_cb = recv_cb;
-
- uv__io_start(handle->loop, &handle->io_watcher, UV__POLLIN);
- uv__handle_start(handle);
-
- return 0;
-}
-
-
-int uv__udp_recv_stop(uv_udp_t* handle) {
- uv__io_stop(handle->loop, &handle->io_watcher, UV__POLLIN);
-
- if (!uv__io_active(&handle->io_watcher, UV__POLLOUT))
- uv__handle_stop(handle);
-
- handle->alloc_cb = NULL;
- handle->recv_cb = NULL;
-
- return 0;
-}
diff --git a/3rdparty/libuv/src/uv-common.c b/3rdparty/libuv/src/uv-common.c
deleted file mode 100644
index 40ed28fec5a..00000000000
--- a/3rdparty/libuv/src/uv-common.c
+++ /dev/null
@@ -1,627 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "uv-common.h"
-
-#include <stdio.h>
-#include <assert.h>
-#include <stdarg.h>
-#include <stddef.h> /* NULL */
-#include <stdlib.h> /* malloc */
-#include <string.h> /* memset */
-
-#if defined(_WIN32)
-# include <malloc.h> /* malloc */
-#else
-# include <net/if.h> /* if_nametoindex */
-#endif
-
-
-typedef struct {
- uv_malloc_func local_malloc;
- uv_realloc_func local_realloc;
- uv_calloc_func local_calloc;
- uv_free_func local_free;
-} uv__allocator_t;
-
-static uv__allocator_t uv__allocator = {
- malloc,
- realloc,
- calloc,
- free,
-};
-
-char* uv__strdup(const char* s) {
- size_t len = strlen(s) + 1;
- char* m = uv__malloc(len);
- if (m == NULL)
- return NULL;
- return memcpy(m, s, len);
-}
-
-char* uv__strndup(const char* s, size_t n) {
- char* m;
- size_t len = strlen(s);
- if (n < len)
- len = n;
- m = uv__malloc(len + 1);
- if (m == NULL)
- return NULL;
- m[len] = '\0';
- return memcpy(m, s, len);
-}
-
-void* uv__malloc(size_t size) {
- return uv__allocator.local_malloc(size);
-}
-
-void uv__free(void* ptr) {
- uv__allocator.local_free(ptr);
-}
-
-void* uv__calloc(size_t count, size_t size) {
- return uv__allocator.local_calloc(count, size);
-}
-
-void* uv__realloc(void* ptr, size_t size) {
- return uv__allocator.local_realloc(ptr, size);
-}
-
-int uv_replace_allocator(uv_malloc_func malloc_func,
- uv_realloc_func realloc_func,
- uv_calloc_func calloc_func,
- uv_free_func free_func) {
- if (malloc_func == NULL || realloc_func == NULL ||
- calloc_func == NULL || free_func == NULL) {
- return UV_EINVAL;
- }
-
- uv__allocator.local_malloc = malloc_func;
- uv__allocator.local_realloc = realloc_func;
- uv__allocator.local_calloc = calloc_func;
- uv__allocator.local_free = free_func;
-
- return 0;
-}
-
-#define XX(uc, lc) case UV_##uc: return sizeof(uv_##lc##_t);
-
-size_t uv_handle_size(uv_handle_type type) {
- switch (type) {
- UV_HANDLE_TYPE_MAP(XX)
- default:
- return -1;
- }
-}
-
-size_t uv_req_size(uv_req_type type) {
- switch(type) {
- UV_REQ_TYPE_MAP(XX)
- default:
- return -1;
- }
-}
-
-#undef XX
-
-
-size_t uv_loop_size(void) {
- return sizeof(uv_loop_t);
-}
-
-
-uv_buf_t uv_buf_init(char* base, unsigned int len) {
- uv_buf_t buf;
- buf.base = base;
- buf.len = len;
- return buf;
-}
-
-
-static const char* uv__unknown_err_code(int err) {
- char buf[32];
- char* copy;
-
- snprintf(buf, sizeof(buf), "Unknown system error %d", err);
- copy = uv__strdup(buf);
-
- return copy != NULL ? copy : "Unknown system error";
-}
-
-
-#define UV_ERR_NAME_GEN(name, _) case UV_ ## name: return #name;
-const char* uv_err_name(int err) {
- switch (err) {
- UV_ERRNO_MAP(UV_ERR_NAME_GEN)
- }
- return uv__unknown_err_code(err);
-}
-#undef UV_ERR_NAME_GEN
-
-
-#define UV_STRERROR_GEN(name, msg) case UV_ ## name: return msg;
-const char* uv_strerror(int err) {
- switch (err) {
- UV_ERRNO_MAP(UV_STRERROR_GEN)
- }
- return uv__unknown_err_code(err);
-}
-#undef UV_STRERROR_GEN
-
-
-int uv_ip4_addr(const char* ip, int port, struct sockaddr_in* addr) {
- memset(addr, 0, sizeof(*addr));
- addr->sin_family = AF_INET;
- addr->sin_port = htons(port);
- return uv_inet_pton(AF_INET, ip, &(addr->sin_addr.s_addr));
-}
-
-
-int uv_ip6_addr(const char* ip, int port, struct sockaddr_in6* addr) {
- char address_part[40];
- size_t address_part_size;
- const char* zone_index;
-
- memset(addr, 0, sizeof(*addr));
- addr->sin6_family = AF_INET6;
- addr->sin6_port = htons(port);
-
- zone_index = strchr(ip, '%');
- if (zone_index != NULL) {
- address_part_size = zone_index - ip;
- if (address_part_size >= sizeof(address_part))
- address_part_size = sizeof(address_part) - 1;
-
- memcpy(address_part, ip, address_part_size);
- address_part[address_part_size] = '\0';
- ip = address_part;
-
- zone_index++; /* skip '%' */
- /* NOTE: unknown interface (id=0) is silently ignored */
-#ifdef _WIN32
- addr->sin6_scope_id = atoi(zone_index);
-#else
- addr->sin6_scope_id = if_nametoindex(zone_index);
-#endif
- }
-
- return uv_inet_pton(AF_INET6, ip, &addr->sin6_addr);
-}
-
-
-int uv_ip4_name(const struct sockaddr_in* src, char* dst, size_t size) {
- return uv_inet_ntop(AF_INET, &src->sin_addr, dst, size);
-}
-
-
-int uv_ip6_name(const struct sockaddr_in6* src, char* dst, size_t size) {
- return uv_inet_ntop(AF_INET6, &src->sin6_addr, dst, size);
-}
-
-
-int uv_tcp_bind(uv_tcp_t* handle,
- const struct sockaddr* addr,
- unsigned int flags) {
- unsigned int addrlen;
-
- if (handle->type != UV_TCP)
- return UV_EINVAL;
-
- if (addr->sa_family == AF_INET)
- addrlen = sizeof(struct sockaddr_in);
- else if (addr->sa_family == AF_INET6)
- addrlen = sizeof(struct sockaddr_in6);
- else
- return UV_EINVAL;
-
- return uv__tcp_bind(handle, addr, addrlen, flags);
-}
-
-
-int uv_udp_bind(uv_udp_t* handle,
- const struct sockaddr* addr,
- unsigned int flags) {
- unsigned int addrlen;
-
- if (handle->type != UV_UDP)
- return UV_EINVAL;
-
- if (addr->sa_family == AF_INET)
- addrlen = sizeof(struct sockaddr_in);
- else if (addr->sa_family == AF_INET6)
- addrlen = sizeof(struct sockaddr_in6);
- else
- return UV_EINVAL;
-
- return uv__udp_bind(handle, addr, addrlen, flags);
-}
-
-
-int uv_tcp_connect(uv_connect_t* req,
- uv_tcp_t* handle,
- const struct sockaddr* addr,
- uv_connect_cb cb) {
- unsigned int addrlen;
-
- if (handle->type != UV_TCP)
- return UV_EINVAL;
-
- if (addr->sa_family == AF_INET)
- addrlen = sizeof(struct sockaddr_in);
- else if (addr->sa_family == AF_INET6)
- addrlen = sizeof(struct sockaddr_in6);
- else
- return UV_EINVAL;
-
- return uv__tcp_connect(req, handle, addr, addrlen, cb);
-}
-
-
-int uv_udp_send(uv_udp_send_t* req,
- uv_udp_t* handle,
- const uv_buf_t bufs[],
- unsigned int nbufs,
- const struct sockaddr* addr,
- uv_udp_send_cb send_cb) {
- unsigned int addrlen;
-
- if (handle->type != UV_UDP)
- return UV_EINVAL;
-
- if (addr->sa_family == AF_INET)
- addrlen = sizeof(struct sockaddr_in);
- else if (addr->sa_family == AF_INET6)
- addrlen = sizeof(struct sockaddr_in6);
- else
- return UV_EINVAL;
-
- return uv__udp_send(req, handle, bufs, nbufs, addr, addrlen, send_cb);
-}
-
-
-int uv_udp_try_send(uv_udp_t* handle,
- const uv_buf_t bufs[],
- unsigned int nbufs,
- const struct sockaddr* addr) {
- unsigned int addrlen;
-
- if (handle->type != UV_UDP)
- return UV_EINVAL;
-
- if (addr->sa_family == AF_INET)
- addrlen = sizeof(struct sockaddr_in);
- else if (addr->sa_family == AF_INET6)
- addrlen = sizeof(struct sockaddr_in6);
- else
- return UV_EINVAL;
-
- return uv__udp_try_send(handle, bufs, nbufs, addr, addrlen);
-}
-
-
-int uv_udp_recv_start(uv_udp_t* handle,
- uv_alloc_cb alloc_cb,
- uv_udp_recv_cb recv_cb) {
- if (handle->type != UV_UDP || alloc_cb == NULL || recv_cb == NULL)
- return UV_EINVAL;
- else
- return uv__udp_recv_start(handle, alloc_cb, recv_cb);
-}
-
-
-int uv_udp_recv_stop(uv_udp_t* handle) {
- if (handle->type != UV_UDP)
- return UV_EINVAL;
- else
- return uv__udp_recv_stop(handle);
-}
-
-
-void uv_walk(uv_loop_t* loop, uv_walk_cb walk_cb, void* arg) {
- QUEUE queue;
- QUEUE* q;
- uv_handle_t* h;
-
- QUEUE_MOVE(&loop->handle_queue, &queue);
- while (!QUEUE_EMPTY(&queue)) {
- q = QUEUE_HEAD(&queue);
- h = QUEUE_DATA(q, uv_handle_t, handle_queue);
-
- QUEUE_REMOVE(q);
- QUEUE_INSERT_TAIL(&loop->handle_queue, q);
-
- if (h->flags & UV__HANDLE_INTERNAL) continue;
- walk_cb(h, arg);
- }
-}
-
-
-static void uv__print_handles(uv_loop_t* loop, int only_active, FILE* stream) {
- const char* type;
- QUEUE* q;
- uv_handle_t* h;
-
- if (loop == NULL)
- loop = uv_default_loop();
-
- QUEUE_FOREACH(q, &loop->handle_queue) {
- h = QUEUE_DATA(q, uv_handle_t, handle_queue);
-
- if (only_active && !uv__is_active(h))
- continue;
-
- switch (h->type) {
-#define X(uc, lc) case UV_##uc: type = #lc; break;
- UV_HANDLE_TYPE_MAP(X)
-#undef X
- default: type = "<unknown>";
- }
-
- fprintf(stream,
- "[%c%c%c] %-8s %p\n",
- "R-"[!(h->flags & UV__HANDLE_REF)],
- "A-"[!(h->flags & UV__HANDLE_ACTIVE)],
- "I-"[!(h->flags & UV__HANDLE_INTERNAL)],
- type,
- (void*)h);
- }
-}
-
-
-void uv_print_all_handles(uv_loop_t* loop, FILE* stream) {
- uv__print_handles(loop, 0, stream);
-}
-
-
-void uv_print_active_handles(uv_loop_t* loop, FILE* stream) {
- uv__print_handles(loop, 1, stream);
-}
-
-
-void uv_ref(uv_handle_t* handle) {
- uv__handle_ref(handle);
-}
-
-
-void uv_unref(uv_handle_t* handle) {
- uv__handle_unref(handle);
-}
-
-
-int uv_has_ref(const uv_handle_t* handle) {
- return uv__has_ref(handle);
-}
-
-
-void uv_stop(uv_loop_t* loop) {
- loop->stop_flag = 1;
-}
-
-
-uint64_t uv_now(const uv_loop_t* loop) {
- return loop->time;
-}
-
-
-
-size_t uv__count_bufs(const uv_buf_t bufs[], unsigned int nbufs) {
- unsigned int i;
- size_t bytes;
-
- bytes = 0;
- for (i = 0; i < nbufs; i++)
- bytes += (size_t) bufs[i].len;
-
- return bytes;
-}
-
-int uv_recv_buffer_size(uv_handle_t* handle, int* value) {
- return uv__socket_sockopt(handle, SO_RCVBUF, value);
-}
-
-int uv_send_buffer_size(uv_handle_t* handle, int *value) {
- return uv__socket_sockopt(handle, SO_SNDBUF, value);
-}
-
-int uv_fs_event_getpath(uv_fs_event_t* handle, char* buffer, size_t* size) {
- size_t required_len;
-
- if (!uv__is_active(handle)) {
- *size = 0;
- return UV_EINVAL;
- }
-
- required_len = strlen(handle->path);
- if (required_len > *size) {
- *size = required_len;
- return UV_ENOBUFS;
- }
-
- memcpy(buffer, handle->path, required_len);
- *size = required_len;
-
- return 0;
-}
-
-/* The windows implementation does not have the same structure layout as
- * the unix implementation (nbufs is not directly inside req but is
- * contained in a nested union/struct) so this function locates it.
-*/
-static unsigned int* uv__get_nbufs(uv_fs_t* req) {
-#ifdef _WIN32
- return &req->fs.info.nbufs;
-#else
- return &req->nbufs;
-#endif
-}
-
-void uv__fs_scandir_cleanup(uv_fs_t* req) {
- uv__dirent_t** dents;
-
- unsigned int* nbufs = uv__get_nbufs(req);
-
- dents = req->ptr;
- if (*nbufs > 0 && *nbufs != (unsigned int) req->result)
- (*nbufs)--;
- for (; *nbufs < (unsigned int) req->result; (*nbufs)++)
- uv__free(dents[*nbufs]);
-}
-
-
-int uv_fs_scandir_next(uv_fs_t* req, uv_dirent_t* ent) {
- uv__dirent_t** dents;
- uv__dirent_t* dent;
-
- unsigned int* nbufs = uv__get_nbufs(req);
-
- dents = req->ptr;
-
- /* Free previous entity */
- if (*nbufs > 0)
- uv__free(dents[*nbufs - 1]);
-
- /* End was already reached */
- if (*nbufs == (unsigned int) req->result) {
- uv__free(dents);
- req->ptr = NULL;
- return UV_EOF;
- }
-
- dent = dents[(*nbufs)++];
-
- ent->name = dent->d_name;
-#ifdef HAVE_DIRENT_TYPES
- switch (dent->d_type) {
- case UV__DT_DIR:
- ent->type = UV_DIRENT_DIR;
- break;
- case UV__DT_FILE:
- ent->type = UV_DIRENT_FILE;
- break;
- case UV__DT_LINK:
- ent->type = UV_DIRENT_LINK;
- break;
- case UV__DT_FIFO:
- ent->type = UV_DIRENT_FIFO;
- break;
- case UV__DT_SOCKET:
- ent->type = UV_DIRENT_SOCKET;
- break;
- case UV__DT_CHAR:
- ent->type = UV_DIRENT_CHAR;
- break;
- case UV__DT_BLOCK:
- ent->type = UV_DIRENT_BLOCK;
- break;
- default:
- ent->type = UV_DIRENT_UNKNOWN;
- }
-#else
- ent->type = UV_DIRENT_UNKNOWN;
-#endif
-
- return 0;
-}
-
-
-int uv_loop_configure(uv_loop_t* loop, uv_loop_option option, ...) {
- va_list ap;
- int err;
-
- va_start(ap, option);
- /* Any platform-agnostic options should be handled here. */
- err = uv__loop_configure(loop, option, ap);
- va_end(ap);
-
- return err;
-}
-
-
-static uv_loop_t default_loop_struct;
-static uv_loop_t* default_loop_ptr;
-
-
-uv_loop_t* uv_default_loop(void) {
- if (default_loop_ptr != NULL)
- return default_loop_ptr;
-
- if (uv_loop_init(&default_loop_struct))
- return NULL;
-
- default_loop_ptr = &default_loop_struct;
- return default_loop_ptr;
-}
-
-
-uv_loop_t* uv_loop_new(void) {
- uv_loop_t* loop;
-
- loop = uv__malloc(sizeof(*loop));
- if (loop == NULL)
- return NULL;
-
- if (uv_loop_init(loop)) {
- uv__free(loop);
- return NULL;
- }
-
- return loop;
-}
-
-
-int uv_loop_close(uv_loop_t* loop) {
- QUEUE* q;
- uv_handle_t* h;
-
- if (!QUEUE_EMPTY(&(loop)->active_reqs))
- return UV_EBUSY;
-
- QUEUE_FOREACH(q, &loop->handle_queue) {
- h = QUEUE_DATA(q, uv_handle_t, handle_queue);
- if (!(h->flags & UV__HANDLE_INTERNAL))
- return UV_EBUSY;
- }
-
- uv__loop_close(loop);
-
-#ifndef NDEBUG
- memset(loop, -1, sizeof(*loop));
-#endif
- if (loop == default_loop_ptr)
- default_loop_ptr = NULL;
-
- return 0;
-}
-
-
-void uv_loop_delete(uv_loop_t* loop) {
- uv_loop_t* default_loop;
- int err;
-
- default_loop = default_loop_ptr;
-
- err = uv_loop_close(loop);
- (void) err; /* Squelch compiler warnings. */
- assert(err == 0);
- if (loop != default_loop)
- uv__free(loop);
-}
diff --git a/3rdparty/libuv/src/uv-common.h b/3rdparty/libuv/src/uv-common.h
deleted file mode 100644
index 27902fdf864..00000000000
--- a/3rdparty/libuv/src/uv-common.h
+++ /dev/null
@@ -1,227 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-/*
- * This file is private to libuv. It provides common functionality to both
- * Windows and Unix backends.
- */
-
-#ifndef UV_COMMON_H_
-#define UV_COMMON_H_
-
-#include <assert.h>
-#include <stdarg.h>
-#include <stddef.h>
-
-#if defined(_MSC_VER) && _MSC_VER < 1600
-# include "stdint-msvc2008.h"
-#else
-# include <stdint.h>
-#endif
-
-#include "uv.h"
-#include "tree.h"
-#include "queue.h"
-
-#if !defined(snprintf) && defined(_MSC_VER) && _MSC_VER < 1900
-extern int snprintf(char*, size_t, const char*, ...);
-#endif
-
-#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
-
-#define container_of(ptr, type, member) \
- ((type *) ((char *) (ptr) - offsetof(type, member)))
-
-#define STATIC_ASSERT(expr) \
- void uv__static_assert(int static_assert_failed[1 - 2 * !(expr)])
-
-#ifndef _WIN32
-enum {
- UV__HANDLE_INTERNAL = 0x8000,
- UV__HANDLE_ACTIVE = 0x4000,
- UV__HANDLE_REF = 0x2000,
- UV__HANDLE_CLOSING = 0 /* no-op on unix */
-};
-#else
-# define UV__HANDLE_INTERNAL 0x80
-# define UV__HANDLE_ACTIVE 0x40
-# define UV__HANDLE_REF 0x20
-# define UV__HANDLE_CLOSING 0x01
-#endif
-
-int uv__loop_configure(uv_loop_t* loop, uv_loop_option option, va_list ap);
-
-void uv__loop_close(uv_loop_t* loop);
-
-int uv__tcp_bind(uv_tcp_t* tcp,
- const struct sockaddr* addr,
- unsigned int addrlen,
- unsigned int flags);
-
-int uv__tcp_connect(uv_connect_t* req,
- uv_tcp_t* handle,
- const struct sockaddr* addr,
- unsigned int addrlen,
- uv_connect_cb cb);
-
-int uv__udp_bind(uv_udp_t* handle,
- const struct sockaddr* addr,
- unsigned int addrlen,
- unsigned int flags);
-
-int uv__udp_send(uv_udp_send_t* req,
- uv_udp_t* handle,
- const uv_buf_t bufs[],
- unsigned int nbufs,
- const struct sockaddr* addr,
- unsigned int addrlen,
- uv_udp_send_cb send_cb);
-
-int uv__udp_try_send(uv_udp_t* handle,
- const uv_buf_t bufs[],
- unsigned int nbufs,
- const struct sockaddr* addr,
- unsigned int addrlen);
-
-int uv__udp_recv_start(uv_udp_t* handle, uv_alloc_cb alloccb,
- uv_udp_recv_cb recv_cb);
-
-int uv__udp_recv_stop(uv_udp_t* handle);
-
-void uv__fs_poll_close(uv_fs_poll_t* handle);
-
-int uv__getaddrinfo_translate_error(int sys_err); /* EAI_* error. */
-
-void uv__work_submit(uv_loop_t* loop,
- struct uv__work *w,
- void (*work)(struct uv__work *w),
- void (*done)(struct uv__work *w, int status));
-
-void uv__work_done(uv_async_t* handle);
-
-size_t uv__count_bufs(const uv_buf_t bufs[], unsigned int nbufs);
-
-int uv__socket_sockopt(uv_handle_t* handle, int optname, int* value);
-
-void uv__fs_scandir_cleanup(uv_fs_t* req);
-
-#define uv__has_active_reqs(loop) \
- (QUEUE_EMPTY(&(loop)->active_reqs) == 0)
-
-#define uv__req_register(loop, req) \
- do { \
- QUEUE_INSERT_TAIL(&(loop)->active_reqs, &(req)->active_queue); \
- } \
- while (0)
-
-#define uv__req_unregister(loop, req) \
- do { \
- assert(uv__has_active_reqs(loop)); \
- QUEUE_REMOVE(&(req)->active_queue); \
- } \
- while (0)
-
-#define uv__has_active_handles(loop) \
- ((loop)->active_handles > 0)
-
-#define uv__active_handle_add(h) \
- do { \
- (h)->loop->active_handles++; \
- } \
- while (0)
-
-#define uv__active_handle_rm(h) \
- do { \
- (h)->loop->active_handles--; \
- } \
- while (0)
-
-#define uv__is_active(h) \
- (((h)->flags & UV__HANDLE_ACTIVE) != 0)
-
-#define uv__is_closing(h) \
- (((h)->flags & (UV_CLOSING | UV_CLOSED)) != 0)
-
-#define uv__handle_start(h) \
- do { \
- assert(((h)->flags & UV__HANDLE_CLOSING) == 0); \
- if (((h)->flags & UV__HANDLE_ACTIVE) != 0) break; \
- (h)->flags |= UV__HANDLE_ACTIVE; \
- if (((h)->flags & UV__HANDLE_REF) != 0) uv__active_handle_add(h); \
- } \
- while (0)
-
-#define uv__handle_stop(h) \
- do { \
- assert(((h)->flags & UV__HANDLE_CLOSING) == 0); \
- if (((h)->flags & UV__HANDLE_ACTIVE) == 0) break; \
- (h)->flags &= ~UV__HANDLE_ACTIVE; \
- if (((h)->flags & UV__HANDLE_REF) != 0) uv__active_handle_rm(h); \
- } \
- while (0)
-
-#define uv__handle_ref(h) \
- do { \
- if (((h)->flags & UV__HANDLE_REF) != 0) break; \
- (h)->flags |= UV__HANDLE_REF; \
- if (((h)->flags & UV__HANDLE_CLOSING) != 0) break; \
- if (((h)->flags & UV__HANDLE_ACTIVE) != 0) uv__active_handle_add(h); \
- } \
- while (0)
-
-#define uv__handle_unref(h) \
- do { \
- if (((h)->flags & UV__HANDLE_REF) == 0) break; \
- (h)->flags &= ~UV__HANDLE_REF; \
- if (((h)->flags & UV__HANDLE_CLOSING) != 0) break; \
- if (((h)->flags & UV__HANDLE_ACTIVE) != 0) uv__active_handle_rm(h); \
- } \
- while (0)
-
-#define uv__has_ref(h) \
- (((h)->flags & UV__HANDLE_REF) != 0)
-
-#if defined(_WIN32)
-# define uv__handle_platform_init(h) ((h)->u.fd = -1)
-#else
-# define uv__handle_platform_init(h) ((h)->next_closing = NULL)
-#endif
-
-#define uv__handle_init(loop_, h, type_) \
- do { \
- (h)->loop = (loop_); \
- (h)->type = (type_); \
- (h)->flags = UV__HANDLE_REF; /* Ref the loop when active. */ \
- QUEUE_INSERT_TAIL(&(loop_)->handle_queue, &(h)->handle_queue); \
- uv__handle_platform_init(h); \
- } \
- while (0)
-
-
-/* Allocator prototypes */
-void *uv__calloc(size_t count, size_t size);
-char *uv__strdup(const char* s);
-char *uv__strndup(const char* s, size_t n);
-void* uv__malloc(size_t size);
-void uv__free(void* ptr);
-void* uv__realloc(void* ptr, size_t size);
-
-#endif /* UV_COMMON_H_ */
diff --git a/3rdparty/libuv/src/version.c b/3rdparty/libuv/src/version.c
deleted file mode 100644
index 686dedd98d6..00000000000
--- a/3rdparty/libuv/src/version.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-
-#define UV_STRINGIFY(v) UV_STRINGIFY_HELPER(v)
-#define UV_STRINGIFY_HELPER(v) #v
-
-#define UV_VERSION_STRING_BASE UV_STRINGIFY(UV_VERSION_MAJOR) "." \
- UV_STRINGIFY(UV_VERSION_MINOR) "." \
- UV_STRINGIFY(UV_VERSION_PATCH)
-
-#if UV_VERSION_IS_RELEASE
-# define UV_VERSION_STRING UV_VERSION_STRING_BASE
-#else
-# define UV_VERSION_STRING UV_VERSION_STRING_BASE "-" UV_VERSION_SUFFIX
-#endif
-
-
-unsigned int uv_version(void) {
- return UV_VERSION_HEX;
-}
-
-
-const char* uv_version_string(void) {
- return UV_VERSION_STRING;
-}
diff --git a/3rdparty/libuv/src/win/async.c b/3rdparty/libuv/src/win/async.c
deleted file mode 100644
index ad240ab8972..00000000000
--- a/3rdparty/libuv/src/win/async.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include <assert.h>
-
-#include "uv.h"
-#include "internal.h"
-#include "atomicops-inl.h"
-#include "handle-inl.h"
-#include "req-inl.h"
-
-
-void uv_async_endgame(uv_loop_t* loop, uv_async_t* handle) {
- if (handle->flags & UV__HANDLE_CLOSING &&
- !handle->async_sent) {
- assert(!(handle->flags & UV_HANDLE_CLOSED));
- uv__handle_close(handle);
- }
-}
-
-
-int uv_async_init(uv_loop_t* loop, uv_async_t* handle, uv_async_cb async_cb) {
- uv_req_t* req;
-
- uv__handle_init(loop, (uv_handle_t*) handle, UV_ASYNC);
- handle->async_sent = 0;
- handle->async_cb = async_cb;
-
- req = &handle->async_req;
- uv_req_init(loop, req);
- req->type = UV_WAKEUP;
- req->data = handle;
-
- uv__handle_start(handle);
-
- return 0;
-}
-
-
-void uv_async_close(uv_loop_t* loop, uv_async_t* handle) {
- if (!((uv_async_t*)handle)->async_sent) {
- uv_want_endgame(loop, (uv_handle_t*) handle);
- }
-
- uv__handle_closing(handle);
-}
-
-
-int uv_async_send(uv_async_t* handle) {
- uv_loop_t* loop = handle->loop;
-
- if (handle->type != UV_ASYNC) {
- /* Can't set errno because that's not thread-safe. */
- return -1;
- }
-
- /* The user should make sure never to call uv_async_send to a closing */
- /* or closed handle. */
- assert(!(handle->flags & UV__HANDLE_CLOSING));
-
- if (!uv__atomic_exchange_set(&handle->async_sent)) {
- POST_COMPLETION_FOR_REQ(loop, &handle->async_req);
- }
-
- return 0;
-}
-
-
-void uv_process_async_wakeup_req(uv_loop_t* loop, uv_async_t* handle,
- uv_req_t* req) {
- assert(handle->type == UV_ASYNC);
- assert(req->type == UV_WAKEUP);
-
- handle->async_sent = 0;
-
- if (handle->flags & UV__HANDLE_CLOSING) {
- uv_want_endgame(loop, (uv_handle_t*)handle);
- } else if (handle->async_cb != NULL) {
- handle->async_cb(handle);
- }
-}
diff --git a/3rdparty/libuv/src/win/atomicops-inl.h b/3rdparty/libuv/src/win/atomicops-inl.h
deleted file mode 100644
index 61e006026c1..00000000000
--- a/3rdparty/libuv/src/win/atomicops-inl.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#ifndef UV_WIN_ATOMICOPS_INL_H_
-#define UV_WIN_ATOMICOPS_INL_H_
-
-#include "uv.h"
-
-
-/* Atomic set operation on char */
-#ifdef _MSC_VER /* MSVC */
-
-/* _InterlockedOr8 is supported by MSVC on x32 and x64. It is slightly less */
-/* efficient than InterlockedExchange, but InterlockedExchange8 does not */
-/* exist, and interlocked operations on larger targets might require the */
-/* target to be aligned. */
-#pragma intrinsic(_InterlockedOr8)
-
-static char __declspec(inline) uv__atomic_exchange_set(char volatile* target) {
- return _InterlockedOr8(target, 1);
-}
-
-#else /* GCC */
-
-/* Mingw-32 version, hopefully this works for 64-bit gcc as well. */
-static inline char uv__atomic_exchange_set(char volatile* target) {
- const char one = 1;
- char old_value;
- __asm__ __volatile__ ("lock xchgb %0, %1\n\t"
- : "=r"(old_value), "=m"(*target)
- : "0"(one), "m"(*target)
- : "memory");
- return old_value;
-}
-
-#endif
-
-#endif /* UV_WIN_ATOMICOPS_INL_H_ */
diff --git a/3rdparty/libuv/src/win/core.c b/3rdparty/libuv/src/win/core.c
deleted file mode 100644
index de0483e1023..00000000000
--- a/3rdparty/libuv/src/win/core.c
+++ /dev/null
@@ -1,457 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include <assert.h>
-#include <errno.h>
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#if defined(_MSC_VER) || defined(__MINGW64_VERSION_MAJOR)
-#include <crtdbg.h>
-#endif
-
-#include "uv.h"
-#include "internal.h"
-#include "handle-inl.h"
-#include "req-inl.h"
-
-
-static uv_loop_t default_loop_struct;
-static uv_loop_t* default_loop_ptr;
-
-/* uv_once initialization guards */
-static uv_once_t uv_init_guard_ = UV_ONCE_INIT;
-
-
-#if defined(_DEBUG) && (defined(_MSC_VER) || defined(__MINGW64_VERSION_MAJOR))
-/* Our crt debug report handler allows us to temporarily disable asserts
- * just for the current thread.
- */
-
-UV_THREAD_LOCAL int uv__crt_assert_enabled = TRUE;
-
-static int uv__crt_dbg_report_handler(int report_type, char *message, int *ret_val) {
- if (uv__crt_assert_enabled || report_type != _CRT_ASSERT)
- return FALSE;
-
- if (ret_val) {
- /* Set ret_val to 0 to continue with normal execution.
- * Set ret_val to 1 to trigger a breakpoint.
- */
-
- if(IsDebuggerPresent())
- *ret_val = 1;
- else
- *ret_val = 0;
- }
-
- /* Don't call _CrtDbgReport. */
- return TRUE;
-}
-#else
-UV_THREAD_LOCAL int uv__crt_assert_enabled = FALSE;
-#endif
-
-
-#if !defined(__MINGW32__) || __MSVCRT_VERSION__ >= 0x800
-static void uv__crt_invalid_parameter_handler(const wchar_t* expression,
- const wchar_t* function, const wchar_t * file, unsigned int line,
- uintptr_t reserved) {
- /* No-op. */
-}
-#endif
-
-
-static void uv_init(void) {
- /* Tell Windows that we will handle critical errors. */
- SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX |
- SEM_NOOPENFILEERRORBOX);
-
- /* Tell the CRT to not exit the application when an invalid parameter is
- * passed. The main issue is that invalid FDs will trigger this behavior.
- */
-#if !defined(__MINGW32__) || __MSVCRT_VERSION__ >= 0x800
- _set_invalid_parameter_handler(uv__crt_invalid_parameter_handler);
-#endif
-
- /* We also need to setup our debug report handler because some CRT
- * functions (eg _get_osfhandle) raise an assert when called with invalid
- * FDs even though they return the proper error code in the release build.
- */
-#if defined(_DEBUG) && (defined(_MSC_VER) || defined(__MINGW64_VERSION_MAJOR))
- _CrtSetReportHook(uv__crt_dbg_report_handler);
-#endif
-
- /* Fetch winapi function pointers. This must be done first because other
- * initialization code might need these function pointers to be loaded.
- */
- uv_winapi_init();
-
- /* Initialize winsock */
- uv_winsock_init();
-
- /* Initialize FS */
- uv_fs_init();
-
- /* Initialize signal stuff */
- uv_signals_init();
-
- /* Initialize console */
- uv_console_init();
-
- /* Initialize utilities */
- uv__util_init();
-}
-
-
-int uv_loop_init(uv_loop_t* loop) {
- int err;
-
- /* Initialize libuv itself first */
- uv__once_init();
-
- /* Create an I/O completion port */
- loop->iocp = CreateIoCompletionPort(INVALID_HANDLE_VALUE, NULL, 0, 1);
- if (loop->iocp == NULL)
- return uv_translate_sys_error(GetLastError());
-
- /* To prevent uninitialized memory access, loop->time must be initialized
- * to zero before calling uv_update_time for the first time.
- */
- loop->time = 0;
- uv_update_time(loop);
-
- QUEUE_INIT(&loop->wq);
- QUEUE_INIT(&loop->handle_queue);
- QUEUE_INIT(&loop->active_reqs);
- loop->active_handles = 0;
-
- loop->pending_reqs_tail = NULL;
-
- loop->endgame_handles = NULL;
-
- RB_INIT(&loop->timers);
-
- loop->check_handles = NULL;
- loop->prepare_handles = NULL;
- loop->idle_handles = NULL;
-
- loop->next_prepare_handle = NULL;
- loop->next_check_handle = NULL;
- loop->next_idle_handle = NULL;
-
- memset(&loop->poll_peer_sockets, 0, sizeof loop->poll_peer_sockets);
-
- loop->active_tcp_streams = 0;
- loop->active_udp_streams = 0;
-
- loop->timer_counter = 0;
- loop->stop_flag = 0;
-
- err = uv_mutex_init(&loop->wq_mutex);
- if (err)
- goto fail_mutex_init;
-
- err = uv_async_init(loop, &loop->wq_async, uv__work_done);
- if (err)
- goto fail_async_init;
-
- uv__handle_unref(&loop->wq_async);
- loop->wq_async.flags |= UV__HANDLE_INTERNAL;
-
- return 0;
-
-fail_async_init:
- uv_mutex_destroy(&loop->wq_mutex);
-
-fail_mutex_init:
- CloseHandle(loop->iocp);
- loop->iocp = INVALID_HANDLE_VALUE;
-
- return err;
-}
-
-
-void uv__once_init(void) {
- uv_once(&uv_init_guard_, uv_init);
-}
-
-
-void uv__loop_close(uv_loop_t* loop) {
- size_t i;
-
- /* close the async handle without needing an extra loop iteration */
- assert(!loop->wq_async.async_sent);
- loop->wq_async.close_cb = NULL;
- uv__handle_closing(&loop->wq_async);
- uv__handle_close(&loop->wq_async);
-
- for (i = 0; i < ARRAY_SIZE(loop->poll_peer_sockets); i++) {
- SOCKET sock = loop->poll_peer_sockets[i];
- if (sock != 0 && sock != INVALID_SOCKET)
- closesocket(sock);
- }
-
- uv_mutex_lock(&loop->wq_mutex);
- assert(QUEUE_EMPTY(&loop->wq) && "thread pool work queue not empty!");
- assert(!uv__has_active_reqs(loop));
- uv_mutex_unlock(&loop->wq_mutex);
- uv_mutex_destroy(&loop->wq_mutex);
-
- CloseHandle(loop->iocp);
-}
-
-
-int uv__loop_configure(uv_loop_t* loop, uv_loop_option option, va_list ap) {
- return UV_ENOSYS;
-}
-
-
-int uv_backend_fd(const uv_loop_t* loop) {
- return -1;
-}
-
-
-int uv_backend_timeout(const uv_loop_t* loop) {
- if (loop->stop_flag != 0)
- return 0;
-
- if (!uv__has_active_handles(loop) && !uv__has_active_reqs(loop))
- return 0;
-
- if (loop->pending_reqs_tail)
- return 0;
-
- if (loop->endgame_handles)
- return 0;
-
- if (loop->idle_handles)
- return 0;
-
- return uv__next_timeout(loop);
-}
-
-
-static void uv_poll(uv_loop_t* loop, DWORD timeout) {
- DWORD bytes;
- ULONG_PTR key;
- OVERLAPPED* overlapped;
- uv_req_t* req;
-
- GetQueuedCompletionStatus(loop->iocp,
- &bytes,
- &key,
- &overlapped,
- timeout);
-
- if (overlapped) {
- /* Package was dequeued */
- req = uv_overlapped_to_req(overlapped);
- uv_insert_pending_req(loop, req);
-
- /* Some time might have passed waiting for I/O,
- * so update the loop time here.
- */
- uv_update_time(loop);
- } else if (GetLastError() != WAIT_TIMEOUT) {
- /* Serious error */
- uv_fatal_error(GetLastError(), "GetQueuedCompletionStatus");
- } else if (timeout > 0) {
- /* GetQueuedCompletionStatus can occasionally return a little early.
- * Make sure that the desired timeout is reflected in the loop time.
- */
- uv__time_forward(loop, timeout);
- }
-}
-
-
-static void uv_poll_ex(uv_loop_t* loop, DWORD timeout) {
- BOOL success;
- uv_req_t* req;
- OVERLAPPED_ENTRY overlappeds[128];
- ULONG count;
- ULONG i;
-
- success = pGetQueuedCompletionStatusEx(loop->iocp,
- overlappeds,
- ARRAY_SIZE(overlappeds),
- &count,
- timeout,
- FALSE);
-
- if (success) {
- for (i = 0; i < count; i++) {
- /* Package was dequeued */
- req = uv_overlapped_to_req(overlappeds[i].lpOverlapped);
- uv_insert_pending_req(loop, req);
- }
-
- /* Some time might have passed waiting for I/O,
- * so update the loop time here.
- */
- uv_update_time(loop);
- } else if (GetLastError() != WAIT_TIMEOUT) {
- /* Serious error */
- uv_fatal_error(GetLastError(), "GetQueuedCompletionStatusEx");
- } else if (timeout > 0) {
- /* GetQueuedCompletionStatus can occasionally return a little early.
- * Make sure that the desired timeout is reflected in the loop time.
- */
- uv__time_forward(loop, timeout);
- }
-}
-
-
-static int uv__loop_alive(const uv_loop_t* loop) {
- return loop->active_handles > 0 ||
- !QUEUE_EMPTY(&loop->active_reqs) ||
- loop->endgame_handles != NULL;
-}
-
-
-int uv_loop_alive(const uv_loop_t* loop) {
- return uv__loop_alive(loop);
-}
-
-
-int uv_run(uv_loop_t *loop, uv_run_mode mode) {
- DWORD timeout;
- int r;
- int ran_pending;
- void (*poll)(uv_loop_t* loop, DWORD timeout);
-
- if (pGetQueuedCompletionStatusEx)
- poll = &uv_poll_ex;
- else
- poll = &uv_poll;
-
- r = uv__loop_alive(loop);
- if (!r)
- uv_update_time(loop);
-
- while (r != 0 && loop->stop_flag == 0) {
- uv_update_time(loop);
- uv_process_timers(loop);
-
- ran_pending = uv_process_reqs(loop);
- uv_idle_invoke(loop);
- uv_prepare_invoke(loop);
-
- timeout = 0;
- if ((mode == UV_RUN_ONCE && !ran_pending) || mode == UV_RUN_DEFAULT)
- timeout = uv_backend_timeout(loop);
-
- (*poll)(loop, timeout);
-
- uv_check_invoke(loop);
- uv_process_endgames(loop);
-
- if (mode == UV_RUN_ONCE) {
- /* UV_RUN_ONCE implies forward progress: at least one callback must have
- * been invoked when it returns. uv__io_poll() can return without doing
- * I/O (meaning: no callbacks) when its timeout expires - which means we
- * have pending timers that satisfy the forward progress constraint.
- *
- * UV_RUN_NOWAIT makes no guarantees about progress so it's omitted from
- * the check.
- */
- uv_process_timers(loop);
- }
-
- r = uv__loop_alive(loop);
- if (mode == UV_RUN_ONCE || mode == UV_RUN_NOWAIT)
- break;
- }
-
- /* The if statement lets the compiler compile it to a conditional store.
- * Avoids dirtying a cache line.
- */
- if (loop->stop_flag != 0)
- loop->stop_flag = 0;
-
- return r;
-}
-
-
-int uv_fileno(const uv_handle_t* handle, uv_os_fd_t* fd) {
- uv_os_fd_t fd_out;
-
- switch (handle->type) {
- case UV_TCP:
- fd_out = (uv_os_fd_t)((uv_tcp_t*) handle)->socket;
- break;
-
- case UV_NAMED_PIPE:
- fd_out = ((uv_pipe_t*) handle)->handle;
- break;
-
- case UV_TTY:
- fd_out = ((uv_tty_t*) handle)->handle;
- break;
-
- case UV_UDP:
- fd_out = (uv_os_fd_t)((uv_udp_t*) handle)->socket;
- break;
-
- case UV_POLL:
- fd_out = (uv_os_fd_t)((uv_poll_t*) handle)->socket;
- break;
-
- default:
- return UV_EINVAL;
- }
-
- if (uv_is_closing(handle) || fd_out == INVALID_HANDLE_VALUE)
- return UV_EBADF;
-
- *fd = fd_out;
- return 0;
-}
-
-
-int uv__socket_sockopt(uv_handle_t* handle, int optname, int* value) {
- int r;
- int len;
- SOCKET socket;
-
- if (handle == NULL || value == NULL)
- return UV_EINVAL;
-
- if (handle->type == UV_TCP)
- socket = ((uv_tcp_t*) handle)->socket;
- else if (handle->type == UV_UDP)
- socket = ((uv_udp_t*) handle)->socket;
- else
- return UV_ENOTSUP;
-
- len = sizeof(*value);
-
- if (*value == 0)
- r = getsockopt(socket, SOL_SOCKET, optname, (char*) value, &len);
- else
- r = setsockopt(socket, SOL_SOCKET, optname, (const char*) value, len);
-
- if (r == SOCKET_ERROR)
- return uv_translate_sys_error(WSAGetLastError());
-
- return 0;
-}
diff --git a/3rdparty/libuv/src/win/dl.c b/3rdparty/libuv/src/win/dl.c
deleted file mode 100644
index e5f3407f8eb..00000000000
--- a/3rdparty/libuv/src/win/dl.c
+++ /dev/null
@@ -1,113 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "internal.h"
-
-static int uv__dlerror(uv_lib_t* lib, int errorno);
-
-
-int uv_dlopen(const char* filename, uv_lib_t* lib) {
- WCHAR filename_w[32768];
-
- lib->handle = NULL;
- lib->errmsg = NULL;
-
- if (!uv_utf8_to_utf16(filename, filename_w, ARRAY_SIZE(filename_w))) {
- return uv__dlerror(lib, GetLastError());
- }
-
- lib->handle = LoadLibraryExW(filename_w, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
- if (lib->handle == NULL) {
- return uv__dlerror(lib, GetLastError());
- }
-
- return 0;
-}
-
-
-void uv_dlclose(uv_lib_t* lib) {
- if (lib->errmsg) {
- LocalFree((void*)lib->errmsg);
- lib->errmsg = NULL;
- }
-
- if (lib->handle) {
- /* Ignore errors. No good way to signal them without leaking memory. */
- FreeLibrary(lib->handle);
- lib->handle = NULL;
- }
-}
-
-
-int uv_dlsym(uv_lib_t* lib, const char* name, void** ptr) {
- *ptr = (void*) GetProcAddress(lib->handle, name);
- return uv__dlerror(lib, *ptr ? 0 : GetLastError());
-}
-
-
-const char* uv_dlerror(const uv_lib_t* lib) {
- return lib->errmsg ? lib->errmsg : "no error";
-}
-
-
-static void uv__format_fallback_error(uv_lib_t* lib, int errorno){
- DWORD_PTR args[1] = { (DWORD_PTR) errorno };
- LPSTR fallback_error = "error: %1!d!";
-
- FormatMessageA(FORMAT_MESSAGE_FROM_STRING |
- FORMAT_MESSAGE_ARGUMENT_ARRAY |
- FORMAT_MESSAGE_ALLOCATE_BUFFER,
- fallback_error, 0, 0,
- (LPSTR) &lib->errmsg,
- 0, (va_list*) args);
-}
-
-
-
-static int uv__dlerror(uv_lib_t* lib, int errorno) {
- DWORD res;
-
- if (lib->errmsg) {
- LocalFree((void*)lib->errmsg);
- lib->errmsg = NULL;
- }
-
- if (errorno) {
- res = FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER |
- FORMAT_MESSAGE_FROM_SYSTEM |
- FORMAT_MESSAGE_IGNORE_INSERTS, NULL, errorno,
- MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US),
- (LPSTR) &lib->errmsg, 0, NULL);
- if (!res && GetLastError() == ERROR_MUI_FILE_NOT_FOUND) {
- res = FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER |
- FORMAT_MESSAGE_FROM_SYSTEM |
- FORMAT_MESSAGE_IGNORE_INSERTS, NULL, errorno,
- 0, (LPSTR) &lib->errmsg, 0, NULL);
- }
-
- if (!res) {
- uv__format_fallback_error(lib, errorno);
- }
- }
-
- return errorno ? -1 : 0;
-}
diff --git a/3rdparty/libuv/src/win/error.c b/3rdparty/libuv/src/win/error.c
deleted file mode 100644
index c512f35af97..00000000000
--- a/3rdparty/libuv/src/win/error.c
+++ /dev/null
@@ -1,170 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include <assert.h>
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include "uv.h"
-#include "internal.h"
-
-
-/*
- * Display an error message and abort the event loop.
- */
-void uv_fatal_error(const int errorno, const char* syscall) {
- char* buf = NULL;
- const char* errmsg;
-
- FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |
- FORMAT_MESSAGE_IGNORE_INSERTS, NULL, errorno,
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR)&buf, 0, NULL);
-
- if (buf) {
- errmsg = buf;
- } else {
- errmsg = "Unknown error";
- }
-
- /* FormatMessage messages include a newline character already, */
- /* so don't add another. */
- if (syscall) {
- fprintf(stderr, "%s: (%d) %s", syscall, errorno, errmsg);
- } else {
- fprintf(stderr, "(%d) %s", errorno, errmsg);
- }
-
- if (buf) {
- LocalFree(buf);
- }
-
- *((char*)NULL) = 0xff; /* Force debug break */
- abort();
-}
-
-
-int uv_translate_sys_error(int sys_errno) {
- if (sys_errno <= 0) {
- return sys_errno; /* If < 0 then it's already a libuv error. */
- }
-
- switch (sys_errno) {
- case ERROR_NOACCESS: return UV_EACCES;
- case WSAEACCES: return UV_EACCES;
- case ERROR_ADDRESS_ALREADY_ASSOCIATED: return UV_EADDRINUSE;
- case WSAEADDRINUSE: return UV_EADDRINUSE;
- case WSAEADDRNOTAVAIL: return UV_EADDRNOTAVAIL;
- case WSAEAFNOSUPPORT: return UV_EAFNOSUPPORT;
- case WSAEWOULDBLOCK: return UV_EAGAIN;
- case WSAEALREADY: return UV_EALREADY;
- case ERROR_INVALID_FLAGS: return UV_EBADF;
- case ERROR_INVALID_HANDLE: return UV_EBADF;
- case ERROR_LOCK_VIOLATION: return UV_EBUSY;
- case ERROR_PIPE_BUSY: return UV_EBUSY;
- case ERROR_SHARING_VIOLATION: return UV_EBUSY;
- case ERROR_OPERATION_ABORTED: return UV_ECANCELED;
- case WSAEINTR: return UV_ECANCELED;
- case ERROR_NO_UNICODE_TRANSLATION: return UV_ECHARSET;
- case ERROR_CONNECTION_ABORTED: return UV_ECONNABORTED;
- case WSAECONNABORTED: return UV_ECONNABORTED;
- case ERROR_CONNECTION_REFUSED: return UV_ECONNREFUSED;
- case WSAECONNREFUSED: return UV_ECONNREFUSED;
- case ERROR_NETNAME_DELETED: return UV_ECONNRESET;
- case WSAECONNRESET: return UV_ECONNRESET;
- case ERROR_ALREADY_EXISTS: return UV_EEXIST;
- case ERROR_FILE_EXISTS: return UV_EEXIST;
- case ERROR_BUFFER_OVERFLOW: return UV_EFAULT;
- case WSAEFAULT: return UV_EFAULT;
- case ERROR_HOST_UNREACHABLE: return UV_EHOSTUNREACH;
- case WSAEHOSTUNREACH: return UV_EHOSTUNREACH;
- case ERROR_INSUFFICIENT_BUFFER: return UV_EINVAL;
- case ERROR_INVALID_DATA: return UV_EINVAL;
- case ERROR_INVALID_PARAMETER: return UV_EINVAL;
- case ERROR_SYMLINK_NOT_SUPPORTED: return UV_EINVAL;
- case WSAEINVAL: return UV_EINVAL;
- case WSAEPFNOSUPPORT: return UV_EINVAL;
- case WSAESOCKTNOSUPPORT: return UV_EINVAL;
- case ERROR_BEGINNING_OF_MEDIA: return UV_EIO;
- case ERROR_BUS_RESET: return UV_EIO;
- case ERROR_CRC: return UV_EIO;
- case ERROR_DEVICE_DOOR_OPEN: return UV_EIO;
- case ERROR_DEVICE_REQUIRES_CLEANING: return UV_EIO;
- case ERROR_DISK_CORRUPT: return UV_EIO;
- case ERROR_EOM_OVERFLOW: return UV_EIO;
- case ERROR_FILEMARK_DETECTED: return UV_EIO;
- case ERROR_GEN_FAILURE: return UV_EIO;
- case ERROR_INVALID_BLOCK_LENGTH: return UV_EIO;
- case ERROR_IO_DEVICE: return UV_EIO;
- case ERROR_NO_DATA_DETECTED: return UV_EIO;
- case ERROR_NO_SIGNAL_SENT: return UV_EIO;
- case ERROR_OPEN_FAILED: return UV_EIO;
- case ERROR_SETMARK_DETECTED: return UV_EIO;
- case ERROR_SIGNAL_REFUSED: return UV_EIO;
- case WSAEISCONN: return UV_EISCONN;
- case ERROR_CANT_RESOLVE_FILENAME: return UV_ELOOP;
- case ERROR_TOO_MANY_OPEN_FILES: return UV_EMFILE;
- case WSAEMFILE: return UV_EMFILE;
- case WSAEMSGSIZE: return UV_EMSGSIZE;
- case ERROR_FILENAME_EXCED_RANGE: return UV_ENAMETOOLONG;
- case ERROR_NETWORK_UNREACHABLE: return UV_ENETUNREACH;
- case WSAENETUNREACH: return UV_ENETUNREACH;
- case WSAENOBUFS: return UV_ENOBUFS;
- case ERROR_BAD_PATHNAME: return UV_ENOENT;
- case ERROR_DIRECTORY: return UV_ENOENT;
- case ERROR_FILE_NOT_FOUND: return UV_ENOENT;
- case ERROR_INVALID_NAME: return UV_ENOENT;
- case ERROR_INVALID_DRIVE: return UV_ENOENT;
- case ERROR_INVALID_REPARSE_DATA: return UV_ENOENT;
- case ERROR_MOD_NOT_FOUND: return UV_ENOENT;
- case ERROR_PATH_NOT_FOUND: return UV_ENOENT;
- case WSAHOST_NOT_FOUND: return UV_ENOENT;
- case WSANO_DATA: return UV_ENOENT;
- case ERROR_NOT_ENOUGH_MEMORY: return UV_ENOMEM;
- case ERROR_OUTOFMEMORY: return UV_ENOMEM;
- case ERROR_CANNOT_MAKE: return UV_ENOSPC;
- case ERROR_DISK_FULL: return UV_ENOSPC;
- case ERROR_EA_TABLE_FULL: return UV_ENOSPC;
- case ERROR_END_OF_MEDIA: return UV_ENOSPC;
- case ERROR_HANDLE_DISK_FULL: return UV_ENOSPC;
- case ERROR_NOT_CONNECTED: return UV_ENOTCONN;
- case WSAENOTCONN: return UV_ENOTCONN;
- case ERROR_DIR_NOT_EMPTY: return UV_ENOTEMPTY;
- case WSAENOTSOCK: return UV_ENOTSOCK;
- case ERROR_NOT_SUPPORTED: return UV_ENOTSUP;
- case ERROR_BROKEN_PIPE: return UV_EOF;
- case ERROR_ACCESS_DENIED: return UV_EPERM;
- case ERROR_PRIVILEGE_NOT_HELD: return UV_EPERM;
- case ERROR_BAD_PIPE: return UV_EPIPE;
- case ERROR_NO_DATA: return UV_EPIPE;
- case ERROR_PIPE_NOT_CONNECTED: return UV_EPIPE;
- case WSAESHUTDOWN: return UV_EPIPE;
- case WSAEPROTONOSUPPORT: return UV_EPROTONOSUPPORT;
- case ERROR_WRITE_PROTECT: return UV_EROFS;
- case ERROR_SEM_TIMEOUT: return UV_ETIMEDOUT;
- case WSAETIMEDOUT: return UV_ETIMEDOUT;
- case ERROR_NOT_SAME_DEVICE: return UV_EXDEV;
- case ERROR_INVALID_FUNCTION: return UV_EISDIR;
- case ERROR_META_EXPANSION_TOO_LONG: return UV_E2BIG;
- default: return UV_UNKNOWN;
- }
-}
diff --git a/3rdparty/libuv/src/win/fs-event.c b/3rdparty/libuv/src/win/fs-event.c
deleted file mode 100644
index 76ecfebaa24..00000000000
--- a/3rdparty/libuv/src/win/fs-event.c
+++ /dev/null
@@ -1,552 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include <assert.h>
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "uv.h"
-#include "internal.h"
-#include "handle-inl.h"
-#include "req-inl.h"
-
-
-const unsigned int uv_directory_watcher_buffer_size = 4096;
-
-
-static void uv_fs_event_queue_readdirchanges(uv_loop_t* loop,
- uv_fs_event_t* handle) {
- assert(handle->dir_handle != INVALID_HANDLE_VALUE);
- assert(!handle->req_pending);
-
- memset(&(handle->req.u.io.overlapped), 0,
- sizeof(handle->req.u.io.overlapped));
- if (!ReadDirectoryChangesW(handle->dir_handle,
- handle->buffer,
- uv_directory_watcher_buffer_size,
- (handle->flags & UV_FS_EVENT_RECURSIVE) ? TRUE : FALSE,
- FILE_NOTIFY_CHANGE_FILE_NAME |
- FILE_NOTIFY_CHANGE_DIR_NAME |
- FILE_NOTIFY_CHANGE_ATTRIBUTES |
- FILE_NOTIFY_CHANGE_SIZE |
- FILE_NOTIFY_CHANGE_LAST_WRITE |
- FILE_NOTIFY_CHANGE_LAST_ACCESS |
- FILE_NOTIFY_CHANGE_CREATION |
- FILE_NOTIFY_CHANGE_SECURITY,
- NULL,
- &handle->req.u.io.overlapped,
- NULL)) {
- /* Make this req pending reporting an error. */
- SET_REQ_ERROR(&handle->req, GetLastError());
- uv_insert_pending_req(loop, (uv_req_t*)&handle->req);
- }
-
- handle->req_pending = 1;
-}
-
-static int uv_relative_path(const WCHAR* filename,
- const WCHAR* dir,
- WCHAR** relpath) {
- int dirlen = wcslen(dir);
- int filelen = wcslen(filename);
- if (dir[dirlen - 1] == '\\')
- dirlen--;
- *relpath = uv__malloc((MAX_PATH + 1) * sizeof(WCHAR));
- if (!*relpath)
- uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc");
- wcsncpy(*relpath, filename + dirlen + 1, filelen - dirlen - 1);
- (*relpath)[filelen - dirlen - 1] = L'\0';
- return 0;
-}
-
-static int uv_split_path(const WCHAR* filename, WCHAR** dir,
- WCHAR** file) {
- int len = wcslen(filename);
- int i = len;
- while (i > 0 && filename[--i] != '\\' && filename[i] != '/');
-
- if (i == 0) {
- if (dir) {
- *dir = (WCHAR*)uv__malloc((MAX_PATH + 1) * sizeof(WCHAR));
- if (!*dir) {
- uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc");
- }
-
- if (!GetCurrentDirectoryW(MAX_PATH, *dir)) {
- uv__free(*dir);
- *dir = NULL;
- return -1;
- }
- }
-
- *file = wcsdup(filename);
- } else {
- if (dir) {
- *dir = (WCHAR*)uv__malloc((i + 1) * sizeof(WCHAR));
- if (!*dir) {
- uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc");
- }
- wcsncpy(*dir, filename, i);
- (*dir)[i] = L'\0';
- }
-
- *file = (WCHAR*)uv__malloc((len - i) * sizeof(WCHAR));
- if (!*file) {
- uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc");
- }
- wcsncpy(*file, filename + i + 1, len - i - 1);
- (*file)[len - i - 1] = L'\0';
- }
-
- return 0;
-}
-
-
-int uv_fs_event_init(uv_loop_t* loop, uv_fs_event_t* handle) {
- uv__handle_init(loop, (uv_handle_t*) handle, UV_FS_EVENT);
- handle->dir_handle = INVALID_HANDLE_VALUE;
- handle->buffer = NULL;
- handle->req_pending = 0;
- handle->filew = NULL;
- handle->short_filew = NULL;
- handle->dirw = NULL;
-
- uv_req_init(loop, (uv_req_t*)&handle->req);
- handle->req.type = UV_FS_EVENT_REQ;
- handle->req.data = handle;
-
- return 0;
-}
-
-
-int uv_fs_event_start(uv_fs_event_t* handle,
- uv_fs_event_cb cb,
- const char* path,
- unsigned int flags) {
- int name_size, is_path_dir;
- DWORD attr, last_error;
- WCHAR* dir = NULL, *dir_to_watch, *pathw = NULL;
- WCHAR short_path[MAX_PATH];
-
- if (uv__is_active(handle))
- return UV_EINVAL;
-
- handle->cb = cb;
- handle->path = uv__strdup(path);
- if (!handle->path) {
- uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc");
- }
-
- uv__handle_start(handle);
-
- /* Convert name to UTF16. */
- name_size = uv_utf8_to_utf16(path, NULL, 0) * sizeof(WCHAR);
- pathw = (WCHAR*)uv__malloc(name_size);
- if (!pathw) {
- uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc");
- }
-
- if (!uv_utf8_to_utf16(path, pathw,
- name_size / sizeof(WCHAR))) {
- return uv_translate_sys_error(GetLastError());
- }
-
- /* Determine whether path is a file or a directory. */
- attr = GetFileAttributesW(pathw);
- if (attr == INVALID_FILE_ATTRIBUTES) {
- last_error = GetLastError();
- goto error;
- }
-
- is_path_dir = (attr & FILE_ATTRIBUTE_DIRECTORY) ? 1 : 0;
-
- if (is_path_dir) {
- /* path is a directory, so that's the directory that we will watch. */
- handle->dirw = pathw;
- dir_to_watch = pathw;
- } else {
- /*
- * path is a file. So we split path into dir & file parts, and
- * watch the dir directory.
- */
-
- /* Convert to short path. */
- if (!GetShortPathNameW(pathw, short_path, ARRAY_SIZE(short_path))) {
- last_error = GetLastError();
- goto error;
- }
-
- if (uv_split_path(pathw, &dir, &handle->filew) != 0) {
- last_error = GetLastError();
- goto error;
- }
-
- if (uv_split_path(short_path, NULL, &handle->short_filew) != 0) {
- last_error = GetLastError();
- goto error;
- }
-
- dir_to_watch = dir;
- uv__free(pathw);
- pathw = NULL;
- }
-
- handle->dir_handle = CreateFileW(dir_to_watch,
- FILE_LIST_DIRECTORY,
- FILE_SHARE_READ | FILE_SHARE_DELETE |
- FILE_SHARE_WRITE,
- NULL,
- OPEN_EXISTING,
- FILE_FLAG_BACKUP_SEMANTICS |
- FILE_FLAG_OVERLAPPED,
- NULL);
-
- if (dir) {
- uv__free(dir);
- dir = NULL;
- }
-
- if (handle->dir_handle == INVALID_HANDLE_VALUE) {
- last_error = GetLastError();
- goto error;
- }
-
- if (CreateIoCompletionPort(handle->dir_handle,
- handle->loop->iocp,
- (ULONG_PTR)handle,
- 0) == NULL) {
- last_error = GetLastError();
- goto error;
- }
-
- if (!handle->buffer) {
- handle->buffer = (char*)uv__malloc(uv_directory_watcher_buffer_size);
- }
- if (!handle->buffer) {
- uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc");
- }
-
- memset(&(handle->req.u.io.overlapped), 0,
- sizeof(handle->req.u.io.overlapped));
-
- if (!ReadDirectoryChangesW(handle->dir_handle,
- handle->buffer,
- uv_directory_watcher_buffer_size,
- (flags & UV_FS_EVENT_RECURSIVE) ? TRUE : FALSE,
- FILE_NOTIFY_CHANGE_FILE_NAME |
- FILE_NOTIFY_CHANGE_DIR_NAME |
- FILE_NOTIFY_CHANGE_ATTRIBUTES |
- FILE_NOTIFY_CHANGE_SIZE |
- FILE_NOTIFY_CHANGE_LAST_WRITE |
- FILE_NOTIFY_CHANGE_LAST_ACCESS |
- FILE_NOTIFY_CHANGE_CREATION |
- FILE_NOTIFY_CHANGE_SECURITY,
- NULL,
- &handle->req.u.io.overlapped,
- NULL)) {
- last_error = GetLastError();
- goto error;
- }
-
- handle->req_pending = 1;
- return 0;
-
-error:
- if (handle->path) {
- uv__free(handle->path);
- handle->path = NULL;
- }
-
- if (handle->filew) {
- uv__free(handle->filew);
- handle->filew = NULL;
- }
-
- if (handle->short_filew) {
- uv__free(handle->short_filew);
- handle->short_filew = NULL;
- }
-
- uv__free(pathw);
-
- if (handle->dir_handle != INVALID_HANDLE_VALUE) {
- CloseHandle(handle->dir_handle);
- handle->dir_handle = INVALID_HANDLE_VALUE;
- }
-
- if (handle->buffer) {
- uv__free(handle->buffer);
- handle->buffer = NULL;
- }
-
- return uv_translate_sys_error(last_error);
-}
-
-
-int uv_fs_event_stop(uv_fs_event_t* handle) {
- if (!uv__is_active(handle))
- return 0;
-
- if (handle->dir_handle != INVALID_HANDLE_VALUE) {
- CloseHandle(handle->dir_handle);
- handle->dir_handle = INVALID_HANDLE_VALUE;
- }
-
- uv__handle_stop(handle);
-
- if (handle->filew) {
- uv__free(handle->filew);
- handle->filew = NULL;
- }
-
- if (handle->short_filew) {
- uv__free(handle->short_filew);
- handle->short_filew = NULL;
- }
-
- if (handle->path) {
- uv__free(handle->path);
- handle->path = NULL;
- }
-
- if (handle->dirw) {
- uv__free(handle->dirw);
- handle->dirw = NULL;
- }
-
- return 0;
-}
-
-
-void uv_process_fs_event_req(uv_loop_t* loop, uv_req_t* req,
- uv_fs_event_t* handle) {
- FILE_NOTIFY_INFORMATION* file_info;
- int err, sizew, size, result;
- char* filename = NULL;
- WCHAR* filenamew, *long_filenamew = NULL;
- DWORD offset = 0;
-
- assert(req->type == UV_FS_EVENT_REQ);
- assert(handle->req_pending);
- handle->req_pending = 0;
-
- /* Don't report any callbacks if:
- * - We're closing, just push the handle onto the endgame queue
- * - We are not active, just ignore the callback
- */
- if (!uv__is_active(handle)) {
- if (handle->flags & UV__HANDLE_CLOSING) {
- uv_want_endgame(loop, (uv_handle_t*) handle);
- }
- return;
- }
-
- file_info = (FILE_NOTIFY_INFORMATION*)(handle->buffer + offset);
-
- if (REQ_SUCCESS(req)) {
- if (req->u.io.overlapped.InternalHigh > 0) {
- do {
- file_info = (FILE_NOTIFY_INFORMATION*)((char*)file_info + offset);
- assert(!filename);
- assert(!long_filenamew);
-
- /*
- * Fire the event only if we were asked to watch a directory,
- * or if the filename filter matches.
- */
- if (handle->dirw ||
- _wcsnicmp(handle->filew, file_info->FileName,
- file_info->FileNameLength / sizeof(WCHAR)) == 0 ||
- _wcsnicmp(handle->short_filew, file_info->FileName,
- file_info->FileNameLength / sizeof(WCHAR)) == 0) {
-
- if (handle->dirw) {
- /*
- * We attempt to resolve the long form of the file name explicitly.
- * We only do this for file names that might still exist on disk.
- * If this fails, we use the name given by ReadDirectoryChangesW.
- * This may be the long form or the 8.3 short name in some cases.
- */
- if (file_info->Action != FILE_ACTION_REMOVED &&
- file_info->Action != FILE_ACTION_RENAMED_OLD_NAME) {
- /* Construct a full path to the file. */
- size = wcslen(handle->dirw) +
- file_info->FileNameLength / sizeof(WCHAR) + 2;
-
- filenamew = (WCHAR*)uv__malloc(size * sizeof(WCHAR));
- if (!filenamew) {
- uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc");
- }
-
- _snwprintf(filenamew, size, L"%s\\%.*s", handle->dirw,
- file_info->FileNameLength / sizeof(WCHAR),
- file_info->FileName);
-
- filenamew[size - 1] = L'\0';
-
- /* Convert to long name. */
- size = GetLongPathNameW(filenamew, NULL, 0);
-
- if (size) {
- long_filenamew = (WCHAR*)uv__malloc(size * sizeof(WCHAR));
- if (!long_filenamew) {
- uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc");
- }
-
- size = GetLongPathNameW(filenamew, long_filenamew, size);
- if (size) {
- long_filenamew[size] = '\0';
- } else {
- uv__free(long_filenamew);
- long_filenamew = NULL;
- }
- }
-
- uv__free(filenamew);
-
- if (long_filenamew) {
- /* Get the file name out of the long path. */
- result = uv_relative_path(long_filenamew,
- handle->dirw,
- &filenamew);
- uv__free(long_filenamew);
-
- if (result == 0) {
- long_filenamew = filenamew;
- sizew = -1;
- } else {
- long_filenamew = NULL;
- }
- }
-
- /*
- * We could not resolve the long form explicitly.
- * We therefore use the name given by ReadDirectoryChangesW.
- * This may be the long form or the 8.3 short name in some cases.
- */
- if (!long_filenamew) {
- filenamew = file_info->FileName;
- sizew = file_info->FileNameLength / sizeof(WCHAR);
- }
- } else {
- /*
- * Removed or renamed events cannot be resolved to the long form.
- * We therefore use the name given by ReadDirectoryChangesW.
- * This may be the long form or the 8.3 short name in some cases.
- */
- if (!long_filenamew) {
- filenamew = file_info->FileName;
- sizew = file_info->FileNameLength / sizeof(WCHAR);
- }
- }
- } else {
- /* We already have the long name of the file, so just use it. */
- filenamew = handle->filew;
- sizew = -1;
- }
-
- if (filenamew) {
- /* Convert the filename to utf8. */
- size = uv_utf16_to_utf8(filenamew,
- sizew,
- NULL,
- 0);
- if (size) {
- filename = (char*)uv__malloc(size + 1);
- if (!filename) {
- uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc");
- }
-
- size = uv_utf16_to_utf8(filenamew,
- sizew,
- filename,
- size);
- if (size) {
- filename[size] = '\0';
- } else {
- uv__free(filename);
- filename = NULL;
- }
- }
- }
-
- switch (file_info->Action) {
- case FILE_ACTION_ADDED:
- case FILE_ACTION_REMOVED:
- case FILE_ACTION_RENAMED_OLD_NAME:
- case FILE_ACTION_RENAMED_NEW_NAME:
- handle->cb(handle, filename, UV_RENAME, 0);
- break;
-
- case FILE_ACTION_MODIFIED:
- handle->cb(handle, filename, UV_CHANGE, 0);
- break;
- }
-
- uv__free(filename);
- filename = NULL;
- uv__free(long_filenamew);
- long_filenamew = NULL;
- }
-
- offset = file_info->NextEntryOffset;
- } while (offset && !(handle->flags & UV__HANDLE_CLOSING));
- } else {
- handle->cb(handle, NULL, UV_CHANGE, 0);
- }
- } else {
- err = GET_REQ_ERROR(req);
- handle->cb(handle, NULL, 0, uv_translate_sys_error(err));
- }
-
- if (!(handle->flags & UV__HANDLE_CLOSING)) {
- uv_fs_event_queue_readdirchanges(loop, handle);
- } else {
- uv_want_endgame(loop, (uv_handle_t*)handle);
- }
-}
-
-
-void uv_fs_event_close(uv_loop_t* loop, uv_fs_event_t* handle) {
- uv_fs_event_stop(handle);
-
- uv__handle_closing(handle);
-
- if (!handle->req_pending) {
- uv_want_endgame(loop, (uv_handle_t*)handle);
- }
-
-}
-
-
-void uv_fs_event_endgame(uv_loop_t* loop, uv_fs_event_t* handle) {
- if ((handle->flags & UV__HANDLE_CLOSING) && !handle->req_pending) {
- assert(!(handle->flags & UV_HANDLE_CLOSED));
-
- if (handle->buffer) {
- uv__free(handle->buffer);
- handle->buffer = NULL;
- }
-
- uv__handle_close(handle);
- }
-}
diff --git a/3rdparty/libuv/src/win/fs.c b/3rdparty/libuv/src/win/fs.c
deleted file mode 100644
index a32b0127f7e..00000000000
--- a/3rdparty/libuv/src/win/fs.c
+++ /dev/null
@@ -1,2468 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include <assert.h>
-#include <stdlib.h>
-#include <direct.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <io.h>
-#include <limits.h>
-#include <sys/stat.h>
-#include <sys/utime.h>
-#include <stdio.h>
-
-#include "uv.h"
-#include "internal.h"
-#include "req-inl.h"
-#include "handle-inl.h"
-
-#include <wincrypt.h>
-
-
-#define UV_FS_FREE_PATHS 0x0002
-#define UV_FS_FREE_PTR 0x0008
-#define UV_FS_CLEANEDUP 0x0010
-
-
-#define QUEUE_FS_TP_JOB(loop, req) \
- do { \
- uv__req_register(loop, req); \
- uv__work_submit((loop), &(req)->work_req, uv__fs_work, uv__fs_done); \
- } while (0)
-
-#define SET_REQ_RESULT(req, result_value) \
- do { \
- req->result = (result_value); \
- if (req->result == -1) { \
- req->sys_errno_ = _doserrno; \
- req->result = uv_translate_sys_error(req->sys_errno_); \
- } \
- } while (0)
-
-#define SET_REQ_WIN32_ERROR(req, sys_errno) \
- do { \
- req->sys_errno_ = (sys_errno); \
- req->result = uv_translate_sys_error(req->sys_errno_); \
- } while (0)
-
-#define SET_REQ_UV_ERROR(req, uv_errno, sys_errno) \
- do { \
- req->result = (uv_errno); \
- req->sys_errno_ = (sys_errno); \
- } while (0)
-
-#define VERIFY_FD(fd, req) \
- if (fd == -1) { \
- req->result = UV_EBADF; \
- req->sys_errno_ = ERROR_INVALID_HANDLE; \
- return; \
- }
-
-#define FILETIME_TO_UINT(filetime) \
- (*((uint64_t*) &(filetime)) - 116444736000000000ULL)
-
-#define FILETIME_TO_TIME_T(filetime) \
- (FILETIME_TO_UINT(filetime) / 10000000ULL)
-
-#define FILETIME_TO_TIME_NS(filetime, secs) \
- ((FILETIME_TO_UINT(filetime) - (secs * 10000000ULL)) * 100)
-
-#define FILETIME_TO_TIMESPEC(ts, filetime) \
- do { \
- (ts).tv_sec = (long) FILETIME_TO_TIME_T(filetime); \
- (ts).tv_nsec = (long) FILETIME_TO_TIME_NS(filetime, (ts).tv_sec); \
- } while(0)
-
-#define TIME_T_TO_FILETIME(time, filetime_ptr) \
- do { \
- uint64_t bigtime = ((int64_t) (time) * 10000000LL) + \
- 116444736000000000ULL; \
- (filetime_ptr)->dwLowDateTime = bigtime & 0xFFFFFFFF; \
- (filetime_ptr)->dwHighDateTime = bigtime >> 32; \
- } while(0)
-
-#define IS_SLASH(c) ((c) == L'\\' || (c) == L'/')
-#define IS_LETTER(c) (((c) >= L'a' && (c) <= L'z') || \
- ((c) >= L'A' && (c) <= L'Z'))
-
-const WCHAR JUNCTION_PREFIX[] = L"\\??\\";
-const WCHAR JUNCTION_PREFIX_LEN = 4;
-
-const WCHAR LONG_PATH_PREFIX[] = L"\\\\?\\";
-const WCHAR LONG_PATH_PREFIX_LEN = 4;
-
-const WCHAR UNC_PATH_PREFIX[] = L"\\\\?\\UNC\\";
-const WCHAR UNC_PATH_PREFIX_LEN = 8;
-
-
-void uv_fs_init() {
- _fmode = _O_BINARY;
-}
-
-
-INLINE static int fs__capture_path(uv_fs_t* req, const char* path,
- const char* new_path, const int copy_path) {
- char* buf;
- char* pos;
- ssize_t buf_sz = 0, path_len, pathw_len = 0, new_pathw_len = 0;
-
- /* new_path can only be set if path is also set. */
- assert(new_path == NULL || path != NULL);
-
- if (path != NULL) {
- pathw_len = MultiByteToWideChar(CP_UTF8,
- 0,
- path,
- -1,
- NULL,
- 0);
- if (pathw_len == 0) {
- return GetLastError();
- }
-
- buf_sz += pathw_len * sizeof(WCHAR);
- }
-
- if (path != NULL && copy_path) {
- path_len = 1 + strlen(path);
- buf_sz += path_len;
- }
-
- if (new_path != NULL) {
- new_pathw_len = MultiByteToWideChar(CP_UTF8,
- 0,
- new_path,
- -1,
- NULL,
- 0);
- if (new_pathw_len == 0) {
- return GetLastError();
- }
-
- buf_sz += new_pathw_len * sizeof(WCHAR);
- }
-
-
- if (buf_sz == 0) {
- req->file.pathw = NULL;
- req->fs.info.new_pathw = NULL;
- req->path = NULL;
- return 0;
- }
-
- buf = (char*) uv__malloc(buf_sz);
- if (buf == NULL) {
- return ERROR_OUTOFMEMORY;
- }
-
- pos = buf;
-
- if (path != NULL) {
- DWORD r = MultiByteToWideChar(CP_UTF8,
- 0,
- path,
- -1,
- (WCHAR*) pos,
- pathw_len);
- assert(r == (DWORD) pathw_len);
- req->file.pathw = (WCHAR*) pos;
- pos += r * sizeof(WCHAR);
- } else {
- req->file.pathw = NULL;
- }
-
- if (new_path != NULL) {
- DWORD r = MultiByteToWideChar(CP_UTF8,
- 0,
- new_path,
- -1,
- (WCHAR*) pos,
- new_pathw_len);
- assert(r == (DWORD) new_pathw_len);
- req->fs.info.new_pathw = (WCHAR*) pos;
- pos += r * sizeof(WCHAR);
- } else {
- req->fs.info.new_pathw = NULL;
- }
-
- if (!copy_path) {
- req->path = path;
- } else if (path) {
- memcpy(pos, path, path_len);
- assert(path_len == buf_sz - (pos - buf));
- req->path = pos;
- } else {
- req->path = NULL;
- }
-
- req->flags |= UV_FS_FREE_PATHS;
-
- return 0;
-}
-
-
-
-INLINE static void uv_fs_req_init(uv_loop_t* loop, uv_fs_t* req,
- uv_fs_type fs_type, const uv_fs_cb cb) {
- uv_req_init(loop, (uv_req_t*) req);
-
- req->type = UV_FS;
- req->loop = loop;
- req->flags = 0;
- req->fs_type = fs_type;
- req->result = 0;
- req->ptr = NULL;
- req->path = NULL;
- req->cb = cb;
-}
-
-
-static int fs__wide_to_utf8(WCHAR* w_source_ptr,
- DWORD w_source_len,
- char** target_ptr,
- uint64_t* target_len_ptr) {
- int r;
- int target_len;
- char* target;
- target_len = WideCharToMultiByte(CP_UTF8,
- 0,
- w_source_ptr,
- w_source_len,
- NULL,
- 0,
- NULL,
- NULL);
-
- if (target_len == 0) {
- return -1;
- }
-
- if (target_len_ptr != NULL) {
- *target_len_ptr = target_len;
- }
-
- if (target_ptr == NULL) {
- return 0;
- }
-
- target = uv__malloc(target_len + 1);
- if (target == NULL) {
- SetLastError(ERROR_OUTOFMEMORY);
- return -1;
- }
-
- r = WideCharToMultiByte(CP_UTF8,
- 0,
- w_source_ptr,
- w_source_len,
- target,
- target_len,
- NULL,
- NULL);
- assert(r == target_len);
- target[target_len] = '\0';
- *target_ptr = target;
- return 0;
-}
-
-
-INLINE static int fs__readlink_handle(HANDLE handle, char** target_ptr,
- uint64_t* target_len_ptr) {
- char buffer[MAXIMUM_REPARSE_DATA_BUFFER_SIZE];
- REPARSE_DATA_BUFFER* reparse_data = (REPARSE_DATA_BUFFER*) buffer;
- WCHAR* w_target;
- DWORD w_target_len;
- DWORD bytes;
-
- if (!DeviceIoControl(handle,
- FSCTL_GET_REPARSE_POINT,
- NULL,
- 0,
- buffer,
- sizeof buffer,
- &bytes,
- NULL)) {
- return -1;
- }
-
- if (reparse_data->ReparseTag == IO_REPARSE_TAG_SYMLINK) {
- /* Real symlink */
- w_target = reparse_data->SymbolicLinkReparseBuffer.PathBuffer +
- (reparse_data->SymbolicLinkReparseBuffer.SubstituteNameOffset /
- sizeof(WCHAR));
- w_target_len =
- reparse_data->SymbolicLinkReparseBuffer.SubstituteNameLength /
- sizeof(WCHAR);
-
- /* Real symlinks can contain pretty much everything, but the only thing */
- /* we really care about is undoing the implicit conversion to an NT */
- /* namespaced path that CreateSymbolicLink will perform on absolute */
- /* paths. If the path is win32-namespaced then the user must have */
- /* explicitly made it so, and we better just return the unmodified */
- /* reparse data. */
- if (w_target_len >= 4 &&
- w_target[0] == L'\\' &&
- w_target[1] == L'?' &&
- w_target[2] == L'?' &&
- w_target[3] == L'\\') {
- /* Starts with \??\ */
- if (w_target_len >= 6 &&
- ((w_target[4] >= L'A' && w_target[4] <= L'Z') ||
- (w_target[4] >= L'a' && w_target[4] <= L'z')) &&
- w_target[5] == L':' &&
- (w_target_len == 6 || w_target[6] == L'\\')) {
- /* \??\<drive>:\ */
- w_target += 4;
- w_target_len -= 4;
-
- } else if (w_target_len >= 8 &&
- (w_target[4] == L'U' || w_target[4] == L'u') &&
- (w_target[5] == L'N' || w_target[5] == L'n') &&
- (w_target[6] == L'C' || w_target[6] == L'c') &&
- w_target[7] == L'\\') {
- /* \??\UNC\<server>\<share>\ - make sure the final path looks like */
- /* \\<server>\<share>\ */
- w_target += 6;
- w_target[0] = L'\\';
- w_target_len -= 6;
- }
- }
-
- } else if (reparse_data->ReparseTag == IO_REPARSE_TAG_MOUNT_POINT) {
- /* Junction. */
- w_target = reparse_data->MountPointReparseBuffer.PathBuffer +
- (reparse_data->MountPointReparseBuffer.SubstituteNameOffset /
- sizeof(WCHAR));
- w_target_len = reparse_data->MountPointReparseBuffer.SubstituteNameLength /
- sizeof(WCHAR);
-
- /* Only treat junctions that look like \??\<drive>:\ as symlink. */
- /* Junctions can also be used as mount points, like \??\Volume{<guid>}, */
- /* but that's confusing for programs since they wouldn't be able to */
- /* actually understand such a path when returned by uv_readlink(). */
- /* UNC paths are never valid for junctions so we don't care about them. */
- if (!(w_target_len >= 6 &&
- w_target[0] == L'\\' &&
- w_target[1] == L'?' &&
- w_target[2] == L'?' &&
- w_target[3] == L'\\' &&
- ((w_target[4] >= L'A' && w_target[4] <= L'Z') ||
- (w_target[4] >= L'a' && w_target[4] <= L'z')) &&
- w_target[5] == L':' &&
- (w_target_len == 6 || w_target[6] == L'\\'))) {
- SetLastError(ERROR_SYMLINK_NOT_SUPPORTED);
- return -1;
- }
-
- /* Remove leading \??\ */
- w_target += 4;
- w_target_len -= 4;
-
- } else {
- /* Reparse tag does not indicate a symlink. */
- SetLastError(ERROR_SYMLINK_NOT_SUPPORTED);
- return -1;
- }
-
- return fs__wide_to_utf8(w_target, w_target_len, target_ptr, target_len_ptr);
-}
-
-
-void fs__open(uv_fs_t* req) {
- DWORD access;
- DWORD share;
- DWORD disposition;
- DWORD attributes = 0;
- HANDLE file;
- int fd, current_umask;
- int flags = req->fs.info.file_flags;
-
- /* Obtain the active umask. umask() never fails and returns the previous */
- /* umask. */
- current_umask = umask(0);
- umask(current_umask);
-
- /* convert flags and mode to CreateFile parameters */
- switch (flags & (_O_RDONLY | _O_WRONLY | _O_RDWR)) {
- case _O_RDONLY:
- access = FILE_GENERIC_READ;
- attributes |= FILE_FLAG_BACKUP_SEMANTICS;
- break;
- case _O_WRONLY:
- access = FILE_GENERIC_WRITE;
- break;
- case _O_RDWR:
- access = FILE_GENERIC_READ | FILE_GENERIC_WRITE;
- break;
- default:
- goto einval;
- }
-
- if (flags & _O_APPEND) {
- access &= ~FILE_WRITE_DATA;
- access |= FILE_APPEND_DATA;
- attributes &= ~FILE_FLAG_BACKUP_SEMANTICS;
- }
-
- /*
- * Here is where we deviate significantly from what CRT's _open()
- * does. We indiscriminately use all the sharing modes, to match
- * UNIX semantics. In particular, this ensures that the file can
- * be deleted even whilst it's open, fixing issue #1449.
- */
- share = FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE;
-
- switch (flags & (_O_CREAT | _O_EXCL | _O_TRUNC)) {
- case 0:
- case _O_EXCL:
- disposition = OPEN_EXISTING;
- break;
- case _O_CREAT:
- disposition = OPEN_ALWAYS;
- break;
- case _O_CREAT | _O_EXCL:
- case _O_CREAT | _O_TRUNC | _O_EXCL:
- disposition = CREATE_NEW;
- break;
- case _O_TRUNC:
- case _O_TRUNC | _O_EXCL:
- disposition = TRUNCATE_EXISTING;
- break;
- case _O_CREAT | _O_TRUNC:
- disposition = CREATE_ALWAYS;
- break;
- default:
- goto einval;
- }
-
- attributes |= FILE_ATTRIBUTE_NORMAL;
- if (flags & _O_CREAT) {
- if (!((req->fs.info.mode & ~current_umask) & _S_IWRITE)) {
- attributes |= FILE_ATTRIBUTE_READONLY;
- }
- }
-
- if (flags & _O_TEMPORARY ) {
- attributes |= FILE_FLAG_DELETE_ON_CLOSE | FILE_ATTRIBUTE_TEMPORARY;
- access |= DELETE;
- }
-
- if (flags & _O_SHORT_LIVED) {
- attributes |= FILE_ATTRIBUTE_TEMPORARY;
- }
-
- switch (flags & (_O_SEQUENTIAL | _O_RANDOM)) {
- case 0:
- break;
- case _O_SEQUENTIAL:
- attributes |= FILE_FLAG_SEQUENTIAL_SCAN;
- break;
- case _O_RANDOM:
- attributes |= FILE_FLAG_RANDOM_ACCESS;
- break;
- default:
- goto einval;
- }
-
- /* Setting this flag makes it possible to open a directory. */
- attributes |= FILE_FLAG_BACKUP_SEMANTICS;
-
- file = CreateFileW(req->file.pathw,
- access,
- share,
- NULL,
- disposition,
- attributes,
- NULL);
- if (file == INVALID_HANDLE_VALUE) {
- DWORD error = GetLastError();
- if (error == ERROR_FILE_EXISTS && (flags & _O_CREAT) &&
- !(flags & _O_EXCL)) {
- /* Special case: when ERROR_FILE_EXISTS happens and O_CREAT was */
- /* specified, it means the path referred to a directory. */
- SET_REQ_UV_ERROR(req, UV_EISDIR, error);
- } else {
- SET_REQ_WIN32_ERROR(req, GetLastError());
- }
- return;
- }
-
- fd = _open_osfhandle((intptr_t) file, flags);
- if (fd < 0) {
- /* The only known failure mode for _open_osfhandle() is EMFILE, in which
- * case GetLastError() will return zero. However we'll try to handle other
- * errors as well, should they ever occur.
- */
- if (errno == EMFILE)
- SET_REQ_UV_ERROR(req, UV_EMFILE, ERROR_TOO_MANY_OPEN_FILES);
- else if (GetLastError() != ERROR_SUCCESS)
- SET_REQ_WIN32_ERROR(req, GetLastError());
- else
- SET_REQ_WIN32_ERROR(req, UV_UNKNOWN);
- CloseHandle(file);
- return;
- }
-
- SET_REQ_RESULT(req, fd);
- return;
-
- einval:
- SET_REQ_UV_ERROR(req, UV_EINVAL, ERROR_INVALID_PARAMETER);
-}
-
-void fs__close(uv_fs_t* req) {
- int fd = req->file.fd;
- int result;
-
- VERIFY_FD(fd, req);
-
- if (fd > 2)
- result = _close(fd);
- else
- result = 0;
-
- /* _close doesn't set _doserrno on failure, but it does always set errno
- * to EBADF on failure.
- */
- if (result == -1) {
- assert(errno == EBADF);
- SET_REQ_UV_ERROR(req, UV_EBADF, ERROR_INVALID_HANDLE);
- } else {
- req->result = 0;
- }
-}
-
-
-void fs__read(uv_fs_t* req) {
- int fd = req->file.fd;
- int64_t offset = req->fs.info.offset;
- HANDLE handle;
- OVERLAPPED overlapped, *overlapped_ptr;
- LARGE_INTEGER offset_;
- DWORD bytes;
- DWORD error;
- int result;
- unsigned int index;
-
- VERIFY_FD(fd, req);
-
- handle = uv__get_osfhandle(fd);
-
- if (handle == INVALID_HANDLE_VALUE) {
- SET_REQ_WIN32_ERROR(req, ERROR_INVALID_HANDLE);
- return;
- }
-
- if (offset != -1) {
- memset(&overlapped, 0, sizeof overlapped);
- overlapped_ptr = &overlapped;
- } else {
- overlapped_ptr = NULL;
- }
-
- index = 0;
- bytes = 0;
- do {
- DWORD incremental_bytes;
-
- if (offset != -1) {
- offset_.QuadPart = offset + bytes;
- overlapped.Offset = offset_.LowPart;
- overlapped.OffsetHigh = offset_.HighPart;
- }
-
- result = ReadFile(handle,
- req->fs.info.bufs[index].base,
- req->fs.info.bufs[index].len,
- &incremental_bytes,
- overlapped_ptr);
- bytes += incremental_bytes;
- ++index;
- } while (result && index < req->fs.info.nbufs);
-
- if (result || bytes > 0) {
- SET_REQ_RESULT(req, bytes);
- } else {
- error = GetLastError();
- if (error == ERROR_HANDLE_EOF) {
- SET_REQ_RESULT(req, bytes);
- } else {
- SET_REQ_WIN32_ERROR(req, error);
- }
- }
-}
-
-
-void fs__write(uv_fs_t* req) {
- int fd = req->file.fd;
- int64_t offset = req->fs.info.offset;
- HANDLE handle;
- OVERLAPPED overlapped, *overlapped_ptr;
- LARGE_INTEGER offset_;
- DWORD bytes;
- int result;
- unsigned int index;
-
- VERIFY_FD(fd, req);
-
- handle = uv__get_osfhandle(fd);
- if (handle == INVALID_HANDLE_VALUE) {
- SET_REQ_WIN32_ERROR(req, ERROR_INVALID_HANDLE);
- return;
- }
-
- if (offset != -1) {
- memset(&overlapped, 0, sizeof overlapped);
- overlapped_ptr = &overlapped;
- } else {
- overlapped_ptr = NULL;
- }
-
- index = 0;
- bytes = 0;
- do {
- DWORD incremental_bytes;
-
- if (offset != -1) {
- offset_.QuadPart = offset + bytes;
- overlapped.Offset = offset_.LowPart;
- overlapped.OffsetHigh = offset_.HighPart;
- }
-
- result = WriteFile(handle,
- req->fs.info.bufs[index].base,
- req->fs.info.bufs[index].len,
- &incremental_bytes,
- overlapped_ptr);
- bytes += incremental_bytes;
- ++index;
- } while (result && index < req->fs.info.nbufs);
-
- if (result || bytes > 0) {
- SET_REQ_RESULT(req, bytes);
- } else {
- SET_REQ_WIN32_ERROR(req, GetLastError());
- }
-}
-
-
-void fs__rmdir(uv_fs_t* req) {
- int result = _wrmdir(req->file.pathw);
- SET_REQ_RESULT(req, result);
-}
-
-
-void fs__unlink(uv_fs_t* req) {
- const WCHAR* pathw = req->file.pathw;
- HANDLE handle;
- BY_HANDLE_FILE_INFORMATION info;
- FILE_DISPOSITION_INFORMATION disposition;
- IO_STATUS_BLOCK iosb;
- NTSTATUS status;
-
- handle = CreateFileW(pathw,
- FILE_READ_ATTRIBUTES | FILE_WRITE_ATTRIBUTES | DELETE,
- FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
- NULL,
- OPEN_EXISTING,
- FILE_FLAG_OPEN_REPARSE_POINT | FILE_FLAG_BACKUP_SEMANTICS,
- NULL);
-
- if (handle == INVALID_HANDLE_VALUE) {
- SET_REQ_WIN32_ERROR(req, GetLastError());
- return;
- }
-
- if (!GetFileInformationByHandle(handle, &info)) {
- SET_REQ_WIN32_ERROR(req, GetLastError());
- CloseHandle(handle);
- return;
- }
-
- if (info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
- /* Do not allow deletion of directories, unless it is a symlink. When */
- /* the path refers to a non-symlink directory, report EPERM as mandated */
- /* by POSIX.1. */
-
- /* Check if it is a reparse point. If it's not, it's a normal directory. */
- if (!(info.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)) {
- SET_REQ_WIN32_ERROR(req, ERROR_ACCESS_DENIED);
- CloseHandle(handle);
- return;
- }
-
- /* Read the reparse point and check if it is a valid symlink. */
- /* If not, don't unlink. */
- if (fs__readlink_handle(handle, NULL, NULL) < 0) {
- DWORD error = GetLastError();
- if (error == ERROR_SYMLINK_NOT_SUPPORTED)
- error = ERROR_ACCESS_DENIED;
- SET_REQ_WIN32_ERROR(req, error);
- CloseHandle(handle);
- return;
- }
- }
-
- if (info.dwFileAttributes & FILE_ATTRIBUTE_READONLY) {
- /* Remove read-only attribute */
- FILE_BASIC_INFORMATION basic = { 0 };
-
- basic.FileAttributes = info.dwFileAttributes & ~(FILE_ATTRIBUTE_READONLY);
-
- status = pNtSetInformationFile(handle,
- &iosb,
- &basic,
- sizeof basic,
- FileBasicInformation);
- if (!NT_SUCCESS(status)) {
- SET_REQ_WIN32_ERROR(req, pRtlNtStatusToDosError(status));
- CloseHandle(handle);
- return;
- }
- }
-
- /* Try to set the delete flag. */
- disposition.DeleteFile = TRUE;
- status = pNtSetInformationFile(handle,
- &iosb,
- &disposition,
- sizeof disposition,
- FileDispositionInformation);
- if (NT_SUCCESS(status)) {
- SET_REQ_SUCCESS(req);
- } else {
- SET_REQ_WIN32_ERROR(req, pRtlNtStatusToDosError(status));
- }
-
- CloseHandle(handle);
-}
-
-
-void fs__mkdir(uv_fs_t* req) {
- /* TODO: use req->mode. */
- int result = _wmkdir(req->file.pathw);
- SET_REQ_RESULT(req, result);
-}
-
-
-/* OpenBSD original: lib/libc/stdio/mktemp.c */
-void fs__mkdtemp(uv_fs_t* req) {
- static const WCHAR *tempchars =
- L"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
- static const size_t num_chars = 62;
- static const size_t num_x = 6;
- WCHAR *cp, *ep;
- unsigned int tries, i;
- size_t len;
- HCRYPTPROV h_crypt_prov;
- uint64_t v;
- BOOL released;
-
- len = wcslen(req->file.pathw);
- ep = req->file.pathw + len;
- if (len < num_x || wcsncmp(ep - num_x, L"XXXXXX", num_x)) {
- SET_REQ_UV_ERROR(req, UV_EINVAL, ERROR_INVALID_PARAMETER);
- return;
- }
-
- if (!CryptAcquireContext(&h_crypt_prov, NULL, NULL, PROV_RSA_FULL,
- CRYPT_VERIFYCONTEXT)) {
- SET_REQ_WIN32_ERROR(req, GetLastError());
- return;
- }
-
- tries = TMP_MAX;
- do {
- if (!CryptGenRandom(h_crypt_prov, sizeof(v), (BYTE*) &v)) {
- SET_REQ_WIN32_ERROR(req, GetLastError());
- break;
- }
-
- cp = ep - num_x;
- for (i = 0; i < num_x; i++) {
- *cp++ = tempchars[v % num_chars];
- v /= num_chars;
- }
-
- if (_wmkdir(req->file.pathw) == 0) {
- len = strlen(req->path);
- wcstombs((char*) req->path + len - num_x, ep - num_x, num_x);
- SET_REQ_RESULT(req, 0);
- break;
- } else if (errno != EEXIST) {
- SET_REQ_RESULT(req, -1);
- break;
- }
- } while (--tries);
-
- released = CryptReleaseContext(h_crypt_prov, 0);
- assert(released);
- if (tries == 0) {
- SET_REQ_RESULT(req, -1);
- }
-}
-
-
-void fs__scandir(uv_fs_t* req) {
- static const size_t dirents_initial_size = 32;
-
- HANDLE dir_handle = INVALID_HANDLE_VALUE;
-
- uv__dirent_t** dirents = NULL;
- size_t dirents_size = 0;
- size_t dirents_used = 0;
-
- IO_STATUS_BLOCK iosb;
- NTSTATUS status;
-
- /* Buffer to hold directory entries returned by NtQueryDirectoryFile.
- * It's important that this buffer can hold at least one entry, regardless
- * of the length of the file names present in the enumerated directory.
- * A file name is at most 256 WCHARs long.
- * According to MSDN, the buffer must be aligned at an 8-byte boundary.
- */
-#if _MSC_VER
- __declspec(align(8)) char buffer[8192];
-#else
- __attribute__ ((aligned (8))) char buffer[8192];
-#endif
-
- STATIC_ASSERT(sizeof buffer >=
- sizeof(FILE_DIRECTORY_INFORMATION) + 256 * sizeof(WCHAR));
-
- /* Open the directory. */
- dir_handle =
- CreateFileW(req->file.pathw,
- FILE_LIST_DIRECTORY | SYNCHRONIZE,
- FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
- NULL,
- OPEN_EXISTING,
- FILE_FLAG_BACKUP_SEMANTICS,
- NULL);
- if (dir_handle == INVALID_HANDLE_VALUE)
- goto win32_error;
-
- /* Read the first chunk. */
- status = pNtQueryDirectoryFile(dir_handle,
- NULL,
- NULL,
- NULL,
- &iosb,
- &buffer,
- sizeof buffer,
- FileDirectoryInformation,
- FALSE,
- NULL,
- TRUE);
-
- /* If the handle is not a directory, we'll get STATUS_INVALID_PARAMETER.
- * This should be reported back as UV_ENOTDIR.
- */
- if (status == STATUS_INVALID_PARAMETER)
- goto not_a_directory_error;
-
- while (NT_SUCCESS(status)) {
- char* position = buffer;
- size_t next_entry_offset = 0;
-
- do {
- FILE_DIRECTORY_INFORMATION* info;
- uv__dirent_t* dirent;
-
- size_t wchar_len;
- size_t utf8_len;
-
- /* Obtain a pointer to the current directory entry. */
- position += next_entry_offset;
- info = (FILE_DIRECTORY_INFORMATION*) position;
-
- /* Fetch the offset to the next directory entry. */
- next_entry_offset = info->NextEntryOffset;
-
- /* Compute the length of the filename in WCHARs. */
- wchar_len = info->FileNameLength / sizeof info->FileName[0];
-
- /* Skip over '.' and '..' entries. */
- if (wchar_len == 1 && info->FileName[0] == L'.')
- continue;
- if (wchar_len == 2 && info->FileName[0] == L'.' &&
- info->FileName[1] == L'.')
- continue;
-
- /* Compute the space required to store the filename as UTF-8. */
- utf8_len = WideCharToMultiByte(
- CP_UTF8, 0, &info->FileName[0], wchar_len, NULL, 0, NULL, NULL);
- if (utf8_len == 0)
- goto win32_error;
-
- /* Resize the dirent array if needed. */
- if (dirents_used >= dirents_size) {
- size_t new_dirents_size =
- dirents_size == 0 ? dirents_initial_size : dirents_size << 1;
- uv__dirent_t** new_dirents =
- uv__realloc(dirents, new_dirents_size * sizeof *dirents);
-
- if (new_dirents == NULL)
- goto out_of_memory_error;
-
- dirents_size = new_dirents_size;
- dirents = new_dirents;
- }
-
- /* Allocate space for the uv dirent structure. The dirent structure
- * includes room for the first character of the filename, but `utf8_len`
- * doesn't count the NULL terminator at this point.
- */
- dirent = uv__malloc(sizeof *dirent + utf8_len);
- if (dirent == NULL)
- goto out_of_memory_error;
-
- dirents[dirents_used++] = dirent;
-
- /* Convert file name to UTF-8. */
- if (WideCharToMultiByte(CP_UTF8,
- 0,
- &info->FileName[0],
- wchar_len,
- &dirent->d_name[0],
- utf8_len,
- NULL,
- NULL) == 0)
- goto win32_error;
-
- /* Add a null terminator to the filename. */
- dirent->d_name[utf8_len] = '\0';
-
- /* Fill out the type field. */
- if (info->FileAttributes & FILE_ATTRIBUTE_DEVICE)
- dirent->d_type = UV__DT_CHAR;
- else if (info->FileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)
- dirent->d_type = UV__DT_LINK;
- else if (info->FileAttributes & FILE_ATTRIBUTE_DIRECTORY)
- dirent->d_type = UV__DT_DIR;
- else
- dirent->d_type = UV__DT_FILE;
- } while (next_entry_offset != 0);
-
- /* Read the next chunk. */
- status = pNtQueryDirectoryFile(dir_handle,
- NULL,
- NULL,
- NULL,
- &iosb,
- &buffer,
- sizeof buffer,
- FileDirectoryInformation,
- FALSE,
- NULL,
- FALSE);
-
- /* After the first pNtQueryDirectoryFile call, the function may return
- * STATUS_SUCCESS even if the buffer was too small to hold at least one
- * directory entry.
- */
- if (status == STATUS_SUCCESS && iosb.Information == 0)
- status = STATUS_BUFFER_OVERFLOW;
- }
-
- if (status != STATUS_NO_MORE_FILES)
- goto nt_error;
-
- CloseHandle(dir_handle);
-
- /* Store the result in the request object. */
- req->ptr = dirents;
- if (dirents != NULL)
- req->flags |= UV_FS_FREE_PTR;
-
- SET_REQ_RESULT(req, dirents_used);
-
- /* `nbufs` will be used as index by uv_fs_scandir_next. */
- req->fs.info.nbufs = 0;
-
- return;
-
-nt_error:
- SET_REQ_WIN32_ERROR(req, pRtlNtStatusToDosError(status));
- goto cleanup;
-
-win32_error:
- SET_REQ_WIN32_ERROR(req, GetLastError());
- goto cleanup;
-
-not_a_directory_error:
- SET_REQ_UV_ERROR(req, UV_ENOTDIR, ERROR_DIRECTORY);
- goto cleanup;
-
-out_of_memory_error:
- SET_REQ_UV_ERROR(req, UV_ENOMEM, ERROR_OUTOFMEMORY);
- goto cleanup;
-
-cleanup:
- if (dir_handle != INVALID_HANDLE_VALUE)
- CloseHandle(dir_handle);
- while (dirents_used > 0)
- uv__free(dirents[--dirents_used]);
- if (dirents != NULL)
- uv__free(dirents);
-}
-
-
-INLINE static int fs__stat_handle(HANDLE handle, uv_stat_t* statbuf) {
- FILE_ALL_INFORMATION file_info;
- FILE_FS_VOLUME_INFORMATION volume_info;
- NTSTATUS nt_status;
- IO_STATUS_BLOCK io_status;
-
- nt_status = pNtQueryInformationFile(handle,
- &io_status,
- &file_info,
- sizeof file_info,
- FileAllInformation);
-
- /* Buffer overflow (a warning status code) is expected here. */
- if (NT_ERROR(nt_status)) {
- SetLastError(pRtlNtStatusToDosError(nt_status));
- return -1;
- }
-
- nt_status = pNtQueryVolumeInformationFile(handle,
- &io_status,
- &volume_info,
- sizeof volume_info,
- FileFsVolumeInformation);
-
- /* Buffer overflow (a warning status code) is expected here. */
- if (io_status.Status == STATUS_NOT_IMPLEMENTED) {
- statbuf->st_dev = 0;
- } else if (NT_ERROR(nt_status)) {
- SetLastError(pRtlNtStatusToDosError(nt_status));
- return -1;
- } else {
- statbuf->st_dev = volume_info.VolumeSerialNumber;
- }
-
- /* Todo: st_mode should probably always be 0666 for everyone. We might also
- * want to report 0777 if the file is a .exe or a directory.
- *
- * Currently it's based on whether the 'readonly' attribute is set, which
- * makes little sense because the semantics are so different: the 'read-only'
- * flag is just a way for a user to protect against accidental deletion, and
- * serves no security purpose. Windows uses ACLs for that.
- *
- * Also people now use uv_fs_chmod() to take away the writable bit for good
- * reasons. Windows however just makes the file read-only, which makes it
- * impossible to delete the file afterwards, since read-only files can't be
- * deleted.
- *
- * IOW it's all just a clusterfuck and we should think of something that
- * makes slightly more sense.
- *
- * And uv_fs_chmod should probably just fail on windows or be a total no-op.
- * There's nothing sensible it can do anyway.
- */
- statbuf->st_mode = 0;
-
- if (file_info.BasicInformation.FileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) {
- statbuf->st_mode |= S_IFLNK;
- if (fs__readlink_handle(handle, NULL, &statbuf->st_size) != 0)
- return -1;
-
- } else if (file_info.BasicInformation.FileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
- statbuf->st_mode |= _S_IFDIR;
- statbuf->st_size = 0;
-
- } else {
- statbuf->st_mode |= _S_IFREG;
- statbuf->st_size = file_info.StandardInformation.EndOfFile.QuadPart;
- }
-
- if (file_info.BasicInformation.FileAttributes & FILE_ATTRIBUTE_READONLY)
- statbuf->st_mode |= _S_IREAD | (_S_IREAD >> 3) | (_S_IREAD >> 6);
- else
- statbuf->st_mode |= (_S_IREAD | _S_IWRITE) | ((_S_IREAD | _S_IWRITE) >> 3) |
- ((_S_IREAD | _S_IWRITE) >> 6);
-
- FILETIME_TO_TIMESPEC(statbuf->st_atim, file_info.BasicInformation.LastAccessTime);
- FILETIME_TO_TIMESPEC(statbuf->st_ctim, file_info.BasicInformation.ChangeTime);
- FILETIME_TO_TIMESPEC(statbuf->st_mtim, file_info.BasicInformation.LastWriteTime);
- FILETIME_TO_TIMESPEC(statbuf->st_birthtim, file_info.BasicInformation.CreationTime);
-
- statbuf->st_ino = file_info.InternalInformation.IndexNumber.QuadPart;
-
- /* st_blocks contains the on-disk allocation size in 512-byte units. */
- statbuf->st_blocks =
- file_info.StandardInformation.AllocationSize.QuadPart >> 9ULL;
-
- statbuf->st_nlink = file_info.StandardInformation.NumberOfLinks;
-
- /* The st_blksize is supposed to be the 'optimal' number of bytes for reading
- * and writing to the disk. That is, for any definition of 'optimal' - it's
- * supposed to at least avoid read-update-write behavior when writing to the
- * disk.
- *
- * However nobody knows this and even fewer people actually use this value,
- * and in order to fill it out we'd have to make another syscall to query the
- * volume for FILE_FS_SECTOR_SIZE_INFORMATION.
- *
- * Therefore we'll just report a sensible value that's quite commonly okay
- * on modern hardware.
- */
- statbuf->st_blksize = 2048;
-
- /* Todo: set st_flags to something meaningful. Also provide a wrapper for
- * chattr(2).
- */
- statbuf->st_flags = 0;
-
- /* Windows has nothing sensible to say about these values, so they'll just
- * remain empty.
- */
- statbuf->st_gid = 0;
- statbuf->st_uid = 0;
- statbuf->st_rdev = 0;
- statbuf->st_gen = 0;
-
- return 0;
-}
-
-
-INLINE static void fs__stat_prepare_path(WCHAR* pathw) {
- size_t len = wcslen(pathw);
-
- /* TODO: ignore namespaced paths. */
- if (len > 1 && pathw[len - 2] != L':' &&
- (pathw[len - 1] == L'\\' || pathw[len - 1] == L'/')) {
- pathw[len - 1] = '\0';
- }
-}
-
-
-INLINE static void fs__stat_impl(uv_fs_t* req, int do_lstat) {
- HANDLE handle;
- DWORD flags;
-
- flags = FILE_FLAG_BACKUP_SEMANTICS;
- if (do_lstat) {
- flags |= FILE_FLAG_OPEN_REPARSE_POINT;
- }
-
- handle = CreateFileW(req->file.pathw,
- FILE_READ_ATTRIBUTES,
- FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
- NULL,
- OPEN_EXISTING,
- flags,
- NULL);
- if (handle == INVALID_HANDLE_VALUE) {
- SET_REQ_WIN32_ERROR(req, GetLastError());
- return;
- }
-
- if (fs__stat_handle(handle, &req->statbuf) != 0) {
- DWORD error = GetLastError();
- if (do_lstat && error == ERROR_SYMLINK_NOT_SUPPORTED) {
- /* We opened a reparse point but it was not a symlink. Try again. */
- fs__stat_impl(req, 0);
-
- } else {
- /* Stat failed. */
- SET_REQ_WIN32_ERROR(req, GetLastError());
- }
-
- CloseHandle(handle);
- return;
- }
-
- req->ptr = &req->statbuf;
- req->result = 0;
- CloseHandle(handle);
-}
-
-
-static void fs__stat(uv_fs_t* req) {
- fs__stat_prepare_path(req->file.pathw);
- fs__stat_impl(req, 0);
-}
-
-
-static void fs__lstat(uv_fs_t* req) {
- fs__stat_prepare_path(req->file.pathw);
- fs__stat_impl(req, 1);
-}
-
-
-static void fs__fstat(uv_fs_t* req) {
- int fd = req->file.fd;
- HANDLE handle;
-
- VERIFY_FD(fd, req);
-
- handle = uv__get_osfhandle(fd);
-
- if (handle == INVALID_HANDLE_VALUE) {
- SET_REQ_WIN32_ERROR(req, ERROR_INVALID_HANDLE);
- return;
- }
-
- if (fs__stat_handle(handle, &req->statbuf) != 0) {
- SET_REQ_WIN32_ERROR(req, GetLastError());
- return;
- }
-
- req->ptr = &req->statbuf;
- req->result = 0;
-}
-
-
-static void fs__rename(uv_fs_t* req) {
- if (!MoveFileExW(req->file.pathw, req->fs.info.new_pathw, MOVEFILE_REPLACE_EXISTING)) {
- SET_REQ_WIN32_ERROR(req, GetLastError());
- return;
- }
-
- SET_REQ_RESULT(req, 0);
-}
-
-
-INLINE static void fs__sync_impl(uv_fs_t* req) {
- int fd = req->file.fd;
- int result;
-
- VERIFY_FD(fd, req);
-
- result = FlushFileBuffers(uv__get_osfhandle(fd)) ? 0 : -1;
- if (result == -1) {
- SET_REQ_WIN32_ERROR(req, GetLastError());
- } else {
- SET_REQ_RESULT(req, result);
- }
-}
-
-
-static void fs__fsync(uv_fs_t* req) {
- fs__sync_impl(req);
-}
-
-
-static void fs__fdatasync(uv_fs_t* req) {
- fs__sync_impl(req);
-}
-
-
-static void fs__ftruncate(uv_fs_t* req) {
- int fd = req->file.fd;
- HANDLE handle;
- NTSTATUS status;
- IO_STATUS_BLOCK io_status;
- FILE_END_OF_FILE_INFORMATION eof_info;
-
- VERIFY_FD(fd, req);
-
- handle = uv__get_osfhandle(fd);
-
- eof_info.EndOfFile.QuadPart = req->fs.info.offset;
-
- status = pNtSetInformationFile(handle,
- &io_status,
- &eof_info,
- sizeof eof_info,
- FileEndOfFileInformation);
-
- if (NT_SUCCESS(status)) {
- SET_REQ_RESULT(req, 0);
- } else {
- SET_REQ_WIN32_ERROR(req, pRtlNtStatusToDosError(status));
- }
-}
-
-
-static void fs__sendfile(uv_fs_t* req) {
- int fd_in = req->file.fd, fd_out = req->fs.info.fd_out;
- size_t length = req->fs.info.bufsml[0].len;
- int64_t offset = req->fs.info.offset;
- const size_t max_buf_size = 65536;
- size_t buf_size = length < max_buf_size ? length : max_buf_size;
- int n, result = 0;
- int64_t result_offset = 0;
- char* buf = (char*) uv__malloc(buf_size);
- if (!buf) {
- uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc");
- }
-
- if (offset != -1) {
- result_offset = _lseeki64(fd_in, offset, SEEK_SET);
- }
-
- if (result_offset == -1) {
- result = -1;
- } else {
- while (length > 0) {
- n = _read(fd_in, buf, length < buf_size ? length : buf_size);
- if (n == 0) {
- break;
- } else if (n == -1) {
- result = -1;
- break;
- }
-
- length -= n;
-
- n = _write(fd_out, buf, n);
- if (n == -1) {
- result = -1;
- break;
- }
-
- result += n;
- }
- }
-
- uv__free(buf);
-
- SET_REQ_RESULT(req, result);
-}
-
-
-static void fs__access(uv_fs_t* req) {
- DWORD attr = GetFileAttributesW(req->file.pathw);
-
- if (attr == INVALID_FILE_ATTRIBUTES) {
- SET_REQ_WIN32_ERROR(req, GetLastError());
- return;
- }
-
- /*
- * Access is possible if
- * - write access wasn't requested,
- * - or the file isn't read-only,
- * - or it's a directory.
- * (Directories cannot be read-only on Windows.)
- */
- if (!(req->flags & W_OK) ||
- !(attr & FILE_ATTRIBUTE_READONLY) ||
- (attr & FILE_ATTRIBUTE_DIRECTORY)) {
- SET_REQ_RESULT(req, 0);
- } else {
- SET_REQ_WIN32_ERROR(req, UV_EPERM);
- }
-
-}
-
-
-static void fs__chmod(uv_fs_t* req) {
- int result = _wchmod(req->file.pathw, req->fs.info.mode);
- SET_REQ_RESULT(req, result);
-}
-
-
-static void fs__fchmod(uv_fs_t* req) {
- int fd = req->file.fd;
- HANDLE handle;
- NTSTATUS nt_status;
- IO_STATUS_BLOCK io_status;
- FILE_BASIC_INFORMATION file_info;
-
- VERIFY_FD(fd, req);
-
- handle = uv__get_osfhandle(fd);
-
- nt_status = pNtQueryInformationFile(handle,
- &io_status,
- &file_info,
- sizeof file_info,
- FileBasicInformation);
-
- if (!NT_SUCCESS(nt_status)) {
- SET_REQ_WIN32_ERROR(req, pRtlNtStatusToDosError(nt_status));
- return;
- }
-
- if (req->fs.info.mode & _S_IWRITE) {
- file_info.FileAttributes &= ~FILE_ATTRIBUTE_READONLY;
- } else {
- file_info.FileAttributes |= FILE_ATTRIBUTE_READONLY;
- }
-
- nt_status = pNtSetInformationFile(handle,
- &io_status,
- &file_info,
- sizeof file_info,
- FileBasicInformation);
-
- if (!NT_SUCCESS(nt_status)) {
- SET_REQ_WIN32_ERROR(req, pRtlNtStatusToDosError(nt_status));
- return;
- }
-
- SET_REQ_SUCCESS(req);
-}
-
-
-INLINE static int fs__utime_handle(HANDLE handle, double atime, double mtime) {
- FILETIME filetime_a, filetime_m;
-
- TIME_T_TO_FILETIME((time_t) atime, &filetime_a);
- TIME_T_TO_FILETIME((time_t) mtime, &filetime_m);
-
- if (!SetFileTime(handle, NULL, &filetime_a, &filetime_m)) {
- return -1;
- }
-
- return 0;
-}
-
-
-static void fs__utime(uv_fs_t* req) {
- HANDLE handle;
-
- handle = CreateFileW(req->file.pathw,
- FILE_WRITE_ATTRIBUTES,
- FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
- NULL,
- OPEN_EXISTING,
- FILE_FLAG_BACKUP_SEMANTICS,
- NULL);
-
- if (handle == INVALID_HANDLE_VALUE) {
- SET_REQ_WIN32_ERROR(req, GetLastError());
- return;
- }
-
- if (fs__utime_handle(handle, req->fs.time.atime, req->fs.time.mtime) != 0) {
- SET_REQ_WIN32_ERROR(req, GetLastError());
- CloseHandle(handle);
- return;
- }
-
- CloseHandle(handle);
-
- req->result = 0;
-}
-
-
-static void fs__futime(uv_fs_t* req) {
- int fd = req->file.fd;
- HANDLE handle;
- VERIFY_FD(fd, req);
-
- handle = uv__get_osfhandle(fd);
-
- if (handle == INVALID_HANDLE_VALUE) {
- SET_REQ_WIN32_ERROR(req, ERROR_INVALID_HANDLE);
- return;
- }
-
- if (fs__utime_handle(handle, req->fs.time.atime, req->fs.time.mtime) != 0) {
- SET_REQ_WIN32_ERROR(req, GetLastError());
- return;
- }
-
- req->result = 0;
-}
-
-
-static void fs__link(uv_fs_t* req) {
- DWORD r = CreateHardLinkW(req->fs.info.new_pathw, req->file.pathw, NULL);
- if (r == 0) {
- SET_REQ_WIN32_ERROR(req, GetLastError());
- } else {
- req->result = 0;
- }
-}
-
-
-static void fs__create_junction(uv_fs_t* req, const WCHAR* path,
- const WCHAR* new_path) {
- HANDLE handle = INVALID_HANDLE_VALUE;
- REPARSE_DATA_BUFFER *buffer = NULL;
- int created = 0;
- int target_len;
- int is_absolute, is_long_path;
- int needed_buf_size, used_buf_size, used_data_size, path_buf_len;
- int start, len, i;
- int add_slash;
- DWORD bytes;
- WCHAR* path_buf;
-
- target_len = wcslen(path);
- is_long_path = wcsncmp(path, LONG_PATH_PREFIX, LONG_PATH_PREFIX_LEN) == 0;
-
- if (is_long_path) {
- is_absolute = 1;
- } else {
- is_absolute = target_len >= 3 && IS_LETTER(path[0]) &&
- path[1] == L':' && IS_SLASH(path[2]);
- }
-
- if (!is_absolute) {
- /* Not supporting relative paths */
- SET_REQ_UV_ERROR(req, UV_EINVAL, ERROR_NOT_SUPPORTED);
- return;
- }
-
- /* Do a pessimistic calculation of the required buffer size */
- needed_buf_size =
- FIELD_OFFSET(REPARSE_DATA_BUFFER, MountPointReparseBuffer.PathBuffer) +
- JUNCTION_PREFIX_LEN * sizeof(WCHAR) +
- 2 * (target_len + 2) * sizeof(WCHAR);
-
- /* Allocate the buffer */
- buffer = (REPARSE_DATA_BUFFER*)uv__malloc(needed_buf_size);
- if (!buffer) {
- uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc");
- }
-
- /* Grab a pointer to the part of the buffer where filenames go */
- path_buf = (WCHAR*)&(buffer->MountPointReparseBuffer.PathBuffer);
- path_buf_len = 0;
-
- /* Copy the substitute (internal) target path */
- start = path_buf_len;
-
- wcsncpy((WCHAR*)&path_buf[path_buf_len], JUNCTION_PREFIX,
- JUNCTION_PREFIX_LEN);
- path_buf_len += JUNCTION_PREFIX_LEN;
-
- add_slash = 0;
- for (i = is_long_path ? LONG_PATH_PREFIX_LEN : 0; path[i] != L'\0'; i++) {
- if (IS_SLASH(path[i])) {
- add_slash = 1;
- continue;
- }
-
- if (add_slash) {
- path_buf[path_buf_len++] = L'\\';
- add_slash = 0;
- }
-
- path_buf[path_buf_len++] = path[i];
- }
- path_buf[path_buf_len++] = L'\\';
- len = path_buf_len - start;
-
- /* Set the info about the substitute name */
- buffer->MountPointReparseBuffer.SubstituteNameOffset = start * sizeof(WCHAR);
- buffer->MountPointReparseBuffer.SubstituteNameLength = len * sizeof(WCHAR);
-
- /* Insert null terminator */
- path_buf[path_buf_len++] = L'\0';
-
- /* Copy the print name of the target path */
- start = path_buf_len;
- add_slash = 0;
- for (i = is_long_path ? LONG_PATH_PREFIX_LEN : 0; path[i] != L'\0'; i++) {
- if (IS_SLASH(path[i])) {
- add_slash = 1;
- continue;
- }
-
- if (add_slash) {
- path_buf[path_buf_len++] = L'\\';
- add_slash = 0;
- }
-
- path_buf[path_buf_len++] = path[i];
- }
- len = path_buf_len - start;
- if (len == 2) {
- path_buf[path_buf_len++] = L'\\';
- len++;
- }
-
- /* Set the info about the print name */
- buffer->MountPointReparseBuffer.PrintNameOffset = start * sizeof(WCHAR);
- buffer->MountPointReparseBuffer.PrintNameLength = len * sizeof(WCHAR);
-
- /* Insert another null terminator */
- path_buf[path_buf_len++] = L'\0';
-
- /* Calculate how much buffer space was actually used */
- used_buf_size = FIELD_OFFSET(REPARSE_DATA_BUFFER, MountPointReparseBuffer.PathBuffer) +
- path_buf_len * sizeof(WCHAR);
- used_data_size = used_buf_size -
- FIELD_OFFSET(REPARSE_DATA_BUFFER, MountPointReparseBuffer);
-
- /* Put general info in the data buffer */
- buffer->ReparseTag = IO_REPARSE_TAG_MOUNT_POINT;
- buffer->ReparseDataLength = used_data_size;
- buffer->Reserved = 0;
-
- /* Create a new directory */
- if (!CreateDirectoryW(new_path, NULL)) {
- SET_REQ_WIN32_ERROR(req, GetLastError());
- goto error;
- }
- created = 1;
-
- /* Open the directory */
- handle = CreateFileW(new_path,
- GENERIC_WRITE,
- 0,
- NULL,
- OPEN_EXISTING,
- FILE_FLAG_BACKUP_SEMANTICS |
- FILE_FLAG_OPEN_REPARSE_POINT,
- NULL);
- if (handle == INVALID_HANDLE_VALUE) {
- SET_REQ_WIN32_ERROR(req, GetLastError());
- goto error;
- }
-
- /* Create the actual reparse point */
- if (!DeviceIoControl(handle,
- FSCTL_SET_REPARSE_POINT,
- buffer,
- used_buf_size,
- NULL,
- 0,
- &bytes,
- NULL)) {
- SET_REQ_WIN32_ERROR(req, GetLastError());
- goto error;
- }
-
- /* Clean up */
- CloseHandle(handle);
- uv__free(buffer);
-
- SET_REQ_RESULT(req, 0);
- return;
-
-error:
- uv__free(buffer);
-
- if (handle != INVALID_HANDLE_VALUE) {
- CloseHandle(handle);
- }
-
- if (created) {
- RemoveDirectoryW(new_path);
- }
-}
-
-
-static void fs__symlink(uv_fs_t* req) {
- WCHAR* pathw = req->file.pathw;
- WCHAR* new_pathw = req->fs.info.new_pathw;
- int flags = req->fs.info.file_flags;
- int result;
-
-
- if (flags & UV_FS_SYMLINK_JUNCTION) {
- fs__create_junction(req, pathw, new_pathw);
- } else if (pCreateSymbolicLinkW) {
- result = pCreateSymbolicLinkW(new_pathw,
- pathw,
- flags & UV_FS_SYMLINK_DIR ? SYMBOLIC_LINK_FLAG_DIRECTORY : 0) ? 0 : -1;
- if (result == -1) {
- SET_REQ_WIN32_ERROR(req, GetLastError());
- } else {
- SET_REQ_RESULT(req, result);
- }
- } else {
- SET_REQ_UV_ERROR(req, UV_ENOSYS, ERROR_NOT_SUPPORTED);
- }
-}
-
-
-static void fs__readlink(uv_fs_t* req) {
- HANDLE handle;
-
- handle = CreateFileW(req->file.pathw,
- 0,
- 0,
- NULL,
- OPEN_EXISTING,
- FILE_FLAG_OPEN_REPARSE_POINT | FILE_FLAG_BACKUP_SEMANTICS,
- NULL);
-
- if (handle == INVALID_HANDLE_VALUE) {
- SET_REQ_WIN32_ERROR(req, GetLastError());
- return;
- }
-
- if (fs__readlink_handle(handle, (char**) &req->ptr, NULL) != 0) {
- SET_REQ_WIN32_ERROR(req, GetLastError());
- CloseHandle(handle);
- return;
- }
-
- req->flags |= UV_FS_FREE_PTR;
- SET_REQ_RESULT(req, 0);
-
- CloseHandle(handle);
-}
-
-
-static size_t fs__realpath_handle(HANDLE handle, char** realpath_ptr) {
- int r;
- DWORD w_realpath_len;
- WCHAR* w_realpath_ptr;
- WCHAR* w_finalpath_ptr = NULL;
-
- w_realpath_len = pGetFinalPathNameByHandleW(handle, NULL, 0, VOLUME_NAME_DOS);
- if (w_realpath_len == 0) {
- return -1;
- }
-
- w_realpath_ptr = uv__malloc((w_realpath_len + 1) * sizeof(WCHAR));
- if (w_realpath_ptr == NULL) {
- SetLastError(ERROR_OUTOFMEMORY);
- return -1;
- }
-
- if (pGetFinalPathNameByHandleW(handle,
- w_realpath_ptr,
- w_realpath_len,
- VOLUME_NAME_DOS) == 0) {
- uv__free(w_realpath_ptr);
- SetLastError(ERROR_INVALID_HANDLE);
- return -1;
- }
-
- /* convert UNC path to long path */
- if (wcsncmp(w_realpath_ptr,
- UNC_PATH_PREFIX,
- UNC_PATH_PREFIX_LEN) == 0) {
- w_finalpath_ptr = w_realpath_ptr + 6;
- *w_finalpath_ptr = L'\\';
- } else if (wcsncmp(w_realpath_ptr,
- LONG_PATH_PREFIX,
- LONG_PATH_PREFIX_LEN) == 0) {
- w_finalpath_ptr = w_realpath_ptr + 4;
- } else {
- uv__free(w_realpath_ptr);
- SetLastError(ERROR_INVALID_HANDLE);
- return -1;
- }
-
- r = fs__wide_to_utf8(w_finalpath_ptr, w_realpath_len, realpath_ptr, NULL);
- uv__free(w_realpath_ptr);
- return r;
-}
-
-static void fs__realpath(uv_fs_t* req) {
- HANDLE handle;
-
- if (!pGetFinalPathNameByHandleW) {
- SET_REQ_UV_ERROR(req, UV_ENOSYS, ERROR_NOT_SUPPORTED);
- return;
- }
-
- handle = CreateFileW(req->file.pathw,
- 0,
- 0,
- NULL,
- OPEN_EXISTING,
- FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS,
- NULL);
- if (handle == INVALID_HANDLE_VALUE) {
- SET_REQ_WIN32_ERROR(req, GetLastError());
- return;
- }
-
- if (fs__realpath_handle(handle, (char**) &req->ptr) == -1) {
- CloseHandle(handle);
- SET_REQ_WIN32_ERROR(req, GetLastError());
- return;
- }
-
- CloseHandle(handle);
- req->flags |= UV_FS_FREE_PTR;
- SET_REQ_RESULT(req, 0);
-}
-
-
-static void fs__chown(uv_fs_t* req) {
- req->result = 0;
-}
-
-
-static void fs__fchown(uv_fs_t* req) {
- req->result = 0;
-}
-
-
-static void uv__fs_work(struct uv__work* w) {
- uv_fs_t* req;
-
- req = container_of(w, uv_fs_t, work_req);
- assert(req->type == UV_FS);
-
-#define XX(uc, lc) case UV_FS_##uc: fs__##lc(req); break;
- switch (req->fs_type) {
- XX(OPEN, open)
- XX(CLOSE, close)
- XX(READ, read)
- XX(WRITE, write)
- XX(SENDFILE, sendfile)
- XX(STAT, stat)
- XX(LSTAT, lstat)
- XX(FSTAT, fstat)
- XX(FTRUNCATE, ftruncate)
- XX(UTIME, utime)
- XX(FUTIME, futime)
- XX(ACCESS, access)
- XX(CHMOD, chmod)
- XX(FCHMOD, fchmod)
- XX(FSYNC, fsync)
- XX(FDATASYNC, fdatasync)
- XX(UNLINK, unlink)
- XX(RMDIR, rmdir)
- XX(MKDIR, mkdir)
- XX(MKDTEMP, mkdtemp)
- XX(RENAME, rename)
- XX(SCANDIR, scandir)
- XX(LINK, link)
- XX(SYMLINK, symlink)
- XX(READLINK, readlink)
- XX(REALPATH, realpath)
- XX(CHOWN, chown)
- XX(FCHOWN, fchown);
- default:
- assert(!"bad uv_fs_type");
- }
-}
-
-
-static void uv__fs_done(struct uv__work* w, int status) {
- uv_fs_t* req;
-
- req = container_of(w, uv_fs_t, work_req);
- uv__req_unregister(req->loop, req);
-
- if (status == UV_ECANCELED) {
- assert(req->result == 0);
- req->result = UV_ECANCELED;
- }
-
- req->cb(req);
-}
-
-
-void uv_fs_req_cleanup(uv_fs_t* req) {
- if (req->flags & UV_FS_CLEANEDUP)
- return;
-
- if (req->flags & UV_FS_FREE_PATHS)
- uv__free(req->file.pathw);
-
- if (req->flags & UV_FS_FREE_PTR)
- uv__free(req->ptr);
-
- req->path = NULL;
- req->file.pathw = NULL;
- req->fs.info.new_pathw = NULL;
- req->ptr = NULL;
-
- req->flags |= UV_FS_CLEANEDUP;
-}
-
-
-int uv_fs_open(uv_loop_t* loop, uv_fs_t* req, const char* path, int flags,
- int mode, uv_fs_cb cb) {
- int err;
-
- uv_fs_req_init(loop, req, UV_FS_OPEN, cb);
-
- err = fs__capture_path(req, path, NULL, cb != NULL);
- if (err) {
- return uv_translate_sys_error(err);
- }
-
- req->fs.info.file_flags = flags;
- req->fs.info.mode = mode;
-
- if (cb) {
- QUEUE_FS_TP_JOB(loop, req);
- return 0;
- } else {
- fs__open(req);
- return req->result;
- }
-}
-
-
-int uv_fs_close(uv_loop_t* loop, uv_fs_t* req, uv_file fd, uv_fs_cb cb) {
- uv_fs_req_init(loop, req, UV_FS_CLOSE, cb);
- req->file.fd = fd;
-
- if (cb) {
- QUEUE_FS_TP_JOB(loop, req);
- return 0;
- } else {
- fs__close(req);
- return req->result;
- }
-}
-
-
-int uv_fs_read(uv_loop_t* loop,
- uv_fs_t* req,
- uv_file fd,
- const uv_buf_t bufs[],
- unsigned int nbufs,
- int64_t offset,
- uv_fs_cb cb) {
- if (bufs == NULL || nbufs == 0)
- return UV_EINVAL;
-
- uv_fs_req_init(loop, req, UV_FS_READ, cb);
-
- req->file.fd = fd;
-
- req->fs.info.nbufs = nbufs;
- req->fs.info.bufs = req->fs.info.bufsml;
- if (nbufs > ARRAY_SIZE(req->fs.info.bufsml))
- req->fs.info.bufs = uv__malloc(nbufs * sizeof(*bufs));
-
- if (req->fs.info.bufs == NULL)
- return UV_ENOMEM;
-
- memcpy(req->fs.info.bufs, bufs, nbufs * sizeof(*bufs));
-
- req->fs.info.offset = offset;
-
- if (cb) {
- QUEUE_FS_TP_JOB(loop, req);
- return 0;
- } else {
- fs__read(req);
- return req->result;
- }
-}
-
-
-int uv_fs_write(uv_loop_t* loop,
- uv_fs_t* req,
- uv_file fd,
- const uv_buf_t bufs[],
- unsigned int nbufs,
- int64_t offset,
- uv_fs_cb cb) {
- if (bufs == NULL || nbufs == 0)
- return UV_EINVAL;
-
- uv_fs_req_init(loop, req, UV_FS_WRITE, cb);
-
- req->file.fd = fd;
-
- req->fs.info.nbufs = nbufs;
- req->fs.info.bufs = req->fs.info.bufsml;
- if (nbufs > ARRAY_SIZE(req->fs.info.bufsml))
- req->fs.info.bufs = uv__malloc(nbufs * sizeof(*bufs));
-
- if (req->fs.info.bufs == NULL)
- return UV_ENOMEM;
-
- memcpy(req->fs.info.bufs, bufs, nbufs * sizeof(*bufs));
-
- req->fs.info.offset = offset;
-
- if (cb) {
- QUEUE_FS_TP_JOB(loop, req);
- return 0;
- } else {
- fs__write(req);
- return req->result;
- }
-}
-
-
-int uv_fs_unlink(uv_loop_t* loop, uv_fs_t* req, const char* path,
- uv_fs_cb cb) {
- int err;
-
- uv_fs_req_init(loop, req, UV_FS_UNLINK, cb);
-
- err = fs__capture_path(req, path, NULL, cb != NULL);
- if (err) {
- return uv_translate_sys_error(err);
- }
-
- if (cb) {
- QUEUE_FS_TP_JOB(loop, req);
- return 0;
- } else {
- fs__unlink(req);
- return req->result;
- }
-}
-
-
-int uv_fs_mkdir(uv_loop_t* loop, uv_fs_t* req, const char* path, int mode,
- uv_fs_cb cb) {
- int err;
-
- uv_fs_req_init(loop, req, UV_FS_MKDIR, cb);
-
- err = fs__capture_path(req, path, NULL, cb != NULL);
- if (err) {
- return uv_translate_sys_error(err);
- }
-
- req->fs.info.mode = mode;
-
- if (cb) {
- QUEUE_FS_TP_JOB(loop, req);
- return 0;
- } else {
- fs__mkdir(req);
- return req->result;
- }
-}
-
-
-int uv_fs_mkdtemp(uv_loop_t* loop, uv_fs_t* req, const char* tpl,
- uv_fs_cb cb) {
- int err;
-
- uv_fs_req_init(loop, req, UV_FS_MKDTEMP, cb);
-
- err = fs__capture_path(req, tpl, NULL, TRUE);
- if (err)
- return uv_translate_sys_error(err);
-
- if (cb) {
- QUEUE_FS_TP_JOB(loop, req);
- return 0;
- } else {
- fs__mkdtemp(req);
- return req->result;
- }
-}
-
-
-int uv_fs_rmdir(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb) {
- int err;
-
- uv_fs_req_init(loop, req, UV_FS_RMDIR, cb);
-
- err = fs__capture_path(req, path, NULL, cb != NULL);
- if (err) {
- return uv_translate_sys_error(err);
- }
-
- if (cb) {
- QUEUE_FS_TP_JOB(loop, req);
- return 0;
- } else {
- fs__rmdir(req);
- return req->result;
- }
-}
-
-
-int uv_fs_scandir(uv_loop_t* loop, uv_fs_t* req, const char* path, int flags,
- uv_fs_cb cb) {
- int err;
-
- uv_fs_req_init(loop, req, UV_FS_SCANDIR, cb);
-
- err = fs__capture_path(req, path, NULL, cb != NULL);
- if (err) {
- return uv_translate_sys_error(err);
- }
-
- req->fs.info.file_flags = flags;
-
- if (cb) {
- QUEUE_FS_TP_JOB(loop, req);
- return 0;
- } else {
- fs__scandir(req);
- return req->result;
- }
-}
-
-
-int uv_fs_link(uv_loop_t* loop, uv_fs_t* req, const char* path,
- const char* new_path, uv_fs_cb cb) {
- int err;
-
- uv_fs_req_init(loop, req, UV_FS_LINK, cb);
-
- err = fs__capture_path(req, path, new_path, cb != NULL);
- if (err) {
- return uv_translate_sys_error(err);
- }
-
- if (cb) {
- QUEUE_FS_TP_JOB(loop, req);
- return 0;
- } else {
- fs__link(req);
- return req->result;
- }
-}
-
-
-int uv_fs_symlink(uv_loop_t* loop, uv_fs_t* req, const char* path,
- const char* new_path, int flags, uv_fs_cb cb) {
- int err;
-
- uv_fs_req_init(loop, req, UV_FS_SYMLINK, cb);
-
- err = fs__capture_path(req, path, new_path, cb != NULL);
- if (err) {
- return uv_translate_sys_error(err);
- }
-
- req->fs.info.file_flags = flags;
-
- if (cb) {
- QUEUE_FS_TP_JOB(loop, req);
- return 0;
- } else {
- fs__symlink(req);
- return req->result;
- }
-}
-
-
-int uv_fs_readlink(uv_loop_t* loop, uv_fs_t* req, const char* path,
- uv_fs_cb cb) {
- int err;
-
- uv_fs_req_init(loop, req, UV_FS_READLINK, cb);
-
- err = fs__capture_path(req, path, NULL, cb != NULL);
- if (err) {
- return uv_translate_sys_error(err);
- }
-
- if (cb) {
- QUEUE_FS_TP_JOB(loop, req);
- return 0;
- } else {
- fs__readlink(req);
- return req->result;
- }
-}
-
-
-int uv_fs_realpath(uv_loop_t* loop, uv_fs_t* req, const char* path,
- uv_fs_cb cb) {
- int err;
-
- if (!req || !path) {
- return UV_EINVAL;
- }
-
- uv_fs_req_init(loop, req, UV_FS_REALPATH, cb);
-
- err = fs__capture_path(req, path, NULL, cb != NULL);
- if (err) {
- return uv_translate_sys_error(err);
- }
-
- if (cb) {
- QUEUE_FS_TP_JOB(loop, req);
- return 0;
- } else {
- fs__realpath(req);
- return req->result;
- }
-}
-
-
-int uv_fs_chown(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_uid_t uid,
- uv_gid_t gid, uv_fs_cb cb) {
- int err;
-
- uv_fs_req_init(loop, req, UV_FS_CHOWN, cb);
-
- err = fs__capture_path(req, path, NULL, cb != NULL);
- if (err) {
- return uv_translate_sys_error(err);
- }
-
- if (cb) {
- QUEUE_FS_TP_JOB(loop, req);
- return 0;
- } else {
- fs__chown(req);
- return req->result;
- }
-}
-
-
-int uv_fs_fchown(uv_loop_t* loop, uv_fs_t* req, uv_file fd, uv_uid_t uid,
- uv_gid_t gid, uv_fs_cb cb) {
- uv_fs_req_init(loop, req, UV_FS_FCHOWN, cb);
-
- if (cb) {
- QUEUE_FS_TP_JOB(loop, req);
- return 0;
- } else {
- fs__fchown(req);
- return req->result;
- }
-}
-
-
-int uv_fs_stat(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb) {
- int err;
-
- uv_fs_req_init(loop, req, UV_FS_STAT, cb);
-
- err = fs__capture_path(req, path, NULL, cb != NULL);
- if (err) {
- return uv_translate_sys_error(err);
- }
-
- if (cb) {
- QUEUE_FS_TP_JOB(loop, req);
- return 0;
- } else {
- fs__stat(req);
- return req->result;
- }
-}
-
-
-int uv_fs_lstat(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb) {
- int err;
-
- uv_fs_req_init(loop, req, UV_FS_LSTAT, cb);
-
- err = fs__capture_path(req, path, NULL, cb != NULL);
- if (err) {
- return uv_translate_sys_error(err);
- }
-
- if (cb) {
- QUEUE_FS_TP_JOB(loop, req);
- return 0;
- } else {
- fs__lstat(req);
- return req->result;
- }
-}
-
-
-int uv_fs_fstat(uv_loop_t* loop, uv_fs_t* req, uv_file fd, uv_fs_cb cb) {
- uv_fs_req_init(loop, req, UV_FS_FSTAT, cb);
- req->file.fd = fd;
-
- if (cb) {
- QUEUE_FS_TP_JOB(loop, req);
- return 0;
- } else {
- fs__fstat(req);
- return req->result;
- }
-}
-
-
-int uv_fs_rename(uv_loop_t* loop, uv_fs_t* req, const char* path,
- const char* new_path, uv_fs_cb cb) {
- int err;
-
- uv_fs_req_init(loop, req, UV_FS_RENAME, cb);
-
- err = fs__capture_path(req, path, new_path, cb != NULL);
- if (err) {
- return uv_translate_sys_error(err);
- }
-
- if (cb) {
- QUEUE_FS_TP_JOB(loop, req);
- return 0;
- } else {
- fs__rename(req);
- return req->result;
- }
-}
-
-
-int uv_fs_fsync(uv_loop_t* loop, uv_fs_t* req, uv_file fd, uv_fs_cb cb) {
- uv_fs_req_init(loop, req, UV_FS_FSYNC, cb);
- req->file.fd = fd;
-
- if (cb) {
- QUEUE_FS_TP_JOB(loop, req);
- return 0;
- } else {
- fs__fsync(req);
- return req->result;
- }
-}
-
-
-int uv_fs_fdatasync(uv_loop_t* loop, uv_fs_t* req, uv_file fd, uv_fs_cb cb) {
- uv_fs_req_init(loop, req, UV_FS_FDATASYNC, cb);
- req->file.fd = fd;
-
- if (cb) {
- QUEUE_FS_TP_JOB(loop, req);
- return 0;
- } else {
- fs__fdatasync(req);
- return req->result;
- }
-}
-
-
-int uv_fs_ftruncate(uv_loop_t* loop, uv_fs_t* req, uv_file fd,
- int64_t offset, uv_fs_cb cb) {
- uv_fs_req_init(loop, req, UV_FS_FTRUNCATE, cb);
-
- req->file.fd = fd;
- req->fs.info.offset = offset;
-
- if (cb) {
- QUEUE_FS_TP_JOB(loop, req);
- return 0;
- } else {
- fs__ftruncate(req);
- return req->result;
- }
-}
-
-
-
-int uv_fs_sendfile(uv_loop_t* loop, uv_fs_t* req, uv_file fd_out,
- uv_file fd_in, int64_t in_offset, size_t length, uv_fs_cb cb) {
- uv_fs_req_init(loop, req, UV_FS_SENDFILE, cb);
-
- req->file.fd = fd_in;
- req->fs.info.fd_out = fd_out;
- req->fs.info.offset = in_offset;
- req->fs.info.bufsml[0].len = length;
-
- if (cb) {
- QUEUE_FS_TP_JOB(loop, req);
- return 0;
- } else {
- fs__sendfile(req);
- return req->result;
- }
-}
-
-
-int uv_fs_access(uv_loop_t* loop,
- uv_fs_t* req,
- const char* path,
- int flags,
- uv_fs_cb cb) {
- int err;
-
- uv_fs_req_init(loop, req, UV_FS_ACCESS, cb);
-
- err = fs__capture_path(req, path, NULL, cb != NULL);
- if (err)
- return uv_translate_sys_error(err);
-
- req->flags = flags;
-
- if (cb) {
- QUEUE_FS_TP_JOB(loop, req);
- return 0;
- }
-
- fs__access(req);
- return req->result;
-}
-
-
-int uv_fs_chmod(uv_loop_t* loop, uv_fs_t* req, const char* path, int mode,
- uv_fs_cb cb) {
- int err;
-
- uv_fs_req_init(loop, req, UV_FS_CHMOD, cb);
-
- err = fs__capture_path(req, path, NULL, cb != NULL);
- if (err) {
- return uv_translate_sys_error(err);
- }
-
- req->fs.info.mode = mode;
-
- if (cb) {
- QUEUE_FS_TP_JOB(loop, req);
- return 0;
- } else {
- fs__chmod(req);
- return req->result;
- }
-}
-
-
-int uv_fs_fchmod(uv_loop_t* loop, uv_fs_t* req, uv_file fd, int mode,
- uv_fs_cb cb) {
- uv_fs_req_init(loop, req, UV_FS_FCHMOD, cb);
-
- req->file.fd = fd;
- req->fs.info.mode = mode;
-
- if (cb) {
- QUEUE_FS_TP_JOB(loop, req);
- return 0;
- } else {
- fs__fchmod(req);
- return req->result;
- }
-}
-
-
-int uv_fs_utime(uv_loop_t* loop, uv_fs_t* req, const char* path, double atime,
- double mtime, uv_fs_cb cb) {
- int err;
-
- uv_fs_req_init(loop, req, UV_FS_UTIME, cb);
-
- err = fs__capture_path(req, path, NULL, cb != NULL);
- if (err) {
- return uv_translate_sys_error(err);
- }
-
- req->fs.time.atime = atime;
- req->fs.time.mtime = mtime;
-
- if (cb) {
- QUEUE_FS_TP_JOB(loop, req);
- return 0;
- } else {
- fs__utime(req);
- return req->result;
- }
-}
-
-
-int uv_fs_futime(uv_loop_t* loop, uv_fs_t* req, uv_file fd, double atime,
- double mtime, uv_fs_cb cb) {
- uv_fs_req_init(loop, req, UV_FS_FUTIME, cb);
-
- req->file.fd = fd;
- req->fs.time.atime = atime;
- req->fs.time.mtime = mtime;
-
- if (cb) {
- QUEUE_FS_TP_JOB(loop, req);
- return 0;
- } else {
- fs__futime(req);
- return req->result;
- }
-}
diff --git a/3rdparty/libuv/src/win/getaddrinfo.c b/3rdparty/libuv/src/win/getaddrinfo.c
deleted file mode 100644
index ceed3b7638b..00000000000
--- a/3rdparty/libuv/src/win/getaddrinfo.c
+++ /dev/null
@@ -1,358 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include <assert.h>
-
-#include "uv.h"
-#include "internal.h"
-#include "req-inl.h"
-
-/* EAI_* constants. */
-#include <winsock2.h>
-
-
-int uv__getaddrinfo_translate_error(int sys_err) {
- switch (sys_err) {
- case 0: return 0;
- case WSATRY_AGAIN: return UV_EAI_AGAIN;
- case WSAEINVAL: return UV_EAI_BADFLAGS;
- case WSANO_RECOVERY: return UV_EAI_FAIL;
- case WSAEAFNOSUPPORT: return UV_EAI_FAMILY;
- case WSA_NOT_ENOUGH_MEMORY: return UV_EAI_MEMORY;
- case WSAHOST_NOT_FOUND: return UV_EAI_NONAME;
- case WSATYPE_NOT_FOUND: return UV_EAI_SERVICE;
- case WSAESOCKTNOSUPPORT: return UV_EAI_SOCKTYPE;
- default: return uv_translate_sys_error(sys_err);
- }
-}
-
-
-/*
- * MinGW is missing this
- */
-#if !defined(_MSC_VER) && !defined(__MINGW64_VERSION_MAJOR)
- typedef struct addrinfoW {
- int ai_flags;
- int ai_family;
- int ai_socktype;
- int ai_protocol;
- size_t ai_addrlen;
- WCHAR* ai_canonname;
- struct sockaddr* ai_addr;
- struct addrinfoW* ai_next;
- } ADDRINFOW, *PADDRINFOW;
-
- DECLSPEC_IMPORT int WSAAPI GetAddrInfoW(const WCHAR* node,
- const WCHAR* service,
- const ADDRINFOW* hints,
- PADDRINFOW* result);
-
- DECLSPEC_IMPORT void WSAAPI FreeAddrInfoW(PADDRINFOW pAddrInfo);
-#endif
-
-
-/* adjust size value to be multiple of 4. Use to keep pointer aligned */
-/* Do we need different versions of this for different architectures? */
-#define ALIGNED_SIZE(X) ((((X) + 3) >> 2) << 2)
-
-
-static void uv__getaddrinfo_work(struct uv__work* w) {
- uv_getaddrinfo_t* req;
- struct addrinfoW* hints;
- int err;
-
- req = container_of(w, uv_getaddrinfo_t, work_req);
- hints = req->addrinfow;
- req->addrinfow = NULL;
- err = GetAddrInfoW(req->node, req->service, hints, &req->addrinfow);
- req->retcode = uv__getaddrinfo_translate_error(err);
-}
-
-
-/*
- * Called from uv_run when complete. Call user specified callback
- * then free returned addrinfo
- * Returned addrinfo strings are converted from UTF-16 to UTF-8.
- *
- * To minimize allocation we calculate total size required,
- * and copy all structs and referenced strings into the one block.
- * Each size calculation is adjusted to avoid unaligned pointers.
- */
-static void uv__getaddrinfo_done(struct uv__work* w, int status) {
- uv_getaddrinfo_t* req;
- int addrinfo_len = 0;
- int name_len = 0;
- size_t addrinfo_struct_len = ALIGNED_SIZE(sizeof(struct addrinfo));
- struct addrinfoW* addrinfow_ptr;
- struct addrinfo* addrinfo_ptr;
- char* alloc_ptr = NULL;
- char* cur_ptr = NULL;
-
- req = container_of(w, uv_getaddrinfo_t, work_req);
-
- /* release input parameter memory */
- uv__free(req->alloc);
- req->alloc = NULL;
-
- if (status == UV_ECANCELED) {
- assert(req->retcode == 0);
- req->retcode = UV_EAI_CANCELED;
- goto complete;
- }
-
- if (req->retcode == 0) {
- /* convert addrinfoW to addrinfo */
- /* first calculate required length */
- addrinfow_ptr = req->addrinfow;
- while (addrinfow_ptr != NULL) {
- addrinfo_len += addrinfo_struct_len +
- ALIGNED_SIZE(addrinfow_ptr->ai_addrlen);
- if (addrinfow_ptr->ai_canonname != NULL) {
- name_len = uv_utf16_to_utf8(addrinfow_ptr->ai_canonname, -1, NULL, 0);
- if (name_len == 0) {
- req->retcode = uv_translate_sys_error(GetLastError());
- goto complete;
- }
- addrinfo_len += ALIGNED_SIZE(name_len);
- }
- addrinfow_ptr = addrinfow_ptr->ai_next;
- }
-
- /* allocate memory for addrinfo results */
- alloc_ptr = (char*)uv__malloc(addrinfo_len);
-
- /* do conversions */
- if (alloc_ptr != NULL) {
- cur_ptr = alloc_ptr;
- addrinfow_ptr = req->addrinfow;
-
- while (addrinfow_ptr != NULL) {
- /* copy addrinfo struct data */
- assert(cur_ptr + addrinfo_struct_len <= alloc_ptr + addrinfo_len);
- addrinfo_ptr = (struct addrinfo*)cur_ptr;
- addrinfo_ptr->ai_family = addrinfow_ptr->ai_family;
- addrinfo_ptr->ai_socktype = addrinfow_ptr->ai_socktype;
- addrinfo_ptr->ai_protocol = addrinfow_ptr->ai_protocol;
- addrinfo_ptr->ai_flags = addrinfow_ptr->ai_flags;
- addrinfo_ptr->ai_addrlen = addrinfow_ptr->ai_addrlen;
- addrinfo_ptr->ai_canonname = NULL;
- addrinfo_ptr->ai_addr = NULL;
- addrinfo_ptr->ai_next = NULL;
-
- cur_ptr += addrinfo_struct_len;
-
- /* copy sockaddr */
- if (addrinfo_ptr->ai_addrlen > 0) {
- assert(cur_ptr + addrinfo_ptr->ai_addrlen <=
- alloc_ptr + addrinfo_len);
- memcpy(cur_ptr, addrinfow_ptr->ai_addr, addrinfo_ptr->ai_addrlen);
- addrinfo_ptr->ai_addr = (struct sockaddr*)cur_ptr;
- cur_ptr += ALIGNED_SIZE(addrinfo_ptr->ai_addrlen);
- }
-
- /* convert canonical name to UTF-8 */
- if (addrinfow_ptr->ai_canonname != NULL) {
- name_len = uv_utf16_to_utf8(addrinfow_ptr->ai_canonname,
- -1,
- NULL,
- 0);
- assert(name_len > 0);
- assert(cur_ptr + name_len <= alloc_ptr + addrinfo_len);
- name_len = uv_utf16_to_utf8(addrinfow_ptr->ai_canonname,
- -1,
- cur_ptr,
- name_len);
- assert(name_len > 0);
- addrinfo_ptr->ai_canonname = cur_ptr;
- cur_ptr += ALIGNED_SIZE(name_len);
- }
- assert(cur_ptr <= alloc_ptr + addrinfo_len);
-
- /* set next ptr */
- addrinfow_ptr = addrinfow_ptr->ai_next;
- if (addrinfow_ptr != NULL) {
- addrinfo_ptr->ai_next = (struct addrinfo*)cur_ptr;
- }
- }
- req->addrinfo = (struct addrinfo*)alloc_ptr;
- } else {
- req->retcode = UV_EAI_MEMORY;
- }
- }
-
- /* return memory to system */
- if (req->addrinfow != NULL) {
- FreeAddrInfoW(req->addrinfow);
- req->addrinfow = NULL;
- }
-
-complete:
- uv__req_unregister(req->loop, req);
-
- /* finally do callback with converted result */
- if (req->getaddrinfo_cb)
- req->getaddrinfo_cb(req, req->retcode, req->addrinfo);
-}
-
-
-void uv_freeaddrinfo(struct addrinfo* ai) {
- char* alloc_ptr = (char*)ai;
-
- /* release copied result memory */
- uv__free(alloc_ptr);
-}
-
-
-/*
- * Entry point for getaddrinfo
- * we convert the UTF-8 strings to UNICODE
- * and save the UNICODE string pointers in the req
- * We also copy hints so that caller does not need to keep memory until the
- * callback.
- * return 0 if a callback will be made
- * return error code if validation fails
- *
- * To minimize allocation we calculate total size required,
- * and copy all structs and referenced strings into the one block.
- * Each size calculation is adjusted to avoid unaligned pointers.
- */
-int uv_getaddrinfo(uv_loop_t* loop,
- uv_getaddrinfo_t* req,
- uv_getaddrinfo_cb getaddrinfo_cb,
- const char* node,
- const char* service,
- const struct addrinfo* hints) {
- int nodesize = 0;
- int servicesize = 0;
- int hintssize = 0;
- char* alloc_ptr = NULL;
- int err;
-
- if (req == NULL || (node == NULL && service == NULL)) {
- err = WSAEINVAL;
- goto error;
- }
-
- uv_req_init(loop, (uv_req_t*)req);
-
- req->getaddrinfo_cb = getaddrinfo_cb;
- req->addrinfo = NULL;
- req->type = UV_GETADDRINFO;
- req->loop = loop;
- req->retcode = 0;
-
- /* calculate required memory size for all input values */
- if (node != NULL) {
- nodesize = ALIGNED_SIZE(uv_utf8_to_utf16(node, NULL, 0) * sizeof(WCHAR));
- if (nodesize == 0) {
- err = GetLastError();
- goto error;
- }
- }
-
- if (service != NULL) {
- servicesize = ALIGNED_SIZE(uv_utf8_to_utf16(service, NULL, 0) *
- sizeof(WCHAR));
- if (servicesize == 0) {
- err = GetLastError();
- goto error;
- }
- }
- if (hints != NULL) {
- hintssize = ALIGNED_SIZE(sizeof(struct addrinfoW));
- }
-
- /* allocate memory for inputs, and partition it as needed */
- alloc_ptr = (char*)uv__malloc(nodesize + servicesize + hintssize);
- if (!alloc_ptr) {
- err = WSAENOBUFS;
- goto error;
- }
-
- /* save alloc_ptr now so we can free if error */
- req->alloc = (void*)alloc_ptr;
-
- /* convert node string to UTF16 into allocated memory and save pointer in */
- /* the request. */
- if (node != NULL) {
- req->node = (WCHAR*)alloc_ptr;
- if (uv_utf8_to_utf16(node,
- (WCHAR*) alloc_ptr,
- nodesize / sizeof(WCHAR)) == 0) {
- err = GetLastError();
- goto error;
- }
- alloc_ptr += nodesize;
- } else {
- req->node = NULL;
- }
-
- /* convert service string to UTF16 into allocated memory and save pointer */
- /* in the req. */
- if (service != NULL) {
- req->service = (WCHAR*)alloc_ptr;
- if (uv_utf8_to_utf16(service,
- (WCHAR*) alloc_ptr,
- servicesize / sizeof(WCHAR)) == 0) {
- err = GetLastError();
- goto error;
- }
- alloc_ptr += servicesize;
- } else {
- req->service = NULL;
- }
-
- /* copy hints to allocated memory and save pointer in req */
- if (hints != NULL) {
- req->addrinfow = (struct addrinfoW*)alloc_ptr;
- req->addrinfow->ai_family = hints->ai_family;
- req->addrinfow->ai_socktype = hints->ai_socktype;
- req->addrinfow->ai_protocol = hints->ai_protocol;
- req->addrinfow->ai_flags = hints->ai_flags;
- req->addrinfow->ai_addrlen = 0;
- req->addrinfow->ai_canonname = NULL;
- req->addrinfow->ai_addr = NULL;
- req->addrinfow->ai_next = NULL;
- } else {
- req->addrinfow = NULL;
- }
-
- uv__req_register(loop, req);
-
- if (getaddrinfo_cb) {
- uv__work_submit(loop,
- &req->work_req,
- uv__getaddrinfo_work,
- uv__getaddrinfo_done);
- return 0;
- } else {
- uv__getaddrinfo_work(&req->work_req);
- uv__getaddrinfo_done(&req->work_req, 0);
- return req->retcode;
- }
-
-error:
- if (req != NULL) {
- uv__free(req->alloc);
- req->alloc = NULL;
- }
- return uv_translate_sys_error(err);
-}
diff --git a/3rdparty/libuv/src/win/getnameinfo.c b/3rdparty/libuv/src/win/getnameinfo.c
deleted file mode 100644
index 66b64b88324..00000000000
--- a/3rdparty/libuv/src/win/getnameinfo.c
+++ /dev/null
@@ -1,150 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
-*
-* Permission is hereby granted, free of charge, to any person obtaining a copy
-* of this software and associated documentation files (the "Software"), to
-* deal in the Software without restriction, including without limitation the
-* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-* sell copies of the Software, and to permit persons to whom the Software is
-* furnished to do so, subject to the following conditions:
-*
-* The above copyright notice and this permission notice shall be included in
-* all copies or substantial portions of the Software.
-*
-* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-* IN THE SOFTWARE.
-*/
-
-#include <assert.h>
-#include <stdio.h>
-
-#include "uv.h"
-#include "internal.h"
-#include "req-inl.h"
-
-#ifndef GetNameInfo
-int WSAAPI GetNameInfoW(
- const SOCKADDR *pSockaddr,
- socklen_t SockaddrLength,
- PWCHAR pNodeBuffer,
- DWORD NodeBufferSize,
- PWCHAR pServiceBuffer,
- DWORD ServiceBufferSize,
- INT Flags
-);
-#endif
-
-static void uv__getnameinfo_work(struct uv__work* w) {
- uv_getnameinfo_t* req;
- WCHAR host[NI_MAXHOST];
- WCHAR service[NI_MAXSERV];
- int ret = 0;
-
- req = container_of(w, uv_getnameinfo_t, work_req);
- if (GetNameInfoW((struct sockaddr*)&req->storage,
- sizeof(req->storage),
- host,
- ARRAY_SIZE(host),
- service,
- ARRAY_SIZE(service),
- req->flags)) {
- ret = WSAGetLastError();
- }
- req->retcode = uv__getaddrinfo_translate_error(ret);
-
- /* convert results to UTF-8 */
- WideCharToMultiByte(CP_UTF8,
- 0,
- host,
- -1,
- req->host,
- sizeof(req->host),
- NULL,
- NULL);
-
- WideCharToMultiByte(CP_UTF8,
- 0,
- service,
- -1,
- req->service,
- sizeof(req->service),
- NULL,
- NULL);
-}
-
-
-/*
-* Called from uv_run when complete.
-*/
-static void uv__getnameinfo_done(struct uv__work* w, int status) {
- uv_getnameinfo_t* req;
- char* host;
- char* service;
-
- req = container_of(w, uv_getnameinfo_t, work_req);
- uv__req_unregister(req->loop, req);
- host = service = NULL;
-
- if (status == UV_ECANCELED) {
- assert(req->retcode == 0);
- req->retcode = UV_EAI_CANCELED;
- } else if (req->retcode == 0) {
- host = req->host;
- service = req->service;
- }
-
- if (req->getnameinfo_cb)
- req->getnameinfo_cb(req, req->retcode, host, service);
-}
-
-
-/*
-* Entry point for getnameinfo
-* return 0 if a callback will be made
-* return error code if validation fails
-*/
-int uv_getnameinfo(uv_loop_t* loop,
- uv_getnameinfo_t* req,
- uv_getnameinfo_cb getnameinfo_cb,
- const struct sockaddr* addr,
- int flags) {
- if (req == NULL || addr == NULL)
- return UV_EINVAL;
-
- if (addr->sa_family == AF_INET) {
- memcpy(&req->storage,
- addr,
- sizeof(struct sockaddr_in));
- } else if (addr->sa_family == AF_INET6) {
- memcpy(&req->storage,
- addr,
- sizeof(struct sockaddr_in6));
- } else {
- return UV_EINVAL;
- }
-
- uv_req_init(loop, (uv_req_t*)req);
- uv__req_register(loop, req);
-
- req->getnameinfo_cb = getnameinfo_cb;
- req->flags = flags;
- req->type = UV_GETNAMEINFO;
- req->loop = loop;
- req->retcode = 0;
-
- if (getnameinfo_cb) {
- uv__work_submit(loop,
- &req->work_req,
- uv__getnameinfo_work,
- uv__getnameinfo_done);
- return 0;
- } else {
- uv__getnameinfo_work(&req->work_req);
- uv__getnameinfo_done(&req->work_req, 0);
- return req->retcode;
- }
-}
diff --git a/3rdparty/libuv/src/win/handle-inl.h b/3rdparty/libuv/src/win/handle-inl.h
deleted file mode 100644
index 8d0334cc52a..00000000000
--- a/3rdparty/libuv/src/win/handle-inl.h
+++ /dev/null
@@ -1,179 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#ifndef UV_WIN_HANDLE_INL_H_
-#define UV_WIN_HANDLE_INL_H_
-
-#include <assert.h>
-#include <io.h>
-
-#include "uv.h"
-#include "internal.h"
-
-
-#define DECREASE_ACTIVE_COUNT(loop, handle) \
- do { \
- if (--(handle)->activecnt == 0 && \
- !((handle)->flags & UV__HANDLE_CLOSING)) { \
- uv__handle_stop((handle)); \
- } \
- assert((handle)->activecnt >= 0); \
- } while (0)
-
-
-#define INCREASE_ACTIVE_COUNT(loop, handle) \
- do { \
- if ((handle)->activecnt++ == 0) { \
- uv__handle_start((handle)); \
- } \
- assert((handle)->activecnt > 0); \
- } while (0)
-
-
-#define DECREASE_PENDING_REQ_COUNT(handle) \
- do { \
- assert(handle->reqs_pending > 0); \
- handle->reqs_pending--; \
- \
- if (handle->flags & UV__HANDLE_CLOSING && \
- handle->reqs_pending == 0) { \
- uv_want_endgame(loop, (uv_handle_t*)handle); \
- } \
- } while (0)
-
-
-#define uv__handle_closing(handle) \
- do { \
- assert(!((handle)->flags & UV__HANDLE_CLOSING)); \
- \
- if (!(((handle)->flags & UV__HANDLE_ACTIVE) && \
- ((handle)->flags & UV__HANDLE_REF))) \
- uv__active_handle_add((uv_handle_t*) (handle)); \
- \
- (handle)->flags |= UV__HANDLE_CLOSING; \
- (handle)->flags &= ~UV__HANDLE_ACTIVE; \
- } while (0)
-
-
-#define uv__handle_close(handle) \
- do { \
- QUEUE_REMOVE(&(handle)->handle_queue); \
- uv__active_handle_rm((uv_handle_t*) (handle)); \
- \
- (handle)->flags |= UV_HANDLE_CLOSED; \
- \
- if ((handle)->close_cb) \
- (handle)->close_cb((uv_handle_t*) (handle)); \
- } while (0)
-
-
-INLINE static void uv_want_endgame(uv_loop_t* loop, uv_handle_t* handle) {
- if (!(handle->flags & UV_HANDLE_ENDGAME_QUEUED)) {
- handle->flags |= UV_HANDLE_ENDGAME_QUEUED;
-
- handle->endgame_next = loop->endgame_handles;
- loop->endgame_handles = handle;
- }
-}
-
-
-INLINE static void uv_process_endgames(uv_loop_t* loop) {
- uv_handle_t* handle;
-
- while (loop->endgame_handles) {
- handle = loop->endgame_handles;
- loop->endgame_handles = handle->endgame_next;
-
- handle->flags &= ~UV_HANDLE_ENDGAME_QUEUED;
-
- switch (handle->type) {
- case UV_TCP:
- uv_tcp_endgame(loop, (uv_tcp_t*) handle);
- break;
-
- case UV_NAMED_PIPE:
- uv_pipe_endgame(loop, (uv_pipe_t*) handle);
- break;
-
- case UV_TTY:
- uv_tty_endgame(loop, (uv_tty_t*) handle);
- break;
-
- case UV_UDP:
- uv_udp_endgame(loop, (uv_udp_t*) handle);
- break;
-
- case UV_POLL:
- uv_poll_endgame(loop, (uv_poll_t*) handle);
- break;
-
- case UV_TIMER:
- uv_timer_endgame(loop, (uv_timer_t*) handle);
- break;
-
- case UV_PREPARE:
- case UV_CHECK:
- case UV_IDLE:
- uv_loop_watcher_endgame(loop, handle);
- break;
-
- case UV_ASYNC:
- uv_async_endgame(loop, (uv_async_t*) handle);
- break;
-
- case UV_SIGNAL:
- uv_signal_endgame(loop, (uv_signal_t*) handle);
- break;
-
- case UV_PROCESS:
- uv_process_endgame(loop, (uv_process_t*) handle);
- break;
-
- case UV_FS_EVENT:
- uv_fs_event_endgame(loop, (uv_fs_event_t*) handle);
- break;
-
- case UV_FS_POLL:
- uv__fs_poll_endgame(loop, (uv_fs_poll_t*) handle);
- break;
-
- default:
- assert(0);
- break;
- }
- }
-}
-
-INLINE static HANDLE uv__get_osfhandle(int fd)
-{
- /* _get_osfhandle() raises an assert in debug builds if the FD is invalid. */
- /* But it also correctly checks the FD and returns INVALID_HANDLE_VALUE */
- /* for invalid FDs in release builds (or if you let the assert continue). */
- /* So this wrapper function disables asserts when calling _get_osfhandle. */
-
- HANDLE handle;
- UV_BEGIN_DISABLE_CRT_ASSERT();
- handle = (HANDLE) _get_osfhandle(fd);
- UV_END_DISABLE_CRT_ASSERT();
- return handle;
-}
-
-#endif /* UV_WIN_HANDLE_INL_H_ */
diff --git a/3rdparty/libuv/src/win/handle.c b/3rdparty/libuv/src/win/handle.c
deleted file mode 100644
index 72b49d97904..00000000000
--- a/3rdparty/libuv/src/win/handle.c
+++ /dev/null
@@ -1,154 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include <assert.h>
-#include <io.h>
-#include <stdlib.h>
-
-#include "uv.h"
-#include "internal.h"
-#include "handle-inl.h"
-
-
-uv_handle_type uv_guess_handle(uv_file file) {
- HANDLE handle;
- DWORD mode;
-
- if (file < 0) {
- return UV_UNKNOWN_HANDLE;
- }
-
- handle = uv__get_osfhandle(file);
-
- switch (GetFileType(handle)) {
- case FILE_TYPE_CHAR:
- if (GetConsoleMode(handle, &mode)) {
- return UV_TTY;
- } else {
- return UV_FILE;
- }
-
- case FILE_TYPE_PIPE:
- return UV_NAMED_PIPE;
-
- case FILE_TYPE_DISK:
- return UV_FILE;
-
- default:
- return UV_UNKNOWN_HANDLE;
- }
-}
-
-
-int uv_is_active(const uv_handle_t* handle) {
- return (handle->flags & UV__HANDLE_ACTIVE) &&
- !(handle->flags & UV__HANDLE_CLOSING);
-}
-
-
-void uv_close(uv_handle_t* handle, uv_close_cb cb) {
- uv_loop_t* loop = handle->loop;
-
- if (handle->flags & UV__HANDLE_CLOSING) {
- assert(0);
- return;
- }
-
- handle->close_cb = cb;
-
- /* Handle-specific close actions */
- switch (handle->type) {
- case UV_TCP:
- uv_tcp_close(loop, (uv_tcp_t*)handle);
- return;
-
- case UV_NAMED_PIPE:
- uv_pipe_close(loop, (uv_pipe_t*) handle);
- return;
-
- case UV_TTY:
- uv_tty_close((uv_tty_t*) handle);
- return;
-
- case UV_UDP:
- uv_udp_close(loop, (uv_udp_t*) handle);
- return;
-
- case UV_POLL:
- uv_poll_close(loop, (uv_poll_t*) handle);
- return;
-
- case UV_TIMER:
- uv_timer_stop((uv_timer_t*)handle);
- uv__handle_closing(handle);
- uv_want_endgame(loop, handle);
- return;
-
- case UV_PREPARE:
- uv_prepare_stop((uv_prepare_t*)handle);
- uv__handle_closing(handle);
- uv_want_endgame(loop, handle);
- return;
-
- case UV_CHECK:
- uv_check_stop((uv_check_t*)handle);
- uv__handle_closing(handle);
- uv_want_endgame(loop, handle);
- return;
-
- case UV_IDLE:
- uv_idle_stop((uv_idle_t*)handle);
- uv__handle_closing(handle);
- uv_want_endgame(loop, handle);
- return;
-
- case UV_ASYNC:
- uv_async_close(loop, (uv_async_t*) handle);
- return;
-
- case UV_SIGNAL:
- uv_signal_close(loop, (uv_signal_t*) handle);
- return;
-
- case UV_PROCESS:
- uv_process_close(loop, (uv_process_t*) handle);
- return;
-
- case UV_FS_EVENT:
- uv_fs_event_close(loop, (uv_fs_event_t*) handle);
- return;
-
- case UV_FS_POLL:
- uv__fs_poll_close((uv_fs_poll_t*) handle);
- uv__handle_closing(handle);
- uv_want_endgame(loop, handle);
- return;
-
- default:
- /* Not supported */
- abort();
- }
-}
-
-
-int uv_is_closing(const uv_handle_t* handle) {
- return !!(handle->flags & (UV__HANDLE_CLOSING | UV_HANDLE_CLOSED));
-}
diff --git a/3rdparty/libuv/src/win/internal.h b/3rdparty/libuv/src/win/internal.h
deleted file mode 100644
index 783f21af0fe..00000000000
--- a/3rdparty/libuv/src/win/internal.h
+++ /dev/null
@@ -1,382 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#ifndef UV_WIN_INTERNAL_H_
-#define UV_WIN_INTERNAL_H_
-
-#include "uv.h"
-#include "../uv-common.h"
-
-#include "tree.h"
-#include "winapi.h"
-#include "winsock.h"
-
-#ifdef _MSC_VER
-# define INLINE __inline
-# define UV_THREAD_LOCAL __declspec( thread )
-#else
-# define INLINE inline
-# define UV_THREAD_LOCAL __thread
-#endif
-
-
-#ifdef _DEBUG
-
-extern UV_THREAD_LOCAL int uv__crt_assert_enabled;
-
-#define UV_BEGIN_DISABLE_CRT_ASSERT() \
- { \
- int uv__saved_crt_assert_enabled = uv__crt_assert_enabled; \
- uv__crt_assert_enabled = FALSE;
-
-
-#define UV_END_DISABLE_CRT_ASSERT() \
- uv__crt_assert_enabled = uv__saved_crt_assert_enabled; \
- }
-
-#else
-#define UV_BEGIN_DISABLE_CRT_ASSERT()
-#define UV_END_DISABLE_CRT_ASSERT()
-#endif
-
-/*
- * Handles
- * (also see handle-inl.h)
- */
-
-/* Used by all handles. */
-#define UV_HANDLE_CLOSED 0x00000002
-#define UV_HANDLE_ENDGAME_QUEUED 0x00000008
-
-/* uv-common.h: #define UV__HANDLE_CLOSING 0x00000001 */
-/* uv-common.h: #define UV__HANDLE_ACTIVE 0x00000040 */
-/* uv-common.h: #define UV__HANDLE_REF 0x00000020 */
-/* uv-common.h: #define UV_HANDLE_INTERNAL 0x00000080 */
-
-/* Used by streams and UDP handles. */
-#define UV_HANDLE_READING 0x00000100
-#define UV_HANDLE_BOUND 0x00000200
-#define UV_HANDLE_LISTENING 0x00000800
-#define UV_HANDLE_CONNECTION 0x00001000
-#define UV_HANDLE_READABLE 0x00008000
-#define UV_HANDLE_WRITABLE 0x00010000
-#define UV_HANDLE_READ_PENDING 0x00020000
-#define UV_HANDLE_SYNC_BYPASS_IOCP 0x00040000
-#define UV_HANDLE_ZERO_READ 0x00080000
-#define UV_HANDLE_EMULATE_IOCP 0x00100000
-#define UV_HANDLE_BLOCKING_WRITES 0x00200000
-
-/* Used by uv_tcp_t and uv_udp_t handles */
-#define UV_HANDLE_IPV6 0x01000000
-
-/* Only used by uv_tcp_t handles. */
-#define UV_HANDLE_TCP_NODELAY 0x02000000
-#define UV_HANDLE_TCP_KEEPALIVE 0x04000000
-#define UV_HANDLE_TCP_SINGLE_ACCEPT 0x08000000
-#define UV_HANDLE_TCP_ACCEPT_STATE_CHANGING 0x10000000
-#define UV_HANDLE_TCP_SOCKET_CLOSED 0x20000000
-#define UV_HANDLE_SHARED_TCP_SOCKET 0x40000000
-
-/* Only used by uv_pipe_t handles. */
-#define UV_HANDLE_NON_OVERLAPPED_PIPE 0x01000000
-#define UV_HANDLE_PIPESERVER 0x02000000
-#define UV_HANDLE_PIPE_READ_CANCELABLE 0x04000000
-
-/* Only used by uv_tty_t handles. */
-#define UV_HANDLE_TTY_READABLE 0x01000000
-#define UV_HANDLE_TTY_RAW 0x02000000
-#define UV_HANDLE_TTY_SAVED_POSITION 0x04000000
-#define UV_HANDLE_TTY_SAVED_ATTRIBUTES 0x08000000
-
-/* Only used by uv_poll_t handles. */
-#define UV_HANDLE_POLL_SLOW 0x02000000
-
-
-/*
- * Requests: see req-inl.h
- */
-
-
-/*
- * Streams: see stream-inl.h
- */
-
-
-/*
- * TCP
- */
-
-typedef struct {
- WSAPROTOCOL_INFOW socket_info;
- int delayed_error;
-} uv__ipc_socket_info_ex;
-
-int uv_tcp_listen(uv_tcp_t* handle, int backlog, uv_connection_cb cb);
-int uv_tcp_accept(uv_tcp_t* server, uv_tcp_t* client);
-int uv_tcp_read_start(uv_tcp_t* handle, uv_alloc_cb alloc_cb,
- uv_read_cb read_cb);
-int uv_tcp_write(uv_loop_t* loop, uv_write_t* req, uv_tcp_t* handle,
- const uv_buf_t bufs[], unsigned int nbufs, uv_write_cb cb);
-int uv__tcp_try_write(uv_tcp_t* handle, const uv_buf_t bufs[],
- unsigned int nbufs);
-
-void uv_process_tcp_read_req(uv_loop_t* loop, uv_tcp_t* handle, uv_req_t* req);
-void uv_process_tcp_write_req(uv_loop_t* loop, uv_tcp_t* handle,
- uv_write_t* req);
-void uv_process_tcp_accept_req(uv_loop_t* loop, uv_tcp_t* handle,
- uv_req_t* req);
-void uv_process_tcp_connect_req(uv_loop_t* loop, uv_tcp_t* handle,
- uv_connect_t* req);
-
-void uv_tcp_close(uv_loop_t* loop, uv_tcp_t* tcp);
-void uv_tcp_endgame(uv_loop_t* loop, uv_tcp_t* handle);
-
-int uv_tcp_import(uv_tcp_t* tcp, uv__ipc_socket_info_ex* socket_info_ex,
- int tcp_connection);
-
-int uv_tcp_duplicate_socket(uv_tcp_t* handle, int pid,
- LPWSAPROTOCOL_INFOW protocol_info);
-
-
-/*
- * UDP
- */
-void uv_process_udp_recv_req(uv_loop_t* loop, uv_udp_t* handle, uv_req_t* req);
-void uv_process_udp_send_req(uv_loop_t* loop, uv_udp_t* handle,
- uv_udp_send_t* req);
-
-void uv_udp_close(uv_loop_t* loop, uv_udp_t* handle);
-void uv_udp_endgame(uv_loop_t* loop, uv_udp_t* handle);
-
-
-/*
- * Pipes
- */
-int uv_stdio_pipe_server(uv_loop_t* loop, uv_pipe_t* handle, DWORD access,
- char* name, size_t nameSize);
-
-int uv_pipe_listen(uv_pipe_t* handle, int backlog, uv_connection_cb cb);
-int uv_pipe_accept(uv_pipe_t* server, uv_stream_t* client);
-int uv_pipe_read_start(uv_pipe_t* handle, uv_alloc_cb alloc_cb,
- uv_read_cb read_cb);
-int uv_pipe_write(uv_loop_t* loop, uv_write_t* req, uv_pipe_t* handle,
- const uv_buf_t bufs[], unsigned int nbufs, uv_write_cb cb);
-int uv_pipe_write2(uv_loop_t* loop, uv_write_t* req, uv_pipe_t* handle,
- const uv_buf_t bufs[], unsigned int nbufs, uv_stream_t* send_handle,
- uv_write_cb cb);
-void uv__pipe_pause_read(uv_pipe_t* handle);
-void uv__pipe_unpause_read(uv_pipe_t* handle);
-void uv__pipe_stop_read(uv_pipe_t* handle);
-
-void uv_process_pipe_read_req(uv_loop_t* loop, uv_pipe_t* handle,
- uv_req_t* req);
-void uv_process_pipe_write_req(uv_loop_t* loop, uv_pipe_t* handle,
- uv_write_t* req);
-void uv_process_pipe_accept_req(uv_loop_t* loop, uv_pipe_t* handle,
- uv_req_t* raw_req);
-void uv_process_pipe_connect_req(uv_loop_t* loop, uv_pipe_t* handle,
- uv_connect_t* req);
-void uv_process_pipe_shutdown_req(uv_loop_t* loop, uv_pipe_t* handle,
- uv_shutdown_t* req);
-
-void uv_pipe_close(uv_loop_t* loop, uv_pipe_t* handle);
-void uv_pipe_cleanup(uv_loop_t* loop, uv_pipe_t* handle);
-void uv_pipe_endgame(uv_loop_t* loop, uv_pipe_t* handle);
-
-
-/*
- * TTY
- */
-void uv_console_init();
-
-int uv_tty_read_start(uv_tty_t* handle, uv_alloc_cb alloc_cb,
- uv_read_cb read_cb);
-int uv_tty_read_stop(uv_tty_t* handle);
-int uv_tty_write(uv_loop_t* loop, uv_write_t* req, uv_tty_t* handle,
- const uv_buf_t bufs[], unsigned int nbufs, uv_write_cb cb);
-int uv__tty_try_write(uv_tty_t* handle, const uv_buf_t bufs[],
- unsigned int nbufs);
-void uv_tty_close(uv_tty_t* handle);
-
-void uv_process_tty_read_req(uv_loop_t* loop, uv_tty_t* handle,
- uv_req_t* req);
-void uv_process_tty_write_req(uv_loop_t* loop, uv_tty_t* handle,
- uv_write_t* req);
-/* TODO: remove me */
-void uv_process_tty_accept_req(uv_loop_t* loop, uv_tty_t* handle,
- uv_req_t* raw_req);
-/* TODO: remove me */
-void uv_process_tty_connect_req(uv_loop_t* loop, uv_tty_t* handle,
- uv_connect_t* req);
-
-void uv_tty_endgame(uv_loop_t* loop, uv_tty_t* handle);
-
-
-/*
- * Poll watchers
- */
-void uv_process_poll_req(uv_loop_t* loop, uv_poll_t* handle,
- uv_req_t* req);
-
-int uv_poll_close(uv_loop_t* loop, uv_poll_t* handle);
-void uv_poll_endgame(uv_loop_t* loop, uv_poll_t* handle);
-
-
-/*
- * Timers
- */
-void uv_timer_endgame(uv_loop_t* loop, uv_timer_t* handle);
-
-DWORD uv__next_timeout(const uv_loop_t* loop);
-void uv__time_forward(uv_loop_t* loop, uint64_t msecs);
-void uv_process_timers(uv_loop_t* loop);
-
-
-/*
- * Loop watchers
- */
-void uv_loop_watcher_endgame(uv_loop_t* loop, uv_handle_t* handle);
-
-void uv_prepare_invoke(uv_loop_t* loop);
-void uv_check_invoke(uv_loop_t* loop);
-void uv_idle_invoke(uv_loop_t* loop);
-
-void uv__once_init();
-
-
-/*
- * Async watcher
- */
-void uv_async_close(uv_loop_t* loop, uv_async_t* handle);
-void uv_async_endgame(uv_loop_t* loop, uv_async_t* handle);
-
-void uv_process_async_wakeup_req(uv_loop_t* loop, uv_async_t* handle,
- uv_req_t* req);
-
-
-/*
- * Signal watcher
- */
-void uv_signals_init();
-int uv__signal_dispatch(int signum);
-
-void uv_signal_close(uv_loop_t* loop, uv_signal_t* handle);
-void uv_signal_endgame(uv_loop_t* loop, uv_signal_t* handle);
-
-void uv_process_signal_req(uv_loop_t* loop, uv_signal_t* handle,
- uv_req_t* req);
-
-
-/*
- * Spawn
- */
-void uv_process_proc_exit(uv_loop_t* loop, uv_process_t* handle);
-void uv_process_close(uv_loop_t* loop, uv_process_t* handle);
-void uv_process_endgame(uv_loop_t* loop, uv_process_t* handle);
-
-
-/*
- * Error
- */
-int uv_translate_sys_error(int sys_errno);
-
-
-/*
- * FS
- */
-void uv_fs_init();
-
-
-/*
- * FS Event
- */
-void uv_process_fs_event_req(uv_loop_t* loop, uv_req_t* req,
- uv_fs_event_t* handle);
-void uv_fs_event_close(uv_loop_t* loop, uv_fs_event_t* handle);
-void uv_fs_event_endgame(uv_loop_t* loop, uv_fs_event_t* handle);
-
-
-/*
- * Stat poller.
- */
-void uv__fs_poll_endgame(uv_loop_t* loop, uv_fs_poll_t* handle);
-
-
-/*
- * Utilities.
- */
-void uv__util_init();
-
-uint64_t uv__hrtime(double scale);
-int uv_parent_pid();
-int uv_current_pid();
-__declspec(noreturn) void uv_fatal_error(const int errorno, const char* syscall);
-
-
-/*
- * Process stdio handles.
- */
-int uv__stdio_create(uv_loop_t* loop,
- const uv_process_options_t* options,
- BYTE** buffer_ptr);
-void uv__stdio_destroy(BYTE* buffer);
-void uv__stdio_noinherit(BYTE* buffer);
-int uv__stdio_verify(BYTE* buffer, WORD size);
-WORD uv__stdio_size(BYTE* buffer);
-HANDLE uv__stdio_handle(BYTE* buffer, int fd);
-
-
-/*
- * Winapi and ntapi utility functions
- */
-void uv_winapi_init();
-
-
-/*
- * Winsock utility functions
- */
-void uv_winsock_init();
-
-int uv_ntstatus_to_winsock_error(NTSTATUS status);
-
-BOOL uv_get_acceptex_function(SOCKET socket, LPFN_ACCEPTEX* target);
-BOOL uv_get_connectex_function(SOCKET socket, LPFN_CONNECTEX* target);
-
-int WSAAPI uv_wsarecv_workaround(SOCKET socket, WSABUF* buffers,
- DWORD buffer_count, DWORD* bytes, DWORD* flags, WSAOVERLAPPED *overlapped,
- LPWSAOVERLAPPED_COMPLETION_ROUTINE completion_routine);
-int WSAAPI uv_wsarecvfrom_workaround(SOCKET socket, WSABUF* buffers,
- DWORD buffer_count, DWORD* bytes, DWORD* flags, struct sockaddr* addr,
- int* addr_len, WSAOVERLAPPED *overlapped,
- LPWSAOVERLAPPED_COMPLETION_ROUTINE completion_routine);
-
-int WSAAPI uv_msafd_poll(SOCKET socket, AFD_POLL_INFO* info_in,
- AFD_POLL_INFO* info_out, OVERLAPPED* overlapped);
-
-/* Whether there are any non-IFS LSPs stacked on TCP */
-extern int uv_tcp_non_ifs_lsp_ipv4;
-extern int uv_tcp_non_ifs_lsp_ipv6;
-
-/* Ip address used to bind to any port at any interface */
-extern struct sockaddr_in uv_addr_ip4_any_;
-extern struct sockaddr_in6 uv_addr_ip6_any_;
-
-#endif /* UV_WIN_INTERNAL_H_ */
diff --git a/3rdparty/libuv/src/win/loop-watcher.c b/3rdparty/libuv/src/win/loop-watcher.c
deleted file mode 100644
index 20e4509f838..00000000000
--- a/3rdparty/libuv/src/win/loop-watcher.c
+++ /dev/null
@@ -1,122 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include <assert.h>
-
-#include "uv.h"
-#include "internal.h"
-#include "handle-inl.h"
-
-
-void uv_loop_watcher_endgame(uv_loop_t* loop, uv_handle_t* handle) {
- if (handle->flags & UV__HANDLE_CLOSING) {
- assert(!(handle->flags & UV_HANDLE_CLOSED));
- handle->flags |= UV_HANDLE_CLOSED;
- uv__handle_close(handle);
- }
-}
-
-
-#define UV_LOOP_WATCHER_DEFINE(name, NAME) \
- int uv_##name##_init(uv_loop_t* loop, uv_##name##_t* handle) { \
- uv__handle_init(loop, (uv_handle_t*) handle, UV_##NAME); \
- \
- return 0; \
- } \
- \
- \
- int uv_##name##_start(uv_##name##_t* handle, uv_##name##_cb cb) { \
- uv_loop_t* loop = handle->loop; \
- uv_##name##_t* old_head; \
- \
- assert(handle->type == UV_##NAME); \
- \
- if (uv__is_active(handle)) \
- return 0; \
- \
- if (cb == NULL) \
- return UV_EINVAL; \
- \
- old_head = loop->name##_handles; \
- \
- handle->name##_next = old_head; \
- handle->name##_prev = NULL; \
- \
- if (old_head) { \
- old_head->name##_prev = handle; \
- } \
- \
- loop->name##_handles = handle; \
- \
- handle->name##_cb = cb; \
- uv__handle_start(handle); \
- \
- return 0; \
- } \
- \
- \
- int uv_##name##_stop(uv_##name##_t* handle) { \
- uv_loop_t* loop = handle->loop; \
- \
- assert(handle->type == UV_##NAME); \
- \
- if (!uv__is_active(handle)) \
- return 0; \
- \
- /* Update loop head if needed */ \
- if (loop->name##_handles == handle) { \
- loop->name##_handles = handle->name##_next; \
- } \
- \
- /* Update the iterator-next pointer of needed */ \
- if (loop->next_##name##_handle == handle) { \
- loop->next_##name##_handle = handle->name##_next; \
- } \
- \
- if (handle->name##_prev) { \
- handle->name##_prev->name##_next = handle->name##_next; \
- } \
- if (handle->name##_next) { \
- handle->name##_next->name##_prev = handle->name##_prev; \
- } \
- \
- uv__handle_stop(handle); \
- \
- return 0; \
- } \
- \
- \
- void uv_##name##_invoke(uv_loop_t* loop) { \
- uv_##name##_t* handle; \
- \
- (loop)->next_##name##_handle = (loop)->name##_handles; \
- \
- while ((loop)->next_##name##_handle != NULL) { \
- handle = (loop)->next_##name##_handle; \
- (loop)->next_##name##_handle = handle->name##_next; \
- \
- handle->name##_cb(handle); \
- } \
- }
-
-UV_LOOP_WATCHER_DEFINE(prepare, PREPARE)
-UV_LOOP_WATCHER_DEFINE(check, CHECK)
-UV_LOOP_WATCHER_DEFINE(idle, IDLE)
diff --git a/3rdparty/libuv/src/win/pipe.c b/3rdparty/libuv/src/win/pipe.c
deleted file mode 100644
index bcce80c77e5..00000000000
--- a/3rdparty/libuv/src/win/pipe.c
+++ /dev/null
@@ -1,2118 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include <assert.h>
-#include <io.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "uv.h"
-#include "internal.h"
-#include "handle-inl.h"
-#include "stream-inl.h"
-#include "req-inl.h"
-
-typedef struct uv__ipc_queue_item_s uv__ipc_queue_item_t;
-
-struct uv__ipc_queue_item_s {
- /*
- * NOTE: It is important for socket_info_ex to be the first field,
- * because we will we assigning it to the pending_ipc_info.socket_info
- */
- uv__ipc_socket_info_ex socket_info_ex;
- QUEUE member;
- int tcp_connection;
-};
-
-/* A zero-size buffer for use by uv_pipe_read */
-static char uv_zero_[] = "";
-
-/* Null uv_buf_t */
-static const uv_buf_t uv_null_buf_ = { 0, NULL };
-
-/* The timeout that the pipe will wait for the remote end to write data */
-/* when the local ends wants to shut it down. */
-static const int64_t eof_timeout = 50; /* ms */
-
-static const int default_pending_pipe_instances = 4;
-
-/* Pipe prefix */
-static char pipe_prefix[] = "\\\\?\\pipe";
-static const int pipe_prefix_len = sizeof(pipe_prefix) - 1;
-
-/* IPC protocol flags. */
-#define UV_IPC_RAW_DATA 0x0001
-#define UV_IPC_TCP_SERVER 0x0002
-#define UV_IPC_TCP_CONNECTION 0x0004
-
-/* IPC frame header. */
-typedef struct {
- int flags;
- uint64_t raw_data_length;
-} uv_ipc_frame_header_t;
-
-/* IPC frame, which contains an imported TCP socket stream. */
-typedef struct {
- uv_ipc_frame_header_t header;
- uv__ipc_socket_info_ex socket_info_ex;
-} uv_ipc_frame_uv_stream;
-
-static void eof_timer_init(uv_pipe_t* pipe);
-static void eof_timer_start(uv_pipe_t* pipe);
-static void eof_timer_stop(uv_pipe_t* pipe);
-static void eof_timer_cb(uv_timer_t* timer);
-static void eof_timer_destroy(uv_pipe_t* pipe);
-static void eof_timer_close_cb(uv_handle_t* handle);
-
-
-static void uv_unique_pipe_name(char* ptr, char* name, size_t size) {
- snprintf(name, size, "\\\\?\\pipe\\uv\\%p-%u", ptr, GetCurrentProcessId());
-}
-
-
-int uv_pipe_init(uv_loop_t* loop, uv_pipe_t* handle, int ipc) {
- uv_stream_init(loop, (uv_stream_t*)handle, UV_NAMED_PIPE);
-
- handle->reqs_pending = 0;
- handle->handle = INVALID_HANDLE_VALUE;
- handle->name = NULL;
- handle->pipe.conn.ipc_pid = 0;
- handle->pipe.conn.remaining_ipc_rawdata_bytes = 0;
- QUEUE_INIT(&handle->pipe.conn.pending_ipc_info.queue);
- handle->pipe.conn.pending_ipc_info.queue_len = 0;
- handle->ipc = ipc;
- handle->pipe.conn.non_overlapped_writes_tail = NULL;
- handle->pipe.conn.readfile_thread = NULL;
-
- uv_req_init(loop, (uv_req_t*) &handle->pipe.conn.ipc_header_write_req);
-
- return 0;
-}
-
-
-static void uv_pipe_connection_init(uv_pipe_t* handle) {
- uv_connection_init((uv_stream_t*) handle);
- handle->read_req.data = handle;
- handle->pipe.conn.eof_timer = NULL;
- assert(!(handle->flags & UV_HANDLE_PIPESERVER));
- if (pCancelSynchronousIo &&
- handle->flags & UV_HANDLE_NON_OVERLAPPED_PIPE) {
- uv_mutex_init(&handle->pipe.conn.readfile_mutex);
- handle->flags |= UV_HANDLE_PIPE_READ_CANCELABLE;
- }
-}
-
-
-static HANDLE open_named_pipe(const WCHAR* name, DWORD* duplex_flags) {
- HANDLE pipeHandle;
-
- /*
- * Assume that we have a duplex pipe first, so attempt to
- * connect with GENERIC_READ | GENERIC_WRITE.
- */
- pipeHandle = CreateFileW(name,
- GENERIC_READ | GENERIC_WRITE,
- 0,
- NULL,
- OPEN_EXISTING,
- FILE_FLAG_OVERLAPPED,
- NULL);
- if (pipeHandle != INVALID_HANDLE_VALUE) {
- *duplex_flags = UV_HANDLE_READABLE | UV_HANDLE_WRITABLE;
- return pipeHandle;
- }
-
- /*
- * If the pipe is not duplex CreateFileW fails with
- * ERROR_ACCESS_DENIED. In that case try to connect
- * as a read-only or write-only.
- */
- if (GetLastError() == ERROR_ACCESS_DENIED) {
- pipeHandle = CreateFileW(name,
- GENERIC_READ | FILE_WRITE_ATTRIBUTES,
- 0,
- NULL,
- OPEN_EXISTING,
- FILE_FLAG_OVERLAPPED,
- NULL);
-
- if (pipeHandle != INVALID_HANDLE_VALUE) {
- *duplex_flags = UV_HANDLE_READABLE;
- return pipeHandle;
- }
- }
-
- if (GetLastError() == ERROR_ACCESS_DENIED) {
- pipeHandle = CreateFileW(name,
- GENERIC_WRITE | FILE_READ_ATTRIBUTES,
- 0,
- NULL,
- OPEN_EXISTING,
- FILE_FLAG_OVERLAPPED,
- NULL);
-
- if (pipeHandle != INVALID_HANDLE_VALUE) {
- *duplex_flags = UV_HANDLE_WRITABLE;
- return pipeHandle;
- }
- }
-
- return INVALID_HANDLE_VALUE;
-}
-
-
-static void close_pipe(uv_pipe_t* pipe) {
- assert(pipe->u.fd == -1 || pipe->u.fd > 2);
- if (pipe->u.fd == -1)
- CloseHandle(pipe->handle);
- else
- close(pipe->u.fd);
-
- pipe->u.fd = -1;
- pipe->handle = INVALID_HANDLE_VALUE;
-}
-
-
-int uv_stdio_pipe_server(uv_loop_t* loop, uv_pipe_t* handle, DWORD access,
- char* name, size_t nameSize) {
- HANDLE pipeHandle;
- int err;
- char* ptr = (char*)handle;
-
- for (;;) {
- uv_unique_pipe_name(ptr, name, nameSize);
-
- pipeHandle = CreateNamedPipeA(name,
- access | FILE_FLAG_OVERLAPPED | FILE_FLAG_FIRST_PIPE_INSTANCE,
- PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT, 1, 65536, 65536, 0,
- NULL);
-
- if (pipeHandle != INVALID_HANDLE_VALUE) {
- /* No name collisions. We're done. */
- break;
- }
-
- err = GetLastError();
- if (err != ERROR_PIPE_BUSY && err != ERROR_ACCESS_DENIED) {
- goto error;
- }
-
- /* Pipe name collision. Increment the pointer and try again. */
- ptr++;
- }
-
- if (CreateIoCompletionPort(pipeHandle,
- loop->iocp,
- (ULONG_PTR)handle,
- 0) == NULL) {
- err = GetLastError();
- goto error;
- }
-
- uv_pipe_connection_init(handle);
- handle->handle = pipeHandle;
-
- return 0;
-
- error:
- if (pipeHandle != INVALID_HANDLE_VALUE) {
- CloseHandle(pipeHandle);
- }
-
- return err;
-}
-
-
-static int uv_set_pipe_handle(uv_loop_t* loop,
- uv_pipe_t* handle,
- HANDLE pipeHandle,
- int fd,
- DWORD duplex_flags) {
- NTSTATUS nt_status;
- IO_STATUS_BLOCK io_status;
- FILE_MODE_INFORMATION mode_info;
- DWORD mode = PIPE_READMODE_BYTE | PIPE_WAIT;
- DWORD current_mode = 0;
- DWORD err = 0;
-
- if (!(handle->flags & UV_HANDLE_PIPESERVER) &&
- handle->handle != INVALID_HANDLE_VALUE)
- return UV_EBUSY;
-
- if (!SetNamedPipeHandleState(pipeHandle, &mode, NULL, NULL)) {
- err = GetLastError();
- if (err == ERROR_ACCESS_DENIED) {
- /*
- * SetNamedPipeHandleState can fail if the handle doesn't have either
- * GENERIC_WRITE or FILE_WRITE_ATTRIBUTES.
- * But if the handle already has the desired wait and blocking modes
- * we can continue.
- */
- if (!GetNamedPipeHandleState(pipeHandle, &current_mode, NULL, NULL,
- NULL, NULL, 0)) {
- return -1;
- } else if (current_mode & PIPE_NOWAIT) {
- SetLastError(ERROR_ACCESS_DENIED);
- return -1;
- }
- } else {
- /* If this returns ERROR_INVALID_PARAMETER we probably opened
- * something that is not a pipe. */
- if (err == ERROR_INVALID_PARAMETER) {
- SetLastError(WSAENOTSOCK);
- }
- return -1;
- }
- }
-
- /* Check if the pipe was created with FILE_FLAG_OVERLAPPED. */
- nt_status = pNtQueryInformationFile(pipeHandle,
- &io_status,
- &mode_info,
- sizeof(mode_info),
- FileModeInformation);
- if (nt_status != STATUS_SUCCESS) {
- return -1;
- }
-
- if (mode_info.Mode & FILE_SYNCHRONOUS_IO_ALERT ||
- mode_info.Mode & FILE_SYNCHRONOUS_IO_NONALERT) {
- /* Non-overlapped pipe. */
- handle->flags |= UV_HANDLE_NON_OVERLAPPED_PIPE;
- } else {
- /* Overlapped pipe. Try to associate with IOCP. */
- if (CreateIoCompletionPort(pipeHandle,
- loop->iocp,
- (ULONG_PTR)handle,
- 0) == NULL) {
- handle->flags |= UV_HANDLE_EMULATE_IOCP;
- }
- }
-
- handle->handle = pipeHandle;
- handle->u.fd = fd;
- handle->flags |= duplex_flags;
-
- return 0;
-}
-
-
-static DWORD WINAPI pipe_shutdown_thread_proc(void* parameter) {
- uv_loop_t* loop;
- uv_pipe_t* handle;
- uv_shutdown_t* req;
-
- req = (uv_shutdown_t*) parameter;
- assert(req);
- handle = (uv_pipe_t*) req->handle;
- assert(handle);
- loop = handle->loop;
- assert(loop);
-
- FlushFileBuffers(handle->handle);
-
- /* Post completed */
- POST_COMPLETION_FOR_REQ(loop, req);
-
- return 0;
-}
-
-
-void uv_pipe_endgame(uv_loop_t* loop, uv_pipe_t* handle) {
- int err;
- DWORD result;
- uv_shutdown_t* req;
- NTSTATUS nt_status;
- IO_STATUS_BLOCK io_status;
- FILE_PIPE_LOCAL_INFORMATION pipe_info;
- uv__ipc_queue_item_t* item;
-
- if (handle->flags & UV_HANDLE_PIPE_READ_CANCELABLE) {
- handle->flags &= ~UV_HANDLE_PIPE_READ_CANCELABLE;
- uv_mutex_destroy(&handle->pipe.conn.readfile_mutex);
- }
-
- if ((handle->flags & UV_HANDLE_CONNECTION) &&
- handle->stream.conn.shutdown_req != NULL &&
- handle->stream.conn.write_reqs_pending == 0) {
- req = handle->stream.conn.shutdown_req;
-
- /* Clear the shutdown_req field so we don't go here again. */
- handle->stream.conn.shutdown_req = NULL;
-
- if (handle->flags & UV__HANDLE_CLOSING) {
- UNREGISTER_HANDLE_REQ(loop, handle, req);
-
- /* Already closing. Cancel the shutdown. */
- if (req->cb) {
- req->cb(req, UV_ECANCELED);
- }
-
- DECREASE_PENDING_REQ_COUNT(handle);
- return;
- }
-
- /* Try to avoid flushing the pipe buffer in the thread pool. */
- nt_status = pNtQueryInformationFile(handle->handle,
- &io_status,
- &pipe_info,
- sizeof pipe_info,
- FilePipeLocalInformation);
-
- if (nt_status != STATUS_SUCCESS) {
- /* Failure */
- UNREGISTER_HANDLE_REQ(loop, handle, req);
-
- handle->flags |= UV_HANDLE_WRITABLE; /* Questionable */
- if (req->cb) {
- err = pRtlNtStatusToDosError(nt_status);
- req->cb(req, uv_translate_sys_error(err));
- }
-
- DECREASE_PENDING_REQ_COUNT(handle);
- return;
- }
-
- if (pipe_info.OutboundQuota == pipe_info.WriteQuotaAvailable) {
- /* Short-circuit, no need to call FlushFileBuffers. */
- uv_insert_pending_req(loop, (uv_req_t*) req);
- return;
- }
-
- /* Run FlushFileBuffers in the thread pool. */
- result = QueueUserWorkItem(pipe_shutdown_thread_proc,
- req,
- WT_EXECUTELONGFUNCTION);
- if (result) {
- return;
-
- } else {
- /* Failure. */
- UNREGISTER_HANDLE_REQ(loop, handle, req);
-
- handle->flags |= UV_HANDLE_WRITABLE; /* Questionable */
- if (req->cb) {
- err = GetLastError();
- req->cb(req, uv_translate_sys_error(err));
- }
-
- DECREASE_PENDING_REQ_COUNT(handle);
- return;
- }
- }
-
- if (handle->flags & UV__HANDLE_CLOSING &&
- handle->reqs_pending == 0) {
- assert(!(handle->flags & UV_HANDLE_CLOSED));
-
- if (handle->flags & UV_HANDLE_CONNECTION) {
- /* Free pending sockets */
- while (!QUEUE_EMPTY(&handle->pipe.conn.pending_ipc_info.queue)) {
- QUEUE* q;
- SOCKET socket;
-
- q = QUEUE_HEAD(&handle->pipe.conn.pending_ipc_info.queue);
- QUEUE_REMOVE(q);
- item = QUEUE_DATA(q, uv__ipc_queue_item_t, member);
-
- /* Materialize socket and close it */
- socket = WSASocketW(FROM_PROTOCOL_INFO,
- FROM_PROTOCOL_INFO,
- FROM_PROTOCOL_INFO,
- &item->socket_info_ex.socket_info,
- 0,
- WSA_FLAG_OVERLAPPED);
- uv__free(item);
-
- if (socket != INVALID_SOCKET)
- closesocket(socket);
- }
- handle->pipe.conn.pending_ipc_info.queue_len = 0;
-
- if (handle->flags & UV_HANDLE_EMULATE_IOCP) {
- if (handle->read_req.wait_handle != INVALID_HANDLE_VALUE) {
- UnregisterWait(handle->read_req.wait_handle);
- handle->read_req.wait_handle = INVALID_HANDLE_VALUE;
- }
- if (handle->read_req.event_handle) {
- CloseHandle(handle->read_req.event_handle);
- handle->read_req.event_handle = NULL;
- }
- }
- }
-
- if (handle->flags & UV_HANDLE_PIPESERVER) {
- assert(handle->pipe.serv.accept_reqs);
- uv__free(handle->pipe.serv.accept_reqs);
- handle->pipe.serv.accept_reqs = NULL;
- }
-
- uv__handle_close(handle);
- }
-}
-
-
-void uv_pipe_pending_instances(uv_pipe_t* handle, int count) {
- if (handle->flags & UV_HANDLE_BOUND)
- return;
- handle->pipe.serv.pending_instances = count;
- handle->flags |= UV_HANDLE_PIPESERVER;
-}
-
-
-/* Creates a pipe server. */
-int uv_pipe_bind(uv_pipe_t* handle, const char* name) {
- uv_loop_t* loop = handle->loop;
- int i, err, nameSize;
- uv_pipe_accept_t* req;
-
- if (handle->flags & UV_HANDLE_BOUND) {
- return UV_EINVAL;
- }
-
- if (!name) {
- return UV_EINVAL;
- }
-
- if (!(handle->flags & UV_HANDLE_PIPESERVER)) {
- handle->pipe.serv.pending_instances = default_pending_pipe_instances;
- }
-
- handle->pipe.serv.accept_reqs = (uv_pipe_accept_t*)
- uv__malloc(sizeof(uv_pipe_accept_t) * handle->pipe.serv.pending_instances);
- if (!handle->pipe.serv.accept_reqs) {
- uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc");
- }
-
- for (i = 0; i < handle->pipe.serv.pending_instances; i++) {
- req = &handle->pipe.serv.accept_reqs[i];
- uv_req_init(loop, (uv_req_t*) req);
- req->type = UV_ACCEPT;
- req->data = handle;
- req->pipeHandle = INVALID_HANDLE_VALUE;
- req->next_pending = NULL;
- }
-
- /* Convert name to UTF16. */
- nameSize = uv_utf8_to_utf16(name, NULL, 0) * sizeof(WCHAR);
- handle->name = (WCHAR*)uv__malloc(nameSize);
- if (!handle->name) {
- uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc");
- }
-
- if (!uv_utf8_to_utf16(name, handle->name, nameSize / sizeof(WCHAR))) {
- err = GetLastError();
- goto error;
- }
-
- /*
- * Attempt to create the first pipe with FILE_FLAG_FIRST_PIPE_INSTANCE.
- * If this fails then there's already a pipe server for the given pipe name.
- */
- handle->pipe.serv.accept_reqs[0].pipeHandle = CreateNamedPipeW(handle->name,
- PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED |
- FILE_FLAG_FIRST_PIPE_INSTANCE,
- PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT,
- PIPE_UNLIMITED_INSTANCES, 65536, 65536, 0, NULL);
-
- if (handle->pipe.serv.accept_reqs[0].pipeHandle == INVALID_HANDLE_VALUE) {
- err = GetLastError();
- if (err == ERROR_ACCESS_DENIED) {
- err = WSAEADDRINUSE; /* Translates to UV_EADDRINUSE. */
- } else if (err == ERROR_PATH_NOT_FOUND || err == ERROR_INVALID_NAME) {
- err = WSAEACCES; /* Translates to UV_EACCES. */
- }
- goto error;
- }
-
- if (uv_set_pipe_handle(loop,
- handle,
- handle->pipe.serv.accept_reqs[0].pipeHandle,
- -1,
- 0)) {
- err = GetLastError();
- goto error;
- }
-
- handle->pipe.serv.pending_accepts = NULL;
- handle->flags |= UV_HANDLE_PIPESERVER;
- handle->flags |= UV_HANDLE_BOUND;
-
- return 0;
-
-error:
- if (handle->name) {
- uv__free(handle->name);
- handle->name = NULL;
- }
-
- if (handle->pipe.serv.accept_reqs[0].pipeHandle != INVALID_HANDLE_VALUE) {
- CloseHandle(handle->pipe.serv.accept_reqs[0].pipeHandle);
- handle->pipe.serv.accept_reqs[0].pipeHandle = INVALID_HANDLE_VALUE;
- }
-
- return uv_translate_sys_error(err);
-}
-
-
-static DWORD WINAPI pipe_connect_thread_proc(void* parameter) {
- uv_loop_t* loop;
- uv_pipe_t* handle;
- uv_connect_t* req;
- HANDLE pipeHandle = INVALID_HANDLE_VALUE;
- DWORD duplex_flags;
-
- req = (uv_connect_t*) parameter;
- assert(req);
- handle = (uv_pipe_t*) req->handle;
- assert(handle);
- loop = handle->loop;
- assert(loop);
-
- /* We're here because CreateFile on a pipe returned ERROR_PIPE_BUSY. */
- /* We wait for the pipe to become available with WaitNamedPipe. */
- while (WaitNamedPipeW(handle->name, 30000)) {
- /* The pipe is now available, try to connect. */
- pipeHandle = open_named_pipe(handle->name, &duplex_flags);
- if (pipeHandle != INVALID_HANDLE_VALUE) {
- break;
- }
-
- SwitchToThread();
- }
-
- if (pipeHandle != INVALID_HANDLE_VALUE &&
- !uv_set_pipe_handle(loop, handle, pipeHandle, -1, duplex_flags)) {
- SET_REQ_SUCCESS(req);
- } else {
- SET_REQ_ERROR(req, GetLastError());
- }
-
- /* Post completed */
- POST_COMPLETION_FOR_REQ(loop, req);
-
- return 0;
-}
-
-
-void uv_pipe_connect(uv_connect_t* req, uv_pipe_t* handle,
- const char* name, uv_connect_cb cb) {
- uv_loop_t* loop = handle->loop;
- int err, nameSize;
- HANDLE pipeHandle = INVALID_HANDLE_VALUE;
- DWORD duplex_flags;
-
- uv_req_init(loop, (uv_req_t*) req);
- req->type = UV_CONNECT;
- req->handle = (uv_stream_t*) handle;
- req->cb = cb;
-
- /* Convert name to UTF16. */
- nameSize = uv_utf8_to_utf16(name, NULL, 0) * sizeof(WCHAR);
- handle->name = (WCHAR*)uv__malloc(nameSize);
- if (!handle->name) {
- uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc");
- }
-
- if (!uv_utf8_to_utf16(name, handle->name, nameSize / sizeof(WCHAR))) {
- err = GetLastError();
- goto error;
- }
-
- pipeHandle = open_named_pipe(handle->name, &duplex_flags);
- if (pipeHandle == INVALID_HANDLE_VALUE) {
- if (GetLastError() == ERROR_PIPE_BUSY) {
- /* Wait for the server to make a pipe instance available. */
- if (!QueueUserWorkItem(&pipe_connect_thread_proc,
- req,
- WT_EXECUTELONGFUNCTION)) {
- err = GetLastError();
- goto error;
- }
-
- REGISTER_HANDLE_REQ(loop, handle, req);
- handle->reqs_pending++;
-
- return;
- }
-
- err = GetLastError();
- goto error;
- }
-
- assert(pipeHandle != INVALID_HANDLE_VALUE);
-
- if (uv_set_pipe_handle(loop,
- (uv_pipe_t*) req->handle,
- pipeHandle,
- -1,
- duplex_flags)) {
- err = GetLastError();
- goto error;
- }
-
- SET_REQ_SUCCESS(req);
- uv_insert_pending_req(loop, (uv_req_t*) req);
- handle->reqs_pending++;
- REGISTER_HANDLE_REQ(loop, handle, req);
- return;
-
-error:
- if (handle->name) {
- uv__free(handle->name);
- handle->name = NULL;
- }
-
- if (pipeHandle != INVALID_HANDLE_VALUE) {
- CloseHandle(pipeHandle);
- }
-
- /* Make this req pending reporting an error. */
- SET_REQ_ERROR(req, err);
- uv_insert_pending_req(loop, (uv_req_t*) req);
- handle->reqs_pending++;
- REGISTER_HANDLE_REQ(loop, handle, req);
- return;
-}
-
-
-void uv__pipe_pause_read(uv_pipe_t* handle) {
- if (handle->flags & UV_HANDLE_PIPE_READ_CANCELABLE) {
- /* Pause the ReadFile task briefly, to work
- around the Windows kernel bug that causes
- any access to a NamedPipe to deadlock if
- any process has called ReadFile */
- HANDLE h;
- uv_mutex_lock(&handle->pipe.conn.readfile_mutex);
- h = handle->pipe.conn.readfile_thread;
- while (h) {
- /* spinlock: we expect this to finish quickly,
- or we are probably about to deadlock anyways
- (in the kernel), so it doesn't matter */
- pCancelSynchronousIo(h);
- SwitchToThread(); /* yield thread control briefly */
- h = handle->pipe.conn.readfile_thread;
- }
- }
-}
-
-
-void uv__pipe_unpause_read(uv_pipe_t* handle) {
- if (handle->flags & UV_HANDLE_PIPE_READ_CANCELABLE) {
- uv_mutex_unlock(&handle->pipe.conn.readfile_mutex);
- }
-}
-
-
-void uv__pipe_stop_read(uv_pipe_t* handle) {
- handle->flags &= ~UV_HANDLE_READING;
- uv__pipe_pause_read((uv_pipe_t*)handle);
- uv__pipe_unpause_read((uv_pipe_t*)handle);
-}
-
-
-/* Cleans up uv_pipe_t (server or connection) and all resources associated */
-/* with it. */
-void uv_pipe_cleanup(uv_loop_t* loop, uv_pipe_t* handle) {
- int i;
- HANDLE pipeHandle;
-
- uv__pipe_stop_read(handle);
-
- if (handle->name) {
- uv__free(handle->name);
- handle->name = NULL;
- }
-
- if (handle->flags & UV_HANDLE_PIPESERVER) {
- for (i = 0; i < handle->pipe.serv.pending_instances; i++) {
- pipeHandle = handle->pipe.serv.accept_reqs[i].pipeHandle;
- if (pipeHandle != INVALID_HANDLE_VALUE) {
- CloseHandle(pipeHandle);
- handle->pipe.serv.accept_reqs[i].pipeHandle = INVALID_HANDLE_VALUE;
- }
- }
- handle->handle = INVALID_HANDLE_VALUE;
- }
-
- if (handle->flags & UV_HANDLE_CONNECTION) {
- handle->flags &= ~UV_HANDLE_WRITABLE;
- eof_timer_destroy(handle);
- }
-
- if ((handle->flags & UV_HANDLE_CONNECTION)
- && handle->handle != INVALID_HANDLE_VALUE)
- close_pipe(handle);
-}
-
-
-void uv_pipe_close(uv_loop_t* loop, uv_pipe_t* handle) {
- if (handle->flags & UV_HANDLE_READING) {
- handle->flags &= ~UV_HANDLE_READING;
- DECREASE_ACTIVE_COUNT(loop, handle);
- }
-
- if (handle->flags & UV_HANDLE_LISTENING) {
- handle->flags &= ~UV_HANDLE_LISTENING;
- DECREASE_ACTIVE_COUNT(loop, handle);
- }
-
- uv_pipe_cleanup(loop, handle);
-
- if (handle->reqs_pending == 0) {
- uv_want_endgame(loop, (uv_handle_t*) handle);
- }
-
- handle->flags &= ~(UV_HANDLE_READABLE | UV_HANDLE_WRITABLE);
- uv__handle_closing(handle);
-}
-
-
-static void uv_pipe_queue_accept(uv_loop_t* loop, uv_pipe_t* handle,
- uv_pipe_accept_t* req, BOOL firstInstance) {
- assert(handle->flags & UV_HANDLE_LISTENING);
-
- if (!firstInstance) {
- assert(req->pipeHandle == INVALID_HANDLE_VALUE);
-
- req->pipeHandle = CreateNamedPipeW(handle->name,
- PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED,
- PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT,
- PIPE_UNLIMITED_INSTANCES, 65536, 65536, 0, NULL);
-
- if (req->pipeHandle == INVALID_HANDLE_VALUE) {
- SET_REQ_ERROR(req, GetLastError());
- uv_insert_pending_req(loop, (uv_req_t*) req);
- handle->reqs_pending++;
- return;
- }
-
- if (uv_set_pipe_handle(loop, handle, req->pipeHandle, -1, 0)) {
- CloseHandle(req->pipeHandle);
- req->pipeHandle = INVALID_HANDLE_VALUE;
- SET_REQ_ERROR(req, GetLastError());
- uv_insert_pending_req(loop, (uv_req_t*) req);
- handle->reqs_pending++;
- return;
- }
- }
-
- assert(req->pipeHandle != INVALID_HANDLE_VALUE);
-
- /* Prepare the overlapped structure. */
- memset(&(req->u.io.overlapped), 0, sizeof(req->u.io.overlapped));
-
- if (!ConnectNamedPipe(req->pipeHandle, &req->u.io.overlapped) &&
- GetLastError() != ERROR_IO_PENDING) {
- if (GetLastError() == ERROR_PIPE_CONNECTED) {
- SET_REQ_SUCCESS(req);
- } else {
- CloseHandle(req->pipeHandle);
- req->pipeHandle = INVALID_HANDLE_VALUE;
- /* Make this req pending reporting an error. */
- SET_REQ_ERROR(req, GetLastError());
- }
- uv_insert_pending_req(loop, (uv_req_t*) req);
- handle->reqs_pending++;
- return;
- }
-
- handle->reqs_pending++;
-}
-
-
-int uv_pipe_accept(uv_pipe_t* server, uv_stream_t* client) {
- uv_loop_t* loop = server->loop;
- uv_pipe_t* pipe_client;
- uv_pipe_accept_t* req;
- QUEUE* q;
- uv__ipc_queue_item_t* item;
- int err;
-
- if (server->ipc) {
- if (QUEUE_EMPTY(&server->pipe.conn.pending_ipc_info.queue)) {
- /* No valid pending sockets. */
- return WSAEWOULDBLOCK;
- }
-
- q = QUEUE_HEAD(&server->pipe.conn.pending_ipc_info.queue);
- QUEUE_REMOVE(q);
- server->pipe.conn.pending_ipc_info.queue_len--;
- item = QUEUE_DATA(q, uv__ipc_queue_item_t, member);
-
- err = uv_tcp_import((uv_tcp_t*)client,
- &item->socket_info_ex,
- item->tcp_connection);
- if (err != 0)
- return err;
-
- uv__free(item);
-
- } else {
- pipe_client = (uv_pipe_t*)client;
-
- /* Find a connection instance that has been connected, but not yet */
- /* accepted. */
- req = server->pipe.serv.pending_accepts;
-
- if (!req) {
- /* No valid connections found, so we error out. */
- return WSAEWOULDBLOCK;
- }
-
- /* Initialize the client handle and copy the pipeHandle to the client */
- uv_pipe_connection_init(pipe_client);
- pipe_client->handle = req->pipeHandle;
- pipe_client->flags |= UV_HANDLE_READABLE | UV_HANDLE_WRITABLE;
-
- /* Prepare the req to pick up a new connection */
- server->pipe.serv.pending_accepts = req->next_pending;
- req->next_pending = NULL;
- req->pipeHandle = INVALID_HANDLE_VALUE;
-
- if (!(server->flags & UV__HANDLE_CLOSING)) {
- uv_pipe_queue_accept(loop, server, req, FALSE);
- }
- }
-
- return 0;
-}
-
-
-/* Starts listening for connections for the given pipe. */
-int uv_pipe_listen(uv_pipe_t* handle, int backlog, uv_connection_cb cb) {
- uv_loop_t* loop = handle->loop;
- int i;
-
- if (handle->flags & UV_HANDLE_LISTENING) {
- handle->stream.serv.connection_cb = cb;
- }
-
- if (!(handle->flags & UV_HANDLE_BOUND)) {
- return WSAEINVAL;
- }
-
- if (handle->flags & UV_HANDLE_READING) {
- return WSAEISCONN;
- }
-
- if (!(handle->flags & UV_HANDLE_PIPESERVER)) {
- return ERROR_NOT_SUPPORTED;
- }
-
- handle->flags |= UV_HANDLE_LISTENING;
- INCREASE_ACTIVE_COUNT(loop, handle);
- handle->stream.serv.connection_cb = cb;
-
- /* First pipe handle should have already been created in uv_pipe_bind */
- assert(handle->pipe.serv.accept_reqs[0].pipeHandle != INVALID_HANDLE_VALUE);
-
- for (i = 0; i < handle->pipe.serv.pending_instances; i++) {
- uv_pipe_queue_accept(loop, handle, &handle->pipe.serv.accept_reqs[i], i == 0);
- }
-
- return 0;
-}
-
-
-static DWORD WINAPI uv_pipe_zero_readfile_thread_proc(void* parameter) {
- int result;
- DWORD bytes;
- uv_read_t* req = (uv_read_t*) parameter;
- uv_pipe_t* handle = (uv_pipe_t*) req->data;
- uv_loop_t* loop = handle->loop;
- HANDLE hThread = NULL;
- DWORD err;
- uv_mutex_t *m = &handle->pipe.conn.readfile_mutex;
-
- assert(req != NULL);
- assert(req->type == UV_READ);
- assert(handle->type == UV_NAMED_PIPE);
-
- if (handle->flags & UV_HANDLE_PIPE_READ_CANCELABLE) {
- uv_mutex_lock(m); /* mutex controls *setting* of readfile_thread */
- if (DuplicateHandle(GetCurrentProcess(), GetCurrentThread(),
- GetCurrentProcess(), &hThread,
- 0, TRUE, DUPLICATE_SAME_ACCESS)) {
- handle->pipe.conn.readfile_thread = hThread;
- } else {
- hThread = NULL;
- }
- uv_mutex_unlock(m);
- }
-restart_readfile:
- result = ReadFile(handle->handle,
- &uv_zero_,
- 0,
- &bytes,
- NULL);
- if (!result) {
- err = GetLastError();
- if (err == ERROR_OPERATION_ABORTED &&
- handle->flags & UV_HANDLE_PIPE_READ_CANCELABLE) {
- if (handle->flags & UV_HANDLE_READING) {
- /* just a brief break to do something else */
- handle->pipe.conn.readfile_thread = NULL;
- /* resume after it is finished */
- uv_mutex_lock(m);
- handle->pipe.conn.readfile_thread = hThread;
- uv_mutex_unlock(m);
- goto restart_readfile;
- } else {
- result = 1; /* successfully stopped reading */
- }
- }
- }
- if (hThread) {
- assert(hThread == handle->pipe.conn.readfile_thread);
- /* mutex does not control clearing readfile_thread */
- handle->pipe.conn.readfile_thread = NULL;
- uv_mutex_lock(m);
- /* only when we hold the mutex lock is it safe to
- open or close the handle */
- CloseHandle(hThread);
- uv_mutex_unlock(m);
- }
-
- if (!result) {
- SET_REQ_ERROR(req, err);
- }
-
- POST_COMPLETION_FOR_REQ(loop, req);
- return 0;
-}
-
-
-static DWORD WINAPI uv_pipe_writefile_thread_proc(void* parameter) {
- int result;
- DWORD bytes;
- uv_write_t* req = (uv_write_t*) parameter;
- uv_pipe_t* handle = (uv_pipe_t*) req->handle;
- uv_loop_t* loop = handle->loop;
-
- assert(req != NULL);
- assert(req->type == UV_WRITE);
- assert(handle->type == UV_NAMED_PIPE);
- assert(req->write_buffer.base);
-
- result = WriteFile(handle->handle,
- req->write_buffer.base,
- req->write_buffer.len,
- &bytes,
- NULL);
-
- if (!result) {
- SET_REQ_ERROR(req, GetLastError());
- }
-
- POST_COMPLETION_FOR_REQ(loop, req);
- return 0;
-}
-
-
-static void CALLBACK post_completion_read_wait(void* context, BOOLEAN timed_out) {
- uv_read_t* req;
- uv_tcp_t* handle;
-
- req = (uv_read_t*) context;
- assert(req != NULL);
- handle = (uv_tcp_t*)req->data;
- assert(handle != NULL);
- assert(!timed_out);
-
- if (!PostQueuedCompletionStatus(handle->loop->iocp,
- req->u.io.overlapped.InternalHigh,
- 0,
- &req->u.io.overlapped)) {
- uv_fatal_error(GetLastError(), "PostQueuedCompletionStatus");
- }
-}
-
-
-static void CALLBACK post_completion_write_wait(void* context, BOOLEAN timed_out) {
- uv_write_t* req;
- uv_tcp_t* handle;
-
- req = (uv_write_t*) context;
- assert(req != NULL);
- handle = (uv_tcp_t*)req->handle;
- assert(handle != NULL);
- assert(!timed_out);
-
- if (!PostQueuedCompletionStatus(handle->loop->iocp,
- req->u.io.overlapped.InternalHigh,
- 0,
- &req->u.io.overlapped)) {
- uv_fatal_error(GetLastError(), "PostQueuedCompletionStatus");
- }
-}
-
-
-static void uv_pipe_queue_read(uv_loop_t* loop, uv_pipe_t* handle) {
- uv_read_t* req;
- int result;
-
- assert(handle->flags & UV_HANDLE_READING);
- assert(!(handle->flags & UV_HANDLE_READ_PENDING));
-
- assert(handle->handle != INVALID_HANDLE_VALUE);
-
- req = &handle->read_req;
-
- if (handle->flags & UV_HANDLE_NON_OVERLAPPED_PIPE) {
- if (!QueueUserWorkItem(&uv_pipe_zero_readfile_thread_proc,
- req,
- WT_EXECUTELONGFUNCTION)) {
- /* Make this req pending reporting an error. */
- SET_REQ_ERROR(req, GetLastError());
- goto error;
- }
- } else {
- memset(&req->u.io.overlapped, 0, sizeof(req->u.io.overlapped));
- if (handle->flags & UV_HANDLE_EMULATE_IOCP) {
- req->u.io.overlapped.hEvent = (HANDLE) ((uintptr_t) req->event_handle | 1);
- }
-
- /* Do 0-read */
- result = ReadFile(handle->handle,
- &uv_zero_,
- 0,
- NULL,
- &req->u.io.overlapped);
-
- if (!result && GetLastError() != ERROR_IO_PENDING) {
- /* Make this req pending reporting an error. */
- SET_REQ_ERROR(req, GetLastError());
- goto error;
- }
-
- if (handle->flags & UV_HANDLE_EMULATE_IOCP) {
- if (!req->event_handle) {
- req->event_handle = CreateEvent(NULL, 0, 0, NULL);
- if (!req->event_handle) {
- uv_fatal_error(GetLastError(), "CreateEvent");
- }
- }
- if (req->wait_handle == INVALID_HANDLE_VALUE) {
- if (!RegisterWaitForSingleObject(&req->wait_handle,
- req->u.io.overlapped.hEvent, post_completion_read_wait, (void*) req,
- INFINITE, WT_EXECUTEINWAITTHREAD)) {
- SET_REQ_ERROR(req, GetLastError());
- goto error;
- }
- }
- }
- }
-
- /* Start the eof timer if there is one */
- eof_timer_start(handle);
- handle->flags |= UV_HANDLE_READ_PENDING;
- handle->reqs_pending++;
- return;
-
-error:
- uv_insert_pending_req(loop, (uv_req_t*)req);
- handle->flags |= UV_HANDLE_READ_PENDING;
- handle->reqs_pending++;
-}
-
-
-int uv_pipe_read_start(uv_pipe_t* handle,
- uv_alloc_cb alloc_cb,
- uv_read_cb read_cb) {
- uv_loop_t* loop = handle->loop;
-
- handle->flags |= UV_HANDLE_READING;
- INCREASE_ACTIVE_COUNT(loop, handle);
- handle->read_cb = read_cb;
- handle->alloc_cb = alloc_cb;
-
- /* If reading was stopped and then started again, there could still be a */
- /* read request pending. */
- if (!(handle->flags & UV_HANDLE_READ_PENDING))
- uv_pipe_queue_read(loop, handle);
-
- return 0;
-}
-
-
-static void uv_insert_non_overlapped_write_req(uv_pipe_t* handle,
- uv_write_t* req) {
- req->next_req = NULL;
- if (handle->pipe.conn.non_overlapped_writes_tail) {
- req->next_req =
- handle->pipe.conn.non_overlapped_writes_tail->next_req;
- handle->pipe.conn.non_overlapped_writes_tail->next_req = (uv_req_t*)req;
- handle->pipe.conn.non_overlapped_writes_tail = req;
- } else {
- req->next_req = (uv_req_t*)req;
- handle->pipe.conn.non_overlapped_writes_tail = req;
- }
-}
-
-
-static uv_write_t* uv_remove_non_overlapped_write_req(uv_pipe_t* handle) {
- uv_write_t* req;
-
- if (handle->pipe.conn.non_overlapped_writes_tail) {
- req = (uv_write_t*)handle->pipe.conn.non_overlapped_writes_tail->next_req;
-
- if (req == handle->pipe.conn.non_overlapped_writes_tail) {
- handle->pipe.conn.non_overlapped_writes_tail = NULL;
- } else {
- handle->pipe.conn.non_overlapped_writes_tail->next_req =
- req->next_req;
- }
-
- return req;
- } else {
- /* queue empty */
- return NULL;
- }
-}
-
-
-static void uv_queue_non_overlapped_write(uv_pipe_t* handle) {
- uv_write_t* req = uv_remove_non_overlapped_write_req(handle);
- if (req) {
- if (!QueueUserWorkItem(&uv_pipe_writefile_thread_proc,
- req,
- WT_EXECUTELONGFUNCTION)) {
- uv_fatal_error(GetLastError(), "QueueUserWorkItem");
- }
- }
-}
-
-
-static int uv_pipe_write_impl(uv_loop_t* loop,
- uv_write_t* req,
- uv_pipe_t* handle,
- const uv_buf_t bufs[],
- unsigned int nbufs,
- uv_stream_t* send_handle,
- uv_write_cb cb) {
- int err;
- int result;
- uv_tcp_t* tcp_send_handle;
- uv_write_t* ipc_header_req = NULL;
- uv_ipc_frame_uv_stream ipc_frame;
-
- if (nbufs != 1 && (nbufs != 0 || !send_handle)) {
- return ERROR_NOT_SUPPORTED;
- }
-
- /* Only TCP handles are supported for sharing. */
- if (send_handle && ((send_handle->type != UV_TCP) ||
- (!(send_handle->flags & UV_HANDLE_BOUND) &&
- !(send_handle->flags & UV_HANDLE_CONNECTION)))) {
- return ERROR_NOT_SUPPORTED;
- }
-
- assert(handle->handle != INVALID_HANDLE_VALUE);
-
- uv_req_init(loop, (uv_req_t*) req);
- req->type = UV_WRITE;
- req->handle = (uv_stream_t*) handle;
- req->cb = cb;
- req->ipc_header = 0;
- req->event_handle = NULL;
- req->wait_handle = INVALID_HANDLE_VALUE;
- memset(&req->u.io.overlapped, 0, sizeof(req->u.io.overlapped));
-
- if (handle->ipc) {
- assert(!(handle->flags & UV_HANDLE_NON_OVERLAPPED_PIPE));
- ipc_frame.header.flags = 0;
-
- /* Use the IPC framing protocol. */
- if (send_handle) {
- tcp_send_handle = (uv_tcp_t*)send_handle;
-
- if (handle->pipe.conn.ipc_pid == 0) {
- handle->pipe.conn.ipc_pid = uv_current_pid();
- }
-
- err = uv_tcp_duplicate_socket(tcp_send_handle, handle->pipe.conn.ipc_pid,
- &ipc_frame.socket_info_ex.socket_info);
- if (err) {
- return err;
- }
-
- ipc_frame.socket_info_ex.delayed_error = tcp_send_handle->delayed_error;
-
- ipc_frame.header.flags |= UV_IPC_TCP_SERVER;
-
- if (tcp_send_handle->flags & UV_HANDLE_CONNECTION) {
- ipc_frame.header.flags |= UV_IPC_TCP_CONNECTION;
- }
- }
-
- if (nbufs == 1) {
- ipc_frame.header.flags |= UV_IPC_RAW_DATA;
- ipc_frame.header.raw_data_length = bufs[0].len;
- }
-
- /*
- * Use the provided req if we're only doing a single write.
- * If we're doing multiple writes, use ipc_header_write_req to do
- * the first write, and then use the provided req for the second write.
- */
- if (!(ipc_frame.header.flags & UV_IPC_RAW_DATA)) {
- ipc_header_req = req;
- } else {
- /*
- * Try to use the preallocated write req if it's available.
- * Otherwise allocate a new one.
- */
- if (handle->pipe.conn.ipc_header_write_req.type != UV_WRITE) {
- ipc_header_req = (uv_write_t*)&handle->pipe.conn.ipc_header_write_req;
- } else {
- ipc_header_req = (uv_write_t*)uv__malloc(sizeof(uv_write_t));
- if (!ipc_header_req) {
- uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc");
- }
- }
-
- uv_req_init(loop, (uv_req_t*) ipc_header_req);
- ipc_header_req->type = UV_WRITE;
- ipc_header_req->handle = (uv_stream_t*) handle;
- ipc_header_req->cb = NULL;
- ipc_header_req->ipc_header = 1;
- }
-
- /* Write the header or the whole frame. */
- memset(&ipc_header_req->u.io.overlapped, 0,
- sizeof(ipc_header_req->u.io.overlapped));
-
- /* Using overlapped IO, but wait for completion before returning.
- This write is blocking because ipc_frame is on stack. */
- ipc_header_req->u.io.overlapped.hEvent = CreateEvent(NULL, 1, 0, NULL);
- if (!ipc_header_req->u.io.overlapped.hEvent) {
- uv_fatal_error(GetLastError(), "CreateEvent");
- }
-
- result = WriteFile(handle->handle,
- &ipc_frame,
- ipc_frame.header.flags & UV_IPC_TCP_SERVER ?
- sizeof(ipc_frame) : sizeof(ipc_frame.header),
- NULL,
- &ipc_header_req->u.io.overlapped);
- if (!result && GetLastError() != ERROR_IO_PENDING) {
- err = GetLastError();
- CloseHandle(ipc_header_req->u.io.overlapped.hEvent);
- return err;
- }
-
- if (!result) {
- /* Request not completed immediately. Wait for it.*/
- if (WaitForSingleObject(ipc_header_req->u.io.overlapped.hEvent, INFINITE) !=
- WAIT_OBJECT_0) {
- err = GetLastError();
- CloseHandle(ipc_header_req->u.io.overlapped.hEvent);
- return err;
- }
- }
- ipc_header_req->u.io.queued_bytes = 0;
- CloseHandle(ipc_header_req->u.io.overlapped.hEvent);
- ipc_header_req->u.io.overlapped.hEvent = NULL;
-
- REGISTER_HANDLE_REQ(loop, handle, ipc_header_req);
- handle->reqs_pending++;
- handle->stream.conn.write_reqs_pending++;
-
- /* If we don't have any raw data to write - we're done. */
- if (!(ipc_frame.header.flags & UV_IPC_RAW_DATA)) {
- return 0;
- }
- }
-
- if ((handle->flags &
- (UV_HANDLE_BLOCKING_WRITES | UV_HANDLE_NON_OVERLAPPED_PIPE)) ==
- (UV_HANDLE_BLOCKING_WRITES | UV_HANDLE_NON_OVERLAPPED_PIPE)) {
- DWORD bytes;
- result = WriteFile(handle->handle,
- bufs[0].base,
- bufs[0].len,
- &bytes,
- NULL);
-
- if (!result) {
- err = GetLastError();
- return err;
- } else {
- /* Request completed immediately. */
- req->u.io.queued_bytes = 0;
- }
-
- REGISTER_HANDLE_REQ(loop, handle, req);
- handle->reqs_pending++;
- handle->stream.conn.write_reqs_pending++;
- POST_COMPLETION_FOR_REQ(loop, req);
- return 0;
- } else if (handle->flags & UV_HANDLE_NON_OVERLAPPED_PIPE) {
- req->write_buffer = bufs[0];
- uv_insert_non_overlapped_write_req(handle, req);
- if (handle->stream.conn.write_reqs_pending == 0) {
- uv_queue_non_overlapped_write(handle);
- }
-
- /* Request queued by the kernel. */
- req->u.io.queued_bytes = bufs[0].len;
- handle->write_queue_size += req->u.io.queued_bytes;
- } else if (handle->flags & UV_HANDLE_BLOCKING_WRITES) {
- /* Using overlapped IO, but wait for completion before returning */
- req->u.io.overlapped.hEvent = CreateEvent(NULL, 1, 0, NULL);
- if (!req->u.io.overlapped.hEvent) {
- uv_fatal_error(GetLastError(), "CreateEvent");
- }
-
- result = WriteFile(handle->handle,
- bufs[0].base,
- bufs[0].len,
- NULL,
- &req->u.io.overlapped);
-
- if (!result && GetLastError() != ERROR_IO_PENDING) {
- err = GetLastError();
- CloseHandle(req->u.io.overlapped.hEvent);
- return err;
- }
-
- if (result) {
- /* Request completed immediately. */
- req->u.io.queued_bytes = 0;
- } else {
- /* Request queued by the kernel. */
- req->u.io.queued_bytes = bufs[0].len;
- handle->write_queue_size += req->u.io.queued_bytes;
- if (WaitForSingleObject(req->u.io.overlapped.hEvent, INFINITE) !=
- WAIT_OBJECT_0) {
- err = GetLastError();
- CloseHandle(req->u.io.overlapped.hEvent);
- return uv_translate_sys_error(err);
- }
- }
- CloseHandle(req->u.io.overlapped.hEvent);
-
- REGISTER_HANDLE_REQ(loop, handle, req);
- handle->reqs_pending++;
- handle->stream.conn.write_reqs_pending++;
- return 0;
- } else {
- result = WriteFile(handle->handle,
- bufs[0].base,
- bufs[0].len,
- NULL,
- &req->u.io.overlapped);
-
- if (!result && GetLastError() != ERROR_IO_PENDING) {
- return GetLastError();
- }
-
- if (result) {
- /* Request completed immediately. */
- req->u.io.queued_bytes = 0;
- } else {
- /* Request queued by the kernel. */
- req->u.io.queued_bytes = bufs[0].len;
- handle->write_queue_size += req->u.io.queued_bytes;
- }
-
- if (handle->flags & UV_HANDLE_EMULATE_IOCP) {
- req->event_handle = CreateEvent(NULL, 0, 0, NULL);
- if (!req->event_handle) {
- uv_fatal_error(GetLastError(), "CreateEvent");
- }
- if (!RegisterWaitForSingleObject(&req->wait_handle,
- req->u.io.overlapped.hEvent, post_completion_write_wait, (void*) req,
- INFINITE, WT_EXECUTEINWAITTHREAD)) {
- return GetLastError();
- }
- }
- }
-
- REGISTER_HANDLE_REQ(loop, handle, req);
- handle->reqs_pending++;
- handle->stream.conn.write_reqs_pending++;
-
- return 0;
-}
-
-
-int uv_pipe_write(uv_loop_t* loop,
- uv_write_t* req,
- uv_pipe_t* handle,
- const uv_buf_t bufs[],
- unsigned int nbufs,
- uv_write_cb cb) {
- return uv_pipe_write_impl(loop, req, handle, bufs, nbufs, NULL, cb);
-}
-
-
-int uv_pipe_write2(uv_loop_t* loop,
- uv_write_t* req,
- uv_pipe_t* handle,
- const uv_buf_t bufs[],
- unsigned int nbufs,
- uv_stream_t* send_handle,
- uv_write_cb cb) {
- if (!handle->ipc) {
- return WSAEINVAL;
- }
-
- return uv_pipe_write_impl(loop, req, handle, bufs, nbufs, send_handle, cb);
-}
-
-
-static void uv_pipe_read_eof(uv_loop_t* loop, uv_pipe_t* handle,
- uv_buf_t buf) {
- /* If there is an eof timer running, we don't need it any more, */
- /* so discard it. */
- eof_timer_destroy(handle);
-
- handle->flags &= ~UV_HANDLE_READABLE;
- uv_read_stop((uv_stream_t*) handle);
-
- handle->read_cb((uv_stream_t*) handle, UV_EOF, &buf);
-}
-
-
-static void uv_pipe_read_error(uv_loop_t* loop, uv_pipe_t* handle, int error,
- uv_buf_t buf) {
- /* If there is an eof timer running, we don't need it any more, */
- /* so discard it. */
- eof_timer_destroy(handle);
-
- uv_read_stop((uv_stream_t*) handle);
-
- handle->read_cb((uv_stream_t*)handle, uv_translate_sys_error(error), &buf);
-}
-
-
-static void uv_pipe_read_error_or_eof(uv_loop_t* loop, uv_pipe_t* handle,
- int error, uv_buf_t buf) {
- if (error == ERROR_BROKEN_PIPE) {
- uv_pipe_read_eof(loop, handle, buf);
- } else {
- uv_pipe_read_error(loop, handle, error, buf);
- }
-}
-
-
-void uv__pipe_insert_pending_socket(uv_pipe_t* handle,
- uv__ipc_socket_info_ex* info,
- int tcp_connection) {
- uv__ipc_queue_item_t* item;
-
- item = (uv__ipc_queue_item_t*) uv__malloc(sizeof(*item));
- if (item == NULL)
- uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc");
-
- memcpy(&item->socket_info_ex, info, sizeof(item->socket_info_ex));
- item->tcp_connection = tcp_connection;
- QUEUE_INSERT_TAIL(&handle->pipe.conn.pending_ipc_info.queue, &item->member);
- handle->pipe.conn.pending_ipc_info.queue_len++;
-}
-
-
-void uv_process_pipe_read_req(uv_loop_t* loop, uv_pipe_t* handle,
- uv_req_t* req) {
- DWORD bytes, avail;
- uv_buf_t buf;
- uv_ipc_frame_uv_stream ipc_frame;
-
- assert(handle->type == UV_NAMED_PIPE);
-
- handle->flags &= ~UV_HANDLE_READ_PENDING;
- eof_timer_stop(handle);
-
- if (!REQ_SUCCESS(req)) {
- /* An error occurred doing the 0-read. */
- if (handle->flags & UV_HANDLE_READING) {
- uv_pipe_read_error_or_eof(loop,
- handle,
- GET_REQ_ERROR(req),
- uv_null_buf_);
- }
- } else {
- /* Do non-blocking reads until the buffer is empty */
- while (handle->flags & UV_HANDLE_READING) {
- if (!PeekNamedPipe(handle->handle,
- NULL,
- 0,
- NULL,
- &avail,
- NULL)) {
- uv_pipe_read_error_or_eof(loop, handle, GetLastError(), uv_null_buf_);
- break;
- }
-
- if (avail == 0) {
- /* There is nothing to read after all. */
- break;
- }
-
- if (handle->ipc) {
- /* Use the IPC framing protocol to read the incoming data. */
- if (handle->pipe.conn.remaining_ipc_rawdata_bytes == 0) {
- /* We're reading a new frame. First, read the header. */
- assert(avail >= sizeof(ipc_frame.header));
-
- if (!ReadFile(handle->handle,
- &ipc_frame.header,
- sizeof(ipc_frame.header),
- &bytes,
- NULL)) {
- uv_pipe_read_error_or_eof(loop, handle, GetLastError(),
- uv_null_buf_);
- break;
- }
-
- assert(bytes == sizeof(ipc_frame.header));
- assert(ipc_frame.header.flags <= (UV_IPC_TCP_SERVER | UV_IPC_RAW_DATA |
- UV_IPC_TCP_CONNECTION));
-
- if (ipc_frame.header.flags & UV_IPC_TCP_SERVER) {
- assert(avail - sizeof(ipc_frame.header) >=
- sizeof(ipc_frame.socket_info_ex));
-
- /* Read the TCP socket info. */
- if (!ReadFile(handle->handle,
- &ipc_frame.socket_info_ex,
- sizeof(ipc_frame) - sizeof(ipc_frame.header),
- &bytes,
- NULL)) {
- uv_pipe_read_error_or_eof(loop, handle, GetLastError(),
- uv_null_buf_);
- break;
- }
-
- assert(bytes == sizeof(ipc_frame) - sizeof(ipc_frame.header));
-
- /* Store the pending socket info. */
- uv__pipe_insert_pending_socket(
- handle,
- &ipc_frame.socket_info_ex,
- ipc_frame.header.flags & UV_IPC_TCP_CONNECTION);
- }
-
- if (ipc_frame.header.flags & UV_IPC_RAW_DATA) {
- handle->pipe.conn.remaining_ipc_rawdata_bytes =
- ipc_frame.header.raw_data_length;
- continue;
- }
- } else {
- avail = min(avail, (DWORD)handle->pipe.conn.remaining_ipc_rawdata_bytes);
- }
- }
-
- handle->alloc_cb((uv_handle_t*) handle, avail, &buf);
- if (buf.len == 0) {
- handle->read_cb((uv_stream_t*) handle, UV_ENOBUFS, &buf);
- break;
- }
- assert(buf.base != NULL);
-
- if (ReadFile(handle->handle,
- buf.base,
- min(buf.len, avail),
- &bytes,
- NULL)) {
- /* Successful read */
- if (handle->ipc) {
- assert(handle->pipe.conn.remaining_ipc_rawdata_bytes >= bytes);
- handle->pipe.conn.remaining_ipc_rawdata_bytes =
- handle->pipe.conn.remaining_ipc_rawdata_bytes - bytes;
- }
- handle->read_cb((uv_stream_t*)handle, bytes, &buf);
-
- /* Read again only if bytes == buf.len */
- if (bytes <= buf.len) {
- break;
- }
- } else {
- uv_pipe_read_error_or_eof(loop, handle, GetLastError(), buf);
- break;
- }
- }
-
- /* Post another 0-read if still reading and not closing. */
- if ((handle->flags & UV_HANDLE_READING) &&
- !(handle->flags & UV_HANDLE_READ_PENDING)) {
- uv_pipe_queue_read(loop, handle);
- }
- }
-
- DECREASE_PENDING_REQ_COUNT(handle);
-}
-
-
-void uv_process_pipe_write_req(uv_loop_t* loop, uv_pipe_t* handle,
- uv_write_t* req) {
- int err;
-
- assert(handle->type == UV_NAMED_PIPE);
-
- assert(handle->write_queue_size >= req->u.io.queued_bytes);
- handle->write_queue_size -= req->u.io.queued_bytes;
-
- UNREGISTER_HANDLE_REQ(loop, handle, req);
-
- if (handle->flags & UV_HANDLE_EMULATE_IOCP) {
- if (req->wait_handle != INVALID_HANDLE_VALUE) {
- UnregisterWait(req->wait_handle);
- req->wait_handle = INVALID_HANDLE_VALUE;
- }
- if (req->event_handle) {
- CloseHandle(req->event_handle);
- req->event_handle = NULL;
- }
- }
-
- if (req->ipc_header) {
- if (req == &handle->pipe.conn.ipc_header_write_req) {
- req->type = UV_UNKNOWN_REQ;
- } else {
- uv__free(req);
- }
- } else {
- if (req->cb) {
- err = GET_REQ_ERROR(req);
- req->cb(req, uv_translate_sys_error(err));
- }
- }
-
- handle->stream.conn.write_reqs_pending--;
-
- if (handle->flags & UV_HANDLE_NON_OVERLAPPED_PIPE &&
- handle->pipe.conn.non_overlapped_writes_tail) {
- assert(handle->stream.conn.write_reqs_pending > 0);
- uv_queue_non_overlapped_write(handle);
- }
-
- if (handle->stream.conn.shutdown_req != NULL &&
- handle->stream.conn.write_reqs_pending == 0) {
- uv_want_endgame(loop, (uv_handle_t*)handle);
- }
-
- DECREASE_PENDING_REQ_COUNT(handle);
-}
-
-
-void uv_process_pipe_accept_req(uv_loop_t* loop, uv_pipe_t* handle,
- uv_req_t* raw_req) {
- uv_pipe_accept_t* req = (uv_pipe_accept_t*) raw_req;
-
- assert(handle->type == UV_NAMED_PIPE);
-
- if (handle->flags & UV__HANDLE_CLOSING) {
- /* The req->pipeHandle should be freed already in uv_pipe_cleanup(). */
- assert(req->pipeHandle == INVALID_HANDLE_VALUE);
- DECREASE_PENDING_REQ_COUNT(handle);
- return;
- }
-
- if (REQ_SUCCESS(req)) {
- assert(req->pipeHandle != INVALID_HANDLE_VALUE);
- req->next_pending = handle->pipe.serv.pending_accepts;
- handle->pipe.serv.pending_accepts = req;
-
- if (handle->stream.serv.connection_cb) {
- handle->stream.serv.connection_cb((uv_stream_t*)handle, 0);
- }
- } else {
- if (req->pipeHandle != INVALID_HANDLE_VALUE) {
- CloseHandle(req->pipeHandle);
- req->pipeHandle = INVALID_HANDLE_VALUE;
- }
- if (!(handle->flags & UV__HANDLE_CLOSING)) {
- uv_pipe_queue_accept(loop, handle, req, FALSE);
- }
- }
-
- DECREASE_PENDING_REQ_COUNT(handle);
-}
-
-
-void uv_process_pipe_connect_req(uv_loop_t* loop, uv_pipe_t* handle,
- uv_connect_t* req) {
- int err;
-
- assert(handle->type == UV_NAMED_PIPE);
-
- UNREGISTER_HANDLE_REQ(loop, handle, req);
-
- if (req->cb) {
- err = 0;
- if (REQ_SUCCESS(req)) {
- uv_pipe_connection_init(handle);
- } else {
- err = GET_REQ_ERROR(req);
- }
- req->cb(req, uv_translate_sys_error(err));
- }
-
- DECREASE_PENDING_REQ_COUNT(handle);
-}
-
-
-void uv_process_pipe_shutdown_req(uv_loop_t* loop, uv_pipe_t* handle,
- uv_shutdown_t* req) {
- assert(handle->type == UV_NAMED_PIPE);
-
- UNREGISTER_HANDLE_REQ(loop, handle, req);
-
- if (handle->flags & UV_HANDLE_READABLE) {
- /* Initialize and optionally start the eof timer. Only do this if the */
- /* pipe is readable and we haven't seen EOF come in ourselves. */
- eof_timer_init(handle);
-
- /* If reading start the timer right now. */
- /* Otherwise uv_pipe_queue_read will start it. */
- if (handle->flags & UV_HANDLE_READ_PENDING) {
- eof_timer_start(handle);
- }
-
- } else {
- /* This pipe is not readable. We can just close it to let the other end */
- /* know that we're done writing. */
- close_pipe(handle);
- }
-
- if (req->cb) {
- req->cb(req, 0);
- }
-
- DECREASE_PENDING_REQ_COUNT(handle);
-}
-
-
-static void eof_timer_init(uv_pipe_t* pipe) {
- int r;
-
- assert(pipe->pipe.conn.eof_timer == NULL);
- assert(pipe->flags & UV_HANDLE_CONNECTION);
-
- pipe->pipe.conn.eof_timer = (uv_timer_t*) uv__malloc(sizeof *pipe->pipe.conn.eof_timer);
-
- r = uv_timer_init(pipe->loop, pipe->pipe.conn.eof_timer);
- assert(r == 0); /* timers can't fail */
- pipe->pipe.conn.eof_timer->data = pipe;
- uv_unref((uv_handle_t*) pipe->pipe.conn.eof_timer);
-}
-
-
-static void eof_timer_start(uv_pipe_t* pipe) {
- assert(pipe->flags & UV_HANDLE_CONNECTION);
-
- if (pipe->pipe.conn.eof_timer != NULL) {
- uv_timer_start(pipe->pipe.conn.eof_timer, eof_timer_cb, eof_timeout, 0);
- }
-}
-
-
-static void eof_timer_stop(uv_pipe_t* pipe) {
- assert(pipe->flags & UV_HANDLE_CONNECTION);
-
- if (pipe->pipe.conn.eof_timer != NULL) {
- uv_timer_stop(pipe->pipe.conn.eof_timer);
- }
-}
-
-
-static void eof_timer_cb(uv_timer_t* timer) {
- uv_pipe_t* pipe = (uv_pipe_t*) timer->data;
- uv_loop_t* loop = timer->loop;
-
- assert(pipe->type == UV_NAMED_PIPE);
-
- /* This should always be true, since we start the timer only */
- /* in uv_pipe_queue_read after successfully calling ReadFile, */
- /* or in uv_process_pipe_shutdown_req if a read is pending, */
- /* and we always immediately stop the timer in */
- /* uv_process_pipe_read_req. */
- assert(pipe->flags & UV_HANDLE_READ_PENDING);
-
- /* If there are many packets coming off the iocp then the timer callback */
- /* may be called before the read request is coming off the queue. */
- /* Therefore we check here if the read request has completed but will */
- /* be processed later. */
- if ((pipe->flags & UV_HANDLE_READ_PENDING) &&
- HasOverlappedIoCompleted(&pipe->read_req.u.io.overlapped)) {
- return;
- }
-
- /* Force both ends off the pipe. */
- close_pipe(pipe);
-
- /* Stop reading, so the pending read that is going to fail will */
- /* not be reported to the user. */
- uv_read_stop((uv_stream_t*) pipe);
-
- /* Report the eof and update flags. This will get reported even if the */
- /* user stopped reading in the meantime. TODO: is that okay? */
- uv_pipe_read_eof(loop, pipe, uv_null_buf_);
-}
-
-
-static void eof_timer_destroy(uv_pipe_t* pipe) {
- assert(pipe->flags & UV_HANDLE_CONNECTION);
-
- if (pipe->pipe.conn.eof_timer) {
- uv_close((uv_handle_t*) pipe->pipe.conn.eof_timer, eof_timer_close_cb);
- pipe->pipe.conn.eof_timer = NULL;
- }
-}
-
-
-static void eof_timer_close_cb(uv_handle_t* handle) {
- assert(handle->type == UV_TIMER);
- uv__free(handle);
-}
-
-
-int uv_pipe_open(uv_pipe_t* pipe, uv_file file) {
- HANDLE os_handle = uv__get_osfhandle(file);
- NTSTATUS nt_status;
- IO_STATUS_BLOCK io_status;
- FILE_ACCESS_INFORMATION access;
- DWORD duplex_flags = 0;
-
- if (os_handle == INVALID_HANDLE_VALUE)
- return UV_EBADF;
-
- /* In order to avoid closing a stdio file descriptor 0-2, duplicate the
- * underlying OS handle and forget about the original fd.
- * We could also opt to use the original OS handle and just never close it,
- * but then there would be no reliable way to cancel pending read operations
- * upon close.
- */
- if (file <= 2) {
- if (!DuplicateHandle(INVALID_HANDLE_VALUE,
- os_handle,
- INVALID_HANDLE_VALUE,
- &os_handle,
- 0,
- FALSE,
- DUPLICATE_SAME_ACCESS))
- return uv_translate_sys_error(GetLastError());
- file = -1;
- }
-
- /* Determine what kind of permissions we have on this handle.
- * Cygwin opens the pipe in message mode, but we can support it,
- * just query the access flags and set the stream flags accordingly.
- */
- nt_status = pNtQueryInformationFile(os_handle,
- &io_status,
- &access,
- sizeof(access),
- FileAccessInformation);
- if (nt_status != STATUS_SUCCESS)
- return UV_EINVAL;
-
- if (pipe->ipc) {
- if (!(access.AccessFlags & FILE_WRITE_DATA) ||
- !(access.AccessFlags & FILE_READ_DATA)) {
- return UV_EINVAL;
- }
- }
-
- if (access.AccessFlags & FILE_WRITE_DATA)
- duplex_flags |= UV_HANDLE_WRITABLE;
- if (access.AccessFlags & FILE_READ_DATA)
- duplex_flags |= UV_HANDLE_READABLE;
-
- if (os_handle == INVALID_HANDLE_VALUE ||
- uv_set_pipe_handle(pipe->loop,
- pipe,
- os_handle,
- file,
- duplex_flags) == -1) {
- return UV_EINVAL;
- }
-
- uv_pipe_connection_init(pipe);
-
- if (pipe->ipc) {
- assert(!(pipe->flags & UV_HANDLE_NON_OVERLAPPED_PIPE));
- pipe->pipe.conn.ipc_pid = uv_parent_pid();
- assert(pipe->pipe.conn.ipc_pid != -1);
- }
- return 0;
-}
-
-
-static int uv__pipe_getname(const uv_pipe_t* handle, char* buffer, size_t* size) {
- NTSTATUS nt_status;
- IO_STATUS_BLOCK io_status;
- FILE_NAME_INFORMATION tmp_name_info;
- FILE_NAME_INFORMATION* name_info;
- WCHAR* name_buf;
- unsigned int addrlen;
- unsigned int name_size;
- unsigned int name_len;
- int err;
-
- name_info = NULL;
-
- if (handle->handle == INVALID_HANDLE_VALUE) {
- *size = 0;
- return UV_EINVAL;
- }
-
- uv__pipe_pause_read((uv_pipe_t*)handle); /* cast away const warning */
-
- nt_status = pNtQueryInformationFile(handle->handle,
- &io_status,
- &tmp_name_info,
- sizeof tmp_name_info,
- FileNameInformation);
- if (nt_status == STATUS_BUFFER_OVERFLOW) {
- name_size = sizeof(*name_info) + tmp_name_info.FileNameLength;
- name_info = uv__malloc(name_size);
- if (!name_info) {
- *size = 0;
- err = UV_ENOMEM;
- goto cleanup;
- }
-
- nt_status = pNtQueryInformationFile(handle->handle,
- &io_status,
- name_info,
- name_size,
- FileNameInformation);
- }
-
- if (nt_status != STATUS_SUCCESS) {
- *size = 0;
- err = uv_translate_sys_error(pRtlNtStatusToDosError(nt_status));
- goto error;
- }
-
- if (!name_info) {
- /* the struct on stack was used */
- name_buf = tmp_name_info.FileName;
- name_len = tmp_name_info.FileNameLength;
- } else {
- name_buf = name_info->FileName;
- name_len = name_info->FileNameLength;
- }
-
- if (name_len == 0) {
- *size = 0;
- err = 0;
- goto error;
- }
-
- name_len /= sizeof(WCHAR);
-
- /* check how much space we need */
- addrlen = WideCharToMultiByte(CP_UTF8,
- 0,
- name_buf,
- name_len,
- NULL,
- 0,
- NULL,
- NULL);
- if (!addrlen) {
- *size = 0;
- err = uv_translate_sys_error(GetLastError());
- goto error;
- } else if (pipe_prefix_len + addrlen > *size) {
- /* "\\\\.\\pipe" + name */
- *size = pipe_prefix_len + addrlen;
- err = UV_ENOBUFS;
- goto error;
- }
-
- memcpy(buffer, pipe_prefix, pipe_prefix_len);
- addrlen = WideCharToMultiByte(CP_UTF8,
- 0,
- name_buf,
- name_len,
- buffer+pipe_prefix_len,
- *size-pipe_prefix_len,
- NULL,
- NULL);
- if (!addrlen) {
- *size = 0;
- err = uv_translate_sys_error(GetLastError());
- goto error;
- }
-
- addrlen += pipe_prefix_len;
- *size = addrlen;
-
- err = 0;
- goto cleanup;
-
-error:
- uv__free(name_info);
-
-cleanup:
- uv__pipe_unpause_read((uv_pipe_t*)handle); /* cast away const warning */
- return err;
-}
-
-
-int uv_pipe_pending_count(uv_pipe_t* handle) {
- if (!handle->ipc)
- return 0;
- return handle->pipe.conn.pending_ipc_info.queue_len;
-}
-
-
-int uv_pipe_getsockname(const uv_pipe_t* handle, char* buffer, size_t* size) {
- if (handle->flags & UV_HANDLE_BOUND)
- return uv__pipe_getname(handle, buffer, size);
-
- if (handle->flags & UV_HANDLE_CONNECTION ||
- handle->handle != INVALID_HANDLE_VALUE) {
- *size = 0;
- return 0;
- }
-
- return UV_EBADF;
-}
-
-
-int uv_pipe_getpeername(const uv_pipe_t* handle, char* buffer, size_t* size) {
- /* emulate unix behaviour */
- if (handle->flags & UV_HANDLE_BOUND)
- return UV_ENOTCONN;
-
- if (handle->handle != INVALID_HANDLE_VALUE)
- return uv__pipe_getname(handle, buffer, size);
-
- return UV_EBADF;
-}
-
-
-uv_handle_type uv_pipe_pending_type(uv_pipe_t* handle) {
- if (!handle->ipc)
- return UV_UNKNOWN_HANDLE;
- if (handle->pipe.conn.pending_ipc_info.queue_len == 0)
- return UV_UNKNOWN_HANDLE;
- else
- return UV_TCP;
-}
diff --git a/3rdparty/libuv/src/win/poll.c b/3rdparty/libuv/src/win/poll.c
deleted file mode 100644
index ce861d6ffc4..00000000000
--- a/3rdparty/libuv/src/win/poll.c
+++ /dev/null
@@ -1,635 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include <assert.h>
-#include <io.h>
-
-#include "uv.h"
-#include "internal.h"
-#include "handle-inl.h"
-#include "req-inl.h"
-
-
-static const GUID uv_msafd_provider_ids[UV_MSAFD_PROVIDER_COUNT] = {
- {0xe70f1aa0, 0xab8b, 0x11cf,
- {0x8c, 0xa3, 0x00, 0x80, 0x5f, 0x48, 0xa1, 0x92}},
- {0xf9eab0c0, 0x26d4, 0x11d0,
- {0xbb, 0xbf, 0x00, 0xaa, 0x00, 0x6c, 0x34, 0xe4}},
- {0x9fc48064, 0x7298, 0x43e4,
- {0xb7, 0xbd, 0x18, 0x1f, 0x20, 0x89, 0x79, 0x2a}}
-};
-
-typedef struct uv_single_fd_set_s {
- unsigned int fd_count;
- SOCKET fd_array[1];
-} uv_single_fd_set_t;
-
-
-static OVERLAPPED overlapped_dummy_;
-static uv_once_t overlapped_dummy_init_guard_ = UV_ONCE_INIT;
-
-static AFD_POLL_INFO afd_poll_info_dummy_;
-
-
-static void uv__init_overlapped_dummy(void) {
- HANDLE event;
-
- event = CreateEvent(NULL, TRUE, TRUE, NULL);
- if (event == NULL)
- uv_fatal_error(GetLastError(), "CreateEvent");
-
- memset(&overlapped_dummy_, 0, sizeof overlapped_dummy_);
- overlapped_dummy_.hEvent = (HANDLE) ((uintptr_t) event | 1);
-}
-
-
-static OVERLAPPED* uv__get_overlapped_dummy() {
- uv_once(&overlapped_dummy_init_guard_, uv__init_overlapped_dummy);
- return &overlapped_dummy_;
-}
-
-
-static AFD_POLL_INFO* uv__get_afd_poll_info_dummy() {
- return &afd_poll_info_dummy_;
-}
-
-
-static void uv__fast_poll_submit_poll_req(uv_loop_t* loop, uv_poll_t* handle) {
- uv_req_t* req;
- AFD_POLL_INFO* afd_poll_info;
- DWORD result;
-
- /* Find a yet unsubmitted req to submit. */
- if (handle->submitted_events_1 == 0) {
- req = &handle->poll_req_1;
- afd_poll_info = &handle->afd_poll_info_1;
- handle->submitted_events_1 = handle->events;
- handle->mask_events_1 = 0;
- handle->mask_events_2 = handle->events;
- } else if (handle->submitted_events_2 == 0) {
- req = &handle->poll_req_2;
- afd_poll_info = &handle->afd_poll_info_2;
- handle->submitted_events_2 = handle->events;
- handle->mask_events_1 = handle->events;
- handle->mask_events_2 = 0;
- } else {
- assert(0);
- return;
- }
-
- /* Setting Exclusive to TRUE makes the other poll request return if there */
- /* is any. */
- afd_poll_info->Exclusive = TRUE;
- afd_poll_info->NumberOfHandles = 1;
- afd_poll_info->Timeout.QuadPart = INT64_MAX;
- afd_poll_info->Handles[0].Handle = (HANDLE) handle->socket;
- afd_poll_info->Handles[0].Status = 0;
- afd_poll_info->Handles[0].Events = 0;
-
- if (handle->events & UV_READABLE) {
- afd_poll_info->Handles[0].Events |= AFD_POLL_RECEIVE |
- AFD_POLL_DISCONNECT | AFD_POLL_ACCEPT | AFD_POLL_ABORT;
- }
- if (handle->events & UV_WRITABLE) {
- afd_poll_info->Handles[0].Events |= AFD_POLL_SEND | AFD_POLL_CONNECT_FAIL;
- }
-
- memset(&req->u.io.overlapped, 0, sizeof req->u.io.overlapped);
-
- result = uv_msafd_poll((SOCKET) handle->peer_socket,
- afd_poll_info,
- afd_poll_info,
- &req->u.io.overlapped);
- if (result != 0 && WSAGetLastError() != WSA_IO_PENDING) {
- /* Queue this req, reporting an error. */
- SET_REQ_ERROR(req, WSAGetLastError());
- uv_insert_pending_req(loop, req);
- }
-}
-
-
-static int uv__fast_poll_cancel_poll_req(uv_loop_t* loop, uv_poll_t* handle) {
- AFD_POLL_INFO afd_poll_info;
- DWORD result;
-
- afd_poll_info.Exclusive = TRUE;
- afd_poll_info.NumberOfHandles = 1;
- afd_poll_info.Timeout.QuadPart = INT64_MAX;
- afd_poll_info.Handles[0].Handle = (HANDLE) handle->socket;
- afd_poll_info.Handles[0].Status = 0;
- afd_poll_info.Handles[0].Events = AFD_POLL_ALL;
-
- result = uv_msafd_poll(handle->socket,
- &afd_poll_info,
- uv__get_afd_poll_info_dummy(),
- uv__get_overlapped_dummy());
-
- if (result == SOCKET_ERROR) {
- DWORD error = WSAGetLastError();
- if (error != WSA_IO_PENDING)
- return error;
- }
-
- return 0;
-}
-
-
-static void uv__fast_poll_process_poll_req(uv_loop_t* loop, uv_poll_t* handle,
- uv_req_t* req) {
- unsigned char mask_events;
- AFD_POLL_INFO* afd_poll_info;
-
- if (req == &handle->poll_req_1) {
- afd_poll_info = &handle->afd_poll_info_1;
- handle->submitted_events_1 = 0;
- mask_events = handle->mask_events_1;
- } else if (req == &handle->poll_req_2) {
- afd_poll_info = &handle->afd_poll_info_2;
- handle->submitted_events_2 = 0;
- mask_events = handle->mask_events_2;
- } else {
- assert(0);
- return;
- }
-
- /* Report an error unless the select was just interrupted. */
- if (!REQ_SUCCESS(req)) {
- DWORD error = GET_REQ_SOCK_ERROR(req);
- if (error != WSAEINTR && handle->events != 0) {
- handle->events = 0; /* Stop the watcher */
- handle->poll_cb(handle, uv_translate_sys_error(error), 0);
- }
-
- } else if (afd_poll_info->NumberOfHandles >= 1) {
- unsigned char events = 0;
-
- if ((afd_poll_info->Handles[0].Events & (AFD_POLL_RECEIVE |
- AFD_POLL_DISCONNECT | AFD_POLL_ACCEPT | AFD_POLL_ABORT)) != 0) {
- events |= UV_READABLE;
- }
- if ((afd_poll_info->Handles[0].Events & (AFD_POLL_SEND |
- AFD_POLL_CONNECT_FAIL)) != 0) {
- events |= UV_WRITABLE;
- }
-
- events &= handle->events & ~mask_events;
-
- if (afd_poll_info->Handles[0].Events & AFD_POLL_LOCAL_CLOSE) {
- /* Stop polling. */
- handle->events = 0;
- if (uv__is_active(handle))
- uv__handle_stop(handle);
- }
-
- if (events != 0) {
- handle->poll_cb(handle, 0, events);
- }
- }
-
- if ((handle->events & ~(handle->submitted_events_1 |
- handle->submitted_events_2)) != 0) {
- uv__fast_poll_submit_poll_req(loop, handle);
- } else if ((handle->flags & UV__HANDLE_CLOSING) &&
- handle->submitted_events_1 == 0 &&
- handle->submitted_events_2 == 0) {
- uv_want_endgame(loop, (uv_handle_t*) handle);
- }
-}
-
-
-static int uv__fast_poll_set(uv_loop_t* loop, uv_poll_t* handle, int events) {
- assert(handle->type == UV_POLL);
- assert(!(handle->flags & UV__HANDLE_CLOSING));
- assert((events & ~(UV_READABLE | UV_WRITABLE)) == 0);
-
- handle->events = events;
-
- if (handle->events != 0) {
- uv__handle_start(handle);
- } else {
- uv__handle_stop(handle);
- }
-
- if ((handle->events & ~(handle->submitted_events_1 |
- handle->submitted_events_2)) != 0) {
- uv__fast_poll_submit_poll_req(handle->loop, handle);
- }
-
- return 0;
-}
-
-
-static int uv__fast_poll_close(uv_loop_t* loop, uv_poll_t* handle) {
- handle->events = 0;
- uv__handle_closing(handle);
-
- if (handle->submitted_events_1 == 0 &&
- handle->submitted_events_2 == 0) {
- uv_want_endgame(loop, (uv_handle_t*) handle);
- return 0;
- } else {
- /* Cancel outstanding poll requests by executing another, unique poll */
- /* request that forces the outstanding ones to return. */
- return uv__fast_poll_cancel_poll_req(loop, handle);
- }
-}
-
-
-static SOCKET uv__fast_poll_create_peer_socket(HANDLE iocp,
- WSAPROTOCOL_INFOW* protocol_info) {
- SOCKET sock = 0;
-
- sock = WSASocketW(protocol_info->iAddressFamily,
- protocol_info->iSocketType,
- protocol_info->iProtocol,
- protocol_info,
- 0,
- WSA_FLAG_OVERLAPPED);
- if (sock == INVALID_SOCKET) {
- return INVALID_SOCKET;
- }
-
- if (!SetHandleInformation((HANDLE) sock, HANDLE_FLAG_INHERIT, 0)) {
- goto error;
- };
-
- if (CreateIoCompletionPort((HANDLE) sock,
- iocp,
- (ULONG_PTR) sock,
- 0) == NULL) {
- goto error;
- }
-
- return sock;
-
- error:
- closesocket(sock);
- return INVALID_SOCKET;
-}
-
-
-static SOCKET uv__fast_poll_get_peer_socket(uv_loop_t* loop,
- WSAPROTOCOL_INFOW* protocol_info) {
- int index, i;
- SOCKET peer_socket;
-
- index = -1;
- for (i = 0; (size_t) i < ARRAY_SIZE(uv_msafd_provider_ids); i++) {
- if (memcmp((void*) &protocol_info->ProviderId,
- (void*) &uv_msafd_provider_ids[i],
- sizeof protocol_info->ProviderId) == 0) {
- index = i;
- }
- }
-
- /* Check if the protocol uses an msafd socket. */
- if (index < 0) {
- return INVALID_SOCKET;
- }
-
- /* If we didn't (try) to create a peer socket yet, try to make one. Don't */
- /* try again if the peer socket creation failed earlier for the same */
- /* protocol. */
- peer_socket = loop->poll_peer_sockets[index];
- if (peer_socket == 0) {
- peer_socket = uv__fast_poll_create_peer_socket(loop->iocp, protocol_info);
- loop->poll_peer_sockets[index] = peer_socket;
- }
-
- return peer_socket;
-}
-
-
-static DWORD WINAPI uv__slow_poll_thread_proc(void* arg) {
- uv_req_t* req = (uv_req_t*) arg;
- uv_poll_t* handle = (uv_poll_t*) req->data;
- unsigned char reported_events;
- int r;
- uv_single_fd_set_t rfds, wfds, efds;
- struct timeval timeout;
-
- assert(handle->type == UV_POLL);
- assert(req->type == UV_POLL_REQ);
-
- if (handle->events & UV_READABLE) {
- rfds.fd_count = 1;
- rfds.fd_array[0] = handle->socket;
- } else {
- rfds.fd_count = 0;
- }
-
- if (handle->events & UV_WRITABLE) {
- wfds.fd_count = 1;
- wfds.fd_array[0] = handle->socket;
- efds.fd_count = 1;
- efds.fd_array[0] = handle->socket;
- } else {
- wfds.fd_count = 0;
- efds.fd_count = 0;
- }
-
- /* Make the select() time out after 3 minutes. If select() hangs because */
- /* the user closed the socket, we will at least not hang indefinitely. */
- timeout.tv_sec = 3 * 60;
- timeout.tv_usec = 0;
-
- r = select(1, (fd_set*) &rfds, (fd_set*) &wfds, (fd_set*) &efds, &timeout);
- if (r == SOCKET_ERROR) {
- /* Queue this req, reporting an error. */
- SET_REQ_ERROR(&handle->poll_req_1, WSAGetLastError());
- POST_COMPLETION_FOR_REQ(handle->loop, req);
- return 0;
- }
-
- reported_events = 0;
-
- if (r > 0) {
- if (rfds.fd_count > 0) {
- assert(rfds.fd_count == 1);
- assert(rfds.fd_array[0] == handle->socket);
- reported_events |= UV_READABLE;
- }
-
- if (wfds.fd_count > 0) {
- assert(wfds.fd_count == 1);
- assert(wfds.fd_array[0] == handle->socket);
- reported_events |= UV_WRITABLE;
- } else if (efds.fd_count > 0) {
- assert(efds.fd_count == 1);
- assert(efds.fd_array[0] == handle->socket);
- reported_events |= UV_WRITABLE;
- }
- }
-
- SET_REQ_SUCCESS(req);
- req->u.io.overlapped.InternalHigh = (DWORD) reported_events;
- POST_COMPLETION_FOR_REQ(handle->loop, req);
-
- return 0;
-}
-
-
-static void uv__slow_poll_submit_poll_req(uv_loop_t* loop, uv_poll_t* handle) {
- uv_req_t* req;
-
- /* Find a yet unsubmitted req to submit. */
- if (handle->submitted_events_1 == 0) {
- req = &handle->poll_req_1;
- handle->submitted_events_1 = handle->events;
- handle->mask_events_1 = 0;
- handle->mask_events_2 = handle->events;
- } else if (handle->submitted_events_2 == 0) {
- req = &handle->poll_req_2;
- handle->submitted_events_2 = handle->events;
- handle->mask_events_1 = handle->events;
- handle->mask_events_2 = 0;
- } else {
- assert(0);
- return;
- }
-
- if (!QueueUserWorkItem(uv__slow_poll_thread_proc,
- (void*) req,
- WT_EXECUTELONGFUNCTION)) {
- /* Make this req pending, reporting an error. */
- SET_REQ_ERROR(req, GetLastError());
- uv_insert_pending_req(loop, req);
- }
-}
-
-
-
-static void uv__slow_poll_process_poll_req(uv_loop_t* loop, uv_poll_t* handle,
- uv_req_t* req) {
- unsigned char mask_events;
- int err;
-
- if (req == &handle->poll_req_1) {
- handle->submitted_events_1 = 0;
- mask_events = handle->mask_events_1;
- } else if (req == &handle->poll_req_2) {
- handle->submitted_events_2 = 0;
- mask_events = handle->mask_events_2;
- } else {
- assert(0);
- return;
- }
-
- if (!REQ_SUCCESS(req)) {
- /* Error. */
- if (handle->events != 0) {
- err = GET_REQ_ERROR(req);
- handle->events = 0; /* Stop the watcher */
- handle->poll_cb(handle, uv_translate_sys_error(err), 0);
- }
- } else {
- /* Got some events. */
- int events = req->u.io.overlapped.InternalHigh & handle->events & ~mask_events;
- if (events != 0) {
- handle->poll_cb(handle, 0, events);
- }
- }
-
- if ((handle->events & ~(handle->submitted_events_1 |
- handle->submitted_events_2)) != 0) {
- uv__slow_poll_submit_poll_req(loop, handle);
- } else if ((handle->flags & UV__HANDLE_CLOSING) &&
- handle->submitted_events_1 == 0 &&
- handle->submitted_events_2 == 0) {
- uv_want_endgame(loop, (uv_handle_t*) handle);
- }
-}
-
-
-static int uv__slow_poll_set(uv_loop_t* loop, uv_poll_t* handle, int events) {
- assert(handle->type == UV_POLL);
- assert(!(handle->flags & UV__HANDLE_CLOSING));
- assert((events & ~(UV_READABLE | UV_WRITABLE)) == 0);
-
- handle->events = events;
-
- if (handle->events != 0) {
- uv__handle_start(handle);
- } else {
- uv__handle_stop(handle);
- }
-
- if ((handle->events &
- ~(handle->submitted_events_1 | handle->submitted_events_2)) != 0) {
- uv__slow_poll_submit_poll_req(handle->loop, handle);
- }
-
- return 0;
-}
-
-
-static int uv__slow_poll_close(uv_loop_t* loop, uv_poll_t* handle) {
- handle->events = 0;
- uv__handle_closing(handle);
-
- if (handle->submitted_events_1 == 0 &&
- handle->submitted_events_2 == 0) {
- uv_want_endgame(loop, (uv_handle_t*) handle);
- }
-
- return 0;
-}
-
-
-int uv_poll_init(uv_loop_t* loop, uv_poll_t* handle, int fd) {
- return uv_poll_init_socket(loop, handle, (SOCKET) uv__get_osfhandle(fd));
-}
-
-
-int uv_poll_init_socket(uv_loop_t* loop, uv_poll_t* handle,
- uv_os_sock_t socket) {
- WSAPROTOCOL_INFOW protocol_info;
- int len;
- SOCKET peer_socket, base_socket;
- DWORD bytes;
- DWORD yes = 1;
-
- /* Set the socket to nonblocking mode */
- if (ioctlsocket(socket, FIONBIO, &yes) == SOCKET_ERROR)
- return uv_translate_sys_error(WSAGetLastError());
-
- /* Try to obtain a base handle for the socket. This increases this chances */
- /* that we find an AFD handle and are able to use the fast poll mechanism. */
- /* This will always fail on windows XP/2k3, since they don't support the */
- /* SIO_BASE_HANDLE ioctl. */
-#ifndef NDEBUG
- base_socket = INVALID_SOCKET;
-#endif
-
- if (WSAIoctl(socket,
- SIO_BASE_HANDLE,
- NULL,
- 0,
- &base_socket,
- sizeof base_socket,
- &bytes,
- NULL,
- NULL) == 0) {
- assert(base_socket != 0 && base_socket != INVALID_SOCKET);
- socket = base_socket;
- }
-
- uv__handle_init(loop, (uv_handle_t*) handle, UV_POLL);
- handle->socket = socket;
- handle->events = 0;
-
- /* Obtain protocol information about the socket. */
- len = sizeof protocol_info;
- if (getsockopt(socket,
- SOL_SOCKET,
- SO_PROTOCOL_INFOW,
- (char*) &protocol_info,
- &len) != 0) {
- return uv_translate_sys_error(WSAGetLastError());
- }
-
- /* Get the peer socket that is needed to enable fast poll. If the returned */
- /* value is NULL, the protocol is not implemented by MSAFD and we'll have */
- /* to use slow mode. */
- peer_socket = uv__fast_poll_get_peer_socket(loop, &protocol_info);
-
- if (peer_socket != INVALID_SOCKET) {
- /* Initialize fast poll specific fields. */
- handle->peer_socket = peer_socket;
- } else {
- /* Initialize slow poll specific fields. */
- handle->flags |= UV_HANDLE_POLL_SLOW;
- }
-
- /* Initialize 2 poll reqs. */
- handle->submitted_events_1 = 0;
- uv_req_init(loop, (uv_req_t*) &(handle->poll_req_1));
- handle->poll_req_1.type = UV_POLL_REQ;
- handle->poll_req_1.data = handle;
-
- handle->submitted_events_2 = 0;
- uv_req_init(loop, (uv_req_t*) &(handle->poll_req_2));
- handle->poll_req_2.type = UV_POLL_REQ;
- handle->poll_req_2.data = handle;
-
- return 0;
-}
-
-
-int uv_poll_start(uv_poll_t* handle, int events, uv_poll_cb cb) {
- int err;
-
- if (!(handle->flags & UV_HANDLE_POLL_SLOW)) {
- err = uv__fast_poll_set(handle->loop, handle, events);
- } else {
- err = uv__slow_poll_set(handle->loop, handle, events);
- }
-
- if (err) {
- return uv_translate_sys_error(err);
- }
-
- handle->poll_cb = cb;
-
- return 0;
-}
-
-
-int uv_poll_stop(uv_poll_t* handle) {
- int err;
-
- if (!(handle->flags & UV_HANDLE_POLL_SLOW)) {
- err = uv__fast_poll_set(handle->loop, handle, 0);
- } else {
- err = uv__slow_poll_set(handle->loop, handle, 0);
- }
-
- return uv_translate_sys_error(err);
-}
-
-
-void uv_process_poll_req(uv_loop_t* loop, uv_poll_t* handle, uv_req_t* req) {
- if (!(handle->flags & UV_HANDLE_POLL_SLOW)) {
- uv__fast_poll_process_poll_req(loop, handle, req);
- } else {
- uv__slow_poll_process_poll_req(loop, handle, req);
- }
-}
-
-
-int uv_poll_close(uv_loop_t* loop, uv_poll_t* handle) {
- if (!(handle->flags & UV_HANDLE_POLL_SLOW)) {
- return uv__fast_poll_close(loop, handle);
- } else {
- return uv__slow_poll_close(loop, handle);
- }
-}
-
-
-void uv_poll_endgame(uv_loop_t* loop, uv_poll_t* handle) {
- assert(handle->flags & UV__HANDLE_CLOSING);
- assert(!(handle->flags & UV_HANDLE_CLOSED));
-
- assert(handle->submitted_events_1 == 0);
- assert(handle->submitted_events_2 == 0);
-
- uv__handle_close(handle);
-}
diff --git a/3rdparty/libuv/src/win/process-stdio.c b/3rdparty/libuv/src/win/process-stdio.c
deleted file mode 100644
index e3c06f57dea..00000000000
--- a/3rdparty/libuv/src/win/process-stdio.c
+++ /dev/null
@@ -1,510 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include <assert.h>
-#include <io.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "uv.h"
-#include "internal.h"
-#include "handle-inl.h"
-
-
-/*
- * The `child_stdio_buffer` buffer has the following layout:
- * int number_of_fds
- * unsigned char crt_flags[number_of_fds]
- * HANDLE os_handle[number_of_fds]
- */
-#define CHILD_STDIO_SIZE(count) \
- (sizeof(int) + \
- sizeof(unsigned char) * (count) + \
- sizeof(uintptr_t) * (count))
-
-#define CHILD_STDIO_COUNT(buffer) \
- *((unsigned int*) (buffer))
-
-#define CHILD_STDIO_CRT_FLAGS(buffer, fd) \
- *((unsigned char*) (buffer) + sizeof(int) + fd)
-
-#define CHILD_STDIO_HANDLE(buffer, fd) \
- *((HANDLE*) ((unsigned char*) (buffer) + \
- sizeof(int) + \
- sizeof(unsigned char) * \
- CHILD_STDIO_COUNT((buffer)) + \
- sizeof(HANDLE) * (fd)))
-
-
-/* CRT file descriptor mode flags */
-#define FOPEN 0x01
-#define FEOFLAG 0x02
-#define FCRLF 0x04
-#define FPIPE 0x08
-#define FNOINHERIT 0x10
-#define FAPPEND 0x20
-#define FDEV 0x40
-#define FTEXT 0x80
-
-
-/*
- * Clear the HANDLE_FLAG_INHERIT flag from all HANDLEs that were inherited
- * the parent process. Don't check for errors - the stdio handles may not be
- * valid, or may be closed already. There is no guarantee that this function
- * does a perfect job.
- */
-void uv_disable_stdio_inheritance(void) {
- HANDLE handle;
- STARTUPINFOW si;
-
- /* Make the windows stdio handles non-inheritable. */
- handle = GetStdHandle(STD_INPUT_HANDLE);
- if (handle != NULL && handle != INVALID_HANDLE_VALUE)
- SetHandleInformation(handle, HANDLE_FLAG_INHERIT, 0);
-
- handle = GetStdHandle(STD_OUTPUT_HANDLE);
- if (handle != NULL && handle != INVALID_HANDLE_VALUE)
- SetHandleInformation(handle, HANDLE_FLAG_INHERIT, 0);
-
- handle = GetStdHandle(STD_ERROR_HANDLE);
- if (handle != NULL && handle != INVALID_HANDLE_VALUE)
- SetHandleInformation(handle, HANDLE_FLAG_INHERIT, 0);
-
- /* Make inherited CRT FDs non-inheritable. */
- GetStartupInfoW(&si);
- if (uv__stdio_verify(si.lpReserved2, si.cbReserved2))
- uv__stdio_noinherit(si.lpReserved2);
-}
-
-
-static int uv__create_stdio_pipe_pair(uv_loop_t* loop,
- uv_pipe_t* server_pipe, HANDLE* child_pipe_ptr, unsigned int flags) {
- char pipe_name[64];
- SECURITY_ATTRIBUTES sa;
- DWORD server_access = 0;
- DWORD client_access = 0;
- HANDLE child_pipe = INVALID_HANDLE_VALUE;
- int err;
-
- if (flags & UV_READABLE_PIPE) {
- /* The server needs inbound access too, otherwise CreateNamedPipe() */
- /* won't give us the FILE_READ_ATTRIBUTES permission. We need that to */
- /* probe the state of the write buffer when we're trying to shutdown */
- /* the pipe. */
- server_access |= PIPE_ACCESS_OUTBOUND | PIPE_ACCESS_INBOUND;
- client_access |= GENERIC_READ | FILE_WRITE_ATTRIBUTES;
- }
- if (flags & UV_WRITABLE_PIPE) {
- server_access |= PIPE_ACCESS_INBOUND;
- client_access |= GENERIC_WRITE | FILE_READ_ATTRIBUTES;
- }
-
- /* Create server pipe handle. */
- err = uv_stdio_pipe_server(loop,
- server_pipe,
- server_access,
- pipe_name,
- sizeof(pipe_name));
- if (err)
- goto error;
-
- /* Create child pipe handle. */
- sa.nLength = sizeof sa;
- sa.lpSecurityDescriptor = NULL;
- sa.bInheritHandle = TRUE;
-
- child_pipe = CreateFileA(pipe_name,
- client_access,
- 0,
- &sa,
- OPEN_EXISTING,
- server_pipe->ipc ? FILE_FLAG_OVERLAPPED : 0,
- NULL);
- if (child_pipe == INVALID_HANDLE_VALUE) {
- err = GetLastError();
- goto error;
- }
-
-#ifndef NDEBUG
- /* Validate that the pipe was opened in the right mode. */
- {
- DWORD mode;
- BOOL r = GetNamedPipeHandleState(child_pipe,
- &mode,
- NULL,
- NULL,
- NULL,
- NULL,
- 0);
- assert(r == TRUE);
- assert(mode == (PIPE_READMODE_BYTE | PIPE_WAIT));
- }
-#endif
-
- /* Do a blocking ConnectNamedPipe. This should not block because we have */
- /* both ends of the pipe created. */
- if (!ConnectNamedPipe(server_pipe->handle, NULL)) {
- if (GetLastError() != ERROR_PIPE_CONNECTED) {
- err = GetLastError();
- goto error;
- }
- }
-
- /* The server end is now readable and/or writable. */
- if (flags & UV_READABLE_PIPE)
- server_pipe->flags |= UV_HANDLE_WRITABLE;
- if (flags & UV_WRITABLE_PIPE)
- server_pipe->flags |= UV_HANDLE_READABLE;
-
- *child_pipe_ptr = child_pipe;
- return 0;
-
- error:
- if (server_pipe->handle != INVALID_HANDLE_VALUE) {
- uv_pipe_cleanup(loop, server_pipe);
- }
-
- if (child_pipe != INVALID_HANDLE_VALUE) {
- CloseHandle(child_pipe);
- }
-
- return err;
-}
-
-
-static int uv__duplicate_handle(uv_loop_t* loop, HANDLE handle, HANDLE* dup) {
- HANDLE current_process;
-
-
- /* _get_osfhandle will sometimes return -2 in case of an error. This seems */
- /* to happen when fd <= 2 and the process' corresponding stdio handle is */
- /* set to NULL. Unfortunately DuplicateHandle will happily duplicate */
- /* (HANDLE) -2, so this situation goes unnoticed until someone tries to */
- /* use the duplicate. Therefore we filter out known-invalid handles here. */
- if (handle == INVALID_HANDLE_VALUE ||
- handle == NULL ||
- handle == (HANDLE) -2) {
- *dup = INVALID_HANDLE_VALUE;
- return ERROR_INVALID_HANDLE;
- }
-
- current_process = GetCurrentProcess();
-
- if (!DuplicateHandle(current_process,
- handle,
- current_process,
- dup,
- 0,
- TRUE,
- DUPLICATE_SAME_ACCESS)) {
- *dup = INVALID_HANDLE_VALUE;
- return GetLastError();
- }
-
- return 0;
-}
-
-
-static int uv__duplicate_fd(uv_loop_t* loop, int fd, HANDLE* dup) {
- HANDLE handle;
-
- if (fd == -1) {
- *dup = INVALID_HANDLE_VALUE;
- return ERROR_INVALID_HANDLE;
- }
-
- handle = uv__get_osfhandle(fd);
- return uv__duplicate_handle(loop, handle, dup);
-}
-
-
-int uv__create_nul_handle(HANDLE* handle_ptr,
- DWORD access) {
- HANDLE handle;
- SECURITY_ATTRIBUTES sa;
-
- sa.nLength = sizeof sa;
- sa.lpSecurityDescriptor = NULL;
- sa.bInheritHandle = TRUE;
-
- handle = CreateFileW(L"NUL",
- access,
- FILE_SHARE_READ | FILE_SHARE_WRITE,
- &sa,
- OPEN_EXISTING,
- 0,
- NULL);
- if (handle == INVALID_HANDLE_VALUE) {
- return GetLastError();
- }
-
- *handle_ptr = handle;
- return 0;
-}
-
-
-int uv__stdio_create(uv_loop_t* loop,
- const uv_process_options_t* options,
- BYTE** buffer_ptr) {
- BYTE* buffer;
- int count, i;
- int err;
-
- count = options->stdio_count;
-
- if (count < 0 || count > 255) {
- /* Only support FDs 0-255 */
- return ERROR_NOT_SUPPORTED;
- } else if (count < 3) {
- /* There should always be at least 3 stdio handles. */
- count = 3;
- }
-
- /* Allocate the child stdio buffer */
- buffer = (BYTE*) uv__malloc(CHILD_STDIO_SIZE(count));
- if (buffer == NULL) {
- return ERROR_OUTOFMEMORY;
- }
-
- /* Prepopulate the buffer with INVALID_HANDLE_VALUE handles so we can */
- /* clean up on failure. */
- CHILD_STDIO_COUNT(buffer) = count;
- for (i = 0; i < count; i++) {
- CHILD_STDIO_CRT_FLAGS(buffer, i) = 0;
- CHILD_STDIO_HANDLE(buffer, i) = INVALID_HANDLE_VALUE;
- }
-
- for (i = 0; i < count; i++) {
- uv_stdio_container_t fdopt;
- if (i < options->stdio_count) {
- fdopt = options->stdio[i];
- } else {
- fdopt.flags = UV_IGNORE;
- }
-
- switch (fdopt.flags & (UV_IGNORE | UV_CREATE_PIPE | UV_INHERIT_FD |
- UV_INHERIT_STREAM)) {
- case UV_IGNORE:
- /* Starting a process with no stdin/stout/stderr can confuse it. */
- /* So no matter what the user specified, we make sure the first */
- /* three FDs are always open in their typical modes, e.g. stdin */
- /* be readable and stdout/err should be writable. For FDs > 2, don't */
- /* do anything - all handles in the stdio buffer are initialized with */
- /* INVALID_HANDLE_VALUE, which should be okay. */
- if (i <= 2) {
- DWORD access = (i == 0) ? FILE_GENERIC_READ :
- FILE_GENERIC_WRITE | FILE_READ_ATTRIBUTES;
-
- err = uv__create_nul_handle(&CHILD_STDIO_HANDLE(buffer, i),
- access);
- if (err)
- goto error;
-
- CHILD_STDIO_CRT_FLAGS(buffer, i) = FOPEN | FDEV;
- }
- break;
-
- case UV_CREATE_PIPE: {
- /* Create a pair of two connected pipe ends; one end is turned into */
- /* an uv_pipe_t for use by the parent. The other one is given to */
- /* the child. */
- uv_pipe_t* parent_pipe = (uv_pipe_t*) fdopt.data.stream;
- HANDLE child_pipe = INVALID_HANDLE_VALUE;
-
- /* Create a new, connected pipe pair. stdio[i].stream should point */
- /* to an uninitialized, but not connected pipe handle. */
- assert(fdopt.data.stream->type == UV_NAMED_PIPE);
- assert(!(fdopt.data.stream->flags & UV_HANDLE_CONNECTION));
- assert(!(fdopt.data.stream->flags & UV_HANDLE_PIPESERVER));
-
- err = uv__create_stdio_pipe_pair(loop,
- parent_pipe,
- &child_pipe,
- fdopt.flags);
- if (err)
- goto error;
-
- CHILD_STDIO_HANDLE(buffer, i) = child_pipe;
- CHILD_STDIO_CRT_FLAGS(buffer, i) = FOPEN | FPIPE;
- break;
- }
-
- case UV_INHERIT_FD: {
- /* Inherit a raw FD. */
- HANDLE child_handle;
-
- /* Make an inheritable duplicate of the handle. */
- err = uv__duplicate_fd(loop, fdopt.data.fd, &child_handle);
- if (err) {
- /* If fdopt.data.fd is not valid and fd fd <= 2, then ignore the */
- /* error. */
- if (fdopt.data.fd <= 2 && err == ERROR_INVALID_HANDLE) {
- CHILD_STDIO_CRT_FLAGS(buffer, i) = 0;
- CHILD_STDIO_HANDLE(buffer, i) = INVALID_HANDLE_VALUE;
- break;
- }
- goto error;
- }
-
- /* Figure out what the type is. */
- switch (GetFileType(child_handle)) {
- case FILE_TYPE_DISK:
- CHILD_STDIO_CRT_FLAGS(buffer, i) = FOPEN;
- break;
-
- case FILE_TYPE_PIPE:
- CHILD_STDIO_CRT_FLAGS(buffer, i) = FOPEN | FPIPE;
-
- case FILE_TYPE_CHAR:
- case FILE_TYPE_REMOTE:
- CHILD_STDIO_CRT_FLAGS(buffer, i) = FOPEN | FDEV;
- break;
-
- case FILE_TYPE_UNKNOWN:
- if (GetLastError() != 0) {
- err = GetLastError();
- CloseHandle(child_handle);
- goto error;
- }
- CHILD_STDIO_CRT_FLAGS(buffer, i) = FOPEN | FDEV;
- break;
-
- default:
- assert(0);
- return -1;
- }
-
- CHILD_STDIO_HANDLE(buffer, i) = child_handle;
- break;
- }
-
- case UV_INHERIT_STREAM: {
- /* Use an existing stream as the stdio handle for the child. */
- HANDLE stream_handle, child_handle;
- unsigned char crt_flags;
- uv_stream_t* stream = fdopt.data.stream;
-
- /* Leech the handle out of the stream. */
- if (stream->type == UV_TTY) {
- stream_handle = ((uv_tty_t*) stream)->handle;
- crt_flags = FOPEN | FDEV;
- } else if (stream->type == UV_NAMED_PIPE &&
- stream->flags & UV_HANDLE_CONNECTION) {
- stream_handle = ((uv_pipe_t*) stream)->handle;
- crt_flags = FOPEN | FPIPE;
- } else {
- stream_handle = INVALID_HANDLE_VALUE;
- crt_flags = 0;
- }
-
- if (stream_handle == NULL ||
- stream_handle == INVALID_HANDLE_VALUE) {
- /* The handle is already closed, or not yet created, or the */
- /* stream type is not supported. */
- err = ERROR_NOT_SUPPORTED;
- goto error;
- }
-
- /* Make an inheritable copy of the handle. */
- err = uv__duplicate_handle(loop, stream_handle, &child_handle);
- if (err)
- goto error;
-
- CHILD_STDIO_HANDLE(buffer, i) = child_handle;
- CHILD_STDIO_CRT_FLAGS(buffer, i) = crt_flags;
- break;
- }
-
- default:
- assert(0);
- return -1;
- }
- }
-
- *buffer_ptr = buffer;
- return 0;
-
- error:
- uv__stdio_destroy(buffer);
- return err;
-}
-
-
-void uv__stdio_destroy(BYTE* buffer) {
- int i, count;
-
- count = CHILD_STDIO_COUNT(buffer);
- for (i = 0; i < count; i++) {
- HANDLE handle = CHILD_STDIO_HANDLE(buffer, i);
- if (handle != INVALID_HANDLE_VALUE) {
- CloseHandle(handle);
- }
- }
-
- uv__free(buffer);
-}
-
-
-void uv__stdio_noinherit(BYTE* buffer) {
- int i, count;
-
- count = CHILD_STDIO_COUNT(buffer);
- for (i = 0; i < count; i++) {
- HANDLE handle = CHILD_STDIO_HANDLE(buffer, i);
- if (handle != INVALID_HANDLE_VALUE) {
- SetHandleInformation(handle, HANDLE_FLAG_INHERIT, 0);
- }
- }
-}
-
-
-int uv__stdio_verify(BYTE* buffer, WORD size) {
- unsigned int count;
-
- /* Check the buffer pointer. */
- if (buffer == NULL)
- return 0;
-
- /* Verify that the buffer is at least big enough to hold the count. */
- if (size < CHILD_STDIO_SIZE(0))
- return 0;
-
- /* Verify if the count is within range. */
- count = CHILD_STDIO_COUNT(buffer);
- if (count > 256)
- return 0;
-
- /* Verify that the buffer size is big enough to hold info for N FDs. */
- if (size < CHILD_STDIO_SIZE(count))
- return 0;
-
- return 1;
-}
-
-
-WORD uv__stdio_size(BYTE* buffer) {
- return (WORD) CHILD_STDIO_SIZE(CHILD_STDIO_COUNT((buffer)));
-}
-
-
-HANDLE uv__stdio_handle(BYTE* buffer, int fd) {
- return CHILD_STDIO_HANDLE(buffer, fd);
-}
diff --git a/3rdparty/libuv/src/win/process.c b/3rdparty/libuv/src/win/process.c
deleted file mode 100644
index 855c3740816..00000000000
--- a/3rdparty/libuv/src/win/process.c
+++ /dev/null
@@ -1,1247 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include <assert.h>
-#include <io.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <limits.h>
-#include <wchar.h>
-#include <malloc.h> /* alloca */
-
-#include "uv.h"
-#include "internal.h"
-#include "handle-inl.h"
-#include "req-inl.h"
-
-
-#define SIGKILL 9
-
-
-typedef struct env_var {
- const WCHAR* const wide;
- const WCHAR* const wide_eq;
- const size_t len; /* including null or '=' */
-} env_var_t;
-
-#define E_V(str) { L##str, L##str L"=", sizeof(str) }
-
-static const env_var_t required_vars[] = { /* keep me sorted */
- E_V("HOMEDRIVE"),
- E_V("HOMEPATH"),
- E_V("LOGONSERVER"),
- E_V("PATH"),
- E_V("SYSTEMDRIVE"),
- E_V("SYSTEMROOT"),
- E_V("TEMP"),
- E_V("USERDOMAIN"),
- E_V("USERNAME"),
- E_V("USERPROFILE"),
- E_V("WINDIR"),
-};
-static size_t n_required_vars = ARRAY_SIZE(required_vars);
-
-
-static HANDLE uv_global_job_handle_;
-static uv_once_t uv_global_job_handle_init_guard_ = UV_ONCE_INIT;
-
-
-static void uv__init_global_job_handle(void) {
- /* Create a job object and set it up to kill all contained processes when
- * it's closed. Since this handle is made non-inheritable and we're not
- * giving it to anyone, we're the only process holding a reference to it.
- * That means that if this process exits it is closed and all the processes
- * it contains are killed. All processes created with uv_spawn that are not
- * spawned with the UV_PROCESS_DETACHED flag are assigned to this job.
- *
- * We're setting the JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK flag so only the
- * processes that we explicitly add are affected, and *their* subprocesses
- * are not. This ensures that our child processes are not limited in their
- * ability to use job control on Windows versions that don't deal with
- * nested jobs (prior to Windows 8 / Server 2012). It also lets our child
- * processes created detached processes without explicitly breaking away
- * from job control (which uv_spawn doesn't, either).
- */
- SECURITY_ATTRIBUTES attr;
- JOBOBJECT_EXTENDED_LIMIT_INFORMATION info;
-
- memset(&attr, 0, sizeof attr);
- attr.bInheritHandle = FALSE;
-
- memset(&info, 0, sizeof info);
- info.BasicLimitInformation.LimitFlags =
- JOB_OBJECT_LIMIT_BREAKAWAY_OK |
- JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK |
- JOB_OBJECT_LIMIT_DIE_ON_UNHANDLED_EXCEPTION |
- JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE;
-
- uv_global_job_handle_ = CreateJobObjectW(&attr, NULL);
- if (uv_global_job_handle_ == NULL)
- uv_fatal_error(GetLastError(), "CreateJobObjectW");
-
- if (!SetInformationJobObject(uv_global_job_handle_,
- JobObjectExtendedLimitInformation,
- &info,
- sizeof info))
- uv_fatal_error(GetLastError(), "SetInformationJobObject");
-}
-
-
-static int uv_utf8_to_utf16_alloc(const char* s, WCHAR** ws_ptr) {
- int ws_len, r;
- WCHAR* ws;
-
- ws_len = MultiByteToWideChar(CP_UTF8,
- 0,
- s,
- -1,
- NULL,
- 0);
- if (ws_len <= 0) {
- return GetLastError();
- }
-
- ws = (WCHAR*) uv__malloc(ws_len * sizeof(WCHAR));
- if (ws == NULL) {
- return ERROR_OUTOFMEMORY;
- }
-
- r = MultiByteToWideChar(CP_UTF8,
- 0,
- s,
- -1,
- ws,
- ws_len);
- assert(r == ws_len);
-
- *ws_ptr = ws;
- return 0;
-}
-
-
-static void uv_process_init(uv_loop_t* loop, uv_process_t* handle) {
- uv__handle_init(loop, (uv_handle_t*) handle, UV_PROCESS);
- handle->exit_cb = NULL;
- handle->pid = 0;
- handle->exit_signal = 0;
- handle->wait_handle = INVALID_HANDLE_VALUE;
- handle->process_handle = INVALID_HANDLE_VALUE;
- handle->child_stdio_buffer = NULL;
- handle->exit_cb_pending = 0;
-
- uv_req_init(loop, (uv_req_t*)&handle->exit_req);
- handle->exit_req.type = UV_PROCESS_EXIT;
- handle->exit_req.data = handle;
-}
-
-
-/*
- * Path search functions
- */
-
-/*
- * Helper function for search_path
- */
-static WCHAR* search_path_join_test(const WCHAR* dir,
- size_t dir_len,
- const WCHAR* name,
- size_t name_len,
- const WCHAR* ext,
- size_t ext_len,
- const WCHAR* cwd,
- size_t cwd_len) {
- WCHAR *result, *result_pos;
- DWORD attrs;
- if (dir_len > 2 && dir[0] == L'\\' && dir[1] == L'\\') {
- /* It's a UNC path so ignore cwd */
- cwd_len = 0;
- } else if (dir_len >= 1 && (dir[0] == L'/' || dir[0] == L'\\')) {
- /* It's a full path without drive letter, use cwd's drive letter only */
- cwd_len = 2;
- } else if (dir_len >= 2 && dir[1] == L':' &&
- (dir_len < 3 || (dir[2] != L'/' && dir[2] != L'\\'))) {
- /* It's a relative path with drive letter (ext.g. D:../some/file)
- * Replace drive letter in dir by full cwd if it points to the same drive,
- * otherwise use the dir only.
- */
- if (cwd_len < 2 || _wcsnicmp(cwd, dir, 2) != 0) {
- cwd_len = 0;
- } else {
- dir += 2;
- dir_len -= 2;
- }
- } else if (dir_len > 2 && dir[1] == L':') {
- /* It's an absolute path with drive letter
- * Don't use the cwd at all
- */
- cwd_len = 0;
- }
-
- /* Allocate buffer for output */
- result = result_pos = (WCHAR*)uv__malloc(sizeof(WCHAR) *
- (cwd_len + 1 + dir_len + 1 + name_len + 1 + ext_len + 1));
-
- /* Copy cwd */
- wcsncpy(result_pos, cwd, cwd_len);
- result_pos += cwd_len;
-
- /* Add a path separator if cwd didn't end with one */
- if (cwd_len && wcsrchr(L"\\/:", result_pos[-1]) == NULL) {
- result_pos[0] = L'\\';
- result_pos++;
- }
-
- /* Copy dir */
- wcsncpy(result_pos, dir, dir_len);
- result_pos += dir_len;
-
- /* Add a separator if the dir didn't end with one */
- if (dir_len && wcsrchr(L"\\/:", result_pos[-1]) == NULL) {
- result_pos[0] = L'\\';
- result_pos++;
- }
-
- /* Copy filename */
- wcsncpy(result_pos, name, name_len);
- result_pos += name_len;
-
- if (ext_len) {
- /* Add a dot if the filename didn't end with one */
- if (name_len && result_pos[-1] != '.') {
- result_pos[0] = L'.';
- result_pos++;
- }
-
- /* Copy extension */
- wcsncpy(result_pos, ext, ext_len);
- result_pos += ext_len;
- }
-
- /* Null terminator */
- result_pos[0] = L'\0';
-
- attrs = GetFileAttributesW(result);
-
- if (attrs != INVALID_FILE_ATTRIBUTES &&
- !(attrs & FILE_ATTRIBUTE_DIRECTORY)) {
- return result;
- }
-
- uv__free(result);
- return NULL;
-}
-
-
-/*
- * Helper function for search_path
- */
-static WCHAR* path_search_walk_ext(const WCHAR *dir,
- size_t dir_len,
- const WCHAR *name,
- size_t name_len,
- WCHAR *cwd,
- size_t cwd_len,
- int name_has_ext) {
- WCHAR* result;
-
- /* If the name itself has a nonempty extension, try this extension first */
- if (name_has_ext) {
- result = search_path_join_test(dir, dir_len,
- name, name_len,
- L"", 0,
- cwd, cwd_len);
- if (result != NULL) {
- return result;
- }
- }
-
- /* Try .com extension */
- result = search_path_join_test(dir, dir_len,
- name, name_len,
- L"com", 3,
- cwd, cwd_len);
- if (result != NULL) {
- return result;
- }
-
- /* Try .exe extension */
- result = search_path_join_test(dir, dir_len,
- name, name_len,
- L"exe", 3,
- cwd, cwd_len);
- if (result != NULL) {
- return result;
- }
-
- return NULL;
-}
-
-
-/*
- * search_path searches the system path for an executable filename -
- * the windows API doesn't provide this as a standalone function nor as an
- * option to CreateProcess.
- *
- * It tries to return an absolute filename.
- *
- * Furthermore, it tries to follow the semantics that cmd.exe, with this
- * exception that PATHEXT environment variable isn't used. Since CreateProcess
- * can start only .com and .exe files, only those extensions are tried. This
- * behavior equals that of msvcrt's spawn functions.
- *
- * - Do not search the path if the filename already contains a path (either
- * relative or absolute).
- *
- * - If there's really only a filename, check the current directory for file,
- * then search all path directories.
- *
- * - If filename specified has *any* extension, search for the file with the
- * specified extension first.
- *
- * - If the literal filename is not found in a directory, try *appending*
- * (not replacing) .com first and then .exe.
- *
- * - The path variable may contain relative paths; relative paths are relative
- * to the cwd.
- *
- * - Directories in path may or may not end with a trailing backslash.
- *
- * - CMD does not trim leading/trailing whitespace from path/pathex entries
- * nor from the environment variables as a whole.
- *
- * - When cmd.exe cannot read a directory, it will just skip it and go on
- * searching. However, unlike posix-y systems, it will happily try to run a
- * file that is not readable/executable; if the spawn fails it will not
- * continue searching.
- *
- * UNC path support: we are dealing with UNC paths in both the path and the
- * filename. This is a deviation from what cmd.exe does (it does not let you
- * start a program by specifying an UNC path on the command line) but this is
- * really a pointless restriction.
- *
- */
-static WCHAR* search_path(const WCHAR *file,
- WCHAR *cwd,
- const WCHAR *path) {
- int file_has_dir;
- WCHAR* result = NULL;
- WCHAR *file_name_start;
- WCHAR *dot;
- const WCHAR *dir_start, *dir_end, *dir_path;
- size_t dir_len;
- int name_has_ext;
-
- size_t file_len = wcslen(file);
- size_t cwd_len = wcslen(cwd);
-
- /* If the caller supplies an empty filename,
- * we're not gonna return c:\windows\.exe -- GFY!
- */
- if (file_len == 0
- || (file_len == 1 && file[0] == L'.')) {
- return NULL;
- }
-
- /* Find the start of the filename so we can split the directory from the */
- /* name. */
- for (file_name_start = (WCHAR*)file + file_len;
- file_name_start > file
- && file_name_start[-1] != L'\\'
- && file_name_start[-1] != L'/'
- && file_name_start[-1] != L':';
- file_name_start--);
-
- file_has_dir = file_name_start != file;
-
- /* Check if the filename includes an extension */
- dot = wcschr(file_name_start, L'.');
- name_has_ext = (dot != NULL && dot[1] != L'\0');
-
- if (file_has_dir) {
- /* The file has a path inside, don't use path */
- result = path_search_walk_ext(
- file, file_name_start - file,
- file_name_start, file_len - (file_name_start - file),
- cwd, cwd_len,
- name_has_ext);
-
- } else {
- dir_end = path;
-
- /* The file is really only a name; look in cwd first, then scan path */
- result = path_search_walk_ext(L"", 0,
- file, file_len,
- cwd, cwd_len,
- name_has_ext);
-
- while (result == NULL) {
- if (*dir_end == L'\0') {
- break;
- }
-
- /* Skip the separator that dir_end now points to */
- if (dir_end != path || *path == L';') {
- dir_end++;
- }
-
- /* Next slice starts just after where the previous one ended */
- dir_start = dir_end;
-
- /* Slice until the next ; or \0 is found */
- dir_end = wcschr(dir_start, L';');
- if (dir_end == NULL) {
- dir_end = wcschr(dir_start, L'\0');
- }
-
- /* If the slice is zero-length, don't bother */
- if (dir_end - dir_start == 0) {
- continue;
- }
-
- dir_path = dir_start;
- dir_len = dir_end - dir_start;
-
- /* Adjust if the path is quoted. */
- if (dir_path[0] == '"' || dir_path[0] == '\'') {
- ++dir_path;
- --dir_len;
- }
-
- if (dir_path[dir_len - 1] == '"' || dir_path[dir_len - 1] == '\'') {
- --dir_len;
- }
-
- result = path_search_walk_ext(dir_path, dir_len,
- file, file_len,
- cwd, cwd_len,
- name_has_ext);
- }
- }
-
- return result;
-}
-
-
-/*
- * Quotes command line arguments
- * Returns a pointer to the end (next char to be written) of the buffer
- */
-WCHAR* quote_cmd_arg(const WCHAR *source, WCHAR *target) {
- size_t len = wcslen(source);
- size_t i;
- int quote_hit;
- WCHAR* start;
-
- if (len == 0) {
- /* Need double quotation for empty argument */
- *(target++) = L'"';
- *(target++) = L'"';
- return target;
- }
-
- if (NULL == wcspbrk(source, L" \t\"")) {
- /* No quotation needed */
- wcsncpy(target, source, len);
- target += len;
- return target;
- }
-
- if (NULL == wcspbrk(source, L"\"\\")) {
- /*
- * No embedded double quotes or backlashes, so I can just wrap
- * quote marks around the whole thing.
- */
- *(target++) = L'"';
- wcsncpy(target, source, len);
- target += len;
- *(target++) = L'"';
- return target;
- }
-
- /*
- * Expected input/output:
- * input : hello"world
- * output: "hello\"world"
- * input : hello""world
- * output: "hello\"\"world"
- * input : hello\world
- * output: hello\world
- * input : hello\\world
- * output: hello\\world
- * input : hello\"world
- * output: "hello\\\"world"
- * input : hello\\"world
- * output: "hello\\\\\"world"
- * input : hello world\
- * output: "hello world\"
- */
-
- *(target++) = L'"';
- start = target;
- quote_hit = 1;
-
- for (i = len; i > 0; --i) {
- *(target++) = source[i - 1];
-
- if (quote_hit && source[i - 1] == L'\\') {
- *(target++) = L'\\';
- } else if(source[i - 1] == L'"') {
- quote_hit = 1;
- *(target++) = L'\\';
- } else {
- quote_hit = 0;
- }
- }
- target[0] = L'\0';
- wcsrev(start);
- *(target++) = L'"';
- return target;
-}
-
-
-int make_program_args(char** args, int verbatim_arguments, WCHAR** dst_ptr) {
- char** arg;
- WCHAR* dst = NULL;
- WCHAR* temp_buffer = NULL;
- size_t dst_len = 0;
- size_t temp_buffer_len = 0;
- WCHAR* pos;
- int arg_count = 0;
- int err = 0;
-
- /* Count the required size. */
- for (arg = args; *arg; arg++) {
- DWORD arg_len;
-
- arg_len = MultiByteToWideChar(CP_UTF8,
- 0,
- *arg,
- -1,
- NULL,
- 0);
- if (arg_len == 0) {
- return GetLastError();
- }
-
- dst_len += arg_len;
-
- if (arg_len > temp_buffer_len)
- temp_buffer_len = arg_len;
-
- arg_count++;
- }
-
- /* Adjust for potential quotes. Also assume the worst-case scenario */
- /* that every character needs escaping, so we need twice as much space. */
- dst_len = dst_len * 2 + arg_count * 2;
-
- /* Allocate buffer for the final command line. */
- dst = (WCHAR*) uv__malloc(dst_len * sizeof(WCHAR));
- if (dst == NULL) {
- err = ERROR_OUTOFMEMORY;
- goto error;
- }
-
- /* Allocate temporary working buffer. */
- temp_buffer = (WCHAR*) uv__malloc(temp_buffer_len * sizeof(WCHAR));
- if (temp_buffer == NULL) {
- err = ERROR_OUTOFMEMORY;
- goto error;
- }
-
- pos = dst;
- for (arg = args; *arg; arg++) {
- DWORD arg_len;
-
- /* Convert argument to wide char. */
- arg_len = MultiByteToWideChar(CP_UTF8,
- 0,
- *arg,
- -1,
- temp_buffer,
- (int) (dst + dst_len - pos));
- if (arg_len == 0) {
- err = GetLastError();
- goto error;
- }
-
- if (verbatim_arguments) {
- /* Copy verbatim. */
- wcscpy(pos, temp_buffer);
- pos += arg_len - 1;
- } else {
- /* Quote/escape, if needed. */
- pos = quote_cmd_arg(temp_buffer, pos);
- }
-
- *pos++ = *(arg + 1) ? L' ' : L'\0';
- }
-
- uv__free(temp_buffer);
-
- *dst_ptr = dst;
- return 0;
-
-error:
- uv__free(dst);
- uv__free(temp_buffer);
- return err;
-}
-
-
-int env_strncmp(const wchar_t* a, int na, const wchar_t* b) {
- wchar_t* a_eq;
- wchar_t* b_eq;
- wchar_t* A;
- wchar_t* B;
- int nb;
- int r;
-
- if (na < 0) {
- a_eq = wcschr(a, L'=');
- assert(a_eq);
- na = (int)(long)(a_eq - a);
- } else {
- na--;
- }
- b_eq = wcschr(b, L'=');
- assert(b_eq);
- nb = b_eq - b;
-
- A = alloca((na+1) * sizeof(wchar_t));
- B = alloca((nb+1) * sizeof(wchar_t));
-
- r = LCMapStringW(LOCALE_INVARIANT, LCMAP_UPPERCASE, a, na, A, na);
- assert(r==na);
- A[na] = L'\0';
- r = LCMapStringW(LOCALE_INVARIANT, LCMAP_UPPERCASE, b, nb, B, nb);
- assert(r==nb);
- B[nb] = L'\0';
-
- while (1) {
- wchar_t AA = *A++;
- wchar_t BB = *B++;
- if (AA < BB) {
- return -1;
- } else if (AA > BB) {
- return 1;
- } else if (!AA && !BB) {
- return 0;
- }
- }
-}
-
-
-static int qsort_wcscmp(const void *a, const void *b) {
- wchar_t* astr = *(wchar_t* const*)a;
- wchar_t* bstr = *(wchar_t* const*)b;
- return env_strncmp(astr, -1, bstr);
-}
-
-
-/*
- * The way windows takes environment variables is different than what C does;
- * Windows wants a contiguous block of null-terminated strings, terminated
- * with an additional null.
- *
- * Windows has a few "essential" environment variables. winsock will fail
- * to initialize if SYSTEMROOT is not defined; some APIs make reference to
- * TEMP. SYSTEMDRIVE is probably also important. We therefore ensure that
- * these get defined if the input environment block does not contain any
- * values for them.
- *
- * Also add variables known to Cygwin to be required for correct
- * subprocess operation in many cases:
- * https://github.com/Alexpux/Cygwin/blob/b266b04fbbd3a595f02ea149e4306d3ab9b1fe3d/winsup/cygwin/environ.cc#L955
- *
- */
-int make_program_env(char* env_block[], WCHAR** dst_ptr) {
- WCHAR* dst;
- WCHAR* ptr;
- char** env;
- size_t env_len = 0;
- int len;
- size_t i;
- DWORD var_size;
- size_t env_block_count = 1; /* 1 for null-terminator */
- WCHAR* dst_copy;
- WCHAR** ptr_copy;
- WCHAR** env_copy;
- DWORD* required_vars_value_len = alloca(n_required_vars * sizeof(DWORD*));
-
- /* first pass: determine size in UTF-16 */
- for (env = env_block; *env; env++) {
- int len;
- if (strchr(*env, '=')) {
- len = MultiByteToWideChar(CP_UTF8,
- 0,
- *env,
- -1,
- NULL,
- 0);
- if (len <= 0) {
- return GetLastError();
- }
- env_len += len;
- env_block_count++;
- }
- }
-
- /* second pass: copy to UTF-16 environment block */
- dst_copy = (WCHAR*)uv__malloc(env_len * sizeof(WCHAR));
- if (!dst_copy) {
- return ERROR_OUTOFMEMORY;
- }
- env_copy = alloca(env_block_count * sizeof(WCHAR*));
-
- ptr = dst_copy;
- ptr_copy = env_copy;
- for (env = env_block; *env; env++) {
- if (strchr(*env, '=')) {
- len = MultiByteToWideChar(CP_UTF8,
- 0,
- *env,
- -1,
- ptr,
- (int) (env_len - (ptr - dst_copy)));
- if (len <= 0) {
- DWORD err = GetLastError();
- uv__free(dst_copy);
- return err;
- }
- *ptr_copy++ = ptr;
- ptr += len;
- }
- }
- *ptr_copy = NULL;
- assert(env_len == ptr - dst_copy);
-
- /* sort our (UTF-16) copy */
- qsort(env_copy, env_block_count-1, sizeof(wchar_t*), qsort_wcscmp);
-
- /* third pass: check for required variables */
- for (ptr_copy = env_copy, i = 0; i < n_required_vars; ) {
- int cmp;
- if (!*ptr_copy) {
- cmp = -1;
- } else {
- cmp = env_strncmp(required_vars[i].wide_eq,
- required_vars[i].len,
- *ptr_copy);
- }
- if (cmp < 0) {
- /* missing required var */
- var_size = GetEnvironmentVariableW(required_vars[i].wide, NULL, 0);
- required_vars_value_len[i] = var_size;
- if (var_size != 0) {
- env_len += required_vars[i].len;
- env_len += var_size;
- }
- i++;
- } else {
- ptr_copy++;
- if (cmp == 0)
- i++;
- }
- }
-
- /* final pass: copy, in sort order, and inserting required variables */
- dst = uv__malloc((1+env_len) * sizeof(WCHAR));
- if (!dst) {
- uv__free(dst_copy);
- return ERROR_OUTOFMEMORY;
- }
-
- for (ptr = dst, ptr_copy = env_copy, i = 0;
- *ptr_copy || i < n_required_vars;
- ptr += len) {
- int cmp;
- if (i >= n_required_vars) {
- cmp = 1;
- } else if (!*ptr_copy) {
- cmp = -1;
- } else {
- cmp = env_strncmp(required_vars[i].wide_eq,
- required_vars[i].len,
- *ptr_copy);
- }
- if (cmp < 0) {
- /* missing required var */
- len = required_vars_value_len[i];
- if (len) {
- wcscpy(ptr, required_vars[i].wide_eq);
- ptr += required_vars[i].len;
- var_size = GetEnvironmentVariableW(required_vars[i].wide,
- ptr,
- (int) (env_len - (ptr - dst)));
- if (var_size != len-1) { /* race condition? */
- uv_fatal_error(GetLastError(), "GetEnvironmentVariableW");
- }
- }
- i++;
- } else {
- /* copy var from env_block */
- len = wcslen(*ptr_copy) + 1;
- wmemcpy(ptr, *ptr_copy, len);
- ptr_copy++;
- if (cmp == 0)
- i++;
- }
- }
-
- /* Terminate with an extra NULL. */
- assert(env_len == (ptr - dst));
- *ptr = L'\0';
-
- uv__free(dst_copy);
- *dst_ptr = dst;
- return 0;
-}
-
-/*
- * Attempt to find the value of the PATH environment variable in the child's
- * preprocessed environment.
- *
- * If found, a pointer into `env` is returned. If not found, NULL is returned.
- */
-static WCHAR* find_path(WCHAR *env) {
- for (; env != NULL && *env != 0; env += wcslen(env) + 1) {
- if (wcsncmp(env, L"PATH=", 5) == 0)
- return &env[5];
- }
-
- return NULL;
-}
-
-/*
- * Called on Windows thread-pool thread to indicate that
- * a child process has exited.
- */
-static void CALLBACK exit_wait_callback(void* data, BOOLEAN didTimeout) {
- uv_process_t* process = (uv_process_t*) data;
- uv_loop_t* loop = process->loop;
-
- assert(didTimeout == FALSE);
- assert(process);
- assert(!process->exit_cb_pending);
-
- process->exit_cb_pending = 1;
-
- /* Post completed */
- POST_COMPLETION_FOR_REQ(loop, &process->exit_req);
-}
-
-
-/* Called on main thread after a child process has exited. */
-void uv_process_proc_exit(uv_loop_t* loop, uv_process_t* handle) {
- int64_t exit_code;
- DWORD status;
-
- assert(handle->exit_cb_pending);
- handle->exit_cb_pending = 0;
-
- /* If we're closing, don't call the exit callback. Just schedule a close */
- /* callback now. */
- if (handle->flags & UV__HANDLE_CLOSING) {
- uv_want_endgame(loop, (uv_handle_t*) handle);
- return;
- }
-
- /* Unregister from process notification. */
- if (handle->wait_handle != INVALID_HANDLE_VALUE) {
- UnregisterWait(handle->wait_handle);
- handle->wait_handle = INVALID_HANDLE_VALUE;
- }
-
- /* Set the handle to inactive: no callbacks will be made after the exit */
- /* callback.*/
- uv__handle_stop(handle);
-
- if (GetExitCodeProcess(handle->process_handle, &status)) {
- exit_code = status;
- } else {
- /* Unable to to obtain the exit code. This should never happen. */
- exit_code = uv_translate_sys_error(GetLastError());
- }
-
- /* Fire the exit callback. */
- if (handle->exit_cb) {
- handle->exit_cb(handle, exit_code, handle->exit_signal);
- }
-}
-
-
-void uv_process_close(uv_loop_t* loop, uv_process_t* handle) {
- uv__handle_closing(handle);
-
- if (handle->wait_handle != INVALID_HANDLE_VALUE) {
- /* This blocks until either the wait was cancelled, or the callback has */
- /* completed. */
- BOOL r = UnregisterWaitEx(handle->wait_handle, INVALID_HANDLE_VALUE);
- if (!r) {
- /* This should never happen, and if it happens, we can't recover... */
- uv_fatal_error(GetLastError(), "UnregisterWaitEx");
- }
-
- handle->wait_handle = INVALID_HANDLE_VALUE;
- }
-
- if (!handle->exit_cb_pending) {
- uv_want_endgame(loop, (uv_handle_t*)handle);
- }
-}
-
-
-void uv_process_endgame(uv_loop_t* loop, uv_process_t* handle) {
- assert(!handle->exit_cb_pending);
- assert(handle->flags & UV__HANDLE_CLOSING);
- assert(!(handle->flags & UV_HANDLE_CLOSED));
-
- /* Clean-up the process handle. */
- CloseHandle(handle->process_handle);
-
- uv__handle_close(handle);
-}
-
-
-int uv_spawn(uv_loop_t* loop,
- uv_process_t* process,
- const uv_process_options_t* options) {
- int i;
- int err = 0;
- WCHAR* path = NULL, *alloc_path = NULL;
- BOOL result;
- WCHAR* application_path = NULL, *application = NULL, *arguments = NULL,
- *env = NULL, *cwd = NULL;
- STARTUPINFOW startup;
- PROCESS_INFORMATION info;
- DWORD process_flags;
-
- uv_process_init(loop, process);
- process->exit_cb = options->exit_cb;
-
- if (options->flags & (UV_PROCESS_SETGID | UV_PROCESS_SETUID)) {
- return UV_ENOTSUP;
- }
-
- if (options->file == NULL ||
- options->args == NULL) {
- return UV_EINVAL;
- }
-
- assert(options->file != NULL);
- assert(!(options->flags & ~(UV_PROCESS_DETACHED |
- UV_PROCESS_SETGID |
- UV_PROCESS_SETUID |
- UV_PROCESS_WINDOWS_HIDE |
- UV_PROCESS_WINDOWS_VERBATIM_ARGUMENTS)));
-
- err = uv_utf8_to_utf16_alloc(options->file, &application);
- if (err)
- goto done;
-
- err = make_program_args(
- options->args,
- options->flags & UV_PROCESS_WINDOWS_VERBATIM_ARGUMENTS,
- &arguments);
- if (err)
- goto done;
-
- if (options->env) {
- err = make_program_env(options->env, &env);
- if (err)
- goto done;
- }
-
- if (options->cwd) {
- /* Explicit cwd */
- err = uv_utf8_to_utf16_alloc(options->cwd, &cwd);
- if (err)
- goto done;
-
- } else {
- /* Inherit cwd */
- DWORD cwd_len, r;
-
- cwd_len = GetCurrentDirectoryW(0, NULL);
- if (!cwd_len) {
- err = GetLastError();
- goto done;
- }
-
- cwd = (WCHAR*) uv__malloc(cwd_len * sizeof(WCHAR));
- if (cwd == NULL) {
- err = ERROR_OUTOFMEMORY;
- goto done;
- }
-
- r = GetCurrentDirectoryW(cwd_len, cwd);
- if (r == 0 || r >= cwd_len) {
- err = GetLastError();
- goto done;
- }
- }
-
- /* Get PATH environment variable. */
- path = find_path(env);
- if (path == NULL) {
- DWORD path_len, r;
-
- path_len = GetEnvironmentVariableW(L"PATH", NULL, 0);
- if (path_len == 0) {
- err = GetLastError();
- goto done;
- }
-
- alloc_path = (WCHAR*) uv__malloc(path_len * sizeof(WCHAR));
- if (alloc_path == NULL) {
- err = ERROR_OUTOFMEMORY;
- goto done;
- }
- path = alloc_path;
-
- r = GetEnvironmentVariableW(L"PATH", path, path_len);
- if (r == 0 || r >= path_len) {
- err = GetLastError();
- goto done;
- }
- }
-
- err = uv__stdio_create(loop, options, &process->child_stdio_buffer);
- if (err)
- goto done;
-
- application_path = search_path(application,
- cwd,
- path);
- if (application_path == NULL) {
- /* Not found. */
- err = ERROR_FILE_NOT_FOUND;
- goto done;
- }
-
- startup.cb = sizeof(startup);
- startup.lpReserved = NULL;
- startup.lpDesktop = NULL;
- startup.lpTitle = NULL;
- startup.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;
-
- startup.cbReserved2 = uv__stdio_size(process->child_stdio_buffer);
- startup.lpReserved2 = (BYTE*) process->child_stdio_buffer;
-
- startup.hStdInput = uv__stdio_handle(process->child_stdio_buffer, 0);
- startup.hStdOutput = uv__stdio_handle(process->child_stdio_buffer, 1);
- startup.hStdError = uv__stdio_handle(process->child_stdio_buffer, 2);
-
- if (options->flags & UV_PROCESS_WINDOWS_HIDE) {
- /* Use SW_HIDE to avoid any potential process window. */
- startup.wShowWindow = SW_HIDE;
- } else {
- startup.wShowWindow = SW_SHOWDEFAULT;
- }
-
- process_flags = CREATE_UNICODE_ENVIRONMENT;
-
- if (options->flags & UV_PROCESS_DETACHED) {
- /* Note that we're not setting the CREATE_BREAKAWAY_FROM_JOB flag. That
- * means that libuv might not let you create a fully daemonized process
- * when run under job control. However the type of job control that libuv
- * itself creates doesn't trickle down to subprocesses so they can still
- * daemonize.
- *
- * A reason to not do this is that CREATE_BREAKAWAY_FROM_JOB makes the
- * CreateProcess call fail if we're under job control that doesn't allow
- * breakaway.
- */
- process_flags |= DETACHED_PROCESS | CREATE_NEW_PROCESS_GROUP;
- }
-
- if (!CreateProcessW(application_path,
- arguments,
- NULL,
- NULL,
- 1,
- process_flags,
- env,
- cwd,
- &startup,
- &info)) {
- /* CreateProcessW failed. */
- err = GetLastError();
- goto done;
- }
-
- /* Spawn succeeded */
- /* Beyond this point, failure is reported asynchronously. */
-
- process->process_handle = info.hProcess;
- process->pid = info.dwProcessId;
-
- /* If the process isn't spawned as detached, assign to the global job */
- /* object so windows will kill it when the parent process dies. */
- if (!(options->flags & UV_PROCESS_DETACHED)) {
- uv_once(&uv_global_job_handle_init_guard_, uv__init_global_job_handle);
-
- if (!AssignProcessToJobObject(uv_global_job_handle_, info.hProcess)) {
- /* AssignProcessToJobObject might fail if this process is under job
- * control and the job doesn't have the
- * JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK flag set, on a Windows version
- * that doesn't support nested jobs.
- *
- * When that happens we just swallow the error and continue without
- * establishing a kill-child-on-parent-exit relationship, otherwise
- * there would be no way for libuv applications run under job control
- * to spawn processes at all.
- */
- DWORD err = GetLastError();
- if (err != ERROR_ACCESS_DENIED)
- uv_fatal_error(err, "AssignProcessToJobObject");
- }
- }
-
- /* Set IPC pid to all IPC pipes. */
- for (i = 0; i < options->stdio_count; i++) {
- const uv_stdio_container_t* fdopt = &options->stdio[i];
- if (fdopt->flags & UV_CREATE_PIPE &&
- fdopt->data.stream->type == UV_NAMED_PIPE &&
- ((uv_pipe_t*) fdopt->data.stream)->ipc) {
- ((uv_pipe_t*) fdopt->data.stream)->pipe.conn.ipc_pid = info.dwProcessId;
- }
- }
-
- /* Setup notifications for when the child process exits. */
- result = RegisterWaitForSingleObject(&process->wait_handle,
- process->process_handle, exit_wait_callback, (void*)process, INFINITE,
- WT_EXECUTEINWAITTHREAD | WT_EXECUTEONLYONCE);
- if (!result) {
- uv_fatal_error(GetLastError(), "RegisterWaitForSingleObject");
- }
-
- CloseHandle(info.hThread);
-
- assert(!err);
-
- /* Make the handle active. It will remain active until the exit callback */
- /* is made or the handle is closed, whichever happens first. */
- uv__handle_start(process);
-
- /* Cleanup, whether we succeeded or failed. */
- done:
- uv__free(application);
- uv__free(application_path);
- uv__free(arguments);
- uv__free(cwd);
- uv__free(env);
- uv__free(alloc_path);
-
- if (process->child_stdio_buffer != NULL) {
- /* Clean up child stdio handles. */
- uv__stdio_destroy(process->child_stdio_buffer);
- process->child_stdio_buffer = NULL;
- }
-
- return uv_translate_sys_error(err);
-}
-
-
-static int uv__kill(HANDLE process_handle, int signum) {
- switch (signum) {
- case SIGTERM:
- case SIGKILL:
- case SIGINT: {
- /* Unconditionally terminate the process. On Windows, killed processes */
- /* normally return 1. */
- DWORD status;
- int err;
-
- if (TerminateProcess(process_handle, 1))
- return 0;
-
- /* If the process already exited before TerminateProcess was called, */
- /* TerminateProcess will fail with ERROR_ACCESS_DENIED. */
- err = GetLastError();
- if (err == ERROR_ACCESS_DENIED &&
- GetExitCodeProcess(process_handle, &status) &&
- status != STILL_ACTIVE) {
- return UV_ESRCH;
- }
-
- return uv_translate_sys_error(err);
- }
-
- case 0: {
- /* Health check: is the process still alive? */
- DWORD status;
-
- if (!GetExitCodeProcess(process_handle, &status))
- return uv_translate_sys_error(GetLastError());
-
- if (status != STILL_ACTIVE)
- return UV_ESRCH;
-
- return 0;
- }
-
- default:
- /* Unsupported signal. */
- return UV_ENOSYS;
- }
-}
-
-
-int uv_process_kill(uv_process_t* process, int signum) {
- int err;
-
- if (process->process_handle == INVALID_HANDLE_VALUE) {
- return UV_EINVAL;
- }
-
- err = uv__kill(process->process_handle, signum);
- if (err) {
- return err; /* err is already translated. */
- }
-
- process->exit_signal = signum;
-
- return 0;
-}
-
-
-int uv_kill(int pid, int signum) {
- int err;
- HANDLE process_handle = OpenProcess(PROCESS_TERMINATE |
- PROCESS_QUERY_INFORMATION, FALSE, pid);
-
- if (process_handle == NULL) {
- err = GetLastError();
- if (err == ERROR_INVALID_PARAMETER) {
- return UV_ESRCH;
- } else {
- return uv_translate_sys_error(err);
- }
- }
-
- err = uv__kill(process_handle, signum);
- CloseHandle(process_handle);
-
- return err; /* err is already translated. */
-}
diff --git a/3rdparty/libuv/src/win/req-inl.h b/3rdparty/libuv/src/win/req-inl.h
deleted file mode 100644
index b5e502eef55..00000000000
--- a/3rdparty/libuv/src/win/req-inl.h
+++ /dev/null
@@ -1,224 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#ifndef UV_WIN_REQ_INL_H_
-#define UV_WIN_REQ_INL_H_
-
-#include <assert.h>
-
-#include "uv.h"
-#include "internal.h"
-
-
-#define SET_REQ_STATUS(req, status) \
- (req)->u.io.overlapped.Internal = (ULONG_PTR) (status)
-
-#define SET_REQ_ERROR(req, error) \
- SET_REQ_STATUS((req), NTSTATUS_FROM_WIN32((error)))
-
-#define SET_REQ_SUCCESS(req) \
- SET_REQ_STATUS((req), STATUS_SUCCESS)
-
-#define GET_REQ_STATUS(req) \
- ((NTSTATUS) (req)->u.io.overlapped.Internal)
-
-#define REQ_SUCCESS(req) \
- (NT_SUCCESS(GET_REQ_STATUS((req))))
-
-#define GET_REQ_ERROR(req) \
- (pRtlNtStatusToDosError(GET_REQ_STATUS((req))))
-
-#define GET_REQ_SOCK_ERROR(req) \
- (uv_ntstatus_to_winsock_error(GET_REQ_STATUS((req))))
-
-
-#define REGISTER_HANDLE_REQ(loop, handle, req) \
- do { \
- INCREASE_ACTIVE_COUNT((loop), (handle)); \
- uv__req_register((loop), (req)); \
- } while (0)
-
-#define UNREGISTER_HANDLE_REQ(loop, handle, req) \
- do { \
- DECREASE_ACTIVE_COUNT((loop), (handle)); \
- uv__req_unregister((loop), (req)); \
- } while (0)
-
-
-#define UV_SUCCEEDED_WITHOUT_IOCP(result) \
- ((result) && (handle->flags & UV_HANDLE_SYNC_BYPASS_IOCP))
-
-#define UV_SUCCEEDED_WITH_IOCP(result) \
- ((result) || (GetLastError() == ERROR_IO_PENDING))
-
-
-#define POST_COMPLETION_FOR_REQ(loop, req) \
- if (!PostQueuedCompletionStatus((loop)->iocp, \
- 0, \
- 0, \
- &((req)->u.io.overlapped))) { \
- uv_fatal_error(GetLastError(), "PostQueuedCompletionStatus"); \
- }
-
-
-INLINE static void uv_req_init(uv_loop_t* loop, uv_req_t* req) {
- req->type = UV_UNKNOWN_REQ;
- SET_REQ_SUCCESS(req);
-}
-
-
-INLINE static uv_req_t* uv_overlapped_to_req(OVERLAPPED* overlapped) {
- return CONTAINING_RECORD(overlapped, uv_req_t, u.io.overlapped);
-}
-
-
-INLINE static void uv_insert_pending_req(uv_loop_t* loop, uv_req_t* req) {
- req->next_req = NULL;
- if (loop->pending_reqs_tail) {
-#ifdef _DEBUG
- /* Ensure the request is not already in the queue, or the queue
- * will get corrupted.
- */
- uv_req_t* current = loop->pending_reqs_tail;
- do {
- assert(req != current);
- current = current->next_req;
- } while(current != loop->pending_reqs_tail);
-#endif
-
- req->next_req = loop->pending_reqs_tail->next_req;
- loop->pending_reqs_tail->next_req = req;
- loop->pending_reqs_tail = req;
- } else {
- req->next_req = req;
- loop->pending_reqs_tail = req;
- }
-}
-
-
-#define DELEGATE_STREAM_REQ(loop, req, method, handle_at) \
- do { \
- switch (((uv_handle_t*) (req)->handle_at)->type) { \
- case UV_TCP: \
- uv_process_tcp_##method##_req(loop, \
- (uv_tcp_t*) ((req)->handle_at), \
- req); \
- break; \
- \
- case UV_NAMED_PIPE: \
- uv_process_pipe_##method##_req(loop, \
- (uv_pipe_t*) ((req)->handle_at), \
- req); \
- break; \
- \
- case UV_TTY: \
- uv_process_tty_##method##_req(loop, \
- (uv_tty_t*) ((req)->handle_at), \
- req); \
- break; \
- \
- default: \
- assert(0); \
- } \
- } while (0)
-
-
-INLINE static int uv_process_reqs(uv_loop_t* loop) {
- uv_req_t* req;
- uv_req_t* first;
- uv_req_t* next;
-
- if (loop->pending_reqs_tail == NULL)
- return 0;
-
- first = loop->pending_reqs_tail->next_req;
- next = first;
- loop->pending_reqs_tail = NULL;
-
- while (next != NULL) {
- req = next;
- next = req->next_req != first ? req->next_req : NULL;
-
- switch (req->type) {
- case UV_READ:
- DELEGATE_STREAM_REQ(loop, req, read, data);
- break;
-
- case UV_WRITE:
- DELEGATE_STREAM_REQ(loop, (uv_write_t*) req, write, handle);
- break;
-
- case UV_ACCEPT:
- DELEGATE_STREAM_REQ(loop, req, accept, data);
- break;
-
- case UV_CONNECT:
- DELEGATE_STREAM_REQ(loop, (uv_connect_t*) req, connect, handle);
- break;
-
- case UV_SHUTDOWN:
- /* Tcp shutdown requests don't come here. */
- assert(((uv_shutdown_t*) req)->handle->type == UV_NAMED_PIPE);
- uv_process_pipe_shutdown_req(
- loop,
- (uv_pipe_t*) ((uv_shutdown_t*) req)->handle,
- (uv_shutdown_t*) req);
- break;
-
- case UV_UDP_RECV:
- uv_process_udp_recv_req(loop, (uv_udp_t*) req->data, req);
- break;
-
- case UV_UDP_SEND:
- uv_process_udp_send_req(loop,
- ((uv_udp_send_t*) req)->handle,
- (uv_udp_send_t*) req);
- break;
-
- case UV_WAKEUP:
- uv_process_async_wakeup_req(loop, (uv_async_t*) req->data, req);
- break;
-
- case UV_SIGNAL_REQ:
- uv_process_signal_req(loop, (uv_signal_t*) req->data, req);
- break;
-
- case UV_POLL_REQ:
- uv_process_poll_req(loop, (uv_poll_t*) req->data, req);
- break;
-
- case UV_PROCESS_EXIT:
- uv_process_proc_exit(loop, (uv_process_t*) req->data);
- break;
-
- case UV_FS_EVENT_REQ:
- uv_process_fs_event_req(loop, req, (uv_fs_event_t*) req->data);
- break;
-
- default:
- assert(0);
- }
- }
-
- return 1;
-}
-
-#endif /* UV_WIN_REQ_INL_H_ */
diff --git a/3rdparty/libuv/src/win/req.c b/3rdparty/libuv/src/win/req.c
deleted file mode 100644
index 111cc5e2893..00000000000
--- a/3rdparty/libuv/src/win/req.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include <assert.h>
-
-#include "uv.h"
-#include "internal.h"
diff --git a/3rdparty/libuv/src/win/signal.c b/3rdparty/libuv/src/win/signal.c
deleted file mode 100644
index 2c64a55dc39..00000000000
--- a/3rdparty/libuv/src/win/signal.c
+++ /dev/null
@@ -1,356 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include <assert.h>
-#include <signal.h>
-
-#include "uv.h"
-#include "internal.h"
-#include "handle-inl.h"
-#include "req-inl.h"
-
-
-RB_HEAD(uv_signal_tree_s, uv_signal_s);
-
-static struct uv_signal_tree_s uv__signal_tree = RB_INITIALIZER(uv__signal_tree);
-static ssize_t volatile uv__signal_control_handler_refs = 0;
-static CRITICAL_SECTION uv__signal_lock;
-
-
-void uv_signals_init() {
- InitializeCriticalSection(&uv__signal_lock);
-}
-
-
-static int uv__signal_compare(uv_signal_t* w1, uv_signal_t* w2) {
- /* Compare signums first so all watchers with the same signnum end up */
- /* adjacent. */
- if (w1->signum < w2->signum) return -1;
- if (w1->signum > w2->signum) return 1;
-
- /* Sort by loop pointer, so we can easily look up the first item after */
- /* { .signum = x, .loop = NULL } */
- if ((uintptr_t) w1->loop < (uintptr_t) w2->loop) return -1;
- if ((uintptr_t) w1->loop > (uintptr_t) w2->loop) return 1;
-
- if ((uintptr_t) w1 < (uintptr_t) w2) return -1;
- if ((uintptr_t) w1 > (uintptr_t) w2) return 1;
-
- return 0;
-}
-
-
-RB_GENERATE_STATIC(uv_signal_tree_s, uv_signal_s, tree_entry, uv__signal_compare);
-
-
-/*
- * Dispatches signal {signum} to all active uv_signal_t watchers in all loops.
- * Returns 1 if the signal was dispatched to any watcher, or 0 if there were
- * no active signal watchers observing this signal.
- */
-int uv__signal_dispatch(int signum) {
- uv_signal_t lookup;
- uv_signal_t* handle;
- int dispatched = 0;
-
- EnterCriticalSection(&uv__signal_lock);
-
- lookup.signum = signum;
- lookup.loop = NULL;
-
- for (handle = RB_NFIND(uv_signal_tree_s, &uv__signal_tree, &lookup);
- handle != NULL && handle->signum == signum;
- handle = RB_NEXT(uv_signal_tree_s, &uv__signal_tree, handle)) {
- unsigned long previous = InterlockedExchange(
- (volatile LONG*) &handle->pending_signum, signum);
-
- if (!previous) {
- POST_COMPLETION_FOR_REQ(handle->loop, &handle->signal_req);
- }
-
- dispatched = 1;
- }
-
- LeaveCriticalSection(&uv__signal_lock);
-
- return dispatched;
-}
-
-
-static BOOL WINAPI uv__signal_control_handler(DWORD type) {
- switch (type) {
- case CTRL_C_EVENT:
- return uv__signal_dispatch(SIGINT);
-
- case CTRL_BREAK_EVENT:
- return uv__signal_dispatch(SIGBREAK);
-
- case CTRL_CLOSE_EVENT:
- if (uv__signal_dispatch(SIGHUP)) {
- /* Windows will terminate the process after the control handler */
- /* returns. After that it will just terminate our process. Therefore */
- /* block the signal handler so the main loop has some time to pick */
- /* up the signal and do something for a few seconds. */
- Sleep(INFINITE);
- return TRUE;
- }
- return FALSE;
-
- case CTRL_LOGOFF_EVENT:
- case CTRL_SHUTDOWN_EVENT:
- /* These signals are only sent to services. Services have their own */
- /* notification mechanism, so there's no point in handling these. */
-
- default:
- /* We don't handle these. */
- return FALSE;
- }
-}
-
-
-static int uv__signal_register_control_handler() {
- /* When this function is called, the uv__signal_lock must be held. */
-
- /* If the console control handler has already been hooked, just add a */
- /* reference. */
- if (uv__signal_control_handler_refs > 0) {
- uv__signal_control_handler_refs++;
- return 0;
- }
-
- if (!SetConsoleCtrlHandler(uv__signal_control_handler, TRUE))
- return GetLastError();
-
- uv__signal_control_handler_refs++;
-
- return 0;
-}
-
-
-static void uv__signal_unregister_control_handler() {
- /* When this function is called, the uv__signal_lock must be held. */
- BOOL r;
-
- /* Don't unregister if the number of console control handlers exceeds one. */
- /* Just remove a reference in that case. */
- if (uv__signal_control_handler_refs > 1) {
- uv__signal_control_handler_refs--;
- return;
- }
-
- assert(uv__signal_control_handler_refs == 1);
-
- r = SetConsoleCtrlHandler(uv__signal_control_handler, FALSE);
- /* This should never fail; if it does it is probably a bug in libuv. */
- assert(r);
-
- uv__signal_control_handler_refs--;
-}
-
-
-static int uv__signal_register(int signum) {
- switch (signum) {
- case SIGINT:
- case SIGBREAK:
- case SIGHUP:
- return uv__signal_register_control_handler();
-
- case SIGWINCH:
- /* SIGWINCH is generated in tty.c. No need to register anything. */
- return 0;
-
- case SIGILL:
- case SIGABRT_COMPAT:
- case SIGFPE:
- case SIGSEGV:
- case SIGTERM:
- case SIGABRT:
- /* Signal is never raised. */
- return 0;
-
- default:
- /* Invalid signal. */
- return ERROR_INVALID_PARAMETER;
- }
-}
-
-
-static void uv__signal_unregister(int signum) {
- switch (signum) {
- case SIGINT:
- case SIGBREAK:
- case SIGHUP:
- uv__signal_unregister_control_handler();
- return;
-
- case SIGWINCH:
- /* SIGWINCH is generated in tty.c. No need to unregister anything. */
- return;
-
- case SIGILL:
- case SIGABRT_COMPAT:
- case SIGFPE:
- case SIGSEGV:
- case SIGTERM:
- case SIGABRT:
- /* Nothing is registered for this signal. */
- return;
-
- default:
- /* Libuv bug. */
- assert(0 && "Invalid signum");
- return;
- }
-}
-
-
-int uv_signal_init(uv_loop_t* loop, uv_signal_t* handle) {
- uv_req_t* req;
-
- uv__handle_init(loop, (uv_handle_t*) handle, UV_SIGNAL);
- handle->pending_signum = 0;
- handle->signum = 0;
- handle->signal_cb = NULL;
-
- req = &handle->signal_req;
- uv_req_init(loop, req);
- req->type = UV_SIGNAL_REQ;
- req->data = handle;
-
- return 0;
-}
-
-
-int uv_signal_stop(uv_signal_t* handle) {
- uv_signal_t* removed_handle;
-
- /* If the watcher wasn't started, this is a no-op. */
- if (handle->signum == 0)
- return 0;
-
- EnterCriticalSection(&uv__signal_lock);
-
- uv__signal_unregister(handle->signum);
-
- removed_handle = RB_REMOVE(uv_signal_tree_s, &uv__signal_tree, handle);
- assert(removed_handle == handle);
-
- LeaveCriticalSection(&uv__signal_lock);
-
- handle->signum = 0;
- uv__handle_stop(handle);
-
- return 0;
-}
-
-
-int uv_signal_start(uv_signal_t* handle, uv_signal_cb signal_cb, int signum) {
- int err;
-
- /* If the user supplies signum == 0, then return an error already. If the */
- /* signum is otherwise invalid then uv__signal_register will find out */
- /* eventually. */
- if (signum == 0) {
- return UV_EINVAL;
- }
-
- /* Short circuit: if the signal watcher is already watching {signum} don't */
- /* go through the process of deregistering and registering the handler. */
- /* Additionally, this avoids pending signals getting lost in the (small) */
- /* time frame that handle->signum == 0. */
- if (signum == handle->signum) {
- handle->signal_cb = signal_cb;
- return 0;
- }
-
- /* If the signal handler was already active, stop it first. */
- if (handle->signum != 0) {
- int r = uv_signal_stop(handle);
- /* uv_signal_stop is infallible. */
- assert(r == 0);
- }
-
- EnterCriticalSection(&uv__signal_lock);
-
- err = uv__signal_register(signum);
- if (err) {
- /* Uh-oh, didn't work. */
- LeaveCriticalSection(&uv__signal_lock);
- return uv_translate_sys_error(err);
- }
-
- handle->signum = signum;
- RB_INSERT(uv_signal_tree_s, &uv__signal_tree, handle);
-
- LeaveCriticalSection(&uv__signal_lock);
-
- handle->signal_cb = signal_cb;
- uv__handle_start(handle);
-
- return 0;
-}
-
-
-void uv_process_signal_req(uv_loop_t* loop, uv_signal_t* handle,
- uv_req_t* req) {
- long dispatched_signum;
-
- assert(handle->type == UV_SIGNAL);
- assert(req->type == UV_SIGNAL_REQ);
-
- dispatched_signum = InterlockedExchange(
- (volatile LONG*) &handle->pending_signum, 0);
- assert(dispatched_signum != 0);
-
- /* Check if the pending signal equals the signum that we are watching for. */
- /* These can get out of sync when the handler is stopped and restarted */
- /* while the signal_req is pending. */
- if (dispatched_signum == handle->signum)
- handle->signal_cb(handle, dispatched_signum);
-
- if (handle->flags & UV__HANDLE_CLOSING) {
- /* When it is closing, it must be stopped at this point. */
- assert(handle->signum == 0);
- uv_want_endgame(loop, (uv_handle_t*) handle);
- }
-}
-
-
-void uv_signal_close(uv_loop_t* loop, uv_signal_t* handle) {
- uv_signal_stop(handle);
- uv__handle_closing(handle);
-
- if (handle->pending_signum == 0) {
- uv_want_endgame(loop, (uv_handle_t*) handle);
- }
-}
-
-
-void uv_signal_endgame(uv_loop_t* loop, uv_signal_t* handle) {
- assert(handle->flags & UV__HANDLE_CLOSING);
- assert(!(handle->flags & UV_HANDLE_CLOSED));
-
- assert(handle->signum == 0);
- assert(handle->pending_signum == 0);
-
- handle->flags |= UV_HANDLE_CLOSED;
-
- uv__handle_close(handle);
-}
diff --git a/3rdparty/libuv/src/win/snprintf.c b/3rdparty/libuv/src/win/snprintf.c
deleted file mode 100644
index 776c0e39217..00000000000
--- a/3rdparty/libuv/src/win/snprintf.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Copyright the libuv project contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#if defined(_MSC_VER) && _MSC_VER < 1900
-
-#include <stdio.h>
-#include <stdarg.h>
-
-/* Emulate snprintf() on MSVC<2015, _snprintf() doesn't zero-terminate the buffer
- * on overflow...
- */
-int snprintf(char* buf, size_t len, const char* fmt, ...) {
- int n;
- va_list ap;
- va_start(ap, fmt);
-
- n = _vscprintf(fmt, ap);
- vsnprintf_s(buf, len, _TRUNCATE, fmt, ap);
-
- va_end(ap);
- return n;
-}
-
-#endif
diff --git a/3rdparty/libuv/src/win/stream-inl.h b/3rdparty/libuv/src/win/stream-inl.h
deleted file mode 100644
index b7a3c11958c..00000000000
--- a/3rdparty/libuv/src/win/stream-inl.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#ifndef UV_WIN_STREAM_INL_H_
-#define UV_WIN_STREAM_INL_H_
-
-#include <assert.h>
-
-#include "uv.h"
-#include "internal.h"
-#include "handle-inl.h"
-#include "req-inl.h"
-
-
-INLINE static void uv_stream_init(uv_loop_t* loop,
- uv_stream_t* handle,
- uv_handle_type type) {
- uv__handle_init(loop, (uv_handle_t*) handle, type);
- handle->write_queue_size = 0;
- handle->activecnt = 0;
-}
-
-
-INLINE static void uv_connection_init(uv_stream_t* handle) {
- handle->flags |= UV_HANDLE_CONNECTION;
- handle->stream.conn.write_reqs_pending = 0;
-
- uv_req_init(handle->loop, (uv_req_t*) &(handle->read_req));
- handle->read_req.event_handle = NULL;
- handle->read_req.wait_handle = INVALID_HANDLE_VALUE;
- handle->read_req.type = UV_READ;
- handle->read_req.data = handle;
-
- handle->stream.conn.shutdown_req = NULL;
-}
-
-
-#endif /* UV_WIN_STREAM_INL_H_ */
diff --git a/3rdparty/libuv/src/win/stream.c b/3rdparty/libuv/src/win/stream.c
deleted file mode 100644
index a2466e5e9db..00000000000
--- a/3rdparty/libuv/src/win/stream.c
+++ /dev/null
@@ -1,249 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include <assert.h>
-
-#include "uv.h"
-#include "internal.h"
-#include "handle-inl.h"
-#include "req-inl.h"
-
-
-int uv_listen(uv_stream_t* stream, int backlog, uv_connection_cb cb) {
- int err;
-
- err = ERROR_INVALID_PARAMETER;
- switch (stream->type) {
- case UV_TCP:
- err = uv_tcp_listen((uv_tcp_t*)stream, backlog, cb);
- break;
- case UV_NAMED_PIPE:
- err = uv_pipe_listen((uv_pipe_t*)stream, backlog, cb);
- break;
- default:
- assert(0);
- }
-
- return uv_translate_sys_error(err);
-}
-
-
-int uv_accept(uv_stream_t* server, uv_stream_t* client) {
- int err;
-
- err = ERROR_INVALID_PARAMETER;
- switch (server->type) {
- case UV_TCP:
- err = uv_tcp_accept((uv_tcp_t*)server, (uv_tcp_t*)client);
- break;
- case UV_NAMED_PIPE:
- err = uv_pipe_accept((uv_pipe_t*)server, client);
- break;
- default:
- assert(0);
- }
-
- return uv_translate_sys_error(err);
-}
-
-
-int uv_read_start(uv_stream_t* handle, uv_alloc_cb alloc_cb,
- uv_read_cb read_cb) {
- int err;
-
- if (handle->flags & UV_HANDLE_READING) {
- return UV_EALREADY;
- }
-
- if (!(handle->flags & UV_HANDLE_READABLE)) {
- return UV_ENOTCONN;
- }
-
- err = ERROR_INVALID_PARAMETER;
- switch (handle->type) {
- case UV_TCP:
- err = uv_tcp_read_start((uv_tcp_t*)handle, alloc_cb, read_cb);
- break;
- case UV_NAMED_PIPE:
- err = uv_pipe_read_start((uv_pipe_t*)handle, alloc_cb, read_cb);
- break;
- case UV_TTY:
- err = uv_tty_read_start((uv_tty_t*) handle, alloc_cb, read_cb);
- break;
- default:
- assert(0);
- }
-
- return uv_translate_sys_error(err);
-}
-
-
-int uv_read_stop(uv_stream_t* handle) {
- int err;
-
- if (!(handle->flags & UV_HANDLE_READING))
- return 0;
-
- err = 0;
- if (handle->type == UV_TTY) {
- err = uv_tty_read_stop((uv_tty_t*) handle);
- } else {
- if (handle->type == UV_NAMED_PIPE) {
- uv__pipe_stop_read((uv_pipe_t*) handle);
- } else {
- handle->flags &= ~UV_HANDLE_READING;
- }
- DECREASE_ACTIVE_COUNT(handle->loop, handle);
- }
-
- return uv_translate_sys_error(err);
-}
-
-
-int uv_write(uv_write_t* req,
- uv_stream_t* handle,
- const uv_buf_t bufs[],
- unsigned int nbufs,
- uv_write_cb cb) {
- uv_loop_t* loop = handle->loop;
- int err;
-
- if (!(handle->flags & UV_HANDLE_WRITABLE)) {
- return UV_EPIPE;
- }
-
- err = ERROR_INVALID_PARAMETER;
- switch (handle->type) {
- case UV_TCP:
- err = uv_tcp_write(loop, req, (uv_tcp_t*) handle, bufs, nbufs, cb);
- break;
- case UV_NAMED_PIPE:
- err = uv_pipe_write(loop, req, (uv_pipe_t*) handle, bufs, nbufs, cb);
- break;
- case UV_TTY:
- err = uv_tty_write(loop, req, (uv_tty_t*) handle, bufs, nbufs, cb);
- break;
- default:
- assert(0);
- }
-
- return uv_translate_sys_error(err);
-}
-
-
-int uv_write2(uv_write_t* req,
- uv_stream_t* handle,
- const uv_buf_t bufs[],
- unsigned int nbufs,
- uv_stream_t* send_handle,
- uv_write_cb cb) {
- uv_loop_t* loop = handle->loop;
- int err;
-
- if (!(handle->flags & UV_HANDLE_WRITABLE)) {
- return UV_EPIPE;
- }
-
- err = ERROR_INVALID_PARAMETER;
- switch (handle->type) {
- case UV_NAMED_PIPE:
- err = uv_pipe_write2(loop,
- req,
- (uv_pipe_t*) handle,
- bufs,
- nbufs,
- send_handle,
- cb);
- break;
- default:
- assert(0);
- }
-
- return uv_translate_sys_error(err);
-}
-
-
-int uv_try_write(uv_stream_t* stream,
- const uv_buf_t bufs[],
- unsigned int nbufs) {
- if (stream->flags & UV__HANDLE_CLOSING)
- return UV_EBADF;
- if (!(stream->flags & UV_HANDLE_WRITABLE))
- return UV_EPIPE;
-
- switch (stream->type) {
- case UV_TCP:
- return uv__tcp_try_write((uv_tcp_t*) stream, bufs, nbufs);
- case UV_TTY:
- return uv__tty_try_write((uv_tty_t*) stream, bufs, nbufs);
- case UV_NAMED_PIPE:
- return UV_EAGAIN;
- default:
- assert(0);
- return UV_ENOSYS;
- }
-}
-
-
-int uv_shutdown(uv_shutdown_t* req, uv_stream_t* handle, uv_shutdown_cb cb) {
- uv_loop_t* loop = handle->loop;
-
- if (!(handle->flags & UV_HANDLE_WRITABLE)) {
- return UV_EPIPE;
- }
-
- uv_req_init(loop, (uv_req_t*) req);
- req->type = UV_SHUTDOWN;
- req->handle = handle;
- req->cb = cb;
-
- handle->flags &= ~UV_HANDLE_WRITABLE;
- handle->stream.conn.shutdown_req = req;
- handle->reqs_pending++;
- REGISTER_HANDLE_REQ(loop, handle, req);
-
- uv_want_endgame(loop, (uv_handle_t*)handle);
-
- return 0;
-}
-
-
-int uv_is_readable(const uv_stream_t* handle) {
- return !!(handle->flags & UV_HANDLE_READABLE);
-}
-
-
-int uv_is_writable(const uv_stream_t* handle) {
- return !!(handle->flags & UV_HANDLE_WRITABLE);
-}
-
-
-int uv_stream_set_blocking(uv_stream_t* handle, int blocking) {
- if (handle->type != UV_NAMED_PIPE)
- return UV_EINVAL;
-
- if (blocking != 0)
- handle->flags |= UV_HANDLE_BLOCKING_WRITES;
- else
- handle->flags &= ~UV_HANDLE_BLOCKING_WRITES;
-
- return 0;
-}
diff --git a/3rdparty/libuv/src/win/tcp.c b/3rdparty/libuv/src/win/tcp.c
deleted file mode 100644
index 0f5654863e9..00000000000
--- a/3rdparty/libuv/src/win/tcp.c
+++ /dev/null
@@ -1,1507 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include <assert.h>
-#include <stdlib.h>
-
-#include "uv.h"
-#include "internal.h"
-#include "handle-inl.h"
-#include "stream-inl.h"
-#include "req-inl.h"
-
-
-/*
- * Threshold of active tcp streams for which to preallocate tcp read buffers.
- * (Due to node slab allocator performing poorly under this pattern,
- * the optimization is temporarily disabled (threshold=0). This will be
- * revisited once node allocator is improved.)
- */
-const unsigned int uv_active_tcp_streams_threshold = 0;
-
-/*
- * Number of simultaneous pending AcceptEx calls.
- */
-const unsigned int uv_simultaneous_server_accepts = 32;
-
-/* A zero-size buffer for use by uv_tcp_read */
-static char uv_zero_[] = "";
-
-static int uv__tcp_nodelay(uv_tcp_t* handle, SOCKET socket, int enable) {
- if (setsockopt(socket,
- IPPROTO_TCP,
- TCP_NODELAY,
- (const char*)&enable,
- sizeof enable) == -1) {
- return WSAGetLastError();
- }
- return 0;
-}
-
-
-static int uv__tcp_keepalive(uv_tcp_t* handle, SOCKET socket, int enable, unsigned int delay) {
- if (setsockopt(socket,
- SOL_SOCKET,
- SO_KEEPALIVE,
- (const char*)&enable,
- sizeof enable) == -1) {
- return WSAGetLastError();
- }
-
- if (enable && setsockopt(socket,
- IPPROTO_TCP,
- TCP_KEEPALIVE,
- (const char*)&delay,
- sizeof delay) == -1) {
- return WSAGetLastError();
- }
-
- return 0;
-}
-
-
-static int uv_tcp_set_socket(uv_loop_t* loop,
- uv_tcp_t* handle,
- SOCKET socket,
- int family,
- int imported) {
- DWORD yes = 1;
- int non_ifs_lsp;
- int err;
-
- if (handle->socket != INVALID_SOCKET)
- return UV_EBUSY;
-
- /* Set the socket to nonblocking mode */
- if (ioctlsocket(socket, FIONBIO, &yes) == SOCKET_ERROR) {
- return WSAGetLastError();
- }
-
- /* Make the socket non-inheritable */
- if (!SetHandleInformation((HANDLE) socket, HANDLE_FLAG_INHERIT, 0))
- return GetLastError();
-
- /* Associate it with the I/O completion port. */
- /* Use uv_handle_t pointer as completion key. */
- if (CreateIoCompletionPort((HANDLE)socket,
- loop->iocp,
- (ULONG_PTR)socket,
- 0) == NULL) {
- if (imported) {
- handle->flags |= UV_HANDLE_EMULATE_IOCP;
- } else {
- return GetLastError();
- }
- }
-
- if (family == AF_INET6) {
- non_ifs_lsp = uv_tcp_non_ifs_lsp_ipv6;
- } else {
- non_ifs_lsp = uv_tcp_non_ifs_lsp_ipv4;
- }
-
- if (pSetFileCompletionNotificationModes &&
- !(handle->flags & UV_HANDLE_EMULATE_IOCP) && !non_ifs_lsp) {
- if (pSetFileCompletionNotificationModes((HANDLE) socket,
- FILE_SKIP_SET_EVENT_ON_HANDLE |
- FILE_SKIP_COMPLETION_PORT_ON_SUCCESS)) {
- handle->flags |= UV_HANDLE_SYNC_BYPASS_IOCP;
- } else if (GetLastError() != ERROR_INVALID_FUNCTION) {
- return GetLastError();
- }
- }
-
- if (handle->flags & UV_HANDLE_TCP_NODELAY) {
- err = uv__tcp_nodelay(handle, socket, 1);
- if (err)
- return err;
- }
-
- /* TODO: Use stored delay. */
- if (handle->flags & UV_HANDLE_TCP_KEEPALIVE) {
- err = uv__tcp_keepalive(handle, socket, 1, 60);
- if (err)
- return err;
- }
-
- handle->socket = socket;
-
- if (family == AF_INET6) {
- handle->flags |= UV_HANDLE_IPV6;
- } else {
- assert(!(handle->flags & UV_HANDLE_IPV6));
- }
-
- return 0;
-}
-
-
-int uv_tcp_init_ex(uv_loop_t* loop, uv_tcp_t* handle, unsigned int flags) {
- int domain;
-
- /* Use the lower 8 bits for the domain */
- domain = flags & 0xFF;
- if (domain != AF_INET && domain != AF_INET6 && domain != AF_UNSPEC)
- return UV_EINVAL;
-
- if (flags & ~0xFF)
- return UV_EINVAL;
-
- uv_stream_init(loop, (uv_stream_t*) handle, UV_TCP);
- handle->tcp.serv.accept_reqs = NULL;
- handle->tcp.serv.pending_accepts = NULL;
- handle->socket = INVALID_SOCKET;
- handle->reqs_pending = 0;
- handle->tcp.serv.func_acceptex = NULL;
- handle->tcp.conn.func_connectex = NULL;
- handle->tcp.serv.processed_accepts = 0;
- handle->delayed_error = 0;
-
- /* If anything fails beyond this point we need to remove the handle from
- * the handle queue, since it was added by uv__handle_init in uv_stream_init.
- */
-
- if (domain != AF_UNSPEC) {
- SOCKET sock;
- DWORD err;
-
- sock = socket(domain, SOCK_STREAM, 0);
- if (sock == INVALID_SOCKET) {
- err = WSAGetLastError();
- QUEUE_REMOVE(&handle->handle_queue);
- return uv_translate_sys_error(err);
- }
-
- err = uv_tcp_set_socket(handle->loop, handle, sock, domain, 0);
- if (err) {
- closesocket(sock);
- QUEUE_REMOVE(&handle->handle_queue);
- return uv_translate_sys_error(err);
- }
-
- }
-
- return 0;
-}
-
-
-int uv_tcp_init(uv_loop_t* loop, uv_tcp_t* handle) {
- return uv_tcp_init_ex(loop, handle, AF_UNSPEC);
-}
-
-
-void uv_tcp_endgame(uv_loop_t* loop, uv_tcp_t* handle) {
- int err;
- unsigned int i;
- uv_tcp_accept_t* req;
-
- if (handle->flags & UV_HANDLE_CONNECTION &&
- handle->stream.conn.shutdown_req != NULL &&
- handle->stream.conn.write_reqs_pending == 0) {
-
- UNREGISTER_HANDLE_REQ(loop, handle, handle->stream.conn.shutdown_req);
-
- err = 0;
- if (handle->flags & UV__HANDLE_CLOSING) {
- err = ERROR_OPERATION_ABORTED;
- } else if (shutdown(handle->socket, SD_SEND) == SOCKET_ERROR) {
- err = WSAGetLastError();
- }
-
- if (handle->stream.conn.shutdown_req->cb) {
- handle->stream.conn.shutdown_req->cb(handle->stream.conn.shutdown_req,
- uv_translate_sys_error(err));
- }
-
- handle->stream.conn.shutdown_req = NULL;
- DECREASE_PENDING_REQ_COUNT(handle);
- return;
- }
-
- if (handle->flags & UV__HANDLE_CLOSING &&
- handle->reqs_pending == 0) {
- assert(!(handle->flags & UV_HANDLE_CLOSED));
-
- if (!(handle->flags & UV_HANDLE_TCP_SOCKET_CLOSED)) {
- closesocket(handle->socket);
- handle->socket = INVALID_SOCKET;
- handle->flags |= UV_HANDLE_TCP_SOCKET_CLOSED;
- }
-
- if (!(handle->flags & UV_HANDLE_CONNECTION) && handle->tcp.serv.accept_reqs) {
- if (handle->flags & UV_HANDLE_EMULATE_IOCP) {
- for (i = 0; i < uv_simultaneous_server_accepts; i++) {
- req = &handle->tcp.serv.accept_reqs[i];
- if (req->wait_handle != INVALID_HANDLE_VALUE) {
- UnregisterWait(req->wait_handle);
- req->wait_handle = INVALID_HANDLE_VALUE;
- }
- if (req->event_handle) {
- CloseHandle(req->event_handle);
- req->event_handle = NULL;
- }
- }
- }
-
- uv__free(handle->tcp.serv.accept_reqs);
- handle->tcp.serv.accept_reqs = NULL;
- }
-
- if (handle->flags & UV_HANDLE_CONNECTION &&
- handle->flags & UV_HANDLE_EMULATE_IOCP) {
- if (handle->read_req.wait_handle != INVALID_HANDLE_VALUE) {
- UnregisterWait(handle->read_req.wait_handle);
- handle->read_req.wait_handle = INVALID_HANDLE_VALUE;
- }
- if (handle->read_req.event_handle) {
- CloseHandle(handle->read_req.event_handle);
- handle->read_req.event_handle = NULL;
- }
- }
-
- uv__handle_close(handle);
- loop->active_tcp_streams--;
- }
-}
-
-
-/* Unlike on Unix, here we don't set SO_REUSEADDR, because it doesn't just
- * allow binding to addresses that are in use by sockets in TIME_WAIT, it
- * effectively allows 'stealing' a port which is in use by another application.
- *
- * SO_EXCLUSIVEADDRUSE is also not good here because it does check all sockets,
- * regardless of state, so we'd get an error even if the port is in use by a
- * socket in TIME_WAIT state.
- *
- * See issue #1360.
- *
- */
-static int uv_tcp_try_bind(uv_tcp_t* handle,
- const struct sockaddr* addr,
- unsigned int addrlen,
- unsigned int flags) {
- DWORD err;
- int r;
-
- if (handle->socket == INVALID_SOCKET) {
- SOCKET sock;
-
- /* Cannot set IPv6-only mode on non-IPv6 socket. */
- if ((flags & UV_TCP_IPV6ONLY) && addr->sa_family != AF_INET6)
- return ERROR_INVALID_PARAMETER;
-
- sock = socket(addr->sa_family, SOCK_STREAM, 0);
- if (sock == INVALID_SOCKET) {
- return WSAGetLastError();
- }
-
- err = uv_tcp_set_socket(handle->loop, handle, sock, addr->sa_family, 0);
- if (err) {
- closesocket(sock);
- return err;
- }
- }
-
-#ifdef IPV6_V6ONLY
- if (addr->sa_family == AF_INET6) {
- int on;
-
- on = (flags & UV_TCP_IPV6ONLY) != 0;
-
- /* TODO: how to handle errors? This may fail if there is no ipv4 stack */
- /* available, or when run on XP/2003 which have no support for dualstack */
- /* sockets. For now we're silently ignoring the error. */
- setsockopt(handle->socket,
- IPPROTO_IPV6,
- IPV6_V6ONLY,
- (const char*)&on,
- sizeof on);
- }
-#endif
-
- r = bind(handle->socket, addr, addrlen);
-
- if (r == SOCKET_ERROR) {
- err = WSAGetLastError();
- if (err == WSAEADDRINUSE) {
- /* Some errors are not to be reported until connect() or listen() */
- handle->delayed_error = err;
- } else {
- return err;
- }
- }
-
- handle->flags |= UV_HANDLE_BOUND;
-
- return 0;
-}
-
-
-static void CALLBACK post_completion(void* context, BOOLEAN timed_out) {
- uv_req_t* req;
- uv_tcp_t* handle;
-
- req = (uv_req_t*) context;
- assert(req != NULL);
- handle = (uv_tcp_t*)req->data;
- assert(handle != NULL);
- assert(!timed_out);
-
- if (!PostQueuedCompletionStatus(handle->loop->iocp,
- req->u.io.overlapped.InternalHigh,
- 0,
- &req->u.io.overlapped)) {
- uv_fatal_error(GetLastError(), "PostQueuedCompletionStatus");
- }
-}
-
-
-static void CALLBACK post_write_completion(void* context, BOOLEAN timed_out) {
- uv_write_t* req;
- uv_tcp_t* handle;
-
- req = (uv_write_t*) context;
- assert(req != NULL);
- handle = (uv_tcp_t*)req->handle;
- assert(handle != NULL);
- assert(!timed_out);
-
- if (!PostQueuedCompletionStatus(handle->loop->iocp,
- req->u.io.overlapped.InternalHigh,
- 0,
- &req->u.io.overlapped)) {
- uv_fatal_error(GetLastError(), "PostQueuedCompletionStatus");
- }
-}
-
-
-static void uv_tcp_queue_accept(uv_tcp_t* handle, uv_tcp_accept_t* req) {
- uv_loop_t* loop = handle->loop;
- BOOL success;
- DWORD bytes;
- SOCKET accept_socket;
- short family;
-
- assert(handle->flags & UV_HANDLE_LISTENING);
- assert(req->accept_socket == INVALID_SOCKET);
-
- /* choose family and extension function */
- if (handle->flags & UV_HANDLE_IPV6) {
- family = AF_INET6;
- } else {
- family = AF_INET;
- }
-
- /* Open a socket for the accepted connection. */
- accept_socket = socket(family, SOCK_STREAM, 0);
- if (accept_socket == INVALID_SOCKET) {
- SET_REQ_ERROR(req, WSAGetLastError());
- uv_insert_pending_req(loop, (uv_req_t*)req);
- handle->reqs_pending++;
- return;
- }
-
- /* Make the socket non-inheritable */
- if (!SetHandleInformation((HANDLE) accept_socket, HANDLE_FLAG_INHERIT, 0)) {
- SET_REQ_ERROR(req, GetLastError());
- uv_insert_pending_req(loop, (uv_req_t*)req);
- handle->reqs_pending++;
- closesocket(accept_socket);
- return;
- }
-
- /* Prepare the overlapped structure. */
- memset(&(req->u.io.overlapped), 0, sizeof(req->u.io.overlapped));
- if (handle->flags & UV_HANDLE_EMULATE_IOCP) {
- req->u.io.overlapped.hEvent = (HANDLE) ((ULONG_PTR) req->event_handle | 1);
- }
-
- success = handle->tcp.serv.func_acceptex(handle->socket,
- accept_socket,
- (void*)req->accept_buffer,
- 0,
- sizeof(struct sockaddr_storage),
- sizeof(struct sockaddr_storage),
- &bytes,
- &req->u.io.overlapped);
-
- if (UV_SUCCEEDED_WITHOUT_IOCP(success)) {
- /* Process the req without IOCP. */
- req->accept_socket = accept_socket;
- handle->reqs_pending++;
- uv_insert_pending_req(loop, (uv_req_t*)req);
- } else if (UV_SUCCEEDED_WITH_IOCP(success)) {
- /* The req will be processed with IOCP. */
- req->accept_socket = accept_socket;
- handle->reqs_pending++;
- if (handle->flags & UV_HANDLE_EMULATE_IOCP &&
- req->wait_handle == INVALID_HANDLE_VALUE &&
- !RegisterWaitForSingleObject(&req->wait_handle,
- req->event_handle, post_completion, (void*) req,
- INFINITE, WT_EXECUTEINWAITTHREAD)) {
- SET_REQ_ERROR(req, GetLastError());
- uv_insert_pending_req(loop, (uv_req_t*)req);
- handle->reqs_pending++;
- return;
- }
- } else {
- /* Make this req pending reporting an error. */
- SET_REQ_ERROR(req, WSAGetLastError());
- uv_insert_pending_req(loop, (uv_req_t*)req);
- handle->reqs_pending++;
- /* Destroy the preallocated client socket. */
- closesocket(accept_socket);
- /* Destroy the event handle */
- if (handle->flags & UV_HANDLE_EMULATE_IOCP) {
- CloseHandle(req->u.io.overlapped.hEvent);
- req->event_handle = NULL;
- }
- }
-}
-
-
-static void uv_tcp_queue_read(uv_loop_t* loop, uv_tcp_t* handle) {
- uv_read_t* req;
- uv_buf_t buf;
- int result;
- DWORD bytes, flags;
-
- assert(handle->flags & UV_HANDLE_READING);
- assert(!(handle->flags & UV_HANDLE_READ_PENDING));
-
- req = &handle->read_req;
- memset(&req->u.io.overlapped, 0, sizeof(req->u.io.overlapped));
-
- /*
- * Preallocate a read buffer if the number of active streams is below
- * the threshold.
- */
- if (loop->active_tcp_streams < uv_active_tcp_streams_threshold) {
- handle->flags &= ~UV_HANDLE_ZERO_READ;
- handle->alloc_cb((uv_handle_t*) handle, 65536, &handle->tcp.conn.read_buffer);
- if (handle->tcp.conn.read_buffer.len == 0) {
- handle->read_cb((uv_stream_t*) handle, UV_ENOBUFS, &handle->tcp.conn.read_buffer);
- return;
- }
- assert(handle->tcp.conn.read_buffer.base != NULL);
- buf = handle->tcp.conn.read_buffer;
- } else {
- handle->flags |= UV_HANDLE_ZERO_READ;
- buf.base = (char*) &uv_zero_;
- buf.len = 0;
- }
-
- /* Prepare the overlapped structure. */
- memset(&(req->u.io.overlapped), 0, sizeof(req->u.io.overlapped));
- if (handle->flags & UV_HANDLE_EMULATE_IOCP) {
- assert(req->event_handle);
- req->u.io.overlapped.hEvent = (HANDLE) ((ULONG_PTR) req->event_handle | 1);
- }
-
- flags = 0;
- result = WSARecv(handle->socket,
- (WSABUF*)&buf,
- 1,
- &bytes,
- &flags,
- &req->u.io.overlapped,
- NULL);
-
- if (UV_SUCCEEDED_WITHOUT_IOCP(result == 0)) {
- /* Process the req without IOCP. */
- handle->flags |= UV_HANDLE_READ_PENDING;
- req->u.io.overlapped.InternalHigh = bytes;
- handle->reqs_pending++;
- uv_insert_pending_req(loop, (uv_req_t*)req);
- } else if (UV_SUCCEEDED_WITH_IOCP(result == 0)) {
- /* The req will be processed with IOCP. */
- handle->flags |= UV_HANDLE_READ_PENDING;
- handle->reqs_pending++;
- if (handle->flags & UV_HANDLE_EMULATE_IOCP &&
- req->wait_handle == INVALID_HANDLE_VALUE &&
- !RegisterWaitForSingleObject(&req->wait_handle,
- req->event_handle, post_completion, (void*) req,
- INFINITE, WT_EXECUTEINWAITTHREAD)) {
- SET_REQ_ERROR(req, GetLastError());
- uv_insert_pending_req(loop, (uv_req_t*)req);
- }
- } else {
- /* Make this req pending reporting an error. */
- SET_REQ_ERROR(req, WSAGetLastError());
- uv_insert_pending_req(loop, (uv_req_t*)req);
- handle->reqs_pending++;
- }
-}
-
-
-int uv_tcp_listen(uv_tcp_t* handle, int backlog, uv_connection_cb cb) {
- uv_loop_t* loop = handle->loop;
- unsigned int i, simultaneous_accepts;
- uv_tcp_accept_t* req;
- int err;
-
- assert(backlog > 0);
-
- if (handle->flags & UV_HANDLE_LISTENING) {
- handle->stream.serv.connection_cb = cb;
- }
-
- if (handle->flags & UV_HANDLE_READING) {
- return WSAEISCONN;
- }
-
- if (handle->delayed_error) {
- return handle->delayed_error;
- }
-
- if (!(handle->flags & UV_HANDLE_BOUND)) {
- err = uv_tcp_try_bind(handle,
- (const struct sockaddr*) &uv_addr_ip4_any_,
- sizeof(uv_addr_ip4_any_),
- 0);
- if (err)
- return err;
- if (handle->delayed_error)
- return handle->delayed_error;
- }
-
- if (!handle->tcp.serv.func_acceptex) {
- if (!uv_get_acceptex_function(handle->socket, &handle->tcp.serv.func_acceptex)) {
- return WSAEAFNOSUPPORT;
- }
- }
-
- if (!(handle->flags & UV_HANDLE_SHARED_TCP_SOCKET) &&
- listen(handle->socket, backlog) == SOCKET_ERROR) {
- return WSAGetLastError();
- }
-
- handle->flags |= UV_HANDLE_LISTENING;
- handle->stream.serv.connection_cb = cb;
- INCREASE_ACTIVE_COUNT(loop, handle);
-
- simultaneous_accepts = handle->flags & UV_HANDLE_TCP_SINGLE_ACCEPT ? 1
- : uv_simultaneous_server_accepts;
-
- if(!handle->tcp.serv.accept_reqs) {
- handle->tcp.serv.accept_reqs = (uv_tcp_accept_t*)
- uv__malloc(uv_simultaneous_server_accepts * sizeof(uv_tcp_accept_t));
- if (!handle->tcp.serv.accept_reqs) {
- uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc");
- }
-
- for (i = 0; i < simultaneous_accepts; i++) {
- req = &handle->tcp.serv.accept_reqs[i];
- uv_req_init(loop, (uv_req_t*)req);
- req->type = UV_ACCEPT;
- req->accept_socket = INVALID_SOCKET;
- req->data = handle;
-
- req->wait_handle = INVALID_HANDLE_VALUE;
- if (handle->flags & UV_HANDLE_EMULATE_IOCP) {
- req->event_handle = CreateEvent(NULL, 0, 0, NULL);
- if (!req->event_handle) {
- uv_fatal_error(GetLastError(), "CreateEvent");
- }
- } else {
- req->event_handle = NULL;
- }
-
- uv_tcp_queue_accept(handle, req);
- }
-
- /* Initialize other unused requests too, because uv_tcp_endgame */
- /* doesn't know how how many requests were initialized, so it will */
- /* try to clean up {uv_simultaneous_server_accepts} requests. */
- for (i = simultaneous_accepts; i < uv_simultaneous_server_accepts; i++) {
- req = &handle->tcp.serv.accept_reqs[i];
- uv_req_init(loop, (uv_req_t*) req);
- req->type = UV_ACCEPT;
- req->accept_socket = INVALID_SOCKET;
- req->data = handle;
- req->wait_handle = INVALID_HANDLE_VALUE;
- req->event_handle = NULL;
- }
- }
-
- return 0;
-}
-
-
-int uv_tcp_accept(uv_tcp_t* server, uv_tcp_t* client) {
- uv_loop_t* loop = server->loop;
- int err = 0;
- int family;
-
- uv_tcp_accept_t* req = server->tcp.serv.pending_accepts;
-
- if (!req) {
- /* No valid connections found, so we error out. */
- return WSAEWOULDBLOCK;
- }
-
- if (req->accept_socket == INVALID_SOCKET) {
- return WSAENOTCONN;
- }
-
- if (server->flags & UV_HANDLE_IPV6) {
- family = AF_INET6;
- } else {
- family = AF_INET;
- }
-
- err = uv_tcp_set_socket(client->loop,
- client,
- req->accept_socket,
- family,
- 0);
- if (err) {
- closesocket(req->accept_socket);
- } else {
- uv_connection_init((uv_stream_t*) client);
- /* AcceptEx() implicitly binds the accepted socket. */
- client->flags |= UV_HANDLE_BOUND | UV_HANDLE_READABLE | UV_HANDLE_WRITABLE;
- }
-
- /* Prepare the req to pick up a new connection */
- server->tcp.serv.pending_accepts = req->next_pending;
- req->next_pending = NULL;
- req->accept_socket = INVALID_SOCKET;
-
- if (!(server->flags & UV__HANDLE_CLOSING)) {
- /* Check if we're in a middle of changing the number of pending accepts. */
- if (!(server->flags & UV_HANDLE_TCP_ACCEPT_STATE_CHANGING)) {
- uv_tcp_queue_accept(server, req);
- } else {
- /* We better be switching to a single pending accept. */
- assert(server->flags & UV_HANDLE_TCP_SINGLE_ACCEPT);
-
- server->tcp.serv.processed_accepts++;
-
- if (server->tcp.serv.processed_accepts >= uv_simultaneous_server_accepts) {
- server->tcp.serv.processed_accepts = 0;
- /*
- * All previously queued accept requests are now processed.
- * We now switch to queueing just a single accept.
- */
- uv_tcp_queue_accept(server, &server->tcp.serv.accept_reqs[0]);
- server->flags &= ~UV_HANDLE_TCP_ACCEPT_STATE_CHANGING;
- server->flags |= UV_HANDLE_TCP_SINGLE_ACCEPT;
- }
- }
- }
-
- loop->active_tcp_streams++;
-
- return err;
-}
-
-
-int uv_tcp_read_start(uv_tcp_t* handle, uv_alloc_cb alloc_cb,
- uv_read_cb read_cb) {
- uv_loop_t* loop = handle->loop;
-
- handle->flags |= UV_HANDLE_READING;
- handle->read_cb = read_cb;
- handle->alloc_cb = alloc_cb;
- INCREASE_ACTIVE_COUNT(loop, handle);
-
- /* If reading was stopped and then started again, there could still be a */
- /* read request pending. */
- if (!(handle->flags & UV_HANDLE_READ_PENDING)) {
- if (handle->flags & UV_HANDLE_EMULATE_IOCP &&
- !handle->read_req.event_handle) {
- handle->read_req.event_handle = CreateEvent(NULL, 0, 0, NULL);
- if (!handle->read_req.event_handle) {
- uv_fatal_error(GetLastError(), "CreateEvent");
- }
- }
- uv_tcp_queue_read(loop, handle);
- }
-
- return 0;
-}
-
-
-static int uv_tcp_try_connect(uv_connect_t* req,
- uv_tcp_t* handle,
- const struct sockaddr* addr,
- unsigned int addrlen,
- uv_connect_cb cb) {
- uv_loop_t* loop = handle->loop;
- const struct sockaddr* bind_addr;
- BOOL success;
- DWORD bytes;
- int err;
-
- if (handle->delayed_error) {
- return handle->delayed_error;
- }
-
- if (!(handle->flags & UV_HANDLE_BOUND)) {
- if (addrlen == sizeof(uv_addr_ip4_any_)) {
- bind_addr = (const struct sockaddr*) &uv_addr_ip4_any_;
- } else if (addrlen == sizeof(uv_addr_ip6_any_)) {
- bind_addr = (const struct sockaddr*) &uv_addr_ip6_any_;
- } else {
- abort();
- }
- err = uv_tcp_try_bind(handle, bind_addr, addrlen, 0);
- if (err)
- return err;
- if (handle->delayed_error)
- return handle->delayed_error;
- }
-
- if (!handle->tcp.conn.func_connectex) {
- if (!uv_get_connectex_function(handle->socket, &handle->tcp.conn.func_connectex)) {
- return WSAEAFNOSUPPORT;
- }
- }
-
- uv_req_init(loop, (uv_req_t*) req);
- req->type = UV_CONNECT;
- req->handle = (uv_stream_t*) handle;
- req->cb = cb;
- memset(&req->u.io.overlapped, 0, sizeof(req->u.io.overlapped));
-
- success = handle->tcp.conn.func_connectex(handle->socket,
- addr,
- addrlen,
- NULL,
- 0,
- &bytes,
- &req->u.io.overlapped);
-
- if (UV_SUCCEEDED_WITHOUT_IOCP(success)) {
- /* Process the req without IOCP. */
- handle->reqs_pending++;
- REGISTER_HANDLE_REQ(loop, handle, req);
- uv_insert_pending_req(loop, (uv_req_t*)req);
- } else if (UV_SUCCEEDED_WITH_IOCP(success)) {
- /* The req will be processed with IOCP. */
- handle->reqs_pending++;
- REGISTER_HANDLE_REQ(loop, handle, req);
- } else {
- return WSAGetLastError();
- }
-
- return 0;
-}
-
-
-int uv_tcp_getsockname(const uv_tcp_t* handle,
- struct sockaddr* name,
- int* namelen) {
- int result;
-
- if (handle->socket == INVALID_SOCKET) {
- return UV_EINVAL;
- }
-
- if (handle->delayed_error) {
- return uv_translate_sys_error(handle->delayed_error);
- }
-
- result = getsockname(handle->socket, name, namelen);
- if (result != 0) {
- return uv_translate_sys_error(WSAGetLastError());
- }
-
- return 0;
-}
-
-
-int uv_tcp_getpeername(const uv_tcp_t* handle,
- struct sockaddr* name,
- int* namelen) {
- int result;
-
- if (handle->socket == INVALID_SOCKET) {
- return UV_EINVAL;
- }
-
- if (handle->delayed_error) {
- return uv_translate_sys_error(handle->delayed_error);
- }
-
- result = getpeername(handle->socket, name, namelen);
- if (result != 0) {
- return uv_translate_sys_error(WSAGetLastError());
- }
-
- return 0;
-}
-
-
-int uv_tcp_write(uv_loop_t* loop,
- uv_write_t* req,
- uv_tcp_t* handle,
- const uv_buf_t bufs[],
- unsigned int nbufs,
- uv_write_cb cb) {
- int result;
- DWORD bytes;
-
- uv_req_init(loop, (uv_req_t*) req);
- req->type = UV_WRITE;
- req->handle = (uv_stream_t*) handle;
- req->cb = cb;
-
- /* Prepare the overlapped structure. */
- memset(&(req->u.io.overlapped), 0, sizeof(req->u.io.overlapped));
- if (handle->flags & UV_HANDLE_EMULATE_IOCP) {
- req->event_handle = CreateEvent(NULL, 0, 0, NULL);
- if (!req->event_handle) {
- uv_fatal_error(GetLastError(), "CreateEvent");
- }
- req->u.io.overlapped.hEvent = (HANDLE) ((ULONG_PTR) req->event_handle | 1);
- req->wait_handle = INVALID_HANDLE_VALUE;
- }
-
- result = WSASend(handle->socket,
- (WSABUF*) bufs,
- nbufs,
- &bytes,
- 0,
- &req->u.io.overlapped,
- NULL);
-
- if (UV_SUCCEEDED_WITHOUT_IOCP(result == 0)) {
- /* Request completed immediately. */
- req->u.io.queued_bytes = 0;
- handle->reqs_pending++;
- handle->stream.conn.write_reqs_pending++;
- REGISTER_HANDLE_REQ(loop, handle, req);
- uv_insert_pending_req(loop, (uv_req_t*) req);
- } else if (UV_SUCCEEDED_WITH_IOCP(result == 0)) {
- /* Request queued by the kernel. */
- req->u.io.queued_bytes = uv__count_bufs(bufs, nbufs);
- handle->reqs_pending++;
- handle->stream.conn.write_reqs_pending++;
- REGISTER_HANDLE_REQ(loop, handle, req);
- handle->write_queue_size += req->u.io.queued_bytes;
- if (handle->flags & UV_HANDLE_EMULATE_IOCP &&
- !RegisterWaitForSingleObject(&req->wait_handle,
- req->event_handle, post_write_completion, (void*) req,
- INFINITE, WT_EXECUTEINWAITTHREAD | WT_EXECUTEONLYONCE)) {
- SET_REQ_ERROR(req, GetLastError());
- uv_insert_pending_req(loop, (uv_req_t*)req);
- }
- } else {
- /* Send failed due to an error, report it later */
- req->u.io.queued_bytes = 0;
- handle->reqs_pending++;
- handle->stream.conn.write_reqs_pending++;
- REGISTER_HANDLE_REQ(loop, handle, req);
- SET_REQ_ERROR(req, WSAGetLastError());
- uv_insert_pending_req(loop, (uv_req_t*) req);
- }
-
- return 0;
-}
-
-
-int uv__tcp_try_write(uv_tcp_t* handle,
- const uv_buf_t bufs[],
- unsigned int nbufs) {
- int result;
- DWORD bytes;
-
- if (handle->stream.conn.write_reqs_pending > 0)
- return UV_EAGAIN;
-
- result = WSASend(handle->socket,
- (WSABUF*) bufs,
- nbufs,
- &bytes,
- 0,
- NULL,
- NULL);
-
- if (result == SOCKET_ERROR)
- return uv_translate_sys_error(WSAGetLastError());
- else
- return bytes;
-}
-
-
-void uv_process_tcp_read_req(uv_loop_t* loop, uv_tcp_t* handle,
- uv_req_t* req) {
- DWORD bytes, flags, err;
- uv_buf_t buf;
-
- assert(handle->type == UV_TCP);
-
- handle->flags &= ~UV_HANDLE_READ_PENDING;
-
- if (!REQ_SUCCESS(req)) {
- /* An error occurred doing the read. */
- if ((handle->flags & UV_HANDLE_READING) ||
- !(handle->flags & UV_HANDLE_ZERO_READ)) {
- handle->flags &= ~UV_HANDLE_READING;
- DECREASE_ACTIVE_COUNT(loop, handle);
- buf = (handle->flags & UV_HANDLE_ZERO_READ) ?
- uv_buf_init(NULL, 0) : handle->tcp.conn.read_buffer;
-
- err = GET_REQ_SOCK_ERROR(req);
-
- if (err == WSAECONNABORTED) {
- /*
- * Turn WSAECONNABORTED into UV_ECONNRESET to be consistent with Unix.
- */
- err = WSAECONNRESET;
- }
-
- handle->read_cb((uv_stream_t*)handle,
- uv_translate_sys_error(err),
- &buf);
- }
- } else {
- if (!(handle->flags & UV_HANDLE_ZERO_READ)) {
- /* The read was done with a non-zero buffer length. */
- if (req->u.io.overlapped.InternalHigh > 0) {
- /* Successful read */
- handle->read_cb((uv_stream_t*)handle,
- req->u.io.overlapped.InternalHigh,
- &handle->tcp.conn.read_buffer);
- /* Read again only if bytes == buf.len */
- if (req->u.io.overlapped.InternalHigh < handle->tcp.conn.read_buffer.len) {
- goto done;
- }
- } else {
- /* Connection closed */
- if (handle->flags & UV_HANDLE_READING) {
- handle->flags &= ~UV_HANDLE_READING;
- DECREASE_ACTIVE_COUNT(loop, handle);
- }
- handle->flags &= ~UV_HANDLE_READABLE;
-
- buf.base = 0;
- buf.len = 0;
- handle->read_cb((uv_stream_t*)handle, UV_EOF, &handle->tcp.conn.read_buffer);
- goto done;
- }
- }
-
- /* Do nonblocking reads until the buffer is empty */
- while (handle->flags & UV_HANDLE_READING) {
- handle->alloc_cb((uv_handle_t*) handle, 65536, &buf);
- if (buf.len == 0) {
- handle->read_cb((uv_stream_t*) handle, UV_ENOBUFS, &buf);
- break;
- }
- assert(buf.base != NULL);
-
- flags = 0;
- if (WSARecv(handle->socket,
- (WSABUF*)&buf,
- 1,
- &bytes,
- &flags,
- NULL,
- NULL) != SOCKET_ERROR) {
- if (bytes > 0) {
- /* Successful read */
- handle->read_cb((uv_stream_t*)handle, bytes, &buf);
- /* Read again only if bytes == buf.len */
- if (bytes < buf.len) {
- break;
- }
- } else {
- /* Connection closed */
- handle->flags &= ~(UV_HANDLE_READING | UV_HANDLE_READABLE);
- DECREASE_ACTIVE_COUNT(loop, handle);
-
- handle->read_cb((uv_stream_t*)handle, UV_EOF, &buf);
- break;
- }
- } else {
- err = WSAGetLastError();
- if (err == WSAEWOULDBLOCK) {
- /* Read buffer was completely empty, report a 0-byte read. */
- handle->read_cb((uv_stream_t*)handle, 0, &buf);
- } else {
- /* Ouch! serious error. */
- handle->flags &= ~UV_HANDLE_READING;
- DECREASE_ACTIVE_COUNT(loop, handle);
-
- if (err == WSAECONNABORTED) {
- /* Turn WSAECONNABORTED into UV_ECONNRESET to be consistent with */
- /* Unix. */
- err = WSAECONNRESET;
- }
-
- handle->read_cb((uv_stream_t*)handle,
- uv_translate_sys_error(err),
- &buf);
- }
- break;
- }
- }
-
-done:
- /* Post another read if still reading and not closing. */
- if ((handle->flags & UV_HANDLE_READING) &&
- !(handle->flags & UV_HANDLE_READ_PENDING)) {
- uv_tcp_queue_read(loop, handle);
- }
- }
-
- DECREASE_PENDING_REQ_COUNT(handle);
-}
-
-
-void uv_process_tcp_write_req(uv_loop_t* loop, uv_tcp_t* handle,
- uv_write_t* req) {
- int err;
-
- assert(handle->type == UV_TCP);
-
- assert(handle->write_queue_size >= req->u.io.queued_bytes);
- handle->write_queue_size -= req->u.io.queued_bytes;
-
- UNREGISTER_HANDLE_REQ(loop, handle, req);
-
- if (handle->flags & UV_HANDLE_EMULATE_IOCP) {
- if (req->wait_handle != INVALID_HANDLE_VALUE) {
- UnregisterWait(req->wait_handle);
- req->wait_handle = INVALID_HANDLE_VALUE;
- }
- if (req->event_handle) {
- CloseHandle(req->event_handle);
- req->event_handle = NULL;
- }
- }
-
- if (req->cb) {
- err = uv_translate_sys_error(GET_REQ_SOCK_ERROR(req));
- if (err == UV_ECONNABORTED) {
- /* use UV_ECANCELED for consistency with Unix */
- err = UV_ECANCELED;
- }
- req->cb(req, err);
- }
-
- handle->stream.conn.write_reqs_pending--;
- if (handle->stream.conn.shutdown_req != NULL &&
- handle->stream.conn.write_reqs_pending == 0) {
- uv_want_endgame(loop, (uv_handle_t*)handle);
- }
-
- DECREASE_PENDING_REQ_COUNT(handle);
-}
-
-
-void uv_process_tcp_accept_req(uv_loop_t* loop, uv_tcp_t* handle,
- uv_req_t* raw_req) {
- uv_tcp_accept_t* req = (uv_tcp_accept_t*) raw_req;
- int err;
-
- assert(handle->type == UV_TCP);
-
- /* If handle->accepted_socket is not a valid socket, then */
- /* uv_queue_accept must have failed. This is a serious error. We stop */
- /* accepting connections and report this error to the connection */
- /* callback. */
- if (req->accept_socket == INVALID_SOCKET) {
- if (handle->flags & UV_HANDLE_LISTENING) {
- handle->flags &= ~UV_HANDLE_LISTENING;
- DECREASE_ACTIVE_COUNT(loop, handle);
- if (handle->stream.serv.connection_cb) {
- err = GET_REQ_SOCK_ERROR(req);
- handle->stream.serv.connection_cb((uv_stream_t*)handle,
- uv_translate_sys_error(err));
- }
- }
- } else if (REQ_SUCCESS(req) &&
- setsockopt(req->accept_socket,
- SOL_SOCKET,
- SO_UPDATE_ACCEPT_CONTEXT,
- (char*)&handle->socket,
- sizeof(handle->socket)) == 0) {
- req->next_pending = handle->tcp.serv.pending_accepts;
- handle->tcp.serv.pending_accepts = req;
-
- /* Accept and SO_UPDATE_ACCEPT_CONTEXT were successful. */
- if (handle->stream.serv.connection_cb) {
- handle->stream.serv.connection_cb((uv_stream_t*)handle, 0);
- }
- } else {
- /* Error related to accepted socket is ignored because the server */
- /* socket may still be healthy. If the server socket is broken */
- /* uv_queue_accept will detect it. */
- closesocket(req->accept_socket);
- req->accept_socket = INVALID_SOCKET;
- if (handle->flags & UV_HANDLE_LISTENING) {
- uv_tcp_queue_accept(handle, req);
- }
- }
-
- DECREASE_PENDING_REQ_COUNT(handle);
-}
-
-
-void uv_process_tcp_connect_req(uv_loop_t* loop, uv_tcp_t* handle,
- uv_connect_t* req) {
- int err;
-
- assert(handle->type == UV_TCP);
-
- UNREGISTER_HANDLE_REQ(loop, handle, req);
-
- err = 0;
- if (REQ_SUCCESS(req)) {
- if (setsockopt(handle->socket,
- SOL_SOCKET,
- SO_UPDATE_CONNECT_CONTEXT,
- NULL,
- 0) == 0) {
- uv_connection_init((uv_stream_t*)handle);
- handle->flags |= UV_HANDLE_READABLE | UV_HANDLE_WRITABLE;
- loop->active_tcp_streams++;
- } else {
- err = WSAGetLastError();
- }
- } else {
- err = GET_REQ_SOCK_ERROR(req);
- }
- req->cb(req, uv_translate_sys_error(err));
-
- DECREASE_PENDING_REQ_COUNT(handle);
-}
-
-
-int uv_tcp_import(uv_tcp_t* tcp, uv__ipc_socket_info_ex* socket_info_ex,
- int tcp_connection) {
- int err;
- SOCKET socket = WSASocketW(FROM_PROTOCOL_INFO,
- FROM_PROTOCOL_INFO,
- FROM_PROTOCOL_INFO,
- &socket_info_ex->socket_info,
- 0,
- WSA_FLAG_OVERLAPPED);
-
- if (socket == INVALID_SOCKET) {
- return WSAGetLastError();
- }
-
- err = uv_tcp_set_socket(tcp->loop,
- tcp,
- socket,
- socket_info_ex->socket_info.iAddressFamily,
- 1);
- if (err) {
- closesocket(socket);
- return err;
- }
-
- if (tcp_connection) {
- uv_connection_init((uv_stream_t*)tcp);
- tcp->flags |= UV_HANDLE_READABLE | UV_HANDLE_WRITABLE;
- }
-
- tcp->flags |= UV_HANDLE_BOUND;
- tcp->flags |= UV_HANDLE_SHARED_TCP_SOCKET;
-
- tcp->delayed_error = socket_info_ex->delayed_error;
-
- tcp->loop->active_tcp_streams++;
- return 0;
-}
-
-
-int uv_tcp_nodelay(uv_tcp_t* handle, int enable) {
- int err;
-
- if (handle->socket != INVALID_SOCKET) {
- err = uv__tcp_nodelay(handle, handle->socket, enable);
- if (err)
- return err;
- }
-
- if (enable) {
- handle->flags |= UV_HANDLE_TCP_NODELAY;
- } else {
- handle->flags &= ~UV_HANDLE_TCP_NODELAY;
- }
-
- return 0;
-}
-
-
-int uv_tcp_keepalive(uv_tcp_t* handle, int enable, unsigned int delay) {
- int err;
-
- if (handle->socket != INVALID_SOCKET) {
- err = uv__tcp_keepalive(handle, handle->socket, enable, delay);
- if (err)
- return err;
- }
-
- if (enable) {
- handle->flags |= UV_HANDLE_TCP_KEEPALIVE;
- } else {
- handle->flags &= ~UV_HANDLE_TCP_KEEPALIVE;
- }
-
- /* TODO: Store delay if handle->socket isn't created yet. */
-
- return 0;
-}
-
-
-int uv_tcp_duplicate_socket(uv_tcp_t* handle, int pid,
- LPWSAPROTOCOL_INFOW protocol_info) {
- if (!(handle->flags & UV_HANDLE_CONNECTION)) {
- /*
- * We're about to share the socket with another process. Because
- * this is a listening socket, we assume that the other process will
- * be accepting connections on it. So, before sharing the socket
- * with another process, we call listen here in the parent process.
- */
-
- if (!(handle->flags & UV_HANDLE_LISTENING)) {
- if (!(handle->flags & UV_HANDLE_BOUND)) {
- return ERROR_INVALID_PARAMETER;
- }
-
- if (!(handle->delayed_error)) {
- if (listen(handle->socket, SOMAXCONN) == SOCKET_ERROR) {
- handle->delayed_error = WSAGetLastError();
- }
- }
- }
- }
-
- if (WSADuplicateSocketW(handle->socket, pid, protocol_info)) {
- return WSAGetLastError();
- }
-
- handle->flags |= UV_HANDLE_SHARED_TCP_SOCKET;
-
- return 0;
-}
-
-
-int uv_tcp_simultaneous_accepts(uv_tcp_t* handle, int enable) {
- if (handle->flags & UV_HANDLE_CONNECTION) {
- return UV_EINVAL;
- }
-
- /* Check if we're already in the desired mode. */
- if ((enable && !(handle->flags & UV_HANDLE_TCP_SINGLE_ACCEPT)) ||
- (!enable && handle->flags & UV_HANDLE_TCP_SINGLE_ACCEPT)) {
- return 0;
- }
-
- /* Don't allow switching from single pending accept to many. */
- if (enable) {
- return UV_ENOTSUP;
- }
-
- /* Check if we're in a middle of changing the number of pending accepts. */
- if (handle->flags & UV_HANDLE_TCP_ACCEPT_STATE_CHANGING) {
- return 0;
- }
-
- handle->flags |= UV_HANDLE_TCP_SINGLE_ACCEPT;
-
- /* Flip the changing flag if we have already queued multiple accepts. */
- if (handle->flags & UV_HANDLE_LISTENING) {
- handle->flags |= UV_HANDLE_TCP_ACCEPT_STATE_CHANGING;
- }
-
- return 0;
-}
-
-
-static int uv_tcp_try_cancel_io(uv_tcp_t* tcp) {
- SOCKET socket = tcp->socket;
- int non_ifs_lsp;
-
- /* Check if we have any non-IFS LSPs stacked on top of TCP */
- non_ifs_lsp = (tcp->flags & UV_HANDLE_IPV6) ? uv_tcp_non_ifs_lsp_ipv6 :
- uv_tcp_non_ifs_lsp_ipv4;
-
- /* If there are non-ifs LSPs then try to obtain a base handle for the */
- /* socket. This will always fail on Windows XP/3k. */
- if (non_ifs_lsp) {
- DWORD bytes;
- if (WSAIoctl(socket,
- SIO_BASE_HANDLE,
- NULL,
- 0,
- &socket,
- sizeof socket,
- &bytes,
- NULL,
- NULL) != 0) {
- /* Failed. We can't do CancelIo. */
- return -1;
- }
- }
-
- assert(socket != 0 && socket != INVALID_SOCKET);
-
- if (!CancelIo((HANDLE) socket)) {
- return GetLastError();
- }
-
- /* It worked. */
- return 0;
-}
-
-
-void uv_tcp_close(uv_loop_t* loop, uv_tcp_t* tcp) {
- int close_socket = 1;
-
- if (tcp->flags & UV_HANDLE_READ_PENDING) {
- /* In order for winsock to do a graceful close there must not be any */
- /* any pending reads, or the socket must be shut down for writing */
- if (!(tcp->flags & UV_HANDLE_SHARED_TCP_SOCKET)) {
- /* Just do shutdown on non-shared sockets, which ensures graceful close. */
- shutdown(tcp->socket, SD_SEND);
-
- } else if (uv_tcp_try_cancel_io(tcp) == 0) {
- /* In case of a shared socket, we try to cancel all outstanding I/O, */
- /* If that works, don't close the socket yet - wait for the read req to */
- /* return and close the socket in uv_tcp_endgame. */
- close_socket = 0;
-
- } else {
- /* When cancelling isn't possible - which could happen when an LSP is */
- /* present on an old Windows version, we will have to close the socket */
- /* with a read pending. That is not nice because trailing sent bytes */
- /* may not make it to the other side. */
- }
-
- } else if ((tcp->flags & UV_HANDLE_SHARED_TCP_SOCKET) &&
- tcp->tcp.serv.accept_reqs != NULL) {
- /* Under normal circumstances closesocket() will ensure that all pending */
- /* accept reqs are canceled. However, when the socket is shared the */
- /* presence of another reference to the socket in another process will */
- /* keep the accept reqs going, so we have to ensure that these are */
- /* canceled. */
- if (uv_tcp_try_cancel_io(tcp) != 0) {
- /* When cancellation is not possible, there is another option: we can */
- /* close the incoming sockets, which will also cancel the accept */
- /* operations. However this is not cool because we might inadvertently */
- /* close a socket that just accepted a new connection, which will */
- /* cause the connection to be aborted. */
- unsigned int i;
- for (i = 0; i < uv_simultaneous_server_accepts; i++) {
- uv_tcp_accept_t* req = &tcp->tcp.serv.accept_reqs[i];
- if (req->accept_socket != INVALID_SOCKET &&
- !HasOverlappedIoCompleted(&req->u.io.overlapped)) {
- closesocket(req->accept_socket);
- req->accept_socket = INVALID_SOCKET;
- }
- }
- }
- }
-
- if (tcp->flags & UV_HANDLE_READING) {
- tcp->flags &= ~UV_HANDLE_READING;
- DECREASE_ACTIVE_COUNT(loop, tcp);
- }
-
- if (tcp->flags & UV_HANDLE_LISTENING) {
- tcp->flags &= ~UV_HANDLE_LISTENING;
- DECREASE_ACTIVE_COUNT(loop, tcp);
- }
-
- if (close_socket) {
- closesocket(tcp->socket);
- tcp->socket = INVALID_SOCKET;
- tcp->flags |= UV_HANDLE_TCP_SOCKET_CLOSED;
- }
-
- tcp->flags &= ~(UV_HANDLE_READABLE | UV_HANDLE_WRITABLE);
- uv__handle_closing(tcp);
-
- if (tcp->reqs_pending == 0) {
- uv_want_endgame(tcp->loop, (uv_handle_t*)tcp);
- }
-}
-
-
-int uv_tcp_open(uv_tcp_t* handle, uv_os_sock_t sock) {
- WSAPROTOCOL_INFOW protocol_info;
- int opt_len;
- int err;
-
- /* Detect the address family of the socket. */
- opt_len = (int) sizeof protocol_info;
- if (getsockopt(sock,
- SOL_SOCKET,
- SO_PROTOCOL_INFOW,
- (char*) &protocol_info,
- &opt_len) == SOCKET_ERROR) {
- return uv_translate_sys_error(GetLastError());
- }
-
- err = uv_tcp_set_socket(handle->loop,
- handle,
- sock,
- protocol_info.iAddressFamily,
- 1);
- if (err) {
- return uv_translate_sys_error(err);
- }
-
- return 0;
-}
-
-
-/* This function is an egress point, i.e. it returns libuv errors rather than
- * system errors.
- */
-int uv__tcp_bind(uv_tcp_t* handle,
- const struct sockaddr* addr,
- unsigned int addrlen,
- unsigned int flags) {
- int err;
-
- err = uv_tcp_try_bind(handle, addr, addrlen, flags);
- if (err)
- return uv_translate_sys_error(err);
-
- return 0;
-}
-
-
-/* This function is an egress point, i.e. it returns libuv errors rather than
- * system errors.
- */
-int uv__tcp_connect(uv_connect_t* req,
- uv_tcp_t* handle,
- const struct sockaddr* addr,
- unsigned int addrlen,
- uv_connect_cb cb) {
- int err;
-
- err = uv_tcp_try_connect(req, handle, addr, addrlen, cb);
- if (err)
- return uv_translate_sys_error(err);
-
- return 0;
-}
diff --git a/3rdparty/libuv/src/win/thread.c b/3rdparty/libuv/src/win/thread.c
deleted file mode 100644
index 91684e93875..00000000000
--- a/3rdparty/libuv/src/win/thread.c
+++ /dev/null
@@ -1,697 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include <assert.h>
-#include <limits.h>
-#include <stdlib.h>
-
-#include "uv.h"
-#include "internal.h"
-
-
-#define HAVE_CONDVAR_API() (pInitializeConditionVariable != NULL)
-
-static int uv_cond_fallback_init(uv_cond_t* cond);
-static void uv_cond_fallback_destroy(uv_cond_t* cond);
-static void uv_cond_fallback_signal(uv_cond_t* cond);
-static void uv_cond_fallback_broadcast(uv_cond_t* cond);
-static void uv_cond_fallback_wait(uv_cond_t* cond, uv_mutex_t* mutex);
-static int uv_cond_fallback_timedwait(uv_cond_t* cond,
- uv_mutex_t* mutex, uint64_t timeout);
-
-static int uv_cond_condvar_init(uv_cond_t* cond);
-static void uv_cond_condvar_destroy(uv_cond_t* cond);
-static void uv_cond_condvar_signal(uv_cond_t* cond);
-static void uv_cond_condvar_broadcast(uv_cond_t* cond);
-static void uv_cond_condvar_wait(uv_cond_t* cond, uv_mutex_t* mutex);
-static int uv_cond_condvar_timedwait(uv_cond_t* cond,
- uv_mutex_t* mutex, uint64_t timeout);
-
-
-static void uv__once_inner(uv_once_t* guard, void (*callback)(void)) {
- DWORD result;
- HANDLE existing_event, created_event;
-
- created_event = CreateEvent(NULL, 1, 0, NULL);
- if (created_event == 0) {
- /* Could fail in a low-memory situation? */
- uv_fatal_error(GetLastError(), "CreateEvent");
- }
-
- existing_event = InterlockedCompareExchangePointer(&guard->event,
- created_event,
- NULL);
-
- if (existing_event == NULL) {
- /* We won the race */
- callback();
-
- result = SetEvent(created_event);
- assert(result);
- guard->ran = 1;
-
- } else {
- /* We lost the race. Destroy the event we created and wait for the */
- /* existing one to become signaled. */
- CloseHandle(created_event);
- result = WaitForSingleObject(existing_event, INFINITE);
- assert(result == WAIT_OBJECT_0);
- }
-}
-
-
-void uv_once(uv_once_t* guard, void (*callback)(void)) {
- /* Fast case - avoid WaitForSingleObject. */
- if (guard->ran) {
- return;
- }
-
- uv__once_inner(guard, callback);
-}
-
-
-/* Verify that uv_thread_t can be stored in a TLS slot. */
-STATIC_ASSERT(sizeof(uv_thread_t) <= sizeof(void*));
-
-static uv_key_t uv__current_thread_key;
-static uv_once_t uv__current_thread_init_guard = UV_ONCE_INIT;
-
-
-static void uv__init_current_thread_key(void) {
- if (uv_key_create(&uv__current_thread_key))
- abort();
-}
-
-
-struct thread_ctx {
- void (*entry)(void* arg);
- void* arg;
- uv_thread_t self;
-};
-
-
-static UINT __stdcall uv__thread_start(void* arg) {
- struct thread_ctx *ctx_p;
- struct thread_ctx ctx;
-
- ctx_p = arg;
- ctx = *ctx_p;
- uv__free(ctx_p);
-
- uv_once(&uv__current_thread_init_guard, uv__init_current_thread_key);
- uv_key_set(&uv__current_thread_key, (void*) ctx.self);
-
- ctx.entry(ctx.arg);
-
- return 0;
-}
-
-
-int uv_thread_create(uv_thread_t *tid, void (*entry)(void *arg), void *arg) {
- struct thread_ctx* ctx;
- int err;
- HANDLE thread;
-
- ctx = uv__malloc(sizeof(*ctx));
- if (ctx == NULL)
- return UV_ENOMEM;
-
- ctx->entry = entry;
- ctx->arg = arg;
-
- /* Create the thread in suspended state so we have a chance to pass
- * its own creation handle to it */
- thread = (HANDLE) _beginthreadex(NULL,
- 0,
- uv__thread_start,
- ctx,
- CREATE_SUSPENDED,
- NULL);
- if (thread == NULL) {
- err = errno;
- uv__free(ctx);
- } else {
- err = 0;
- *tid = thread;
- ctx->self = thread;
- ResumeThread(thread);
- }
-
- switch (err) {
- case 0:
- return 0;
- case EACCES:
- return UV_EACCES;
- case EAGAIN:
- return UV_EAGAIN;
- case EINVAL:
- return UV_EINVAL;
- }
-
- return UV_EIO;
-}
-
-
-uv_thread_t uv_thread_self(void) {
- uv_once(&uv__current_thread_init_guard, uv__init_current_thread_key);
- return (uv_thread_t) uv_key_get(&uv__current_thread_key);
-}
-
-
-int uv_thread_join(uv_thread_t *tid) {
- if (WaitForSingleObject(*tid, INFINITE))
- return uv_translate_sys_error(GetLastError());
- else {
- CloseHandle(*tid);
- *tid = 0;
- return 0;
- }
-}
-
-
-int uv_thread_equal(const uv_thread_t* t1, const uv_thread_t* t2) {
- return *t1 == *t2;
-}
-
-
-int uv_mutex_init(uv_mutex_t* mutex) {
- InitializeCriticalSection(mutex);
- return 0;
-}
-
-
-void uv_mutex_destroy(uv_mutex_t* mutex) {
- DeleteCriticalSection(mutex);
-}
-
-
-void uv_mutex_lock(uv_mutex_t* mutex) {
- EnterCriticalSection(mutex);
-}
-
-
-int uv_mutex_trylock(uv_mutex_t* mutex) {
- if (TryEnterCriticalSection(mutex))
- return 0;
- else
- return UV_EBUSY;
-}
-
-
-void uv_mutex_unlock(uv_mutex_t* mutex) {
- LeaveCriticalSection(mutex);
-}
-
-
-int uv_rwlock_init(uv_rwlock_t* rwlock) {
- /* Initialize the semaphore that acts as the write lock. */
- HANDLE handle = CreateSemaphoreW(NULL, 1, 1, NULL);
- if (handle == NULL)
- return uv_translate_sys_error(GetLastError());
- rwlock->state_.write_semaphore_ = handle;
-
- /* Initialize the critical section protecting the reader count. */
- InitializeCriticalSection(&rwlock->state_.num_readers_lock_);
-
- /* Initialize the reader count. */
- rwlock->state_.num_readers_ = 0;
-
- return 0;
-}
-
-
-void uv_rwlock_destroy(uv_rwlock_t* rwlock) {
- DeleteCriticalSection(&rwlock->state_.num_readers_lock_);
- CloseHandle(rwlock->state_.write_semaphore_);
-}
-
-
-void uv_rwlock_rdlock(uv_rwlock_t* rwlock) {
- /* Acquire the lock that protects the reader count. */
- EnterCriticalSection(&rwlock->state_.num_readers_lock_);
-
- /* Increase the reader count, and lock for write if this is the first
- * reader.
- */
- if (++rwlock->state_.num_readers_ == 1) {
- DWORD r = WaitForSingleObject(rwlock->state_.write_semaphore_, INFINITE);
- if (r != WAIT_OBJECT_0)
- uv_fatal_error(GetLastError(), "WaitForSingleObject");
- }
-
- /* Release the lock that protects the reader count. */
- LeaveCriticalSection(&rwlock->state_.num_readers_lock_);
-}
-
-
-int uv_rwlock_tryrdlock(uv_rwlock_t* rwlock) {
- int err;
-
- if (!TryEnterCriticalSection(&rwlock->state_.num_readers_lock_))
- return UV_EBUSY;
-
- err = 0;
-
- if (rwlock->state_.num_readers_ == 0) {
- /* Currently there are no other readers, which means that the write lock
- * needs to be acquired.
- */
- DWORD r = WaitForSingleObject(rwlock->state_.write_semaphore_, 0);
- if (r == WAIT_OBJECT_0)
- rwlock->state_.num_readers_++;
- else if (r == WAIT_TIMEOUT)
- err = UV_EBUSY;
- else if (r == WAIT_FAILED)
- uv_fatal_error(GetLastError(), "WaitForSingleObject");
-
- } else {
- /* The write lock has already been acquired because there are other
- * active readers.
- */
- rwlock->state_.num_readers_++;
- }
-
- LeaveCriticalSection(&rwlock->state_.num_readers_lock_);
- return err;
-}
-
-
-void uv_rwlock_rdunlock(uv_rwlock_t* rwlock) {
- EnterCriticalSection(&rwlock->state_.num_readers_lock_);
-
- if (--rwlock->state_.num_readers_ == 0) {
- if (!ReleaseSemaphore(rwlock->state_.write_semaphore_, 1, NULL))
- uv_fatal_error(GetLastError(), "ReleaseSemaphore");
- }
-
- LeaveCriticalSection(&rwlock->state_.num_readers_lock_);
-}
-
-
-void uv_rwlock_wrlock(uv_rwlock_t* rwlock) {
- DWORD r = WaitForSingleObject(rwlock->state_.write_semaphore_, INFINITE);
- if (r != WAIT_OBJECT_0)
- uv_fatal_error(GetLastError(), "WaitForSingleObject");
-}
-
-
-int uv_rwlock_trywrlock(uv_rwlock_t* rwlock) {
- DWORD r = WaitForSingleObject(rwlock->state_.write_semaphore_, 0);
- if (r == WAIT_OBJECT_0)
- return 0;
- else if (r == WAIT_TIMEOUT)
- return UV_EBUSY;
- else
- uv_fatal_error(GetLastError(), "WaitForSingleObject");
-}
-
-
-void uv_rwlock_wrunlock(uv_rwlock_t* rwlock) {
- if (!ReleaseSemaphore(rwlock->state_.write_semaphore_, 1, NULL))
- uv_fatal_error(GetLastError(), "ReleaseSemaphore");
-}
-
-
-int uv_sem_init(uv_sem_t* sem, unsigned int value) {
- *sem = CreateSemaphore(NULL, value, INT_MAX, NULL);
- if (*sem == NULL)
- return uv_translate_sys_error(GetLastError());
- else
- return 0;
-}
-
-
-void uv_sem_destroy(uv_sem_t* sem) {
- if (!CloseHandle(*sem))
- abort();
-}
-
-
-void uv_sem_post(uv_sem_t* sem) {
- if (!ReleaseSemaphore(*sem, 1, NULL))
- abort();
-}
-
-
-void uv_sem_wait(uv_sem_t* sem) {
- if (WaitForSingleObject(*sem, INFINITE) != WAIT_OBJECT_0)
- abort();
-}
-
-
-int uv_sem_trywait(uv_sem_t* sem) {
- DWORD r = WaitForSingleObject(*sem, 0);
-
- if (r == WAIT_OBJECT_0)
- return 0;
-
- if (r == WAIT_TIMEOUT)
- return UV_EAGAIN;
-
- abort();
- return -1; /* Satisfy the compiler. */
-}
-
-
-/* This condition variable implementation is based on the SetEvent solution
- * (section 3.2) at http://www.cs.wustl.edu/~schmidt/win32-cv-1.html
- * We could not use the SignalObjectAndWait solution (section 3.4) because
- * it want the 2nd argument (type uv_mutex_t) of uv_cond_wait() and
- * uv_cond_timedwait() to be HANDLEs, but we use CRITICAL_SECTIONs.
- */
-
-static int uv_cond_fallback_init(uv_cond_t* cond) {
- int err;
-
- /* Initialize the count to 0. */
- cond->fallback.waiters_count = 0;
-
- InitializeCriticalSection(&cond->fallback.waiters_count_lock);
-
- /* Create an auto-reset event. */
- cond->fallback.signal_event = CreateEvent(NULL, /* no security */
- FALSE, /* auto-reset event */
- FALSE, /* non-signaled initially */
- NULL); /* unnamed */
- if (!cond->fallback.signal_event) {
- err = GetLastError();
- goto error2;
- }
-
- /* Create a manual-reset event. */
- cond->fallback.broadcast_event = CreateEvent(NULL, /* no security */
- TRUE, /* manual-reset */
- FALSE, /* non-signaled */
- NULL); /* unnamed */
- if (!cond->fallback.broadcast_event) {
- err = GetLastError();
- goto error;
- }
-
- return 0;
-
-error:
- CloseHandle(cond->fallback.signal_event);
-error2:
- DeleteCriticalSection(&cond->fallback.waiters_count_lock);
- return uv_translate_sys_error(err);
-}
-
-
-static int uv_cond_condvar_init(uv_cond_t* cond) {
- pInitializeConditionVariable(&cond->cond_var);
- return 0;
-}
-
-
-int uv_cond_init(uv_cond_t* cond) {
- uv__once_init();
-
- if (HAVE_CONDVAR_API())
- return uv_cond_condvar_init(cond);
- else
- return uv_cond_fallback_init(cond);
-}
-
-
-static void uv_cond_fallback_destroy(uv_cond_t* cond) {
- if (!CloseHandle(cond->fallback.broadcast_event))
- abort();
- if (!CloseHandle(cond->fallback.signal_event))
- abort();
- DeleteCriticalSection(&cond->fallback.waiters_count_lock);
-}
-
-
-static void uv_cond_condvar_destroy(uv_cond_t* cond) {
- /* nothing to do */
-}
-
-
-void uv_cond_destroy(uv_cond_t* cond) {
- if (HAVE_CONDVAR_API())
- uv_cond_condvar_destroy(cond);
- else
- uv_cond_fallback_destroy(cond);
-}
-
-
-static void uv_cond_fallback_signal(uv_cond_t* cond) {
- int have_waiters;
-
- /* Avoid race conditions. */
- EnterCriticalSection(&cond->fallback.waiters_count_lock);
- have_waiters = cond->fallback.waiters_count > 0;
- LeaveCriticalSection(&cond->fallback.waiters_count_lock);
-
- if (have_waiters)
- SetEvent(cond->fallback.signal_event);
-}
-
-
-static void uv_cond_condvar_signal(uv_cond_t* cond) {
- pWakeConditionVariable(&cond->cond_var);
-}
-
-
-void uv_cond_signal(uv_cond_t* cond) {
- if (HAVE_CONDVAR_API())
- uv_cond_condvar_signal(cond);
- else
- uv_cond_fallback_signal(cond);
-}
-
-
-static void uv_cond_fallback_broadcast(uv_cond_t* cond) {
- int have_waiters;
-
- /* Avoid race conditions. */
- EnterCriticalSection(&cond->fallback.waiters_count_lock);
- have_waiters = cond->fallback.waiters_count > 0;
- LeaveCriticalSection(&cond->fallback.waiters_count_lock);
-
- if (have_waiters)
- SetEvent(cond->fallback.broadcast_event);
-}
-
-
-static void uv_cond_condvar_broadcast(uv_cond_t* cond) {
- pWakeAllConditionVariable(&cond->cond_var);
-}
-
-
-void uv_cond_broadcast(uv_cond_t* cond) {
- if (HAVE_CONDVAR_API())
- uv_cond_condvar_broadcast(cond);
- else
- uv_cond_fallback_broadcast(cond);
-}
-
-
-static int uv_cond_wait_helper(uv_cond_t* cond, uv_mutex_t* mutex,
- DWORD dwMilliseconds) {
- DWORD result;
- int last_waiter;
- HANDLE handles[2] = {
- cond->fallback.signal_event,
- cond->fallback.broadcast_event
- };
-
- /* Avoid race conditions. */
- EnterCriticalSection(&cond->fallback.waiters_count_lock);
- cond->fallback.waiters_count++;
- LeaveCriticalSection(&cond->fallback.waiters_count_lock);
-
- /* It's ok to release the <mutex> here since Win32 manual-reset events */
- /* maintain state when used with <SetEvent>. This avoids the "lost wakeup" */
- /* bug. */
- uv_mutex_unlock(mutex);
-
- /* Wait for either event to become signaled due to <uv_cond_signal> being */
- /* called or <uv_cond_broadcast> being called. */
- result = WaitForMultipleObjects(2, handles, FALSE, dwMilliseconds);
-
- EnterCriticalSection(&cond->fallback.waiters_count_lock);
- cond->fallback.waiters_count--;
- last_waiter = result == WAIT_OBJECT_0 + 1
- && cond->fallback.waiters_count == 0;
- LeaveCriticalSection(&cond->fallback.waiters_count_lock);
-
- /* Some thread called <pthread_cond_broadcast>. */
- if (last_waiter) {
- /* We're the last waiter to be notified or to stop waiting, so reset the */
- /* the manual-reset event. */
- ResetEvent(cond->fallback.broadcast_event);
- }
-
- /* Reacquire the <mutex>. */
- uv_mutex_lock(mutex);
-
- if (result == WAIT_OBJECT_0 || result == WAIT_OBJECT_0 + 1)
- return 0;
-
- if (result == WAIT_TIMEOUT)
- return UV_ETIMEDOUT;
-
- abort();
- return -1; /* Satisfy the compiler. */
-}
-
-
-static void uv_cond_fallback_wait(uv_cond_t* cond, uv_mutex_t* mutex) {
- if (uv_cond_wait_helper(cond, mutex, INFINITE))
- abort();
-}
-
-
-static void uv_cond_condvar_wait(uv_cond_t* cond, uv_mutex_t* mutex) {
- if (!pSleepConditionVariableCS(&cond->cond_var, mutex, INFINITE))
- abort();
-}
-
-
-void uv_cond_wait(uv_cond_t* cond, uv_mutex_t* mutex) {
- if (HAVE_CONDVAR_API())
- uv_cond_condvar_wait(cond, mutex);
- else
- uv_cond_fallback_wait(cond, mutex);
-}
-
-
-static int uv_cond_fallback_timedwait(uv_cond_t* cond,
- uv_mutex_t* mutex, uint64_t timeout) {
- return uv_cond_wait_helper(cond, mutex, (DWORD)(timeout / 1e6));
-}
-
-
-static int uv_cond_condvar_timedwait(uv_cond_t* cond,
- uv_mutex_t* mutex, uint64_t timeout) {
- if (pSleepConditionVariableCS(&cond->cond_var, mutex, (DWORD)(timeout / 1e6)))
- return 0;
- if (GetLastError() != ERROR_TIMEOUT)
- abort();
- return UV_ETIMEDOUT;
-}
-
-
-int uv_cond_timedwait(uv_cond_t* cond, uv_mutex_t* mutex,
- uint64_t timeout) {
- if (HAVE_CONDVAR_API())
- return uv_cond_condvar_timedwait(cond, mutex, timeout);
- else
- return uv_cond_fallback_timedwait(cond, mutex, timeout);
-}
-
-
-int uv_barrier_init(uv_barrier_t* barrier, unsigned int count) {
- int err;
-
- barrier->n = count;
- barrier->count = 0;
-
- err = uv_mutex_init(&barrier->mutex);
- if (err)
- return err;
-
- err = uv_sem_init(&barrier->turnstile1, 0);
- if (err)
- goto error2;
-
- err = uv_sem_init(&barrier->turnstile2, 1);
- if (err)
- goto error;
-
- return 0;
-
-error:
- uv_sem_destroy(&barrier->turnstile1);
-error2:
- uv_mutex_destroy(&barrier->mutex);
- return err;
-
-}
-
-
-void uv_barrier_destroy(uv_barrier_t* barrier) {
- uv_sem_destroy(&barrier->turnstile2);
- uv_sem_destroy(&barrier->turnstile1);
- uv_mutex_destroy(&barrier->mutex);
-}
-
-
-int uv_barrier_wait(uv_barrier_t* barrier) {
- int serial_thread;
-
- uv_mutex_lock(&barrier->mutex);
- if (++barrier->count == barrier->n) {
- uv_sem_wait(&barrier->turnstile2);
- uv_sem_post(&barrier->turnstile1);
- }
- uv_mutex_unlock(&barrier->mutex);
-
- uv_sem_wait(&barrier->turnstile1);
- uv_sem_post(&barrier->turnstile1);
-
- uv_mutex_lock(&barrier->mutex);
- serial_thread = (--barrier->count == 0);
- if (serial_thread) {
- uv_sem_wait(&barrier->turnstile1);
- uv_sem_post(&barrier->turnstile2);
- }
- uv_mutex_unlock(&barrier->mutex);
-
- uv_sem_wait(&barrier->turnstile2);
- uv_sem_post(&barrier->turnstile2);
- return serial_thread;
-}
-
-
-int uv_key_create(uv_key_t* key) {
- key->tls_index = TlsAlloc();
- if (key->tls_index == TLS_OUT_OF_INDEXES)
- return UV_ENOMEM;
- return 0;
-}
-
-
-void uv_key_delete(uv_key_t* key) {
- if (TlsFree(key->tls_index) == FALSE)
- abort();
- key->tls_index = TLS_OUT_OF_INDEXES;
-}
-
-
-void* uv_key_get(uv_key_t* key) {
- void* value;
-
- value = TlsGetValue(key->tls_index);
- if (value == NULL)
- if (GetLastError() != ERROR_SUCCESS)
- abort();
-
- return value;
-}
-
-
-void uv_key_set(uv_key_t* key, void* value) {
- if (TlsSetValue(key->tls_index, value) == FALSE)
- abort();
-}
diff --git a/3rdparty/libuv/src/win/timer.c b/3rdparty/libuv/src/win/timer.c
deleted file mode 100644
index 0da541a2c86..00000000000
--- a/3rdparty/libuv/src/win/timer.c
+++ /dev/null
@@ -1,200 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include <assert.h>
-#include <limits.h>
-
-#include "uv.h"
-#include "internal.h"
-#include "tree.h"
-#include "handle-inl.h"
-
-
-/* The number of milliseconds in one second. */
-#define UV__MILLISEC 1000
-
-
-void uv_update_time(uv_loop_t* loop) {
- uint64_t new_time = uv__hrtime(UV__MILLISEC);
- if (new_time > loop->time) {
- loop->time = new_time;
- }
-}
-
-void uv__time_forward(uv_loop_t* loop, uint64_t msecs) {
- loop->time += msecs;
-}
-
-
-static int uv_timer_compare(uv_timer_t* a, uv_timer_t* b) {
- if (a->due < b->due)
- return -1;
- if (a->due > b->due)
- return 1;
- /*
- * compare start_id when both has the same due. start_id is
- * allocated with loop->timer_counter in uv_timer_start().
- */
- if (a->start_id < b->start_id)
- return -1;
- if (a->start_id > b->start_id)
- return 1;
- return 0;
-}
-
-
-RB_GENERATE_STATIC(uv_timer_tree_s, uv_timer_s, tree_entry, uv_timer_compare);
-
-
-int uv_timer_init(uv_loop_t* loop, uv_timer_t* handle) {
- uv__handle_init(loop, (uv_handle_t*) handle, UV_TIMER);
- handle->timer_cb = NULL;
- handle->repeat = 0;
-
- return 0;
-}
-
-
-void uv_timer_endgame(uv_loop_t* loop, uv_timer_t* handle) {
- if (handle->flags & UV__HANDLE_CLOSING) {
- assert(!(handle->flags & UV_HANDLE_CLOSED));
- uv__handle_close(handle);
- }
-}
-
-
-static uint64_t get_clamped_due_time(uint64_t loop_time, uint64_t timeout) {
- uint64_t clamped_timeout;
-
- clamped_timeout = loop_time + timeout;
- if (clamped_timeout < timeout)
- clamped_timeout = (uint64_t) -1;
-
- return clamped_timeout;
-}
-
-
-int uv_timer_start(uv_timer_t* handle, uv_timer_cb timer_cb, uint64_t timeout,
- uint64_t repeat) {
- uv_loop_t* loop = handle->loop;
- uv_timer_t* old;
-
- if (timer_cb == NULL)
- return UV_EINVAL;
-
- if (uv__is_active(handle))
- uv_timer_stop(handle);
-
- handle->timer_cb = timer_cb;
- handle->due = get_clamped_due_time(loop->time, timeout);
- handle->repeat = repeat;
- uv__handle_start(handle);
-
- /* start_id is the second index to be compared in uv__timer_cmp() */
- handle->start_id = handle->loop->timer_counter++;
-
- old = RB_INSERT(uv_timer_tree_s, &loop->timers, handle);
- assert(old == NULL);
-
- return 0;
-}
-
-
-int uv_timer_stop(uv_timer_t* handle) {
- uv_loop_t* loop = handle->loop;
-
- if (!uv__is_active(handle))
- return 0;
-
- RB_REMOVE(uv_timer_tree_s, &loop->timers, handle);
- uv__handle_stop(handle);
-
- return 0;
-}
-
-
-int uv_timer_again(uv_timer_t* handle) {
- /* If timer_cb is NULL that means that the timer was never started. */
- if (!handle->timer_cb) {
- return UV_EINVAL;
- }
-
- if (handle->repeat) {
- uv_timer_stop(handle);
- uv_timer_start(handle, handle->timer_cb, handle->repeat, handle->repeat);
- }
-
- return 0;
-}
-
-
-void uv_timer_set_repeat(uv_timer_t* handle, uint64_t repeat) {
- assert(handle->type == UV_TIMER);
- handle->repeat = repeat;
-}
-
-
-uint64_t uv_timer_get_repeat(const uv_timer_t* handle) {
- assert(handle->type == UV_TIMER);
- return handle->repeat;
-}
-
-
-DWORD uv__next_timeout(const uv_loop_t* loop) {
- uv_timer_t* timer;
- int64_t delta;
-
- /* Check if there are any running timers
- * Need to cast away const first, since RB_MIN doesn't know what we are
- * going to do with this return value, it can't be marked const
- */
- timer = RB_MIN(uv_timer_tree_s, &((uv_loop_t*)loop)->timers);
- if (timer) {
- delta = timer->due - loop->time;
- if (delta >= UINT_MAX - 1) {
- /* A timeout value of UINT_MAX means infinite, so that's no good. */
- return UINT_MAX - 1;
- } else if (delta < 0) {
- /* Negative timeout values are not allowed */
- return 0;
- } else {
- return (DWORD)delta;
- }
- } else {
- /* No timers */
- return INFINITE;
- }
-}
-
-
-void uv_process_timers(uv_loop_t* loop) {
- uv_timer_t* timer;
-
- /* Call timer callbacks */
- for (timer = RB_MIN(uv_timer_tree_s, &loop->timers);
- timer != NULL && timer->due <= loop->time;
- timer = RB_MIN(uv_timer_tree_s, &loop->timers)) {
-
- uv_timer_stop(timer);
- uv_timer_again(timer);
- timer->timer_cb((uv_timer_t*) timer);
- }
-}
diff --git a/3rdparty/libuv/src/win/tty.c b/3rdparty/libuv/src/win/tty.c
deleted file mode 100644
index d87cc699097..00000000000
--- a/3rdparty/libuv/src/win/tty.c
+++ /dev/null
@@ -1,2084 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include <assert.h>
-#include <io.h>
-#include <string.h>
-#include <stdlib.h>
-
-#if defined(_MSC_VER) && _MSC_VER < 1600
-# include "stdint-msvc2008.h"
-#else
-# include <stdint.h>
-#endif
-
-#ifndef COMMON_LVB_REVERSE_VIDEO
-# define COMMON_LVB_REVERSE_VIDEO 0x4000
-#endif
-
-#include "uv.h"
-#include "internal.h"
-#include "handle-inl.h"
-#include "stream-inl.h"
-#include "req-inl.h"
-
-
-#define UNICODE_REPLACEMENT_CHARACTER (0xfffd)
-
-#define ANSI_NORMAL 0x00
-#define ANSI_ESCAPE_SEEN 0x02
-#define ANSI_CSI 0x04
-#define ANSI_ST_CONTROL 0x08
-#define ANSI_IGNORE 0x10
-#define ANSI_IN_ARG 0x20
-#define ANSI_IN_STRING 0x40
-#define ANSI_BACKSLASH_SEEN 0x80
-
-#define MAX_INPUT_BUFFER_LENGTH 8192
-
-
-static void uv_tty_capture_initial_style(CONSOLE_SCREEN_BUFFER_INFO* info);
-static void uv_tty_update_virtual_window(CONSOLE_SCREEN_BUFFER_INFO* info);
-
-
-/* Null uv_buf_t */
-static const uv_buf_t uv_null_buf_ = { 0, NULL };
-
-
-/*
- * The console virtual window.
- *
- * Normally cursor movement in windows is relative to the console screen buffer,
- * e.g. the application is allowed to overwrite the 'history'. This is very
- * inconvenient, it makes absolute cursor movement pretty useless. There is
- * also the concept of 'client rect' which is defined by the actual size of
- * the console window and the scroll position of the screen buffer, but it's
- * very volatile because it changes when the user scrolls.
- *
- * To make cursor movement behave sensibly we define a virtual window to which
- * cursor movement is confined. The virtual window is always as wide as the
- * console screen buffer, but it's height is defined by the size of the
- * console window. The top of the virtual window aligns with the position
- * of the caret when the first stdout/err handle is created, unless that would
- * mean that it would extend beyond the bottom of the screen buffer - in that
- * that case it's located as far down as possible.
- *
- * When the user writes a long text or many newlines, such that the output
- * reaches beyond the bottom of the virtual window, the virtual window is
- * shifted downwards, but not resized.
- *
- * Since all tty i/o happens on the same console, this window is shared
- * between all stdout/stderr handles.
- */
-
-static int uv_tty_virtual_offset = -1;
-static int uv_tty_virtual_height = -1;
-static int uv_tty_virtual_width = -1;
-
-static CRITICAL_SECTION uv_tty_output_lock;
-
-static HANDLE uv_tty_output_handle = INVALID_HANDLE_VALUE;
-
-static WORD uv_tty_default_text_attributes =
- FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE;
-
-static char uv_tty_default_fg_color = 7;
-static char uv_tty_default_bg_color = 0;
-static char uv_tty_default_fg_bright = 0;
-static char uv_tty_default_bg_bright = 0;
-static char uv_tty_default_inverse = 0;
-
-
-void uv_console_init() {
- InitializeCriticalSection(&uv_tty_output_lock);
-}
-
-
-int uv_tty_init(uv_loop_t* loop, uv_tty_t* tty, uv_file fd, int readable) {
- HANDLE handle;
- CONSOLE_SCREEN_BUFFER_INFO screen_buffer_info;
-
- handle = (HANDLE) uv__get_osfhandle(fd);
- if (handle == INVALID_HANDLE_VALUE)
- return UV_EBADF;
-
- if (fd <= 2) {
- /* In order to avoid closing a stdio file descriptor 0-2, duplicate the
- * underlying OS handle and forget about the original fd.
- * We could also opt to use the original OS handle and just never close it,
- * but then there would be no reliable way to cancel pending read operations
- * upon close.
- */
- if (!DuplicateHandle(INVALID_HANDLE_VALUE,
- handle,
- INVALID_HANDLE_VALUE,
- &handle,
- 0,
- FALSE,
- DUPLICATE_SAME_ACCESS))
- return uv_translate_sys_error(GetLastError());
- fd = -1;
- }
-
- if (!readable) {
- /* Obtain the screen buffer info with the output handle. */
- if (!GetConsoleScreenBufferInfo(handle, &screen_buffer_info)) {
- return uv_translate_sys_error(GetLastError());
- }
-
- /* Obtain the the tty_output_lock because the virtual window state is */
- /* shared between all uv_tty_t handles. */
- EnterCriticalSection(&uv_tty_output_lock);
-
- /* Store the global tty output handle. This handle is used by TTY read */
- /* streams to update the virtual window when a CONSOLE_BUFFER_SIZE_EVENT */
- /* is received. */
- uv_tty_output_handle = handle;
-
- /* Remember the original console text attributes. */
- uv_tty_capture_initial_style(&screen_buffer_info);
-
- uv_tty_update_virtual_window(&screen_buffer_info);
-
- LeaveCriticalSection(&uv_tty_output_lock);
- }
-
-
- uv_stream_init(loop, (uv_stream_t*) tty, UV_TTY);
- uv_connection_init((uv_stream_t*) tty);
-
- tty->handle = handle;
- tty->u.fd = fd;
- tty->reqs_pending = 0;
- tty->flags |= UV_HANDLE_BOUND;
-
- if (readable) {
- /* Initialize TTY input specific fields. */
- tty->flags |= UV_HANDLE_TTY_READABLE | UV_HANDLE_READABLE;
- tty->tty.rd.read_line_handle = NULL;
- tty->tty.rd.read_line_buffer = uv_null_buf_;
- tty->tty.rd.read_raw_wait = NULL;
-
- /* Init keycode-to-vt100 mapper state. */
- tty->tty.rd.last_key_len = 0;
- tty->tty.rd.last_key_offset = 0;
- tty->tty.rd.last_utf16_high_surrogate = 0;
- memset(&tty->tty.rd.last_input_record, 0, sizeof tty->tty.rd.last_input_record);
- } else {
- /* TTY output specific fields. */
- tty->flags |= UV_HANDLE_WRITABLE;
-
- /* Init utf8-to-utf16 conversion state. */
- tty->tty.wr.utf8_bytes_left = 0;
- tty->tty.wr.utf8_codepoint = 0;
-
- /* Initialize eol conversion state */
- tty->tty.wr.previous_eol = 0;
-
- /* Init ANSI parser state. */
- tty->tty.wr.ansi_parser_state = ANSI_NORMAL;
- }
-
- return 0;
-}
-
-
-/* Set the default console text attributes based on how the console was
- * configured when libuv started.
- */
-static void uv_tty_capture_initial_style(CONSOLE_SCREEN_BUFFER_INFO* info) {
- static int style_captured = 0;
-
- /* Only do this once.
- Assumption: Caller has acquired uv_tty_output_lock. */
- if (style_captured)
- return;
-
- /* Save raw win32 attributes. */
- uv_tty_default_text_attributes = info->wAttributes;
-
- /* Convert black text on black background to use white text. */
- if (uv_tty_default_text_attributes == 0)
- uv_tty_default_text_attributes = 7;
-
- /* Convert Win32 attributes to ANSI colors. */
- uv_tty_default_fg_color = 0;
- uv_tty_default_bg_color = 0;
- uv_tty_default_fg_bright = 0;
- uv_tty_default_bg_bright = 0;
- uv_tty_default_inverse = 0;
-
- if (uv_tty_default_text_attributes & FOREGROUND_RED)
- uv_tty_default_fg_color |= 1;
-
- if (uv_tty_default_text_attributes & FOREGROUND_GREEN)
- uv_tty_default_fg_color |= 2;
-
- if (uv_tty_default_text_attributes & FOREGROUND_BLUE)
- uv_tty_default_fg_color |= 4;
-
- if (uv_tty_default_text_attributes & BACKGROUND_RED)
- uv_tty_default_bg_color |= 1;
-
- if (uv_tty_default_text_attributes & BACKGROUND_GREEN)
- uv_tty_default_bg_color |= 2;
-
- if (uv_tty_default_text_attributes & BACKGROUND_BLUE)
- uv_tty_default_bg_color |= 4;
-
- if (uv_tty_default_text_attributes & FOREGROUND_INTENSITY)
- uv_tty_default_fg_bright = 1;
-
- if (uv_tty_default_text_attributes & BACKGROUND_INTENSITY)
- uv_tty_default_bg_bright = 1;
-
- if (uv_tty_default_text_attributes & COMMON_LVB_REVERSE_VIDEO)
- uv_tty_default_inverse = 1;
-
- style_captured = 1;
-}
-
-
-int uv_tty_set_mode(uv_tty_t* tty, uv_tty_mode_t mode) {
- DWORD flags;
- unsigned char was_reading;
- uv_alloc_cb alloc_cb;
- uv_read_cb read_cb;
- int err;
-
- if (!(tty->flags & UV_HANDLE_TTY_READABLE)) {
- return UV_EINVAL;
- }
-
- if (!!mode == !!(tty->flags & UV_HANDLE_TTY_RAW)) {
- return 0;
- }
-
- switch (mode) {
- case UV_TTY_MODE_NORMAL:
- flags = ENABLE_ECHO_INPUT | ENABLE_LINE_INPUT | ENABLE_PROCESSED_INPUT;
- break;
- case UV_TTY_MODE_RAW:
- flags = ENABLE_WINDOW_INPUT;
- break;
- case UV_TTY_MODE_IO:
- return UV_ENOTSUP;
- }
-
- if (!SetConsoleMode(tty->handle, flags)) {
- return uv_translate_sys_error(GetLastError());
- }
-
- /* If currently reading, stop, and restart reading. */
- if (tty->flags & UV_HANDLE_READING) {
- was_reading = 1;
- alloc_cb = tty->alloc_cb;
- read_cb = tty->read_cb;
-
- if (was_reading) {
- err = uv_tty_read_stop(tty);
- if (err) {
- return uv_translate_sys_error(err);
- }
- }
- } else {
- was_reading = 0;
- }
-
- /* Update flag. */
- tty->flags &= ~UV_HANDLE_TTY_RAW;
- tty->flags |= mode ? UV_HANDLE_TTY_RAW : 0;
-
- /* If we just stopped reading, restart. */
- if (was_reading) {
- err = uv_tty_read_start(tty, alloc_cb, read_cb);
- if (err) {
- return uv_translate_sys_error(err);
- }
- }
-
- return 0;
-}
-
-
-int uv_is_tty(uv_file file) {
- DWORD result;
- return GetConsoleMode((HANDLE) _get_osfhandle(file), &result) != 0;
-}
-
-
-int uv_tty_get_winsize(uv_tty_t* tty, int* width, int* height) {
- CONSOLE_SCREEN_BUFFER_INFO info;
-
- if (!GetConsoleScreenBufferInfo(tty->handle, &info)) {
- return uv_translate_sys_error(GetLastError());
- }
-
- EnterCriticalSection(&uv_tty_output_lock);
- uv_tty_update_virtual_window(&info);
- LeaveCriticalSection(&uv_tty_output_lock);
-
- *width = uv_tty_virtual_width;
- *height = uv_tty_virtual_height;
-
- return 0;
-}
-
-
-static void CALLBACK uv_tty_post_raw_read(void* data, BOOLEAN didTimeout) {
- uv_loop_t* loop;
- uv_tty_t* handle;
- uv_req_t* req;
-
- assert(data);
- assert(!didTimeout);
-
- req = (uv_req_t*) data;
- handle = (uv_tty_t*) req->data;
- loop = handle->loop;
-
- UnregisterWait(handle->tty.rd.read_raw_wait);
- handle->tty.rd.read_raw_wait = NULL;
-
- SET_REQ_SUCCESS(req);
- POST_COMPLETION_FOR_REQ(loop, req);
-}
-
-
-static void uv_tty_queue_read_raw(uv_loop_t* loop, uv_tty_t* handle) {
- uv_read_t* req;
- BOOL r;
-
- assert(handle->flags & UV_HANDLE_READING);
- assert(!(handle->flags & UV_HANDLE_READ_PENDING));
-
- assert(handle->handle && handle->handle != INVALID_HANDLE_VALUE);
-
- handle->tty.rd.read_line_buffer = uv_null_buf_;
-
- req = &handle->read_req;
- memset(&req->u.io.overlapped, 0, sizeof(req->u.io.overlapped));
-
- r = RegisterWaitForSingleObject(&handle->tty.rd.read_raw_wait,
- handle->handle,
- uv_tty_post_raw_read,
- (void*) req,
- INFINITE,
- WT_EXECUTEINWAITTHREAD | WT_EXECUTEONLYONCE);
- if (!r) {
- handle->tty.rd.read_raw_wait = NULL;
- SET_REQ_ERROR(req, GetLastError());
- uv_insert_pending_req(loop, (uv_req_t*)req);
- }
-
- handle->flags |= UV_HANDLE_READ_PENDING;
- handle->reqs_pending++;
-}
-
-
-static DWORD CALLBACK uv_tty_line_read_thread(void* data) {
- uv_loop_t* loop;
- uv_tty_t* handle;
- uv_req_t* req;
- DWORD bytes, read_bytes;
- WCHAR utf16[MAX_INPUT_BUFFER_LENGTH / 3];
- DWORD chars, read_chars;
-
- assert(data);
-
- req = (uv_req_t*) data;
- handle = (uv_tty_t*) req->data;
- loop = handle->loop;
-
- assert(handle->tty.rd.read_line_buffer.base != NULL);
- assert(handle->tty.rd.read_line_buffer.len > 0);
-
- /* ReadConsole can't handle big buffers. */
- if (handle->tty.rd.read_line_buffer.len < MAX_INPUT_BUFFER_LENGTH) {
- bytes = handle->tty.rd.read_line_buffer.len;
- } else {
- bytes = MAX_INPUT_BUFFER_LENGTH;
- }
-
- /* At last, unicode! */
- /* One utf-16 codeunit never takes more than 3 utf-8 codeunits to encode */
- chars = bytes / 3;
-
- if (ReadConsoleW(handle->tty.rd.read_line_handle,
- (void*) utf16,
- chars,
- &read_chars,
- NULL)) {
- read_bytes = WideCharToMultiByte(CP_UTF8,
- 0,
- utf16,
- read_chars,
- handle->tty.rd.read_line_buffer.base,
- bytes,
- NULL,
- NULL);
- SET_REQ_SUCCESS(req);
- req->u.io.overlapped.InternalHigh = read_bytes;
- } else {
- SET_REQ_ERROR(req, GetLastError());
- }
-
- POST_COMPLETION_FOR_REQ(loop, req);
- return 0;
-}
-
-
-static void uv_tty_queue_read_line(uv_loop_t* loop, uv_tty_t* handle) {
- uv_read_t* req;
- BOOL r;
-
- assert(handle->flags & UV_HANDLE_READING);
- assert(!(handle->flags & UV_HANDLE_READ_PENDING));
- assert(handle->handle && handle->handle != INVALID_HANDLE_VALUE);
-
- req = &handle->read_req;
- memset(&req->u.io.overlapped, 0, sizeof(req->u.io.overlapped));
-
- handle->alloc_cb((uv_handle_t*) handle, 8192, &handle->tty.rd.read_line_buffer);
- if (handle->tty.rd.read_line_buffer.len == 0) {
- handle->read_cb((uv_stream_t*) handle,
- UV_ENOBUFS,
- &handle->tty.rd.read_line_buffer);
- return;
- }
- assert(handle->tty.rd.read_line_buffer.base != NULL);
-
- /* Duplicate the console handle, so if we want to cancel the read, we can */
- /* just close this handle duplicate. */
- if (handle->tty.rd.read_line_handle == NULL) {
- HANDLE this_process = GetCurrentProcess();
- r = DuplicateHandle(this_process,
- handle->handle,
- this_process,
- &handle->tty.rd.read_line_handle,
- 0,
- 0,
- DUPLICATE_SAME_ACCESS);
- if (!r) {
- handle->tty.rd.read_line_handle = NULL;
- SET_REQ_ERROR(req, GetLastError());
- uv_insert_pending_req(loop, (uv_req_t*)req);
- goto out;
- }
- }
-
- r = QueueUserWorkItem(uv_tty_line_read_thread,
- (void*) req,
- WT_EXECUTELONGFUNCTION);
- if (!r) {
- SET_REQ_ERROR(req, GetLastError());
- uv_insert_pending_req(loop, (uv_req_t*)req);
- }
-
- out:
- handle->flags |= UV_HANDLE_READ_PENDING;
- handle->reqs_pending++;
-}
-
-
-static void uv_tty_queue_read(uv_loop_t* loop, uv_tty_t* handle) {
- if (handle->flags & UV_HANDLE_TTY_RAW) {
- uv_tty_queue_read_raw(loop, handle);
- } else {
- uv_tty_queue_read_line(loop, handle);
- }
-}
-
-
-static const char* get_vt100_fn_key(DWORD code, char shift, char ctrl,
- size_t* len) {
-#define VK_CASE(vk, normal_str, shift_str, ctrl_str, shift_ctrl_str) \
- case (vk): \
- if (shift && ctrl) { \
- *len = sizeof shift_ctrl_str; \
- return "\033" shift_ctrl_str; \
- } else if (shift) { \
- *len = sizeof shift_str ; \
- return "\033" shift_str; \
- } else if (ctrl) { \
- *len = sizeof ctrl_str; \
- return "\033" ctrl_str; \
- } else { \
- *len = sizeof normal_str; \
- return "\033" normal_str; \
- }
-
- switch (code) {
- /* These mappings are the same as Cygwin's. Unmodified and alt-modified */
- /* keypad keys comply with linux console, modifiers comply with xterm */
- /* modifier usage. F1..f12 and shift-f1..f10 comply with linux console, */
- /* f6..f12 with and without modifiers comply with rxvt. */
- VK_CASE(VK_INSERT, "[2~", "[2;2~", "[2;5~", "[2;6~")
- VK_CASE(VK_END, "[4~", "[4;2~", "[4;5~", "[4;6~")
- VK_CASE(VK_DOWN, "[B", "[1;2B", "[1;5B", "[1;6B")
- VK_CASE(VK_NEXT, "[6~", "[6;2~", "[6;5~", "[6;6~")
- VK_CASE(VK_LEFT, "[D", "[1;2D", "[1;5D", "[1;6D")
- VK_CASE(VK_CLEAR, "[G", "[1;2G", "[1;5G", "[1;6G")
- VK_CASE(VK_RIGHT, "[C", "[1;2C", "[1;5C", "[1;6C")
- VK_CASE(VK_UP, "[A", "[1;2A", "[1;5A", "[1;6A")
- VK_CASE(VK_HOME, "[1~", "[1;2~", "[1;5~", "[1;6~")
- VK_CASE(VK_PRIOR, "[5~", "[5;2~", "[5;5~", "[5;6~")
- VK_CASE(VK_DELETE, "[3~", "[3;2~", "[3;5~", "[3;6~")
- VK_CASE(VK_NUMPAD0, "[2~", "[2;2~", "[2;5~", "[2;6~")
- VK_CASE(VK_NUMPAD1, "[4~", "[4;2~", "[4;5~", "[4;6~")
- VK_CASE(VK_NUMPAD2, "[B", "[1;2B", "[1;5B", "[1;6B")
- VK_CASE(VK_NUMPAD3, "[6~", "[6;2~", "[6;5~", "[6;6~")
- VK_CASE(VK_NUMPAD4, "[D", "[1;2D", "[1;5D", "[1;6D")
- VK_CASE(VK_NUMPAD5, "[G", "[1;2G", "[1;5G", "[1;6G")
- VK_CASE(VK_NUMPAD6, "[C", "[1;2C", "[1;5C", "[1;6C")
- VK_CASE(VK_NUMPAD7, "[A", "[1;2A", "[1;5A", "[1;6A")
- VK_CASE(VK_NUMPAD8, "[1~", "[1;2~", "[1;5~", "[1;6~")
- VK_CASE(VK_NUMPAD9, "[5~", "[5;2~", "[5;5~", "[5;6~")
- VK_CASE(VK_DECIMAL, "[3~", "[3;2~", "[3;5~", "[3;6~")
- VK_CASE(VK_F1, "[[A", "[23~", "[11^", "[23^" )
- VK_CASE(VK_F2, "[[B", "[24~", "[12^", "[24^" )
- VK_CASE(VK_F3, "[[C", "[25~", "[13^", "[25^" )
- VK_CASE(VK_F4, "[[D", "[26~", "[14^", "[26^" )
- VK_CASE(VK_F5, "[[E", "[28~", "[15^", "[28^" )
- VK_CASE(VK_F6, "[17~", "[29~", "[17^", "[29^" )
- VK_CASE(VK_F7, "[18~", "[31~", "[18^", "[31^" )
- VK_CASE(VK_F8, "[19~", "[32~", "[19^", "[32^" )
- VK_CASE(VK_F9, "[20~", "[33~", "[20^", "[33^" )
- VK_CASE(VK_F10, "[21~", "[34~", "[21^", "[34^" )
- VK_CASE(VK_F11, "[23~", "[23$", "[23^", "[23@" )
- VK_CASE(VK_F12, "[24~", "[24$", "[24^", "[24@" )
-
- default:
- *len = 0;
- return NULL;
- }
-#undef VK_CASE
-}
-
-
-void uv_process_tty_read_raw_req(uv_loop_t* loop, uv_tty_t* handle,
- uv_req_t* req) {
- /* Shortcut for handle->tty.rd.last_input_record.Event.KeyEvent. */
-#define KEV handle->tty.rd.last_input_record.Event.KeyEvent
-
- DWORD records_left, records_read;
- uv_buf_t buf;
- off_t buf_used;
-
- assert(handle->type == UV_TTY);
- assert(handle->flags & UV_HANDLE_TTY_READABLE);
- handle->flags &= ~UV_HANDLE_READ_PENDING;
-
- if (!(handle->flags & UV_HANDLE_READING) ||
- !(handle->flags & UV_HANDLE_TTY_RAW)) {
- goto out;
- }
-
- if (!REQ_SUCCESS(req)) {
- /* An error occurred while waiting for the event. */
- if ((handle->flags & UV_HANDLE_READING)) {
- handle->flags &= ~UV_HANDLE_READING;
- handle->read_cb((uv_stream_t*)handle,
- uv_translate_sys_error(GET_REQ_ERROR(req)),
- &uv_null_buf_);
- }
- goto out;
- }
-
- /* Fetch the number of events */
- if (!GetNumberOfConsoleInputEvents(handle->handle, &records_left)) {
- handle->flags &= ~UV_HANDLE_READING;
- DECREASE_ACTIVE_COUNT(loop, handle);
- handle->read_cb((uv_stream_t*)handle,
- uv_translate_sys_error(GetLastError()),
- &uv_null_buf_);
- goto out;
- }
-
- /* Windows sends a lot of events that we're not interested in, so buf */
- /* will be allocated on demand, when there's actually something to emit. */
- buf = uv_null_buf_;
- buf_used = 0;
-
- while ((records_left > 0 || handle->tty.rd.last_key_len > 0) &&
- (handle->flags & UV_HANDLE_READING)) {
- if (handle->tty.rd.last_key_len == 0) {
- /* Read the next input record */
- if (!ReadConsoleInputW(handle->handle,
- &handle->tty.rd.last_input_record,
- 1,
- &records_read)) {
- handle->flags &= ~UV_HANDLE_READING;
- DECREASE_ACTIVE_COUNT(loop, handle);
- handle->read_cb((uv_stream_t*) handle,
- uv_translate_sys_error(GetLastError()),
- &buf);
- goto out;
- }
- records_left--;
-
- /* If the window was resized, recompute the virtual window size. This */
- /* will trigger a SIGWINCH signal if the window size changed in an */
- /* way that matters to libuv. */
- if (handle->tty.rd.last_input_record.EventType == WINDOW_BUFFER_SIZE_EVENT) {
- CONSOLE_SCREEN_BUFFER_INFO info;
-
- EnterCriticalSection(&uv_tty_output_lock);
-
- if (uv_tty_output_handle != INVALID_HANDLE_VALUE &&
- GetConsoleScreenBufferInfo(uv_tty_output_handle, &info)) {
- uv_tty_update_virtual_window(&info);
- }
-
- LeaveCriticalSection(&uv_tty_output_lock);
-
- continue;
- }
-
- /* Ignore other events that are not key or resize events. */
- if (handle->tty.rd.last_input_record.EventType != KEY_EVENT) {
- continue;
- }
-
- /* Ignore keyup events, unless the left alt key was held and a valid */
- /* unicode character was emitted. */
- if (!KEV.bKeyDown && !(((KEV.dwControlKeyState & LEFT_ALT_PRESSED) ||
- KEV.wVirtualKeyCode==VK_MENU) && KEV.uChar.UnicodeChar != 0)) {
- continue;
- }
-
- /* Ignore keypresses to numpad number keys if the left alt is held */
- /* because the user is composing a character, or windows simulating */
- /* this. */
- if ((KEV.dwControlKeyState & LEFT_ALT_PRESSED) &&
- !(KEV.dwControlKeyState & ENHANCED_KEY) &&
- (KEV.wVirtualKeyCode == VK_INSERT ||
- KEV.wVirtualKeyCode == VK_END ||
- KEV.wVirtualKeyCode == VK_DOWN ||
- KEV.wVirtualKeyCode == VK_NEXT ||
- KEV.wVirtualKeyCode == VK_LEFT ||
- KEV.wVirtualKeyCode == VK_CLEAR ||
- KEV.wVirtualKeyCode == VK_RIGHT ||
- KEV.wVirtualKeyCode == VK_HOME ||
- KEV.wVirtualKeyCode == VK_UP ||
- KEV.wVirtualKeyCode == VK_PRIOR ||
- KEV.wVirtualKeyCode == VK_NUMPAD0 ||
- KEV.wVirtualKeyCode == VK_NUMPAD1 ||
- KEV.wVirtualKeyCode == VK_NUMPAD2 ||
- KEV.wVirtualKeyCode == VK_NUMPAD3 ||
- KEV.wVirtualKeyCode == VK_NUMPAD4 ||
- KEV.wVirtualKeyCode == VK_NUMPAD5 ||
- KEV.wVirtualKeyCode == VK_NUMPAD6 ||
- KEV.wVirtualKeyCode == VK_NUMPAD7 ||
- KEV.wVirtualKeyCode == VK_NUMPAD8 ||
- KEV.wVirtualKeyCode == VK_NUMPAD9)) {
- continue;
- }
-
- if (KEV.uChar.UnicodeChar != 0) {
- int prefix_len, char_len;
-
- /* Character key pressed */
- if (KEV.uChar.UnicodeChar >= 0xD800 &&
- KEV.uChar.UnicodeChar < 0xDC00) {
- /* UTF-16 high surrogate */
- handle->tty.rd.last_utf16_high_surrogate = KEV.uChar.UnicodeChar;
- continue;
- }
-
- /* Prefix with \u033 if alt was held, but alt was not used as part */
- /* a compose sequence. */
- if ((KEV.dwControlKeyState & (LEFT_ALT_PRESSED | RIGHT_ALT_PRESSED))
- && !(KEV.dwControlKeyState & (LEFT_CTRL_PRESSED |
- RIGHT_CTRL_PRESSED)) && KEV.bKeyDown) {
- handle->tty.rd.last_key[0] = '\033';
- prefix_len = 1;
- } else {
- prefix_len = 0;
- }
-
- if (KEV.uChar.UnicodeChar >= 0xDC00 &&
- KEV.uChar.UnicodeChar < 0xE000) {
- /* UTF-16 surrogate pair */
- WCHAR utf16_buffer[2] = { handle->tty.rd.last_utf16_high_surrogate,
- KEV.uChar.UnicodeChar};
- char_len = WideCharToMultiByte(CP_UTF8,
- 0,
- utf16_buffer,
- 2,
- &handle->tty.rd.last_key[prefix_len],
- sizeof handle->tty.rd.last_key,
- NULL,
- NULL);
- } else {
- /* Single UTF-16 character */
- char_len = WideCharToMultiByte(CP_UTF8,
- 0,
- &KEV.uChar.UnicodeChar,
- 1,
- &handle->tty.rd.last_key[prefix_len],
- sizeof handle->tty.rd.last_key,
- NULL,
- NULL);
- }
-
- /* Whatever happened, the last character wasn't a high surrogate. */
- handle->tty.rd.last_utf16_high_surrogate = 0;
-
- /* If the utf16 character(s) couldn't be converted something must */
- /* be wrong. */
- if (!char_len) {
- handle->flags &= ~UV_HANDLE_READING;
- DECREASE_ACTIVE_COUNT(loop, handle);
- handle->read_cb((uv_stream_t*) handle,
- uv_translate_sys_error(GetLastError()),
- &buf);
- goto out;
- }
-
- handle->tty.rd.last_key_len = (unsigned char) (prefix_len + char_len);
- handle->tty.rd.last_key_offset = 0;
- continue;
-
- } else {
- /* Function key pressed */
- const char* vt100;
- size_t prefix_len, vt100_len;
-
- vt100 = get_vt100_fn_key(KEV.wVirtualKeyCode,
- !!(KEV.dwControlKeyState & SHIFT_PRESSED),
- !!(KEV.dwControlKeyState & (
- LEFT_CTRL_PRESSED |
- RIGHT_CTRL_PRESSED)),
- &vt100_len);
-
- /* If we were unable to map to a vt100 sequence, just ignore. */
- if (!vt100) {
- continue;
- }
-
- /* Prefix with \x033 when the alt key was held. */
- if (KEV.dwControlKeyState & (LEFT_ALT_PRESSED | RIGHT_ALT_PRESSED)) {
- handle->tty.rd.last_key[0] = '\033';
- prefix_len = 1;
- } else {
- prefix_len = 0;
- }
-
- /* Copy the vt100 sequence to the handle buffer. */
- assert(prefix_len + vt100_len < sizeof handle->tty.rd.last_key);
- memcpy(&handle->tty.rd.last_key[prefix_len], vt100, vt100_len);
-
- handle->tty.rd.last_key_len = (unsigned char) (prefix_len + vt100_len);
- handle->tty.rd.last_key_offset = 0;
- continue;
- }
- } else {
- /* Copy any bytes left from the last keypress to the user buffer. */
- if (handle->tty.rd.last_key_offset < handle->tty.rd.last_key_len) {
- /* Allocate a buffer if needed */
- if (buf_used == 0) {
- handle->alloc_cb((uv_handle_t*) handle, 1024, &buf);
- if (buf.len == 0) {
- handle->read_cb((uv_stream_t*) handle, UV_ENOBUFS, &buf);
- goto out;
- }
- assert(buf.base != NULL);
- }
-
- buf.base[buf_used++] = handle->tty.rd.last_key[handle->tty.rd.last_key_offset++];
-
- /* If the buffer is full, emit it */
- if ((size_t) buf_used == buf.len) {
- handle->read_cb((uv_stream_t*) handle, buf_used, &buf);
- buf = uv_null_buf_;
- buf_used = 0;
- }
-
- continue;
- }
-
- /* Apply dwRepeat from the last input record. */
- if (--KEV.wRepeatCount > 0) {
- handle->tty.rd.last_key_offset = 0;
- continue;
- }
-
- handle->tty.rd.last_key_len = 0;
- continue;
- }
- }
-
- /* Send the buffer back to the user */
- if (buf_used > 0) {
- handle->read_cb((uv_stream_t*) handle, buf_used, &buf);
- }
-
- out:
- /* Wait for more input events. */
- if ((handle->flags & UV_HANDLE_READING) &&
- !(handle->flags & UV_HANDLE_READ_PENDING)) {
- uv_tty_queue_read(loop, handle);
- }
-
- DECREASE_PENDING_REQ_COUNT(handle);
-
-#undef KEV
-}
-
-
-
-void uv_process_tty_read_line_req(uv_loop_t* loop, uv_tty_t* handle,
- uv_req_t* req) {
- uv_buf_t buf;
-
- assert(handle->type == UV_TTY);
- assert(handle->flags & UV_HANDLE_TTY_READABLE);
-
- buf = handle->tty.rd.read_line_buffer;
-
- handle->flags &= ~UV_HANDLE_READ_PENDING;
- handle->tty.rd.read_line_buffer = uv_null_buf_;
-
- if (!REQ_SUCCESS(req)) {
- /* Read was not successful */
- if ((handle->flags & UV_HANDLE_READING) &&
- handle->tty.rd.read_line_handle != NULL) {
- /* Real error */
- handle->flags &= ~UV_HANDLE_READING;
- DECREASE_ACTIVE_COUNT(loop, handle);
- handle->read_cb((uv_stream_t*) handle,
- uv_translate_sys_error(GET_REQ_ERROR(req)),
- &buf);
- } else {
- /* The read was cancelled, or whatever we don't care */
- handle->read_cb((uv_stream_t*) handle, 0, &buf);
- }
-
- } else {
- /* Read successful */
- /* TODO: read unicode, convert to utf-8 */
- DWORD bytes = req->u.io.overlapped.InternalHigh;
- handle->read_cb((uv_stream_t*) handle, bytes, &buf);
- }
-
- /* Wait for more input events. */
- if ((handle->flags & UV_HANDLE_READING) &&
- !(handle->flags & UV_HANDLE_READ_PENDING)) {
- uv_tty_queue_read(loop, handle);
- }
-
- DECREASE_PENDING_REQ_COUNT(handle);
-}
-
-
-void uv_process_tty_read_req(uv_loop_t* loop, uv_tty_t* handle,
- uv_req_t* req) {
- assert(handle->type == UV_TTY);
- assert(handle->flags & UV_HANDLE_TTY_READABLE);
-
- /* If the read_line_buffer member is zero, it must have been an raw read. */
- /* Otherwise it was a line-buffered read. */
- /* FIXME: This is quite obscure. Use a flag or something. */
- if (handle->tty.rd.read_line_buffer.len == 0) {
- uv_process_tty_read_raw_req(loop, handle, req);
- } else {
- uv_process_tty_read_line_req(loop, handle, req);
- }
-}
-
-
-int uv_tty_read_start(uv_tty_t* handle, uv_alloc_cb alloc_cb,
- uv_read_cb read_cb) {
- uv_loop_t* loop = handle->loop;
-
- if (!(handle->flags & UV_HANDLE_TTY_READABLE)) {
- return ERROR_INVALID_PARAMETER;
- }
-
- handle->flags |= UV_HANDLE_READING;
- INCREASE_ACTIVE_COUNT(loop, handle);
- handle->read_cb = read_cb;
- handle->alloc_cb = alloc_cb;
-
- /* If reading was stopped and then started again, there could still be a */
- /* read request pending. */
- if (handle->flags & UV_HANDLE_READ_PENDING) {
- return 0;
- }
-
- /* Maybe the user stopped reading half-way while processing key events. */
- /* Short-circuit if this could be the case. */
- if (handle->tty.rd.last_key_len > 0) {
- SET_REQ_SUCCESS(&handle->read_req);
- uv_insert_pending_req(handle->loop, (uv_req_t*) &handle->read_req);
- return 0;
- }
-
- uv_tty_queue_read(loop, handle);
-
- return 0;
-}
-
-
-int uv_tty_read_stop(uv_tty_t* handle) {
- handle->flags &= ~UV_HANDLE_READING;
- DECREASE_ACTIVE_COUNT(handle->loop, handle);
-
- /* Cancel raw read */
- if ((handle->flags & UV_HANDLE_READ_PENDING) &&
- (handle->flags & UV_HANDLE_TTY_RAW)) {
- /* Write some bullshit event to force the console wait to return. */
- INPUT_RECORD record;
- DWORD written;
- memset(&record, 0, sizeof record);
- if (!WriteConsoleInputW(handle->handle, &record, 1, &written)) {
- return GetLastError();
- }
- }
-
- /* Cancel line-buffered read */
- if (handle->tty.rd.read_line_handle != NULL) {
- /* Closing this handle will cancel the ReadConsole operation */
- CloseHandle(handle->tty.rd.read_line_handle);
- handle->tty.rd.read_line_handle = NULL;
- }
-
-
- return 0;
-}
-
-
-static void uv_tty_update_virtual_window(CONSOLE_SCREEN_BUFFER_INFO* info) {
- int old_virtual_width = uv_tty_virtual_width;
- int old_virtual_height = uv_tty_virtual_height;
-
- uv_tty_virtual_width = info->dwSize.X;
- uv_tty_virtual_height = info->srWindow.Bottom - info->srWindow.Top + 1;
-
- /* Recompute virtual window offset row. */
- if (uv_tty_virtual_offset == -1) {
- uv_tty_virtual_offset = info->dwCursorPosition.Y;
- } else if (uv_tty_virtual_offset < info->dwCursorPosition.Y -
- uv_tty_virtual_height + 1) {
- /* If suddenly find the cursor outside of the virtual window, it must */
- /* have somehow scrolled. Update the virtual window offset. */
- uv_tty_virtual_offset = info->dwCursorPosition.Y -
- uv_tty_virtual_height + 1;
- }
- if (uv_tty_virtual_offset + uv_tty_virtual_height > info->dwSize.Y) {
- uv_tty_virtual_offset = info->dwSize.Y - uv_tty_virtual_height;
- }
- if (uv_tty_virtual_offset < 0) {
- uv_tty_virtual_offset = 0;
- }
-
- /* If the virtual window size changed, emit a SIGWINCH signal. Don't emit */
- /* if this was the first time the virtual window size was computed. */
- if (old_virtual_width != -1 && old_virtual_height != -1 &&
- (uv_tty_virtual_width != old_virtual_width ||
- uv_tty_virtual_height != old_virtual_height)) {
- uv__signal_dispatch(SIGWINCH);
- }
-}
-
-
-static COORD uv_tty_make_real_coord(uv_tty_t* handle,
- CONSOLE_SCREEN_BUFFER_INFO* info, int x, unsigned char x_relative, int y,
- unsigned char y_relative) {
- COORD result;
-
- uv_tty_update_virtual_window(info);
-
- /* Adjust y position */
- if (y_relative) {
- y = info->dwCursorPosition.Y + y;
- } else {
- y = uv_tty_virtual_offset + y;
- }
- /* Clip y to virtual client rectangle */
- if (y < uv_tty_virtual_offset) {
- y = uv_tty_virtual_offset;
- } else if (y >= uv_tty_virtual_offset + uv_tty_virtual_height) {
- y = uv_tty_virtual_offset + uv_tty_virtual_height - 1;
- }
-
- /* Adjust x */
- if (x_relative) {
- x = info->dwCursorPosition.X + x;
- }
- /* Clip x */
- if (x < 0) {
- x = 0;
- } else if (x >= uv_tty_virtual_width) {
- x = uv_tty_virtual_width - 1;
- }
-
- result.X = (unsigned short) x;
- result.Y = (unsigned short) y;
- return result;
-}
-
-
-static int uv_tty_emit_text(uv_tty_t* handle, WCHAR buffer[], DWORD length,
- DWORD* error) {
- DWORD written;
-
- if (*error != ERROR_SUCCESS) {
- return -1;
- }
-
- if (!WriteConsoleW(handle->handle,
- (void*) buffer,
- length,
- &written,
- NULL)) {
- *error = GetLastError();
- return -1;
- }
-
- return 0;
-}
-
-
-static int uv_tty_move_caret(uv_tty_t* handle, int x, unsigned char x_relative,
- int y, unsigned char y_relative, DWORD* error) {
- CONSOLE_SCREEN_BUFFER_INFO info;
- COORD pos;
-
- if (*error != ERROR_SUCCESS) {
- return -1;
- }
-
- retry:
- if (!GetConsoleScreenBufferInfo(handle->handle, &info)) {
- *error = GetLastError();
- }
-
- pos = uv_tty_make_real_coord(handle, &info, x, x_relative, y, y_relative);
-
- if (!SetConsoleCursorPosition(handle->handle, pos)) {
- if (GetLastError() == ERROR_INVALID_PARAMETER) {
- /* The console may be resized - retry */
- goto retry;
- } else {
- *error = GetLastError();
- return -1;
- }
- }
-
- return 0;
-}
-
-
-static int uv_tty_reset(uv_tty_t* handle, DWORD* error) {
- const COORD origin = {0, 0};
- const WORD char_attrs = uv_tty_default_text_attributes;
- CONSOLE_SCREEN_BUFFER_INFO info;
- DWORD count, written;
-
- if (*error != ERROR_SUCCESS) {
- return -1;
- }
-
- /* Reset original text attributes. */
- if (!SetConsoleTextAttribute(handle->handle, char_attrs)) {
- *error = GetLastError();
- return -1;
- }
-
- /* Move the cursor position to (0, 0). */
- if (!SetConsoleCursorPosition(handle->handle, origin)) {
- *error = GetLastError();
- return -1;
- }
-
- /* Clear the screen buffer. */
- retry:
- if (!GetConsoleScreenBufferInfo(handle->handle, &info)) {
- *error = GetLastError();
- return -1;
- }
-
- count = info.dwSize.X * info.dwSize.Y;
-
- if (!(FillConsoleOutputCharacterW(handle->handle,
- L'\x20',
- count,
- origin,
- &written) &&
- FillConsoleOutputAttribute(handle->handle,
- char_attrs,
- written,
- origin,
- &written))) {
- if (GetLastError() == ERROR_INVALID_PARAMETER) {
- /* The console may be resized - retry */
- goto retry;
- } else {
- *error = GetLastError();
- return -1;
- }
- }
-
- /* Move the virtual window up to the top. */
- uv_tty_virtual_offset = 0;
- uv_tty_update_virtual_window(&info);
-
- return 0;
-}
-
-
-static int uv_tty_clear(uv_tty_t* handle, int dir, char entire_screen,
- DWORD* error) {
- CONSOLE_SCREEN_BUFFER_INFO info;
- COORD start, end;
- DWORD count, written;
-
- int x1, x2, y1, y2;
- int x1r, x2r, y1r, y2r;
-
- if (*error != ERROR_SUCCESS) {
- return -1;
- }
-
- if (dir == 0) {
- /* Clear from current position */
- x1 = 0;
- x1r = 1;
- } else {
- /* Clear from column 0 */
- x1 = 0;
- x1r = 0;
- }
-
- if (dir == 1) {
- /* Clear to current position */
- x2 = 0;
- x2r = 1;
- } else {
- /* Clear to end of row. We pretend the console is 65536 characters wide, */
- /* uv_tty_make_real_coord will clip it to the actual console width. */
- x2 = 0xffff;
- x2r = 0;
- }
-
- if (!entire_screen) {
- /* Stay on our own row */
- y1 = y2 = 0;
- y1r = y2r = 1;
- } else {
- /* Apply columns direction to row */
- y1 = x1;
- y1r = x1r;
- y2 = x2;
- y2r = x2r;
- }
-
- retry:
- if (!GetConsoleScreenBufferInfo(handle->handle, &info)) {
- *error = GetLastError();
- return -1;
- }
-
- start = uv_tty_make_real_coord(handle, &info, x1, x1r, y1, y1r);
- end = uv_tty_make_real_coord(handle, &info, x2, x2r, y2, y2r);
- count = (end.Y * info.dwSize.X + end.X) -
- (start.Y * info.dwSize.X + start.X) + 1;
-
- if (!(FillConsoleOutputCharacterW(handle->handle,
- L'\x20',
- count,
- start,
- &written) &&
- FillConsoleOutputAttribute(handle->handle,
- info.wAttributes,
- written,
- start,
- &written))) {
- if (GetLastError() == ERROR_INVALID_PARAMETER) {
- /* The console may be resized - retry */
- goto retry;
- } else {
- *error = GetLastError();
- return -1;
- }
- }
-
- return 0;
-}
-
-#define FLIP_FGBG \
- do { \
- WORD fg = info.wAttributes & 0xF; \
- WORD bg = info.wAttributes & 0xF0; \
- info.wAttributes &= 0xFF00; \
- info.wAttributes |= fg << 4; \
- info.wAttributes |= bg >> 4; \
- } while (0)
-
-static int uv_tty_set_style(uv_tty_t* handle, DWORD* error) {
- unsigned short argc = handle->tty.wr.ansi_csi_argc;
- unsigned short* argv = handle->tty.wr.ansi_csi_argv;
- int i;
- CONSOLE_SCREEN_BUFFER_INFO info;
-
- char fg_color = -1, bg_color = -1;
- char fg_bright = -1, bg_bright = -1;
- char inverse = -1;
-
- if (argc == 0) {
- /* Reset mode */
- fg_color = uv_tty_default_fg_color;
- bg_color = uv_tty_default_bg_color;
- fg_bright = uv_tty_default_fg_bright;
- bg_bright = uv_tty_default_bg_bright;
- inverse = uv_tty_default_inverse;
- }
-
- for (i = 0; i < argc; i++) {
- short arg = argv[i];
-
- if (arg == 0) {
- /* Reset mode */
- fg_color = uv_tty_default_fg_color;
- bg_color = uv_tty_default_bg_color;
- fg_bright = uv_tty_default_fg_bright;
- bg_bright = uv_tty_default_bg_bright;
- inverse = uv_tty_default_inverse;
-
- } else if (arg == 1) {
- /* Foreground bright on */
- fg_bright = 1;
-
- } else if (arg == 2) {
- /* Both bright off */
- fg_bright = 0;
- bg_bright = 0;
-
- } else if (arg == 5) {
- /* Background bright on */
- bg_bright = 1;
-
- } else if (arg == 7) {
- /* Inverse: on */
- inverse = 1;
-
- } else if (arg == 21 || arg == 22) {
- /* Foreground bright off */
- fg_bright = 0;
-
- } else if (arg == 25) {
- /* Background bright off */
- bg_bright = 0;
-
- } else if (arg == 27) {
- /* Inverse: off */
- inverse = 0;
-
- } else if (arg >= 30 && arg <= 37) {
- /* Set foreground color */
- fg_color = arg - 30;
-
- } else if (arg == 39) {
- /* Default text color */
- fg_color = uv_tty_default_fg_color;
- fg_bright = uv_tty_default_fg_bright;
-
- } else if (arg >= 40 && arg <= 47) {
- /* Set background color */
- bg_color = arg - 40;
-
- } else if (arg == 49) {
- /* Default background color */
- bg_color = uv_tty_default_bg_color;
- bg_bright = uv_tty_default_bg_bright;
-
- } else if (arg >= 90 && arg <= 97) {
- /* Set bold foreground color */
- fg_bright = 1;
- fg_color = arg - 90;
-
- } else if (arg >= 100 && arg <= 107) {
- /* Set bold background color */
- bg_bright = 1;
- bg_color = arg - 100;
-
- }
- }
-
- if (fg_color == -1 && bg_color == -1 && fg_bright == -1 &&
- bg_bright == -1 && inverse == -1) {
- /* Nothing changed */
- return 0;
- }
-
- if (!GetConsoleScreenBufferInfo(handle->handle, &info)) {
- *error = GetLastError();
- return -1;
- }
-
- if ((info.wAttributes & COMMON_LVB_REVERSE_VIDEO) > 0) {
- FLIP_FGBG;
- }
-
- if (fg_color != -1) {
- info.wAttributes &= ~(FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);
- if (fg_color & 1) info.wAttributes |= FOREGROUND_RED;
- if (fg_color & 2) info.wAttributes |= FOREGROUND_GREEN;
- if (fg_color & 4) info.wAttributes |= FOREGROUND_BLUE;
- }
-
- if (fg_bright != -1) {
- if (fg_bright) {
- info.wAttributes |= FOREGROUND_INTENSITY;
- } else {
- info.wAttributes &= ~FOREGROUND_INTENSITY;
- }
- }
-
- if (bg_color != -1) {
- info.wAttributes &= ~(BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE);
- if (bg_color & 1) info.wAttributes |= BACKGROUND_RED;
- if (bg_color & 2) info.wAttributes |= BACKGROUND_GREEN;
- if (bg_color & 4) info.wAttributes |= BACKGROUND_BLUE;
- }
-
- if (bg_bright != -1) {
- if (bg_bright) {
- info.wAttributes |= BACKGROUND_INTENSITY;
- } else {
- info.wAttributes &= ~BACKGROUND_INTENSITY;
- }
- }
-
- if (inverse != -1) {
- if (inverse) {
- info.wAttributes |= COMMON_LVB_REVERSE_VIDEO;
- } else {
- info.wAttributes &= ~COMMON_LVB_REVERSE_VIDEO;
- }
- }
-
- if ((info.wAttributes & COMMON_LVB_REVERSE_VIDEO) > 0) {
- FLIP_FGBG;
- }
-
- if (!SetConsoleTextAttribute(handle->handle, info.wAttributes)) {
- *error = GetLastError();
- return -1;
- }
-
- return 0;
-}
-
-
-static int uv_tty_save_state(uv_tty_t* handle, unsigned char save_attributes,
- DWORD* error) {
- CONSOLE_SCREEN_BUFFER_INFO info;
-
- if (*error != ERROR_SUCCESS) {
- return -1;
- }
-
- if (!GetConsoleScreenBufferInfo(handle->handle, &info)) {
- *error = GetLastError();
- return -1;
- }
-
- uv_tty_update_virtual_window(&info);
-
- handle->tty.wr.saved_position.X = info.dwCursorPosition.X;
- handle->tty.wr.saved_position.Y = info.dwCursorPosition.Y - uv_tty_virtual_offset;
- handle->flags |= UV_HANDLE_TTY_SAVED_POSITION;
-
- if (save_attributes) {
- handle->tty.wr.saved_attributes = info.wAttributes &
- (FOREGROUND_INTENSITY | BACKGROUND_INTENSITY);
- handle->flags |= UV_HANDLE_TTY_SAVED_ATTRIBUTES;
- }
-
- return 0;
-}
-
-
-static int uv_tty_restore_state(uv_tty_t* handle,
- unsigned char restore_attributes, DWORD* error) {
- CONSOLE_SCREEN_BUFFER_INFO info;
- WORD new_attributes;
-
- if (*error != ERROR_SUCCESS) {
- return -1;
- }
-
- if (handle->flags & UV_HANDLE_TTY_SAVED_POSITION) {
- if (uv_tty_move_caret(handle,
- handle->tty.wr.saved_position.X,
- 0,
- handle->tty.wr.saved_position.Y,
- 0,
- error) != 0) {
- return -1;
- }
- }
-
- if (restore_attributes &&
- (handle->flags & UV_HANDLE_TTY_SAVED_ATTRIBUTES)) {
- if (!GetConsoleScreenBufferInfo(handle->handle, &info)) {
- *error = GetLastError();
- return -1;
- }
-
- new_attributes = info.wAttributes;
- new_attributes &= ~(FOREGROUND_INTENSITY | BACKGROUND_INTENSITY);
- new_attributes |= handle->tty.wr.saved_attributes;
-
- if (!SetConsoleTextAttribute(handle->handle, new_attributes)) {
- *error = GetLastError();
- return -1;
- }
- }
-
- return 0;
-}
-
-static int uv_tty_set_cursor_visibility(uv_tty_t* handle,
- BOOL visible,
- DWORD* error) {
- CONSOLE_CURSOR_INFO cursor_info;
-
- if (!GetConsoleCursorInfo(handle->handle, &cursor_info)) {
- *error = GetLastError();
- return -1;
- }
-
- cursor_info.bVisible = visible;
-
- if (!SetConsoleCursorInfo(handle->handle, &cursor_info)) {
- *error = GetLastError();
- return -1;
- }
-
- return 0;
-}
-
-static int uv_tty_write_bufs(uv_tty_t* handle,
- const uv_buf_t bufs[],
- unsigned int nbufs,
- DWORD* error) {
- /* We can only write 8k characters at a time. Windows can't handle */
- /* much more characters in a single console write anyway. */
- WCHAR utf16_buf[8192];
- DWORD utf16_buf_used = 0;
- unsigned int i;
-
-#define FLUSH_TEXT() \
- do { \
- if (utf16_buf_used > 0) { \
- uv_tty_emit_text(handle, utf16_buf, utf16_buf_used, error); \
- utf16_buf_used = 0; \
- } \
- } while (0)
-
-#define ENSURE_BUFFER_SPACE(wchars_needed) \
- if (wchars_needed > ARRAY_SIZE(utf16_buf) - utf16_buf_used) { \
- FLUSH_TEXT(); \
- }
-
- /* Cache for fast access */
- unsigned char utf8_bytes_left = handle->tty.wr.utf8_bytes_left;
- unsigned int utf8_codepoint = handle->tty.wr.utf8_codepoint;
- unsigned char previous_eol = handle->tty.wr.previous_eol;
- unsigned char ansi_parser_state = handle->tty.wr.ansi_parser_state;
-
- /* Store the error here. If we encounter an error, stop trying to do i/o */
- /* but keep parsing the buffer so we leave the parser in a consistent */
- /* state. */
- *error = ERROR_SUCCESS;
-
- EnterCriticalSection(&uv_tty_output_lock);
-
- for (i = 0; i < nbufs; i++) {
- uv_buf_t buf = bufs[i];
- unsigned int j;
-
- for (j = 0; j < buf.len; j++) {
- unsigned char c = buf.base[j];
-
- /* Run the character through the utf8 decoder We happily accept non */
- /* shortest form encodings and invalid code points - there's no real */
- /* harm that can be done. */
- if (utf8_bytes_left == 0) {
- /* Read utf-8 start byte */
- DWORD first_zero_bit;
- unsigned char not_c = ~c;
-#ifdef _MSC_VER /* msvc */
- if (_BitScanReverse(&first_zero_bit, not_c)) {
-#else /* assume gcc */
- if (c != 0) {
- first_zero_bit = (sizeof(int) * 8) - 1 - __builtin_clz(not_c);
-#endif
- if (first_zero_bit == 7) {
- /* Ascii - pass right through */
- utf8_codepoint = (unsigned int) c;
-
- } else if (first_zero_bit <= 5) {
- /* Multibyte sequence */
- utf8_codepoint = (0xff >> (8 - first_zero_bit)) & c;
- utf8_bytes_left = (char) (6 - first_zero_bit);
-
- } else {
- /* Invalid continuation */
- utf8_codepoint = UNICODE_REPLACEMENT_CHARACTER;
- }
-
- } else {
- /* 0xff -- invalid */
- utf8_codepoint = UNICODE_REPLACEMENT_CHARACTER;
- }
-
- } else if ((c & 0xc0) == 0x80) {
- /* Valid continuation of utf-8 multibyte sequence */
- utf8_bytes_left--;
- utf8_codepoint <<= 6;
- utf8_codepoint |= ((unsigned int) c & 0x3f);
-
- } else {
- /* Start byte where continuation was expected. */
- utf8_bytes_left = 0;
- utf8_codepoint = UNICODE_REPLACEMENT_CHARACTER;
- /* Patch buf offset so this character will be parsed again as a */
- /* start byte. */
- j--;
- }
-
- /* Maybe we need to parse more bytes to find a character. */
- if (utf8_bytes_left != 0) {
- continue;
- }
-
- /* Parse vt100/ansi escape codes */
- if (ansi_parser_state == ANSI_NORMAL) {
- switch (utf8_codepoint) {
- case '\033':
- ansi_parser_state = ANSI_ESCAPE_SEEN;
- continue;
-
- case 0233:
- ansi_parser_state = ANSI_CSI;
- handle->tty.wr.ansi_csi_argc = 0;
- continue;
- }
-
- } else if (ansi_parser_state == ANSI_ESCAPE_SEEN) {
- switch (utf8_codepoint) {
- case '[':
- ansi_parser_state = ANSI_CSI;
- handle->tty.wr.ansi_csi_argc = 0;
- continue;
-
- case '^':
- case '_':
- case 'P':
- case ']':
- /* Not supported, but we'll have to parse until we see a stop */
- /* code, e.g. ESC \ or BEL. */
- ansi_parser_state = ANSI_ST_CONTROL;
- continue;
-
- case '\033':
- /* Ignore double escape. */
- continue;
-
- case 'c':
- /* Full console reset. */
- FLUSH_TEXT();
- uv_tty_reset(handle, error);
- ansi_parser_state = ANSI_NORMAL;
- continue;
-
- case '7':
- /* Save the cursor position and text attributes. */
- FLUSH_TEXT();
- uv_tty_save_state(handle, 1, error);
- ansi_parser_state = ANSI_NORMAL;
- continue;
-
- case '8':
- /* Restore the cursor position and text attributes */
- FLUSH_TEXT();
- uv_tty_restore_state(handle, 1, error);
- ansi_parser_state = ANSI_NORMAL;
- continue;
-
- default:
- if (utf8_codepoint >= '@' && utf8_codepoint <= '_') {
- /* Single-char control. */
- ansi_parser_state = ANSI_NORMAL;
- continue;
- } else {
- /* Invalid - proceed as normal, */
- ansi_parser_state = ANSI_NORMAL;
- }
- }
-
- } else if (ansi_parser_state & ANSI_CSI) {
- if (!(ansi_parser_state & ANSI_IGNORE)) {
- if (utf8_codepoint >= '0' && utf8_codepoint <= '9') {
- /* Parsing a numerical argument */
-
- if (!(ansi_parser_state & ANSI_IN_ARG)) {
- /* We were not currently parsing a number */
-
- /* Check for too many arguments */
- if (handle->tty.wr.ansi_csi_argc >= ARRAY_SIZE(handle->tty.wr.ansi_csi_argv)) {
- ansi_parser_state |= ANSI_IGNORE;
- continue;
- }
-
- ansi_parser_state |= ANSI_IN_ARG;
- handle->tty.wr.ansi_csi_argc++;
- handle->tty.wr.ansi_csi_argv[handle->tty.wr.ansi_csi_argc - 1] =
- (unsigned short) utf8_codepoint - '0';
- continue;
- } else {
- /* We were already parsing a number. Parse next digit. */
- uint32_t value = 10 *
- handle->tty.wr.ansi_csi_argv[handle->tty.wr.ansi_csi_argc - 1];
-
- /* Check for overflow. */
- if (value > UINT16_MAX) {
- ansi_parser_state |= ANSI_IGNORE;
- continue;
- }
-
- handle->tty.wr.ansi_csi_argv[handle->tty.wr.ansi_csi_argc - 1] =
- (unsigned short) value + (utf8_codepoint - '0');
- continue;
- }
-
- } else if (utf8_codepoint == ';') {
- /* Denotes the end of an argument. */
- if (ansi_parser_state & ANSI_IN_ARG) {
- ansi_parser_state &= ~ANSI_IN_ARG;
- continue;
-
- } else {
- /* If ANSI_IN_ARG is not set, add another argument and */
- /* default it to 0. */
- /* Check for too many arguments */
- if (handle->tty.wr.ansi_csi_argc >= ARRAY_SIZE(handle->tty.wr.ansi_csi_argv)) {
- ansi_parser_state |= ANSI_IGNORE;
- continue;
- }
-
- handle->tty.wr.ansi_csi_argc++;
- handle->tty.wr.ansi_csi_argv[handle->tty.wr.ansi_csi_argc - 1] = 0;
- continue;
- }
-
- } else if (utf8_codepoint == '?' && !(ansi_parser_state & ANSI_IN_ARG) &&
- handle->tty.wr.ansi_csi_argc == 0) {
- /* Ignores '?' if it is the first character after CSI[ */
- /* This is an extension character from the VT100 codeset */
- /* that is supported and used by most ANSI terminals today. */
- continue;
-
- } else if (utf8_codepoint >= '@' && utf8_codepoint <= '~' &&
- (handle->tty.wr.ansi_csi_argc > 0 || utf8_codepoint != '[')) {
- int x, y, d;
-
- /* Command byte */
- switch (utf8_codepoint) {
- case 'A':
- /* cursor up */
- FLUSH_TEXT();
- y = -(handle->tty.wr.ansi_csi_argc ? handle->tty.wr.ansi_csi_argv[0] : 1);
- uv_tty_move_caret(handle, 0, 1, y, 1, error);
- break;
-
- case 'B':
- /* cursor down */
- FLUSH_TEXT();
- y = handle->tty.wr.ansi_csi_argc ? handle->tty.wr.ansi_csi_argv[0] : 1;
- uv_tty_move_caret(handle, 0, 1, y, 1, error);
- break;
-
- case 'C':
- /* cursor forward */
- FLUSH_TEXT();
- x = handle->tty.wr.ansi_csi_argc ? handle->tty.wr.ansi_csi_argv[0] : 1;
- uv_tty_move_caret(handle, x, 1, 0, 1, error);
- break;
-
- case 'D':
- /* cursor back */
- FLUSH_TEXT();
- x = -(handle->tty.wr.ansi_csi_argc ? handle->tty.wr.ansi_csi_argv[0] : 1);
- uv_tty_move_caret(handle, x, 1, 0, 1, error);
- break;
-
- case 'E':
- /* cursor next line */
- FLUSH_TEXT();
- y = handle->tty.wr.ansi_csi_argc ? handle->tty.wr.ansi_csi_argv[0] : 1;
- uv_tty_move_caret(handle, 0, 0, y, 1, error);
- break;
-
- case 'F':
- /* cursor previous line */
- FLUSH_TEXT();
- y = -(handle->tty.wr.ansi_csi_argc ? handle->tty.wr.ansi_csi_argv[0] : 1);
- uv_tty_move_caret(handle, 0, 0, y, 1, error);
- break;
-
- case 'G':
- /* cursor horizontal move absolute */
- FLUSH_TEXT();
- x = (handle->tty.wr.ansi_csi_argc >= 1 && handle->tty.wr.ansi_csi_argv[0])
- ? handle->tty.wr.ansi_csi_argv[0] - 1 : 0;
- uv_tty_move_caret(handle, x, 0, 0, 1, error);
- break;
-
- case 'H':
- case 'f':
- /* cursor move absolute */
- FLUSH_TEXT();
- y = (handle->tty.wr.ansi_csi_argc >= 1 && handle->tty.wr.ansi_csi_argv[0])
- ? handle->tty.wr.ansi_csi_argv[0] - 1 : 0;
- x = (handle->tty.wr.ansi_csi_argc >= 2 && handle->tty.wr.ansi_csi_argv[1])
- ? handle->tty.wr.ansi_csi_argv[1] - 1 : 0;
- uv_tty_move_caret(handle, x, 0, y, 0, error);
- break;
-
- case 'J':
- /* Erase screen */
- FLUSH_TEXT();
- d = handle->tty.wr.ansi_csi_argc ? handle->tty.wr.ansi_csi_argv[0] : 0;
- if (d >= 0 && d <= 2) {
- uv_tty_clear(handle, d, 1, error);
- }
- break;
-
- case 'K':
- /* Erase line */
- FLUSH_TEXT();
- d = handle->tty.wr.ansi_csi_argc ? handle->tty.wr.ansi_csi_argv[0] : 0;
- if (d >= 0 && d <= 2) {
- uv_tty_clear(handle, d, 0, error);
- }
- break;
-
- case 'm':
- /* Set style */
- FLUSH_TEXT();
- uv_tty_set_style(handle, error);
- break;
-
- case 's':
- /* Save the cursor position. */
- FLUSH_TEXT();
- uv_tty_save_state(handle, 0, error);
- break;
-
- case 'u':
- /* Restore the cursor position */
- FLUSH_TEXT();
- uv_tty_restore_state(handle, 0, error);
- break;
-
- case 'l':
- /* Hide the cursor */
- if (handle->tty.wr.ansi_csi_argc == 1 &&
- handle->tty.wr.ansi_csi_argv[0] == 25) {
- FLUSH_TEXT();
- uv_tty_set_cursor_visibility(handle, 0, error);
- }
- break;
-
- case 'h':
- /* Show the cursor */
- if (handle->tty.wr.ansi_csi_argc == 1 &&
- handle->tty.wr.ansi_csi_argv[0] == 25) {
- FLUSH_TEXT();
- uv_tty_set_cursor_visibility(handle, 1, error);
- }
- break;
- }
-
- /* Sequence ended - go back to normal state. */
- ansi_parser_state = ANSI_NORMAL;
- continue;
-
- } else {
- /* We don't support commands that use private mode characters or */
- /* intermediaries. Ignore the rest of the sequence. */
- ansi_parser_state |= ANSI_IGNORE;
- continue;
- }
- } else {
- /* We're ignoring this command. Stop only on command character. */
- if (utf8_codepoint >= '@' && utf8_codepoint <= '~') {
- ansi_parser_state = ANSI_NORMAL;
- }
- continue;
- }
-
- } else if (ansi_parser_state & ANSI_ST_CONTROL) {
- /* Unsupported control code */
- /* Ignore everything until we see BEL or ESC \ */
- if (ansi_parser_state & ANSI_IN_STRING) {
- if (!(ansi_parser_state & ANSI_BACKSLASH_SEEN)) {
- if (utf8_codepoint == '"') {
- ansi_parser_state &= ~ANSI_IN_STRING;
- } else if (utf8_codepoint == '\\') {
- ansi_parser_state |= ANSI_BACKSLASH_SEEN;
- }
- } else {
- ansi_parser_state &= ~ANSI_BACKSLASH_SEEN;
- }
- } else {
- if (utf8_codepoint == '\007' || (utf8_codepoint == '\\' &&
- (ansi_parser_state & ANSI_ESCAPE_SEEN))) {
- /* End of sequence */
- ansi_parser_state = ANSI_NORMAL;
- } else if (utf8_codepoint == '\033') {
- /* Escape character */
- ansi_parser_state |= ANSI_ESCAPE_SEEN;
- } else if (utf8_codepoint == '"') {
- /* String starting */
- ansi_parser_state |= ANSI_IN_STRING;
- ansi_parser_state &= ~ANSI_ESCAPE_SEEN;
- ansi_parser_state &= ~ANSI_BACKSLASH_SEEN;
- } else {
- ansi_parser_state &= ~ANSI_ESCAPE_SEEN;
- }
- }
- continue;
- } else {
- /* Inconsistent state */
- abort();
- }
-
- /* We wouldn't mind emitting utf-16 surrogate pairs. Too bad, the */
- /* windows console doesn't really support UTF-16, so just emit the */
- /* replacement character. */
- if (utf8_codepoint > 0xffff) {
- utf8_codepoint = UNICODE_REPLACEMENT_CHARACTER;
- }
-
- if (utf8_codepoint == 0x0a || utf8_codepoint == 0x0d) {
- /* EOL conversion - emit \r\n when we see \n. */
-
- if (utf8_codepoint == 0x0a && previous_eol != 0x0d) {
- /* \n was not preceded by \r; print \r\n. */
- ENSURE_BUFFER_SPACE(2);
- utf16_buf[utf16_buf_used++] = L'\r';
- utf16_buf[utf16_buf_used++] = L'\n';
- } else if (utf8_codepoint == 0x0d && previous_eol == 0x0a) {
- /* \n was followed by \r; do not print the \r, since */
- /* the source was either \r\n\r (so the second \r is */
- /* redundant) or was \n\r (so the \n was processed */
- /* by the last case and an \r automatically inserted). */
- } else {
- /* \r without \n; print \r as-is. */
- ENSURE_BUFFER_SPACE(1);
- utf16_buf[utf16_buf_used++] = (WCHAR) utf8_codepoint;
- }
-
- previous_eol = (char) utf8_codepoint;
-
- } else if (utf8_codepoint <= 0xffff) {
- /* Encode character into utf-16 buffer. */
- ENSURE_BUFFER_SPACE(1);
- utf16_buf[utf16_buf_used++] = (WCHAR) utf8_codepoint;
- previous_eol = 0;
- }
- }
- }
-
- /* Flush remaining characters */
- FLUSH_TEXT();
-
- /* Copy cached values back to struct. */
- handle->tty.wr.utf8_bytes_left = utf8_bytes_left;
- handle->tty.wr.utf8_codepoint = utf8_codepoint;
- handle->tty.wr.previous_eol = previous_eol;
- handle->tty.wr.ansi_parser_state = ansi_parser_state;
-
- LeaveCriticalSection(&uv_tty_output_lock);
-
- if (*error == STATUS_SUCCESS) {
- return 0;
- } else {
- return -1;
- }
-
-#undef FLUSH_TEXT
-}
-
-
-int uv_tty_write(uv_loop_t* loop,
- uv_write_t* req,
- uv_tty_t* handle,
- const uv_buf_t bufs[],
- unsigned int nbufs,
- uv_write_cb cb) {
- DWORD error;
-
- uv_req_init(loop, (uv_req_t*) req);
- req->type = UV_WRITE;
- req->handle = (uv_stream_t*) handle;
- req->cb = cb;
-
- handle->reqs_pending++;
- handle->stream.conn.write_reqs_pending++;
- REGISTER_HANDLE_REQ(loop, handle, req);
-
- req->u.io.queued_bytes = 0;
-
- if (!uv_tty_write_bufs(handle, bufs, nbufs, &error)) {
- SET_REQ_SUCCESS(req);
- } else {
- SET_REQ_ERROR(req, error);
- }
-
- uv_insert_pending_req(loop, (uv_req_t*) req);
-
- return 0;
-}
-
-
-int uv__tty_try_write(uv_tty_t* handle,
- const uv_buf_t bufs[],
- unsigned int nbufs) {
- DWORD error;
-
- if (handle->stream.conn.write_reqs_pending > 0)
- return UV_EAGAIN;
-
- if (uv_tty_write_bufs(handle, bufs, nbufs, &error))
- return uv_translate_sys_error(error);
-
- return uv__count_bufs(bufs, nbufs);
-}
-
-
-void uv_process_tty_write_req(uv_loop_t* loop, uv_tty_t* handle,
- uv_write_t* req) {
- int err;
-
- handle->write_queue_size -= req->u.io.queued_bytes;
- UNREGISTER_HANDLE_REQ(loop, handle, req);
-
- if (req->cb) {
- err = GET_REQ_ERROR(req);
- req->cb(req, uv_translate_sys_error(err));
- }
-
- handle->stream.conn.write_reqs_pending--;
- if (handle->stream.conn.shutdown_req != NULL &&
- handle->stream.conn.write_reqs_pending == 0) {
- uv_want_endgame(loop, (uv_handle_t*)handle);
- }
-
- DECREASE_PENDING_REQ_COUNT(handle);
-}
-
-
-void uv_tty_close(uv_tty_t* handle) {
- assert(handle->u.fd == -1 || handle->u.fd > 2);
- if (handle->u.fd == -1)
- CloseHandle(handle->handle);
- else
- close(handle->u.fd);
-
- if (handle->flags & UV_HANDLE_READING)
- uv_tty_read_stop(handle);
-
- handle->u.fd = -1;
- handle->handle = INVALID_HANDLE_VALUE;
- handle->flags &= ~(UV_HANDLE_READABLE | UV_HANDLE_WRITABLE);
- uv__handle_closing(handle);
-
- if (handle->reqs_pending == 0) {
- uv_want_endgame(handle->loop, (uv_handle_t*) handle);
- }
-}
-
-
-void uv_tty_endgame(uv_loop_t* loop, uv_tty_t* handle) {
- if (!(handle->flags & UV_HANDLE_TTY_READABLE) &&
- handle->stream.conn.shutdown_req != NULL &&
- handle->stream.conn.write_reqs_pending == 0) {
- UNREGISTER_HANDLE_REQ(loop, handle, handle->stream.conn.shutdown_req);
-
- /* TTY shutdown is really just a no-op */
- if (handle->stream.conn.shutdown_req->cb) {
- if (handle->flags & UV__HANDLE_CLOSING) {
- handle->stream.conn.shutdown_req->cb(handle->stream.conn.shutdown_req, UV_ECANCELED);
- } else {
- handle->stream.conn.shutdown_req->cb(handle->stream.conn.shutdown_req, 0);
- }
- }
-
- handle->stream.conn.shutdown_req = NULL;
-
- DECREASE_PENDING_REQ_COUNT(handle);
- return;
- }
-
- if (handle->flags & UV__HANDLE_CLOSING &&
- handle->reqs_pending == 0) {
- /* The console handle duplicate used for line reading should be destroyed */
- /* by uv_tty_read_stop. */
- assert(!(handle->flags & UV_HANDLE_TTY_READABLE) ||
- handle->tty.rd.read_line_handle == NULL);
-
- /* The wait handle used for raw reading should be unregistered when the */
- /* wait callback runs. */
- assert(!(handle->flags & UV_HANDLE_TTY_READABLE) ||
- handle->tty.rd.read_raw_wait == NULL);
-
- assert(!(handle->flags & UV_HANDLE_CLOSED));
- uv__handle_close(handle);
- }
-}
-
-
-/* TODO: remove me */
-void uv_process_tty_accept_req(uv_loop_t* loop, uv_tty_t* handle,
- uv_req_t* raw_req) {
- abort();
-}
-
-
-/* TODO: remove me */
-void uv_process_tty_connect_req(uv_loop_t* loop, uv_tty_t* handle,
- uv_connect_t* req) {
- abort();
-}
-
-
-int uv_tty_reset_mode(void) {
- /* Not necessary to do anything. */
- return 0;
-}
diff --git a/3rdparty/libuv/src/win/udp.c b/3rdparty/libuv/src/win/udp.c
deleted file mode 100644
index 24792ec067e..00000000000
--- a/3rdparty/libuv/src/win/udp.c
+++ /dev/null
@@ -1,926 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include <assert.h>
-#include <stdlib.h>
-
-#include "uv.h"
-#include "internal.h"
-#include "handle-inl.h"
-#include "stream-inl.h"
-#include "req-inl.h"
-
-
-/*
- * Threshold of active udp streams for which to preallocate udp read buffers.
- */
-const unsigned int uv_active_udp_streams_threshold = 0;
-
-/* A zero-size buffer for use by uv_udp_read */
-static char uv_zero_[] = "";
-
-int uv_udp_getsockname(const uv_udp_t* handle,
- struct sockaddr* name,
- int* namelen) {
- int result;
-
- if (handle->socket == INVALID_SOCKET) {
- return UV_EINVAL;
- }
-
- result = getsockname(handle->socket, name, namelen);
- if (result != 0) {
- return uv_translate_sys_error(WSAGetLastError());
- }
-
- return 0;
-}
-
-
-static int uv_udp_set_socket(uv_loop_t* loop, uv_udp_t* handle, SOCKET socket,
- int family) {
- DWORD yes = 1;
- WSAPROTOCOL_INFOW info;
- int opt_len;
-
- if (handle->socket != INVALID_SOCKET)
- return UV_EBUSY;
-
- /* Set the socket to nonblocking mode */
- if (ioctlsocket(socket, FIONBIO, &yes) == SOCKET_ERROR) {
- return WSAGetLastError();
- }
-
- /* Make the socket non-inheritable */
- if (!SetHandleInformation((HANDLE)socket, HANDLE_FLAG_INHERIT, 0)) {
- return GetLastError();
- }
-
- /* Associate it with the I/O completion port. */
- /* Use uv_handle_t pointer as completion key. */
- if (CreateIoCompletionPort((HANDLE)socket,
- loop->iocp,
- (ULONG_PTR)socket,
- 0) == NULL) {
- return GetLastError();
- }
-
- if (pSetFileCompletionNotificationModes) {
- /* All known Windows that support SetFileCompletionNotificationModes */
- /* have a bug that makes it impossible to use this function in */
- /* conjunction with datagram sockets. We can work around that but only */
- /* if the user is using the default UDP driver (AFD) and has no other */
- /* LSPs stacked on top. Here we check whether that is the case. */
- opt_len = (int) sizeof info;
- if (getsockopt(socket,
- SOL_SOCKET,
- SO_PROTOCOL_INFOW,
- (char*) &info,
- &opt_len) == SOCKET_ERROR) {
- return GetLastError();
- }
-
- if (info.ProtocolChain.ChainLen == 1) {
- if (pSetFileCompletionNotificationModes((HANDLE)socket,
- FILE_SKIP_SET_EVENT_ON_HANDLE |
- FILE_SKIP_COMPLETION_PORT_ON_SUCCESS)) {
- handle->flags |= UV_HANDLE_SYNC_BYPASS_IOCP;
- handle->func_wsarecv = uv_wsarecv_workaround;
- handle->func_wsarecvfrom = uv_wsarecvfrom_workaround;
- } else if (GetLastError() != ERROR_INVALID_FUNCTION) {
- return GetLastError();
- }
- }
- }
-
- handle->socket = socket;
-
- if (family == AF_INET6) {
- handle->flags |= UV_HANDLE_IPV6;
- } else {
- assert(!(handle->flags & UV_HANDLE_IPV6));
- }
-
- return 0;
-}
-
-
-int uv_udp_init_ex(uv_loop_t* loop, uv_udp_t* handle, unsigned int flags) {
- int domain;
-
- /* Use the lower 8 bits for the domain */
- domain = flags & 0xFF;
- if (domain != AF_INET && domain != AF_INET6 && domain != AF_UNSPEC)
- return UV_EINVAL;
-
- if (flags & ~0xFF)
- return UV_EINVAL;
-
- uv__handle_init(loop, (uv_handle_t*) handle, UV_UDP);
- handle->socket = INVALID_SOCKET;
- handle->reqs_pending = 0;
- handle->activecnt = 0;
- handle->func_wsarecv = WSARecv;
- handle->func_wsarecvfrom = WSARecvFrom;
- handle->send_queue_size = 0;
- handle->send_queue_count = 0;
- uv_req_init(loop, (uv_req_t*) &(handle->recv_req));
- handle->recv_req.type = UV_UDP_RECV;
- handle->recv_req.data = handle;
-
- /* If anything fails beyond this point we need to remove the handle from
- * the handle queue, since it was added by uv__handle_init.
- */
-
- if (domain != AF_UNSPEC) {
- SOCKET sock;
- DWORD err;
-
- sock = socket(domain, SOCK_DGRAM, 0);
- if (sock == INVALID_SOCKET) {
- err = WSAGetLastError();
- QUEUE_REMOVE(&handle->handle_queue);
- return uv_translate_sys_error(err);
- }
-
- err = uv_udp_set_socket(handle->loop, handle, sock, domain);
- if (err) {
- closesocket(sock);
- QUEUE_REMOVE(&handle->handle_queue);
- return uv_translate_sys_error(err);
- }
- }
-
- return 0;
-}
-
-
-int uv_udp_init(uv_loop_t* loop, uv_udp_t* handle) {
- return uv_udp_init_ex(loop, handle, AF_UNSPEC);
-}
-
-
-void uv_udp_close(uv_loop_t* loop, uv_udp_t* handle) {
- uv_udp_recv_stop(handle);
- closesocket(handle->socket);
- handle->socket = INVALID_SOCKET;
-
- uv__handle_closing(handle);
-
- if (handle->reqs_pending == 0) {
- uv_want_endgame(loop, (uv_handle_t*) handle);
- }
-}
-
-
-void uv_udp_endgame(uv_loop_t* loop, uv_udp_t* handle) {
- if (handle->flags & UV__HANDLE_CLOSING &&
- handle->reqs_pending == 0) {
- assert(!(handle->flags & UV_HANDLE_CLOSED));
- uv__handle_close(handle);
- }
-}
-
-
-static int uv_udp_maybe_bind(uv_udp_t* handle,
- const struct sockaddr* addr,
- unsigned int addrlen,
- unsigned int flags) {
- int r;
- int err;
- DWORD no = 0;
-
- if (handle->flags & UV_HANDLE_BOUND)
- return 0;
-
- if ((flags & UV_UDP_IPV6ONLY) && addr->sa_family != AF_INET6) {
- /* UV_UDP_IPV6ONLY is supported only for IPV6 sockets */
- return ERROR_INVALID_PARAMETER;
- }
-
- if (handle->socket == INVALID_SOCKET) {
- SOCKET sock = socket(addr->sa_family, SOCK_DGRAM, 0);
- if (sock == INVALID_SOCKET) {
- return WSAGetLastError();
- }
-
- err = uv_udp_set_socket(handle->loop, handle, sock, addr->sa_family);
- if (err) {
- closesocket(sock);
- return err;
- }
- }
-
- if (flags & UV_UDP_REUSEADDR) {
- DWORD yes = 1;
- /* Set SO_REUSEADDR on the socket. */
- if (setsockopt(handle->socket,
- SOL_SOCKET,
- SO_REUSEADDR,
- (char*) &yes,
- sizeof yes) == SOCKET_ERROR) {
- err = WSAGetLastError();
- return err;
- }
- }
-
- if (addr->sa_family == AF_INET6)
- handle->flags |= UV_HANDLE_IPV6;
-
- if (addr->sa_family == AF_INET6 && !(flags & UV_UDP_IPV6ONLY)) {
- /* On windows IPV6ONLY is on by default. */
- /* If the user doesn't specify it libuv turns it off. */
-
- /* TODO: how to handle errors? This may fail if there is no ipv4 stack */
- /* available, or when run on XP/2003 which have no support for dualstack */
- /* sockets. For now we're silently ignoring the error. */
- setsockopt(handle->socket,
- IPPROTO_IPV6,
- IPV6_V6ONLY,
- (char*) &no,
- sizeof no);
- }
-
- r = bind(handle->socket, addr, addrlen);
- if (r == SOCKET_ERROR) {
- return WSAGetLastError();
- }
-
- handle->flags |= UV_HANDLE_BOUND;
-
- return 0;
-}
-
-
-static void uv_udp_queue_recv(uv_loop_t* loop, uv_udp_t* handle) {
- uv_req_t* req;
- uv_buf_t buf;
- DWORD bytes, flags;
- int result;
-
- assert(handle->flags & UV_HANDLE_READING);
- assert(!(handle->flags & UV_HANDLE_READ_PENDING));
-
- req = &handle->recv_req;
- memset(&req->u.io.overlapped, 0, sizeof(req->u.io.overlapped));
-
- /*
- * Preallocate a read buffer if the number of active streams is below
- * the threshold.
- */
- if (loop->active_udp_streams < uv_active_udp_streams_threshold) {
- handle->flags &= ~UV_HANDLE_ZERO_READ;
-
- handle->alloc_cb((uv_handle_t*) handle, 65536, &handle->recv_buffer);
- if (handle->recv_buffer.len == 0) {
- handle->recv_cb(handle, UV_ENOBUFS, &handle->recv_buffer, NULL, 0);
- return;
- }
- assert(handle->recv_buffer.base != NULL);
-
- buf = handle->recv_buffer;
- memset(&handle->recv_from, 0, sizeof handle->recv_from);
- handle->recv_from_len = sizeof handle->recv_from;
- flags = 0;
-
- result = handle->func_wsarecvfrom(handle->socket,
- (WSABUF*) &buf,
- 1,
- &bytes,
- &flags,
- (struct sockaddr*) &handle->recv_from,
- &handle->recv_from_len,
- &req->u.io.overlapped,
- NULL);
-
- if (UV_SUCCEEDED_WITHOUT_IOCP(result == 0)) {
- /* Process the req without IOCP. */
- handle->flags |= UV_HANDLE_READ_PENDING;
- req->u.io.overlapped.InternalHigh = bytes;
- handle->reqs_pending++;
- uv_insert_pending_req(loop, req);
- } else if (UV_SUCCEEDED_WITH_IOCP(result == 0)) {
- /* The req will be processed with IOCP. */
- handle->flags |= UV_HANDLE_READ_PENDING;
- handle->reqs_pending++;
- } else {
- /* Make this req pending reporting an error. */
- SET_REQ_ERROR(req, WSAGetLastError());
- uv_insert_pending_req(loop, req);
- handle->reqs_pending++;
- }
-
- } else {
- handle->flags |= UV_HANDLE_ZERO_READ;
-
- buf.base = (char*) uv_zero_;
- buf.len = 0;
- flags = MSG_PEEK;
-
- result = handle->func_wsarecv(handle->socket,
- (WSABUF*) &buf,
- 1,
- &bytes,
- &flags,
- &req->u.io.overlapped,
- NULL);
-
- if (UV_SUCCEEDED_WITHOUT_IOCP(result == 0)) {
- /* Process the req without IOCP. */
- handle->flags |= UV_HANDLE_READ_PENDING;
- req->u.io.overlapped.InternalHigh = bytes;
- handle->reqs_pending++;
- uv_insert_pending_req(loop, req);
- } else if (UV_SUCCEEDED_WITH_IOCP(result == 0)) {
- /* The req will be processed with IOCP. */
- handle->flags |= UV_HANDLE_READ_PENDING;
- handle->reqs_pending++;
- } else {
- /* Make this req pending reporting an error. */
- SET_REQ_ERROR(req, WSAGetLastError());
- uv_insert_pending_req(loop, req);
- handle->reqs_pending++;
- }
- }
-}
-
-
-int uv__udp_recv_start(uv_udp_t* handle, uv_alloc_cb alloc_cb,
- uv_udp_recv_cb recv_cb) {
- uv_loop_t* loop = handle->loop;
- int err;
-
- if (handle->flags & UV_HANDLE_READING) {
- return WSAEALREADY;
- }
-
- err = uv_udp_maybe_bind(handle,
- (const struct sockaddr*) &uv_addr_ip4_any_,
- sizeof(uv_addr_ip4_any_),
- 0);
- if (err)
- return err;
-
- handle->flags |= UV_HANDLE_READING;
- INCREASE_ACTIVE_COUNT(loop, handle);
- loop->active_udp_streams++;
-
- handle->recv_cb = recv_cb;
- handle->alloc_cb = alloc_cb;
-
- /* If reading was stopped and then started again, there could still be a */
- /* recv request pending. */
- if (!(handle->flags & UV_HANDLE_READ_PENDING))
- uv_udp_queue_recv(loop, handle);
-
- return 0;
-}
-
-
-int uv__udp_recv_stop(uv_udp_t* handle) {
- if (handle->flags & UV_HANDLE_READING) {
- handle->flags &= ~UV_HANDLE_READING;
- handle->loop->active_udp_streams--;
- DECREASE_ACTIVE_COUNT(loop, handle);
- }
-
- return 0;
-}
-
-
-static int uv__send(uv_udp_send_t* req,
- uv_udp_t* handle,
- const uv_buf_t bufs[],
- unsigned int nbufs,
- const struct sockaddr* addr,
- unsigned int addrlen,
- uv_udp_send_cb cb) {
- uv_loop_t* loop = handle->loop;
- DWORD result, bytes;
-
- uv_req_init(loop, (uv_req_t*) req);
- req->type = UV_UDP_SEND;
- req->handle = handle;
- req->cb = cb;
- memset(&req->u.io.overlapped, 0, sizeof(req->u.io.overlapped));
-
- result = WSASendTo(handle->socket,
- (WSABUF*)bufs,
- nbufs,
- &bytes,
- 0,
- addr,
- addrlen,
- &req->u.io.overlapped,
- NULL);
-
- if (UV_SUCCEEDED_WITHOUT_IOCP(result == 0)) {
- /* Request completed immediately. */
- req->u.io.queued_bytes = 0;
- handle->reqs_pending++;
- handle->send_queue_size += req->u.io.queued_bytes;
- handle->send_queue_count++;
- REGISTER_HANDLE_REQ(loop, handle, req);
- uv_insert_pending_req(loop, (uv_req_t*)req);
- } else if (UV_SUCCEEDED_WITH_IOCP(result == 0)) {
- /* Request queued by the kernel. */
- req->u.io.queued_bytes = uv__count_bufs(bufs, nbufs);
- handle->reqs_pending++;
- handle->send_queue_size += req->u.io.queued_bytes;
- handle->send_queue_count++;
- REGISTER_HANDLE_REQ(loop, handle, req);
- } else {
- /* Send failed due to an error. */
- return WSAGetLastError();
- }
-
- return 0;
-}
-
-
-void uv_process_udp_recv_req(uv_loop_t* loop, uv_udp_t* handle,
- uv_req_t* req) {
- uv_buf_t buf;
- int partial;
-
- assert(handle->type == UV_UDP);
-
- handle->flags &= ~UV_HANDLE_READ_PENDING;
-
- if (!REQ_SUCCESS(req)) {
- DWORD err = GET_REQ_SOCK_ERROR(req);
- if (err == WSAEMSGSIZE) {
- /* Not a real error, it just indicates that the received packet */
- /* was bigger than the receive buffer. */
- } else if (err == WSAECONNRESET || err == WSAENETRESET) {
- /* A previous sendto operation failed; ignore this error. If */
- /* zero-reading we need to call WSARecv/WSARecvFrom _without_ the */
- /* MSG_PEEK flag to clear out the error queue. For nonzero reads, */
- /* immediately queue a new receive. */
- if (!(handle->flags & UV_HANDLE_ZERO_READ)) {
- goto done;
- }
- } else {
- /* A real error occurred. Report the error to the user only if we're */
- /* currently reading. */
- if (handle->flags & UV_HANDLE_READING) {
- uv_udp_recv_stop(handle);
- buf = (handle->flags & UV_HANDLE_ZERO_READ) ?
- uv_buf_init(NULL, 0) : handle->recv_buffer;
- handle->recv_cb(handle, uv_translate_sys_error(err), &buf, NULL, 0);
- }
- goto done;
- }
- }
-
- if (!(handle->flags & UV_HANDLE_ZERO_READ)) {
- /* Successful read */
- partial = !REQ_SUCCESS(req);
- handle->recv_cb(handle,
- req->u.io.overlapped.InternalHigh,
- &handle->recv_buffer,
- (const struct sockaddr*) &handle->recv_from,
- partial ? UV_UDP_PARTIAL : 0);
- } else if (handle->flags & UV_HANDLE_READING) {
- DWORD bytes, err, flags;
- struct sockaddr_storage from;
- int from_len;
-
- /* Do a nonblocking receive */
- /* TODO: try to read multiple datagrams at once. FIONREAD maybe? */
- handle->alloc_cb((uv_handle_t*) handle, 65536, &buf);
- if (buf.len == 0) {
- handle->recv_cb(handle, UV_ENOBUFS, &buf, NULL, 0);
- goto done;
- }
- assert(buf.base != NULL);
-
- memset(&from, 0, sizeof from);
- from_len = sizeof from;
-
- flags = 0;
-
- if (WSARecvFrom(handle->socket,
- (WSABUF*)&buf,
- 1,
- &bytes,
- &flags,
- (struct sockaddr*) &from,
- &from_len,
- NULL,
- NULL) != SOCKET_ERROR) {
-
- /* Message received */
- handle->recv_cb(handle, bytes, &buf, (const struct sockaddr*) &from, 0);
- } else {
- err = WSAGetLastError();
- if (err == WSAEMSGSIZE) {
- /* Message truncated */
- handle->recv_cb(handle,
- bytes,
- &buf,
- (const struct sockaddr*) &from,
- UV_UDP_PARTIAL);
- } else if (err == WSAEWOULDBLOCK) {
- /* Kernel buffer empty */
- handle->recv_cb(handle, 0, &buf, NULL, 0);
- } else if (err == WSAECONNRESET || err == WSAENETRESET) {
- /* WSAECONNRESET/WSANETRESET is ignored because this just indicates
- * that a previous sendto operation failed.
- */
- handle->recv_cb(handle, 0, &buf, NULL, 0);
- } else {
- /* Any other error that we want to report back to the user. */
- uv_udp_recv_stop(handle);
- handle->recv_cb(handle, uv_translate_sys_error(err), &buf, NULL, 0);
- }
- }
- }
-
-done:
- /* Post another read if still reading and not closing. */
- if ((handle->flags & UV_HANDLE_READING) &&
- !(handle->flags & UV_HANDLE_READ_PENDING)) {
- uv_udp_queue_recv(loop, handle);
- }
-
- DECREASE_PENDING_REQ_COUNT(handle);
-}
-
-
-void uv_process_udp_send_req(uv_loop_t* loop, uv_udp_t* handle,
- uv_udp_send_t* req) {
- int err;
-
- assert(handle->type == UV_UDP);
-
- assert(handle->send_queue_size >= req->u.io.queued_bytes);
- assert(handle->send_queue_count >= 1);
- handle->send_queue_size -= req->u.io.queued_bytes;
- handle->send_queue_count--;
-
- UNREGISTER_HANDLE_REQ(loop, handle, req);
-
- if (req->cb) {
- err = 0;
- if (!REQ_SUCCESS(req)) {
- err = GET_REQ_SOCK_ERROR(req);
- }
- req->cb(req, uv_translate_sys_error(err));
- }
-
- DECREASE_PENDING_REQ_COUNT(handle);
-}
-
-
-static int uv__udp_set_membership4(uv_udp_t* handle,
- const struct sockaddr_in* multicast_addr,
- const char* interface_addr,
- uv_membership membership) {
- int err;
- int optname;
- struct ip_mreq mreq;
-
- if (handle->flags & UV_HANDLE_IPV6)
- return UV_EINVAL;
-
- /* If the socket is unbound, bind to inaddr_any. */
- err = uv_udp_maybe_bind(handle,
- (const struct sockaddr*) &uv_addr_ip4_any_,
- sizeof(uv_addr_ip4_any_),
- UV_UDP_REUSEADDR);
- if (err)
- return uv_translate_sys_error(err);
-
- memset(&mreq, 0, sizeof mreq);
-
- if (interface_addr) {
- err = uv_inet_pton(AF_INET, interface_addr, &mreq.imr_interface.s_addr);
- if (err)
- return err;
- } else {
- mreq.imr_interface.s_addr = htonl(INADDR_ANY);
- }
-
- mreq.imr_multiaddr.s_addr = multicast_addr->sin_addr.s_addr;
-
- switch (membership) {
- case UV_JOIN_GROUP:
- optname = IP_ADD_MEMBERSHIP;
- break;
- case UV_LEAVE_GROUP:
- optname = IP_DROP_MEMBERSHIP;
- break;
- default:
- return UV_EINVAL;
- }
-
- if (setsockopt(handle->socket,
- IPPROTO_IP,
- optname,
- (char*) &mreq,
- sizeof mreq) == SOCKET_ERROR) {
- return uv_translate_sys_error(WSAGetLastError());
- }
-
- return 0;
-}
-
-
-int uv__udp_set_membership6(uv_udp_t* handle,
- const struct sockaddr_in6* multicast_addr,
- const char* interface_addr,
- uv_membership membership) {
- int optname;
- int err;
- struct ipv6_mreq mreq;
- struct sockaddr_in6 addr6;
-
- if ((handle->flags & UV_HANDLE_BOUND) && !(handle->flags & UV_HANDLE_IPV6))
- return UV_EINVAL;
-
- err = uv_udp_maybe_bind(handle,
- (const struct sockaddr*) &uv_addr_ip6_any_,
- sizeof(uv_addr_ip6_any_),
- UV_UDP_REUSEADDR);
-
- if (err)
- return uv_translate_sys_error(err);
-
- memset(&mreq, 0, sizeof(mreq));
-
- if (interface_addr) {
- if (uv_ip6_addr(interface_addr, 0, &addr6))
- return UV_EINVAL;
- mreq.ipv6mr_interface = addr6.sin6_scope_id;
- } else {
- mreq.ipv6mr_interface = 0;
- }
-
- mreq.ipv6mr_multiaddr = multicast_addr->sin6_addr;
-
- switch (membership) {
- case UV_JOIN_GROUP:
- optname = IPV6_ADD_MEMBERSHIP;
- break;
- case UV_LEAVE_GROUP:
- optname = IPV6_DROP_MEMBERSHIP;
- break;
- default:
- return UV_EINVAL;
- }
-
- if (setsockopt(handle->socket,
- IPPROTO_IPV6,
- optname,
- (char*) &mreq,
- sizeof mreq) == SOCKET_ERROR) {
- return uv_translate_sys_error(WSAGetLastError());
- }
-
- return 0;
-}
-
-
-int uv_udp_set_membership(uv_udp_t* handle,
- const char* multicast_addr,
- const char* interface_addr,
- uv_membership membership) {
- struct sockaddr_in addr4;
- struct sockaddr_in6 addr6;
-
- if (uv_ip4_addr(multicast_addr, 0, &addr4) == 0)
- return uv__udp_set_membership4(handle, &addr4, interface_addr, membership);
- else if (uv_ip6_addr(multicast_addr, 0, &addr6) == 0)
- return uv__udp_set_membership6(handle, &addr6, interface_addr, membership);
- else
- return UV_EINVAL;
-}
-
-
-int uv_udp_set_multicast_interface(uv_udp_t* handle, const char* interface_addr) {
- struct sockaddr_storage addr_st;
- struct sockaddr_in* addr4;
- struct sockaddr_in6* addr6;
-
- addr4 = (struct sockaddr_in*) &addr_st;
- addr6 = (struct sockaddr_in6*) &addr_st;
-
- if (!interface_addr) {
- memset(&addr_st, 0, sizeof addr_st);
- if (handle->flags & UV_HANDLE_IPV6) {
- addr_st.ss_family = AF_INET6;
- addr6->sin6_scope_id = 0;
- } else {
- addr_st.ss_family = AF_INET;
- addr4->sin_addr.s_addr = htonl(INADDR_ANY);
- }
- } else if (uv_ip4_addr(interface_addr, 0, addr4) == 0) {
- /* nothing, address was parsed */
- } else if (uv_ip6_addr(interface_addr, 0, addr6) == 0) {
- /* nothing, address was parsed */
- } else {
- return UV_EINVAL;
- }
-
- if (!(handle->flags & UV_HANDLE_BOUND))
- return UV_EBADF;
-
- if (addr_st.ss_family == AF_INET) {
- if (setsockopt(handle->socket,
- IPPROTO_IP,
- IP_MULTICAST_IF,
- (char*) &addr4->sin_addr,
- sizeof(addr4->sin_addr)) == SOCKET_ERROR) {
- return uv_translate_sys_error(WSAGetLastError());
- }
- } else if (addr_st.ss_family == AF_INET6) {
- if (setsockopt(handle->socket,
- IPPROTO_IPV6,
- IPV6_MULTICAST_IF,
- (char*) &addr6->sin6_scope_id,
- sizeof(addr6->sin6_scope_id)) == SOCKET_ERROR) {
- return uv_translate_sys_error(WSAGetLastError());
- }
- } else {
- assert(0 && "unexpected address family");
- abort();
- }
-
- return 0;
-}
-
-
-int uv_udp_set_broadcast(uv_udp_t* handle, int value) {
- BOOL optval = (BOOL) value;
-
- if (!(handle->flags & UV_HANDLE_BOUND))
- return UV_EBADF;
-
- if (setsockopt(handle->socket,
- SOL_SOCKET,
- SO_BROADCAST,
- (char*) &optval,
- sizeof optval)) {
- return uv_translate_sys_error(WSAGetLastError());
- }
-
- return 0;
-}
-
-
-int uv_udp_open(uv_udp_t* handle, uv_os_sock_t sock) {
- WSAPROTOCOL_INFOW protocol_info;
- int opt_len;
- int err;
-
- /* Detect the address family of the socket. */
- opt_len = (int) sizeof protocol_info;
- if (getsockopt(sock,
- SOL_SOCKET,
- SO_PROTOCOL_INFOW,
- (char*) &protocol_info,
- &opt_len) == SOCKET_ERROR) {
- return uv_translate_sys_error(GetLastError());
- }
-
- err = uv_udp_set_socket(handle->loop,
- handle,
- sock,
- protocol_info.iAddressFamily);
- return uv_translate_sys_error(err);
-}
-
-
-#define SOCKOPT_SETTER(name, option4, option6, validate) \
- int uv_udp_set_##name(uv_udp_t* handle, int value) { \
- DWORD optval = (DWORD) value; \
- \
- if (!(validate(value))) { \
- return UV_EINVAL; \
- } \
- \
- if (!(handle->flags & UV_HANDLE_BOUND)) \
- return UV_EBADF; \
- \
- if (!(handle->flags & UV_HANDLE_IPV6)) { \
- /* Set IPv4 socket option */ \
- if (setsockopt(handle->socket, \
- IPPROTO_IP, \
- option4, \
- (char*) &optval, \
- sizeof optval)) { \
- return uv_translate_sys_error(WSAGetLastError()); \
- } \
- } else { \
- /* Set IPv6 socket option */ \
- if (setsockopt(handle->socket, \
- IPPROTO_IPV6, \
- option6, \
- (char*) &optval, \
- sizeof optval)) { \
- return uv_translate_sys_error(WSAGetLastError()); \
- } \
- } \
- return 0; \
- }
-
-#define VALIDATE_TTL(value) ((value) >= 1 && (value) <= 255)
-#define VALIDATE_MULTICAST_TTL(value) ((value) >= -1 && (value) <= 255)
-#define VALIDATE_MULTICAST_LOOP(value) (1)
-
-SOCKOPT_SETTER(ttl,
- IP_TTL,
- IPV6_HOPLIMIT,
- VALIDATE_TTL)
-SOCKOPT_SETTER(multicast_ttl,
- IP_MULTICAST_TTL,
- IPV6_MULTICAST_HOPS,
- VALIDATE_MULTICAST_TTL)
-SOCKOPT_SETTER(multicast_loop,
- IP_MULTICAST_LOOP,
- IPV6_MULTICAST_LOOP,
- VALIDATE_MULTICAST_LOOP)
-
-#undef SOCKOPT_SETTER
-#undef VALIDATE_TTL
-#undef VALIDATE_MULTICAST_TTL
-#undef VALIDATE_MULTICAST_LOOP
-
-
-/* This function is an egress point, i.e. it returns libuv errors rather than
- * system errors.
- */
-int uv__udp_bind(uv_udp_t* handle,
- const struct sockaddr* addr,
- unsigned int addrlen,
- unsigned int flags) {
- int err;
-
- err = uv_udp_maybe_bind(handle, addr, addrlen, flags);
- if (err)
- return uv_translate_sys_error(err);
-
- return 0;
-}
-
-
-/* This function is an egress point, i.e. it returns libuv errors rather than
- * system errors.
- */
-int uv__udp_send(uv_udp_send_t* req,
- uv_udp_t* handle,
- const uv_buf_t bufs[],
- unsigned int nbufs,
- const struct sockaddr* addr,
- unsigned int addrlen,
- uv_udp_send_cb send_cb) {
- const struct sockaddr* bind_addr;
- int err;
-
- if (!(handle->flags & UV_HANDLE_BOUND)) {
- if (addrlen == sizeof(uv_addr_ip4_any_)) {
- bind_addr = (const struct sockaddr*) &uv_addr_ip4_any_;
- } else if (addrlen == sizeof(uv_addr_ip6_any_)) {
- bind_addr = (const struct sockaddr*) &uv_addr_ip6_any_;
- } else {
- abort();
- }
- err = uv_udp_maybe_bind(handle, bind_addr, addrlen, 0);
- if (err)
- return uv_translate_sys_error(err);
- }
-
- err = uv__send(req, handle, bufs, nbufs, addr, addrlen, send_cb);
- if (err)
- return uv_translate_sys_error(err);
-
- return 0;
-}
-
-
-int uv__udp_try_send(uv_udp_t* handle,
- const uv_buf_t bufs[],
- unsigned int nbufs,
- const struct sockaddr* addr,
- unsigned int addrlen) {
- return UV_ENOSYS;
-}
diff --git a/3rdparty/libuv/src/win/util.c b/3rdparty/libuv/src/win/util.c
deleted file mode 100644
index cb247513046..00000000000
--- a/3rdparty/libuv/src/win/util.c
+++ /dev/null
@@ -1,1232 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include <assert.h>
-#include <direct.h>
-#include <limits.h>
-#include <stdio.h>
-#include <string.h>
-#include <time.h>
-#include <wchar.h>
-
-#include "uv.h"
-#include "internal.h"
-
-#include <winsock2.h>
-#include <winperf.h>
-#include <iphlpapi.h>
-#include <psapi.h>
-#include <tlhelp32.h>
-#include <windows.h>
-#include <userenv.h>
-
-
-/*
- * Max title length; the only thing MSDN tells us about the maximum length
- * of the console title is that it is smaller than 64K. However in practice
- * it is much smaller, and there is no way to figure out what the exact length
- * of the title is or can be, at least not on XP. To make it even more
- * annoying, GetConsoleTitle fails when the buffer to be read into is bigger
- * than the actual maximum length. So we make a conservative guess here;
- * just don't put the novel you're writing in the title, unless the plot
- * survives truncation.
- */
-#define MAX_TITLE_LENGTH 8192
-
-/* The number of nanoseconds in one second. */
-#define UV__NANOSEC 1000000000
-
-
-/* Cached copy of the process title, plus a mutex guarding it. */
-static char *process_title;
-static CRITICAL_SECTION process_title_lock;
-
-/* Cached copy of the process id, written once. */
-static DWORD current_pid = 0;
-
-
-/* Interval (in seconds) of the high-resolution clock. */
-static double hrtime_interval_ = 0;
-
-
-/*
- * One-time initialization code for functionality defined in util.c.
- */
-void uv__util_init() {
- LARGE_INTEGER perf_frequency;
-
- /* Initialize process title access mutex. */
- InitializeCriticalSection(&process_title_lock);
-
- /* Retrieve high-resolution timer frequency
- * and precompute its reciprocal.
- */
- if (QueryPerformanceFrequency(&perf_frequency)) {
- hrtime_interval_ = 1.0 / perf_frequency.QuadPart;
- } else {
- hrtime_interval_= 0;
- }
-}
-
-
-int uv_utf16_to_utf8(const WCHAR* utf16Buffer, size_t utf16Size,
- char* utf8Buffer, size_t utf8Size) {
- return WideCharToMultiByte(CP_UTF8,
- 0,
- utf16Buffer,
- utf16Size,
- utf8Buffer,
- utf8Size,
- NULL,
- NULL);
-}
-
-
-int uv_utf8_to_utf16(const char* utf8Buffer, WCHAR* utf16Buffer,
- size_t utf16Size) {
- return MultiByteToWideChar(CP_UTF8,
- 0,
- utf8Buffer,
- -1,
- utf16Buffer,
- utf16Size);
-}
-
-
-int uv_exepath(char* buffer, size_t* size_ptr) {
- int utf8_len, utf16_buffer_len, utf16_len;
- WCHAR* utf16_buffer;
- int err;
-
- if (buffer == NULL || size_ptr == NULL || *size_ptr == 0) {
- return UV_EINVAL;
- }
-
- if (*size_ptr > 32768) {
- /* Windows paths can never be longer than this. */
- utf16_buffer_len = 32768;
- } else {
- utf16_buffer_len = (int) *size_ptr;
- }
-
- utf16_buffer = (WCHAR*) uv__malloc(sizeof(WCHAR) * utf16_buffer_len);
- if (!utf16_buffer) {
- return UV_ENOMEM;
- }
-
- /* Get the path as UTF-16. */
- utf16_len = GetModuleFileNameW(NULL, utf16_buffer, utf16_buffer_len);
- if (utf16_len <= 0) {
- err = GetLastError();
- goto error;
- }
-
- /* utf16_len contains the length, *not* including the terminating null. */
- utf16_buffer[utf16_len] = L'\0';
-
- /* Convert to UTF-8 */
- utf8_len = WideCharToMultiByte(CP_UTF8,
- 0,
- utf16_buffer,
- -1,
- buffer,
- *size_ptr > INT_MAX ? INT_MAX : (int) *size_ptr,
- NULL,
- NULL);
- if (utf8_len == 0) {
- err = GetLastError();
- goto error;
- }
-
- uv__free(utf16_buffer);
-
- /* utf8_len *does* include the terminating null at this point, but the */
- /* returned size shouldn't. */
- *size_ptr = utf8_len - 1;
- return 0;
-
- error:
- uv__free(utf16_buffer);
- return uv_translate_sys_error(err);
-}
-
-
-int uv_cwd(char* buffer, size_t* size) {
- DWORD utf16_len;
- WCHAR utf16_buffer[MAX_PATH];
- int r;
-
- if (buffer == NULL || size == NULL) {
- return UV_EINVAL;
- }
-
- utf16_len = GetCurrentDirectoryW(MAX_PATH, utf16_buffer);
- if (utf16_len == 0) {
- return uv_translate_sys_error(GetLastError());
- } else if (utf16_len > MAX_PATH) {
- /* This should be impossible; however the CRT has a code path to deal */
- /* with this scenario, so I added a check anyway. */
- return UV_EIO;
- }
-
- /* utf16_len contains the length, *not* including the terminating null. */
- utf16_buffer[utf16_len] = L'\0';
-
- /* The returned directory should not have a trailing slash, unless it */
- /* points at a drive root, like c:\. Remove it if needed.*/
- if (utf16_buffer[utf16_len - 1] == L'\\' &&
- !(utf16_len == 3 && utf16_buffer[1] == L':')) {
- utf16_len--;
- utf16_buffer[utf16_len] = L'\0';
- }
-
- /* Check how much space we need */
- r = WideCharToMultiByte(CP_UTF8,
- 0,
- utf16_buffer,
- -1,
- NULL,
- 0,
- NULL,
- NULL);
- if (r == 0) {
- return uv_translate_sys_error(GetLastError());
- } else if (r > (int) *size) {
- *size = r -1;
- return UV_ENOBUFS;
- }
-
- /* Convert to UTF-8 */
- r = WideCharToMultiByte(CP_UTF8,
- 0,
- utf16_buffer,
- -1,
- buffer,
- *size > INT_MAX ? INT_MAX : (int) *size,
- NULL,
- NULL);
- if (r == 0) {
- return uv_translate_sys_error(GetLastError());
- }
-
- *size = r - 1;
- return 0;
-}
-
-
-int uv_chdir(const char* dir) {
- WCHAR utf16_buffer[MAX_PATH];
- size_t utf16_len;
- WCHAR drive_letter, env_var[4];
-
- if (dir == NULL) {
- return UV_EINVAL;
- }
-
- if (MultiByteToWideChar(CP_UTF8,
- 0,
- dir,
- -1,
- utf16_buffer,
- MAX_PATH) == 0) {
- DWORD error = GetLastError();
- /* The maximum length of the current working directory is 260 chars, */
- /* including terminating null. If it doesn't fit, the path name must be */
- /* too long. */
- if (error == ERROR_INSUFFICIENT_BUFFER) {
- return UV_ENAMETOOLONG;
- } else {
- return uv_translate_sys_error(error);
- }
- }
-
- if (!SetCurrentDirectoryW(utf16_buffer)) {
- return uv_translate_sys_error(GetLastError());
- }
-
- /* Windows stores the drive-local path in an "hidden" environment variable, */
- /* which has the form "=C:=C:\Windows". SetCurrentDirectory does not */
- /* update this, so we'll have to do it. */
- utf16_len = GetCurrentDirectoryW(MAX_PATH, utf16_buffer);
- if (utf16_len == 0) {
- return uv_translate_sys_error(GetLastError());
- } else if (utf16_len > MAX_PATH) {
- return UV_EIO;
- }
-
- /* The returned directory should not have a trailing slash, unless it */
- /* points at a drive root, like c:\. Remove it if needed. */
- if (utf16_buffer[utf16_len - 1] == L'\\' &&
- !(utf16_len == 3 && utf16_buffer[1] == L':')) {
- utf16_len--;
- utf16_buffer[utf16_len] = L'\0';
- }
-
- if (utf16_len < 2 || utf16_buffer[1] != L':') {
- /* Doesn't look like a drive letter could be there - probably an UNC */
- /* path. TODO: Need to handle win32 namespaces like \\?\C:\ ? */
- drive_letter = 0;
- } else if (utf16_buffer[0] >= L'A' && utf16_buffer[0] <= L'Z') {
- drive_letter = utf16_buffer[0];
- } else if (utf16_buffer[0] >= L'a' && utf16_buffer[0] <= L'z') {
- /* Convert to uppercase. */
- drive_letter = utf16_buffer[0] - L'a' + L'A';
- } else {
- /* Not valid. */
- drive_letter = 0;
- }
-
- if (drive_letter != 0) {
- /* Construct the environment variable name and set it. */
- env_var[0] = L'=';
- env_var[1] = drive_letter;
- env_var[2] = L':';
- env_var[3] = L'\0';
-
- if (!SetEnvironmentVariableW(env_var, utf16_buffer)) {
- return uv_translate_sys_error(GetLastError());
- }
- }
-
- return 0;
-}
-
-
-void uv_loadavg(double avg[3]) {
- /* Can't be implemented */
- avg[0] = avg[1] = avg[2] = 0;
-}
-
-
-uint64_t uv_get_free_memory(void) {
- MEMORYSTATUSEX memory_status;
- memory_status.dwLength = sizeof(memory_status);
-
- if (!GlobalMemoryStatusEx(&memory_status)) {
- return -1;
- }
-
- return (uint64_t)memory_status.ullAvailPhys;
-}
-
-
-uint64_t uv_get_total_memory(void) {
- MEMORYSTATUSEX memory_status;
- memory_status.dwLength = sizeof(memory_status);
-
- if (!GlobalMemoryStatusEx(&memory_status)) {
- return -1;
- }
-
- return (uint64_t)memory_status.ullTotalPhys;
-}
-
-
-int uv_parent_pid() {
- int parent_pid = -1;
- HANDLE handle;
- PROCESSENTRY32 pe;
- DWORD current_pid = GetCurrentProcessId();
-
- pe.dwSize = sizeof(PROCESSENTRY32);
- handle = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
-
- if (Process32First(handle, &pe)) {
- do {
- if (pe.th32ProcessID == current_pid) {
- parent_pid = pe.th32ParentProcessID;
- break;
- }
- } while( Process32Next(handle, &pe));
- }
-
- CloseHandle(handle);
- return parent_pid;
-}
-
-
-int uv_current_pid() {
- if (current_pid == 0) {
- current_pid = GetCurrentProcessId();
- }
- return current_pid;
-}
-
-
-char** uv_setup_args(int argc, char** argv) {
- return argv;
-}
-
-
-int uv_set_process_title(const char* title) {
- int err;
- int length;
- WCHAR* title_w = NULL;
-
- uv__once_init();
-
- /* Find out how big the buffer for the wide-char title must be */
- length = uv_utf8_to_utf16(title, NULL, 0);
- if (!length) {
- err = GetLastError();
- goto done;
- }
-
- /* Convert to wide-char string */
- title_w = (WCHAR*)uv__malloc(sizeof(WCHAR) * length);
- if (!title_w) {
- uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc");
- }
-
- length = uv_utf8_to_utf16(title, title_w, length);
- if (!length) {
- err = GetLastError();
- goto done;
- }
-
- /* If the title must be truncated insert a \0 terminator there */
- if (length > MAX_TITLE_LENGTH) {
- title_w[MAX_TITLE_LENGTH - 1] = L'\0';
- }
-
- if (!SetConsoleTitleW(title_w)) {
- err = GetLastError();
- goto done;
- }
-
- EnterCriticalSection(&process_title_lock);
- uv__free(process_title);
- process_title = uv__strdup(title);
- LeaveCriticalSection(&process_title_lock);
-
- err = 0;
-
-done:
- uv__free(title_w);
- return uv_translate_sys_error(err);
-}
-
-
-static int uv__get_process_title() {
- WCHAR title_w[MAX_TITLE_LENGTH];
- int length;
-
- if (!GetConsoleTitleW(title_w, sizeof(title_w) / sizeof(WCHAR))) {
- return -1;
- }
-
- /* Find out what the size of the buffer is that we need */
- length = uv_utf16_to_utf8(title_w, -1, NULL, 0);
- if (!length) {
- return -1;
- }
-
- assert(!process_title);
- process_title = (char*)uv__malloc(length);
- if (!process_title) {
- uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc");
- }
-
- /* Do utf16 -> utf8 conversion here */
- if (!uv_utf16_to_utf8(title_w, -1, process_title, length)) {
- uv__free(process_title);
- return -1;
- }
-
- return 0;
-}
-
-
-int uv_get_process_title(char* buffer, size_t size) {
- uv__once_init();
-
- EnterCriticalSection(&process_title_lock);
- /*
- * If the process_title was never read before nor explicitly set,
- * we must query it with getConsoleTitleW
- */
- if (!process_title && uv__get_process_title() == -1) {
- LeaveCriticalSection(&process_title_lock);
- return uv_translate_sys_error(GetLastError());
- }
-
- assert(process_title);
- strncpy(buffer, process_title, size);
- LeaveCriticalSection(&process_title_lock);
-
- return 0;
-}
-
-
-uint64_t uv_hrtime(void) {
- uv__once_init();
- return uv__hrtime(UV__NANOSEC);
-}
-
-uint64_t uv__hrtime(double scale) {
- LARGE_INTEGER counter;
-
- /* If the performance interval is zero, there's no support. */
- if (hrtime_interval_ == 0) {
- return 0;
- }
-
- if (!QueryPerformanceCounter(&counter)) {
- return 0;
- }
-
- /* Because we have no guarantee about the order of magnitude of the
- * performance counter interval, integer math could cause this computation
- * to overflow. Therefore we resort to floating point math.
- */
- return (uint64_t) ((double) counter.QuadPart * hrtime_interval_ * scale);
-}
-
-
-int uv_resident_set_memory(size_t* rss) {
- HANDLE current_process;
- PROCESS_MEMORY_COUNTERS pmc;
-
- current_process = GetCurrentProcess();
-
- if (!GetProcessMemoryInfo(current_process, &pmc, sizeof(pmc))) {
- return uv_translate_sys_error(GetLastError());
- }
-
- *rss = pmc.WorkingSetSize;
-
- return 0;
-}
-
-
-int uv_uptime(double* uptime) {
- BYTE stack_buffer[4096];
- BYTE* malloced_buffer = NULL;
- BYTE* buffer = (BYTE*) stack_buffer;
- size_t buffer_size = sizeof(stack_buffer);
- DWORD data_size;
-
- PERF_DATA_BLOCK* data_block;
- PERF_OBJECT_TYPE* object_type;
- PERF_COUNTER_DEFINITION* counter_definition;
-
- DWORD i;
-
- for (;;) {
- LONG result;
-
- data_size = (DWORD) buffer_size;
- result = RegQueryValueExW(HKEY_PERFORMANCE_DATA,
- L"2",
- NULL,
- NULL,
- buffer,
- &data_size);
- if (result == ERROR_SUCCESS) {
- break;
- } else if (result != ERROR_MORE_DATA) {
- *uptime = 0;
- return uv_translate_sys_error(result);
- }
-
- buffer_size *= 2;
- /* Don't let the buffer grow infinitely. */
- if (buffer_size > 1 << 20) {
- goto internalError;
- }
-
- uv__free(malloced_buffer);
-
- buffer = malloced_buffer = (BYTE*) uv__malloc(buffer_size);
- if (malloced_buffer == NULL) {
- *uptime = 0;
- return UV_ENOMEM;
- }
- }
-
- if (data_size < sizeof(*data_block))
- goto internalError;
-
- data_block = (PERF_DATA_BLOCK*) buffer;
-
- if (wmemcmp(data_block->Signature, L"PERF", 4) != 0)
- goto internalError;
-
- if (data_size < data_block->HeaderLength + sizeof(*object_type))
- goto internalError;
-
- object_type = (PERF_OBJECT_TYPE*) (buffer + data_block->HeaderLength);
-
- if (object_type->NumInstances != PERF_NO_INSTANCES)
- goto internalError;
-
- counter_definition = (PERF_COUNTER_DEFINITION*) (buffer +
- data_block->HeaderLength + object_type->HeaderLength);
- for (i = 0; i < object_type->NumCounters; i++) {
- if ((BYTE*) counter_definition + sizeof(*counter_definition) >
- buffer + data_size) {
- break;
- }
-
- if (counter_definition->CounterNameTitleIndex == 674 &&
- counter_definition->CounterSize == sizeof(uint64_t)) {
- if (counter_definition->CounterOffset + sizeof(uint64_t) > data_size ||
- !(counter_definition->CounterType & PERF_OBJECT_TIMER)) {
- goto internalError;
- } else {
- BYTE* address = (BYTE*) object_type + object_type->DefinitionLength +
- counter_definition->CounterOffset;
- uint64_t value = *((uint64_t*) address);
- *uptime = (double) (object_type->PerfTime.QuadPart - value) /
- (double) object_type->PerfFreq.QuadPart;
- uv__free(malloced_buffer);
- return 0;
- }
- }
-
- counter_definition = (PERF_COUNTER_DEFINITION*)
- ((BYTE*) counter_definition + counter_definition->ByteLength);
- }
-
- /* If we get here, the uptime value was not found. */
- uv__free(malloced_buffer);
- *uptime = 0;
- return UV_ENOSYS;
-
- internalError:
- uv__free(malloced_buffer);
- *uptime = 0;
- return UV_EIO;
-}
-
-
-int uv_cpu_info(uv_cpu_info_t** cpu_infos_ptr, int* cpu_count_ptr) {
- uv_cpu_info_t* cpu_infos;
- SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION* sppi;
- DWORD sppi_size;
- SYSTEM_INFO system_info;
- DWORD cpu_count, r, i;
- NTSTATUS status;
- ULONG result_size;
- int err;
- uv_cpu_info_t* cpu_info;
-
- cpu_infos = NULL;
- cpu_count = 0;
- sppi = NULL;
-
- uv__once_init();
-
- GetSystemInfo(&system_info);
- cpu_count = system_info.dwNumberOfProcessors;
-
- cpu_infos = uv__calloc(cpu_count, sizeof *cpu_infos);
- if (cpu_infos == NULL) {
- err = ERROR_OUTOFMEMORY;
- goto error;
- }
-
- sppi_size = cpu_count * sizeof(*sppi);
- sppi = uv__malloc(sppi_size);
- if (sppi == NULL) {
- err = ERROR_OUTOFMEMORY;
- goto error;
- }
-
- status = pNtQuerySystemInformation(SystemProcessorPerformanceInformation,
- sppi,
- sppi_size,
- &result_size);
- if (!NT_SUCCESS(status)) {
- err = pRtlNtStatusToDosError(status);
- goto error;
- }
-
- assert(result_size == sppi_size);
-
- for (i = 0; i < cpu_count; i++) {
- WCHAR key_name[128];
- HKEY processor_key;
- DWORD cpu_speed;
- DWORD cpu_speed_size = sizeof(cpu_speed);
- WCHAR cpu_brand[256];
- DWORD cpu_brand_size = sizeof(cpu_brand);
- size_t len;
-
- len = _snwprintf(key_name,
- ARRAY_SIZE(key_name),
- L"HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\%d",
- i);
-
- assert(len > 0 && len < ARRAY_SIZE(key_name));
-
- r = RegOpenKeyExW(HKEY_LOCAL_MACHINE,
- key_name,
- 0,
- KEY_QUERY_VALUE,
- &processor_key);
- if (r != ERROR_SUCCESS) {
- err = GetLastError();
- goto error;
- }
-
- if (RegQueryValueExW(processor_key,
- L"~MHz",
- NULL,
- NULL,
- (BYTE*) &cpu_speed,
- &cpu_speed_size) != ERROR_SUCCESS) {
- err = GetLastError();
- RegCloseKey(processor_key);
- goto error;
- }
-
- if (RegQueryValueExW(processor_key,
- L"ProcessorNameString",
- NULL,
- NULL,
- (BYTE*) &cpu_brand,
- &cpu_brand_size) != ERROR_SUCCESS) {
- err = GetLastError();
- RegCloseKey(processor_key);
- goto error;
- }
-
- RegCloseKey(processor_key);
-
- cpu_info = &cpu_infos[i];
- cpu_info->speed = cpu_speed;
- cpu_info->cpu_times.user = sppi[i].UserTime.QuadPart / 10000;
- cpu_info->cpu_times.sys = (sppi[i].KernelTime.QuadPart -
- sppi[i].IdleTime.QuadPart) / 10000;
- cpu_info->cpu_times.idle = sppi[i].IdleTime.QuadPart / 10000;
- cpu_info->cpu_times.irq = sppi[i].InterruptTime.QuadPart / 10000;
- cpu_info->cpu_times.nice = 0;
-
-
- len = WideCharToMultiByte(CP_UTF8,
- 0,
- cpu_brand,
- cpu_brand_size / sizeof(WCHAR),
- NULL,
- 0,
- NULL,
- NULL);
- if (len == 0) {
- err = GetLastError();
- goto error;
- }
-
- assert(len > 0);
-
- /* Allocate 1 extra byte for the null terminator. */
- cpu_info->model = uv__malloc(len + 1);
- if (cpu_info->model == NULL) {
- err = ERROR_OUTOFMEMORY;
- goto error;
- }
-
- if (WideCharToMultiByte(CP_UTF8,
- 0,
- cpu_brand,
- cpu_brand_size / sizeof(WCHAR),
- cpu_info->model,
- len,
- NULL,
- NULL) == 0) {
- err = GetLastError();
- goto error;
- }
-
- /* Ensure that cpu_info->model is null terminated. */
- cpu_info->model[len] = '\0';
- }
-
- uv__free(sppi);
-
- *cpu_count_ptr = cpu_count;
- *cpu_infos_ptr = cpu_infos;
-
- return 0;
-
- error:
- /* This is safe because the cpu_infos array is zeroed on allocation. */
- for (i = 0; i < cpu_count; i++)
- uv__free(cpu_infos[i].model);
-
- uv__free(cpu_infos);
- uv__free(sppi);
-
- return uv_translate_sys_error(err);
-}
-
-
-void uv_free_cpu_info(uv_cpu_info_t* cpu_infos, int count) {
- int i;
-
- for (i = 0; i < count; i++) {
- uv__free(cpu_infos[i].model);
- }
-
- uv__free(cpu_infos);
-}
-
-
-static int is_windows_version_or_greater(DWORD os_major,
- DWORD os_minor,
- WORD service_pack_major,
- WORD service_pack_minor) {
- OSVERSIONINFOEX osvi;
- DWORDLONG condition_mask = 0;
- int op = VER_GREATER_EQUAL;
-
- /* Initialize the OSVERSIONINFOEX structure. */
- ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX));
- osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
- osvi.dwMajorVersion = os_major;
- osvi.dwMinorVersion = os_minor;
- osvi.wServicePackMajor = service_pack_major;
- osvi.wServicePackMinor = service_pack_minor;
-
- /* Initialize the condition mask. */
- VER_SET_CONDITION(condition_mask, VER_MAJORVERSION, op);
- VER_SET_CONDITION(condition_mask, VER_MINORVERSION, op);
- VER_SET_CONDITION(condition_mask, VER_SERVICEPACKMAJOR, op);
- VER_SET_CONDITION(condition_mask, VER_SERVICEPACKMINOR, op);
-
- /* Perform the test. */
- return (int) VerifyVersionInfo(
- &osvi,
- VER_MAJORVERSION | VER_MINORVERSION |
- VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
- condition_mask);
-}
-
-
-static int address_prefix_match(int family,
- struct sockaddr* address,
- struct sockaddr* prefix_address,
- int prefix_len) {
- uint8_t* address_data;
- uint8_t* prefix_address_data;
- int i;
-
- assert(address->sa_family == family);
- assert(prefix_address->sa_family == family);
-
- if (family == AF_INET6) {
- address_data = (uint8_t*) &(((struct sockaddr_in6 *) address)->sin6_addr);
- prefix_address_data =
- (uint8_t*) &(((struct sockaddr_in6 *) prefix_address)->sin6_addr);
- } else {
- address_data = (uint8_t*) &(((struct sockaddr_in *) address)->sin_addr);
- prefix_address_data =
- (uint8_t*) &(((struct sockaddr_in *) prefix_address)->sin_addr);
- }
-
- for (i = 0; i < prefix_len >> 3; i++) {
- if (address_data[i] != prefix_address_data[i])
- return 0;
- }
-
- if (prefix_len % 8)
- return prefix_address_data[i] ==
- (address_data[i] & (0xff << (8 - prefix_len % 8)));
-
- return 1;
-}
-
-
-int uv_interface_addresses(uv_interface_address_t** addresses_ptr,
- int* count_ptr) {
- IP_ADAPTER_ADDRESSES* win_address_buf;
- ULONG win_address_buf_size;
- IP_ADAPTER_ADDRESSES* adapter;
-
- uv_interface_address_t* uv_address_buf;
- char* name_buf;
- size_t uv_address_buf_size;
- uv_interface_address_t* uv_address;
-
- int count;
-
- int is_vista_or_greater;
- ULONG flags;
-
- is_vista_or_greater = is_windows_version_or_greater(6, 0, 0, 0);
- if (is_vista_or_greater) {
- flags = GAA_FLAG_SKIP_ANYCAST | GAA_FLAG_SKIP_MULTICAST |
- GAA_FLAG_SKIP_DNS_SERVER;
- } else {
- /* We need at least XP SP1. */
- if (!is_windows_version_or_greater(5, 1, 1, 0))
- return UV_ENOTSUP;
-
- flags = GAA_FLAG_SKIP_ANYCAST | GAA_FLAG_SKIP_MULTICAST |
- GAA_FLAG_SKIP_DNS_SERVER | GAA_FLAG_INCLUDE_PREFIX;
- }
-
-
- /* Fetch the size of the adapters reported by windows, and then get the */
- /* list itself. */
- win_address_buf_size = 0;
- win_address_buf = NULL;
-
- for (;;) {
- ULONG r;
-
- /* If win_address_buf is 0, then GetAdaptersAddresses will fail with */
- /* ERROR_BUFFER_OVERFLOW, and the required buffer size will be stored in */
- /* win_address_buf_size. */
- r = GetAdaptersAddresses(AF_UNSPEC,
- flags,
- NULL,
- win_address_buf,
- &win_address_buf_size);
-
- if (r == ERROR_SUCCESS)
- break;
-
- uv__free(win_address_buf);
-
- switch (r) {
- case ERROR_BUFFER_OVERFLOW:
- /* This happens when win_address_buf is NULL or too small to hold */
- /* all adapters. */
- win_address_buf = uv__malloc(win_address_buf_size);
- if (win_address_buf == NULL)
- return UV_ENOMEM;
-
- continue;
-
- case ERROR_NO_DATA: {
- /* No adapters were found. */
- uv_address_buf = uv__malloc(1);
- if (uv_address_buf == NULL)
- return UV_ENOMEM;
-
- *count_ptr = 0;
- *addresses_ptr = uv_address_buf;
-
- return 0;
- }
-
- case ERROR_ADDRESS_NOT_ASSOCIATED:
- return UV_EAGAIN;
-
- case ERROR_INVALID_PARAMETER:
- /* MSDN says:
- * "This error is returned for any of the following conditions: the
- * SizePointer parameter is NULL, the Address parameter is not
- * AF_INET, AF_INET6, or AF_UNSPEC, or the address information for
- * the parameters requested is greater than ULONG_MAX."
- * Since the first two conditions are not met, it must be that the
- * adapter data is too big.
- */
- return UV_ENOBUFS;
-
- default:
- /* Other (unspecified) errors can happen, but we don't have any */
- /* special meaning for them. */
- assert(r != ERROR_SUCCESS);
- return uv_translate_sys_error(r);
- }
- }
-
- /* Count the number of enabled interfaces and compute how much space is */
- /* needed to store their info. */
- count = 0;
- uv_address_buf_size = 0;
-
- for (adapter = win_address_buf;
- adapter != NULL;
- adapter = adapter->Next) {
- IP_ADAPTER_UNICAST_ADDRESS* unicast_address;
- int name_size;
-
- /* Interfaces that are not 'up' should not be reported. Also skip */
- /* interfaces that have no associated unicast address, as to avoid */
- /* allocating space for the name for this interface. */
- if (adapter->OperStatus != IfOperStatusUp ||
- adapter->FirstUnicastAddress == NULL)
- continue;
-
- /* Compute the size of the interface name. */
- name_size = WideCharToMultiByte(CP_UTF8,
- 0,
- adapter->FriendlyName,
- -1,
- NULL,
- 0,
- NULL,
- FALSE);
- if (name_size <= 0) {
- uv__free(win_address_buf);
- return uv_translate_sys_error(GetLastError());
- }
- uv_address_buf_size += name_size;
-
- /* Count the number of addresses associated with this interface, and */
- /* compute the size. */
- for (unicast_address = (IP_ADAPTER_UNICAST_ADDRESS*)
- adapter->FirstUnicastAddress;
- unicast_address != NULL;
- unicast_address = unicast_address->Next) {
- count++;
- uv_address_buf_size += sizeof(uv_interface_address_t);
- }
- }
-
- /* Allocate space to store interface data plus adapter names. */
- uv_address_buf = uv__malloc(uv_address_buf_size);
- if (uv_address_buf == NULL) {
- uv__free(win_address_buf);
- return UV_ENOMEM;
- }
-
- /* Compute the start of the uv_interface_address_t array, and the place in */
- /* the buffer where the interface names will be stored. */
- uv_address = uv_address_buf;
- name_buf = (char*) (uv_address_buf + count);
-
- /* Fill out the output buffer. */
- for (adapter = win_address_buf;
- adapter != NULL;
- adapter = adapter->Next) {
- IP_ADAPTER_UNICAST_ADDRESS* unicast_address;
- int name_size;
- size_t max_name_size;
-
- if (adapter->OperStatus != IfOperStatusUp ||
- adapter->FirstUnicastAddress == NULL)
- continue;
-
- /* Convert the interface name to UTF8. */
- max_name_size = (char*) uv_address_buf + uv_address_buf_size - name_buf;
- if (max_name_size > (size_t) INT_MAX)
- max_name_size = INT_MAX;
- name_size = WideCharToMultiByte(CP_UTF8,
- 0,
- adapter->FriendlyName,
- -1,
- name_buf,
- (int) max_name_size,
- NULL,
- FALSE);
- if (name_size <= 0) {
- uv__free(win_address_buf);
- uv__free(uv_address_buf);
- return uv_translate_sys_error(GetLastError());
- }
-
- /* Add an uv_interface_address_t element for every unicast address. */
- for (unicast_address = (IP_ADAPTER_UNICAST_ADDRESS*)
- adapter->FirstUnicastAddress;
- unicast_address != NULL;
- unicast_address = unicast_address->Next) {
- struct sockaddr* sa;
- ULONG prefix_len;
-
- sa = unicast_address->Address.lpSockaddr;
-
- /* XP has no OnLinkPrefixLength field. */
- if (is_vista_or_greater) {
- prefix_len =
- ((IP_ADAPTER_UNICAST_ADDRESS_LH*) unicast_address)->OnLinkPrefixLength;
- } else {
- /* Prior to Windows Vista the FirstPrefix pointed to the list with
- * single prefix for each IP address assigned to the adapter.
- * Order of FirstPrefix does not match order of FirstUnicastAddress,
- * so we need to find corresponding prefix.
- */
- IP_ADAPTER_PREFIX* prefix;
- prefix_len = 0;
-
- for (prefix = adapter->FirstPrefix; prefix; prefix = prefix->Next) {
- /* We want the longest matching prefix. */
- if (prefix->Address.lpSockaddr->sa_family != sa->sa_family ||
- prefix->PrefixLength <= prefix_len)
- continue;
-
- if (address_prefix_match(sa->sa_family, sa,
- prefix->Address.lpSockaddr, prefix->PrefixLength)) {
- prefix_len = prefix->PrefixLength;
- }
- }
-
- /* If there is no matching prefix information, return a single-host
- * subnet mask (e.g. 255.255.255.255 for IPv4).
- */
- if (!prefix_len)
- prefix_len = (sa->sa_family == AF_INET6) ? 128 : 32;
- }
-
- memset(uv_address, 0, sizeof *uv_address);
-
- uv_address->name = name_buf;
-
- if (adapter->PhysicalAddressLength == sizeof(uv_address->phys_addr)) {
- memcpy(uv_address->phys_addr,
- adapter->PhysicalAddress,
- sizeof(uv_address->phys_addr));
- }
-
- uv_address->is_internal =
- (adapter->IfType == IF_TYPE_SOFTWARE_LOOPBACK);
-
- if (sa->sa_family == AF_INET6) {
- uv_address->address.address6 = *((struct sockaddr_in6 *) sa);
-
- uv_address->netmask.netmask6.sin6_family = AF_INET6;
- memset(uv_address->netmask.netmask6.sin6_addr.s6_addr, 0xff, prefix_len >> 3);
- /* This check ensures that we don't write past the size of the data. */
- if (prefix_len % 8) {
- uv_address->netmask.netmask6.sin6_addr.s6_addr[prefix_len >> 3] =
- 0xff << (8 - prefix_len % 8);
- }
-
- } else {
- uv_address->address.address4 = *((struct sockaddr_in *) sa);
-
- uv_address->netmask.netmask4.sin_family = AF_INET;
- uv_address->netmask.netmask4.sin_addr.s_addr = (prefix_len > 0) ?
- htonl(0xffffffff << (32 - prefix_len)) : 0;
- }
-
- uv_address++;
- }
-
- name_buf += name_size;
- }
-
- uv__free(win_address_buf);
-
- *addresses_ptr = uv_address_buf;
- *count_ptr = count;
-
- return 0;
-}
-
-
-void uv_free_interface_addresses(uv_interface_address_t* addresses,
- int count) {
- uv__free(addresses);
-}
-
-
-int uv_getrusage(uv_rusage_t *uv_rusage) {
- FILETIME createTime, exitTime, kernelTime, userTime;
- SYSTEMTIME kernelSystemTime, userSystemTime;
- int ret;
-
- ret = GetProcessTimes(GetCurrentProcess(), &createTime, &exitTime, &kernelTime, &userTime);
- if (ret == 0) {
- return uv_translate_sys_error(GetLastError());
- }
-
- ret = FileTimeToSystemTime(&kernelTime, &kernelSystemTime);
- if (ret == 0) {
- return uv_translate_sys_error(GetLastError());
- }
-
- ret = FileTimeToSystemTime(&userTime, &userSystemTime);
- if (ret == 0) {
- return uv_translate_sys_error(GetLastError());
- }
-
- memset(uv_rusage, 0, sizeof(*uv_rusage));
-
- uv_rusage->ru_utime.tv_sec = userSystemTime.wHour * 3600 +
- userSystemTime.wMinute * 60 +
- userSystemTime.wSecond;
- uv_rusage->ru_utime.tv_usec = userSystemTime.wMilliseconds * 1000;
-
- uv_rusage->ru_stime.tv_sec = kernelSystemTime.wHour * 3600 +
- kernelSystemTime.wMinute * 60 +
- kernelSystemTime.wSecond;
- uv_rusage->ru_stime.tv_usec = kernelSystemTime.wMilliseconds * 1000;
-
- return 0;
-}
-
-
-int uv_os_homedir(char* buffer, size_t* size) {
- HANDLE token;
- wchar_t path[MAX_PATH];
- DWORD bufsize;
- size_t len;
- int r;
-
- if (buffer == NULL || size == NULL || *size == 0)
- return UV_EINVAL;
-
- /* Check if the USERPROFILE environment variable is set first */
- len = GetEnvironmentVariableW(L"USERPROFILE", path, MAX_PATH);
-
- if (len == 0) {
- r = GetLastError();
- /* Don't return an error if USERPROFILE was not found */
- if (r != ERROR_ENVVAR_NOT_FOUND)
- return uv_translate_sys_error(r);
- } else if (len > MAX_PATH) {
- /* This should not be possible */
- return UV_EIO;
- } else {
- goto convert_buffer;
- }
-
- /* USERPROFILE is not set, so call GetUserProfileDirectoryW() */
- if (OpenProcessToken(GetCurrentProcess(), TOKEN_READ, &token) == 0)
- return uv_translate_sys_error(GetLastError());
-
- bufsize = MAX_PATH;
- if (!GetUserProfileDirectoryW(token, path, &bufsize)) {
- r = GetLastError();
- CloseHandle(token);
-
- /* This should not be possible */
- if (r == ERROR_INSUFFICIENT_BUFFER)
- return UV_EIO;
-
- return uv_translate_sys_error(r);
- }
-
- CloseHandle(token);
-
-convert_buffer:
-
- /* Check how much space we need */
- bufsize = uv_utf16_to_utf8(path, -1, NULL, 0);
- if (bufsize == 0) {
- return uv_translate_sys_error(GetLastError());
- } else if (bufsize > *size) {
- *size = bufsize - 1;
- return UV_ENOBUFS;
- }
-
- /* Convert to UTF-8 */
- bufsize = uv_utf16_to_utf8(path, -1, buffer, *size);
- if (bufsize == 0)
- return uv_translate_sys_error(GetLastError());
-
- *size = bufsize - 1;
- return 0;
-}
diff --git a/3rdparty/libuv/src/win/winapi.c b/3rdparty/libuv/src/win/winapi.c
deleted file mode 100644
index 26bd0648668..00000000000
--- a/3rdparty/libuv/src/win/winapi.c
+++ /dev/null
@@ -1,146 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include <assert.h>
-
-#include "uv.h"
-#include "internal.h"
-
-
-/* Ntdll function pointers */
-sRtlNtStatusToDosError pRtlNtStatusToDosError;
-sNtDeviceIoControlFile pNtDeviceIoControlFile;
-sNtQueryInformationFile pNtQueryInformationFile;
-sNtSetInformationFile pNtSetInformationFile;
-sNtQueryVolumeInformationFile pNtQueryVolumeInformationFile;
-sNtQueryDirectoryFile pNtQueryDirectoryFile;
-sNtQuerySystemInformation pNtQuerySystemInformation;
-
-
-/* Kernel32 function pointers */
-sGetQueuedCompletionStatusEx pGetQueuedCompletionStatusEx;
-sSetFileCompletionNotificationModes pSetFileCompletionNotificationModes;
-sCreateSymbolicLinkW pCreateSymbolicLinkW;
-sCancelIoEx pCancelIoEx;
-sInitializeConditionVariable pInitializeConditionVariable;
-sSleepConditionVariableCS pSleepConditionVariableCS;
-sSleepConditionVariableSRW pSleepConditionVariableSRW;
-sWakeAllConditionVariable pWakeAllConditionVariable;
-sWakeConditionVariable pWakeConditionVariable;
-sCancelSynchronousIo pCancelSynchronousIo;
-sGetFinalPathNameByHandleW pGetFinalPathNameByHandleW;
-
-
-void uv_winapi_init() {
- HMODULE ntdll_module;
- HMODULE kernel32_module;
-
- ntdll_module = GetModuleHandleA("ntdll.dll");
- if (ntdll_module == NULL) {
- uv_fatal_error(GetLastError(), "GetModuleHandleA");
- }
-
- pRtlNtStatusToDosError = (sRtlNtStatusToDosError) GetProcAddress(
- ntdll_module,
- "RtlNtStatusToDosError");
- if (pRtlNtStatusToDosError == NULL) {
- uv_fatal_error(GetLastError(), "GetProcAddress");
- }
-
- pNtDeviceIoControlFile = (sNtDeviceIoControlFile) GetProcAddress(
- ntdll_module,
- "NtDeviceIoControlFile");
- if (pNtDeviceIoControlFile == NULL) {
- uv_fatal_error(GetLastError(), "GetProcAddress");
- }
-
- pNtQueryInformationFile = (sNtQueryInformationFile) GetProcAddress(
- ntdll_module,
- "NtQueryInformationFile");
- if (pNtQueryInformationFile == NULL) {
- uv_fatal_error(GetLastError(), "GetProcAddress");
- }
-
- pNtSetInformationFile = (sNtSetInformationFile) GetProcAddress(
- ntdll_module,
- "NtSetInformationFile");
- if (pNtSetInformationFile == NULL) {
- uv_fatal_error(GetLastError(), "GetProcAddress");
- }
-
- pNtQueryVolumeInformationFile = (sNtQueryVolumeInformationFile)
- GetProcAddress(ntdll_module, "NtQueryVolumeInformationFile");
- if (pNtQueryVolumeInformationFile == NULL) {
- uv_fatal_error(GetLastError(), "GetProcAddress");
- }
-
- pNtQueryDirectoryFile = (sNtQueryDirectoryFile)
- GetProcAddress(ntdll_module, "NtQueryDirectoryFile");
- if (pNtQueryVolumeInformationFile == NULL) {
- uv_fatal_error(GetLastError(), "GetProcAddress");
- }
-
- pNtQuerySystemInformation = (sNtQuerySystemInformation) GetProcAddress(
- ntdll_module,
- "NtQuerySystemInformation");
- if (pNtQuerySystemInformation == NULL) {
- uv_fatal_error(GetLastError(), "GetProcAddress");
- }
-
- kernel32_module = GetModuleHandleA("kernel32.dll");
- if (kernel32_module == NULL) {
- uv_fatal_error(GetLastError(), "GetModuleHandleA");
- }
-
- pGetQueuedCompletionStatusEx = (sGetQueuedCompletionStatusEx) GetProcAddress(
- kernel32_module,
- "GetQueuedCompletionStatusEx");
-
- pSetFileCompletionNotificationModes = (sSetFileCompletionNotificationModes)
- GetProcAddress(kernel32_module, "SetFileCompletionNotificationModes");
-
- pCreateSymbolicLinkW = (sCreateSymbolicLinkW)
- GetProcAddress(kernel32_module, "CreateSymbolicLinkW");
-
- pCancelIoEx = (sCancelIoEx)
- GetProcAddress(kernel32_module, "CancelIoEx");
-
- pInitializeConditionVariable = (sInitializeConditionVariable)
- GetProcAddress(kernel32_module, "InitializeConditionVariable");
-
- pSleepConditionVariableCS = (sSleepConditionVariableCS)
- GetProcAddress(kernel32_module, "SleepConditionVariableCS");
-
- pSleepConditionVariableSRW = (sSleepConditionVariableSRW)
- GetProcAddress(kernel32_module, "SleepConditionVariableSRW");
-
- pWakeAllConditionVariable = (sWakeAllConditionVariable)
- GetProcAddress(kernel32_module, "WakeAllConditionVariable");
-
- pWakeConditionVariable = (sWakeConditionVariable)
- GetProcAddress(kernel32_module, "WakeConditionVariable");
-
- pCancelSynchronousIo = (sCancelSynchronousIo)
- GetProcAddress(kernel32_module, "CancelSynchronousIo");
-
- pGetFinalPathNameByHandleW = (sGetFinalPathNameByHandleW)
- GetProcAddress(kernel32_module, "GetFinalPathNameByHandleW");
-}
diff --git a/3rdparty/libuv/src/win/winapi.h b/3rdparty/libuv/src/win/winapi.h
deleted file mode 100644
index 122198a6d48..00000000000
--- a/3rdparty/libuv/src/win/winapi.h
+++ /dev/null
@@ -1,4710 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#ifndef UV_WIN_WINAPI_H_
-#define UV_WIN_WINAPI_H_
-
-#include <windows.h>
-
-
-/*
- * Ntdll headers
- */
-#ifndef STATUS_SEVERITY_SUCCESS
-# define STATUS_SEVERITY_SUCCESS 0x0
-#endif
-
-#ifndef STATUS_SEVERITY_INFORMATIONAL
-# define STATUS_SEVERITY_INFORMATIONAL 0x1
-#endif
-
-#ifndef STATUS_SEVERITY_WARNING
-# define STATUS_SEVERITY_WARNING 0x2
-#endif
-
-#ifndef STATUS_SEVERITY_ERROR
-# define STATUS_SEVERITY_ERROR 0x3
-#endif
-
-#ifndef FACILITY_NTWIN32
-# define FACILITY_NTWIN32 0x7
-#endif
-
-#ifndef NT_SUCCESS
-# define NT_SUCCESS(status) (((NTSTATUS) (status)) >= 0)
-#endif
-
-#ifndef NT_INFORMATION
-# define NT_INFORMATION(status) ((((ULONG) (status)) >> 30) == 1)
-#endif
-
-#ifndef NT_WARNING
-# define NT_WARNING(status) ((((ULONG) (status)) >> 30) == 2)
-#endif
-
-#ifndef NT_ERROR
-# define NT_ERROR(status) ((((ULONG) (status)) >> 30) == 3)
-#endif
-
-#ifndef STATUS_SUCCESS
-# define STATUS_SUCCESS ((NTSTATUS) 0x00000000L)
-#endif
-
-#ifndef STATUS_WAIT_0
-# define STATUS_WAIT_0 ((NTSTATUS) 0x00000000L)
-#endif
-
-#ifndef STATUS_WAIT_1
-# define STATUS_WAIT_1 ((NTSTATUS) 0x00000001L)
-#endif
-
-#ifndef STATUS_WAIT_2
-# define STATUS_WAIT_2 ((NTSTATUS) 0x00000002L)
-#endif
-
-#ifndef STATUS_WAIT_3
-# define STATUS_WAIT_3 ((NTSTATUS) 0x00000003L)
-#endif
-
-#ifndef STATUS_WAIT_63
-# define STATUS_WAIT_63 ((NTSTATUS) 0x0000003FL)
-#endif
-
-#ifndef STATUS_ABANDONED
-# define STATUS_ABANDONED ((NTSTATUS) 0x00000080L)
-#endif
-
-#ifndef STATUS_ABANDONED_WAIT_0
-# define STATUS_ABANDONED_WAIT_0 ((NTSTATUS) 0x00000080L)
-#endif
-
-#ifndef STATUS_ABANDONED_WAIT_63
-# define STATUS_ABANDONED_WAIT_63 ((NTSTATUS) 0x000000BFL)
-#endif
-
-#ifndef STATUS_USER_APC
-# define STATUS_USER_APC ((NTSTATUS) 0x000000C0L)
-#endif
-
-#ifndef STATUS_KERNEL_APC
-# define STATUS_KERNEL_APC ((NTSTATUS) 0x00000100L)
-#endif
-
-#ifndef STATUS_ALERTED
-# define STATUS_ALERTED ((NTSTATUS) 0x00000101L)
-#endif
-
-#ifndef STATUS_TIMEOUT
-# define STATUS_TIMEOUT ((NTSTATUS) 0x00000102L)
-#endif
-
-#ifndef STATUS_PENDING
-# define STATUS_PENDING ((NTSTATUS) 0x00000103L)
-#endif
-
-#ifndef STATUS_REPARSE
-# define STATUS_REPARSE ((NTSTATUS) 0x00000104L)
-#endif
-
-#ifndef STATUS_MORE_ENTRIES
-# define STATUS_MORE_ENTRIES ((NTSTATUS) 0x00000105L)
-#endif
-
-#ifndef STATUS_NOT_ALL_ASSIGNED
-# define STATUS_NOT_ALL_ASSIGNED ((NTSTATUS) 0x00000106L)
-#endif
-
-#ifndef STATUS_SOME_NOT_MAPPED
-# define STATUS_SOME_NOT_MAPPED ((NTSTATUS) 0x00000107L)
-#endif
-
-#ifndef STATUS_OPLOCK_BREAK_IN_PROGRESS
-# define STATUS_OPLOCK_BREAK_IN_PROGRESS ((NTSTATUS) 0x00000108L)
-#endif
-
-#ifndef STATUS_VOLUME_MOUNTED
-# define STATUS_VOLUME_MOUNTED ((NTSTATUS) 0x00000109L)
-#endif
-
-#ifndef STATUS_RXACT_COMMITTED
-# define STATUS_RXACT_COMMITTED ((NTSTATUS) 0x0000010AL)
-#endif
-
-#ifndef STATUS_NOTIFY_CLEANUP
-# define STATUS_NOTIFY_CLEANUP ((NTSTATUS) 0x0000010BL)
-#endif
-
-#ifndef STATUS_NOTIFY_ENUM_DIR
-# define STATUS_NOTIFY_ENUM_DIR ((NTSTATUS) 0x0000010CL)
-#endif
-
-#ifndef STATUS_NO_QUOTAS_FOR_ACCOUNT
-# define STATUS_NO_QUOTAS_FOR_ACCOUNT ((NTSTATUS) 0x0000010DL)
-#endif
-
-#ifndef STATUS_PRIMARY_TRANSPORT_CONNECT_FAILED
-# define STATUS_PRIMARY_TRANSPORT_CONNECT_FAILED ((NTSTATUS) 0x0000010EL)
-#endif
-
-#ifndef STATUS_PAGE_FAULT_TRANSITION
-# define STATUS_PAGE_FAULT_TRANSITION ((NTSTATUS) 0x00000110L)
-#endif
-
-#ifndef STATUS_PAGE_FAULT_DEMAND_ZERO
-# define STATUS_PAGE_FAULT_DEMAND_ZERO ((NTSTATUS) 0x00000111L)
-#endif
-
-#ifndef STATUS_PAGE_FAULT_COPY_ON_WRITE
-# define STATUS_PAGE_FAULT_COPY_ON_WRITE ((NTSTATUS) 0x00000112L)
-#endif
-
-#ifndef STATUS_PAGE_FAULT_GUARD_PAGE
-# define STATUS_PAGE_FAULT_GUARD_PAGE ((NTSTATUS) 0x00000113L)
-#endif
-
-#ifndef STATUS_PAGE_FAULT_PAGING_FILE
-# define STATUS_PAGE_FAULT_PAGING_FILE ((NTSTATUS) 0x00000114L)
-#endif
-
-#ifndef STATUS_CACHE_PAGE_LOCKED
-# define STATUS_CACHE_PAGE_LOCKED ((NTSTATUS) 0x00000115L)
-#endif
-
-#ifndef STATUS_CRASH_DUMP
-# define STATUS_CRASH_DUMP ((NTSTATUS) 0x00000116L)
-#endif
-
-#ifndef STATUS_BUFFER_ALL_ZEROS
-# define STATUS_BUFFER_ALL_ZEROS ((NTSTATUS) 0x00000117L)
-#endif
-
-#ifndef STATUS_REPARSE_OBJECT
-# define STATUS_REPARSE_OBJECT ((NTSTATUS) 0x00000118L)
-#endif
-
-#ifndef STATUS_RESOURCE_REQUIREMENTS_CHANGED
-# define STATUS_RESOURCE_REQUIREMENTS_CHANGED ((NTSTATUS) 0x00000119L)
-#endif
-
-#ifndef STATUS_TRANSLATION_COMPLETE
-# define STATUS_TRANSLATION_COMPLETE ((NTSTATUS) 0x00000120L)
-#endif
-
-#ifndef STATUS_DS_MEMBERSHIP_EVALUATED_LOCALLY
-# define STATUS_DS_MEMBERSHIP_EVALUATED_LOCALLY ((NTSTATUS) 0x00000121L)
-#endif
-
-#ifndef STATUS_NOTHING_TO_TERMINATE
-# define STATUS_NOTHING_TO_TERMINATE ((NTSTATUS) 0x00000122L)
-#endif
-
-#ifndef STATUS_PROCESS_NOT_IN_JOB
-# define STATUS_PROCESS_NOT_IN_JOB ((NTSTATUS) 0x00000123L)
-#endif
-
-#ifndef STATUS_PROCESS_IN_JOB
-# define STATUS_PROCESS_IN_JOB ((NTSTATUS) 0x00000124L)
-#endif
-
-#ifndef STATUS_VOLSNAP_HIBERNATE_READY
-# define STATUS_VOLSNAP_HIBERNATE_READY ((NTSTATUS) 0x00000125L)
-#endif
-
-#ifndef STATUS_FSFILTER_OP_COMPLETED_SUCCESSFULLY
-# define STATUS_FSFILTER_OP_COMPLETED_SUCCESSFULLY ((NTSTATUS) 0x00000126L)
-#endif
-
-#ifndef STATUS_INTERRUPT_VECTOR_ALREADY_CONNECTED
-# define STATUS_INTERRUPT_VECTOR_ALREADY_CONNECTED ((NTSTATUS) 0x00000127L)
-#endif
-
-#ifndef STATUS_INTERRUPT_STILL_CONNECTED
-# define STATUS_INTERRUPT_STILL_CONNECTED ((NTSTATUS) 0x00000128L)
-#endif
-
-#ifndef STATUS_PROCESS_CLONED
-# define STATUS_PROCESS_CLONED ((NTSTATUS) 0x00000129L)
-#endif
-
-#ifndef STATUS_FILE_LOCKED_WITH_ONLY_READERS
-# define STATUS_FILE_LOCKED_WITH_ONLY_READERS ((NTSTATUS) 0x0000012AL)
-#endif
-
-#ifndef STATUS_FILE_LOCKED_WITH_WRITERS
-# define STATUS_FILE_LOCKED_WITH_WRITERS ((NTSTATUS) 0x0000012BL)
-#endif
-
-#ifndef STATUS_RESOURCEMANAGER_READ_ONLY
-# define STATUS_RESOURCEMANAGER_READ_ONLY ((NTSTATUS) 0x00000202L)
-#endif
-
-#ifndef STATUS_RING_PREVIOUSLY_EMPTY
-# define STATUS_RING_PREVIOUSLY_EMPTY ((NTSTATUS) 0x00000210L)
-#endif
-
-#ifndef STATUS_RING_PREVIOUSLY_FULL
-# define STATUS_RING_PREVIOUSLY_FULL ((NTSTATUS) 0x00000211L)
-#endif
-
-#ifndef STATUS_RING_PREVIOUSLY_ABOVE_QUOTA
-# define STATUS_RING_PREVIOUSLY_ABOVE_QUOTA ((NTSTATUS) 0x00000212L)
-#endif
-
-#ifndef STATUS_RING_NEWLY_EMPTY
-# define STATUS_RING_NEWLY_EMPTY ((NTSTATUS) 0x00000213L)
-#endif
-
-#ifndef STATUS_RING_SIGNAL_OPPOSITE_ENDPOINT
-# define STATUS_RING_SIGNAL_OPPOSITE_ENDPOINT ((NTSTATUS) 0x00000214L)
-#endif
-
-#ifndef STATUS_OPLOCK_SWITCHED_TO_NEW_HANDLE
-# define STATUS_OPLOCK_SWITCHED_TO_NEW_HANDLE ((NTSTATUS) 0x00000215L)
-#endif
-
-#ifndef STATUS_OPLOCK_HANDLE_CLOSED
-# define STATUS_OPLOCK_HANDLE_CLOSED ((NTSTATUS) 0x00000216L)
-#endif
-
-#ifndef STATUS_WAIT_FOR_OPLOCK
-# define STATUS_WAIT_FOR_OPLOCK ((NTSTATUS) 0x00000367L)
-#endif
-
-#ifndef STATUS_OBJECT_NAME_EXISTS
-# define STATUS_OBJECT_NAME_EXISTS ((NTSTATUS) 0x40000000L)
-#endif
-
-#ifndef STATUS_THREAD_WAS_SUSPENDED
-# define STATUS_THREAD_WAS_SUSPENDED ((NTSTATUS) 0x40000001L)
-#endif
-
-#ifndef STATUS_WORKING_SET_LIMIT_RANGE
-# define STATUS_WORKING_SET_LIMIT_RANGE ((NTSTATUS) 0x40000002L)
-#endif
-
-#ifndef STATUS_IMAGE_NOT_AT_BASE
-# define STATUS_IMAGE_NOT_AT_BASE ((NTSTATUS) 0x40000003L)
-#endif
-
-#ifndef STATUS_RXACT_STATE_CREATED
-# define STATUS_RXACT_STATE_CREATED ((NTSTATUS) 0x40000004L)
-#endif
-
-#ifndef STATUS_SEGMENT_NOTIFICATION
-# define STATUS_SEGMENT_NOTIFICATION ((NTSTATUS) 0x40000005L)
-#endif
-
-#ifndef STATUS_LOCAL_USER_SESSION_KEY
-# define STATUS_LOCAL_USER_SESSION_KEY ((NTSTATUS) 0x40000006L)
-#endif
-
-#ifndef STATUS_BAD_CURRENT_DIRECTORY
-# define STATUS_BAD_CURRENT_DIRECTORY ((NTSTATUS) 0x40000007L)
-#endif
-
-#ifndef STATUS_SERIAL_MORE_WRITES
-# define STATUS_SERIAL_MORE_WRITES ((NTSTATUS) 0x40000008L)
-#endif
-
-#ifndef STATUS_REGISTRY_RECOVERED
-# define STATUS_REGISTRY_RECOVERED ((NTSTATUS) 0x40000009L)
-#endif
-
-#ifndef STATUS_FT_READ_RECOVERY_FROM_BACKUP
-# define STATUS_FT_READ_RECOVERY_FROM_BACKUP ((NTSTATUS) 0x4000000AL)
-#endif
-
-#ifndef STATUS_FT_WRITE_RECOVERY
-# define STATUS_FT_WRITE_RECOVERY ((NTSTATUS) 0x4000000BL)
-#endif
-
-#ifndef STATUS_SERIAL_COUNTER_TIMEOUT
-# define STATUS_SERIAL_COUNTER_TIMEOUT ((NTSTATUS) 0x4000000CL)
-#endif
-
-#ifndef STATUS_NULL_LM_PASSWORD
-# define STATUS_NULL_LM_PASSWORD ((NTSTATUS) 0x4000000DL)
-#endif
-
-#ifndef STATUS_IMAGE_MACHINE_TYPE_MISMATCH
-# define STATUS_IMAGE_MACHINE_TYPE_MISMATCH ((NTSTATUS) 0x4000000EL)
-#endif
-
-#ifndef STATUS_RECEIVE_PARTIAL
-# define STATUS_RECEIVE_PARTIAL ((NTSTATUS) 0x4000000FL)
-#endif
-
-#ifndef STATUS_RECEIVE_EXPEDITED
-# define STATUS_RECEIVE_EXPEDITED ((NTSTATUS) 0x40000010L)
-#endif
-
-#ifndef STATUS_RECEIVE_PARTIAL_EXPEDITED
-# define STATUS_RECEIVE_PARTIAL_EXPEDITED ((NTSTATUS) 0x40000011L)
-#endif
-
-#ifndef STATUS_EVENT_DONE
-# define STATUS_EVENT_DONE ((NTSTATUS) 0x40000012L)
-#endif
-
-#ifndef STATUS_EVENT_PENDING
-# define STATUS_EVENT_PENDING ((NTSTATUS) 0x40000013L)
-#endif
-
-#ifndef STATUS_CHECKING_FILE_SYSTEM
-# define STATUS_CHECKING_FILE_SYSTEM ((NTSTATUS) 0x40000014L)
-#endif
-
-#ifndef STATUS_FATAL_APP_EXIT
-# define STATUS_FATAL_APP_EXIT ((NTSTATUS) 0x40000015L)
-#endif
-
-#ifndef STATUS_PREDEFINED_HANDLE
-# define STATUS_PREDEFINED_HANDLE ((NTSTATUS) 0x40000016L)
-#endif
-
-#ifndef STATUS_WAS_UNLOCKED
-# define STATUS_WAS_UNLOCKED ((NTSTATUS) 0x40000017L)
-#endif
-
-#ifndef STATUS_SERVICE_NOTIFICATION
-# define STATUS_SERVICE_NOTIFICATION ((NTSTATUS) 0x40000018L)
-#endif
-
-#ifndef STATUS_WAS_LOCKED
-# define STATUS_WAS_LOCKED ((NTSTATUS) 0x40000019L)
-#endif
-
-#ifndef STATUS_LOG_HARD_ERROR
-# define STATUS_LOG_HARD_ERROR ((NTSTATUS) 0x4000001AL)
-#endif
-
-#ifndef STATUS_ALREADY_WIN32
-# define STATUS_ALREADY_WIN32 ((NTSTATUS) 0x4000001BL)
-#endif
-
-#ifndef STATUS_WX86_UNSIMULATE
-# define STATUS_WX86_UNSIMULATE ((NTSTATUS) 0x4000001CL)
-#endif
-
-#ifndef STATUS_WX86_CONTINUE
-# define STATUS_WX86_CONTINUE ((NTSTATUS) 0x4000001DL)
-#endif
-
-#ifndef STATUS_WX86_SINGLE_STEP
-# define STATUS_WX86_SINGLE_STEP ((NTSTATUS) 0x4000001EL)
-#endif
-
-#ifndef STATUS_WX86_BREAKPOINT
-# define STATUS_WX86_BREAKPOINT ((NTSTATUS) 0x4000001FL)
-#endif
-
-#ifndef STATUS_WX86_EXCEPTION_CONTINUE
-# define STATUS_WX86_EXCEPTION_CONTINUE ((NTSTATUS) 0x40000020L)
-#endif
-
-#ifndef STATUS_WX86_EXCEPTION_LASTCHANCE
-# define STATUS_WX86_EXCEPTION_LASTCHANCE ((NTSTATUS) 0x40000021L)
-#endif
-
-#ifndef STATUS_WX86_EXCEPTION_CHAIN
-# define STATUS_WX86_EXCEPTION_CHAIN ((NTSTATUS) 0x40000022L)
-#endif
-
-#ifndef STATUS_IMAGE_MACHINE_TYPE_MISMATCH_EXE
-# define STATUS_IMAGE_MACHINE_TYPE_MISMATCH_EXE ((NTSTATUS) 0x40000023L)
-#endif
-
-#ifndef STATUS_NO_YIELD_PERFORMED
-# define STATUS_NO_YIELD_PERFORMED ((NTSTATUS) 0x40000024L)
-#endif
-
-#ifndef STATUS_TIMER_RESUME_IGNORED
-# define STATUS_TIMER_RESUME_IGNORED ((NTSTATUS) 0x40000025L)
-#endif
-
-#ifndef STATUS_ARBITRATION_UNHANDLED
-# define STATUS_ARBITRATION_UNHANDLED ((NTSTATUS) 0x40000026L)
-#endif
-
-#ifndef STATUS_CARDBUS_NOT_SUPPORTED
-# define STATUS_CARDBUS_NOT_SUPPORTED ((NTSTATUS) 0x40000027L)
-#endif
-
-#ifndef STATUS_WX86_CREATEWX86TIB
-# define STATUS_WX86_CREATEWX86TIB ((NTSTATUS) 0x40000028L)
-#endif
-
-#ifndef STATUS_MP_PROCESSOR_MISMATCH
-# define STATUS_MP_PROCESSOR_MISMATCH ((NTSTATUS) 0x40000029L)
-#endif
-
-#ifndef STATUS_HIBERNATED
-# define STATUS_HIBERNATED ((NTSTATUS) 0x4000002AL)
-#endif
-
-#ifndef STATUS_RESUME_HIBERNATION
-# define STATUS_RESUME_HIBERNATION ((NTSTATUS) 0x4000002BL)
-#endif
-
-#ifndef STATUS_FIRMWARE_UPDATED
-# define STATUS_FIRMWARE_UPDATED ((NTSTATUS) 0x4000002CL)
-#endif
-
-#ifndef STATUS_DRIVERS_LEAKING_LOCKED_PAGES
-# define STATUS_DRIVERS_LEAKING_LOCKED_PAGES ((NTSTATUS) 0x4000002DL)
-#endif
-
-#ifndef STATUS_MESSAGE_RETRIEVED
-# define STATUS_MESSAGE_RETRIEVED ((NTSTATUS) 0x4000002EL)
-#endif
-
-#ifndef STATUS_SYSTEM_POWERSTATE_TRANSITION
-# define STATUS_SYSTEM_POWERSTATE_TRANSITION ((NTSTATUS) 0x4000002FL)
-#endif
-
-#ifndef STATUS_ALPC_CHECK_COMPLETION_LIST
-# define STATUS_ALPC_CHECK_COMPLETION_LIST ((NTSTATUS) 0x40000030L)
-#endif
-
-#ifndef STATUS_SYSTEM_POWERSTATE_COMPLEX_TRANSITION
-# define STATUS_SYSTEM_POWERSTATE_COMPLEX_TRANSITION ((NTSTATUS) 0x40000031L)
-#endif
-
-#ifndef STATUS_ACCESS_AUDIT_BY_POLICY
-# define STATUS_ACCESS_AUDIT_BY_POLICY ((NTSTATUS) 0x40000032L)
-#endif
-
-#ifndef STATUS_ABANDON_HIBERFILE
-# define STATUS_ABANDON_HIBERFILE ((NTSTATUS) 0x40000033L)
-#endif
-
-#ifndef STATUS_BIZRULES_NOT_ENABLED
-# define STATUS_BIZRULES_NOT_ENABLED ((NTSTATUS) 0x40000034L)
-#endif
-
-#ifndef STATUS_GUARD_PAGE_VIOLATION
-# define STATUS_GUARD_PAGE_VIOLATION ((NTSTATUS) 0x80000001L)
-#endif
-
-#ifndef STATUS_DATATYPE_MISALIGNMENT
-# define STATUS_DATATYPE_MISALIGNMENT ((NTSTATUS) 0x80000002L)
-#endif
-
-#ifndef STATUS_BREAKPOINT
-# define STATUS_BREAKPOINT ((NTSTATUS) 0x80000003L)
-#endif
-
-#ifndef STATUS_SINGLE_STEP
-# define STATUS_SINGLE_STEP ((NTSTATUS) 0x80000004L)
-#endif
-
-#ifndef STATUS_BUFFER_OVERFLOW
-# define STATUS_BUFFER_OVERFLOW ((NTSTATUS) 0x80000005L)
-#endif
-
-#ifndef STATUS_NO_MORE_FILES
-# define STATUS_NO_MORE_FILES ((NTSTATUS) 0x80000006L)
-#endif
-
-#ifndef STATUS_WAKE_SYSTEM_DEBUGGER
-# define STATUS_WAKE_SYSTEM_DEBUGGER ((NTSTATUS) 0x80000007L)
-#endif
-
-#ifndef STATUS_HANDLES_CLOSED
-# define STATUS_HANDLES_CLOSED ((NTSTATUS) 0x8000000AL)
-#endif
-
-#ifndef STATUS_NO_INHERITANCE
-# define STATUS_NO_INHERITANCE ((NTSTATUS) 0x8000000BL)
-#endif
-
-#ifndef STATUS_GUID_SUBSTITUTION_MADE
-# define STATUS_GUID_SUBSTITUTION_MADE ((NTSTATUS) 0x8000000CL)
-#endif
-
-#ifndef STATUS_PARTIAL_COPY
-# define STATUS_PARTIAL_COPY ((NTSTATUS) 0x8000000DL)
-#endif
-
-#ifndef STATUS_DEVICE_PAPER_EMPTY
-# define STATUS_DEVICE_PAPER_EMPTY ((NTSTATUS) 0x8000000EL)
-#endif
-
-#ifndef STATUS_DEVICE_POWERED_OFF
-# define STATUS_DEVICE_POWERED_OFF ((NTSTATUS) 0x8000000FL)
-#endif
-
-#ifndef STATUS_DEVICE_OFF_LINE
-# define STATUS_DEVICE_OFF_LINE ((NTSTATUS) 0x80000010L)
-#endif
-
-#ifndef STATUS_DEVICE_BUSY
-# define STATUS_DEVICE_BUSY ((NTSTATUS) 0x80000011L)
-#endif
-
-#ifndef STATUS_NO_MORE_EAS
-# define STATUS_NO_MORE_EAS ((NTSTATUS) 0x80000012L)
-#endif
-
-#ifndef STATUS_INVALID_EA_NAME
-# define STATUS_INVALID_EA_NAME ((NTSTATUS) 0x80000013L)
-#endif
-
-#ifndef STATUS_EA_LIST_INCONSISTENT
-# define STATUS_EA_LIST_INCONSISTENT ((NTSTATUS) 0x80000014L)
-#endif
-
-#ifndef STATUS_INVALID_EA_FLAG
-# define STATUS_INVALID_EA_FLAG ((NTSTATUS) 0x80000015L)
-#endif
-
-#ifndef STATUS_VERIFY_REQUIRED
-# define STATUS_VERIFY_REQUIRED ((NTSTATUS) 0x80000016L)
-#endif
-
-#ifndef STATUS_EXTRANEOUS_INFORMATION
-# define STATUS_EXTRANEOUS_INFORMATION ((NTSTATUS) 0x80000017L)
-#endif
-
-#ifndef STATUS_RXACT_COMMIT_NECESSARY
-# define STATUS_RXACT_COMMIT_NECESSARY ((NTSTATUS) 0x80000018L)
-#endif
-
-#ifndef STATUS_NO_MORE_ENTRIES
-# define STATUS_NO_MORE_ENTRIES ((NTSTATUS) 0x8000001AL)
-#endif
-
-#ifndef STATUS_FILEMARK_DETECTED
-# define STATUS_FILEMARK_DETECTED ((NTSTATUS) 0x8000001BL)
-#endif
-
-#ifndef STATUS_MEDIA_CHANGED
-# define STATUS_MEDIA_CHANGED ((NTSTATUS) 0x8000001CL)
-#endif
-
-#ifndef STATUS_BUS_RESET
-# define STATUS_BUS_RESET ((NTSTATUS) 0x8000001DL)
-#endif
-
-#ifndef STATUS_END_OF_MEDIA
-# define STATUS_END_OF_MEDIA ((NTSTATUS) 0x8000001EL)
-#endif
-
-#ifndef STATUS_BEGINNING_OF_MEDIA
-# define STATUS_BEGINNING_OF_MEDIA ((NTSTATUS) 0x8000001FL)
-#endif
-
-#ifndef STATUS_MEDIA_CHECK
-# define STATUS_MEDIA_CHECK ((NTSTATUS) 0x80000020L)
-#endif
-
-#ifndef STATUS_SETMARK_DETECTED
-# define STATUS_SETMARK_DETECTED ((NTSTATUS) 0x80000021L)
-#endif
-
-#ifndef STATUS_NO_DATA_DETECTED
-# define STATUS_NO_DATA_DETECTED ((NTSTATUS) 0x80000022L)
-#endif
-
-#ifndef STATUS_REDIRECTOR_HAS_OPEN_HANDLES
-# define STATUS_REDIRECTOR_HAS_OPEN_HANDLES ((NTSTATUS) 0x80000023L)
-#endif
-
-#ifndef STATUS_SERVER_HAS_OPEN_HANDLES
-# define STATUS_SERVER_HAS_OPEN_HANDLES ((NTSTATUS) 0x80000024L)
-#endif
-
-#ifndef STATUS_ALREADY_DISCONNECTED
-# define STATUS_ALREADY_DISCONNECTED ((NTSTATUS) 0x80000025L)
-#endif
-
-#ifndef STATUS_LONGJUMP
-# define STATUS_LONGJUMP ((NTSTATUS) 0x80000026L)
-#endif
-
-#ifndef STATUS_CLEANER_CARTRIDGE_INSTALLED
-# define STATUS_CLEANER_CARTRIDGE_INSTALLED ((NTSTATUS) 0x80000027L)
-#endif
-
-#ifndef STATUS_PLUGPLAY_QUERY_VETOED
-# define STATUS_PLUGPLAY_QUERY_VETOED ((NTSTATUS) 0x80000028L)
-#endif
-
-#ifndef STATUS_UNWIND_CONSOLIDATE
-# define STATUS_UNWIND_CONSOLIDATE ((NTSTATUS) 0x80000029L)
-#endif
-
-#ifndef STATUS_REGISTRY_HIVE_RECOVERED
-# define STATUS_REGISTRY_HIVE_RECOVERED ((NTSTATUS) 0x8000002AL)
-#endif
-
-#ifndef STATUS_DLL_MIGHT_BE_INSECURE
-# define STATUS_DLL_MIGHT_BE_INSECURE ((NTSTATUS) 0x8000002BL)
-#endif
-
-#ifndef STATUS_DLL_MIGHT_BE_INCOMPATIBLE
-# define STATUS_DLL_MIGHT_BE_INCOMPATIBLE ((NTSTATUS) 0x8000002CL)
-#endif
-
-#ifndef STATUS_STOPPED_ON_SYMLINK
-# define STATUS_STOPPED_ON_SYMLINK ((NTSTATUS) 0x8000002DL)
-#endif
-
-#ifndef STATUS_CANNOT_GRANT_REQUESTED_OPLOCK
-# define STATUS_CANNOT_GRANT_REQUESTED_OPLOCK ((NTSTATUS) 0x8000002EL)
-#endif
-
-#ifndef STATUS_NO_ACE_CONDITION
-# define STATUS_NO_ACE_CONDITION ((NTSTATUS) 0x8000002FL)
-#endif
-
-#ifndef STATUS_UNSUCCESSFUL
-# define STATUS_UNSUCCESSFUL ((NTSTATUS) 0xC0000001L)
-#endif
-
-#ifndef STATUS_NOT_IMPLEMENTED
-# define STATUS_NOT_IMPLEMENTED ((NTSTATUS) 0xC0000002L)
-#endif
-
-#ifndef STATUS_INVALID_INFO_CLASS
-# define STATUS_INVALID_INFO_CLASS ((NTSTATUS) 0xC0000003L)
-#endif
-
-#ifndef STATUS_INFO_LENGTH_MISMATCH
-# define STATUS_INFO_LENGTH_MISMATCH ((NTSTATUS) 0xC0000004L)
-#endif
-
-#ifndef STATUS_ACCESS_VIOLATION
-# define STATUS_ACCESS_VIOLATION ((NTSTATUS) 0xC0000005L)
-#endif
-
-#ifndef STATUS_IN_PAGE_ERROR
-# define STATUS_IN_PAGE_ERROR ((NTSTATUS) 0xC0000006L)
-#endif
-
-#ifndef STATUS_PAGEFILE_QUOTA
-# define STATUS_PAGEFILE_QUOTA ((NTSTATUS) 0xC0000007L)
-#endif
-
-#ifndef STATUS_INVALID_HANDLE
-# define STATUS_INVALID_HANDLE ((NTSTATUS) 0xC0000008L)
-#endif
-
-#ifndef STATUS_BAD_INITIAL_STACK
-# define STATUS_BAD_INITIAL_STACK ((NTSTATUS) 0xC0000009L)
-#endif
-
-#ifndef STATUS_BAD_INITIAL_PC
-# define STATUS_BAD_INITIAL_PC ((NTSTATUS) 0xC000000AL)
-#endif
-
-#ifndef STATUS_INVALID_CID
-# define STATUS_INVALID_CID ((NTSTATUS) 0xC000000BL)
-#endif
-
-#ifndef STATUS_TIMER_NOT_CANCELED
-# define STATUS_TIMER_NOT_CANCELED ((NTSTATUS) 0xC000000CL)
-#endif
-
-#ifndef STATUS_INVALID_PARAMETER
-# define STATUS_INVALID_PARAMETER ((NTSTATUS) 0xC000000DL)
-#endif
-
-#ifndef STATUS_NO_SUCH_DEVICE
-# define STATUS_NO_SUCH_DEVICE ((NTSTATUS) 0xC000000EL)
-#endif
-
-#ifndef STATUS_NO_SUCH_FILE
-# define STATUS_NO_SUCH_FILE ((NTSTATUS) 0xC000000FL)
-#endif
-
-#ifndef STATUS_INVALID_DEVICE_REQUEST
-# define STATUS_INVALID_DEVICE_REQUEST ((NTSTATUS) 0xC0000010L)
-#endif
-
-#ifndef STATUS_END_OF_FILE
-# define STATUS_END_OF_FILE ((NTSTATUS) 0xC0000011L)
-#endif
-
-#ifndef STATUS_WRONG_VOLUME
-# define STATUS_WRONG_VOLUME ((NTSTATUS) 0xC0000012L)
-#endif
-
-#ifndef STATUS_NO_MEDIA_IN_DEVICE
-# define STATUS_NO_MEDIA_IN_DEVICE ((NTSTATUS) 0xC0000013L)
-#endif
-
-#ifndef STATUS_UNRECOGNIZED_MEDIA
-# define STATUS_UNRECOGNIZED_MEDIA ((NTSTATUS) 0xC0000014L)
-#endif
-
-#ifndef STATUS_NONEXISTENT_SECTOR
-# define STATUS_NONEXISTENT_SECTOR ((NTSTATUS) 0xC0000015L)
-#endif
-
-#ifndef STATUS_MORE_PROCESSING_REQUIRED
-# define STATUS_MORE_PROCESSING_REQUIRED ((NTSTATUS) 0xC0000016L)
-#endif
-
-#ifndef STATUS_NO_MEMORY
-# define STATUS_NO_MEMORY ((NTSTATUS) 0xC0000017L)
-#endif
-
-#ifndef STATUS_CONFLICTING_ADDRESSES
-# define STATUS_CONFLICTING_ADDRESSES ((NTSTATUS) 0xC0000018L)
-#endif
-
-#ifndef STATUS_NOT_MAPPED_VIEW
-# define STATUS_NOT_MAPPED_VIEW ((NTSTATUS) 0xC0000019L)
-#endif
-
-#ifndef STATUS_UNABLE_TO_FREE_VM
-# define STATUS_UNABLE_TO_FREE_VM ((NTSTATUS) 0xC000001AL)
-#endif
-
-#ifndef STATUS_UNABLE_TO_DELETE_SECTION
-# define STATUS_UNABLE_TO_DELETE_SECTION ((NTSTATUS) 0xC000001BL)
-#endif
-
-#ifndef STATUS_INVALID_SYSTEM_SERVICE
-# define STATUS_INVALID_SYSTEM_SERVICE ((NTSTATUS) 0xC000001CL)
-#endif
-
-#ifndef STATUS_ILLEGAL_INSTRUCTION
-# define STATUS_ILLEGAL_INSTRUCTION ((NTSTATUS) 0xC000001DL)
-#endif
-
-#ifndef STATUS_INVALID_LOCK_SEQUENCE
-# define STATUS_INVALID_LOCK_SEQUENCE ((NTSTATUS) 0xC000001EL)
-#endif
-
-#ifndef STATUS_INVALID_VIEW_SIZE
-# define STATUS_INVALID_VIEW_SIZE ((NTSTATUS) 0xC000001FL)
-#endif
-
-#ifndef STATUS_INVALID_FILE_FOR_SECTION
-# define STATUS_INVALID_FILE_FOR_SECTION ((NTSTATUS) 0xC0000020L)
-#endif
-
-#ifndef STATUS_ALREADY_COMMITTED
-# define STATUS_ALREADY_COMMITTED ((NTSTATUS) 0xC0000021L)
-#endif
-
-#ifndef STATUS_ACCESS_DENIED
-# define STATUS_ACCESS_DENIED ((NTSTATUS) 0xC0000022L)
-#endif
-
-#ifndef STATUS_BUFFER_TOO_SMALL
-# define STATUS_BUFFER_TOO_SMALL ((NTSTATUS) 0xC0000023L)
-#endif
-
-#ifndef STATUS_OBJECT_TYPE_MISMATCH
-# define STATUS_OBJECT_TYPE_MISMATCH ((NTSTATUS) 0xC0000024L)
-#endif
-
-#ifndef STATUS_NONCONTINUABLE_EXCEPTION
-# define STATUS_NONCONTINUABLE_EXCEPTION ((NTSTATUS) 0xC0000025L)
-#endif
-
-#ifndef STATUS_INVALID_DISPOSITION
-# define STATUS_INVALID_DISPOSITION ((NTSTATUS) 0xC0000026L)
-#endif
-
-#ifndef STATUS_UNWIND
-# define STATUS_UNWIND ((NTSTATUS) 0xC0000027L)
-#endif
-
-#ifndef STATUS_BAD_STACK
-# define STATUS_BAD_STACK ((NTSTATUS) 0xC0000028L)
-#endif
-
-#ifndef STATUS_INVALID_UNWIND_TARGET
-# define STATUS_INVALID_UNWIND_TARGET ((NTSTATUS) 0xC0000029L)
-#endif
-
-#ifndef STATUS_NOT_LOCKED
-# define STATUS_NOT_LOCKED ((NTSTATUS) 0xC000002AL)
-#endif
-
-#ifndef STATUS_PARITY_ERROR
-# define STATUS_PARITY_ERROR ((NTSTATUS) 0xC000002BL)
-#endif
-
-#ifndef STATUS_UNABLE_TO_DECOMMIT_VM
-# define STATUS_UNABLE_TO_DECOMMIT_VM ((NTSTATUS) 0xC000002CL)
-#endif
-
-#ifndef STATUS_NOT_COMMITTED
-# define STATUS_NOT_COMMITTED ((NTSTATUS) 0xC000002DL)
-#endif
-
-#ifndef STATUS_INVALID_PORT_ATTRIBUTES
-# define STATUS_INVALID_PORT_ATTRIBUTES ((NTSTATUS) 0xC000002EL)
-#endif
-
-#ifndef STATUS_PORT_MESSAGE_TOO_LONG
-# define STATUS_PORT_MESSAGE_TOO_LONG ((NTSTATUS) 0xC000002FL)
-#endif
-
-#ifndef STATUS_INVALID_PARAMETER_MIX
-# define STATUS_INVALID_PARAMETER_MIX ((NTSTATUS) 0xC0000030L)
-#endif
-
-#ifndef STATUS_INVALID_QUOTA_LOWER
-# define STATUS_INVALID_QUOTA_LOWER ((NTSTATUS) 0xC0000031L)
-#endif
-
-#ifndef STATUS_DISK_CORRUPT_ERROR
-# define STATUS_DISK_CORRUPT_ERROR ((NTSTATUS) 0xC0000032L)
-#endif
-
-#ifndef STATUS_OBJECT_NAME_INVALID
-# define STATUS_OBJECT_NAME_INVALID ((NTSTATUS) 0xC0000033L)
-#endif
-
-#ifndef STATUS_OBJECT_NAME_NOT_FOUND
-# define STATUS_OBJECT_NAME_NOT_FOUND ((NTSTATUS) 0xC0000034L)
-#endif
-
-#ifndef STATUS_OBJECT_NAME_COLLISION
-# define STATUS_OBJECT_NAME_COLLISION ((NTSTATUS) 0xC0000035L)
-#endif
-
-#ifndef STATUS_PORT_DISCONNECTED
-# define STATUS_PORT_DISCONNECTED ((NTSTATUS) 0xC0000037L)
-#endif
-
-#ifndef STATUS_DEVICE_ALREADY_ATTACHED
-# define STATUS_DEVICE_ALREADY_ATTACHED ((NTSTATUS) 0xC0000038L)
-#endif
-
-#ifndef STATUS_OBJECT_PATH_INVALID
-# define STATUS_OBJECT_PATH_INVALID ((NTSTATUS) 0xC0000039L)
-#endif
-
-#ifndef STATUS_OBJECT_PATH_NOT_FOUND
-# define STATUS_OBJECT_PATH_NOT_FOUND ((NTSTATUS) 0xC000003AL)
-#endif
-
-#ifndef STATUS_OBJECT_PATH_SYNTAX_BAD
-# define STATUS_OBJECT_PATH_SYNTAX_BAD ((NTSTATUS) 0xC000003BL)
-#endif
-
-#ifndef STATUS_DATA_OVERRUN
-# define STATUS_DATA_OVERRUN ((NTSTATUS) 0xC000003CL)
-#endif
-
-#ifndef STATUS_DATA_LATE_ERROR
-# define STATUS_DATA_LATE_ERROR ((NTSTATUS) 0xC000003DL)
-#endif
-
-#ifndef STATUS_DATA_ERROR
-# define STATUS_DATA_ERROR ((NTSTATUS) 0xC000003EL)
-#endif
-
-#ifndef STATUS_CRC_ERROR
-# define STATUS_CRC_ERROR ((NTSTATUS) 0xC000003FL)
-#endif
-
-#ifndef STATUS_SECTION_TOO_BIG
-# define STATUS_SECTION_TOO_BIG ((NTSTATUS) 0xC0000040L)
-#endif
-
-#ifndef STATUS_PORT_CONNECTION_REFUSED
-# define STATUS_PORT_CONNECTION_REFUSED ((NTSTATUS) 0xC0000041L)
-#endif
-
-#ifndef STATUS_INVALID_PORT_HANDLE
-# define STATUS_INVALID_PORT_HANDLE ((NTSTATUS) 0xC0000042L)
-#endif
-
-#ifndef STATUS_SHARING_VIOLATION
-# define STATUS_SHARING_VIOLATION ((NTSTATUS) 0xC0000043L)
-#endif
-
-#ifndef STATUS_QUOTA_EXCEEDED
-# define STATUS_QUOTA_EXCEEDED ((NTSTATUS) 0xC0000044L)
-#endif
-
-#ifndef STATUS_INVALID_PAGE_PROTECTION
-# define STATUS_INVALID_PAGE_PROTECTION ((NTSTATUS) 0xC0000045L)
-#endif
-
-#ifndef STATUS_MUTANT_NOT_OWNED
-# define STATUS_MUTANT_NOT_OWNED ((NTSTATUS) 0xC0000046L)
-#endif
-
-#ifndef STATUS_SEMAPHORE_LIMIT_EXCEEDED
-# define STATUS_SEMAPHORE_LIMIT_EXCEEDED ((NTSTATUS) 0xC0000047L)
-#endif
-
-#ifndef STATUS_PORT_ALREADY_SET
-# define STATUS_PORT_ALREADY_SET ((NTSTATUS) 0xC0000048L)
-#endif
-
-#ifndef STATUS_SECTION_NOT_IMAGE
-# define STATUS_SECTION_NOT_IMAGE ((NTSTATUS) 0xC0000049L)
-#endif
-
-#ifndef STATUS_SUSPEND_COUNT_EXCEEDED
-# define STATUS_SUSPEND_COUNT_EXCEEDED ((NTSTATUS) 0xC000004AL)
-#endif
-
-#ifndef STATUS_THREAD_IS_TERMINATING
-# define STATUS_THREAD_IS_TERMINATING ((NTSTATUS) 0xC000004BL)
-#endif
-
-#ifndef STATUS_BAD_WORKING_SET_LIMIT
-# define STATUS_BAD_WORKING_SET_LIMIT ((NTSTATUS) 0xC000004CL)
-#endif
-
-#ifndef STATUS_INCOMPATIBLE_FILE_MAP
-# define STATUS_INCOMPATIBLE_FILE_MAP ((NTSTATUS) 0xC000004DL)
-#endif
-
-#ifndef STATUS_SECTION_PROTECTION
-# define STATUS_SECTION_PROTECTION ((NTSTATUS) 0xC000004EL)
-#endif
-
-#ifndef STATUS_EAS_NOT_SUPPORTED
-# define STATUS_EAS_NOT_SUPPORTED ((NTSTATUS) 0xC000004FL)
-#endif
-
-#ifndef STATUS_EA_TOO_LARGE
-# define STATUS_EA_TOO_LARGE ((NTSTATUS) 0xC0000050L)
-#endif
-
-#ifndef STATUS_NONEXISTENT_EA_ENTRY
-# define STATUS_NONEXISTENT_EA_ENTRY ((NTSTATUS) 0xC0000051L)
-#endif
-
-#ifndef STATUS_NO_EAS_ON_FILE
-# define STATUS_NO_EAS_ON_FILE ((NTSTATUS) 0xC0000052L)
-#endif
-
-#ifndef STATUS_EA_CORRUPT_ERROR
-# define STATUS_EA_CORRUPT_ERROR ((NTSTATUS) 0xC0000053L)
-#endif
-
-#ifndef STATUS_FILE_LOCK_CONFLICT
-# define STATUS_FILE_LOCK_CONFLICT ((NTSTATUS) 0xC0000054L)
-#endif
-
-#ifndef STATUS_LOCK_NOT_GRANTED
-# define STATUS_LOCK_NOT_GRANTED ((NTSTATUS) 0xC0000055L)
-#endif
-
-#ifndef STATUS_DELETE_PENDING
-# define STATUS_DELETE_PENDING ((NTSTATUS) 0xC0000056L)
-#endif
-
-#ifndef STATUS_CTL_FILE_NOT_SUPPORTED
-# define STATUS_CTL_FILE_NOT_SUPPORTED ((NTSTATUS) 0xC0000057L)
-#endif
-
-#ifndef STATUS_UNKNOWN_REVISION
-# define STATUS_UNKNOWN_REVISION ((NTSTATUS) 0xC0000058L)
-#endif
-
-#ifndef STATUS_REVISION_MISMATCH
-# define STATUS_REVISION_MISMATCH ((NTSTATUS) 0xC0000059L)
-#endif
-
-#ifndef STATUS_INVALID_OWNER
-# define STATUS_INVALID_OWNER ((NTSTATUS) 0xC000005AL)
-#endif
-
-#ifndef STATUS_INVALID_PRIMARY_GROUP
-# define STATUS_INVALID_PRIMARY_GROUP ((NTSTATUS) 0xC000005BL)
-#endif
-
-#ifndef STATUS_NO_IMPERSONATION_TOKEN
-# define STATUS_NO_IMPERSONATION_TOKEN ((NTSTATUS) 0xC000005CL)
-#endif
-
-#ifndef STATUS_CANT_DISABLE_MANDATORY
-# define STATUS_CANT_DISABLE_MANDATORY ((NTSTATUS) 0xC000005DL)
-#endif
-
-#ifndef STATUS_NO_LOGON_SERVERS
-# define STATUS_NO_LOGON_SERVERS ((NTSTATUS) 0xC000005EL)
-#endif
-
-#ifndef STATUS_NO_SUCH_LOGON_SESSION
-# define STATUS_NO_SUCH_LOGON_SESSION ((NTSTATUS) 0xC000005FL)
-#endif
-
-#ifndef STATUS_NO_SUCH_PRIVILEGE
-# define STATUS_NO_SUCH_PRIVILEGE ((NTSTATUS) 0xC0000060L)
-#endif
-
-#ifndef STATUS_PRIVILEGE_NOT_HELD
-# define STATUS_PRIVILEGE_NOT_HELD ((NTSTATUS) 0xC0000061L)
-#endif
-
-#ifndef STATUS_INVALID_ACCOUNT_NAME
-# define STATUS_INVALID_ACCOUNT_NAME ((NTSTATUS) 0xC0000062L)
-#endif
-
-#ifndef STATUS_USER_EXISTS
-# define STATUS_USER_EXISTS ((NTSTATUS) 0xC0000063L)
-#endif
-
-#ifndef STATUS_NO_SUCH_USER
-# define STATUS_NO_SUCH_USER ((NTSTATUS) 0xC0000064L)
-#endif
-
-#ifndef STATUS_GROUP_EXISTS
-# define STATUS_GROUP_EXISTS ((NTSTATUS) 0xC0000065L)
-#endif
-
-#ifndef STATUS_NO_SUCH_GROUP
-# define STATUS_NO_SUCH_GROUP ((NTSTATUS) 0xC0000066L)
-#endif
-
-#ifndef STATUS_MEMBER_IN_GROUP
-# define STATUS_MEMBER_IN_GROUP ((NTSTATUS) 0xC0000067L)
-#endif
-
-#ifndef STATUS_MEMBER_NOT_IN_GROUP
-# define STATUS_MEMBER_NOT_IN_GROUP ((NTSTATUS) 0xC0000068L)
-#endif
-
-#ifndef STATUS_LAST_ADMIN
-# define STATUS_LAST_ADMIN ((NTSTATUS) 0xC0000069L)
-#endif
-
-#ifndef STATUS_WRONG_PASSWORD
-# define STATUS_WRONG_PASSWORD ((NTSTATUS) 0xC000006AL)
-#endif
-
-#ifndef STATUS_ILL_FORMED_PASSWORD
-# define STATUS_ILL_FORMED_PASSWORD ((NTSTATUS) 0xC000006BL)
-#endif
-
-#ifndef STATUS_PASSWORD_RESTRICTION
-# define STATUS_PASSWORD_RESTRICTION ((NTSTATUS) 0xC000006CL)
-#endif
-
-#ifndef STATUS_LOGON_FAILURE
-# define STATUS_LOGON_FAILURE ((NTSTATUS) 0xC000006DL)
-#endif
-
-#ifndef STATUS_ACCOUNT_RESTRICTION
-# define STATUS_ACCOUNT_RESTRICTION ((NTSTATUS) 0xC000006EL)
-#endif
-
-#ifndef STATUS_INVALID_LOGON_HOURS
-# define STATUS_INVALID_LOGON_HOURS ((NTSTATUS) 0xC000006FL)
-#endif
-
-#ifndef STATUS_INVALID_WORKSTATION
-# define STATUS_INVALID_WORKSTATION ((NTSTATUS) 0xC0000070L)
-#endif
-
-#ifndef STATUS_PASSWORD_EXPIRED
-# define STATUS_PASSWORD_EXPIRED ((NTSTATUS) 0xC0000071L)
-#endif
-
-#ifndef STATUS_ACCOUNT_DISABLED
-# define STATUS_ACCOUNT_DISABLED ((NTSTATUS) 0xC0000072L)
-#endif
-
-#ifndef STATUS_NONE_MAPPED
-# define STATUS_NONE_MAPPED ((NTSTATUS) 0xC0000073L)
-#endif
-
-#ifndef STATUS_TOO_MANY_LUIDS_REQUESTED
-# define STATUS_TOO_MANY_LUIDS_REQUESTED ((NTSTATUS) 0xC0000074L)
-#endif
-
-#ifndef STATUS_LUIDS_EXHAUSTED
-# define STATUS_LUIDS_EXHAUSTED ((NTSTATUS) 0xC0000075L)
-#endif
-
-#ifndef STATUS_INVALID_SUB_AUTHORITY
-# define STATUS_INVALID_SUB_AUTHORITY ((NTSTATUS) 0xC0000076L)
-#endif
-
-#ifndef STATUS_INVALID_ACL
-# define STATUS_INVALID_ACL ((NTSTATUS) 0xC0000077L)
-#endif
-
-#ifndef STATUS_INVALID_SID
-# define STATUS_INVALID_SID ((NTSTATUS) 0xC0000078L)
-#endif
-
-#ifndef STATUS_INVALID_SECURITY_DESCR
-# define STATUS_INVALID_SECURITY_DESCR ((NTSTATUS) 0xC0000079L)
-#endif
-
-#ifndef STATUS_PROCEDURE_NOT_FOUND
-# define STATUS_PROCEDURE_NOT_FOUND ((NTSTATUS) 0xC000007AL)
-#endif
-
-#ifndef STATUS_INVALID_IMAGE_FORMAT
-# define STATUS_INVALID_IMAGE_FORMAT ((NTSTATUS) 0xC000007BL)
-#endif
-
-#ifndef STATUS_NO_TOKEN
-# define STATUS_NO_TOKEN ((NTSTATUS) 0xC000007CL)
-#endif
-
-#ifndef STATUS_BAD_INHERITANCE_ACL
-# define STATUS_BAD_INHERITANCE_ACL ((NTSTATUS) 0xC000007DL)
-#endif
-
-#ifndef STATUS_RANGE_NOT_LOCKED
-# define STATUS_RANGE_NOT_LOCKED ((NTSTATUS) 0xC000007EL)
-#endif
-
-#ifndef STATUS_DISK_FULL
-# define STATUS_DISK_FULL ((NTSTATUS) 0xC000007FL)
-#endif
-
-#ifndef STATUS_SERVER_DISABLED
-# define STATUS_SERVER_DISABLED ((NTSTATUS) 0xC0000080L)
-#endif
-
-#ifndef STATUS_SERVER_NOT_DISABLED
-# define STATUS_SERVER_NOT_DISABLED ((NTSTATUS) 0xC0000081L)
-#endif
-
-#ifndef STATUS_TOO_MANY_GUIDS_REQUESTED
-# define STATUS_TOO_MANY_GUIDS_REQUESTED ((NTSTATUS) 0xC0000082L)
-#endif
-
-#ifndef STATUS_GUIDS_EXHAUSTED
-# define STATUS_GUIDS_EXHAUSTED ((NTSTATUS) 0xC0000083L)
-#endif
-
-#ifndef STATUS_INVALID_ID_AUTHORITY
-# define STATUS_INVALID_ID_AUTHORITY ((NTSTATUS) 0xC0000084L)
-#endif
-
-#ifndef STATUS_AGENTS_EXHAUSTED
-# define STATUS_AGENTS_EXHAUSTED ((NTSTATUS) 0xC0000085L)
-#endif
-
-#ifndef STATUS_INVALID_VOLUME_LABEL
-# define STATUS_INVALID_VOLUME_LABEL ((NTSTATUS) 0xC0000086L)
-#endif
-
-#ifndef STATUS_SECTION_NOT_EXTENDED
-# define STATUS_SECTION_NOT_EXTENDED ((NTSTATUS) 0xC0000087L)
-#endif
-
-#ifndef STATUS_NOT_MAPPED_DATA
-# define STATUS_NOT_MAPPED_DATA ((NTSTATUS) 0xC0000088L)
-#endif
-
-#ifndef STATUS_RESOURCE_DATA_NOT_FOUND
-# define STATUS_RESOURCE_DATA_NOT_FOUND ((NTSTATUS) 0xC0000089L)
-#endif
-
-#ifndef STATUS_RESOURCE_TYPE_NOT_FOUND
-# define STATUS_RESOURCE_TYPE_NOT_FOUND ((NTSTATUS) 0xC000008AL)
-#endif
-
-#ifndef STATUS_RESOURCE_NAME_NOT_FOUND
-# define STATUS_RESOURCE_NAME_NOT_FOUND ((NTSTATUS) 0xC000008BL)
-#endif
-
-#ifndef STATUS_ARRAY_BOUNDS_EXCEEDED
-# define STATUS_ARRAY_BOUNDS_EXCEEDED ((NTSTATUS) 0xC000008CL)
-#endif
-
-#ifndef STATUS_FLOAT_DENORMAL_OPERAND
-# define STATUS_FLOAT_DENORMAL_OPERAND ((NTSTATUS) 0xC000008DL)
-#endif
-
-#ifndef STATUS_FLOAT_DIVIDE_BY_ZERO
-# define STATUS_FLOAT_DIVIDE_BY_ZERO ((NTSTATUS) 0xC000008EL)
-#endif
-
-#ifndef STATUS_FLOAT_INEXACT_RESULT
-# define STATUS_FLOAT_INEXACT_RESULT ((NTSTATUS) 0xC000008FL)
-#endif
-
-#ifndef STATUS_FLOAT_INVALID_OPERATION
-# define STATUS_FLOAT_INVALID_OPERATION ((NTSTATUS) 0xC0000090L)
-#endif
-
-#ifndef STATUS_FLOAT_OVERFLOW
-# define STATUS_FLOAT_OVERFLOW ((NTSTATUS) 0xC0000091L)
-#endif
-
-#ifndef STATUS_FLOAT_STACK_CHECK
-# define STATUS_FLOAT_STACK_CHECK ((NTSTATUS) 0xC0000092L)
-#endif
-
-#ifndef STATUS_FLOAT_UNDERFLOW
-# define STATUS_FLOAT_UNDERFLOW ((NTSTATUS) 0xC0000093L)
-#endif
-
-#ifndef STATUS_INTEGER_DIVIDE_BY_ZERO
-# define STATUS_INTEGER_DIVIDE_BY_ZERO ((NTSTATUS) 0xC0000094L)
-#endif
-
-#ifndef STATUS_INTEGER_OVERFLOW
-# define STATUS_INTEGER_OVERFLOW ((NTSTATUS) 0xC0000095L)
-#endif
-
-#ifndef STATUS_PRIVILEGED_INSTRUCTION
-# define STATUS_PRIVILEGED_INSTRUCTION ((NTSTATUS) 0xC0000096L)
-#endif
-
-#ifndef STATUS_TOO_MANY_PAGING_FILES
-# define STATUS_TOO_MANY_PAGING_FILES ((NTSTATUS) 0xC0000097L)
-#endif
-
-#ifndef STATUS_FILE_INVALID
-# define STATUS_FILE_INVALID ((NTSTATUS) 0xC0000098L)
-#endif
-
-#ifndef STATUS_ALLOTTED_SPACE_EXCEEDED
-# define STATUS_ALLOTTED_SPACE_EXCEEDED ((NTSTATUS) 0xC0000099L)
-#endif
-
-#ifndef STATUS_INSUFFICIENT_RESOURCES
-# define STATUS_INSUFFICIENT_RESOURCES ((NTSTATUS) 0xC000009AL)
-#endif
-
-#ifndef STATUS_DFS_EXIT_PATH_FOUND
-# define STATUS_DFS_EXIT_PATH_FOUND ((NTSTATUS) 0xC000009BL)
-#endif
-
-#ifndef STATUS_DEVICE_DATA_ERROR
-# define STATUS_DEVICE_DATA_ERROR ((NTSTATUS) 0xC000009CL)
-#endif
-
-#ifndef STATUS_DEVICE_NOT_CONNECTED
-# define STATUS_DEVICE_NOT_CONNECTED ((NTSTATUS) 0xC000009DL)
-#endif
-
-#ifndef STATUS_DEVICE_POWER_FAILURE
-# define STATUS_DEVICE_POWER_FAILURE ((NTSTATUS) 0xC000009EL)
-#endif
-
-#ifndef STATUS_FREE_VM_NOT_AT_BASE
-# define STATUS_FREE_VM_NOT_AT_BASE ((NTSTATUS) 0xC000009FL)
-#endif
-
-#ifndef STATUS_MEMORY_NOT_ALLOCATED
-# define STATUS_MEMORY_NOT_ALLOCATED ((NTSTATUS) 0xC00000A0L)
-#endif
-
-#ifndef STATUS_WORKING_SET_QUOTA
-# define STATUS_WORKING_SET_QUOTA ((NTSTATUS) 0xC00000A1L)
-#endif
-
-#ifndef STATUS_MEDIA_WRITE_PROTECTED
-# define STATUS_MEDIA_WRITE_PROTECTED ((NTSTATUS) 0xC00000A2L)
-#endif
-
-#ifndef STATUS_DEVICE_NOT_READY
-# define STATUS_DEVICE_NOT_READY ((NTSTATUS) 0xC00000A3L)
-#endif
-
-#ifndef STATUS_INVALID_GROUP_ATTRIBUTES
-# define STATUS_INVALID_GROUP_ATTRIBUTES ((NTSTATUS) 0xC00000A4L)
-#endif
-
-#ifndef STATUS_BAD_IMPERSONATION_LEVEL
-# define STATUS_BAD_IMPERSONATION_LEVEL ((NTSTATUS) 0xC00000A5L)
-#endif
-
-#ifndef STATUS_CANT_OPEN_ANONYMOUS
-# define STATUS_CANT_OPEN_ANONYMOUS ((NTSTATUS) 0xC00000A6L)
-#endif
-
-#ifndef STATUS_BAD_VALIDATION_CLASS
-# define STATUS_BAD_VALIDATION_CLASS ((NTSTATUS) 0xC00000A7L)
-#endif
-
-#ifndef STATUS_BAD_TOKEN_TYPE
-# define STATUS_BAD_TOKEN_TYPE ((NTSTATUS) 0xC00000A8L)
-#endif
-
-#ifndef STATUS_BAD_MASTER_BOOT_RECORD
-# define STATUS_BAD_MASTER_BOOT_RECORD ((NTSTATUS) 0xC00000A9L)
-#endif
-
-#ifndef STATUS_INSTRUCTION_MISALIGNMENT
-# define STATUS_INSTRUCTION_MISALIGNMENT ((NTSTATUS) 0xC00000AAL)
-#endif
-
-#ifndef STATUS_INSTANCE_NOT_AVAILABLE
-# define STATUS_INSTANCE_NOT_AVAILABLE ((NTSTATUS) 0xC00000ABL)
-#endif
-
-#ifndef STATUS_PIPE_NOT_AVAILABLE
-# define STATUS_PIPE_NOT_AVAILABLE ((NTSTATUS) 0xC00000ACL)
-#endif
-
-#ifndef STATUS_INVALID_PIPE_STATE
-# define STATUS_INVALID_PIPE_STATE ((NTSTATUS) 0xC00000ADL)
-#endif
-
-#ifndef STATUS_PIPE_BUSY
-# define STATUS_PIPE_BUSY ((NTSTATUS) 0xC00000AEL)
-#endif
-
-#ifndef STATUS_ILLEGAL_FUNCTION
-# define STATUS_ILLEGAL_FUNCTION ((NTSTATUS) 0xC00000AFL)
-#endif
-
-#ifndef STATUS_PIPE_DISCONNECTED
-# define STATUS_PIPE_DISCONNECTED ((NTSTATUS) 0xC00000B0L)
-#endif
-
-#ifndef STATUS_PIPE_CLOSING
-# define STATUS_PIPE_CLOSING ((NTSTATUS) 0xC00000B1L)
-#endif
-
-#ifndef STATUS_PIPE_CONNECTED
-# define STATUS_PIPE_CONNECTED ((NTSTATUS) 0xC00000B2L)
-#endif
-
-#ifndef STATUS_PIPE_LISTENING
-# define STATUS_PIPE_LISTENING ((NTSTATUS) 0xC00000B3L)
-#endif
-
-#ifndef STATUS_INVALID_READ_MODE
-# define STATUS_INVALID_READ_MODE ((NTSTATUS) 0xC00000B4L)
-#endif
-
-#ifndef STATUS_IO_TIMEOUT
-# define STATUS_IO_TIMEOUT ((NTSTATUS) 0xC00000B5L)
-#endif
-
-#ifndef STATUS_FILE_FORCED_CLOSED
-# define STATUS_FILE_FORCED_CLOSED ((NTSTATUS) 0xC00000B6L)
-#endif
-
-#ifndef STATUS_PROFILING_NOT_STARTED
-# define STATUS_PROFILING_NOT_STARTED ((NTSTATUS) 0xC00000B7L)
-#endif
-
-#ifndef STATUS_PROFILING_NOT_STOPPED
-# define STATUS_PROFILING_NOT_STOPPED ((NTSTATUS) 0xC00000B8L)
-#endif
-
-#ifndef STATUS_COULD_NOT_INTERPRET
-# define STATUS_COULD_NOT_INTERPRET ((NTSTATUS) 0xC00000B9L)
-#endif
-
-#ifndef STATUS_FILE_IS_A_DIRECTORY
-# define STATUS_FILE_IS_A_DIRECTORY ((NTSTATUS) 0xC00000BAL)
-#endif
-
-#ifndef STATUS_NOT_SUPPORTED
-# define STATUS_NOT_SUPPORTED ((NTSTATUS) 0xC00000BBL)
-#endif
-
-#ifndef STATUS_REMOTE_NOT_LISTENING
-# define STATUS_REMOTE_NOT_LISTENING ((NTSTATUS) 0xC00000BCL)
-#endif
-
-#ifndef STATUS_DUPLICATE_NAME
-# define STATUS_DUPLICATE_NAME ((NTSTATUS) 0xC00000BDL)
-#endif
-
-#ifndef STATUS_BAD_NETWORK_PATH
-# define STATUS_BAD_NETWORK_PATH ((NTSTATUS) 0xC00000BEL)
-#endif
-
-#ifndef STATUS_NETWORK_BUSY
-# define STATUS_NETWORK_BUSY ((NTSTATUS) 0xC00000BFL)
-#endif
-
-#ifndef STATUS_DEVICE_DOES_NOT_EXIST
-# define STATUS_DEVICE_DOES_NOT_EXIST ((NTSTATUS) 0xC00000C0L)
-#endif
-
-#ifndef STATUS_TOO_MANY_COMMANDS
-# define STATUS_TOO_MANY_COMMANDS ((NTSTATUS) 0xC00000C1L)
-#endif
-
-#ifndef STATUS_ADAPTER_HARDWARE_ERROR
-# define STATUS_ADAPTER_HARDWARE_ERROR ((NTSTATUS) 0xC00000C2L)
-#endif
-
-#ifndef STATUS_INVALID_NETWORK_RESPONSE
-# define STATUS_INVALID_NETWORK_RESPONSE ((NTSTATUS) 0xC00000C3L)
-#endif
-
-#ifndef STATUS_UNEXPECTED_NETWORK_ERROR
-# define STATUS_UNEXPECTED_NETWORK_ERROR ((NTSTATUS) 0xC00000C4L)
-#endif
-
-#ifndef STATUS_BAD_REMOTE_ADAPTER
-# define STATUS_BAD_REMOTE_ADAPTER ((NTSTATUS) 0xC00000C5L)
-#endif
-
-#ifndef STATUS_PRINT_QUEUE_FULL
-# define STATUS_PRINT_QUEUE_FULL ((NTSTATUS) 0xC00000C6L)
-#endif
-
-#ifndef STATUS_NO_SPOOL_SPACE
-# define STATUS_NO_SPOOL_SPACE ((NTSTATUS) 0xC00000C7L)
-#endif
-
-#ifndef STATUS_PRINT_CANCELLED
-# define STATUS_PRINT_CANCELLED ((NTSTATUS) 0xC00000C8L)
-#endif
-
-#ifndef STATUS_NETWORK_NAME_DELETED
-# define STATUS_NETWORK_NAME_DELETED ((NTSTATUS) 0xC00000C9L)
-#endif
-
-#ifndef STATUS_NETWORK_ACCESS_DENIED
-# define STATUS_NETWORK_ACCESS_DENIED ((NTSTATUS) 0xC00000CAL)
-#endif
-
-#ifndef STATUS_BAD_DEVICE_TYPE
-# define STATUS_BAD_DEVICE_TYPE ((NTSTATUS) 0xC00000CBL)
-#endif
-
-#ifndef STATUS_BAD_NETWORK_NAME
-# define STATUS_BAD_NETWORK_NAME ((NTSTATUS) 0xC00000CCL)
-#endif
-
-#ifndef STATUS_TOO_MANY_NAMES
-# define STATUS_TOO_MANY_NAMES ((NTSTATUS) 0xC00000CDL)
-#endif
-
-#ifndef STATUS_TOO_MANY_SESSIONS
-# define STATUS_TOO_MANY_SESSIONS ((NTSTATUS) 0xC00000CEL)
-#endif
-
-#ifndef STATUS_SHARING_PAUSED
-# define STATUS_SHARING_PAUSED ((NTSTATUS) 0xC00000CFL)
-#endif
-
-#ifndef STATUS_REQUEST_NOT_ACCEPTED
-# define STATUS_REQUEST_NOT_ACCEPTED ((NTSTATUS) 0xC00000D0L)
-#endif
-
-#ifndef STATUS_REDIRECTOR_PAUSED
-# define STATUS_REDIRECTOR_PAUSED ((NTSTATUS) 0xC00000D1L)
-#endif
-
-#ifndef STATUS_NET_WRITE_FAULT
-# define STATUS_NET_WRITE_FAULT ((NTSTATUS) 0xC00000D2L)
-#endif
-
-#ifndef STATUS_PROFILING_AT_LIMIT
-# define STATUS_PROFILING_AT_LIMIT ((NTSTATUS) 0xC00000D3L)
-#endif
-
-#ifndef STATUS_NOT_SAME_DEVICE
-# define STATUS_NOT_SAME_DEVICE ((NTSTATUS) 0xC00000D4L)
-#endif
-
-#ifndef STATUS_FILE_RENAMED
-# define STATUS_FILE_RENAMED ((NTSTATUS) 0xC00000D5L)
-#endif
-
-#ifndef STATUS_VIRTUAL_CIRCUIT_CLOSED
-# define STATUS_VIRTUAL_CIRCUIT_CLOSED ((NTSTATUS) 0xC00000D6L)
-#endif
-
-#ifndef STATUS_NO_SECURITY_ON_OBJECT
-# define STATUS_NO_SECURITY_ON_OBJECT ((NTSTATUS) 0xC00000D7L)
-#endif
-
-#ifndef STATUS_CANT_WAIT
-# define STATUS_CANT_WAIT ((NTSTATUS) 0xC00000D8L)
-#endif
-
-#ifndef STATUS_PIPE_EMPTY
-# define STATUS_PIPE_EMPTY ((NTSTATUS) 0xC00000D9L)
-#endif
-
-#ifndef STATUS_CANT_ACCESS_DOMAIN_INFO
-# define STATUS_CANT_ACCESS_DOMAIN_INFO ((NTSTATUS) 0xC00000DAL)
-#endif
-
-#ifndef STATUS_CANT_TERMINATE_SELF
-# define STATUS_CANT_TERMINATE_SELF ((NTSTATUS) 0xC00000DBL)
-#endif
-
-#ifndef STATUS_INVALID_SERVER_STATE
-# define STATUS_INVALID_SERVER_STATE ((NTSTATUS) 0xC00000DCL)
-#endif
-
-#ifndef STATUS_INVALID_DOMAIN_STATE
-# define STATUS_INVALID_DOMAIN_STATE ((NTSTATUS) 0xC00000DDL)
-#endif
-
-#ifndef STATUS_INVALID_DOMAIN_ROLE
-# define STATUS_INVALID_DOMAIN_ROLE ((NTSTATUS) 0xC00000DEL)
-#endif
-
-#ifndef STATUS_NO_SUCH_DOMAIN
-# define STATUS_NO_SUCH_DOMAIN ((NTSTATUS) 0xC00000DFL)
-#endif
-
-#ifndef STATUS_DOMAIN_EXISTS
-# define STATUS_DOMAIN_EXISTS ((NTSTATUS) 0xC00000E0L)
-#endif
-
-#ifndef STATUS_DOMAIN_LIMIT_EXCEEDED
-# define STATUS_DOMAIN_LIMIT_EXCEEDED ((NTSTATUS) 0xC00000E1L)
-#endif
-
-#ifndef STATUS_OPLOCK_NOT_GRANTED
-# define STATUS_OPLOCK_NOT_GRANTED ((NTSTATUS) 0xC00000E2L)
-#endif
-
-#ifndef STATUS_INVALID_OPLOCK_PROTOCOL
-# define STATUS_INVALID_OPLOCK_PROTOCOL ((NTSTATUS) 0xC00000E3L)
-#endif
-
-#ifndef STATUS_INTERNAL_DB_CORRUPTION
-# define STATUS_INTERNAL_DB_CORRUPTION ((NTSTATUS) 0xC00000E4L)
-#endif
-
-#ifndef STATUS_INTERNAL_ERROR
-# define STATUS_INTERNAL_ERROR ((NTSTATUS) 0xC00000E5L)
-#endif
-
-#ifndef STATUS_GENERIC_NOT_MAPPED
-# define STATUS_GENERIC_NOT_MAPPED ((NTSTATUS) 0xC00000E6L)
-#endif
-
-#ifndef STATUS_BAD_DESCRIPTOR_FORMAT
-# define STATUS_BAD_DESCRIPTOR_FORMAT ((NTSTATUS) 0xC00000E7L)
-#endif
-
-#ifndef STATUS_INVALID_USER_BUFFER
-# define STATUS_INVALID_USER_BUFFER ((NTSTATUS) 0xC00000E8L)
-#endif
-
-#ifndef STATUS_UNEXPECTED_IO_ERROR
-# define STATUS_UNEXPECTED_IO_ERROR ((NTSTATUS) 0xC00000E9L)
-#endif
-
-#ifndef STATUS_UNEXPECTED_MM_CREATE_ERR
-# define STATUS_UNEXPECTED_MM_CREATE_ERR ((NTSTATUS) 0xC00000EAL)
-#endif
-
-#ifndef STATUS_UNEXPECTED_MM_MAP_ERROR
-# define STATUS_UNEXPECTED_MM_MAP_ERROR ((NTSTATUS) 0xC00000EBL)
-#endif
-
-#ifndef STATUS_UNEXPECTED_MM_EXTEND_ERR
-# define STATUS_UNEXPECTED_MM_EXTEND_ERR ((NTSTATUS) 0xC00000ECL)
-#endif
-
-#ifndef STATUS_NOT_LOGON_PROCESS
-# define STATUS_NOT_LOGON_PROCESS ((NTSTATUS) 0xC00000EDL)
-#endif
-
-#ifndef STATUS_LOGON_SESSION_EXISTS
-# define STATUS_LOGON_SESSION_EXISTS ((NTSTATUS) 0xC00000EEL)
-#endif
-
-#ifndef STATUS_INVALID_PARAMETER_1
-# define STATUS_INVALID_PARAMETER_1 ((NTSTATUS) 0xC00000EFL)
-#endif
-
-#ifndef STATUS_INVALID_PARAMETER_2
-# define STATUS_INVALID_PARAMETER_2 ((NTSTATUS) 0xC00000F0L)
-#endif
-
-#ifndef STATUS_INVALID_PARAMETER_3
-# define STATUS_INVALID_PARAMETER_3 ((NTSTATUS) 0xC00000F1L)
-#endif
-
-#ifndef STATUS_INVALID_PARAMETER_4
-# define STATUS_INVALID_PARAMETER_4 ((NTSTATUS) 0xC00000F2L)
-#endif
-
-#ifndef STATUS_INVALID_PARAMETER_5
-# define STATUS_INVALID_PARAMETER_5 ((NTSTATUS) 0xC00000F3L)
-#endif
-
-#ifndef STATUS_INVALID_PARAMETER_6
-# define STATUS_INVALID_PARAMETER_6 ((NTSTATUS) 0xC00000F4L)
-#endif
-
-#ifndef STATUS_INVALID_PARAMETER_7
-# define STATUS_INVALID_PARAMETER_7 ((NTSTATUS) 0xC00000F5L)
-#endif
-
-#ifndef STATUS_INVALID_PARAMETER_8
-# define STATUS_INVALID_PARAMETER_8 ((NTSTATUS) 0xC00000F6L)
-#endif
-
-#ifndef STATUS_INVALID_PARAMETER_9
-# define STATUS_INVALID_PARAMETER_9 ((NTSTATUS) 0xC00000F7L)
-#endif
-
-#ifndef STATUS_INVALID_PARAMETER_10
-# define STATUS_INVALID_PARAMETER_10 ((NTSTATUS) 0xC00000F8L)
-#endif
-
-#ifndef STATUS_INVALID_PARAMETER_11
-# define STATUS_INVALID_PARAMETER_11 ((NTSTATUS) 0xC00000F9L)
-#endif
-
-#ifndef STATUS_INVALID_PARAMETER_12
-# define STATUS_INVALID_PARAMETER_12 ((NTSTATUS) 0xC00000FAL)
-#endif
-
-#ifndef STATUS_REDIRECTOR_NOT_STARTED
-# define STATUS_REDIRECTOR_NOT_STARTED ((NTSTATUS) 0xC00000FBL)
-#endif
-
-#ifndef STATUS_REDIRECTOR_STARTED
-# define STATUS_REDIRECTOR_STARTED ((NTSTATUS) 0xC00000FCL)
-#endif
-
-#ifndef STATUS_STACK_OVERFLOW
-# define STATUS_STACK_OVERFLOW ((NTSTATUS) 0xC00000FDL)
-#endif
-
-#ifndef STATUS_NO_SUCH_PACKAGE
-# define STATUS_NO_SUCH_PACKAGE ((NTSTATUS) 0xC00000FEL)
-#endif
-
-#ifndef STATUS_BAD_FUNCTION_TABLE
-# define STATUS_BAD_FUNCTION_TABLE ((NTSTATUS) 0xC00000FFL)
-#endif
-
-#ifndef STATUS_VARIABLE_NOT_FOUND
-# define STATUS_VARIABLE_NOT_FOUND ((NTSTATUS) 0xC0000100L)
-#endif
-
-#ifndef STATUS_DIRECTORY_NOT_EMPTY
-# define STATUS_DIRECTORY_NOT_EMPTY ((NTSTATUS) 0xC0000101L)
-#endif
-
-#ifndef STATUS_FILE_CORRUPT_ERROR
-# define STATUS_FILE_CORRUPT_ERROR ((NTSTATUS) 0xC0000102L)
-#endif
-
-#ifndef STATUS_NOT_A_DIRECTORY
-# define STATUS_NOT_A_DIRECTORY ((NTSTATUS) 0xC0000103L)
-#endif
-
-#ifndef STATUS_BAD_LOGON_SESSION_STATE
-# define STATUS_BAD_LOGON_SESSION_STATE ((NTSTATUS) 0xC0000104L)
-#endif
-
-#ifndef STATUS_LOGON_SESSION_COLLISION
-# define STATUS_LOGON_SESSION_COLLISION ((NTSTATUS) 0xC0000105L)
-#endif
-
-#ifndef STATUS_NAME_TOO_LONG
-# define STATUS_NAME_TOO_LONG ((NTSTATUS) 0xC0000106L)
-#endif
-
-#ifndef STATUS_FILES_OPEN
-# define STATUS_FILES_OPEN ((NTSTATUS) 0xC0000107L)
-#endif
-
-#ifndef STATUS_CONNECTION_IN_USE
-# define STATUS_CONNECTION_IN_USE ((NTSTATUS) 0xC0000108L)
-#endif
-
-#ifndef STATUS_MESSAGE_NOT_FOUND
-# define STATUS_MESSAGE_NOT_FOUND ((NTSTATUS) 0xC0000109L)
-#endif
-
-#ifndef STATUS_PROCESS_IS_TERMINATING
-# define STATUS_PROCESS_IS_TERMINATING ((NTSTATUS) 0xC000010AL)
-#endif
-
-#ifndef STATUS_INVALID_LOGON_TYPE
-# define STATUS_INVALID_LOGON_TYPE ((NTSTATUS) 0xC000010BL)
-#endif
-
-#ifndef STATUS_NO_GUID_TRANSLATION
-# define STATUS_NO_GUID_TRANSLATION ((NTSTATUS) 0xC000010CL)
-#endif
-
-#ifndef STATUS_CANNOT_IMPERSONATE
-# define STATUS_CANNOT_IMPERSONATE ((NTSTATUS) 0xC000010DL)
-#endif
-
-#ifndef STATUS_IMAGE_ALREADY_LOADED
-# define STATUS_IMAGE_ALREADY_LOADED ((NTSTATUS) 0xC000010EL)
-#endif
-
-#ifndef STATUS_ABIOS_NOT_PRESENT
-# define STATUS_ABIOS_NOT_PRESENT ((NTSTATUS) 0xC000010FL)
-#endif
-
-#ifndef STATUS_ABIOS_LID_NOT_EXIST
-# define STATUS_ABIOS_LID_NOT_EXIST ((NTSTATUS) 0xC0000110L)
-#endif
-
-#ifndef STATUS_ABIOS_LID_ALREADY_OWNED
-# define STATUS_ABIOS_LID_ALREADY_OWNED ((NTSTATUS) 0xC0000111L)
-#endif
-
-#ifndef STATUS_ABIOS_NOT_LID_OWNER
-# define STATUS_ABIOS_NOT_LID_OWNER ((NTSTATUS) 0xC0000112L)
-#endif
-
-#ifndef STATUS_ABIOS_INVALID_COMMAND
-# define STATUS_ABIOS_INVALID_COMMAND ((NTSTATUS) 0xC0000113L)
-#endif
-
-#ifndef STATUS_ABIOS_INVALID_LID
-# define STATUS_ABIOS_INVALID_LID ((NTSTATUS) 0xC0000114L)
-#endif
-
-#ifndef STATUS_ABIOS_SELECTOR_NOT_AVAILABLE
-# define STATUS_ABIOS_SELECTOR_NOT_AVAILABLE ((NTSTATUS) 0xC0000115L)
-#endif
-
-#ifndef STATUS_ABIOS_INVALID_SELECTOR
-# define STATUS_ABIOS_INVALID_SELECTOR ((NTSTATUS) 0xC0000116L)
-#endif
-
-#ifndef STATUS_NO_LDT
-# define STATUS_NO_LDT ((NTSTATUS) 0xC0000117L)
-#endif
-
-#ifndef STATUS_INVALID_LDT_SIZE
-# define STATUS_INVALID_LDT_SIZE ((NTSTATUS) 0xC0000118L)
-#endif
-
-#ifndef STATUS_INVALID_LDT_OFFSET
-# define STATUS_INVALID_LDT_OFFSET ((NTSTATUS) 0xC0000119L)
-#endif
-
-#ifndef STATUS_INVALID_LDT_DESCRIPTOR
-# define STATUS_INVALID_LDT_DESCRIPTOR ((NTSTATUS) 0xC000011AL)
-#endif
-
-#ifndef STATUS_INVALID_IMAGE_NE_FORMAT
-# define STATUS_INVALID_IMAGE_NE_FORMAT ((NTSTATUS) 0xC000011BL)
-#endif
-
-#ifndef STATUS_RXACT_INVALID_STATE
-# define STATUS_RXACT_INVALID_STATE ((NTSTATUS) 0xC000011CL)
-#endif
-
-#ifndef STATUS_RXACT_COMMIT_FAILURE
-# define STATUS_RXACT_COMMIT_FAILURE ((NTSTATUS) 0xC000011DL)
-#endif
-
-#ifndef STATUS_MAPPED_FILE_SIZE_ZERO
-# define STATUS_MAPPED_FILE_SIZE_ZERO ((NTSTATUS) 0xC000011EL)
-#endif
-
-#ifndef STATUS_TOO_MANY_OPENED_FILES
-# define STATUS_TOO_MANY_OPENED_FILES ((NTSTATUS) 0xC000011FL)
-#endif
-
-#ifndef STATUS_CANCELLED
-# define STATUS_CANCELLED ((NTSTATUS) 0xC0000120L)
-#endif
-
-#ifndef STATUS_CANNOT_DELETE
-# define STATUS_CANNOT_DELETE ((NTSTATUS) 0xC0000121L)
-#endif
-
-#ifndef STATUS_INVALID_COMPUTER_NAME
-# define STATUS_INVALID_COMPUTER_NAME ((NTSTATUS) 0xC0000122L)
-#endif
-
-#ifndef STATUS_FILE_DELETED
-# define STATUS_FILE_DELETED ((NTSTATUS) 0xC0000123L)
-#endif
-
-#ifndef STATUS_SPECIAL_ACCOUNT
-# define STATUS_SPECIAL_ACCOUNT ((NTSTATUS) 0xC0000124L)
-#endif
-
-#ifndef STATUS_SPECIAL_GROUP
-# define STATUS_SPECIAL_GROUP ((NTSTATUS) 0xC0000125L)
-#endif
-
-#ifndef STATUS_SPECIAL_USER
-# define STATUS_SPECIAL_USER ((NTSTATUS) 0xC0000126L)
-#endif
-
-#ifndef STATUS_MEMBERS_PRIMARY_GROUP
-# define STATUS_MEMBERS_PRIMARY_GROUP ((NTSTATUS) 0xC0000127L)
-#endif
-
-#ifndef STATUS_FILE_CLOSED
-# define STATUS_FILE_CLOSED ((NTSTATUS) 0xC0000128L)
-#endif
-
-#ifndef STATUS_TOO_MANY_THREADS
-# define STATUS_TOO_MANY_THREADS ((NTSTATUS) 0xC0000129L)
-#endif
-
-#ifndef STATUS_THREAD_NOT_IN_PROCESS
-# define STATUS_THREAD_NOT_IN_PROCESS ((NTSTATUS) 0xC000012AL)
-#endif
-
-#ifndef STATUS_TOKEN_ALREADY_IN_USE
-# define STATUS_TOKEN_ALREADY_IN_USE ((NTSTATUS) 0xC000012BL)
-#endif
-
-#ifndef STATUS_PAGEFILE_QUOTA_EXCEEDED
-# define STATUS_PAGEFILE_QUOTA_EXCEEDED ((NTSTATUS) 0xC000012CL)
-#endif
-
-#ifndef STATUS_COMMITMENT_LIMIT
-# define STATUS_COMMITMENT_LIMIT ((NTSTATUS) 0xC000012DL)
-#endif
-
-#ifndef STATUS_INVALID_IMAGE_LE_FORMAT
-# define STATUS_INVALID_IMAGE_LE_FORMAT ((NTSTATUS) 0xC000012EL)
-#endif
-
-#ifndef STATUS_INVALID_IMAGE_NOT_MZ
-# define STATUS_INVALID_IMAGE_NOT_MZ ((NTSTATUS) 0xC000012FL)
-#endif
-
-#ifndef STATUS_INVALID_IMAGE_PROTECT
-# define STATUS_INVALID_IMAGE_PROTECT ((NTSTATUS) 0xC0000130L)
-#endif
-
-#ifndef STATUS_INVALID_IMAGE_WIN_16
-# define STATUS_INVALID_IMAGE_WIN_16 ((NTSTATUS) 0xC0000131L)
-#endif
-
-#ifndef STATUS_LOGON_SERVER_CONFLICT
-# define STATUS_LOGON_SERVER_CONFLICT ((NTSTATUS) 0xC0000132L)
-#endif
-
-#ifndef STATUS_TIME_DIFFERENCE_AT_DC
-# define STATUS_TIME_DIFFERENCE_AT_DC ((NTSTATUS) 0xC0000133L)
-#endif
-
-#ifndef STATUS_SYNCHRONIZATION_REQUIRED
-# define STATUS_SYNCHRONIZATION_REQUIRED ((NTSTATUS) 0xC0000134L)
-#endif
-
-#ifndef STATUS_DLL_NOT_FOUND
-# define STATUS_DLL_NOT_FOUND ((NTSTATUS) 0xC0000135L)
-#endif
-
-#ifndef STATUS_OPEN_FAILED
-# define STATUS_OPEN_FAILED ((NTSTATUS) 0xC0000136L)
-#endif
-
-#ifndef STATUS_IO_PRIVILEGE_FAILED
-# define STATUS_IO_PRIVILEGE_FAILED ((NTSTATUS) 0xC0000137L)
-#endif
-
-#ifndef STATUS_ORDINAL_NOT_FOUND
-# define STATUS_ORDINAL_NOT_FOUND ((NTSTATUS) 0xC0000138L)
-#endif
-
-#ifndef STATUS_ENTRYPOINT_NOT_FOUND
-# define STATUS_ENTRYPOINT_NOT_FOUND ((NTSTATUS) 0xC0000139L)
-#endif
-
-#ifndef STATUS_CONTROL_C_EXIT
-# define STATUS_CONTROL_C_EXIT ((NTSTATUS) 0xC000013AL)
-#endif
-
-#ifndef STATUS_LOCAL_DISCONNECT
-# define STATUS_LOCAL_DISCONNECT ((NTSTATUS) 0xC000013BL)
-#endif
-
-#ifndef STATUS_REMOTE_DISCONNECT
-# define STATUS_REMOTE_DISCONNECT ((NTSTATUS) 0xC000013CL)
-#endif
-
-#ifndef STATUS_REMOTE_RESOURCES
-# define STATUS_REMOTE_RESOURCES ((NTSTATUS) 0xC000013DL)
-#endif
-
-#ifndef STATUS_LINK_FAILED
-# define STATUS_LINK_FAILED ((NTSTATUS) 0xC000013EL)
-#endif
-
-#ifndef STATUS_LINK_TIMEOUT
-# define STATUS_LINK_TIMEOUT ((NTSTATUS) 0xC000013FL)
-#endif
-
-#ifndef STATUS_INVALID_CONNECTION
-# define STATUS_INVALID_CONNECTION ((NTSTATUS) 0xC0000140L)
-#endif
-
-#ifndef STATUS_INVALID_ADDRESS
-# define STATUS_INVALID_ADDRESS ((NTSTATUS) 0xC0000141L)
-#endif
-
-#ifndef STATUS_DLL_INIT_FAILED
-# define STATUS_DLL_INIT_FAILED ((NTSTATUS) 0xC0000142L)
-#endif
-
-#ifndef STATUS_MISSING_SYSTEMFILE
-# define STATUS_MISSING_SYSTEMFILE ((NTSTATUS) 0xC0000143L)
-#endif
-
-#ifndef STATUS_UNHANDLED_EXCEPTION
-# define STATUS_UNHANDLED_EXCEPTION ((NTSTATUS) 0xC0000144L)
-#endif
-
-#ifndef STATUS_APP_INIT_FAILURE
-# define STATUS_APP_INIT_FAILURE ((NTSTATUS) 0xC0000145L)
-#endif
-
-#ifndef STATUS_PAGEFILE_CREATE_FAILED
-# define STATUS_PAGEFILE_CREATE_FAILED ((NTSTATUS) 0xC0000146L)
-#endif
-
-#ifndef STATUS_NO_PAGEFILE
-# define STATUS_NO_PAGEFILE ((NTSTATUS) 0xC0000147L)
-#endif
-
-#ifndef STATUS_INVALID_LEVEL
-# define STATUS_INVALID_LEVEL ((NTSTATUS) 0xC0000148L)
-#endif
-
-#ifndef STATUS_WRONG_PASSWORD_CORE
-# define STATUS_WRONG_PASSWORD_CORE ((NTSTATUS) 0xC0000149L)
-#endif
-
-#ifndef STATUS_ILLEGAL_FLOAT_CONTEXT
-# define STATUS_ILLEGAL_FLOAT_CONTEXT ((NTSTATUS) 0xC000014AL)
-#endif
-
-#ifndef STATUS_PIPE_BROKEN
-# define STATUS_PIPE_BROKEN ((NTSTATUS) 0xC000014BL)
-#endif
-
-#ifndef STATUS_REGISTRY_CORRUPT
-# define STATUS_REGISTRY_CORRUPT ((NTSTATUS) 0xC000014CL)
-#endif
-
-#ifndef STATUS_REGISTRY_IO_FAILED
-# define STATUS_REGISTRY_IO_FAILED ((NTSTATUS) 0xC000014DL)
-#endif
-
-#ifndef STATUS_NO_EVENT_PAIR
-# define STATUS_NO_EVENT_PAIR ((NTSTATUS) 0xC000014EL)
-#endif
-
-#ifndef STATUS_UNRECOGNIZED_VOLUME
-# define STATUS_UNRECOGNIZED_VOLUME ((NTSTATUS) 0xC000014FL)
-#endif
-
-#ifndef STATUS_SERIAL_NO_DEVICE_INITED
-# define STATUS_SERIAL_NO_DEVICE_INITED ((NTSTATUS) 0xC0000150L)
-#endif
-
-#ifndef STATUS_NO_SUCH_ALIAS
-# define STATUS_NO_SUCH_ALIAS ((NTSTATUS) 0xC0000151L)
-#endif
-
-#ifndef STATUS_MEMBER_NOT_IN_ALIAS
-# define STATUS_MEMBER_NOT_IN_ALIAS ((NTSTATUS) 0xC0000152L)
-#endif
-
-#ifndef STATUS_MEMBER_IN_ALIAS
-# define STATUS_MEMBER_IN_ALIAS ((NTSTATUS) 0xC0000153L)
-#endif
-
-#ifndef STATUS_ALIAS_EXISTS
-# define STATUS_ALIAS_EXISTS ((NTSTATUS) 0xC0000154L)
-#endif
-
-#ifndef STATUS_LOGON_NOT_GRANTED
-# define STATUS_LOGON_NOT_GRANTED ((NTSTATUS) 0xC0000155L)
-#endif
-
-#ifndef STATUS_TOO_MANY_SECRETS
-# define STATUS_TOO_MANY_SECRETS ((NTSTATUS) 0xC0000156L)
-#endif
-
-#ifndef STATUS_SECRET_TOO_LONG
-# define STATUS_SECRET_TOO_LONG ((NTSTATUS) 0xC0000157L)
-#endif
-
-#ifndef STATUS_INTERNAL_DB_ERROR
-# define STATUS_INTERNAL_DB_ERROR ((NTSTATUS) 0xC0000158L)
-#endif
-
-#ifndef STATUS_FULLSCREEN_MODE
-# define STATUS_FULLSCREEN_MODE ((NTSTATUS) 0xC0000159L)
-#endif
-
-#ifndef STATUS_TOO_MANY_CONTEXT_IDS
-# define STATUS_TOO_MANY_CONTEXT_IDS ((NTSTATUS) 0xC000015AL)
-#endif
-
-#ifndef STATUS_LOGON_TYPE_NOT_GRANTED
-# define STATUS_LOGON_TYPE_NOT_GRANTED ((NTSTATUS) 0xC000015BL)
-#endif
-
-#ifndef STATUS_NOT_REGISTRY_FILE
-# define STATUS_NOT_REGISTRY_FILE ((NTSTATUS) 0xC000015CL)
-#endif
-
-#ifndef STATUS_NT_CROSS_ENCRYPTION_REQUIRED
-# define STATUS_NT_CROSS_ENCRYPTION_REQUIRED ((NTSTATUS) 0xC000015DL)
-#endif
-
-#ifndef STATUS_DOMAIN_CTRLR_CONFIG_ERROR
-# define STATUS_DOMAIN_CTRLR_CONFIG_ERROR ((NTSTATUS) 0xC000015EL)
-#endif
-
-#ifndef STATUS_FT_MISSING_MEMBER
-# define STATUS_FT_MISSING_MEMBER ((NTSTATUS) 0xC000015FL)
-#endif
-
-#ifndef STATUS_ILL_FORMED_SERVICE_ENTRY
-# define STATUS_ILL_FORMED_SERVICE_ENTRY ((NTSTATUS) 0xC0000160L)
-#endif
-
-#ifndef STATUS_ILLEGAL_CHARACTER
-# define STATUS_ILLEGAL_CHARACTER ((NTSTATUS) 0xC0000161L)
-#endif
-
-#ifndef STATUS_UNMAPPABLE_CHARACTER
-# define STATUS_UNMAPPABLE_CHARACTER ((NTSTATUS) 0xC0000162L)
-#endif
-
-#ifndef STATUS_UNDEFINED_CHARACTER
-# define STATUS_UNDEFINED_CHARACTER ((NTSTATUS) 0xC0000163L)
-#endif
-
-#ifndef STATUS_FLOPPY_VOLUME
-# define STATUS_FLOPPY_VOLUME ((NTSTATUS) 0xC0000164L)
-#endif
-
-#ifndef STATUS_FLOPPY_ID_MARK_NOT_FOUND
-# define STATUS_FLOPPY_ID_MARK_NOT_FOUND ((NTSTATUS) 0xC0000165L)
-#endif
-
-#ifndef STATUS_FLOPPY_WRONG_CYLINDER
-# define STATUS_FLOPPY_WRONG_CYLINDER ((NTSTATUS) 0xC0000166L)
-#endif
-
-#ifndef STATUS_FLOPPY_UNKNOWN_ERROR
-# define STATUS_FLOPPY_UNKNOWN_ERROR ((NTSTATUS) 0xC0000167L)
-#endif
-
-#ifndef STATUS_FLOPPY_BAD_REGISTERS
-# define STATUS_FLOPPY_BAD_REGISTERS ((NTSTATUS) 0xC0000168L)
-#endif
-
-#ifndef STATUS_DISK_RECALIBRATE_FAILED
-# define STATUS_DISK_RECALIBRATE_FAILED ((NTSTATUS) 0xC0000169L)
-#endif
-
-#ifndef STATUS_DISK_OPERATION_FAILED
-# define STATUS_DISK_OPERATION_FAILED ((NTSTATUS) 0xC000016AL)
-#endif
-
-#ifndef STATUS_DISK_RESET_FAILED
-# define STATUS_DISK_RESET_FAILED ((NTSTATUS) 0xC000016BL)
-#endif
-
-#ifndef STATUS_SHARED_IRQ_BUSY
-# define STATUS_SHARED_IRQ_BUSY ((NTSTATUS) 0xC000016CL)
-#endif
-
-#ifndef STATUS_FT_ORPHANING
-# define STATUS_FT_ORPHANING ((NTSTATUS) 0xC000016DL)
-#endif
-
-#ifndef STATUS_BIOS_FAILED_TO_CONNECT_INTERRUPT
-# define STATUS_BIOS_FAILED_TO_CONNECT_INTERRUPT ((NTSTATUS) 0xC000016EL)
-#endif
-
-#ifndef STATUS_PARTITION_FAILURE
-# define STATUS_PARTITION_FAILURE ((NTSTATUS) 0xC0000172L)
-#endif
-
-#ifndef STATUS_INVALID_BLOCK_LENGTH
-# define STATUS_INVALID_BLOCK_LENGTH ((NTSTATUS) 0xC0000173L)
-#endif
-
-#ifndef STATUS_DEVICE_NOT_PARTITIONED
-# define STATUS_DEVICE_NOT_PARTITIONED ((NTSTATUS) 0xC0000174L)
-#endif
-
-#ifndef STATUS_UNABLE_TO_LOCK_MEDIA
-# define STATUS_UNABLE_TO_LOCK_MEDIA ((NTSTATUS) 0xC0000175L)
-#endif
-
-#ifndef STATUS_UNABLE_TO_UNLOAD_MEDIA
-# define STATUS_UNABLE_TO_UNLOAD_MEDIA ((NTSTATUS) 0xC0000176L)
-#endif
-
-#ifndef STATUS_EOM_OVERFLOW
-# define STATUS_EOM_OVERFLOW ((NTSTATUS) 0xC0000177L)
-#endif
-
-#ifndef STATUS_NO_MEDIA
-# define STATUS_NO_MEDIA ((NTSTATUS) 0xC0000178L)
-#endif
-
-#ifndef STATUS_NO_SUCH_MEMBER
-# define STATUS_NO_SUCH_MEMBER ((NTSTATUS) 0xC000017AL)
-#endif
-
-#ifndef STATUS_INVALID_MEMBER
-# define STATUS_INVALID_MEMBER ((NTSTATUS) 0xC000017BL)
-#endif
-
-#ifndef STATUS_KEY_DELETED
-# define STATUS_KEY_DELETED ((NTSTATUS) 0xC000017CL)
-#endif
-
-#ifndef STATUS_NO_LOG_SPACE
-# define STATUS_NO_LOG_SPACE ((NTSTATUS) 0xC000017DL)
-#endif
-
-#ifndef STATUS_TOO_MANY_SIDS
-# define STATUS_TOO_MANY_SIDS ((NTSTATUS) 0xC000017EL)
-#endif
-
-#ifndef STATUS_LM_CROSS_ENCRYPTION_REQUIRED
-# define STATUS_LM_CROSS_ENCRYPTION_REQUIRED ((NTSTATUS) 0xC000017FL)
-#endif
-
-#ifndef STATUS_KEY_HAS_CHILDREN
-# define STATUS_KEY_HAS_CHILDREN ((NTSTATUS) 0xC0000180L)
-#endif
-
-#ifndef STATUS_CHILD_MUST_BE_VOLATILE
-# define STATUS_CHILD_MUST_BE_VOLATILE ((NTSTATUS) 0xC0000181L)
-#endif
-
-#ifndef STATUS_DEVICE_CONFIGURATION_ERROR
-# define STATUS_DEVICE_CONFIGURATION_ERROR ((NTSTATUS) 0xC0000182L)
-#endif
-
-#ifndef STATUS_DRIVER_INTERNAL_ERROR
-# define STATUS_DRIVER_INTERNAL_ERROR ((NTSTATUS) 0xC0000183L)
-#endif
-
-#ifndef STATUS_INVALID_DEVICE_STATE
-# define STATUS_INVALID_DEVICE_STATE ((NTSTATUS) 0xC0000184L)
-#endif
-
-#ifndef STATUS_IO_DEVICE_ERROR
-# define STATUS_IO_DEVICE_ERROR ((NTSTATUS) 0xC0000185L)
-#endif
-
-#ifndef STATUS_DEVICE_PROTOCOL_ERROR
-# define STATUS_DEVICE_PROTOCOL_ERROR ((NTSTATUS) 0xC0000186L)
-#endif
-
-#ifndef STATUS_BACKUP_CONTROLLER
-# define STATUS_BACKUP_CONTROLLER ((NTSTATUS) 0xC0000187L)
-#endif
-
-#ifndef STATUS_LOG_FILE_FULL
-# define STATUS_LOG_FILE_FULL ((NTSTATUS) 0xC0000188L)
-#endif
-
-#ifndef STATUS_TOO_LATE
-# define STATUS_TOO_LATE ((NTSTATUS) 0xC0000189L)
-#endif
-
-#ifndef STATUS_NO_TRUST_LSA_SECRET
-# define STATUS_NO_TRUST_LSA_SECRET ((NTSTATUS) 0xC000018AL)
-#endif
-
-#ifndef STATUS_NO_TRUST_SAM_ACCOUNT
-# define STATUS_NO_TRUST_SAM_ACCOUNT ((NTSTATUS) 0xC000018BL)
-#endif
-
-#ifndef STATUS_TRUSTED_DOMAIN_FAILURE
-# define STATUS_TRUSTED_DOMAIN_FAILURE ((NTSTATUS) 0xC000018CL)
-#endif
-
-#ifndef STATUS_TRUSTED_RELATIONSHIP_FAILURE
-# define STATUS_TRUSTED_RELATIONSHIP_FAILURE ((NTSTATUS) 0xC000018DL)
-#endif
-
-#ifndef STATUS_EVENTLOG_FILE_CORRUPT
-# define STATUS_EVENTLOG_FILE_CORRUPT ((NTSTATUS) 0xC000018EL)
-#endif
-
-#ifndef STATUS_EVENTLOG_CANT_START
-# define STATUS_EVENTLOG_CANT_START ((NTSTATUS) 0xC000018FL)
-#endif
-
-#ifndef STATUS_TRUST_FAILURE
-# define STATUS_TRUST_FAILURE ((NTSTATUS) 0xC0000190L)
-#endif
-
-#ifndef STATUS_MUTANT_LIMIT_EXCEEDED
-# define STATUS_MUTANT_LIMIT_EXCEEDED ((NTSTATUS) 0xC0000191L)
-#endif
-
-#ifndef STATUS_NETLOGON_NOT_STARTED
-# define STATUS_NETLOGON_NOT_STARTED ((NTSTATUS) 0xC0000192L)
-#endif
-
-#ifndef STATUS_ACCOUNT_EXPIRED
-# define STATUS_ACCOUNT_EXPIRED ((NTSTATUS) 0xC0000193L)
-#endif
-
-#ifndef STATUS_POSSIBLE_DEADLOCK
-# define STATUS_POSSIBLE_DEADLOCK ((NTSTATUS) 0xC0000194L)
-#endif
-
-#ifndef STATUS_NETWORK_CREDENTIAL_CONFLICT
-# define STATUS_NETWORK_CREDENTIAL_CONFLICT ((NTSTATUS) 0xC0000195L)
-#endif
-
-#ifndef STATUS_REMOTE_SESSION_LIMIT
-# define STATUS_REMOTE_SESSION_LIMIT ((NTSTATUS) 0xC0000196L)
-#endif
-
-#ifndef STATUS_EVENTLOG_FILE_CHANGED
-# define STATUS_EVENTLOG_FILE_CHANGED ((NTSTATUS) 0xC0000197L)
-#endif
-
-#ifndef STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT
-# define STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT ((NTSTATUS) 0xC0000198L)
-#endif
-
-#ifndef STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT
-# define STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT ((NTSTATUS) 0xC0000199L)
-#endif
-
-#ifndef STATUS_NOLOGON_SERVER_TRUST_ACCOUNT
-# define STATUS_NOLOGON_SERVER_TRUST_ACCOUNT ((NTSTATUS) 0xC000019AL)
-#endif
-
-#ifndef STATUS_DOMAIN_TRUST_INCONSISTENT
-# define STATUS_DOMAIN_TRUST_INCONSISTENT ((NTSTATUS) 0xC000019BL)
-#endif
-
-#ifndef STATUS_FS_DRIVER_REQUIRED
-# define STATUS_FS_DRIVER_REQUIRED ((NTSTATUS) 0xC000019CL)
-#endif
-
-#ifndef STATUS_IMAGE_ALREADY_LOADED_AS_DLL
-# define STATUS_IMAGE_ALREADY_LOADED_AS_DLL ((NTSTATUS) 0xC000019DL)
-#endif
-
-#ifndef STATUS_INCOMPATIBLE_WITH_GLOBAL_SHORT_NAME_REGISTRY_SETTING
-# define STATUS_INCOMPATIBLE_WITH_GLOBAL_SHORT_NAME_REGISTRY_SETTING ((NTSTATUS) 0xC000019EL)
-#endif
-
-#ifndef STATUS_SHORT_NAMES_NOT_ENABLED_ON_VOLUME
-# define STATUS_SHORT_NAMES_NOT_ENABLED_ON_VOLUME ((NTSTATUS) 0xC000019FL)
-#endif
-
-#ifndef STATUS_SECURITY_STREAM_IS_INCONSISTENT
-# define STATUS_SECURITY_STREAM_IS_INCONSISTENT ((NTSTATUS) 0xC00001A0L)
-#endif
-
-#ifndef STATUS_INVALID_LOCK_RANGE
-# define STATUS_INVALID_LOCK_RANGE ((NTSTATUS) 0xC00001A1L)
-#endif
-
-#ifndef STATUS_INVALID_ACE_CONDITION
-# define STATUS_INVALID_ACE_CONDITION ((NTSTATUS) 0xC00001A2L)
-#endif
-
-#ifndef STATUS_IMAGE_SUBSYSTEM_NOT_PRESENT
-# define STATUS_IMAGE_SUBSYSTEM_NOT_PRESENT ((NTSTATUS) 0xC00001A3L)
-#endif
-
-#ifndef STATUS_NOTIFICATION_GUID_ALREADY_DEFINED
-# define STATUS_NOTIFICATION_GUID_ALREADY_DEFINED ((NTSTATUS) 0xC00001A4L)
-#endif
-
-#ifndef STATUS_NETWORK_OPEN_RESTRICTION
-# define STATUS_NETWORK_OPEN_RESTRICTION ((NTSTATUS) 0xC0000201L)
-#endif
-
-#ifndef STATUS_NO_USER_SESSION_KEY
-# define STATUS_NO_USER_SESSION_KEY ((NTSTATUS) 0xC0000202L)
-#endif
-
-#ifndef STATUS_USER_SESSION_DELETED
-# define STATUS_USER_SESSION_DELETED ((NTSTATUS) 0xC0000203L)
-#endif
-
-#ifndef STATUS_RESOURCE_LANG_NOT_FOUND
-# define STATUS_RESOURCE_LANG_NOT_FOUND ((NTSTATUS) 0xC0000204L)
-#endif
-
-#ifndef STATUS_INSUFF_SERVER_RESOURCES
-# define STATUS_INSUFF_SERVER_RESOURCES ((NTSTATUS) 0xC0000205L)
-#endif
-
-#ifndef STATUS_INVALID_BUFFER_SIZE
-# define STATUS_INVALID_BUFFER_SIZE ((NTSTATUS) 0xC0000206L)
-#endif
-
-#ifndef STATUS_INVALID_ADDRESS_COMPONENT
-# define STATUS_INVALID_ADDRESS_COMPONENT ((NTSTATUS) 0xC0000207L)
-#endif
-
-#ifndef STATUS_INVALID_ADDRESS_WILDCARD
-# define STATUS_INVALID_ADDRESS_WILDCARD ((NTSTATUS) 0xC0000208L)
-#endif
-
-#ifndef STATUS_TOO_MANY_ADDRESSES
-# define STATUS_TOO_MANY_ADDRESSES ((NTSTATUS) 0xC0000209L)
-#endif
-
-#ifndef STATUS_ADDRESS_ALREADY_EXISTS
-# define STATUS_ADDRESS_ALREADY_EXISTS ((NTSTATUS) 0xC000020AL)
-#endif
-
-#ifndef STATUS_ADDRESS_CLOSED
-# define STATUS_ADDRESS_CLOSED ((NTSTATUS) 0xC000020BL)
-#endif
-
-#ifndef STATUS_CONNECTION_DISCONNECTED
-# define STATUS_CONNECTION_DISCONNECTED ((NTSTATUS) 0xC000020CL)
-#endif
-
-#ifndef STATUS_CONNECTION_RESET
-# define STATUS_CONNECTION_RESET ((NTSTATUS) 0xC000020DL)
-#endif
-
-#ifndef STATUS_TOO_MANY_NODES
-# define STATUS_TOO_MANY_NODES ((NTSTATUS) 0xC000020EL)
-#endif
-
-#ifndef STATUS_TRANSACTION_ABORTED
-# define STATUS_TRANSACTION_ABORTED ((NTSTATUS) 0xC000020FL)
-#endif
-
-#ifndef STATUS_TRANSACTION_TIMED_OUT
-# define STATUS_TRANSACTION_TIMED_OUT ((NTSTATUS) 0xC0000210L)
-#endif
-
-#ifndef STATUS_TRANSACTION_NO_RELEASE
-# define STATUS_TRANSACTION_NO_RELEASE ((NTSTATUS) 0xC0000211L)
-#endif
-
-#ifndef STATUS_TRANSACTION_NO_MATCH
-# define STATUS_TRANSACTION_NO_MATCH ((NTSTATUS) 0xC0000212L)
-#endif
-
-#ifndef STATUS_TRANSACTION_RESPONDED
-# define STATUS_TRANSACTION_RESPONDED ((NTSTATUS) 0xC0000213L)
-#endif
-
-#ifndef STATUS_TRANSACTION_INVALID_ID
-# define STATUS_TRANSACTION_INVALID_ID ((NTSTATUS) 0xC0000214L)
-#endif
-
-#ifndef STATUS_TRANSACTION_INVALID_TYPE
-# define STATUS_TRANSACTION_INVALID_TYPE ((NTSTATUS) 0xC0000215L)
-#endif
-
-#ifndef STATUS_NOT_SERVER_SESSION
-# define STATUS_NOT_SERVER_SESSION ((NTSTATUS) 0xC0000216L)
-#endif
-
-#ifndef STATUS_NOT_CLIENT_SESSION
-# define STATUS_NOT_CLIENT_SESSION ((NTSTATUS) 0xC0000217L)
-#endif
-
-#ifndef STATUS_CANNOT_LOAD_REGISTRY_FILE
-# define STATUS_CANNOT_LOAD_REGISTRY_FILE ((NTSTATUS) 0xC0000218L)
-#endif
-
-#ifndef STATUS_DEBUG_ATTACH_FAILED
-# define STATUS_DEBUG_ATTACH_FAILED ((NTSTATUS) 0xC0000219L)
-#endif
-
-#ifndef STATUS_SYSTEM_PROCESS_TERMINATED
-# define STATUS_SYSTEM_PROCESS_TERMINATED ((NTSTATUS) 0xC000021AL)
-#endif
-
-#ifndef STATUS_DATA_NOT_ACCEPTED
-# define STATUS_DATA_NOT_ACCEPTED ((NTSTATUS) 0xC000021BL)
-#endif
-
-#ifndef STATUS_NO_BROWSER_SERVERS_FOUND
-# define STATUS_NO_BROWSER_SERVERS_FOUND ((NTSTATUS) 0xC000021CL)
-#endif
-
-#ifndef STATUS_VDM_HARD_ERROR
-# define STATUS_VDM_HARD_ERROR ((NTSTATUS) 0xC000021DL)
-#endif
-
-#ifndef STATUS_DRIVER_CANCEL_TIMEOUT
-# define STATUS_DRIVER_CANCEL_TIMEOUT ((NTSTATUS) 0xC000021EL)
-#endif
-
-#ifndef STATUS_REPLY_MESSAGE_MISMATCH
-# define STATUS_REPLY_MESSAGE_MISMATCH ((NTSTATUS) 0xC000021FL)
-#endif
-
-#ifndef STATUS_MAPPED_ALIGNMENT
-# define STATUS_MAPPED_ALIGNMENT ((NTSTATUS) 0xC0000220L)
-#endif
-
-#ifndef STATUS_IMAGE_CHECKSUM_MISMATCH
-# define STATUS_IMAGE_CHECKSUM_MISMATCH ((NTSTATUS) 0xC0000221L)
-#endif
-
-#ifndef STATUS_LOST_WRITEBEHIND_DATA
-# define STATUS_LOST_WRITEBEHIND_DATA ((NTSTATUS) 0xC0000222L)
-#endif
-
-#ifndef STATUS_CLIENT_SERVER_PARAMETERS_INVALID
-# define STATUS_CLIENT_SERVER_PARAMETERS_INVALID ((NTSTATUS) 0xC0000223L)
-#endif
-
-#ifndef STATUS_PASSWORD_MUST_CHANGE
-# define STATUS_PASSWORD_MUST_CHANGE ((NTSTATUS) 0xC0000224L)
-#endif
-
-#ifndef STATUS_NOT_FOUND
-# define STATUS_NOT_FOUND ((NTSTATUS) 0xC0000225L)
-#endif
-
-#ifndef STATUS_NOT_TINY_STREAM
-# define STATUS_NOT_TINY_STREAM ((NTSTATUS) 0xC0000226L)
-#endif
-
-#ifndef STATUS_RECOVERY_FAILURE
-# define STATUS_RECOVERY_FAILURE ((NTSTATUS) 0xC0000227L)
-#endif
-
-#ifndef STATUS_STACK_OVERFLOW_READ
-# define STATUS_STACK_OVERFLOW_READ ((NTSTATUS) 0xC0000228L)
-#endif
-
-#ifndef STATUS_FAIL_CHECK
-# define STATUS_FAIL_CHECK ((NTSTATUS) 0xC0000229L)
-#endif
-
-#ifndef STATUS_DUPLICATE_OBJECTID
-# define STATUS_DUPLICATE_OBJECTID ((NTSTATUS) 0xC000022AL)
-#endif
-
-#ifndef STATUS_OBJECTID_EXISTS
-# define STATUS_OBJECTID_EXISTS ((NTSTATUS) 0xC000022BL)
-#endif
-
-#ifndef STATUS_CONVERT_TO_LARGE
-# define STATUS_CONVERT_TO_LARGE ((NTSTATUS) 0xC000022CL)
-#endif
-
-#ifndef STATUS_RETRY
-# define STATUS_RETRY ((NTSTATUS) 0xC000022DL)
-#endif
-
-#ifndef STATUS_FOUND_OUT_OF_SCOPE
-# define STATUS_FOUND_OUT_OF_SCOPE ((NTSTATUS) 0xC000022EL)
-#endif
-
-#ifndef STATUS_ALLOCATE_BUCKET
-# define STATUS_ALLOCATE_BUCKET ((NTSTATUS) 0xC000022FL)
-#endif
-
-#ifndef STATUS_PROPSET_NOT_FOUND
-# define STATUS_PROPSET_NOT_FOUND ((NTSTATUS) 0xC0000230L)
-#endif
-
-#ifndef STATUS_MARSHALL_OVERFLOW
-# define STATUS_MARSHALL_OVERFLOW ((NTSTATUS) 0xC0000231L)
-#endif
-
-#ifndef STATUS_INVALID_VARIANT
-# define STATUS_INVALID_VARIANT ((NTSTATUS) 0xC0000232L)
-#endif
-
-#ifndef STATUS_DOMAIN_CONTROLLER_NOT_FOUND
-# define STATUS_DOMAIN_CONTROLLER_NOT_FOUND ((NTSTATUS) 0xC0000233L)
-#endif
-
-#ifndef STATUS_ACCOUNT_LOCKED_OUT
-# define STATUS_ACCOUNT_LOCKED_OUT ((NTSTATUS) 0xC0000234L)
-#endif
-
-#ifndef STATUS_HANDLE_NOT_CLOSABLE
-# define STATUS_HANDLE_NOT_CLOSABLE ((NTSTATUS) 0xC0000235L)
-#endif
-
-#ifndef STATUS_CONNECTION_REFUSED
-# define STATUS_CONNECTION_REFUSED ((NTSTATUS) 0xC0000236L)
-#endif
-
-#ifndef STATUS_GRACEFUL_DISCONNECT
-# define STATUS_GRACEFUL_DISCONNECT ((NTSTATUS) 0xC0000237L)
-#endif
-
-#ifndef STATUS_ADDRESS_ALREADY_ASSOCIATED
-# define STATUS_ADDRESS_ALREADY_ASSOCIATED ((NTSTATUS) 0xC0000238L)
-#endif
-
-#ifndef STATUS_ADDRESS_NOT_ASSOCIATED
-# define STATUS_ADDRESS_NOT_ASSOCIATED ((NTSTATUS) 0xC0000239L)
-#endif
-
-#ifndef STATUS_CONNECTION_INVALID
-# define STATUS_CONNECTION_INVALID ((NTSTATUS) 0xC000023AL)
-#endif
-
-#ifndef STATUS_CONNECTION_ACTIVE
-# define STATUS_CONNECTION_ACTIVE ((NTSTATUS) 0xC000023BL)
-#endif
-
-#ifndef STATUS_NETWORK_UNREACHABLE
-# define STATUS_NETWORK_UNREACHABLE ((NTSTATUS) 0xC000023CL)
-#endif
-
-#ifndef STATUS_HOST_UNREACHABLE
-# define STATUS_HOST_UNREACHABLE ((NTSTATUS) 0xC000023DL)
-#endif
-
-#ifndef STATUS_PROTOCOL_UNREACHABLE
-# define STATUS_PROTOCOL_UNREACHABLE ((NTSTATUS) 0xC000023EL)
-#endif
-
-#ifndef STATUS_PORT_UNREACHABLE
-# define STATUS_PORT_UNREACHABLE ((NTSTATUS) 0xC000023FL)
-#endif
-
-#ifndef STATUS_REQUEST_ABORTED
-# define STATUS_REQUEST_ABORTED ((NTSTATUS) 0xC0000240L)
-#endif
-
-#ifndef STATUS_CONNECTION_ABORTED
-# define STATUS_CONNECTION_ABORTED ((NTSTATUS) 0xC0000241L)
-#endif
-
-#ifndef STATUS_BAD_COMPRESSION_BUFFER
-# define STATUS_BAD_COMPRESSION_BUFFER ((NTSTATUS) 0xC0000242L)
-#endif
-
-#ifndef STATUS_USER_MAPPED_FILE
-# define STATUS_USER_MAPPED_FILE ((NTSTATUS) 0xC0000243L)
-#endif
-
-#ifndef STATUS_AUDIT_FAILED
-# define STATUS_AUDIT_FAILED ((NTSTATUS) 0xC0000244L)
-#endif
-
-#ifndef STATUS_TIMER_RESOLUTION_NOT_SET
-# define STATUS_TIMER_RESOLUTION_NOT_SET ((NTSTATUS) 0xC0000245L)
-#endif
-
-#ifndef STATUS_CONNECTION_COUNT_LIMIT
-# define STATUS_CONNECTION_COUNT_LIMIT ((NTSTATUS) 0xC0000246L)
-#endif
-
-#ifndef STATUS_LOGIN_TIME_RESTRICTION
-# define STATUS_LOGIN_TIME_RESTRICTION ((NTSTATUS) 0xC0000247L)
-#endif
-
-#ifndef STATUS_LOGIN_WKSTA_RESTRICTION
-# define STATUS_LOGIN_WKSTA_RESTRICTION ((NTSTATUS) 0xC0000248L)
-#endif
-
-#ifndef STATUS_IMAGE_MP_UP_MISMATCH
-# define STATUS_IMAGE_MP_UP_MISMATCH ((NTSTATUS) 0xC0000249L)
-#endif
-
-#ifndef STATUS_INSUFFICIENT_LOGON_INFO
-# define STATUS_INSUFFICIENT_LOGON_INFO ((NTSTATUS) 0xC0000250L)
-#endif
-
-#ifndef STATUS_BAD_DLL_ENTRYPOINT
-# define STATUS_BAD_DLL_ENTRYPOINT ((NTSTATUS) 0xC0000251L)
-#endif
-
-#ifndef STATUS_BAD_SERVICE_ENTRYPOINT
-# define STATUS_BAD_SERVICE_ENTRYPOINT ((NTSTATUS) 0xC0000252L)
-#endif
-
-#ifndef STATUS_LPC_REPLY_LOST
-# define STATUS_LPC_REPLY_LOST ((NTSTATUS) 0xC0000253L)
-#endif
-
-#ifndef STATUS_IP_ADDRESS_CONFLICT1
-# define STATUS_IP_ADDRESS_CONFLICT1 ((NTSTATUS) 0xC0000254L)
-#endif
-
-#ifndef STATUS_IP_ADDRESS_CONFLICT2
-# define STATUS_IP_ADDRESS_CONFLICT2 ((NTSTATUS) 0xC0000255L)
-#endif
-
-#ifndef STATUS_REGISTRY_QUOTA_LIMIT
-# define STATUS_REGISTRY_QUOTA_LIMIT ((NTSTATUS) 0xC0000256L)
-#endif
-
-#ifndef STATUS_PATH_NOT_COVERED
-# define STATUS_PATH_NOT_COVERED ((NTSTATUS) 0xC0000257L)
-#endif
-
-#ifndef STATUS_NO_CALLBACK_ACTIVE
-# define STATUS_NO_CALLBACK_ACTIVE ((NTSTATUS) 0xC0000258L)
-#endif
-
-#ifndef STATUS_LICENSE_QUOTA_EXCEEDED
-# define STATUS_LICENSE_QUOTA_EXCEEDED ((NTSTATUS) 0xC0000259L)
-#endif
-
-#ifndef STATUS_PWD_TOO_SHORT
-# define STATUS_PWD_TOO_SHORT ((NTSTATUS) 0xC000025AL)
-#endif
-
-#ifndef STATUS_PWD_TOO_RECENT
-# define STATUS_PWD_TOO_RECENT ((NTSTATUS) 0xC000025BL)
-#endif
-
-#ifndef STATUS_PWD_HISTORY_CONFLICT
-# define STATUS_PWD_HISTORY_CONFLICT ((NTSTATUS) 0xC000025CL)
-#endif
-
-#ifndef STATUS_PLUGPLAY_NO_DEVICE
-# define STATUS_PLUGPLAY_NO_DEVICE ((NTSTATUS) 0xC000025EL)
-#endif
-
-#ifndef STATUS_UNSUPPORTED_COMPRESSION
-# define STATUS_UNSUPPORTED_COMPRESSION ((NTSTATUS) 0xC000025FL)
-#endif
-
-#ifndef STATUS_INVALID_HW_PROFILE
-# define STATUS_INVALID_HW_PROFILE ((NTSTATUS) 0xC0000260L)
-#endif
-
-#ifndef STATUS_INVALID_PLUGPLAY_DEVICE_PATH
-# define STATUS_INVALID_PLUGPLAY_DEVICE_PATH ((NTSTATUS) 0xC0000261L)
-#endif
-
-#ifndef STATUS_DRIVER_ORDINAL_NOT_FOUND
-# define STATUS_DRIVER_ORDINAL_NOT_FOUND ((NTSTATUS) 0xC0000262L)
-#endif
-
-#ifndef STATUS_DRIVER_ENTRYPOINT_NOT_FOUND
-# define STATUS_DRIVER_ENTRYPOINT_NOT_FOUND ((NTSTATUS) 0xC0000263L)
-#endif
-
-#ifndef STATUS_RESOURCE_NOT_OWNED
-# define STATUS_RESOURCE_NOT_OWNED ((NTSTATUS) 0xC0000264L)
-#endif
-
-#ifndef STATUS_TOO_MANY_LINKS
-# define STATUS_TOO_MANY_LINKS ((NTSTATUS) 0xC0000265L)
-#endif
-
-#ifndef STATUS_QUOTA_LIST_INCONSISTENT
-# define STATUS_QUOTA_LIST_INCONSISTENT ((NTSTATUS) 0xC0000266L)
-#endif
-
-#ifndef STATUS_FILE_IS_OFFLINE
-# define STATUS_FILE_IS_OFFLINE ((NTSTATUS) 0xC0000267L)
-#endif
-
-#ifndef STATUS_EVALUATION_EXPIRATION
-# define STATUS_EVALUATION_EXPIRATION ((NTSTATUS) 0xC0000268L)
-#endif
-
-#ifndef STATUS_ILLEGAL_DLL_RELOCATION
-# define STATUS_ILLEGAL_DLL_RELOCATION ((NTSTATUS) 0xC0000269L)
-#endif
-
-#ifndef STATUS_LICENSE_VIOLATION
-# define STATUS_LICENSE_VIOLATION ((NTSTATUS) 0xC000026AL)
-#endif
-
-#ifndef STATUS_DLL_INIT_FAILED_LOGOFF
-# define STATUS_DLL_INIT_FAILED_LOGOFF ((NTSTATUS) 0xC000026BL)
-#endif
-
-#ifndef STATUS_DRIVER_UNABLE_TO_LOAD
-# define STATUS_DRIVER_UNABLE_TO_LOAD ((NTSTATUS) 0xC000026CL)
-#endif
-
-#ifndef STATUS_DFS_UNAVAILABLE
-# define STATUS_DFS_UNAVAILABLE ((NTSTATUS) 0xC000026DL)
-#endif
-
-#ifndef STATUS_VOLUME_DISMOUNTED
-# define STATUS_VOLUME_DISMOUNTED ((NTSTATUS) 0xC000026EL)
-#endif
-
-#ifndef STATUS_WX86_INTERNAL_ERROR
-# define STATUS_WX86_INTERNAL_ERROR ((NTSTATUS) 0xC000026FL)
-#endif
-
-#ifndef STATUS_WX86_FLOAT_STACK_CHECK
-# define STATUS_WX86_FLOAT_STACK_CHECK ((NTSTATUS) 0xC0000270L)
-#endif
-
-#ifndef STATUS_VALIDATE_CONTINUE
-# define STATUS_VALIDATE_CONTINUE ((NTSTATUS) 0xC0000271L)
-#endif
-
-#ifndef STATUS_NO_MATCH
-# define STATUS_NO_MATCH ((NTSTATUS) 0xC0000272L)
-#endif
-
-#ifndef STATUS_NO_MORE_MATCHES
-# define STATUS_NO_MORE_MATCHES ((NTSTATUS) 0xC0000273L)
-#endif
-
-#ifndef STATUS_NOT_A_REPARSE_POINT
-# define STATUS_NOT_A_REPARSE_POINT ((NTSTATUS) 0xC0000275L)
-#endif
-
-#ifndef STATUS_IO_REPARSE_TAG_INVALID
-# define STATUS_IO_REPARSE_TAG_INVALID ((NTSTATUS) 0xC0000276L)
-#endif
-
-#ifndef STATUS_IO_REPARSE_TAG_MISMATCH
-# define STATUS_IO_REPARSE_TAG_MISMATCH ((NTSTATUS) 0xC0000277L)
-#endif
-
-#ifndef STATUS_IO_REPARSE_DATA_INVALID
-# define STATUS_IO_REPARSE_DATA_INVALID ((NTSTATUS) 0xC0000278L)
-#endif
-
-#ifndef STATUS_IO_REPARSE_TAG_NOT_HANDLED
-# define STATUS_IO_REPARSE_TAG_NOT_HANDLED ((NTSTATUS) 0xC0000279L)
-#endif
-
-#ifndef STATUS_REPARSE_POINT_NOT_RESOLVED
-# define STATUS_REPARSE_POINT_NOT_RESOLVED ((NTSTATUS) 0xC0000280L)
-#endif
-
-#ifndef STATUS_DIRECTORY_IS_A_REPARSE_POINT
-# define STATUS_DIRECTORY_IS_A_REPARSE_POINT ((NTSTATUS) 0xC0000281L)
-#endif
-
-#ifndef STATUS_RANGE_LIST_CONFLICT
-# define STATUS_RANGE_LIST_CONFLICT ((NTSTATUS) 0xC0000282L)
-#endif
-
-#ifndef STATUS_SOURCE_ELEMENT_EMPTY
-# define STATUS_SOURCE_ELEMENT_EMPTY ((NTSTATUS) 0xC0000283L)
-#endif
-
-#ifndef STATUS_DESTINATION_ELEMENT_FULL
-# define STATUS_DESTINATION_ELEMENT_FULL ((NTSTATUS) 0xC0000284L)
-#endif
-
-#ifndef STATUS_ILLEGAL_ELEMENT_ADDRESS
-# define STATUS_ILLEGAL_ELEMENT_ADDRESS ((NTSTATUS) 0xC0000285L)
-#endif
-
-#ifndef STATUS_MAGAZINE_NOT_PRESENT
-# define STATUS_MAGAZINE_NOT_PRESENT ((NTSTATUS) 0xC0000286L)
-#endif
-
-#ifndef STATUS_REINITIALIZATION_NEEDED
-# define STATUS_REINITIALIZATION_NEEDED ((NTSTATUS) 0xC0000287L)
-#endif
-
-#ifndef STATUS_DEVICE_REQUIRES_CLEANING
-# define STATUS_DEVICE_REQUIRES_CLEANING ((NTSTATUS) 0x80000288L)
-#endif
-
-#ifndef STATUS_DEVICE_DOOR_OPEN
-# define STATUS_DEVICE_DOOR_OPEN ((NTSTATUS) 0x80000289L)
-#endif
-
-#ifndef STATUS_ENCRYPTION_FAILED
-# define STATUS_ENCRYPTION_FAILED ((NTSTATUS) 0xC000028AL)
-#endif
-
-#ifndef STATUS_DECRYPTION_FAILED
-# define STATUS_DECRYPTION_FAILED ((NTSTATUS) 0xC000028BL)
-#endif
-
-#ifndef STATUS_RANGE_NOT_FOUND
-# define STATUS_RANGE_NOT_FOUND ((NTSTATUS) 0xC000028CL)
-#endif
-
-#ifndef STATUS_NO_RECOVERY_POLICY
-# define STATUS_NO_RECOVERY_POLICY ((NTSTATUS) 0xC000028DL)
-#endif
-
-#ifndef STATUS_NO_EFS
-# define STATUS_NO_EFS ((NTSTATUS) 0xC000028EL)
-#endif
-
-#ifndef STATUS_WRONG_EFS
-# define STATUS_WRONG_EFS ((NTSTATUS) 0xC000028FL)
-#endif
-
-#ifndef STATUS_NO_USER_KEYS
-# define STATUS_NO_USER_KEYS ((NTSTATUS) 0xC0000290L)
-#endif
-
-#ifndef STATUS_FILE_NOT_ENCRYPTED
-# define STATUS_FILE_NOT_ENCRYPTED ((NTSTATUS) 0xC0000291L)
-#endif
-
-#ifndef STATUS_NOT_EXPORT_FORMAT
-# define STATUS_NOT_EXPORT_FORMAT ((NTSTATUS) 0xC0000292L)
-#endif
-
-#ifndef STATUS_FILE_ENCRYPTED
-# define STATUS_FILE_ENCRYPTED ((NTSTATUS) 0xC0000293L)
-#endif
-
-#ifndef STATUS_WAKE_SYSTEM
-# define STATUS_WAKE_SYSTEM ((NTSTATUS) 0x40000294L)
-#endif
-
-#ifndef STATUS_WMI_GUID_NOT_FOUND
-# define STATUS_WMI_GUID_NOT_FOUND ((NTSTATUS) 0xC0000295L)
-#endif
-
-#ifndef STATUS_WMI_INSTANCE_NOT_FOUND
-# define STATUS_WMI_INSTANCE_NOT_FOUND ((NTSTATUS) 0xC0000296L)
-#endif
-
-#ifndef STATUS_WMI_ITEMID_NOT_FOUND
-# define STATUS_WMI_ITEMID_NOT_FOUND ((NTSTATUS) 0xC0000297L)
-#endif
-
-#ifndef STATUS_WMI_TRY_AGAIN
-# define STATUS_WMI_TRY_AGAIN ((NTSTATUS) 0xC0000298L)
-#endif
-
-#ifndef STATUS_SHARED_POLICY
-# define STATUS_SHARED_POLICY ((NTSTATUS) 0xC0000299L)
-#endif
-
-#ifndef STATUS_POLICY_OBJECT_NOT_FOUND
-# define STATUS_POLICY_OBJECT_NOT_FOUND ((NTSTATUS) 0xC000029AL)
-#endif
-
-#ifndef STATUS_POLICY_ONLY_IN_DS
-# define STATUS_POLICY_ONLY_IN_DS ((NTSTATUS) 0xC000029BL)
-#endif
-
-#ifndef STATUS_VOLUME_NOT_UPGRADED
-# define STATUS_VOLUME_NOT_UPGRADED ((NTSTATUS) 0xC000029CL)
-#endif
-
-#ifndef STATUS_REMOTE_STORAGE_NOT_ACTIVE
-# define STATUS_REMOTE_STORAGE_NOT_ACTIVE ((NTSTATUS) 0xC000029DL)
-#endif
-
-#ifndef STATUS_REMOTE_STORAGE_MEDIA_ERROR
-# define STATUS_REMOTE_STORAGE_MEDIA_ERROR ((NTSTATUS) 0xC000029EL)
-#endif
-
-#ifndef STATUS_NO_TRACKING_SERVICE
-# define STATUS_NO_TRACKING_SERVICE ((NTSTATUS) 0xC000029FL)
-#endif
-
-#ifndef STATUS_SERVER_SID_MISMATCH
-# define STATUS_SERVER_SID_MISMATCH ((NTSTATUS) 0xC00002A0L)
-#endif
-
-#ifndef STATUS_DS_NO_ATTRIBUTE_OR_VALUE
-# define STATUS_DS_NO_ATTRIBUTE_OR_VALUE ((NTSTATUS) 0xC00002A1L)
-#endif
-
-#ifndef STATUS_DS_INVALID_ATTRIBUTE_SYNTAX
-# define STATUS_DS_INVALID_ATTRIBUTE_SYNTAX ((NTSTATUS) 0xC00002A2L)
-#endif
-
-#ifndef STATUS_DS_ATTRIBUTE_TYPE_UNDEFINED
-# define STATUS_DS_ATTRIBUTE_TYPE_UNDEFINED ((NTSTATUS) 0xC00002A3L)
-#endif
-
-#ifndef STATUS_DS_ATTRIBUTE_OR_VALUE_EXISTS
-# define STATUS_DS_ATTRIBUTE_OR_VALUE_EXISTS ((NTSTATUS) 0xC00002A4L)
-#endif
-
-#ifndef STATUS_DS_BUSY
-# define STATUS_DS_BUSY ((NTSTATUS) 0xC00002A5L)
-#endif
-
-#ifndef STATUS_DS_UNAVAILABLE
-# define STATUS_DS_UNAVAILABLE ((NTSTATUS) 0xC00002A6L)
-#endif
-
-#ifndef STATUS_DS_NO_RIDS_ALLOCATED
-# define STATUS_DS_NO_RIDS_ALLOCATED ((NTSTATUS) 0xC00002A7L)
-#endif
-
-#ifndef STATUS_DS_NO_MORE_RIDS
-# define STATUS_DS_NO_MORE_RIDS ((NTSTATUS) 0xC00002A8L)
-#endif
-
-#ifndef STATUS_DS_INCORRECT_ROLE_OWNER
-# define STATUS_DS_INCORRECT_ROLE_OWNER ((NTSTATUS) 0xC00002A9L)
-#endif
-
-#ifndef STATUS_DS_RIDMGR_INIT_ERROR
-# define STATUS_DS_RIDMGR_INIT_ERROR ((NTSTATUS) 0xC00002AAL)
-#endif
-
-#ifndef STATUS_DS_OBJ_CLASS_VIOLATION
-# define STATUS_DS_OBJ_CLASS_VIOLATION ((NTSTATUS) 0xC00002ABL)
-#endif
-
-#ifndef STATUS_DS_CANT_ON_NON_LEAF
-# define STATUS_DS_CANT_ON_NON_LEAF ((NTSTATUS) 0xC00002ACL)
-#endif
-
-#ifndef STATUS_DS_CANT_ON_RDN
-# define STATUS_DS_CANT_ON_RDN ((NTSTATUS) 0xC00002ADL)
-#endif
-
-#ifndef STATUS_DS_CANT_MOD_OBJ_CLASS
-# define STATUS_DS_CANT_MOD_OBJ_CLASS ((NTSTATUS) 0xC00002AEL)
-#endif
-
-#ifndef STATUS_DS_CROSS_DOM_MOVE_FAILED
-# define STATUS_DS_CROSS_DOM_MOVE_FAILED ((NTSTATUS) 0xC00002AFL)
-#endif
-
-#ifndef STATUS_DS_GC_NOT_AVAILABLE
-# define STATUS_DS_GC_NOT_AVAILABLE ((NTSTATUS) 0xC00002B0L)
-#endif
-
-#ifndef STATUS_DIRECTORY_SERVICE_REQUIRED
-# define STATUS_DIRECTORY_SERVICE_REQUIRED ((NTSTATUS) 0xC00002B1L)
-#endif
-
-#ifndef STATUS_REPARSE_ATTRIBUTE_CONFLICT
-# define STATUS_REPARSE_ATTRIBUTE_CONFLICT ((NTSTATUS) 0xC00002B2L)
-#endif
-
-#ifndef STATUS_CANT_ENABLE_DENY_ONLY
-# define STATUS_CANT_ENABLE_DENY_ONLY ((NTSTATUS) 0xC00002B3L)
-#endif
-
-#ifndef STATUS_FLOAT_MULTIPLE_FAULTS
-# define STATUS_FLOAT_MULTIPLE_FAULTS ((NTSTATUS) 0xC00002B4L)
-#endif
-
-#ifndef STATUS_FLOAT_MULTIPLE_TRAPS
-# define STATUS_FLOAT_MULTIPLE_TRAPS ((NTSTATUS) 0xC00002B5L)
-#endif
-
-#ifndef STATUS_DEVICE_REMOVED
-# define STATUS_DEVICE_REMOVED ((NTSTATUS) 0xC00002B6L)
-#endif
-
-#ifndef STATUS_JOURNAL_DELETE_IN_PROGRESS
-# define STATUS_JOURNAL_DELETE_IN_PROGRESS ((NTSTATUS) 0xC00002B7L)
-#endif
-
-#ifndef STATUS_JOURNAL_NOT_ACTIVE
-# define STATUS_JOURNAL_NOT_ACTIVE ((NTSTATUS) 0xC00002B8L)
-#endif
-
-#ifndef STATUS_NOINTERFACE
-# define STATUS_NOINTERFACE ((NTSTATUS) 0xC00002B9L)
-#endif
-
-#ifndef STATUS_DS_ADMIN_LIMIT_EXCEEDED
-# define STATUS_DS_ADMIN_LIMIT_EXCEEDED ((NTSTATUS) 0xC00002C1L)
-#endif
-
-#ifndef STATUS_DRIVER_FAILED_SLEEP
-# define STATUS_DRIVER_FAILED_SLEEP ((NTSTATUS) 0xC00002C2L)
-#endif
-
-#ifndef STATUS_MUTUAL_AUTHENTICATION_FAILED
-# define STATUS_MUTUAL_AUTHENTICATION_FAILED ((NTSTATUS) 0xC00002C3L)
-#endif
-
-#ifndef STATUS_CORRUPT_SYSTEM_FILE
-# define STATUS_CORRUPT_SYSTEM_FILE ((NTSTATUS) 0xC00002C4L)
-#endif
-
-#ifndef STATUS_DATATYPE_MISALIGNMENT_ERROR
-# define STATUS_DATATYPE_MISALIGNMENT_ERROR ((NTSTATUS) 0xC00002C5L)
-#endif
-
-#ifndef STATUS_WMI_READ_ONLY
-# define STATUS_WMI_READ_ONLY ((NTSTATUS) 0xC00002C6L)
-#endif
-
-#ifndef STATUS_WMI_SET_FAILURE
-# define STATUS_WMI_SET_FAILURE ((NTSTATUS) 0xC00002C7L)
-#endif
-
-#ifndef STATUS_COMMITMENT_MINIMUM
-# define STATUS_COMMITMENT_MINIMUM ((NTSTATUS) 0xC00002C8L)
-#endif
-
-#ifndef STATUS_REG_NAT_CONSUMPTION
-# define STATUS_REG_NAT_CONSUMPTION ((NTSTATUS) 0xC00002C9L)
-#endif
-
-#ifndef STATUS_TRANSPORT_FULL
-# define STATUS_TRANSPORT_FULL ((NTSTATUS) 0xC00002CAL)
-#endif
-
-#ifndef STATUS_DS_SAM_INIT_FAILURE
-# define STATUS_DS_SAM_INIT_FAILURE ((NTSTATUS) 0xC00002CBL)
-#endif
-
-#ifndef STATUS_ONLY_IF_CONNECTED
-# define STATUS_ONLY_IF_CONNECTED ((NTSTATUS) 0xC00002CCL)
-#endif
-
-#ifndef STATUS_DS_SENSITIVE_GROUP_VIOLATION
-# define STATUS_DS_SENSITIVE_GROUP_VIOLATION ((NTSTATUS) 0xC00002CDL)
-#endif
-
-#ifndef STATUS_PNP_RESTART_ENUMERATION
-# define STATUS_PNP_RESTART_ENUMERATION ((NTSTATUS) 0xC00002CEL)
-#endif
-
-#ifndef STATUS_JOURNAL_ENTRY_DELETED
-# define STATUS_JOURNAL_ENTRY_DELETED ((NTSTATUS) 0xC00002CFL)
-#endif
-
-#ifndef STATUS_DS_CANT_MOD_PRIMARYGROUPID
-# define STATUS_DS_CANT_MOD_PRIMARYGROUPID ((NTSTATUS) 0xC00002D0L)
-#endif
-
-#ifndef STATUS_SYSTEM_IMAGE_BAD_SIGNATURE
-# define STATUS_SYSTEM_IMAGE_BAD_SIGNATURE ((NTSTATUS) 0xC00002D1L)
-#endif
-
-#ifndef STATUS_PNP_REBOOT_REQUIRED
-# define STATUS_PNP_REBOOT_REQUIRED ((NTSTATUS) 0xC00002D2L)
-#endif
-
-#ifndef STATUS_POWER_STATE_INVALID
-# define STATUS_POWER_STATE_INVALID ((NTSTATUS) 0xC00002D3L)
-#endif
-
-#ifndef STATUS_DS_INVALID_GROUP_TYPE
-# define STATUS_DS_INVALID_GROUP_TYPE ((NTSTATUS) 0xC00002D4L)
-#endif
-
-#ifndef STATUS_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN
-# define STATUS_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN ((NTSTATUS) 0xC00002D5L)
-#endif
-
-#ifndef STATUS_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN
-# define STATUS_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN ((NTSTATUS) 0xC00002D6L)
-#endif
-
-#ifndef STATUS_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER
-# define STATUS_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER ((NTSTATUS) 0xC00002D7L)
-#endif
-
-#ifndef STATUS_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER
-# define STATUS_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER ((NTSTATUS) 0xC00002D8L)
-#endif
-
-#ifndef STATUS_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER
-# define STATUS_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER ((NTSTATUS) 0xC00002D9L)
-#endif
-
-#ifndef STATUS_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER
-# define STATUS_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER ((NTSTATUS) 0xC00002DAL)
-#endif
-
-#ifndef STATUS_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER
-# define STATUS_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER ((NTSTATUS) 0xC00002DBL)
-#endif
-
-#ifndef STATUS_DS_HAVE_PRIMARY_MEMBERS
-# define STATUS_DS_HAVE_PRIMARY_MEMBERS ((NTSTATUS) 0xC00002DCL)
-#endif
-
-#ifndef STATUS_WMI_NOT_SUPPORTED
-# define STATUS_WMI_NOT_SUPPORTED ((NTSTATUS) 0xC00002DDL)
-#endif
-
-#ifndef STATUS_INSUFFICIENT_POWER
-# define STATUS_INSUFFICIENT_POWER ((NTSTATUS) 0xC00002DEL)
-#endif
-
-#ifndef STATUS_SAM_NEED_BOOTKEY_PASSWORD
-# define STATUS_SAM_NEED_BOOTKEY_PASSWORD ((NTSTATUS) 0xC00002DFL)
-#endif
-
-#ifndef STATUS_SAM_NEED_BOOTKEY_FLOPPY
-# define STATUS_SAM_NEED_BOOTKEY_FLOPPY ((NTSTATUS) 0xC00002E0L)
-#endif
-
-#ifndef STATUS_DS_CANT_START
-# define STATUS_DS_CANT_START ((NTSTATUS) 0xC00002E1L)
-#endif
-
-#ifndef STATUS_DS_INIT_FAILURE
-# define STATUS_DS_INIT_FAILURE ((NTSTATUS) 0xC00002E2L)
-#endif
-
-#ifndef STATUS_SAM_INIT_FAILURE
-# define STATUS_SAM_INIT_FAILURE ((NTSTATUS) 0xC00002E3L)
-#endif
-
-#ifndef STATUS_DS_GC_REQUIRED
-# define STATUS_DS_GC_REQUIRED ((NTSTATUS) 0xC00002E4L)
-#endif
-
-#ifndef STATUS_DS_LOCAL_MEMBER_OF_LOCAL_ONLY
-# define STATUS_DS_LOCAL_MEMBER_OF_LOCAL_ONLY ((NTSTATUS) 0xC00002E5L)
-#endif
-
-#ifndef STATUS_DS_NO_FPO_IN_UNIVERSAL_GROUPS
-# define STATUS_DS_NO_FPO_IN_UNIVERSAL_GROUPS ((NTSTATUS) 0xC00002E6L)
-#endif
-
-#ifndef STATUS_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED
-# define STATUS_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED ((NTSTATUS) 0xC00002E7L)
-#endif
-
-#ifndef STATUS_MULTIPLE_FAULT_VIOLATION
-# define STATUS_MULTIPLE_FAULT_VIOLATION ((NTSTATUS) 0xC00002E8L)
-#endif
-
-#ifndef STATUS_CURRENT_DOMAIN_NOT_ALLOWED
-# define STATUS_CURRENT_DOMAIN_NOT_ALLOWED ((NTSTATUS) 0xC00002E9L)
-#endif
-
-#ifndef STATUS_CANNOT_MAKE
-# define STATUS_CANNOT_MAKE ((NTSTATUS) 0xC00002EAL)
-#endif
-
-#ifndef STATUS_SYSTEM_SHUTDOWN
-# define STATUS_SYSTEM_SHUTDOWN ((NTSTATUS) 0xC00002EBL)
-#endif
-
-#ifndef STATUS_DS_INIT_FAILURE_CONSOLE
-# define STATUS_DS_INIT_FAILURE_CONSOLE ((NTSTATUS) 0xC00002ECL)
-#endif
-
-#ifndef STATUS_DS_SAM_INIT_FAILURE_CONSOLE
-# define STATUS_DS_SAM_INIT_FAILURE_CONSOLE ((NTSTATUS) 0xC00002EDL)
-#endif
-
-#ifndef STATUS_UNFINISHED_CONTEXT_DELETED
-# define STATUS_UNFINISHED_CONTEXT_DELETED ((NTSTATUS) 0xC00002EEL)
-#endif
-
-#ifndef STATUS_NO_TGT_REPLY
-# define STATUS_NO_TGT_REPLY ((NTSTATUS) 0xC00002EFL)
-#endif
-
-#ifndef STATUS_OBJECTID_NOT_FOUND
-# define STATUS_OBJECTID_NOT_FOUND ((NTSTATUS) 0xC00002F0L)
-#endif
-
-#ifndef STATUS_NO_IP_ADDRESSES
-# define STATUS_NO_IP_ADDRESSES ((NTSTATUS) 0xC00002F1L)
-#endif
-
-#ifndef STATUS_WRONG_CREDENTIAL_HANDLE
-# define STATUS_WRONG_CREDENTIAL_HANDLE ((NTSTATUS) 0xC00002F2L)
-#endif
-
-#ifndef STATUS_CRYPTO_SYSTEM_INVALID
-# define STATUS_CRYPTO_SYSTEM_INVALID ((NTSTATUS) 0xC00002F3L)
-#endif
-
-#ifndef STATUS_MAX_REFERRALS_EXCEEDED
-# define STATUS_MAX_REFERRALS_EXCEEDED ((NTSTATUS) 0xC00002F4L)
-#endif
-
-#ifndef STATUS_MUST_BE_KDC
-# define STATUS_MUST_BE_KDC ((NTSTATUS) 0xC00002F5L)
-#endif
-
-#ifndef STATUS_STRONG_CRYPTO_NOT_SUPPORTED
-# define STATUS_STRONG_CRYPTO_NOT_SUPPORTED ((NTSTATUS) 0xC00002F6L)
-#endif
-
-#ifndef STATUS_TOO_MANY_PRINCIPALS
-# define STATUS_TOO_MANY_PRINCIPALS ((NTSTATUS) 0xC00002F7L)
-#endif
-
-#ifndef STATUS_NO_PA_DATA
-# define STATUS_NO_PA_DATA ((NTSTATUS) 0xC00002F8L)
-#endif
-
-#ifndef STATUS_PKINIT_NAME_MISMATCH
-# define STATUS_PKINIT_NAME_MISMATCH ((NTSTATUS) 0xC00002F9L)
-#endif
-
-#ifndef STATUS_SMARTCARD_LOGON_REQUIRED
-# define STATUS_SMARTCARD_LOGON_REQUIRED ((NTSTATUS) 0xC00002FAL)
-#endif
-
-#ifndef STATUS_KDC_INVALID_REQUEST
-# define STATUS_KDC_INVALID_REQUEST ((NTSTATUS) 0xC00002FBL)
-#endif
-
-#ifndef STATUS_KDC_UNABLE_TO_REFER
-# define STATUS_KDC_UNABLE_TO_REFER ((NTSTATUS) 0xC00002FCL)
-#endif
-
-#ifndef STATUS_KDC_UNKNOWN_ETYPE
-# define STATUS_KDC_UNKNOWN_ETYPE ((NTSTATUS) 0xC00002FDL)
-#endif
-
-#ifndef STATUS_SHUTDOWN_IN_PROGRESS
-# define STATUS_SHUTDOWN_IN_PROGRESS ((NTSTATUS) 0xC00002FEL)
-#endif
-
-#ifndef STATUS_SERVER_SHUTDOWN_IN_PROGRESS
-# define STATUS_SERVER_SHUTDOWN_IN_PROGRESS ((NTSTATUS) 0xC00002FFL)
-#endif
-
-#ifndef STATUS_NOT_SUPPORTED_ON_SBS
-# define STATUS_NOT_SUPPORTED_ON_SBS ((NTSTATUS) 0xC0000300L)
-#endif
-
-#ifndef STATUS_WMI_GUID_DISCONNECTED
-# define STATUS_WMI_GUID_DISCONNECTED ((NTSTATUS) 0xC0000301L)
-#endif
-
-#ifndef STATUS_WMI_ALREADY_DISABLED
-# define STATUS_WMI_ALREADY_DISABLED ((NTSTATUS) 0xC0000302L)
-#endif
-
-#ifndef STATUS_WMI_ALREADY_ENABLED
-# define STATUS_WMI_ALREADY_ENABLED ((NTSTATUS) 0xC0000303L)
-#endif
-
-#ifndef STATUS_MFT_TOO_FRAGMENTED
-# define STATUS_MFT_TOO_FRAGMENTED ((NTSTATUS) 0xC0000304L)
-#endif
-
-#ifndef STATUS_COPY_PROTECTION_FAILURE
-# define STATUS_COPY_PROTECTION_FAILURE ((NTSTATUS) 0xC0000305L)
-#endif
-
-#ifndef STATUS_CSS_AUTHENTICATION_FAILURE
-# define STATUS_CSS_AUTHENTICATION_FAILURE ((NTSTATUS) 0xC0000306L)
-#endif
-
-#ifndef STATUS_CSS_KEY_NOT_PRESENT
-# define STATUS_CSS_KEY_NOT_PRESENT ((NTSTATUS) 0xC0000307L)
-#endif
-
-#ifndef STATUS_CSS_KEY_NOT_ESTABLISHED
-# define STATUS_CSS_KEY_NOT_ESTABLISHED ((NTSTATUS) 0xC0000308L)
-#endif
-
-#ifndef STATUS_CSS_SCRAMBLED_SECTOR
-# define STATUS_CSS_SCRAMBLED_SECTOR ((NTSTATUS) 0xC0000309L)
-#endif
-
-#ifndef STATUS_CSS_REGION_MISMATCH
-# define STATUS_CSS_REGION_MISMATCH ((NTSTATUS) 0xC000030AL)
-#endif
-
-#ifndef STATUS_CSS_RESETS_EXHAUSTED
-# define STATUS_CSS_RESETS_EXHAUSTED ((NTSTATUS) 0xC000030BL)
-#endif
-
-#ifndef STATUS_PKINIT_FAILURE
-# define STATUS_PKINIT_FAILURE ((NTSTATUS) 0xC0000320L)
-#endif
-
-#ifndef STATUS_SMARTCARD_SUBSYSTEM_FAILURE
-# define STATUS_SMARTCARD_SUBSYSTEM_FAILURE ((NTSTATUS) 0xC0000321L)
-#endif
-
-#ifndef STATUS_NO_KERB_KEY
-# define STATUS_NO_KERB_KEY ((NTSTATUS) 0xC0000322L)
-#endif
-
-#ifndef STATUS_HOST_DOWN
-# define STATUS_HOST_DOWN ((NTSTATUS) 0xC0000350L)
-#endif
-
-#ifndef STATUS_UNSUPPORTED_PREAUTH
-# define STATUS_UNSUPPORTED_PREAUTH ((NTSTATUS) 0xC0000351L)
-#endif
-
-#ifndef STATUS_EFS_ALG_BLOB_TOO_BIG
-# define STATUS_EFS_ALG_BLOB_TOO_BIG ((NTSTATUS) 0xC0000352L)
-#endif
-
-#ifndef STATUS_PORT_NOT_SET
-# define STATUS_PORT_NOT_SET ((NTSTATUS) 0xC0000353L)
-#endif
-
-#ifndef STATUS_DEBUGGER_INACTIVE
-# define STATUS_DEBUGGER_INACTIVE ((NTSTATUS) 0xC0000354L)
-#endif
-
-#ifndef STATUS_DS_VERSION_CHECK_FAILURE
-# define STATUS_DS_VERSION_CHECK_FAILURE ((NTSTATUS) 0xC0000355L)
-#endif
-
-#ifndef STATUS_AUDITING_DISABLED
-# define STATUS_AUDITING_DISABLED ((NTSTATUS) 0xC0000356L)
-#endif
-
-#ifndef STATUS_PRENT4_MACHINE_ACCOUNT
-# define STATUS_PRENT4_MACHINE_ACCOUNT ((NTSTATUS) 0xC0000357L)
-#endif
-
-#ifndef STATUS_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER
-# define STATUS_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER ((NTSTATUS) 0xC0000358L)
-#endif
-
-#ifndef STATUS_INVALID_IMAGE_WIN_32
-# define STATUS_INVALID_IMAGE_WIN_32 ((NTSTATUS) 0xC0000359L)
-#endif
-
-#ifndef STATUS_INVALID_IMAGE_WIN_64
-# define STATUS_INVALID_IMAGE_WIN_64 ((NTSTATUS) 0xC000035AL)
-#endif
-
-#ifndef STATUS_BAD_BINDINGS
-# define STATUS_BAD_BINDINGS ((NTSTATUS) 0xC000035BL)
-#endif
-
-#ifndef STATUS_NETWORK_SESSION_EXPIRED
-# define STATUS_NETWORK_SESSION_EXPIRED ((NTSTATUS) 0xC000035CL)
-#endif
-
-#ifndef STATUS_APPHELP_BLOCK
-# define STATUS_APPHELP_BLOCK ((NTSTATUS) 0xC000035DL)
-#endif
-
-#ifndef STATUS_ALL_SIDS_FILTERED
-# define STATUS_ALL_SIDS_FILTERED ((NTSTATUS) 0xC000035EL)
-#endif
-
-#ifndef STATUS_NOT_SAFE_MODE_DRIVER
-# define STATUS_NOT_SAFE_MODE_DRIVER ((NTSTATUS) 0xC000035FL)
-#endif
-
-#ifndef STATUS_ACCESS_DISABLED_BY_POLICY_DEFAULT
-# define STATUS_ACCESS_DISABLED_BY_POLICY_DEFAULT ((NTSTATUS) 0xC0000361L)
-#endif
-
-#ifndef STATUS_ACCESS_DISABLED_BY_POLICY_PATH
-# define STATUS_ACCESS_DISABLED_BY_POLICY_PATH ((NTSTATUS) 0xC0000362L)
-#endif
-
-#ifndef STATUS_ACCESS_DISABLED_BY_POLICY_PUBLISHER
-# define STATUS_ACCESS_DISABLED_BY_POLICY_PUBLISHER ((NTSTATUS) 0xC0000363L)
-#endif
-
-#ifndef STATUS_ACCESS_DISABLED_BY_POLICY_OTHER
-# define STATUS_ACCESS_DISABLED_BY_POLICY_OTHER ((NTSTATUS) 0xC0000364L)
-#endif
-
-#ifndef STATUS_FAILED_DRIVER_ENTRY
-# define STATUS_FAILED_DRIVER_ENTRY ((NTSTATUS) 0xC0000365L)
-#endif
-
-#ifndef STATUS_DEVICE_ENUMERATION_ERROR
-# define STATUS_DEVICE_ENUMERATION_ERROR ((NTSTATUS) 0xC0000366L)
-#endif
-
-#ifndef STATUS_MOUNT_POINT_NOT_RESOLVED
-# define STATUS_MOUNT_POINT_NOT_RESOLVED ((NTSTATUS) 0xC0000368L)
-#endif
-
-#ifndef STATUS_INVALID_DEVICE_OBJECT_PARAMETER
-# define STATUS_INVALID_DEVICE_OBJECT_PARAMETER ((NTSTATUS) 0xC0000369L)
-#endif
-
-#ifndef STATUS_MCA_OCCURED
-# define STATUS_MCA_OCCURED ((NTSTATUS) 0xC000036AL)
-#endif
-
-#ifndef STATUS_DRIVER_BLOCKED_CRITICAL
-# define STATUS_DRIVER_BLOCKED_CRITICAL ((NTSTATUS) 0xC000036BL)
-#endif
-
-#ifndef STATUS_DRIVER_BLOCKED
-# define STATUS_DRIVER_BLOCKED ((NTSTATUS) 0xC000036CL)
-#endif
-
-#ifndef STATUS_DRIVER_DATABASE_ERROR
-# define STATUS_DRIVER_DATABASE_ERROR ((NTSTATUS) 0xC000036DL)
-#endif
-
-#ifndef STATUS_SYSTEM_HIVE_TOO_LARGE
-# define STATUS_SYSTEM_HIVE_TOO_LARGE ((NTSTATUS) 0xC000036EL)
-#endif
-
-#ifndef STATUS_INVALID_IMPORT_OF_NON_DLL
-# define STATUS_INVALID_IMPORT_OF_NON_DLL ((NTSTATUS) 0xC000036FL)
-#endif
-
-#ifndef STATUS_DS_SHUTTING_DOWN
-# define STATUS_DS_SHUTTING_DOWN ((NTSTATUS) 0x40000370L)
-#endif
-
-#ifndef STATUS_NO_SECRETS
-# define STATUS_NO_SECRETS ((NTSTATUS) 0xC0000371L)
-#endif
-
-#ifndef STATUS_ACCESS_DISABLED_NO_SAFER_UI_BY_POLICY
-# define STATUS_ACCESS_DISABLED_NO_SAFER_UI_BY_POLICY ((NTSTATUS) 0xC0000372L)
-#endif
-
-#ifndef STATUS_FAILED_STACK_SWITCH
-# define STATUS_FAILED_STACK_SWITCH ((NTSTATUS) 0xC0000373L)
-#endif
-
-#ifndef STATUS_HEAP_CORRUPTION
-# define STATUS_HEAP_CORRUPTION ((NTSTATUS) 0xC0000374L)
-#endif
-
-#ifndef STATUS_SMARTCARD_WRONG_PIN
-# define STATUS_SMARTCARD_WRONG_PIN ((NTSTATUS) 0xC0000380L)
-#endif
-
-#ifndef STATUS_SMARTCARD_CARD_BLOCKED
-# define STATUS_SMARTCARD_CARD_BLOCKED ((NTSTATUS) 0xC0000381L)
-#endif
-
-#ifndef STATUS_SMARTCARD_CARD_NOT_AUTHENTICATED
-# define STATUS_SMARTCARD_CARD_NOT_AUTHENTICATED ((NTSTATUS) 0xC0000382L)
-#endif
-
-#ifndef STATUS_SMARTCARD_NO_CARD
-# define STATUS_SMARTCARD_NO_CARD ((NTSTATUS) 0xC0000383L)
-#endif
-
-#ifndef STATUS_SMARTCARD_NO_KEY_CONTAINER
-# define STATUS_SMARTCARD_NO_KEY_CONTAINER ((NTSTATUS) 0xC0000384L)
-#endif
-
-#ifndef STATUS_SMARTCARD_NO_CERTIFICATE
-# define STATUS_SMARTCARD_NO_CERTIFICATE ((NTSTATUS) 0xC0000385L)
-#endif
-
-#ifndef STATUS_SMARTCARD_NO_KEYSET
-# define STATUS_SMARTCARD_NO_KEYSET ((NTSTATUS) 0xC0000386L)
-#endif
-
-#ifndef STATUS_SMARTCARD_IO_ERROR
-# define STATUS_SMARTCARD_IO_ERROR ((NTSTATUS) 0xC0000387L)
-#endif
-
-#ifndef STATUS_DOWNGRADE_DETECTED
-# define STATUS_DOWNGRADE_DETECTED ((NTSTATUS) 0xC0000388L)
-#endif
-
-#ifndef STATUS_SMARTCARD_CERT_REVOKED
-# define STATUS_SMARTCARD_CERT_REVOKED ((NTSTATUS) 0xC0000389L)
-#endif
-
-#ifndef STATUS_ISSUING_CA_UNTRUSTED
-# define STATUS_ISSUING_CA_UNTRUSTED ((NTSTATUS) 0xC000038AL)
-#endif
-
-#ifndef STATUS_REVOCATION_OFFLINE_C
-# define STATUS_REVOCATION_OFFLINE_C ((NTSTATUS) 0xC000038BL)
-#endif
-
-#ifndef STATUS_PKINIT_CLIENT_FAILURE
-# define STATUS_PKINIT_CLIENT_FAILURE ((NTSTATUS) 0xC000038CL)
-#endif
-
-#ifndef STATUS_SMARTCARD_CERT_EXPIRED
-# define STATUS_SMARTCARD_CERT_EXPIRED ((NTSTATUS) 0xC000038DL)
-#endif
-
-#ifndef STATUS_DRIVER_FAILED_PRIOR_UNLOAD
-# define STATUS_DRIVER_FAILED_PRIOR_UNLOAD ((NTSTATUS) 0xC000038EL)
-#endif
-
-#ifndef STATUS_SMARTCARD_SILENT_CONTEXT
-# define STATUS_SMARTCARD_SILENT_CONTEXT ((NTSTATUS) 0xC000038FL)
-#endif
-
-#ifndef STATUS_PER_USER_TRUST_QUOTA_EXCEEDED
-# define STATUS_PER_USER_TRUST_QUOTA_EXCEEDED ((NTSTATUS) 0xC0000401L)
-#endif
-
-#ifndef STATUS_ALL_USER_TRUST_QUOTA_EXCEEDED
-# define STATUS_ALL_USER_TRUST_QUOTA_EXCEEDED ((NTSTATUS) 0xC0000402L)
-#endif
-
-#ifndef STATUS_USER_DELETE_TRUST_QUOTA_EXCEEDED
-# define STATUS_USER_DELETE_TRUST_QUOTA_EXCEEDED ((NTSTATUS) 0xC0000403L)
-#endif
-
-#ifndef STATUS_DS_NAME_NOT_UNIQUE
-# define STATUS_DS_NAME_NOT_UNIQUE ((NTSTATUS) 0xC0000404L)
-#endif
-
-#ifndef STATUS_DS_DUPLICATE_ID_FOUND
-# define STATUS_DS_DUPLICATE_ID_FOUND ((NTSTATUS) 0xC0000405L)
-#endif
-
-#ifndef STATUS_DS_GROUP_CONVERSION_ERROR
-# define STATUS_DS_GROUP_CONVERSION_ERROR ((NTSTATUS) 0xC0000406L)
-#endif
-
-#ifndef STATUS_VOLSNAP_PREPARE_HIBERNATE
-# define STATUS_VOLSNAP_PREPARE_HIBERNATE ((NTSTATUS) 0xC0000407L)
-#endif
-
-#ifndef STATUS_USER2USER_REQUIRED
-# define STATUS_USER2USER_REQUIRED ((NTSTATUS) 0xC0000408L)
-#endif
-
-#ifndef STATUS_STACK_BUFFER_OVERRUN
-# define STATUS_STACK_BUFFER_OVERRUN ((NTSTATUS) 0xC0000409L)
-#endif
-
-#ifndef STATUS_NO_S4U_PROT_SUPPORT
-# define STATUS_NO_S4U_PROT_SUPPORT ((NTSTATUS) 0xC000040AL)
-#endif
-
-#ifndef STATUS_CROSSREALM_DELEGATION_FAILURE
-# define STATUS_CROSSREALM_DELEGATION_FAILURE ((NTSTATUS) 0xC000040BL)
-#endif
-
-#ifndef STATUS_REVOCATION_OFFLINE_KDC
-# define STATUS_REVOCATION_OFFLINE_KDC ((NTSTATUS) 0xC000040CL)
-#endif
-
-#ifndef STATUS_ISSUING_CA_UNTRUSTED_KDC
-# define STATUS_ISSUING_CA_UNTRUSTED_KDC ((NTSTATUS) 0xC000040DL)
-#endif
-
-#ifndef STATUS_KDC_CERT_EXPIRED
-# define STATUS_KDC_CERT_EXPIRED ((NTSTATUS) 0xC000040EL)
-#endif
-
-#ifndef STATUS_KDC_CERT_REVOKED
-# define STATUS_KDC_CERT_REVOKED ((NTSTATUS) 0xC000040FL)
-#endif
-
-#ifndef STATUS_PARAMETER_QUOTA_EXCEEDED
-# define STATUS_PARAMETER_QUOTA_EXCEEDED ((NTSTATUS) 0xC0000410L)
-#endif
-
-#ifndef STATUS_HIBERNATION_FAILURE
-# define STATUS_HIBERNATION_FAILURE ((NTSTATUS) 0xC0000411L)
-#endif
-
-#ifndef STATUS_DELAY_LOAD_FAILED
-# define STATUS_DELAY_LOAD_FAILED ((NTSTATUS) 0xC0000412L)
-#endif
-
-#ifndef STATUS_AUTHENTICATION_FIREWALL_FAILED
-# define STATUS_AUTHENTICATION_FIREWALL_FAILED ((NTSTATUS) 0xC0000413L)
-#endif
-
-#ifndef STATUS_VDM_DISALLOWED
-# define STATUS_VDM_DISALLOWED ((NTSTATUS) 0xC0000414L)
-#endif
-
-#ifndef STATUS_HUNG_DISPLAY_DRIVER_THREAD
-# define STATUS_HUNG_DISPLAY_DRIVER_THREAD ((NTSTATUS) 0xC0000415L)
-#endif
-
-#ifndef STATUS_INSUFFICIENT_RESOURCE_FOR_SPECIFIED_SHARED_SECTION_SIZE
-# define STATUS_INSUFFICIENT_RESOURCE_FOR_SPECIFIED_SHARED_SECTION_SIZE ((NTSTATUS) 0xC0000416L)
-#endif
-
-#ifndef STATUS_INVALID_CRUNTIME_PARAMETER
-# define STATUS_INVALID_CRUNTIME_PARAMETER ((NTSTATUS) 0xC0000417L)
-#endif
-
-#ifndef STATUS_NTLM_BLOCKED
-# define STATUS_NTLM_BLOCKED ((NTSTATUS) 0xC0000418L)
-#endif
-
-#ifndef STATUS_DS_SRC_SID_EXISTS_IN_FOREST
-# define STATUS_DS_SRC_SID_EXISTS_IN_FOREST ((NTSTATUS) 0xC0000419L)
-#endif
-
-#ifndef STATUS_DS_DOMAIN_NAME_EXISTS_IN_FOREST
-# define STATUS_DS_DOMAIN_NAME_EXISTS_IN_FOREST ((NTSTATUS) 0xC000041AL)
-#endif
-
-#ifndef STATUS_DS_FLAT_NAME_EXISTS_IN_FOREST
-# define STATUS_DS_FLAT_NAME_EXISTS_IN_FOREST ((NTSTATUS) 0xC000041BL)
-#endif
-
-#ifndef STATUS_INVALID_USER_PRINCIPAL_NAME
-# define STATUS_INVALID_USER_PRINCIPAL_NAME ((NTSTATUS) 0xC000041CL)
-#endif
-
-#ifndef STATUS_FATAL_USER_CALLBACK_EXCEPTION
-# define STATUS_FATAL_USER_CALLBACK_EXCEPTION ((NTSTATUS) 0xC000041DL)
-#endif
-
-#ifndef STATUS_ASSERTION_FAILURE
-# define STATUS_ASSERTION_FAILURE ((NTSTATUS) 0xC0000420L)
-#endif
-
-#ifndef STATUS_VERIFIER_STOP
-# define STATUS_VERIFIER_STOP ((NTSTATUS) 0xC0000421L)
-#endif
-
-#ifndef STATUS_CALLBACK_POP_STACK
-# define STATUS_CALLBACK_POP_STACK ((NTSTATUS) 0xC0000423L)
-#endif
-
-#ifndef STATUS_INCOMPATIBLE_DRIVER_BLOCKED
-# define STATUS_INCOMPATIBLE_DRIVER_BLOCKED ((NTSTATUS) 0xC0000424L)
-#endif
-
-#ifndef STATUS_HIVE_UNLOADED
-# define STATUS_HIVE_UNLOADED ((NTSTATUS) 0xC0000425L)
-#endif
-
-#ifndef STATUS_COMPRESSION_DISABLED
-# define STATUS_COMPRESSION_DISABLED ((NTSTATUS) 0xC0000426L)
-#endif
-
-#ifndef STATUS_FILE_SYSTEM_LIMITATION
-# define STATUS_FILE_SYSTEM_LIMITATION ((NTSTATUS) 0xC0000427L)
-#endif
-
-#ifndef STATUS_INVALID_IMAGE_HASH
-# define STATUS_INVALID_IMAGE_HASH ((NTSTATUS) 0xC0000428L)
-#endif
-
-#ifndef STATUS_NOT_CAPABLE
-# define STATUS_NOT_CAPABLE ((NTSTATUS) 0xC0000429L)
-#endif
-
-#ifndef STATUS_REQUEST_OUT_OF_SEQUENCE
-# define STATUS_REQUEST_OUT_OF_SEQUENCE ((NTSTATUS) 0xC000042AL)
-#endif
-
-#ifndef STATUS_IMPLEMENTATION_LIMIT
-# define STATUS_IMPLEMENTATION_LIMIT ((NTSTATUS) 0xC000042BL)
-#endif
-
-#ifndef STATUS_ELEVATION_REQUIRED
-# define STATUS_ELEVATION_REQUIRED ((NTSTATUS) 0xC000042CL)
-#endif
-
-#ifndef STATUS_NO_SECURITY_CONTEXT
-# define STATUS_NO_SECURITY_CONTEXT ((NTSTATUS) 0xC000042DL)
-#endif
-
-#ifndef STATUS_PKU2U_CERT_FAILURE
-# define STATUS_PKU2U_CERT_FAILURE ((NTSTATUS) 0xC000042FL)
-#endif
-
-#ifndef STATUS_BEYOND_VDL
-# define STATUS_BEYOND_VDL ((NTSTATUS) 0xC0000432L)
-#endif
-
-#ifndef STATUS_ENCOUNTERED_WRITE_IN_PROGRESS
-# define STATUS_ENCOUNTERED_WRITE_IN_PROGRESS ((NTSTATUS) 0xC0000433L)
-#endif
-
-#ifndef STATUS_PTE_CHANGED
-# define STATUS_PTE_CHANGED ((NTSTATUS) 0xC0000434L)
-#endif
-
-#ifndef STATUS_PURGE_FAILED
-# define STATUS_PURGE_FAILED ((NTSTATUS) 0xC0000435L)
-#endif
-
-#ifndef STATUS_CRED_REQUIRES_CONFIRMATION
-# define STATUS_CRED_REQUIRES_CONFIRMATION ((NTSTATUS) 0xC0000440L)
-#endif
-
-#ifndef STATUS_CS_ENCRYPTION_INVALID_SERVER_RESPONSE
-# define STATUS_CS_ENCRYPTION_INVALID_SERVER_RESPONSE ((NTSTATUS) 0xC0000441L)
-#endif
-
-#ifndef STATUS_CS_ENCRYPTION_UNSUPPORTED_SERVER
-# define STATUS_CS_ENCRYPTION_UNSUPPORTED_SERVER ((NTSTATUS) 0xC0000442L)
-#endif
-
-#ifndef STATUS_CS_ENCRYPTION_EXISTING_ENCRYPTED_FILE
-# define STATUS_CS_ENCRYPTION_EXISTING_ENCRYPTED_FILE ((NTSTATUS) 0xC0000443L)
-#endif
-
-#ifndef STATUS_CS_ENCRYPTION_NEW_ENCRYPTED_FILE
-# define STATUS_CS_ENCRYPTION_NEW_ENCRYPTED_FILE ((NTSTATUS) 0xC0000444L)
-#endif
-
-#ifndef STATUS_CS_ENCRYPTION_FILE_NOT_CSE
-# define STATUS_CS_ENCRYPTION_FILE_NOT_CSE ((NTSTATUS) 0xC0000445L)
-#endif
-
-#ifndef STATUS_INVALID_LABEL
-# define STATUS_INVALID_LABEL ((NTSTATUS) 0xC0000446L)
-#endif
-
-#ifndef STATUS_DRIVER_PROCESS_TERMINATED
-# define STATUS_DRIVER_PROCESS_TERMINATED ((NTSTATUS) 0xC0000450L)
-#endif
-
-#ifndef STATUS_AMBIGUOUS_SYSTEM_DEVICE
-# define STATUS_AMBIGUOUS_SYSTEM_DEVICE ((NTSTATUS) 0xC0000451L)
-#endif
-
-#ifndef STATUS_SYSTEM_DEVICE_NOT_FOUND
-# define STATUS_SYSTEM_DEVICE_NOT_FOUND ((NTSTATUS) 0xC0000452L)
-#endif
-
-#ifndef STATUS_RESTART_BOOT_APPLICATION
-# define STATUS_RESTART_BOOT_APPLICATION ((NTSTATUS) 0xC0000453L)
-#endif
-
-#ifndef STATUS_INSUFFICIENT_NVRAM_RESOURCES
-# define STATUS_INSUFFICIENT_NVRAM_RESOURCES ((NTSTATUS) 0xC0000454L)
-#endif
-
-#ifndef STATUS_INVALID_TASK_NAME
-# define STATUS_INVALID_TASK_NAME ((NTSTATUS) 0xC0000500L)
-#endif
-
-#ifndef STATUS_INVALID_TASK_INDEX
-# define STATUS_INVALID_TASK_INDEX ((NTSTATUS) 0xC0000501L)
-#endif
-
-#ifndef STATUS_THREAD_ALREADY_IN_TASK
-# define STATUS_THREAD_ALREADY_IN_TASK ((NTSTATUS) 0xC0000502L)
-#endif
-
-#ifndef STATUS_CALLBACK_BYPASS
-# define STATUS_CALLBACK_BYPASS ((NTSTATUS) 0xC0000503L)
-#endif
-
-#ifndef STATUS_FAIL_FAST_EXCEPTION
-# define STATUS_FAIL_FAST_EXCEPTION ((NTSTATUS) 0xC0000602L)
-#endif
-
-#ifndef STATUS_IMAGE_CERT_REVOKED
-# define STATUS_IMAGE_CERT_REVOKED ((NTSTATUS) 0xC0000603L)
-#endif
-
-#ifndef STATUS_PORT_CLOSED
-# define STATUS_PORT_CLOSED ((NTSTATUS) 0xC0000700L)
-#endif
-
-#ifndef STATUS_MESSAGE_LOST
-# define STATUS_MESSAGE_LOST ((NTSTATUS) 0xC0000701L)
-#endif
-
-#ifndef STATUS_INVALID_MESSAGE
-# define STATUS_INVALID_MESSAGE ((NTSTATUS) 0xC0000702L)
-#endif
-
-#ifndef STATUS_REQUEST_CANCELED
-# define STATUS_REQUEST_CANCELED ((NTSTATUS) 0xC0000703L)
-#endif
-
-#ifndef STATUS_RECURSIVE_DISPATCH
-# define STATUS_RECURSIVE_DISPATCH ((NTSTATUS) 0xC0000704L)
-#endif
-
-#ifndef STATUS_LPC_RECEIVE_BUFFER_EXPECTED
-# define STATUS_LPC_RECEIVE_BUFFER_EXPECTED ((NTSTATUS) 0xC0000705L)
-#endif
-
-#ifndef STATUS_LPC_INVALID_CONNECTION_USAGE
-# define STATUS_LPC_INVALID_CONNECTION_USAGE ((NTSTATUS) 0xC0000706L)
-#endif
-
-#ifndef STATUS_LPC_REQUESTS_NOT_ALLOWED
-# define STATUS_LPC_REQUESTS_NOT_ALLOWED ((NTSTATUS) 0xC0000707L)
-#endif
-
-#ifndef STATUS_RESOURCE_IN_USE
-# define STATUS_RESOURCE_IN_USE ((NTSTATUS) 0xC0000708L)
-#endif
-
-#ifndef STATUS_HARDWARE_MEMORY_ERROR
-# define STATUS_HARDWARE_MEMORY_ERROR ((NTSTATUS) 0xC0000709L)
-#endif
-
-#ifndef STATUS_THREADPOOL_HANDLE_EXCEPTION
-# define STATUS_THREADPOOL_HANDLE_EXCEPTION ((NTSTATUS) 0xC000070AL)
-#endif
-
-#ifndef STATUS_THREADPOOL_SET_EVENT_ON_COMPLETION_FAILED
-# define STATUS_THREADPOOL_SET_EVENT_ON_COMPLETION_FAILED ((NTSTATUS) 0xC000070BL)
-#endif
-
-#ifndef STATUS_THREADPOOL_RELEASE_SEMAPHORE_ON_COMPLETION_FAILED
-# define STATUS_THREADPOOL_RELEASE_SEMAPHORE_ON_COMPLETION_FAILED ((NTSTATUS) 0xC000070CL)
-#endif
-
-#ifndef STATUS_THREADPOOL_RELEASE_MUTEX_ON_COMPLETION_FAILED
-# define STATUS_THREADPOOL_RELEASE_MUTEX_ON_COMPLETION_FAILED ((NTSTATUS) 0xC000070DL)
-#endif
-
-#ifndef STATUS_THREADPOOL_FREE_LIBRARY_ON_COMPLETION_FAILED
-# define STATUS_THREADPOOL_FREE_LIBRARY_ON_COMPLETION_FAILED ((NTSTATUS) 0xC000070EL)
-#endif
-
-#ifndef STATUS_THREADPOOL_RELEASED_DURING_OPERATION
-# define STATUS_THREADPOOL_RELEASED_DURING_OPERATION ((NTSTATUS) 0xC000070FL)
-#endif
-
-#ifndef STATUS_CALLBACK_RETURNED_WHILE_IMPERSONATING
-# define STATUS_CALLBACK_RETURNED_WHILE_IMPERSONATING ((NTSTATUS) 0xC0000710L)
-#endif
-
-#ifndef STATUS_APC_RETURNED_WHILE_IMPERSONATING
-# define STATUS_APC_RETURNED_WHILE_IMPERSONATING ((NTSTATUS) 0xC0000711L)
-#endif
-
-#ifndef STATUS_PROCESS_IS_PROTECTED
-# define STATUS_PROCESS_IS_PROTECTED ((NTSTATUS) 0xC0000712L)
-#endif
-
-#ifndef STATUS_MCA_EXCEPTION
-# define STATUS_MCA_EXCEPTION ((NTSTATUS) 0xC0000713L)
-#endif
-
-#ifndef STATUS_CERTIFICATE_MAPPING_NOT_UNIQUE
-# define STATUS_CERTIFICATE_MAPPING_NOT_UNIQUE ((NTSTATUS) 0xC0000714L)
-#endif
-
-#ifndef STATUS_SYMLINK_CLASS_DISABLED
-# define STATUS_SYMLINK_CLASS_DISABLED ((NTSTATUS) 0xC0000715L)
-#endif
-
-#ifndef STATUS_INVALID_IDN_NORMALIZATION
-# define STATUS_INVALID_IDN_NORMALIZATION ((NTSTATUS) 0xC0000716L)
-#endif
-
-#ifndef STATUS_NO_UNICODE_TRANSLATION
-# define STATUS_NO_UNICODE_TRANSLATION ((NTSTATUS) 0xC0000717L)
-#endif
-
-#ifndef STATUS_ALREADY_REGISTERED
-# define STATUS_ALREADY_REGISTERED ((NTSTATUS) 0xC0000718L)
-#endif
-
-#ifndef STATUS_CONTEXT_MISMATCH
-# define STATUS_CONTEXT_MISMATCH ((NTSTATUS) 0xC0000719L)
-#endif
-
-#ifndef STATUS_PORT_ALREADY_HAS_COMPLETION_LIST
-# define STATUS_PORT_ALREADY_HAS_COMPLETION_LIST ((NTSTATUS) 0xC000071AL)
-#endif
-
-#ifndef STATUS_CALLBACK_RETURNED_THREAD_PRIORITY
-# define STATUS_CALLBACK_RETURNED_THREAD_PRIORITY ((NTSTATUS) 0xC000071BL)
-#endif
-
-#ifndef STATUS_INVALID_THREAD
-# define STATUS_INVALID_THREAD ((NTSTATUS) 0xC000071CL)
-#endif
-
-#ifndef STATUS_CALLBACK_RETURNED_TRANSACTION
-# define STATUS_CALLBACK_RETURNED_TRANSACTION ((NTSTATUS) 0xC000071DL)
-#endif
-
-#ifndef STATUS_CALLBACK_RETURNED_LDR_LOCK
-# define STATUS_CALLBACK_RETURNED_LDR_LOCK ((NTSTATUS) 0xC000071EL)
-#endif
-
-#ifndef STATUS_CALLBACK_RETURNED_LANG
-# define STATUS_CALLBACK_RETURNED_LANG ((NTSTATUS) 0xC000071FL)
-#endif
-
-#ifndef STATUS_CALLBACK_RETURNED_PRI_BACK
-# define STATUS_CALLBACK_RETURNED_PRI_BACK ((NTSTATUS) 0xC0000720L)
-#endif
-
-#ifndef STATUS_CALLBACK_RETURNED_THREAD_AFFINITY
-# define STATUS_CALLBACK_RETURNED_THREAD_AFFINITY ((NTSTATUS) 0xC0000721L)
-#endif
-
-#ifndef STATUS_DISK_REPAIR_DISABLED
-# define STATUS_DISK_REPAIR_DISABLED ((NTSTATUS) 0xC0000800L)
-#endif
-
-#ifndef STATUS_DS_DOMAIN_RENAME_IN_PROGRESS
-# define STATUS_DS_DOMAIN_RENAME_IN_PROGRESS ((NTSTATUS) 0xC0000801L)
-#endif
-
-#ifndef STATUS_DISK_QUOTA_EXCEEDED
-# define STATUS_DISK_QUOTA_EXCEEDED ((NTSTATUS) 0xC0000802L)
-#endif
-
-#ifndef STATUS_DATA_LOST_REPAIR
-# define STATUS_DATA_LOST_REPAIR ((NTSTATUS) 0x80000803L)
-#endif
-
-#ifndef STATUS_CONTENT_BLOCKED
-# define STATUS_CONTENT_BLOCKED ((NTSTATUS) 0xC0000804L)
-#endif
-
-#ifndef STATUS_BAD_CLUSTERS
-# define STATUS_BAD_CLUSTERS ((NTSTATUS) 0xC0000805L)
-#endif
-
-#ifndef STATUS_VOLUME_DIRTY
-# define STATUS_VOLUME_DIRTY ((NTSTATUS) 0xC0000806L)
-#endif
-
-#ifndef STATUS_FILE_CHECKED_OUT
-# define STATUS_FILE_CHECKED_OUT ((NTSTATUS) 0xC0000901L)
-#endif
-
-#ifndef STATUS_CHECKOUT_REQUIRED
-# define STATUS_CHECKOUT_REQUIRED ((NTSTATUS) 0xC0000902L)
-#endif
-
-#ifndef STATUS_BAD_FILE_TYPE
-# define STATUS_BAD_FILE_TYPE ((NTSTATUS) 0xC0000903L)
-#endif
-
-#ifndef STATUS_FILE_TOO_LARGE
-# define STATUS_FILE_TOO_LARGE ((NTSTATUS) 0xC0000904L)
-#endif
-
-#ifndef STATUS_FORMS_AUTH_REQUIRED
-# define STATUS_FORMS_AUTH_REQUIRED ((NTSTATUS) 0xC0000905L)
-#endif
-
-#ifndef STATUS_VIRUS_INFECTED
-# define STATUS_VIRUS_INFECTED ((NTSTATUS) 0xC0000906L)
-#endif
-
-#ifndef STATUS_VIRUS_DELETED
-# define STATUS_VIRUS_DELETED ((NTSTATUS) 0xC0000907L)
-#endif
-
-#ifndef STATUS_BAD_MCFG_TABLE
-# define STATUS_BAD_MCFG_TABLE ((NTSTATUS) 0xC0000908L)
-#endif
-
-#ifndef STATUS_CANNOT_BREAK_OPLOCK
-# define STATUS_CANNOT_BREAK_OPLOCK ((NTSTATUS) 0xC0000909L)
-#endif
-
-#ifndef STATUS_WOW_ASSERTION
-# define STATUS_WOW_ASSERTION ((NTSTATUS) 0xC0009898L)
-#endif
-
-#ifndef STATUS_INVALID_SIGNATURE
-# define STATUS_INVALID_SIGNATURE ((NTSTATUS) 0xC000A000L)
-#endif
-
-#ifndef STATUS_HMAC_NOT_SUPPORTED
-# define STATUS_HMAC_NOT_SUPPORTED ((NTSTATUS) 0xC000A001L)
-#endif
-
-#ifndef STATUS_AUTH_TAG_MISMATCH
-# define STATUS_AUTH_TAG_MISMATCH ((NTSTATUS) 0xC000A002L)
-#endif
-
-#ifndef STATUS_IPSEC_QUEUE_OVERFLOW
-# define STATUS_IPSEC_QUEUE_OVERFLOW ((NTSTATUS) 0xC000A010L)
-#endif
-
-#ifndef STATUS_ND_QUEUE_OVERFLOW
-# define STATUS_ND_QUEUE_OVERFLOW ((NTSTATUS) 0xC000A011L)
-#endif
-
-#ifndef STATUS_HOPLIMIT_EXCEEDED
-# define STATUS_HOPLIMIT_EXCEEDED ((NTSTATUS) 0xC000A012L)
-#endif
-
-#ifndef STATUS_PROTOCOL_NOT_SUPPORTED
-# define STATUS_PROTOCOL_NOT_SUPPORTED ((NTSTATUS) 0xC000A013L)
-#endif
-
-#ifndef STATUS_FASTPATH_REJECTED
-# define STATUS_FASTPATH_REJECTED ((NTSTATUS) 0xC000A014L)
-#endif
-
-#ifndef STATUS_LOST_WRITEBEHIND_DATA_NETWORK_DISCONNECTED
-# define STATUS_LOST_WRITEBEHIND_DATA_NETWORK_DISCONNECTED ((NTSTATUS) 0xC000A080L)
-#endif
-
-#ifndef STATUS_LOST_WRITEBEHIND_DATA_NETWORK_SERVER_ERROR
-# define STATUS_LOST_WRITEBEHIND_DATA_NETWORK_SERVER_ERROR ((NTSTATUS) 0xC000A081L)
-#endif
-
-#ifndef STATUS_LOST_WRITEBEHIND_DATA_LOCAL_DISK_ERROR
-# define STATUS_LOST_WRITEBEHIND_DATA_LOCAL_DISK_ERROR ((NTSTATUS) 0xC000A082L)
-#endif
-
-#ifndef STATUS_XML_PARSE_ERROR
-# define STATUS_XML_PARSE_ERROR ((NTSTATUS) 0xC000A083L)
-#endif
-
-#ifndef STATUS_XMLDSIG_ERROR
-# define STATUS_XMLDSIG_ERROR ((NTSTATUS) 0xC000A084L)
-#endif
-
-#ifndef STATUS_WRONG_COMPARTMENT
-# define STATUS_WRONG_COMPARTMENT ((NTSTATUS) 0xC000A085L)
-#endif
-
-#ifndef STATUS_AUTHIP_FAILURE
-# define STATUS_AUTHIP_FAILURE ((NTSTATUS) 0xC000A086L)
-#endif
-
-#ifndef STATUS_DS_OID_MAPPED_GROUP_CANT_HAVE_MEMBERS
-# define STATUS_DS_OID_MAPPED_GROUP_CANT_HAVE_MEMBERS ((NTSTATUS) 0xC000A087L)
-#endif
-
-#ifndef STATUS_DS_OID_NOT_FOUND
-# define STATUS_DS_OID_NOT_FOUND ((NTSTATUS) 0xC000A088L)
-#endif
-
-#ifndef STATUS_HASH_NOT_SUPPORTED
-# define STATUS_HASH_NOT_SUPPORTED ((NTSTATUS) 0xC000A100L)
-#endif
-
-#ifndef STATUS_HASH_NOT_PRESENT
-# define STATUS_HASH_NOT_PRESENT ((NTSTATUS) 0xC000A101L)
-#endif
-
-/* This is not the NTSTATUS_FROM_WIN32 that the DDK provides, because the */
-/* DDK got it wrong! */
-#ifdef NTSTATUS_FROM_WIN32
-# undef NTSTATUS_FROM_WIN32
-#endif
-#define NTSTATUS_FROM_WIN32(error) ((NTSTATUS) (error) <= 0 ? \
- ((NTSTATUS) (error)) : ((NTSTATUS) (((error) & 0x0000FFFF) | \
- (FACILITY_NTWIN32 << 16) | ERROR_SEVERITY_WARNING)))
-
-#ifndef JOB_OBJECT_LIMIT_PROCESS_MEMORY
-# define JOB_OBJECT_LIMIT_PROCESS_MEMORY 0x00000100
-#endif
-#ifndef JOB_OBJECT_LIMIT_JOB_MEMORY
-# define JOB_OBJECT_LIMIT_JOB_MEMORY 0x00000200
-#endif
-#ifndef JOB_OBJECT_LIMIT_DIE_ON_UNHANDLED_EXCEPTION
-# define JOB_OBJECT_LIMIT_DIE_ON_UNHANDLED_EXCEPTION 0x00000400
-#endif
-#ifndef JOB_OBJECT_LIMIT_BREAKAWAY_OK
-# define JOB_OBJECT_LIMIT_BREAKAWAY_OK 0x00000800
-#endif
-#ifndef JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK
-# define JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK 0x00001000
-#endif
-#ifndef JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE
-# define JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE 0x00002000
-#endif
-
-/* from winternl.h */
-typedef struct _UNICODE_STRING {
- USHORT Length;
- USHORT MaximumLength;
- PWSTR Buffer;
-} UNICODE_STRING, *PUNICODE_STRING;
-
-typedef const UNICODE_STRING *PCUNICODE_STRING;
-
-/* from ntifs.h */
-#ifndef DEVICE_TYPE
-# define DEVICE_TYPE DWORD
-#endif
-
-/* MinGW already has a definition for REPARSE_DATA_BUFFER, but mingw-w64 does
- * not.
- */
-#if defined(_MSC_VER) || defined(__MINGW64_VERSION_MAJOR)
- typedef struct _REPARSE_DATA_BUFFER {
- ULONG ReparseTag;
- USHORT ReparseDataLength;
- USHORT Reserved;
- union {
- struct {
- USHORT SubstituteNameOffset;
- USHORT SubstituteNameLength;
- USHORT PrintNameOffset;
- USHORT PrintNameLength;
- ULONG Flags;
- WCHAR PathBuffer[1];
- } SymbolicLinkReparseBuffer;
- struct {
- USHORT SubstituteNameOffset;
- USHORT SubstituteNameLength;
- USHORT PrintNameOffset;
- USHORT PrintNameLength;
- WCHAR PathBuffer[1];
- } MountPointReparseBuffer;
- struct {
- UCHAR DataBuffer[1];
- } GenericReparseBuffer;
- } DUMMYUNIONNAME;
- } REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER;
-#endif
-
-typedef struct _IO_STATUS_BLOCK {
- union {
- NTSTATUS Status;
- PVOID Pointer;
- } DUMMYUNIONNAME;
- ULONG_PTR Information;
-} IO_STATUS_BLOCK, *PIO_STATUS_BLOCK;
-
-typedef enum _FILE_INFORMATION_CLASS {
- FileDirectoryInformation = 1,
- FileFullDirectoryInformation,
- FileBothDirectoryInformation,
- FileBasicInformation,
- FileStandardInformation,
- FileInternalInformation,
- FileEaInformation,
- FileAccessInformation,
- FileNameInformation,
- FileRenameInformation,
- FileLinkInformation,
- FileNamesInformation,
- FileDispositionInformation,
- FilePositionInformation,
- FileFullEaInformation,
- FileModeInformation,
- FileAlignmentInformation,
- FileAllInformation,
- FileAllocationInformation,
- FileEndOfFileInformation,
- FileAlternateNameInformation,
- FileStreamInformation,
- FilePipeInformation,
- FilePipeLocalInformation,
- FilePipeRemoteInformation,
- FileMailslotQueryInformation,
- FileMailslotSetInformation,
- FileCompressionInformation,
- FileObjectIdInformation,
- FileCompletionInformation,
- FileMoveClusterInformation,
- FileQuotaInformation,
- FileReparsePointInformation,
- FileNetworkOpenInformation,
- FileAttributeTagInformation,
- FileTrackingInformation,
- FileIdBothDirectoryInformation,
- FileIdFullDirectoryInformation,
- FileValidDataLengthInformation,
- FileShortNameInformation,
- FileIoCompletionNotificationInformation,
- FileIoStatusBlockRangeInformation,
- FileIoPriorityHintInformation,
- FileSfioReserveInformation,
- FileSfioVolumeInformation,
- FileHardLinkInformation,
- FileProcessIdsUsingFileInformation,
- FileNormalizedNameInformation,
- FileNetworkPhysicalNameInformation,
- FileIdGlobalTxDirectoryInformation,
- FileIsRemoteDeviceInformation,
- FileAttributeCacheInformation,
- FileNumaNodeInformation,
- FileStandardLinkInformation,
- FileRemoteProtocolInformation,
- FileMaximumInformation
-} FILE_INFORMATION_CLASS, *PFILE_INFORMATION_CLASS;
-
-typedef struct _FILE_DIRECTORY_INFORMATION {
- ULONG NextEntryOffset;
- ULONG FileIndex;
- LARGE_INTEGER CreationTime;
- LARGE_INTEGER LastAccessTime;
- LARGE_INTEGER LastWriteTime;
- LARGE_INTEGER ChangeTime;
- LARGE_INTEGER EndOfFile;
- LARGE_INTEGER AllocationSize;
- ULONG FileAttributes;
- ULONG FileNameLength;
- WCHAR FileName[1];
-} FILE_DIRECTORY_INFORMATION, *PFILE_DIRECTORY_INFORMATION;
-
-typedef struct _FILE_BOTH_DIR_INFORMATION {
- ULONG NextEntryOffset;
- ULONG FileIndex;
- LARGE_INTEGER CreationTime;
- LARGE_INTEGER LastAccessTime;
- LARGE_INTEGER LastWriteTime;
- LARGE_INTEGER ChangeTime;
- LARGE_INTEGER EndOfFile;
- LARGE_INTEGER AllocationSize;
- ULONG FileAttributes;
- ULONG FileNameLength;
- ULONG EaSize;
- CCHAR ShortNameLength;
- WCHAR ShortName[12];
- WCHAR FileName[1];
-} FILE_BOTH_DIR_INFORMATION, *PFILE_BOTH_DIR_INFORMATION;
-
-typedef struct _FILE_BASIC_INFORMATION {
- LARGE_INTEGER CreationTime;
- LARGE_INTEGER LastAccessTime;
- LARGE_INTEGER LastWriteTime;
- LARGE_INTEGER ChangeTime;
- DWORD FileAttributes;
-} FILE_BASIC_INFORMATION, *PFILE_BASIC_INFORMATION;
-
-typedef struct _FILE_STANDARD_INFORMATION {
- LARGE_INTEGER AllocationSize;
- LARGE_INTEGER EndOfFile;
- ULONG NumberOfLinks;
- BOOLEAN DeletePending;
- BOOLEAN Directory;
-} FILE_STANDARD_INFORMATION, *PFILE_STANDARD_INFORMATION;
-
-typedef struct _FILE_INTERNAL_INFORMATION {
- LARGE_INTEGER IndexNumber;
-} FILE_INTERNAL_INFORMATION, *PFILE_INTERNAL_INFORMATION;
-
-typedef struct _FILE_EA_INFORMATION {
- ULONG EaSize;
-} FILE_EA_INFORMATION, *PFILE_EA_INFORMATION;
-
-typedef struct _FILE_ACCESS_INFORMATION {
- ACCESS_MASK AccessFlags;
-} FILE_ACCESS_INFORMATION, *PFILE_ACCESS_INFORMATION;
-
-typedef struct _FILE_POSITION_INFORMATION {
- LARGE_INTEGER CurrentByteOffset;
-} FILE_POSITION_INFORMATION, *PFILE_POSITION_INFORMATION;
-
-typedef struct _FILE_MODE_INFORMATION {
- ULONG Mode;
-} FILE_MODE_INFORMATION, *PFILE_MODE_INFORMATION;
-
-typedef struct _FILE_ALIGNMENT_INFORMATION {
- ULONG AlignmentRequirement;
-} FILE_ALIGNMENT_INFORMATION, *PFILE_ALIGNMENT_INFORMATION;
-
-typedef struct _FILE_NAME_INFORMATION {
- ULONG FileNameLength;
- WCHAR FileName[1];
-} FILE_NAME_INFORMATION, *PFILE_NAME_INFORMATION;
-
-typedef struct _FILE_END_OF_FILE_INFORMATION {
- LARGE_INTEGER EndOfFile;
-} FILE_END_OF_FILE_INFORMATION, *PFILE_END_OF_FILE_INFORMATION;
-
-typedef struct _FILE_ALL_INFORMATION {
- FILE_BASIC_INFORMATION BasicInformation;
- FILE_STANDARD_INFORMATION StandardInformation;
- FILE_INTERNAL_INFORMATION InternalInformation;
- FILE_EA_INFORMATION EaInformation;
- FILE_ACCESS_INFORMATION AccessInformation;
- FILE_POSITION_INFORMATION PositionInformation;
- FILE_MODE_INFORMATION ModeInformation;
- FILE_ALIGNMENT_INFORMATION AlignmentInformation;
- FILE_NAME_INFORMATION NameInformation;
-} FILE_ALL_INFORMATION, *PFILE_ALL_INFORMATION;
-
-typedef struct _FILE_DISPOSITION_INFORMATION {
- BOOLEAN DeleteFile;
-} FILE_DISPOSITION_INFORMATION, *PFILE_DISPOSITION_INFORMATION;
-
-typedef struct _FILE_PIPE_LOCAL_INFORMATION {
- ULONG NamedPipeType;
- ULONG NamedPipeConfiguration;
- ULONG MaximumInstances;
- ULONG CurrentInstances;
- ULONG InboundQuota;
- ULONG ReadDataAvailable;
- ULONG OutboundQuota;
- ULONG WriteQuotaAvailable;
- ULONG NamedPipeState;
- ULONG NamedPipeEnd;
-} FILE_PIPE_LOCAL_INFORMATION, *PFILE_PIPE_LOCAL_INFORMATION;
-
-#define FILE_SYNCHRONOUS_IO_ALERT 0x00000010
-#define FILE_SYNCHRONOUS_IO_NONALERT 0x00000020
-
-typedef enum _FS_INFORMATION_CLASS {
- FileFsVolumeInformation = 1,
- FileFsLabelInformation = 2,
- FileFsSizeInformation = 3,
- FileFsDeviceInformation = 4,
- FileFsAttributeInformation = 5,
- FileFsControlInformation = 6,
- FileFsFullSizeInformation = 7,
- FileFsObjectIdInformation = 8,
- FileFsDriverPathInformation = 9,
- FileFsVolumeFlagsInformation = 10,
- FileFsSectorSizeInformation = 11
-} FS_INFORMATION_CLASS, *PFS_INFORMATION_CLASS;
-
-typedef struct _FILE_FS_VOLUME_INFORMATION {
- LARGE_INTEGER VolumeCreationTime;
- ULONG VolumeSerialNumber;
- ULONG VolumeLabelLength;
- BOOLEAN SupportsObjects;
- WCHAR VolumeLabel[1];
-} FILE_FS_VOLUME_INFORMATION, *PFILE_FS_VOLUME_INFORMATION;
-
-typedef struct _FILE_FS_LABEL_INFORMATION {
- ULONG VolumeLabelLength;
- WCHAR VolumeLabel[1];
-} FILE_FS_LABEL_INFORMATION, *PFILE_FS_LABEL_INFORMATION;
-
-typedef struct _FILE_FS_SIZE_INFORMATION {
- LARGE_INTEGER TotalAllocationUnits;
- LARGE_INTEGER AvailableAllocationUnits;
- ULONG SectorsPerAllocationUnit;
- ULONG BytesPerSector;
-} FILE_FS_SIZE_INFORMATION, *PFILE_FS_SIZE_INFORMATION;
-
-typedef struct _FILE_FS_DEVICE_INFORMATION {
- DEVICE_TYPE DeviceType;
- ULONG Characteristics;
-} FILE_FS_DEVICE_INFORMATION, *PFILE_FS_DEVICE_INFORMATION;
-
-typedef struct _FILE_FS_ATTRIBUTE_INFORMATION {
- ULONG FileSystemAttributes;
- LONG MaximumComponentNameLength;
- ULONG FileSystemNameLength;
- WCHAR FileSystemName[1];
-} FILE_FS_ATTRIBUTE_INFORMATION, *PFILE_FS_ATTRIBUTE_INFORMATION;
-
-typedef struct _FILE_FS_CONTROL_INFORMATION {
- LARGE_INTEGER FreeSpaceStartFiltering;
- LARGE_INTEGER FreeSpaceThreshold;
- LARGE_INTEGER FreeSpaceStopFiltering;
- LARGE_INTEGER DefaultQuotaThreshold;
- LARGE_INTEGER DefaultQuotaLimit;
- ULONG FileSystemControlFlags;
-} FILE_FS_CONTROL_INFORMATION, *PFILE_FS_CONTROL_INFORMATION;
-
-typedef struct _FILE_FS_FULL_SIZE_INFORMATION {
- LARGE_INTEGER TotalAllocationUnits;
- LARGE_INTEGER CallerAvailableAllocationUnits;
- LARGE_INTEGER ActualAvailableAllocationUnits;
- ULONG SectorsPerAllocationUnit;
- ULONG BytesPerSector;
-} FILE_FS_FULL_SIZE_INFORMATION, *PFILE_FS_FULL_SIZE_INFORMATION;
-
-typedef struct _FILE_FS_OBJECTID_INFORMATION {
- UCHAR ObjectId[16];
- UCHAR ExtendedInfo[48];
-} FILE_FS_OBJECTID_INFORMATION, *PFILE_FS_OBJECTID_INFORMATION;
-
-typedef struct _FILE_FS_DRIVER_PATH_INFORMATION {
- BOOLEAN DriverInPath;
- ULONG DriverNameLength;
- WCHAR DriverName[1];
-} FILE_FS_DRIVER_PATH_INFORMATION, *PFILE_FS_DRIVER_PATH_INFORMATION;
-
-typedef struct _FILE_FS_VOLUME_FLAGS_INFORMATION {
- ULONG Flags;
-} FILE_FS_VOLUME_FLAGS_INFORMATION, *PFILE_FS_VOLUME_FLAGS_INFORMATION;
-
-typedef struct _FILE_FS_SECTOR_SIZE_INFORMATION {
- ULONG LogicalBytesPerSector;
- ULONG PhysicalBytesPerSectorForAtomicity;
- ULONG PhysicalBytesPerSectorForPerformance;
- ULONG FileSystemEffectivePhysicalBytesPerSectorForAtomicity;
- ULONG Flags;
- ULONG ByteOffsetForSectorAlignment;
- ULONG ByteOffsetForPartitionAlignment;
-} FILE_FS_SECTOR_SIZE_INFORMATION, *PFILE_FS_SECTOR_SIZE_INFORMATION;
-
-typedef struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION {
- LARGE_INTEGER IdleTime;
- LARGE_INTEGER KernelTime;
- LARGE_INTEGER UserTime;
- LARGE_INTEGER DpcTime;
- LARGE_INTEGER InterruptTime;
- ULONG InterruptCount;
-} SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION, *PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION;
-
-#ifndef SystemProcessorPerformanceInformation
-# define SystemProcessorPerformanceInformation 8
-#endif
-
-#ifndef FILE_DEVICE_FILE_SYSTEM
-# define FILE_DEVICE_FILE_SYSTEM 0x00000009
-#endif
-
-#ifndef FILE_DEVICE_NETWORK
-# define FILE_DEVICE_NETWORK 0x00000012
-#endif
-
-#ifndef METHOD_BUFFERED
-# define METHOD_BUFFERED 0
-#endif
-
-#ifndef METHOD_IN_DIRECT
-# define METHOD_IN_DIRECT 1
-#endif
-
-#ifndef METHOD_OUT_DIRECT
-# define METHOD_OUT_DIRECT 2
-#endif
-
-#ifndef METHOD_NEITHER
-#define METHOD_NEITHER 3
-#endif
-
-#ifndef METHOD_DIRECT_TO_HARDWARE
-# define METHOD_DIRECT_TO_HARDWARE METHOD_IN_DIRECT
-#endif
-
-#ifndef METHOD_DIRECT_FROM_HARDWARE
-# define METHOD_DIRECT_FROM_HARDWARE METHOD_OUT_DIRECT
-#endif
-
-#ifndef FILE_ANY_ACCESS
-# define FILE_ANY_ACCESS 0
-#endif
-
-#ifndef FILE_SPECIAL_ACCESS
-# define FILE_SPECIAL_ACCESS (FILE_ANY_ACCESS)
-#endif
-
-#ifndef FILE_READ_ACCESS
-# define FILE_READ_ACCESS 0x0001
-#endif
-
-#ifndef FILE_WRITE_ACCESS
-# define FILE_WRITE_ACCESS 0x0002
-#endif
-
-#ifndef CTL_CODE
-# define CTL_CODE(device_type, function, method, access) \
- (((device_type) << 16) | ((access) << 14) | ((function) << 2) | (method))
-#endif
-
-#ifndef FSCTL_SET_REPARSE_POINT
-# define FSCTL_SET_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM, \
- 41, \
- METHOD_BUFFERED, \
- FILE_SPECIAL_ACCESS)
-#endif
-
-#ifndef FSCTL_GET_REPARSE_POINT
-# define FSCTL_GET_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM, \
- 42, \
- METHOD_BUFFERED, \
- FILE_ANY_ACCESS)
-#endif
-
-#ifndef FSCTL_DELETE_REPARSE_POINT
-# define FSCTL_DELETE_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM, \
- 43, \
- METHOD_BUFFERED, \
- FILE_SPECIAL_ACCESS)
-#endif
-
-#ifndef IO_REPARSE_TAG_SYMLINK
-# define IO_REPARSE_TAG_SYMLINK (0xA000000CL)
-#endif
-
-typedef VOID (NTAPI *PIO_APC_ROUTINE)
- (PVOID ApcContext,
- PIO_STATUS_BLOCK IoStatusBlock,
- ULONG Reserved);
-
-typedef ULONG (NTAPI *sRtlNtStatusToDosError)
- (NTSTATUS Status);
-
-typedef NTSTATUS (NTAPI *sNtDeviceIoControlFile)
- (HANDLE FileHandle,
- HANDLE Event,
- PIO_APC_ROUTINE ApcRoutine,
- PVOID ApcContext,
- PIO_STATUS_BLOCK IoStatusBlock,
- ULONG IoControlCode,
- PVOID InputBuffer,
- ULONG InputBufferLength,
- PVOID OutputBuffer,
- ULONG OutputBufferLength);
-
-typedef NTSTATUS (NTAPI *sNtQueryInformationFile)
- (HANDLE FileHandle,
- PIO_STATUS_BLOCK IoStatusBlock,
- PVOID FileInformation,
- ULONG Length,
- FILE_INFORMATION_CLASS FileInformationClass);
-
-typedef NTSTATUS (NTAPI *sNtSetInformationFile)
- (HANDLE FileHandle,
- PIO_STATUS_BLOCK IoStatusBlock,
- PVOID FileInformation,
- ULONG Length,
- FILE_INFORMATION_CLASS FileInformationClass);
-
-typedef NTSTATUS (NTAPI *sNtQueryVolumeInformationFile)
- (HANDLE FileHandle,
- PIO_STATUS_BLOCK IoStatusBlock,
- PVOID FsInformation,
- ULONG Length,
- FS_INFORMATION_CLASS FsInformationClass);
-
-typedef NTSTATUS (NTAPI *sNtQuerySystemInformation)
- (UINT SystemInformationClass,
- PVOID SystemInformation,
- ULONG SystemInformationLength,
- PULONG ReturnLength);
-
-typedef NTSTATUS (NTAPI *sNtQueryDirectoryFile)
- (HANDLE FileHandle,
- HANDLE Event,
- PIO_APC_ROUTINE ApcRoutine,
- PVOID ApcContext,
- PIO_STATUS_BLOCK IoStatusBlock,
- PVOID FileInformation,
- ULONG Length,
- FILE_INFORMATION_CLASS FileInformationClass,
- BOOLEAN ReturnSingleEntry,
- PUNICODE_STRING FileName,
- BOOLEAN RestartScan
- );
-
-/*
- * Kernel32 headers
- */
-#ifndef FILE_SKIP_COMPLETION_PORT_ON_SUCCESS
-# define FILE_SKIP_COMPLETION_PORT_ON_SUCCESS 0x1
-#endif
-
-#ifndef FILE_SKIP_SET_EVENT_ON_HANDLE
-# define FILE_SKIP_SET_EVENT_ON_HANDLE 0x2
-#endif
-
-#ifndef SYMBOLIC_LINK_FLAG_DIRECTORY
-# define SYMBOLIC_LINK_FLAG_DIRECTORY 0x1
-#endif
-
-#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)
- typedef struct _OVERLAPPED_ENTRY {
- ULONG_PTR lpCompletionKey;
- LPOVERLAPPED lpOverlapped;
- ULONG_PTR Internal;
- DWORD dwNumberOfBytesTransferred;
- } OVERLAPPED_ENTRY, *LPOVERLAPPED_ENTRY;
-#endif
-
-/* from wincon.h */
-#ifndef ENABLE_INSERT_MODE
-# define ENABLE_INSERT_MODE 0x20
-#endif
-
-#ifndef ENABLE_QUICK_EDIT_MODE
-# define ENABLE_QUICK_EDIT_MODE 0x40
-#endif
-
-#ifndef ENABLE_EXTENDED_FLAGS
-# define ENABLE_EXTENDED_FLAGS 0x80
-#endif
-
-/* from winerror.h */
-#ifndef ERROR_SYMLINK_NOT_SUPPORTED
-# define ERROR_SYMLINK_NOT_SUPPORTED 1464
-#endif
-
-#ifndef ERROR_MUI_FILE_NOT_FOUND
-# define ERROR_MUI_FILE_NOT_FOUND 15100
-#endif
-
-#ifndef ERROR_MUI_INVALID_FILE
-# define ERROR_MUI_INVALID_FILE 15101
-#endif
-
-#ifndef ERROR_MUI_INVALID_RC_CONFIG
-# define ERROR_MUI_INVALID_RC_CONFIG 15102
-#endif
-
-#ifndef ERROR_MUI_INVALID_LOCALE_NAME
-# define ERROR_MUI_INVALID_LOCALE_NAME 15103
-#endif
-
-#ifndef ERROR_MUI_INVALID_ULTIMATEFALLBACK_NAME
-# define ERROR_MUI_INVALID_ULTIMATEFALLBACK_NAME 15104
-#endif
-
-#ifndef ERROR_MUI_FILE_NOT_LOADED
-# define ERROR_MUI_FILE_NOT_LOADED 15105
-#endif
-
-typedef BOOL (WINAPI *sGetQueuedCompletionStatusEx)
- (HANDLE CompletionPort,
- LPOVERLAPPED_ENTRY lpCompletionPortEntries,
- ULONG ulCount,
- PULONG ulNumEntriesRemoved,
- DWORD dwMilliseconds,
- BOOL fAlertable);
-
-typedef BOOL (WINAPI* sSetFileCompletionNotificationModes)
- (HANDLE FileHandle,
- UCHAR Flags);
-
-typedef BOOLEAN (WINAPI* sCreateSymbolicLinkW)
- (LPCWSTR lpSymlinkFileName,
- LPCWSTR lpTargetFileName,
- DWORD dwFlags);
-
-typedef BOOL (WINAPI* sCancelIoEx)
- (HANDLE hFile,
- LPOVERLAPPED lpOverlapped);
-
-typedef VOID (WINAPI* sInitializeConditionVariable)
- (PCONDITION_VARIABLE ConditionVariable);
-
-typedef BOOL (WINAPI* sSleepConditionVariableCS)
- (PCONDITION_VARIABLE ConditionVariable,
- PCRITICAL_SECTION CriticalSection,
- DWORD dwMilliseconds);
-
-typedef BOOL (WINAPI* sSleepConditionVariableSRW)
- (PCONDITION_VARIABLE ConditionVariable,
- PSRWLOCK SRWLock,
- DWORD dwMilliseconds,
- ULONG Flags);
-
-typedef VOID (WINAPI* sWakeAllConditionVariable)
- (PCONDITION_VARIABLE ConditionVariable);
-
-typedef VOID (WINAPI* sWakeConditionVariable)
- (PCONDITION_VARIABLE ConditionVariable);
-
-typedef BOOL (WINAPI* sCancelSynchronousIo)
- (HANDLE hThread);
-
-typedef DWORD (WINAPI* sGetFinalPathNameByHandleW)
- (HANDLE hFile,
- LPWSTR lpszFilePath,
- DWORD cchFilePath,
- DWORD dwFlags);
-
-/* Ntdll function pointers */
-extern sRtlNtStatusToDosError pRtlNtStatusToDosError;
-extern sNtDeviceIoControlFile pNtDeviceIoControlFile;
-extern sNtQueryInformationFile pNtQueryInformationFile;
-extern sNtSetInformationFile pNtSetInformationFile;
-extern sNtQueryVolumeInformationFile pNtQueryVolumeInformationFile;
-extern sNtQueryDirectoryFile pNtQueryDirectoryFile;
-extern sNtQuerySystemInformation pNtQuerySystemInformation;
-
-
-/* Kernel32 function pointers */
-extern sGetQueuedCompletionStatusEx pGetQueuedCompletionStatusEx;
-extern sSetFileCompletionNotificationModes pSetFileCompletionNotificationModes;
-extern sCreateSymbolicLinkW pCreateSymbolicLinkW;
-extern sCancelIoEx pCancelIoEx;
-extern sInitializeConditionVariable pInitializeConditionVariable;
-extern sSleepConditionVariableCS pSleepConditionVariableCS;
-extern sSleepConditionVariableSRW pSleepConditionVariableSRW;
-extern sWakeAllConditionVariable pWakeAllConditionVariable;
-extern sWakeConditionVariable pWakeConditionVariable;
-extern sCancelSynchronousIo pCancelSynchronousIo;
-extern sGetFinalPathNameByHandleW pGetFinalPathNameByHandleW;
-
-#endif /* UV_WIN_WINAPI_H_ */
diff --git a/3rdparty/libuv/src/win/winsock.c b/3rdparty/libuv/src/win/winsock.c
deleted file mode 100644
index d2e667e9f75..00000000000
--- a/3rdparty/libuv/src/win/winsock.c
+++ /dev/null
@@ -1,561 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include <assert.h>
-#include <stdlib.h>
-
-#include "uv.h"
-#include "internal.h"
-
-
-/* Whether there are any non-IFS LSPs stacked on TCP */
-int uv_tcp_non_ifs_lsp_ipv4;
-int uv_tcp_non_ifs_lsp_ipv6;
-
-/* Ip address used to bind to any port at any interface */
-struct sockaddr_in uv_addr_ip4_any_;
-struct sockaddr_in6 uv_addr_ip6_any_;
-
-
-/*
- * Retrieves the pointer to a winsock extension function.
- */
-static BOOL uv_get_extension_function(SOCKET socket, GUID guid,
- void **target) {
- int result;
- DWORD bytes;
-
- result = WSAIoctl(socket,
- SIO_GET_EXTENSION_FUNCTION_POINTER,
- &guid,
- sizeof(guid),
- (void*)target,
- sizeof(*target),
- &bytes,
- NULL,
- NULL);
-
- if (result == SOCKET_ERROR) {
- *target = NULL;
- return FALSE;
- } else {
- return TRUE;
- }
-}
-
-
-BOOL uv_get_acceptex_function(SOCKET socket, LPFN_ACCEPTEX* target) {
- const GUID wsaid_acceptex = WSAID_ACCEPTEX;
- return uv_get_extension_function(socket, wsaid_acceptex, (void**)target);
-}
-
-
-BOOL uv_get_connectex_function(SOCKET socket, LPFN_CONNECTEX* target) {
- const GUID wsaid_connectex = WSAID_CONNECTEX;
- return uv_get_extension_function(socket, wsaid_connectex, (void**)target);
-}
-
-
-static int error_means_no_support(DWORD error) {
- return error == WSAEPROTONOSUPPORT || error == WSAESOCKTNOSUPPORT ||
- error == WSAEPFNOSUPPORT || error == WSAEAFNOSUPPORT;
-}
-
-
-void uv_winsock_init() {
- WSADATA wsa_data;
- int errorno;
- SOCKET dummy;
- WSAPROTOCOL_INFOW protocol_info;
- int opt_len;
-
- /* Initialize winsock */
- errorno = WSAStartup(MAKEWORD(2, 2), &wsa_data);
- if (errorno != 0) {
- uv_fatal_error(errorno, "WSAStartup");
- }
-
- /* Set implicit binding address used by connectEx */
- if (uv_ip4_addr("0.0.0.0", 0, &uv_addr_ip4_any_)) {
- abort();
- }
-
- if (uv_ip6_addr("::", 0, &uv_addr_ip6_any_)) {
- abort();
- }
-
- /* Detect non-IFS LSPs */
- dummy = socket(AF_INET, SOCK_STREAM, IPPROTO_IP);
-
- if (dummy != INVALID_SOCKET) {
- opt_len = (int) sizeof protocol_info;
- if (getsockopt(dummy,
- SOL_SOCKET,
- SO_PROTOCOL_INFOW,
- (char*) &protocol_info,
- &opt_len) == SOCKET_ERROR)
- uv_fatal_error(WSAGetLastError(), "getsockopt");
-
- if (!(protocol_info.dwServiceFlags1 & XP1_IFS_HANDLES))
- uv_tcp_non_ifs_lsp_ipv4 = 1;
-
- if (closesocket(dummy) == SOCKET_ERROR)
- uv_fatal_error(WSAGetLastError(), "closesocket");
-
- } else if (!error_means_no_support(WSAGetLastError())) {
- /* Any error other than "socket type not supported" is fatal. */
- uv_fatal_error(WSAGetLastError(), "socket");
- }
-
- /* Detect IPV6 support and non-IFS LSPs */
- dummy = socket(AF_INET6, SOCK_STREAM, IPPROTO_IP);
-
- if (dummy != INVALID_SOCKET) {
- opt_len = (int) sizeof protocol_info;
- if (getsockopt(dummy,
- SOL_SOCKET,
- SO_PROTOCOL_INFOW,
- (char*) &protocol_info,
- &opt_len) == SOCKET_ERROR)
- uv_fatal_error(WSAGetLastError(), "getsockopt");
-
- if (!(protocol_info.dwServiceFlags1 & XP1_IFS_HANDLES))
- uv_tcp_non_ifs_lsp_ipv6 = 1;
-
- if (closesocket(dummy) == SOCKET_ERROR)
- uv_fatal_error(WSAGetLastError(), "closesocket");
-
- } else if (!error_means_no_support(WSAGetLastError())) {
- /* Any error other than "socket type not supported" is fatal. */
- uv_fatal_error(WSAGetLastError(), "socket");
- }
-}
-
-
-int uv_ntstatus_to_winsock_error(NTSTATUS status) {
- switch (status) {
- case STATUS_SUCCESS:
- return ERROR_SUCCESS;
-
- case STATUS_PENDING:
- return ERROR_IO_PENDING;
-
- case STATUS_INVALID_HANDLE:
- case STATUS_OBJECT_TYPE_MISMATCH:
- return WSAENOTSOCK;
-
- case STATUS_INSUFFICIENT_RESOURCES:
- case STATUS_PAGEFILE_QUOTA:
- case STATUS_COMMITMENT_LIMIT:
- case STATUS_WORKING_SET_QUOTA:
- case STATUS_NO_MEMORY:
- case STATUS_QUOTA_EXCEEDED:
- case STATUS_TOO_MANY_PAGING_FILES:
- case STATUS_REMOTE_RESOURCES:
- return WSAENOBUFS;
-
- case STATUS_TOO_MANY_ADDRESSES:
- case STATUS_SHARING_VIOLATION:
- case STATUS_ADDRESS_ALREADY_EXISTS:
- return WSAEADDRINUSE;
-
- case STATUS_LINK_TIMEOUT:
- case STATUS_IO_TIMEOUT:
- case STATUS_TIMEOUT:
- return WSAETIMEDOUT;
-
- case STATUS_GRACEFUL_DISCONNECT:
- return WSAEDISCON;
-
- case STATUS_REMOTE_DISCONNECT:
- case STATUS_CONNECTION_RESET:
- case STATUS_LINK_FAILED:
- case STATUS_CONNECTION_DISCONNECTED:
- case STATUS_PORT_UNREACHABLE:
- case STATUS_HOPLIMIT_EXCEEDED:
- return WSAECONNRESET;
-
- case STATUS_LOCAL_DISCONNECT:
- case STATUS_TRANSACTION_ABORTED:
- case STATUS_CONNECTION_ABORTED:
- return WSAECONNABORTED;
-
- case STATUS_BAD_NETWORK_PATH:
- case STATUS_NETWORK_UNREACHABLE:
- case STATUS_PROTOCOL_UNREACHABLE:
- return WSAENETUNREACH;
-
- case STATUS_HOST_UNREACHABLE:
- return WSAEHOSTUNREACH;
-
- case STATUS_CANCELLED:
- case STATUS_REQUEST_ABORTED:
- return WSAEINTR;
-
- case STATUS_BUFFER_OVERFLOW:
- case STATUS_INVALID_BUFFER_SIZE:
- return WSAEMSGSIZE;
-
- case STATUS_BUFFER_TOO_SMALL:
- case STATUS_ACCESS_VIOLATION:
- return WSAEFAULT;
-
- case STATUS_DEVICE_NOT_READY:
- case STATUS_REQUEST_NOT_ACCEPTED:
- return WSAEWOULDBLOCK;
-
- case STATUS_INVALID_NETWORK_RESPONSE:
- case STATUS_NETWORK_BUSY:
- case STATUS_NO_SUCH_DEVICE:
- case STATUS_NO_SUCH_FILE:
- case STATUS_OBJECT_PATH_NOT_FOUND:
- case STATUS_OBJECT_NAME_NOT_FOUND:
- case STATUS_UNEXPECTED_NETWORK_ERROR:
- return WSAENETDOWN;
-
- case STATUS_INVALID_CONNECTION:
- return WSAENOTCONN;
-
- case STATUS_REMOTE_NOT_LISTENING:
- case STATUS_CONNECTION_REFUSED:
- return WSAECONNREFUSED;
-
- case STATUS_PIPE_DISCONNECTED:
- return WSAESHUTDOWN;
-
- case STATUS_CONFLICTING_ADDRESSES:
- case STATUS_INVALID_ADDRESS:
- case STATUS_INVALID_ADDRESS_COMPONENT:
- return WSAEADDRNOTAVAIL;
-
- case STATUS_NOT_SUPPORTED:
- case STATUS_NOT_IMPLEMENTED:
- return WSAEOPNOTSUPP;
-
- case STATUS_ACCESS_DENIED:
- return WSAEACCES;
-
- default:
- if ((status & (FACILITY_NTWIN32 << 16)) == (FACILITY_NTWIN32 << 16) &&
- (status & (ERROR_SEVERITY_ERROR | ERROR_SEVERITY_WARNING))) {
- /* It's a windows error that has been previously mapped to an */
- /* ntstatus code. */
- return (DWORD) (status & 0xffff);
- } else {
- /* The default fallback for unmappable ntstatus codes. */
- return WSAEINVAL;
- }
- }
-}
-
-
-/*
- * This function provides a workaround for a bug in the winsock implementation
- * of WSARecv. The problem is that when SetFileCompletionNotificationModes is
- * used to avoid IOCP notifications of completed reads, WSARecv does not
- * reliably indicate whether we can expect a completion package to be posted
- * when the receive buffer is smaller than the received datagram.
- *
- * However it is desirable to use SetFileCompletionNotificationModes because
- * it yields a massive performance increase.
- *
- * This function provides a workaround for that bug, but it only works for the
- * specific case that we need it for. E.g. it assumes that the "avoid iocp"
- * bit has been set, and supports only overlapped operation. It also requires
- * the user to use the default msafd driver, doesn't work when other LSPs are
- * stacked on top of it.
- */
-int WSAAPI uv_wsarecv_workaround(SOCKET socket, WSABUF* buffers,
- DWORD buffer_count, DWORD* bytes, DWORD* flags, WSAOVERLAPPED *overlapped,
- LPWSAOVERLAPPED_COMPLETION_ROUTINE completion_routine) {
- NTSTATUS status;
- void* apc_context;
- IO_STATUS_BLOCK* iosb = (IO_STATUS_BLOCK*) &overlapped->Internal;
- AFD_RECV_INFO info;
- DWORD error;
-
- if (overlapped == NULL || completion_routine != NULL) {
- WSASetLastError(WSAEINVAL);
- return SOCKET_ERROR;
- }
-
- info.BufferArray = buffers;
- info.BufferCount = buffer_count;
- info.AfdFlags = AFD_OVERLAPPED;
- info.TdiFlags = TDI_RECEIVE_NORMAL;
-
- if (*flags & MSG_PEEK) {
- info.TdiFlags |= TDI_RECEIVE_PEEK;
- }
-
- if (*flags & MSG_PARTIAL) {
- info.TdiFlags |= TDI_RECEIVE_PARTIAL;
- }
-
- if (!((intptr_t) overlapped->hEvent & 1)) {
- apc_context = (void*) overlapped;
- } else {
- apc_context = NULL;
- }
-
- iosb->Status = STATUS_PENDING;
- iosb->Pointer = 0;
-
- status = pNtDeviceIoControlFile((HANDLE) socket,
- overlapped->hEvent,
- NULL,
- apc_context,
- iosb,
- IOCTL_AFD_RECEIVE,
- &info,
- sizeof(info),
- NULL,
- 0);
-
- *flags = 0;
- *bytes = (DWORD) iosb->Information;
-
- switch (status) {
- case STATUS_SUCCESS:
- error = ERROR_SUCCESS;
- break;
-
- case STATUS_PENDING:
- error = WSA_IO_PENDING;
- break;
-
- case STATUS_BUFFER_OVERFLOW:
- error = WSAEMSGSIZE;
- break;
-
- case STATUS_RECEIVE_EXPEDITED:
- error = ERROR_SUCCESS;
- *flags = MSG_OOB;
- break;
-
- case STATUS_RECEIVE_PARTIAL_EXPEDITED:
- error = ERROR_SUCCESS;
- *flags = MSG_PARTIAL | MSG_OOB;
- break;
-
- case STATUS_RECEIVE_PARTIAL:
- error = ERROR_SUCCESS;
- *flags = MSG_PARTIAL;
- break;
-
- default:
- error = uv_ntstatus_to_winsock_error(status);
- break;
- }
-
- WSASetLastError(error);
-
- if (error == ERROR_SUCCESS) {
- return 0;
- } else {
- return SOCKET_ERROR;
- }
-}
-
-
-/* See description of uv_wsarecv_workaround. */
-int WSAAPI uv_wsarecvfrom_workaround(SOCKET socket, WSABUF* buffers,
- DWORD buffer_count, DWORD* bytes, DWORD* flags, struct sockaddr* addr,
- int* addr_len, WSAOVERLAPPED *overlapped,
- LPWSAOVERLAPPED_COMPLETION_ROUTINE completion_routine) {
- NTSTATUS status;
- void* apc_context;
- IO_STATUS_BLOCK* iosb = (IO_STATUS_BLOCK*) &overlapped->Internal;
- AFD_RECV_DATAGRAM_INFO info;
- DWORD error;
-
- if (overlapped == NULL || addr == NULL || addr_len == NULL ||
- completion_routine != NULL) {
- WSASetLastError(WSAEINVAL);
- return SOCKET_ERROR;
- }
-
- info.BufferArray = buffers;
- info.BufferCount = buffer_count;
- info.AfdFlags = AFD_OVERLAPPED;
- info.TdiFlags = TDI_RECEIVE_NORMAL;
- info.Address = addr;
- info.AddressLength = addr_len;
-
- if (*flags & MSG_PEEK) {
- info.TdiFlags |= TDI_RECEIVE_PEEK;
- }
-
- if (*flags & MSG_PARTIAL) {
- info.TdiFlags |= TDI_RECEIVE_PARTIAL;
- }
-
- if (!((intptr_t) overlapped->hEvent & 1)) {
- apc_context = (void*) overlapped;
- } else {
- apc_context = NULL;
- }
-
- iosb->Status = STATUS_PENDING;
- iosb->Pointer = 0;
-
- status = pNtDeviceIoControlFile((HANDLE) socket,
- overlapped->hEvent,
- NULL,
- apc_context,
- iosb,
- IOCTL_AFD_RECEIVE_DATAGRAM,
- &info,
- sizeof(info),
- NULL,
- 0);
-
- *flags = 0;
- *bytes = (DWORD) iosb->Information;
-
- switch (status) {
- case STATUS_SUCCESS:
- error = ERROR_SUCCESS;
- break;
-
- case STATUS_PENDING:
- error = WSA_IO_PENDING;
- break;
-
- case STATUS_BUFFER_OVERFLOW:
- error = WSAEMSGSIZE;
- break;
-
- case STATUS_RECEIVE_EXPEDITED:
- error = ERROR_SUCCESS;
- *flags = MSG_OOB;
- break;
-
- case STATUS_RECEIVE_PARTIAL_EXPEDITED:
- error = ERROR_SUCCESS;
- *flags = MSG_PARTIAL | MSG_OOB;
- break;
-
- case STATUS_RECEIVE_PARTIAL:
- error = ERROR_SUCCESS;
- *flags = MSG_PARTIAL;
- break;
-
- default:
- error = uv_ntstatus_to_winsock_error(status);
- break;
- }
-
- WSASetLastError(error);
-
- if (error == ERROR_SUCCESS) {
- return 0;
- } else {
- return SOCKET_ERROR;
- }
-}
-
-
-int WSAAPI uv_msafd_poll(SOCKET socket, AFD_POLL_INFO* info_in,
- AFD_POLL_INFO* info_out, OVERLAPPED* overlapped) {
- IO_STATUS_BLOCK iosb;
- IO_STATUS_BLOCK* iosb_ptr;
- HANDLE event = NULL;
- void* apc_context;
- NTSTATUS status;
- DWORD error;
-
- if (overlapped != NULL) {
- /* Overlapped operation. */
- iosb_ptr = (IO_STATUS_BLOCK*) &overlapped->Internal;
- event = overlapped->hEvent;
-
- /* Do not report iocp completion if hEvent is tagged. */
- if ((uintptr_t) event & 1) {
- event = (HANDLE)((uintptr_t) event & ~(uintptr_t) 1);
- apc_context = NULL;
- } else {
- apc_context = overlapped;
- }
-
- } else {
- /* Blocking operation. */
- iosb_ptr = &iosb;
- event = CreateEvent(NULL, FALSE, FALSE, NULL);
- if (event == NULL) {
- return SOCKET_ERROR;
- }
- apc_context = NULL;
- }
-
- iosb_ptr->Status = STATUS_PENDING;
- status = pNtDeviceIoControlFile((HANDLE) socket,
- event,
- NULL,
- apc_context,
- iosb_ptr,
- IOCTL_AFD_POLL,
- info_in,
- sizeof *info_in,
- info_out,
- sizeof *info_out);
-
- if (overlapped == NULL) {
- /* If this is a blocking operation, wait for the event to become */
- /* signaled, and then grab the real status from the io status block. */
- if (status == STATUS_PENDING) {
- DWORD r = WaitForSingleObject(event, INFINITE);
-
- if (r == WAIT_FAILED) {
- DWORD saved_error = GetLastError();
- CloseHandle(event);
- WSASetLastError(saved_error);
- return SOCKET_ERROR;
- }
-
- status = iosb.Status;
- }
-
- CloseHandle(event);
- }
-
- switch (status) {
- case STATUS_SUCCESS:
- error = ERROR_SUCCESS;
- break;
-
- case STATUS_PENDING:
- error = WSA_IO_PENDING;
- break;
-
- default:
- error = uv_ntstatus_to_winsock_error(status);
- break;
- }
-
- WSASetLastError(error);
-
- if (error == ERROR_SUCCESS) {
- return 0;
- } else {
- return SOCKET_ERROR;
- }
-}
diff --git a/3rdparty/libuv/src/win/winsock.h b/3rdparty/libuv/src/win/winsock.h
deleted file mode 100644
index 7c007ab4934..00000000000
--- a/3rdparty/libuv/src/win/winsock.h
+++ /dev/null
@@ -1,190 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#ifndef UV_WIN_WINSOCK_H_
-#define UV_WIN_WINSOCK_H_
-
-#include <winsock2.h>
-#include <iptypes.h>
-#include <mswsock.h>
-#include <ws2tcpip.h>
-#include <windows.h>
-
-#include "winapi.h"
-
-
-/*
- * MinGW is missing these too
- */
-#ifndef SO_UPDATE_CONNECT_CONTEXT
-# define SO_UPDATE_CONNECT_CONTEXT 0x7010
-#endif
-
-#ifndef TCP_KEEPALIVE
-# define TCP_KEEPALIVE 3
-#endif
-
-#ifndef IPV6_V6ONLY
-# define IPV6_V6ONLY 27
-#endif
-
-#ifndef IPV6_HOPLIMIT
-# define IPV6_HOPLIMIT 21
-#endif
-
-#ifndef SIO_BASE_HANDLE
-# define SIO_BASE_HANDLE 0x48000022
-#endif
-
-/*
- * TDI defines that are only in the DDK.
- * We only need receive flags so far.
- */
-#ifndef TDI_RECEIVE_NORMAL
- #define TDI_RECEIVE_BROADCAST 0x00000004
- #define TDI_RECEIVE_MULTICAST 0x00000008
- #define TDI_RECEIVE_PARTIAL 0x00000010
- #define TDI_RECEIVE_NORMAL 0x00000020
- #define TDI_RECEIVE_EXPEDITED 0x00000040
- #define TDI_RECEIVE_PEEK 0x00000080
- #define TDI_RECEIVE_NO_RESPONSE_EXP 0x00000100
- #define TDI_RECEIVE_COPY_LOOKAHEAD 0x00000200
- #define TDI_RECEIVE_ENTIRE_MESSAGE 0x00000400
- #define TDI_RECEIVE_AT_DISPATCH_LEVEL 0x00000800
- #define TDI_RECEIVE_CONTROL_INFO 0x00001000
- #define TDI_RECEIVE_FORCE_INDICATION 0x00002000
- #define TDI_RECEIVE_NO_PUSH 0x00004000
-#endif
-
-/*
- * The "Auxiliary Function Driver" is the windows kernel-mode driver that does
- * TCP, UDP etc. Winsock is just a layer that dispatches requests to it.
- * Having these definitions allows us to bypass winsock and make an AFD kernel
- * call directly, avoiding a bug in winsock's recvfrom implementation.
- */
-
-#define AFD_NO_FAST_IO 0x00000001
-#define AFD_OVERLAPPED 0x00000002
-#define AFD_IMMEDIATE 0x00000004
-
-#define AFD_POLL_RECEIVE_BIT 0
-#define AFD_POLL_RECEIVE (1 << AFD_POLL_RECEIVE_BIT)
-#define AFD_POLL_RECEIVE_EXPEDITED_BIT 1
-#define AFD_POLL_RECEIVE_EXPEDITED (1 << AFD_POLL_RECEIVE_EXPEDITED_BIT)
-#define AFD_POLL_SEND_BIT 2
-#define AFD_POLL_SEND (1 << AFD_POLL_SEND_BIT)
-#define AFD_POLL_DISCONNECT_BIT 3
-#define AFD_POLL_DISCONNECT (1 << AFD_POLL_DISCONNECT_BIT)
-#define AFD_POLL_ABORT_BIT 4
-#define AFD_POLL_ABORT (1 << AFD_POLL_ABORT_BIT)
-#define AFD_POLL_LOCAL_CLOSE_BIT 5
-#define AFD_POLL_LOCAL_CLOSE (1 << AFD_POLL_LOCAL_CLOSE_BIT)
-#define AFD_POLL_CONNECT_BIT 6
-#define AFD_POLL_CONNECT (1 << AFD_POLL_CONNECT_BIT)
-#define AFD_POLL_ACCEPT_BIT 7
-#define AFD_POLL_ACCEPT (1 << AFD_POLL_ACCEPT_BIT)
-#define AFD_POLL_CONNECT_FAIL_BIT 8
-#define AFD_POLL_CONNECT_FAIL (1 << AFD_POLL_CONNECT_FAIL_BIT)
-#define AFD_POLL_QOS_BIT 9
-#define AFD_POLL_QOS (1 << AFD_POLL_QOS_BIT)
-#define AFD_POLL_GROUP_QOS_BIT 10
-#define AFD_POLL_GROUP_QOS (1 << AFD_POLL_GROUP_QOS_BIT)
-
-#define AFD_NUM_POLL_EVENTS 11
-#define AFD_POLL_ALL ((1 << AFD_NUM_POLL_EVENTS) - 1)
-
-typedef struct _AFD_RECV_DATAGRAM_INFO {
- LPWSABUF BufferArray;
- ULONG BufferCount;
- ULONG AfdFlags;
- ULONG TdiFlags;
- struct sockaddr* Address;
- int* AddressLength;
-} AFD_RECV_DATAGRAM_INFO, *PAFD_RECV_DATAGRAM_INFO;
-
-typedef struct _AFD_RECV_INFO {
- LPWSABUF BufferArray;
- ULONG BufferCount;
- ULONG AfdFlags;
- ULONG TdiFlags;
-} AFD_RECV_INFO, *PAFD_RECV_INFO;
-
-
-#define _AFD_CONTROL_CODE(operation, method) \
- ((FSCTL_AFD_BASE) << 12 | (operation << 2) | method)
-
-#define FSCTL_AFD_BASE FILE_DEVICE_NETWORK
-
-#define AFD_RECEIVE 5
-#define AFD_RECEIVE_DATAGRAM 6
-#define AFD_POLL 9
-
-#define IOCTL_AFD_RECEIVE \
- _AFD_CONTROL_CODE(AFD_RECEIVE, METHOD_NEITHER)
-
-#define IOCTL_AFD_RECEIVE_DATAGRAM \
- _AFD_CONTROL_CODE(AFD_RECEIVE_DATAGRAM, METHOD_NEITHER)
-
-#define IOCTL_AFD_POLL \
- _AFD_CONTROL_CODE(AFD_POLL, METHOD_BUFFERED)
-
-#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)
-typedef struct _IP_ADAPTER_UNICAST_ADDRESS_XP {
- /* FIXME: __C89_NAMELESS was removed */
- /* __C89_NAMELESS */ union {
- ULONGLONG Alignment;
- /* __C89_NAMELESS */ struct {
- ULONG Length;
- DWORD Flags;
- };
- };
- struct _IP_ADAPTER_UNICAST_ADDRESS_XP *Next;
- SOCKET_ADDRESS Address;
- IP_PREFIX_ORIGIN PrefixOrigin;
- IP_SUFFIX_ORIGIN SuffixOrigin;
- IP_DAD_STATE DadState;
- ULONG ValidLifetime;
- ULONG PreferredLifetime;
- ULONG LeaseLifetime;
-} IP_ADAPTER_UNICAST_ADDRESS_XP,*PIP_ADAPTER_UNICAST_ADDRESS_XP;
-
-typedef struct _IP_ADAPTER_UNICAST_ADDRESS_LH {
- union {
- ULONGLONG Alignment;
- struct {
- ULONG Length;
- DWORD Flags;
- };
- };
- struct _IP_ADAPTER_UNICAST_ADDRESS_LH *Next;
- SOCKET_ADDRESS Address;
- IP_PREFIX_ORIGIN PrefixOrigin;
- IP_SUFFIX_ORIGIN SuffixOrigin;
- IP_DAD_STATE DadState;
- ULONG ValidLifetime;
- ULONG PreferredLifetime;
- ULONG LeaseLifetime;
- UINT8 OnLinkPrefixLength;
-} IP_ADAPTER_UNICAST_ADDRESS_LH,*PIP_ADAPTER_UNICAST_ADDRESS_LH;
-
-#endif
-
-#endif /* UV_WIN_WINSOCK_H_ */
diff --git a/3rdparty/libuv/test/benchmark-async-pummel.c b/3rdparty/libuv/test/benchmark-async-pummel.c
deleted file mode 100644
index cca3de1062b..00000000000
--- a/3rdparty/libuv/test/benchmark-async-pummel.c
+++ /dev/null
@@ -1,119 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "task.h"
-#include "uv.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#define NUM_PINGS (1000 * 1000)
-#define ACCESS_ONCE(type, var) (*(volatile type*) &(var))
-
-static unsigned int callbacks;
-static volatile int done;
-
-static const char running[] = "running";
-static const char stop[] = "stop";
-static const char stopped[] = "stopped";
-
-
-static void async_cb(uv_async_t* handle) {
- if (++callbacks == NUM_PINGS) {
- /* Tell the pummel thread to stop. */
- ACCESS_ONCE(const char*, handle->data) = stop;
-
- /* Wait for for the pummel thread to acknowledge that it has stoppped. */
- while (ACCESS_ONCE(const char*, handle->data) != stopped)
- uv_sleep(0);
-
- uv_close((uv_handle_t*) handle, NULL);
- }
-}
-
-
-static void pummel(void* arg) {
- uv_async_t* handle = (uv_async_t*) arg;
-
- while (ACCESS_ONCE(const char*, handle->data) == running)
- uv_async_send(handle);
-
- /* Acknowledge that we've seen handle->data change. */
- ACCESS_ONCE(const char*, handle->data) = stopped;
-}
-
-
-static int test_async_pummel(int nthreads) {
- uv_thread_t* tids;
- uv_async_t handle;
- uint64_t time;
- int i;
-
- tids = calloc(nthreads, sizeof(tids[0]));
- ASSERT(tids != NULL);
-
- ASSERT(0 == uv_async_init(uv_default_loop(), &handle, async_cb));
- ACCESS_ONCE(const char*, handle.data) = running;
-
- for (i = 0; i < nthreads; i++)
- ASSERT(0 == uv_thread_create(tids + i, pummel, &handle));
-
- time = uv_hrtime();
-
- ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
-
- time = uv_hrtime() - time;
- done = 1;
-
- for (i = 0; i < nthreads; i++)
- ASSERT(0 == uv_thread_join(tids + i));
-
- printf("async_pummel_%d: %s callbacks in %.2f seconds (%s/sec)\n",
- nthreads,
- fmt(callbacks),
- time / 1e9,
- fmt(callbacks / (time / 1e9)));
-
- free(tids);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-BENCHMARK_IMPL(async_pummel_1) {
- return test_async_pummel(1);
-}
-
-
-BENCHMARK_IMPL(async_pummel_2) {
- return test_async_pummel(2);
-}
-
-
-BENCHMARK_IMPL(async_pummel_4) {
- return test_async_pummel(4);
-}
-
-
-BENCHMARK_IMPL(async_pummel_8) {
- return test_async_pummel(8);
-}
diff --git a/3rdparty/libuv/test/benchmark-async.c b/3rdparty/libuv/test/benchmark-async.c
deleted file mode 100644
index e44165f2b81..00000000000
--- a/3rdparty/libuv/test/benchmark-async.c
+++ /dev/null
@@ -1,141 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "task.h"
-#include "uv.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#define NUM_PINGS (1000 * 1000)
-
-struct ctx {
- uv_loop_t loop;
- uv_thread_t thread;
- uv_async_t main_async; /* wake up main thread */
- uv_async_t worker_async; /* wake up worker */
- unsigned int nthreads;
- unsigned int main_sent;
- unsigned int main_seen;
- unsigned int worker_sent;
- unsigned int worker_seen;
-};
-
-
-static void worker_async_cb(uv_async_t* handle) {
- struct ctx* ctx = container_of(handle, struct ctx, worker_async);
-
- ASSERT(0 == uv_async_send(&ctx->main_async));
- ctx->worker_sent++;
- ctx->worker_seen++;
-
- if (ctx->worker_sent >= NUM_PINGS)
- uv_close((uv_handle_t*) &ctx->worker_async, NULL);
-}
-
-
-static void main_async_cb(uv_async_t* handle) {
- struct ctx* ctx = container_of(handle, struct ctx, main_async);
-
- ASSERT(0 == uv_async_send(&ctx->worker_async));
- ctx->main_sent++;
- ctx->main_seen++;
-
- if (ctx->main_sent >= NUM_PINGS)
- uv_close((uv_handle_t*) &ctx->main_async, NULL);
-}
-
-
-static void worker(void* arg) {
- struct ctx* ctx = arg;
- ASSERT(0 == uv_async_send(&ctx->main_async));
- ASSERT(0 == uv_run(&ctx->loop, UV_RUN_DEFAULT));
- uv_loop_close(&ctx->loop);
-}
-
-
-static int test_async(int nthreads) {
- struct ctx* threads;
- struct ctx* ctx;
- uint64_t time;
- int i;
-
- threads = calloc(nthreads, sizeof(threads[0]));
- ASSERT(threads != NULL);
-
- for (i = 0; i < nthreads; i++) {
- ctx = threads + i;
- ctx->nthreads = nthreads;
- ASSERT(0 == uv_loop_init(&ctx->loop));
- ASSERT(0 == uv_async_init(&ctx->loop, &ctx->worker_async, worker_async_cb));
- ASSERT(0 == uv_async_init(uv_default_loop(),
- &ctx->main_async,
- main_async_cb));
- ASSERT(0 == uv_thread_create(&ctx->thread, worker, ctx));
- }
-
- time = uv_hrtime();
-
- ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
-
- for (i = 0; i < nthreads; i++)
- ASSERT(0 == uv_thread_join(&threads[i].thread));
-
- time = uv_hrtime() - time;
-
- for (i = 0; i < nthreads; i++) {
- ctx = threads + i;
- ASSERT(ctx->worker_sent == NUM_PINGS);
- ASSERT(ctx->worker_seen == NUM_PINGS);
- ASSERT(ctx->main_sent == (unsigned int) NUM_PINGS);
- ASSERT(ctx->main_seen == (unsigned int) NUM_PINGS);
- }
-
- printf("async%d: %.2f sec (%s/sec)\n",
- nthreads,
- time / 1e9,
- fmt(NUM_PINGS / (time / 1e9)));
-
- free(threads);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-BENCHMARK_IMPL(async1) {
- return test_async(1);
-}
-
-
-BENCHMARK_IMPL(async2) {
- return test_async(2);
-}
-
-
-BENCHMARK_IMPL(async4) {
- return test_async(4);
-}
-
-
-BENCHMARK_IMPL(async8) {
- return test_async(8);
-}
diff --git a/3rdparty/libuv/test/benchmark-fs-stat.c b/3rdparty/libuv/test/benchmark-fs-stat.c
deleted file mode 100644
index 32d2589586c..00000000000
--- a/3rdparty/libuv/test/benchmark-fs-stat.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "task.h"
-#include "uv.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#define NUM_SYNC_REQS (10 * 1e5)
-#define NUM_ASYNC_REQS (1 * (int) 1e5)
-#define MAX_CONCURRENT_REQS 32
-
-#define sync_stat(req, path) \
- do { \
- uv_fs_stat(NULL, (req), (path), NULL); \
- uv_fs_req_cleanup((req)); \
- } \
- while (0)
-
-struct async_req {
- const char* path;
- uv_fs_t fs_req;
- int* count;
-};
-
-
-static void warmup(const char* path) {
- uv_fs_t reqs[MAX_CONCURRENT_REQS];
- unsigned int i;
-
- /* warm up the thread pool */
- for (i = 0; i < ARRAY_SIZE(reqs); i++)
- uv_fs_stat(uv_default_loop(), reqs + i, path, uv_fs_req_cleanup);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- /* warm up the OS dirent cache */
- for (i = 0; i < 16; i++)
- sync_stat(reqs + 0, path);
-}
-
-
-static void sync_bench(const char* path) {
- uint64_t before;
- uint64_t after;
- uv_fs_t req;
- int i;
-
- /* do the sync benchmark */
- before = uv_hrtime();
-
- for (i = 0; i < NUM_SYNC_REQS; i++)
- sync_stat(&req, path);
-
- after = uv_hrtime();
-
- printf("%s stats (sync): %.2fs (%s/s)\n",
- fmt(1.0 * NUM_SYNC_REQS),
- (after - before) / 1e9,
- fmt((1.0 * NUM_SYNC_REQS) / ((after - before) / 1e9)));
- fflush(stdout);
-}
-
-
-static void stat_cb(uv_fs_t* fs_req) {
- struct async_req* req = container_of(fs_req, struct async_req, fs_req);
- uv_fs_req_cleanup(&req->fs_req);
- if (*req->count == 0) return;
- uv_fs_stat(uv_default_loop(), &req->fs_req, req->path, stat_cb);
- (*req->count)--;
-}
-
-
-static void async_bench(const char* path) {
- struct async_req reqs[MAX_CONCURRENT_REQS];
- struct async_req* req;
- uint64_t before;
- uint64_t after;
- int count;
- int i;
-
- for (i = 1; i <= MAX_CONCURRENT_REQS; i++) {
- count = NUM_ASYNC_REQS;
-
- for (req = reqs; req < reqs + i; req++) {
- req->path = path;
- req->count = &count;
- uv_fs_stat(uv_default_loop(), &req->fs_req, req->path, stat_cb);
- }
-
- before = uv_hrtime();
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- after = uv_hrtime();
-
- printf("%s stats (%d concurrent): %.2fs (%s/s)\n",
- fmt(1.0 * NUM_ASYNC_REQS),
- i,
- (after - before) / 1e9,
- fmt((1.0 * NUM_ASYNC_REQS) / ((after - before) / 1e9)));
- fflush(stdout);
- }
-}
-
-
-/* This benchmark aims to measure the overhead of doing I/O syscalls from
- * the thread pool. The stat() syscall was chosen because its results are
- * easy for the operating system to cache, taking the actual I/O overhead
- * out of the equation.
- */
-BENCHMARK_IMPL(fs_stat) {
- const char path[] = ".";
- warmup(path);
- sync_bench(path);
- async_bench(path);
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/benchmark-getaddrinfo.c b/3rdparty/libuv/test/benchmark-getaddrinfo.c
deleted file mode 100644
index 1dbc23ddba0..00000000000
--- a/3rdparty/libuv/test/benchmark-getaddrinfo.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-#include <stdlib.h>
-
-#define CONCURRENT_CALLS 10
-#define TOTAL_CALLS 10000
-
-static const char* name = "localhost";
-
-static uv_loop_t* loop;
-
-static uv_getaddrinfo_t handles[CONCURRENT_CALLS];
-
-static int calls_initiated = 0;
-static int calls_completed = 0;
-static int64_t start_time;
-static int64_t end_time;
-
-
-static void getaddrinfo_initiate(uv_getaddrinfo_t* handle);
-
-
-static void getaddrinfo_cb(uv_getaddrinfo_t* handle, int status,
- struct addrinfo* res) {
- ASSERT(status == 0);
- calls_completed++;
- if (calls_initiated < TOTAL_CALLS) {
- getaddrinfo_initiate(handle);
- }
-
- uv_freeaddrinfo(res);
-}
-
-
-static void getaddrinfo_initiate(uv_getaddrinfo_t* handle) {
- int r;
-
- calls_initiated++;
-
- r = uv_getaddrinfo(loop, handle, &getaddrinfo_cb, name, NULL, NULL);
- ASSERT(r == 0);
-}
-
-
-BENCHMARK_IMPL(getaddrinfo) {
- int i;
-
- loop = uv_default_loop();
-
- uv_update_time(loop);
- start_time = uv_now(loop);
-
- for (i = 0; i < CONCURRENT_CALLS; i++) {
- getaddrinfo_initiate(&handles[i]);
- }
-
- uv_run(loop, UV_RUN_DEFAULT);
-
- uv_update_time(loop);
- end_time = uv_now(loop);
-
- ASSERT(calls_initiated == TOTAL_CALLS);
- ASSERT(calls_completed == TOTAL_CALLS);
-
- fprintf(stderr, "getaddrinfo: %.0f req/s\n",
- (double) calls_completed / (double) (end_time - start_time) * 1000.0);
- fflush(stderr);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/benchmark-list.h b/3rdparty/libuv/test/benchmark-list.h
deleted file mode 100644
index 1e843071c01..00000000000
--- a/3rdparty/libuv/test/benchmark-list.h
+++ /dev/null
@@ -1,163 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-BENCHMARK_DECLARE (sizes)
-BENCHMARK_DECLARE (loop_count)
-BENCHMARK_DECLARE (loop_count_timed)
-BENCHMARK_DECLARE (ping_pongs)
-BENCHMARK_DECLARE (tcp_write_batch)
-BENCHMARK_DECLARE (tcp4_pound_100)
-BENCHMARK_DECLARE (tcp4_pound_1000)
-BENCHMARK_DECLARE (pipe_pound_100)
-BENCHMARK_DECLARE (pipe_pound_1000)
-BENCHMARK_DECLARE (tcp_pump100_client)
-BENCHMARK_DECLARE (tcp_pump1_client)
-BENCHMARK_DECLARE (pipe_pump100_client)
-BENCHMARK_DECLARE (pipe_pump1_client)
-
-BENCHMARK_DECLARE (tcp_multi_accept2)
-BENCHMARK_DECLARE (tcp_multi_accept4)
-BENCHMARK_DECLARE (tcp_multi_accept8)
-
-/* Run until X packets have been sent/received. */
-BENCHMARK_DECLARE (udp_pummel_1v1)
-BENCHMARK_DECLARE (udp_pummel_1v10)
-BENCHMARK_DECLARE (udp_pummel_1v100)
-BENCHMARK_DECLARE (udp_pummel_1v1000)
-BENCHMARK_DECLARE (udp_pummel_10v10)
-BENCHMARK_DECLARE (udp_pummel_10v100)
-BENCHMARK_DECLARE (udp_pummel_10v1000)
-BENCHMARK_DECLARE (udp_pummel_100v100)
-BENCHMARK_DECLARE (udp_pummel_100v1000)
-BENCHMARK_DECLARE (udp_pummel_1000v1000)
-
-/* Run until X seconds have elapsed. */
-BENCHMARK_DECLARE (udp_timed_pummel_1v1)
-BENCHMARK_DECLARE (udp_timed_pummel_1v10)
-BENCHMARK_DECLARE (udp_timed_pummel_1v100)
-BENCHMARK_DECLARE (udp_timed_pummel_1v1000)
-BENCHMARK_DECLARE (udp_timed_pummel_10v10)
-BENCHMARK_DECLARE (udp_timed_pummel_10v100)
-BENCHMARK_DECLARE (udp_timed_pummel_10v1000)
-BENCHMARK_DECLARE (udp_timed_pummel_100v100)
-BENCHMARK_DECLARE (udp_timed_pummel_100v1000)
-BENCHMARK_DECLARE (udp_timed_pummel_1000v1000)
-
-BENCHMARK_DECLARE (getaddrinfo)
-BENCHMARK_DECLARE (fs_stat)
-BENCHMARK_DECLARE (async1)
-BENCHMARK_DECLARE (async2)
-BENCHMARK_DECLARE (async4)
-BENCHMARK_DECLARE (async8)
-BENCHMARK_DECLARE (async_pummel_1)
-BENCHMARK_DECLARE (async_pummel_2)
-BENCHMARK_DECLARE (async_pummel_4)
-BENCHMARK_DECLARE (async_pummel_8)
-BENCHMARK_DECLARE (spawn)
-BENCHMARK_DECLARE (thread_create)
-BENCHMARK_DECLARE (million_async)
-BENCHMARK_DECLARE (million_timers)
-HELPER_DECLARE (tcp4_blackhole_server)
-HELPER_DECLARE (tcp_pump_server)
-HELPER_DECLARE (pipe_pump_server)
-HELPER_DECLARE (tcp4_echo_server)
-HELPER_DECLARE (pipe_echo_server)
-HELPER_DECLARE (dns_server)
-
-TASK_LIST_START
- BENCHMARK_ENTRY (sizes)
- BENCHMARK_ENTRY (loop_count)
- BENCHMARK_ENTRY (loop_count_timed)
-
- BENCHMARK_ENTRY (ping_pongs)
- BENCHMARK_HELPER (ping_pongs, tcp4_echo_server)
-
- BENCHMARK_ENTRY (tcp_write_batch)
- BENCHMARK_HELPER (tcp_write_batch, tcp4_blackhole_server)
-
- BENCHMARK_ENTRY (tcp_pump100_client)
- BENCHMARK_HELPER (tcp_pump100_client, tcp_pump_server)
-
- BENCHMARK_ENTRY (tcp_pump1_client)
- BENCHMARK_HELPER (tcp_pump1_client, tcp_pump_server)
-
- BENCHMARK_ENTRY (tcp4_pound_100)
- BENCHMARK_HELPER (tcp4_pound_100, tcp4_echo_server)
-
- BENCHMARK_ENTRY (tcp4_pound_1000)
- BENCHMARK_HELPER (tcp4_pound_1000, tcp4_echo_server)
-
- BENCHMARK_ENTRY (pipe_pump100_client)
- BENCHMARK_HELPER (pipe_pump100_client, pipe_pump_server)
-
- BENCHMARK_ENTRY (pipe_pump1_client)
- BENCHMARK_HELPER (pipe_pump1_client, pipe_pump_server)
-
- BENCHMARK_ENTRY (pipe_pound_100)
- BENCHMARK_HELPER (pipe_pound_100, pipe_echo_server)
-
- BENCHMARK_ENTRY (pipe_pound_1000)
- BENCHMARK_HELPER (pipe_pound_1000, pipe_echo_server)
-
- BENCHMARK_ENTRY (tcp_multi_accept2)
- BENCHMARK_ENTRY (tcp_multi_accept4)
- BENCHMARK_ENTRY (tcp_multi_accept8)
-
- BENCHMARK_ENTRY (udp_pummel_1v1)
- BENCHMARK_ENTRY (udp_pummel_1v10)
- BENCHMARK_ENTRY (udp_pummel_1v100)
- BENCHMARK_ENTRY (udp_pummel_1v1000)
- BENCHMARK_ENTRY (udp_pummel_10v10)
- BENCHMARK_ENTRY (udp_pummel_10v100)
- BENCHMARK_ENTRY (udp_pummel_10v1000)
- BENCHMARK_ENTRY (udp_pummel_100v100)
- BENCHMARK_ENTRY (udp_pummel_100v1000)
- BENCHMARK_ENTRY (udp_pummel_1000v1000)
-
- BENCHMARK_ENTRY (udp_timed_pummel_1v1)
- BENCHMARK_ENTRY (udp_timed_pummel_1v10)
- BENCHMARK_ENTRY (udp_timed_pummel_1v100)
- BENCHMARK_ENTRY (udp_timed_pummel_1v1000)
- BENCHMARK_ENTRY (udp_timed_pummel_10v10)
- BENCHMARK_ENTRY (udp_timed_pummel_10v100)
- BENCHMARK_ENTRY (udp_timed_pummel_10v1000)
- BENCHMARK_ENTRY (udp_timed_pummel_100v100)
- BENCHMARK_ENTRY (udp_timed_pummel_100v1000)
- BENCHMARK_ENTRY (udp_timed_pummel_1000v1000)
-
- BENCHMARK_ENTRY (getaddrinfo)
-
- BENCHMARK_ENTRY (fs_stat)
-
- BENCHMARK_ENTRY (async1)
- BENCHMARK_ENTRY (async2)
- BENCHMARK_ENTRY (async4)
- BENCHMARK_ENTRY (async8)
- BENCHMARK_ENTRY (async_pummel_1)
- BENCHMARK_ENTRY (async_pummel_2)
- BENCHMARK_ENTRY (async_pummel_4)
- BENCHMARK_ENTRY (async_pummel_8)
-
- BENCHMARK_ENTRY (spawn)
- BENCHMARK_ENTRY (thread_create)
- BENCHMARK_ENTRY (million_async)
- BENCHMARK_ENTRY (million_timers)
-TASK_LIST_END
diff --git a/3rdparty/libuv/test/benchmark-loop-count.c b/3rdparty/libuv/test/benchmark-loop-count.c
deleted file mode 100644
index 970a94c2fec..00000000000
--- a/3rdparty/libuv/test/benchmark-loop-count.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "task.h"
-#include "uv.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#define NUM_TICKS (2 * 1000 * 1000)
-
-static unsigned long ticks;
-static uv_idle_t idle_handle;
-static uv_timer_t timer_handle;
-
-
-static void idle_cb(uv_idle_t* handle) {
- if (++ticks == NUM_TICKS)
- uv_idle_stop(handle);
-}
-
-
-static void idle2_cb(uv_idle_t* handle) {
- ticks++;
-}
-
-
-static void timer_cb(uv_timer_t* handle) {
- uv_idle_stop(&idle_handle);
- uv_timer_stop(&timer_handle);
-}
-
-
-BENCHMARK_IMPL(loop_count) {
- uv_loop_t* loop = uv_default_loop();
- uint64_t ns;
-
- uv_idle_init(loop, &idle_handle);
- uv_idle_start(&idle_handle, idle_cb);
-
- ns = uv_hrtime();
- uv_run(loop, UV_RUN_DEFAULT);
- ns = uv_hrtime() - ns;
-
- ASSERT(ticks == NUM_TICKS);
-
- fprintf(stderr, "loop_count: %d ticks in %.2fs (%.0f/s)\n",
- NUM_TICKS,
- ns / 1e9,
- NUM_TICKS / (ns / 1e9));
- fflush(stderr);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-BENCHMARK_IMPL(loop_count_timed) {
- uv_loop_t* loop = uv_default_loop();
-
- uv_idle_init(loop, &idle_handle);
- uv_idle_start(&idle_handle, idle2_cb);
-
- uv_timer_init(loop, &timer_handle);
- uv_timer_start(&timer_handle, timer_cb, 5000, 0);
-
- uv_run(loop, UV_RUN_DEFAULT);
-
- fprintf(stderr, "loop_count: %lu ticks (%.0f ticks/s)\n", ticks, ticks / 5.0);
- fflush(stderr);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/benchmark-million-async.c b/3rdparty/libuv/test/benchmark-million-async.c
deleted file mode 100644
index 5395ed54bab..00000000000
--- a/3rdparty/libuv/test/benchmark-million-async.c
+++ /dev/null
@@ -1,112 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "task.h"
-#include "uv.h"
-
-struct async_container {
- unsigned async_events;
- unsigned handles_seen;
- uv_async_t async_handles[1024 * 1024];
-};
-
-static volatile int done;
-static uv_thread_t thread_id;
-static struct async_container* container;
-
-
-static unsigned fastrand(void) {
- static unsigned g = 0;
- g = g * 214013 + 2531011;
- return g;
-}
-
-
-static void thread_cb(void* arg) {
- unsigned i;
-
- while (done == 0) {
- i = fastrand() % ARRAY_SIZE(container->async_handles);
- uv_async_send(container->async_handles + i);
- }
-}
-
-
-static void async_cb(uv_async_t* handle) {
- container->async_events++;
- handle->data = handle;
-}
-
-
-static void timer_cb(uv_timer_t* handle) {
- unsigned i;
-
- done = 1;
- ASSERT(0 == uv_thread_join(&thread_id));
-
- for (i = 0; i < ARRAY_SIZE(container->async_handles); i++) {
- uv_async_t* handle = container->async_handles + i;
-
- if (handle->data != NULL)
- container->handles_seen++;
-
- uv_close((uv_handle_t*) handle, NULL);
- }
-
- uv_close((uv_handle_t*) handle, NULL);
-}
-
-
-BENCHMARK_IMPL(million_async) {
- uv_timer_t timer_handle;
- uv_async_t* handle;
- uv_loop_t* loop;
- int timeout;
- unsigned i;
-
- loop = uv_default_loop();
- timeout = 5000;
-
- container = malloc(sizeof(*container));
- ASSERT(container != NULL);
- container->async_events = 0;
- container->handles_seen = 0;
-
- for (i = 0; i < ARRAY_SIZE(container->async_handles); i++) {
- handle = container->async_handles + i;
- ASSERT(0 == uv_async_init(loop, handle, async_cb));
- handle->data = NULL;
- }
-
- ASSERT(0 == uv_timer_init(loop, &timer_handle));
- ASSERT(0 == uv_timer_start(&timer_handle, timer_cb, timeout, 0));
- ASSERT(0 == uv_thread_create(&thread_id, thread_cb, NULL));
- ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
- printf("%s async events in %.1f seconds (%s/s, %s unique handles seen)\n",
- fmt(container->async_events),
- timeout / 1000.,
- fmt(container->async_events / (timeout / 1000.)),
- fmt(container->handles_seen));
- free(container);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/benchmark-million-timers.c b/3rdparty/libuv/test/benchmark-million-timers.c
deleted file mode 100644
index 60a308bef13..00000000000
--- a/3rdparty/libuv/test/benchmark-million-timers.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "task.h"
-#include "uv.h"
-
-#define NUM_TIMERS (10 * 1000 * 1000)
-
-static int timer_cb_called;
-static int close_cb_called;
-
-
-static void timer_cb(uv_timer_t* handle) {
- timer_cb_called++;
-}
-
-
-static void close_cb(uv_handle_t* handle) {
- close_cb_called++;
-}
-
-
-BENCHMARK_IMPL(million_timers) {
- uv_timer_t* timers;
- uv_loop_t* loop;
- uint64_t before_all;
- uint64_t before_run;
- uint64_t after_run;
- uint64_t after_all;
- int timeout;
- int i;
-
- timers = malloc(NUM_TIMERS * sizeof(timers[0]));
- ASSERT(timers != NULL);
-
- loop = uv_default_loop();
- timeout = 0;
-
- before_all = uv_hrtime();
- for (i = 0; i < NUM_TIMERS; i++) {
- if (i % 1000 == 0) timeout++;
- ASSERT(0 == uv_timer_init(loop, timers + i));
- ASSERT(0 == uv_timer_start(timers + i, timer_cb, timeout, 0));
- }
-
- before_run = uv_hrtime();
- ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
- after_run = uv_hrtime();
-
- for (i = 0; i < NUM_TIMERS; i++)
- uv_close((uv_handle_t*) (timers + i), close_cb);
-
- ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
- after_all = uv_hrtime();
-
- ASSERT(timer_cb_called == NUM_TIMERS);
- ASSERT(close_cb_called == NUM_TIMERS);
- free(timers);
-
- fprintf(stderr, "%.2f seconds total\n", (after_all - before_all) / 1e9);
- fprintf(stderr, "%.2f seconds init\n", (before_run - before_all) / 1e9);
- fprintf(stderr, "%.2f seconds dispatch\n", (after_run - before_run) / 1e9);
- fprintf(stderr, "%.2f seconds cleanup\n", (after_all - after_run) / 1e9);
- fflush(stderr);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/benchmark-multi-accept.c b/3rdparty/libuv/test/benchmark-multi-accept.c
deleted file mode 100644
index 2f32c0caf4a..00000000000
--- a/3rdparty/libuv/test/benchmark-multi-accept.c
+++ /dev/null
@@ -1,447 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "task.h"
-#include "uv.h"
-
-#define IPC_PIPE_NAME TEST_PIPENAME
-#define NUM_CONNECTS (250 * 1000)
-
-union stream_handle {
- uv_pipe_t pipe;
- uv_tcp_t tcp;
-};
-
-/* Use as (uv_stream_t *) &handle_storage -- it's kind of clunky but it
- * avoids aliasing warnings.
- */
-typedef unsigned char handle_storage_t[sizeof(union stream_handle)];
-
-/* Used for passing around the listen handle, not part of the benchmark proper.
- * We have an overabundance of server types here. It works like this:
- *
- * 1. The main thread starts an IPC pipe server.
- * 2. The worker threads connect to the IPC server and obtain a listen handle.
- * 3. The worker threads start accepting requests on the listen handle.
- * 4. The main thread starts connecting repeatedly.
- *
- * Step #4 should perhaps be farmed out over several threads.
- */
-struct ipc_server_ctx {
- handle_storage_t server_handle;
- unsigned int num_connects;
- uv_pipe_t ipc_pipe;
-};
-
-struct ipc_peer_ctx {
- handle_storage_t peer_handle;
- uv_write_t write_req;
-};
-
-struct ipc_client_ctx {
- uv_connect_t connect_req;
- uv_stream_t* server_handle;
- uv_pipe_t ipc_pipe;
- char scratch[16];
-};
-
-/* Used in the actual benchmark. */
-struct server_ctx {
- handle_storage_t server_handle;
- unsigned int num_connects;
- uv_async_t async_handle;
- uv_thread_t thread_id;
- uv_sem_t semaphore;
-};
-
-struct client_ctx {
- handle_storage_t client_handle;
- unsigned int num_connects;
- uv_connect_t connect_req;
- uv_idle_t idle_handle;
-};
-
-static void ipc_connection_cb(uv_stream_t* ipc_pipe, int status);
-static void ipc_write_cb(uv_write_t* req, int status);
-static void ipc_close_cb(uv_handle_t* handle);
-static void ipc_connect_cb(uv_connect_t* req, int status);
-static void ipc_read_cb(uv_stream_t* handle,
- ssize_t nread,
- const uv_buf_t* buf);
-static void ipc_alloc_cb(uv_handle_t* handle,
- size_t suggested_size,
- uv_buf_t* buf);
-
-static void sv_async_cb(uv_async_t* handle);
-static void sv_connection_cb(uv_stream_t* server_handle, int status);
-static void sv_read_cb(uv_stream_t* handle, ssize_t nread, const uv_buf_t* buf);
-static void sv_alloc_cb(uv_handle_t* handle,
- size_t suggested_size,
- uv_buf_t* buf);
-
-static void cl_connect_cb(uv_connect_t* req, int status);
-static void cl_idle_cb(uv_idle_t* handle);
-static void cl_close_cb(uv_handle_t* handle);
-
-static struct sockaddr_in listen_addr;
-
-
-static void ipc_connection_cb(uv_stream_t* ipc_pipe, int status) {
- struct ipc_server_ctx* sc;
- struct ipc_peer_ctx* pc;
- uv_loop_t* loop;
- uv_buf_t buf;
-
- loop = ipc_pipe->loop;
- buf = uv_buf_init("PING", 4);
- sc = container_of(ipc_pipe, struct ipc_server_ctx, ipc_pipe);
- pc = calloc(1, sizeof(*pc));
- ASSERT(pc != NULL);
-
- if (ipc_pipe->type == UV_TCP)
- ASSERT(0 == uv_tcp_init(loop, (uv_tcp_t*) &pc->peer_handle));
- else if (ipc_pipe->type == UV_NAMED_PIPE)
- ASSERT(0 == uv_pipe_init(loop, (uv_pipe_t*) &pc->peer_handle, 1));
- else
- ASSERT(0);
-
- ASSERT(0 == uv_accept(ipc_pipe, (uv_stream_t*) &pc->peer_handle));
- ASSERT(0 == uv_write2(&pc->write_req,
- (uv_stream_t*) &pc->peer_handle,
- &buf,
- 1,
- (uv_stream_t*) &sc->server_handle,
- ipc_write_cb));
-
- if (--sc->num_connects == 0)
- uv_close((uv_handle_t*) ipc_pipe, NULL);
-}
-
-
-static void ipc_write_cb(uv_write_t* req, int status) {
- struct ipc_peer_ctx* ctx;
- ctx = container_of(req, struct ipc_peer_ctx, write_req);
- uv_close((uv_handle_t*) &ctx->peer_handle, ipc_close_cb);
-}
-
-
-static void ipc_close_cb(uv_handle_t* handle) {
- struct ipc_peer_ctx* ctx;
- ctx = container_of(handle, struct ipc_peer_ctx, peer_handle);
- free(ctx);
-}
-
-
-static void ipc_connect_cb(uv_connect_t* req, int status) {
- struct ipc_client_ctx* ctx;
- ctx = container_of(req, struct ipc_client_ctx, connect_req);
- ASSERT(0 == status);
- ASSERT(0 == uv_read_start((uv_stream_t*) &ctx->ipc_pipe,
- ipc_alloc_cb,
- ipc_read_cb));
-}
-
-
-static void ipc_alloc_cb(uv_handle_t* handle,
- size_t suggested_size,
- uv_buf_t* buf) {
- struct ipc_client_ctx* ctx;
- ctx = container_of(handle, struct ipc_client_ctx, ipc_pipe);
- buf->base = ctx->scratch;
- buf->len = sizeof(ctx->scratch);
-}
-
-
-static void ipc_read_cb(uv_stream_t* handle,
- ssize_t nread,
- const uv_buf_t* buf) {
- struct ipc_client_ctx* ctx;
- uv_loop_t* loop;
- uv_handle_type type;
- uv_pipe_t* ipc_pipe;
-
- ipc_pipe = (uv_pipe_t*) handle;
- ctx = container_of(ipc_pipe, struct ipc_client_ctx, ipc_pipe);
- loop = ipc_pipe->loop;
-
- ASSERT(1 == uv_pipe_pending_count(ipc_pipe));
- type = uv_pipe_pending_type(ipc_pipe);
- if (type == UV_TCP)
- ASSERT(0 == uv_tcp_init(loop, (uv_tcp_t*) ctx->server_handle));
- else if (type == UV_NAMED_PIPE)
- ASSERT(0 == uv_pipe_init(loop, (uv_pipe_t*) ctx->server_handle, 0));
- else
- ASSERT(0);
-
- ASSERT(0 == uv_accept(handle, ctx->server_handle));
- uv_close((uv_handle_t*) &ctx->ipc_pipe, NULL);
-}
-
-
-/* Set up an IPC pipe server that hands out listen sockets to the worker
- * threads. It's kind of cumbersome for such a simple operation, maybe we
- * should revive uv_import() and uv_export().
- */
-static void send_listen_handles(uv_handle_type type,
- unsigned int num_servers,
- struct server_ctx* servers) {
- struct ipc_server_ctx ctx;
- uv_loop_t* loop;
- unsigned int i;
-
- loop = uv_default_loop();
- ctx.num_connects = num_servers;
-
- if (type == UV_TCP) {
- ASSERT(0 == uv_tcp_init(loop, (uv_tcp_t*) &ctx.server_handle));
- ASSERT(0 == uv_tcp_bind((uv_tcp_t*) &ctx.server_handle,
- (const struct sockaddr*) &listen_addr,
- 0));
- }
- else
- ASSERT(0);
-
- ASSERT(0 == uv_pipe_init(loop, &ctx.ipc_pipe, 1));
- ASSERT(0 == uv_pipe_bind(&ctx.ipc_pipe, IPC_PIPE_NAME));
- ASSERT(0 == uv_listen((uv_stream_t*) &ctx.ipc_pipe, 128, ipc_connection_cb));
-
- for (i = 0; i < num_servers; i++)
- uv_sem_post(&servers[i].semaphore);
-
- ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
- uv_close((uv_handle_t*) &ctx.server_handle, NULL);
- ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
-
- for (i = 0; i < num_servers; i++)
- uv_sem_wait(&servers[i].semaphore);
-}
-
-
-static void get_listen_handle(uv_loop_t* loop, uv_stream_t* server_handle) {
- struct ipc_client_ctx ctx;
-
- ctx.server_handle = server_handle;
- ctx.server_handle->data = "server handle";
-
- ASSERT(0 == uv_pipe_init(loop, &ctx.ipc_pipe, 1));
- uv_pipe_connect(&ctx.connect_req,
- &ctx.ipc_pipe,
- IPC_PIPE_NAME,
- ipc_connect_cb);
- ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
-}
-
-
-static void server_cb(void *arg) {
- struct server_ctx *ctx;
- uv_loop_t loop;
-
- ctx = arg;
- ASSERT(0 == uv_loop_init(&loop));
-
- ASSERT(0 == uv_async_init(&loop, &ctx->async_handle, sv_async_cb));
- uv_unref((uv_handle_t*) &ctx->async_handle);
-
- /* Wait until the main thread is ready. */
- uv_sem_wait(&ctx->semaphore);
- get_listen_handle(&loop, (uv_stream_t*) &ctx->server_handle);
- uv_sem_post(&ctx->semaphore);
-
- /* Now start the actual benchmark. */
- ASSERT(0 == uv_listen((uv_stream_t*) &ctx->server_handle,
- 128,
- sv_connection_cb));
- ASSERT(0 == uv_run(&loop, UV_RUN_DEFAULT));
-
- uv_loop_close(&loop);
-}
-
-
-static void sv_async_cb(uv_async_t* handle) {
- struct server_ctx* ctx;
- ctx = container_of(handle, struct server_ctx, async_handle);
- uv_close((uv_handle_t*) &ctx->server_handle, NULL);
- uv_close((uv_handle_t*) &ctx->async_handle, NULL);
-}
-
-
-static void sv_connection_cb(uv_stream_t* server_handle, int status) {
- handle_storage_t* storage;
- struct server_ctx* ctx;
-
- ctx = container_of(server_handle, struct server_ctx, server_handle);
- ASSERT(status == 0);
-
- storage = malloc(sizeof(*storage));
- ASSERT(storage != NULL);
-
- if (server_handle->type == UV_TCP)
- ASSERT(0 == uv_tcp_init(server_handle->loop, (uv_tcp_t*) storage));
- else if (server_handle->type == UV_NAMED_PIPE)
- ASSERT(0 == uv_pipe_init(server_handle->loop, (uv_pipe_t*) storage, 0));
- else
- ASSERT(0);
-
- ASSERT(0 == uv_accept(server_handle, (uv_stream_t*) storage));
- ASSERT(0 == uv_read_start((uv_stream_t*) storage, sv_alloc_cb, sv_read_cb));
- ctx->num_connects++;
-}
-
-
-static void sv_alloc_cb(uv_handle_t* handle,
- size_t suggested_size,
- uv_buf_t* buf) {
- static char slab[32];
- buf->base = slab;
- buf->len = sizeof(slab);
-}
-
-
-static void sv_read_cb(uv_stream_t* handle,
- ssize_t nread,
- const uv_buf_t* buf) {
- ASSERT(nread == UV_EOF);
- uv_close((uv_handle_t*) handle, (uv_close_cb) free);
-}
-
-
-static void cl_connect_cb(uv_connect_t* req, int status) {
- struct client_ctx* ctx = container_of(req, struct client_ctx, connect_req);
- uv_idle_start(&ctx->idle_handle, cl_idle_cb);
- ASSERT(0 == status);
-}
-
-
-static void cl_idle_cb(uv_idle_t* handle) {
- struct client_ctx* ctx = container_of(handle, struct client_ctx, idle_handle);
- uv_close((uv_handle_t*) &ctx->client_handle, cl_close_cb);
- uv_idle_stop(&ctx->idle_handle);
-}
-
-
-static void cl_close_cb(uv_handle_t* handle) {
- struct client_ctx* ctx;
-
- ctx = container_of(handle, struct client_ctx, client_handle);
-
- if (--ctx->num_connects == 0) {
- uv_close((uv_handle_t*) &ctx->idle_handle, NULL);
- return;
- }
-
- ASSERT(0 == uv_tcp_init(handle->loop, (uv_tcp_t*) &ctx->client_handle));
- ASSERT(0 == uv_tcp_connect(&ctx->connect_req,
- (uv_tcp_t*) &ctx->client_handle,
- (const struct sockaddr*) &listen_addr,
- cl_connect_cb));
-}
-
-
-static int test_tcp(unsigned int num_servers, unsigned int num_clients) {
- struct server_ctx* servers;
- struct client_ctx* clients;
- uv_loop_t* loop;
- uv_tcp_t* handle;
- unsigned int i;
- double time;
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &listen_addr));
- loop = uv_default_loop();
-
- servers = calloc(num_servers, sizeof(servers[0]));
- clients = calloc(num_clients, sizeof(clients[0]));
- ASSERT(servers != NULL);
- ASSERT(clients != NULL);
-
- /* We're making the assumption here that from the perspective of the
- * OS scheduler, threads are functionally equivalent to and interchangeable
- * with full-blown processes.
- */
- for (i = 0; i < num_servers; i++) {
- struct server_ctx* ctx = servers + i;
- ASSERT(0 == uv_sem_init(&ctx->semaphore, 0));
- ASSERT(0 == uv_thread_create(&ctx->thread_id, server_cb, ctx));
- }
-
- send_listen_handles(UV_TCP, num_servers, servers);
-
- for (i = 0; i < num_clients; i++) {
- struct client_ctx* ctx = clients + i;
- ctx->num_connects = NUM_CONNECTS / num_clients;
- handle = (uv_tcp_t*) &ctx->client_handle;
- handle->data = "client handle";
- ASSERT(0 == uv_tcp_init(loop, handle));
- ASSERT(0 == uv_tcp_connect(&ctx->connect_req,
- handle,
- (const struct sockaddr*) &listen_addr,
- cl_connect_cb));
- ASSERT(0 == uv_idle_init(loop, &ctx->idle_handle));
- }
-
- {
- uint64_t t = uv_hrtime();
- ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
- t = uv_hrtime() - t;
- time = t / 1e9;
- }
-
- for (i = 0; i < num_servers; i++) {
- struct server_ctx* ctx = servers + i;
- uv_async_send(&ctx->async_handle);
- ASSERT(0 == uv_thread_join(&ctx->thread_id));
- uv_sem_destroy(&ctx->semaphore);
- }
-
- printf("accept%u: %.0f accepts/sec (%u total)\n",
- num_servers,
- NUM_CONNECTS / time,
- NUM_CONNECTS);
-
- for (i = 0; i < num_servers; i++) {
- struct server_ctx* ctx = servers + i;
- printf(" thread #%u: %.0f accepts/sec (%u total, %.1f%%)\n",
- i,
- ctx->num_connects / time,
- ctx->num_connects,
- ctx->num_connects * 100.0 / NUM_CONNECTS);
- }
-
- free(clients);
- free(servers);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-BENCHMARK_IMPL(tcp_multi_accept2) {
- return test_tcp(2, 40);
-}
-
-
-BENCHMARK_IMPL(tcp_multi_accept4) {
- return test_tcp(4, 40);
-}
-
-
-BENCHMARK_IMPL(tcp_multi_accept8) {
- return test_tcp(8, 40);
-}
diff --git a/3rdparty/libuv/test/benchmark-ping-pongs.c b/3rdparty/libuv/test/benchmark-ping-pongs.c
deleted file mode 100644
index 646a7df9447..00000000000
--- a/3rdparty/libuv/test/benchmark-ping-pongs.c
+++ /dev/null
@@ -1,221 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-
-/* Run the benchmark for this many ms */
-#define TIME 5000
-
-
-typedef struct {
- int pongs;
- int state;
- uv_tcp_t tcp;
- uv_connect_t connect_req;
- uv_shutdown_t shutdown_req;
-} pinger_t;
-
-typedef struct buf_s {
- uv_buf_t uv_buf_t;
- struct buf_s* next;
-} buf_t;
-
-
-static char PING[] = "PING\n";
-
-static uv_loop_t* loop;
-
-static buf_t* buf_freelist = NULL;
-static int pinger_shutdown_cb_called;
-static int completed_pingers = 0;
-static int64_t start_time;
-
-
-static void buf_alloc(uv_handle_t* tcp, size_t size, uv_buf_t* buf) {
- buf_t* ab;
-
- ab = buf_freelist;
- if (ab != NULL)
- buf_freelist = ab->next;
- else {
- ab = malloc(size + sizeof(*ab));
- ab->uv_buf_t.len = size;
- ab->uv_buf_t.base = (char*) (ab + 1);
- }
-
- *buf = ab->uv_buf_t;
-}
-
-
-static void buf_free(const uv_buf_t* buf) {
- buf_t* ab = (buf_t*) buf->base - 1;
- ab->next = buf_freelist;
- buf_freelist = ab;
-}
-
-
-static void pinger_close_cb(uv_handle_t* handle) {
- pinger_t* pinger;
-
- pinger = (pinger_t*)handle->data;
- fprintf(stderr, "ping_pongs: %d roundtrips/s\n", (1000 * pinger->pongs) / TIME);
- fflush(stderr);
-
- free(pinger);
-
- completed_pingers++;
-}
-
-
-static void pinger_write_cb(uv_write_t* req, int status) {
- ASSERT(status == 0);
-
- free(req);
-}
-
-
-static void pinger_write_ping(pinger_t* pinger) {
- uv_write_t* req;
- uv_buf_t buf;
-
- buf = uv_buf_init(PING, sizeof(PING) - 1);
-
- req = malloc(sizeof *req);
- if (uv_write(req, (uv_stream_t*) &pinger->tcp, &buf, 1, pinger_write_cb)) {
- FATAL("uv_write failed");
- }
-}
-
-
-static void pinger_shutdown_cb(uv_shutdown_t* req, int status) {
- ASSERT(status == 0);
- pinger_shutdown_cb_called++;
-
- /*
- * The close callback has not been triggered yet. We must wait for EOF
- * until we close the connection.
- */
- ASSERT(completed_pingers == 0);
-}
-
-
-static void pinger_read_cb(uv_stream_t* tcp,
- ssize_t nread,
- const uv_buf_t* buf) {
- ssize_t i;
- pinger_t* pinger;
-
- pinger = (pinger_t*)tcp->data;
-
- if (nread < 0) {
- ASSERT(nread == UV_EOF);
-
- if (buf->base) {
- buf_free(buf);
- }
-
- ASSERT(pinger_shutdown_cb_called == 1);
- uv_close((uv_handle_t*)tcp, pinger_close_cb);
-
- return;
- }
-
- /* Now we count the pings */
- for (i = 0; i < nread; i++) {
- ASSERT(buf->base[i] == PING[pinger->state]);
- pinger->state = (pinger->state + 1) % (sizeof(PING) - 1);
- if (pinger->state == 0) {
- pinger->pongs++;
- if (uv_now(loop) - start_time > TIME) {
- uv_shutdown(&pinger->shutdown_req,
- (uv_stream_t*) tcp,
- pinger_shutdown_cb);
- break;
- } else {
- pinger_write_ping(pinger);
- }
- }
- }
-
- buf_free(buf);
-}
-
-
-static void pinger_connect_cb(uv_connect_t* req, int status) {
- pinger_t *pinger = (pinger_t*)req->handle->data;
-
- ASSERT(status == 0);
-
- pinger_write_ping(pinger);
-
- if (uv_read_start(req->handle, buf_alloc, pinger_read_cb)) {
- FATAL("uv_read_start failed");
- }
-}
-
-
-static void pinger_new(void) {
- struct sockaddr_in client_addr;
- struct sockaddr_in server_addr;
- pinger_t *pinger;
- int r;
-
- ASSERT(0 == uv_ip4_addr("0.0.0.0", 0, &client_addr));
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &server_addr));
- pinger = malloc(sizeof(*pinger));
- pinger->state = 0;
- pinger->pongs = 0;
-
- /* Try to connect to the server and do NUM_PINGS ping-pongs. */
- r = uv_tcp_init(loop, &pinger->tcp);
- ASSERT(!r);
-
- pinger->tcp.data = pinger;
-
- ASSERT(0 == uv_tcp_bind(&pinger->tcp,
- (const struct sockaddr*) &client_addr,
- 0));
-
- r = uv_tcp_connect(&pinger->connect_req,
- &pinger->tcp,
- (const struct sockaddr*) &server_addr,
- pinger_connect_cb);
- ASSERT(!r);
-}
-
-
-BENCHMARK_IMPL(ping_pongs) {
- loop = uv_default_loop();
-
- start_time = uv_now(loop);
-
- pinger_new();
- uv_run(loop, UV_RUN_DEFAULT);
-
- ASSERT(completed_pingers == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/benchmark-pound.c b/3rdparty/libuv/test/benchmark-pound.c
deleted file mode 100644
index 79f36345037..00000000000
--- a/3rdparty/libuv/test/benchmark-pound.c
+++ /dev/null
@@ -1,351 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "task.h"
-#include "uv.h"
-
-/* Update this is you're going to run > 1000 concurrent requests. */
-#define MAX_CONNS 1000
-
-#undef NANOSEC
-#define NANOSEC ((uint64_t) 1e9)
-
-#undef DEBUG
-#define DEBUG 0
-
-struct conn_rec_s;
-
-typedef void (*setup_fn)(int num, void* arg);
-typedef void (*make_connect_fn)(struct conn_rec_s* conn);
-typedef int (*connect_fn)(int num, make_connect_fn make_connect, void* arg);
-
-/* Base class for tcp_conn_rec and pipe_conn_rec.
- * The ordering of fields matters!
- */
-typedef struct conn_rec_s {
- int i;
- uv_connect_t conn_req;
- uv_write_t write_req;
- make_connect_fn make_connect;
- uv_stream_t stream;
-} conn_rec;
-
-typedef struct {
- int i;
- uv_connect_t conn_req;
- uv_write_t write_req;
- make_connect_fn make_connect;
- uv_tcp_t stream;
-} tcp_conn_rec;
-
-typedef struct {
- int i;
- uv_connect_t conn_req;
- uv_write_t write_req;
- make_connect_fn make_connect;
- uv_pipe_t stream;
-} pipe_conn_rec;
-
-static char buffer[] = "QS";
-
-static uv_loop_t* loop;
-
-static tcp_conn_rec tcp_conns[MAX_CONNS];
-static pipe_conn_rec pipe_conns[MAX_CONNS];
-
-static uint64_t start; /* in ms */
-static int closed_streams;
-static int conns_failed;
-
-static void alloc_cb(uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf);
-static void connect_cb(uv_connect_t* conn_req, int status);
-static void read_cb(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf);
-static void close_cb(uv_handle_t* handle);
-
-
-static void alloc_cb(uv_handle_t* handle,
- size_t suggested_size,
- uv_buf_t* buf) {
- static char slab[65536];
- buf->base = slab;
- buf->len = sizeof(slab);
-}
-
-
-static void after_write(uv_write_t* req, int status) {
- if (status != 0) {
- fprintf(stderr, "write error %s\n", uv_err_name(status));
- uv_close((uv_handle_t*)req->handle, close_cb);
- conns_failed++;
- return;
- }
-}
-
-
-static void connect_cb(uv_connect_t* req, int status) {
- conn_rec* conn;
- uv_buf_t buf;
- int r;
-
- if (status != 0) {
-#if DEBUG
- fprintf(stderr, "connect error %s\n", uv_err_name(status));
-#endif
- uv_close((uv_handle_t*)req->handle, close_cb);
- conns_failed++;
- return;
- }
-
- ASSERT(req != NULL);
- ASSERT(status == 0);
-
- conn = (conn_rec*)req->data;
- ASSERT(conn != NULL);
-
-#if DEBUG
- printf("connect_cb %d\n", conn->i);
-#endif
-
- r = uv_read_start(&conn->stream, alloc_cb, read_cb);
- ASSERT(r == 0);
-
- buf.base = buffer;
- buf.len = sizeof(buffer) - 1;
-
- r = uv_write(&conn->write_req, &conn->stream, &buf, 1, after_write);
- ASSERT(r == 0);
-}
-
-
-static void read_cb(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf) {
-
- ASSERT(stream != NULL);
-
-#if DEBUG
- printf("read_cb %d\n", p->i);
-#endif
-
- uv_close((uv_handle_t*)stream, close_cb);
-
- if (nread < 0) {
- if (nread == UV_EOF) {
- ;
- } else if (nread == UV_ECONNRESET) {
- conns_failed++;
- } else {
- fprintf(stderr, "read error %s\n", uv_err_name(nread));
- ASSERT(0);
- }
- }
-}
-
-
-static void close_cb(uv_handle_t* handle) {
- conn_rec* p = (conn_rec*)handle->data;
-
- ASSERT(handle != NULL);
- closed_streams++;
-
-#if DEBUG
- printf("close_cb %d\n", p->i);
-#endif
-
- if (uv_now(loop) - start < 10000) {
- p->make_connect(p);
- }
-}
-
-
-static void tcp_do_setup(int num, void* arg) {
- int i;
-
- for (i = 0; i < num; i++) {
- tcp_conns[i].i = i;
- }
-}
-
-
-static void pipe_do_setup(int num, void* arg) {
- int i;
-
- for (i = 0; i < num; i++) {
- pipe_conns[i].i = i;
- }
-}
-
-
-static void tcp_make_connect(conn_rec* p) {
- struct sockaddr_in addr;
- tcp_conn_rec* tp;
- int r;
-
- tp = (tcp_conn_rec*) p;
-
- r = uv_tcp_init(loop, (uv_tcp_t*)&p->stream);
- ASSERT(r == 0);
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
-
- r = uv_tcp_connect(&tp->conn_req,
- (uv_tcp_t*) &p->stream,
- (const struct sockaddr*) &addr,
- connect_cb);
- if (r) {
- fprintf(stderr, "uv_tcp_connect error %s\n", uv_err_name(r));
- ASSERT(0);
- }
-
-#if DEBUG
- printf("make connect %d\n", p->i);
-#endif
-
- p->conn_req.data = p;
- p->write_req.data = p;
- p->stream.data = p;
-}
-
-
-static void pipe_make_connect(conn_rec* p) {
- int r;
-
- r = uv_pipe_init(loop, (uv_pipe_t*)&p->stream, 0);
- ASSERT(r == 0);
-
- uv_pipe_connect(&((pipe_conn_rec*) p)->conn_req,
- (uv_pipe_t*) &p->stream,
- TEST_PIPENAME,
- connect_cb);
-
-#if DEBUG
- printf("make connect %d\n", p->i);
-#endif
-
- p->conn_req.data = p;
- p->write_req.data = p;
- p->stream.data = p;
-}
-
-
-static int tcp_do_connect(int num, make_connect_fn make_connect, void* arg) {
- int i;
-
- for (i = 0; i < num; i++) {
- tcp_make_connect((conn_rec*)&tcp_conns[i]);
- tcp_conns[i].make_connect = make_connect;
- }
-
- return 0;
-}
-
-
-static int pipe_do_connect(int num, make_connect_fn make_connect, void* arg) {
- int i;
-
- for (i = 0; i < num; i++) {
- pipe_make_connect((conn_rec*)&pipe_conns[i]);
- pipe_conns[i].make_connect = make_connect;
- }
-
- return 0;
-}
-
-
-static int pound_it(int concurrency,
- const char* type,
- setup_fn do_setup,
- connect_fn do_connect,
- make_connect_fn make_connect,
- void* arg) {
- double secs;
- int r;
- uint64_t start_time; /* in ns */
- uint64_t end_time;
-
- loop = uv_default_loop();
-
- uv_update_time(loop);
- start = uv_now(loop);
-
- /* Run benchmark for at least five seconds. */
- start_time = uv_hrtime();
-
- do_setup(concurrency, arg);
-
- r = do_connect(concurrency, make_connect, arg);
- ASSERT(!r);
-
- uv_run(loop, UV_RUN_DEFAULT);
-
- end_time = uv_hrtime();
-
- /* Number of fractional seconds it took to run the benchmark. */
- secs = (double)(end_time - start_time) / NANOSEC;
-
- fprintf(stderr, "%s-conn-pound-%d: %.0f accepts/s (%d failed)\n",
- type,
- concurrency,
- closed_streams / secs,
- conns_failed);
- fflush(stderr);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-BENCHMARK_IMPL(tcp4_pound_100) {
- return pound_it(100,
- "tcp",
- tcp_do_setup,
- tcp_do_connect,
- tcp_make_connect,
- NULL);
-}
-
-
-BENCHMARK_IMPL(tcp4_pound_1000) {
- return pound_it(1000,
- "tcp",
- tcp_do_setup,
- tcp_do_connect,
- tcp_make_connect,
- NULL);
-}
-
-
-BENCHMARK_IMPL(pipe_pound_100) {
- return pound_it(100,
- "pipe",
- pipe_do_setup,
- pipe_do_connect,
- pipe_make_connect,
- NULL);
-}
-
-
-BENCHMARK_IMPL(pipe_pound_1000) {
- return pound_it(1000,
- "pipe",
- pipe_do_setup,
- pipe_do_connect,
- pipe_make_connect,
- NULL);
-}
diff --git a/3rdparty/libuv/test/benchmark-pump.c b/3rdparty/libuv/test/benchmark-pump.c
deleted file mode 100644
index 88f2dc5c658..00000000000
--- a/3rdparty/libuv/test/benchmark-pump.c
+++ /dev/null
@@ -1,476 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "task.h"
-#include "uv.h"
-
-#include <math.h>
-#include <stdio.h>
-
-
-static int TARGET_CONNECTIONS;
-#define WRITE_BUFFER_SIZE 8192
-#define MAX_SIMULTANEOUS_CONNECTS 100
-
-#define PRINT_STATS 0
-#define STATS_INTERVAL 1000 /* msec */
-#define STATS_COUNT 5
-
-
-static void do_write(uv_stream_t*);
-static void maybe_connect_some();
-
-static uv_req_t* req_alloc();
-static void req_free(uv_req_t* uv_req);
-
-static void buf_alloc(uv_handle_t* handle, size_t size, uv_buf_t* buf);
-static void buf_free(const uv_buf_t* buf);
-
-static uv_loop_t* loop;
-
-static uv_tcp_t tcpServer;
-static uv_pipe_t pipeServer;
-static uv_stream_t* server;
-static struct sockaddr_in listen_addr;
-static struct sockaddr_in connect_addr;
-
-static int64_t start_time;
-
-static int max_connect_socket = 0;
-static int max_read_sockets = 0;
-static int read_sockets = 0;
-static int write_sockets = 0;
-
-static int64_t nrecv = 0;
-static int64_t nrecv_total = 0;
-static int64_t nsent = 0;
-static int64_t nsent_total = 0;
-
-static int stats_left = 0;
-
-static char write_buffer[WRITE_BUFFER_SIZE];
-
-/* Make this as large as you need. */
-#define MAX_WRITE_HANDLES 1000
-
-static stream_type type;
-
-static uv_tcp_t tcp_write_handles[MAX_WRITE_HANDLES];
-static uv_pipe_t pipe_write_handles[MAX_WRITE_HANDLES];
-
-static uv_timer_t timer_handle;
-
-
-static double gbit(int64_t bytes, int64_t passed_ms) {
- double gbits = ((double)bytes / (1024 * 1024 * 1024)) * 8;
- return gbits / ((double)passed_ms / 1000);
-}
-
-
-static void show_stats(uv_timer_t* handle) {
- int64_t diff;
- int i;
-
-#if PRINT_STATS
- fprintf(stderr, "connections: %d, write: %.1f gbit/s\n",
- write_sockets,
- gbit(nsent, STATS_INTERVAL));
- fflush(stderr);
-#endif
-
- /* Exit if the show is over */
- if (!--stats_left) {
-
- uv_update_time(loop);
- diff = uv_now(loop) - start_time;
-
- fprintf(stderr, "%s_pump%d_client: %.1f gbit/s\n",
- type == TCP ? "tcp" : "pipe",
- write_sockets,
- gbit(nsent_total, diff));
- fflush(stderr);
-
- for (i = 0; i < write_sockets; i++) {
- if (type == TCP)
- uv_close((uv_handle_t*) &tcp_write_handles[i], NULL);
- else
- uv_close((uv_handle_t*) &pipe_write_handles[i], NULL);
- }
-
- exit(0);
- }
-
- /* Reset read and write counters */
- nrecv = 0;
- nsent = 0;
-}
-
-
-static void read_show_stats(void) {
- int64_t diff;
-
- uv_update_time(loop);
- diff = uv_now(loop) - start_time;
-
- fprintf(stderr, "%s_pump%d_server: %.1f gbit/s\n",
- type == TCP ? "tcp" : "pipe",
- max_read_sockets,
- gbit(nrecv_total, diff));
- fflush(stderr);
-}
-
-
-
-static void read_sockets_close_cb(uv_handle_t* handle) {
- free(handle);
- read_sockets--;
-
- /* If it's past the first second and everyone has closed their connection
- * Then print stats.
- */
- if (uv_now(loop) - start_time > 1000 && read_sockets == 0) {
- read_show_stats();
- uv_close((uv_handle_t*)server, NULL);
- }
-}
-
-
-static void start_stats_collection(void) {
- int r;
-
- /* Show-stats timer */
- stats_left = STATS_COUNT;
- r = uv_timer_init(loop, &timer_handle);
- ASSERT(r == 0);
- r = uv_timer_start(&timer_handle, show_stats, STATS_INTERVAL, STATS_INTERVAL);
- ASSERT(r == 0);
-
- uv_update_time(loop);
- start_time = uv_now(loop);
-}
-
-
-static void read_cb(uv_stream_t* stream, ssize_t bytes, const uv_buf_t* buf) {
- if (nrecv_total == 0) {
- ASSERT(start_time == 0);
- uv_update_time(loop);
- start_time = uv_now(loop);
- }
-
- if (bytes < 0) {
- uv_close((uv_handle_t*)stream, read_sockets_close_cb);
- return;
- }
-
- buf_free(buf);
-
- nrecv += bytes;
- nrecv_total += bytes;
-}
-
-
-static void write_cb(uv_write_t* req, int status) {
- ASSERT(status == 0);
-
- req_free((uv_req_t*) req);
-
- nsent += sizeof write_buffer;
- nsent_total += sizeof write_buffer;
-
- do_write((uv_stream_t*) req->handle);
-}
-
-
-static void do_write(uv_stream_t* stream) {
- uv_write_t* req;
- uv_buf_t buf;
- int r;
-
- buf.base = (char*) &write_buffer;
- buf.len = sizeof write_buffer;
-
- req = (uv_write_t*) req_alloc();
- r = uv_write(req, stream, &buf, 1, write_cb);
- ASSERT(r == 0);
-}
-
-
-static void connect_cb(uv_connect_t* req, int status) {
- int i;
-
- if (status) {
- fprintf(stderr, "%s", uv_strerror(status));
- fflush(stderr);
- }
- ASSERT(status == 0);
-
- write_sockets++;
- req_free((uv_req_t*) req);
-
- maybe_connect_some();
-
- if (write_sockets == TARGET_CONNECTIONS) {
- start_stats_collection();
-
- /* Yay! start writing */
- for (i = 0; i < write_sockets; i++) {
- if (type == TCP)
- do_write((uv_stream_t*) &tcp_write_handles[i]);
- else
- do_write((uv_stream_t*) &pipe_write_handles[i]);
- }
- }
-}
-
-
-static void maybe_connect_some(void) {
- uv_connect_t* req;
- uv_tcp_t* tcp;
- uv_pipe_t* pipe;
- int r;
-
- while (max_connect_socket < TARGET_CONNECTIONS &&
- max_connect_socket < write_sockets + MAX_SIMULTANEOUS_CONNECTS) {
- if (type == TCP) {
- tcp = &tcp_write_handles[max_connect_socket++];
-
- r = uv_tcp_init(loop, tcp);
- ASSERT(r == 0);
-
- req = (uv_connect_t*) req_alloc();
- r = uv_tcp_connect(req,
- tcp,
- (const struct sockaddr*) &connect_addr,
- connect_cb);
- ASSERT(r == 0);
- } else {
- pipe = &pipe_write_handles[max_connect_socket++];
-
- r = uv_pipe_init(loop, pipe, 0);
- ASSERT(r == 0);
-
- req = (uv_connect_t*) req_alloc();
- uv_pipe_connect(req, pipe, TEST_PIPENAME, connect_cb);
- }
- }
-}
-
-
-static void connection_cb(uv_stream_t* s, int status) {
- uv_stream_t* stream;
- int r;
-
- ASSERT(server == s);
- ASSERT(status == 0);
-
- if (type == TCP) {
- stream = (uv_stream_t*)malloc(sizeof(uv_tcp_t));
- r = uv_tcp_init(loop, (uv_tcp_t*)stream);
- ASSERT(r == 0);
- } else {
- stream = (uv_stream_t*)malloc(sizeof(uv_pipe_t));
- r = uv_pipe_init(loop, (uv_pipe_t*)stream, 0);
- ASSERT(r == 0);
- }
-
- r = uv_accept(s, stream);
- ASSERT(r == 0);
-
- r = uv_read_start(stream, buf_alloc, read_cb);
- ASSERT(r == 0);
-
- read_sockets++;
- max_read_sockets++;
-}
-
-
-/*
- * Request allocator
- */
-
-typedef struct req_list_s {
- union uv_any_req uv_req;
- struct req_list_s* next;
-} req_list_t;
-
-
-static req_list_t* req_freelist = NULL;
-
-
-static uv_req_t* req_alloc(void) {
- req_list_t* req;
-
- req = req_freelist;
- if (req != NULL) {
- req_freelist = req->next;
- return (uv_req_t*) req;
- }
-
- req = (req_list_t*) malloc(sizeof *req);
- return (uv_req_t*) req;
-}
-
-
-static void req_free(uv_req_t* uv_req) {
- req_list_t* req = (req_list_t*) uv_req;
-
- req->next = req_freelist;
- req_freelist = req;
-}
-
-
-/*
- * Buffer allocator
- */
-
-typedef struct buf_list_s {
- uv_buf_t uv_buf_t;
- struct buf_list_s* next;
-} buf_list_t;
-
-
-static buf_list_t* buf_freelist = NULL;
-
-
-static void buf_alloc(uv_handle_t* handle, size_t size, uv_buf_t* buf) {
- buf_list_t* ab;
-
- ab = buf_freelist;
- if (ab != NULL)
- buf_freelist = ab->next;
- else {
- ab = malloc(size + sizeof(*ab));
- ab->uv_buf_t.len = size;
- ab->uv_buf_t.base = (char*) (ab + 1);
- }
-
- *buf = ab->uv_buf_t;
-}
-
-
-static void buf_free(const uv_buf_t* buf) {
- buf_list_t* ab = (buf_list_t*) buf->base - 1;
- ab->next = buf_freelist;
- buf_freelist = ab;
-}
-
-
-HELPER_IMPL(tcp_pump_server) {
- int r;
-
- type = TCP;
- loop = uv_default_loop();
-
- ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &listen_addr));
-
- /* Server */
- server = (uv_stream_t*)&tcpServer;
- r = uv_tcp_init(loop, &tcpServer);
- ASSERT(r == 0);
- r = uv_tcp_bind(&tcpServer, (const struct sockaddr*) &listen_addr, 0);
- ASSERT(r == 0);
- r = uv_listen((uv_stream_t*)&tcpServer, MAX_WRITE_HANDLES, connection_cb);
- ASSERT(r == 0);
-
- uv_run(loop, UV_RUN_DEFAULT);
-
- return 0;
-}
-
-
-HELPER_IMPL(pipe_pump_server) {
- int r;
- type = PIPE;
-
- loop = uv_default_loop();
-
- /* Server */
- server = (uv_stream_t*)&pipeServer;
- r = uv_pipe_init(loop, &pipeServer, 0);
- ASSERT(r == 0);
- r = uv_pipe_bind(&pipeServer, TEST_PIPENAME);
- ASSERT(r == 0);
- r = uv_listen((uv_stream_t*)&pipeServer, MAX_WRITE_HANDLES, connection_cb);
- ASSERT(r == 0);
-
- uv_run(loop, UV_RUN_DEFAULT);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-static void tcp_pump(int n) {
- ASSERT(n <= MAX_WRITE_HANDLES);
- TARGET_CONNECTIONS = n;
- type = TCP;
-
- loop = uv_default_loop();
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &connect_addr));
-
- /* Start making connections */
- maybe_connect_some();
-
- uv_run(loop, UV_RUN_DEFAULT);
-
- MAKE_VALGRIND_HAPPY();
-}
-
-
-static void pipe_pump(int n) {
- ASSERT(n <= MAX_WRITE_HANDLES);
- TARGET_CONNECTIONS = n;
- type = PIPE;
-
- loop = uv_default_loop();
-
- /* Start making connections */
- maybe_connect_some();
-
- uv_run(loop, UV_RUN_DEFAULT);
-
- MAKE_VALGRIND_HAPPY();
-}
-
-
-BENCHMARK_IMPL(tcp_pump100_client) {
- tcp_pump(100);
- return 0;
-}
-
-
-BENCHMARK_IMPL(tcp_pump1_client) {
- tcp_pump(1);
- return 0;
-}
-
-
-BENCHMARK_IMPL(pipe_pump100_client) {
- pipe_pump(100);
- return 0;
-}
-
-
-BENCHMARK_IMPL(pipe_pump1_client) {
- pipe_pump(1);
- return 0;
-}
diff --git a/3rdparty/libuv/test/benchmark-sizes.c b/3rdparty/libuv/test/benchmark-sizes.c
deleted file mode 100644
index 9bf42f91537..00000000000
--- a/3rdparty/libuv/test/benchmark-sizes.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "task.h"
-#include "uv.h"
-
-
-BENCHMARK_IMPL(sizes) {
- fprintf(stderr, "uv_shutdown_t: %u bytes\n", (unsigned int) sizeof(uv_shutdown_t));
- fprintf(stderr, "uv_write_t: %u bytes\n", (unsigned int) sizeof(uv_write_t));
- fprintf(stderr, "uv_connect_t: %u bytes\n", (unsigned int) sizeof(uv_connect_t));
- fprintf(stderr, "uv_udp_send_t: %u bytes\n", (unsigned int) sizeof(uv_udp_send_t));
- fprintf(stderr, "uv_tcp_t: %u bytes\n", (unsigned int) sizeof(uv_tcp_t));
- fprintf(stderr, "uv_pipe_t: %u bytes\n", (unsigned int) sizeof(uv_pipe_t));
- fprintf(stderr, "uv_tty_t: %u bytes\n", (unsigned int) sizeof(uv_tty_t));
- fprintf(stderr, "uv_prepare_t: %u bytes\n", (unsigned int) sizeof(uv_prepare_t));
- fprintf(stderr, "uv_check_t: %u bytes\n", (unsigned int) sizeof(uv_check_t));
- fprintf(stderr, "uv_idle_t: %u bytes\n", (unsigned int) sizeof(uv_idle_t));
- fprintf(stderr, "uv_async_t: %u bytes\n", (unsigned int) sizeof(uv_async_t));
- fprintf(stderr, "uv_timer_t: %u bytes\n", (unsigned int) sizeof(uv_timer_t));
- fprintf(stderr, "uv_fs_poll_t: %u bytes\n", (unsigned int) sizeof(uv_fs_poll_t));
- fprintf(stderr, "uv_fs_event_t: %u bytes\n", (unsigned int) sizeof(uv_fs_event_t));
- fprintf(stderr, "uv_process_t: %u bytes\n", (unsigned int) sizeof(uv_process_t));
- fprintf(stderr, "uv_poll_t: %u bytes\n", (unsigned int) sizeof(uv_poll_t));
- fprintf(stderr, "uv_loop_t: %u bytes\n", (unsigned int) sizeof(uv_loop_t));
- fflush(stderr);
- return 0;
-}
diff --git a/3rdparty/libuv/test/benchmark-spawn.c b/3rdparty/libuv/test/benchmark-spawn.c
deleted file mode 100644
index ed9ad608f37..00000000000
--- a/3rdparty/libuv/test/benchmark-spawn.c
+++ /dev/null
@@ -1,164 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-/* This benchmark spawns itself 1000 times. */
-
-#include "task.h"
-#include "uv.h"
-
-static uv_loop_t* loop;
-
-static int N = 1000;
-static int done;
-
-static uv_process_t process;
-static uv_process_options_t options;
-static char exepath[1024];
-static size_t exepath_size = 1024;
-static char* args[3];
-static uv_pipe_t out;
-
-#define OUTPUT_SIZE 1024
-static char output[OUTPUT_SIZE];
-static int output_used;
-
-static int process_open;
-static int pipe_open;
-
-
-static void spawn(void);
-
-
-static void maybe_spawn(void) {
- if (process_open == 0 && pipe_open == 0) {
- done++;
- if (done < N) {
- spawn();
- }
- }
-}
-
-
-static void process_close_cb(uv_handle_t* handle) {
- ASSERT(process_open == 1);
- process_open = 0;
- maybe_spawn();
-}
-
-
-static void exit_cb(uv_process_t* process,
- int64_t exit_status,
- int term_signal) {
- ASSERT(exit_status == 42);
- ASSERT(term_signal == 0);
- uv_close((uv_handle_t*)process, process_close_cb);
-}
-
-
-static void on_alloc(uv_handle_t* handle,
- size_t suggested_size,
- uv_buf_t* buf) {
- buf->base = output + output_used;
- buf->len = OUTPUT_SIZE - output_used;
-}
-
-
-static void pipe_close_cb(uv_handle_t* pipe) {
- ASSERT(pipe_open == 1);
- pipe_open = 0;
- maybe_spawn();
-}
-
-
-static void on_read(uv_stream_t* pipe, ssize_t nread, const uv_buf_t* buf) {
- if (nread > 0) {
- ASSERT(pipe_open == 1);
- output_used += nread;
- } else if (nread < 0) {
- if (nread == UV_EOF) {
- uv_close((uv_handle_t*)pipe, pipe_close_cb);
- }
- }
-}
-
-
-static void spawn(void) {
- uv_stdio_container_t stdio[2];
- int r;
-
- ASSERT(process_open == 0);
- ASSERT(pipe_open == 0);
-
- args[0] = exepath;
- args[1] = "spawn_helper";
- args[2] = NULL;
- options.file = exepath;
- options.args = args;
- options.exit_cb = exit_cb;
-
- uv_pipe_init(loop, &out, 0);
-
- options.stdio = stdio;
- options.stdio_count = 2;
- options.stdio[0].flags = UV_IGNORE;
- options.stdio[1].flags = UV_CREATE_PIPE | UV_WRITABLE_PIPE;
- options.stdio[1].data.stream = (uv_stream_t*)&out;
-
- r = uv_spawn(loop, &process, &options);
- ASSERT(r == 0);
-
- process_open = 1;
- pipe_open = 1;
- output_used = 0;
-
- r = uv_read_start((uv_stream_t*) &out, on_alloc, on_read);
- ASSERT(r == 0);
-}
-
-
-BENCHMARK_IMPL(spawn) {
- int r;
- static int64_t start_time, end_time;
-
- loop = uv_default_loop();
-
- r = uv_exepath(exepath, &exepath_size);
- ASSERT(r == 0);
- exepath[exepath_size] = '\0';
-
- uv_update_time(loop);
- start_time = uv_now(loop);
-
- spawn();
-
- r = uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- uv_update_time(loop);
- end_time = uv_now(loop);
-
- fprintf(stderr, "spawn: %.0f spawns/s\n",
- (double) N / (double) (end_time - start_time) * 1000.0);
- fflush(stderr);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/benchmark-tcp-write-batch.c b/3rdparty/libuv/test/benchmark-tcp-write-batch.c
deleted file mode 100644
index 96921b70db5..00000000000
--- a/3rdparty/libuv/test/benchmark-tcp-write-batch.c
+++ /dev/null
@@ -1,144 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#define WRITE_REQ_DATA "Hello, world."
-#define NUM_WRITE_REQS (1000 * 1000)
-
-typedef struct {
- uv_write_t req;
- uv_buf_t buf;
-} write_req;
-
-
-static write_req* write_reqs;
-static uv_tcp_t tcp_client;
-static uv_connect_t connect_req;
-static uv_shutdown_t shutdown_req;
-
-static int shutdown_cb_called = 0;
-static int connect_cb_called = 0;
-static int write_cb_called = 0;
-static int close_cb_called = 0;
-
-static void connect_cb(uv_connect_t* req, int status);
-static void write_cb(uv_write_t* req, int status);
-static void shutdown_cb(uv_shutdown_t* req, int status);
-static void close_cb(uv_handle_t* handle);
-
-
-static void connect_cb(uv_connect_t* req, int status) {
- write_req* w;
- int i;
- int r;
-
- ASSERT(req->handle == (uv_stream_t*)&tcp_client);
-
- for (i = 0; i < NUM_WRITE_REQS; i++) {
- w = &write_reqs[i];
- r = uv_write(&w->req, req->handle, &w->buf, 1, write_cb);
- ASSERT(r == 0);
- }
-
- r = uv_shutdown(&shutdown_req, req->handle, shutdown_cb);
- ASSERT(r == 0);
-
- connect_cb_called++;
-}
-
-
-static void write_cb(uv_write_t* req, int status) {
- ASSERT(req != NULL);
- ASSERT(status == 0);
- write_cb_called++;
-}
-
-
-static void shutdown_cb(uv_shutdown_t* req, int status) {
- ASSERT(req->handle == (uv_stream_t*)&tcp_client);
- ASSERT(req->handle->write_queue_size == 0);
-
- uv_close((uv_handle_t*)req->handle, close_cb);
- free(write_reqs);
-
- shutdown_cb_called++;
-}
-
-
-static void close_cb(uv_handle_t* handle) {
- ASSERT(handle == (uv_handle_t*)&tcp_client);
- close_cb_called++;
-}
-
-
-BENCHMARK_IMPL(tcp_write_batch) {
- struct sockaddr_in addr;
- uv_loop_t* loop;
- uint64_t start;
- uint64_t stop;
- int i;
- int r;
-
- write_reqs = malloc(sizeof(*write_reqs) * NUM_WRITE_REQS);
- ASSERT(write_reqs != NULL);
-
- /* Prepare the data to write out. */
- for (i = 0; i < NUM_WRITE_REQS; i++) {
- write_reqs[i].buf = uv_buf_init(WRITE_REQ_DATA,
- sizeof(WRITE_REQ_DATA) - 1);
- }
-
- loop = uv_default_loop();
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
-
- r = uv_tcp_init(loop, &tcp_client);
- ASSERT(r == 0);
-
- r = uv_tcp_connect(&connect_req,
- &tcp_client,
- (const struct sockaddr*) &addr,
- connect_cb);
- ASSERT(r == 0);
-
- start = uv_hrtime();
-
- r = uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- stop = uv_hrtime();
-
- ASSERT(connect_cb_called == 1);
- ASSERT(write_cb_called == NUM_WRITE_REQS);
- ASSERT(shutdown_cb_called == 1);
- ASSERT(close_cb_called == 1);
-
- printf("%ld write requests in %.2fs.\n",
- (long)NUM_WRITE_REQS,
- (stop - start) / 1e9);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/benchmark-thread.c b/3rdparty/libuv/test/benchmark-thread.c
deleted file mode 100644
index b37a7fd6d01..00000000000
--- a/3rdparty/libuv/test/benchmark-thread.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#define NUM_THREADS (20 * 1000)
-
-static volatile int num_threads;
-
-
-static void thread_entry(void* arg) {
- ASSERT(arg == (void *) 42);
- num_threads++;
- /* FIXME write barrier? */
-}
-
-
-BENCHMARK_IMPL(thread_create) {
- uint64_t start_time;
- double duration;
- uv_thread_t tid;
- int i, r;
-
- start_time = uv_hrtime();
-
- for (i = 0; i < NUM_THREADS; i++) {
- r = uv_thread_create(&tid, thread_entry, (void *) 42);
- ASSERT(r == 0);
-
- r = uv_thread_join(&tid);
- ASSERT(r == 0);
- }
-
- duration = (uv_hrtime() - start_time) / 1e9;
-
- ASSERT(num_threads == NUM_THREADS);
-
- printf("%d threads created in %.2f seconds (%.0f/s)\n",
- NUM_THREADS, duration, NUM_THREADS / duration);
-
- return 0;
-}
diff --git a/3rdparty/libuv/test/benchmark-udp-pummel.c b/3rdparty/libuv/test/benchmark-udp-pummel.c
deleted file mode 100644
index 68a2373d781..00000000000
--- a/3rdparty/libuv/test/benchmark-udp-pummel.c
+++ /dev/null
@@ -1,243 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "task.h"
-#include "uv.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#define EXPECTED "RANG TANG DING DONG I AM THE JAPANESE SANDMAN"
-
-#define TEST_DURATION 5000 /* ms */
-
-#define BASE_PORT 12345
-
-struct sender_state {
- struct sockaddr_in addr;
- uv_udp_send_t send_req;
- uv_udp_t udp_handle;
-};
-
-struct receiver_state {
- struct sockaddr_in addr;
- uv_udp_t udp_handle;
-};
-
-/* not used in timed mode */
-static unsigned int packet_counter = (unsigned int) 1e6;
-
-static int n_senders_;
-static int n_receivers_;
-static uv_buf_t bufs[5];
-static struct sender_state senders[1024];
-static struct receiver_state receivers[1024];
-
-static unsigned int send_cb_called;
-static unsigned int recv_cb_called;
-static unsigned int close_cb_called;
-static int timed;
-static int exiting;
-
-
-static void alloc_cb(uv_handle_t* handle,
- size_t suggested_size,
- uv_buf_t* buf) {
- static char slab[65536];
- ASSERT(suggested_size <= sizeof(slab));
- buf->base = slab;
- buf->len = sizeof(slab);
-}
-
-
-static void send_cb(uv_udp_send_t* req, int status) {
- struct sender_state* s;
-
- ASSERT(req != NULL);
-
- if (status != 0) {
- ASSERT(status == UV_ECANCELED);
- return;
- }
-
- if (exiting)
- return;
-
- s = container_of(req, struct sender_state, send_req);
- ASSERT(req->handle == &s->udp_handle);
-
- if (timed)
- goto send;
-
- if (packet_counter == 0) {
- uv_close((uv_handle_t*)&s->udp_handle, NULL);
- return;
- }
-
- packet_counter--;
-
-send:
- ASSERT(0 == uv_udp_send(&s->send_req,
- &s->udp_handle,
- bufs,
- ARRAY_SIZE(bufs),
- (const struct sockaddr*) &s->addr,
- send_cb));
- send_cb_called++;
-}
-
-
-static void recv_cb(uv_udp_t* handle,
- ssize_t nread,
- const uv_buf_t* buf,
- const struct sockaddr* addr,
- unsigned flags) {
- if (nread == 0)
- return;
-
- if (nread < 0) {
- ASSERT(nread == UV_ECANCELED);
- return;
- }
-
- ASSERT(addr->sa_family == AF_INET);
- ASSERT(!memcmp(buf->base, EXPECTED, nread));
-
- recv_cb_called++;
-}
-
-
-static void close_cb(uv_handle_t* handle) {
- ASSERT(handle != NULL);
- close_cb_called++;
-}
-
-
-static void timeout_cb(uv_timer_t* timer) {
- int i;
-
- exiting = 1;
-
- for (i = 0; i < n_senders_; i++)
- uv_close((uv_handle_t*)&senders[i].udp_handle, close_cb);
-
- for (i = 0; i < n_receivers_; i++)
- uv_close((uv_handle_t*)&receivers[i].udp_handle, close_cb);
-}
-
-
-static int pummel(unsigned int n_senders,
- unsigned int n_receivers,
- unsigned long timeout) {
- uv_timer_t timer_handle;
- uint64_t duration;
- uv_loop_t* loop;
- unsigned int i;
-
- ASSERT(n_senders <= ARRAY_SIZE(senders));
- ASSERT(n_receivers <= ARRAY_SIZE(receivers));
-
- loop = uv_default_loop();
-
- n_senders_ = n_senders;
- n_receivers_ = n_receivers;
-
- if (timeout) {
- ASSERT(0 == uv_timer_init(loop, &timer_handle));
- ASSERT(0 == uv_timer_start(&timer_handle, timeout_cb, timeout, 0));
- /* Timer should not keep loop alive. */
- uv_unref((uv_handle_t*)&timer_handle);
- timed = 1;
- }
-
- for (i = 0; i < n_receivers; i++) {
- struct receiver_state* s = receivers + i;
- struct sockaddr_in addr;
- ASSERT(0 == uv_ip4_addr("0.0.0.0", BASE_PORT + i, &addr));
- ASSERT(0 == uv_udp_init(loop, &s->udp_handle));
- ASSERT(0 == uv_udp_bind(&s->udp_handle, (const struct sockaddr*) &addr, 0));
- ASSERT(0 == uv_udp_recv_start(&s->udp_handle, alloc_cb, recv_cb));
- uv_unref((uv_handle_t*)&s->udp_handle);
- }
-
- bufs[0] = uv_buf_init(EXPECTED + 0, 10);
- bufs[1] = uv_buf_init(EXPECTED + 10, 10);
- bufs[2] = uv_buf_init(EXPECTED + 20, 10);
- bufs[3] = uv_buf_init(EXPECTED + 30, 10);
- bufs[4] = uv_buf_init(EXPECTED + 40, 5);
-
- for (i = 0; i < n_senders; i++) {
- struct sender_state* s = senders + i;
- ASSERT(0 == uv_ip4_addr("127.0.0.1",
- BASE_PORT + (i % n_receivers),
- &s->addr));
- ASSERT(0 == uv_udp_init(loop, &s->udp_handle));
- ASSERT(0 == uv_udp_send(&s->send_req,
- &s->udp_handle,
- bufs,
- ARRAY_SIZE(bufs),
- (const struct sockaddr*) &s->addr,
- send_cb));
- }
-
- duration = uv_hrtime();
- ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
- duration = uv_hrtime() - duration;
- /* convert from nanoseconds to milliseconds */
- duration = duration / (uint64_t) 1e6;
-
- printf("udp_pummel_%dv%d: %.0f/s received, %.0f/s sent. "
- "%u received, %u sent in %.1f seconds.\n",
- n_receivers,
- n_senders,
- recv_cb_called / (duration / 1000.0),
- send_cb_called / (duration / 1000.0),
- recv_cb_called,
- send_cb_called,
- duration / 1000.0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-#define X(a, b) \
- BENCHMARK_IMPL(udp_pummel_##a##v##b) { \
- return pummel(a, b, 0); \
- } \
- BENCHMARK_IMPL(udp_timed_pummel_##a##v##b) { \
- return pummel(a, b, TEST_DURATION); \
- }
-
-X(1, 1)
-X(1, 10)
-X(1, 100)
-X(1, 1000)
-X(10, 10)
-X(10, 100)
-X(10, 1000)
-X(100, 10)
-X(100, 100)
-X(100, 1000)
-X(1000, 1000)
-
-#undef X
diff --git a/3rdparty/libuv/test/blackhole-server.c b/3rdparty/libuv/test/blackhole-server.c
deleted file mode 100644
index ad878b35c61..00000000000
--- a/3rdparty/libuv/test/blackhole-server.c
+++ /dev/null
@@ -1,121 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-
-typedef struct {
- uv_tcp_t handle;
- uv_shutdown_t shutdown_req;
-} conn_rec;
-
-static uv_tcp_t tcp_server;
-
-static void connection_cb(uv_stream_t* stream, int status);
-static void alloc_cb(uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf);
-static void read_cb(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf);
-static void shutdown_cb(uv_shutdown_t* req, int status);
-static void close_cb(uv_handle_t* handle);
-
-
-static void connection_cb(uv_stream_t* stream, int status) {
- conn_rec* conn;
- int r;
-
- ASSERT(status == 0);
- ASSERT(stream == (uv_stream_t*)&tcp_server);
-
- conn = malloc(sizeof *conn);
- ASSERT(conn != NULL);
-
- r = uv_tcp_init(stream->loop, &conn->handle);
- ASSERT(r == 0);
-
- r = uv_accept(stream, (uv_stream_t*)&conn->handle);
- ASSERT(r == 0);
-
- r = uv_read_start((uv_stream_t*)&conn->handle, alloc_cb, read_cb);
- ASSERT(r == 0);
-}
-
-
-static void alloc_cb(uv_handle_t* handle,
- size_t suggested_size,
- uv_buf_t* buf) {
- static char slab[65536];
- buf->base = slab;
- buf->len = sizeof(slab);
-}
-
-
-static void read_cb(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf) {
- conn_rec* conn;
- int r;
-
- if (nread >= 0)
- return;
-
- ASSERT(nread == UV_EOF);
-
- conn = container_of(stream, conn_rec, handle);
-
- r = uv_shutdown(&conn->shutdown_req, stream, shutdown_cb);
- ASSERT(r == 0);
-}
-
-
-static void shutdown_cb(uv_shutdown_t* req, int status) {
- conn_rec* conn = container_of(req, conn_rec, shutdown_req);
- uv_close((uv_handle_t*)&conn->handle, close_cb);
-}
-
-
-static void close_cb(uv_handle_t* handle) {
- conn_rec* conn = container_of(handle, conn_rec, handle);
- free(conn);
-}
-
-
-HELPER_IMPL(tcp4_blackhole_server) {
- struct sockaddr_in addr;
- uv_loop_t* loop;
- int r;
-
- loop = uv_default_loop();
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
-
- r = uv_tcp_init(loop, &tcp_server);
- ASSERT(r == 0);
-
- r = uv_tcp_bind(&tcp_server, (const struct sockaddr*) &addr, 0);
- ASSERT(r == 0);
-
- r = uv_listen((uv_stream_t*)&tcp_server, 128, connection_cb);
- ASSERT(r == 0);
-
- r = uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(0 && "Blackhole server dropped out of event loop.");
-
- return 0;
-}
diff --git a/3rdparty/libuv/test/dns-server.c b/3rdparty/libuv/test/dns-server.c
deleted file mode 100644
index 80052c70398..00000000000
--- a/3rdparty/libuv/test/dns-server.c
+++ /dev/null
@@ -1,340 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-
-typedef struct {
- uv_write_t req;
- uv_buf_t buf;
-} write_req_t;
-
-
-/* used to track multiple DNS requests received */
-typedef struct {
- char* prevbuf_ptr;
- int prevbuf_pos;
- int prevbuf_rem;
-} dnsstate;
-
-
-/* modify handle to append dnsstate */
-typedef struct {
- uv_tcp_t handle;
- dnsstate state;
-} dnshandle;
-
-
-static uv_loop_t* loop;
-
-
-static uv_tcp_t server;
-
-
-static void after_write(uv_write_t* req, int status);
-static void after_read(uv_stream_t*, ssize_t nread, const uv_buf_t* buf);
-static void on_close(uv_handle_t* peer);
-static void on_connection(uv_stream_t*, int status);
-
-#define WRITE_BUF_LEN (64*1024)
-#define DNSREC_LEN (4)
-
-#define LEN_OFFSET 0
-#define QUERYID_OFFSET 2
-
-static unsigned char DNSRsp[] = {
- 0, 43, 0, 0, 0x81, 0x80, 0, 1, 0, 1, 0, 0, 0, 0
-};
-
-static unsigned char qrecord[] = {
- 5, 'e', 'c', 'h', 'o', 's', 3, 's', 'r', 'v', 0, 0, 1, 0, 1
-};
-
-static unsigned char arecord[] = {
- 0xc0, 0x0c, 0, 1, 0, 1, 0, 0, 5, 0xbd, 0, 4, 10, 0, 1, 1
-};
-
-
-static void after_write(uv_write_t* req, int status) {
- write_req_t* wr;
-
- if (status) {
- fprintf(stderr, "uv_write error: %s\n", uv_strerror(status));
- ASSERT(0);
- }
-
- wr = (write_req_t*) req;
-
- /* Free the read/write buffer and the request */
- free(wr->buf.base);
- free(wr);
-}
-
-
-static void after_shutdown(uv_shutdown_t* req, int status) {
- uv_close((uv_handle_t*) req->handle, on_close);
- free(req);
-}
-
-
-static void addrsp(write_req_t* wr, char* hdr) {
- char * dnsrsp;
- short int rsplen;
- short int* reclen;
-
- rsplen = sizeof(DNSRsp) + sizeof(qrecord) + sizeof(arecord);
-
- ASSERT (rsplen + wr->buf.len < WRITE_BUF_LEN);
-
- dnsrsp = wr->buf.base + wr->buf.len;
-
- /* copy stock response */
- memcpy(dnsrsp, DNSRsp, sizeof(DNSRsp));
- memcpy(dnsrsp + sizeof(DNSRsp), qrecord, sizeof(qrecord));
- memcpy(dnsrsp + sizeof(DNSRsp) + sizeof(qrecord), arecord, sizeof(arecord));
-
- /* overwrite with network order length and id from request header */
- reclen = (short int*)dnsrsp;
- *reclen = htons(rsplen-2);
- dnsrsp[QUERYID_OFFSET] = hdr[QUERYID_OFFSET];
- dnsrsp[QUERYID_OFFSET+1] = hdr[QUERYID_OFFSET+1];
-
- wr->buf.len += rsplen;
-}
-
-static void process_req(uv_stream_t* handle,
- ssize_t nread,
- const uv_buf_t* buf) {
- write_req_t* wr;
- dnshandle* dns = (dnshandle*)handle;
- char hdrbuf[DNSREC_LEN];
- int hdrbuf_remaining = DNSREC_LEN;
- int rec_remaining = 0;
- int readbuf_remaining;
- char* dnsreq;
- char* hdrstart;
- int usingprev = 0;
-
- wr = (write_req_t*) malloc(sizeof *wr);
- wr->buf.base = (char*)malloc(WRITE_BUF_LEN);
- wr->buf.len = 0;
-
- if (dns->state.prevbuf_ptr != NULL) {
- dnsreq = dns->state.prevbuf_ptr + dns->state.prevbuf_pos;
- readbuf_remaining = dns->state.prevbuf_rem;
- usingprev = 1;
- } else {
- dnsreq = buf->base;
- readbuf_remaining = nread;
- }
- hdrstart = dnsreq;
-
- while (dnsreq != NULL) {
- /* something to process */
- while (readbuf_remaining > 0) {
- /* something to process in current buffer */
- if (hdrbuf_remaining > 0) {
- /* process len and id */
- if (readbuf_remaining < hdrbuf_remaining) {
- /* too little to get request header. save for next buffer */
- memcpy(&hdrbuf[DNSREC_LEN - hdrbuf_remaining],
- dnsreq,
- readbuf_remaining);
- hdrbuf_remaining = DNSREC_LEN - readbuf_remaining;
- break;
- } else {
- /* save header */
- memcpy(&hdrbuf[DNSREC_LEN - hdrbuf_remaining],
- dnsreq,
- hdrbuf_remaining);
- dnsreq += hdrbuf_remaining;
- readbuf_remaining -= hdrbuf_remaining;
- hdrbuf_remaining = 0;
-
- /* get record length */
- rec_remaining = (unsigned) hdrbuf[0] * 256 + (unsigned) hdrbuf[1];
- rec_remaining -= (DNSREC_LEN - 2);
- }
- }
-
- if (rec_remaining <= readbuf_remaining) {
- /* prepare reply */
- addrsp(wr, hdrbuf);
-
- /* move to next record */
- dnsreq += rec_remaining;
- hdrstart = dnsreq;
- readbuf_remaining -= rec_remaining;
- rec_remaining = 0;
- hdrbuf_remaining = DNSREC_LEN;
- } else {
- /* otherwise this buffer is done. */
- rec_remaining -= readbuf_remaining;
- break;
- }
- }
-
- /* If we had to use bytes from prev buffer, start processing the current
- * one.
- */
- if (usingprev == 1) {
- /* free previous buffer */
- free(dns->state.prevbuf_ptr);
- dnsreq = buf->base;
- readbuf_remaining = nread;
- usingprev = 0;
- } else {
- dnsreq = NULL;
- }
- }
-
- /* send write buffer */
- if (wr->buf.len > 0) {
- if (uv_write((uv_write_t*) &wr->req, handle, &wr->buf, 1, after_write)) {
- FATAL("uv_write failed");
- }
- }
-
- if (readbuf_remaining > 0) {
- /* save start of record position, so we can continue on next read */
- dns->state.prevbuf_ptr = buf->base;
- dns->state.prevbuf_pos = hdrstart - buf->base;
- dns->state.prevbuf_rem = nread - dns->state.prevbuf_pos;
- } else {
- /* nothing left in this buffer */
- dns->state.prevbuf_ptr = NULL;
- dns->state.prevbuf_pos = 0;
- dns->state.prevbuf_rem = 0;
- free(buf->base);
- }
-}
-
-static void after_read(uv_stream_t* handle,
- ssize_t nread,
- const uv_buf_t* buf) {
- uv_shutdown_t* req;
-
- if (nread < 0) {
- /* Error or EOF */
- ASSERT(nread == UV_EOF);
-
- if (buf->base) {
- free(buf->base);
- }
-
- req = malloc(sizeof *req);
- uv_shutdown(req, handle, after_shutdown);
-
- return;
- }
-
- if (nread == 0) {
- /* Everything OK, but nothing read. */
- free(buf->base);
- return;
- }
- /* process requests and send responses */
- process_req(handle, nread, buf);
-}
-
-
-static void on_close(uv_handle_t* peer) {
- free(peer);
-}
-
-
-static void buf_alloc(uv_handle_t* handle,
- size_t suggested_size,
- uv_buf_t* buf) {
- buf->base = malloc(suggested_size);
- buf->len = suggested_size;
-}
-
-
-static void on_connection(uv_stream_t* server, int status) {
- dnshandle* handle;
- int r;
-
- ASSERT(status == 0);
-
- handle = (dnshandle*) malloc(sizeof *handle);
- ASSERT(handle != NULL);
-
- /* initialize read buffer state */
- handle->state.prevbuf_ptr = 0;
- handle->state.prevbuf_pos = 0;
- handle->state.prevbuf_rem = 0;
-
- r = uv_tcp_init(loop, (uv_tcp_t*)handle);
- ASSERT(r == 0);
-
- r = uv_accept(server, (uv_stream_t*)handle);
- ASSERT(r == 0);
-
- r = uv_read_start((uv_stream_t*)handle, buf_alloc, after_read);
- ASSERT(r == 0);
-}
-
-
-static int dns_start(int port) {
- struct sockaddr_in addr;
- int r;
-
- ASSERT(0 == uv_ip4_addr("0.0.0.0", port, &addr));
-
- r = uv_tcp_init(loop, &server);
- if (r) {
- /* TODO: Error codes */
- fprintf(stderr, "Socket creation error\n");
- return 1;
- }
-
- r = uv_tcp_bind(&server, (const struct sockaddr*) &addr, 0);
- if (r) {
- /* TODO: Error codes */
- fprintf(stderr, "Bind error\n");
- return 1;
- }
-
- r = uv_listen((uv_stream_t*)&server, 128, on_connection);
- if (r) {
- /* TODO: Error codes */
- fprintf(stderr, "Listen error\n");
- return 1;
- }
-
- return 0;
-}
-
-
-HELPER_IMPL(dns_server) {
- loop = uv_default_loop();
-
- if (dns_start(TEST_PORT_2))
- return 1;
-
- uv_run(loop, UV_RUN_DEFAULT);
- return 0;
-}
diff --git a/3rdparty/libuv/test/echo-server.c b/3rdparty/libuv/test/echo-server.c
deleted file mode 100644
index bfed67675dd..00000000000
--- a/3rdparty/libuv/test/echo-server.c
+++ /dev/null
@@ -1,378 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-typedef struct {
- uv_write_t req;
- uv_buf_t buf;
-} write_req_t;
-
-static uv_loop_t* loop;
-
-static int server_closed;
-static stream_type serverType;
-static uv_tcp_t tcpServer;
-static uv_udp_t udpServer;
-static uv_pipe_t pipeServer;
-static uv_handle_t* server;
-
-static void after_write(uv_write_t* req, int status);
-static void after_read(uv_stream_t*, ssize_t nread, const uv_buf_t* buf);
-static void on_close(uv_handle_t* peer);
-static void on_server_close(uv_handle_t* handle);
-static void on_connection(uv_stream_t*, int status);
-
-
-static void after_write(uv_write_t* req, int status) {
- write_req_t* wr;
-
- /* Free the read/write buffer and the request */
- wr = (write_req_t*) req;
- free(wr->buf.base);
- free(wr);
-
- if (status == 0)
- return;
-
- fprintf(stderr,
- "uv_write error: %s - %s\n",
- uv_err_name(status),
- uv_strerror(status));
-}
-
-
-static void after_shutdown(uv_shutdown_t* req, int status) {
- uv_close((uv_handle_t*) req->handle, on_close);
- free(req);
-}
-
-
-static void after_read(uv_stream_t* handle,
- ssize_t nread,
- const uv_buf_t* buf) {
- int i;
- write_req_t *wr;
- uv_shutdown_t* sreq;
-
- if (nread < 0) {
- /* Error or EOF */
- ASSERT(nread == UV_EOF);
-
- free(buf->base);
- sreq = malloc(sizeof* sreq);
- ASSERT(0 == uv_shutdown(sreq, handle, after_shutdown));
- return;
- }
-
- if (nread == 0) {
- /* Everything OK, but nothing read. */
- free(buf->base);
- return;
- }
-
- /*
- * Scan for the letter Q which signals that we should quit the server.
- * If we get QS it means close the stream.
- */
- if (!server_closed) {
- for (i = 0; i < nread; i++) {
- if (buf->base[i] == 'Q') {
- if (i + 1 < nread && buf->base[i + 1] == 'S') {
- free(buf->base);
- uv_close((uv_handle_t*)handle, on_close);
- return;
- } else {
- uv_close(server, on_server_close);
- server_closed = 1;
- }
- }
- }
- }
-
- wr = (write_req_t*) malloc(sizeof *wr);
- ASSERT(wr != NULL);
- wr->buf = uv_buf_init(buf->base, nread);
-
- if (uv_write(&wr->req, handle, &wr->buf, 1, after_write)) {
- FATAL("uv_write failed");
- }
-}
-
-
-static void on_close(uv_handle_t* peer) {
- free(peer);
-}
-
-
-static void echo_alloc(uv_handle_t* handle,
- size_t suggested_size,
- uv_buf_t* buf) {
- buf->base = malloc(suggested_size);
- buf->len = suggested_size;
-}
-
-
-static void on_connection(uv_stream_t* server, int status) {
- uv_stream_t* stream;
- int r;
-
- if (status != 0) {
- fprintf(stderr, "Connect error %s\n", uv_err_name(status));
- }
- ASSERT(status == 0);
-
- switch (serverType) {
- case TCP:
- stream = malloc(sizeof(uv_tcp_t));
- ASSERT(stream != NULL);
- r = uv_tcp_init(loop, (uv_tcp_t*)stream);
- ASSERT(r == 0);
- break;
-
- case PIPE:
- stream = malloc(sizeof(uv_pipe_t));
- ASSERT(stream != NULL);
- r = uv_pipe_init(loop, (uv_pipe_t*)stream, 0);
- ASSERT(r == 0);
- break;
-
- default:
- ASSERT(0 && "Bad serverType");
- abort();
- }
-
- /* associate server with stream */
- stream->data = server;
-
- r = uv_accept(server, stream);
- ASSERT(r == 0);
-
- r = uv_read_start(stream, echo_alloc, after_read);
- ASSERT(r == 0);
-}
-
-
-static void on_server_close(uv_handle_t* handle) {
- ASSERT(handle == server);
-}
-
-
-static void on_send(uv_udp_send_t* req, int status);
-
-
-static void on_recv(uv_udp_t* handle,
- ssize_t nread,
- const uv_buf_t* rcvbuf,
- const struct sockaddr* addr,
- unsigned flags) {
- uv_udp_send_t* req;
- uv_buf_t sndbuf;
-
- ASSERT(nread > 0);
- ASSERT(addr->sa_family == AF_INET);
-
- req = malloc(sizeof(*req));
- ASSERT(req != NULL);
-
- sndbuf = *rcvbuf;
- ASSERT(0 == uv_udp_send(req, handle, &sndbuf, 1, addr, on_send));
-}
-
-
-static void on_send(uv_udp_send_t* req, int status) {
- ASSERT(status == 0);
- free(req);
-}
-
-
-static int tcp4_echo_start(int port) {
- struct sockaddr_in addr;
- int r;
-
- ASSERT(0 == uv_ip4_addr("0.0.0.0", port, &addr));
-
- server = (uv_handle_t*)&tcpServer;
- serverType = TCP;
-
- r = uv_tcp_init(loop, &tcpServer);
- if (r) {
- /* TODO: Error codes */
- fprintf(stderr, "Socket creation error\n");
- return 1;
- }
-
- r = uv_tcp_bind(&tcpServer, (const struct sockaddr*) &addr, 0);
- if (r) {
- /* TODO: Error codes */
- fprintf(stderr, "Bind error\n");
- return 1;
- }
-
- r = uv_listen((uv_stream_t*)&tcpServer, SOMAXCONN, on_connection);
- if (r) {
- /* TODO: Error codes */
- fprintf(stderr, "Listen error %s\n", uv_err_name(r));
- return 1;
- }
-
- return 0;
-}
-
-
-static int tcp6_echo_start(int port) {
- struct sockaddr_in6 addr6;
- int r;
-
- ASSERT(0 == uv_ip6_addr("::1", port, &addr6));
-
- server = (uv_handle_t*)&tcpServer;
- serverType = TCP;
-
- r = uv_tcp_init(loop, &tcpServer);
- if (r) {
- /* TODO: Error codes */
- fprintf(stderr, "Socket creation error\n");
- return 1;
- }
-
- /* IPv6 is optional as not all platforms support it */
- r = uv_tcp_bind(&tcpServer, (const struct sockaddr*) &addr6, 0);
- if (r) {
- /* show message but return OK */
- fprintf(stderr, "IPv6 not supported\n");
- return 0;
- }
-
- r = uv_listen((uv_stream_t*)&tcpServer, SOMAXCONN, on_connection);
- if (r) {
- /* TODO: Error codes */
- fprintf(stderr, "Listen error\n");
- return 1;
- }
-
- return 0;
-}
-
-
-static int udp4_echo_start(int port) {
- int r;
-
- server = (uv_handle_t*)&udpServer;
- serverType = UDP;
-
- r = uv_udp_init(loop, &udpServer);
- if (r) {
- fprintf(stderr, "uv_udp_init: %s\n", uv_strerror(r));
- return 1;
- }
-
- r = uv_udp_recv_start(&udpServer, echo_alloc, on_recv);
- if (r) {
- fprintf(stderr, "uv_udp_recv_start: %s\n", uv_strerror(r));
- return 1;
- }
-
- return 0;
-}
-
-
-static int pipe_echo_start(char* pipeName) {
- int r;
-
-#ifndef _WIN32
- {
- uv_fs_t req;
- uv_fs_unlink(NULL, &req, pipeName, NULL);
- uv_fs_req_cleanup(&req);
- }
-#endif
-
- server = (uv_handle_t*)&pipeServer;
- serverType = PIPE;
-
- r = uv_pipe_init(loop, &pipeServer, 0);
- if (r) {
- fprintf(stderr, "uv_pipe_init: %s\n", uv_strerror(r));
- return 1;
- }
-
- r = uv_pipe_bind(&pipeServer, pipeName);
- if (r) {
- fprintf(stderr, "uv_pipe_bind: %s\n", uv_strerror(r));
- return 1;
- }
-
- r = uv_listen((uv_stream_t*)&pipeServer, SOMAXCONN, on_connection);
- if (r) {
- fprintf(stderr, "uv_pipe_listen: %s\n", uv_strerror(r));
- return 1;
- }
-
- return 0;
-}
-
-
-HELPER_IMPL(tcp4_echo_server) {
- loop = uv_default_loop();
-
- if (tcp4_echo_start(TEST_PORT))
- return 1;
-
- uv_run(loop, UV_RUN_DEFAULT);
- return 0;
-}
-
-
-HELPER_IMPL(tcp6_echo_server) {
- loop = uv_default_loop();
-
- if (tcp6_echo_start(TEST_PORT))
- return 1;
-
- uv_run(loop, UV_RUN_DEFAULT);
- return 0;
-}
-
-
-HELPER_IMPL(pipe_echo_server) {
- loop = uv_default_loop();
-
- if (pipe_echo_start(TEST_PIPENAME))
- return 1;
-
- uv_run(loop, UV_RUN_DEFAULT);
- return 0;
-}
-
-
-HELPER_IMPL(udp4_echo_server) {
- loop = uv_default_loop();
-
- if (udp4_echo_start(TEST_PORT))
- return 1;
-
- uv_run(loop, UV_RUN_DEFAULT);
- return 0;
-}
diff --git a/3rdparty/libuv/test/fixtures/load_error.node b/3rdparty/libuv/test/fixtures/load_error.node
deleted file mode 100644
index 323fae03f46..00000000000
--- a/3rdparty/libuv/test/fixtures/load_error.node
+++ /dev/null
@@ -1 +0,0 @@
-foobar
diff --git a/3rdparty/libuv/test/run-benchmarks.c b/3rdparty/libuv/test/run-benchmarks.c
deleted file mode 100644
index 6e42623d54c..00000000000
--- a/3rdparty/libuv/test/run-benchmarks.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-
-#include "runner.h"
-#include "task.h"
-
-/* Actual benchmarks and helpers are defined in benchmark-list.h */
-#include "benchmark-list.h"
-
-
-static int maybe_run_test(int argc, char **argv);
-
-
-int main(int argc, char **argv) {
- if (platform_init(argc, argv))
- return EXIT_FAILURE;
-
- switch (argc) {
- case 1: return run_tests(1);
- case 2: return maybe_run_test(argc, argv);
- case 3: return run_test_part(argv[1], argv[2]);
- default:
- fprintf(stderr, "Too many arguments.\n");
- fflush(stderr);
- return EXIT_FAILURE;
- }
-
- return EXIT_SUCCESS;
-}
-
-
-static int maybe_run_test(int argc, char **argv) {
- if (strcmp(argv[1], "--list") == 0) {
- print_tests(stdout);
- return 0;
- }
-
- if (strcmp(argv[1], "spawn_helper") == 0) {
- printf("hello world\n");
- return 42;
- }
-
- return run_test(argv[1], 1, 1);
-}
diff --git a/3rdparty/libuv/test/run-tests.c b/3rdparty/libuv/test/run-tests.c
deleted file mode 100644
index b4be01f6f95..00000000000
--- a/3rdparty/libuv/test/run-tests.c
+++ /dev/null
@@ -1,181 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-
-#ifdef _WIN32
-# include <io.h>
-#else
-# include <unistd.h>
-#endif
-
-#include "uv.h"
-#include "runner.h"
-#include "task.h"
-
-/* Actual tests and helpers are defined in test-list.h */
-#include "test-list.h"
-
-int ipc_helper(int listen_after_write);
-int ipc_helper_tcp_connection(void);
-int ipc_send_recv_helper(void);
-int ipc_helper_bind_twice(void);
-int stdio_over_pipes_helper(void);
-int spawn_stdin_stdout(void);
-
-static int maybe_run_test(int argc, char **argv);
-
-
-int main(int argc, char **argv) {
- if (platform_init(argc, argv))
- return EXIT_FAILURE;
-
- argv = uv_setup_args(argc, argv);
-
- switch (argc) {
- case 1: return run_tests(0);
- case 2: return maybe_run_test(argc, argv);
- case 3: return run_test_part(argv[1], argv[2]);
- default:
- fprintf(stderr, "Too many arguments.\n");
- fflush(stderr);
- return EXIT_FAILURE;
- }
-
- return EXIT_SUCCESS;
-}
-
-
-static int maybe_run_test(int argc, char **argv) {
- if (strcmp(argv[1], "--list") == 0) {
- print_tests(stdout);
- return 0;
- }
-
- if (strcmp(argv[1], "ipc_helper_listen_before_write") == 0) {
- return ipc_helper(0);
- }
-
- if (strcmp(argv[1], "ipc_helper_listen_after_write") == 0) {
- return ipc_helper(1);
- }
-
- if (strcmp(argv[1], "ipc_send_recv_helper") == 0) {
- return ipc_send_recv_helper();
- }
-
- if (strcmp(argv[1], "ipc_helper_tcp_connection") == 0) {
- return ipc_helper_tcp_connection();
- }
-
- if (strcmp(argv[1], "ipc_helper_bind_twice") == 0) {
- return ipc_helper_bind_twice();
- }
-
- if (strcmp(argv[1], "stdio_over_pipes_helper") == 0) {
- return stdio_over_pipes_helper();
- }
-
- if (strcmp(argv[1], "spawn_helper1") == 0) {
- return 1;
- }
-
- if (strcmp(argv[1], "spawn_helper2") == 0) {
- printf("hello world\n");
- return 1;
- }
-
- if (strcmp(argv[1], "spawn_helper3") == 0) {
- char buffer[256];
- ASSERT(buffer == fgets(buffer, sizeof(buffer) - 1, stdin));
- buffer[sizeof(buffer) - 1] = '\0';
- fputs(buffer, stdout);
- return 1;
- }
-
- if (strcmp(argv[1], "spawn_helper4") == 0) {
- /* Never surrender, never return! */
- while (1) uv_sleep(10000);
- }
-
- if (strcmp(argv[1], "spawn_helper5") == 0) {
- const char out[] = "fourth stdio!\n";
-#ifdef _WIN32
- DWORD bytes;
- WriteFile((HANDLE) _get_osfhandle(3), out, sizeof(out) - 1, &bytes, NULL);
-#else
- {
- ssize_t r;
-
- do
- r = write(3, out, sizeof(out) - 1);
- while (r == -1 && errno == EINTR);
-
- fsync(3);
- }
-#endif
- return 1;
- }
-
- if (strcmp(argv[1], "spawn_helper6") == 0) {
- int r;
-
- r = fprintf(stdout, "hello world\n");
- ASSERT(r > 0);
-
- r = fprintf(stderr, "hello errworld\n");
- ASSERT(r > 0);
-
- return 1;
- }
-
- if (strcmp(argv[1], "spawn_helper7") == 0) {
- int r;
- char *test;
- /* Test if the test value from the parent is still set */
- test = getenv("ENV_TEST");
- ASSERT(test != NULL);
-
- r = fprintf(stdout, "%s", test);
- ASSERT(r > 0);
-
- return 1;
- }
-
-#ifndef _WIN32
- if (strcmp(argv[1], "spawn_helper8") == 0) {
- int fd;
- ASSERT(sizeof(fd) == read(0, &fd, sizeof(fd)));
- ASSERT(fd > 2);
- ASSERT(-1 == write(fd, "x", 1));
-
- return 1;
- }
-#endif /* !_WIN32 */
-
- if (strcmp(argv[1], "spawn_helper9") == 0) {
- return spawn_stdin_stdout();
- }
-
- return run_test(argv[1], 0, 1);
-}
diff --git a/3rdparty/libuv/test/runner-unix.c b/3rdparty/libuv/test/runner-unix.c
deleted file mode 100644
index 2264d1e89d5..00000000000
--- a/3rdparty/libuv/test/runner-unix.c
+++ /dev/null
@@ -1,400 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "runner-unix.h"
-#include "runner.h"
-
-#include <limits.h>
-#include <stdint.h> /* uintptr_t */
-
-#include <errno.h>
-#include <unistd.h> /* readlink, usleep */
-#include <string.h> /* strdup */
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <signal.h>
-#include <sys/wait.h>
-#include <sys/stat.h>
-#include <assert.h>
-
-#include <sys/select.h>
-#include <sys/time.h>
-#include <pthread.h>
-
-
-/* Do platform-specific initialization. */
-int platform_init(int argc, char **argv) {
- const char* tap;
-
- tap = getenv("UV_TAP_OUTPUT");
- tap_output = (tap != NULL && atoi(tap) > 0);
-
- /* Disable stdio output buffering. */
- setvbuf(stdout, NULL, _IONBF, 0);
- setvbuf(stderr, NULL, _IONBF, 0);
- signal(SIGPIPE, SIG_IGN);
-
- if (realpath(argv[0], executable_path) == NULL) {
- perror("realpath");
- return -1;
- }
-
- return 0;
-}
-
-
-/* Invoke "argv[0] test-name [test-part]". Store process info in *p. */
-/* Make sure that all stdio output of the processes is buffered up. */
-int process_start(char* name, char* part, process_info_t* p, int is_helper) {
- FILE* stdout_file;
- const char* arg;
- char* args[16];
- int n;
- pid_t pid;
-
- stdout_file = tmpfile();
- if (!stdout_file) {
- perror("tmpfile");
- return -1;
- }
-
- p->terminated = 0;
- p->status = 0;
-
- pid = fork();
-
- if (pid < 0) {
- perror("fork");
- return -1;
- }
-
- if (pid == 0) {
- /* child */
- arg = getenv("UV_USE_VALGRIND");
- n = 0;
-
- /* Disable valgrind for helpers, it complains about helpers leaking memory.
- * They're killed after the test and as such never get a chance to clean up.
- */
- if (is_helper == 0 && arg != NULL && atoi(arg) != 0) {
- args[n++] = "valgrind";
- args[n++] = "--quiet";
- args[n++] = "--leak-check=full";
- args[n++] = "--show-reachable=yes";
- args[n++] = "--error-exitcode=125";
- }
-
- args[n++] = executable_path;
- args[n++] = name;
- args[n++] = part;
- args[n++] = NULL;
-
- dup2(fileno(stdout_file), STDOUT_FILENO);
- dup2(fileno(stdout_file), STDERR_FILENO);
- execvp(args[0], args);
- perror("execvp()");
- _exit(127);
- }
-
- /* parent */
- p->pid = pid;
- p->name = strdup(name);
- p->stdout_file = stdout_file;
-
- return 0;
-}
-
-
-typedef struct {
- int pipe[2];
- process_info_t* vec;
- int n;
-} dowait_args;
-
-
-/* This function is run inside a pthread. We do this so that we can possibly
- * timeout.
- */
-static void* dowait(void* data) {
- dowait_args* args = data;
-
- int i, r;
- process_info_t* p;
-
- for (i = 0; i < args->n; i++) {
- p = (process_info_t*)(args->vec + i * sizeof(process_info_t));
- if (p->terminated) continue;
- r = waitpid(p->pid, &p->status, 0);
- if (r < 0) {
- perror("waitpid");
- return NULL;
- }
- p->terminated = 1;
- }
-
- if (args->pipe[1] >= 0) {
- /* Write a character to the main thread to notify it about this. */
- ssize_t r;
-
- do
- r = write(args->pipe[1], "", 1);
- while (r == -1 && errno == EINTR);
- }
-
- return NULL;
-}
-
-
-/* Wait for all `n` processes in `vec` to terminate. */
-/* Time out after `timeout` msec, or never if timeout == -1 */
-/* Return 0 if all processes are terminated, -1 on error, -2 on timeout. */
-int process_wait(process_info_t* vec, int n, int timeout) {
- int i;
- int r;
- int retval;
- process_info_t* p;
- dowait_args args;
- pthread_t tid;
- pthread_attr_t attr;
- unsigned int elapsed_ms;
- struct timeval timebase;
- struct timeval tv;
- fd_set fds;
-
- args.vec = vec;
- args.n = n;
- args.pipe[0] = -1;
- args.pipe[1] = -1;
-
- /* The simple case is where there is no timeout */
- if (timeout == -1) {
- dowait(&args);
- return 0;
- }
-
- /* Hard case. Do the wait with a timeout.
- *
- * Assumption: we are the only ones making this call right now. Otherwise
- * we'd need to lock vec.
- */
-
- r = pipe((int*)&(args.pipe));
- if (r) {
- perror("pipe()");
- return -1;
- }
-
- if (pthread_attr_init(&attr))
- abort();
-
- if (pthread_attr_setstacksize(&attr, 256 * 1024))
- abort();
-
- r = pthread_create(&tid, &attr, dowait, &args);
-
- if (pthread_attr_destroy(&attr))
- abort();
-
- if (r) {
- perror("pthread_create()");
- retval = -1;
- goto terminate;
- }
-
- if (gettimeofday(&timebase, NULL))
- abort();
-
- tv = timebase;
- for (;;) {
- /* Check that gettimeofday() doesn't jump back in time. */
- assert(tv.tv_sec == timebase.tv_sec ||
- (tv.tv_sec == timebase.tv_sec && tv.tv_usec >= timebase.tv_usec));
-
- elapsed_ms =
- (tv.tv_sec - timebase.tv_sec) * 1000 +
- (tv.tv_usec / 1000) -
- (timebase.tv_usec / 1000);
-
- r = 0; /* Timeout. */
- if (elapsed_ms >= (unsigned) timeout)
- break;
-
- tv.tv_sec = (timeout - elapsed_ms) / 1000;
- tv.tv_usec = (timeout - elapsed_ms) % 1000 * 1000;
-
- FD_ZERO(&fds);
- FD_SET(args.pipe[0], &fds);
-
- r = select(args.pipe[0] + 1, &fds, NULL, NULL, &tv);
- if (!(r == -1 && errno == EINTR))
- break;
-
- if (gettimeofday(&tv, NULL))
- abort();
- }
-
- if (r == -1) {
- perror("select()");
- retval = -1;
-
- } else if (r) {
- /* The thread completed successfully. */
- retval = 0;
-
- } else {
- /* Timeout. Kill all the children. */
- for (i = 0; i < n; i++) {
- p = (process_info_t*)(vec + i * sizeof(process_info_t));
- kill(p->pid, SIGTERM);
- }
- retval = -2;
- }
-
- if (pthread_join(tid, NULL))
- abort();
-
-terminate:
- close(args.pipe[0]);
- close(args.pipe[1]);
- return retval;
-}
-
-
-/* Returns the number of bytes in the stdio output buffer for process `p`. */
-long int process_output_size(process_info_t *p) {
- /* Size of the p->stdout_file */
- struct stat buf;
-
- int r = fstat(fileno(p->stdout_file), &buf);
- if (r < 0) {
- return -1;
- }
-
- return (long)buf.st_size;
-}
-
-
-/* Copy the contents of the stdio output buffer to `fd`. */
-int process_copy_output(process_info_t *p, int fd) {
- ssize_t nwritten;
- char buf[1024];
- int r;
-
- r = fseek(p->stdout_file, 0, SEEK_SET);
- if (r < 0) {
- perror("fseek");
- return -1;
- }
-
- /* TODO: what if the line is longer than buf */
- while (fgets(buf, sizeof(buf), p->stdout_file) != NULL) {
- /* TODO: what if write doesn't write the whole buffer... */
- nwritten = 0;
-
- if (tap_output)
- nwritten += write(fd, "#", 1);
-
- nwritten += write(fd, buf, strlen(buf));
-
- if (nwritten < 0) {
- perror("write");
- return -1;
- }
- }
-
- if (ferror(p->stdout_file)) {
- perror("read");
- return -1;
- }
-
- return 0;
-}
-
-
-/* Copy the last line of the stdio output buffer to `buffer` */
-int process_read_last_line(process_info_t *p,
- char* buffer,
- size_t buffer_len) {
- char* ptr;
-
- int r = fseek(p->stdout_file, 0, SEEK_SET);
- if (r < 0) {
- perror("fseek");
- return -1;
- }
-
- buffer[0] = '\0';
-
- while (fgets(buffer, buffer_len, p->stdout_file) != NULL) {
- for (ptr = buffer; *ptr && *ptr != '\r' && *ptr != '\n'; ptr++);
- *ptr = '\0';
- }
-
- if (ferror(p->stdout_file)) {
- perror("read");
- buffer[0] = '\0';
- return -1;
- }
- return 0;
-}
-
-
-/* Return the name that was specified when `p` was started by process_start */
-char* process_get_name(process_info_t *p) {
- return p->name;
-}
-
-
-/* Terminate process `p`. */
-int process_terminate(process_info_t *p) {
- return kill(p->pid, SIGTERM);
-}
-
-
-/* Return the exit code of process p. */
-/* On error, return -1. */
-int process_reap(process_info_t *p) {
- if (WIFEXITED(p->status)) {
- return WEXITSTATUS(p->status);
- } else {
- return p->status; /* ? */
- }
-}
-
-
-/* Clean up after terminating process `p` (e.g. free the output buffer etc.). */
-void process_cleanup(process_info_t *p) {
- fclose(p->stdout_file);
- free(p->name);
-}
-
-
-/* Move the console cursor one line up and back to the first column. */
-void rewind_cursor(void) {
- fprintf(stderr, "\033[2K\r");
-}
-
-
-/* Pause the calling thread for a number of milliseconds. */
-void uv_sleep(int msec) {
- usleep(msec * 1000);
-}
diff --git a/3rdparty/libuv/test/runner-unix.h b/3rdparty/libuv/test/runner-unix.h
deleted file mode 100644
index e21847f92c0..00000000000
--- a/3rdparty/libuv/test/runner-unix.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#ifndef TEST_RUNNER_UNIX_H
-#define TEST_RUNNER_UNIX_H
-
-#include <sys/types.h>
-#include <stdio.h> /* FILE */
-
-typedef struct {
- FILE* stdout_file;
- pid_t pid;
- char* name;
- int status;
- int terminated;
-} process_info_t;
-
-#endif /* TEST_RUNNER_UNIX_H */
diff --git a/3rdparty/libuv/test/runner-win.c b/3rdparty/libuv/test/runner-win.c
deleted file mode 100644
index 97ef7599eb8..00000000000
--- a/3rdparty/libuv/test/runner-win.c
+++ /dev/null
@@ -1,371 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include <fcntl.h>
-#include <io.h>
-#include <malloc.h>
-#include <stdio.h>
-#include <process.h>
-#if !defined(__MINGW32__)
-# include <crtdbg.h>
-#endif
-
-
-#include "task.h"
-#include "runner.h"
-
-
-/*
- * Define the stuff that MinGW doesn't have
- */
-#ifndef GetFileSizeEx
- WINBASEAPI BOOL WINAPI GetFileSizeEx(HANDLE hFile,
- PLARGE_INTEGER lpFileSize);
-#endif
-
-
-/* Do platform-specific initialization. */
-int platform_init(int argc, char **argv) {
- const char* tap;
-
- tap = getenv("UV_TAP_OUTPUT");
- tap_output = (tap != NULL && atoi(tap) > 0);
-
- /* Disable the "application crashed" popup. */
- SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX |
- SEM_NOOPENFILEERRORBOX);
-#if !defined(__MINGW32__)
- _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG);
- _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG);
-#endif
-
- _setmode(0, _O_BINARY);
- _setmode(1, _O_BINARY);
- _setmode(2, _O_BINARY);
-
- /* Disable stdio output buffering. */
- setvbuf(stdout, NULL, _IONBF, 0);
- setvbuf(stderr, NULL, _IONBF, 0);
-
- strcpy(executable_path, argv[0]);
-
- return 0;
-}
-
-
-int process_start(char *name, char *part, process_info_t *p, int is_helper) {
- HANDLE file = INVALID_HANDLE_VALUE;
- HANDLE nul = INVALID_HANDLE_VALUE;
- WCHAR path[MAX_PATH], filename[MAX_PATH];
- WCHAR image[MAX_PATH + 1];
- WCHAR args[MAX_PATH * 2];
- STARTUPINFOW si;
- PROCESS_INFORMATION pi;
- DWORD result;
-
- if (GetTempPathW(sizeof(path) / sizeof(WCHAR), (WCHAR*)&path) == 0)
- goto error;
- if (GetTempFileNameW((WCHAR*)&path, L"uv", 0, (WCHAR*)&filename) == 0)
- goto error;
-
- file = CreateFileW((WCHAR*)filename,
- GENERIC_READ | GENERIC_WRITE,
- 0,
- NULL,
- CREATE_ALWAYS,
- FILE_ATTRIBUTE_TEMPORARY | FILE_FLAG_DELETE_ON_CLOSE,
- NULL);
- if (file == INVALID_HANDLE_VALUE)
- goto error;
-
- if (!SetHandleInformation(file, HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT))
- goto error;
-
- nul = CreateFileA("nul",
- GENERIC_READ,
- FILE_SHARE_READ | FILE_SHARE_WRITE,
- NULL,
- OPEN_EXISTING,
- FILE_ATTRIBUTE_NORMAL,
- NULL);
- if (nul == INVALID_HANDLE_VALUE)
- goto error;
-
- if (!SetHandleInformation(nul, HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT))
- goto error;
-
- result = GetModuleFileNameW(NULL,
- (WCHAR*) &image,
- sizeof(image) / sizeof(WCHAR));
- if (result == 0 || result == sizeof(image))
- goto error;
-
- if (part) {
- if (_snwprintf((WCHAR*)args,
- sizeof(args) / sizeof(WCHAR),
- L"\"%s\" %S %S",
- image,
- name,
- part) < 0) {
- goto error;
- }
- } else {
- if (_snwprintf((WCHAR*)args,
- sizeof(args) / sizeof(WCHAR),
- L"\"%s\" %S",
- image,
- name) < 0) {
- goto error;
- }
- }
-
- memset((void*)&si, 0, sizeof(si));
- si.cb = sizeof(si);
- si.dwFlags = STARTF_USESTDHANDLES;
- si.hStdInput = nul;
- si.hStdOutput = file;
- si.hStdError = file;
-
- if (!CreateProcessW(image, args, NULL, NULL, TRUE,
- 0, NULL, NULL, &si, &pi))
- goto error;
-
- CloseHandle(pi.hThread);
-
- SetHandleInformation(nul, HANDLE_FLAG_INHERIT, 0);
- SetHandleInformation(file, HANDLE_FLAG_INHERIT, 0);
-
- p->stdio_in = nul;
- p->stdio_out = file;
- p->process = pi.hProcess;
- p->name = part;
-
- return 0;
-
-error:
- if (file != INVALID_HANDLE_VALUE)
- CloseHandle(file);
- if (nul != INVALID_HANDLE_VALUE)
- CloseHandle(nul);
-
- return -1;
-}
-
-
-/* Timeout is is msecs. Set timeout < 0 to never time out. */
-/* Returns 0 when all processes are terminated, -2 on timeout. */
-int process_wait(process_info_t *vec, int n, int timeout) {
- int i;
- HANDLE handles[MAXIMUM_WAIT_OBJECTS];
- DWORD timeout_api, result;
-
- /* If there's nothing to wait for, return immediately. */
- if (n == 0)
- return 0;
-
- ASSERT(n <= MAXIMUM_WAIT_OBJECTS);
-
- for (i = 0; i < n; i++)
- handles[i] = vec[i].process;
-
- if (timeout >= 0) {
- timeout_api = (DWORD)timeout;
- } else {
- timeout_api = INFINITE;
- }
-
- result = WaitForMultipleObjects(n, handles, TRUE, timeout_api);
-
- if (result >= WAIT_OBJECT_0 && result < WAIT_OBJECT_0 + n) {
- /* All processes are terminated. */
- return 0;
- }
- if (result == WAIT_TIMEOUT) {
- return -2;
- }
- return -1;
-}
-
-
-long int process_output_size(process_info_t *p) {
- LARGE_INTEGER size;
- if (!GetFileSizeEx(p->stdio_out, &size))
- return -1;
- return (long int)size.QuadPart;
-}
-
-
-int process_copy_output(process_info_t *p, int fd) {
- DWORD read;
- char buf[1024];
- char *line, *start;
-
- if (SetFilePointer(p->stdio_out,
- 0,
- 0,
- FILE_BEGIN) == INVALID_SET_FILE_POINTER) {
- return -1;
- }
-
- if (tap_output)
- write(fd, "#", 1);
-
- while (ReadFile(p->stdio_out, (void*)&buf, sizeof(buf), &read, NULL) &&
- read > 0) {
- if (tap_output) {
- start = buf;
-
- while ((line = strchr(start, '\n')) != NULL) {
- write(fd, start, line - start + 1);
- write(fd, "#", 1);
- start = line + 1;
- }
-
- if (start < buf + read)
- write(fd, start, buf + read - start);
- } else {
- write(fd, buf, read);
- }
- }
-
- if (tap_output)
- write(fd, "\n", 1);
-
- if (GetLastError() != ERROR_HANDLE_EOF)
- return -1;
-
- return 0;
-}
-
-
-int process_read_last_line(process_info_t *p,
- char * buffer,
- size_t buffer_len) {
- DWORD size;
- DWORD read;
- DWORD start;
- OVERLAPPED overlapped;
-
- ASSERT(buffer_len > 0);
-
- size = GetFileSize(p->stdio_out, NULL);
- if (size == INVALID_FILE_SIZE)
- return -1;
-
- if (size == 0) {
- buffer[0] = '\0';
- return 1;
- }
-
- memset(&overlapped, 0, sizeof overlapped);
- if (size >= buffer_len)
- overlapped.Offset = size - buffer_len - 1;
-
- if (!ReadFile(p->stdio_out, buffer, buffer_len - 1, &read, &overlapped))
- return -1;
-
- for (start = read - 1; start >= 0; start--) {
- if (buffer[start] == '\n' || buffer[start] == '\r')
- break;
- }
-
- if (start > 0)
- memmove(buffer, buffer + start, read - start);
-
- buffer[read - start] = '\0';
-
- return 0;
-}
-
-
-char* process_get_name(process_info_t *p) {
- return p->name;
-}
-
-
-int process_terminate(process_info_t *p) {
- if (!TerminateProcess(p->process, 1))
- return -1;
- return 0;
-}
-
-
-int process_reap(process_info_t *p) {
- DWORD exitCode;
- if (!GetExitCodeProcess(p->process, &exitCode))
- return -1;
- return (int)exitCode;
-}
-
-
-void process_cleanup(process_info_t *p) {
- CloseHandle(p->process);
- CloseHandle(p->stdio_in);
- CloseHandle(p->stdio_out);
-}
-
-
-static int clear_line() {
- HANDLE handle;
- CONSOLE_SCREEN_BUFFER_INFO info;
- COORD coord;
- DWORD written;
-
- handle = (HANDLE)_get_osfhandle(fileno(stderr));
- if (handle == INVALID_HANDLE_VALUE)
- return -1;
-
- if (!GetConsoleScreenBufferInfo(handle, &info))
- return -1;
-
- coord = info.dwCursorPosition;
- if (coord.Y <= 0)
- return -1;
-
- coord.X = 0;
-
- if (!SetConsoleCursorPosition(handle, coord))
- return -1;
-
- if (!FillConsoleOutputCharacterW(handle,
- 0x20,
- info.dwSize.X,
- coord,
- &written)) {
- return -1;
- }
-
- return 0;
-}
-
-
-void rewind_cursor() {
- if (clear_line() == -1) {
- /* If clear_line fails (stdout is not a console), print a newline. */
- fprintf(stderr, "\n");
- }
-}
-
-
-/* Pause the calling thread for a number of milliseconds. */
-void uv_sleep(int msec) {
- Sleep(msec);
-}
diff --git a/3rdparty/libuv/test/runner-win.h b/3rdparty/libuv/test/runner-win.h
deleted file mode 100644
index 8cc4c16eb22..00000000000
--- a/3rdparty/libuv/test/runner-win.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-/* Don't complain about write(), fileno() etc. being deprecated. */
-#pragma warning(disable : 4996)
-
-
-#include <winsock2.h>
-#include <windows.h>
-#include <stdio.h>
-
-#if !defined(snprintf) && defined(_MSC_VER) && _MSC_VER < 1900
-extern int snprintf(char*, size_t, const char*, ...);
-#endif
-
-typedef struct {
- HANDLE process;
- HANDLE stdio_in;
- HANDLE stdio_out;
- char *name;
-} process_info_t;
diff --git a/3rdparty/libuv/test/runner.c b/3rdparty/libuv/test/runner.c
deleted file mode 100644
index c616d176445..00000000000
--- a/3rdparty/libuv/test/runner.c
+++ /dev/null
@@ -1,466 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include <stdio.h>
-#include <string.h>
-
-#include "runner.h"
-#include "task.h"
-#include "uv.h"
-
-char executable_path[sizeof(executable_path)];
-
-int tap_output = 0;
-
-
-static void log_progress(int total,
- int passed,
- int failed,
- int todos,
- int skipped,
- const char* name) {
- int progress;
-
- if (total == 0)
- total = 1;
-
- progress = 100 * (passed + failed + skipped + todos) / total;
- fprintf(stderr, "[%% %3d|+ %3d|- %3d|T %3d|S %3d]: %s",
- progress,
- passed,
- failed,
- todos,
- skipped,
- name);
- fflush(stderr);
-}
-
-
-const char* fmt(double d) {
- static char buf[1024];
- static char* p;
- uint64_t v;
-
- if (p == NULL)
- p = buf;
-
- p += 31;
-
- if (p >= buf + sizeof(buf))
- return "<buffer too small>";
-
- v = (uint64_t) d;
-
-#if 0 /* works but we don't care about fractional precision */
- if (d - v >= 0.01) {
- *--p = '0' + (uint64_t) (d * 100) % 10;
- *--p = '0' + (uint64_t) (d * 10) % 10;
- *--p = '.';
- }
-#endif
-
- if (v == 0)
- *--p = '0';
-
- while (v) {
- if (v) *--p = '0' + (v % 10), v /= 10;
- if (v) *--p = '0' + (v % 10), v /= 10;
- if (v) *--p = '0' + (v % 10), v /= 10;
- if (v) *--p = ',';
- }
-
- return p;
-}
-
-
-int run_tests(int benchmark_output) {
- int total;
- int passed;
- int failed;
- int todos;
- int skipped;
- int current;
- int test_result;
- task_entry_t* task;
-
- /* Count the number of tests. */
- total = 0;
- for (task = TASKS; task->main; task++) {
- if (!task->is_helper) {
- total++;
- }
- }
-
- if (tap_output) {
- fprintf(stderr, "1..%d\n", total);
- fflush(stderr);
- }
-
- /* Run all tests. */
- passed = 0;
- failed = 0;
- todos = 0;
- skipped = 0;
- current = 1;
- for (task = TASKS; task->main; task++) {
- if (task->is_helper) {
- continue;
- }
-
- if (!tap_output)
- rewind_cursor();
-
- if (!benchmark_output && !tap_output) {
- log_progress(total, passed, failed, todos, skipped, task->task_name);
- }
-
- test_result = run_test(task->task_name, benchmark_output, current);
- switch (test_result) {
- case TEST_OK: passed++; break;
- case TEST_TODO: todos++; break;
- case TEST_SKIP: skipped++; break;
- default: failed++;
- }
- current++;
- }
-
- if (!tap_output)
- rewind_cursor();
-
- if (!benchmark_output && !tap_output) {
- log_progress(total, passed, failed, todos, skipped, "Done.\n");
- }
-
- return failed;
-}
-
-
-void log_tap_result(int test_count,
- const char* test,
- int status,
- process_info_t* process) {
- const char* result;
- const char* directive;
- char reason[1024];
-
- switch (status) {
- case TEST_OK:
- result = "ok";
- directive = "";
- break;
- case TEST_TODO:
- result = "not ok";
- directive = " # TODO ";
- break;
- case TEST_SKIP:
- result = "ok";
- directive = " # SKIP ";
- break;
- default:
- result = "not ok";
- directive = "";
- }
-
- if ((status == TEST_SKIP || status == TEST_TODO) &&
- process_output_size(process) > 0) {
- process_read_last_line(process, reason, sizeof reason);
- } else {
- reason[0] = '\0';
- }
-
- fprintf(stderr, "%s %d - %s%s%s\n", result, test_count, test, directive, reason);
- fflush(stderr);
-}
-
-
-int run_test(const char* test,
- int benchmark_output,
- int test_count) {
- char errmsg[1024] = "no error";
- process_info_t processes[1024];
- process_info_t *main_proc;
- task_entry_t* task;
- int process_count;
- int result;
- int status;
- int i;
-
- status = 255;
- main_proc = NULL;
- process_count = 0;
-
-#ifndef _WIN32
- /* Clean up stale socket from previous run. */
- remove(TEST_PIPENAME);
- remove(TEST_PIPENAME_2);
- remove(TEST_PIPENAME_3);
-#endif
-
- /* If it's a helper the user asks for, start it directly. */
- for (task = TASKS; task->main; task++) {
- if (task->is_helper && strcmp(test, task->process_name) == 0) {
- return task->main();
- }
- }
-
- /* Start the helpers first. */
- for (task = TASKS; task->main; task++) {
- if (strcmp(test, task->task_name) != 0) {
- continue;
- }
-
- /* Skip the test itself. */
- if (!task->is_helper) {
- continue;
- }
-
- if (process_start(task->task_name,
- task->process_name,
- &processes[process_count],
- 1 /* is_helper */) == -1) {
- snprintf(errmsg,
- sizeof errmsg,
- "Process `%s` failed to start.",
- task->process_name);
- goto out;
- }
-
- process_count++;
- }
-
- /* Give the helpers time to settle. Race-y, fix this. */
- uv_sleep(250);
-
- /* Now start the test itself. */
- for (task = TASKS; task->main; task++) {
- if (strcmp(test, task->task_name) != 0) {
- continue;
- }
-
- if (task->is_helper) {
- continue;
- }
-
- if (process_start(task->task_name,
- task->process_name,
- &processes[process_count],
- 0 /* !is_helper */) == -1) {
- snprintf(errmsg,
- sizeof errmsg,
- "Process `%s` failed to start.",
- task->process_name);
- goto out;
- }
-
- main_proc = &processes[process_count];
- process_count++;
- break;
- }
-
- if (main_proc == NULL) {
- snprintf(errmsg,
- sizeof errmsg,
- "No test with that name: %s",
- test);
- goto out;
- }
-
- result = process_wait(main_proc, 1, task->timeout);
- if (result == -1) {
- FATAL("process_wait failed");
- } else if (result == -2) {
- /* Don't have to clean up the process, process_wait() has killed it. */
- snprintf(errmsg,
- sizeof errmsg,
- "timeout");
- goto out;
- }
-
- status = process_reap(main_proc);
- if (status != TEST_OK) {
- snprintf(errmsg,
- sizeof errmsg,
- "exit code %d",
- status);
- goto out;
- }
-
- if (benchmark_output) {
- /* Give the helpers time to clean up their act. */
- uv_sleep(1000);
- }
-
-out:
- /* Reap running processes except the main process, it's already dead. */
- for (i = 0; i < process_count - 1; i++) {
- process_terminate(&processes[i]);
- }
-
- if (process_count > 0 &&
- process_wait(processes, process_count - 1, -1) < 0) {
- FATAL("process_wait failed");
- }
-
- if (tap_output)
- log_tap_result(test_count, test, status, &processes[i]);
-
- /* Show error and output from processes if the test failed. */
- if (status != 0 || task->show_output) {
- if (tap_output) {
- fprintf(stderr, "#");
- } else if (status == TEST_TODO) {
- fprintf(stderr, "\n`%s` todo\n", test);
- } else if (status == TEST_SKIP) {
- fprintf(stderr, "\n`%s` skipped\n", test);
- } else if (status != 0) {
- fprintf(stderr, "\n`%s` failed: %s\n", test, errmsg);
- } else {
- fprintf(stderr, "\n");
- }
- fflush(stderr);
-
- for (i = 0; i < process_count; i++) {
- switch (process_output_size(&processes[i])) {
- case -1:
- fprintf(stderr, "Output from process `%s`: (unavailable)\n",
- process_get_name(&processes[i]));
- fflush(stderr);
- break;
-
- case 0:
- fprintf(stderr, "Output from process `%s`: (no output)\n",
- process_get_name(&processes[i]));
- fflush(stderr);
- break;
-
- default:
- fprintf(stderr, "Output from process `%s`:\n", process_get_name(&processes[i]));
- fflush(stderr);
- process_copy_output(&processes[i], fileno(stderr));
- break;
- }
- }
-
- if (!tap_output) {
- fprintf(stderr, "=============================================================\n");
- }
-
- /* In benchmark mode show concise output from the main process. */
- } else if (benchmark_output) {
- switch (process_output_size(main_proc)) {
- case -1:
- fprintf(stderr, "%s: (unavailable)\n", test);
- fflush(stderr);
- break;
-
- case 0:
- fprintf(stderr, "%s: (no output)\n", test);
- fflush(stderr);
- break;
-
- default:
- for (i = 0; i < process_count; i++) {
- process_copy_output(&processes[i], fileno(stderr));
- }
- break;
- }
- }
-
- /* Clean up all process handles. */
- for (i = 0; i < process_count; i++) {
- process_cleanup(&processes[i]);
- }
-
- return status;
-}
-
-
-/* Returns the status code of the task part
- * or 255 if no matching task was not found.
- */
-int run_test_part(const char* test, const char* part) {
- task_entry_t* task;
- int r;
-
- for (task = TASKS; task->main; task++) {
- if (strcmp(test, task->task_name) == 0 &&
- strcmp(part, task->process_name) == 0) {
- r = task->main();
- return r;
- }
- }
-
- fprintf(stderr, "No test part with that name: %s:%s\n", test, part);
- fflush(stderr);
- return 255;
-}
-
-
-static int compare_task(const void* va, const void* vb) {
- const task_entry_t* a = va;
- const task_entry_t* b = vb;
- return strcmp(a->task_name, b->task_name);
-}
-
-
-static int find_helpers(const task_entry_t* task,
- const task_entry_t** helpers) {
- const task_entry_t* helper;
- int n_helpers;
-
- for (n_helpers = 0, helper = TASKS; helper->main; helper++) {
- if (helper->is_helper && strcmp(helper->task_name, task->task_name) == 0) {
- *helpers++ = helper;
- n_helpers++;
- }
- }
-
- return n_helpers;
-}
-
-
-void print_tests(FILE* stream) {
- const task_entry_t* helpers[1024];
- const task_entry_t* task;
- int n_helpers;
- int n_tasks;
- int i;
-
- for (n_tasks = 0, task = TASKS; task->main; n_tasks++, task++);
- qsort(TASKS, n_tasks, sizeof(TASKS[0]), compare_task);
-
- for (task = TASKS; task->main; task++) {
- if (task->is_helper) {
- continue;
- }
-
- n_helpers = find_helpers(task, helpers);
- if (n_helpers) {
- printf("%-25s (helpers:", task->task_name);
- for (i = 0; i < n_helpers; i++) {
- printf(" %s", helpers[i]->process_name);
- }
- printf(")\n");
- } else {
- printf("%s\n", task->task_name);
- }
- }
-}
diff --git a/3rdparty/libuv/test/runner.h b/3rdparty/libuv/test/runner.h
deleted file mode 100644
index 78f3c880a98..00000000000
--- a/3rdparty/libuv/test/runner.h
+++ /dev/null
@@ -1,178 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#ifndef RUNNER_H_
-#define RUNNER_H_
-
-#include <limits.h> /* PATH_MAX */
-#include <stdio.h> /* FILE */
-
-
-/*
- * The maximum number of processes (main + helpers) that a test / benchmark
- * can have.
- */
-#define MAX_PROCESSES 8
-
-
-/*
- * Struct to store both tests and to define helper processes for tasks.
- */
-typedef struct {
- char *task_name;
- char *process_name;
- int (*main)(void);
- int is_helper;
- int show_output;
-
- /*
- * The time in milliseconds after which a single test or benchmark times out.
- */
- int timeout;
-} task_entry_t, bench_entry_t;
-
-
-/*
- * Macros used by test-list.h and benchmark-list.h.
- */
-#define TASK_LIST_START \
- task_entry_t TASKS[] = {
-
-#define TASK_LIST_END \
- { 0, 0, 0, 0, 0, 0 } \
- };
-
-#define TEST_DECLARE(name) \
- int run_test_##name(void);
-
-#define TEST_ENTRY(name) \
- { #name, #name, &run_test_##name, 0, 0, 5000 },
-
-#define TEST_ENTRY_CUSTOM(name, is_helper, show_output, timeout) \
- { #name, #name, &run_test_##name, is_helper, show_output, timeout },
-
-#define BENCHMARK_DECLARE(name) \
- int run_benchmark_##name(void);
-
-#define BENCHMARK_ENTRY(name) \
- { #name, #name, &run_benchmark_##name, 0, 0, 60000 },
-
-#define HELPER_DECLARE(name) \
- int run_helper_##name(void);
-
-#define HELPER_ENTRY(task_name, name) \
- { #task_name, #name, &run_helper_##name, 1, 0, 0 },
-
-#define TEST_HELPER HELPER_ENTRY
-#define BENCHMARK_HELPER HELPER_ENTRY
-
-#ifdef PATH_MAX
-extern char executable_path[PATH_MAX];
-#else
-extern char executable_path[4096];
-#endif
-
-/*
- * Include platform-dependent definitions
- */
-#ifdef _WIN32
-# include "runner-win.h"
-#else
-# include "runner-unix.h"
-#endif
-
-
-/* The array that is filled by test-list.h or benchmark-list.h */
-extern task_entry_t TASKS[];
-
-/*
- * Run all tests.
- */
-int run_tests(int benchmark_output);
-
-/*
- * Run a single test. Starts up any helpers.
- */
-int run_test(const char* test,
- int benchmark_output,
- int test_count);
-
-/*
- * Run a test part, i.e. the test or one of its helpers.
- */
-int run_test_part(const char* test, const char* part);
-
-
-/*
- * Print tests in sorted order to `stream`. Used by `./run-tests --list`.
- */
-void print_tests(FILE* stream);
-
-
-/*
- * Stuff that should be implemented by test-runner-<platform>.h
- * All functions return 0 on success, -1 on failure, unless specified
- * otherwise.
- */
-
-/* Do platform-specific initialization. */
-int platform_init(int argc, char** argv);
-
-/* Invoke "argv[0] test-name [test-part]". Store process info in *p. */
-/* Make sure that all stdio output of the processes is buffered up. */
-int process_start(char *name, char* part, process_info_t *p, int is_helper);
-
-/* Wait for all `n` processes in `vec` to terminate. */
-/* Time out after `timeout` msec, or never if timeout == -1 */
-/* Return 0 if all processes are terminated, -1 on error, -2 on timeout. */
-int process_wait(process_info_t *vec, int n, int timeout);
-
-/* Returns the number of bytes in the stdio output buffer for process `p`. */
-long int process_output_size(process_info_t *p);
-
-/* Copy the contents of the stdio output buffer to `fd`. */
-int process_copy_output(process_info_t *p, int fd);
-
-/* Copy the last line of the stdio output buffer to `buffer` */
-int process_read_last_line(process_info_t *p,
- char * buffer,
- size_t buffer_len);
-
-/* Return the name that was specified when `p` was started by process_start */
-char* process_get_name(process_info_t *p);
-
-/* Terminate process `p`. */
-int process_terminate(process_info_t *p);
-
-/* Return the exit code of process p. */
-/* On error, return -1. */
-int process_reap(process_info_t *p);
-
-/* Clean up after terminating process `p` (e.g. free the output buffer etc.). */
-void process_cleanup(process_info_t *p);
-
-/* Move the console cursor one line up and back to the first column. */
-void rewind_cursor(void);
-
-/* trigger output as tap */
-extern int tap_output;
-
-#endif /* RUNNER_H_ */
diff --git a/3rdparty/libuv/test/task.h b/3rdparty/libuv/test/task.h
deleted file mode 100644
index d18c1daa364..00000000000
--- a/3rdparty/libuv/test/task.h
+++ /dev/null
@@ -1,220 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#ifndef TASK_H_
-#define TASK_H_
-
-#include "uv.h"
-
-#include <stdio.h>
-#include <stddef.h>
-#include <stdlib.h>
-
-#if defined(_MSC_VER) && _MSC_VER < 1600
-# include "stdint-msvc2008.h"
-#else
-# include <stdint.h>
-#endif
-
-#if !defined(_WIN32)
-# include <sys/time.h>
-# include <sys/resource.h> /* setrlimit() */
-#endif
-
-#ifdef __clang__
-# pragma clang diagnostic ignored "-Wvariadic-macros"
-# pragma clang diagnostic ignored "-Wc99-extensions"
-#endif
-
-#define TEST_PORT 9123
-#define TEST_PORT_2 9124
-
-#ifdef _WIN32
-# define TEST_PIPENAME "\\\\?\\pipe\\uv-test"
-# define TEST_PIPENAME_2 "\\\\?\\pipe\\uv-test2"
-# define TEST_PIPENAME_3 "\\\\?\\pipe\\uv-test3"
-#else
-# define TEST_PIPENAME "/tmp/uv-test-sock"
-# define TEST_PIPENAME_2 "/tmp/uv-test-sock2"
-# define TEST_PIPENAME_3 "/tmp/uv-test-sock3"
-#endif
-
-#ifdef _WIN32
-# include <io.h>
-# ifndef S_IRUSR
-# define S_IRUSR _S_IREAD
-# endif
-# ifndef S_IWUSR
-# define S_IWUSR _S_IWRITE
-# endif
-#endif
-
-#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
-
-#define container_of(ptr, type, member) \
- ((type *) ((char *) (ptr) - offsetof(type, member)))
-
-typedef enum {
- TCP = 0,
- UDP,
- PIPE
-} stream_type;
-
-/* Die with fatal error. */
-#define FATAL(msg) \
- do { \
- fprintf(stderr, \
- "Fatal error in %s on line %d: %s\n", \
- __FILE__, \
- __LINE__, \
- msg); \
- fflush(stderr); \
- abort(); \
- } while (0)
-
-/* Have our own assert, so we are sure it does not get optimized away in
- * a release build.
- */
-#define ASSERT(expr) \
- do { \
- if (!(expr)) { \
- fprintf(stderr, \
- "Assertion failed in %s on line %d: %s\n", \
- __FILE__, \
- __LINE__, \
- #expr); \
- abort(); \
- } \
- } while (0)
-
-/* This macro cleans up the main loop. This is used to avoid valgrind
- * warnings about memory being "leaked" by the main event loop.
- */
-#define MAKE_VALGRIND_HAPPY() \
- do { \
- close_loop(uv_default_loop()); \
- uv_loop_delete(uv_default_loop()); \
- } while (0)
-
-/* Just sugar for wrapping the main() for a task or helper. */
-#define TEST_IMPL(name) \
- int run_test_##name(void); \
- int run_test_##name(void)
-
-#define BENCHMARK_IMPL(name) \
- int run_benchmark_##name(void); \
- int run_benchmark_##name(void)
-
-#define HELPER_IMPL(name) \
- int run_helper_##name(void); \
- int run_helper_##name(void)
-
-/* Pause the calling thread for a number of milliseconds. */
-void uv_sleep(int msec);
-
-/* Format big numbers nicely. WARNING: leaks memory. */
-const char* fmt(double d);
-
-/* Reserved test exit codes. */
-enum test_status {
- TEST_OK = 0,
- TEST_TODO,
- TEST_SKIP
-};
-
-#define RETURN_OK() \
- do { \
- return TEST_OK; \
- } while (0)
-
-#define RETURN_TODO(explanation) \
- do { \
- fprintf(stderr, "%s\n", explanation); \
- fflush(stderr); \
- return TEST_TODO; \
- } while (0)
-
-#define RETURN_SKIP(explanation) \
- do { \
- fprintf(stderr, "%s\n", explanation); \
- fflush(stderr); \
- return TEST_SKIP; \
- } while (0)
-
-#if !defined(_WIN32)
-
-# define TEST_FILE_LIMIT(num) \
- do { \
- struct rlimit lim; \
- lim.rlim_cur = (num); \
- lim.rlim_max = lim.rlim_cur; \
- if (setrlimit(RLIMIT_NOFILE, &lim)) \
- RETURN_SKIP("File descriptor limit too low."); \
- } while (0)
-
-#else /* defined(_WIN32) */
-
-# define TEST_FILE_LIMIT(num) do {} while (0)
-
-#endif
-
-#if !defined(snprintf) && defined(_MSC_VER) && _MSC_VER < 1900
-extern int snprintf(char*, size_t, const char*, ...);
-#endif
-
-#if defined(__clang__) || \
- defined(__GNUC__) || \
- defined(__INTEL_COMPILER) || \
- defined(__SUNPRO_C)
-# define UNUSED __attribute__((unused))
-#else
-# define UNUSED
-#endif
-
-/* Fully close a loop */
-static void close_walk_cb(uv_handle_t* handle, void* arg) {
- if (!uv_is_closing(handle))
- uv_close(handle, NULL);
-}
-
-UNUSED static void close_loop(uv_loop_t* loop) {
- uv_walk(loop, close_walk_cb, NULL);
- uv_run(loop, UV_RUN_DEFAULT);
-}
-
-UNUSED static int can_ipv6(void) {
- uv_interface_address_t* addr;
- int supported;
- int count;
- int i;
-
- if (uv_interface_addresses(&addr, &count))
- return 1; /* Assume IPv6 support on failure. */
-
- supported = 0;
- for (i = 0; supported == 0 && i < count; i += 1)
- supported = (AF_INET6 == addr[i].address.address6.sin6_family);
-
- uv_free_interface_addresses(addr, count);
- return supported;
-}
-
-#endif /* TASK_H_ */
diff --git a/3rdparty/libuv/test/test-active.c b/3rdparty/libuv/test/test-active.c
deleted file mode 100644
index b17bd176018..00000000000
--- a/3rdparty/libuv/test/test-active.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-
-
-static int close_cb_called = 0;
-
-
-static void close_cb(uv_handle_t* handle) {
- ASSERT(handle != NULL);
- close_cb_called++;
-}
-
-
-static void timer_cb(uv_timer_t* handle) {
- ASSERT(0 && "timer_cb should not have been called");
-}
-
-
-TEST_IMPL(active) {
- int r;
- uv_timer_t timer;
-
- r = uv_timer_init(uv_default_loop(), &timer);
- ASSERT(r == 0);
-
- /* uv_is_active() and uv_is_closing() should always return either 0 or 1. */
- ASSERT(0 == uv_is_active((uv_handle_t*) &timer));
- ASSERT(0 == uv_is_closing((uv_handle_t*) &timer));
-
- r = uv_timer_start(&timer, timer_cb, 1000, 0);
- ASSERT(r == 0);
-
- ASSERT(1 == uv_is_active((uv_handle_t*) &timer));
- ASSERT(0 == uv_is_closing((uv_handle_t*) &timer));
-
- r = uv_timer_stop(&timer);
- ASSERT(r == 0);
-
- ASSERT(0 == uv_is_active((uv_handle_t*) &timer));
- ASSERT(0 == uv_is_closing((uv_handle_t*) &timer));
-
- r = uv_timer_start(&timer, timer_cb, 1000, 0);
- ASSERT(r == 0);
-
- ASSERT(1 == uv_is_active((uv_handle_t*) &timer));
- ASSERT(0 == uv_is_closing((uv_handle_t*) &timer));
-
- uv_close((uv_handle_t*) &timer, close_cb);
-
- ASSERT(0 == uv_is_active((uv_handle_t*) &timer));
- ASSERT(1 == uv_is_closing((uv_handle_t*) &timer));
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(close_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-async-null-cb.c b/3rdparty/libuv/test/test-async-null-cb.c
deleted file mode 100644
index 757944a2762..00000000000
--- a/3rdparty/libuv/test/test-async-null-cb.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-static uv_async_t async_handle;
-static uv_check_t check_handle;
-static int check_cb_called;
-static uv_thread_t thread;
-
-
-static void thread_cb(void* dummy) {
- (void) &dummy;
- uv_async_send(&async_handle);
-}
-
-
-static void check_cb(uv_check_t* handle) {
- ASSERT(check_cb_called == 0);
- uv_close((uv_handle_t*) &async_handle, NULL);
- uv_close((uv_handle_t*) &check_handle, NULL);
- check_cb_called++;
-}
-
-
-TEST_IMPL(async_null_cb) {
- ASSERT(0 == uv_async_init(uv_default_loop(), &async_handle, NULL));
- ASSERT(0 == uv_check_init(uv_default_loop(), &check_handle));
- ASSERT(0 == uv_check_start(&check_handle, check_cb));
- ASSERT(0 == uv_thread_create(&thread, thread_cb, NULL));
- ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
- ASSERT(0 == uv_thread_join(&thread));
- ASSERT(1 == check_cb_called);
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-async.c b/3rdparty/libuv/test/test-async.c
deleted file mode 100644
index 6f5351bf158..00000000000
--- a/3rdparty/libuv/test/test-async.c
+++ /dev/null
@@ -1,134 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-static uv_thread_t thread;
-static uv_mutex_t mutex;
-
-static uv_prepare_t prepare;
-static uv_async_t async;
-
-static volatile int async_cb_called;
-static int prepare_cb_called;
-static int close_cb_called;
-
-
-static void thread_cb(void *arg) {
- int n;
- int r;
-
- for (;;) {
- uv_mutex_lock(&mutex);
- n = async_cb_called;
- uv_mutex_unlock(&mutex);
-
- if (n == 3) {
- break;
- }
-
- r = uv_async_send(&async);
- ASSERT(r == 0);
-
- /* Work around a bug in Valgrind.
- *
- * Valgrind runs threads not in parallel but sequentially, i.e. one after
- * the other. It also doesn't preempt them, instead it depends on threads
- * yielding voluntarily by making a syscall.
- *
- * That never happens here: the pipe that is associated with the async
- * handle is written to once but that's too early for Valgrind's scheduler
- * to kick in. Afterwards, the thread busy-loops, starving the main thread.
- * Therefore, we yield.
- *
- * This behavior has been observed with Valgrind 3.7.0 and 3.9.0.
- */
- uv_sleep(0);
- }
-}
-
-
-static void close_cb(uv_handle_t* handle) {
- ASSERT(handle != NULL);
- close_cb_called++;
-}
-
-
-static void async_cb(uv_async_t* handle) {
- int n;
-
- ASSERT(handle == &async);
-
- uv_mutex_lock(&mutex);
- n = ++async_cb_called;
- uv_mutex_unlock(&mutex);
-
- if (n == 3) {
- uv_close((uv_handle_t*)&async, close_cb);
- uv_close((uv_handle_t*)&prepare, close_cb);
- }
-}
-
-
-static void prepare_cb(uv_prepare_t* handle) {
- int r;
-
- ASSERT(handle == &prepare);
-
- if (prepare_cb_called++)
- return;
-
- r = uv_thread_create(&thread, thread_cb, NULL);
- ASSERT(r == 0);
- uv_mutex_unlock(&mutex);
-}
-
-
-TEST_IMPL(async) {
- int r;
-
- r = uv_mutex_init(&mutex);
- ASSERT(r == 0);
- uv_mutex_lock(&mutex);
-
- r = uv_prepare_init(uv_default_loop(), &prepare);
- ASSERT(r == 0);
- r = uv_prepare_start(&prepare, prepare_cb);
- ASSERT(r == 0);
-
- r = uv_async_init(uv_default_loop(), &async, async_cb);
- ASSERT(r == 0);
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(prepare_cb_called > 0);
- ASSERT(async_cb_called == 3);
- ASSERT(close_cb_called == 2);
-
- ASSERT(0 == uv_thread_join(&thread));
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-barrier.c b/3rdparty/libuv/test/test-barrier.c
deleted file mode 100644
index dfd2dbdef1b..00000000000
--- a/3rdparty/libuv/test/test-barrier.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <string.h>
-#include <errno.h>
-
-typedef struct {
- uv_barrier_t barrier;
- int delay;
- volatile int posted;
- int main_barrier_wait_rval;
- int worker_barrier_wait_rval;
-} worker_config;
-
-
-static void worker(void* arg) {
- worker_config* c = arg;
-
- if (c->delay)
- uv_sleep(c->delay);
-
- c->worker_barrier_wait_rval = uv_barrier_wait(&c->barrier);
-}
-
-
-TEST_IMPL(barrier_1) {
- uv_thread_t thread;
- worker_config wc;
-
- memset(&wc, 0, sizeof(wc));
-
- ASSERT(0 == uv_barrier_init(&wc.barrier, 2));
- ASSERT(0 == uv_thread_create(&thread, worker, &wc));
-
- uv_sleep(100);
- wc.main_barrier_wait_rval = uv_barrier_wait(&wc.barrier);
-
- ASSERT(0 == uv_thread_join(&thread));
- uv_barrier_destroy(&wc.barrier);
-
- ASSERT(1 == (wc.main_barrier_wait_rval ^ wc.worker_barrier_wait_rval));
-
- return 0;
-}
-
-
-TEST_IMPL(barrier_2) {
- uv_thread_t thread;
- worker_config wc;
-
- memset(&wc, 0, sizeof(wc));
- wc.delay = 100;
-
- ASSERT(0 == uv_barrier_init(&wc.barrier, 2));
- ASSERT(0 == uv_thread_create(&thread, worker, &wc));
-
- wc.main_barrier_wait_rval = uv_barrier_wait(&wc.barrier);
-
- ASSERT(0 == uv_thread_join(&thread));
- uv_barrier_destroy(&wc.barrier);
-
- ASSERT(1 == (wc.main_barrier_wait_rval ^ wc.worker_barrier_wait_rval));
-
- return 0;
-}
-
-
-TEST_IMPL(barrier_3) {
- uv_thread_t thread;
- worker_config wc;
-
- memset(&wc, 0, sizeof(wc));
-
- ASSERT(0 == uv_barrier_init(&wc.barrier, 2));
- ASSERT(0 == uv_thread_create(&thread, worker, &wc));
-
- wc.main_barrier_wait_rval = uv_barrier_wait(&wc.barrier);
-
- ASSERT(0 == uv_thread_join(&thread));
- uv_barrier_destroy(&wc.barrier);
-
- ASSERT(1 == (wc.main_barrier_wait_rval ^ wc.worker_barrier_wait_rval));
-
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-callback-order.c b/3rdparty/libuv/test/test-callback-order.c
deleted file mode 100644
index 8bc2c4f75de..00000000000
--- a/3rdparty/libuv/test/test-callback-order.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-static int idle_cb_called;
-static int timer_cb_called;
-
-static uv_idle_t idle_handle;
-static uv_timer_t timer_handle;
-
-
-/* idle_cb should run before timer_cb */
-static void idle_cb(uv_idle_t* handle) {
- ASSERT(idle_cb_called == 0);
- ASSERT(timer_cb_called == 0);
- uv_idle_stop(handle);
- idle_cb_called++;
-}
-
-
-static void timer_cb(uv_timer_t* handle) {
- ASSERT(idle_cb_called == 1);
- ASSERT(timer_cb_called == 0);
- uv_timer_stop(handle);
- timer_cb_called++;
-}
-
-
-static void next_tick(uv_idle_t* handle) {
- uv_loop_t* loop = handle->loop;
- uv_idle_stop(handle);
- uv_idle_init(loop, &idle_handle);
- uv_idle_start(&idle_handle, idle_cb);
- uv_timer_init(loop, &timer_handle);
- uv_timer_start(&timer_handle, timer_cb, 0, 0);
-}
-
-
-TEST_IMPL(callback_order) {
- uv_loop_t* loop;
- uv_idle_t idle;
-
- loop = uv_default_loop();
- uv_idle_init(loop, &idle);
- uv_idle_start(&idle, next_tick);
-
- ASSERT(idle_cb_called == 0);
- ASSERT(timer_cb_called == 0);
-
- uv_run(loop, UV_RUN_DEFAULT);
-
- ASSERT(idle_cb_called == 1);
- ASSERT(timer_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-callback-stack.c b/3rdparty/libuv/test/test-callback-stack.c
deleted file mode 100644
index 8855c0841b3..00000000000
--- a/3rdparty/libuv/test/test-callback-stack.c
+++ /dev/null
@@ -1,205 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-/*
- * TODO: Add explanation of why we want on_close to be called from fresh
- * stack.
- */
-
-#include "uv.h"
-#include "task.h"
-
-
-static const char MESSAGE[] = "Failure is for the weak. Everyone dies alone.";
-
-static uv_tcp_t client;
-static uv_timer_t timer;
-static uv_connect_t connect_req;
-static uv_write_t write_req;
-static uv_shutdown_t shutdown_req;
-
-static int nested = 0;
-static int close_cb_called = 0;
-static int connect_cb_called = 0;
-static int write_cb_called = 0;
-static int timer_cb_called = 0;
-static int bytes_received = 0;
-static int shutdown_cb_called = 0;
-
-
-static void alloc_cb(uv_handle_t* handle, size_t size, uv_buf_t* buf) {
- buf->len = size;
- buf->base = malloc(size);
- ASSERT(buf->base != NULL);
-}
-
-
-static void close_cb(uv_handle_t* handle) {
- ASSERT(nested == 0 && "close_cb must be called from a fresh stack");
-
- close_cb_called++;
-}
-
-
-static void shutdown_cb(uv_shutdown_t* req, int status) {
- ASSERT(status == 0);
- ASSERT(nested == 0 && "shutdown_cb must be called from a fresh stack");
-
- shutdown_cb_called++;
-}
-
-
-static void read_cb(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* buf) {
- ASSERT(nested == 0 && "read_cb must be called from a fresh stack");
-
- printf("Read. nread == %d\n", (int)nread);
- free(buf->base);
-
- if (nread == 0) {
- return;
-
- } else if (nread < 0) {
- ASSERT(nread == UV_EOF);
-
- nested++;
- uv_close((uv_handle_t*)tcp, close_cb);
- nested--;
-
- return;
- }
-
- bytes_received += nread;
-
- /* We call shutdown here because when bytes_received == sizeof MESSAGE */
- /* there will be no more data sent nor received, so here it would be */
- /* possible for a backend to to call shutdown_cb immediately and *not* */
- /* from a fresh stack. */
- if (bytes_received == sizeof MESSAGE) {
- nested++;
-
- puts("Shutdown");
-
- if (uv_shutdown(&shutdown_req, (uv_stream_t*)tcp, shutdown_cb)) {
- FATAL("uv_shutdown failed");
- }
- nested--;
- }
-}
-
-
-static void timer_cb(uv_timer_t* handle) {
- ASSERT(handle == &timer);
- ASSERT(nested == 0 && "timer_cb must be called from a fresh stack");
-
- puts("Timeout complete. Now read data...");
-
- nested++;
- if (uv_read_start((uv_stream_t*)&client, alloc_cb, read_cb)) {
- FATAL("uv_read_start failed");
- }
- nested--;
-
- timer_cb_called++;
-
- uv_close((uv_handle_t*)handle, close_cb);
-}
-
-
-static void write_cb(uv_write_t* req, int status) {
- int r;
-
- ASSERT(status == 0);
- ASSERT(nested == 0 && "write_cb must be called from a fresh stack");
-
- puts("Data written. 500ms timeout...");
-
- /* After the data has been sent, we're going to wait for a while, then */
- /* start reading. This makes us certain that the message has been echoed */
- /* back to our receive buffer when we start reading. This maximizes the */
- /* temptation for the backend to use dirty stack for calling read_cb. */
- nested++;
- r = uv_timer_init(uv_default_loop(), &timer);
- ASSERT(r == 0);
- r = uv_timer_start(&timer, timer_cb, 500, 0);
- ASSERT(r == 0);
- nested--;
-
- write_cb_called++;
-}
-
-
-static void connect_cb(uv_connect_t* req, int status) {
- uv_buf_t buf;
-
- puts("Connected. Write some data to echo server...");
-
- ASSERT(status == 0);
- ASSERT(nested == 0 && "connect_cb must be called from a fresh stack");
-
- nested++;
-
- buf.base = (char*) &MESSAGE;
- buf.len = sizeof MESSAGE;
-
- if (uv_write(&write_req, (uv_stream_t*)req->handle, &buf, 1, write_cb)) {
- FATAL("uv_write failed");
- }
-
- nested--;
-
- connect_cb_called++;
-}
-
-
-TEST_IMPL(callback_stack) {
- struct sockaddr_in addr;
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
-
- if (uv_tcp_init(uv_default_loop(), &client)) {
- FATAL("uv_tcp_init failed");
- }
-
- puts("Connecting...");
-
- nested++;
-
- if (uv_tcp_connect(&connect_req,
- &client,
- (const struct sockaddr*) &addr,
- connect_cb)) {
- FATAL("uv_tcp_connect failed");
- }
- nested--;
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(nested == 0);
- ASSERT(connect_cb_called == 1 && "connect_cb must be called exactly once");
- ASSERT(write_cb_called == 1 && "write_cb must be called exactly once");
- ASSERT(timer_cb_called == 1 && "timer_cb must be called exactly once");
- ASSERT(bytes_received == sizeof MESSAGE);
- ASSERT(shutdown_cb_called == 1 && "shutdown_cb must be called exactly once");
- ASSERT(close_cb_called == 2 && "close_cb must be called exactly twice");
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-close-fd.c b/3rdparty/libuv/test/test-close-fd.c
deleted file mode 100644
index 93a7bd7c021..00000000000
--- a/3rdparty/libuv/test/test-close-fd.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#if !defined(_WIN32)
-
-#include "uv.h"
-#include "task.h"
-#include <fcntl.h>
-#include <unistd.h>
-
-static unsigned int read_cb_called;
-
-static void alloc_cb(uv_handle_t *handle, size_t size, uv_buf_t *buf) {
- static char slab[1];
- buf->base = slab;
- buf->len = sizeof(slab);
-}
-
-static void read_cb(uv_stream_t *handle, ssize_t nread, const uv_buf_t *buf) {
- switch (++read_cb_called) {
- case 1:
- ASSERT(nread == 1);
- uv_read_stop(handle);
- break;
- case 2:
- ASSERT(nread == UV_EOF);
- uv_close((uv_handle_t *) handle, NULL);
- break;
- default:
- ASSERT(!"read_cb_called > 2");
- }
-}
-
-TEST_IMPL(close_fd) {
- uv_pipe_t pipe_handle;
- int fd[2];
-
- ASSERT(0 == pipe(fd));
- ASSERT(0 == uv_pipe_init(uv_default_loop(), &pipe_handle, 0));
- ASSERT(0 == uv_pipe_open(&pipe_handle, fd[0]));
- fd[0] = -1; /* uv_pipe_open() takes ownership of the file descriptor. */
- ASSERT(1 == write(fd[1], "", 1));
- ASSERT(0 == close(fd[1]));
- fd[1] = -1;
- ASSERT(0 == uv_read_start((uv_stream_t *) &pipe_handle, alloc_cb, read_cb));
- ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
- ASSERT(1 == read_cb_called);
- ASSERT(0 == uv_is_active((const uv_handle_t *) &pipe_handle));
- ASSERT(0 == uv_read_start((uv_stream_t *) &pipe_handle, alloc_cb, read_cb));
- ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
- ASSERT(2 == read_cb_called);
- ASSERT(0 != uv_is_closing((const uv_handle_t *) &pipe_handle));
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-#endif /* !defined(_WIN32) */
diff --git a/3rdparty/libuv/test/test-close-order.c b/3rdparty/libuv/test/test-close-order.c
deleted file mode 100644
index 2b24f6d6579..00000000000
--- a/3rdparty/libuv/test/test-close-order.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-static int check_cb_called;
-static int timer_cb_called;
-static int close_cb_called;
-
-static uv_check_t check_handle;
-static uv_timer_t timer_handle1;
-static uv_timer_t timer_handle2;
-
-
-static void close_cb(uv_handle_t* handle) {
- ASSERT(handle != NULL);
- close_cb_called++;
-}
-
-
-/* check_cb should run before any close_cb */
-static void check_cb(uv_check_t* handle) {
- ASSERT(check_cb_called == 0);
- ASSERT(timer_cb_called == 1);
- ASSERT(close_cb_called == 0);
- uv_close((uv_handle_t*) handle, close_cb);
- uv_close((uv_handle_t*) &timer_handle2, close_cb);
- check_cb_called++;
-}
-
-
-static void timer_cb(uv_timer_t* handle) {
- uv_close((uv_handle_t*) handle, close_cb);
- timer_cb_called++;
-}
-
-
-TEST_IMPL(close_order) {
- uv_loop_t* loop;
- loop = uv_default_loop();
-
- uv_check_init(loop, &check_handle);
- uv_check_start(&check_handle, check_cb);
- uv_timer_init(loop, &timer_handle1);
- uv_timer_start(&timer_handle1, timer_cb, 0, 0);
- uv_timer_init(loop, &timer_handle2);
- uv_timer_start(&timer_handle2, timer_cb, 100000, 0);
-
- ASSERT(check_cb_called == 0);
- ASSERT(close_cb_called == 0);
- ASSERT(timer_cb_called == 0);
-
- uv_run(loop, UV_RUN_DEFAULT);
-
- ASSERT(check_cb_called == 1);
- ASSERT(close_cb_called == 3);
- ASSERT(timer_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-condvar.c b/3rdparty/libuv/test/test-condvar.c
deleted file mode 100644
index dbacdba384d..00000000000
--- a/3rdparty/libuv/test/test-condvar.c
+++ /dev/null
@@ -1,173 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <string.h>
-#include <errno.h>
-
-typedef struct {
- uv_mutex_t mutex;
- uv_cond_t cond;
- int delay;
- int use_broadcast;
- volatile int posted;
-} worker_config;
-
-
-static void worker(void* arg) {
- worker_config* c = arg;
-
- if (c->delay)
- uv_sleep(c->delay);
-
- uv_mutex_lock(&c->mutex);
- ASSERT(c->posted == 0);
- c->posted = 1;
- if (c->use_broadcast)
- uv_cond_broadcast(&c->cond);
- else
- uv_cond_signal(&c->cond);
- uv_mutex_unlock(&c->mutex);
-}
-
-
-TEST_IMPL(condvar_1) {
- uv_thread_t thread;
- worker_config wc;
-
- memset(&wc, 0, sizeof(wc));
-
- ASSERT(0 == uv_cond_init(&wc.cond));
- ASSERT(0 == uv_mutex_init(&wc.mutex));
- ASSERT(0 == uv_thread_create(&thread, worker, &wc));
-
- uv_mutex_lock(&wc.mutex);
- uv_sleep(100);
- uv_cond_wait(&wc.cond, &wc.mutex);
- ASSERT(wc.posted == 1);
- uv_mutex_unlock(&wc.mutex);
-
- ASSERT(0 == uv_thread_join(&thread));
- uv_mutex_destroy(&wc.mutex);
- uv_cond_destroy(&wc.cond);
-
- return 0;
-}
-
-
-TEST_IMPL(condvar_2) {
- uv_thread_t thread;
- worker_config wc;
-
- memset(&wc, 0, sizeof(wc));
- wc.delay = 100;
-
- ASSERT(0 == uv_cond_init(&wc.cond));
- ASSERT(0 == uv_mutex_init(&wc.mutex));
- ASSERT(0 == uv_thread_create(&thread, worker, &wc));
-
- uv_mutex_lock(&wc.mutex);
- uv_cond_wait(&wc.cond, &wc.mutex);
- uv_mutex_unlock(&wc.mutex);
-
- ASSERT(0 == uv_thread_join(&thread));
- uv_mutex_destroy(&wc.mutex);
- uv_cond_destroy(&wc.cond);
-
- return 0;
-}
-
-
-TEST_IMPL(condvar_3) {
- uv_thread_t thread;
- worker_config wc;
- int r;
-
- memset(&wc, 0, sizeof(wc));
- wc.delay = 100;
-
- ASSERT(0 == uv_cond_init(&wc.cond));
- ASSERT(0 == uv_mutex_init(&wc.mutex));
- ASSERT(0 == uv_thread_create(&thread, worker, &wc));
-
- uv_mutex_lock(&wc.mutex);
- r = uv_cond_timedwait(&wc.cond, &wc.mutex, (uint64_t)(50 * 1e6));
- ASSERT(r == UV_ETIMEDOUT);
- uv_mutex_unlock(&wc.mutex);
-
- ASSERT(0 == uv_thread_join(&thread));
- uv_mutex_destroy(&wc.mutex);
- uv_cond_destroy(&wc.cond);
-
- return 0;
-}
-
-
-TEST_IMPL(condvar_4) {
- uv_thread_t thread;
- worker_config wc;
- int r;
-
- memset(&wc, 0, sizeof(wc));
- wc.delay = 100;
-
- ASSERT(0 == uv_cond_init(&wc.cond));
- ASSERT(0 == uv_mutex_init(&wc.mutex));
- ASSERT(0 == uv_thread_create(&thread, worker, &wc));
-
- uv_mutex_lock(&wc.mutex);
- r = uv_cond_timedwait(&wc.cond, &wc.mutex, (uint64_t)(150 * 1e6));
- ASSERT(r == 0);
- uv_mutex_unlock(&wc.mutex);
-
- ASSERT(0 == uv_thread_join(&thread));
- uv_mutex_destroy(&wc.mutex);
- uv_cond_destroy(&wc.cond);
-
- return 0;
-}
-
-
-TEST_IMPL(condvar_5) {
- uv_thread_t thread;
- worker_config wc;
-
- memset(&wc, 0, sizeof(wc));
- wc.use_broadcast = 1;
-
- ASSERT(0 == uv_cond_init(&wc.cond));
- ASSERT(0 == uv_mutex_init(&wc.mutex));
- ASSERT(0 == uv_thread_create(&thread, worker, &wc));
-
- uv_mutex_lock(&wc.mutex);
- uv_sleep(100);
- uv_cond_wait(&wc.cond, &wc.mutex);
- ASSERT(wc.posted == 1);
- uv_mutex_unlock(&wc.mutex);
-
- ASSERT(0 == uv_thread_join(&thread));
- uv_mutex_destroy(&wc.mutex);
- uv_cond_destroy(&wc.cond);
-
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-connection-fail.c b/3rdparty/libuv/test/test-connection-fail.c
deleted file mode 100644
index 328bff46e7d..00000000000
--- a/3rdparty/libuv/test/test-connection-fail.c
+++ /dev/null
@@ -1,151 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-
-
-static uv_tcp_t tcp;
-static uv_connect_t req;
-static int connect_cb_calls;
-static int close_cb_calls;
-
-static uv_timer_t timer;
-static int timer_close_cb_calls;
-static int timer_cb_calls;
-
-
-static void on_close(uv_handle_t* handle) {
- close_cb_calls++;
-}
-
-
-static void timer_close_cb(uv_handle_t* handle) {
- timer_close_cb_calls++;
-}
-
-
-static void timer_cb(uv_timer_t* handle) {
- timer_cb_calls++;
-
- /*
- * These are the important asserts. The connection callback has been made,
- * but libuv hasn't automatically closed the socket. The user must
- * uv_close the handle manually.
- */
- ASSERT(close_cb_calls == 0);
- ASSERT(connect_cb_calls == 1);
-
- /* Close the tcp handle. */
- uv_close((uv_handle_t*)&tcp, on_close);
-
- /* Close the timer. */
- uv_close((uv_handle_t*)handle, timer_close_cb);
-}
-
-
-static void on_connect_with_close(uv_connect_t *req, int status) {
- ASSERT((uv_stream_t*) &tcp == req->handle);
- ASSERT(status == UV_ECONNREFUSED);
- connect_cb_calls++;
-
- ASSERT(close_cb_calls == 0);
- uv_close((uv_handle_t*)req->handle, on_close);
-}
-
-
-static void on_connect_without_close(uv_connect_t *req, int status) {
- ASSERT(status == UV_ECONNREFUSED);
- connect_cb_calls++;
-
- uv_timer_start(&timer, timer_cb, 100, 0);
-
- ASSERT(close_cb_calls == 0);
-}
-
-
-static void connection_fail(uv_connect_cb connect_cb) {
- struct sockaddr_in client_addr, server_addr;
- int r;
-
- ASSERT(0 == uv_ip4_addr("0.0.0.0", 0, &client_addr));
-
- /* There should be no servers listening on this port. */
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &server_addr));
-
- /* Try to connect to the server and do NUM_PINGS ping-pongs. */
- r = uv_tcp_init(uv_default_loop(), &tcp);
- ASSERT(!r);
-
- /* We are never doing multiple reads/connects at a time anyway. */
- /* so these handles can be pre-initialized. */
- ASSERT(0 == uv_tcp_bind(&tcp, (const struct sockaddr*) &client_addr, 0));
-
- r = uv_tcp_connect(&req,
- &tcp,
- (const struct sockaddr*) &server_addr,
- connect_cb);
- ASSERT(!r);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(connect_cb_calls == 1);
- ASSERT(close_cb_calls == 1);
-}
-
-
-/*
- * This test attempts to connect to a port where no server is running. We
- * expect an error.
- */
-TEST_IMPL(connection_fail) {
- connection_fail(on_connect_with_close);
-
- ASSERT(timer_close_cb_calls == 0);
- ASSERT(timer_cb_calls == 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-/*
- * This test is the same as the first except it check that the close
- * callback of the tcp handle hasn't been made after the failed connection
- * attempt.
- */
-TEST_IMPL(connection_fail_doesnt_auto_close) {
- int r;
-
- r = uv_timer_init(uv_default_loop(), &timer);
- ASSERT(r == 0);
-
- connection_fail(on_connect_without_close);
-
- ASSERT(timer_close_cb_calls == 1);
- ASSERT(timer_cb_calls == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-cwd-and-chdir.c b/3rdparty/libuv/test/test-cwd-and-chdir.c
deleted file mode 100644
index 1e95043c177..00000000000
--- a/3rdparty/libuv/test/test-cwd-and-chdir.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-#include <string.h>
-
-#define PATHMAX 1024
-extern char executable_path[];
-
-TEST_IMPL(cwd_and_chdir) {
- char buffer_orig[PATHMAX];
- char buffer_new[PATHMAX];
- size_t size1;
- size_t size2;
- int err;
-
- size1 = sizeof buffer_orig;
- err = uv_cwd(buffer_orig, &size1);
- ASSERT(err == 0);
-
- err = uv_chdir(buffer_orig);
- ASSERT(err == 0);
-
- size2 = sizeof buffer_new;
- err = uv_cwd(buffer_new, &size2);
- ASSERT(err == 0);
-
- ASSERT(size1 == size2);
- ASSERT(strcmp(buffer_orig, buffer_new) == 0);
-
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-default-loop-close.c b/3rdparty/libuv/test/test-default-loop-close.c
deleted file mode 100644
index fd11cfa8c12..00000000000
--- a/3rdparty/libuv/test/test-default-loop-close.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-
-static int timer_cb_called;
-
-
-static void timer_cb(uv_timer_t* timer) {
- timer_cb_called++;
- uv_close((uv_handle_t*) timer, NULL);
-}
-
-
-TEST_IMPL(default_loop_close) {
- uv_loop_t* loop;
- uv_timer_t timer_handle;
-
- loop = uv_default_loop();
- ASSERT(loop != NULL);
-
- ASSERT(0 == uv_timer_init(loop, &timer_handle));
- ASSERT(0 == uv_timer_start(&timer_handle, timer_cb, 1, 0));
- ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
- ASSERT(1 == timer_cb_called);
- ASSERT(0 == uv_loop_close(loop));
-
- loop = uv_default_loop();
- ASSERT(loop != NULL);
-
- ASSERT(0 == uv_timer_init(loop, &timer_handle));
- ASSERT(0 == uv_timer_start(&timer_handle, timer_cb, 1, 0));
- ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
- ASSERT(2 == timer_cb_called);
- ASSERT(0 == uv_loop_close(loop));
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-delayed-accept.c b/3rdparty/libuv/test/test-delayed-accept.c
deleted file mode 100644
index 4a7998909c3..00000000000
--- a/3rdparty/libuv/test/test-delayed-accept.c
+++ /dev/null
@@ -1,189 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-static int connection_cb_called = 0;
-static int do_accept_called = 0;
-static int close_cb_called = 0;
-static int connect_cb_called = 0;
-
-
-static void alloc_cb(uv_handle_t* handle, size_t size, uv_buf_t* buf) {
- buf->base = malloc(size);
- buf->len = size;
-}
-
-
-static void close_cb(uv_handle_t* handle) {
- ASSERT(handle != NULL);
-
- free(handle);
-
- close_cb_called++;
-}
-
-
-static void do_accept(uv_timer_t* timer_handle) {
- uv_tcp_t* server;
- uv_tcp_t* accepted_handle = (uv_tcp_t*)malloc(sizeof *accepted_handle);
- int r;
-
- ASSERT(timer_handle != NULL);
- ASSERT(accepted_handle != NULL);
-
- r = uv_tcp_init(uv_default_loop(), accepted_handle);
- ASSERT(r == 0);
-
- server = (uv_tcp_t*)timer_handle->data;
- r = uv_accept((uv_stream_t*)server, (uv_stream_t*)accepted_handle);
- ASSERT(r == 0);
-
- do_accept_called++;
-
- /* Immediately close the accepted handle. */
- uv_close((uv_handle_t*)accepted_handle, close_cb);
-
- /* After accepting the two clients close the server handle */
- if (do_accept_called == 2) {
- uv_close((uv_handle_t*)server, close_cb);
- }
-
- /* Dispose the timer. */
- uv_close((uv_handle_t*)timer_handle, close_cb);
-}
-
-
-static void connection_cb(uv_stream_t* tcp, int status) {
- int r;
- uv_timer_t* timer_handle;
-
- ASSERT(status == 0);
-
- timer_handle = (uv_timer_t*)malloc(sizeof *timer_handle);
- ASSERT(timer_handle != NULL);
-
- /* Accept the client after 1 second */
- r = uv_timer_init(uv_default_loop(), timer_handle);
- ASSERT(r == 0);
-
- timer_handle->data = tcp;
-
- r = uv_timer_start(timer_handle, do_accept, 1000, 0);
- ASSERT(r == 0);
-
- connection_cb_called++;
-}
-
-
-static void start_server(void) {
- struct sockaddr_in addr;
- uv_tcp_t* server = (uv_tcp_t*)malloc(sizeof *server);
- int r;
-
- ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr));
- ASSERT(server != NULL);
-
- r = uv_tcp_init(uv_default_loop(), server);
- ASSERT(r == 0);
- r = uv_tcp_bind(server, (const struct sockaddr*) &addr, 0);
- ASSERT(r == 0);
-
- r = uv_listen((uv_stream_t*)server, 128, connection_cb);
- ASSERT(r == 0);
-}
-
-
-static void read_cb(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* buf) {
- /* The server will not send anything, it should close gracefully. */
-
- if (buf->base) {
- free(buf->base);
- }
-
- if (nread >= 0) {
- ASSERT(nread == 0);
- } else {
- ASSERT(tcp != NULL);
- ASSERT(nread == UV_EOF);
- uv_close((uv_handle_t*)tcp, close_cb);
- }
-}
-
-
-static void connect_cb(uv_connect_t* req, int status) {
- int r;
-
- ASSERT(req != NULL);
- ASSERT(status == 0);
-
- /* Not that the server will send anything, but otherwise we'll never know */
- /* when the server closes the connection. */
- r = uv_read_start((uv_stream_t*)(req->handle), alloc_cb, read_cb);
- ASSERT(r == 0);
-
- connect_cb_called++;
-
- free(req);
-}
-
-
-static void client_connect(void) {
- struct sockaddr_in addr;
- uv_tcp_t* client = (uv_tcp_t*)malloc(sizeof *client);
- uv_connect_t* connect_req = malloc(sizeof *connect_req);
- int r;
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
- ASSERT(client != NULL);
- ASSERT(connect_req != NULL);
-
- r = uv_tcp_init(uv_default_loop(), client);
- ASSERT(r == 0);
-
- r = uv_tcp_connect(connect_req,
- client,
- (const struct sockaddr*) &addr,
- connect_cb);
- ASSERT(r == 0);
-}
-
-
-
-TEST_IMPL(delayed_accept) {
- start_server();
-
- client_connect();
- client_connect();
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(connection_cb_called == 2);
- ASSERT(do_accept_called == 2);
- ASSERT(connect_cb_called == 2);
- ASSERT(close_cb_called == 7);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-dlerror.c b/3rdparty/libuv/test/test-dlerror.c
deleted file mode 100644
index 091200edbed..00000000000
--- a/3rdparty/libuv/test/test-dlerror.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-#include <string.h>
-
-
-TEST_IMPL(dlerror) {
- const char* path = "test/fixtures/load_error.node";
- const char* dlerror_no_error = "no error";
- const char* msg;
- uv_lib_t lib;
- int r;
-
- lib.errmsg = NULL;
- lib.handle = NULL;
- msg = uv_dlerror(&lib);
- ASSERT(msg != NULL);
- ASSERT(strstr(msg, dlerror_no_error) != NULL);
-
- r = uv_dlopen(path, &lib);
- ASSERT(r == -1);
-
- msg = uv_dlerror(&lib);
- ASSERT(msg != NULL);
- ASSERT(strstr(msg, dlerror_no_error) == NULL);
-
- /* Should return the same error twice in a row. */
- msg = uv_dlerror(&lib);
- ASSERT(msg != NULL);
- ASSERT(strstr(msg, dlerror_no_error) == NULL);
-
- uv_dlclose(&lib);
-
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-embed.c b/3rdparty/libuv/test/test-embed.c
deleted file mode 100644
index 06137456f8b..00000000000
--- a/3rdparty/libuv/test/test-embed.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-
-#ifndef HAVE_KQUEUE
-# if defined(__APPLE__) || \
- defined(__DragonFly__) || \
- defined(__FreeBSD__) || \
- defined(__OpenBSD__) || \
- defined(__NetBSD__)
-# define HAVE_KQUEUE 1
-# endif
-#endif
-
-#ifndef HAVE_EPOLL
-# if defined(__linux__)
-# define HAVE_EPOLL 1
-# endif
-#endif
-
-#if defined(HAVE_KQUEUE) || defined(HAVE_EPOLL)
-
-#if defined(HAVE_KQUEUE)
-# include <sys/types.h>
-# include <sys/event.h>
-# include <sys/time.h>
-#endif
-
-#if defined(HAVE_EPOLL)
-# include <sys/epoll.h>
-#endif
-
-static uv_thread_t embed_thread;
-static uv_sem_t embed_sem;
-static uv_timer_t embed_timer;
-static uv_async_t embed_async;
-static volatile int embed_closed;
-
-static int embed_timer_called;
-
-
-static void embed_thread_runner(void* arg) {
- int r;
- int fd;
- int timeout;
-
- while (!embed_closed) {
- fd = uv_backend_fd(uv_default_loop());
- timeout = uv_backend_timeout(uv_default_loop());
-
- do {
-#if defined(HAVE_KQUEUE)
- struct timespec ts;
- ts.tv_sec = timeout / 1000;
- ts.tv_nsec = (timeout % 1000) * 1000000;
- r = kevent(fd, NULL, 0, NULL, 0, &ts);
-#elif defined(HAVE_EPOLL)
- {
- struct epoll_event ev;
- r = epoll_wait(fd, &ev, 1, timeout);
- }
-#endif
- } while (r == -1 && errno == EINTR);
- uv_async_send(&embed_async);
- uv_sem_wait(&embed_sem);
- }
-}
-
-
-static void embed_cb(uv_async_t* async) {
- uv_run(uv_default_loop(), UV_RUN_ONCE);
-
- uv_sem_post(&embed_sem);
-}
-
-
-static void embed_timer_cb(uv_timer_t* timer) {
- embed_timer_called++;
- embed_closed = 1;
-
- uv_close((uv_handle_t*) &embed_async, NULL);
-}
-#endif
-
-
-TEST_IMPL(embed) {
-#if defined(HAVE_KQUEUE) || defined(HAVE_EPOLL)
- uv_loop_t external;
-
- ASSERT(0 == uv_loop_init(&external));
-
- embed_timer_called = 0;
- embed_closed = 0;
-
- uv_async_init(&external, &embed_async, embed_cb);
-
- /* Start timer in default loop */
- uv_timer_init(uv_default_loop(), &embed_timer);
- uv_timer_start(&embed_timer, embed_timer_cb, 250, 0);
-
- /* Start worker that will interrupt external loop */
- uv_sem_init(&embed_sem, 0);
- uv_thread_create(&embed_thread, embed_thread_runner, NULL);
-
- /* But run external loop */
- uv_run(&external, UV_RUN_DEFAULT);
-
- uv_thread_join(&embed_thread);
- uv_loop_close(&external);
-
- ASSERT(embed_timer_called == 1);
-#endif
-
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-emfile.c b/3rdparty/libuv/test/test-emfile.c
deleted file mode 100644
index dd35f785b46..00000000000
--- a/3rdparty/libuv/test/test-emfile.c
+++ /dev/null
@@ -1,110 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#if !defined(_WIN32)
-
-#include "uv.h"
-#include "task.h"
-
-#include <errno.h>
-#include <sys/resource.h>
-#include <unistd.h>
-
-static void connection_cb(uv_stream_t* server_handle, int status);
-static void connect_cb(uv_connect_t* req, int status);
-
-static const int maxfd = 31;
-static unsigned connect_cb_called;
-static uv_tcp_t server_handle;
-static uv_tcp_t client_handle;
-
-
-TEST_IMPL(emfile) {
- struct sockaddr_in addr;
- struct rlimit limits;
- uv_connect_t connect_req;
- uv_loop_t* loop;
- int first_fd;
-
- /* Lower the file descriptor limit and use up all fds save one. */
- limits.rlim_cur = limits.rlim_max = maxfd + 1;
- if (setrlimit(RLIMIT_NOFILE, &limits)) {
- ASSERT(errno == EPERM); /* Valgrind blocks the setrlimit() call. */
- RETURN_SKIP("setrlimit(RLIMIT_NOFILE) failed, running under valgrind?");
- }
-
- loop = uv_default_loop();
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
- ASSERT(0 == uv_tcp_init(loop, &server_handle));
- ASSERT(0 == uv_tcp_init(loop, &client_handle));
- ASSERT(0 == uv_tcp_bind(&server_handle, (const struct sockaddr*) &addr, 0));
- ASSERT(0 == uv_listen((uv_stream_t*) &server_handle, 8, connection_cb));
-
- /* Remember the first one so we can clean up afterwards. */
- do
- first_fd = dup(0);
- while (first_fd == -1 && errno == EINTR);
- ASSERT(first_fd > 0);
-
- while (dup(0) != -1 || errno == EINTR);
- ASSERT(errno == EMFILE);
- close(maxfd);
-
- /* Now connect and use up the last available file descriptor. The EMFILE
- * handling logic in src/unix/stream.c should ensure that connect_cb() runs
- * whereas connection_cb() should *not* run.
- */
- ASSERT(0 == uv_tcp_connect(&connect_req,
- &client_handle,
- (const struct sockaddr*) &addr,
- connect_cb));
- ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
- ASSERT(1 == connect_cb_called);
-
- /* Close the dups again. Ignore errors in the unlikely event that the
- * file descriptors were not contiguous.
- */
- while (first_fd < maxfd) {
- close(first_fd);
- first_fd += 1;
- }
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-static void connection_cb(uv_stream_t* server_handle, int status) {
- ASSERT(0 && "connection_cb should not be called.");
-}
-
-
-static void connect_cb(uv_connect_t* req, int status) {
- /* |status| should equal 0 because the connection should have been accepted,
- * it's just that the server immediately closes it again.
- */
- ASSERT(0 == status);
- connect_cb_called += 1;
- uv_close((uv_handle_t*) &server_handle, NULL);
- uv_close((uv_handle_t*) &client_handle, NULL);
-}
-
-#endif /* !defined(_WIN32) */
diff --git a/3rdparty/libuv/test/test-error.c b/3rdparty/libuv/test/test-error.c
deleted file mode 100644
index eb337e66f33..00000000000
--- a/3rdparty/libuv/test/test-error.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-
-/*
- * Synthetic errors (errors that originate from within libuv, not the system)
- * should produce sensible error messages when run through uv_strerror().
- *
- * See https://github.com/joyent/libuv/issues/210
- */
-TEST_IMPL(error_message) {
- /* Cop out. Can't do proper checks on systems with
- * i18n-ized error messages...
- */
- if (strcmp(uv_strerror(0), "Success") != 0) {
- printf("i18n error messages detected, skipping test.\n");
- return 0;
- }
-
- ASSERT(strstr(uv_strerror(UV_EINVAL), "Success") == NULL);
- ASSERT(strcmp(uv_strerror(1337), "Unknown error") == 0);
- ASSERT(strcmp(uv_strerror(-1337), "Unknown error") == 0);
-
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-fail-always.c b/3rdparty/libuv/test/test-fail-always.c
deleted file mode 100644
index 0008459eac7..00000000000
--- a/3rdparty/libuv/test/test-fail-always.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "task.h"
-
-
-TEST_IMPL(fail_always) {
- /* This test always fails. It is used to test the test runner. */
- FATAL("Yes, it always fails");
- return 2;
-}
diff --git a/3rdparty/libuv/test/test-fs-event.c b/3rdparty/libuv/test/test-fs-event.c
deleted file mode 100644
index e02ff2fda5e..00000000000
--- a/3rdparty/libuv/test/test-fs-event.c
+++ /dev/null
@@ -1,907 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <string.h>
-#include <fcntl.h>
-
-#ifndef HAVE_KQUEUE
-# if defined(__APPLE__) || \
- defined(__DragonFly__) || \
- defined(__FreeBSD__) || \
- defined(__OpenBSD__) || \
- defined(__NetBSD__)
-# define HAVE_KQUEUE 1
-# endif
-#endif
-
-static uv_fs_event_t fs_event;
-static const char file_prefix[] = "fsevent-";
-static const int fs_event_file_count = 16;
-#if defined(__APPLE__) || defined(_WIN32)
-static const char file_prefix_in_subdir[] = "subdir";
-#endif
-static uv_timer_t timer;
-static int timer_cb_called;
-static int close_cb_called;
-static int fs_event_created;
-static int fs_event_removed;
-static int fs_event_cb_called;
-#if defined(PATH_MAX)
-static char fs_event_filename[PATH_MAX];
-#else
-static char fs_event_filename[1024];
-#endif /* defined(PATH_MAX) */
-static int timer_cb_touch_called;
-
-static void create_dir(const char* name) {
- int r;
- uv_fs_t req;
- r = uv_fs_mkdir(NULL, &req, name, 0755, NULL);
- ASSERT(r == 0 || r == UV_EEXIST);
- uv_fs_req_cleanup(&req);
-}
-
-static void create_file(const char* name) {
- int r;
- uv_file file;
- uv_fs_t req;
-
- r = uv_fs_open(NULL, &req, name, O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR, NULL);
- ASSERT(r >= 0);
- file = r;
- uv_fs_req_cleanup(&req);
- r = uv_fs_close(NULL, &req, file, NULL);
- ASSERT(r == 0);
- uv_fs_req_cleanup(&req);
-}
-
-static void touch_file(const char* name) {
- int r;
- uv_file file;
- uv_fs_t req;
- uv_buf_t buf;
-
- r = uv_fs_open(NULL, &req, name, O_RDWR, 0, NULL);
- ASSERT(r >= 0);
- file = r;
- uv_fs_req_cleanup(&req);
-
- buf = uv_buf_init("foo", 4);
- r = uv_fs_write(NULL, &req, file, &buf, 1, -1, NULL);
- ASSERT(r >= 0);
- uv_fs_req_cleanup(&req);
-
- r = uv_fs_close(NULL, &req, file, NULL);
- ASSERT(r == 0);
- uv_fs_req_cleanup(&req);
-}
-
-static void close_cb(uv_handle_t* handle) {
- ASSERT(handle != NULL);
- close_cb_called++;
-}
-
-static void fail_cb(uv_fs_event_t* handle,
- const char* path,
- int events,
- int status) {
- ASSERT(0 && "fail_cb called");
-}
-
-static void fs_event_cb_dir(uv_fs_event_t* handle, const char* filename,
- int events, int status) {
- ++fs_event_cb_called;
- ASSERT(handle == &fs_event);
- ASSERT(status == 0);
- ASSERT(events == UV_RENAME);
- #if defined(__APPLE__) || defined(_WIN32) || defined(__linux__)
- ASSERT(strcmp(filename, "file1") == 0);
- #else
- ASSERT(filename == NULL || strcmp(filename, "file1") == 0);
- #endif
- ASSERT(0 == uv_fs_event_stop(handle));
- uv_close((uv_handle_t*)handle, close_cb);
-}
-
-static const char* fs_event_get_filename(int i) {
- snprintf(fs_event_filename,
- sizeof(fs_event_filename),
- "watch_dir/%s%d",
- file_prefix,
- i);
- return fs_event_filename;
-}
-
-static void fs_event_create_files(uv_timer_t* handle) {
- /* Make sure we're not attempting to create files we do not intend */
- ASSERT(fs_event_created < fs_event_file_count);
-
- /* Create the file */
- create_file(fs_event_get_filename(fs_event_created));
-
- if (++fs_event_created < fs_event_file_count) {
- /* Create another file on a different event loop tick. We do it this way
- * to avoid fs events coalescing into one fs event. */
- ASSERT(0 == uv_timer_start(&timer, fs_event_create_files, 1, 0));
- }
-}
-
-static void fs_event_unlink_files(uv_timer_t* handle) {
- int r;
- int i;
-
- /* NOTE: handle might be NULL if invoked not as timer callback */
- if (handle == NULL) {
- /* Unlink all files */
- for (i = 0; i < 16; i++) {
- r = remove(fs_event_get_filename(i));
- if (handle != NULL)
- ASSERT(r == 0);
- }
- } else {
- /* Make sure we're not attempting to remove files we do not intend */
- ASSERT(fs_event_removed < fs_event_file_count);
-
- /* Remove the file */
- ASSERT(0 == remove(fs_event_get_filename(fs_event_removed)));
-
- if (++fs_event_removed < fs_event_file_count) {
- /* Remove another file on a different event loop tick. We do it this way
- * to avoid fs events coalescing into one fs event. */
- ASSERT(0 == uv_timer_start(&timer, fs_event_unlink_files, 1, 0));
- }
- }
-}
-
-static void fs_event_cb_dir_multi_file(uv_fs_event_t* handle,
- const char* filename,
- int events,
- int status) {
- fs_event_cb_called++;
- ASSERT(handle == &fs_event);
- ASSERT(status == 0);
- ASSERT(events == UV_CHANGE || UV_RENAME);
- #if defined(__APPLE__) || defined(_WIN32) || defined(__linux__)
- ASSERT(strncmp(filename, file_prefix, sizeof(file_prefix) - 1) == 0);
- #else
- ASSERT(filename == NULL ||
- strncmp(filename, file_prefix, sizeof(file_prefix) - 1) == 0);
- #endif
-
- if (fs_event_created + fs_event_removed == fs_event_file_count) {
- /* Once we've processed all create events, delete all files */
- ASSERT(0 == uv_timer_start(&timer, fs_event_unlink_files, 1, 0));
- } else if (fs_event_cb_called == 2 * fs_event_file_count) {
- /* Once we've processed all create and delete events, stop watching */
- uv_close((uv_handle_t*) &timer, close_cb);
- uv_close((uv_handle_t*) handle, close_cb);
- }
-}
-
-#if defined(__APPLE__) || defined(_WIN32)
-static const char* fs_event_get_filename_in_subdir(int i) {
- snprintf(fs_event_filename,
- sizeof(fs_event_filename),
- "watch_dir/subdir/%s%d",
- file_prefix,
- i);
- return fs_event_filename;
-}
-
-static void fs_event_create_files_in_subdir(uv_timer_t* handle) {
- /* Make sure we're not attempting to create files we do not intend */
- ASSERT(fs_event_created < fs_event_file_count);
-
- /* Create the file */
- create_file(fs_event_get_filename_in_subdir(fs_event_created));
-
- if (++fs_event_created < fs_event_file_count) {
- /* Create another file on a different event loop tick. We do it this way
- * to avoid fs events coalescing into one fs event. */
- ASSERT(0 == uv_timer_start(&timer, fs_event_create_files_in_subdir, 1, 0));
- }
-}
-
-static void fs_event_unlink_files_in_subdir(uv_timer_t* handle) {
- int r;
- int i;
-
- /* NOTE: handle might be NULL if invoked not as timer callback */
- if (handle == NULL) {
- /* Unlink all files */
- for (i = 0; i < 16; i++) {
- r = remove(fs_event_get_filename_in_subdir(i));
- if (handle != NULL)
- ASSERT(r == 0);
- }
- } else {
- /* Make sure we're not attempting to remove files we do not intend */
- ASSERT(fs_event_removed < fs_event_file_count);
-
- /* Remove the file */
- ASSERT(0 == remove(fs_event_get_filename_in_subdir(fs_event_removed)));
-
- if (++fs_event_removed < fs_event_file_count) {
- /* Remove another file on a different event loop tick. We do it this way
- * to avoid fs events coalescing into one fs event. */
- ASSERT(0 == uv_timer_start(&timer, fs_event_unlink_files_in_subdir, 1, 0));
- }
- }
-}
-
-static void fs_event_cb_dir_multi_file_in_subdir(uv_fs_event_t* handle,
- const char* filename,
- int events,
- int status) {
- fs_event_cb_called++;
- ASSERT(handle == &fs_event);
- ASSERT(status == 0);
- ASSERT(events == UV_CHANGE || UV_RENAME);
- #if defined(__APPLE__) || defined(_WIN32) || defined(__linux__)
- ASSERT(strncmp(filename,
- file_prefix_in_subdir,
- sizeof(file_prefix_in_subdir) - 1) == 0);
- #else
- ASSERT(filename == NULL ||
- strncmp(filename,
- file_prefix_in_subdir,
- sizeof(file_prefix_in_subdir) - 1) == 0);
- #endif
-
- if (fs_event_created + fs_event_removed == fs_event_file_count) {
- /* Once we've processed all create events, delete all files */
- ASSERT(0 == uv_timer_start(&timer, fs_event_unlink_files_in_subdir, 1, 0));
- } else if (fs_event_cb_called == 2 * fs_event_file_count) {
- /* Once we've processed all create and delete events, stop watching */
- uv_close((uv_handle_t*) &timer, close_cb);
- uv_close((uv_handle_t*) handle, close_cb);
- }
-}
-#endif
-
-static void fs_event_cb_file(uv_fs_event_t* handle, const char* filename,
- int events, int status) {
- ++fs_event_cb_called;
- ASSERT(handle == &fs_event);
- ASSERT(status == 0);
- ASSERT(events == UV_CHANGE);
- #if defined(__APPLE__) || defined(_WIN32) || defined(__linux__)
- ASSERT(strcmp(filename, "file2") == 0);
- #else
- ASSERT(filename == NULL || strcmp(filename, "file2") == 0);
- #endif
- ASSERT(0 == uv_fs_event_stop(handle));
- uv_close((uv_handle_t*)handle, close_cb);
-}
-
-static void timer_cb_close_handle(uv_timer_t* timer) {
- uv_handle_t* handle;
-
- ASSERT(timer != NULL);
- handle = timer->data;
-
- uv_close((uv_handle_t*)timer, NULL);
- uv_close((uv_handle_t*)handle, close_cb);
-}
-
-static void fs_event_cb_file_current_dir(uv_fs_event_t* handle,
- const char* filename, int events, int status) {
- ASSERT(fs_event_cb_called == 0);
- ++fs_event_cb_called;
-
- ASSERT(handle == &fs_event);
- ASSERT(status == 0);
- ASSERT(events == UV_CHANGE);
- #if defined(__APPLE__) || defined(_WIN32) || defined(__linux__)
- ASSERT(strcmp(filename, "watch_file") == 0);
- #else
- ASSERT(filename == NULL || strcmp(filename, "watch_file") == 0);
- #endif
-
- /* Regression test for SunOS: touch should generate just one event. */
- {
- static uv_timer_t timer;
- uv_timer_init(handle->loop, &timer);
- timer.data = handle;
- uv_timer_start(&timer, timer_cb_close_handle, 250, 0);
- }
-}
-
-static void timer_cb_file(uv_timer_t* handle) {
- ++timer_cb_called;
-
- if (timer_cb_called == 1) {
- touch_file("watch_dir/file1");
- } else {
- touch_file("watch_dir/file2");
- uv_close((uv_handle_t*)handle, close_cb);
- }
-}
-
-static void timer_cb_touch(uv_timer_t* timer) {
- uv_close((uv_handle_t*)timer, NULL);
- touch_file("watch_file");
- timer_cb_touch_called++;
-}
-
-static void timer_cb_watch_twice(uv_timer_t* handle) {
- uv_fs_event_t* handles = handle->data;
- uv_close((uv_handle_t*) (handles + 0), NULL);
- uv_close((uv_handle_t*) (handles + 1), NULL);
- uv_close((uv_handle_t*) handle, NULL);
-}
-
-TEST_IMPL(fs_event_watch_dir) {
- uv_loop_t* loop = uv_default_loop();
- int r;
-
- /* Setup */
- fs_event_unlink_files(NULL);
- remove("watch_dir/file2");
- remove("watch_dir/file1");
- remove("watch_dir/");
- create_dir("watch_dir");
-
- r = uv_fs_event_init(loop, &fs_event);
- ASSERT(r == 0);
- r = uv_fs_event_start(&fs_event, fs_event_cb_dir_multi_file, "watch_dir", 0);
- ASSERT(r == 0);
- r = uv_timer_init(loop, &timer);
- ASSERT(r == 0);
- r = uv_timer_start(&timer, fs_event_create_files, 100, 0);
- ASSERT(r == 0);
-
- uv_run(loop, UV_RUN_DEFAULT);
-
- ASSERT(fs_event_cb_called == fs_event_created + fs_event_removed);
- ASSERT(close_cb_called == 2);
-
- /* Cleanup */
- fs_event_unlink_files(NULL);
- remove("watch_dir/file2");
- remove("watch_dir/file1");
- remove("watch_dir/");
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-TEST_IMPL(fs_event_watch_dir_recursive) {
-#if defined(__APPLE__) || defined(_WIN32)
- uv_loop_t* loop;
- int r;
-
- /* Setup */
- loop = uv_default_loop();
- fs_event_unlink_files(NULL);
- remove("watch_dir/file2");
- remove("watch_dir/file1");
- remove("watch_dir/subdir");
- remove("watch_dir/");
- create_dir("watch_dir");
- create_dir("watch_dir/subdir");
-
- r = uv_fs_event_init(loop, &fs_event);
- ASSERT(r == 0);
- r = uv_fs_event_start(&fs_event, fs_event_cb_dir_multi_file_in_subdir, "watch_dir", UV_FS_EVENT_RECURSIVE);
- ASSERT(r == 0);
- r = uv_timer_init(loop, &timer);
- ASSERT(r == 0);
- r = uv_timer_start(&timer, fs_event_create_files_in_subdir, 100, 0);
- ASSERT(r == 0);
-
- uv_run(loop, UV_RUN_DEFAULT);
-
- ASSERT(fs_event_cb_called == fs_event_created + fs_event_removed);
- ASSERT(close_cb_called == 2);
-
- /* Cleanup */
- fs_event_unlink_files_in_subdir(NULL);
- remove("watch_dir/file2");
- remove("watch_dir/file1");
- remove("watch_dir/subdir");
- remove("watch_dir/");
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-#else
- RETURN_SKIP("Recursive directory watching not supported on this platform.");
-#endif
-}
-
-
-TEST_IMPL(fs_event_watch_file) {
- uv_loop_t* loop = uv_default_loop();
- int r;
-
- /* Setup */
- remove("watch_dir/file2");
- remove("watch_dir/file1");
- remove("watch_dir/");
- create_dir("watch_dir");
- create_file("watch_dir/file1");
- create_file("watch_dir/file2");
-
- r = uv_fs_event_init(loop, &fs_event);
- ASSERT(r == 0);
- r = uv_fs_event_start(&fs_event, fs_event_cb_file, "watch_dir/file2", 0);
- ASSERT(r == 0);
- r = uv_timer_init(loop, &timer);
- ASSERT(r == 0);
- r = uv_timer_start(&timer, timer_cb_file, 100, 100);
- ASSERT(r == 0);
-
- uv_run(loop, UV_RUN_DEFAULT);
-
- ASSERT(fs_event_cb_called == 1);
- ASSERT(timer_cb_called == 2);
- ASSERT(close_cb_called == 2);
-
- /* Cleanup */
- remove("watch_dir/file2");
- remove("watch_dir/file1");
- remove("watch_dir/");
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-TEST_IMPL(fs_event_watch_file_twice) {
- const char path[] = "test/fixtures/empty_file";
- uv_fs_event_t watchers[2];
- uv_timer_t timer;
- uv_loop_t* loop;
-
- loop = uv_default_loop();
- timer.data = watchers;
-
- ASSERT(0 == uv_fs_event_init(loop, watchers + 0));
- ASSERT(0 == uv_fs_event_start(watchers + 0, fail_cb, path, 0));
- ASSERT(0 == uv_fs_event_init(loop, watchers + 1));
- ASSERT(0 == uv_fs_event_start(watchers + 1, fail_cb, path, 0));
- ASSERT(0 == uv_timer_init(loop, &timer));
- ASSERT(0 == uv_timer_start(&timer, timer_cb_watch_twice, 10, 0));
- ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-TEST_IMPL(fs_event_watch_file_current_dir) {
- uv_timer_t timer;
- uv_loop_t* loop;
- int r;
-
- loop = uv_default_loop();
-
- /* Setup */
- remove("watch_file");
- create_file("watch_file");
-
- r = uv_fs_event_init(loop, &fs_event);
- ASSERT(r == 0);
- r = uv_fs_event_start(&fs_event,
- fs_event_cb_file_current_dir,
- "watch_file",
- 0);
- ASSERT(r == 0);
-
-
- r = uv_timer_init(loop, &timer);
- ASSERT(r == 0);
-
- r = uv_timer_start(&timer, timer_cb_touch, 10, 0);
- ASSERT(r == 0);
-
- ASSERT(timer_cb_touch_called == 0);
- ASSERT(fs_event_cb_called == 0);
- ASSERT(close_cb_called == 0);
-
- uv_run(loop, UV_RUN_DEFAULT);
-
- ASSERT(timer_cb_touch_called == 1);
- ASSERT(fs_event_cb_called == 1);
- ASSERT(close_cb_called == 1);
-
- /* Cleanup */
- remove("watch_file");
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-TEST_IMPL(fs_event_no_callback_after_close) {
- uv_loop_t* loop = uv_default_loop();
- int r;
-
- /* Setup */
- remove("watch_dir/file1");
- remove("watch_dir/");
- create_dir("watch_dir");
- create_file("watch_dir/file1");
-
- r = uv_fs_event_init(loop, &fs_event);
- ASSERT(r == 0);
- r = uv_fs_event_start(&fs_event,
- fs_event_cb_file,
- "watch_dir/file1",
- 0);
- ASSERT(r == 0);
-
-
- uv_close((uv_handle_t*)&fs_event, close_cb);
- touch_file("watch_dir/file1");
- uv_run(loop, UV_RUN_DEFAULT);
-
- ASSERT(fs_event_cb_called == 0);
- ASSERT(close_cb_called == 1);
-
- /* Cleanup */
- remove("watch_dir/file1");
- remove("watch_dir/");
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-TEST_IMPL(fs_event_no_callback_on_close) {
- uv_loop_t* loop = uv_default_loop();
- int r;
-
- /* Setup */
- remove("watch_dir/file1");
- remove("watch_dir/");
- create_dir("watch_dir");
- create_file("watch_dir/file1");
-
- r = uv_fs_event_init(loop, &fs_event);
- ASSERT(r == 0);
- r = uv_fs_event_start(&fs_event,
- fs_event_cb_file,
- "watch_dir/file1",
- 0);
- ASSERT(r == 0);
-
- uv_close((uv_handle_t*)&fs_event, close_cb);
-
- uv_run(loop, UV_RUN_DEFAULT);
-
- ASSERT(fs_event_cb_called == 0);
- ASSERT(close_cb_called == 1);
-
- /* Cleanup */
- remove("watch_dir/file1");
- remove("watch_dir/");
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-static void fs_event_fail(uv_fs_event_t* handle, const char* filename,
- int events, int status) {
- ASSERT(0 && "should never be called");
-}
-
-
-static void timer_cb(uv_timer_t* handle) {
- int r;
-
- r = uv_fs_event_init(handle->loop, &fs_event);
- ASSERT(r == 0);
- r = uv_fs_event_start(&fs_event, fs_event_fail, ".", 0);
- ASSERT(r == 0);
-
- uv_close((uv_handle_t*)&fs_event, close_cb);
- uv_close((uv_handle_t*)handle, close_cb);
-}
-
-
-TEST_IMPL(fs_event_immediate_close) {
- uv_timer_t timer;
- uv_loop_t* loop;
- int r;
-
- loop = uv_default_loop();
-
- r = uv_timer_init(loop, &timer);
- ASSERT(r == 0);
-
- r = uv_timer_start(&timer, timer_cb, 1, 0);
- ASSERT(r == 0);
-
- uv_run(loop, UV_RUN_DEFAULT);
-
- ASSERT(close_cb_called == 2);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(fs_event_close_with_pending_event) {
- uv_loop_t* loop;
- int r;
-
- loop = uv_default_loop();
-
- create_dir("watch_dir");
- create_file("watch_dir/file");
-
- r = uv_fs_event_init(loop, &fs_event);
- ASSERT(r == 0);
- r = uv_fs_event_start(&fs_event, fs_event_fail, "watch_dir", 0);
- ASSERT(r == 0);
-
- /* Generate an fs event. */
- touch_file("watch_dir/file");
-
- uv_close((uv_handle_t*)&fs_event, close_cb);
-
- uv_run(loop, UV_RUN_DEFAULT);
-
- ASSERT(close_cb_called == 1);
-
- /* Clean up */
- remove("watch_dir/file");
- remove("watch_dir/");
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-#if defined(HAVE_KQUEUE)
-
-/* kqueue doesn't register fs events if you don't have an active watcher.
- * The file descriptor needs to be part of the kqueue set of interest and
- * that's not the case until we actually enter the event loop.
- */
-TEST_IMPL(fs_event_close_in_callback) {
- fprintf(stderr, "Skipping test, doesn't work with kqueue.\n");
- return 0;
-}
-
-#else /* !HAVE_KQUEUE */
-
-static void fs_event_cb_close(uv_fs_event_t* handle, const char* filename,
- int events, int status) {
- ASSERT(status == 0);
-
- ASSERT(fs_event_cb_called < 3);
- ++fs_event_cb_called;
-
- if (fs_event_cb_called == 3) {
- uv_close((uv_handle_t*) handle, close_cb);
- }
-}
-
-
-TEST_IMPL(fs_event_close_in_callback) {
- uv_loop_t* loop;
- int r;
-
- loop = uv_default_loop();
-
- create_dir("watch_dir");
- create_file("watch_dir/file1");
- create_file("watch_dir/file2");
- create_file("watch_dir/file3");
- create_file("watch_dir/file4");
- create_file("watch_dir/file5");
-
- r = uv_fs_event_init(loop, &fs_event);
- ASSERT(r == 0);
- r = uv_fs_event_start(&fs_event, fs_event_cb_close, "watch_dir", 0);
- ASSERT(r == 0);
-
- /* Generate a couple of fs events. */
- touch_file("watch_dir/file1");
- touch_file("watch_dir/file2");
- touch_file("watch_dir/file3");
- touch_file("watch_dir/file4");
- touch_file("watch_dir/file5");
-
- uv_run(loop, UV_RUN_DEFAULT);
-
- ASSERT(close_cb_called == 1);
- ASSERT(fs_event_cb_called == 3);
-
- /* Clean up */
- remove("watch_dir/file1");
- remove("watch_dir/file2");
- remove("watch_dir/file3");
- remove("watch_dir/file4");
- remove("watch_dir/file5");
- remove("watch_dir/");
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-#endif /* HAVE_KQUEUE */
-
-TEST_IMPL(fs_event_start_and_close) {
- uv_loop_t* loop;
- uv_fs_event_t fs_event1;
- uv_fs_event_t fs_event2;
- int r;
-
- loop = uv_default_loop();
-
- create_dir("watch_dir");
-
- r = uv_fs_event_init(loop, &fs_event1);
- ASSERT(r == 0);
- r = uv_fs_event_start(&fs_event1, fs_event_cb_dir, "watch_dir", 0);
- ASSERT(r == 0);
-
- r = uv_fs_event_init(loop, &fs_event2);
- ASSERT(r == 0);
- r = uv_fs_event_start(&fs_event2, fs_event_cb_dir, "watch_dir", 0);
- ASSERT(r == 0);
-
- uv_close((uv_handle_t*) &fs_event2, close_cb);
- uv_close((uv_handle_t*) &fs_event1, close_cb);
-
- uv_run(loop, UV_RUN_DEFAULT);
-
- ASSERT(close_cb_called == 2);
-
- remove("watch_dir/");
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-TEST_IMPL(fs_event_getpath) {
- uv_loop_t* loop = uv_default_loop();
- int r;
- char buf[1024];
- size_t len;
-
- create_dir("watch_dir");
-
- r = uv_fs_event_init(loop, &fs_event);
- ASSERT(r == 0);
- len = sizeof buf;
- r = uv_fs_event_getpath(&fs_event, buf, &len);
- ASSERT(r == UV_EINVAL);
- r = uv_fs_event_start(&fs_event, fail_cb, "watch_dir", 0);
- ASSERT(r == 0);
- len = sizeof buf;
- r = uv_fs_event_getpath(&fs_event, buf, &len);
- ASSERT(r == 0);
- ASSERT(buf[len - 1] != 0);
- ASSERT(memcmp(buf, "watch_dir", len) == 0);
- r = uv_fs_event_stop(&fs_event);
- ASSERT(r == 0);
- uv_close((uv_handle_t*) &fs_event, close_cb);
-
- uv_run(loop, UV_RUN_DEFAULT);
-
- ASSERT(close_cb_called == 1);
-
- remove("watch_dir/");
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-#if defined(__APPLE__)
-
-static int fs_event_error_reported;
-
-static void fs_event_error_report_cb(uv_fs_event_t* handle,
- const char* filename,
- int events,
- int status) {
- if (status != 0)
- fs_event_error_reported = status;
-}
-
-static void timer_cb_nop(uv_timer_t* handle) {
- ++timer_cb_called;
- uv_close((uv_handle_t*) handle, close_cb);
-}
-
-static void fs_event_error_report_close_cb(uv_handle_t* handle) {
- ASSERT(handle != NULL);
- close_cb_called++;
-
- /* handle is allocated on-stack, no need to free it */
-}
-
-
-TEST_IMPL(fs_event_error_reporting) {
- unsigned int i;
- uv_loop_t loops[1024];
- uv_fs_event_t events[ARRAY_SIZE(loops)];
- uv_loop_t* loop;
- uv_fs_event_t* event;
-
- TEST_FILE_LIMIT(ARRAY_SIZE(loops) * 3);
-
- remove("watch_dir/");
- create_dir("watch_dir");
-
- /* Create a lot of loops, and start FSEventStream in each of them.
- * Eventually, this should create enough streams to make FSEventStreamStart()
- * fail.
- */
- for (i = 0; i < ARRAY_SIZE(loops); i++) {
- loop = &loops[i];
- ASSERT(0 == uv_loop_init(loop));
- event = &events[i];
-
- timer_cb_called = 0;
- close_cb_called = 0;
- ASSERT(0 == uv_fs_event_init(loop, event));
- ASSERT(0 == uv_fs_event_start(event,
- fs_event_error_report_cb,
- "watch_dir",
- 0));
- uv_unref((uv_handle_t*) event);
-
- /* Let loop run for some time */
- ASSERT(0 == uv_timer_init(loop, &timer));
- ASSERT(0 == uv_timer_start(&timer, timer_cb_nop, 2, 0));
- uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(1 == timer_cb_called);
- ASSERT(1 == close_cb_called);
- if (fs_event_error_reported != 0)
- break;
- }
-
- /* At least one loop should fail */
- ASSERT(fs_event_error_reported == UV_EMFILE);
-
- /* Stop and close all events, and destroy loops */
- do {
- loop = &loops[i];
- event = &events[i];
-
- ASSERT(0 == uv_fs_event_stop(event));
- uv_ref((uv_handle_t*) event);
- uv_close((uv_handle_t*) event, fs_event_error_report_close_cb);
-
- close_cb_called = 0;
- uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(close_cb_called == 1);
-
- uv_loop_close(loop);
- } while (i-- != 0);
-
- remove("watch_dir/");
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-#else /* !defined(__APPLE__) */
-
-TEST_IMPL(fs_event_error_reporting) {
- /* No-op, needed only for FSEvents backend */
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-#endif /* defined(__APPLE__) */
diff --git a/3rdparty/libuv/test/test-fs-poll.c b/3rdparty/libuv/test/test-fs-poll.c
deleted file mode 100644
index dbc1515b0b1..00000000000
--- a/3rdparty/libuv/test/test-fs-poll.c
+++ /dev/null
@@ -1,186 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <string.h>
-
-#define FIXTURE "testfile"
-
-static void timer_cb(uv_timer_t* handle);
-static void close_cb(uv_handle_t* handle);
-static void poll_cb(uv_fs_poll_t* handle,
- int status,
- const uv_stat_t* prev,
- const uv_stat_t* curr);
-
-static void poll_cb_fail(uv_fs_poll_t* handle,
- int status,
- const uv_stat_t* prev,
- const uv_stat_t* curr);
-
-static uv_fs_poll_t poll_handle;
-static uv_timer_t timer_handle;
-static uv_loop_t* loop;
-
-static int poll_cb_called;
-static int timer_cb_called;
-static int close_cb_called;
-
-
-static void touch_file(const char* path) {
- static int count;
- FILE* fp;
- int i;
-
- ASSERT((fp = fopen(FIXTURE, "w+")));
-
- /* Need to change the file size because the poller may not pick up
- * sub-second mtime changes.
- */
- i = ++count;
-
- while (i--)
- fputc('*', fp);
-
- fclose(fp);
-}
-
-
-static void close_cb(uv_handle_t* handle) {
- close_cb_called++;
-}
-
-
-static void timer_cb(uv_timer_t* handle) {
- touch_file(FIXTURE);
- timer_cb_called++;
-}
-
-
-static void poll_cb_fail(uv_fs_poll_t* handle,
- int status,
- const uv_stat_t* prev,
- const uv_stat_t* curr) {
- ASSERT(0 && "fail_cb called");
-}
-
-
-static void poll_cb(uv_fs_poll_t* handle,
- int status,
- const uv_stat_t* prev,
- const uv_stat_t* curr) {
- uv_stat_t zero_statbuf;
-
- memset(&zero_statbuf, 0, sizeof(zero_statbuf));
-
- ASSERT(handle == &poll_handle);
- ASSERT(1 == uv_is_active((uv_handle_t*) handle));
- ASSERT(prev != NULL);
- ASSERT(curr != NULL);
-
- switch (poll_cb_called++) {
- case 0:
- ASSERT(status == UV_ENOENT);
- ASSERT(0 == memcmp(prev, &zero_statbuf, sizeof(zero_statbuf)));
- ASSERT(0 == memcmp(curr, &zero_statbuf, sizeof(zero_statbuf)));
- touch_file(FIXTURE);
- break;
-
- case 1:
- ASSERT(status == 0);
- ASSERT(0 == memcmp(prev, &zero_statbuf, sizeof(zero_statbuf)));
- ASSERT(0 != memcmp(curr, &zero_statbuf, sizeof(zero_statbuf)));
- ASSERT(0 == uv_timer_start(&timer_handle, timer_cb, 20, 0));
- break;
-
- case 2:
- ASSERT(status == 0);
- ASSERT(0 != memcmp(prev, &zero_statbuf, sizeof(zero_statbuf)));
- ASSERT(0 != memcmp(curr, &zero_statbuf, sizeof(zero_statbuf)));
- ASSERT(0 == uv_timer_start(&timer_handle, timer_cb, 200, 0));
- break;
-
- case 3:
- ASSERT(status == 0);
- ASSERT(0 != memcmp(prev, &zero_statbuf, sizeof(zero_statbuf)));
- ASSERT(0 != memcmp(curr, &zero_statbuf, sizeof(zero_statbuf)));
- remove(FIXTURE);
- break;
-
- case 4:
- ASSERT(status == UV_ENOENT);
- ASSERT(0 != memcmp(prev, &zero_statbuf, sizeof(zero_statbuf)));
- ASSERT(0 == memcmp(curr, &zero_statbuf, sizeof(zero_statbuf)));
- uv_close((uv_handle_t*)handle, close_cb);
- break;
-
- default:
- ASSERT(0);
- }
-}
-
-
-TEST_IMPL(fs_poll) {
- loop = uv_default_loop();
-
- remove(FIXTURE);
-
- ASSERT(0 == uv_timer_init(loop, &timer_handle));
- ASSERT(0 == uv_fs_poll_init(loop, &poll_handle));
- ASSERT(0 == uv_fs_poll_start(&poll_handle, poll_cb, FIXTURE, 100));
- ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
-
- ASSERT(poll_cb_called == 5);
- ASSERT(timer_cb_called == 2);
- ASSERT(close_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(fs_poll_getpath) {
- char buf[1024];
- size_t len;
- loop = uv_default_loop();
-
- remove(FIXTURE);
-
- ASSERT(0 == uv_fs_poll_init(loop, &poll_handle));
- len = sizeof buf;
- ASSERT(UV_EINVAL == uv_fs_poll_getpath(&poll_handle, buf, &len));
- ASSERT(0 == uv_fs_poll_start(&poll_handle, poll_cb_fail, FIXTURE, 100));
- len = sizeof buf;
- ASSERT(0 == uv_fs_poll_getpath(&poll_handle, buf, &len));
- ASSERT(buf[len - 1] != 0);
- ASSERT(0 == memcmp(buf, FIXTURE, len));
-
- uv_close((uv_handle_t*) &poll_handle, close_cb);
-
- ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
-
- ASSERT(close_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-fs.c b/3rdparty/libuv/test/test-fs.c
deleted file mode 100644
index cf37ac4909c..00000000000
--- a/3rdparty/libuv/test/test-fs.c
+++ /dev/null
@@ -1,2664 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <errno.h>
-#include <string.h> /* memset */
-#include <fcntl.h>
-#include <sys/stat.h>
-
-/* FIXME we shouldn't need to branch in this file */
-#if defined(__unix__) || defined(__POSIX__) || \
- defined(__APPLE__) || defined(_AIX)
-#include <unistd.h> /* unlink, rmdir, etc. */
-#else
-# include <direct.h>
-# include <io.h>
-# define unlink _unlink
-# define rmdir _rmdir
-# define open _open
-# define write _write
-# define close _close
-# ifndef stat
-# define stat _stati64
-# endif
-# ifndef lseek
-# define lseek _lseek
-# endif
-#endif
-
-#define TOO_LONG_NAME_LENGTH 65536
-#define PATHMAX 1024
-
-typedef struct {
- const char* path;
- double atime;
- double mtime;
-} utime_check_t;
-
-
-static int dummy_cb_count;
-static int close_cb_count;
-static int create_cb_count;
-static int open_cb_count;
-static int read_cb_count;
-static int write_cb_count;
-static int unlink_cb_count;
-static int mkdir_cb_count;
-static int mkdtemp_cb_count;
-static int rmdir_cb_count;
-static int scandir_cb_count;
-static int stat_cb_count;
-static int rename_cb_count;
-static int fsync_cb_count;
-static int fdatasync_cb_count;
-static int ftruncate_cb_count;
-static int sendfile_cb_count;
-static int fstat_cb_count;
-static int access_cb_count;
-static int chmod_cb_count;
-static int fchmod_cb_count;
-static int chown_cb_count;
-static int fchown_cb_count;
-static int link_cb_count;
-static int symlink_cb_count;
-static int readlink_cb_count;
-static int realpath_cb_count;
-static int utime_cb_count;
-static int futime_cb_count;
-
-static uv_loop_t* loop;
-
-static uv_fs_t open_req1;
-static uv_fs_t open_req2;
-static uv_fs_t read_req;
-static uv_fs_t write_req;
-static uv_fs_t unlink_req;
-static uv_fs_t close_req;
-static uv_fs_t mkdir_req;
-static uv_fs_t mkdtemp_req1;
-static uv_fs_t mkdtemp_req2;
-static uv_fs_t rmdir_req;
-static uv_fs_t scandir_req;
-static uv_fs_t stat_req;
-static uv_fs_t rename_req;
-static uv_fs_t fsync_req;
-static uv_fs_t fdatasync_req;
-static uv_fs_t ftruncate_req;
-static uv_fs_t sendfile_req;
-static uv_fs_t utime_req;
-static uv_fs_t futime_req;
-
-static char buf[32];
-static char buf2[32];
-static char test_buf[] = "test-buffer\n";
-static char test_buf2[] = "second-buffer\n";
-static uv_buf_t iov;
-
-static void check_permission(const char* filename, unsigned int mode) {
- int r;
- uv_fs_t req;
- uv_stat_t* s;
-
- r = uv_fs_stat(NULL, &req, filename, NULL);
- ASSERT(r == 0);
- ASSERT(req.result == 0);
-
- s = &req.statbuf;
-#ifdef _WIN32
- /*
- * On Windows, chmod can only modify S_IWUSR (_S_IWRITE) bit,
- * so only testing for the specified flags.
- */
- ASSERT((s->st_mode & 0777) & mode);
-#else
- ASSERT((s->st_mode & 0777) == mode);
-#endif
-
- uv_fs_req_cleanup(&req);
-}
-
-
-static void dummy_cb(uv_fs_t* req) {
- (void) req;
- dummy_cb_count++;
-}
-
-
-static void link_cb(uv_fs_t* req) {
- ASSERT(req->fs_type == UV_FS_LINK);
- ASSERT(req->result == 0);
- link_cb_count++;
- uv_fs_req_cleanup(req);
-}
-
-
-static void symlink_cb(uv_fs_t* req) {
- ASSERT(req->fs_type == UV_FS_SYMLINK);
- ASSERT(req->result == 0);
- symlink_cb_count++;
- uv_fs_req_cleanup(req);
-}
-
-static void readlink_cb(uv_fs_t* req) {
- ASSERT(req->fs_type == UV_FS_READLINK);
- ASSERT(req->result == 0);
- ASSERT(strcmp(req->ptr, "test_file_symlink2") == 0);
- readlink_cb_count++;
- uv_fs_req_cleanup(req);
-}
-
-
-static void realpath_cb(uv_fs_t* req) {
- char test_file_abs_buf[PATHMAX];
- size_t test_file_abs_size = sizeof(test_file_abs_buf);
- ASSERT(req->fs_type == UV_FS_REALPATH);
-#ifdef _WIN32
- /*
- * Windows XP and Server 2003 don't support GetFinalPathNameByHandleW()
- */
- if (req->result == UV_ENOSYS) {
- realpath_cb_count++;
- uv_fs_req_cleanup(req);
- return;
- }
-#endif
- ASSERT(req->result == 0);
-
- uv_cwd(test_file_abs_buf, &test_file_abs_size);
-#ifdef _WIN32
- strcat(test_file_abs_buf, "\\test_file");
- ASSERT(stricmp(req->ptr, test_file_abs_buf) == 0);
-#else
- strcat(test_file_abs_buf, "/test_file");
- ASSERT(strcmp(req->ptr, test_file_abs_buf) == 0);
-#endif
- realpath_cb_count++;
- uv_fs_req_cleanup(req);
-}
-
-
-static void access_cb(uv_fs_t* req) {
- ASSERT(req->fs_type == UV_FS_ACCESS);
- access_cb_count++;
- uv_fs_req_cleanup(req);
-}
-
-
-static void fchmod_cb(uv_fs_t* req) {
- ASSERT(req->fs_type == UV_FS_FCHMOD);
- ASSERT(req->result == 0);
- fchmod_cb_count++;
- uv_fs_req_cleanup(req);
- check_permission("test_file", *(int*)req->data);
-}
-
-
-static void chmod_cb(uv_fs_t* req) {
- ASSERT(req->fs_type == UV_FS_CHMOD);
- ASSERT(req->result == 0);
- chmod_cb_count++;
- uv_fs_req_cleanup(req);
- check_permission("test_file", *(int*)req->data);
-}
-
-
-static void fchown_cb(uv_fs_t* req) {
- ASSERT(req->fs_type == UV_FS_FCHOWN);
- ASSERT(req->result == 0);
- fchown_cb_count++;
- uv_fs_req_cleanup(req);
-}
-
-
-static void chown_cb(uv_fs_t* req) {
- ASSERT(req->fs_type == UV_FS_CHOWN);
- ASSERT(req->result == 0);
- chown_cb_count++;
- uv_fs_req_cleanup(req);
-}
-
-static void chown_root_cb(uv_fs_t* req) {
- ASSERT(req->fs_type == UV_FS_CHOWN);
-#ifdef _WIN32
- /* On windows, chown is a no-op and always succeeds. */
- ASSERT(req->result == 0);
-#else
- /* On unix, chown'ing the root directory is not allowed -
- * unless you're root, of course.
- */
- if (geteuid() == 0)
- ASSERT(req->result == 0);
- else
- ASSERT(req->result == UV_EPERM);
-#endif
- chown_cb_count++;
- uv_fs_req_cleanup(req);
-}
-
-static void unlink_cb(uv_fs_t* req) {
- ASSERT(req == &unlink_req);
- ASSERT(req->fs_type == UV_FS_UNLINK);
- ASSERT(req->result == 0);
- unlink_cb_count++;
- uv_fs_req_cleanup(req);
-}
-
-static void fstat_cb(uv_fs_t* req) {
- uv_stat_t* s = req->ptr;
- ASSERT(req->fs_type == UV_FS_FSTAT);
- ASSERT(req->result == 0);
- ASSERT(s->st_size == sizeof(test_buf));
- uv_fs_req_cleanup(req);
- fstat_cb_count++;
-}
-
-
-static void close_cb(uv_fs_t* req) {
- int r;
- ASSERT(req == &close_req);
- ASSERT(req->fs_type == UV_FS_CLOSE);
- ASSERT(req->result == 0);
- close_cb_count++;
- uv_fs_req_cleanup(req);
- if (close_cb_count == 3) {
- r = uv_fs_unlink(loop, &unlink_req, "test_file2", unlink_cb);
- ASSERT(r == 0);
- }
-}
-
-
-static void ftruncate_cb(uv_fs_t* req) {
- int r;
- ASSERT(req == &ftruncate_req);
- ASSERT(req->fs_type == UV_FS_FTRUNCATE);
- ASSERT(req->result == 0);
- ftruncate_cb_count++;
- uv_fs_req_cleanup(req);
- r = uv_fs_close(loop, &close_req, open_req1.result, close_cb);
- ASSERT(r == 0);
-}
-
-
-static void read_cb(uv_fs_t* req) {
- int r;
- ASSERT(req == &read_req);
- ASSERT(req->fs_type == UV_FS_READ);
- ASSERT(req->result >= 0); /* FIXME(bnoordhuis) Check if requested size? */
- read_cb_count++;
- uv_fs_req_cleanup(req);
- if (read_cb_count == 1) {
- ASSERT(strcmp(buf, test_buf) == 0);
- r = uv_fs_ftruncate(loop, &ftruncate_req, open_req1.result, 7,
- ftruncate_cb);
- } else {
- ASSERT(strcmp(buf, "test-bu") == 0);
- r = uv_fs_close(loop, &close_req, open_req1.result, close_cb);
- }
- ASSERT(r == 0);
-}
-
-
-static void open_cb(uv_fs_t* req) {
- int r;
- ASSERT(req == &open_req1);
- ASSERT(req->fs_type == UV_FS_OPEN);
- if (req->result < 0) {
- fprintf(stderr, "async open error: %d\n", (int) req->result);
- ASSERT(0);
- }
- open_cb_count++;
- ASSERT(req->path);
- ASSERT(memcmp(req->path, "test_file2\0", 11) == 0);
- uv_fs_req_cleanup(req);
- memset(buf, 0, sizeof(buf));
- iov = uv_buf_init(buf, sizeof(buf));
- r = uv_fs_read(loop, &read_req, open_req1.result, &iov, 1, -1,
- read_cb);
- ASSERT(r == 0);
-}
-
-
-static void open_cb_simple(uv_fs_t* req) {
- ASSERT(req->fs_type == UV_FS_OPEN);
- if (req->result < 0) {
- fprintf(stderr, "async open error: %d\n", (int) req->result);
- ASSERT(0);
- }
- open_cb_count++;
- ASSERT(req->path);
- uv_fs_req_cleanup(req);
-}
-
-
-static void fsync_cb(uv_fs_t* req) {
- int r;
- ASSERT(req == &fsync_req);
- ASSERT(req->fs_type == UV_FS_FSYNC);
- ASSERT(req->result == 0);
- fsync_cb_count++;
- uv_fs_req_cleanup(req);
- r = uv_fs_close(loop, &close_req, open_req1.result, close_cb);
- ASSERT(r == 0);
-}
-
-
-static void fdatasync_cb(uv_fs_t* req) {
- int r;
- ASSERT(req == &fdatasync_req);
- ASSERT(req->fs_type == UV_FS_FDATASYNC);
- ASSERT(req->result == 0);
- fdatasync_cb_count++;
- uv_fs_req_cleanup(req);
- r = uv_fs_fsync(loop, &fsync_req, open_req1.result, fsync_cb);
- ASSERT(r == 0);
-}
-
-
-static void write_cb(uv_fs_t* req) {
- int r;
- ASSERT(req == &write_req);
- ASSERT(req->fs_type == UV_FS_WRITE);
- ASSERT(req->result >= 0); /* FIXME(bnoordhuis) Check if requested size? */
- write_cb_count++;
- uv_fs_req_cleanup(req);
- r = uv_fs_fdatasync(loop, &fdatasync_req, open_req1.result, fdatasync_cb);
- ASSERT(r == 0);
-}
-
-
-static void create_cb(uv_fs_t* req) {
- int r;
- ASSERT(req == &open_req1);
- ASSERT(req->fs_type == UV_FS_OPEN);
- ASSERT(req->result >= 0);
- create_cb_count++;
- uv_fs_req_cleanup(req);
- iov = uv_buf_init(test_buf, sizeof(test_buf));
- r = uv_fs_write(loop, &write_req, req->result, &iov, 1, -1, write_cb);
- ASSERT(r == 0);
-}
-
-
-static void rename_cb(uv_fs_t* req) {
- ASSERT(req == &rename_req);
- ASSERT(req->fs_type == UV_FS_RENAME);
- ASSERT(req->result == 0);
- rename_cb_count++;
- uv_fs_req_cleanup(req);
-}
-
-
-static void mkdir_cb(uv_fs_t* req) {
- ASSERT(req == &mkdir_req);
- ASSERT(req->fs_type == UV_FS_MKDIR);
- ASSERT(req->result == 0);
- mkdir_cb_count++;
- ASSERT(req->path);
- ASSERT(memcmp(req->path, "test_dir\0", 9) == 0);
- uv_fs_req_cleanup(req);
-}
-
-
-static void check_mkdtemp_result(uv_fs_t* req) {
- int r;
-
- ASSERT(req->fs_type == UV_FS_MKDTEMP);
- ASSERT(req->result == 0);
- ASSERT(req->path);
- ASSERT(strlen(req->path) == 15);
- ASSERT(memcmp(req->path, "test_dir_", 9) == 0);
- ASSERT(memcmp(req->path + 9, "XXXXXX", 6) != 0);
- check_permission(req->path, 0700);
-
- /* Check if req->path is actually a directory */
- r = uv_fs_stat(NULL, &stat_req, req->path, NULL);
- ASSERT(r == 0);
- ASSERT(((uv_stat_t*)stat_req.ptr)->st_mode & S_IFDIR);
- uv_fs_req_cleanup(&stat_req);
-}
-
-
-static void mkdtemp_cb(uv_fs_t* req) {
- ASSERT(req == &mkdtemp_req1);
- check_mkdtemp_result(req);
- mkdtemp_cb_count++;
-}
-
-
-static void rmdir_cb(uv_fs_t* req) {
- ASSERT(req == &rmdir_req);
- ASSERT(req->fs_type == UV_FS_RMDIR);
- ASSERT(req->result == 0);
- rmdir_cb_count++;
- ASSERT(req->path);
- ASSERT(memcmp(req->path, "test_dir\0", 9) == 0);
- uv_fs_req_cleanup(req);
-}
-
-
-static void assert_is_file_type(uv_dirent_t dent) {
-#ifdef HAVE_DIRENT_TYPES
- /*
- * For Apple and Windows, we know getdents is expected to work but for other
- * environments, the filesystem dictates whether or not getdents supports
- * returning the file type.
- *
- * See:
- * http://man7.org/linux/man-pages/man2/getdents.2.html
- * https://github.com/libuv/libuv/issues/501
- */
- #if defined(__APPLE__) || defined(_WIN32)
- ASSERT(dent.type == UV_DIRENT_FILE);
- #else
- ASSERT(dent.type == UV_DIRENT_FILE || dent.type == UV_DIRENT_UNKNOWN);
- #endif
-#else
- ASSERT(dent.type == UV_DIRENT_UNKNOWN);
-#endif
-}
-
-
-static void scandir_cb(uv_fs_t* req) {
- uv_dirent_t dent;
- ASSERT(req == &scandir_req);
- ASSERT(req->fs_type == UV_FS_SCANDIR);
- ASSERT(req->result == 2);
- ASSERT(req->ptr);
-
- while (UV_EOF != uv_fs_scandir_next(req, &dent)) {
- ASSERT(strcmp(dent.name, "file1") == 0 || strcmp(dent.name, "file2") == 0);
- assert_is_file_type(dent);
- }
- scandir_cb_count++;
- ASSERT(req->path);
- ASSERT(memcmp(req->path, "test_dir\0", 9) == 0);
- uv_fs_req_cleanup(req);
- ASSERT(!req->ptr);
-}
-
-
-static void empty_scandir_cb(uv_fs_t* req) {
- uv_dirent_t dent;
-
- ASSERT(req == &scandir_req);
- ASSERT(req->fs_type == UV_FS_SCANDIR);
- ASSERT(req->result == 0);
- ASSERT(req->ptr == NULL);
- ASSERT(UV_EOF == uv_fs_scandir_next(req, &dent));
- uv_fs_req_cleanup(req);
- scandir_cb_count++;
-}
-
-
-static void file_scandir_cb(uv_fs_t* req) {
- ASSERT(req == &scandir_req);
- ASSERT(req->fs_type == UV_FS_SCANDIR);
- ASSERT(req->result == UV_ENOTDIR);
- ASSERT(req->ptr == NULL);
- uv_fs_req_cleanup(req);
- scandir_cb_count++;
-}
-
-
-static void stat_cb(uv_fs_t* req) {
- ASSERT(req == &stat_req);
- ASSERT(req->fs_type == UV_FS_STAT || req->fs_type == UV_FS_LSTAT);
- ASSERT(req->result == 0);
- ASSERT(req->ptr);
- stat_cb_count++;
- uv_fs_req_cleanup(req);
- ASSERT(!req->ptr);
-}
-
-
-static void sendfile_cb(uv_fs_t* req) {
- ASSERT(req == &sendfile_req);
- ASSERT(req->fs_type == UV_FS_SENDFILE);
- ASSERT(req->result == 65546);
- sendfile_cb_count++;
- uv_fs_req_cleanup(req);
-}
-
-
-static void open_noent_cb(uv_fs_t* req) {
- ASSERT(req->fs_type == UV_FS_OPEN);
- ASSERT(req->result == UV_ENOENT);
- open_cb_count++;
- uv_fs_req_cleanup(req);
-}
-
-static void open_nametoolong_cb(uv_fs_t* req) {
- ASSERT(req->fs_type == UV_FS_OPEN);
- ASSERT(req->result == UV_ENAMETOOLONG);
- open_cb_count++;
- uv_fs_req_cleanup(req);
-}
-
-static void open_loop_cb(uv_fs_t* req) {
- ASSERT(req->fs_type == UV_FS_OPEN);
- ASSERT(req->result == UV_ELOOP);
- open_cb_count++;
- uv_fs_req_cleanup(req);
-}
-
-
-TEST_IMPL(fs_file_noent) {
- uv_fs_t req;
- int r;
-
- loop = uv_default_loop();
-
- r = uv_fs_open(NULL, &req, "does_not_exist", O_RDONLY, 0, NULL);
- ASSERT(r == UV_ENOENT);
- ASSERT(req.result == UV_ENOENT);
- uv_fs_req_cleanup(&req);
-
- r = uv_fs_open(loop, &req, "does_not_exist", O_RDONLY, 0, open_noent_cb);
- ASSERT(r == 0);
-
- ASSERT(open_cb_count == 0);
- uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(open_cb_count == 1);
-
- /* TODO add EACCES test */
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-TEST_IMPL(fs_file_nametoolong) {
- uv_fs_t req;
- int r;
- char name[TOO_LONG_NAME_LENGTH + 1];
-
- loop = uv_default_loop();
-
- memset(name, 'a', TOO_LONG_NAME_LENGTH);
- name[TOO_LONG_NAME_LENGTH] = 0;
-
- r = uv_fs_open(NULL, &req, name, O_RDONLY, 0, NULL);
- ASSERT(r == UV_ENAMETOOLONG);
- ASSERT(req.result == UV_ENAMETOOLONG);
- uv_fs_req_cleanup(&req);
-
- r = uv_fs_open(loop, &req, name, O_RDONLY, 0, open_nametoolong_cb);
- ASSERT(r == 0);
-
- ASSERT(open_cb_count == 0);
- uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(open_cb_count == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-TEST_IMPL(fs_file_loop) {
- uv_fs_t req;
- int r;
-
- loop = uv_default_loop();
-
- unlink("test_symlink");
- r = uv_fs_symlink(NULL, &req, "test_symlink", "test_symlink", 0, NULL);
-#ifdef _WIN32
- /*
- * Windows XP and Server 2003 don't support symlinks; we'll get UV_ENOTSUP.
- * Starting with vista they are supported, but only when elevated, otherwise
- * we'll see UV_EPERM.
- */
- if (r == UV_ENOTSUP || r == UV_EPERM)
- return 0;
-#endif
- ASSERT(r == 0);
- uv_fs_req_cleanup(&req);
-
- r = uv_fs_open(NULL, &req, "test_symlink", O_RDONLY, 0, NULL);
- ASSERT(r == UV_ELOOP);
- ASSERT(req.result == UV_ELOOP);
- uv_fs_req_cleanup(&req);
-
- r = uv_fs_open(loop, &req, "test_symlink", O_RDONLY, 0, open_loop_cb);
- ASSERT(r == 0);
-
- ASSERT(open_cb_count == 0);
- uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(open_cb_count == 1);
-
- unlink("test_symlink");
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-static void check_utime(const char* path, double atime, double mtime) {
- uv_stat_t* s;
- uv_fs_t req;
- int r;
-
- r = uv_fs_stat(loop, &req, path, NULL);
- ASSERT(r == 0);
-
- ASSERT(req.result == 0);
- s = &req.statbuf;
-
- ASSERT(s->st_atim.tv_sec == atime);
- ASSERT(s->st_mtim.tv_sec == mtime);
-
- uv_fs_req_cleanup(&req);
-}
-
-
-static void utime_cb(uv_fs_t* req) {
- utime_check_t* c;
-
- ASSERT(req == &utime_req);
- ASSERT(req->result == 0);
- ASSERT(req->fs_type == UV_FS_UTIME);
-
- c = req->data;
- check_utime(c->path, c->atime, c->mtime);
-
- uv_fs_req_cleanup(req);
- utime_cb_count++;
-}
-
-
-static void futime_cb(uv_fs_t* req) {
- utime_check_t* c;
-
- ASSERT(req == &futime_req);
- ASSERT(req->result == 0);
- ASSERT(req->fs_type == UV_FS_FUTIME);
-
- c = req->data;
- check_utime(c->path, c->atime, c->mtime);
-
- uv_fs_req_cleanup(req);
- futime_cb_count++;
-}
-
-
-TEST_IMPL(fs_file_async) {
- int r;
-
- /* Setup. */
- unlink("test_file");
- unlink("test_file2");
-
- loop = uv_default_loop();
-
- r = uv_fs_open(loop, &open_req1, "test_file", O_WRONLY | O_CREAT,
- S_IRUSR | S_IWUSR, create_cb);
- ASSERT(r == 0);
- uv_run(loop, UV_RUN_DEFAULT);
-
- ASSERT(create_cb_count == 1);
- ASSERT(write_cb_count == 1);
- ASSERT(fsync_cb_count == 1);
- ASSERT(fdatasync_cb_count == 1);
- ASSERT(close_cb_count == 1);
-
- r = uv_fs_rename(loop, &rename_req, "test_file", "test_file2", rename_cb);
- ASSERT(r == 0);
-
- uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(create_cb_count == 1);
- ASSERT(write_cb_count == 1);
- ASSERT(close_cb_count == 1);
- ASSERT(rename_cb_count == 1);
-
- r = uv_fs_open(loop, &open_req1, "test_file2", O_RDWR, 0, open_cb);
- ASSERT(r == 0);
-
- uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(open_cb_count == 1);
- ASSERT(read_cb_count == 1);
- ASSERT(close_cb_count == 2);
- ASSERT(rename_cb_count == 1);
- ASSERT(create_cb_count == 1);
- ASSERT(write_cb_count == 1);
- ASSERT(ftruncate_cb_count == 1);
-
- r = uv_fs_open(loop, &open_req1, "test_file2", O_RDONLY, 0, open_cb);
- ASSERT(r == 0);
-
- uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(open_cb_count == 2);
- ASSERT(read_cb_count == 2);
- ASSERT(close_cb_count == 3);
- ASSERT(rename_cb_count == 1);
- ASSERT(unlink_cb_count == 1);
- ASSERT(create_cb_count == 1);
- ASSERT(write_cb_count == 1);
- ASSERT(ftruncate_cb_count == 1);
-
- /* Cleanup. */
- unlink("test_file");
- unlink("test_file2");
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(fs_file_sync) {
- int r;
-
- /* Setup. */
- unlink("test_file");
- unlink("test_file2");
-
- loop = uv_default_loop();
-
- r = uv_fs_open(loop, &open_req1, "test_file", O_WRONLY | O_CREAT,
- S_IWUSR | S_IRUSR, NULL);
- ASSERT(r >= 0);
- ASSERT(open_req1.result >= 0);
- uv_fs_req_cleanup(&open_req1);
-
- iov = uv_buf_init(test_buf, sizeof(test_buf));
- r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, -1, NULL);
- ASSERT(r >= 0);
- ASSERT(write_req.result >= 0);
- uv_fs_req_cleanup(&write_req);
-
- r = uv_fs_close(NULL, &close_req, open_req1.result, NULL);
- ASSERT(r == 0);
- ASSERT(close_req.result == 0);
- uv_fs_req_cleanup(&close_req);
-
- r = uv_fs_open(NULL, &open_req1, "test_file", O_RDWR, 0, NULL);
- ASSERT(r >= 0);
- ASSERT(open_req1.result >= 0);
- uv_fs_req_cleanup(&open_req1);
-
- iov = uv_buf_init(buf, sizeof(buf));
- r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, -1, NULL);
- ASSERT(r >= 0);
- ASSERT(read_req.result >= 0);
- ASSERT(strcmp(buf, test_buf) == 0);
- uv_fs_req_cleanup(&read_req);
-
- r = uv_fs_ftruncate(NULL, &ftruncate_req, open_req1.result, 7, NULL);
- ASSERT(r == 0);
- ASSERT(ftruncate_req.result == 0);
- uv_fs_req_cleanup(&ftruncate_req);
-
- r = uv_fs_close(NULL, &close_req, open_req1.result, NULL);
- ASSERT(r == 0);
- ASSERT(close_req.result == 0);
- uv_fs_req_cleanup(&close_req);
-
- r = uv_fs_rename(NULL, &rename_req, "test_file", "test_file2", NULL);
- ASSERT(r == 0);
- ASSERT(rename_req.result == 0);
- uv_fs_req_cleanup(&rename_req);
-
- r = uv_fs_open(NULL, &open_req1, "test_file2", O_RDONLY, 0, NULL);
- ASSERT(r >= 0);
- ASSERT(open_req1.result >= 0);
- uv_fs_req_cleanup(&open_req1);
-
- memset(buf, 0, sizeof(buf));
- iov = uv_buf_init(buf, sizeof(buf));
- r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, -1, NULL);
- ASSERT(r >= 0);
- ASSERT(read_req.result >= 0);
- ASSERT(strcmp(buf, "test-bu") == 0);
- uv_fs_req_cleanup(&read_req);
-
- r = uv_fs_close(NULL, &close_req, open_req1.result, NULL);
- ASSERT(r == 0);
- ASSERT(close_req.result == 0);
- uv_fs_req_cleanup(&close_req);
-
- r = uv_fs_unlink(NULL, &unlink_req, "test_file2", NULL);
- ASSERT(r == 0);
- ASSERT(unlink_req.result == 0);
- uv_fs_req_cleanup(&unlink_req);
-
- /* Cleanup */
- unlink("test_file");
- unlink("test_file2");
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(fs_file_write_null_buffer) {
- int r;
-
- /* Setup. */
- unlink("test_file");
-
- loop = uv_default_loop();
-
- r = uv_fs_open(NULL, &open_req1, "test_file", O_WRONLY | O_CREAT,
- S_IWUSR | S_IRUSR, NULL);
- ASSERT(r >= 0);
- ASSERT(open_req1.result >= 0);
- uv_fs_req_cleanup(&open_req1);
-
- iov = uv_buf_init(NULL, 0);
- r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, -1, NULL);
- ASSERT(r == 0);
- ASSERT(write_req.result == 0);
- uv_fs_req_cleanup(&write_req);
-
- r = uv_fs_close(NULL, &close_req, open_req1.result, NULL);
- ASSERT(r == 0);
- ASSERT(close_req.result == 0);
- uv_fs_req_cleanup(&close_req);
-
- unlink("test_file");
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(fs_async_dir) {
- int r;
- uv_dirent_t dent;
-
- /* Setup */
- unlink("test_dir/file1");
- unlink("test_dir/file2");
- rmdir("test_dir");
-
- loop = uv_default_loop();
-
- r = uv_fs_mkdir(loop, &mkdir_req, "test_dir", 0755, mkdir_cb);
- ASSERT(r == 0);
-
- uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(mkdir_cb_count == 1);
-
- /* Create 2 files synchronously. */
- r = uv_fs_open(NULL, &open_req1, "test_dir/file1", O_WRONLY | O_CREAT,
- S_IWUSR | S_IRUSR, NULL);
- ASSERT(r >= 0);
- uv_fs_req_cleanup(&open_req1);
- r = uv_fs_close(NULL, &close_req, open_req1.result, NULL);
- ASSERT(r == 0);
- uv_fs_req_cleanup(&close_req);
-
- r = uv_fs_open(NULL, &open_req1, "test_dir/file2", O_WRONLY | O_CREAT,
- S_IWUSR | S_IRUSR, NULL);
- ASSERT(r >= 0);
- uv_fs_req_cleanup(&open_req1);
- r = uv_fs_close(NULL, &close_req, open_req1.result, NULL);
- ASSERT(r == 0);
- uv_fs_req_cleanup(&close_req);
-
- r = uv_fs_scandir(loop, &scandir_req, "test_dir", 0, scandir_cb);
- ASSERT(r == 0);
-
- uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(scandir_cb_count == 1);
-
- /* sync uv_fs_scandir */
- r = uv_fs_scandir(NULL, &scandir_req, "test_dir", 0, NULL);
- ASSERT(r == 2);
- ASSERT(scandir_req.result == 2);
- ASSERT(scandir_req.ptr);
- while (UV_EOF != uv_fs_scandir_next(&scandir_req, &dent)) {
- ASSERT(strcmp(dent.name, "file1") == 0 || strcmp(dent.name, "file2") == 0);
- assert_is_file_type(dent);
- }
- uv_fs_req_cleanup(&scandir_req);
- ASSERT(!scandir_req.ptr);
-
- r = uv_fs_stat(loop, &stat_req, "test_dir", stat_cb);
- ASSERT(r == 0);
- uv_run(loop, UV_RUN_DEFAULT);
-
- r = uv_fs_stat(loop, &stat_req, "test_dir/", stat_cb);
- ASSERT(r == 0);
- uv_run(loop, UV_RUN_DEFAULT);
-
- r = uv_fs_lstat(loop, &stat_req, "test_dir", stat_cb);
- ASSERT(r == 0);
- uv_run(loop, UV_RUN_DEFAULT);
-
- r = uv_fs_lstat(loop, &stat_req, "test_dir/", stat_cb);
- ASSERT(r == 0);
- uv_run(loop, UV_RUN_DEFAULT);
-
- ASSERT(stat_cb_count == 4);
-
- r = uv_fs_unlink(loop, &unlink_req, "test_dir/file1", unlink_cb);
- ASSERT(r == 0);
- uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(unlink_cb_count == 1);
-
- r = uv_fs_unlink(loop, &unlink_req, "test_dir/file2", unlink_cb);
- ASSERT(r == 0);
- uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(unlink_cb_count == 2);
-
- r = uv_fs_rmdir(loop, &rmdir_req, "test_dir", rmdir_cb);
- ASSERT(r == 0);
- uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(rmdir_cb_count == 1);
-
- /* Cleanup */
- unlink("test_dir/file1");
- unlink("test_dir/file2");
- rmdir("test_dir");
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(fs_async_sendfile) {
- int f, r;
- struct stat s1, s2;
-
- loop = uv_default_loop();
-
- /* Setup. */
- unlink("test_file");
- unlink("test_file2");
-
- f = open("test_file", O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR);
- ASSERT(f != -1);
-
- r = write(f, "begin\n", 6);
- ASSERT(r == 6);
-
- r = lseek(f, 65536, SEEK_CUR);
- ASSERT(r == 65542);
-
- r = write(f, "end\n", 4);
- ASSERT(r != -1);
-
- r = close(f);
- ASSERT(r == 0);
-
- /* Test starts here. */
- r = uv_fs_open(NULL, &open_req1, "test_file", O_RDWR, 0, NULL);
- ASSERT(r >= 0);
- ASSERT(open_req1.result >= 0);
- uv_fs_req_cleanup(&open_req1);
-
- r = uv_fs_open(NULL, &open_req2, "test_file2", O_WRONLY | O_CREAT,
- S_IWUSR | S_IRUSR, NULL);
- ASSERT(r >= 0);
- ASSERT(open_req2.result >= 0);
- uv_fs_req_cleanup(&open_req2);
-
- r = uv_fs_sendfile(loop, &sendfile_req, open_req2.result, open_req1.result,
- 0, 131072, sendfile_cb);
- ASSERT(r == 0);
- uv_run(loop, UV_RUN_DEFAULT);
-
- ASSERT(sendfile_cb_count == 1);
-
- r = uv_fs_close(NULL, &close_req, open_req1.result, NULL);
- ASSERT(r == 0);
- uv_fs_req_cleanup(&close_req);
- r = uv_fs_close(NULL, &close_req, open_req2.result, NULL);
- ASSERT(r == 0);
- uv_fs_req_cleanup(&close_req);
-
- stat("test_file", &s1);
- stat("test_file2", &s2);
- ASSERT(65546 == s2.st_size && s1.st_size == s2.st_size);
-
- /* Cleanup. */
- unlink("test_file");
- unlink("test_file2");
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(fs_mkdtemp) {
- int r;
- const char* path_template = "test_dir_XXXXXX";
-
- loop = uv_default_loop();
-
- r = uv_fs_mkdtemp(loop, &mkdtemp_req1, path_template, mkdtemp_cb);
- ASSERT(r == 0);
-
- uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(mkdtemp_cb_count == 1);
-
- /* sync mkdtemp */
- r = uv_fs_mkdtemp(NULL, &mkdtemp_req2, path_template, NULL);
- ASSERT(r == 0);
- check_mkdtemp_result(&mkdtemp_req2);
-
- /* mkdtemp return different values on subsequent calls */
- ASSERT(strcmp(mkdtemp_req1.path, mkdtemp_req2.path) != 0);
-
- /* Cleanup */
- rmdir(mkdtemp_req1.path);
- rmdir(mkdtemp_req2.path);
- uv_fs_req_cleanup(&mkdtemp_req1);
- uv_fs_req_cleanup(&mkdtemp_req2);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(fs_fstat) {
- int r;
- uv_fs_t req;
- uv_file file;
- uv_stat_t* s;
-#ifndef _WIN32
- struct stat t;
-#endif
-
- /* Setup. */
- unlink("test_file");
-
- loop = uv_default_loop();
-
- r = uv_fs_open(NULL, &req, "test_file", O_RDWR | O_CREAT,
- S_IWUSR | S_IRUSR, NULL);
- ASSERT(r >= 0);
- ASSERT(req.result >= 0);
- file = req.result;
- uv_fs_req_cleanup(&req);
-
- iov = uv_buf_init(test_buf, sizeof(test_buf));
- r = uv_fs_write(NULL, &req, file, &iov, 1, -1, NULL);
- ASSERT(r == sizeof(test_buf));
- ASSERT(req.result == sizeof(test_buf));
- uv_fs_req_cleanup(&req);
-
- r = uv_fs_fstat(NULL, &req, file, NULL);
- ASSERT(r == 0);
- ASSERT(req.result == 0);
- s = req.ptr;
- ASSERT(s->st_size == sizeof(test_buf));
-
-#ifndef _WIN32
- r = fstat(file, &t);
- ASSERT(r == 0);
-
- ASSERT(s->st_dev == (uint64_t) t.st_dev);
- ASSERT(s->st_mode == (uint64_t) t.st_mode);
- ASSERT(s->st_nlink == (uint64_t) t.st_nlink);
- ASSERT(s->st_uid == (uint64_t) t.st_uid);
- ASSERT(s->st_gid == (uint64_t) t.st_gid);
- ASSERT(s->st_rdev == (uint64_t) t.st_rdev);
- ASSERT(s->st_ino == (uint64_t) t.st_ino);
- ASSERT(s->st_size == (uint64_t) t.st_size);
- ASSERT(s->st_blksize == (uint64_t) t.st_blksize);
- ASSERT(s->st_blocks == (uint64_t) t.st_blocks);
-#if defined(__APPLE__)
- ASSERT(s->st_atim.tv_sec == t.st_atimespec.tv_sec);
- ASSERT(s->st_atim.tv_nsec == t.st_atimespec.tv_nsec);
- ASSERT(s->st_mtim.tv_sec == t.st_mtimespec.tv_sec);
- ASSERT(s->st_mtim.tv_nsec == t.st_mtimespec.tv_nsec);
- ASSERT(s->st_ctim.tv_sec == t.st_ctimespec.tv_sec);
- ASSERT(s->st_ctim.tv_nsec == t.st_ctimespec.tv_nsec);
- ASSERT(s->st_birthtim.tv_sec == t.st_birthtimespec.tv_sec);
- ASSERT(s->st_birthtim.tv_nsec == t.st_birthtimespec.tv_nsec);
- ASSERT(s->st_flags == t.st_flags);
- ASSERT(s->st_gen == t.st_gen);
-#elif defined(_AIX)
- ASSERT(s->st_atim.tv_sec == t.st_atime);
- ASSERT(s->st_atim.tv_nsec == 0);
- ASSERT(s->st_mtim.tv_sec == t.st_mtime);
- ASSERT(s->st_mtim.tv_nsec == 0);
- ASSERT(s->st_ctim.tv_sec == t.st_ctime);
- ASSERT(s->st_ctim.tv_nsec == 0);
-#elif defined(__sun) || \
- defined(_BSD_SOURCE) || \
- defined(_SVID_SOURCE) || \
- defined(_XOPEN_SOURCE) || \
- defined(_DEFAULT_SOURCE)
- ASSERT(s->st_atim.tv_sec == t.st_atim.tv_sec);
- ASSERT(s->st_atim.tv_nsec == t.st_atim.tv_nsec);
- ASSERT(s->st_mtim.tv_sec == t.st_mtim.tv_sec);
- ASSERT(s->st_mtim.tv_nsec == t.st_mtim.tv_nsec);
- ASSERT(s->st_ctim.tv_sec == t.st_ctim.tv_sec);
- ASSERT(s->st_ctim.tv_nsec == t.st_ctim.tv_nsec);
-# if defined(__DragonFly__) || \
- defined(__FreeBSD__) || \
- defined(__OpenBSD__) || \
- defined(__NetBSD__)
- ASSERT(s->st_birthtim.tv_sec == t.st_birthtim.tv_sec);
- ASSERT(s->st_birthtim.tv_nsec == t.st_birthtim.tv_nsec);
- ASSERT(s->st_flags == t.st_flags);
- ASSERT(s->st_gen == t.st_gen);
-# endif
-#else
- ASSERT(s->st_atim.tv_sec == t.st_atime);
- ASSERT(s->st_atim.tv_nsec == 0);
- ASSERT(s->st_mtim.tv_sec == t.st_mtime);
- ASSERT(s->st_mtim.tv_nsec == 0);
- ASSERT(s->st_ctim.tv_sec == t.st_ctime);
- ASSERT(s->st_ctim.tv_nsec == 0);
-#endif
-#endif
-
- uv_fs_req_cleanup(&req);
-
- /* Now do the uv_fs_fstat call asynchronously */
- r = uv_fs_fstat(loop, &req, file, fstat_cb);
- ASSERT(r == 0);
- uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(fstat_cb_count == 1);
-
-
- r = uv_fs_close(NULL, &req, file, NULL);
- ASSERT(r == 0);
- ASSERT(req.result == 0);
- uv_fs_req_cleanup(&req);
-
- /*
- * Run the loop just to check we don't have make any extraneous uv_ref()
- * calls. This should drop out immediately.
- */
- uv_run(loop, UV_RUN_DEFAULT);
-
- /* Cleanup. */
- unlink("test_file");
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(fs_access) {
- int r;
- uv_fs_t req;
- uv_file file;
-
- /* Setup. */
- unlink("test_file");
- rmdir("test_dir");
-
- loop = uv_default_loop();
-
- /* File should not exist */
- r = uv_fs_access(NULL, &req, "test_file", F_OK, NULL);
- ASSERT(r < 0);
- ASSERT(req.result < 0);
- uv_fs_req_cleanup(&req);
-
- /* File should not exist */
- r = uv_fs_access(loop, &req, "test_file", F_OK, access_cb);
- ASSERT(r == 0);
- uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(access_cb_count == 1);
- access_cb_count = 0; /* reset for the next test */
-
- /* Create file */
- r = uv_fs_open(NULL, &req, "test_file", O_RDWR | O_CREAT,
- S_IWUSR | S_IRUSR, NULL);
- ASSERT(r >= 0);
- ASSERT(req.result >= 0);
- file = req.result;
- uv_fs_req_cleanup(&req);
-
- /* File should exist */
- r = uv_fs_access(NULL, &req, "test_file", F_OK, NULL);
- ASSERT(r == 0);
- ASSERT(req.result == 0);
- uv_fs_req_cleanup(&req);
-
- /* File should exist */
- r = uv_fs_access(loop, &req, "test_file", F_OK, access_cb);
- ASSERT(r == 0);
- uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(access_cb_count == 1);
- access_cb_count = 0; /* reset for the next test */
-
- /* Close file */
- r = uv_fs_close(NULL, &req, file, NULL);
- ASSERT(r == 0);
- ASSERT(req.result == 0);
- uv_fs_req_cleanup(&req);
-
- /* Directory access */
- r = uv_fs_mkdir(NULL, &req, "test_dir", 0777, NULL);
- ASSERT(r == 0);
- uv_fs_req_cleanup(&req);
-
- r = uv_fs_access(NULL, &req, "test_dir", W_OK, NULL);
- ASSERT(r == 0);
- ASSERT(req.result == 0);
- uv_fs_req_cleanup(&req);
-
- /*
- * Run the loop just to check we don't have make any extraneous uv_ref()
- * calls. This should drop out immediately.
- */
- uv_run(loop, UV_RUN_DEFAULT);
-
- /* Cleanup. */
- unlink("test_file");
- rmdir("test_dir");
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(fs_chmod) {
- int r;
- uv_fs_t req;
- uv_file file;
-
- /* Setup. */
- unlink("test_file");
-
- loop = uv_default_loop();
-
- r = uv_fs_open(NULL, &req, "test_file", O_RDWR | O_CREAT,
- S_IWUSR | S_IRUSR, NULL);
- ASSERT(r >= 0);
- ASSERT(req.result >= 0);
- file = req.result;
- uv_fs_req_cleanup(&req);
-
- iov = uv_buf_init(test_buf, sizeof(test_buf));
- r = uv_fs_write(NULL, &req, file, &iov, 1, -1, NULL);
- ASSERT(r == sizeof(test_buf));
- ASSERT(req.result == sizeof(test_buf));
- uv_fs_req_cleanup(&req);
-
-#ifndef _WIN32
- /* Make the file write-only */
- r = uv_fs_chmod(NULL, &req, "test_file", 0200, NULL);
- ASSERT(r == 0);
- ASSERT(req.result == 0);
- uv_fs_req_cleanup(&req);
-
- check_permission("test_file", 0200);
-#endif
-
- /* Make the file read-only */
- r = uv_fs_chmod(NULL, &req, "test_file", 0400, NULL);
- ASSERT(r == 0);
- ASSERT(req.result == 0);
- uv_fs_req_cleanup(&req);
-
- check_permission("test_file", 0400);
-
- /* Make the file read+write with sync uv_fs_fchmod */
- r = uv_fs_fchmod(NULL, &req, file, 0600, NULL);
- ASSERT(r == 0);
- ASSERT(req.result == 0);
- uv_fs_req_cleanup(&req);
-
- check_permission("test_file", 0600);
-
-#ifndef _WIN32
- /* async chmod */
- {
- static int mode = 0200;
- req.data = &mode;
- }
- r = uv_fs_chmod(loop, &req, "test_file", 0200, chmod_cb);
- ASSERT(r == 0);
- uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(chmod_cb_count == 1);
- chmod_cb_count = 0; /* reset for the next test */
-#endif
-
- /* async chmod */
- {
- static int mode = 0400;
- req.data = &mode;
- }
- r = uv_fs_chmod(loop, &req, "test_file", 0400, chmod_cb);
- ASSERT(r == 0);
- uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(chmod_cb_count == 1);
-
- /* async fchmod */
- {
- static int mode = 0600;
- req.data = &mode;
- }
- r = uv_fs_fchmod(loop, &req, file, 0600, fchmod_cb);
- ASSERT(r == 0);
- uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(fchmod_cb_count == 1);
-
- close(file);
-
- /*
- * Run the loop just to check we don't have make any extraneous uv_ref()
- * calls. This should drop out immediately.
- */
- uv_run(loop, UV_RUN_DEFAULT);
-
- /* Cleanup. */
- unlink("test_file");
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(fs_unlink_readonly) {
- int r;
- uv_fs_t req;
- uv_file file;
-
- /* Setup. */
- unlink("test_file");
-
- loop = uv_default_loop();
-
- r = uv_fs_open(NULL,
- &req,
- "test_file",
- O_RDWR | O_CREAT,
- S_IWUSR | S_IRUSR,
- NULL);
- ASSERT(r >= 0);
- ASSERT(req.result >= 0);
- file = req.result;
- uv_fs_req_cleanup(&req);
-
- iov = uv_buf_init(test_buf, sizeof(test_buf));
- r = uv_fs_write(NULL, &req, file, &iov, 1, -1, NULL);
- ASSERT(r == sizeof(test_buf));
- ASSERT(req.result == sizeof(test_buf));
- uv_fs_req_cleanup(&req);
-
- close(file);
-
- /* Make the file read-only */
- r = uv_fs_chmod(NULL, &req, "test_file", 0400, NULL);
- ASSERT(r == 0);
- ASSERT(req.result == 0);
- uv_fs_req_cleanup(&req);
-
- check_permission("test_file", 0400);
-
- /* Try to unlink the file */
- r = uv_fs_unlink(NULL, &req, "test_file", NULL);
- ASSERT(r == 0);
- ASSERT(req.result == 0);
- uv_fs_req_cleanup(&req);
-
- /*
- * Run the loop just to check we don't have make any extraneous uv_ref()
- * calls. This should drop out immediately.
- */
- uv_run(loop, UV_RUN_DEFAULT);
-
- /* Cleanup. */
- uv_fs_chmod(NULL, &req, "test_file", 0600, NULL);
- uv_fs_req_cleanup(&req);
- unlink("test_file");
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(fs_chown) {
- int r;
- uv_fs_t req;
- uv_file file;
-
- /* Setup. */
- unlink("test_file");
-
- loop = uv_default_loop();
-
- r = uv_fs_open(NULL, &req, "test_file", O_RDWR | O_CREAT,
- S_IWUSR | S_IRUSR, NULL);
- ASSERT(r >= 0);
- ASSERT(req.result >= 0);
- file = req.result;
- uv_fs_req_cleanup(&req);
-
- /* sync chown */
- r = uv_fs_chown(NULL, &req, "test_file", -1, -1, NULL);
- ASSERT(r == 0);
- ASSERT(req.result == 0);
- uv_fs_req_cleanup(&req);
-
- /* sync fchown */
- r = uv_fs_fchown(NULL, &req, file, -1, -1, NULL);
- ASSERT(r == 0);
- ASSERT(req.result == 0);
- uv_fs_req_cleanup(&req);
-
- /* async chown */
- r = uv_fs_chown(loop, &req, "test_file", -1, -1, chown_cb);
- ASSERT(r == 0);
- uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(chown_cb_count == 1);
-
- /* chown to root (fail) */
- chown_cb_count = 0;
- r = uv_fs_chown(loop, &req, "test_file", 0, 0, chown_root_cb);
- uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(chown_cb_count == 1);
-
- /* async fchown */
- r = uv_fs_fchown(loop, &req, file, -1, -1, fchown_cb);
- ASSERT(r == 0);
- uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(fchown_cb_count == 1);
-
- close(file);
-
- /*
- * Run the loop just to check we don't have make any extraneous uv_ref()
- * calls. This should drop out immediately.
- */
- uv_run(loop, UV_RUN_DEFAULT);
-
- /* Cleanup. */
- unlink("test_file");
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(fs_link) {
- int r;
- uv_fs_t req;
- uv_file file;
- uv_file link;
-
- /* Setup. */
- unlink("test_file");
- unlink("test_file_link");
- unlink("test_file_link2");
-
- loop = uv_default_loop();
-
- r = uv_fs_open(NULL, &req, "test_file", O_RDWR | O_CREAT,
- S_IWUSR | S_IRUSR, NULL);
- ASSERT(r >= 0);
- ASSERT(req.result >= 0);
- file = req.result;
- uv_fs_req_cleanup(&req);
-
- iov = uv_buf_init(test_buf, sizeof(test_buf));
- r = uv_fs_write(NULL, &req, file, &iov, 1, -1, NULL);
- ASSERT(r == sizeof(test_buf));
- ASSERT(req.result == sizeof(test_buf));
- uv_fs_req_cleanup(&req);
-
- close(file);
-
- /* sync link */
- r = uv_fs_link(NULL, &req, "test_file", "test_file_link", NULL);
- ASSERT(r == 0);
- ASSERT(req.result == 0);
- uv_fs_req_cleanup(&req);
-
- r = uv_fs_open(NULL, &req, "test_file_link", O_RDWR, 0, NULL);
- ASSERT(r >= 0);
- ASSERT(req.result >= 0);
- link = req.result;
- uv_fs_req_cleanup(&req);
-
- memset(buf, 0, sizeof(buf));
- iov = uv_buf_init(buf, sizeof(buf));
- r = uv_fs_read(NULL, &req, link, &iov, 1, 0, NULL);
- ASSERT(r >= 0);
- ASSERT(req.result >= 0);
- ASSERT(strcmp(buf, test_buf) == 0);
-
- close(link);
-
- /* async link */
- r = uv_fs_link(loop, &req, "test_file", "test_file_link2", link_cb);
- ASSERT(r == 0);
- uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(link_cb_count == 1);
-
- r = uv_fs_open(NULL, &req, "test_file_link2", O_RDWR, 0, NULL);
- ASSERT(r >= 0);
- ASSERT(req.result >= 0);
- link = req.result;
- uv_fs_req_cleanup(&req);
-
- memset(buf, 0, sizeof(buf));
- iov = uv_buf_init(buf, sizeof(buf));
- r = uv_fs_read(NULL, &req, link, &iov, 1, 0, NULL);
- ASSERT(r >= 0);
- ASSERT(req.result >= 0);
- ASSERT(strcmp(buf, test_buf) == 0);
-
- close(link);
-
- /*
- * Run the loop just to check we don't have make any extraneous uv_ref()
- * calls. This should drop out immediately.
- */
- uv_run(loop, UV_RUN_DEFAULT);
-
- /* Cleanup. */
- unlink("test_file");
- unlink("test_file_link");
- unlink("test_file_link2");
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(fs_readlink) {
- uv_fs_t req;
-
- loop = uv_default_loop();
- ASSERT(0 == uv_fs_readlink(loop, &req, "no_such_file", dummy_cb));
- ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
- ASSERT(dummy_cb_count == 1);
- ASSERT(req.ptr == NULL);
- ASSERT(req.result == UV_ENOENT);
- uv_fs_req_cleanup(&req);
-
- ASSERT(UV_ENOENT == uv_fs_readlink(NULL, &req, "no_such_file", NULL));
- ASSERT(req.ptr == NULL);
- ASSERT(req.result == UV_ENOENT);
- uv_fs_req_cleanup(&req);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(fs_realpath) {
- uv_fs_t req;
-
- loop = uv_default_loop();
- ASSERT(0 == uv_fs_realpath(loop, &req, "no_such_file", dummy_cb));
- ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
- ASSERT(dummy_cb_count == 1);
- ASSERT(req.ptr == NULL);
-#ifdef _WIN32
- /*
- * Windows XP and Server 2003 don't support GetFinalPathNameByHandleW()
- */
- if (req.result == UV_ENOSYS) {
- uv_fs_req_cleanup(&req);
- RETURN_SKIP("realpath is not supported on Windows XP");
- }
-#endif
- ASSERT(req.result == UV_ENOENT);
- uv_fs_req_cleanup(&req);
-
- ASSERT(UV_ENOENT == uv_fs_realpath(NULL, &req, "no_such_file", NULL));
- ASSERT(req.ptr == NULL);
- ASSERT(req.result == UV_ENOENT);
- uv_fs_req_cleanup(&req);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(fs_symlink) {
- int r;
- uv_fs_t req;
- uv_file file;
- uv_file link;
- char test_file_abs_buf[PATHMAX];
- size_t test_file_abs_size;
-
- /* Setup. */
- unlink("test_file");
- unlink("test_file_symlink");
- unlink("test_file_symlink2");
- unlink("test_file_symlink_symlink");
- unlink("test_file_symlink2_symlink");
- test_file_abs_size = sizeof(test_file_abs_buf);
-#ifdef _WIN32
- uv_cwd(test_file_abs_buf, &test_file_abs_size);
- strcat(test_file_abs_buf, "\\test_file");
-#else
- uv_cwd(test_file_abs_buf, &test_file_abs_size);
- strcat(test_file_abs_buf, "/test_file");
-#endif
-
- loop = uv_default_loop();
-
- r = uv_fs_open(NULL, &req, "test_file", O_RDWR | O_CREAT,
- S_IWUSR | S_IRUSR, NULL);
- ASSERT(r >= 0);
- ASSERT(req.result >= 0);
- file = req.result;
- uv_fs_req_cleanup(&req);
-
- iov = uv_buf_init(test_buf, sizeof(test_buf));
- r = uv_fs_write(NULL, &req, file, &iov, 1, -1, NULL);
- ASSERT(r == sizeof(test_buf));
- ASSERT(req.result == sizeof(test_buf));
- uv_fs_req_cleanup(&req);
-
- close(file);
-
- /* sync symlink */
- r = uv_fs_symlink(NULL, &req, "test_file", "test_file_symlink", 0, NULL);
-#ifdef _WIN32
- if (r < 0) {
- if (r == UV_ENOTSUP) {
- /*
- * Windows doesn't support symlinks on older versions.
- * We just pass the test and bail out early if we get ENOTSUP.
- */
- return 0;
- } else if (r == UV_EPERM) {
- /*
- * Creating a symlink is only allowed when running elevated.
- * We pass the test and bail out early if we get UV_EPERM.
- */
- return 0;
- }
- }
-#endif
- ASSERT(r == 0);
- ASSERT(req.result == 0);
- uv_fs_req_cleanup(&req);
-
- r = uv_fs_open(NULL, &req, "test_file_symlink", O_RDWR, 0, NULL);
- ASSERT(r >= 0);
- ASSERT(req.result >= 0);
- link = req.result;
- uv_fs_req_cleanup(&req);
-
- memset(buf, 0, sizeof(buf));
- iov = uv_buf_init(buf, sizeof(buf));
- r = uv_fs_read(NULL, &req, link, &iov, 1, 0, NULL);
- ASSERT(r >= 0);
- ASSERT(req.result >= 0);
- ASSERT(strcmp(buf, test_buf) == 0);
-
- close(link);
-
- r = uv_fs_symlink(NULL,
- &req,
- "test_file_symlink",
- "test_file_symlink_symlink",
- 0,
- NULL);
- ASSERT(r == 0);
- uv_fs_req_cleanup(&req);
-
- r = uv_fs_readlink(NULL, &req, "test_file_symlink_symlink", NULL);
- ASSERT(r == 0);
- ASSERT(strcmp(req.ptr, "test_file_symlink") == 0);
- uv_fs_req_cleanup(&req);
-
- r = uv_fs_realpath(NULL, &req, "test_file_symlink_symlink", NULL);
-#ifdef _WIN32
- /*
- * Windows XP and Server 2003 don't support GetFinalPathNameByHandleW()
- */
- if (r == UV_ENOSYS) {
- uv_fs_req_cleanup(&req);
- RETURN_SKIP("realpath is not supported on Windows XP");
- }
-#endif
- ASSERT(r == 0);
-#ifdef _WIN32
- ASSERT(stricmp(req.ptr, test_file_abs_buf) == 0);
-#else
- ASSERT(strcmp(req.ptr, test_file_abs_buf) == 0);
-#endif
- uv_fs_req_cleanup(&req);
-
- /* async link */
- r = uv_fs_symlink(loop,
- &req,
- "test_file",
- "test_file_symlink2",
- 0,
- symlink_cb);
- ASSERT(r == 0);
- uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(symlink_cb_count == 1);
-
- r = uv_fs_open(NULL, &req, "test_file_symlink2", O_RDWR, 0, NULL);
- ASSERT(r >= 0);
- ASSERT(req.result >= 0);
- link = req.result;
- uv_fs_req_cleanup(&req);
-
- memset(buf, 0, sizeof(buf));
- iov = uv_buf_init(buf, sizeof(buf));
- r = uv_fs_read(NULL, &req, link, &iov, 1, 0, NULL);
- ASSERT(r >= 0);
- ASSERT(req.result >= 0);
- ASSERT(strcmp(buf, test_buf) == 0);
-
- close(link);
-
- r = uv_fs_symlink(NULL,
- &req,
- "test_file_symlink2",
- "test_file_symlink2_symlink",
- 0,
- NULL);
- ASSERT(r == 0);
- uv_fs_req_cleanup(&req);
-
- r = uv_fs_readlink(loop, &req, "test_file_symlink2_symlink", readlink_cb);
- ASSERT(r == 0);
- uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(readlink_cb_count == 1);
-
- r = uv_fs_realpath(loop, &req, "test_file", realpath_cb);
-#ifdef _WIN32
- /*
- * Windows XP and Server 2003 don't support GetFinalPathNameByHandleW()
- */
- if (r == UV_ENOSYS) {
- uv_fs_req_cleanup(&req);
- RETURN_SKIP("realpath is not supported on Windows XP");
- }
-#endif
- ASSERT(r == 0);
- uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(realpath_cb_count == 1);
-
- /*
- * Run the loop just to check we don't have make any extraneous uv_ref()
- * calls. This should drop out immediately.
- */
- uv_run(loop, UV_RUN_DEFAULT);
-
- /* Cleanup. */
- unlink("test_file");
- unlink("test_file_symlink");
- unlink("test_file_symlink_symlink");
- unlink("test_file_symlink2");
- unlink("test_file_symlink2_symlink");
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(fs_symlink_dir) {
- uv_fs_t req;
- int r;
- char* test_dir;
- uv_dirent_t dent;
- static char test_dir_abs_buf[PATHMAX];
- size_t test_dir_abs_size;
-
- /* set-up */
- unlink("test_dir/file1");
- unlink("test_dir/file2");
- rmdir("test_dir");
- rmdir("test_dir_symlink");
- test_dir_abs_size = sizeof(test_dir_abs_buf);
-
- loop = uv_default_loop();
-
- uv_fs_mkdir(NULL, &req, "test_dir", 0777, NULL);
- uv_fs_req_cleanup(&req);
-
-#ifdef _WIN32
- strcpy(test_dir_abs_buf, "\\\\?\\");
- uv_cwd(test_dir_abs_buf + 4, &test_dir_abs_size);
- test_dir_abs_size += 4;
- strcat(test_dir_abs_buf, "\\test_dir\\");
- test_dir_abs_size += strlen("\\test_dir\\");
- test_dir = test_dir_abs_buf;
-#else
- uv_cwd(test_dir_abs_buf, &test_dir_abs_size);
- strcat(test_dir_abs_buf, "/test_dir");
- test_dir_abs_size += strlen("/test_dir");
- test_dir = "test_dir";
-#endif
-
- r = uv_fs_symlink(NULL, &req, test_dir, "test_dir_symlink",
- UV_FS_SYMLINK_JUNCTION, NULL);
- fprintf(stderr, "r == %i\n", r);
- ASSERT(r == 0);
- ASSERT(req.result == 0);
- uv_fs_req_cleanup(&req);
-
- r = uv_fs_stat(NULL, &req, "test_dir_symlink", NULL);
- ASSERT(r == 0);
- ASSERT(((uv_stat_t*)req.ptr)->st_mode & S_IFDIR);
- uv_fs_req_cleanup(&req);
-
- r = uv_fs_lstat(NULL, &req, "test_dir_symlink", NULL);
- ASSERT(r == 0);
- ASSERT(((uv_stat_t*)req.ptr)->st_mode & S_IFLNK);
-#ifdef _WIN32
- ASSERT(((uv_stat_t*)req.ptr)->st_size == strlen(test_dir + 4));
-#else
- ASSERT(((uv_stat_t*)req.ptr)->st_size == strlen(test_dir));
-#endif
- uv_fs_req_cleanup(&req);
-
- r = uv_fs_readlink(NULL, &req, "test_dir_symlink", NULL);
- ASSERT(r == 0);
-#ifdef _WIN32
- ASSERT(strcmp(req.ptr, test_dir + 4) == 0);
-#else
- ASSERT(strcmp(req.ptr, test_dir) == 0);
-#endif
- uv_fs_req_cleanup(&req);
-
- r = uv_fs_realpath(NULL, &req, "test_dir_symlink", NULL);
-#ifdef _WIN32
- /*
- * Windows XP and Server 2003 don't support GetFinalPathNameByHandleW()
- */
- if (r == UV_ENOSYS) {
- uv_fs_req_cleanup(&req);
- RETURN_SKIP("realpath is not supported on Windows XP");
- }
-#endif
- ASSERT(r == 0);
-#ifdef _WIN32
- ASSERT(strlen(req.ptr) == test_dir_abs_size - 5);
- ASSERT(strnicmp(req.ptr, test_dir + 4, test_dir_abs_size - 5) == 0);
-#else
- ASSERT(strcmp(req.ptr, test_dir_abs_buf) == 0);
-#endif
- uv_fs_req_cleanup(&req);
-
- r = uv_fs_open(NULL, &open_req1, "test_dir/file1", O_WRONLY | O_CREAT,
- S_IWUSR | S_IRUSR, NULL);
- ASSERT(r >= 0);
- uv_fs_req_cleanup(&open_req1);
- r = uv_fs_close(NULL, &close_req, open_req1.result, NULL);
- ASSERT(r == 0);
- uv_fs_req_cleanup(&close_req);
-
- r = uv_fs_open(NULL, &open_req1, "test_dir/file2", O_WRONLY | O_CREAT,
- S_IWUSR | S_IRUSR, NULL);
- ASSERT(r >= 0);
- uv_fs_req_cleanup(&open_req1);
- r = uv_fs_close(NULL, &close_req, open_req1.result, NULL);
- ASSERT(r == 0);
- uv_fs_req_cleanup(&close_req);
-
- r = uv_fs_scandir(NULL, &scandir_req, "test_dir_symlink", 0, NULL);
- ASSERT(r == 2);
- ASSERT(scandir_req.result == 2);
- ASSERT(scandir_req.ptr);
- while (UV_EOF != uv_fs_scandir_next(&scandir_req, &dent)) {
- ASSERT(strcmp(dent.name, "file1") == 0 || strcmp(dent.name, "file2") == 0);
- assert_is_file_type(dent);
- }
- uv_fs_req_cleanup(&scandir_req);
- ASSERT(!scandir_req.ptr);
-
- /* unlink will remove the directory symlink */
- r = uv_fs_unlink(NULL, &req, "test_dir_symlink", NULL);
- ASSERT(r == 0);
- uv_fs_req_cleanup(&req);
-
- r = uv_fs_scandir(NULL, &scandir_req, "test_dir_symlink", 0, NULL);
- ASSERT(r == UV_ENOENT);
- uv_fs_req_cleanup(&scandir_req);
-
- r = uv_fs_scandir(NULL, &scandir_req, "test_dir", 0, NULL);
- ASSERT(r == 2);
- ASSERT(scandir_req.result == 2);
- ASSERT(scandir_req.ptr);
- while (UV_EOF != uv_fs_scandir_next(&scandir_req, &dent)) {
- ASSERT(strcmp(dent.name, "file1") == 0 || strcmp(dent.name, "file2") == 0);
- assert_is_file_type(dent);
- }
- uv_fs_req_cleanup(&scandir_req);
- ASSERT(!scandir_req.ptr);
-
- /* clean-up */
- unlink("test_dir/file1");
- unlink("test_dir/file2");
- rmdir("test_dir");
- rmdir("test_dir_symlink");
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(fs_utime) {
- utime_check_t checkme;
- const char* path = "test_file";
- double atime;
- double mtime;
- uv_fs_t req;
- int r;
-
- /* Setup. */
- loop = uv_default_loop();
- unlink(path);
- r = uv_fs_open(NULL, &req, path, O_RDWR | O_CREAT, S_IWUSR | S_IRUSR, NULL);
- ASSERT(r >= 0);
- ASSERT(req.result >= 0);
- uv_fs_req_cleanup(&req);
- close(r);
-
- atime = mtime = 400497753; /* 1982-09-10 11:22:33 */
-
- r = uv_fs_utime(NULL, &req, path, atime, mtime, NULL);
- ASSERT(r == 0);
- ASSERT(req.result == 0);
- uv_fs_req_cleanup(&req);
-
- r = uv_fs_stat(NULL, &req, path, NULL);
- ASSERT(r == 0);
- ASSERT(req.result == 0);
- check_utime(path, atime, mtime);
- uv_fs_req_cleanup(&req);
-
- atime = mtime = 1291404900; /* 2010-12-03 20:35:00 - mees <3 */
- checkme.path = path;
- checkme.atime = atime;
- checkme.mtime = mtime;
-
- /* async utime */
- utime_req.data = &checkme;
- r = uv_fs_utime(loop, &utime_req, path, atime, mtime, utime_cb);
- ASSERT(r == 0);
- uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(utime_cb_count == 1);
-
- /* Cleanup. */
- unlink(path);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-#ifdef _WIN32
-TEST_IMPL(fs_stat_root) {
- int r;
- uv_loop_t* loop = uv_default_loop();
-
- r = uv_fs_stat(NULL, &stat_req, "\\", NULL);
- ASSERT(r == 0);
-
- r = uv_fs_stat(NULL, &stat_req, "..\\..\\..\\..\\..\\..\\..", NULL);
- ASSERT(r == 0);
-
- r = uv_fs_stat(NULL, &stat_req, "..", NULL);
- ASSERT(r == 0);
-
- r = uv_fs_stat(NULL, &stat_req, "..\\", NULL);
- ASSERT(r == 0);
-
- /* stats the current directory on c: */
- r = uv_fs_stat(NULL, &stat_req, "c:", NULL);
- ASSERT(r == 0);
-
- r = uv_fs_stat(NULL, &stat_req, "c:\\", NULL);
- ASSERT(r == 0);
-
- r = uv_fs_stat(NULL, &stat_req, "\\\\?\\C:\\", NULL);
- ASSERT(r == 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-#endif
-
-
-TEST_IMPL(fs_futime) {
- utime_check_t checkme;
- const char* path = "test_file";
- double atime;
- double mtime;
- uv_file file;
- uv_fs_t req;
- int r;
-
- /* Setup. */
- loop = uv_default_loop();
- unlink(path);
- r = uv_fs_open(NULL, &req, path, O_RDWR | O_CREAT, S_IWUSR | S_IRUSR, NULL);
- ASSERT(r >= 0);
- ASSERT(req.result >= 0);
- uv_fs_req_cleanup(&req);
- close(r);
-
- atime = mtime = 400497753; /* 1982-09-10 11:22:33 */
-
- r = uv_fs_open(NULL, &req, path, O_RDWR, 0, NULL);
- ASSERT(r >= 0);
- ASSERT(req.result >= 0);
- file = req.result; /* FIXME probably not how it's supposed to be used */
- uv_fs_req_cleanup(&req);
-
- r = uv_fs_futime(NULL, &req, file, atime, mtime, NULL);
- ASSERT(r == 0);
- ASSERT(req.result == 0);
- uv_fs_req_cleanup(&req);
-
- r = uv_fs_stat(NULL, &req, path, NULL);
- ASSERT(r == 0);
- ASSERT(req.result == 0);
- check_utime(path, atime, mtime);
- uv_fs_req_cleanup(&req);
-
- atime = mtime = 1291404900; /* 2010-12-03 20:35:00 - mees <3 */
-
- checkme.atime = atime;
- checkme.mtime = mtime;
- checkme.path = path;
-
- /* async futime */
- futime_req.data = &checkme;
- r = uv_fs_futime(loop, &futime_req, file, atime, mtime, futime_cb);
- ASSERT(r == 0);
- uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(futime_cb_count == 1);
-
- /* Cleanup. */
- unlink(path);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(fs_stat_missing_path) {
- uv_fs_t req;
- int r;
-
- loop = uv_default_loop();
-
- r = uv_fs_stat(NULL, &req, "non_existent_file", NULL);
- ASSERT(r == UV_ENOENT);
- ASSERT(req.result == UV_ENOENT);
- uv_fs_req_cleanup(&req);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(fs_scandir_empty_dir) {
- const char* path;
- uv_fs_t req;
- uv_dirent_t dent;
- int r;
-
- path = "./empty_dir/";
- loop = uv_default_loop();
-
- uv_fs_mkdir(NULL, &req, path, 0777, NULL);
- uv_fs_req_cleanup(&req);
-
- /* Fill the req to ensure that required fields are cleaned up */
- memset(&req, 0xdb, sizeof(req));
-
- r = uv_fs_scandir(NULL, &req, path, 0, NULL);
- ASSERT(r == 0);
- ASSERT(req.result == 0);
- ASSERT(req.ptr == NULL);
- ASSERT(UV_EOF == uv_fs_scandir_next(&req, &dent));
- uv_fs_req_cleanup(&req);
-
- r = uv_fs_scandir(loop, &scandir_req, path, 0, empty_scandir_cb);
- ASSERT(r == 0);
-
- ASSERT(scandir_cb_count == 0);
- uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(scandir_cb_count == 1);
-
- uv_fs_rmdir(NULL, &req, path, NULL);
- uv_fs_req_cleanup(&req);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(fs_scandir_file) {
- const char* path;
- int r;
-
- path = "test/fixtures/empty_file";
- loop = uv_default_loop();
-
- r = uv_fs_scandir(NULL, &scandir_req, path, 0, NULL);
- ASSERT(r == UV_ENOTDIR);
- uv_fs_req_cleanup(&scandir_req);
-
- r = uv_fs_scandir(loop, &scandir_req, path, 0, file_scandir_cb);
- ASSERT(r == 0);
-
- ASSERT(scandir_cb_count == 0);
- uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(scandir_cb_count == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(fs_open_dir) {
- const char* path;
- uv_fs_t req;
- int r, file;
-
- path = ".";
- loop = uv_default_loop();
-
- r = uv_fs_open(NULL, &req, path, O_RDONLY, 0, NULL);
- ASSERT(r >= 0);
- ASSERT(req.result >= 0);
- ASSERT(req.ptr == NULL);
- file = r;
- uv_fs_req_cleanup(&req);
-
- r = uv_fs_close(NULL, &req, file, NULL);
- ASSERT(r == 0);
-
- r = uv_fs_open(loop, &req, path, O_RDONLY, 0, open_cb_simple);
- ASSERT(r == 0);
-
- ASSERT(open_cb_count == 0);
- uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(open_cb_count == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(fs_file_open_append) {
- int r;
-
- /* Setup. */
- unlink("test_file");
-
- loop = uv_default_loop();
-
- r = uv_fs_open(NULL, &open_req1, "test_file", O_WRONLY | O_CREAT,
- S_IWUSR | S_IRUSR, NULL);
- ASSERT(r >= 0);
- ASSERT(open_req1.result >= 0);
- uv_fs_req_cleanup(&open_req1);
-
- iov = uv_buf_init(test_buf, sizeof(test_buf));
- r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, -1, NULL);
- ASSERT(r >= 0);
- ASSERT(write_req.result >= 0);
- uv_fs_req_cleanup(&write_req);
-
- r = uv_fs_close(NULL, &close_req, open_req1.result, NULL);
- ASSERT(r == 0);
- ASSERT(close_req.result == 0);
- uv_fs_req_cleanup(&close_req);
-
- r = uv_fs_open(NULL, &open_req1, "test_file", O_RDWR | O_APPEND, 0, NULL);
- ASSERT(r >= 0);
- ASSERT(open_req1.result >= 0);
- uv_fs_req_cleanup(&open_req1);
-
- iov = uv_buf_init(test_buf, sizeof(test_buf));
- r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, -1, NULL);
- ASSERT(r >= 0);
- ASSERT(write_req.result >= 0);
- uv_fs_req_cleanup(&write_req);
-
- r = uv_fs_close(NULL, &close_req, open_req1.result, NULL);
- ASSERT(r == 0);
- ASSERT(close_req.result == 0);
- uv_fs_req_cleanup(&close_req);
-
- r = uv_fs_open(NULL, &open_req1, "test_file", O_RDONLY, S_IRUSR, NULL);
- ASSERT(r >= 0);
- ASSERT(open_req1.result >= 0);
- uv_fs_req_cleanup(&open_req1);
-
- iov = uv_buf_init(buf, sizeof(buf));
- r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, -1, NULL);
- printf("read = %d\n", r);
- ASSERT(r == 26);
- ASSERT(read_req.result == 26);
- ASSERT(memcmp(buf,
- "test-buffer\n\0test-buffer\n\0",
- sizeof("test-buffer\n\0test-buffer\n\0") - 1) == 0);
- uv_fs_req_cleanup(&read_req);
-
- r = uv_fs_close(NULL, &close_req, open_req1.result, NULL);
- ASSERT(r == 0);
- ASSERT(close_req.result == 0);
- uv_fs_req_cleanup(&close_req);
-
- /* Cleanup */
- unlink("test_file");
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(fs_rename_to_existing_file) {
- int r;
-
- /* Setup. */
- unlink("test_file");
- unlink("test_file2");
-
- loop = uv_default_loop();
-
- r = uv_fs_open(NULL, &open_req1, "test_file", O_WRONLY | O_CREAT,
- S_IWUSR | S_IRUSR, NULL);
- ASSERT(r >= 0);
- ASSERT(open_req1.result >= 0);
- uv_fs_req_cleanup(&open_req1);
-
- iov = uv_buf_init(test_buf, sizeof(test_buf));
- r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, -1, NULL);
- ASSERT(r >= 0);
- ASSERT(write_req.result >= 0);
- uv_fs_req_cleanup(&write_req);
-
- r = uv_fs_close(NULL, &close_req, open_req1.result, NULL);
- ASSERT(r == 0);
- ASSERT(close_req.result == 0);
- uv_fs_req_cleanup(&close_req);
-
- r = uv_fs_open(NULL, &open_req1, "test_file2", O_WRONLY | O_CREAT,
- S_IWUSR | S_IRUSR, NULL);
- ASSERT(r >= 0);
- ASSERT(open_req1.result >= 0);
- uv_fs_req_cleanup(&open_req1);
-
- r = uv_fs_close(NULL, &close_req, open_req1.result, NULL);
- ASSERT(r == 0);
- ASSERT(close_req.result == 0);
- uv_fs_req_cleanup(&close_req);
-
- r = uv_fs_rename(NULL, &rename_req, "test_file", "test_file2", NULL);
- ASSERT(r == 0);
- ASSERT(rename_req.result == 0);
- uv_fs_req_cleanup(&rename_req);
-
- r = uv_fs_open(NULL, &open_req1, "test_file2", O_RDONLY, 0, NULL);
- ASSERT(r >= 0);
- ASSERT(open_req1.result >= 0);
- uv_fs_req_cleanup(&open_req1);
-
- memset(buf, 0, sizeof(buf));
- iov = uv_buf_init(buf, sizeof(buf));
- r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, -1, NULL);
- ASSERT(r >= 0);
- ASSERT(read_req.result >= 0);
- ASSERT(strcmp(buf, test_buf) == 0);
- uv_fs_req_cleanup(&read_req);
-
- r = uv_fs_close(NULL, &close_req, open_req1.result, NULL);
- ASSERT(r == 0);
- ASSERT(close_req.result == 0);
- uv_fs_req_cleanup(&close_req);
-
- /* Cleanup */
- unlink("test_file");
- unlink("test_file2");
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(fs_read_file_eof) {
- int r;
-
- /* Setup. */
- unlink("test_file");
-
- loop = uv_default_loop();
-
- r = uv_fs_open(NULL, &open_req1, "test_file", O_WRONLY | O_CREAT,
- S_IWUSR | S_IRUSR, NULL);
- ASSERT(r >= 0);
- ASSERT(open_req1.result >= 0);
- uv_fs_req_cleanup(&open_req1);
-
- iov = uv_buf_init(test_buf, sizeof(test_buf));
- r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, -1, NULL);
- ASSERT(r >= 0);
- ASSERT(write_req.result >= 0);
- uv_fs_req_cleanup(&write_req);
-
- r = uv_fs_close(NULL, &close_req, open_req1.result, NULL);
- ASSERT(r == 0);
- ASSERT(close_req.result == 0);
- uv_fs_req_cleanup(&close_req);
-
- r = uv_fs_open(NULL, &open_req1, "test_file", O_RDONLY, 0, NULL);
- ASSERT(r >= 0);
- ASSERT(open_req1.result >= 0);
- uv_fs_req_cleanup(&open_req1);
-
- memset(buf, 0, sizeof(buf));
- iov = uv_buf_init(buf, sizeof(buf));
- r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, -1, NULL);
- ASSERT(r >= 0);
- ASSERT(read_req.result >= 0);
- ASSERT(strcmp(buf, test_buf) == 0);
- uv_fs_req_cleanup(&read_req);
-
- iov = uv_buf_init(buf, sizeof(buf));
- r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1,
- read_req.result, NULL);
- ASSERT(r == 0);
- ASSERT(read_req.result == 0);
- uv_fs_req_cleanup(&read_req);
-
- r = uv_fs_close(NULL, &close_req, open_req1.result, NULL);
- ASSERT(r == 0);
- ASSERT(close_req.result == 0);
- uv_fs_req_cleanup(&close_req);
-
- /* Cleanup */
- unlink("test_file");
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(fs_write_multiple_bufs) {
- uv_buf_t iovs[2];
- int r;
-
- /* Setup. */
- unlink("test_file");
-
- loop = uv_default_loop();
-
- r = uv_fs_open(NULL, &open_req1, "test_file", O_WRONLY | O_CREAT,
- S_IWUSR | S_IRUSR, NULL);
- ASSERT(r >= 0);
- ASSERT(open_req1.result >= 0);
- uv_fs_req_cleanup(&open_req1);
-
- iovs[0] = uv_buf_init(test_buf, sizeof(test_buf));
- iovs[1] = uv_buf_init(test_buf2, sizeof(test_buf2));
- r = uv_fs_write(NULL, &write_req, open_req1.result, iovs, 2, 0, NULL);
- ASSERT(r >= 0);
- ASSERT(write_req.result >= 0);
- uv_fs_req_cleanup(&write_req);
-
- r = uv_fs_close(NULL, &close_req, open_req1.result, NULL);
- ASSERT(r == 0);
- ASSERT(close_req.result == 0);
- uv_fs_req_cleanup(&close_req);
-
- r = uv_fs_open(NULL, &open_req1, "test_file", O_RDONLY, 0, NULL);
- ASSERT(r >= 0);
- ASSERT(open_req1.result >= 0);
- uv_fs_req_cleanup(&open_req1);
-
- memset(buf, 0, sizeof(buf));
- memset(buf2, 0, sizeof(buf2));
- /* Read the strings back to separate buffers. */
- iovs[0] = uv_buf_init(buf, sizeof(test_buf));
- iovs[1] = uv_buf_init(buf2, sizeof(test_buf2));
- r = uv_fs_read(NULL, &read_req, open_req1.result, iovs, 2, 0, NULL);
- ASSERT(r >= 0);
- ASSERT(read_req.result >= 0);
- ASSERT(strcmp(buf, test_buf) == 0);
- ASSERT(strcmp(buf2, test_buf2) == 0);
- uv_fs_req_cleanup(&read_req);
-
- iov = uv_buf_init(buf, sizeof(buf));
- r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1,
- read_req.result, NULL);
- ASSERT(r == 0);
- ASSERT(read_req.result == 0);
- uv_fs_req_cleanup(&read_req);
-
- r = uv_fs_close(NULL, &close_req, open_req1.result, NULL);
- ASSERT(r == 0);
- ASSERT(close_req.result == 0);
- uv_fs_req_cleanup(&close_req);
-
- /* Cleanup */
- unlink("test_file");
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(fs_write_alotof_bufs) {
- const size_t iovcount = 54321;
- uv_buf_t* iovs;
- char* buffer;
- size_t index;
- int r;
-
- /* Setup. */
- unlink("test_file");
-
- loop = uv_default_loop();
-
- iovs = malloc(sizeof(*iovs) * iovcount);
- ASSERT(iovs != NULL);
-
- r = uv_fs_open(NULL,
- &open_req1,
- "test_file",
- O_RDWR | O_CREAT,
- S_IWUSR | S_IRUSR,
- NULL);
- ASSERT(r >= 0);
- ASSERT(open_req1.result >= 0);
- uv_fs_req_cleanup(&open_req1);
-
- for (index = 0; index < iovcount; ++index)
- iovs[index] = uv_buf_init(test_buf, sizeof(test_buf));
-
- r = uv_fs_write(NULL,
- &write_req,
- open_req1.result,
- iovs,
- iovcount,
- -1,
- NULL);
- ASSERT(r >= 0);
- ASSERT((size_t)write_req.result == sizeof(test_buf) * iovcount);
- uv_fs_req_cleanup(&write_req);
-
- /* Read the strings back to separate buffers. */
- buffer = malloc(sizeof(test_buf) * iovcount);
- ASSERT(buffer != NULL);
-
- for (index = 0; index < iovcount; ++index)
- iovs[index] = uv_buf_init(buffer + index * sizeof(test_buf),
- sizeof(test_buf));
-
- r = uv_fs_read(NULL, &read_req, open_req1.result, iovs, iovcount, 0, NULL);
- ASSERT(r >= 0);
- ASSERT((size_t)read_req.result == sizeof(test_buf) * iovcount);
-
- for (index = 0; index < iovcount; ++index)
- ASSERT(strncmp(buffer + index * sizeof(test_buf),
- test_buf,
- sizeof(test_buf)) == 0);
-
- uv_fs_req_cleanup(&read_req);
- free(buffer);
-
- iov = uv_buf_init(buf, sizeof(buf));
- r = uv_fs_read(NULL,
- &read_req,
- open_req1.result,
- &iov,
- 1,
- read_req.result,
- NULL);
- ASSERT(r == 0);
- ASSERT(read_req.result == 0);
- uv_fs_req_cleanup(&read_req);
-
- r = uv_fs_close(NULL, &close_req, open_req1.result, NULL);
- ASSERT(r == 0);
- ASSERT(close_req.result == 0);
- uv_fs_req_cleanup(&close_req);
-
- /* Cleanup */
- unlink("test_file");
- free(iovs);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(fs_write_alotof_bufs_with_offset) {
- const size_t iovcount = 54321;
- uv_buf_t* iovs;
- char* buffer;
- size_t index;
- int r;
- int64_t offset;
- char* filler = "0123456789";
- int filler_len = strlen(filler);
-
- /* Setup. */
- unlink("test_file");
-
- loop = uv_default_loop();
-
- iovs = malloc(sizeof(*iovs) * iovcount);
- ASSERT(iovs != NULL);
-
- r = uv_fs_open(NULL,
- &open_req1,
- "test_file",
- O_RDWR | O_CREAT,
- S_IWUSR | S_IRUSR,
- NULL);
- ASSERT(r >= 0);
- ASSERT(open_req1.result >= 0);
- uv_fs_req_cleanup(&open_req1);
-
- iov = uv_buf_init(filler, filler_len);
- r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, -1, NULL);
- ASSERT(r == filler_len);
- ASSERT(write_req.result == filler_len);
- uv_fs_req_cleanup(&write_req);
- offset = (int64_t)r;
-
- for (index = 0; index < iovcount; ++index)
- iovs[index] = uv_buf_init(test_buf, sizeof(test_buf));
-
- r = uv_fs_write(NULL,
- &write_req,
- open_req1.result,
- iovs,
- iovcount,
- offset,
- NULL);
- ASSERT(r >= 0);
- ASSERT((size_t)write_req.result == sizeof(test_buf) * iovcount);
- uv_fs_req_cleanup(&write_req);
-
- /* Read the strings back to separate buffers. */
- buffer = malloc(sizeof(test_buf) * iovcount);
- ASSERT(buffer != NULL);
-
- for (index = 0; index < iovcount; ++index)
- iovs[index] = uv_buf_init(buffer + index * sizeof(test_buf),
- sizeof(test_buf));
-
- r = uv_fs_read(NULL, &read_req, open_req1.result,
- iovs, iovcount, offset, NULL);
- ASSERT(r >= 0);
- ASSERT(read_req.result == sizeof(test_buf) * iovcount);
-
- for (index = 0; index < iovcount; ++index)
- ASSERT(strncmp(buffer + index * sizeof(test_buf),
- test_buf,
- sizeof(test_buf)) == 0);
-
- uv_fs_req_cleanup(&read_req);
- free(buffer);
-
- r = uv_fs_stat(NULL, &stat_req, "test_file", NULL);
- ASSERT(r == 0);
- ASSERT((int64_t)((uv_stat_t*)stat_req.ptr)->st_size ==
- offset + (int64_t)(iovcount * sizeof(test_buf)));
- uv_fs_req_cleanup(&stat_req);
-
- iov = uv_buf_init(buf, sizeof(buf));
- r = uv_fs_read(NULL,
- &read_req,
- open_req1.result,
- &iov,
- 1,
- read_req.result + offset,
- NULL);
- ASSERT(r == 0);
- ASSERT(read_req.result == 0);
- uv_fs_req_cleanup(&read_req);
-
- r = uv_fs_close(NULL, &close_req, open_req1.result, NULL);
- ASSERT(r == 0);
- ASSERT(close_req.result == 0);
- uv_fs_req_cleanup(&close_req);
-
- /* Cleanup */
- unlink("test_file");
- free(iovs);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(fs_read_write_null_arguments) {
- int r;
-
- r = uv_fs_read(NULL, NULL, 0, NULL, 0, -1, NULL);
- ASSERT(r == UV_EINVAL);
-
- r = uv_fs_write(NULL, NULL, 0, NULL, 0, -1, NULL);
- ASSERT(r == UV_EINVAL);
-
- iov = uv_buf_init(NULL, 0);
- r = uv_fs_read(NULL, NULL, 0, &iov, 0, -1, NULL);
- ASSERT(r == UV_EINVAL);
-
- iov = uv_buf_init(NULL, 0);
- r = uv_fs_write(NULL, NULL, 0, &iov, 0, -1, NULL);
- ASSERT(r == UV_EINVAL);
-
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-get-currentexe.c b/3rdparty/libuv/test/test-get-currentexe.c
deleted file mode 100644
index 0e9d6965402..00000000000
--- a/3rdparty/libuv/test/test-get-currentexe.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-#include <string.h>
-
-#define PATHMAX 1024
-extern char executable_path[];
-
-TEST_IMPL(get_currentexe) {
- char buffer[PATHMAX];
- size_t size;
- char* match;
- char* path;
- int r;
-
- size = sizeof(buffer) / sizeof(buffer[0]);
- r = uv_exepath(buffer, &size);
- ASSERT(!r);
-
- /* uv_exepath can return an absolute path on darwin, so if the test runner
- * was run with a relative prefix of "./", we need to strip that prefix off
- * executable_path or we'll fail. */
- if (executable_path[0] == '.' && executable_path[1] == '/') {
- path = executable_path + 2;
- } else {
- path = executable_path;
- }
-
- match = strstr(buffer, path);
- /* Verify that the path returned from uv_exepath is a subdirectory of
- * executable_path.
- */
- ASSERT(match && !strcmp(match, path));
- ASSERT(size == strlen(buffer));
-
- /* Negative tests */
- size = sizeof(buffer) / sizeof(buffer[0]);
- r = uv_exepath(NULL, &size);
- ASSERT(r == UV_EINVAL);
-
- r = uv_exepath(buffer, NULL);
- ASSERT(r == UV_EINVAL);
-
- size = 0;
- r = uv_exepath(buffer, &size);
- ASSERT(r == UV_EINVAL);
-
- memset(buffer, -1, sizeof(buffer));
-
- size = 1;
- r = uv_exepath(buffer, &size);
- ASSERT(r == 0);
- ASSERT(size == 0);
- ASSERT(buffer[0] == '\0');
-
- memset(buffer, -1, sizeof(buffer));
-
- size = 2;
- r = uv_exepath(buffer, &size);
- ASSERT(r == 0);
- ASSERT(size == 1);
- ASSERT(buffer[0] != '\0');
- ASSERT(buffer[1] == '\0');
-
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-get-loadavg.c b/3rdparty/libuv/test/test-get-loadavg.c
deleted file mode 100644
index 4762e47576d..00000000000
--- a/3rdparty/libuv/test/test-get-loadavg.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-TEST_IMPL(get_loadavg) {
-
- double avg[3] = {-1, -1, -1};
- uv_loadavg(avg);
-
- ASSERT(avg[0] >= 0);
- ASSERT(avg[1] >= 0);
- ASSERT(avg[2] >= 0);
-
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-get-memory.c b/3rdparty/libuv/test/test-get-memory.c
deleted file mode 100644
index 2396939bcb1..00000000000
--- a/3rdparty/libuv/test/test-get-memory.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-TEST_IMPL(get_memory) {
- uint64_t free_mem = uv_get_free_memory();
- uint64_t total_mem = uv_get_total_memory();
-
- printf("free_mem=%llu, total_mem=%llu\n",
- (unsigned long long) free_mem,
- (unsigned long long) total_mem);
-
- ASSERT(free_mem > 0);
- ASSERT(total_mem > 0);
- ASSERT(total_mem > free_mem);
-
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-getaddrinfo.c b/3rdparty/libuv/test/test-getaddrinfo.c
deleted file mode 100644
index 6b644a8d442..00000000000
--- a/3rdparty/libuv/test/test-getaddrinfo.c
+++ /dev/null
@@ -1,184 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-#include <stdlib.h>
-
-#define CONCURRENT_COUNT 10
-
-static const char* name = "localhost";
-
-static int getaddrinfo_cbs = 0;
-
-/* data used for running multiple calls concurrently */
-static uv_getaddrinfo_t* getaddrinfo_handle;
-static uv_getaddrinfo_t getaddrinfo_handles[CONCURRENT_COUNT];
-static int callback_counts[CONCURRENT_COUNT];
-static int fail_cb_called;
-
-
-static void getaddrinfo_fail_cb(uv_getaddrinfo_t* req,
- int status,
- struct addrinfo* res) {
- ASSERT(fail_cb_called == 0);
- ASSERT(status < 0);
- ASSERT(res == NULL);
- uv_freeaddrinfo(res); /* Should not crash. */
- fail_cb_called++;
-}
-
-
-static void getaddrinfo_basic_cb(uv_getaddrinfo_t* handle,
- int status,
- struct addrinfo* res) {
- ASSERT(handle == getaddrinfo_handle);
- getaddrinfo_cbs++;
- free(handle);
- uv_freeaddrinfo(res);
-}
-
-
-static void getaddrinfo_cuncurrent_cb(uv_getaddrinfo_t* handle,
- int status,
- struct addrinfo* res) {
- int i;
- int* data = (int*)handle->data;
-
- for (i = 0; i < CONCURRENT_COUNT; i++) {
- if (&getaddrinfo_handles[i] == handle) {
- ASSERT(i == *data);
-
- callback_counts[i]++;
- break;
- }
- }
- ASSERT (i < CONCURRENT_COUNT);
-
- free(data);
- uv_freeaddrinfo(res);
-
- getaddrinfo_cbs++;
-}
-
-
-TEST_IMPL(getaddrinfo_fail) {
- uv_getaddrinfo_t req;
-
- /* Use a FQDN by ending in a period */
- ASSERT(0 == uv_getaddrinfo(uv_default_loop(),
- &req,
- getaddrinfo_fail_cb,
- "xyzzy.xyzzy.xyzzy.",
- NULL,
- NULL));
- ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
- ASSERT(fail_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(getaddrinfo_fail_sync) {
- uv_getaddrinfo_t req;
-
- /* Use a FQDN by ending in a period */
- ASSERT(0 > uv_getaddrinfo(uv_default_loop(),
- &req,
- NULL,
- "xyzzy.xyzzy.xyzzy.",
- NULL,
- NULL));
- uv_freeaddrinfo(req.addrinfo);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(getaddrinfo_basic) {
- int r;
- getaddrinfo_handle = (uv_getaddrinfo_t*)malloc(sizeof(uv_getaddrinfo_t));
-
- r = uv_getaddrinfo(uv_default_loop(),
- getaddrinfo_handle,
- &getaddrinfo_basic_cb,
- name,
- NULL,
- NULL);
- ASSERT(r == 0);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(getaddrinfo_cbs == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(getaddrinfo_basic_sync) {
- uv_getaddrinfo_t req;
-
- ASSERT(0 == uv_getaddrinfo(uv_default_loop(),
- &req,
- NULL,
- name,
- NULL,
- NULL));
- uv_freeaddrinfo(req.addrinfo);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(getaddrinfo_concurrent) {
- int i, r;
- int* data;
-
- for (i = 0; i < CONCURRENT_COUNT; i++) {
- callback_counts[i] = 0;
-
- data = (int*)malloc(sizeof(int));
- ASSERT(data != NULL);
- *data = i;
- getaddrinfo_handles[i].data = data;
-
- r = uv_getaddrinfo(uv_default_loop(),
- &getaddrinfo_handles[i],
- &getaddrinfo_cuncurrent_cb,
- name,
- NULL,
- NULL);
- ASSERT(r == 0);
- }
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- for (i = 0; i < CONCURRENT_COUNT; i++) {
- ASSERT(callback_counts[i] == 1);
- }
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-getnameinfo.c b/3rdparty/libuv/test/test-getnameinfo.c
deleted file mode 100644
index b1391616d13..00000000000
--- a/3rdparty/libuv/test/test-getnameinfo.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
-*
-* Permission is hereby granted, free of charge, to any person obtaining a copy
-* of this software and associated documentation files (the "Software"), to
-* deal in the Software without restriction, including without limitation the
-* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-* sell copies of the Software, and to permit persons to whom the Software is
-* furnished to do so, subject to the following conditions:
-*
-* The above copyright notice and this permission notice shall be included in
-* all copies or substantial portions of the Software.
-*
-* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-* IN THE SOFTWARE.
-*/
-
-#include "uv.h"
-#include "task.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-
-static const char* address_ip4 = "127.0.0.1";
-static const char* address_ip6 = "::1";
-static const int port = 80;
-
-static struct sockaddr_in addr4;
-static struct sockaddr_in6 addr6;
-static uv_getnameinfo_t req;
-
-static void getnameinfo_req(uv_getnameinfo_t* handle,
- int status,
- const char* hostname,
- const char* service) {
- ASSERT(handle != NULL);
- ASSERT(status == 0);
- ASSERT(hostname != NULL);
- ASSERT(service != NULL);
-}
-
-
-TEST_IMPL(getnameinfo_basic_ip4) {
- int r;
-
- r = uv_ip4_addr(address_ip4, port, &addr4);
- ASSERT(r == 0);
-
- r = uv_getnameinfo(uv_default_loop(),
- &req,
- &getnameinfo_req,
- (const struct sockaddr*)&addr4,
- 0);
- ASSERT(r == 0);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(getnameinfo_basic_ip4_sync) {
- ASSERT(0 == uv_ip4_addr(address_ip4, port, &addr4));
-
- ASSERT(0 == uv_getnameinfo(uv_default_loop(),
- &req,
- NULL,
- (const struct sockaddr*)&addr4,
- 0));
- ASSERT(req.host[0] != '\0');
- ASSERT(req.service[0] != '\0');
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(getnameinfo_basic_ip6) {
- int r;
-
- r = uv_ip6_addr(address_ip6, port, &addr6);
- ASSERT(r == 0);
-
- r = uv_getnameinfo(uv_default_loop(),
- &req,
- &getnameinfo_req,
- (const struct sockaddr*)&addr6,
- 0);
- ASSERT(r == 0);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-getsockname.c b/3rdparty/libuv/test/test-getsockname.c
deleted file mode 100644
index 565c17fe50b..00000000000
--- a/3rdparty/libuv/test/test-getsockname.c
+++ /dev/null
@@ -1,361 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-static const int server_port = TEST_PORT;
-/* Will be updated right after making the uv_connect_call */
-static int connect_port = -1;
-
-static int getsocknamecount = 0;
-static int getpeernamecount = 0;
-
-static uv_loop_t* loop;
-static uv_tcp_t tcp;
-static uv_udp_t udp;
-static uv_connect_t connect_req;
-static uv_tcp_t tcpServer;
-static uv_udp_t udpServer;
-static uv_udp_send_t send_req;
-
-
-static void alloc(uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf) {
- buf->base = malloc(suggested_size);
- buf->len = suggested_size;
-}
-
-
-static void on_close(uv_handle_t* peer) {
- free(peer);
- uv_close((uv_handle_t*)&tcpServer, NULL);
-}
-
-
-static void after_shutdown(uv_shutdown_t* req, int status) {
- uv_close((uv_handle_t*) req->handle, on_close);
- free(req);
-}
-
-
-static void after_read(uv_stream_t* handle,
- ssize_t nread,
- const uv_buf_t* buf) {
- uv_shutdown_t* req;
- int r;
-
- if (buf->base) {
- free(buf->base);
- }
-
- req = (uv_shutdown_t*) malloc(sizeof *req);
- r = uv_shutdown(req, handle, after_shutdown);
- ASSERT(r == 0);
-}
-
-
-static void check_sockname(struct sockaddr* addr, const char* compare_ip,
- int compare_port, const char* context) {
- struct sockaddr_in check_addr = *(struct sockaddr_in*) addr;
- struct sockaddr_in compare_addr;
- char check_ip[17];
- int r;
-
- ASSERT(0 == uv_ip4_addr(compare_ip, compare_port, &compare_addr));
-
- /* Both addresses should be ipv4 */
- ASSERT(check_addr.sin_family == AF_INET);
- ASSERT(compare_addr.sin_family == AF_INET);
-
- /* Check if the ip matches */
- ASSERT(memcmp(&check_addr.sin_addr,
- &compare_addr.sin_addr,
- sizeof compare_addr.sin_addr) == 0);
-
- /* Check if the port matches. If port == 0 anything goes. */
- ASSERT(compare_port == 0 || check_addr.sin_port == compare_addr.sin_port);
-
- r = uv_ip4_name(&check_addr, (char*) check_ip, sizeof check_ip);
- ASSERT(r == 0);
-
- printf("%s: %s:%d\n", context, check_ip, ntohs(check_addr.sin_port));
-}
-
-
-static void on_connection(uv_stream_t* server, int status) {
- struct sockaddr sockname, peername;
- int namelen;
- uv_tcp_t* handle;
- int r;
-
- if (status != 0) {
- fprintf(stderr, "Connect error %s\n", uv_err_name(status));
- }
- ASSERT(status == 0);
-
- handle = malloc(sizeof(*handle));
- ASSERT(handle != NULL);
-
- r = uv_tcp_init(loop, handle);
- ASSERT(r == 0);
-
- /* associate server with stream */
- handle->data = server;
-
- r = uv_accept(server, (uv_stream_t*)handle);
- ASSERT(r == 0);
-
- namelen = sizeof sockname;
- r = uv_tcp_getsockname(handle, &sockname, &namelen);
- ASSERT(r == 0);
- check_sockname(&sockname, "127.0.0.1", server_port, "accepted socket");
- getsocknamecount++;
-
- namelen = sizeof peername;
- r = uv_tcp_getpeername(handle, &peername, &namelen);
- ASSERT(r == 0);
- check_sockname(&peername, "127.0.0.1", connect_port, "accepted socket peer");
- getpeernamecount++;
-
- r = uv_read_start((uv_stream_t*)handle, alloc, after_read);
- ASSERT(r == 0);
-}
-
-
-static void on_connect(uv_connect_t* req, int status) {
- struct sockaddr sockname, peername;
- int r, namelen;
-
- ASSERT(status == 0);
-
- namelen = sizeof sockname;
- r = uv_tcp_getsockname((uv_tcp_t*) req->handle, &sockname, &namelen);
- ASSERT(r == 0);
- check_sockname(&sockname, "127.0.0.1", 0, "connected socket");
- getsocknamecount++;
-
- namelen = sizeof peername;
- r = uv_tcp_getpeername((uv_tcp_t*) req->handle, &peername, &namelen);
- ASSERT(r == 0);
- check_sockname(&peername, "127.0.0.1", server_port, "connected socket peer");
- getpeernamecount++;
-
- uv_close((uv_handle_t*)&tcp, NULL);
-}
-
-
-static int tcp_listener(void) {
- struct sockaddr_in addr;
- struct sockaddr sockname, peername;
- int namelen;
- int r;
-
- ASSERT(0 == uv_ip4_addr("0.0.0.0", server_port, &addr));
-
- r = uv_tcp_init(loop, &tcpServer);
- if (r) {
- fprintf(stderr, "Socket creation error\n");
- return 1;
- }
-
- r = uv_tcp_bind(&tcpServer, (const struct sockaddr*) &addr, 0);
- if (r) {
- fprintf(stderr, "Bind error\n");
- return 1;
- }
-
- r = uv_listen((uv_stream_t*)&tcpServer, 128, on_connection);
- if (r) {
- fprintf(stderr, "Listen error\n");
- return 1;
- }
-
- memset(&sockname, -1, sizeof sockname);
- namelen = sizeof sockname;
- r = uv_tcp_getsockname(&tcpServer, &sockname, &namelen);
- ASSERT(r == 0);
- check_sockname(&sockname, "0.0.0.0", server_port, "server socket");
- getsocknamecount++;
-
- namelen = sizeof sockname;
- r = uv_tcp_getpeername(&tcpServer, &peername, &namelen);
- ASSERT(r == UV_ENOTCONN);
- getpeernamecount++;
-
- return 0;
-}
-
-
-static void tcp_connector(void) {
- struct sockaddr_in server_addr;
- struct sockaddr sockname;
- int r, namelen;
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", server_port, &server_addr));
-
- r = uv_tcp_init(loop, &tcp);
- tcp.data = &connect_req;
- ASSERT(!r);
-
- r = uv_tcp_connect(&connect_req,
- &tcp,
- (const struct sockaddr*) &server_addr,
- on_connect);
- ASSERT(!r);
-
- /* Fetch the actual port used by the connecting socket. */
- namelen = sizeof sockname;
- r = uv_tcp_getsockname(&tcp, &sockname, &namelen);
- ASSERT(!r);
- ASSERT(sockname.sa_family == AF_INET);
- connect_port = ntohs(((struct sockaddr_in*) &sockname)->sin_port);
- ASSERT(connect_port > 0);
-}
-
-
-static void udp_recv(uv_udp_t* handle,
- ssize_t nread,
- const uv_buf_t* buf,
- const struct sockaddr* addr,
- unsigned flags) {
- struct sockaddr sockname;
- int namelen;
- int r;
-
- ASSERT(nread >= 0);
- free(buf->base);
-
- if (nread == 0) {
- return;
- }
-
- memset(&sockname, -1, sizeof sockname);
- namelen = sizeof(sockname);
- r = uv_udp_getsockname(&udp, &sockname, &namelen);
- ASSERT(r == 0);
- check_sockname(&sockname, "0.0.0.0", 0, "udp receiving socket");
- getsocknamecount++;
-
- uv_close((uv_handle_t*) &udp, NULL);
- uv_close((uv_handle_t*) handle, NULL);
-}
-
-
-static void udp_send(uv_udp_send_t* req, int status) {
-
-}
-
-
-static int udp_listener(void) {
- struct sockaddr_in addr;
- struct sockaddr sockname;
- int namelen;
- int r;
-
- ASSERT(0 == uv_ip4_addr("0.0.0.0", server_port, &addr));
-
- r = uv_udp_init(loop, &udpServer);
- if (r) {
- fprintf(stderr, "Socket creation error\n");
- return 1;
- }
-
- r = uv_udp_bind(&udpServer, (const struct sockaddr*) &addr, 0);
- if (r) {
- fprintf(stderr, "Bind error\n");
- return 1;
- }
-
- memset(&sockname, -1, sizeof sockname);
- namelen = sizeof sockname;
- r = uv_udp_getsockname(&udpServer, &sockname, &namelen);
- ASSERT(r == 0);
- check_sockname(&sockname, "0.0.0.0", server_port, "udp listener socket");
- getsocknamecount++;
-
- r = uv_udp_recv_start(&udpServer, alloc, udp_recv);
- ASSERT(r == 0);
-
- return 0;
-}
-
-
-static void udp_sender(void) {
- struct sockaddr_in server_addr;
- uv_buf_t buf;
- int r;
-
- r = uv_udp_init(loop, &udp);
- ASSERT(!r);
-
- buf = uv_buf_init("PING", 4);
- ASSERT(0 == uv_ip4_addr("127.0.0.1", server_port, &server_addr));
-
- r = uv_udp_send(&send_req,
- &udp,
- &buf,
- 1,
- (const struct sockaddr*) &server_addr,
- udp_send);
- ASSERT(!r);
-}
-
-
-TEST_IMPL(getsockname_tcp) {
- loop = uv_default_loop();
-
- if (tcp_listener())
- return 1;
-
- tcp_connector();
-
- uv_run(loop, UV_RUN_DEFAULT);
-
- ASSERT(getsocknamecount == 3);
- ASSERT(getpeernamecount == 3);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(getsockname_udp) {
- loop = uv_default_loop();
-
- if (udp_listener())
- return 1;
-
- udp_sender();
-
- uv_run(loop, UV_RUN_DEFAULT);
-
- ASSERT(getsocknamecount == 2);
-
- ASSERT(udp.send_queue_size == 0);
- ASSERT(udpServer.send_queue_size == 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-handle-fileno.c b/3rdparty/libuv/test/test-handle-fileno.c
deleted file mode 100644
index 3fe933adebd..00000000000
--- a/3rdparty/libuv/test/test-handle-fileno.c
+++ /dev/null
@@ -1,121 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-
-static int get_tty_fd(void) {
- /* Make sure we have an FD that refers to a tty */
-#ifdef _WIN32
- HANDLE handle;
- handle = CreateFileA("conout$",
- GENERIC_READ | GENERIC_WRITE,
- FILE_SHARE_READ | FILE_SHARE_WRITE,
- NULL,
- OPEN_EXISTING,
- FILE_ATTRIBUTE_NORMAL,
- NULL);
- if (handle == INVALID_HANDLE_VALUE)
- return -1;
- return _open_osfhandle((intptr_t) handle, 0);
-#else /* unix */
- return open("/dev/tty", O_RDONLY, 0);
-#endif
-}
-
-
-TEST_IMPL(handle_fileno) {
- int r;
- int tty_fd;
- struct sockaddr_in addr;
- uv_os_fd_t fd;
- uv_tcp_t tcp;
- uv_udp_t udp;
- uv_pipe_t pipe;
- uv_tty_t tty;
- uv_idle_t idle;
- uv_loop_t* loop;
-
- loop = uv_default_loop();
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
-
- r = uv_idle_init(loop, &idle);
- ASSERT(r == 0);
- r = uv_fileno((uv_handle_t*) &idle, &fd);
- ASSERT(r == UV_EINVAL);
- uv_close((uv_handle_t*) &idle, NULL);
-
- r = uv_tcp_init(loop, &tcp);
- ASSERT(r == 0);
- r = uv_fileno((uv_handle_t*) &tcp, &fd);
- ASSERT(r == UV_EBADF);
- r = uv_tcp_bind(&tcp, (const struct sockaddr*) &addr, 0);
- ASSERT(r == 0);
- r = uv_fileno((uv_handle_t*) &tcp, &fd);
- ASSERT(r == 0);
- uv_close((uv_handle_t*) &tcp, NULL);
- r = uv_fileno((uv_handle_t*) &tcp, &fd);
- ASSERT(r == UV_EBADF);
-
- r = uv_udp_init(loop, &udp);
- ASSERT(r == 0);
- r = uv_fileno((uv_handle_t*) &udp, &fd);
- ASSERT(r == UV_EBADF);
- r = uv_udp_bind(&udp, (const struct sockaddr*) &addr, 0);
- ASSERT(r == 0);
- r = uv_fileno((uv_handle_t*) &udp, &fd);
- ASSERT(r == 0);
- uv_close((uv_handle_t*) &udp, NULL);
- r = uv_fileno((uv_handle_t*) &udp, &fd);
- ASSERT(r == UV_EBADF);
-
- r = uv_pipe_init(loop, &pipe, 0);
- ASSERT(r == 0);
- r = uv_fileno((uv_handle_t*) &pipe, &fd);
- ASSERT(r == UV_EBADF);
- r = uv_pipe_bind(&pipe, TEST_PIPENAME);
- ASSERT(r == 0);
- r = uv_fileno((uv_handle_t*) &pipe, &fd);
- ASSERT(r == 0);
- uv_close((uv_handle_t*) &pipe, NULL);
- r = uv_fileno((uv_handle_t*) &pipe, &fd);
- ASSERT(r == UV_EBADF);
-
- tty_fd = get_tty_fd();
- if (tty_fd < 0) {
- fprintf(stderr, "Cannot open a TTY fd");
- fflush(stderr);
- } else {
- r = uv_tty_init(loop, &tty, tty_fd, 0);
- ASSERT(r == 0);
- r = uv_fileno((uv_handle_t*) &tty, &fd);
- ASSERT(r == 0);
- uv_close((uv_handle_t*) &tty, NULL);
- r = uv_fileno((uv_handle_t*) &tty, &fd);
- ASSERT(r == UV_EBADF);
- }
-
- uv_run(loop, UV_RUN_DEFAULT);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-homedir.c b/3rdparty/libuv/test/test-homedir.c
deleted file mode 100644
index cbc47566c55..00000000000
--- a/3rdparty/libuv/test/test-homedir.c
+++ /dev/null
@@ -1,49 +0,0 @@
-#include "uv.h"
-#include "task.h"
-#include <string.h>
-
-#define PATHMAX 1024
-#define SMALLPATH 1
-
-TEST_IMPL(homedir) {
- char homedir[PATHMAX];
- size_t len;
- char last;
- int r;
-
- /* Test the normal case */
- len = sizeof homedir;
- homedir[0] = '\0';
- ASSERT(strlen(homedir) == 0);
- r = uv_os_homedir(homedir, &len);
- ASSERT(r == 0);
- ASSERT(strlen(homedir) == len);
- ASSERT(len > 0);
- ASSERT(homedir[len] == '\0');
-
- if (len > 1) {
- last = homedir[len - 1];
-#ifdef _WIN32
- ASSERT(last != '\\');
-#else
- ASSERT(last != '/');
-#endif
- }
-
- /* Test the case where the buffer is too small */
- len = SMALLPATH;
- r = uv_os_homedir(homedir, &len);
- ASSERT(r == UV_ENOBUFS);
- ASSERT(len > SMALLPATH);
-
- /* Test invalid inputs */
- r = uv_os_homedir(NULL, &len);
- ASSERT(r == UV_EINVAL);
- r = uv_os_homedir(homedir, NULL);
- ASSERT(r == UV_EINVAL);
- len = 0;
- r = uv_os_homedir(homedir, &len);
- ASSERT(r == UV_EINVAL);
-
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-hrtime.c b/3rdparty/libuv/test/test-hrtime.c
deleted file mode 100644
index 72a4d4b181d..00000000000
--- a/3rdparty/libuv/test/test-hrtime.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#ifndef MILLISEC
-# define MILLISEC 1000
-#endif
-
-#ifndef NANOSEC
-# define NANOSEC ((uint64_t) 1e9)
-#endif
-
-
-TEST_IMPL(hrtime) {
- uint64_t a, b, diff;
- int i = 75;
- while (i > 0) {
- a = uv_hrtime();
- uv_sleep(45);
- b = uv_hrtime();
-
- diff = b - a;
-
- /* printf("i= %d diff = %llu\n", i, (unsigned long long int) diff); */
-
- /* The windows Sleep() function has only a resolution of 10-20 ms. */
- /* Check that the difference between the two hrtime values is somewhat in */
- /* the range we expect it to be. */
- ASSERT(diff > (uint64_t) 25 * NANOSEC / MILLISEC);
- ASSERT(diff < (uint64_t) 80 * NANOSEC / MILLISEC);
- --i;
- }
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-idle.c b/3rdparty/libuv/test/test-idle.c
deleted file mode 100644
index f49d1964827..00000000000
--- a/3rdparty/libuv/test/test-idle.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-
-static uv_idle_t idle_handle;
-static uv_check_t check_handle;
-static uv_timer_t timer_handle;
-
-static int idle_cb_called = 0;
-static int check_cb_called = 0;
-static int timer_cb_called = 0;
-static int close_cb_called = 0;
-
-
-static void close_cb(uv_handle_t* handle) {
- close_cb_called++;
-}
-
-
-static void timer_cb(uv_timer_t* handle) {
- ASSERT(handle == &timer_handle);
-
- uv_close((uv_handle_t*) &idle_handle, close_cb);
- uv_close((uv_handle_t*) &check_handle, close_cb);
- uv_close((uv_handle_t*) &timer_handle, close_cb);
-
- timer_cb_called++;
- fprintf(stderr, "timer_cb %d\n", timer_cb_called);
- fflush(stderr);
-}
-
-
-static void idle_cb(uv_idle_t* handle) {
- ASSERT(handle == &idle_handle);
-
- idle_cb_called++;
- fprintf(stderr, "idle_cb %d\n", idle_cb_called);
- fflush(stderr);
-}
-
-
-static void check_cb(uv_check_t* handle) {
- ASSERT(handle == &check_handle);
-
- check_cb_called++;
- fprintf(stderr, "check_cb %d\n", check_cb_called);
- fflush(stderr);
-}
-
-
-TEST_IMPL(idle_starvation) {
- int r;
-
- r = uv_idle_init(uv_default_loop(), &idle_handle);
- ASSERT(r == 0);
- r = uv_idle_start(&idle_handle, idle_cb);
- ASSERT(r == 0);
-
- r = uv_check_init(uv_default_loop(), &check_handle);
- ASSERT(r == 0);
- r = uv_check_start(&check_handle, check_cb);
- ASSERT(r == 0);
-
- r = uv_timer_init(uv_default_loop(), &timer_handle);
- ASSERT(r == 0);
- r = uv_timer_start(&timer_handle, timer_cb, 50, 0);
- ASSERT(r == 0);
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(idle_cb_called > 0);
- ASSERT(timer_cb_called == 1);
- ASSERT(close_cb_called == 3);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-ip4-addr.c b/3rdparty/libuv/test/test-ip4-addr.c
deleted file mode 100644
index 3d6e0cf286a..00000000000
--- a/3rdparty/libuv/test/test-ip4-addr.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <stdio.h>
-#include <string.h>
-
-
-TEST_IMPL(ip4_addr) {
-
- struct sockaddr_in addr;
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
- ASSERT(0 == uv_ip4_addr("255.255.255.255", TEST_PORT, &addr));
- ASSERT(UV_EINVAL == uv_ip4_addr("255.255.255*000", TEST_PORT, &addr));
- ASSERT(UV_EINVAL == uv_ip4_addr("255.255.255.256", TEST_PORT, &addr));
- ASSERT(UV_EINVAL == uv_ip4_addr("2555.0.0.0", TEST_PORT, &addr));
- ASSERT(UV_EINVAL == uv_ip4_addr("255", TEST_PORT, &addr));
-
- /* for broken address family */
- ASSERT(UV_EAFNOSUPPORT == uv_inet_pton(42, "127.0.0.1",
- &addr.sin_addr.s_addr));
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-ip6-addr.c b/3rdparty/libuv/test/test-ip6-addr.c
deleted file mode 100644
index 869b099e0fc..00000000000
--- a/3rdparty/libuv/test/test-ip6-addr.c
+++ /dev/null
@@ -1,141 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <stdio.h>
-#include <string.h>
-
-#ifdef __linux__
-# include <sys/socket.h>
-# include <net/if.h>
-#endif
-
-
-TEST_IMPL(ip6_addr_link_local) {
- char string_address[INET6_ADDRSTRLEN];
- uv_interface_address_t* addresses;
- uv_interface_address_t* address;
- struct sockaddr_in6 addr;
- unsigned int iface_index;
- const char* device_name;
- /* 40 bytes address, 16 bytes device name, plus reserve. */
- char scoped_addr[128];
- int count;
- int ix;
-
- ASSERT(0 == uv_interface_addresses(&addresses, &count));
-
- for (ix = 0; ix < count; ix++) {
- address = addresses + ix;
-
- if (address->address.address6.sin6_family != AF_INET6)
- continue;
-
- ASSERT(0 == uv_inet_ntop(AF_INET6,
- &address->address.address6.sin6_addr,
- string_address,
- sizeof(string_address)));
-
- /* Skip addresses that are not link-local. */
- if (strncmp(string_address, "fe80::", 6) != 0)
- continue;
-
- iface_index = address->address.address6.sin6_scope_id;
- device_name = address->name;
-
-#ifdef _WIN32
- snprintf(scoped_addr,
- sizeof(scoped_addr),
- "%s%%%d",
- string_address,
- iface_index);
-#else
- snprintf(scoped_addr,
- sizeof(scoped_addr),
- "%s%%%s",
- string_address,
- device_name);
-#endif
-
- fprintf(stderr, "Testing link-local address %s "
- "(iface_index: 0x%02x, device_name: %s)\n",
- scoped_addr,
- iface_index,
- device_name);
- fflush(stderr);
-
- ASSERT(0 == uv_ip6_addr(scoped_addr, TEST_PORT, &addr));
- fprintf(stderr, "Got scope_id 0x%02x\n", addr.sin6_scope_id);
- fflush(stderr);
- ASSERT(iface_index == addr.sin6_scope_id);
- }
-
- uv_free_interface_addresses(addresses, count);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-#define GOOD_ADDR_LIST(X) \
- X("::") \
- X("::1") \
- X("fe80::1") \
- X("fe80::") \
- X("fe80::2acf:daff:fedd:342a") \
- X("fe80:0:0:0:2acf:daff:fedd:342a") \
- X("fe80:0:0:0:2acf:daff:1.2.3.4") \
- X("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255") \
-
-#define BAD_ADDR_LIST(X) \
- X(":::1") \
- X("abcde::1") \
- X("fe80:0:0:0:2acf:daff:fedd:342a:5678") \
- X("fe80:0:0:0:2acf:daff:abcd:1.2.3.4") \
- X("fe80:0:0:2acf:daff:1.2.3.4.5") \
- X("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255.255") \
-
-#define TEST_GOOD(ADDR) \
- ASSERT(0 == uv_inet_pton(AF_INET6, ADDR, &addr)); \
- ASSERT(0 == uv_inet_pton(AF_INET6, ADDR "%en1", &addr)); \
- ASSERT(0 == uv_inet_pton(AF_INET6, ADDR "%%%%", &addr)); \
- ASSERT(0 == uv_inet_pton(AF_INET6, ADDR "%en1:1.2.3.4", &addr)); \
-
-#define TEST_BAD(ADDR) \
- ASSERT(0 != uv_inet_pton(AF_INET6, ADDR, &addr)); \
- ASSERT(0 != uv_inet_pton(AF_INET6, ADDR "%en1", &addr)); \
- ASSERT(0 != uv_inet_pton(AF_INET6, ADDR "%%%%", &addr)); \
- ASSERT(0 != uv_inet_pton(AF_INET6, ADDR "%en1:1.2.3.4", &addr)); \
-
-TEST_IMPL(ip6_pton) {
- struct in6_addr addr;
-
- GOOD_ADDR_LIST(TEST_GOOD)
- BAD_ADDR_LIST(TEST_BAD)
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-#undef GOOD_ADDR_LIST
-#undef BAD_ADDR_LIST
diff --git a/3rdparty/libuv/test/test-ipc-send-recv.c b/3rdparty/libuv/test/test-ipc-send-recv.c
deleted file mode 100644
index c445483fa08..00000000000
--- a/3rdparty/libuv/test/test-ipc-send-recv.c
+++ /dev/null
@@ -1,411 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <stdio.h>
-#include <string.h>
-
-/* See test-ipc.ctx */
-void spawn_helper(uv_pipe_t* channel,
- uv_process_t* process,
- const char* helper);
-
-void ipc_send_recv_helper_threadproc(void* arg);
-
-union handles {
- uv_handle_t handle;
- uv_stream_t stream;
- uv_pipe_t pipe;
- uv_tcp_t tcp;
- uv_tty_t tty;
-};
-
-struct test_ctx {
- uv_pipe_t channel;
- uv_connect_t connect_req;
- uv_write_t write_req;
- uv_write_t write_req2;
- uv_handle_type expected_type;
- union handles send;
- union handles send2;
- union handles recv;
- union handles recv2;
-};
-
-struct echo_ctx {
- uv_pipe_t listen;
- uv_pipe_t channel;
- uv_write_t write_req;
- uv_write_t write_req2;
- uv_handle_type expected_type;
- union handles recv;
- union handles recv2;
-};
-
-static struct test_ctx ctx;
-static struct echo_ctx ctx2;
-
-/* Used in write2_cb to decide if we need to cleanup or not */
-static int is_child_process;
-static int is_in_process;
-static int read_cb_called;
-static int recv_cb_called;
-static int write2_cb_called;
-
-
-static void alloc_cb(uv_handle_t* handle,
- size_t suggested_size,
- uv_buf_t* buf) {
- /* we're not actually reading anything so a small buffer is okay */
- static char slab[8];
- buf->base = slab;
- buf->len = sizeof(slab);
-}
-
-
-static void recv_cb(uv_stream_t* handle,
- ssize_t nread,
- const uv_buf_t* buf) {
- uv_handle_type pending;
- uv_pipe_t* pipe;
- int r;
- union handles* recv;
-
- if (++recv_cb_called == 1) {
- recv = &ctx.recv;
- } else {
- recv = &ctx.recv2;
- }
-
- pipe = (uv_pipe_t*) handle;
- ASSERT(pipe == &ctx.channel);
-
- /* Depending on the OS, the final recv_cb can be called after the child
- * process has terminated which can result in nread being UV_EOF instead of
- * the number of bytes read. Since the other end of the pipe has closed this
- * UV_EOF is an acceptable value. */
- if (nread == UV_EOF) {
- /* UV_EOF is only acceptable for the final recv_cb call */
- ASSERT(recv_cb_called == 2);
- } else {
- ASSERT(nread >= 0);
- ASSERT(1 == uv_pipe_pending_count(pipe));
-
- pending = uv_pipe_pending_type(pipe);
- ASSERT(pending == ctx.expected_type);
-
- if (pending == UV_NAMED_PIPE)
- r = uv_pipe_init(ctx.channel.loop, &recv->pipe, 0);
- else if (pending == UV_TCP)
- r = uv_tcp_init(ctx.channel.loop, &recv->tcp);
- else
- abort();
- ASSERT(r == 0);
-
- r = uv_accept(handle, &recv->stream);
- ASSERT(r == 0);
- }
-
- /* Close after two writes received */
- if (recv_cb_called == 2) {
- uv_close((uv_handle_t*)&ctx.channel, NULL);
- }
-}
-
-static void connect_cb(uv_connect_t* req, int status) {
- int r;
- uv_buf_t buf;
-
- ASSERT(req == &ctx.connect_req);
- ASSERT(status == 0);
-
- buf = uv_buf_init(".", 1);
- r = uv_write2(&ctx.write_req,
- (uv_stream_t*)&ctx.channel,
- &buf, 1,
- &ctx.send.stream,
- NULL);
- ASSERT(r == 0);
-
- /* Perform two writes to the same pipe to make sure that on Windows we are
- * not running into issue 505:
- * https://github.com/libuv/libuv/issues/505 */
- buf = uv_buf_init(".", 1);
- r = uv_write2(&ctx.write_req2,
- (uv_stream_t*)&ctx.channel,
- &buf, 1,
- &ctx.send2.stream,
- NULL);
- ASSERT(r == 0);
-
- r = uv_read_start((uv_stream_t*)&ctx.channel, alloc_cb, recv_cb);
- ASSERT(r == 0);
-}
-
-static int run_test(int inprocess) {
- uv_process_t process;
- uv_thread_t tid;
- int r;
-
- if (inprocess) {
- r = uv_thread_create(&tid, ipc_send_recv_helper_threadproc, (void *) 42);
- ASSERT(r == 0);
-
- uv_sleep(1000);
-
- r = uv_pipe_init(uv_default_loop(), &ctx.channel, 1);
- ASSERT(r == 0);
-
- uv_pipe_connect(&ctx.connect_req, &ctx.channel, TEST_PIPENAME_3, connect_cb);
- } else {
- spawn_helper(&ctx.channel, &process, "ipc_send_recv_helper");
-
- connect_cb(&ctx.connect_req, 0);
- }
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(recv_cb_called == 2);
-
- if (inprocess) {
- r = uv_thread_join(&tid);
- ASSERT(r == 0);
- }
-
- return 0;
-}
-
-static int run_ipc_send_recv_pipe(int inprocess) {
- int r;
-
- ctx.expected_type = UV_NAMED_PIPE;
-
- r = uv_pipe_init(uv_default_loop(), &ctx.send.pipe, 1);
- ASSERT(r == 0);
-
- r = uv_pipe_bind(&ctx.send.pipe, TEST_PIPENAME);
- ASSERT(r == 0);
-
- r = uv_pipe_init(uv_default_loop(), &ctx.send2.pipe, 1);
- ASSERT(r == 0);
-
- r = uv_pipe_bind(&ctx.send2.pipe, TEST_PIPENAME_2);
- ASSERT(r == 0);
-
- r = run_test(inprocess);
- ASSERT(r == 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-TEST_IMPL(ipc_send_recv_pipe) {
- return run_ipc_send_recv_pipe(0);
-}
-
-TEST_IMPL(ipc_send_recv_pipe_inprocess) {
- return run_ipc_send_recv_pipe(1);
-}
-
-static int run_ipc_send_recv_tcp(int inprocess) {
- struct sockaddr_in addr;
- int r;
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
-
- ctx.expected_type = UV_TCP;
-
- r = uv_tcp_init(uv_default_loop(), &ctx.send.tcp);
- ASSERT(r == 0);
-
- r = uv_tcp_init(uv_default_loop(), &ctx.send2.tcp);
- ASSERT(r == 0);
-
- r = uv_tcp_bind(&ctx.send.tcp, (const struct sockaddr*) &addr, 0);
- ASSERT(r == 0);
-
- r = uv_tcp_bind(&ctx.send2.tcp, (const struct sockaddr*) &addr, 0);
- ASSERT(r == 0);
-
- r = run_test(inprocess);
- ASSERT(r == 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-TEST_IMPL(ipc_send_recv_tcp) {
- return run_ipc_send_recv_tcp(0);
-}
-
-TEST_IMPL(ipc_send_recv_tcp_inprocess) {
- return run_ipc_send_recv_tcp(1);
-}
-
-
-/* Everything here runs in a child process or second thread. */
-
-static void write2_cb(uv_write_t* req, int status) {
- ASSERT(status == 0);
-
- /* After two successful writes in the child process, allow the child
- * process to be closed. */
- if (++write2_cb_called == 2 && (is_child_process || is_in_process)) {
- uv_close(&ctx2.recv.handle, NULL);
- uv_close(&ctx2.recv2.handle, NULL);
- uv_close((uv_handle_t*)&ctx2.channel, NULL);
- uv_close((uv_handle_t*)&ctx2.listen, NULL);
- }
-}
-
-static void read_cb(uv_stream_t* handle,
- ssize_t nread,
- const uv_buf_t* rdbuf) {
- uv_buf_t wrbuf;
- uv_pipe_t* pipe;
- uv_handle_type pending;
- int r;
- union handles* recv;
- uv_write_t* write_req;
-
- if (nread == UV__EOF || nread == UV__ECONNABORTED) {
- return;
- }
-
- if (++read_cb_called == 2) {
- recv = &ctx2.recv;
- write_req = &ctx2.write_req;
- } else {
- recv = &ctx2.recv2;
- write_req = &ctx2.write_req2;
- }
-
- pipe = (uv_pipe_t*) handle;
- ASSERT(pipe == &ctx2.channel);
- ASSERT(nread >= 0);
- ASSERT(1 == uv_pipe_pending_count(pipe));
-
- pending = uv_pipe_pending_type(pipe);
- ASSERT(pending == UV_NAMED_PIPE || pending == UV_TCP);
-
- if (pending == UV_NAMED_PIPE)
- r = uv_pipe_init(ctx2.channel.loop, &recv->pipe, 0);
- else if (pending == UV_TCP)
- r = uv_tcp_init(ctx2.channel.loop, &recv->tcp);
- else
- abort();
- ASSERT(r == 0);
-
- r = uv_accept(handle, &recv->stream);
- ASSERT(r == 0);
-
- wrbuf = uv_buf_init(".", 1);
- r = uv_write2(write_req,
- (uv_stream_t*)&ctx2.channel,
- &wrbuf,
- 1,
- &recv->stream,
- write2_cb);
- ASSERT(r == 0);
-}
-
-static void send_recv_start() {
- int r;
- ASSERT(1 == uv_is_readable((uv_stream_t*)&ctx2.channel));
- ASSERT(1 == uv_is_writable((uv_stream_t*)&ctx2.channel));
- ASSERT(0 == uv_is_closing((uv_handle_t*)&ctx2.channel));
-
- r = uv_read_start((uv_stream_t*)&ctx2.channel, alloc_cb, read_cb);
- ASSERT(r == 0);
-}
-
-static void listen_cb(uv_stream_t* handle, int status) {
- int r;
- ASSERT(handle == (uv_stream_t*)&ctx2.listen);
- ASSERT(status == 0);
-
- r = uv_accept((uv_stream_t*)&ctx2.listen, (uv_stream_t*)&ctx2.channel);
- ASSERT(r == 0);
-
- send_recv_start();
-}
-
-int run_ipc_send_recv_helper(uv_loop_t* loop, int inprocess) {
- int r;
-
- is_in_process = inprocess;
-
- memset(&ctx2, 0, sizeof(ctx2));
-
- r = uv_pipe_init(loop, &ctx2.listen, 0);
- ASSERT(r == 0);
-
- r = uv_pipe_init(loop, &ctx2.channel, 1);
- ASSERT(r == 0);
-
- if (inprocess) {
- r = uv_pipe_bind(&ctx2.listen, TEST_PIPENAME_3);
- ASSERT(r == 0);
-
- r = uv_listen((uv_stream_t*)&ctx2.listen, SOMAXCONN, listen_cb);
- ASSERT(r == 0);
- } else {
- r = uv_pipe_open(&ctx2.channel, 0);
- ASSERT(r == 0);
-
- send_recv_start();
- }
-
- r = uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- return 0;
-}
-
-/* stdin is a duplex channel over which a handle is sent.
- * We receive it and send it back where it came from.
- */
-int ipc_send_recv_helper(void) {
- int r;
-
- r = run_ipc_send_recv_helper(uv_default_loop(), 0);
- ASSERT(r == 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-void ipc_send_recv_helper_threadproc(void* arg) {
- int r;
- uv_loop_t loop;
-
- r = uv_loop_init(&loop);
- ASSERT(r == 0);
-
- r = run_ipc_send_recv_helper(&loop, 1);
- ASSERT(r == 0);
-
- r = uv_loop_close(&loop);
- ASSERT(r == 0);
-}
diff --git a/3rdparty/libuv/test/test-ipc.c b/3rdparty/libuv/test/test-ipc.c
deleted file mode 100644
index f018c2d4d49..00000000000
--- a/3rdparty/libuv/test/test-ipc.c
+++ /dev/null
@@ -1,779 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <stdio.h>
-#include <string.h>
-
-static uv_pipe_t channel;
-static uv_tcp_t tcp_server;
-static uv_tcp_t tcp_server2;
-static uv_tcp_t tcp_connection;
-
-static int exit_cb_called;
-static int read_cb_called;
-static int tcp_write_cb_called;
-static int tcp_read_cb_called;
-static int on_pipe_read_called;
-static int local_conn_accepted;
-static int remote_conn_accepted;
-static int tcp_server_listening;
-static uv_write_t write_req;
-static uv_write_t conn_notify_req;
-static int close_cb_called;
-static int connection_accepted;
-static int tcp_conn_read_cb_called;
-static int tcp_conn_write_cb_called;
-
-typedef struct {
- uv_connect_t conn_req;
- uv_write_t tcp_write_req;
- uv_tcp_t conn;
-} tcp_conn;
-
-#define CONN_COUNT 100
-#define BACKLOG 128
-
-
-static void close_server_conn_cb(uv_handle_t* handle) {
- free(handle);
-}
-
-
-static void on_connection(uv_stream_t* server, int status) {
- uv_tcp_t* conn;
- int r;
-
- if (!local_conn_accepted) {
- /* Accept the connection and close it. Also and close the server. */
- ASSERT(status == 0);
- ASSERT((uv_stream_t*)&tcp_server == server);
-
- conn = malloc(sizeof(*conn));
- ASSERT(conn);
- r = uv_tcp_init(server->loop, conn);
- ASSERT(r == 0);
-
- r = uv_accept(server, (uv_stream_t*)conn);
- ASSERT(r == 0);
-
- uv_close((uv_handle_t*)conn, close_server_conn_cb);
- uv_close((uv_handle_t*)server, NULL);
- local_conn_accepted = 1;
- }
-}
-
-
-static void exit_cb(uv_process_t* process,
- int64_t exit_status,
- int term_signal) {
- printf("exit_cb\n");
- exit_cb_called++;
- ASSERT(exit_status == 0);
- uv_close((uv_handle_t*)process, NULL);
-}
-
-
-static void on_alloc(uv_handle_t* handle,
- size_t suggested_size,
- uv_buf_t* buf) {
- buf->base = malloc(suggested_size);
- buf->len = suggested_size;
-}
-
-
-static void close_client_conn_cb(uv_handle_t* handle) {
- tcp_conn* p = (tcp_conn*)handle->data;
- free(p);
-}
-
-
-static void connect_cb(uv_connect_t* req, int status) {
- uv_close((uv_handle_t*)req->handle, close_client_conn_cb);
-}
-
-
-static void make_many_connections(void) {
- tcp_conn* conn;
- struct sockaddr_in addr;
- int r, i;
-
- for (i = 0; i < CONN_COUNT; i++) {
- conn = malloc(sizeof(*conn));
- ASSERT(conn);
-
- r = uv_tcp_init(uv_default_loop(), &conn->conn);
- ASSERT(r == 0);
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
-
- r = uv_tcp_connect(&conn->conn_req,
- (uv_tcp_t*) &conn->conn,
- (const struct sockaddr*) &addr,
- connect_cb);
- ASSERT(r == 0);
-
- conn->conn.data = conn;
- }
-}
-
-
-static void on_read(uv_stream_t* handle,
- ssize_t nread,
- const uv_buf_t* buf) {
- int r;
- uv_pipe_t* pipe;
- uv_handle_type pending;
- uv_buf_t outbuf;
-
- pipe = (uv_pipe_t*) handle;
-
- if (nread == 0) {
- /* Everything OK, but nothing read. */
- free(buf->base);
- return;
- }
-
- if (nread < 0) {
- if (nread == UV_EOF) {
- free(buf->base);
- return;
- }
-
- printf("error recving on channel: %s\n", uv_strerror(nread));
- abort();
- }
-
- fprintf(stderr, "got %d bytes\n", (int)nread);
-
- pending = uv_pipe_pending_type(pipe);
- if (!tcp_server_listening) {
- ASSERT(1 == uv_pipe_pending_count(pipe));
- ASSERT(nread > 0 && buf->base && pending != UV_UNKNOWN_HANDLE);
- read_cb_called++;
-
- /* Accept the pending TCP server, and start listening on it. */
- ASSERT(pending == UV_TCP);
- r = uv_tcp_init(uv_default_loop(), &tcp_server);
- ASSERT(r == 0);
-
- r = uv_accept((uv_stream_t*)pipe, (uv_stream_t*)&tcp_server);
- ASSERT(r == 0);
-
- r = uv_listen((uv_stream_t*)&tcp_server, BACKLOG, on_connection);
- ASSERT(r == 0);
-
- tcp_server_listening = 1;
-
- /* Make sure that the expected data is correctly multiplexed. */
- ASSERT(memcmp("hello\n", buf->base, nread) == 0);
-
- outbuf = uv_buf_init("world\n", 6);
- r = uv_write(&write_req, (uv_stream_t*)pipe, &outbuf, 1, NULL);
- ASSERT(r == 0);
-
- /* Create a bunch of connections to get both servers to accept. */
- make_many_connections();
- } else if (memcmp("accepted_connection\n", buf->base, nread) == 0) {
- /* Remote server has accepted a connection. Close the channel. */
- ASSERT(0 == uv_pipe_pending_count(pipe));
- ASSERT(pending == UV_UNKNOWN_HANDLE);
- remote_conn_accepted = 1;
- uv_close((uv_handle_t*)&channel, NULL);
- }
-
- free(buf->base);
-}
-
-#ifdef _WIN32
-static void on_read_listen_after_bound_twice(uv_stream_t* handle,
- ssize_t nread,
- const uv_buf_t* buf) {
- int r;
- uv_pipe_t* pipe;
- uv_handle_type pending;
-
- pipe = (uv_pipe_t*) handle;
-
- if (nread == 0) {
- /* Everything OK, but nothing read. */
- free(buf->base);
- return;
- }
-
- if (nread < 0) {
- if (nread == UV_EOF) {
- free(buf->base);
- return;
- }
-
- printf("error recving on channel: %s\n", uv_strerror(nread));
- abort();
- }
-
- fprintf(stderr, "got %d bytes\n", (int)nread);
-
- ASSERT(uv_pipe_pending_count(pipe) > 0);
- pending = uv_pipe_pending_type(pipe);
- ASSERT(nread > 0 && buf->base && pending != UV_UNKNOWN_HANDLE);
- read_cb_called++;
-
- if (read_cb_called == 1) {
- /* Accept the first TCP server, and start listening on it. */
- ASSERT(pending == UV_TCP);
- r = uv_tcp_init(uv_default_loop(), &tcp_server);
- ASSERT(r == 0);
-
- r = uv_accept((uv_stream_t*)pipe, (uv_stream_t*)&tcp_server);
- ASSERT(r == 0);
-
- r = uv_listen((uv_stream_t*)&tcp_server, BACKLOG, on_connection);
- ASSERT(r == 0);
- } else if (read_cb_called == 2) {
- /* Accept the second TCP server, and start listening on it. */
- ASSERT(pending == UV_TCP);
- r = uv_tcp_init(uv_default_loop(), &tcp_server2);
- ASSERT(r == 0);
-
- r = uv_accept((uv_stream_t*)pipe, (uv_stream_t*)&tcp_server2);
- ASSERT(r == 0);
-
- r = uv_listen((uv_stream_t*)&tcp_server2, BACKLOG, on_connection);
- ASSERT(r == UV_EADDRINUSE);
-
- uv_close((uv_handle_t*)&tcp_server, NULL);
- uv_close((uv_handle_t*)&tcp_server2, NULL);
- ASSERT(0 == uv_pipe_pending_count(pipe));
- uv_close((uv_handle_t*)&channel, NULL);
- }
-
- free(buf->base);
-}
-#endif
-
-void spawn_helper(uv_pipe_t* channel,
- uv_process_t* process,
- const char* helper) {
- uv_process_options_t options;
- size_t exepath_size;
- char exepath[1024];
- char* args[3];
- int r;
- uv_stdio_container_t stdio[1];
-
- r = uv_pipe_init(uv_default_loop(), channel, 1);
- ASSERT(r == 0);
- ASSERT(channel->ipc);
-
- exepath_size = sizeof(exepath);
- r = uv_exepath(exepath, &exepath_size);
- ASSERT(r == 0);
-
- exepath[exepath_size] = '\0';
- args[0] = exepath;
- args[1] = (char*)helper;
- args[2] = NULL;
-
- memset(&options, 0, sizeof(options));
- options.file = exepath;
- options.args = args;
- options.exit_cb = exit_cb;
-
- options.stdio = stdio;
- options.stdio[0].flags = UV_CREATE_PIPE |
- UV_READABLE_PIPE | UV_WRITABLE_PIPE;
- options.stdio[0].data.stream = (uv_stream_t*)channel;
- options.stdio_count = 1;
-
- r = uv_spawn(uv_default_loop(), process, &options);
- ASSERT(r == 0);
-}
-
-
-static void on_tcp_write(uv_write_t* req, int status) {
- ASSERT(status == 0);
- ASSERT(req->handle == (uv_stream_t*)&tcp_connection);
- tcp_write_cb_called++;
-}
-
-
-static void on_read_alloc(uv_handle_t* handle,
- size_t suggested_size,
- uv_buf_t* buf) {
- buf->base = malloc(suggested_size);
- buf->len = suggested_size;
-}
-
-
-static void on_tcp_read(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* buf) {
- ASSERT(nread > 0);
- ASSERT(memcmp("hello again\n", buf->base, nread) == 0);
- ASSERT(tcp == (uv_stream_t*)&tcp_connection);
- free(buf->base);
-
- tcp_read_cb_called++;
-
- uv_close((uv_handle_t*)tcp, NULL);
- uv_close((uv_handle_t*)&channel, NULL);
-}
-
-
-static void on_read_connection(uv_stream_t* handle,
- ssize_t nread,
- const uv_buf_t* buf) {
- int r;
- uv_buf_t outbuf;
- uv_pipe_t* pipe;
- uv_handle_type pending;
-
- pipe = (uv_pipe_t*) handle;
- if (nread == 0) {
- /* Everything OK, but nothing read. */
- free(buf->base);
- return;
- }
-
- if (nread < 0) {
- if (nread == UV_EOF) {
- free(buf->base);
- return;
- }
-
- printf("error recving on channel: %s\n", uv_strerror(nread));
- abort();
- }
-
- fprintf(stderr, "got %d bytes\n", (int)nread);
-
- ASSERT(1 == uv_pipe_pending_count(pipe));
- pending = uv_pipe_pending_type(pipe);
-
- ASSERT(nread > 0 && buf->base && pending != UV_UNKNOWN_HANDLE);
- read_cb_called++;
-
- /* Accept the pending TCP connection */
- ASSERT(pending == UV_TCP);
- r = uv_tcp_init(uv_default_loop(), &tcp_connection);
- ASSERT(r == 0);
-
- r = uv_accept(handle, (uv_stream_t*)&tcp_connection);
- ASSERT(r == 0);
-
- /* Make sure that the expected data is correctly multiplexed. */
- ASSERT(memcmp("hello\n", buf->base, nread) == 0);
-
- /* Write/read to/from the connection */
- outbuf = uv_buf_init("world\n", 6);
- r = uv_write(&write_req, (uv_stream_t*)&tcp_connection, &outbuf, 1,
- on_tcp_write);
- ASSERT(r == 0);
-
- r = uv_read_start((uv_stream_t*)&tcp_connection, on_read_alloc, on_tcp_read);
- ASSERT(r == 0);
-
- free(buf->base);
-}
-
-
-static int run_ipc_test(const char* helper, uv_read_cb read_cb) {
- uv_process_t process;
- int r;
-
- spawn_helper(&channel, &process, helper);
- uv_read_start((uv_stream_t*)&channel, on_alloc, read_cb);
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(ipc_listen_before_write) {
- int r = run_ipc_test("ipc_helper_listen_before_write", on_read);
- ASSERT(local_conn_accepted == 1);
- ASSERT(remote_conn_accepted == 1);
- ASSERT(read_cb_called == 1);
- ASSERT(exit_cb_called == 1);
- return r;
-}
-
-
-TEST_IMPL(ipc_listen_after_write) {
- int r = run_ipc_test("ipc_helper_listen_after_write", on_read);
- ASSERT(local_conn_accepted == 1);
- ASSERT(remote_conn_accepted == 1);
- ASSERT(read_cb_called == 1);
- ASSERT(exit_cb_called == 1);
- return r;
-}
-
-
-TEST_IMPL(ipc_tcp_connection) {
- int r = run_ipc_test("ipc_helper_tcp_connection", on_read_connection);
- ASSERT(read_cb_called == 1);
- ASSERT(tcp_write_cb_called == 1);
- ASSERT(tcp_read_cb_called == 1);
- ASSERT(exit_cb_called == 1);
- return r;
-}
-
-
-#ifdef _WIN32
-TEST_IMPL(listen_with_simultaneous_accepts) {
- uv_tcp_t server;
- int r;
- struct sockaddr_in addr;
-
- ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr));
-
- r = uv_tcp_init(uv_default_loop(), &server);
- ASSERT(r == 0);
-
- r = uv_tcp_bind(&server, (const struct sockaddr*) &addr, 0);
- ASSERT(r == 0);
-
- r = uv_tcp_simultaneous_accepts(&server, 1);
- ASSERT(r == 0);
-
- r = uv_listen((uv_stream_t*)&server, SOMAXCONN, NULL);
- ASSERT(r == 0);
- ASSERT(server.reqs_pending == 32);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(listen_no_simultaneous_accepts) {
- uv_tcp_t server;
- int r;
- struct sockaddr_in addr;
-
- ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr));
-
- r = uv_tcp_init(uv_default_loop(), &server);
- ASSERT(r == 0);
-
- r = uv_tcp_bind(&server, (const struct sockaddr*) &addr, 0);
- ASSERT(r == 0);
-
- r = uv_tcp_simultaneous_accepts(&server, 0);
- ASSERT(r == 0);
-
- r = uv_listen((uv_stream_t*)&server, SOMAXCONN, NULL);
- ASSERT(r == 0);
- ASSERT(server.reqs_pending == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-TEST_IMPL(ipc_listen_after_bind_twice) {
- int r = run_ipc_test("ipc_helper_bind_twice", on_read_listen_after_bound_twice);
- ASSERT(read_cb_called == 2);
- ASSERT(exit_cb_called == 1);
- return r;
-}
-#endif
-
-
-/* Everything here runs in a child process. */
-
-static tcp_conn conn;
-
-
-static void close_cb(uv_handle_t* handle) {
- close_cb_called++;
-}
-
-
-static void conn_notify_write_cb(uv_write_t* req, int status) {
- uv_close((uv_handle_t*)&tcp_server, close_cb);
- uv_close((uv_handle_t*)&channel, close_cb);
-}
-
-
-static void tcp_connection_write_cb(uv_write_t* req, int status) {
- ASSERT((uv_handle_t*)&conn.conn == (uv_handle_t*)req->handle);
- uv_close((uv_handle_t*)req->handle, close_cb);
- uv_close((uv_handle_t*)&channel, close_cb);
- uv_close((uv_handle_t*)&tcp_server, close_cb);
- tcp_conn_write_cb_called++;
-}
-
-
-static void on_tcp_child_process_read(uv_stream_t* tcp,
- ssize_t nread,
- const uv_buf_t* buf) {
- uv_buf_t outbuf;
- int r;
-
- if (nread < 0) {
- if (nread == UV_EOF) {
- free(buf->base);
- return;
- }
-
- printf("error recving on tcp connection: %s\n", uv_strerror(nread));
- abort();
- }
-
- ASSERT(nread > 0);
- ASSERT(memcmp("world\n", buf->base, nread) == 0);
- on_pipe_read_called++;
- free(buf->base);
-
- /* Write to the socket */
- outbuf = uv_buf_init("hello again\n", 12);
- r = uv_write(&conn.tcp_write_req, tcp, &outbuf, 1, tcp_connection_write_cb);
- ASSERT(r == 0);
-
- tcp_conn_read_cb_called++;
-}
-
-
-static void connect_child_process_cb(uv_connect_t* req, int status) {
- int r;
-
- ASSERT(status == 0);
- r = uv_read_start(req->handle, on_read_alloc, on_tcp_child_process_read);
- ASSERT(r == 0);
-}
-
-
-static void ipc_on_connection(uv_stream_t* server, int status) {
- int r;
- uv_buf_t buf;
-
- if (!connection_accepted) {
- /*
- * Accept the connection and close it. Also let the other
- * side know.
- */
- ASSERT(status == 0);
- ASSERT((uv_stream_t*)&tcp_server == server);
-
- r = uv_tcp_init(server->loop, &conn.conn);
- ASSERT(r == 0);
-
- r = uv_accept(server, (uv_stream_t*)&conn.conn);
- ASSERT(r == 0);
-
- uv_close((uv_handle_t*)&conn.conn, close_cb);
-
- buf = uv_buf_init("accepted_connection\n", 20);
- r = uv_write2(&conn_notify_req, (uv_stream_t*)&channel, &buf, 1,
- NULL, conn_notify_write_cb);
- ASSERT(r == 0);
-
- connection_accepted = 1;
- }
-}
-
-
-static void ipc_on_connection_tcp_conn(uv_stream_t* server, int status) {
- int r;
- uv_buf_t buf;
- uv_tcp_t* conn;
-
- ASSERT(status == 0);
- ASSERT((uv_stream_t*)&tcp_server == server);
-
- conn = malloc(sizeof(*conn));
- ASSERT(conn);
-
- r = uv_tcp_init(server->loop, conn);
- ASSERT(r == 0);
-
- r = uv_accept(server, (uv_stream_t*)conn);
- ASSERT(r == 0);
-
- /* Send the accepted connection to the other process */
- buf = uv_buf_init("hello\n", 6);
- r = uv_write2(&conn_notify_req, (uv_stream_t*)&channel, &buf, 1,
- (uv_stream_t*)conn, NULL);
- ASSERT(r == 0);
-
- r = uv_read_start((uv_stream_t*) conn,
- on_read_alloc,
- on_tcp_child_process_read);
- ASSERT(r == 0);
-
- uv_close((uv_handle_t*)conn, close_cb);
-}
-
-
-int ipc_helper(int listen_after_write) {
- /*
- * This is launched from test-ipc.c. stdin is a duplex channel that we
- * over which a handle will be transmitted.
- */
- struct sockaddr_in addr;
- uv_write_t write_req;
- int r;
- uv_buf_t buf;
-
- ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr));
-
- r = uv_pipe_init(uv_default_loop(), &channel, 1);
- ASSERT(r == 0);
-
- uv_pipe_open(&channel, 0);
-
- ASSERT(1 == uv_is_readable((uv_stream_t*) &channel));
- ASSERT(1 == uv_is_writable((uv_stream_t*) &channel));
- ASSERT(0 == uv_is_closing((uv_handle_t*) &channel));
-
- r = uv_tcp_init(uv_default_loop(), &tcp_server);
- ASSERT(r == 0);
-
- r = uv_tcp_bind(&tcp_server, (const struct sockaddr*) &addr, 0);
- ASSERT(r == 0);
-
- if (!listen_after_write) {
- r = uv_listen((uv_stream_t*)&tcp_server, BACKLOG, ipc_on_connection);
- ASSERT(r == 0);
- }
-
- buf = uv_buf_init("hello\n", 6);
- r = uv_write2(&write_req, (uv_stream_t*)&channel, &buf, 1,
- (uv_stream_t*)&tcp_server, NULL);
- ASSERT(r == 0);
-
- if (listen_after_write) {
- r = uv_listen((uv_stream_t*)&tcp_server, BACKLOG, ipc_on_connection);
- ASSERT(r == 0);
- }
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(connection_accepted == 1);
- ASSERT(close_cb_called == 3);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-int ipc_helper_tcp_connection(void) {
- /*
- * This is launched from test-ipc.c. stdin is a duplex channel
- * over which a handle will be transmitted.
- */
-
- int r;
- struct sockaddr_in addr;
-
- r = uv_pipe_init(uv_default_loop(), &channel, 1);
- ASSERT(r == 0);
-
- uv_pipe_open(&channel, 0);
-
- ASSERT(1 == uv_is_readable((uv_stream_t*) &channel));
- ASSERT(1 == uv_is_writable((uv_stream_t*) &channel));
- ASSERT(0 == uv_is_closing((uv_handle_t*) &channel));
-
- r = uv_tcp_init(uv_default_loop(), &tcp_server);
- ASSERT(r == 0);
-
- ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr));
-
- r = uv_tcp_bind(&tcp_server, (const struct sockaddr*) &addr, 0);
- ASSERT(r == 0);
-
- r = uv_listen((uv_stream_t*)&tcp_server, BACKLOG, ipc_on_connection_tcp_conn);
- ASSERT(r == 0);
-
- /* Make a connection to the server */
- r = uv_tcp_init(uv_default_loop(), &conn.conn);
- ASSERT(r == 0);
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
-
- r = uv_tcp_connect(&conn.conn_req,
- (uv_tcp_t*) &conn.conn,
- (const struct sockaddr*) &addr,
- connect_child_process_cb);
- ASSERT(r == 0);
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(tcp_conn_read_cb_called == 1);
- ASSERT(tcp_conn_write_cb_called == 1);
- ASSERT(close_cb_called == 4);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-int ipc_helper_bind_twice(void) {
- /*
- * This is launched from test-ipc.c. stdin is a duplex channel
- * over which two handles will be transmitted.
- */
- struct sockaddr_in addr;
- uv_write_t write_req;
- uv_write_t write_req2;
- int r;
- uv_buf_t buf;
-
- ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr));
-
- r = uv_pipe_init(uv_default_loop(), &channel, 1);
- ASSERT(r == 0);
-
- uv_pipe_open(&channel, 0);
-
- ASSERT(1 == uv_is_readable((uv_stream_t*) &channel));
- ASSERT(1 == uv_is_writable((uv_stream_t*) &channel));
- ASSERT(0 == uv_is_closing((uv_handle_t*) &channel));
-
- buf = uv_buf_init("hello\n", 6);
-
- r = uv_tcp_init(uv_default_loop(), &tcp_server);
- ASSERT(r == 0);
- r = uv_tcp_init(uv_default_loop(), &tcp_server2);
- ASSERT(r == 0);
-
- r = uv_tcp_bind(&tcp_server, (const struct sockaddr*) &addr, 0);
- ASSERT(r == 0);
- r = uv_tcp_bind(&tcp_server2, (const struct sockaddr*) &addr, 0);
- ASSERT(r == 0);
-
- r = uv_write2(&write_req, (uv_stream_t*)&channel, &buf, 1,
- (uv_stream_t*)&tcp_server, NULL);
- ASSERT(r == 0);
- r = uv_write2(&write_req2, (uv_stream_t*)&channel, &buf, 1,
- (uv_stream_t*)&tcp_server2, NULL);
- ASSERT(r == 0);
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-list.h b/3rdparty/libuv/test/test-list.h
deleted file mode 100644
index 858a20af49c..00000000000
--- a/3rdparty/libuv/test/test-list.h
+++ /dev/null
@@ -1,732 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-TEST_DECLARE (platform_output)
-TEST_DECLARE (callback_order)
-TEST_DECLARE (close_order)
-TEST_DECLARE (run_once)
-TEST_DECLARE (run_nowait)
-TEST_DECLARE (loop_alive)
-TEST_DECLARE (loop_close)
-TEST_DECLARE (loop_stop)
-TEST_DECLARE (loop_update_time)
-TEST_DECLARE (loop_backend_timeout)
-TEST_DECLARE (loop_configure)
-TEST_DECLARE (default_loop_close)
-TEST_DECLARE (barrier_1)
-TEST_DECLARE (barrier_2)
-TEST_DECLARE (barrier_3)
-TEST_DECLARE (condvar_1)
-TEST_DECLARE (condvar_2)
-TEST_DECLARE (condvar_3)
-TEST_DECLARE (condvar_4)
-TEST_DECLARE (condvar_5)
-TEST_DECLARE (semaphore_1)
-TEST_DECLARE (semaphore_2)
-TEST_DECLARE (semaphore_3)
-TEST_DECLARE (tty)
-TEST_DECLARE (tty_file)
-TEST_DECLARE (stdio_over_pipes)
-TEST_DECLARE (ip6_pton)
-TEST_DECLARE (ipc_listen_before_write)
-TEST_DECLARE (ipc_listen_after_write)
-#ifndef _WIN32
-TEST_DECLARE (ipc_send_recv_pipe)
-TEST_DECLARE (ipc_send_recv_pipe_inprocess)
-#endif
-TEST_DECLARE (ipc_send_recv_tcp)
-TEST_DECLARE (ipc_send_recv_tcp_inprocess)
-TEST_DECLARE (ipc_tcp_connection)
-TEST_DECLARE (tcp_ping_pong)
-TEST_DECLARE (tcp_ping_pong_v6)
-TEST_DECLARE (pipe_ping_pong)
-TEST_DECLARE (delayed_accept)
-TEST_DECLARE (multiple_listen)
-#ifndef _WIN32
-TEST_DECLARE (tcp_write_after_connect)
-#endif
-TEST_DECLARE (tcp_writealot)
-TEST_DECLARE (tcp_write_fail)
-TEST_DECLARE (tcp_try_write)
-TEST_DECLARE (tcp_write_queue_order)
-TEST_DECLARE (tcp_open)
-TEST_DECLARE (tcp_open_twice)
-TEST_DECLARE (tcp_connect_error_after_write)
-TEST_DECLARE (tcp_shutdown_after_write)
-TEST_DECLARE (tcp_bind_error_addrinuse)
-TEST_DECLARE (tcp_bind_error_addrnotavail_1)
-TEST_DECLARE (tcp_bind_error_addrnotavail_2)
-TEST_DECLARE (tcp_bind_error_fault)
-TEST_DECLARE (tcp_bind_error_inval)
-TEST_DECLARE (tcp_bind_localhost_ok)
-TEST_DECLARE (tcp_bind_invalid_flags)
-TEST_DECLARE (tcp_listen_without_bind)
-TEST_DECLARE (tcp_connect_error_fault)
-TEST_DECLARE (tcp_connect_timeout)
-TEST_DECLARE (tcp_close_while_connecting)
-TEST_DECLARE (tcp_close)
-TEST_DECLARE (tcp_create_early)
-TEST_DECLARE (tcp_create_early_bad_bind)
-TEST_DECLARE (tcp_create_early_bad_domain)
-TEST_DECLARE (tcp_create_early_accept)
-#ifndef _WIN32
-TEST_DECLARE (tcp_close_accept)
-TEST_DECLARE (tcp_oob)
-#endif
-TEST_DECLARE (tcp_flags)
-TEST_DECLARE (tcp_write_to_half_open_connection)
-TEST_DECLARE (tcp_unexpected_read)
-TEST_DECLARE (tcp_read_stop)
-TEST_DECLARE (tcp_bind6_error_addrinuse)
-TEST_DECLARE (tcp_bind6_error_addrnotavail)
-TEST_DECLARE (tcp_bind6_error_fault)
-TEST_DECLARE (tcp_bind6_error_inval)
-TEST_DECLARE (tcp_bind6_localhost_ok)
-TEST_DECLARE (udp_bind)
-TEST_DECLARE (udp_bind_reuseaddr)
-TEST_DECLARE (udp_create_early)
-TEST_DECLARE (udp_create_early_bad_bind)
-TEST_DECLARE (udp_create_early_bad_domain)
-TEST_DECLARE (udp_send_and_recv)
-TEST_DECLARE (udp_send_immediate)
-TEST_DECLARE (udp_send_unreachable)
-TEST_DECLARE (udp_multicast_join)
-TEST_DECLARE (udp_multicast_join6)
-TEST_DECLARE (udp_multicast_ttl)
-TEST_DECLARE (udp_multicast_interface)
-TEST_DECLARE (udp_multicast_interface6)
-TEST_DECLARE (udp_dgram_too_big)
-TEST_DECLARE (udp_dual_stack)
-TEST_DECLARE (udp_ipv6_only)
-TEST_DECLARE (udp_options)
-TEST_DECLARE (udp_options6)
-TEST_DECLARE (udp_no_autobind)
-TEST_DECLARE (udp_open)
-TEST_DECLARE (udp_open_twice)
-TEST_DECLARE (udp_try_send)
-TEST_DECLARE (pipe_bind_error_addrinuse)
-TEST_DECLARE (pipe_bind_error_addrnotavail)
-TEST_DECLARE (pipe_bind_error_inval)
-TEST_DECLARE (pipe_connect_multiple)
-TEST_DECLARE (pipe_listen_without_bind)
-TEST_DECLARE (pipe_connect_bad_name)
-TEST_DECLARE (pipe_connect_to_file)
-TEST_DECLARE (pipe_connect_on_prepare)
-TEST_DECLARE (pipe_getsockname)
-TEST_DECLARE (pipe_getsockname_abstract)
-TEST_DECLARE (pipe_getsockname_blocking)
-TEST_DECLARE (pipe_pending_instances)
-TEST_DECLARE (pipe_sendmsg)
-TEST_DECLARE (pipe_server_close)
-TEST_DECLARE (connection_fail)
-TEST_DECLARE (connection_fail_doesnt_auto_close)
-TEST_DECLARE (shutdown_close_tcp)
-TEST_DECLARE (shutdown_close_pipe)
-TEST_DECLARE (shutdown_eof)
-TEST_DECLARE (shutdown_twice)
-TEST_DECLARE (callback_stack)
-TEST_DECLARE (error_message)
-TEST_DECLARE (timer)
-TEST_DECLARE (timer_init)
-TEST_DECLARE (timer_again)
-TEST_DECLARE (timer_start_twice)
-TEST_DECLARE (timer_order)
-TEST_DECLARE (timer_huge_timeout)
-TEST_DECLARE (timer_huge_repeat)
-TEST_DECLARE (timer_run_once)
-TEST_DECLARE (timer_from_check)
-TEST_DECLARE (timer_null_callback)
-TEST_DECLARE (idle_starvation)
-TEST_DECLARE (loop_handles)
-TEST_DECLARE (get_loadavg)
-TEST_DECLARE (walk_handles)
-TEST_DECLARE (watcher_cross_stop)
-TEST_DECLARE (ref)
-TEST_DECLARE (idle_ref)
-TEST_DECLARE (async_ref)
-TEST_DECLARE (prepare_ref)
-TEST_DECLARE (check_ref)
-TEST_DECLARE (unref_in_prepare_cb)
-TEST_DECLARE (timer_ref)
-TEST_DECLARE (timer_ref2)
-TEST_DECLARE (fs_event_ref)
-TEST_DECLARE (fs_poll_ref)
-TEST_DECLARE (tcp_ref)
-TEST_DECLARE (tcp_ref2)
-TEST_DECLARE (tcp_ref2b)
-TEST_DECLARE (tcp_ref3)
-TEST_DECLARE (tcp_ref4)
-TEST_DECLARE (udp_ref)
-TEST_DECLARE (udp_ref2)
-TEST_DECLARE (udp_ref3)
-TEST_DECLARE (pipe_ref)
-TEST_DECLARE (pipe_ref2)
-TEST_DECLARE (pipe_ref3)
-TEST_DECLARE (pipe_ref4)
-#ifndef _WIN32
-TEST_DECLARE (pipe_close_stdout_read_stdin)
-#endif
-TEST_DECLARE (pipe_set_non_blocking)
-TEST_DECLARE (process_ref)
-TEST_DECLARE (has_ref)
-TEST_DECLARE (active)
-TEST_DECLARE (embed)
-TEST_DECLARE (async)
-TEST_DECLARE (async_null_cb)
-TEST_DECLARE (get_currentexe)
-TEST_DECLARE (process_title)
-TEST_DECLARE (cwd_and_chdir)
-TEST_DECLARE (get_memory)
-TEST_DECLARE (handle_fileno)
-TEST_DECLARE (homedir)
-TEST_DECLARE (hrtime)
-TEST_DECLARE (getaddrinfo_fail)
-TEST_DECLARE (getaddrinfo_fail_sync)
-TEST_DECLARE (getaddrinfo_basic)
-TEST_DECLARE (getaddrinfo_basic_sync)
-TEST_DECLARE (getaddrinfo_concurrent)
-TEST_DECLARE (getnameinfo_basic_ip4)
-TEST_DECLARE (getnameinfo_basic_ip4_sync)
-TEST_DECLARE (getnameinfo_basic_ip6)
-TEST_DECLARE (getsockname_tcp)
-TEST_DECLARE (getsockname_udp)
-TEST_DECLARE (fail_always)
-TEST_DECLARE (pass_always)
-TEST_DECLARE (socket_buffer_size)
-TEST_DECLARE (spawn_fails)
-#ifndef _WIN32
-TEST_DECLARE (spawn_fails_check_for_waitpid_cleanup)
-#endif
-TEST_DECLARE (spawn_exit_code)
-TEST_DECLARE (spawn_stdout)
-TEST_DECLARE (spawn_stdin)
-TEST_DECLARE (spawn_stdio_greater_than_3)
-TEST_DECLARE (spawn_ignored_stdio)
-TEST_DECLARE (spawn_and_kill)
-TEST_DECLARE (spawn_detached)
-TEST_DECLARE (spawn_and_kill_with_std)
-TEST_DECLARE (spawn_and_ping)
-TEST_DECLARE (spawn_preserve_env)
-TEST_DECLARE (spawn_setuid_fails)
-TEST_DECLARE (spawn_setgid_fails)
-TEST_DECLARE (spawn_stdout_to_file)
-TEST_DECLARE (spawn_stdout_and_stderr_to_file)
-TEST_DECLARE (spawn_stdout_and_stderr_to_file2)
-TEST_DECLARE (spawn_stdout_and_stderr_to_file_swap)
-TEST_DECLARE (spawn_auto_unref)
-TEST_DECLARE (spawn_closed_process_io)
-TEST_DECLARE (spawn_reads_child_path)
-TEST_DECLARE (spawn_inherit_streams)
-TEST_DECLARE (fs_poll)
-TEST_DECLARE (fs_poll_getpath)
-TEST_DECLARE (kill)
-TEST_DECLARE (fs_file_noent)
-TEST_DECLARE (fs_file_nametoolong)
-TEST_DECLARE (fs_file_loop)
-TEST_DECLARE (fs_file_async)
-TEST_DECLARE (fs_file_sync)
-TEST_DECLARE (fs_file_write_null_buffer)
-TEST_DECLARE (fs_async_dir)
-TEST_DECLARE (fs_async_sendfile)
-TEST_DECLARE (fs_mkdtemp)
-TEST_DECLARE (fs_fstat)
-TEST_DECLARE (fs_access)
-TEST_DECLARE (fs_chmod)
-TEST_DECLARE (fs_unlink_readonly)
-TEST_DECLARE (fs_chown)
-TEST_DECLARE (fs_link)
-TEST_DECLARE (fs_readlink)
-TEST_DECLARE (fs_realpath)
-TEST_DECLARE (fs_symlink)
-TEST_DECLARE (fs_symlink_dir)
-TEST_DECLARE (fs_utime)
-TEST_DECLARE (fs_futime)
-TEST_DECLARE (fs_file_open_append)
-TEST_DECLARE (fs_stat_missing_path)
-TEST_DECLARE (fs_read_file_eof)
-TEST_DECLARE (fs_event_watch_dir)
-TEST_DECLARE (fs_event_watch_dir_recursive)
-TEST_DECLARE (fs_event_watch_file)
-TEST_DECLARE (fs_event_watch_file_twice)
-TEST_DECLARE (fs_event_watch_file_current_dir)
-TEST_DECLARE (fs_event_no_callback_after_close)
-TEST_DECLARE (fs_event_no_callback_on_close)
-TEST_DECLARE (fs_event_immediate_close)
-TEST_DECLARE (fs_event_close_with_pending_event)
-TEST_DECLARE (fs_event_close_in_callback)
-TEST_DECLARE (fs_event_start_and_close)
-TEST_DECLARE (fs_event_error_reporting)
-TEST_DECLARE (fs_event_getpath)
-TEST_DECLARE (fs_scandir_empty_dir)
-TEST_DECLARE (fs_scandir_file)
-TEST_DECLARE (fs_open_dir)
-TEST_DECLARE (fs_rename_to_existing_file)
-TEST_DECLARE (fs_write_multiple_bufs)
-TEST_DECLARE (fs_read_write_null_arguments)
-TEST_DECLARE (fs_write_alotof_bufs)
-TEST_DECLARE (fs_write_alotof_bufs_with_offset)
-TEST_DECLARE (threadpool_queue_work_simple)
-TEST_DECLARE (threadpool_queue_work_einval)
-TEST_DECLARE (threadpool_multiple_event_loops)
-TEST_DECLARE (threadpool_cancel_getaddrinfo)
-TEST_DECLARE (threadpool_cancel_getnameinfo)
-TEST_DECLARE (threadpool_cancel_work)
-TEST_DECLARE (threadpool_cancel_fs)
-TEST_DECLARE (threadpool_cancel_single)
-TEST_DECLARE (thread_local_storage)
-TEST_DECLARE (thread_mutex)
-TEST_DECLARE (thread_rwlock)
-TEST_DECLARE (thread_rwlock_trylock)
-TEST_DECLARE (thread_create)
-TEST_DECLARE (thread_equal)
-TEST_DECLARE (dlerror)
-TEST_DECLARE (poll_duplex)
-TEST_DECLARE (poll_unidirectional)
-TEST_DECLARE (poll_close)
-
-TEST_DECLARE (ip4_addr)
-TEST_DECLARE (ip6_addr_link_local)
-
-#ifdef _WIN32
-TEST_DECLARE (poll_close_doesnt_corrupt_stack)
-TEST_DECLARE (poll_closesocket)
-TEST_DECLARE (spawn_detect_pipe_name_collisions_on_windows)
-#if !defined(USING_UV_SHARED)
-TEST_DECLARE (argument_escaping)
-TEST_DECLARE (environment_creation)
-#endif
-TEST_DECLARE (listen_with_simultaneous_accepts)
-TEST_DECLARE (listen_no_simultaneous_accepts)
-TEST_DECLARE (fs_stat_root)
-TEST_DECLARE (spawn_with_an_odd_path)
-TEST_DECLARE (ipc_listen_after_bind_twice)
-#else
-TEST_DECLARE (emfile)
-TEST_DECLARE (close_fd)
-TEST_DECLARE (spawn_fs_open)
-TEST_DECLARE (spawn_setuid_setgid)
-TEST_DECLARE (we_get_signal)
-TEST_DECLARE (we_get_signals)
-TEST_DECLARE (signal_multiple_loops)
-TEST_DECLARE (closed_fd_events)
-#endif
-#ifdef __APPLE__
-TEST_DECLARE (osx_select)
-TEST_DECLARE (osx_select_many_fds)
-#endif
-HELPER_DECLARE (tcp4_echo_server)
-HELPER_DECLARE (tcp6_echo_server)
-HELPER_DECLARE (udp4_echo_server)
-HELPER_DECLARE (pipe_echo_server)
-
-TEST_DECLARE (queue_foreach_delete)
-
-TASK_LIST_START
- TEST_ENTRY_CUSTOM (platform_output, 0, 1, 5000)
-
-#if 0
- TEST_ENTRY (callback_order)
-#endif
- TEST_ENTRY (close_order)
- TEST_ENTRY (run_once)
- TEST_ENTRY (run_nowait)
- TEST_ENTRY (loop_alive)
- TEST_ENTRY (loop_close)
- TEST_ENTRY (loop_stop)
- TEST_ENTRY (loop_update_time)
- TEST_ENTRY (loop_backend_timeout)
- TEST_ENTRY (loop_configure)
- TEST_ENTRY (default_loop_close)
- TEST_ENTRY (barrier_1)
- TEST_ENTRY (barrier_2)
- TEST_ENTRY (barrier_3)
- TEST_ENTRY (condvar_1)
- TEST_ENTRY (condvar_2)
- TEST_ENTRY (condvar_3)
- TEST_ENTRY (condvar_4)
- TEST_ENTRY (condvar_5)
- TEST_ENTRY (semaphore_1)
- TEST_ENTRY (semaphore_2)
- TEST_ENTRY (semaphore_3)
-
- TEST_ENTRY (pipe_connect_bad_name)
- TEST_ENTRY (pipe_connect_to_file)
- TEST_ENTRY (pipe_connect_on_prepare)
-
- TEST_ENTRY (pipe_server_close)
-#ifndef _WIN32
- TEST_ENTRY (pipe_close_stdout_read_stdin)
-#endif
- TEST_ENTRY (pipe_set_non_blocking)
- TEST_ENTRY (tty)
- TEST_ENTRY (tty_file)
- TEST_ENTRY (stdio_over_pipes)
- TEST_ENTRY (ip6_pton)
- TEST_ENTRY (ipc_listen_before_write)
- TEST_ENTRY (ipc_listen_after_write)
-#ifndef _WIN32
- TEST_ENTRY (ipc_send_recv_pipe)
- TEST_ENTRY (ipc_send_recv_pipe_inprocess)
-#endif
- TEST_ENTRY (ipc_send_recv_tcp)
- TEST_ENTRY (ipc_send_recv_tcp_inprocess)
- TEST_ENTRY (ipc_tcp_connection)
-
- TEST_ENTRY (tcp_ping_pong)
- TEST_HELPER (tcp_ping_pong, tcp4_echo_server)
-
- TEST_ENTRY (tcp_ping_pong_v6)
- TEST_HELPER (tcp_ping_pong_v6, tcp6_echo_server)
-
- TEST_ENTRY (pipe_ping_pong)
- TEST_HELPER (pipe_ping_pong, pipe_echo_server)
-
- TEST_ENTRY (delayed_accept)
- TEST_ENTRY (multiple_listen)
-
-#ifndef _WIN32
- TEST_ENTRY (tcp_write_after_connect)
-#endif
-
- TEST_ENTRY (tcp_writealot)
- TEST_HELPER (tcp_writealot, tcp4_echo_server)
-
- TEST_ENTRY (tcp_write_fail)
- TEST_HELPER (tcp_write_fail, tcp4_echo_server)
-
- TEST_ENTRY (tcp_try_write)
-
- TEST_ENTRY (tcp_write_queue_order)
-
- TEST_ENTRY (tcp_open)
- TEST_HELPER (tcp_open, tcp4_echo_server)
- TEST_ENTRY (tcp_open_twice)
-
- TEST_ENTRY (tcp_shutdown_after_write)
- TEST_HELPER (tcp_shutdown_after_write, tcp4_echo_server)
-
- TEST_ENTRY (tcp_connect_error_after_write)
- TEST_ENTRY (tcp_bind_error_addrinuse)
- TEST_ENTRY (tcp_bind_error_addrnotavail_1)
- TEST_ENTRY (tcp_bind_error_addrnotavail_2)
- TEST_ENTRY (tcp_bind_error_fault)
- TEST_ENTRY (tcp_bind_error_inval)
- TEST_ENTRY (tcp_bind_localhost_ok)
- TEST_ENTRY (tcp_bind_invalid_flags)
- TEST_ENTRY (tcp_listen_without_bind)
- TEST_ENTRY (tcp_connect_error_fault)
- TEST_ENTRY (tcp_connect_timeout)
- TEST_ENTRY (tcp_close_while_connecting)
- TEST_ENTRY (tcp_close)
- TEST_ENTRY (tcp_create_early)
- TEST_ENTRY (tcp_create_early_bad_bind)
- TEST_ENTRY (tcp_create_early_bad_domain)
- TEST_ENTRY (tcp_create_early_accept)
-#ifndef _WIN32
- TEST_ENTRY (tcp_close_accept)
- TEST_ENTRY (tcp_oob)
-#endif
- TEST_ENTRY (tcp_flags)
- TEST_ENTRY (tcp_write_to_half_open_connection)
- TEST_ENTRY (tcp_unexpected_read)
-
- TEST_ENTRY (tcp_read_stop)
- TEST_HELPER (tcp_read_stop, tcp4_echo_server)
-
- TEST_ENTRY (tcp_bind6_error_addrinuse)
- TEST_ENTRY (tcp_bind6_error_addrnotavail)
- TEST_ENTRY (tcp_bind6_error_fault)
- TEST_ENTRY (tcp_bind6_error_inval)
- TEST_ENTRY (tcp_bind6_localhost_ok)
-
- TEST_ENTRY (udp_bind)
- TEST_ENTRY (udp_bind_reuseaddr)
- TEST_ENTRY (udp_create_early)
- TEST_ENTRY (udp_create_early_bad_bind)
- TEST_ENTRY (udp_create_early_bad_domain)
- TEST_ENTRY (udp_send_and_recv)
- TEST_ENTRY (udp_send_immediate)
- TEST_ENTRY (udp_send_unreachable)
- TEST_ENTRY (udp_dgram_too_big)
- TEST_ENTRY (udp_dual_stack)
- TEST_ENTRY (udp_ipv6_only)
- TEST_ENTRY (udp_options)
- TEST_ENTRY (udp_options6)
- TEST_ENTRY (udp_no_autobind)
- TEST_ENTRY (udp_multicast_interface)
- TEST_ENTRY (udp_multicast_interface6)
- TEST_ENTRY (udp_multicast_join)
- TEST_ENTRY (udp_multicast_join6)
- TEST_ENTRY (udp_multicast_ttl)
- TEST_ENTRY (udp_try_send)
-
- TEST_ENTRY (udp_open)
- TEST_HELPER (udp_open, udp4_echo_server)
- TEST_ENTRY (udp_open_twice)
-
- TEST_ENTRY (pipe_bind_error_addrinuse)
- TEST_ENTRY (pipe_bind_error_addrnotavail)
- TEST_ENTRY (pipe_bind_error_inval)
- TEST_ENTRY (pipe_connect_multiple)
- TEST_ENTRY (pipe_listen_without_bind)
- TEST_ENTRY (pipe_getsockname)
- TEST_ENTRY (pipe_getsockname_abstract)
- TEST_ENTRY (pipe_getsockname_blocking)
- TEST_ENTRY (pipe_pending_instances)
- TEST_ENTRY (pipe_sendmsg)
-
- TEST_ENTRY (connection_fail)
- TEST_ENTRY (connection_fail_doesnt_auto_close)
-
- TEST_ENTRY (shutdown_close_tcp)
- TEST_HELPER (shutdown_close_tcp, tcp4_echo_server)
- TEST_ENTRY (shutdown_close_pipe)
- TEST_HELPER (shutdown_close_pipe, pipe_echo_server)
-
- TEST_ENTRY (shutdown_eof)
- TEST_HELPER (shutdown_eof, tcp4_echo_server)
-
- TEST_ENTRY (shutdown_twice)
- TEST_HELPER (shutdown_twice, tcp4_echo_server)
-
- TEST_ENTRY (callback_stack)
- TEST_HELPER (callback_stack, tcp4_echo_server)
-
- TEST_ENTRY (error_message)
-
- TEST_ENTRY (timer)
- TEST_ENTRY (timer_init)
- TEST_ENTRY (timer_again)
- TEST_ENTRY (timer_start_twice)
- TEST_ENTRY (timer_order)
- TEST_ENTRY (timer_huge_timeout)
- TEST_ENTRY (timer_huge_repeat)
- TEST_ENTRY (timer_run_once)
- TEST_ENTRY (timer_from_check)
- TEST_ENTRY (timer_null_callback)
-
- TEST_ENTRY (idle_starvation)
-
- TEST_ENTRY (ref)
- TEST_ENTRY (idle_ref)
- TEST_ENTRY (fs_poll_ref)
- TEST_ENTRY (async_ref)
- TEST_ENTRY (prepare_ref)
- TEST_ENTRY (check_ref)
- TEST_ENTRY (unref_in_prepare_cb)
- TEST_ENTRY (timer_ref)
- TEST_ENTRY (timer_ref2)
- TEST_ENTRY (fs_event_ref)
- TEST_ENTRY (tcp_ref)
- TEST_ENTRY (tcp_ref2)
- TEST_ENTRY (tcp_ref2b)
- TEST_ENTRY (tcp_ref3)
- TEST_HELPER (tcp_ref3, tcp4_echo_server)
- TEST_ENTRY (tcp_ref4)
- TEST_HELPER (tcp_ref4, tcp4_echo_server)
- TEST_ENTRY (udp_ref)
- TEST_ENTRY (udp_ref2)
- TEST_ENTRY (udp_ref3)
- TEST_HELPER (udp_ref3, udp4_echo_server)
- TEST_ENTRY (pipe_ref)
- TEST_ENTRY (pipe_ref2)
- TEST_ENTRY (pipe_ref3)
- TEST_HELPER (pipe_ref3, pipe_echo_server)
- TEST_ENTRY (pipe_ref4)
- TEST_HELPER (pipe_ref4, pipe_echo_server)
- TEST_ENTRY (process_ref)
- TEST_ENTRY (has_ref)
-
- TEST_ENTRY (loop_handles)
- TEST_ENTRY (walk_handles)
-
- TEST_ENTRY (watcher_cross_stop)
-
- TEST_ENTRY (active)
-
- TEST_ENTRY (embed)
-
- TEST_ENTRY (async)
- TEST_ENTRY (async_null_cb)
-
- TEST_ENTRY (get_currentexe)
-
- TEST_ENTRY (process_title)
-
- TEST_ENTRY (cwd_and_chdir)
-
- TEST_ENTRY (get_memory)
-
- TEST_ENTRY (get_loadavg)
-
- TEST_ENTRY (handle_fileno)
-
- TEST_ENTRY (homedir)
-
- TEST_ENTRY (hrtime)
-
- TEST_ENTRY_CUSTOM (getaddrinfo_fail, 0, 0, 10000)
- TEST_ENTRY (getaddrinfo_fail_sync)
-
- TEST_ENTRY (getaddrinfo_basic)
- TEST_ENTRY (getaddrinfo_basic_sync)
- TEST_ENTRY (getaddrinfo_concurrent)
-
- TEST_ENTRY (getnameinfo_basic_ip4)
- TEST_ENTRY (getnameinfo_basic_ip4_sync)
- TEST_ENTRY (getnameinfo_basic_ip6)
-
- TEST_ENTRY (getsockname_tcp)
- TEST_ENTRY (getsockname_udp)
-
- TEST_ENTRY (poll_duplex)
- TEST_ENTRY (poll_unidirectional)
- TEST_ENTRY (poll_close)
-
- TEST_ENTRY (socket_buffer_size)
-
- TEST_ENTRY (spawn_fails)
-#ifndef _WIN32
- TEST_ENTRY (spawn_fails_check_for_waitpid_cleanup)
-#endif
- TEST_ENTRY (spawn_exit_code)
- TEST_ENTRY (spawn_stdout)
- TEST_ENTRY (spawn_stdin)
- TEST_ENTRY (spawn_stdio_greater_than_3)
- TEST_ENTRY (spawn_ignored_stdio)
- TEST_ENTRY (spawn_and_kill)
- TEST_ENTRY (spawn_detached)
- TEST_ENTRY (spawn_and_kill_with_std)
- TEST_ENTRY (spawn_and_ping)
- TEST_ENTRY (spawn_preserve_env)
- TEST_ENTRY (spawn_setuid_fails)
- TEST_ENTRY (spawn_setgid_fails)
- TEST_ENTRY (spawn_stdout_to_file)
- TEST_ENTRY (spawn_stdout_and_stderr_to_file)
- TEST_ENTRY (spawn_stdout_and_stderr_to_file2)
- TEST_ENTRY (spawn_stdout_and_stderr_to_file_swap)
- TEST_ENTRY (spawn_auto_unref)
- TEST_ENTRY (spawn_closed_process_io)
- TEST_ENTRY (spawn_reads_child_path)
- TEST_ENTRY (spawn_inherit_streams)
- TEST_ENTRY (fs_poll)
- TEST_ENTRY (fs_poll_getpath)
- TEST_ENTRY (kill)
-
-#ifdef _WIN32
- TEST_ENTRY (poll_close_doesnt_corrupt_stack)
- TEST_ENTRY (poll_closesocket)
- TEST_ENTRY (spawn_detect_pipe_name_collisions_on_windows)
-#if !defined(USING_UV_SHARED)
- TEST_ENTRY (argument_escaping)
- TEST_ENTRY (environment_creation)
-# endif
- TEST_ENTRY (listen_with_simultaneous_accepts)
- TEST_ENTRY (listen_no_simultaneous_accepts)
- TEST_ENTRY (fs_stat_root)
- TEST_ENTRY (spawn_with_an_odd_path)
- TEST_ENTRY (ipc_listen_after_bind_twice)
-#else
- TEST_ENTRY (emfile)
- TEST_ENTRY (close_fd)
- TEST_ENTRY (spawn_fs_open)
- TEST_ENTRY (spawn_setuid_setgid)
- TEST_ENTRY (we_get_signal)
- TEST_ENTRY (we_get_signals)
- TEST_ENTRY (signal_multiple_loops)
- TEST_ENTRY (closed_fd_events)
-#endif
-
-#ifdef __APPLE__
- TEST_ENTRY (osx_select)
- TEST_ENTRY (osx_select_many_fds)
-#endif
-
- TEST_ENTRY (fs_file_noent)
- TEST_ENTRY (fs_file_nametoolong)
- TEST_ENTRY (fs_file_loop)
- TEST_ENTRY (fs_file_async)
- TEST_ENTRY (fs_file_sync)
- TEST_ENTRY (fs_file_write_null_buffer)
- TEST_ENTRY (fs_async_dir)
- TEST_ENTRY (fs_async_sendfile)
- TEST_ENTRY (fs_mkdtemp)
- TEST_ENTRY (fs_fstat)
- TEST_ENTRY (fs_access)
- TEST_ENTRY (fs_chmod)
- TEST_ENTRY (fs_unlink_readonly)
- TEST_ENTRY (fs_chown)
- TEST_ENTRY (fs_utime)
- TEST_ENTRY (fs_futime)
- TEST_ENTRY (fs_readlink)
- TEST_ENTRY (fs_realpath)
- TEST_ENTRY (fs_symlink)
- TEST_ENTRY (fs_symlink_dir)
- TEST_ENTRY (fs_stat_missing_path)
- TEST_ENTRY (fs_read_file_eof)
- TEST_ENTRY (fs_file_open_append)
- TEST_ENTRY (fs_event_watch_dir)
- TEST_ENTRY (fs_event_watch_dir_recursive)
- TEST_ENTRY (fs_event_watch_file)
- TEST_ENTRY (fs_event_watch_file_twice)
- TEST_ENTRY (fs_event_watch_file_current_dir)
- TEST_ENTRY (fs_event_no_callback_after_close)
- TEST_ENTRY (fs_event_no_callback_on_close)
- TEST_ENTRY (fs_event_immediate_close)
- TEST_ENTRY (fs_event_close_with_pending_event)
- TEST_ENTRY (fs_event_close_in_callback)
- TEST_ENTRY (fs_event_start_and_close)
- TEST_ENTRY (fs_event_error_reporting)
- TEST_ENTRY (fs_event_getpath)
- TEST_ENTRY (fs_scandir_empty_dir)
- TEST_ENTRY (fs_scandir_file)
- TEST_ENTRY (fs_open_dir)
- TEST_ENTRY (fs_rename_to_existing_file)
- TEST_ENTRY (fs_write_multiple_bufs)
- TEST_ENTRY (fs_write_alotof_bufs)
- TEST_ENTRY (fs_write_alotof_bufs_with_offset)
- TEST_ENTRY (fs_read_write_null_arguments)
- TEST_ENTRY (threadpool_queue_work_simple)
- TEST_ENTRY (threadpool_queue_work_einval)
- TEST_ENTRY (threadpool_multiple_event_loops)
- TEST_ENTRY (threadpool_cancel_getaddrinfo)
- TEST_ENTRY (threadpool_cancel_getnameinfo)
- TEST_ENTRY (threadpool_cancel_work)
- TEST_ENTRY (threadpool_cancel_fs)
- TEST_ENTRY (threadpool_cancel_single)
- TEST_ENTRY (thread_local_storage)
- TEST_ENTRY (thread_mutex)
- TEST_ENTRY (thread_rwlock)
- TEST_ENTRY (thread_rwlock_trylock)
- TEST_ENTRY (thread_create)
- TEST_ENTRY (thread_equal)
- TEST_ENTRY (dlerror)
- TEST_ENTRY (ip4_addr)
- TEST_ENTRY (ip6_addr_link_local)
-
- TEST_ENTRY (queue_foreach_delete)
-
-#if 0
- /* These are for testing the test runner. */
- TEST_ENTRY (fail_always)
- TEST_ENTRY (pass_always)
-#endif
-TASK_LIST_END
diff --git a/3rdparty/libuv/test/test-loop-alive.c b/3rdparty/libuv/test/test-loop-alive.c
deleted file mode 100644
index cf4d301930c..00000000000
--- a/3rdparty/libuv/test/test-loop-alive.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-static uv_timer_t timer_handle;
-
-static void timer_cb(uv_timer_t* handle) {
- ASSERT(handle);
-}
-
-
-static uv_work_t work_req;
-
-static void work_cb(uv_work_t* req) {
- ASSERT(req);
-}
-
-static void after_work_cb(uv_work_t* req, int status) {
- ASSERT(req);
- ASSERT(status == 0);
-}
-
-
-TEST_IMPL(loop_alive) {
- int r;
- ASSERT(!uv_loop_alive(uv_default_loop()));
-
- /* loops with handles are alive */
- uv_timer_init(uv_default_loop(), &timer_handle);
- uv_timer_start(&timer_handle, timer_cb, 100, 0);
- ASSERT(uv_loop_alive(uv_default_loop()));
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
- ASSERT(!uv_loop_alive(uv_default_loop()));
-
- /* loops with requests are alive */
- r = uv_queue_work(uv_default_loop(), &work_req, work_cb, after_work_cb);
- ASSERT(r == 0);
- ASSERT(uv_loop_alive(uv_default_loop()));
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
- ASSERT(!uv_loop_alive(uv_default_loop()));
-
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-loop-close.c b/3rdparty/libuv/test/test-loop-close.c
deleted file mode 100644
index 5aec234ed03..00000000000
--- a/3rdparty/libuv/test/test-loop-close.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-static uv_timer_t timer_handle;
-
-static void timer_cb(uv_timer_t* handle) {
- ASSERT(handle);
- uv_stop(handle->loop);
-}
-
-
-TEST_IMPL(loop_close) {
- int r;
- uv_loop_t loop;
-
- ASSERT(0 == uv_loop_init(&loop));
-
- uv_timer_init(&loop, &timer_handle);
- uv_timer_start(&timer_handle, timer_cb, 100, 100);
-
- ASSERT(UV_EBUSY == uv_loop_close(&loop));
-
- uv_run(&loop, UV_RUN_DEFAULT);
-
- uv_close((uv_handle_t*) &timer_handle, NULL);
- r = uv_run(&loop, UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(0 == uv_loop_close(&loop));
-
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-loop-configure.c b/3rdparty/libuv/test/test-loop-configure.c
deleted file mode 100644
index d057c1ed8a7..00000000000
--- a/3rdparty/libuv/test/test-loop-configure.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Copyright (c) 2014, Ben Noordhuis <info@bnoordhuis.nl>
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-static void timer_cb(uv_timer_t* handle) {
- uv_close((uv_handle_t*) handle, NULL);
-}
-
-
-TEST_IMPL(loop_configure) {
- uv_timer_t timer_handle;
- uv_loop_t loop;
- ASSERT(0 == uv_loop_init(&loop));
-#ifdef _WIN32
- ASSERT(UV_ENOSYS == uv_loop_configure(&loop, UV_LOOP_BLOCK_SIGNAL, 0));
-#else
- ASSERT(0 == uv_loop_configure(&loop, UV_LOOP_BLOCK_SIGNAL, SIGPROF));
-#endif
- ASSERT(0 == uv_timer_init(&loop, &timer_handle));
- ASSERT(0 == uv_timer_start(&timer_handle, timer_cb, 10, 0));
- ASSERT(0 == uv_run(&loop, UV_RUN_DEFAULT));
- ASSERT(0 == uv_loop_close(&loop));
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-loop-handles.c b/3rdparty/libuv/test/test-loop-handles.c
deleted file mode 100644
index c3e8498ae90..00000000000
--- a/3rdparty/libuv/test/test-loop-handles.c
+++ /dev/null
@@ -1,337 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-/* Tests commented out with XXX are ones that are failing on Linux */
-
-/*
- * Purpose of this test is to check semantics of starting and stopping
- * prepare, check and idle watchers.
- *
- * - A watcher must be able to safely stop or close itself;
- * - Once a watcher is stopped or closed its callback should never be called.
- * - If a watcher is closed, it is implicitly stopped and its close_cb should
- * be called exactly once.
- * - A watcher can safely start and stop other watchers of the same type.
- * - Prepare and check watchers are called once per event loop iterations.
- * - All active idle watchers are queued when the event loop has no more work
- * to do. This is done repeatedly until all idle watchers are inactive.
- * - If a watcher starts another watcher of the same type its callback is not
- * immediately queued. For check and prepare watchers, that means that if
- * a watcher makes another of the same type active, it'll not be called until
- * the next event loop iteration. For idle. watchers this means that the
- * newly activated idle watcher might not be queued immediately.
- * - Prepare, check, idle watchers keep the event loop alive even when they're
- * not active.
- *
- * This is what the test globally does:
- *
- * - prepare_1 is always active and counts event loop iterations. It also
- * creates and starts prepare_2 every other iteration. Finally it verifies
- * that no idle watchers are active before polling.
- * - prepare_2 is started by prepare_1 every other iteration. It immediately
- * stops itself. It verifies that a watcher is not queued immediately
- * if created by another watcher of the same type.
- * - There's a check watcher that stops the event loop after a certain number
- * of iterations. It starts a varying number of idle_1 watchers.
- * - Idle_1 watchers stop themselves after being called a few times. All idle_1
- * watchers try to start the idle_2 watcher if it is not already started or
- * awaiting its close callback.
- * - The idle_2 watcher always exists but immediately closes itself after
- * being started by a check_1 watcher. It verifies that a watcher is
- * implicitly stopped when closed, and that a watcher can close itself
- * safely.
- * - There is a repeating timer. It does not keep the event loop alive
- * (ev_unref) but makes sure that the loop keeps polling the system for
- * events.
- */
-
-
-#include "uv.h"
-#include "task.h"
-
-#include <math.h>
-
-
-#define IDLE_COUNT 7
-#define ITERATIONS 21
-#define TIMEOUT 100
-
-
-static uv_prepare_t prepare_1_handle;
-static uv_prepare_t prepare_2_handle;
-
-static uv_check_t check_handle;
-
-static uv_idle_t idle_1_handles[IDLE_COUNT];
-static uv_idle_t idle_2_handle;
-
-static uv_timer_t timer_handle;
-
-
-static int loop_iteration = 0;
-
-static int prepare_1_cb_called = 0;
-static int prepare_1_close_cb_called = 0;
-
-static int prepare_2_cb_called = 0;
-static int prepare_2_close_cb_called = 0;
-
-static int check_cb_called = 0;
-static int check_close_cb_called = 0;
-
-static int idle_1_cb_called = 0;
-static int idle_1_close_cb_called = 0;
-static int idles_1_active = 0;
-
-static int idle_2_cb_called = 0;
-static int idle_2_close_cb_called = 0;
-static int idle_2_cb_started = 0;
-static int idle_2_is_active = 0;
-
-
-static void timer_cb(uv_timer_t* handle) {
- ASSERT(handle == &timer_handle);
-}
-
-
-static void idle_2_close_cb(uv_handle_t* handle) {
- fprintf(stderr, "%s", "IDLE_2_CLOSE_CB\n");
- fflush(stderr);
-
- ASSERT(handle == (uv_handle_t*)&idle_2_handle);
-
- ASSERT(idle_2_is_active);
-
- idle_2_close_cb_called++;
- idle_2_is_active = 0;
-}
-
-
-static void idle_2_cb(uv_idle_t* handle) {
- fprintf(stderr, "%s", "IDLE_2_CB\n");
- fflush(stderr);
-
- ASSERT(handle == &idle_2_handle);
-
- idle_2_cb_called++;
-
- uv_close((uv_handle_t*)handle, idle_2_close_cb);
-}
-
-
-static void idle_1_cb(uv_idle_t* handle) {
- int r;
-
- fprintf(stderr, "%s", "IDLE_1_CB\n");
- fflush(stderr);
-
- ASSERT(handle != NULL);
- ASSERT(idles_1_active > 0);
-
- /* Init idle_2 and make it active */
- if (!idle_2_is_active && !uv_is_closing((uv_handle_t*)&idle_2_handle)) {
- r = uv_idle_init(uv_default_loop(), &idle_2_handle);
- ASSERT(r == 0);
- r = uv_idle_start(&idle_2_handle, idle_2_cb);
- ASSERT(r == 0);
- idle_2_is_active = 1;
- idle_2_cb_started++;
- }
-
- idle_1_cb_called++;
-
- if (idle_1_cb_called % 5 == 0) {
- r = uv_idle_stop((uv_idle_t*)handle);
- ASSERT(r == 0);
- idles_1_active--;
- }
-}
-
-
-static void idle_1_close_cb(uv_handle_t* handle) {
- fprintf(stderr, "%s", "IDLE_1_CLOSE_CB\n");
- fflush(stderr);
-
- ASSERT(handle != NULL);
-
- idle_1_close_cb_called++;
-}
-
-
-static void prepare_1_close_cb(uv_handle_t* handle) {
- fprintf(stderr, "%s", "PREPARE_1_CLOSE_CB");
- fflush(stderr);
- ASSERT(handle == (uv_handle_t*)&prepare_1_handle);
-
- prepare_1_close_cb_called++;
-}
-
-
-static void check_close_cb(uv_handle_t* handle) {
- fprintf(stderr, "%s", "CHECK_CLOSE_CB\n");
- fflush(stderr);
- ASSERT(handle == (uv_handle_t*)&check_handle);
-
- check_close_cb_called++;
-}
-
-
-static void prepare_2_close_cb(uv_handle_t* handle) {
- fprintf(stderr, "%s", "PREPARE_2_CLOSE_CB\n");
- fflush(stderr);
- ASSERT(handle == (uv_handle_t*)&prepare_2_handle);
-
- prepare_2_close_cb_called++;
-}
-
-
-static void check_cb(uv_check_t* handle) {
- int i, r;
-
- fprintf(stderr, "%s", "CHECK_CB\n");
- fflush(stderr);
- ASSERT(handle == &check_handle);
-
- if (loop_iteration < ITERATIONS) {
- /* Make some idle watchers active */
- for (i = 0; i < 1 + (loop_iteration % IDLE_COUNT); i++) {
- r = uv_idle_start(&idle_1_handles[i], idle_1_cb);
- ASSERT(r == 0);
- idles_1_active++;
- }
-
- } else {
- /* End of the test - close all handles */
- uv_close((uv_handle_t*)&prepare_1_handle, prepare_1_close_cb);
- uv_close((uv_handle_t*)&check_handle, check_close_cb);
- uv_close((uv_handle_t*)&prepare_2_handle, prepare_2_close_cb);
-
- for (i = 0; i < IDLE_COUNT; i++) {
- uv_close((uv_handle_t*)&idle_1_handles[i], idle_1_close_cb);
- }
-
- /* This handle is closed/recreated every time, close it only if it is */
- /* active.*/
- if (idle_2_is_active) {
- uv_close((uv_handle_t*)&idle_2_handle, idle_2_close_cb);
- }
- }
-
- check_cb_called++;
-}
-
-
-static void prepare_2_cb(uv_prepare_t* handle) {
- int r;
-
- fprintf(stderr, "%s", "PREPARE_2_CB\n");
- fflush(stderr);
- ASSERT(handle == &prepare_2_handle);
-
- /* prepare_2 gets started by prepare_1 when (loop_iteration % 2 == 0), */
- /* and it stops itself immediately. A started watcher is not queued */
- /* until the next round, so when this callback is made */
- /* (loop_iteration % 2 == 0) cannot be true. */
- ASSERT(loop_iteration % 2 != 0);
-
- r = uv_prepare_stop((uv_prepare_t*)handle);
- ASSERT(r == 0);
-
- prepare_2_cb_called++;
-}
-
-
-static void prepare_1_cb(uv_prepare_t* handle) {
- int r;
-
- fprintf(stderr, "%s", "PREPARE_1_CB\n");
- fflush(stderr);
- ASSERT(handle == &prepare_1_handle);
-
- if (loop_iteration % 2 == 0) {
- r = uv_prepare_start(&prepare_2_handle, prepare_2_cb);
- ASSERT(r == 0);
- }
-
- prepare_1_cb_called++;
- loop_iteration++;
-
- printf("Loop iteration %d of %d.\n", loop_iteration, ITERATIONS);
-}
-
-
-TEST_IMPL(loop_handles) {
- int i;
- int r;
-
- r = uv_prepare_init(uv_default_loop(), &prepare_1_handle);
- ASSERT(r == 0);
- r = uv_prepare_start(&prepare_1_handle, prepare_1_cb);
- ASSERT(r == 0);
-
- r = uv_check_init(uv_default_loop(), &check_handle);
- ASSERT(r == 0);
- r = uv_check_start(&check_handle, check_cb);
- ASSERT(r == 0);
-
- /* initialize only, prepare_2 is started by prepare_1_cb */
- r = uv_prepare_init(uv_default_loop(), &prepare_2_handle);
- ASSERT(r == 0);
-
- for (i = 0; i < IDLE_COUNT; i++) {
- /* initialize only, idle_1 handles are started by check_cb */
- r = uv_idle_init(uv_default_loop(), &idle_1_handles[i]);
- ASSERT(r == 0);
- }
-
- /* don't init or start idle_2, both is done by idle_1_cb */
-
- /* the timer callback is there to keep the event loop polling */
- /* unref it as it is not supposed to keep the loop alive */
- r = uv_timer_init(uv_default_loop(), &timer_handle);
- ASSERT(r == 0);
- r = uv_timer_start(&timer_handle, timer_cb, TIMEOUT, TIMEOUT);
- ASSERT(r == 0);
- uv_unref((uv_handle_t*)&timer_handle);
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(loop_iteration == ITERATIONS);
-
- ASSERT(prepare_1_cb_called == ITERATIONS);
- ASSERT(prepare_1_close_cb_called == 1);
-
- ASSERT(prepare_2_cb_called == floor(ITERATIONS / 2.0));
- ASSERT(prepare_2_close_cb_called == 1);
-
- ASSERT(check_cb_called == ITERATIONS);
- ASSERT(check_close_cb_called == 1);
-
- /* idle_1_cb should be called a lot */
- ASSERT(idle_1_close_cb_called == IDLE_COUNT);
-
- ASSERT(idle_2_close_cb_called == idle_2_cb_started);
- ASSERT(idle_2_is_active == 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-loop-stop.c b/3rdparty/libuv/test/test-loop-stop.c
deleted file mode 100644
index 14b8c11186c..00000000000
--- a/3rdparty/libuv/test/test-loop-stop.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-static uv_prepare_t prepare_handle;
-static uv_timer_t timer_handle;
-static int prepare_called = 0;
-static int timer_called = 0;
-static int num_ticks = 10;
-
-
-static void prepare_cb(uv_prepare_t* handle) {
- ASSERT(handle == &prepare_handle);
- prepare_called++;
- if (prepare_called == num_ticks)
- uv_prepare_stop(handle);
-}
-
-
-static void timer_cb(uv_timer_t* handle) {
- ASSERT(handle == &timer_handle);
- timer_called++;
- if (timer_called == 1)
- uv_stop(uv_default_loop());
- else if (timer_called == num_ticks)
- uv_timer_stop(handle);
-}
-
-
-TEST_IMPL(loop_stop) {
- int r;
- uv_prepare_init(uv_default_loop(), &prepare_handle);
- uv_prepare_start(&prepare_handle, prepare_cb);
- uv_timer_init(uv_default_loop(), &timer_handle);
- uv_timer_start(&timer_handle, timer_cb, 100, 100);
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r != 0);
- ASSERT(timer_called == 1);
-
- r = uv_run(uv_default_loop(), UV_RUN_NOWAIT);
- ASSERT(r != 0);
- ASSERT(prepare_called > 1);
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
- ASSERT(timer_called == 10);
- ASSERT(prepare_called == 10);
-
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-loop-time.c b/3rdparty/libuv/test/test-loop-time.c
deleted file mode 100644
index a2db42cceec..00000000000
--- a/3rdparty/libuv/test/test-loop-time.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-
-TEST_IMPL(loop_update_time) {
- uint64_t start;
-
- start = uv_now(uv_default_loop());
- while (uv_now(uv_default_loop()) - start < 1000)
- ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_NOWAIT));
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-static void cb(uv_timer_t* timer) {
- uv_close((uv_handle_t*)timer, NULL);
-}
-
-TEST_IMPL(loop_backend_timeout) {
- uv_loop_t *loop = uv_default_loop();
- uv_timer_t timer;
- int r;
-
- r = uv_timer_init(loop, &timer);
- ASSERT(r == 0);
-
- ASSERT(!uv_loop_alive(loop));
- ASSERT(uv_backend_timeout(loop) == 0);
-
- r = uv_timer_start(&timer, cb, 1000, 0); /* 1 sec */
- ASSERT(r == 0);
- ASSERT(uv_backend_timeout(loop) > 100); /* 0.1 sec */
- ASSERT(uv_backend_timeout(loop) <= 1000); /* 1 sec */
-
- r = uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(r == 0);
- ASSERT(uv_backend_timeout(loop) == 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-multiple-listen.c b/3rdparty/libuv/test/test-multiple-listen.c
deleted file mode 100644
index 4ae5fa67b3a..00000000000
--- a/3rdparty/libuv/test/test-multiple-listen.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-static int connection_cb_called = 0;
-static int close_cb_called = 0;
-static int connect_cb_called = 0;
-static uv_tcp_t server;
-static uv_tcp_t client;
-
-
-static void close_cb(uv_handle_t* handle) {
- ASSERT(handle != NULL);
- close_cb_called++;
-}
-
-
-static void connection_cb(uv_stream_t* tcp, int status) {
- ASSERT(status == 0);
- uv_close((uv_handle_t*)&server, close_cb);
- connection_cb_called++;
-}
-
-
-static void start_server(void) {
- struct sockaddr_in addr;
- int r;
-
- ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr));
-
- r = uv_tcp_init(uv_default_loop(), &server);
- ASSERT(r == 0);
-
- r = uv_tcp_bind(&server, (const struct sockaddr*) &addr, 0);
- ASSERT(r == 0);
-
- r = uv_listen((uv_stream_t*)&server, 128, connection_cb);
- ASSERT(r == 0);
-
- r = uv_listen((uv_stream_t*)&server, 128, connection_cb);
- ASSERT(r == 0);
-}
-
-
-static void connect_cb(uv_connect_t* req, int status) {
- ASSERT(req != NULL);
- ASSERT(status == 0);
- free(req);
- uv_close((uv_handle_t*)&client, close_cb);
- connect_cb_called++;
-}
-
-
-static void client_connect(void) {
- struct sockaddr_in addr;
- uv_connect_t* connect_req = malloc(sizeof *connect_req);
- int r;
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
- ASSERT(connect_req != NULL);
-
- r = uv_tcp_init(uv_default_loop(), &client);
- ASSERT(r == 0);
-
- r = uv_tcp_connect(connect_req,
- &client,
- (const struct sockaddr*) &addr,
- connect_cb);
- ASSERT(r == 0);
-}
-
-
-
-TEST_IMPL(multiple_listen) {
- start_server();
-
- client_connect();
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(connection_cb_called == 1);
- ASSERT(connect_cb_called == 1);
- ASSERT(close_cb_called == 2);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-mutexes.c b/3rdparty/libuv/test/test-mutexes.c
deleted file mode 100644
index af5e4e88a22..00000000000
--- a/3rdparty/libuv/test/test-mutexes.c
+++ /dev/null
@@ -1,162 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-
-static uv_cond_t condvar;
-static uv_mutex_t mutex;
-static uv_rwlock_t rwlock;
-static int step;
-
-/* The mutex and rwlock tests are really poor.
- * They're very basic sanity checks and nothing more.
- * Apologies if that rhymes.
- */
-
-TEST_IMPL(thread_mutex) {
- uv_mutex_t mutex;
- int r;
-
- r = uv_mutex_init(&mutex);
- ASSERT(r == 0);
-
- uv_mutex_lock(&mutex);
- uv_mutex_unlock(&mutex);
- uv_mutex_destroy(&mutex);
-
- return 0;
-}
-
-
-TEST_IMPL(thread_rwlock) {
- uv_rwlock_t rwlock;
- int r;
-
- r = uv_rwlock_init(&rwlock);
- ASSERT(r == 0);
-
- uv_rwlock_rdlock(&rwlock);
- uv_rwlock_rdunlock(&rwlock);
- uv_rwlock_wrlock(&rwlock);
- uv_rwlock_wrunlock(&rwlock);
- uv_rwlock_destroy(&rwlock);
-
- return 0;
-}
-
-
-/* Call when holding |mutex|. */
-static void synchronize_nowait(void) {
- step += 1;
- uv_cond_signal(&condvar);
-}
-
-
-/* Call when holding |mutex|. */
-static void synchronize(void) {
- int current;
-
- synchronize_nowait();
- /* Wait for the other thread. Guard against spurious wakeups. */
- for (current = step; current == step; uv_cond_wait(&condvar, &mutex));
- ASSERT(step == current + 1);
-}
-
-
-static void thread_rwlock_trylock_peer(void* unused) {
- (void) &unused;
-
- uv_mutex_lock(&mutex);
-
- /* Write lock held by other thread. */
- ASSERT(UV_EBUSY == uv_rwlock_tryrdlock(&rwlock));
- ASSERT(UV_EBUSY == uv_rwlock_trywrlock(&rwlock));
- synchronize();
-
- /* Read lock held by other thread. */
- ASSERT(0 == uv_rwlock_tryrdlock(&rwlock));
- uv_rwlock_rdunlock(&rwlock);
- ASSERT(UV_EBUSY == uv_rwlock_trywrlock(&rwlock));
- synchronize();
-
- /* Acquire write lock. */
- ASSERT(0 == uv_rwlock_trywrlock(&rwlock));
- synchronize();
-
- /* Release write lock and acquire read lock. */
- uv_rwlock_wrunlock(&rwlock);
- ASSERT(0 == uv_rwlock_tryrdlock(&rwlock));
- synchronize();
-
- uv_rwlock_rdunlock(&rwlock);
- synchronize_nowait(); /* Signal main thread we're going away. */
- uv_mutex_unlock(&mutex);
-}
-
-
-TEST_IMPL(thread_rwlock_trylock) {
- uv_thread_t thread;
-
- ASSERT(0 == uv_cond_init(&condvar));
- ASSERT(0 == uv_mutex_init(&mutex));
- ASSERT(0 == uv_rwlock_init(&rwlock));
-
- uv_mutex_lock(&mutex);
- ASSERT(0 == uv_thread_create(&thread, thread_rwlock_trylock_peer, NULL));
-
- /* Hold write lock. */
- ASSERT(0 == uv_rwlock_trywrlock(&rwlock));
- synchronize(); /* Releases the mutex to the other thread. */
-
- /* Release write lock and acquire read lock. Pthreads doesn't support
- * the notion of upgrading or downgrading rwlocks, so neither do we.
- */
- uv_rwlock_wrunlock(&rwlock);
- ASSERT(0 == uv_rwlock_tryrdlock(&rwlock));
- synchronize();
-
- /* Release read lock. */
- uv_rwlock_rdunlock(&rwlock);
- synchronize();
-
- /* Write lock held by other thread. */
- ASSERT(UV_EBUSY == uv_rwlock_tryrdlock(&rwlock));
- ASSERT(UV_EBUSY == uv_rwlock_trywrlock(&rwlock));
- synchronize();
-
- /* Read lock held by other thread. */
- ASSERT(0 == uv_rwlock_tryrdlock(&rwlock));
- uv_rwlock_rdunlock(&rwlock);
- ASSERT(UV_EBUSY == uv_rwlock_trywrlock(&rwlock));
- synchronize();
-
- ASSERT(0 == uv_thread_join(&thread));
- uv_rwlock_destroy(&rwlock);
- uv_mutex_unlock(&mutex);
- uv_mutex_destroy(&mutex);
- uv_cond_destroy(&condvar);
-
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-osx-select.c b/3rdparty/libuv/test/test-osx-select.c
deleted file mode 100644
index a0afda9181e..00000000000
--- a/3rdparty/libuv/test/test-osx-select.c
+++ /dev/null
@@ -1,140 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#ifdef __APPLE__
-
-#include <sys/ioctl.h>
-#include <string.h>
-
-static int read_count;
-
-
-static void alloc_cb(uv_handle_t* handle, size_t size, uv_buf_t* buf) {
- static char slab[1024];
- buf->base = slab;
- buf->len = sizeof(slab);
-}
-
-
-static void read_cb(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf) {
- fprintf(stdout, "got data %d\n", ++read_count);
- fflush(stdout);
-
- if (read_count == 3)
- uv_close((uv_handle_t*) stream, NULL);
-}
-
-
-TEST_IMPL(osx_select) {
- int r;
- int fd;
- size_t i;
- size_t len;
- const char* str;
- uv_tty_t tty;
-
- fd = open("/dev/tty", O_RDONLY);
- if (fd < 0) {
- fprintf(stderr, "Cannot open /dev/tty as read-only: %s\n", strerror(errno));
- fflush(stderr);
- return TEST_SKIP;
- }
-
- r = uv_tty_init(uv_default_loop(), &tty, fd, 1);
- ASSERT(r == 0);
-
- uv_read_start((uv_stream_t*) &tty, alloc_cb, read_cb);
-
- /* Emulate user-input */
- str = "got some input\n"
- "with a couple of lines\n"
- "feel pretty happy\n";
- for (i = 0, len = strlen(str); i < len; i++) {
- r = ioctl(fd, TIOCSTI, str + i);
- ASSERT(r == 0);
- }
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(read_count == 3);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(osx_select_many_fds) {
- int r;
- int fd;
- size_t i;
- size_t len;
- const char* str;
- struct sockaddr_in addr;
- uv_tty_t tty;
- uv_tcp_t tcps[1500];
-
- TEST_FILE_LIMIT(ARRAY_SIZE(tcps) + 100);
-
- r = uv_ip4_addr("127.0.0.1", 0, &addr);
- ASSERT(r == 0);
-
- for (i = 0; i < ARRAY_SIZE(tcps); i++) {
- r = uv_tcp_init(uv_default_loop(), &tcps[i]);
- ASSERT(r == 0);
- r = uv_tcp_bind(&tcps[i], (const struct sockaddr *) &addr, 0);
- ASSERT(r == 0);
- uv_unref((uv_handle_t*) &tcps[i]);
- }
-
- fd = open("/dev/tty", O_RDONLY);
- if (fd < 0) {
- fprintf(stderr, "Cannot open /dev/tty as read-only: %s\n", strerror(errno));
- fflush(stderr);
- return TEST_SKIP;
- }
-
- r = uv_tty_init(uv_default_loop(), &tty, fd, 1);
- ASSERT(r == 0);
-
- r = uv_read_start((uv_stream_t*) &tty, alloc_cb, read_cb);
- ASSERT(r == 0);
-
- /* Emulate user-input */
- str = "got some input\n"
- "with a couple of lines\n"
- "feel pretty happy\n";
- for (i = 0, len = strlen(str); i < len; i++) {
- r = ioctl(fd, TIOCSTI, str + i);
- ASSERT(r == 0);
- }
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(read_count == 3);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-#endif /* __APPLE__ */
diff --git a/3rdparty/libuv/test/test-pass-always.c b/3rdparty/libuv/test/test-pass-always.c
deleted file mode 100644
index 4fb58ff94be..00000000000
--- a/3rdparty/libuv/test/test-pass-always.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "task.h"
-
-
-TEST_IMPL(pass_always) {
- /* This test always passes. It is used to test the test runner. */
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-ping-pong.c b/3rdparty/libuv/test/test-ping-pong.c
deleted file mode 100644
index c074178541b..00000000000
--- a/3rdparty/libuv/test/test-ping-pong.c
+++ /dev/null
@@ -1,270 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-
-static int completed_pingers = 0;
-
-#define NUM_PINGS 1000
-
-/* 64 bytes is enough for a pinger */
-#define BUFSIZE 10240
-
-static char PING[] = "PING\n";
-static int pinger_on_connect_count;
-
-
-typedef struct {
- int pongs;
- int state;
- union {
- uv_tcp_t tcp;
- uv_pipe_t pipe;
- } stream;
- uv_connect_t connect_req;
- char read_buffer[BUFSIZE];
-} pinger_t;
-
-
-static void alloc_cb(uv_handle_t* handle, size_t size, uv_buf_t* buf) {
- buf->base = malloc(size);
- buf->len = size;
-}
-
-
-static void pinger_on_close(uv_handle_t* handle) {
- pinger_t* pinger = (pinger_t*)handle->data;
-
- ASSERT(NUM_PINGS == pinger->pongs);
-
- free(pinger);
-
- completed_pingers++;
-}
-
-
-static void pinger_after_write(uv_write_t *req, int status) {
- ASSERT(status == 0);
- free(req);
-}
-
-
-static void pinger_write_ping(pinger_t* pinger) {
- uv_write_t *req;
- uv_buf_t buf;
-
- buf = uv_buf_init(PING, sizeof(PING) - 1);
-
- req = malloc(sizeof(*req));
- if (uv_write(req,
- (uv_stream_t*) &pinger->stream.tcp,
- &buf,
- 1,
- pinger_after_write)) {
- FATAL("uv_write failed");
- }
-
- puts("PING");
-}
-
-
-static void pinger_read_cb(uv_stream_t* stream,
- ssize_t nread,
- const uv_buf_t* buf) {
- ssize_t i;
- pinger_t* pinger;
-
- pinger = (pinger_t*)stream->data;
-
- if (nread < 0) {
- ASSERT(nread == UV_EOF);
-
- puts("got EOF");
- free(buf->base);
-
- uv_close((uv_handle_t*)(&pinger->stream.tcp), pinger_on_close);
-
- return;
- }
-
- /* Now we count the pings */
- for (i = 0; i < nread; i++) {
- ASSERT(buf->base[i] == PING[pinger->state]);
- pinger->state = (pinger->state + 1) % (sizeof(PING) - 1);
-
- if (pinger->state != 0)
- continue;
-
- printf("PONG %d\n", pinger->pongs);
- pinger->pongs++;
-
- if (pinger->pongs < NUM_PINGS) {
- pinger_write_ping(pinger);
- } else {
- uv_close((uv_handle_t*)(&pinger->stream.tcp), pinger_on_close);
- break;
- }
- }
-
- free(buf->base);
-}
-
-
-static void pinger_on_connect(uv_connect_t *req, int status) {
- pinger_t *pinger = (pinger_t*)req->handle->data;
-
- pinger_on_connect_count++;
-
- ASSERT(status == 0);
-
- ASSERT(1 == uv_is_readable(req->handle));
- ASSERT(1 == uv_is_writable(req->handle));
- ASSERT(0 == uv_is_closing((uv_handle_t *) req->handle));
-
- pinger_write_ping(pinger);
-
- uv_read_start((uv_stream_t*)(req->handle), alloc_cb, pinger_read_cb);
-}
-
-
-/* same ping-pong test, but using IPv6 connection */
-static void tcp_pinger_v6_new(void) {
- int r;
- struct sockaddr_in6 server_addr;
- pinger_t *pinger;
-
-
- ASSERT(0 ==uv_ip6_addr("::1", TEST_PORT, &server_addr));
- pinger = malloc(sizeof(*pinger));
- ASSERT(pinger != NULL);
- pinger->state = 0;
- pinger->pongs = 0;
-
- /* Try to connect to the server and do NUM_PINGS ping-pongs. */
- r = uv_tcp_init(uv_default_loop(), &pinger->stream.tcp);
- pinger->stream.tcp.data = pinger;
- ASSERT(!r);
-
- /* We are never doing multiple reads/connects at a time anyway. */
- /* so these handles can be pre-initialized. */
- r = uv_tcp_connect(&pinger->connect_req,
- &pinger->stream.tcp,
- (const struct sockaddr*) &server_addr,
- pinger_on_connect);
- ASSERT(!r);
-
- /* Synchronous connect callbacks are not allowed. */
- ASSERT(pinger_on_connect_count == 0);
-}
-
-
-static void tcp_pinger_new(void) {
- int r;
- struct sockaddr_in server_addr;
- pinger_t *pinger;
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &server_addr));
- pinger = malloc(sizeof(*pinger));
- ASSERT(pinger != NULL);
- pinger->state = 0;
- pinger->pongs = 0;
-
- /* Try to connect to the server and do NUM_PINGS ping-pongs. */
- r = uv_tcp_init(uv_default_loop(), &pinger->stream.tcp);
- pinger->stream.tcp.data = pinger;
- ASSERT(!r);
-
- /* We are never doing multiple reads/connects at a time anyway. */
- /* so these handles can be pre-initialized. */
- r = uv_tcp_connect(&pinger->connect_req,
- &pinger->stream.tcp,
- (const struct sockaddr*) &server_addr,
- pinger_on_connect);
- ASSERT(!r);
-
- /* Synchronous connect callbacks are not allowed. */
- ASSERT(pinger_on_connect_count == 0);
-}
-
-
-static void pipe_pinger_new(void) {
- int r;
- pinger_t *pinger;
-
- pinger = (pinger_t*)malloc(sizeof(*pinger));
- ASSERT(pinger != NULL);
- pinger->state = 0;
- pinger->pongs = 0;
-
- /* Try to connect to the server and do NUM_PINGS ping-pongs. */
- r = uv_pipe_init(uv_default_loop(), &pinger->stream.pipe, 0);
- pinger->stream.pipe.data = pinger;
- ASSERT(!r);
-
- /* We are never doing multiple reads/connects at a time anyway. */
- /* so these handles can be pre-initialized. */
-
- uv_pipe_connect(&pinger->connect_req, &pinger->stream.pipe, TEST_PIPENAME,
- pinger_on_connect);
-
- /* Synchronous connect callbacks are not allowed. */
- ASSERT(pinger_on_connect_count == 0);
-}
-
-
-TEST_IMPL(tcp_ping_pong) {
- tcp_pinger_new();
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(completed_pingers == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(tcp_ping_pong_v6) {
- if (!can_ipv6())
- RETURN_SKIP("IPv6 not supported");
-
- tcp_pinger_v6_new();
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(completed_pingers == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(pipe_ping_pong) {
- pipe_pinger_new();
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(completed_pingers == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-pipe-bind-error.c b/3rdparty/libuv/test/test-pipe-bind-error.c
deleted file mode 100644
index 38b57db6991..00000000000
--- a/3rdparty/libuv/test/test-pipe-bind-error.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-
-#ifdef _WIN32
-# define BAD_PIPENAME "bad-pipe"
-#else
-# define BAD_PIPENAME "/path/to/unix/socket/that/really/should/not/be/there"
-#endif
-
-
-static int close_cb_called = 0;
-
-
-static void close_cb(uv_handle_t* handle) {
- ASSERT(handle != NULL);
- close_cb_called++;
-}
-
-
-TEST_IMPL(pipe_bind_error_addrinuse) {
- uv_pipe_t server1, server2;
- int r;
-
- r = uv_pipe_init(uv_default_loop(), &server1, 0);
- ASSERT(r == 0);
- r = uv_pipe_bind(&server1, TEST_PIPENAME);
- ASSERT(r == 0);
-
- r = uv_pipe_init(uv_default_loop(), &server2, 0);
- ASSERT(r == 0);
- r = uv_pipe_bind(&server2, TEST_PIPENAME);
- ASSERT(r == UV_EADDRINUSE);
-
- r = uv_listen((uv_stream_t*)&server1, SOMAXCONN, NULL);
- ASSERT(r == 0);
- r = uv_listen((uv_stream_t*)&server2, SOMAXCONN, NULL);
- ASSERT(r == UV_EINVAL);
-
- uv_close((uv_handle_t*)&server1, close_cb);
- uv_close((uv_handle_t*)&server2, close_cb);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(close_cb_called == 2);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(pipe_bind_error_addrnotavail) {
- uv_pipe_t server;
- int r;
-
- r = uv_pipe_init(uv_default_loop(), &server, 0);
- ASSERT(r == 0);
-
- r = uv_pipe_bind(&server, BAD_PIPENAME);
- ASSERT(r == UV_EACCES);
-
- uv_close((uv_handle_t*)&server, close_cb);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(close_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(pipe_bind_error_inval) {
- uv_pipe_t server;
- int r;
-
- r = uv_pipe_init(uv_default_loop(), &server, 0);
- ASSERT(r == 0);
- r = uv_pipe_bind(&server, TEST_PIPENAME);
- ASSERT(r == 0);
- r = uv_pipe_bind(&server, TEST_PIPENAME_2);
- ASSERT(r == UV_EINVAL);
-
- uv_close((uv_handle_t*)&server, close_cb);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(close_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(pipe_listen_without_bind) {
- uv_pipe_t server;
- int r;
-
- r = uv_pipe_init(uv_default_loop(), &server, 0);
- ASSERT(r == 0);
-
- r = uv_listen((uv_stream_t*)&server, SOMAXCONN, NULL);
- ASSERT(r == UV_EINVAL);
-
- uv_close((uv_handle_t*)&server, close_cb);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(close_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-pipe-close-stdout-read-stdin.c b/3rdparty/libuv/test/test-pipe-close-stdout-read-stdin.c
deleted file mode 100644
index ee8bb2a9a8b..00000000000
--- a/3rdparty/libuv/test/test-pipe-close-stdout-read-stdin.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#ifndef _WIN32
-
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/wait.h>
-#include <sys/types.h>
-
-#include "uv.h"
-#include "task.h"
-
-void alloc_buffer(uv_handle_t *handle, size_t suggested_size, uv_buf_t* buf)
-{
- static char buffer[1024];
-
- buf->base = buffer;
- buf->len = sizeof(buffer);
-}
-
-void read_stdin(uv_stream_t *stream, ssize_t nread, const uv_buf_t* buf)
-{
- if (nread < 0) {
- uv_close((uv_handle_t*)stream, NULL);
- return;
- }
-}
-
-/*
- * This test is a reproduction of joyent/libuv#1419 .
- */
-TEST_IMPL(pipe_close_stdout_read_stdin) {
- int r = -1;
- int pid;
- int fd[2];
- int status;
- uv_pipe_t stdin_pipe;
-
- r = pipe(fd);
- ASSERT(r == 0);
-
- if ((pid = fork()) == 0) {
- /*
- * Make the read side of the pipe our stdin.
- * The write side will be closed by the parent process.
- */
- close(fd[1]);
- close(0);
- r = dup(fd[0]);
- ASSERT(r != -1);
-
- /* Create a stream that reads from the pipe. */
- r = uv_pipe_init(uv_default_loop(), (uv_pipe_t *)&stdin_pipe, 0);
- ASSERT(r == 0);
-
- r = uv_pipe_open((uv_pipe_t *)&stdin_pipe, 0);
- ASSERT(r == 0);
-
- r = uv_read_start((uv_stream_t *)&stdin_pipe, alloc_buffer, read_stdin);
- ASSERT(r == 0);
-
- /*
- * Because the other end of the pipe was closed, there should
- * be no event left to process after one run of the event loop.
- * Otherwise, it means that events were not processed correctly.
- */
- ASSERT(uv_run(uv_default_loop(), UV_RUN_NOWAIT) == 0);
- } else {
- /*
- * Close both ends of the pipe so that the child
- * get a POLLHUP event when it tries to read from
- * the other end.
- */
- close(fd[1]);
- close(fd[0]);
-
- waitpid(pid, &status, 0);
- ASSERT(WIFEXITED(status) && WEXITSTATUS(status) == 0);
- }
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-#endif /* ifndef _WIN32 */
diff --git a/3rdparty/libuv/test/test-pipe-connect-error.c b/3rdparty/libuv/test/test-pipe-connect-error.c
deleted file mode 100644
index ebb2a6ca826..00000000000
--- a/3rdparty/libuv/test/test-pipe-connect-error.c
+++ /dev/null
@@ -1,95 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-
-#ifdef _WIN32
-# define BAD_PIPENAME "bad-pipe"
-#else
-# define BAD_PIPENAME "/path/to/unix/socket/that/really/should/not/be/there"
-#endif
-
-
-static int close_cb_called = 0;
-static int connect_cb_called = 0;
-
-
-static void close_cb(uv_handle_t* handle) {
- ASSERT(handle != NULL);
- close_cb_called++;
-}
-
-
-static void connect_cb(uv_connect_t* connect_req, int status) {
- ASSERT(status == UV_ENOENT);
- uv_close((uv_handle_t*)connect_req->handle, close_cb);
- connect_cb_called++;
-}
-
-
-static void connect_cb_file(uv_connect_t* connect_req, int status) {
- ASSERT(status == UV_ENOTSOCK || status == UV_ECONNREFUSED);
- uv_close((uv_handle_t*)connect_req->handle, close_cb);
- connect_cb_called++;
-}
-
-
-TEST_IMPL(pipe_connect_bad_name) {
- uv_pipe_t client;
- uv_connect_t req;
- int r;
-
- r = uv_pipe_init(uv_default_loop(), &client, 0);
- ASSERT(r == 0);
- uv_pipe_connect(&req, &client, BAD_PIPENAME, connect_cb);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(close_cb_called == 1);
- ASSERT(connect_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(pipe_connect_to_file) {
- const char* path = "test/fixtures/empty_file";
- uv_pipe_t client;
- uv_connect_t req;
- int r;
-
- r = uv_pipe_init(uv_default_loop(), &client, 0);
- ASSERT(r == 0);
- uv_pipe_connect(&req, &client, path, connect_cb_file);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(close_cb_called == 1);
- ASSERT(connect_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-pipe-connect-multiple.c b/3rdparty/libuv/test/test-pipe-connect-multiple.c
deleted file mode 100644
index 3de5a9a0bf4..00000000000
--- a/3rdparty/libuv/test/test-pipe-connect-multiple.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/* Copyright (c) 2015 Saúl Ibarra Corretgé <saghul@gmail.com>.
- * All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-
-static int connection_cb_called = 0;
-static int connect_cb_called = 0;
-
-#define NUM_CLIENTS 4
-
-typedef struct {
- uv_pipe_t pipe_handle;
- uv_connect_t conn_req;
-} client_t;
-
-static uv_pipe_t server_handle;
-static client_t clients[NUM_CLIENTS];
-static uv_pipe_t connections[NUM_CLIENTS];
-
-
-static void connection_cb(uv_stream_t* server, int status) {
- int r;
- uv_pipe_t* conn;
- ASSERT(status == 0);
-
- conn = &connections[connection_cb_called];
- r = uv_pipe_init(server->loop, conn, 0);
- ASSERT(r == 0);
-
- r = uv_accept(server, (uv_stream_t*)conn);
- ASSERT(r == 0);
-
- if (++connection_cb_called == NUM_CLIENTS &&
- connect_cb_called == NUM_CLIENTS) {
- uv_stop(server->loop);
- }
-}
-
-
-static void connect_cb(uv_connect_t* connect_req, int status) {
- ASSERT(status == 0);
- if (++connect_cb_called == NUM_CLIENTS &&
- connection_cb_called == NUM_CLIENTS) {
- uv_stop(connect_req->handle->loop);
- }
-}
-
-
-TEST_IMPL(pipe_connect_multiple) {
- int i;
- int r;
- uv_loop_t* loop;
-
- loop = uv_default_loop();
-
- r = uv_pipe_init(loop, &server_handle, 0);
- ASSERT(r == 0);
-
- r = uv_pipe_bind(&server_handle, TEST_PIPENAME);
- ASSERT(r == 0);
-
- r = uv_listen((uv_stream_t*)&server_handle, 128, connection_cb);
- ASSERT(r == 0);
-
- for (i = 0; i < NUM_CLIENTS; i++) {
- r = uv_pipe_init(loop, &clients[i].pipe_handle, 0);
- ASSERT(r == 0);
- uv_pipe_connect(&clients[i].conn_req,
- &clients[i].pipe_handle,
- TEST_PIPENAME,
- connect_cb);
- }
-
- uv_run(loop, UV_RUN_DEFAULT);
-
- ASSERT(connection_cb_called == NUM_CLIENTS);
- ASSERT(connect_cb_called == NUM_CLIENTS);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-pipe-connect-prepare.c b/3rdparty/libuv/test/test-pipe-connect-prepare.c
deleted file mode 100644
index a86e7284a79..00000000000
--- a/3rdparty/libuv/test/test-pipe-connect-prepare.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/* Copyright (c) 2015 Saúl Ibarra Corretgé <saghul@gmail.com>.
- * All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-
-#ifdef _WIN32
-# define BAD_PIPENAME "bad-pipe"
-#else
-# define BAD_PIPENAME "/path/to/unix/socket/that/really/should/not/be/there"
-#endif
-
-
-static int close_cb_called = 0;
-static int connect_cb_called = 0;
-
-static uv_pipe_t pipe_handle;
-static uv_prepare_t prepare_handle;
-static uv_connect_t conn_req;
-
-
-static void close_cb(uv_handle_t* handle) {
- ASSERT(handle != NULL);
- close_cb_called++;
-}
-
-
-static void connect_cb(uv_connect_t* connect_req, int status) {
- ASSERT(status == UV_ENOENT);
- connect_cb_called++;
- uv_close((uv_handle_t*)&prepare_handle, close_cb);
- uv_close((uv_handle_t*)&pipe_handle, close_cb);
-}
-
-
-static void prepare_cb(uv_prepare_t* handle) {
- ASSERT(handle == &prepare_handle);
- uv_pipe_connect(&conn_req, &pipe_handle, BAD_PIPENAME, connect_cb);
-}
-
-
-TEST_IMPL(pipe_connect_on_prepare) {
- int r;
-
- r = uv_pipe_init(uv_default_loop(), &pipe_handle, 0);
- ASSERT(r == 0);
-
- r = uv_prepare_init(uv_default_loop(), &prepare_handle);
- ASSERT(r == 0);
- r = uv_prepare_start(&prepare_handle, prepare_cb);
- ASSERT(r == 0);
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(close_cb_called == 2);
- ASSERT(connect_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-pipe-getsockname.c b/3rdparty/libuv/test/test-pipe-getsockname.c
deleted file mode 100644
index 5e036f9d528..00000000000
--- a/3rdparty/libuv/test/test-pipe-getsockname.c
+++ /dev/null
@@ -1,263 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#if defined(__linux__)
- #include <sys/socket.h>
- #include <sys/un.h>
-#endif
-
-#ifndef _WIN32
-# include <unistd.h> /* close */
-#else
-# include <fcntl.h>
-#endif
-
-static uv_pipe_t pipe_client;
-static uv_pipe_t pipe_server;
-static uv_connect_t connect_req;
-
-static int pipe_close_cb_called = 0;
-static int pipe_client_connect_cb_called = 0;
-
-
-static void pipe_close_cb(uv_handle_t* handle) {
- ASSERT(handle == (uv_handle_t*) &pipe_client ||
- handle == (uv_handle_t*) &pipe_server);
- pipe_close_cb_called++;
-}
-
-
-static void pipe_client_connect_cb(uv_connect_t* req, int status) {
- char buf[1024];
- size_t len;
- int r;
-
- ASSERT(req == &connect_req);
- ASSERT(status == 0);
-
- len = sizeof buf;
- r = uv_pipe_getpeername(&pipe_client, buf, &len);
- ASSERT(r == 0);
-
- ASSERT(buf[len - 1] != 0);
- ASSERT(memcmp(buf, TEST_PIPENAME, len) == 0);
-
- len = sizeof buf;
- r = uv_pipe_getsockname(&pipe_client, buf, &len);
- ASSERT(r == 0 && len == 0);
-
- pipe_client_connect_cb_called++;
-
-
- uv_close((uv_handle_t*) &pipe_client, pipe_close_cb);
- uv_close((uv_handle_t*) &pipe_server, pipe_close_cb);
-}
-
-
-static void pipe_server_connection_cb(uv_stream_t* handle, int status) {
- /* This function *may* be called, depending on whether accept or the
- * connection callback is called first.
- */
- ASSERT(status == 0);
-}
-
-
-TEST_IMPL(pipe_getsockname) {
- uv_loop_t* loop;
- char buf[1024];
- size_t len;
- int r;
-
- loop = uv_default_loop();
- ASSERT(loop != NULL);
-
- r = uv_pipe_init(loop, &pipe_server, 0);
- ASSERT(r == 0);
-
- len = sizeof buf;
- r = uv_pipe_getsockname(&pipe_server, buf, &len);
- ASSERT(r == UV_EBADF);
-
- len = sizeof buf;
- r = uv_pipe_getpeername(&pipe_server, buf, &len);
- ASSERT(r == UV_EBADF);
-
- r = uv_pipe_bind(&pipe_server, TEST_PIPENAME);
- ASSERT(r == 0);
-
- len = sizeof buf;
- r = uv_pipe_getsockname(&pipe_server, buf, &len);
- ASSERT(r == 0);
-
- ASSERT(buf[len - 1] != 0);
- ASSERT(memcmp(buf, TEST_PIPENAME, len) == 0);
-
- len = sizeof buf;
- r = uv_pipe_getpeername(&pipe_server, buf, &len);
- ASSERT(r == UV_ENOTCONN);
-
- r = uv_listen((uv_stream_t*) &pipe_server, 0, pipe_server_connection_cb);
- ASSERT(r == 0);
-
- r = uv_pipe_init(loop, &pipe_client, 0);
- ASSERT(r == 0);
-
- len = sizeof buf;
- r = uv_pipe_getsockname(&pipe_client, buf, &len);
- ASSERT(r == UV_EBADF);
-
- len = sizeof buf;
- r = uv_pipe_getpeername(&pipe_client, buf, &len);
- ASSERT(r == UV_EBADF);
-
- uv_pipe_connect(&connect_req, &pipe_client, TEST_PIPENAME, pipe_client_connect_cb);
-
- len = sizeof buf;
- r = uv_pipe_getsockname(&pipe_client, buf, &len);
- ASSERT(r == 0 && len == 0);
-
- len = sizeof buf;
- r = uv_pipe_getpeername(&pipe_client, buf, &len);
- ASSERT(r == 0);
-
- ASSERT(buf[len - 1] != 0);
- ASSERT(memcmp(buf, TEST_PIPENAME, len) == 0);
-
- r = uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(r == 0);
- ASSERT(pipe_client_connect_cb_called == 1);
- ASSERT(pipe_close_cb_called == 2);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(pipe_getsockname_abstract) {
-#if defined(__linux__)
- char buf[1024];
- size_t len;
- int r;
- int sock;
- struct sockaddr_un sun;
- socklen_t sun_len;
- char abstract_pipe[] = "\0test-pipe";
-
- sock = socket(AF_LOCAL, SOCK_STREAM, 0);
- ASSERT(sock != -1);
-
- sun_len = sizeof sun;
- memset(&sun, 0, sun_len);
- sun.sun_family = AF_UNIX;
- memcpy(sun.sun_path, abstract_pipe, sizeof abstract_pipe);
-
- r = bind(sock, (struct sockaddr*)&sun, sun_len);
- ASSERT(r == 0);
-
- r = uv_pipe_init(uv_default_loop(), &pipe_server, 0);
- ASSERT(r == 0);
- r = uv_pipe_open(&pipe_server, sock);
- ASSERT(r == 0);
-
- len = sizeof buf;
- r = uv_pipe_getsockname(&pipe_server, buf, &len);
- ASSERT(r == 0);
-
- ASSERT(memcmp(buf, abstract_pipe, sizeof abstract_pipe) == 0);
-
- uv_close((uv_handle_t*)&pipe_server, pipe_close_cb);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- close(sock);
-
- ASSERT(pipe_close_cb_called == 1);
- MAKE_VALGRIND_HAPPY();
- return 0;
-#else
- MAKE_VALGRIND_HAPPY();
- return 0;
-#endif
-}
-
-TEST_IMPL(pipe_getsockname_blocking) {
-#ifdef _WIN32
- HANDLE readh, writeh;
- int readfd;
- char buf1[1024], buf2[1024];
- size_t len1, len2;
- int r;
-
- r = CreatePipe(&readh, &writeh, NULL, 65536);
- ASSERT(r != 0);
-
- r = uv_pipe_init(uv_default_loop(), &pipe_client, 0);
- ASSERT(r == 0);
- readfd = _open_osfhandle((intptr_t)readh, _O_RDONLY);
- ASSERT(r != -1);
- r = uv_pipe_open(&pipe_client, readfd);
- ASSERT(r == 0);
- r = uv_read_start((uv_stream_t*)&pipe_client, NULL, NULL);
- ASSERT(r == 0);
- Sleep(100);
- r = uv_read_stop((uv_stream_t*)&pipe_client);
- ASSERT(r == 0);
-
- len1 = sizeof buf1;
- r = uv_pipe_getsockname(&pipe_client, buf1, &len1);
- ASSERT(r == 0);
- ASSERT(buf1[len1 - 1] != 0);
-
- r = uv_read_start((uv_stream_t*)&pipe_client, NULL, NULL);
- ASSERT(r == 0);
- Sleep(100);
-
- len2 = sizeof buf2;
- r = uv_pipe_getsockname(&pipe_client, buf2, &len2);
- ASSERT(r == 0);
- ASSERT(buf2[len2 - 1] != 0);
-
- r = uv_read_stop((uv_stream_t*)&pipe_client);
- ASSERT(r == 0);
-
- ASSERT(len1 == len2);
- ASSERT(memcmp(buf1, buf2, len1) == 0);
-
- pipe_close_cb_called = 0;
- uv_close((uv_handle_t*)&pipe_client, pipe_close_cb);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(pipe_close_cb_called == 1);
-
- _close(readfd);
- CloseHandle(writeh);
-#endif
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-pipe-pending-instances.c b/3rdparty/libuv/test/test-pipe-pending-instances.c
deleted file mode 100644
index b6ff911a0f2..00000000000
--- a/3rdparty/libuv/test/test-pipe-pending-instances.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Copyright (c) 2015 Saúl Ibarra Corretgé <saghul@gmail.com>.
- * All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-
-static void connection_cb(uv_stream_t* server, int status) {
- ASSERT(0 && "this will never be called");
-}
-
-
-TEST_IMPL(pipe_pending_instances) {
- int r;
- uv_pipe_t pipe_handle;
- uv_loop_t* loop;
-
- loop = uv_default_loop();
-
- r = uv_pipe_init(loop, &pipe_handle, 0);
- ASSERT(r == 0);
-
- uv_pipe_pending_instances(&pipe_handle, 8);
-
- r = uv_pipe_bind(&pipe_handle, TEST_PIPENAME);
- ASSERT(r == 0);
-
- uv_pipe_pending_instances(&pipe_handle, 16);
-
- r = uv_listen((uv_stream_t*)&pipe_handle, 128, connection_cb);
- ASSERT(r == 0);
-
- uv_close((uv_handle_t*)&pipe_handle, NULL);
-
- r = uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-pipe-sendmsg.c b/3rdparty/libuv/test/test-pipe-sendmsg.c
deleted file mode 100644
index f6d893b4494..00000000000
--- a/3rdparty/libuv/test/test-pipe-sendmsg.c
+++ /dev/null
@@ -1,169 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-
-#ifndef _WIN32
-
-#include <fcntl.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/socket.h>
-#include <unistd.h>
-
-
-/* NOTE: size should be divisible by 2 */
-static uv_pipe_t incoming[4];
-static unsigned int incoming_count;
-static unsigned int close_called;
-
-
-static void set_nonblocking(uv_os_sock_t sock) {
- int r;
-#ifdef _WIN32
- unsigned long on = 1;
- r = ioctlsocket(sock, FIONBIO, &on);
- ASSERT(r == 0);
-#else
- int flags = fcntl(sock, F_GETFL, 0);
- ASSERT(flags >= 0);
- r = fcntl(sock, F_SETFL, flags | O_NONBLOCK);
- ASSERT(r >= 0);
-#endif
-}
-
-
-
-
-static void close_cb(uv_handle_t* handle) {
- close_called++;
-}
-
-
-static void alloc_cb(uv_handle_t* handle, size_t size, uv_buf_t* buf) {
- static char base[1];
-
- buf->base = base;
- buf->len = sizeof(base);
-}
-
-
-static void read_cb(uv_stream_t* handle,
- ssize_t nread,
- const uv_buf_t* buf) {
- uv_pipe_t* p;
- uv_pipe_t* inc;
- uv_handle_type pending;
- unsigned int i;
-
- p = (uv_pipe_t*) handle;
- ASSERT(nread >= 0);
-
- while (uv_pipe_pending_count(p) != 0) {
- pending = uv_pipe_pending_type(p);
- ASSERT(pending == UV_NAMED_PIPE);
-
- ASSERT(incoming_count < ARRAY_SIZE(incoming));
- inc = &incoming[incoming_count++];
- ASSERT(0 == uv_pipe_init(p->loop, inc, 0));
- ASSERT(0 == uv_accept(handle, (uv_stream_t*) inc));
- }
-
- if (incoming_count != ARRAY_SIZE(incoming))
- return;
-
- ASSERT(0 == uv_read_stop((uv_stream_t*) p));
- uv_close((uv_handle_t*) p, close_cb);
- for (i = 0; i < ARRAY_SIZE(incoming); i++)
- uv_close((uv_handle_t*) &incoming[i], close_cb);
-}
-
-
-TEST_IMPL(pipe_sendmsg) {
- uv_pipe_t p;
- int r;
- int fds[2];
- int send_fds[ARRAY_SIZE(incoming)];
- struct msghdr msg;
- char scratch[64];
- struct cmsghdr *cmsg;
- unsigned int i;
- uv_buf_t buf;
-
- ASSERT(0 == socketpair(AF_UNIX, SOCK_STREAM, 0, fds));
- for (i = 0; i < ARRAY_SIZE(send_fds); i += 2)
- ASSERT(0 == socketpair(AF_UNIX, SOCK_STREAM, 0, send_fds + i));
- ASSERT(i == ARRAY_SIZE(send_fds));
- ASSERT(0 == uv_pipe_init(uv_default_loop(), &p, 1));
- ASSERT(0 == uv_pipe_open(&p, fds[1]));
-
- buf = uv_buf_init("X", 1);
- memset(&msg, 0, sizeof(msg));
- msg.msg_iov = (struct iovec*) &buf;
- msg.msg_iovlen = 1;
- msg.msg_flags = 0;
-
- msg.msg_control = (void*) scratch;
- msg.msg_controllen = CMSG_LEN(sizeof(send_fds));
- ASSERT(sizeof(scratch) >= msg.msg_controllen);
-
- cmsg = CMSG_FIRSTHDR(&msg);
- cmsg->cmsg_level = SOL_SOCKET;
- cmsg->cmsg_type = SCM_RIGHTS;
- cmsg->cmsg_len = msg.msg_controllen;
-
- /* silence aliasing warning */
- {
- void* pv = CMSG_DATA(cmsg);
- int* pi = pv;
- for (i = 0; i < ARRAY_SIZE(send_fds); i++)
- pi[i] = send_fds[i];
- }
-
- set_nonblocking(fds[1]);
- ASSERT(0 == uv_read_start((uv_stream_t*) &p, alloc_cb, read_cb));
-
- do
- r = sendmsg(fds[0], &msg, 0);
- while (r == -1 && errno == EINTR);
- ASSERT(r == 1);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(ARRAY_SIZE(incoming) == incoming_count);
- ASSERT(ARRAY_SIZE(incoming) + 1 == close_called);
- close(fds[0]);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-#else /* !_WIN32 */
-
-TEST_IMPL(pipe_sendmsg) {
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-#endif /* _WIN32 */
diff --git a/3rdparty/libuv/test/test-pipe-server-close.c b/3rdparty/libuv/test/test-pipe-server-close.c
deleted file mode 100644
index 1dcdfffaf7c..00000000000
--- a/3rdparty/libuv/test/test-pipe-server-close.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <string.h>
-#include <errno.h>
-
-
-static uv_pipe_t pipe_client;
-static uv_pipe_t pipe_server;
-static uv_connect_t connect_req;
-
-static int pipe_close_cb_called = 0;
-static int pipe_client_connect_cb_called = 0;
-
-
-static void pipe_close_cb(uv_handle_t* handle) {
- ASSERT(handle == (uv_handle_t*) &pipe_client ||
- handle == (uv_handle_t*) &pipe_server);
- pipe_close_cb_called++;
-}
-
-
-static void pipe_client_connect_cb(uv_connect_t* req, int status) {
- ASSERT(req == &connect_req);
- ASSERT(status == 0);
-
- pipe_client_connect_cb_called++;
-
- uv_close((uv_handle_t*) &pipe_client, pipe_close_cb);
- uv_close((uv_handle_t*) &pipe_server, pipe_close_cb);
-}
-
-
-static void pipe_server_connection_cb(uv_stream_t* handle, int status) {
- /* This function *may* be called, depending on whether accept or the
- * connection callback is called first.
- */
- ASSERT(status == 0);
-}
-
-
-TEST_IMPL(pipe_server_close) {
- uv_loop_t* loop;
- int r;
-
- loop = uv_default_loop();
- ASSERT(loop != NULL);
-
- r = uv_pipe_init(loop, &pipe_server, 0);
- ASSERT(r == 0);
-
- r = uv_pipe_bind(&pipe_server, TEST_PIPENAME);
- ASSERT(r == 0);
-
- r = uv_listen((uv_stream_t*) &pipe_server, 0, pipe_server_connection_cb);
- ASSERT(r == 0);
-
- r = uv_pipe_init(loop, &pipe_client, 0);
- ASSERT(r == 0);
-
- uv_pipe_connect(&connect_req, &pipe_client, TEST_PIPENAME, pipe_client_connect_cb);
-
- r = uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(r == 0);
- ASSERT(pipe_client_connect_cb_called == 1);
- ASSERT(pipe_close_cb_called == 2);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-pipe-set-non-blocking.c b/3rdparty/libuv/test/test-pipe-set-non-blocking.c
deleted file mode 100644
index fcc9fc0da85..00000000000
--- a/3rdparty/libuv/test/test-pipe-set-non-blocking.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/* Copyright (c) 2015, Ben Noordhuis <info@bnoordhuis.nl>
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#ifdef _WIN32
-
-TEST_IMPL(pipe_set_non_blocking) {
- RETURN_SKIP("Test not implemented on Windows.");
-}
-
-#else /* !_WIN32 */
-
-#include <errno.h>
-#include <string.h>
-#include <sys/socket.h>
-#include <sys/types.h>
-#include <sys/un.h>
-#include <unistd.h>
-
-struct thread_ctx {
- uv_barrier_t barrier;
- int fd;
-};
-
-static void thread_main(void* arg) {
- struct thread_ctx* ctx;
- char buf[4096];
- ssize_t n;
-
- ctx = arg;
- uv_barrier_wait(&ctx->barrier);
-
- do
- n = read(ctx->fd, buf, sizeof(buf));
- while (n > 0 || (n == -1 && errno == EINTR));
-
- ASSERT(n == 0);
-}
-
-TEST_IMPL(pipe_set_non_blocking) {
- struct thread_ctx ctx;
- uv_pipe_t pipe_handle;
- uv_thread_t thread;
- size_t nwritten;
- char data[4096];
- uv_buf_t buf;
- int fd[2];
- int n;
-
- ASSERT(0 == uv_pipe_init(uv_default_loop(), &pipe_handle, 0));
- ASSERT(0 == socketpair(AF_UNIX, SOCK_STREAM, 0, fd));
- ASSERT(0 == uv_pipe_open(&pipe_handle, fd[0]));
- ASSERT(0 == uv_stream_set_blocking((uv_stream_t*) &pipe_handle, 1));
-
- ctx.fd = fd[1];
- ASSERT(0 == uv_barrier_init(&ctx.barrier, 2));
- ASSERT(0 == uv_thread_create(&thread, thread_main, &ctx));
- uv_barrier_wait(&ctx.barrier);
-
- buf.len = sizeof(data);
- buf.base = data;
- memset(data, '.', sizeof(data));
-
- nwritten = 0;
- while (nwritten < 10 << 20) {
- /* The stream is in blocking mode so uv_try_write() should always succeed
- * with the exact number of bytes that we wanted written.
- */
- n = uv_try_write((uv_stream_t*) &pipe_handle, &buf, 1);
- ASSERT(n == sizeof(data));
- nwritten += n;
- }
-
- uv_close((uv_handle_t*) &pipe_handle, NULL);
- ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
-
- ASSERT(0 == uv_thread_join(&thread));
- ASSERT(0 == close(fd[1])); /* fd[0] is closed by uv_close(). */
- uv_barrier_destroy(&ctx.barrier);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-#endif /* !_WIN32 */
diff --git a/3rdparty/libuv/test/test-platform-output.c b/3rdparty/libuv/test/test-platform-output.c
deleted file mode 100644
index 76495e14fd8..00000000000
--- a/3rdparty/libuv/test/test-platform-output.c
+++ /dev/null
@@ -1,126 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-#include <string.h>
-
-
-TEST_IMPL(platform_output) {
- char buffer[512];
- size_t rss;
- size_t size;
- double uptime;
- uv_rusage_t rusage;
- uv_cpu_info_t* cpus;
- uv_interface_address_t* interfaces;
- int count;
- int i;
- int err;
-
- err = uv_get_process_title(buffer, sizeof(buffer));
- ASSERT(err == 0);
- printf("uv_get_process_title: %s\n", buffer);
-
- size = sizeof(buffer);
- err = uv_cwd(buffer, &size);
- ASSERT(err == 0);
- printf("uv_cwd: %s\n", buffer);
-
- err = uv_resident_set_memory(&rss);
- ASSERT(err == 0);
- printf("uv_resident_set_memory: %llu\n", (unsigned long long) rss);
-
- err = uv_uptime(&uptime);
- ASSERT(err == 0);
- ASSERT(uptime > 0);
- printf("uv_uptime: %f\n", uptime);
-
- err = uv_getrusage(&rusage);
- ASSERT(err == 0);
- ASSERT(rusage.ru_utime.tv_sec >= 0);
- ASSERT(rusage.ru_utime.tv_usec >= 0);
- ASSERT(rusage.ru_stime.tv_sec >= 0);
- ASSERT(rusage.ru_stime.tv_usec >= 0);
- printf("uv_getrusage:\n");
- printf(" user: %llu sec %llu microsec\n",
- (unsigned long long) rusage.ru_utime.tv_sec,
- (unsigned long long) rusage.ru_utime.tv_usec);
- printf(" system: %llu sec %llu microsec\n",
- (unsigned long long) rusage.ru_stime.tv_sec,
- (unsigned long long) rusage.ru_stime.tv_usec);
-
- err = uv_cpu_info(&cpus, &count);
- ASSERT(err == 0);
-
- printf("uv_cpu_info:\n");
- for (i = 0; i < count; i++) {
- printf(" model: %s\n", cpus[i].model);
- printf(" speed: %d\n", cpus[i].speed);
- printf(" times.sys: %llu\n", (unsigned long long) cpus[i].cpu_times.sys);
- printf(" times.user: %llu\n",
- (unsigned long long) cpus[i].cpu_times.user);
- printf(" times.idle: %llu\n",
- (unsigned long long) cpus[i].cpu_times.idle);
- printf(" times.irq: %llu\n", (unsigned long long) cpus[i].cpu_times.irq);
- printf(" times.nice: %llu\n",
- (unsigned long long) cpus[i].cpu_times.nice);
- }
- uv_free_cpu_info(cpus, count);
-
- err = uv_interface_addresses(&interfaces, &count);
- ASSERT(err == 0);
-
- printf("uv_interface_addresses:\n");
- for (i = 0; i < count; i++) {
- printf(" name: %s\n", interfaces[i].name);
- printf(" internal: %d\n", interfaces[i].is_internal);
- printf(" physical address: ");
- printf("%02x:%02x:%02x:%02x:%02x:%02x\n",
- (unsigned char)interfaces[i].phys_addr[0],
- (unsigned char)interfaces[i].phys_addr[1],
- (unsigned char)interfaces[i].phys_addr[2],
- (unsigned char)interfaces[i].phys_addr[3],
- (unsigned char)interfaces[i].phys_addr[4],
- (unsigned char)interfaces[i].phys_addr[5]);
-
- if (interfaces[i].address.address4.sin_family == AF_INET) {
- uv_ip4_name(&interfaces[i].address.address4, buffer, sizeof(buffer));
- } else if (interfaces[i].address.address4.sin_family == AF_INET6) {
- uv_ip6_name(&interfaces[i].address.address6, buffer, sizeof(buffer));
- }
-
- printf(" address: %s\n", buffer);
-
- if (interfaces[i].netmask.netmask4.sin_family == AF_INET) {
- uv_ip4_name(&interfaces[i].netmask.netmask4, buffer, sizeof(buffer));
- printf(" netmask: %s\n", buffer);
- } else if (interfaces[i].netmask.netmask4.sin_family == AF_INET6) {
- uv_ip6_name(&interfaces[i].netmask.netmask6, buffer, sizeof(buffer));
- printf(" netmask: %s\n", buffer);
- } else {
- printf(" netmask: none\n");
- }
- }
- uv_free_interface_addresses(interfaces, count);
-
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-poll-close-doesnt-corrupt-stack.c b/3rdparty/libuv/test/test-poll-close-doesnt-corrupt-stack.c
deleted file mode 100644
index fc2cc004f16..00000000000
--- a/3rdparty/libuv/test/test-poll-close-doesnt-corrupt-stack.c
+++ /dev/null
@@ -1,114 +0,0 @@
-/* Copyright Bert Belder, and other libuv contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#ifdef _WIN32
-
-#include <errno.h>
-#include <stdio.h>
-
-#include "uv.h"
-#include "task.h"
-
-#ifdef _MSC_VER /* msvc */
-# define NO_INLINE __declspec(noinline)
-#else /* gcc */
-# define NO_INLINE __attribute__ ((noinline))
-#endif
-
-
-uv_os_sock_t sock;
-uv_poll_t handle;
-
-static int close_cb_called = 0;
-
-
-static void close_cb(uv_handle_t* h) {
- close_cb_called++;
-}
-
-
-static void poll_cb(uv_poll_t* h, int status, int events) {
- ASSERT(0 && "should never get here");
-}
-
-
-static void NO_INLINE close_socket_and_verify_stack() {
- const uint32_t MARKER = 0xDEADBEEF;
- const int VERIFY_AFTER = 10; /* ms */
- int r;
-
- volatile uint32_t data[65536];
- size_t i;
-
- for (i = 0; i < ARRAY_SIZE(data); i++)
- data[i] = MARKER;
-
- r = closesocket(sock);
- ASSERT(r == 0);
-
- uv_sleep(VERIFY_AFTER);
-
- for (i = 0; i < ARRAY_SIZE(data); i++)
- ASSERT(data[i] == MARKER);
-}
-
-
-TEST_IMPL(poll_close_doesnt_corrupt_stack) {
- struct WSAData wsa_data;
- int r;
- unsigned long on;
- struct sockaddr_in addr;
-
- r = WSAStartup(MAKEWORD(2, 2), &wsa_data);
- ASSERT(r == 0);
-
- sock = socket(AF_INET, SOCK_STREAM, 0);
- ASSERT(sock != INVALID_SOCKET);
- on = 1;
- r = ioctlsocket(sock, FIONBIO, &on);
- ASSERT(r == 0);
-
- r = uv_ip4_addr("127.0.0.1", TEST_PORT, &addr);
- ASSERT(r == 0);
-
- r = connect(sock, (const struct sockaddr*) &addr, sizeof addr);
- ASSERT(r != 0);
- ASSERT(WSAGetLastError() == WSAEWOULDBLOCK);
-
- r = uv_poll_init_socket(uv_default_loop(), &handle, sock);
- ASSERT(r == 0);
- r = uv_poll_start(&handle, UV_READABLE | UV_WRITABLE, poll_cb);
- ASSERT(r == 0);
-
- uv_close((uv_handle_t*) &handle, close_cb);
-
- close_socket_and_verify_stack();
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(close_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-#endif /* _WIN32 */
diff --git a/3rdparty/libuv/test/test-poll-close.c b/3rdparty/libuv/test/test-poll-close.c
deleted file mode 100644
index 2eccddf5b0b..00000000000
--- a/3rdparty/libuv/test/test-poll-close.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include <errno.h>
-
-#ifndef _WIN32
-# include <fcntl.h>
-# include <sys/socket.h>
-# include <unistd.h>
-#endif
-
-#include "uv.h"
-#include "task.h"
-
-#define NUM_SOCKETS 64
-
-
-static int close_cb_called = 0;
-
-
-static void close_cb(uv_handle_t* handle) {
- close_cb_called++;
-}
-
-
-TEST_IMPL(poll_close) {
- uv_os_sock_t sockets[NUM_SOCKETS];
- uv_poll_t poll_handles[NUM_SOCKETS];
- int i;
-
-#ifdef _WIN32
- {
- struct WSAData wsa_data;
- int r = WSAStartup(MAKEWORD(2, 2), &wsa_data);
- ASSERT(r == 0);
- }
-#endif
-
- for (i = 0; i < NUM_SOCKETS; i++) {
- sockets[i] = socket(AF_INET, SOCK_STREAM, 0);
- uv_poll_init_socket(uv_default_loop(), &poll_handles[i], sockets[i]);
- uv_poll_start(&poll_handles[i], UV_READABLE | UV_WRITABLE, NULL);
- }
-
- for (i = 0; i < NUM_SOCKETS; i++) {
- uv_close((uv_handle_t*) &poll_handles[i], close_cb);
- }
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(close_cb_called == NUM_SOCKETS);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-poll-closesocket.c b/3rdparty/libuv/test/test-poll-closesocket.c
deleted file mode 100644
index 4db74a01f63..00000000000
--- a/3rdparty/libuv/test/test-poll-closesocket.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#ifdef _WIN32
-
-#include <errno.h>
-
-#include "uv.h"
-#include "task.h"
-
-uv_os_sock_t sock;
-uv_poll_t handle;
-
-static int close_cb_called = 0;
-
-
-static void close_cb(uv_handle_t* h) {
- close_cb_called++;
-}
-
-
-static void poll_cb(uv_poll_t* h, int status, int events) {
- int r;
-
- ASSERT(status == 0);
- ASSERT(h == &handle);
-
- r = uv_poll_start(&handle, UV_READABLE, poll_cb);
- ASSERT(r == 0);
-
- closesocket(sock);
- uv_close((uv_handle_t*) &handle, close_cb);
-
-}
-
-
-TEST_IMPL(poll_closesocket) {
- struct WSAData wsa_data;
- int r;
- unsigned long on;
- struct sockaddr_in addr;
-
- r = WSAStartup(MAKEWORD(2, 2), &wsa_data);
- ASSERT(r == 0);
-
- sock = socket(AF_INET, SOCK_STREAM, 0);
- ASSERT(sock != INVALID_SOCKET);
- on = 1;
- r = ioctlsocket(sock, FIONBIO, &on);
- ASSERT(r == 0);
-
- r = uv_ip4_addr("127.0.0.1", TEST_PORT, &addr);
- ASSERT(r == 0);
-
- r = connect(sock, (const struct sockaddr*) &addr, sizeof addr);
- ASSERT(r != 0);
- ASSERT(WSAGetLastError() == WSAEWOULDBLOCK);
-
- r = uv_poll_init_socket(uv_default_loop(), &handle, sock);
- ASSERT(r == 0);
- r = uv_poll_start(&handle, UV_WRITABLE, poll_cb);
- ASSERT(r == 0);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(close_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-#endif
diff --git a/3rdparty/libuv/test/test-poll.c b/3rdparty/libuv/test/test-poll.c
deleted file mode 100644
index be8b00c32ca..00000000000
--- a/3rdparty/libuv/test/test-poll.c
+++ /dev/null
@@ -1,560 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include <errno.h>
-
-#ifndef _WIN32
-# include <sys/socket.h>
-# include <unistd.h>
-#endif
-
-#include "uv.h"
-#include "task.h"
-
-
-#define NUM_CLIENTS 5
-#define TRANSFER_BYTES (1 << 16)
-
-#undef MIN
-#define MIN(a, b) (((a) < (b)) ? (a) : (b));
-
-
-typedef enum {
- UNIDIRECTIONAL,
- DUPLEX
-} test_mode_t;
-
-typedef struct connection_context_s {
- uv_poll_t poll_handle;
- uv_timer_t timer_handle;
- uv_os_sock_t sock;
- size_t read, sent;
- int is_server_connection;
- int open_handles;
- int got_fin, sent_fin;
- unsigned int events, delayed_events;
-} connection_context_t;
-
-typedef struct server_context_s {
- uv_poll_t poll_handle;
- uv_os_sock_t sock;
- int connections;
-} server_context_t;
-
-
-static void delay_timer_cb(uv_timer_t* timer);
-
-
-static test_mode_t test_mode = DUPLEX;
-
-static int closed_connections = 0;
-
-static int valid_writable_wakeups = 0;
-static int spurious_writable_wakeups = 0;
-
-
-static int got_eagain(void) {
-#ifdef _WIN32
- return WSAGetLastError() == WSAEWOULDBLOCK;
-#else
- return errno == EAGAIN
- || errno == EINPROGRESS
-#ifdef EWOULDBLOCK
- || errno == EWOULDBLOCK;
-#endif
- ;
-#endif
-}
-
-
-static uv_os_sock_t create_bound_socket (struct sockaddr_in bind_addr) {
- uv_os_sock_t sock;
- int r;
-
- sock = socket(AF_INET, SOCK_STREAM, IPPROTO_IP);
-#ifdef _WIN32
- ASSERT(sock != INVALID_SOCKET);
-#else
- ASSERT(sock >= 0);
-#endif
-
-#ifndef _WIN32
- {
- /* Allow reuse of the port. */
- int yes = 1;
- r = setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof yes);
- ASSERT(r == 0);
- }
-#endif
-
- r = bind(sock, (const struct sockaddr*) &bind_addr, sizeof bind_addr);
- ASSERT(r == 0);
-
- return sock;
-}
-
-
-static void close_socket(uv_os_sock_t sock) {
- int r;
-#ifdef _WIN32
- r = closesocket(sock);
-#else
- r = close(sock);
-#endif
- ASSERT(r == 0);
-}
-
-
-static connection_context_t* create_connection_context(
- uv_os_sock_t sock, int is_server_connection) {
- int r;
- connection_context_t* context;
-
- context = (connection_context_t*) malloc(sizeof *context);
- ASSERT(context != NULL);
-
- context->sock = sock;
- context->is_server_connection = is_server_connection;
- context->read = 0;
- context->sent = 0;
- context->open_handles = 0;
- context->events = 0;
- context->delayed_events = 0;
- context->got_fin = 0;
- context->sent_fin = 0;
-
- r = uv_poll_init_socket(uv_default_loop(), &context->poll_handle, sock);
- context->open_handles++;
- context->poll_handle.data = context;
- ASSERT(r == 0);
-
- r = uv_timer_init(uv_default_loop(), &context->timer_handle);
- context->open_handles++;
- context->timer_handle.data = context;
- ASSERT(r == 0);
-
- return context;
-}
-
-
-static void connection_close_cb(uv_handle_t* handle) {
- connection_context_t* context = (connection_context_t*) handle->data;
-
- if (--context->open_handles == 0) {
- if (test_mode == DUPLEX || context->is_server_connection) {
- ASSERT(context->read == TRANSFER_BYTES);
- } else {
- ASSERT(context->read == 0);
- }
-
- if (test_mode == DUPLEX || !context->is_server_connection) {
- ASSERT(context->sent == TRANSFER_BYTES);
- } else {
- ASSERT(context->sent == 0);
- }
-
- closed_connections++;
-
- free(context);
- }
-}
-
-
-static void destroy_connection_context(connection_context_t* context) {
- uv_close((uv_handle_t*) &context->poll_handle, connection_close_cb);
- uv_close((uv_handle_t*) &context->timer_handle, connection_close_cb);
-}
-
-
-static void connection_poll_cb(uv_poll_t* handle, int status, int events) {
- connection_context_t* context = (connection_context_t*) handle->data;
- unsigned int new_events;
- int r;
-
- ASSERT(status == 0);
- ASSERT(events & context->events);
- ASSERT(!(events & ~context->events));
-
- new_events = context->events;
-
- if (events & UV_READABLE) {
- int action = rand() % 7;
-
- switch (action) {
- case 0:
- case 1: {
- /* Read a couple of bytes. */
- static char buffer[74];
- r = recv(context->sock, buffer, sizeof buffer, 0);
- ASSERT(r >= 0);
-
- if (r > 0) {
- context->read += r;
- } else {
- /* Got FIN. */
- context->got_fin = 1;
- new_events &= ~UV_READABLE;
- }
-
- break;
- }
-
- case 2:
- case 3: {
- /* Read until EAGAIN. */
- static char buffer[931];
- r = recv(context->sock, buffer, sizeof buffer, 0);
- ASSERT(r >= 0);
-
- while (r > 0) {
- context->read += r;
- r = recv(context->sock, buffer, sizeof buffer, 0);
- }
-
- if (r == 0) {
- /* Got FIN. */
- context->got_fin = 1;
- new_events &= ~UV_READABLE;
- } else {
- ASSERT(got_eagain());
- }
-
- break;
- }
-
- case 4:
- /* Ignore. */
- break;
-
- case 5:
- /* Stop reading for a while. Restart in timer callback. */
- new_events &= ~UV_READABLE;
- if (!uv_is_active((uv_handle_t*) &context->timer_handle)) {
- context->delayed_events = UV_READABLE;
- uv_timer_start(&context->timer_handle, delay_timer_cb, 10, 0);
- } else {
- context->delayed_events |= UV_READABLE;
- }
- break;
-
- case 6:
- /* Fudge with the event mask. */
- uv_poll_start(&context->poll_handle, UV_WRITABLE, connection_poll_cb);
- uv_poll_start(&context->poll_handle, UV_READABLE, connection_poll_cb);
- context->events = UV_READABLE;
- break;
-
- default:
- ASSERT(0);
- }
- }
-
- if (events & UV_WRITABLE) {
- if (context->sent < TRANSFER_BYTES &&
- !(test_mode == UNIDIRECTIONAL && context->is_server_connection)) {
- /* We have to send more bytes. */
- int action = rand() % 7;
-
- switch (action) {
- case 0:
- case 1: {
- /* Send a couple of bytes. */
- static char buffer[103];
-
- int send_bytes = MIN(TRANSFER_BYTES - context->sent, sizeof buffer);
- ASSERT(send_bytes > 0);
-
- r = send(context->sock, buffer, send_bytes, 0);
-
- if (r < 0) {
- ASSERT(got_eagain());
- spurious_writable_wakeups++;
- break;
- }
-
- ASSERT(r > 0);
- context->sent += r;
- valid_writable_wakeups++;
- break;
- }
-
- case 2:
- case 3: {
- /* Send until EAGAIN. */
- static char buffer[1234];
-
- int send_bytes = MIN(TRANSFER_BYTES - context->sent, sizeof buffer);
- ASSERT(send_bytes > 0);
-
- r = send(context->sock, buffer, send_bytes, 0);
-
- if (r < 0) {
- ASSERT(got_eagain());
- spurious_writable_wakeups++;
- break;
- }
-
- ASSERT(r > 0);
- valid_writable_wakeups++;
- context->sent += r;
-
- while (context->sent < TRANSFER_BYTES) {
- send_bytes = MIN(TRANSFER_BYTES - context->sent, sizeof buffer);
- ASSERT(send_bytes > 0);
-
- r = send(context->sock, buffer, send_bytes, 0);
-
- if (r <= 0) break;
- context->sent += r;
- }
- ASSERT(r > 0 || got_eagain());
- break;
- }
-
- case 4:
- /* Ignore. */
- break;
-
- case 5:
- /* Stop sending for a while. Restart in timer callback. */
- new_events &= ~UV_WRITABLE;
- if (!uv_is_active((uv_handle_t*) &context->timer_handle)) {
- context->delayed_events = UV_WRITABLE;
- uv_timer_start(&context->timer_handle, delay_timer_cb, 100, 0);
- } else {
- context->delayed_events |= UV_WRITABLE;
- }
- break;
-
- case 6:
- /* Fudge with the event mask. */
- uv_poll_start(&context->poll_handle,
- UV_READABLE,
- connection_poll_cb);
- uv_poll_start(&context->poll_handle,
- UV_WRITABLE,
- connection_poll_cb);
- context->events = UV_WRITABLE;
- break;
-
- default:
- ASSERT(0);
- }
-
- } else {
- /* Nothing more to write. Send FIN. */
- int r;
-#ifdef _WIN32
- r = shutdown(context->sock, SD_SEND);
-#else
- r = shutdown(context->sock, SHUT_WR);
-#endif
- ASSERT(r == 0);
- context->sent_fin = 1;
- new_events &= ~UV_WRITABLE;
- }
- }
-
- if (context->got_fin && context->sent_fin) {
- /* Sent and received FIN. Close and destroy context. */
- close_socket(context->sock);
- destroy_connection_context(context);
- context->events = 0;
-
- } else if (new_events != context->events) {
- /* Poll mask changed. Call uv_poll_start again. */
- context->events = new_events;
- uv_poll_start(handle, new_events, connection_poll_cb);
- }
-
- /* Assert that uv_is_active works correctly for poll handles. */
- if (context->events != 0) {
- ASSERT(1 == uv_is_active((uv_handle_t*) handle));
- } else {
- ASSERT(0 == uv_is_active((uv_handle_t*) handle));
- }
-}
-
-
-static void delay_timer_cb(uv_timer_t* timer) {
- connection_context_t* context = (connection_context_t*) timer->data;
- int r;
-
- /* Timer should auto stop. */
- ASSERT(0 == uv_is_active((uv_handle_t*) timer));
-
- /* Add the requested events to the poll mask. */
- ASSERT(context->delayed_events != 0);
- context->events |= context->delayed_events;
- context->delayed_events = 0;
-
- r = uv_poll_start(&context->poll_handle,
- context->events,
- connection_poll_cb);
- ASSERT(r == 0);
-}
-
-
-static server_context_t* create_server_context(
- uv_os_sock_t sock) {
- int r;
- server_context_t* context;
-
- context = (server_context_t*) malloc(sizeof *context);
- ASSERT(context != NULL);
-
- context->sock = sock;
- context->connections = 0;
-
- r = uv_poll_init_socket(uv_default_loop(), &context->poll_handle, sock);
- context->poll_handle.data = context;
- ASSERT(r == 0);
-
- return context;
-}
-
-
-static void server_close_cb(uv_handle_t* handle) {
- server_context_t* context = (server_context_t*) handle->data;
- free(context);
-}
-
-
-static void destroy_server_context(server_context_t* context) {
- uv_close((uv_handle_t*) &context->poll_handle, server_close_cb);
-}
-
-
-static void server_poll_cb(uv_poll_t* handle, int status, int events) {
- server_context_t* server_context = (server_context_t*)
- handle->data;
- connection_context_t* connection_context;
- struct sockaddr_in addr;
- socklen_t addr_len;
- uv_os_sock_t sock;
- int r;
-
- addr_len = sizeof addr;
- sock = accept(server_context->sock, (struct sockaddr*) &addr, &addr_len);
-#ifdef _WIN32
- ASSERT(sock != INVALID_SOCKET);
-#else
- ASSERT(sock >= 0);
-#endif
-
- connection_context = create_connection_context(sock, 1);
- connection_context->events = UV_READABLE | UV_WRITABLE;
- r = uv_poll_start(&connection_context->poll_handle,
- UV_READABLE | UV_WRITABLE,
- connection_poll_cb);
- ASSERT(r == 0);
-
- if (++server_context->connections == NUM_CLIENTS) {
- close_socket(server_context->sock);
- destroy_server_context(server_context);
- }
-}
-
-
-static void start_server(void) {
- server_context_t* context;
- struct sockaddr_in addr;
- uv_os_sock_t sock;
- int r;
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
- sock = create_bound_socket(addr);
- context = create_server_context(sock);
-
- r = listen(sock, 100);
- ASSERT(r == 0);
-
- r = uv_poll_start(&context->poll_handle, UV_READABLE, server_poll_cb);
- ASSERT(r == 0);
-}
-
-
-static void start_client(void) {
- uv_os_sock_t sock;
- connection_context_t* context;
- struct sockaddr_in server_addr;
- struct sockaddr_in addr;
- int r;
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &server_addr));
- ASSERT(0 == uv_ip4_addr("0.0.0.0", 0, &addr));
-
- sock = create_bound_socket(addr);
- context = create_connection_context(sock, 0);
-
- context->events = UV_READABLE | UV_WRITABLE;
- r = uv_poll_start(&context->poll_handle,
- UV_READABLE | UV_WRITABLE,
- connection_poll_cb);
- ASSERT(r == 0);
-
- r = connect(sock, (struct sockaddr*) &server_addr, sizeof server_addr);
- ASSERT(r == 0 || got_eagain());
-}
-
-
-static void start_poll_test(void) {
- int i, r;
-
-#ifdef _WIN32
- {
- struct WSAData wsa_data;
- int r = WSAStartup(MAKEWORD(2, 2), &wsa_data);
- ASSERT(r == 0);
- }
-#endif
-
- start_server();
-
- for (i = 0; i < NUM_CLIENTS; i++)
- start_client();
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- /* Assert that at most five percent of the writable wakeups was spurious. */
- ASSERT(spurious_writable_wakeups == 0 ||
- (valid_writable_wakeups + spurious_writable_wakeups) /
- spurious_writable_wakeups > 20);
-
- ASSERT(closed_connections == NUM_CLIENTS * 2);
-
- MAKE_VALGRIND_HAPPY();
-}
-
-
-TEST_IMPL(poll_duplex) {
- test_mode = DUPLEX;
- start_poll_test();
- return 0;
-}
-
-
-TEST_IMPL(poll_unidirectional) {
- test_mode = UNIDIRECTIONAL;
- start_poll_test();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-process-title.c b/3rdparty/libuv/test/test-process-title.c
deleted file mode 100644
index 42ade441604..00000000000
--- a/3rdparty/libuv/test/test-process-title.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-#include <string.h>
-
-
-static void set_title(const char* title) {
- char buffer[512];
- int err;
-
- err = uv_get_process_title(buffer, sizeof(buffer));
- ASSERT(err == 0);
-
- err = uv_set_process_title(title);
- ASSERT(err == 0);
-
- err = uv_get_process_title(buffer, sizeof(buffer));
- ASSERT(err == 0);
-
- ASSERT(strcmp(buffer, title) == 0);
-}
-
-
-TEST_IMPL(process_title) {
-#if defined(__sun) || defined(_AIX)
- RETURN_SKIP("uv_(get|set)_process_title is not implemented.");
-#else
- /* Check for format string vulnerabilities. */
- set_title("%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s");
- set_title("new title");
- return 0;
-#endif
-}
diff --git a/3rdparty/libuv/test/test-queue-foreach-delete.c b/3rdparty/libuv/test/test-queue-foreach-delete.c
deleted file mode 100644
index 45da225381f..00000000000
--- a/3rdparty/libuv/test/test-queue-foreach-delete.c
+++ /dev/null
@@ -1,200 +0,0 @@
-/* Copyright The libuv project and contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <string.h>
-
-
-/*
- * The idea behind the test is as follows.
- * Certain handle types are stored in a queue internally.
- * Extra care should be taken for removal of a handle from the queue while iterating over the queue.
- * (i.e., QUEUE_REMOVE() called within QUEUE_FOREACH())
- * This usually happens when someone closes or stops a handle from within its callback.
- * So we need to check that we haven't screwed the queue on close/stop.
- * To do so we do the following (for each handle type):
- * 1. Create and start 3 handles (#0, #1, and #2).
- *
- * The queue after the start() calls:
- * ..=> [queue head] <=> [handle] <=> [handle #1] <=> [handle] <=..
- *
- * 2. Trigger handles to fire (for uv_idle_t, uv_prepare_t, and uv_check_t there is nothing to do).
- *
- * 3. In the callback for the first-executed handle (#0 or #2 depending on handle type)
- * stop the handle and the next one (#1).
- * (for uv_idle_t, uv_prepare_t, and uv_check_t callbacks are executed in the reverse order as they are start()'ed,
- * so callback for handle #2 will be called first)
- *
- * The queue after the stop() calls:
- * correct foreach "next" |
- * \/
- * ..=> [queue head] <==============================> [handle] <=..
- * [ ] <- [handle] <=> [handle #1] -> [ ]
- * /\
- * wrong foreach "next" |
- *
- * 4. The callback for handle #1 shouldn't be called because the handle #1 is stopped in the previous step.
- * However, if QUEUE_REMOVE() is not handled properly within QUEUE_FOREACH(), the callback _will_ be called.
- */
-
-static const unsigned first_handle_number_idle = 2;
-static const unsigned first_handle_number_prepare = 2;
-static const unsigned first_handle_number_check = 2;
-#ifdef __linux__
-static const unsigned first_handle_number_fs_event = 0;
-#endif
-
-
-#define DEFINE_GLOBALS_AND_CBS(name) \
- static uv_##name##_t (name)[3]; \
- static unsigned name##_cb_calls[3]; \
- \
- static void name##2_cb(uv_##name##_t* handle) { \
- ASSERT(handle == &(name)[2]); \
- if (first_handle_number_##name == 2) { \
- uv_close((uv_handle_t*)&(name)[2], NULL); \
- uv_close((uv_handle_t*)&(name)[1], NULL); \
- } \
- name##_cb_calls[2]++; \
- } \
- \
- static void name##1_cb(uv_##name##_t* handle) { \
- ASSERT(handle == &(name)[1]); \
- ASSERT(0 && "Shouldn't be called" && (&name[0])); \
- } \
- \
- static void name##0_cb(uv_##name##_t* handle) { \
- ASSERT(handle == &(name)[0]); \
- if (first_handle_number_##name == 0) { \
- uv_close((uv_handle_t*)&(name)[0], NULL); \
- uv_close((uv_handle_t*)&(name)[1], NULL); \
- } \
- name##_cb_calls[0]++; \
- } \
- \
- static const uv_##name##_cb name##_cbs[] = { \
- (uv_##name##_cb)name##0_cb, \
- (uv_##name##_cb)name##1_cb, \
- (uv_##name##_cb)name##2_cb, \
- };
-
-#define INIT_AND_START(name, loop) \
- do { \
- size_t i; \
- for (i = 0; i < ARRAY_SIZE(name); i++) { \
- int r; \
- r = uv_##name##_init((loop), &(name)[i]); \
- ASSERT(r == 0); \
- \
- r = uv_##name##_start(&(name)[i], name##_cbs[i]); \
- ASSERT(r == 0); \
- } \
- } while (0)
-
-#define END_ASSERTS(name) \
- do { \
- ASSERT(name##_cb_calls[0] == 1); \
- ASSERT(name##_cb_calls[1] == 0); \
- ASSERT(name##_cb_calls[2] == 1); \
- } while (0)
-
-DEFINE_GLOBALS_AND_CBS(idle)
-DEFINE_GLOBALS_AND_CBS(prepare)
-DEFINE_GLOBALS_AND_CBS(check)
-
-#ifdef __linux__
-DEFINE_GLOBALS_AND_CBS(fs_event)
-
-static const char watched_dir[] = ".";
-static uv_timer_t timer;
-static unsigned helper_timer_cb_calls;
-
-
-static void init_and_start_fs_events(uv_loop_t* loop) {
- size_t i;
- for (i = 0; i < ARRAY_SIZE(fs_event); i++) {
- int r;
- r = uv_fs_event_init(loop, &fs_event[i]);
- ASSERT(r == 0);
-
- r = uv_fs_event_start(&fs_event[i],
- (uv_fs_event_cb)fs_event_cbs[i],
- watched_dir,
- 0);
- ASSERT(r == 0);
- }
-}
-
-static void helper_timer_cb(uv_timer_t* thandle) {
- int r;
- uv_fs_t fs_req;
-
- /* fire all fs_events */
- r = uv_fs_utime(thandle->loop, &fs_req, watched_dir, 0, 0, NULL);
- ASSERT(r == 0);
- ASSERT(fs_req.result == 0);
- ASSERT(fs_req.fs_type == UV_FS_UTIME);
- ASSERT(strcmp(fs_req.path, watched_dir) == 0);
- uv_fs_req_cleanup(&fs_req);
-
- helper_timer_cb_calls++;
-}
-#endif
-
-
-TEST_IMPL(queue_foreach_delete) {
- uv_loop_t* loop;
- int r;
-
- loop = uv_default_loop();
-
- INIT_AND_START(idle, loop);
- INIT_AND_START(prepare, loop);
- INIT_AND_START(check, loop);
-
-#ifdef __linux__
- init_and_start_fs_events(loop);
-
- /* helper timer to trigger async and fs_event callbacks */
- r = uv_timer_init(loop, &timer);
- ASSERT(r == 0);
-
- r = uv_timer_start(&timer, helper_timer_cb, 0, 0);
- ASSERT(r == 0);
-#endif
-
- r = uv_run(loop, UV_RUN_NOWAIT);
- ASSERT(r == 1);
-
- END_ASSERTS(idle);
- END_ASSERTS(prepare);
- END_ASSERTS(check);
-
-#ifdef __linux__
- ASSERT(helper_timer_cb_calls == 1);
-#endif
-
- MAKE_VALGRIND_HAPPY();
-
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-ref.c b/3rdparty/libuv/test/test-ref.c
deleted file mode 100644
index ddaa1738083..00000000000
--- a/3rdparty/libuv/test/test-ref.c
+++ /dev/null
@@ -1,442 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <stdlib.h>
-#include <string.h>
-
-
-static uv_write_t write_req;
-static uv_shutdown_t shutdown_req;
-static uv_connect_t connect_req;
-
-static char buffer[32767];
-
-static int req_cb_called;
-static int connect_cb_called;
-static int write_cb_called;
-static int shutdown_cb_called;
-static int close_cb_called;
-
-
-static void close_cb(uv_handle_t* handle) {
- close_cb_called++;
-}
-
-
-static void do_close(void* handle) {
- close_cb_called = 0;
- uv_close((uv_handle_t*)handle, close_cb);
- ASSERT(close_cb_called == 0);
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(close_cb_called == 1);
-}
-
-
-static void fail_cb(void) {
- FATAL("fail_cb should not have been called");
-}
-
-
-static void fail_cb2(void) {
- ASSERT(0 && "fail_cb2 should not have been called");
-}
-
-
-static void req_cb(uv_handle_t* req, int status) {
- req_cb_called++;
-}
-
-
-static void shutdown_cb(uv_shutdown_t* req, int status) {
- ASSERT(req == &shutdown_req);
- shutdown_cb_called++;
-}
-
-
-static void write_cb(uv_write_t* req, int status) {
- ASSERT(req == &write_req);
- uv_shutdown(&shutdown_req, req->handle, shutdown_cb);
- write_cb_called++;
-}
-
-
-static void connect_and_write(uv_connect_t* req, int status) {
- uv_buf_t buf = uv_buf_init(buffer, sizeof buffer);
- ASSERT(req == &connect_req);
- ASSERT(status == 0);
- uv_write(&write_req, req->handle, &buf, 1, write_cb);
- connect_cb_called++;
-}
-
-
-
-static void connect_and_shutdown(uv_connect_t* req, int status) {
- ASSERT(req == &connect_req);
- ASSERT(status == 0);
- uv_shutdown(&shutdown_req, req->handle, shutdown_cb);
- connect_cb_called++;
-}
-
-
-TEST_IMPL(ref) {
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(idle_ref) {
- uv_idle_t h;
- uv_idle_init(uv_default_loop(), &h);
- uv_idle_start(&h, (uv_idle_cb) fail_cb2);
- uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- do_close(&h);
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(async_ref) {
- uv_async_t h;
- uv_async_init(uv_default_loop(), &h, NULL);
- uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- do_close(&h);
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(prepare_ref) {
- uv_prepare_t h;
- uv_prepare_init(uv_default_loop(), &h);
- uv_prepare_start(&h, (uv_prepare_cb) fail_cb2);
- uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- do_close(&h);
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(check_ref) {
- uv_check_t h;
- uv_check_init(uv_default_loop(), &h);
- uv_check_start(&h, (uv_check_cb) fail_cb2);
- uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- do_close(&h);
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-static void prepare_cb(uv_prepare_t* h) {
- ASSERT(h != NULL);
- uv_unref((uv_handle_t*)h);
-}
-
-
-TEST_IMPL(unref_in_prepare_cb) {
- uv_prepare_t h;
- uv_prepare_init(uv_default_loop(), &h);
- uv_prepare_start(&h, prepare_cb);
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- do_close(&h);
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(timer_ref) {
- uv_timer_t h;
- uv_timer_init(uv_default_loop(), &h);
- uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- do_close(&h);
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(timer_ref2) {
- uv_timer_t h;
- uv_timer_init(uv_default_loop(), &h);
- uv_timer_start(&h, (uv_timer_cb)fail_cb, 42, 42);
- uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- do_close(&h);
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(fs_event_ref) {
- uv_fs_event_t h;
- uv_fs_event_init(uv_default_loop(), &h);
- uv_fs_event_start(&h, (uv_fs_event_cb)fail_cb, ".", 0);
- uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- do_close(&h);
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(fs_poll_ref) {
- uv_fs_poll_t h;
- uv_fs_poll_init(uv_default_loop(), &h);
- uv_fs_poll_start(&h, NULL, ".", 999);
- uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- do_close(&h);
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(tcp_ref) {
- uv_tcp_t h;
- uv_tcp_init(uv_default_loop(), &h);
- uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- do_close(&h);
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(tcp_ref2) {
- uv_tcp_t h;
- uv_tcp_init(uv_default_loop(), &h);
- uv_listen((uv_stream_t*)&h, 128, (uv_connection_cb)fail_cb);
- uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- do_close(&h);
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(tcp_ref2b) {
- uv_tcp_t h;
- uv_tcp_init(uv_default_loop(), &h);
- uv_listen((uv_stream_t*)&h, 128, (uv_connection_cb)fail_cb);
- uv_unref((uv_handle_t*)&h);
- uv_close((uv_handle_t*)&h, close_cb);
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(close_cb_called == 1);
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(tcp_ref3) {
- struct sockaddr_in addr;
- uv_tcp_t h;
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
- uv_tcp_init(uv_default_loop(), &h);
- uv_tcp_connect(&connect_req,
- &h,
- (const struct sockaddr*) &addr,
- connect_and_shutdown);
- uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(connect_cb_called == 1);
- ASSERT(shutdown_cb_called == 1);
- do_close(&h);
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(tcp_ref4) {
- struct sockaddr_in addr;
- uv_tcp_t h;
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
- uv_tcp_init(uv_default_loop(), &h);
- uv_tcp_connect(&connect_req,
- &h,
- (const struct sockaddr*) &addr,
- connect_and_write);
- uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(connect_cb_called == 1);
- ASSERT(write_cb_called == 1);
- ASSERT(shutdown_cb_called == 1);
- do_close(&h);
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(udp_ref) {
- uv_udp_t h;
- uv_udp_init(uv_default_loop(), &h);
- uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- do_close(&h);
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(udp_ref2) {
- struct sockaddr_in addr;
- uv_udp_t h;
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
- uv_udp_init(uv_default_loop(), &h);
- uv_udp_bind(&h, (const struct sockaddr*) &addr, 0);
- uv_udp_recv_start(&h, (uv_alloc_cb)fail_cb, (uv_udp_recv_cb)fail_cb);
- uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- do_close(&h);
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(udp_ref3) {
- struct sockaddr_in addr;
- uv_buf_t buf = uv_buf_init("PING", 4);
- uv_udp_send_t req;
- uv_udp_t h;
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
- uv_udp_init(uv_default_loop(), &h);
- uv_udp_send(&req,
- &h,
- &buf,
- 1,
- (const struct sockaddr*) &addr,
- (uv_udp_send_cb) req_cb);
- uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(req_cb_called == 1);
- do_close(&h);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(pipe_ref) {
- uv_pipe_t h;
- uv_pipe_init(uv_default_loop(), &h, 0);
- uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- do_close(&h);
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(pipe_ref2) {
- uv_pipe_t h;
- uv_pipe_init(uv_default_loop(), &h, 0);
- uv_listen((uv_stream_t*)&h, 128, (uv_connection_cb)fail_cb);
- uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- do_close(&h);
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(pipe_ref3) {
- uv_pipe_t h;
- uv_pipe_init(uv_default_loop(), &h, 0);
- uv_pipe_connect(&connect_req, &h, TEST_PIPENAME, connect_and_shutdown);
- uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(connect_cb_called == 1);
- ASSERT(shutdown_cb_called == 1);
- do_close(&h);
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(pipe_ref4) {
- uv_pipe_t h;
- uv_pipe_init(uv_default_loop(), &h, 0);
- uv_pipe_connect(&connect_req, &h, TEST_PIPENAME, connect_and_write);
- uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(connect_cb_called == 1);
- ASSERT(write_cb_called == 1);
- ASSERT(shutdown_cb_called == 1);
- do_close(&h);
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(process_ref) {
- /* spawn_helper4 blocks indefinitely. */
- char *argv[] = { NULL, "spawn_helper4", NULL };
- uv_process_options_t options;
- size_t exepath_size;
- char exepath[256];
- uv_process_t h;
- int r;
-
- memset(&options, 0, sizeof(options));
- exepath_size = sizeof(exepath);
-
- r = uv_exepath(exepath, &exepath_size);
- ASSERT(r == 0);
-
- argv[0] = exepath;
- options.file = exepath;
- options.args = argv;
- options.exit_cb = NULL;
-
- r = uv_spawn(uv_default_loop(), &h, &options);
- ASSERT(r == 0);
-
- uv_unref((uv_handle_t*)&h);
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- r = uv_process_kill(&h, /* SIGTERM */ 15);
- ASSERT(r == 0);
-
- do_close(&h);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(has_ref) {
- uv_idle_t h;
- uv_idle_init(uv_default_loop(), &h);
- uv_ref((uv_handle_t*)&h);
- ASSERT(uv_has_ref((uv_handle_t*)&h) == 1);
- uv_unref((uv_handle_t*)&h);
- ASSERT(uv_has_ref((uv_handle_t*)&h) == 0);
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-run-nowait.c b/3rdparty/libuv/test/test-run-nowait.c
deleted file mode 100644
index 43524f636d8..00000000000
--- a/3rdparty/libuv/test/test-run-nowait.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-static uv_timer_t timer_handle;
-static int timer_called = 0;
-
-
-static void timer_cb(uv_timer_t* handle) {
- ASSERT(handle == &timer_handle);
- timer_called = 1;
-}
-
-
-TEST_IMPL(run_nowait) {
- int r;
- uv_timer_init(uv_default_loop(), &timer_handle);
- uv_timer_start(&timer_handle, timer_cb, 100, 100);
-
- r = uv_run(uv_default_loop(), UV_RUN_NOWAIT);
- ASSERT(r != 0);
- ASSERT(timer_called == 0);
-
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-run-once.c b/3rdparty/libuv/test/test-run-once.c
deleted file mode 100644
index 10cbf95e4ad..00000000000
--- a/3rdparty/libuv/test/test-run-once.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#define NUM_TICKS 64
-
-static uv_idle_t idle_handle;
-static int idle_counter;
-
-
-static void idle_cb(uv_idle_t* handle) {
- ASSERT(handle == &idle_handle);
-
- if (++idle_counter == NUM_TICKS)
- uv_idle_stop(handle);
-}
-
-
-TEST_IMPL(run_once) {
- uv_idle_init(uv_default_loop(), &idle_handle);
- uv_idle_start(&idle_handle, idle_cb);
-
- while (uv_run(uv_default_loop(), UV_RUN_ONCE));
- ASSERT(idle_counter == NUM_TICKS);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-semaphore.c b/3rdparty/libuv/test/test-semaphore.c
deleted file mode 100644
index ac03bb08f17..00000000000
--- a/3rdparty/libuv/test/test-semaphore.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <stdlib.h>
-#include <string.h>
-
-typedef struct {
- uv_mutex_t mutex;
- uv_sem_t sem;
- int delay;
- volatile int posted;
-} worker_config;
-
-
-static void worker(void* arg) {
- worker_config* c = arg;
-
- if (c->delay)
- uv_sleep(c->delay);
-
- uv_mutex_lock(&c->mutex);
- ASSERT(c->posted == 0);
- uv_sem_post(&c->sem);
- c->posted = 1;
- uv_mutex_unlock(&c->mutex);
-}
-
-
-TEST_IMPL(semaphore_1) {
- uv_thread_t thread;
- worker_config wc;
-
- memset(&wc, 0, sizeof(wc));
-
- ASSERT(0 == uv_sem_init(&wc.sem, 0));
- ASSERT(0 == uv_mutex_init(&wc.mutex));
- ASSERT(0 == uv_thread_create(&thread, worker, &wc));
-
- uv_sleep(100);
- uv_mutex_lock(&wc.mutex);
- ASSERT(wc.posted == 1);
- uv_sem_wait(&wc.sem); /* should not block */
- uv_mutex_unlock(&wc.mutex); /* ergo, it should be ok to unlock after wait */
-
- ASSERT(0 == uv_thread_join(&thread));
- uv_mutex_destroy(&wc.mutex);
- uv_sem_destroy(&wc.sem);
-
- return 0;
-}
-
-
-TEST_IMPL(semaphore_2) {
- uv_thread_t thread;
- worker_config wc;
-
- memset(&wc, 0, sizeof(wc));
- wc.delay = 100;
-
- ASSERT(0 == uv_sem_init(&wc.sem, 0));
- ASSERT(0 == uv_mutex_init(&wc.mutex));
- ASSERT(0 == uv_thread_create(&thread, worker, &wc));
-
- uv_sem_wait(&wc.sem);
-
- ASSERT(0 == uv_thread_join(&thread));
- uv_mutex_destroy(&wc.mutex);
- uv_sem_destroy(&wc.sem);
-
- return 0;
-}
-
-
-TEST_IMPL(semaphore_3) {
- uv_sem_t sem;
-
- ASSERT(0 == uv_sem_init(&sem, 3));
- uv_sem_wait(&sem); /* should not block */
- uv_sem_wait(&sem); /* should not block */
- ASSERT(0 == uv_sem_trywait(&sem));
- ASSERT(UV_EAGAIN == uv_sem_trywait(&sem));
-
- uv_sem_post(&sem);
- ASSERT(0 == uv_sem_trywait(&sem));
- ASSERT(UV_EAGAIN == uv_sem_trywait(&sem));
-
- uv_sem_destroy(&sem);
-
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-shutdown-close.c b/3rdparty/libuv/test/test-shutdown-close.c
deleted file mode 100644
index 78c369be2d9..00000000000
--- a/3rdparty/libuv/test/test-shutdown-close.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-/*
- * These tests verify that the uv_shutdown callback is always made, even when
- * it is immediately followed by an uv_close call.
- */
-
-#include "uv.h"
-#include "task.h"
-
-
-static uv_shutdown_t shutdown_req;
-static uv_connect_t connect_req;
-
-static int connect_cb_called = 0;
-static int shutdown_cb_called = 0;
-static int close_cb_called = 0;
-
-
-static void shutdown_cb(uv_shutdown_t* req, int status) {
- ASSERT(req == &shutdown_req);
- ASSERT(status == 0 || status == UV_ECANCELED);
- shutdown_cb_called++;
-}
-
-
-static void close_cb(uv_handle_t* handle) {
- close_cb_called++;
-}
-
-
-static void connect_cb(uv_connect_t* req, int status) {
- int r;
-
- ASSERT(req == &connect_req);
- ASSERT(status == 0);
-
- r = uv_shutdown(&shutdown_req, req->handle, shutdown_cb);
- ASSERT(r == 0);
- ASSERT(0 == uv_is_closing((uv_handle_t*) req->handle));
- uv_close((uv_handle_t*) req->handle, close_cb);
- ASSERT(1 == uv_is_closing((uv_handle_t*) req->handle));
-
- connect_cb_called++;
-}
-
-
-TEST_IMPL(shutdown_close_tcp) {
- struct sockaddr_in addr;
- uv_tcp_t h;
- int r;
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
- r = uv_tcp_init(uv_default_loop(), &h);
- ASSERT(r == 0);
- r = uv_tcp_connect(&connect_req,
- &h,
- (const struct sockaddr*) &addr,
- connect_cb);
- ASSERT(r == 0);
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(connect_cb_called == 1);
- ASSERT(shutdown_cb_called == 1);
- ASSERT(close_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(shutdown_close_pipe) {
- uv_pipe_t h;
- int r;
-
- r = uv_pipe_init(uv_default_loop(), &h, 0);
- ASSERT(r == 0);
- uv_pipe_connect(&connect_req, &h, TEST_PIPENAME, connect_cb);
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(connect_cb_called == 1);
- ASSERT(shutdown_cb_called == 1);
- ASSERT(close_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-shutdown-eof.c b/3rdparty/libuv/test/test-shutdown-eof.c
deleted file mode 100644
index 9f95e7561f2..00000000000
--- a/3rdparty/libuv/test/test-shutdown-eof.c
+++ /dev/null
@@ -1,182 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-static uv_timer_t timer;
-static uv_tcp_t tcp;
-static uv_connect_t connect_req;
-static uv_write_t write_req;
-static uv_shutdown_t shutdown_req;
-static uv_buf_t qbuf;
-static int got_q;
-static int got_eof;
-static int called_connect_cb;
-static int called_shutdown_cb;
-static int called_tcp_close_cb;
-static int called_timer_close_cb;
-static int called_timer_cb;
-
-
-static void alloc_cb(uv_handle_t* handle, size_t size, uv_buf_t* buf) {
- buf->base = malloc(size);
- buf->len = size;
-}
-
-
-static void read_cb(uv_stream_t* t, ssize_t nread, const uv_buf_t* buf) {
- ASSERT((uv_tcp_t*)t == &tcp);
-
- if (nread == 0) {
- free(buf->base);
- return;
- }
-
- if (!got_q) {
- ASSERT(nread == 1);
- ASSERT(!got_eof);
- ASSERT(buf->base[0] == 'Q');
- free(buf->base);
- got_q = 1;
- puts("got Q");
- } else {
- ASSERT(nread == UV_EOF);
- if (buf->base) {
- free(buf->base);
- }
- got_eof = 1;
- puts("got EOF");
- }
-}
-
-
-static void shutdown_cb(uv_shutdown_t *req, int status) {
- ASSERT(req == &shutdown_req);
-
- ASSERT(called_connect_cb == 1);
- ASSERT(!got_eof);
- ASSERT(called_tcp_close_cb == 0);
- ASSERT(called_timer_close_cb == 0);
- ASSERT(called_timer_cb == 0);
-
- called_shutdown_cb++;
-}
-
-
-static void connect_cb(uv_connect_t *req, int status) {
- ASSERT(status == 0);
- ASSERT(req == &connect_req);
-
- /* Start reading from our connection so we can receive the EOF. */
- uv_read_start((uv_stream_t*)&tcp, alloc_cb, read_cb);
-
- /*
- * Write the letter 'Q' to gracefully kill the echo-server. This will not
- * effect our connection.
- */
- uv_write(&write_req, (uv_stream_t*) &tcp, &qbuf, 1, NULL);
-
- /* Shutdown our end of the connection. */
- uv_shutdown(&shutdown_req, (uv_stream_t*) &tcp, shutdown_cb);
-
- called_connect_cb++;
- ASSERT(called_shutdown_cb == 0);
-}
-
-
-static void tcp_close_cb(uv_handle_t* handle) {
- ASSERT(handle == (uv_handle_t*) &tcp);
-
- ASSERT(called_connect_cb == 1);
- ASSERT(got_q);
- ASSERT(got_eof);
- ASSERT(called_timer_cb == 1);
-
- called_tcp_close_cb++;
-}
-
-
-static void timer_close_cb(uv_handle_t* handle) {
- ASSERT(handle == (uv_handle_t*) &timer);
- called_timer_close_cb++;
-}
-
-
-static void timer_cb(uv_timer_t* handle) {
- ASSERT(handle == &timer);
- uv_close((uv_handle_t*) handle, timer_close_cb);
-
- /*
- * The most important assert of the test: we have not received
- * tcp_close_cb yet.
- */
- ASSERT(called_tcp_close_cb == 0);
- uv_close((uv_handle_t*) &tcp, tcp_close_cb);
-
- called_timer_cb++;
-}
-
-
-/*
- * This test has a client which connects to the echo_server and immediately
- * issues a shutdown. The echo-server, in response, will also shutdown their
- * connection. We check, with a timer, that libuv is not automatically
- * calling uv_close when the client receives the EOF from echo-server.
- */
-TEST_IMPL(shutdown_eof) {
- struct sockaddr_in server_addr;
- int r;
-
- qbuf.base = "Q";
- qbuf.len = 1;
-
- r = uv_timer_init(uv_default_loop(), &timer);
- ASSERT(r == 0);
-
- uv_timer_start(&timer, timer_cb, 100, 0);
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &server_addr));
- r = uv_tcp_init(uv_default_loop(), &tcp);
- ASSERT(!r);
-
- r = uv_tcp_connect(&connect_req,
- &tcp,
- (const struct sockaddr*) &server_addr,
- connect_cb);
- ASSERT(!r);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(called_connect_cb == 1);
- ASSERT(called_shutdown_cb == 1);
- ASSERT(got_eof);
- ASSERT(got_q);
- ASSERT(called_tcp_close_cb == 1);
- ASSERT(called_timer_close_cb == 1);
- ASSERT(called_timer_cb == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
diff --git a/3rdparty/libuv/test/test-shutdown-twice.c b/3rdparty/libuv/test/test-shutdown-twice.c
deleted file mode 100644
index 75c05435499..00000000000
--- a/3rdparty/libuv/test/test-shutdown-twice.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-/*
- * This is a regression test for issue #1113 (calling uv_shutdown twice will
- * leave a ghost request in the system)
- */
-
-#include "uv.h"
-#include "task.h"
-
-static uv_shutdown_t req1;
-static uv_shutdown_t req2;
-
-static int shutdown_cb_called = 0;
-
-static void close_cb(uv_handle_t* handle) {
-
-}
-
-static void shutdown_cb(uv_shutdown_t* req, int status) {
- ASSERT(req == &req1);
- ASSERT(status == 0);
- shutdown_cb_called++;
- uv_close((uv_handle_t*) req->handle, close_cb);
-}
-
-static void connect_cb(uv_connect_t* req, int status) {
- int r;
-
- ASSERT(status == 0);
-
- r = uv_shutdown(&req1, req->handle, shutdown_cb);
- ASSERT(r == 0);
- r = uv_shutdown(&req2, req->handle, shutdown_cb);
- ASSERT(r != 0);
-
-}
-
-TEST_IMPL(shutdown_twice) {
- struct sockaddr_in addr;
- uv_loop_t* loop;
- int r;
- uv_tcp_t h;
-
- uv_connect_t connect_req;
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
- loop = uv_default_loop();
-
- r = uv_tcp_init(loop, &h);
-
- r = uv_tcp_connect(&connect_req,
- &h,
- (const struct sockaddr*) &addr,
- connect_cb);
- ASSERT(r == 0);
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(shutdown_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-signal-multiple-loops.c b/3rdparty/libuv/test/test-signal-multiple-loops.c
deleted file mode 100644
index 158129919bd..00000000000
--- a/3rdparty/libuv/test/test-signal-multiple-loops.c
+++ /dev/null
@@ -1,290 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-
-/* This test does not pretend to be cross-platform. */
-#ifndef _WIN32
-
-#include "uv.h"
-#include "task.h"
-
-#include <errno.h>
-#include <signal.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-/* The value of NUM_SIGNAL_HANDLING_THREADS is not arbitrary; it needs to be a
- * multiple of three for reasons that will become clear when you scroll down.
- * We're basically creating three different thread groups. The total needs
- * to be divisible by three in order for the numbers in the final check to
- * match up.
- */
-#define NUM_SIGNAL_HANDLING_THREADS 24
-#define NUM_LOOP_CREATING_THREADS 10
-
-enum signal_action {
- ONLY_SIGUSR1,
- ONLY_SIGUSR2,
- SIGUSR1_AND_SIGUSR2
-};
-
-static uv_sem_t sem;
-static uv_mutex_t counter_lock;
-static volatile int stop = 0;
-
-static volatile int signal1_cb_counter = 0;
-static volatile int signal2_cb_counter = 0;
-static volatile int loop_creation_counter = 0;
-
-
-static void increment_counter(volatile int* counter) {
- uv_mutex_lock(&counter_lock);
- ++(*counter);
- uv_mutex_unlock(&counter_lock);
-}
-
-
-static void signal1_cb(uv_signal_t* handle, int signum) {
- ASSERT(signum == SIGUSR1);
- increment_counter(&signal1_cb_counter);
- uv_signal_stop(handle);
-}
-
-
-static void signal2_cb(uv_signal_t* handle, int signum) {
- ASSERT(signum == SIGUSR2);
- increment_counter(&signal2_cb_counter);
- uv_signal_stop(handle);
-}
-
-
-static void signal_handling_worker(void* context) {
- enum signal_action action;
- uv_signal_t signal1a;
- uv_signal_t signal1b;
- uv_signal_t signal2;
- uv_loop_t loop;
- int r;
-
- action = (enum signal_action) (uintptr_t) context;
-
- ASSERT(0 == uv_loop_init(&loop));
-
- /* Setup the signal watchers and start them. */
- if (action == ONLY_SIGUSR1 || action == SIGUSR1_AND_SIGUSR2) {
- r = uv_signal_init(&loop, &signal1a);
- ASSERT(r == 0);
- r = uv_signal_start(&signal1a, signal1_cb, SIGUSR1);
- ASSERT(r == 0);
- r = uv_signal_init(&loop, &signal1b);
- ASSERT(r == 0);
- r = uv_signal_start(&signal1b, signal1_cb, SIGUSR1);
- ASSERT(r == 0);
- }
-
- if (action == ONLY_SIGUSR2 || action == SIGUSR1_AND_SIGUSR2) {
- r = uv_signal_init(&loop, &signal2);
- ASSERT(r == 0);
- r = uv_signal_start(&signal2, signal2_cb, SIGUSR2);
- ASSERT(r == 0);
- }
-
- /* Signal watchers are now set up. */
- uv_sem_post(&sem);
-
- /* Wait for all signals. The signal callbacks stop the watcher, so uv_run
- * will return when all signal watchers caught a signal.
- */
- r = uv_run(&loop, UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- /* Restart the signal watchers. */
- if (action == ONLY_SIGUSR1 || action == SIGUSR1_AND_SIGUSR2) {
- r = uv_signal_start(&signal1a, signal1_cb, SIGUSR1);
- ASSERT(r == 0);
- r = uv_signal_start(&signal1b, signal1_cb, SIGUSR1);
- ASSERT(r == 0);
- }
-
- if (action == ONLY_SIGUSR2 || action == SIGUSR1_AND_SIGUSR2) {
- r = uv_signal_start(&signal2, signal2_cb, SIGUSR2);
- ASSERT(r == 0);
- }
-
- /* Wait for signals once more. */
- uv_sem_post(&sem);
-
- r = uv_run(&loop, UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- /* Close the watchers. */
- if (action == ONLY_SIGUSR1 || action == SIGUSR1_AND_SIGUSR2) {
- uv_close((uv_handle_t*) &signal1a, NULL);
- uv_close((uv_handle_t*) &signal1b, NULL);
- }
-
- if (action == ONLY_SIGUSR2 || action == SIGUSR1_AND_SIGUSR2) {
- uv_close((uv_handle_t*) &signal2, NULL);
- }
-
- /* Wait for the signal watchers to close. */
- r = uv_run(&loop, UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- uv_loop_close(&loop);
-}
-
-
-static void signal_unexpected_cb(uv_signal_t* handle, int signum) {
- ASSERT(0 && "signal_unexpected_cb should never be called");
-}
-
-
-static void loop_creating_worker(void* context) {
- (void) context;
-
- do {
- uv_loop_t *loop;
- uv_signal_t signal;
- int r;
-
- loop = malloc(sizeof(*loop));
- ASSERT(loop != NULL);
- ASSERT(0 == uv_loop_init(loop));
-
- r = uv_signal_init(loop, &signal);
- ASSERT(r == 0);
-
- r = uv_signal_start(&signal, signal_unexpected_cb, SIGTERM);
- ASSERT(r == 0);
-
- uv_close((uv_handle_t*) &signal, NULL);
-
- r = uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- uv_loop_close(loop);
- free(loop);
-
- increment_counter(&loop_creation_counter);
- } while (!stop);
-}
-
-
-TEST_IMPL(signal_multiple_loops) {
- uv_thread_t loop_creating_threads[NUM_LOOP_CREATING_THREADS];
- uv_thread_t signal_handling_threads[NUM_SIGNAL_HANDLING_THREADS];
- enum signal_action action;
- sigset_t sigset;
- int i;
- int r;
-
- r = uv_sem_init(&sem, 0);
- ASSERT(r == 0);
-
- r = uv_mutex_init(&counter_lock);
- ASSERT(r == 0);
-
- /* Create a couple of threads that create a destroy loops continuously. */
- for (i = 0; i < NUM_LOOP_CREATING_THREADS; i++) {
- r = uv_thread_create(&loop_creating_threads[i],
- loop_creating_worker,
- NULL);
- ASSERT(r == 0);
- }
-
- /* Create a couple of threads that actually handle signals. */
- for (i = 0; i < NUM_SIGNAL_HANDLING_THREADS; i++) {
- switch (i % 3) {
- case 0: action = ONLY_SIGUSR1; break;
- case 1: action = ONLY_SIGUSR2; break;
- case 2: action = SIGUSR1_AND_SIGUSR2; break;
- }
-
- r = uv_thread_create(&signal_handling_threads[i],
- signal_handling_worker,
- (void*) (uintptr_t) action);
- ASSERT(r == 0);
- }
-
- /* Wait until all threads have started and set up their signal watchers. */
- for (i = 0; i < NUM_SIGNAL_HANDLING_THREADS; i++)
- uv_sem_wait(&sem);
-
- r = kill(getpid(), SIGUSR1);
- ASSERT(r == 0);
- r = kill(getpid(), SIGUSR2);
- ASSERT(r == 0);
-
- /* Wait for all threads to handle these signals. */
- for (i = 0; i < NUM_SIGNAL_HANDLING_THREADS; i++)
- uv_sem_wait(&sem);
-
- /* Block all signals to this thread, so we are sure that from here the signal
- * handler runs in another thread. This is is more likely to catch thread and
- * signal safety issues if there are any.
- */
- sigfillset(&sigset);
- pthread_sigmask(SIG_SETMASK, &sigset, NULL);
-
- r = kill(getpid(), SIGUSR1);
- ASSERT(r == 0);
- r = kill(getpid(), SIGUSR2);
- ASSERT(r == 0);
-
- /* Wait for all signal handling threads to exit. */
- for (i = 0; i < NUM_SIGNAL_HANDLING_THREADS; i++) {
- r = uv_thread_join(&signal_handling_threads[i]);
- ASSERT(r == 0);
- }
-
- /* Tell all loop creating threads to stop. */
- stop = 1;
-
- /* Wait for all loop creating threads to exit. */
- for (i = 0; i < NUM_LOOP_CREATING_THREADS; i++) {
- r = uv_thread_join(&loop_creating_threads[i]);
- ASSERT(r == 0);
- }
-
- printf("signal1_cb calls: %d\n", signal1_cb_counter);
- printf("signal2_cb calls: %d\n", signal2_cb_counter);
- printf("loops created and destroyed: %d\n", loop_creation_counter);
-
- /* The division by three reflects the fact that we spawn three different
- * thread groups of (NUM_SIGNAL_HANDLING_THREADS / 3) threads each.
- */
- ASSERT(signal1_cb_counter == 8 * (NUM_SIGNAL_HANDLING_THREADS / 3));
- ASSERT(signal2_cb_counter == 4 * (NUM_SIGNAL_HANDLING_THREADS / 3));
-
- /* We don't know exactly how much loops will be created and destroyed, but at
- * least there should be 1 for every loop creating thread.
- */
- ASSERT(loop_creation_counter >= NUM_LOOP_CREATING_THREADS);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-#endif /* !_WIN32 */
diff --git a/3rdparty/libuv/test/test-signal.c b/3rdparty/libuv/test/test-signal.c
deleted file mode 100644
index fcdd8e4d2dd..00000000000
--- a/3rdparty/libuv/test/test-signal.c
+++ /dev/null
@@ -1,152 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-
-/* This test does not pretend to be cross-platform. */
-#ifndef _WIN32
-
-#include "uv.h"
-#include "task.h"
-
-#include <errno.h>
-#include <signal.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#define NSIGNALS 10
-
-struct timer_ctx {
- unsigned int ncalls;
- uv_timer_t handle;
- int signum;
-};
-
-struct signal_ctx {
- enum { CLOSE, STOP } stop_or_close;
- unsigned int ncalls;
- uv_signal_t handle;
- int signum;
-};
-
-
-static void signal_cb(uv_signal_t* handle, int signum) {
- struct signal_ctx* ctx = container_of(handle, struct signal_ctx, handle);
- ASSERT(signum == ctx->signum);
-
- if (++ctx->ncalls == NSIGNALS) {
- if (ctx->stop_or_close == STOP)
- uv_signal_stop(handle);
- else if (ctx->stop_or_close == CLOSE)
- uv_close((uv_handle_t*)handle, NULL);
- else
- ASSERT(0);
- }
-}
-
-
-static void timer_cb(uv_timer_t* handle) {
- struct timer_ctx* ctx = container_of(handle, struct timer_ctx, handle);
-
- raise(ctx->signum);
-
- if (++ctx->ncalls == NSIGNALS)
- uv_close((uv_handle_t*)handle, NULL);
-}
-
-
-static void start_watcher(uv_loop_t* loop, int signum, struct signal_ctx* ctx) {
- ctx->ncalls = 0;
- ctx->signum = signum;
- ctx->stop_or_close = CLOSE;
- ASSERT(0 == uv_signal_init(loop, &ctx->handle));
- ASSERT(0 == uv_signal_start(&ctx->handle, signal_cb, signum));
-}
-
-
-static void start_timer(uv_loop_t* loop, int signum, struct timer_ctx* ctx) {
- ctx->ncalls = 0;
- ctx->signum = signum;
- ASSERT(0 == uv_timer_init(loop, &ctx->handle));
- ASSERT(0 == uv_timer_start(&ctx->handle, timer_cb, 5, 5));
-}
-
-
-TEST_IMPL(we_get_signal) {
- struct signal_ctx sc;
- struct timer_ctx tc;
- uv_loop_t* loop;
-
- loop = uv_default_loop();
- start_timer(loop, SIGCHLD, &tc);
- start_watcher(loop, SIGCHLD, &sc);
- sc.stop_or_close = STOP; /* stop, don't close the signal handle */
- ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
- ASSERT(tc.ncalls == NSIGNALS);
- ASSERT(sc.ncalls == NSIGNALS);
-
- start_timer(loop, SIGCHLD, &tc);
- ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
- ASSERT(tc.ncalls == NSIGNALS);
- ASSERT(sc.ncalls == NSIGNALS);
-
- sc.ncalls = 0;
- sc.stop_or_close = CLOSE; /* now close it when it's done */
- uv_signal_start(&sc.handle, signal_cb, SIGCHLD);
-
- start_timer(loop, SIGCHLD, &tc);
- ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
- ASSERT(tc.ncalls == NSIGNALS);
- ASSERT(sc.ncalls == NSIGNALS);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(we_get_signals) {
- struct signal_ctx sc[4];
- struct timer_ctx tc[2];
- uv_loop_t* loop;
- unsigned int i;
-
- loop = uv_default_loop();
- start_watcher(loop, SIGUSR1, sc + 0);
- start_watcher(loop, SIGUSR1, sc + 1);
- start_watcher(loop, SIGUSR2, sc + 2);
- start_watcher(loop, SIGUSR2, sc + 3);
- start_timer(loop, SIGUSR1, tc + 0);
- start_timer(loop, SIGUSR2, tc + 1);
- ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
-
- for (i = 0; i < ARRAY_SIZE(sc); i++)
- ASSERT(sc[i].ncalls == NSIGNALS);
-
- for (i = 0; i < ARRAY_SIZE(tc); i++)
- ASSERT(tc[i].ncalls == NSIGNALS);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-#endif /* _WIN32 */
diff --git a/3rdparty/libuv/test/test-socket-buffer-size.c b/3rdparty/libuv/test/test-socket-buffer-size.c
deleted file mode 100644
index 72f8c2524c0..00000000000
--- a/3rdparty/libuv/test/test-socket-buffer-size.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-static uv_udp_t udp;
-static uv_tcp_t tcp;
-static int close_cb_called;
-
-
-static void close_cb(uv_handle_t* handle) {
- close_cb_called++;
-}
-
-
-static void check_buffer_size(uv_handle_t* handle) {
- int value;
-
- value = 0;
- ASSERT(0 == uv_recv_buffer_size(handle, &value));
- ASSERT(value > 0);
-
- value = 10000;
- ASSERT(0 == uv_recv_buffer_size(handle, &value));
-
- value = 0;
- ASSERT(0 == uv_recv_buffer_size(handle, &value));
- /* linux sets double the value */
- ASSERT(value == 10000 || value == 20000);
-}
-
-
-TEST_IMPL(socket_buffer_size) {
- struct sockaddr_in addr;
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
-
- ASSERT(0 == uv_tcp_init(uv_default_loop(), &tcp));
- ASSERT(0 == uv_tcp_bind(&tcp, (struct sockaddr*) &addr, 0));
- check_buffer_size((uv_handle_t*) &tcp);
- uv_close((uv_handle_t*) &tcp, close_cb);
-
- ASSERT(0 == uv_udp_init(uv_default_loop(), &udp));
- ASSERT(0 == uv_udp_bind(&udp, (struct sockaddr*) &addr, 0));
- check_buffer_size((uv_handle_t*) &udp);
- uv_close((uv_handle_t*) &udp, close_cb);
-
- ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
-
- ASSERT(close_cb_called == 2);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-spawn.c b/3rdparty/libuv/test/test-spawn.c
deleted file mode 100644
index eba54ae7054..00000000000
--- a/3rdparty/libuv/test/test-spawn.c
+++ /dev/null
@@ -1,1706 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-#include <errno.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#ifdef _WIN32
-# if defined(__MINGW32__)
-# include <basetyps.h>
-# endif
-# include <shellapi.h>
-# include <wchar.h>
-#else
-# include <unistd.h>
-# include <sys/wait.h>
-#endif
-
-
-static int close_cb_called;
-static int exit_cb_called;
-static uv_process_t process;
-static uv_timer_t timer;
-static uv_process_options_t options;
-static char exepath[1024];
-static size_t exepath_size = 1024;
-static char* args[3];
-static int no_term_signal;
-static int timer_counter;
-
-#define OUTPUT_SIZE 1024
-static char output[OUTPUT_SIZE];
-static int output_used;
-
-
-static void close_cb(uv_handle_t* handle) {
- printf("close_cb\n");
- close_cb_called++;
-}
-
-static void exit_cb(uv_process_t* process,
- int64_t exit_status,
- int term_signal) {
- printf("exit_cb\n");
- exit_cb_called++;
- ASSERT(exit_status == 1);
- ASSERT(term_signal == 0);
- uv_close((uv_handle_t*)process, close_cb);
-}
-
-
-static void fail_cb(uv_process_t* process,
- int64_t exit_status,
- int term_signal) {
- ASSERT(0 && "fail_cb called");
-}
-
-
-static void kill_cb(uv_process_t* process,
- int64_t exit_status,
- int term_signal) {
- int err;
-
- printf("exit_cb\n");
- exit_cb_called++;
-#ifdef _WIN32
- ASSERT(exit_status == 1);
-#else
- ASSERT(exit_status == 0);
-#endif
- ASSERT(no_term_signal || term_signal == 15);
- uv_close((uv_handle_t*)process, close_cb);
-
- /*
- * Sending signum == 0 should check if the
- * child process is still alive, not kill it.
- * This process should be dead.
- */
- err = uv_kill(process->pid, 0);
- ASSERT(err == UV_ESRCH);
-}
-
-static void detach_failure_cb(uv_process_t* process,
- int64_t exit_status,
- int term_signal) {
- printf("detach_cb\n");
- exit_cb_called++;
-}
-
-static void on_alloc(uv_handle_t* handle,
- size_t suggested_size,
- uv_buf_t* buf) {
- buf->base = output + output_used;
- buf->len = OUTPUT_SIZE - output_used;
-}
-
-
-static void on_read(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* buf) {
- if (nread > 0) {
- output_used += nread;
- } else if (nread < 0) {
- ASSERT(nread == UV_EOF);
- uv_close((uv_handle_t*)tcp, close_cb);
- }
-}
-
-
-static void on_read_once(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* buf) {
- uv_read_stop(tcp);
- on_read(tcp, nread, buf);
-}
-
-
-static void write_cb(uv_write_t* req, int status) {
- ASSERT(status == 0);
- uv_close((uv_handle_t*)req->handle, close_cb);
-}
-
-
-static void init_process_options(char* test, uv_exit_cb exit_cb) {
- /* Note spawn_helper1 defined in test/run-tests.c */
- int r = uv_exepath(exepath, &exepath_size);
- ASSERT(r == 0);
- exepath[exepath_size] = '\0';
- args[0] = exepath;
- args[1] = test;
- args[2] = NULL;
- options.file = exepath;
- options.args = args;
- options.exit_cb = exit_cb;
- options.flags = 0;
-}
-
-
-static void timer_cb(uv_timer_t* handle) {
- uv_process_kill(&process, /* SIGTERM */ 15);
- uv_close((uv_handle_t*)handle, close_cb);
-}
-
-
-static void timer_counter_cb(uv_timer_t* handle) {
- ++timer_counter;
-}
-
-
-TEST_IMPL(spawn_fails) {
- int r;
-
- init_process_options("", fail_cb);
- options.file = options.args[0] = "program-that-had-better-not-exist";
-
- r = uv_spawn(uv_default_loop(), &process, &options);
- ASSERT(r == UV_ENOENT || r == UV_EACCES);
- ASSERT(0 == uv_is_active((uv_handle_t*) &process));
- uv_close((uv_handle_t*) &process, NULL);
- ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-#ifndef _WIN32
-TEST_IMPL(spawn_fails_check_for_waitpid_cleanup) {
- int r;
- int status;
- int err;
-
- init_process_options("", fail_cb);
- options.file = options.args[0] = "program-that-had-better-not-exist";
-
- r = uv_spawn(uv_default_loop(), &process, &options);
- ASSERT(r == UV_ENOENT || r == UV_EACCES);
- ASSERT(0 == uv_is_active((uv_handle_t*) &process));
- ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
-
- /* verify the child is successfully cleaned up within libuv */
- do
- err = waitpid(process.pid, &status, 0);
- while (err == -1 && errno == EINTR);
-
- ASSERT(err == -1);
- ASSERT(errno == ECHILD);
-
- uv_close((uv_handle_t*) &process, NULL);
- ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-#endif
-
-
-TEST_IMPL(spawn_exit_code) {
- int r;
-
- init_process_options("spawn_helper1", exit_cb);
-
- r = uv_spawn(uv_default_loop(), &process, &options);
- ASSERT(r == 0);
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(exit_cb_called == 1);
- ASSERT(close_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(spawn_stdout) {
- int r;
- uv_pipe_t out;
- uv_stdio_container_t stdio[2];
-
- init_process_options("spawn_helper2", exit_cb);
-
- uv_pipe_init(uv_default_loop(), &out, 0);
- options.stdio = stdio;
- options.stdio[0].flags = UV_IGNORE;
- options.stdio[1].flags = UV_CREATE_PIPE | UV_WRITABLE_PIPE;
- options.stdio[1].data.stream = (uv_stream_t*)&out;
- options.stdio_count = 2;
-
- r = uv_spawn(uv_default_loop(), &process, &options);
- ASSERT(r == 0);
-
- r = uv_read_start((uv_stream_t*) &out, on_alloc, on_read);
- ASSERT(r == 0);
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(exit_cb_called == 1);
- ASSERT(close_cb_called == 2); /* Once for process once for the pipe. */
- printf("output is: %s", output);
- ASSERT(strcmp("hello world\n", output) == 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(spawn_stdout_to_file) {
- int r;
- uv_file file;
- uv_fs_t fs_req;
- uv_stdio_container_t stdio[2];
- uv_buf_t buf;
-
- /* Setup. */
- unlink("stdout_file");
-
- init_process_options("spawn_helper2", exit_cb);
-
- r = uv_fs_open(NULL, &fs_req, "stdout_file", O_CREAT | O_RDWR,
- S_IRUSR | S_IWUSR, NULL);
- ASSERT(r != -1);
- uv_fs_req_cleanup(&fs_req);
-
- file = r;
-
- options.stdio = stdio;
- options.stdio[0].flags = UV_IGNORE;
- options.stdio[1].flags = UV_INHERIT_FD;
- options.stdio[1].data.fd = file;
- options.stdio_count = 2;
-
- r = uv_spawn(uv_default_loop(), &process, &options);
- ASSERT(r == 0);
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(exit_cb_called == 1);
- ASSERT(close_cb_called == 1);
-
- buf = uv_buf_init(output, sizeof(output));
- r = uv_fs_read(NULL, &fs_req, file, &buf, 1, 0, NULL);
- ASSERT(r == 12);
- uv_fs_req_cleanup(&fs_req);
-
- r = uv_fs_close(NULL, &fs_req, file, NULL);
- ASSERT(r == 0);
- uv_fs_req_cleanup(&fs_req);
-
- printf("output is: %s", output);
- ASSERT(strcmp("hello world\n", output) == 0);
-
- /* Cleanup. */
- unlink("stdout_file");
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(spawn_stdout_and_stderr_to_file) {
- int r;
- uv_file file;
- uv_fs_t fs_req;
- uv_stdio_container_t stdio[3];
- uv_buf_t buf;
-
- /* Setup. */
- unlink("stdout_file");
-
- init_process_options("spawn_helper6", exit_cb);
-
- r = uv_fs_open(NULL, &fs_req, "stdout_file", O_CREAT | O_RDWR,
- S_IRUSR | S_IWUSR, NULL);
- ASSERT(r != -1);
- uv_fs_req_cleanup(&fs_req);
-
- file = r;
-
- options.stdio = stdio;
- options.stdio[0].flags = UV_IGNORE;
- options.stdio[1].flags = UV_INHERIT_FD;
- options.stdio[1].data.fd = file;
- options.stdio[2].flags = UV_INHERIT_FD;
- options.stdio[2].data.fd = file;
- options.stdio_count = 3;
-
- r = uv_spawn(uv_default_loop(), &process, &options);
- ASSERT(r == 0);
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(exit_cb_called == 1);
- ASSERT(close_cb_called == 1);
-
- buf = uv_buf_init(output, sizeof(output));
- r = uv_fs_read(NULL, &fs_req, file, &buf, 1, 0, NULL);
- ASSERT(r == 27);
- uv_fs_req_cleanup(&fs_req);
-
- r = uv_fs_close(NULL, &fs_req, file, NULL);
- ASSERT(r == 0);
- uv_fs_req_cleanup(&fs_req);
-
- printf("output is: %s", output);
- ASSERT(strcmp("hello world\nhello errworld\n", output) == 0);
-
- /* Cleanup. */
- unlink("stdout_file");
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(spawn_stdout_and_stderr_to_file2) {
-#ifndef _WIN32
- int r;
- uv_file file;
- uv_fs_t fs_req;
- uv_stdio_container_t stdio[3];
- uv_buf_t buf;
-
- /* Setup. */
- unlink("stdout_file");
-
- init_process_options("spawn_helper6", exit_cb);
-
- /* Replace stderr with our file */
- r = uv_fs_open(NULL,
- &fs_req,
- "stdout_file",
- O_CREAT | O_RDWR,
- S_IRUSR | S_IWUSR,
- NULL);
- ASSERT(r != -1);
- uv_fs_req_cleanup(&fs_req);
- file = dup2(r, STDERR_FILENO);
- ASSERT(file != -1);
-
- options.stdio = stdio;
- options.stdio[0].flags = UV_IGNORE;
- options.stdio[1].flags = UV_INHERIT_FD;
- options.stdio[1].data.fd = file;
- options.stdio[2].flags = UV_INHERIT_FD;
- options.stdio[2].data.fd = file;
- options.stdio_count = 3;
-
- r = uv_spawn(uv_default_loop(), &process, &options);
- ASSERT(r == 0);
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(exit_cb_called == 1);
- ASSERT(close_cb_called == 1);
-
- buf = uv_buf_init(output, sizeof(output));
- r = uv_fs_read(NULL, &fs_req, file, &buf, 1, 0, NULL);
- ASSERT(r == 27);
- uv_fs_req_cleanup(&fs_req);
-
- r = uv_fs_close(NULL, &fs_req, file, NULL);
- ASSERT(r == 0);
- uv_fs_req_cleanup(&fs_req);
-
- printf("output is: %s", output);
- ASSERT(strcmp("hello world\nhello errworld\n", output) == 0);
-
- /* Cleanup. */
- unlink("stdout_file");
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-#else
- RETURN_SKIP("Unix only test");
-#endif
-}
-
-
-TEST_IMPL(spawn_stdout_and_stderr_to_file_swap) {
-#ifndef _WIN32
- int r;
- uv_file stdout_file;
- uv_file stderr_file;
- uv_fs_t fs_req;
- uv_stdio_container_t stdio[3];
- uv_buf_t buf;
-
- /* Setup. */
- unlink("stdout_file");
- unlink("stderr_file");
-
- init_process_options("spawn_helper6", exit_cb);
-
- /* open 'stdout_file' and replace STDOUT_FILENO with it */
- r = uv_fs_open(NULL,
- &fs_req,
- "stdout_file",
- O_CREAT | O_RDWR,
- S_IRUSR | S_IWUSR,
- NULL);
- ASSERT(r != -1);
- uv_fs_req_cleanup(&fs_req);
- stdout_file = dup2(r, STDOUT_FILENO);
- ASSERT(stdout_file != -1);
-
- /* open 'stderr_file' and replace STDERR_FILENO with it */
- r = uv_fs_open(NULL, &fs_req, "stderr_file", O_CREAT | O_RDWR,
- S_IRUSR | S_IWUSR, NULL);
- ASSERT(r != -1);
- uv_fs_req_cleanup(&fs_req);
- stderr_file = dup2(r, STDERR_FILENO);
- ASSERT(stderr_file != -1);
-
- /* now we're going to swap them: the child process' stdout will be our
- * stderr_file and vice versa */
- options.stdio = stdio;
- options.stdio[0].flags = UV_IGNORE;
- options.stdio[1].flags = UV_INHERIT_FD;
- options.stdio[1].data.fd = stderr_file;
- options.stdio[2].flags = UV_INHERIT_FD;
- options.stdio[2].data.fd = stdout_file;
- options.stdio_count = 3;
-
- r = uv_spawn(uv_default_loop(), &process, &options);
- ASSERT(r == 0);
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(exit_cb_called == 1);
- ASSERT(close_cb_called == 1);
-
- buf = uv_buf_init(output, sizeof(output));
-
- /* check the content of stdout_file */
- r = uv_fs_read(NULL, &fs_req, stdout_file, &buf, 1, 0, NULL);
- ASSERT(r >= 15);
- uv_fs_req_cleanup(&fs_req);
-
- r = uv_fs_close(NULL, &fs_req, stdout_file, NULL);
- ASSERT(r == 0);
- uv_fs_req_cleanup(&fs_req);
-
- printf("output is: %s", output);
- ASSERT(strncmp("hello errworld\n", output, 15) == 0);
-
- /* check the content of stderr_file */
- r = uv_fs_read(NULL, &fs_req, stderr_file, &buf, 1, 0, NULL);
- ASSERT(r >= 12);
- uv_fs_req_cleanup(&fs_req);
-
- r = uv_fs_close(NULL, &fs_req, stderr_file, NULL);
- ASSERT(r == 0);
- uv_fs_req_cleanup(&fs_req);
-
- printf("output is: %s", output);
- ASSERT(strncmp("hello world\n", output, 12) == 0);
-
- /* Cleanup. */
- unlink("stdout_file");
- unlink("stderr_file");
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-#else
- RETURN_SKIP("Unix only test");
-#endif
-}
-
-
-TEST_IMPL(spawn_stdin) {
- int r;
- uv_pipe_t out;
- uv_pipe_t in;
- uv_write_t write_req;
- uv_buf_t buf;
- uv_stdio_container_t stdio[2];
- char buffer[] = "hello-from-spawn_stdin";
-
- init_process_options("spawn_helper3", exit_cb);
-
- uv_pipe_init(uv_default_loop(), &out, 0);
- uv_pipe_init(uv_default_loop(), &in, 0);
- options.stdio = stdio;
- options.stdio[0].flags = UV_CREATE_PIPE | UV_READABLE_PIPE;
- options.stdio[0].data.stream = (uv_stream_t*)&in;
- options.stdio[1].flags = UV_CREATE_PIPE | UV_WRITABLE_PIPE;
- options.stdio[1].data.stream = (uv_stream_t*)&out;
- options.stdio_count = 2;
-
- r = uv_spawn(uv_default_loop(), &process, &options);
- ASSERT(r == 0);
-
- buf.base = buffer;
- buf.len = sizeof(buffer);
- r = uv_write(&write_req, (uv_stream_t*)&in, &buf, 1, write_cb);
- ASSERT(r == 0);
-
- r = uv_read_start((uv_stream_t*) &out, on_alloc, on_read);
- ASSERT(r == 0);
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(exit_cb_called == 1);
- ASSERT(close_cb_called == 3); /* Once for process twice for the pipe. */
- ASSERT(strcmp(buffer, output) == 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(spawn_stdio_greater_than_3) {
- int r;
- uv_pipe_t pipe;
- uv_stdio_container_t stdio[4];
-
- init_process_options("spawn_helper5", exit_cb);
-
- uv_pipe_init(uv_default_loop(), &pipe, 0);
- options.stdio = stdio;
- options.stdio[0].flags = UV_IGNORE;
- options.stdio[1].flags = UV_IGNORE;
- options.stdio[2].flags = UV_IGNORE;
- options.stdio[3].flags = UV_CREATE_PIPE | UV_WRITABLE_PIPE;
- options.stdio[3].data.stream = (uv_stream_t*)&pipe;
- options.stdio_count = 4;
-
- r = uv_spawn(uv_default_loop(), &process, &options);
- ASSERT(r == 0);
-
- r = uv_read_start((uv_stream_t*) &pipe, on_alloc, on_read);
- ASSERT(r == 0);
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(exit_cb_called == 1);
- ASSERT(close_cb_called == 2); /* Once for process once for the pipe. */
- printf("output from stdio[3] is: %s", output);
- ASSERT(strcmp("fourth stdio!\n", output) == 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(spawn_ignored_stdio) {
- int r;
-
- init_process_options("spawn_helper6", exit_cb);
-
- options.stdio = NULL;
- options.stdio_count = 0;
-
- r = uv_spawn(uv_default_loop(), &process, &options);
- ASSERT(r == 0);
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(exit_cb_called == 1);
- ASSERT(close_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(spawn_and_kill) {
- int r;
-
- init_process_options("spawn_helper4", kill_cb);
-
- r = uv_spawn(uv_default_loop(), &process, &options);
- ASSERT(r == 0);
-
- r = uv_timer_init(uv_default_loop(), &timer);
- ASSERT(r == 0);
-
- r = uv_timer_start(&timer, timer_cb, 500, 0);
- ASSERT(r == 0);
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(exit_cb_called == 1);
- ASSERT(close_cb_called == 2); /* Once for process and once for timer. */
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(spawn_preserve_env) {
- int r;
- uv_pipe_t out;
- uv_stdio_container_t stdio[2];
-
- init_process_options("spawn_helper7", exit_cb);
-
- uv_pipe_init(uv_default_loop(), &out, 0);
- options.stdio = stdio;
- options.stdio[0].flags = UV_IGNORE;
- options.stdio[1].flags = UV_CREATE_PIPE | UV_WRITABLE_PIPE;
- options.stdio[1].data.stream = (uv_stream_t*) &out;
- options.stdio_count = 2;
-
- r = putenv("ENV_TEST=testval");
- ASSERT(r == 0);
-
- /* Explicitly set options.env to NULL to test for env clobbering. */
- options.env = NULL;
-
- r = uv_spawn(uv_default_loop(), &process, &options);
- ASSERT(r == 0);
-
- r = uv_read_start((uv_stream_t*) &out, on_alloc, on_read);
- ASSERT(r == 0);
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(exit_cb_called == 1);
- ASSERT(close_cb_called == 2);
-
- printf("output is: %s", output);
- ASSERT(strcmp("testval", output) == 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(spawn_detached) {
- int r;
-
- init_process_options("spawn_helper4", detach_failure_cb);
-
- options.flags |= UV_PROCESS_DETACHED;
-
- r = uv_spawn(uv_default_loop(), &process, &options);
- ASSERT(r == 0);
-
- uv_unref((uv_handle_t*)&process);
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(exit_cb_called == 0);
-
- r = uv_kill(process.pid, 0);
- ASSERT(r == 0);
-
- r = uv_kill(process.pid, 15);
- ASSERT(r == 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-TEST_IMPL(spawn_and_kill_with_std) {
- int r;
- uv_pipe_t in, out, err;
- uv_write_t write;
- char message[] = "Nancy's joining me because the message this evening is "
- "not my message but ours.";
- uv_buf_t buf;
- uv_stdio_container_t stdio[3];
-
- init_process_options("spawn_helper4", kill_cb);
-
- r = uv_pipe_init(uv_default_loop(), &in, 0);
- ASSERT(r == 0);
-
- r = uv_pipe_init(uv_default_loop(), &out, 0);
- ASSERT(r == 0);
-
- r = uv_pipe_init(uv_default_loop(), &err, 0);
- ASSERT(r == 0);
-
- options.stdio = stdio;
- options.stdio[0].flags = UV_CREATE_PIPE | UV_READABLE_PIPE;
- options.stdio[0].data.stream = (uv_stream_t*)&in;
- options.stdio[1].flags = UV_CREATE_PIPE | UV_WRITABLE_PIPE;
- options.stdio[1].data.stream = (uv_stream_t*)&out;
- options.stdio[2].flags = UV_CREATE_PIPE | UV_WRITABLE_PIPE;
- options.stdio[2].data.stream = (uv_stream_t*)&err;
- options.stdio_count = 3;
-
- r = uv_spawn(uv_default_loop(), &process, &options);
- ASSERT(r == 0);
-
- buf = uv_buf_init(message, sizeof message);
- r = uv_write(&write, (uv_stream_t*) &in, &buf, 1, write_cb);
- ASSERT(r == 0);
-
- r = uv_read_start((uv_stream_t*) &out, on_alloc, on_read);
- ASSERT(r == 0);
-
- r = uv_read_start((uv_stream_t*) &err, on_alloc, on_read);
- ASSERT(r == 0);
-
- r = uv_timer_init(uv_default_loop(), &timer);
- ASSERT(r == 0);
-
- r = uv_timer_start(&timer, timer_cb, 500, 0);
- ASSERT(r == 0);
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(exit_cb_called == 1);
- ASSERT(close_cb_called == 5); /* process x 1, timer x 1, stdio x 3. */
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(spawn_and_ping) {
- uv_write_t write_req;
- uv_pipe_t in, out;
- uv_buf_t buf;
- uv_stdio_container_t stdio[2];
- int r;
-
- init_process_options("spawn_helper3", exit_cb);
- buf = uv_buf_init("TEST", 4);
-
- uv_pipe_init(uv_default_loop(), &out, 0);
- uv_pipe_init(uv_default_loop(), &in, 0);
- options.stdio = stdio;
- options.stdio[0].flags = UV_CREATE_PIPE | UV_READABLE_PIPE;
- options.stdio[0].data.stream = (uv_stream_t*)&in;
- options.stdio[1].flags = UV_CREATE_PIPE | UV_WRITABLE_PIPE;
- options.stdio[1].data.stream = (uv_stream_t*)&out;
- options.stdio_count = 2;
-
- r = uv_spawn(uv_default_loop(), &process, &options);
- ASSERT(r == 0);
-
- /* Sending signum == 0 should check if the
- * child process is still alive, not kill it.
- */
- r = uv_process_kill(&process, 0);
- ASSERT(r == 0);
-
- r = uv_write(&write_req, (uv_stream_t*)&in, &buf, 1, write_cb);
- ASSERT(r == 0);
-
- r = uv_read_start((uv_stream_t*)&out, on_alloc, on_read);
- ASSERT(r == 0);
-
- ASSERT(exit_cb_called == 0);
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(exit_cb_called == 1);
- ASSERT(strcmp(output, "TEST") == 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(spawn_same_stdout_stderr) {
- uv_write_t write_req;
- uv_pipe_t in, out;
- uv_buf_t buf;
- uv_stdio_container_t stdio[3];
- int r;
-
- init_process_options("spawn_helper3", exit_cb);
- buf = uv_buf_init("TEST", 4);
-
- uv_pipe_init(uv_default_loop(), &out, 0);
- uv_pipe_init(uv_default_loop(), &in, 0);
- options.stdio = stdio;
- options.stdio[0].flags = UV_CREATE_PIPE | UV_READABLE_PIPE;
- options.stdio[0].data.stream = (uv_stream_t*)&in;
- options.stdio[1].flags = UV_CREATE_PIPE | UV_WRITABLE_PIPE;
- options.stdio[1].data.stream = (uv_stream_t*)&out;
- options.stdio_count = 2;
-
- r = uv_spawn(uv_default_loop(), &process, &options);
- ASSERT(r == 0);
-
- /* Sending signum == 0 should check if the
- * child process is still alive, not kill it.
- */
- r = uv_process_kill(&process, 0);
- ASSERT(r == 0);
-
- r = uv_write(&write_req, (uv_stream_t*)&in, &buf, 1, write_cb);
- ASSERT(r == 0);
-
- r = uv_read_start((uv_stream_t*)&out, on_alloc, on_read);
- ASSERT(r == 0);
-
- ASSERT(exit_cb_called == 0);
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(exit_cb_called == 1);
- ASSERT(strcmp(output, "TEST") == 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(spawn_closed_process_io) {
- uv_pipe_t in;
- uv_write_t write_req;
- uv_buf_t buf;
- uv_stdio_container_t stdio[2];
- static char buffer[] = "hello-from-spawn_stdin\n";
-
- init_process_options("spawn_helper3", exit_cb);
-
- uv_pipe_init(uv_default_loop(), &in, 0);
- options.stdio = stdio;
- options.stdio[0].flags = UV_CREATE_PIPE | UV_READABLE_PIPE;
- options.stdio[0].data.stream = (uv_stream_t*) &in;
- options.stdio_count = 1;
-
- close(0); /* Close process stdin. */
-
- ASSERT(0 == uv_spawn(uv_default_loop(), &process, &options));
-
- buf = uv_buf_init(buffer, sizeof(buffer));
- ASSERT(0 == uv_write(&write_req, (uv_stream_t*) &in, &buf, 1, write_cb));
-
- ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
-
- ASSERT(exit_cb_called == 1);
- ASSERT(close_cb_called == 2); /* process, child stdin */
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(kill) {
- int r;
-
-#ifdef _WIN32
- no_term_signal = 1;
-#endif
-
- init_process_options("spawn_helper4", kill_cb);
-
- r = uv_spawn(uv_default_loop(), &process, &options);
- ASSERT(r == 0);
-
- /* Sending signum == 0 should check if the
- * child process is still alive, not kill it.
- */
- r = uv_kill(process.pid, 0);
- ASSERT(r == 0);
-
- /* Kill the process. */
- r = uv_kill(process.pid, /* SIGTERM */ 15);
- ASSERT(r == 0);
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(exit_cb_called == 1);
- ASSERT(close_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-#ifdef _WIN32
-TEST_IMPL(spawn_detect_pipe_name_collisions_on_windows) {
- int r;
- uv_pipe_t out;
- char name[64];
- HANDLE pipe_handle;
- uv_stdio_container_t stdio[2];
-
- init_process_options("spawn_helper2", exit_cb);
-
- uv_pipe_init(uv_default_loop(), &out, 0);
- options.stdio = stdio;
- options.stdio[0].flags = UV_IGNORE;
- options.stdio[1].flags = UV_CREATE_PIPE | UV_WRITABLE_PIPE;
- options.stdio[1].data.stream = (uv_stream_t*)&out;
- options.stdio_count = 2;
-
- /* Create a pipe that'll cause a collision. */
- snprintf(name,
- sizeof(name),
- "\\\\.\\pipe\\uv\\%p-%d",
- &out,
- GetCurrentProcessId());
- pipe_handle = CreateNamedPipeA(name,
- PIPE_ACCESS_INBOUND | FILE_FLAG_OVERLAPPED,
- PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT,
- 10,
- 65536,
- 65536,
- 0,
- NULL);
- ASSERT(pipe_handle != INVALID_HANDLE_VALUE);
-
- r = uv_spawn(uv_default_loop(), &process, &options);
- ASSERT(r == 0);
-
- r = uv_read_start((uv_stream_t*) &out, on_alloc, on_read);
- ASSERT(r == 0);
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(exit_cb_called == 1);
- ASSERT(close_cb_called == 2); /* Once for process once for the pipe. */
- printf("output is: %s", output);
- ASSERT(strcmp("hello world\n", output) == 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-#if !defined(USING_UV_SHARED)
-int make_program_args(char** args, int verbatim_arguments, WCHAR** dst_ptr);
-WCHAR* quote_cmd_arg(const WCHAR *source, WCHAR *target);
-
-TEST_IMPL(argument_escaping) {
- const WCHAR* test_str[] = {
- L"",
- L"HelloWorld",
- L"Hello World",
- L"Hello\"World",
- L"Hello World\\",
- L"Hello\\\"World",
- L"Hello\\World",
- L"Hello\\\\World",
- L"Hello World\\",
- L"c:\\path\\to\\node.exe --eval \"require('c:\\\\path\\\\to\\\\test.js')\""
- };
- const int count = sizeof(test_str) / sizeof(*test_str);
- WCHAR** test_output;
- WCHAR* command_line;
- WCHAR** cracked;
- size_t total_size = 0;
- int i;
- int num_args;
- int result;
-
- char* verbatim[] = {
- "cmd.exe",
- "/c",
- "c:\\path\\to\\node.exe --eval \"require('c:\\\\path\\\\to\\\\test.js')\"",
- NULL
- };
- WCHAR* verbatim_output;
- WCHAR* non_verbatim_output;
-
- test_output = calloc(count, sizeof(WCHAR*));
- ASSERT(test_output != NULL);
- for (i = 0; i < count; ++i) {
- test_output[i] = calloc(2 * (wcslen(test_str[i]) + 2), sizeof(WCHAR));
- quote_cmd_arg(test_str[i], test_output[i]);
- wprintf(L"input : %s\n", test_str[i]);
- wprintf(L"output: %s\n", test_output[i]);
- total_size += wcslen(test_output[i]) + 1;
- }
- command_line = calloc(total_size + 1, sizeof(WCHAR));
- ASSERT(command_line != NULL);
- for (i = 0; i < count; ++i) {
- wcscat(command_line, test_output[i]);
- wcscat(command_line, L" ");
- }
- command_line[total_size - 1] = L'\0';
-
- wprintf(L"command_line: %s\n", command_line);
-
- cracked = CommandLineToArgvW(command_line, &num_args);
- for (i = 0; i < num_args; ++i) {
- wprintf(L"%d: %s\t%s\n", i, test_str[i], cracked[i]);
- ASSERT(wcscmp(test_str[i], cracked[i]) == 0);
- }
-
- LocalFree(cracked);
- for (i = 0; i < count; ++i) {
- free(test_output[i]);
- }
-
- result = make_program_args(verbatim, 1, &verbatim_output);
- ASSERT(result == 0);
- result = make_program_args(verbatim, 0, &non_verbatim_output);
- ASSERT(result == 0);
-
- wprintf(L" verbatim_output: %s\n", verbatim_output);
- wprintf(L"non_verbatim_output: %s\n", non_verbatim_output);
-
- ASSERT(wcscmp(verbatim_output,
- L"cmd.exe /c c:\\path\\to\\node.exe --eval "
- L"\"require('c:\\\\path\\\\to\\\\test.js')\"") == 0);
- ASSERT(wcscmp(non_verbatim_output,
- L"cmd.exe /c \"c:\\path\\to\\node.exe --eval "
- L"\\\"require('c:\\\\path\\\\to\\\\test.js')\\\"\"") == 0);
-
- free(verbatim_output);
- free(non_verbatim_output);
-
- return 0;
-}
-
-int make_program_env(char** env_block, WCHAR** dst_ptr);
-
-TEST_IMPL(environment_creation) {
- int i;
- char* environment[] = {
- "FOO=BAR",
- "SYSTEM=ROOT", /* substring of a supplied var name */
- "SYSTEMROOTED=OMG", /* supplied var name is a substring */
- "TEMP=C:\\Temp",
- "INVALID",
- "BAZ=QUX",
- "B_Z=QUX",
- "B\xe2\x82\xacZ=QUX",
- "B\xf0\x90\x80\x82Z=QUX",
- "B\xef\xbd\xa1Z=QUX",
- "B\xf0\xa3\x91\x96Z=QUX",
- "BAZ", /* repeat, invalid variable */
- NULL
- };
- WCHAR* wenvironment[] = {
- L"BAZ=QUX",
- L"B_Z=QUX",
- L"B\x20acZ=QUX",
- L"B\xd800\xdc02Z=QUX",
- L"B\xd84d\xdc56Z=QUX",
- L"B\xff61Z=QUX",
- L"FOO=BAR",
- L"SYSTEM=ROOT", /* substring of a supplied var name */
- L"SYSTEMROOTED=OMG", /* supplied var name is a substring */
- L"TEMP=C:\\Temp",
- };
- WCHAR* from_env[] = {
- /* list should be kept in sync with list
- * in process.c, minus variables in wenvironment */
- L"HOMEDRIVE",
- L"HOMEPATH",
- L"LOGONSERVER",
- L"PATH",
- L"USERDOMAIN",
- L"USERNAME",
- L"USERPROFILE",
- L"SYSTEMDRIVE",
- L"SYSTEMROOT",
- L"WINDIR",
- /* test for behavior in the absence of a
- * required-environment variable: */
- L"ZTHIS_ENV_VARIABLE_DOES_NOT_EXIST",
- };
- int found_in_loc_env[ARRAY_SIZE(wenvironment)] = {0};
- int found_in_usr_env[ARRAY_SIZE(from_env)] = {0};
- WCHAR *expected[ARRAY_SIZE(from_env)];
- int result;
- WCHAR* str;
- WCHAR* prev;
- WCHAR* env;
-
- for (i = 0; i < ARRAY_SIZE(from_env); i++) {
- /* copy expected additions to environment locally */
- size_t len = GetEnvironmentVariableW(from_env[i], NULL, 0);
- if (len == 0) {
- found_in_usr_env[i] = 1;
- str = malloc(1 * sizeof(WCHAR));
- *str = 0;
- expected[i] = str;
- } else {
- size_t name_len = wcslen(from_env[i]);
- str = malloc((name_len+1+len) * sizeof(WCHAR));
- wmemcpy(str, from_env[i], name_len);
- expected[i] = str;
- str += name_len;
- *str++ = L'=';
- GetEnvironmentVariableW(from_env[i], str, len);
- }
- }
-
- result = make_program_env(environment, &env);
- ASSERT(result == 0);
-
- for (str = env, prev = NULL; *str; prev = str, str += wcslen(str) + 1) {
- int found = 0;
-#if 0
- _cputws(str);
- putchar('\n');
-#endif
- for (i = 0; i < ARRAY_SIZE(wenvironment) && !found; i++) {
- if (!wcscmp(str, wenvironment[i])) {
- ASSERT(!found_in_loc_env[i]);
- found_in_loc_env[i] = 1;
- found = 1;
- }
- }
- for (i = 0; i < ARRAY_SIZE(expected) && !found; i++) {
- if (!wcscmp(str, expected[i])) {
- ASSERT(!found_in_usr_env[i]);
- found_in_usr_env[i] = 1;
- found = 1;
- }
- }
- if (prev) { /* verify sort order -- requires Vista */
-#if _WIN32_WINNT >= 0x0600 && \
- (!defined(__MINGW32__) || defined(__MINGW64_VERSION_MAJOR))
- ASSERT(CompareStringOrdinal(prev, -1, str, -1, TRUE) == 1);
-#endif
- }
- ASSERT(found); /* verify that we expected this variable */
- }
-
- /* verify that we found all expected variables */
- for (i = 0; i < ARRAY_SIZE(wenvironment); i++) {
- ASSERT(found_in_loc_env[i]);
- }
- for (i = 0; i < ARRAY_SIZE(expected); i++) {
- ASSERT(found_in_usr_env[i]);
- }
-
- return 0;
-}
-#endif
-
-/* Regression test for issue #909 */
-TEST_IMPL(spawn_with_an_odd_path) {
- int r;
-
- char newpath[2048];
- char *path = getenv("PATH");
- ASSERT(path != NULL);
- snprintf(newpath, 2048, ";.;%s", path);
- SetEnvironmentVariable("PATH", newpath);
-
- init_process_options("", exit_cb);
- options.file = options.args[0] = "program-that-had-better-not-exist";
- r = uv_spawn(uv_default_loop(), &process, &options);
- ASSERT(r == UV_ENOENT || r == UV_EACCES);
- ASSERT(0 == uv_is_active((uv_handle_t*) &process));
- uv_close((uv_handle_t*) &process, NULL);
- ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-#endif
-
-#ifndef _WIN32
-TEST_IMPL(spawn_setuid_setgid) {
- int r;
- struct passwd* pw;
-
- /* if not root, then this will fail. */
- uv_uid_t uid = getuid();
- if (uid != 0) {
- fprintf(stderr, "spawn_setuid_setgid skipped: not root\n");
- return 0;
- }
-
- init_process_options("spawn_helper1", exit_cb);
-
- /* become the "nobody" user. */
- pw = getpwnam("nobody");
- ASSERT(pw != NULL);
- options.uid = pw->pw_uid;
- options.gid = pw->pw_gid;
- options.flags = UV_PROCESS_SETUID | UV_PROCESS_SETGID;
-
- r = uv_spawn(uv_default_loop(), &process, &options);
- if (r == UV_EACCES)
- RETURN_SKIP("user 'nobody' cannot access the test runner");
-
- ASSERT(r == 0);
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(exit_cb_called == 1);
- ASSERT(close_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-#endif
-
-
-#ifndef _WIN32
-TEST_IMPL(spawn_setuid_fails) {
- int r;
-
- /* if root, become nobody. */
- uv_uid_t uid = getuid();
- if (uid == 0) {
- struct passwd* pw;
- pw = getpwnam("nobody");
- ASSERT(pw != NULL);
- ASSERT(0 == setgid(pw->pw_gid));
- ASSERT(0 == setuid(pw->pw_uid));
- }
-
- init_process_options("spawn_helper1", fail_cb);
-
- options.flags |= UV_PROCESS_SETUID;
- options.uid = 0;
-
- r = uv_spawn(uv_default_loop(), &process, &options);
- ASSERT(r == UV_EPERM);
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(close_cb_called == 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(spawn_setgid_fails) {
- int r;
-
- /* if root, become nobody. */
- uv_uid_t uid = getuid();
- if (uid == 0) {
- struct passwd* pw;
- pw = getpwnam("nobody");
- ASSERT(pw != NULL);
- ASSERT(0 == setgid(pw->pw_gid));
- ASSERT(0 == setuid(pw->pw_uid));
- }
-
- init_process_options("spawn_helper1", fail_cb);
-
- options.flags |= UV_PROCESS_SETGID;
- options.gid = 0;
-
- r = uv_spawn(uv_default_loop(), &process, &options);
- ASSERT(r == UV_EPERM);
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(close_cb_called == 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-#endif
-
-
-#ifdef _WIN32
-
-static void exit_cb_unexpected(uv_process_t* process,
- int64_t exit_status,
- int term_signal) {
- ASSERT(0 && "should not have been called");
-}
-
-
-TEST_IMPL(spawn_setuid_fails) {
- int r;
-
- init_process_options("spawn_helper1", exit_cb_unexpected);
-
- options.flags |= UV_PROCESS_SETUID;
- options.uid = (uv_uid_t) -42424242;
-
- r = uv_spawn(uv_default_loop(), &process, &options);
- ASSERT(r == UV_ENOTSUP);
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(close_cb_called == 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(spawn_setgid_fails) {
- int r;
-
- init_process_options("spawn_helper1", exit_cb_unexpected);
-
- options.flags |= UV_PROCESS_SETGID;
- options.gid = (uv_gid_t) -42424242;
-
- r = uv_spawn(uv_default_loop(), &process, &options);
- ASSERT(r == UV_ENOTSUP);
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(close_cb_called == 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-#endif
-
-
-TEST_IMPL(spawn_auto_unref) {
- init_process_options("spawn_helper1", NULL);
- ASSERT(0 == uv_spawn(uv_default_loop(), &process, &options));
- ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
- ASSERT(0 == uv_is_closing((uv_handle_t*) &process));
- uv_close((uv_handle_t*) &process, NULL);
- ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
- ASSERT(1 == uv_is_closing((uv_handle_t*) &process));
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-#ifndef _WIN32
-TEST_IMPL(spawn_fs_open) {
- int fd;
- uv_fs_t fs_req;
- uv_pipe_t in;
- uv_write_t write_req;
- uv_buf_t buf;
- uv_stdio_container_t stdio[1];
-
- fd = uv_fs_open(NULL, &fs_req, "/dev/null", O_RDWR, 0, NULL);
- ASSERT(fd >= 0);
- uv_fs_req_cleanup(&fs_req);
-
- init_process_options("spawn_helper8", exit_cb);
-
- ASSERT(0 == uv_pipe_init(uv_default_loop(), &in, 0));
-
- options.stdio = stdio;
- options.stdio[0].flags = UV_CREATE_PIPE | UV_READABLE_PIPE;
- options.stdio[0].data.stream = (uv_stream_t*) &in;
- options.stdio_count = 1;
-
- ASSERT(0 == uv_spawn(uv_default_loop(), &process, &options));
-
- buf = uv_buf_init((char*) &fd, sizeof(fd));
- ASSERT(0 == uv_write(&write_req, (uv_stream_t*) &in, &buf, 1, write_cb));
-
- ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
- ASSERT(0 == uv_fs_close(NULL, &fs_req, fd, NULL));
-
- ASSERT(exit_cb_called == 1);
- ASSERT(close_cb_called == 2); /* One for `in`, one for process */
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-#endif /* !_WIN32 */
-
-
-#ifndef _WIN32
-TEST_IMPL(closed_fd_events) {
- uv_stdio_container_t stdio[3];
- uv_pipe_t pipe_handle;
- int fd[2];
-
- /* create a pipe and share it with a child process */
- ASSERT(0 == pipe(fd));
-
- /* spawn_helper4 blocks indefinitely. */
- init_process_options("spawn_helper4", exit_cb);
- options.stdio_count = 3;
- options.stdio = stdio;
- options.stdio[0].flags = UV_INHERIT_FD;
- options.stdio[0].data.fd = fd[0];
- options.stdio[1].flags = UV_IGNORE;
- options.stdio[2].flags = UV_IGNORE;
-
- ASSERT(0 == uv_spawn(uv_default_loop(), &process, &options));
- uv_unref((uv_handle_t*) &process);
-
- /* read from the pipe with uv */
- ASSERT(0 == uv_pipe_init(uv_default_loop(), &pipe_handle, 0));
- ASSERT(0 == uv_pipe_open(&pipe_handle, fd[0]));
- fd[0] = -1;
-
- ASSERT(0 == uv_read_start((uv_stream_t*) &pipe_handle, on_alloc, on_read_once));
-
- ASSERT(1 == write(fd[1], "", 1));
-
- ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_ONCE));
-
- /* should have received just one byte */
- ASSERT(output_used == 1);
-
- /* close the pipe and see if we still get events */
- uv_close((uv_handle_t*) &pipe_handle, close_cb);
-
- ASSERT(1 == write(fd[1], "", 1));
-
- ASSERT(0 == uv_timer_init(uv_default_loop(), &timer));
- ASSERT(0 == uv_timer_start(&timer, timer_counter_cb, 10, 0));
-
- /* see if any spurious events interrupt the timer */
- if (1 == uv_run(uv_default_loop(), UV_RUN_ONCE))
- /* have to run again to really trigger the timer */
- ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_ONCE));
-
- ASSERT(timer_counter == 1);
-
- /* cleanup */
- ASSERT(0 == uv_process_kill(&process, /* SIGTERM */ 15));
- ASSERT(0 == close(fd[1]));
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-#endif /* !_WIN32 */
-
-TEST_IMPL(spawn_reads_child_path) {
- int r;
- int len;
- char file[64];
- char path[1024];
- char* env[3];
-
- /* Need to carry over the dynamic linker path when the test runner is
- * linked against libuv.so, see https://github.com/libuv/libuv/issues/85.
- */
-#if defined(__APPLE__)
- static const char dyld_path_var[] = "DYLD_LIBRARY_PATH";
-#else
- static const char dyld_path_var[] = "LD_LIBRARY_PATH";
-#endif
-
- /* Set up the process, but make sure that the file to run is relative and */
- /* requires a lookup into PATH */
- init_process_options("spawn_helper1", exit_cb);
-
- /* Set up the PATH env variable */
- for (len = strlen(exepath);
- exepath[len - 1] != '/' && exepath[len - 1] != '\\';
- len--);
- strcpy(file, exepath + len);
- exepath[len] = 0;
- strcpy(path, "PATH=");
- strcpy(path + 5, exepath);
-
- env[0] = path;
- env[1] = getenv(dyld_path_var);
- env[2] = NULL;
-
- if (env[1] != NULL) {
- static char buf[1024 + sizeof(dyld_path_var)];
- snprintf(buf, sizeof(buf), "%s=%s", dyld_path_var, env[1]);
- env[1] = buf;
- }
-
- options.file = file;
- options.args[0] = file;
- options.env = env;
-
- r = uv_spawn(uv_default_loop(), &process, &options);
- ASSERT(r == 0);
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(exit_cb_called == 1);
- ASSERT(close_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-#ifndef _WIN32
-static int mpipe(int *fds) {
- if (pipe(fds) == -1)
- return -1;
- if (fcntl(fds[0], F_SETFD, FD_CLOEXEC) == -1 ||
- fcntl(fds[1], F_SETFD, FD_CLOEXEC) == -1) {
- close(fds[0]);
- close(fds[1]);
- return -1;
- }
- return 0;
-}
-#else
-static int mpipe(int *fds) {
- SECURITY_ATTRIBUTES attr;
- HANDLE readh, writeh;
- attr.nLength = sizeof(attr);
- attr.lpSecurityDescriptor = NULL;
- attr.bInheritHandle = FALSE;
- if (!CreatePipe(&readh, &writeh, &attr, 0))
- return -1;
- fds[0] = _open_osfhandle((intptr_t)readh, 0);
- fds[1] = _open_osfhandle((intptr_t)writeh, 0);
- if (fds[0] == -1 || fds[1] == -1) {
- CloseHandle(readh);
- CloseHandle(writeh);
- return -1;
- }
- return 0;
-}
-#endif /* !_WIN32 */
-
-TEST_IMPL(spawn_inherit_streams) {
- uv_process_t child_req;
- uv_stdio_container_t child_stdio[2];
- int fds_stdin[2];
- int fds_stdout[2];
- uv_pipe_t pipe_stdin_child;
- uv_pipe_t pipe_stdout_child;
- uv_pipe_t pipe_stdin_parent;
- uv_pipe_t pipe_stdout_parent;
- unsigned char ubuf[OUTPUT_SIZE - 1];
- uv_buf_t buf;
- unsigned int i;
- int r;
- uv_write_t write_req;
- uv_loop_t* loop;
-
- init_process_options("spawn_helper9", exit_cb);
-
- loop = uv_default_loop();
- ASSERT(uv_pipe_init(loop, &pipe_stdin_child, 0) == 0);
- ASSERT(uv_pipe_init(loop, &pipe_stdout_child, 0) == 0);
- ASSERT(uv_pipe_init(loop, &pipe_stdin_parent, 0) == 0);
- ASSERT(uv_pipe_init(loop, &pipe_stdout_parent, 0) == 0);
-
- ASSERT(mpipe(fds_stdin) != -1);
- ASSERT(mpipe(fds_stdout) != -1);
-
- ASSERT(uv_pipe_open(&pipe_stdin_child, fds_stdin[0]) == 0);
- ASSERT(uv_pipe_open(&pipe_stdout_child, fds_stdout[1]) == 0);
- ASSERT(uv_pipe_open(&pipe_stdin_parent, fds_stdin[1]) == 0);
- ASSERT(uv_pipe_open(&pipe_stdout_parent, fds_stdout[0]) == 0);
-
- child_stdio[0].flags = UV_INHERIT_STREAM;
- child_stdio[0].data.stream = (uv_stream_t *)&pipe_stdin_child;
-
- child_stdio[1].flags = UV_INHERIT_STREAM;
- child_stdio[1].data.stream = (uv_stream_t *)&pipe_stdout_child;
-
- options.stdio = child_stdio;
- options.stdio_count = 2;
-
- ASSERT(uv_spawn(loop, &child_req, &options) == 0);
-
- uv_close((uv_handle_t*)&pipe_stdin_child, NULL);
- uv_close((uv_handle_t*)&pipe_stdout_child, NULL);
-
- buf = uv_buf_init((char*)ubuf, sizeof ubuf);
- for (i = 0; i < sizeof ubuf; ++i)
- ubuf[i] = i & 255u;
- memset(output, 0, sizeof ubuf);
-
- r = uv_write(&write_req,
- (uv_stream_t*)&pipe_stdin_parent,
- &buf,
- 1,
- write_cb);
- ASSERT(r == 0);
-
- r = uv_read_start((uv_stream_t*)&pipe_stdout_parent, on_alloc, on_read);
- ASSERT(r == 0);
-
- r = uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(exit_cb_called == 1);
- ASSERT(close_cb_called == 3);
-
- r = memcmp(ubuf, output, sizeof ubuf);
- ASSERT(r == 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-/* Helper for child process of spawn_inherit_streams */
-#ifndef _WIN32
-int spawn_stdin_stdout(void) {
- char buf[1024];
- char* pbuf;
- for (;;) {
- ssize_t r, w, c;
- do {
- r = read(0, buf, sizeof buf);
- } while (r == -1 && errno == EINTR);
- if (r == 0) {
- return 1;
- }
- ASSERT(r > 0);
- c = r;
- pbuf = buf;
- while (c) {
- do {
- w = write(1, pbuf, (size_t)c);
- } while (w == -1 && errno == EINTR);
- ASSERT(w >= 0);
- pbuf = pbuf + w;
- c = c - w;
- }
- }
- return 2;
-}
-#else
-int spawn_stdin_stdout(void) {
- char buf[1024];
- char* pbuf;
- HANDLE h_stdin = GetStdHandle(STD_INPUT_HANDLE);
- HANDLE h_stdout = GetStdHandle(STD_OUTPUT_HANDLE);
- ASSERT(h_stdin != INVALID_HANDLE_VALUE);
- ASSERT(h_stdout != INVALID_HANDLE_VALUE);
- for (;;) {
- DWORD n_read;
- DWORD n_written;
- DWORD to_write;
- if (!ReadFile(h_stdin, buf, sizeof buf, &n_read, NULL)) {
- ASSERT(GetLastError() == ERROR_BROKEN_PIPE);
- return 1;
- }
- to_write = n_read;
- pbuf = buf;
- while (to_write) {
- ASSERT(WriteFile(h_stdout, pbuf, to_write, &n_written, NULL));
- to_write -= n_written;
- pbuf += n_written;
- }
- }
- return 2;
-}
-#endif /* !_WIN32 */
diff --git a/3rdparty/libuv/test/test-stdio-over-pipes.c b/3rdparty/libuv/test/test-stdio-over-pipes.c
deleted file mode 100644
index 15744761049..00000000000
--- a/3rdparty/libuv/test/test-stdio-over-pipes.c
+++ /dev/null
@@ -1,255 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <stdlib.h>
-#include <string.h>
-
-
-static char exepath[1024];
-static size_t exepath_size = 1024;
-static char* args[3];
-static uv_process_options_t options;
-static int close_cb_called;
-static int exit_cb_called;
-static int on_read_cb_called;
-static int after_write_cb_called;
-static uv_pipe_t in;
-static uv_pipe_t out;
-static uv_loop_t* loop;
-#define OUTPUT_SIZE 1024
-static char output[OUTPUT_SIZE];
-static int output_used;
-
-
-static void close_cb(uv_handle_t* handle) {
- close_cb_called++;
-}
-
-
-static void exit_cb(uv_process_t* process,
- int64_t exit_status,
- int term_signal) {
- printf("exit_cb\n");
- exit_cb_called++;
- ASSERT(exit_status == 0);
- ASSERT(term_signal == 0);
- uv_close((uv_handle_t*)process, close_cb);
- uv_close((uv_handle_t*)&in, close_cb);
- uv_close((uv_handle_t*)&out, close_cb);
-}
-
-
-static void init_process_options(char* test, uv_exit_cb exit_cb) {
- int r = uv_exepath(exepath, &exepath_size);
- ASSERT(r == 0);
- exepath[exepath_size] = '\0';
- args[0] = exepath;
- args[1] = test;
- args[2] = NULL;
- options.file = exepath;
- options.args = args;
- options.exit_cb = exit_cb;
-}
-
-
-static void on_alloc(uv_handle_t* handle,
- size_t suggested_size,
- uv_buf_t* buf) {
- buf->base = output + output_used;
- buf->len = OUTPUT_SIZE - output_used;
-}
-
-
-static void after_write(uv_write_t* req, int status) {
- if (status) {
- fprintf(stderr, "uv_write error: %s\n", uv_strerror(status));
- ASSERT(0);
- }
-
- /* Free the read/write buffer and the request */
- free(req);
-
- after_write_cb_called++;
-}
-
-
-static void on_read(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* rdbuf) {
- uv_write_t* req;
- uv_buf_t wrbuf;
- int r;
-
- ASSERT(nread > 0 || nread == UV_EOF);
-
- if (nread > 0) {
- output_used += nread;
- if (output_used == 12) {
- ASSERT(memcmp("hello world\n", output, 12) == 0);
- wrbuf = uv_buf_init(output, output_used);
- req = malloc(sizeof(*req));
- r = uv_write(req, (uv_stream_t*)&in, &wrbuf, 1, after_write);
- ASSERT(r == 0);
- }
- }
-
- on_read_cb_called++;
-}
-
-
-TEST_IMPL(stdio_over_pipes) {
- int r;
- uv_process_t process;
- uv_stdio_container_t stdio[2];
-
- loop = uv_default_loop();
-
- init_process_options("stdio_over_pipes_helper", exit_cb);
-
- uv_pipe_init(loop, &out, 0);
- uv_pipe_init(loop, &in, 0);
-
- options.stdio = stdio;
- options.stdio[0].flags = UV_CREATE_PIPE | UV_READABLE_PIPE;
- options.stdio[0].data.stream = (uv_stream_t*)&in;
- options.stdio[1].flags = UV_CREATE_PIPE | UV_WRITABLE_PIPE;
- options.stdio[1].data.stream = (uv_stream_t*)&out;
- options.stdio_count = 2;
-
- r = uv_spawn(loop, &process, &options);
- ASSERT(r == 0);
-
- r = uv_read_start((uv_stream_t*) &out, on_alloc, on_read);
- ASSERT(r == 0);
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(on_read_cb_called > 1);
- ASSERT(after_write_cb_called == 1);
- ASSERT(exit_cb_called == 1);
- ASSERT(close_cb_called == 3);
- ASSERT(memcmp("hello world\n", output, 12) == 0);
- ASSERT(output_used == 12);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-/* Everything here runs in a child process. */
-
-static int on_pipe_read_called;
-static int after_write_called;
-static uv_pipe_t stdin_pipe;
-static uv_pipe_t stdout_pipe;
-
-static void on_pipe_read(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* buf) {
- ASSERT(nread > 0);
- ASSERT(memcmp("hello world\n", buf->base, nread) == 0);
- on_pipe_read_called++;
-
- free(buf->base);
-
- uv_close((uv_handle_t*)&stdin_pipe, close_cb);
- uv_close((uv_handle_t*)&stdout_pipe, close_cb);
-}
-
-
-static void after_pipe_write(uv_write_t* req, int status) {
- ASSERT(status == 0);
- after_write_called++;
-}
-
-
-static void on_read_alloc(uv_handle_t* handle,
- size_t suggested_size,
- uv_buf_t* buf) {
- buf->base = malloc(suggested_size);
- buf->len = suggested_size;
-}
-
-
-int stdio_over_pipes_helper(void) {
- /* Write several buffers to test that the write order is preserved. */
- char* buffers[] = {
- "he",
- "ll",
- "o ",
- "wo",
- "rl",
- "d",
- "\n"
- };
-
- uv_write_t write_req[ARRAY_SIZE(buffers)];
- uv_buf_t buf[ARRAY_SIZE(buffers)];
- unsigned int i;
- int r;
- uv_loop_t* loop = uv_default_loop();
-
- ASSERT(UV_NAMED_PIPE == uv_guess_handle(0));
- ASSERT(UV_NAMED_PIPE == uv_guess_handle(1));
-
- r = uv_pipe_init(loop, &stdin_pipe, 0);
- ASSERT(r == 0);
- r = uv_pipe_init(loop, &stdout_pipe, 0);
- ASSERT(r == 0);
-
- uv_pipe_open(&stdin_pipe, 0);
- uv_pipe_open(&stdout_pipe, 1);
-
- /* Unref both stdio handles to make sure that all writes complete. */
- uv_unref((uv_handle_t*)&stdin_pipe);
- uv_unref((uv_handle_t*)&stdout_pipe);
-
- for (i = 0; i < ARRAY_SIZE(buffers); i++) {
- buf[i] = uv_buf_init((char*)buffers[i], strlen(buffers[i]));
- }
-
- for (i = 0; i < ARRAY_SIZE(buffers); i++) {
- r = uv_write(&write_req[i], (uv_stream_t*)&stdout_pipe, &buf[i], 1,
- after_pipe_write);
- ASSERT(r == 0);
- }
-
- uv_run(loop, UV_RUN_DEFAULT);
-
- ASSERT(after_write_called == 7);
- ASSERT(on_pipe_read_called == 0);
- ASSERT(close_cb_called == 0);
-
- uv_ref((uv_handle_t*)&stdout_pipe);
- uv_ref((uv_handle_t*)&stdin_pipe);
-
- r = uv_read_start((uv_stream_t*)&stdin_pipe, on_read_alloc, on_pipe_read);
- ASSERT(r == 0);
-
- uv_run(loop, UV_RUN_DEFAULT);
-
- ASSERT(after_write_called == 7);
- ASSERT(on_pipe_read_called == 1);
- ASSERT(close_cb_called == 2);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-tcp-bind-error.c b/3rdparty/libuv/test/test-tcp-bind-error.c
deleted file mode 100644
index 10ed68e10ec..00000000000
--- a/3rdparty/libuv/test/test-tcp-bind-error.c
+++ /dev/null
@@ -1,216 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-
-static int close_cb_called = 0;
-
-
-static void close_cb(uv_handle_t* handle) {
- ASSERT(handle != NULL);
- close_cb_called++;
-}
-
-
-TEST_IMPL(tcp_bind_error_addrinuse) {
- struct sockaddr_in addr;
- uv_tcp_t server1, server2;
- int r;
-
- ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr));
- r = uv_tcp_init(uv_default_loop(), &server1);
- ASSERT(r == 0);
- r = uv_tcp_bind(&server1, (const struct sockaddr*) &addr, 0);
- ASSERT(r == 0);
-
- r = uv_tcp_init(uv_default_loop(), &server2);
- ASSERT(r == 0);
- r = uv_tcp_bind(&server2, (const struct sockaddr*) &addr, 0);
- ASSERT(r == 0);
-
- r = uv_listen((uv_stream_t*)&server1, 128, NULL);
- ASSERT(r == 0);
- r = uv_listen((uv_stream_t*)&server2, 128, NULL);
- ASSERT(r == UV_EADDRINUSE);
-
- uv_close((uv_handle_t*)&server1, close_cb);
- uv_close((uv_handle_t*)&server2, close_cb);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(close_cb_called == 2);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(tcp_bind_error_addrnotavail_1) {
- struct sockaddr_in addr;
- uv_tcp_t server;
- int r;
-
- ASSERT(0 == uv_ip4_addr("127.255.255.255", TEST_PORT, &addr));
-
- r = uv_tcp_init(uv_default_loop(), &server);
- ASSERT(r == 0);
-
- /* It seems that Linux is broken here - bind succeeds. */
- r = uv_tcp_bind(&server, (const struct sockaddr*) &addr, 0);
- ASSERT(r == 0 || r == UV_EADDRNOTAVAIL);
-
- uv_close((uv_handle_t*)&server, close_cb);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(close_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(tcp_bind_error_addrnotavail_2) {
- struct sockaddr_in addr;
- uv_tcp_t server;
- int r;
-
- ASSERT(0 == uv_ip4_addr("4.4.4.4", TEST_PORT, &addr));
-
- r = uv_tcp_init(uv_default_loop(), &server);
- ASSERT(r == 0);
- r = uv_tcp_bind(&server, (const struct sockaddr*) &addr, 0);
- ASSERT(r == UV_EADDRNOTAVAIL);
-
- uv_close((uv_handle_t*)&server, close_cb);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(close_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(tcp_bind_error_fault) {
- char garbage[] =
- "blah blah blah blah blah blah blah blah blah blah blah blah";
- struct sockaddr_in* garbage_addr;
- uv_tcp_t server;
- int r;
-
- garbage_addr = (struct sockaddr_in*) &garbage;
-
- r = uv_tcp_init(uv_default_loop(), &server);
- ASSERT(r == 0);
- r = uv_tcp_bind(&server, (const struct sockaddr*) garbage_addr, 0);
- ASSERT(r == UV_EINVAL);
-
- uv_close((uv_handle_t*)&server, close_cb);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(close_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-/* Notes: On Linux uv_bind(server, NULL) will segfault the program. */
-
-TEST_IMPL(tcp_bind_error_inval) {
- struct sockaddr_in addr1;
- struct sockaddr_in addr2;
- uv_tcp_t server;
- int r;
-
- ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr1));
- ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT_2, &addr2));
-
- r = uv_tcp_init(uv_default_loop(), &server);
- ASSERT(r == 0);
- r = uv_tcp_bind(&server, (const struct sockaddr*) &addr1, 0);
- ASSERT(r == 0);
- r = uv_tcp_bind(&server, (const struct sockaddr*) &addr2, 0);
- ASSERT(r == UV_EINVAL);
-
- uv_close((uv_handle_t*)&server, close_cb);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(close_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(tcp_bind_localhost_ok) {
- struct sockaddr_in addr;
- uv_tcp_t server;
- int r;
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
-
- r = uv_tcp_init(uv_default_loop(), &server);
- ASSERT(r == 0);
- r = uv_tcp_bind(&server, (const struct sockaddr*) &addr, 0);
- ASSERT(r == 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(tcp_bind_invalid_flags) {
- struct sockaddr_in addr;
- uv_tcp_t server;
- int r;
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
-
- r = uv_tcp_init(uv_default_loop(), &server);
- ASSERT(r == 0);
- r = uv_tcp_bind(&server, (const struct sockaddr*) &addr, UV_TCP_IPV6ONLY);
- ASSERT(r == UV_EINVAL);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(tcp_listen_without_bind) {
- int r;
- uv_tcp_t server;
-
- r = uv_tcp_init(uv_default_loop(), &server);
- ASSERT(r == 0);
- r = uv_listen((uv_stream_t*)&server, 128, NULL);
- ASSERT(r == 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-tcp-bind6-error.c b/3rdparty/libuv/test/test-tcp-bind6-error.c
deleted file mode 100644
index b762bcb3d1b..00000000000
--- a/3rdparty/libuv/test/test-tcp-bind6-error.c
+++ /dev/null
@@ -1,176 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-
-static int close_cb_called = 0;
-
-
-static void close_cb(uv_handle_t* handle) {
- ASSERT(handle != NULL);
- close_cb_called++;
-}
-
-
-TEST_IMPL(tcp_bind6_error_addrinuse) {
- struct sockaddr_in6 addr;
- uv_tcp_t server1, server2;
- int r;
-
- if (!can_ipv6())
- RETURN_SKIP("IPv6 not supported");
-
- ASSERT(0 == uv_ip6_addr("::", TEST_PORT, &addr));
-
- r = uv_tcp_init(uv_default_loop(), &server1);
- ASSERT(r == 0);
- r = uv_tcp_bind(&server1, (const struct sockaddr*) &addr, 0);
- ASSERT(r == 0);
-
- r = uv_tcp_init(uv_default_loop(), &server2);
- ASSERT(r == 0);
- r = uv_tcp_bind(&server2, (const struct sockaddr*) &addr, 0);
- ASSERT(r == 0);
-
- r = uv_listen((uv_stream_t*)&server1, 128, NULL);
- ASSERT(r == 0);
- r = uv_listen((uv_stream_t*)&server2, 128, NULL);
- ASSERT(r == UV_EADDRINUSE);
-
- uv_close((uv_handle_t*)&server1, close_cb);
- uv_close((uv_handle_t*)&server2, close_cb);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(close_cb_called == 2);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(tcp_bind6_error_addrnotavail) {
- struct sockaddr_in6 addr;
- uv_tcp_t server;
- int r;
-
- if (!can_ipv6())
- RETURN_SKIP("IPv6 not supported");
-
- ASSERT(0 == uv_ip6_addr("4:4:4:4:4:4:4:4", TEST_PORT, &addr));
-
- r = uv_tcp_init(uv_default_loop(), &server);
- ASSERT(r == 0);
- r = uv_tcp_bind(&server, (const struct sockaddr*) &addr, 0);
- ASSERT(r == UV_EADDRNOTAVAIL);
-
- uv_close((uv_handle_t*)&server, close_cb);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(close_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(tcp_bind6_error_fault) {
- char garbage[] =
- "blah blah blah blah blah blah blah blah blah blah blah blah";
- struct sockaddr_in6* garbage_addr;
- uv_tcp_t server;
- int r;
-
- if (!can_ipv6())
- RETURN_SKIP("IPv6 not supported");
-
- garbage_addr = (struct sockaddr_in6*) &garbage;
-
- r = uv_tcp_init(uv_default_loop(), &server);
- ASSERT(r == 0);
- r = uv_tcp_bind(&server, (const struct sockaddr*) garbage_addr, 0);
- ASSERT(r == UV_EINVAL);
-
- uv_close((uv_handle_t*)&server, close_cb);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(close_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-/* Notes: On Linux uv_bind6(server, NULL) will segfault the program. */
-
-TEST_IMPL(tcp_bind6_error_inval) {
- struct sockaddr_in6 addr1;
- struct sockaddr_in6 addr2;
- uv_tcp_t server;
- int r;
-
- if (!can_ipv6())
- RETURN_SKIP("IPv6 not supported");
-
- ASSERT(0 == uv_ip6_addr("::", TEST_PORT, &addr1));
- ASSERT(0 == uv_ip6_addr("::", TEST_PORT_2, &addr2));
-
- r = uv_tcp_init(uv_default_loop(), &server);
- ASSERT(r == 0);
- r = uv_tcp_bind(&server, (const struct sockaddr*) &addr1, 0);
- ASSERT(r == 0);
- r = uv_tcp_bind(&server, (const struct sockaddr*) &addr2, 0);
- ASSERT(r == UV_EINVAL);
-
- uv_close((uv_handle_t*)&server, close_cb);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(close_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(tcp_bind6_localhost_ok) {
- struct sockaddr_in6 addr;
- uv_tcp_t server;
- int r;
-
- if (!can_ipv6())
- RETURN_SKIP("IPv6 not supported");
-
- ASSERT(0 == uv_ip6_addr("::1", TEST_PORT, &addr));
-
- r = uv_tcp_init(uv_default_loop(), &server);
- ASSERT(r == 0);
- r = uv_tcp_bind(&server, (const struct sockaddr*) &addr, 0);
- ASSERT(r == 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-tcp-close-accept.c b/3rdparty/libuv/test/test-tcp-close-accept.c
deleted file mode 100644
index 5517aaf99e6..00000000000
--- a/3rdparty/libuv/test/test-tcp-close-accept.c
+++ /dev/null
@@ -1,188 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-/* this test is Unix only */
-#ifndef _WIN32
-
-#include "uv.h"
-#include "task.h"
-
-#include <stdio.h>
-#include <string.h>
-
-static struct sockaddr_in addr;
-static uv_tcp_t tcp_server;
-static uv_tcp_t tcp_outgoing[2];
-static uv_tcp_t tcp_incoming[ARRAY_SIZE(tcp_outgoing)];
-static uv_connect_t connect_reqs[ARRAY_SIZE(tcp_outgoing)];
-static uv_tcp_t tcp_check;
-static uv_connect_t tcp_check_req;
-static uv_write_t write_reqs[ARRAY_SIZE(tcp_outgoing)];
-static unsigned int got_connections;
-static unsigned int close_cb_called;
-static unsigned int write_cb_called;
-static unsigned int read_cb_called;
-
-static void close_cb(uv_handle_t* handle) {
- close_cb_called++;
-}
-
-static void write_cb(uv_write_t* req, int status) {
- ASSERT(status == 0);
- write_cb_called++;
-}
-
-static void connect_cb(uv_connect_t* req, int status) {
- unsigned int i;
- uv_buf_t buf;
- uv_stream_t* outgoing;
-
- if (req == &tcp_check_req) {
- ASSERT(status != 0);
-
- /* Close check and incoming[0], time to finish test */
- uv_close((uv_handle_t*) &tcp_incoming[0], close_cb);
- uv_close((uv_handle_t*) &tcp_check, close_cb);
- return;
- }
-
- ASSERT(status == 0);
- ASSERT(connect_reqs <= req);
- ASSERT(req <= connect_reqs + ARRAY_SIZE(connect_reqs));
- i = req - connect_reqs;
-
- buf = uv_buf_init("x", 1);
- outgoing = (uv_stream_t*) &tcp_outgoing[i];
- ASSERT(0 == uv_write(&write_reqs[i], outgoing, &buf, 1, write_cb));
-}
-
-static void alloc_cb(uv_handle_t* handle, size_t size, uv_buf_t* buf) {
- static char slab[1];
- buf->base = slab;
- buf->len = sizeof(slab);
-}
-
-static void read_cb(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf) {
- uv_loop_t* loop;
- unsigned int i;
-
- /* Only first stream should receive read events */
- ASSERT(stream == (uv_stream_t*) &tcp_incoming[0]);
- ASSERT(0 == uv_read_stop(stream));
- ASSERT(1 == nread);
-
- loop = stream->loop;
- read_cb_called++;
-
- /* Close all active incomings, except current one */
- for (i = 1; i < got_connections; i++)
- uv_close((uv_handle_t*) &tcp_incoming[i], close_cb);
-
- /* Create new fd that should be one of the closed incomings */
- ASSERT(0 == uv_tcp_init(loop, &tcp_check));
- ASSERT(0 == uv_tcp_connect(&tcp_check_req,
- &tcp_check,
- (const struct sockaddr*) &addr,
- connect_cb));
- ASSERT(0 == uv_read_start((uv_stream_t*) &tcp_check, alloc_cb, read_cb));
-
- /* Close server, so no one will connect to it */
- uv_close((uv_handle_t*) &tcp_server, close_cb);
-}
-
-static void connection_cb(uv_stream_t* server, int status) {
- unsigned int i;
- uv_tcp_t* incoming;
-
- ASSERT(server == (uv_stream_t*) &tcp_server);
-
- /* Ignore tcp_check connection */
- if (got_connections == ARRAY_SIZE(tcp_incoming))
- return;
-
- /* Accept everyone */
- incoming = &tcp_incoming[got_connections++];
- ASSERT(0 == uv_tcp_init(server->loop, incoming));
- ASSERT(0 == uv_accept(server, (uv_stream_t*) incoming));
-
- if (got_connections != ARRAY_SIZE(tcp_incoming))
- return;
-
- /* Once all clients are accepted - start reading */
- for (i = 0; i < ARRAY_SIZE(tcp_incoming); i++) {
- incoming = &tcp_incoming[i];
- ASSERT(0 == uv_read_start((uv_stream_t*) incoming, alloc_cb, read_cb));
- }
-}
-
-TEST_IMPL(tcp_close_accept) {
- unsigned int i;
- uv_loop_t* loop;
- uv_tcp_t* client;
-
- /*
- * A little explanation of what goes on below:
- *
- * We'll create server and connect to it using two clients, each writing one
- * byte once connected.
- *
- * When all clients will be accepted by server - we'll start reading from them
- * and, on first client's first byte, will close second client and server.
- * After that, we'll immediately initiate new connection to server using
- * tcp_check handle (thus, reusing fd from second client).
- *
- * In this situation uv__io_poll()'s event list should still contain read
- * event for second client, and, if not cleaned up properly, `tcp_check` will
- * receive stale event of second incoming and invoke `connect_cb` with zero
- * status.
- */
-
- loop = uv_default_loop();
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
-
- ASSERT(0 == uv_tcp_init(loop, &tcp_server));
- ASSERT(0 == uv_tcp_bind(&tcp_server, (const struct sockaddr*) &addr, 0));
- ASSERT(0 == uv_listen((uv_stream_t*) &tcp_server,
- ARRAY_SIZE(tcp_outgoing),
- connection_cb));
-
- for (i = 0; i < ARRAY_SIZE(tcp_outgoing); i++) {
- client = tcp_outgoing + i;
-
- ASSERT(0 == uv_tcp_init(loop, client));
- ASSERT(0 == uv_tcp_connect(&connect_reqs[i],
- client,
- (const struct sockaddr*) &addr,
- connect_cb));
- }
-
- uv_run(loop, UV_RUN_DEFAULT);
-
- ASSERT(ARRAY_SIZE(tcp_outgoing) == got_connections);
- ASSERT((ARRAY_SIZE(tcp_outgoing) + 2) == close_cb_called);
- ASSERT(ARRAY_SIZE(tcp_outgoing) == write_cb_called);
- ASSERT(1 == read_cb_called);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-#endif /* !_WIN32 */
diff --git a/3rdparty/libuv/test/test-tcp-close-while-connecting.c b/3rdparty/libuv/test/test-tcp-close-while-connecting.c
deleted file mode 100644
index 2c39b652b61..00000000000
--- a/3rdparty/libuv/test/test-tcp-close-while-connecting.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-static uv_timer_t timer1_handle;
-static uv_timer_t timer2_handle;
-static uv_tcp_t tcp_handle;
-
-static int connect_cb_called;
-static int timer1_cb_called;
-static int close_cb_called;
-
-
-static void close_cb(uv_handle_t* handle) {
- close_cb_called++;
-}
-
-
-static void connect_cb(uv_connect_t* req, int status) {
- ASSERT(status == UV_ECANCELED);
- uv_timer_stop(&timer2_handle);
- connect_cb_called++;
-}
-
-
-static void timer1_cb(uv_timer_t* handle) {
- uv_close((uv_handle_t*)handle, close_cb);
- uv_close((uv_handle_t*)&tcp_handle, close_cb);
- timer1_cb_called++;
-}
-
-
-static void timer2_cb(uv_timer_t* handle) {
- ASSERT(0 && "should not be called");
-}
-
-
-TEST_IMPL(tcp_close_while_connecting) {
- uv_connect_t connect_req;
- struct sockaddr_in addr;
- uv_loop_t* loop;
- int r;
-
- loop = uv_default_loop();
- ASSERT(0 == uv_ip4_addr("1.2.3.4", TEST_PORT, &addr));
- ASSERT(0 == uv_tcp_init(loop, &tcp_handle));
- r = uv_tcp_connect(&connect_req,
- &tcp_handle,
- (const struct sockaddr*) &addr,
- connect_cb);
- if (r == UV_ENETUNREACH)
- RETURN_SKIP("Network unreachable.");
- ASSERT(r == 0);
- ASSERT(0 == uv_timer_init(loop, &timer1_handle));
- ASSERT(0 == uv_timer_start(&timer1_handle, timer1_cb, 50, 0));
- ASSERT(0 == uv_timer_init(loop, &timer2_handle));
- ASSERT(0 == uv_timer_start(&timer2_handle, timer2_cb, 86400 * 1000, 0));
- ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
-
- ASSERT(connect_cb_called == 1);
- ASSERT(timer1_cb_called == 1);
- ASSERT(close_cb_called == 2);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-tcp-close.c b/3rdparty/libuv/test/test-tcp-close.c
deleted file mode 100644
index e65885aa556..00000000000
--- a/3rdparty/libuv/test/test-tcp-close.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <errno.h>
-#include <string.h> /* memset */
-
-#define NUM_WRITE_REQS 32
-
-static uv_tcp_t tcp_handle;
-static uv_connect_t connect_req;
-
-static int write_cb_called;
-static int close_cb_called;
-
-static void connect_cb(uv_connect_t* req, int status);
-static void write_cb(uv_write_t* req, int status);
-static void close_cb(uv_handle_t* handle);
-
-
-static void connect_cb(uv_connect_t* conn_req, int status) {
- uv_write_t* req;
- uv_buf_t buf;
- int i, r;
-
- buf = uv_buf_init("PING", 4);
- for (i = 0; i < NUM_WRITE_REQS; i++) {
- req = malloc(sizeof *req);
- ASSERT(req != NULL);
-
- r = uv_write(req, (uv_stream_t*)&tcp_handle, &buf, 1, write_cb);
- ASSERT(r == 0);
- }
-
- uv_close((uv_handle_t*)&tcp_handle, close_cb);
-}
-
-
-static void write_cb(uv_write_t* req, int status) {
- /* write callbacks should run before the close callback */
- ASSERT(close_cb_called == 0);
- ASSERT(req->handle == (uv_stream_t*)&tcp_handle);
- write_cb_called++;
- free(req);
-}
-
-
-static void close_cb(uv_handle_t* handle) {
- ASSERT(handle == (uv_handle_t*)&tcp_handle);
- close_cb_called++;
-}
-
-
-static void connection_cb(uv_stream_t* server, int status) {
- ASSERT(status == 0);
-}
-
-
-static void start_server(uv_loop_t* loop, uv_tcp_t* handle) {
- struct sockaddr_in addr;
- int r;
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
-
- r = uv_tcp_init(loop, handle);
- ASSERT(r == 0);
-
- r = uv_tcp_bind(handle, (const struct sockaddr*) &addr, 0);
- ASSERT(r == 0);
-
- r = uv_listen((uv_stream_t*)handle, 128, connection_cb);
- ASSERT(r == 0);
-
- uv_unref((uv_handle_t*)handle);
-}
-
-
-/* Check that pending write requests have their callbacks
- * invoked when the handle is closed.
- */
-TEST_IMPL(tcp_close) {
- struct sockaddr_in addr;
- uv_tcp_t tcp_server;
- uv_loop_t* loop;
- int r;
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
-
- loop = uv_default_loop();
-
- /* We can't use the echo server, it doesn't handle ECONNRESET. */
- start_server(loop, &tcp_server);
-
- r = uv_tcp_init(loop, &tcp_handle);
- ASSERT(r == 0);
-
- r = uv_tcp_connect(&connect_req,
- &tcp_handle,
- (const struct sockaddr*) &addr,
- connect_cb);
- ASSERT(r == 0);
-
- ASSERT(write_cb_called == 0);
- ASSERT(close_cb_called == 0);
-
- r = uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- printf("%d of %d write reqs seen\n", write_cb_called, NUM_WRITE_REQS);
-
- ASSERT(write_cb_called == NUM_WRITE_REQS);
- ASSERT(close_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-tcp-connect-error-after-write.c b/3rdparty/libuv/test/test-tcp-connect-error-after-write.c
deleted file mode 100644
index 3f2e3572da9..00000000000
--- a/3rdparty/libuv/test/test-tcp-connect-error-after-write.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-static int connect_cb_called;
-static int write_cb_called;
-static int close_cb_called;
-
-
-static void close_cb(uv_handle_t* handle) {
- close_cb_called++;
-}
-
-
-static void connect_cb(uv_connect_t* req, int status) {
- ASSERT(status < 0);
- connect_cb_called++;
- uv_close((uv_handle_t*)req->handle, close_cb);
-}
-
-
-static void write_cb(uv_write_t* req, int status) {
- ASSERT(status < 0);
- write_cb_called++;
-}
-
-
-/*
- * Try to connect to an address on which nothing listens, get ECONNREFUSED
- * (uv errno 12) and get connect_cb() called once with status != 0.
- * Related issue: https://github.com/joyent/libuv/issues/443
- */
-TEST_IMPL(tcp_connect_error_after_write) {
- uv_connect_t connect_req;
- struct sockaddr_in addr;
- uv_write_t write_req;
- uv_tcp_t conn;
- uv_buf_t buf;
- int r;
-
-#ifdef _WIN32
- fprintf(stderr, "This test is disabled on Windows for now.\n");
- fprintf(stderr, "See https://github.com/joyent/libuv/issues/444\n");
- return 0; /* windows slackers... */
-#endif
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
- buf = uv_buf_init("TEST", 4);
-
- r = uv_tcp_init(uv_default_loop(), &conn);
- ASSERT(r == 0);
-
- r = uv_write(&write_req, (uv_stream_t*)&conn, &buf, 1, write_cb);
- ASSERT(r == UV_EBADF);
-
- r = uv_tcp_connect(&connect_req,
- &conn,
- (const struct sockaddr*) &addr,
- connect_cb);
- ASSERT(r == 0);
-
- r = uv_write(&write_req, (uv_stream_t*)&conn, &buf, 1, write_cb);
- ASSERT(r == 0);
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(connect_cb_called == 1);
- ASSERT(write_cb_called == 1);
- ASSERT(close_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-tcp-connect-error.c b/3rdparty/libuv/test/test-tcp-connect-error.c
deleted file mode 100644
index eab1eeb2545..00000000000
--- a/3rdparty/libuv/test/test-tcp-connect-error.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-
-static int connect_cb_called = 0;
-static int close_cb_called = 0;
-
-
-
-static void connect_cb(uv_connect_t* handle, int status) {
- ASSERT(handle != NULL);
- connect_cb_called++;
-}
-
-
-
-static void close_cb(uv_handle_t* handle) {
- ASSERT(handle != NULL);
- close_cb_called++;
-}
-
-
-TEST_IMPL(tcp_connect_error_fault) {
- const char garbage[] =
- "blah blah blah blah blah blah blah blah blah blah blah blah";
- const struct sockaddr_in* garbage_addr;
- uv_tcp_t server;
- int r;
- uv_connect_t req;
-
- garbage_addr = (const struct sockaddr_in*) &garbage;
-
- r = uv_tcp_init(uv_default_loop(), &server);
- ASSERT(r == 0);
- r = uv_tcp_connect(&req,
- &server,
- (const struct sockaddr*) garbage_addr,
- connect_cb);
- ASSERT(r == UV_EINVAL);
-
- uv_close((uv_handle_t*)&server, close_cb);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(connect_cb_called == 0);
- ASSERT(close_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-tcp-connect-timeout.c b/3rdparty/libuv/test/test-tcp-connect-timeout.c
deleted file mode 100644
index 081424b8002..00000000000
--- a/3rdparty/libuv/test/test-tcp-connect-timeout.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-
-static int connect_cb_called;
-static int close_cb_called;
-
-static uv_connect_t connect_req;
-static uv_timer_t timer;
-static uv_tcp_t conn;
-
-static void connect_cb(uv_connect_t* req, int status);
-static void timer_cb(uv_timer_t* handle);
-static void close_cb(uv_handle_t* handle);
-
-
-static void connect_cb(uv_connect_t* req, int status) {
- ASSERT(req == &connect_req);
- ASSERT(status == UV_ECANCELED);
- connect_cb_called++;
-}
-
-
-static void timer_cb(uv_timer_t* handle) {
- ASSERT(handle == &timer);
- uv_close((uv_handle_t*)&conn, close_cb);
- uv_close((uv_handle_t*)&timer, close_cb);
-}
-
-
-static void close_cb(uv_handle_t* handle) {
- ASSERT(handle == (uv_handle_t*)&conn || handle == (uv_handle_t*)&timer);
- close_cb_called++;
-}
-
-
-/* Verify that connecting to an unreachable address or port doesn't hang
- * the event loop.
- */
-TEST_IMPL(tcp_connect_timeout) {
- struct sockaddr_in addr;
- int r;
-
- ASSERT(0 == uv_ip4_addr("8.8.8.8", 9999, &addr));
-
- r = uv_timer_init(uv_default_loop(), &timer);
- ASSERT(r == 0);
-
- r = uv_timer_start(&timer, timer_cb, 50, 0);
- ASSERT(r == 0);
-
- r = uv_tcp_init(uv_default_loop(), &conn);
- ASSERT(r == 0);
-
- r = uv_tcp_connect(&connect_req,
- &conn,
- (const struct sockaddr*) &addr,
- connect_cb);
- if (r == UV_ENETUNREACH)
- RETURN_SKIP("Network unreachable.");
- ASSERT(r == 0);
-
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-tcp-connect6-error.c b/3rdparty/libuv/test/test-tcp-connect6-error.c
deleted file mode 100644
index 91ac0a3a101..00000000000
--- a/3rdparty/libuv/test/test-tcp-connect6-error.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-
-static int connect_cb_called = 0;
-static int close_cb_called = 0;
-
-
-static void connect_cb(uv_connect_t* handle, int status) {
- ASSERT(handle != NULL);
- connect_cb_called++;
-}
-
-
-static void close_cb(uv_handle_t* handle) {
- ASSERT(handle != NULL);
- close_cb_called++;
-}
-
-
-TEST_IMPL(tcp_connect6_error_fault) {
- const char garbage[] =
- "blah blah blah blah blah blah blah blah blah blah blah blah";
- const struct sockaddr_in6* garbage_addr;
- uv_tcp_t server;
- int r;
- uv_connect_t req;
-
- garbage_addr = (const struct sockaddr_in6*) &garbage;
-
- r = uv_tcp_init(uv_default_loop(), &server);
- ASSERT(r == 0);
- r = uv_tcp_connect(&req,
- &server,
- (const struct sockaddr*) garbage_addr,
- connect_cb);
- ASSERT(r == UV_EINVAL);
-
- uv_close((uv_handle_t*)&server, close_cb);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(connect_cb_called == 0);
- ASSERT(close_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-tcp-create-socket-early.c b/3rdparty/libuv/test/test-tcp-create-socket-early.c
deleted file mode 100644
index 65650adcc27..00000000000
--- a/3rdparty/libuv/test/test-tcp-create-socket-early.c
+++ /dev/null
@@ -1,206 +0,0 @@
-/* Copyright (c) 2015 Saúl Ibarra Corretgé <saghul@gmail.com>.
- * All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-#include <string.h>
-
-#ifdef _WIN32
-# define INVALID_FD (INVALID_HANDLE_VALUE)
-#else
-# define INVALID_FD (-1)
-#endif
-
-
-static void on_connect(uv_connect_t* req, int status) {
- ASSERT(status == 0);
- uv_close((uv_handle_t*) req->handle, NULL);
-}
-
-
-static void on_connection(uv_stream_t* server, int status) {
- uv_tcp_t* handle;
- int r;
-
- ASSERT(status == 0);
-
- handle = malloc(sizeof(*handle));
- ASSERT(handle != NULL);
-
- r = uv_tcp_init_ex(server->loop, handle, AF_INET);
- ASSERT(r == 0);
-
- r = uv_accept(server, (uv_stream_t*)handle);
- ASSERT(r == UV_EBUSY);
-
- uv_close((uv_handle_t*) server, NULL);
- uv_close((uv_handle_t*) handle, (uv_close_cb)free);
-}
-
-
-static void tcp_listener(uv_loop_t* loop, uv_tcp_t* server) {
- struct sockaddr_in addr;
- int r;
-
- ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr));
-
- r = uv_tcp_init(loop, server);
- ASSERT(r == 0);
-
- r = uv_tcp_bind(server, (const struct sockaddr*) &addr, 0);
- ASSERT(r == 0);
-
- r = uv_listen((uv_stream_t*) server, 128, on_connection);
- ASSERT(r == 0);
-}
-
-
-static void tcp_connector(uv_loop_t* loop, uv_tcp_t* client, uv_connect_t* req) {
- struct sockaddr_in server_addr;
- int r;
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &server_addr));
-
- r = uv_tcp_init(loop, client);
- ASSERT(r == 0);
-
- r = uv_tcp_connect(req,
- client,
- (const struct sockaddr*) &server_addr,
- on_connect);
- ASSERT(r == 0);
-}
-
-
-TEST_IMPL(tcp_create_early) {
- struct sockaddr_in addr;
- struct sockaddr_in sockname;
- uv_tcp_t client;
- uv_os_fd_t fd;
- int r, namelen;
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
-
- r = uv_tcp_init_ex(uv_default_loop(), &client, AF_INET);
- ASSERT(r == 0);
-
- r = uv_fileno((const uv_handle_t*) &client, &fd);
- ASSERT(r == 0);
- ASSERT(fd != INVALID_FD);
-
- /* Windows returns WSAEINVAL if the socket is not bound */
-#ifndef _WIN32
- namelen = sizeof sockname;
- r = uv_tcp_getsockname(&client, (struct sockaddr*) &sockname, &namelen);
- ASSERT(r == 0);
- ASSERT(sockname.sin_family == AF_INET);
-#endif
-
- r = uv_tcp_bind(&client, (const struct sockaddr*) &addr, 0);
- ASSERT(r == 0);
-
- namelen = sizeof sockname;
- r = uv_tcp_getsockname(&client, (struct sockaddr*) &sockname, &namelen);
- ASSERT(r == 0);
- ASSERT(memcmp(&addr.sin_addr,
- &sockname.sin_addr,
- sizeof(addr.sin_addr)) == 0);
-
- uv_close((uv_handle_t*) &client, NULL);
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(tcp_create_early_bad_bind) {
- struct sockaddr_in addr;
- uv_tcp_t client;
- uv_os_fd_t fd;
- int r;
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
-
- r = uv_tcp_init_ex(uv_default_loop(), &client, AF_INET6);
- ASSERT(r == 0);
-
- r = uv_fileno((const uv_handle_t*) &client, &fd);
- ASSERT(r == 0);
- ASSERT(fd != INVALID_FD);
-
- /* Windows returns WSAEINVAL if the socket is not bound */
-#ifndef _WIN32
- {
- int namelen;
- struct sockaddr_in6 sockname;
- namelen = sizeof sockname;
- r = uv_tcp_getsockname(&client, (struct sockaddr*) &sockname, &namelen);
- ASSERT(r == 0);
- ASSERT(sockname.sin6_family == AF_INET6);
- }
-#endif
-
- r = uv_tcp_bind(&client, (const struct sockaddr*) &addr, 0);
-#ifndef _WIN32
- ASSERT(r == UV_EINVAL);
-#else
- ASSERT(r == UV_EFAULT);
-#endif
-
- uv_close((uv_handle_t*) &client, NULL);
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(tcp_create_early_bad_domain) {
- uv_tcp_t client;
- int r;
-
- r = uv_tcp_init_ex(uv_default_loop(), &client, 47);
- ASSERT(r == UV_EINVAL);
-
- r = uv_tcp_init_ex(uv_default_loop(), &client, 1024);
- ASSERT(r == UV_EINVAL);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(tcp_create_early_accept) {
- uv_tcp_t client, server;
- uv_connect_t connect_req;
-
- tcp_listener(uv_default_loop(), &server);
- tcp_connector(uv_default_loop(), &client, &connect_req);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-tcp-flags.c b/3rdparty/libuv/test/test-tcp-flags.c
deleted file mode 100644
index 68afb39f456..00000000000
--- a/3rdparty/libuv/test/test-tcp-flags.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-
-
-TEST_IMPL(tcp_flags) {
- uv_loop_t* loop;
- uv_tcp_t handle;
- int r;
-
- loop = uv_default_loop();
-
- r = uv_tcp_init(loop, &handle);
- ASSERT(r == 0);
-
- r = uv_tcp_nodelay(&handle, 1);
- ASSERT(r == 0);
-
- r = uv_tcp_keepalive(&handle, 1, 60);
- ASSERT(r == 0);
-
- uv_close((uv_handle_t*)&handle, NULL);
-
- r = uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-tcp-oob.c b/3rdparty/libuv/test/test-tcp-oob.c
deleted file mode 100644
index fc011ee495f..00000000000
--- a/3rdparty/libuv/test/test-tcp-oob.c
+++ /dev/null
@@ -1,128 +0,0 @@
-/* Copyright Fedor Indutny. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#if !defined(_WIN32)
-
-#include "uv.h"
-#include "task.h"
-
-#include <errno.h>
-#include <sys/socket.h>
-#include <unistd.h>
-
-static uv_tcp_t server_handle;
-static uv_tcp_t client_handle;
-static uv_tcp_t peer_handle;
-static uv_idle_t idle;
-static uv_connect_t connect_req;
-static int ticks;
-static const int kMaxTicks = 10;
-
-static void alloc_cb(uv_handle_t* handle,
- size_t suggested_size,
- uv_buf_t* buf) {
- static char storage[1024];
- *buf = uv_buf_init(storage, sizeof(storage));
-}
-
-
-static void idle_cb(uv_idle_t* idle) {
- if (++ticks < kMaxTicks)
- return;
-
- uv_close((uv_handle_t*) &server_handle, NULL);
- uv_close((uv_handle_t*) &client_handle, NULL);
- uv_close((uv_handle_t*) &peer_handle, NULL);
- uv_close((uv_handle_t*) idle, NULL);
-}
-
-
-static void read_cb(uv_stream_t* handle, ssize_t nread, const uv_buf_t* buf) {
- ASSERT(nread > 0);
- ASSERT(0 == uv_idle_start(&idle, idle_cb));
-}
-
-
-static void connect_cb(uv_connect_t* req, int status) {
- ASSERT(req->handle == (uv_stream_t*) &client_handle);
- ASSERT(0 == status);
-}
-
-
-static void connection_cb(uv_stream_t* handle, int status) {
- int r;
- uv_os_fd_t fd;
-
- ASSERT(0 == status);
- ASSERT(0 == uv_accept(handle, (uv_stream_t*) &peer_handle));
- ASSERT(0 == uv_read_start((uv_stream_t*) &peer_handle, alloc_cb, read_cb));
-
- /* Send some OOB data */
- ASSERT(0 == uv_fileno((uv_handle_t*) &client_handle, &fd));
-
- ASSERT(0 == uv_stream_set_blocking((uv_stream_t*) &client_handle, 1));
-
- /* The problem triggers only on a second message, it seem that xnu is not
- * triggering `kevent()` for the first one
- */
- do {
- r = send(fd, "hello", 5, MSG_OOB);
- } while (r < 0 && errno == EINTR);
- ASSERT(5 == r);
-
- do {
- r = send(fd, "hello", 5, MSG_OOB);
- } while (r < 0 && errno == EINTR);
- ASSERT(5 == r);
-
- ASSERT(0 == uv_stream_set_blocking((uv_stream_t*) &client_handle, 0));
-}
-
-
-TEST_IMPL(tcp_oob) {
- struct sockaddr_in addr;
- uv_loop_t* loop;
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
- loop = uv_default_loop();
-
- ASSERT(0 == uv_tcp_init(loop, &server_handle));
- ASSERT(0 == uv_tcp_init(loop, &client_handle));
- ASSERT(0 == uv_tcp_init(loop, &peer_handle));
- ASSERT(0 == uv_idle_init(loop, &idle));
- ASSERT(0 == uv_tcp_bind(&server_handle, (const struct sockaddr*) &addr, 0));
- ASSERT(0 == uv_listen((uv_stream_t*) &server_handle, 1, connection_cb));
-
- /* Ensure two separate packets */
- ASSERT(0 == uv_tcp_nodelay(&client_handle, 1));
-
- ASSERT(0 == uv_tcp_connect(&connect_req,
- &client_handle,
- (const struct sockaddr*) &addr,
- connect_cb));
- ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
-
- ASSERT(ticks == kMaxTicks);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-#endif
diff --git a/3rdparty/libuv/test/test-tcp-open.c b/3rdparty/libuv/test/test-tcp-open.c
deleted file mode 100644
index 6c8d43d0009..00000000000
--- a/3rdparty/libuv/test/test-tcp-open.c
+++ /dev/null
@@ -1,220 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#ifndef _WIN32
-# include <unistd.h>
-#endif
-
-static int shutdown_cb_called = 0;
-static int connect_cb_called = 0;
-static int write_cb_called = 0;
-static int close_cb_called = 0;
-
-static uv_connect_t connect_req;
-static uv_shutdown_t shutdown_req;
-static uv_write_t write_req;
-
-
-static void startup(void) {
-#ifdef _WIN32
- struct WSAData wsa_data;
- int r = WSAStartup(MAKEWORD(2, 2), &wsa_data);
- ASSERT(r == 0);
-#endif
-}
-
-
-static uv_os_sock_t create_tcp_socket(void) {
- uv_os_sock_t sock;
-
- sock = socket(AF_INET, SOCK_STREAM, IPPROTO_IP);
-#ifdef _WIN32
- ASSERT(sock != INVALID_SOCKET);
-#else
- ASSERT(sock >= 0);
-#endif
-
-#ifndef _WIN32
- {
- /* Allow reuse of the port. */
- int yes = 1;
- int r = setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof yes);
- ASSERT(r == 0);
- }
-#endif
-
- return sock;
-}
-
-
-static void close_socket(uv_os_sock_t sock) {
- int r;
-#ifdef _WIN32
- r = closesocket(sock);
-#else
- r = close(sock);
-#endif
- ASSERT(r == 0);
-}
-
-
-static void alloc_cb(uv_handle_t* handle,
- size_t suggested_size,
- uv_buf_t* buf) {
- static char slab[65536];
- ASSERT(suggested_size <= sizeof(slab));
- buf->base = slab;
- buf->len = sizeof(slab);
-}
-
-
-static void close_cb(uv_handle_t* handle) {
- ASSERT(handle != NULL);
- close_cb_called++;
-}
-
-
-static void shutdown_cb(uv_shutdown_t* req, int status) {
- ASSERT(req == &shutdown_req);
- ASSERT(status == 0);
-
- /* Now we wait for the EOF */
- shutdown_cb_called++;
-}
-
-
-static void read_cb(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* buf) {
- ASSERT(tcp != NULL);
-
- if (nread >= 0) {
- ASSERT(nread == 4);
- ASSERT(memcmp("PING", buf->base, nread) == 0);
- }
- else {
- ASSERT(nread == UV_EOF);
- printf("GOT EOF\n");
- uv_close((uv_handle_t*)tcp, close_cb);
- }
-}
-
-
-static void write_cb(uv_write_t* req, int status) {
- ASSERT(req != NULL);
-
- if (status) {
- fprintf(stderr, "uv_write error: %s\n", uv_strerror(status));
- ASSERT(0);
- }
-
- write_cb_called++;
-}
-
-
-static void connect_cb(uv_connect_t* req, int status) {
- uv_buf_t buf = uv_buf_init("PING", 4);
- uv_stream_t* stream;
- int r;
-
- ASSERT(req == &connect_req);
- ASSERT(status == 0);
-
- stream = req->handle;
- connect_cb_called++;
-
- r = uv_write(&write_req, stream, &buf, 1, write_cb);
- ASSERT(r == 0);
-
- /* Shutdown on drain. */
- r = uv_shutdown(&shutdown_req, stream, shutdown_cb);
- ASSERT(r == 0);
-
- /* Start reading */
- r = uv_read_start(stream, alloc_cb, read_cb);
- ASSERT(r == 0);
-}
-
-
-TEST_IMPL(tcp_open) {
- struct sockaddr_in addr;
- uv_tcp_t client;
- uv_os_sock_t sock;
- int r;
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
-
- startup();
- sock = create_tcp_socket();
-
- r = uv_tcp_init(uv_default_loop(), &client);
- ASSERT(r == 0);
-
- r = uv_tcp_open(&client, sock);
- ASSERT(r == 0);
-
- r = uv_tcp_connect(&connect_req,
- &client,
- (const struct sockaddr*) &addr,
- connect_cb);
- ASSERT(r == 0);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(shutdown_cb_called == 1);
- ASSERT(connect_cb_called == 1);
- ASSERT(write_cb_called == 1);
- ASSERT(close_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(tcp_open_twice) {
- uv_tcp_t client;
- uv_os_sock_t sock1, sock2;
- int r;
-
- startup();
- sock1 = create_tcp_socket();
- sock2 = create_tcp_socket();
-
- r = uv_tcp_init(uv_default_loop(), &client);
- ASSERT(r == 0);
-
- r = uv_tcp_open(&client, sock1);
- ASSERT(r == 0);
-
- r = uv_tcp_open(&client, sock2);
- ASSERT(r == UV_EBUSY);
- close_socket(sock2);
-
- uv_close((uv_handle_t*) &client, NULL);
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-tcp-read-stop.c b/3rdparty/libuv/test/test-tcp-read-stop.c
deleted file mode 100644
index 488e8fb49a9..00000000000
--- a/3rdparty/libuv/test/test-tcp-read-stop.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-static uv_timer_t timer_handle;
-static uv_tcp_t tcp_handle;
-static uv_write_t write_req;
-
-
-static void fail_cb(void) {
- ASSERT(0 && "fail_cb called");
-}
-
-
-static void write_cb(uv_write_t* req, int status) {
- uv_close((uv_handle_t*) &timer_handle, NULL);
- uv_close((uv_handle_t*) &tcp_handle, NULL);
-}
-
-
-static void timer_cb(uv_timer_t* handle) {
- uv_buf_t buf = uv_buf_init("PING", 4);
- ASSERT(0 == uv_write(&write_req,
- (uv_stream_t*) &tcp_handle,
- &buf,
- 1,
- write_cb));
- ASSERT(0 == uv_read_stop((uv_stream_t*) &tcp_handle));
-}
-
-
-static void connect_cb(uv_connect_t* req, int status) {
- ASSERT(0 == status);
- ASSERT(0 == uv_timer_start(&timer_handle, timer_cb, 50, 0));
- ASSERT(0 == uv_read_start((uv_stream_t*) &tcp_handle,
- (uv_alloc_cb) fail_cb,
- (uv_read_cb) fail_cb));
-}
-
-
-TEST_IMPL(tcp_read_stop) {
- uv_connect_t connect_req;
- struct sockaddr_in addr;
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
- ASSERT(0 == uv_timer_init(uv_default_loop(), &timer_handle));
- ASSERT(0 == uv_tcp_init(uv_default_loop(), &tcp_handle));
- ASSERT(0 == uv_tcp_connect(&connect_req,
- &tcp_handle,
- (const struct sockaddr*) &addr,
- connect_cb));
- ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
- MAKE_VALGRIND_HAPPY();
-
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-tcp-shutdown-after-write.c b/3rdparty/libuv/test/test-tcp-shutdown-after-write.c
deleted file mode 100644
index 463b4b0d79c..00000000000
--- a/3rdparty/libuv/test/test-tcp-shutdown-after-write.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-static void write_cb(uv_write_t* req, int status);
-static void shutdown_cb(uv_shutdown_t* req, int status);
-
-static uv_tcp_t conn;
-static uv_timer_t timer;
-static uv_connect_t connect_req;
-static uv_write_t write_req;
-static uv_shutdown_t shutdown_req;
-
-static int connect_cb_called;
-static int write_cb_called;
-static int shutdown_cb_called;
-
-static int conn_close_cb_called;
-static int timer_close_cb_called;
-
-
-static void close_cb(uv_handle_t* handle) {
- if (handle == (uv_handle_t*)&conn)
- conn_close_cb_called++;
- else if (handle == (uv_handle_t*)&timer)
- timer_close_cb_called++;
- else
- ASSERT(0 && "bad handle in close_cb");
-}
-
-
-static void alloc_cb(uv_handle_t* handle,
- size_t suggested_size,
- uv_buf_t* buf) {
- static char slab[64];
- buf->base = slab;
- buf->len = sizeof(slab);
-}
-
-
-static void timer_cb(uv_timer_t* handle) {
- uv_buf_t buf;
- int r;
-
- uv_close((uv_handle_t*)handle, close_cb);
-
- buf = uv_buf_init("TEST", 4);
- r = uv_write(&write_req, (uv_stream_t*)&conn, &buf, 1, write_cb);
- ASSERT(r == 0);
-
- r = uv_shutdown(&shutdown_req, (uv_stream_t*)&conn, shutdown_cb);
- ASSERT(r == 0);
-}
-
-
-static void read_cb(uv_stream_t* handle, ssize_t nread, const uv_buf_t* buf) {
-}
-
-
-static void connect_cb(uv_connect_t* req, int status) {
- int r;
-
- ASSERT(status == 0);
- connect_cb_called++;
-
- r = uv_read_start((uv_stream_t*)&conn, alloc_cb, read_cb);
- ASSERT(r == 0);
-}
-
-
-static void write_cb(uv_write_t* req, int status) {
- ASSERT(status == 0);
- write_cb_called++;
-}
-
-
-static void shutdown_cb(uv_shutdown_t* req, int status) {
- ASSERT(status == 0);
- shutdown_cb_called++;
- uv_close((uv_handle_t*)&conn, close_cb);
-}
-
-
-TEST_IMPL(tcp_shutdown_after_write) {
- struct sockaddr_in addr;
- uv_loop_t* loop;
- int r;
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
- loop = uv_default_loop();
-
- r = uv_timer_init(loop, &timer);
- ASSERT(r == 0);
-
- r = uv_timer_start(&timer, timer_cb, 125, 0);
- ASSERT(r == 0);
-
- r = uv_tcp_init(loop, &conn);
- ASSERT(r == 0);
-
- r = uv_tcp_connect(&connect_req,
- &conn,
- (const struct sockaddr*) &addr,
- connect_cb);
- ASSERT(r == 0);
-
- r = uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(connect_cb_called == 1);
- ASSERT(write_cb_called == 1);
- ASSERT(shutdown_cb_called == 1);
- ASSERT(conn_close_cb_called == 1);
- ASSERT(timer_close_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-tcp-try-write.c b/3rdparty/libuv/test/test-tcp-try-write.c
deleted file mode 100644
index 97a1d6e3d57..00000000000
--- a/3rdparty/libuv/test/test-tcp-try-write.c
+++ /dev/null
@@ -1,135 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#define MAX_BYTES 1024 * 1024
-
-static uv_tcp_t server;
-static uv_tcp_t client;
-static uv_tcp_t incoming;
-static int connect_cb_called;
-static int close_cb_called;
-static int connection_cb_called;
-static int bytes_read;
-static int bytes_written;
-
-
-static void close_cb(uv_handle_t* handle) {
- close_cb_called++;
-}
-
-
-static void connect_cb(uv_connect_t* req, int status) {
- int r;
- uv_buf_t buf;
- ASSERT(status == 0);
- connect_cb_called++;
-
- do {
- buf = uv_buf_init("PING", 4);
- r = uv_try_write((uv_stream_t*) &client, &buf, 1);
- ASSERT(r > 0 || r == UV_EAGAIN);
- if (r > 0) {
- bytes_written += r;
- break;
- }
- } while (1);
-
- do {
- buf = uv_buf_init("", 0);
- r = uv_try_write((uv_stream_t*) &client, &buf, 1);
- } while (r != 0);
- uv_close((uv_handle_t*) &client, close_cb);
-}
-
-
-static void alloc_cb(uv_handle_t* handle, size_t size, uv_buf_t* buf) {
- static char base[1024];
-
- buf->base = base;
- buf->len = sizeof(base);
-}
-
-
-static void read_cb(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* buf) {
- if (nread < 0) {
- uv_close((uv_handle_t*) tcp, close_cb);
- uv_close((uv_handle_t*) &server, close_cb);
- return;
- }
-
- bytes_read += nread;
-}
-
-
-static void connection_cb(uv_stream_t* tcp, int status) {
- ASSERT(status == 0);
-
- ASSERT(0 == uv_tcp_init(tcp->loop, &incoming));
- ASSERT(0 == uv_accept(tcp, (uv_stream_t*) &incoming));
-
- connection_cb_called++;
- ASSERT(0 == uv_read_start((uv_stream_t*) &incoming, alloc_cb, read_cb));
-}
-
-
-static void start_server(void) {
- struct sockaddr_in addr;
-
- ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr));
-
- ASSERT(0 == uv_tcp_init(uv_default_loop(), &server));
- ASSERT(0 == uv_tcp_bind(&server, (struct sockaddr*) &addr, 0));
- ASSERT(0 == uv_listen((uv_stream_t*) &server, 128, connection_cb));
-}
-
-
-TEST_IMPL(tcp_try_write) {
- uv_connect_t connect_req;
- struct sockaddr_in addr;
-
- start_server();
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
-
- ASSERT(0 == uv_tcp_init(uv_default_loop(), &client));
- ASSERT(0 == uv_tcp_connect(&connect_req,
- &client,
- (struct sockaddr*) &addr,
- connect_cb));
-
- ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
-
- ASSERT(connect_cb_called == 1);
- ASSERT(close_cb_called == 3);
- ASSERT(connection_cb_called == 1);
- ASSERT(bytes_read == bytes_written);
- ASSERT(bytes_written > 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-tcp-unexpected-read.c b/3rdparty/libuv/test/test-tcp-unexpected-read.c
deleted file mode 100644
index c7b981456be..00000000000
--- a/3rdparty/libuv/test/test-tcp-unexpected-read.c
+++ /dev/null
@@ -1,117 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-static uv_check_t check_handle;
-static uv_timer_t timer_handle;
-static uv_tcp_t server_handle;
-static uv_tcp_t client_handle;
-static uv_tcp_t peer_handle;
-static uv_write_t write_req;
-static uv_connect_t connect_req;
-
-static unsigned long ticks; /* event loop ticks */
-
-
-static void check_cb(uv_check_t* handle) {
- ticks++;
-}
-
-
-static void timer_cb(uv_timer_t* handle) {
- uv_close((uv_handle_t*) &check_handle, NULL);
- uv_close((uv_handle_t*) &timer_handle, NULL);
- uv_close((uv_handle_t*) &server_handle, NULL);
- uv_close((uv_handle_t*) &client_handle, NULL);
- uv_close((uv_handle_t*) &peer_handle, NULL);
-}
-
-
-static void alloc_cb(uv_handle_t* handle,
- size_t suggested_size,
- uv_buf_t* buf) {
- ASSERT(0 && "alloc_cb should not have been called");
-}
-
-
-static void read_cb(uv_stream_t* handle, ssize_t nread, const uv_buf_t* buf) {
- ASSERT(0 && "read_cb should not have been called");
-}
-
-
-static void connect_cb(uv_connect_t* req, int status) {
- ASSERT(req->handle == (uv_stream_t*) &client_handle);
- ASSERT(0 == status);
-}
-
-
-static void write_cb(uv_write_t* req, int status) {
- ASSERT(req->handle == (uv_stream_t*) &peer_handle);
- ASSERT(0 == status);
-}
-
-
-static void connection_cb(uv_stream_t* handle, int status) {
- uv_buf_t buf;
-
- buf = uv_buf_init("PING", 4);
-
- ASSERT(0 == status);
- ASSERT(0 == uv_accept(handle, (uv_stream_t*) &peer_handle));
- ASSERT(0 == uv_read_start((uv_stream_t*) &peer_handle, alloc_cb, read_cb));
- ASSERT(0 == uv_write(&write_req, (uv_stream_t*) &peer_handle,
- &buf, 1, write_cb));
-}
-
-
-TEST_IMPL(tcp_unexpected_read) {
- struct sockaddr_in addr;
- uv_loop_t* loop;
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
- loop = uv_default_loop();
-
- ASSERT(0 == uv_timer_init(loop, &timer_handle));
- ASSERT(0 == uv_timer_start(&timer_handle, timer_cb, 1000, 0));
- ASSERT(0 == uv_check_init(loop, &check_handle));
- ASSERT(0 == uv_check_start(&check_handle, check_cb));
- ASSERT(0 == uv_tcp_init(loop, &server_handle));
- ASSERT(0 == uv_tcp_init(loop, &client_handle));
- ASSERT(0 == uv_tcp_init(loop, &peer_handle));
- ASSERT(0 == uv_tcp_bind(&server_handle, (const struct sockaddr*) &addr, 0));
- ASSERT(0 == uv_listen((uv_stream_t*) &server_handle, 1, connection_cb));
- ASSERT(0 == uv_tcp_connect(&connect_req,
- &client_handle,
- (const struct sockaddr*) &addr,
- connect_cb));
- ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
-
- /* This is somewhat inexact but the idea is that the event loop should not
- * start busy looping when the server sends a message and the client isn't
- * reading.
- */
- ASSERT(ticks <= 20);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-tcp-write-after-connect.c b/3rdparty/libuv/test/test-tcp-write-after-connect.c
deleted file mode 100644
index aa03228f134..00000000000
--- a/3rdparty/libuv/test/test-tcp-write-after-connect.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#ifndef _WIN32
-
-#include "uv.h"
-#include "task.h"
-
-uv_loop_t loop;
-uv_tcp_t tcp_client;
-uv_connect_t connection_request;
-uv_write_t write_request;
-uv_buf_t buf = { "HELLO", 4 };
-
-
-static void write_cb(uv_write_t *req, int status) {
- ASSERT(status == UV_ECANCELED);
- uv_close((uv_handle_t*) req->handle, NULL);
-}
-
-
-static void connect_cb(uv_connect_t *req, int status) {
- ASSERT(status == UV_ECONNREFUSED);
-}
-
-
-TEST_IMPL(tcp_write_after_connect) {
- struct sockaddr_in sa;
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &sa));
- ASSERT(0 == uv_loop_init(&loop));
- ASSERT(0 == uv_tcp_init(&loop, &tcp_client));
-
- ASSERT(0 == uv_tcp_connect(&connection_request,
- &tcp_client,
- (const struct sockaddr *)
- &sa,
- connect_cb));
-
- ASSERT(0 == uv_write(&write_request,
- (uv_stream_t *)&tcp_client,
- &buf, 1,
- write_cb));
-
- uv_run(&loop, UV_RUN_DEFAULT);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-#endif
diff --git a/3rdparty/libuv/test/test-tcp-write-fail.c b/3rdparty/libuv/test/test-tcp-write-fail.c
deleted file mode 100644
index 5256a9f4a79..00000000000
--- a/3rdparty/libuv/test/test-tcp-write-fail.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-#include <stdio.h>
-#include <stdlib.h>
-#ifndef _WIN32
-# include <unistd.h>
-#endif
-
-
-static int connect_cb_called = 0;
-static int write_cb_called = 0;
-static int close_cb_called = 0;
-
-static uv_connect_t connect_req;
-static uv_write_t write_req;
-
-
-static void close_socket(uv_tcp_t* sock) {
- uv_os_fd_t fd;
- int r;
-
- r = uv_fileno((uv_handle_t*)sock, &fd);
- ASSERT(r == 0);
-#ifdef _WIN32
- r = closesocket((uv_os_sock_t)fd);
-#else
- r = close(fd);
-#endif
- ASSERT(r == 0);
-}
-
-
-static void close_cb(uv_handle_t* handle) {
- ASSERT(handle != NULL);
- close_cb_called++;
-}
-
-
-static void write_cb(uv_write_t* req, int status) {
- ASSERT(req != NULL);
-
- ASSERT(status != 0);
- fprintf(stderr, "uv_write error: %s\n", uv_strerror(status));
- write_cb_called++;
-
- uv_close((uv_handle_t*)(req->handle), close_cb);
-}
-
-
-static void connect_cb(uv_connect_t* req, int status) {
- uv_buf_t buf;
- uv_stream_t* stream;
- int r;
-
- ASSERT(req == &connect_req);
- ASSERT(status == 0);
-
- stream = req->handle;
- connect_cb_called++;
-
- /* close the socket, the hard way */
- close_socket((uv_tcp_t*)stream);
-
- buf = uv_buf_init("hello\n", 6);
- r = uv_write(&write_req, stream, &buf, 1, write_cb);
- ASSERT(r == 0);
-}
-
-
-TEST_IMPL(tcp_write_fail) {
- struct sockaddr_in addr;
- uv_tcp_t client;
- int r;
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
-
- r = uv_tcp_init(uv_default_loop(), &client);
- ASSERT(r == 0);
-
- r = uv_tcp_connect(&connect_req,
- &client,
- (const struct sockaddr*) &addr,
- connect_cb);
- ASSERT(r == 0);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(connect_cb_called == 1);
- ASSERT(write_cb_called == 1);
- ASSERT(close_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-tcp-write-queue-order.c b/3rdparty/libuv/test/test-tcp-write-queue-order.c
deleted file mode 100644
index aa4d2acc24a..00000000000
--- a/3rdparty/libuv/test/test-tcp-write-queue-order.c
+++ /dev/null
@@ -1,137 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "uv.h"
-#include "task.h"
-
-#define REQ_COUNT 10000
-
-static uv_timer_t timer;
-static uv_tcp_t server;
-static uv_tcp_t client;
-static uv_tcp_t incoming;
-static int connect_cb_called;
-static int close_cb_called;
-static int connection_cb_called;
-static int write_callbacks;
-static int write_cancelled_callbacks;
-static int write_error_callbacks;
-
-static uv_write_t write_requests[REQ_COUNT];
-
-
-static void close_cb(uv_handle_t* handle) {
- close_cb_called++;
-}
-
-void timer_cb(uv_timer_t* handle) {
- uv_close((uv_handle_t*) &client, close_cb);
- uv_close((uv_handle_t*) &server, close_cb);
- uv_close((uv_handle_t*) &incoming, close_cb);
-}
-
-void write_cb(uv_write_t* req, int status) {
- if (status == 0)
- write_callbacks++;
- else if (status == UV_ECANCELED)
- write_cancelled_callbacks++;
- else
- write_error_callbacks++;
-}
-
-static void connect_cb(uv_connect_t* req, int status) {
- static char base[1024];
- int r;
- int i;
- uv_buf_t buf;
-
- ASSERT(status == 0);
- connect_cb_called++;
-
- buf = uv_buf_init(base, sizeof(base));
-
- for (i = 0; i < REQ_COUNT; i++) {
- r = uv_write(&write_requests[i],
- req->handle,
- &buf,
- 1,
- write_cb);
- ASSERT(r == 0);
- }
-}
-
-
-static void connection_cb(uv_stream_t* tcp, int status) {
- ASSERT(status == 0);
-
- ASSERT(0 == uv_tcp_init(tcp->loop, &incoming));
- ASSERT(0 == uv_accept(tcp, (uv_stream_t*) &incoming));
-
- connection_cb_called++;
-}
-
-
-static void start_server(void) {
- struct sockaddr_in addr;
-
- ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr));
-
- ASSERT(0 == uv_tcp_init(uv_default_loop(), &server));
- ASSERT(0 == uv_tcp_bind(&server, (struct sockaddr*) &addr, 0));
- ASSERT(0 == uv_listen((uv_stream_t*) &server, 128, connection_cb));
-}
-
-
-TEST_IMPL(tcp_write_queue_order) {
- uv_connect_t connect_req;
- struct sockaddr_in addr;
-
- start_server();
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
-
- ASSERT(0 == uv_tcp_init(uv_default_loop(), &client));
- ASSERT(0 == uv_tcp_connect(&connect_req,
- &client,
- (struct sockaddr*) &addr,
- connect_cb));
-
- ASSERT(0 == uv_timer_init(uv_default_loop(), &timer));
- ASSERT(0 == uv_timer_start(&timer, timer_cb, 100, 0));
-
- ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
-
- ASSERT(connect_cb_called == 1);
- ASSERT(connection_cb_called == 1);
- ASSERT(write_callbacks > 0);
- ASSERT(write_cancelled_callbacks > 0);
- ASSERT(write_callbacks +
- write_error_callbacks +
- write_cancelled_callbacks == REQ_COUNT);
- ASSERT(close_cb_called == 3);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-tcp-write-to-half-open-connection.c b/3rdparty/libuv/test/test-tcp-write-to-half-open-connection.c
deleted file mode 100644
index 2fa2ae72253..00000000000
--- a/3rdparty/libuv/test/test-tcp-write-to-half-open-connection.c
+++ /dev/null
@@ -1,141 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-static void connection_cb(uv_stream_t* server, int status);
-static void connect_cb(uv_connect_t* req, int status);
-static void write_cb(uv_write_t* req, int status);
-static void read_cb(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf);
-static void alloc_cb(uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf);
-
-static uv_tcp_t tcp_server;
-static uv_tcp_t tcp_client;
-static uv_tcp_t tcp_peer; /* client socket as accept()-ed by server */
-static uv_connect_t connect_req;
-static uv_write_t write_req;
-
-static int write_cb_called;
-static int read_cb_called;
-
-static void connection_cb(uv_stream_t* server, int status) {
- int r;
- uv_buf_t buf;
-
- ASSERT(server == (uv_stream_t*)&tcp_server);
- ASSERT(status == 0);
-
- r = uv_tcp_init(server->loop, &tcp_peer);
- ASSERT(r == 0);
-
- r = uv_accept(server, (uv_stream_t*)&tcp_peer);
- ASSERT(r == 0);
-
- r = uv_read_start((uv_stream_t*)&tcp_peer, alloc_cb, read_cb);
- ASSERT(r == 0);
-
- buf.base = "hello\n";
- buf.len = 6;
-
- r = uv_write(&write_req, (uv_stream_t*)&tcp_peer, &buf, 1, write_cb);
- ASSERT(r == 0);
-}
-
-
-static void alloc_cb(uv_handle_t* handle,
- size_t suggested_size,
- uv_buf_t* buf) {
- static char slab[1024];
- buf->base = slab;
- buf->len = sizeof(slab);
-}
-
-
-static void read_cb(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf) {
- if (nread < 0) {
- fprintf(stderr, "read_cb error: %s\n", uv_err_name(nread));
- ASSERT(nread == UV_ECONNRESET || nread == UV_EOF);
-
- uv_close((uv_handle_t*)&tcp_server, NULL);
- uv_close((uv_handle_t*)&tcp_peer, NULL);
- }
-
- read_cb_called++;
-}
-
-
-static void connect_cb(uv_connect_t* req, int status) {
- ASSERT(req == &connect_req);
- ASSERT(status == 0);
-
- /* Close the client. */
- uv_close((uv_handle_t*)&tcp_client, NULL);
-}
-
-
-static void write_cb(uv_write_t* req, int status) {
- ASSERT(status == 0);
- write_cb_called++;
-}
-
-
-TEST_IMPL(tcp_write_to_half_open_connection) {
- struct sockaddr_in addr;
- uv_loop_t* loop;
- int r;
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
-
- loop = uv_default_loop();
- ASSERT(loop != NULL);
-
- r = uv_tcp_init(loop, &tcp_server);
- ASSERT(r == 0);
-
- r = uv_tcp_bind(&tcp_server, (const struct sockaddr*) &addr, 0);
- ASSERT(r == 0);
-
- r = uv_listen((uv_stream_t*)&tcp_server, 1, connection_cb);
- ASSERT(r == 0);
-
- r = uv_tcp_init(loop, &tcp_client);
- ASSERT(r == 0);
-
- r = uv_tcp_connect(&connect_req,
- &tcp_client,
- (const struct sockaddr*) &addr,
- connect_cb);
- ASSERT(r == 0);
-
- r = uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(write_cb_called > 0);
- ASSERT(read_cb_called > 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-tcp-writealot.c b/3rdparty/libuv/test/test-tcp-writealot.c
deleted file mode 100644
index 6cfe2ebb18d..00000000000
--- a/3rdparty/libuv/test/test-tcp-writealot.c
+++ /dev/null
@@ -1,176 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-
-#define WRITES 3
-#define CHUNKS_PER_WRITE 4096
-#define CHUNK_SIZE 10024 /* 10 kb */
-
-#define TOTAL_BYTES (WRITES * CHUNKS_PER_WRITE * CHUNK_SIZE)
-
-static char* send_buffer;
-
-static int shutdown_cb_called = 0;
-static int connect_cb_called = 0;
-static int write_cb_called = 0;
-static int close_cb_called = 0;
-static size_t bytes_sent = 0;
-static size_t bytes_sent_done = 0;
-static size_t bytes_received_done = 0;
-
-static uv_connect_t connect_req;
-static uv_shutdown_t shutdown_req;
-static uv_write_t write_reqs[WRITES];
-
-
-static void alloc_cb(uv_handle_t* handle, size_t size, uv_buf_t* buf) {
- buf->base = malloc(size);
- buf->len = size;
-}
-
-
-static void close_cb(uv_handle_t* handle) {
- ASSERT(handle != NULL);
- close_cb_called++;
-}
-
-
-static void shutdown_cb(uv_shutdown_t* req, int status) {
- uv_tcp_t* tcp;
-
- ASSERT(req == &shutdown_req);
- ASSERT(status == 0);
-
- tcp = (uv_tcp_t*)(req->handle);
-
- /* The write buffer should be empty by now. */
- ASSERT(tcp->write_queue_size == 0);
-
- /* Now we wait for the EOF */
- shutdown_cb_called++;
-
- /* We should have had all the writes called already. */
- ASSERT(write_cb_called == WRITES);
-}
-
-
-static void read_cb(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* buf) {
- ASSERT(tcp != NULL);
-
- if (nread >= 0) {
- bytes_received_done += nread;
- }
- else {
- ASSERT(nread == UV_EOF);
- printf("GOT EOF\n");
- uv_close((uv_handle_t*)tcp, close_cb);
- }
-
- free(buf->base);
-}
-
-
-static void write_cb(uv_write_t* req, int status) {
- ASSERT(req != NULL);
-
- if (status) {
- fprintf(stderr, "uv_write error: %s\n", uv_strerror(status));
- ASSERT(0);
- }
-
- bytes_sent_done += CHUNKS_PER_WRITE * CHUNK_SIZE;
- write_cb_called++;
-}
-
-
-static void connect_cb(uv_connect_t* req, int status) {
- uv_buf_t send_bufs[CHUNKS_PER_WRITE];
- uv_stream_t* stream;
- int i, j, r;
-
- ASSERT(req == &connect_req);
- ASSERT(status == 0);
-
- stream = req->handle;
- connect_cb_called++;
-
- /* Write a lot of data */
- for (i = 0; i < WRITES; i++) {
- uv_write_t* write_req = write_reqs + i;
-
- for (j = 0; j < CHUNKS_PER_WRITE; j++) {
- send_bufs[j] = uv_buf_init(send_buffer + bytes_sent, CHUNK_SIZE);
- bytes_sent += CHUNK_SIZE;
- }
-
- r = uv_write(write_req, stream, send_bufs, CHUNKS_PER_WRITE, write_cb);
- ASSERT(r == 0);
- }
-
- /* Shutdown on drain. */
- r = uv_shutdown(&shutdown_req, stream, shutdown_cb);
- ASSERT(r == 0);
-
- /* Start reading */
- r = uv_read_start(stream, alloc_cb, read_cb);
- ASSERT(r == 0);
-}
-
-
-TEST_IMPL(tcp_writealot) {
- struct sockaddr_in addr;
- uv_tcp_t client;
- int r;
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
-
- send_buffer = calloc(1, TOTAL_BYTES);
- ASSERT(send_buffer != NULL);
-
- r = uv_tcp_init(uv_default_loop(), &client);
- ASSERT(r == 0);
-
- r = uv_tcp_connect(&connect_req,
- &client,
- (const struct sockaddr*) &addr,
- connect_cb);
- ASSERT(r == 0);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(shutdown_cb_called == 1);
- ASSERT(connect_cb_called == 1);
- ASSERT(write_cb_called == WRITES);
- ASSERT(close_cb_called == 1);
- ASSERT(bytes_sent == TOTAL_BYTES);
- ASSERT(bytes_sent_done == TOTAL_BYTES);
- ASSERT(bytes_received_done == TOTAL_BYTES);
-
- free(send_buffer);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-thread-equal.c b/3rdparty/libuv/test/test-thread-equal.c
deleted file mode 100644
index 27c07ee2c7d..00000000000
--- a/3rdparty/libuv/test/test-thread-equal.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-uv_thread_t main_thread_id;
-uv_thread_t subthreads[2];
-
-static void check_thread(void* arg) {
- uv_thread_t *thread_id = arg;
- uv_thread_t self_id = uv_thread_self();
- ASSERT(uv_thread_equal(&main_thread_id, &self_id) == 0);
- *thread_id = uv_thread_self();
-}
-
-TEST_IMPL(thread_equal) {
- uv_thread_t threads[2];
- main_thread_id = uv_thread_self();
- ASSERT(0 != uv_thread_equal(&main_thread_id, &main_thread_id));
- ASSERT(0 == uv_thread_create(threads + 0, check_thread, subthreads + 0));
- ASSERT(0 == uv_thread_create(threads + 1, check_thread, subthreads + 1));
- ASSERT(0 == uv_thread_join(threads + 0));
- ASSERT(0 == uv_thread_join(threads + 1));
- ASSERT(0 == uv_thread_equal(subthreads + 0, subthreads + 1));
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-thread.c b/3rdparty/libuv/test/test-thread.c
deleted file mode 100644
index 7f3321aa06d..00000000000
--- a/3rdparty/libuv/test/test-thread.c
+++ /dev/null
@@ -1,211 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h> /* memset */
-
-struct getaddrinfo_req {
- uv_thread_t thread_id;
- unsigned int counter;
- uv_loop_t* loop;
- uv_getaddrinfo_t handle;
-};
-
-
-struct fs_req {
- uv_thread_t thread_id;
- unsigned int counter;
- uv_loop_t* loop;
- uv_fs_t handle;
-};
-
-
-struct test_thread {
- uv_thread_t thread_id;
- volatile int thread_called;
-};
-
-static void getaddrinfo_do(struct getaddrinfo_req* req);
-static void getaddrinfo_cb(uv_getaddrinfo_t* handle,
- int status,
- struct addrinfo* res);
-static void fs_do(struct fs_req* req);
-static void fs_cb(uv_fs_t* handle);
-
-static volatile int thread_called;
-static uv_key_t tls_key;
-
-
-static void getaddrinfo_do(struct getaddrinfo_req* req) {
- int r;
-
- r = uv_getaddrinfo(req->loop,
- &req->handle,
- getaddrinfo_cb,
- "localhost",
- NULL,
- NULL);
- ASSERT(r == 0);
-}
-
-
-static void getaddrinfo_cb(uv_getaddrinfo_t* handle,
- int status,
- struct addrinfo* res) {
- struct getaddrinfo_req* req;
-
- ASSERT(status == 0);
-
- req = container_of(handle, struct getaddrinfo_req, handle);
- uv_freeaddrinfo(res);
-
- if (--req->counter)
- getaddrinfo_do(req);
-}
-
-
-static void fs_do(struct fs_req* req) {
- int r;
-
- r = uv_fs_stat(req->loop, &req->handle, ".", fs_cb);
- ASSERT(r == 0);
-}
-
-
-static void fs_cb(uv_fs_t* handle) {
- struct fs_req* req = container_of(handle, struct fs_req, handle);
-
- uv_fs_req_cleanup(handle);
-
- if (--req->counter)
- fs_do(req);
-}
-
-
-static void do_work(void* arg) {
- struct getaddrinfo_req getaddrinfo_reqs[16];
- struct fs_req fs_reqs[16];
- uv_loop_t* loop;
- size_t i;
- int r;
- struct test_thread* thread = arg;
-
- loop = malloc(sizeof *loop);
- ASSERT(loop != NULL);
- ASSERT(0 == uv_loop_init(loop));
-
- for (i = 0; i < ARRAY_SIZE(getaddrinfo_reqs); i++) {
- struct getaddrinfo_req* req = getaddrinfo_reqs + i;
- req->counter = 16;
- req->loop = loop;
- getaddrinfo_do(req);
- }
-
- for (i = 0; i < ARRAY_SIZE(fs_reqs); i++) {
- struct fs_req* req = fs_reqs + i;
- req->counter = 16;
- req->loop = loop;
- fs_do(req);
- }
-
- r = uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(0 == uv_loop_close(loop));
- free(loop);
- thread->thread_called = 1;
-}
-
-
-static void thread_entry(void* arg) {
- ASSERT(arg == (void *) 42);
- thread_called++;
-}
-
-
-TEST_IMPL(thread_create) {
- uv_thread_t tid;
- int r;
-
- r = uv_thread_create(&tid, thread_entry, (void *) 42);
- ASSERT(r == 0);
-
- r = uv_thread_join(&tid);
- ASSERT(r == 0);
-
- ASSERT(thread_called == 1);
-
- return 0;
-}
-
-
-/* Hilariously bad test name. Run a lot of tasks in the thread pool and verify
- * that each "finished" callback is run in its originating thread.
- */
-TEST_IMPL(threadpool_multiple_event_loops) {
- struct test_thread threads[8];
- size_t i;
- int r;
-
- memset(threads, 0, sizeof(threads));
-
- for (i = 0; i < ARRAY_SIZE(threads); i++) {
- r = uv_thread_create(&threads[i].thread_id, do_work, &threads[i]);
- ASSERT(r == 0);
- }
-
- for (i = 0; i < ARRAY_SIZE(threads); i++) {
- r = uv_thread_join(&threads[i].thread_id);
- ASSERT(r == 0);
- ASSERT(threads[i].thread_called);
- }
-
- return 0;
-}
-
-
-static void tls_thread(void* arg) {
- ASSERT(NULL == uv_key_get(&tls_key));
- uv_key_set(&tls_key, arg);
- ASSERT(arg == uv_key_get(&tls_key));
- uv_key_set(&tls_key, NULL);
- ASSERT(NULL == uv_key_get(&tls_key));
-}
-
-
-TEST_IMPL(thread_local_storage) {
- char name[] = "main";
- uv_thread_t threads[2];
- ASSERT(0 == uv_key_create(&tls_key));
- ASSERT(NULL == uv_key_get(&tls_key));
- uv_key_set(&tls_key, name);
- ASSERT(name == uv_key_get(&tls_key));
- ASSERT(0 == uv_thread_create(threads + 0, tls_thread, threads + 0));
- ASSERT(0 == uv_thread_create(threads + 1, tls_thread, threads + 1));
- ASSERT(0 == uv_thread_join(threads + 0));
- ASSERT(0 == uv_thread_join(threads + 1));
- uv_key_delete(&tls_key);
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-threadpool-cancel.c b/3rdparty/libuv/test/test-threadpool-cancel.c
deleted file mode 100644
index 784c1739f6d..00000000000
--- a/3rdparty/libuv/test/test-threadpool-cancel.c
+++ /dev/null
@@ -1,362 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#define INIT_CANCEL_INFO(ci, what) \
- do { \
- (ci)->reqs = (what); \
- (ci)->nreqs = ARRAY_SIZE(what); \
- (ci)->stride = sizeof((what)[0]); \
- } \
- while (0)
-
-struct cancel_info {
- void* reqs;
- unsigned nreqs;
- unsigned stride;
- uv_timer_t timer_handle;
-};
-
-static uv_cond_t signal_cond;
-static uv_mutex_t signal_mutex;
-static uv_mutex_t wait_mutex;
-static unsigned num_threads;
-static unsigned fs_cb_called;
-static unsigned work_cb_called;
-static unsigned done_cb_called;
-static unsigned done2_cb_called;
-static unsigned timer_cb_called;
-
-
-static void work_cb(uv_work_t* req) {
- uv_mutex_lock(&signal_mutex);
- uv_cond_signal(&signal_cond);
- uv_mutex_unlock(&signal_mutex);
-
- uv_mutex_lock(&wait_mutex);
- uv_mutex_unlock(&wait_mutex);
-
- work_cb_called++;
-}
-
-
-static void done_cb(uv_work_t* req, int status) {
- done_cb_called++;
- free(req);
-}
-
-
-static void saturate_threadpool(void) {
- uv_work_t* req;
-
- ASSERT(0 == uv_cond_init(&signal_cond));
- ASSERT(0 == uv_mutex_init(&signal_mutex));
- ASSERT(0 == uv_mutex_init(&wait_mutex));
-
- uv_mutex_lock(&signal_mutex);
- uv_mutex_lock(&wait_mutex);
-
- for (num_threads = 0; /* empty */; num_threads++) {
- req = malloc(sizeof(*req));
- ASSERT(req != NULL);
- ASSERT(0 == uv_queue_work(uv_default_loop(), req, work_cb, done_cb));
-
- /* Expect to get signalled within 350 ms, otherwise assume that
- * the thread pool is saturated. As with any timing dependent test,
- * this is obviously not ideal.
- */
- if (uv_cond_timedwait(&signal_cond,
- &signal_mutex,
- (uint64_t) (350 * 1e6))) {
- ASSERT(0 == uv_cancel((uv_req_t*) req));
- break;
- }
- }
-}
-
-
-static void unblock_threadpool(void) {
- uv_mutex_unlock(&signal_mutex);
- uv_mutex_unlock(&wait_mutex);
-}
-
-
-static void cleanup_threadpool(void) {
- ASSERT(done_cb_called == num_threads + 1); /* +1 == cancelled work req. */
- ASSERT(work_cb_called == num_threads);
-
- uv_cond_destroy(&signal_cond);
- uv_mutex_destroy(&signal_mutex);
- uv_mutex_destroy(&wait_mutex);
-}
-
-
-static void fs_cb(uv_fs_t* req) {
- ASSERT(req->result == UV_ECANCELED);
- uv_fs_req_cleanup(req);
- fs_cb_called++;
-}
-
-
-static void getaddrinfo_cb(uv_getaddrinfo_t* req,
- int status,
- struct addrinfo* res) {
- ASSERT(status == UV_EAI_CANCELED);
- ASSERT(res == NULL);
- uv_freeaddrinfo(res); /* Should not crash. */
-}
-
-
-static void getnameinfo_cb(uv_getnameinfo_t* handle,
- int status,
- const char* hostname,
- const char* service) {
- ASSERT(status == UV_EAI_CANCELED);
- ASSERT(hostname == NULL);
- ASSERT(service == NULL);
-}
-
-
-static void work2_cb(uv_work_t* req) {
- ASSERT(0 && "work2_cb called");
-}
-
-
-static void done2_cb(uv_work_t* req, int status) {
- ASSERT(status == UV_ECANCELED);
- done2_cb_called++;
-}
-
-
-static void timer_cb(uv_timer_t* handle) {
- struct cancel_info* ci;
- uv_req_t* req;
- unsigned i;
-
- ci = container_of(handle, struct cancel_info, timer_handle);
-
- for (i = 0; i < ci->nreqs; i++) {
- req = (uv_req_t*) ((char*) ci->reqs + i * ci->stride);
- ASSERT(0 == uv_cancel(req));
- }
-
- uv_close((uv_handle_t*) &ci->timer_handle, NULL);
- unblock_threadpool();
- timer_cb_called++;
-}
-
-
-static void nop_work_cb(uv_work_t* req) {
-}
-
-
-static void nop_done_cb(uv_work_t* req, int status) {
- req->data = "OK";
-}
-
-
-TEST_IMPL(threadpool_cancel_getaddrinfo) {
- uv_getaddrinfo_t reqs[4];
- struct cancel_info ci;
- struct addrinfo hints;
- uv_loop_t* loop;
- int r;
-
- INIT_CANCEL_INFO(&ci, reqs);
- loop = uv_default_loop();
- saturate_threadpool();
-
- r = uv_getaddrinfo(loop, reqs + 0, getaddrinfo_cb, "fail", NULL, NULL);
- ASSERT(r == 0);
-
- r = uv_getaddrinfo(loop, reqs + 1, getaddrinfo_cb, NULL, "fail", NULL);
- ASSERT(r == 0);
-
- r = uv_getaddrinfo(loop, reqs + 2, getaddrinfo_cb, "fail", "fail", NULL);
- ASSERT(r == 0);
-
- r = uv_getaddrinfo(loop, reqs + 3, getaddrinfo_cb, "fail", NULL, &hints);
- ASSERT(r == 0);
-
- ASSERT(0 == uv_timer_init(loop, &ci.timer_handle));
- ASSERT(0 == uv_timer_start(&ci.timer_handle, timer_cb, 10, 0));
- ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
- ASSERT(1 == timer_cb_called);
-
- cleanup_threadpool();
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(threadpool_cancel_getnameinfo) {
- uv_getnameinfo_t reqs[4];
- struct sockaddr_in addr4;
- struct cancel_info ci;
- uv_loop_t* loop;
- int r;
-
- r = uv_ip4_addr("127.0.0.1", 80, &addr4);
- ASSERT(r == 0);
-
- INIT_CANCEL_INFO(&ci, reqs);
- loop = uv_default_loop();
- saturate_threadpool();
-
- r = uv_getnameinfo(loop, reqs + 0, getnameinfo_cb, (const struct sockaddr*)&addr4, 0);
- ASSERT(r == 0);
-
- r = uv_getnameinfo(loop, reqs + 1, getnameinfo_cb, (const struct sockaddr*)&addr4, 0);
- ASSERT(r == 0);
-
- r = uv_getnameinfo(loop, reqs + 2, getnameinfo_cb, (const struct sockaddr*)&addr4, 0);
- ASSERT(r == 0);
-
- r = uv_getnameinfo(loop, reqs + 3, getnameinfo_cb, (const struct sockaddr*)&addr4, 0);
- ASSERT(r == 0);
-
- ASSERT(0 == uv_timer_init(loop, &ci.timer_handle));
- ASSERT(0 == uv_timer_start(&ci.timer_handle, timer_cb, 10, 0));
- ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
- ASSERT(1 == timer_cb_called);
-
- cleanup_threadpool();
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(threadpool_cancel_work) {
- struct cancel_info ci;
- uv_work_t reqs[16];
- uv_loop_t* loop;
- unsigned i;
-
- INIT_CANCEL_INFO(&ci, reqs);
- loop = uv_default_loop();
- saturate_threadpool();
-
- for (i = 0; i < ARRAY_SIZE(reqs); i++)
- ASSERT(0 == uv_queue_work(loop, reqs + i, work2_cb, done2_cb));
-
- ASSERT(0 == uv_timer_init(loop, &ci.timer_handle));
- ASSERT(0 == uv_timer_start(&ci.timer_handle, timer_cb, 10, 0));
- ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
- ASSERT(1 == timer_cb_called);
- ASSERT(ARRAY_SIZE(reqs) == done2_cb_called);
-
- cleanup_threadpool();
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(threadpool_cancel_fs) {
- struct cancel_info ci;
- uv_fs_t reqs[26];
- uv_loop_t* loop;
- unsigned n;
- uv_buf_t iov;
-
- INIT_CANCEL_INFO(&ci, reqs);
- loop = uv_default_loop();
- saturate_threadpool();
- iov = uv_buf_init(NULL, 0);
-
- /* Needs to match ARRAY_SIZE(fs_reqs). */
- n = 0;
- ASSERT(0 == uv_fs_chmod(loop, reqs + n++, "/", 0, fs_cb));
- ASSERT(0 == uv_fs_chown(loop, reqs + n++, "/", 0, 0, fs_cb));
- ASSERT(0 == uv_fs_close(loop, reqs + n++, 0, fs_cb));
- ASSERT(0 == uv_fs_fchmod(loop, reqs + n++, 0, 0, fs_cb));
- ASSERT(0 == uv_fs_fchown(loop, reqs + n++, 0, 0, 0, fs_cb));
- ASSERT(0 == uv_fs_fdatasync(loop, reqs + n++, 0, fs_cb));
- ASSERT(0 == uv_fs_fstat(loop, reqs + n++, 0, fs_cb));
- ASSERT(0 == uv_fs_fsync(loop, reqs + n++, 0, fs_cb));
- ASSERT(0 == uv_fs_ftruncate(loop, reqs + n++, 0, 0, fs_cb));
- ASSERT(0 == uv_fs_futime(loop, reqs + n++, 0, 0, 0, fs_cb));
- ASSERT(0 == uv_fs_link(loop, reqs + n++, "/", "/", fs_cb));
- ASSERT(0 == uv_fs_lstat(loop, reqs + n++, "/", fs_cb));
- ASSERT(0 == uv_fs_mkdir(loop, reqs + n++, "/", 0, fs_cb));
- ASSERT(0 == uv_fs_open(loop, reqs + n++, "/", 0, 0, fs_cb));
- ASSERT(0 == uv_fs_read(loop, reqs + n++, 0, &iov, 1, 0, fs_cb));
- ASSERT(0 == uv_fs_scandir(loop, reqs + n++, "/", 0, fs_cb));
- ASSERT(0 == uv_fs_readlink(loop, reqs + n++, "/", fs_cb));
- ASSERT(0 == uv_fs_realpath(loop, reqs + n++, "/", fs_cb));
- ASSERT(0 == uv_fs_rename(loop, reqs + n++, "/", "/", fs_cb));
- ASSERT(0 == uv_fs_mkdir(loop, reqs + n++, "/", 0, fs_cb));
- ASSERT(0 == uv_fs_sendfile(loop, reqs + n++, 0, 0, 0, 0, fs_cb));
- ASSERT(0 == uv_fs_stat(loop, reqs + n++, "/", fs_cb));
- ASSERT(0 == uv_fs_symlink(loop, reqs + n++, "/", "/", 0, fs_cb));
- ASSERT(0 == uv_fs_unlink(loop, reqs + n++, "/", fs_cb));
- ASSERT(0 == uv_fs_utime(loop, reqs + n++, "/", 0, 0, fs_cb));
- ASSERT(0 == uv_fs_write(loop, reqs + n++, 0, &iov, 1, 0, fs_cb));
- ASSERT(n == ARRAY_SIZE(reqs));
-
- ASSERT(0 == uv_timer_init(loop, &ci.timer_handle));
- ASSERT(0 == uv_timer_start(&ci.timer_handle, timer_cb, 10, 0));
- ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
- ASSERT(n == fs_cb_called);
- ASSERT(1 == timer_cb_called);
-
- cleanup_threadpool();
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(threadpool_cancel_single) {
- uv_loop_t* loop;
- uv_work_t req;
- int cancelled;
- int i;
-
- loop = uv_default_loop();
- for (i = 0; i < 5000; i++) {
- req.data = NULL;
- ASSERT(0 == uv_queue_work(loop, &req, nop_work_cb, nop_done_cb));
-
- cancelled = uv_cancel((uv_req_t*) &req);
- if (cancelled == 0)
- break;
-
- ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
- }
-
- if (cancelled != 0) {
- fputs("Failed to cancel a work req in 5,000 iterations, giving up.\n",
- stderr);
- return 1;
- }
-
- ASSERT(req.data == NULL);
- ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
- ASSERT(req.data != NULL); /* Should have been updated by nop_done_cb(). */
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-threadpool.c b/3rdparty/libuv/test/test-threadpool.c
deleted file mode 100644
index e3d17d7546f..00000000000
--- a/3rdparty/libuv/test/test-threadpool.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-static int work_cb_count;
-static int after_work_cb_count;
-static uv_work_t work_req;
-static char data;
-
-
-static void work_cb(uv_work_t* req) {
- ASSERT(req == &work_req);
- ASSERT(req->data == &data);
- work_cb_count++;
-}
-
-
-static void after_work_cb(uv_work_t* req, int status) {
- ASSERT(status == 0);
- ASSERT(req == &work_req);
- ASSERT(req->data == &data);
- after_work_cb_count++;
-}
-
-
-TEST_IMPL(threadpool_queue_work_simple) {
- int r;
-
- work_req.data = &data;
- r = uv_queue_work(uv_default_loop(), &work_req, work_cb, after_work_cb);
- ASSERT(r == 0);
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(work_cb_count == 1);
- ASSERT(after_work_cb_count == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(threadpool_queue_work_einval) {
- int r;
-
- work_req.data = &data;
- r = uv_queue_work(uv_default_loop(), &work_req, NULL, after_work_cb);
- ASSERT(r == UV_EINVAL);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(work_cb_count == 0);
- ASSERT(after_work_cb_count == 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-timer-again.c b/3rdparty/libuv/test/test-timer-again.c
deleted file mode 100644
index f93c509be5d..00000000000
--- a/3rdparty/libuv/test/test-timer-again.c
+++ /dev/null
@@ -1,141 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-
-static int close_cb_called = 0;
-static int repeat_1_cb_called = 0;
-static int repeat_2_cb_called = 0;
-
-static int repeat_2_cb_allowed = 0;
-
-static uv_timer_t dummy, repeat_1, repeat_2;
-
-static uint64_t start_time;
-
-
-static void close_cb(uv_handle_t* handle) {
- ASSERT(handle != NULL);
-
- close_cb_called++;
-}
-
-
-static void repeat_1_cb(uv_timer_t* handle) {
- int r;
-
- ASSERT(handle == &repeat_1);
- ASSERT(uv_timer_get_repeat((uv_timer_t*)handle) == 50);
-
- fprintf(stderr, "repeat_1_cb called after %ld ms\n",
- (long int)(uv_now(uv_default_loop()) - start_time));
- fflush(stderr);
-
- repeat_1_cb_called++;
-
- r = uv_timer_again(&repeat_2);
- ASSERT(r == 0);
-
- if (repeat_1_cb_called == 10) {
- uv_close((uv_handle_t*)handle, close_cb);
- /* We're not calling uv_timer_again on repeat_2 any more, so after this */
- /* timer_2_cb is expected. */
- repeat_2_cb_allowed = 1;
- return;
- }
-}
-
-
-static void repeat_2_cb(uv_timer_t* handle) {
- ASSERT(handle == &repeat_2);
- ASSERT(repeat_2_cb_allowed);
-
- fprintf(stderr, "repeat_2_cb called after %ld ms\n",
- (long int)(uv_now(uv_default_loop()) - start_time));
- fflush(stderr);
-
- repeat_2_cb_called++;
-
- if (uv_timer_get_repeat(&repeat_2) == 0) {
- ASSERT(0 == uv_is_active((uv_handle_t*) handle));
- uv_close((uv_handle_t*)handle, close_cb);
- return;
- }
-
- fprintf(stderr, "uv_timer_get_repeat %ld ms\n",
- (long int)uv_timer_get_repeat(&repeat_2));
- fflush(stderr);
- ASSERT(uv_timer_get_repeat(&repeat_2) == 100);
-
- /* This shouldn't take effect immediately. */
- uv_timer_set_repeat(&repeat_2, 0);
-}
-
-
-TEST_IMPL(timer_again) {
- int r;
-
- start_time = uv_now(uv_default_loop());
- ASSERT(0 < start_time);
-
- /* Verify that it is not possible to uv_timer_again a never-started timer. */
- r = uv_timer_init(uv_default_loop(), &dummy);
- ASSERT(r == 0);
- r = uv_timer_again(&dummy);
- ASSERT(r == UV_EINVAL);
- uv_unref((uv_handle_t*)&dummy);
-
- /* Start timer repeat_1. */
- r = uv_timer_init(uv_default_loop(), &repeat_1);
- ASSERT(r == 0);
- r = uv_timer_start(&repeat_1, repeat_1_cb, 50, 0);
- ASSERT(r == 0);
- ASSERT(uv_timer_get_repeat(&repeat_1) == 0);
-
- /* Actually make repeat_1 repeating. */
- uv_timer_set_repeat(&repeat_1, 50);
- ASSERT(uv_timer_get_repeat(&repeat_1) == 50);
-
- /*
- * Start another repeating timer. It'll be again()ed by the repeat_1 so
- * it should not time out until repeat_1 stops.
- */
- r = uv_timer_init(uv_default_loop(), &repeat_2);
- ASSERT(r == 0);
- r = uv_timer_start(&repeat_2, repeat_2_cb, 100, 100);
- ASSERT(r == 0);
- ASSERT(uv_timer_get_repeat(&repeat_2) == 100);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(repeat_1_cb_called == 10);
- ASSERT(repeat_2_cb_called == 2);
- ASSERT(close_cb_called == 2);
-
- fprintf(stderr, "Test took %ld ms (expected ~700 ms)\n",
- (long int)(uv_now(uv_default_loop()) - start_time));
- fflush(stderr);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-timer-from-check.c b/3rdparty/libuv/test/test-timer-from-check.c
deleted file mode 100644
index a18c7e1fb99..00000000000
--- a/3rdparty/libuv/test/test-timer-from-check.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-static uv_prepare_t prepare_handle;
-static uv_check_t check_handle;
-static uv_timer_t timer_handle;
-
-static int prepare_cb_called;
-static int check_cb_called;
-static int timer_cb_called;
-
-
-static void prepare_cb(uv_prepare_t* handle) {
- ASSERT(0 == uv_prepare_stop(&prepare_handle));
- ASSERT(0 == prepare_cb_called);
- ASSERT(1 == check_cb_called);
- ASSERT(0 == timer_cb_called);
- prepare_cb_called++;
-}
-
-
-static void timer_cb(uv_timer_t* handle) {
- ASSERT(0 == uv_timer_stop(&timer_handle));
- ASSERT(1 == prepare_cb_called);
- ASSERT(1 == check_cb_called);
- ASSERT(0 == timer_cb_called);
- timer_cb_called++;
-}
-
-
-static void check_cb(uv_check_t* handle) {
- ASSERT(0 == uv_check_stop(&check_handle));
- ASSERT(0 == uv_timer_stop(&timer_handle)); /* Runs before timer_cb. */
- ASSERT(0 == uv_timer_start(&timer_handle, timer_cb, 50, 0));
- ASSERT(0 == uv_prepare_start(&prepare_handle, prepare_cb));
- ASSERT(0 == prepare_cb_called);
- ASSERT(0 == check_cb_called);
- ASSERT(0 == timer_cb_called);
- check_cb_called++;
-}
-
-
-TEST_IMPL(timer_from_check) {
- ASSERT(0 == uv_prepare_init(uv_default_loop(), &prepare_handle));
- ASSERT(0 == uv_check_init(uv_default_loop(), &check_handle));
- ASSERT(0 == uv_check_start(&check_handle, check_cb));
- ASSERT(0 == uv_timer_init(uv_default_loop(), &timer_handle));
- ASSERT(0 == uv_timer_start(&timer_handle, timer_cb, 50, 0));
- ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
- ASSERT(1 == prepare_cb_called);
- ASSERT(1 == check_cb_called);
- ASSERT(1 == timer_cb_called);
- uv_close((uv_handle_t*) &prepare_handle, NULL);
- uv_close((uv_handle_t*) &check_handle, NULL);
- uv_close((uv_handle_t*) &timer_handle, NULL);
- ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_ONCE));
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-timer.c b/3rdparty/libuv/test/test-timer.c
deleted file mode 100644
index aba050fd64c..00000000000
--- a/3rdparty/libuv/test/test-timer.c
+++ /dev/null
@@ -1,303 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-
-static int once_cb_called = 0;
-static int once_close_cb_called = 0;
-static int repeat_cb_called = 0;
-static int repeat_close_cb_called = 0;
-static int order_cb_called = 0;
-static uint64_t start_time;
-static uv_timer_t tiny_timer;
-static uv_timer_t huge_timer1;
-static uv_timer_t huge_timer2;
-
-
-static void once_close_cb(uv_handle_t* handle) {
- printf("ONCE_CLOSE_CB\n");
-
- ASSERT(handle != NULL);
- ASSERT(0 == uv_is_active(handle));
-
- once_close_cb_called++;
-}
-
-
-static void once_cb(uv_timer_t* handle) {
- printf("ONCE_CB %d\n", once_cb_called);
-
- ASSERT(handle != NULL);
- ASSERT(0 == uv_is_active((uv_handle_t*) handle));
-
- once_cb_called++;
-
- uv_close((uv_handle_t*)handle, once_close_cb);
-
- /* Just call this randomly for the code coverage. */
- uv_update_time(uv_default_loop());
-}
-
-
-static void repeat_close_cb(uv_handle_t* handle) {
- printf("REPEAT_CLOSE_CB\n");
-
- ASSERT(handle != NULL);
-
- repeat_close_cb_called++;
-}
-
-
-static void repeat_cb(uv_timer_t* handle) {
- printf("REPEAT_CB\n");
-
- ASSERT(handle != NULL);
- ASSERT(1 == uv_is_active((uv_handle_t*) handle));
-
- repeat_cb_called++;
-
- if (repeat_cb_called == 5) {
- uv_close((uv_handle_t*)handle, repeat_close_cb);
- }
-}
-
-
-static void never_cb(uv_timer_t* handle) {
- FATAL("never_cb should never be called");
-}
-
-
-TEST_IMPL(timer) {
- uv_timer_t once_timers[10];
- uv_timer_t *once;
- uv_timer_t repeat, never;
- unsigned int i;
- int r;
-
- start_time = uv_now(uv_default_loop());
- ASSERT(0 < start_time);
-
- /* Let 10 timers time out in 500 ms total. */
- for (i = 0; i < ARRAY_SIZE(once_timers); i++) {
- once = once_timers + i;
- r = uv_timer_init(uv_default_loop(), once);
- ASSERT(r == 0);
- r = uv_timer_start(once, once_cb, i * 50, 0);
- ASSERT(r == 0);
- }
-
- /* The 11th timer is a repeating timer that runs 4 times */
- r = uv_timer_init(uv_default_loop(), &repeat);
- ASSERT(r == 0);
- r = uv_timer_start(&repeat, repeat_cb, 100, 100);
- ASSERT(r == 0);
-
- /* The 12th timer should not do anything. */
- r = uv_timer_init(uv_default_loop(), &never);
- ASSERT(r == 0);
- r = uv_timer_start(&never, never_cb, 100, 100);
- ASSERT(r == 0);
- r = uv_timer_stop(&never);
- ASSERT(r == 0);
- uv_unref((uv_handle_t*)&never);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(once_cb_called == 10);
- ASSERT(once_close_cb_called == 10);
- printf("repeat_cb_called %d\n", repeat_cb_called);
- ASSERT(repeat_cb_called == 5);
- ASSERT(repeat_close_cb_called == 1);
-
- ASSERT(500 <= uv_now(uv_default_loop()) - start_time);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(timer_start_twice) {
- uv_timer_t once;
- int r;
-
- r = uv_timer_init(uv_default_loop(), &once);
- ASSERT(r == 0);
- r = uv_timer_start(&once, never_cb, 86400 * 1000, 0);
- ASSERT(r == 0);
- r = uv_timer_start(&once, once_cb, 10, 0);
- ASSERT(r == 0);
- r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- ASSERT(once_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(timer_init) {
- uv_timer_t handle;
-
- ASSERT(0 == uv_timer_init(uv_default_loop(), &handle));
- ASSERT(0 == uv_timer_get_repeat(&handle));
- ASSERT(0 == uv_is_active((uv_handle_t*) &handle));
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-static void order_cb_a(uv_timer_t *handle) {
- ASSERT(order_cb_called++ == *(int*)handle->data);
-}
-
-
-static void order_cb_b(uv_timer_t *handle) {
- ASSERT(order_cb_called++ == *(int*)handle->data);
-}
-
-
-TEST_IMPL(timer_order) {
- int first;
- int second;
- uv_timer_t handle_a;
- uv_timer_t handle_b;
-
- first = 0;
- second = 1;
- ASSERT(0 == uv_timer_init(uv_default_loop(), &handle_a));
- ASSERT(0 == uv_timer_init(uv_default_loop(), &handle_b));
-
- /* Test for starting handle_a then handle_b */
- handle_a.data = &first;
- ASSERT(0 == uv_timer_start(&handle_a, order_cb_a, 0, 0));
- handle_b.data = &second;
- ASSERT(0 == uv_timer_start(&handle_b, order_cb_b, 0, 0));
- ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
-
- ASSERT(order_cb_called == 2);
-
- ASSERT(0 == uv_timer_stop(&handle_a));
- ASSERT(0 == uv_timer_stop(&handle_b));
-
- /* Test for starting handle_b then handle_a */
- order_cb_called = 0;
- handle_b.data = &first;
- ASSERT(0 == uv_timer_start(&handle_b, order_cb_b, 0, 0));
-
- handle_a.data = &second;
- ASSERT(0 == uv_timer_start(&handle_a, order_cb_a, 0, 0));
- ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
-
- ASSERT(order_cb_called == 2);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-static void tiny_timer_cb(uv_timer_t* handle) {
- ASSERT(handle == &tiny_timer);
- uv_close((uv_handle_t*) &tiny_timer, NULL);
- uv_close((uv_handle_t*) &huge_timer1, NULL);
- uv_close((uv_handle_t*) &huge_timer2, NULL);
-}
-
-
-TEST_IMPL(timer_huge_timeout) {
- ASSERT(0 == uv_timer_init(uv_default_loop(), &tiny_timer));
- ASSERT(0 == uv_timer_init(uv_default_loop(), &huge_timer1));
- ASSERT(0 == uv_timer_init(uv_default_loop(), &huge_timer2));
- ASSERT(0 == uv_timer_start(&tiny_timer, tiny_timer_cb, 1, 0));
- ASSERT(0 == uv_timer_start(&huge_timer1, tiny_timer_cb, 0xffffffffffffLL, 0));
- ASSERT(0 == uv_timer_start(&huge_timer2, tiny_timer_cb, (uint64_t) -1, 0));
- ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-static void huge_repeat_cb(uv_timer_t* handle) {
- static int ncalls;
-
- if (ncalls == 0)
- ASSERT(handle == &huge_timer1);
- else
- ASSERT(handle == &tiny_timer);
-
- if (++ncalls == 10) {
- uv_close((uv_handle_t*) &tiny_timer, NULL);
- uv_close((uv_handle_t*) &huge_timer1, NULL);
- }
-}
-
-
-TEST_IMPL(timer_huge_repeat) {
- ASSERT(0 == uv_timer_init(uv_default_loop(), &tiny_timer));
- ASSERT(0 == uv_timer_init(uv_default_loop(), &huge_timer1));
- ASSERT(0 == uv_timer_start(&tiny_timer, huge_repeat_cb, 2, 2));
- ASSERT(0 == uv_timer_start(&huge_timer1, huge_repeat_cb, 1, (uint64_t) -1));
- ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-static unsigned int timer_run_once_timer_cb_called;
-
-
-static void timer_run_once_timer_cb(uv_timer_t* handle) {
- timer_run_once_timer_cb_called++;
-}
-
-
-TEST_IMPL(timer_run_once) {
- uv_timer_t timer_handle;
-
- ASSERT(0 == uv_timer_init(uv_default_loop(), &timer_handle));
- ASSERT(0 == uv_timer_start(&timer_handle, timer_run_once_timer_cb, 0, 0));
- ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_ONCE));
- ASSERT(1 == timer_run_once_timer_cb_called);
-
- ASSERT(0 == uv_timer_start(&timer_handle, timer_run_once_timer_cb, 1, 0));
- ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_ONCE));
- ASSERT(2 == timer_run_once_timer_cb_called);
-
- uv_close((uv_handle_t*) &timer_handle, NULL);
- ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_ONCE));
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(timer_null_callback) {
- uv_timer_t handle;
-
- ASSERT(0 == uv_timer_init(uv_default_loop(), &handle));
- ASSERT(UV_EINVAL == uv_timer_start(&handle, NULL, 100, 100));
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-tty.c b/3rdparty/libuv/test/test-tty.c
deleted file mode 100644
index b844959d526..00000000000
--- a/3rdparty/libuv/test/test-tty.c
+++ /dev/null
@@ -1,184 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#ifdef _WIN32
-# include <io.h>
-# include <windows.h>
-#else /* Unix */
-# include <fcntl.h>
-# include <unistd.h>
-#endif
-
-#include <string.h>
-#include <errno.h>
-
-
-TEST_IMPL(tty) {
- int r, width, height;
- int ttyin_fd, ttyout_fd;
- uv_tty_t tty_in, tty_out;
- uv_loop_t* loop = uv_default_loop();
-
- /* Make sure we have an FD that refers to a tty */
-#ifdef _WIN32
- HANDLE handle;
- handle = CreateFileA("conin$",
- GENERIC_READ | GENERIC_WRITE,
- FILE_SHARE_READ | FILE_SHARE_WRITE,
- NULL,
- OPEN_EXISTING,
- FILE_ATTRIBUTE_NORMAL,
- NULL);
- ASSERT(handle != INVALID_HANDLE_VALUE);
- ttyin_fd = _open_osfhandle((intptr_t) handle, 0);
-
- handle = CreateFileA("conout$",
- GENERIC_READ | GENERIC_WRITE,
- FILE_SHARE_READ | FILE_SHARE_WRITE,
- NULL,
- OPEN_EXISTING,
- FILE_ATTRIBUTE_NORMAL,
- NULL);
- ASSERT(handle != INVALID_HANDLE_VALUE);
- ttyout_fd = _open_osfhandle((intptr_t) handle, 0);
-
-#else /* unix */
- ttyin_fd = open("/dev/tty", O_RDONLY, 0);
- if (ttyin_fd < 0) {
- fprintf(stderr, "Cannot open /dev/tty as read-only: %s\n", strerror(errno));
- fflush(stderr);
- return TEST_SKIP;
- }
-
- ttyout_fd = open("/dev/tty", O_WRONLY, 0);
- if (ttyout_fd < 0) {
- fprintf(stderr, "Cannot open /dev/tty as write-only: %s\n", strerror(errno));
- fflush(stderr);
- return TEST_SKIP;
- }
-#endif
-
- ASSERT(ttyin_fd >= 0);
- ASSERT(ttyout_fd >= 0);
-
- ASSERT(UV_UNKNOWN_HANDLE == uv_guess_handle(-1));
-
- ASSERT(UV_TTY == uv_guess_handle(ttyin_fd));
- ASSERT(UV_TTY == uv_guess_handle(ttyout_fd));
-
- r = uv_tty_init(uv_default_loop(), &tty_in, ttyin_fd, 1); /* Readable. */
- ASSERT(r == 0);
-
- r = uv_tty_init(uv_default_loop(), &tty_out, ttyout_fd, 0); /* Writable. */
- ASSERT(r == 0);
-
- r = uv_tty_get_winsize(&tty_out, &width, &height);
- ASSERT(r == 0);
-
- printf("width=%d height=%d\n", width, height);
-
- if (width == 0 && height == 0) {
- /* Some environments such as containers or Jenkins behave like this
- * sometimes */
- MAKE_VALGRIND_HAPPY();
- return TEST_SKIP;
- }
-
- /*
- * Is it a safe assumption that most people have terminals larger than
- * 10x10?
- */
- ASSERT(width > 10);
- ASSERT(height > 10);
-
- /* Turn on raw mode. */
- r = uv_tty_set_mode(&tty_in, UV_TTY_MODE_RAW);
- ASSERT(r == 0);
-
- /* Turn off raw mode. */
- r = uv_tty_set_mode(&tty_in, UV_TTY_MODE_NORMAL);
- ASSERT(r == 0);
-
- /* Calling uv_tty_reset_mode() repeatedly should not clobber errno. */
- errno = 0;
- ASSERT(0 == uv_tty_reset_mode());
- ASSERT(0 == uv_tty_reset_mode());
- ASSERT(0 == uv_tty_reset_mode());
- ASSERT(0 == errno);
-
- /* TODO check the actual mode! */
-
- uv_close((uv_handle_t*) &tty_in, NULL);
- uv_close((uv_handle_t*) &tty_out, NULL);
-
- uv_run(loop, UV_RUN_DEFAULT);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(tty_file) {
-#ifndef _WIN32
- uv_loop_t loop;
- uv_tty_t tty;
- int fd;
-
- ASSERT(0 == uv_loop_init(&loop));
-
- fd = open("test/fixtures/empty_file", O_RDONLY);
- if (fd != -1) {
- ASSERT(UV_EINVAL == uv_tty_init(&loop, &tty, fd, 1));
- ASSERT(0 == close(fd));
- }
-
-/* Bug on AIX where '/dev/random' returns 1 from isatty() */
-#ifndef _AIX
- fd = open("/dev/random", O_RDONLY);
- if (fd != -1) {
- ASSERT(UV_EINVAL == uv_tty_init(&loop, &tty, fd, 1));
- ASSERT(0 == close(fd));
- }
-#endif /* _AIX */
-
- fd = open("/dev/zero", O_RDONLY);
- if (fd != -1) {
- ASSERT(UV_EINVAL == uv_tty_init(&loop, &tty, fd, 1));
- ASSERT(0 == close(fd));
- }
-
- fd = open("/dev/tty", O_RDONLY);
- if (fd != -1) {
- ASSERT(0 == uv_tty_init(&loop, &tty, fd, 1));
- ASSERT(0 == close(fd));
- uv_close((uv_handle_t*) &tty, NULL);
- }
-
- ASSERT(0 == uv_run(&loop, UV_RUN_DEFAULT));
- ASSERT(0 == uv_loop_close(&loop));
-
- MAKE_VALGRIND_HAPPY();
-#endif
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-udp-bind.c b/3rdparty/libuv/test/test-udp-bind.c
deleted file mode 100644
index a1e080ee70c..00000000000
--- a/3rdparty/libuv/test/test-udp-bind.c
+++ /dev/null
@@ -1,93 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-
-TEST_IMPL(udp_bind) {
- struct sockaddr_in addr;
- uv_loop_t* loop;
- uv_udp_t h1, h2;
- int r;
-
- ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr));
-
- loop = uv_default_loop();
-
- r = uv_udp_init(loop, &h1);
- ASSERT(r == 0);
-
- r = uv_udp_init(loop, &h2);
- ASSERT(r == 0);
-
- r = uv_udp_bind(&h1, (const struct sockaddr*) &addr, 0);
- ASSERT(r == 0);
-
- r = uv_udp_bind(&h2, (const struct sockaddr*) &addr, 0);
- ASSERT(r == UV_EADDRINUSE);
-
- uv_close((uv_handle_t*) &h1, NULL);
- uv_close((uv_handle_t*) &h2, NULL);
-
- r = uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(udp_bind_reuseaddr) {
- struct sockaddr_in addr;
- uv_loop_t* loop;
- uv_udp_t h1, h2;
- int r;
-
- ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr));
-
- loop = uv_default_loop();
-
- r = uv_udp_init(loop, &h1);
- ASSERT(r == 0);
-
- r = uv_udp_init(loop, &h2);
- ASSERT(r == 0);
-
- r = uv_udp_bind(&h1, (const struct sockaddr*) &addr, UV_UDP_REUSEADDR);
- ASSERT(r == 0);
-
- r = uv_udp_bind(&h2, (const struct sockaddr*) &addr, UV_UDP_REUSEADDR);
- ASSERT(r == 0);
-
- uv_close((uv_handle_t*) &h1, NULL);
- uv_close((uv_handle_t*) &h2, NULL);
-
- r = uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-udp-create-socket-early.c b/3rdparty/libuv/test/test-udp-create-socket-early.c
deleted file mode 100644
index 3d0152428b8..00000000000
--- a/3rdparty/libuv/test/test-udp-create-socket-early.c
+++ /dev/null
@@ -1,132 +0,0 @@
-/* Copyright (c) 2015 Saúl Ibarra Corretgé <saghul@gmail.com>.
- * All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-#include <string.h>
-
-#ifdef _WIN32
-# define INVALID_FD (INVALID_HANDLE_VALUE)
-#else
-# define INVALID_FD (-1)
-#endif
-
-
-TEST_IMPL(udp_create_early) {
- struct sockaddr_in addr;
- struct sockaddr_in sockname;
- uv_udp_t client;
- uv_os_fd_t fd;
- int r, namelen;
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
-
- r = uv_udp_init_ex(uv_default_loop(), &client, AF_INET);
- ASSERT(r == 0);
-
- r = uv_fileno((const uv_handle_t*) &client, &fd);
- ASSERT(r == 0);
- ASSERT(fd != INVALID_FD);
-
- /* Windows returns WSAEINVAL if the socket is not bound */
-#ifndef _WIN32
- namelen = sizeof sockname;
- r = uv_udp_getsockname(&client, (struct sockaddr*) &sockname, &namelen);
- ASSERT(r == 0);
- ASSERT(sockname.sin_family == AF_INET);
-#endif
-
- r = uv_udp_bind(&client, (const struct sockaddr*) &addr, 0);
- ASSERT(r == 0);
-
- namelen = sizeof sockname;
- r = uv_udp_getsockname(&client, (struct sockaddr*) &sockname, &namelen);
- ASSERT(r == 0);
- ASSERT(memcmp(&addr.sin_addr,
- &sockname.sin_addr,
- sizeof(addr.sin_addr)) == 0);
-
- uv_close((uv_handle_t*) &client, NULL);
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(udp_create_early_bad_bind) {
- struct sockaddr_in addr;
- uv_udp_t client;
- uv_os_fd_t fd;
- int r;
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
-
- r = uv_udp_init_ex(uv_default_loop(), &client, AF_INET6);
- ASSERT(r == 0);
-
- r = uv_fileno((const uv_handle_t*) &client, &fd);
- ASSERT(r == 0);
- ASSERT(fd != INVALID_FD);
-
- /* Windows returns WSAEINVAL if the socket is not bound */
-#ifndef _WIN32
- {
- int namelen;
- struct sockaddr_in6 sockname;
- namelen = sizeof sockname;
- r = uv_udp_getsockname(&client, (struct sockaddr*) &sockname, &namelen);
- ASSERT(r == 0);
- ASSERT(sockname.sin6_family == AF_INET6);
- }
-#endif
-
- r = uv_udp_bind(&client, (const struct sockaddr*) &addr, 0);
-#ifndef _WIN32
- ASSERT(r == UV_EINVAL);
-#else
- ASSERT(r == UV_EFAULT);
-#endif
-
- uv_close((uv_handle_t*) &client, NULL);
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(udp_create_early_bad_domain) {
- uv_udp_t client;
- int r;
-
- r = uv_udp_init_ex(uv_default_loop(), &client, 47);
- ASSERT(r == UV_EINVAL);
-
- r = uv_udp_init_ex(uv_default_loop(), &client, 1024);
- ASSERT(r == UV_EINVAL);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-udp-dgram-too-big.c b/3rdparty/libuv/test/test-udp-dgram-too-big.c
deleted file mode 100644
index bd44c425287..00000000000
--- a/3rdparty/libuv/test/test-udp-dgram-too-big.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#define CHECK_HANDLE(handle) \
- ASSERT((uv_udp_t*)(handle) == &handle_)
-
-#define CHECK_REQ(req) \
- ASSERT((req) == &req_);
-
-static uv_udp_t handle_;
-static uv_udp_send_t req_;
-
-static int send_cb_called;
-static int close_cb_called;
-
-
-static void close_cb(uv_handle_t* handle) {
- CHECK_HANDLE(handle);
- close_cb_called++;
-}
-
-
-static void send_cb(uv_udp_send_t* req, int status) {
- CHECK_REQ(req);
- CHECK_HANDLE(req->handle);
-
- ASSERT(status == UV_EMSGSIZE);
-
- uv_close((uv_handle_t*)req->handle, close_cb);
- send_cb_called++;
-}
-
-
-TEST_IMPL(udp_dgram_too_big) {
- char dgram[65536]; /* 64K MTU is unlikely, even on localhost */
- struct sockaddr_in addr;
- uv_buf_t buf;
- int r;
-
- memset(dgram, 42, sizeof dgram); /* silence valgrind */
-
- r = uv_udp_init(uv_default_loop(), &handle_);
- ASSERT(r == 0);
-
- buf = uv_buf_init(dgram, sizeof dgram);
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
-
- r = uv_udp_send(&req_,
- &handle_,
- &buf,
- 1,
- (const struct sockaddr*) &addr,
- send_cb);
- ASSERT(r == 0);
-
- ASSERT(close_cb_called == 0);
- ASSERT(send_cb_called == 0);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(send_cb_called == 1);
- ASSERT(close_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-udp-ipv6.c b/3rdparty/libuv/test/test-udp-ipv6.c
deleted file mode 100644
index 1b0db78b8ef..00000000000
--- a/3rdparty/libuv/test/test-udp-ipv6.c
+++ /dev/null
@@ -1,193 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#ifdef __FreeBSD__
-#include <sys/sysctl.h>
-#endif
-
-#define CHECK_HANDLE(handle) \
- ASSERT((uv_udp_t*)(handle) == &server \
- || (uv_udp_t*)(handle) == &client \
- || (uv_timer_t*)(handle) == &timeout)
-
-#define CHECK_REQ(req) \
- ASSERT((req) == &req_);
-
-static uv_udp_t client;
-static uv_udp_t server;
-static uv_udp_send_t req_;
-static uv_timer_t timeout;
-
-static int send_cb_called;
-static int recv_cb_called;
-static int close_cb_called;
-
-#ifdef __FreeBSD__
-static int can_ipv6_ipv4_dual() {
- int v6only;
- size_t size = sizeof(int);
-
- if (sysctlbyname("net.inet6.ip6.v6only", &v6only, &size, NULL, 0))
- return 0;
-
- return v6only != 1;
-}
-#endif
-
-
-static void alloc_cb(uv_handle_t* handle,
- size_t suggested_size,
- uv_buf_t* buf) {
- static char slab[65536];
- CHECK_HANDLE(handle);
- buf->base = slab;
- buf->len = sizeof(slab);
-}
-
-
-static void close_cb(uv_handle_t* handle) {
- CHECK_HANDLE(handle);
- close_cb_called++;
-}
-
-
-static void send_cb(uv_udp_send_t* req, int status) {
- CHECK_REQ(req);
- CHECK_HANDLE(req->handle);
- ASSERT(status == 0);
- send_cb_called++;
-}
-
-
-static void ipv6_recv_fail(uv_udp_t* handle,
- ssize_t nread,
- const uv_buf_t* buf,
- const struct sockaddr* addr,
- unsigned flags) {
- ASSERT(0 && "this function should not have been called");
-}
-
-
-static void ipv6_recv_ok(uv_udp_t* handle,
- ssize_t nread,
- const uv_buf_t* buf,
- const struct sockaddr* addr,
- unsigned flags) {
- CHECK_HANDLE(handle);
- ASSERT(nread >= 0);
-
- if (nread)
- recv_cb_called++;
-}
-
-
-static void timeout_cb(uv_timer_t* timer) {
- uv_close((uv_handle_t*)&server, close_cb);
- uv_close((uv_handle_t*)&client, close_cb);
- uv_close((uv_handle_t*)&timeout, close_cb);
-}
-
-
-static void do_test(uv_udp_recv_cb recv_cb, int bind_flags) {
- struct sockaddr_in6 addr6;
- struct sockaddr_in addr;
- uv_buf_t buf;
- int r;
-
- ASSERT(0 == uv_ip6_addr("::0", TEST_PORT, &addr6));
-
- r = uv_udp_init(uv_default_loop(), &server);
- ASSERT(r == 0);
-
- r = uv_udp_bind(&server, (const struct sockaddr*) &addr6, bind_flags);
- ASSERT(r == 0);
-
- r = uv_udp_recv_start(&server, alloc_cb, recv_cb);
- ASSERT(r == 0);
-
- r = uv_udp_init(uv_default_loop(), &client);
- ASSERT(r == 0);
-
- buf = uv_buf_init("PING", 4);
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
-
- r = uv_udp_send(&req_,
- &client,
- &buf,
- 1,
- (const struct sockaddr*) &addr,
- send_cb);
- ASSERT(r == 0);
-
- r = uv_timer_init(uv_default_loop(), &timeout);
- ASSERT(r == 0);
-
- r = uv_timer_start(&timeout, timeout_cb, 500, 0);
- ASSERT(r == 0);
-
- ASSERT(close_cb_called == 0);
- ASSERT(send_cb_called == 0);
- ASSERT(recv_cb_called == 0);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(close_cb_called == 3);
-
- MAKE_VALGRIND_HAPPY();
-}
-
-
-TEST_IMPL(udp_dual_stack) {
- if (!can_ipv6())
- RETURN_SKIP("IPv6 not supported");
-
-#ifdef __FreeBSD__
- if (!can_ipv6_ipv4_dual())
- RETURN_SKIP("IPv6-IPv4 dual stack not supported");
-#endif
-
- do_test(ipv6_recv_ok, 0);
-
- ASSERT(recv_cb_called == 1);
- ASSERT(send_cb_called == 1);
-
- return 0;
-}
-
-
-TEST_IMPL(udp_ipv6_only) {
- if (!can_ipv6())
- RETURN_SKIP("IPv6 not supported");
-
- do_test(ipv6_recv_fail, UV_UDP_IPV6ONLY);
-
- ASSERT(recv_cb_called == 0);
- ASSERT(send_cb_called == 1);
-
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-udp-multicast-interface.c b/3rdparty/libuv/test/test-udp-multicast-interface.c
deleted file mode 100644
index 71001a77e03..00000000000
--- a/3rdparty/libuv/test/test-udp-multicast-interface.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#define CHECK_HANDLE(handle) \
- ASSERT((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client)
-
-static uv_udp_t server;
-static uv_udp_t client;
-
-static int sv_send_cb_called;
-static int close_cb_called;
-
-
-static void close_cb(uv_handle_t* handle) {
- CHECK_HANDLE(handle);
- close_cb_called++;
-}
-
-
-static void sv_send_cb(uv_udp_send_t* req, int status) {
- ASSERT(req != NULL);
- ASSERT(status == 0 || status == UV_ENETUNREACH);
- CHECK_HANDLE(req->handle);
-
- sv_send_cb_called++;
-
- uv_close((uv_handle_t*) req->handle, close_cb);
-}
-
-
-TEST_IMPL(udp_multicast_interface) {
- int r;
- uv_udp_send_t req;
- uv_buf_t buf;
- struct sockaddr_in addr;
- struct sockaddr_in baddr;
-
- ASSERT(0 == uv_ip4_addr("239.255.0.1", TEST_PORT, &addr));
-
- r = uv_udp_init(uv_default_loop(), &server);
- ASSERT(r == 0);
-
- ASSERT(0 == uv_ip4_addr("0.0.0.0", 0, &baddr));
- r = uv_udp_bind(&server, (const struct sockaddr*)&baddr, 0);
- ASSERT(r == 0);
-
- r = uv_udp_set_multicast_interface(&server, "0.0.0.0");
- ASSERT(r == 0);
-
- /* server sends "PING" */
- buf = uv_buf_init("PING", 4);
- r = uv_udp_send(&req,
- &server,
- &buf,
- 1,
- (const struct sockaddr*)&addr,
- sv_send_cb);
- ASSERT(r == 0);
-
- ASSERT(close_cb_called == 0);
- ASSERT(sv_send_cb_called == 0);
-
- /* run the loop till all events are processed */
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(sv_send_cb_called == 1);
- ASSERT(close_cb_called == 1);
-
- ASSERT(client.send_queue_size == 0);
- ASSERT(server.send_queue_size == 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-udp-multicast-interface6.c b/3rdparty/libuv/test/test-udp-multicast-interface6.c
deleted file mode 100644
index d3881e83bb1..00000000000
--- a/3rdparty/libuv/test/test-udp-multicast-interface6.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#define CHECK_HANDLE(handle) \
- ASSERT((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client)
-
-static uv_udp_t server;
-static uv_udp_t client;
-
-static int sv_send_cb_called;
-static int close_cb_called;
-
-
-static void close_cb(uv_handle_t* handle) {
- CHECK_HANDLE(handle);
- close_cb_called++;
-}
-
-
-static void sv_send_cb(uv_udp_send_t* req, int status) {
- ASSERT(req != NULL);
- ASSERT(status == 0);
- CHECK_HANDLE(req->handle);
-
- sv_send_cb_called++;
-
- uv_close((uv_handle_t*) req->handle, close_cb);
-}
-
-
-TEST_IMPL(udp_multicast_interface6) {
- int r;
- uv_udp_send_t req;
- uv_buf_t buf;
- struct sockaddr_in6 addr;
- struct sockaddr_in6 baddr;
-
- if (!can_ipv6())
- RETURN_SKIP("IPv6 not supported");
-
- ASSERT(0 == uv_ip6_addr("::1", TEST_PORT, &addr));
-
- r = uv_udp_init(uv_default_loop(), &server);
- ASSERT(r == 0);
-
- ASSERT(0 == uv_ip6_addr("::", 0, &baddr));
- r = uv_udp_bind(&server, (const struct sockaddr*)&baddr, 0);
- ASSERT(r == 0);
-
-#if defined(__APPLE__) || defined(__FreeBSD__)
- r = uv_udp_set_multicast_interface(&server, "::1%lo0");
-#else
- r = uv_udp_set_multicast_interface(&server, NULL);
-#endif
- ASSERT(r == 0);
-
- /* server sends "PING" */
- buf = uv_buf_init("PING", 4);
- r = uv_udp_send(&req,
- &server,
- &buf,
- 1,
- (const struct sockaddr*)&addr,
- sv_send_cb);
- ASSERT(r == 0);
-
- ASSERT(close_cb_called == 0);
- ASSERT(sv_send_cb_called == 0);
-
- /* run the loop till all events are processed */
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(sv_send_cb_called == 1);
- ASSERT(close_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-udp-multicast-join.c b/3rdparty/libuv/test/test-udp-multicast-join.c
deleted file mode 100644
index 6110a8d922a..00000000000
--- a/3rdparty/libuv/test/test-udp-multicast-join.c
+++ /dev/null
@@ -1,150 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#define CHECK_HANDLE(handle) \
- ASSERT((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client)
-
-static uv_udp_t server;
-static uv_udp_t client;
-
-static int cl_recv_cb_called;
-
-static int sv_send_cb_called;
-
-static int close_cb_called;
-
-static void alloc_cb(uv_handle_t* handle,
- size_t suggested_size,
- uv_buf_t* buf) {
- static char slab[65536];
- CHECK_HANDLE(handle);
- ASSERT(suggested_size <= sizeof(slab));
- buf->base = slab;
- buf->len = sizeof(slab);
-}
-
-
-static void close_cb(uv_handle_t* handle) {
- CHECK_HANDLE(handle);
- close_cb_called++;
-}
-
-
-static void sv_send_cb(uv_udp_send_t* req, int status) {
- ASSERT(req != NULL);
- ASSERT(status == 0);
- CHECK_HANDLE(req->handle);
-
- sv_send_cb_called++;
-
- uv_close((uv_handle_t*) req->handle, close_cb);
-}
-
-
-static void cl_recv_cb(uv_udp_t* handle,
- ssize_t nread,
- const uv_buf_t* buf,
- const struct sockaddr* addr,
- unsigned flags) {
- CHECK_HANDLE(handle);
- ASSERT(flags == 0);
-
- cl_recv_cb_called++;
-
- if (nread < 0) {
- ASSERT(0 && "unexpected error");
- }
-
- if (nread == 0) {
- /* Returning unused buffer */
- /* Don't count towards cl_recv_cb_called */
- ASSERT(addr == NULL);
- return;
- }
-
- ASSERT(addr != NULL);
- ASSERT(nread == 4);
- ASSERT(!memcmp("PING", buf->base, nread));
-
- /* we are done with the client handle, we can close it */
- uv_close((uv_handle_t*) &client, close_cb);
-}
-
-
-TEST_IMPL(udp_multicast_join) {
- int r;
- uv_udp_send_t req;
- uv_buf_t buf;
- struct sockaddr_in addr;
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
-
- r = uv_udp_init(uv_default_loop(), &server);
- ASSERT(r == 0);
-
- r = uv_udp_init(uv_default_loop(), &client);
- ASSERT(r == 0);
-
- /* bind to the desired port */
- r = uv_udp_bind(&client, (const struct sockaddr*) &addr, 0);
- ASSERT(r == 0);
-
- /* join the multicast channel */
- r = uv_udp_set_membership(&client, "239.255.0.1", NULL, UV_JOIN_GROUP);
- if (r == UV_ENODEV)
- RETURN_SKIP("No multicast support.");
- ASSERT(r == 0);
-
- r = uv_udp_recv_start(&client, alloc_cb, cl_recv_cb);
- ASSERT(r == 0);
-
- buf = uv_buf_init("PING", 4);
-
- /* server sends "PING" */
- r = uv_udp_send(&req,
- &server,
- &buf,
- 1,
- (const struct sockaddr*) &addr,
- sv_send_cb);
- ASSERT(r == 0);
-
- ASSERT(close_cb_called == 0);
- ASSERT(cl_recv_cb_called == 0);
- ASSERT(sv_send_cb_called == 0);
-
- /* run the loop till all events are processed */
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(cl_recv_cb_called == 1);
- ASSERT(sv_send_cb_called == 1);
- ASSERT(close_cb_called == 2);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-udp-multicast-join6.c b/3rdparty/libuv/test/test-udp-multicast-join6.c
deleted file mode 100644
index f635bdb9e14..00000000000
--- a/3rdparty/libuv/test/test-udp-multicast-join6.c
+++ /dev/null
@@ -1,161 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-
-#define CHECK_HANDLE(handle) \
- ASSERT((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client)
-
-static uv_udp_t server;
-static uv_udp_t client;
-
-static int cl_recv_cb_called;
-
-static int sv_send_cb_called;
-
-static int close_cb_called;
-
-static void alloc_cb(uv_handle_t* handle,
- size_t suggested_size,
- uv_buf_t* buf) {
- static char slab[65536];
- CHECK_HANDLE(handle);
- ASSERT(suggested_size <= sizeof(slab));
- buf->base = slab;
- buf->len = sizeof(slab);
-}
-
-
-static void close_cb(uv_handle_t* handle) {
- CHECK_HANDLE(handle);
- close_cb_called++;
-}
-
-
-static void sv_send_cb(uv_udp_send_t* req, int status) {
- ASSERT(req != NULL);
- ASSERT(status == 0);
- CHECK_HANDLE(req->handle);
-
- sv_send_cb_called++;
-
- uv_close((uv_handle_t*) req->handle, close_cb);
-}
-
-
-static void cl_recv_cb(uv_udp_t* handle,
- ssize_t nread,
- const uv_buf_t* buf,
- const struct sockaddr* addr,
- unsigned flags) {
- CHECK_HANDLE(handle);
- ASSERT(flags == 0);
-
- cl_recv_cb_called++;
-
- if (nread < 0) {
- ASSERT(0 && "unexpected error");
- }
-
- if (nread == 0) {
- /* Returning unused buffer */
- /* Don't count towards cl_recv_cb_called */
- ASSERT(addr == NULL);
- return;
- }
-
- ASSERT(addr != NULL);
- ASSERT(nread == 4);
- ASSERT(!memcmp("PING", buf->base, nread));
-
- /* we are done with the client handle, we can close it */
- uv_close((uv_handle_t*) &client, close_cb);
-}
-
-
-TEST_IMPL(udp_multicast_join6) {
- int r;
- uv_udp_send_t req;
- uv_buf_t buf;
- struct sockaddr_in6 addr;
-
- if (!can_ipv6())
- RETURN_SKIP("IPv6 not supported");
-
- ASSERT(0 == uv_ip6_addr("::1", TEST_PORT, &addr));
-
- r = uv_udp_init(uv_default_loop(), &server);
- ASSERT(r == 0);
-
- r = uv_udp_init(uv_default_loop(), &client);
- ASSERT(r == 0);
-
- /* bind to the desired port */
- r = uv_udp_bind(&client, (const struct sockaddr*) &addr, 0);
- ASSERT(r == 0);
-
- /* join the multicast channel */
-#if defined(__APPLE__) || defined(_AIX)
- r = uv_udp_set_membership(&client, "ff02::1", "::1%lo0", UV_JOIN_GROUP);
-#else
- r = uv_udp_set_membership(&client, "ff02::1", NULL, UV_JOIN_GROUP);
-#endif
- if (r == UV_ENODEV) {
- MAKE_VALGRIND_HAPPY();
- RETURN_SKIP("No ipv6 multicast route");
- }
-
- ASSERT(r == 0);
-
- r = uv_udp_recv_start(&client, alloc_cb, cl_recv_cb);
- ASSERT(r == 0);
-
- buf = uv_buf_init("PING", 4);
-
- /* server sends "PING" */
- r = uv_udp_send(&req,
- &server,
- &buf,
- 1,
- (const struct sockaddr*) &addr,
- sv_send_cb);
- ASSERT(r == 0);
-
- ASSERT(close_cb_called == 0);
- ASSERT(cl_recv_cb_called == 0);
- ASSERT(sv_send_cb_called == 0);
-
- /* run the loop till all events are processed */
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(cl_recv_cb_called == 1);
- ASSERT(sv_send_cb_called == 1);
- ASSERT(close_cb_called == 2);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-udp-multicast-ttl.c b/3rdparty/libuv/test/test-udp-multicast-ttl.c
deleted file mode 100644
index 7f1af9b9dd9..00000000000
--- a/3rdparty/libuv/test/test-udp-multicast-ttl.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#define CHECK_HANDLE(handle) \
- ASSERT((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client)
-
-static uv_udp_t server;
-static uv_udp_t client;
-
-static int sv_send_cb_called;
-static int close_cb_called;
-
-
-static void close_cb(uv_handle_t* handle) {
- CHECK_HANDLE(handle);
- close_cb_called++;
-}
-
-
-static void sv_send_cb(uv_udp_send_t* req, int status) {
- ASSERT(req != NULL);
- ASSERT(status == 0 || status == UV_ENETUNREACH);
- CHECK_HANDLE(req->handle);
-
- sv_send_cb_called++;
-
- uv_close((uv_handle_t*) req->handle, close_cb);
-}
-
-
-TEST_IMPL(udp_multicast_ttl) {
- int r;
- uv_udp_send_t req;
- uv_buf_t buf;
- struct sockaddr_in addr;
-
- r = uv_udp_init(uv_default_loop(), &server);
- ASSERT(r == 0);
-
- ASSERT(0 == uv_ip4_addr("0.0.0.0", 0, &addr));
- r = uv_udp_bind(&server, (const struct sockaddr*) &addr, 0);
- ASSERT(r == 0);
-
- r = uv_udp_set_multicast_ttl(&server, 32);
- ASSERT(r == 0);
-
- /* server sends "PING" */
- buf = uv_buf_init("PING", 4);
- ASSERT(0 == uv_ip4_addr("239.255.0.1", TEST_PORT, &addr));
- r = uv_udp_send(&req,
- &server,
- &buf,
- 1,
- (const struct sockaddr*) &addr,
- sv_send_cb);
- ASSERT(r == 0);
-
- ASSERT(close_cb_called == 0);
- ASSERT(sv_send_cb_called == 0);
-
- /* run the loop till all events are processed */
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(sv_send_cb_called == 1);
- ASSERT(close_cb_called == 1);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-udp-open.c b/3rdparty/libuv/test/test-udp-open.c
deleted file mode 100644
index 4d77f45d367..00000000000
--- a/3rdparty/libuv/test/test-udp-open.c
+++ /dev/null
@@ -1,204 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#ifndef _WIN32
-# include <unistd.h>
-#endif
-
-static int send_cb_called = 0;
-static int close_cb_called = 0;
-
-static uv_udp_send_t send_req;
-
-
-static void startup(void) {
-#ifdef _WIN32
- struct WSAData wsa_data;
- int r = WSAStartup(MAKEWORD(2, 2), &wsa_data);
- ASSERT(r == 0);
-#endif
-}
-
-
-static uv_os_sock_t create_udp_socket(void) {
- uv_os_sock_t sock;
-
- sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP);
-#ifdef _WIN32
- ASSERT(sock != INVALID_SOCKET);
-#else
- ASSERT(sock >= 0);
-#endif
-
-#ifndef _WIN32
- {
- /* Allow reuse of the port. */
- int yes = 1;
- int r = setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof yes);
- ASSERT(r == 0);
- }
-#endif
-
- return sock;
-}
-
-
-static void close_socket(uv_os_sock_t sock) {
- int r;
-#ifdef _WIN32
- r = closesocket(sock);
-#else
- r = close(sock);
-#endif
- ASSERT(r == 0);
-}
-
-
-static void alloc_cb(uv_handle_t* handle,
- size_t suggested_size,
- uv_buf_t* buf) {
- static char slab[65536];
- ASSERT(suggested_size <= sizeof(slab));
- buf->base = slab;
- buf->len = sizeof(slab);
-}
-
-
-static void close_cb(uv_handle_t* handle) {
- ASSERT(handle != NULL);
- close_cb_called++;
-}
-
-
-static void recv_cb(uv_udp_t* handle,
- ssize_t nread,
- const uv_buf_t* buf,
- const struct sockaddr* addr,
- unsigned flags) {
- int r;
-
- if (nread < 0) {
- ASSERT(0 && "unexpected error");
- }
-
- if (nread == 0) {
- /* Returning unused buffer */
- /* Don't count towards sv_recv_cb_called */
- ASSERT(addr == NULL);
- return;
- }
-
- ASSERT(flags == 0);
-
- ASSERT(addr != NULL);
- ASSERT(nread == 4);
- ASSERT(memcmp("PING", buf->base, nread) == 0);
-
- r = uv_udp_recv_stop(handle);
- ASSERT(r == 0);
-
- uv_close((uv_handle_t*) handle, close_cb);
-}
-
-
-static void send_cb(uv_udp_send_t* req, int status) {
- ASSERT(req != NULL);
- ASSERT(status == 0);
-
- send_cb_called++;
-}
-
-
-TEST_IMPL(udp_open) {
- struct sockaddr_in addr;
- uv_buf_t buf = uv_buf_init("PING", 4);
- uv_udp_t client;
- uv_os_sock_t sock;
- int r;
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
-
- startup();
- sock = create_udp_socket();
-
- r = uv_udp_init(uv_default_loop(), &client);
- ASSERT(r == 0);
-
- r = uv_udp_open(&client, sock);
- ASSERT(r == 0);
-
- r = uv_udp_bind(&client, (const struct sockaddr*) &addr, 0);
- ASSERT(r == 0);
-
- r = uv_udp_recv_start(&client, alloc_cb, recv_cb);
- ASSERT(r == 0);
-
- r = uv_udp_send(&send_req,
- &client,
- &buf,
- 1,
- (const struct sockaddr*) &addr,
- send_cb);
- ASSERT(r == 0);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(send_cb_called == 1);
- ASSERT(close_cb_called == 1);
-
- ASSERT(client.send_queue_size == 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(udp_open_twice) {
- uv_udp_t client;
- uv_os_sock_t sock1, sock2;
- int r;
-
- startup();
- sock1 = create_udp_socket();
- sock2 = create_udp_socket();
-
- r = uv_udp_init(uv_default_loop(), &client);
- ASSERT(r == 0);
-
- r = uv_udp_open(&client, sock1);
- ASSERT(r == 0);
-
- r = uv_udp_open(&client, sock2);
- ASSERT(r == UV_EBUSY);
- close_socket(sock2);
-
- uv_close((uv_handle_t*) &client, NULL);
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-udp-options.c b/3rdparty/libuv/test/test-udp-options.c
deleted file mode 100644
index 0da1786f506..00000000000
--- a/3rdparty/libuv/test/test-udp-options.c
+++ /dev/null
@@ -1,126 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-
-static int udp_options_test(const struct sockaddr* addr) {
- static int invalid_ttls[] = { -1, 0, 256 };
- uv_loop_t* loop;
- uv_udp_t h;
- int i, r;
-
- loop = uv_default_loop();
-
- r = uv_udp_init(loop, &h);
- ASSERT(r == 0);
-
- uv_unref((uv_handle_t*)&h); /* don't keep the loop alive */
-
- r = uv_udp_bind(&h, addr, 0);
- ASSERT(r == 0);
-
- r = uv_udp_set_broadcast(&h, 1);
- r |= uv_udp_set_broadcast(&h, 1);
- r |= uv_udp_set_broadcast(&h, 0);
- r |= uv_udp_set_broadcast(&h, 0);
- ASSERT(r == 0);
-
- /* values 1-255 should work */
- for (i = 1; i <= 255; i++) {
- r = uv_udp_set_ttl(&h, i);
- ASSERT(r == 0);
- }
-
- for (i = 0; i < (int) ARRAY_SIZE(invalid_ttls); i++) {
- r = uv_udp_set_ttl(&h, invalid_ttls[i]);
- ASSERT(r == UV_EINVAL);
- }
-
- r = uv_udp_set_multicast_loop(&h, 1);
- r |= uv_udp_set_multicast_loop(&h, 1);
- r |= uv_udp_set_multicast_loop(&h, 0);
- r |= uv_udp_set_multicast_loop(&h, 0);
- ASSERT(r == 0);
-
- /* values 0-255 should work */
- for (i = 0; i <= 255; i++) {
- r = uv_udp_set_multicast_ttl(&h, i);
- ASSERT(r == 0);
- }
-
- /* anything >255 should fail */
- r = uv_udp_set_multicast_ttl(&h, 256);
- ASSERT(r == UV_EINVAL);
- /* don't test ttl=-1, it's a valid value on some platforms */
-
- r = uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(r == 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-
-TEST_IMPL(udp_options) {
- struct sockaddr_in addr;
-
- ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr));
- return udp_options_test((const struct sockaddr*) &addr);
-}
-
-
-TEST_IMPL(udp_options6) {
- struct sockaddr_in6 addr;
-
- if (!can_ipv6())
- RETURN_SKIP("IPv6 not supported");
-
- ASSERT(0 == uv_ip6_addr("::", TEST_PORT, &addr));
- return udp_options_test((const struct sockaddr*) &addr);
-}
-
-
-TEST_IMPL(udp_no_autobind) {
- uv_loop_t* loop;
- uv_udp_t h;
-
- loop = uv_default_loop();
-
- ASSERT(0 == uv_udp_init(loop, &h));
- ASSERT(UV_EBADF == uv_udp_set_multicast_ttl(&h, 32));
- ASSERT(UV_EBADF == uv_udp_set_broadcast(&h, 1));
- ASSERT(UV_EBADF == uv_udp_set_ttl(&h, 1));
- ASSERT(UV_EBADF == uv_udp_set_multicast_loop(&h, 1));
- ASSERT(UV_EBADF == uv_udp_set_multicast_interface(&h, "0.0.0.0"));
-
- uv_close((uv_handle_t*) &h, NULL);
-
- ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-udp-send-and-recv.c b/3rdparty/libuv/test/test-udp-send-and-recv.c
deleted file mode 100644
index 633a16727b2..00000000000
--- a/3rdparty/libuv/test/test-udp-send-and-recv.c
+++ /dev/null
@@ -1,214 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#define CHECK_HANDLE(handle) \
- ASSERT((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client)
-
-static uv_udp_t server;
-static uv_udp_t client;
-
-static int cl_send_cb_called;
-static int cl_recv_cb_called;
-
-static int sv_send_cb_called;
-static int sv_recv_cb_called;
-
-static int close_cb_called;
-
-
-static void alloc_cb(uv_handle_t* handle,
- size_t suggested_size,
- uv_buf_t* buf) {
- static char slab[65536];
- CHECK_HANDLE(handle);
- ASSERT(suggested_size <= sizeof(slab));
- buf->base = slab;
- buf->len = sizeof(slab);
-}
-
-
-static void close_cb(uv_handle_t* handle) {
- CHECK_HANDLE(handle);
- ASSERT(1 == uv_is_closing(handle));
- close_cb_called++;
-}
-
-
-static void cl_recv_cb(uv_udp_t* handle,
- ssize_t nread,
- const uv_buf_t* buf,
- const struct sockaddr* addr,
- unsigned flags) {
- CHECK_HANDLE(handle);
- ASSERT(flags == 0);
-
- if (nread < 0) {
- ASSERT(0 && "unexpected error");
- }
-
- if (nread == 0) {
- /* Returning unused buffer */
- /* Don't count towards cl_recv_cb_called */
- ASSERT(addr == NULL);
- return;
- }
-
- ASSERT(addr != NULL);
- ASSERT(nread == 4);
- ASSERT(!memcmp("PONG", buf->base, nread));
-
- cl_recv_cb_called++;
-
- uv_close((uv_handle_t*) handle, close_cb);
-}
-
-
-static void cl_send_cb(uv_udp_send_t* req, int status) {
- int r;
-
- ASSERT(req != NULL);
- ASSERT(status == 0);
- CHECK_HANDLE(req->handle);
-
- r = uv_udp_recv_start(req->handle, alloc_cb, cl_recv_cb);
- ASSERT(r == 0);
-
- cl_send_cb_called++;
-}
-
-
-static void sv_send_cb(uv_udp_send_t* req, int status) {
- ASSERT(req != NULL);
- ASSERT(status == 0);
- CHECK_HANDLE(req->handle);
-
- uv_close((uv_handle_t*) req->handle, close_cb);
- free(req);
-
- sv_send_cb_called++;
-}
-
-
-static void sv_recv_cb(uv_udp_t* handle,
- ssize_t nread,
- const uv_buf_t* rcvbuf,
- const struct sockaddr* addr,
- unsigned flags) {
- uv_udp_send_t* req;
- uv_buf_t sndbuf;
- int r;
-
- if (nread < 0) {
- ASSERT(0 && "unexpected error");
- }
-
- if (nread == 0) {
- /* Returning unused buffer */
- /* Don't count towards sv_recv_cb_called */
- ASSERT(addr == NULL);
- return;
- }
-
- CHECK_HANDLE(handle);
- ASSERT(flags == 0);
-
- ASSERT(addr != NULL);
- ASSERT(nread == 4);
- ASSERT(!memcmp("PING", rcvbuf->base, nread));
-
- /* FIXME? `uv_udp_recv_stop` does what it says: recv_cb is not called
- * anymore. That's problematic because the read buffer won't be returned
- * either... Not sure I like that but it's consistent with `uv_read_stop`.
- */
- r = uv_udp_recv_stop(handle);
- ASSERT(r == 0);
-
- req = malloc(sizeof *req);
- ASSERT(req != NULL);
-
- sndbuf = uv_buf_init("PONG", 4);
- r = uv_udp_send(req, handle, &sndbuf, 1, addr, sv_send_cb);
- ASSERT(r == 0);
-
- sv_recv_cb_called++;
-}
-
-
-TEST_IMPL(udp_send_and_recv) {
- struct sockaddr_in addr;
- uv_udp_send_t req;
- uv_buf_t buf;
- int r;
-
- ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr));
-
- r = uv_udp_init(uv_default_loop(), &server);
- ASSERT(r == 0);
-
- r = uv_udp_bind(&server, (const struct sockaddr*) &addr, 0);
- ASSERT(r == 0);
-
- r = uv_udp_recv_start(&server, alloc_cb, sv_recv_cb);
- ASSERT(r == 0);
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
-
- r = uv_udp_init(uv_default_loop(), &client);
- ASSERT(r == 0);
-
- /* client sends "PING", expects "PONG" */
- buf = uv_buf_init("PING", 4);
-
- r = uv_udp_send(&req,
- &client,
- &buf,
- 1,
- (const struct sockaddr*) &addr,
- cl_send_cb);
- ASSERT(r == 0);
-
- ASSERT(close_cb_called == 0);
- ASSERT(cl_send_cb_called == 0);
- ASSERT(cl_recv_cb_called == 0);
- ASSERT(sv_send_cb_called == 0);
- ASSERT(sv_recv_cb_called == 0);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(cl_send_cb_called == 1);
- ASSERT(cl_recv_cb_called == 1);
- ASSERT(sv_send_cb_called == 1);
- ASSERT(sv_recv_cb_called == 1);
- ASSERT(close_cb_called == 2);
-
- ASSERT(client.send_queue_size == 0);
- ASSERT(server.send_queue_size == 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-udp-send-immediate.c b/3rdparty/libuv/test/test-udp-send-immediate.c
deleted file mode 100644
index 0999f6b3425..00000000000
--- a/3rdparty/libuv/test/test-udp-send-immediate.c
+++ /dev/null
@@ -1,148 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#define CHECK_HANDLE(handle) \
- ASSERT((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client)
-
-static uv_udp_t server;
-static uv_udp_t client;
-
-static int cl_send_cb_called;
-static int sv_recv_cb_called;
-static int close_cb_called;
-
-
-static void alloc_cb(uv_handle_t* handle,
- size_t suggested_size,
- uv_buf_t* buf) {
- static char slab[65536];
- CHECK_HANDLE(handle);
- ASSERT(suggested_size <= sizeof(slab));
- buf->base = slab;
- buf->len = sizeof(slab);
-}
-
-
-static void close_cb(uv_handle_t* handle) {
- CHECK_HANDLE(handle);
- ASSERT(1 == uv_is_closing(handle));
- close_cb_called++;
-}
-
-
-static void cl_send_cb(uv_udp_send_t* req, int status) {
- ASSERT(req != NULL);
- ASSERT(status == 0);
- CHECK_HANDLE(req->handle);
-
- cl_send_cb_called++;
-}
-
-
-static void sv_recv_cb(uv_udp_t* handle,
- ssize_t nread,
- const uv_buf_t* rcvbuf,
- const struct sockaddr* addr,
- unsigned flags) {
- if (nread < 0) {
- ASSERT(0 && "unexpected error");
- }
-
- if (nread == 0) {
- /* Returning unused buffer */
- /* Don't count towards sv_recv_cb_called */
- ASSERT(addr == NULL);
- return;
- }
-
- CHECK_HANDLE(handle);
- ASSERT(flags == 0);
-
- ASSERT(addr != NULL);
- ASSERT(nread == 4);
- ASSERT(memcmp("PING", rcvbuf->base, nread) == 0 ||
- memcmp("PANG", rcvbuf->base, nread) == 0);
-
- if (++sv_recv_cb_called == 2) {
- uv_close((uv_handle_t*) &server, close_cb);
- uv_close((uv_handle_t*) &client, close_cb);
- }
-}
-
-
-TEST_IMPL(udp_send_immediate) {
- struct sockaddr_in addr;
- uv_udp_send_t req1, req2;
- uv_buf_t buf;
- int r;
-
- ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr));
-
- r = uv_udp_init(uv_default_loop(), &server);
- ASSERT(r == 0);
-
- r = uv_udp_bind(&server, (const struct sockaddr*) &addr, 0);
- ASSERT(r == 0);
-
- r = uv_udp_recv_start(&server, alloc_cb, sv_recv_cb);
- ASSERT(r == 0);
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
-
- r = uv_udp_init(uv_default_loop(), &client);
- ASSERT(r == 0);
-
- /* client sends "PING", then "PANG" */
- buf = uv_buf_init("PING", 4);
-
- r = uv_udp_send(&req1,
- &client,
- &buf,
- 1,
- (const struct sockaddr*) &addr,
- cl_send_cb);
- ASSERT(r == 0);
-
- buf = uv_buf_init("PANG", 4);
-
- r = uv_udp_send(&req2,
- &client,
- &buf,
- 1,
- (const struct sockaddr*) &addr,
- cl_send_cb);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(cl_send_cb_called == 2);
- ASSERT(sv_recv_cb_called == 2);
- ASSERT(close_cb_called == 2);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-udp-send-unreachable.c b/3rdparty/libuv/test/test-udp-send-unreachable.c
deleted file mode 100644
index c6500320d78..00000000000
--- a/3rdparty/libuv/test/test-udp-send-unreachable.c
+++ /dev/null
@@ -1,150 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#define CHECK_HANDLE(handle) \
- ASSERT((uv_udp_t*)(handle) == &client)
-
-static uv_udp_t client;
-static uv_timer_t timer;
-
-static int send_cb_called;
-static int recv_cb_called;
-static int close_cb_called;
-static int alloc_cb_called;
-static int timer_cb_called;
-
-
-static void alloc_cb(uv_handle_t* handle,
- size_t suggested_size,
- uv_buf_t* buf) {
- static char slab[65536];
- CHECK_HANDLE(handle);
- ASSERT(suggested_size <= sizeof(slab));
- buf->base = slab;
- buf->len = sizeof(slab);
- alloc_cb_called++;
-}
-
-
-static void close_cb(uv_handle_t* handle) {
- ASSERT(1 == uv_is_closing(handle));
- close_cb_called++;
-}
-
-
-static void send_cb(uv_udp_send_t* req, int status) {
- ASSERT(req != NULL);
- ASSERT(status == 0);
- CHECK_HANDLE(req->handle);
- send_cb_called++;
-}
-
-
-static void recv_cb(uv_udp_t* handle,
- ssize_t nread,
- const uv_buf_t* rcvbuf,
- const struct sockaddr* addr,
- unsigned flags) {
- CHECK_HANDLE(handle);
- recv_cb_called++;
-
- if (nread < 0) {
- ASSERT(0 && "unexpected error");
- } else if (nread == 0) {
- /* Returning unused buffer */
- ASSERT(addr == NULL);
- } else {
- ASSERT(addr != NULL);
- }
-}
-
-
-static void timer_cb(uv_timer_t* h) {
- ASSERT(h == &timer);
- timer_cb_called++;
- uv_close((uv_handle_t*) &client, close_cb);
- uv_close((uv_handle_t*) h, close_cb);
-}
-
-
-TEST_IMPL(udp_send_unreachable) {
- struct sockaddr_in addr;
- struct sockaddr_in addr2;
- uv_udp_send_t req1, req2;
- uv_buf_t buf;
- int r;
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT_2, &addr2));
-
- r = uv_timer_init( uv_default_loop(), &timer );
- ASSERT(r == 0);
-
- r = uv_timer_start( &timer, timer_cb, 1000, 0 );
- ASSERT(r == 0);
-
- r = uv_udp_init(uv_default_loop(), &client);
- ASSERT(r == 0);
-
- r = uv_udp_bind(&client, (const struct sockaddr*) &addr2, 0);
- ASSERT(r == 0);
-
- r = uv_udp_recv_start(&client, alloc_cb, recv_cb);
- ASSERT(r == 0);
-
- /* client sends "PING", then "PANG" */
- buf = uv_buf_init("PING", 4);
-
- r = uv_udp_send(&req1,
- &client,
- &buf,
- 1,
- (const struct sockaddr*) &addr,
- send_cb);
- ASSERT(r == 0);
-
- buf = uv_buf_init("PANG", 4);
-
- r = uv_udp_send(&req2,
- &client,
- &buf,
- 1,
- (const struct sockaddr*) &addr,
- send_cb);
- ASSERT(r == 0);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(send_cb_called == 2);
- ASSERT(recv_cb_called == alloc_cb_called);
- ASSERT(timer_cb_called == 1);
- ASSERT(close_cb_called == 2);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-udp-try-send.c b/3rdparty/libuv/test/test-udp-try-send.c
deleted file mode 100644
index 7b6de365487..00000000000
--- a/3rdparty/libuv/test/test-udp-try-send.c
+++ /dev/null
@@ -1,133 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#ifdef _WIN32
-
-TEST_IMPL(udp_try_send) {
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-#else /* !_WIN32 */
-
-#define CHECK_HANDLE(handle) \
- ASSERT((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client)
-
-static uv_udp_t server;
-static uv_udp_t client;
-
-static int sv_recv_cb_called;
-
-static int close_cb_called;
-
-
-static void alloc_cb(uv_handle_t* handle,
- size_t suggested_size,
- uv_buf_t* buf) {
- static char slab[65536];
- CHECK_HANDLE(handle);
- ASSERT(suggested_size <= sizeof(slab));
- buf->base = slab;
- buf->len = sizeof(slab);
-}
-
-
-static void close_cb(uv_handle_t* handle) {
- CHECK_HANDLE(handle);
- ASSERT(uv_is_closing(handle));
- close_cb_called++;
-}
-
-
-static void sv_recv_cb(uv_udp_t* handle,
- ssize_t nread,
- const uv_buf_t* rcvbuf,
- const struct sockaddr* addr,
- unsigned flags) {
- ASSERT(nread > 0);
-
- if (nread == 0) {
- ASSERT(addr == NULL);
- return;
- }
-
- ASSERT(nread == 4);
- ASSERT(addr != NULL);
-
- ASSERT(memcmp("EXIT", rcvbuf->base, nread) == 0);
- uv_close((uv_handle_t*) handle, close_cb);
- uv_close((uv_handle_t*) &client, close_cb);
-
- sv_recv_cb_called++;
-}
-
-
-TEST_IMPL(udp_try_send) {
- struct sockaddr_in addr;
- static char buffer[64 * 1024];
- uv_buf_t buf;
- int r;
-
- ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr));
-
- r = uv_udp_init(uv_default_loop(), &server);
- ASSERT(r == 0);
-
- r = uv_udp_bind(&server, (const struct sockaddr*) &addr, 0);
- ASSERT(r == 0);
-
- r = uv_udp_recv_start(&server, alloc_cb, sv_recv_cb);
- ASSERT(r == 0);
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
-
- r = uv_udp_init(uv_default_loop(), &client);
- ASSERT(r == 0);
-
- buf = uv_buf_init(buffer, sizeof(buffer));
- r = uv_udp_try_send(&client, &buf, 1, (const struct sockaddr*) &addr);
- ASSERT(r == UV_EMSGSIZE);
-
- buf = uv_buf_init("EXIT", 4);
- r = uv_udp_try_send(&client, &buf, 1, (const struct sockaddr*) &addr);
- ASSERT(r == 4);
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-
- ASSERT(close_cb_called == 2);
- ASSERT(sv_recv_cb_called == 1);
-
- ASSERT(client.send_queue_size == 0);
- ASSERT(server.send_queue_size == 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
-
-#endif /* !_WIN32 */
diff --git a/3rdparty/libuv/test/test-walk-handles.c b/3rdparty/libuv/test/test-walk-handles.c
deleted file mode 100644
index 4b0ca6ebc55..00000000000
--- a/3rdparty/libuv/test/test-walk-handles.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-
-static char magic_cookie[] = "magic cookie";
-static int seen_timer_handle;
-static uv_timer_t timer;
-
-
-static void walk_cb(uv_handle_t* handle, void* arg) {
- ASSERT(arg == (void*)magic_cookie);
-
- if (handle == (uv_handle_t*)&timer) {
- seen_timer_handle++;
- } else {
- ASSERT(0 && "unexpected handle");
- }
-}
-
-
-static void timer_cb(uv_timer_t* handle) {
- ASSERT(handle == &timer);
-
- uv_walk(handle->loop, walk_cb, magic_cookie);
- uv_close((uv_handle_t*)handle, NULL);
-}
-
-
-TEST_IMPL(walk_handles) {
- uv_loop_t* loop;
- int r;
-
- loop = uv_default_loop();
-
- r = uv_timer_init(loop, &timer);
- ASSERT(r == 0);
-
- r = uv_timer_start(&timer, timer_cb, 1, 0);
- ASSERT(r == 0);
-
- /* Start event loop, expect to see the timer handle in walk_cb. */
- ASSERT(seen_timer_handle == 0);
- r = uv_run(loop, UV_RUN_DEFAULT);
- ASSERT(r == 0);
- ASSERT(seen_timer_handle == 1);
-
- /* Loop is finished, walk_cb should not see our timer handle. */
- seen_timer_handle = 0;
- uv_walk(loop, walk_cb, magic_cookie);
- ASSERT(seen_timer_handle == 0);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/test/test-watcher-cross-stop.c b/3rdparty/libuv/test/test-watcher-cross-stop.c
deleted file mode 100644
index 910ed0fb613..00000000000
--- a/3rdparty/libuv/test/test-watcher-cross-stop.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "uv.h"
-#include "task.h"
-
-#include <string.h>
-#include <errno.h>
-
-/* NOTE: Number should be big enough to trigger this problem */
-static uv_udp_t sockets[2500];
-static uv_udp_send_t reqs[ARRAY_SIZE(sockets)];
-static char slab[1];
-static unsigned int recv_cb_called;
-static unsigned int send_cb_called;
-static unsigned int close_cb_called;
-
-static void alloc_cb(uv_handle_t* handle, size_t size, uv_buf_t* buf) {
- buf->base = slab;
- buf->len = sizeof(slab);
-}
-
-
-static void recv_cb(uv_udp_t* handle,
- ssize_t nread,
- const uv_buf_t* buf,
- const struct sockaddr* addr,
- unsigned flags) {
- recv_cb_called++;
-}
-
-
-static void send_cb(uv_udp_send_t* req, int status) {
- send_cb_called++;
-}
-
-
-static void close_cb(uv_handle_t* handle) {
- close_cb_called++;
-}
-
-
-TEST_IMPL(watcher_cross_stop) {
- uv_loop_t* loop = uv_default_loop();
- unsigned int i;
- struct sockaddr_in addr;
- uv_buf_t buf;
- char big_string[1024];
-
- TEST_FILE_LIMIT(ARRAY_SIZE(sockets) + 32);
-
- ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
- memset(big_string, 'A', sizeof(big_string));
- buf = uv_buf_init(big_string, sizeof(big_string));
-
- for (i = 0; i < ARRAY_SIZE(sockets); i++) {
- ASSERT(0 == uv_udp_init(loop, &sockets[i]));
- ASSERT(0 == uv_udp_bind(&sockets[i],
- (const struct sockaddr*) &addr,
- UV_UDP_REUSEADDR));
- ASSERT(0 == uv_udp_recv_start(&sockets[i], alloc_cb, recv_cb));
- ASSERT(0 == uv_udp_send(&reqs[i],
- &sockets[i],
- &buf,
- 1,
- (const struct sockaddr*) &addr,
- send_cb));
- }
-
- while (recv_cb_called == 0)
- uv_run(loop, UV_RUN_ONCE);
-
- for (i = 0; i < ARRAY_SIZE(sockets); i++)
- uv_close((uv_handle_t*) &sockets[i], close_cb);
-
- ASSERT(recv_cb_called > 0);
-
- uv_run(loop, UV_RUN_DEFAULT);
-
- ASSERT(ARRAY_SIZE(sockets) == send_cb_called);
- ASSERT(ARRAY_SIZE(sockets) == close_cb_called);
-
- MAKE_VALGRIND_HAPPY();
- return 0;
-}
diff --git a/3rdparty/libuv/uv.gyp b/3rdparty/libuv/uv.gyp
deleted file mode 100644
index 635a234ea6e..00000000000
--- a/3rdparty/libuv/uv.gyp
+++ /dev/null
@@ -1,508 +0,0 @@
-{
- 'target_defaults': {
- 'conditions': [
- ['OS != "win"', {
- 'defines': [
- '_LARGEFILE_SOURCE',
- '_FILE_OFFSET_BITS=64',
- ],
- 'conditions': [
- ['OS=="solaris"', {
- 'cflags': [ '-pthreads' ],
- }],
- ['OS not in "solaris android"', {
- 'cflags': [ '-pthread' ],
- }],
- ],
- }],
- ],
- 'xcode_settings': {
- 'WARNING_CFLAGS': [ '-Wall', '-Wextra', '-Wno-unused-parameter' ],
- 'OTHER_CFLAGS': [ '-g', '--std=gnu89', '-pedantic' ],
- }
- },
-
- 'targets': [
- {
- 'target_name': 'libuv',
- 'type': '<(uv_library)',
- 'include_dirs': [
- 'include',
- 'src/',
- ],
- 'direct_dependent_settings': {
- 'include_dirs': [ 'include' ],
- 'conditions': [
- ['OS != "win"', {
- 'defines': [
- '_LARGEFILE_SOURCE',
- '_FILE_OFFSET_BITS=64',
- ],
- }],
- ['OS in "mac ios"', {
- 'defines': [ '_DARWIN_USE_64_BIT_INODE=1' ],
- }],
- ['OS == "linux"', {
- 'defines': [ '_POSIX_C_SOURCE=200112' ],
- }],
- ],
- },
- 'sources': [
- 'common.gypi',
- 'include/uv.h',
- 'include/tree.h',
- 'include/uv-errno.h',
- 'include/uv-threadpool.h',
- 'include/uv-version.h',
- 'src/fs-poll.c',
- 'src/heap-inl.h',
- 'src/inet.c',
- 'src/queue.h',
- 'src/threadpool.c',
- 'src/uv-common.c',
- 'src/uv-common.h',
- 'src/version.c'
- ],
- 'conditions': [
- [ 'OS=="win"', {
- 'defines': [
- '_WIN32_WINNT=0x0600',
- '_GNU_SOURCE',
- ],
- 'sources': [
- 'include/uv-win.h',
- 'src/win/async.c',
- 'src/win/atomicops-inl.h',
- 'src/win/core.c',
- 'src/win/dl.c',
- 'src/win/error.c',
- 'src/win/fs.c',
- 'src/win/fs-event.c',
- 'src/win/getaddrinfo.c',
- 'src/win/getnameinfo.c',
- 'src/win/handle.c',
- 'src/win/handle-inl.h',
- 'src/win/internal.h',
- 'src/win/loop-watcher.c',
- 'src/win/pipe.c',
- 'src/win/thread.c',
- 'src/win/poll.c',
- 'src/win/process.c',
- 'src/win/process-stdio.c',
- 'src/win/req.c',
- 'src/win/req-inl.h',
- 'src/win/signal.c',
- 'src/win/stream.c',
- 'src/win/stream-inl.h',
- 'src/win/tcp.c',
- 'src/win/tty.c',
- 'src/win/timer.c',
- 'src/win/udp.c',
- 'src/win/util.c',
- 'src/win/winapi.c',
- 'src/win/winapi.h',
- 'src/win/winsock.c',
- 'src/win/winsock.h',
- ],
- 'conditions': [
- ['MSVS_VERSION < "2015"', {
- 'sources': [
- 'src/win/snprintf.c'
- ]
- }]
- ],
- 'link_settings': {
- 'libraries': [
- '-ladvapi32',
- '-liphlpapi',
- '-lpsapi',
- '-lshell32',
- '-luserenv',
- '-lws2_32'
- ],
- },
- }, { # Not Windows i.e. POSIX
- 'cflags': [
- '-g',
- '--std=gnu89',
- '-pedantic',
- '-Wall',
- '-Wextra',
- '-Wno-unused-parameter',
- ],
- 'sources': [
- 'include/uv-unix.h',
- 'include/uv-linux.h',
- 'include/uv-sunos.h',
- 'include/uv-darwin.h',
- 'include/uv-bsd.h',
- 'include/uv-aix.h',
- 'src/unix/async.c',
- 'src/unix/atomic-ops.h',
- 'src/unix/core.c',
- 'src/unix/dl.c',
- 'src/unix/fs.c',
- 'src/unix/getaddrinfo.c',
- 'src/unix/getnameinfo.c',
- 'src/unix/internal.h',
- 'src/unix/loop.c',
- 'src/unix/loop-watcher.c',
- 'src/unix/pipe.c',
- 'src/unix/poll.c',
- 'src/unix/process.c',
- 'src/unix/signal.c',
- 'src/unix/spinlock.h',
- 'src/unix/stream.c',
- 'src/unix/tcp.c',
- 'src/unix/thread.c',
- 'src/unix/timer.c',
- 'src/unix/tty.c',
- 'src/unix/udp.c',
- ],
- 'link_settings': {
- 'libraries': [ '-lm' ],
- 'conditions': [
- ['OS=="solaris"', {
- 'ldflags': [ '-pthreads' ],
- }],
- ['OS != "solaris" and OS != "android"', {
- 'ldflags': [ '-pthread' ],
- }],
- ],
- },
- 'conditions': [
- ['uv_library=="shared_library"', {
- 'cflags': [ '-fPIC' ],
- }],
- ['uv_library=="shared_library" and OS!="mac"', {
- # This will cause gyp to set soname
- # Must correspond with UV_VERSION_MAJOR
- # in include/uv-version.h
- 'product_extension': 'so.1',
- }],
- ],
- }],
- [ 'OS in "linux mac ios android"', {
- 'sources': [ 'src/unix/proctitle.c' ],
- }],
- [ 'OS in "mac ios"', {
- 'sources': [
- 'src/unix/darwin.c',
- 'src/unix/fsevents.c',
- 'src/unix/darwin-proctitle.c',
- ],
- 'defines': [
- '_DARWIN_USE_64_BIT_INODE=1',
- '_DARWIN_UNLIMITED_SELECT=1',
- ]
- }],
- [ 'OS!="mac"', {
- # Enable on all platforms except OS X. The antique gcc/clang that
- # ships with Xcode emits waaaay too many false positives.
- 'cflags': [ '-Wstrict-aliasing' ],
- }],
- [ 'OS=="linux"', {
- 'defines': [ '_GNU_SOURCE' ],
- 'sources': [
- 'src/unix/linux-core.c',
- 'src/unix/linux-inotify.c',
- 'src/unix/linux-syscalls.c',
- 'src/unix/linux-syscalls.h',
- ],
- 'link_settings': {
- 'libraries': [ '-ldl', '-lrt' ],
- },
- }],
- [ 'OS=="android"', {
- 'sources': [
- 'src/unix/linux-core.c',
- 'src/unix/linux-inotify.c',
- 'src/unix/linux-syscalls.c',
- 'src/unix/linux-syscalls.h',
- 'src/unix/pthread-fixes.c',
- 'src/unix/android-ifaddrs.c'
- ],
- 'link_settings': {
- 'libraries': [ '-ldl' ],
- },
- }],
- [ 'OS=="solaris"', {
- 'sources': [ 'src/unix/sunos.c' ],
- 'defines': [
- '__EXTENSIONS__',
- '_XOPEN_SOURCE=500',
- ],
- 'link_settings': {
- 'libraries': [
- '-lkstat',
- '-lnsl',
- '-lsendfile',
- '-lsocket',
- ],
- },
- }],
- [ 'OS=="aix"', {
- 'sources': [ 'src/unix/aix.c' ],
- 'defines': [
- '_ALL_SOURCE',
- '_XOPEN_SOURCE=500',
- '_LINUX_SOURCE_COMPAT',
- ],
- 'link_settings': {
- 'libraries': [
- '-lperfstat',
- ],
- },
- }],
- [ 'OS=="freebsd" or OS=="dragonflybsd"', {
- 'sources': [ 'src/unix/freebsd.c' ],
- }],
- [ 'OS=="openbsd"', {
- 'sources': [ 'src/unix/openbsd.c' ],
- }],
- [ 'OS=="netbsd"', {
- 'sources': [ 'src/unix/netbsd.c' ],
- }],
- [ 'OS in "freebsd dragonflybsd openbsd netbsd".split()', {
- 'link_settings': {
- 'libraries': [ '-lkvm' ],
- },
- }],
- [ 'OS in "ios mac freebsd dragonflybsd openbsd netbsd".split()', {
- 'sources': [ 'src/unix/kqueue.c' ],
- }],
- ['uv_library=="shared_library"', {
- 'defines': [ 'BUILDING_UV_SHARED=1' ]
- }],
- ]
- },
-
- {
- 'target_name': 'run-tests',
- 'type': 'executable',
- 'dependencies': [ 'libuv' ],
- 'sources': [
- 'test/blackhole-server.c',
- 'test/echo-server.c',
- 'test/run-tests.c',
- 'test/runner.c',
- 'test/runner.h',
- 'test/test-get-loadavg.c',
- 'test/task.h',
- 'test/test-active.c',
- 'test/test-async.c',
- 'test/test-async-null-cb.c',
- 'test/test-callback-stack.c',
- 'test/test-callback-order.c',
- 'test/test-close-fd.c',
- 'test/test-close-order.c',
- 'test/test-connection-fail.c',
- 'test/test-cwd-and-chdir.c',
- 'test/test-default-loop-close.c',
- 'test/test-delayed-accept.c',
- 'test/test-error.c',
- 'test/test-embed.c',
- 'test/test-emfile.c',
- 'test/test-fail-always.c',
- 'test/test-fs.c',
- 'test/test-fs-event.c',
- 'test/test-get-currentexe.c',
- 'test/test-get-memory.c',
- 'test/test-getaddrinfo.c',
- 'test/test-getnameinfo.c',
- 'test/test-getsockname.c',
- 'test/test-handle-fileno.c',
- 'test/test-homedir.c',
- 'test/test-hrtime.c',
- 'test/test-idle.c',
- 'test/test-ip6-addr.c',
- 'test/test-ipc.c',
- 'test/test-ipc-send-recv.c',
- 'test/test-list.h',
- 'test/test-loop-handles.c',
- 'test/test-loop-alive.c',
- 'test/test-loop-close.c',
- 'test/test-loop-stop.c',
- 'test/test-loop-time.c',
- 'test/test-loop-configure.c',
- 'test/test-walk-handles.c',
- 'test/test-watcher-cross-stop.c',
- 'test/test-multiple-listen.c',
- 'test/test-osx-select.c',
- 'test/test-pass-always.c',
- 'test/test-ping-pong.c',
- 'test/test-pipe-bind-error.c',
- 'test/test-pipe-connect-error.c',
- 'test/test-pipe-connect-multiple.c',
- 'test/test-pipe-connect-prepare.c',
- 'test/test-pipe-getsockname.c',
- 'test/test-pipe-pending-instances.c',
- 'test/test-pipe-sendmsg.c',
- 'test/test-pipe-server-close.c',
- 'test/test-pipe-close-stdout-read-stdin.c',
- 'test/test-pipe-set-non-blocking.c',
- 'test/test-platform-output.c',
- 'test/test-poll.c',
- 'test/test-poll-close.c',
- 'test/test-poll-close-doesnt-corrupt-stack.c',
- 'test/test-poll-closesocket.c',
- 'test/test-process-title.c',
- 'test/test-queue-foreach-delete.c',
- 'test/test-ref.c',
- 'test/test-run-nowait.c',
- 'test/test-run-once.c',
- 'test/test-semaphore.c',
- 'test/test-shutdown-close.c',
- 'test/test-shutdown-eof.c',
- 'test/test-shutdown-twice.c',
- 'test/test-signal.c',
- 'test/test-signal-multiple-loops.c',
- 'test/test-socket-buffer-size.c',
- 'test/test-spawn.c',
- 'test/test-fs-poll.c',
- 'test/test-stdio-over-pipes.c',
- 'test/test-tcp-bind-error.c',
- 'test/test-tcp-bind6-error.c',
- 'test/test-tcp-close.c',
- 'test/test-tcp-close-accept.c',
- 'test/test-tcp-close-while-connecting.c',
- 'test/test-tcp-create-socket-early.c',
- 'test/test-tcp-connect-error-after-write.c',
- 'test/test-tcp-shutdown-after-write.c',
- 'test/test-tcp-flags.c',
- 'test/test-tcp-connect-error.c',
- 'test/test-tcp-connect-timeout.c',
- 'test/test-tcp-connect6-error.c',
- 'test/test-tcp-open.c',
- 'test/test-tcp-write-to-half-open-connection.c',
- 'test/test-tcp-write-after-connect.c',
- 'test/test-tcp-writealot.c',
- 'test/test-tcp-write-fail.c',
- 'test/test-tcp-try-write.c',
- 'test/test-tcp-unexpected-read.c',
- 'test/test-tcp-oob.c',
- 'test/test-tcp-read-stop.c',
- 'test/test-tcp-write-queue-order.c',
- 'test/test-threadpool.c',
- 'test/test-threadpool-cancel.c',
- 'test/test-thread-equal.c',
- 'test/test-mutexes.c',
- 'test/test-thread.c',
- 'test/test-barrier.c',
- 'test/test-condvar.c',
- 'test/test-timer-again.c',
- 'test/test-timer-from-check.c',
- 'test/test-timer.c',
- 'test/test-tty.c',
- 'test/test-udp-bind.c',
- 'test/test-udp-create-socket-early.c',
- 'test/test-udp-dgram-too-big.c',
- 'test/test-udp-ipv6.c',
- 'test/test-udp-open.c',
- 'test/test-udp-options.c',
- 'test/test-udp-send-and-recv.c',
- 'test/test-udp-send-immediate.c',
- 'test/test-udp-send-unreachable.c',
- 'test/test-udp-multicast-join.c',
- 'test/test-udp-multicast-join6.c',
- 'test/test-dlerror.c',
- 'test/test-udp-multicast-ttl.c',
- 'test/test-ip4-addr.c',
- 'test/test-ip6-addr.c',
- 'test/test-udp-multicast-interface.c',
- 'test/test-udp-multicast-interface6.c',
- 'test/test-udp-try-send.c',
- ],
- 'conditions': [
- [ 'OS=="win"', {
- 'sources': [
- 'test/runner-win.c',
- 'test/runner-win.h'
- ],
- 'libraries': [ '-lws2_32' ]
- }, { # POSIX
- 'defines': [ '_GNU_SOURCE' ],
- 'sources': [
- 'test/runner-unix.c',
- 'test/runner-unix.h',
- ],
- }],
- [ 'OS=="solaris"', { # make test-fs.c compile, needs _POSIX_C_SOURCE
- 'defines': [
- '__EXTENSIONS__',
- '_XOPEN_SOURCE=500',
- ],
- }],
- [ 'OS=="aix"', { # make test-fs.c compile, needs _POSIX_C_SOURCE
- 'defines': [
- '_ALL_SOURCE',
- '_XOPEN_SOURCE=500',
- ],
- }],
- ['uv_library=="shared_library"', {
- 'defines': [ 'USING_UV_SHARED=1' ]
- }],
- ],
- 'msvs-settings': {
- 'VCLinkerTool': {
- 'SubSystem': 1, # /subsystem:console
- },
- },
- },
-
- {
- 'target_name': 'run-benchmarks',
- 'type': 'executable',
- 'dependencies': [ 'libuv' ],
- 'sources': [
- 'test/benchmark-async.c',
- 'test/benchmark-async-pummel.c',
- 'test/benchmark-fs-stat.c',
- 'test/benchmark-getaddrinfo.c',
- 'test/benchmark-list.h',
- 'test/benchmark-loop-count.c',
- 'test/benchmark-million-async.c',
- 'test/benchmark-million-timers.c',
- 'test/benchmark-multi-accept.c',
- 'test/benchmark-ping-pongs.c',
- 'test/benchmark-pound.c',
- 'test/benchmark-pump.c',
- 'test/benchmark-sizes.c',
- 'test/benchmark-spawn.c',
- 'test/benchmark-thread.c',
- 'test/benchmark-tcp-write-batch.c',
- 'test/benchmark-udp-pummel.c',
- 'test/dns-server.c',
- 'test/echo-server.c',
- 'test/blackhole-server.c',
- 'test/run-benchmarks.c',
- 'test/runner.c',
- 'test/runner.h',
- 'test/task.h',
- ],
- 'conditions': [
- [ 'OS=="win"', {
- 'sources': [
- 'test/runner-win.c',
- 'test/runner-win.h',
- ],
- 'libraries': [ '-lws2_32' ]
- }, { # POSIX
- 'defines': [ '_GNU_SOURCE' ],
- 'sources': [
- 'test/runner-unix.c',
- 'test/runner-unix.h',
- ]
- }],
- ['uv_library=="shared_library"', {
- 'defines': [ 'USING_UV_SHARED=1' ]
- }],
- ],
- 'msvs-settings': {
- 'VCLinkerTool': {
- 'SubSystem': 1, # /subsystem:console
- },
- },
- },
- ]
-}
diff --git a/3rdparty/libuv/vcbuild.bat b/3rdparty/libuv/vcbuild.bat
deleted file mode 100644
index 696f0db30e1..00000000000
--- a/3rdparty/libuv/vcbuild.bat
+++ /dev/null
@@ -1,153 +0,0 @@
-@echo off
-
-cd %~dp0
-
-if /i "%1"=="help" goto help
-if /i "%1"=="--help" goto help
-if /i "%1"=="-help" goto help
-if /i "%1"=="/help" goto help
-if /i "%1"=="?" goto help
-if /i "%1"=="-?" goto help
-if /i "%1"=="--?" goto help
-if /i "%1"=="/?" goto help
-
-@rem Process arguments.
-set config=
-set target=Build
-set noprojgen=
-set nobuild=
-set run=
-set target_arch=ia32
-set vs_toolset=x86
-set platform=WIN32
-set library=static_library
-
-:next-arg
-if "%1"=="" goto args-done
-if /i "%1"=="debug" set config=Debug&goto arg-ok
-if /i "%1"=="release" set config=Release&goto arg-ok
-if /i "%1"=="test" set run=run-tests.exe&goto arg-ok
-if /i "%1"=="bench" set run=run-benchmarks.exe&goto arg-ok
-if /i "%1"=="clean" set target=Clean&goto arg-ok
-if /i "%1"=="noprojgen" set noprojgen=1&goto arg-ok
-if /i "%1"=="nobuild" set nobuild=1&goto arg-ok
-if /i "%1"=="x86" set target_arch=ia32&set platform=WIN32&set vs_toolset=x86&goto arg-ok
-if /i "%1"=="ia32" set target_arch=ia32&set platform=WIN32&set vs_toolset=x86&goto arg-ok
-if /i "%1"=="x64" set target_arch=x64&set platform=x64&set vs_toolset=x64&goto arg-ok
-if /i "%1"=="shared" set library=shared_library&goto arg-ok
-if /i "%1"=="static" set library=static_library&goto arg-ok
-:arg-ok
-shift
-goto next-arg
-:args-done
-
-if defined WindowsSDKDir goto select-target
-if defined VCINSTALLDIR goto select-target
-
-@rem Look for Visual Studio 2015
-if not defined VS140COMNTOOLS goto vc-set-2013
-if not exist "%VS140COMNTOOLS%\..\..\vc\vcvarsall.bat" goto vc-set-2013
-call "%VS140COMNTOOLS%\..\..\vc\vcvarsall.bat" %vs_toolset%
-set GYP_MSVS_VERSION=2015
-goto select-target
-
-:vc-set-2013
-@rem Look for Visual Studio 2013
-if not defined VS120COMNTOOLS goto vc-set-2012
-if not exist "%VS120COMNTOOLS%\..\..\vc\vcvarsall.bat" goto vc-set-2012
-call "%VS120COMNTOOLS%\..\..\vc\vcvarsall.bat" %vs_toolset%
-set GYP_MSVS_VERSION=2013
-goto select-target
-
-:vc-set-2012
-@rem Look for Visual Studio 2012
-if not defined VS110COMNTOOLS goto vc-set-2010
-if not exist "%VS110COMNTOOLS%\..\..\vc\vcvarsall.bat" goto vc-set-2010
-call "%VS110COMNTOOLS%\..\..\vc\vcvarsall.bat" %vs_toolset%
-set GYP_MSVS_VERSION=2012
-goto select-target
-
-:vc-set-2010
-@rem Look for Visual Studio 2010
-if not defined VS100COMNTOOLS goto vc-set-2008
-if not exist "%VS100COMNTOOLS%\..\..\vc\vcvarsall.bat" goto vc-set-2008
-call "%VS100COMNTOOLS%\..\..\vc\vcvarsall.bat" %vs_toolset%
-set GYP_MSVS_VERSION=2010
-goto select-target
-
-:vc-set-2008
-@rem Look for Visual Studio 2008
-if not defined VS90COMNTOOLS goto vc-set-notfound
-if not exist "%VS90COMNTOOLS%\..\..\vc\vcvarsall.bat" goto vc-set-notfound
-call "%VS90COMNTOOLS%\..\..\vc\vcvarsall.bat" %vs_toolset%
-set GYP_MSVS_VERSION=2008
-goto select-target
-
-:vc-set-notfound
-echo Warning: Visual Studio not found
-
-:select-target
-if not "%config%"=="" goto project-gen
-if "%run%"=="run-tests.exe" set config=Debug& goto project-gen
-if "%run%"=="run-benchmarks.exe" set config=Release& goto project-gen
-set config=Debug
-
-:project-gen
-@rem Skip project generation if requested.
-if defined noprojgen goto msbuild
-
-@rem Generate the VS project.
-if exist build\gyp goto have_gyp
-echo git clone https://chromium.googlesource.com/external/gyp build/gyp
-git clone https://chromium.googlesource.com/external/gyp build/gyp
-if errorlevel 1 goto gyp_install_failed
-goto have_gyp
-
-:gyp_install_failed
-echo Failed to download gyp. Make sure you have git installed, or
-echo manually install gyp into %~dp0build\gyp.
-exit /b 1
-
-:have_gyp
-if not defined PYTHON set PYTHON=python
-"%PYTHON%" gyp_uv.py -Dtarget_arch=%target_arch% -Duv_library=%library%
-if errorlevel 1 goto create-msvs-files-failed
-if not exist uv.sln goto create-msvs-files-failed
-echo Project files generated.
-
-:msbuild
-@rem Skip project generation if requested.
-if defined nobuild goto run
-
-@rem Check if VS build env is available
-if defined VCINSTALLDIR goto msbuild-found
-if defined WindowsSDKDir goto msbuild-found
-echo Build skipped. To build, this file needs to run from VS cmd prompt.
-goto run
-
-@rem Build the sln with msbuild.
-:msbuild-found
-msbuild uv.sln /t:%target% /p:Configuration=%config% /p:Platform="%platform%" /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo
-if errorlevel 1 exit /b 1
-
-:run
-@rem Run tests if requested.
-if "%run%"=="" goto exit
-if not exist %config%\%run% goto exit
-echo running '%config%\%run%'
-%config%\%run%
-goto exit
-
-:create-msvs-files-failed
-echo Failed to create vc project files.
-exit /b 1
-
-:help
-echo vcbuild.bat [debug/release] [test/bench] [clean] [noprojgen] [nobuild] [x86/x64] [static/shared]
-echo Examples:
-echo vcbuild.bat : builds debug build
-echo vcbuild.bat test : builds debug build and runs tests
-echo vcbuild.bat release bench: builds release build and runs benchmarks
-goto exit
-
-:exit
diff --git a/3rdparty/lua-zlib/.gitattributes b/3rdparty/lua-zlib/.gitattributes
deleted file mode 100644
index 54be6288857..00000000000
--- a/3rdparty/lua-zlib/.gitattributes
+++ /dev/null
@@ -1 +0,0 @@
-lua_zlib.c export-subst ident
diff --git a/3rdparty/lua-zlib/CMakeLists.txt b/3rdparty/lua-zlib/CMakeLists.txt
deleted file mode 100644
index 1cda6b7532b..00000000000
--- a/3rdparty/lua-zlib/CMakeLists.txt
+++ /dev/null
@@ -1,62 +0,0 @@
-# Copyright (C) 2007-2009 LuaDist.
-# Submitted by David Manura
-# Redistribution and use of this file is allowed according to the
-# terms of the MIT license.
-# For details see the COPYRIGHT file distributed with LuaDist.
-# Please note that the package source code is licensed under its own
-# license.
-
-PROJECT(lua-zlib C)
-CMAKE_MINIMUM_REQUIRED (VERSION 2.6)
-
-option(USE_LUA "Use Lua (also called 'C' Lua) includes (default)" ON)
-option(USE_LUAJIT "Use LuaJIT includes instead of 'C' Lua ones (recommended, if you're using LuaJIT, but disabled by default)")
-set(USE_LUA_VERSION 5.1 CACHE STRING "Set the Lua version to use (default: 5.1)")
-
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
-
-if(USE_LUAJIT)
-# Find luajit
- find_package(LuaJIT REQUIRED)
- set(USE_LUA OFF)
-# / Find lua
-endif()
-
-if(USE_LUA)
-# Find lua
- find_package(Lua ${USE_LUA_VERSION} EXACT REQUIRED)
-# / Find lua
-endif()
-
-
-# Basic configurations
- SET(INSTALL_CMOD share/lua/cmod CACHE PATH "Directory to install Lua binary modules (configure lua via LUA_CPATH)")
-# / configs
-
-# Find zlib
- FIND_PACKAGE(ZLIB REQUIRED)
-# / Find zlib
-
-# Define how to build zlib.so:
- INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIRS} ${LUA_INCLUDE_DIR})
- ADD_LIBRARY(cmod_zlib MODULE
- lua_zlib.c zlib.def)
- SET_TARGET_PROPERTIES(cmod_zlib PROPERTIES PREFIX "")
- SET_TARGET_PROPERTIES(cmod_zlib PROPERTIES OUTPUT_NAME zlib)
- TARGET_LINK_LIBRARIES(cmod_zlib ${ZLIB_LIBRARIES})
-# / build zlib.so
-
-# Define how to test zlib.so:
- INCLUDE(CTest)
- SET(LUA_BIN "lua${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}")
- FIND_PROGRAM(LUA NAMES ${LUA_BIN} lua luajit lua.bat)
- ADD_TEST(basic ${LUA} ${CMAKE_CURRENT_SOURCE_DIR}/test.lua ${CMAKE_CURRENT_SOURCE_DIR}/ ${CMAKE_CURRENT_BINARY_DIR}/)
- SET_TESTS_PROPERTIES(basic
- PROPERTIES
- FAIL_REGULAR_EXPRESSION
- "not ok")
-# / test zlib.so
-
-# Where to install stuff
- INSTALL (TARGETS cmod_zlib DESTINATION ${INSTALL_CMOD})
-# / Where to install.
diff --git a/3rdparty/lua-zlib/Makefile b/3rdparty/lua-zlib/Makefile
deleted file mode 100644
index 801ea0436f2..00000000000
--- a/3rdparty/lua-zlib/Makefile
+++ /dev/null
@@ -1,62 +0,0 @@
-# This Makefile is based on LuaSec's Makefile. Thanks to the LuaSec developers.
-# Inform the location to intall the modules
-LUAPATH ?= /usr/share/lua/5.1
-LUACPATH ?= /usr/lib/lua/5.1
-INCDIR ?= -I/usr/include/lua5.1
-LIBDIR ?= -L/usr/lib
-
-# For Mac OS X: set the system version
-MACOSX_VERSION = 10.4
-
-CMOD = zlib.so
-OBJS = lua_zlib.o
-
-LIBS = -lz -llua -lm
-WARN = -Wall -pedantic
-
-BSD_CFLAGS = -O2 -fPIC $(WARN) $(INCDIR) $(DEFS)
-BSD_LDFLAGS = -O -shared -fPIC $(LIBDIR)
-
-LNX_CFLAGS = -O2 -fPIC $(WARN) $(INCDIR) $(DEFS)
-LNX_LDFLAGS = -O -shared -fPIC $(LIBDIR)
-
-MAC_ENV = env MACOSX_DEPLOYMENT_TARGET='$(MACVER)'
-MAC_CFLAGS = -O2 -fPIC -fno-common $(WARN) $(INCDIR) $(DEFS)
-MAC_LDFLAGS = -bundle -undefined dynamic_lookup -fPIC $(LIBDIR)
-
-CC = gcc
-LD = $(MYENV) gcc
-CFLAGS = $(MYCFLAGS)
-LDFLAGS = $(MYLDFLAGS)
-
-.PHONY: all clean install none linux bsd macosx
-
-all:
- @echo "Usage: $(MAKE) <platform>"
- @echo " * linux"
- @echo " * bsd"
- @echo " * macosx"
-
-install: $(CMOD)
- cp $(CMOD) $(LUACPATH)
-
-uninstall:
- rm $(LUACPATH)/zlib.so
-
-linux:
- @$(MAKE) $(CMOD) MYCFLAGS="$(LNX_CFLAGS)" MYLDFLAGS="$(LNX_LDFLAGS)" INCDIR="$(INCDIR)" LIBDIR="$(LIBDIR)" DEFS="$(DEFS)"
-
-bsd:
- @$(MAKE) $(CMOD) MYCFLAGS="$(BSD_CFLAGS)" MYLDFLAGS="$(BSD_LDFLAGS)" INCDIR="$(INCDIR)" LIBDIR="$(LIBDIR)" DEFS="$(DEFS)"
-
-macosx:
- @$(MAKE) $(CMOD) MYCFLAGS="$(MAC_CFLAGS)" MYLDFLAGS="$(MAC_LDFLAGS)" MYENV="$(MAC_ENV)" INCDIR="$(INCDIR)" LIBDIR="$(LIBDIR)" DEFS="$(DEFS)"
-
-clean:
- rm -f $(OBJS) $(CMOD)
-
-.c.o:
- $(CC) -c $(CFLAGS) $(DEFS) $(INCDIR) -o $@ $<
-
-$(CMOD): $(OBJS)
- $(LD) $(LDFLAGS) $(LIBDIR) $(OBJS) $(LIBS) -o $@
diff --git a/3rdparty/lua-zlib/README b/3rdparty/lua-zlib/README
deleted file mode 100644
index 8c1ef8d5f8d..00000000000
--- a/3rdparty/lua-zlib/README
+++ /dev/null
@@ -1,151 +0,0 @@
-**********************************************************************
-* Author : Brian Maher <maherb at brimworks dot com>
-* Library : lua_zlib - Lua 5.1 interface to zlib
-*
-* The MIT License
-*
-* Copyright (c) 2009 Brian Maher
-*
-* 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.
-**********************************************************************
-
-To use this library, you need zlib, get it here:
- http://www.gzip.org/zlib/
-
-To build this library, you can use CMake and get it here:
- http://www.cmake.org/cmake/resources/software.html
-
-...or you can use GNU Make.
- make <platform>
-
-Loading the library:
-
- If you built the library as a loadable package
- [local] zlib = require 'zlib'
-
- If you compiled the package statically into your application, call
- the function "luaopen_zlib(L)". It will create a table with the zlib
- functions and leave it on the stack.
-
--- zlib functions --
-
-int major, int minor, int patch = zlib.version()
-
- returns numeric zlib version for the major, minor, and patch
- levels of the version dynamically linked in.
-
-function stream = zlib.deflate([ int compression_level ], [ int window_size ])
-
- If no compression_level is provided uses Z_DEFAULT_COMPRESSION (6),
- compression level is a number from 1-9 where zlib.BEST_SPEED is 1
- and zlib.BEST_COMPRESSION is 9.
-
- Returns a "stream" function that compresses (or deflates) all
- strings passed in. Specifically, use it as such:
-
- string deflated, bool eof, int bytes_in, int bytes_out =
- stream(string input [, 'sync' | 'full' | 'finish'])
-
- Takes input and deflates and returns a portion of it,
- optionally forcing a flush.
-
- A 'sync' flush will force all pending output to be flushed to
- the return value and the output is aligned on a byte boundary,
- so that the decompressor can get all input data available so
- far. Flushing may degrade compression for some compression
- algorithms and so it should be used only when necessary.
-
- A 'full' flush will flush all output as with 'sync', and the
- compression state is reset so that decompression can restart
- from this point if previous compressed data has been damaged
- or if random access is desired. Using Z_FULL_FLUSH too often
- can seriously degrade the compression.
-
- A 'finish' flush will force all pending output to be processed
- and results in the stream become unusable. Any future
- attempts to print anything other than the empty string will
- result in an error that begins with IllegalState.
-
- The eof result is true if 'finish' was specified, otherwise
- it is false.
-
- The bytes_in is how many bytes of input have been passed to
- stream, and bytes_out is the number of bytes returned in
- deflated string chunks.
-
-function stream = zlib.inflate([int windowBits])
-
- Returns a "stream" function that decompresses (or inflates) all
- strings passed in. Optionally specify a windowBits argument
- that is passed to inflateInit2(), see zlib.h for details about
- this argument. By default, gzip header detection is done, and
- the max window size is used.
-
- The "stream" function should be used as such:
-
- string inflated, bool eof, int bytes_in, int bytes_out =
- stream(string input)
-
- Takes input and inflates and returns a portion of it. If it
- detects the end of a deflation stream, then total will be the
- total number of bytes read from input and all future calls to
- stream() with a non empty string will result in an error that
- begins with IllegalState.
-
- No flush options are provided since the maximal amount of
- input is always processed.
-
- eof will be true when the input string is determined to be at
- the "end of the file".
-
- The bytes_in is how many bytes of input have been passed to
- stream, and bytes_out is the number of bytes returned in
- inflated string chunks.
-
-
-function compute_checksum = zlib.adler32()
-function compute_checksum = zlib.crc32()
-
- Create a new checksum computation function using either the
- adler32 or crc32 algorithms. This resulting function should be
- used as such:
-
- int checksum = compute_checksum(string input |
- function compute_checksum)
-
- The compute_checksum function takes as input either a string
- that is logically getting appended to or another
- compute_checksum function that is logically getting appended.
- The result is the updated checksum.
-
- For example, these uses will all result in the same checksum:
-
- -- All in one call:
- local csum = zlib.crc32()("one two")
-
- -- Multiple calls:
- local compute = zlib.crc32()
- compute("one")
- assert(csum == compute(" two"))
-
- -- Multiple compute_checksums joined:
- local compute1, compute2 = zlib.crc32(), zlib.crc32()
- compute1("one")
- compute2(" two")
- assert(csum == compute1(compute2))
diff --git a/3rdparty/lua-zlib/amnon_david.gz b/3rdparty/lua-zlib/amnon_david.gz
deleted file mode 100644
index c56de231d1a..00000000000
--- a/3rdparty/lua-zlib/amnon_david.gz
+++ /dev/null
Binary files differ
diff --git a/3rdparty/lua-zlib/cmake/Modules/FindLuaJIT.cmake b/3rdparty/lua-zlib/cmake/Modules/FindLuaJIT.cmake
deleted file mode 100644
index e626a5a1d94..00000000000
--- a/3rdparty/lua-zlib/cmake/Modules/FindLuaJIT.cmake
+++ /dev/null
@@ -1,63 +0,0 @@
-# Locate LuaJIT library
-# This module defines
-# LUAJIT_FOUND, if false, do not try to link to Lua
-# LUA_LIBRARIES
-# LUA_INCLUDE_DIR, where to find lua.h
-# LUAJIT_VERSION_STRING, the version of Lua found (since CMake 2.8.8)
-
-## Copied from default CMake FindLua51.cmake
-
-find_path(LUA_INCLUDE_DIR luajit.h
- HINTS
- ENV LUA_DIR
- PATH_SUFFIXES include/luajit-2.0 include
- PATHS
- ~/Library/Frameworks
- /Library/Frameworks
- /sw # Fink
- /opt/local # DarwinPorts
- /opt/csw # Blastwave
- /opt
-)
-
-find_library(LUA_LIBRARY
- NAMES luajit-5.1
- HINTS
- ENV LUA_DIR
- PATH_SUFFIXES lib
- PATHS
- ~/Library/Frameworks
- /Library/Frameworks
- /sw
- /opt/local
- /opt/csw
- /opt
-)
-
-if(LUA_LIBRARY)
- # include the math library for Unix
- if(UNIX AND NOT APPLE)
- find_library(LUA_MATH_LIBRARY m)
- set( LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}" CACHE STRING "Lua Libraries")
- # For Windows and Mac, don't need to explicitly include the math library
- else()
- set( LUA_LIBRARIES "${LUA_LIBRARY}" CACHE STRING "Lua Libraries")
- endif()
-endif()
-
-if(LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/luajit.h")
- file(STRINGS "${LUA_INCLUDE_DIR}/luajit.h" luajit_version_str REGEX "^#define[ \t]+LUAJIT_VERSION[ \t]+\"LuaJIT .+\"")
-
- string(REGEX REPLACE "^#define[ \t]+LUAJIT_VERSION[ \t]+\"LuaJIT ([^\"]+)\".*" "\\1" LUAJIT_VERSION_STRING "${luajit_version_str}")
- unset(luajit_version_str)
-endif()
-
-include(FindPackageHandleStandardArgs)
-# handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE if
-# all listed variables are TRUE
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(LuaJIT
- REQUIRED_VARS LUA_LIBRARIES LUA_INCLUDE_DIR
- VERSION_VAR LUAJIT_VERSION_STRING)
-
-mark_as_advanced(LUA_INCLUDE_DIR LUA_LIBRARIES LUA_LIBRARY LUA_MATH_LIBRARY)
-
diff --git a/3rdparty/lua-zlib/lua_zlib.c b/3rdparty/lua-zlib/lua_zlib.c
deleted file mode 100644
index b619258c75f..00000000000
--- a/3rdparty/lua-zlib/lua_zlib.c
+++ /dev/null
@@ -1,401 +0,0 @@
-#include <ctype.h>
-#include <lauxlib.h>
-#include <lua.h>
-#include <stdlib.h>
-#include <string.h>
-#include <zlib.h>
-
-/*
- * ** compatibility with Lua 5.2
- * */
-#if (LUA_VERSION_NUM >= 502)
-#undef luaL_register
-#define luaL_register(L,n,f) \
- { if ((n) == NULL) luaL_setfuncs(L,f,0); else luaL_newlib(L,f); }
-
-#endif
-
-#if (LUA_VERSION_NUM >= 503)
-#undef luaL_optint
-#define luaL_optint(L,n,d) ((int)luaL_optinteger(L,(n),(d)))
-#endif
-
-#define DEF_MEM_LEVEL 8
-
-typedef uLong (*checksum_t) (uLong crc, const Bytef *buf, uInt len);
-typedef uLong (*checksum_combine_t)(uLong crc1, uLong crc2, z_off_t len2);
-
-
-static int lz_deflate(lua_State *L);
-static int lz_deflate_delete(lua_State *L);
-static int lz_inflate_delete(lua_State *L);
-static int lz_inflate(lua_State *L);
-static int lz_checksum(lua_State *L);
-static int lz_checksum_new(lua_State *L, checksum_t checksum, checksum_combine_t combine);
-static int lz_adler32(lua_State *L);
-static int lz_crc32(lua_State *L);
-
-static int lz_version(lua_State *L) {
- const char* version = zlibVersion();
- int count = strlen(version) + 1;
- char* cur = (char*)memcpy(lua_newuserdata(L, count),
- version, count);
-
- count = 0;
- while ( *cur ) {
- char* begin = cur;
- /* Find all digits: */
- while ( isdigit(*cur) ) cur++;
- if ( begin != cur ) {
- int is_end = *cur == '\0';
- *cur = '\0';
- lua_pushnumber(L, atoi(begin));
- count++;
- if ( is_end ) break;
- cur++;
- }
- while ( *cur && ! isdigit(*cur) ) cur++;
- }
-
- return count;
-}
-
-static int lz_assert(lua_State *L, int result, const z_stream* stream, const char* file, int line) {
- /* Both of these are "normal" return codes: */
- if ( result == Z_OK || result == Z_STREAM_END ) return result;
- switch ( result ) {
- case Z_NEED_DICT:
- lua_pushfstring(L, "RequiresDictionary: input stream requires a dictionary to be deflated (%s) at %s line %d",
- stream->msg, file, line);
- break;
- case Z_STREAM_ERROR:
- lua_pushfstring(L, "InternalError: inconsistent internal zlib stream (%s) at %s line %d",
- stream->msg, file, line);
- break;
- case Z_DATA_ERROR:
- lua_pushfstring(L, "InvalidInput: input string does not conform to zlib format or checksum failed at %s line %d",
- file, line);
- break;
- case Z_MEM_ERROR:
- lua_pushfstring(L, "OutOfMemory: not enough memory (%s) at %s line %d",
- stream->msg, file, line);
- break;
- case Z_BUF_ERROR:
- lua_pushfstring(L, "InternalError: no progress possible (%s) at %s line %d",
- stream->msg, file, line);
- break;
- case Z_VERSION_ERROR:
- lua_pushfstring(L, "IncompatibleLibrary: built with version %s, but dynamically linked with version %s (%s) at %s line %d",
- ZLIB_VERSION, zlibVersion(), stream->msg, file, line);
- break;
- default:
- lua_pushfstring(L, "ZLibError: unknown code %d (%s) at %s line %d",
- result, stream->msg, file, line);
- }
- lua_error(L);
- return result;
-}
-
-/**
- * @upvalue z_stream - Memory for the z_stream.
- * @upvalue remainder - Any remainder from the last deflate call.
- *
- * @param string - "print" to deflate stream.
- * @param int - flush output buffer? Z_SYNC_FLUSH, Z_FULL_FLUSH, or Z_FINISH.
- *
- * if no params, terminates the stream (as if we got empty string and Z_FINISH).
- */
-static int lz_filter_impl(lua_State *L, int (*filter)(z_streamp, int), int (*end)(z_streamp), const char* name) {
- int flush = Z_NO_FLUSH, result;
- z_stream* stream;
- luaL_Buffer buff;
- size_t avail_in;
-
- if ( filter == deflate ) {
- const char *const opts[] = { "none", "sync", "full", "finish", NULL };
- flush = luaL_checkoption(L, 2, opts[0], opts);
- if ( flush ) flush++;
- /* Z_NO_FLUSH(0) Z_SYNC_FLUSH(2), Z_FULL_FLUSH(3), Z_FINISH (4) */
-
- /* No arguments or nil, we are terminating the stream: */
- if ( lua_gettop(L) == 0 || lua_isnil(L, 1) ) {
- flush = Z_FINISH;
- }
- }
-
- stream = (z_stream*)lua_touserdata(L, lua_upvalueindex(1));
- if ( stream == NULL ) {
- if ( lua_gettop(L) >= 1 && lua_isstring(L, 1) ) {
- lua_pushfstring(L, "IllegalState: calling %s function when stream was previously closed", name);
- lua_error(L);
- }
- lua_pushstring(L, "");
- lua_pushboolean(L, 1);
- return 2; /* Ignore duplicate calls to "close". */
- }
-
- luaL_buffinit(L, &buff);
-
- if ( lua_gettop(L) > 1 ) lua_pushvalue(L, 1);
-
- if ( lua_isstring(L, lua_upvalueindex(2)) ) {
- lua_pushvalue(L, lua_upvalueindex(2));
- if ( lua_gettop(L) > 1 && lua_isstring(L, -2) ) {
- lua_concat(L, 2);
- }
- }
-
- /* Do the actual deflate'ing: */
- if (lua_gettop(L) > 0) {
- stream->next_in = (unsigned char*)lua_tolstring(L, -1, &avail_in);
- } else {
- stream->next_in = NULL;
- avail_in = 0;
- }
- stream->avail_in = avail_in;
-
- if ( ! stream->avail_in && ! flush ) {
- /* Passed empty string, make it a noop instead of erroring out. */
- lua_pushstring(L, "");
- lua_pushboolean(L, 0);
- lua_pushinteger(L, stream->total_in);
- lua_pushinteger(L, stream->total_out);
- return 4;
- }
-
- do {
- stream->next_out = (unsigned char*)luaL_prepbuffer(&buff);
- stream->avail_out = LUAL_BUFFERSIZE;
- result = filter(stream, flush);
- if ( Z_BUF_ERROR != result ) {
- /* Ignore Z_BUF_ERROR since that just indicates that we
- * need a larger buffer in order to proceed. Thanks to
- * Tobias Markmann for finding this bug!
- */
- lz_assert(L, result, stream, __FILE__, __LINE__);
- }
- luaL_addsize(&buff, LUAL_BUFFERSIZE - stream->avail_out);
- } while ( stream->avail_out == 0 );
-
- /* Need to do this before we alter the stack: */
- luaL_pushresult(&buff);
-
- /* Save remainder in lua_upvalueindex(2): */
- if ( NULL != stream->next_in ) {
- lua_pushlstring(L, (char*)stream->next_in, stream->avail_in);
- lua_replace(L, lua_upvalueindex(2));
- }
-
- /* "close" the stream/remove finalizer: */
- if ( result == Z_STREAM_END ) {
- /* Clear-out the metatable so end is not called twice: */
- lua_pushnil(L);
- lua_setmetatable(L, lua_upvalueindex(1));
-
- /* nil the upvalue: */
- lua_pushnil(L);
- lua_replace(L, lua_upvalueindex(1));
-
- /* Close the stream: */
- lz_assert(L, end(stream), stream, __FILE__, __LINE__);
-
- lua_pushboolean(L, 1);
- } else {
- lua_pushboolean(L, 0);
- }
- lua_pushinteger(L, stream->total_in);
- lua_pushinteger(L, stream->total_out);
- return 4;
-}
-
-static void lz_create_deflate_mt(lua_State *L) {
- luaL_newmetatable(L, "lz.deflate.meta"); /* {} */
-
- lua_pushcfunction(L, lz_deflate_delete);
- lua_setfield(L, -2, "__gc");
-
- lua_pop(L, 1); /* <empty> */
-}
-
-static int lz_deflate_new(lua_State *L) {
- int level = luaL_optint(L, 1, Z_DEFAULT_COMPRESSION);
- int window_size = luaL_optint(L, 2, MAX_WBITS);
-
- /* Allocate the stream: */
- z_stream* stream = (z_stream*)lua_newuserdata(L, sizeof(z_stream));
-
- stream->zalloc = Z_NULL;
- stream->zfree = Z_NULL;
-
- int result = deflateInit2(stream, level, Z_DEFLATED, window_size,
- DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);
-
- lz_assert(L, result, stream, __FILE__, __LINE__);
-
- /* Don't allow destructor to execute unless deflateInit2 was successful: */
- luaL_getmetatable(L, "lz.deflate.meta");
- lua_setmetatable(L, -2);
-
- lua_pushnil(L);
- lua_pushcclosure(L, lz_deflate, 2);
- return 1;
-}
-
-static int lz_deflate(lua_State *L) {
- return lz_filter_impl(L, deflate, deflateEnd, "deflate");
-}
-
-static int lz_deflate_delete(lua_State *L) {
- z_stream* stream = (z_stream*)lua_touserdata(L, 1);
-
- /* Ignore errors. */
- deflateEnd(stream);
-
- return 0;
-}
-
-
-static void lz_create_inflate_mt(lua_State *L) {
- luaL_newmetatable(L, "lz.inflate.meta"); /* {} */
-
- lua_pushcfunction(L, lz_inflate_delete);
- lua_setfield(L, -2, "__gc");
-
- lua_pop(L, 1); /* <empty> */
-}
-
-static int lz_inflate_new(lua_State *L) {
- /* Allocate the stream */
- z_stream* stream = (z_stream*)lua_newuserdata(L, sizeof(z_stream));
-
- /* By default, we will do gzip header detection w/ max window size */
- int window_size = lua_isnumber(L, 1) ? lua_tointeger(L, 1) : MAX_WBITS + 32;
-
- stream->zalloc = Z_NULL;
- stream->zfree = Z_NULL;
- stream->next_in = Z_NULL;
- stream->avail_in = 0;
-
- lz_assert(L, inflateInit2(stream, window_size), stream, __FILE__, __LINE__);
-
- /* Don't allow destructor to execute unless deflateInit was successful: */
- luaL_getmetatable(L, "lz.inflate.meta");
- lua_setmetatable(L, -2);
-
- lua_pushnil(L);
- lua_pushcclosure(L, lz_inflate, 2);
- return 1;
-}
-
-static int lz_inflate(lua_State *L) {
- return lz_filter_impl(L, inflate, inflateEnd, "inflate");
-}
-
-static int lz_inflate_delete(lua_State *L) {
- z_stream* stream = (z_stream*)lua_touserdata(L, 1);
-
- /* Ignore errors: */
- inflateEnd(stream);
-
- return 0;
-}
-
-static int lz_checksum(lua_State *L) {
- if ( lua_gettop(L) <= 0 ) {
- lua_pushvalue(L, lua_upvalueindex(3));
- lua_pushvalue(L, lua_upvalueindex(4));
- } else if ( lua_isfunction(L, 1) ) {
- checksum_combine_t combine = (checksum_combine_t)
- lua_touserdata(L, lua_upvalueindex(2));
-
- lua_pushvalue(L, 1);
- lua_call(L, 0, 2);
- if ( ! lua_isnumber(L, -2) || ! lua_isnumber(L, -1) ) {
- luaL_argerror(L, 1, "expected function to return two numbers");
- }
-
- /* Calculate and replace the checksum */
- lua_pushnumber(L,
- combine(lua_tonumber(L, lua_upvalueindex(3)),
- lua_tonumber(L, -2),
- lua_tonumber(L, -1)));
- lua_pushvalue(L, -1);
- lua_replace(L, lua_upvalueindex(3));
-
- /* Calculate and replace the length */
- lua_pushnumber(L,
- lua_tonumber(L, lua_upvalueindex(4)) + lua_tonumber(L, -2));
- lua_pushvalue(L, -1);
- lua_replace(L, lua_upvalueindex(4));
- } else {
- const Bytef* str;
- size_t len;
-
- checksum_t checksum = (checksum_t)
- lua_touserdata(L, lua_upvalueindex(1));
- str = (const Bytef*)luaL_checklstring(L, 1, &len);
-
- /* Calculate and replace the checksum */
- lua_pushnumber(L,
- checksum(lua_tonumber(L, lua_upvalueindex(3)),
- str,
- len));
- lua_pushvalue(L, -1);
- lua_replace(L, lua_upvalueindex(3));
-
- /* Calculate and replace the length */
- lua_pushnumber(L,
- lua_tonumber(L, lua_upvalueindex(4)) + len);
- lua_pushvalue(L, -1);
- lua_replace(L, lua_upvalueindex(4));
- }
- return 2;
-}
-
-static int lz_checksum_new(lua_State *L, checksum_t checksum, checksum_combine_t combine) {
- lua_pushlightuserdata(L, checksum);
- lua_pushlightuserdata(L, combine);
- lua_pushnumber(L, checksum(0L, Z_NULL, 0));
- lua_pushnumber(L, 0);
- lua_pushcclosure(L, lz_checksum, 4);
- return 1;
-}
-
-static int lz_adler32(lua_State *L) {
- return lz_checksum_new(L, adler32, adler32_combine);
-}
-
-static int lz_crc32(lua_State *L) {
- return lz_checksum_new(L, crc32, crc32_combine);
-}
-
-static const luaL_Reg zlib_functions[] = {
- { "deflate", lz_deflate_new },
- { "inflate", lz_inflate_new },
- { "adler32", lz_adler32 },
- { "crc32", lz_crc32 },
- { "version", lz_version },
- { NULL, NULL }
-};
-
-#define SETLITERAL(n,v) (lua_pushliteral(L, n), lua_pushliteral(L, v), lua_settable(L, -3))
-#define SETINT(n,v) (lua_pushliteral(L, n), lua_pushinteger(L, v), lua_settable(L, -3))
-
-LUALIB_API int luaopen_zlib(lua_State * const L) {
- lz_create_deflate_mt(L);
- lz_create_inflate_mt(L);
-
- luaL_register(L, "zlib", zlib_functions);
-
- SETINT("BEST_SPEED", Z_BEST_SPEED);
- SETINT("BEST_COMPRESSION", Z_BEST_COMPRESSION);
-
- SETLITERAL("_COPYRIGHT", "Copyright (c) 2009-2010 Brian Maher");
- SETLITERAL("_DESCRIPTION", "Yet another binding to the zlib library");
- SETLITERAL("_VERSION", "lua-zlib $Id$ $Format:%d$");
-
- /* Expose this to lua so we can do a test: */
- SETINT("_TEST_BUFSIZ", LUAL_BUFFERSIZE);
-
- return 1;
-}
diff --git a/3rdparty/lua-zlib/rockspec b/3rdparty/lua-zlib/rockspec
deleted file mode 100644
index d248bc099ed..00000000000
--- a/3rdparty/lua-zlib/rockspec
+++ /dev/null
@@ -1,35 +0,0 @@
-package = "lua-zlib"
-version = "0.3-1"
-source = {
- url = "git://github.com/brimworks/lua-zlib.git",
- tag = "v0.4",
-}
-description = {
- summary = "Simple streaming interface to zlib for Lua.",
- detailed = [[
- Simple streaming interface to zlib for Lua.
- Consists of two functions: inflate and deflate.
- Both functions return "stream functions" (takes a buffer of input and returns a buffer of output).
- This project is hosted on github.
- ]],
- homepage = "https://github.com/brimworks/lua-zlib",
- license = "MIT"
-}
-dependencies = {
- "lua >= 5.1, < 5.3"
-}
-external_dependencies = {
- ZLIB = {
- header = "zlib.h"
- }
-}
-
-build = {
- type = "builtin",
- modules = {
- zlib = {
- sources = { "lua_zlib.c" };
- libraries = { "z" },
- };
- }
-}
diff --git a/3rdparty/lua-zlib/tap.lua b/3rdparty/lua-zlib/tap.lua
deleted file mode 100644
index 05266a9c997..00000000000
--- a/3rdparty/lua-zlib/tap.lua
+++ /dev/null
@@ -1,24 +0,0 @@
-local tap_module = {}
-
-local os = require("os")
-
-local counter = 1
-local failed = false
-
-function tap_module.ok(assert_true, desc)
- local msg = ( assert_true and "ok " or "not ok " ) .. counter
- if ( not assert_true ) then
- failed = true
- end
- if ( desc ) then
- msg = msg .. " - " .. desc
- end
- print(msg)
- counter = counter + 1
-end
-
-function tap_module.exit()
- os.exit(failed and 1 or 0)
-end
-
-return tap_module
diff --git a/3rdparty/lua-zlib/test.lua b/3rdparty/lua-zlib/test.lua
deleted file mode 100644
index d64e1835506..00000000000
--- a/3rdparty/lua-zlib/test.lua
+++ /dev/null
@@ -1,198 +0,0 @@
-print "1..9"
-
-local src_dir, build_dir = ...
-package.path = (src_dir or "./") .. "?.lua;" .. package.path
-package.cpath = (build_dir or "./") .. "?.so;" .. package.cpath
-
-local tap = require("tap")
-local lz = require("zlib")
-local ok = tap.ok
-local table = require("table")
-local io = require("io")
-
-function main()
- test_stats()
- test_buff_err()
- test_small_inputs()
- test_basic()
- test_large()
- test_no_input()
- test_invalid_input()
- test_streaming()
- test_illegal_state()
- test_checksum()
- test_version()
- test_tom_macwright()
- test_amnon_david()
-end
-
-function test_tom_macwright()
- local deflated =
- assert(io.open(src_dir.. "/tom_macwright.gz")):read("*a")
-
- local inflated = lz.inflate()(deflated)
-
- local expected_inflated =
- assert(io.open(src_dir.. "/tom_macwright.out")):read("*a")
-
- ok(expected_inflated == inflated, "Tom MacWright Test")
-end
-
-function test_amnon_david()
- local body = assert(io.open(src_dir.."/amnon_david.gz")):read("*a")
-
- local inflate = lz.inflate()
- local inflated, eof, bytes_in, bytes_out = inflate(body)
-
- local deflate = lz.deflate()
- local deflated, eof, bytes_in, bytes_out = deflate(inflated, "full")
-end
-
-function test_stats()
- local string = ("one"):rep(20)
- local deflated, eof, bin, bout = lz.deflate()(string, 'finish')
- ok(eof == true, "eof is true (" .. tostring(eof) .. ")");
- ok(bin > bout, "bytes in is greater than bytes out?")
- ok(#deflated == bout, "bytes out is the same size as deflated string length")
- ok(#string == bin, "bytes in is the same size as the input string length")
-end
-
--- Thanks to Tobias Markmann for the bug report! We are trying to
--- force inflate() to return a Z_BUF_ERROR (which should be recovered
--- from). For some reason this only happens when the input is exactly
--- LUAL_BUFFERSIZE (at least on my machine).
-function test_buff_err()
- local text = ("X"):rep(lz._TEST_BUFSIZ);
-
- local deflated = lz.deflate()(text, 'finish')
-
- for i=1,#deflated do
- lz.inflate()(deflated:sub(1,i))
- end
-end
-
-function test_small_inputs()
- local text = ("X"):rep(lz._TEST_BUFSIZ);
-
- local deflated = lz.deflate()(text, 'finish')
-
- local inflated = {}
- local inflator = lz.inflate()
- for i=1,#deflated do
- local part = inflator(deflated:sub(i,i))
- table.insert(inflated, part)
- end
- inflated = table.concat(inflated)
- ok(inflated == text, "Expected " .. #text .. " Xs got " .. #inflated)
-end
-
-function test_basic()
- local test_string = "abcdefghijklmnopqrstuv"
-
- ok(lz.inflate()(lz.deflate()(), "finish") == "")
-
- -- Input to deflate is same as output to inflate:
- local deflated = lz.deflate()(test_string, "finish")
- local inflated = lz.inflate()(deflated, "finish")
-
- ok(test_string == inflated, "'" .. tostring(test_string) .. "' == '" .. tostring(inflated) .. "'")
-end
-
-function test_large()
- -- Try a larger string:
- local numbers = ""
- for i=1, 100 do numbers = numbers .. string.format("%3d", i) end
- local numbers_table = {}
- for i=1, 10000 do numbers_table[i] = numbers end
- local test_string = table.concat(numbers_table, "\n")
-
- local deflated = lz.deflate()(test_string, "finish")
- local inflated = lz.inflate()(deflated, "finish")
- ok(test_string == inflated, "large string")
-end
-
-function test_no_input()
- local stream = lz.deflate()
- local deflated = stream("")
- deflated = deflated .. stream("")
- deflated = deflated .. stream(nil, "finish")
- ok("" == lz.inflate()(deflated, "finish"), "empty string")
-end
-
-function test_invalid_input()
- local stream = lz.inflate()
- local isok, err = pcall(
- function()
- stream("bad input")
- end)
- ok(not isok)
- ok(string.find(err, "^InvalidInput"),
- string.format("InvalidInput error (%s)", err))
-end
-
-function test_streaming()
- local shrink = lz.deflate(lz.BEST_COMPRESSION)
- local enlarge = lz.inflate()
- local expected = {}
- local got = {}
- local chant = "Isn't He great, isn't He wonderful?\n"
- for i=1,100 do
- if ( i == 100 ) then
- chant = nil
- print "EOF round"
- end
- local shrink_part, shrink_eof = shrink(chant)
- local enlarge_part, enlarge_eof = enlarge(shrink_part)
- if ( i == 100 ) then
- if not shrink_eof then error("expected eof after shrinking flush") end
- if not enlarge_eof then error("expected eof after enlarging") end
- else
- if shrink_eof then error("unexpected eof after shrinking") end
- if enlarge_eof then error("unexpected eof after enlarging") end
- end
- if enlarge_part then table.insert(got, enlarge_part) end
- if chant then table.insert(expected, chant) end
- end
- ok(table.concat(got) == table.concat(expected), "streaming works")
-end
-
-function test_illegal_state()
- local stream = lz.deflate()
- stream("abc")
- stream() -- eof/close
-
- local _, emsg = pcall(
- function()
- stream("printing on 'closed' handle")
- end)
- ok(string.find(emsg, "^IllegalState"),
- string.format("IllegalState error (%s)", emsg))
-
- local enlarge = lz.inflate()
-end
-
-function test_checksum()
- for _, factory in pairs{lz.crc32, lz.adler32} do
- local csum = factory()("one two")
-
- -- Multiple calls:
- local compute = factory()
- compute("one")
- assert(csum == compute(" two"))
-
- -- Multiple compute_checksums joined:
- local compute1, compute2 = factory(), factory()
- compute1("one")
- compute2(" two")
- assert(csum == compute1(compute2))
- end
-end
-
-function test_version()
- local major, minor, patch = lz.version()
- ok(1 == major, "major version 1 == " .. major);
- ok(type(minor) == "number", "minor version is number (" .. minor .. ")")
- ok(type(patch) == "number", "patch version is number (" .. patch .. ")")
-end
-
-main()
diff --git a/3rdparty/lua-zlib/tom_macwright.gz b/3rdparty/lua-zlib/tom_macwright.gz
deleted file mode 100644
index bb9060b2535..00000000000
--- a/3rdparty/lua-zlib/tom_macwright.gz
+++ /dev/null
@@ -1,4 +0,0 @@
-xŽ[
-Â0EýÎ*f–Igò(ˆèüüN“éL#mÄí[\‚—‡scÉy®Ðê*=&òNŒïƒ:'–…I˜1Yi[ØpŒ£z…U–
-Žóä¼íR?0J§îzãQê­ñÖ%I…wÊ
-÷’áâcÇ©Â)‡øù͢ÃülbÉgФÉ!·¤áˆŒ¨vºŸ¬ò§®®K‚½¾ ”E¶F}šÊHÙ \ No newline at end of file
diff --git a/3rdparty/lua-zlib/tom_macwright.out b/3rdparty/lua-zlib/tom_macwright.out
deleted file mode 100644
index ca88bcb6c2d..00000000000
--- a/3rdparty/lua-zlib/tom_macwright.out
+++ /dev/null
Binary files differ
diff --git a/3rdparty/lua-zlib/zlib.def b/3rdparty/lua-zlib/zlib.def
deleted file mode 100644
index d6c5a916b64..00000000000
--- a/3rdparty/lua-zlib/zlib.def
+++ /dev/null
@@ -1,2 +0,0 @@
-EXPORTS
-luaopen_zlib
diff --git a/3rdparty/luafilesystem/.travis.yml b/3rdparty/luafilesystem/.travis.yml
deleted file mode 100644
index 67b5812e09e..00000000000
--- a/3rdparty/luafilesystem/.travis.yml
+++ /dev/null
@@ -1,33 +0,0 @@
-language: c
-
-env:
- global:
- - LUAROCKS=2.2.0-rc1
- matrix:
- - LUA=lua5.1
- - LUA=lua5.2
- - LUA=lua5.3
- - LUA=luajit
-
-branches:
- only:
- - master
-
-before_install:
- - bash .travis/setup_lua.sh
- - sudo pip install cpp-coveralls
-
-install:
- - sudo luarocks make rockspecs/luafilesystem-cvs-3.rockspec CFLAGS="-O2 -fPIC -ftest-coverage -fprofile-arcs" LIBFLAG="-shared --coverage"
-
-script:
- - cd tests
- - sudo lua test.lua
-
-after_success:
- - coveralls -b .. -r .. -E usr
-
-notifications:
- email:
- on_success: change
- on_failure: always
diff --git a/3rdparty/luafilesystem/.travis/platform.sh b/3rdparty/luafilesystem/.travis/platform.sh
deleted file mode 100644
index 4a3af0d487e..00000000000
--- a/3rdparty/luafilesystem/.travis/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/luafilesystem/.travis/setup_lua.sh b/3rdparty/luafilesystem/.travis/setup_lua.sh
deleted file mode 100644
index 373e24d979b..00000000000
--- a/3rdparty/luafilesystem/.travis/setup_lua.sh
+++ /dev/null
@@ -1,101 +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
-
-LUAJIT_BASE="LuaJIT-2.0.3"
-
-source .travis/platform.sh
-
-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
-
-if [ "$LUAJIT" == "yes" ]; then
-
- if [ "$LUA" == "luajit" ]; then
- curl http://luajit.org/download/$LUAJIT_BASE.tar.gz | tar xz;
- else
- git clone http://luajit.org/git/luajit-2.0.git $LUAJIT_BASE;
- fi
-
- cd $LUAJIT_BASE
-
- if [ "$LUA" == "luajit2.1" ]; then
- git checkout v2.1;
- fi
-
- make && sudo make install
-
- if [ "$LUA" == "luajit2.1" ]; then
- sudo ln -s /usr/local/bin/luajit-2.1.0-alpha /usr/local/bin/luajit
- sudo ln -s /usr/local/bin/luajit /usr/local/bin/lua;
- else
- sudo ln -s /usr/local/bin/luajit /usr/local/bin/lua;
- fi;
-
-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.3.tar.gz | tar xz
- cd lua-5.2.3;
- elif [ "$LUA" == "lua5.3" ]; then
- curl http://www.lua.org/work/lua-5.3.0-beta.tar.gz | tar xz
- cd lua-5.3.0-beta;
- fi
- sudo make $PLATFORM install;
-fi
-
-cd $TRAVIS_BUILD_DIR;
-
-LUAROCKS_BASE=luarocks-$LUAROCKS
-
-# curl http://luarocks.org/releases/$LUAROCKS_BASE.tar.gz | tar xz
-
-git clone https://github.com/keplerproject/luarocks.git $LUAROCKS_BASE
-cd $LUAROCKS_BASE
-
-git checkout v$LUAROCKS
-
-if [ "$LUA" == "luajit" ]; then
- ./configure --lua-suffix=jit --with-lua-include=/usr/local/include/luajit-2.0;
-elif [ "$LUA" == "luajit2.0" ]; then
- ./configure --lua-suffix=jit --with-lua-include=/usr/local/include/luajit-2.0;
-elif [ "$LUA" == "luajit2.1" ]; then
- ./configure --lua-suffix=jit --with-lua-include=/usr/local/include/luajit-2.1;
-else
- ./configure;
-fi
-
-make build && sudo make install
-
-cd $TRAVIS_BUILD_DIR
-
-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.3;
-elif [ "$LUA" == "lua5.3" ]; then
- rm -rf lua-5.3.0-beta;
-fi
diff --git a/3rdparty/luafilesystem/LICENSE b/3rdparty/luafilesystem/LICENSE
deleted file mode 100644
index 8475345a64e..00000000000
--- a/3rdparty/luafilesystem/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-Copyright © 2003-2014 Kepler Project.
-
-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/3rdparty/luafilesystem/Makefile b/3rdparty/luafilesystem/Makefile
deleted file mode 100644
index b834a4d51ab..00000000000
--- a/3rdparty/luafilesystem/Makefile
+++ /dev/null
@@ -1,25 +0,0 @@
-# $Id: Makefile,v 1.36 2009/09/21 17:02:44 mascarenhas Exp $
-
-T= lfs
-
-CONFIG= ./config
-
-include $(CONFIG)
-
-SRCS= src/$T.c
-OBJS= src/$T.o
-
-lib: src/lfs.so
-
-src/lfs.so: $(OBJS)
- MACOSX_DEPLOYMENT_TARGET="10.3"; export MACOSX_DEPLOYMENT_TARGET; $(CC) $(CFLAGS) $(LIB_OPTION) -o src/lfs.so $(OBJS)
-
-test: lib
- LUA_CPATH=./src/?.so lua tests/test.lua
-
-install:
- mkdir -p $(LUA_LIBDIR)
- cp src/lfs.so $(LUA_LIBDIR)
-
-clean:
- rm -f src/lfs.so $(OBJS)
diff --git a/3rdparty/luafilesystem/Makefile.win b/3rdparty/luafilesystem/Makefile.win
deleted file mode 100644
index 65cab812408..00000000000
--- a/3rdparty/luafilesystem/Makefile.win
+++ /dev/null
@@ -1,25 +0,0 @@
-# $Id: Makefile.win,v 1.11 2008/05/07 19:06:37 carregal Exp $
-
-T= lfs
-
-include config.win
-
-SRCS= src\$T.c
-OBJS= src\$T.obj
-
-lib: src\lfs.dll
-
-.c.obj:
- $(CC) /c /Fo$@ $(CFLAGS) $<
-
-src\lfs.dll: $(OBJS)
- link /dll /def:src\$T.def /out:src\lfs.dll $(OBJS) "$(LUA_LIB)"
- IF EXIST src\lfs.dll.manifest mt -manifest src\lfs.dll.manifest -outputresource:src\lfs.dll;2
-
-install: src\lfs.dll
- IF NOT EXIST "$(LUA_LIBDIR)" mkdir "$(LUA_LIBDIR)"
- copy src\lfs.dll "$(LUA_LIBDIR)"
-
-clean:
- del src\lfs.dll $(OBJS) src\$T.lib src\$T.exp
- IF EXIST src\lfs.dll.manifest del src\lfs.dll.manifest \ No newline at end of file
diff --git a/3rdparty/luafilesystem/README b/3rdparty/luafilesystem/README
deleted file mode 100644
index 9d37a4e2513..00000000000
--- a/3rdparty/luafilesystem/README
+++ /dev/null
@@ -1,23 +0,0 @@
-LuaFileSystem - File System Library for Lua
-Copyright 2003-2015 Kepler Project
-
-http://keplerproject.github.io/luafilesystem
-
-Description
------------
-LuaFileSystem is a Lua library developed to complement the set of functions
-related to file systems offered by the standard Lua distribution.
-
-LuaFileSystem offers a portable way to access the underlying directory structure and file attributes.
-LuaFileSystem is free software and uses the same license as Lua 5.1
-
-LuaRocks Installation
----------------------
-
-```
-luarocks install luafilesystem
-```
-
-Documentation
--------------
-Please check the documentation at doc/us/ for more information.
diff --git a/3rdparty/luafilesystem/config b/3rdparty/luafilesystem/config
deleted file mode 100644
index cfd4c6a6d3e..00000000000
--- a/3rdparty/luafilesystem/config
+++ /dev/null
@@ -1,24 +0,0 @@
-# Installation directories
-
-# Default installation prefix
-PREFIX=/usr/local
-
-# System's libraries directory (where binary libraries are installed)
-LUA_LIBDIR= $(PREFIX)/lib/lua/5.1
-
-# Lua includes directory
-LUA_INC= $(PREFIX)/include
-
-# OS dependent
-LIB_OPTION= -shared #for Linux
-#LIB_OPTION= -bundle -undefined dynamic_lookup #for MacOS X
-
-LIBNAME= $T.so.$V
-
-# Compilation directives
-WARN= -O2 -Wall -fPIC -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings -pedantic
-INCS= -I$(LUA_INC)
-CFLAGS= $(WARN) $(INCS)
-CC= gcc
-
-# $Id: config,v 1.21 2007/10/27 22:42:32 carregal Exp $
diff --git a/3rdparty/luafilesystem/config.win b/3rdparty/luafilesystem/config.win
deleted file mode 100644
index 50e81f64206..00000000000
--- a/3rdparty/luafilesystem/config.win
+++ /dev/null
@@ -1,19 +0,0 @@
-# Installation directories
-# System's libraries directory (where binary libraries are installed)
-LUA_LIBDIR= "c:\lua5.1"
-
-# Lua includes directory
-LUA_INC= "c:\lua5.1\include"
-
-# Lua library
-LUA_LIB= "c:\lua5.1\lua5.1.lib"
-
-LIBNAME= $T.dll
-
-# Compilation directives
-WARN= /O2
-INCS= /I$(LUA_INC)
-CFLAGS= /MD $(WARN) $(INCS)
-CC= cl
-
-# $Id: config.win,v 1.7 2008/03/25 17:39:29 mascarenhas Exp $
diff --git a/3rdparty/luafilesystem/doc/us/doc.css b/3rdparty/luafilesystem/doc/us/doc.css
deleted file mode 100644
index e816a7e2c63..00000000000
--- a/3rdparty/luafilesystem/doc/us/doc.css
+++ /dev/null
@@ -1,212 +0,0 @@
-body {
- margin-left: 1em;
- margin-right: 1em;
- font-family: arial, helvetica, geneva, sans-serif;
- background-color:#ffffff; margin:0px;
-}
-
-code {
- font-family: "Andale Mono", monospace;
-}
-
-tt {
- font-family: "Andale Mono", monospace;
-}
-
-body, td, th { font-size: 11pt; }
-
-h1, h2, h3, h4 { margin-left: 0em; }
-
-textarea, pre, tt { font-size:10pt; }
-body, td, th { color:#000000; }
-small { font-size:0.85em; }
-h1 { font-size:1.5em; }
-h2 { font-size:1.25em; }
-h3 { font-size:1.15em; }
-h4 { font-size:1.06em; }
-
-a:link { font-weight:bold; color: #004080; text-decoration: none; }
-a:visited { font-weight:bold; color: #006699; text-decoration: none; }
-a:link:hover { text-decoration:underline; }
-hr { color:#cccccc }
-img { border-width: 0px; }
-
-h3 { padding-top: 1em; }
-
-p { margin-left: 1em; }
-
-p.name {
- font-family: "Andale Mono", monospace;
- padding-top: 1em;
- margin-left: 0em;
-}
-
-blockquote { margin-left: 3em; }
-
-.example {
- background-color: rgb(245, 245, 245);
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- border-top-style: solid;
- border-right-style: solid;
- border-bottom-style: solid;
- border-left-style: solid;
- border-top-color: silver;
- border-right-color: silver;
- border-bottom-color: silver;
- border-left-color: silver;
- padding: 1em;
- margin-left: 1em;
- margin-right: 1em;
- font-family: "Andale Mono", monospace;
- font-size: smaller;
-}
-
-hr {
- margin-left: 0em;
- background: #00007f;
- border: 0px;
- height: 1px;
-}
-
-ul { list-style-type: disc; }
-
-table.index { border: 1px #00007f; }
-table.index td { text-align: left; vertical-align: top; }
-table.index ul { padding-top: 0em; margin-top: 0em; }
-
-table {
- border: 1px solid black;
- border-collapse: collapse;
- margin-left: auto;
- margin-right: auto;
-}
-
-th {
- border: 1px solid black;
- padding: 0.5em;
-}
-
-td {
- border: 1px solid black;
- padding: 0.5em;
-}
-div.header, div.footer { margin-left: 0em; }
-
-#container {
- margin-left: 1em;
- margin-right: 1em;
- background-color: #f0f0f0;
-}
-
-#product {
- text-align: center;
- border-bottom: 1px solid #cccccc;
- background-color: #ffffff;
-}
-
-#product big {
- font-size: 2em;
-}
-
-#product_logo {
-}
-
-#product_name {
-}
-
-#product_description {
-}
-
-#main {
- background-color: #f0f0f0;
- border-left: 2px solid #cccccc;
-}
-
-#navigation {
- float: left;
- width: 12em;
- margin: 0;
- vertical-align: top;
- background-color: #f0f0f0;
- overflow:visible;
-}
-
-#navigation h1 {
- background-color:#e7e7e7;
- font-size:1.1em;
- color:#000000;
- text-align:left;
- margin:0px;
- padding:0.2em;
- border-top:1px solid #dddddd;
- border-bottom:1px solid #dddddd;
-}
-
-#navigation ul {
- font-size:1em;
- list-style-type: none;
- padding: 0;
- margin: 1px;
-}
-
-#navigation li {
- text-indent: -1em;
- margin: 0em 0em 0em 0.5em;
- display: block;
- padding: 3px 0px 0px 12px;
-}
-
-#navigation li li a {
- padding: 0px 3px 0px -1em;
-}
-
-#content {
- margin-left: 12em;
- padding: 1em;
- border-left: 2px solid #cccccc;
- border-right: 2px solid #cccccc;
- background-color: #ffffff;
-}
-
-#about {
- clear: both;
- margin: 0;
- padding: 5px;
- border-top: 2px solid #cccccc;
- background-color: #ffffff;
-}
-
-@media print {
- body {
- font: 10pt "Times New Roman", "TimeNR", Times, serif;
- }
- a {
- font-weight:bold; color: #004080; text-decoration: underline;
- }
- #main {
- background-color: #ffffff; border-left: 0px;
- }
- #container {
- margin-left: 2%; margin-right: 2%; background-color: #ffffff;
- }
- #content {
- margin-left: 0px; padding: 1em; border-left: 0px; border-right: 0px; background-color: #ffffff;
- }
- #navigation {
- display: none;
- }
- #product_logo {
- display: none;
- }
- #about img {
- display: none;
- }
- .example {
- font-family: "Andale Mono", monospace;
- font-size: 8pt;
- page-break-inside: avoid;
- }
-}
diff --git a/3rdparty/luafilesystem/doc/us/examples.html b/3rdparty/luafilesystem/doc/us/examples.html
deleted file mode 100644
index 2c1644cb8a0..00000000000
--- a/3rdparty/luafilesystem/doc/us/examples.html
+++ /dev/null
@@ -1,103 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <title>LuaFileSystem</title>
- <link rel="stylesheet" href="doc.css" type="text/css"/>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-</head>
-
-<body>
-
-<div id="container">
-
-<div id="product">
- <div id="product_logo">
- <a href="http://www.keplerproject.org">
- <img alt="LuaFileSystem" src="luafilesystem.png"/>
- </a>
- </div>
- <div id="product_name"><big><strong>LuaFileSystem</strong></big></div>
- <div id="product_description">File System Library for the Lua Programming Language</div>
-</div> <!-- id="product" -->
-
-<div id="main">
-
-<div id="navigation">
-<h1>LuaFileSystem</h1>
- <ul>
- <li><a href="index.html">Home</a>
- <ul>
- <li><a href="index.html#overview">Overview</a></li>
- <li><a href="index.html#status">Status</a></li>
- <li><a href="index.html#download">Download</a></li>
- <li><a href="index.html#history">History</a></li>
- <li><a href="index.html#credits">Credits</a></li>
- <li><a href="index.html#contact">Contact us</a></li>
- </ul>
- </li>
- <li><a href="manual.html">Manual</a>
- <ul>
- <li><a href="manual.html#introduction">Introduction</a></li>
- <li><a href="manual.html#building">Building</a></li>
- <li><a href="manual.html#installation">Installation</a></li>
- <li><a href="manual.html#reference">Reference</a></li>
- </ul>
- </li>
- <li><strong>Examples</strong></li>
- <li><a href="https://github.com/keplerproject/luafilesystem">Project</a>
- <ul>
- <li><a href="https://github.com/keplerproject/luafilesystem/issues">Bug Tracker</a></li>
- <li><a href="https://github.com/keplerproject/luafilesystem">Git</a></li>
- </ul>
- </li>
- <li><a href="license.html">License</a></li>
- </ul>
-</div> <!-- id="navigation" -->
-
-<div id="content">
-
-<h2><a name="example"></a>Examples</h2>
-
-<h3>Directory iterator</h3>
-
-<p>The following example iterates over a directory and recursively lists the
-attributes for each file inside it.</p>
-
-<pre class="example">
-local lfs = require"lfs"
-
-function attrdir (path)
- for file in lfs.dir(path) do
- if file ~= "." and file ~= ".." then
- local f = path..'/'..file
- print ("\t "..f)
- local attr = lfs.attributes (f)
- assert (type(attr) == "table")
- if attr.mode == "directory" then
- attrdir (f)
- else
- for name, value in pairs(attr) do
- print (name, value)
- end
- end
- end
- end
-end
-
-attrdir (".")
-</pre>
-
-</div> <!-- id="content" -->
-
-</div> <!-- id="main" -->
-
-<div id="about">
- <p><a href="http://validator.w3.org/check?uri=referer">Valid XHTML 1.0!</a></p>
- <p><small>$Id: examples.html,v 1.8 2007/12/14 15:28:04 carregal Exp $</small></p>
-</div> <!-- id="about" -->
-
-</div> <!-- id="container" -->
-
-</body>
-</html>
diff --git a/3rdparty/luafilesystem/doc/us/index.html b/3rdparty/luafilesystem/doc/us/index.html
deleted file mode 100644
index 2bb7f5d2cbb..00000000000
--- a/3rdparty/luafilesystem/doc/us/index.html
+++ /dev/null
@@ -1,218 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <title>LuaFileSystem</title>
- <link rel="stylesheet" href="doc.css" type="text/css"/>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-</head>
-
-<body>
-
-<div id="container">
-
-<div id="product">
- <div id="product_logo">
- <a href="http://www.keplerproject.org">
- <img alt="LuaFileSystem" src="luafilesystem.png"/>
- </a>
- </div>
- <div id="product_name"><big><strong>LuaFileSystem</strong></big></div>
- <div id="product_description">File System Library for the Lua Programming Language</div>
-</div> <!-- id="product" -->
-
-<div id="main">
-
-<div id="navigation">
-<h1>LuaFileSystem</h1>
- <ul>
- <li><strong>Home</strong>
- <ul>
- <li><a href="index.html#overview">Overview</a></li>
- <li><a href="index.html#status">Status</a></li>
- <li><a href="index.html#download">Download</a></li>
- <li><a href="index.html#history">History</a></li>
- <li><a href="index.html#credits">Credits</a></li>
- <li><a href="index.html#contact">Contact us</a></li>
- </ul>
- </li>
- <li><a href="manual.html">Manual</a>
- <ul>
- <li><a href="manual.html#introduction">Introduction</a></li>
- <li><a href="manual.html#building">Building</a></li>
- <li><a href="manual.html#installation">Installation</a></li>
- <li><a href="manual.html#reference">Reference</a></li>
- </ul>
- </li>
- <li><a href="examples.html">Examples</a></li>
- <li><a href="https://github.com/keplerproject/luafilesystem">Project</a>
- <ul>
- <li><a href="https://github.com/keplerproject/luafilesystem/issues">Bug Tracker</a></li>
- <li><a href="https://github.com/keplerproject/luafilesystem">Git</a></li>
- </ul>
- </li>
- <li><a href="license.html">License</a></li>
- </ul>
-</div> <!-- id="navigation" -->
-
-<div id="content">
-
-<h2><a name="overview"></a>Overview</h2>
-
-<p>LuaFileSystem is a <a href="http://www.lua.org">Lua</a> library
-developed to complement the set of functions related to file
-systems offered by the standard Lua distribution.</p>
-
-<p>LuaFileSystem offers a portable way to access
-the underlying directory structure and file attributes.</p>
-
-<p>LuaFileSystem is free software and uses the same
-<a href="license.html">license</a> as Lua 5.1.</p>
-
-<h2><a name="status"></a>Status</h2>
-
-<p>Current version is 1.6.3. It works with Lua 5.1, 5.2 and 5.3.</p>
-
-<h2><a name="download"></a>Download</h2>
-
-<p>LuaFileSystem source can be downloaded from its
-<a href="http://github.com/keplerproject/luafilesystem">Github</a>
-page.</p>
-
-<h2><a name="history"></a>History</h2>
-
-<dl class="history">
- <dt><strong>Version 1.6.3</strong> [15/Jan/2015]</dt>
- <dd><ul>
- <li>Lua 5.3 support.</li>
- <li>Assorted bugfixes.</li>
- </ul></dd>
-
- <dt><strong>Version 1.6.2</strong> [??/Oct/2012]</dt>
- <dd><ul>
- <li>Full Lua 5.2 compatibility (with Lua 5.1 fallbacks)</li>
- </ul></dd>
-
- <dt><strong>Version 1.6.1</strong> [01/Oct/2012]</dt>
- <dd><ul>
- <li>fix build for Lua 5.2</li>
- </ul></dd>
-
- <dt><strong>Version 1.6.0</strong> [26/Sep/2012]</dt>
- <dd><ul>
- <li>getcwd fix for Android</li>
- <li>support for Lua 5.2</li>
- <li>add lfs.link</li>
- <li>other bug fixes</li>
- </ul></dd>
-
- <dt><strong>Version 1.5.0</strong> [20/Oct/2009]</dt>
- <dd><ul>
- <li>Added explicit next and close methods to second return value of lfs.dir
-(the directory object), for explicit iteration or explicit closing.</li>
- <li>Added directory locking via lfs.lock_dir function (see the <a href="manual.html">manual</a>).</li>
- </ul></dd>
- <dt><strong>Version 1.4.2</strong> [03/Feb/2009]</dt>
- <dd>
- <ul>
- <li>fixed bug [<a href="http://luaforge.net/tracker/?func=detail&amp;group_id=66&amp;aid=13198&amp;atid=356">#13198</a>]
- lfs.attributes(filename, 'size') overflow on files > 2 Gb again (bug report and patch by KUBO Takehiro).</li>
- <li>fixed bug [<a href="http://luaforge.net/tracker/?group_id=66&amp;atid=356&amp;func=detail&amp;aid=39794">#39794</a>]
- Compile error on Solaris 10 (bug report and patch by Aaron B).</li>
- <li>fixed compilation problems with Borland C.</li>
- </ul>
- </dd>
-
- <dt><strong>Version 1.4.1</strong> [07/May/2008]</dt>
- <dd>
- <ul>
- <li>documentation review</li>
- <li>fixed Windows compilation issues</li>
- <li>fixed bug in the Windows tests (patch by Shmuel Zeigerman)</li>
- <li>fixed bug [<a href="http://luaforge.net/tracker/?func=detail&amp;group_id=66&amp;aid=2185&amp;atid=356">#2185</a>]
- <code>lfs.attributes(filename, 'size')</code> overflow on files > 2 Gb
- </li>
- </ul>
- </dd>
-
- <dt><strong>Version 1.4.0</strong> [13/Feb/2008]</dt>
- <dd>
- <ul>
- <li>added function
- <a href="manual.html#setmode"><code>lfs.setmode</code></a>
- (works only in Windows systems).</li>
- <li><a href="manual.html#attributes"><code>lfs.attributes</code></a>
- raises an error if attribute does not exist</li>
- </ul>
- </dd>
-
- <dt><strong>Version 1.3.0</strong> [26/Oct/2007]</dt>
- <dd>
- <ul>
- <li>added function
- <a href="manual.html#symlinkattributes"><code>lfs.symlinkattributes</code></a>
- (works only in non Windows systems).</li>
- </ul>
- </dd>
-
- <dt><strong>Version 1.2.1</strong> [08/May/2007]</dt>
- <dd>
- <ul>
- <li>compatible only with Lua 5.1 (Lua 5.0 support was dropped)</li>
- </ul>
- </dd>
-
- <dt><strong>Version 1.2</strong> [15/Mar/2006]</dt>
- <dd>
- <ul>
- <li>added optional argument to
- <a href="manual.html#attributes"><code>lfs.attributes</code></a></li>
- <li>added function
- <a href="manual.html#rmdir"><code>lfs.rmdir</code></a></li>
- <li>bug correction on <a href="manual.html#dir"><code>lfs.dir</code></a></li>
- </ul>
- </dd>
-
- <dt><strong>Version 1.1</strong> [30/May/2005]</dt>
- <dd>
- <ul>
- <li>added function <a href="manual.html#touch"><code>lfs.touch</code></a>.</li>
- </ul>
- </dd>
-
- <dt><strong>Version 1.0</strong> [21/Jan/2005]</dt>
- <dd />
-
- <dt><strong>Version 1.0 Beta</strong> [10/Nov/2004]</dt>
- <dd />
-</dl>
-
-<h2><a name="credits"></a>Credits</h2>
-
-<p>LuaFileSystem was designed by Roberto Ierusalimschy,
-Andr&eacute; Carregal and Tom&aacute;s Guisasola as part of the
-<a href="http://www.keplerproject.org">Kepler Project</a>,
-which holds its copyright. LuaFileSystem is currently maintained by F&aacute;bio Mascarenhas.</p>
-
-<h2><a name="contact"></a>Contact us</h2>
-
-<p>For more information please
-<a href="mailto:info-NO-SPAM-THANKS@keplerproject.org">contact us</a>.
-Comments are welcome!</p>
-
-<p>You can also reach other Kepler developers and users on the Kepler Project
-<a href="http://luaforge.net/mail/?group_id=104">mailing list</a>.</p>
-
-</div> <!-- id="content" -->
-
-</div> <!-- id="main" -->
-
-<div id="about">
- <p><a href="http://validator.w3.org/check?uri=referer">Valid XHTML 1.0!</a></p>
- <p><small>$Id: index.html,v 1.44 2009/02/04 21:21:33 carregal Exp $</small></p>
-</div> <!-- id="about" -->
-
-</div> <!-- id="container" -->
-
-</body>
-</html>
diff --git a/3rdparty/luafilesystem/doc/us/license.html b/3rdparty/luafilesystem/doc/us/license.html
deleted file mode 100644
index 30033817229..00000000000
--- a/3rdparty/luafilesystem/doc/us/license.html
+++ /dev/null
@@ -1,122 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <title>LuaFileSystem</title>
- <link rel="stylesheet" href="doc.css" type="text/css"/>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-</head>
-
-<body>
-
-<div id="container">
-
-<div id="product">
- <div id="product_logo">
- <a href="http://www.keplerproject.org">
- <img alt="LuaFileSystem" src="luafilesystem.png"/>
- </a>
- </div>
- <div id="product_name"><big><strong>LuaFileSystem</strong></big></div>
- <div id="product_description">File System Library for the Lua Programming Language</div>
-</div> <!-- id="product" -->
-
-<div id="main">
-
-<div id="navigation">
-<h1>LuaFileSystem</h1>
- <ul>
- <li><a href="index.html">Home</a>
- <ul>
- <li><a href="index.html#overview">Overview</a></li>
- <li><a href="index.html#status">Status</a></li>
- <li><a href="index.html#download">Download</a></li>
- <li><a href="index.html#history">History</a></li>
- <li><a href="index.html#credits">Credits</a></li>
- <li><a href="index.html#contact">Contact us</a></li>
- </ul>
- </li>
- <li><a href="manual.html">Manual</a>
- <ul>
- <li><a href="manual.html#introduction">Introduction</a></li>
- <li><a href="manual.html#building">Building</a></li>
- <li><a href="manual.html#installation">Installation</a></li>
- <li><a href="manual.html#reference">Reference</a></li>
- </ul>
- </li>
- <li><a href="examples.html">Examples</a></li>
- <li><a href="https://github.com/keplerproject/luafilesystem">Project</a>
- <ul>
- <li><a href="https://github.com/keplerproject/luafilesystem/issues/">Bug Tracker</a></li>
- <li><a href="https://github.com/keplerproject/luafilesystem">Git</a></li>
- </ul>
- </li>
- <li><strong>License</strong></li>
- </ul>
-</div> <!-- id="navigation" -->
-
-<div id="content">
-
-<h1>License</h1>
-
-<p>
-LuaFileSystem is free software: it can be used for both academic
-and commercial purposes at absolutely no cost. There are no
-royalties or GNU-like "copyleft" restrictions. LuaFileSystem
-qualifies as
-<a href="http://www.opensource.org/docs/definition.html">Open Source</a>
-software.
-Its licenses are compatible with
-<a href="http://www.gnu.org/licenses/gpl.html">GPL</a>.
-LuaFileSystem is not in the public domain and the
-<a href="http://www.keplerproject.org">Kepler Project</a>
-keep its copyright.
-The legal details are below.
-</p>
-
-<p>The spirit of the license is that you are free to use
-LuaFileSystem for any purpose at no cost without having to ask us.
-The only requirement is that if you do use LuaFileSystem, then you
-should give us credit by including the appropriate copyright notice
-somewhere in your product or its documentation.</p>
-
-<p>The LuaFileSystem library is designed and implemented by Roberto
-Ierusalimschy, Andr&eacute; Carregal and Tom&aacute;s Guisasola.
-The implementation is not derived from licensed software.</p>
-
-<hr/>
-<p>Copyright &copy; 2003 Kepler Project.</p>
-
-<p>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:</p>
-
-<p>The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.</p>
-
-<p>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.</p>
-
-</div> <!-- id="content" -->
-
-</div> <!-- id="main" -->
-
-<div id="about">
- <p><a href="http://validator.w3.org/check?uri=referer">Valid XHTML 1.0!</a></p>
- <p><small>$Id: license.html,v 1.13 2008/02/11 22:42:21 carregal Exp $</small></p>
-</div><!-- id="about" -->
-
-</div><!-- id="container" -->
-
-</body>
-</html>
diff --git a/3rdparty/luafilesystem/doc/us/luafilesystem.png b/3rdparty/luafilesystem/doc/us/luafilesystem.png
deleted file mode 100644
index e1dd8c65b52..00000000000
--- a/3rdparty/luafilesystem/doc/us/luafilesystem.png
+++ /dev/null
Binary files differ
diff --git a/3rdparty/luafilesystem/doc/us/manual.html b/3rdparty/luafilesystem/doc/us/manual.html
deleted file mode 100644
index 33c1cbea573..00000000000
--- a/3rdparty/luafilesystem/doc/us/manual.html
+++ /dev/null
@@ -1,280 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <title>LuaFileSystem</title>
- <link rel="stylesheet" href="doc.css" type="text/css"/>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-</head>
-
-<body>
-
-<div id="container">
-
-<div id="product">
- <div id="product_logo">
- <a href="http://www.keplerproject.org"><img alt="LuaFileSystem" src="luafilesystem.png"/></a>
- </div>
- <div id="product_name"><big><strong>LuaFileSystem</strong></big></div>
- <div id="product_description">File System Library for the Lua Programming Language</div>
-</div> <!-- id="product" -->
-
-<div id="main">
-
-<div id="navigation">
-<h1>LuaFileSystem</h1>
- <ul>
- <li><a href="index.html">Home</a>
- <ul>
- <li><a href="index.html#overview">Overview</a></li>
- <li><a href="index.html#status">Status</a></li>
- <li><a href="index.html#download">Download</a></li>
- <li><a href="index.html#history">History</a></li>
- <li><a href="index.html#credits">Credits</a></li>
- <li><a href="index.html#contact">Contact us</a></li>
- </ul>
- </li>
- <li><strong>Manual</strong>
- <ul>
- <li><a href="manual.html#introduction">Introduction</a></li>
- <li><a href="manual.html#building">Building</a></li>
- <li><a href="manual.html#installation">Installation</a></li>
- <li><a href="manual.html#reference">Reference</a></li>
- </ul>
- </li>
- <li><a href="examples.html">Examples</a></li>
- <li><a href="https://github.com/keplerproject/luafilesystem">Project</a>
- <ul>
- <li><a href="https://github.com/keplerproject/luafilesystem/issues">Bug Tracker</a></li>
- <li><a href="https://github.com/keplerproject/luafilesystem">Git</a></li>
- </ul>
- </li>
- <li><a href="license.html">License</a></li>
- </ul>
-</div> <!-- id="navigation" -->
-
-<div id="content">
-
-<h2><a name="introduction"></a>Introduction</h2>
-
-<p>LuaFileSystem is a <a href="http://www.lua.org">Lua</a> library
-developed to complement the set of functions related to file
-systems offered by the standard Lua distribution.</p>
-
-<p>LuaFileSystem offers a portable way to access
-the underlying directory structure and file attributes.</p>
-
-<h2><a name="building"></a>Building</h2>
-
-<p>
-LuaFileSystem should be built with Lua 5.1 so the language library
-and header files for the target version must be installed properly.
-</p>
-
-<p>
-LuaFileSystem offers a Makefile and a separate configuration file,
-<code>config</code>,
-which should be edited to suit your installation before running
-<code>make</code>.
-The file has some definitions like paths to the external libraries,
-compiler options and the like.
-</p>
-
-<p>On Windows, the C runtime used to compile LuaFileSystem must be the same
-runtime that Lua uses, or some LuaFileSystem functions will not work.</p>
-
-<h2><a name="installation"></a>Installation</h2>
-
-<p>The easiest way to install LuaFileSystem is to use LuaRocks:</p>
-
-<pre class="example">
-luarocks install luafilesystem
-</pre>
-
-<p>If you prefer to install LuaFileSystem manually, the compiled binary should be copied to a directory in your
-<a href="http://www.lua.org/manual/5.1/manual.html#pdf-package.cpath">C path</a>.</p>
-
-<h2><a name="reference"></a>Reference</h2>
-
-<p>
-LuaFileSystem offers the following functions:
-</p>
-
-<dl class="reference">
- <dt><a name="attributes"></a><strong><code>lfs.attributes (filepath [, aname])</code></strong></dt>
- <dd>Returns a table with the file attributes corresponding to
- <code>filepath</code> (or <code>nil</code> followed by an error message
- in case of error).
- If the second optional argument is given, then only the value of the
- named attribute is returned (this use is equivalent to
- <code>lfs.attributes(filepath).aname</code>, but the table is not created
- and only one attribute is retrieved from the O.S.).
- The attributes are described as follows;
- attribute <code>mode</code> is a string, all the others are numbers,
- and the time related attributes use the same time reference of
- <a href="http://www.lua.org/manual/5.1/manual.html#pdf-os.time"><code>os.time</code></a>:
- <dl>
- <dt><strong><code>dev</code></strong></dt>
- <dd>on Unix systems, this represents the device that the inode resides on. On Windows systems,
- represents the drive number of the disk containing the file</dd>
-
- <dt><strong><code>ino</code></strong></dt>
- <dd>on Unix systems, this represents the inode number. On Windows systems this has no meaning</dd>
-
- <dt><strong><code>mode</code></strong></dt>
- <dd>string representing the associated protection mode (the values could be
- <code>file</code>, <code>directory</code>, <code>link</code>, <code>socket</code>,
- <code>named pipe</code>, <code>char device</code>, <code>block device</code> or
- <code>other</code>)</dd>
-
- <dt><strong><code>nlink</code></strong></dt>
- <dd>number of hard links to the file</dd>
-
- <dt><strong><code>uid</code></strong></dt>
- <dd>user-id of owner (Unix only, always 0 on Windows)</dd>
-
- <dt><strong><code>gid</code></strong></dt>
- <dd>group-id of owner (Unix only, always 0 on Windows)</dd>
-
- <dt><strong><code>rdev</code></strong></dt>
- <dd>on Unix systems, represents the device type, for special file inodes.
- On Windows systems represents the same as <code>dev</code></dd>
-
- <dt><strong><code>access</code></strong></dt>
- <dd>time of last access</dd>
-
- <dt><strong><code>modification</code></strong></dt>
- <dd>time of last data modification</dd>
-
- <dt><strong><code>change</code></strong></dt>
- <dd>time of last file status change</dd>
-
- <dt><strong><code>size</code></strong></dt>
- <dd>file size, in bytes</dd>
-
- <dt><strong><code>blocks</code></strong></dt>
- <dd>block allocated for file; (Unix only)</dd>
-
- <dt><strong><code>blksize</code></strong></dt>
- <dd>optimal file system I/O blocksize; (Unix only)</dd>
- </dl>
- This function uses <code>stat</code> internally thus if the given
- <code>filepath</code> is a symbolic link, it is followed (if it points to
- another link the chain is followed recursively) and the information
- is about the file it refers to.
- To obtain information about the link itself, see function
- <a href="#symlinkattributes">lfs.symlinkattributes</a>.
- </dd>
-
- <dt><a name="chdir"></a><strong><code>lfs.chdir (path)</code></strong></dt>
- <dd>Changes the current working directory to the given
- <code>path</code>.<br />
- Returns <code>true</code> in case of success or <code>nil</code> plus an
- error string.</dd>
-
- <dt><a name="chdir"></a><strong><code>lfs.lock_dir(path, [seconds_stale])</code></strong></dt>
- <dd>Creates a lockfile (called lockfile.lfs) in <code>path</code> if it does not
- exist and returns the lock. If the lock already exists checks if
- it's stale, using the second parameter (default for the second
- parameter is <code>INT_MAX</code>, which in practice means the lock will never
- be stale. To free the the lock call <code>lock:free()</code>. <br/>
- In case of any errors it returns nil and the error message. In
- particular, if the lock exists and is not stale it returns the
- "File exists" message.</dd>
-
- <dt><a name="getcwd"></a><strong><code>lfs.currentdir ()</code></strong></dt>
- <dd>Returns a string with the current working directory or <code>nil</code>
- plus an error string.</dd>
-
- <dt><a name="dir"></a><strong><code>iter, dir_obj = lfs.dir (path)</code></strong></dt>
- <dd>
- Lua iterator over the entries of a given directory.
- Each time the iterator is called with <code>dir_obj</code> it returns a directory entry's name as a string, or
- <code>nil</code> if there are no more entries. You can also iterate by calling <code>dir_obj:next()</code>, and
- explicitly close the directory before the iteration finished with <code>dir_obj:close()</code>.
- Raises an error if <code>path</code> is not a directory.
- </dd>
-
- <dt><a name="lock"></a><strong><code>lfs.lock (filehandle, mode[, start[, length]])</code></strong></dt>
- <dd>Locks a file or a part of it. This function works on <em>open files</em>; the
- file handle should be specified as the first argument.
- The string <code>mode</code> could be either
- <code>r</code> (for a read/shared lock) or <code>w</code> (for a
- write/exclusive lock). The optional arguments <code>start</code>
- and <code>length</code> can be used to specify a starting point and
- its length; both should be numbers.<br />
- Returns <code>true</code> if the operation was successful; in
- case of error, it returns <code>nil</code> plus an error string.
- </dd>
-
- <dt><a name="link"></a><strong><code>lfs.link (old, new[, symlink])</code></strong></dt>
- <dd>Creates a link. The first argument is the object to link to
- and the second is the name of the link. If the optional third
- argument is true, the link will by a symbolic link (by default, a
- hard link is created).
- </dd>
-
- <dt><a name="mkdir"></a><strong><code>lfs.mkdir (dirname)</code></strong></dt>
- <dd>Creates a new directory. The argument is the name of the new
- directory.<br />
- Returns <code>true</code> if the operation was successful;
- in case of error, it returns <code>nil</code> plus an error string.
- </dd>
-
- <dt><a name="rmdir"></a><strong><code>lfs.rmdir (dirname)</code></strong></dt>
- <dd>Removes an existing directory. The argument is the name of the directory.<br />
- Returns <code>true</code> if the operation was successful;
- in case of error, it returns <code>nil</code> plus an error string.</dd>
-
- <dt><a name="setmode"></a><strong><code>lfs.setmode (file, mode)</code></strong></dt>
- <dd>Sets the writing mode for a file. The mode string can be either <code>"binary"</code> or <code>"text"</code>.
- Returns <code>true</code> followed the previous mode string for the file, or
- <code>nil</code> followed by an error string in case of errors.
- On non-Windows platforms, where the two modes are identical,
- setting the mode has no effect, and the mode is always returned as <code>binary</code>.
- </dd>
-
- <dt><a name="symlinkattributes"></a><strong><code>lfs.symlinkattributes (filepath [, aname])</code></strong></dt>
- <dd>Identical to <a href="#attributes">lfs.attributes</a> except that
- it obtains information about the link itself (not the file it refers to).
- On Windows this function does not yet support links, and is identical to
- <code>lfs.attributes</code>.
- </dd>
-
- <dt><a name="touch"></a><strong><code>lfs.touch (filepath [, atime [, mtime]])</code></strong></dt>
- <dd>Set access and modification times of a file. This function is
- a bind to <code>utime</code> function. The first argument is the
- filename, the second argument (<code>atime</code>) is the access time,
- and the third argument (<code>mtime</code>) is the modification time.
- Both times are provided in seconds (which should be generated with
- Lua standard function <code>os.time</code>).
- If the modification time is omitted, the access time provided is used;
- if both times are omitted, the current time is used.<br />
- Returns <code>true</code> if the operation was successful;
- in case of error, it returns <code>nil</code> plus an error string.
- </dd>
-
- <dt><a name="unlock"></a><strong><code>lfs.unlock (filehandle[, start[, length]])</code></strong></dt>
- <dd>Unlocks a file or a part of it. This function works on
- <em>open files</em>; the file handle should be specified as the first
- argument. The optional arguments <code>start</code> and
- <code>length</code> can be used to specify a starting point and its
- length; both should be numbers.<br />
- Returns <code>true</code> if the operation was successful;
- in case of error, it returns <code>nil</code> plus an error string.
- </dd>
-</dl>
-
-</div> <!-- id="content" -->
-
-</div> <!-- id="main" -->
-
-<div id="about">
- <p><a href="http://validator.w3.org/check?uri=referer">Valid XHTML 1.0!</a></p>
- <p><small>$Id: manual.html,v 1.45 2009/06/03 20:53:55 mascarenhas Exp $</small></p>
-</div> <!-- id="about" -->
-
-</div> <!-- id="container" -->
-
-</body>
-</html>
diff --git a/3rdparty/luafilesystem/rockspecs/luafilesystem-1.3.0-1.rockspec b/3rdparty/luafilesystem/rockspecs/luafilesystem-1.3.0-1.rockspec
deleted file mode 100644
index d4d484f68a7..00000000000
--- a/3rdparty/luafilesystem/rockspecs/luafilesystem-1.3.0-1.rockspec
+++ /dev/null
@@ -1,27 +0,0 @@
-package = "LuaFileSystem"
-version = "1.3.0-1"
-source = {
- url = "http://luaforge.net/frs/download.php/2679/luafilesystem-1.3.0.tar.gz"
-}
-description = {
- summary = "File System Library for the Lua Programming Language",
- detailed = [[
- LuaFileSystem is a Lua library developed to complement the set of
- functions related to file systems offered by the standard Lua
- distribution. LuaFileSystem offers a portable way to access the
- underlying directory structure and file attributes.
- ]]
-}
-dependencies = {
- "lua >= 5.1"
-}
-build = {
- type = "make",
- build_variables = {
- LUA_INC = "$(LUA_INCDIR)",
- LIB_OPTION = "$(LIBFLAG)"
- },
- install_variables = {
- LUA_LIBDIR = "$(LIBDIR)"
- }
-}
diff --git a/3rdparty/luafilesystem/rockspecs/luafilesystem-1.4.0-1.rockspec b/3rdparty/luafilesystem/rockspecs/luafilesystem-1.4.0-1.rockspec
deleted file mode 100644
index b6936182394..00000000000
--- a/3rdparty/luafilesystem/rockspecs/luafilesystem-1.4.0-1.rockspec
+++ /dev/null
@@ -1,27 +0,0 @@
-package = "LuaFileSystem"
-version = "1.4.0-1"
-source = {
- url = "http://luaforge.net/frs/download.php/3158/luafilesystem-1.4.0.tar.gz"
-}
-description = {
- summary = "File System Library for the Lua Programming Language",
- detailed = [[
- LuaFileSystem is a Lua library developed to complement the set of
- functions related to file systems offered by the standard Lua
- distribution. LuaFileSystem offers a portable way to access the
- underlying directory structure and file attributes.
- ]]
-}
-dependencies = {
- "lua >= 5.1"
-}
-build = {
- type = "make",
- build_variables = {
- LUA_INC = "$(LUA_INCDIR)",
- LIB_OPTION = "$(LIBFLAG)"
- },
- install_variables = {
- LUA_LIBDIR = "$(LIBDIR)"
- }
-}
diff --git a/3rdparty/luafilesystem/rockspecs/luafilesystem-1.4.0-2.rockspec b/3rdparty/luafilesystem/rockspecs/luafilesystem-1.4.0-2.rockspec
deleted file mode 100644
index f7ed871527f..00000000000
--- a/3rdparty/luafilesystem/rockspecs/luafilesystem-1.4.0-2.rockspec
+++ /dev/null
@@ -1,43 +0,0 @@
-package = "LuaFileSystem"
-version = "1.4.0-2"
-source = {
- url = "http://luaforge.net/frs/download.php/3158/luafilesystem-1.4.0.tar.gz"
-}
-description = {
- summary = "File System Library for the Lua Programming Language",
- detailed = [[
- LuaFileSystem is a Lua library developed to complement the set of
- functions related to file systems offered by the standard Lua
- distribution. LuaFileSystem offers a portable way to access the
- underlying directory structure and file attributes.
- ]]
-}
-dependencies = {
- "lua >= 5.1"
-}
-build = {
- platforms = {
- unix = {
- type = "make",
- build_variables = {
- LIB_OPTION = "$(LIBFLAG)",
- CFLAGS = "$(CFLAGS) -I$(LUA_INCDIR)",
- },
- install_variables = {
- LUA_LIBDIR = "$(LIBDIR)"
- }
- },
- win32 = {
- type = "make",
- build_variables = {
- LUA_LIB = "$(LUA_LIBDIR)\\lua5.1.lib",
- CFLAGS = "/MD $(CFLAGS) /I$(LUA_INCDIR)",
- },
- install_variables = {
- LUA_LIBDIR = "$(LIBDIR)",
- LUA_DIR = "$(LUADIR)",
- BIN_DIR = "$(BINDIR)"
- }
- }
- }
-} \ No newline at end of file
diff --git a/3rdparty/luafilesystem/rockspecs/luafilesystem-1.4.1-1.rockspec b/3rdparty/luafilesystem/rockspecs/luafilesystem-1.4.1-1.rockspec
deleted file mode 100644
index db3a3ebb6df..00000000000
--- a/3rdparty/luafilesystem/rockspecs/luafilesystem-1.4.1-1.rockspec
+++ /dev/null
@@ -1,43 +0,0 @@
-package = "LuaFileSystem"
-version = "1.4.1-1"
-source = {
- url = "http://luaforge.net/frs/download.php/3345/luafilesystem-1.4.1.tar.gz",
-}
-description = {
- summary = "File System Library for the Lua Programming Language",
- detailed = [[
- LuaFileSystem is a Lua library developed to complement the set of
- functions related to file systems offered by the standard Lua
- distribution. LuaFileSystem offers a portable way to access the
- underlying directory structure and file attributes.
- ]]
-}
-dependencies = {
- "lua >= 5.1"
-}
-build = {
- platforms = {
- unix = {
- type = "make",
- build_variables = {
- LIB_OPTION = "$(LIBFLAG)",
- CFLAGS = "$(CFLAGS) -I$(LUA_INCDIR) $(STAT64)",
- },
- install_variables = {
- LUA_LIBDIR = "$(LIBDIR)"
- }
- },
- win32 = {
- type = "make",
- build_variables = {
- LUA_LIB = "$(LUA_LIBDIR)\\lua5.1.lib",
- CFLAGS = "/MD $(CFLAGS) /I$(LUA_INCDIR)",
- },
- install_variables = {
- LUA_LIBDIR = "$(LIBDIR)",
- LUA_DIR = "$(LUADIR)",
- BIN_DIR = "$(BINDIR)"
- }
- }
- }
-}
diff --git a/3rdparty/luafilesystem/rockspecs/luafilesystem-1.4.1rc1-1.rockspec b/3rdparty/luafilesystem/rockspecs/luafilesystem-1.4.1rc1-1.rockspec
deleted file mode 100644
index 1194711715b..00000000000
--- a/3rdparty/luafilesystem/rockspecs/luafilesystem-1.4.1rc1-1.rockspec
+++ /dev/null
@@ -1,43 +0,0 @@
-package = "LuaFileSystem"
-version = "1.4.1rc1-1"
-source = {
- url = "http://luafilesystem.luaforge.net/luafilesystem-1.4.1rc1.tar.gz",
-}
-description = {
- summary = "File System Library for the Lua Programming Language",
- detailed = [[
- LuaFileSystem is a Lua library developed to complement the set of
- functions related to file systems offered by the standard Lua
- distribution. LuaFileSystem offers a portable way to access the
- underlying directory structure and file attributes.
- ]]
-}
-dependencies = {
- "lua >= 5.1"
-}
-build = {
- platforms = {
- unix = {
- type = "make",
- build_variables = {
- LIB_OPTION = "$(LIBFLAG)",
- CFLAGS = "$(CFLAGS) -I$(LUA_INCDIR) $(STAT64)",
- },
- install_variables = {
- LUA_LIBDIR = "$(LIBDIR)"
- }
- },
- win32 = {
- type = "make",
- build_variables = {
- LUA_LIB = "$(LUA_LIBDIR)\\lua5.1.lib",
- CFLAGS = "/MD $(CFLAGS) /I$(LUA_INCDIR)",
- },
- install_variables = {
- LUA_LIBDIR = "$(LIBDIR)",
- LUA_DIR = "$(LUADIR)",
- BIN_DIR = "$(BINDIR)"
- }
- }
- }
-}
diff --git a/3rdparty/luafilesystem/rockspecs/luafilesystem-1.4.2-1.rockspec b/3rdparty/luafilesystem/rockspecs/luafilesystem-1.4.2-1.rockspec
deleted file mode 100644
index 7cfe92b78ef..00000000000
--- a/3rdparty/luafilesystem/rockspecs/luafilesystem-1.4.2-1.rockspec
+++ /dev/null
@@ -1,26 +0,0 @@
-package = "LuaFileSystem"
-
-version = "1.4.2-1"
-
-source = {
- url = "http://luaforge.net/frs/download.php/3931/luafilesystem-1.4.2.tar.gz",
-}
-
-description = {
- summary = "File System Library for the Lua Programming Language",
- detailed = [[
- LuaFileSystem is a Lua library developed to complement the set of
- functions related to file systems offered by the standard Lua
- distribution. LuaFileSystem offers a portable way to access the
- underlying directory structure and file attributes.
- ]]
-}
-
-dependencies = {
- "lua >= 5.1"
-}
-
-build = {
- type = "module",
- modules = { lfs = "src/lfs.c" }
-} \ No newline at end of file
diff --git a/3rdparty/luafilesystem/rockspecs/luafilesystem-1.5.0-1.rockspec b/3rdparty/luafilesystem/rockspecs/luafilesystem-1.5.0-1.rockspec
deleted file mode 100644
index 1170ad25c90..00000000000
--- a/3rdparty/luafilesystem/rockspecs/luafilesystem-1.5.0-1.rockspec
+++ /dev/null
@@ -1,27 +0,0 @@
-package = "LuaFileSystem"
-
-version = "1.5.0-1"
-
-source = {
- url = "http://cloud.github.com/downloads/keplerproject/luafilesystem/luafilesystem-1.5.0.tar.gz",
-}
-
-description = {
- summary = "File System Library for the Lua Programming Language",
- detailed = [[
- LuaFileSystem is a Lua library developed to complement the set of
- functions related to file systems offered by the standard Lua
- distribution. LuaFileSystem offers a portable way to access the
- underlying directory structure and file attributes.
- ]]
-}
-
-dependencies = {
- "lua >= 5.1"
-}
-
-build = {
- type = "module",
- modules = { lfs = "src/lfs.c" },
- copy_directories = { "doc", "tests" }
-}
diff --git a/3rdparty/luafilesystem/rockspecs/luafilesystem-1.6.0-1.rockspec b/3rdparty/luafilesystem/rockspecs/luafilesystem-1.6.0-1.rockspec
deleted file mode 100644
index 82d349cf016..00000000000
--- a/3rdparty/luafilesystem/rockspecs/luafilesystem-1.6.0-1.rockspec
+++ /dev/null
@@ -1,27 +0,0 @@
-package = "LuaFileSystem"
-
-version = "1.6.0-1"
-
-source = {
- url = "https://github.com/downloads/keplerproject/luafilesystem/luafilesystem-1.6.0.tar.gz",
-}
-
-description = {
- summary = "File System Library for the Lua Programming Language",
- detailed = [[
- LuaFileSystem is a Lua library developed to complement the set of
- functions related to file systems offered by the standard Lua
- distribution. LuaFileSystem offers a portable way to access the
- underlying directory structure and file attributes.
- ]]
-}
-
-dependencies = {
- "lua >= 5.1"
-}
-
-build = {
- type = "builtin",
- modules = { lfs = "src/lfs.c" },
- copy_directories = { "doc", "tests" }
-}
diff --git a/3rdparty/luafilesystem/rockspecs/luafilesystem-1.6.1-1.rockspec b/3rdparty/luafilesystem/rockspecs/luafilesystem-1.6.1-1.rockspec
deleted file mode 100644
index 7f45e332c44..00000000000
--- a/3rdparty/luafilesystem/rockspecs/luafilesystem-1.6.1-1.rockspec
+++ /dev/null
@@ -1,27 +0,0 @@
-package = "LuaFileSystem"
-
-version = "1.6.1-1"
-
-source = {
- url = "https://github.com/downloads/keplerproject/luafilesystem/luafilesystem-1.6.1.tar.gz",
-}
-
-description = {
- summary = "File System Library for the Lua Programming Language",
- detailed = [[
- LuaFileSystem is a Lua library developed to complement the set of
- functions related to file systems offered by the standard Lua
- distribution. LuaFileSystem offers a portable way to access the
- underlying directory structure and file attributes.
- ]]
-}
-
-dependencies = {
- "lua >= 5.1"
-}
-
-build = {
- type = "builtin",
- modules = { lfs = "src/lfs.c" },
- copy_directories = { "doc", "tests" }
-}
diff --git a/3rdparty/luafilesystem/rockspecs/luafilesystem-1.6.2-1.rockspec b/3rdparty/luafilesystem/rockspecs/luafilesystem-1.6.2-1.rockspec
deleted file mode 100644
index 1c11efc89e1..00000000000
--- a/3rdparty/luafilesystem/rockspecs/luafilesystem-1.6.2-1.rockspec
+++ /dev/null
@@ -1,27 +0,0 @@
-package = "LuaFileSystem"
-
-version = "1.6.2-1"
-
-source = {
- url = "https://github.com/downloads/keplerproject/luafilesystem/luafilesystem-1.6.2.tar.gz",
-}
-
-description = {
- summary = "File System Library for the Lua Programming Language",
- detailed = [[
- LuaFileSystem is a Lua library developed to complement the set of
- functions related to file systems offered by the standard Lua
- distribution. LuaFileSystem offers a portable way to access the
- underlying directory structure and file attributes.
- ]]
-}
-
-dependencies = {
- "lua >= 5.1"
-}
-
-build = {
- type = "builtin",
- modules = { lfs = "src/lfs.c" },
- copy_directories = { "doc", "tests" }
-}
diff --git a/3rdparty/luafilesystem/rockspecs/luafilesystem-1.6.3-1.rockspec b/3rdparty/luafilesystem/rockspecs/luafilesystem-1.6.3-1.rockspec
deleted file mode 100644
index 89b25d42fe3..00000000000
--- a/3rdparty/luafilesystem/rockspecs/luafilesystem-1.6.3-1.rockspec
+++ /dev/null
@@ -1,28 +0,0 @@
-package = "LuaFileSystem"
-version = "1.6.3-1"
-source = {
- url = "git://github.com/keplerproject/luafilesystem",
- tag = "v_1_6_3",
-}
-description = {
- summary = "File System Library for the Lua Programming Language",
- detailed = [[
- LuaFileSystem is a Lua library developed to complement the set of
- functions related to file systems offered by the standard Lua
- distribution. LuaFileSystem offers a portable way to access the
- underlying directory structure and file attributes.
- ]],
- license = "MIT/X11",
-}
-dependencies = {
- "lua >= 5.1"
-}
-build = {
- type = "builtin",
- modules = {
- lfs = "src/lfs.c"
- },
- copy_directories = {
- "doc", "tests"
- }
-}
diff --git a/3rdparty/luafilesystem/rockspecs/luafilesystem-cvs-1.rockspec b/3rdparty/luafilesystem/rockspecs/luafilesystem-cvs-1.rockspec
deleted file mode 100644
index a02d4f14e71..00000000000
--- a/3rdparty/luafilesystem/rockspecs/luafilesystem-cvs-1.rockspec
+++ /dev/null
@@ -1,44 +0,0 @@
-package = "LuaFileSystem"
-version = "cvs-1"
-source = {
- url = "cvs://:pserver:anonymous:@cvs.luaforge.net:/cvsroot/luafilesystem",
- cvs_tag = "HEAD"
-}
-description = {
- summary = "File System Library for the Lua Programming Language",
- detailed = [[
- LuaFileSystem is a Lua library developed to complement the set of
- functions related to file systems offered by the standard Lua
- distribution. LuaFileSystem offers a portable way to access the
- underlying directory structure and file attributes.
- ]]
-}
-dependencies = {
- "lua >= 5.1"
-}
-build = {
- platforms = {
- unix = {
- type = "make",
- build_variables = {
- LIB_OPTION = "$(LIBFLAG)",
- CFLAGS = "$(CFLAGS) -I$(LUA_INCDIR)",
- },
- install_variables = {
- LUA_LIBDIR = "$(LIBDIR)"
- }
- },
- win32 = {
- type = "make",
- build_variables = {
- LUA_LIB = "$(LUA_LIBDIR)\\lua5.1.lib",
- CFLAGS = "$(CFLAGS) /I$(LUA_INCDIR)",
- },
- install_variables = {
- LUA_LIBDIR = "$(LIBDIR)",
- LUA_DIR = "$(LUADIR)",
- BIN_DIR = "$(BINDIR)"
- }
- }
- }
-}
diff --git a/3rdparty/luafilesystem/rockspecs/luafilesystem-cvs-2.rockspec b/3rdparty/luafilesystem/rockspecs/luafilesystem-cvs-2.rockspec
deleted file mode 100644
index 651c7cf1317..00000000000
--- a/3rdparty/luafilesystem/rockspecs/luafilesystem-cvs-2.rockspec
+++ /dev/null
@@ -1,26 +0,0 @@
-package = "LuaFileSystem"
-
-version = "cvs-2"
-
-source = {
- url = "git://github.com/keplerproject/luafilesystem.git",
-}
-
-description = {
- summary = "File System Library for the Lua Programming Language",
- detailed = [[
- LuaFileSystem is a Lua library developed to complement the set of
- functions related to file systems offered by the standard Lua
- distribution. LuaFileSystem offers a portable way to access the
- underlying directory structure and file attributes.
- ]]
-}
-
-dependencies = {
- "lua >= 5.1"
-}
-
-build = {
- type = "module",
- modules = { lfs = "src/lfs.c" }
-}
diff --git a/3rdparty/luafilesystem/rockspecs/luafilesystem-cvs-3.rockspec b/3rdparty/luafilesystem/rockspecs/luafilesystem-cvs-3.rockspec
deleted file mode 100644
index a4388cd7619..00000000000
--- a/3rdparty/luafilesystem/rockspecs/luafilesystem-cvs-3.rockspec
+++ /dev/null
@@ -1,27 +0,0 @@
-package = "LuaFileSystem"
-
-version = "cvs-3"
-
-source = {
- url = "git://github.com/keplerproject/luafilesystem.git",
-}
-
-description = {
- summary = "File System Library for the Lua Programming Language",
- detailed = [[
- LuaFileSystem is a Lua library developed to complement the set of
- functions related to file systems offered by the standard Lua
- distribution. LuaFileSystem offers a portable way to access the
- underlying directory structure and file attributes.
- ]]
-}
-
-dependencies = {
- "lua >= 5.1, < 5.4"
-}
-
-build = {
- type = "builtin",
- modules = { lfs = "src/lfs.c" },
- copy_directories = { "doc", "tests" }
-}
diff --git a/3rdparty/luafilesystem/src/.gitignore b/3rdparty/luafilesystem/src/.gitignore
deleted file mode 100644
index 9d22eb46a9c..00000000000
--- a/3rdparty/luafilesystem/src/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*.o
-*.so
diff --git a/3rdparty/luafilesystem/src/lfs.c b/3rdparty/luafilesystem/src/lfs.c
deleted file mode 100644
index ac483fa067b..00000000000
--- a/3rdparty/luafilesystem/src/lfs.c
+++ /dev/null
@@ -1,906 +0,0 @@
-/*
-** LuaFileSystem
-** Copyright Kepler Project 2003 (http://www.keplerproject.org/luafilesystem)
-**
-** File system manipulation library.
-** This library offers these functions:
-** lfs.attributes (filepath [, attributename])
-** lfs.chdir (path)
-** lfs.currentdir ()
-** lfs.dir (path)
-** lfs.lock (fh, mode)
-** lfs.lock_dir (path)
-** lfs.mkdir (path)
-** lfs.rmdir (path)
-** lfs.setmode (filepath, mode)
-** lfs.symlinkattributes (filepath [, attributename]) -- thanks to Sam Roberts
-** lfs.touch (filepath [, atime [, mtime]])
-** lfs.unlock (fh)
-**
-** $Id: lfs.c,v 1.61 2009/07/04 02:10:16 mascarenhas Exp $
-*/
-
-#ifndef LFS_DO_NOT_USE_LARGE_FILE
-#ifndef _WIN32
-#ifndef _AIX
-#define _FILE_OFFSET_BITS 64 /* Linux, Solaris and HP-UX */
-#else
-#define _LARGE_FILES 1 /* AIX */
-#endif
-#endif
-#endif
-
-#ifndef LFS_DO_NOT_USE_LARGE_FILE
-#define _LARGEFILE64_SOURCE
-#endif
-
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <time.h>
-#include <sys/stat.h>
-
-#ifdef _WIN32
-#include <direct.h>
-#include <windows.h>
-#include <io.h>
-#include <sys/locking.h>
-#ifdef __BORLANDC__
- #include <utime.h>
-#else
- #include <sys/utime.h>
-#endif
-#include <fcntl.h>
-#else
-#include <unistd.h>
-#include <dirent.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <utime.h>
-#endif
-
-#include <lua.h>
-#include <lauxlib.h>
-#include <lualib.h>
-
-#include "lfs.h"
-
-#define LFS_VERSION "1.6.3"
-#define LFS_LIBNAME "lfs"
-
-#if LUA_VERSION_NUM >= 503 /* Lua 5.3 */
-
-#ifndef luaL_optlong
-#define luaL_optlong luaL_optinteger
-#endif
-
-#endif
-
-#if LUA_VERSION_NUM < 502
-# define luaL_newlib(L,l) (lua_newtable(L), luaL_register(L,NULL,l))
-#endif
-
-/* Define 'strerror' for systems that do not implement it */
-#ifdef NO_STRERROR
-#define strerror(_) "System unable to describe the error"
-#endif
-
-/* Define 'getcwd' for systems that do not implement it */
-#ifdef NO_GETCWD
-#define getcwd(p,s) NULL
-#define getcwd_error "Function 'getcwd' not provided by system"
-#else
-#define getcwd_error strerror(errno)
- #ifdef _WIN32
- /* MAX_PATH seems to be 260. Seems kind of small. Is there a better one? */
- #define LFS_MAXPATHLEN MAX_PATH
- #else
- /* For MAXPATHLEN: */
- #include <sys/param.h>
- #define LFS_MAXPATHLEN MAXPATHLEN
- #endif
-#endif
-
-#define DIR_METATABLE "directory metatable"
-typedef struct dir_data {
- int closed;
-#ifdef _WIN32
- intptr_t hFile;
- char pattern[MAX_PATH+1];
-#else
- DIR *dir;
-#endif
-} dir_data;
-
-#define LOCK_METATABLE "lock metatable"
-
-#ifdef _WIN32
- #ifdef __BORLANDC__
- #define lfs_setmode(L,file,m) ((void)L, setmode(_fileno(file), m))
- #define STAT_STRUCT struct stati64
- #else
- #define lfs_setmode(L,file,m) ((void)L, _setmode(_fileno(file), m))
- #define STAT_STRUCT struct _stati64
- #endif
-#define STAT_FUNC _stati64
-#define LSTAT_FUNC STAT_FUNC
-#else
-#define _O_TEXT 0
-#define _O_BINARY 0
-#define lfs_setmode(L,file,m) ((void)L, (void)file, (void)m, 0)
-#define STAT_STRUCT struct stat
-#define STAT_FUNC stat
-#define LSTAT_FUNC lstat
-#endif
-
-/*
-** Utility functions
-*/
-static int pusherror(lua_State *L, const char *info)
-{
- lua_pushnil(L);
- if (info==NULL)
- lua_pushstring(L, strerror(errno));
- else
- lua_pushfstring(L, "%s: %s", info, strerror(errno));
- lua_pushinteger(L, errno);
- return 3;
-}
-
-#ifndef _WIN32
-static int pushresult(lua_State *L, int i, const char *info)
-{
- if (i==-1)
- return pusherror(L, info);
- lua_pushinteger(L, i);
- return 1;
-}
-#endif
-/*
-** This function changes the working (current) directory
-*/
-static int change_dir (lua_State *L) {
- const char *path = luaL_checkstring(L, 1);
- if (chdir(path)) {
- lua_pushnil (L);
- lua_pushfstring (L,"Unable to change working directory to '%s'\n%s\n",
- path, chdir_error);
- return 2;
- } else {
- lua_pushboolean (L, 1);
- return 1;
- }
-}
-
-/*
-** This function returns the current directory
-** If unable to get the current directory, it returns nil
-** and a string describing the error
-*/
-static int get_dir (lua_State *L) {
- char *path;
- /* Passing (NULL, 0) is not guaranteed to work. Use a temp buffer and size instead. */
- char buf[LFS_MAXPATHLEN];
- if ((path = getcwd(buf, LFS_MAXPATHLEN)) == NULL) {
- lua_pushnil(L);
- lua_pushstring(L, getcwd_error);
- return 2;
- }
- else {
- lua_pushstring(L, path);
- return 1;
- }
-}
-
-/*
-** Check if the given element on the stack is a file and returns it.
-*/
-static FILE *check_file (lua_State *L, int idx, const char *funcname) {
-#if LUA_VERSION_NUM == 501
- FILE **fh = (FILE **)luaL_checkudata (L, idx, "FILE*");
- if (*fh == NULL) {
- luaL_error (L, "%s: closed file", funcname);
- return 0;
- } else
- return *fh;
-#elif LUA_VERSION_NUM >= 502 && LUA_VERSION_NUM <= 503
- luaL_Stream *fh = (luaL_Stream *)luaL_checkudata (L, idx, "FILE*");
- if (fh->closef == 0 || fh->f == NULL) {
- luaL_error (L, "%s: closed file", funcname);
- return 0;
- } else
- return fh->f;
-#else
-#error unsupported Lua version
-#endif
-}
-
-
-/*
-**
-*/
-static int _file_lock (lua_State *L, FILE *fh, const char *mode, const long start, long len, const char *funcname) {
- int code;
-#ifdef _WIN32
- /* lkmode valid values are:
- LK_LOCK Locks the specified bytes. If the bytes cannot be locked, the program immediately tries again after 1 second. If, after 10 attempts, the bytes cannot be locked, the constant returns an error.
- LK_NBLCK Locks the specified bytes. If the bytes cannot be locked, the constant returns an error.
- LK_NBRLCK Same as _LK_NBLCK.
- LK_RLCK Same as _LK_LOCK.
- LK_UNLCK Unlocks the specified bytes, which must have been previously locked.
-
- Regions should be locked only briefly and should be unlocked before closing a file or exiting the program.
-
- http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt__locking.asp
- */
- int lkmode;
- switch (*mode) {
- case 'r': lkmode = LK_NBLCK; break;
- case 'w': lkmode = LK_NBLCK; break;
- case 'u': lkmode = LK_UNLCK; break;
- default : return luaL_error (L, "%s: invalid mode", funcname);
- }
- if (!len) {
- fseek (fh, 0L, SEEK_END);
- len = ftell (fh);
- }
- fseek (fh, start, SEEK_SET);
-#ifdef __BORLANDC__
- code = locking (fileno(fh), lkmode, len);
-#else
- code = _locking (fileno(fh), lkmode, len);
-#endif
-#else
- struct flock f;
- switch (*mode) {
- case 'w': f.l_type = F_WRLCK; break;
- case 'r': f.l_type = F_RDLCK; break;
- case 'u': f.l_type = F_UNLCK; break;
- default : return luaL_error (L, "%s: invalid mode", funcname);
- }
- f.l_whence = SEEK_SET;
- f.l_start = (off_t)start;
- f.l_len = (off_t)len;
- code = fcntl (fileno(fh), F_SETLK, &f);
-#endif
- return (code != -1);
-}
-
-#ifdef _WIN32
-typedef struct lfs_Lock {
- HANDLE fd;
-} lfs_Lock;
-static int lfs_lock_dir(lua_State *L) {
- size_t pathl; HANDLE fd;
- lfs_Lock *lock;
- char *ln;
- const char *lockfile = "/lockfile.lfs";
- const char *path = luaL_checklstring(L, 1, &pathl);
- ln = (char*)malloc(pathl + strlen(lockfile) + 1);
- if(!ln) {
- lua_pushnil(L); lua_pushstring(L, strerror(errno)); return 2;
- }
- strcpy(ln, path); strcat(ln, lockfile);
- if((fd = CreateFile(ln, GENERIC_WRITE, 0, NULL, CREATE_NEW,
- FILE_ATTRIBUTE_NORMAL | FILE_FLAG_DELETE_ON_CLOSE, NULL)) == INVALID_HANDLE_VALUE) {
- int en = GetLastError();
- free(ln); lua_pushnil(L);
- if(en == ERROR_FILE_EXISTS || en == ERROR_SHARING_VIOLATION)
- lua_pushstring(L, "File exists");
- else
- lua_pushstring(L, strerror(en));
- return 2;
- }
- free(ln);
- lock = (lfs_Lock*)lua_newuserdata(L, sizeof(lfs_Lock));
- lock->fd = fd;
- luaL_getmetatable (L, LOCK_METATABLE);
- lua_setmetatable (L, -2);
- return 1;
-}
-static int lfs_unlock_dir(lua_State *L) {
- lfs_Lock *lock = (lfs_Lock *)luaL_checkudata(L, 1, LOCK_METATABLE);
- if(lock->fd != INVALID_HANDLE_VALUE) {
- CloseHandle(lock->fd);
- lock->fd=INVALID_HANDLE_VALUE;
- }
- return 0;
-}
-#else
-typedef struct lfs_Lock {
- char *ln;
-} lfs_Lock;
-static int lfs_lock_dir(lua_State *L) {
- lfs_Lock *lock;
- size_t pathl;
- char *ln;
- const char *lockfile = "/lockfile.lfs";
- const char *path = luaL_checklstring(L, 1, &pathl);
- lock = (lfs_Lock*)lua_newuserdata(L, sizeof(lfs_Lock));
- ln = (char*)malloc(pathl + strlen(lockfile) + 1);
- if(!ln) {
- lua_pushnil(L); lua_pushstring(L, strerror(errno)); return 2;
- }
- strcpy(ln, path); strcat(ln, lockfile);
- if(symlink("lock", ln) == -1) {
- free(ln); lua_pushnil(L);
- lua_pushstring(L, strerror(errno)); return 2;
- }
- lock->ln = ln;
- luaL_getmetatable (L, LOCK_METATABLE);
- lua_setmetatable (L, -2);
- return 1;
-}
-static int lfs_unlock_dir(lua_State *L) {
- lfs_Lock *lock = (lfs_Lock *)luaL_checkudata(L, 1, LOCK_METATABLE);
- if(lock->ln) {
- unlink(lock->ln);
- free(lock->ln);
- lock->ln = NULL;
- }
- return 0;
-}
-#endif
-
-static int lfs_g_setmode (lua_State *L, FILE *f, int arg) {
- static const int mode[] = {_O_BINARY, _O_TEXT};
- static const char *const modenames[] = {"binary", "text", NULL};
- int op = luaL_checkoption(L, arg, NULL, modenames);
- int res = lfs_setmode(L, f, mode[op]);
- if (res != -1) {
- int i;
- lua_pushboolean(L, 1);
- for (i = 0; modenames[i] != NULL; i++) {
- if (mode[i] == res) {
- lua_pushstring(L, modenames[i]);
- goto exit;
- }
- }
- lua_pushnil(L);
- exit:
- return 2;
- } else {
- int en = errno;
- lua_pushnil(L);
- lua_pushfstring(L, "%s", strerror(en));
- lua_pushinteger(L, en);
- return 3;
- }
-}
-
-static int lfs_f_setmode(lua_State *L) {
- return lfs_g_setmode(L, check_file(L, 1, "setmode"), 2);
-}
-
-/*
-** Locks a file.
-** @param #1 File handle.
-** @param #2 String with lock mode ('w'rite, 'r'ead).
-** @param #3 Number with start position (optional).
-** @param #4 Number with length (optional).
-*/
-static int file_lock (lua_State *L) {
- FILE *fh = check_file (L, 1, "lock");
- const char *mode = luaL_checkstring (L, 2);
- const long start = (long) luaL_optinteger (L, 3, 0);
- long len = (long) luaL_optinteger (L, 4, 0);
- if (_file_lock (L, fh, mode, start, len, "lock")) {
- lua_pushboolean (L, 1);
- return 1;
- } else {
- lua_pushnil (L);
- lua_pushfstring (L, "%s", strerror(errno));
- return 2;
- }
-}
-
-
-/*
-** Unlocks a file.
-** @param #1 File handle.
-** @param #2 Number with start position (optional).
-** @param #3 Number with length (optional).
-*/
-static int file_unlock (lua_State *L) {
- FILE *fh = check_file (L, 1, "unlock");
- const long start = (long) luaL_optinteger (L, 2, 0);
- long len = (long) luaL_optinteger (L, 3, 0);
- if (_file_lock (L, fh, "u", start, len, "unlock")) {
- lua_pushboolean (L, 1);
- return 1;
- } else {
- lua_pushnil (L);
- lua_pushfstring (L, "%s", strerror(errno));
- return 2;
- }
-}
-
-
-/*
-** Creates a link.
-** @param #1 Object to link to.
-** @param #2 Name of link.
-** @param #3 True if link is symbolic (optional).
-*/
-static int make_link(lua_State *L)
-{
-#ifndef _WIN32
- const char *oldpath = luaL_checkstring(L, 1);
- const char *newpath = luaL_checkstring(L, 2);
- return pushresult(L,
- (lua_toboolean(L,3) ? symlink : link)(oldpath, newpath), NULL);
-#else
- return pusherror(L, "make_link is not supported on Windows");
-#endif
-}
-
-
-/*
-** Creates a directory.
-** @param #1 Directory path.
-*/
-static int make_dir (lua_State *L) {
- const char *path = luaL_checkstring (L, 1);
- int fail;
-#ifdef _WIN32
- fail = _mkdir (path);
-#else
- fail = mkdir (path, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP |
- S_IWGRP | S_IXGRP | S_IROTH | S_IXOTH );
-#endif
- if (fail) {
- lua_pushnil (L);
- lua_pushfstring (L, "%s", strerror(errno));
- return 2;
- }
- lua_pushboolean (L, 1);
- return 1;
-}
-
-
-/*
-** Removes a directory.
-** @param #1 Directory path.
-*/
-static int remove_dir (lua_State *L) {
- const char *path = luaL_checkstring (L, 1);
- int fail;
-
- fail = rmdir (path);
-
- if (fail) {
- lua_pushnil (L);
- lua_pushfstring (L, "%s", strerror(errno));
- return 2;
- }
- lua_pushboolean (L, 1);
- return 1;
-}
-
-
-/*
-** Directory iterator
-*/
-static int dir_iter (lua_State *L) {
-#ifdef _WIN32
- struct _finddata_t c_file;
-#else
- struct dirent *entry;
-#endif
- dir_data *d = (dir_data *)luaL_checkudata (L, 1, DIR_METATABLE);
- luaL_argcheck (L, d->closed == 0, 1, "closed directory");
-#ifdef _WIN32
- if (d->hFile == 0L) { /* first entry */
- if ((d->hFile = _findfirst (d->pattern, &c_file)) == -1L) {
- lua_pushnil (L);
- lua_pushstring (L, strerror (errno));
- d->closed = 1;
- return 2;
- } else {
- lua_pushstring (L, c_file.name);
- return 1;
- }
- } else { /* next entry */
- if (_findnext (d->hFile, &c_file) == -1L) {
- /* no more entries => close directory */
- _findclose (d->hFile);
- d->closed = 1;
- return 0;
- } else {
- lua_pushstring (L, c_file.name);
- return 1;
- }
- }
-#else
- if ((entry = readdir (d->dir)) != NULL) {
- lua_pushstring (L, entry->d_name);
- return 1;
- } else {
- /* no more entries => close directory */
- closedir (d->dir);
- d->closed = 1;
- return 0;
- }
-#endif
-}
-
-
-/*
-** Closes directory iterators
-*/
-static int dir_close (lua_State *L) {
- dir_data *d = (dir_data *)lua_touserdata (L, 1);
-#ifdef _WIN32
- if (!d->closed && d->hFile) {
- _findclose (d->hFile);
- }
-#else
- if (!d->closed && d->dir) {
- closedir (d->dir);
- }
-#endif
- d->closed = 1;
- return 0;
-}
-
-
-/*
-** Factory of directory iterators
-*/
-static int dir_iter_factory (lua_State *L) {
- const char *path = luaL_checkstring (L, 1);
- dir_data *d;
- lua_pushcfunction (L, dir_iter);
- d = (dir_data *) lua_newuserdata (L, sizeof(dir_data));
- luaL_getmetatable (L, DIR_METATABLE);
- lua_setmetatable (L, -2);
- d->closed = 0;
-#ifdef _WIN32
- d->hFile = 0L;
- if (strlen(path) > MAX_PATH-2)
- luaL_error (L, "path too long: %s", path);
- else
- sprintf (d->pattern, "%s/*", path);
-#else
- d->dir = opendir (path);
- if (d->dir == NULL)
- luaL_error (L, "cannot open %s: %s", path, strerror (errno));
-#endif
- return 2;
-}
-
-
-/*
-** Creates directory metatable.
-*/
-static int dir_create_meta (lua_State *L) {
- luaL_newmetatable (L, DIR_METATABLE);
-
- /* Method table */
- lua_newtable(L);
- lua_pushcfunction (L, dir_iter);
- lua_setfield(L, -2, "next");
- lua_pushcfunction (L, dir_close);
- lua_setfield(L, -2, "close");
-
- /* Metamethods */
- lua_setfield(L, -2, "__index");
- lua_pushcfunction (L, dir_close);
- lua_setfield (L, -2, "__gc");
- return 1;
-}
-
-
-/*
-** Creates lock metatable.
-*/
-static int lock_create_meta (lua_State *L) {
- luaL_newmetatable (L, LOCK_METATABLE);
-
- /* Method table */
- lua_newtable(L);
- lua_pushcfunction(L, lfs_unlock_dir);
- lua_setfield(L, -2, "free");
-
- /* Metamethods */
- lua_setfield(L, -2, "__index");
- lua_pushcfunction(L, lfs_unlock_dir);
- lua_setfield(L, -2, "__gc");
- return 1;
-}
-
-
-#ifdef _WIN32
- #ifndef S_ISDIR
- #define S_ISDIR(mode) (mode&_S_IFDIR)
- #endif
- #ifndef S_ISREG
- #define S_ISREG(mode) (mode&_S_IFREG)
- #endif
- #ifndef S_ISLNK
- #define S_ISLNK(mode) (0)
- #endif
- #ifndef S_ISSOCK
- #define S_ISSOCK(mode) (0)
- #endif
- #ifndef S_ISFIFO
- #define S_ISFIFO(mode) (0)
- #endif
- #ifndef S_ISCHR
- #define S_ISCHR(mode) (mode&_S_IFCHR)
- #endif
- #ifndef S_ISBLK
- #define S_ISBLK(mode) (0)
- #endif
-#endif
-/*
-** Convert the inode protection mode to a string.
-*/
-#ifdef _WIN32
-static const char *mode2string (unsigned short mode) {
-#else
-static const char *mode2string (mode_t mode) {
-#endif
- if ( S_ISREG(mode) )
- return "file";
- else if ( S_ISDIR(mode) )
- return "directory";
- else if ( S_ISLNK(mode) )
- return "link";
- else if ( S_ISSOCK(mode) )
- return "socket";
- else if ( S_ISFIFO(mode) )
- return "named pipe";
- else if ( S_ISCHR(mode) )
- return "char device";
- else if ( S_ISBLK(mode) )
- return "block device";
- else
- return "other";
-}
-
-
-/*
-** Set access time and modification values for file
-*/
-static int file_utime (lua_State *L) {
- const char *file = luaL_checkstring (L, 1);
- struct utimbuf utb, *buf;
-
- if (lua_gettop (L) == 1) /* set to current date/time */
- buf = NULL;
- else {
- utb.actime = luaL_optnumber (L, 2, 0);
- utb.modtime = (time_t) luaL_optinteger (L, 3, utb.actime);
- buf = &utb;
- }
- if (utime (file, buf)) {
- lua_pushnil (L);
- lua_pushfstring (L, "%s", strerror (errno));
- return 2;
- }
- lua_pushboolean (L, 1);
- return 1;
-}
-
-
-/* inode protection mode */
-static void push_st_mode (lua_State *L, STAT_STRUCT *info) {
- lua_pushstring (L, mode2string (info->st_mode));
-}
-/* device inode resides on */
-static void push_st_dev (lua_State *L, STAT_STRUCT *info) {
- lua_pushinteger (L, (lua_Integer) info->st_dev);
-}
-/* inode's number */
-static void push_st_ino (lua_State *L, STAT_STRUCT *info) {
- lua_pushinteger (L, (lua_Integer) info->st_ino);
-}
-/* number of hard links to the file */
-static void push_st_nlink (lua_State *L, STAT_STRUCT *info) {
- lua_pushinteger (L, (lua_Integer)info->st_nlink);
-}
-/* user-id of owner */
-static void push_st_uid (lua_State *L, STAT_STRUCT *info) {
- lua_pushinteger (L, (lua_Integer)info->st_uid);
-}
-/* group-id of owner */
-static void push_st_gid (lua_State *L, STAT_STRUCT *info) {
- lua_pushinteger (L, (lua_Integer)info->st_gid);
-}
-/* device type, for special file inode */
-static void push_st_rdev (lua_State *L, STAT_STRUCT *info) {
- lua_pushinteger (L, (lua_Integer) info->st_rdev);
-}
-/* time of last access */
-static void push_st_atime (lua_State *L, STAT_STRUCT *info) {
- lua_pushinteger (L, (lua_Integer) info->st_atime);
-}
-/* time of last data modification */
-static void push_st_mtime (lua_State *L, STAT_STRUCT *info) {
- lua_pushinteger (L, (lua_Integer) info->st_mtime);
-}
-/* time of last file status change */
-static void push_st_ctime (lua_State *L, STAT_STRUCT *info) {
- lua_pushinteger (L, (lua_Integer) info->st_ctime);
-}
-/* file size, in bytes */
-static void push_st_size (lua_State *L, STAT_STRUCT *info) {
- lua_pushinteger (L, (lua_Integer)info->st_size);
-}
-#ifndef _WIN32
-/* blocks allocated for file */
-static void push_st_blocks (lua_State *L, STAT_STRUCT *info) {
- lua_pushinteger (L, (lua_Integer)info->st_blocks);
-}
-/* optimal file system I/O blocksize */
-static void push_st_blksize (lua_State *L, STAT_STRUCT *info) {
- lua_pushinteger (L, (lua_Integer)info->st_blksize);
-}
-#endif
-
- /*
-** Convert the inode protection mode to a permission list.
-*/
-
-#ifdef _WIN32
-static const char *perm2string (unsigned short mode) {
- static char perms[10] = "---------";
- int i;
- for (i=0;i<9;i++) perms[i]='-';
- if (mode & _S_IREAD)
- { perms[0] = 'r'; perms[3] = 'r'; perms[6] = 'r'; }
- if (mode & _S_IWRITE)
- { perms[1] = 'w'; perms[4] = 'w'; perms[7] = 'w'; }
- if (mode & _S_IEXEC)
- { perms[2] = 'x'; perms[5] = 'x'; perms[8] = 'x'; }
- return perms;
-}
-#else
-static const char *perm2string (mode_t mode) {
- static char perms[10] = "---------";
- int i;
- for (i=0;i<9;i++) perms[i]='-';
- if (mode & S_IRUSR) perms[0] = 'r';
- if (mode & S_IWUSR) perms[1] = 'w';
- if (mode & S_IXUSR) perms[2] = 'x';
- if (mode & S_IRGRP) perms[3] = 'r';
- if (mode & S_IWGRP) perms[4] = 'w';
- if (mode & S_IXGRP) perms[5] = 'x';
- if (mode & S_IROTH) perms[6] = 'r';
- if (mode & S_IWOTH) perms[7] = 'w';
- if (mode & S_IXOTH) perms[8] = 'x';
- return perms;
-}
-#endif
-
-/* permssions string */
-static void push_st_perm (lua_State *L, STAT_STRUCT *info) {
- lua_pushstring (L, perm2string (info->st_mode));
-}
-
-typedef void (*_push_function) (lua_State *L, STAT_STRUCT *info);
-
-struct _stat_members {
- const char *name;
- _push_function push;
-};
-
-struct _stat_members members[] = {
- { "mode", push_st_mode },
- { "dev", push_st_dev },
- { "ino", push_st_ino },
- { "nlink", push_st_nlink },
- { "uid", push_st_uid },
- { "gid", push_st_gid },
- { "rdev", push_st_rdev },
- { "access", push_st_atime },
- { "modification", push_st_mtime },
- { "change", push_st_ctime },
- { "size", push_st_size },
- { "permissions", push_st_perm },
-#ifndef _WIN32
- { "blocks", push_st_blocks },
- { "blksize", push_st_blksize },
-#endif
- { NULL, NULL }
-};
-
-/*
-** Get file or symbolic link information
-*/
-static int _file_info_ (lua_State *L, int (*st)(const char*, STAT_STRUCT*)) {
- STAT_STRUCT info;
- const char *file = luaL_checkstring (L, 1);
- int i;
-
- if (st(file, &info)) {
- lua_pushnil (L);
- lua_pushfstring (L, "cannot obtain information from file `%s'", file);
- return 2;
- }
- if (lua_isstring (L, 2)) {
- const char *member = lua_tostring (L, 2);
- for (i = 0; members[i].name; i++) {
- if (strcmp(members[i].name, member) == 0) {
- /* push member value and return */
- members[i].push (L, &info);
- return 1;
- }
- }
- /* member not found */
- return luaL_error(L, "invalid attribute name");
- }
- /* creates a table if none is given */
- if (!lua_istable (L, 2)) {
- lua_newtable (L);
- }
- /* stores all members in table on top of the stack */
- for (i = 0; members[i].name; i++) {
- lua_pushstring (L, members[i].name);
- members[i].push (L, &info);
- lua_rawset (L, -3);
- }
- return 1;
-}
-
-
-/*
-** Get file information using stat.
-*/
-static int file_info (lua_State *L) {
- return _file_info_ (L, STAT_FUNC);
-}
-
-
-/*
-** Get symbolic link information using lstat.
-*/
-static int link_info (lua_State *L) {
- return _file_info_ (L, LSTAT_FUNC);
-}
-
-
-/*
-** Assumes the table is on top of the stack.
-*/
-static void set_info (lua_State *L) {
- lua_pushliteral (L, "_COPYRIGHT");
- lua_pushliteral (L, "Copyright (C) 2003-2012 Kepler Project");
- lua_settable (L, -3);
- lua_pushliteral (L, "_DESCRIPTION");
- lua_pushliteral (L, "LuaFileSystem is a Lua library developed to complement the set of functions related to file systems offered by the standard Lua distribution");
- lua_settable (L, -3);
- lua_pushliteral (L, "_VERSION");
- lua_pushliteral (L, "LuaFileSystem "LFS_VERSION);
- lua_settable (L, -3);
-}
-
-
-static const struct luaL_Reg fslib[] = {
- {"attributes", file_info},
- {"chdir", change_dir},
- {"currentdir", get_dir},
- {"dir", dir_iter_factory},
- {"link", make_link},
- {"lock", file_lock},
- {"mkdir", make_dir},
- {"rmdir", remove_dir},
- {"symlinkattributes", link_info},
- {"setmode", lfs_f_setmode},
- {"touch", file_utime},
- {"unlock", file_unlock},
- {"lock_dir", lfs_lock_dir},
- {NULL, NULL},
-};
-
-int luaopen_lfs (lua_State *L) {
- dir_create_meta (L);
- lock_create_meta (L);
- luaL_newlib (L, fslib);
- lua_pushvalue(L, -1);
- lua_setglobal(L, LFS_LIBNAME);
- set_info (L);
- return 1;
-}
diff --git a/3rdparty/luafilesystem/src/lfs.def b/3rdparty/luafilesystem/src/lfs.def
deleted file mode 100644
index 6c782eb6968..00000000000
--- a/3rdparty/luafilesystem/src/lfs.def
+++ /dev/null
@@ -1,4 +0,0 @@
-LIBRARY lfs.dll
-VERSION 1.6
-EXPORTS
-luaopen_lfs
diff --git a/3rdparty/luafilesystem/src/lfs.h b/3rdparty/luafilesystem/src/lfs.h
deleted file mode 100644
index ea1720dba75..00000000000
--- a/3rdparty/luafilesystem/src/lfs.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-** LuaFileSystem
-** Copyright Kepler Project 2003 (http://www.keplerproject.org/luafilesystem)
-**
-** $Id: lfs.h,v 1.5 2008/02/19 20:08:23 mascarenhas Exp $
-*/
-
-/* Define 'chdir' for systems that do not implement it */
-#ifdef NO_CHDIR
-#define chdir(p) (-1)
-#define chdir_error "Function 'chdir' not provided by system"
-#else
-#define chdir_error strerror(errno)
-
-#endif
-
-#ifdef _WIN32
-#define chdir(p) (_chdir(p))
-#define getcwd(d, s) (_getcwd(d, s))
-#define rmdir(p) (_rmdir(p))
-#ifndef fileno
-#define fileno(f) (_fileno(f))
-#endif
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-int luaopen_lfs (lua_State *L);
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/3rdparty/luafilesystem/tests/test.lua b/3rdparty/luafilesystem/tests/test.lua
deleted file mode 100644
index abfbd4d9690..00000000000
--- a/3rdparty/luafilesystem/tests/test.lua
+++ /dev/null
@@ -1,175 +0,0 @@
-#!/usr/bin/env lua5.1
-
-local tmp = "/tmp"
-local sep = string.match (package.config, "[^\n]+")
-local upper = ".."
-
-local lfs = require"lfs"
-print (lfs._VERSION)
-
-io.write(".")
-io.flush()
-
-function attrdir (path)
- for file in lfs.dir(path) do
- if file ~= "." and file ~= ".." then
- local f = path..sep..file
- print ("\t=> "..f.." <=")
- local attr = lfs.attributes (f)
- assert (type(attr) == "table")
- if attr.mode == "directory" then
- attrdir (f)
- else
- for name, value in pairs(attr) do
- print (name, value)
- end
- end
- end
- end
-end
-
--- Checking changing directories
-local current = assert (lfs.currentdir())
-local reldir = string.gsub (current, "^.*%"..sep.."([^"..sep.."])$", "%1")
-assert (lfs.chdir (upper), "could not change to upper directory")
-assert (lfs.chdir (reldir), "could not change back to current directory")
-assert (lfs.currentdir() == current, "error trying to change directories")
-assert (lfs.chdir ("this couldn't be an actual directory") == nil, "could change to a non-existent directory")
-
-io.write(".")
-io.flush()
-
--- Changing creating and removing directories
-local tmpdir = current..sep.."lfs_tmp_dir"
-local tmpfile = tmpdir..sep.."tmp_file"
--- Test for existence of a previous lfs_tmp_dir
--- that may have resulted from an interrupted test execution and remove it
-if lfs.chdir (tmpdir) then
- assert (lfs.chdir (upper), "could not change to upper directory")
- assert (os.remove (tmpfile), "could not remove file from previous test")
- assert (lfs.rmdir (tmpdir), "could not remove directory from previous test")
-end
-
-io.write(".")
-io.flush()
-
--- tries to create a directory
-assert (lfs.mkdir (tmpdir), "could not make a new directory")
-local attrib, errmsg = lfs.attributes (tmpdir)
-if not attrib then
- error ("could not get attributes of file `"..tmpdir.."':\n"..errmsg)
-end
-local f = io.open(tmpfile, "w")
-f:close()
-
-io.write(".")
-io.flush()
-
--- Change access time
-local testdate = os.time({ year = 2007, day = 10, month = 2, hour=0})
-assert (lfs.touch (tmpfile, testdate))
-local new_att = assert (lfs.attributes (tmpfile))
-assert (new_att.access == testdate, "could not set access time")
-assert (new_att.modification == testdate, "could not set modification time")
-
-io.write(".")
-io.flush()
-
--- Change access and modification time
-local testdate1 = os.time({ year = 2007, day = 10, month = 2, hour=0})
-local testdate2 = os.time({ year = 2007, day = 11, month = 2, hour=0})
-
-assert (lfs.touch (tmpfile, testdate2, testdate1))
-local new_att = assert (lfs.attributes (tmpfile))
-assert (new_att.access == testdate2, "could not set access time")
-assert (new_att.modification == testdate1, "could not set modification time")
-
-io.write(".")
-io.flush()
-
--- Checking link (does not work on Windows)
-if lfs.link (tmpfile, "_a_link_for_test_", true) then
- assert (lfs.attributes"_a_link_for_test_".mode == "file")
- assert (lfs.symlinkattributes"_a_link_for_test_".mode == "link")
- assert (lfs.link (tmpfile, "_a_hard_link_for_test_"))
- assert (lfs.attributes (tmpfile, "nlink") == 2)
- assert (os.remove"_a_link_for_test_")
- assert (os.remove"_a_hard_link_for_test_")
-end
-
-io.write(".")
-io.flush()
-
--- Checking text/binary modes (only has an effect in Windows)
-local f = io.open(tmpfile, "w")
-local result, mode = lfs.setmode(f, "binary")
-assert(result) -- on non-Windows platforms, mode is always returned as "binary"
-result, mode = lfs.setmode(f, "text")
-assert(result and mode == "binary")
-f:close()
-
-io.write(".")
-io.flush()
-
--- Restore access time to current value
-assert (lfs.touch (tmpfile, attrib.access, attrib.modification))
-new_att = assert (lfs.attributes (tmpfile))
-assert (new_att.access == attrib.access)
-assert (new_att.modification == attrib.modification)
-
-io.write(".")
-io.flush()
-
--- Check consistency of lfs.attributes values
-local attr = lfs.attributes (tmpfile)
-for key, value in pairs(attr) do
- assert (value == lfs.attributes (tmpfile, key),
- "lfs.attributes values not consistent")
-end
-
--- Remove new file and directory
-assert (os.remove (tmpfile), "could not remove new file")
-assert (lfs.rmdir (tmpdir), "could not remove new directory")
-assert (lfs.mkdir (tmpdir..sep.."lfs_tmp_dir") == nil, "could create a directory inside a non-existent one")
-
-io.write(".")
-io.flush()
-
--- Trying to get attributes of a non-existent file
-assert (lfs.attributes ("this couldn't be an actual file") == nil, "could get attributes of a non-existent file")
-assert (type(lfs.attributes (upper)) == "table", "couldn't get attributes of upper directory")
-
-io.write(".")
-io.flush()
-
--- Stressing directory iterator
-count = 0
-for i = 1, 4000 do
- for file in lfs.dir (tmp) do
- count = count + 1
- end
-end
-
-io.write(".")
-io.flush()
-
--- Stressing directory iterator, explicit version
-count = 0
-for i = 1, 4000 do
- local iter, dir = lfs.dir(tmp)
- local file = dir:next()
- while file do
- count = count + 1
- file = dir:next()
- end
- assert(not pcall(dir.next, dir))
-end
-
-io.write(".")
-io.flush()
-
--- directory explicit close
-local iter, dir = lfs.dir(tmp)
-dir:close()
-assert(not pcall(dir.next, dir))
-print"Ok!"
diff --git a/3rdparty/luafilesystem/vc6/lfs.def b/3rdparty/luafilesystem/vc6/lfs.def
deleted file mode 100644
index 55ec688d3c3..00000000000
--- a/3rdparty/luafilesystem/vc6/lfs.def
+++ /dev/null
@@ -1,5 +0,0 @@
-LIBRARY lfs.dll
-DESCRIPTION "LuaFileSystem"
-VERSION 1.2
-EXPORTS
-luaopen_lfs
diff --git a/3rdparty/luafilesystem/vc6/luafilesystem.dsw b/3rdparty/luafilesystem/vc6/luafilesystem.dsw
deleted file mode 100644
index b4bb4b310f6..00000000000
--- a/3rdparty/luafilesystem/vc6/luafilesystem.dsw
+++ /dev/null
@@ -1,33 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "luafilesystem_dll"=.\luafilesystem_dll.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
- begin source code control
- luafilesystem
- ..
- end source code control
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/3rdparty/luafilesystem/vc6/luafilesystem_dll.dsp b/3rdparty/luafilesystem/vc6/luafilesystem_dll.dsp
deleted file mode 100644
index efe6c720b6c..00000000000
--- a/3rdparty/luafilesystem/vc6/luafilesystem_dll.dsp
+++ /dev/null
@@ -1,127 +0,0 @@
-# Microsoft Developer Studio Project File - Name="luafilesystem_dll" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=luafilesystem_dll - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "luafilesystem_dll.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "luafilesystem_dll.mak" CFG="luafilesystem_dll - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "luafilesystem_dll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "luafilesystem_dll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName "luafilesystem_dll"
-# PROP Scc_LocalPath ".."
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "luafilesystem_dll - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "../lib/vc6"
-# PROP Intermediate_Dir "luafilesystem_dll/Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LUAFILESYSTEM_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../external-src/lua50/include" /I "../../compat/src" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LUAFILESYSTEM_EXPORTS" /YX /FD /c
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x416 /d "NDEBUG"
-# ADD RSC /l 0x416 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 lua50.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"../bin/vc6/lfs.dll" /libpath:"../../external-src/lua50/lib/dll"
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Cmds=cd ../bin/vc6 zip.exe luafilesystem-1.2-win32.zip lfs.dll
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "luafilesystem_dll - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "../lib/vc6"
-# PROP Intermediate_Dir "luafilesystem_dll/Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LUAFILESYSTEM_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../external-src/lua50/include" /I "../../compat/src" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LUAFILESYSTEM_EXPORTS" /YX /FD /GZ /c
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x416 /d "_DEBUG"
-# ADD RSC /l 0x416 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 lua50.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"../bin/vc6/lfsd.dll" /pdbtype:sept /libpath:"../../external-src/lua50/lib/dll"
-
-!ENDIF
-
-# Begin Target
-
-# Name "luafilesystem_dll - Win32 Release"
-# Name "luafilesystem_dll - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE="..\..\compat\src\compat-5.1.c"
-# End Source File
-# Begin Source File
-
-SOURCE=..\src\lfs.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\lfs.def
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE="..\..\compat\src\compat-5.1.h"
-# End Source File
-# Begin Source File
-
-SOURCE=..\src\lfs.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
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/rapidjson/.gitignore b/3rdparty/rapidjson/.gitignore
deleted file mode 100644
index 2c412c2bba9..00000000000
--- a/3rdparty/rapidjson/.gitignore
+++ /dev/null
@@ -1,24 +0,0 @@
-/bin/*
-!/bin/data
-!/bin/encodings
-!/bin/jsonchecker
-!/bin/types
-/build
-/doc/html
-/doc/doxygen_*.db
-*.a
-
-# Temporary files created during CMake build
-CMakeCache.txt
-CMakeFiles
-cmake_install.cmake
-CTestTestfile.cmake
-Makefile
-RapidJSON*.cmake
-RapidJSON.pc
-Testing
-/googletest
-install_manifest.txt
-Doxyfile
-DartConfiguration.tcl
-*.nupkg
diff --git a/3rdparty/rapidjson/.gitmodules b/3rdparty/rapidjson/.gitmodules
deleted file mode 100644
index 8e9d1f376c2..00000000000
--- a/3rdparty/rapidjson/.gitmodules
+++ /dev/null
@@ -1,3 +0,0 @@
-[submodule "thirdparty/gtest"]
- path = thirdparty/gtest
- url = https://chromium.googlesource.com/external/googletest.git
diff --git a/3rdparty/rapidjson/.travis.yml b/3rdparty/rapidjson/.travis.yml
deleted file mode 100644
index 78fe1d54615..00000000000
--- a/3rdparty/rapidjson/.travis.yml
+++ /dev/null
@@ -1,54 +0,0 @@
-language: cpp
-
-compiler:
- - clang
- - gcc
-
-env:
- matrix:
- - CONF=debug ARCH=x86_64 CXX11=ON
- - CONF=release ARCH=x86_64 CXX11=ON
- - CONF=debug ARCH=x86 CXX11=ON
- - CONF=release ARCH=x86 CXX11=ON
- - CONF=debug ARCH=x86_64 CXX11=OFF
- - CONF=debug ARCH=x86 CXX11=OFF
- global:
- - ARCH_FLAGS_x86='-m32' # #266: don't use SSE on 32-bit
- - ARCH_FLAGS_x86_64='-msse4.2' # use SSE4.2 on 64-bit
- - GITHUB_REPO='miloyip/rapidjson'
- - secure: "HrsaCb+N66EG1HR+LWH1u51SjaJyRwJEDzqJGYMB7LJ/bfqb9mWKF1fLvZGk46W5t7TVaXRDD5KHFx9DPWvKn4gRUVkwTHEy262ah5ORh8M6n/6VVVajeV/AYt2C0sswdkDBDO4Xq+xy5gdw3G8s1A4Inbm73pUh+6vx+7ltBbk="
-
-before_install:
- - sudo apt-get update -qq
- - sudo apt-get install -qq cmake valgrind
- - sudo apt-get --no-install-recommends install doxygen # Don't install LaTeX stuffs
- - if [ "$ARCH" = "x86" ]; then sudo apt-get install -qq g++-multilib libc6-dbg:i386; fi
- - if [ "$CC" = "gcc" ] && [ "$CONF" = "debug" ]; then sudo pip install cpp-coveralls; export GCOV_FLAGS='--coverage'; fi
-
-install: true
-
-before_script:
-# hack to avoid Valgrind bug (https://bugs.kde.org/show_bug.cgi?id=326469),
-# exposed by merging PR#163 (using -march=native)
- - sed -i "s/-march=native//" CMakeLists.txt
- - mkdir build
- - >
- eval "ARCH_FLAGS=\${ARCH_FLAGS_${ARCH}}" ;
- (cd build && cmake
- -DRAPIDJSON_HAS_STDSTRING=ON
- -DRAPIDJSON_BUILD_CXX11=$CXX11
- -DCMAKE_VERBOSE_MAKEFILE=ON
- -DCMAKE_BUILD_TYPE=$CONF
- -DCMAKE_CXX_FLAGS="$ARCH_FLAGS $GCOV_FLAGS"
- -DCMAKE_EXE_LINKER_FLAGS=$GCOV_FLAGS
- ..)
-
-script:
- - cd build
- - make tests
- - make examples
- - ctest -V `[ "$CONF" = "release" ] || echo "-E perftest"`
- - make travis_doc
-
-after_success:
- - coveralls -r .. --gcov-options '\-lp' -e thirdparty -e example -e test -e build/CMakeFiles -e include/rapidjson/msinttypes -e include/rapidjson/internal/meta.h -e include/rapidjson/error/en.h
diff --git a/3rdparty/rapidjson/CHANGELOG.md b/3rdparty/rapidjson/CHANGELOG.md
deleted file mode 100644
index 8ad9b3c351f..00000000000
--- a/3rdparty/rapidjson/CHANGELOG.md
+++ /dev/null
@@ -1,79 +0,0 @@
-# Change Log
-All notable changes to this project will be documented in this file.
-This project adheres to [Semantic Versioning](http://semver.org/).
-
-## [Unreleased]
-
-## [1.0.2] - 2015-05-14
-
-### Added
-* Add Value::XXXMember(...) overloads for std::string (#335)
-
-### Fixed
-* Include rapidjson.h for all internal/error headers.
-* Parsing some numbers incorrectly in full-precision mode (`kFullPrecisionParseFlag`) (#342)
-* Fix alignment of 64bit platforms (#328)
-* Fix MemoryPoolAllocator::Clear() to clear user-buffer (0691502573f1afd3341073dd24b12c3db20fbde4)
-
-### Changed
-* CMakeLists for include as a thirdparty in projects (#334, #337)
-* Change Document::ParseStream() to use stack allocator for Reader (ffbe38614732af8e0b3abdc8b50071f386a4a685)
-
-## [1.0.1] - 2015-04-25
-
-### Added
-* Changelog following [Keep a CHANGELOG](https://github.com/olivierlacan/keep-a-changelog) suggestions.
-
-### Fixed
-* Parsing of some numbers (e.g. "1e-00011111111111") causing assertion (#314).
-* Visual C++ 32-bit compilation error in `diyfp.h` (#317).
-
-## [1.0.0] - 2015-04-22
-
-### Added
-* 100% [Coverall](https://coveralls.io/r/miloyip/rapidjson?branch=master) coverage.
-* Version macros (#311)
-
-### Fixed
-* A bug in trimming long number sequence (4824f12efbf01af72b8cb6fc96fae7b097b73015).
-* Double quote in unicode escape (#288).
-* Negative zero roundtrip (double only) (#289).
-* Standardize behavior of `memcpy()` and `malloc()` (0c5c1538dcfc7f160e5a4aa208ddf092c787be5a, #305, 0e8bbe5e3ef375e7f052f556878be0bd79e9062d).
-
-### Removed
-* Remove an invalid `Document::ParseInsitu()` API (e7f1c6dd08b522cfcf9aed58a333bd9a0c0ccbeb).
-
-## 1.0-beta - 2015-04-8
-
-### Added
-* RFC 7159 (#101)
-* Optional Iterative Parser (#76)
-* Deep-copy values (#20)
-* Error code and message (#27)
-* ASCII Encoding (#70)
-* `kParseStopWhenDoneFlag` (#83)
-* `kParseFullPrecisionFlag` (881c91d696f06b7f302af6d04ec14dd08db66ceb)
-* Add `Key()` to handler concept (#134)
-* C++11 compatibility and support (#128)
-* Optimized number-to-string and vice versa conversions (#137, #80)
-* Short-String Optimization (#131)
-* Local stream optimization by traits (#32)
-* Travis & Appveyor Continuous Integration, with Valgrind verification (#24, #242)
-* Redo all documentation (English, Simplified Chinese)
-
-### Changed
-* Copyright ownership transfered to THL A29 Limited (a Tencent company).
-* Migrating from Premake to CMAKE (#192)
-* Resolve all warning reports
-
-### Removed
-* Remove other JSON libraries for performance comparison (#180)
-
-## 0.11 - 2012-11-16
-
-## 0.1 - 2011-11-18
-
-[Unreleased]: https://github.com/miloyip/rapidjson/compare/v1.0.2...HEAD
-[1.0.2]: https://github.com/miloyip/rapidjson/compare/v1.0.1...v1.0.2
-[1.0.1]: https://github.com/miloyip/rapidjson/compare/v1.0.0...v1.0.1
-[1.0.0]: https://github.com/miloyip/rapidjson/compare/v1.0-beta...v1.0.0
diff --git a/3rdparty/rapidjson/CMakeLists.txt b/3rdparty/rapidjson/CMakeLists.txt
deleted file mode 100644
index fcacbd3c5ec..00000000000
--- a/3rdparty/rapidjson/CMakeLists.txt
+++ /dev/null
@@ -1,128 +0,0 @@
-CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
-SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules)
-
-PROJECT(RapidJSON CXX)
-
-set(LIB_MAJOR_VERSION "1")
-set(LIB_MINOR_VERSION "0")
-set(LIB_PATCH_VERSION "2")
-set(LIB_VERSION_STRING "${LIB_MAJOR_VERSION}.${LIB_MINOR_VERSION}.${LIB_PATCH_VERSION}")
-
-# compile in release with debug info mode by default
-if(NOT CMAKE_BUILD_TYPE)
- set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE)
-endif()
-
-# Build all binaries in a separate directory
-SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
-
-option(RAPIDJSON_BUILD_DOC "Build rapidjson documentation." ON)
-option(RAPIDJSON_BUILD_EXAMPLES "Build rapidjson examples." ON)
-option(RAPIDJSON_BUILD_TESTS "Build rapidjson perftests and unittests." ON)
-option(RAPIDJSON_BUILD_THIRDPARTY_GTEST
- "Use gtest installation in `thirdparty/gtest` by default if available" OFF)
-
-option(RAPIDJSON_BUILD_CXX11 "Build rapidjson with C++11 (gcc/clang)" ON)
-
-option(RAPIDJSON_HAS_STDSTRING "" OFF)
-if(RAPIDJSON_HAS_STDSTRING)
- add_definitions(-DRAPIDJSON_HAS_STDSTRING)
-endif()
-
-if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -Wall -Wextra -Werror")
- if (RAPIDJSON_BUILD_CXX11)
- if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.7.0")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
- else()
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
- endif()
- endif()
-elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -Wall -Wextra -Werror -Wno-missing-field-initializers")
- if (RAPIDJSON_BUILD_CXX11)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
- endif()
-elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
- add_definitions(-D_CRT_SECURE_NO_WARNINGS=1)
-endif()
-
-#add extra search paths for libraries and includes
-SET(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "The directory the headers are installed in")
-SET(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE STRING "Directory where lib will install")
-SET(DOC_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME}" CACHE PATH "Path to the documentation")
-
-IF(UNIX OR CYGWIN)
- SET(_CMAKE_INSTALL_DIR "${LIB_INSTALL_DIR}/cmake/${PROJECT_NAME}")
-ELSEIF(WIN32)
- SET(_CMAKE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/cmake")
-ENDIF()
-SET(CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" CACHE PATH "The directory cmake fiels are installed in")
-
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
-
-if(RAPIDJSON_BUILD_DOC)
- add_subdirectory(doc)
-endif()
-
-add_custom_target(travis_doc)
-add_custom_command(TARGET travis_doc
- COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/travis-doxygen.sh)
-
-if(RAPIDJSON_BUILD_EXAMPLES)
- add_subdirectory(example)
-endif()
-
-if(RAPIDJSON_BUILD_TESTS)
- if(MSVC11)
- # required for VS2012 due to missing support for variadic templates
- add_definitions(-D_VARIADIC_MAX=10)
- endif(MSVC11)
- add_subdirectory(test)
- include(CTest)
-endif()
-
-# pkg-config
-IF (UNIX OR CYGWIN)
- CONFIGURE_FILE (${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.pc.in
- ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc
- @ONLY)
- INSTALL (FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc
- DESTINATION "${LIB_INSTALL_DIR}/pkgconfig"
- COMPONENT pkgconfig)
-ENDIF()
-
-install(FILES readme.md
- DESTINATION "${DOC_INSTALL_DIR}"
- COMPONENT doc)
-
-install(DIRECTORY include/rapidjson
- DESTINATION "${INCLUDE_INSTALL_DIR}"
- COMPONENT dev)
-
-install(DIRECTORY example/
- DESTINATION "${DOC_INSTALL_DIR}/examples"
- COMPONENT examples
- # Following patterns are for excluding the intermediate/object files
- # from an install of in-source CMake build.
- PATTERN "CMakeFiles" EXCLUDE
- PATTERN "Makefile" EXCLUDE
- PATTERN "cmake_install.cmake" EXCLUDE)
-
-# Provide config and version files to be used by other applications
-# ===============================
-
-export(PACKAGE ${PROJECT_NAME})
-
-# cmake-modules
-CONFIGURE_FILE(${PROJECT_NAME}Config.cmake.in
- ${PROJECT_NAME}Config.cmake
- @ONLY)
-CONFIGURE_FILE(${PROJECT_NAME}ConfigVersion.cmake.in
- ${PROJECT_NAME}ConfigVersion.cmake
- @ONLY)
-INSTALL(FILES
- ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
- ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
- DESTINATION "${CMAKE_INSTALL_DIR}"
- COMPONENT dev)
diff --git a/3rdparty/rapidjson/CMakeModules/FindGTestSrc.cmake b/3rdparty/rapidjson/CMakeModules/FindGTestSrc.cmake
deleted file mode 100644
index f942a8dafcd..00000000000
--- a/3rdparty/rapidjson/CMakeModules/FindGTestSrc.cmake
+++ /dev/null
@@ -1,30 +0,0 @@
-
-SET(GTEST_SEARCH_PATH
- "${GTEST_SOURCE_DIR}"
- "${CMAKE_CURRENT_LIST_DIR}/../thirdparty/gtest")
-
-IF(UNIX)
- IF(RAPIDJSON_BUILD_THIRDPARTY_GTEST)
- LIST(APPEND GTEST_SEARCH_PATH "/usr/src/gtest")
- ELSE()
- LIST(INSERT GTEST_SEARCH_PATH 1 "/usr/src/gtest")
- ENDIF()
-ENDIF()
-
-FIND_PATH(GTEST_SOURCE_DIR
- NAMES CMakeLists.txt src/gtest_main.cc
- PATHS ${GTEST_SEARCH_PATH})
-
-
-# Debian installs gtest include directory in /usr/include, thus need to look
-# for include directory separately from source directory.
-FIND_PATH(GTEST_INCLUDE_DIR
- NAMES gtest/gtest.h
- PATH_SUFFIXES include
- HINTS ${GTEST_SOURCE_DIR}
- PATHS ${GTEST_SEARCH_PATH})
-
-INCLUDE(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(GTestSrc DEFAULT_MSG
- GTEST_SOURCE_DIR
- GTEST_INCLUDE_DIR)
diff --git a/3rdparty/rapidjson/RapidJSON.pc.in b/3rdparty/rapidjson/RapidJSON.pc.in
deleted file mode 100644
index 7467f9779b8..00000000000
--- a/3rdparty/rapidjson/RapidJSON.pc.in
+++ /dev/null
@@ -1,7 +0,0 @@
-includedir=@INCLUDE_INSTALL_DIR@
-
-Name: @PROJECT_NAME@
-Description: A fast JSON parser/generator for C++ with both SAX/DOM style API
-Version: @LIB_VERSION_STRING@
-URL: https://github.com/miloyip/rapidjson
-Cflags: -I${includedir}
diff --git a/3rdparty/rapidjson/RapidJSONConfig.cmake.in b/3rdparty/rapidjson/RapidJSONConfig.cmake.in
deleted file mode 100644
index 9fa12186ab6..00000000000
--- a/3rdparty/rapidjson/RapidJSONConfig.cmake.in
+++ /dev/null
@@ -1,3 +0,0 @@
-get_filename_component(RAPIDJSON_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
-set(RAPIDJSON_INCLUDE_DIRS "@INCLUDE_INSTALL_DIR@")
-message(STATUS "RapidJSON found. Headers: ${RAPIDJSON_INCLUDE_DIRS}")
diff --git a/3rdparty/rapidjson/RapidJSONConfigVersion.cmake.in b/3rdparty/rapidjson/RapidJSONConfigVersion.cmake.in
deleted file mode 100644
index 25741fc0976..00000000000
--- a/3rdparty/rapidjson/RapidJSONConfigVersion.cmake.in
+++ /dev/null
@@ -1,10 +0,0 @@
-SET(PACKAGE_VERSION "@LIB_VERSION_STRING@")
-
-IF (PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION)
- SET(PACKAGE_VERSION_EXACT "true")
-ENDIF (PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION)
-IF (NOT PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION)
- SET(PACKAGE_VERSION_COMPATIBLE "true")
-ELSE (NOT PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION)
- SET(PACKAGE_VERSION_UNSUITABLE "true")
-ENDIF (NOT PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION)
diff --git a/3rdparty/rapidjson/appveyor.yml b/3rdparty/rapidjson/appveyor.yml
deleted file mode 100644
index 7d586e83a48..00000000000
--- a/3rdparty/rapidjson/appveyor.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-version: 1.0.2.{build}
-
-configuration:
-- Debug
-- Release
-
-environment:
- matrix:
- - VS_VERSION: 11
- VS_PLATFORM: win32
- - VS_VERSION: 11
- VS_PLATFORM: x64
- - VS_VERSION: 12
- VS_PLATFORM: win32
- - VS_VERSION: 12
- VS_PLATFORM: x64
-
-before_build:
-- git submodule update --init --recursive
-- cmake -H. -BBuild/VS -G "Visual Studio %VS_VERSION%" -DCMAKE_GENERATOR_PLATFORM=%VS_PLATFORM% -DBUILD_SHARED_LIBS=true -Wno-dev
-
-build:
- project: Build\VS\RapidJSON.sln
- parallel: true
- verbosity: minimal
-
-test_script:
-- cd Build\VS && if %CONFIGURATION%==Debug (ctest --verbose -E perftest --build-config %CONFIGURATION%) else (ctest --verbose --build-config %CONFIGURATION%)
diff --git a/3rdparty/rapidjson/bin/data/glossary.json b/3rdparty/rapidjson/bin/data/glossary.json
deleted file mode 100644
index d5ca56d1950..00000000000
--- a/3rdparty/rapidjson/bin/data/glossary.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "glossary": {
- "title": "example glossary",
- "GlossDiv": {
- "title": "S",
- "GlossList": {
- "GlossEntry": {
- "ID": "SGML",
- "SortAs": "SGML",
- "GlossTerm": "Standard Generalized Markup Language",
- "Acronym": "SGML",
- "Abbrev": "ISO 8879:1986",
- "GlossDef": {
- "para": "A meta-markup language, used to create markup languages such as DocBook.",
- "GlossSeeAlso": ["GML", "XML"]
- },
- "GlossSee": "markup"
- }
- }
- }
- }
-} \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/data/menu.json b/3rdparty/rapidjson/bin/data/menu.json
deleted file mode 100644
index acdf930ea5f..00000000000
--- a/3rdparty/rapidjson/bin/data/menu.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{"menu": {
- "header": "SVG Viewer",
- "items": [
- {"id": "Open"},
- {"id": "OpenNew", "label": "Open New"},
- null,
- {"id": "ZoomIn", "label": "Zoom In"},
- {"id": "ZoomOut", "label": "Zoom Out"},
- {"id": "OriginalView", "label": "Original View"},
- null,
- {"id": "Quality"},
- {"id": "Pause"},
- {"id": "Mute"},
- null,
- {"id": "Find", "label": "Find..."},
- {"id": "FindAgain", "label": "Find Again"},
- {"id": "Copy"},
- {"id": "CopyAgain", "label": "Copy Again"},
- {"id": "CopySVG", "label": "Copy SVG"},
- {"id": "ViewSVG", "label": "View SVG"},
- {"id": "ViewSource", "label": "View Source"},
- {"id": "SaveAs", "label": "Save As"},
- null,
- {"id": "Help"},
- {"id": "About", "label": "About Adobe CVG Viewer..."}
- ]
-}} \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/data/readme.txt b/3rdparty/rapidjson/bin/data/readme.txt
deleted file mode 100644
index c53bfb8b726..00000000000
--- a/3rdparty/rapidjson/bin/data/readme.txt
+++ /dev/null
@@ -1 +0,0 @@
-sample.json is obtained from http://code.google.com/p/json-test-suite/downloads/detail?name=sample.zip
diff --git a/3rdparty/rapidjson/bin/data/sample.json b/3rdparty/rapidjson/bin/data/sample.json
deleted file mode 100644
index 30930e765dc..00000000000
--- a/3rdparty/rapidjson/bin/data/sample.json
+++ /dev/null
@@ -1,3315 +0,0 @@
-{
- "a": {
- "6U閆崬밺뀫颒myj츥휘:$è–ˆmYí–š#rzé£+玭V㭢뾿愴Yî°‘ê–šX亥ᮉ푊\u0006åž¡ã­ë£\"厓ᔧḅ^Sqpv媫\"⤽걒\"˽Ἆ?ꇆ䬔未tv{DV鯀Tἆl凸g\\㈭ĭ즿UH㽤": null,
- "b茤z\\î¨.N": [[
- "ZL:ᅣዎ*Y|çŒ«åŠæ«•è¾Oj为1糕쪥æ³S룂w࡛á²â¸¥èš™)",
- {
- "\"䬰á»wDæ¾V`邀⠕VDãºsH6[칑.:醥葹*뻵倻aD\"": true,
- "e浱uî¿£p蔽Crà· JK軵xCʨ<뜡癙Yç©ï½¹é½ˆX/螗唻?<蘡+뷄㩤쳖3å‘犾&\\첊xzå崦ݻé´\"åµ¥B3㰃詤豺嚼aqJ⑆∥韼@\u000b㢊\u0015L臯.샥": false,
- "l?Ǩ喳e6㔡$M꼄I,(3á縢,䊀疅뉲B㴔傳䂴\u0088㮰钘ꜵ!ᅛ韽>": -5514085325291784739,
- "o㮚?\"춛㵉<\/﬊ࠃ䃪ä£wp6ἀ䱄[s*S嬈貒pᛥ㰉'ë€": [{
- "(QP윤懊FI<ꃣ『䕷[\"ç’å¶®?%Ḭå£à²»ä‡Ÿ0è¤!è—²ë¹bdæµ¶tl\u2049#쯀@僞": {"î—i妾8홫": {
- ",Mï£ë§ƒäž›K5nAㆴVNã’Ší–¬$n꩑&êŽæ¤žî·é˜«?/á¹ì„¸ë‰ª1x쥼㻤㪙`\"$쟒薟B煌܀ì¨à­2掳7㙟鴙Xå©¢\u0002": "Vዉèˆï ’᧷⦌kîŒï®žà°ˆnz*<?੃'ahhCFX(\u0007⮊Eã­ä±¾Gxꥩrâ£.æ´Ž",
- "ë»´5bDDí¯O傆盓왻U?êž…êŠNé­á§¢Ï„\"迳豲8\u001b䃥ꂻ䴺ྸHç­´,": {
- "\"L鸔SE㬡XV&~ÍŽ'놅蔞눶l匛?'.Kæ°\\ƢẨ疇má¿›'ê½³&!é¹ m'|{Pç—Š ç§„ì’¿u\u00111ä‹§î´¼gÏ©x7t丗D䊨䠻z0.A0": -1.50139930144708198E18,
- "8é‹‚ë›·ïž”?ì²’B☚>ï·œFM\"è­7ê€-VR<\/';ä™E9$䩉\f @s?íªo3^è¡´cî˜à¶Žä§ªaK鼟q䆨c{ä³ 5mᒲՙ蘹ᮩ": {
- "Fã²·JGoâ¯Pëµxë’³p䘧☔\"+ꨲå¿JfR㔹)4nç´¬G练Qáž!C|": true,
- "p^㫮솎ocî’£.೚A㤠??r\u000f)⾽⌲們M2.䴘䩳:⫭胃\\á¾@Fá­Œ\\K": false,
- "蟌Tk愙潦伩": {
- "aï‘<\/@ᾛ慂侇瘎": -7271305752851720826,
- "艓藬/>á„ṯ,XW~㲆w": {"Eç—§î–郶)㜓ha朗!N赻瞉駠uC\u20adè¾ <Ve?í±!ImäŽî­Ÿæ„:*s 9諚Prᵾ뒰髶B̌qWA8梸vS⫊⢳{t㺲q㺈랊뮣RqK밢쳪": [
- false,
- {
- "\u000b=>x퓮⣫P1à «LMMX'M刼唳ë¤": null,
- "P쓫晥%k覛ዩIUᇸ滨:å™í˜²lMR5䋈V梗>%å¹½ué –\\)쟟": null,
- "eg+昉~矠䧞难\b?gQì­·ç­\\eê® Nl{ಢ哭|]Mn銌╥zê–˜zⱷ⭤ᮜ^": [
- -1.30142114406914976E17,
- -1.7555215491128452E-19,
- null,
- "渾ã¨ß牄귛r?ëŒ?w[âšžÓ»~廩輫㼧/",
- -4.5737191805302129E18,
- null,
- "xyà¿‘M[ocì…’ç«“â’ºx?뜓y䊦>-Dì¼(&&?XKkc꩖ﺸá‹ëµžK伕6à§€)딀PæœyWæ™îž¢?훻魢傎EG碸9類៌g踲C⟌aEX舲:z꒸许",
- 3808159498143417627,
- null,
- {"m試\u20df1{G8&뚈h홯J<\/": {
- "3ஸ厠zs#1K7:rᥞoꅔꯧ&ë‡éµ¼éž«6è·œ#赿5l'8{7㕳(b/j\"厢aqç±€êš\u0015厼稥": [
- -2226135764510113982,
- true,
- null,
- {
- "h%'ë§žï–±Sì‹…Hs&dï”l슾W0jé¿M×D놯L~S-㇡Rì­¬%": null,
- "⟓咔謡칲\u0000孺ꛭx旑檉㶆?": null,
- "æ‡I転;￸B2Y`z\\ç“w,ë†æ¿æ’埵䂄)!ä¶¢D=à´­ã´ŸjyY": {
- "$ࡘt厛毣ൢIèŠ<겿骫⫦6tr惺a": [
- 6.385779736989334E-20,
- false,
- true,
- true,
- [
- -6.891946211462334E-19,
- null,
- {
- "]-\\êŸ1/è–“â§á½Š\\l牑\u0007A郃)阜ᇒᓌ-塯`W峬G}SDb㬨Q臉⮻빌O鞟톴첂B㺱<ƈmu챑J㴹㷳픷Oㆩs": {
- "\"â—‰B\"pᶉt骔J꩸ᄇá›iâ•°æ ›K쉷㉯é©!ãˆnì¹äŸ…難>盥yé“¿eà­”è’M貹ヅ8å˜‹í€¯ä‰¶áŒ¥ã¢æ®Šë»³\"絧╿ꉑ䠥?∃蓊{}㣣Gk긔H1哵峱": false,
- "6.瀫cN䇮F㧺?\\椯=ÚˆT䘆4â˜ïšŒ8qv": -3.5687501019676885E-19,
- "Q?yऴr혴{஀䳘p惭f1ﹸ䅷䕋贲<ྃᄊ繲hq\\b|#QSTî“¶s1c-7(äµ¢\u2069åŒçµ˜ê¯‰:læ¯´ï›æ±žt戀oà·Ÿáµ¶ë®±á£-醇Jx䙬äí–¢0࣫á¡grã„›": "\u0011_xM/蘇Chv;dhA5.嗀绱V爤ﰦiëµ²M",
- "â‘[\"ugoy^儣횎~U\\섯겜ï¥l2jw஌yD腅̂\u0019": true,
- "ⵯɇä²á«¿à¢š!㯢l샅笶戮1꣖0Xe": null,
- "劅fë„€ï‹ï§¼bå®ç„ŠE찓橵G!ʱç“뭔雩괛": [{"p⹣켙[q>燣äƒãž½î›œá©²x:쓤삘7玑퇼0<\/qç’‚á‘[ï ™Z\\3䅵䧳\u0011㤧|妱緒C['ì·“Yꞟ3Z鳱雼P錻BUì”§U`ᢶg蓱>.1Ó§è­«'L_5VäµÐ¦": [
- false,
- false,
- {"22ä‚盥N霂얢<F8î±ê¼µ7Gà°¸yhë€g᦭ꄢx硴嬢\u001a?Eê´†T|;7犟\"Wt%ä©O⨵t&#ᬋK'èœá²«æ”⾠鲂Të©·éƒ\u0018䓞cE": {"f=ä츜瞾zw?å­¡é£\\铀᫞yẆg(\u0011M6(s2]`ਫ": [[[{
- "'y몱纣4S@\\,i㷯럹Ua充Tᣢ9躘Zଞ쥿äŠs<\/刎\\\"뉦-8/": "蜑.X0꭛낢륹iì ¨êš<8?s볕è¡|Q✬᯦@\\G㑢屿Mn졾J굤⥟JW뤵苑rì•툄嵵?â¾¥O",
- "^1挲~[n귆誈央碠멪gI洷": -8214236471236116548,
- "sሣ%娌暡clr蟜㑓2\u000bSâŸ_X㨔⚴5~蔷ꀇ|Xu㬖,꤭å¹îµ¿r(g믇ì©ïЍ%췸앙|æ £U\\2]䤉+å• è¡ê¯ŽT鉹m\n/`SzDᅼ鞶": 1.1217523390167132E-19,
- "u톇=黚\\ ꂮ췵L>躰îe9â‘©_뵜斌n@B}$ê´»Yá±@ä§‹î´½V\"☒-諯cVë¯Ê ": true,
- "Ű螧ᔼæªéŽë•’딜qꄃH뜣<ç§à¥‚CYå“â¸>XQ㵡趌oë¬k픀빯a(ܵç”ë†à­¯/6Nᪧ}æšá†šì§ŒP牰泱鈷^d꣟#Lì‚€\"㕹襻;k㸊\\f+": true,
- "쎣\",|⫝̸阊x庿k잣v庅$éˆê´Žç‚”k쬪O_": [
- "ìž©AzZGz3v愠ꉈⵎ?㊱}Så°³à¯p\r2>ì·IP䘈M)w|\u000eE",
- -9222726055990423201,
- null,
- [
- false,
- {"´킮'뮤쯽Wxè®V,6ᩪ1ç´²aႈ\u205czD": [
- -930994432421097536,
- 3157232031581030121,
- "l貚PY䃛5@䭄<nW\u001e",
- [
- 3.801747732605161E18,
- [
- null,
- false,
- {
- "": 4.0442013775147072E16,
- "2J[sᡪ㞿|n'#廲꯬乞": true,
- "B[ç¹°`\\ãa̼㨀å›ã½“<\/꥖ᵈO让\r43⡩徑ﬓ๨ﮕx:㣜oçŽê‰Ÿã¢Cçµï›‰á½†á“žì‡“Qs氯였9é§µq혃Ljê‚”<\/昺+tä‹à¼»çŒ™c沪~櫆bpJ9Uá:칣妙!çš—F4㑄탎䕀櫳振讓": 7.3924182188256287E18,
- "H磵ai委曷n柋T<\/å‹¿F&:ꣴfU@㿗榻Lb+?í„sp\"᪟~>ê·»m㎮ç¸fî§¡": 1.0318894506812084E-19,
- "࢜⩢Ш䧔1肽씮+༎ᣰ闺馺窃䕨8Mƶqè…½xc(៯å¤J5굄ä•Qj_훨/~価.䢵慯틠퇱豠㼇Qﵘ$DuSp(8Uà¸<\/ಟ룴𥳐ݩ$": 8350772684161555590,
- "ㆎQ䄾\u001bpᩭ${[諟^^骴᤮b^ㅥI┧T㉇⾞\"绦<AYJ⒃-oF<\/蛎mm;obh婃ᦢ": false,
- "䔤䣈?æ±.p襟&dã±…\\Jᚠ@?Oì²à¢½íœ”VR蔩|㒢柺": [[
- "-ꕨ岓棻r@鿆^3~䪤Ѐ狼︌ﹲ\\á¸MlEìµ Q+",
- null,
- false,
- 3346674396990536343,
- null,
- {
- "": null,
- "/ä¨S쨑,&繷㉥8C엮赸3馢|뇲{鄎ꗇqFﶉ雕UD躢?Ꟛအï–꽡[hᕱᗅ㦋쭞MユèŒ?L槽암V#성å”%㣕嘵\\Ú¹(å˜èº¿&q": [
- -1364715155337673920,
- false,
- -8197733031775379251,
- "E팗鮲JwH\\觡܈áœ\"+뉞娂N휗vå™™á‚ê¹¼\u001dD帒l%-æ–”N",
- -3.844267973858711E-20,
- [{"쬯(褈Q 蟚뿢 /ⱖ㻥\u0017/?v邘䃡0U.Z1î­­x?鯔Vå° 8Emï•<": [[[
- null,
- [
- null,
- -5841406347577698873,
- "í‚·\"S⋄籞繗솸ᵣ浵w쑿ퟗ7náŽx3ì•™z㘌쿸I葥覯ã¬0á†b汆狺뷘ႀnꋋ",
- -1227911573141158702,
- {
- "u㉮PᾺV鵸A\\g*à¡—9슟晭+ͧↀ쿅H\u001c꾣犓}癇æ›á—¬é»©äŸ˜X梑é†e>rä°‚f矩'-î½7ä¡­æ¡¥Dz兔V9è°¶å±…ãºá”Šä©¯ë².\u001eL0ὅㅷ釣": [{
- "<쯬Jå·^숞u࠯䌗艞R9닪gã¾ë³Ža䂈歖æ„:%é”|ﵤ|y}î¡»>;2,覂⶚啵tb*ä»›8ä¹’ã“¶B࿠㯉戩oX 貘5V嗆렽ë‚߼4hä§›êºM空\\b꿋貼": 8478577078537189402,
- "VD*|吝z~h譺aᯒ": {
- "YIì·¢K<\/濳xNne玗rJo쾘3í•°é´Š\"↱AR:ࢷ\"9?\"è‡ï¦¡)?誚êŠe)_D翾W?&F6J@뺾ê°NZ醊Z쾈വHï±å¶¿?炫㷱鬰M겈<bïž²S}㎥l|刖k": {"H7鷮퇢_k": [
- true,
- "s㟑瀭좾쮀â‘î¬Yì°ºk맢戲쀸俻àº6å„®ë—æ‰–puߖꜻ馶rꈞ痘?3ྚ畊惘䎗\"vv)*臔웅鿈䧲^v,껛㰙J <áš¶5",
- 7950276470944656796,
- 4.9392301536234746E17,
- -4796050478201554639,
- "yꬴc<3㻚",
- "oå¡\u20a4蒵鮬裢Cá´§nBã­±f.",
- false,
- [
- false,
- "ã¡å¼‘V?瀆䰺q!출㇞yᘪ꼼(IS~Ka 烿ꟿ샕桤\u0005HQҹ㯪罂qè¾âš‡æ‡‹â¦•ë‘¡v",
- 1862560050083946970,
- "\u20b6[|(ë­¹gê’펉O轄Dl묽]ﯨ髯QEbAã’¾m@롴礠㕓2ë•«n6ْ엘঵篳R잷꙲m색摪|@ã¿«5aK设f胭r8/NI4ì¶«æ µ\\꯬2]",
- false,
- {
- "\u000b7*ã™›ç‡.~?䔊pæ•e_拺艿ë·f{ê”»1sé©™`$Ė戧?q⋬沭?å¡·á­šè¹€unoa5": {
- "Sê·¯o紞㾕ᅶä¾î—¶éЇ12|ÊŸç•´ï–iNAo?|Sw$M拲գ㭄紧螆+,梔": null,
- "ã­š0?xB疱敻ேBPwv뾃熉(Ó pJ]ê°¢\"Bj'\u0016GE椱<\/zgៅx黢礇h},M9ï´¦?LḨ": "Si ïŸB%~㬒E",
- "핇㉊살ã¢ìˆ¨~ȪRo䦅D桺0z]﬽蠆c9ᣨyPP㿷U~ãž?쯟í¸å®’뉆U|}㉓郾ࣻ*櫎꼪ä—s?~7\u001e㘔h9{aáž‹}:ã¶’P8": [{"\\R囡ì¬nNæŸ‹çØ›7ì¹¾ :㶃衇徜V æ·±f1æ·â™ i?3Sè§’íž^ᆞ\u20e8á¹°D\u0007ç§¡+躒臔&-6": {
- "䨑g.fhã”—=8!\"狿ൻLU^ë»±g䲚ã»'W}k欤?๒鲇S꧗䫾$ĥ피": -794055816303360636,
- "外頮詋~텡竆î™ç¹ƒä©è‹¨ë¾ºæœê¼ƒç˜¹f*㉀枙NH/\u2027ê¢}j묎ïƒvペq︉ì‹ëœ¡Od5 N顯ି烅仟Qfㆤ嚢(i䬅c;ë§§?嶰㩼츱ç¡?-": {
- "e݆ã¡â¬¬î›–'2ã»’?U篲鿄\"隻Ҭ5NꭰꤺBꀈ拾᩺îº[刯î…5곑Na램ﴦ዆]ã“qwé’„\u001b\"Yæ´Šä—¿î¼ç¥å¡¥è¿µ[⼞⠳P$ê ±5먃0ï¦`": [{"ç°Eè³ï«šb먭N긆Ⰹå²2逶ꜛ?H짉~?P}jj}ä¾·ç¿_T>á­¨b,â»éˆµP䕡䀠८ⱄ홎鄣": {
- "@?k2é¶–ã‹®\"Oರ K㨇廪儲\u0017ä¾î¿‚J?);\b*묀㗠섳햭1MC V": null,
- "UIICP!BUA`î€á¢ˆã‹¸~袩㗪⾒=fBï®´l1ꡛ죘R辂여ҳ7쮡<䩲`熕8é ": 4481809488267626463,
- "Y?+8먙ᚔ鋳蜩ï–럶1㥔y璜౩`": [
- null,
- 1.2850335807501874E-19,
- "~V2",
- 2035406654801997866,
- {
- "<숻1>\"": -8062468865199390827,
- "Mã¿£ï€E]}qwG莎Gná¶(ê”™\\D⬲iꇲs寢t駇S뀡ꢜ": false,
- "pê¤ãŽ9W%>M;-Uç’fî£(^j1?&RBéš§ å¿“b똊îƒE": "#G?C8.躬ꥯ'?냪#< 渟&헿란zpo왓Kj}é·§XﻘMツbä•–;㪻",
- "vE풤幉xz뱕쫥Ug㦲aH} ᣟp:鬼Yá°Ÿ<Fɋ잣緂頒âºä‰²ç‘‘ä…‚,C~Þ…G!f熢-B7~9Pqà¡¢[츑#3ꕎ,Öඳèâ©…ãµ§ì¶€ë¿xyäŒÍ‚tdj!箧᳆|9èš¡ë¬": -2.54467378964089632E17,
- "䵈䅦5ë¹–,궆-:໿댾仫î»0ᙚyá¦hqáš„": null,
- "侯Y\"湛졯劇Uì…ŽYXçâ…¸2ä¼´|ç­§\\ä’ã¶¶á·ì‘WaᦵᗱãœëŠ¾è† <Jc63<G\u20fe䇹66僣k0O\"_@U": null,
- "姪y$#sæ¼´JH璌Ӊ脛Jã¾íŽ”ï¹´oꈶ㚸PD:薠ì–%說ážè¹‚1]⾕5튄": {
- "á¾Huw3䮅如쿺äŸå«]<鰨ݷ?꯯䫓傩|á¶à·ƒåª½\\澒≡闢": "Mm\"ì‡á¯„졽\"楇<\/ꥆí­å±€néš´@é¿£wâ Š4Pï«å¾ŽW㊋;䤞'.팇è’ä¡´egpxå—Žwà®…ç—å ®á›nË︖䀤4å™™?໚éƒá±‹Þ˜à¥Žtæ‘姫籕殥ï­é™ƒ\"4[ê¬qL4Wê Žx",
- "ℇjéŒïš›5Bë’š\" U": "ç¡„ê˜{憠êµ:&t䌨m Cઌ쿣鞛XFê Ÿsä­ï¶ƒ\"æ ¼a0x闊昵å²L\\æšèˆaê¸j싹ç…\"î ²çŸï±¡é¦†*êµ–ç³ <ê”躎",
- "톌賠弳êŸb\"èž–X50sĶ晠3fç§‚å¯Iⓟ:è˜": 5.573183333596288E18,
- "%䴺": [[[[
- -6957233336860166165,
- false,
- null,
- {
- "\"ïŸ\\௮茒袀ᕥ23ୃ괶?䕎.嚲◉ãžL+ᵡ艱hL콇붆@": null,
- "%螥9ꭌ<\/-t": true,
- ",9|î«è€¢æ¤¸ä“Xk죱\u0015$Ώ鲞[ï’—?ì—¢á²í˜ªì¦ˆâ´‚â–‚â„´ã—¯\"gî´ëº˜\\êœ#\u0002ヮ}ሎ芲P[鹮轧@냲䃦=#(": 2.78562909315899616E17,
- "R?H䧰ⵇ<,憰쮼Q總iR>H3镔ᴚ斦\\é‘r*2橱Gâ¼”F/.j": true,
- "RK좬뎂aí™ f*f㱉á®â¦‹æ½™ã¨‹Gu곌SGI3Ië¿\\F',)t`è蘯囯ﮉ裲뇟쥼_ገ驪▵æ’ᕤV": 1.52738225997956557E18,
- "^k굲䪿꠹B逤%F㱢漥O披M㽯镞竇霒i꼂焅륓\u00059=皫之눃\u2047娤é–銤唫á•b<\/w踲䔼u솆맚,ä’á³'/it": "B餹饴is権ꖪ怯ꦂẉဎt\"!凢谵⧿ï™0\\<=(uLä·åˆ¨ì‘ª>俆æ“Cy襸Q힆䆭涷<\/á±0î É§îŠ‹䗾䚹\\ኜ?ꄢᇘ`ä´¢{囇}᠈䴥X4퓪檄]ꥷ/3謒ሴn+gé¨X",
- "GgG꽬[(å«“ëª6\u0004ê¶宩㙻/>\u0011^è¾dTè…ªhxÇ‘%ꊇk,8(Wâ§‚çµP鬜O": [{
- "Mã´¾c>\\ᓲ\u0019V{>ꤩ혙넪㭪躂TS-痴໸闓âµ/徯O.Mã¥Ê·D囎⧔ì³íœ¤T??鉬뇙=#ꢫ숣BXä­¼<\/d똬졬g榿)eꨋﯪ좇첻<?2K)": null,
- "Z17縬z]愀䖌 ᾋBCg5ë”’êµ­æ†ê¾“aâ²·í„·u:U촳驿?雺楶\u0001\u001c{q*á°—è‹‘B@kæ°z.*è“—7ረIm\"Oá±@7?_": true,
- "㺃Z<": -4349275766673120695,
- "휃䠂fa塆ffixKe'ë¬é—੄뺾w࠾鑎kë•¢m*á‚‘î§·í–žé®6攊&虜h黚,Yä±³Sﭼ둺pN6": [
- false,
- "IΎ䣲,\"ᬮ˪癘P~Qlnxå–Sᮔ༬˨IçŒm䜛酛\u0003iê¸ã¦§cQ帲晼D' \\(粋ï›wQcN\\ëµ°è·ˆ",
- [
- "D0\\L?M1ì¥KaêŒsd+盌귤憊tz䌣ëŒ×‘Oå‚wÏ¢%á½’gpî•—,Aiï™âŽ§á¶†Iî«˜é¤¾ê¦æ£©å˜…᳉怴%m]á¶is纖D凜镧o심b Uî»·",
- {
- "?଼\u0011Rv&^[+匚I趈T媫\u0010.䥤ᆯ1q僤HydⲰl㒽K'ᅾiౕ豲초딨@\u0013J'쪪VD౼P4Ezg#8*㋤W馓]c쿯8": false,
- "c/擯X5~JmKäµ¶^ìŽà´š|B|u[ì†(X뚤6v}W㤘⠛aR弌臌쾭諦eⒷ僡-;㩩⭖ⷴ徆龄갬{䱓ᥩ!ï¯âŠšá‡¨<v燡露`:볉癮꨽り★Ax7Ꮀ譥~舑\\Vê‹\"$)v": "e&sFF쬘OBï–†d슊寮f蠛জ봞mn~锆竒Gè„\"è¶µG刕䕳&L唽붵<\/I,X팚Bâ¥î¼¶X,kԇҗ眄_æ…¡:U附ᓚAè•§>\u001a\u0011\";~쓆BH4勿”Š7힪",
- "iT:L闞椕윚*æ»›gI≀Wਟඊ'ꢆ縺뱹鮚Nê©á§¬è•¼21줧\\䋯``â\\ã±é³¨": 1927052677739832894,
- "ì®ç¼¦è…ƒg]礿Y㬙 fî¼ãƒºSɪ꾾N㞈": [
- null,
- null,
- {
- "!t,çY 1䗉罵?c饃호䉂Cá­ì’˜z(즽sZG㬣sഖE4ï‚뢜㓕äžä¸®Qpç°6EZឪ겛fx'ꩱQ0ç½£i{k锩*㤴㯞r迎jTⲤ渔m炅肳": [
- -3.3325685522591933E18,
- [{"ã“5]A䢕1룥Bï²C?Ꙍ`r룔Ⳛ䙡uä¼²+\u0001àµo": [
- null,
- 4975309147809803991,
- null,
- null,
- {"T팘8Dﯲ稟MM☻㧚䥧/8ﻥ⥯aXLaH\"顾S☟耲ît7fSà·‰ë†ë®”/ꕼ䓈ìº4\\霶䠴ᩢ<\/t4?죵>uDï›5➶༆쉌럮⢀秙䘥\u20972ETR3æ¿¡æ†vB? ~鸆\u0005": {
- "`é––mç’㥉b뜴?Wf;?DV콜\u2020í‰à±“æ“å®ZMj3mJ먡-å‚·ë±™yח㸷꥿ ໘u=Mì!5å­L4v\\?ÇŽ7C홫": null,
- "|": false,
- "~Ztᛋ䚘\\æ“­ã—傪Wé™–+ã—¶qᵿ蘥ᙄp%䫎)}=â ”6ᮢS湟-èž¾-mXH?cp": 448751162044282216,
- "\u209fad놹j檋䇌ᶾ梕ã‰bוּ<dä—±:줰Mé…„\u0000X#_rç¢A饓ê—ÙKo_è·”?ᪧ嵜鼲<": null,
- "ꆘ)ubI@h@洭Ai㜎ä±k\u0003?Tä‰3é—´%j6jæ£j=â\\U毮ᬹ*8䀔v6cpjâ­¬~Q꿾뺶ï‰íŽµæ‚¡!ì©­åŽl六㽫6퇓ޭ2>": {"?è‹´ê© D䋓帘5騱qï±–PF?☸ç—é¡’yU á¡«cb䫎 S@㥚gꮒ쎘泴멖\\:Ié®±TZ듒ᶨQ3+f7캙\"?\fí’¾\\oæžç´Ÿï»½M.âŽï˜¸é‘OP": [
- -2.6990368911551596E18,
- [{"ä’–@<á°¿<\/⽬tTrè…ž&G%᳊秩蜰擻f㎳?Sãµ§\r*k뎾-乢겹隷j軛겷0ë£é®ï µ": {")DO0è…¦:ì¶é€¿:1㥨่!è›æ¨‹2": [{
- ",ꌣf侴笾m๫ꆽ?1?U?\u0011ꌈꂇ": {
- "xæ—ç” nVqä…¦w`CD⦂惺嘴0I#vỵ} \\ê·‚Së´Dì–¾?Ô’j溯\"v餄a": {
- "@ç¿™c⢃趚痋i\u0015OQâlqë†Y0pࢥ3쉨䜩^<8g懥0w)]䊑næ´ºo5ì­QL댊랖L镈Qnt⪟㒅십q헎鳒⮤眉ᔹ梠@O縠u泌ㄘb榚癸Xî©­Þ”Ftj;iC": false,
- "I&뱋゘|ï£è“”䔕측瓯%6á—»HW\\N1貇#?åƒá—œghá­ªo'䗈꽹Rcìš/蔳迄à¼!0邔䨷푪8ç–©)[쭶緄㇈୧á": {
- "B+:ꉰ`sì¾­)ë¹¼Cç¾A䫊pMgjdxäHf9᥸W0!C樃'ï¤f䫤סи\u0017Jve? è¦f둀⬣퓉Whk\"஼=չï³î•¤çš†ç¬BIW虨쫓F廰饞": -642906201042308791,
- "sb,XcZ<\/m㉹ ;䑷@c䵀s奤⬷7`ꘖ蕘戚?Feb#輜}p4nH⬮eKL트}": [
- "RK鳗z=袤Pf|[,u욺",
- "Ẏá»ç½¯ë‰‹âº–锅젯㷻{H䰞쬙-ì©“D]~\u0013Oã³¢gb@æ¶è”‰|kᦂâ—!\u001ebMè¤sca쨜襒y⺉룓",
- null,
- null,
- true,
- -1.650777344339075E-19,
- false,
- "☑lꄆs힨꤇]'uTന⌳ë†].1â‹”ê´æ²°\"IWà´©\u0019æ°œ8쟇䔻;3衲æ‹,窌zíŽå–íš—?4?Cë„é—®?ᥙ橭{稻Ⴗ_ì”",
- "n?]讇빽å—}1å­…9#ê­¨é¶v\u0014å–ˆ)vw祔}룼쮿I",
- -2.7033457331882025E18,
- {
- ";⚃^㱋x:饬ኡj'ê§µT☽O㔬RO婎?향ᒭæ©$渣y4i;(Q>꿘e8q": "j~錘}0g;Lèº*;á•­ê„®0l潛烢5H▄쳂ê’ï­‹ê™¶T犘≫x閦웧v",
- "~î¢æ¯\u2018c4è·ë E~ᑅቚꈂ?nq뎤.:æ…¹`F햘+%鉎Oç€œìŸæ•›è®âŒæµ¢<\/㮺紿P鳆ࠉ8I-o?#jﮨîŸ7v3Dt赻J9": null,
- "à£W䌈0êŽqC逖,íš…î·Žcáƒswj;jJSæ«5æ§—OaB>D踾Y": {"ã’°äµF%î©®?59.î„„ãˆcᕨï†í•틎á¸ã‹©B=9IÛⓌ{:9.ywï½å‘°ã†®è‚’᎒tIã¾´62\"ዃ抡C﹬B<\/<EO꽓ᇕu&é‹«\\禞í¹uê’.7훯ಶ2䩦͉ᶱf깵ᷣ늎": [
- 5.5099570884646902E18,
- "uQNæ¿¿m臇<%?谣鮢s]]x0躩慌闋<;(î³¥ 鋤.0á µd1#벘a:Gs?í–·'.)ㅴ䞟ç¯å´ˆFS@O㌛ᓬ抢íŒáž¾ëƒ·ì¿Ÿíˆ¥IZn[惵ê§3ë™[&v憙J>ì´‹jo朣",
- [
- -7675533242647793366,
- {"ᙧ呃ï£:[㒺쳀쌡ì‚H稈㢤\u001dá¶—GG-{GHྻຊꡃ哸䵬;$?&d\\⥬ã“Nåœ´ë¤æŒ¨-'ê•®$î“‹PU%?冕눖ié­q騎Q": [
- false,
- [[
- 7929823049157504248,
- [[
- true,
- "Zè™\u0017'eꕤ᱕l,0\\X\u001c[=雿8è ¬L<\/낲긯W99g톉4ퟋbãº\u0007åŠ'!麕Q궈oW:@XáŽïœ¬z蘻m絙璩귓죉+3柚怫tSæ‡è’£ä -æ“¶D[0=퉿8)q0ÙŸ",
- "唉\nFA椭穒巯\\䥴䅺鿤S#bè¿…ç˜ ï¶—ê¬˜\\?q1qN犠pX꜅^䤊⛤㢌[⬛휖岺q唻ⳡí‹\"ã™™Eh@oA賑㗠yå¿…Nꊑᗘ",
- -2154220236962890773,
- -3.2442003245397908E18,
- "Wᄿ筠:瘫퀩?o貸q⊻(᎞KWf宛尨h^残3[U(='橄",
- -7857990034281549164,
- 1.44283696979059942E18,
- null,
- {"ꫯAwè·­å–€ ?_ï““9\"Aty背F=9缉ྦྷ@;?^鞀w:uN㘢Rá»": [
- 7.393662029337442E15,
- 3564680942654233068,
- [
- false,
- -5253931502642112194,
- "ç…‰\\îš¶î¶è¾Žî›¢à³†ç½5â’­1äªäƒ‘s䎢:[e5}峳ﴱn騎3?è…³Hyêƒè†¼N潭錖,Yá‹ËœYAá“㬠bG렣䰣:",
- true,
- null,
- {
- "⒛'P&%죮|:⫶춞": -3818336746965687085,
- "钖m<\/0ݎMtF2Pk=瓰୮洽겎.": [[
- -8757574841556350607,
- -3045234949333270161,
- null,
- {
- "áœî…½rè¼³>⫇9hU#î¦#w@ê·ªA\\Cî’¢ é‹ºã˜“ê–æ¢’뒬묹㹻+郸å¬ìœ¤'+g<\/碴,}ꙫ>ì†;情d齆Jä¬àº©æ’›ì±íƒ¹/R澡7剌tꤼ?ặ!`â²ç¤\u00002똥଴âŸ": null,
- "\u20f2ܹe\\tAê¥Æ°\\x当뿖ï»ë ‰ç¦›;G檳ﯪï…Sà«°3~㘠#[J<}{奲 5箉⨔{ë†<\/釿抋,åš /曳m&WaOvT赋皺璑ï“í…": [[
- false,
- null,
- true,
- -5.7131445659795661E18,
- "è­m䓪D5|3å©à°ž>î‰è ‡æ™¼6nï´ºPp禽羱î¤DS<ç“닫屚ì‚å§¿",
- true,
- [
- -8759747687917306831,
- {
- ">ⓛ\t,odKr{䘠?b퓸C嶈=DyEᙬï¿@ᴔ쨺芛髿UT퓻春<\/yê¸>豚W釺N뜨^?꽴﨟5殺ᗃç¿%>í‚ဿ䄸沂Ea;A_\u0005閹殀W+窊?Ꭼd\u0013Pæ±´G5ì“æ˜": 4.342729067882445E-18,
- "Q^즾眆@AN\u0011Kb榰냎Y#ä€ê€’ᳺ'q暇çµs\"!3#I⊆畼寤@HxJ9": false,
- "⿾D[)袨㇩i]웪䀤ᛰMvR<èŸã£¨": {"v퇓L㪱ꖣ豛톤î£\\ê³±#ï–©kDTN": [{
- "(ì¾´ä¡£,寴ph(C\"ã³¶w\"憳2s馆E!n!&柄<\/0Pꈗſ?㿳Qdéµ”": {"娇堰孹L錮h嵅⛤èºé¡’?CglNæŸ+쨣ﺜ\\MrH": {"çžäŽ‡ë‘ƒá‰²å¼­íŒ­^ꄞ踦涟XK錆쳞ឌ`;੶S炥騞ଋ褂B៎{Ú’ä­·á¶¼éœpIè—è™¶K$": [{"â—–S~躘蒉꫿輜è­Qã½™é—@ᢗ¥Eæ¦iØ¡5┄^B[絮跉ᰥé™PWi3wㄾⵀDJ9!w㞣ᄎ{ë“’ê““b6\\篴??c⼰鶹⟧\\鮇ꮇ": [[
- 654120831325413520,
- -1.9562073916357608E-19,
- {
- "DC(æ˜è¡µá¼¡ê¸™ê°µå§­|Ö›[t": 7.6979110359897907E18,
- "Jâ…))嫼â³9Xfd飉j7猬ᩉ+⤻î®çœ—벎Eé°‰Zï¾¶63zá69}Zá¶L崭ᦥ⡦éšâ‹›êŽ¨î´µ~i㨃咊ꧭo䰠阀3C(": -3.5844809362512589E17,
- "p꣑팱쒬ꎑ뛡Ꙩ挴æèƒ”&7ᔈ묒4Hdç¡¶í›ãŽ–zꢼè±ã¿¢aሃ=<\/湉鵲Eî„¡Ó…%$F!í¶æ£Œå­¼{Oé§à¨ºgeu+": ")\u001bìž“kÅ€Xì©«Aë°Â®Ú£ç™¦ç‹¢)扔弒p}k縕ꩋ,䃉tࣼi",
- "ã‚¡F肿輸<솄G-䢹䛸êŠl`Tqê•—îŠè’ža氷⸅ᴉ蠰]S/{J왲m5{9.uá½³~㕚㣹u>x8Uè®Bëºè¥ªç›ŽQhVS맅킃i识{벂磄Ià·„ä™…xZy/æŠà«­Zï–Šé²î¦š-霳Væ®æŒ¦â„’": null,
- "㯛|Nî½™ê¸b7âµb?æ‹ O\u0014Þ†?-(EꞨ4ꕷᄤYᯕï‘OW瞺~螸\"욿ќ<u鵵઎⸊î˜å€¾ì‘·à·»rT⪄牤銱;W殆͢芄ਰåší›šìƒ¢î™‡âŠ¿+ã²½": null,
- "å˜ïƒé€†àº»%_ë§›d)zJ%3ì¹§_릟#95䌨怡\u001ci턠ॣî’i冘4èµ–'à¨ä§_æ ”!": {
- "*?2~4㲌᭳ì¯ftá‚·1#oJ\bäŠ‡é•‡ë” \u2079xä›ãŠá®‚N;穽跖s휇ᣄ홄傷z⸷(霸!3yëºMì’¿í–Û½v㳉tở心3黎vì­» Rp཮Vr~T?&Ë´k糒븥쩩r*D": null,
- "8@~홟ꔘk1[": -5570970366240640754,
- "BZté¦ê¡¬c餖 s(má›´\u0000◄dè…‘t84CâŸå¯VṊ뉙'å™±ê”ç½GCé¡€?허0êž¹&ë‡ä›­Cä·«](": 2.4303828213012387E-20,
- "yæ’”Z외放+}ḑ骈á™&\u0016`G便2|-e]঳?QF㜹YF\"ã¿’ç·„í–·ï€ãˆŸïƒ¦ï¨ä·¦à­€áŒ¤lM蘸N㾆▛럪㞂tᕬ镈ì‡å– l amcxPnm\u001a᱋<\/]_]ﻹïª?H": false,
- "áæ°ë¬¢뜚I[♺뽛x?0Hë´¬Wpn꨹Raä¿ïŒ›ìŒ‘{㴂ni祻윸A'y|⺴ᚘ庌9{$æ²{톽=m#@ï–—6ᨧfgs44陎J#<Ễ쨓瀵â©a୛㷉㙉ܸ◠냔嬯~å‘„ç±ç¾¥é•³": false,
- "㘱{<é ¬22?IF@곊I겂嶻Lá›D{@rì’‚?IAᣧ洪惒誸b徂zì·ºê¾ã ­\\刊%禨ìŒâ¶£ä»µ\\P[:47;<ᇅ<\/": {
- "^U釳-v㢈ê—â—„è˜rᜨi;èµ·kR犺䵫\u0000é”ì™m-Ô™!lḃ꛸뻾F(Wê·›y": "#á ºH㸢5v8_æ´‘C",
- "䔵໳$á™ 6èž\u206e摎q圩P|æ…sV4:㜾(I溞I?": -6569206717947549676,
- "é€êž‚ç·µí‡8 >e㺰\"'㌢ÆW\u0004çž•>0?V鷵엳": true,
- "뤥G\\î¡‹è¿‹ä ¿[庩'꼡\u001aiá©®Vì¯á³ªä¦ªÃ”î²…;倱ନë›èªˆ": null,
- "쥹䄆䚟Qæ¦äŽá¢­<\/2ã•£p}HW蟔|äƒî‚꿈ꚉ锳2Pb7㙑Tⅹᵅ": {
- "Y?Ö­$>#cVBꩨ:>ï†eLè’å‹™": {
- "86柡0po äš&-æ‘Ћ祌<\/휃-G*㶢הּì©s㶟餇c걺yu꽎還5*í„§ç°•Ogå©¥Sê": null,
- "a+葞h٥ࠆ裈嗫ﵢ5輙퀟ᛜ,QDﹼ⟶Y騠锪E_|x죗j侵;m蜫轘趥?븅w5+mi콛L": {
- ";⯭ﱢ!ä¹°Fâ½æŸ¤é¶‚näµ£V㫚墱2ë ¾ELEl⣆": [
- true,
- -3.6479311868339015E-18,
- -7270785619461995400,
- 3.334081886177621E18,
- 2.581457786298155E18,
- -6.605252412954115E-20,
- -3.9232347037744167E-20,
- {
- "B6㊕.k1": null,
- "ZAꄮJ鮷ᳱo갘硥鈠䠒츼": {
- "á•…}럡}.@y陪é¶r業'æ´î‰°í€‰x䉴ﵴlí˜):씭脴ᥞhiꃰblﲂ䡲엕8߇Mã¶­0燋標æŒ-?PCwe⾕J碻Ᾱ䬈䈥뷰憵賣뵓痬+": {"aì·©v礗X⋈耓áŠfç½…é®!㔽YYᣓwæ¾33⎔芲F|\"äœT↮輦挑6ᓘL侘?ᅥ]ë†1R௯✎餘6ê½<\/௨\\?qå–·ê«j~@ulq": {"嗫欆뾔Xꆹ4H㌋Fåµ§]à Ž]ã –1ꞤT<$më«O i댳0ä²iï—Œ": {"?à·©?\u20cd슮|ꯆjs{?îž…d7?eNs⢚嫥氂䡮쎱:鑵롟2hJꎒﯭ鱢3춲亄:ë¼£v䊭諱Yj択cVmR䩃㘬T\"Ní™*ै%x^F\\_s9ë³´zz4æ·—?q": [
- null,
- "?",
- 2941869570821073737,
- "{5{殇0ä¾ïž¢g6ë°–í‹è‡©ç¶¹R$ä–­j紋釰7î‹‘sXI繳漪행y",
- false,
- "aH磂?뛡#惇då©…?Fe,ì˜+늵ä˜\"3r瘆唊å‹ï¢Šj⳧࠴ꇓ<\/唕윈x⬌讣䋵%拗ᛆⰿ妴á”M2ã³—å¿…ê§‚æ·²?ゥ젯檢<8ë’ï¶MidXä’3á³»Qî”â–®ä½UT|⤪봦éâŠ",
- [[{
- "颉(&뜸귙{yîš’^\"P퟉ì¶á²Ÿä®­î‹ºDé¡¡9=?}Y誱<$bë±£RvO8cH煉@tk~4ǂ⤧â©å±‹Sî›ïž¢S;J{vV#剤餓ᯅc?#a6D,s": [
- -7.8781018564821536E16,
- true,
- [
- -2.28770899315832371E18,
- false,
- -1.0863912140143876E-20,
- -6282721572097446995,
- 6767121921199223078,
- -2545487755405567831,
- false,
- null,
- -9065970397975641765,
- [
- -5.928721243413937E-20,
- {"6ì´Š\u001a홯kB0w撨燠룉{绎6⳹!í„è´‘y▾鱧ժ[;7ᨷ∀*땒䪮1x霆Hᩭ☔\"rî¹›ä7毟á°r惃3ꉭE+>僒æ¾": [
- "Ta쎩aÆt쵯ⰪVb",
- [
- -5222472249213580702,
- null,
- -2851641861541559595,
- null,
- 4808804630502809099,
- 5657671602244269874,
- "5犲﨣4mᥣ?yf젫꾯|䋬ìž$`Iⳉﴷ扳å…,'î±c",
- false,
- [
- null,
- {
- "DyUIN쎾M仼惀⮥裎岶泭lh扠\u001e礼.tEC癯튻@_Qd4cï…«5S熯A<\/ï¼¼6U윲蹴Q=%푫汹\\\u20614b[௒Câ’¥Xe⊇囙b,ï®æœ3ss땊ë¢i~逇PA쇸1": -2.63273619193485312E17,
- "Mq꺋貘k휕=nKç¡ë«žè¼©>㾆~á¼žà¡¹ê¸æ¦µlâ‹™Hw뮢帋M엳뢯î¹…vâ…ƒ^": 1877913476688465125,
- "á¶´ë»—`~ç­—å…⚽টW˃â½b犳䓺Iz篤p;乨A\u20efì©?ç–Šmã€ì»©ë«¡b탔鄃ᾈV(é¢ç³=뎲ିeF仢䆡谨8t0醄7㭧瘵⻰컆r厡궥d)a阄á·Ed&c﯄伮1p": null,
- "â¯w4曢\"(欷輡": "\"Má­«]䣒頳B\\燧ࠃN㡇j姈g⊸⺌忉ꡥF矉স%^",
- "㣡Oᄦ昵⫮Y祎Sì級㭻撥>{I$": -378474210562741663,
- "䛒掷留Q%ì“—1*1J*ë“헩ᦢ﫫哉쩧EↅIcê…¡\\?â´Šl귛顮4": false,
- "寔愆샠5]ä—„IHï©¥=d﯊/å¶?ॊn%晥D視Nò—˜ˆ'᫂⚦|X쵩넽z질tsî¦kxDQ莮Aoﱻ뛓": true,
- "钣xp?&\u001e侉/y䴼~?U篔蘚缣/I畚�Q绊": -3034854258736382234,
- "꺲໣眀)â¿·J暘î©pИfAVì‚•ì³­Nꯗ4々'唄ⶑ伻㷯騑倭D*Okï¯ê§3bâ½_ï„¡<\/ì±£Xm톰á•䆄`*fl㭀暮滠毡?": [
- "Dç”·p`V뙸擨å¿ë¸ª9c麺`淂⢦Yw⡢+kzÜ–\fY1䬡Hæ­)ë²¾Z♤溊-혰셢?1ï”<-\u0005;æ¢Tále\\ᛵߓﭩ榩<QF;t=?Qꀞ",
- [
- null,
- [{"-ì·«æ²î«§á¬¨å¢Šè‡¸<à ’Hè·¥ 㔭쥃㫯W=z[wধ╌<~yW楄S!â‘»h즓lÄ–N￧篌W듷튗乵᪪템먵Pf悥ᘀk䷭焼\\讄ræ“é¬y6VF<\/6ëž¿p)麡ê ãª\"pà®´e": [
- "#幎æ´é¢’嶈)ã„›J.嶤26_⋌东챯ꠉ⤋ؚ/âš%ç§¼Q룠QGztᄎ㎷អIç¿°Xpç”éœê¨",
- {",T?": [
- false,
- [[
- true,
- 7974824014498027996,
- false,
- [
- 4.3305464880956252E18,
- {
- "᱿W^A]'rᮢ)é¥zï­é¤;Hu\\Fk?ï´º?IGæµ…-ä™§>è¨-xJ;å·¡8깊è ï»“U$K": {
- "Vê•¡è«…æ“W=斸s︪vﲜ츧$)iꡟ싉eî®å¯³?ጭムVથ嵬iæ¥Fg<\/Z|៪ꩆ-5'@ꃱ80!燱R쇤tç³³]罛逇dṌ֣XHiͦ{": true,
- "Ya矲Cë©—Q9膲墅æºíœ»c\\ë”¶Gç””<\/.齵휴": -1.1456247877031811E-19,
- "z#.OOï¿J": -8263224695871959017,
- "å´_3夼ᮟ1Fë¸ë½¯á¦“é´­V豈Ь": [{
- "Nè’¬74": null,
- "yuB?厅vK笗!ᔸcXQ旦컶P-ë…«mᄉ麟_": "1R@ 톘xa_|﩯é˜î¥§sæ§žd!d껀筤⬫è–焵먑D{\\ïƒïŽ¿6k共倌☀G~AS_D\"딟쬚뮥馲렓쓠攥WTMÜ­8nX㩴䕅檹E\u0007ï­¨N 2 ℆æ¶ê¥ê µï“3▙玽|ë¨_\u2048",
- "æA Cä§©G": {":Mí£5e들\\ê€æ¼á”„é¸|Iï¨$)n": {
- "|U䬫㟯SKV6ꛤ㗮\bn봻䲄fXT:㾯쳤'笓0b/à³¢Cì³–?2浓uO.ä°´": "à½ê¼‹e?``,ᚇæ…^8ꜙNM䂱\u0001Iá–™ê§M'vKdꌊH牮r\\O@䊷ᓵ쀆(fî »yè»i툺\"?<\/峧ࣞ⓺ᤤ쵒߯ꎺ騬?)刦\u2072læ…ªy꺜ﲖTjî’•+u",
- "뽫<G;稳UL⸙q2n쵿C396炿Jè“¡zâ£zဩSOU?<\/ë™oEí¸Oé¿…à·´êˆEm#\"[瑦⤫á†glâ¡—q8\"í˜ë¥ä¿‚@ᆤ=\u0001爖ç¾ì·€ã¸©b9\\jeqt㟿㮸龾m㳳긄": {
- "9\"î²–V霟釜{/o0嫲Cå’€-饷äˆ[ë…©î)\r䤴tMW\\龟ϣ^ي㪙忩䞞N湆Y笕)è¨ê–¤èª¥ç…½:14â«»57U$æ“’ä²è–¡Qvↇ櫲현誧?nà®·6": {"l웾䌵.ä…‹ä¦ic碳g[糲Ƿ-ឈᚱ4ì‘§\u0004C࿼\u0018&쬑?멲<\/fD_檼픃pd쪼n㕊渪V䛉mæˆW儅톳뗳䓆7㭽諤Tç… ï–ŠNey?î¼…0᪵鈑&": [
- false,
- null,
- {
- "\rî´’;é¼¶já ‚ê¼RLz~â™”9gf?Ó¡æµ": -1.4843072575250897E-19,
- "&ꊒ\"ꋟä­E诮ﯚO?SWë’훪mb旙⎕ᗕ⶙|á·¤5y4甥": "j5|庠t铱?v íš‹0\"'rxz䃢æºêž«!\u0002",
- "Q á©ãŸ§": {"Hﬔ\u2058䪠틙izZㅛ탟H^ﶲA??R6å‘ Z솋R.à¿¶g8": [
- -8762672252886298799,
- -1.9486830507000208E17,
- null,
- -7157359405410123024,
- null,
- null,
- -995856734219489233,
- "呧㫹A4!",
- null,
- -1.9105609358624648E-19,
- 5888184370445333848,
- 2.25460605078245E-19,
- 2.5302739297121987E18,
- "뢹sbEfæµ2丯ï‡?뗾耸(Wdë™SବꭖrtU?ç­¤P똙Qpbbï‘¡KqaE$æ¥Vì›°3i/lK퉜,8︸e= gèž“t竦컼?.寋8éµ—",
- 7377742975895263424,
- 2.4218442017790503E-19,
- {
- "y꒚ཫ쨘醬킃糟}î‘yTSt䡀⇂뿽4ൢ戰U": [[
- 3600537227234741875,
- 4435474101760273035,
- -1.42274517007951795E18,
- -5567915915496026866,
- null,
- null,
- [
- -3204084299154861161,
- {
- "7梧慸æ†.a瘎\u00041Uéµ®CkÖ¨d惥è€â³¡Y,â­ì¨EåžFFI鱑ⳬ줢7â§µBﴠ耘줕햸qì»´~*ç‘W.떛ࡆ@'á€+è½³": -961121410259132975,
- "⥅]l黭㣓绶;!!⎃=朼ã¿e&ἂ繤C﯀lä£ãŒ€6TMì‘®w懃ꡡ#ᤆ䰓,墼湼゙뽸㲿䧽쫨xᵖ듨<\/ T0峸iQ:溫è„\\\"쎪ὴ砇宖^Mæ³¼í¥âž…鈫@ᄟ༩\u2008⥼": true,
- "â©\"籽汎P싯鲘蟼sRá¯ä…©\u0019R(kRá–&ಌ 0\"é³¶!馼YH": null,
- "鮼ꚇ싋։刟\rRLd步Nⴗ5Eࡆ訛갚[I醵NC(郴ṉy5D뤺౳QY壯5苴y훨(W\\Cଇ姚C艄깹\u001c歷㋵ZC᥂": [
- -6806235313106257498,
- null,
- "}N⸿讽sꚪ;ï‘¶\\p繇jè‹„î¡ä«¨\u20e7%5x?î•¥t#",
- {
- "O〗k<墻yV$à°rs-c1ఌ唪.C7_Yobᦜ褷'b帰mã„‘l⌅": {"qB뗗擄3éš‚5ëºæ«‚䱟eì´¸P/é©,3æŽê—©=冉棓㑉|ËžF襴뿴,:㞦<퓂⧙礞♗g뚎ᛩ<\/뉽ⶳ⸻A?_x2Iã½å‹’*Ií™±î¢é§ç²¿~曟㤙2绥Ly6+ìƒuu鿜בfí˜|æ­à£–É": [
- ">hh䈵î”w>1â²ì­V[â…Ž\\헑벑F_ã–⠗㫇hæ½;á¿æ±°á±¼ç€–J옆9RRì…vsZ柺鶶툤r뢱橾/ꉇ囦FGm\"謗ꉦ⨶쒿⥡%]鵩#ᖣ_蹎 u5|祥?O",
- null,
- 2.0150326776036215E-19,
- null,
- true,
- false,
- true,
- {"\faá­¶Pæ¤WWcá Ÿf뚉á¬í“—â³€Wç¹5:HXH=q7xì°™X$)모r뚥ᆟ!Jﳸf": [
- -2995806398034583407,
- [
- 6441377066589744683,
- "Mﶒ醹i)Gἦ廃s6몞 KJ౹礎VZ螺费힀\u0000冺업{è°¥'꡾뱻:.ꘘ굄奉攼Diá·‘Ké¶²y繈욊阓v㻘}枭캗e矮1c?íœ\"4\u0005厑莔뀾墓ë‚⽴洗ṹ䇃糞@b1\u0016즽Yè½¹",
- {
- "1⽕⌰鉟í”M㤭n⧴ỼD#%é˜âŠ¯ì¿¼ç¨ë¸£ëªç´§á…‡ã“•ᛖcw嬀~ഌ㖓(0r⧦Qä‘•é«à´°é“‚㓻Rå„®\"@ꇱmâˆà¯¿á¦¯é Œ8}㿹犴?xn잆꥽R": 2.07321075750427366E18,
- "˳b18㗈䃟柵Z曆VTAu7+㛂cb0﯑Wp執<\/臋뭡뚋刼틮è‹ë²²î·´TLP预庰܈G\\O@VD'鱃#ä¹–ëº*鑪ꬳ?MÞždï­¹{â‡åœ¯ì‡œã¼ž顄︖Y홡g": [{
- "0a,FZ": true,
- "2z̬è£î’®ê§¦é©¸\u0006L↛Ḣ4๚뿀'?lcwá„§ã®!蓚䃦-|7.飑挴.樵*+1ﮊ\u0010ꛌ%貨啺/JdM:ë˜ïˆ!FBe?鰴㨗0Oè´¢I藻ʔWAá«“Gì³›u`<\/I": [{
- "$Ï„5Vé´a뾆両環iZp頻යn븃v": -4869131188151215571,
- "*즢[⦃b礞R◚nΰꕢH=귰燙[yc誘g䆌?ଜ臛": {
- "洤湌鲒)⟻\\䥳va}PeAMnï¼®[": "ã³Éª/(軆lZR,Cpæ®È®Nå•·\"3Bå©´?i=r$펽á¤ì€¸",
- "阄R4㒿㯔ڀ69ZᲦ2ç™í•Œå™—På´œîž#\\-ì­è¢›îˆµ&é‘/$4ç«¥Vê©‘_ZHAæ¾¢fZ3": {"x;P{긳:Gé–‰:9?æ´»H": [
- "繺漮6?z犞焃슳\">á»[Ⳛ䌜ë…䂹>èµâ¼¶ç…œï’˜Yæ¡¥[泥뚩MvK$4ï‰jtï¾›",
- "E#갶霠좭㦻ୗ먵F+䪀oè’ba쮎4X㣵 h",
- -335836610224228782,
- null,
- null,
- [
- "r1᫩0>danjY짿bs{",
- [
- -9.594464059325631E-23,
- 1.0456894622831624E-20,
- null,
- 5.803973284253454E-20,
- -8141787905188892123,
- true,
- -4735305442504973382,
- 9.513150514479281E-20,
- "7넳$螔忷㶪}䪪lì§´\u0007é¹Pé°šHFéŠZJﳴ/âŽ1ᷓ忉ç‡áœ‹ì“ˆxëµ mä·çª¥á”^\u0019á¶Œå­#ヂt☆áƒpáŽè‡¶äŸ±5ï‰$ä°µ&๵分ìˆ]äˆë‰â™‚åŽ\u0011<>",
- "C蒑貑è—lï°°}X喇몛;të°¿O7/᯹f\u0015îµ¼kI嘦<ዴ㟮ᗎZ`GWퟩ瑹࡮ᅴB꿊칈??Ræ ¡s脚",
- {
- "9çµæˆ¬+AU^洘拻ቒy柭床'ç²™XG鞕᠜繀伪%]hï ¾C,$è¼™?Utä¹–Qmë–šWï¶8઼}~qâ ªrU䤶CQ痗ig@#≲t샌f㈥酧l;yé—¥ZHæ–¦e⸬]j⸗?ঢ拻퀆滌": null,
- "畯}ã§¢J罚å¸VX㨑>1ꢶkT⿄蘥ã‘o|<嗸層沈挄GEOM@-äžšä§°$만峬è¼ä ±V✩5宸-æ‚î¡§D'ã—ªyP掶7bâ ŸJã•»SfP?d}v㼂á…'猘": {
- "陓y잀v>╪": null,
- "鬿L+7:ë‘Y=ç„ U;킻䯌잫!韎ஔ\f": {
- "駫WmGጶ": {
- "\\~m6ç‹©K": -2586304199791962143,
- "ႜࠀ%Í‘lâ¿…D.ç‘¢Dk%0ç´ªdḨTI픸%뗜☓s榗኉\"?V籄7w髄♲쟗翛歂E䤓皹t ?)ᄟ鬲éœ6Cî³´": {
- "_ì·¤a圷1\u000eB-XOy缿請∎$`쳌eZ~æï€§íŠ»/蜞`塣৙\"⪰\"æ²’l}蕌\\ë¡ƒè«æ°Œ.望wZ|o!)Hnçqg}": null,
- "kOSܧ䖨钨:಼é‰ê­O醧Sî…¨`ì‹­`ꓭì­ï¯¢N&Et㺪馻ã¢â…³ã¢ºå´¡àºŠèœšé”«\\%ahx켨|ż劻ꎄ㢄ìŸA躊᰹p譞綨Ir쿯\u0016ﵚOd럂*僨郀N*bã•·63z": {
- ":L5r+T㡲": [{
- "VK泓ë²á®™Ry㓤➙Ⱗ38oi}LJቨ7Ó㹡৘*q)1豢⛃e᫛뙪壥镇æž7Gè—¯g㨛oI䄽 孂L缊ꋕ'EN`": -2148138481412096818,
- "`â›á˜‘$(खꊲ⤖á„ꤒ䦦3=)]Y㢌跨NĴ驳줟秠++då­³>8ᎊ떩Eê¡£Sv룃 쯫أ?#Eî·°|á­™ãŽ?zv:5ï©^â‹‘V": [
- -1.4691944435285607E-19,
- 3.4128661569395795E17,
- "ãƒì´—^G9ä½­é¾¶n募8R厞eEw⺡_ㆱ%⼨D뉄퉠2ê©µá›…â³æ¿L팹Là·€n=\"æ…‰ë…á›®y>!`g!í’²î¦ï¨’[/;?[vï®ê²è»‡}⤳â¤í•∌Tã½²R홓é‰ã“¥",
- "æ„°_⮹T䓒妒閤둥?0î°šaB@㈧gç„»-#~è·¬x<\/èˆPÝ„ê¡=\\׳P\u0015jᳪá¢qï‹¶;ã¯l%á­—;砢觨â–,è¬ê°Gy?躤O黩í‹Yã’a擯\n7覌똟_䔡]fJ晋IAS",
- 4367930106786121250,
- -4.9421193149720582E17,
- null,
- {
- ";ᄌ똾柉곟ⰺKpá‡ä±»à¸ºä–{o~h!ï½…ê¿àª»ìš„Úš\u0002y?xUd\u207c悜ꌭ": [
- 1.6010824122815255E-19,
- [
- "宨︩9앉檥pr쇷?WxLb",
- "æ°‡9】J玚\u000f옛呲~ è¼ 1D嬛,î•*mW3?n휂糊γ虻*á´«ê¾ ?qîžå‡è¶—Ko↦GTé“®",
- "ã¶¢ážmOã”k'诔栀Z蛟}GZé’¹D",
- false,
- -6.366995517736813E-20,
- -4894479530745302899,
- null,
- "V%᫡IIç’…ï»ä…›ä“Ží’¹ï±¢/pU9seë˜ë›žx梔~C)䨧䩻蜺(g㘚R?/á»°[å¿“C뾠ࢤc왈邠买?嫥挤풜隊枕",
- ",vç¢å–”㌲쟚蔚톬៓ꭶ",
- 3.9625444752577524E-19,
- null,
- [
- "kO8란뿒䱕馔b臻âŸéš¨\"㜮鲣Yq5mí”<u뷆cè­†\u001bN?<",
- [{
- ";涉c蒀ᴧN䘱䤳 ÿꭷ,핉dSTDB>K#ꢘug㼈á¦=P^6탲@ä§”%$CqSw铜랊0&m⟭<\/a逎ym\u0013îš¡vᯗ": true,
- "æ´«`|XN뤮\u0018詞=ç´©é´˜_sX)㯅鿻á»ì‹¹": 7.168252736947373E-20,
- "ꛊ饤ï´è¢(逊+~⽫얢鈮ï«è‰¬O힉7Dç­—S곯wæ“I斞᠈븘蓷x": [[[[
- -7.3136069426336952E18,
- -2.13572396712722688E18,
- {
- "ç¡¢3㇩R:o칢行E<=\u0018á¬YuH!\u00044U%å炼2>\u001eSi$â“·ê’ˆ'ï‘¿ë ¢gᙫ番ꯒ㛹럥嶀澈v;è‘·é„•x蓎\\惩+稘Uî“´Eᖸﳊ㊈壋Nå«¿â¾æŒŽ,袯苷ኢ\\x|3c": 7540762493381776411,
- "?!*^á¢çª¯?\u0001ڔꙃw虜ë³îšFgJ?&⨫*uo籤:?}ꃹ=ٴ惨瓜Z媊@ત戹ã”똩Ԛ耦Wtè½\\æž’^\\ꩵ}}}ꀣD\\]6M_⌫)Hè±£:36섘㑜": {
- ";í™—á°°U஋㙛`D왔ཿЃS회çˆ\u001b-㢈`ë´†?盂㛣듿ᦾ蒽_AD~EEຆ㊋(eNwk=RÉ å³­qï’«\"5Ἠ婾^>'ls\n8QAK<l_⭨穟": [
- true,
- true,
- {"ﳷm箅6qⷈ?ﲈ憟b۷⫉἞V뚴少U呡瓴ꉆs~嘵得㌶4XR漊": [
- "í†ä»‹fM暪$9K[ㄇìƒí³æ’¦gæ’Ÿæ¸jÒFã¹¹aj bHᘀ踉êŽï¼£ç²„ a?\u000fKì¦‰î¶¯éƒ å¹¨9D舢槷Xh뵎u훩Ꜿ턾ƅ埂P埆kë©€{䢹~?D<\/ê¼¢XR\u001b〱ä½ê¼¨i㘀ḟ㚺A-挸",
- false,
- null,
- -1.1710758021294953E-20,
- 3996737830256461142,
- true,
- null,
- -8271596984134071193,
- "_1Gí‰í…‘m䮔鰼6멲Nmꇩſt쓟íŠN许FDï¡€j+3^ﶜ⎸\u0019⤕橥!\"sî•—-뾞lz北׸êšëž¬)?l⻮고iä‘°\u001f䪬",
- 4.459124464204517E-19,
- -4.0967172848578447E18,
- 5643211135841796287,
- -9.482336221192844E-19,
- "౪å†é‡¶9D?sèž­X榈枸j2ç§€vï ˜î ]泌鰚岒èµè½€ìŒ¶ïŠ›ií…½qMbL]R,",
- null,
- [
- null,
- {"M쪊ꯪ@;\u0011罙ꕅ<eáº|爑Yâµ<\/&ᩎ<腊ሑᮔ੃Fè±­": [
- "^0࡟1ë³Pí‹áæˆF⨥Iê‚´\"z磣Vâ…¡=8í€2]䢹h1\u0017{jT<Iç…›5%Dì…Sâ‘™â…J*ìƒ å·™àº”ï€¢;᧡䙞",
- [{
- "'ã¶¡í¾é„§`è·Š\"gV[?u᭒Ʊ髷%葉굵aë¦Nì¼§Qﯳy%y䩟髒L䯜Säµ³r絅肾킂á'ꔦg긓a'@혔যWè°á¬F栩ŷ+7wéžš": 6.3544416675584832E17,
- "苎脷v改hmìµ|㋊g_ᔠ뒨蹨峟ìŽã·¸|Ο刢?Gͨ옛-?î¨Gꦱî«î“©IEYUX4?%ꘋᆊ㱺": -2.8418378709165287E-19,
- "誰?(H]N맘]kæ´³\"qï±è’§è˜ž!Rí«\\(Q$T5Nå â«£ìœ¿6|럦ì†ï¸…ï­—(": [
- "峩_\u0003A瘘?✓[硫䎯á½uጭ\"@Y綅첞m榾=è´®9R벿῜Zï §",
- null,
- "䰉㗹㷾Iaáƒqcp쓘὾൫Q|ﵓ<\/ḙ>)- Q䲌mo펹L_îŽ¦ì¹æ¨–庫9ê©ìª¹á˜¹ä‘–ç€aK îž?*趤fë­“å»p=磕",
- "î“å“‘z懅á¤-ê¹ux쀭",
- [
- true,
- 3998739591332339511,
- "ጻ㙙?᳸aK<\/囩U`B3袗ﱱ?\"/ké”ä§2ï…¤l@쿎VZ쨎/6ꃭ脥|B?31+on颼-ê®§,O嫚m à¡­`KH葦:粘i]aSUì“™$ì‚f+詛頖b",
- [{"^<9<ç®&絡;%iï«¡2攑紴\\켉hì“™-柂äšven\u20f7浯-Ꮏ\r^í›ä“ší—¬\u000e?\\ã…¡ÖºJë–·VOt": [{
- "-௄å¶k㘆í˜à®½y⎱㢬sS઄+^瞥h;á¾·jî­;抭\u0003ë°«f<\/5â°§ï§§ï¡™_朻ï—%*[-撵䷮彈-芈": {
- "㩩p3篊G|宮hz䑊o곥j^Co0": [
- 653239109285256503,
- {"ê¶²?|\":N1Û¿æ°ƒNZ#깩:쇡o8킗ࡊ[\"ë¸Po핇1(6é°$膓}â½*)渽J'DN<ì™ê¸˜æ¯¦ë²Ysì¹–": {
- "2Pr?Xjㆠ?æ®/?㓦柖馃5뚣Nᦼ|é“¢rè¡´ã©–\"ç”æ¹—Üæ†": "\"뾯ië‡ç­ç‰»$ç²/4ka $åŒíœ´ï‹è¯‘zbAá©ê‡¸ç‘…&뵲衯ꎀᆿ7@ꈋ'ᶨH@á ´l+",
- "7뢽ëšv?4^ꊥ_⪛.>pởr渲<\/⢕疻c\"g䇘vU剺dஔ鮥꒚(dïŸv祴Xâ¼¹\\îºa8y5å†": true,
- "o뼄Bìšžç¾hrï·”í˜ë’šâ¿›U5pꪴfg!6\\\"爑ì䢱W<ï¶•î\\í…£ç‡oI/BK뺡'谑♟[Ut븷亮g(\"t⡎有?ꬊ躺ç¿è‰©nl F⤿蠜": 1695826030502619742,
- "ÛŠê¹–>ࡹ햹^ⵕ쌾BnN〳2C䌕tʬ]ì° ?ݾ2饺蹳ã¶êŒ­è¨\"â—¹á¬D鯎4e滨T輀ﵣ੃3\u20f3í‚™D瘮g\\擦+泙᧠鬹ﯨַ肋7놷郟lPå†{ß’hà§œr5,ê“‹": null,
- "ΉN$y{}2\\N﹯ⱙK'8ɜͣwt,.钟廣䎘ꆚk媄_": null,
- "䎥eᾆá¦î‘§ì‰,JÞªn岪ã¥sî­•æ–謽䚔5tã¯ï–µï£šã°³ã±ŠZhD䃭f絕s鋡篟îža`Q鬃┦鸳n_é‚(E4è¿ _è§…ë·_宪D(NLî²ç–¶hL追V熑%]vè‚«=惂!㇫5⬒\u001fï²å–º4랪옑": {
- "2aè¼85먙R㮧㚪Sm}E2yîŠê†£ê«¨rRymã±è†¶á”¨\\tç¶¾A☰.ç„„ë™—9<쫷챻䒵셴᭛䮜.<\/慌꽒9å»Okä°ŠZ㥪幸k": [
- null,
- true,
- {"쌞ì": {
- "â–ŸGL K2ië›±iï¼±\"Ì .옛1X$}涺]éŽæ‡ Ú¦ëŠ·?tfçŸÝžã‚Ÿ{": 1.227740268699265E-19,
- "ê’¶]퓚%ฬKâ…": [{
- "(à·›@Ç®ã£ä§¼äµ¤[aテൖvEnAdUë –ë—ˆ@볓yꈪ,mÔ´|꟢ìº(而첸죕CX4Y믅": "2⯩㳿ꢚ훀~迯?᪑\\啚;4X\u20c2è¥B箹)ä¿£eá»»w䇄",
- "75༂f詳䅫ê§é¿ }3\u20b5'∓ä±è™€fè¼î‘”Iq鈆﨤gí©)BFa왢d0뮪痮Mé‹¡nw∵謊;ê§f美箈ḋ*\u001cî±ïœŸ`퇚í‹ä³«$!V#N㹲抗ⱉçŽ(V嵟ï«_bã³…\u0019": null,
- "e_m@(i㜀3ꦗ䕯䭰Oc+-ë ¨0뭦⢹苿蟰ê‚SVä°­å‹¢ë¥.ྈ爑Vd,á•¥=í€)vz뱊ꈊB_6듯\"?{ã’²&㵞뵫ç–ë¡ë¯ˆ%Qwé™,?\ræž®\"? N~癃ruà¡—dn&": null,
- "㉹&'Pfs䑜공j<\/?|8oc᧨L7\\pX᭠9᪘": -2.423073789014103E18,
- "ä„瑄䢸穊f盈᥸,Bî§§ë¾§í‘—íšµB1쟢f\u001f凄": "é­–âš2儉j꼂긾껢嗎0ࢇ纬xI4]ï„(à©“`蕞;픬\fC\"æ–’\")2æ«·I﹥迧",
- "ퟯ詔xæ‚ë ¹+T?Bg⥄섅kOeQí¼ã»´*{Eé¼6æ°¿L缋\u001c둌๶-㥂2==-츫I즃ã ï–˜Lg踞ꙂEG貨鞠\"\u0014d'.ç¼—ï¡gI-lIb䋱ᎂDy缦?": null,
- "î’¢ç´Mã¦çŠ¿w浴詟棓쵫G:äœ?V2íž½7N*n&ã–ŠNd-'ຊ?-樹DIv⊜)g䑜9뉂ㄹí‘阉~ê…쵃#R^\u000bïž®B䌎䦾]p.䀳": [{"ϒ爛\"ꄱ︗竒G䃓-î†ã¾å¸³ã‚.j)qguæ‰å¾£à¨Zé¼—A9A鸦甈!kè”å–™:3Tî†%&ã ˜+,ä·ž|ì±½v䚞문H<\/醯rì…“ã¶¾\\a볜åºzEä·_죤ဵ뿰᎟CB": [
- 6233512720017661219,
- null,
- -1638543730522713294,
- false,
- -8901187771615024724,
- [
- 3891351109509829590,
- true,
- false,
- -1.03836679125188032E18,
- {
- "<?起HCᷭ죎åŠîŒŽèއ逰/{gs\u0014⽛㰾愫tï¿–<솞ڢëŒç…²è†ºà¨»9x닳xà¡­Q訽,ᶭඦtt掾\"秧㺌d˪䙻꫗:á­ˆh4ç·žç—䤴c뫚떩త<?ᕢ謚6]í›Oé°é‹›é• è´©èµŸ\"<Gâ™·1'": true,
- "቙ht4ßBqꦤ+\u0006멲趫ç”)椾": -1100102890585798710,
- "ç·å…Žê³‡ë‡¸ç²ŸF醇;朠?厱楛㶆â¶7râ¾›o꯬᳡F\\머幖 㜦\f[æ¦á¥½ã®£0䕊?J㊳뀄e㔔+?<n↴å¤î§·": [
- "4~ê‰ç¾\\å®(泤å•빜\u0014>j랎:g曞ѕᘼ}链N",
- -1.1103819473845426E-19,
- true,
- [
- true,
- null,
- -7.9091791735309888E17,
- true,
- {"}蔰鋈+ê¨å•µ0?g*사%`J?*": [{
- "\"2wG?yn,癷BK\\龞䑞x?蠢": -3.7220345009853505E-19,
- ";饹়â€)çš‹`噿焒j(3â¿w>å5X<np?<줯<Y]æ˜!J೸UⳂNे7v௸㛃ᄧ톿䨷鯻v焇=烻TQ!F⦰䣣눿Ké·šëˆ'â­²mæ (äš»": [
- "蹕 淜੃b\"+몾ⴕ",
- null,
- 35892237756161615,
- {
- " 듹ã)5æ…ç®±&$~:é°ì®<\/å ‹?% \\勽唅zì†å¸‹ä˜ºH髀麡M퇖uz\u0012m諦d᳤콌æ¨\rX싹̡á²": -433791617729505482,
- "-j溗ࢵcz!:î€}✽5à´‡,욨Ýs#ë«=å—æµº^}E\\Y\\T*뼈cdêºcÛ˜ïµëŽä¨¸ë±K䠴㉿æ¿é€³îŽœ@wî·¿fì¢<\/[L[": -9.3228549642908109E17,
- "Ms킭uà®—%\\uâŽ/家欲ἅ答㓽/꯳齳|㭘Pr\"v<\/禇䔆$GA䊻˔-:틊[h?倬è¤á¾žà§³.Gw\u000b": [
- "0宜塙I@ä´è‰\\Uyë’…=2<hæš’ï…£K._è´¡ç’Yi檻_⮵uá㘗è [f\u0015힢Hê”®}጑;ï´èªyf0\"\u20cc?(=qæ– âž½5ꎾ鞘kⲃ",
- -2.9234211354411E-19,
- false,
- true,
- {
- "\u0011⟴GH_;#怵:\u001c\u0002nîž»1U\\p/ì™”(┫]hêšî·ƒ7\r0䵷첗岷O௷?î·°ãŽ[殇|J=?韷pᶟ儜犆?5კ1kê–iH竧뛈ପdmk游y(콪팱ê¾k慧 yè¾£": [
- false,
- "O\"ëp覈ykv磂㢠ãµ~뀬íŠlC&4솎䇃:Mj",
- -7.009964654003924E-20,
- false,
- -49306078522414046,
- null,
- null,
- 2160432477732354319,
- true,
- "4íš¡h+!踹ê¬P鮄{0&ë±¥M?ìƒéž…n㮞ᨹ?쒆毪l'ç®…^ꚥ頛`e㻨52柳⮙嫪࡟딯a.ï‘„~äµ®1få˜N&zÈ­L榓ۃ鳠5d㟆M@㣥ï Ó‹AÎq0縶$",
- -3.848996532974368E16,
- true,
- null,
- -3.5240055580952525E18,
- {
- " vï­·áµ#ce乃5僞?Z D`묨粇á”ç» vWLè­¢uë½€\\J|tâ“™tâ„–\"ꨋnT凮ᒩè‚ç¯b騩:䢭Hbvì»å³¨z㹚T趗햆귣학津Xiï¼¹@á–¥K": true,
- "!F 醌yï䉸W2ꇬ\u0006/ä’7~%9擛햀徉9â›°+?㌘;ê “X䇻Dfië¼§ì’’\u0012F謞Õ絺+臕kà¤LSQìŒX쎬幦HZ98è’Šæž³": "澤令#\u001dæŠâ›³@Næ•퀂[5,✄ꘇ~䘷?\u0011Xꈺ[硸⠘⛯X醪è¡x\u0007쌇MiX/|ï¾ëšK8ä¡î¿¥W)銀q僞綂蔕E",
- "6â²ä£–Rà§ž@ငg?<\/à³´xé™™Xꈺ崸⠅ᇾ\\0X,H쟴셭A稂ힿã‚F\\쑞\u0012懦(Aᯕç­~î½”\u0001ê»®X?逊": 5.7566819207732864E17,
- "[c?椓": false,
- "kä’‡": 2583824107104166717,
- "꙯N훙ã…ﮒ燣㨊瞯咽jî™Mxby뻭뵫װ[\"1畈?à§±L": "ë£á”‚魠羓犴ꚃ+|rY",
- "ë…ºZ?îˆä¬ï“©é‰‰îˆ­:?â³™ç˜Cኯ.Vs[釿䨉ì§\\\\*쵢猒$\\y溔^,㑳": {"藶꺟": [{
- "\"d훣N2zq]?'檿죸忷篇ﮟ擤m'9!죶≓pë­»\\ᇷ\f퇶_ä°¸hà¹Q嵃訾㘑従ꯦ䞶jL틊ræ¾µOmᾫ!H䱤팼/;|á­ºI7슎YhuXiâš¼": -1.352716906472438E-19,
- "M⽇倻5Jä‚«à¤”á”æ¥¸#î „î¾–J[Fﹱ쫮W誻bWz?}1\"9硪뻶fe": "盬:Ѹ砿íšë•£T凊(mç¦å‘œï»R㿎艴䂵h",
- "Rë¾k힪CHé’™_i苮ⰵoᾨ紑퉎7h؉\"柀è½z0့\"<?嘭$èœ?礲7岇槀묡?Vé’¿T⣜v+솒çšÔ›2ç±³mH?>è–™å©è¿3aFÆÃ": "2,ê“´g?_섦_>Y쪥션钺;=趘F~?D㨫\bX?㹤+>/믟kᠪ멅쬂Uzỵ]$ç§`mé›ç‘Šî’ඖ鯬cꙉ梢f묛bB",
- "♽n$YjKiXX*GOè´©éƒè±®ç¥´éžK醞眡}ê—¨v嵎꼷0à­¸+Mè‹eH徸Jîžê£†:â¼æ‚¥B켽迚㯃bè«‚\u000bjꠜ碱逮m8": [
- "푷᣺ﻯd8ﱖ嬇ភHîªé¹Žâ¡±á±…0g:æžœ6$GQ췎{vá·§Yy-è„•xå¹ç ¡ï¨¬â®¸Cï§‚êš=軄H犠Gè°–ES詤Zè ‚3î§™lë´Ÿhï¿’7䦹1GPQG癸숟~[#é§¥8zQ뛣J소obg,",
- null,
- 1513751096373485652,
- null,
- -6.851466660824754E-19,
- {"ä©‚-â´®2Ù°K솖풄꾚ႻP앳1Hî³é·›wmR䗂皎칄?醜<\/&à §ã¬X濬䵈K`vJ륒Q/IC묛!;$vÏ‘": {
- "@-êš—xྐྵ@m瘬\u0010U絨ﮌé©\\켑寛넆T=tQã­¤Lì—°@脸삯e-ï–…î–‘:⩼u㎳VQ㋱襗ຓ<Ⅶ䌸cML3+\u001e_C)r\\9+Jn\\Pﺔ8蠱檾è…Pqé³è¯î¦§Tä„I": -1.80683891195530061E18,
- "á·­á‹»U~ཷsgSJ`᪅'%ã–”n5픆桪砳峣3ç®æž¾äŒ·âа呀ïŒ": {
- "Ş੉䓰邟自~X耤pl7间懑徛s첦5ਕXexh⬖鎥á€nNr(J컗|ૃF\"Q겮葲놔엞^겄+㈆è¯ã€¾í¬ç´G'E?飕1fâ¼í…¬æ‚šï•¦æ³¬ë¨Uç¬í›¶Qs": false,
- "î³…(\u20dag8í½íŠ£>^Y{뤋.袊䂓î†;_ïg]S\u202a꽬L;^'#î—™ë•bႌ?Cç·¡<ä²ä²æ–­ê6\u001asD7IK5Wxo8\u0006på¼Šâ¼‚ê¯æ‰µ\u0003`뵂픋%ꄰ⫙ë¶lå›å°›ïˆ®+ä—…E쟇\\": [
- true,
- {
- "\n鱿aKã¡â’ã¼™2ì´¹f;`ì¾qIà¡”G}ã·äç“°w늮*ç²…9뒪ㄊCj倡翑閳R渚MiUO~仨䜶RꙀA僈㉋⦋n{ã–¥0딿벑î§é€¦â¥»0î¾®h薓쯴ê»": [
- 5188716534221998369,
- 2579413015347802508,
- 9.010794400256652E-21,
- -6.5327297761238093E17,
- 1.11635352494065523E18,
- -6656281618760253655,
- {
- "": ")?",
- "TWKLꑙ裑꺔UE俸塑炌Ũ᜕-ï’‚o\"徚#": {"M/癟6!oI51niíš=댡>xê¨\u0004 ?": {
- "çš­": {"⢫䋖>u%wî²´ìž¼<ä•ê˜P䋵$é­‹æ‹U䮎緧皇Y훂&|羋ꋕ잿cJ䨈跓齳5\u001a삱籷I꿾뤔S8㌷繖_Yឯ䲱B턼Oæ­µF\\l醴o_欬6ç±=D": [
- false,
- true,
- {"Mt|êžD|Fê¶£MQ뵕T,ëºk+?ãµi": [
- 7828094884540988137,
- false,
- {
- "!༦鯠,&aﳑ>[euJê½ç¶·æB.h": -7648546591767075632,
- "-n켧嘰{7æŒæ¯„Y,>â螵煫乌pv醑Qå¶š!|âŒè²¬0왾ë¢ê…蛨S\\)ç«°'舓Q}A釡5#v": 3344849660672723988,
- "8é–ªéºV=鈢1녈幬6棉⪮둌\u207d᚛驉ꛃ'r䆉æƒà¥ˆ|bἧﺢᒙ<=穊强s혧eꮿ慩⌡ \\æ§³W븧J檀C,ᘉì˜0俯퀉M;筷ࣴ瓿{늊埂鄧_4æ¸Nn阼Jੵ˥(社": true,
- "oë¼€vwï…®)4A뢵(î¼±a䵢)p姃뛸\u000fK#KiQp\u0005ê…芅ì…îª": null,
- "ç ¥$ꥸ┇耽uæ–®Gc{z빔깎밇\\숰\u001eê´·å„㶇쵿_á´„+hç©¢p촀Ნ䃬zäé…³Ó‚31xꔄ1_ç šWë ˜G#2葊P ": [
- -3709692921720865059,
- null,
- [
- 6669892810652602379,
- -135535375466621127,
- "뎴iO}Z? 馢녱稹ᄾä©rSt帤넆&7ié¨ë©—ç•–ï”9誧鄜'w{Ͻ^2窭외b㑎粖i矪ꦨ탪跣)KEㆹ\u0015V8[W?⽉>'kc$䨘ᮛ뉻٬M5",
- 1.10439588726055846E18,
- false,
- -4349729830749729097,
- null,
- [
- false,
- "_è ¢ã ^䟪/D녒㡋ỎCä’ˆíŒïŒ¢\u0006àªq@O펢%;é¹ìŒo戥~A[ꡉ濽ỳ&虃᩾è£å”™ï¤£èŒ¨Ig楡꒻M窓冉?",
- true,
- 2.17220752996421728E17,
- -5079714907315156164,
- -9.960375974658589E-20,
- "ᾎ戞༒",
- true,
- false,
- [[
- "ⶉᖌX⧕홇)g엃⹪xëšç™Ÿ\u0002",
- -5185853871623955469,
- {
- "L㜤9ợㇶKé°â‹“V뽋˖!æ–«as|9"á¬ä†ª?î¾¶7胜&n薑~": -2.11545634977136992E17,
- "O8뀩D}캖qè‚6༣ã—䈓煮å½à¨†á޼Dᣘí›;": false,
- "YTá¡…^ï—Lã—ŽcbY$pᣞ縿#fh!ꘂb삵玊颟샞ဢ$ä—é¼’ëª~rkH^:닮먖츸륈⪺쒉砉?㙓扫㆕꣒`R䢱Bé…‚?C뇞<5Iޚ讳騕S瞦z": null,
- "\\RB?`mG댵鉡å¹ç‰©äµŽæœ‰5*e骄T㌓ᛪç¾é§’Ku\u001a[柆jUq8⋈5鿋츿myï»—?é›ux঴?": 5828963951918205428,
- "n0æ™…:黯 î¶·xu씪^퓞cB㎊á¬âº˜Ù¤Öƒ~B岚3㥕擄vᲂ~F?Cä¶–@$mï›~å¿”S왖㲚?챴⊟W#벌{'ã°Iä ç¸s樘\\X뢻9í•¡I6èㄛî‚î«8쯶]wॽ0L\"q": null,
- "x增줖j⦦tä¢áŽ™ïŠ­ã›¿Yf鼘~ê«“æ„4惊\u209c": "oOhbᤃ᛽z&Bi犑\\3B㩬劇䄑oÅ쨅孥ë©àº–acA㖫借ãžvg싰샂ãœ#譞⢤@k]鋰嘘䜾L熶塥_<\/â¾å±ˆï®Š_mYè¹t뙺}Ox=wé®®4S1ê©ï¬¾'å·‘",
- "㗓蟵ꂾe蠅匳(JPä—à·¸\u0089耀왲": [{
- "ᤃ㵥韎뤽\r?挥O쯡⇔㞚3ä¼–\u0005Pî•⋪\"Dê¶£QLn(⚘罩䩢Ŏv䤘尗뼤ë›O淽鋋î¡é—šrå´©a{4ç®™{煷m6〈": {
- "l곺1L": {
- "T'ਤ?ç …|੬Km]ä„©\"(à¿¶<\/6U爢䫈倔郴l2ã´±^줣k'Læµ–Lé°„Rp今鎗⒗Cì–¨Mí›ã¡§Î˜X粜뫈N꤇輊㌻켑#㮮샶-ä—룲è ç™œã±V>=\\I尬癤t=": 7648082845323511446,
- "鋞EP:<\/_`á§e混ㇹBd⯢㮂驋\\q碽饩跓྿ᴜ+j箿ë ã—‘yK毢宸p謹h䦹乕U媣\\炤": [[
- "3",
- [
- true,
- 3.4058271399411134E-20,
- true,
- "æ€+憱f逮@먻BpW曉\u001aã£âŽŠ$n劈D枤㡞좾\u001aá›ïŒƒè‹”౩é—1B䷒Ṋ݋âžê€žêƒç£$t੤_:蘺⮼(#N",
- 697483894874368636,
- [
- "vᘯ锴)0訶}䳅⩚0O壱韈ߜ\u0018*Ué¾ä–=䧉뽑å•휻ID쿇嘗?ꌸῬ07",
- -5.4858784319382006E18,
- 7.5467775182251151E18,
- -8911128589670029195,
- -7531052386005780140,
- null,
- [
- null,
- true,
- [[{
- "1欯twG<uä®â½ê‡£_ჟﱴଶ-쪋\"?홺k:èŽêœª*⺵꽹댅釔좵}P?=9ë ¿46b\u001c\\S?(筈僦⇶爷谰1ྷa": true,
- "TҫJYxÚª\\鰔℮혡)m_WVi眪1[71><\/ï†Q:0怯押殃탷è«ì‚¬<ỗꕧ蚨ä¡ï¨î³‰nDꌕ\u001cë…¬~è“©<N蹑\"{ä«¥lKcí˜ë«–앺:vⵑ": "gæ§µ?",
- "aꨩ뻃싥렌1`ë¡—}Yg>鲃g儊>ê¡l㻿/â‘·*ì±³6㻜W毤緛ﹺᨪ4\u0013뺚J髬e3쳸䘦伧?æª&{L掾p+꬜MäŠd娘6": {
- "2p첼양棜h䜢﮶aQ*c扦v︥뮓kC寵횂S銩&Ç{O*य़iH`Uí…à¡“rä©•5ꄸ?`\\á§«?ᮼ?t〟崾훈kè–ì/iy꤃뵰z1<\/AQ#ë¿©8jJ1z@u䕥": 1.82135747285215155E18,
- "ZdN &=dë…„á…†'ì‘â…‰:烋5&áŸï”‹á„‚汎æ¥L㯄固{é’§u\\ãŠíŠšeæ‘‘&tå—„ê–„UbâŒ?m䴘熚9EW": [{
- "ଛ{i*a(": -8.0314147546006822E17,
- "⫾ꃆY\u000e+W`௸ \"Më’¶+\\ë·lKE}(NTí‚¶Yjé¸ç¯’î©¥ì¶'jNQ硾(똡\\\"逌â´y? IRꜘ὞鄬﨧:M\\fâ ‹Cꚜ쫊ᚴNV^Dä•—ã…–á¼”Iao꿬Câ8": [
- 287156137829026547,
- {
- "H丞N逕<rO䎗:í…•<\/䶩샌Sd%^ᵯëˆ엑者g䖩똭蕮1U驣?Pâ°°\u001fp(W]67\u0015ï«£6굺OR羸#ì´Fè’ˆ;嘙i✵@_æ’¶yã¤â¤(:᧗뼢༌朆@â°ã¤¨ê­²?-n>⯲": {"": {
- "7-;枮阕梒9ᑄZ": [[[[
- null,
- {
- "": [[[[
- -7.365909561486078E-19,
- 2948694324944243408,
- null,
- [
- true,
- "荒\"并孷䂡쵼9o䀘F\u0002龬7⮹Wz%厖/*? a*R枈㌦ë¾g뒠䤈q딄㺿$쮸tᶎ릑弣^éŽ<\/Y鷇驜L鿽<\/ì¶‹9Mᲆឨ^<\/庲3'lë‚¢",
- "c鮦\u001bë‘\\~?眾ಢu݆綑෪蘛轋◜gȃ<\/â´ƒcpkDt誩܅\"Y",
- [[
- null,
- null,
- [
- 3113744396744005402,
- true,
- "v(y",
- {
- "AQ幆h쾜O+꺷铀ꛉ練A蚗⼺螔jãŒ3꽂楎䥯뎸먩?": null,
- "蠗渗iz鱖w]擪E": 1.2927828494783804E-17,
- "튷|䀭n*曎b✿~æ¤U]î­¡Gz鄭kW|ã´š#㟗ഠ8u擨": [[
- true,
- null,
- null,
- {"⾪壯톽g7?㥜ώQê‘㦀æƒã§½î“¡ä¼“\\î¦*᧰閖樧뢇赸N휶䎈pIæ°‡ï®é•Šmaᬠ탷#X?î³A+kÐM ༑᩟Ø?5꧎鰜ṚY즫궔 =ঈî³;ﳈ?*s|켦蜌wM笙莔": [
- null,
- -3808207793125626469,
- [
- -469910450345251234,
- 7852761921290328872,
- -2.7979740127017492E18,
- 1.4458504352519893E-20,
- true,
- "㽙깹?ë¨ä†¢:ä´ŽÛ»gæ® JBTU⇞}ꄹꗣi#Iî’¡ëµ£é‰r혯~脀ìƒ#釯:场:ä”>ä°®o'ã¼½HZ擓௧nd",
- [
- 974441101787238751,
- null,
- -2.1647718292441327E-19,
- 1.03602824249831488E18,
- [
- null,
- 1.0311977941822604E-17,
- false,
- true,
- {
- "": -3.7019778830816707E18,
- "Eå³¾æ†èŒ6xLIm縂0n2视֯J-ᤜz+ᨣè·mYDè±ç¹¹â¹ºäŠ“ëª“ï´€E(@è©®(!ï’Y膽#᎙2䟓섣A䈀㟎,囪QbKæ’wcG湎ꤧtGì—xâ¥ä¿Žj'A一ᯥ뛙6ㅑ鬀": 8999803005418087004,
- "よ殳\\zDâ§…%Y泥簳Uꈩ*wîRL{3#3FYHା[d岀䉯T稉駅䞘礄P:é—ˆWæ€ElBã¤å–¬èµ”bGä ¼U଄Nw鰯闀楈ePsDꥷ꭬⊊": [
- 6.77723657904486E-20,
- null,
- [
- "ཚ_뷎꾑è¹q'㾱ꂓ钚蘞慵렜떆`ⴹ⎼櫯]J?[t9Ⓢ !컶躔I᮸uz>3aã •i,錃L$æ°°í…°@7ë…«W㸮?ç¾§W뇧ꃞ,î—‘N鋮숪2ɼì½â”ä²6",
- "&y?뢶=킕올Za惻HZk>c\u20b58i?ꦶcfBv잉ETî…9jä¡¡",
- "imçŠÕƒbì¹§<D-è«‚*u2ꡜ췛~䬢(텸ﵦ>æ ¡\\뼾쯀",
- 9.555715121193197E-20,
- true,
- {
- "<㫚v6腓㨭e1ã•”&&V∌ᗈT奄5Lጥ>탤?튣瑦㳆ꉰ!(ᙪ㿬擇_n쌯IMá¿‹î£ã•¨â°æ«ˆá±·5풔蟹&L.ì²½e鰷쯃劼﫭b#ï­¶í“€7ë·„Wr㢈๧Tʴશ㶑澕é%": -1810142373373748101,
- "fg晌o?߲ꗄ;>C>?=鑰監侯Kt굅": true,
- "䫡蓺ꑷ]C蒹㦘\"1à°ƒ@å‘«\u0014NLä¾egå‘®á³,r$裢k>/\\<z": [[
- null,
- "Cä¡>?ㄤᇰﻛ쉕1஥'ÄŠ\" \\_?쨔\"ʾr: 9Sä˜ç¦ºáª§ê„‚㲄",
- [[{
- "*ç¡™^+E쌺I1䀖ju?:⦈Ꞓl๴竣迃xKC/饉:\fl\"XTFᄄ蟭,芢<\/骡軺ëœhê˜\u001f銿<棔햳▨(궆*=ä¹¥b8\\媦ä·€ë«}닶ꇭ(Kej䤑M": [{
- "1á¬?>옿Iâ•…C<ÞŽ?ꊌ冉SV5A㢊㶆z-๎玶绢2F뵨@㉌뀌oå¶”f9-庒茪ç“ë·³4": null,
- ";lá°³": "CbB+è‚»aä„·è‹*/볳+/4fq=ã°h6瘉샴4é“¢Yéª.⌖@哼猎㦞+'gꋸ㒕ߤï—ãž‘(ä¶’è·²tiâ‘´aî¥ç¡‚#Noë³”",
- "t?/jE幸YHT셵⩎Kî¹!Eq糦ꗣv刴w\"l$ο:=6:ç§»": {
- "z]鑪醊嫗J-Xm銌ç¿çµ¨c里ëç‚™Ep㣋é£ë˜¼åšŒä€“GPï¹–cmf4é¹­T䅿꣭姧â¸wy6ꦶ;S&(}ᎧKxᾂQ|tï¹ë»³k\"d6\"|Mlì·†hwLtê¼¼4$&8Պ褵婶鯀9": {"嵃닢ᒯ'î–›dá§«ä³³#Nî‡Xe3-붋鸿î¢à¬¢ë–“î§ž%dK\u0013䲎ê–YV.裸Râ‰rR3蟛\\:ì ¯:å—ĺLʆ넕>|텩鴷矔ꋅⒹ{tå­¶ã“‘4_": [
- true,
- null,
- [
- false,
- "l怨콈lá’",
- {
- "0wä²å¬§-:`䉅쉇漧\\Ü‚yㄨb%㽄j7ᦶ涶<": 3.7899452730383747E-19,
- "ꯛTẀq纤qå¶Vâ¿£?\"g}ი艹(쥯B î­T騠I=仵ë°X": {"KX6颠+&á…ƒ^fç•’y[": {
- "H?뱜^?꤂-⦲1a㋞&î‘®êƒç²¾Ii᤾챪咽쬘唂쫷<땡劈훫놡o㥂\\ Kâ´™Dç§¼Fæ°®[{'좴:례晰Iq+Iì­¥_T綺砸GOç…䟪ᚪ`î‘↹l羉qì¼Dê½áœ…훦: vUV": true,
- "u^yï³0㱓#[y뜌앸ꊬLã·©?蕶蘾â»KӼ": -7931695755102841701,
- "䤬轉車>\u001c鴵惋\"$쯃྆⇻në½€Gæ° Såª]à²²ê¨æ‡Qxኻ椕駔\\9ࣼ﫻ìœç£¡ï©ˆëºªá¶šë³l㕆t+sζ": [[[
- true,
- false,
- [
- null,
- 3363739578828074923,
- true,
- {
- "\"鸣詩 î›ë³°ã‘µgLã¯¦á¿…ì¶æ—«}ED辗ﮈI쀤-ꧤ|ã ¦Z\"娑ᕸ4çˆé¨ã£\"]ì³Af]茛⬻싦oèšk䢯ä©è½3廇喑ޅ": 4.5017999150704666E17,
- "TYႇ7ʠ值4챳唤~Zo&ݛ": false,
- "`å¡„J袛㭆ëºã³€N㺣`ê½å¶¥Kï¯SVᶔ∲퀠ç¾N딂X\"á¤hNﬨvI": {"\u20bbã­˜I䖵䰼?sw䂷쇪]î(泒f\"~;꼪FÔsá¦": {"p,'ꉂ軿=Aèš¶?bƉãµä…°è«¬'LYKL6B깯⋩겦뎙(ᜭ\u0006噣d꾆㗼Z;ä„äš”cd<情@äž‚3苼㸲U{)<6&ꩻ钛\u001au〷N숨囖愙j=BXWìš•^x芜å á¿™çˆ‚ë›·ê’»t✘Q\b": [[
- "ç±›&ଃ䩹.ꃩ㦔\\C颫#暪&!勹ꇶ놽攺J堬镙~軌C'꾖䣹㮅ï¶å²ƒá™´éµ£",
- 4.317829988264744E15,
- 6.013585322002147E-20,
- false,
- true,
- null,
- null,
- -3.084633632357326E-20,
- false,
- null,
- {
- "\"짫愔昻 Xï«\"è—£j\"\"ë¨à½…ѻ㘤㬯0晲DU꟒㸃dë²€î¢ìœ’l䦾cà©»*3": null,
- "è°ˆWm陧阦咟ฯ歖擓Nå–´ã‹éŠ­rCCnVࢥ^♼Ⅾ젲씗刊Sà¼+_tèµ”\\bäšë‰¨ê¬«6펛cL䊘᜼<\/澤pF懽&H": [
- null,
- {
- "W\"HDUuΌ퀟M'P4à¿°H똆ⰱﮯ<\/å‡è˜²\"C鴫ﭒж}ꭩ쥾t5yd诪ﮡí‰â´°@?æ°é†³rj4I6Qt": 6.9090159359219891E17,
- "絛ﳛ⺂": {"è«°Pã—®î˜è¦`ZQ?ꫦh*à´±cbâ§±}埌茥h{棩렛툽o3é’›5é®l7Q榛6_g)ὄ\u0013kj뤬^爖eO4Ⱈ槞鉨ͺ订%qX0Tì—å«·$?\\\"봅늆'%": [
- -2.348150870600346E-19,
- [[
- true,
- -6619392047819511778,
- false,
- [[
- -1.2929189982356161E-20,
- 1.7417192219309838E-19,
- {"?åµ²2à¿2\u0001啑㷳c縯": [
- null,
- [
- false,
- true,
- 2578060295690793218,
- {
- "?\"殃呎ïˆ#ã‘‘F": true,
- "}F炊_æ®›oU헢兔êˆ,èµ­9703.Bæ•°gTz3â¬": {
- "5&t3,í–“Mݸᵣ㴵;꣫ä©â†³#ï¢@ë«·ä …ï¦+W-ࣇzᓃ鿕ಔ梭?T䮑ꥬ旴]u뫵막bBè®:왳둛lEh=숾鱠på’î›î­ˆ$ì§#?gâ¹·á—Švã·µ.æ–ˆu頻\u0018-G.": "ë½™m-ouࣤ஫牷\"`Ksꕞ筼3HlȨvCï¢î›¦å ˆ\"I]㖡玎r먞#'W賜鴇k'c룼髋䆿飉㗆xgå·¤9;芔cáŒ/ax䊨♢í“rå“㸫೼䢗da᩾\"]å±£`",
- ":M딪<䢥喠\u0013ã–…x9è•ã‘‚XO]f*Q呰瞊å­VP@9,㨣 D\\穎vˤƩs㜂-曱唅L걬/롬j㈹EB8g<\/ì„©o渀\"u0y&룣": ">æ°ç·©L/ä•‘ë¯êŸ˜îŸ”蕞^aBë’£+0jK⪄瑨痜LXK^힦1qK{æ·št츔X:Vm{2rçB뾄H첚7æ°¥?쉟䨗ꠂv팳圎è¸é½€\\",
- "D彤5㢷Gꪻ[lㄆ@὜⓰絳[ଃç½ì®¹â˜’[*0ꑚ㜳": 9022717159376231865,
- "Ò–aV銣tW+$é­¿\u20c3ïœäºœ~ë«¡ᙰ禿쨽ã¡fá¹¼zE/h": "5è‡ï’Œã‹‡á²¯ì®º? 昨탰Wム밎#'\"崲钅U?幫뺀â¾@4kh>騧\\0Ò¾EV=çˆî©®ÍŒUæ€%ꉼ 㮋<{j]{R>:gÔ©L\u001c瀈锌ﯲﳡꚒ'â«¿E4æšãŒ—뵉X\"Háœ",
- "ᱚגּ;s醒}çŠSἿ㦣&{T$jkB\\\tḮ앾䤹o<é¿(tW": "vb⯽䴪䮢@|)",
- "⥒í껉%惀뗌+녣迺顀qæ¢g⚯i⤭ë£Mç¹j̈́⽜A": -8385214638503106917,
- "逨ꊶZ<\/W⫟솪㎮ᘇb?ê ”i\"H㧺x෷韒Xꫨฟ|]窽\u001a熑}Agn?Má¶–a<rà°„4Ů䢤슲AxÄ£eê³–ã´¤x竾éƒB謉鸵kè–½M)\"芣眜`è‰ê‰›ä´º": "é¹^ె캫?3耲]|Ü1ä¡’ã®]8e?ä¶^",
- "뿸樅#P㡊1M룮Uꪭ绢ꑮZ9꽸": {"\nJ^Ñ”|3袄ã…7⨆銦yîµ”çâ‹·ä»´ct?[,<\/ã…¬`?갔髞%æA೚C": {
- " 䇞3갫䅪": [{
- "0|â©ã‘‚砕ㅻ": null,
- "D箳᠉`|=â¼­)\"*࣊ã¦LjO誋": "",
- "ࠚDZmê—¥}ᷴ╈r7í—´È¥4Kp5a)o}鎘门Læ°ä†“'✎k俎c#T68Óâ©¶î¶6L鎴<r൦$黊BQYã¼³\\è·¿F慮⡨拵贀!ç”¶Vå–…/": null,
- "âµ£q⳹ﻨLk]晩1*y\\$%}ä–¶P煑㇆䈦E嫿«•Y࣓嫨ä“OL낮梚㸇洛洚BYtgl∛S☕䉓宑⋢粚ꔯ꠼붠": ")ꬑ윤`\"â°£<\/婽*Y䔸ᓰ_ï³t슲å©éš¥&S糧䛮闵诌è±sh쯽邴*ì„´ØÍŽ=㯨\"RVíž³,^t\"ac?䤒ꉀxHa=Uꛕã™î·“TkF껾",
- "å¼¾cUAF?暤cë½.欀nKì•­]r傊䀓ﯳ馽垃[䥛oI0N砊鈥헅Co쟋钄ㅷ㊌뷚7": [
- null,
- "à«“é¨?^ä†{\u0006`X䧵儱&롡尙砡\u0006ë»ì‘¬sjâ–»Xfᬶgcã„¢V >9韲4$3á»´^=ì煤áë·2䣃%ï…Žé· /eQ9頸쥎",
- 2398360204813891033,
- false,
- 3.2658897259932633E-19,
- null,
- "?ꚃ8Nnãž·å¹µd䲳䱲뀙ꪛQ瑓鎴]î’¶ä©‹-é°¾æ¡ï¾ä³¡??掊",
- false,
- -1309779089385483661,
- "ᦲxu_/yecR.6èŠ.áœ‡éŽ ~",
- -5658779764160586501,
- "ì’Œ:æ› =lìœä¢œwk#s蕚\"互㮉m䉤~0ë“䋙#Gîš¿;h숄옥顇෤勹(C7㢅雚ã¯Lâ …VVç°…<",
- null,
- -4.664877097240962E18,
- -4.1931322262828017E18,
- {
- ",": {
- "v㮟麑䄠뤵g{Më®.\u001bzt뢜뵡0Ǥ龍떟Ᾰ怷ϓRT@Lꀌ樂Uã â¾•e扉|bJg(뵒㠶唺~ꂿ(땉x⻫싉ìŠ;%0鎻V(o\f,NéŠ%nk郼螺": -1.73631993428376141E18,
- "쟧摑繮Q@Rᕾ㭚㾣4隅待㓎3蒟": [
- 4971487283312058201,
- 8973067552274458613,
- {
- "`aæ™á£—î\u0015i<S幼訃锭B0&槩✨[Wpçš©[g≊k葾x2ᡆ橲䲢W": true,
- "kH皈Sê±qå‚‘u?솹풑~o^F=ï¦N*reî••J沤wW苯7pã¼¹äŽa=ꮧLã·©냴nWꌑ㞱uuè°lVNç¿á¤»(eè±¶5#L쪉ᅄ઄\u0015숟봊P瀚X蓎": false,
- "䫯דּ〖Scä›­ì Lëµ¾pî«“CꙞ\"엇즓_ﰛ톣ꫀ먩㺣㮠⭴!\\Wâ”tä–°è»…y\u0014~ᇰ렢E7*俜䥪W䀩ä·hë´†vjஉ묣à¼G39.뼳輼:㮿á¦A饕TUL}~": [
- null,
- 8.8648298810470003E17,
- 5.735561205600924E-20,
- null,
- -102555823658171644,
- 1.2674932032973067E-19,
- {
- "D胣O㯨\u0017Ku눓ã’í…nᨊ!Ꚇ廫_>Bo¸": 4.3236479112537999E18,
- "HW&퉡ãåœ<W)6æ‚°ê ‘HEp14xy峑ft\u0005s亘V튉䢮ꦈXåµê¬?lI_ë춇-6Ss噺Nk-ﮥíƒÜ郪*ï“­PR(S6â•‹@ä»™V懸뺵ﯜVç²¹": "9䗌斀4ãˆ^Qséš„ç¡j\u0003",
- "Vké¶…Cæ³¹ç­HX훉朗*r\\z顊誌儖4?n7á¾6몋䎡ﳈ],Hé ¢pèšã‘„P4满Eä©V䬕à¸L廂쒬î®ì‘¨ê†·hè¿¡ê°è­–墎 î‡]鹿ฌ7ﶽ冭༽<ꈓS\\lä‹®?_ユ檒?": -8598528325153980065,
- "t=qí£ç–»Ñ‚Z\\錅J.镎|nfḷ鴒1厰Lç¯çºœîŒ•E]୦⥪]á®'ç¾p/å’©0닳ï³qﳖཽk ?X1Ft%ś뭢v鋋⺃爵⒗": [[
- 5.0824756359232045E-19,
- [
- 7.268480839079619E-19,
- {"탿^굞⧕iјëŠê€›w껩6ꟳXsé…š\\>Y?ç‘¡Qyí›q!帰ï©s舠㫸zêš—aSæ­²v`G株巷Jp6킼 (ê·¶é”â¾î‹¥â¡ˆ>Mæ±ãžá‰´ê™²dv@i㳓ᇆ?é»": [
- null,
- 4997607199327183467,
- "E㻎蠫á¾é«˜ä™Ÿè˜¬æ´¼æ—¾ï« í…›ã‡›?'M$㣒蔸=A_亀绉앭rN帮",
- null,
- [{
- "Eᑞ)8<Zî¿—ã¡¿W镀䛒Cìƒî¿«V?0ꯦ+tL)`é½³AjBå§€Xà³³D빠㻲ƙgn9â‘°à¾á¿œ&\"ãš¹>餧A5u&ã—¾q?": [
- -1.969987519306507E-19,
- null,
- [
- 3.42437673373841E-20,
- true,
- "eê±·Må¢\"割Pâ›í§åŽ€R䱜3ï»´Oí“«r﹉⹊",
- [
- -8164221302779285367,
- [
- true,
- null,
- "爘y^-î¬?蘞Ⲽꪓaâ…ê¨}I",
- 1.4645984996724427E-19,
- [{
- "tY좗⧑mrzïºã¿¥â´–᥷jè«…\u0000q賋è­êž„â®±S\nà¡£B/íƒêµª3ZÉ‘å¤o<\/;ë¡‹": null,
- "彟hæµ _|V4䦭Dᙣ♞uì¿»=ì‚®ã¦\u001e哀鬌": [{"6횣楠,qʎꗇ鎆빙]ã±­R굋鈌%æ ²j分僅ペ䇰wí¦î¼‹p蛃N溈ê¡ê€?@(GI뉬$ﮄ9èªê“š2e甸ڋ[äº,\u0011\u001cࢃ=\\+衪䷨ᯕ鬸K": [[
- "ㅩ拏鈩勥\u000etgWVî–¨Xs陂è¦p狵w퓼{뮵_i\u0002ퟑႢâ¬d6é‹«F~챿æŸ\u0096äš¼1ۼ칥0꣯å„=鋷牋ⅈêžé¾",
- -7283717290969427831,
- true,
- [
- 4911644391234541055,
- {
- "Iî¹éˆ’ì²½P릜朸W徨觘-HᎄíŸâ“º>8kr1{ê²µäƒã€›á¬¡Ì¨Oê·‘oä•'쿡鉕p5": "fvç²–RNçž–è›a?q꤄\u001d⸥}'ꣴ犿ꦼ?뤋?鵆쥴ë‹ä¡«s矷̄?à¶£/;괱絢oWfV<\/\u202cC,ã–¦0䑾%nè³¹g&T;|lj_欂N4w",
- "짨䠗;䌕u i+rà¹0": [{"9ä¥\\à°©8\"馇z䇔<\/á‚¡Y3e狚ì¡\"ุ6ï°†Zé–c\"Ll:ïŠê®¾ç–£<\/᭙O◌납୕湞9⡳Und㫜\u0018^4pj1;ä§å„‚ä—·à­—>@e톬": {
- "aâ‘‚Fé‹»Qèž°'<퇽Qè´ç€§{ᘪ,cP&~䮃Z?gI彃": [
- -1.69158726118025933E18,
- [
- "ê¶‚z簽㔛㮨瘥⤜䛖Gℤ逆Y⪾j08î±²Sn昞ꘔ캻禀鴚P謦b{ê“®mNéMᥙ5\"ç2냑I\u0011.L&=?6á„ ë»·X鸌t刑\"#z)o꫚n쳟줋",
- null,
- 7517598198523963704,
- "ኑQp襟`uᩄr方]*F48ꔵn俺ሙ9뇒",
- null,
- null,
- 6645782462773449868,
- 1219168146640438184,
- null,
- {
- ")ယ넌竀Sdä°¾zqâ«£âŒÊ¥\u0010á¿“' |磪&p牢蔑mï³V蘸૰짬꺵;K": [
- -7.539062290108008E-20,
- [
- true,
- false,
- null,
- true,
- 6574577753576444630,
- [[
- 1.2760162530699766E-19,
- [
- null,
- [
- "顊\\憎zXB,",
- [{
- "㇆{CVC9ï¼MN㜋ઘR눽#{h@ퟨ!鼚׼XOvXS\u0017á£=cS+梽៲綆16së½íœy屬?ᇳG2á´­\u00054쫖y룇nKcW̭炦s/鰘ᬽ?J|퓀髣n勌\u0010í™ P>j": false,
- "ç®´": [
- false,
- "éžj\"ꮾ*엇칬瘫xṬ⭽ì©äƒ³\"-⋵?ᦽ<cਔ↎⩧%鱩涎삧u9K⦈\"á¿á¬‘V绩킯愌ṱv@Gê¾è·¶êš†(?ä–ƒvIá§ŠxV\r哦jã ’?*=S굤紴ꊀ鹭쬈s<DrIu솹꧑?",
- {
- ".}S㸼L?t\u000fK⑤s~hU鱜꘦}ìªC滈4ꓗ蛌):ྦ\"é¡¥ì´â¢·ïš­á¿³YLn\"?fꘌ>댎Ĝ": true,
- "Pg帯佃籛n㔠⭹࠳ë·â‰»à¿Ÿ3ãž±ï“!î—-ì’¾!}쭪䃕!籿næ¶»J5ਲ਼yî˜vy;Rኂ%ᔡጀ裃;M⣼)쵂쑈": 1.80447711803435366E18,
- "ꈑC⡂ᑆ㤉壂뎃Xub<\/쀆༈憓قì¨×§\\": [
- 7706977185172797197,
- {"": {"K╥踮砆NWࡆFy韣7ä밥{|紒︧䃀榫rᩛꦡTSy잺iH8}ퟴ,M?Ʂ勺ᴹ@T@~꾂=I㙕뾰_涀쑜嫴曣8IY?ҿo줫fऒ}\\S\"ᦨ뵼#nDX": {
- "♘k6?଱癫d68?㽚乳䬳-Vé¡·\u0005è•?\u0018䞊V{邾zã˜l]é›k臤~ൖHë’iꢥ]g?.G碄懺䔛p<q꜉Så²—î¥_.%": 7688630934772863849,
- "溗摽嗙Oã§€,⡢⼰呠ꅧ㓲/葇䢛icc@-r\b渂ꌳ뻨饑è§á–œ\\é®­\u0014엙㥀᧺@æµ¹W2꛵{W률G溮킀轡䬆g㨑'Qè¨ï†áŸªç½‘Hd\"Q늴ᱢﶨ邮昕纚枑?â–°hr羌驀[ç—¹<\/": [
- -1.0189902027934687E-19,
- {"窶椸릎뚻shE\"ꪗႥꎳU矖佟{SJ": [{"-æ…œx櫹XYîƒ-æ¾Ü¨â£·àª¢ïŸé¯™%Fu\u0000è¿‹â–’}᥷L嗭臖oញc넨\u0016/迎1b꯸g뢱ã§è“¤ä’8C散삭|\"컪輩鹩\"\\g$zG䥽긷?狸꿭扵ã²:URON&oU8": [
- null,
- true,
- null,
- -2.8907335031148883E17,
- -3864019407187144121,
- {
- "`빬d⵺4H뜳⧈쓑ohஸ*ã¶ï»‡â¸•ä µ!iä¬ï¹‘h夘▥ê—푹갇㵳TA鳠嚵\\B<X}3訒câ‹{*ï«¢w]ç’¨-gæ­\\j໵侠Ei层\u0011": 3.758356090089446E-19,
- "䄘ï®)Y놞씃㾱陰í:{\u2059/Sâ“´": [[
- null,
- [[
- -3.8256602120220546E-20,
- null,
- 7202317607724472882,
- "CWQëš¿",
- null,
- false,
- true,
- null,
- 2857038485417498625,
- 6.191302233218633E-20,
- null,
- -6795250594296208046,
- [
- true,
- {
- "%á‹§é°Yᚯ⚀x莰愒Vᔈ턗BNæ´ê¤ŸA1âŒl콹풪H;OX๫륞ìªá°šÑ†@͎黾a邬<L厒Xb龃7f웨窂二;": [[
- null,
- "耲?䙧㘓F6Xsí‹­ë©¢.v뚌?鄟æ â–½'묺競?WvᆾCî»txo?dZ;䨸疎",
- {
- "@hWê‰&\"빜4礚UO~C;ã†î”殩_ꀥè˜å¥¢^챟k→ᡱKMⵉ<\/Jㅲ붉LÍŸQ": false,
- "tU뢂8é¾°I먽7,.Yî°î»´æ½Z툼=&⨥覽K乫햶㠸%#@Zë–æ„“^âŠâ¾‚몒3E_噆J(廊ឭyd䞜鈬Ћ档'⣘I": {
- "tK*ꔵ銂u艗ԃì¿âˆ³ê„‚霫X3♢9y?=â²­dЊb&xy}": [
- -4.097346784534325E-20,
- null,
- 6016848468610144624,
- -8194387253692332861,
- null,
- {
- "(祬诀譕쯠娣cë´r?ç•„kT뼾⌘⎨?noVä˜ì¥ç¡Žn?": [
- 1.82679422844617293E18,
- [
- false,
- 2.6849944122427694E18,
- true,
- [
- false,
- {
- ";0zâ­†;í™”$bਔ瀓\"衱^ï—´?잢ᢛ⣿~`ꕉ薸⌳໿湘腌'&:ryБꋥá¼ê’¥ç­™ê¬œê¸¨?X": -3536753685245791530,
- "c;Y7釚Uꃣ割J༨Y戣w}c峰뢨㽑㫈0N>R$ä…’X觨lë´œA刊8R梒',}u邩퉕?;91Eî¦a䈈ë¯G⊶芔h袪&廣㺄j;ã¡ç¶½\u001bN頸쳘橆": -2272208444812560733,
- "æ‹‘Wﵚî²j鵼駳Oࣿ)#ã¾…é¡‚N傓çºy僱栜'Bê-!KF*ꭇK¦?䈴^:啤wG逭w᧯": "xᣱmYe1Û@霄F$ě꧘푫O䤕í€Pq52憬ꀜ兴㑗ᡚ?ï—ƒLé·íŸî—¼ë­zJê‘™}╆ᅨJB]\"袌㺲u8䯆f",
- "꿽á…㔂긱Ǧ?SI": -1669030251960539193,
- "ì‡É¨`!葎>瞺瘡驷錶â¤ï»®é…œ=": -6961311505642101651,
- "?f7♄꫄Jᡔ훮eì‡îª¼í¾á£ä­´KhखT;Qty}O\\|ë«Iá¿’Ne(5æƒê¥¶ã†·Y9ﮡ\\ oyâ­–-䆩å©m#xë´‰>Y鈕Eç–£s驇↙ᙰm<": {"퉻:dê‚&efᅫ쫢[ï„™\"ëˆëŠ–êº™|Ôå‰1Í–-K:Êšá­•/;ì–㷛]Iç—èŒ4g<Oꗢ뫺N쯂륬J╆.`ᇵP轆&fd$?è‹…oê¶“vO侃沲â©åš…æ²— E%â¿°ì–¦wi\\*è¶«": [
- 3504362220185634767,
- false,
- "qzXæœqT3軞T垈ꮲQ览ᚻ⻑쎎b驌䵆ꬠ5Fà­—ä²ç¼¿ê蒇潇Ltᆄ钯蜀W欥ሺ",
- "ë³°É霬)ì é¶¼kwocì—·èr \u001d쒷⎹8{%澡K늒?iﺩd=&皼倚J9s@3å›twὡgjä íª5⭉⨺役&놎cﺉ㺡N5",
- false,
- null,
- "D0st[ni锹r*0k6ꀎë‡UX2⽼৞䃚粭#)Zæ¡·36P]<\/`",
- 4281410120849816730,
- null,
- -3256922126984394461,
- 1.16174580369801549E18,
- {
- " ᆼꤗ~î…‰*TN긂<㡴턱℃酰^蘒涯잰淭傛2rൡetì¾£ä‡m*ã¸y\"\\糮᧺qv쌜镜T@yg1譬ﭧﳭ\f": null,
- "圾ᨿ0xᮛ禵ਗ਼D-㟻ẵ錚e\"赜.˶m)é´‘B(I$<\/轴퉯æ·â‹âº*)宓쓌?*橯Lx\\f쩂㞼⇸\"ﺧ軂é³V\\ë•’\"캘c:G": null,
- "?ïµ_ê³¢î™ç¿¸íˆ8ã¿ hì—´Q2ã­›}RY㯕YT놂⽻e^B<\/맫ﻇ繱\u0017Gц⟊ᢑﵩS:jt櫣嗒⟰Wã´šæ¦á…‰e[w䋺?藂翙Ⲱ芮ä˜â•¢å›¥lpdu7r볺I è¿‘qFyᗊ": [
- "$b脬aᅠ襬育Bگ嵺Pw+'M<\/ï­näššvèžbNâ’‚}褺%lቦ阤\"ꓺá—Mç‰,Ûžï– Ò¶!矬?ke9銊Xê´¦)䈽í‹è„½á¹«äˆžá´†^=Yá—¿é›4I귺⋥%",
- false,
- 2.9444482723232051E18,
- 2072621064799640026,
- "/_뇴뫢jã’=Nꡦâ†Ôºèµ’â¬î»¼í†¥ä¨žç¯su*媸瀳鷔抡oíº-៳è¾å‹·fç»”:äµ¢æ¢2",
- false,
- "ì’œ Eî½·äŒ/í\u0018懺_<\\隺&{wF⤊谼(<죽é ïŸ‡8?@*rá¶ŠGd뻻갇&Ⳇq᣿e࢔t_ꩄ梸O詬Cá§§Kê© í’¤9눙醅ëž}竸rw?滨ӽK⥿ཊGé­²']`๖5ã„°",
- -2375253967958699084,
- {"嗱⿲\"få„„á¬": {"v?䚑킡`â—¤k3,骥曘뒤Oᒱ㲹^圮᠀YTê»›&ì´®P:G/Tâ£#튣k3ç‚©è k@橈ä·Sä§•,ç†œïŒæ™¬ï£žk1鮥玸먚7䤡fç»å—šìƒ´á¥’~îš¼0q拮垑aë»±Lâ°–_": [{
- ":på°¢": -6.688985172863383E17,
- "A0\u0001疠ﻵ爻鼀湶I~W^å²€mZx#ãˆ7r拣$Ꜷ疕≛⦒痋盩Vꬷá­â„¦Qêªï§éˆ‘A(劽詗ꭅo-ç¶é‘º\"Ⓠ@$j탥;": [
- 8565614620787930994,
- [
- "å¶—PC?à¶‹Q㪣$&j幾㾷hæ…‘ 즊慧⪉霄M窊ê·'鮕)äŠé“¨m趦䗲(g罣ЮKVﯦé®î¦®5囗ﰼ鿦",
- -7168038789747526632,
- null,
- -7.8069738975270288E16,
- 2.25819579241348352E17,
- -6.5597416611655936E18,
- {
- "瘕멦핓+?フZê·¢zé›V": {
- "ᕾ": 1.7363275204701887E-19,
- "ã­Œs뎹㳉": {"\u00187Fï–‰I6Yféº+UC쬸éºâ²ä‚¿ê¸•R\\ᆮC?Φ耭\rOத际핅홦*ë² W㸫㯼᡹cㅜ|Gã®—\u0013[o`?jHVì•?蒪꩚!í«áœ¦ãŒ‡äš‡é¿˜:@": [
- "}푛Г콲<äŸCè—呈#2ã“‹#ྕáŸå°¿9qç«“gI%ëž™mê¬oaç•è´¿Jå’¿D_ç†Zz皳験Iè±¼B扳ḢQ≖㻹㱣Dä¦ï©—2'á—㗣▌ç ²8罿%à°¹F姦;0î·æ‚‡<\/\"påš§",
- -710184373154164247,
- "Vo쫬⬾ê«â´·Å»\u0004éŽHBê…¸_aVBHbN>Z4âœkเꛘZ⥺\\Bʫᇩ鄨魢弞&幟ᓮ2̊盜",
- -9006004849098116748,
- -3118404930403695681,
- {
- "_彃Y艘-\"Xx㤩㳷瑃?%2ä¡éµ›o<A?\"顜ᘌΈ;â·…Cæ´ºL蚴蚀voq:,Oo4쪂)": 5719065258177391842,
- "l륪맽耞塻論å€Eã—‘/㲕QM辬I\"qi酨玑㖪5q]尾魨鲡ƞY}⮯蠇%衟ï„Fsf윔äšì°¤iè…³": {"ꢪ'a䣊糈": {"ë°‘/♋S8sã¼´5瓹O{댞\"9Xï°‡lJ近8}q{긧ⓈI᱑꿋腸D瀬H\"ﺬ'3?}\u0014#?丙㑯ᥨ圦',gé‘ (樴턇?": [
- 2.5879275511391145E18,
- null,
- [
- "3㼮ꔌ1Gẃ2Wé¾™jîªÍŠ{1å›ã¦­9xå® ã‘oRä•犽",
- 1268729930083267852,
- "땕軚⿦7C",
- [
- -3.757935946502082E18,
- "\"赌'糬_2ë­¾áb",
- {
- "(a䕎ጽjÒ°D4.á´¡ïž½66ԃ畮<\/l`k癸\\㇋ࣆ욯R㫜픉녬挛;ڴ맺`.;ç„“q淞뮕ٹ趴r蔞ꯔ䟩vç²u5<\/pZ埖Skrvj帛=\u0005aaï”›": null,
- "璄≩ v몛ᘮ%?:1頌챀H㷪뉮k滘e": [
- "ꤾ{`c샬왌펡[俊络vmz㪀悫⸹ᷥ5o'ã¾µ L蹦qjYIYណԠWëƒå‰«<\/W嗂0,}",
- 2.4817616702666762E18,
- false,
- null,
- null,
- -8.6036958071260979E17,
- null,
- -1.2744078022652468E-19,
- -4.4752020268429594E17,
- 1.13672865156637872E17,
- [
- false,
- false,
- null,
- -4.178004168554046E-20,
- true,
- 2927542512798605527,
- {
- ".ꔓ뉤1䵬cHyæ±¼äŠ†è³“á‡Æ©|樷â‡é†Žã¬…4\u0003èµµ}#yD5è†æ™¹ë±“9ê–è™›J㺕 t䊛膎ؤ": {
- "rVtᓸ5^`েNâ¹»Yv᥋lꌫt拘?<é®°ë„¿ZC?ã’½^": {"âªî©k_:>귵옔夘v*탋èŒ&㳈챗|Oé’§": [
- false,
- "daꧺdᗹ羞쯧Hã¤é„³é ³<型孒ン냆㹀f4ã¹°\u000f|C*ሟ鰠(O<ꨭ峹ipຠ*yà³§4VQè””hVæ·¬{?ᵌEfrI_",
- "j;ꗣ밷é‚副]á—“",
- -4299029053086432759,
- -5610837526958786727,
- [
- null,
- [
- -1.3958390678662759E-19,
- {
- "lh좈T_ë¯Y\"伨\u001cꔌG爔겕ꫳ晚è¸â¿»ìT䯎]~e#฽燇\"5hٔ嶰`泯r;ᗜ쮪Q):/tç­‘,榄&5ï¤ëŽ«ç‹(": [{
- "2áâ“›]r3C攟וּ9è³µsâ›”6'ஂ|\"ⵈ鶆ä¹ç¦3\"痰ࢤéœäµ©ì˜†äŒ€?æ •r7Oç°‚Isd?K᫜`^è®¶}zî°’8?zì–°î§T:X倫⨎ꑹ": -6731128077618251511,
- "|︦僰~m漿햭\\Y1'Vvخ굇á‰ì±¢cè¶–": [null]
- }],
- "虌魿閆5⛔煊뎰㞤ᗴꥰF䮥蘦䂪樳-Ká·-(^\u20dd_": 2.11318679791770592E17
- }
- ]
- ]
- ]},
- "묗E䀳㧯᳀逞GMc\bï•¹å¢¹ã“„ë–Æ &U??íŽŒé‘ åª‹k))ᄊ": null,
- "묥7콽벼諌J_DɯﮪMæ®´ä£,煚ྼ`Y:ì”§<\/â©«%yf䦀!1á²¶kì¶ŽQç±³W∠WC跉鬽*á›±i<?,l<崣炂骵*?8í‘៣ⰵ憉⎑.,Nwç½£q+ο컆弎": false
- },
- "e[|଀+î±³lꑸãˆTT?ë¿¿|ê«›9`㱯䊸楋-곳賨?ì³k棽擋wQ餈âŸNq[q霩䵀뷮锅ꚢ": 5753148631596678144,
- "sá“鴻߸d렶ὕ蜗ဟ툑!诉౿": false,
- "|4䕳鵻?䈔(]í‹/Ui#æ¹»{듲ーMá‹€t7潔泄Ch⸨}ì£`î¤èž§éŠšã‹¼å£¯kâ°¥Q戵峉갑xè¾™'ì²›": "jd䘯$䕌茷!auw眶ㅥä£ê†¢æ°‘i",
- "剖駰Ɜî¶sM2]á¾´2ࡷ祅拌Av狔꩛'ê“—í‚§ê£0酜✘O'": false,
- "澩뢣ê€eU~D\\ꮡ킠": "v^YC嚈ί\u0007죋h>ã´•L꘻ê€ì“ª\"_gé¿„'#tâ½™?,Wg㥖|D鑆eâ¥ìª¸åƒ¬h鯔咼ඡ;4TKèŽî¾‘졠嫞"
- }
- ]
- ]
- }
- ]
- ]
- ]}}
- }
- ]}
- },
- "뿋뀾淣截䔲踀&XJ펖꙯^Xb訅ꫥgá¬>棟S\"혧騾밫ê²7-": "擹8C憎W\"ìµ®yR뢩浗絆䠣簿9äˆå¼•Wcy䤶孖ꯥïž;íŒ]輩ä3@{å 뽸0ï€á¡ˆìµ¡î›„Ⲇ\u001dLåŒê§2F~ݕ㪂@W^é½L襒ᦘî¢~沦zZ棸!꒲栬R"
- }
- ]
- ],
- "Z:ëƒàµ›5Iz찇䅄駠㭧蓡K1": "e8᧤좱U%?ⵇ䯿é¿\u0013縮R∱骒EO\u000fg?幤îš@֗퉙vU`",
- "äƒìªˆï‘’埽້=Ij,쭗쓇చ": false
- }]}}
- ]
- }
- ]}
- }
- ]
- ]
- ],
- "咰긖VM]á¼6䓑쇎çºetDÒŒ?ãžê©„퇫밉gj8è ƒ\"â©5䛹1ࣚ㵪": "ക蹊?⎲⧘⾚̀I#\"䈈⦞ë·`wo窭戕෱휾䃼)앷嵃꾞稧,Ⴆ윧9S?೗EMk3Მ3+e{â¹”Te驨7äµ’?타Ulg悳o43ï“¢"
- }
- ],
- "zQᤚ纂땺6#ٽ﹧vï¿¿#ࠫ휊冟蹧텈ꃊʆ?&a䥯Deæ½|ì¿“pt瓞㭻啹^盚2êŠf醪,ì–T窧\\Di䕎谄nn父ꋊE": -2914269627845628872,
- "䉩è·|㨻ᷢã‰B{蓧瞸`î°²I!℄욃힕#ೲᙾ竛ᔺCjk췒늕貭è¯\u0017署?W딚%(pê⤼ë³^=on뺲l䆼bzrﳨ[&j狸䠠=ᜑꦦ\u2061Õµnj=牲攑)Mî»\\é¾": false,
- "뎕y絬᫡⥮Ϙᯑ㌔/NF*Ë“.ïž¿,QEzvK!Iwz?|쥾\"ê©»Lê¼—Bê”§è³´ç·œs뉣隤茛>ロ?(?^îµ­`>冺飒=噸泥⺭Ᲊ婓鎔븜z^å·è£®Ãªâ“…à»—jM7ﶕ找\\O": 1.376745434746303E-19
- },
- "ä›ræ»–wã¤<k;l8ꡔጵ⮂ny辶⋃í¼åƒ®z\"﮲X@t5෼暧퓞猋♅䦖QCé¹®|픨( ,>,|Nዜ": false
- }
- ]],
- "@ê¿™?è–•å°¬ gd晆(ë„5躕ﻫS蔺4)떒錸ç“?~": 1665108992286702624,
- "wë¯ná =`঺ᅥC>'從ë槷ä¤çœ·èž„ãŽ»æ°æ‰°XᅧCè´½uáƒë‚ŸjKD03T!lDV쀉Ӊy뢖,袛!终캨G?鉮Q)â‘—1쾅庅O4ê‰H7?d\u0010蠈줘월Þ粯Q!낇껉6í…|{": null,
- "~˷jg쿤촖쉯y": -5.5527605669177098E18,
- "펅Wᶺzê†ã¨í‘­e?4j仪열[D<鈑皶婆䵽ehS?袪;Hê¨Më—Žã°[(å—M3qíŸg4y╸鰧茀[Bi盤~ï«å”Žé‹†å½ºî½«â¦Šq?î–³B4쉓癚O洙킋툈䶯_?ퟲ": null
- }
- ]
- ]]
- ]],
- "꟱Ԕã¤7æ›ï¦—ಃéŒVä·°?v㪃૦~K\"$%请|ꇹn\"kä«›ã¨é²¨\u2023ä„¢\u0004[<S8á¬ë­©è„¥7U.m࿹:Dè‘┆2蘸^U'w1ì …;䠆ꋪBê»®>︊Vï‹•J?䶟ាꮈ䗱=깘U빩": -4863152493797013264
- }
- ]}]}
- ]
- }}}
- ],
- "ì·ì²Û¹í‰ƒ~aEå”™a챑,9㮹gLHd'ä”|í‚—ãžäŽ¥&KZYTë§µ7䥺N<Hp4ê•­â¹ ê½c~çš½z": "课|á–¾ä¡å»‹è„äªW\u0016&Jnê´b~æ‘“M>â±³åŒèŽžé¿§w\\༌疣n/+ꎥU\"å°ëž¾â—‹íŸ™AJá­Œ?9ä›$?é©”9è®ì§˜é­¡TÖ¯cè—³`虉Cì‡ì¦T"
- }
- ],
- "è°¶ê°œgTRï¿>áµÍšdtæ™‘ä‰‡é™æ»º}9㉸P漄": -3350307268584339381
- }]
- ]
- ]
- ]]
- ]
- ],
- "0y꟭馋X뱔瑇:䌚ï¿å»¿jîžg-懲鸭䷭垤㒬茭u賚찶ಽ+\\mT땱\u20821殑ã„J쩩䭛ꬿNSæ½”*d\\X,壠뒦e殟%LxG9:摸": 3737064585881894882,
- "í’µO^-â§§â…¶vѪ8廸鉵㈉רâ†Q㿴뺟EႳvNM:磇>wî·/៻唎뷭୥!냹D䯙iëµ±è²C#⼉NH6`柴ʗ#\\!2ä‚—â±§f?諳.Pëˆ-è¿”I꘶6?8î“ê˜": -8934657287877777844,
- "溎-è˜å¯ƒi诖ര\"æ±µ\"\ftl,?d⼡쾪⺋h匱[,à·©I8MÒ§F{kç“¿PAî…§'橸ꩯ綷퉲翓": null
- }
- ]
- ],
- "ោ係Øî½<å…ƒ": 1.7926963090826924E-18
- }}]
- }
- ]
- ]]}]
- }]
- ]
- ]
- ]
- ],
- "ጩV<\"ڸsOᤘ": 2.0527167903723048E-19
- }]
- ]}
- ]
- ]],
- "∳㙰3ì ´pá§—ä±™?`<U὇<\/æ„E[ᮚAî›j诂ᒽ阚uv徢ဎ떗尔ê½í›€ì©‘Jä´?âª=륪ᆩ푰ஓã•?럽VK\"X?檨လ齿I/耉A(AWA~â¯ç¨è¹«": false,
- "å’å¦ë¾‡}䀼链i⇃%⋜&ç’ªIx渥5æ¶§qq棩á¥-â «AA낇yY颕A*ïˆè£¦O|n?䭬혗F": null,
- "ç­CLì–­B혆Kॎ`鎃nrî€sZiÕªWç )?p~K~A眱ä²QO妣\u001b\u001b]ᵆᆯ&ã‹á¹è±‰ëº˜$ê­§#j=C)祤⫢歑1o㒙諩": 7028426989382601021,
- "쳱冲&ဤäŒì•§h胺-é½±H忱8왪RDKᅒ䬋ᔶS*J}ስ漵'㼹뮠9ê±¢9p봋경ጕtởꚳT䶽瘙%ì¶´`@nಆ4<d??#僜ᙤ钴=薔ꭂbLXNam蹈": "樭る蹿= Uî ƒurwkn뙧⌲%\"쑃牪\"cq윕o@",
- "溌[H]焎SLã…?뀼䫨ç½W": 1.1714289118497062E-19,
- "ﬢp븇剌燇kĔ尘㶿㴞ç ê¾˜Ia;sâº^)$ç©®?sHᢥíªl": null
- }
- ]
- }
- ]
- },
- "TKnzj5o<\/K㊗ꗣ藠⦪駇î€>yZA8Ez0,^á™›4_0븢\u001ft:~䎼s.bb룦明yNP8弆Cå¯;⪾ì§'蕴뮛": -6976654157771105701,
- "íµê¦€\\㇑:nî‹™v+뒤燻䀪ﴣï·9ᚈ኷K㚊誦撪䚛,ꮪxሲ쳊\u0005HSf?asg昱dqꬌVꙇ㼺'k*'㈈": -5.937042203633044E-20
- }
- ]
- }],
- "?}\u20e0],så¶³è‹@#2uì’´sQSä©—=ꥮ;烌,|ꘔ䘆": "á…©ì˜Nç’ kZ먕眻?2ቲ芋眑D륟渂⸑ﴃIRE]å•—`K'"
- }},
- "쨀jmV賂ﰊå§ä‚¦çŽžã¬™áªM᪟ïՎ씜~`uOn*ॠ8\u000ef6??\\@/?9見d筜ﳋB|Sä¬è‘«ã½o": true
- },
- "즛ꄤ酳艚â‚㺘봿㎨iGà§•à¡¿?1\"䘓您\u001fSáŠâº¿æºzៀ뻤B\u0019?ìœa䳵᭱䉺膷d:<\/": 3935553551038864272
- }
- ]
- ]}
- ]]
- ]]
- ]}
- }
- ]
- }
- ]]}},
- "᥺3h↛!ê‹°y\"攜(ெl䪕oUkc1A㘞ᡲî촾ᣫ<\/ä’ŒEã›æ½¨i{ï  v?Wà±¾H\\RჅpzè¬R脾;v:碽✘↯삞鷱o㸧瑠jcmK7㶧뾥찲n": true,
- "ⶸ?x䊺â¬-ä°…â‰!e쩆2ꎿ准G踌XXᩯ1ß}0?.í—€Z馟;稄\baDꟹ{-寪⚈ꉷ鮸_L7ƽᾚ<\u001bጨA䧆송뇵⨔\\ç¤ë—”d设룱㶉cq{Hyã±R㥽å¢ï¬…p": -7985372423148569301,
- "ç·«#ì½®IB6<\/=5Eh礹\t8럭@饹韠r㰛斣$ç”LVì·a갵îŸ'请o0g:^": "䔨(.",
- "ë³â„¡åœ¤pï¾à¯„Ä倧訜BìŸGä™”\"Sbâ“®;$$â–S1J뢙SF|赡gï„€*\"Vu䲌y": "䪈&í‹),\\kT鬜1í’¥;ë·´'Zေ䩹@Jéž½Nã¼M?å¥eWb6榀ƩZڮ淽⺞삳煳xჿ絯8eâ¶ç¾·V}ჿ쎱䄫R뱃9Z>'\u20f1â“•äœé½®"
- }
- ]
- ]]]
- }}
- }
- ]
- ]},
- "펮b.hç²”í¯2npXè©«g錰鷇㇒<ì™S値bBi@?镬矉`剔}c2壧ଭfhY깨R()痩⺃a\\â”?M&ﯟ<劜꺄ï‘멊ᄟA\"_=": null
- },
- "~æ½¹Rqn榢㆓aR鬨侅?䜑亡V_ç¿…ã­”(ä“·w劸á³Dp䀅<\/ï°Žé¶Šm䵱팱긽ꆘ<tD쇋>긓准D3掱;o:_Ñœ)껚콥8곤d矦8nP倥ꃸI": null,
- "뾎/Q㣩㫸벯➡㠦◕挮aé¶§â‹“å¼\u00001뱓fm覞n?㛅\"": 2.8515592202045408E17
- }],
- ",": -5426918750465854828,
- "2æ««@0柡g䢻/gꆑ6演&D稒肩Y?艘/놘p{f투`飷ᒉ챻ëŽîª–<늛ä˜ï´¡ì¤°ì«„": false,
- "8î™–(鸑嵀⵹ퟡ<9㣎Tߗ┘d슒ل蘯&㠦뮮eà kç g ì—»": false,
- "d-\u208b?0ﳮ嵙'(J`蔿d^踅⤔榥\\J⵲v7": 6.8002426206715341E17,
- "ཎ耰í“ê•ï’ã±·\u0013y=詽I\"盈xm{0쾽倻䉚ષso#é°‘/8㸴짯%ꀄ떸b츟*\\鲷礬ZQå…©?np㋄椂榨kc᡹醅3": false,
- "싊j20": false
- }]]
- ]],
- "ä¿›\u0017nç·½Tu뫉èœé¼Ÿçƒ¬.ï‘ꭠIâ°“\"Ἀ᜾uC쎆J@å¤%ê›m뻨ᾀ画è›íœƒT:錖㑸ዚ9죡$": true
- }
- ]
- ],
- "ãµâ‡˜ê¦–辈s}㱮慀밒s`\"㞟j:`ií”»Z<C1衽$\"-饧?℃\u0010⼒{î°p飗%R\"ä²”\")ì¹€\\%": true,
- "苧.8\u00120ݬ仓": 6912164821255417986,
- "ë–Žé¡£ä¿X;.#Qí‹.笂'p쟨唒í랩냆¦aâ±{è°.b我$蜑SH\u000fç¾=äŸ¼â£¼ï©¿áœæ”•B&挰繗ã”ê…‚-Qv\\0ä¶äš¥ãºio[㑮-ᇼ䬰컪ṼiY){ë°\u0010q螰掻~\n輚x\u0014罺)è»´": 3.024364150712629E-20
- }
- ]
- ]
- ]
- ]}
- ]]
- }
- ]
- ]]
- ]
- ]]]],
- "\"凲o肉Iz絾豉J8?i~傠᫽䇂!Wï›—D溊J?á¡’vsè†åµ¹âž’ïŸæ·´î‡…>ì„«^諎0Ok{켿æ­à·£èƒ°a2﨤[탳뚬쎼嫭뉮m": 409440660915023105,
- "w墄#*ᢄ峠밮jLa`ㆪ꺊漓Lã§ëŽ!Agkï¹ï¾'ê›ë¢ƒã¯å²¬D#ã’¦": false,
- "ଦPGI䕺L몥罭ꃑ궩﮶#⮈ᢓӢ䚬p7웼臧%ï‘¥~Sè âŒíž€6îž’&t䳙y㪘ëƒ\\*;é‰ï¿Šé¿µ'å—•pa\"oL쇿꬈Cgî“": "ã¶½1ç¸D⟸䴅ᆤ뉎﷛渤csî¸x ä”цꬃ锚æ¬?ຽ+x~꘩uI࡞\u0007æ ²5呚ẓem?è¢\")=㥴䨃pac!/æŽY",
- "á·±o\\||뎂몷r篙|#X䦜I#딌媸픕åžRDæ–³X4t⯩夬=[ï‹ë­²r=绥jhë·±ì¸âª˜%]⚋܈㖴スHí…¹m(WOæ›åЉ0~K3c柢Õã‰ïªªé€³~": false,
- "ç…½_qb[첑\\륌wEâ½Ztï”´CNï­+餌ᕜOê›­": "{ﳾ쉌&s惧á­âµ†3䢫;䨞팑ï›ê’ªí˜è¤€à¢–Qä ¿V5뭀䎂澻%ë°›u5í…¸oA⮥U㎦;B䳌wzä•™$áž¿\\௅婺ëµâª¾í†\\`Kyौꋟ._\u0006L챯l뇠Hi䧈å’5",
- "艊ä½à£ƒë¡‡ä± çˆ¬ï˜‚!*;⨣æŽïžæ…“qé“|儑ᨋL+è¿¥=6㒺딉6弄3è¾…J-㕎뛄듘SG㆛(\noAzQê±ä°©X*ã¢O퀌%펠낌moí‹®a^<\/F&_눊ᾉ㨦ы4\"8H": 2974648459619059400,
- "鬙@뎣䫳á®ë¡?){y?5K;î§„TA*k溱䫜J汃ꂯ싔ì\u001dA}룖(<\/^,": false,
- "ëª@QꋦFꊩá’뎶î‡lXl垨4î¤^郣|ꮇ;ä´á“}ìµ²zç–": null
- }
- ]]]],
- ":_=ë‹§å¼—D䙋暨é›. 㱻붘ä‚Jå„’&ZK/녩䪜rå›â½¯D喠죥7ï“⹌䪥c\u001a\u2076￞妈朹oLkè®F౟覛ì§ã®7T;}è›™2{9\"å´“bB<\/⡷룀;즮鿹)丒툃୤뷠5W⊢嶜(fb뭳갣": "E{å“1WM"
- }},
- "䘨tjJ驳豨?y輊M*᳑梵瞻઻ofQG瑮e": 2.222802939724948E-19,
- "ä®´=â‘âž¶Tà·‹wäžœ\"垦ꃼUt\u001dx;B$뵣䙶E↌艣ᡥ!á§Ÿ;ä±€[䔯k쬃`à©8饙른ç†î‹”'2_'袻tGfè’­J땟as꯳╖&å•’zWࡇᒫYSá¬\u0014ℑ첥鈤|cG~Pá“®\">\"": "ႆl\f7V儊㦬nHꄬꨧC{ì¢~C⮃⛓嶦vꄎ1w鰠嘩뿠魄&\"_qMâµ–é‡”ë…®îœ¡ê‡ ãš{ç³Jå“‹ cî°¸v?-jkﻯྌ鹑L舟r",
- "龧葆yB✱H盋夔ﶉ?n*0(": "ꧣኆ㢓氥î³qZZ酒ຜ)鮢樛)X䣆gTSî»»Ò‘Gí…žï’˜k.J圬ç–ë¡«ïœì¯­z L:\\ྤ@w炋塜쿖ᾳy뢀䶃ë±N䥨㚔勇ê²#p",
- "ë„畎Q娡\"@S/뼋:äµ!Pè¡…ì´šfVHQs✜á«i㻑殡B䜇%믚k*U#濨낄~": "êŸá‹•ì³¸êˆæ•‹&lå¦\u0005憡멗瘌uPgá…ªm<\/To쯬锩h뒓k"
- }
- ]
- }],
- "墥홞r绚<\/⸹ⰃB}<躅\\Y;๑@䔸>韫䜲뱀X뗩鿥쩗SI%ﴞ㳕䛇?<\/\u00018x\\&侂9é‹™a[LRã‹­W胕)â¡¿8ãž™0JF,}?í—ˆd1cDMáƒâ›é„ⱕ%X)!XQ": "â³ê—³=橇a;3t⦾꼑仈î¥á€°aᚯ⯋ꕃAsé´·Nâ•_䎃ꙎAz\u0016䯷\\<à¿«>8q{}ï½·?ᣰ}'0ᴕ펓B┦lF#趤厃T?㕊#撹圂䆲"
- },
- "Ü‹ë‹é¾«ï¥c웑": false,
- "ㇿ/q\"6-co髨íœCí¦#\u001b4~?3ä¹E삇<<": 7.600917488140322E-20,
- "äE6?㣖êƒé—´t祗*é‘ {ḣV(æµ¾h逇íž=W?ૉ?nꇽ8ꅉຉj으쮺@Ꚅ㰤u]Oyr": "vâ‰á«¸_*όAඤԆl)ۓᦇQ}í zà¼q滚",
- "ソ᥊/넺I": true
- }]]
- ]
- ]
- ]
- ]]
- },
- "䭑Ik攑\u0002QV烄:芩.麑㟴㘨≕": true,
- "å„꿕C쇻풉~å´%碼\\8\"䬦꣙": null,
- "欌L圬䅘Y8c(♺2?ON}o椳s宥2䉀eJ%é—¹rå†O^K諭%凞⺉⡻,掜?$ꥉ?略焕찳㯊艼誜4?\"﯎<ï±ã‚›XáˆINT:è©“ +": -1.0750456770694562E-19,
- "ç’àc뜭싼ﺳ뎤K`ïŸ]p隨LtE": null,
- "ç”™8䵊神EIꩤé¯á¢€,ïµ®Uä‘u疒ử驺䚿≚ഋ梶秓F`覤è­#짾蔀묊4<åªì¬¦éª_Yzgcà¡¶î²§4kç´¥`kc[Lï®—î°£ç°*I瀑[â¾°L殽鑥_mGÈ <\/|囹ç gæ¡°iri": true,
- "챓ꖙꟻì¢è‡ou,å— 0\\jK핻뜠qwQ?ഩ㼕3Y彦b\u009bJ榶N棨f?ë¦é–綃6é³µM[OEë´¨uí–.Ꮁ癜蟳뽲ꩌ뻾rM豈Rï¨ç¾« uDꎚ%": null
- },
- "V傜2<": 7175127699521359521
- }],
- "é“«aG切<\/\"ী⊆e<^g࢛)Dé¡ï½Žï¬®é¥¼\u008c猪繩嵿ﱚCꡬ㻊g엺Aì—¦\u000fæš¿_f꿤ë³ã¦•桦`蒦䎔j甬%å²rj ç³": "䚢åŽëˆ´Au<4箞7礦Iï±”å eȧ䪸uï„€äµp|逹$嗫쨘ꖾï·!胠z寓팢^㨔|u8Nሇe텔ꅦ抷]،鹎ã³#༔繁 ",
- "낂乕ꃻ볨ϱ-ꇋã–fsâ¿«)zꜦ/K?솞♞ꑌ宭hJ᤭瑥Fu": false,
- "쟰ãœé­›G\u0003u?`㾕ℾ㣭5螠烶這趩ꖢ:@å’•ê¶xë’˜ëŠmä°¨bç—ƒë 0鳊喵熬딃$摉_~7*ⱦ녯1錾GKhJ惎秴6'H妈Tᧅ窹㺒疄矤铟wላ": null,
- "쯆q4!3錕ã²âµ†ã‡›ê˜·Zç‘©ë­†\\â—ªNH\u001d\\ã½°U~㯶<\"쑣낞3ᵤ'峉eꢬ;鬹o꣒木X*é•·PXᘱu\"ä ¹n惞": null,
- "ᅸ祊\"&ꥴCjࢼ﴿?䡉`U效5殼㮞V昽êª#ﺸ\\&t6x꠹盥꣰a[\u001aêªSpe鎿蠹": -1.1564713893659811E-19
- }
- ]]
- ]
- ]
- ],
- "羵䥳H,6ⱎ겾|@t\"#í–Šî¦1|稃 ì„­)ëœ=뻔ꡜ???櫎~*ῡ꫌/繣ﻠq": null
- }
- ]}
- ]},
- "츤": false
- }},
- "s": 3.7339341963399598E18
- }
- ],
- "N,I?1+㢓|ࣱ嶃쩥V2\u0012(4EE虪朶$|w颇væ­¥": "~ì¢~_,Mzrã«YB溓Eæ·š\"â…¹äˆ”áºæŠ™ b,nt5Vã’J檶ê¨â»”?",
- "Q껑ꡡ}$넎qHç…”æƒ/ez^!ẳF댙äŒé¦»å‰8": "梲;yté’°$i冄}Aî‘”L%a jëœå¥·ê±³ëš¾d꿽*ሬuDY3î…—?뮟鼯뮟wãªí‹±îŸ‚V",
- "o{Q/K O胟ãzUdê€m&⨺J舕â¾é­¸è¨ŸãŒ¥[T籨櫉å”í‚ aṭ뱫촙莛>碶覆⧬짙쭰ׯdAiH໥벤í¥_æ¸[ 0î­¬e:죃TCå¼¼èŽëµDA:w唵ê£": null,
- "á½æ¨Žäµ®è»§|?à±—aWH쩃1 ê…­su": null
- }
- ]
- },
- "勂\\&m鰈J釮=Ⲽ鳋+䂡郑": null,
- "殣b綊倶5㥗惢⳷è¢á‘€ä¬„é•§M^ï±´3⣢翣næ«»1㨵}ኯ뗙顖Z.Q➷ꮨ뗇\u0004": "ê”™ä¼>n^[GीA䨟AMç¢á’ŠS쨲w?d㶣젊嘶çºéº“+æ„£a%気ྞScë“ᔘ:8bM7Xd8㶑臌]Ꙥ0ê­ì’™ä«£æŒµCè–½î€Dfⵃ떼᷸",
- "?ç´¡.ì…ª_à·¨j\u0013Oxâ” $Xᶨ-á…‡oè–¹-}軫;yæ¯ãªœKã£?.EVì®±4둽⛻䤜'2盡\u001f60(|eì°ã¼Žá¦€ã’§-$l@ﻑå³\u0003ä­±å“å·—WFo5c㧆Tí„Y맸♤(": -2.50917882560589088E17
- }}
- ],
- "侸\\릩.᳠뎠狣살cs项䭩畳H1s瀉븇19?.w骴崖㤊h痠볭㞳㞳ä®Ql怠㦵": "@䟴-=7f",
- "鹟1x௢+d ;viä­´FSDS\u0004hꎹãš?â’â¦Ñž6u,扩@ë·Su)Pag휛Tá’—Vç—©!çžé‡€ê–žè˜¥&ೞè˜ê­°êž‡áŽ": "ah懱Ժ&\u20f7䵅♎඀䞧鿪굛ౕ湚粎蚵ᯋ幌YOE)५襦ãŠY*^\"R+ඈî¶å’·è¶9î—ꥂ榨艦멎헦é–ë¶v좛咊E)K㓷ྭr",
- "æ†q쮦4綱켙ì….f4<\/g<籽늷?#蚴픘:fF\u00051㹉뀭.á°–í’ŽfÖ¦Hv蔎㧤.!ä­½=éž½]ìŒH:?\"-4": 8.740133984938656E-20
- }]}
- }
- ],
- "tVKn딩꘥⊾蹓᤹{\u0003lR꼽ᄲQFá…傅ﱋ猢⤊á”,E㓒秤nTà¶­v`â™›I\u0000]꫔ṞD\"麵cè¸î“²æ°X&æ¿¿ë˜ê£¹ê¹³à±¥è‘‚鿎\\aꡨ?": 3900062609292104525
- }
- ],
- "ਉ샒⊩Lu@S䧰^g": -1.1487677090371648E18,
- "⎢k⑊꬗yá«7^err糎Dt\u000bJç¤¯í™•ã†æ²‘サꋽeèµ”ã¢^J\u0004笲㿋idra剰-᪉C錇/Ĝ䂾ညSì§€?~ì½®gR敉⬹'ä§­": 1901472137232418266,
- "ç—kä¶¥:?ì´½è´ì“‰ê“ˆã’¸gç˜[뵎\\胕?\u0014_榙p.j稶,$`糉妋0>Fá¡°ly㘽$?": "]ê™›O赎&#ã ƒë±å‰³î°·\"<â—†>0誉é½_|z|裵씪>áŒã¼\"Z[ç•}O?G뚇諦cs⠜撺5cuç—‘U圲\u001c?鴴計lì¶¥/╓哼䄗èŒîšªê®…뫈댽AëŒë¡–뤫V窗讬sHd&\nOi;_î´–u"
- }
- ],
- "Uﺗ\\Y\\梷䄬~\u0002": null,
- "k\"Y磓ᗔ휎@U冈<\/w컑)[": false,
- "æ›Jè·âŒ»ë¦\u001f㙳s꥓âŸé‚«P늮쥄c∬ྡྷ舆렮칤Zè¶£5콡넛A쳨\\뀙骫(棻.*&è¼›LiIfi{@EA婳KᬰTXT": -4.3088230431977587E17
- }]}
- ]
- ],
- "곃㲧<\/dఓꂟs其ࡧ&N葶=?c㠤Ჴ'횠숄臼#\u001a~": false
- }
- ]
- ]}]
- }]
- }}
- ],
- "2f`â½°E쵟>Jî•笂裭!〛觬囀ۺ쟰#桊l鹛ⲋ|RA_Vxá­gEë“h﵀mfá»|?juTUæ¡£[d⢼⺻p濚7E峿": 5613688852456817133
- },
- "濘ë¶gå¿®7ãµæ®¬W팕Qæ› ë«°)惃廊5%-î«è¹šzYZ樭ﴷQ锘쯤崫îŸgg": true,
- "絥ᇑâ¦ì’“븣爚H.ã—Šß„o蘵貆ꂚ(쎔O᥉î¼ï®“]姨Wê“!RMA|o퉢THxè½®7Mê»U즨'i뾘舯o": "è·¥f꜃?"
- }}
- ],
- "é·°é¹®K-9k;ï°°?_ݦѷ-ꅣ䩨Zꥱ\"mꠟ屎/콑Y╘2&鸞脇ã¢ê€‡à ºâ°¼æ‹¾å–­í‹®îL꽩bt俸墶 [l/웄\"꾦\u20d3iও-&+\u000fQ+໱뵞": -1.296494662286671E-19
- },
- "HX੹/⨇୕붷Uﮘ旧\\쾜͔3l鄈磣糂̖䟎Eá³wæ©–bá¿€_딕huè‘°î¤çª³é—¹Ð²U颵|染H죶.fPä—®:jä«¢\\b뎖i燕ꜚGâ® W-≚뉗lè¶•": "ଊ칭Oa᡺$IVã·§L\u0019脴셀붿餲햪$迳å‘ì¯ì¼‚PqfT\" ?î¹€I屉鴼쿕@ç¡™z^é•㊵M}ãš›T젣쓌-Wâ©-g%⺵<ë®±~빅╴瑿浂脬\u0005왦燲4áƒb|Då § <\/oEQh",
- "䘶#㥘à©îººìº”ï” f巋ἡAJ䢚쭈ࣨ뫒*mᇊK,ࣺAꑱ\u000bR<\/A\"1a6鵌㯀bh곿w(\"$ê˜*rà²è¶£.dà¿©k/抶면䒎9W⊃9": "漩b挋Swè—Ž\u0000",
- "畀e㨼mK꙼HglKb,\"'䤜": null
- }]}]
- ]
- ]
- }]
- ]}
- ]
- ]}
- ],
- "æ­™>駿ꣂ숰Q`J΋方樛(d鱾뼣(ë«–í„­\u20f9lচ9æ­Œ8o]8윶lì–¶?é•–G摄탗6í‹íµ+g:䱫홊<멀뀿/س|ê­ºsê±è·¶ç¨šW々c㫣⎖": "㣮蔊깚Cꓔ舊|XRfé»ã†šï¸†'쾉ì·\\&言",
- "æ®­\"cÞɨê™äž˜:嬮eæ½½Y펪㳅/\"O@à —ê²´]ì·–YÇž(t>R\"N?梳LDæ­=næ°¯Tè±°2R諸#N}*ç§ï¡§4}ã¶ŠGä£bì–š": null,
- "襞<\/å•§ B|싞W瓇)6簭鼡艆lNì©`|펭佡\\é–“é‚[z릶&쭟愱ꅅ\\Tá°½1靝忠ˆ4̸s윜R7â’/똽?치X": "âŠèº–Cﱰ2Qẫè„&இ?%ëƒæ‚Š",
- ",é°§åµì…£îˆ›ì‹¹xᎹ힨᯳EṬHïŽã¹–9": -4604276727380542356
- }
- }
- ]]]],
- "웺㚑xs}q䭵䪠馯8?LB犯zK'os䚛HZ\"L?셎s^㿧㴘Cv2": null
- }]
- ]
- ]
- ],
- "Kdî©´2Kv+|z": 7367845130646124107,
- "ᦂⶨ?ᢠ祂些ഷ牢㋇æ“\"腭䙾㖪\\(y4cE뽺ㆷ쫺ᔖ%zfÛ»$Ñž1柦,ã¶¢9r漢": -3.133230960444846E-20,
- "ç˜Mç„€q%㢟f鸯Oâ£è“‘맕鯊$Oå™·|)z褫^㢦⠮ꚯ꫞`毕1qꢚ{ĭ䎀বώT\"뱘3G൴?ï¢ï¢^^oï…¯f": null
- }
- ],
- "a8V᯺?:ﺃ/8ꉿBq|9啓댚;*i2": null,
- "cpT瀇Hç°á»ªpೃi鎪Rrâ£ìˆ¬-鹸ҩ䠚z脚цGoN8å…¥y%è¶ŒI┽2ឪЀiJNcN)æ§£/â–Ÿ6S숆牟\"箑X僛G殱娇葱T%æ»:J諹昰qV쨰": 8331037591040855245
- }],
- "G5ᩜ䄗巢껳": true
- }
- },
- "Ồ巢ゕ@_è­™A`碫é„㡥砄㠓(^K": "?܃B혢▦@犑ὺD~Tâ§|é†;o=J牌9냚⢽㨘{4è§èš”9#$∺\u0016p囅\\3Xk阖⪚\"UzA穕롬✎âžã­’춺C㣌ဉ\"2瓑员ᅽê¶ë«}꽚ꞇ鶂舟彺]ê½JCè§éЉ",
- "â†Äšè†\"b-í‰ACR言J謈53~V튥x䜢?ꃽɄY뮩ꚜ": "K/↾eèƒ}]Bs⾿q룅鷦-膋?m+æ­»^魊镲6",
- "粡霦cæž‹AHíŸo礼Ke?qWcA趸㡔ê‚?\u000eì¶‚8iতᦜ婪\u0015㢼nﵿê»!á´é–¢\u001d5j㨻gfá¿©UK5Juä¸tã‹TI'?ã“t>⼟o a>i}á°—;뤕Ü": false,
- "ꄮ匴껢ꂰ涽+䜨B蛹H䛓-k蕞fu7kLè°–,'涃V~챳逋穞cT\"vQ쓕ObaCRQã“¡â²®?轭⫦輢墳?vA餽=h䮇킵ní²í‰…喙?\"'1ç–¬V嬗Qdç—'Lự": "6v!së¯ã­Ÿî€µî¦˜ã£¯çƒ!磸餠ቂh0C뿯봗Fé·­gê–¶~コkK<ᦈTtïŽ\\è·“w㭣횋钘ᆹ듡䑚W䟾X'ê…”4ï€FL勉Vܴ邨y)2'〚쭉⽵-鞣E,Q.?å—",
- "?(˧쩯@å´Ÿå‹æ­„K": null
- },
- "Gc럃녧>?2DYIé´¿\\륨)æ¾”0ᔬlx'è§”7젘⤡縷螩%Sv׫묈/]↱&S ï…h\u0006æ­‹á‘›xi̘}ã²Y蔯_醨鯘煑橾8?䵎쨋z儬ê*@츾:": null
- }
- }
- }
- ]
- ]
- ]}
- },
- "HO츧G": 3.694949578823609E17,
- "QC\u0012(翻曇Tfã·ŸbGBJ옉53\\嚇ᛎDï–/\u001b夾á‰4\"í•€@祎)쫆yD\"i먎Vnî¿ã¿¿V1Wá¨ä¶€": -6150931500380982286,
- "Zã“®P翸é±é‰¼K䋞꘺튿â­Y": -7704503411315138850,
- "]모开ꬖP븣c霤<[3aΠ\"é»ä––䰑뮋ꤦ秽∼㑷冹T+YUt\"싳F↭ä–&鋌": -2.7231911483181824E18,
- "tꎖ": -4.9517948741799555E-19,
- "䋘즊îŽ.⬅IꬃۣQ챢ꄑé»|f?C⾺|å…•ì¯sC鬸섾整腨솷V": "旆柩l<Ké«î–žM戶鯮t:wRî°2ꉱ`9'l픪*í芦㊢Pjjoå ¡^ ì‡ì–›å¶…있ষ0?F",
- "下9T挞\\$yᮇk쌋⼇,ਉ": true,
- "櫨:ㆣ,é‚lî ¬r崕祜ã®çƒœZ,XXD蕼㉴ kM꯽?P0﹉릗": null,
- "îŠgv솠歽閘4镳䗄2æ¾¾>쪦sá–¸My㦅울ì‰ç˜—㎜檵9ï……ê‚駓ૉᚿ/u3ì”…å¾ï¤¥[Z䞸ࡗ1ꆱ&Q풘?Ç‚8\u0011BCDY2볨;é¸": null,
- "幫 nç…¥sì‡íއ 왊-$C\"è¡:\u0014㣯舼.3ë™—Yl⋇\"K迎멎[ê½µs}9鉳UK8ì¥\"掄㹖h㙈!얄સ?Ꜳ봺R伕UTD媚I䜘Wé¨è”®": -4.150842714188901E-17,
- "ﺯ^ã„„\b죵@fྉkf颡팋î¤êž¦{/Pm0V둳⻿/è½éŸ’ꊔᚬ@5螺G\\å’¸a谆⊪ቧ慷绖?è´¢(é·‡uéŒF=ráæ©¢áž³n:^iá´µtD볠覅Nèµ´": null
- }]
- }]
- }
- ]
- ]}
- ]},
- "謯?w厓奰Tï§¡í——èážè²–o⪇弒L!캶$ᆅ": -4299324168507841322,
- "뺊奉_åžæµ¸å»¶ëªå­„Z舰2i$q붿좾껇d▵é¤\"v暜Ҭì„mï¿´g>": -1.60911932510533427E18
- }
- ]
- }
- ]
- ]],
- "í‰êº”㠦楶Pê…±": 7517896876489142899,
- "ï™°": false
- }
- ]},
- "是u&I狻餼|è°–j\"7cë®sï­-踳鉷`䣷쉄_A艣鳞凃*m⯾☦椿q㎭Nîœæº”铉tlㆈ^": 1.93547720203604352E18,
- "ï…µkⲨ\\%vr#\u000bâ’ºY\\t<\/3﬌R訤='﹠8è¤êž´ë ´æ›”r": false
- }
- ]},
- "阨{c?C\u001d~K?鎌Ԭ8烫#뙣Pì´ˆé—tã­±E­ë’䆺}ç”—[R*1!\\~hã•…á°º@<9JêષIä³–æ ­6綘걹ᅩM\"▯是∔v鬽顭⋊譬": "ìš´ï¶Kæ•‚(欖C취پ℄爦賾"
- }
- }}
- }],
- "鷨赼鸙+\\ä­£t圙ڹx᜾ČN<\/踘\"S_ë§¶a鷺漇T彚⎲i㈥LT-xA캔$\u001cUH=a0츺l릦": "溣㣂0æ¿•=鉵氬駘>Pꌢpb솇쬤h힊줎çªãª¬CrQ矠a&è„꼬爼M茴/á¿®\u0017å¼è½¼y#êž c6ë‘´=?Rå´ë· éº–w?"
- },
- "閕ᘜ]CT)䵞l9z'xZF{:ØI/躅匽ì¡:䟇AGF૸\u001cퟗ9)駬慟ꡒꆒRS״툋A<>\u0010\"ꂔ炃7gëšEà§îˆbꅰ輤]oã±_뷕ܘ暂\"u": "芢+U^+㢩^鱆8*1鈶鮀\u0002뺰9⬳ꪮlL䃣괟,G8\u20a8DF㉪錖0ㄤ瓶8Nଷd?眡GLc陓\\_죌Vì°à¤²äºŒ?cë¦æ± \u0019JC\u0011b⤉zẒT볕\"绣蘨뚋cꡉkî« I\u001eé³´",
- "ꃣI'{6u^㡃#཰Kq4逹y൒䧠䵮!㱙ï®/n??{Lí’“ZETã™ í¿X2᩟綳跠葿㚙w཮x캽扳B唕S|å°¾}ì´•%N?o䪨": null,
- "ⰴFjà·Ÿì…ˆ[\u0018è¾·px?椯\\1<ﲻ栘á£ë´¢æ† ë‰´p": -5263694954586507640
- }
- ]
- ]]
- ]}
- ]}]
- ]
- ],
- "?#癘82禩鋆êŠty?&": -1.9419029518535086E-19
- }
- ]
- ]
- ]}
- ]
- ]
- ],
- "훊榲.|῕戄&.ãšZꛦ2\"䢥ሆ⤢fV_æ‘•å©”?â‰Fji冀탆꜕iã¬_ẑKᅢ꫄蔻XWc|饡Siẘ^㲦?羡2ã´1ç¸á™…?ì‰Ou": false
- }]]
- ]}}},
- "æ…‚ë—„å“è“”á“åŒåš–/颹蘯/翻ㆼL?뇊,í…µ<\\ç·ã”Cボ": null
- },
- "p溉ᑟi짣z:䒤棇r^٫%G9缑r砌롧.물农g?0׼ሩ4ƸO㣥㯄쩞ጩ": null,
- "껎繥YxK\"F젷쨹뤤1wq轫o?鱑뜀瘊?뎃hç‘\\ꛣ}Kå³^ኖâ¤ï§´ê‰“hy": null
- }
- ],
- "á±€nè‚“ã„›\"å »2>mæ®®'1橌%êž´êµ°=Ӳ鯨9耛<\/n據0u彘8㬇៩fá¿è¯™]嚊": "䋯쪦S럶åŒã…›#î½)O`ሀX_éªæ¸²â›€ã¨»å®…闩➈ꢙஶDRâª"
- },
- "tAì“龇 â‹¥bj왎录r땽✒롰;羋^\\?툳*┎?ì€ma䵳넅U䳆૘〹䆀LQ0\bç–€U~u$M}(鵸gï­â³¾i抦뛹?䤈땚검.鹆?ê©¡tâ¶¥GÄ’;!ቹHïš©Så³»B츪ì¼f5≺": 2366175040075384032,
- "ì „pJjleb]áž½": -7.5418493141528422E18,
- "n.鎖ጲ\n?,$䪘": true
- },
- "欈Ar㉣螵᪚茩?O)": null
- },
- "쫸M#x}Dç§±æ¬K=侫们ä¸ï‡ª.KꕾxẠ\u001e㿯䣛FÜ캗ï¬qq8꟞ṢFD훎⵳簕꭛^鳜\u205cÙ«~⑟~冫ऊ2ì«°<\/戲윱o<\"": true
- },
- "ã·è¥/T뱂\u0010锕|内䞇xä¾â‰¦ã­–:M?iM᣿IJeç…œdG࣯尃⚩gPt*辂.{磼럾äª@a\\袛?}ᓺBç¼": true
- }
- }
- ]]}]}},
- "tn\"6î´ê«¤ìƒ¾ä„„;銞^%VBPwu묪`Y僑N.↺Ws?3C⤻9唩Sä ®á´m;sᇷ냞඘B/;툥B?lB∤)G+O9m裢0kC햪䪤": -4.5941249382502277E18,
- "áš”t'\\æ„«?éµ€@\\ã³ê‚•Pí <<]ç…¹G-b!S?\nꖽ鼫,Ý›&é ºy踦?Eæ†î¬–릱H}햧캡b@手.p탻>췽㣬ꒅ`qeä½­P>á“‚&?u}毚ᜉ蟶頳졪áŽzl2wO": -2.53561440423275936E17
- }]}
- }
- ]
- ]],
- "潈촒⿂å¡": 5495738871964062986
- }
- ]]
- }
- ]
- ]}
- ]]
- ]]
- ]}
- ]
- ]},
- "á‚qí‚è“…R`謈èŸá¦î’³å„‚æ§åƒ»ï¹¶9å©Œî¬æ«žé‡ˆ~\"%匹躾ɢ뤥>࢟瀴愅?殕节/냔O✬H鲽엢?ᮈà©î“Žâ‹§dâ½ã«zCe*": 2.15062231586689536E17,
- "ã¶µUi曚ç°é‹ªá¾¼è‡§P{ä䷪쨑̟A뼿T渠誈äšD1!ìž¶<\/ã¡7?)2l≣穷᛾ç¨{:;㡹nemיּ訊`Gî¹²": null,
- "䀕\"飕辭påœf#뫆䶷뛮;â›´á©3çšëá°ìŽ“â¦·è©µ%᜖Մfs⇫(\u001e~P|ï­—CⲾផv湟W첋(텪બTî¾·<บSê‰à©—⋲X婵i ӵ⇮?L䬇|êˆ?졸": 1.548341247351782E-19
- }
- ]
- },
- "t;:N\u0015qé¦Rt缆{ê®C?஛㷱敪\\+鲊㉫㓪몗릙ç«(æ°µkYS": "Xá°‚T?൮ô",
- "碕飦幑|+ 㚦é¶`é•¥ê© B<\/加륙": -4314053432419755959,
- "秌孳(p!G?Vå‚«%8ሽ8w;5鲗㦙LI檸\u2098": "zG N볞䆭éŽí˜\\ONK3íš™<\/樚立圌Q튅k쩎Ffì‹aׂJK銆ઘì¦ç‹©6༥✙䩜篥CzP(è»é§‡HHퟲ讃%,ά{ë p而刲vy䦅ክ^톺M楒é¢ã¹³]Mdg2>䤉洞",
- "踛M젧>忔芿㌜Zk": 2215369545966507819,
- "ì”A`$æ§­é °í»^U覒\bG毲aᣴU;8!팲f꜇E⸃_åµ{å«ç¾ƒX쀳C7ë—®m(åš¼u NÜè°ŸD劯9]#": true,
- "ﻩ!뵸-ç­šPá­›}á¼°å±¥lPh?౮ⶹꆛ穉뎃gè‘㑓溢CX뾇Gã–¬A錟]RKï’î´²aꄘ]Yo+@ä˜'s섎襠$^í™°}F": null
- },
- "粘ꪒ4HXᕘ蹵.$å€\r\u001dë¬77pPc^yî¶ç¬²Q<\/ê–¶ è¨äƒá¨•G?*": 1.73773035935040224E17
- },
- "婅拳?bkU;#D矠â´vVN쩆t㜷A풃갮娪a%é®çµª3dAv룒#tm쑬⌛qYwc4|L8KZ;xU⓭㳔밆拓EZ7襨eD|隰ऌ䧼u9Ô¢+]è´´Pè¿": 2.9628516456987075E18
- }]}}]
- ]}
- }}
- ]}]
- ],
- "|g翉F*湹̶\u0005â1脉̀eI쩓ᖂ㫱0碞l䴨ꑅ㵽7AtἈ턧yq䳥塑:z:é€ï¾¼X눔擉)`N3昛oQì…–y-ڨ⾶æ¢êˆµq^<\/": null,
- "è¹\\ëž“G^璬x৴뭸ゆUSê²§ï®·Bꮤ ┉銜᯻0%N7}~fæ´‹å„Xꔼ<\/4妟Vꄟ9:౟곡t킅冩䧉笭裟炂4ë´‹â±³åºæ€Št+怯涗\"0ã–ˆHq": false,
- "졬믟'ﺇফ圪쓬멤m邸QLà¦¬ä—æ„4jvsç¿™ à¾ê§€è‰³H-|": null,
- "컮襱⣱뗠 R毪/鹙꾀%헳8&": -5770986448525107020
- }
- ],
- "î½­B䔚bê»ë™å§“展槰T-똌鷺tcï§ç¿á«½^㓟ä€o3o$꘭趙è¬Ié¡©)뇭Ἑä“\f@{ᣨ`x3è”›": null
- }
- ]
- ]
- }],
- "⦖扚vWꃱ꥙㾠壢輓{-⎳鹷è´ç’¿äœ‘bG倛â‹ç£Žc皇皩7a~ﳫUâ•£Q࠭ꎉS摅姽OW.홌ೞ.": null,
- "蚪eVlH献r}á®ë¯ ï°©ê”„@ç‘„â²±": null,
- "퀭$JWoê©¢gì—­ì䖔㑺h&à­¢tXX愰㱇?㾫I_6 OaB瑈q裿": null,
- "꽦ﲼLyr纛ZduçB絟쬴糔?ã•‚ì§¹äµe": "ḱ\u2009cX9ë©€i䶛簆㳀k"
- }
- ]]]],
- "(_ê®g່澮?ᩑyM<艷\u001aꪽ\\庼뙭Zë§·ã°©Vm\\lYç­º]3㋲2㌩㄀Eਟäµâ¨„ì¨á”ŸgङHné–⤇놋瓇Q탚單oY\"♆臾jHᶈå¾îž«á‰„??uㇰA?#1侓": null
- },
- "è§“^~ሢ&iIë†g륎ḱ캀.ᓡꀮ胙鈉": 1.0664523593012836E-19,
- "yè©­GbᔶऽsëŒU:æœî „⤎ϲì—⮼D醄诿që™°I#즧v蔎xHᵿt᡽[**?崮耖p缫쿃Lè,ë´¬ï–ꤦC쯵#=X1çž»@OZc鱗CQTï‹„x": null
- }
- ]
- }}],
- "剘ç´\u0004\\Xn⊠6,á€×±;嵣崇}讃iႽ)d1\\䔓": null
- },
- "脨z\"{X,1u찜<'k&@?1}Yn$\u0015Rd輲ーa쮂굄+B$l": true,
- "諳>*ì­®ê´äµŸÒ+<ç®}빀䅱⡔æªï€è‡’hIH脟ꩪCí•ଗP좕\"0i<\/C褻DÛžæ—+^5?'ꂱ䚫^7}ã¡ cq6\\쨪ꔞꥢ?纖䫀氮蒫侲빦敶q{Aç…²G": -6880961710038544266
- }}]
- },
- "5s⨲JvಽῶꭂᄢI.a৊": null,
- "?1qê½ì¿»ê›‹DR%Uå¨>DgNä¹­G": -1.2105047302732358E-19
- }
- ]
- ]},
- "qZz`撋뙹둣j碇ì\\ꆥ\u0018@ïœè—´ç–°Wz)O{Fä¶›l᷂绘訥$]ë®å¤»ä¢‹ä©‡è¿ç°æ¨§çŒµâ£­jè¶q)$꬚⵷0馢W:â°!Qoe": -1666634370862219540,
- "t": "=î¹›wp|~碎Q鬳Ó\\l-<\/^ﳊhní–}ä”t碵ḛ혷?é»äŠ—",
- "邙쇡㯇%#=,î‰E4勃驆V繚q[Y댻XV㡸[逹á°è‘¢B@u=JS5?bLRnì–®ã‰â…ï°³?a6[&íŸ!è—ˆ": 1.2722786745736667E-19
- },
- "X블땨4{ph鵋ꉯ웸 5p簂䦭s_E徔濧dç¨~No穔噕뽲)뉈c5M윅>âš‹[岦䲟懷æ?éŽê“†à¸¬çˆ‹ç äœ”s{\u001bméšå„¸ç…›%bﯿXT>ê—˜@8G": 1157841540507770724,
- "媤娪Qæ¸ï‡\u0011SAyᡈ쿯": true,
- "çš^ಸ%ê±<\/蛯<O\"-刷ã R(kO=䢊䅎l䰓팪A絫픧": "è­”\\ãš„ ?R7㔪G㋉⣰渆?\\#|gN⤴;Wì¹·A׫癮଼ೣã³ë’œ7dæ“ê¾²0扬S0ᆵi/贎ྡn䆋武",
- "è‡ç ‡Gã“æœ¦ì¼‹Wq`㞲攊*å†î‘µî¨~霓L剢zI腧튴Tç¹™Cঅ뫬╈뮜ㄾ䦧촄椘B⊬츩r2f㶱厊8eϬ{挚â¯OM焄覤\\(KÓ¡>?\"祴å“\\\\'í": -3.4614808555942579E18,
- "釴U:O湛㴑䀣렑縓\ta)<D8ï­³æ§é«­D.L|xsæ–‹æ• \"ë‹æ—©7wáŽ": true,
- "쵈+쬎簨up䓬?q+~\u0019仇îŒëµˆá«¯3áµ£æ˜æž°åŠ«ãª¢uç˜-퀭:ì»™:u`⌿ï«A(9鄦!<çšnj3:Hà£¨å·‹ä€æ—¸ëŽˆë§»v\"\\(곘vO㤰aZe<\/W鹙鄜;l厮ë‘": null,
- "î–·": -1.2019926774977002E-18,
- "%者Oî–‹7.Nêªs梇接z蕜綛<\/䜭\"죊y<曋漵@Śâ¹sD⟓jݗᢜ?zî–†/9á²Ma쨮긗贎8ᔮ㦛;6p뾥໭䭊0B찛+)(Yã¿ é¸ä•’^옥": "鬃뫤&痽舎Jì½®è—󽸰ᨨMꈫ髿v<N\\î·.ì‚’ê»…Ñ1ê­¼5ä´·5쳬臨wjë¥"
- }],
- "é·Ž'ã³—@帚妇OAj' è°¬f94ǯ(횡ヒ%io쪖ì‚좛>(j:숾å´ä—ŒgCiB뽬Oyuqè¼¥åŽ/7)?今hY︺Q": null
- }
- ]
- ]]]}]
- ],
- "I笔趠Ph!<ཛྷ㸞诘X$畉F\u0005笷èŸ.Esr릙!W☆ï›ä²–뗷莾뒭U\"䀸犜Uo3ï¯Gꯌx4r蔇᡹㧪쨢準<ä‚€%ࡡꟼç‘8ç‚Xs0ä€é”€?fi쥱ê†àª²BB": -8571484181158525797,
- "Lâ¦o#J|\"⽩-ã±¢d㌛8d\\㶤傩儻E[Y熯)r噤὘勇 }": "e(濨쓌K䧚僒ã˜è ¤Vᛸ\"络QJL2,嬓ì™î¿‰ä¼¢ã‹’䴿考澰@(ã¾`kX$ë‘ÑE斡,èœ&~y",
- "vj.|统圪ᵮPL?2oŶ`ë°§\"勃+0ue%⿥绬췈체$6:qaë Q;~晘3㙘鹑": true,
- "à·Ø™4ç„â¶¿c︋iâš…:ã‚“é–Ⳙ苆籦kw{䙞셕pCì·ƒê¬âœêŸ¯êš“é…„bížhwkê­­M鬋8B耳쑘WQ\\å™ac'唀x᪌\u2048*hì§Ž#á‡é® ë¾áž¿ë€Œ": false,
- "⎀jꄒ牺3Ⓝ컴~?親ꕽã¼Ü“å–瘘!@<튋ãŒê¿±â©¦{a?Yv%⪧笯Uܱ栅Eæši뚬:ꄃx7䙳ꦋ&䓹vq☶Iä˜á¾˜æ¶œ\\ì‰ëºŒLr%Bcãœ3?î¤ï…¨ê­ç ¿è£ž]": null,
- "⭤뙓z(㡂%亳K䌽꫿AԾ岺㦦㼴輞낚Vꦴw냟鬓㹈뽈+o3譻K1잞": 2091209026076965894,
- "ㇲ\t⋇轑ꠤ룫X긒\"zoYì‡í¬wjæ¢ì‘l侸`e%s": -9.9240075473576563E17,
- "啸ꮑ㉰!áš“}éŠ": -4.0694813896301194E18,
- "ï‰>]囋੽EK뇜>_ꀣ緳碖{ì裔[<ನ\"䇅\"5L?#îµ³xTwv#ç½\u0005래t应\\N?빗;": "v쮽瞭pë­ƒ"
- }
- ]],
- "æ–´æ§¾?Zç¿\"~æ…弞ﻆ=꜡o5é‹ï’½dw\"?Kè ¡i샾ogDï²°_C*⬟iㇷ4nયèŸ[㟉U꽌娛苸 à§æ“贻洞펻)쿗૊許X⨪VY츚Zä¾ã¶­~튃ᵦ<\/E臭tve猑x嚢": null,
- "锡⛩<\/칥ꈙᬙè€&êšç±¬â– 865?_>Lè©ì¿¨äˆŒæµ¿å¼¥ï©‰Ì«î¾½ï‘lj&zx<\/C쉾?覯n?": null,
- "꾳鑤/꼩ï¨d=ᘈn挫ᑩ䰬ZC": "3錢爋6Ƹ䴗v⪿Wr益G韠[\u0010å±—9ì¡é’u?殢c䳀蓃樄욂NAq赟c튒ç˜ë ¶î‚³Aà«¡Éšæ"
- }
- ]
- ]
- ]}
- ]
- ]
- }]]]}}
- ]}],
- "ï‚’Ejä—³U<\/Q=ç’샎䞦,å °é  @褙g_\u0003ꤾfâ¶½?퇋!łB〙ד3CC䌴鈌U:뭔咎(Qો臃䡬è‹BO7î¼§ã¢äŸ¸\"Yb": 2.36010731779814E-20,
- "逸'0å²”j\u000e눘먷翌C츊秦=ꭣ棭ှ;鳸=麱$XP⩉駚橄A\\좱⛌jqvä°ž3Ь踌v㳆¹gT┌gvLBè³–ïžçƒ¡m?@E঳i": null
- },
- "曺vì°˜×?&绫OáŸ": 9107241066550187880
- }
- ]
- ],
- "(e屄\u0019昜훕ç–b蓘ᬄ0/۲묇Z蘮á€â¨è›˜èƒ¯ë¢ƒ@㘉8ሪWᨮ⦬ᅳ䅴HIá‡ì¨³z囕陻엣1赳o": true,
- ",b刈Z,á æ™Tì†Å•B⩆ou'í¼â‰ƒç»—é›—dè­Š": null,
- "a唥KB\"ï³è‚•$u\n^â…„P䟼냉䞸⩪u윗瀱ꔨ#yÅŸsî««ê’¬=ï‹•1ïš–|ﲤ爢`tà±íмî£ì³«_Az(Ṋ擬㦷좕耈6": 2099309172767331582,
- "?ã´¸U<\/䢔ꯡ阽扆ã¤qé‹?f㔫wM嬙-;UV죫嚔픞G&\"Cá—äªí’ŠQ": "VM7ç–¹+陕枡툩窲}ç¿¡ä–¶8欞ÄsTë®}ç’¤:jﺋ鎴}HfAàµâ§»Zd#Qï¬u茅J髒皣Y-︴[?-~쉜vë”璮㹚䅊﩯<-#\u000eê±€h\u0004u抱﵊㼃U<㱷⊱IC進"
- },
- "숌dee節é½é‚ºp넱蹓+e罕U": true
- }
- ],
- "b⧴ë£??á” 3ã±>%郿劃ç¿ê¬ê ›Wï¡°çž³á«ëˆ„躨狀ໄy੽\"ីuS=㨞馸k乆E": "トz݈^9R䬑<ﮛG<s~<\/?ⵆá¥è€ç†·uë“·"
- }}
- ]
- }
- ]}
- }
- }
- }
- }},
- "宩j鬅쳜Qê–јyç”Zá­µï1væ“–}䨿F%cֲ᫺贴m塼딚NP亪\"ï¿‹sa뺯ꘓ2:9뛓ï à¼‚쌅䊈#>Rꨳ\u000fTT泠纷꽀MR<CBxPñ±’«X쇤": -2.22390568492330598E18,
- "?䯣ᄽ@Z鸅->ᴱ纊:ã ­ë³®?%N56%鈕1ä—äœaä²—j陇=ë¿»å‚衋࿘ᓸ?ᕵZ+<\/}H耢bä€z^f$&ã’LkꢳI脚뙛u": 5.694374481577558E-20
- }]
- }
- ]],
- "obj": {"key": "wrong value"},
- "퓲꽪m{ã¶©/뇿#â¼¢&᭙硞㪔E嚉c樱㬇1aç¶‘á–DḾä©": null
- },
- "key": "6.908319653520691E8",
- "z": {
- "6U閆崬밺뀫颒myj츥휘:$è–ˆmYí–š#rzé£+玭V㭢뾿愴Yî°‘ê–šX亥ᮉ푊\u0006åž¡ã­ë£\"厓ᔧḅ^Sqpv媫\"⤽걒\"˽Ἆ?ꇆ䬔未tv{DV鯀Tἆl凸g\\㈭ĭ즿UH㽤": null,
- "b茤z\\î¨.N": [[
- "ZL:ᅣዎ*Y|çŒ«åŠæ«•è¾Oj为1糕쪥æ³S룂w࡛á²â¸¥èš™)",
- {
- "\"䬰á»wDæ¾V`邀⠕VDãºsH6[칑.:醥葹*뻵倻aD\"": true,
- "e浱uî¿£p蔽Crà· JK軵xCʨ<뜡癙Yç©ï½¹é½ˆX/螗唻?<蘡+뷄㩤쳖3å‘犾&\\첊xzå崦ݻé´\"åµ¥B3㰃詤豺嚼aqJ⑆∥韼@\u000b㢊\u0015L臯.샥": false,
- "l?Ǩ喳e6㔡$M꼄I,(3á縢,䊀疅뉲B㴔傳䂴\u0088㮰钘ꜵ!ᅛ韽>": -5514085325291784739,
- "o㮚?\"춛㵉<\/﬊ࠃ䃪ä£wp6ἀ䱄[s*S嬈貒pᛥ㰉'ë€": [{
- "(QP윤懊FI<ꃣ『䕷[\"ç’å¶®?%Ḭå£à²»ä‡Ÿ0è¤!è—²ë¹bdæµ¶tl\u2049#쯀@僞": {"î—i妾8홫": {
- ",Mï£ë§ƒäž›K5nAㆴVNã’Ší–¬$n꩑&êŽæ¤žî·é˜«?/á¹ì„¸ë‰ª1x쥼㻤㪙`\"$쟒薟B煌܀ì¨à­2掳7㙟鴙Xå©¢\u0002": "Vዉèˆï ’᧷⦌kîŒï®žà°ˆnz*<?੃'ahhCFX(\u0007⮊Eã­ä±¾Gxꥩrâ£.æ´Ž",
- "ë»´5bDDí¯O傆盓왻U?êž…êŠNé­á§¢Ï„\"迳豲8\u001b䃥ꂻ䴺ྸHç­´,": {
- "\"L鸔SE㬡XV&~ÍŽ'놅蔞눶l匛?'.Kæ°\\ƢẨ疇má¿›'ê½³&!é¹ m'|{Pç—Š ç§„ì’¿u\u00111ä‹§î´¼gÏ©x7t丗D䊨䠻z0.A0": -1.50139930144708198E18,
- "8é‹‚ë›·ïž”?ì²’B☚>ï·œFM\"è­7ê€-VR<\/';ä™E9$䩉\f @s?íªo3^è¡´cî˜à¶Žä§ªaK鼟q䆨c{ä³ 5mᒲՙ蘹ᮩ": {
- "Fã²·JGoâ¯Pëµxë’³p䘧☔\"+ꨲå¿JfR㔹)4nç´¬G练Qáž!C|": true,
- "p^㫮솎ocî’£.೚A㤠??r\u000f)⾽⌲們M2.䴘䩳:⫭胃\\á¾@Fá­Œ\\K": false,
- "蟌Tk愙潦伩": {
- "aï‘<\/@ᾛ慂侇瘎": -7271305752851720826,
- "艓藬/>á„ṯ,XW~㲆w": {"Eç—§î–郶)㜓ha朗!N赻瞉駠uC\u20adè¾ <Ve?í±!ImäŽî­Ÿæ„:*s 9諚Prᵾ뒰髶B̌qWA8梸vS⫊⢳{t㺲q㺈랊뮣RqK밢쳪": [
- false,
- {
- "\u000b=>x퓮⣫P1à «LMMX'M刼唳ë¤": null,
- "P쓫晥%k覛ዩIUᇸ滨:å™í˜²lMR5䋈V梗>%å¹½ué –\\)쟟": null,
- "eg+昉~矠䧞难\b?gQì­·ç­\\eê® Nl{ಢ哭|]Mn銌╥zê–˜zⱷ⭤ᮜ^": [
- -1.30142114406914976E17,
- -1.7555215491128452E-19,
- null,
- "渾ã¨ß牄귛r?ëŒ?w[âšžÓ»~廩輫㼧/",
- -4.5737191805302129E18,
- null,
- "xyà¿‘M[ocì…’ç«“â’ºx?뜓y䊦>-Dì¼(&&?XKkc꩖ﺸá‹ëµžK伕6à§€)딀PæœyWæ™îž¢?훻魢傎EG碸9類៌g踲C⟌aEX舲:z꒸许",
- 3808159498143417627,
- null,
- {"m試\u20df1{G8&뚈h홯J<\/": {
- "3ஸ厠zs#1K7:rᥞoꅔꯧ&ë‡éµ¼éž«6è·œ#赿5l'8{7㕳(b/j\"厢aqç±€êš\u0015厼稥": [
- -2226135764510113982,
- true,
- null,
- {
- "h%'ë§žï–±Sì‹…Hs&dï”l슾W0jé¿M×D놯L~S-㇡Rì­¬%": null,
- "⟓咔謡칲\u0000孺ꛭx旑檉㶆?": null,
- "æ‡I転;￸B2Y`z\\ç“w,ë†æ¿æ’埵䂄)!ä¶¢D=à´­ã´ŸjyY": {
- "$ࡘt厛毣ൢIèŠ<겿骫⫦6tr惺a": [
- 6.385779736989334E-20,
- false,
- true,
- true,
- [
- -6.891946211462334E-19,
- null,
- {
- "]-\\êŸ1/è–“â§á½Š\\l牑\u0007A郃)阜ᇒᓌ-塯`W峬G}SDb㬨Q臉⮻빌O鞟톴첂B㺱<ƈmu챑J㴹㷳픷Oㆩs": {
- "\"â—‰B\"pᶉt骔J꩸ᄇá›iâ•°æ ›K쉷㉯é©!ãˆnì¹äŸ…難>盥yé“¿eà­”è’M貹ヅ8å˜‹í€¯ä‰¶áŒ¥ã¢æ®Šë»³\"絧╿ꉑ䠥?∃蓊{}㣣Gk긔H1哵峱": false,
- "6.瀫cN䇮F㧺?\\椯=ÚˆT䘆4â˜ïšŒ8qv": -3.5687501019676885E-19,
- "Q?yऴr혴{஀䳘p惭f1ﹸ䅷䕋贲<ྃᄊ繲hq\\b|#QSTî“¶s1c-7(äµ¢\u2069åŒçµ˜ê¯‰:læ¯´ï›æ±žt戀oà·Ÿáµ¶ë®±á£-醇Jx䙬äí–¢0࣫á¡grã„›": "\u0011_xM/蘇Chv;dhA5.嗀绱V爤ﰦiëµ²M",
- "â‘[\"ugoy^儣횎~U\\섯겜ï¥l2jw஌yD腅̂\u0019": true,
- "ⵯɇä²á«¿à¢š!㯢l샅笶戮1꣖0Xe": null,
- "劅fë„€ï‹ï§¼bå®ç„ŠE찓橵G!ʱç“뭔雩괛": [{"p⹣켙[q>燣äƒãž½î›œá©²x:쓤삘7玑퇼0<\/qç’‚á‘[ï ™Z\\3䅵䧳\u0011㤧|妱緒C['ì·“Yꞟ3Z鳱雼P錻BUì”§U`ᢶg蓱>.1Ó§è­«'L_5VäµÐ¦": [
- false,
- false,
- {"22ä‚盥N霂얢<F8î±ê¼µ7Gà°¸yhë€g᦭ꄢx硴嬢\u001a?Eê´†T|;7犟\"Wt%ä©O⨵t&#ᬋK'èœá²«æ”⾠鲂Të©·éƒ\u0018䓞cE": {"f=ä츜瞾zw?å­¡é£\\铀᫞yẆg(\u0011M6(s2]`ਫ": [[[{
- "'y몱纣4S@\\,i㷯럹Ua充Tᣢ9躘Zଞ쥿äŠs<\/刎\\\"뉦-8/": "蜑.X0꭛낢륹iì ¨êš<8?s볕è¡|Q✬᯦@\\G㑢屿Mn졾J굤⥟JW뤵苑rì•툄嵵?â¾¥O",
- "^1挲~[n귆誈央碠멪gI洷": -8214236471236116548,
- "sሣ%娌暡clr蟜㑓2\u000bSâŸ_X㨔⚴5~蔷ꀇ|Xu㬖,꤭å¹îµ¿r(g믇ì©ïЍ%췸앙|æ £U\\2]䤉+å• è¡ê¯ŽT鉹m\n/`SzDᅼ鞶": 1.1217523390167132E-19,
- "u톇=黚\\ ꂮ췵L>躰îe9â‘©_뵜斌n@B}$ê´»Yá±@ä§‹î´½V\"☒-諯cVë¯Ê ": true,
- "Ű螧ᔼæªéŽë•’딜qꄃH뜣<ç§à¥‚CYå“â¸>XQ㵡趌oë¬k픀빯a(ܵç”ë†à­¯/6Nᪧ}æšá†šì§ŒP牰泱鈷^d꣟#Lì‚€\"㕹襻;k㸊\\f+": true,
- "쎣\",|⫝̸阊x庿k잣v庅$éˆê´Žç‚”k쬪O_": [
- "ìž©AzZGz3v愠ꉈⵎ?㊱}Så°³à¯p\r2>ì·IP䘈M)w|\u000eE",
- -9222726055990423201,
- null,
- [
- false,
- {"´킮'뮤쯽Wxè®V,6ᩪ1ç´²aႈ\u205czD": [
- -930994432421097536,
- 3157232031581030121,
- "l貚PY䃛5@䭄<nW\u001e",
- [
- 3.801747732605161E18,
- [
- null,
- false,
- {
- "": 4.0442013775147072E16,
- "2J[sᡪ㞿|n'#廲꯬乞": true,
- "B[ç¹°`\\ãa̼㨀å›ã½“<\/꥖ᵈO让\r43⡩徑ﬓ๨ﮕx:㣜oçŽê‰Ÿã¢Cçµï›‰á½†á“žì‡“Qs氯였9é§µq혃Ljê‚”<\/昺+tä‹à¼»çŒ™c沪~櫆bpJ9Uá:칣妙!çš—F4㑄탎䕀櫳振讓": 7.3924182188256287E18,
- "H磵ai委曷n柋T<\/å‹¿F&:ꣴfU@㿗榻Lb+?í„sp\"᪟~>ê·»m㎮ç¸fî§¡": 1.0318894506812084E-19,
- "࢜⩢Ш䧔1肽씮+༎ᣰ闺馺窃䕨8Mƶqè…½xc(៯å¤J5굄ä•Qj_훨/~価.䢵慯틠퇱豠㼇Qﵘ$DuSp(8Uà¸<\/ಟ룴𥳐ݩ$": 8350772684161555590,
- "ㆎQ䄾\u001bpᩭ${[諟^^骴᤮b^ㅥI┧T㉇⾞\"绦<AYJ⒃-oF<\/蛎mm;obh婃ᦢ": false,
- "䔤䣈?æ±.p襟&dã±…\\Jᚠ@?Oì²à¢½íœ”VR蔩|㒢柺": [[
- "-ꕨ岓棻r@鿆^3~䪤Ѐ狼︌ﹲ\\á¸MlEìµ Q+",
- null,
- false,
- 3346674396990536343,
- null,
- {
- "": null,
- "/ä¨S쨑,&繷㉥8C엮赸3馢|뇲{鄎ꗇqFﶉ雕UD躢?Ꟛအï–꽡[hᕱᗅ㦋쭞MユèŒ?L槽암V#성å”%㣕嘵\\Ú¹(å˜èº¿&q": [
- -1364715155337673920,
- false,
- -8197733031775379251,
- "E팗鮲JwH\\觡܈áœ\"+뉞娂N휗vå™™á‚ê¹¼\u001dD帒l%-æ–”N",
- -3.844267973858711E-20,
- [{"쬯(褈Q 蟚뿢 /ⱖ㻥\u0017/?v邘䃡0U.Z1î­­x?鯔Vå° 8Emï•<": [[[
- null,
- [
- null,
- -5841406347577698873,
- "í‚·\"S⋄籞繗솸ᵣ浵w쑿ퟗ7náŽx3ì•™z㘌쿸I葥覯ã¬0á†b汆狺뷘ႀnꋋ",
- -1227911573141158702,
- {
- "u㉮PᾺV鵸A\\g*à¡—9슟晭+ͧↀ쿅H\u001c꾣犓}癇æ›á—¬é»©äŸ˜X梑é†e>rä°‚f矩'-î½7ä¡­æ¡¥Dz兔V9è°¶å±…ãºá”Šä©¯ë².\u001eL0ὅㅷ釣": [{
- "<쯬Jå·^숞u࠯䌗艞R9닪gã¾ë³Ža䂈歖æ„:%é”|ﵤ|y}î¡»>;2,覂⶚啵tb*ä»›8ä¹’ã“¶B࿠㯉戩oX 貘5V嗆렽ë‚߼4hä§›êºM空\\b꿋貼": 8478577078537189402,
- "VD*|吝z~h譺aᯒ": {
- "YIì·¢K<\/濳xNne玗rJo쾘3í•°é´Š\"↱AR:ࢷ\"9?\"è‡ï¦¡)?誚êŠe)_D翾W?&F6J@뺾ê°NZ醊Z쾈വHï±å¶¿?炫㷱鬰M겈<bïž²S}㎥l|刖k": {"H7鷮퇢_k": [
- true,
- "s㟑瀭좾쮀â‘î¬Yì°ºk맢戲쀸俻àº6å„®ë—æ‰–puߖꜻ馶rꈞ痘?3ྚ畊惘䎗\"vv)*臔웅鿈䧲^v,껛㰙J <áš¶5",
- 7950276470944656796,
- 4.9392301536234746E17,
- -4796050478201554639,
- "yꬴc<3㻚",
- "oå¡\u20a4蒵鮬裢Cá´§nBã­±f.",
- false,
- [
- false,
- "ã¡å¼‘V?瀆䰺q!출㇞yᘪ꼼(IS~Ka 烿ꟿ샕桤\u0005HQҹ㯪罂qè¾âš‡æ‡‹â¦•ë‘¡v",
- 1862560050083946970,
- "\u20b6[|(ë­¹gê’펉O轄Dl묽]ﯨ髯QEbAã’¾m@롴礠㕓2ë•«n6ْ엘঵篳R잷꙲m색摪|@ã¿«5aK设f胭r8/NI4ì¶«æ µ\\꯬2]",
- false,
- {
- "\u000b7*ã™›ç‡.~?䔊pæ•e_拺艿ë·f{ê”»1sé©™`$Ė戧?q⋬沭?å¡·á­šè¹€unoa5": {
- "Sê·¯o紞㾕ᅶä¾î—¶éЇ12|ÊŸç•´ï–iNAo?|Sw$M拲գ㭄紧螆+,梔": null,
- "ã­š0?xB疱敻ேBPwv뾃熉(Ó pJ]ê°¢\"Bj'\u0016GE椱<\/zgៅx黢礇h},M9ï´¦?LḨ": "Si ïŸB%~㬒E",
- "핇㉊살ã¢ìˆ¨~ȪRo䦅D桺0z]﬽蠆c9ᣨyPP㿷U~ãž?쯟í¸å®’뉆U|}㉓郾ࣻ*櫎꼪ä—s?~7\u001e㘔h9{aáž‹}:ã¶’P8": [{"\\R囡ì¬nNæŸ‹çØ›7ì¹¾ :㶃衇徜V æ·±f1æ·â™ i?3Sè§’íž^ᆞ\u20e8á¹°D\u0007ç§¡+躒臔&-6": {
- "䨑g.fhã”—=8!\"狿ൻLU^ë»±g䲚ã»'W}k欤?๒鲇S꧗䫾$ĥ피": -794055816303360636,
- "外頮詋~텡竆î™ç¹ƒä©è‹¨ë¾ºæœê¼ƒç˜¹f*㉀枙NH/\u2027ê¢}j묎ïƒvペq︉ì‹ëœ¡Od5 N顯ି烅仟Qfㆤ嚢(i䬅c;ë§§?嶰㩼츱ç¡?-": {
- "e݆ã¡â¬¬î›–'2ã»’?U篲鿄\"隻Ҭ5NꭰꤺBꀈ拾᩺îº[刯î…5곑Na램ﴦ዆]ã“qwé’„\u001b\"Yæ´Šä—¿î¼ç¥å¡¥è¿µ[⼞⠳P$ê ±5먃0ï¦`": [{"ç°Eè³ï«šb먭N긆Ⰹå²2逶ꜛ?H짉~?P}jj}ä¾·ç¿_T>á­¨b,â»éˆµP䕡䀠८ⱄ홎鄣": {
- "@?k2é¶–ã‹®\"Oರ K㨇廪儲\u0017ä¾î¿‚J?);\b*묀㗠섳햭1MC V": null,
- "UIICP!BUA`î€á¢ˆã‹¸~袩㗪⾒=fBï®´l1ꡛ죘R辂여ҳ7쮡<䩲`熕8é ": 4481809488267626463,
- "Y?+8먙ᚔ鋳蜩ï–럶1㥔y璜౩`": [
- null,
- 1.2850335807501874E-19,
- "~V2",
- 2035406654801997866,
- {
- "<숻1>\"": -8062468865199390827,
- "Mã¿£ï€E]}qwG莎Gná¶(ê”™\\D⬲iꇲs寢t駇S뀡ꢜ": false,
- "pê¤ãŽ9W%>M;-Uç’fî£(^j1?&RBéš§ å¿“b똊îƒE": "#G?C8.躬ꥯ'?냪#< 渟&헿란zpo왓Kj}é·§XﻘMツbä•–;㪻",
- "vE풤幉xz뱕쫥Ug㦲aH} ᣟp:鬼Yá°Ÿ<Fɋ잣緂頒âºä‰²ç‘‘ä…‚,C~Þ…G!f熢-B7~9Pqà¡¢[츑#3ꕎ,Öඳèâ©…ãµ§ì¶€ë¿xyäŒÍ‚tdj!箧᳆|9èš¡ë¬": -2.54467378964089632E17,
- "䵈䅦5ë¹–,궆-:໿댾仫î»0ᙚyá¦hqáš„": null,
- "侯Y\"湛졯劇Uì…ŽYXçâ…¸2ä¼´|ç­§\\ä’ã¶¶á·ì‘WaᦵᗱãœëŠ¾è† <Jc63<G\u20fe䇹66僣k0O\"_@U": null,
- "姪y$#sæ¼´JH璌Ӊ脛Jã¾íŽ”ï¹´oꈶ㚸PD:薠ì–%說ážè¹‚1]⾕5튄": {
- "á¾Huw3䮅如쿺äŸå«]<鰨ݷ?꯯䫓傩|á¶à·ƒåª½\\澒≡闢": "Mm\"ì‡á¯„졽\"楇<\/ꥆí­å±€néš´@é¿£wâ Š4Pï«å¾ŽW㊋;䤞'.팇è’ä¡´egpxå—Žwà®…ç—å ®á›nË︖䀤4å™™?໚éƒá±‹Þ˜à¥Žtæ‘姫籕殥ï­é™ƒ\"4[ê¬qL4Wê Žx",
- "ℇjéŒïš›5Bë’š\" U": "ç¡„ê˜{憠êµ:&t䌨m Cઌ쿣鞛XFê Ÿsä­ï¶ƒ\"æ ¼a0x闊昵å²L\\æšèˆaê¸j싹ç…\"î ²çŸï±¡é¦†*êµ–ç³ <ê”躎",
- "톌賠弳êŸb\"èž–X50sĶ晠3fç§‚å¯Iⓟ:è˜": 5.573183333596288E18,
- "%䴺": [[[[
- -6957233336860166165,
- false,
- null,
- {
- "\"ïŸ\\௮茒袀ᕥ23ୃ괶?䕎.嚲◉ãžL+ᵡ艱hL콇붆@": null,
- "%螥9ꭌ<\/-t": true,
- ",9|î«è€¢æ¤¸ä“Xk죱\u0015$Ώ鲞[ï’—?ì—¢á²í˜ªì¦ˆâ´‚â–‚â„´ã—¯\"gî´ëº˜\\êœ#\u0002ヮ}ሎ芲P[鹮轧@냲䃦=#(": 2.78562909315899616E17,
- "R?H䧰ⵇ<,憰쮼Q總iR>H3镔ᴚ斦\\é‘r*2橱Gâ¼”F/.j": true,
- "RK좬뎂aí™ f*f㱉á®â¦‹æ½™ã¨‹Gu곌SGI3Ië¿\\F',)t`è蘯囯ﮉ裲뇟쥼_ገ驪▵æ’ᕤV": 1.52738225997956557E18,
- "^k굲䪿꠹B逤%F㱢漥O披M㽯镞竇霒i꼂焅륓\u00059=皫之눃\u2047娤é–銤唫á•b<\/w踲䔼u솆맚,ä’á³'/it": "B餹饴is権ꖪ怯ꦂẉဎt\"!凢谵⧿ï™0\\<=(uLä·åˆ¨ì‘ª>俆æ“Cy襸Q힆䆭涷<\/á±0î É§îŠ‹䗾䚹\\ኜ?ꄢᇘ`ä´¢{囇}᠈䴥X4퓪檄]ꥷ/3謒ሴn+gé¨X",
- "GgG꽬[(å«“ëª6\u0004ê¶宩㙻/>\u0011^è¾dTè…ªhxÇ‘%ꊇk,8(Wâ§‚çµP鬜O": [{
- "Mã´¾c>\\ᓲ\u0019V{>ꤩ혙넪㭪躂TS-痴໸闓âµ/徯O.Mã¥Ê·D囎⧔ì³íœ¤T??鉬뇙=#ꢫ숣BXä­¼<\/d똬졬g榿)eꨋﯪ좇첻<?2K)": null,
- "Z17縬z]愀䖌 ᾋBCg5ë”’êµ­æ†ê¾“aâ²·í„·u:U촳驿?雺楶\u0001\u001c{q*á°—è‹‘B@kæ°z.*è“—7ረIm\"Oá±@7?_": true,
- "㺃Z<": -4349275766673120695,
- "휃䠂fa塆ffixKe'ë¬é—੄뺾w࠾鑎kë•¢m*á‚‘î§·í–žé®6攊&虜h黚,Yä±³Sﭼ둺pN6": [
- false,
- "IΎ䣲,\"ᬮ˪癘P~Qlnxå–Sᮔ༬˨IçŒm䜛酛\u0003iê¸ã¦§cQ帲晼D' \\(粋ï›wQcN\\ëµ°è·ˆ",
- [
- "D0\\L?M1ì¥KaêŒsd+盌귤憊tz䌣ëŒ×‘Oå‚wÏ¢%á½’gpî•—,Aiï™âŽ§á¶†Iî«˜é¤¾ê¦æ£©å˜…᳉怴%m]á¶is纖D凜镧o심b Uî»·",
- {
- "?଼\u0011Rv&^[+匚I趈T媫\u0010.䥤ᆯ1q僤HydⲰl㒽K'ᅾiౕ豲초딨@\u0013J'쪪VD౼P4Ezg#8*㋤W馓]c쿯8": false,
- "c/擯X5~JmKäµ¶^ìŽà´š|B|u[ì†(X뚤6v}W㤘⠛aR弌臌쾭諦eⒷ僡-;㩩⭖ⷴ徆龄갬{䱓ᥩ!ï¯âŠšá‡¨<v燡露`:볉癮꨽り★Ax7Ꮀ譥~舑\\Vê‹\"$)v": "e&sFF쬘OBï–†d슊寮f蠛জ봞mn~锆竒Gè„\"è¶µG刕䕳&L唽붵<\/I,X팚Bâ¥î¼¶X,kԇҗ眄_æ…¡:U附ᓚAè•§>\u001a\u0011\";~쓆BH4勿”Š7힪",
- "iT:L闞椕윚*æ»›gI≀Wਟඊ'ꢆ縺뱹鮚Nê©á§¬è•¼21줧\\䋯``â\\ã±é³¨": 1927052677739832894,
- "ì®ç¼¦è…ƒg]礿Y㬙 fî¼ãƒºSɪ꾾N㞈": [
- null,
- null,
- {
- "!t,çY 1䗉罵?c饃호䉂Cá­ì’˜z(즽sZG㬣sഖE4ï‚뢜㓕äžä¸®Qpç°6EZឪ겛fx'ꩱQ0ç½£i{k锩*㤴㯞r迎jTⲤ渔m炅肳": [
- -3.3325685522591933E18,
- [{"ã“5]A䢕1룥Bï²C?Ꙍ`r룔Ⳛ䙡uä¼²+\u0001àµo": [
- null,
- 4975309147809803991,
- null,
- null,
- {"T팘8Dﯲ稟MM☻㧚䥧/8ﻥ⥯aXLaH\"顾S☟耲ît7fSà·‰ë†ë®”/ꕼ䓈ìº4\\霶䠴ᩢ<\/t4?죵>uDï›5➶༆쉌럮⢀秙䘥\u20972ETR3æ¿¡æ†vB? ~鸆\u0005": {
- "`é––mç’㥉b뜴?Wf;?DV콜\u2020í‰à±“æ“å®ZMj3mJ먡-å‚·ë±™yח㸷꥿ ໘u=Mì!5å­L4v\\?ÇŽ7C홫": null,
- "|": false,
- "~Ztᛋ䚘\\æ“­ã—傪Wé™–+ã—¶qᵿ蘥ᙄp%䫎)}=â ”6ᮢS湟-èž¾-mXH?cp": 448751162044282216,
- "\u209fad놹j檋䇌ᶾ梕ã‰bוּ<dä—±:줰Mé…„\u0000X#_rç¢A饓ê—ÙKo_è·”?ᪧ嵜鼲<": null,
- "ꆘ)ubI@h@洭Ai㜎ä±k\u0003?Tä‰3é—´%j6jæ£j=â\\U毮ᬹ*8䀔v6cpjâ­¬~Q꿾뺶ï‰íŽµæ‚¡!ì©­åŽl六㽫6퇓ޭ2>": {"?è‹´ê© D䋓帘5騱qï±–PF?☸ç—é¡’yU á¡«cb䫎 S@㥚gꮒ쎘泴멖\\:Ié®±TZ듒ᶨQ3+f7캙\"?\fí’¾\\oæžç´Ÿï»½M.âŽï˜¸é‘OP": [
- -2.6990368911551596E18,
- [{"ä’–@<á°¿<\/⽬tTrè…ž&G%᳊秩蜰擻f㎳?Sãµ§\r*k뎾-乢겹隷j軛겷0ë£é®ï µ": {")DO0è…¦:ì¶é€¿:1㥨่!è›æ¨‹2": [{
- ",ꌣf侴笾m๫ꆽ?1?U?\u0011ꌈꂇ": {
- "xæ—ç” nVqä…¦w`CD⦂惺嘴0I#vỵ} \\ê·‚Së´Dì–¾?Ô’j溯\"v餄a": {
- "@ç¿™c⢃趚痋i\u0015OQâlqë†Y0pࢥ3쉨䜩^<8g懥0w)]䊑næ´ºo5ì­QL댊랖L镈Qnt⪟㒅십q헎鳒⮤眉ᔹ梠@O縠u泌ㄘb榚癸Xî©­Þ”Ftj;iC": false,
- "I&뱋゘|ï£è“”䔕측瓯%6á—»HW\\N1貇#?åƒá—œghá­ªo'䗈꽹Rcìš/蔳迄à¼!0邔䨷푪8ç–©)[쭶緄㇈୧á": {
- "B+:ꉰ`sì¾­)ë¹¼Cç¾A䫊pMgjdxäHf9᥸W0!C樃'ï¤f䫤סи\u0017Jve? è¦f둀⬣퓉Whk\"஼=չï³î•¤çš†ç¬BIW虨쫓F廰饞": -642906201042308791,
- "sb,XcZ<\/m㉹ ;䑷@c䵀s奤⬷7`ꘖ蕘戚?Feb#輜}p4nH⬮eKL트}": [
- "RK鳗z=袤Pf|[,u욺",
- "Ẏá»ç½¯ë‰‹âº–锅젯㷻{H䰞쬙-ì©“D]~\u0013Oã³¢gb@æ¶è”‰|kᦂâ—!\u001ebMè¤sca쨜襒y⺉룓",
- null,
- null,
- true,
- -1.650777344339075E-19,
- false,
- "☑lꄆs힨꤇]'uTന⌳ë†].1â‹”ê´æ²°\"IWà´©\u0019æ°œ8쟇䔻;3衲æ‹,窌zíŽå–íš—?4?Cë„é—®?ᥙ橭{稻Ⴗ_ì”",
- "n?]讇빽å—}1å­…9#ê­¨é¶v\u0014å–ˆ)vw祔}룼쮿I",
- -2.7033457331882025E18,
- {
- ";⚃^㱋x:饬ኡj'ê§µT☽O㔬RO婎?향ᒭæ©$渣y4i;(Q>꿘e8q": "j~錘}0g;Lèº*;á•­ê„®0l潛烢5H▄쳂ê’ï­‹ê™¶T犘≫x閦웧v",
- "~î¢æ¯\u2018c4è·ë E~ᑅቚꈂ?nq뎤.:æ…¹`F햘+%鉎Oç€œìŸæ•›è®âŒæµ¢<\/㮺紿P鳆ࠉ8I-o?#jﮨîŸ7v3Dt赻J9": null,
- "à£W䌈0êŽqC逖,íš…î·Žcáƒswj;jJSæ«5æ§—OaB>D踾Y": {"ã’°äµF%î©®?59.î„„ãˆcᕨï†í•틎á¸ã‹©B=9IÛⓌ{:9.ywï½å‘°ã†®è‚’᎒tIã¾´62\"ዃ抡C﹬B<\/<EO꽓ᇕu&é‹«\\禞í¹uê’.7훯ಶ2䩦͉ᶱf깵ᷣ늎": [
- 5.5099570884646902E18,
- "uQNæ¿¿m臇<%?谣鮢s]]x0躩慌闋<;(î³¥ 鋤.0á µd1#벘a:Gs?í–·'.)ㅴ䞟ç¯å´ˆFS@O㌛ᓬ抢íŒáž¾ëƒ·ì¿Ÿíˆ¥IZn[惵ê§3ë™[&v憙J>ì´‹jo朣",
- [
- -7675533242647793366,
- {"ᙧ呃ï£:[㒺쳀쌡ì‚H稈㢤\u001dá¶—GG-{GHྻຊꡃ哸䵬;$?&d\\⥬ã“Nåœ´ë¤æŒ¨-'ê•®$î“‹PU%?冕눖ié­q騎Q": [
- false,
- [[
- 7929823049157504248,
- [[
- true,
- "Zè™\u0017'eꕤ᱕l,0\\X\u001c[=雿8è ¬L<\/낲긯W99g톉4ퟋbãº\u0007åŠ'!麕Q궈oW:@XáŽïœ¬z蘻m絙璩귓죉+3柚怫tSæ‡è’£ä -æ“¶D[0=퉿8)q0ÙŸ",
- "唉\nFA椭穒巯\\䥴䅺鿤S#bè¿…ç˜ ï¶—ê¬˜\\?q1qN犠pX꜅^䤊⛤㢌[⬛휖岺q唻ⳡí‹\"ã™™Eh@oA賑㗠yå¿…Nꊑᗘ",
- -2154220236962890773,
- -3.2442003245397908E18,
- "Wᄿ筠:瘫퀩?o貸q⊻(᎞KWf宛尨h^残3[U(='橄",
- -7857990034281549164,
- 1.44283696979059942E18,
- null,
- {"ꫯAwè·­å–€ ?_ï““9\"Aty背F=9缉ྦྷ@;?^鞀w:uN㘢Rá»": [
- 7.393662029337442E15,
- 3564680942654233068,
- [
- false,
- -5253931502642112194,
- "ç…‰\\îš¶î¶è¾Žî›¢à³†ç½5â’­1äªäƒ‘s䎢:[e5}峳ﴱn騎3?è…³Hyêƒè†¼N潭錖,Yá‹ËœYAá“㬠bG렣䰣:",
- true,
- null,
- {
- "⒛'P&%죮|:⫶춞": -3818336746965687085,
- "钖m<\/0ݎMtF2Pk=瓰୮洽겎.": [[
- -8757574841556350607,
- -3045234949333270161,
- null,
- {
- "áœî…½rè¼³>⫇9hU#î¦#w@ê·ªA\\Cî’¢ é‹ºã˜“ê–æ¢’뒬묹㹻+郸å¬ìœ¤'+g<\/碴,}ꙫ>ì†;情d齆Jä¬àº©æ’›ì±íƒ¹/R澡7剌tꤼ?ặ!`â²ç¤\u00002똥଴âŸ": null,
- "\u20f2ܹe\\tAê¥Æ°\\x当뿖ï»ë ‰ç¦›;G檳ﯪï…Sà«°3~㘠#[J<}{奲 5箉⨔{ë†<\/釿抋,åš /曳m&WaOvT赋皺璑ï“í…": [[
- false,
- null,
- true,
- -5.7131445659795661E18,
- "è­m䓪D5|3å©à°ž>î‰è ‡æ™¼6nï´ºPp禽羱î¤DS<ç“닫屚ì‚å§¿",
- true,
- [
- -8759747687917306831,
- {
- ">ⓛ\t,odKr{䘠?b퓸C嶈=DyEᙬï¿@ᴔ쨺芛髿UT퓻春<\/yê¸>豚W釺N뜨^?꽴﨟5殺ᗃç¿%>í‚ဿ䄸沂Ea;A_\u0005閹殀W+窊?Ꭼd\u0013Pæ±´G5ì“æ˜": 4.342729067882445E-18,
- "Q^즾眆@AN\u0011Kb榰냎Y#ä€ê€’ᳺ'q暇çµs\"!3#I⊆畼寤@HxJ9": false,
- "⿾D[)袨㇩i]웪䀤ᛰMvR<èŸã£¨": {"v퇓L㪱ꖣ豛톤î£\\ê³±#ï–©kDTN": [{
- "(ì¾´ä¡£,寴ph(C\"ã³¶w\"憳2s馆E!n!&柄<\/0Pꈗſ?㿳Qdéµ”": {"娇堰孹L錮h嵅⛤èºé¡’?CglNæŸ+쨣ﺜ\\MrH": {"çžäŽ‡ë‘ƒá‰²å¼­íŒ­^ꄞ踦涟XK錆쳞ឌ`;੶S炥騞ଋ褂B៎{Ú’ä­·á¶¼éœpIè—è™¶K$": [{"â—–S~躘蒉꫿輜è­Qã½™é—@ᢗ¥Eæ¦iØ¡5┄^B[絮跉ᰥé™PWi3wㄾⵀDJ9!w㞣ᄎ{ë“’ê““b6\\篴??c⼰鶹⟧\\鮇ꮇ": [[
- 654120831325413520,
- -1.9562073916357608E-19,
- {
- "DC(æ˜è¡µá¼¡ê¸™ê°µå§­|Ö›[t": 7.6979110359897907E18,
- "Jâ…))嫼â³9Xfd飉j7猬ᩉ+⤻î®çœ—벎Eé°‰Zï¾¶63zá69}Zá¶L崭ᦥ⡦éšâ‹›êŽ¨î´µ~i㨃咊ꧭo䰠阀3C(": -3.5844809362512589E17,
- "p꣑팱쒬ꎑ뛡Ꙩ挴æèƒ”&7ᔈ묒4Hdç¡¶í›ãŽ–zꢼè±ã¿¢aሃ=<\/湉鵲Eî„¡Ó…%$F!í¶æ£Œå­¼{Oé§à¨ºgeu+": ")\u001bìž“kÅ€Xì©«Aë°Â®Ú£ç™¦ç‹¢)扔弒p}k縕ꩋ,䃉tࣼi",
- "ã‚¡F肿輸<솄G-䢹䛸êŠl`Tqê•—îŠè’ža氷⸅ᴉ蠰]S/{J왲m5{9.uá½³~㕚㣹u>x8Uè®Bëºè¥ªç›ŽQhVS맅킃i识{벂磄Ià·„ä™…xZy/æŠà«­Zï–Šé²î¦š-霳Væ®æŒ¦â„’": null,
- "㯛|Nî½™ê¸b7âµb?æ‹ O\u0014Þ†?-(EꞨ4ꕷᄤYᯕï‘OW瞺~螸\"욿ќ<u鵵઎⸊î˜å€¾ì‘·à·»rT⪄牤銱;W殆͢芄ਰåší›šìƒ¢î™‡âŠ¿+ã²½": null,
- "å˜ïƒé€†àº»%_ë§›d)zJ%3ì¹§_릟#95䌨怡\u001ci턠ॣî’i冘4èµ–'à¨ä§_æ ”!": {
- "*?2~4㲌᭳ì¯ftá‚·1#oJ\bäŠ‡é•‡ë” \u2079xä›ãŠá®‚N;穽跖s휇ᣄ홄傷z⸷(霸!3yëºMì’¿í–Û½v㳉tở心3黎vì­» Rp཮Vr~T?&Ë´k糒븥쩩r*D": null,
- "8@~홟ꔘk1[": -5570970366240640754,
- "BZté¦ê¡¬c餖 s(má›´\u0000◄dè…‘t84CâŸå¯VṊ뉙'å™±ê”ç½GCé¡€?허0êž¹&ë‡ä›­Cä·«](": 2.4303828213012387E-20,
- "yæ’”Z외放+}ḑ骈á™&\u0016`G便2|-e]঳?QF㜹YF\"ã¿’ç·„í–·ï€ãˆŸïƒ¦ï¨ä·¦à­€áŒ¤lM蘸N㾆▛럪㞂tᕬ镈ì‡å– l amcxPnm\u001a᱋<\/]_]ﻹïª?H": false,
- "áæ°ë¬¢뜚I[♺뽛x?0Hë´¬Wpn꨹Raä¿ïŒ›ìŒ‘{㴂ni祻윸A'y|⺴ᚘ庌9{$æ²{톽=m#@ï–—6ᨧfgs44陎J#<Ễ쨓瀵â©a୛㷉㙉ܸ◠냔嬯~å‘„ç±ç¾¥é•³": false,
- "㘱{<é ¬22?IF@곊I겂嶻Lá›D{@rì’‚?IAᣧ洪惒誸b徂zì·ºê¾ã ­\\刊%禨ìŒâ¶£ä»µ\\P[:47;<ᇅ<\/": {
- "^U釳-v㢈ê—â—„è˜rᜨi;èµ·kR犺䵫\u0000é”ì™m-Ô™!lḃ꛸뻾F(Wê·›y": "#á ºH㸢5v8_æ´‘C",
- "䔵໳$á™ 6èž\u206e摎q圩P|æ…sV4:㜾(I溞I?": -6569206717947549676,
- "é€êž‚ç·µí‡8 >e㺰\"'㌢ÆW\u0004çž•>0?V鷵엳": true,
- "뤥G\\î¡‹è¿‹ä ¿[庩'꼡\u001aiá©®Vì¯á³ªä¦ªÃ”î²…;倱ନë›èªˆ": null,
- "쥹䄆䚟Qæ¦äŽá¢­<\/2ã•£p}HW蟔|äƒî‚꿈ꚉ锳2Pb7㙑Tⅹᵅ": {
- "Y?Ö­$>#cVBꩨ:>ï†eLè’å‹™": {
- "86柡0po äš&-æ‘Ћ祌<\/휃-G*㶢הּì©s㶟餇c걺yu꽎還5*í„§ç°•Ogå©¥Sê": null,
- "a+葞h٥ࠆ裈嗫ﵢ5輙퀟ᛜ,QDﹼ⟶Y騠锪E_|x죗j侵;m蜫轘趥?븅w5+mi콛L": {
- ";⯭ﱢ!ä¹°Fâ½æŸ¤é¶‚näµ£V㫚墱2ë ¾ELEl⣆": [
- true,
- -3.6479311868339015E-18,
- -7270785619461995400,
- 3.334081886177621E18,
- 2.581457786298155E18,
- -6.605252412954115E-20,
- -3.9232347037744167E-20,
- {
- "B6㊕.k1": null,
- "ZAꄮJ鮷ᳱo갘硥鈠䠒츼": {
- "á•…}럡}.@y陪é¶r業'æ´î‰°í€‰x䉴ﵴlí˜):씭脴ᥞhiꃰblﲂ䡲엕8߇Mã¶­0燋標æŒ-?PCwe⾕J碻Ᾱ䬈䈥뷰憵賣뵓痬+": {"aì·©v礗X⋈耓áŠfç½…é®!㔽YYᣓwæ¾33⎔芲F|\"äœT↮輦挑6ᓘL侘?ᅥ]ë†1R௯✎餘6ê½<\/௨\\?qå–·ê«j~@ulq": {"嗫欆뾔Xꆹ4H㌋Fåµ§]à Ž]ã –1ꞤT<$më«O i댳0ä²iï—Œ": {"?à·©?\u20cd슮|ꯆjs{?îž…d7?eNs⢚嫥氂䡮쎱:鑵롟2hJꎒﯭ鱢3춲亄:ë¼£v䊭諱Yj択cVmR䩃㘬T\"Ní™*ै%x^F\\_s9ë³´zz4æ·—?q": [
- null,
- "?",
- 2941869570821073737,
- "{5{殇0ä¾ïž¢g6ë°–í‹è‡©ç¶¹R$ä–­j紋釰7î‹‘sXI繳漪행y",
- false,
- "aH磂?뛡#惇då©…?Fe,ì˜+늵ä˜\"3r瘆唊å‹ï¢Šj⳧࠴ꇓ<\/唕윈x⬌讣䋵%拗ᛆⰿ妴á”M2ã³—å¿…ê§‚æ·²?ゥ젯檢<8ë’ï¶MidXä’3á³»Qî”â–®ä½UT|⤪봦éâŠ",
- [[{
- "颉(&뜸귙{yîš’^\"P퟉ì¶á²Ÿä®­î‹ºDé¡¡9=?}Y誱<$bë±£RvO8cH煉@tk~4ǂ⤧â©å±‹Sî›ïž¢S;J{vV#剤餓ᯅc?#a6D,s": [
- -7.8781018564821536E16,
- true,
- [
- -2.28770899315832371E18,
- false,
- -1.0863912140143876E-20,
- -6282721572097446995,
- 6767121921199223078,
- -2545487755405567831,
- false,
- null,
- -9065970397975641765,
- [
- -5.928721243413937E-20,
- {"6ì´Š\u001a홯kB0w撨燠룉{绎6⳹!í„è´‘y▾鱧ժ[;7ᨷ∀*땒䪮1x霆Hᩭ☔\"rî¹›ä7毟á°r惃3ꉭE+>僒æ¾": [
- "Ta쎩aÆt쵯ⰪVb",
- [
- -5222472249213580702,
- null,
- -2851641861541559595,
- null,
- 4808804630502809099,
- 5657671602244269874,
- "5犲﨣4mᥣ?yf젫꾯|䋬ìž$`Iⳉﴷ扳å…,'î±c",
- false,
- [
- null,
- {
- "DyUIN쎾M仼惀⮥裎岶泭lh扠\u001e礼.tEC癯튻@_Qd4cï…«5S熯A<\/ï¼¼6U윲蹴Q=%푫汹\\\u20614b[௒Câ’¥Xe⊇囙b,ï®æœ3ss땊ë¢i~逇PA쇸1": -2.63273619193485312E17,
- "Mq꺋貘k휕=nKç¡ë«žè¼©>㾆~á¼žà¡¹ê¸æ¦µlâ‹™Hw뮢帋M엳뢯î¹…vâ…ƒ^": 1877913476688465125,
- "á¶´ë»—`~ç­—å…⚽টW˃â½b犳䓺Iz篤p;乨A\u20efì©?ç–Šmã€ì»©ë«¡b탔鄃ᾈV(é¢ç³=뎲ିeF仢䆡谨8t0醄7㭧瘵⻰컆r厡궥d)a阄á·Ed&c﯄伮1p": null,
- "â¯w4曢\"(欷輡": "\"Má­«]䣒頳B\\燧ࠃN㡇j姈g⊸⺌忉ꡥF矉স%^",
- "㣡Oᄦ昵⫮Y祎Sì級㭻撥>{I$": -378474210562741663,
- "䛒掷留Q%ì“—1*1J*ë“헩ᦢ﫫哉쩧EↅIcê…¡\\?â´Šl귛顮4": false,
- "寔愆샠5]ä—„IHï©¥=d﯊/å¶?ॊn%晥D視Nò—˜ˆ'᫂⚦|X쵩넽z질tsî¦kxDQ莮Aoﱻ뛓": true,
- "钣xp?&\u001e侉/y䴼~?U篔蘚缣/I畚�Q绊": -3034854258736382234,
- "꺲໣眀)â¿·J暘î©pИfAVì‚•ì³­Nꯗ4々'唄ⶑ伻㷯騑倭D*Okï¯ê§3bâ½_ï„¡<\/ì±£Xm톰á•䆄`*fl㭀暮滠毡?": [
- "Dç”·p`V뙸擨å¿ë¸ª9c麺`淂⢦Yw⡢+kzÜ–\fY1䬡Hæ­)ë²¾Z♤溊-혰셢?1ï”<-\u0005;æ¢Tále\\ᛵߓﭩ榩<QF;t=?Qꀞ",
- [
- null,
- [{"-ì·«æ²î«§á¬¨å¢Šè‡¸<à ’Hè·¥ 㔭쥃㫯W=z[wধ╌<~yW楄S!â‘»h즓lÄ–N￧篌W듷튗乵᪪템먵Pf悥ᘀk䷭焼\\讄ræ“é¬y6VF<\/6ëž¿p)麡ê ãª\"pà®´e": [
- "#幎æ´é¢’嶈)ã„›J.嶤26_⋌东챯ꠉ⤋ؚ/âš%ç§¼Q룠QGztᄎ㎷អIç¿°Xpç”éœê¨",
- {",T?": [
- false,
- [[
- true,
- 7974824014498027996,
- false,
- [
- 4.3305464880956252E18,
- {
- "᱿W^A]'rᮢ)é¥zï­é¤;Hu\\Fk?ï´º?IGæµ…-ä™§>è¨-xJ;å·¡8깊è ï»“U$K": {
- "Vê•¡è«…æ“W=斸s︪vﲜ츧$)iꡟ싉eî®å¯³?ጭムVથ嵬iæ¥Fg<\/Z|៪ꩆ-5'@ꃱ80!燱R쇤tç³³]罛逇dṌ֣XHiͦ{": true,
- "Ya矲Cë©—Q9膲墅æºíœ»c\\ë”¶Gç””<\/.齵휴": -1.1456247877031811E-19,
- "z#.OOï¿J": -8263224695871959017,
- "å´_3夼ᮟ1Fë¸ë½¯á¦“é´­V豈Ь": [{
- "Nè’¬74": null,
- "yuB?厅vK笗!ᔸcXQ旦컶P-ë…«mᄉ麟_": "1R@ 톘xa_|﩯é˜î¥§sæ§žd!d껀筤⬫è–焵먑D{\\ïƒïŽ¿6k共倌☀G~AS_D\"딟쬚뮥馲렓쓠攥WTMÜ­8nX㩴䕅檹E\u0007ï­¨N 2 ℆æ¶ê¥ê µï“3▙玽|ë¨_\u2048",
- "æA Cä§©G": {":Mí£5e들\\ê€æ¼á”„é¸|Iï¨$)n": {
- "|U䬫㟯SKV6ꛤ㗮\bn봻䲄fXT:㾯쳤'笓0b/à³¢Cì³–?2浓uO.ä°´": "à½ê¼‹e?``,ᚇæ…^8ꜙNM䂱\u0001Iá–™ê§M'vKdꌊH牮r\\O@䊷ᓵ쀆(fî »yè»i툺\"?<\/峧ࣞ⓺ᤤ쵒߯ꎺ騬?)刦\u2072læ…ªy꺜ﲖTjî’•+u",
- "뽫<G;稳UL⸙q2n쵿C396炿Jè“¡zâ£zဩSOU?<\/ë™oEí¸Oé¿…à·´êˆEm#\"[瑦⤫á†glâ¡—q8\"í˜ë¥ä¿‚@ᆤ=\u0001爖ç¾ì·€ã¸©b9\\jeqt㟿㮸龾m㳳긄": {
- "9\"î²–V霟釜{/o0嫲Cå’€-饷äˆ[ë…©î)\r䤴tMW\\龟ϣ^ي㪙忩䞞N湆Y笕)è¨ê–¤èª¥ç…½:14â«»57U$æ“’ä²è–¡Qvↇ櫲현誧?nà®·6": {"l웾䌵.ä…‹ä¦ic碳g[糲Ƿ-ឈᚱ4ì‘§\u0004C࿼\u0018&쬑?멲<\/fD_檼픃pd쪼n㕊渪V䛉mæˆW儅톳뗳䓆7㭽諤Tç… ï–ŠNey?î¼…0᪵鈑&": [
- false,
- null,
- {
- "\rî´’;é¼¶já ‚ê¼RLz~â™”9gf?Ó¡æµ": -1.4843072575250897E-19,
- "&ꊒ\"ꋟä­E诮ﯚO?SWë’훪mb旙⎕ᗕ⶙|á·¤5y4甥": "j5|庠t铱?v íš‹0\"'rxz䃢æºêž«!\u0002",
- "Q á©ãŸ§": {"Hﬔ\u2058䪠틙izZㅛ탟H^ﶲA??R6å‘ Z솋R.à¿¶g8": [
- -8762672252886298799,
- -1.9486830507000208E17,
- null,
- -7157359405410123024,
- null,
- null,
- -995856734219489233,
- "呧㫹A4!",
- null,
- -1.9105609358624648E-19,
- 5888184370445333848,
- 2.25460605078245E-19,
- 2.5302739297121987E18,
- "뢹sbEfæµ2丯ï‡?뗾耸(Wdë™SବꭖrtU?ç­¤P똙Qpbbï‘¡KqaE$æ¥Vì›°3i/lK퉜,8︸e= gèž“t竦컼?.寋8éµ—",
- 7377742975895263424,
- 2.4218442017790503E-19,
- {
- "y꒚ཫ쨘醬킃糟}î‘yTSt䡀⇂뿽4ൢ戰U": [[
- 3600537227234741875,
- 4435474101760273035,
- -1.42274517007951795E18,
- -5567915915496026866,
- null,
- null,
- [
- -3204084299154861161,
- {
- "7梧慸æ†.a瘎\u00041Uéµ®CkÖ¨d惥è€â³¡Y,â­ì¨EåžFFI鱑ⳬ줢7â§µBﴠ耘줕햸qì»´~*ç‘W.떛ࡆ@'á€+è½³": -961121410259132975,
- "⥅]l黭㣓绶;!!⎃=朼ã¿e&ἂ繤C﯀lä£ãŒ€6TMì‘®w懃ꡡ#ᤆ䰓,墼湼゙뽸㲿䧽쫨xᵖ듨<\/ T0峸iQ:溫è„\\\"쎪ὴ砇宖^Mæ³¼í¥âž…鈫@ᄟ༩\u2008⥼": true,
- "â©\"籽汎P싯鲘蟼sRá¯ä…©\u0019R(kRá–&ಌ 0\"é³¶!馼YH": null,
- "鮼ꚇ싋։刟\rRLd步Nⴗ5Eࡆ訛갚[I醵NC(郴ṉy5D뤺౳QY壯5苴y훨(W\\Cଇ姚C艄깹\u001c歷㋵ZC᥂": [
- -6806235313106257498,
- null,
- "}N⸿讽sꚪ;ï‘¶\\p繇jè‹„î¡ä«¨\u20e7%5x?î•¥t#",
- {
- "O〗k<墻yV$à°rs-c1ఌ唪.C7_Yobᦜ褷'b帰mã„‘l⌅": {"qB뗗擄3éš‚5ëºæ«‚䱟eì´¸P/é©,3æŽê—©=冉棓㑉|ËžF襴뿴,:㞦<퓂⧙礞♗g뚎ᛩ<\/뉽ⶳ⸻A?_x2Iã½å‹’*Ií™±î¢é§ç²¿~曟㤙2绥Ly6+ìƒuu鿜בfí˜|æ­à£–É": [
- ">hh䈵î”w>1â²ì­V[â…Ž\\헑벑F_ã–⠗㫇hæ½;á¿æ±°á±¼ç€–J옆9RRì…vsZ柺鶶툤r뢱橾/ꉇ囦FGm\"謗ꉦ⨶쒿⥡%]鵩#ᖣ_蹎 u5|祥?O",
- null,
- 2.0150326776036215E-19,
- null,
- true,
- false,
- true,
- {"\faá­¶Pæ¤WWcá Ÿf뚉á¬í“—â³€Wç¹5:HXH=q7xì°™X$)모r뚥ᆟ!Jﳸf": [
- -2995806398034583407,
- [
- 6441377066589744683,
- "Mﶒ醹i)Gἦ廃s6몞 KJ౹礎VZ螺费힀\u0000冺업{è°¥'꡾뱻:.ꘘ굄奉攼Diá·‘Ké¶²y繈욊阓v㻘}枭캗e矮1c?íœ\"4\u0005厑莔뀾墓ë‚⽴洗ṹ䇃糞@b1\u0016즽Yè½¹",
- {
- "1⽕⌰鉟í”M㤭n⧴ỼD#%é˜âŠ¯ì¿¼ç¨ë¸£ëªç´§á…‡ã“•ᛖcw嬀~ഌ㖓(0r⧦Qä‘•é«à´°é“‚㓻Rå„®\"@ꇱmâˆà¯¿á¦¯é Œ8}㿹犴?xn잆꥽R": 2.07321075750427366E18,
- "˳b18㗈䃟柵Z曆VTAu7+㛂cb0﯑Wp執<\/臋뭡뚋刼틮è‹ë²²î·´TLP预庰܈G\\O@VD'鱃#ä¹–ëº*鑪ꬳ?MÞždï­¹{â‡åœ¯ì‡œã¼ž顄︖Y홡g": [{
- "0a,FZ": true,
- "2z̬è£î’®ê§¦é©¸\u0006L↛Ḣ4๚뿀'?lcwá„§ã®!蓚䃦-|7.飑挴.樵*+1ﮊ\u0010ꛌ%貨啺/JdM:ë˜ïˆ!FBe?鰴㨗0Oè´¢I藻ʔWAá«“Gì³›u`<\/I": [{
- "$Ï„5Vé´a뾆両環iZp頻යn븃v": -4869131188151215571,
- "*즢[⦃b礞R◚nΰꕢH=귰燙[yc誘g䆌?ଜ臛": {
- "洤湌鲒)⟻\\䥳va}PeAMnï¼®[": "ã³Éª/(軆lZR,Cpæ®È®Nå•·\"3Bå©´?i=r$펽á¤ì€¸",
- "阄R4㒿㯔ڀ69ZᲦ2ç™í•Œå™—På´œîž#\\-ì­è¢›îˆµ&é‘/$4ç«¥Vê©‘_ZHAæ¾¢fZ3": {"x;P{긳:Gé–‰:9?æ´»H": [
- "繺漮6?z犞焃슳\">á»[Ⳛ䌜ë…䂹>èµâ¼¶ç…œï’˜Yæ¡¥[泥뚩MvK$4ï‰jtï¾›",
- "E#갶霠좭㦻ୗ먵F+䪀oè’ba쮎4X㣵 h",
- -335836610224228782,
- null,
- null,
- [
- "r1᫩0>danjY짿bs{",
- [
- -9.594464059325631E-23,
- 1.0456894622831624E-20,
- null,
- 5.803973284253454E-20,
- -8141787905188892123,
- true,
- -4735305442504973382,
- 9.513150514479281E-20,
- "7넳$螔忷㶪}䪪lì§´\u0007é¹Pé°šHFéŠZJﳴ/âŽ1ᷓ忉ç‡áœ‹ì“ˆxëµ mä·çª¥á”^\u0019á¶Œå­#ヂt☆áƒpáŽè‡¶äŸ±5ï‰$ä°µ&๵分ìˆ]äˆë‰â™‚åŽ\u0011<>",
- "C蒑貑è—lï°°}X喇몛;të°¿O7/᯹f\u0015îµ¼kI嘦<ዴ㟮ᗎZ`GWퟩ瑹࡮ᅴB꿊칈??Ræ ¡s脚",
- {
- "9çµæˆ¬+AU^洘拻ቒy柭床'ç²™XG鞕᠜繀伪%]hï ¾C,$è¼™?Utä¹–Qmë–šWï¶8઼}~qâ ªrU䤶CQ痗ig@#≲t샌f㈥酧l;yé—¥ZHæ–¦e⸬]j⸗?ঢ拻퀆滌": null,
- "畯}ã§¢J罚å¸VX㨑>1ꢶkT⿄蘥ã‘o|<嗸層沈挄GEOM@-äžšä§°$만峬è¼ä ±V✩5宸-æ‚î¡§D'ã—ªyP掶7bâ ŸJã•»SfP?d}v㼂á…'猘": {
- "陓y잀v>╪": null,
- "鬿L+7:ë‘Y=ç„ U;킻䯌잫!韎ஔ\f": {
- "駫WmGጶ": {
- "\\~m6ç‹©K": -2586304199791962143,
- "ႜࠀ%Í‘lâ¿…D.ç‘¢Dk%0ç´ªdḨTI픸%뗜☓s榗኉\"?V籄7w髄♲쟗翛歂E䤓皹t ?)ᄟ鬲éœ6Cî³´": {
- "_ì·¤a圷1\u000eB-XOy缿請∎$`쳌eZ~æï€§íŠ»/蜞`塣৙\"⪰\"æ²’l}蕌\\ë¡ƒè«æ°Œ.望wZ|o!)Hnçqg}": null,
- "kOSܧ䖨钨:಼é‰ê­O醧Sî…¨`ì‹­`ꓭì­ï¯¢N&Et㺪馻ã¢â…³ã¢ºå´¡àºŠèœšé”«\\%ahx켨|ż劻ꎄ㢄ìŸA躊᰹p譞綨Ir쿯\u0016ﵚOd럂*僨郀N*bã•·63z": {
- ":L5r+T㡲": [{
- "VK泓ë²á®™Ry㓤➙Ⱗ38oi}LJቨ7Ó㹡৘*q)1豢⛃e᫛뙪壥镇æž7Gè—¯g㨛oI䄽 孂L缊ꋕ'EN`": -2148138481412096818,
- "`â›á˜‘$(खꊲ⤖á„ꤒ䦦3=)]Y㢌跨NĴ驳줟秠++då­³>8ᎊ떩Eê¡£Sv룃 쯫أ?#Eî·°|á­™ãŽ?zv:5ï©^â‹‘V": [
- -1.4691944435285607E-19,
- 3.4128661569395795E17,
- "ãƒì´—^G9ä½­é¾¶n募8R厞eEw⺡_ㆱ%⼨D뉄퉠2ê©µá›…â³æ¿L팹Là·€n=\"æ…‰ë…á›®y>!`g!í’²î¦ï¨’[/;?[vï®ê²è»‡}⤳â¤í•∌Tã½²R홓é‰ã“¥",
- "æ„°_⮹T䓒妒閤둥?0î°šaB@㈧gç„»-#~è·¬x<\/èˆPÝ„ê¡=\\׳P\u0015jᳪá¢qï‹¶;ã¯l%á­—;砢觨â–,è¬ê°Gy?躤O黩í‹Yã’a擯\n7覌똟_䔡]fJ晋IAS",
- 4367930106786121250,
- -4.9421193149720582E17,
- null,
- {
- ";ᄌ똾柉곟ⰺKpá‡ä±»à¸ºä–{o~h!ï½…ê¿àª»ìš„Úš\u0002y?xUd\u207c悜ꌭ": [
- 1.6010824122815255E-19,
- [
- "宨︩9앉檥pr쇷?WxLb",
- "æ°‡9】J玚\u000f옛呲~ è¼ 1D嬛,î•*mW3?n휂糊γ虻*á´«ê¾ ?qîžå‡è¶—Ko↦GTé“®",
- "ã¶¢ážmOã”k'诔栀Z蛟}GZé’¹D",
- false,
- -6.366995517736813E-20,
- -4894479530745302899,
- null,
- "V%᫡IIç’…ï»ä…›ä“Ží’¹ï±¢/pU9seë˜ë›žx梔~C)䨧䩻蜺(g㘚R?/á»°[å¿“C뾠ࢤc왈邠买?嫥挤풜隊枕",
- ",vç¢å–”㌲쟚蔚톬៓ꭶ",
- 3.9625444752577524E-19,
- null,
- [
- "kO8란뿒䱕馔b臻âŸéš¨\"㜮鲣Yq5mí”<u뷆cè­†\u001bN?<",
- [{
- ";涉c蒀ᴧN䘱䤳 ÿꭷ,핉dSTDB>K#ꢘug㼈á¦=P^6탲@ä§”%$CqSw铜랊0&m⟭<\/a逎ym\u0013îš¡vᯗ": true,
- "æ´«`|XN뤮\u0018詞=ç´©é´˜_sX)㯅鿻á»ì‹¹": 7.168252736947373E-20,
- "ꛊ饤ï´è¢(逊+~⽫얢鈮ï«è‰¬O힉7Dç­—S곯wæ“I斞᠈븘蓷x": [[[[
- -7.3136069426336952E18,
- -2.13572396712722688E18,
- {
- "ç¡¢3㇩R:o칢行E<=\u0018á¬YuH!\u00044U%å炼2>\u001eSi$â“·ê’ˆ'ï‘¿ë ¢gᙫ番ꯒ㛹럥嶀澈v;è‘·é„•x蓎\\惩+稘Uî“´Eᖸﳊ㊈壋Nå«¿â¾æŒŽ,袯苷ኢ\\x|3c": 7540762493381776411,
- "?!*^á¢çª¯?\u0001ڔꙃw虜ë³îšFgJ?&⨫*uo籤:?}ꃹ=ٴ惨瓜Z媊@ત戹ã”똩Ԛ耦Wtè½\\æž’^\\ꩵ}}}ꀣD\\]6M_⌫)Hè±£:36섘㑜": {
- ";í™—á°°U஋㙛`D왔ཿЃS회çˆ\u001b-㢈`ë´†?盂㛣듿ᦾ蒽_AD~EEຆ㊋(eNwk=RÉ å³­qï’«\"5Ἠ婾^>'ls\n8QAK<l_⭨穟": [
- true,
- true,
- {"ﳷm箅6qⷈ?ﲈ憟b۷⫉἞V뚴少U呡瓴ꉆs~嘵得㌶4XR漊": [
- "í†ä»‹fM暪$9K[ㄇìƒí³æ’¦gæ’Ÿæ¸jÒFã¹¹aj bHᘀ踉êŽï¼£ç²„ a?\u000fKì¦‰î¶¯éƒ å¹¨9D舢槷Xh뵎u훩Ꜿ턾ƅ埂P埆kë©€{䢹~?D<\/ê¼¢XR\u001b〱ä½ê¼¨i㘀ḟ㚺A-挸",
- false,
- null,
- -1.1710758021294953E-20,
- 3996737830256461142,
- true,
- null,
- -8271596984134071193,
- "_1Gí‰í…‘m䮔鰼6멲Nmꇩſt쓟íŠN许FDï¡€j+3^ﶜ⎸\u0019⤕橥!\"sî•—-뾞lz北׸êšëž¬)?l⻮고iä‘°\u001f䪬",
- 4.459124464204517E-19,
- -4.0967172848578447E18,
- 5643211135841796287,
- -9.482336221192844E-19,
- "౪å†é‡¶9D?sèž­X榈枸j2ç§€vï ˜î ]泌鰚岒èµè½€ìŒ¶ïŠ›ií…½qMbL]R,",
- null,
- [
- null,
- {"M쪊ꯪ@;\u0011罙ꕅ<eáº|爑Yâµ<\/&ᩎ<腊ሑᮔ੃Fè±­": [
- "^0࡟1ë³Pí‹áæˆF⨥Iê‚´\"z磣Vâ…¡=8í€2]䢹h1\u0017{jT<Iç…›5%Dì…Sâ‘™â…J*ìƒ å·™àº”ï€¢;᧡䙞",
- [{
- "'ã¶¡í¾é„§`è·Š\"gV[?u᭒Ʊ髷%葉굵aë¦Nì¼§Qﯳy%y䩟髒L䯜Säµ³r絅肾킂á'ꔦg긓a'@혔যWè°á¬F栩ŷ+7wéžš": 6.3544416675584832E17,
- "苎脷v改hmìµ|㋊g_ᔠ뒨蹨峟ìŽã·¸|Ο刢?Gͨ옛-?î¨Gꦱî«î“©IEYUX4?%ꘋᆊ㱺": -2.8418378709165287E-19,
- "誰?(H]N맘]kæ´³\"qï±è’§è˜ž!Rí«\\(Q$T5Nå â«£ìœ¿6|럦ì†ï¸…ï­—(": [
- "峩_\u0003A瘘?✓[硫䎯á½uጭ\"@Y綅첞m榾=è´®9R벿῜Zï §",
- null,
- "䰉㗹㷾Iaáƒqcp쓘὾൫Q|ﵓ<\/ḙ>)- Q䲌mo펹L_îŽ¦ì¹æ¨–庫9ê©ìª¹á˜¹ä‘–ç€aK îž?*趤fë­“å»p=磕",
- "î“å“‘z懅á¤-ê¹ux쀭",
- [
- true,
- 3998739591332339511,
- "ጻ㙙?᳸aK<\/囩U`B3袗ﱱ?\"/ké”ä§2ï…¤l@쿎VZ쨎/6ꃭ脥|B?31+on颼-ê®§,O嫚m à¡­`KH葦:粘i]aSUì“™$ì‚f+詛頖b",
- [{"^<9<ç®&絡;%iï«¡2攑紴\\켉hì“™-柂äšven\u20f7浯-Ꮏ\r^í›ä“ší—¬\u000e?\\ã…¡ÖºJë–·VOt": [{
- "-௄å¶k㘆í˜à®½y⎱㢬sS઄+^瞥h;á¾·jî­;抭\u0003ë°«f<\/5â°§ï§§ï¡™_朻ï—%*[-撵䷮彈-芈": {
- "㩩p3篊G|宮hz䑊o곥j^Co0": [
- 653239109285256503,
- {"ê¶²?|\":N1Û¿æ°ƒNZ#깩:쇡o8킗ࡊ[\"ë¸Po핇1(6é°$膓}â½*)渽J'DN<ì™ê¸˜æ¯¦ë²Ysì¹–": {
- "2Pr?Xjㆠ?æ®/?㓦柖馃5뚣Nᦼ|é“¢rè¡´ã©–\"ç”æ¹—Üæ†": "\"뾯ië‡ç­ç‰»$ç²/4ka $åŒíœ´ï‹è¯‘zbAá©ê‡¸ç‘…&뵲衯ꎀᆿ7@ꈋ'ᶨH@á ´l+",
- "7뢽ëšv?4^ꊥ_⪛.>pởr渲<\/⢕疻c\"g䇘vU剺dஔ鮥꒚(dïŸv祴Xâ¼¹\\îºa8y5å†": true,
- "o뼄Bìšžç¾hrï·”í˜ë’šâ¿›U5pꪴfg!6\\\"爑ì䢱W<ï¶•î\\í…£ç‡oI/BK뺡'谑♟[Ut븷亮g(\"t⡎有?ꬊ躺ç¿è‰©nl F⤿蠜": 1695826030502619742,
- "ÛŠê¹–>ࡹ햹^ⵕ쌾BnN〳2C䌕tʬ]ì° ?ݾ2饺蹳ã¶êŒ­è¨\"â—¹á¬D鯎4e滨T輀ﵣ੃3\u20f3í‚™D瘮g\\擦+泙᧠鬹ﯨַ肋7놷郟lPå†{ß’hà§œr5,ê“‹": null,
- "ΉN$y{}2\\N﹯ⱙK'8ɜͣwt,.钟廣䎘ꆚk媄_": null,
- "䎥eᾆá¦î‘§ì‰,JÞªn岪ã¥sî­•æ–謽䚔5tã¯ï–µï£šã°³ã±ŠZhD䃭f絕s鋡篟îža`Q鬃┦鸳n_é‚(E4è¿ _è§…ë·_宪D(NLî²ç–¶hL追V熑%]vè‚«=惂!㇫5⬒\u001fï²å–º4랪옑": {
- "2aè¼85먙R㮧㚪Sm}E2yîŠê†£ê«¨rRymã±è†¶á”¨\\tç¶¾A☰.ç„„ë™—9<쫷챻䒵셴᭛䮜.<\/慌꽒9å»Okä°ŠZ㥪幸k": [
- null,
- true,
- {"쌞ì": {
- "â–ŸGL K2ië›±iï¼±\"Ì .옛1X$}涺]éŽæ‡ Ú¦ëŠ·?tfçŸÝžã‚Ÿ{": 1.227740268699265E-19,
- "ê’¶]퓚%ฬKâ…": [{
- "(à·›@Ç®ã£ä§¼äµ¤[aテൖvEnAdUë –ë—ˆ@볓yꈪ,mÔ´|꟢ìº(而첸죕CX4Y믅": "2⯩㳿ꢚ훀~迯?᪑\\啚;4X\u20c2è¥B箹)ä¿£eá»»w䇄",
- "75༂f詳䅫ê§é¿ }3\u20b5'∓ä±è™€fè¼î‘”Iq鈆﨤gí©)BFa왢d0뮪痮Mé‹¡nw∵謊;ê§f美箈ḋ*\u001cî±ïœŸ`퇚í‹ä³«$!V#N㹲抗ⱉçŽ(V嵟ï«_bã³…\u0019": null,
- "e_m@(i㜀3ꦗ䕯䭰Oc+-ë ¨0뭦⢹苿蟰ê‚SVä°­å‹¢ë¥.ྈ爑Vd,á•¥=í€)vz뱊ꈊB_6듯\"?{ã’²&㵞뵫ç–ë¡ë¯ˆ%Qwé™,?\ræž®\"? N~癃ruà¡—dn&": null,
- "㉹&'Pfs䑜공j<\/?|8oc᧨L7\\pX᭠9᪘": -2.423073789014103E18,
- "ä„瑄䢸穊f盈᥸,Bî§§ë¾§í‘—íšµB1쟢f\u001f凄": "é­–âš2儉j꼂긾껢嗎0ࢇ纬xI4]ï„(à©“`蕞;픬\fC\"æ–’\")2æ«·I﹥迧",
- "ퟯ詔xæ‚ë ¹+T?Bg⥄섅kOeQí¼ã»´*{Eé¼6æ°¿L缋\u001c둌๶-㥂2==-츫I즃ã ï–˜Lg踞ꙂEG貨鞠\"\u0014d'.ç¼—ï¡gI-lIb䋱ᎂDy缦?": null,
- "î’¢ç´Mã¦çŠ¿w浴詟棓쵫G:äœ?V2íž½7N*n&ã–ŠNd-'ຊ?-樹DIv⊜)g䑜9뉂ㄹí‘阉~ê…쵃#R^\u000bïž®B䌎䦾]p.䀳": [{"ϒ爛\"ꄱ︗竒G䃓-î†ã¾å¸³ã‚.j)qguæ‰å¾£à¨Zé¼—A9A鸦甈!kè”å–™:3Tî†%&ã ˜+,ä·ž|ì±½v䚞문H<\/醯rì…“ã¶¾\\a볜åºzEä·_죤ဵ뿰᎟CB": [
- 6233512720017661219,
- null,
- -1638543730522713294,
- false,
- -8901187771615024724,
- [
- 3891351109509829590,
- true,
- false,
- -1.03836679125188032E18,
- {
- "<?起HCᷭ죎åŠîŒŽèއ逰/{gs\u0014⽛㰾愫tï¿–<솞ڢëŒç…²è†ºà¨»9x닳xà¡­Q訽,ᶭඦtt掾\"秧㺌d˪䙻꫗:á­ˆh4ç·žç—䤴c뫚떩త<?ᕢ謚6]í›Oé°é‹›é• è´©èµŸ\"<Gâ™·1'": true,
- "቙ht4ßBqꦤ+\u0006멲趫ç”)椾": -1100102890585798710,
- "ç·å…Žê³‡ë‡¸ç²ŸF醇;朠?厱楛㶆â¶7râ¾›o꯬᳡F\\머幖 㜦\f[æ¦á¥½ã®£0䕊?J㊳뀄e㔔+?<n↴å¤î§·": [
- "4~ê‰ç¾\\å®(泤å•빜\u0014>j랎:g曞ѕᘼ}链N",
- -1.1103819473845426E-19,
- true,
- [
- true,
- null,
- -7.9091791735309888E17,
- true,
- {"}蔰鋈+ê¨å•µ0?g*사%`J?*": [{
- "\"2wG?yn,癷BK\\龞䑞x?蠢": -3.7220345009853505E-19,
- ";饹়â€)çš‹`噿焒j(3â¿w>å5X<np?<줯<Y]æ˜!J೸UⳂNे7v௸㛃ᄧ톿䨷鯻v焇=烻TQ!F⦰䣣눿Ké·šëˆ'â­²mæ (äš»": [
- "蹕 淜੃b\"+몾ⴕ",
- null,
- 35892237756161615,
- {
- " 듹ã)5æ…ç®±&$~:é°ì®<\/å ‹?% \\勽唅zì†å¸‹ä˜ºH髀麡M퇖uz\u0012m諦d᳤콌æ¨\rX싹̡á²": -433791617729505482,
- "-j溗ࢵcz!:î€}✽5à´‡,욨Ýs#ë«=å—æµº^}E\\Y\\T*뼈cdêºcÛ˜ïµëŽä¨¸ë±K䠴㉿æ¿é€³îŽœ@wî·¿fì¢<\/[L[": -9.3228549642908109E17,
- "Ms킭uà®—%\\uâŽ/家欲ἅ答㓽/꯳齳|㭘Pr\"v<\/禇䔆$GA䊻˔-:틊[h?倬è¤á¾žà§³.Gw\u000b": [
- "0宜塙I@ä´è‰\\Uyë’…=2<hæš’ï…£K._è´¡ç’Yi檻_⮵uá㘗è [f\u0015힢Hê”®}጑;ï´èªyf0\"\u20cc?(=qæ– âž½5ꎾ鞘kⲃ",
- -2.9234211354411E-19,
- false,
- true,
- {
- "\u0011⟴GH_;#怵:\u001c\u0002nîž»1U\\p/ì™”(┫]hêšî·ƒ7\r0䵷첗岷O௷?î·°ãŽ[殇|J=?韷pᶟ儜犆?5კ1kê–iH竧뛈ପdmk游y(콪팱ê¾k慧 yè¾£": [
- false,
- "O\"ëp覈ykv磂㢠ãµ~뀬íŠlC&4솎䇃:Mj",
- -7.009964654003924E-20,
- false,
- -49306078522414046,
- null,
- null,
- 2160432477732354319,
- true,
- "4íš¡h+!踹ê¬P鮄{0&ë±¥M?ìƒéž…n㮞ᨹ?쒆毪l'ç®…^ꚥ頛`e㻨52柳⮙嫪࡟딯a.ï‘„~äµ®1få˜N&zÈ­L榓ۃ鳠5d㟆M@㣥ï Ó‹AÎq0縶$",
- -3.848996532974368E16,
- true,
- null,
- -3.5240055580952525E18,
- {
- " vï­·áµ#ce乃5僞?Z D`묨粇á”ç» vWLè­¢uë½€\\J|tâ“™tâ„–\"ꨋnT凮ᒩè‚ç¯b騩:䢭Hbvì»å³¨z㹚T趗햆귣학津Xiï¼¹@á–¥K": true,
- "!F 醌yï䉸W2ꇬ\u0006/ä’7~%9擛햀徉9â›°+?㌘;ê “X䇻Dfië¼§ì’’\u0012F謞Õ絺+臕kà¤LSQìŒX쎬幦HZ98è’Šæž³": "澤令#\u001dæŠâ›³@Næ•퀂[5,✄ꘇ~䘷?\u0011Xꈺ[硸⠘⛯X醪è¡x\u0007쌇MiX/|ï¾ëšK8ä¡î¿¥W)銀q僞綂蔕E",
- "6â²ä£–Rà§ž@ငg?<\/à³´xé™™Xꈺ崸⠅ᇾ\\0X,H쟴셭A稂ힿã‚F\\쑞\u0012懦(Aᯕç­~î½”\u0001ê»®X?逊": 5.7566819207732864E17,
- "[c?椓": false,
- "kä’‡": 2583824107104166717,
- "꙯N훙ã…ﮒ燣㨊瞯咽jî™Mxby뻭뵫װ[\"1畈?à§±L": "ë£á”‚魠羓犴ꚃ+|rY",
- "ë…ºZ?îˆä¬ï“©é‰‰îˆ­:?â³™ç˜Cኯ.Vs[釿䨉ì§\\\\*쵢猒$\\y溔^,㑳": {"藶꺟": [{
- "\"d훣N2zq]?'檿죸忷篇ﮟ擤m'9!죶≓pë­»\\ᇷ\f퇶_ä°¸hà¹Q嵃訾㘑従ꯦ䞶jL틊ræ¾µOmᾫ!H䱤팼/;|á­ºI7슎YhuXiâš¼": -1.352716906472438E-19,
- "M⽇倻5Jä‚«à¤”á”æ¥¸#î „î¾–J[Fﹱ쫮W誻bWz?}1\"9硪뻶fe": "盬:Ѹ砿íšë•£T凊(mç¦å‘œï»R㿎艴䂵h",
- "Rë¾k힪CHé’™_i苮ⰵoᾨ紑퉎7h؉\"柀è½z0့\"<?嘭$èœ?礲7岇槀묡?Vé’¿T⣜v+솒çšÔ›2ç±³mH?>è–™å©è¿3aFÆÃ": "2,ê“´g?_섦_>Y쪥션钺;=趘F~?D㨫\bX?㹤+>/믟kᠪ멅쬂Uzỵ]$ç§`mé›ç‘Šî’ඖ鯬cꙉ梢f묛bB",
- "♽n$YjKiXX*GOè´©éƒè±®ç¥´éžK醞眡}ê—¨v嵎꼷0à­¸+Mè‹eH徸Jîžê£†:â¼æ‚¥B켽迚㯃bè«‚\u000bjꠜ碱逮m8": [
- "푷᣺ﻯd8ﱖ嬇ភHîªé¹Žâ¡±á±…0g:æžœ6$GQ췎{vá·§Yy-è„•xå¹ç ¡ï¨¬â®¸Cï§‚êš=軄H犠Gè°–ES詤Zè ‚3î§™lë´Ÿhï¿’7䦹1GPQG癸숟~[#é§¥8zQ뛣J소obg,",
- null,
- 1513751096373485652,
- null,
- -6.851466660824754E-19,
- {"ä©‚-â´®2Ù°K솖풄꾚ႻP앳1Hî³é·›wmR䗂皎칄?醜<\/&à §ã¬X濬䵈K`vJ륒Q/IC묛!;$vÏ‘": {
- "@-êš—xྐྵ@m瘬\u0010U絨ﮌé©\\켑寛넆T=tQã­¤Lì—°@脸삯e-ï–…î–‘:⩼u㎳VQ㋱襗ຓ<Ⅶ䌸cML3+\u001e_C)r\\9+Jn\\Pﺔ8蠱檾è…Pqé³è¯î¦§Tä„I": -1.80683891195530061E18,
- "á·­á‹»U~ཷsgSJ`᪅'%ã–”n5픆桪砳峣3ç®æž¾äŒ·âа呀ïŒ": {
- "Ş੉䓰邟自~X耤pl7间懑徛s첦5ਕXexh⬖鎥á€nNr(J컗|ૃF\"Q겮葲놔엞^겄+㈆è¯ã€¾í¬ç´G'E?飕1fâ¼í…¬æ‚šï•¦æ³¬ë¨Uç¬í›¶Qs": false,
- "î³…(\u20dag8í½íŠ£>^Y{뤋.袊䂓î†;_ïg]S\u202a꽬L;^'#î—™ë•bႌ?Cç·¡<ä²ä²æ–­ê6\u001asD7IK5Wxo8\u0006på¼Šâ¼‚ê¯æ‰µ\u0003`뵂픋%ꄰ⫙ë¶lå›å°›ïˆ®+ä—…E쟇\\": [
- true,
- {
- "\n鱿aKã¡â’ã¼™2ì´¹f;`ì¾qIà¡”G}ã·äç“°w늮*ç²…9뒪ㄊCj倡翑閳R渚MiUO~仨䜶RꙀA僈㉋⦋n{ã–¥0딿벑î§é€¦â¥»0î¾®h薓쯴ê»": [
- 5188716534221998369,
- 2579413015347802508,
- 9.010794400256652E-21,
- -6.5327297761238093E17,
- 1.11635352494065523E18,
- -6656281618760253655,
- {
- "": ")?",
- "TWKLꑙ裑꺔UE俸塑炌Ũ᜕-ï’‚o\"徚#": {"M/癟6!oI51niíš=댡>xê¨\u0004 ?": {
- "çš­": {"⢫䋖>u%wî²´ìž¼<ä•ê˜P䋵$é­‹æ‹U䮎緧皇Y훂&|羋ꋕ잿cJ䨈跓齳5\u001a삱籷I꿾뤔S8㌷繖_Yឯ䲱B턼Oæ­µF\\l醴o_欬6ç±=D": [
- false,
- true,
- {"Mt|êžD|Fê¶£MQ뵕T,ëºk+?ãµi": [
- 7828094884540988137,
- false,
- {
- "!༦鯠,&aﳑ>[euJê½ç¶·æB.h": -7648546591767075632,
- "-n켧嘰{7æŒæ¯„Y,>â螵煫乌pv醑Qå¶š!|âŒè²¬0왾ë¢ê…蛨S\\)ç«°'舓Q}A釡5#v": 3344849660672723988,
- "8é–ªéºV=鈢1녈幬6棉⪮둌\u207d᚛驉ꛃ'r䆉æƒà¥ˆ|bἧﺢᒙ<=穊强s혧eꮿ慩⌡ \\æ§³W븧J檀C,ᘉì˜0俯퀉M;筷ࣴ瓿{늊埂鄧_4æ¸Nn阼Jੵ˥(社": true,
- "oë¼€vwï…®)4A뢵(î¼±a䵢)p姃뛸\u000fK#KiQp\u0005ê…芅ì…îª": null,
- "ç ¥$ꥸ┇耽uæ–®Gc{z빔깎밇\\숰\u001eê´·å„㶇쵿_á´„+hç©¢p촀Ნ䃬zäé…³Ó‚31xꔄ1_ç šWë ˜G#2葊P ": [
- -3709692921720865059,
- null,
- [
- 6669892810652602379,
- -135535375466621127,
- "뎴iO}Z? 馢녱稹ᄾä©rSt帤넆&7ié¨ë©—ç•–ï”9誧鄜'w{Ͻ^2窭외b㑎粖i矪ꦨ탪跣)KEㆹ\u0015V8[W?⽉>'kc$䨘ᮛ뉻٬M5",
- 1.10439588726055846E18,
- false,
- -4349729830749729097,
- null,
- [
- false,
- "_è ¢ã ^䟪/D녒㡋ỎCä’ˆíŒïŒ¢\u0006àªq@O펢%;é¹ìŒo戥~A[ꡉ濽ỳ&虃᩾è£å”™ï¤£èŒ¨Ig楡꒻M窓冉?",
- true,
- 2.17220752996421728E17,
- -5079714907315156164,
- -9.960375974658589E-20,
- "ᾎ戞༒",
- true,
- false,
- [[
- "ⶉᖌX⧕홇)g엃⹪xëšç™Ÿ\u0002",
- -5185853871623955469,
- {
- "L㜤9ợㇶKé°â‹“V뽋˖!æ–«as|9"á¬ä†ª?î¾¶7胜&n薑~": -2.11545634977136992E17,
- "O8뀩D}캖qè‚6༣ã—䈓煮å½à¨†á޼Dᣘí›;": false,
- "YTá¡…^ï—Lã—ŽcbY$pᣞ縿#fh!ꘂb삵玊颟샞ဢ$ä—é¼’ëª~rkH^:닮먖츸륈⪺쒉砉?㙓扫㆕꣒`R䢱Bé…‚?C뇞<5Iޚ讳騕S瞦z": null,
- "\\RB?`mG댵鉡å¹ç‰©äµŽæœ‰5*e骄T㌓ᛪç¾é§’Ku\u001a[柆jUq8⋈5鿋츿myï»—?é›ux঴?": 5828963951918205428,
- "n0æ™…:黯 î¶·xu씪^퓞cB㎊á¬âº˜Ù¤Öƒ~B岚3㥕擄vᲂ~F?Cä¶–@$mï›~å¿”S왖㲚?챴⊟W#벌{'ã°Iä ç¸s樘\\X뢻9í•¡I6èㄛî‚î«8쯶]wॽ0L\"q": null,
- "x增줖j⦦tä¢áŽ™ïŠ­ã›¿Yf鼘~ê«“æ„4惊\u209c": "oOhbᤃ᛽z&Bi犑\\3B㩬劇䄑oÅ쨅孥ë©àº–acA㖫借ãžvg싰샂ãœ#譞⢤@k]鋰嘘䜾L熶塥_<\/â¾å±ˆï®Š_mYè¹t뙺}Ox=wé®®4S1ê©ï¬¾'å·‘",
- "㗓蟵ꂾe蠅匳(JPä—à·¸\u0089耀왲": [{
- "ᤃ㵥韎뤽\r?挥O쯡⇔㞚3ä¼–\u0005Pî•⋪\"Dê¶£QLn(⚘罩䩢Ŏv䤘尗뼤ë›O淽鋋î¡é—šrå´©a{4ç®™{煷m6〈": {
- "l곺1L": {
- "T'ਤ?ç …|੬Km]ä„©\"(à¿¶<\/6U爢䫈倔郴l2ã´±^줣k'Læµ–Lé°„Rp今鎗⒗Cì–¨Mí›ã¡§Î˜X粜뫈N꤇輊㌻켑#㮮샶-ä—룲è ç™œã±V>=\\I尬癤t=": 7648082845323511446,
- "鋞EP:<\/_`á§e混ㇹBd⯢㮂驋\\q碽饩跓྿ᴜ+j箿ë ã—‘yK毢宸p謹h䦹乕U媣\\炤": [[
- "3",
- [
- true,
- 3.4058271399411134E-20,
- true,
- "æ€+憱f逮@먻BpW曉\u001aã£âŽŠ$n劈D枤㡞좾\u001aá›ïŒƒè‹”౩é—1B䷒Ṋ݋âžê€žêƒç£$t੤_:蘺⮼(#N",
- 697483894874368636,
- [
- "vᘯ锴)0訶}䳅⩚0O壱韈ߜ\u0018*Ué¾ä–=䧉뽑å•휻ID쿇嘗?ꌸῬ07",
- -5.4858784319382006E18,
- 7.5467775182251151E18,
- -8911128589670029195,
- -7531052386005780140,
- null,
- [
- null,
- true,
- [[{
- "1欯twG<uä®â½ê‡£_ჟﱴଶ-쪋\"?홺k:èŽêœª*⺵꽹댅釔좵}P?=9ë ¿46b\u001c\\S?(筈僦⇶爷谰1ྷa": true,
- "TҫJYxÚª\\鰔℮혡)m_WVi眪1[71><\/ï†Q:0怯押殃탷è«ì‚¬<ỗꕧ蚨ä¡ï¨î³‰nDꌕ\u001cë…¬~è“©<N蹑\"{ä«¥lKcí˜ë«–앺:vⵑ": "gæ§µ?",
- "aꨩ뻃싥렌1`ë¡—}Yg>鲃g儊>ê¡l㻿/â‘·*ì±³6㻜W毤緛ﹺᨪ4\u0013뺚J髬e3쳸䘦伧?æª&{L掾p+꬜MäŠd娘6": {
- "2p첼양棜h䜢﮶aQ*c扦v︥뮓kC寵횂S銩&Ç{O*य़iH`Uí…à¡“rä©•5ꄸ?`\\á§«?ᮼ?t〟崾훈kè–ì/iy꤃뵰z1<\/AQ#ë¿©8jJ1z@u䕥": 1.82135747285215155E18,
- "ZdN &=dë…„á…†'ì‘â…‰:烋5&áŸï”‹á„‚汎æ¥L㯄固{é’§u\\ãŠíŠšeæ‘‘&tå—„ê–„UbâŒ?m䴘熚9EW": [{
- "ଛ{i*a(": -8.0314147546006822E17,
- "⫾ꃆY\u000e+W`௸ \"Më’¶+\\ë·lKE}(NTí‚¶Yjé¸ç¯’î©¥ì¶'jNQ硾(똡\\\"逌â´y? IRꜘ὞鄬﨧:M\\fâ ‹Cꚜ쫊ᚴNV^Dä•—ã…–á¼”Iao꿬Câ8": [
- 287156137829026547,
- {
- "H丞N逕<rO䎗:í…•<\/䶩샌Sd%^ᵯëˆ엑者g䖩똭蕮1U驣?Pâ°°\u001fp(W]67\u0015ï«£6굺OR羸#ì´Fè’ˆ;嘙i✵@_æ’¶yã¤â¤(:᧗뼢༌朆@â°ã¤¨ê­²?-n>⯲": {"": {
- "7-;枮阕梒9ᑄZ": [[[[
- null,
- {
- "": [[[[
- -7.365909561486078E-19,
- 2948694324944243408,
- null,
- [
- true,
- "荒\"并孷䂡쵼9o䀘F\u0002龬7⮹Wz%厖/*? a*R枈㌦ë¾g뒠䤈q딄㺿$쮸tᶎ릑弣^éŽ<\/Y鷇驜L鿽<\/ì¶‹9Mᲆឨ^<\/庲3'lë‚¢",
- "c鮦\u001bë‘\\~?眾ಢu݆綑෪蘛轋◜gȃ<\/â´ƒcpkDt誩܅\"Y",
- [[
- null,
- null,
- [
- 3113744396744005402,
- true,
- "v(y",
- {
- "AQ幆h쾜O+꺷铀ꛉ練A蚗⼺螔jãŒ3꽂楎䥯뎸먩?": null,
- "蠗渗iz鱖w]擪E": 1.2927828494783804E-17,
- "튷|䀭n*曎b✿~æ¤U]î­¡Gz鄭kW|ã´š#㟗ഠ8u擨": [[
- true,
- null,
- null,
- {"⾪壯톽g7?㥜ώQê‘㦀æƒã§½î“¡ä¼“\\î¦*᧰閖樧뢇赸N휶䎈pIæ°‡ï®é•Šmaᬠ탷#X?î³A+kÐM ༑᩟Ø?5꧎鰜ṚY즫궔 =ঈî³;ﳈ?*s|켦蜌wM笙莔": [
- null,
- -3808207793125626469,
- [
- -469910450345251234,
- 7852761921290328872,
- -2.7979740127017492E18,
- 1.4458504352519893E-20,
- true,
- "㽙깹?ë¨ä†¢:ä´ŽÛ»gæ® JBTU⇞}ꄹꗣi#Iî’¡ëµ£é‰r혯~脀ìƒ#釯:场:ä”>ä°®o'ã¼½HZ擓௧nd",
- [
- 974441101787238751,
- null,
- -2.1647718292441327E-19,
- 1.03602824249831488E18,
- [
- null,
- 1.0311977941822604E-17,
- false,
- true,
- {
- "": -3.7019778830816707E18,
- "Eå³¾æ†èŒ6xLIm縂0n2视֯J-ᤜz+ᨣè·mYDè±ç¹¹â¹ºäŠ“ëª“ï´€E(@è©®(!ï’Y膽#᎙2䟓섣A䈀㟎,囪QbKæ’wcG湎ꤧtGì—xâ¥ä¿Žj'A一ᯥ뛙6ㅑ鬀": 8999803005418087004,
- "よ殳\\zDâ§…%Y泥簳Uꈩ*wîRL{3#3FYHା[d岀䉯T稉駅䞘礄P:é—ˆWæ€ElBã¤å–¬èµ”bGä ¼U଄Nw鰯闀楈ePsDꥷ꭬⊊": [
- 6.77723657904486E-20,
- null,
- [
- "ཚ_뷎꾑è¹q'㾱ꂓ钚蘞慵렜떆`ⴹ⎼櫯]J?[t9Ⓢ !컶躔I᮸uz>3aã •i,錃L$æ°°í…°@7ë…«W㸮?ç¾§W뇧ꃞ,î—‘N鋮숪2ɼì½â”ä²6",
- "&y?뢶=킕올Za惻HZk>c\u20b58i?ꦶcfBv잉ETî…9jä¡¡",
- "imçŠÕƒbì¹§<D-è«‚*u2ꡜ췛~䬢(텸ﵦ>æ ¡\\뼾쯀",
- 9.555715121193197E-20,
- true,
- {
- "<㫚v6腓㨭e1ã•”&&V∌ᗈT奄5Lጥ>탤?튣瑦㳆ꉰ!(ᙪ㿬擇_n쌯IMá¿‹î£ã•¨â°æ«ˆá±·5풔蟹&L.ì²½e鰷쯃劼﫭b#ï­¶í“€7ë·„Wr㢈๧Tʴશ㶑澕é%": -1810142373373748101,
- "fg晌o?߲ꗄ;>C>?=鑰監侯Kt굅": true,
- "䫡蓺ꑷ]C蒹㦘\"1à°ƒ@å‘«\u0014NLä¾egå‘®á³,r$裢k>/\\<z": [[
- null,
- "Cä¡>?ㄤᇰﻛ쉕1஥'ÄŠ\" \\_?쨔\"ʾr: 9Sä˜ç¦ºáª§ê„‚㲄",
- [[{
- "*ç¡™^+E쌺I1䀖ju?:⦈Ꞓl๴竣迃xKC/饉:\fl\"XTFᄄ蟭,芢<\/骡軺ëœhê˜\u001f銿<棔햳▨(궆*=ä¹¥b8\\媦ä·€ë«}닶ꇭ(Kej䤑M": [{
- "1á¬?>옿Iâ•…C<ÞŽ?ꊌ冉SV5A㢊㶆z-๎玶绢2F뵨@㉌뀌oå¶”f9-庒茪ç“ë·³4": null,
- ";lá°³": "CbB+è‚»aä„·è‹*/볳+/4fq=ã°h6瘉샴4é“¢Yéª.⌖@哼猎㦞+'gꋸ㒕ߤï—ãž‘(ä¶’è·²tiâ‘´aî¥ç¡‚#Noë³”",
- "t?/jE幸YHT셵⩎Kî¹!Eq糦ꗣv刴w\"l$ο:=6:ç§»": {
- "z]鑪醊嫗J-Xm銌ç¿çµ¨c里ëç‚™Ep㣋é£ë˜¼åšŒä€“GPï¹–cmf4é¹­T䅿꣭姧â¸wy6ꦶ;S&(}ᎧKxᾂQ|tï¹ë»³k\"d6\"|Mlì·†hwLtê¼¼4$&8Պ褵婶鯀9": {"嵃닢ᒯ'î–›dá§«ä³³#Nî‡Xe3-붋鸿î¢à¬¢ë–“î§ž%dK\u0013䲎ê–YV.裸Râ‰rR3蟛\\:ì ¯:å—ĺLʆ넕>|텩鴷矔ꋅⒹ{tå­¶ã“‘4_": [
- true,
- null,
- [
- false,
- "l怨콈lá’",
- {
- "0wä²å¬§-:`䉅쉇漧\\Ü‚yㄨb%㽄j7ᦶ涶<": 3.7899452730383747E-19,
- "ꯛTẀq纤qå¶Vâ¿£?\"g}ი艹(쥯B î­T騠I=仵ë°X": {"KX6颠+&á…ƒ^fç•’y[": {
- "H?뱜^?꤂-⦲1a㋞&î‘®êƒç²¾Ii᤾챪咽쬘唂쫷<땡劈훫놡o㥂\\ Kâ´™Dç§¼Fæ°®[{'좴:례晰Iq+Iì­¥_T綺砸GOç…䟪ᚪ`î‘↹l羉qì¼Dê½áœ…훦: vUV": true,
- "u^yï³0㱓#[y뜌앸ꊬLã·©?蕶蘾â»KӼ": -7931695755102841701,
- "䤬轉車>\u001c鴵惋\"$쯃྆⇻në½€Gæ° Såª]à²²ê¨æ‡Qxኻ椕駔\\9ࣼ﫻ìœç£¡ï©ˆëºªá¶šë³l㕆t+sζ": [[[
- true,
- false,
- [
- null,
- 3363739578828074923,
- true,
- {
- "\"鸣詩 î›ë³°ã‘µgLã¯¦á¿…ì¶æ—«}ED辗ﮈI쀤-ꧤ|ã ¦Z\"娑ᕸ4çˆé¨ã£\"]ì³Af]茛⬻싦oèšk䢯ä©è½3廇喑ޅ": 4.5017999150704666E17,
- "TYႇ7ʠ值4챳唤~Zo&ݛ": false,
- "`å¡„J袛㭆ëºã³€N㺣`ê½å¶¥Kï¯SVᶔ∲퀠ç¾N딂X\"á¤hNﬨvI": {"\u20bbã­˜I䖵䰼?sw䂷쇪]î(泒f\"~;꼪FÔsá¦": {"p,'ꉂ軿=Aèš¶?bƉãµä…°è«¬'LYKL6B깯⋩겦뎙(ᜭ\u0006噣d꾆㗼Z;ä„äš”cd<情@äž‚3苼㸲U{)<6&ꩻ钛\u001au〷N숨囖愙j=BXWìš•^x芜å á¿™çˆ‚ë›·ê’»t✘Q\b": [[
- "ç±›&ଃ䩹.ꃩ㦔\\C颫#暪&!勹ꇶ놽攺J堬镙~軌C'꾖䣹㮅ï¶å²ƒá™´éµ£",
- 4.317829988264744E15,
- 6.013585322002147E-20,
- false,
- true,
- null,
- null,
- -3.084633632357326E-20,
- false,
- null,
- {
- "\"짫愔昻 Xï«\"è—£j\"\"ë¨à½…ѻ㘤㬯0晲DU꟒㸃dë²€î¢ìœ’l䦾cà©»*3": null,
- "è°ˆWm陧阦咟ฯ歖擓Nå–´ã‹éŠ­rCCnVࢥ^♼Ⅾ젲씗刊Sà¼+_tèµ”\\bäšë‰¨ê¬«6펛cL䊘᜼<\/澤pF懽&H": [
- null,
- {
- "W\"HDUuΌ퀟M'P4à¿°H똆ⰱﮯ<\/å‡è˜²\"C鴫ﭒж}ꭩ쥾t5yd诪ﮡí‰â´°@?æ°é†³rj4I6Qt": 6.9090159359219891E17,
- "絛ﳛ⺂": {"è«°Pã—®î˜è¦`ZQ?ꫦh*à´±cbâ§±}埌茥h{棩렛툽o3é’›5é®l7Q榛6_g)ὄ\u0013kj뤬^爖eO4Ⱈ槞鉨ͺ订%qX0Tì—å«·$?\\\"봅늆'%": [
- -2.348150870600346E-19,
- [[
- true,
- -6619392047819511778,
- false,
- [[
- -1.2929189982356161E-20,
- 1.7417192219309838E-19,
- {"?åµ²2à¿2\u0001啑㷳c縯": [
- null,
- [
- false,
- true,
- 2578060295690793218,
- {
- "?\"殃呎ïˆ#ã‘‘F": true,
- "}F炊_æ®›oU헢兔êˆ,èµ­9703.Bæ•°gTz3â¬": {
- "5&t3,í–“Mݸᵣ㴵;꣫ä©â†³#ï¢@ë«·ä …ï¦+W-ࣇzᓃ鿕ಔ梭?T䮑ꥬ旴]u뫵막bBè®:왳둛lEh=숾鱠på’î›î­ˆ$ì§#?gâ¹·á—Švã·µ.æ–ˆu頻\u0018-G.": "ë½™m-ouࣤ஫牷\"`Ksꕞ筼3HlȨvCï¢î›¦å ˆ\"I]㖡玎r먞#'W賜鴇k'c룼髋䆿飉㗆xgå·¤9;芔cáŒ/ax䊨♢í“rå“㸫೼䢗da᩾\"]å±£`",
- ":M딪<䢥喠\u0013ã–…x9è•ã‘‚XO]f*Q呰瞊å­VP@9,㨣 D\\穎vˤƩs㜂-曱唅L걬/롬j㈹EB8g<\/ì„©o渀\"u0y&룣": ">æ°ç·©L/ä•‘ë¯êŸ˜îŸ”蕞^aBë’£+0jK⪄瑨痜LXK^힦1qK{æ·št츔X:Vm{2rçB뾄H첚7æ°¥?쉟䨗ꠂv팳圎è¸é½€\\",
- "D彤5㢷Gꪻ[lㄆ@὜⓰絳[ଃç½ì®¹â˜’[*0ꑚ㜳": 9022717159376231865,
- "Ò–aV銣tW+$é­¿\u20c3ïœäºœ~ë«¡ᙰ禿쨽ã¡fá¹¼zE/h": "5è‡ï’Œã‹‡á²¯ì®º? 昨탰Wム밎#'\"崲钅U?幫뺀â¾@4kh>騧\\0Ò¾EV=çˆî©®ÍŒUæ€%ꉼ 㮋<{j]{R>:gÔ©L\u001c瀈锌ﯲﳡꚒ'â«¿E4æšãŒ—뵉X\"Háœ",
- "ᱚגּ;s醒}çŠSἿ㦣&{T$jkB\\\tḮ앾䤹o<é¿(tW": "vb⯽䴪䮢@|)",
- "⥒í껉%惀뗌+녣迺顀qæ¢g⚯i⤭ë£Mç¹j̈́⽜A": -8385214638503106917,
- "逨ꊶZ<\/W⫟솪㎮ᘇb?ê ”i\"H㧺x෷韒Xꫨฟ|]窽\u001a熑}Agn?Má¶–a<rà°„4Ů䢤슲AxÄ£eê³–ã´¤x竾éƒB謉鸵kè–½M)\"芣眜`è‰ê‰›ä´º": "é¹^ె캫?3耲]|Ü1ä¡’ã®]8e?ä¶^",
- "뿸樅#P㡊1M룮Uꪭ绢ꑮZ9꽸": {"\nJ^Ñ”|3袄ã…7⨆銦yîµ”çâ‹·ä»´ct?[,<\/ã…¬`?갔髞%æA೚C": {
- " 䇞3갫䅪": [{
- "0|â©ã‘‚砕ㅻ": null,
- "D箳᠉`|=â¼­)\"*࣊ã¦LjO誋": "",
- "ࠚDZmê—¥}ᷴ╈r7í—´È¥4Kp5a)o}鎘门Læ°ä†“'✎k俎c#T68Óâ©¶î¶6L鎴<r൦$黊BQYã¼³\\è·¿F慮⡨拵贀!ç”¶Vå–…/": null,
- "âµ£q⳹ﻨLk]晩1*y\\$%}ä–¶P煑㇆䈦E嫿«•Y࣓嫨ä“OL낮梚㸇洛洚BYtgl∛S☕䉓宑⋢粚ꔯ꠼붠": ")ꬑ윤`\"â°£<\/婽*Y䔸ᓰ_ï³t슲å©éš¥&S糧䛮闵诌è±sh쯽邴*ì„´ØÍŽ=㯨\"RVíž³,^t\"ac?䤒ꉀxHa=Uꛕã™î·“TkF껾",
- "å¼¾cUAF?暤cë½.欀nKì•­]r傊䀓ﯳ馽垃[䥛oI0N砊鈥헅Co쟋钄ㅷ㊌뷚7": [
- null,
- "à«“é¨?^ä†{\u0006`X䧵儱&롡尙砡\u0006ë»ì‘¬sjâ–»Xfᬶgcã„¢V >9韲4$3á»´^=ì煤áë·2䣃%ï…Žé· /eQ9頸쥎",
- 2398360204813891033,
- false,
- 3.2658897259932633E-19,
- null,
- "?ꚃ8Nnãž·å¹µd䲳䱲뀙ꪛQ瑓鎴]î’¶ä©‹-é°¾æ¡ï¾ä³¡??掊",
- false,
- -1309779089385483661,
- "ᦲxu_/yecR.6èŠ.áœ‡éŽ ~",
- -5658779764160586501,
- "ì’Œ:æ› =lìœä¢œwk#s蕚\"互㮉m䉤~0ë“䋙#Gîš¿;h숄옥顇෤勹(C7㢅雚ã¯Lâ …VVç°…<",
- null,
- -4.664877097240962E18,
- -4.1931322262828017E18,
- {
- ",": {
- "v㮟麑䄠뤵g{Më®.\u001bzt뢜뵡0Ǥ龍떟Ᾰ怷ϓRT@Lꀌ樂Uã â¾•e扉|bJg(뵒㠶唺~ꂿ(땉x⻫싉ìŠ;%0鎻V(o\f,NéŠ%nk郼螺": -1.73631993428376141E18,
- "쟧摑繮Q@Rᕾ㭚㾣4隅待㓎3蒟": [
- 4971487283312058201,
- 8973067552274458613,
- {
- "`aæ™á£—î\u0015i<S幼訃锭B0&槩✨[Wpçš©[g≊k葾x2ᡆ橲䲢W": true,
- "kH皈Sê±qå‚‘u?솹풑~o^F=ï¦N*reî••J沤wW苯7pã¼¹äŽa=ꮧLã·©냴nWꌑ㞱uuè°lVNç¿á¤»(eè±¶5#L쪉ᅄ઄\u0015숟봊P瀚X蓎": false,
- "䫯דּ〖Scä›­ì Lëµ¾pî«“CꙞ\"엇즓_ﰛ톣ꫀ먩㺣㮠⭴!\\Wâ”tä–°è»…y\u0014~ᇰ렢E7*俜䥪W䀩ä·hë´†vjஉ묣à¼G39.뼳輼:㮿á¦A饕TUL}~": [
- null,
- 8.8648298810470003E17,
- 5.735561205600924E-20,
- null,
- -102555823658171644,
- 1.2674932032973067E-19,
- {
- "D胣O㯨\u0017Ku눓ã’í…nᨊ!Ꚇ廫_>Bo¸": 4.3236479112537999E18,
- "HW&퉡ãåœ<W)6æ‚°ê ‘HEp14xy峑ft\u0005s亘V튉䢮ꦈXåµê¬?lI_ë춇-6Ss噺Nk-ﮥíƒÜ郪*ï“­PR(S6â•‹@ä»™V懸뺵ﯜVç²¹": "9䗌斀4ãˆ^Qséš„ç¡j\u0003",
- "Vké¶…Cæ³¹ç­HX훉朗*r\\z顊誌儖4?n7á¾6몋䎡ﳈ],Hé ¢pèšã‘„P4满Eä©V䬕à¸L廂쒬î®ì‘¨ê†·hè¿¡ê°è­–墎 î‡]鹿ฌ7ﶽ冭༽<ꈓS\\lä‹®?_ユ檒?": -8598528325153980065,
- "t=qí£ç–»Ñ‚Z\\錅J.镎|nfḷ鴒1厰Lç¯çºœîŒ•E]୦⥪]á®'ç¾p/å’©0닳ï³qﳖཽk ?X1Ft%ś뭢v鋋⺃爵⒗": [[
- 5.0824756359232045E-19,
- [
- 7.268480839079619E-19,
- {"탿^굞⧕iјëŠê€›w껩6ꟳXsé…š\\>Y?ç‘¡Qyí›q!帰ï©s舠㫸zêš—aSæ­²v`G株巷Jp6킼 (ê·¶é”â¾î‹¥â¡ˆ>Mæ±ãžá‰´ê™²dv@i㳓ᇆ?é»": [
- null,
- 4997607199327183467,
- "E㻎蠫á¾é«˜ä™Ÿè˜¬æ´¼æ—¾ï« í…›ã‡›?'M$㣒蔸=A_亀绉앭rN帮",
- null,
- [{
- "Eᑞ)8<Zî¿—ã¡¿W镀䛒Cìƒî¿«V?0ꯦ+tL)`é½³AjBå§€Xà³³D빠㻲ƙgn9â‘°à¾á¿œ&\"ãš¹>餧A5u&ã—¾q?": [
- -1.969987519306507E-19,
- null,
- [
- 3.42437673373841E-20,
- true,
- "eê±·Må¢\"割Pâ›í§åŽ€R䱜3ï»´Oí“«r﹉⹊",
- [
- -8164221302779285367,
- [
- true,
- null,
- "爘y^-î¬?蘞Ⲽꪓaâ…ê¨}I",
- 1.4645984996724427E-19,
- [{
- "tY좗⧑mrzïºã¿¥â´–᥷jè«…\u0000q賋è­êž„â®±S\nà¡£B/íƒêµª3ZÉ‘å¤o<\/;ë¡‹": null,
- "彟hæµ _|V4䦭Dᙣ♞uì¿»=ì‚®ã¦\u001e哀鬌": [{"6횣楠,qʎꗇ鎆빙]ã±­R굋鈌%æ ²j分僅ペ䇰wí¦î¼‹p蛃N溈ê¡ê€?@(GI뉬$ﮄ9èªê“š2e甸ڋ[äº,\u0011\u001cࢃ=\\+衪䷨ᯕ鬸K": [[
- "ㅩ拏鈩勥\u000etgWVî–¨Xs陂è¦p狵w퓼{뮵_i\u0002ퟑႢâ¬d6é‹«F~챿æŸ\u0096äš¼1ۼ칥0꣯å„=鋷牋ⅈêžé¾",
- -7283717290969427831,
- true,
- [
- 4911644391234541055,
- {
- "Iî¹éˆ’ì²½P릜朸W徨觘-HᎄíŸâ“º>8kr1{ê²µäƒã€›á¬¡Ì¨Oê·‘oä•'쿡鉕p5": "fvç²–RNçž–è›a?q꤄\u001d⸥}'ꣴ犿ꦼ?뤋?鵆쥴ë‹ä¡«s矷̄?à¶£/;괱絢oWfV<\/\u202cC,ã–¦0䑾%nè³¹g&T;|lj_欂N4w",
- "짨䠗;䌕u i+rà¹0": [{"9ä¥\\à°©8\"馇z䇔<\/á‚¡Y3e狚ì¡\"ุ6ï°†Zé–c\"Ll:ïŠê®¾ç–£<\/᭙O◌납୕湞9⡳Und㫜\u0018^4pj1;ä§å„‚ä—·à­—>@e톬": {
- "aâ‘‚Fé‹»Qèž°'<퇽Qè´ç€§{ᘪ,cP&~䮃Z?gI彃": [
- -1.69158726118025933E18,
- [
- "ê¶‚z簽㔛㮨瘥⤜䛖Gℤ逆Y⪾j08î±²Sn昞ꘔ캻禀鴚P謦b{ê“®mNéMᥙ5\"ç2냑I\u0011.L&=?6á„ ë»·X鸌t刑\"#z)o꫚n쳟줋",
- null,
- 7517598198523963704,
- "ኑQp襟`uᩄr方]*F48ꔵn俺ሙ9뇒",
- null,
- null,
- 6645782462773449868,
- 1219168146640438184,
- null,
- {
- ")ယ넌竀Sdä°¾zqâ«£âŒÊ¥\u0010á¿“' |磪&p牢蔑mï³V蘸૰짬꺵;K": [
- -7.539062290108008E-20,
- [
- true,
- false,
- null,
- true,
- 6574577753576444630,
- [[
- 1.2760162530699766E-19,
- [
- null,
- [
- "顊\\憎zXB,",
- [{
- "㇆{CVC9ï¼MN㜋ઘR눽#{h@ퟨ!鼚׼XOvXS\u0017á£=cS+梽៲綆16së½íœy屬?ᇳG2á´­\u00054쫖y룇nKcW̭炦s/鰘ᬽ?J|퓀髣n勌\u0010í™ P>j": false,
- "ç®´": [
- false,
- "éžj\"ꮾ*엇칬瘫xṬ⭽ì©äƒ³\"-⋵?ᦽ<cਔ↎⩧%鱩涎삧u9K⦈\"á¿á¬‘V绩킯愌ṱv@Gê¾è·¶êš†(?ä–ƒvIá§ŠxV\r哦jã ’?*=S굤紴ꊀ鹭쬈s<DrIu솹꧑?",
- {
- ".}S㸼L?t\u000fK⑤s~hU鱜꘦}ìªC滈4ꓗ蛌):ྦ\"é¡¥ì´â¢·ïš­á¿³YLn\"?fꘌ>댎Ĝ": true,
- "Pg帯佃籛n㔠⭹࠳ë·â‰»à¿Ÿ3ãž±ï“!î—-ì’¾!}쭪䃕!籿næ¶»J5ਲ਼yî˜vy;Rኂ%ᔡጀ裃;M⣼)쵂쑈": 1.80447711803435366E18,
- "ꈑC⡂ᑆ㤉壂뎃Xub<\/쀆༈憓قì¨×§\\": [
- 7706977185172797197,
- {"": {"K╥踮砆NWࡆFy韣7ä밥{|紒︧䃀榫rᩛꦡTSy잺iH8}ퟴ,M?Ʂ勺ᴹ@T@~꾂=I㙕뾰_涀쑜嫴曣8IY?ҿo줫fऒ}\\S\"ᦨ뵼#nDX": {
- "♘k6?଱癫d68?㽚乳䬳-Vé¡·\u0005è•?\u0018䞊V{邾zã˜l]é›k臤~ൖHë’iꢥ]g?.G碄懺䔛p<q꜉Så²—î¥_.%": 7688630934772863849,
- "溗摽嗙Oã§€,⡢⼰呠ꅧ㓲/葇䢛icc@-r\b渂ꌳ뻨饑è§á–œ\\é®­\u0014엙㥀᧺@æµ¹W2꛵{W률G溮킀轡䬆g㨑'Qè¨ï†áŸªç½‘Hd\"Q늴ᱢﶨ邮昕纚枑?â–°hr羌驀[ç—¹<\/": [
- -1.0189902027934687E-19,
- {"窶椸릎뚻shE\"ꪗႥꎳU矖佟{SJ": [{"-æ…œx櫹XYîƒ-æ¾Ü¨â£·àª¢ïŸé¯™%Fu\u0000è¿‹â–’}᥷L嗭臖oញc넨\u0016/迎1b꯸g뢱ã§è“¤ä’8C散삭|\"컪輩鹩\"\\g$zG䥽긷?狸꿭扵ã²:URON&oU8": [
- null,
- true,
- null,
- -2.8907335031148883E17,
- -3864019407187144121,
- {
- "`빬d⵺4H뜳⧈쓑ohஸ*ã¶ï»‡â¸•ä µ!iä¬ï¹‘h夘▥ê—푹갇㵳TA鳠嚵\\B<X}3訒câ‹{*ï«¢w]ç’¨-gæ­\\j໵侠Ei层\u0011": 3.758356090089446E-19,
- "䄘ï®)Y놞씃㾱陰í:{\u2059/Sâ“´": [[
- null,
- [[
- -3.8256602120220546E-20,
- null,
- 7202317607724472882,
- "CWQëš¿",
- null,
- false,
- true,
- null,
- 2857038485417498625,
- 6.191302233218633E-20,
- null,
- -6795250594296208046,
- [
- true,
- {
- "%á‹§é°Yᚯ⚀x莰愒Vᔈ턗BNæ´ê¤ŸA1âŒl콹풪H;OX๫륞ìªá°šÑ†@͎黾a邬<L厒Xb龃7f웨窂二;": [[
- null,
- "耲?䙧㘓F6Xsí‹­ë©¢.v뚌?鄟æ â–½'묺競?WvᆾCî»txo?dZ;䨸疎",
- {
- "@hWê‰&\"빜4礚UO~C;ã†î”殩_ꀥè˜å¥¢^챟k→ᡱKMⵉ<\/Jㅲ붉LÍŸQ": false,
- "tU뢂8é¾°I먽7,.Yî°î»´æ½Z툼=&⨥覽K乫햶㠸%#@Zë–æ„“^âŠâ¾‚몒3E_噆J(廊ឭyd䞜鈬Ћ档'⣘I": {
- "tK*ꔵ銂u艗ԃì¿âˆ³ê„‚霫X3♢9y?=â²­dЊb&xy}": [
- -4.097346784534325E-20,
- null,
- 6016848468610144624,
- -8194387253692332861,
- null,
- {
- "(祬诀譕쯠娣cë´r?ç•„kT뼾⌘⎨?noVä˜ì¥ç¡Žn?": [
- 1.82679422844617293E18,
- [
- false,
- 2.6849944122427694E18,
- true,
- [
- false,
- {
- ";0zâ­†;í™”$bਔ瀓\"衱^ï—´?잢ᢛ⣿~`ꕉ薸⌳໿湘腌'&:ryБꋥá¼ê’¥ç­™ê¬œê¸¨?X": -3536753685245791530,
- "c;Y7釚Uꃣ割J༨Y戣w}c峰뢨㽑㫈0N>R$ä…’X觨lë´œA刊8R梒',}u邩퉕?;91Eî¦a䈈ë¯G⊶芔h袪&廣㺄j;ã¡ç¶½\u001bN頸쳘橆": -2272208444812560733,
- "æ‹‘Wﵚî²j鵼駳Oࣿ)#ã¾…é¡‚N傓çºy僱栜'Bê-!KF*ꭇK¦?䈴^:啤wG逭w᧯": "xᣱmYe1Û@霄F$ě꧘푫O䤕í€Pq52憬ꀜ兴㑗ᡚ?ï—ƒLé·íŸî—¼ë­zJê‘™}╆ᅨJB]\"袌㺲u8䯆f",
- "꿽á…㔂긱Ǧ?SI": -1669030251960539193,
- "ì‡É¨`!葎>瞺瘡驷錶â¤ï»®é…œ=": -6961311505642101651,
- "?f7♄꫄Jᡔ훮eì‡îª¼í¾á£ä­´KhखT;Qty}O\\|ë«Iá¿’Ne(5æƒê¥¶ã†·Y9ﮡ\\ oyâ­–-䆩å©m#xë´‰>Y鈕Eç–£s驇↙ᙰm<": {"퉻:dê‚&efᅫ쫢[ï„™\"ëˆëŠ–êº™|Ôå‰1Í–-K:Êšá­•/;ì–㷛]Iç—èŒ4g<Oꗢ뫺N쯂륬J╆.`ᇵP轆&fd$?è‹…oê¶“vO侃沲â©åš…æ²— E%â¿°ì–¦wi\\*è¶«": [
- 3504362220185634767,
- false,
- "qzXæœqT3軞T垈ꮲQ览ᚻ⻑쎎b驌䵆ꬠ5Fà­—ä²ç¼¿ê蒇潇Ltᆄ钯蜀W欥ሺ",
- "ë³°É霬)ì é¶¼kwocì—·èr \u001d쒷⎹8{%澡K늒?iﺩd=&皼倚J9s@3å›twὡgjä íª5⭉⨺役&놎cﺉ㺡N5",
- false,
- null,
- "D0st[ni锹r*0k6ꀎë‡UX2⽼৞䃚粭#)Zæ¡·36P]<\/`",
- 4281410120849816730,
- null,
- -3256922126984394461,
- 1.16174580369801549E18,
- {
- " ᆼꤗ~î…‰*TN긂<㡴턱℃酰^蘒涯잰淭傛2rൡetì¾£ä‡m*ã¸y\"\\糮᧺qv쌜镜T@yg1譬ﭧﳭ\f": null,
- "圾ᨿ0xᮛ禵ਗ਼D-㟻ẵ錚e\"赜.˶m)é´‘B(I$<\/轴퉯æ·â‹âº*)宓쓌?*橯Lx\\f쩂㞼⇸\"ﺧ軂é³V\\ë•’\"캘c:G": null,
- "?ïµ_ê³¢î™ç¿¸íˆ8ã¿ hì—´Q2ã­›}RY㯕YT놂⽻e^B<\/맫ﻇ繱\u0017Gц⟊ᢑﵩS:jt櫣嗒⟰Wã´šæ¦á…‰e[w䋺?藂翙Ⲱ芮ä˜â•¢å›¥lpdu7r볺I è¿‘qFyᗊ": [
- "$b脬aᅠ襬育Bگ嵺Pw+'M<\/ï­näššvèžbNâ’‚}褺%lቦ阤\"ꓺá—Mç‰,Ûžï– Ò¶!矬?ke9銊Xê´¦)䈽í‹è„½á¹«äˆžá´†^=Yá—¿é›4I귺⋥%",
- false,
- 2.9444482723232051E18,
- 2072621064799640026,
- "/_뇴뫢jã’=Nꡦâ†Ôºèµ’â¬î»¼í†¥ä¨žç¯su*媸瀳鷔抡oíº-៳è¾å‹·fç»”:äµ¢æ¢2",
- false,
- "ì’œ Eî½·äŒ/í\u0018懺_<\\隺&{wF⤊谼(<죽é ïŸ‡8?@*rá¶ŠGd뻻갇&Ⳇq᣿e࢔t_ꩄ梸O詬Cá§§Kê© í’¤9눙醅ëž}竸rw?滨ӽK⥿ཊGé­²']`๖5ã„°",
- -2375253967958699084,
- {"嗱⿲\"få„„á¬": {"v?䚑킡`â—¤k3,骥曘뒤Oᒱ㲹^圮᠀YTê»›&ì´®P:G/Tâ£#튣k3ç‚©è k@橈ä·Sä§•,ç†œïŒæ™¬ï£žk1鮥玸먚7䤡fç»å—šìƒ´á¥’~îš¼0q拮垑aë»±Lâ°–_": [{
- ":på°¢": -6.688985172863383E17,
- "A0\u0001疠ﻵ爻鼀湶I~W^å²€mZx#ãˆ7r拣$Ꜷ疕≛⦒痋盩Vꬷá­â„¦Qêªï§éˆ‘A(劽詗ꭅo-ç¶é‘º\"Ⓠ@$j탥;": [
- 8565614620787930994,
- [
- "å¶—PC?à¶‹Q㪣$&j幾㾷hæ…‘ 즊慧⪉霄M窊ê·'鮕)äŠé“¨m趦䗲(g罣ЮKVﯦé®î¦®5囗ﰼ鿦",
- -7168038789747526632,
- null,
- -7.8069738975270288E16,
- 2.25819579241348352E17,
- -6.5597416611655936E18,
- {
- "瘕멦핓+?フZê·¢zé›V": {
- "ᕾ": 1.7363275204701887E-19,
- "ã­Œs뎹㳉": {"\u00187Fï–‰I6Yféº+UC쬸éºâ²ä‚¿ê¸•R\\ᆮC?Φ耭\rOத际핅홦*ë² W㸫㯼᡹cㅜ|Gã®—\u0013[o`?jHVì•?蒪꩚!í«áœ¦ãŒ‡äš‡é¿˜:@": [
- "}푛Г콲<äŸCè—呈#2ã“‹#ྕáŸå°¿9qç«“gI%ëž™mê¬oaç•è´¿Jå’¿D_ç†Zz皳験Iè±¼B扳ḢQ≖㻹㱣Dä¦ï©—2'á—㗣▌ç ²8罿%à°¹F姦;0î·æ‚‡<\/\"påš§",
- -710184373154164247,
- "Vo쫬⬾ê«â´·Å»\u0004éŽHBê…¸_aVBHbN>Z4âœkเꛘZ⥺\\Bʫᇩ鄨魢弞&幟ᓮ2̊盜",
- -9006004849098116748,
- -3118404930403695681,
- {
- "_彃Y艘-\"Xx㤩㳷瑃?%2ä¡éµ›o<A?\"顜ᘌΈ;â·…Cæ´ºL蚴蚀voq:,Oo4쪂)": 5719065258177391842,
- "l륪맽耞塻論å€Eã—‘/㲕QM辬I\"qi酨玑㖪5q]尾魨鲡ƞY}⮯蠇%衟ï„Fsf윔äšì°¤iè…³": {"ꢪ'a䣊糈": {"ë°‘/♋S8sã¼´5瓹O{댞\"9Xï°‡lJ近8}q{긧ⓈI᱑꿋腸D瀬H\"ﺬ'3?}\u0014#?丙㑯ᥨ圦',gé‘ (樴턇?": [
- 2.5879275511391145E18,
- null,
- [
- "3㼮ꔌ1Gẃ2Wé¾™jîªÍŠ{1å›ã¦­9xå® ã‘oRä•犽",
- 1268729930083267852,
- "땕軚⿦7C",
- [
- -3.757935946502082E18,
- "\"赌'糬_2ë­¾áb",
- {
- "(a䕎ጽjÒ°D4.á´¡ïž½66ԃ畮<\/l`k癸\\㇋ࣆ욯R㫜픉녬挛;ڴ맺`.;ç„“q淞뮕ٹ趴r蔞ꯔ䟩vç²u5<\/pZ埖Skrvj帛=\u0005aaï”›": null,
- "璄≩ v몛ᘮ%?:1頌챀H㷪뉮k滘e": [
- "ꤾ{`c샬왌펡[俊络vmz㪀悫⸹ᷥ5o'ã¾µ L蹦qjYIYណԠWëƒå‰«<\/W嗂0,}",
- 2.4817616702666762E18,
- false,
- null,
- null,
- -8.6036958071260979E17,
- null,
- -1.2744078022652468E-19,
- -4.4752020268429594E17,
- 1.13672865156637872E17,
- [
- false,
- false,
- null,
- -4.178004168554046E-20,
- true,
- 2927542512798605527,
- {
- ".ꔓ뉤1䵬cHyæ±¼äŠ†è³“á‡Æ©|樷â‡é†Žã¬…4\u0003èµµ}#yD5è†æ™¹ë±“9ê–è™›J㺕 t䊛膎ؤ": {
- "rVtᓸ5^`েNâ¹»Yv᥋lꌫt拘?<é®°ë„¿ZC?ã’½^": {"âªî©k_:>귵옔夘v*탋èŒ&㳈챗|Oé’§": [
- false,
- "daꧺdᗹ羞쯧Hã¤é„³é ³<型孒ン냆㹀f4ã¹°\u000f|C*ሟ鰠(O<ꨭ峹ipຠ*yà³§4VQè””hVæ·¬{?ᵌEfrI_",
- "j;ꗣ밷é‚副]á—“",
- -4299029053086432759,
- -5610837526958786727,
- [
- null,
- [
- -1.3958390678662759E-19,
- {
- "lh좈T_ë¯Y\"伨\u001cꔌG爔겕ꫳ晚è¸â¿»ìT䯎]~e#฽燇\"5hٔ嶰`泯r;ᗜ쮪Q):/tç­‘,榄&5ï¤ëŽ«ç‹(": [{
- "2áâ“›]r3C攟וּ9è³µsâ›”6'ஂ|\"ⵈ鶆ä¹ç¦3\"痰ࢤéœäµ©ì˜†äŒ€?æ •r7Oç°‚Isd?K᫜`^è®¶}zî°’8?zì–°î§T:X倫⨎ꑹ": -6731128077618251511,
- "|︦僰~m漿햭\\Y1'Vvخ굇á‰ì±¢cè¶–": [null]
- }],
- "虌魿閆5⛔煊뎰㞤ᗴꥰF䮥蘦䂪樳-Ká·-(^\u20dd_": 2.11318679791770592E17
- }
- ]
- ]
- ]},
- "묗E䀳㧯᳀逞GMc\bï•¹å¢¹ã“„ë–Æ &U??íŽŒé‘ åª‹k))ᄊ": null,
- "묥7콽벼諌J_DɯﮪMæ®´ä£,煚ྼ`Y:ì”§<\/â©«%yf䦀!1á²¶kì¶ŽQç±³W∠WC跉鬽*á›±i<?,l<崣炂骵*?8í‘៣ⰵ憉⎑.,Nwç½£q+ο컆弎": false
- },
- "e[|଀+î±³lꑸãˆTT?ë¿¿|ê«›9`㱯䊸楋-곳賨?ì³k棽擋wQ餈âŸNq[q霩䵀뷮锅ꚢ": 5753148631596678144,
- "sá“鴻߸d렶ὕ蜗ဟ툑!诉౿": false,
- "|4䕳鵻?䈔(]í‹/Ui#æ¹»{듲ーMá‹€t7潔泄Ch⸨}ì£`î¤èž§éŠšã‹¼å£¯kâ°¥Q戵峉갑xè¾™'ì²›": "jd䘯$䕌茷!auw眶ㅥä£ê†¢æ°‘i",
- "剖駰Ɜî¶sM2]á¾´2ࡷ祅拌Av狔꩛'ê“—í‚§ê£0酜✘O'": false,
- "澩뢣ê€eU~D\\ꮡ킠": "v^YC嚈ί\u0007죋h>ã´•L꘻ê€ì“ª\"_gé¿„'#tâ½™?,Wg㥖|D鑆eâ¥ìª¸åƒ¬h鯔咼ඡ;4TKèŽî¾‘졠嫞"
- }
- ]
- ]
- }
- ]
- ]
- ]}}
- }
- ]}
- },
- "뿋뀾淣截䔲踀&XJ펖꙯^Xb訅ꫥgá¬>棟S\"혧騾밫ê²7-": "擹8C憎W\"ìµ®yR뢩浗絆䠣簿9äˆå¼•Wcy䤶孖ꯥïž;íŒ]輩ä3@{å 뽸0ï€á¡ˆìµ¡î›„Ⲇ\u001dLåŒê§2F~ݕ㪂@W^é½L襒ᦘî¢~沦zZ棸!꒲栬R"
- }
- ]
- ],
- "Z:ëƒàµ›5Iz찇䅄駠㭧蓡K1": "e8᧤좱U%?ⵇ䯿é¿\u0013縮R∱骒EO\u000fg?幤îš@֗퉙vU`",
- "äƒìªˆï‘’埽້=Ij,쭗쓇చ": false
- }]}}
- ]
- }
- ]}
- }
- ]
- ]
- ],
- "咰긖VM]á¼6䓑쇎çºetDÒŒ?ãžê©„퇫밉gj8è ƒ\"â©5䛹1ࣚ㵪": "ക蹊?⎲⧘⾚̀I#\"䈈⦞ë·`wo窭戕෱휾䃼)앷嵃꾞稧,Ⴆ윧9S?೗EMk3Მ3+e{â¹”Te驨7äµ’?타Ulg悳o43ï“¢"
- }
- ],
- "zQᤚ纂땺6#ٽ﹧vï¿¿#ࠫ휊冟蹧텈ꃊʆ?&a䥯Deæ½|ì¿“pt瓞㭻啹^盚2êŠf醪,ì–T窧\\Di䕎谄nn父ꋊE": -2914269627845628872,
- "䉩è·|㨻ᷢã‰B{蓧瞸`î°²I!℄욃힕#ೲᙾ竛ᔺCjk췒늕貭è¯\u0017署?W딚%(pê⤼ë³^=on뺲l䆼bzrﳨ[&j狸䠠=ᜑꦦ\u2061Õµnj=牲攑)Mî»\\é¾": false,
- "뎕y絬᫡⥮Ϙᯑ㌔/NF*Ë“.ïž¿,QEzvK!Iwz?|쥾\"ê©»Lê¼—Bê”§è³´ç·œs뉣隤茛>ロ?(?^îµ­`>冺飒=噸泥⺭Ᲊ婓鎔븜z^å·è£®Ãªâ“…à»—jM7ﶕ找\\O": 1.376745434746303E-19
- },
- "ä›ræ»–wã¤<k;l8ꡔጵ⮂ny辶⋃í¼åƒ®z\"﮲X@t5෼暧퓞猋♅䦖QCé¹®|픨( ,>,|Nዜ": false
- }
- ]],
- "@ê¿™?è–•å°¬ gd晆(ë„5躕ﻫS蔺4)떒錸ç“?~": 1665108992286702624,
- "wë¯ná =`঺ᅥC>'從ë槷ä¤çœ·èž„ãŽ»æ°æ‰°XᅧCè´½uáƒë‚ŸjKD03T!lDV쀉Ӊy뢖,袛!终캨G?鉮Q)â‘—1쾅庅O4ê‰H7?d\u0010蠈줘월Þ粯Q!낇껉6í…|{": null,
- "~˷jg쿤촖쉯y": -5.5527605669177098E18,
- "펅Wᶺzê†ã¨í‘­e?4j仪열[D<鈑皶婆䵽ehS?袪;Hê¨Më—Žã°[(å—M3qíŸg4y╸鰧茀[Bi盤~ï«å”Žé‹†å½ºî½«â¦Šq?î–³B4쉓癚O洙킋툈䶯_?ퟲ": null
- }
- ]
- ]]
- ]],
- "꟱Ԕã¤7æ›ï¦—ಃéŒVä·°?v㪃૦~K\"$%请|ꇹn\"kä«›ã¨é²¨\u2023ä„¢\u0004[<S8á¬ë­©è„¥7U.m࿹:Dè‘┆2蘸^U'w1ì …;䠆ꋪBê»®>︊Vï‹•J?䶟ាꮈ䗱=깘U빩": -4863152493797013264
- }
- ]}]}
- ]
- }}}
- ],
- "ì·ì²Û¹í‰ƒ~aEå”™a챑,9㮹gLHd'ä”|í‚—ãžäŽ¥&KZYTë§µ7䥺N<Hp4ê•­â¹ ê½c~çš½z": "课|á–¾ä¡å»‹è„äªW\u0016&Jnê´b~æ‘“M>â±³åŒèŽžé¿§w\\༌疣n/+ꎥU\"å°ëž¾â—‹íŸ™AJá­Œ?9ä›$?é©”9è®ì§˜é­¡TÖ¯cè—³`虉Cì‡ì¦T"
- }
- ],
- "è°¶ê°œgTRï¿>áµÍšdtæ™‘ä‰‡é™æ»º}9㉸P漄": -3350307268584339381
- }]
- ]
- ]
- ]]
- ]
- ],
- "0y꟭馋X뱔瑇:䌚ï¿å»¿jîžg-懲鸭䷭垤㒬茭u賚찶ಽ+\\mT땱\u20821殑ã„J쩩䭛ꬿNSæ½”*d\\X,壠뒦e殟%LxG9:摸": 3737064585881894882,
- "í’µO^-â§§â…¶vѪ8廸鉵㈉רâ†Q㿴뺟EႳvNM:磇>wî·/៻唎뷭୥!냹D䯙iëµ±è²C#⼉NH6`柴ʗ#\\!2ä‚—â±§f?諳.Pëˆ-è¿”I꘶6?8î“ê˜": -8934657287877777844,
- "溎-è˜å¯ƒi诖ര\"æ±µ\"\ftl,?d⼡쾪⺋h匱[,à·©I8MÒ§F{kç“¿PAî…§'橸ꩯ綷퉲翓": null
- }
- ]
- ],
- "ោ係Øî½<å…ƒ": 1.7926963090826924E-18
- }}]
- }
- ]
- ]]}]
- }]
- ]
- ]
- ]
- ],
- "ጩV<\"ڸsOᤘ": 2.0527167903723048E-19
- }]
- ]}
- ]
- ]],
- "∳㙰3ì ´pá§—ä±™?`<U὇<\/æ„E[ᮚAî›j诂ᒽ阚uv徢ဎ떗尔ê½í›€ì©‘Jä´?âª=륪ᆩ푰ஓã•?럽VK\"X?檨လ齿I/耉A(AWA~â¯ç¨è¹«": false,
- "å’å¦ë¾‡}䀼链i⇃%⋜&ç’ªIx渥5æ¶§qq棩á¥-â «AA낇yY颕A*ïˆè£¦O|n?䭬혗F": null,
- "ç­CLì–­B혆Kॎ`鎃nrî€sZiÕªWç )?p~K~A眱ä²QO妣\u001b\u001b]ᵆᆯ&ã‹á¹è±‰ëº˜$ê­§#j=C)祤⫢歑1o㒙諩": 7028426989382601021,
- "쳱冲&ဤäŒì•§h胺-é½±H忱8왪RDKᅒ䬋ᔶS*J}ስ漵'㼹뮠9ê±¢9p봋경ጕtởꚳT䶽瘙%ì¶´`@nಆ4<d??#僜ᙤ钴=薔ꭂbLXNam蹈": "樭る蹿= Uî ƒurwkn뙧⌲%\"쑃牪\"cq윕o@",
- "溌[H]焎SLã…?뀼䫨ç½W": 1.1714289118497062E-19,
- "ﬢp븇剌燇kĔ尘㶿㴞ç ê¾˜Ia;sâº^)$ç©®?sHᢥíªl": null
- }
- ]
- }
- ]
- },
- "TKnzj5o<\/K㊗ꗣ藠⦪駇î€>yZA8Ez0,^á™›4_0븢\u001ft:~䎼s.bb룦明yNP8弆Cå¯;⪾ì§'蕴뮛": -6976654157771105701,
- "íµê¦€\\㇑:nî‹™v+뒤燻䀪ﴣï·9ᚈ኷K㚊誦撪䚛,ꮪxሲ쳊\u0005HSf?asg昱dqꬌVꙇ㼺'k*'㈈": -5.937042203633044E-20
- }
- ]
- }],
- "?}\u20e0],så¶³è‹@#2uì’´sQSä©—=ꥮ;烌,|ꘔ䘆": "á…©ì˜Nç’ kZ먕眻?2ቲ芋眑D륟渂⸑ﴃIRE]å•—`K'"
- }},
- "쨀jmV賂ﰊå§ä‚¦çŽžã¬™áªM᪟ïՎ씜~`uOn*ॠ8\u000ef6??\\@/?9見d筜ﳋB|Sä¬è‘«ã½o": true
- },
- "즛ꄤ酳艚â‚㺘봿㎨iGà§•à¡¿?1\"䘓您\u001fSáŠâº¿æºzៀ뻤B\u0019?ìœa䳵᭱䉺膷d:<\/": 3935553551038864272
- }
- ]
- ]}
- ]]
- ]]
- ]}
- }
- ]
- }
- ]]}},
- "᥺3h↛!ê‹°y\"攜(ெl䪕oUkc1A㘞ᡲî촾ᣫ<\/ä’ŒEã›æ½¨i{ï  v?Wà±¾H\\RჅpzè¬R脾;v:碽✘↯삞鷱o㸧瑠jcmK7㶧뾥찲n": true,
- "ⶸ?x䊺â¬-ä°…â‰!e쩆2ꎿ准G踌XXᩯ1ß}0?.í—€Z馟;稄\baDꟹ{-寪⚈ꉷ鮸_L7ƽᾚ<\u001bጨA䧆송뇵⨔\\ç¤ë—”d设룱㶉cq{Hyã±R㥽å¢ï¬…p": -7985372423148569301,
- "ç·«#ì½®IB6<\/=5Eh礹\t8럭@饹韠r㰛斣$ç”LVì·a갵îŸ'请o0g:^": "䔨(.",
- "ë³â„¡åœ¤pï¾à¯„Ä倧訜BìŸGä™”\"Sbâ“®;$$â–S1J뢙SF|赡gï„€*\"Vu䲌y": "䪈&í‹),\\kT鬜1í’¥;ë·´'Zေ䩹@Jéž½Nã¼M?å¥eWb6榀ƩZڮ淽⺞삳煳xჿ絯8eâ¶ç¾·V}ჿ쎱䄫R뱃9Z>'\u20f1â“•äœé½®"
- }
- ]
- ]]]
- }}
- }
- ]
- ]},
- "펮b.hç²”í¯2npXè©«g錰鷇㇒<ì™S値bBi@?镬矉`剔}c2壧ଭfhY깨R()痩⺃a\\â”?M&ﯟ<劜꺄ï‘멊ᄟA\"_=": null
- },
- "~æ½¹Rqn榢㆓aR鬨侅?䜑亡V_ç¿…ã­”(ä“·w劸á³Dp䀅<\/ï°Žé¶Šm䵱팱긽ꆘ<tD쇋>긓准D3掱;o:_Ñœ)껚콥8곤d矦8nP倥ꃸI": null,
- "뾎/Q㣩㫸벯➡㠦◕挮aé¶§â‹“å¼\u00001뱓fm覞n?㛅\"": 2.8515592202045408E17
- }],
- ",": -5426918750465854828,
- "2æ««@0柡g䢻/gꆑ6演&D稒肩Y?艘/놘p{f투`飷ᒉ챻ëŽîª–<늛ä˜ï´¡ì¤°ì«„": false,
- "8î™–(鸑嵀⵹ퟡ<9㣎Tߗ┘d슒ل蘯&㠦뮮eà kç g ì—»": false,
- "d-\u208b?0ﳮ嵙'(J`蔿d^踅⤔榥\\J⵲v7": 6.8002426206715341E17,
- "ཎ耰í“ê•ï’ã±·\u0013y=詽I\"盈xm{0쾽倻䉚ષso#é°‘/8㸴짯%ꀄ떸b츟*\\鲷礬ZQå…©?np㋄椂榨kc᡹醅3": false,
- "싊j20": false
- }]]
- ]],
- "ä¿›\u0017nç·½Tu뫉èœé¼Ÿçƒ¬.ï‘ꭠIâ°“\"Ἀ᜾uC쎆J@å¤%ê›m뻨ᾀ画è›íœƒT:錖㑸ዚ9죡$": true
- }
- ]
- ],
- "ãµâ‡˜ê¦–辈s}㱮慀밒s`\"㞟j:`ií”»Z<C1衽$\"-饧?℃\u0010⼒{î°p飗%R\"ä²”\")ì¹€\\%": true,
- "苧.8\u00120ݬ仓": 6912164821255417986,
- "ë–Žé¡£ä¿X;.#Qí‹.笂'p쟨唒í랩냆¦aâ±{è°.b我$蜑SH\u000fç¾=äŸ¼â£¼ï©¿áœæ”•B&挰繗ã”ê…‚-Qv\\0ä¶äš¥ãºio[㑮-ᇼ䬰컪ṼiY){ë°\u0010q螰掻~\n輚x\u0014罺)è»´": 3.024364150712629E-20
- }
- ]
- ]
- ]
- ]}
- ]]
- }
- ]
- ]]
- ]
- ]]]],
- "\"凲o肉Iz絾豉J8?i~傠᫽䇂!Wï›—D溊J?á¡’vsè†åµ¹âž’ïŸæ·´î‡…>ì„«^諎0Ok{켿æ­à·£èƒ°a2﨤[탳뚬쎼嫭뉮m": 409440660915023105,
- "w墄#*ᢄ峠밮jLa`ㆪ꺊漓Lã§ëŽ!Agkï¹ï¾'ê›ë¢ƒã¯å²¬D#ã’¦": false,
- "ଦPGI䕺L몥罭ꃑ궩﮶#⮈ᢓӢ䚬p7웼臧%ï‘¥~Sè âŒíž€6îž’&t䳙y㪘ëƒ\\*;é‰ï¿Šé¿µ'å—•pa\"oL쇿꬈Cgî“": "ã¶½1ç¸D⟸䴅ᆤ뉎﷛渤csî¸x ä”цꬃ锚æ¬?ຽ+x~꘩uI࡞\u0007æ ²5呚ẓem?è¢\")=㥴䨃pac!/æŽY",
- "á·±o\\||뎂몷r篙|#X䦜I#딌媸픕åžRDæ–³X4t⯩夬=[ï‹ë­²r=绥jhë·±ì¸âª˜%]⚋܈㖴スHí…¹m(WOæ›åЉ0~K3c柢Õã‰ïªªé€³~": false,
- "ç…½_qb[첑\\륌wEâ½Ztï”´CNï­+餌ᕜOê›­": "{ﳾ쉌&s惧á­âµ†3䢫;䨞팑ï›ê’ªí˜è¤€à¢–Qä ¿V5뭀䎂澻%ë°›u5í…¸oA⮥U㎦;B䳌wzä•™$áž¿\\௅婺ëµâª¾í†\\`Kyौꋟ._\u0006L챯l뇠Hi䧈å’5",
- "艊ä½à£ƒë¡‡ä± çˆ¬ï˜‚!*;⨣æŽïžæ…“qé“|儑ᨋL+è¿¥=6㒺딉6弄3è¾…J-㕎뛄듘SG㆛(\noAzQê±ä°©X*ã¢O퀌%펠낌moí‹®a^<\/F&_눊ᾉ㨦ы4\"8H": 2974648459619059400,
- "鬙@뎣䫳á®ë¡?){y?5K;î§„TA*k溱䫜J汃ꂯ싔ì\u001dA}룖(<\/^,": false,
- "ëª@QꋦFꊩá’뎶î‡lXl垨4î¤^郣|ꮇ;ä´á“}ìµ²zç–": null
- }
- ]]]],
- ":_=ë‹§å¼—D䙋暨é›. 㱻붘ä‚Jå„’&ZK/녩䪜rå›â½¯D喠죥7ï“⹌䪥c\u001a\u2076￞妈朹oLkè®F౟覛ì§ã®7T;}è›™2{9\"å´“bB<\/⡷룀;즮鿹)丒툃୤뷠5W⊢嶜(fb뭳갣": "E{å“1WM"
- }},
- "䘨tjJ驳豨?y輊M*᳑梵瞻઻ofQG瑮e": 2.222802939724948E-19,
- "ä®´=â‘âž¶Tà·‹wäžœ\"垦ꃼUt\u001dx;B$뵣䙶E↌艣ᡥ!á§Ÿ;ä±€[䔯k쬃`à©8饙른ç†î‹”'2_'袻tGfè’­J땟as꯳╖&å•’zWࡇᒫYSá¬\u0014ℑ첥鈤|cG~Pá“®\">\"": "ႆl\f7V儊㦬nHꄬꨧC{ì¢~C⮃⛓嶦vꄎ1w鰠嘩뿠魄&\"_qMâµ–é‡”ë…®îœ¡ê‡ ãš{ç³Jå“‹ cî°¸v?-jkﻯྌ鹑L舟r",
- "龧葆yB✱H盋夔ﶉ?n*0(": "ꧣኆ㢓氥î³qZZ酒ຜ)鮢樛)X䣆gTSî»»Ò‘Gí…žï’˜k.J圬ç–ë¡«ïœì¯­z L:\\ྤ@w炋塜쿖ᾳy뢀䶃ë±N䥨㚔勇ê²#p",
- "ë„畎Q娡\"@S/뼋:äµ!Pè¡…ì´šfVHQs✜á«i㻑殡B䜇%믚k*U#濨낄~": "êŸá‹•ì³¸êˆæ•‹&lå¦\u0005憡멗瘌uPgá…ªm<\/To쯬锩h뒓k"
- }
- ]
- }],
- "墥홞r绚<\/⸹ⰃB}<躅\\Y;๑@䔸>韫䜲뱀X뗩鿥쩗SI%ﴞ㳕䛇?<\/\u00018x\\&侂9é‹™a[LRã‹­W胕)â¡¿8ãž™0JF,}?í—ˆd1cDMáƒâ›é„ⱕ%X)!XQ": "â³ê—³=橇a;3t⦾꼑仈î¥á€°aᚯ⯋ꕃAsé´·Nâ•_䎃ꙎAz\u0016䯷\\<à¿«>8q{}ï½·?ᣰ}'0ᴕ펓B┦lF#趤厃T?㕊#撹圂䆲"
- },
- "Ü‹ë‹é¾«ï¥c웑": false,
- "ㇿ/q\"6-co髨íœCí¦#\u001b4~?3ä¹E삇<<": 7.600917488140322E-20,
- "äE6?㣖êƒé—´t祗*é‘ {ḣV(æµ¾h逇íž=W?ૉ?nꇽ8ꅉຉj으쮺@Ꚅ㰤u]Oyr": "vâ‰á«¸_*όAඤԆl)ۓᦇQ}í zà¼q滚",
- "ソ᥊/넺I": true
- }]]
- ]
- ]
- ]
- ]]
- },
- "䭑Ik攑\u0002QV烄:芩.麑㟴㘨≕": true,
- "å„꿕C쇻풉~å´%碼\\8\"䬦꣙": null,
- "欌L圬䅘Y8c(♺2?ON}o椳s宥2䉀eJ%é—¹rå†O^K諭%凞⺉⡻,掜?$ꥉ?略焕찳㯊艼誜4?\"﯎<ï±ã‚›XáˆINT:è©“ +": -1.0750456770694562E-19,
- "ç’àc뜭싼ﺳ뎤K`ïŸ]p隨LtE": null,
- "ç”™8䵊神EIꩤé¯á¢€,ïµ®Uä‘u疒ử驺䚿≚ഋ梶秓F`覤è­#짾蔀묊4<åªì¬¦éª_Yzgcà¡¶î²§4kç´¥`kc[Lï®—î°£ç°*I瀑[â¾°L殽鑥_mGÈ <\/|囹ç gæ¡°iri": true,
- "챓ꖙꟻì¢è‡ou,å— 0\\jK핻뜠qwQ?ഩ㼕3Y彦b\u009bJ榶N棨f?ë¦é–綃6é³µM[OEë´¨uí–.Ꮁ癜蟳뽲ꩌ뻾rM豈Rï¨ç¾« uDꎚ%": null
- },
- "V傜2<": 7175127699521359521
- }],
- "é“«aG切<\/\"ী⊆e<^g࢛)Dé¡ï½Žï¬®é¥¼\u008c猪繩嵿ﱚCꡬ㻊g엺Aì—¦\u000fæš¿_f꿤ë³ã¦•桦`蒦䎔j甬%å²rj ç³": "䚢åŽëˆ´Au<4箞7礦Iï±”å eȧ䪸uï„€äµp|逹$嗫쨘ꖾï·!胠z寓팢^㨔|u8Nሇe텔ꅦ抷]،鹎ã³#༔繁 ",
- "낂乕ꃻ볨ϱ-ꇋã–fsâ¿«)zꜦ/K?솞♞ꑌ宭hJ᤭瑥Fu": false,
- "쟰ãœé­›G\u0003u?`㾕ℾ㣭5螠烶這趩ꖢ:@å’•ê¶xë’˜ëŠmä°¨bç—ƒë 0鳊喵熬딃$摉_~7*ⱦ녯1錾GKhJ惎秴6'H妈Tᧅ窹㺒疄矤铟wላ": null,
- "쯆q4!3錕ã²âµ†ã‡›ê˜·Zç‘©ë­†\\â—ªNH\u001d\\ã½°U~㯶<\"쑣낞3ᵤ'峉eꢬ;鬹o꣒木X*é•·PXᘱu\"ä ¹n惞": null,
- "ᅸ祊\"&ꥴCjࢼ﴿?䡉`U效5殼㮞V昽êª#ﺸ\\&t6x꠹盥꣰a[\u001aêªSpe鎿蠹": -1.1564713893659811E-19
- }
- ]]
- ]
- ]
- ],
- "羵䥳H,6ⱎ겾|@t\"#í–Šî¦1|稃 ì„­)ëœ=뻔ꡜ???櫎~*ῡ꫌/繣ﻠq": null
- }
- ]}
- ]},
- "츤": false
- }},
- "s": 3.7339341963399598E18
- }
- ],
- "N,I?1+㢓|ࣱ嶃쩥V2\u0012(4EE虪朶$|w颇væ­¥": "~ì¢~_,Mzrã«YB溓Eæ·š\"â…¹äˆ”áºæŠ™ b,nt5Vã’J檶ê¨â»”?",
- "Q껑ꡡ}$넎qHç…”æƒ/ez^!ẳF댙äŒé¦»å‰8": "梲;yté’°$i冄}Aî‘”L%a jëœå¥·ê±³ëš¾d꿽*ሬuDY3î…—?뮟鼯뮟wãªí‹±îŸ‚V",
- "o{Q/K O胟ãzUdê€m&⨺J舕â¾é­¸è¨ŸãŒ¥[T籨櫉å”í‚ aṭ뱫촙莛>碶覆⧬짙쭰ׯdAiH໥벤í¥_æ¸[ 0î­¬e:죃TCå¼¼èŽëµDA:w唵ê£": null,
- "á½æ¨Žäµ®è»§|?à±—aWH쩃1 ê…­su": null
- }
- ]
- },
- "勂\\&m鰈J釮=Ⲽ鳋+䂡郑": null,
- "殣b綊倶5㥗惢⳷è¢á‘€ä¬„é•§M^ï±´3⣢翣næ«»1㨵}ኯ뗙顖Z.Q➷ꮨ뗇\u0004": "ê”™ä¼>n^[GीA䨟AMç¢á’ŠS쨲w?d㶣젊嘶çºéº“+æ„£a%気ྞScë“ᔘ:8bM7Xd8㶑臌]Ꙥ0ê­ì’™ä«£æŒµCè–½î€Dfⵃ떼᷸",
- "?ç´¡.ì…ª_à·¨j\u0013Oxâ” $Xᶨ-á…‡oè–¹-}軫;yæ¯ãªœKã£?.EVì®±4둽⛻䤜'2盡\u001f60(|eì°ã¼Žá¦€ã’§-$l@ﻑå³\u0003ä­±å“å·—WFo5c㧆Tí„Y맸♤(": -2.50917882560589088E17
- }}
- ],
- "侸\\릩.᳠뎠狣살cs项䭩畳H1s瀉븇19?.w骴崖㤊h痠볭㞳㞳ä®Ql怠㦵": "@䟴-=7f",
- "鹟1x௢+d ;viä­´FSDS\u0004hꎹãš?â’â¦Ñž6u,扩@ë·Su)Pag휛Tá’—Vç—©!çžé‡€ê–žè˜¥&ೞè˜ê­°êž‡áŽ": "ah懱Ժ&\u20f7䵅♎඀䞧鿪굛ౕ湚粎蚵ᯋ幌YOE)५襦ãŠY*^\"R+ඈî¶å’·è¶9î—ꥂ榨艦멎헦é–ë¶v좛咊E)K㓷ྭr",
- "æ†q쮦4綱켙ì….f4<\/g<籽늷?#蚴픘:fF\u00051㹉뀭.á°–í’ŽfÖ¦Hv蔎㧤.!ä­½=éž½]ìŒH:?\"-4": 8.740133984938656E-20
- }]}
- }
- ],
- "tVKn딩꘥⊾蹓᤹{\u0003lR꼽ᄲQFá…傅ﱋ猢⤊á”,E㓒秤nTà¶­v`â™›I\u0000]꫔ṞD\"麵cè¸î“²æ°X&æ¿¿ë˜ê£¹ê¹³à±¥è‘‚鿎\\aꡨ?": 3900062609292104525
- }
- ],
- "ਉ샒⊩Lu@S䧰^g": -1.1487677090371648E18,
- "⎢k⑊꬗yá«7^err糎Dt\u000bJç¤¯í™•ã†æ²‘サꋽeèµ”ã¢^J\u0004笲㿋idra剰-᪉C錇/Ĝ䂾ညSì§€?~ì½®gR敉⬹'ä§­": 1901472137232418266,
- "ç—kä¶¥:?ì´½è´ì“‰ê“ˆã’¸gç˜[뵎\\胕?\u0014_榙p.j稶,$`糉妋0>Fá¡°ly㘽$?": "]ê™›O赎&#ã ƒë±å‰³î°·\"<â—†>0誉é½_|z|裵씪>áŒã¼\"Z[ç•}O?G뚇諦cs⠜撺5cuç—‘U圲\u001c?鴴計lì¶¥/╓哼䄗èŒîšªê®…뫈댽AëŒë¡–뤫V窗讬sHd&\nOi;_î´–u"
- }
- ],
- "Uﺗ\\Y\\梷䄬~\u0002": null,
- "k\"Y磓ᗔ휎@U冈<\/w컑)[": false,
- "æ›Jè·âŒ»ë¦\u001f㙳s꥓âŸé‚«P늮쥄c∬ྡྷ舆렮칤Zè¶£5콡넛A쳨\\뀙骫(棻.*&è¼›LiIfi{@EA婳KᬰTXT": -4.3088230431977587E17
- }]}
- ]
- ],
- "곃㲧<\/dఓꂟs其ࡧ&N葶=?c㠤Ჴ'횠숄臼#\u001a~": false
- }
- ]
- ]}]
- }]
- }}
- ],
- "2f`â½°E쵟>Jî•笂裭!〛觬囀ۺ쟰#桊l鹛ⲋ|RA_Vxá­gEë“h﵀mfá»|?juTUæ¡£[d⢼⺻p濚7E峿": 5613688852456817133
- },
- "濘ë¶gå¿®7ãµæ®¬W팕Qæ› ë«°)惃廊5%-î«è¹šzYZ樭ﴷQ锘쯤崫îŸgg": true,
- "絥ᇑâ¦ì’“븣爚H.ã—Šß„o蘵貆ꂚ(쎔O᥉î¼ï®“]姨Wê“!RMA|o퉢THxè½®7Mê»U즨'i뾘舯o": "è·¥f꜃?"
- }}
- ],
- "é·°é¹®K-9k;ï°°?_ݦѷ-ꅣ䩨Zꥱ\"mꠟ屎/콑Y╘2&鸞脇ã¢ê€‡à ºâ°¼æ‹¾å–­í‹®îL꽩bt俸墶 [l/웄\"꾦\u20d3iও-&+\u000fQ+໱뵞": -1.296494662286671E-19
- },
- "HX੹/⨇୕붷Uﮘ旧\\쾜͔3l鄈磣糂̖䟎Eá³wæ©–bá¿€_딕huè‘°î¤çª³é—¹Ð²U颵|染H죶.fPä—®:jä«¢\\b뎖i燕ꜚGâ® W-≚뉗lè¶•": "ଊ칭Oa᡺$IVã·§L\u0019脴셀붿餲햪$迳å‘ì¯ì¼‚PqfT\" ?î¹€I屉鴼쿕@ç¡™z^é•㊵M}ãš›T젣쓌-Wâ©-g%⺵<ë®±~빅╴瑿浂脬\u0005왦燲4áƒb|Då § <\/oEQh",
- "䘶#㥘à©îººìº”ï” f巋ἡAJ䢚쭈ࣨ뫒*mᇊK,ࣺAꑱ\u000bR<\/A\"1a6鵌㯀bh곿w(\"$ê˜*rà²è¶£.dà¿©k/抶면䒎9W⊃9": "漩b挋Swè—Ž\u0000",
- "畀e㨼mK꙼HglKb,\"'䤜": null
- }]}]
- ]
- ]
- }]
- ]}
- ]
- ]}
- ],
- "æ­™>駿ꣂ숰Q`J΋方樛(d鱾뼣(ë«–í„­\u20f9lচ9æ­Œ8o]8윶lì–¶?é•–G摄탗6í‹íµ+g:䱫홊<멀뀿/س|ê­ºsê±è·¶ç¨šW々c㫣⎖": "㣮蔊깚Cꓔ舊|XRfé»ã†šï¸†'쾉ì·\\&言",
- "æ®­\"cÞɨê™äž˜:嬮eæ½½Y펪㳅/\"O@à —ê²´]ì·–YÇž(t>R\"N?梳LDæ­=næ°¯Tè±°2R諸#N}*ç§ï¡§4}ã¶ŠGä£bì–š": null,
- "襞<\/å•§ B|싞W瓇)6簭鼡艆lNì©`|펭佡\\é–“é‚[z릶&쭟愱ꅅ\\Tá°½1靝忠ˆ4̸s윜R7â’/똽?치X": "âŠèº–Cﱰ2Qẫè„&இ?%ëƒæ‚Š",
- ",é°§åµì…£îˆ›ì‹¹xᎹ힨᯳EṬHïŽã¹–9": -4604276727380542356
- }
- }
- ]]]],
- "웺㚑xs}q䭵䪠馯8?LB犯zK'os䚛HZ\"L?셎s^㿧㴘Cv2": null
- }]
- ]
- ]
- ],
- "Kdî©´2Kv+|z": 7367845130646124107,
- "ᦂⶨ?ᢠ祂些ഷ牢㋇æ“\"腭䙾㖪\\(y4cE뽺ㆷ쫺ᔖ%zfÛ»$Ñž1柦,ã¶¢9r漢": -3.133230960444846E-20,
- "ç˜Mç„€q%㢟f鸯Oâ£è“‘맕鯊$Oå™·|)z褫^㢦⠮ꚯ꫞`毕1qꢚ{ĭ䎀বώT\"뱘3G൴?ï¢ï¢^^oï…¯f": null
- }
- ],
- "a8V᯺?:ﺃ/8ꉿBq|9啓댚;*i2": null,
- "cpT瀇Hç°á»ªpೃi鎪Rrâ£ìˆ¬-鹸ҩ䠚z脚цGoN8å…¥y%è¶ŒI┽2ឪЀiJNcN)æ§£/â–Ÿ6S숆牟\"箑X僛G殱娇葱T%æ»:J諹昰qV쨰": 8331037591040855245
- }],
- "G5ᩜ䄗巢껳": true
- }
- },
- "Ồ巢ゕ@_è­™A`碫é„㡥砄㠓(^K": "?܃B혢▦@犑ὺD~Tâ§|é†;o=J牌9냚⢽㨘{4è§èš”9#$∺\u0016p囅\\3Xk阖⪚\"UzA穕롬✎âžã­’춺C㣌ဉ\"2瓑员ᅽê¶ë«}꽚ꞇ鶂舟彺]ê½JCè§éЉ",
- "â†Äšè†\"b-í‰ACR言J謈53~V튥x䜢?ꃽɄY뮩ꚜ": "K/↾eèƒ}]Bs⾿q룅鷦-膋?m+æ­»^魊镲6",
- "粡霦cæž‹AHíŸo礼Ke?qWcA趸㡔ê‚?\u000eì¶‚8iতᦜ婪\u0015㢼nﵿê»!á´é–¢\u001d5j㨻gfá¿©UK5Juä¸tã‹TI'?ã“t>⼟o a>i}á°—;뤕Ü": false,
- "ꄮ匴껢ꂰ涽+䜨B蛹H䛓-k蕞fu7kLè°–,'涃V~챳逋穞cT\"vQ쓕ObaCRQã“¡â²®?轭⫦輢墳?vA餽=h䮇킵ní²í‰…喙?\"'1ç–¬V嬗Qdç—'Lự": "6v!së¯ã­Ÿî€µî¦˜ã£¯çƒ!磸餠ቂh0C뿯봗Fé·­gê–¶~コkK<ᦈTtïŽ\\è·“w㭣횋钘ᆹ듡䑚W䟾X'ê…”4ï€FL勉Vܴ邨y)2'〚쭉⽵-鞣E,Q.?å—",
- "?(˧쩯@å´Ÿå‹æ­„K": null
- },
- "Gc럃녧>?2DYIé´¿\\륨)æ¾”0ᔬlx'è§”7젘⤡縷螩%Sv׫묈/]↱&S ï…h\u0006æ­‹á‘›xi̘}ã²Y蔯_醨鯘煑橾8?䵎쨋z儬ê*@츾:": null
- }
- }
- }
- ]
- ]
- ]}
- },
- "HO츧G": 3.694949578823609E17,
- "QC\u0012(翻曇Tfã·ŸbGBJ옉53\\嚇ᛎDï–/\u001b夾á‰4\"í•€@祎)쫆yD\"i먎Vnî¿ã¿¿V1Wá¨ä¶€": -6150931500380982286,
- "Zã“®P翸é±é‰¼K䋞꘺튿â­Y": -7704503411315138850,
- "]모开ꬖP븣c霤<[3aΠ\"é»ä––䰑뮋ꤦ秽∼㑷冹T+YUt\"싳F↭ä–&鋌": -2.7231911483181824E18,
- "tꎖ": -4.9517948741799555E-19,
- "䋘즊îŽ.⬅IꬃۣQ챢ꄑé»|f?C⾺|å…•ì¯sC鬸섾整腨솷V": "旆柩l<Ké«î–žM戶鯮t:wRî°2ꉱ`9'l픪*í芦㊢Pjjoå ¡^ ì‡ì–›å¶…있ষ0?F",
- "下9T挞\\$yᮇk쌋⼇,ਉ": true,
- "櫨:ㆣ,é‚lî ¬r崕祜ã®çƒœZ,XXD蕼㉴ kM꯽?P0﹉릗": null,
- "îŠgv솠歽閘4镳䗄2æ¾¾>쪦sá–¸My㦅울ì‰ç˜—㎜檵9ï……ê‚駓ૉᚿ/u3ì”…å¾ï¤¥[Z䞸ࡗ1ꆱ&Q풘?Ç‚8\u0011BCDY2볨;é¸": null,
- "幫 nç…¥sì‡íއ 왊-$C\"è¡:\u0014㣯舼.3ë™—Yl⋇\"K迎멎[ê½µs}9鉳UK8ì¥\"掄㹖h㙈!얄સ?Ꜳ봺R伕UTD媚I䜘Wé¨è”®": -4.150842714188901E-17,
- "ﺯ^ã„„\b죵@fྉkf颡팋î¤êž¦{/Pm0V둳⻿/è½éŸ’ꊔᚬ@5螺G\\å’¸a谆⊪ቧ慷绖?è´¢(é·‡uéŒF=ráæ©¢áž³n:^iá´µtD볠覅Nèµ´": null
- }]
- }]
- }
- ]
- ]}
- ]},
- "謯?w厓奰Tï§¡í——èážè²–o⪇弒L!캶$ᆅ": -4299324168507841322,
- "뺊奉_åžæµ¸å»¶ëªå­„Z舰2i$q붿좾껇d▵é¤\"v暜Ҭì„mï¿´g>": -1.60911932510533427E18
- }
- ]
- }
- ]
- ]],
- "í‰êº”㠦楶Pê…±": 7517896876489142899,
- "ï™°": false
- }
- ]},
- "是u&I狻餼|è°–j\"7cë®sï­-踳鉷`䣷쉄_A艣鳞凃*m⯾☦椿q㎭Nîœæº”铉tlㆈ^": 1.93547720203604352E18,
- "ï…µkⲨ\\%vr#\u000bâ’ºY\\t<\/3﬌R訤='﹠8è¤êž´ë ´æ›”r": false
- }
- ]},
- "阨{c?C\u001d~K?鎌Ԭ8烫#뙣Pì´ˆé—tã­±E­ë’䆺}ç”—[R*1!\\~hã•…á°º@<9JêષIä³–æ ­6綘걹ᅩM\"▯是∔v鬽顭⋊譬": "ìš´ï¶Kæ•‚(欖C취پ℄爦賾"
- }
- }}
- }],
- "鷨赼鸙+\\ä­£t圙ڹx᜾ČN<\/踘\"S_ë§¶a鷺漇T彚⎲i㈥LT-xA캔$\u001cUH=a0츺l릦": "溣㣂0æ¿•=鉵氬駘>Pꌢpb솇쬤h힊줎çªãª¬CrQ矠a&è„꼬爼M茴/á¿®\u0017å¼è½¼y#êž c6ë‘´=?Rå´ë· éº–w?"
- },
- "閕ᘜ]CT)䵞l9z'xZF{:ØI/躅匽ì¡:䟇AGF૸\u001cퟗ9)駬慟ꡒꆒRS״툋A<>\u0010\"ꂔ炃7gëšEà§îˆbꅰ輤]oã±_뷕ܘ暂\"u": "芢+U^+㢩^鱆8*1鈶鮀\u0002뺰9⬳ꪮlL䃣괟,G8\u20a8DF㉪錖0ㄤ瓶8Nଷd?眡GLc陓\\_죌Vì°à¤²äºŒ?cë¦æ± \u0019JC\u0011b⤉zẒT볕\"绣蘨뚋cꡉkî« I\u001eé³´",
- "ꃣI'{6u^㡃#཰Kq4逹y൒䧠䵮!㱙ï®/n??{Lí’“ZETã™ í¿X2᩟綳跠葿㚙w཮x캽扳B唕S|å°¾}ì´•%N?o䪨": null,
- "ⰴFjà·Ÿì…ˆ[\u0018è¾·px?椯\\1<ﲻ栘á£ë´¢æ† ë‰´p": -5263694954586507640
- }
- ]
- ]]
- ]}
- ]}]
- ]
- ],
- "?#癘82禩鋆êŠty?&": -1.9419029518535086E-19
- }
- ]
- ]
- ]}
- ]
- ]
- ],
- "훊榲.|῕戄&.ãšZꛦ2\"䢥ሆ⤢fV_æ‘•å©”?â‰Fji冀탆꜕iã¬_ẑKᅢ꫄蔻XWc|饡Siẘ^㲦?羡2ã´1ç¸á™…?ì‰Ou": false
- }]]
- ]}}},
- "æ…‚ë—„å“è“”á“åŒåš–/颹蘯/翻ㆼL?뇊,í…µ<\\ç·ã”Cボ": null
- },
- "p溉ᑟi짣z:䒤棇r^٫%G9缑r砌롧.물农g?0׼ሩ4ƸO㣥㯄쩞ጩ": null,
- "껎繥YxK\"F젷쨹뤤1wq轫o?鱑뜀瘊?뎃hç‘\\ꛣ}Kå³^ኖâ¤ï§´ê‰“hy": null
- }
- ],
- "á±€nè‚“ã„›\"å »2>mæ®®'1橌%êž´êµ°=Ӳ鯨9耛<\/n據0u彘8㬇៩fá¿è¯™]嚊": "䋯쪦S럶åŒã…›#î½)O`ሀX_éªæ¸²â›€ã¨»å®…闩➈ꢙஶDRâª"
- },
- "tAì“龇 â‹¥bj왎录r땽✒롰;羋^\\?툳*┎?ì€ma䵳넅U䳆૘〹䆀LQ0\bç–€U~u$M}(鵸gï­â³¾i抦뛹?䤈땚검.鹆?ê©¡tâ¶¥GÄ’;!ቹHïš©Så³»B츪ì¼f5≺": 2366175040075384032,
- "ì „pJjleb]áž½": -7.5418493141528422E18,
- "n.鎖ጲ\n?,$䪘": true
- },
- "欈Ar㉣螵᪚茩?O)": null
- },
- "쫸M#x}Dç§±æ¬K=侫们ä¸ï‡ª.KꕾxẠ\u001e㿯䣛FÜ캗ï¬qq8꟞ṢFD훎⵳簕꭛^鳜\u205cÙ«~⑟~冫ऊ2ì«°<\/戲윱o<\"": true
- },
- "ã·è¥/T뱂\u0010锕|内䞇xä¾â‰¦ã­–:M?iM᣿IJeç…œdG࣯尃⚩gPt*辂.{磼럾äª@a\\袛?}ᓺBç¼": true
- }
- }
- ]]}]}},
- "tn\"6î´ê«¤ìƒ¾ä„„;銞^%VBPwu묪`Y僑N.↺Ws?3C⤻9唩Sä ®á´m;sᇷ냞඘B/;툥B?lB∤)G+O9m裢0kC햪䪤": -4.5941249382502277E18,
- "áš”t'\\æ„«?éµ€@\\ã³ê‚•Pí <<]ç…¹G-b!S?\nꖽ鼫,Ý›&é ºy踦?Eæ†î¬–릱H}햧캡b@手.p탻>췽㣬ꒅ`qeä½­P>á“‚&?u}毚ᜉ蟶頳졪áŽzl2wO": -2.53561440423275936E17
- }]}
- }
- ]
- ]],
- "潈촒⿂å¡": 5495738871964062986
- }
- ]]
- }
- ]
- ]}
- ]]
- ]]
- ]}
- ]
- ]},
- "á‚qí‚è“…R`謈èŸá¦î’³å„‚æ§åƒ»ï¹¶9å©Œî¬æ«žé‡ˆ~\"%匹躾ɢ뤥>࢟瀴愅?殕节/냔O✬H鲽엢?ᮈà©î“Žâ‹§dâ½ã«zCe*": 2.15062231586689536E17,
- "ã¶µUi曚ç°é‹ªá¾¼è‡§P{ä䷪쨑̟A뼿T渠誈äšD1!ìž¶<\/ã¡7?)2l≣穷᛾ç¨{:;㡹nemיּ訊`Gî¹²": null,
- "䀕\"飕辭påœf#뫆䶷뛮;â›´á©3çšëá°ìŽ“â¦·è©µ%᜖Մfs⇫(\u001e~P|ï­—CⲾផv湟W첋(텪બTî¾·<บSê‰à©—⋲X婵i ӵ⇮?L䬇|êˆ?졸": 1.548341247351782E-19
- }
- ]
- },
- "t;:N\u0015qé¦Rt缆{ê®C?஛㷱敪\\+鲊㉫㓪몗릙ç«(æ°µkYS": "Xá°‚T?൮ô",
- "碕飦幑|+ 㚦é¶`é•¥ê© B<\/加륙": -4314053432419755959,
- "秌孳(p!G?Vå‚«%8ሽ8w;5鲗㦙LI檸\u2098": "zG N볞䆭éŽí˜\\ONK3íš™<\/樚立圌Q튅k쩎Ffì‹aׂJK銆ઘì¦ç‹©6༥✙䩜篥CzP(è»é§‡HHퟲ讃%,ά{ë p而刲vy䦅ክ^톺M楒é¢ã¹³]Mdg2>䤉洞",
- "踛M젧>忔芿㌜Zk": 2215369545966507819,
- "ì”A`$æ§­é °í»^U覒\bG毲aᣴU;8!팲f꜇E⸃_åµ{å«ç¾ƒX쀳C7ë—®m(åš¼u NÜè°ŸD劯9]#": true,
- "ﻩ!뵸-ç­šPá­›}á¼°å±¥lPh?౮ⶹꆛ穉뎃gè‘㑓溢CX뾇Gã–¬A錟]RKï’î´²aꄘ]Yo+@ä˜'s섎襠$^í™°}F": null
- },
- "粘ꪒ4HXᕘ蹵.$å€\r\u001dë¬77pPc^yî¶ç¬²Q<\/ê–¶ è¨äƒá¨•G?*": 1.73773035935040224E17
- },
- "婅拳?bkU;#D矠â´vVN쩆t㜷A풃갮娪a%é®çµª3dAv룒#tm쑬⌛qYwc4|L8KZ;xU⓭㳔밆拓EZ7襨eD|隰ऌ䧼u9Ô¢+]è´´Pè¿": 2.9628516456987075E18
- }]}}]
- ]}
- }}
- ]}]
- ],
- "|g翉F*湹̶\u0005â1脉̀eI쩓ᖂ㫱0碞l䴨ꑅ㵽7AtἈ턧yq䳥塑:z:é€ï¾¼X눔擉)`N3昛oQì…–y-ڨ⾶æ¢êˆµq^<\/": null,
- "è¹\\ëž“G^璬x৴뭸ゆUSê²§ï®·Bꮤ ┉銜᯻0%N7}~fæ´‹å„Xꔼ<\/4妟Vꄟ9:౟곡t킅冩䧉笭裟炂4ë´‹â±³åºæ€Št+怯涗\"0ã–ˆHq": false,
- "졬믟'ﺇফ圪쓬멤m邸QLà¦¬ä—æ„4jvsç¿™ à¾ê§€è‰³H-|": null,
- "컮襱⣱뗠 R毪/鹙꾀%헳8&": -5770986448525107020
- }
- ],
- "î½­B䔚bê»ë™å§“展槰T-똌鷺tcï§ç¿á«½^㓟ä€o3o$꘭趙è¬Ié¡©)뇭Ἑä“\f@{ᣨ`x3è”›": null
- }
- ]
- ]
- }],
- "⦖扚vWꃱ꥙㾠壢輓{-⎳鹷è´ç’¿äœ‘bG倛â‹ç£Žc皇皩7a~ﳫUâ•£Q࠭ꎉS摅姽OW.홌ೞ.": null,
- "蚪eVlH献r}á®ë¯ ï°©ê”„@ç‘„â²±": null,
- "퀭$JWoê©¢gì—­ì䖔㑺h&à­¢tXX愰㱇?㾫I_6 OaB瑈q裿": null,
- "꽦ﲼLyr纛ZduçB絟쬴糔?ã•‚ì§¹äµe": "ḱ\u2009cX9ë©€i䶛簆㳀k"
- }
- ]]]],
- "(_ê®g່澮?ᩑyM<艷\u001aꪽ\\庼뙭Zë§·ã°©Vm\\lYç­º]3㋲2㌩㄀Eਟäµâ¨„ì¨á”ŸgङHné–⤇놋瓇Q탚單oY\"♆臾jHᶈå¾îž«á‰„??uㇰA?#1侓": null
- },
- "è§“^~ሢ&iIë†g륎ḱ캀.ᓡꀮ胙鈉": 1.0664523593012836E-19,
- "yè©­GbᔶऽsëŒU:æœî „⤎ϲì—⮼D醄诿që™°I#즧v蔎xHᵿt᡽[**?崮耖p缫쿃Lè,ë´¬ï–ꤦC쯵#=X1çž»@OZc鱗CQTï‹„x": null
- }
- ]
- }}],
- "剘ç´\u0004\\Xn⊠6,á€×±;嵣崇}讃iႽ)d1\\䔓": null
- },
- "脨z\"{X,1u찜<'k&@?1}Yn$\u0015Rd輲ーa쮂굄+B$l": true,
- "諳>*ì­®ê´äµŸÒ+<ç®}빀䅱⡔æªï€è‡’hIH脟ꩪCí•ଗP좕\"0i<\/C褻DÛžæ—+^5?'ꂱ䚫^7}ã¡ cq6\\쨪ꔞꥢ?纖䫀氮蒫侲빦敶q{Aç…²G": -6880961710038544266
- }}]
- },
- "5s⨲JvಽῶꭂᄢI.a৊": null,
- "?1qê½ì¿»ê›‹DR%Uå¨>DgNä¹­G": -1.2105047302732358E-19
- }
- ]
- ]},
- "qZz`撋뙹둣j碇ì\\ꆥ\u0018@ïœè—´ç–°Wz)O{Fä¶›l᷂绘訥$]ë®å¤»ä¢‹ä©‡è¿ç°æ¨§çŒµâ£­jè¶q)$꬚⵷0馢W:â°!Qoe": -1666634370862219540,
- "t": "=î¹›wp|~碎Q鬳Ó\\l-<\/^ﳊhní–}ä”t碵ḛ혷?é»äŠ—",
- "邙쇡㯇%#=,î‰E4勃驆V繚q[Y댻XV㡸[逹á°è‘¢B@u=JS5?bLRnì–®ã‰â…ï°³?a6[&íŸ!è—ˆ": 1.2722786745736667E-19
- },
- "X블땨4{ph鵋ꉯ웸 5p簂䦭s_E徔濧dç¨~No穔噕뽲)뉈c5M윅>âš‹[岦䲟懷æ?éŽê“†à¸¬çˆ‹ç äœ”s{\u001bméšå„¸ç…›%bﯿXT>ê—˜@8G": 1157841540507770724,
- "媤娪Qæ¸ï‡\u0011SAyᡈ쿯": true,
- "çš^ಸ%ê±<\/蛯<O\"-刷ã R(kO=䢊䅎l䰓팪A絫픧": "è­”\\ãš„ ?R7㔪G㋉⣰渆?\\#|gN⤴;Wì¹·A׫癮଼ೣã³ë’œ7dæ“ê¾²0扬S0ᆵi/贎ྡn䆋武",
- "è‡ç ‡Gã“æœ¦ì¼‹Wq`㞲攊*å†î‘µî¨~霓L剢zI腧튴Tç¹™Cঅ뫬╈뮜ㄾ䦧촄椘B⊬츩r2f㶱厊8eϬ{挚â¯OM焄覤\\(KÓ¡>?\"祴å“\\\\'í": -3.4614808555942579E18,
- "釴U:O湛㴑䀣렑縓\ta)<D8ï­³æ§é«­D.L|xsæ–‹æ• \"ë‹æ—©7wáŽ": true,
- "쵈+쬎簨up䓬?q+~\u0019仇îŒëµˆá«¯3áµ£æ˜æž°åŠ«ãª¢uç˜-퀭:ì»™:u`⌿ï«A(9鄦!<çšnj3:Hà£¨å·‹ä€æ—¸ëŽˆë§»v\"\\(곘vO㤰aZe<\/W鹙鄜;l厮ë‘": null,
- "î–·": -1.2019926774977002E-18,
- "%者Oî–‹7.Nêªs梇接z蕜綛<\/䜭\"죊y<曋漵@Śâ¹sD⟓jݗᢜ?zî–†/9á²Ma쨮긗贎8ᔮ㦛;6p뾥໭䭊0B찛+)(Yã¿ é¸ä•’^옥": "鬃뫤&痽舎Jì½®è—󽸰ᨨMꈫ髿v<N\\î·.ì‚’ê»…Ñ1ê­¼5ä´·5쳬臨wjë¥"
- }],
- "é·Ž'ã³—@帚妇OAj' è°¬f94ǯ(횡ヒ%io쪖ì‚좛>(j:숾å´ä—ŒgCiB뽬Oyuqè¼¥åŽ/7)?今hY︺Q": null
- }
- ]
- ]]]}]
- ],
- "I笔趠Ph!<ཛྷ㸞诘X$畉F\u0005笷èŸ.Esr릙!W☆ï›ä²–뗷莾뒭U\"䀸犜Uo3ï¯Gꯌx4r蔇᡹㧪쨢準<ä‚€%ࡡꟼç‘8ç‚Xs0ä€é”€?fi쥱ê†àª²BB": -8571484181158525797,
- "Lâ¦o#J|\"⽩-ã±¢d㌛8d\\㶤傩儻E[Y熯)r噤὘勇 }": "e(濨쓌K䧚僒ã˜è ¤Vᛸ\"络QJL2,嬓ì™î¿‰ä¼¢ã‹’䴿考澰@(ã¾`kX$ë‘ÑE斡,èœ&~y",
- "vj.|统圪ᵮPL?2oŶ`ë°§\"勃+0ue%⿥绬췈체$6:qaë Q;~晘3㙘鹑": true,
- "à·Ø™4ç„â¶¿c︋iâš…:ã‚“é–Ⳙ苆籦kw{䙞셕pCì·ƒê¬âœêŸ¯êš“é…„bížhwkê­­M鬋8B耳쑘WQ\\å™ac'唀x᪌\u2048*hì§Ž#á‡é® ë¾áž¿ë€Œ": false,
- "⎀jꄒ牺3Ⓝ컴~?親ꕽã¼Ü“å–瘘!@<튋ãŒê¿±â©¦{a?Yv%⪧笯Uܱ栅Eæši뚬:ꄃx7䙳ꦋ&䓹vq☶Iä˜á¾˜æ¶œ\\ì‰ëºŒLr%Bcãœ3?î¤ï…¨ê­ç ¿è£ž]": null,
- "⭤뙓z(㡂%亳K䌽꫿AԾ岺㦦㼴輞낚Vꦴw냟鬓㹈뽈+o3譻K1잞": 2091209026076965894,
- "ㇲ\t⋇轑ꠤ룫X긒\"zoYì‡í¬wjæ¢ì‘l侸`e%s": -9.9240075473576563E17,
- "啸ꮑ㉰!áš“}éŠ": -4.0694813896301194E18,
- "ï‰>]囋੽EK뇜>_ꀣ緳碖{ì裔[<ನ\"䇅\"5L?#îµ³xTwv#ç½\u0005래t应\\N?빗;": "v쮽瞭pë­ƒ"
- }
- ]],
- "æ–´æ§¾?Zç¿\"~æ…弞ﻆ=꜡o5é‹ï’½dw\"?Kè ¡i샾ogDï²°_C*⬟iㇷ4nયèŸ[㟉U꽌娛苸 à§æ“贻洞펻)쿗૊許X⨪VY츚Zä¾ã¶­~튃ᵦ<\/E臭tve猑x嚢": null,
- "锡⛩<\/칥ꈙᬙè€&êšç±¬â– 865?_>Lè©ì¿¨äˆŒæµ¿å¼¥ï©‰Ì«î¾½ï‘lj&zx<\/C쉾?覯n?": null,
- "꾳鑤/꼩ï¨d=ᘈn挫ᑩ䰬ZC": "3錢爋6Ƹ䴗v⪿Wr益G韠[\u0010å±—9ì¡é’u?殢c䳀蓃樄욂NAq赟c튒ç˜ë ¶î‚³Aà«¡Éšæ"
- }
- ]
- ]
- ]}
- ]
- ]
- }]]]}}
- ]}],
- "ï‚’Ejä—³U<\/Q=ç’샎䞦,å °é  @褙g_\u0003ꤾfâ¶½?퇋!łB〙ד3CC䌴鈌U:뭔咎(Qો臃䡬è‹BO7î¼§ã¢äŸ¸\"Yb": 2.36010731779814E-20,
- "逸'0å²”j\u000e눘먷翌C츊秦=ꭣ棭ှ;鳸=麱$XP⩉駚橄A\\좱⛌jqvä°ž3Ь踌v㳆¹gT┌gvLBè³–ïžçƒ¡m?@E঳i": null
- },
- "曺vì°˜×?&绫OáŸ": 9107241066550187880
- }
- ]
- ],
- "(e屄\u0019昜훕ç–b蓘ᬄ0/۲묇Z蘮á€â¨è›˜èƒ¯ë¢ƒ@㘉8ሪWᨮ⦬ᅳ䅴HIá‡ì¨³z囕陻엣1赳o": true,
- ",b刈Z,á æ™Tì†Å•B⩆ou'í¼â‰ƒç»—é›—dè­Š": null,
- "a唥KB\"ï³è‚•$u\n^â…„P䟼냉䞸⩪u윗瀱ꔨ#yÅŸsî««ê’¬=ï‹•1ïš–|ﲤ爢`tà±íмî£ì³«_Az(Ṋ擬㦷좕耈6": 2099309172767331582,
- "?ã´¸U<\/䢔ꯡ阽扆ã¤qé‹?f㔫wM嬙-;UV죫嚔픞G&\"Cá—äªí’ŠQ": "VM7ç–¹+陕枡툩窲}ç¿¡ä–¶8欞ÄsTë®}ç’¤:jﺋ鎴}HfAàµâ§»Zd#Qï¬u茅J髒皣Y-︴[?-~쉜vë”璮㹚䅊﩯<-#\u000eê±€h\u0004u抱﵊㼃U<㱷⊱IC進"
- },
- "숌dee節é½é‚ºp넱蹓+e罕U": true
- }
- ],
- "b⧴ë£??á” 3ã±>%郿劃ç¿ê¬ê ›Wï¡°çž³á«ëˆ„躨狀ໄy੽\"ីuS=㨞馸k乆E": "トz݈^9R䬑<ﮛG<s~<\/?ⵆá¥è€ç†·uë“·"
- }}
- ]
- }
- ]}
- }
- }
- }
- }},
- "宩j鬅쳜Qê–јyç”Zá­µï1væ“–}䨿F%cֲ᫺贴m塼딚NP亪\"ï¿‹sa뺯ꘓ2:9뛓ï à¼‚쌅䊈#>Rꨳ\u000fTT泠纷꽀MR<CBxPñ±’«X쇤": -2.22390568492330598E18,
- "?䯣ᄽ@Z鸅->ᴱ纊:ã ­ë³®?%N56%鈕1ä—äœaä²—j陇=ë¿»å‚衋࿘ᓸ?ᕵZ+<\/}H耢bä€z^f$&ã’LkꢳI脚뙛u": 5.694374481577558E-20
- }]
- }
- ]],
- "obj": {"key": "wrong value"},
- "퓲꽪m{ã¶©/뇿#â¼¢&᭙硞㪔E嚉c樱㬇1aç¶‘á–DḾä©": null
- }
-} \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/data/webapp.json b/3rdparty/rapidjson/bin/data/webapp.json
deleted file mode 100644
index d540b57f0df..00000000000
--- a/3rdparty/rapidjson/bin/data/webapp.json
+++ /dev/null
@@ -1,88 +0,0 @@
-{"web-app": {
- "servlet": [
- {
- "servlet-name": "cofaxCDS",
- "servlet-class": "org.cofax.cds.CDSServlet",
- "init-param": {
- "configGlossary:installationAt": "Philadelphia, PA",
- "configGlossary:adminEmail": "ksm@pobox.com",
- "configGlossary:poweredBy": "Cofax",
- "configGlossary:poweredByIcon": "/images/cofax.gif",
- "configGlossary:staticPath": "/content/static",
- "templateProcessorClass": "org.cofax.WysiwygTemplate",
- "templateLoaderClass": "org.cofax.FilesTemplateLoader",
- "templatePath": "templates",
- "templateOverridePath": "",
- "defaultListTemplate": "listTemplate.htm",
- "defaultFileTemplate": "articleTemplate.htm",
- "useJSP": false,
- "jspListTemplate": "listTemplate.jsp",
- "jspFileTemplate": "articleTemplate.jsp",
- "cachePackageTagsTrack": 200,
- "cachePackageTagsStore": 200,
- "cachePackageTagsRefresh": 60,
- "cacheTemplatesTrack": 100,
- "cacheTemplatesStore": 50,
- "cacheTemplatesRefresh": 15,
- "cachePagesTrack": 200,
- "cachePagesStore": 100,
- "cachePagesRefresh": 10,
- "cachePagesDirtyRead": 10,
- "searchEngineListTemplate": "forSearchEnginesList.htm",
- "searchEngineFileTemplate": "forSearchEngines.htm",
- "searchEngineRobotsDb": "WEB-INF/robots.db",
- "useDataStore": true,
- "dataStoreClass": "org.cofax.SqlDataStore",
- "redirectionClass": "org.cofax.SqlRedirection",
- "dataStoreName": "cofax",
- "dataStoreDriver": "com.microsoft.jdbc.sqlserver.SQLServerDriver",
- "dataStoreUrl": "jdbc:microsoft:sqlserver://LOCALHOST:1433;DatabaseName=goon",
- "dataStoreUser": "sa",
- "dataStorePassword": "dataStoreTestQuery",
- "dataStoreTestQuery": "SET NOCOUNT ON;select test='test';",
- "dataStoreLogFile": "/usr/local/tomcat/logs/datastore.log",
- "dataStoreInitConns": 10,
- "dataStoreMaxConns": 100,
- "dataStoreConnUsageLimit": 100,
- "dataStoreLogLevel": "debug",
- "maxUrlLength": 500}},
- {
- "servlet-name": "cofaxEmail",
- "servlet-class": "org.cofax.cds.EmailServlet",
- "init-param": {
- "mailHost": "mail1",
- "mailHostOverride": "mail2"}},
- {
- "servlet-name": "cofaxAdmin",
- "servlet-class": "org.cofax.cds.AdminServlet"},
-
- {
- "servlet-name": "fileServlet",
- "servlet-class": "org.cofax.cds.FileServlet"},
- {
- "servlet-name": "cofaxTools",
- "servlet-class": "org.cofax.cms.CofaxToolsServlet",
- "init-param": {
- "templatePath": "toolstemplates/",
- "log": 1,
- "logLocation": "/usr/local/tomcat/logs/CofaxTools.log",
- "logMaxSize": "",
- "dataLog": 1,
- "dataLogLocation": "/usr/local/tomcat/logs/dataLog.log",
- "dataLogMaxSize": "",
- "removePageCache": "/content/admin/remove?cache=pages&id=",
- "removeTemplateCache": "/content/admin/remove?cache=templates&id=",
- "fileTransferFolder": "/usr/local/tomcat/webapps/content/fileTransferFolder",
- "lookInContext": 1,
- "adminGroupID": 4,
- "betaServer": true}}],
- "servlet-mapping": {
- "cofaxCDS": "/",
- "cofaxEmail": "/cofaxutil/aemail/*",
- "cofaxAdmin": "/admin/*",
- "fileServlet": "/static/*",
- "cofaxTools": "/tools/*"},
-
- "taglib": {
- "taglib-uri": "cofax.tld",
- "taglib-location": "/WEB-INF/tlds/cofax.tld"}}} \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/data/widget.json b/3rdparty/rapidjson/bin/data/widget.json
deleted file mode 100644
index 0449493a644..00000000000
--- a/3rdparty/rapidjson/bin/data/widget.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{"widget": {
- "debug": "on",
- "window": {
- "title": "Sample Konfabulator Widget",
- "name": "main_window",
- "width": 500,
- "height": 500
- },
- "image": {
- "src": "Images/Sun.png",
- "name": "sun1",
- "hOffset": 250,
- "vOffset": 250,
- "alignment": "center"
- },
- "text": {
- "data": "Click Here",
- "size": 36,
- "style": "bold",
- "name": "text1",
- "hOffset": 250,
- "vOffset": 100,
- "alignment": "center",
- "onMouseUp": "sun1.opacity = (sun1.opacity / 100) * 90;"
- }
-}} \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/draft-04/schema b/3rdparty/rapidjson/bin/draft-04/schema
deleted file mode 100644
index 85eb502a680..00000000000
--- a/3rdparty/rapidjson/bin/draft-04/schema
+++ /dev/null
@@ -1,150 +0,0 @@
-{
- "id": "http://json-schema.org/draft-04/schema#",
- "$schema": "http://json-schema.org/draft-04/schema#",
- "description": "Core schema meta-schema",
- "definitions": {
- "schemaArray": {
- "type": "array",
- "minItems": 1,
- "items": { "$ref": "#" }
- },
- "positiveInteger": {
- "type": "integer",
- "minimum": 0
- },
- "positiveIntegerDefault0": {
- "allOf": [ { "$ref": "#/definitions/positiveInteger" }, { "default": 0 } ]
- },
- "simpleTypes": {
- "enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ]
- },
- "stringArray": {
- "type": "array",
- "items": { "type": "string" },
- "minItems": 1,
- "uniqueItems": true
- }
- },
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uri"
- },
- "$schema": {
- "type": "string",
- "format": "uri"
- },
- "title": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "default": {},
- "multipleOf": {
- "type": "number",
- "minimum": 0,
- "exclusiveMinimum": true
- },
- "maximum": {
- "type": "number"
- },
- "exclusiveMaximum": {
- "type": "boolean",
- "default": false
- },
- "minimum": {
- "type": "number"
- },
- "exclusiveMinimum": {
- "type": "boolean",
- "default": false
- },
- "maxLength": { "$ref": "#/definitions/positiveInteger" },
- "minLength": { "$ref": "#/definitions/positiveIntegerDefault0" },
- "pattern": {
- "type": "string",
- "format": "regex"
- },
- "additionalItems": {
- "anyOf": [
- { "type": "boolean" },
- { "$ref": "#" }
- ],
- "default": {}
- },
- "items": {
- "anyOf": [
- { "$ref": "#" },
- { "$ref": "#/definitions/schemaArray" }
- ],
- "default": {}
- },
- "maxItems": { "$ref": "#/definitions/positiveInteger" },
- "minItems": { "$ref": "#/definitions/positiveIntegerDefault0" },
- "uniqueItems": {
- "type": "boolean",
- "default": false
- },
- "maxProperties": { "$ref": "#/definitions/positiveInteger" },
- "minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" },
- "required": { "$ref": "#/definitions/stringArray" },
- "additionalProperties": {
- "anyOf": [
- { "type": "boolean" },
- { "$ref": "#" }
- ],
- "default": {}
- },
- "definitions": {
- "type": "object",
- "additionalProperties": { "$ref": "#" },
- "default": {}
- },
- "properties": {
- "type": "object",
- "additionalProperties": { "$ref": "#" },
- "default": {}
- },
- "patternProperties": {
- "type": "object",
- "additionalProperties": { "$ref": "#" },
- "default": {}
- },
- "dependencies": {
- "type": "object",
- "additionalProperties": {
- "anyOf": [
- { "$ref": "#" },
- { "$ref": "#/definitions/stringArray" }
- ]
- }
- },
- "enum": {
- "type": "array",
- "minItems": 1,
- "uniqueItems": true
- },
- "type": {
- "anyOf": [
- { "$ref": "#/definitions/simpleTypes" },
- {
- "type": "array",
- "items": { "$ref": "#/definitions/simpleTypes" },
- "minItems": 1,
- "uniqueItems": true
- }
- ]
- },
- "allOf": { "$ref": "#/definitions/schemaArray" },
- "anyOf": { "$ref": "#/definitions/schemaArray" },
- "oneOf": { "$ref": "#/definitions/schemaArray" },
- "not": { "$ref": "#" }
- },
- "dependencies": {
- "exclusiveMaximum": [ "maximum" ],
- "exclusiveMinimum": [ "minimum" ]
- },
- "default": {}
-}
diff --git a/3rdparty/rapidjson/bin/encodings/utf16be.json b/3rdparty/rapidjson/bin/encodings/utf16be.json
deleted file mode 100644
index e46dbfb9ddc..00000000000
--- a/3rdparty/rapidjson/bin/encodings/utf16be.json
+++ /dev/null
Binary files differ
diff --git a/3rdparty/rapidjson/bin/encodings/utf16bebom.json b/3rdparty/rapidjson/bin/encodings/utf16bebom.json
deleted file mode 100644
index 0a23ae205cb..00000000000
--- a/3rdparty/rapidjson/bin/encodings/utf16bebom.json
+++ /dev/null
Binary files differ
diff --git a/3rdparty/rapidjson/bin/encodings/utf16le.json b/3rdparty/rapidjson/bin/encodings/utf16le.json
deleted file mode 100644
index 92d504530cd..00000000000
--- a/3rdparty/rapidjson/bin/encodings/utf16le.json
+++ /dev/null
Binary files differ
diff --git a/3rdparty/rapidjson/bin/encodings/utf16lebom.json b/3rdparty/rapidjson/bin/encodings/utf16lebom.json
deleted file mode 100644
index eaba00132cd..00000000000
--- a/3rdparty/rapidjson/bin/encodings/utf16lebom.json
+++ /dev/null
Binary files differ
diff --git a/3rdparty/rapidjson/bin/encodings/utf32be.json b/3rdparty/rapidjson/bin/encodings/utf32be.json
deleted file mode 100644
index 9cbb522279d..00000000000
--- a/3rdparty/rapidjson/bin/encodings/utf32be.json
+++ /dev/null
Binary files differ
diff --git a/3rdparty/rapidjson/bin/encodings/utf32bebom.json b/3rdparty/rapidjson/bin/encodings/utf32bebom.json
deleted file mode 100644
index bde6a99ab43..00000000000
--- a/3rdparty/rapidjson/bin/encodings/utf32bebom.json
+++ /dev/null
Binary files differ
diff --git a/3rdparty/rapidjson/bin/encodings/utf32le.json b/3rdparty/rapidjson/bin/encodings/utf32le.json
deleted file mode 100644
index b00f290a64f..00000000000
--- a/3rdparty/rapidjson/bin/encodings/utf32le.json
+++ /dev/null
Binary files differ
diff --git a/3rdparty/rapidjson/bin/encodings/utf32lebom.json b/3rdparty/rapidjson/bin/encodings/utf32lebom.json
deleted file mode 100644
index d3db39bf732..00000000000
--- a/3rdparty/rapidjson/bin/encodings/utf32lebom.json
+++ /dev/null
Binary files differ
diff --git a/3rdparty/rapidjson/bin/encodings/utf8.json b/3rdparty/rapidjson/bin/encodings/utf8.json
deleted file mode 100644
index 1e27ece50e4..00000000000
--- a/3rdparty/rapidjson/bin/encodings/utf8.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "en":"I can eat glass and it doesn't hurt me.",
- "zh-Hant":"我能åžä¸‹çŽ»ç’ƒè€Œä¸å‚·èº«é«”。",
- "zh-Hans":"我能åžä¸‹çŽ»ç’ƒè€Œä¸ä¼¤èº«ä½“。",
- "ja":"ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™ã€‚ãれã¯ç§ã‚’å‚·ã¤ã‘ã¾ã›ã‚“。",
- "ko":"나는 유리를 ë¨¹ì„ ìˆ˜ 있어요. ê·¸ëž˜ë„ ì•„í”„ì§€ 않아요"
-} \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/encodings/utf8bom.json b/3rdparty/rapidjson/bin/encodings/utf8bom.json
deleted file mode 100644
index 07e81e10528..00000000000
--- a/3rdparty/rapidjson/bin/encodings/utf8bom.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "en":"I can eat glass and it doesn't hurt me.",
- "zh-Hant":"我能åžä¸‹çŽ»ç’ƒè€Œä¸å‚·èº«é«”。",
- "zh-Hans":"我能åžä¸‹çŽ»ç’ƒè€Œä¸ä¼¤èº«ä½“。",
- "ja":"ç§ã¯ã‚¬ãƒ©ã‚¹ã‚’食ã¹ã‚‰ã‚Œã¾ã™ã€‚ãれã¯ç§ã‚’å‚·ã¤ã‘ã¾ã›ã‚“。",
- "ko":"나는 유리를 ë¨¹ì„ ìˆ˜ 있어요. ê·¸ëž˜ë„ ì•„í”„ì§€ 않아요"
-} \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/jsonchecker/fail1.json b/3rdparty/rapidjson/bin/jsonchecker/fail1.json
deleted file mode 100644
index 6216b865f10..00000000000
--- a/3rdparty/rapidjson/bin/jsonchecker/fail1.json
+++ /dev/null
@@ -1 +0,0 @@
-"A JSON payload should be an object or array, not a string." \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/jsonchecker/fail10.json b/3rdparty/rapidjson/bin/jsonchecker/fail10.json
deleted file mode 100644
index 5d8c0047bd5..00000000000
--- a/3rdparty/rapidjson/bin/jsonchecker/fail10.json
+++ /dev/null
@@ -1 +0,0 @@
-{"Extra value after close": true} "misplaced quoted value" \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/jsonchecker/fail11.json b/3rdparty/rapidjson/bin/jsonchecker/fail11.json
deleted file mode 100644
index 76eb95b4583..00000000000
--- a/3rdparty/rapidjson/bin/jsonchecker/fail11.json
+++ /dev/null
@@ -1 +0,0 @@
-{"Illegal expression": 1 + 2} \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/jsonchecker/fail12.json b/3rdparty/rapidjson/bin/jsonchecker/fail12.json
deleted file mode 100644
index 77580a4522d..00000000000
--- a/3rdparty/rapidjson/bin/jsonchecker/fail12.json
+++ /dev/null
@@ -1 +0,0 @@
-{"Illegal invocation": alert()} \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/jsonchecker/fail13.json b/3rdparty/rapidjson/bin/jsonchecker/fail13.json
deleted file mode 100644
index 379406b59bd..00000000000
--- a/3rdparty/rapidjson/bin/jsonchecker/fail13.json
+++ /dev/null
@@ -1 +0,0 @@
-{"Numbers cannot have leading zeroes": 013} \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/jsonchecker/fail14.json b/3rdparty/rapidjson/bin/jsonchecker/fail14.json
deleted file mode 100644
index 0ed366b38a3..00000000000
--- a/3rdparty/rapidjson/bin/jsonchecker/fail14.json
+++ /dev/null
@@ -1 +0,0 @@
-{"Numbers cannot be hex": 0x14} \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/jsonchecker/fail15.json b/3rdparty/rapidjson/bin/jsonchecker/fail15.json
deleted file mode 100644
index fc8376b605d..00000000000
--- a/3rdparty/rapidjson/bin/jsonchecker/fail15.json
+++ /dev/null
@@ -1 +0,0 @@
-["Illegal backslash escape: \x15"] \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/jsonchecker/fail16.json b/3rdparty/rapidjson/bin/jsonchecker/fail16.json
deleted file mode 100644
index 3fe21d4b532..00000000000
--- a/3rdparty/rapidjson/bin/jsonchecker/fail16.json
+++ /dev/null
@@ -1 +0,0 @@
-[\naked] \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/jsonchecker/fail17.json b/3rdparty/rapidjson/bin/jsonchecker/fail17.json
deleted file mode 100644
index 62b9214aeda..00000000000
--- a/3rdparty/rapidjson/bin/jsonchecker/fail17.json
+++ /dev/null
@@ -1 +0,0 @@
-["Illegal backslash escape: \017"] \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/jsonchecker/fail18.json b/3rdparty/rapidjson/bin/jsonchecker/fail18.json
deleted file mode 100644
index edac92716f1..00000000000
--- a/3rdparty/rapidjson/bin/jsonchecker/fail18.json
+++ /dev/null
@@ -1 +0,0 @@
-[[[[[[[[[[[[[[[[[[[["Too deep"]]]]]]]]]]]]]]]]]]]] \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/jsonchecker/fail19.json b/3rdparty/rapidjson/bin/jsonchecker/fail19.json
deleted file mode 100644
index 3b9c46fa9a2..00000000000
--- a/3rdparty/rapidjson/bin/jsonchecker/fail19.json
+++ /dev/null
@@ -1 +0,0 @@
-{"Missing colon" null} \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/jsonchecker/fail2.json b/3rdparty/rapidjson/bin/jsonchecker/fail2.json
deleted file mode 100644
index 6b7c11e5a56..00000000000
--- a/3rdparty/rapidjson/bin/jsonchecker/fail2.json
+++ /dev/null
@@ -1 +0,0 @@
-["Unclosed array" \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/jsonchecker/fail20.json b/3rdparty/rapidjson/bin/jsonchecker/fail20.json
deleted file mode 100644
index 27c1af3e72e..00000000000
--- a/3rdparty/rapidjson/bin/jsonchecker/fail20.json
+++ /dev/null
@@ -1 +0,0 @@
-{"Double colon":: null} \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/jsonchecker/fail21.json b/3rdparty/rapidjson/bin/jsonchecker/fail21.json
deleted file mode 100644
index 62474573b21..00000000000
--- a/3rdparty/rapidjson/bin/jsonchecker/fail21.json
+++ /dev/null
@@ -1 +0,0 @@
-{"Comma instead of colon", null} \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/jsonchecker/fail22.json b/3rdparty/rapidjson/bin/jsonchecker/fail22.json
deleted file mode 100644
index a7752581bcf..00000000000
--- a/3rdparty/rapidjson/bin/jsonchecker/fail22.json
+++ /dev/null
@@ -1 +0,0 @@
-["Colon instead of comma": false] \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/jsonchecker/fail23.json b/3rdparty/rapidjson/bin/jsonchecker/fail23.json
deleted file mode 100644
index 494add1ca19..00000000000
--- a/3rdparty/rapidjson/bin/jsonchecker/fail23.json
+++ /dev/null
@@ -1 +0,0 @@
-["Bad value", truth] \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/jsonchecker/fail24.json b/3rdparty/rapidjson/bin/jsonchecker/fail24.json
deleted file mode 100644
index caff239bfc3..00000000000
--- a/3rdparty/rapidjson/bin/jsonchecker/fail24.json
+++ /dev/null
@@ -1 +0,0 @@
-['single quote'] \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/jsonchecker/fail25.json b/3rdparty/rapidjson/bin/jsonchecker/fail25.json
deleted file mode 100644
index 8b7ad23e010..00000000000
--- a/3rdparty/rapidjson/bin/jsonchecker/fail25.json
+++ /dev/null
@@ -1 +0,0 @@
-[" tab character in string "] \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/jsonchecker/fail26.json b/3rdparty/rapidjson/bin/jsonchecker/fail26.json
deleted file mode 100644
index 845d26a6a54..00000000000
--- a/3rdparty/rapidjson/bin/jsonchecker/fail26.json
+++ /dev/null
@@ -1 +0,0 @@
-["tab\ character\ in\ string\ "] \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/jsonchecker/fail27.json b/3rdparty/rapidjson/bin/jsonchecker/fail27.json
deleted file mode 100644
index 6b01a2ca4a9..00000000000
--- a/3rdparty/rapidjson/bin/jsonchecker/fail27.json
+++ /dev/null
@@ -1,2 +0,0 @@
-["line
-break"] \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/jsonchecker/fail28.json b/3rdparty/rapidjson/bin/jsonchecker/fail28.json
deleted file mode 100644
index 621a0101c66..00000000000
--- a/3rdparty/rapidjson/bin/jsonchecker/fail28.json
+++ /dev/null
@@ -1,2 +0,0 @@
-["line\
-break"] \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/jsonchecker/fail29.json b/3rdparty/rapidjson/bin/jsonchecker/fail29.json
deleted file mode 100644
index 47ec421bb62..00000000000
--- a/3rdparty/rapidjson/bin/jsonchecker/fail29.json
+++ /dev/null
@@ -1 +0,0 @@
-[0e] \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/jsonchecker/fail3.json b/3rdparty/rapidjson/bin/jsonchecker/fail3.json
deleted file mode 100644
index 168c81eb785..00000000000
--- a/3rdparty/rapidjson/bin/jsonchecker/fail3.json
+++ /dev/null
@@ -1 +0,0 @@
-{unquoted_key: "keys must be quoted"} \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/jsonchecker/fail30.json b/3rdparty/rapidjson/bin/jsonchecker/fail30.json
deleted file mode 100644
index 8ab0bc4b8b2..00000000000
--- a/3rdparty/rapidjson/bin/jsonchecker/fail30.json
+++ /dev/null
@@ -1 +0,0 @@
-[0e+] \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/jsonchecker/fail31.json b/3rdparty/rapidjson/bin/jsonchecker/fail31.json
deleted file mode 100644
index 1cce602b518..00000000000
--- a/3rdparty/rapidjson/bin/jsonchecker/fail31.json
+++ /dev/null
@@ -1 +0,0 @@
-[0e+-1] \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/jsonchecker/fail32.json b/3rdparty/rapidjson/bin/jsonchecker/fail32.json
deleted file mode 100644
index 45cba7396ff..00000000000
--- a/3rdparty/rapidjson/bin/jsonchecker/fail32.json
+++ /dev/null
@@ -1 +0,0 @@
-{"Comma instead if closing brace": true, \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/jsonchecker/fail33.json b/3rdparty/rapidjson/bin/jsonchecker/fail33.json
deleted file mode 100644
index ca5eb19dc97..00000000000
--- a/3rdparty/rapidjson/bin/jsonchecker/fail33.json
+++ /dev/null
@@ -1 +0,0 @@
-["mismatch"} \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/jsonchecker/fail4.json b/3rdparty/rapidjson/bin/jsonchecker/fail4.json
deleted file mode 100644
index 9de168bf34e..00000000000
--- a/3rdparty/rapidjson/bin/jsonchecker/fail4.json
+++ /dev/null
@@ -1 +0,0 @@
-["extra comma",] \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/jsonchecker/fail5.json b/3rdparty/rapidjson/bin/jsonchecker/fail5.json
deleted file mode 100644
index ddf3ce3d240..00000000000
--- a/3rdparty/rapidjson/bin/jsonchecker/fail5.json
+++ /dev/null
@@ -1 +0,0 @@
-["double extra comma",,] \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/jsonchecker/fail6.json b/3rdparty/rapidjson/bin/jsonchecker/fail6.json
deleted file mode 100644
index ed91580e1b1..00000000000
--- a/3rdparty/rapidjson/bin/jsonchecker/fail6.json
+++ /dev/null
@@ -1 +0,0 @@
-[ , "<-- missing value"] \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/jsonchecker/fail7.json b/3rdparty/rapidjson/bin/jsonchecker/fail7.json
deleted file mode 100644
index 8a96af3e4ee..00000000000
--- a/3rdparty/rapidjson/bin/jsonchecker/fail7.json
+++ /dev/null
@@ -1 +0,0 @@
-["Comma after the close"], \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/jsonchecker/fail8.json b/3rdparty/rapidjson/bin/jsonchecker/fail8.json
deleted file mode 100644
index b28479c6ecb..00000000000
--- a/3rdparty/rapidjson/bin/jsonchecker/fail8.json
+++ /dev/null
@@ -1 +0,0 @@
-["Extra close"]] \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/jsonchecker/fail9.json b/3rdparty/rapidjson/bin/jsonchecker/fail9.json
deleted file mode 100644
index 5815574f363..00000000000
--- a/3rdparty/rapidjson/bin/jsonchecker/fail9.json
+++ /dev/null
@@ -1 +0,0 @@
-{"Extra comma": true,} \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/jsonchecker/pass1.json b/3rdparty/rapidjson/bin/jsonchecker/pass1.json
deleted file mode 100644
index 70e26854369..00000000000
--- a/3rdparty/rapidjson/bin/jsonchecker/pass1.json
+++ /dev/null
@@ -1,58 +0,0 @@
-[
- "JSON Test Pattern pass1",
- {"object with 1 member":["array with 1 element"]},
- {},
- [],
- -42,
- true,
- false,
- null,
- {
- "integer": 1234567890,
- "real": -9876.543210,
- "e": 0.123456789e-12,
- "E": 1.234567890E+34,
- "": 23456789012E66,
- "zero": 0,
- "one": 1,
- "space": " ",
- "quote": "\"",
- "backslash": "\\",
- "controls": "\b\f\n\r\t",
- "slash": "/ & \/",
- "alpha": "abcdefghijklmnopqrstuvwyz",
- "ALPHA": "ABCDEFGHIJKLMNOPQRSTUVWYZ",
- "digit": "0123456789",
- "0123456789": "digit",
- "special": "`1~!@#$%^&*()_+-={':[,]}|;.</>?",
- "hex": "\u0123\u4567\u89AB\uCDEF\uabcd\uef4A",
- "true": true,
- "false": false,
- "null": null,
- "array":[ ],
- "object":{ },
- "address": "50 St. James Street",
- "url": "http://www.JSON.org/",
- "comment": "// /* <!-- --",
- "# -- --> */": " ",
- " s p a c e d " :[1,2 , 3
-
-,
-
-4 , 5 , 6 ,7 ],"compact":[1,2,3,4,5,6,7],
- "jsontext": "{\"object with 1 member\":[\"array with 1 element\"]}",
- "quotes": "&#34; \u0022 %22 0x22 034 &#x22;",
- "\/\\\"\uCAFE\uBABE\uAB98\uFCDE\ubcda\uef4A\b\f\n\r\t`1~!@#$%^&*()_+-=[]{}|;:',./<>?"
-: "A key can be any string"
- },
- 0.5 ,98.6
-,
-99.44
-,
-
-1066,
-1e1,
-0.1e1,
-1e-1,
-1e00,2e+00,2e-00
-,"rosebud"] \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/jsonchecker/pass2.json b/3rdparty/rapidjson/bin/jsonchecker/pass2.json
deleted file mode 100644
index d3c63c7ad84..00000000000
--- a/3rdparty/rapidjson/bin/jsonchecker/pass2.json
+++ /dev/null
@@ -1 +0,0 @@
-[[[[[[[[[[[[[[[[[[["Not too deep"]]]]]]]]]]]]]]]]]]] \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/jsonchecker/pass3.json b/3rdparty/rapidjson/bin/jsonchecker/pass3.json
deleted file mode 100644
index 4528d51f1ac..00000000000
--- a/3rdparty/rapidjson/bin/jsonchecker/pass3.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "JSON Test Pattern pass3": {
- "The outermost value": "must be an object or array.",
- "In this test": "It is an object."
- }
-}
diff --git a/3rdparty/rapidjson/bin/jsonchecker/readme.txt b/3rdparty/rapidjson/bin/jsonchecker/readme.txt
deleted file mode 100644
index 321d89d998e..00000000000
--- a/3rdparty/rapidjson/bin/jsonchecker/readme.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-Test suite from http://json.org/JSON_checker/.
-
-If the JSON_checker is working correctly, it must accept all of the pass*.json files and reject all of the fail*.json files.
diff --git a/3rdparty/rapidjson/bin/jsonschema/.gitignore b/3rdparty/rapidjson/bin/jsonschema/.gitignore
deleted file mode 100644
index 1333ed77b7e..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-TODO
diff --git a/3rdparty/rapidjson/bin/jsonschema/.travis.yml b/3rdparty/rapidjson/bin/jsonschema/.travis.yml
deleted file mode 100644
index deecd61100e..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/.travis.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-language: python
-python: "2.7"
-install: pip install jsonschema
-script: bin/jsonschema_suite check
diff --git a/3rdparty/rapidjson/bin/jsonschema/LICENSE b/3rdparty/rapidjson/bin/jsonschema/LICENSE
deleted file mode 100644
index c28adbadd91..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2012 Julian Berman
-
-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/3rdparty/rapidjson/bin/jsonschema/README.md b/3rdparty/rapidjson/bin/jsonschema/README.md
deleted file mode 100644
index 6d9da949323..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/README.md
+++ /dev/null
@@ -1,148 +0,0 @@
-JSON Schema Test Suite [![Build Status](https://travis-ci.org/json-schema/JSON-Schema-Test-Suite.png?branch=develop)](https://travis-ci.org/json-schema/JSON-Schema-Test-Suite)
-======================
-
-This repository contains a set of JSON objects that implementors of JSON Schema
-validation libraries can use to test their validators.
-
-It is meant to be language agnostic and should require only a JSON parser.
-
-The conversion of the JSON objects into tests within your test framework of
-choice is still the job of the validator implementor.
-
-Structure of a Test
--------------------
-
-If you're going to use this suite, you need to know how tests are laid out. The
-tests are contained in the `tests` directory at the root of this repository.
-
-Inside that directory is a subdirectory for each draft or version of the
-schema. We'll use `draft3` as an example.
-
-If you look inside the draft directory, there are a number of `.json` files,
-which logically group a set of test cases together. Often the grouping is by
-property under test, but not always, especially within optional test files
-(discussed below).
-
-Inside each `.json` file is a single array containing objects. It's easiest to
-illustrate the structure of these with an example:
-
-```json
- {
- "description": "the description of the test case",
- "schema": {"the schema that should" : "be validated against"},
- "tests": [
- {
- "description": "a specific test of a valid instance",
- "data": "the instance",
- "valid": true
- },
- {
- "description": "another specific test this time, invalid",
- "data": 15,
- "valid": false
- }
- ]
- }
-```
-
-So a description, a schema, and some tests, where tests is an array containing
-one or more objects with descriptions, data, and a boolean indicating whether
-they should be valid or invalid.
-
-Coverage
---------
-
-Draft 3 and 4 should have full coverage. If you see anything missing or think
-there is a useful test missing, please send a pull request or open an issue.
-
-Who Uses the Test Suite
------------------------
-
-This suite is being used by:
-
-### Coffeescript ###
-
-* [jsck](https://github.com/pandastrike/jsck)
-
-### Dart ###
-
-* [json_schema](https://github.com/patefacio/json_schema)
-
-### Erlang ###
-
-* [jesse](https://github.com/klarna/jesse)
-
-### Go ###
-
-* [gojsonschema](https://github.com/sigu-399/gojsonschema)
-* [validate-json](https://github.com/cesanta/validate-json)
-
-### Haskell ###
-
-* [aeson-schema](https://github.com/timjb/aeson-schema)
-* [hjsonschema](https://github.com/seagreen/hjsonschema)
-
-### Java ###
-
-* [json-schema-validator](https://github.com/fge/json-schema-validator)
-
-### JavaScript ###
-
-* [json-schema-benchmark](https://github.com/Muscula/json-schema-benchmark)
-* [direct-schema](https://github.com/IreneKnapp/direct-schema)
-* [is-my-json-valid](https://github.com/mafintosh/is-my-json-valid)
-* [jassi](https://github.com/iclanzan/jassi)
-* [JaySchema](https://github.com/natesilva/jayschema)
-* [json-schema-valid](https://github.com/ericgj/json-schema-valid)
-* [Jsonary](https://github.com/jsonary-js/jsonary)
-* [jsonschema](https://github.com/tdegrunt/jsonschema)
-* [request-validator](https://github.com/bugventure/request-validator)
-* [skeemas](https://github.com/Prestaul/skeemas)
-* [tv4](https://github.com/geraintluff/tv4)
-* [z-schema](https://github.com/zaggino/z-schema)
-* [jsen](https://github.com/bugventure/jsen)
-* [ajv](https://github.com/epoberezkin/ajv)
-
-### Node.js ###
-
-The JSON Schema Test Suite is also available as an
-[npm](https://www.npmjs.com/package/json-schema-test-suite) package.
-Node-specific support is maintained on the [node branch](https://github.com/json-schema/JSON-Schema-Test-Suite/tree/node).
-See [NODE-README.md](https://github.com/json-schema/JSON-Schema-Test-Suite/blob/node/NODE-README.md)
-for more information.
-
-### .NET ###
-
-* [Newtonsoft.Json.Schema](https://github.com/JamesNK/Newtonsoft.Json.Schema)
-
-### PHP ###
-
-* [json-schema](https://github.com/justinrainbow/json-schema)
-
-### Python ###
-
-* [jsonschema](https://github.com/Julian/jsonschema)
-
-### Ruby ###
-
-* [json-schema](https://github.com/hoxworth/json-schema)
-
-### Rust ###
-
-* [valico](https://github.com/rustless/valico)
-
-### Swift ###
-
-* [JSONSchema](https://github.com/kylef/JSONSchema.swift)
-
-If you use it as well, please fork and send a pull request adding yourself to
-the list :).
-
-Contributing
-------------
-
-If you see something missing or incorrect, a pull request is most welcome!
-
-There are some sanity checks in place for testing the test suite. You can run
-them with `bin/jsonschema_suite check` or `tox`. They will be run automatically by
-[Travis CI](https://travis-ci.org/) as well.
diff --git a/3rdparty/rapidjson/bin/jsonschema/bin/jsonschema_suite b/3rdparty/rapidjson/bin/jsonschema/bin/jsonschema_suite
deleted file mode 100644
index 96108c86ba2..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/bin/jsonschema_suite
+++ /dev/null
@@ -1,283 +0,0 @@
-#! /usr/bin/env python
-from __future__ import print_function
-import sys
-import textwrap
-
-try:
- import argparse
-except ImportError:
- print(textwrap.dedent("""
- The argparse library could not be imported. jsonschema_suite requires
- either Python 2.7 or for you to install argparse. You can do so by
- running `pip install argparse`, `easy_install argparse` or by
- downloading argparse and running `python2.6 setup.py install`.
-
- See https://pypi.python.org/pypi/argparse for details.
- """.strip("\n")))
- sys.exit(1)
-
-import errno
-import fnmatch
-import json
-import os
-import random
-import shutil
-import unittest
-import warnings
-
-if getattr(unittest, "skipIf", None) is None:
- unittest.skipIf = lambda cond, msg : lambda fn : fn
-
-try:
- import jsonschema
-except ImportError:
- jsonschema = None
-else:
- validators = getattr(
- jsonschema.validators, "validators", jsonschema.validators
- )
-
-
-ROOT_DIR = os.path.join(
- os.path.dirname(__file__), os.pardir).rstrip("__pycache__")
-SUITE_ROOT_DIR = os.path.join(ROOT_DIR, "tests")
-
-REMOTES = {
- "integer.json": {"type": "integer"},
- "subSchemas.json": {
- "integer": {"type": "integer"},
- "refToInteger": {"$ref": "#/integer"},
- },
- "folder/folderInteger.json": {"type": "integer"}
-}
-REMOTES_DIR = os.path.join(ROOT_DIR, "remotes")
-
-TESTSUITE_SCHEMA = {
- "$schema": "http://json-schema.org/draft-03/schema#",
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "description": {"type": "string", "required": True},
- "schema": {"required": True},
- "tests": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "description": {"type": "string", "required": True},
- "data": {"required": True},
- "valid": {"type": "boolean", "required": True}
- },
- "additionalProperties": False
- },
- "minItems": 1
- }
- },
- "additionalProperties": False,
- "minItems": 1
- }
-}
-
-
-def files(paths):
- for path in paths:
- with open(path) as test_file:
- yield json.load(test_file)
-
-
-def groups(paths):
- for test_file in files(paths):
- for group in test_file:
- yield group
-
-
-def cases(paths):
- for test_group in groups(paths):
- for test in test_group["tests"]:
- test["schema"] = test_group["schema"]
- yield test
-
-
-def collect(root_dir):
- for root, dirs, files in os.walk(root_dir):
- for filename in fnmatch.filter(files, "*.json"):
- yield os.path.join(root, filename)
-
-
-class SanityTests(unittest.TestCase):
- @classmethod
- def setUpClass(cls):
- print("Looking for tests in %s" % SUITE_ROOT_DIR)
- cls.test_files = list(collect(SUITE_ROOT_DIR))
- print("Found %s test files" % len(cls.test_files))
- assert cls.test_files, "Didn't find the test files!"
-
- def test_all_files_are_valid_json(self):
- for path in self.test_files:
- with open(path) as test_file:
- try:
- json.load(test_file)
- except ValueError as error:
- self.fail("%s contains invalid JSON (%s)" % (path, error))
-
- def test_all_descriptions_have_reasonable_length(self):
- for case in cases(self.test_files):
- descript = case["description"]
- self.assertLess(
- len(descript),
- 60,
- "%r is too long! (keep it to less than 60 chars)" % (descript,)
- )
-
- def test_all_descriptions_are_unique(self):
- for group in groups(self.test_files):
- descriptions = set(test["description"] for test in group["tests"])
- self.assertEqual(
- len(descriptions),
- len(group["tests"]),
- "%r contains a duplicate description" % (group,)
- )
-
- @unittest.skipIf(jsonschema is None, "Validation library not present!")
- def test_all_schemas_are_valid(self):
- for schema in os.listdir(SUITE_ROOT_DIR):
- schema_validator = validators.get(schema)
- if schema_validator is not None:
- test_files = collect(os.path.join(SUITE_ROOT_DIR, schema))
- for case in cases(test_files):
- try:
- schema_validator.check_schema(case["schema"])
- except jsonschema.SchemaError as error:
- self.fail("%s contains an invalid schema (%s)" %
- (case, error))
- else:
- warnings.warn("No schema validator for %s" % schema)
-
- @unittest.skipIf(jsonschema is None, "Validation library not present!")
- def test_suites_are_valid(self):
- validator = jsonschema.Draft3Validator(TESTSUITE_SCHEMA)
- for tests in files(self.test_files):
- try:
- validator.validate(tests)
- except jsonschema.ValidationError as error:
- self.fail(str(error))
-
- def test_remote_schemas_are_updated(self):
- for url, schema in REMOTES.items():
- filepath = os.path.join(REMOTES_DIR, url)
- with open(filepath) as schema_file:
- self.assertEqual(json.load(schema_file), schema)
-
-
-def main(arguments):
- if arguments.command == "check":
- suite = unittest.TestLoader().loadTestsFromTestCase(SanityTests)
- result = unittest.TextTestRunner(verbosity=2).run(suite)
- sys.exit(not result.wasSuccessful())
- elif arguments.command == "flatten":
- selected_cases = [case for case in cases(collect(arguments.version))]
-
- if arguments.randomize:
- random.shuffle(selected_cases)
-
- json.dump(selected_cases, sys.stdout, indent=4, sort_keys=True)
- elif arguments.command == "remotes":
- json.dump(REMOTES, sys.stdout, indent=4, sort_keys=True)
- elif arguments.command == "dump_remotes":
- if arguments.update:
- shutil.rmtree(arguments.out_dir, ignore_errors=True)
-
- try:
- os.makedirs(arguments.out_dir)
- except OSError as e:
- if e.errno == errno.EEXIST:
- print("%s already exists. Aborting." % arguments.out_dir)
- sys.exit(1)
- raise
-
- for url, schema in REMOTES.items():
- filepath = os.path.join(arguments.out_dir, url)
-
- try:
- os.makedirs(os.path.dirname(filepath))
- except OSError as e:
- if e.errno != errno.EEXIST:
- raise
-
- with open(filepath, "wb") as out_file:
- json.dump(schema, out_file, indent=4, sort_keys=True)
- elif arguments.command == "serve":
- try:
- from flask import Flask, jsonify
- except ImportError:
- print(textwrap.dedent("""
- The Flask library is required to serve the remote schemas.
-
- You can install it by running `pip install Flask`.
-
- Alternatively, see the `jsonschema_suite remotes` or
- `jsonschema_suite dump_remotes` commands to create static files
- that can be served with your own web server.
- """.strip("\n")))
- sys.exit(1)
-
- app = Flask(__name__)
-
- @app.route("/<path:path>")
- def serve_path(path):
- if path in REMOTES:
- return jsonify(REMOTES[path])
- return "Document does not exist.", 404
-
- app.run(port=1234)
-
-
-parser = argparse.ArgumentParser(
- description="JSON Schema Test Suite utilities",
-)
-subparsers = parser.add_subparsers(help="utility commands", dest="command")
-
-check = subparsers.add_parser("check", help="Sanity check the test suite.")
-
-flatten = subparsers.add_parser(
- "flatten",
- help="Output a flattened file containing a selected version's test cases."
-)
-flatten.add_argument(
- "--randomize",
- action="store_true",
- help="Randomize the order of the outputted cases.",
-)
-flatten.add_argument(
- "version", help="The directory containing the version to output",
-)
-
-remotes = subparsers.add_parser(
- "remotes",
- help="Output the expected URLs and their associated schemas for remote "
- "ref tests as a JSON object."
-)
-
-dump_remotes = subparsers.add_parser(
- "dump_remotes", help="Dump the remote ref schemas into a file tree",
-)
-dump_remotes.add_argument(
- "--update",
- action="store_true",
- help="Update the remotes in an existing directory.",
-)
-dump_remotes.add_argument(
- "--out-dir",
- default=REMOTES_DIR,
- type=os.path.abspath,
- help="The output directory to create as the root of the file tree",
-)
-
-serve = subparsers.add_parser(
- "serve",
- help="Start a webserver to serve schemas used by remote ref tests."
-)
-
-if __name__ == "__main__":
- main(parser.parse_args())
diff --git a/3rdparty/rapidjson/bin/jsonschema/remotes/.DS_Store b/3rdparty/rapidjson/bin/jsonschema/remotes/.DS_Store
deleted file mode 100644
index 1d098a4103d..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/remotes/.DS_Store
+++ /dev/null
Binary files differ
diff --git a/3rdparty/rapidjson/bin/jsonschema/remotes/folder/folderInteger.json b/3rdparty/rapidjson/bin/jsonschema/remotes/folder/folderInteger.json
deleted file mode 100644
index dbe5c758ee3..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/remotes/folder/folderInteger.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "type": "integer"
-} \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/jsonschema/remotes/integer.json b/3rdparty/rapidjson/bin/jsonschema/remotes/integer.json
deleted file mode 100644
index dbe5c758ee3..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/remotes/integer.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "type": "integer"
-} \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/jsonschema/remotes/subSchemas.json b/3rdparty/rapidjson/bin/jsonschema/remotes/subSchemas.json
deleted file mode 100644
index 8b6d8f842fc..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/remotes/subSchemas.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "integer": {
- "type": "integer"
- },
- "refToInteger": {
- "$ref": "#/integer"
- }
-} \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/.DS_Store b/3rdparty/rapidjson/bin/jsonschema/tests/.DS_Store
deleted file mode 100644
index dae9b18efac..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/.DS_Store
+++ /dev/null
Binary files differ
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/additionalItems.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft3/additionalItems.json
deleted file mode 100644
index 6d4bff51cf3..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/additionalItems.json
+++ /dev/null
@@ -1,82 +0,0 @@
-[
- {
- "description": "additionalItems as schema",
- "schema": {
- "items": [],
- "additionalItems": {"type": "integer"}
- },
- "tests": [
- {
- "description": "additional items match schema",
- "data": [ 1, 2, 3, 4 ],
- "valid": true
- },
- {
- "description": "additional items do not match schema",
- "data": [ 1, 2, 3, "foo" ],
- "valid": false
- }
- ]
- },
- {
- "description": "items is schema, no additionalItems",
- "schema": {
- "items": {},
- "additionalItems": false
- },
- "tests": [
- {
- "description": "all items match schema",
- "data": [ 1, 2, 3, 4, 5 ],
- "valid": true
- }
- ]
- },
- {
- "description": "array of items with no additionalItems",
- "schema": {
- "items": [{}, {}, {}],
- "additionalItems": false
- },
- "tests": [
- {
- "description": "no additional items present",
- "data": [ 1, 2, 3 ],
- "valid": true
- },
- {
- "description": "additional items are not permitted",
- "data": [ 1, 2, 3, 4 ],
- "valid": false
- }
- ]
- },
- {
- "description": "additionalItems as false without items",
- "schema": {"additionalItems": false},
- "tests": [
- {
- "description":
- "items defaults to empty schema so everything is valid",
- "data": [ 1, 2, 3, 4, 5 ],
- "valid": true
- },
- {
- "description": "ignores non-arrays",
- "data": {"foo" : "bar"},
- "valid": true
- }
- ]
- },
- {
- "description": "additionalItems are allowed by default",
- "schema": {"items": []},
- "tests": [
- {
- "description": "only the first items are validated",
- "data": [1, "foo", false],
- "valid": true
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/additionalProperties.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft3/additionalProperties.json
deleted file mode 100644
index 40831f9e9aa..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/additionalProperties.json
+++ /dev/null
@@ -1,88 +0,0 @@
-[
- {
- "description":
- "additionalProperties being false does not allow other properties",
- "schema": {
- "properties": {"foo": {}, "bar": {}},
- "patternProperties": { "^v": {} },
- "additionalProperties": false
- },
- "tests": [
- {
- "description": "no additional properties is valid",
- "data": {"foo": 1},
- "valid": true
- },
- {
- "description": "an additional property is invalid",
- "data": {"foo" : 1, "bar" : 2, "quux" : "boom"},
- "valid": false
- },
- {
- "description": "ignores non-objects",
- "data": [1, 2, 3],
- "valid": true
- },
- {
- "description": "patternProperties are not additional properties",
- "data": {"foo":1, "vroom": 2},
- "valid": true
- }
- ]
- },
- {
- "description":
- "additionalProperties allows a schema which should validate",
- "schema": {
- "properties": {"foo": {}, "bar": {}},
- "additionalProperties": {"type": "boolean"}
- },
- "tests": [
- {
- "description": "no additional properties is valid",
- "data": {"foo": 1},
- "valid": true
- },
- {
- "description": "an additional valid property is valid",
- "data": {"foo" : 1, "bar" : 2, "quux" : true},
- "valid": true
- },
- {
- "description": "an additional invalid property is invalid",
- "data": {"foo" : 1, "bar" : 2, "quux" : 12},
- "valid": false
- }
- ]
- },
- {
- "description":
- "additionalProperties can exist by itself",
- "schema": {
- "additionalProperties": {"type": "boolean"}
- },
- "tests": [
- {
- "description": "an additional valid property is valid",
- "data": {"foo" : true},
- "valid": true
- },
- {
- "description": "an additional invalid property is invalid",
- "data": {"foo" : 1},
- "valid": false
- }
- ]
- },
- {
- "description": "additionalProperties are allowed by default",
- "schema": {"properties": {"foo": {}, "bar": {}}},
- "tests": [
- {
- "description": "additional properties are allowed",
- "data": {"foo": 1, "bar": 2, "quux": true},
- "valid": true
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/default.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft3/default.json
deleted file mode 100644
index 17629779fbe..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/default.json
+++ /dev/null
@@ -1,49 +0,0 @@
-[
- {
- "description": "invalid type for default",
- "schema": {
- "properties": {
- "foo": {
- "type": "integer",
- "default": []
- }
- }
- },
- "tests": [
- {
- "description": "valid when property is specified",
- "data": {"foo": 13},
- "valid": true
- },
- {
- "description": "still valid when the invalid default is used",
- "data": {},
- "valid": true
- }
- ]
- },
- {
- "description": "invalid string value for default",
- "schema": {
- "properties": {
- "bar": {
- "type": "string",
- "minLength": 4,
- "default": "bad"
- }
- }
- },
- "tests": [
- {
- "description": "valid when property is specified",
- "data": {"bar": "good"},
- "valid": true
- },
- {
- "description": "still valid when the invalid default is used",
- "data": {},
- "valid": true
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/dependencies.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft3/dependencies.json
deleted file mode 100644
index 2f6ae489aed..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/dependencies.json
+++ /dev/null
@@ -1,108 +0,0 @@
-[
- {
- "description": "dependencies",
- "schema": {
- "dependencies": {"bar": "foo"}
- },
- "tests": [
- {
- "description": "neither",
- "data": {},
- "valid": true
- },
- {
- "description": "nondependant",
- "data": {"foo": 1},
- "valid": true
- },
- {
- "description": "with dependency",
- "data": {"foo": 1, "bar": 2},
- "valid": true
- },
- {
- "description": "missing dependency",
- "data": {"bar": 2},
- "valid": false
- },
- {
- "description": "ignores non-objects",
- "data": "foo",
- "valid": true
- }
- ]
- },
- {
- "description": "multiple dependencies",
- "schema": {
- "dependencies": {"quux": ["foo", "bar"]}
- },
- "tests": [
- {
- "description": "neither",
- "data": {},
- "valid": true
- },
- {
- "description": "nondependants",
- "data": {"foo": 1, "bar": 2},
- "valid": true
- },
- {
- "description": "with dependencies",
- "data": {"foo": 1, "bar": 2, "quux": 3},
- "valid": true
- },
- {
- "description": "missing dependency",
- "data": {"foo": 1, "quux": 2},
- "valid": false
- },
- {
- "description": "missing other dependency",
- "data": {"bar": 1, "quux": 2},
- "valid": false
- },
- {
- "description": "missing both dependencies",
- "data": {"quux": 1},
- "valid": false
- }
- ]
- },
- {
- "description": "multiple dependencies subschema",
- "schema": {
- "dependencies": {
- "bar": {
- "properties": {
- "foo": {"type": "integer"},
- "bar": {"type": "integer"}
- }
- }
- }
- },
- "tests": [
- {
- "description": "valid",
- "data": {"foo": 1, "bar": 2},
- "valid": true
- },
- {
- "description": "wrong type",
- "data": {"foo": "quux", "bar": 2},
- "valid": false
- },
- {
- "description": "wrong type other",
- "data": {"foo": 2, "bar": "quux"},
- "valid": false
- },
- {
- "description": "wrong type both",
- "data": {"foo": "quux", "bar": "quux"},
- "valid": false
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/disallow.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft3/disallow.json
deleted file mode 100644
index a5c9d90ccee..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/disallow.json
+++ /dev/null
@@ -1,80 +0,0 @@
-[
- {
- "description": "disallow",
- "schema": {
- "disallow": "integer"
- },
- "tests": [
- {
- "description": "allowed",
- "data": "foo",
- "valid": true
- },
- {
- "description": "disallowed",
- "data": 1,
- "valid": false
- }
- ]
- },
- {
- "description": "multiple disallow",
- "schema": {
- "disallow": ["integer", "boolean"]
- },
- "tests": [
- {
- "description": "valid",
- "data": "foo",
- "valid": true
- },
- {
- "description": "mismatch",
- "data": 1,
- "valid": false
- },
- {
- "description": "other mismatch",
- "data": true,
- "valid": false
- }
- ]
- },
- {
- "description": "multiple disallow subschema",
- "schema": {
- "disallow":
- ["string",
- {
- "type": "object",
- "properties": {
- "foo": {
- "type": "string"
- }
- }
- }]
- },
- "tests": [
- {
- "description": "match",
- "data": 1,
- "valid": true
- },
- {
- "description": "other match",
- "data": {"foo": 1},
- "valid": true
- },
- {
- "description": "mismatch",
- "data": "foo",
- "valid": false
- },
- {
- "description": "other mismatch",
- "data": {"foo": "bar"},
- "valid": false
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/divisibleBy.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft3/divisibleBy.json
deleted file mode 100644
index ef7cc148902..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/divisibleBy.json
+++ /dev/null
@@ -1,60 +0,0 @@
-[
- {
- "description": "by int",
- "schema": {"divisibleBy": 2},
- "tests": [
- {
- "description": "int by int",
- "data": 10,
- "valid": true
- },
- {
- "description": "int by int fail",
- "data": 7,
- "valid": false
- },
- {
- "description": "ignores non-numbers",
- "data": "foo",
- "valid": true
- }
- ]
- },
- {
- "description": "by number",
- "schema": {"divisibleBy": 1.5},
- "tests": [
- {
- "description": "zero is divisible by anything (except 0)",
- "data": 0,
- "valid": true
- },
- {
- "description": "4.5 is divisible by 1.5",
- "data": 4.5,
- "valid": true
- },
- {
- "description": "35 is not divisible by 1.5",
- "data": 35,
- "valid": false
- }
- ]
- },
- {
- "description": "by small number",
- "schema": {"divisibleBy": 0.0001},
- "tests": [
- {
- "description": "0.0075 is divisible by 0.0001",
- "data": 0.0075,
- "valid": true
- },
- {
- "description": "0.00751 is not divisible by 0.0001",
- "data": 0.00751,
- "valid": false
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/enum.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft3/enum.json
deleted file mode 100644
index 0c83f0804d0..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/enum.json
+++ /dev/null
@@ -1,71 +0,0 @@
-[
- {
- "description": "simple enum validation",
- "schema": {"enum": [1, 2, 3]},
- "tests": [
- {
- "description": "one of the enum is valid",
- "data": 1,
- "valid": true
- },
- {
- "description": "something else is invalid",
- "data": 4,
- "valid": false
- }
- ]
- },
- {
- "description": "heterogeneous enum validation",
- "schema": {"enum": [6, "foo", [], true, {"foo": 12}]},
- "tests": [
- {
- "description": "one of the enum is valid",
- "data": [],
- "valid": true
- },
- {
- "description": "something else is invalid",
- "data": null,
- "valid": false
- },
- {
- "description": "objects are deep compared",
- "data": {"foo": false},
- "valid": false
- }
- ]
- },
- {
- "description": "enums in properties",
- "schema": {
- "type":"object",
- "properties": {
- "foo": {"enum":["foo"]},
- "bar": {"enum":["bar"], "required":true}
- }
- },
- "tests": [
- {
- "description": "both properties are valid",
- "data": {"foo":"foo", "bar":"bar"},
- "valid": true
- },
- {
- "description": "missing optional property is valid",
- "data": {"bar":"bar"},
- "valid": true
- },
- {
- "description": "missing required property is invalid",
- "data": {"foo":"foo"},
- "valid": false
- },
- {
- "description": "missing all properties is invalid",
- "data": {},
- "valid": false
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/extends.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft3/extends.json
deleted file mode 100644
index 909bce575ae..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/extends.json
+++ /dev/null
@@ -1,94 +0,0 @@
-[
- {
- "description": "extends",
- "schema": {
- "properties": {"bar": {"type": "integer", "required": true}},
- "extends": {
- "properties": {
- "foo": {"type": "string", "required": true}
- }
- }
- },
- "tests": [
- {
- "description": "extends",
- "data": {"foo": "baz", "bar": 2},
- "valid": true
- },
- {
- "description": "mismatch extends",
- "data": {"foo": "baz"},
- "valid": false
- },
- {
- "description": "mismatch extended",
- "data": {"bar": 2},
- "valid": false
- },
- {
- "description": "wrong type",
- "data": {"foo": "baz", "bar": "quux"},
- "valid": false
- }
- ]
- },
- {
- "description": "multiple extends",
- "schema": {
- "properties": {"bar": {"type": "integer", "required": true}},
- "extends" : [
- {
- "properties": {
- "foo": {"type": "string", "required": true}
- }
- },
- {
- "properties": {
- "baz": {"type": "null", "required": true}
- }
- }
- ]
- },
- "tests": [
- {
- "description": "valid",
- "data": {"foo": "quux", "bar": 2, "baz": null},
- "valid": true
- },
- {
- "description": "mismatch first extends",
- "data": {"bar": 2, "baz": null},
- "valid": false
- },
- {
- "description": "mismatch second extends",
- "data": {"foo": "quux", "bar": 2},
- "valid": false
- },
- {
- "description": "mismatch both",
- "data": {"bar": 2},
- "valid": false
- }
- ]
- },
- {
- "description": "extends simple types",
- "schema": {
- "minimum": 20,
- "extends": {"maximum": 30}
- },
- "tests": [
- {
- "description": "valid",
- "data": 25,
- "valid": true
- },
- {
- "description": "mismatch extends",
- "data": 35,
- "valid": false
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/items.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft3/items.json
deleted file mode 100644
index f5e18a13848..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/items.json
+++ /dev/null
@@ -1,46 +0,0 @@
-[
- {
- "description": "a schema given for items",
- "schema": {
- "items": {"type": "integer"}
- },
- "tests": [
- {
- "description": "valid items",
- "data": [ 1, 2, 3 ],
- "valid": true
- },
- {
- "description": "wrong type of items",
- "data": [1, "x"],
- "valid": false
- },
- {
- "description": "ignores non-arrays",
- "data": {"foo" : "bar"},
- "valid": true
- }
- ]
- },
- {
- "description": "an array of schemas for items",
- "schema": {
- "items": [
- {"type": "integer"},
- {"type": "string"}
- ]
- },
- "tests": [
- {
- "description": "correct types",
- "data": [ 1, "foo" ],
- "valid": true
- },
- {
- "description": "wrong types",
- "data": [ "foo", 1 ],
- "valid": false
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/maxItems.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft3/maxItems.json
deleted file mode 100644
index 3b53a6b371a..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/maxItems.json
+++ /dev/null
@@ -1,28 +0,0 @@
-[
- {
- "description": "maxItems validation",
- "schema": {"maxItems": 2},
- "tests": [
- {
- "description": "shorter is valid",
- "data": [1],
- "valid": true
- },
- {
- "description": "exact length is valid",
- "data": [1, 2],
- "valid": true
- },
- {
- "description": "too long is invalid",
- "data": [1, 2, 3],
- "valid": false
- },
- {
- "description": "ignores non-arrays",
- "data": "foobar",
- "valid": true
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/maxLength.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft3/maxLength.json
deleted file mode 100644
index 4de42bcaba0..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/maxLength.json
+++ /dev/null
@@ -1,33 +0,0 @@
-[
- {
- "description": "maxLength validation",
- "schema": {"maxLength": 2},
- "tests": [
- {
- "description": "shorter is valid",
- "data": "f",
- "valid": true
- },
- {
- "description": "exact length is valid",
- "data": "fo",
- "valid": true
- },
- {
- "description": "too long is invalid",
- "data": "foo",
- "valid": false
- },
- {
- "description": "ignores non-strings",
- "data": 10,
- "valid": true
- },
- {
- "description": "two supplementary Unicode code points is long enough",
- "data": "\uD83D\uDCA9\uD83D\uDCA9",
- "valid": true
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/maximum.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft3/maximum.json
deleted file mode 100644
index 86c7b89c9a9..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/maximum.json
+++ /dev/null
@@ -1,42 +0,0 @@
-[
- {
- "description": "maximum validation",
- "schema": {"maximum": 3.0},
- "tests": [
- {
- "description": "below the maximum is valid",
- "data": 2.6,
- "valid": true
- },
- {
- "description": "above the maximum is invalid",
- "data": 3.5,
- "valid": false
- },
- {
- "description": "ignores non-numbers",
- "data": "x",
- "valid": true
- }
- ]
- },
- {
- "description": "exclusiveMaximum validation",
- "schema": {
- "maximum": 3.0,
- "exclusiveMaximum": true
- },
- "tests": [
- {
- "description": "below the maximum is still valid",
- "data": 2.2,
- "valid": true
- },
- {
- "description": "boundary point is invalid",
- "data": 3.0,
- "valid": false
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/minItems.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft3/minItems.json
deleted file mode 100644
index ed5118815ee..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/minItems.json
+++ /dev/null
@@ -1,28 +0,0 @@
-[
- {
- "description": "minItems validation",
- "schema": {"minItems": 1},
- "tests": [
- {
- "description": "longer is valid",
- "data": [1, 2],
- "valid": true
- },
- {
- "description": "exact length is valid",
- "data": [1],
- "valid": true
- },
- {
- "description": "too short is invalid",
- "data": [],
- "valid": false
- },
- {
- "description": "ignores non-arrays",
- "data": "",
- "valid": true
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/minLength.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft3/minLength.json
deleted file mode 100644
index 3f09158deef..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/minLength.json
+++ /dev/null
@@ -1,33 +0,0 @@
-[
- {
- "description": "minLength validation",
- "schema": {"minLength": 2},
- "tests": [
- {
- "description": "longer is valid",
- "data": "foo",
- "valid": true
- },
- {
- "description": "exact length is valid",
- "data": "fo",
- "valid": true
- },
- {
- "description": "too short is invalid",
- "data": "f",
- "valid": false
- },
- {
- "description": "ignores non-strings",
- "data": 1,
- "valid": true
- },
- {
- "description": "one supplementary Unicode code point is not long enough",
- "data": "\uD83D\uDCA9",
- "valid": false
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/minimum.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft3/minimum.json
deleted file mode 100644
index d5bf000bcc6..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/minimum.json
+++ /dev/null
@@ -1,42 +0,0 @@
-[
- {
- "description": "minimum validation",
- "schema": {"minimum": 1.1},
- "tests": [
- {
- "description": "above the minimum is valid",
- "data": 2.6,
- "valid": true
- },
- {
- "description": "below the minimum is invalid",
- "data": 0.6,
- "valid": false
- },
- {
- "description": "ignores non-numbers",
- "data": "x",
- "valid": true
- }
- ]
- },
- {
- "description": "exclusiveMinimum validation",
- "schema": {
- "minimum": 1.1,
- "exclusiveMinimum": true
- },
- "tests": [
- {
- "description": "above the minimum is still valid",
- "data": 1.2,
- "valid": true
- },
- {
- "description": "boundary point is invalid",
- "data": 1.1,
- "valid": false
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/optional/bignum.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft3/optional/bignum.json
deleted file mode 100644
index ccc7c17fe8d..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/optional/bignum.json
+++ /dev/null
@@ -1,107 +0,0 @@
-[
- {
- "description": "integer",
- "schema": {"type": "integer"},
- "tests": [
- {
- "description": "a bignum is an integer",
- "data": 12345678910111213141516171819202122232425262728293031,
- "valid": true
- }
- ]
- },
- {
- "description": "number",
- "schema": {"type": "number"},
- "tests": [
- {
- "description": "a bignum is a number",
- "data": 98249283749234923498293171823948729348710298301928331,
- "valid": true
- }
- ]
- },
- {
- "description": "integer",
- "schema": {"type": "integer"},
- "tests": [
- {
- "description": "a negative bignum is an integer",
- "data": -12345678910111213141516171819202122232425262728293031,
- "valid": true
- }
- ]
- },
- {
- "description": "number",
- "schema": {"type": "number"},
- "tests": [
- {
- "description": "a negative bignum is a number",
- "data": -98249283749234923498293171823948729348710298301928331,
- "valid": true
- }
- ]
- },
- {
- "description": "string",
- "schema": {"type": "string"},
- "tests": [
- {
- "description": "a bignum is not a string",
- "data": 98249283749234923498293171823948729348710298301928331,
- "valid": false
- }
- ]
- },
- {
- "description": "integer comparison",
- "schema": {"maximum": 18446744073709551615},
- "tests": [
- {
- "description": "comparison works for high numbers",
- "data": 18446744073709551600,
- "valid": true
- }
- ]
- },
- {
- "description": "float comparison with high precision",
- "schema": {
- "maximum": 972783798187987123879878123.18878137,
- "exclusiveMaximum": true
- },
- "tests": [
- {
- "description": "comparison works for high numbers",
- "data": 972783798187987123879878123.188781371,
- "valid": false
- }
- ]
- },
- {
- "description": "integer comparison",
- "schema": {"minimum": -18446744073709551615},
- "tests": [
- {
- "description": "comparison works for very negative numbers",
- "data": -18446744073709551600,
- "valid": true
- }
- ]
- },
- {
- "description": "float comparison with high precision on negative numbers",
- "schema": {
- "minimum": -972783798187987123879878123.18878137,
- "exclusiveMinimum": true
- },
- "tests": [
- {
- "description": "comparison works for very negative numbers",
- "data": -972783798187987123879878123.188781371,
- "valid": false
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/optional/format.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft3/optional/format.json
deleted file mode 100644
index 3ca7319dda0..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/optional/format.json
+++ /dev/null
@@ -1,222 +0,0 @@
-[
- {
- "description": "validation of regular expressions",
- "schema": {"format": "regex"},
- "tests": [
- {
- "description": "a valid regular expression",
- "data": "([abc])+\\s+$",
- "valid": true
- },
- {
- "description": "a regular expression with unclosed parens is invalid",
- "data": "^(abc]",
- "valid": false
- }
- ]
- },
- {
- "description": "validation of date-time strings",
- "schema": {"format": "date-time"},
- "tests": [
- {
- "description": "a valid date-time string",
- "data": "1963-06-19T08:30:06.283185Z",
- "valid": true
- },
- {
- "description": "an invalid date-time string",
- "data": "06/19/1963 08:30:06 PST",
- "valid": false
- },
- {
- "description": "only RFC3339 not all of ISO 8601 are valid",
- "data": "2013-350T01:01:01",
- "valid": false
- }
- ]
- },
- {
- "description": "validation of date strings",
- "schema": {"format": "date"},
- "tests": [
- {
- "description": "a valid date string",
- "data": "1963-06-19",
- "valid": true
- },
- {
- "description": "an invalid date string",
- "data": "06/19/1963",
- "valid": false
- }
- ]
- },
- {
- "description": "validation of time strings",
- "schema": {"format": "time"},
- "tests": [
- {
- "description": "a valid time string",
- "data": "08:30:06",
- "valid": true
- },
- {
- "description": "an invalid time string",
- "data": "8:30 AM",
- "valid": false
- }
- ]
- },
- {
- "description": "validation of URIs",
- "schema": {"format": "uri"},
- "tests": [
- {
- "description": "a valid URI",
- "data": "http://foo.bar/?baz=qux#quux",
- "valid": true
- },
- {
- "description": "a valid protocol-relative URI",
- "data": "//foo.bar/?baz=qux#quux",
- "valid": true
- },
- {
- "description": "an invalid URI",
- "data": "\\\\WINDOWS\\fileshare",
- "valid": false
- },
- {
- "description": "an invalid URI though valid URI reference",
- "data": "abc",
- "valid": false
- }
- ]
- },
- {
- "description": "validation of e-mail addresses",
- "schema": {"format": "email"},
- "tests": [
- {
- "description": "a valid e-mail address",
- "data": "joe.bloggs@example.com",
- "valid": true
- },
- {
- "description": "an invalid e-mail address",
- "data": "2962",
- "valid": false
- }
- ]
- },
- {
- "description": "validation of IP addresses",
- "schema": {"format": "ip-address"},
- "tests": [
- {
- "description": "a valid IP address",
- "data": "192.168.0.1",
- "valid": true
- },
- {
- "description": "an IP address with too many components",
- "data": "127.0.0.0.1",
- "valid": false
- },
- {
- "description": "an IP address with out-of-range values",
- "data": "256.256.256.256",
- "valid": false
- }
- ]
- },
- {
- "description": "validation of IPv6 addresses",
- "schema": {"format": "ipv6"},
- "tests": [
- {
- "description": "a valid IPv6 address",
- "data": "::1",
- "valid": true
- },
- {
- "description": "an IPv6 address with out-of-range values",
- "data": "12345::",
- "valid": false
- },
- {
- "description": "an IPv6 address with too many components",
- "data": "1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1",
- "valid": false
- },
- {
- "description": "an IPv6 address containing illegal characters",
- "data": "::laptop",
- "valid": false
- }
- ]
- },
- {
- "description": "validation of host names",
- "schema": {"format": "host-name"},
- "tests": [
- {
- "description": "a valid host name",
- "data": "www.example.com",
- "valid": true
- },
- {
- "description": "a host name starting with an illegal character",
- "data": "-a-host-name-that-starts-with--",
- "valid": false
- },
- {
- "description": "a host name containing illegal characters",
- "data": "not_a_valid_host_name",
- "valid": false
- },
- {
- "description": "a host name with a component too long",
- "data": "a-vvvvvvvvvvvvvvvveeeeeeeeeeeeeeeerrrrrrrrrrrrrrrryyyyyyyyyyyyyyyy-long-host-name-component",
- "valid": false
- }
- ]
- },
- {
- "description": "validation of CSS colors",
- "schema": {"format": "color"},
- "tests": [
- {
- "description": "a valid CSS color name",
- "data": "fuchsia",
- "valid": true
- },
- {
- "description": "a valid six-digit CSS color code",
- "data": "#CC8899",
- "valid": true
- },
- {
- "description": "a valid three-digit CSS color code",
- "data": "#C89",
- "valid": true
- },
- {
- "description": "an invalid CSS color code",
- "data": "#00332520",
- "valid": false
- },
- {
- "description": "an invalid CSS color name",
- "data": "puce",
- "valid": false
- },
- {
- "description": "a CSS color name containing invalid characters",
- "data": "light_grayish_red-violet",
- "valid": false
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/optional/jsregex.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft3/optional/jsregex.json
deleted file mode 100644
index 03fe97724c0..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/optional/jsregex.json
+++ /dev/null
@@ -1,18 +0,0 @@
-[
- {
- "description": "ECMA 262 regex dialect recognition",
- "schema": { "format": "regex" },
- "tests": [
- {
- "description": "[^] is a valid regex",
- "data": "[^]",
- "valid": true
- },
- {
- "description": "ECMA 262 has no support for lookbehind",
- "data": "(?<=foo)bar",
- "valid": false
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/optional/zeroTerminatedFloats.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft3/optional/zeroTerminatedFloats.json
deleted file mode 100644
index 9b50ea27769..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/optional/zeroTerminatedFloats.json
+++ /dev/null
@@ -1,15 +0,0 @@
-[
- {
- "description": "some languages do not distinguish between different types of numeric value",
- "schema": {
- "type": "integer"
- },
- "tests": [
- {
- "description": "a float is not an integer even without fractional part",
- "data": 1.0,
- "valid": false
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/pattern.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft3/pattern.json
deleted file mode 100644
index 25e72997314..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/pattern.json
+++ /dev/null
@@ -1,34 +0,0 @@
-[
- {
- "description": "pattern validation",
- "schema": {"pattern": "^a*$"},
- "tests": [
- {
- "description": "a matching pattern is valid",
- "data": "aaa",
- "valid": true
- },
- {
- "description": "a non-matching pattern is invalid",
- "data": "abc",
- "valid": false
- },
- {
- "description": "ignores non-strings",
- "data": true,
- "valid": true
- }
- ]
- },
- {
- "description": "pattern is not anchored",
- "schema": {"pattern": "a+"},
- "tests": [
- {
- "description": "matches a substring",
- "data": "xxaayy",
- "valid": true
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/patternProperties.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft3/patternProperties.json
deleted file mode 100644
index 18586e5daba..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/patternProperties.json
+++ /dev/null
@@ -1,110 +0,0 @@
-[
- {
- "description":
- "patternProperties validates properties matching a regex",
- "schema": {
- "patternProperties": {
- "f.*o": {"type": "integer"}
- }
- },
- "tests": [
- {
- "description": "a single valid match is valid",
- "data": {"foo": 1},
- "valid": true
- },
- {
- "description": "multiple valid matches is valid",
- "data": {"foo": 1, "foooooo" : 2},
- "valid": true
- },
- {
- "description": "a single invalid match is invalid",
- "data": {"foo": "bar", "fooooo": 2},
- "valid": false
- },
- {
- "description": "multiple invalid matches is invalid",
- "data": {"foo": "bar", "foooooo" : "baz"},
- "valid": false
- },
- {
- "description": "ignores non-objects",
- "data": 12,
- "valid": true
- }
- ]
- },
- {
- "description": "multiple simultaneous patternProperties are validated",
- "schema": {
- "patternProperties": {
- "a*": {"type": "integer"},
- "aaa*": {"maximum": 20}
- }
- },
- "tests": [
- {
- "description": "a single valid match is valid",
- "data": {"a": 21},
- "valid": true
- },
- {
- "description": "a simultaneous match is valid",
- "data": {"aaaa": 18},
- "valid": true
- },
- {
- "description": "multiple matches is valid",
- "data": {"a": 21, "aaaa": 18},
- "valid": true
- },
- {
- "description": "an invalid due to one is invalid",
- "data": {"a": "bar"},
- "valid": false
- },
- {
- "description": "an invalid due to the other is invalid",
- "data": {"aaaa": 31},
- "valid": false
- },
- {
- "description": "an invalid due to both is invalid",
- "data": {"aaa": "foo", "aaaa": 31},
- "valid": false
- }
- ]
- },
- {
- "description": "regexes are not anchored by default and are case sensitive",
- "schema": {
- "patternProperties": {
- "[0-9]{2,}": { "type": "boolean" },
- "X_": { "type": "string" }
- }
- },
- "tests": [
- {
- "description": "non recognized members are ignored",
- "data": { "answer 1": "42" },
- "valid": true
- },
- {
- "description": "recognized members are accounted for",
- "data": { "a31b": null },
- "valid": false
- },
- {
- "description": "regexes are case sensitive",
- "data": { "a_x_3": 3 },
- "valid": true
- },
- {
- "description": "regexes are case sensitive, 2",
- "data": { "a_X_3": 3 },
- "valid": false
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/properties.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft3/properties.json
deleted file mode 100644
index cd1644dcd91..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/properties.json
+++ /dev/null
@@ -1,92 +0,0 @@
-[
- {
- "description": "object properties validation",
- "schema": {
- "properties": {
- "foo": {"type": "integer"},
- "bar": {"type": "string"}
- }
- },
- "tests": [
- {
- "description": "both properties present and valid is valid",
- "data": {"foo": 1, "bar": "baz"},
- "valid": true
- },
- {
- "description": "one property invalid is invalid",
- "data": {"foo": 1, "bar": {}},
- "valid": false
- },
- {
- "description": "both properties invalid is invalid",
- "data": {"foo": [], "bar": {}},
- "valid": false
- },
- {
- "description": "doesn't invalidate other properties",
- "data": {"quux": []},
- "valid": true
- },
- {
- "description": "ignores non-objects",
- "data": [],
- "valid": true
- }
- ]
- },
- {
- "description":
- "properties, patternProperties, additionalProperties interaction",
- "schema": {
- "properties": {
- "foo": {"type": "array", "maxItems": 3},
- "bar": {"type": "array"}
- },
- "patternProperties": {"f.o": {"minItems": 2}},
- "additionalProperties": {"type": "integer"}
- },
- "tests": [
- {
- "description": "property validates property",
- "data": {"foo": [1, 2]},
- "valid": true
- },
- {
- "description": "property invalidates property",
- "data": {"foo": [1, 2, 3, 4]},
- "valid": false
- },
- {
- "description": "patternProperty invalidates property",
- "data": {"foo": []},
- "valid": false
- },
- {
- "description": "patternProperty validates nonproperty",
- "data": {"fxo": [1, 2]},
- "valid": true
- },
- {
- "description": "patternProperty invalidates nonproperty",
- "data": {"fxo": []},
- "valid": false
- },
- {
- "description": "additionalProperty ignores property",
- "data": {"bar": []},
- "valid": true
- },
- {
- "description": "additionalProperty validates others",
- "data": {"quux": 3},
- "valid": true
- },
- {
- "description": "additionalProperty invalidates others",
- "data": {"quux": "foo"},
- "valid": false
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/ref.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft3/ref.json
deleted file mode 100644
index 903ecb6bce1..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/ref.json
+++ /dev/null
@@ -1,159 +0,0 @@
-[
- {
- "description": "root pointer ref",
- "schema": {
- "properties": {
- "foo": {"$ref": "#"}
- },
- "additionalProperties": false
- },
- "tests": [
- {
- "description": "match",
- "data": {"foo": false},
- "valid": true
- },
- {
- "description": "recursive match",
- "data": {"foo": {"foo": false}},
- "valid": true
- },
- {
- "description": "mismatch",
- "data": {"bar": false},
- "valid": false
- },
- {
- "description": "recursive mismatch",
- "data": {"foo": {"bar": false}},
- "valid": false
- }
- ]
- },
- {
- "description": "relative pointer ref to object",
- "schema": {
- "properties": {
- "foo": {"type": "integer"},
- "bar": {"$ref": "#/properties/foo"}
- }
- },
- "tests": [
- {
- "description": "match",
- "data": {"bar": 3},
- "valid": true
- },
- {
- "description": "mismatch",
- "data": {"bar": true},
- "valid": false
- }
- ]
- },
- {
- "description": "relative pointer ref to array",
- "schema": {
- "items": [
- {"type": "integer"},
- {"$ref": "#/items/0"}
- ]
- },
- "tests": [
- {
- "description": "match array",
- "data": [1, 2],
- "valid": true
- },
- {
- "description": "mismatch array",
- "data": [1, "foo"],
- "valid": false
- }
- ]
- },
- {
- "description": "escaped pointer ref",
- "schema": {
- "tilda~field": {"type": "integer"},
- "slash/field": {"type": "integer"},
- "percent%field": {"type": "integer"},
- "properties": {
- "tilda": {"$ref": "#/tilda~0field"},
- "slash": {"$ref": "#/slash~1field"},
- "percent": {"$ref": "#/percent%25field"}
- }
- },
- "tests": [
- {
- "description": "slash invalid",
- "data": {"slash": "aoeu"},
- "valid": false
- },
- {
- "description": "tilda invalid",
- "data": {"tilda": "aoeu"},
- "valid": false
- },
- {
- "description": "percent invalid",
- "data": {"percent": "aoeu"},
- "valid": false
- },
- {
- "description": "slash valid",
- "data": {"slash": 123},
- "valid": true
- },
- {
- "description": "tilda valid",
- "data": {"tilda": 123},
- "valid": true
- },
- {
- "description": "percent valid",
- "data": {"percent": 123},
- "valid": true
- }
- ]
- },
- {
- "description": "nested refs",
- "schema": {
- "definitions": {
- "a": {"type": "integer"},
- "b": {"$ref": "#/definitions/a"},
- "c": {"$ref": "#/definitions/b"}
- },
- "$ref": "#/definitions/c"
- },
- "tests": [
- {
- "description": "nested ref valid",
- "data": 5,
- "valid": true
- },
- {
- "description": "nested ref invalid",
- "data": "a",
- "valid": false
- }
- ]
- },
- {
- "description": "remote ref, containing refs itself",
- "schema": {"$ref": "http://json-schema.org/draft-03/schema#"},
- "tests": [
- {
- "description": "remote ref valid",
- "data": {"items": {"type": "integer"}},
- "valid": true
- },
- {
- "description": "remote ref invalid",
- "data": {"items": {"type": 1}},
- "valid": false
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/refRemote.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft3/refRemote.json
deleted file mode 100644
index 4ca804732c9..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/refRemote.json
+++ /dev/null
@@ -1,74 +0,0 @@
-[
- {
- "description": "remote ref",
- "schema": {"$ref": "http://localhost:1234/integer.json"},
- "tests": [
- {
- "description": "remote ref valid",
- "data": 1,
- "valid": true
- },
- {
- "description": "remote ref invalid",
- "data": "a",
- "valid": false
- }
- ]
- },
- {
- "description": "fragment within remote ref",
- "schema": {"$ref": "http://localhost:1234/subSchemas.json#/integer"},
- "tests": [
- {
- "description": "remote fragment valid",
- "data": 1,
- "valid": true
- },
- {
- "description": "remote fragment invalid",
- "data": "a",
- "valid": false
- }
- ]
- },
- {
- "description": "ref within remote ref",
- "schema": {
- "$ref": "http://localhost:1234/subSchemas.json#/refToInteger"
- },
- "tests": [
- {
- "description": "ref within ref valid",
- "data": 1,
- "valid": true
- },
- {
- "description": "ref within ref invalid",
- "data": "a",
- "valid": false
- }
- ]
- },
- {
- "description": "change resolution scope",
- "schema": {
- "id": "http://localhost:1234/",
- "items": {
- "id": "folder/",
- "items": {"$ref": "folderInteger.json"}
- }
- },
- "tests": [
- {
- "description": "changed scope ref valid",
- "data": [[1]],
- "valid": true
- },
- {
- "description": "changed scope ref invalid",
- "data": [["a"]],
- "valid": false
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/required.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft3/required.json
deleted file mode 100644
index aaaf0242737..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/required.json
+++ /dev/null
@@ -1,53 +0,0 @@
-[
- {
- "description": "required validation",
- "schema": {
- "properties": {
- "foo": {"required" : true},
- "bar": {}
- }
- },
- "tests": [
- {
- "description": "present required property is valid",
- "data": {"foo": 1},
- "valid": true
- },
- {
- "description": "non-present required property is invalid",
- "data": {"bar": 1},
- "valid": false
- }
- ]
- },
- {
- "description": "required default validation",
- "schema": {
- "properties": {
- "foo": {}
- }
- },
- "tests": [
- {
- "description": "not required by default",
- "data": {},
- "valid": true
- }
- ]
- },
- {
- "description": "required explicitly false validation",
- "schema": {
- "properties": {
- "foo": {"required": false}
- }
- },
- "tests": [
- {
- "description": "not required if required is false",
- "data": {},
- "valid": true
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/type.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft3/type.json
deleted file mode 100644
index 337da1206da..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/type.json
+++ /dev/null
@@ -1,474 +0,0 @@
-[
- {
- "description": "integer type matches integers",
- "schema": {"type": "integer"},
- "tests": [
- {
- "description": "an integer is an integer",
- "data": 1,
- "valid": true
- },
- {
- "description": "a float is not an integer",
- "data": 1.1,
- "valid": false
- },
- {
- "description": "a string is not an integer",
- "data": "foo",
- "valid": false
- },
- {
- "description": "an object is not an integer",
- "data": {},
- "valid": false
- },
- {
- "description": "an array is not an integer",
- "data": [],
- "valid": false
- },
- {
- "description": "a boolean is not an integer",
- "data": true,
- "valid": false
- },
- {
- "description": "null is not an integer",
- "data": null,
- "valid": false
- }
- ]
- },
- {
- "description": "number type matches numbers",
- "schema": {"type": "number"},
- "tests": [
- {
- "description": "an integer is a number",
- "data": 1,
- "valid": true
- },
- {
- "description": "a float is a number",
- "data": 1.1,
- "valid": true
- },
- {
- "description": "a string is not a number",
- "data": "foo",
- "valid": false
- },
- {
- "description": "an object is not a number",
- "data": {},
- "valid": false
- },
- {
- "description": "an array is not a number",
- "data": [],
- "valid": false
- },
- {
- "description": "a boolean is not a number",
- "data": true,
- "valid": false
- },
- {
- "description": "null is not a number",
- "data": null,
- "valid": false
- }
- ]
- },
- {
- "description": "string type matches strings",
- "schema": {"type": "string"},
- "tests": [
- {
- "description": "1 is not a string",
- "data": 1,
- "valid": false
- },
- {
- "description": "a float is not a string",
- "data": 1.1,
- "valid": false
- },
- {
- "description": "a string is a string",
- "data": "foo",
- "valid": true
- },
- {
- "description": "an object is not a string",
- "data": {},
- "valid": false
- },
- {
- "description": "an array is not a string",
- "data": [],
- "valid": false
- },
- {
- "description": "a boolean is not a string",
- "data": true,
- "valid": false
- },
- {
- "description": "null is not a string",
- "data": null,
- "valid": false
- }
- ]
- },
- {
- "description": "object type matches objects",
- "schema": {"type": "object"},
- "tests": [
- {
- "description": "an integer is not an object",
- "data": 1,
- "valid": false
- },
- {
- "description": "a float is not an object",
- "data": 1.1,
- "valid": false
- },
- {
- "description": "a string is not an object",
- "data": "foo",
- "valid": false
- },
- {
- "description": "an object is an object",
- "data": {},
- "valid": true
- },
- {
- "description": "an array is not an object",
- "data": [],
- "valid": false
- },
- {
- "description": "a boolean is not an object",
- "data": true,
- "valid": false
- },
- {
- "description": "null is not an object",
- "data": null,
- "valid": false
- }
- ]
- },
- {
- "description": "array type matches arrays",
- "schema": {"type": "array"},
- "tests": [
- {
- "description": "an integer is not an array",
- "data": 1,
- "valid": false
- },
- {
- "description": "a float is not an array",
- "data": 1.1,
- "valid": false
- },
- {
- "description": "a string is not an array",
- "data": "foo",
- "valid": false
- },
- {
- "description": "an object is not an array",
- "data": {},
- "valid": false
- },
- {
- "description": "an array is an array",
- "data": [],
- "valid": true
- },
- {
- "description": "a boolean is not an array",
- "data": true,
- "valid": false
- },
- {
- "description": "null is not an array",
- "data": null,
- "valid": false
- }
- ]
- },
- {
- "description": "boolean type matches booleans",
- "schema": {"type": "boolean"},
- "tests": [
- {
- "description": "an integer is not a boolean",
- "data": 1,
- "valid": false
- },
- {
- "description": "a float is not a boolean",
- "data": 1.1,
- "valid": false
- },
- {
- "description": "a string is not a boolean",
- "data": "foo",
- "valid": false
- },
- {
- "description": "an object is not a boolean",
- "data": {},
- "valid": false
- },
- {
- "description": "an array is not a boolean",
- "data": [],
- "valid": false
- },
- {
- "description": "a boolean is a boolean",
- "data": true,
- "valid": true
- },
- {
- "description": "null is not a boolean",
- "data": null,
- "valid": false
- }
- ]
- },
- {
- "description": "null type matches only the null object",
- "schema": {"type": "null"},
- "tests": [
- {
- "description": "an integer is not null",
- "data": 1,
- "valid": false
- },
- {
- "description": "a float is not null",
- "data": 1.1,
- "valid": false
- },
- {
- "description": "a string is not null",
- "data": "foo",
- "valid": false
- },
- {
- "description": "an object is not null",
- "data": {},
- "valid": false
- },
- {
- "description": "an array is not null",
- "data": [],
- "valid": false
- },
- {
- "description": "a boolean is not null",
- "data": true,
- "valid": false
- },
- {
- "description": "null is null",
- "data": null,
- "valid": true
- }
- ]
- },
- {
- "description": "any type matches any type",
- "schema": {"type": "any"},
- "tests": [
- {
- "description": "any type includes integers",
- "data": 1,
- "valid": true
- },
- {
- "description": "any type includes float",
- "data": 1.1,
- "valid": true
- },
- {
- "description": "any type includes string",
- "data": "foo",
- "valid": true
- },
- {
- "description": "any type includes object",
- "data": {},
- "valid": true
- },
- {
- "description": "any type includes array",
- "data": [],
- "valid": true
- },
- {
- "description": "any type includes boolean",
- "data": true,
- "valid": true
- },
- {
- "description": "any type includes null",
- "data": null,
- "valid": true
- }
- ]
- },
- {
- "description": "multiple types can be specified in an array",
- "schema": {"type": ["integer", "string"]},
- "tests": [
- {
- "description": "an integer is valid",
- "data": 1,
- "valid": true
- },
- {
- "description": "a string is valid",
- "data": "foo",
- "valid": true
- },
- {
- "description": "a float is invalid",
- "data": 1.1,
- "valid": false
- },
- {
- "description": "an object is invalid",
- "data": {},
- "valid": false
- },
- {
- "description": "an array is invalid",
- "data": [],
- "valid": false
- },
- {
- "description": "a boolean is invalid",
- "data": true,
- "valid": false
- },
- {
- "description": "null is invalid",
- "data": null,
- "valid": false
- }
- ]
- },
- {
- "description": "types can include schemas",
- "schema": {
- "type": [
- "array",
- {"type": "object"}
- ]
- },
- "tests": [
- {
- "description": "an integer is invalid",
- "data": 1,
- "valid": false
- },
- {
- "description": "a string is invalid",
- "data": "foo",
- "valid": false
- },
- {
- "description": "a float is invalid",
- "data": 1.1,
- "valid": false
- },
- {
- "description": "an object is valid",
- "data": {},
- "valid": true
- },
- {
- "description": "an array is valid",
- "data": [],
- "valid": true
- },
- {
- "description": "a boolean is invalid",
- "data": true,
- "valid": false
- },
- {
- "description": "null is invalid",
- "data": null,
- "valid": false
- }
- ]
- },
- {
- "description":
- "when types includes a schema it should fully validate the schema",
- "schema": {
- "type": [
- "integer",
- {
- "properties": {
- "foo": {"type": "null"}
- }
- }
- ]
- },
- "tests": [
- {
- "description": "an integer is valid",
- "data": 1,
- "valid": true
- },
- {
- "description": "an object is valid only if it is fully valid",
- "data": {"foo": null},
- "valid": true
- },
- {
- "description": "an object is invalid otherwise",
- "data": {"foo": "bar"},
- "valid": false
- }
- ]
- },
- {
- "description": "types from separate schemas are merged",
- "schema": {
- "type": [
- {"type": ["string"]},
- {"type": ["array", "null"]}
- ]
- },
- "tests": [
- {
- "description": "an integer is invalid",
- "data": 1,
- "valid": false
- },
- {
- "description": "a string is valid",
- "data": "foo",
- "valid": true
- },
- {
- "description": "an array is valid",
- "data": [1, 2, 3],
- "valid": true
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/uniqueItems.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft3/uniqueItems.json
deleted file mode 100644
index c1f4ab99c9a..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/uniqueItems.json
+++ /dev/null
@@ -1,79 +0,0 @@
-[
- {
- "description": "uniqueItems validation",
- "schema": {"uniqueItems": true},
- "tests": [
- {
- "description": "unique array of integers is valid",
- "data": [1, 2],
- "valid": true
- },
- {
- "description": "non-unique array of integers is invalid",
- "data": [1, 1],
- "valid": false
- },
- {
- "description": "numbers are unique if mathematically unequal",
- "data": [1.0, 1.00, 1],
- "valid": false
- },
- {
- "description": "unique array of objects is valid",
- "data": [{"foo": "bar"}, {"foo": "baz"}],
- "valid": true
- },
- {
- "description": "non-unique array of objects is invalid",
- "data": [{"foo": "bar"}, {"foo": "bar"}],
- "valid": false
- },
- {
- "description": "unique array of nested objects is valid",
- "data": [
- {"foo": {"bar" : {"baz" : true}}},
- {"foo": {"bar" : {"baz" : false}}}
- ],
- "valid": true
- },
- {
- "description": "non-unique array of nested objects is invalid",
- "data": [
- {"foo": {"bar" : {"baz" : true}}},
- {"foo": {"bar" : {"baz" : true}}}
- ],
- "valid": false
- },
- {
- "description": "unique array of arrays is valid",
- "data": [["foo"], ["bar"]],
- "valid": true
- },
- {
- "description": "non-unique array of arrays is invalid",
- "data": [["foo"], ["foo"]],
- "valid": false
- },
- {
- "description": "1 and true are unique",
- "data": [1, true],
- "valid": true
- },
- {
- "description": "0 and false are unique",
- "data": [0, false],
- "valid": true
- },
- {
- "description": "unique heterogeneous types are valid",
- "data": [{}, [1], true, null, 1],
- "valid": true
- },
- {
- "description": "non-unique heterogeneous types are invalid",
- "data": [{}, [1], true, null, {}, 1],
- "valid": false
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/.DS_Store b/3rdparty/rapidjson/bin/jsonschema/tests/draft4/.DS_Store
deleted file mode 100644
index ef142295ea0..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/.DS_Store
+++ /dev/null
Binary files differ
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/additionalItems.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft4/additionalItems.json
deleted file mode 100644
index 521745c8d6e..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/additionalItems.json
+++ /dev/null
@@ -1,82 +0,0 @@
-[
- {
- "description": "additionalItems as schema",
- "schema": {
- "items": [{}],
- "additionalItems": {"type": "integer"}
- },
- "tests": [
- {
- "description": "additional items match schema",
- "data": [ null, 2, 3, 4 ],
- "valid": true
- },
- {
- "description": "additional items do not match schema",
- "data": [ null, 2, 3, "foo" ],
- "valid": false
- }
- ]
- },
- {
- "description": "items is schema, no additionalItems",
- "schema": {
- "items": {},
- "additionalItems": false
- },
- "tests": [
- {
- "description": "all items match schema",
- "data": [ 1, 2, 3, 4, 5 ],
- "valid": true
- }
- ]
- },
- {
- "description": "array of items with no additionalItems",
- "schema": {
- "items": [{}, {}, {}],
- "additionalItems": false
- },
- "tests": [
- {
- "description": "no additional items present",
- "data": [ 1, 2, 3 ],
- "valid": true
- },
- {
- "description": "additional items are not permitted",
- "data": [ 1, 2, 3, 4 ],
- "valid": false
- }
- ]
- },
- {
- "description": "additionalItems as false without items",
- "schema": {"additionalItems": false},
- "tests": [
- {
- "description":
- "items defaults to empty schema so everything is valid",
- "data": [ 1, 2, 3, 4, 5 ],
- "valid": true
- },
- {
- "description": "ignores non-arrays",
- "data": {"foo" : "bar"},
- "valid": true
- }
- ]
- },
- {
- "description": "additionalItems are allowed by default",
- "schema": {"items": [{"type": "integer"}]},
- "tests": [
- {
- "description": "only the first item is validated",
- "data": [1, "foo", false],
- "valid": true
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/additionalProperties.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft4/additionalProperties.json
deleted file mode 100644
index 40831f9e9aa..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/additionalProperties.json
+++ /dev/null
@@ -1,88 +0,0 @@
-[
- {
- "description":
- "additionalProperties being false does not allow other properties",
- "schema": {
- "properties": {"foo": {}, "bar": {}},
- "patternProperties": { "^v": {} },
- "additionalProperties": false
- },
- "tests": [
- {
- "description": "no additional properties is valid",
- "data": {"foo": 1},
- "valid": true
- },
- {
- "description": "an additional property is invalid",
- "data": {"foo" : 1, "bar" : 2, "quux" : "boom"},
- "valid": false
- },
- {
- "description": "ignores non-objects",
- "data": [1, 2, 3],
- "valid": true
- },
- {
- "description": "patternProperties are not additional properties",
- "data": {"foo":1, "vroom": 2},
- "valid": true
- }
- ]
- },
- {
- "description":
- "additionalProperties allows a schema which should validate",
- "schema": {
- "properties": {"foo": {}, "bar": {}},
- "additionalProperties": {"type": "boolean"}
- },
- "tests": [
- {
- "description": "no additional properties is valid",
- "data": {"foo": 1},
- "valid": true
- },
- {
- "description": "an additional valid property is valid",
- "data": {"foo" : 1, "bar" : 2, "quux" : true},
- "valid": true
- },
- {
- "description": "an additional invalid property is invalid",
- "data": {"foo" : 1, "bar" : 2, "quux" : 12},
- "valid": false
- }
- ]
- },
- {
- "description":
- "additionalProperties can exist by itself",
- "schema": {
- "additionalProperties": {"type": "boolean"}
- },
- "tests": [
- {
- "description": "an additional valid property is valid",
- "data": {"foo" : true},
- "valid": true
- },
- {
- "description": "an additional invalid property is invalid",
- "data": {"foo" : 1},
- "valid": false
- }
- ]
- },
- {
- "description": "additionalProperties are allowed by default",
- "schema": {"properties": {"foo": {}, "bar": {}}},
- "tests": [
- {
- "description": "additional properties are allowed",
- "data": {"foo": 1, "bar": 2, "quux": true},
- "valid": true
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/allOf.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft4/allOf.json
deleted file mode 100644
index bbb5f89e4bc..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/allOf.json
+++ /dev/null
@@ -1,112 +0,0 @@
-[
- {
- "description": "allOf",
- "schema": {
- "allOf": [
- {
- "properties": {
- "bar": {"type": "integer"}
- },
- "required": ["bar"]
- },
- {
- "properties": {
- "foo": {"type": "string"}
- },
- "required": ["foo"]
- }
- ]
- },
- "tests": [
- {
- "description": "allOf",
- "data": {"foo": "baz", "bar": 2},
- "valid": true
- },
- {
- "description": "mismatch second",
- "data": {"foo": "baz"},
- "valid": false
- },
- {
- "description": "mismatch first",
- "data": {"bar": 2},
- "valid": false
- },
- {
- "description": "wrong type",
- "data": {"foo": "baz", "bar": "quux"},
- "valid": false
- }
- ]
- },
- {
- "description": "allOf with base schema",
- "schema": {
- "properties": {"bar": {"type": "integer"}},
- "required": ["bar"],
- "allOf" : [
- {
- "properties": {
- "foo": {"type": "string"}
- },
- "required": ["foo"]
- },
- {
- "properties": {
- "baz": {"type": "null"}
- },
- "required": ["baz"]
- }
- ]
- },
- "tests": [
- {
- "description": "valid",
- "data": {"foo": "quux", "bar": 2, "baz": null},
- "valid": true
- },
- {
- "description": "mismatch base schema",
- "data": {"foo": "quux", "baz": null},
- "valid": false
- },
- {
- "description": "mismatch first allOf",
- "data": {"bar": 2, "baz": null},
- "valid": false
- },
- {
- "description": "mismatch second allOf",
- "data": {"foo": "quux", "bar": 2},
- "valid": false
- },
- {
- "description": "mismatch both",
- "data": {"bar": 2},
- "valid": false
- }
- ]
- },
- {
- "description": "allOf simple types",
- "schema": {
- "allOf": [
- {"maximum": 30},
- {"minimum": 20}
- ]
- },
- "tests": [
- {
- "description": "valid",
- "data": 25,
- "valid": true
- },
- {
- "description": "mismatch one",
- "data": 35,
- "valid": false
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/anyOf.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft4/anyOf.json
deleted file mode 100644
index a58714afd89..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/anyOf.json
+++ /dev/null
@@ -1,68 +0,0 @@
-[
- {
- "description": "anyOf",
- "schema": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "minimum": 2
- }
- ]
- },
- "tests": [
- {
- "description": "first anyOf valid",
- "data": 1,
- "valid": true
- },
- {
- "description": "second anyOf valid",
- "data": 2.5,
- "valid": true
- },
- {
- "description": "both anyOf valid",
- "data": 3,
- "valid": true
- },
- {
- "description": "neither anyOf valid",
- "data": 1.5,
- "valid": false
- }
- ]
- },
- {
- "description": "anyOf with base schema",
- "schema": {
- "type": "string",
- "anyOf" : [
- {
- "maxLength": 2
- },
- {
- "minLength": 4
- }
- ]
- },
- "tests": [
- {
- "description": "mismatch base schema",
- "data": 3,
- "valid": false
- },
- {
- "description": "one anyOf valid",
- "data": "foobar",
- "valid": true
- },
- {
- "description": "both anyOf invalid",
- "data": "foo",
- "valid": false
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/default.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft4/default.json
deleted file mode 100644
index 17629779fbe..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/default.json
+++ /dev/null
@@ -1,49 +0,0 @@
-[
- {
- "description": "invalid type for default",
- "schema": {
- "properties": {
- "foo": {
- "type": "integer",
- "default": []
- }
- }
- },
- "tests": [
- {
- "description": "valid when property is specified",
- "data": {"foo": 13},
- "valid": true
- },
- {
- "description": "still valid when the invalid default is used",
- "data": {},
- "valid": true
- }
- ]
- },
- {
- "description": "invalid string value for default",
- "schema": {
- "properties": {
- "bar": {
- "type": "string",
- "minLength": 4,
- "default": "bad"
- }
- }
- },
- "tests": [
- {
- "description": "valid when property is specified",
- "data": {"bar": "good"},
- "valid": true
- },
- {
- "description": "still valid when the invalid default is used",
- "data": {},
- "valid": true
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/definitions.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft4/definitions.json
deleted file mode 100644
index cf935a32153..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/definitions.json
+++ /dev/null
@@ -1,32 +0,0 @@
-[
- {
- "description": "valid definition",
- "schema": {"$ref": "http://json-schema.org/draft-04/schema#"},
- "tests": [
- {
- "description": "valid definition schema",
- "data": {
- "definitions": {
- "foo": {"type": "integer"}
- }
- },
- "valid": true
- }
- ]
- },
- {
- "description": "invalid definition",
- "schema": {"$ref": "http://json-schema.org/draft-04/schema#"},
- "tests": [
- {
- "description": "invalid definition schema",
- "data": {
- "definitions": {
- "foo": {"type": 1}
- }
- },
- "valid": false
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/dependencies.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft4/dependencies.json
deleted file mode 100644
index 7b9b16a7e12..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/dependencies.json
+++ /dev/null
@@ -1,113 +0,0 @@
-[
- {
- "description": "dependencies",
- "schema": {
- "dependencies": {"bar": ["foo"]}
- },
- "tests": [
- {
- "description": "neither",
- "data": {},
- "valid": true
- },
- {
- "description": "nondependant",
- "data": {"foo": 1},
- "valid": true
- },
- {
- "description": "with dependency",
- "data": {"foo": 1, "bar": 2},
- "valid": true
- },
- {
- "description": "missing dependency",
- "data": {"bar": 2},
- "valid": false
- },
- {
- "description": "ignores non-objects",
- "data": "foo",
- "valid": true
- }
- ]
- },
- {
- "description": "multiple dependencies",
- "schema": {
- "dependencies": {"quux": ["foo", "bar"]}
- },
- "tests": [
- {
- "description": "neither",
- "data": {},
- "valid": true
- },
- {
- "description": "nondependants",
- "data": {"foo": 1, "bar": 2},
- "valid": true
- },
- {
- "description": "with dependencies",
- "data": {"foo": 1, "bar": 2, "quux": 3},
- "valid": true
- },
- {
- "description": "missing dependency",
- "data": {"foo": 1, "quux": 2},
- "valid": false
- },
- {
- "description": "missing other dependency",
- "data": {"bar": 1, "quux": 2},
- "valid": false
- },
- {
- "description": "missing both dependencies",
- "data": {"quux": 1},
- "valid": false
- }
- ]
- },
- {
- "description": "multiple dependencies subschema",
- "schema": {
- "dependencies": {
- "bar": {
- "properties": {
- "foo": {"type": "integer"},
- "bar": {"type": "integer"}
- }
- }
- }
- },
- "tests": [
- {
- "description": "valid",
- "data": {"foo": 1, "bar": 2},
- "valid": true
- },
- {
- "description": "no dependency",
- "data": {"foo": "quux"},
- "valid": true
- },
- {
- "description": "wrong type",
- "data": {"foo": "quux", "bar": 2},
- "valid": false
- },
- {
- "description": "wrong type other",
- "data": {"foo": 2, "bar": "quux"},
- "valid": false
- },
- {
- "description": "wrong type both",
- "data": {"foo": "quux", "bar": "quux"},
- "valid": false
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/enum.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft4/enum.json
deleted file mode 100644
index f124436a7d9..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/enum.json
+++ /dev/null
@@ -1,72 +0,0 @@
-[
- {
- "description": "simple enum validation",
- "schema": {"enum": [1, 2, 3]},
- "tests": [
- {
- "description": "one of the enum is valid",
- "data": 1,
- "valid": true
- },
- {
- "description": "something else is invalid",
- "data": 4,
- "valid": false
- }
- ]
- },
- {
- "description": "heterogeneous enum validation",
- "schema": {"enum": [6, "foo", [], true, {"foo": 12}]},
- "tests": [
- {
- "description": "one of the enum is valid",
- "data": [],
- "valid": true
- },
- {
- "description": "something else is invalid",
- "data": null,
- "valid": false
- },
- {
- "description": "objects are deep compared",
- "data": {"foo": false},
- "valid": false
- }
- ]
- },
- {
- "description": "enums in properties",
- "schema": {
- "type":"object",
- "properties": {
- "foo": {"enum":["foo"]},
- "bar": {"enum":["bar"]}
- },
- "required": ["bar"]
- },
- "tests": [
- {
- "description": "both properties are valid",
- "data": {"foo":"foo", "bar":"bar"},
- "valid": true
- },
- {
- "description": "missing optional property is valid",
- "data": {"bar":"bar"},
- "valid": true
- },
- {
- "description": "missing required property is invalid",
- "data": {"foo":"foo"},
- "valid": false
- },
- {
- "description": "missing all properties is invalid",
- "data": {},
- "valid": false
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/items.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft4/items.json
deleted file mode 100644
index f5e18a13848..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/items.json
+++ /dev/null
@@ -1,46 +0,0 @@
-[
- {
- "description": "a schema given for items",
- "schema": {
- "items": {"type": "integer"}
- },
- "tests": [
- {
- "description": "valid items",
- "data": [ 1, 2, 3 ],
- "valid": true
- },
- {
- "description": "wrong type of items",
- "data": [1, "x"],
- "valid": false
- },
- {
- "description": "ignores non-arrays",
- "data": {"foo" : "bar"},
- "valid": true
- }
- ]
- },
- {
- "description": "an array of schemas for items",
- "schema": {
- "items": [
- {"type": "integer"},
- {"type": "string"}
- ]
- },
- "tests": [
- {
- "description": "correct types",
- "data": [ 1, "foo" ],
- "valid": true
- },
- {
- "description": "wrong types",
- "data": [ "foo", 1 ],
- "valid": false
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/maxItems.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft4/maxItems.json
deleted file mode 100644
index 3b53a6b371a..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/maxItems.json
+++ /dev/null
@@ -1,28 +0,0 @@
-[
- {
- "description": "maxItems validation",
- "schema": {"maxItems": 2},
- "tests": [
- {
- "description": "shorter is valid",
- "data": [1],
- "valid": true
- },
- {
- "description": "exact length is valid",
- "data": [1, 2],
- "valid": true
- },
- {
- "description": "too long is invalid",
- "data": [1, 2, 3],
- "valid": false
- },
- {
- "description": "ignores non-arrays",
- "data": "foobar",
- "valid": true
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/maxLength.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft4/maxLength.json
deleted file mode 100644
index 811d35b253c..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/maxLength.json
+++ /dev/null
@@ -1,33 +0,0 @@
-[
- {
- "description": "maxLength validation",
- "schema": {"maxLength": 2},
- "tests": [
- {
- "description": "shorter is valid",
- "data": "f",
- "valid": true
- },
- {
- "description": "exact length is valid",
- "data": "fo",
- "valid": true
- },
- {
- "description": "too long is invalid",
- "data": "foo",
- "valid": false
- },
- {
- "description": "ignores non-strings",
- "data": 100,
- "valid": true
- },
- {
- "description": "two supplementary Unicode code points is long enough",
- "data": "\uD83D\uDCA9\uD83D\uDCA9",
- "valid": true
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/maxProperties.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft4/maxProperties.json
deleted file mode 100644
index d282446ad69..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/maxProperties.json
+++ /dev/null
@@ -1,28 +0,0 @@
-[
- {
- "description": "maxProperties validation",
- "schema": {"maxProperties": 2},
- "tests": [
- {
- "description": "shorter is valid",
- "data": {"foo": 1},
- "valid": true
- },
- {
- "description": "exact length is valid",
- "data": {"foo": 1, "bar": 2},
- "valid": true
- },
- {
- "description": "too long is invalid",
- "data": {"foo": 1, "bar": 2, "baz": 3},
- "valid": false
- },
- {
- "description": "ignores non-objects",
- "data": "foobar",
- "valid": true
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/maximum.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft4/maximum.json
deleted file mode 100644
index 86c7b89c9a9..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/maximum.json
+++ /dev/null
@@ -1,42 +0,0 @@
-[
- {
- "description": "maximum validation",
- "schema": {"maximum": 3.0},
- "tests": [
- {
- "description": "below the maximum is valid",
- "data": 2.6,
- "valid": true
- },
- {
- "description": "above the maximum is invalid",
- "data": 3.5,
- "valid": false
- },
- {
- "description": "ignores non-numbers",
- "data": "x",
- "valid": true
- }
- ]
- },
- {
- "description": "exclusiveMaximum validation",
- "schema": {
- "maximum": 3.0,
- "exclusiveMaximum": true
- },
- "tests": [
- {
- "description": "below the maximum is still valid",
- "data": 2.2,
- "valid": true
- },
- {
- "description": "boundary point is invalid",
- "data": 3.0,
- "valid": false
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/minItems.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft4/minItems.json
deleted file mode 100644
index ed5118815ee..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/minItems.json
+++ /dev/null
@@ -1,28 +0,0 @@
-[
- {
- "description": "minItems validation",
- "schema": {"minItems": 1},
- "tests": [
- {
- "description": "longer is valid",
- "data": [1, 2],
- "valid": true
- },
- {
- "description": "exact length is valid",
- "data": [1],
- "valid": true
- },
- {
- "description": "too short is invalid",
- "data": [],
- "valid": false
- },
- {
- "description": "ignores non-arrays",
- "data": "",
- "valid": true
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/minLength.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft4/minLength.json
deleted file mode 100644
index 3f09158deef..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/minLength.json
+++ /dev/null
@@ -1,33 +0,0 @@
-[
- {
- "description": "minLength validation",
- "schema": {"minLength": 2},
- "tests": [
- {
- "description": "longer is valid",
- "data": "foo",
- "valid": true
- },
- {
- "description": "exact length is valid",
- "data": "fo",
- "valid": true
- },
- {
- "description": "too short is invalid",
- "data": "f",
- "valid": false
- },
- {
- "description": "ignores non-strings",
- "data": 1,
- "valid": true
- },
- {
- "description": "one supplementary Unicode code point is not long enough",
- "data": "\uD83D\uDCA9",
- "valid": false
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/minProperties.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft4/minProperties.json
deleted file mode 100644
index a72c7d293e6..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/minProperties.json
+++ /dev/null
@@ -1,28 +0,0 @@
-[
- {
- "description": "minProperties validation",
- "schema": {"minProperties": 1},
- "tests": [
- {
- "description": "longer is valid",
- "data": {"foo": 1, "bar": 2},
- "valid": true
- },
- {
- "description": "exact length is valid",
- "data": {"foo": 1},
- "valid": true
- },
- {
- "description": "too short is invalid",
- "data": {},
- "valid": false
- },
- {
- "description": "ignores non-objects",
- "data": "",
- "valid": true
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/minimum.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft4/minimum.json
deleted file mode 100644
index d5bf000bcc6..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/minimum.json
+++ /dev/null
@@ -1,42 +0,0 @@
-[
- {
- "description": "minimum validation",
- "schema": {"minimum": 1.1},
- "tests": [
- {
- "description": "above the minimum is valid",
- "data": 2.6,
- "valid": true
- },
- {
- "description": "below the minimum is invalid",
- "data": 0.6,
- "valid": false
- },
- {
- "description": "ignores non-numbers",
- "data": "x",
- "valid": true
- }
- ]
- },
- {
- "description": "exclusiveMinimum validation",
- "schema": {
- "minimum": 1.1,
- "exclusiveMinimum": true
- },
- "tests": [
- {
- "description": "above the minimum is still valid",
- "data": 1.2,
- "valid": true
- },
- {
- "description": "boundary point is invalid",
- "data": 1.1,
- "valid": false
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/multipleOf.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft4/multipleOf.json
deleted file mode 100644
index ca3b7618053..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/multipleOf.json
+++ /dev/null
@@ -1,60 +0,0 @@
-[
- {
- "description": "by int",
- "schema": {"multipleOf": 2},
- "tests": [
- {
- "description": "int by int",
- "data": 10,
- "valid": true
- },
- {
- "description": "int by int fail",
- "data": 7,
- "valid": false
- },
- {
- "description": "ignores non-numbers",
- "data": "foo",
- "valid": true
- }
- ]
- },
- {
- "description": "by number",
- "schema": {"multipleOf": 1.5},
- "tests": [
- {
- "description": "zero is multiple of anything",
- "data": 0,
- "valid": true
- },
- {
- "description": "4.5 is multiple of 1.5",
- "data": 4.5,
- "valid": true
- },
- {
- "description": "35 is not multiple of 1.5",
- "data": 35,
- "valid": false
- }
- ]
- },
- {
- "description": "by small number",
- "schema": {"multipleOf": 0.0001},
- "tests": [
- {
- "description": "0.0075 is multiple of 0.0001",
- "data": 0.0075,
- "valid": true
- },
- {
- "description": "0.00751 is not multiple of 0.0001",
- "data": 0.00751,
- "valid": false
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/not.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft4/not.json
deleted file mode 100644
index cbb7f46bf8b..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/not.json
+++ /dev/null
@@ -1,96 +0,0 @@
-[
- {
- "description": "not",
- "schema": {
- "not": {"type": "integer"}
- },
- "tests": [
- {
- "description": "allowed",
- "data": "foo",
- "valid": true
- },
- {
- "description": "disallowed",
- "data": 1,
- "valid": false
- }
- ]
- },
- {
- "description": "not multiple types",
- "schema": {
- "not": {"type": ["integer", "boolean"]}
- },
- "tests": [
- {
- "description": "valid",
- "data": "foo",
- "valid": true
- },
- {
- "description": "mismatch",
- "data": 1,
- "valid": false
- },
- {
- "description": "other mismatch",
- "data": true,
- "valid": false
- }
- ]
- },
- {
- "description": "not more complex schema",
- "schema": {
- "not": {
- "type": "object",
- "properties": {
- "foo": {
- "type": "string"
- }
- }
- }
- },
- "tests": [
- {
- "description": "match",
- "data": 1,
- "valid": true
- },
- {
- "description": "other match",
- "data": {"foo": 1},
- "valid": true
- },
- {
- "description": "mismatch",
- "data": {"foo": "bar"},
- "valid": false
- }
- ]
- },
- {
- "description": "forbidden property",
- "schema": {
- "properties": {
- "foo": {
- "not": {}
- }
- }
- },
- "tests": [
- {
- "description": "property present",
- "data": {"foo": 1, "bar": 2},
- "valid": false
- },
- {
- "description": "property absent",
- "data": {"bar": 1, "baz": 2},
- "valid": true
- }
- ]
- }
-
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/oneOf.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft4/oneOf.json
deleted file mode 100644
index 1eaa4e47949..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/oneOf.json
+++ /dev/null
@@ -1,68 +0,0 @@
-[
- {
- "description": "oneOf",
- "schema": {
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "minimum": 2
- }
- ]
- },
- "tests": [
- {
- "description": "first oneOf valid",
- "data": 1,
- "valid": true
- },
- {
- "description": "second oneOf valid",
- "data": 2.5,
- "valid": true
- },
- {
- "description": "both oneOf valid",
- "data": 3,
- "valid": false
- },
- {
- "description": "neither oneOf valid",
- "data": 1.5,
- "valid": false
- }
- ]
- },
- {
- "description": "oneOf with base schema",
- "schema": {
- "type": "string",
- "oneOf" : [
- {
- "minLength": 2
- },
- {
- "maxLength": 4
- }
- ]
- },
- "tests": [
- {
- "description": "mismatch base schema",
- "data": 3,
- "valid": false
- },
- {
- "description": "one oneOf valid",
- "data": "foobar",
- "valid": true
- },
- {
- "description": "both oneOf valid",
- "data": "foo",
- "valid": false
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/optional/bignum.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft4/optional/bignum.json
deleted file mode 100644
index ccc7c17fe8d..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/optional/bignum.json
+++ /dev/null
@@ -1,107 +0,0 @@
-[
- {
- "description": "integer",
- "schema": {"type": "integer"},
- "tests": [
- {
- "description": "a bignum is an integer",
- "data": 12345678910111213141516171819202122232425262728293031,
- "valid": true
- }
- ]
- },
- {
- "description": "number",
- "schema": {"type": "number"},
- "tests": [
- {
- "description": "a bignum is a number",
- "data": 98249283749234923498293171823948729348710298301928331,
- "valid": true
- }
- ]
- },
- {
- "description": "integer",
- "schema": {"type": "integer"},
- "tests": [
- {
- "description": "a negative bignum is an integer",
- "data": -12345678910111213141516171819202122232425262728293031,
- "valid": true
- }
- ]
- },
- {
- "description": "number",
- "schema": {"type": "number"},
- "tests": [
- {
- "description": "a negative bignum is a number",
- "data": -98249283749234923498293171823948729348710298301928331,
- "valid": true
- }
- ]
- },
- {
- "description": "string",
- "schema": {"type": "string"},
- "tests": [
- {
- "description": "a bignum is not a string",
- "data": 98249283749234923498293171823948729348710298301928331,
- "valid": false
- }
- ]
- },
- {
- "description": "integer comparison",
- "schema": {"maximum": 18446744073709551615},
- "tests": [
- {
- "description": "comparison works for high numbers",
- "data": 18446744073709551600,
- "valid": true
- }
- ]
- },
- {
- "description": "float comparison with high precision",
- "schema": {
- "maximum": 972783798187987123879878123.18878137,
- "exclusiveMaximum": true
- },
- "tests": [
- {
- "description": "comparison works for high numbers",
- "data": 972783798187987123879878123.188781371,
- "valid": false
- }
- ]
- },
- {
- "description": "integer comparison",
- "schema": {"minimum": -18446744073709551615},
- "tests": [
- {
- "description": "comparison works for very negative numbers",
- "data": -18446744073709551600,
- "valid": true
- }
- ]
- },
- {
- "description": "float comparison with high precision on negative numbers",
- "schema": {
- "minimum": -972783798187987123879878123.18878137,
- "exclusiveMinimum": true
- },
- "tests": [
- {
- "description": "comparison works for very negative numbers",
- "data": -972783798187987123879878123.188781371,
- "valid": false
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/optional/format.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft4/optional/format.json
deleted file mode 100644
index aacfd119843..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/optional/format.json
+++ /dev/null
@@ -1,148 +0,0 @@
-[
- {
- "description": "validation of date-time strings",
- "schema": {"format": "date-time"},
- "tests": [
- {
- "description": "a valid date-time string",
- "data": "1963-06-19T08:30:06.283185Z",
- "valid": true
- },
- {
- "description": "an invalid date-time string",
- "data": "06/19/1963 08:30:06 PST",
- "valid": false
- },
- {
- "description": "only RFC3339 not all of ISO 8601 are valid",
- "data": "2013-350T01:01:01",
- "valid": false
- }
- ]
- },
- {
- "description": "validation of URIs",
- "schema": {"format": "uri"},
- "tests": [
- {
- "description": "a valid URI",
- "data": "http://foo.bar/?baz=qux#quux",
- "valid": true
- },
- {
- "description": "a valid protocol-relative URI",
- "data": "//foo.bar/?baz=qux#quux",
- "valid": true
- },
- {
- "description": "an invalid URI",
- "data": "\\\\WINDOWS\\fileshare",
- "valid": false
- },
- {
- "description": "an invalid URI though valid URI reference",
- "data": "abc",
- "valid": false
- }
- ]
- },
- {
- "description": "validation of e-mail addresses",
- "schema": {"format": "email"},
- "tests": [
- {
- "description": "a valid e-mail address",
- "data": "joe.bloggs@example.com",
- "valid": true
- },
- {
- "description": "an invalid e-mail address",
- "data": "2962",
- "valid": false
- }
- ]
- },
- {
- "description": "validation of IP addresses",
- "schema": {"format": "ipv4"},
- "tests": [
- {
- "description": "a valid IP address",
- "data": "192.168.0.1",
- "valid": true
- },
- {
- "description": "an IP address with too many components",
- "data": "127.0.0.0.1",
- "valid": false
- },
- {
- "description": "an IP address with out-of-range values",
- "data": "256.256.256.256",
- "valid": false
- },
- {
- "description": "an IP address without 4 components",
- "data": "127.0",
- "valid": false
- },
- {
- "description": "an IP address as an integer",
- "data": "0x7f000001",
- "valid": false
- }
- ]
- },
- {
- "description": "validation of IPv6 addresses",
- "schema": {"format": "ipv6"},
- "tests": [
- {
- "description": "a valid IPv6 address",
- "data": "::1",
- "valid": true
- },
- {
- "description": "an IPv6 address with out-of-range values",
- "data": "12345::",
- "valid": false
- },
- {
- "description": "an IPv6 address with too many components",
- "data": "1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1",
- "valid": false
- },
- {
- "description": "an IPv6 address containing illegal characters",
- "data": "::laptop",
- "valid": false
- }
- ]
- },
- {
- "description": "validation of host names",
- "schema": {"format": "hostname"},
- "tests": [
- {
- "description": "a valid host name",
- "data": "www.example.com",
- "valid": true
- },
- {
- "description": "a host name starting with an illegal character",
- "data": "-a-host-name-that-starts-with--",
- "valid": false
- },
- {
- "description": "a host name containing illegal characters",
- "data": "not_a_valid_host_name",
- "valid": false
- },
- {
- "description": "a host name with a component too long",
- "data": "a-vvvvvvvvvvvvvvvveeeeeeeeeeeeeeeerrrrrrrrrrrrrrrryyyyyyyyyyyyyyyy-long-host-name-component",
- "valid": false
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/optional/zeroTerminatedFloats.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft4/optional/zeroTerminatedFloats.json
deleted file mode 100644
index 9b50ea27769..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/optional/zeroTerminatedFloats.json
+++ /dev/null
@@ -1,15 +0,0 @@
-[
- {
- "description": "some languages do not distinguish between different types of numeric value",
- "schema": {
- "type": "integer"
- },
- "tests": [
- {
- "description": "a float is not an integer even without fractional part",
- "data": 1.0,
- "valid": false
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/pattern.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft4/pattern.json
deleted file mode 100644
index 25e72997314..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/pattern.json
+++ /dev/null
@@ -1,34 +0,0 @@
-[
- {
- "description": "pattern validation",
- "schema": {"pattern": "^a*$"},
- "tests": [
- {
- "description": "a matching pattern is valid",
- "data": "aaa",
- "valid": true
- },
- {
- "description": "a non-matching pattern is invalid",
- "data": "abc",
- "valid": false
- },
- {
- "description": "ignores non-strings",
- "data": true,
- "valid": true
- }
- ]
- },
- {
- "description": "pattern is not anchored",
- "schema": {"pattern": "a+"},
- "tests": [
- {
- "description": "matches a substring",
- "data": "xxaayy",
- "valid": true
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/patternProperties.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft4/patternProperties.json
deleted file mode 100644
index 18586e5daba..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/patternProperties.json
+++ /dev/null
@@ -1,110 +0,0 @@
-[
- {
- "description":
- "patternProperties validates properties matching a regex",
- "schema": {
- "patternProperties": {
- "f.*o": {"type": "integer"}
- }
- },
- "tests": [
- {
- "description": "a single valid match is valid",
- "data": {"foo": 1},
- "valid": true
- },
- {
- "description": "multiple valid matches is valid",
- "data": {"foo": 1, "foooooo" : 2},
- "valid": true
- },
- {
- "description": "a single invalid match is invalid",
- "data": {"foo": "bar", "fooooo": 2},
- "valid": false
- },
- {
- "description": "multiple invalid matches is invalid",
- "data": {"foo": "bar", "foooooo" : "baz"},
- "valid": false
- },
- {
- "description": "ignores non-objects",
- "data": 12,
- "valid": true
- }
- ]
- },
- {
- "description": "multiple simultaneous patternProperties are validated",
- "schema": {
- "patternProperties": {
- "a*": {"type": "integer"},
- "aaa*": {"maximum": 20}
- }
- },
- "tests": [
- {
- "description": "a single valid match is valid",
- "data": {"a": 21},
- "valid": true
- },
- {
- "description": "a simultaneous match is valid",
- "data": {"aaaa": 18},
- "valid": true
- },
- {
- "description": "multiple matches is valid",
- "data": {"a": 21, "aaaa": 18},
- "valid": true
- },
- {
- "description": "an invalid due to one is invalid",
- "data": {"a": "bar"},
- "valid": false
- },
- {
- "description": "an invalid due to the other is invalid",
- "data": {"aaaa": 31},
- "valid": false
- },
- {
- "description": "an invalid due to both is invalid",
- "data": {"aaa": "foo", "aaaa": 31},
- "valid": false
- }
- ]
- },
- {
- "description": "regexes are not anchored by default and are case sensitive",
- "schema": {
- "patternProperties": {
- "[0-9]{2,}": { "type": "boolean" },
- "X_": { "type": "string" }
- }
- },
- "tests": [
- {
- "description": "non recognized members are ignored",
- "data": { "answer 1": "42" },
- "valid": true
- },
- {
- "description": "recognized members are accounted for",
- "data": { "a31b": null },
- "valid": false
- },
- {
- "description": "regexes are case sensitive",
- "data": { "a_x_3": 3 },
- "valid": true
- },
- {
- "description": "regexes are case sensitive, 2",
- "data": { "a_X_3": 3 },
- "valid": false
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/properties.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft4/properties.json
deleted file mode 100644
index cd1644dcd91..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/properties.json
+++ /dev/null
@@ -1,92 +0,0 @@
-[
- {
- "description": "object properties validation",
- "schema": {
- "properties": {
- "foo": {"type": "integer"},
- "bar": {"type": "string"}
- }
- },
- "tests": [
- {
- "description": "both properties present and valid is valid",
- "data": {"foo": 1, "bar": "baz"},
- "valid": true
- },
- {
- "description": "one property invalid is invalid",
- "data": {"foo": 1, "bar": {}},
- "valid": false
- },
- {
- "description": "both properties invalid is invalid",
- "data": {"foo": [], "bar": {}},
- "valid": false
- },
- {
- "description": "doesn't invalidate other properties",
- "data": {"quux": []},
- "valid": true
- },
- {
- "description": "ignores non-objects",
- "data": [],
- "valid": true
- }
- ]
- },
- {
- "description":
- "properties, patternProperties, additionalProperties interaction",
- "schema": {
- "properties": {
- "foo": {"type": "array", "maxItems": 3},
- "bar": {"type": "array"}
- },
- "patternProperties": {"f.o": {"minItems": 2}},
- "additionalProperties": {"type": "integer"}
- },
- "tests": [
- {
- "description": "property validates property",
- "data": {"foo": [1, 2]},
- "valid": true
- },
- {
- "description": "property invalidates property",
- "data": {"foo": [1, 2, 3, 4]},
- "valid": false
- },
- {
- "description": "patternProperty invalidates property",
- "data": {"foo": []},
- "valid": false
- },
- {
- "description": "patternProperty validates nonproperty",
- "data": {"fxo": [1, 2]},
- "valid": true
- },
- {
- "description": "patternProperty invalidates nonproperty",
- "data": {"fxo": []},
- "valid": false
- },
- {
- "description": "additionalProperty ignores property",
- "data": {"bar": []},
- "valid": true
- },
- {
- "description": "additionalProperty validates others",
- "data": {"quux": 3},
- "valid": true
- },
- {
- "description": "additionalProperty invalidates others",
- "data": {"quux": "foo"},
- "valid": false
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/ref.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft4/ref.json
deleted file mode 100644
index 7e805522492..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/ref.json
+++ /dev/null
@@ -1,159 +0,0 @@
-[
- {
- "description": "root pointer ref",
- "schema": {
- "properties": {
- "foo": {"$ref": "#"}
- },
- "additionalProperties": false
- },
- "tests": [
- {
- "description": "match",
- "data": {"foo": false},
- "valid": true
- },
- {
- "description": "recursive match",
- "data": {"foo": {"foo": false}},
- "valid": true
- },
- {
- "description": "mismatch",
- "data": {"bar": false},
- "valid": false
- },
- {
- "description": "recursive mismatch",
- "data": {"foo": {"bar": false}},
- "valid": false
- }
- ]
- },
- {
- "description": "relative pointer ref to object",
- "schema": {
- "properties": {
- "foo": {"type": "integer"},
- "bar": {"$ref": "#/properties/foo"}
- }
- },
- "tests": [
- {
- "description": "match",
- "data": {"bar": 3},
- "valid": true
- },
- {
- "description": "mismatch",
- "data": {"bar": true},
- "valid": false
- }
- ]
- },
- {
- "description": "relative pointer ref to array",
- "schema": {
- "items": [
- {"type": "integer"},
- {"$ref": "#/items/0"}
- ]
- },
- "tests": [
- {
- "description": "match array",
- "data": [1, 2],
- "valid": true
- },
- {
- "description": "mismatch array",
- "data": [1, "foo"],
- "valid": false
- }
- ]
- },
- {
- "description": "escaped pointer ref",
- "schema": {
- "tilda~field": {"type": "integer"},
- "slash/field": {"type": "integer"},
- "percent%field": {"type": "integer"},
- "properties": {
- "tilda": {"$ref": "#/tilda~0field"},
- "slash": {"$ref": "#/slash~1field"},
- "percent": {"$ref": "#/percent%25field"}
- }
- },
- "tests": [
- {
- "description": "slash invalid",
- "data": {"slash": "aoeu"},
- "valid": false
- },
- {
- "description": "tilda invalid",
- "data": {"tilda": "aoeu"},
- "valid": false
- },
- {
- "description": "percent invalid",
- "data": {"percent": "aoeu"},
- "valid": false
- },
- {
- "description": "slash valid",
- "data": {"slash": 123},
- "valid": true
- },
- {
- "description": "tilda valid",
- "data": {"tilda": 123},
- "valid": true
- },
- {
- "description": "percent valid",
- "data": {"percent": 123},
- "valid": true
- }
- ]
- },
- {
- "description": "nested refs",
- "schema": {
- "definitions": {
- "a": {"type": "integer"},
- "b": {"$ref": "#/definitions/a"},
- "c": {"$ref": "#/definitions/b"}
- },
- "$ref": "#/definitions/c"
- },
- "tests": [
- {
- "description": "nested ref valid",
- "data": 5,
- "valid": true
- },
- {
- "description": "nested ref invalid",
- "data": "a",
- "valid": false
- }
- ]
- },
- {
- "description": "remote ref, containing refs itself",
- "schema": {"$ref": "http://json-schema.org/draft-04/schema#"},
- "tests": [
- {
- "description": "remote ref valid",
- "data": {"minLength": 1},
- "valid": true
- },
- {
- "description": "remote ref invalid",
- "data": {"minLength": -1},
- "valid": false
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/refRemote.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft4/refRemote.json
deleted file mode 100644
index 4ca804732c9..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/refRemote.json
+++ /dev/null
@@ -1,74 +0,0 @@
-[
- {
- "description": "remote ref",
- "schema": {"$ref": "http://localhost:1234/integer.json"},
- "tests": [
- {
- "description": "remote ref valid",
- "data": 1,
- "valid": true
- },
- {
- "description": "remote ref invalid",
- "data": "a",
- "valid": false
- }
- ]
- },
- {
- "description": "fragment within remote ref",
- "schema": {"$ref": "http://localhost:1234/subSchemas.json#/integer"},
- "tests": [
- {
- "description": "remote fragment valid",
- "data": 1,
- "valid": true
- },
- {
- "description": "remote fragment invalid",
- "data": "a",
- "valid": false
- }
- ]
- },
- {
- "description": "ref within remote ref",
- "schema": {
- "$ref": "http://localhost:1234/subSchemas.json#/refToInteger"
- },
- "tests": [
- {
- "description": "ref within ref valid",
- "data": 1,
- "valid": true
- },
- {
- "description": "ref within ref invalid",
- "data": "a",
- "valid": false
- }
- ]
- },
- {
- "description": "change resolution scope",
- "schema": {
- "id": "http://localhost:1234/",
- "items": {
- "id": "folder/",
- "items": {"$ref": "folderInteger.json"}
- }
- },
- "tests": [
- {
- "description": "changed scope ref valid",
- "data": [[1]],
- "valid": true
- },
- {
- "description": "changed scope ref invalid",
- "data": [["a"]],
- "valid": false
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/required.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft4/required.json
deleted file mode 100644
index 612f73f3472..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/required.json
+++ /dev/null
@@ -1,39 +0,0 @@
-[
- {
- "description": "required validation",
- "schema": {
- "properties": {
- "foo": {},
- "bar": {}
- },
- "required": ["foo"]
- },
- "tests": [
- {
- "description": "present required property is valid",
- "data": {"foo": 1},
- "valid": true
- },
- {
- "description": "non-present required property is invalid",
- "data": {"bar": 1},
- "valid": false
- }
- ]
- },
- {
- "description": "required default validation",
- "schema": {
- "properties": {
- "foo": {}
- }
- },
- "tests": [
- {
- "description": "not required by default",
- "data": {},
- "valid": true
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/type.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft4/type.json
deleted file mode 100644
index db42a44d3fa..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/type.json
+++ /dev/null
@@ -1,330 +0,0 @@
-[
- {
- "description": "integer type matches integers",
- "schema": {"type": "integer"},
- "tests": [
- {
- "description": "an integer is an integer",
- "data": 1,
- "valid": true
- },
- {
- "description": "a float is not an integer",
- "data": 1.1,
- "valid": false
- },
- {
- "description": "a string is not an integer",
- "data": "foo",
- "valid": false
- },
- {
- "description": "an object is not an integer",
- "data": {},
- "valid": false
- },
- {
- "description": "an array is not an integer",
- "data": [],
- "valid": false
- },
- {
- "description": "a boolean is not an integer",
- "data": true,
- "valid": false
- },
- {
- "description": "null is not an integer",
- "data": null,
- "valid": false
- }
- ]
- },
- {
- "description": "number type matches numbers",
- "schema": {"type": "number"},
- "tests": [
- {
- "description": "an integer is a number",
- "data": 1,
- "valid": true
- },
- {
- "description": "a float is a number",
- "data": 1.1,
- "valid": true
- },
- {
- "description": "a string is not a number",
- "data": "foo",
- "valid": false
- },
- {
- "description": "an object is not a number",
- "data": {},
- "valid": false
- },
- {
- "description": "an array is not a number",
- "data": [],
- "valid": false
- },
- {
- "description": "a boolean is not a number",
- "data": true,
- "valid": false
- },
- {
- "description": "null is not a number",
- "data": null,
- "valid": false
- }
- ]
- },
- {
- "description": "string type matches strings",
- "schema": {"type": "string"},
- "tests": [
- {
- "description": "1 is not a string",
- "data": 1,
- "valid": false
- },
- {
- "description": "a float is not a string",
- "data": 1.1,
- "valid": false
- },
- {
- "description": "a string is a string",
- "data": "foo",
- "valid": true
- },
- {
- "description": "an object is not a string",
- "data": {},
- "valid": false
- },
- {
- "description": "an array is not a string",
- "data": [],
- "valid": false
- },
- {
- "description": "a boolean is not a string",
- "data": true,
- "valid": false
- },
- {
- "description": "null is not a string",
- "data": null,
- "valid": false
- }
- ]
- },
- {
- "description": "object type matches objects",
- "schema": {"type": "object"},
- "tests": [
- {
- "description": "an integer is not an object",
- "data": 1,
- "valid": false
- },
- {
- "description": "a float is not an object",
- "data": 1.1,
- "valid": false
- },
- {
- "description": "a string is not an object",
- "data": "foo",
- "valid": false
- },
- {
- "description": "an object is an object",
- "data": {},
- "valid": true
- },
- {
- "description": "an array is not an object",
- "data": [],
- "valid": false
- },
- {
- "description": "a boolean is not an object",
- "data": true,
- "valid": false
- },
- {
- "description": "null is not an object",
- "data": null,
- "valid": false
- }
- ]
- },
- {
- "description": "array type matches arrays",
- "schema": {"type": "array"},
- "tests": [
- {
- "description": "an integer is not an array",
- "data": 1,
- "valid": false
- },
- {
- "description": "a float is not an array",
- "data": 1.1,
- "valid": false
- },
- {
- "description": "a string is not an array",
- "data": "foo",
- "valid": false
- },
- {
- "description": "an object is not an array",
- "data": {},
- "valid": false
- },
- {
- "description": "an array is an array",
- "data": [],
- "valid": true
- },
- {
- "description": "a boolean is not an array",
- "data": true,
- "valid": false
- },
- {
- "description": "null is not an array",
- "data": null,
- "valid": false
- }
- ]
- },
- {
- "description": "boolean type matches booleans",
- "schema": {"type": "boolean"},
- "tests": [
- {
- "description": "an integer is not a boolean",
- "data": 1,
- "valid": false
- },
- {
- "description": "a float is not a boolean",
- "data": 1.1,
- "valid": false
- },
- {
- "description": "a string is not a boolean",
- "data": "foo",
- "valid": false
- },
- {
- "description": "an object is not a boolean",
- "data": {},
- "valid": false
- },
- {
- "description": "an array is not a boolean",
- "data": [],
- "valid": false
- },
- {
- "description": "a boolean is a boolean",
- "data": true,
- "valid": true
- },
- {
- "description": "null is not a boolean",
- "data": null,
- "valid": false
- }
- ]
- },
- {
- "description": "null type matches only the null object",
- "schema": {"type": "null"},
- "tests": [
- {
- "description": "an integer is not null",
- "data": 1,
- "valid": false
- },
- {
- "description": "a float is not null",
- "data": 1.1,
- "valid": false
- },
- {
- "description": "a string is not null",
- "data": "foo",
- "valid": false
- },
- {
- "description": "an object is not null",
- "data": {},
- "valid": false
- },
- {
- "description": "an array is not null",
- "data": [],
- "valid": false
- },
- {
- "description": "a boolean is not null",
- "data": true,
- "valid": false
- },
- {
- "description": "null is null",
- "data": null,
- "valid": true
- }
- ]
- },
- {
- "description": "multiple types can be specified in an array",
- "schema": {"type": ["integer", "string"]},
- "tests": [
- {
- "description": "an integer is valid",
- "data": 1,
- "valid": true
- },
- {
- "description": "a string is valid",
- "data": "foo",
- "valid": true
- },
- {
- "description": "a float is invalid",
- "data": 1.1,
- "valid": false
- },
- {
- "description": "an object is invalid",
- "data": {},
- "valid": false
- },
- {
- "description": "an array is invalid",
- "data": [],
- "valid": false
- },
- {
- "description": "a boolean is invalid",
- "data": true,
- "valid": false
- },
- {
- "description": "null is invalid",
- "data": null,
- "valid": false
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/uniqueItems.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft4/uniqueItems.json
deleted file mode 100644
index c1f4ab99c9a..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tests/draft4/uniqueItems.json
+++ /dev/null
@@ -1,79 +0,0 @@
-[
- {
- "description": "uniqueItems validation",
- "schema": {"uniqueItems": true},
- "tests": [
- {
- "description": "unique array of integers is valid",
- "data": [1, 2],
- "valid": true
- },
- {
- "description": "non-unique array of integers is invalid",
- "data": [1, 1],
- "valid": false
- },
- {
- "description": "numbers are unique if mathematically unequal",
- "data": [1.0, 1.00, 1],
- "valid": false
- },
- {
- "description": "unique array of objects is valid",
- "data": [{"foo": "bar"}, {"foo": "baz"}],
- "valid": true
- },
- {
- "description": "non-unique array of objects is invalid",
- "data": [{"foo": "bar"}, {"foo": "bar"}],
- "valid": false
- },
- {
- "description": "unique array of nested objects is valid",
- "data": [
- {"foo": {"bar" : {"baz" : true}}},
- {"foo": {"bar" : {"baz" : false}}}
- ],
- "valid": true
- },
- {
- "description": "non-unique array of nested objects is invalid",
- "data": [
- {"foo": {"bar" : {"baz" : true}}},
- {"foo": {"bar" : {"baz" : true}}}
- ],
- "valid": false
- },
- {
- "description": "unique array of arrays is valid",
- "data": [["foo"], ["bar"]],
- "valid": true
- },
- {
- "description": "non-unique array of arrays is invalid",
- "data": [["foo"], ["foo"]],
- "valid": false
- },
- {
- "description": "1 and true are unique",
- "data": [1, true],
- "valid": true
- },
- {
- "description": "0 and false are unique",
- "data": [0, false],
- "valid": true
- },
- {
- "description": "unique heterogeneous types are valid",
- "data": [{}, [1], true, null, 1],
- "valid": true
- },
- {
- "description": "non-unique heterogeneous types are invalid",
- "data": [{}, [1], true, null, {}, 1],
- "valid": false
- }
- ]
- }
-]
diff --git a/3rdparty/rapidjson/bin/jsonschema/tox.ini b/3rdparty/rapidjson/bin/jsonschema/tox.ini
deleted file mode 100644
index 5301222a840..00000000000
--- a/3rdparty/rapidjson/bin/jsonschema/tox.ini
+++ /dev/null
@@ -1,8 +0,0 @@
-[tox]
-minversion = 1.6
-envlist = py27
-skipsdist = True
-
-[testenv]
-deps = jsonschema
-commands = {envpython} bin/jsonschema_suite check
diff --git a/3rdparty/rapidjson/bin/types/booleans.json b/3rdparty/rapidjson/bin/types/booleans.json
deleted file mode 100644
index 2dcbb5fe876..00000000000
--- a/3rdparty/rapidjson/bin/types/booleans.json
+++ /dev/null
@@ -1,102 +0,0 @@
-[
- true,
- true,
- false,
- false,
- true,
- true,
- true,
- false,
- false,
- true,
- false,
- false,
- true,
- false,
- false,
- false,
- true,
- false,
- false,
- true,
- true,
- false,
- true,
- true,
- true,
- false,
- false,
- false,
- true,
- false,
- true,
- false,
- false,
- true,
- true,
- true,
- true,
- true,
- true,
- false,
- false,
- true,
- false,
- false,
- false,
- true,
- true,
- false,
- true,
- true,
- false,
- true,
- false,
- true,
- true,
- true,
- false,
- false,
- false,
- true,
- false,
- false,
- false,
- true,
- true,
- false,
- true,
- true,
- true,
- true,
- true,
- true,
- true,
- true,
- false,
- false,
- false,
- false,
- false,
- true,
- true,
- true,
- true,
- true,
- true,
- true,
- false,
- false,
- false,
- true,
- false,
- false,
- false,
- true,
- true,
- true,
- false,
- false,
- true,
- false
-] \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/types/floats.json b/3rdparty/rapidjson/bin/types/floats.json
deleted file mode 100644
index 12b94a11dc4..00000000000
--- a/3rdparty/rapidjson/bin/types/floats.json
+++ /dev/null
@@ -1,102 +0,0 @@
-[
- 135.747111636,
- 123.377054008,
- 140.527504552,
- -72.299143906,
- -23.851678949,
- 73.586193519,
- -158.299382442,
- 177.477876032,
- 32.268518982,
- -139.560009969,
- 115.203105183,
- -106.025823607,
- 167.224138231,
- 103.378383732,
- -97.498486285,
- 18.184723416,
- 69.137075711,
- 33.849002681,
- -120.185228215,
- -20.841408615,
- -172.659492727,
- -2.691464061,
- 22.426164066,
- -98.416909437,
- -31.603082708,
- -85.072296561,
- 108.620987395,
- -43.127078238,
- -126.473562057,
- -158.595489097,
- -57.890678254,
- -13.254016573,
- -85.024504709,
- 171.663552644,
- -146.495558248,
- -10.606748276,
- -118.786969354,
- 153.352057804,
- -45.215545083,
- 37.038725288,
- 106.344071897,
- -64.607402031,
- 85.148030911,
- 28.897784566,
- 39.51082061,
- 20.450382102,
- -113.174943618,
- 71.60785784,
- -168.202648062,
- -157.338200017,
- 10.879588527,
- -114.261694831,
- -5.622927072,
- -173.330830616,
- -29.47002003,
- -39.829034201,
- 50.031545162,
- 82.815735508,
- -119.188760828,
- -48.455928081,
- 163.964263034,
- 46.30378861,
- -26.248889762,
- -47.354615322,
- 155.388677633,
- -166.710356904,
- 42.987233558,
- 144.275297374,
- 37.394383186,
- -122.550388725,
- 177.469945914,
- 101.104677413,
- 109.429869885,
- -104.919625624,
- 147.522756541,
- -81.294703727,
- 122.744731363,
- 81.803603684,
- 26.321556167,
- 147.045441354,
- 147.256895816,
- -174.211095908,
- 52.518769316,
- -78.58250334,
- -173.356685435,
- -107.728209264,
- -69.982325771,
- -113.776095893,
- -35.785267074,
- -105.748545976,
- -30.206523864,
- -76.185311723,
- -126.400112781,
- -26.864958639,
- 56.840053629,
- 93.781553535,
- -116.002949803,
- -46.617140948,
- 176.846840093,
- -144.24821335
-]
diff --git a/3rdparty/rapidjson/bin/types/guids.json b/3rdparty/rapidjson/bin/types/guids.json
deleted file mode 100644
index 9d7f5dbc8f9..00000000000
--- a/3rdparty/rapidjson/bin/types/guids.json
+++ /dev/null
@@ -1,102 +0,0 @@
-[
- "d35bf0d4-8d8f-4e17-a5c3-ad9bfd675266",
- "db402774-eeb6-463b-9986-c458c44d8b5a",
- "2a2e4101-b5f2-40b8-8750-e03f01661e60",
- "76787cfa-f4eb-4d62-aaad-e1d588d00ad5",
- "fd73894b-b500-4a7c-888c-06b5bd9cec65",
- "cce1862a-cf31-4ef2-9e23-f1d23b4e6163",
- "00a98bb0-2b6e-4368-8512-71c21aa87db7",
- "ab9a8d69-cec7-4550-bd35-3ed678e22782",
- "f18b48e1-5114-4fbe-9652-579e8d66950e",
- "4efe3baa-7ac5-4d6a-a839-6b9cfe825764",
- "b4aec119-5b0a-434c-b388-109816c482a5",
- "e0ef0cbb-127a-4a28-9831-5741b4295275",
- "d50286a5-cb7b-4c9e-be99-f214439bae8c",
- "a981094c-f1ac-42ed-a9fa-86404c7210ff",
- "2a34ee57-5815-4829-b77b-eeebaa8fe340",
- "a0530d44-48f8-4eff-b9ea-8810c4308351",
- "c6f91509-83e1-4ea1-9680-e667fbfd56ee",
- "cab11402-dcdd-4454-b190-6da124947395",
- "283d159c-2b18-4856-b4c7-5059252eaa15",
- "146157c6-72a8-4051-9991-cb6ea6743d81",
- "aef6f269-7306-4bd2-83f7-6d5605b5dc9a",
- "37fe6027-d638-4017-80a9-e7b0567b278e",
- "5003d731-33fb-4159-af61-d76348a44079",
- "e0e06979-5f80-4713-9fe0-8a4d60dc89f8",
- "7e85bdc3-0345-4cb6-9398-ccab06e79976",
- "f2ebf5af-6568-4ffe-a46d-403863fd4b66",
- "e0b5bb1c-b4dd-4535-9a9e-3c73f1167d46",
- "c852d20b-6bcb-4b12-bd57-308296c64c5a",
- "7ac3ae82-1818-49cd-a8a4-5ac77dfafd46",
- "138004a9-76e2-4ad7-bd42-e74dabdbb803",
- "ab25b5be-96be-45b0-b765-947b40ec36a6",
- "08404734-fd57-499e-a4cf-71e9ec782ede",
- "8dfdeb16-248b-4a21-bf89-2e22b11a4101",
- "a0e44ef0-3b09-41e8-ad5d-ed8e6a1a2a67",
- "a7981e49-188d-414a-9779-b1ad91e599d1",
- "329186c0-bf27-4208-baf7-c0a0a5a2d5b7",
- "cb5f3381-d33e-4b30-b1a9-f482623cad33",
- "15031262-ca73-4e3c-bd0a-fcf89bdf0caf",
- "6d7333d1-2e8c-4d78-bfde-5be47e70eb13",
- "acaa160c-670a-4e8f-ac45-49416e77d5f9",
- "228f87eb-cde4-4106-808b-2dbf3c7b6d2e",
- "2ff830a3-5445-4d8e-b161-bddd30666697",
- "f488bedd-ff6e-4108-b9a7-07f6da62f476",
- "2e12b846-0a34-478e-adf7-a438493803e6",
- "6686b8ef-7446-4d86-bd8c-df24119e3bfe",
- "e474a5c5-5793-4d41-b4ab-5423acc56ef1",
- "ac046573-e718-44dc-a0dc-9037eeaba6a9",
- "6b0e9099-cf53-4d5a-8a71-977528628fcf",
- "d51a3f22-0ff9-4087-ba9b-fcee2a2d8ade",
- "bdc01286-3511-4d22-bfb8-76d01203d366",
- "ca44eb84-17ff-4f27-8f1e-1bd25f4e8725",
- "4e9a8c2f-be0b-4913-92d2-c801b9a50d04",
- "7685d231-dadd-4041-9165-898397438ab7",
- "86f0bf26-d66a-44d8-99f5-d6768addae3b",
- "2ca1167c-72ba-45a0-aa42-faf033db0d0b",
- "199a1182-ea55-49ff-ba51-71c29cdd0aac",
- "be6a4dd2-c821-4aa0-8b83-d64d6644b5b2",
- "4c5f4781-7f80-4daa-9c20-76b183000514",
- "513b31bd-54fb-4d12-a427-42a7c13ff8e1",
- "8e211bcb-d76c-4012-83ad-74dd7d23b687",
- "44d5807e-0501-4f66-8779-e244d4fdca0a",
- "db8cd555-0563-4b7b-b00c-eada300a7065",
- "cb14d0c9-46cc-4797-bd3a-752b05629f07",
- "4f68b3ef-ac9b-47a0-b6d7-57f398a5c6a5",
- "77221aae-1bcf-471c-be45-7f31f733f9d6",
- "42a7cac8-9e80-4c45-8c71-511d863c98ea",
- "f9018d22-b82c-468c-bdb5-8864d5964801",
- "75f4e9b8-62a2-4f21-ad8a-e19eff0419bc",
- "9b7385c8-8653-4184-951c-b0ac1b36b42e",
- "571018aa-ffbf-4b42-a16d-07b57a7f5f0e",
- "35de4a2f-6bf1-45aa-b820-2a27ea833e44",
- "0b8edb20-3bb4-4cb4-b089-31957466dbab",
- "97da4778-9a7b-4140-a545-968148c81fb7",
- "969f326c-8f2a-47c5-b41c-d9c2f06c9b9d",
- "ae211037-8b53-4b17-bfc8-c06fc7774409",
- "12c5c3c4-0bd5-45d3-bc1d-d04a3c65d3e6",
- "ec02024f-ce43-4dd3-8169-a59f7baee043",
- "5b6afe77-ce48-47ca-90a0-25cd10ca5ffd",
- "2e3a61d4-6b8f-4d2f-ba86-878b4012efd8",
- "19a88a67-a5d3-4647-898f-1cde07bce040",
- "6db6f420-b5c8-48b9-bbb2-8864fe6fed65",
- "5a45dbde-7b53-4f6b-b864-e3b63be3708a",
- "c878321b-8a02-4239-9981-15760c2e7d15",
- "4e36687f-8bf6-4b12-b496-3a8e382d067e",
- "a59a63cd-43c0-4c6e-b208-6dbca86f8176",
- "303308c4-2e4a-45b5-8bf3-3e66e9ad05a1",
- "8b58fdf1-43a6-4c98-9547-6361b50791af",
- "a3563591-72ed-42b5-8e41-bac1d76d70cf",
- "38db8c78-3739-4f6e-8313-de4138082114",
- "86615bea-7e73-4daf-95da-ae6b9eee1bbb",
- "35d38e3e-076e-40dd-9aa8-05be2603bd59",
- "9f84c62d-b454-4ba3-8c19-a01878985cdc",
- "6721bbae-d765-4a06-8289-6fe46a1bf943",
- "0837796f-d0dd-4e50-9b7c-1983e6cc7c48",
- "021eb7d7-e869-49b9-80c3-9dd16ce2d981",
- "819c56f8-e040-475d-aad5-c6d5e98b20aa",
- "3a61ef02-735e-4229-937d-b3777a3f4e1f",
- "79dfab84-12e6-4ec8-bfc8-460ae71e4eca",
- "a106fabf-e149-476c-8053-b62388b6eb57",
- "9a3900a5-bfb4-4de0-baa5-253a8bd0b634"
-] \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/types/integers.json b/3rdparty/rapidjson/bin/types/integers.json
deleted file mode 100644
index 5dd05e097a4..00000000000
--- a/3rdparty/rapidjson/bin/types/integers.json
+++ /dev/null
@@ -1,102 +0,0 @@
-[
- 8125686,
- 8958709,
- 5976222,
- 1889524,
- 7968493,
- 1357486,
- 118415,
- 7081097,
- 4635968,
- 7555332,
- 2270233,
- 3428352,
- 8699968,
- 2087333,
- 7861337,
- 7554440,
- 2017031,
- 7981692,
- 6060687,
- 1877715,
- 3297474,
- 8373177,
- 6158629,
- 7853641,
- 3004441,
- 9650406,
- 2695251,
- 1180761,
- 4988426,
- 6043805,
- 8063373,
- 6103218,
- 2848339,
- 8188690,
- 9235573,
- 5949816,
- 6116081,
- 6471138,
- 3354531,
- 4787414,
- 9660600,
- 942529,
- 7278535,
- 7967399,
- 554292,
- 1436493,
- 267319,
- 2606657,
- 7900601,
- 4276634,
- 7996757,
- 8544466,
- 7266469,
- 3301373,
- 4005350,
- 6437652,
- 7717672,
- 7126292,
- 8588394,
- 2127902,
- 7410190,
- 1517806,
- 4583602,
- 3123440,
- 7747613,
- 5029464,
- 9834390,
- 3087227,
- 4913822,
- 7550487,
- 4518144,
- 5862588,
- 1778599,
- 9493290,
- 5588455,
- 3638706,
- 7394293,
- 4294719,
- 3837830,
- 6381878,
- 7175866,
- 8575492,
- 1415229,
- 1453733,
- 6972404,
- 9782571,
- 4234063,
- 7117418,
- 7293130,
- 8057071,
- 9345285,
- 7626648,
- 3358911,
- 4574537,
- 9371826,
- 7627107,
- 6154093,
- 5392367,
- 5398105,
- 6956377
-] \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/types/mixed.json b/3rdparty/rapidjson/bin/types/mixed.json
deleted file mode 100644
index 43e9a1d7be0..00000000000
--- a/3rdparty/rapidjson/bin/types/mixed.json
+++ /dev/null
@@ -1,592 +0,0 @@
-[
- {
- "favoriteFruit": "banana",
- "greeting": "Hello, Kim! You have 10 unread messages.",
- "friends": [
- {
- "name": "Higgins Rodriquez",
- "id": 0
- },
- {
- "name": "James Floyd",
- "id": 1
- },
- {
- "name": "Gay Stewart",
- "id": 2
- }
- ],
- "range": [
- 0,
- 1,
- 2,
- 3,
- 4,
- 5,
- 6,
- 7,
- 8,
- 9
- ],
- "tags": [
- "pariatur",
- "ad",
- "eiusmod",
- "sit",
- "et",
- "velit",
- "culpa"
- ],
- "longitude": -57.919246,
- "latitude": -36.022812,
- "registered": "Friday, March 21, 2014 9:13 PM",
- "about": "Laborum nulla aliquip ullamco proident excepteur est officia ipsum. Eiusmod exercitation minim ex do labore reprehenderit aliqua minim qui excepteur reprehenderit cupidatat. Sint enim exercitation duis id consequat nisi enim magna. Commodo aliqua id ipsum sit magna enim. Veniam officia in labore fugiat veniam ea laboris ex veniam duis.\r\n",
- "address": "323 Pulaski Street, Ronco, North Carolina, 7701",
- "phone": "+1 (919) 438-2678",
- "email": "kim.griffith@cipromox.biz",
- "company": "CIPROMOX",
- "name": {
- "last": "Griffith",
- "first": "Kim"
- },
- "eyeColor": "green",
- "age": 26,
- "picture": "http://placehold.it/32x32",
- "balance": "$1,283.55",
- "isActive": false,
- "guid": "10ab0392-c5e2-48a3-9473-aa725bad892d",
- "index": 0,
- "_id": "551b91198238a0bcf9a41133"
- },
- {
- "favoriteFruit": "banana",
- "greeting": "Hello, Skinner! You have 9 unread messages.",
- "friends": [
- {
- "name": "Rhonda Justice",
- "id": 0
- },
- {
- "name": "Audra Castaneda",
- "id": 1
- },
- {
- "name": "Vicky Chavez",
- "id": 2
- }
- ],
- "range": [
- 0,
- 1,
- 2,
- 3,
- 4,
- 5,
- 6,
- 7,
- 8,
- 9
- ],
- "tags": [
- "dolore",
- "enim",
- "sit",
- "non",
- "exercitation",
- "fugiat",
- "adipisicing"
- ],
- "longitude": -60.291407,
- "latitude": -84.619318,
- "registered": "Friday, February 7, 2014 3:17 AM",
- "about": "Consectetur eiusmod laboris dolore est ullamco nulla in velit quis esse Lorem. Amet aliqua sunt aute occaecat veniam officia in duis proident aliqua cupidatat mollit. Sint eu qui anim duis ut anim duis eu cillum. Cillum nostrud adipisicing tempor Lorem commodo sit in ad qui non et irure qui. Labore eu aliquip id duis eiusmod veniam.\r\n",
- "address": "347 Autumn Avenue, Fidelis, Puerto Rico, 543",
- "phone": "+1 (889) 457-2319",
- "email": "skinner.maddox@moltonic.co.uk",
- "company": "MOLTONIC",
- "name": {
- "last": "Maddox",
- "first": "Skinner"
- },
- "eyeColor": "green",
- "age": 22,
- "picture": "http://placehold.it/32x32",
- "balance": "$3,553.10",
- "isActive": false,
- "guid": "cfbc2fb6-2641-4388-b06d-ec0212cfac1e",
- "index": 1,
- "_id": "551b91197e0abe92d6642700"
- },
- {
- "favoriteFruit": "strawberry",
- "greeting": "Hello, Reynolds! You have 5 unread messages.",
- "friends": [
- {
- "name": "Brady Valdez",
- "id": 0
- },
- {
- "name": "Boyer Golden",
- "id": 1
- },
- {
- "name": "Gladys Knapp",
- "id": 2
- }
- ],
- "range": [
- 0,
- 1,
- 2,
- 3,
- 4,
- 5,
- 6,
- 7,
- 8,
- 9
- ],
- "tags": [
- "commodo",
- "eiusmod",
- "cupidatat",
- "et",
- "occaecat",
- "proident",
- "Lorem"
- ],
- "longitude": 140.866287,
- "latitude": 1.401032,
- "registered": "Monday, October 20, 2014 8:01 AM",
- "about": "Deserunt elit consequat ea dolor pariatur aute consectetur et nulla ipsum ad. Laboris occaecat ipsum ad duis et esse ea ut voluptate. Ex magna consequat pariatur amet. Quis excepteur non mollit dolore cillum dolor ex esse veniam esse deserunt non occaecat veniam. Sit amet proident proident amet. Nisi est id ut ut adipisicing esse fugiat non dolor aute.\r\n",
- "address": "872 Montague Terrace, Haena, Montana, 3106",
- "phone": "+1 (974) 410-2655",
- "email": "reynolds.sanford@combot.biz",
- "company": "COMBOT",
- "name": {
- "last": "Sanford",
- "first": "Reynolds"
- },
- "eyeColor": "green",
- "age": 21,
- "picture": "http://placehold.it/32x32",
- "balance": "$3,664.47",
- "isActive": true,
- "guid": "f9933a9c-c41a-412f-a18d-e727c569870b",
- "index": 2,
- "_id": "551b91197f170b65413a06e3"
- },
- {
- "favoriteFruit": "banana",
- "greeting": "Hello, Neva! You have 7 unread messages.",
- "friends": [
- {
- "name": "Clara Cotton",
- "id": 0
- },
- {
- "name": "Ray Gates",
- "id": 1
- },
- {
- "name": "Jacobs Reese",
- "id": 2
- }
- ],
- "range": [
- 0,
- 1,
- 2,
- 3,
- 4,
- 5,
- 6,
- 7,
- 8,
- 9
- ],
- "tags": [
- "magna",
- "labore",
- "incididunt",
- "velit",
- "ea",
- "et",
- "eiusmod"
- ],
- "longitude": -133.058479,
- "latitude": 87.803677,
- "registered": "Friday, May 9, 2014 5:41 PM",
- "about": "Do duis occaecat ut officia occaecat officia nostrud reprehenderit ex excepteur aute anim in reprehenderit. Cupidatat nulla eiusmod nulla non minim veniam aute nulla deserunt adipisicing consectetur veniam. Sit consequat ex laboris aliqua labore consectetur tempor proident consequat est. Fugiat quis esse culpa aliquip. Excepteur laborum aliquip sunt eu cupidatat magna eiusmod amet nisi labore aliquip. Ut consectetur esse aliquip exercitation nulla ex occaecat elit do ex eiusmod deserunt. Ex eu voluptate minim deserunt fugiat minim est occaecat ad Lorem nisi.\r\n",
- "address": "480 Eagle Street, Fostoria, Oklahoma, 2614",
- "phone": "+1 (983) 439-3000",
- "email": "neva.barker@pushcart.us",
- "company": "PUSHCART",
- "name": {
- "last": "Barker",
- "first": "Neva"
- },
- "eyeColor": "brown",
- "age": 36,
- "picture": "http://placehold.it/32x32",
- "balance": "$3,182.24",
- "isActive": true,
- "guid": "52489849-78e1-4b27-8b86-e3e5ab2b7dc8",
- "index": 3,
- "_id": "551b9119a13061c083c878d5"
- },
- {
- "favoriteFruit": "banana",
- "greeting": "Hello, Rodgers! You have 6 unread messages.",
- "friends": [
- {
- "name": "Marguerite Conway",
- "id": 0
- },
- {
- "name": "Margarita Cunningham",
- "id": 1
- },
- {
- "name": "Carmela Gallagher",
- "id": 2
- }
- ],
- "range": [
- 0,
- 1,
- 2,
- 3,
- 4,
- 5,
- 6,
- 7,
- 8,
- 9
- ],
- "tags": [
- "ipsum",
- "magna",
- "amet",
- "elit",
- "sit",
- "occaecat",
- "elit"
- ],
- "longitude": -125.436981,
- "latitude": 19.868524,
- "registered": "Tuesday, July 8, 2014 8:09 PM",
- "about": "In cillum esse tempor do magna id ad excepteur ex nostrud mollit deserunt aliqua. Minim aliqua commodo commodo consectetur exercitation nulla nisi dolore aliqua in. Incididunt deserunt mollit nostrud excepteur. Ipsum fugiat anim deserunt Lorem aliquip nisi consequat eu minim in ex duis.\r\n",
- "address": "989 Varanda Place, Duryea, Palau, 3972",
- "phone": "+1 (968) 578-2974",
- "email": "rodgers.conner@frenex.net",
- "company": "FRENEX",
- "name": {
- "last": "Conner",
- "first": "Rodgers"
- },
- "eyeColor": "blue",
- "age": 23,
- "picture": "http://placehold.it/32x32",
- "balance": "$1,665.17",
- "isActive": true,
- "guid": "ed3b2374-5afe-4fca-9325-8a7bbc9f81a0",
- "index": 4,
- "_id": "551b91197bcedb1b56a241ce"
- },
- {
- "favoriteFruit": "strawberry",
- "greeting": "Hello, Mari! You have 10 unread messages.",
- "friends": [
- {
- "name": "Irwin Boyd",
- "id": 0
- },
- {
- "name": "Dejesus Flores",
- "id": 1
- },
- {
- "name": "Lane Mcmahon",
- "id": 2
- }
- ],
- "range": [
- 0,
- 1,
- 2,
- 3,
- 4,
- 5,
- 6,
- 7,
- 8,
- 9
- ],
- "tags": [
- "esse",
- "aliquip",
- "excepteur",
- "dolor",
- "ex",
- "commodo",
- "anim"
- ],
- "longitude": -17.038176,
- "latitude": 17.154663,
- "registered": "Sunday, April 6, 2014 4:46 AM",
- "about": "Excepteur veniam occaecat sint nulla magna in in officia elit. Eiusmod qui dolor fugiat tempor in minim esse officia minim consequat. Lorem ullamco labore proident ipsum id pariatur fugiat consectetur anim cupidatat qui proident non ipsum.\r\n",
- "address": "563 Hendrickson Street, Westwood, South Dakota, 4959",
- "phone": "+1 (980) 434-3976",
- "email": "mari.fleming@beadzza.org",
- "company": "BEADZZA",
- "name": {
- "last": "Fleming",
- "first": "Mari"
- },
- "eyeColor": "blue",
- "age": 21,
- "picture": "http://placehold.it/32x32",
- "balance": "$1,948.04",
- "isActive": true,
- "guid": "6bd02166-3b1f-4ed8-84c9-ed96cbf12abc",
- "index": 5,
- "_id": "551b9119b359ff6d24846f77"
- },
- {
- "favoriteFruit": "strawberry",
- "greeting": "Hello, Maxine! You have 7 unread messages.",
- "friends": [
- {
- "name": "Sullivan Stark",
- "id": 0
- },
- {
- "name": "Underwood Mclaughlin",
- "id": 1
- },
- {
- "name": "Kristy Carlson",
- "id": 2
- }
- ],
- "range": [
- 0,
- 1,
- 2,
- 3,
- 4,
- 5,
- 6,
- 7,
- 8,
- 9
- ],
- "tags": [
- "commodo",
- "ipsum",
- "quis",
- "non",
- "est",
- "mollit",
- "exercitation"
- ],
- "longitude": -105.40635,
- "latitude": 37.197993,
- "registered": "Tuesday, January 20, 2015 12:30 AM",
- "about": "Proident ullamco Lorem est consequat consectetur non eiusmod esse nostrud pariatur eiusmod enim exercitation eiusmod. Consequat duis elit elit minim ullamco et dolor eu minim do tempor esse consequat excepteur. Mollit dolor do voluptate nostrud quis anim cillum velit tempor eiusmod adipisicing tempor do culpa. Eu magna dolor sit amet nisi do laborum dolore nisi. Deserunt ipsum et deserunt non nisi.\r\n",
- "address": "252 Boulevard Court, Brenton, Tennessee, 9444",
- "phone": "+1 (950) 466-3377",
- "email": "maxine.moreno@zentia.tv",
- "company": "ZENTIA",
- "name": {
- "last": "Moreno",
- "first": "Maxine"
- },
- "eyeColor": "brown",
- "age": 24,
- "picture": "http://placehold.it/32x32",
- "balance": "$1,200.24",
- "isActive": false,
- "guid": "ce307a37-ca1f-43f5-b637-dca2605712be",
- "index": 6,
- "_id": "551b91195a6164b2e35f6dc8"
- },
- {
- "favoriteFruit": "strawberry",
- "greeting": "Hello, Helga! You have 5 unread messages.",
- "friends": [
- {
- "name": "Alicia Vance",
- "id": 0
- },
- {
- "name": "Vinson Phelps",
- "id": 1
- },
- {
- "name": "Francisca Kelley",
- "id": 2
- }
- ],
- "range": [
- 0,
- 1,
- 2,
- 3,
- 4,
- 5,
- 6,
- 7,
- 8,
- 9
- ],
- "tags": [
- "nostrud",
- "eiusmod",
- "dolore",
- "officia",
- "sint",
- "non",
- "qui"
- ],
- "longitude": -7.275151,
- "latitude": 75.54202,
- "registered": "Wednesday, October 1, 2014 6:35 PM",
- "about": "Quis duis ullamco velit qui. Consectetur non adipisicing id magna anim. Deserunt est officia qui esse. Et do pariatur incididunt anim ad mollit non. Et eiusmod sunt fugiat elit mollit ad excepteur anim nisi laboris eiusmod aliquip aliquip.\r\n",
- "address": "981 Bush Street, Beaulieu, Vermont, 3775",
- "phone": "+1 (956) 506-3807",
- "email": "helga.burch@synkgen.name",
- "company": "SYNKGEN",
- "name": {
- "last": "Burch",
- "first": "Helga"
- },
- "eyeColor": "blue",
- "age": 22,
- "picture": "http://placehold.it/32x32",
- "balance": "$3,827.89",
- "isActive": false,
- "guid": "ff5dfea0-1052-4ef2-8b66-4dc1aad0a4fb",
- "index": 7,
- "_id": "551b911946be8358ae40e90e"
- },
- {
- "favoriteFruit": "banana",
- "greeting": "Hello, Shaw! You have 5 unread messages.",
- "friends": [
- {
- "name": "Christian Cardenas",
- "id": 0
- },
- {
- "name": "Cohen Pennington",
- "id": 1
- },
- {
- "name": "Mary Lindsay",
- "id": 2
- }
- ],
- "range": [
- 0,
- 1,
- 2,
- 3,
- 4,
- 5,
- 6,
- 7,
- 8,
- 9
- ],
- "tags": [
- "occaecat",
- "ut",
- "occaecat",
- "magna",
- "exercitation",
- "incididunt",
- "irure"
- ],
- "longitude": -89.102972,
- "latitude": 89.489596,
- "registered": "Thursday, August 21, 2014 5:00 PM",
- "about": "Amet cupidatat quis velit aute Lorem consequat pariatur mollit deserunt et sint culpa excepteur duis. Enim proident duis qui ex tempor sunt nostrud occaecat. Officia sit veniam mollit eiusmod minim do aute eiusmod fugiat qui anim adipisicing in laboris. Do tempor reprehenderit sunt laborum esse irure dolor ad consectetur aute sit id ipsum. Commodo et voluptate anim consequat do. Minim laborum ad veniam ad minim incididunt excepteur excepteur aliqua.\r\n",
- "address": "237 Pierrepont Street, Herbster, New York, 3490",
- "phone": "+1 (976) 455-2880",
- "email": "shaw.zamora@shadease.me",
- "company": "SHADEASE",
- "name": {
- "last": "Zamora",
- "first": "Shaw"
- },
- "eyeColor": "blue",
- "age": 38,
- "picture": "http://placehold.it/32x32",
- "balance": "$3,440.82",
- "isActive": false,
- "guid": "ac5fdb0e-e1fb-427e-881d-da461be0d1ca",
- "index": 8,
- "_id": "551b9119af0077bc28a2de25"
- },
- {
- "favoriteFruit": "apple",
- "greeting": "Hello, Melissa! You have 5 unread messages.",
- "friends": [
- {
- "name": "Marion Villarreal",
- "id": 0
- },
- {
- "name": "Kate Rose",
- "id": 1
- },
- {
- "name": "Hines Simon",
- "id": 2
- }
- ],
- "range": [
- 0,
- 1,
- 2,
- 3,
- 4,
- 5,
- 6,
- 7,
- 8,
- 9
- ],
- "tags": [
- "amet",
- "veniam",
- "mollit",
- "ad",
- "cupidatat",
- "deserunt",
- "Lorem"
- ],
- "longitude": -52.735052,
- "latitude": 16.258838,
- "registered": "Wednesday, April 16, 2014 7:56 PM",
- "about": "Aute ut culpa eiusmod tempor duis dolor tempor incididunt. Nisi non proident excepteur eiusmod incididunt nisi minim irure sit. In veniam commodo deserunt proident reprehenderit et consectetur ullamco quis nulla cupidatat.\r\n",
- "address": "642 Halsey Street, Blandburg, Kansas, 6761",
- "phone": "+1 (941) 539-3851",
- "email": "melissa.vaughn@memora.io",
- "company": "MEMORA",
- "name": {
- "last": "Vaughn",
- "first": "Melissa"
- },
- "eyeColor": "brown",
- "age": 24,
- "picture": "http://placehold.it/32x32",
- "balance": "$2,399.44",
- "isActive": true,
- "guid": "1769f022-a7f1-4a69-bf4c-f5a5ebeab2d1",
- "index": 9,
- "_id": "551b9119b607c09c7ffc3b8a"
- }
-] \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/types/nulls.json b/3rdparty/rapidjson/bin/types/nulls.json
deleted file mode 100644
index 7a636ec87cd..00000000000
--- a/3rdparty/rapidjson/bin/types/nulls.json
+++ /dev/null
@@ -1,102 +0,0 @@
-[
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null
-] \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/types/paragraphs.json b/3rdparty/rapidjson/bin/types/paragraphs.json
deleted file mode 100644
index 8ab3e1c561c..00000000000
--- a/3rdparty/rapidjson/bin/types/paragraphs.json
+++ /dev/null
@@ -1,102 +0,0 @@
-[
- "Commodo ullamco cupidatat nisi sit proident ex. Cillum pariatur occaecat in officia do commodo nisi cillum tempor minim. Ad dolor ut et aliquip fugiat eu officia cupidatat occaecat consectetur eiusmod veniam enim officia.\r\n",
- "Adipisicing cillum laborum nisi irure. Cillum dolor proident duis nulla qui mollit dolore reprehenderit mollit. Irure nulla dolor ipsum irure nulla quis laboris do.\r\n",
- "Est adipisicing consectetur incididunt in. Occaecat ea magna ex consequat irure sit laborum cillum officia magna sunt do exercitation aliquip. Laboris id aute in dolore reprehenderit voluptate non deserunt laborum.\r\n",
- "Consectetur eu aute est est occaecat adipisicing sint enim dolor eu. Tempor amet id non mollit eu consectetur cillum duis. Eu labore velit nulla ipsum commodo consequat aliquip. Cupidatat commodo dolore mollit enim sit excepteur nisi duis laboris deserunt esse.\r\n",
- "Incididunt ullamco est fugiat enim fugiat. Do sit mollit anim ad excepteur eu laboris exercitation officia labore nulla ut. Voluptate non voluptate cillum sit et voluptate anim duis velit consequat aliquip dolor. Elit et et esse laboris consectetur officia eiusmod aliquip nisi est. Qui labore dolore ad dolor.\r\n",
- "Anim adipisicing est irure proident sit officia ullamco voluptate sunt consectetur duis mollit excepteur veniam. Nostrud ut duis aute exercitation officia et quis elit commodo elit tempor aute aliquip enim. Est officia non cillum consequat voluptate ipsum sit voluptate nulla id.\r\n",
- "Ipsum enim consectetur aliquip nulla commodo ut ex aliqua elit duis do. Officia et sunt aliqua dolor minim voluptate veniam esse elit enim. Adipisicing reprehenderit duis ex magna non in fugiat sunt ipsum nostrud fugiat aliquip. Labore voluptate id officia voluptate eu. Magna do nostrud excepteur sunt aliqua adipisicing qui.\r\n",
- "Est occaecat non non cupidatat laborum qui. Veniam sit est voluptate labore sit irure consectetur fugiat. Anim enim enim fugiat exercitation anim ad proident esse in aliqua. Laboris ut aute culpa ullamco.\r\n",
- "Sit et aliquip cupidatat deserunt eiusmod sint aliquip occaecat nostrud aliqua elit commodo ut magna. Amet sit est deserunt id duis in officia pariatur cupidatat ex. Mollit duis est consequat nulla aute velit ipsum sit consectetur pariatur ut non ex ipsum. Tempor esse velit pariatur reprehenderit et nostrud commodo laborum mollit labore.\r\n",
- "Aliquip irure quis esse aliquip. Ex non deserunt culpa aliqua ad anim occaecat ad. Lorem consectetur mollit eu consectetur est non nisi non ipsum. Qui veniam ullamco officia est ut excepteur. Nulla elit dolore cupidatat aliqua enim Lorem elit consequat eiusmod non aliqua eu in. Pariatur in culpa labore sint ipsum consectetur occaecat ad ex ipsum laboris aliquip officia. Non officia eiusmod nisi officia id id laboris deserunt sunt enim magna mollit sit.\r\n",
- "Mollit velit laboris laborum nulla aliquip consequat Lorem non incididunt irure. Eu voluptate sint do consectetur tempor sit Lorem in. Laborum eiusmod nisi Lorem ipsum dolore do aute laborum occaecat aute sunt. Sit laborum in ea do ipsum officia irure cillum irure nisi laboris. Ad anim deserunt excepteur ea veniam eiusmod culpa velit veniam. Commodo incididunt ea Lorem eu enim esse nisi incididunt mollit.\r\n",
- "Velit proident sunt aute dolore reprehenderit culpa. Pariatur reprehenderit commodo ad ea voluptate anim nulla ipsum eu irure fugiat aliqua et. Adipisicing incididunt anim excepteur voluptate minim qui culpa. Sunt veniam enim reprehenderit magna magna. Sit ad amet deserunt ut aute dolore ad minim.\r\n",
- "Esse ullamco sunt mollit mollit. Eu enim dolore laboris cupidatat. Cupidatat adipisicing non aute exercitation fugiat. Non ut cillum labore fugiat aliquip ex duis quis consectetur ut nisi Lorem amet qui. Proident veniam amet qui reprehenderit duis qui. Nisi culpa sit occaecat ullamco occaecat laborum fugiat ut. Non duis deserunt culpa duis.\r\n",
- "Id ipsum eiusmod laboris non est ipsum deserunt labore duis reprehenderit deserunt. Sint tempor fugiat eiusmod nostrud in ut laborum esse in nostrud sit deserunt nostrud reprehenderit. Cupidatat aliqua qui anim consequat eu quis consequat consequat elit ipsum pariatur. Cupidatat in dolore velit quis. Exercitation cillum ullamco ex consectetur commodo tempor incididunt exercitation labore ad dolore. Minim incididunt consequat adipisicing esse eu eu voluptate.\r\n",
- "Anim sint eiusmod nisi anim do deserunt voluptate ut cillum eiusmod esse ex reprehenderit laborum. Dolore nulla excepteur duis excepteur. Magna nisi nostrud duis non commodo velit esse ipsum Lorem incididunt. Nulla enim consequat ad aliqua. Incididunt irure culpa nostrud ea aute ex sit non ad esse.\r\n",
- "Ullamco nostrud cupidatat adipisicing anim fugiat mollit eu. Et ut eu in nulla consequat. Sunt do pariatur culpa non est.\r\n",
- "Pariatur incididunt reprehenderit non qui excepteur cillum exercitation nisi occaecat ad. Lorem aliquip laborum commodo reprehenderit sint. Laboris qui ut veniam magna quis et et ullamco voluptate. Tempor reprehenderit deserunt consequat nisi. Esse duis sint in tempor. Amet aute cupidatat in sint et.\r\n",
- "Est officia nisi dolore consequat irure et excepteur. Sit qui elit tempor magna qui cillum anim amet proident exercitation proident. Eu cupidatat laborum consectetur duis ullamco irure nulla. Adipisicing culpa non reprehenderit anim aute.\r\n",
- "Eu est laborum culpa velit dolore non sunt. Tempor magna veniam ea sit non qui Lorem qui exercitation aliqua aliqua et excepteur eiusmod. Culpa aute anim proident culpa adipisicing duis tempor elit aliquip elit nulla laboris esse dolore. Sit adipisicing non dolor eiusmod occaecat cupidatat.\r\n",
- "Culpa velit eu esse sunt. Laborum irure aliqua reprehenderit velit ipsum fugiat officia dolor ut aute officia deserunt. Ipsum sit quis fugiat nostrud aliqua cupidatat ex pariatur et. Cillum proident est irure nisi dolor aliqua deserunt esse occaecat velit dolor.\r\n",
- "Exercitation nulla officia sit eiusmod cillum eu incididunt officia exercitation qui Lorem deserunt. Voluptate Lorem minim commodo laborum esse in duis excepteur do duis aliquip nisi voluptate consectetur. Amet tempor officia enim ex esse minim reprehenderit.\r\n",
- "Laboris sint deserunt ad aute incididunt. Anim officia sunt elit qui laborum labore commodo irure non. Mollit adipisicing ullamco do aute nulla eu laborum et quis sint aute adipisicing amet. Aliqua officia irure nostrud duis ex.\r\n",
- "Eiusmod ipsum aliqua reprehenderit esse est non aute id veniam eiusmod. Elit consequat ad sit tempor elit eu incididunt quis irure ad. Eu incididunt veniam consequat Lorem nostrud cillum officia ea consequat ad cillum. Non nisi irure cupidatat incididunt pariatur incididunt. Duis velit officia ad cillum qui. Aliquip consequat sint aute nisi cillum. Officia commodo nisi incididunt laborum nisi voluptate aliquip Lorem cupidatat anim consequat sit laboris.\r\n",
- "Veniam cupidatat et incididunt mollit do ex voluptate veniam nostrud labore esse. Eiusmod irure sint fugiat esse. Aute irure consectetur ut mollit nulla sint esse. Lorem ut quis ex proident nostrud mollit nostrud ea duis duis in magna anim consectetur.\r\n",
- "Irure culpa esse qui do dolor fugiat veniam ad. Elit commodo aute elit magna incididunt tempor pariatur velit irure pariatur cillum et ea ad. Ad consequat ea et ad minim ut sunt qui commodo voluptate. Laboris est aliquip anim reprehenderit eu officia et exercitation. Occaecat laboris cupidatat Lorem ullamco in nostrud commodo ipsum in quis esse ex.\r\n",
- "Incididunt officia quis voluptate eiusmod esse nisi ipsum quis commodo. Eiusmod dolore tempor occaecat sit exercitation aliqua minim consequat minim mollit qui ad nisi. Aute quis irure adipisicing veniam nisi nisi velit deserunt incididunt anim nostrud.\r\n",
- "Voluptate exercitation exercitation id minim excepteur excepteur mollit. Fugiat aute proident nulla ullamco ea. Nisi ea culpa duis dolore veniam anim tempor officia in dolore exercitation exercitation. Dolore quis cillum adipisicing sunt do nulla esse proident ad sint.\r\n",
- "Laborum ut mollit sint commodo nulla laborum deserunt Lorem magna commodo mollit tempor deserunt ut. Qui aliquip commodo ea id. Consectetur dolor fugiat dolor excepteur eiusmod. Eu excepteur ex aute ex ex elit ex esse officia cillum exercitation. Duis ut labore ea nostrud excepteur. Reprehenderit labore aute sunt nisi quis Lorem officia. Ad aliquip cupidatat voluptate exercitation voluptate ad irure magna quis.\r\n",
- "Tempor velit veniam sit labore elit minim do elit cillum eiusmod sunt excepteur nisi. Aliquip est deserunt excepteur duis fugiat incididunt veniam fugiat. Pariatur sit irure labore et minim non. Cillum quis aute anim sint laboris laboris ullamco exercitation nostrud. Nulla pariatur id laborum minim nisi est adipisicing irure.\r\n",
- "Irure exercitation laboris nostrud in do consectetur ad. Magna aliqua Lorem culpa exercitation sint do culpa incididunt mollit eu exercitation. Elit tempor Lorem dolore enim deserunt. Anim et ullamco sint ullamco mollit cillum officia et. Proident incididunt laboris aliquip laborum sint veniam deserunt eu consequat deserunt voluptate laboris. Anim Lorem non laborum exercitation voluptate. Cupidatat reprehenderit culpa Lorem fugiat enim minim consectetur tempor quis ad reprehenderit laboris irure.\r\n",
- "Deserunt elit mollit nostrud occaecat labore reprehenderit laboris ex. Esse reprehenderit adipisicing cillum minim in esse aliquip excepteur ex et nisi cillum quis. Cillum labore ut ex sunt. Occaecat proident et mollit magna consequat irure esse. Dolor do enim esse nisi ad.\r\n",
- "Pariatur est anim cillum minim elit magna adipisicing quis tempor proident nisi laboris incididunt cupidatat. Nulla est adipisicing sit adipisicing id nostrud amet qui consequat eiusmod tempor voluptate ad. Adipisicing non magna sit occaecat magna mollit ad ex nulla velit ea pariatur. Irure labore ad ea exercitation ex cillum.\r\n",
- "Lorem fugiat eu eu cillum nulla tempor sint. Lorem id officia nulla velit labore ut duis ad tempor non. Excepteur quis aute adipisicing nisi nisi consectetur aliquip enim Lorem id ullamco cillum sint voluptate. Qui aliquip incididunt tempor aliqua voluptate labore reprehenderit. Veniam eiusmod elit occaecat voluptate tempor culpa consectetur ea ut exercitation eiusmod exercitation qui.\r\n",
- "Aliqua esse pariatur nulla veniam velit ea. Aliquip consectetur tempor ex magna sit aliquip exercitation veniam. Dolor ullamco minim commodo pariatur. Et amet reprehenderit dolore proident elit tempor eiusmod eu incididunt enim ullamco. Adipisicing id officia incididunt esse dolor sunt cupidatat do deserunt mollit do non. Magna ut officia fugiat adipisicing quis ea cillum laborum dolore ad nostrud magna minim est. Dolor voluptate officia proident enim ea deserunt eu voluptate dolore proident laborum officia ea.\r\n",
- "Culpa aute consequat esse fugiat cupidatat minim voluptate voluptate eiusmod irure anim elit. Do eiusmod culpa laboris consequat incididunt minim nostrud eiusmod commodo velit ea ullamco proident. Culpa pariatur magna ut mollit nisi. Ea officia do magna deserunt minim nisi tempor ea deserunt veniam cillum exercitation esse.\r\n",
- "Anim ullamco nostrud commodo Lorem. Do sunt laborum exercitation proident proident magna. Lorem officia laborum laborum dolor sunt duis commodo Lorem. Officia aute adipisicing ea cupidatat ea dolore. Aliquip adipisicing pariatur consectetur aliqua sit amet officia reprehenderit laborum culpa. Occaecat Lorem eu nisi do Lorem occaecat enim eiusmod laboris id quis. Ad mollit adipisicing sunt adipisicing esse.\r\n",
- "Laborum quis sit adipisicing cupidatat. Veniam Lorem eiusmod esse esse sint nisi labore elit et. Deserunt aliqua mollit ut commodo aliqua non incididunt ipsum reprehenderit consectetur. Eiusmod nulla minim laboris Lorem ea Lorem aute tempor pariatur in sit. Incididunt culpa ut do irure amet irure cupidatat est anim anim culpa occaecat. Est velit consectetur eiusmod veniam reprehenderit officia sunt occaecat eiusmod ut sunt occaecat amet.\r\n",
- "Elit minim aute fugiat nulla ex quis. Labore fugiat sint nostrud amet quis culpa excepteur in. Consectetur exercitation cupidatat laborum sit. Aute nisi eu aliqua est deserunt eiusmod commodo dolor id. Mollit laborum esse sint ipsum voluptate reprehenderit velit et. Veniam aliquip enim in veniam Lorem voluptate quis deserunt consequat qui commodo ut excepteur aute.\r\n",
- "Dolore deserunt veniam aute nisi labore sunt et voluptate irure nisi anim ea. Magna nisi quis anim mollit nisi est dolor do ex aliquip elit aliquip ipsum minim. Dolore est officia nostrud eiusmod ex laborum ea amet est. Officia culpa non est et tempor consectetur exercitation tempor eiusmod enim. Ea tempor laboris qui amet ex nisi culpa dolore consectetur incididunt sunt sunt. Lorem aliquip incididunt magna do et ullamco ex elit aliqua eiusmod qui. Commodo amet dolor sint incididunt ex veniam non Lorem fugiat.\r\n",
- "Officia culpa enim voluptate dolore commodo. Minim commodo aliqua minim ex sint excepteur cupidatat adipisicing eu irure. Anim magna deserunt anim Lorem non.\r\n",
- "Cupidatat aliquip nulla excepteur sunt cupidatat cupidatat laborum cupidatat exercitation. Laboris minim ex cupidatat culpa elit. Amet enim reprehenderit aliqua laborum est tempor exercitation cupidatat ex dolore do. Do incididunt labore fugiat commodo consectetur nisi incididunt irure sit culpa sit. Elit aute occaecat qui excepteur velit proident cillum qui aliqua ex do ex. Dolore irure ex excepteur veniam id proident mollit Lorem.\r\n",
- "Ad commodo cillum duis deserunt elit officia consectetur veniam eiusmod. Reprehenderit et veniam ad commodo reprehenderit magna elit laboris sunt non quis. Adipisicing dolor aute proident ea magna sunt et proident in consectetur.\r\n",
- "Veniam exercitation esse esse veniam est nisi. Minim velit incididunt sint aute dolor anim. Fugiat cupidatat id ad nisi in voluptate dolor culpa eiusmod magna eiusmod amet id. Duis aliquip labore et ex amet amet aliquip laborum eiusmod ipsum. Quis qui ut duis duis. Minim in voluptate reprehenderit aliqua.\r\n",
- "Elit ut pariatur dolor veniam ipsum consequat. Voluptate Lorem mollit et esse dolore mollit Lorem ad. Elit nostrud eu Lorem labore mollit minim cupidatat officia quis minim dolore incididunt. In cillum aute cillum ut.\r\n",
- "Commodo laborum deserunt ut cupidatat pariatur ullamco in esse anim exercitation cillum duis. Consectetur incididunt sit esse Lorem in aute. Eiusmod mollit Lorem consequat minim reprehenderit laborum enim excepteur irure nisi elit. Laborum esse proident aute aute proident adipisicing laborum. Pariatur tempor duis incididunt qui velit pariatur ut officia ea mollit labore dolore. Cillum pariatur minim ullamco sunt incididunt culpa id ullamco exercitation consectetur. Ea exercitation consequat reprehenderit ut ullamco velit eu ad velit magna excepteur eiusmod.\r\n",
- "Eu deserunt magna laboris laborum laborum in consequat dolore. Officia proident consectetur proident do occaecat minim pariatur officia ipsum sit non velit officia cillum. Laborum excepteur labore eu minim eiusmod. Sit anim dolore cillum ad do minim culpa sit est ad.\r\n",
- "Cupidatat dolor nostrud Lorem sint consequat quis. Quis labore sint incididunt officia tempor. Fugiat nostrud in elit reprehenderit dolor. Nisi sit enim officia minim est adipisicing nulla aute labore nulla nostrud cupidatat est. Deserunt dolore qui irure Lorem esse voluptate velit qui nostrud.\r\n",
- "Fugiat Lorem amet nulla nisi qui amet laboris enim cillum. Dolore occaecat exercitation id labore velit do commodo ut cupidatat laborum velit fugiat mollit. Ut et aliqua pariatur occaecat. Lorem occaecat dolore quis esse enim cupidatat exercitation ut tempor sit laboris fugiat adipisicing. Est tempor ex irure consectetur ipsum magna labore. Lorem non quis qui minim nisi magna amet aliquip ex cillum fugiat tempor.\r\n",
- "Aliquip eiusmod laborum ipsum deserunt velit esse do magna excepteur consectetur exercitation sit. Minim ullamco reprehenderit commodo nostrud exercitation id irure ex qui ullamco sit esse laboris. Nulla cillum non minim qui cillum nisi aute proident. Dolor anim culpa elit quis excepteur aliqua eiusmod. Elit ea est excepteur consectetur sunt eiusmod enim id commodo irure amet et pariatur laboris. Voluptate magna ad magna dolore cillum cillum irure laboris ipsum officia id Lorem veniam.\r\n",
- "Esse sunt elit est aliquip cupidatat commodo deserunt. Deserunt pariatur ipsum qui ad esse esse magna qui cillum laborum. Exercitation veniam pariatur elit amet enim.\r\n",
- "Esse quis in id elit nulla occaecat incididunt. Et amet Lorem mollit in veniam do. Velit mollit Lorem consequat commodo Lorem aliquip cupidatat. Minim consequat nostrud nulla in nostrud.\r\n",
- "Cillum nulla et eu est nostrud quis elit cupidatat dolor enim excepteur exercitation nisi voluptate. Nulla dolore non ex velit et qui tempor proident id deserunt nisi eu. Tempor ad Lorem ipsum reprehenderit in anim. Anim dolore ullamco enim deserunt quis ex id exercitation velit. Magna exercitation fugiat mollit pariatur ipsum ex consectetur nostrud. Id dolore officia nostrud excepteur laborum. Magna incididunt elit ipsum pariatur adipisicing enim duis est qui commodo velit aute.\r\n",
- "Quis esse ex qui nisi dolor. Ullamco laborum dolor esse laboris eiusmod ea magna laboris ea esse ut. Dolore ipsum pariatur veniam sint mollit. Lorem ea proident fugiat ullamco ut nisi culpa eu exercitation exercitation aliquip veniam laborum consectetur.\r\n",
- "Pariatur veniam laboris sit aliquip pariatur tempor aute sunt id et ut. Laboris excepteur eiusmod nisi qui quis elit enim ut cupidatat. Et et laborum in fugiat veniam consectetur ipsum laboris duis excepteur ullamco aliqua dolor Lorem. Aliqua ex amet sint anim cupidatat nisi ipsum anim et sunt deserunt. Occaecat culpa ut tempor cillum pariatur ex tempor.\r\n",
- "Dolor deserunt eiusmod magna do officia voluptate excepteur est cupidatat. Veniam qui cupidatat amet anim est qui consectetur sit commodo commodo ea ad. Enim ad adipisicing qui nostrud. Non nulla esse ullamco nulla et ex.\r\n",
- "Id ullamco ea consectetur est incididunt deserunt et esse. Elit nostrud voluptate eiusmod ut. Excepteur adipisicing qui cupidatat consequat labore id. Qui dolor aliqua do dolore do cupidatat labore ex consectetur ea sit cillum. Sint veniam eiusmod in consectetur consequat fugiat et mollit ut fugiat esse dolor adipisicing.\r\n",
- "Ea magna proident labore duis pariatur. Esse cillum aliquip dolor duis fugiat ea ex officia ea irure. Sint elit nisi pariatur sunt nostrud exercitation ullamco culpa magna do.\r\n",
- "Minim aliqua voluptate dolor consequat sint tempor deserunt amet magna excepteur. Irure do voluptate magna velit. Nostrud in reprehenderit magna officia nostrud. Cupidatat nulla irure laboris non fugiat ex ex est cupidatat excepteur officia aute velit duis. Sit voluptate id ea exercitation deserunt culpa voluptate nostrud est adipisicing incididunt. Amet proident laborum commodo magna ipsum quis.\r\n",
- "Ipsum consectetur consectetur excepteur tempor eiusmod ea fugiat aute velit magna in officia sunt. Sit ut sunt dolore cupidatat dolor adipisicing. Veniam nisi adipisicing esse reprehenderit amet aliqua voluptate ex commodo occaecat est voluptate mollit sunt. Pariatur aliqua qui qui in dolor. Fugiat reprehenderit sit nostrud do sint esse. Tempor sit irure adipisicing ea pariatur duis est sit est incididunt laboris quis do. Et voluptate anim minim aliquip excepteur consequat nisi anim pariatur aliquip ut ipsum dolor magna.\r\n",
- "Cillum sit labore excepteur magna id aliqua exercitation consequat laborum Lorem id pariatur nostrud. Lorem qui est labore sint cupidatat sint excepteur nulla in eu aliqua et. Adipisicing velit do enim occaecat laboris quis excepteur ipsum dolor occaecat Lorem dolore id exercitation.\r\n",
- "Incididunt in laborum reprehenderit eiusmod irure ex. Elit duis consequat minim magna. Esse consectetur aliquip cillum excepteur excepteur fugiat. Sint tempor consequat minim reprehenderit consectetur adipisicing dolor id Lorem elit non. Occaecat esse quis mollit ea et sint aute fugiat qui tempor. Adipisicing tempor duis non dolore irure elit deserunt qui do.\r\n",
- "Labore fugiat eiusmod sint laborum sit duis occaecat. Magna in laborum non cillum excepteur nostrud sit proident pariatur voluptate voluptate adipisicing exercitation occaecat. Ad non dolor aute ex sint do do minim exercitation veniam laborum irure magna ea. Magna do non quis sit consequat Lorem aliquip.\r\n",
- "Velit anim do laborum laboris laborum Lorem. Sunt do Lorem amet ipsum est sint velit sit do voluptate mollit veniam enim. Commodo do deserunt in pariatur ut elit sint elit deserunt ea. Ad dolor anim consequat aliquip ut mollit nostrud tempor sunt mollit elit. Reprehenderit laboris labore excepteur occaecat veniam adipisicing cupidatat esse. Ad enim aliquip ea minim excepteur magna. Sint velit veniam pariatur qui dolor est adipisicing ex laboris.\r\n",
- "Ea cupidatat ex nulla in sunt est sit dolor enim ad. Eu tempor consequat cupidatat consequat ex incididunt sint culpa. Est Lorem Lorem non cupidatat sunt ut aliqua non nostrud do ullamco. Reprehenderit ad ad nulla nostrud do nulla in. Ipsum adipisicing commodo mollit ipsum exercitation. Aliqua ea anim anim est elit. Ea incididunt consequat minim ad sunt eu cillum.\r\n",
- "Tempor quis excepteur eiusmod cupidatat ipsum occaecat id et occaecat. Eiusmod magna aliquip excepteur id amet elit. Ullamco dolore amet anim dolor enim ea magna magna elit. Occaecat magna pariatur in deserunt consectetur officia aliquip ullamco ex aute anim. Minim laborum eu sit elit officia esse do irure pariatur tempor et reprehenderit ullamco labore.\r\n",
- "Sit tempor eu minim dolore velit pariatur magna duis reprehenderit ea nulla in. Amet est do consectetur commodo do adipisicing adipisicing in amet. Cillum id ut commodo do pariatur duis aliqua nisi sint ad irure officia reprehenderit. Mollit labore id enim fugiat ullamco irure mollit cupidatat. Quis nisi amet labore eu dolor occaecat commodo aliqua laboris deserunt excepteur deserunt officia. Aliqua non ut sit ad. Laborum veniam ad velit minim dolore ea id magna dolor qui in.\r\n",
- "Dolore nostrud ipsum aliqua pariatur id reprehenderit enim ad eiusmod qui. Deserunt anim commodo pariatur excepteur velit eu irure nulla ex labore ipsum aliqua minim aute. Id consequat amet tempor aliquip ex elit adipisicing est do. Eu enim Lorem consectetur minim id irure nulla culpa. Consectetur do consequat aute tempor anim. Qui ad non elit dolor est adipisicing nisi amet cillum sunt quis anim laboris incididunt. Incididunt proident adipisicing labore Lorem.\r\n",
- "Et reprehenderit ea officia veniam. Aliquip ullamco consequat elit nisi magna mollit id elit. Amet amet sint velit labore ad nisi. Consectetur tempor id dolor aliqua esse deserunt amet. Qui laborum enim proident voluptate aute eu aute aute sit sit incididunt eu. Sunt ullamco nisi nostrud labore commodo non consectetur quis do duis minim irure. Tempor sint dolor sint aliquip dolore nostrud fugiat.\r\n",
- "Aute ullamco quis nisi ut excepteur nostrud duis elit. Veniam ex ad incididunt veniam voluptate. Commodo dolore ullamco sit sint adipisicing proident amet aute duis deserunt.\r\n",
- "Labore velit eu cillum nisi. Laboris do cupidatat et non duis cillum. Ullamco dolor tempor cupidatat voluptate laborum ullamco ea duis.\r\n",
- "Deserunt consequat aliqua duis aliquip nostrud nostrud dolore nisi. Culpa do sint laborum consectetur ipsum quis laborum laborum pariatur eiusmod. Consectetur laboris ad ad ut quis. Ullamco laboris qui velit id laborum voluptate qui aute nostrud aliquip ea.\r\n",
- "Ad cillum anim ex est consectetur mollit id in. Non enim aliquip consequat qui deserunt commodo cillum ad laborum fugiat. Dolor deserunt amet laborum tempor adipisicing voluptate dolor pariatur dolor cillum. Eu mollit ex sunt officia veniam qui est sunt proident. Non aliqua qui elit eu cupidatat ex enim ex proident. Lorem sit minim ullamco officia cupidatat duis minim. Exercitation laborum deserunt voluptate culpa tempor quis nulla id pariatur.\r\n",
- "Nostrud quis consectetur ut aliqua excepteur elit consectetur occaecat. Occaecat voluptate Lorem pariatur consequat ullamco fugiat minim. Anim voluptate eu eu cillum tempor dolore aliquip aliqua. Fugiat incididunt ut tempor amet minim. Voluptate nostrud minim pariatur non excepteur ullamco.\r\n",
- "Dolore nulla velit officia exercitation irure laboris incididunt anim in laborum in fugiat ut proident. Fugiat aute id consequat fugiat officia ut. Labore sint amet proident amet sint nisi laboris amet id ullamco culpa quis consequat proident. Magna do fugiat veniam dolore elit irure minim. Esse ullamco excepteur labore tempor labore fugiat dolore nisi cupidatat irure dolor pariatur. Magna excepteur laboris nisi eiusmod sit pariatur mollit.\r\n",
- "In enim aliquip officia ea ad exercitation cillum culpa occaecat dolore Lorem. Irure cillum commodo adipisicing sunt pariatur ea duis fugiat exercitation laboris culpa ullamco aute. Ut voluptate exercitation qui dolor. Irure et duis elit consequat deserunt proident.\r\n",
- "Officia ea Lorem sunt culpa id et tempor excepteur enim deserunt proident. Dolore aliquip dolor laboris cillum proident velit. Et culpa occaecat exercitation cupidatat irure sint adipisicing excepteur pariatur incididunt ad occaecat. Qui proident ipsum cillum minim. Quis ut culpa irure aliqua minim fugiat. In voluptate cupidatat fugiat est laborum dolor esse in pariatur voluptate.\r\n",
- "Voluptate enim ipsum officia aute ea adipisicing nisi ut ex do aliquip amet. Reprehenderit enim voluptate tempor ex adipisicing culpa. Culpa occaecat voluptate dolor mollit ipsum exercitation labore et tempor sit ea consectetur aliqua. Elit elit sit minim ea ea commodo do tempor cupidatat irure dolore. Occaecat esse adipisicing anim eiusmod commodo fugiat mollit amet. Incididunt tempor tempor qui occaecat cupidatat in.\r\n",
- "Ut qui anim velit enim aliquip do ut nulla labore. Mollit ut commodo ut eiusmod consectetur laboris aliqua qui voluptate culpa fugiat incididunt elit. Lorem ullamco esse elit elit. Labore amet incididunt ea nulla aliquip eiusmod. Sit nulla est voluptate officia ipsum aute aute cillum tempor deserunt. Laboris commodo eiusmod labore sunt aute excepteur ea consectetur reprehenderit veniam nisi. Culpa nisi sint sunt sint tempor laboris dolore cupidatat.\r\n",
- "Duis cillum qui nisi duis amet velit ad cillum ut elit aute sint ad. Amet laboris pariatur excepteur ipsum Lorem aliqua veniam Lorem quis mollit cupidatat aliqua exercitation. Pariatur ex ullamco sit commodo cillum eiusmod ut proident elit cillum. Commodo ut ipsum excepteur occaecat sint elit consequat ex dolor adipisicing consectetur id ut ad. Velit sit eiusmod est esse tempor incididunt consectetur eiusmod duis commodo veniam.\r\n",
- "Ut sunt qui officia anim laboris exercitation Lorem quis laborum do eiusmod officia. Enim consectetur occaecat fugiat cillum cillum. Dolore dolore nostrud in commodo fugiat mollit consequat occaecat non et et elit ullamco. Sit voluptate minim ut est culpa velit nulla fugiat reprehenderit eu aliquip adipisicing labore. Sit minim minim do dolor dolor. Lorem Lorem labore exercitation magna veniam eiusmod do.\r\n",
- "Fugiat dolor adipisicing quis aliquip aute dolore. Qui proident anim elit veniam ex aliquip eiusmod ipsum sunt pariatur est. Non fugiat duis do est officia adipisicing.\r\n",
- "Nulla deserunt do laboris cupidatat veniam do consectetur ipsum elit veniam in mollit eu. Ea in consequat cupidatat laboris sint fugiat irure. In commodo esse reprehenderit deserunt minim velit ullamco enim eu cupidatat tempor ex. Ullamco in non id culpa amet occaecat culpa nostrud id. Non occaecat culpa magna incididunt.\r\n",
- "Enim laboris ex mollit reprehenderit eiusmod exercitation magna. Exercitation Lorem ex mollit non non culpa labore enim. Adipisicing labore dolore incididunt do amet aliquip excepteur ad et nostrud officia aute veniam voluptate. Fugiat enim eiusmod Lorem esse. Minim ullamco commodo consequat ex commodo aliqua eu nulla eu. Veniam non enim nulla ut Lorem nostrud minim sint duis.\r\n",
- "Enim duis consectetur in ullamco cillum veniam nulla amet. Exercitation nisi sunt sunt duis in culpa nisi magna ex id ipsum laboris reprehenderit qui. Officia pariatur qui ex fugiat veniam et sunt sit nostrud. Veniam ullamco tempor fugiat minim Lorem proident velit in eiusmod elit. Enim minim excepteur aute aliquip ex magna commodo dolore qui et labore. Proident eu aliquip cillum dolor. Nostrud ipsum ut irure consequat fugiat nulla proident occaecat laborum.\r\n",
- "Amet duis eiusmod sunt adipisicing esse ex nostrud consectetur voluptate cillum. Ipsum occaecat sit et anim velit irure ea incididunt cupidatat ullamco in nisi quis. Esse officia ipsum commodo qui quis qui do. Commodo aliquip amet aute sit sit ut cupidatat elit nostrud.\r\n",
- "Laboris laboris sit mollit cillum nulla deserunt commodo culpa est commodo anim id anim sit. Officia id consectetur velit incididunt est dolor sunt ipsum magna aliqua consectetur. Eiusmod pariatur minim deserunt cupidatat veniam Lorem aliquip sunt proident eu Lorem sit dolor fugiat. Proident qui ut ex in incididunt nulla nulla dolor ex laboris ea ad.\r\n",
- "Ex incididunt enim labore nulla cupidatat elit. Quis ut incididunt incididunt non irure commodo do mollit cillum anim excepteur. Qui consequat laborum dolore elit tempor aute ut nulla pariatur eu ullamco veniam. Nisi non velit labore in commodo excepteur culpa nulla tempor cillum. Ipsum qui sit sint reprehenderit ut labore incididunt dolor aliquip sunt. Reprehenderit occaecat tempor nisi laborum.\r\n",
- "Lorem officia ullamco eu occaecat in magna eiusmod consectetur nisi aliqua mollit esse. Ullamco ex aute nostrud pariatur do enim cillum sint do fugiat nostrud culpa tempor. Do aliquip excepteur nostrud culpa eu pariatur eiusmod cillum excepteur do. Est sunt non quis cillum voluptate ex.\r\n",
- "Deserunt consectetur tempor irure mollit qui tempor et. Labore enim eu irure laboris in. Nisi in tempor ex occaecat amet cupidatat laboris occaecat amet minim ut magna incididunt id. Consequat cillum laborum commodo mollit. Et magna culpa sunt dolore consequat laboris et sit. Deserunt qui voluptate excepteur dolor. Eu qui amet est proident.\r\n",
- "Eu elit minim eiusmod occaecat eu nostrud dolor qui ut elit. Sunt dolore proident ea eu do eiusmod fugiat incididunt pariatur duis amet Lorem nisi ut. Adipisicing quis veniam cupidatat Lorem sint culpa sunt veniam sint. Excepteur eu exercitation est magna pariatur veniam dolore qui fugiat labore proident eiusmod cillum. Commodo reprehenderit elit proident duis sint magna.\r\n",
- "Ut aliquip pariatur deserunt nostrud commodo ad proident est exercitation. Sit minim do ea enim sint officia nisi incididunt laborum. Ex amet duis commodo fugiat. Ut aute tempor deserunt irure occaecat aliquip voluptate cillum aute elit qui nostrud.\r\n",
- "Irure et quis consectetur sit est do sunt aliquip eu. Cupidatat pariatur consequat dolore consectetur. Adipisicing magna velit mollit occaecat do id. Nisi pariatur cupidatat cillum incididunt excepteur consectetur excepteur do laborum deserunt irure pariatur cillum.\r\n",
- "Adipisicing esse incididunt cillum est irure consequat irure ad aute voluptate. Incididunt do occaecat nostrud do ipsum pariatur Lorem qui laboris et pariatur. Est exercitation dolor culpa ad velit ut et.\r\n",
- "Sit eiusmod id enim ad ex dolor pariatur do. Ullamco occaecat quis dolor minim non elit labore amet est. Commodo velit eu nulla eiusmod ullamco. Incididunt anim pariatur aute eiusmod veniam tempor enim officia elit id. Elit Lorem est commodo dolore nostrud. Labore et consectetur do exercitation veniam laboris incididunt aliqua proident dolore ea officia cupidatat. Velit laboris aliquip deserunt labore commodo.\r\n",
- "Proident nostrud labore eu nostrud. Excepteur ut in velit labore ea proident labore ea sint cillum. Incididunt ipsum consectetur officia irure sit pariatur veniam id velit officia mollit. Adipisicing magna voluptate velit excepteur enim consectetur incididunt voluptate tempor occaecat fugiat velit excepteur labore. Do do incididunt qui nisi voluptate enim. Laboris aute sit voluptate cillum pariatur minim excepteur ullamco mollit deserunt.\r\n",
- "Excepteur laborum adipisicing nisi elit fugiat tempor. Elit laboris qui enim labore duis. Proident tempor in consectetur proident excepteur do ex laboris sit.\r\n",
- "Dolore do ea incididunt do duis dolore eu labore nisi cupidatat voluptate amet incididunt minim. Nulla pariatur mollit cupidatat adipisicing nulla et. Dolor aliquip in ex magna excepteur. Nulla consequat minim consequat ullamco dolor laboris ullamco eu reprehenderit duis nostrud pariatur.\r\n",
- "Id nisi labore duis qui. Incididunt laboris tempor aute do sit. Occaecat excepteur est mollit ea in mollit ullamco est amet reprehenderit.\r\n",
- "Aute labore ipsum velit non voluptate eiusmod et reprehenderit cupidatat occaecat. Lorem tempor tempor consectetur exercitation qui nostrud sunt cillum quis ut non dolore. Reprehenderit consequat reprehenderit laborum qui pariatur anim et officia est cupidatat enim velit velit.\r\n",
- "Commodo ex et fugiat cupidatat non adipisicing commodo. Minim ad dolore fugiat mollit cupidatat aliqua sunt dolor sit. Labore esse labore velit aute enim. Nulla duis incididunt est aliquip consectetur elit qui incididunt minim minim labore amet sit cillum.\r\n"
-] \ No newline at end of file
diff --git a/3rdparty/rapidjson/bin/types/readme.txt b/3rdparty/rapidjson/bin/types/readme.txt
deleted file mode 100644
index da1dae675e9..00000000000
--- a/3rdparty/rapidjson/bin/types/readme.txt
+++ /dev/null
@@ -1 +0,0 @@
-Test data obtained from https://github.com/xpol/lua-rapidjson/tree/master/performance
diff --git a/3rdparty/rapidjson/doc/CMakeLists.txt b/3rdparty/rapidjson/doc/CMakeLists.txt
deleted file mode 100644
index c1f165a37ad..00000000000
--- a/3rdparty/rapidjson/doc/CMakeLists.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-find_package(Doxygen)
-
-IF(NOT DOXYGEN_FOUND)
- MESSAGE(STATUS "No Doxygen found. Documentation won't be built")
-ELSE()
- file(GLOB SOURCES ${CMAKE_CURRENT_LIST_DIR}/../include/*)
- file(GLOB MARKDOWN_DOC ${CMAKE_CURRENT_LIST_DIR}/../doc/*.md)
- list(APPEND MARKDOWN_DOC ${CMAKE_CURRENT_LIST_DIR}/../readme.md)
-
- CONFIGURE_FILE(Doxyfile.in Doxyfile @ONLY)
- CONFIGURE_FILE(Doxyfile.zh-cn.in Doxyfile.zh-cn @ONLY)
-
- add_custom_command(OUTPUT html
- COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
- COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.zh-cn
- COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/html
- DEPENDS ${MARKDOWN_DOC} ${SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile*
- WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/../
- )
-
- add_custom_target(doc ALL DEPENDS html)
- install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html
- DESTINATION ${DOC_INSTALL_DIR}
- COMPONENT doc)
-ENDIF()
diff --git a/3rdparty/rapidjson/doc/Doxyfile.in b/3rdparty/rapidjson/doc/Doxyfile.in
deleted file mode 100644
index fcb09266097..00000000000
--- a/3rdparty/rapidjson/doc/Doxyfile.in
+++ /dev/null
@@ -1,2368 +0,0 @@
-# Doxyfile 1.8.7
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project.
-#
-# All text after a double hash (##) is considered a comment and is placed in
-# front of the TAG it is preceding.
-#
-# All text after a single hash (#) is considered a comment and will be ignored.
-# The format is:
-# TAG = value [value, ...]
-# For lists, items can also be appended using:
-# TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (\" \").
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all text
-# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
-# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
-# for the list of possible encodings.
-# The default value is: UTF-8.
-
-DOXYFILE_ENCODING = UTF-8
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
-# double-quotes, unless you are using Doxywizard) that should identify the
-# project for which the documentation is generated. This name is used in the
-# title of most generated pages and in a few other places.
-# The default value is: My Project.
-
-PROJECT_NAME = RapidJSON
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
-# could be handy for archiving the generated documentation or if some version
-# control system is used.
-
-PROJECT_NUMBER =
-
-# Using the PROJECT_BRIEF tag one can provide an optional one line description
-# for a project that appears at the top of each page and should give viewer a
-# quick idea about the purpose of the project. Keep the description short.
-
-PROJECT_BRIEF = "A fast JSON parser/generator for C++ with both SAX/DOM style API"
-
-# With the PROJECT_LOGO tag one can specify an logo or icon that is included in
-# the documentation. The maximum height of the logo should not exceed 55 pixels
-# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo
-# to the output directory.
-
-PROJECT_LOGO =
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
-# into which the generated documentation will be written. If a relative path is
-# entered, it will be relative to the location where doxygen was started. If
-# left blank the current directory will be used.
-
-OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-
-# directories (in 2 levels) under the output directory of each output format and
-# will distribute the generated files over these directories. Enabling this
-# option can be useful when feeding doxygen a huge amount of source files, where
-# putting all generated files in the same directory would otherwise causes
-# performance problems for the file system.
-# The default value is: NO.
-
-CREATE_SUBDIRS = NO
-
-# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
-# characters to appear in the names of generated files. If set to NO, non-ASCII
-# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode
-# U+3044.
-# The default value is: NO.
-
-ALLOW_UNICODE_NAMES = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
-# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
-# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
-# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
-# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
-# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
-# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
-# Ukrainian and Vietnamese.
-# The default value is: English.
-
-OUTPUT_LANGUAGE = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member
-# descriptions after the members that are listed in the file and class
-# documentation (similar to Javadoc). Set to NO to disable this.
-# The default value is: YES.
-
-BRIEF_MEMBER_DESC = YES
-
-# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief
-# description of a member or function before the detailed description
-#
-# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
-# brief descriptions will be completely suppressed.
-# The default value is: YES.
-
-REPEAT_BRIEF = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator that is
-# used to form the text in various listings. Each string in this list, if found
-# as the leading text of the brief description, will be stripped from the text
-# and the result, after processing the whole list, is used as the annotated
-# text. Otherwise, the brief description is used as-is. If left blank, the
-# following values are used ($name is automatically replaced with the name of
-# the entity):The $name class, The $name widget, The $name file, is, provides,
-# specifies, contains, represents, a, an and the.
-
-ABBREVIATE_BRIEF = "The $name class" \
- "The $name widget" \
- "The $name file" \
- is \
- provides \
- specifies \
- contains \
- represents \
- a \
- an \
- the
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# doxygen will generate a detailed section even if there is only a brief
-# description.
-# The default value is: NO.
-
-ALWAYS_DETAILED_SEC = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-# inherited members of a class in the documentation of that class as if those
-# members were ordinary class members. Constructors, destructors and assignment
-# operators of the base classes will not be shown.
-# The default value is: NO.
-
-INLINE_INHERITED_MEMB = NO
-
-# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path
-# before files name in the file list and in the header files. If set to NO the
-# shortest path that makes the file name unique will be used
-# The default value is: YES.
-
-FULL_PATH_NAMES = YES
-
-# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
-# Stripping is only done if one of the specified strings matches the left-hand
-# part of the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the path to
-# strip.
-#
-# Note that you can specify absolute paths here, but also relative paths, which
-# will be relative from the directory where doxygen is started.
-# This tag requires that the tag FULL_PATH_NAMES is set to YES.
-
-STRIP_FROM_PATH =
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
-# path mentioned in the documentation of a class, which tells the reader which
-# header file to include in order to use a class. If left blank only the name of
-# the header file containing the class definition is used. Otherwise one should
-# specify the list of include paths that are normally passed to the compiler
-# using the -I flag.
-
-STRIP_FROM_INC_PATH =
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
-# less readable) file names. This can be useful is your file systems doesn't
-# support long names like on DOS, Mac, or CD-ROM.
-# The default value is: NO.
-
-SHORT_NAMES = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
-# first line (until the first dot) of a Javadoc-style comment as the brief
-# description. If set to NO, the Javadoc-style will behave just like regular Qt-
-# style comments (thus requiring an explicit @brief command for a brief
-# description.)
-# The default value is: NO.
-
-JAVADOC_AUTOBRIEF = NO
-
-# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
-# line (until the first dot) of a Qt-style comment as the brief description. If
-# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
-# requiring an explicit \brief command for a brief description.)
-# The default value is: NO.
-
-QT_AUTOBRIEF = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
-# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
-# a brief description. This used to be the default behavior. The new default is
-# to treat a multi-line C++ comment block as a detailed description. Set this
-# tag to YES if you prefer the old behavior instead.
-#
-# Note that setting this tag to YES also means that rational rose comments are
-# not recognized any more.
-# The default value is: NO.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
-# documentation from any documented member that it re-implements.
-# The default value is: YES.
-
-INHERIT_DOCS = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a
-# new page for each member. If set to NO, the documentation of a member will be
-# part of the file/class/namespace that contains it.
-# The default value is: NO.
-
-SEPARATE_MEMBER_PAGES = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
-# uses this value to replace tabs by spaces in code fragments.
-# Minimum value: 1, maximum value: 16, default value: 4.
-
-TAB_SIZE = 4
-
-# This tag can be used to specify a number of aliases that act as commands in
-# the documentation. An alias has the form:
-# name=value
-# For example adding
-# "sideeffect=@par Side Effects:\n"
-# will allow you to put the command \sideeffect (or @sideeffect) in the
-# documentation, which will result in a user-defined paragraph with heading
-# "Side Effects:". You can put \n's in the value part of an alias to insert
-# newlines.
-
-ALIASES =
-
-# This tag can be used to specify a number of word-keyword mappings (TCL only).
-# A mapping has the form "name=value". For example adding "class=itcl::class"
-# will allow you to use the command class in the itcl::class meaning.
-
-TCL_SUBST =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
-# only. Doxygen will then generate output that is more tailored for C. For
-# instance, some of the names that are used will be different. The list of all
-# members will be omitted, etc.
-# The default value is: NO.
-
-OPTIMIZE_OUTPUT_FOR_C = NO
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
-# Python sources only. Doxygen will then generate output that is more tailored
-# for that language. For instance, namespaces will be presented as packages,
-# qualified scopes will look different, etc.
-# The default value is: NO.
-
-OPTIMIZE_OUTPUT_JAVA = NO
-
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
-# sources. Doxygen will then generate output that is tailored for Fortran.
-# The default value is: NO.
-
-OPTIMIZE_FOR_FORTRAN = NO
-
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
-# sources. Doxygen will then generate output that is tailored for VHDL.
-# The default value is: NO.
-
-OPTIMIZE_OUTPUT_VHDL = NO
-
-# Doxygen selects the parser to use depending on the extension of the files it
-# parses. With this tag you can assign which parser to use for a given
-# extension. Doxygen has a built-in mapping, but you can override or extend it
-# using this tag. The format is ext=language, where ext is a file extension, and
-# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
-# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
-# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
-# Fortran. In the later case the parser tries to guess whether the code is fixed
-# or free formatted code, this is the default for Fortran type files), VHDL. For
-# instance to make doxygen treat .inc files as Fortran files (default is PHP),
-# and .f files as C (default is Fortran), use: inc=Fortran f=C.
-#
-# Note For files without extension you can use no_extension as a placeholder.
-#
-# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
-# the files are not read by doxygen.
-
-EXTENSION_MAPPING =
-
-# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
-# according to the Markdown format, which allows for more readable
-# documentation. See http://daringfireball.net/projects/markdown/ for details.
-# The output of markdown processing is further processed by doxygen, so you can
-# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
-# case of backward compatibilities issues.
-# The default value is: YES.
-
-MARKDOWN_SUPPORT = YES
-
-# When enabled doxygen tries to link words that correspond to documented
-# classes, or namespaces to their corresponding documentation. Such a link can
-# be prevented in individual cases by by putting a % sign in front of the word
-# or globally by setting AUTOLINK_SUPPORT to NO.
-# The default value is: YES.
-
-AUTOLINK_SUPPORT = YES
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
-# to include (a tag file for) the STL sources as input, then you should set this
-# tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string);
-# versus func(std::string) {}). This also make the inheritance and collaboration
-# diagrams that involve STL classes more complete and accurate.
-# The default value is: NO.
-
-BUILTIN_STL_SUPPORT = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-# The default value is: NO.
-
-CPP_CLI_SUPPORT = NO
-
-# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
-# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
-# will parse them like normal C++ but will assume all classes use public instead
-# of private inheritance when no explicit protection keyword is present.
-# The default value is: NO.
-
-SIP_SUPPORT = NO
-
-# For Microsoft's IDL there are propget and propput attributes to indicate
-# getter and setter methods for a property. Setting this option to YES will make
-# doxygen to replace the get and set methods by a property in the documentation.
-# This will only work if the methods are indeed getting or setting a simple
-# type. If this is not the case, or you want to show the methods anyway, you
-# should set this option to NO.
-# The default value is: YES.
-
-IDL_PROPERTY_SUPPORT = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-# The default value is: NO.
-
-DISTRIBUTE_GROUP_DOC = NO
-
-# Set the SUBGROUPING tag to YES to allow class member groups of the same type
-# (for instance a group of public functions) to be put as a subgroup of that
-# type (e.g. under the Public Functions section). Set it to NO to prevent
-# subgrouping. Alternatively, this can be done per class using the
-# \nosubgrouping command.
-# The default value is: YES.
-
-SUBGROUPING = YES
-
-# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
-# are shown inside the group in which they are included (e.g. using \ingroup)
-# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
-# and RTF).
-#
-# Note that this feature does not work in combination with
-# SEPARATE_MEMBER_PAGES.
-# The default value is: NO.
-
-INLINE_GROUPED_CLASSES = YES
-
-# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
-# with only public data fields or simple typedef fields will be shown inline in
-# the documentation of the scope in which they are defined (i.e. file,
-# namespace, or group documentation), provided this scope is documented. If set
-# to NO, structs, classes, and unions are shown on a separate page (for HTML and
-# Man pages) or section (for LaTeX and RTF).
-# The default value is: NO.
-
-INLINE_SIMPLE_STRUCTS = NO
-
-# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
-# enum is documented as struct, union, or enum with the name of the typedef. So
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
-# with name TypeT. When disabled the typedef will appear as a member of a file,
-# namespace, or class. And the struct will be named TypeS. This can typically be
-# useful for C code in case the coding convention dictates that all compound
-# types are typedef'ed and only the typedef is referenced, never the tag name.
-# The default value is: NO.
-
-TYPEDEF_HIDES_STRUCT = NO
-
-# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
-# cache is used to resolve symbols given their name and scope. Since this can be
-# an expensive process and often the same symbol appears multiple times in the
-# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
-# doxygen will become slower. If the cache is too large, memory is wasted. The
-# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
-# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
-# symbols. At the end of a run doxygen will report the cache usage and suggest
-# the optimal cache size from a speed point of view.
-# Minimum value: 0, maximum value: 9, default value: 0.
-
-LOOKUP_CACHE_SIZE = 0
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available. Private
-# class members and static file members will be hidden unless the
-# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
-# Note: This will also disable the warnings about undocumented members that are
-# normally produced when WARNINGS is set to YES.
-# The default value is: NO.
-
-EXTRACT_ALL = NO
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will
-# be included in the documentation.
-# The default value is: NO.
-
-EXTRACT_PRIVATE = NO
-
-# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
-# scope will be included in the documentation.
-# The default value is: NO.
-
-EXTRACT_PACKAGE = NO
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file will be
-# included in the documentation.
-# The default value is: NO.
-
-EXTRACT_STATIC = NO
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined
-# locally in source files will be included in the documentation. If set to NO
-# only classes defined in header files are included. Does not have any effect
-# for Java sources.
-# The default value is: YES.
-
-EXTRACT_LOCAL_CLASSES = YES
-
-# This flag is only useful for Objective-C code. When set to YES local methods,
-# which are defined in the implementation section but not in the interface are
-# included in the documentation. If set to NO only methods in the interface are
-# included.
-# The default value is: NO.
-
-EXTRACT_LOCAL_METHODS = NO
-
-# If this flag is set to YES, the members of anonymous namespaces will be
-# extracted and appear in the documentation as a namespace called
-# 'anonymous_namespace{file}', where file will be replaced with the base name of
-# the file that contains the anonymous namespace. By default anonymous namespace
-# are hidden.
-# The default value is: NO.
-
-EXTRACT_ANON_NSPACES = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
-# undocumented members inside documented classes or files. If set to NO these
-# members will be included in the various overviews, but no documentation
-# section is generated. This option has no effect if EXTRACT_ALL is enabled.
-# The default value is: NO.
-
-HIDE_UNDOC_MEMBERS = NO
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy. If set
-# to NO these classes will be included in the various overviews. This option has
-# no effect if EXTRACT_ALL is enabled.
-# The default value is: NO.
-
-HIDE_UNDOC_CLASSES = NO
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
-# (class|struct|union) declarations. If set to NO these declarations will be
-# included in the documentation.
-# The default value is: NO.
-
-HIDE_FRIEND_COMPOUNDS = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
-# documentation blocks found inside the body of a function. If set to NO these
-# blocks will be appended to the function's detailed documentation block.
-# The default value is: NO.
-
-HIDE_IN_BODY_DOCS = NO
-
-# The INTERNAL_DOCS tag determines if documentation that is typed after a
-# \internal command is included. If the tag is set to NO then the documentation
-# will be excluded. Set it to YES to include the internal documentation.
-# The default value is: NO.
-
-INTERNAL_DOCS = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
-# names in lower-case letters. If set to YES upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
-# The default value is: system dependent.
-
-CASE_SENSE_NAMES = NO
-
-# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
-# their full class and namespace scopes in the documentation. If set to YES the
-# scope will be hidden.
-# The default value is: NO.
-
-HIDE_SCOPE_NAMES = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
-# the files that are included by a file in the documentation of that file.
-# The default value is: YES.
-
-SHOW_INCLUDE_FILES = YES
-
-# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
-# grouped member an include statement to the documentation, telling the reader
-# which file to include in order to use the member.
-# The default value is: NO.
-
-SHOW_GROUPED_MEMB_INC = NO
-
-# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
-# files with double quotes in the documentation rather than with sharp brackets.
-# The default value is: NO.
-
-FORCE_LOCAL_INCLUDES = NO
-
-# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
-# documentation for inline members.
-# The default value is: YES.
-
-INLINE_INFO = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
-# (detailed) documentation of file and class members alphabetically by member
-# name. If set to NO the members will appear in declaration order.
-# The default value is: YES.
-
-SORT_MEMBER_DOCS = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
-# descriptions of file, namespace and class members alphabetically by member
-# name. If set to NO the members will appear in declaration order. Note that
-# this will also influence the order of the classes in the class list.
-# The default value is: NO.
-
-SORT_BRIEF_DOCS = NO
-
-# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
-# (brief and detailed) documentation of class members so that constructors and
-# destructors are listed first. If set to NO the constructors will appear in the
-# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
-# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
-# member documentation.
-# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
-# detailed member documentation.
-# The default value is: NO.
-
-SORT_MEMBERS_CTORS_1ST = NO
-
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
-# of group names into alphabetical order. If set to NO the group names will
-# appear in their defined order.
-# The default value is: NO.
-
-SORT_GROUP_NAMES = NO
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
-# fully-qualified names, including namespaces. If set to NO, the class list will
-# be sorted only by class name, not including the namespace part.
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the alphabetical
-# list.
-# The default value is: NO.
-
-SORT_BY_SCOPE_NAME = NO
-
-# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
-# type resolution of all parameters of a function it will reject a match between
-# the prototype and the implementation of a member function even if there is
-# only one candidate or it is obvious which candidate to choose by doing a
-# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
-# accept a match between prototype and implementation in such cases.
-# The default value is: NO.
-
-STRICT_PROTO_MATCHING = NO
-
-# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the
-# todo list. This list is created by putting \todo commands in the
-# documentation.
-# The default value is: YES.
-
-GENERATE_TODOLIST = YES
-
-# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the
-# test list. This list is created by putting \test commands in the
-# documentation.
-# The default value is: YES.
-
-GENERATE_TESTLIST = YES
-
-# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug
-# list. This list is created by putting \bug commands in the documentation.
-# The default value is: YES.
-
-GENERATE_BUGLIST = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO)
-# the deprecated list. This list is created by putting \deprecated commands in
-# the documentation.
-# The default value is: YES.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional documentation
-# sections, marked by \if <section_label> ... \endif and \cond <section_label>
-# ... \endcond blocks.
-
-ENABLED_SECTIONS = $(RAPIDJSON_SECTIONS)
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
-# initial value of a variable or macro / define can have for it to appear in the
-# documentation. If the initializer consists of more lines than specified here
-# it will be hidden. Use a value of 0 to hide initializers completely. The
-# appearance of the value of individual variables and macros / defines can be
-# controlled using \showinitializer or \hideinitializer command in the
-# documentation regardless of this setting.
-# Minimum value: 0, maximum value: 10000, default value: 30.
-
-MAX_INITIALIZER_LINES = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
-# the bottom of the documentation of classes and structs. If set to YES the list
-# will mention the files that were used to generate the documentation.
-# The default value is: YES.
-
-SHOW_USED_FILES = YES
-
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
-# will remove the Files entry from the Quick Index and from the Folder Tree View
-# (if specified).
-# The default value is: YES.
-
-SHOW_FILES = YES
-
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
-# page. This will remove the Namespaces entry from the Quick Index and from the
-# Folder Tree View (if specified).
-# The default value is: YES.
-
-SHOW_NAMESPACES = NO
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that
-# doxygen should invoke to get the current version for each file (typically from
-# the version control system). Doxygen will invoke the program by executing (via
-# popen()) the command command input-file, where command is the value of the
-# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
-# by doxygen. Whatever the program writes to standard output is used as the file
-# version. For an example see the documentation.
-
-FILE_VERSION_FILTER =
-
-# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
-# by doxygen. The layout file controls the global structure of the generated
-# output files in an output format independent way. To create the layout file
-# that represents doxygen's defaults, run doxygen with the -l option. You can
-# optionally specify a file name after the option, if omitted DoxygenLayout.xml
-# will be used as the name of the layout file.
-#
-# Note that if you run doxygen from a directory containing a file called
-# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
-# tag is left empty.
-
-LAYOUT_FILE =
-
-# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
-# the reference definitions. This must be a list of .bib files. The .bib
-# extension is automatically appended if omitted. This requires the bibtex tool
-# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
-# For LaTeX the style of the bibliography can be controlled using
-# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
-# search path. Do not use file names with spaces, bibtex cannot handle them. See
-# also \cite for info how to create references.
-
-CITE_BIB_FILES =
-
-#---------------------------------------------------------------------------
-# Configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated to
-# standard output by doxygen. If QUIET is set to YES this implies that the
-# messages are off.
-# The default value is: NO.
-
-QUIET = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES
-# this implies that the warnings are on.
-#
-# Tip: Turn warnings on while writing the documentation.
-# The default value is: YES.
-
-WARNINGS = YES
-
-# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate
-# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
-# will automatically be disabled.
-# The default value is: YES.
-
-WARN_IF_UNDOCUMENTED = YES
-
-# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some parameters
-# in a documented function, or documenting parameters that don't exist or using
-# markup commands wrongly.
-# The default value is: YES.
-
-WARN_IF_DOC_ERROR = YES
-
-# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
-# are documented, but have no documentation for their parameters or return
-# value. If set to NO doxygen will only warn about wrong or incomplete parameter
-# documentation, but not about the absence of documentation.
-# The default value is: NO.
-
-WARN_NO_PARAMDOC = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that doxygen
-# can produce. The string should contain the $file, $line, and $text tags, which
-# will be replaced by the file and line number from which the warning originated
-# and the warning text. Optionally the format may contain $version, which will
-# be replaced by the version of the file (if it could be obtained via
-# FILE_VERSION_FILTER)
-# The default value is: $file:$line: $text.
-
-WARN_FORMAT = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning and error
-# messages should be written. If left blank the output is written to standard
-# error (stderr).
-
-WARN_LOGFILE =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag is used to specify the files and/or directories that contain
-# documented source files. You may enter file names like myfile.cpp or
-# directories like /usr/src/myproject. Separate the files or directories with
-# spaces.
-# Note: If this tag is empty the current directory is searched.
-
-INPUT = readme.md \
- include/rapidjson/rapidjson.h \
- include/ \
- doc/features.md \
- doc/tutorial.md \
- doc/pointer.md \
- doc/stream.md \
- doc/encoding.md \
- doc/dom.md \
- doc/sax.md \
- doc/schema.md \
- doc/performance.md \
- doc/internals.md \
- doc/faq.md
-
-# This tag can be used to specify the character encoding of the source files
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
-# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
-# documentation (see: http://www.gnu.org/software/libiconv) for the list of
-# possible encodings.
-# The default value is: UTF-8.
-
-INPUT_ENCODING = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
-# *.h) to filter out the source-files in the directories. If left blank the
-# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii,
-# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp,
-# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown,
-# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
-# *.qsf, *.as and *.js.
-
-FILE_PATTERNS = *.c \
- *.cc \
- *.cxx \
- *.cpp \
- *.h \
- *.hh \
- *.hxx \
- *.hpp \
- *.inc \
- *.md
-
-# The RECURSIVE tag can be used to specify whether or not subdirectories should
-# be searched for input files as well.
-# The default value is: NO.
-
-RECURSIVE = YES
-
-# The EXCLUDE tag can be used to specify files and/or directories that should be
-# excluded from the INPUT source files. This way you can easily exclude a
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-#
-# Note that relative paths are relative to the directory from which doxygen is
-# run.
-
-EXCLUDE = ./include/rapidjson/msinttypes/
-
-# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
-# directories that are symbolic links (a Unix file system feature) are excluded
-# from the input.
-# The default value is: NO.
-
-EXCLUDE_SYMLINKS = NO
-
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories.
-#
-# Note that the wildcards are matched against the file with absolute path, so to
-# exclude all test directories for example use the pattern */test/*
-
-EXCLUDE_PATTERNS =
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
-# (namespaces, classes, functions, etc.) that should be excluded from the
-# output. The symbol name can be a fully qualified name, a word, or if the
-# wildcard * is used, a substring. Examples: ANamespace, AClass,
-# AClass::ANamespace, ANamespace::*Test
-#
-# Note that the wildcards are matched against the file with absolute path, so to
-# exclude all test directories use the pattern */test/*
-
-EXCLUDE_SYMBOLS = internal
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or directories
-# that contain example code fragments that are included (see the \include
-# command).
-
-EXAMPLE_PATH =
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
-# *.h) to filter out the source-files in the directories. If left blank all
-# files are included.
-
-EXAMPLE_PATTERNS = *
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude commands
-# irrespective of the value of the RECURSIVE tag.
-# The default value is: NO.
-
-EXAMPLE_RECURSIVE = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or directories
-# that contain images that are to be included in the documentation (see the
-# \image command).
-
-IMAGE_PATH = ./doc
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command:
-#
-# <filter> <input-file>
-#
-# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
-# name of an input file. Doxygen will then use the output that the filter
-# program writes to standard output. If FILTER_PATTERNS is specified, this tag
-# will be ignored.
-#
-# Note that the filter must not add or remove lines; it is applied before the
-# code is scanned, but not when the output code is generated. If lines are added
-# or removed, the anchors will not be placed correctly.
-
-INPUT_FILTER =
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis. Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match. The filters are a list of the form: pattern=filter
-# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
-# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
-# patterns match the file name, INPUT_FILTER is applied.
-
-FILTER_PATTERNS =
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER ) will also be used to filter the input files that are used for
-# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
-# The default value is: NO.
-
-FILTER_SOURCE_FILES = NO
-
-# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
-# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
-# it is also possible to disable source filtering for a specific pattern using
-# *.ext= (so without naming a filter).
-# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-
-FILTER_SOURCE_PATTERNS =
-
-# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
-# is part of the input, its contents will be placed on the main page
-# (index.html). This can be useful if you have a project on for instance GitHub
-# and want to reuse the introduction page also for the doxygen output.
-
-USE_MDFILE_AS_MAINPAGE = readme.md
-
-#---------------------------------------------------------------------------
-# Configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
-# generated. Documented entities will be cross-referenced with these sources.
-#
-# Note: To get rid of all source code in the generated output, make sure that
-# also VERBATIM_HEADERS is set to NO.
-# The default value is: NO.
-
-SOURCE_BROWSER = NO
-
-# Setting the INLINE_SOURCES tag to YES will include the body of functions,
-# classes and enums directly into the documentation.
-# The default value is: NO.
-
-INLINE_SOURCES = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
-# special comment blocks from generated source code fragments. Normal C, C++ and
-# Fortran comments will always remain visible.
-# The default value is: YES.
-
-STRIP_CODE_COMMENTS = NO
-
-# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
-# function all documented functions referencing it will be listed.
-# The default value is: NO.
-
-REFERENCED_BY_RELATION = NO
-
-# If the REFERENCES_RELATION tag is set to YES then for each documented function
-# all documented entities called/used by that function will be listed.
-# The default value is: NO.
-
-REFERENCES_RELATION = NO
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
-# to YES, then the hyperlinks from functions in REFERENCES_RELATION and
-# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
-# link to the documentation.
-# The default value is: YES.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
-# source code will show a tooltip with additional information such as prototype,
-# brief description and links to the definition and documentation. Since this
-# will make the HTML file larger and loading of large files a bit slower, you
-# can opt to disable this feature.
-# The default value is: YES.
-# This tag requires that the tag SOURCE_BROWSER is set to YES.
-
-SOURCE_TOOLTIPS = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code will
-# point to the HTML generated by the htags(1) tool instead of doxygen built-in
-# source browser. The htags tool is part of GNU's global source tagging system
-# (see http://www.gnu.org/software/global/global.html). You will need version
-# 4.8.6 or higher.
-#
-# To use it do the following:
-# - Install the latest version of global
-# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
-# - Make sure the INPUT points to the root of the source tree
-# - Run doxygen as normal
-#
-# Doxygen will invoke htags (and that will in turn invoke gtags), so these
-# tools must be available from the command line (i.e. in the search path).
-#
-# The result: instead of the source browser generated by doxygen, the links to
-# source code will now point to the output of htags.
-# The default value is: NO.
-# This tag requires that the tag SOURCE_BROWSER is set to YES.
-
-USE_HTAGS = NO
-
-# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
-# verbatim copy of the header file for each class for which an include is
-# specified. Set to NO to disable this.
-# See also: Section \class.
-# The default value is: YES.
-
-VERBATIM_HEADERS = YES
-
-# If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the
-# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the
-# cost of reduced performance. This can be particularly helpful with template
-# rich C++ code for which doxygen's built-in parser lacks the necessary type
-# information.
-# Note: The availability of this option depends on whether or not doxygen was
-# compiled with the --with-libclang option.
-# The default value is: NO.
-
-CLANG_ASSISTED_PARSING = NO
-
-# If clang assisted parsing is enabled you can provide the compiler with command
-# line options that you would normally use when invoking the compiler. Note that
-# the include paths will already be set by doxygen for the files and directories
-# specified with INPUT and INCLUDE_PATH.
-# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-
-CLANG_OPTIONS =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
-# compounds will be generated. Enable this if the project contains a lot of
-# classes, structs, unions or interfaces.
-# The default value is: YES.
-
-ALPHABETICAL_INDEX = NO
-
-# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
-# which the alphabetical index list will be split.
-# Minimum value: 1, maximum value: 20, default value: 5.
-# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-
-COLS_IN_ALPHA_INDEX = 5
-
-# In case all classes in a project start with a common prefix, all classes will
-# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
-# can be used to specify a prefix (or a list of prefixes) that should be ignored
-# while generating the index headers.
-# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-
-IGNORE_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output
-# The default value is: YES.
-
-GENERATE_HTML = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it.
-# The default directory is: html.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_OUTPUT = html
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
-# generated HTML page (for example: .htm, .php, .asp).
-# The default value is: .html.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_FILE_EXTENSION = .html
-
-# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
-# each generated HTML page. If the tag is left blank doxygen will generate a
-# standard header.
-#
-# To get valid HTML the header file that includes any scripts and style sheets
-# that doxygen needs, which is dependent on the configuration options used (e.g.
-# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
-# default header using
-# doxygen -w html new_header.html new_footer.html new_stylesheet.css
-# YourConfigFile
-# and then modify the file new_header.html. See also section "Doxygen usage"
-# for information on how to generate the default header that doxygen normally
-# uses.
-# Note: The header is subject to change so you typically have to regenerate the
-# default header when upgrading to a newer version of doxygen. For a description
-# of the possible markers and block names see the documentation.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_HEADER = ./doc/misc/header.html
-
-# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
-# generated HTML page. If the tag is left blank doxygen will generate a standard
-# footer. See HTML_HEADER for more information on how to generate a default
-# footer and what special commands can be used inside the footer. See also
-# section "Doxygen usage" for information on how to generate the default footer
-# that doxygen normally uses.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_FOOTER = ./doc/misc/footer.html
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
-# sheet that is used by each HTML page. It can be used to fine-tune the look of
-# the HTML output. If left blank doxygen will generate a default style sheet.
-# See also section "Doxygen usage" for information on how to generate the style
-# sheet that doxygen normally uses.
-# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
-# it is more robust and this tag (HTML_STYLESHEET) will in the future become
-# obsolete.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_STYLESHEET =
-
-# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user-
-# defined cascading style sheet that is included after the standard style sheets
-# created by doxygen. Using this option one can overrule certain style aspects.
-# This is preferred over using HTML_STYLESHEET since it does not replace the
-# standard style sheet and is therefor more robust against future updates.
-# Doxygen will copy the style sheet file to the output directory. For an example
-# see the documentation.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_EXTRA_STYLESHEET = ./doc/misc/doxygenextra.css
-
-# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
-# other source files which should be copied to the HTML output directory. Note
-# that these files will be copied to the base HTML output directory. Use the
-# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
-# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
-# files will be copied as-is; there are no commands or markers available.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_EXTRA_FILES =
-
-# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
-# will adjust the colors in the stylesheet and background images according to
-# this color. Hue is specified as an angle on a colorwheel, see
-# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
-# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
-# purple, and 360 is red again.
-# Minimum value: 0, maximum value: 359, default value: 220.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_COLORSTYLE_HUE = 220
-
-# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
-# in the HTML output. For a value of 0 the output will use grayscales only. A
-# value of 255 will produce the most vivid colors.
-# Minimum value: 0, maximum value: 255, default value: 100.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_COLORSTYLE_SAT = 100
-
-# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
-# luminance component of the colors in the HTML output. Values below 100
-# gradually make the output lighter, whereas values above 100 make the output
-# darker. The value divided by 100 is the actual gamma applied, so 80 represents
-# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
-# change the gamma.
-# Minimum value: 40, maximum value: 240, default value: 80.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_COLORSTYLE_GAMMA = 80
-
-# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
-# page will contain the date and time when the page was generated. Setting this
-# to NO can help when comparing the output of multiple runs.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_TIMESTAMP = YES
-
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
-# documentation will contain sections that can be hidden and shown after the
-# page has loaded.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_DYNAMIC_SECTIONS = NO
-
-# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
-# shown in the various tree structured indices initially; the user can expand
-# and collapse entries dynamically later on. Doxygen will expand the tree to
-# such a level that at most the specified number of entries are visible (unless
-# a fully collapsed tree already exceeds this amount). So setting the number of
-# entries 1 will produce a full collapsed tree by default. 0 is a special value
-# representing an infinite number of entries and will result in a full expanded
-# tree by default.
-# Minimum value: 0, maximum value: 9999, default value: 100.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_INDEX_NUM_ENTRIES = 100
-
-# If the GENERATE_DOCSET tag is set to YES, additional index files will be
-# generated that can be used as input for Apple's Xcode 3 integrated development
-# environment (see: http://developer.apple.com/tools/xcode/), introduced with
-# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
-# Makefile in the HTML output directory. Running make will produce the docset in
-# that directory and running make install will install the docset in
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
-# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
-# for more information.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_DOCSET = NO
-
-# This tag determines the name of the docset feed. A documentation feed provides
-# an umbrella under which multiple documentation sets from a single provider
-# (such as a company or product suite) can be grouped.
-# The default value is: Doxygen generated docs.
-# This tag requires that the tag GENERATE_DOCSET is set to YES.
-
-DOCSET_FEEDNAME = "Doxygen generated docs"
-
-# This tag specifies a string that should uniquely identify the documentation
-# set bundle. This should be a reverse domain-name style string, e.g.
-# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
-# The default value is: org.doxygen.Project.
-# This tag requires that the tag GENERATE_DOCSET is set to YES.
-
-DOCSET_BUNDLE_ID = org.doxygen.Project
-
-# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
-# the documentation publisher. This should be a reverse domain-name style
-# string, e.g. com.mycompany.MyDocSet.documentation.
-# The default value is: org.doxygen.Publisher.
-# This tag requires that the tag GENERATE_DOCSET is set to YES.
-
-DOCSET_PUBLISHER_ID = org.doxygen.Publisher
-
-# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
-# The default value is: Publisher.
-# This tag requires that the tag GENERATE_DOCSET is set to YES.
-
-DOCSET_PUBLISHER_NAME = Publisher
-
-# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
-# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
-# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
-# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
-# Windows.
-#
-# The HTML Help Workshop contains a compiler that can convert all HTML output
-# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
-# files are now used as the Windows 98 help format, and will replace the old
-# Windows help format (.hlp) on all Windows platforms in the future. Compressed
-# HTML files also contain an index, a table of contents, and you can search for
-# words in the documentation. The HTML workshop also contains a viewer for
-# compressed HTML files.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_HTMLHELP = NO
-
-# The CHM_FILE tag can be used to specify the file name of the resulting .chm
-# file. You can add a path in front of the file if the result should not be
-# written to the html output directory.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-CHM_FILE =
-
-# The HHC_LOCATION tag can be used to specify the location (absolute path
-# including file name) of the HTML help compiler ( hhc.exe). If non-empty
-# doxygen will try to run the HTML help compiler on the generated index.hhp.
-# The file has to be specified with full path.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-HHC_LOCATION =
-
-# The GENERATE_CHI flag controls if a separate .chi index file is generated (
-# YES) or that it should be included in the master .chm file ( NO).
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-GENERATE_CHI = NO
-
-# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc)
-# and project file content.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-CHM_INDEX_ENCODING =
-
-# The BINARY_TOC flag controls whether a binary table of contents is generated (
-# YES) or a normal table of contents ( NO) in the .chm file. Furthermore it
-# enables the Previous and Next buttons.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-BINARY_TOC = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members to
-# the table of contents of the HTML help documentation and to the tree view.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-TOC_EXPAND = NO
-
-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
-# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
-# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
-# (.qch) of the generated HTML documentation.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_QHP = NO
-
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
-# the file name of the resulting .qch file. The path specified is relative to
-# the HTML output folder.
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QCH_FILE =
-
-# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
-# Project output. For more information please see Qt Help Project / Namespace
-# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
-# The default value is: org.doxygen.Project.
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_NAMESPACE = org.doxygen.Project
-
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
-# Help Project output. For more information please see Qt Help Project / Virtual
-# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
-# folders).
-# The default value is: doc.
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_VIRTUAL_FOLDER = doc
-
-# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
-# filter to add. For more information please see Qt Help Project / Custom
-# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
-# filters).
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_CUST_FILTER_NAME =
-
-# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
-# custom filter to add. For more information please see Qt Help Project / Custom
-# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
-# filters).
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_CUST_FILTER_ATTRS =
-
-# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
-# project's filter section matches. Qt Help Project / Filter Attributes (see:
-# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_SECT_FILTER_ATTRS =
-
-# The QHG_LOCATION tag can be used to specify the location of Qt's
-# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
-# generated .qhp file.
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHG_LOCATION =
-
-# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
-# generated, together with the HTML files, they form an Eclipse help plugin. To
-# install this plugin and make it available under the help contents menu in
-# Eclipse, the contents of the directory containing the HTML and XML files needs
-# to be copied into the plugins directory of eclipse. The name of the directory
-# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
-# After copying Eclipse needs to be restarted before the help appears.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_ECLIPSEHELP = NO
-
-# A unique identifier for the Eclipse help plugin. When installing the plugin
-# the directory name containing the HTML and XML files should also have this
-# name. Each documentation set should have its own identifier.
-# The default value is: org.doxygen.Project.
-# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
-
-ECLIPSE_DOC_ID = org.doxygen.Project
-
-# If you want full control over the layout of the generated HTML pages it might
-# be necessary to disable the index and replace it with your own. The
-# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
-# of each HTML page. A value of NO enables the index and the value YES disables
-# it. Since the tabs in the index contain the same information as the navigation
-# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-DISABLE_INDEX = YES
-
-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-# structure should be generated to display hierarchical information. If the tag
-# value is set to YES, a side panel will be generated containing a tree-like
-# index structure (just like the one that is generated for HTML Help). For this
-# to work a browser that supports JavaScript, DHTML, CSS and frames is required
-# (i.e. any modern browser). Windows users are probably better off using the
-# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can
-# further fine-tune the look of the index. As an example, the default style
-# sheet generated by doxygen has an example that shows how to put an image at
-# the root of the tree instead of the PROJECT_NAME. Since the tree basically has
-# the same information as the tab index, you could consider setting
-# DISABLE_INDEX to YES when enabling this option.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_TREEVIEW = YES
-
-# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
-# doxygen will group on one line in the generated HTML documentation.
-#
-# Note that a value of 0 will completely suppress the enum values from appearing
-# in the overview section.
-# Minimum value: 0, maximum value: 20, default value: 4.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-ENUM_VALUES_PER_LINE = 4
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
-# to set the initial width (in pixels) of the frame in which the tree is shown.
-# Minimum value: 0, maximum value: 1500, default value: 250.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-TREEVIEW_WIDTH = 250
-
-# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to
-# external symbols imported via tag files in a separate window.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-EXT_LINKS_IN_WINDOW = NO
-
-# Use this tag to change the font size of LaTeX formulas included as images in
-# the HTML documentation. When you change the font size after a successful
-# doxygen run you need to manually remove any form_*.png images from the HTML
-# output directory to force them to be regenerated.
-# Minimum value: 8, maximum value: 50, default value: 10.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-FORMULA_FONTSIZE = 10
-
-# Use the FORMULA_TRANPARENT tag to determine whether or not the images
-# generated for formulas are transparent PNGs. Transparent PNGs are not
-# supported properly for IE 6.0, but are supported on all modern browsers.
-#
-# Note that when changing this option you need to delete any form_*.png files in
-# the HTML output directory before the changes have effect.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-FORMULA_TRANSPARENT = YES
-
-# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
-# http://www.mathjax.org) which uses client side Javascript for the rendering
-# instead of using prerendered bitmaps. Use this if you do not have LaTeX
-# installed or if you want to formulas look prettier in the HTML output. When
-# enabled you may also need to install MathJax separately and configure the path
-# to it using the MATHJAX_RELPATH option.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-USE_MATHJAX = NO
-
-# When MathJax is enabled you can set the default output format to be used for
-# the MathJax output. See the MathJax site (see:
-# http://docs.mathjax.org/en/latest/output.html) for more details.
-# Possible values are: HTML-CSS (which is slower, but has the best
-# compatibility), NativeMML (i.e. MathML) and SVG.
-# The default value is: HTML-CSS.
-# This tag requires that the tag USE_MATHJAX is set to YES.
-
-MATHJAX_FORMAT = HTML-CSS
-
-# When MathJax is enabled you need to specify the location relative to the HTML
-# output directory using the MATHJAX_RELPATH option. The destination directory
-# should contain the MathJax.js script. For instance, if the mathjax directory
-# is located at the same level as the HTML output directory, then
-# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
-# Content Delivery Network so you can quickly see the result without installing
-# MathJax. However, it is strongly recommended to install a local copy of
-# MathJax from http://www.mathjax.org before deployment.
-# The default value is: http://cdn.mathjax.org/mathjax/latest.
-# This tag requires that the tag USE_MATHJAX is set to YES.
-
-MATHJAX_RELPATH = http://www.mathjax.org/mathjax
-
-# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
-# extension names that should be enabled during MathJax rendering. For example
-# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
-# This tag requires that the tag USE_MATHJAX is set to YES.
-
-MATHJAX_EXTENSIONS =
-
-# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
-# of code that will be used on startup of the MathJax code. See the MathJax site
-# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
-# example see the documentation.
-# This tag requires that the tag USE_MATHJAX is set to YES.
-
-MATHJAX_CODEFILE =
-
-# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
-# the HTML output. The underlying search engine uses javascript and DHTML and
-# should work on any modern browser. Note that when using HTML help
-# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
-# there is already a search function so this one should typically be disabled.
-# For large projects the javascript based search engine can be slow, then
-# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
-# search using the keyboard; to jump to the search box use <access key> + S
-# (what the <access key> is depends on the OS and browser, but it is typically
-# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
-# key> to jump into the search results window, the results can be navigated
-# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
-# the search. The filter options can be selected when the cursor is inside the
-# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
-# to select a filter and <Enter> or <escape> to activate or cancel the filter
-# option.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-SEARCHENGINE = YES
-
-# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
-# implemented using a web server instead of a web client using Javascript. There
-# are two flavors of web server based searching depending on the EXTERNAL_SEARCH
-# setting. When disabled, doxygen will generate a PHP script for searching and
-# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
-# and searching needs to be provided by external tools. See the section
-# "External Indexing and Searching" for details.
-# The default value is: NO.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-SERVER_BASED_SEARCH = NO
-
-# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
-# script for searching. Instead the search results are written to an XML file
-# which needs to be processed by an external indexer. Doxygen will invoke an
-# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
-# search results.
-#
-# Doxygen ships with an example indexer ( doxyindexer) and search engine
-# (doxysearch.cgi) which are based on the open source search engine library
-# Xapian (see: http://xapian.org/).
-#
-# See the section "External Indexing and Searching" for details.
-# The default value is: NO.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-EXTERNAL_SEARCH = NO
-
-# The SEARCHENGINE_URL should point to a search engine hosted by a web server
-# which will return the search results when EXTERNAL_SEARCH is enabled.
-#
-# Doxygen ships with an example indexer ( doxyindexer) and search engine
-# (doxysearch.cgi) which are based on the open source search engine library
-# Xapian (see: http://xapian.org/). See the section "External Indexing and
-# Searching" for details.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-SEARCHENGINE_URL =
-
-# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
-# search data is written to a file for indexing by an external tool. With the
-# SEARCHDATA_FILE tag the name of this file can be specified.
-# The default file is: searchdata.xml.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-SEARCHDATA_FILE = searchdata.xml
-
-# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
-# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
-# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
-# projects and redirect the results back to the right project.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-EXTERNAL_SEARCH_ID =
-
-# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
-# projects other than the one defined by this configuration file, but that are
-# all added to the same external search index. Each project needs to have a
-# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
-# to a relative location where the documentation can be found. The format is:
-# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-EXTRA_SEARCH_MAPPINGS =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output.
-# The default value is: YES.
-
-GENERATE_LATEX = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it.
-# The default directory is: latex.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_OUTPUT = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked.
-#
-# Note that when enabling USE_PDFLATEX this option is only used for generating
-# bitmaps for formulas in the HTML output, but not in the Makefile that is
-# written to the output directory.
-# The default file is: latex.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_CMD_NAME = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
-# index for LaTeX.
-# The default file is: makeindex.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-MAKEINDEX_CMD_NAME = makeindex
-
-# If the COMPACT_LATEX tag is set to YES doxygen generates more compact LaTeX
-# documents. This may be useful for small projects and may help to save some
-# trees in general.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-COMPACT_LATEX = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used by the
-# printer.
-# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
-# 14 inches) and executive (7.25 x 10.5 inches).
-# The default value is: a4.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-PAPER_TYPE = a4
-
-# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
-# that should be included in the LaTeX output. To get the times font for
-# instance you can specify
-# EXTRA_PACKAGES=times
-# If left blank no extra packages will be included.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-EXTRA_PACKAGES =
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
-# generated LaTeX document. The header should contain everything until the first
-# chapter. If it is left blank doxygen will generate a standard header. See
-# section "Doxygen usage" for information on how to let doxygen write the
-# default header to a separate file.
-#
-# Note: Only use a user-defined header if you know what you are doing! The
-# following commands have a special meaning inside the header: $title,
-# $datetime, $date, $doxygenversion, $projectname, $projectnumber. Doxygen will
-# replace them by respectively the title of the page, the current date and time,
-# only the current date, the version number of doxygen, the project name (see
-# PROJECT_NAME), or the project number (see PROJECT_NUMBER).
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_HEADER =
-
-# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
-# generated LaTeX document. The footer should contain everything after the last
-# chapter. If it is left blank doxygen will generate a standard footer.
-#
-# Note: Only use a user-defined footer if you know what you are doing!
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_FOOTER =
-
-# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
-# other source files which should be copied to the LATEX_OUTPUT output
-# directory. Note that the files will be copied as-is; there are no commands or
-# markers available.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_EXTRA_FILES =
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
-# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
-# contain links (just like the HTML output) instead of page references. This
-# makes the output suitable for online browsing using a PDF viewer.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-PDF_HYPERLINKS = YES
-
-# If the LATEX_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
-# the PDF file directly from the LaTeX files. Set this option to YES to get a
-# higher quality PDF documentation.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-USE_PDFLATEX = YES
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
-# command to the generated LaTeX files. This will instruct LaTeX to keep running
-# if errors occur, instead of asking the user for help. This option is also used
-# when generating formulas in HTML.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_BATCHMODE = NO
-
-# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
-# index chapters (such as File Index, Compound Index, etc.) in the output.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_HIDE_INDICES = NO
-
-# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
-# code with syntax highlighting in the LaTeX output.
-#
-# Note that which sources are shown also depends on other settings such as
-# SOURCE_BROWSER.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_SOURCE_CODE = NO
-
-# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
-# bibliography, e.g. plainnat, or ieeetr. See
-# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
-# The default value is: plain.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_BIB_STYLE = plain
-
-#---------------------------------------------------------------------------
-# Configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES doxygen will generate RTF output. The
-# RTF output is optimized for Word 97 and may not look too pretty with other RTF
-# readers/editors.
-# The default value is: NO.
-
-GENERATE_RTF = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it.
-# The default directory is: rtf.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-RTF_OUTPUT = rtf
-
-# If the COMPACT_RTF tag is set to YES doxygen generates more compact RTF
-# documents. This may be useful for small projects and may help to save some
-# trees in general.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-COMPACT_RTF = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
-# contain hyperlink fields. The RTF file will contain links (just like the HTML
-# output) instead of page references. This makes the output suitable for online
-# browsing using Word or some other Word compatible readers that support those
-# fields.
-#
-# Note: WordPad (write) and others do not support links.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-RTF_HYPERLINKS = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's config
-# file, i.e. a series of assignments. You only have to provide replacements,
-# missing definitions are set to their default value.
-#
-# See also section "Doxygen usage" for information on how to generate the
-# default style sheet that doxygen normally uses.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-RTF_STYLESHEET_FILE =
-
-# Set optional variables used in the generation of an RTF document. Syntax is
-# similar to doxygen's config file. A template extensions file can be generated
-# using doxygen -e rtf extensionFile.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-RTF_EXTENSIONS_FILE =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES doxygen will generate man pages for
-# classes and files.
-# The default value is: NO.
-
-GENERATE_MAN = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it. A directory man3 will be created inside the directory specified by
-# MAN_OUTPUT.
-# The default directory is: man.
-# This tag requires that the tag GENERATE_MAN is set to YES.
-
-MAN_OUTPUT = man
-
-# The MAN_EXTENSION tag determines the extension that is added to the generated
-# man pages. In case the manual section does not start with a number, the number
-# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
-# optional.
-# The default value is: .3.
-# This tag requires that the tag GENERATE_MAN is set to YES.
-
-MAN_EXTENSION = .3
-
-# The MAN_SUBDIR tag determines the name of the directory created within
-# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by
-# MAN_EXTENSION with the initial . removed.
-# This tag requires that the tag GENERATE_MAN is set to YES.
-
-MAN_SUBDIR =
-
-# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
-# will generate one additional man file for each entity documented in the real
-# man page(s). These additional files only source the real man page, but without
-# them the man command would be unable to find the correct page.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_MAN is set to YES.
-
-MAN_LINKS = NO
-
-#---------------------------------------------------------------------------
-# Configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES doxygen will generate an XML file that
-# captures the structure of the code including all documentation.
-# The default value is: NO.
-
-GENERATE_XML = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it.
-# The default directory is: xml.
-# This tag requires that the tag GENERATE_XML is set to YES.
-
-XML_OUTPUT = xml
-
-# If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program
-# listings (including syntax highlighting and cross-referencing information) to
-# the XML output. Note that enabling this will significantly increase the size
-# of the XML output.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_XML is set to YES.
-
-XML_PROGRAMLISTING = YES
-
-#---------------------------------------------------------------------------
-# Configuration options related to the DOCBOOK output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_DOCBOOK tag is set to YES doxygen will generate Docbook files
-# that can be used to generate PDF.
-# The default value is: NO.
-
-GENERATE_DOCBOOK = NO
-
-# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
-# front of it.
-# The default directory is: docbook.
-# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
-
-DOCBOOK_OUTPUT = docbook
-
-#---------------------------------------------------------------------------
-# Configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES doxygen will generate an AutoGen
-# Definitions (see http://autogen.sf.net) file that captures the structure of
-# the code including all documentation. Note that this feature is still
-# experimental and incomplete at the moment.
-# The default value is: NO.
-
-GENERATE_AUTOGEN_DEF = NO
-
-#---------------------------------------------------------------------------
-# Configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES doxygen will generate a Perl module
-# file that captures the structure of the code including all documentation.
-#
-# Note that this feature is still experimental and incomplete at the moment.
-# The default value is: NO.
-
-GENERATE_PERLMOD = NO
-
-# If the PERLMOD_LATEX tag is set to YES doxygen will generate the necessary
-# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
-# output from the Perl module output.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-
-PERLMOD_LATEX = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be nicely
-# formatted so it can be parsed by a human reader. This is useful if you want to
-# understand what is going on. On the other hand, if this tag is set to NO the
-# size of the Perl module output will be much smaller and Perl will parse it
-# just the same.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-
-PERLMOD_PRETTY = YES
-
-# The names of the make variables in the generated doxyrules.make file are
-# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
-# so different doxyrules.make files included by the same Makefile don't
-# overwrite each other's variables.
-# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-
-PERLMOD_MAKEVAR_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES doxygen will evaluate all
-# C-preprocessor directives found in the sources and include files.
-# The default value is: YES.
-
-ENABLE_PREPROCESSING = YES
-
-# If the MACRO_EXPANSION tag is set to YES doxygen will expand all macro names
-# in the source code. If set to NO only conditional compilation will be
-# performed. Macro expansion can be done in a controlled way by setting
-# EXPAND_ONLY_PREDEF to YES.
-# The default value is: NO.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-MACRO_EXPANSION = YES
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
-# the macro expansion is limited to the macros specified with the PREDEFINED and
-# EXPAND_AS_DEFINED tags.
-# The default value is: NO.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-EXPAND_ONLY_PREDEF = YES
-
-# If the SEARCH_INCLUDES tag is set to YES the includes files in the
-# INCLUDE_PATH will be searched if a #include is found.
-# The default value is: YES.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-SEARCH_INCLUDES = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by the
-# preprocessor.
-# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-
-INCLUDE_PATH =
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will be
-# used.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-INCLUDE_FILE_PATTERNS =
-
-# The PREDEFINED tag can be used to specify one or more macro names that are
-# defined before the preprocessor is started (similar to the -D option of e.g.
-# gcc). The argument of the tag is a list of macros of the form: name or
-# name=definition (no spaces). If the definition and the "=" are omitted, "=1"
-# is assumed. To prevent a macro definition from being undefined via #undef or
-# recursively expanded use the := operator instead of the = operator.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-PREDEFINED = \
- RAPIDJSON_DOXYGEN_RUNNING \
- RAPIDJSON_NAMESPACE_BEGIN="namespace rapidjson {" \
- RAPIDJSON_NAMESPACE_END="}" \
- RAPIDJSON_REMOVEFPTR_(x)=x \
- RAPIDJSON_ENABLEIF_RETURN(cond,returntype)="RAPIDJSON_REMOVEFPTR_ returntype" \
- RAPIDJSON_DISABLEIF_RETURN(cond,returntype)="RAPIDJSON_REMOVEFPTR_ returntype"
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
-# tag can be used to specify a list of macro names that should be expanded. The
-# macro definition that is found in the sources will be used. Use the PREDEFINED
-# tag if you want to use a different macro definition that overrules the
-# definition found in the source code.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-EXPAND_AS_DEFINED = \
- RAPIDJSON_NOEXCEPT
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
-# remove all references to function-like macros that are alone on a line, have
-# an all uppercase name, and do not end with a semicolon. Such function macros
-# are typically used for boiler-plate code, and will confuse the parser if not
-# removed.
-# The default value is: YES.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-SKIP_FUNCTION_MACROS = YES
-
-#---------------------------------------------------------------------------
-# Configuration options related to external references
-#---------------------------------------------------------------------------
-
-# The TAGFILES tag can be used to specify one or more tag files. For each tag
-# file the location of the external documentation should be added. The format of
-# a tag file without this location is as follows:
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where loc1 and loc2 can be relative or absolute paths or URLs. See the
-# section "Linking to external documentation" for more information about the use
-# of tag files.
-# Note: Each tag file must have a unique name (where the name does NOT include
-# the path). If a tag file is not located in the directory in which doxygen is
-# run, you must also specify the path to the tagfile here.
-
-TAGFILES =
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
-# tag file that is based on the input files it reads. See section "Linking to
-# external documentation" for more information about the usage of tag files.
-
-GENERATE_TAGFILE =
-
-# If the ALLEXTERNALS tag is set to YES all external class will be listed in the
-# class index. If set to NO only the inherited external classes will be listed.
-# The default value is: NO.
-
-ALLEXTERNALS = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in
-# the modules index. If set to NO, only the current project's groups will be
-# listed.
-# The default value is: YES.
-
-EXTERNAL_GROUPS = YES
-
-# If the EXTERNAL_PAGES tag is set to YES all external pages will be listed in
-# the related pages index. If set to NO, only the current project's pages will
-# be listed.
-# The default value is: YES.
-
-EXTERNAL_PAGES = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of 'which perl').
-# The default file (with absolute path) is: /usr/bin/perl.
-
-PERL_PATH = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES doxygen will generate a class diagram
-# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
-# NO turns the diagrams off. Note that this option also works with HAVE_DOT
-# disabled, but it is recommended to install and use dot, since it yields more
-# powerful graphs.
-# The default value is: YES.
-
-CLASS_DIAGRAMS = YES
-
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see:
-# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-MSCGEN_PATH =
-
-# You can include diagrams made with dia in doxygen documentation. Doxygen will
-# then run dia to produce the diagram and insert it in the documentation. The
-# DIA_PATH tag allows you to specify the directory where the dia binary resides.
-# If left empty dia is assumed to be found in the default search path.
-
-DIA_PATH =
-
-# If set to YES, the inheritance and collaboration graphs will hide inheritance
-# and usage relations if the target is undocumented or is not a class.
-# The default value is: YES.
-
-HIDE_UNDOC_RELATIONS = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz (see:
-# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
-# Bell Labs. The other options in this section have no effect if this option is
-# set to NO
-# The default value is: NO.
-
-HAVE_DOT = NO
-
-# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
-# to run in parallel. When set to 0 doxygen will base this on the number of
-# processors available in the system. You can set it explicitly to a value
-# larger than 0 to get control over the balance between CPU load and processing
-# speed.
-# Minimum value: 0, maximum value: 32, default value: 0.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_NUM_THREADS = 0
-
-# When you want a differently looking font n the dot files that doxygen
-# generates you can specify the font name using DOT_FONTNAME. You need to make
-# sure dot is able to find the font, which can be done by putting it in a
-# standard location or by setting the DOTFONTPATH environment variable or by
-# setting DOT_FONTPATH to the directory containing the font.
-# The default value is: Helvetica.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_FONTNAME = Helvetica
-
-# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
-# dot graphs.
-# Minimum value: 4, maximum value: 24, default value: 10.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_FONTSIZE = 10
-
-# By default doxygen will tell dot to use the default font as specified with
-# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
-# the path where dot can find it using this tag.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_FONTPATH =
-
-# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
-# each documented class showing the direct and indirect inheritance relations.
-# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-CLASS_GRAPH = YES
-
-# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
-# graph for each documented class showing the direct and indirect implementation
-# dependencies (inheritance, containment, and class references variables) of the
-# class with other documented classes.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-COLLABORATION_GRAPH = YES
-
-# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
-# groups, showing the direct groups dependencies.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-GROUP_GRAPHS = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
-# Language.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-UML_LOOK = NO
-
-# If the UML_LOOK tag is enabled, the fields and methods are shown inside the
-# class node. If there are many fields or methods and many nodes the graph may
-# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
-# number of items for each type to make the size more manageable. Set this to 0
-# for no limit. Note that the threshold may be exceeded by 50% before the limit
-# is enforced. So when you set the threshold to 10, up to 15 fields may appear,
-# but if the number exceeds 15, the total amount of fields shown is limited to
-# 10.
-# Minimum value: 0, maximum value: 100, default value: 10.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-UML_LIMIT_NUM_FIELDS = 10
-
-# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
-# collaboration graphs will show the relations between templates and their
-# instances.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-TEMPLATE_RELATIONS = NO
-
-# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
-# YES then doxygen will generate a graph for each documented file showing the
-# direct and indirect include dependencies of the file with other documented
-# files.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-INCLUDE_GRAPH = YES
-
-# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
-# set to YES then doxygen will generate a graph for each documented file showing
-# the direct and indirect include dependencies of the file with other documented
-# files.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-INCLUDED_BY_GRAPH = YES
-
-# If the CALL_GRAPH tag is set to YES then doxygen will generate a call
-# dependency graph for every global function or class method.
-#
-# Note that enabling this option will significantly increase the time of a run.
-# So in most cases it will be better to enable call graphs for selected
-# functions only using the \callgraph command.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-CALL_GRAPH = NO
-
-# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
-# dependency graph for every global function or class method.
-#
-# Note that enabling this option will significantly increase the time of a run.
-# So in most cases it will be better to enable caller graphs for selected
-# functions only using the \callergraph command.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-CALLER_GRAPH = NO
-
-# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
-# hierarchy of all classes instead of a textual one.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-GRAPHICAL_HIERARCHY = YES
-
-# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
-# dependencies a directory has on other directories in a graphical way. The
-# dependency relations are determined by the #include relations between the
-# files in the directories.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DIRECTORY_GRAPH = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot.
-# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
-# to make the SVG files visible in IE 9+ (other browsers do not have this
-# requirement).
-# Possible values are: png, jpg, gif and svg.
-# The default value is: png.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_IMAGE_FORMAT = png
-
-# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
-# enable generation of interactive SVG images that allow zooming and panning.
-#
-# Note that this requires a modern browser other than Internet Explorer. Tested
-# and working are Firefox, Chrome, Safari, and Opera.
-# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
-# the SVG files visible. Older versions of IE do not have SVG support.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-INTERACTIVE_SVG = NO
-
-# The DOT_PATH tag can be used to specify the path where the dot tool can be
-# found. If left blank, it is assumed the dot tool can be found in the path.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_PATH =
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the \dotfile
-# command).
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOTFILE_DIRS =
-
-# The MSCFILE_DIRS tag can be used to specify one or more directories that
-# contain msc files that are included in the documentation (see the \mscfile
-# command).
-
-MSCFILE_DIRS =
-
-# The DIAFILE_DIRS tag can be used to specify one or more directories that
-# contain dia files that are included in the documentation (see the \diafile
-# command).
-
-DIAFILE_DIRS =
-
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
-# that will be shown in the graph. If the number of nodes in a graph becomes
-# larger than this value, doxygen will truncate the graph, which is visualized
-# by representing a node as a red box. Note that doxygen if the number of direct
-# children of the root node in a graph is already larger than
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
-# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-# Minimum value: 0, maximum value: 10000, default value: 50.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_GRAPH_MAX_NODES = 50
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
-# generated by dot. A depth value of 3 means that only nodes reachable from the
-# root by following a path via at most 3 edges will be shown. Nodes that lay
-# further from the root node will be omitted. Note that setting this option to 1
-# or 2 may greatly reduce the computation time needed for large code bases. Also
-# note that the size of a graph can be further restricted by
-# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
-# Minimum value: 0, maximum value: 1000, default value: 0.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-MAX_DOT_GRAPH_DEPTH = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, because dot on Windows does not seem
-# to support this out of the box.
-#
-# Warning: Depending on the platform used, enabling this option may lead to
-# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
-# read).
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_TRANSPARENT = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10) support
-# this, this feature is disabled by default.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_MULTI_TARGETS = NO
-
-# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
-# explaining the meaning of the various boxes and arrows in the dot generated
-# graphs.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-GENERATE_LEGEND = YES
-
-# If the DOT_CLEANUP tag is set to YES doxygen will remove the intermediate dot
-# files that are used to generate the various graphs.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_CLEANUP = YES
diff --git a/3rdparty/rapidjson/doc/Doxyfile.zh-cn.in b/3rdparty/rapidjson/doc/Doxyfile.zh-cn.in
deleted file mode 100644
index 76d828b5e69..00000000000
--- a/3rdparty/rapidjson/doc/Doxyfile.zh-cn.in
+++ /dev/null
@@ -1,2368 +0,0 @@
-# Doxyfile 1.8.7
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project.
-#
-# All text after a double hash (##) is considered a comment and is placed in
-# front of the TAG it is preceding.
-#
-# All text after a single hash (#) is considered a comment and will be ignored.
-# The format is:
-# TAG = value [value, ...]
-# For lists, items can also be appended using:
-# TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (\" \").
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all text
-# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
-# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
-# for the list of possible encodings.
-# The default value is: UTF-8.
-
-DOXYFILE_ENCODING = UTF-8
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
-# double-quotes, unless you are using Doxywizard) that should identify the
-# project for which the documentation is generated. This name is used in the
-# title of most generated pages and in a few other places.
-# The default value is: My Project.
-
-PROJECT_NAME = RapidJSON
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
-# could be handy for archiving the generated documentation or if some version
-# control system is used.
-
-PROJECT_NUMBER =
-
-# Using the PROJECT_BRIEF tag one can provide an optional one line description
-# for a project that appears at the top of each page and should give viewer a
-# quick idea about the purpose of the project. Keep the description short.
-
-PROJECT_BRIEF = "一个C++快速JSONè§£æžå™¨åŠç”Ÿæˆå™¨ï¼ŒåŒ…å«SAX/DOM风格API"
-
-# With the PROJECT_LOGO tag one can specify an logo or icon that is included in
-# the documentation. The maximum height of the logo should not exceed 55 pixels
-# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo
-# to the output directory.
-
-PROJECT_LOGO =
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
-# into which the generated documentation will be written. If a relative path is
-# entered, it will be relative to the location where doxygen was started. If
-# left blank the current directory will be used.
-
-OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-
-# directories (in 2 levels) under the output directory of each output format and
-# will distribute the generated files over these directories. Enabling this
-# option can be useful when feeding doxygen a huge amount of source files, where
-# putting all generated files in the same directory would otherwise causes
-# performance problems for the file system.
-# The default value is: NO.
-
-CREATE_SUBDIRS = NO
-
-# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
-# characters to appear in the names of generated files. If set to NO, non-ASCII
-# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode
-# U+3044.
-# The default value is: NO.
-
-ALLOW_UNICODE_NAMES = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
-# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
-# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
-# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
-# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
-# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
-# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
-# Ukrainian and Vietnamese.
-# The default value is: English.
-
-OUTPUT_LANGUAGE = Chinese
-
-# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member
-# descriptions after the members that are listed in the file and class
-# documentation (similar to Javadoc). Set to NO to disable this.
-# The default value is: YES.
-
-BRIEF_MEMBER_DESC = YES
-
-# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief
-# description of a member or function before the detailed description
-#
-# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
-# brief descriptions will be completely suppressed.
-# The default value is: YES.
-
-REPEAT_BRIEF = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator that is
-# used to form the text in various listings. Each string in this list, if found
-# as the leading text of the brief description, will be stripped from the text
-# and the result, after processing the whole list, is used as the annotated
-# text. Otherwise, the brief description is used as-is. If left blank, the
-# following values are used ($name is automatically replaced with the name of
-# the entity):The $name class, The $name widget, The $name file, is, provides,
-# specifies, contains, represents, a, an and the.
-
-ABBREVIATE_BRIEF = "The $name class" \
- "The $name widget" \
- "The $name file" \
- is \
- provides \
- specifies \
- contains \
- represents \
- a \
- an \
- the
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# doxygen will generate a detailed section even if there is only a brief
-# description.
-# The default value is: NO.
-
-ALWAYS_DETAILED_SEC = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-# inherited members of a class in the documentation of that class as if those
-# members were ordinary class members. Constructors, destructors and assignment
-# operators of the base classes will not be shown.
-# The default value is: NO.
-
-INLINE_INHERITED_MEMB = NO
-
-# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path
-# before files name in the file list and in the header files. If set to NO the
-# shortest path that makes the file name unique will be used
-# The default value is: YES.
-
-FULL_PATH_NAMES = YES
-
-# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
-# Stripping is only done if one of the specified strings matches the left-hand
-# part of the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the path to
-# strip.
-#
-# Note that you can specify absolute paths here, but also relative paths, which
-# will be relative from the directory where doxygen is started.
-# This tag requires that the tag FULL_PATH_NAMES is set to YES.
-
-STRIP_FROM_PATH =
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
-# path mentioned in the documentation of a class, which tells the reader which
-# header file to include in order to use a class. If left blank only the name of
-# the header file containing the class definition is used. Otherwise one should
-# specify the list of include paths that are normally passed to the compiler
-# using the -I flag.
-
-STRIP_FROM_INC_PATH =
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
-# less readable) file names. This can be useful is your file systems doesn't
-# support long names like on DOS, Mac, or CD-ROM.
-# The default value is: NO.
-
-SHORT_NAMES = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
-# first line (until the first dot) of a Javadoc-style comment as the brief
-# description. If set to NO, the Javadoc-style will behave just like regular Qt-
-# style comments (thus requiring an explicit @brief command for a brief
-# description.)
-# The default value is: NO.
-
-JAVADOC_AUTOBRIEF = NO
-
-# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
-# line (until the first dot) of a Qt-style comment as the brief description. If
-# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
-# requiring an explicit \brief command for a brief description.)
-# The default value is: NO.
-
-QT_AUTOBRIEF = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
-# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
-# a brief description. This used to be the default behavior. The new default is
-# to treat a multi-line C++ comment block as a detailed description. Set this
-# tag to YES if you prefer the old behavior instead.
-#
-# Note that setting this tag to YES also means that rational rose comments are
-# not recognized any more.
-# The default value is: NO.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
-# documentation from any documented member that it re-implements.
-# The default value is: YES.
-
-INHERIT_DOCS = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a
-# new page for each member. If set to NO, the documentation of a member will be
-# part of the file/class/namespace that contains it.
-# The default value is: NO.
-
-SEPARATE_MEMBER_PAGES = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
-# uses this value to replace tabs by spaces in code fragments.
-# Minimum value: 1, maximum value: 16, default value: 4.
-
-TAB_SIZE = 4
-
-# This tag can be used to specify a number of aliases that act as commands in
-# the documentation. An alias has the form:
-# name=value
-# For example adding
-# "sideeffect=@par Side Effects:\n"
-# will allow you to put the command \sideeffect (or @sideeffect) in the
-# documentation, which will result in a user-defined paragraph with heading
-# "Side Effects:". You can put \n's in the value part of an alias to insert
-# newlines.
-
-ALIASES =
-
-# This tag can be used to specify a number of word-keyword mappings (TCL only).
-# A mapping has the form "name=value". For example adding "class=itcl::class"
-# will allow you to use the command class in the itcl::class meaning.
-
-TCL_SUBST =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
-# only. Doxygen will then generate output that is more tailored for C. For
-# instance, some of the names that are used will be different. The list of all
-# members will be omitted, etc.
-# The default value is: NO.
-
-OPTIMIZE_OUTPUT_FOR_C = NO
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
-# Python sources only. Doxygen will then generate output that is more tailored
-# for that language. For instance, namespaces will be presented as packages,
-# qualified scopes will look different, etc.
-# The default value is: NO.
-
-OPTIMIZE_OUTPUT_JAVA = NO
-
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
-# sources. Doxygen will then generate output that is tailored for Fortran.
-# The default value is: NO.
-
-OPTIMIZE_FOR_FORTRAN = NO
-
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
-# sources. Doxygen will then generate output that is tailored for VHDL.
-# The default value is: NO.
-
-OPTIMIZE_OUTPUT_VHDL = NO
-
-# Doxygen selects the parser to use depending on the extension of the files it
-# parses. With this tag you can assign which parser to use for a given
-# extension. Doxygen has a built-in mapping, but you can override or extend it
-# using this tag. The format is ext=language, where ext is a file extension, and
-# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
-# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
-# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
-# Fortran. In the later case the parser tries to guess whether the code is fixed
-# or free formatted code, this is the default for Fortran type files), VHDL. For
-# instance to make doxygen treat .inc files as Fortran files (default is PHP),
-# and .f files as C (default is Fortran), use: inc=Fortran f=C.
-#
-# Note For files without extension you can use no_extension as a placeholder.
-#
-# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
-# the files are not read by doxygen.
-
-EXTENSION_MAPPING =
-
-# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
-# according to the Markdown format, which allows for more readable
-# documentation. See http://daringfireball.net/projects/markdown/ for details.
-# The output of markdown processing is further processed by doxygen, so you can
-# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
-# case of backward compatibilities issues.
-# The default value is: YES.
-
-MARKDOWN_SUPPORT = YES
-
-# When enabled doxygen tries to link words that correspond to documented
-# classes, or namespaces to their corresponding documentation. Such a link can
-# be prevented in individual cases by by putting a % sign in front of the word
-# or globally by setting AUTOLINK_SUPPORT to NO.
-# The default value is: YES.
-
-AUTOLINK_SUPPORT = YES
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
-# to include (a tag file for) the STL sources as input, then you should set this
-# tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string);
-# versus func(std::string) {}). This also make the inheritance and collaboration
-# diagrams that involve STL classes more complete and accurate.
-# The default value is: NO.
-
-BUILTIN_STL_SUPPORT = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-# The default value is: NO.
-
-CPP_CLI_SUPPORT = NO
-
-# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
-# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
-# will parse them like normal C++ but will assume all classes use public instead
-# of private inheritance when no explicit protection keyword is present.
-# The default value is: NO.
-
-SIP_SUPPORT = NO
-
-# For Microsoft's IDL there are propget and propput attributes to indicate
-# getter and setter methods for a property. Setting this option to YES will make
-# doxygen to replace the get and set methods by a property in the documentation.
-# This will only work if the methods are indeed getting or setting a simple
-# type. If this is not the case, or you want to show the methods anyway, you
-# should set this option to NO.
-# The default value is: YES.
-
-IDL_PROPERTY_SUPPORT = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-# The default value is: NO.
-
-DISTRIBUTE_GROUP_DOC = NO
-
-# Set the SUBGROUPING tag to YES to allow class member groups of the same type
-# (for instance a group of public functions) to be put as a subgroup of that
-# type (e.g. under the Public Functions section). Set it to NO to prevent
-# subgrouping. Alternatively, this can be done per class using the
-# \nosubgrouping command.
-# The default value is: YES.
-
-SUBGROUPING = YES
-
-# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
-# are shown inside the group in which they are included (e.g. using \ingroup)
-# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
-# and RTF).
-#
-# Note that this feature does not work in combination with
-# SEPARATE_MEMBER_PAGES.
-# The default value is: NO.
-
-INLINE_GROUPED_CLASSES = YES
-
-# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
-# with only public data fields or simple typedef fields will be shown inline in
-# the documentation of the scope in which they are defined (i.e. file,
-# namespace, or group documentation), provided this scope is documented. If set
-# to NO, structs, classes, and unions are shown on a separate page (for HTML and
-# Man pages) or section (for LaTeX and RTF).
-# The default value is: NO.
-
-INLINE_SIMPLE_STRUCTS = NO
-
-# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
-# enum is documented as struct, union, or enum with the name of the typedef. So
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
-# with name TypeT. When disabled the typedef will appear as a member of a file,
-# namespace, or class. And the struct will be named TypeS. This can typically be
-# useful for C code in case the coding convention dictates that all compound
-# types are typedef'ed and only the typedef is referenced, never the tag name.
-# The default value is: NO.
-
-TYPEDEF_HIDES_STRUCT = NO
-
-# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
-# cache is used to resolve symbols given their name and scope. Since this can be
-# an expensive process and often the same symbol appears multiple times in the
-# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
-# doxygen will become slower. If the cache is too large, memory is wasted. The
-# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
-# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
-# symbols. At the end of a run doxygen will report the cache usage and suggest
-# the optimal cache size from a speed point of view.
-# Minimum value: 0, maximum value: 9, default value: 0.
-
-LOOKUP_CACHE_SIZE = 0
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available. Private
-# class members and static file members will be hidden unless the
-# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
-# Note: This will also disable the warnings about undocumented members that are
-# normally produced when WARNINGS is set to YES.
-# The default value is: NO.
-
-EXTRACT_ALL = NO
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will
-# be included in the documentation.
-# The default value is: NO.
-
-EXTRACT_PRIVATE = NO
-
-# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
-# scope will be included in the documentation.
-# The default value is: NO.
-
-EXTRACT_PACKAGE = NO
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file will be
-# included in the documentation.
-# The default value is: NO.
-
-EXTRACT_STATIC = NO
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined
-# locally in source files will be included in the documentation. If set to NO
-# only classes defined in header files are included. Does not have any effect
-# for Java sources.
-# The default value is: YES.
-
-EXTRACT_LOCAL_CLASSES = YES
-
-# This flag is only useful for Objective-C code. When set to YES local methods,
-# which are defined in the implementation section but not in the interface are
-# included in the documentation. If set to NO only methods in the interface are
-# included.
-# The default value is: NO.
-
-EXTRACT_LOCAL_METHODS = NO
-
-# If this flag is set to YES, the members of anonymous namespaces will be
-# extracted and appear in the documentation as a namespace called
-# 'anonymous_namespace{file}', where file will be replaced with the base name of
-# the file that contains the anonymous namespace. By default anonymous namespace
-# are hidden.
-# The default value is: NO.
-
-EXTRACT_ANON_NSPACES = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
-# undocumented members inside documented classes or files. If set to NO these
-# members will be included in the various overviews, but no documentation
-# section is generated. This option has no effect if EXTRACT_ALL is enabled.
-# The default value is: NO.
-
-HIDE_UNDOC_MEMBERS = NO
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy. If set
-# to NO these classes will be included in the various overviews. This option has
-# no effect if EXTRACT_ALL is enabled.
-# The default value is: NO.
-
-HIDE_UNDOC_CLASSES = NO
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
-# (class|struct|union) declarations. If set to NO these declarations will be
-# included in the documentation.
-# The default value is: NO.
-
-HIDE_FRIEND_COMPOUNDS = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
-# documentation blocks found inside the body of a function. If set to NO these
-# blocks will be appended to the function's detailed documentation block.
-# The default value is: NO.
-
-HIDE_IN_BODY_DOCS = NO
-
-# The INTERNAL_DOCS tag determines if documentation that is typed after a
-# \internal command is included. If the tag is set to NO then the documentation
-# will be excluded. Set it to YES to include the internal documentation.
-# The default value is: NO.
-
-INTERNAL_DOCS = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
-# names in lower-case letters. If set to YES upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
-# The default value is: system dependent.
-
-CASE_SENSE_NAMES = NO
-
-# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
-# their full class and namespace scopes in the documentation. If set to YES the
-# scope will be hidden.
-# The default value is: NO.
-
-HIDE_SCOPE_NAMES = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
-# the files that are included by a file in the documentation of that file.
-# The default value is: YES.
-
-SHOW_INCLUDE_FILES = YES
-
-# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
-# grouped member an include statement to the documentation, telling the reader
-# which file to include in order to use the member.
-# The default value is: NO.
-
-SHOW_GROUPED_MEMB_INC = NO
-
-# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
-# files with double quotes in the documentation rather than with sharp brackets.
-# The default value is: NO.
-
-FORCE_LOCAL_INCLUDES = NO
-
-# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
-# documentation for inline members.
-# The default value is: YES.
-
-INLINE_INFO = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
-# (detailed) documentation of file and class members alphabetically by member
-# name. If set to NO the members will appear in declaration order.
-# The default value is: YES.
-
-SORT_MEMBER_DOCS = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
-# descriptions of file, namespace and class members alphabetically by member
-# name. If set to NO the members will appear in declaration order. Note that
-# this will also influence the order of the classes in the class list.
-# The default value is: NO.
-
-SORT_BRIEF_DOCS = NO
-
-# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
-# (brief and detailed) documentation of class members so that constructors and
-# destructors are listed first. If set to NO the constructors will appear in the
-# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
-# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
-# member documentation.
-# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
-# detailed member documentation.
-# The default value is: NO.
-
-SORT_MEMBERS_CTORS_1ST = NO
-
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
-# of group names into alphabetical order. If set to NO the group names will
-# appear in their defined order.
-# The default value is: NO.
-
-SORT_GROUP_NAMES = NO
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
-# fully-qualified names, including namespaces. If set to NO, the class list will
-# be sorted only by class name, not including the namespace part.
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the alphabetical
-# list.
-# The default value is: NO.
-
-SORT_BY_SCOPE_NAME = NO
-
-# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
-# type resolution of all parameters of a function it will reject a match between
-# the prototype and the implementation of a member function even if there is
-# only one candidate or it is obvious which candidate to choose by doing a
-# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
-# accept a match between prototype and implementation in such cases.
-# The default value is: NO.
-
-STRICT_PROTO_MATCHING = NO
-
-# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the
-# todo list. This list is created by putting \todo commands in the
-# documentation.
-# The default value is: YES.
-
-GENERATE_TODOLIST = YES
-
-# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the
-# test list. This list is created by putting \test commands in the
-# documentation.
-# The default value is: YES.
-
-GENERATE_TESTLIST = YES
-
-# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug
-# list. This list is created by putting \bug commands in the documentation.
-# The default value is: YES.
-
-GENERATE_BUGLIST = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO)
-# the deprecated list. This list is created by putting \deprecated commands in
-# the documentation.
-# The default value is: YES.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional documentation
-# sections, marked by \if <section_label> ... \endif and \cond <section_label>
-# ... \endcond blocks.
-
-ENABLED_SECTIONS = $(RAPIDJSON_SECTIONS)
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
-# initial value of a variable or macro / define can have for it to appear in the
-# documentation. If the initializer consists of more lines than specified here
-# it will be hidden. Use a value of 0 to hide initializers completely. The
-# appearance of the value of individual variables and macros / defines can be
-# controlled using \showinitializer or \hideinitializer command in the
-# documentation regardless of this setting.
-# Minimum value: 0, maximum value: 10000, default value: 30.
-
-MAX_INITIALIZER_LINES = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
-# the bottom of the documentation of classes and structs. If set to YES the list
-# will mention the files that were used to generate the documentation.
-# The default value is: YES.
-
-SHOW_USED_FILES = YES
-
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
-# will remove the Files entry from the Quick Index and from the Folder Tree View
-# (if specified).
-# The default value is: YES.
-
-SHOW_FILES = YES
-
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
-# page. This will remove the Namespaces entry from the Quick Index and from the
-# Folder Tree View (if specified).
-# The default value is: YES.
-
-SHOW_NAMESPACES = NO
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that
-# doxygen should invoke to get the current version for each file (typically from
-# the version control system). Doxygen will invoke the program by executing (via
-# popen()) the command command input-file, where command is the value of the
-# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
-# by doxygen. Whatever the program writes to standard output is used as the file
-# version. For an example see the documentation.
-
-FILE_VERSION_FILTER =
-
-# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
-# by doxygen. The layout file controls the global structure of the generated
-# output files in an output format independent way. To create the layout file
-# that represents doxygen's defaults, run doxygen with the -l option. You can
-# optionally specify a file name after the option, if omitted DoxygenLayout.xml
-# will be used as the name of the layout file.
-#
-# Note that if you run doxygen from a directory containing a file called
-# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
-# tag is left empty.
-
-LAYOUT_FILE =
-
-# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
-# the reference definitions. This must be a list of .bib files. The .bib
-# extension is automatically appended if omitted. This requires the bibtex tool
-# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
-# For LaTeX the style of the bibliography can be controlled using
-# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
-# search path. Do not use file names with spaces, bibtex cannot handle them. See
-# also \cite for info how to create references.
-
-CITE_BIB_FILES =
-
-#---------------------------------------------------------------------------
-# Configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated to
-# standard output by doxygen. If QUIET is set to YES this implies that the
-# messages are off.
-# The default value is: NO.
-
-QUIET = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES
-# this implies that the warnings are on.
-#
-# Tip: Turn warnings on while writing the documentation.
-# The default value is: YES.
-
-WARNINGS = YES
-
-# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate
-# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
-# will automatically be disabled.
-# The default value is: YES.
-
-WARN_IF_UNDOCUMENTED = YES
-
-# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some parameters
-# in a documented function, or documenting parameters that don't exist or using
-# markup commands wrongly.
-# The default value is: YES.
-
-WARN_IF_DOC_ERROR = YES
-
-# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
-# are documented, but have no documentation for their parameters or return
-# value. If set to NO doxygen will only warn about wrong or incomplete parameter
-# documentation, but not about the absence of documentation.
-# The default value is: NO.
-
-WARN_NO_PARAMDOC = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that doxygen
-# can produce. The string should contain the $file, $line, and $text tags, which
-# will be replaced by the file and line number from which the warning originated
-# and the warning text. Optionally the format may contain $version, which will
-# be replaced by the version of the file (if it could be obtained via
-# FILE_VERSION_FILTER)
-# The default value is: $file:$line: $text.
-
-WARN_FORMAT = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning and error
-# messages should be written. If left blank the output is written to standard
-# error (stderr).
-
-WARN_LOGFILE =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag is used to specify the files and/or directories that contain
-# documented source files. You may enter file names like myfile.cpp or
-# directories like /usr/src/myproject. Separate the files or directories with
-# spaces.
-# Note: If this tag is empty the current directory is searched.
-
-INPUT = readme.zh-cn.md \
- include/rapidjson/rapidjson.h \
- include/ \
- doc/features.zh-cn.md \
- doc/tutorial.zh-cn.md \
- doc/pointer.zh-cn.md \
- doc/stream.zh-cn.md \
- doc/encoding.zh-cn.md \
- doc/dom.zh-cn.md \
- doc/sax.zh-cn.md \
- doc/schema.zh-cn.md \
- doc/performance.zh-cn.md \
- doc/internals.md \
- doc/faq.zh-cn.md
-
-# This tag can be used to specify the character encoding of the source files
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
-# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
-# documentation (see: http://www.gnu.org/software/libiconv) for the list of
-# possible encodings.
-# The default value is: UTF-8.
-
-INPUT_ENCODING = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
-# *.h) to filter out the source-files in the directories. If left blank the
-# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii,
-# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp,
-# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown,
-# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
-# *.qsf, *.as and *.js.
-
-FILE_PATTERNS = *.c \
- *.cc \
- *.cxx \
- *.cpp \
- *.h \
- *.hh \
- *.hxx \
- *.hpp \
- *.inc \
- *.md
-
-# The RECURSIVE tag can be used to specify whether or not subdirectories should
-# be searched for input files as well.
-# The default value is: NO.
-
-RECURSIVE = YES
-
-# The EXCLUDE tag can be used to specify files and/or directories that should be
-# excluded from the INPUT source files. This way you can easily exclude a
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-#
-# Note that relative paths are relative to the directory from which doxygen is
-# run.
-
-EXCLUDE = ./include/rapidjson/msinttypes/
-
-# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
-# directories that are symbolic links (a Unix file system feature) are excluded
-# from the input.
-# The default value is: NO.
-
-EXCLUDE_SYMLINKS = NO
-
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories.
-#
-# Note that the wildcards are matched against the file with absolute path, so to
-# exclude all test directories for example use the pattern */test/*
-
-EXCLUDE_PATTERNS =
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
-# (namespaces, classes, functions, etc.) that should be excluded from the
-# output. The symbol name can be a fully qualified name, a word, or if the
-# wildcard * is used, a substring. Examples: ANamespace, AClass,
-# AClass::ANamespace, ANamespace::*Test
-#
-# Note that the wildcards are matched against the file with absolute path, so to
-# exclude all test directories use the pattern */test/*
-
-EXCLUDE_SYMBOLS = internal
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or directories
-# that contain example code fragments that are included (see the \include
-# command).
-
-EXAMPLE_PATH =
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
-# *.h) to filter out the source-files in the directories. If left blank all
-# files are included.
-
-EXAMPLE_PATTERNS = *
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude commands
-# irrespective of the value of the RECURSIVE tag.
-# The default value is: NO.
-
-EXAMPLE_RECURSIVE = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or directories
-# that contain images that are to be included in the documentation (see the
-# \image command).
-
-IMAGE_PATH = ./doc
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command:
-#
-# <filter> <input-file>
-#
-# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
-# name of an input file. Doxygen will then use the output that the filter
-# program writes to standard output. If FILTER_PATTERNS is specified, this tag
-# will be ignored.
-#
-# Note that the filter must not add or remove lines; it is applied before the
-# code is scanned, but not when the output code is generated. If lines are added
-# or removed, the anchors will not be placed correctly.
-
-INPUT_FILTER =
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis. Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match. The filters are a list of the form: pattern=filter
-# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
-# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
-# patterns match the file name, INPUT_FILTER is applied.
-
-FILTER_PATTERNS =
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER ) will also be used to filter the input files that are used for
-# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
-# The default value is: NO.
-
-FILTER_SOURCE_FILES = NO
-
-# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
-# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
-# it is also possible to disable source filtering for a specific pattern using
-# *.ext= (so without naming a filter).
-# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-
-FILTER_SOURCE_PATTERNS =
-
-# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
-# is part of the input, its contents will be placed on the main page
-# (index.html). This can be useful if you have a project on for instance GitHub
-# and want to reuse the introduction page also for the doxygen output.
-
-USE_MDFILE_AS_MAINPAGE = readme.zh-cn.md
-
-#---------------------------------------------------------------------------
-# Configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
-# generated. Documented entities will be cross-referenced with these sources.
-#
-# Note: To get rid of all source code in the generated output, make sure that
-# also VERBATIM_HEADERS is set to NO.
-# The default value is: NO.
-
-SOURCE_BROWSER = NO
-
-# Setting the INLINE_SOURCES tag to YES will include the body of functions,
-# classes and enums directly into the documentation.
-# The default value is: NO.
-
-INLINE_SOURCES = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
-# special comment blocks from generated source code fragments. Normal C, C++ and
-# Fortran comments will always remain visible.
-# The default value is: YES.
-
-STRIP_CODE_COMMENTS = NO
-
-# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
-# function all documented functions referencing it will be listed.
-# The default value is: NO.
-
-REFERENCED_BY_RELATION = NO
-
-# If the REFERENCES_RELATION tag is set to YES then for each documented function
-# all documented entities called/used by that function will be listed.
-# The default value is: NO.
-
-REFERENCES_RELATION = NO
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
-# to YES, then the hyperlinks from functions in REFERENCES_RELATION and
-# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
-# link to the documentation.
-# The default value is: YES.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
-# source code will show a tooltip with additional information such as prototype,
-# brief description and links to the definition and documentation. Since this
-# will make the HTML file larger and loading of large files a bit slower, you
-# can opt to disable this feature.
-# The default value is: YES.
-# This tag requires that the tag SOURCE_BROWSER is set to YES.
-
-SOURCE_TOOLTIPS = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code will
-# point to the HTML generated by the htags(1) tool instead of doxygen built-in
-# source browser. The htags tool is part of GNU's global source tagging system
-# (see http://www.gnu.org/software/global/global.html). You will need version
-# 4.8.6 or higher.
-#
-# To use it do the following:
-# - Install the latest version of global
-# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
-# - Make sure the INPUT points to the root of the source tree
-# - Run doxygen as normal
-#
-# Doxygen will invoke htags (and that will in turn invoke gtags), so these
-# tools must be available from the command line (i.e. in the search path).
-#
-# The result: instead of the source browser generated by doxygen, the links to
-# source code will now point to the output of htags.
-# The default value is: NO.
-# This tag requires that the tag SOURCE_BROWSER is set to YES.
-
-USE_HTAGS = NO
-
-# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
-# verbatim copy of the header file for each class for which an include is
-# specified. Set to NO to disable this.
-# See also: Section \class.
-# The default value is: YES.
-
-VERBATIM_HEADERS = YES
-
-# If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the
-# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the
-# cost of reduced performance. This can be particularly helpful with template
-# rich C++ code for which doxygen's built-in parser lacks the necessary type
-# information.
-# Note: The availability of this option depends on whether or not doxygen was
-# compiled with the --with-libclang option.
-# The default value is: NO.
-
-CLANG_ASSISTED_PARSING = NO
-
-# If clang assisted parsing is enabled you can provide the compiler with command
-# line options that you would normally use when invoking the compiler. Note that
-# the include paths will already be set by doxygen for the files and directories
-# specified with INPUT and INCLUDE_PATH.
-# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-
-CLANG_OPTIONS =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
-# compounds will be generated. Enable this if the project contains a lot of
-# classes, structs, unions or interfaces.
-# The default value is: YES.
-
-ALPHABETICAL_INDEX = NO
-
-# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
-# which the alphabetical index list will be split.
-# Minimum value: 1, maximum value: 20, default value: 5.
-# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-
-COLS_IN_ALPHA_INDEX = 5
-
-# In case all classes in a project start with a common prefix, all classes will
-# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
-# can be used to specify a prefix (or a list of prefixes) that should be ignored
-# while generating the index headers.
-# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-
-IGNORE_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output
-# The default value is: YES.
-
-GENERATE_HTML = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it.
-# The default directory is: html.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_OUTPUT = html/zh-cn
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
-# generated HTML page (for example: .htm, .php, .asp).
-# The default value is: .html.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_FILE_EXTENSION = .html
-
-# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
-# each generated HTML page. If the tag is left blank doxygen will generate a
-# standard header.
-#
-# To get valid HTML the header file that includes any scripts and style sheets
-# that doxygen needs, which is dependent on the configuration options used (e.g.
-# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
-# default header using
-# doxygen -w html new_header.html new_footer.html new_stylesheet.css
-# YourConfigFile
-# and then modify the file new_header.html. See also section "Doxygen usage"
-# for information on how to generate the default header that doxygen normally
-# uses.
-# Note: The header is subject to change so you typically have to regenerate the
-# default header when upgrading to a newer version of doxygen. For a description
-# of the possible markers and block names see the documentation.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_HEADER = ./doc/misc/header.html
-
-# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
-# generated HTML page. If the tag is left blank doxygen will generate a standard
-# footer. See HTML_HEADER for more information on how to generate a default
-# footer and what special commands can be used inside the footer. See also
-# section "Doxygen usage" for information on how to generate the default footer
-# that doxygen normally uses.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_FOOTER = ./doc/misc/footer.html
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
-# sheet that is used by each HTML page. It can be used to fine-tune the look of
-# the HTML output. If left blank doxygen will generate a default style sheet.
-# See also section "Doxygen usage" for information on how to generate the style
-# sheet that doxygen normally uses.
-# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
-# it is more robust and this tag (HTML_STYLESHEET) will in the future become
-# obsolete.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_STYLESHEET =
-
-# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user-
-# defined cascading style sheet that is included after the standard style sheets
-# created by doxygen. Using this option one can overrule certain style aspects.
-# This is preferred over using HTML_STYLESHEET since it does not replace the
-# standard style sheet and is therefor more robust against future updates.
-# Doxygen will copy the style sheet file to the output directory. For an example
-# see the documentation.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_EXTRA_STYLESHEET = ./doc/misc/doxygenextra.css
-
-# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
-# other source files which should be copied to the HTML output directory. Note
-# that these files will be copied to the base HTML output directory. Use the
-# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
-# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
-# files will be copied as-is; there are no commands or markers available.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_EXTRA_FILES =
-
-# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
-# will adjust the colors in the stylesheet and background images according to
-# this color. Hue is specified as an angle on a colorwheel, see
-# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
-# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
-# purple, and 360 is red again.
-# Minimum value: 0, maximum value: 359, default value: 220.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_COLORSTYLE_HUE = 220
-
-# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
-# in the HTML output. For a value of 0 the output will use grayscales only. A
-# value of 255 will produce the most vivid colors.
-# Minimum value: 0, maximum value: 255, default value: 100.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_COLORSTYLE_SAT = 100
-
-# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
-# luminance component of the colors in the HTML output. Values below 100
-# gradually make the output lighter, whereas values above 100 make the output
-# darker. The value divided by 100 is the actual gamma applied, so 80 represents
-# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
-# change the gamma.
-# Minimum value: 40, maximum value: 240, default value: 80.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_COLORSTYLE_GAMMA = 80
-
-# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
-# page will contain the date and time when the page was generated. Setting this
-# to NO can help when comparing the output of multiple runs.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_TIMESTAMP = YES
-
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
-# documentation will contain sections that can be hidden and shown after the
-# page has loaded.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_DYNAMIC_SECTIONS = NO
-
-# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
-# shown in the various tree structured indices initially; the user can expand
-# and collapse entries dynamically later on. Doxygen will expand the tree to
-# such a level that at most the specified number of entries are visible (unless
-# a fully collapsed tree already exceeds this amount). So setting the number of
-# entries 1 will produce a full collapsed tree by default. 0 is a special value
-# representing an infinite number of entries and will result in a full expanded
-# tree by default.
-# Minimum value: 0, maximum value: 9999, default value: 100.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_INDEX_NUM_ENTRIES = 100
-
-# If the GENERATE_DOCSET tag is set to YES, additional index files will be
-# generated that can be used as input for Apple's Xcode 3 integrated development
-# environment (see: http://developer.apple.com/tools/xcode/), introduced with
-# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
-# Makefile in the HTML output directory. Running make will produce the docset in
-# that directory and running make install will install the docset in
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
-# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
-# for more information.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_DOCSET = NO
-
-# This tag determines the name of the docset feed. A documentation feed provides
-# an umbrella under which multiple documentation sets from a single provider
-# (such as a company or product suite) can be grouped.
-# The default value is: Doxygen generated docs.
-# This tag requires that the tag GENERATE_DOCSET is set to YES.
-
-DOCSET_FEEDNAME = "Doxygen generated docs"
-
-# This tag specifies a string that should uniquely identify the documentation
-# set bundle. This should be a reverse domain-name style string, e.g.
-# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
-# The default value is: org.doxygen.Project.
-# This tag requires that the tag GENERATE_DOCSET is set to YES.
-
-DOCSET_BUNDLE_ID = org.doxygen.Project
-
-# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
-# the documentation publisher. This should be a reverse domain-name style
-# string, e.g. com.mycompany.MyDocSet.documentation.
-# The default value is: org.doxygen.Publisher.
-# This tag requires that the tag GENERATE_DOCSET is set to YES.
-
-DOCSET_PUBLISHER_ID = org.doxygen.Publisher
-
-# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
-# The default value is: Publisher.
-# This tag requires that the tag GENERATE_DOCSET is set to YES.
-
-DOCSET_PUBLISHER_NAME = Publisher
-
-# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
-# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
-# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
-# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
-# Windows.
-#
-# The HTML Help Workshop contains a compiler that can convert all HTML output
-# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
-# files are now used as the Windows 98 help format, and will replace the old
-# Windows help format (.hlp) on all Windows platforms in the future. Compressed
-# HTML files also contain an index, a table of contents, and you can search for
-# words in the documentation. The HTML workshop also contains a viewer for
-# compressed HTML files.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_HTMLHELP = NO
-
-# The CHM_FILE tag can be used to specify the file name of the resulting .chm
-# file. You can add a path in front of the file if the result should not be
-# written to the html output directory.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-CHM_FILE =
-
-# The HHC_LOCATION tag can be used to specify the location (absolute path
-# including file name) of the HTML help compiler ( hhc.exe). If non-empty
-# doxygen will try to run the HTML help compiler on the generated index.hhp.
-# The file has to be specified with full path.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-HHC_LOCATION =
-
-# The GENERATE_CHI flag controls if a separate .chi index file is generated (
-# YES) or that it should be included in the master .chm file ( NO).
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-GENERATE_CHI = NO
-
-# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc)
-# and project file content.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-CHM_INDEX_ENCODING =
-
-# The BINARY_TOC flag controls whether a binary table of contents is generated (
-# YES) or a normal table of contents ( NO) in the .chm file. Furthermore it
-# enables the Previous and Next buttons.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-BINARY_TOC = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members to
-# the table of contents of the HTML help documentation and to the tree view.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-TOC_EXPAND = NO
-
-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
-# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
-# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
-# (.qch) of the generated HTML documentation.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_QHP = NO
-
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
-# the file name of the resulting .qch file. The path specified is relative to
-# the HTML output folder.
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QCH_FILE =
-
-# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
-# Project output. For more information please see Qt Help Project / Namespace
-# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
-# The default value is: org.doxygen.Project.
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_NAMESPACE = org.doxygen.Project
-
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
-# Help Project output. For more information please see Qt Help Project / Virtual
-# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
-# folders).
-# The default value is: doc.
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_VIRTUAL_FOLDER = doc
-
-# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
-# filter to add. For more information please see Qt Help Project / Custom
-# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
-# filters).
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_CUST_FILTER_NAME =
-
-# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
-# custom filter to add. For more information please see Qt Help Project / Custom
-# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
-# filters).
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_CUST_FILTER_ATTRS =
-
-# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
-# project's filter section matches. Qt Help Project / Filter Attributes (see:
-# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_SECT_FILTER_ATTRS =
-
-# The QHG_LOCATION tag can be used to specify the location of Qt's
-# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
-# generated .qhp file.
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHG_LOCATION =
-
-# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
-# generated, together with the HTML files, they form an Eclipse help plugin. To
-# install this plugin and make it available under the help contents menu in
-# Eclipse, the contents of the directory containing the HTML and XML files needs
-# to be copied into the plugins directory of eclipse. The name of the directory
-# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
-# After copying Eclipse needs to be restarted before the help appears.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_ECLIPSEHELP = NO
-
-# A unique identifier for the Eclipse help plugin. When installing the plugin
-# the directory name containing the HTML and XML files should also have this
-# name. Each documentation set should have its own identifier.
-# The default value is: org.doxygen.Project.
-# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
-
-ECLIPSE_DOC_ID = org.doxygen.Project
-
-# If you want full control over the layout of the generated HTML pages it might
-# be necessary to disable the index and replace it with your own. The
-# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
-# of each HTML page. A value of NO enables the index and the value YES disables
-# it. Since the tabs in the index contain the same information as the navigation
-# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-DISABLE_INDEX = YES
-
-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-# structure should be generated to display hierarchical information. If the tag
-# value is set to YES, a side panel will be generated containing a tree-like
-# index structure (just like the one that is generated for HTML Help). For this
-# to work a browser that supports JavaScript, DHTML, CSS and frames is required
-# (i.e. any modern browser). Windows users are probably better off using the
-# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can
-# further fine-tune the look of the index. As an example, the default style
-# sheet generated by doxygen has an example that shows how to put an image at
-# the root of the tree instead of the PROJECT_NAME. Since the tree basically has
-# the same information as the tab index, you could consider setting
-# DISABLE_INDEX to YES when enabling this option.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_TREEVIEW = YES
-
-# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
-# doxygen will group on one line in the generated HTML documentation.
-#
-# Note that a value of 0 will completely suppress the enum values from appearing
-# in the overview section.
-# Minimum value: 0, maximum value: 20, default value: 4.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-ENUM_VALUES_PER_LINE = 4
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
-# to set the initial width (in pixels) of the frame in which the tree is shown.
-# Minimum value: 0, maximum value: 1500, default value: 250.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-TREEVIEW_WIDTH = 250
-
-# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to
-# external symbols imported via tag files in a separate window.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-EXT_LINKS_IN_WINDOW = NO
-
-# Use this tag to change the font size of LaTeX formulas included as images in
-# the HTML documentation. When you change the font size after a successful
-# doxygen run you need to manually remove any form_*.png images from the HTML
-# output directory to force them to be regenerated.
-# Minimum value: 8, maximum value: 50, default value: 10.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-FORMULA_FONTSIZE = 10
-
-# Use the FORMULA_TRANPARENT tag to determine whether or not the images
-# generated for formulas are transparent PNGs. Transparent PNGs are not
-# supported properly for IE 6.0, but are supported on all modern browsers.
-#
-# Note that when changing this option you need to delete any form_*.png files in
-# the HTML output directory before the changes have effect.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-FORMULA_TRANSPARENT = YES
-
-# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
-# http://www.mathjax.org) which uses client side Javascript for the rendering
-# instead of using prerendered bitmaps. Use this if you do not have LaTeX
-# installed or if you want to formulas look prettier in the HTML output. When
-# enabled you may also need to install MathJax separately and configure the path
-# to it using the MATHJAX_RELPATH option.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-USE_MATHJAX = NO
-
-# When MathJax is enabled you can set the default output format to be used for
-# the MathJax output. See the MathJax site (see:
-# http://docs.mathjax.org/en/latest/output.html) for more details.
-# Possible values are: HTML-CSS (which is slower, but has the best
-# compatibility), NativeMML (i.e. MathML) and SVG.
-# The default value is: HTML-CSS.
-# This tag requires that the tag USE_MATHJAX is set to YES.
-
-MATHJAX_FORMAT = HTML-CSS
-
-# When MathJax is enabled you need to specify the location relative to the HTML
-# output directory using the MATHJAX_RELPATH option. The destination directory
-# should contain the MathJax.js script. For instance, if the mathjax directory
-# is located at the same level as the HTML output directory, then
-# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
-# Content Delivery Network so you can quickly see the result without installing
-# MathJax. However, it is strongly recommended to install a local copy of
-# MathJax from http://www.mathjax.org before deployment.
-# The default value is: http://cdn.mathjax.org/mathjax/latest.
-# This tag requires that the tag USE_MATHJAX is set to YES.
-
-MATHJAX_RELPATH = http://www.mathjax.org/mathjax
-
-# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
-# extension names that should be enabled during MathJax rendering. For example
-# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
-# This tag requires that the tag USE_MATHJAX is set to YES.
-
-MATHJAX_EXTENSIONS =
-
-# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
-# of code that will be used on startup of the MathJax code. See the MathJax site
-# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
-# example see the documentation.
-# This tag requires that the tag USE_MATHJAX is set to YES.
-
-MATHJAX_CODEFILE =
-
-# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
-# the HTML output. The underlying search engine uses javascript and DHTML and
-# should work on any modern browser. Note that when using HTML help
-# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
-# there is already a search function so this one should typically be disabled.
-# For large projects the javascript based search engine can be slow, then
-# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
-# search using the keyboard; to jump to the search box use <access key> + S
-# (what the <access key> is depends on the OS and browser, but it is typically
-# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
-# key> to jump into the search results window, the results can be navigated
-# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
-# the search. The filter options can be selected when the cursor is inside the
-# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
-# to select a filter and <Enter> or <escape> to activate or cancel the filter
-# option.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-SEARCHENGINE = YES
-
-# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
-# implemented using a web server instead of a web client using Javascript. There
-# are two flavors of web server based searching depending on the EXTERNAL_SEARCH
-# setting. When disabled, doxygen will generate a PHP script for searching and
-# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
-# and searching needs to be provided by external tools. See the section
-# "External Indexing and Searching" for details.
-# The default value is: NO.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-SERVER_BASED_SEARCH = NO
-
-# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
-# script for searching. Instead the search results are written to an XML file
-# which needs to be processed by an external indexer. Doxygen will invoke an
-# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
-# search results.
-#
-# Doxygen ships with an example indexer ( doxyindexer) and search engine
-# (doxysearch.cgi) which are based on the open source search engine library
-# Xapian (see: http://xapian.org/).
-#
-# See the section "External Indexing and Searching" for details.
-# The default value is: NO.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-EXTERNAL_SEARCH = NO
-
-# The SEARCHENGINE_URL should point to a search engine hosted by a web server
-# which will return the search results when EXTERNAL_SEARCH is enabled.
-#
-# Doxygen ships with an example indexer ( doxyindexer) and search engine
-# (doxysearch.cgi) which are based on the open source search engine library
-# Xapian (see: http://xapian.org/). See the section "External Indexing and
-# Searching" for details.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-SEARCHENGINE_URL =
-
-# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
-# search data is written to a file for indexing by an external tool. With the
-# SEARCHDATA_FILE tag the name of this file can be specified.
-# The default file is: searchdata.xml.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-SEARCHDATA_FILE = searchdata.xml
-
-# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
-# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
-# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
-# projects and redirect the results back to the right project.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-EXTERNAL_SEARCH_ID =
-
-# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
-# projects other than the one defined by this configuration file, but that are
-# all added to the same external search index. Each project needs to have a
-# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
-# to a relative location where the documentation can be found. The format is:
-# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-EXTRA_SEARCH_MAPPINGS =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output.
-# The default value is: YES.
-
-GENERATE_LATEX = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it.
-# The default directory is: latex.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_OUTPUT = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked.
-#
-# Note that when enabling USE_PDFLATEX this option is only used for generating
-# bitmaps for formulas in the HTML output, but not in the Makefile that is
-# written to the output directory.
-# The default file is: latex.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_CMD_NAME = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
-# index for LaTeX.
-# The default file is: makeindex.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-MAKEINDEX_CMD_NAME = makeindex
-
-# If the COMPACT_LATEX tag is set to YES doxygen generates more compact LaTeX
-# documents. This may be useful for small projects and may help to save some
-# trees in general.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-COMPACT_LATEX = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used by the
-# printer.
-# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
-# 14 inches) and executive (7.25 x 10.5 inches).
-# The default value is: a4.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-PAPER_TYPE = a4
-
-# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
-# that should be included in the LaTeX output. To get the times font for
-# instance you can specify
-# EXTRA_PACKAGES=times
-# If left blank no extra packages will be included.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-EXTRA_PACKAGES =
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
-# generated LaTeX document. The header should contain everything until the first
-# chapter. If it is left blank doxygen will generate a standard header. See
-# section "Doxygen usage" for information on how to let doxygen write the
-# default header to a separate file.
-#
-# Note: Only use a user-defined header if you know what you are doing! The
-# following commands have a special meaning inside the header: $title,
-# $datetime, $date, $doxygenversion, $projectname, $projectnumber. Doxygen will
-# replace them by respectively the title of the page, the current date and time,
-# only the current date, the version number of doxygen, the project name (see
-# PROJECT_NAME), or the project number (see PROJECT_NUMBER).
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_HEADER =
-
-# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
-# generated LaTeX document. The footer should contain everything after the last
-# chapter. If it is left blank doxygen will generate a standard footer.
-#
-# Note: Only use a user-defined footer if you know what you are doing!
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_FOOTER =
-
-# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
-# other source files which should be copied to the LATEX_OUTPUT output
-# directory. Note that the files will be copied as-is; there are no commands or
-# markers available.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_EXTRA_FILES =
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
-# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
-# contain links (just like the HTML output) instead of page references. This
-# makes the output suitable for online browsing using a PDF viewer.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-PDF_HYPERLINKS = YES
-
-# If the LATEX_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
-# the PDF file directly from the LaTeX files. Set this option to YES to get a
-# higher quality PDF documentation.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-USE_PDFLATEX = YES
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
-# command to the generated LaTeX files. This will instruct LaTeX to keep running
-# if errors occur, instead of asking the user for help. This option is also used
-# when generating formulas in HTML.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_BATCHMODE = NO
-
-# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
-# index chapters (such as File Index, Compound Index, etc.) in the output.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_HIDE_INDICES = NO
-
-# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
-# code with syntax highlighting in the LaTeX output.
-#
-# Note that which sources are shown also depends on other settings such as
-# SOURCE_BROWSER.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_SOURCE_CODE = NO
-
-# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
-# bibliography, e.g. plainnat, or ieeetr. See
-# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
-# The default value is: plain.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_BIB_STYLE = plain
-
-#---------------------------------------------------------------------------
-# Configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES doxygen will generate RTF output. The
-# RTF output is optimized for Word 97 and may not look too pretty with other RTF
-# readers/editors.
-# The default value is: NO.
-
-GENERATE_RTF = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it.
-# The default directory is: rtf.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-RTF_OUTPUT = rtf
-
-# If the COMPACT_RTF tag is set to YES doxygen generates more compact RTF
-# documents. This may be useful for small projects and may help to save some
-# trees in general.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-COMPACT_RTF = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
-# contain hyperlink fields. The RTF file will contain links (just like the HTML
-# output) instead of page references. This makes the output suitable for online
-# browsing using Word or some other Word compatible readers that support those
-# fields.
-#
-# Note: WordPad (write) and others do not support links.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-RTF_HYPERLINKS = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's config
-# file, i.e. a series of assignments. You only have to provide replacements,
-# missing definitions are set to their default value.
-#
-# See also section "Doxygen usage" for information on how to generate the
-# default style sheet that doxygen normally uses.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-RTF_STYLESHEET_FILE =
-
-# Set optional variables used in the generation of an RTF document. Syntax is
-# similar to doxygen's config file. A template extensions file can be generated
-# using doxygen -e rtf extensionFile.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-RTF_EXTENSIONS_FILE =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES doxygen will generate man pages for
-# classes and files.
-# The default value is: NO.
-
-GENERATE_MAN = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it. A directory man3 will be created inside the directory specified by
-# MAN_OUTPUT.
-# The default directory is: man.
-# This tag requires that the tag GENERATE_MAN is set to YES.
-
-MAN_OUTPUT = man
-
-# The MAN_EXTENSION tag determines the extension that is added to the generated
-# man pages. In case the manual section does not start with a number, the number
-# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
-# optional.
-# The default value is: .3.
-# This tag requires that the tag GENERATE_MAN is set to YES.
-
-MAN_EXTENSION = .3
-
-# The MAN_SUBDIR tag determines the name of the directory created within
-# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by
-# MAN_EXTENSION with the initial . removed.
-# This tag requires that the tag GENERATE_MAN is set to YES.
-
-MAN_SUBDIR =
-
-# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
-# will generate one additional man file for each entity documented in the real
-# man page(s). These additional files only source the real man page, but without
-# them the man command would be unable to find the correct page.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_MAN is set to YES.
-
-MAN_LINKS = NO
-
-#---------------------------------------------------------------------------
-# Configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES doxygen will generate an XML file that
-# captures the structure of the code including all documentation.
-# The default value is: NO.
-
-GENERATE_XML = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it.
-# The default directory is: xml.
-# This tag requires that the tag GENERATE_XML is set to YES.
-
-XML_OUTPUT = xml
-
-# If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program
-# listings (including syntax highlighting and cross-referencing information) to
-# the XML output. Note that enabling this will significantly increase the size
-# of the XML output.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_XML is set to YES.
-
-XML_PROGRAMLISTING = YES
-
-#---------------------------------------------------------------------------
-# Configuration options related to the DOCBOOK output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_DOCBOOK tag is set to YES doxygen will generate Docbook files
-# that can be used to generate PDF.
-# The default value is: NO.
-
-GENERATE_DOCBOOK = NO
-
-# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
-# front of it.
-# The default directory is: docbook.
-# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
-
-DOCBOOK_OUTPUT = docbook
-
-#---------------------------------------------------------------------------
-# Configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES doxygen will generate an AutoGen
-# Definitions (see http://autogen.sf.net) file that captures the structure of
-# the code including all documentation. Note that this feature is still
-# experimental and incomplete at the moment.
-# The default value is: NO.
-
-GENERATE_AUTOGEN_DEF = NO
-
-#---------------------------------------------------------------------------
-# Configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES doxygen will generate a Perl module
-# file that captures the structure of the code including all documentation.
-#
-# Note that this feature is still experimental and incomplete at the moment.
-# The default value is: NO.
-
-GENERATE_PERLMOD = NO
-
-# If the PERLMOD_LATEX tag is set to YES doxygen will generate the necessary
-# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
-# output from the Perl module output.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-
-PERLMOD_LATEX = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be nicely
-# formatted so it can be parsed by a human reader. This is useful if you want to
-# understand what is going on. On the other hand, if this tag is set to NO the
-# size of the Perl module output will be much smaller and Perl will parse it
-# just the same.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-
-PERLMOD_PRETTY = YES
-
-# The names of the make variables in the generated doxyrules.make file are
-# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
-# so different doxyrules.make files included by the same Makefile don't
-# overwrite each other's variables.
-# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-
-PERLMOD_MAKEVAR_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES doxygen will evaluate all
-# C-preprocessor directives found in the sources and include files.
-# The default value is: YES.
-
-ENABLE_PREPROCESSING = YES
-
-# If the MACRO_EXPANSION tag is set to YES doxygen will expand all macro names
-# in the source code. If set to NO only conditional compilation will be
-# performed. Macro expansion can be done in a controlled way by setting
-# EXPAND_ONLY_PREDEF to YES.
-# The default value is: NO.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-MACRO_EXPANSION = YES
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
-# the macro expansion is limited to the macros specified with the PREDEFINED and
-# EXPAND_AS_DEFINED tags.
-# The default value is: NO.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-EXPAND_ONLY_PREDEF = YES
-
-# If the SEARCH_INCLUDES tag is set to YES the includes files in the
-# INCLUDE_PATH will be searched if a #include is found.
-# The default value is: YES.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-SEARCH_INCLUDES = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by the
-# preprocessor.
-# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-
-INCLUDE_PATH =
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will be
-# used.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-INCLUDE_FILE_PATTERNS =
-
-# The PREDEFINED tag can be used to specify one or more macro names that are
-# defined before the preprocessor is started (similar to the -D option of e.g.
-# gcc). The argument of the tag is a list of macros of the form: name or
-# name=definition (no spaces). If the definition and the "=" are omitted, "=1"
-# is assumed. To prevent a macro definition from being undefined via #undef or
-# recursively expanded use the := operator instead of the = operator.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-PREDEFINED = \
- RAPIDJSON_DOXYGEN_RUNNING \
- RAPIDJSON_NAMESPACE_BEGIN="namespace rapidjson {" \
- RAPIDJSON_NAMESPACE_END="}" \
- RAPIDJSON_REMOVEFPTR_(x)=x \
- RAPIDJSON_ENABLEIF_RETURN(cond,returntype)="RAPIDJSON_REMOVEFPTR_ returntype" \
- RAPIDJSON_DISABLEIF_RETURN(cond,returntype)="RAPIDJSON_REMOVEFPTR_ returntype"
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
-# tag can be used to specify a list of macro names that should be expanded. The
-# macro definition that is found in the sources will be used. Use the PREDEFINED
-# tag if you want to use a different macro definition that overrules the
-# definition found in the source code.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-EXPAND_AS_DEFINED = \
- RAPIDJSON_NOEXCEPT
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
-# remove all references to function-like macros that are alone on a line, have
-# an all uppercase name, and do not end with a semicolon. Such function macros
-# are typically used for boiler-plate code, and will confuse the parser if not
-# removed.
-# The default value is: YES.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-SKIP_FUNCTION_MACROS = YES
-
-#---------------------------------------------------------------------------
-# Configuration options related to external references
-#---------------------------------------------------------------------------
-
-# The TAGFILES tag can be used to specify one or more tag files. For each tag
-# file the location of the external documentation should be added. The format of
-# a tag file without this location is as follows:
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where loc1 and loc2 can be relative or absolute paths or URLs. See the
-# section "Linking to external documentation" for more information about the use
-# of tag files.
-# Note: Each tag file must have a unique name (where the name does NOT include
-# the path). If a tag file is not located in the directory in which doxygen is
-# run, you must also specify the path to the tagfile here.
-
-TAGFILES =
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
-# tag file that is based on the input files it reads. See section "Linking to
-# external documentation" for more information about the usage of tag files.
-
-GENERATE_TAGFILE =
-
-# If the ALLEXTERNALS tag is set to YES all external class will be listed in the
-# class index. If set to NO only the inherited external classes will be listed.
-# The default value is: NO.
-
-ALLEXTERNALS = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in
-# the modules index. If set to NO, only the current project's groups will be
-# listed.
-# The default value is: YES.
-
-EXTERNAL_GROUPS = YES
-
-# If the EXTERNAL_PAGES tag is set to YES all external pages will be listed in
-# the related pages index. If set to NO, only the current project's pages will
-# be listed.
-# The default value is: YES.
-
-EXTERNAL_PAGES = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of 'which perl').
-# The default file (with absolute path) is: /usr/bin/perl.
-
-PERL_PATH = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES doxygen will generate a class diagram
-# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
-# NO turns the diagrams off. Note that this option also works with HAVE_DOT
-# disabled, but it is recommended to install and use dot, since it yields more
-# powerful graphs.
-# The default value is: YES.
-
-CLASS_DIAGRAMS = YES
-
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see:
-# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-MSCGEN_PATH =
-
-# You can include diagrams made with dia in doxygen documentation. Doxygen will
-# then run dia to produce the diagram and insert it in the documentation. The
-# DIA_PATH tag allows you to specify the directory where the dia binary resides.
-# If left empty dia is assumed to be found in the default search path.
-
-DIA_PATH =
-
-# If set to YES, the inheritance and collaboration graphs will hide inheritance
-# and usage relations if the target is undocumented or is not a class.
-# The default value is: YES.
-
-HIDE_UNDOC_RELATIONS = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz (see:
-# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
-# Bell Labs. The other options in this section have no effect if this option is
-# set to NO
-# The default value is: NO.
-
-HAVE_DOT = NO
-
-# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
-# to run in parallel. When set to 0 doxygen will base this on the number of
-# processors available in the system. You can set it explicitly to a value
-# larger than 0 to get control over the balance between CPU load and processing
-# speed.
-# Minimum value: 0, maximum value: 32, default value: 0.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_NUM_THREADS = 0
-
-# When you want a differently looking font n the dot files that doxygen
-# generates you can specify the font name using DOT_FONTNAME. You need to make
-# sure dot is able to find the font, which can be done by putting it in a
-# standard location or by setting the DOTFONTPATH environment variable or by
-# setting DOT_FONTPATH to the directory containing the font.
-# The default value is: Helvetica.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_FONTNAME = Helvetica
-
-# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
-# dot graphs.
-# Minimum value: 4, maximum value: 24, default value: 10.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_FONTSIZE = 10
-
-# By default doxygen will tell dot to use the default font as specified with
-# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
-# the path where dot can find it using this tag.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_FONTPATH =
-
-# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
-# each documented class showing the direct and indirect inheritance relations.
-# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-CLASS_GRAPH = YES
-
-# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
-# graph for each documented class showing the direct and indirect implementation
-# dependencies (inheritance, containment, and class references variables) of the
-# class with other documented classes.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-COLLABORATION_GRAPH = YES
-
-# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
-# groups, showing the direct groups dependencies.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-GROUP_GRAPHS = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
-# Language.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-UML_LOOK = NO
-
-# If the UML_LOOK tag is enabled, the fields and methods are shown inside the
-# class node. If there are many fields or methods and many nodes the graph may
-# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
-# number of items for each type to make the size more manageable. Set this to 0
-# for no limit. Note that the threshold may be exceeded by 50% before the limit
-# is enforced. So when you set the threshold to 10, up to 15 fields may appear,
-# but if the number exceeds 15, the total amount of fields shown is limited to
-# 10.
-# Minimum value: 0, maximum value: 100, default value: 10.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-UML_LIMIT_NUM_FIELDS = 10
-
-# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
-# collaboration graphs will show the relations between templates and their
-# instances.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-TEMPLATE_RELATIONS = NO
-
-# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
-# YES then doxygen will generate a graph for each documented file showing the
-# direct and indirect include dependencies of the file with other documented
-# files.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-INCLUDE_GRAPH = YES
-
-# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
-# set to YES then doxygen will generate a graph for each documented file showing
-# the direct and indirect include dependencies of the file with other documented
-# files.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-INCLUDED_BY_GRAPH = YES
-
-# If the CALL_GRAPH tag is set to YES then doxygen will generate a call
-# dependency graph for every global function or class method.
-#
-# Note that enabling this option will significantly increase the time of a run.
-# So in most cases it will be better to enable call graphs for selected
-# functions only using the \callgraph command.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-CALL_GRAPH = NO
-
-# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
-# dependency graph for every global function or class method.
-#
-# Note that enabling this option will significantly increase the time of a run.
-# So in most cases it will be better to enable caller graphs for selected
-# functions only using the \callergraph command.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-CALLER_GRAPH = NO
-
-# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
-# hierarchy of all classes instead of a textual one.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-GRAPHICAL_HIERARCHY = YES
-
-# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
-# dependencies a directory has on other directories in a graphical way. The
-# dependency relations are determined by the #include relations between the
-# files in the directories.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DIRECTORY_GRAPH = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot.
-# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
-# to make the SVG files visible in IE 9+ (other browsers do not have this
-# requirement).
-# Possible values are: png, jpg, gif and svg.
-# The default value is: png.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_IMAGE_FORMAT = png
-
-# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
-# enable generation of interactive SVG images that allow zooming and panning.
-#
-# Note that this requires a modern browser other than Internet Explorer. Tested
-# and working are Firefox, Chrome, Safari, and Opera.
-# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
-# the SVG files visible. Older versions of IE do not have SVG support.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-INTERACTIVE_SVG = NO
-
-# The DOT_PATH tag can be used to specify the path where the dot tool can be
-# found. If left blank, it is assumed the dot tool can be found in the path.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_PATH =
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the \dotfile
-# command).
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOTFILE_DIRS =
-
-# The MSCFILE_DIRS tag can be used to specify one or more directories that
-# contain msc files that are included in the documentation (see the \mscfile
-# command).
-
-MSCFILE_DIRS =
-
-# The DIAFILE_DIRS tag can be used to specify one or more directories that
-# contain dia files that are included in the documentation (see the \diafile
-# command).
-
-DIAFILE_DIRS =
-
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
-# that will be shown in the graph. If the number of nodes in a graph becomes
-# larger than this value, doxygen will truncate the graph, which is visualized
-# by representing a node as a red box. Note that doxygen if the number of direct
-# children of the root node in a graph is already larger than
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
-# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-# Minimum value: 0, maximum value: 10000, default value: 50.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_GRAPH_MAX_NODES = 50
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
-# generated by dot. A depth value of 3 means that only nodes reachable from the
-# root by following a path via at most 3 edges will be shown. Nodes that lay
-# further from the root node will be omitted. Note that setting this option to 1
-# or 2 may greatly reduce the computation time needed for large code bases. Also
-# note that the size of a graph can be further restricted by
-# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
-# Minimum value: 0, maximum value: 1000, default value: 0.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-MAX_DOT_GRAPH_DEPTH = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, because dot on Windows does not seem
-# to support this out of the box.
-#
-# Warning: Depending on the platform used, enabling this option may lead to
-# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
-# read).
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_TRANSPARENT = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10) support
-# this, this feature is disabled by default.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_MULTI_TARGETS = NO
-
-# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
-# explaining the meaning of the various boxes and arrows in the dot generated
-# graphs.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-GENERATE_LEGEND = YES
-
-# If the DOT_CLEANUP tag is set to YES doxygen will remove the intermediate dot
-# files that are used to generate the various graphs.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_CLEANUP = YES
diff --git a/3rdparty/rapidjson/doc/diagram/architecture.dot b/3rdparty/rapidjson/doc/diagram/architecture.dot
deleted file mode 100644
index c816c871834..00000000000
--- a/3rdparty/rapidjson/doc/diagram/architecture.dot
+++ /dev/null
@@ -1,50 +0,0 @@
-digraph {
- compound=true
- fontname="Inconsolata, Consolas"
- fontsize=10
- margin="0,0"
- ranksep=0.2
- nodesep=0.5
- penwidth=0.5
- colorscheme=spectral7
-
- node [shape=box, fontname="Inconsolata, Consolas", fontsize=10, penwidth=0.5, style=filled, fillcolor=white]
- edge [fontname="Inconsolata, Consolas", fontsize=10, penwidth=0.5]
-
- subgraph cluster1 {
- margin="10,10"
- labeljust="left"
- label = "SAX"
- style=filled
- fillcolor=6
-
- Reader -> Writer [style=invis]
- }
-
- subgraph cluster2 {
- margin="10,10"
- labeljust="left"
- label = "DOM"
- style=filled
- fillcolor=7
-
- Value
- Document
- }
-
- Handler [label="<<concept>>\nHandler"]
-
- {
- edge [arrowtail=onormal, dir=back]
- Value -> Document
- Handler -> Document
- Handler -> Writer
- }
-
- {
- edge [arrowhead=vee, style=dashed, constraint=false]
- Reader -> Handler [label="calls"]
- Value -> Handler [label="calls"]
- Document -> Reader [label="uses"]
- }
-} \ No newline at end of file
diff --git a/3rdparty/rapidjson/doc/diagram/architecture.png b/3rdparty/rapidjson/doc/diagram/architecture.png
deleted file mode 100644
index 556c7e72914..00000000000
--- a/3rdparty/rapidjson/doc/diagram/architecture.png
+++ /dev/null
Binary files differ
diff --git a/3rdparty/rapidjson/doc/diagram/insituparsing.dot b/3rdparty/rapidjson/doc/diagram/insituparsing.dot
deleted file mode 100644
index eca0e3854f4..00000000000
--- a/3rdparty/rapidjson/doc/diagram/insituparsing.dot
+++ /dev/null
@@ -1,65 +0,0 @@
-digraph {
- compound=true
- fontname="Inconsolata, Consolas"
- fontsize=10
- margin="0,0"
- ranksep=0.2
- penwidth=0.5
-
- node [fontname="Inconsolata, Consolas", fontsize=10, penwidth=0.5]
- edge [fontname="Inconsolata, Consolas", fontsize=10, arrowhead=normal]
-
- {
- node [shape=record, fontsize="8", margin="0.04", height=0.2, color=gray]
- oldjson [label="\{|\"|m|s|g|\"|:|\"|H|e|l|l|o|\\|n|W|o|r|l|d|!|\"|,|\"|\\|u|0|0|7|3|t|a|r|s|\"|:|1|0|\}", xlabel="Before Parsing"]
- //newjson [label="\{|\"|<a>m|s|g|\\0|:|\"|<b>H|e|l|l|o|\\n|W|o|r|l|d|!|\\0|\"|,|\"|<c>s|t|a|r|s|\\0|t|a|r|s|:|1|0|\}", xlabel="After Parsing"]
- newjson [shape=plaintext, label=<
-<table BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="2"><tr>
-<td>{</td>
-<td>"</td><td port="a">m</td><td>s</td><td>g</td><td bgcolor="yellow">\\0</td>
-<td>:</td>
-<td>"</td><td port="b">H</td><td>e</td><td>l</td><td>l</td><td>o</td><td bgcolor="yellow">\\n</td><td bgcolor="yellow">W</td><td bgcolor="yellow">o</td><td bgcolor="yellow">r</td><td bgcolor="yellow">l</td><td bgcolor="yellow">d</td><td bgcolor="yellow">!</td><td bgcolor="yellow">\\0</td><td>"</td>
-<td>,</td>
-<td>"</td><td port="c" bgcolor="yellow">s</td><td bgcolor="yellow">t</td><td bgcolor="yellow">a</td><td bgcolor="yellow">r</td><td bgcolor="yellow">s</td><td bgcolor="yellow">\\0</td><td>t</td><td>a</td><td>r</td><td>s</td>
-<td>:</td>
-<td>1</td><td>0</td>
-<td>}</td>
-</tr></table>
->, xlabel="After Parsing"]
- }
-
- subgraph cluster1 {
- margin="10,10"
- labeljust="left"
- label = "Document by In situ Parsing"
- style=filled
- fillcolor=gray95
- node [shape=Mrecord, style=filled, colorscheme=spectral7]
-
- root [label="{object|}", fillcolor=3]
-
- {
- msg [label="{string|<a>}", fillcolor=5]
- helloworld [label="{string|<a>}", fillcolor=5]
- stars [label="{string|<a>}", fillcolor=5]
- ten [label="{number|10}", fillcolor=6]
- }
- }
-
- oldjson -> root [label=" ParseInsitu()" lhead="cluster1"]
- edge [arrowhead=vee]
- root -> { msg; stars }
-
- edge [arrowhead="none"]
- msg -> helloworld
- stars -> ten
-
- {
- edge [arrowhead=vee, arrowtail=dot, arrowsize=0.5, dir=both, tailclip=false]
- msg:a:c -> newjson:a
- helloworld:a:c -> newjson:b
- stars:a:c -> newjson:c
- }
-
- //oldjson -> newjson [style=invis]
-} \ No newline at end of file
diff --git a/3rdparty/rapidjson/doc/diagram/insituparsing.png b/3rdparty/rapidjson/doc/diagram/insituparsing.png
deleted file mode 100644
index 4400c88466a..00000000000
--- a/3rdparty/rapidjson/doc/diagram/insituparsing.png
+++ /dev/null
Binary files differ
diff --git a/3rdparty/rapidjson/doc/diagram/iterative-parser-states-diagram.dot b/3rdparty/rapidjson/doc/diagram/iterative-parser-states-diagram.dot
deleted file mode 100644
index 82ebfe1f095..00000000000
--- a/3rdparty/rapidjson/doc/diagram/iterative-parser-states-diagram.dot
+++ /dev/null
@@ -1,62 +0,0 @@
-digraph {
- fontname="Inconsolata, Consolas"
- fontsize=10
- margin="0,0"
- penwidth=0.0
-
- node [fontname="Inconsolata, Consolas", fontsize=10, penwidth=0.5]
- edge [fontname="Inconsolata, Consolas", fontsize=10, penwidth=0.5]
-
- node [shape = doublecircle]; Start; Finish;
- node [shape = box; style = "rounded, filled"; fillcolor=white ];
-
- Start -> ArrayInitial [label=" ["];
- Start -> ObjectInitial [label=" {"];
-
- subgraph clusterArray {
- margin="10,10"
- style=filled
- fillcolor=gray95
- label = "Array"
-
- ArrayInitial; Element; ElementDelimiter; ArrayFinish;
- }
-
- subgraph clusterObject {
- margin="10,10"
- style=filled
- fillcolor=gray95
- label = "Object"
-
- ObjectInitial; MemberKey; KeyValueDelimiter; MemberValue; MemberDelimiter; ObjectFinish;
- }
-
- ArrayInitial -> ArrayInitial [label="["];
- ArrayInitial -> ArrayFinish [label=" ]"];
- ArrayInitial -> ObjectInitial [label="{", constraint=false];
- ArrayInitial -> Element [label="string\nfalse\ntrue\nnull\nnumber"];
-
- Element -> ArrayFinish [label="]"];
- Element -> ElementDelimiter [label=","];
-
- ElementDelimiter -> ArrayInitial [label=" ["];
- ElementDelimiter -> ObjectInitial [label="{"];
- ElementDelimiter -> Element [label="string\nfalse\ntrue\nnull\nnumber"];
-
- ObjectInitial -> ObjectFinish [label=" }"];
- ObjectInitial -> MemberKey [label=" string "];
-
- MemberKey -> KeyValueDelimiter [label=":"];
-
- KeyValueDelimiter -> ArrayInitial [label="["];
- KeyValueDelimiter -> ObjectInitial [label=" {"];
- KeyValueDelimiter -> MemberValue [label=" string\n false\n true\n null\n number"];
-
- MemberValue -> ObjectFinish [label="}"];
- MemberValue -> MemberDelimiter [label=","];
-
- MemberDelimiter -> MemberKey [label=" string "];
-
- ArrayFinish -> Finish;
- ObjectFinish -> Finish;
-}
diff --git a/3rdparty/rapidjson/doc/diagram/iterative-parser-states-diagram.png b/3rdparty/rapidjson/doc/diagram/iterative-parser-states-diagram.png
deleted file mode 100644
index f315494db1d..00000000000
--- a/3rdparty/rapidjson/doc/diagram/iterative-parser-states-diagram.png
+++ /dev/null
Binary files differ
diff --git a/3rdparty/rapidjson/doc/diagram/makefile b/3rdparty/rapidjson/doc/diagram/makefile
deleted file mode 100644
index 3483977655d..00000000000
--- a/3rdparty/rapidjson/doc/diagram/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-%.pdf: %.dot
- dot $< -Tpdf -o $@
-
-%.png: %.dot
- dot $< -Tpng -o $@
-
-DOTFILES = $(basename $(wildcard *.dot))
-all: $(addsuffix .png, $(DOTFILES)) $(addsuffix .pdf, $(DOTFILES))
diff --git a/3rdparty/rapidjson/doc/diagram/move1.dot b/3rdparty/rapidjson/doc/diagram/move1.dot
deleted file mode 100644
index a7c1464ad06..00000000000
--- a/3rdparty/rapidjson/doc/diagram/move1.dot
+++ /dev/null
@@ -1,47 +0,0 @@
-digraph {
- compound=true
- fontname="Inconsolata, Consolas"
- fontsize=10
- margin="0,0"
- ranksep=0.2
- penwidth=0.5
-
- node [fontname="Inconsolata, Consolas", fontsize=10, penwidth=0.5]
- edge [fontname="Inconsolata, Consolas", fontsize=10, arrowhead=normal]
-
- subgraph cluster1 {
- margin="10,10"
- labeljust="left"
- label = "Before"
- style=filled
- fillcolor=gray95
-
- node [shape=Mrecord, style=filled, colorscheme=spectral7]
-
- {
- rank = same
- b1 [label="{b:number|456}", fillcolor=6]
- a1 [label="{a:number|123}", fillcolor=6]
- }
-
- a1 -> b1 [style="dashed", label="Move", dir=back]
- }
-
- subgraph cluster2 {
- margin="10,10"
- labeljust="left"
- label = "After"
- style=filled
- fillcolor=gray95
-
- node [shape=Mrecord, style=filled, colorscheme=spectral7]
-
- {
- rank = same
- b2 [label="{b:null|}", fillcolor=1]
- a2 [label="{a:number|456}", fillcolor=6]
- }
- a2 -> b2 [style=invis, dir=back]
- }
- b1 -> b2 [style=invis]
-} \ No newline at end of file
diff --git a/3rdparty/rapidjson/doc/diagram/move1.png b/3rdparty/rapidjson/doc/diagram/move1.png
deleted file mode 100644
index ab322d084bd..00000000000
--- a/3rdparty/rapidjson/doc/diagram/move1.png
+++ /dev/null
Binary files differ
diff --git a/3rdparty/rapidjson/doc/diagram/move2.dot b/3rdparty/rapidjson/doc/diagram/move2.dot
deleted file mode 100644
index 7037ea6cbb2..00000000000
--- a/3rdparty/rapidjson/doc/diagram/move2.dot
+++ /dev/null
@@ -1,62 +0,0 @@
-digraph {
- compound=true
- fontname="Inconsolata, Consolas"
- fontsize=10
- margin="0,0"
- ranksep=0.2
- penwidth=0.5
-
- node [fontname="Inconsolata, Consolas", fontsize=10, penwidth=0.5]
- edge [fontname="Inconsolata, Consolas", fontsize=10, arrowhead=normal]
-
- subgraph cluster1 {
- margin="10,10"
- labeljust="left"
- label = "Before Copying (Hypothetic)"
- style=filled
- fillcolor=gray95
-
- node [shape=Mrecord, style=filled, colorscheme=spectral7]
-
- c1 [label="{contact:array|}", fillcolor=4]
- c11 [label="{|}"]
- c12 [label="{|}"]
- c13 [shape="none", label="...", style="solid"]
- o1 [label="{o:object|}", fillcolor=3]
- ghost [label="{o:object|}", style=invis]
-
- c1 -> o1 [style="dashed", label="AddMember", constraint=false]
-
- edge [arrowhead=vee]
- c1 -> { c11; c12; c13 }
- o1 -> ghost [style=invis]
- }
-
- subgraph cluster2 {
- margin="10,10"
- labeljust="left"
- label = "After Copying (Hypothetic)"
- style=filled
- fillcolor=gray95
-
- node [shape=Mrecord, style=filled, colorscheme=spectral7]
-
- c2 [label="{contact:array|}", fillcolor=4]
- c3 [label="{array|}", fillcolor=4]
- c21 [label="{|}"]
- c22 [label="{|}"]
- c23 [shape=none, label="...", style="solid"]
- o2 [label="{o:object|}", fillcolor=3]
- cs [label="{string|\"contact\"}", fillcolor=5]
- c31 [label="{|}"]
- c32 [label="{|}"]
- c33 [shape="none", label="...", style="solid"]
-
- edge [arrowhead=vee]
- c2 -> { c21; c22; c23 }
- o2 -> cs
- cs -> c3 [arrowhead=none]
- c3 -> { c31; c32; c33 }
- }
- ghost -> o2 [style=invis]
-} \ No newline at end of file
diff --git a/3rdparty/rapidjson/doc/diagram/move2.png b/3rdparty/rapidjson/doc/diagram/move2.png
deleted file mode 100644
index 8d4fc5bcc22..00000000000
--- a/3rdparty/rapidjson/doc/diagram/move2.png
+++ /dev/null
Binary files differ
diff --git a/3rdparty/rapidjson/doc/diagram/move3.dot b/3rdparty/rapidjson/doc/diagram/move3.dot
deleted file mode 100644
index c197b99df59..00000000000
--- a/3rdparty/rapidjson/doc/diagram/move3.dot
+++ /dev/null
@@ -1,60 +0,0 @@
-digraph {
- compound=true
- fontname="Inconsolata, Consolas"
- fontsize=10
- margin="0,0"
- ranksep=0.2
- penwidth=0.5
- forcelabels=true
-
- node [fontname="Inconsolata, Consolas", fontsize=10, penwidth=0.5]
- edge [fontname="Inconsolata, Consolas", fontsize=10, arrowhead=normal]
-
- subgraph cluster1 {
- margin="10,10"
- labeljust="left"
- label = "Before Moving"
- style=filled
- fillcolor=gray95
-
- node [shape=Mrecord, style=filled, colorscheme=spectral7]
-
- c1 [label="{contact:array|}", fillcolor=4]
- c11 [label="{|}"]
- c12 [label="{|}"]
- c13 [shape=none, label="...", style="solid"]
- o1 [label="{o:object|}", fillcolor=3]
- ghost [label="{o:object|}", style=invis]
-
- c1 -> o1 [style="dashed", constraint=false, label="AddMember"]
-
- edge [arrowhead=vee]
- c1 -> { c11; c12; c13 }
- o1 -> ghost [style=invis]
- }
-
- subgraph cluster2 {
- margin="10,10"
- labeljust="left"
- label = "After Moving"
- style=filled
- fillcolor=gray95
-
- node [shape=Mrecord, style=filled, colorscheme=spectral7]
-
- c2 [label="{contact:null|}", fillcolor=1]
- c3 [label="{array|}", fillcolor=4]
- c21 [label="{|}"]
- c22 [label="{|}"]
- c23 [shape="none", label="...", style="solid"]
- o2 [label="{o:object|}", fillcolor=3]
- cs [label="{string|\"contact\"}", fillcolor=5]
- c2 -> o2 [style="dashed", constraint=false, label="AddMember", style=invis]
-
- edge [arrowhead=vee]
- c3 -> { c21; c22; c23 }
- o2 -> cs
- cs -> c3 [arrowhead=none]
- }
- ghost -> o2 [style=invis]
-} \ No newline at end of file
diff --git a/3rdparty/rapidjson/doc/diagram/move3.png b/3rdparty/rapidjson/doc/diagram/move3.png
deleted file mode 100644
index 558470f1fab..00000000000
--- a/3rdparty/rapidjson/doc/diagram/move3.png
+++ /dev/null
Binary files differ
diff --git a/3rdparty/rapidjson/doc/diagram/normalparsing.dot b/3rdparty/rapidjson/doc/diagram/normalparsing.dot
deleted file mode 100644
index b15941ba0fc..00000000000
--- a/3rdparty/rapidjson/doc/diagram/normalparsing.dot
+++ /dev/null
@@ -1,56 +0,0 @@
-digraph {
- compound=true
- fontname="Inconsolata, Consolas"
- fontsize=10
- margin="0,0"
- ranksep=0.2
- penwidth=0.5
-
- node [fontname="Inconsolata, Consolas", fontsize=10, penwidth=0.5]
- edge [fontname="Inconsolata, Consolas", fontsize=10, arrowhead=normal]
-
- {
- node [shape=record, fontsize="8", margin="0.04", height=0.2, color=gray]
- normaljson [label="\{|\"|m|s|g|\"|:|\"|H|e|l|l|o|\\|n|W|o|r|l|d|!|\"|,|\"|\\|u|0|0|7|3|t|a|r|s\"|:|1|0|\}"]
-
- {
- rank = same
- msgstring [label="m|s|g|\\0"]
- helloworldstring [label="H|e|l|l|o|\\n|W|o|r|l|d|!|\\0"]
- starsstring [label="s|t|a|r|s\\0"]
- }
- }
-
- subgraph cluster1 {
- margin="10,10"
- labeljust="left"
- label = "Document by Normal Parsing"
- style=filled
- fillcolor=gray95
- node [shape=Mrecord, style=filled, colorscheme=spectral7]
-
- root [label="{object|}", fillcolor=3]
-
- {
- msg [label="{string|<a>}", fillcolor=5]
- helloworld [label="{string|<a>}", fillcolor=5]
- stars [label="{string|<a>}", fillcolor=5]
- ten [label="{number|10}", fillcolor=6]
- }
- }
-
- normaljson -> root [label=" Parse()" lhead="cluster1"]
- edge [arrowhead=vee]
- root -> { msg; stars }
-
- edge [arrowhead="none"]
- msg -> helloworld
- stars -> ten
-
- edge [arrowhead=vee, arrowtail=dot, arrowsize=0.5, dir=both, tailclip=false]
- msg:a:c -> msgstring:w
- helloworld:a:c -> helloworldstring:w
- stars:a:c -> starsstring:w
-
- msgstring -> helloworldstring -> starsstring [style=invis]
-} \ No newline at end of file
diff --git a/3rdparty/rapidjson/doc/diagram/normalparsing.png b/3rdparty/rapidjson/doc/diagram/normalparsing.png
deleted file mode 100644
index 702512ca367..00000000000
--- a/3rdparty/rapidjson/doc/diagram/normalparsing.png
+++ /dev/null
Binary files differ
diff --git a/3rdparty/rapidjson/doc/diagram/simpledom.dot b/3rdparty/rapidjson/doc/diagram/simpledom.dot
deleted file mode 100644
index 959cdbb417a..00000000000
--- a/3rdparty/rapidjson/doc/diagram/simpledom.dot
+++ /dev/null
@@ -1,54 +0,0 @@
-digraph {
- compound=true
- fontname="Inconsolata, Consolas"
- fontsize=10
- margin="0,0"
- ranksep=0.2
- penwidth=0.5
-
- node [fontname="Inconsolata, Consolas", fontsize=10, penwidth=0.5]
- edge [fontname="Inconsolata, Consolas", fontsize=10, arrowhead=normal]
-
- {
- node [shape=record, fontsize="8", margin="0.04", height=0.2, color=gray]
- srcjson [label="\{|\"|p|r|o|j|e|c|t|\"|:|\"|r|a|p|i|d|j|s|o|n|\"|,|\"|s|t|a|r|s|\"|:|1|0|\}"]
- dstjson [label="\{|\"|p|r|o|j|e|c|t|\"|:|\"|r|a|p|i|d|j|s|o|n|\"|,|\"|s|t|a|r|s|\"|:|1|1|\}"]
- }
-
- {
- node [shape="box", style="filled", fillcolor="gray95"]
- Document2 [label="(Modified) Document"]
- Writer
- }
-
- subgraph cluster1 {
- margin="10,10"
- labeljust="left"
- label = "Document"
- style=filled
- fillcolor=gray95
- node [shape=Mrecord, style=filled, colorscheme=spectral7]
-
- root [label="{object|}", fillcolor=3]
-
- {
- project [label="{string|\"project\"}", fillcolor=5]
- rapidjson [label="{string|\"rapidjson\"}", fillcolor=5]
- stars [label="{string|\"stars\"}", fillcolor=5]
- ten [label="{number|10}", fillcolor=6]
- }
-
- edge [arrowhead=vee]
- root -> { project; stars }
-
- edge [arrowhead="none"]
- project -> rapidjson
- stars -> ten
- }
-
- srcjson -> root [label=" Parse()", lhead="cluster1"]
-
- ten -> Document2 [label=" Increase \"stars\"", ltail="cluster1" ]
- Document2 -> Writer [label=" Traverse DOM by Accept()"]
- Writer -> dstjson [label=" Output to StringBuffer"]
-} \ No newline at end of file
diff --git a/3rdparty/rapidjson/doc/diagram/simpledom.png b/3rdparty/rapidjson/doc/diagram/simpledom.png
deleted file mode 100644
index 38d9c5dc126..00000000000
--- a/3rdparty/rapidjson/doc/diagram/simpledom.png
+++ /dev/null
Binary files differ
diff --git a/3rdparty/rapidjson/doc/diagram/tutorial.dot b/3rdparty/rapidjson/doc/diagram/tutorial.dot
deleted file mode 100644
index 138ddc381d4..00000000000
--- a/3rdparty/rapidjson/doc/diagram/tutorial.dot
+++ /dev/null
@@ -1,58 +0,0 @@
-digraph {
- compound=true
- fontname="Inconsolata, Consolas"
- fontsize=10
- margin="0,0"
- ranksep=0.2
- penwidth=0.5
-
- node [fontname="Inconsolata, Consolas", fontsize=10, penwidth=0.5]
- edge [fontname="Inconsolata, Consolas", fontsize=10]
-
- subgraph cluster1 {
- margin="10,10"
- labeljust="left"
- label = "Document"
- style=filled
- fillcolor=gray95
- node [shape=Mrecord, style=filled, colorscheme=spectral7]
-
- root [label="{object|}", fillcolor=3]
-
- {
- hello [label="{string|\"hello\"}", fillcolor=5]
- t [label="{string|\"t\"}", fillcolor=5]
- f [label="{string|\"f\"}", fillcolor=5]
- n [label="{string|\"n\"}", fillcolor=5]
- i [label="{string|\"i\"}", fillcolor=5]
- pi [label="{string|\"pi\"}", fillcolor=5]
- a [label="{string|\"a\"}", fillcolor=5]
-
- world [label="{string|\"world\"}", fillcolor=5]
- true [label="{true|}", fillcolor=7]
- false [label="{false|}", fillcolor=2]
- null [label="{null|}", fillcolor=1]
- i1 [label="{number|123}", fillcolor=6]
- pi1 [label="{number|3.1416}", fillcolor=6]
- array [label="{array|size=4}", fillcolor=4]
-
- a1 [label="{number|1}", fillcolor=6]
- a2 [label="{number|2}", fillcolor=6]
- a3 [label="{number|3}", fillcolor=6]
- a4 [label="{number|4}", fillcolor=6]
- }
-
- edge [arrowhead=vee]
- root -> { hello; t; f; n; i; pi; a }
- array -> { a1; a2; a3; a4 }
-
- edge [arrowhead=none]
- hello -> world
- t -> true
- f -> false
- n -> null
- i -> i1
- pi -> pi1
- a -> array
- }
-} \ No newline at end of file
diff --git a/3rdparty/rapidjson/doc/diagram/tutorial.png b/3rdparty/rapidjson/doc/diagram/tutorial.png
deleted file mode 100644
index 8a12924acdd..00000000000
--- a/3rdparty/rapidjson/doc/diagram/tutorial.png
+++ /dev/null
Binary files differ
diff --git a/3rdparty/rapidjson/doc/diagram/utilityclass.dot b/3rdparty/rapidjson/doc/diagram/utilityclass.dot
deleted file mode 100644
index 1492a8a7af6..00000000000
--- a/3rdparty/rapidjson/doc/diagram/utilityclass.dot
+++ /dev/null
@@ -1,73 +0,0 @@
-digraph {
- rankdir=LR
- compound=true
- fontname="Inconsolata, Consolas"
- fontsize=10
- margin="0,0"
- ranksep=0.3
- nodesep=0.15
- penwidth=0.5
- colorscheme=spectral7
-
- node [shape=box, fontname="Inconsolata, Consolas", fontsize=10, penwidth=0.5, style=filled, fillcolor=white]
- edge [fontname="Inconsolata, Consolas", fontsize=10, penwidth=0.5]
-
- subgraph cluster0 {
- style=filled
- fillcolor=4
-
- Encoding [label="<<concept>>\nEncoding"]
-
- edge [arrowtail=onormal, dir=back]
- Encoding -> { UTF8; UTF16; UTF32; ASCII; AutoUTF }
- UTF16 -> { UTF16LE; UTF16BE }
- UTF32 -> { UTF32LE; UTF32BE }
- }
-
- subgraph cluster1 {
- style=filled
- fillcolor=5
-
- Stream [label="<<concept>>\nStream"]
- InputByteStream [label="<<concept>>\nInputByteStream"]
- OutputByteStream [label="<<concept>>\nOutputByteStream"]
-
- edge [arrowtail=onormal, dir=back]
- Stream -> {
- StringStream; InsituStringStream; StringBuffer;
- EncodedInputStream; EncodedOutputStream;
- AutoUTFInputStream; AutoUTFOutputStream
- InputByteStream; OutputByteStream
- }
-
- InputByteStream -> { MemoryStream; FlieReadStream }
- OutputByteStream -> { MemoryBuffer; FileWriteStream }
- }
-
- subgraph cluster2 {
- style=filled
- fillcolor=3
-
- Allocator [label="<<concept>>\nAllocator"]
-
- edge [arrowtail=onormal, dir=back]
- Allocator -> { CrtAllocator; MemoryPoolAllocator }
- }
-
- {
- edge [arrowtail=odiamond, arrowhead=vee, dir=both]
- EncodedInputStream -> InputByteStream
- EncodedOutputStream -> OutputByteStream
- AutoUTFInputStream -> InputByteStream
- AutoUTFOutputStream -> OutputByteStream
- MemoryPoolAllocator -> Allocator [label="base", tailport=s]
- }
-
- {
- edge [arrowhead=vee, style=dashed]
- AutoUTFInputStream -> AutoUTF
- AutoUTFOutputStream -> AutoUTF
- }
-
- //UTF32LE -> Stream [style=invis]
-} \ No newline at end of file
diff --git a/3rdparty/rapidjson/doc/diagram/utilityclass.png b/3rdparty/rapidjson/doc/diagram/utilityclass.png
deleted file mode 100644
index ce029a4d067..00000000000
--- a/3rdparty/rapidjson/doc/diagram/utilityclass.png
+++ /dev/null
Binary files differ
diff --git a/3rdparty/rapidjson/doc/dom.md b/3rdparty/rapidjson/doc/dom.md
deleted file mode 100644
index cb25fc4f3af..00000000000
--- a/3rdparty/rapidjson/doc/dom.md
+++ /dev/null
@@ -1,277 +0,0 @@
-# DOM
-
-Document Object Model(DOM) is an in-memory representation of JSON for query and manipulation. The basic usage of DOM is described in [Tutorial](doc/tutorial.md). This section will describe some details and more advanced usages.
-
-[TOC]
-
-# Template {#Template}
-
-In the tutorial, `Value` and `Document` was used. Similarly to `std::string`, these are actually `typedef` of template classes:
-
-~~~~~~~~~~cpp
-namespace rapidjson {
-
-template <typename Encoding, typename Allocator = MemoryPoolAllocator<> >
-class GenericValue {
- // ...
-};
-
-template <typename Encoding, typename Allocator = MemoryPoolAllocator<> >
-class GenericDocument : public GenericValue<Encoding, Allocator> {
- // ...
-};
-
-typedef GenericValue<UTF8<> > Value;
-typedef GenericDocument<UTF8<> > Document;
-
-} // namespace rapidjson
-~~~~~~~~~~
-
-User can customize these template parameters.
-
-## Encoding {#Encoding}
-
-The `Encoding` parameter specifies the encoding of JSON String value in memory. Possible options are `UTF8`, `UTF16`, `UTF32`. Note that, these 3 types are also template class. `UTF8<>` is `UTF8<char>`, which means using char to store the characters. You may refer to [Encoding](doc/encoding.md) for details.
-
-Suppose a Windows application would query localization strings stored in JSON files. Unicode-enabled functions in Windows use UTF-16 (wide character) encoding. No matter what encoding was used in JSON files, we can store the strings in UTF-16 in memory.
-
-~~~~~~~~~~cpp
-using namespace rapidjson;
-
-typedef GenericDocument<UTF16<> > WDocument;
-typedef GenericValue<UTF16<> > WValue;
-
-FILE* fp = fopen("localization.json", "rb"); // non-Windows use "r"
-
-char readBuffer[256];
-FileReadStream bis(fp, readBuffer, sizeof(readBuffer));
-
-AutoUTFInputStream<unsigned, FileReadStream> eis(bis); // wraps bis into eis
-
-WDocument d;
-d.ParseStream<0, AutoUTF<unsigned> >(eis);
-
-const WValue locale(L"ja"); // Japanese
-
-MessageBoxW(hWnd, d[locale].GetString(), L"Test", MB_OK);
-~~~~~~~~~~
-
-## Allocator {#Allocator}
-
-The `Allocator` defines which allocator class is used when allocating/deallocating memory for `Document`/`Value`. `Document` owns, or references to an `Allocator` instance. On the other hand, `Value` does not do so, in order to reduce memory consumption.
-
-The default allocator used in `GenericDocument` is `MemoryPoolAllocator`. This allocator actually allocate memory sequentially, and cannot deallocate one by one. This is very suitable when parsing a JSON into a DOM tree.
-
-Another allocator is `CrtAllocator`, of which CRT is short for C RunTime library. This allocator simply calls the standard `malloc()`/`realloc()`/`free()`. When there is a lot of add and remove operations, this allocator may be preferred. But this allocator is far less efficient than `MemoryPoolAllocator`.
-
-# Parsing {#Parsing}
-
-`Document` provides several functions for parsing. In below, (1) is the fundamental function, while the others are helpers which call (1).
-
-~~~~~~~~~~cpp
-using namespace rapidjson;
-
-// (1) Fundamental
-template <unsigned parseFlags, typename SourceEncoding, typename InputStream>
-GenericDocument& GenericDocument::ParseStream(InputStream& is);
-
-// (2) Using the same Encoding for stream
-template <unsigned parseFlags, typename InputStream>
-GenericDocument& GenericDocument::ParseStream(InputStream& is);
-
-// (3) Using default parse flags
-template <typename InputStream>
-GenericDocument& GenericDocument::ParseStream(InputStream& is);
-
-// (4) In situ parsing
-template <unsigned parseFlags>
-GenericDocument& GenericDocument::ParseInsitu(Ch* str);
-
-// (5) In situ parsing, using default parse flags
-GenericDocument& GenericDocument::ParseInsitu(Ch* str);
-
-// (6) Normal parsing of a string
-template <unsigned parseFlags, typename SourceEncoding>
-GenericDocument& GenericDocument::Parse(const Ch* str);
-
-// (7) Normal parsing of a string, using same Encoding of Document
-template <unsigned parseFlags>
-GenericDocument& GenericDocument::Parse(const Ch* str);
-
-// (8) Normal parsing of a string, using default parse flags
-GenericDocument& GenericDocument::Parse(const Ch* str);
-~~~~~~~~~~
-
-The examples of [tutorial](doc/tutorial.md) uses (8) for normal parsing of string. The examples of [stream](doc/stream.md) uses the first three. *In situ* parsing will be described soon.
-
-The `parseFlags` are combination of the following bit-flags:
-
-Parse flags | Meaning
-------------------------------|-----------------------------------
-`kParseNoFlags` | No flag is set.
-`kParseDefaultFlags` | Default parse flags. It is equal to macro `RAPIDJSON_PARSE_DEFAULT_FLAGS`, which is defined as `kParseNoFlags`.
-`kParseInsituFlag` | In-situ(destructive) parsing.
-`kParseValidateEncodingFlag` | Validate encoding of JSON strings.
-`kParseIterativeFlag` | Iterative(constant complexity in terms of function call stack size) parsing.
-`kParseStopWhenDoneFlag` | After parsing a complete JSON root from stream, stop further processing the rest of stream. When this flag is used, parser will not generate `kParseErrorDocumentRootNotSingular` error. Using this flag for parsing multiple JSONs in the same stream.
-`kParseFullPrecisionFlag` | Parse number in full precision (slower). If this flag is not set, the normal precision (faster) is used. Normal precision has maximum 3 [ULP](http://en.wikipedia.org/wiki/Unit_in_the_last_place) error.
-`kParseCommentsFlag` | Allow one-line `// ...` and multi-line `/* ... */` comments (relaxed JSON syntax).
-
-By using a non-type template parameter, instead of a function parameter, C++ compiler can generate code which is optimized for specified combinations, improving speed, and reducing code size (if only using a single specialization). The downside is the flags needed to be determined in compile-time.
-
-The `SourceEncoding` parameter defines what encoding is in the stream. This can be differed to the `Encoding` of the `Document`. See [Transcoding and Validation](#TranscodingAndValidation) section for details.
-
-And the `InputStream` is type of input stream.
-
-## Parse Error {#ParseError}
-
-When the parse processing succeeded, the `Document` contains the parse results. When there is an error, the original DOM is *unchanged*. And the error state of parsing can be obtained by `bool HasParseError()`, `ParseErrorCode GetParseError()` and `size_t GetParseOffset()`.
-
-Parse Error Code | Description
---------------------------------------------|---------------------------------------------------
-`kParseErrorNone` | No error.
-`kParseErrorDocumentEmpty` | The document is empty.
-`kParseErrorDocumentRootNotSingular` | The document root must not follow by other values.
-`kParseErrorValueInvalid` | Invalid value.
-`kParseErrorObjectMissName` | Missing a name for object member.
-`kParseErrorObjectMissColon` | Missing a colon after a name of object member.
-`kParseErrorObjectMissCommaOrCurlyBracket` | Missing a comma or `}` after an object member.
-`kParseErrorArrayMissCommaOrSquareBracket` | Missing a comma or `]` after an array element.
-`kParseErrorStringUnicodeEscapeInvalidHex` | Incorrect hex digit after `\\u` escape in string.
-`kParseErrorStringUnicodeSurrogateInvalid` | The surrogate pair in string is invalid.
-`kParseErrorStringEscapeInvalid` | Invalid escape character in string.
-`kParseErrorStringMissQuotationMark` | Missing a closing quotation mark in string.
-`kParseErrorStringInvalidEncoding` | Invalid encoding in string.
-`kParseErrorNumberTooBig` | Number too big to be stored in `double`.
-`kParseErrorNumberMissFraction` | Miss fraction part in number.
-`kParseErrorNumberMissExponent` | Miss exponent in number.
-
-The offset of error is defined as the character number from beginning of stream. Currently RapidJSON does not keep track of line number.
-
-To get an error message, RapidJSON provided a English messages in `rapidjson/error/en.h`. User can customize it for other locales, or use a custom localization system.
-
-Here shows an example of parse error handling.
-
-~~~~~~~~~~cpp
-#include "rapidjson/document.h"
-#include "rapidjson/error/en.h"
-
-// ...
-Document d;
-if (d.Parse(json).HasParseError()) {
- fprintf(stderr, "\nError(offset %u): %s\n",
- (unsigned)d.GetErrorOffset(),
- GetParseError_En(d.GetParseErrorCode()));
- // ...
-}
-~~~~~~~~~~
-
-## In Situ Parsing {#InSituParsing}
-
-From [Wikipedia](http://en.wikipedia.org/wiki/In_situ):
-
-> *In situ* ... is a Latin phrase that translates literally to "on site" or "in position". It means "locally", "on site", "on the premises" or "in place" to describe an event where it takes place, and is used in many different contexts.
-> ...
-> (In computer science) An algorithm is said to be an in situ algorithm, or in-place algorithm, if the extra amount of memory required to execute the algorithm is O(1), that is, does not exceed a constant no matter how large the input. For example, heapsort is an in situ sorting algorithm.
-
-In normal parsing process, a large overhead is to decode JSON strings and copy them to other buffers. *In situ* parsing decodes those JSON string at the place where it is stored. It is possible in JSON because the length of decoded string is always shorter than or equal to the one in JSON. In this context, decoding a JSON string means to process the escapes, such as `"\n"`, `"\u1234"`, etc., and add a null terminator (`'\0'`)at the end of string.
-
-The following diagrams compare normal and *in situ* parsing. The JSON string values contain pointers to the decoded string.
-
-![normal parsing](diagram/normalparsing.png)
-
-In normal parsing, the decoded string are copied to freshly allocated buffers. `"\\n"` (2 characters) is decoded as `"\n"` (1 character). `"\\u0073"` (6 characters) is decoded as `"s"` (1 character).
-
-![instiu parsing](diagram/insituparsing.png)
-
-*In situ* parsing just modified the original JSON. Updated characters are highlighted in the diagram. If the JSON string does not contain escape character, such as `"msg"`, the parsing process merely replace the closing double quotation mark with a null character.
-
-Since *in situ* parsing modify the input, the parsing API needs `char*` instead of `const char*`.
-
-~~~~~~~~~~cpp
-// Read whole file into a buffer
-FILE* fp = fopen("test.json", "r");
-fseek(fp, 0, SEEK_END);
-size_t filesize = (size_t)ftell(fp);
-fseek(fp, 0, SEEK_SET);
-char* buffer = (char*)malloc(filesize + 1);
-size_t readLength = fread(buffer, 1, filesize, fp);
-buffer[readLength] = '\0';
-fclose(fp);
-
-// In situ parsing the buffer into d, buffer will also be modified
-Document d;
-d.ParseInsitu(buffer);
-
-// Query/manipulate the DOM here...
-
-free(buffer);
-// Note: At this point, d may have dangling pointers pointed to the deallocated buffer.
-~~~~~~~~~~
-
-The JSON strings are marked as const-string. But they may not be really "constant". The life cycle of it depends on the JSON buffer.
-
-In situ parsing minimizes allocation overheads and memory copying. Generally this improves cache coherence, which is an important factor of performance in modern computer.
-
-There are some limitations of *in situ* parsing:
-
-1. The whole JSON is in memory.
-2. The source encoding in stream and target encoding in document must be the same.
-3. The buffer need to be retained until the document is no longer used.
-4. If the DOM need to be used for long period after parsing, and there are few JSON strings in the DOM, retaining the buffer may be a memory waste.
-
-*In situ* parsing is mostly suitable for short-term JSON that only need to be processed once, and then be released from memory. In practice, these situation is very common, for example, deserializing JSON to C++ objects, processing web requests represented in JSON, etc.
-
-## Transcoding and Validation {#TranscodingAndValidation}
-
-RapidJSON supports conversion between Unicode formats (officially termed UCS Transformation Format) internally. During DOM parsing, the source encoding of the stream can be different from the encoding of the DOM. For example, the source stream contains a UTF-8 JSON, while the DOM is using UTF-16 encoding. There is an example code in [EncodedInputStream](doc/stream.md).
-
-When writing a JSON from DOM to output stream, transcoding can also be used. An example is in [EncodedOutputStream](doc/stream.md).
-
-During transcoding, the source string is decoded to into Unicode code points, and then the code points are encoded in the target format. During decoding, it will validate the byte sequence in the source string. If it is not a valid sequence, the parser will be stopped with `kParseErrorStringInvalidEncoding` error.
-
-When the source encoding of stream is the same as encoding of DOM, by default, the parser will *not* validate the sequence. User may use `kParseValidateEncodingFlag` to force validation.
-
-# Techniques {#Techniques}
-
-Some techniques about using DOM API is discussed here.
-
-## DOM as SAX Event Publisher
-
-In RapidJSON, stringifying a DOM with `Writer` may be look a little bit weired.
-
-~~~~~~~~~~cpp
-// ...
-Writer<StringBuffer> writer(buffer);
-d.Accept(writer);
-~~~~~~~~~~
-
-Actually, `Value::Accept()` is responsible for publishing SAX events about the value to the handler. With this design, `Value` and `Writer` are decoupled. `Value` can generate SAX events, and `Writer` can handle those events.
-
-User may create custom handlers for transforming the DOM into other formats. For example, a handler which converts the DOM into XML.
-
-For more about SAX events and handler, please refer to [SAX](doc/sax.md).
-
-## User Buffer {#UserBuffer}
-
-Some applications may try to avoid memory allocations whenever possible.
-
-`MemoryPoolAllocator` can support this by letting user to provide a buffer. The buffer can be on the program stack, or a "scratch buffer" which is statically allocated (a static/global array) for storing temporary data.
-
-`MemoryPoolAllocator` will use the user buffer to satisfy allocations. When the user buffer is used up, it will allocate a chunk of memory from the base allocator (by default the `CrtAllocator`).
-
-Here is an example of using stack memory. The first allocator is for storing values, while the second allocator is for storing temporary data during parsing.
-
-~~~~~~~~~~cpp
-typedef GenericDocument<UTF8<>, MemoryPoolAllocator<>, MemoryPoolAllocator<>> DocumentType;
-char valueBuffer[4096];
-char parseBuffer[1024];
-MemoryPoolAllocator<> valueAllocator(valueBuffer, sizeof(valueBuffer));
-MemoryPoolAllocator<> parseAllocator(parseBuffer, sizeof(parseBuffer));
-DocumentType d(&valueAllocator, sizeof(parseBuffer), &parseAllocator);
-d.Parse(json);
-~~~~~~~~~~
-
-If the total size of allocation is less than 4096+1024 bytes during parsing, this code does not invoke any heap allocation (via `new` or `malloc()`) at all.
-
-User can query the current memory consumption in bytes via `MemoryPoolAllocator::Size()`. And then user can determine a suitable size of user buffer.
diff --git a/3rdparty/rapidjson/doc/dom.zh-cn.md b/3rdparty/rapidjson/doc/dom.zh-cn.md
deleted file mode 100644
index 2adf34354b5..00000000000
--- a/3rdparty/rapidjson/doc/dom.zh-cn.md
+++ /dev/null
@@ -1,281 +0,0 @@
-# DOM
-
-文档对象模型(Document Object Model, DOM)是一ç§ç½äºŽå†…存中的JSON表示方å¼ï¼Œä»¥ä¾›æŸ¥è¯¢åŠæ“作。我们己于[教程](doc/tutorial.md)中介ç»äº†DOM的基本用法,本节将讲述一些细节åŠé«˜çº§ç”¨æ³•。
-
-[TOC]
-
-# æ¨¡æ¿ {#Template}
-
-教程中使用了`Value`å’Œ`Document`类型。与`std::string`相似,这些类型其实是两个模æ¿ç±»çš„`typedef`:
-
-~~~~~~~~~~cpp
-namespace rapidjson {
-
-template <typename Encoding, typename Allocator = MemoryPoolAllocator<> >
-class GenericValue {
- // ...
-};
-
-template <typename Encoding, typename Allocator = MemoryPoolAllocator<> >
-class GenericDocument : public GenericValue<Encoding, Allocator> {
- // ...
-};
-
-typedef GenericValue<UTF8<> > Value;
-typedef GenericDocument<UTF8<> > Document;
-
-} // namespace rapidjson
-~~~~~~~~~~
-
-使用者å¯ä»¥è‡ªå®šä¹‰è¿™äº›æ¨¡æ¿å‚数。
-
-## ç¼–ç  {#Encoding}
-
-`Encoding`傿•°æŒ‡æ˜Žåœ¨å†…存中的JSON String使用哪ç§ç¼–ç ã€‚å¯è¡Œçš„选项有`UTF8`ã€`UTF16`ã€`UTF32`ã€‚è¦æ³¨æ„è¿™3个类型其实也是模æ¿ç±»ã€‚`UTF8<>`ç­‰åŒ`UTF8<char>`,这代表它使用`char`æ¥å­˜å‚¨å­—符串。更多细节å¯ä»¥å‚考[ç¼–ç ](encoding.md)。
-
-这里是一个例å­ã€‚å‡è®¾ä¸€ä¸ªWindows应用软件希望查询存储于JSON中的本地化字符串。Windows中å«Unicode的函数使用UTF-16(宽字符)编ç ã€‚无论JSON文件使用哪ç§ç¼–ç ï¼Œæˆ‘们都å¯ä»¥æŠŠå­—符串以UTF-16å½¢å¼å­˜å‚¨åœ¨å†…存。
-
-~~~~~~~~~~cpp
-using namespace rapidjson;
-
-typedef GenericDocument<UTF16<> > WDocument;
-typedef GenericValue<UTF16<> > WValue;
-
-FILE* fp = fopen("localization.json", "rb"); // éžWindowså¹³å°ä½¿ç”¨"r"
-
-char readBuffer[256];
-FileReadStream bis(fp, readBuffer, sizeof(readBuffer));
-
-AutoUTFInputStream<unsigned, FileReadStream> eis(bis); // 包装bisæˆeis
-
-WDocument d;
-d.ParseStream<0, AutoUTF<unsigned> >(eis);
-
-const WValue locale(L"ja"); // Japanese
-
-MessageBoxW(hWnd, d[locale].GetString(), L"Test", MB_OK);
-~~~~~~~~~~
-
-## 分é…器 {#Allocator}
-
-`Allocator`定义当`Document`/`Value`åˆ†é…æˆ–释放内存时使用那个分é…类。`Document`拥有或引用到一个`Allocator`实例。而为了节çœå†…存,`Value`没有这么åšã€‚
-
-`GenericDocument`的缺çœåˆ†é…器是`MemoryPoolAllocator`。此分é…器实际上会顺åºåœ°åˆ†é…内存,并且ä¸èƒ½é€ä¸€é‡Šæ”¾ã€‚当è¦è§£æžä¸€ä¸ªJSON并生æˆDOM,这ç§åˆ†é…器是éžå¸¸åˆé€‚的。
-
-RapidJSON还æä¾›å¦ä¸€ä¸ªåˆ†é…器`CrtAllocator`,当中CRT是Cè¿è¡Œåº“(C RunTime library)的缩写。此分é…器简å•地读用标准的`malloc()`/`realloc()`/`free()`。当我们需è¦è®¸å¤šå¢žå‡æ“作,这ç§åˆ†é…器会更为适åˆã€‚然而这ç§åˆ†é…器远远比`MemoryPoolAllocator`低效。
-
-# è§£æž {#Parsing}
-
-`Document`æä¾›å‡ ä¸ªè§£æžå‡½æ•°ã€‚以下的(1)是根本的函数,其他都是调用(1)çš„å助函数。
-
-~~~~~~~~~~cpp
-using namespace rapidjson;
-
-// (1) 根本
-template <unsigned parseFlags, typename SourceEncoding, typename InputStream>
-GenericDocument& GenericDocument::ParseStream(InputStream& is);
-
-// (2) 使用æµçš„ç¼–ç 
-template <unsigned parseFlags, typename InputStream>
-GenericDocument& GenericDocument::ParseStream(InputStream& is);
-
-// (3) ä½¿ç”¨ç¼ºçœæ ‡å¿—
-template <typename InputStream>
-GenericDocument& GenericDocument::ParseStream(InputStream& is);
-
-// (4) 原ä½è§£æž
-template <unsigned parseFlags>
-GenericDocument& GenericDocument::ParseInsitu(Ch* str);
-
-// (5) 原ä½è§£æžï¼Œä½¿ç”¨ç¼ºçœæ ‡å¿—
-GenericDocument& GenericDocument::ParseInsitu(Ch* str);
-
-// (6) 正常解æžä¸€ä¸ªå­—符串
-template <unsigned parseFlags, typename SourceEncoding>
-GenericDocument& GenericDocument::Parse(const Ch* str);
-
-// (7) 正常解æžä¸€ä¸ªå­—符串,使用Document的编ç 
-template <unsigned parseFlags>
-GenericDocument& GenericDocument::Parse(const Ch* str);
-
-// (8) 正常解æžä¸€ä¸ªå­—ç¬¦ä¸²ï¼Œä½¿ç”¨ç¼ºçœæ ‡å¿—
-GenericDocument& GenericDocument::Parse(const Ch* str);
-~~~~~~~~~~
-
-[教程](tutorial.md)中的例使用(8)去正常解æžå­—符串。而[æµ](stream.md)的例å­ä½¿ç”¨å‰3个函数。我们将ç¨åŽä»‹ç»åŽŸä½ï¼ˆ*In situ*) è§£æžã€‚
-
-`parseFlags`æ˜¯ä»¥ä¸‹ä½æ ‡ç½®çš„组åˆï¼š
-
-è§£æžä½æ ‡å¿— | æ„义
-------------------------------|-----------------------------------
-`kParseNoFlags` | 没有任何标志。
-`kParseDefaultFlags` | 缺çœçš„è§£æžé€‰é¡¹ã€‚它等于`RAPIDJSON_PARSE_DEFAULT_FLAGS`å®ï¼Œæ­¤å®å®šä¹‰ä¸º`kParseNoFlags`。
-`kParseInsituFlag` | 原ä½ï¼ˆç ´å性)解æžã€‚
-`kParseValidateEncodingFlag` | 校验JSON字符串的编ç ã€‚
-`kParseIterativeFlag` | 迭代å¼ï¼ˆè°ƒç”¨å †æ ˆå¤§å°ä¸ºå¸¸æ•°å¤æ‚度)解æžã€‚
-`kParseStopWhenDoneFlag` | 当从æµè§£æžäº†ä¸€ä¸ªå®Œæ•´çš„JSON根节点之åŽï¼Œåœæ­¢ç»§ç»­å¤„ç†ä½™ä¸‹çš„æµã€‚å½“ä½¿ç”¨äº†æ­¤æ ‡å¿—ï¼Œè§£æžå™¨ä¾¿ä¸ä¼šäº§ç”Ÿ`kParseErrorDocumentRootNotSingular`错误。å¯ä½¿ç”¨æœ¬æ ‡å¿—去解æžåŒä¸€ä¸ªæµé‡Œçš„多个JSON。
-`kParseFullPrecisionFlag` | ä½¿ç”¨å®Œæ•´çš„ç²¾ç¡®åº¦åŽ»è§£æžæ•°å­—(较慢)。如ä¸è®¾ç½®æ­¤æ ‡èŠ‚ï¼Œåˆ™ä¼šä½¿ç”¨æ­£å¸¸çš„ç²¾ç¡®åº¦ï¼ˆè¾ƒå¿«ï¼‰ã€‚æ­£å¸¸ç²¾ç¡®åº¦ä¼šæœ‰æœ€å¤š3个[ULP](http://en.wikipedia.org/wiki/Unit_in_the_last_place)的误差。
-`kParseCommentsFlag` | 容许å•行 `// ...` åŠå¤šè¡Œ `/* ... */` 注释(放宽的JSON语法)。
-
-由于使用了éžç±»åž‹æ¨¡æ¿å‚æ•°ï¼Œè€Œä¸æ˜¯å‡½æ•°å‚数,C++编译器能为个别组åˆç”Ÿæˆä»£ç ï¼Œä»¥æ”¹å–„性能åŠå‡å°‘代ç å°ºå¯¸ï¼ˆå½“åªç”¨å•ç§ç‰¹åŒ–)。缺点是需è¦åœ¨ç¼–译期决定标志。
-
-`SourceEncoding`傿•°å®šä¹‰æµä½¿ç”¨äº†ä»€ä¹ˆç¼–ç ã€‚这与`Document`çš„`Encoding`ä¸ç›¸åŒã€‚细节å¯å‚考[转ç å’Œæ ¡éªŒ](#TranscodingAndValidation)一节。
-
-此外`InputStream`是输入æµçš„类型。
-
-## è§£æžé”™è¯¯ {#ParseError}
-
-当解æžè¿‡ç¨‹é¡ºåˆ©å®Œæˆï¼Œ`Document`ä¾¿ä¼šå«æœ‰è§£æžç»“果。当过程出现错误,原æ¥çš„DOM会*ç»´æŒä¸ä¾¿*。å¯ä½¿ç”¨`bool HasParseError()`ã€`ParseErrorCode GetParseError()`åŠ`size_t GetParseOffset()`获å–è§£æžçš„错误状æ€ã€‚
-
-è§£æžé”™è¯¯ä»£å· | æè¿°
---------------------------------------------|---------------------------------------------------
-`kParseErrorNone` | 无错误。
-`kParseErrorDocumentEmpty` | 文档是空的。
-`kParseErrorDocumentRootNotSingular` | 文档的根åŽé¢ä¸èƒ½æœ‰å…¶å®ƒå€¼ã€‚
-`kParseErrorValueInvalid` | ä¸åˆæ³•的值。
-`kParseErrorObjectMissName` | Objectæˆå‘˜ç¼ºå°‘å字。
-`kParseErrorObjectMissColon` | Objectæˆå‘˜åå­—åŽç¼ºå°‘冒å·ã€‚
-`kParseErrorObjectMissCommaOrCurlyBracket` | Objectæˆå‘˜åŽç¼ºå°‘逗巿ˆ–`}`。
-`kParseErrorArrayMissCommaOrSquareBracket` | Array元素åŽç¼ºå°‘逗巿ˆ–`]` 。
-`kParseErrorStringUnicodeEscapeInvalidHex` | String中的`\\u`转义符åŽå«éžåå…­è¿›ä½æ•°å­—。
-`kParseErrorStringUnicodeSurrogateInvalid` | String中的代ç†å¯¹ï¼ˆsurrogate pair)ä¸åˆæ³•。
-`kParseErrorStringEscapeInvalid` | Stringå«éžæ³•转义字符。
-`kParseErrorStringMissQuotationMark` | String缺少关闭引å·ã€‚
-`kParseErrorStringInvalidEncoding` | Stringå«éžæ³•ç¼–ç ã€‚
-`kParseErrorNumberTooBig` | Number的值太大,ä¸èƒ½å­˜å‚¨äºŽ`double`。
-`kParseErrorNumberMissFraction` | Numberç¼ºå°‘äº†å°æ•°éƒ¨åˆ†ã€‚
-`kParseErrorNumberMissExponent` | Number缺少了指数。
-
-错误的åç§»é‡å®šä¹‰ä¸ºä»Žæµå¼€å§‹è‡³é”™è¯¯å¤„的字符数é‡ã€‚ç›®å‰RapidJSONä¸è®°å½•错误行å·ã€‚
-
-è¦å–得错误讯æ¯ï¼ŒRapidJSON在`rapidjson/error/en.h`中æä¾›äº†è‹±æ–‡é”™è¯¯è®¯æ¯ã€‚使用者å¯ä»¥ä¿®æ”¹å®ƒç”¨äºŽå…¶ä»–语言环境,或使用一个自定义的本地化系统。
-
-以下是一个处ç†é”™è¯¯çš„例å­ã€‚
-
-~~~~~~~~~~cpp
-#include "rapidjson/document.h"
-#include "rapidjson/error/en.h"
-
-// ...
-Document d;
-if (d.Parse(json).HasParseError()) {
- fprintf(stderr, "\nError(offset %u): %s\n",
- (unsigned)d.GetErrorOffset(),
- GetParseError_En(d.GetParseErrorCode()));
- // ...
-}
-~~~~~~~~~~
-
-## 原ä½è§£æž {#InSituParsing}
-
-æ ¹æ®[维基百科](http://en.wikipedia.org/wiki/In_situ):
-
-> *In situ* ... is a Latin phrase that translates literally to "on site" or "in position". It means "locally", "on site", "on the premises" or "in place" to describe an event where it takes place, and is used in many different contexts.
-> ...
-> (In computer science) An algorithm is said to be an in situ algorithm, or in-place algorithm, if the extra amount of memory required to execute the algorithm is O(1), that is, does not exceed a constant no matter how large the input. For example, heapsort is an in situ sorting algorithm.
-
-> 翻译:*In situ*â€¦â€¦æ˜¯ä¸€ä¸ªæ‹‰ä¸æ–‡ç‰‡è¯­ï¼Œå­—é¢ä¸Šçš„æ„æ€æ˜¯æŒ‡ã€ŒçŽ°åœºã€ã€ã€Œåœ¨ä½ç½®ã€ã€‚在许多ä¸åŒè¯­å¢ƒä¸­ï¼Œå®ƒæè¿°ä¸€ä¸ªäº‹ä»¶å‘生的ä½ç½®ï¼Œæ„指「本地ã€ã€ã€ŒçŽ°åœºã€ã€ã€Œåœ¨å¤„所ã€ã€ã€Œå°±ä½ã€ã€‚
-> ……
-> (在计算机科学中)一个算法若称为原ä½ç®—法,或在ä½ç®—法,是指执行该算法所需的é¢å¤–内存空间是O(1)的,æ¢å¥è¯è¯´ï¼Œæ— è®ºè¾“入大å°éƒ½åªéœ€è¦å¸¸æ•°ç©ºé—´ã€‚ä¾‹å¦‚ï¼Œå †æŽ’åºæ˜¯ä¸€ä¸ªåŽŸä½æŽ’åºç®—法。
-
-在正常的解æžè¿‡ç¨‹ä¸­ï¼Œå¯¹JSON stringè§£ç å¹¶å¤åˆ¶è‡³å…¶ä»–缓冲区是一个很大的开销。原ä½è§£æžï¼ˆ*in situ* parsing)把这些JSON string直接解ç äºŽå®ƒåŽŸæ¥å­˜å‚¨çš„地方。由于解ç åŽçš„string长度总是短于或等于原æ¥å‚¨å­˜äºŽJSONçš„string,所以这是å¯è¡Œçš„。在这个语境下,对JSON stringè¿›è¡Œè§£ç æ˜¯æŒ‡å¤„ç†è½¬ä¹‰ç¬¦ï¼Œå¦‚`"\n"`ã€`"\u1234"`等,以åŠåœ¨string末端加入空终止符å·(`'\0'`)。
-
-以下的图比较正常åŠåŽŸä½è§£æžã€‚JSON stringå€¼åŒ…å«æŒ‡å‘è§£ç åŽçš„字符串。
-
-![正常解æž](diagram/normalparsing.png)
-
-在正常解æžä¸­ï¼Œè§£ç åŽçš„字符串被å¤åˆ¶è‡³å…¨æ–°åˆ†é…的缓冲区中。`"\\n"`(2ä¸ªå­—ç¬¦ï¼‰è¢«è§£ç æˆ`"\n"`(1个字符)。`"\\u0073"`(6ä¸ªå­—ç¬¦ï¼‰è¢«è§£ç æˆ`"s"`(1个字符)。
-
-![原ä½è§£æž](diagram/insituparsing.png)
-
-原ä½è§£æžç›´æŽ¥ä¿®æ”¹äº†åŽŸæ¥çš„JSON。图中高亮了被更新的字符。若JSON stringä¸å«è½¬ä¹‰ç¬¦ï¼Œä¾‹å¦‚`"msg"`,那么解æžè¿‡ç¨‹ä»…仅是以空字符代替结æŸåŒå¼•å·ã€‚
-
-由于原ä½è§£æžä¿®æ”¹äº†è¾“入,其解æžAPI需è¦`char*`而éž`const char*`。
-
-~~~~~~~~~~cpp
-// 把整个文件读入buffer
-FILE* fp = fopen("test.json", "r");
-fseek(fp, 0, SEEK_END);
-size_t filesize = (size_t)ftell(fp);
-fseek(fp, 0, SEEK_SET);
-char* buffer = (char*)malloc(filesize + 1);
-size_t readLength = fread(buffer, 1, filesize, fp);
-buffer[readLength] = '\0';
-fclose(fp);
-
-// 原ä½è§£æžbuffer至d,buffer内容会被修改。
-Document d;
-d.ParseInsitu(buffer);
-
-// 在此查询ã€ä¿®æ”¹DOM……
-
-free(buffer);
-// 注æ„:在这个ä½ç½®ï¼Œdå¯èƒ½å«æœ‰æŒ‡å‘已被释放的buffer的悬空指针
-~~~~~~~~~~
-
-JSON string会被打上const-string的标志。但它们å¯èƒ½å¹¶éžçœŸæ­£çš„「常数ã€ã€‚它的生命周期å–决于存储JSON的缓冲区。
-
-原ä½è§£æžæŠŠåˆ†é…开销åŠå†…å­˜å¤åˆ¶å‡è‡³æœ€å°ã€‚通常这样åšèƒ½æ”¹å–„缓存一致性,而这对现代计算机æ¥è¯´æ˜¯ä¸€ä¸ªé‡è¦çš„æ€§èƒ½å› ç´ ã€‚
-
-原ä½è§£æžæœ‰ä»¥ä¸‹é™åˆ¶ï¼š
-
-1. 整个JSON须存储在内存之中。
-2. æµçš„æ¥æºç¼“ç ä¸Žæ–‡æ¡£çš„目标编ç å¿…须相åŒã€‚
-3. 需è¦ä¿ç•™ç¼“冲区,直至文档ä¸å†è¢«ä½¿ç”¨ã€‚
-4. è‹¥DOM需è¦åœ¨è§£æžåŽè¢«é•¿æœŸä½¿ç”¨ï¼Œè€ŒDOMå†…åªæœ‰å¾ˆå°‘JSON string,ä¿ç•™ç¼“冲区å¯èƒ½é€ æˆå†…存浪费。
-
-原ä½è§£æžæœ€é€‚åˆç”¨äºŽçŸ­æœŸçš„ã€ç”¨å®Œå³å¼ƒçš„JSONã€‚å®žé™…åº”ç”¨ä¸­ï¼Œè¿™äº›åœºåˆæ˜¯éžå¸¸æ™®é的,例如ååºåˆ—化JSON至C++对象ã€å¤„ç†ä»¥JSON表示的web请求等。
-
-## 转ç ä¸Žæ ¡éªŒ {#TranscodingAndValidation}
-
-RapidJSON内部支æŒä¸åŒUnicodeæ ¼å¼ï¼ˆæ­£å¼çš„æœ¯è¯­æ˜¯UCSå˜æ¢æ ¼å¼ï¼‰é—´çš„转æ¢ã€‚在DOMè§£æžæ—¶ï¼Œæµçš„æ¥æºç¼–ç ä¸ŽDOM的编ç å¯ä»¥ä¸åŒã€‚ä¾‹å¦‚ï¼Œæ¥æºæµå¯èƒ½å«æœ‰UTF-8çš„JSON,而DOM则使用UTF-16ç¼–ç ã€‚在[EncodedInputStream](doc/stream.md)一节里有一个例å­ã€‚
-
-当从DOM输出一个JSON至输出æµä¹‹æ—¶ï¼Œä¹Ÿå¯ä»¥ä½¿ç”¨è½¬ç åŠŸèƒ½ã€‚åœ¨[EncodedOutputStream](doc/stream.md)一节里有一个例å­ã€‚
-
-在转ç è¿‡ç¨‹ä¸­ï¼Œä¼šæŠŠæ¥æºstringè§£ç æˆUnicodeç ç‚¹ï¼Œç„¶åŽæŠŠç ç‚¹ç¼–ç æˆç›®æ ‡æ ¼å¼ã€‚åœ¨è§£ç æ—¶ï¼Œå®ƒä¼šæ ¡éªŒæ¥æºstring的字节åºåˆ—是å¦åˆæ³•。若é‡ä¸Šéžåˆæ³•åºåˆ—,解æžå™¨ä¼šåœæ­¢å¹¶è¿”回`kParseErrorStringInvalidEncoding`错误。
-
-å½“æ¥æºç¼–ç ä¸ŽDOM的编ç ç›¸åŒï¼Œè§£æžå™¨ç¼ºçœåœ°*ä¸ä¼š*校验åºåˆ—。使用者å¯å¼€å¯`kParseValidateEncodingFlag`去强制校验。
-
-# 技巧 {#Techniques}
-
-这里讨论一些DOM API的使用技巧。
-
-## 把DOM作为SAX事件å‘表者
-
-在RapidJSON中,利用`Writer`把DOM生æˆJSONçš„åšæ³•ï¼Œçœ‹æ¥æœ‰ç‚¹å¥‡æ€ªã€‚
-
-~~~~~~~~~~cpp
-// ...
-Writer<StringBuffer> writer(buffer);
-d.Accept(writer);
-~~~~~~~~~~
-
-实际上,`Value::Accept()`是负责å‘布该值相关的SAX事件至处ç†å™¨çš„。通过这个设计,`Value`åŠ`Writer`解除了å¶åˆã€‚`Value`å¯ç”ŸæˆSAX事件,而`Writer`则å¯ä»¥å¤„ç†è¿™äº›äº‹ä»¶ã€‚
-
-使用者å¯ä»¥åˆ›å»ºè‡ªå®šä¹‰çš„处ç†å™¨ï¼ŒåŽ»æŠŠDOMè½¬æ¢æˆå…¶å®ƒæ ¼å¼ã€‚例如,一个把DOMè½¬æ¢æˆXML的处ç†å™¨ã€‚
-
-è¦çŸ¥é“更多关于SAX事件与处ç†å™¨ï¼Œå¯å‚阅[SAX](doc/sax.md)。
-
-## 使用者缓冲区{ #UserBuffer}
-
-许多应用软件å¯èƒ½éœ€è¦å°½é‡å‡å°‘内存分é…。
-
-`MemoryPoolAllocator`å¯ä»¥å¸®åŠ©è¿™æ–¹é¢ï¼Œå®ƒå®¹è®¸ä½¿ç”¨è€…æä¾›ä¸€ä¸ªç¼“冲区。该缓冲区å¯èƒ½ç½®äºŽç¨‹åºå †æ ˆï¼Œæˆ–æ˜¯ä¸€ä¸ªé™æ€åˆ†é…的「è‰ç¨¿ç¼“冲区(scratch buffer)ã€ï¼ˆä¸€ä¸ªé™æ€ï¼å…¨å±€çš„æ•°ç»„),用于储存临时数æ®ã€‚
-
-`MemoryPoolAllocator`会先用使用者缓冲区去解决分é…请求。当使用者缓冲区用完,就会从基础分é…器(缺çœä¸º`CrtAllocator`)分é…一å—内存。
-
-以下是使用堆栈内存的例å­ï¼Œç¬¬ä¸€ä¸ªåˆ†é…å™¨ç”¨äºŽå­˜å‚¨å€¼ï¼Œç¬¬äºŒä¸ªç”¨äºŽè§£æžæ—¶çš„临时缓冲。
-
-~~~~~~~~~~cpp
-typedef GenericDocument<UTF8<>, MemoryPoolAllocator<>, MemoryPoolAllocator<>> DocumentType;
-char valueBuffer[4096];
-char parseBuffer[1024];
-MemoryPoolAllocator<> valueAllocator(valueBuffer, sizeof(valueBuffer));
-MemoryPoolAllocator<> parseAllocator(parseBuffer, sizeof(parseBuffer));
-DocumentType d(&valueAllocator, sizeof(parseBuffer), &parseAllocator);
-d.Parse(json);
-~~~~~~~~~~
-
-è‹¥è§£æžæ—¶åˆ†é…总é‡å°‘于4096+1024字节时,这段代ç ä¸ä¼šé€ æˆä»»ä½•堆内存分é…(ç»`new`或`malloc()`)。
-
-使用者å¯ä»¥é€šè¿‡`MemoryPoolAllocator::Size()`查询当å‰å·²åˆ†çš„内存大å°ã€‚那么使用者å¯ä»¥æ‹Ÿå®šä½¿ç”¨è€…缓冲区的åˆé€‚大å°ã€‚
diff --git a/3rdparty/rapidjson/doc/encoding.md b/3rdparty/rapidjson/doc/encoding.md
deleted file mode 100644
index e9ebe8f2149..00000000000
--- a/3rdparty/rapidjson/doc/encoding.md
+++ /dev/null
@@ -1,146 +0,0 @@
-# Encoding
-
-According to [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf),
-
-> (in Introduction) JSON text is a sequence of Unicode code points.
-
-The earlier [RFC4627](http://www.ietf.org/rfc/rfc4627.txt) stated that,
-
-> (in §3) JSON text SHALL be encoded in Unicode. The default encoding is UTF-8.
-
-> (in §6) JSON may be represented using UTF-8, UTF-16, or UTF-32. When JSON is written in UTF-8, JSON is 8bit compatible. When JSON is written in UTF-16 or UTF-32, the binary content-transfer-encoding must be used.
-
-RapidJSON supports various encodings. It can also validate the encodings of JSON, and transconding JSON among encodings. All these features are implemented internally, without the need for external libraries (e.g. [ICU](http://site.icu-project.org/)).
-
-[TOC]
-
-# Unicode {#Unicode}
-From [Unicode's official website](http://www.unicode.org/standard/WhatIsUnicode.html):
-> Unicode provides a unique number for every character,
-> no matter what the platform,
-> no matter what the program,
-> no matter what the language.
-
-Those unique numbers are called code points, which is in the range `0x0` to `0x10FFFF`.
-
-## Unicode Transformation Format {#UTF}
-
-There are various encodings for storing Unicode code points. These are called Unicode Transformation Format (UTF). RapidJSON supports the most commonly used UTFs, including
-
-* UTF-8: 8-bit variable-width encoding. It maps a code point to 1–4 bytes.
-* UTF-16: 16-bit variable-width encoding. It maps a code point to 1–2 16-bit code units (i.e., 2–4 bytes).
-* UTF-32: 32-bit fixed-width encoding. It directly maps a code point to a single 32-bit code unit (i.e. 4 bytes).
-
-For UTF-16 and UTF-32, the byte order (endianness) does matter. Within computer memory, they are often stored in the computer's endianness. However, when it is stored in file or transferred over network, we need to state the byte order of the byte sequence, either little-endian (LE) or big-endian (BE).
-
-RapidJSON provide these encodings via the structs in `rapidjson/encodings.h`:
-
-~~~~~~~~~~cpp
-namespace rapidjson {
-
-template<typename CharType = char>
-struct UTF8;
-
-template<typename CharType = wchar_t>
-struct UTF16;
-
-template<typename CharType = wchar_t>
-struct UTF16LE;
-
-template<typename CharType = wchar_t>
-struct UTF16BE;
-
-template<typename CharType = unsigned>
-struct UTF32;
-
-template<typename CharType = unsigned>
-struct UTF32LE;
-
-template<typename CharType = unsigned>
-struct UTF32BE;
-
-} // namespace rapidjson
-~~~~~~~~~~
-
-For processing text in memory, we normally use `UTF8`, `UTF16` or `UTF32`. For processing text via I/O, we may use `UTF8`, `UTF16LE`, `UTF16BE`, `UTF32LE` or `UTF32BE`.
-
-When using the DOM-style API, the `Encoding` template parameter in `GenericValue<Encoding>` and `GenericDocument<Encoding>` indicates the encoding to be used to represent JSON string in memory. So normally we will use `UTF8`, `UTF16` or `UTF32` for this template parameter. The choice depends on operating systems and other libraries that the application is using. For example, Windows API represents Unicode characters in UTF-16, while most Linux distributions and applications prefer UTF-8.
-
-Example of UTF-16 DOM declaration:
-
-~~~~~~~~~~cpp
-typedef GenericDocument<UTF16<> > WDocument;
-typedef GenericValue<UTF16<> > WValue;
-~~~~~~~~~~
-
-For a detail example, please check the example in [DOM's Encoding](doc/stream.md) section.
-
-## Character Type {#CharacterType}
-
-As shown in the declaration, each encoding has a `CharType` template parameter. Actually, it may be a little bit confusing, but each `CharType` stores a code unit, not a character (code point). As mentioned in previous section, a code point may be encoded to 1–4 code units for UTF-8.
-
-For `UTF16(LE|BE)`, `UTF32(LE|BE)`, the `CharType` must be integer type of at least 2 and 4 bytes respectively.
-
-Note that C++11 introduces `char16_t` and `char32_t`, which can be used for `UTF16` and `UTF32` respectively.
-
-## AutoUTF {#AutoUTF}
-
-Previous encodings are statically bound in compile-time. In other words, user must know exactly which encodings will be used in the memory or streams. However, sometimes we may need to read/write files of different encodings. The encoding needed to be decided in runtime.
-
-`AutoUTF` is an encoding designed for this purpose. It chooses which encoding to be used according to the input or output stream. Currently, it should be used with `EncodedInputStream` and `EncodedOutputStream`.
-
-## ASCII {#ASCII}
-
-Although the JSON standards did not mention about [ASCII](http://en.wikipedia.org/wiki/ASCII), sometimes we would like to write 7-bit ASCII JSON for applications that cannot handle UTF-8. Since any JSON can represent unicode characters in escaped sequence `\uXXXX`, JSON can always be encoded in ASCII.
-
-Here is an example for writing a UTF-8 DOM into ASCII:
-
-~~~~~~~~~~cpp
-using namespace rapidjson;
-Document d; // UTF8<>
-// ...
-StringBuffer buffer;
-Writer<StringBuffer, Document::EncodingType, ASCII<> > writer(buffer);
-d.Accept(writer);
-std::cout << buffer.GetString();
-~~~~~~~~~~
-
-ASCII can be used in input stream. If the input stream contains bytes with values above 127, it will cause `kParseErrorStringInvalidEncoding` error.
-
-ASCII *cannot* be used in memory (encoding of `Document` or target encoding of `Reader`), as it cannot represent Unicode code points.
-
-# Validation & Transcoding {#ValidationTranscoding}
-
-When RapidJSON parses a JSON, it can validate the input JSON, whether it is a valid sequence of a specified encoding. This option can be turned on by adding `kParseValidateEncodingFlag` in `parseFlags` template parameter.
-
-If the input encoding and output encoding is different, `Reader` and `Writer` will automatically transcode (convert) the text. In this case, `kParseValidateEncodingFlag` is not necessary, as it must decode the input sequence. And if the sequence was unable to be decoded, it must be invalid.
-
-## Transcoder {#Transcoder}
-
-Although the encoding functions in RapidJSON are designed for JSON parsing/generation, user may abuse them for transcoding of non-JSON strings.
-
-Here is an example for transcoding a string from UTF-8 to UTF-16:
-
-~~~~~~~~~~cpp
-#include "rapidjson/encodings.h"
-
-using namespace rapidjson;
-
-const char* s = "..."; // UTF-8 string
-StringStream source(s);
-GenericStringBuffer<UTF16<> > target;
-
-bool hasError = false;
-while (source.Peak() != '\0')
- if (!Transcoder::Transcode<UTF8<>, UTF16<> >(source, target)) {
- hasError = true;
- break;
- }
-
-if (!hasError) {
- const wchar_t* t = target.GetString();
- // ...
-}
-~~~~~~~~~~
-
-You may also use `AutoUTF` and the associated streams for setting source/target encoding in runtime.
diff --git a/3rdparty/rapidjson/doc/encoding.zh-cn.md b/3rdparty/rapidjson/doc/encoding.zh-cn.md
deleted file mode 100644
index 3435c3ab942..00000000000
--- a/3rdparty/rapidjson/doc/encoding.zh-cn.md
+++ /dev/null
@@ -1,152 +0,0 @@
-# ç¼–ç 
-
-æ ¹æ®[ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf):
-
-> (in Introduction) JSON text is a sequence of Unicode code points.
->
-> 翻译:JSON文本是Unicodeç ç‚¹çš„åºåˆ—。
-
-较早的[RFC4627](http://www.ietf.org/rfc/rfc4627.txt)申明:
-
-> (in §3) JSON text SHALL be encoded in Unicode. The default encoding is UTF-8.
->
-> 翻译:JSON文本应该以Unicodeç¼–ç ã€‚缺çœçš„ç¼–ç ä¸ºUTF-8。
-
-> (in §6) JSON may be represented using UTF-8, UTF-16, or UTF-32. When JSON is written in UTF-8, JSON is 8bit compatible. When JSON is written in UTF-16 or UTF-32, the binary content-transfer-encoding must be used.
->
-> 翻译:JSONå¯ä½¿ç”¨UTF-8ã€UTF-16或UTF-18表示。当JSON以UTF-8写入,该JSON是8ä½å…¼å®¹çš„。当JSON以UTF-16或UTF-32写入,就必须使用二进制的内容传é€ç¼–ç ã€‚
-
-RapidJSON支æŒå¤šç§ç¼–ç ã€‚它也能检查JSON的编ç ï¼Œä»¥åŠåœ¨ä¸åŒç¼–ç ä¸­è¿›è¡Œè½¬ç ã€‚所有这些功能都是在内部实现,无需使用外部的程åºåº“(如[ICU](http://site.icu-project.org/))。
-
-[TOC]
-
-# Unicode {#Unicode}
-æ ¹æ® [Unicode的官方网站](http://www.unicode.org/standard/translations/t-chinese.html):
->Unicodeç»™æ¯ä¸ªå­—符æä¾›äº†ä¸€ä¸ªå”¯ä¸€çš„æ•°å­—,
-ä¸è®ºæ˜¯ä»€ä¹ˆå¹³å°ã€
-ä¸è®ºæ˜¯ä»€ä¹ˆç¨‹åºã€
-ä¸è®ºæ˜¯ä»€ä¹ˆè¯­è¨€ã€‚
-
-这些唯一数字称为ç ç‚¹ï¼ˆcode point),其范围介乎`0x0`至`0x10FFFF`之间。
-
-## Unicodeè½¬æ¢æ ¼å¼ {#UTF}
-
-存储Unicodeç ç‚¹æœ‰å¤šç§ç¼–ç æ–¹å¼ã€‚这些称为Unicodeè½¬æ¢æ ¼å¼ï¼ˆUnicode Transformation Format, UTF)。RapidJSONæ”¯æŒæœ€å¸¸ç”¨çš„UTF,包括:
-
-* UTF-8:8ä½å¯å˜é•¿åº¦ç¼–ç ã€‚它把一个ç ç‚¹æ˜ å°„至1至4个字节。
-* UTF-16:16ä½å¯å˜é•¿åº¦ç¼–ç ã€‚它把一个ç ç‚¹æ˜ å°„至1至2个16ä½ç¼–ç å•元(å³2至4个字节)。
-* UTF-32:32ä½å›ºå®šé•¿åº¦ç¼–ç ã€‚它直接把ç ç‚¹æ˜ å°„至å•个32ä½ç¼–ç å•元(å³4字节)。
-
-对于UTF-16åŠUTF-32æ¥è¯´ï¼Œå­—节åºï¼ˆendianness)是有影å“çš„ã€‚åœ¨å†…å­˜ä¸­ï¼Œå®ƒä»¬é€šå¸¸éƒ½æ˜¯ä»¥è¯¥è®¡ç®—æœºçš„å­—èŠ‚åºæ¥å­˜å‚¨ã€‚然而,当è¦å‚¨å­˜åœ¨æ–‡ä»¶ä¸­æˆ–åœ¨ç½‘ä¸Šä¼ è¾“ï¼Œæˆ‘ä»¬éœ€è¦æŒ‡æ˜Žå­—节åºåˆ—的字节åºï¼Œæ˜¯å°ç«¯ï¼ˆlittle endian, LE)还是大端(big-endian, BE)。
-
-RapidJSON通过`rapidjson/encodings.h`中的struct去æä¾›å„ç§ç¼–ç ï¼š
-
-~~~~~~~~~~cpp
-namespace rapidjson {
-
-template<typename CharType = char>
-struct UTF8;
-
-template<typename CharType = wchar_t>
-struct UTF16;
-
-template<typename CharType = wchar_t>
-struct UTF16LE;
-
-template<typename CharType = wchar_t>
-struct UTF16BE;
-
-template<typename CharType = unsigned>
-struct UTF32;
-
-template<typename CharType = unsigned>
-struct UTF32LE;
-
-template<typename CharType = unsigned>
-struct UTF32BE;
-
-} // namespace rapidjson
-~~~~~~~~~~
-
-对于在内存中的文本,我们正常会使用`UTF8`ã€`UTF16`或`UTF32`。对于处ç†ç»è¿‡I/O的文本,我们å¯ä½¿ç”¨`UTF8`ã€`UTF16LE`ã€`UTF16BE`ã€`UTF32LE`或`UTF32BE`。
-
-当使用DOM风格的API,`GenericValue<Encoding>`åŠ`GenericDocument<Encoding>`里的`Encoding`模æ¿å‚数是用于指明内存中存储的JSON字符串使用哪ç§ç¼–ç ã€‚å› æ­¤é€šå¸¸æˆ‘ä»¬ä¼šåœ¨æ­¤å‚æ•°ä¸­ä½¿ç”¨`UTF8`ã€`UTF16`或`UTF32`。如何选择,视乎应用软件所使用的æ“作系统åŠå…¶ä»–程åºåº“。例如,Windows API使用UTF-16表示Unicode字符,而多数的Linuxå‘行版本åŠåº”用软件则更喜欢UTF-8。
-
-使用UTF-16çš„DOM声明例å­ï¼š
-
-~~~~~~~~~~cpp
-typedef GenericDocument<UTF16<> > WDocument;
-typedef GenericValue<UTF16<> > WValue;
-~~~~~~~~~~
-
-å¯ä»¥åœ¨[DOM's Encoding](doc/stream.md)一节看到更详细的使用例å­ã€‚
-
-## 字符类型 {#CharacterType}
-
-从之å‰çš„声明中å¯ä»¥çœ‹åˆ°ï¼Œæ¯ä¸ªç¼–ç éƒ½æœ‰ä¸€ä¸ª`CharType`模æ¿å‚数。这å¯èƒ½æ¯”较容易混淆,实际上,æ¯ä¸ª`CharType`存储一个编ç å•å…ƒï¼Œè€Œä¸æ˜¯ä¸€ä¸ªå­—符(ç ç‚¹ï¼‰ã€‚如之剿‰€è°ˆåŠï¼Œåœ¨UTF-8中一个ç ç‚¹å¯èƒ½ä¼šç¼–ç æˆ1至4个编ç å•元。
-
-对于`UTF16(LE|BE)`åŠ`UTF32(LE|BE)`æ¥è¯´ï¼Œ`CharType`必须分别是一个至少2åŠ4字节的整数类型。
-
-注æ„C++11新添了`char16_t`åŠ`char32_t`类型,也å¯åˆ†åˆ«ç”¨äºŽ`UTF16`åŠ`UTF32`。
-
-## AutoUTF {#AutoUTF}
-
-上述所介ç»çš„ç¼–ç éƒ½æ˜¯åœ¨ç¼–è¯‘æœŸé™æ€æŒ·å®šçš„。æ¢å¥è¯è¯´ï¼Œä½¿ç”¨è€…必须知é“内存或æµä¹‹ä¸­ä½¿ç”¨äº†å“ªç§ç¼–ç ã€‚然而,有时候我们å¯èƒ½éœ€è¦è¯»å†™ä¸åŒç¼–ç çš„æ–‡ä»¶ï¼Œè€Œä¸”这些编ç éœ€è¦åœ¨è¿è¡Œæ—¶æ‰èƒ½å†³å®šã€‚
-
-`AutoUTF`是为此而设计的编ç ã€‚它根æ®è¾“å…¥æˆ–è¾“å‡ºæµæ¥é€‰æ‹©ä½¿ç”¨å“ªç§ç¼–ç ã€‚ç›®å‰å®ƒåº”该与`EncodedInputStream`åŠ`EncodedOutputStream`结åˆä½¿ç”¨ã€‚
-
-## ASCII {#ASCII}
-
-虽然JSON标准并未æåŠ[ASCII](http://en.wikipedia.org/wiki/ASCII),有时候我们希望写入7ä½çš„ASCII JSON,以供未能处ç†UTF-8的应用程åºä½¿ç”¨ã€‚由于任JSON都å¯ä»¥æŠŠUnicode字符表示为`\uXXXX`转义åºåˆ—,JSON总是å¯ç”¨ASCIIæ¥ç¼–ç ã€‚
-
-ä»¥ä¸‹çš„ä¾‹å­æŠŠUTF-8çš„DOM写æˆASCIIçš„JSON:
-
-~~~~~~~~~~cpp
-using namespace rapidjson;
-Document d; // UTF8<>
-// ...
-StringBuffer buffer;
-Writer<StringBuffer, Document::EncodingType, ASCII<> > writer(buffer);
-d.Accept(writer);
-std::cout << buffer.GetString();
-~~~~~~~~~~
-
-ASCIIå¯ç”¨äºŽè¾“å…¥æµã€‚当输入æµåŒ…å«å¤§äºŽ127的字节,就会导致`kParseErrorStringInvalidEncoding`错误。
-
-ASCII *ä¸èƒ½* 用于内存(`Document`的编ç ï¼Œæˆ–`Reader`的目标编ç ),因为它ä¸èƒ½è¡¨ç¤ºUnicodeç ç‚¹ã€‚
-
-# 校验åŠè½¬ç  {#ValidationTranscoding}
-
-当RapidJSONè§£æžä¸€ä¸ªJSON时,它能校验输入JSONï¼Œåˆ¤æ–­å®ƒæ˜¯å¦æ‰€æ ‡æ˜Žç¼–ç çš„åˆæ³•åºåˆ—。è¦å¼€å¯æ­¤é€‰é¡¹ï¼Œè¯·æŠŠ`kParseValidateEncodingFlag`加入`parseFlags`模æ¿å‚数。
-
-若输入编ç å’Œè¾“出编ç å¹¶ä¸ç›¸åŒï¼Œ`Reader`åŠ`Writer`会算把文本转ç ã€‚åœ¨è¿™ç§æƒ…况下,并ä¸éœ€è¦`kParseValidateEncodingFlag`,因为它必须解ç è¾“å…¥åºåˆ—。若åºåˆ—ä¸èƒ½è¢«è§£ç ï¼Œå®ƒå¿…然是ä¸åˆæ³•的。
-
-## 转ç å™¨ {#Transcoder}
-
-虽然RapidJSON的编ç åŠŸèƒ½æ˜¯ä¸ºJSONè§£æžï¼ç”Ÿæˆè€Œè®¾è®¡ï¼Œä½¿ç”¨è€…也å¯ä»¥â€œæ»¥ç”¨â€å®ƒä»¬æ¥ä¸ºéžJSON字符串转ç ã€‚
-
-ä»¥ä¸‹çš„ä¾‹å­æŠŠUTF-8å­—ç¬¦ä¸²è½¬ç æˆUTF-16:
-
-~~~~~~~~~~cpp
-#include "rapidjson/encodings.h"
-
-using namespace rapidjson;
-
-const char* s = "..."; // UTF-8 string
-StringStream source(s);
-GenericStringBuffer<UTF16<> > target;
-
-bool hasError = false;
-while (source.Peak() != '\0')
- if (!Transcoder::Transcode<UTF8<>, UTF16<> >(source, target)) {
- hasError = true;
- break;
- }
-
-if (!hasError) {
- const wchar_t* t = target.GetString();
- // ...
-}
-~~~~~~~~~~
-
-你也å¯ä»¥ç”¨`AutoUTF`åŠå¯¹åº”çš„æµæ¥åœ¨è¿è¡Œæ—¶è®¾ç½®å†…æºï¼ç›®çš„之编ç ã€‚
diff --git a/3rdparty/rapidjson/doc/faq.md b/3rdparty/rapidjson/doc/faq.md
deleted file mode 100644
index 1b0541c27a9..00000000000
--- a/3rdparty/rapidjson/doc/faq.md
+++ /dev/null
@@ -1,289 +0,0 @@
-# FAQ
-
-[TOC]
-
-## General
-
-1. What is RapidJSON?
-
- RapidJSON is a C++ library for parsing and generating JSON. You may check all [features](doc/features.md) of it.
-
-2. Why is RapidJSON named so?
-
- It is inspired by [RapidXML](http://rapidxml.sourceforge.net/), which is a fast XML DOM parser.
-
-3. Is RapidJSON similar to RapidXML?
-
- RapidJSON borrowed some designs of RapidXML, including *in situ* parsing, header-only library. But the two APIs are completely different. Also RapidJSON provide many features that are not in RapidXML.
-
-4. Is RapidJSON free?
-
- Yes, it is free under MIT license. It can be used in commercial applications. Please check the details in [license.txt](https://github.com/miloyip/rapidjson/blob/master/license.txt).
-
-5. Is RapidJSON small? What are its dependencies?
-
- Yes. A simple executable which parses a JSON and prints its statistics is less than 30KB on Windows.
-
- RapidJSON depends on C++ standard library only.
-
-6. How to install RapidJSON?
-
- Check [Installation section](https://miloyip.github.io/rapidjson/).
-
-7. Can RapidJSON run on my platform?
-
- RapidJSON has been tested in many combinations of operating systems, compilers and CPU architecture by the community. But we cannot ensure that it can be run on your particular platform. Building and running the unit test suite will give you the answer.
-
-8. Does RapidJSON support C++03? C++11?
-
- RapidJSON was firstly implemented for C++03. Later it added optional support of some C++11 features (e.g., move constructor, `noexcept`). RapidJSON shall be compatible with C++03 or C++11 compliant compilers.
-
-9. Does RapidJSON really work in real applications?
-
- Yes. It is deployed in both client and server real applications. A community member reported that RapidJSON in their system parses 50 million JSONs daily.
-
-10. How RapidJSON is tested?
-
- RapidJSON contains a unit test suite for automatic testing. [Travis](https://travis-ci.org/miloyip/rapidjson/)(for Linux) and [AppVeyor](https://ci.appveyor.com/project/miloyip/rapidjson/)(for Windows) will compile and run the unit test suite for all modifications. The test process also uses Valgrind (in Linux) to detect memory leaks.
-
-11. Is RapidJSON well documented?
-
- RapidJSON provides user guide and API documentationn.
-
-12. Are there alternatives?
-
- Yes, there are a lot alternatives. For example, [nativejson-benchmark](https://github.com/miloyip/nativejson-benchmark) has a listing of open-source C/C++ JSON libraries. [json.org](http://www.json.org/) also has a list.
-
-## JSON
-
-1. What is JSON?
-
- JSON (JavaScript Object Notation) is a lightweight data-interchange format. It uses human readable text format. More details of JSON can be referred to [RFC7159](http://www.ietf.org/rfc/rfc7159.txt) and [ECMA-404](http://www.ecma-international.org/publications/standards/Ecma-404.htm).
-
-2. What are applications of JSON?
-
- JSON are commonly used in web applications for transferring structured data. It is also used as a file format for data persistence.
-
-2. Does RapidJSON conform to the JSON standard?
-
- Yes. RapidJSON is fully compliance with [RFC7159](http://www.ietf.org/rfc/rfc7159.txt) and [ECMA-404](http://www.ecma-international.org/publications/standards/Ecma-404.htm). It can handle corner cases, such as supporting null character and surrogate pairs in JSON strings.
-
-3. Does RapidJSON support relaxed syntax?
-
- Currently no. RapidJSON only support the strict standardized format. Support on related syntax is under discussion in this [issue](https://github.com/miloyip/rapidjson/issues/36).
-
-## DOM and SAX
-
-1. What is DOM style API?
-
- Document Object Model (DOM) is an in-memory representation of JSON for query and manipulation.
-
-2. What is SAX style API?
-
- SAX is an event-driven API for parsing and generation.
-
-3. Should I choose DOM or SAX?
-
- DOM is easy for query and manipulation. SAX is very fast and memory-saving but often more difficult to be applied.
-
-4. What is *in situ* parsing?
-
- *in situ* parsing decodes the JSON strings directly into the input JSON. This is an optimization which can reduce memory consumption and improve performance, but the input JSON will be modified. Check [in-situ parsing](doc/dom.md) for details.
-
-5. When does parsing generate an error?
-
- The parser generates an error when the input JSON contains invalid syntax, or a value can not be represented (a number is too big), or the handler of parsers terminate the parsing. Check [parse error](doc/dom.md) for details.
-
-6. What error information is provided?
-
- The error is stored in `ParseResult`, which includes the error code and offset (number of characters from the beginning of JSON). The error code can be translated into human-readable error message.
-
-7. Why not just using `double` to represent JSON number?
-
- Some applications use 64-bit unsigned/signed integers. And these integers cannot be converted into `double` without loss of precision. So the parsers detects whether a JSON number is convertible to different types of integers and/or `double`.
-
-8. How to clear-and-minimize a document or value?
-
- Call one of the `SetXXX()` methods - they call destructor which deallocates DOM data:
-
- ~~~~~~~~~~cpp
- Document d;
- ...
- d.SetObject(); // clear and minimize
- ~~~~~~~~~~
-
- Alternatively, use equivalent of the [C++ swap with temporary idiom](https://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/Clear-and-minimize):
- ~~~~~~~~~~cpp
- Value(kObjectType).Swap(d);
- ~~~~~~~~~~
- or equivalent, but sightly longer to type:
- ~~~~~~~~~~cpp
- d.Swap(Value(kObjectType).Move());
- ~~~~~~~~~~
-
-9. How to insert a document node into another document?
-
- Let's take the following two DOM trees represented as JSON documents:
- ~~~~~~~~~~cpp
- Document person;
- person.Parse("{\"person\":{\"name\":{\"first\":\"Adam\",\"last\":\"Thomas\"}}}");
-
- Document address;
- address.Parse("{\"address\":{\"city\":\"Moscow\",\"street\":\"Quiet\"}}");
- ~~~~~~~~~~
- Let's assume we want to merge them in such way that the whole `address` document becomes a node of the `person`:
- ~~~~~~~~~~js
- { "person": {
- "name": { "first": "Adam", "last": "Thomas" },
- "address": { "city": "Moscow", "street": "Quiet" }
- }
- }
- ~~~~~~~~~~
-
- The most important requirement to take care of document and value life-cycle as well as consistent memory managent using the right allocator during the value transfer.
-
- Simple yet most efficient way to achieve that is to modify the `address` definition above to initialize it with allocator of the `person` document, then we just add the root member of the value:
- ~~~~~~~~~~cpp
- Documnet address(person.GetAllocator());
- ...
- person["person"].AddMember("address", address["address"], person.GetAllocator());
- ~~~~~~~~~~
-Alternatively, if we don't want to explicitly refer to the root value of `address` by name, we can refer to it via iterator:
- ~~~~~~~~~~cpp
- auto addressRoot = address.MemberBegin();
- person["person"].AddMember(addressRoot->name, addressRoot->value, person.GetAllocator());
- ~~~~~~~~~~
-
- Second way is to deep-clone the value from the address document:
- ~~~~~~~~~~cpp
- Value addressValue = Value(address["address"], person.GetAllocator());
- person["person"].AddMember("address", addressValue, person.GetAllocator());
- ~~~~~~~~~~
-
-## Document/Value (DOM)
-
-1. What is move semantics? Why?
-
- Instead of copy semantics, move semantics is used in `Value`. That means, when assigning a source value to a target value, the ownership of source value is moved to the target value.
-
- Since moving is faster than copying, this design decision forces user to aware of the copying overhead.
-
-2. How to copy a value?
-
- There are two APIs: constructor with allocator, and `CopyFrom()`. See [Deep Copy Value](doc/tutorial.md) for an example.
-
-3. Why do I need to provide the length of string?
-
- Since C string is null-terminated, the length of string needs to be computed via `strlen()`, with linear runtime complexity. This incurs an unncessary overhead of many operations, if the user already knows the length of string.
-
- Also, RapidJSON can handle `\u0000` (null character) within a string. If a string contains null characters, `strlen()` cannot return the true length of it. In such case user must provide the length of string explicitly.
-
-4. Why do I need to provide allocator parameter in many DOM manipulation API?
-
- Since the APIs are member functions of `Value`, we do not want to save an allocator pointer in every `Value`.
-
-5. Does it convert between numerical types?
-
- When using `GetInt()`, `GetUint()`, ... conversion may occur. For integer-to-integer conversion, it only convert when it is safe (otherwise it will assert). However, when converting a 64-bit signed/unsigned integer to double, it will convert but be aware that it may lose precision. A number with fraction, or an integer larger than 64-bit, can only be obtained by `GetDouble()`.
-
-## Reader/Writer (SAX)
-
-1. Why don't we just `printf` a JSON? Why do we need a `Writer`?
-
- Most importantly, `Writer` will ensure the output JSON is well-formed. Calling SAX events incorrectly (e.g. `StartObject()` pairing with `EndArray()`) will assert. Besides, `Writer` will escapes strings (e.g., `\n`). Finally, the numeric output of `printf()` may not be a valid JSON number, especially in some locale with digit delimiters. And the number-to-string conversion in `Writer` is implemented with very fast algorithms, which outperforms than `printf()` or `iostream`.
-
-2. Can I pause the parsing process and resume it later?
-
- This is not directly supported in the current version due to performance consideration. However, if the execution environment supports multi-threading, user can parse a JSON in a separate thread, and pause it by blocking in the input stream.
-
-## Unicode
-
-1. Does it support UTF-8, UTF-16 and other format?
-
- Yes. It fully support UTF-8, UTF-16 (LE/BE), UTF-32 (LE/BE) and ASCII.
-
-2. Can it validate the encoding?
-
- Yes, just pass `kParseValidateEncodingFlag` to `Parse()`. If there is invalid encoding in the stream, it wil generate `kParseErrorStringInvalidEncoding` error.
-
-3. What is surrogate pair? Does RapidJSON support it?
-
- JSON uses UTF-16 encoding when escaping unicode character, e.g. `\u5927` representing Chinese character "big". To handle characters other than those in basic multilingual plane (BMP), UTF-16 encodes those characters with two 16-bit values, which is called UTF-16 surrogate pair. For example, the Emoji character U+1F602 can be encoded as `\uD83D\uDE02` in JSON.
-
- RapidJSON fully support parsing/generating UTF-16 surrogates.
-
-4. Can it handle `\u0000` (null character) in JSON string?
-
- Yes. RapidJSON fully support null character in JSON string. However, user need to be aware of it and using `GetStringLength()` and related APIs to obtain the true length of string.
-
-5. Can I output `\uxxxx` for all non-ASCII character?
-
- Yes, use `ASCII<>` as output encoding template parameter in `Writer` can enforce escaping those characters.
-
-## Stream
-
-1. I have a big JSON file. Should I load the whole file to memory?
-
- User can use `FileReadStream` to read the file chunk-by-chunk. But for *in situ* parsing, the whole file must be loaded.
-
-2. Can I parse JSON while it is streamed from network?
-
- Yes. User can implement a custom stream for this. Please refer to the implementation of `FileReadStream`.
-
-3. I don't know what encoding will the JSON be. How to handle them?
-
- You may use `AutoUTFInputStream` which detects the encoding of input stream automatically. However, it will incur some performance overhead.
-
-4. What is BOM? How RapidJSON handle it?
-
- [Byte order mark (BOM)](http://en.wikipedia.org/wiki/Byte_order_mark) sometimes reside at the beginning of file/stream to indiciate the UTF encoding type of it.
-
- RapidJSON's `EncodedInputStream` can detect/consume BOM. `EncodedOutputStream` can optionally write a BOM. See [Encoded Streams](doc/stream.md) for example.
-
-5. Why little/big endian is related?
-
- little/big endian of stream is an issue for UTF-16 and UTF-32 streams, but not UTF-8 stream.
-
-## Performance
-
-1. Is RapidJSON really fast?
-
- Yes. It may be the fastest open source JSON library. There is a [benchmark](https://github.com/miloyip/nativejson-benchmark) for evaluating performance of C/C++ JSON libaries.
-
-2. Why is it fast?
-
- Many design decisions of RapidJSON is aimed at time/space performance. These may reduce user-friendliness of APIs. Besides, it also employs low-level optimizations (intrinsics, SIMD) and special algorithms (custom double-to-string, string-to-double conversions).
-
-3. What is SIMD? How it is applied in RapidJSON?
-
- [SIMD](http://en.wikipedia.org/wiki/SIMD) instructions can perform parallel computation in modern CPUs. RapidJSON support Intel's SSE2/SSE4.2 to accelerate whitespace skipping. This improves performance of parsing indent formatted JSON. Define `RAPIDJSON_SSE2` or `RAPIDJSON_SSE42` macro to enable this feature. However, running the executable on a machine without such instruction set support will make it crash.
-
-4. Does it consume a lot of memory?
-
- The design of RapidJSON aims at reducing memory footprint.
-
- In the SAX API, `Reader` consumes memory portional to maximum depth of JSON tree, plus maximum length of JSON string.
-
- In the DOM API, each `Value` consumes exactly 16/24 bytes for 32/64-bit architecture respectively. RapidJSON also uses a special memory allocator to minimize overhead of allocations.
-
-5. What is the purpose of being high performance?
-
- Some applications need to process very large JSON files. Some server-side applications need to process huge amount of JSONs. Being high performance can improve both latency and throuput. In a broad sense, it will also save energy.
-
-## Gossip
-
-1. Who are the developers of RapidJSON?
-
- Milo Yip ([miloyip](https://github.com/miloyip)) is the original author of RapidJSON. Many contributors from the world have improved RapidJSON. Philipp A. Hartmann ([pah](https://github.com/pah)) has implemented a lot of improvements, setting up automatic testing and also involves in a lot of discussions for the community. Don Ding ([thebusytypist](https://github.com/thebusytypist)) implemented the iterative parser. Andrii Senkovych ([jollyroger](https://github.com/jollyroger)) completed the CMake migration. Kosta ([Kosta-Github](https://github.com/Kosta-Github)) provided a very neat short-string optimization. Thank you for all other contributors and community members as well.
-
-2. Why do you develop RapidJSON?
-
- It was just a hobby project initially in 2011. Milo Yip is a game programmer and he just knew about JSON at that time and would like to apply JSON in future projects. As JSON seems very simple he would like to write a header-only and fast library.
-
-3. Why there is a long empty period of development?
-
- It is basically due to personal issues, such as getting new family members. Also, Milo Yip has spent a lot of spare time on translating "Game Engine Architecture" by Jason Gregory into Chinese.
-
-4. Why did the repository move from Google Code to GitHub?
-
- This is the trend. And GitHub is much more powerful and convenient.
diff --git a/3rdparty/rapidjson/doc/faq.zh-cn.md b/3rdparty/rapidjson/doc/faq.zh-cn.md
deleted file mode 100644
index 7127283b243..00000000000
--- a/3rdparty/rapidjson/doc/faq.zh-cn.md
+++ /dev/null
@@ -1,290 +0,0 @@
-# 常è§é—®é¢˜
-
-[TOC]
-
-## 一般问题
-
-1. RapidJSON是什么?
-
- RapidJSON是一个C++库,用于解æžåŠç”ŸæˆJSON。读者å¯å‚考它的所有[特点](doc/features.zh-cn.md)。
-
-2. 为什么称作RapidJSON?
-
- å®ƒçš„çµæ„Ÿæ¥è‡ªäºŽ[RapidXML](http://rapidxml.sourceforge.net/),RapidXML是一个高速的XML DOMè§£æžå™¨ã€‚
-
-3. RapidJSON与RapidXML相似么?
-
- RapidJSON借镜了RapidXML的一些设计, 包括原ä½ï¼ˆ*in situ*)解æžã€åªæœ‰å¤´æ–‡ä»¶çš„库。但两者的API是完全ä¸åŒçš„。此外RapidJSON也æä¾›è®¸å¤šRapidXML没有的特点。
-
-4. RapidJSON是å…费的么?
-
- 是的,它在MITç‰¹è¨±æ¢æ¬¾ä¸‹å…费。它å¯ç”¨äºŽå•†ä¸šè½¯ä»¶ã€‚详情请å‚看[license.txt](https://github.com/miloyip/rapidjson/blob/master/license.txt)。
-
-5. RapidJSON很å°ä¹ˆï¼Ÿå®ƒæœ‰ä½•ä¾èµ–?
-
- 是的。在Windows上,一个解æžJSON并打å°å‡ºç»Ÿè®¡çš„坿‰§è¡Œæ–‡ä»¶å°‘于30KB。
-
- RapidJSONä»…ä¾èµ–于C++标准库。
-
-6. 怎样安装RapidJSON?
-
- è§[安装一节](../readme.zh-cn.md#安装)。
-
-7. RapidJSON能å¦è¿è¡ŒäºŽæˆ‘的平å°ï¼Ÿ
-
- 社区已在多个æ“作系统ï¼ç¼–译器ï¼CPU架构的组åˆä¸Šæµ‹è¯•RapidJSON。但我们无法确ä¿å®ƒèƒ½è¿è¡ŒäºŽä½ ç‰¹å®šçš„å¹³å°ä¸Šã€‚åªéœ€è¦ç”ŸæˆåŠæ‰§è¡Œå•元测试便能获å–答案。
-
-8. RapidJSON支æŒC++03么?C++11呢?
-
- RapidJSON开始时在C++03ä¸Šå®žçŽ°ã€‚åŽæ¥åŠ å…¥äº†å¯é€‰çš„C++11特性支æŒï¼ˆå¦‚转移构造函数ã€`noexcept`)。RapidJSON应该兼容所有éµä»ŽC++03或C++11的编译器。
-
-9. RapidJSON是å¦çœŸçš„用于实际应用?
-
- 是的。它被é…置于å‰å°åŠåŽå°çš„真实应用中。一个社区æˆå‘˜è¯´RapidJSONåœ¨ä»–ä»¬çš„ç³»ç»Ÿä¸­æ¯æ—¥è§£æž5åƒä¸‡ä¸ªJSON。
-
-10. RapidJSON是如何被测试的?
-
- RapidJSON包å«ä¸€ç»„å•元测试去执行自动测试。[Travis](https://travis-ci.org/miloyip/rapidjson/)(供Linuxå¹³å°ï¼‰åŠ[AppVeyor](https://ci.appveyor.com/project/miloyip/rapidjson/)(供Windowså¹³å°ï¼‰ä¼šå¯¹æ‰€æœ‰ä¿®æ”¹è¿›è¡Œç¼–è¯‘åŠæ‰§è¡Œå•元测试。在Linux下还会使用Valgrind去检测内存泄æ¼ã€‚
-
-11. RapidJSONæ˜¯å¦æœ‰å®Œæ•´çš„æ–‡æ¡£ï¼Ÿ
-
- RapidJSONæä¾›äº†ä½¿ç”¨æ‰‹å†ŒåŠAPI说明文档。
-
-12. 有没有其他替代å“?
-
- 有许多替代å“。例如[nativejson-benchmark](https://github.com/miloyip/nativejson-benchmark)列出了一些开æºçš„C/C++ JSON库。[json.org](http://www.json.org/)也有一个列表。
-
-## JSON
-
-1. 什么是JSON?
-
- JSON (JavaScript Object Notation)是一个轻é‡çš„æ•°æ®äº¤æ¢æ ¼å¼ã€‚它使用人类å¯è¯»çš„æ–‡æœ¬æ ¼å¼ã€‚更多关于JSON的细节å¯è€ƒ[RFC7159](http://www.ietf.org/rfc/rfc7159.txt)åŠ[ECMA-404](http://www.ecma-international.org/publications/standards/Ecma-404.htm)。
-
-2. JSON有什么应用场åˆï¼Ÿ
-
- JSON常用于网页应用程åºï¼Œä»¥ä¼ é€ç»“构化数æ®ã€‚它也å¯ä½œä¸ºæ–‡ä»¶æ ¼å¼ç”¨äºŽæ•°æ®æŒä¹…化。
-
-2. RapidJSON是å¦ç¬¦åˆJSON标准?
-
- 是。RapidJSON完全符åˆ[RFC7159](http://www.ietf.org/rfc/rfc7159.txt)åŠ[ECMA-404](http://www.ecma-international.org/publications/standards/Ecma-404.htm)。它能处ç†ä¸€äº›ç‰¹æ®Šæƒ…况,例如支æŒJSONå­—ç¬¦ä¸²ä¸­å«æœ‰ç©ºå­—符åŠä»£ç†å¯¹ï¼ˆsurrogate pair)。
-
-3. RapidJSONæ˜¯å¦æ”¯æŒå®½æ¾çš„语法?
-
- çŽ°æ—¶ä¸æ”¯æŒã€‚RapidJSONåªæ”¯æŒä¸¥æ ¼çš„æ ‡å‡†æ ¼å¼ã€‚宽æ¾è¯­æ³•现时在这[issue](https://github.com/miloyip/rapidjson/issues/36)中进行讨论。
-
-## DOM与SAX
-
-1. 什么是DOM风格API?
-
- Document Object Model(DOM)是一个储存于内存的JSON表示方å¼ï¼Œç”¨äºŽæŸ¥è¯¢åŠä¿®æ”¹JSON。
-
-2. 什么是SAX风格API?
-
- SAX是一个事件驱动的API,用于解æžåŠç”ŸæˆJSON。
-
-3. 我应用DOM还是SAX?
-
- DOM易于查询åŠä¿®æ”¹ã€‚SAX则是éžå¸¸å¿«åŠçœå†…存的,但通常较难使用。
-
-4. 什么是原ä½ï¼ˆ*in situ*)解æžï¼Ÿ
-
- 原ä½è§£æžä¼šæŠŠJSON字符串直接解ç è‡³è¾“入的JSON中。这是一个优化,å¯å‡å°‘å†…å­˜æ¶ˆè€—åŠæå‡æ€§èƒ½ï¼Œä½†è¾“入的JSON会被更改。进一步细节请å‚考[原ä½è§£æž](doc/dom.md) 。
-
-5. 什么时候会产生解æžé”™è¯¯ï¼Ÿ
-
- 当输入的JSON包å«éžæ³•语法,或ä¸èƒ½è¡¨ç¤ºä¸€ä¸ªå€¼ï¼ˆå¦‚Number太大),或解æžå™¨çš„处ç†å™¨ä¸­æ–­è§£æžè¿‡ç¨‹ï¼Œè§£æžå™¨éƒ½ä¼šäº§ç”Ÿä¸€ä¸ªé”™è¯¯ã€‚详情请å‚考[è§£æžé”™è¯¯](doc/dom.md)。
-
-6. 有什么错误信æ¯ï¼Ÿ
-
- 错误信æ¯å­˜å‚¨åœ¨`ParseResult`,它包å«é”™è¯¯ä»£å·åŠå移值(从JSON开始至错误处的字符数目)。å¯ä»¥æŠŠé”™è¯¯ä»£å·ç¿»è¯‘为人类å¯è¯»çš„错误讯æ¯ã€‚
-
-7. 为何ä¸åªä½¿ç”¨`double`去表示JSON number?
-
- 一些应用需è¦ä½¿ç”¨64使— å·ï¼æœ‰å·æ•´æ•°ã€‚这些整数ä¸èƒ½æ— æŸåœ°è½¬æ¢æˆ`double`。因此解æžå™¨ä¼šæ£€æµ‹ä¸€ä¸ªJSON number是å¦èƒ½è½¬æ¢è‡³å„ç§æ•´æ•°ç±»åž‹åŠ`double`。
-
-8. 如何清空并最å°åŒ–`document`或`value`的容é‡ï¼Ÿ
-
- 调用 `SetXXX()` 方法 - è¿™äº›æ–¹æ³•ä¼šè°ƒç”¨æžæž„函数,并é‡å»ºç©ºçš„Object或Array:
-
- ~~~~~~~~~~cpp
- Document d;
- ...
- d.SetObject(); // clear and minimize
- ~~~~~~~~~~
-
- å¦å¤–,也å¯ä»¥å‚考在 [C++ swap with temporary idiom](https://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/Clear-and-minimize)中的一ç§ç­‰ä»·çš„æ–¹æ³•:
- ~~~~~~~~~~cpp
- Value(kObjectType).Swap(d);
- ~~~~~~~~~~
- 或者,使用这个ç¨å¾®é•¿ä¸€ç‚¹çš„代ç ä¹Ÿèƒ½å®ŒæˆåŒæ ·çš„事情:
- ~~~~~~~~~~cpp
- d.Swap(Value(kObjectType).Move());
- ~~~~~~~~~~
-
-9. 如何将一个`document`节点æ’入到å¦ä¸€ä¸ª`document`中?
-
- 比如有以下两个document(DOM):
- ~~~~~~~~~~cpp
- Document person;
- person.Parse("{\"person\":{\"name\":{\"first\":\"Adam\",\"last\":\"Thomas\"}}}");
-
- Document address;
- address.Parse("{\"address\":{\"city\":\"Moscow\",\"street\":\"Quiet\"}}");
- ~~~~~~~~~~
- å‡è®¾æˆ‘们希望将整个 `address` æ’入到`person`中,作为其的一个å­èŠ‚ç‚¹:
- ~~~~~~~~~~js
- { "person": {
- "name": { "first": "Adam", "last": "Thomas" },
- "address": { "city": "Moscow", "street": "Quiet" }
- }
- }
- ~~~~~~~~~~
-
- 在æ’å…¥èŠ‚ç‚¹çš„è¿‡ç¨‹ä¸­éœ€è¦æ³¨æ„`document`å’Œ`value`的生命周期并且正确地使用allocator进行内存分é…和管ç†ã€‚
-
- ä¸€ä¸ªç®€å•æœ‰æ•ˆçš„æ–¹æ³•就是修改上述`address`å˜é‡çš„定义,让其使用`person`çš„allocatoråˆå§‹åŒ–,然åŽå°†å…¶æ·»åŠ åˆ°æ ¹èŠ‚ç‚¹ã€‚
-
- ~~~~~~~~~~cpp
- Documnet address(person.GetAllocator());
- ...
- person["person"].AddMember("address", address["address"], person.GetAllocator());
- ~~~~~~~~~~
- å½“ç„¶ï¼Œå¦‚æžœä½ ä¸æƒ³é€šè¿‡æ˜¾å¼åœ°å†™å‡º`address`çš„keyæ¥å¾—到其值,å¯ä»¥ä½¿ç”¨è¿­ä»£å™¨æ¥å®žçް:
- ~~~~~~~~~~cpp
- auto addressRoot = address.MemberBegin();
- person["person"].AddMember(addressRoot->name, addressRoot->value, person.GetAllocator());
- ~~~~~~~~~~
-
- 此外,还å¯ä»¥é€šè¿‡æ·±æ‹·è´address documentæ¥å®žçް:
- ~~~~~~~~~~cpp
- Value addressValue = Value(address["address"], person.GetAllocator());
- person["person"].AddMember("address", addressValue, person.GetAllocator());
- ~~~~~~~~~~
-
-## Document/Value (DOM)
-
-1. 什么是转移语æ„?为什么?
-
- `Value`ä¸ç”¨å¤åˆ¶è¯­æ„,而使用了转移语æ„ã€‚è¿™æ˜¯æŒ‡ï¼Œå½“æŠŠæ¥æºå€¼èµ‹å€¼äºŽç›®æ ‡å€¼æ—¶ï¼Œæ¥æºå€¼çš„æ‰€æœ‰æƒä¼šè½¬ç§»è‡³ç›®æ ‡å€¼ã€‚
-
- 由于转移快于å¤åˆ¶ï¼Œæ­¤è®¾è®¡å†³å®šå¼ºè¿«ä½¿ç”¨è€…注æ„到å¤åˆ¶çš„æ¶ˆè€—。
-
-2. 怎样去å¤åˆ¶ä¸€ä¸ªå€¼ï¼Ÿ
-
- 有两个APIå¯ç”¨ï¼šå«allocator的构造函数,以åŠ`CopyFrom()`。å¯å‚考[æ·±å¤åˆ¶Value](doc/tutorial.md)里的用例。
-
-3. ä¸ºä»€ä¹ˆæˆ‘éœ€è¦æä¾›å­—ç¬¦ä¸²çš„é•¿åº¦ï¼Ÿ
-
- 由于C字符串是空字符结尾的,需è¦ä½¿ç”¨`strlen()`åŽ»è®¡ç®—å…¶é•¿åº¦ï¼Œè¿™æ˜¯çº¿æ€§å¤æ‚度的æ“作。若使用者已知字符串的长度,对很多æ“作æ¥è¯´ä¼šé€ æˆä¸å¿…è¦çš„æ¶ˆè€—。
-
- 此外,RapidJSONå¯å¤„ç†å«æœ‰`\u0000`ï¼ˆç©ºå­—ç¬¦ï¼‰çš„å­—ç¬¦ä¸²ã€‚è‹¥ä¸€ä¸ªå­—ç¬¦ä¸²å«æœ‰ç©ºå­—符,`strlen()`便ä¸èƒ½è¿”å›žçœŸæ­£çš„å­—ç¬¦ä¸²é•¿åº¦ã€‚åœ¨è¿™ç§æƒ…况下使用者必须明确地æä¾›å­—符串长度。
-
-4. 为什么在许多DOMæ“作APIä¸­è¦æä¾›åˆ†é…å™¨ä½œä¸ºå‚æ•°ï¼Ÿ
-
- 由于这些API是`Value`çš„æˆå‘˜å‡½æ•°ï¼Œæˆ‘们ä¸å¸Œæœ›ä¸ºæ¯ä¸ª`Value`储存一个分é…器指针。
-
-5. 它会转æ¢å„ç§æ•°å€¼ç±»åž‹ä¹ˆï¼Ÿ
-
- 当使用`GetInt()`ã€`GetUint()`ç­‰API时,å¯èƒ½ä¼šå‘生转æ¢ã€‚对于整数至整数转æ¢ï¼Œä»…当ä¿è¯è½¬æ¢å®‰å…¨æ‰ä¼šè½¬æ¢ï¼ˆå¦åˆ™ä¼šæ–­è¨€å¤±è´¥ï¼‰ã€‚然而,当把一个64使œ‰å·ï¼æ— å·æ•´æ•°è½¬æ¢è‡³double时,它会转æ¢ï¼Œä½†æœ‰å¯èƒ½ä¼šæŸå¤±ç²¾åº¦ã€‚嫿œ‰å°æ•°çš„æ•°å­—ã€æˆ–大于64ä½çš„æ•´æ•°ï¼Œéƒ½åªèƒ½ä½¿ç”¨`GetDouble()`获å–其值。
-
-## Reader/Writer (SAX)
-
-1. 为什么ä¸ä»…仅用`printf`输出一个JSON?为什么需è¦`Writer`?
-
- 最é‡è¦çš„æ˜¯ï¼Œ`Writer`能确ä¿è¾“出的JSONæ˜¯æ ¼å¼æ­£ç¡®çš„。错误地调用SAX事件(如`StartObject()`é”™é…`EndArray()`ï¼‰ä¼šé€ æˆæ–­è¨€å¤±è´¥ã€‚此外,`Writer`会把字符串进行转义(如`\n`)。最åŽï¼Œ`printf()`的数值输出å¯èƒ½å¹¶ä¸æ˜¯ä¸€ä¸ªåˆæ³•çš„JSON number,特别是æŸäº›locale会有数字分隔符。而且`Writer`çš„æ•°å€¼å­—ç¬¦ä¸²è½¬æ¢æ˜¯ä½¿ç”¨éžå¸¸å¿«çš„算法æ¥å®žçŽ°çš„ï¼Œèƒœè¿‡`printf()`åŠ`iostream`。
-
-2. æˆ‘èƒ½å¦æš‚åœè§£æžè¿‡ç¨‹ï¼Œå¹¶åœ¨ç¨åŽç»§ç»­ï¼Ÿ
-
- 基于性能考虑,目å‰ç‰ˆæœ¬å¹¶ä¸ç›´æŽ¥æ”¯æŒæ­¤åŠŸèƒ½ã€‚ç„¶è€Œï¼Œè‹¥æ‰§è¡ŒçŽ¯å¢ƒæ”¯æŒå¤šçº¿ç¨‹ï¼Œä½¿ç”¨è€…å¯ä»¥åœ¨å¦ä¸€çº¿ç¨‹è§£æžJSON,并通过阻塞输入æµåŽ»æš‚åœã€‚
-
-## Unicode
-
-1. å®ƒæ˜¯å¦æ”¯æŒUTF-8ã€UTF-16åŠå…¶ä»–æ ¼å¼ï¼Ÿ
-
- 是。它完全支æŒUTF-8ã€UTF-16(大端ï¼å°ç«¯ï¼‰ã€UTF-32(大端ï¼å°ç«¯ï¼‰åŠASCII。
-
-2. å®ƒèƒ½å¦æ£€æµ‹ç¼–ç çš„åˆæ³•性?
-
- 能。åªéœ€æŠŠ`kParseValidateEncodingFlag`å‚考传给`Parse()`。若å‘现在输入æµä¸­æœ‰éžæ³•的编ç ï¼Œå®ƒå°±ä¼šäº§ç”Ÿ`kParseErrorStringInvalidEncoding`错误。
-
-3. 什么是代ç†å¯¹ï¼ˆsurrogate pair)?RapidJSONæ˜¯å¦æ”¯æŒï¼Ÿ
-
- JSON使用UTF-16ç¼–ç åŽ»è½¬ä¹‰Unicode字符,例如`\u5927`表示中文字“大â€ã€‚è¦å¤„ç†åŸºæœ¬å¤šæ–‡ç§å¹³é¢ï¼ˆbasic multilingual plane,BMP)以外的字符时,UTF-16ä¼šæŠŠé‚£äº›å­—ç¬¦ç¼–ç æˆä¸¤ä¸ª16ä½å€¼ï¼Œè¿™ç§°ä¸ºUTF-16代ç†å¯¹ã€‚例如,绘文字字符U+1F602在JSON中å¯è¢«ç¼–ç æˆ`\uD83D\uDE02`。
-
- RapidJSON完全支æŒè§£æžåŠç”ŸæˆUTF-16代ç†å¯¹ã€‚
-
-4. 它能å¦å¤„ç†JSON字符串中的`\u0000`(空字符)?
-
- 能。RapidJSON完全支æŒJSONå­—ç¬¦ä¸²ä¸­çš„ç©ºå­—ç¬¦ã€‚ç„¶è€Œï¼Œä½¿ç”¨è€…éœ€è¦æ³¨æ„到这件事,并使用`GetStringLength()`åŠç›¸å…³API去å–得字符串真正长度。
-
-5. 能å¦å¯¹æ‰€æœ‰éžASCII字符输出æˆ`\uxxxx`å½¢å¼ï¼Ÿ
-
- å¯ä»¥ã€‚åªè¦åœ¨`Writer`中使用`ASCII<>`作为输出编ç å‚数,就å¯ä»¥å¼ºé€¼è½¬ä¹‰é‚£äº›å­—符。
-
-## æµ
-
-1. 我有一个很大的JSONæ–‡ä»¶ã€‚æˆ‘åº”å¦æŠŠå®ƒæ•´ä¸ªè½½å…¥å†…å­˜ä¸­ï¼Ÿ
-
- 使用者å¯ä½¿ç”¨`FileReadStream`去é€å—读入文件。但若使用于原ä½è§£æžï¼Œå¿…须载入整个文件。
-
-2. 我能å¦è§£æžä¸€ä¸ªä»Žç½‘络上串æµè¿›æ¥çš„JSON?
-
- å¯ä»¥ã€‚ä½¿ç”¨è€…å¯æ ¹æ®`FileReadStream`的实现,去实现一个自定义的æµã€‚
-
-3. 我ä¸çŸ¥é“一些JSON将会使用哪ç§ç¼–ç ã€‚怎样处ç†å®ƒä»¬ï¼Ÿ
-
- ä½ å¯ä»¥ä½¿ç”¨`AutoUTFInputStream`,它能自动检测输入æµçš„ç¼–ç ã€‚然而,它会带æ¥ä¸€äº›æ€§èƒ½å¼€é”€ã€‚
-
-4. 什么是BOM?RapidJSON怎样处ç†å®ƒï¼Ÿ
-
- [å­—èŠ‚é¡ºåºæ ‡è®°ï¼ˆbyte order mark, BOM)](http://en.wikipedia.org/wiki/Byte_order_mark)æœ‰æ—¶ä¼šå‡ºçŽ°äºŽæ–‡ä»¶ï¼æµçš„开始,以表示其UTFç¼–ç ç±»åž‹ã€‚
-
- RapidJSONçš„`EncodedInputStream`坿£€æµ‹ï¼è·³è¿‡BOM。`EncodedOutputStream`å¯é€‰æ‹©æ˜¯å¦å†™å…¥BOM。å¯å‚考[ç¼–ç æµ](doc/stream.md)中的例å­ã€‚
-
-5. 为什么会涉åŠå¤§ç«¯ï¼å°ç«¯ï¼Ÿ
-
- æµçš„大端ï¼å°ç«¯æ˜¯UTF-16åŠUTF-32æµè¦å¤„ç†çš„问题,而UTF-8ä¸éœ€è¦å¤„ç†ã€‚
-
-## 性能
-
-1. RapidJSON是å¦çœŸçš„快?
-
- 是。它å¯èƒ½æ˜¯æœ€å¿«çš„å¼€æºJSON库。有一个[评测](https://github.com/miloyip/nativejson-benchmark)评估C/C++ JSON库的性能。
-
-2. 为什么它会快?
-
- RapidJSON的许多设计是针对时间ï¼ç©ºé—´æ€§èƒ½æ¥è®¾è®¡çš„,这些决定å¯èƒ½ä¼šå½±å“API的易用性。此外,它也使用了许多底层优化(内部函数ï¼intrinsicã€SIMD)åŠç‰¹åˆ«çš„算法(自定义的double至字符串转æ¢ã€å­—符串至double的转æ¢ï¼‰ã€‚
-
-3. 什是是SIMD?它如何用于RapidJSON?
-
- [SIMD](http://en.wikipedia.org/wiki/SIMD)指令å¯ä»¥åœ¨çް代CPU中执行并行è¿ç®—。RapidJSON支æŒäº†Intelçš„SSE2/SSE4.2去加速跳过空白字符。在解æžå«ç¼©è¿›çš„JSON时,这能æå‡æ€§èƒ½ã€‚åªè¦å®šä¹‰å为`RAPIDJSON_SSE2`或`RAPIDJSON_SSE42`çš„å®ï¼Œå°±èƒ½å¯åŠ¨è¿™ä¸ªåŠŸèƒ½ã€‚ç„¶è€Œï¼Œè‹¥åœ¨ä¸æ”¯æŒè¿™äº›æŒ‡ä»¤é›†çš„æœºå™¨ä¸Šæ‰§è¡Œè¿™äº›å¯æ‰§è¡Œæ–‡ä»¶ï¼Œä¼šå¯¼è‡´å´©æºƒã€‚
-
-4. 它会消耗许多内存么?
-
- RapidJSON的设计目标是å‡ä½Žå†…å­˜å ç”¨ã€‚
-
- 在SAX API中,`Reader`消耗的内存与JSON树深度加上最长JSONå­—ç¬¦æˆæ­£æ¯”。
-
- 在DOM API中,æ¯ä¸ª`Value`在32/64使ž¶æž„下分别消耗16/24字节。RapidJSON也使用一个特殊的内存分é…器去å‡å°‘分é…çš„é¢å¤–开销。
-
-5. 高性能的æ„义何在?
-
- 有些应用程åºéœ€è¦å¤„ç†éžå¸¸å¤§çš„JSON文件。而有些åŽå°åº”用程åºéœ€è¦å¤„ç†å¤§é‡çš„JSONã€‚è¾¾åˆ°é«˜æ€§èƒ½åŒæ—¶æ”¹å–„å»¶æ—¶åŠåžåé‡ã€‚更广义æ¥è¯´ï¼Œè¿™ä¹Ÿå¯ä»¥èŠ‚çœèƒ½æºã€‚
-
-## 八挂
-
-1. è°æ˜¯RapidJSON的开å‘者?
-
- å¶åŠ²å³°ï¼ˆMilo Yip,[miloyip](https://github.com/miloyip))是RapidJSON的原作者。全世界许多贡献者一直在改善RapidJSON。Philipp A. Hartmann([pah](https://github.com/pah))实现了许多改进,也设置了自动化测试,而且还å‚ä¸Žè®¸å¤šç¤¾åŒºè®¨è®ºã€‚ä¸æ¬§å—(Don Ding,[thebusytypist](https://github.com/thebusytypist))实现了迭代å¼è§£æžå™¨ã€‚Andrii Senkovych([jollyroger](https://github.com/jollyroger))完æˆäº†å‘CMakeçš„è¿ç§»ã€‚Kosta([Kosta-Github](https://github.com/Kosta-Github))æä¾›äº†ä¸€ä¸ªéžå¸¸çµå·§çš„çŸ­å­—ç¬¦ä¸²ä¼˜åŒ–ã€‚ä¹Ÿéœ€è¦æ„Ÿè°¢å…¶ä»–献者åŠç¤¾åŒºæˆå‘˜ã€‚
-
-2. 为何你è¦å¼€å‘RapidJSON?
-
- 在2011年开始这项目是,它仅一个兴趣项目。Milo Yip是一个游æˆç¨‹åºå‘˜ï¼Œä»–在那时候认识到JSON并希望在未æ¥çš„项目中使用。由于JSON好åƒå¾ˆç®€å•,他希望写一个仅有头文件并且快速的程åºåº“。
-
-3. 为什么开å‘中段有一段长期空档?
-
- ä¸»è¦æ˜¯ä¸ªäººå› ç´ ï¼Œä¾‹å¦‚加入新家庭æˆå‘˜ã€‚å¦å¤–,Milo Yip也花了许多业馀时间去翻译Jason Gregory的《Game Engine Architecture》至中文版《游æˆå¼•擎架构》。
-
-4. 为什么这个项目从Google Codeæ¬åˆ°GitHub?
-
- 这是大势所趋,而且GitHubæ›´ä¸ºå¼ºå¤§åŠæ–¹ä¾¿ã€‚
diff --git a/3rdparty/rapidjson/doc/features.md b/3rdparty/rapidjson/doc/features.md
deleted file mode 100644
index 6b529a77646..00000000000
--- a/3rdparty/rapidjson/doc/features.md
+++ /dev/null
@@ -1,98 +0,0 @@
-# Features
-
-## General
-
-* Cross-platform
- * Compilers: Visual Studio, gcc, clang, etc.
- * Architectures: x86, x64, ARM, etc.
- * Operating systems: Windows, Mac OS X, Linux, iOS, Android, etc.
-* Easy installation
- * Header files only library. Just copy the headers to your project.
-* Self-contained, minimal dependences
- * No STL, BOOST, etc.
- * Only included `<cstdio>`, `<cstdlib>`, `<cstring>`, `<inttypes.h>`, `<new>`, `<stdint.h>`.
-* Without C++ exception, RTTI
-* High performance
- * Use template and inline functions to reduce function call overheads.
- * Internal optimized Grisu2 and floating point parsing implementations.
- * Optional SSE2/SSE4.2 support.
-
-## Standard compliance
-
-* RapidJSON should be fully RFC4627/ECMA-404 compliance.
-* Support Unicode surrogate.
-* Support null character (`"\u0000"`)
- * For example, `["Hello\u0000World"]` can be parsed and handled gracefully. There is API for getting/setting lengths of string.
-* Support optional relaxed syntax.
- * Single line (`// ...`) and multiple line (`/* ... */`) comments.
-
-## Unicode
-
-* Support UTF-8, UTF-16, UTF-32 encodings, including little endian and big endian.
- * These encodings are used in input/output streams and in-memory representation.
-* Support automatic detection of encodings in input stream.
-* Support transcoding between encodings internally.
- * For example, you can read a UTF-8 file and let RapidJSON transcode the JSON strings into UTF-16 in the DOM.
-* Support encoding validation internally.
- * For example, you can read a UTF-8 file, and let RapidJSON check whether all JSON strings are valid UTF-8 byte sequence.
-* Support custom character types.
- * By default the character types are `char` for UTF8, `wchar_t` for UTF16, `uint32_t` for UTF32.
-* Support custom encodings.
-
-## API styles
-
-* SAX (Simple API for XML) style API
- * Similar to [SAX](http://en.wikipedia.org/wiki/Simple_API_for_XML), RapidJSON provides a event sequential access parser API (`rapidjson::GenericReader`). It also provides a generator API (`rapidjson::Writer`) which consumes the same set of events.
-* DOM (Document Object Model) style API
- * Similar to [DOM](http://en.wikipedia.org/wiki/Document_Object_Model) for HTML/XML, RapidJSON can parse JSON into a DOM representation (`rapidjson::GenericDocument`), for easy manipulation, and finally stringify back to JSON if needed.
- * The DOM style API (`rapidjson::GenericDocument`) is actually implemented with SAX style API (`rapidjson::GenericReader`). SAX is faster but sometimes DOM is easier. Users can pick their choices according to scenarios.
-
-## Parsing
-
-* Recursive (default) and iterative parser
- * Recursive parser is faster but prone to stack overflow in extreme cases.
- * Iterative parser use custom stack to keep parsing state.
-* Support *in situ* parsing.
- * Parse JSON string values in-place at the source JSON, and then the DOM points to addresses of those strings.
- * Faster than convention parsing: no allocation for strings, no copy (if string does not contain escapes), cache-friendly.
-* Support 32-bit/64-bit signed/unsigned integer and `double` for JSON number type.
-* Support parsing multiple JSONs in input stream (`kParseStopWhenDoneFlag`).
-* Error Handling
- * Support comprehensive error code if parsing failed.
- * Support error message localization.
-
-## DOM (Document)
-
-* RapidJSON checks range of numerical values for conversions.
-* Optimization for string literal
- * Only store pointer instead of copying
-* Optimization for "short" strings
- * Store short string in `Value` internally without additional allocation.
- * For UTF-8 string: maximum 11 characters in 32-bit, 15 characters in 64-bit.
-* Optionally support `std::string` (define `RAPIDJSON_HAS_STDSTRING=1`)
-
-## Generation
-
-* Support `rapidjson::PrettyWriter` for adding newlines and indentations.
-
-## Stream
-
-* Support `rapidjson::GenericStringBuffer` for storing the output JSON as string.
-* Support `rapidjson::FileReadStream` and `rapidjson::FileWriteStream` for input/output `FILE` object.
-* Support custom streams.
-
-## Memory
-
-* Minimize memory overheads for DOM.
- * Each JSON value occupies exactly 16/20 bytes for most 32/64-bit machines (excluding text string).
-* Support fast default allocator.
- * A stack-based allocator (allocate sequentially, prohibit to free individual allocations, suitable for parsing).
- * User can provide a pre-allocated buffer. (Possible to parse a number of JSONs without any CRT allocation)
-* Support standard CRT(C-runtime) allocator.
-* Support custom allocators.
-
-## Miscellaneous
-
-* Some C++11 support (optional)
- * Rvalue reference
- * `noexcept` specifier
diff --git a/3rdparty/rapidjson/doc/features.zh-cn.md b/3rdparty/rapidjson/doc/features.zh-cn.md
deleted file mode 100644
index 85a7db16274..00000000000
--- a/3rdparty/rapidjson/doc/features.zh-cn.md
+++ /dev/null
@@ -1,97 +0,0 @@
-# 特点
-
-## 总体
-
-* 跨平å°
- * 编译器:Visual Studioã€gccã€clangç­‰
- * 架构:x86ã€x64ã€ARMç­‰
- * æ“作系统:Windowsã€Mac OS Xã€Linuxã€iOSã€Androidç­‰
-* 容易安装
- * åªæœ‰å¤´æ–‡ä»¶çš„库。åªéœ€æŠŠå¤´æ–‡ä»¶å¤åˆ¶è‡³ä½ çš„项目中。
-* ç‹¬ç«‹ã€æœ€å°ä¾èµ–
- * ä¸éœ€ä¾èµ–STLã€BOOST等。
- * åªåŒ…å«`<cstdio>`, `<cstdlib>`, `<cstring>`, `<inttypes.h>`, `<new>`, `<stdint.h>`。
-* 没使用C++异常ã€RTTI
-* 高性能
- * 使用模版åŠå†…è”函数去é™ä½Žå‡½æ•°è°ƒç”¨å¼€é”€ã€‚
- * 内部ç»ä¼˜åŒ–çš„Grisu2åŠæµ®ç‚¹æ•°è§£æžå®žçŽ°ã€‚
- * å¯é€‰çš„SSE2/SSE4.2支æŒã€‚
-
-## ç¬¦åˆæ ‡å‡†
-
-* RapidJSON应完全符åˆRFC4627/ECMA-404标准。
-* 支æŒUnicod代ç†å¯¹ï¼ˆsurrogate pair)。
-* 支æŒç©ºå­—符(`"\u0000"`)。
- * 例如,å¯ä»¥ä¼˜é›…地解æžåŠå¤„ç†`["Hello\u0000World"]`。å«è¯»å†™å­—符串长度的API。
-* æ”¯æŒæ”¾å®½çš„å¯é€‰è¯­æ³•
- * å•行(`// ...`)åŠå¤šè¡Œï¼ˆ`/* ... */`) 注释。
-
-## Unicode
-
-* 支æŒUTF-8ã€UTF-16ã€UTF-32ç¼–ç ï¼ŒåŒ…括å°ç«¯åºå’Œå¤§ç«¯åºã€‚
- * 这些编ç ç”¨äºŽè¾“入输出æµï¼Œä»¥åŠå†…存中的表示。
-* 支æŒä»Žè¾“å…¥æµè‡ªåŠ¨æ£€æµ‹ç¼–ç ã€‚
-* 内部支æŒç¼–ç çš„转æ¢ã€‚
- * 例如,你å¯ä»¥è¯»å–一个UTF-8文件,让RapidJSON把JSON字符串转æ¢è‡³UTF-16çš„DOM。
-* 内部支æŒç¼–ç æ ¡éªŒã€‚
- * 例如,你å¯ä»¥è¯»å–一个UTF-8文件,让RapidJSONæ£€æŸ¥æ˜¯å¦æ‰€æœ‰JSONå­—ç¬¦ä¸²æ˜¯åˆæ³•çš„UTF-8字节åºåˆ—。
-* 支æŒè‡ªå®šä¹‰çš„字符类型。
- * 预设的字符类型是:UTF-8为`char`,UTF-16为`wchar_t`,UTF32为`uint32_t`。
-* 支æŒè‡ªå®šä¹‰çš„ç¼–ç ã€‚
-
-## API风格
-
-* SAX(Simple API for XML)风格API
- * 类似于[SAX](http://en.wikipedia.org/wiki/Simple_API_for_XML), RapidJSONæä¾›ä¸€ä¸ªäº‹ä»¶å¾ªåºè®¿é—®çš„è§£æžå™¨API(`rapidjson::GenericReader`)。RapidJSON也æä¾›ä¸€ä¸ªç”Ÿæˆå™¨API(`rapidjson::Writer`),å¯ä»¥å¤„ç†ç›¸åŒçš„事件集åˆã€‚
-* DOM(Document Object Model)风格API
- * 类似于HTMLï¼XMLçš„[DOM](http://en.wikipedia.org/wiki/Document_Object_Model),RapidJSONå¯æŠŠJSONè§£æžè‡³ä¸€ä¸ªDOM表示方å¼ï¼ˆ`rapidjson::GenericDocument`),以方便æ“作。如有需è¦ï¼Œå¯æŠŠDOM转æ¢ï¼ˆstringify)回JSON。
- * DOM风格API(`rapidjson::GenericDocument`)实际上是由SAX风格API(`rapidjson::GenericReader`)实现的。SAX更快,但有时DOMæ›´æ˜“ç”¨ã€‚ç”¨æˆ·å¯æ ¹æ®æƒ…况作出选择。
-
-## è§£æž
-
-* 递归å¼ï¼ˆé¢„设)åŠè¿­ä»£å¼è§£æžå™¨
- * 递归å¼è§£æžå™¨è¾ƒå¿«ï¼Œä½†åœ¨æžç«¯æƒ…况下å¯å‡ºçŽ°å †æ ˆæº¢å‡ºã€‚
- * 迭代å¼è§£æžå™¨ä½¿ç”¨è‡ªå®šä¹‰çš„堆栈去维æŒè§£æžçжæ€ã€‚
-* 支æŒåŽŸä½ï¼ˆ*in situ*)解æžã€‚
- * 把JSON字符串的值解æžè‡³åŽŸJSON之中,然åŽè®©DOM指å‘那些字符串。
- * æ¯”å¸¸è§„åˆ†æžæ›´å¿«ï¼šä¸éœ€å­—符串的内存分é…ã€ä¸éœ€å¤åˆ¶ï¼ˆå¦‚字符串ä¸å«è½¬ä¹‰ç¬¦ï¼‰ã€ç¼“å­˜å‹å¥½ã€‚
-* 对于JSON数字类型,支æŒ32-bit/64-bit的有å·ï¼æ— å·æ•´æ•°ï¼Œä»¥åŠ`double`。
-* 错误处ç†
- * 支æŒè¯¦å°½çš„è§£æžé”™è¯¯ä»£å·ã€‚
- * æ”¯æŒæœ¬åœ°åŒ–错误信æ¯ã€‚
-
-## DOM (Document)
-
-* RapidJSONåœ¨ç±»åž‹è½¬æ¢æ—¶ä¼šæ£€æŸ¥æ•°å€¼çš„范围。
-* 字符串字é¢é‡çš„优化
- * åªå‚¨å­˜æŒ‡é’ˆï¼Œä¸ä½œå¤åˆ¶
-* 优化“短â€å­—符串
- * 在`Value`内储存短字符串,无需é¢å¤–分é…。
- * 对UTF-8字符串æ¥è¯´ï¼Œ32使ž¶æž„下å¯å­˜å‚¨æœ€å¤š11字符,64ä½ä¸‹15字符。
-* å¯é€‰åœ°æ”¯æŒ`std::string`(定义`RAPIDJSON_HAS_STDSTRING=1`)
-
-## 生æˆ
-
-* 支æŒ`rapidjson::PrettyWriter`去加入æ¢è¡ŒåŠç¼©è¿›ã€‚
-
-## 输入输出æµ
-
-* 支æŒ`rapidjson::GenericStringBuffer`,把输出的JSON储存于字符串内。
-* 支æŒ`rapidjson::FileReadStream`åŠ`rapidjson::FileWriteStream`,使用`FILE`对象作输入输出。
-* 支æŒè‡ªå®šä¹‰è¾“入输出æµã€‚
-
-## 内存
-
-* 最å°åŒ–DOM的内存开销。
- * 对大部分32ï¼64使œºå™¨è€Œè¨€ï¼Œæ¯ä¸ªJSON值åªå 16或20字节(ä¸åŒ…å«å­—符串)。
-* 支æŒå¿«é€Ÿçš„预设分é…器。
- * 它是一个堆栈形å¼çš„分é…器(顺åºåˆ†é…,ä¸å®¹è®¸å•独释放,适åˆè§£æžè¿‡ç¨‹ä¹‹ç”¨ï¼‰ã€‚
- * ä½¿ç”¨è€…ä¹Ÿå¯æä¾›ä¸€ä¸ªé¢„åˆ†é…的缓冲区。(有å¯èƒ½è¾¾è‡³æ— éœ€CRT分é…就能解æžå¤šä¸ªJSON)
-* æ”¯æŒæ ‡å‡†CRT(C-runtime)分é…器。
-* 支æŒè‡ªå®šä¹‰åˆ†é…器。
-
-## å…¶ä»–
-
-* 一些C++11的支æŒï¼ˆå¯é€‰ï¼‰
- * å³å€¼å¼•用(rvalue reference)
- * `noexcept`修饰符
diff --git a/3rdparty/rapidjson/doc/internals.md b/3rdparty/rapidjson/doc/internals.md
deleted file mode 100644
index 174a03a2477..00000000000
--- a/3rdparty/rapidjson/doc/internals.md
+++ /dev/null
@@ -1,365 +0,0 @@
-# Internals
-
-This section records some design and implementation details.
-
-[TOC]
-
-# Architecture {#Architecture}
-
-## SAX and DOM
-
-The basic relationships of SAX and DOM is shown in the following UML diagram.
-
-![Architecture UML class diagram](diagram/architecture.png)
-
-The core of the relationship is the `Handler` concept. From the SAX side, `Reader` parses a JSON from a stream and publish events to a `Handler`. `Writer` implements the `Handler` concept to handle the same set of events. From the DOM side, `Document` implements the `Handler` concept to build a DOM according to the events. `Value` supports a `Value::Accept(Handler&)` function, which traverses the DOM to publish events.
-
-With this design, SAX is not dependent on DOM. Even `Reader` and `Writer` have no dependencies between them. This provides flexibility to chain event publisher and handlers. Besides, `Value` does not depends on SAX as well. So, in addition to stringify a DOM to JSON, user may also stringify it to a XML writer, or do anything else.
-
-## Utility Classes
-
-Both SAX and DOM APIs depends on 3 additional concepts: `Allocator`, `Encoding` and `Stream`. Their inheritance hierarchy is shown as below.
-
-![Utility classes UML class diagram](diagram/utilityclass.png)
-
-# Value {#Value}
-
-`Value` (actually a typedef of `GenericValue<UTF8<>>`) is the core of DOM API. This section describes the design of it.
-
-## Data Layout {#DataLayout}
-
-`Value` is a [variant type](http://en.wikipedia.org/wiki/Variant_type). In RapidJSON's context, an instance of `Value` can contain 1 of 6 JSON value types. This is possible by using `union`. Each `Value` contains two members: `union Data data_` and a`unsigned flags_`. The `flags_` indiciates the JSON type, and also additional information.
-
-The following tables show the data layout of each type. The 32-bit/64-bit columns indicates the size of the field in bytes.
-
-| Null | |32-bit|64-bit|
-|-------------------|----------------------------------|:----:|:----:|
-| (unused) | |4 |8 |
-| (unused) | |4 |4 |
-| (unused) | |4 |4 |
-| `unsigned flags_` | `kNullType kNullFlag` |4 |4 |
-
-| Bool | |32-bit|64-bit|
-|-------------------|----------------------------------------------------|:----:|:----:|
-| (unused) | |4 |8 |
-| (unused) | |4 |4 |
-| (unused) | |4 |4 |
-| `unsigned flags_` | `kBoolType` (either `kTrueFlag` or `kFalseFlag`) |4 |4 |
-
-| String | |32-bit|64-bit|
-|---------------------|-------------------------------------|:----:|:----:|
-| `Ch* str` | Pointer to the string (may own) |4 |8 |
-| `SizeType length` | Length of string |4 |4 |
-| (unused) | |4 |4 |
-| `unsigned flags_` | `kStringType kStringFlag ...` |4 |4 |
-
-| Object | |32-bit|64-bit|
-|---------------------|-------------------------------------|:----:|:----:|
-| `Member* members` | Pointer to array of members (owned) |4 |8 |
-| `SizeType size` | Number of members |4 |4 |
-| `SizeType capacity` | Capacity of members |4 |4 |
-| `unsigned flags_` | `kObjectType kObjectFlag` |4 |4 |
-
-| Array | |32-bit|64-bit|
-|---------------------|-------------------------------------|:----:|:----:|
-| `Value* values` | Pointer to array of values (owned) |4 |8 |
-| `SizeType size` | Number of values |4 |4 |
-| `SizeType capacity` | Capacity of values |4 |4 |
-| `unsigned flags_` | `kArrayType kArrayFlag` |4 |4 |
-
-| Number (Int) | |32-bit|64-bit|
-|---------------------|-------------------------------------|:----:|:----:|
-| `int i` | 32-bit signed integer |4 |4 |
-| (zero padding) | 0 |4 |4 |
-| (unused) | |4 |8 |
-| `unsigned flags_` | `kNumberType kNumberFlag kIntFlag kInt64Flag ...` |4 |4 |
-
-| Number (UInt) | |32-bit|64-bit|
-|---------------------|-------------------------------------|:----:|:----:|
-| `unsigned u` | 32-bit unsigned integer |4 |4 |
-| (zero padding) | 0 |4 |4 |
-| (unused) | |4 |8 |
-| `unsigned flags_` | `kNumberType kNumberFlag kUIntFlag kUInt64Flag ...` |4 |4 |
-
-| Number (Int64) | |32-bit|64-bit|
-|---------------------|-------------------------------------|:----:|:----:|
-| `int64_t i64` | 64-bit signed integer |8 |8 |
-| (unused) | |4 |8 |
-| `unsigned flags_` | `kNumberType kNumberFlag kInt64Flag ...` |4 |4 |
-
-| Number (Uint64) | |32-bit|64-bit|
-|---------------------|-------------------------------------|:----:|:----:|
-| `uint64_t i64` | 64-bit unsigned integer |8 |8 |
-| (unused) | |4 |8 |
-| `unsigned flags_` | `kNumberType kNumberFlag kInt64Flag ...` |4 |4 |
-
-| Number (Double) | |32-bit|64-bit|
-|---------------------|-------------------------------------|:----:|:----:|
-| `uint64_t i64` | Double precision floating-point |8 |8 |
-| (unused) | |4 |8 |
-| `unsigned flags_` | `kNumberType kNumberFlag kDoubleFlag` |4 |4 |
-
-Here are some notes:
-* To reduce memory consumption for 64-bit architecture, `SizeType` is typedef as `unsigned` instead of `size_t`.
-* Zero padding for 32-bit number may be placed after or before the actual type, according to the endianess. This makes possible for interpreting a 32-bit integer as a 64-bit integer, without any conversion.
-* An `Int` is always an `Int64`, but the converse is not always true.
-
-## Flags {#Flags}
-
-The 32-bit `flags_` contains both JSON type and other additional information. As shown in the above tables, each JSON type contains redundant `kXXXType` and `kXXXFlag`. This design is for optimizing the operation of testing bit-flags (`IsNumber()`) and obtaining a sequential number for each type (`GetType()`).
-
-String has two optional flags. `kCopyFlag` means that the string owns a copy of the string. `kInlineStrFlag` means using [Short-String Optimization](#ShortString).
-
-Number is a bit more complicated. For normal integer values, it can contains `kIntFlag`, `kUintFlag`, `kInt64Flag` and/or `kUint64Flag`, according to the range of the integer. For numbers with fraction, and integers larger than 64-bit range, they will be stored as `double` with `kDoubleFlag`.
-
-## Short-String Optimization {#ShortString}
-
- Kosta (@Kosta-Github) provided a very neat short-string optimization. The optimization idea is given as follow. Excluding the `flags_`, a `Value` has 12 or 16 bytes (32-bit or 64-bit) for storing actual data. Instead of storing a pointer to a string, it is possible to store short strings in these space internally. For encoding with 1-byte character type (e.g. `char`), it can store maximum 11 or 15 characters string inside the `Value` type.
-
-| ShortString (Ch=char) | |32-bit|64-bit|
-|---------------------|-------------------------------------|:----:|:----:|
-| `Ch str[MaxChars]` | String buffer |11 |15 |
-| `Ch invLength` | MaxChars - Length |1 |1 |
-| `unsigned flags_` | `kStringType kStringFlag ...` |4 |4 |
-
-A special technique is applied. Instead of storing the length of string directly, it stores (MaxChars - length). This make it possible to store 11 characters with trailing `\0`.
-
-This optimization can reduce memory usage for copy-string. It can also improve cache-coherence thus improve runtime performance.
-
-# Allocator {#Allocator}
-
-`Allocator` is a concept in RapidJSON:
-~~~cpp
-concept Allocator {
- static const bool kNeedFree; //!< Whether this allocator needs to call Free().
-
- // Allocate a memory block.
- // \param size of the memory block in bytes.
- // \returns pointer to the memory block.
- void* Malloc(size_t size);
-
- // Resize a memory block.
- // \param originalPtr The pointer to current memory block. Null pointer is permitted.
- // \param originalSize The current size in bytes. (Design issue: since some allocator may not book-keep this, explicitly pass to it can save memory.)
- // \param newSize the new size in bytes.
- void* Realloc(void* originalPtr, size_t originalSize, size_t newSize);
-
- // Free a memory block.
- // \param pointer to the memory block. Null pointer is permitted.
- static void Free(void *ptr);
-};
-~~~
-
-Note that `Malloc()` and `Realloc()` are member functions but `Free()` is static member function.
-
-## MemoryPoolAllocator {#MemoryPoolAllocator}
-
-`MemoryPoolAllocator` is the default allocator for DOM. It allocate but do not free memory. This is suitable for building a DOM tree.
-
-Internally, it allocates chunks of memory from the base allocator (by default `CrtAllocator`) and stores the chunks as a singly linked list. When user requests an allocation, it allocates memory from the following order:
-
-1. User supplied buffer if it is available. (See [User Buffer section in DOM](dom.md))
-2. If user supplied buffer is full, use the current memory chunk.
-3. If the current block is full, allocate a new block of memory.
-
-# Parsing Optimization {#ParsingOptimization}
-
-## Skip Whitespaces with SIMD {#SkipwhitespaceWithSIMD}
-
-When parsing JSON from a stream, the parser need to skip 4 whitespace characters:
-
-1. Space (`U+0020`)
-2. Character Tabulation (`U+000B`)
-3. Line Feed (`U+000A`)
-4. Carriage Return (`U+000D`)
-
-A simple implementation will be simply:
-~~~cpp
-void SkipWhitespace(InputStream& s) {
- while (s.Peek() == ' ' || s.Peek() == '\n' || s.Peek() == '\r' || s.Peek() == '\t')
- s.Take();
-}
-~~~
-
-However, this requires 4 comparisons and a few branching for each character. This was found to be a hot spot.
-
-To accelerate this process, SIMD was applied to compare 16 characters with 4 white spaces for each iteration. Currently RapidJSON only supports SSE2 and SSE4.2 instructions for this. And it is only activated for UTF-8 memory streams, including string stream or *in situ* parsing.
-
-To enable this optimization, need to define `RAPIDJSON_SSE2` or `RAPIDJSON_SSE42` before including `rapidjson.h`. Some compilers can detect the setting, as in `perftest.h`:
-
-~~~cpp
-// __SSE2__ and __SSE4_2__ are recognized by gcc, clang, and the Intel compiler.
-// We use -march=native with gmake to enable -msse2 and -msse4.2, if supported.
-#if defined(__SSE4_2__)
-# define RAPIDJSON_SSE42
-#elif defined(__SSE2__)
-# define RAPIDJSON_SSE2
-#endif
-~~~
-
-Note that, these are compile-time settings. Running the executable on a machine without such instruction set support will make it crash.
-
-### Page boundary issue
-
-In an early version of RapidJSON, [an issue](https://code.google.com/archive/p/rapidjson/issues/104) reported that the `SkipWhitespace_SIMD()` causes crash very rarely (around 1 in 500,000). After investigation, it is suspected that `_mm_loadu_si128()` accessed bytes after `'\0'`, and across a protected page boundary.
-
-In [Intel® 64 and IA-32 Architectures Optimization Reference Manual
-](http://www.intel.com/content/www/us/en/architecture-and-technology/64-ia-32-architectures-optimization-manual.html), section 10.2.1:
-
-> To support algorithms requiring unaligned 128-bit SIMD memory accesses, memory buffer allocation by a caller function should consider adding some pad space so that a callee function can safely use the address pointer safely with unaligned 128-bit SIMD memory operations.
-> The minimal padding size should be the width of the SIMD register that might be used in conjunction with unaligned SIMD memory access.
-
-This is not feasible as RapidJSON should not enforce such requirement.
-
-To fix this issue, currently the routine process bytes up to the next aligned address. After tha, use aligned read to perform SIMD processing. Also see [#85](https://github.com/miloyip/rapidjson/issues/85).
-
-## Local Stream Copy {#LocalStreamCopy}
-
-During optimization, it is found that some compilers cannot localize some member data access of streams into local variables or registers. Experimental results show that for some stream types, making a copy of the stream and used it in inner-loop can improve performance. For example, the actual (non-SIMD) implementation of `SkipWhitespace()` is implemented as:
-
-~~~cpp
-template<typename InputStream>
-void SkipWhitespace(InputStream& is) {
- internal::StreamLocalCopy<InputStream> copy(is);
- InputStream& s(copy.s);
-
- while (s.Peek() == ' ' || s.Peek() == '\n' || s.Peek() == '\r' || s.Peek() == '\t')
- s.Take();
-}
-~~~
-
-Depending on the traits of stream, `StreamLocalCopy` will make (or not make) a copy of the stream object, use it locally and copy the states of stream back to the original stream.
-
-## Parsing to Double {#ParsingDouble}
-
-Parsing string into `double` is difficult. The standard library function `strtod()` can do the job but it is slow. By default, the parsers use normal precision setting. This has has maximum 3 [ULP](http://en.wikipedia.org/wiki/Unit_in_the_last_place) error and implemented in `internal::StrtodNormalPrecision()`.
-
-When using `kParseFullPrecisionFlag`, the parsers calls `internal::StrtodFullPrecision()` instead, and this function actually implemented 3 versions of conversion methods.
-1. [Fast-Path](http://www.exploringbinary.com/fast-path-decimal-to-floating-point-conversion/).
-2. Custom DIY-FP implementation as in [double-conversion](https://github.com/floitsch/double-conversion).
-3. Big Integer Method as in (Clinger, William D. How to read floating point numbers accurately. Vol. 25. No. 6. ACM, 1990).
-
-If the first conversion methods fail, it will try the second, and so on.
-
-# Generation Optimization {#GenerationOptimization}
-
-## Integer-to-String conversion {#itoa}
-
-The naive algorithm for integer-to-string conversion involves division per each decimal digit. We have implemented various implementations and evaluated them in [itoa-benchmark](https://github.com/miloyip/itoa-benchmark).
-
-Although SSE2 version is the fastest but the difference is minor by comparing to the first running-up `branchlut`. And `branchlut` is pure C++ implementation so we adopt `branchlut` in RapidJSON.
-
-## Double-to-String conversion {#dtoa}
-
-Originally RapidJSON uses `snprintf(..., ..., "%g")` to achieve double-to-string conversion. This is not accurate as the default precision is 6. Later we also find that this is slow and there is an alternative.
-
-Google's V8 [double-conversion](https://github.com/floitsch/double-conversion
-) implemented a newer, fast algorithm called Grisu3 (Loitsch, Florian. "Printing floating-point numbers quickly and accurately with integers." ACM Sigplan Notices 45.6 (2010): 233-243.).
-
-However, since it is not header-only so that we implemented a header-only version of Grisu2. This algorithm guarantees that the result is always accurate. And in most of cases it produces the shortest (optimal) string representation.
-
-The header-only conversion function has been evaluated in [dtoa-benchmark](https://github.com/miloyip/dtoa-benchmark).
-
-# Parser {#Parser}
-
-## Iterative Parser {#IterativeParser}
-
-The iterative parser is a recursive descent LL(1) parser
-implemented in a non-recursive manner.
-
-### Grammar {#IterativeParserGrammar}
-
-The grammar used for this parser is based on strict JSON syntax:
-~~~~~~~~~~
-S -> array | object
-array -> [ values ]
-object -> { members }
-values -> non-empty-values | ε
-non-empty-values -> value addition-values
-addition-values -> ε | , non-empty-values
-members -> non-empty-members | ε
-non-empty-members -> member addition-members
-addition-members -> ε | , non-empty-members
-member -> STRING : value
-value -> STRING | NUMBER | NULL | BOOLEAN | object | array
-~~~~~~~~~~
-
-Note that left factoring is applied to non-terminals `values` and `members`
-to make the grammar be LL(1).
-
-### Parsing Table {#IterativeParserParsingTable}
-
-Based on the grammar, we can construct the FIRST and FOLLOW set.
-
-The FIRST set of non-terminals is listed below:
-
-| NON-TERMINAL | FIRST |
-|:-----------------:|:--------------------------------:|
-| array | [ |
-| object | { |
-| values | ε STRING NUMBER NULL BOOLEAN { [ |
-| addition-values | ε COMMA |
-| members | ε STRING |
-| addition-members | ε COMMA |
-| member | STRING |
-| value | STRING NUMBER NULL BOOLEAN { [ |
-| S | [ { |
-| non-empty-members | STRING |
-| non-empty-values | STRING NUMBER NULL BOOLEAN { [ |
-
-The FOLLOW set is listed below:
-
-| NON-TERMINAL | FOLLOW |
-|:-----------------:|:-------:|
-| S | $ |
-| array | , $ } ] |
-| object | , $ } ] |
-| values | ] |
-| non-empty-values | ] |
-| addition-values | ] |
-| members | } |
-| non-empty-members | } |
-| addition-members | } |
-| member | , } |
-| value | , } ] |
-
-Finally the parsing table can be constructed from FIRST and FOLLOW set:
-
-| NON-TERMINAL | [ | { | , | : | ] | } | STRING | NUMBER | NULL | BOOLEAN |
-|:-----------------:|:---------------------:|:---------------------:|:-------------------:|:-:|:-:|:-:|:-----------------------:|:---------------------:|:---------------------:|:---------------------:|
-| S | array | object | | | | | | | | |
-| array | [ values ] | | | | | | | | | |
-| object | | { members } | | | | | | | | |
-| values | non-empty-values | non-empty-values | | | ε | | non-empty-values | non-empty-values | non-empty-values | non-empty-values |
-| non-empty-values | value addition-values | value addition-values | | | | | value addition-values | value addition-values | value addition-values | value addition-values |
-| addition-values | | | , non-empty-values | | ε | | | | | |
-| members | | | | | | ε | non-empty-members | | | |
-| non-empty-members | | | | | | | member addition-members | | | |
-| addition-members | | | , non-empty-members | | | ε | | | | |
-| member | | | | | | | STRING : value | | | |
-| value | array | object | | | | | STRING | NUMBER | NULL | BOOLEAN |
-
-There is a great [tool](http://hackingoff.com/compilers/predict-first-follow-set) for above grammar analysis.
-
-### Implementation {#IterativeParserImplementation}
-
-Based on the parsing table, a direct(or conventional) implementation
-that pushes the production body in reverse order
-while generating a production could work.
-
-In RapidJSON, several modifications(or adaptations to current design) are made to a direct implementation.
-
-First, the parsing table is encoded in a state machine in RapidJSON.
-States are constructed by the head and body of production.
-State transitions are constructed by production rules.
-Besides, extra states are added for productions involved with `array` and `object`.
-In this way the generation of array values or object members would be a single state transition,
-rather than several pop/push operations in the direct implementation.
-This also makes the estimation of stack size more easier.
-
-The state diagram is shown as follows:
-
-![State Diagram](diagram/iterative-parser-states-diagram.png)
-
-Second, the iterative parser also keeps track of array's value count and object's member count
-in its internal stack, which may be different from a conventional implementation.
diff --git a/3rdparty/rapidjson/doc/logo/rapidjson.png b/3rdparty/rapidjson/doc/logo/rapidjson.png
deleted file mode 100644
index b3b2f80ccb9..00000000000
--- a/3rdparty/rapidjson/doc/logo/rapidjson.png
+++ /dev/null
Binary files differ
diff --git a/3rdparty/rapidjson/doc/logo/rapidjson.svg b/3rdparty/rapidjson/doc/logo/rapidjson.svg
deleted file mode 100644
index 9708d5a06f3..00000000000
--- a/3rdparty/rapidjson/doc/logo/rapidjson.svg
+++ /dev/null
@@ -1,119 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="217.15039"
- height="60.831055"
- id="svg2"
- version="1.1"
- inkscape:version="0.48.4 r9939"
- sodipodi:docname="rapidjson.svg">
- <defs
- id="defs4">
- <linearGradient
- id="linearGradient3801">
- <stop
- style="stop-color:#000000;stop-opacity:1;"
- offset="0"
- id="stop3803" />
- <stop
- style="stop-color:#000000;stop-opacity:0;"
- offset="1"
- id="stop3805" />
- </linearGradient>
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient3801"
- id="linearGradient3807"
- x1="81.25"
- y1="52.737183"
- x2="122.25"
- y2="52.737183"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.2378503,0,0,1.1662045,-226.99279,64.427324)" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient3801"
- id="linearGradient3935"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1.4768835,0,0,2.2904698,246.48785,81.630301)"
- x1="81.25"
- y1="52.737183"
- x2="115.96579"
- y2="48.439766" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient3801"
- id="linearGradient3947"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.2378503,0,0,1.1662045,-226.99279,-10.072676)"
- x1="81.25"
- y1="52.737183"
- x2="122.25"
- y2="52.737183" />
- </defs>
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="2"
- inkscape:cx="207.8959"
- inkscape:cy="-3.2283687"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="false"
- inkscape:window-width="1920"
- inkscape:window-height="1137"
- inkscape:window-x="-8"
- inkscape:window-y="-8"
- inkscape:window-maximized="1"
- fit-margin-top="10"
- fit-margin-left="10"
- fit-margin-right="10"
- fit-margin-bottom="10" />
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(-39.132812,-38.772339)">
- <text
- sodipodi:linespacing="125%"
- id="text3939"
- y="79.862183"
- x="147.5"
- style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Microsoft JhengHei;-inkscape-font-specification:Microsoft JhengHei"
- xml:space="preserve"><tspan
- style="font-size:48px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Inconsolata;-inkscape-font-specification:Inconsolata"
- y="79.862183"
- x="147.5"
- id="tspan3941"
- sodipodi:role="line"><tspan
- id="tspan3943"
- style="font-size:42px;font-style:oblique;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;font-family:Segoe UI;-inkscape-font-specification:Segoe UI Oblique">Rapid</tspan><tspan
- id="tspan3945"
- style="font-weight:bold;-inkscape-font-specification:Inconsolata Bold">JSON</tspan></tspan></text>
- </g>
-</svg>
diff --git a/3rdparty/rapidjson/doc/misc/DoxygenLayout.xml b/3rdparty/rapidjson/doc/misc/DoxygenLayout.xml
deleted file mode 100644
index b7c958665b4..00000000000
--- a/3rdparty/rapidjson/doc/misc/DoxygenLayout.xml
+++ /dev/null
@@ -1,194 +0,0 @@
-<doxygenlayout version="1.0">
- <!-- Generated by doxygen 1.8.7 -->
- <!-- Navigation index tabs for HTML output -->
- <navindex>
- <tab type="mainpage" visible="yes" title=""/>
- <tab type="pages" visible="yes" title="" intro=""/>
- <tab type="modules" visible="yes" title="" intro=""/>
- <tab type="namespaces" visible="yes" title="">
- <tab type="namespacelist" visible="yes" title="" intro=""/>
- <tab type="namespacemembers" visible="yes" title="" intro=""/>
- </tab>
- <tab type="classes" visible="yes" title="">
- <tab type="classlist" visible="yes" title="" intro=""/>
- <tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/>
- <tab type="hierarchy" visible="yes" title="" intro=""/>
- <tab type="classmembers" visible="yes" title="" intro=""/>
- </tab>
- <tab type="files" visible="yes" title="">
- <tab type="filelist" visible="yes" title="" intro=""/>
- <tab type="globals" visible="yes" title="" intro=""/>
- </tab>
- <tab type="examples" visible="yes" title="" intro=""/>
- </navindex>
-
- <!-- Layout definition for a class page -->
- <class>
- <briefdescription visible="yes"/>
- <includes visible="$SHOW_INCLUDE_FILES"/>
- <inheritancegraph visible="$CLASS_GRAPH"/>
- <collaborationgraph visible="$COLLABORATION_GRAPH"/>
- <memberdecl>
- <nestedclasses visible="yes" title=""/>
- <publictypes title=""/>
- <services title=""/>
- <interfaces title=""/>
- <publicslots title=""/>
- <signals title=""/>
- <publicmethods title=""/>
- <publicstaticmethods title=""/>
- <publicattributes title=""/>
- <publicstaticattributes title=""/>
- <protectedtypes title=""/>
- <protectedslots title=""/>
- <protectedmethods title=""/>
- <protectedstaticmethods title=""/>
- <protectedattributes title=""/>
- <protectedstaticattributes title=""/>
- <packagetypes title=""/>
- <packagemethods title=""/>
- <packagestaticmethods title=""/>
- <packageattributes title=""/>
- <packagestaticattributes title=""/>
- <properties title=""/>
- <events title=""/>
- <privatetypes title=""/>
- <privateslots title=""/>
- <privatemethods title=""/>
- <privatestaticmethods title=""/>
- <privateattributes title=""/>
- <privatestaticattributes title=""/>
- <friends title=""/>
- <related title="" subtitle=""/>
- <membergroups visible="yes"/>
- </memberdecl>
- <detaileddescription title=""/>
- <memberdef>
- <inlineclasses title=""/>
- <typedefs title=""/>
- <enums title=""/>
- <services title=""/>
- <interfaces title=""/>
- <constructors title=""/>
- <functions title=""/>
- <related title=""/>
- <variables title=""/>
- <properties title=""/>
- <events title=""/>
- </memberdef>
- <allmemberslink visible="yes"/>
- <usedfiles visible="$SHOW_USED_FILES"/>
- <authorsection visible="yes"/>
- </class>
-
- <!-- Layout definition for a namespace page -->
- <namespace>
- <briefdescription visible="yes"/>
- <memberdecl>
- <nestednamespaces visible="yes" title=""/>
- <constantgroups visible="yes" title=""/>
- <classes visible="yes" title=""/>
- <typedefs title=""/>
- <enums title=""/>
- <functions title=""/>
- <variables title=""/>
- <membergroups visible="yes"/>
- </memberdecl>
- <detaileddescription title=""/>
- <memberdef>
- <inlineclasses title=""/>
- <typedefs title=""/>
- <enums title=""/>
- <functions title=""/>
- <variables title=""/>
- </memberdef>
- <authorsection visible="yes"/>
- </namespace>
-
- <!-- Layout definition for a file page -->
- <file>
- <briefdescription visible="yes"/>
- <includes visible="$SHOW_INCLUDE_FILES"/>
- <includegraph visible="$INCLUDE_GRAPH"/>
- <includedbygraph visible="$INCLUDED_BY_GRAPH"/>
- <sourcelink visible="yes"/>
- <memberdecl>
- <classes visible="yes" title=""/>
- <namespaces visible="yes" title=""/>
- <constantgroups visible="yes" title=""/>
- <defines title=""/>
- <typedefs title=""/>
- <enums title=""/>
- <functions title=""/>
- <variables title=""/>
- <membergroups visible="yes"/>
- </memberdecl>
- <detaileddescription title=""/>
- <memberdef>
- <inlineclasses title=""/>
- <defines title=""/>
- <typedefs title=""/>
- <enums title=""/>
- <functions title=""/>
- <variables title=""/>
- </memberdef>
- <authorsection/>
- </file>
-
- <!-- Layout definition for a group page -->
- <group>
- <briefdescription visible="yes"/>
- <groupgraph visible="$GROUP_GRAPHS"/>
- <memberdecl>
- <nestedgroups visible="yes" title=""/>
- <dirs visible="yes" title=""/>
- <files visible="yes" title=""/>
- <namespaces visible="yes" title=""/>
- <classes visible="yes" title=""/>
- <defines title=""/>
- <typedefs title=""/>
- <enums title=""/>
- <enumvalues title=""/>
- <functions title=""/>
- <variables title=""/>
- <signals title=""/>
- <publicslots title=""/>
- <protectedslots title=""/>
- <privateslots title=""/>
- <events title=""/>
- <properties title=""/>
- <friends title=""/>
- <membergroups visible="yes"/>
- </memberdecl>
- <detaileddescription title=""/>
- <memberdef>
- <pagedocs/>
- <inlineclasses title=""/>
- <defines title=""/>
- <typedefs title=""/>
- <enums title=""/>
- <enumvalues title=""/>
- <functions title=""/>
- <variables title=""/>
- <signals title=""/>
- <publicslots title=""/>
- <protectedslots title=""/>
- <privateslots title=""/>
- <events title=""/>
- <properties title=""/>
- <friends title=""/>
- </memberdef>
- <authorsection visible="yes"/>
- </group>
-
- <!-- Layout definition for a directory page -->
- <directory>
- <briefdescription visible="yes"/>
- <directorygraph visible="yes"/>
- <memberdecl>
- <dirs visible="yes"/>
- <files visible="yes"/>
- </memberdecl>
- <detaileddescription title=""/>
- </directory>
-</doxygenlayout>
diff --git a/3rdparty/rapidjson/doc/misc/doxygenextra.css b/3rdparty/rapidjson/doc/misc/doxygenextra.css
deleted file mode 100644
index bd6737585b6..00000000000
--- a/3rdparty/rapidjson/doc/misc/doxygenextra.css
+++ /dev/null
@@ -1,274 +0,0 @@
-body code {
- margin: 0;
- border: 1px solid #ddd;
- background-color: #f8f8f8;
- border-radius: 3px;
- padding: 0;
-}
-
-a {
- color: #4183c4;
-}
-
-a.el {
- font-weight: normal;
-}
-
-body, table, div, p, dl {
- color: #333333;
- font-family: Helvetica, arial, freesans, clean, sans-serif, 'Segoe UI Emoji', 'Segoe UI Symbol';
- font-size: 15px;
- font-style: normal;
- font-variant: normal;
- font-weight: normal;
- line-height: 25.5px;
-}
-
-body {
- background-color: #eee;
-}
-
-div.header {
- background-image: none;
- background-color: white;
- margin: 0px;
- border: 0px;
-}
-
-div.headertitle {
- width: 858px;
- margin: 30px;
- padding: 0px;
-}
-
-div.toc {
- background-color: #f8f8f8;
- border-color: #ddd;
- margin-right: 10px;
- margin-left: 20px;
-}
-div.toc h3 {
- color: #333333;
- font-family: Helvetica, arial, freesans, clean, sans-serif, 'Segoe UI Emoji', 'Segoe UI Symbol';
- font-size: 18px;
- font-style: normal;
- font-variant: normal;
- font-weight: normal;
-}
-div.toc li {
- color: #333333;
- font-family: Helvetica, arial, freesans, clean, sans-serif, 'Segoe UI Emoji', 'Segoe UI Symbol';
- font-size: 12px;
- font-style: normal;
- font-variant: normal;
- font-weight: normal;
-}
-
-.title {
- font-size: 2.5em;
- line-height: 63.75px;
- border-bottom: 1px solid #ddd;
- margin-bottom: 15px;
- margin-left: 0px;
- margin-right: 0px;
- margin-top: 0px;
-}
-
-.summary {
- float: none !important;
- width: auto !important;
- padding-top: 10px;
- padding-right: 10px !important;
-}
-
-.summary + .headertitle .title {
- font-size: 1.5em;
- line-height: 2.0em;
-}
-
-body h1 {
- font-size: 2em;
- line-height: 1.7;
- border-bottom: 1px solid #eee;
- margin: 1em 0 15px;
- padding: 0;
- overflow: hidden;
-}
-
-body h2 {
- font-size: 1.5em;
- line-height: 1.7;
- margin: 1em 0 15px;
- padding: 0;
-}
-
-pre.fragment {
- font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;
- font-size: 13px;
- font-style: normal;
- font-variant: normal;
- font-weight: normal;
- line-height: 19px;
-}
-
-table.doxtable th {
- background-color: #f8f8f8;
- color: #333333;
- font-size: 15px;
-}
-
-table.doxtable td, table.doxtable th {
- border: 1px solid #ddd;
-}
-
-#doc-content {
- background-color: #fff;
- width: 918px;
- height: auto !important;
- margin-left: 270px !important;
-}
-
-div.contents {
- width: 858px;
- margin: 30px;
-}
-
-div.line {
- font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;
- font-size: 13px;
- font-style: normal;
- font-variant: normal;
- font-weight: normal;
- line-height: 19px;
-}
-
-tt, code, pre {
- font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
- font-size: 12px;
-}
-
-div.fragment {
- background-color: #f8f8f8;
- border: 1px solid #ddd;
- font-size: 13px;
- line-height: 19px;
- overflow: auto;
- padding: 6px 10px;
- border-radius: 3px;
-}
-
-#topbanner {
- position: fixed;
- margin: 15px;
- z-index: 101;
-}
-
-#projectname
-{
- font-family: Helvetica, arial, freesans, clean, sans-serif, 'Segoe UI Emoji', 'Segoe UI Symbol';
- font-size: 38px;
- font-weight: bold;
- line-height: 63.75px;
- margin: 0px;
- padding: 2px 0px;
-}
-
-#projectbrief
-{
- font-family: Helvetica, arial, freesans, clean, sans-serif, 'Segoe UI Emoji', 'Segoe UI Symbol';
- font-size: 16px;
- line-height: 22.4px;
- margin: 0px 0px 13px 0px;
- padding: 2px;
-}
-
-/* side bar and search */
-
-#side-nav
-{
- padding: 10px 0px 20px 20px;
- border-top: 60px solid #2980b9;
- background-color: #343131;
- width: 250px !important;
- height: 100% !important;
- position: fixed;
-}
-
-#nav-tree
-{
- background-color: transparent;
- background-image: none;
- height: 100% !important;
-}
-
-#nav-tree .label
-{
- font-family: Helvetica, arial, freesans, clean, sans-serif, 'Segoe UI Emoji', 'Segoe UI Symbol';
- line-height: 25.5px;
- font-size: 15px;
-}
-
-#nav-tree
-{
- color: #b3b3b3;
-}
-
-#nav-tree .selected {
- background-image: none;
-}
-
-#nav-tree a
-{
- color: #b3b3b3;
-}
-
-#github
-{
- position: fixed;
- left: auto;
- right: auto;
- width: 250px;
-}
-
-#MSearchBox
-{
- margin: 20px;
- left: 40px;
- right: auto;
- position: fixed;
- width: 180px;
-}
-
-#MSearchField
-{
- width: 121px;
-}
-
-#MSearchResultsWindow
-{
- left: 45px !important;
-}
-
-#nav-sync
-{
- display: none;
-}
-
-.ui-resizable .ui-resizable-handle
-{
- width: 0px;
-}
-
-#nav-path
-{
- display: none;
-}
-
-/* external link icon */
-div.contents a[href ^= "http"]:after {
- content: " " url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAVklEQVR4Xn3PgQkAMQhDUXfqTu7kTtkpd5RA8AInfArtQ2iRXFWT2QedAfttj2FsPIOE1eCOlEuoWWjgzYaB/IkeGOrxXhqB+uA9Bfcm0lAZuh+YIeAD+cAqSz4kCMUAAAAASUVORK5CYII=);
-}
-
-.githublogo {
- content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NDkxMSwgMjAxMy8xMC8yOS0xMTo0NzoxNiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RERCMUIwOUY4NkNFMTFFM0FBNTJFRTMzNTJEMUJDNDYiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RERCMUIwOUU4NkNFMTFFM0FBNTJFRTMzNTJEMUJDNDYiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkU1MTc4QTJBOTlBMDExRTI5QTE1QkMxMDQ2QTg5MDREIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkU1MTc4QTJCOTlBMDExRTI5QTE1QkMxMDQ2QTg5MDREIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+jUqS1wAAApVJREFUeNq0l89rE1EQx3e3gVJoSPzZeNEWPKgHoa0HBak0iHiy/4C3WvDmoZ56qJ7txVsPQu8qlqqHIhRKJZceesmhioQEfxTEtsoSpdJg1u/ABJ7Pmc1m8zLwgWTmzcw3L+/te+tHUeQltONgCkyCi2AEDHLsJ6iBMlgHL8FeoqokoA2j4CloRMmtwTmj7erHBXPgCWhG6a3JNXKdCiDl1cidVbXZkJoXQRi5t5BrxwoY71FzU8S4JuAIqFkJ2+BFSlEh525b/hr3+k/AklDkNsf6wTT4yv46KIMNpsy+iMdMc47HNWxbsgVcUn7FmLAzzoFAWDsBx+wVP6bUpp5ewI+DOeUx0Wd9D8F70BTGNjkWtqnhmT1JQAHcUgZd8Lo3rQb1LAT8eJVUfgGvHQigGp+V2Z0iAUUl8QH47kAA1XioxIo+bRN8OG8F/oBjwv+Z1nJgX5jpdzQDw0LCjsPmrcW7I/iHScCAEDj03FtD8A0EyuChHgg4KTlJQF3wZ7WELppnBX+dBFSVpJsOBWi1qiRgSwnOgoyD5hmuJdkWCVhTgnTvW3AgYIFrSbZGh0UW/Io5Vp+DQoK7o80pztWMemZbgxeNwCNwDbw1fIfgGZjhU6xPaJgBV8BdsMw5cbZoHsenwYFxkZzl83xTSKTiviCAfCsJLysH3POfC8m8NegyGAGfLP/VmGmfSChgXroR0RSWjEFv2J/nG84cuKFMf4sTCZqXuJd4KaXFVjEG3+tw4eXbNK/YC9oXXs3O8NY8y99L4BXY5cvLY/Bb2VZ58EOJVcB18DHJq9lRsKr8inyKGVjlmh29mtHs3AHfuhCwy1vXT/Nu2GKQt+UHsGdctyX6eQyNvc+5sfX9Dl7Pe2J/BRgAl2CpwmrsHR0AAAAASUVORK5CYII=);
-} \ No newline at end of file
diff --git a/3rdparty/rapidjson/doc/misc/footer.html b/3rdparty/rapidjson/doc/misc/footer.html
deleted file mode 100644
index 843aa110448..00000000000
--- a/3rdparty/rapidjson/doc/misc/footer.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!-- HTML footer for doxygen 1.8.7-->
-<!-- start footer part -->
-<!--BEGIN GENERATE_TREEVIEW-->
-<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
- <ul>
- $navpath
- </ul>
-</div>
-<!--END GENERATE_TREEVIEW-->
-<script type="text/javascript">
- /* * * CONFIGURATION VARIABLES * * */
- var disqus_shortname = 'rapidjson-doc';
-
- /* * * DON'T EDIT BELOW THIS LINE * * */
- (function() {
- var dt = document.createElement('div');
- dt.id = "disqus_thread";
- (document.getElementsByClassName('contents')[0]).appendChild(dt);
-
- var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
- dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
- (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
- })();
-</script>
-
-</body>
-</html>
diff --git a/3rdparty/rapidjson/doc/misc/header.html b/3rdparty/rapidjson/doc/misc/header.html
deleted file mode 100644
index d43f2aaff9a..00000000000
--- a/3rdparty/rapidjson/doc/misc/header.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!-- HTML header for doxygen 1.8.7-->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<meta http-equiv="X-UA-Compatible" content="IE=9"/>
-<meta name="generator" content="Doxygen $doxygenversion"/>
-<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
-<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
-<link href="$relpath^tabs.css" rel="stylesheet" type="text/css"/>
-<script type="text/javascript" src="$relpath^jquery.js"></script>
-<script type="text/javascript" src="$relpath^dynsections.js"></script>
-$treeview
-$search
-$mathjax
-<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />
-$extrastylesheet
-</head>
-<script>
- (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
- (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
- m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
- })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
-
- ga('create', 'UA-63929386-1', 'auto');
- ga('send', 'pageview');
-</script>
-<body>
-<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
-<div id="topbanner"><a href="https://github.com/miloyip/rapidjson" title="RapidJSON GitHub"><i class="githublogo"></i></a></div>
-$searchbox
-<!--END TITLEAREA-->
-<!-- end header part -->
diff --git a/3rdparty/rapidjson/doc/performance.md b/3rdparty/rapidjson/doc/performance.md
deleted file mode 100644
index 702ca7230b5..00000000000
--- a/3rdparty/rapidjson/doc/performance.md
+++ /dev/null
@@ -1,26 +0,0 @@
-# Performance
-
-There is a [native JSON benchmark collection] [1] which evaluates speed, memory usage and code size of various operations among 20 JSON libaries.
-
-[1]: https://github.com/miloyip/nativejson-benchmark
-
-The old performance article for RapidJSON 0.1 is provided [here](https://code.google.com/p/rapidjson/wiki/Performance).
-
-Additionally, you may refer to the following third-party benchmarks.
-
-## Third-party benchmarks
-
-* [Basic benchmarks for miscellaneous C++ JSON parsers and generators](https://github.com/mloskot/json_benchmark) by Mateusz Loskot (Jun 2013)
- * [casablanca](https://casablanca.codeplex.com/)
- * [json_spirit](https://github.com/cierelabs/json_spirit)
- * [jsoncpp](http://jsoncpp.sourceforge.net/)
- * [libjson](http://sourceforge.net/projects/libjson/)
- * [rapidjson](https://github.com/miloyip/rapidjson/)
- * [QJsonDocument](http://qt-project.org/doc/qt-5.0/qtcore/qjsondocument.html)
-
-* [JSON Parser Benchmarking](http://chadaustin.me/2013/01/json-parser-benchmarking/) by Chad Austin (Jan 2013)
- * [sajson](https://github.com/chadaustin/sajson)
- * [rapidjson](https://github.com/miloyip/rapidjson/)
- * [vjson](https://code.google.com/p/vjson/)
- * [YAJL](http://lloyd.github.com/yajl/)
- * [Jansson](http://www.digip.org/jansson/)
diff --git a/3rdparty/rapidjson/doc/performance.zh-cn.md b/3rdparty/rapidjson/doc/performance.zh-cn.md
deleted file mode 100644
index b590fe0c617..00000000000
--- a/3rdparty/rapidjson/doc/performance.zh-cn.md
+++ /dev/null
@@ -1,26 +0,0 @@
-# 性能
-
-有一个[native JSON benchmark collection][1]项目,能评估20个JSON库在ä¸åŒæ“作下的速度ã€å…§å­˜ç”¨é‡åŠä»£ç å¤§å°ã€‚
-
-[1]: https://github.com/miloyip/nativejson-benchmark
-
-RapidJSON 0.1版本的性能测试文章ä½äºŽ[这里](https://code.google.com/p/rapidjson/wiki/Performance).
-
-此外,你也å¯ä»¥å‚考以下这些第三方的评测。
-
-## 第三方评测
-
-* [Basic benchmarks for miscellaneous C++ JSON parsers and generators](https://github.com/mloskot/json_benchmark) by Mateusz Loskot (Jun 2013)
- * [casablanca](https://casablanca.codeplex.com/)
- * [json_spirit](https://github.com/cierelabs/json_spirit)
- * [jsoncpp](http://jsoncpp.sourceforge.net/)
- * [libjson](http://sourceforge.net/projects/libjson/)
- * [rapidjson](https://github.com/miloyip/rapidjson/)
- * [QJsonDocument](http://qt-project.org/doc/qt-5.0/qtcore/qjsondocument.html)
-
-* [JSON Parser Benchmarking](http://chadaustin.me/2013/01/json-parser-benchmarking/) by Chad Austin (Jan 2013)
- * [sajson](https://github.com/chadaustin/sajson)
- * [rapidjson](https://github.com/miloyip/rapidjson/)
- * [vjson](https://code.google.com/p/vjson/)
- * [YAJL](http://lloyd.github.com/yajl/)
- * [Jansson](http://www.digip.org/jansson/)
diff --git a/3rdparty/rapidjson/doc/pointer.md b/3rdparty/rapidjson/doc/pointer.md
deleted file mode 100644
index 3927a12ec6e..00000000000
--- a/3rdparty/rapidjson/doc/pointer.md
+++ /dev/null
@@ -1,234 +0,0 @@
-# Pointer
-
-## Status: experimental, shall be included in v1.1
-
-JSON Pointer is a standardized ([RFC6901]) way to select a value inside a JSON Document (DOM). This can be analogous to XPath for XML document. However, JSON Pointer is much simpler, and a single JSON Pointer only pointed to a single value.
-
-Using RapidJSON's implementation of JSON Pointer can simplify some manipulations of the DOM.
-
-[TOC]
-
-# JSON Pointer {#JsonPointer}
-
-A JSON Pointer is a list of zero-to-many tokens, each prefixed by `/`. Each token can be a string or a number. For example, given a JSON:
-~~~javascript
-{
- "foo" : ["bar", "baz"],
- "pi" : 3.1416
-}
-~~~
-
-The following JSON Pointers resolve this JSON as:
-
-1. `"/foo"` → `[ "bar", "baz" ]`
-2. `"/foo/0"` → `"bar"`
-3. `"/foo/1"` → `"baz"`
-4. `"/pi"` → `3.1416`
-
-Note that, an empty JSON Pointer `""` (zero token) resolves to the whole JSON.
-
-# Basic Usage {#BasicUsage}
-
-The following example code is self-explanatory.
-
-~~~cpp
-#include "rapidjson/pointer.h"
-
-// ...
-Document d;
-
-// Create DOM by Set()
-Pointer("/project").Set(d, "RapidJSON");
-Pointer("/stars").Set(d, 10);
-
-// { "project" : "RapidJSON", "stars" : 10 }
-
-// Access DOM by Get(). It return nullptr if the value does not exist.
-if (Value* stars = Pointer("/stars").Get(d))
- stars->SetInt(stars->GetInt() + 1);
-
-// { "project" : "RapidJSON", "stars" : 11 }
-
-// Set() and Create() automatically generate parents if not exist.
-Pointer("/a/b/0").Create(d);
-
-// { "project" : "RapidJSON", "stars" : 11, "a" : { "b" : [ null ] } }
-
-// GetWithDefault() returns reference. And it deep clones the default value.
-Value& hello = Pointer("/hello").GetWithDefault(d, "world");
-
-// { "project" : "RapidJSON", "stars" : 11, "a" : { "b" : [ null ] }, "hello" : "world" }
-
-// Swap() is similar to Set()
-Value x("C++");
-Pointer("/hello").Swap(d, x);
-
-// { "project" : "RapidJSON", "stars" : 11, "a" : { "b" : [ null ] }, "hello" : "C++" }
-// x becomes "world"
-
-// Erase a member or element, return true if the value exists
-bool success = Pointer("/a").Erase(d);
-assert(success);
-
-// { "project" : "RapidJSON", "stars" : 10 }
-~~~
-
-# Helper Functions {#HelperFunctions}
-
-Since object-oriented calling convention may be non-intuitive, RapidJSON also provides helper functions, which just wrap the member functions with free-functions.
-
-The following example does exactly the same as the above one.
-
-~~~cpp
-Document d;
-
-SetValueByPointer(d, "/project", "RapidJSON");
-SetValueByPointer(d, "/stars", 10);
-
-if (Value* stars = GetValueByPointer(d, "/stars"))
- stars->SetInt(stars->GetInt() + 1);
-
-CreateValueByPointer(d, "/a/b/0");
-
-Value& hello = GetValueByPointerWithDefault(d, "/hello", "world");
-
-Value x("C++");
-SwapValueByPointer(d, "/hello", x);
-
-bool success = EraseValueByPointer(d, "/a");
-assert(success);
-~~~
-
-The conventions are shown here for comparison:
-
-1. `Pointer(source).<Method>(root, ...)`
-2. `<Method>ValueByPointer(root, Pointer(source), ...)`
-3. `<Method>ValueByPointer(root, source, ...)`
-
-# Resolving Pointer {#ResolvingPointer}
-
-`Pointer::Get()` or `GetValueByPointer()` function does not modify the DOM. If the tokens cannot match a value in the DOM, it returns `nullptr`. User can use this to check whether a value exists.
-
-Note that, numerical tokens can represent an array index or member name. The resolving process will match the values according to the types of value.
-
-~~~javascript
-{
- "0" : 123,
- "1" : [456]
-}
-~~~
-
-1. `"/0"` → `123`
-2. `"/1/0"` → `456`
-
-The token `"0"` is treated as member name in the first pointer. It is treated as an array index in the second pointer.
-
-The other functions, including `Create()`, `GetWithDefault()`, `Set()` and `Swap()`, will change the DOM. These functions will always succeed. They will create the parent values if they do not exist. If the parent values do not match the tokens, they will also be forced to change their type. Changing the type also mean fully removal of that DOM subtree.
-
-Parsing the above JSON into `d`,
-
-~~~cpp
-SetValueByPointer(d, "1/a", 789); // { "0" : 123, "1" : { "a" : 789 } }
-~~~
-
-## Resolving Minus Sign Token
-
-Besides, [RFC6901] defines a special token `-` (single minus sign), which represents the pass-the-end element of an array. `Get()` only treats this token as a member name '"-"'. Yet the other functions can resolve this for array, equivalent to calling `Value::PushBack()` to the array.
-
-~~~cpp
-Document d;
-d.Parse("{\"foo\":[123]}");
-SetValueByPointer(d, "/foo/-", 456); // { "foo" : [123, 456] }
-SetValueByPointer(d, "/-", 789); // { "foo" : [123, 456], "-" : 789 }
-~~~
-
-## Resolving Document and Value
-
-When using `p.Get(root)` or `GetValueByPointer(root, p)`, `root` is a (const) `Value&`. That means, it can be a subtree of the DOM.
-
-The other functions have two groups of signature. One group uses `Document& document` as parameter, another one uses `Value& root`. The first group uses `document.GetAllocator()` for creating values. And the second group needs user to supply an allocator, like the functions in DOM.
-
-All examples above do not require an allocator parameter, because the first parameter is a `Document&`. But if you want to resolve a pointer to a subtree, you need to supply the allocator as in the following example:
-
-~~~cpp
-class Person {
-public:
- Person() {
- document_ = new Document();
- // CreateValueByPointer() here no need allocator
- SetLocation(CreateValueByPointer(*document_, "/residence"), ...);
- SetLocation(CreateValueByPointer(*document_, "/office"), ...);
- };
-
-private:
- void SetLocation(Value& location, const char* country, const char* addresses[2]) {
- Value::Allocator& a = document_->GetAllocator();
- // SetValueByPointer() here need allocator
- SetValueByPointer(location, "/country", country, a);
- SetValueByPointer(location, "/address/0", address[0], a);
- SetValueByPointer(location, "/address/1", address[1], a);
- }
-
- // ...
-
- Document* document_;
-};
-~~~
-
-`Erase()` or `EraseValueByPointer()` does not need allocator. And they return `true` if the value is erased successfully.
-
-# Error Handling {#ErrorHandling}
-
-A `Pointer` parses a source string in its constructor. If there is parsing error, `Pointer::IsValid()` returns `false`. And you can use `Pointer::GetParseErrorCode()` and `GetParseErrorOffset()` to retrieve the error information.
-
-Note that, all resolving functions assumes valid pointer. Resolving with an invalid pointer causes assertion failure.
-
-# URI Fragment Representation {#URIFragment}
-
-In addition to the string representation of JSON pointer that we are using till now, [RFC6901] also defines the URI fragment representation of JSON pointer. URI fragment is specified in [RFC3986] "Uniform Resource Identifier (URI): Generic Syntax".
-
-The main differences are that a the URI fragment always has a `#` (pound sign) in the beginning, and some characters are encoded by percent-encoding in UTF-8 sequence. For example, the following table shows different C/C++ string literals of different representations.
-
-String Representation | URI Fragment Representation | Pointer Tokens (UTF-8)
-----------------------|-----------------------------|------------------------
-`"/foo/0"` | `"#/foo/0"` | `{"foo", 0}`
-`"/a~1b"` | `"#/a~1b"` | `{"a/b"}`
-`"/m~0n"` | `"#/m~0n"` | `{"m~n"}`
-`"/ "` | `"#/%20"` | `{" "}`
-`"/\0"` | `"#/%00"` | `{"\0"}`
-`"/€"` | `"#/%E2%82%AC"` | `{"€"}`
-
-RapidJSON fully support URI fragment representation. It automatically detects the pound sign during parsing.
-
-# Stringify
-
-You may also stringify a `Pointer` to a string or other output streams. This can be done by:
-
-~~~
-Pointer p(...);
-StringBuffer sb;
-p.Stringify(sb);
-std::cout << sb.GetString() << std::endl;
-~~~
-
-It can also stringify to URI fragment reprsentation by `StringifyUriFragment()`.
-
-# User-Supplied Tokens {#UserSuppliedTokens}
-
-If a pointer will be resolved multiple times, it should be constructed once, and then apply it to different DOMs or in different times. This reduce time and memory allocation for constructing `Pointer` multiple times.
-
-We can go one step further, to completely eliminate the parsing process and dynamic memory allocation, we can establish the token array directly:
-
-~~~cpp
-#define NAME(s) { s, sizeof(s) / sizeof(s[0]) - 1, kPointerInvalidIndex }
-#define INDEX(i) { #i, sizeof(#i) - 1, i }
-
-static const Pointer::Token kTokens[] = { NAME("foo"), INDEX(123) };
-static const Pointer p(kTokens, sizeof(kTokens) / sizeof(kTokens[0]));
-// Equivalent to static const Pointer p("/foo/123");
-~~~
-
-This may be useful for memory constrained systems.
-
-[RFC3986]: https://tools.ietf.org/html/rfc3986
-[RFC6901]: https://tools.ietf.org/html/rfc6901
diff --git a/3rdparty/rapidjson/doc/pointer.zh-cn.md b/3rdparty/rapidjson/doc/pointer.zh-cn.md
deleted file mode 100644
index b340debf033..00000000000
--- a/3rdparty/rapidjson/doc/pointer.zh-cn.md
+++ /dev/null
@@ -1,234 +0,0 @@
-# Pointer
-
-## 状æ€: 实验性,应该会åˆè¿› v1.1
-
-JSON Pointer 是一个标准化([RFC6901])的方å¼å޻选å–一个 JSON Document(DOM)中的值。这类似于 XML çš„ XPath。然而,JSON Pointer 简å•得多,而且æ¯ä¸ª JSON Pointer 仅指å‘å•个值。
-
-使用 RapidJSON çš„ JSON Pointer 实现能简化一些 DOM çš„æ“作。
-
-[TOC]
-
-# JSON Pointer {#JsonPointer}
-
-一个 JSON Pointer 由一串(零至多个)token 所组æˆï¼Œæ¯ä¸ª token 都有 `/` å‰ç¼€ã€‚æ¯ä¸ª token å¯ä»¥æ˜¯ä¸€ä¸ªå­—符串或数字。例如,给定一个 JSON:
-~~~javascript
-{
- "foo" : ["bar", "baz"],
- "pi" : 3.1416
-}
-~~~
-
-以下的 JSON Pointer è§£æžä¸ºï¼š
-
-1. `"/foo"` → `[ "bar", "baz" ]`
-2. `"/foo/0"` → `"bar"`
-3. `"/foo/1"` → `"baz"`
-4. `"/pi"` → `3.1416`
-
-è¦æ³¨æ„,一个空 JSON Pointer `""` (零个token)解æžä¸ºæ•´ä¸ª JSON。
-
-# 基本使用方法 {#BasicUsage}
-
-以下的代ç èŒƒä¾‹ä¸è§£è‡ªæ˜Žã€‚
-
-~~~cpp
-#include "rapidjson/pointer.h"
-
-// ...
-Document d;
-
-// 使用 Set() 创建 DOM
-Pointer("/project").Set(d, "RapidJSON");
-Pointer("/stars").Set(d, 10);
-
-// { "project" : "RapidJSON", "stars" : 10 }
-
-// 使用 Get() 访问 DOM。若该值ä¸å­˜åœ¨åˆ™è¿”回 nullptr。
-if (Value* stars = Pointer("/stars").Get(d))
- stars->SetInt(stars->GetInt() + 1);
-
-// { "project" : "RapidJSON", "stars" : 11 }
-
-// Set() å’Œ Create() 自动生æˆçˆ¶å€¼ï¼ˆå¦‚果它们ä¸å­˜åœ¨ï¼‰ã€‚
-Pointer("/a/b/0").Create(d);
-
-// { "project" : "RapidJSON", "stars" : 11, "a" : { "b" : [ null ] } }
-
-// GetWithDefault() 返回引用。若该值ä¸å­˜åœ¨åˆ™ä¼šæ·±æ‹·è´ç¼ºçœå€¼ã€‚
-Value& hello = Pointer("/hello").GetWithDefault(d, "world");
-
-// { "project" : "RapidJSON", "stars" : 11, "a" : { "b" : [ null ] }, "hello" : "world" }
-
-// Swap() 和 Set() 相似
-Value x("C++");
-Pointer("/hello").Swap(d, x);
-
-// { "project" : "RapidJSON", "stars" : 11, "a" : { "b" : [ null ] }, "hello" : "C++" }
-// x å˜æˆ "world"
-
-// 删去一个æˆå‘˜æˆ–元素,若值存在返回 true
-bool success = Pointer("/a").Erase(d);
-assert(success);
-
-// { "project" : "RapidJSON", "stars" : 10 }
-~~~
-
-# 辅助函数 {#HelperFunctions}
-
-由于é¢å‘对象的调用习惯å¯èƒ½ä¸ç¬¦ç›´è§‰ï¼ŒRapidJSON 也æä¾›äº†ä¸€äº›è¾…助函数,它们把æˆå‘˜å‡½æ•°åŒ…装æˆè‡ªç”±å‡½æ•°ã€‚
-
-以下的例å­ä¸Žä¸Šé¢ä¾‹å­æ‰€åšçš„事情完全相åŒã€‚
-
-~~~cpp
-Document d;
-
-SetValueByPointer(d, "/project", "RapidJSON");
-SetValueByPointer(d, "/stars", 10);
-
-if (Value* stars = GetValueByPointer(d, "/stars"))
- stars->SetInt(stars->GetInt() + 1);
-
-CreateValueByPointer(d, "/a/b/0");
-
-Value& hello = GetValueByPointerWithDefault(d, "/hello", "world");
-
-Value x("C++");
-SwapValueByPointer(d, "/hello", x);
-
-bool success = EraseValueByPointer(d, "/a");
-assert(success);
-~~~
-
-以下对比 3 ç§è°ƒç”¨æ–¹å¼ï¼š
-
-1. `Pointer(source).<Method>(root, ...)`
-2. `<Method>ValueByPointer(root, Pointer(source), ...)`
-3. `<Method>ValueByPointer(root, source, ...)`
-
-# è§£æž Pointer {#ResolvingPointer}
-
-`Pointer::Get()` 或 `GetValueByPointer()` 函数并ä¸ä¿®æ”¹ DOM。若那些 token ä¸èƒ½åŒ¹é… DOM 里的值,这些函数便返回 `nullptr`。使用者å¯åˆ©ç”¨è¿™ä¸ªæ–¹æ³•æ¥æ£€æŸ¥ä¸€ä¸ªå€¼æ˜¯å¦å­˜åœ¨ã€‚
-
-注æ„,数值 token å¯è¡¨ç¤ºæ•°ç»„索引或æˆå‘˜å字。解æžè¿‡ç¨‹ä¸­ä¼šæŒ‰å€¼çš„类型æ¥åŒ¹é…。
-
-~~~javascript
-{
- "0" : 123,
- "1" : [456]
-}
-~~~
-
-1. `"/0"` → `123`
-2. `"/1/0"` → `456`
-
-Token `"0"` 在第一个 pointer 中被当作æˆå‘˜å字。它在第二个 pointer ä¸­è¢«å½“ä½œæˆæ•°ç»„索引。
-
-å…¶ä»–å‡½æ•°ä¼šæ”¹å˜ DOM,包括`Create()`ã€`GetWithDefault()`ã€`Set()`ã€`Swap()`。这些函数总是æˆåŠŸçš„ã€‚è‹¥ä¸€äº›çˆ¶å€¼ä¸å­˜åœ¨ï¼Œå°±ä¼šåˆ›å»ºå®ƒä»¬ã€‚若父值类型ä¸åŒ¹é… token,也会强行改å˜å…¶ç±»åž‹ã€‚改å˜ç±»åž‹ä¹Ÿæ„味ç€å®Œå…¨ç§»é™¤å…¶ DOM å­æ ‘的内容。
-
-例如,把上é¢çš„ JSON 解译至 `d` 之åŽï¼Œ
-
-~~~cpp
-SetValueByPointer(d, "1/a", 789); // { "0" : 123, "1" : { "a" : 789 } }
-~~~
-
-## è§£æžè´Ÿå· token
-
-å¦å¤–,[RFC6901] 定义了一个特殊 token `-` (å•个负å·ï¼‰ï¼Œç”¨äºŽè¡¨ç¤ºæ•°ç»„最åŽå…ƒç´ çš„下一个元素。 `Get()` åªä¼šæŠŠæ­¤ token 当作æˆå‘˜åå­— '"-"'ã€‚è€Œå…¶ä»–å‡½æ•°åˆ™ä¼šä»¥æ­¤è§£æžæ•°ç»„,等åŒäºŽå¯¹æ•°ç»„调用 `Value::PushBack()` 。
-
-~~~cpp
-Document d;
-d.Parse("{\"foo\":[123]}");
-SetValueByPointer(d, "/foo/-", 456); // { "foo" : [123, 456] }
-SetValueByPointer(d, "/-", 789); // { "foo" : [123, 456], "-" : 789 }
-~~~
-
-## è§£æž Document åŠ Value
-
-当使用 `p.Get(root)` 或 `GetValueByPointer(root, p)`,`root` 是一个(常数) `Value&`。这æ„味ç€ï¼Œå®ƒä¹Ÿå¯ä»¥æ˜¯ DOM é‡Œçš„ä¸€ä¸ªå­æ ‘。
-
-其他函数有两组签å。一组使用 `Document& document` ä½œä¸ºå‚æ•°ï¼Œå¦ä¸€ç»„使用 `Value& root`。第一组使用 `document.GetAllocator()` 去创建值,而第二组则需è¦ä½¿ç”¨è€…æä¾›ä¸€ä¸ª allocatorï¼Œå¦‚åŒ DOM 里的函数。
-
-以上例å­éƒ½ä¸éœ€è¦ allocator 傿•°ï¼Œå› ä¸ºå®ƒçš„ç¬¬ä¸€ä¸ªå‚æ•°æ˜¯ `Document&`。但如果你需è¦å¯¹ä¸€ä¸ªå­æ ‘进行解æžï¼Œå°±éœ€è¦å¦‚下é¢çš„例å­èˆ¬æä¾› allocator:
-
-~~~cpp
-class Person {
-public:
- Person() {
- document_ = new Document();
- // CreateValueByPointer() here no need allocator
- SetLocation(CreateValueByPointer(*document_, "/residence"), ...);
- SetLocation(CreateValueByPointer(*document_, "/office"), ...);
- };
-
-private:
- void SetLocation(Value& location, const char* country, const char* addresses[2]) {
- Value::Allocator& a = document_->GetAllocator();
- // SetValueByPointer() here need allocator
- SetValueByPointer(location, "/country", country, a);
- SetValueByPointer(location, "/address/0", address[0], a);
- SetValueByPointer(location, "/address/1", address[1], a);
- }
-
- // ...
-
- Document* document_;
-};
-~~~
-
-`Erase()` 或 `EraseValueByPointer()` ä¸éœ€è¦ allocator。而且它们æˆåŠŸåˆ é™¤å€¼ä¹‹åŽä¼šè¿”回 `true`。
-
-# é”™è¯¯å¤„ç† {#ErrorHandling}
-
-`Pointer` 在其建构函数里会解译æºå­—符串。若有解æžé”™è¯¯ï¼Œ`Pointer::IsValid()` 返回 `false`。你å¯ä½¿ç”¨ `Pointer::GetParseErrorCode()` å’Œ `GetParseErrorOffset()` 去获å–错信æ¯ã€‚
-
-è¦æ³¨æ„的是,所有解æžå‡½æ•°éƒ½å‡è®¾ pointer æ˜¯åˆæ³•çš„ã€‚å¯¹ä¸€ä¸ªéžæ³• pointer è§£æžä¼šåšæˆæ–­è¨€å¤±è´¥ã€‚
-
-# URI ç‰‡æ®µè¡¨ç¤ºæ–¹å¼ {#URIFragment}
-
-除了我们一直在使用的字符串方å¼è¡¨ç¤º JSON pointer,[RFC6901]也定义了一个 JSON Pointer çš„ URI 片段(fragment)表示方å¼ã€‚URI 片段是定义于 [RFC3986] "Uniform Resource Identifier (URI): Generic Syntax"。
-
-URI 片段的主è¦åˆ†åˆ«æ˜¯å¿…然以 `#` (pound signï¼‰å¼€å¤´ï¼Œè€Œä¸€äº›å­—ç¬¦ä¹Ÿä¼šä»¥ç™¾åˆ†æ¯”ç¼–ç æˆ UTF-8 åºåˆ—。例如,以下的表展示了ä¸åŒè¡¨ç¤ºæ³•下的 C/C++ 字符串常数。
-
-å­—ç¬¦ä¸²è¡¨ç¤ºæ–¹å¼ | URI ç‰‡æ®µè¡¨ç¤ºæ–¹å¼ | Pointer Tokens (UTF-8)
-----------------------|-----------------------------|------------------------
-`"/foo/0"` | `"#/foo/0"` | `{"foo", 0}`
-`"/a~1b"` | `"#/a~1b"` | `{"a/b"}`
-`"/m~0n"` | `"#/m~0n"` | `{"m~n"}`
-`"/ "` | `"#/%20"` | `{" "}`
-`"/\0"` | `"#/%00"` | `{"\0"}`
-`"/€"` | `"#/%E2%82%AC"` | `{"€"}`
-
-RapidJSON å®Œå…¨æ”¯æŒ URI 片段表示方å¼ã€‚它在解译时会自动检测 `#` å·ã€‚
-
-# 字符串化
-
-你也å¯ä»¥æŠŠä¸€ä¸ª `Pointer` 字符串化,储存于字符串或其他输出æµã€‚例如:
-
-~~~
-Pointer p(...);
-StringBuffer sb;
-p.Stringify(sb);
-std::cout << sb.GetString() << std::endl;
-~~~
-
-使用 `StringifyUriFragment()` å¯ä»¥æŠŠ pointer 字符串化为 URI 片段表示法。
-
-# 使用者æä¾›çš„ tokens {#UserSuppliedTokens}
-
-若一个 pointer 会用于多次解æžï¼Œå®ƒåº”该åªè¢«åˆ›å»ºä¸€æ¬¡ï¼Œç„¶åŽå†æ–½äºŽä¸åŒçš„ DOM ,或在ä¸åŒæ—¶é—´åšè§£æžã€‚这样å¯ä»¥é¿å…多次创键 `Pointer`ï¼ŒèŠ‚çœæ—¶é—´å’Œå†…存分é…。
-
-我们甚至å¯ä»¥å†æ›´è¿›ä¸€æ­¥ï¼Œå®Œå…¨æ¶ˆåŽ»è§£æžè¿‡ç¨‹åŠåЍæ€å†…存分é…。我们å¯ä»¥ç›´æŽ¥ç”Ÿæˆ token 数组:
-
-~~~cpp
-#define NAME(s) { s, sizeof(s) / sizeof(s[0]) - 1, kPointerInvalidIndex }
-#define INDEX(i) { #i, sizeof(#i) - 1, i }
-
-static const Pointer::Token kTokens[] = { NAME("foo"), INDEX(123) };
-static const Pointer p(kTokens, sizeof(kTokens) / sizeof(kTokens[0]));
-// Equivalent to static const Pointer p("/foo/123");
-~~~
-
-è¿™ç§å𿳕å¯èƒ½é€‚åˆå†…å­˜å—é™çš„系统。
-
-[RFC3986]: https://tools.ietf.org/html/rfc3986
-[RFC6901]: https://tools.ietf.org/html/rfc6901
diff --git a/3rdparty/rapidjson/doc/sax.md b/3rdparty/rapidjson/doc/sax.md
deleted file mode 100644
index 9a6d8148031..00000000000
--- a/3rdparty/rapidjson/doc/sax.md
+++ /dev/null
@@ -1,475 +0,0 @@
-# SAX
-
-The term "SAX" originated from [Simple API for XML](http://en.wikipedia.org/wiki/Simple_API_for_XML). We borrowed this term for JSON parsing and generation.
-
-In RapidJSON, `Reader` (typedef of `GenericReader<...>`) is the SAX-style parser for JSON, and `Writer` (typedef of `GenericWriter<...>`) is the SAX-style generator for JSON.
-
-[TOC]
-
-# Reader {#Reader}
-
-`Reader` parses a JSON from a stream. While it reads characters from the stream, it analyze the characters according to the syntax of JSON, and publish events to a handler.
-
-For example, here is a JSON.
-
-~~~~~~~~~~js
-{
- "hello": "world",
- "t": true ,
- "f": false,
- "n": null,
- "i": 123,
- "pi": 3.1416,
- "a": [1, 2, 3, 4]
-}
-~~~~~~~~~~
-
-While a `Reader` parses this JSON, it publishes the following events to the handler sequentially:
-
-~~~~~~~~~~
-StartObject()
-Key("hello", 5, true)
-String("world", 5, true)
-Key("t", 1, true)
-Bool(true)
-Key("f", 1, true)
-Bool(false)
-Key("n", 1, true)
-Null()
-Key("i")
-UInt(123)
-Key("pi")
-Double(3.1416)
-Key("a")
-StartArray()
-Uint(1)
-Uint(2)
-Uint(3)
-Uint(4)
-EndArray(4)
-EndObject(7)
-~~~~~~~~~~
-
-These events can be easily matched with the JSON, except some event parameters need further explanation. Let's see the `simplereader` example which produces exactly the same output as above:
-
-~~~~~~~~~~cpp
-#include "rapidjson/reader.h"
-#include <iostream>
-
-using namespace rapidjson;
-using namespace std;
-
-struct MyHandler {
- bool Null() { cout << "Null()" << endl; return true; }
- bool Bool(bool b) { cout << "Bool(" << boolalpha << b << ")" << endl; return true; }
- bool Int(int i) { cout << "Int(" << i << ")" << endl; return true; }
- bool Uint(unsigned u) { cout << "Uint(" << u << ")" << endl; return true; }
- bool Int64(int64_t i) { cout << "Int64(" << i << ")" << endl; return true; }
- bool Uint64(uint64_t u) { cout << "Uint64(" << u << ")" << endl; return true; }
- bool Double(double d) { cout << "Double(" << d << ")" << endl; return true; }
- bool String(const char* str, SizeType length, bool copy) {
- cout << "String(" << str << ", " << length << ", " << boolalpha << copy << ")" << endl;
- return true;
- }
- bool StartObject() { cout << "StartObject()" << endl; return true; }
- bool Key(const char* str, SizeType length, bool copy) {
- cout << "Key(" << str << ", " << length << ", " << boolalpha << copy << ")" << endl;
- return true;
- }
- bool EndObject(SizeType memberCount) { cout << "EndObject(" << memberCount << ")" << endl; return true; }
- bool StartArray() { cout << "StartArray()" << endl; return true; }
- bool EndArray(SizeType elementCount) { cout << "EndArray(" << elementCount << ")" << endl; return true; }
-};
-
-void main() {
- const char json[] = " { \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3, 4] } ";
-
- MyHandler handler;
- Reader reader;
- StringStream ss(json);
- reader.Parse(ss, handler);
-}
-~~~~~~~~~~
-
-Note that, RapidJSON uses template to statically bind the `Reader` type and the handler type, instead of using class with virtual functions. This paradigm can improve the performance by inlining functions.
-
-## Handler {#Handler}
-
-As the previous example showed, user needs to implement a handler, which consumes the events (function calls) from `Reader`. The handler must contain the following member functions.
-
-~~~~~~~~~~cpp
-class Handler {
- bool Null();
- bool Bool(bool b);
- bool Int(int i);
- bool Uint(unsigned i);
- bool Int64(int64_t i);
- bool Uint64(uint64_t i);
- bool Double(double d);
- bool String(const Ch* str, SizeType length, bool copy);
- bool StartObject();
- bool Key(const Ch* str, SizeType length, bool copy);
- bool EndObject(SizeType memberCount);
- bool StartArray();
- bool EndArray(SizeType elementCount);
-};
-~~~~~~~~~~
-
-`Null()` is called when the `Reader` encounters a JSON null value.
-
-`Bool(bool)` is called when the `Reader` encounters a JSON true or false value.
-
-When the `Reader` encounters a JSON number, it chooses a suitable C++ type mapping. And then it calls *one* function out of `Int(int)`, `Uint(unsigned)`, `Int64(int64_t)`, `Uint64(uint64_t)` and `Double(double)`.
-
-`String(const char* str, SizeType length, bool copy)` is called when the `Reader` encounters a string. The first parameter is pointer to the string. The second parameter is the length of the string (excluding the null terminator). Note that RapidJSON supports null character `'\0'` inside a string. If such situation happens, `strlen(str) < length`. The last `copy` indicates whether the handler needs to make a copy of the string. For normal parsing, `copy = true`. Only when *insitu* parsing is used, `copy = false`. And beware that, the character type depends on the target encoding, which will be explained later.
-
-When the `Reader` encounters the beginning of an object, it calls `StartObject()`. An object in JSON is a set of name-value pairs. If the object contains members it first calls `Key()` for the name of member, and then calls functions depending on the type of the value. These calls of name-value pairs repeats until calling `EndObject(SizeType memberCount)`. Note that the `memberCount` parameter is just an aid for the handler, user may not need this parameter.
-
-Array is similar to object but simpler. At the beginning of an array, the `Reader` calls `BeginArary()`. If there is elements, it calls functions according to the types of element. Similarly, in the last call `EndArray(SizeType elementCount)`, the parameter `elementCount` is just an aid for the handler.
-
-Every handler functions returns a `bool`. Normally it should returns `true`. If the handler encounters an error, it can return `false` to notify event publisher to stop further processing.
-
-For example, when we parse a JSON with `Reader` and the handler detected that the JSON does not conform to the required schema, then the handler can return `false` and let the `Reader` stop further parsing. And the `Reader` will be in error state with error code `kParseErrorTermination`.
-
-## GenericReader {#GenericReader}
-
-As mentioned before, `Reader` is a typedef of a template class `GenericReader`:
-
-~~~~~~~~~~cpp
-namespace rapidjson {
-
-template <typename SourceEncoding, typename TargetEncoding, typename Allocator = MemoryPoolAllocator<> >
-class GenericReader {
- // ...
-};
-
-typedef GenericReader<UTF8<>, UTF8<> > Reader;
-
-} // namespace rapidjson
-~~~~~~~~~~
-
-The `Reader` uses UTF-8 as both source and target encoding. The source encoding means the encoding in the JSON stream. The target encoding means the encoding of the `str` parameter in `String()` calls. For example, to parse a UTF-8 stream and outputs UTF-16 string events, you can define a reader by:
-
-~~~~~~~~~~cpp
-GenericReader<UTF8<>, UTF16<> > reader;
-~~~~~~~~~~
-
-Note that, the default character type of `UTF16` is `wchar_t`. So this `reader`needs to call `String(const wchar_t*, SizeType, bool)` of the handler.
-
-The third template parameter `Allocator` is the allocator type for internal data structure (actually a stack).
-
-## Parsing {#Parsing}
-
-The one and only one function of `Reader` is to parse JSON.
-
-~~~~~~~~~~cpp
-template <unsigned parseFlags, typename InputStream, typename Handler>
-bool Parse(InputStream& is, Handler& handler);
-
-// with parseFlags = kDefaultParseFlags
-template <typename InputStream, typename Handler>
-bool Parse(InputStream& is, Handler& handler);
-~~~~~~~~~~
-
-If an error occurs during parsing, it will return `false`. User can also calls `bool HasParseEror()`, `ParseErrorCode GetParseErrorCode()` and `size_t GetErrorOffset()` to obtain the error states. Actually `Document` uses these `Reader` functions to obtain parse errors. Please refer to [DOM](doc/dom.md) for details about parse error.
-
-# Writer {#Writer}
-
-`Reader` converts (parses) JSON into events. `Writer` does exactly the opposite. It converts events into JSON.
-
-`Writer` is very easy to use. If your application only need to converts some data into JSON, it may be a good choice to use `Writer` directly, instead of building a `Document` and then stringifying it with a `Writer`.
-
-In `simplewriter` example, we do exactly the reverse of `simplereader`.
-
-~~~~~~~~~~cpp
-#include "rapidjson/writer.h"
-#include "rapidjson/stringbuffer.h"
-#include <iostream>
-
-using namespace rapidjson;
-using namespace std;
-
-void main() {
- StringBuffer s;
- Writer<StringBuffer> writer(s);
-
- writer.StartObject();
- writer.Key("hello");
- writer.String("world");
- writer.Key("t");
- writer.Bool(true);
- writer.Key("f");
- writer.Bool(false);
- writer.Key("n");
- writer.Null();
- writer.Key("i");
- writer.Uint(123);
- writer.Key("pi");
- writer.Double(3.1416);
- writer.Key("a");
- writer.StartArray();
- for (unsigned i = 0; i < 4; i++)
- writer.Uint(i);
- writer.EndArray();
- writer.EndObject();
-
- cout << s.GetString() << endl;
-}
-~~~~~~~~~~
-
-~~~~~~~~~~
-{"hello":"world","t":true,"f":false,"n":null,"i":123,"pi":3.1416,"a":[0,1,2,3]}
-~~~~~~~~~~
-
-There are two `String()` and `Key()` overloads. One is the same as defined in handler concept with 3 parameters. It can handle string with null characters. Another one is the simpler version used in the above example.
-
-Note that, the example code does not pass any parameters in `EndArray()` and `EndObject()`. An `SizeType` can be passed but it will be simply ignored by `Writer`.
-
-You may doubt that, why not just using `sprintf()` or `std::stringstream` to build a JSON?
-
-There are various reasons:
-1. `Writer` must output a well-formed JSON. If there is incorrect event sequence (e.g. `Int()` just after `StartObject()`), it generates assertion fail in debug mode.
-2. `Writer::String()` can handle string escaping (e.g. converting code point `U+000A` to `\n`) and Unicode transcoding.
-3. `Writer` handles number output consistently.
-4. `Writer` implements the event handler concept. It can be used to handle events from `Reader`, `Document` or other event publisher.
-5. `Writer` can be optimized for different platforms.
-
-Anyway, using `Writer` API is even simpler than generating a JSON by ad hoc methods.
-
-## Template {#WriterTemplate}
-
-`Writer` has a minor design difference to `Reader`. `Writer` is a template class, not a typedef. There is no `GenericWriter`. The following is the declaration.
-
-~~~~~~~~~~cpp
-namespace rapidjson {
-
-template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename Allocator = CrtAllocator<> >
-class Writer {
-public:
- Writer(OutputStream& os, Allocator* allocator = 0, size_t levelDepth = kDefaultLevelDepth)
-// ...
-};
-
-} // namespace rapidjson
-~~~~~~~~~~
-
-The `OutputStream` template parameter is the type of output stream. It cannot be deduced and must be specified by user.
-
-The `SourceEncoding` template parameter specifies the encoding to be used in `String(const Ch*, ...)`.
-
-The `TargetEncoding` template parameter specifies the encoding in the output stream.
-
-The last one, `Allocator` is the type of allocator, which is used for allocating internal data structure (a stack).
-
-Besides, the constructor of `Writer` has a `levelDepth` parameter. This parameter affects the initial memory allocated for storing information per hierarchy level.
-
-## PrettyWriter {#PrettyWriter}
-
-While the output of `Writer` is the most condensed JSON without white-spaces, suitable for network transfer or storage, it is not easily readable by human.
-
-Therefore, RapidJSON provides a `PrettyWriter`, which adds indentation and line feeds in the output.
-
-The usage of `PrettyWriter` is exactly the same as `Writer`, expect that `PrettyWriter` provides a `SetIndent(Ch indentChar, unsigned indentCharCount)` function. The default is 4 spaces.
-
-## Completeness and Reset {#CompletenessReset}
-
-A `Writer` can only output a single JSON, which can be any JSON type at the root. Once the singular event for root (e.g. `String()`), or the last matching `EndObject()` or `EndArray()` event, is handled, the output JSON is well-formed and complete. User can detect this state by calling `Writer::IsComplete()`.
-
-When a JSON is complete, the `Writer` cannot accept any new events. Otherwise the output will be invalid (i.e. having more than one root). To reuse the `Writer` object, user can call `Writer::Reset(OutputStream& os)` to reset all internal states of the `Writer` with a new output stream.
-
-# Techniques {#Techniques}
-
-## Parsing JSON to Custom Data Structure {#CustomDataStructure}
-
-`Document`'s parsing capability is completely based on `Reader`. Actually `Document` is a handler which receives events from a reader to build a DOM during parsing.
-
-User may uses `Reader` to build other data structures directly. This eliminates building of DOM, thus reducing memory and improving performance.
-
-In the following `messagereader` example, `ParseMessages()` parses a JSON which should be an object with key-string pairs.
-
-~~~~~~~~~~cpp
-#include "rapidjson/reader.h"
-#include "rapidjson/error/en.h"
-#include <iostream>
-#include <string>
-#include <map>
-
-using namespace std;
-using namespace rapidjson;
-
-typedef map<string, string> MessageMap;
-
-struct MessageHandler
- : public BaseReaderHandler<UTF8<>, MessageHandler> {
- MessageHandler() : state_(kExpectObjectStart) {
- }
-
- bool StartObject() {
- switch (state_) {
- case kExpectObjectStart:
- state_ = kExpectNameOrObjectEnd;
- return true;
- default:
- return false;
- }
- }
-
- bool String(const char* str, SizeType length, bool) {
- switch (state_) {
- case kExpectNameOrObjectEnd:
- name_ = string(str, length);
- state_ = kExpectValue;
- return true;
- case kExpectValue:
- messages_.insert(MessageMap::value_type(name_, string(str, length)));
- state_ = kExpectNameOrObjectEnd;
- return true;
- default:
- return false;
- }
- }
-
- bool EndObject(SizeType) { return state_ == kExpectNameOrObjectEnd; }
-
- bool Default() { return false; } // All other events are invalid.
-
- MessageMap messages_;
- enum State {
- kExpectObjectStart,
- kExpectNameOrObjectEnd,
- kExpectValue,
- }state_;
- std::string name_;
-};
-
-void ParseMessages(const char* json, MessageMap& messages) {
- Reader reader;
- MessageHandler handler;
- StringStream ss(json);
- if (reader.Parse(ss, handler))
- messages.swap(handler.messages_); // Only change it if success.
- else {
- ParseErrorCode e = reader.GetParseErrorCode();
- size_t o = reader.GetErrorOffset();
- cout << "Error: " << GetParseError_En(e) << endl;;
- cout << " at offset " << o << " near '" << string(json).substr(o, 10) << "...'" << endl;
- }
-}
-
-int main() {
- MessageMap messages;
-
- const char* json1 = "{ \"greeting\" : \"Hello!\", \"farewell\" : \"bye-bye!\" }";
- cout << json1 << endl;
- ParseMessages(json1, messages);
-
- for (MessageMap::const_iterator itr = messages.begin(); itr != messages.end(); ++itr)
- cout << itr->first << ": " << itr->second << endl;
-
- cout << endl << "Parse a JSON with invalid schema." << endl;
- const char* json2 = "{ \"greeting\" : \"Hello!\", \"farewell\" : \"bye-bye!\", \"foo\" : {} }";
- cout << json2 << endl;
- ParseMessages(json2, messages);
-
- return 0;
-}
-~~~~~~~~~~
-
-~~~~~~~~~~
-{ "greeting" : "Hello!", "farewell" : "bye-bye!" }
-farewell: bye-bye!
-greeting: Hello!
-
-Parse a JSON with invalid schema.
-{ "greeting" : "Hello!", "farewell" : "bye-bye!", "foo" : {} }
-Error: Terminate parsing due to Handler error.
- at offset 59 near '} }...'
-~~~~~~~~~~
-
-The first JSON (`json1`) was successfully parsed into `MessageMap`. Since `MessageMap` is a `std::map`, the printing order are sorted by the key. This order is different from the JSON's order.
-
-In the second JSON (`json2`), `foo`'s value is an empty object. As it is an object, `MessageHandler::StartObject()` will be called. However, at that moment `state_ = kExpectValue`, so that function returns `false` and cause the parsing process be terminated. The error code is `kParseErrorTermination`.
-
-## Filtering of JSON {#Filtering}
-
-As mentioned earlier, `Writer` can handle the events published by `Reader`. `condense` example simply set a `Writer` as handler of a `Reader`, so it can remove all white-spaces in JSON. `pretty` example uses the same relationship, but replacing `Writer` by `PrettyWriter`. So `pretty` can be used to reformat a JSON with indentation and line feed.
-
-Actually, we can add intermediate layer(s) to filter the contents of JSON via these SAX-style API. For example, `capitalize` example capitalize all strings in a JSON.
-
-~~~~~~~~~~cpp
-#include "rapidjson/reader.h"
-#include "rapidjson/writer.h"
-#include "rapidjson/filereadstream.h"
-#include "rapidjson/filewritestream.h"
-#include "rapidjson/error/en.h"
-#include <vector>
-#include <cctype>
-
-using namespace rapidjson;
-
-template<typename OutputHandler>
-struct CapitalizeFilter {
- CapitalizeFilter(OutputHandler& out) : out_(out), buffer_() {
- }
-
- bool Null() { return out_.Null(); }
- bool Bool(bool b) { return out_.Bool(b); }
- bool Int(int i) { return out_.Int(i); }
- bool Uint(unsigned u) { return out_.Uint(u); }
- bool Int64(int64_t i) { return out_.Int64(i); }
- bool Uint64(uint64_t u) { return out_.Uint64(u); }
- bool Double(double d) { return out_.Double(d); }
- bool String(const char* str, SizeType length, bool) {
- buffer_.clear();
- for (SizeType i = 0; i < length; i++)
- buffer_.push_back(std::toupper(str[i]));
- return out_.String(&buffer_.front(), length, true); // true = output handler need to copy the string
- }
- bool StartObject() { return out_.StartObject(); }
- bool Key(const char* str, SizeType length, bool copy) { return String(str, length, copy); }
- bool EndObject(SizeType memberCount) { return out_.EndObject(memberCount); }
- bool StartArray() { return out_.StartArray(); }
- bool EndArray(SizeType elementCount) { return out_.EndArray(elementCount); }
-
- OutputHandler& out_;
- std::vector<char> buffer_;
-};
-
-int main(int, char*[]) {
- // Prepare JSON reader and input stream.
- Reader reader;
- char readBuffer[65536];
- FileReadStream is(stdin, readBuffer, sizeof(readBuffer));
-
- // Prepare JSON writer and output stream.
- char writeBuffer[65536];
- FileWriteStream os(stdout, writeBuffer, sizeof(writeBuffer));
- Writer<FileWriteStream> writer(os);
-
- // JSON reader parse from the input stream and let writer generate the output.
- CapitalizeFilter<Writer<FileWriteStream> > filter(writer);
- if (!reader.Parse(is, filter)) {
- fprintf(stderr, "\nError(%u): %s\n", (unsigned)reader.GetErrorOffset(), GetParseError_En(reader.GetParseErrorCode()));
- return 1;
- }
-
- return 0;
-}
-~~~~~~~~~~
-
-Note that, it is incorrect to simply capitalize the JSON as a string. For example:
-~~~~~~~~~~
-["Hello\nWorld"]
-~~~~~~~~~~
-
-Simply capitalizing the whole JSON would contain incorrect escape character:
-~~~~~~~~~~
-["HELLO\NWORLD"]
-~~~~~~~~~~
-
-The correct result by `capitalize`:
-~~~~~~~~~~
-["HELLO\nWORLD"]
-~~~~~~~~~~
-
-More complicated filters can be developed. However, since SAX-style API can only provide information about a single event at a time, user may need to book-keeping the contextual information (e.g. the path from root value, storage of other related values). Some processing may be easier to be implemented in DOM than SAX.
diff --git a/3rdparty/rapidjson/doc/sax.zh-cn.md b/3rdparty/rapidjson/doc/sax.zh-cn.md
deleted file mode 100644
index f8dc7b9aea7..00000000000
--- a/3rdparty/rapidjson/doc/sax.zh-cn.md
+++ /dev/null
@@ -1,476 +0,0 @@
-# SAX
-
-"SAX"此术语æºäºŽ[Simple API for XML](http://en.wikipedia.org/wiki/Simple_API_for_XML)。我们借了此术语去套用在JSON的解æžåŠç”Ÿæˆã€‚
-
-在RapidJSON中,`Reader`(`GenericReader<...>`çš„typedef)是JSONçš„SAX风格解æžå™¨ï¼Œè€Œ`Writer`(`GenericWriter<...>`çš„typedef)则是JSONçš„SAX风格生æˆå™¨ã€‚
-
-[TOC]
-
-# Reader {#Reader}
-
-`Reader`从输入æµè§£æžä¸€ä¸ªJSON。当它从æµä¸­è¯»å–字符时,它会基于JSON的语法去分æžå­—符,并å‘处ç†å™¨å‘é€äº‹ä»¶ã€‚
-
-例如,以下是一个JSON。
-
-~~~~~~~~~~js
-{
- "hello": "world",
- "t": true ,
- "f": false,
- "n": null,
- "i": 123,
- "pi": 3.1416,
- "a": [1, 2, 3, 4]
-}
-~~~~~~~~~~
-
-当一个`Reader`è§£æžæ­¤JSON时,它会顺åºåœ°å‘处ç†å™¨å‘é€ä»¥ä¸‹çš„事件:
-
-~~~~~~~~~~
-StartObject()
-Key("hello", 5, true)
-String("world", 5, true)
-Key("t", 1, true)
-Bool(true)
-Key("f", 1, true)
-Bool(false)
-Key("n", 1, true)
-Null()
-Key("i")
-UInt(123)
-Key("pi")
-Double(3.1416)
-Key("a")
-StartArray()
-Uint(1)
-Uint(2)
-Uint(3)
-Uint(4)
-EndArray(4)
-EndObject(7)
-~~~~~~~~~~
-
-é™¤äº†ä¸€äº›äº‹ä»¶å‚æ•°éœ€è¦å†ä½œè§£é‡Šï¼Œè¿™äº›äº‹ä»¶å¯ä»¥è½»æ¾åœ°ä¸ŽJSON对上。我们å¯ä»¥çœ‹çœ‹`simplereader`例孿€Žæ ·äº§ç”Ÿå’Œä»¥ä¸Šå®Œå…¨ç›¸åŒçš„结果:
-
-~~~~~~~~~~cpp
-#include "rapidjson/reader.h"
-#include <iostream>
-
-using namespace rapidjson;
-using namespace std;
-
-struct MyHandler {
- bool Null() { cout << "Null()" << endl; return true; }
- bool Bool(bool b) { cout << "Bool(" << boolalpha << b << ")" << endl; return true; }
- bool Int(int i) { cout << "Int(" << i << ")" << endl; return true; }
- bool Uint(unsigned u) { cout << "Uint(" << u << ")" << endl; return true; }
- bool Int64(int64_t i) { cout << "Int64(" << i << ")" << endl; return true; }
- bool Uint64(uint64_t u) { cout << "Uint64(" << u << ")" << endl; return true; }
- bool Double(double d) { cout << "Double(" << d << ")" << endl; return true; }
- bool String(const char* str, SizeType length, bool copy) {
- cout << "String(" << str << ", " << length << ", " << boolalpha << copy << ")" << endl;
- return true;
- }
- bool StartObject() { cout << "StartObject()" << endl; return true; }
- bool Key(const char* str, SizeType length, bool copy) {
- cout << "Key(" << str << ", " << length << ", " << boolalpha << copy << ")" << endl;
- return true;
- }
- bool EndObject(SizeType memberCount) { cout << "EndObject(" << memberCount << ")" << endl; return true; }
- bool StartArray() { cout << "StartArray()" << endl; return true; }
- bool EndArray(SizeType elementCount) { cout << "EndArray(" << elementCount << ")" << endl; return true; }
-};
-
-void main() {
- const char json[] = " { \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3, 4] } ";
-
- MyHandler handler;
- Reader reader;
- StringStream ss(json);
- reader.Parse(ss, handler);
-}
-~~~~~~~~~~
-
-注æ„RapidJSON使用模æ¿å޻陿€æŒ·å®š`Reader`类型åŠå¤„ç†å™¨çš„ç±»å½¢ï¼Œè€Œä¸æ˜¯ä½¿ç”¨å«è™šå‡½æ•°çš„类。这个范å¼å¯ä»¥é€šè¿‡æŠŠå‡½æ•°å†…è”而改善性能。
-
-## 处ç†å™¨ {#Handler}
-
-如å‰ä¾‹æ‰€ç¤ºï¼Œä½¿ç”¨è€…需è¦å®žçŽ°ä¸€ä¸ªå¤„ç†å™¨ï¼ˆhandlerï¼‰ï¼Œç”¨äºŽå¤„ç†æ¥è‡ª`Reader`的事件(函数调用)。处ç†å™¨å¿…须包å«ä»¥ä¸‹çš„æˆå‘˜å‡½æ•°ã€‚
-
-~~~~~~~~~~cpp
-class Handler {
- bool Null();
- bool Bool(bool b);
- bool Int(int i);
- bool Uint(unsigned i);
- bool Int64(int64_t i);
- bool Uint64(uint64_t i);
- bool Double(double d);
- bool String(const Ch* str, SizeType length, bool copy);
- bool StartObject();
- bool Key(const Ch* str, SizeType length, bool copy);
- bool EndObject(SizeType memberCount);
- bool StartArray();
- bool EndArray(SizeType elementCount);
-};
-~~~~~~~~~~
-
-当`Reader`é‡åˆ°JSON null值时会调用`Null()`。
-
-当`Reader`é‡åˆ°JSON true或false值时会调用`Bool(bool)`。
-
-当`Reader`é‡åˆ°JSON number,它会选择一个åˆé€‚çš„C++类型映射,然åŽè°ƒç”¨`Int(int)`ã€`Uint(unsigned)`ã€`Int64(int64_t)`ã€`Uint64(uint64_t)`åŠ`Double(double)`çš„*其中之一个*。
-
-当`Reader`é‡åˆ°JSON string,它会调用`String(const char* str, SizeType length, bool copy)`ã€‚ç¬¬ä¸€ä¸ªå‚æ•°æ˜¯å­—ç¬¦ä¸²çš„æŒ‡é’ˆã€‚ç¬¬äºŒä¸ªå‚æ•°æ˜¯å­—符串的长度(ä¸åŒ…å«ç©ºç»ˆæ­¢ç¬¦å·ï¼‰ã€‚注æ„RapidJSON支æŒå­—䏲䏭嫿œ‰ç©ºå­—符`'\0'`ã€‚è‹¥å‡ºçŽ°è¿™ç§æƒ…况,便会有`strlen(str) < length`。最åŽçš„`copy`傿•°è¡¨ç¤ºå¤„ç†å™¨æ˜¯å¦éœ€è¦å¤åˆ¶è¯¥å­—ç¬¦ä¸²ã€‚åœ¨æ­£å¸¸è§£æžæ—¶ï¼Œ`copy = true`。仅当使用原ä½è§£æžæ—¶ï¼Œ`copy = false`ã€‚æ­¤å¤–ï¼Œè¿˜è¦æ³¨æ„字符的类型与目标编ç ç›¸å…³ï¼Œæˆ‘们ç¨åŽä¼šå†è°ˆè¿™ä¸€ç‚¹ã€‚
-
-当`Reader`é‡åˆ°JSON object的开始之时,它会调用`StartObject()`。JSONçš„object是一个键值对(æˆå‘˜ï¼‰çš„集åˆã€‚è‹¥objectåŒ…å«æˆå‘˜ï¼Œå®ƒä¼šå…ˆä¸ºæˆå‘˜çš„å字调用`Key()`,然åŽå†æŒ‰å€¼çš„ç±»åž‹è°ƒç”¨å‡½æ•°ã€‚å®ƒä¸æ–­è°ƒç”¨è¿™äº›é”®å€¼å¯¹ï¼Œç›´è‡³æœ€ç»ˆè°ƒç”¨`EndObject(SizeType memberCount)`。注æ„`memberCount`傿•°å¯¹å¤„ç†å™¨æ¥è¯´åªæ˜¯å助性质,使用者å¯èƒ½ä¸éœ€è¦æ­¤å‚数。
-
-JSON array与object相似,但更简å•。在array开始时,`Reader`会调用`BeginArary()`。若array嫿œ‰å…ƒç´ ï¼Œå®ƒä¼šæŒ‰å…ƒç´ çš„类型æ¥è¯»ç”¨å‡½æ•°ã€‚相似地,最åŽå®ƒä¼šè°ƒç”¨`EndArray(SizeType elementCount)`,其中`elementCount`傿•°å¯¹å¤„ç†å™¨æ¥è¯´åªæ˜¯å助性质。
-
-æ¯ä¸ªå¤„ç†å™¨å‡½æ•°éƒ½è¿”回一个`bool`。正常它们应返回`true`。若处ç†å™¨é‡åˆ°é”™è¯¯ï¼Œå®ƒå¯ä»¥è¿”回`false`去通知事件å‘逿–¹åœæ­¢ç»§ç»­å¤„ç†ã€‚
-
-例如,当我们用`Reader`è§£æžä¸€ä¸ªJSON时,处ç†å™¨æ£€æµ‹åˆ°è¯¥JSONå¹¶ä¸ç¬¦åˆæ‰€éœ€çš„schema,那么处ç†å™¨å¯ä»¥è¿”回`false`,令`Reader`åœæ­¢ä¹‹åŽçš„è§£æžå·¥ä½œã€‚而`Reader`会进入一个错误状æ€ï¼Œå¹¶ä»¥`kParseErrorTermination`é”™è¯¯ç æ ‡è¯†ã€‚
-
-## GenericReader {#GenericReader}
-
-å‰é¢æåŠï¼Œ`Reader`是`GenericReader`模æ¿ç±»çš„typedef:
-
-~~~~~~~~~~cpp
-namespace rapidjson {
-
-template <typename SourceEncoding, typename TargetEncoding, typename Allocator = MemoryPoolAllocator<> >
-class GenericReader {
- // ...
-};
-
-typedef GenericReader<UTF8<>, UTF8<> > Reader;
-
-} // namespace rapidjson
-~~~~~~~~~~
-
-`Reader`使用UTF-8ä½œä¸ºæ¥æºåŠç›®æ ‡ç¼–ç ã€‚æ¥æºç¼–ç æ˜¯æŒ‡JSONæµçš„ç¼–ç ã€‚ç›®æ ‡ç¼–ç æ˜¯æŒ‡`String()`çš„`str`傿•°æ‰€ç”¨çš„ç¼–ç ã€‚例如,è¦è§£æžä¸€ä¸ªUTF-8æµå¹¶è¾“出至UTF-16 string事件,你需è¦è¿™ä¹ˆå®šä¹‰ä¸€ä¸ªreader:
-
-~~~~~~~~~~cpp
-GenericReader<UTF8<>, UTF16<> > reader;
-~~~~~~~~~~
-
-注æ„到`UTF16`的缺çœç±»åž‹æ˜¯`wchar_t`。因此这个`reader`需è¦è°ƒç”¨å¤„ç†å™¨çš„`String(const wchar_t*, SizeType, bool)`。
-
-第三个模æ¿å‚æ•°`Allocator`是内部数æ®ç»“构(实际上是一个堆栈)的分é…器类型。
-
-## è§£æž {#Parsing}
-
-`Reader`的唯一功能就是解æžJSON。
-
-~~~~~~~~~~cpp
-template <unsigned parseFlags, typename InputStream, typename Handler>
-bool Parse(InputStream& is, Handler& handler);
-
-// 使用 parseFlags = kDefaultParseFlags
-template <typename InputStream, typename Handler>
-bool Parse(InputStream& is, Handler& handler);
-~~~~~~~~~~
-
-若在解æžä¸­å‡ºçŽ°é”™è¯¯ï¼Œå®ƒä¼šè¿”å›ž`false`。使用者å¯è°ƒç”¨`bool HasParseEror()`, `ParseErrorCode GetParseErrorCode()`åŠ`size_t GetErrorOffset()`获å–错误状æ€ã€‚实际上`Document`使用这些`Reader`函数去获å–è§£æžé”™è¯¯ã€‚请å‚考[DOM](doc/dom.md)去了解有关解æžé”™è¯¯çš„细节。
-
-# Writer {#Writer}
-
-`Reader`把JSON转æ¢ï¼ˆè§£æžï¼‰æˆä¸ºäº‹ä»¶ã€‚`Writer`åšå®Œå…¨ç›¸åçš„äº‹æƒ…ã€‚å®ƒæŠŠäº‹ä»¶è½¬æ¢æˆJSON。
-
-`Writer`是éžå¸¸å®¹æ˜“使用的。若你的应用程åºåªéœ€æŠŠä¸€äº›æ•°æ®è½¬æ¢æˆJSON,å¯èƒ½ç›´æŽ¥ä½¿ç”¨`Writer`,会比建立一个`Document`ç„¶åŽç”¨`Writer`æŠŠå®ƒè½¬æ¢æˆJSON更加方便。
-
-在`simplewriter`例å­é‡Œï¼Œæˆ‘们åš`simplereader`完全相å的事情。
-
-~~~~~~~~~~cpp
-#include "rapidjson/writer.h"
-#include "rapidjson/stringbuffer.h"
-#include <iostream>
-
-using namespace rapidjson;
-using namespace std;
-
-void main() {
- StringBuffer s;
- Writer<StringBuffer> writer(s);
-
- writer.StartObject();
- writer.Key("hello");
- writer.String("world");
- writer.Key("t");
- writer.Bool(true);
- writer.Key("f");
- writer.Bool(false);
- writer.Key("n");
- writer.Null();
- writer.Key("i");
- writer.Uint(123);
- writer.Key("pi");
- writer.Double(3.1416);
- writer.Key("a");
- writer.StartArray();
- for (unsigned i = 0; i < 4; i++)
- writer.Uint(i);
- writer.EndArray();
- writer.EndObject();
-
- cout << s.GetString() << endl;
-}
-~~~~~~~~~~
-
-~~~~~~~~~~
-{"hello":"world","t":true,"f":false,"n":null,"i":123,"pi":3.1416,"a":[0,1,2,3]}
-~~~~~~~~~~
-
-`String()`åŠ`Key()`儿œ‰ä¸¤ä¸ªé‡è½½ã€‚一个是如处ç†å™¨concept般,有3ä¸ªå‚æ•°ã€‚它能处ç†å«ç©ºå­—符的字符串。å¦ä¸€ä¸ªæ˜¯å¦‚上中使用的较简å•版本。
-
-注æ„到,例å­ä»£ç ä¸­çš„`EndArray()`åŠ`EndObject()`å¹¶æ²¡æœ‰å‚æ•°ã€‚å¯ä»¥ä¼ é€’一个`SizeType`çš„å‚æ•°ï¼Œä½†å®ƒä¼šè¢«`Writer`忽略。
-
-ä½ å¯èƒ½ä¼šæ€€ç–‘,为什么ä¸ä½¿ç”¨`sprintf()`或`std::stringstream`去建立一个JSON?
-
-这有几个原因:
-1. `Writer`必然会输出一个结构良好(well-formed)的JSON。若然有错误的事件次åºï¼ˆå¦‚`Int()`ç´§éš`StartObject()`出现),它会在调试模å¼ä¸­äº§ç”Ÿæ–­è¨€å¤±è´¥ã€‚
-2. `Writer::String()`å¯å¤„ç†å­—符串转义(如把ç ç‚¹`U+000A`è½¬æ¢æˆ`\n`)åŠè¿›è¡ŒUnicode转ç ã€‚
-3. `Writer`一致地处ç†number的输出。
-4. `Writer`实现了事件处ç†å™¨concept。å¯ç”¨äºŽå¤„ç†æ¥è‡ª`Reader`ã€`Document`或其他事件å‘生器。
-5. `Writer`å¯å¯¹ä¸åŒå¹³å°è¿›è¡Œä¼˜åŒ–。
-
-无论如何,使用`Writer` API去生æˆJSON甚至乎比这些临时方法更简å•。
-
-## æ¨¡æ¿ {#WriterTemplate}
-
-`Writer`与`Reader`有少许设计区别。`Writer`是一个模æ¿ç±»ï¼Œè€Œä¸æ˜¯ä¸€ä¸ªtypedef。 并没有`GenericWriter`。以下是`Writer`的声明。
-
-~~~~~~~~~~cpp
-namespace rapidjson {
-
-template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename Allocator = CrtAllocator<> >
-class Writer {
-public:
- Writer(OutputStream& os, Allocator* allocator = 0, size_t levelDepth = kDefaultLevelDepth)
-// ...
-};
-
-} // namespace rapidjson
-~~~~~~~~~~
-
-`OutputStream`模æ¿å‚数是输出æµçš„类型。它的类型ä¸å¯ä»¥è¢«è‡ªåŠ¨æŽ¨æ–­ï¼Œå¿…é¡»ç”±ä½¿ç”¨è€…æä¾›ã€‚
-
-`SourceEncoding`模æ¿å‚数指定了`String(const Ch*, ...)`的编ç ã€‚
-
-`TargetEncoding`模æ¿å‚数指定输出æµçš„ç¼–ç ã€‚
-
-最åŽä¸€ä¸ª`Allocator`是分é…器的类型,用于分é…内部数æ®ç»“构(一个堆栈)。
-
-此外,`Writer`的构造函数有一`levelDepth`傿•°ã€‚存储æ¯å±‚阶信æ¯çš„åˆå§‹å†…存分é…é‡å—æ­¤å‚æ•°å½±å“。
-
-## PrettyWriter {#PrettyWriter}
-
-`Writer`所输出的是没有空格字符的最紧凑JSON,适åˆç½‘络传输或储存,但ä¸é€‚åˆäººç±»é˜…读。
-
-因此,RapidJSONæä¾›äº†ä¸€ä¸ª`PrettyWriter`ï¼Œå®ƒåœ¨è¾“å‡ºä¸­åŠ å…¥ç¼©è¿›åŠæ¢è¡Œã€‚
-
-`PrettyWriter`的用法与`Writer`几乎一样,ä¸åŒä¹‹å¤„是`PrettyWriter`æä¾›äº†ä¸€ä¸ª`SetIndent(Ch indentChar, unsigned indentCharCount)`函数。缺çœçš„缩进是4个空格。
-
-## 完整性åŠé‡ç½® {#CompletenessReset}
-
-一个`Writer`åªå¯è¾“出å•个JSON,其根节点å¯ä»¥æ˜¯ä»»ä½•JSON类型。当处ç†å®Œå•个根节点事件(如`String()`),或匹é…的最åŽ`EndObject()`或`EndArray()`事件,输出的JSON是结构完整(well-formed)åŠå®Œæ•´çš„。使用者å¯è°ƒç”¨`Writer::IsComplete()`去检测完整性。
-
-当JSON完整时,`Writer`ä¸èƒ½å†æŽ¥å—新的事件。ä¸ç„¶å…¶è¾“出便会是ä¸åˆæ³•çš„ï¼ˆä¾‹å¦‚æœ‰è¶…è¿‡ä¸€ä¸ªæ ¹èŠ‚ç‚¹ï¼‰ã€‚ä¸ºäº†é‡æ–°åˆ©ç”¨`Writer`对象,使用者å¯è°ƒç”¨`Writer::Reset(OutputStream& os)`去é‡ç½®å…¶æ‰€æœ‰å†…部状æ€åŠè®¾ç½®æ–°çš„输出æµã€‚
-
-# 技巧 {#Techniques}
-
-## è§£æžJSON至自定义结构 {#CustomDataStructure}
-
-`Document`的解æžåŠŸèƒ½å®Œå…¨ä¾é `Reader`。实际上`Document`是一个处ç†å™¨ï¼Œåœ¨è§£æžJSON时接收事件去建立一个DOM。
-
-使用者å¯ä»¥ç›´æŽ¥ä½¿ç”¨`Reader`去建立其他数æ®ç»“构。这消除了建立DOM的步骤,从而å‡å°‘了内存开销并改善性能。
-
-在以下的`messagereader`例å­ä¸­ï¼Œ`ParseMessages()`è§£æžä¸€ä¸ªJSON,该JSON应该是一个å«é”®å€¼å¯¹çš„object。
-
-~~~~~~~~~~cpp
-#include "rapidjson/reader.h"
-#include "rapidjson/error/en.h"
-#include <iostream>
-#include <string>
-#include <map>
-
-using namespace std;
-using namespace rapidjson;
-
-typedef map<string, string> MessageMap;
-
-struct MessageHandler
- : public BaseReaderHandler<UTF8<>, MessageHandler> {
- MessageHandler() : state_(kExpectObjectStart) {
- }
-
- bool StartObject() {
- switch (state_) {
- case kExpectObjectStart:
- state_ = kExpectNameOrObjectEnd;
- return true;
- default:
- return false;
- }
- }
-
- bool String(const char* str, SizeType length, bool) {
- switch (state_) {
- case kExpectNameOrObjectEnd:
- name_ = string(str, length);
- state_ = kExpectValue;
- return true;
- case kExpectValue:
- messages_.insert(MessageMap::value_type(name_, string(str, length)));
- state_ = kExpectNameOrObjectEnd;
- return true;
- default:
- return false;
- }
- }
-
- bool EndObject(SizeType) { return state_ == kExpectNameOrObjectEnd; }
-
- bool Default() { return false; } // All other events are invalid.
-
- MessageMap messages_;
- enum State {
- kExpectObjectStart,
- kExpectNameOrObjectEnd,
- kExpectValue,
- }state_;
- std::string name_;
-};
-
-void ParseMessages(const char* json, MessageMap& messages) {
- Reader reader;
- MessageHandler handler;
- StringStream ss(json);
- if (reader.Parse(ss, handler))
- messages.swap(handler.messages_); // Only change it if success.
- else {
- ParseErrorCode e = reader.GetParseErrorCode();
- size_t o = reader.GetErrorOffset();
- cout << "Error: " << GetParseError_En(e) << endl;;
- cout << " at offset " << o << " near '" << string(json).substr(o, 10) << "...'" << endl;
- }
-}
-
-int main() {
- MessageMap messages;
-
- const char* json1 = "{ \"greeting\" : \"Hello!\", \"farewell\" : \"bye-bye!\" }";
- cout << json1 << endl;
- ParseMessages(json1, messages);
-
- for (MessageMap::const_iterator itr = messages.begin(); itr != messages.end(); ++itr)
- cout << itr->first << ": " << itr->second << endl;
-
- cout << endl << "Parse a JSON with invalid schema." << endl;
- const char* json2 = "{ \"greeting\" : \"Hello!\", \"farewell\" : \"bye-bye!\", \"foo\" : {} }";
- cout << json2 << endl;
- ParseMessages(json2, messages);
-
- return 0;
-}
-~~~~~~~~~~
-
-~~~~~~~~~~
-{ "greeting" : "Hello!", "farewell" : "bye-bye!" }
-farewell: bye-bye!
-greeting: Hello!
-
-Parse a JSON with invalid schema.
-{ "greeting" : "Hello!", "farewell" : "bye-bye!", "foo" : {} }
-Error: Terminate parsing due to Handler error.
- at offset 59 near '} }...'
-~~~~~~~~~~
-
-第一个JSON(`json1`)被æˆåŠŸåœ°è§£æžè‡³`MessageMap`。由于`MessageMap`是一个`std::map`ï¼Œæ‰“å°æ¬¡åºæŒ‰é”®å€¼æŽ’åºã€‚此次åºä¸ŽJSON中的次åºä¸åŒã€‚
-
-在第二个JSON(`json2`)中,`foo`的值是一个空object。由于它是一个object,`MessageHandler::StartObject()`会被调用。然而,在`state_ = kExpectValue`的情况下,该函数会返回`false`,并导致解æžè¿‡ç¨‹ç»ˆæ­¢ã€‚é”™è¯¯ä»£ç æ˜¯`kParseErrorTermination`。
-
-## 过滤JSON {#Filtering}
-
-如å‰é¢æåŠè¿‡ï¼Œ`Writer`å¯å¤„ç†`Reader`å‘出的事件。`example/condense/condense.cpp`例å­ç®€å•地设置`Writer`作为一个`Reader`的处ç†å™¨ï¼Œå› æ­¤å®ƒèƒ½ç§»é™¤JSON中的所有空白字符。`example/pretty/pretty.cpp`例å­ä½¿ç”¨åŒæ ·çš„å…³ç³»ï¼Œåªæ˜¯ä»¥`PrettyWriter`å–代`Writer`。因此`pretty`èƒ½å¤Ÿé‡æ–°æ ¼å¼åŒ–JSONï¼ŒåŠ å…¥ç¼©è¿›åŠæ¢è¡Œã€‚
-
-实际上,我们å¯ä»¥ä½¿ç”¨SAX风格API去加入(多个)中间层去过滤JSON的内容。例如`capitalize`例å­å¯ä»¥æŠŠæ‰€æœ‰JSON string改为大写。
-
-~~~~~~~~~~cpp
-#include "rapidjson/reader.h"
-#include "rapidjson/writer.h"
-#include "rapidjson/filereadstream.h"
-#include "rapidjson/filewritestream.h"
-#include "rapidjson/error/en.h"
-#include <vector>
-#include <cctype>
-
-using namespace rapidjson;
-
-template<typename OutputHandler>
-struct CapitalizeFilter {
- CapitalizeFilter(OutputHandler& out) : out_(out), buffer_() {
- }
-
- bool Null() { return out_.Null(); }
- bool Bool(bool b) { return out_.Bool(b); }
- bool Int(int i) { return out_.Int(i); }
- bool Uint(unsigned u) { return out_.Uint(u); }
- bool Int64(int64_t i) { return out_.Int64(i); }
- bool Uint64(uint64_t u) { return out_.Uint64(u); }
- bool Double(double d) { return out_.Double(d); }
- bool String(const char* str, SizeType length, bool) {
- buffer_.clear();
- for (SizeType i = 0; i < length; i++)
- buffer_.push_back(std::toupper(str[i]));
- return out_.String(&buffer_.front(), length, true); // true = output handler need to copy the string
- }
- bool StartObject() { return out_.StartObject(); }
- bool Key(const char* str, SizeType length, bool copy) { return String(str, length, copy); }
- bool EndObject(SizeType memberCount) { return out_.EndObject(memberCount); }
- bool StartArray() { return out_.StartArray(); }
- bool EndArray(SizeType elementCount) { return out_.EndArray(elementCount); }
-
- OutputHandler& out_;
- std::vector<char> buffer_;
-};
-
-int main(int, char*[]) {
- // Prepare JSON reader and input stream.
- Reader reader;
- char readBuffer[65536];
- FileReadStream is(stdin, readBuffer, sizeof(readBuffer));
-
- // Prepare JSON writer and output stream.
- char writeBuffer[65536];
- FileWriteStream os(stdout, writeBuffer, sizeof(writeBuffer));
- Writer<FileWriteStream> writer(os);
-
- // JSON reader parse from the input stream and let writer generate the output.
- CapitalizeFilter<Writer<FileWriteStream> > filter(writer);
- if (!reader.Parse(is, filter)) {
- fprintf(stderr, "\nError(%u): %s\n", (unsigned)reader.GetErrorOffset(), GetParseError_En(reader.GetParseErrorCode()));
- return 1;
- }
-
- return 0;
-}
-~~~~~~~~~~
-
-注æ„到,ä¸å¯ç®€å•地把JSON当作字符串去改为大写。例如:
-~~~~~~~~~~
-["Hello\nWorld"]
-~~~~~~~~~~
-
-简å•地把整个JSON转为大写的è¯ä¼šäº§ç”Ÿé”™è¯¯çš„转义符:
-~~~~~~~~~~
-["HELLO\NWORLD"]
-~~~~~~~~~~
-
-而`capitalize`就会产生正确的结果:
-~~~~~~~~~~
-["HELLO\nWORLD"]
-~~~~~~~~~~
-
-我们还å¯ä»¥å¼€å‘æ›´å¤æ‚的过滤器。然而,由于SAX风格API在æŸä¸€æ—¶é—´ç‚¹åªèƒ½æä¾›å•一事件的信æ¯ï¼Œä½¿ç”¨è€…需è¦è‡ªè¡Œè®°å½•一些上下文信æ¯ï¼ˆä¾‹å¦‚从根节点起的路径ã€å‚¨å­˜å…¶ä»–ç›¸å…³å€¼ï¼‰ã€‚å¯¹äºŽå¤„ç†æŸäº›æƒ…况,用DOM会比SAX更容易实现。
-
diff --git a/3rdparty/rapidjson/doc/schema.md b/3rdparty/rapidjson/doc/schema.md
deleted file mode 100644
index 4e07e9f0eee..00000000000
--- a/3rdparty/rapidjson/doc/schema.md
+++ /dev/null
@@ -1,237 +0,0 @@
-# Schema
-
-## Status: experimental, shall be included in v1.1
-
-JSON Schema is a draft standard for describing format of JSON. The schema itself is also a JSON. By validating a JSON with JSON Schema, your code can safely access the DOM without manually checking types, or whether a key exists, etc. It can also ensure that the serialized JSON conform to a specified schema.
-
-RapidJSON implemented a JSON Schema validator for [JSON Schema Draft v4](http://json-schema.org/documentation.html). If you do not familiar with JSON Schema, you may refer to [Understanding JSON Schema](http://spacetelescope.github.io/understanding-json-schema/).
-
-[TOC]
-
-## Basic Usage
-
-First of all, you need to parse a JSON Schema into `Document`, and then compile the `Document` into `SchemaDocument`.
-
-Secondly, construct a `SchemaValidator` with the `SchedmaDocument`. It is similar to a `Writer` in the sense of handling SAX events. So, you can use `document.Accept(validator)` to validate a document, and then check the validity.
-
-~~~cpp
-#include "rapidjson/schema.h"
-
-// ...
-
-Document sd;
-if (!sd.Parse(schemaJson)) {
- // the schema is not a valid JSON.
- // ...
-}
-SchemaDocument schema(sd); // Compile a Document to SchemaDocument
-// sd is no longer needed here.
-
-Document d;
-if (!d.Parse(inputJson)) {
- // the input is not a valid JSON.
- // ...
-}
-
-SchemaValidator validator(schema);
-if (!d.Accept(validator)) {
- // Input JSON is invalid according to the schema
- // Output diagnostic information
- StringBuffer sb;
- validator.GetInvalidSchemaPointer().StringifyUriFragment(sb);
- printf("Invalid schema: %s\n", sb.GetString());
- printf("Invalid keyword: %s\n", validator.GetInvalidSchemaKeyword());
- sb.Clear();
- validator.GetInvalidDocumentPointer().StringifyUriFragment(sb);
- printf("Invalid document: %s\n", sb.GetString());
-}
-~~~
-
-Some notes:
-
-* One `SchemaDocment` can be referenced by multiple `SchemaValidator`s. It will not be modified by `SchemaValidator`s.
-* A `SchemaValidator` may be reused to validate multiple documents. To run it for other documents, call `validator.Reset()` first.
-
-## Validation during parsing/serialization
-
-Differ to most JSON Schema validator implementations, RapidJSON provides a SAX-based schema validator. Therefore, you can parse a JSON from a stream while validating it on the fly. If the validator encounters a JSON value that invalidates the supplied schema, the parsing will be terminated immediately. This design is especially useful for parsing large JSON files.
-
-### DOM parsing
-
-For using DOM in parsing, `Document` needs some preparation and finalizing tasks, in addition to receiving SAX events, thus it needs some work to route the reader, validator and the document. `SchemaValidatingReader` is a helper class that doing such work.
-
-~~~cpp
-#include "rapidjson/filereadstream.h"
-
-// ...
-SchemaDocument schema(sd); // Compile a Document to SchemaDocument
-
-// Use reader to parse the JSON
-FILE* fp = fopen("big.json", "r");
-FileReadStream is(fp, buffer, sizeof(buffer));
-
-// Parse JSON from reader, validate the SAX events, and store in d.
-Document d;
-SchemaValidatingReader<kParseDefaultFlags, FileReadStream, UTF8<> > reader(is, schema);
-d.Populate(reader);
-
-if (!reader.GetParseResult()) {
- // Not a valid JSON
- // When reader.GetParseResult().Code() == kParseErrorTermination,
- // it may be terminated by:
- // (1) the validator found that the JSON is invalid according to schema; or
- // (2) the input stream has I/O error.
-
- // Check the validation result
- if (!reader.IsValid()) {
- // Input JSON is invalid according to the schema
- // Output diagnostic information
- StringBuffer sb;
- reader.GetInvalidSchemaPointer().StringifyUriFragment(sb);
- printf("Invalid schema: %s\n", sb.GetString());
- printf("Invalid keyword: %s\n", reader.GetInvalidSchemaKeyword());
- sb.Clear();
- reader.GetInvalidDocumentPointer().StringifyUriFragment(sb);
- printf("Invalid document: %s\n", sb.GetString());
- }
-}
-~~~
-
-### SAX parsing
-
-For using SAX in parsing, it is much simpler. If it only need to validate the JSON without further processing, it is simply:
-
-~~~
-SchemaValidator validator(schema);
-Reader reader;
-if (!reader.Parse(stream, validator)) {
- if (!validator.IsValid()) {
- // ...
- }
-}
-~~~
-
-This is exactly the method used in [schemavalidator](example/schemavalidator/schemavalidator.cpp) example. The distinct advantage is low memory usage, no matter how big the JSON was (the memory usage depends on the complexity of the schema).
-
-If you need to handle the SAX events further, then you need to use the template class `GenericSchemaValidator` to set the output handler of the validator:
-
-~~~
-MyHandler handler;
-GenericSchemaValidator<SchemaDocument, MyHandler> validator(schema, handler);
-Reader reader;
-if (!reader.Parse(ss, validator)) {
- if (!validator.IsValid()) {
- // ...
- }
-}
-~~~
-
-### Serialization
-
-It is also possible to do validation during serializing. This can ensure the result JSON is valid according to the JSON schema.
-
-~~~
-StringBuffer sb;
-Writer<StringBuffer> writer(sb);
-GenericSchemaValidator<SchemaDocument, Writer<StringBuffer> > validator(s, writer);
-if (!d.Accept(validator)) {
- // Some problem during Accept(), it may be validation or encoding issues.
- if (!validator.IsValid()) {
- // ...
- }
-}
-~~~
-
-Of course, if your application only needs SAX-style serialization, it can simply send SAX events to `SchemaValidator` instead of `Writer`.
-
-## Remote Schema
-
-JSON Schema supports [`$ref` keyword](http://spacetelescope.github.io/understanding-json-schema/structuring.html), which is a [JSON pointer](pointer.md) referencing to a local or remote schema. Local pointer is prefixed with `#`, while remote pointer is an relative or absolute URI. For example:
-
-~~~js
-{ "$ref": "definitions.json#/address" }
-~~~
-
-As `SchemaValidator` does not know how to resolve such URI, it needs a user-provided `IRemoteSchemaDocumentProvider` instance to do so.
-
-~~~
-class MyRemoteSchemaDocumentProvider : public IRemoteSchemaDocumentProvider {
-public:
- virtual const SchemaDocument* GetRemoteDocument(const char* uri, SizeTyp length) {
- // Resolve the uri and returns a pointer to that schema.
- }
-};
-
-// ...
-
-MyRemoteSchemaDocumentProvider provider;
-SchemaValidator validator(schema, &provider);
-~~~
-
-## Conformance
-
-RapidJSON passed 262 out of 263 tests in [JSON Schema Test Suite](https://github.com/json-schema/JSON-Schema-Test-Suite) (Json Schema draft 4).
-
-The failed test is "changed scope ref invalid" of "change resolution scope" in `refRemote.json`. It is due to that `id` schema keyword and URI combining function are not implemented.
-
-Besides, the `format` schema keyword for string values is ignored, since it is not required by the specification.
-
-### Regular Expression
-
-The schema keyword `pattern` and `patternProperties` uses regular expression to match the required pattern.
-
-RapidJSON implemented a simple NFA regular expression engine, which is used by default. It supports the following syntax.
-
-|Syntax|Description|
-|------|-----------|
-|`ab` | Concatenation
-|`a|b` | Alternation
-|`a?` | Zero or one
-|`a*` | Zero or more
-|`a+` | One or more
-|`a{3}` | Exactly 3 times
-|`a{3,}` | At least 3 times
-|`a{3,5}`| 3 to 5 times
-|`(ab)` | Grouping
-|`^a` | At the beginning
-|`a$` | At the end
-|`.` | Any character
-|`[abc]` | Character classes
-|`[a-c]` | Character class range
-|`[a-z0-9_]` | Character class combination
-|`[^abc]` | Negated character classes
-|`[^a-c]` | Negated character class range
-|`[\b]` | Backspace (U+0008)
-|`\|`, `\\`, ... | Escape characters
-|`\f` | Form feed (U+000C)
-|`\n` | Line feed (U+000A)
-|`\r` | Carriage return (U+000D)
-|`\t` | Tab (U+0009)
-|`\v` | Vertical tab (U+000B)
-
-For C++11 compiler, it is also possible to use the `std::regex` by defining `RAPIDJSON_SCHEMA_USE_INTERNALREGEX=0` and `RAPIDJSON_SCHEMA_USE_STDREGEX=1`. If your schemas do not need `pattern` and `patternProperties`, you can set both macros to zero to disable this feature, which will reduce some code size.
-
-## Performance
-
-Most C++ JSON libraries have not yet supporting JSON Schema. So we tried to evaluate the performance of RapidJSON's JSON Schema validator according to [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark), which tests 11 JavaScript libraries running on Node.js.
-
-That benchmark runs validations on [JSON Schema Test Suite](https://github.com/json-schema/JSON-Schema-Test-Suite), in which some test suites and tests are excluded. We made the same benchmarking procedure in [`schematest.cpp`](test/perftest/schematest.cpp).
-
-On a Mac Book Pro (2.8 GHz Intel Core i7), the following results are collected.
-
-|Validator|Relative speed|Number of test runs per second|
-|---------|:------------:|:----------------------------:|
-|RapidJSON|155%|30682|
-|[`ajv`](https://github.com/epoberezkin/ajv)|100%|19770 (± 1.31%)|
-|[`is-my-json-valid`](https://github.com/mafintosh/is-my-json-valid)|70%|13835 (± 2.84%)|
-|[`jsen`](https://github.com/bugventure/jsen)|57.7%|11411 (± 1.27%)|
-|[`schemasaurus`](https://github.com/AlexeyGrishin/schemasaurus)|26%|5145 (± 1.62%)|
-|[`themis`](https://github.com/playlyfe/themis)|19.9%|3935 (± 2.69%)|
-|[`z-schema`](https://github.com/zaggino/z-schema)|7%|1388 (± 0.84%)|
-|[`jsck`](https://github.com/pandastrike/jsck#readme)|3.1%|606 (± 2.84%)|
-|[`jsonschema`](https://github.com/tdegrunt/jsonschema#readme)|0.9%|185 (± 1.01%)|
-|[`skeemas`](https://github.com/Prestaul/skeemas#readme)|0.8%|154 (± 0.79%)|
-|tv4|0.5%|93 (± 0.94%)|
-|[`jayschema`](https://github.com/natesilva/jayschema)|0.1%|21 (± 1.14%)|
-
-That is, RapidJSON is about 1.5x faster than the fastest JavaScript library (ajv). And 1400x faster than the slowest one.
diff --git a/3rdparty/rapidjson/doc/schema.zh-cn.md b/3rdparty/rapidjson/doc/schema.zh-cn.md
deleted file mode 100644
index dd0ec73b85e..00000000000
--- a/3rdparty/rapidjson/doc/schema.zh-cn.md
+++ /dev/null
@@ -1,237 +0,0 @@
-# Schema
-
-## 状æ€: 实验性,应该会åˆè¿› v1.1
-
-JSON Schema 是æè¿° JSON æ ¼å¼çš„ä¸€ä¸ªæ ‡å‡†è‰æ¡ˆã€‚一个 schema 本身也是一个 JSON。使用 JSON Schema 去校验 JSON,å¯ä»¥è®©ä½ çš„代ç å®‰å…¨åœ°è®¿é—® DOM,而无须检查类型或键值是å¦å­˜åœ¨ç­‰ã€‚这也能确ä¿è¾“出的 JSON æ˜¯ç¬¦åˆæŒ‡å®šçš„ schema。
-
-RapidJSON 实现了一个 [JSON Schema Draft v4](http://json-schema.org/documentation.html) 的校验器。若你ä¸ç†Ÿæ‚‰ JSON Schema,å¯ä»¥å‚考 [Understanding JSON Schema](http://spacetelescope.github.io/understanding-json-schema/)。
-
-[TOC]
-
-## 基本用法
-
-é¦–å…ˆï¼Œä½ è¦æŠŠ JSON Schema è§£æžæˆ `Document`ï¼Œå†æŠŠå®ƒç¼–è¯‘æˆä¸€ä¸ª `SchemaDocument`。
-
-ç„¶åŽï¼Œåˆ©ç”¨è¯¥ `SchemaDocument` 创建一个 `SchemaValidator`。它与 `Writer` ç›¸ä¼¼ï¼Œéƒ½æ˜¯èƒ½å¤Ÿå¤„ç† SAX 事件的。因此,你å¯ä»¥ç”¨ `document.Accept(validator)` 去校验一个 JSON,然åŽå†èŽ·å–æ ¡éªŒç»“果。
-
-~~~cpp
-#include "rapidjson/schema.h"
-
-// ...
-
-Document sd;
-if (!sd.Parse(schemaJson)) {
- // the schema is not a valid JSON.
- // ...
-}
-SchemaDocument schema(sd); // Compile a Document to SchemaDocument
-// sd is no longer needed here.
-
-Document d;
-if (!d.Parse(inputJson)) {
- // the input is not a valid JSON.
- // ...
-}
-
-SchemaValidator validator(schema);
-if (!d.Accept(validator)) {
- // Input JSON is invalid according to the schema
- // Output diagnostic information
- StringBuffer sb;
- validator.GetInvalidSchemaPointer().StringifyUriFragment(sb);
- printf("Invalid schema: %s\n", sb.GetString());
- printf("Invalid keyword: %s\n", validator.GetInvalidSchemaKeyword());
- sb.Clear();
- validator.GetInvalidDocumentPointer().StringifyUriFragment(sb);
- printf("Invalid document: %s\n", sb.GetString());
-}
-~~~
-
-一些注æ„点:
-
-* 一个 `SchemaDocment` 能被多个 `SchemaValidator` åŠç”¨ã€‚它ä¸ä¼šè¢« `SchemaValidator` 修改。
-* 一个 `SchemaValidator` å¯ä»¥é‡å¤ä½¿ç”¨æ¥æ ¡éªŒå¤šä¸ªæ–‡ä»¶ã€‚在校验其他文件å‰ï¼Œå…ˆè°ƒç”¨ `validator.Reset()`。
-
-## 在解æžï¼ç”Ÿæˆæ—¶è¿›è¡Œæ ¡éªŒ
-
-与大部分 JSON Schema 校验器有所ä¸åŒï¼ŒRapidJSON æä¾›äº†ä¸€ä¸ªåŸºäºŽ SAX çš„ schema 校验器实现。因此,你å¯ä»¥åœ¨è¾“å…¥æµè§£æž JSON çš„åŒæ—¶è¿›è¡Œæ ¡éªŒã€‚若校验器é‡åˆ°ä¸€ä¸ªä¸Ž schema ä¸ç¬¦çš„值,就会立å³ç»ˆæ­¢è§£æžã€‚这设计对于解æžå¤§åž‹ JSON 文件时特别有用。
-
-### DOM è§£æž
-
-在使用 DOM è¿›è¡Œè§£æžæ—¶ï¼Œ`Document` 除了接收 SAX 事件外,还需åšä¸€äº›å‡†å¤‡åŠç»“æŸå·¥ä½œï¼Œå› æ­¤ï¼Œä¸ºäº†è¿žæŽ¥ `Reader`ã€`SchemaValidator` å’Œ `Document` è¦åšå¤šä¸€ç‚¹äº‹æƒ…。`SchemaValidatingReader` 是一个辅助类去åšé‚£äº›å·¥ä½œã€‚
-
-~~~cpp
-#include "rapidjson/filereadstream.h"
-
-// ...
-SchemaDocument schema(sd); // Compile a Document to SchemaDocument
-
-// Use reader to parse the JSON
-FILE* fp = fopen("big.json", "r");
-FileReadStream is(fp, buffer, sizeof(buffer));
-
-// Parse JSON from reader, validate the SAX events, and store in d.
-Document d;
-SchemaValidatingReader<kParseDefaultFlags, FileReadStream, UTF8<> > reader(is, schema);
-d.Populate(reader);
-
-if (!reader.GetParseResult()) {
- // Not a valid JSON
- // When reader.GetParseResult().Code() == kParseErrorTermination,
- // it may be terminated by:
- // (1) the validator found that the JSON is invalid according to schema; or
- // (2) the input stream has I/O error.
-
- // Check the validation result
- if (!reader.IsValid()) {
- // Input JSON is invalid according to the schema
- // Output diagnostic information
- StringBuffer sb;
- reader.GetInvalidSchemaPointer().StringifyUriFragment(sb);
- printf("Invalid schema: %s\n", sb.GetString());
- printf("Invalid keyword: %s\n", reader.GetInvalidSchemaKeyword());
- sb.Clear();
- reader.GetInvalidDocumentPointer().StringifyUriFragment(sb);
- printf("Invalid document: %s\n", sb.GetString());
- }
-}
-~~~
-
-### SAX è§£æž
-
-使用 SAX è§£æžæ—¶ï¼Œæƒ…况就简å•得多。若åªéœ€è¦æ ¡éªŒ JSON 而无需进一步处ç†ï¼Œé‚£ä¹ˆä»…需è¦ï¼š
-
-~~~
-SchemaValidator validator(schema);
-Reader reader;
-if (!reader.Parse(stream, validator)) {
- if (!validator.IsValid()) {
- // ...
- }
-}
-~~~
-
-è¿™ç§æ–¹å¼å’Œ [schemavalidator](example/schemavalidator/schemavalidator.cpp) 例å­å®Œå…¨ç›¸åŒã€‚这带æ¥çš„独特优势是,无论 JSON 多巨大,永远维æŒä½Žå†…存用é‡ï¼ˆå†…存用é‡åªä¸Ž Schema çš„å¤æ‚度相关)。
-
-若你需è¦è¿›ä¸€æ­¥å¤„ç† SAX 事件,便å¯ä½¿ç”¨æ¨¡æ¿ç±» `GenericSchemaValidator` 去设置校验器的输出 `Handler`:
-
-~~~
-MyHandler handler;
-GenericSchemaValidator<SchemaDocument, MyHandler> validator(schema, handler);
-Reader reader;
-if (!reader.Parse(ss, validator)) {
- if (!validator.IsValid()) {
- // ...
- }
-}
-~~~
-
-### 生æˆ
-
-我们也å¯ä»¥åœ¨ç”Ÿæˆï¼ˆserialization)的时候进行校验。这能确ä¿è¾“出的 JSON 符åˆä¸€ä¸ª JSON Schema。
-
-~~~
-StringBuffer sb;
-Writer<StringBuffer> writer(sb);
-GenericSchemaValidator<SchemaDocument, Writer<StringBuffer> > validator(s, writer);
-if (!d.Accept(validator)) {
- // Some problem during Accept(), it may be validation or encoding issues.
- if (!validator.IsValid()) {
- // ...
- }
-}
-~~~
-
-å½“ç„¶ï¼Œå¦‚æžœä½ çš„åº”ç”¨ä»…éœ€è¦ SAX 风格的生æˆï¼Œé‚£ä¹ˆåªéœ€è¦æŠŠ SAX 事件由原æ¥å‘é€åˆ° `Writer`,改为å‘é€åˆ° `SchemaValidator`。
-
-## 远程 Schema
-
-JSON Schema æ”¯æŒ [`$ref` 关键字](http://spacetelescope.github.io/understanding-json-schema/structuring.html),它是一个[JSON pointer](pointer.md) 引用至一个本地(local)或远程(remote) schema。本地指针的首字符是 `#`,而远程指针是一个相对或ç»å¯¹ URI。例如:
-
-~~~js
-{ "$ref": "definitions.json#/address" }
-~~~
-
-由于 `SchemaValidator` å¹¶ä¸çŸ¥é“如何处ç†é‚£äº› URI,它需è¦ä½¿ç”¨è€…æä¾›ä¸€ä¸ª `IRemoteSchemaDocumentProvider` 的实例去处ç†ã€‚
-
-~~~
-class MyRemoteSchemaDocumentProvider : public IRemoteSchemaDocumentProvider {
-public:
- virtual const SchemaDocument* GetRemoteDocument(const char* uri, SizeTyp length) {
- // Resolve the uri and returns a pointer to that schema.
- }
-};
-
-// ...
-
-MyRemoteSchemaDocumentProvider provider;
-SchemaValidator validator(schema, &provider);
-~~~
-
-## 标准的符åˆç¨‹åº¦
-
-RapidJSON 通过了 [JSON Schema Test Suite](https://github.com/json-schema/JSON-Schema-Test-Suite) (Json Schema draft 4) 中 263 个测试的 262 个。
-
-没通过的测试是 `refRemote.json` 中的 "change resolution scope" - "changed scope ref invalid"。这是由于未实现 `id` schema å…³é”®å­—åŠ URI åˆå¹¶åŠŸèƒ½ã€‚
-
-除此以外,关于字符串类型的 `format` schema 关键字也会被忽略,因为标准中并没需求必须实现。
-
-### 正则表达å¼
-
-`pattern` åŠ `patternProperties` 这两个 schema 关键字使用了正则表达å¼åŽ»åŒ¹é…æ‰€éœ€çš„æ¨¡å¼ã€‚
-
-RapidJSON 实现了一个简å•çš„ NFA 正则表达å¼å¼•擎,并预设使用。它支æŒä»¥ä¸‹è¯­æ³•。
-
-|语法|æè¿°|
-|------|-----------|
-|`ab` | 串è”
-|`a|b` | 交替
-|`a?` | 零或一次
-|`a*` | 零或多次
-|`a+` | 一或多次
-|`a{3}` | 刚好 3 次
-|`a{3,}` | 至少 3 次
-|`a{3,5}`| 3 至 5 次
-|`(ab)` | 分组
-|`^a` | 在开始处
-|`a$` | 在结æŸå¤„
-|`.` | 任何字符
-|`[abc]` | 字符组
-|`[a-c]` | 字符组范围
-|`[a-z0-9_]` | 字符组组åˆ
-|`[^abc]` | 字符组å–å
-|`[^a-c]` | 字符组范围å–å
-|`[\b]` | 退格符 (U+0008)
-|`\|`, `\\`, ... | 转义字符
-|`\f` | 馈页 (U+000C)
-|`\n` | 馈行 (U+000A)
-|`\r` | 回车 (U+000D)
-|`\t` | 制表 (U+0009)
-|`\v` | 垂直制表 (U+000B)
-
-对于使用 C++11 编译器的使用者,也å¯ä½¿ç”¨ `std::regex`,åªéœ€å®šä¹‰ `RAPIDJSON_SCHEMA_USE_INTERNALREGEX=0` åŠ `RAPIDJSON_SCHEMA_USE_STDREGEX=1`。若你的 schema 无需使用 `pattern` 或 `patternProperties`,å¯ä»¥æŠŠä¸¤ä¸ªå®éƒ½è®¾ä¸ºé›¶ï¼Œä»¥ç¦ç”¨æ­¤åŠŸèƒ½ï¼Œè¿™æ ·åšå¯èŠ‚çœä¸€äº›ä»£ç ä½“积。
-
-## 性能
-
-大部分 C++ JSON åº“éƒ½æœªæ”¯æŒ JSON Schema。因此我们å°è¯•按照 [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark) 去评估 RapidJSON çš„ JSON Schema 校验器。该评测测试了 11 个è¿è¡Œåœ¨ node.js 上的 JavaScript 库。
-
-该评测校验 [JSON Schema Test Suite](https://github.com/json-schema/JSON-Schema-Test-Suite) 中的测试,当中排除了一些测试套件åŠä¸ªåˆ«æµ‹è¯•。我们在 [`schematest.cpp`](test/perftest/schematest.cpp) 实现了相åŒçš„评测。
-
-在 MacBook Pro (2.8 GHz Intel Core i7) 上收集到以下结果。
-
-|校验器|相对速度|æ¯ç§’执行的测试数目|
-|---------|:------------:|:----------------------------:|
-|RapidJSON|155%|30682|
-|[`ajv`](https://github.com/epoberezkin/ajv)|100%|19770 (± 1.31%)|
-|[`is-my-json-valid`](https://github.com/mafintosh/is-my-json-valid)|70%|13835 (± 2.84%)|
-|[`jsen`](https://github.com/bugventure/jsen)|57.7%|11411 (± 1.27%)|
-|[`schemasaurus`](https://github.com/AlexeyGrishin/schemasaurus)|26%|5145 (± 1.62%)|
-|[`themis`](https://github.com/playlyfe/themis)|19.9%|3935 (± 2.69%)|
-|[`z-schema`](https://github.com/zaggino/z-schema)|7%|1388 (± 0.84%)|
-|[`jsck`](https://github.com/pandastrike/jsck#readme)|3.1%|606 (± 2.84%)|
-|[`jsonschema`](https://github.com/tdegrunt/jsonschema#readme)|0.9%|185 (± 1.01%)|
-|[`skeemas`](https://github.com/Prestaul/skeemas#readme)|0.8%|154 (± 0.79%)|
-|tv4|0.5%|93 (± 0.94%)|
-|[`jayschema`](https://github.com/natesilva/jayschema)|0.1%|21 (± 1.14%)|
-
-æ¢è¨€ä¹‹ï¼ŒRapidJSON 比最快的 JavaScript 库(ajv)快约 1.5x。比最慢的快 1400x。
diff --git a/3rdparty/rapidjson/doc/stream.md b/3rdparty/rapidjson/doc/stream.md
deleted file mode 100644
index b79ce537acd..00000000000
--- a/3rdparty/rapidjson/doc/stream.md
+++ /dev/null
@@ -1,426 +0,0 @@
-# Stream
-
-In RapidJSON, `rapidjson::Stream` is a concept for reading/writing JSON. Here we first show how to use streams provided. And then see how to create a custom stream.
-
-[TOC]
-
-# Memory Streams {#MemoryStreams}
-
-Memory streams store JSON in memory.
-
-## StringStream (Input) {#StringStream}
-
-`StringStream` is the most basic input stream. It represents a complete, read-only JSON stored in memory. It is defined in `rapidjson/rapidjson.h`.
-
-~~~~~~~~~~cpp
-#include "rapidjson/document.h" // will include "rapidjson/rapidjson.h"
-
-using namespace rapidjson;
-
-// ...
-const char json[] = "[1, 2, 3, 4]";
-StringStream s(json);
-
-Document d;
-d.ParseStream(s);
-~~~~~~~~~~
-
-Since this is very common usage, `Document::Parse(const char*)` is provided to do exactly the same as above:
-
-~~~~~~~~~~cpp
-// ...
-const char json[] = "[1, 2, 3, 4]";
-Document d;
-d.Parse(json);
-~~~~~~~~~~
-
-Note that, `StringStream` is a typedef of `GenericStringStream<UTF8<> >`, user may use another encodings to represent the character set of the stream.
-
-## StringBuffer (Output) {#StringBuffer}
-
-`StringBuffer` is a simple output stream. It allocates a memory buffer for writing the whole JSON. Use `GetString()` to obtain the buffer.
-
-~~~~~~~~~~cpp
-#include "rapidjson/stringbuffer.h"
-
-StringBuffer buffer;
-Writer<StringBuffer> writer(buffer);
-d.Accept(writer);
-
-const char* output = buffer.GetString();
-~~~~~~~~~~
-
-When the buffer is full, it will increases the capacity automatically. The default capacity is 256 characters (256 bytes for UTF8, 512 bytes for UTF16, etc.). User can provide an allocator and a initial capacity.
-
-~~~~~~~~~~cpp
-StringBuffer buffer1(0, 1024); // Use its allocator, initial size = 1024
-StringBuffer buffer2(allocator, 1024);
-~~~~~~~~~~
-
-By default, `StringBuffer` will instantiate an internal allocator.
-
-Similarly, `StringBuffer` is a typedef of `GenericStringBuffer<UTF8<> >`.
-
-# File Streams {#FileStreams}
-
-When parsing a JSON from file, you may read the whole JSON into memory and use ``StringStream`` above.
-
-However, if the JSON is big, or memory is limited, you can use `FileReadStream`. It only read a part of JSON from file into buffer, and then let the part be parsed. If it runs out of characters in the buffer, it will read the next part from file.
-
-## FileReadStream (Input) {#FileReadStream}
-
-`FileReadStream` reads the file via a `FILE` pointer. And user need to provide a buffer.
-
-~~~~~~~~~~cpp
-#include "rapidjson/filereadstream.h"
-#include <cstdio>
-
-using namespace rapidjson;
-
-FILE* fp = fopen("big.json", "rb"); // non-Windows use "r"
-
-char readBuffer[65536];
-FileReadStream is(fp, readBuffer, sizeof(readBuffer));
-
-Document d;
-d.ParseStream(is);
-
-fclose(fp);
-~~~~~~~~~~
-
-Different from string streams, `FileReadStream` is byte stream. It does not handle encodings. If the file is not UTF-8, the byte stream can be wrapped in a `EncodedInputStream`. It will be discussed very soon.
-
-Apart from reading file, user can also use `FileReadStream` to read `stdin`.
-
-## FileWriteStream (Output) {#FileWriteStream}
-
-`FileWriteStream` is buffered output stream. Its usage is very similar to `FileReadStream`.
-
-~~~~~~~~~~cpp
-#include "rapidjson/filewritestream.h"
-#include <cstdio>
-
-using namespace rapidjson;
-
-Document d;
-d.Parse(json);
-// ...
-
-FILE* fp = fopen("output.json", "wb"); // non-Windows use "w"
-
-char writeBuffer[65536];
-FileWriteStream os(fp, writeBuffer, sizeof(writeBuffer));
-
-Writer<FileWriteStream> writer(os);
-d.Accept(writer);
-
-fclose(fp);
-~~~~~~~~~~
-
-It can also directs the output to `stdout`.
-
-# iostream Wrapper {#iostreamWrapper}
-
-Due to users' requests, RapidJSON provided official wrappers for `std::basic_istream` and `std::basic_ostream`. However, please note that the performance will be much lower than the other streams above.
-
-## IStreamWrapper {#IStreamWrapper}
-
-`IStreamWrapper` wraps any class drived from `std::istream`, such as `std::istringstream`, `std::stringstream`, `std::ifstream`, `std::fstream`, into RapidJSON's input stream.
-
-~~~cpp
-#include <rapidjson/document.h>
-#include <rapidjson/istreamwrapper.h>
-#include <fstream>
-
-using namespace rapidjson;
-using namespace std;
-
-ifstream ifs("test.json");
-IStreamWrapper isw(ifs);
-
-Document d;
-d.ParseStream(isw);
-~~~
-
-For classes derived from `std::wistream`, use `WIStreamWrapper`.
-
-## OStreamWrapper {#OStreamWrapper}
-
-Similarly, `OStreamWrapper` wraps any class derived from `std::ostream`, such as `std::ostringstream`, `std::stringstream`, `std::ofstream`, `std::fstream`, into RapidJSON's input stream.
-
-~~~cpp
-#include <rapidjson/document.h>
-#include <rapidjson/ostreamwrapper.h>
-#include <rapidjson/writer.h>
-#include <fstream>
-
-using namespace rapidjson;
-using namespace std;
-
-Document d;
-d.Parse(json);
-
-// ...
-
-ofstream ofs("output.json");
-OStreamWrapper osw(ofs);
-
-Writer<OStreamWrapper> writer(osw);
-d.Accept(writer);
-~~~
-
-For classes derived from `std::wostream`, use `WOStreamWrapper`.
-
-# Encoded Streams {#EncodedStreams}
-
-Encoded streams do not contain JSON itself, but they wrap byte streams to provide basic encoding/decoding function.
-
-As mentioned above, UTF-8 byte streams can be read directly. However, UTF-16 and UTF-32 have endian issue. To handle endian correctly, it needs to convert bytes into characters (e.g. `wchar_t` for UTF-16) while reading, and characters into bytes while writing.
-
-Besides, it also need to handle [byte order mark (BOM)](http://en.wikipedia.org/wiki/Byte_order_mark). When reading from a byte stream, it is needed to detect or just consume the BOM if exists. When writing to a byte stream, it can optionally write BOM.
-
-If the encoding of stream is known in compile-time, you may use `EncodedInputStream` and `EncodedOutputStream`. If the stream can be UTF-8, UTF-16LE, UTF-16BE, UTF-32LE, UTF-32BE JSON, and it is only known in runtime, you may use `AutoUTFInputStream` and `AutoUTFOutputStream`. These streams are defined in `rapidjson/encodedstream.h`.
-
-Note that, these encoded streams can be applied to streams other than file. For example, you may have a file in memory, or a custom byte stream, be wrapped in encoded streams.
-
-## EncodedInputStream {#EncodedInputStream}
-
-`EncodedInputStream` has two template parameters. The first one is a `Encoding` class, such as `UTF8`, `UTF16LE`, defined in `rapidjson/encodings.h`. The second one is the class of stream to be wrapped.
-
-~~~~~~~~~~cpp
-#include "rapidjson/document.h"
-#include "rapidjson/filereadstream.h" // FileReadStream
-#include "rapidjson/encodedstream.h" // EncodedInputStream
-#include <cstdio>
-
-using namespace rapidjson;
-
-FILE* fp = fopen("utf16le.json", "rb"); // non-Windows use "r"
-
-char readBuffer[256];
-FileReadStream bis(fp, readBuffer, sizeof(readBuffer));
-
-EncodedInputStream<UTF16LE<>, FileReadStream> eis(bis); // wraps bis into eis
-
-Document d; // Document is GenericDocument<UTF8<> >
-d.ParseStream<0, UTF16LE<> >(eis); // Parses UTF-16LE file into UTF-8 in memory
-
-fclose(fp);
-~~~~~~~~~~
-
-## EncodedOutputStream {#EncodedOutputStream}
-
-`EncodedOutputStream` is similar but it has a `bool putBOM` parameter in the constructor, controlling whether to write BOM into output byte stream.
-
-~~~~~~~~~~cpp
-#include "rapidjson/filewritestream.h" // FileWriteStream
-#include "rapidjson/encodedstream.h" // EncodedOutputStream
-#include <cstdio>
-
-Document d; // Document is GenericDocument<UTF8<> >
-// ...
-
-FILE* fp = fopen("output_utf32le.json", "wb"); // non-Windows use "w"
-
-char writeBuffer[256];
-FileWriteStream bos(fp, writeBuffer, sizeof(writeBuffer));
-
-typedef EncodedOutputStream<UTF32LE<>, FileWriteStream> OutputStream;
-OutputStream eos(bos, true); // Write BOM
-
-Writer<OutputStream, UTF32LE<>, UTF8<>> writer(eos);
-d.Accept(writer); // This generates UTF32-LE file from UTF-8 in memory
-
-fclose(fp);
-~~~~~~~~~~
-
-## AutoUTFInputStream {#AutoUTFInputStream}
-
-Sometimes an application may want to handle all supported JSON encoding. `AutoUTFInputStream` will detection encoding by BOM first. If BOM is unavailable, it will use characteristics of valid JSON to make detection. If neither method success, it falls back to the UTF type provided in constructor.
-
-Since the characters (code units) may be 8-bit, 16-bit or 32-bit. `AutoUTFInputStream` requires a character type which can hold at least 32-bit. We may use `unsigned`, as in the template parameter:
-
-~~~~~~~~~~cpp
-#include "rapidjson/document.h"
-#include "rapidjson/filereadstream.h" // FileReadStream
-#include "rapidjson/encodedstream.h" // AutoUTFInputStream
-#include <cstdio>
-
-using namespace rapidjson;
-
-FILE* fp = fopen("any.json", "rb"); // non-Windows use "r"
-
-char readBuffer[256];
-FileReadStream bis(fp, readBuffer, sizeof(readBuffer));
-
-AutoUTFInputStream<unsigned, FileReadStream> eis(bis); // wraps bis into eis
-
-Document d; // Document is GenericDocument<UTF8<> >
-d.ParseStream<0, AutoUTF<unsigned> >(eis); // This parses any UTF file into UTF-8 in memory
-
-fclose(fp);
-~~~~~~~~~~
-
-When specifying the encoding of stream, uses `AutoUTF<CharType>` as in `ParseStream()` above.
-
-You can obtain the type of UTF via `UTFType GetType()`. And check whether a BOM is found by `HasBOM()`
-
-## AutoUTFOutputStream {#AutoUTFOutputStream}
-
-Similarly, to choose encoding for output during runtime, we can use `AutoUTFOutputStream`. This class is not automatic *per se*. You need to specify the UTF type and whether to write BOM in runtime.
-
-~~~~~~~~~~cpp
-using namespace rapidjson;
-
-void WriteJSONFile(FILE* fp, UTFType type, bool putBOM, const Document& d) {
- char writeBuffer[256];
- FileWriteStream bos(fp, writeBuffer, sizeof(writeBuffer));
-
- typedef AutoUTFOutputStream<unsigned, FileWriteStream> OutputStream;
- OutputStream eos(bos, type, putBOM);
-
- Writer<OutputStream, UTF8<>, AutoUTF<> > writer;
- d.Accept(writer);
-}
-~~~~~~~~~~
-
-`AutoUTFInputStream` and `AutoUTFOutputStream` is more convenient than `EncodedInputStream` and `EncodedOutputStream`. They just incur a little bit runtime overheads.
-
-# Custom Stream {#CustomStream}
-
-In addition to memory/file streams, user can create their own stream classes which fits RapidJSON's API. For example, you may create network stream, stream from compressed file, etc.
-
-RapidJSON combines different types using templates. A class containing all required interface can be a stream. The Stream interface is defined in comments of `rapidjson/rapidjson.h`:
-
-~~~~~~~~~~cpp
-concept Stream {
- typename Ch; //!< Character type of the stream.
-
- //! Read the current character from stream without moving the read cursor.
- Ch Peek() const;
-
- //! Read the current character from stream and moving the read cursor to next character.
- Ch Take();
-
- //! Get the current read cursor.
- //! \return Number of characters read from start.
- size_t Tell();
-
- //! Begin writing operation at the current read pointer.
- //! \return The begin writer pointer.
- Ch* PutBegin();
-
- //! Write a character.
- void Put(Ch c);
-
- //! Flush the buffer.
- void Flush();
-
- //! End the writing operation.
- //! \param begin The begin write pointer returned by PutBegin().
- //! \return Number of characters written.
- size_t PutEnd(Ch* begin);
-}
-~~~~~~~~~~
-
-For input stream, they must implement `Peek()`, `Take()` and `Tell()`.
-For output stream, they must implement `Put()` and `Flush()`.
-There are two special interface, `PutBegin()` and `PutEnd()`, which are only for *in situ* parsing. Normal streams do not implement them. However, if the interface is not needed for a particular stream, it is still need to a dummy implementation, otherwise will generate compilation error.
-
-## Example: istream wrapper {#ExampleIStreamWrapper}
-
-The following example is a simple wrapper of `std::istream`, which only implements 3 functions.
-
-~~~~~~~~~~cpp
-class MyIStreamWrapper {
-public:
- typedef char Ch;
-
- MyIStreamWrapper(std::istream& is) : is_(is) {
- }
-
- Ch Peek() const { // 1
- int c = is_.peek();
- return c == std::char_traits<char>::eof() ? '\0' : (Ch)c;
- }
-
- Ch Take() { // 2
- int c = is_.get();
- return c == std::char_traits<char>::eof() ? '\0' : (Ch)c;
- }
-
- size_t Tell() const { return (size_t)is_.tellg(); } // 3
-
- Ch* PutBegin() { assert(false); return 0; }
- void Put(Ch) { assert(false); }
- void Flush() { assert(false); }
- size_t PutEnd(Ch*) { assert(false); return 0; }
-
-private:
- MyIStreamWrapper(const MyIStreamWrapper&);
- MyIStreamWrapper& operator=(const MyIStreamWrapper&);
-
- std::istream& is_;
-};
-~~~~~~~~~~
-
-User can use it to wrap instances of `std::stringstream`, `std::ifstream`.
-
-~~~~~~~~~~cpp
-const char* json = "[1,2,3,4]";
-std::stringstream ss(json);
-MyIStreamWrapper is(ss);
-
-Document d;
-d.ParseStream(is);
-~~~~~~~~~~
-
-Note that, this implementation may not be as efficient as RapidJSON's memory or file streams, due to internal overheads of the standard library.
-
-## Example: ostream wrapper {#ExampleOStreamWrapper}
-
-The following example is a simple wrapper of `std::istream`, which only implements 2 functions.
-
-~~~~~~~~~~cpp
-class MyOStreamWrapper {
-public:
- typedef char Ch;
-
- MyOStreamWrapper(std::ostream& os) : os_(os) {
- }
-
- Ch Peek() const { assert(false); return '\0'; }
- Ch Take() { assert(false); return '\0'; }
- size_t Tell() const { }
-
- Ch* PutBegin() { assert(false); return 0; }
- void Put(Ch c) { os_.put(c); } // 1
- void Flush() { os_.flush(); } // 2
- size_t PutEnd(Ch*) { assert(false); return 0; }
-
-private:
- MyOStreamWrapper(const MyOStreamWrapper&);
- MyOStreamWrapper& operator=(const MyOStreamWrapper&);
-
- std::ostream& os_;
-};
-~~~~~~~~~~
-
-User can use it to wrap instances of `std::stringstream`, `std::ofstream`.
-
-~~~~~~~~~~cpp
-Document d;
-// ...
-
-std::stringstream ss;
-MyOStreamWrapper os(ss);
-
-Writer<MyOStreamWrapper> writer(os);
-d.Accept(writer);
-~~~~~~~~~~
-
-Note that, this implementation may not be as efficient as RapidJSON's memory or file streams, due to internal overheads of the standard library.
-
-# Summary {#Summary}
-
-This section describes stream classes available in RapidJSON. Memory streams are simple. File stream can reduce the memory required during JSON parsing and generation, if the JSON is stored in file system. Encoded streams converts between byte streams and character streams. Finally, user may create custom streams using a simple interface.
diff --git a/3rdparty/rapidjson/doc/stream.zh-cn.md b/3rdparty/rapidjson/doc/stream.zh-cn.md
deleted file mode 100644
index 5cc9c0d939b..00000000000
--- a/3rdparty/rapidjson/doc/stream.zh-cn.md
+++ /dev/null
@@ -1,426 +0,0 @@
-# æµ
-
-在RapidJSON中,`rapidjson::Stream`是用於读写JSON的概念(概念是指C++çš„concept)。在这里我们先介ç»å¦‚何使用RapidJSONæä¾›çš„å„ç§æµã€‚ç„¶åŽå†çœ‹çœ‹å¦‚何自行定义æµã€‚
-
-[TOC]
-
-# å†…å­˜æµ {#MemoryStreams}
-
-å†…å­˜æµæŠŠJSON存储在内存之中。
-
-## StringStream(输入){#StringStream}
-
-`StringStream`是最基本的输入æµï¼Œå®ƒè¡¨ç¤ºä¸€ä¸ªå®Œæ•´çš„ã€åªè¯»çš„ã€å­˜å‚¨äºŽå†…存的JSON。它在`rapidjson/rapidjson.h`中定义。
-
-~~~~~~~~~~cpp
-#include "rapidjson/document.h" // ä¼šåŒ…å« "rapidjson/rapidjson.h"
-
-using namespace rapidjson;
-
-// ...
-const char json[] = "[1, 2, 3, 4]";
-StringStream s(json);
-
-Document d;
-d.ParseStream(s);
-~~~~~~~~~~
-
-由于这是éžå¸¸å¸¸ç”¨çš„用法,RapidJSONæä¾›`Document::Parse(const char*)`去åšå®Œå…¨ç›¸åŒçš„事情:
-
-~~~~~~~~~~cpp
-// ...
-const char json[] = "[1, 2, 3, 4]";
-Document d;
-d.Parse(json);
-~~~~~~~~~~
-
-éœ€è¦æ³¨æ„,`StringStream`是`GenericStringStream<UTF8<> >`çš„typedef,使用者å¯ç”¨å…¶ä»–ç¼–ç ç±»åŽ»ä»£è¡¨æµæ‰€ä½¿ç”¨çš„字符集。
-
-## StringBuffer(输出){#StringBuffer}
-
-`StringBuffer`是一个简å•的输出æµã€‚它分é…一个内存缓冲区,供写入整个JSON。å¯ä½¿ç”¨`GetString()`æ¥èŽ·å–该缓冲区。
-
-~~~~~~~~~~cpp
-#include "rapidjson/stringbuffer.h"
-
-StringBuffer buffer;
-Writer<StringBuffer> writer(buffer);
-d.Accept(writer);
-
-const char* output = buffer.GetString();
-~~~~~~~~~~
-
-当缓冲区满溢,它将自动增加容é‡ã€‚缺çœå®¹é‡æ˜¯256个字符(UTF8是256字节,UTF16是512字节等)。使用者能自行æä¾›åˆ†é…器åŠåˆå§‹å®¹é‡ã€‚
-
-~~~~~~~~~~cpp
-StringBuffer buffer1(0, 1024); // 使用它的分é…器,åˆå§‹å¤§å° = 1024
-StringBuffer buffer2(allocator, 1024);
-~~~~~~~~~~
-
-如无设置分é…器,`StringBuffer`会自行实例化一个内部分é…器。
-
-相似地,`StringBuffer`是`GenericStringBuffer<UTF8<> >`的typedef。
-
-# æ–‡ä»¶æµ {#FileStreams}
-
-当è¦ä»Žæ–‡ä»¶è§£æžä¸€ä¸ªJSON,你å¯ä»¥æŠŠæ•´ä¸ªJSON读入内存并使用上述的`StringStream`。
-
-然而,若JSON很大,或是内存有é™ï¼Œä½ å¯ä»¥æ”¹ç”¨`FileReadStream`。它åªä¼šä»Žæ–‡ä»¶è¯»å–一部分至缓冲区,然åŽè®©é‚£éƒ¨åˆ†è¢«è§£æžã€‚若缓冲区的字符都被读完,它会å†ä»Žæ–‡ä»¶è¯»å–下一部分。
-
-## FileReadStream(输入) {#FileReadStream}
-
-`FileReadStream`通过`FILE`æŒ‡é’ˆè¯»å–æ–‡ä»¶ã€‚ä½¿ç”¨è€…éœ€è¦æä¾›ä¸€ä¸ªç¼“å†²åŒºã€‚
-
-~~~~~~~~~~cpp
-#include "rapidjson/filereadstream.h"
-#include <cstdio>
-
-using namespace rapidjson;
-
-FILE* fp = fopen("big.json", "rb"); // éžWindowså¹³å°ä½¿ç”¨"r"
-
-char readBuffer[65536];
-FileReadStream is(fp, readBuffer, sizeof(readBuffer));
-
-Document d;
-d.ParseStream(is);
-
-fclose(fp);
-~~~~~~~~~~
-
-与`StringStreams`ä¸ä¸€æ ·ï¼Œ`FileReadStream`是一个字节æµã€‚它ä¸å¤„ç†ç¼–ç ã€‚若文件并éžUTF-8ç¼–ç ï¼Œå¯ä»¥æŠŠå­—节æµç”¨`EncodedInputStream`包装。我们很快会讨论这个问题。
-
-é™¤äº†è¯»å–æ–‡ä»¶ï¼Œä½¿ç”¨è€…也å¯ä»¥ä½¿ç”¨`FileReadStream`æ¥è¯»å–`stdin`。
-
-## FileWriteStream(输出){#FileWriteStream}
-
-`FileWriteStream`是一个å«ç¼“冲功能的输出æµã€‚它的用法与`FileReadStream`éžå¸¸ç›¸ä¼¼ã€‚
-
-~~~~~~~~~~cpp
-#include "rapidjson/filewritestream.h"
-#include <cstdio>
-
-using namespace rapidjson;
-
-Document d;
-d.Parse(json);
-// ...
-
-FILE* fp = fopen("output.json", "wb"); // éžWindowså¹³å°ä½¿ç”¨"w"
-
-char writeBuffer[65536];
-FileWriteStream os(fp, writeBuffer, sizeof(writeBuffer));
-
-Writer<FileWriteStream> writer(os);
-d.Accept(writer);
-
-fclose(fp);
-~~~~~~~~~~
-
-它也å¯ä»¥æŠŠè¾“出导å‘`stdout`。
-
-# iostream 包装类 {#iostreamWrapper}
-
-åŸºäºŽç”¨æˆ·çš„è¦æ±‚,RapidJSONæä¾›äº†æ­£å¼çš„ `std::basic_istream` å’Œ `std::basic_ostream` 包装类。然而,请注æ„其性能会大大低于以上的其他æµã€‚
-
-## IStreamWrapper {#IStreamWrapper}
-
-`IStreamWrapper` 把任何继承自 `std::istream` 的类(如 `std::istringstream`ã€`std::stringstream`ã€`std::ifstream`ã€`std::fstream`ï¼‰åŒ…è£…æˆ RapidJSON 的输入æµã€‚
-
-~~~cpp
-#include <rapidjson/document.h>
-#include <rapidjson/istreamwrapper.h>
-#include <fstream>
-
-using namespace rapidjson;
-using namespace std;
-
-ifstream ifs("test.json");
-IStreamWrapper isw(ifs);
-
-Document d;
-d.ParseStream(isw);
-~~~
-
-对于继承自 `std::wistream` 的类,则使用 `WIStreamWrapper`。
-
-## OStreamWrapper {#OStreamWrapper}
-
-相似地,`OStreamWrapper` 把任何继承自 `std::ostream` 的类(如 `std::ostringstream`ã€`std::stringstream`ã€`std::ofstream`ã€`std::fstream`ï¼‰åŒ…è£…æˆ RapidJSON 的输出æµã€‚
-
-~~~cpp
-#include <rapidjson/document.h>
-#include <rapidjson/ostreamwrapper.h>
-#include <rapidjson/writer.h>
-#include <fstream>
-
-using namespace rapidjson;
-using namespace std;
-
-Document d;
-d.Parse(json);
-
-// ...
-
-ofstream ofs("output.json");
-OStreamWrapper osw(ofs);
-
-Writer<OStreamWrapper> writer(osw);
-d.Accept(writer);
-~~~
-
-对于继承自 `std::wistream` 的类,则使用 `WIStreamWrapper`。
-
-# ç¼–ç æµ {#EncodedStreams}
-
-ç¼–ç æµï¼ˆencoded streams)本身ä¸å­˜å‚¨JSONï¼Œå®ƒä»¬æ˜¯é€šè¿‡åŒ…è£…å­—èŠ‚æµæ¥æä¾›åŸºæœ¬çš„ç¼–ç ï¼è§£ç åŠŸèƒ½ã€‚
-
-如上所述,我们å¯ä»¥ç›´æŽ¥è¯»å…¥UTF-8字节æµã€‚然而,UTF-16åŠUTF-32有字节åºï¼ˆendianï¼‰é—®é¢˜ã€‚è¦æ­£ç¡®åœ°å¤„ç†å­—节åºï¼Œéœ€è¦åœ¨è¯»å–æ—¶æŠŠå­—èŠ‚è½¬æ¢æˆå­—符(如对UTF-16使用`wchar_t`),以åŠåœ¨å†™å…¥æ—¶æŠŠå­—符转æ¢ä¸ºå­—节。
-
-除此以外,我们也需è¦å¤„ç†[å­—èŠ‚é¡ºåºæ ‡è®°ï¼ˆbyte order mark, BOM)](http://en.wikipedia.org/wiki/Byte_order_mark)。当从一个字节æµè¯»å–æ—¶ï¼Œéœ€è¦æ£€æµ‹BOM,或者仅仅是把存在的BOM消去。当把JSONå†™å…¥å­—èŠ‚æµæ—¶ï¼Œä¹Ÿå¯é€‰æ‹©å†™å…¥BOM。
-
-若一个æµçš„ç¼–ç åœ¨ç¼–译期已知,你å¯ä½¿ç”¨`EncodedInputStream`åŠ`EncodedOutputStream`。若一个æµå¯èƒ½å­˜å‚¨UTF-8ã€UTF-16LEã€UTF-16BEã€UTF-32LEã€UTF-32BEçš„JSON,并且编ç åªèƒ½åœ¨è¿è¡Œæ—¶å¾—知,你便å¯ä»¥ä½¿ç”¨`AutoUTFInputStream`åŠ`AutoUTFOutputStream`。这些æµå®šä¹‰åœ¨`rapidjson/encodedstream.h`。
-
-注æ„åˆ°ï¼Œè¿™äº›ç¼–ç æµå¯ä»¥æ–½äºŽæ–‡ä»¶ä»¥å¤–çš„æµã€‚例如,你å¯ä»¥ç”¨ç¼–ç æµåŒ…装内存中的文件或自定义的字节æµã€‚
-
-## EncodedInputStream {#EncodedInputStream}
-
-`EncodedInputStream`å«ä¸¤ä¸ªæ¨¡æ¿å‚数。第一个是`Encoding`类型,例如定义于`rapidjson/encodings.h`çš„`UTF8`ã€`UTF16LE`ã€‚ç¬¬äºŒä¸ªå‚æ•°æ˜¯è¢«åŒ…装的æµçš„类型。
-
-~~~~~~~~~~cpp
-#include "rapidjson/document.h"
-#include "rapidjson/filereadstream.h" // FileReadStream
-#include "rapidjson/encodedstream.h" // EncodedInputStream
-#include <cstdio>
-
-using namespace rapidjson;
-
-FILE* fp = fopen("utf16le.json", "rb"); // éžWindowså¹³å°ä½¿ç”¨"r"
-
-char readBuffer[256];
-FileReadStream bis(fp, readBuffer, sizeof(readBuffer));
-
-EncodedInputStream<UTF16LE<>, FileReadStream> eis(bis); // 用eis包装bis
-
-Document d; // Document为GenericDocument<UTF8<> >
-d.ParseStream<0, UTF16LE<> >(eis); // 把UTF-16LE文件解æžè‡³å†…存中的UTF-8
-
-fclose(fp);
-~~~~~~~~~~
-
-## EncodedOutputStream {#EncodedOutputStream}
-
-`EncodedOutputStream`也是相似的,但它的构造函数有一个`bool putBOM`傿•°ï¼Œç”¨äºŽæŽ§åˆ¶æ˜¯å¦åœ¨è¾“出字节æµå†™å…¥BOM。
-
-~~~~~~~~~~cpp
-#include "rapidjson/filewritestream.h" // FileWriteStream
-#include "rapidjson/encodedstream.h" // EncodedOutputStream
-#include <cstdio>
-
-Document d; // Document为GenericDocument<UTF8<> >
-// ...
-
-FILE* fp = fopen("output_utf32le.json", "wb"); // éžWindowså¹³å°ä½¿ç”¨"w"
-
-char writeBuffer[256];
-FileWriteStream bos(fp, writeBuffer, sizeof(writeBuffer));
-
-typedef EncodedOutputStream<UTF32LE<>, FileWriteStream> OutputStream;
-OutputStream eos(bos, true); // 写入BOM
-
-Writer<OutputStream, UTF32LE<>, UTF8<>> writer(eos);
-d.Accept(writer); // 这里从内存的UTF-8生æˆUTF32-LE文件
-
-fclose(fp);
-~~~~~~~~~~
-
-## AutoUTFInputStream {#AutoUTFInputStream}
-
-有时候,应用软件å¯èƒ½éœ€è¦ã²ƒç†æ‰€æœ‰å¯æ”¯æŒçš„JSONç¼–ç ã€‚`AutoUTFInputStream`会先使用BOMæ¥æ£€æµ‹ç¼–ç ã€‚è‹¥BOMä¸å­˜åœ¨ï¼Œå®ƒä¾¿ä¼šä½¿ç”¨åˆæ³•JSONçš„ç‰¹æ€§æ¥æ£€æµ‹ã€‚è‹¥ä¸¤ç§æ–¹æ³•都失败,它就会倒退至构造函数æä¾›çš„UTF类型。
-
-由于字符(编ç å•å…ƒï¼code unit)å¯èƒ½æ˜¯8ä½ã€16使ˆ–32ä½ï¼Œ`AutoUTFInputStream` 需è¦ä¸€ä¸ªèƒ½è‡³å°‘储存32ä½çš„字符类型。我们å¯ä»¥ä½¿ç”¨`unsigned`作为模æ¿å‚数:
-
-~~~~~~~~~~cpp
-#include "rapidjson/document.h"
-#include "rapidjson/filereadstream.h" // FileReadStream
-#include "rapidjson/encodedstream.h" // AutoUTFInputStream
-#include <cstdio>
-
-using namespace rapidjson;
-
-FILE* fp = fopen("any.json", "rb"); // éžWindowså¹³å°ä½¿ç”¨"r"
-
-char readBuffer[256];
-FileReadStream bis(fp, readBuffer, sizeof(readBuffer));
-
-AutoUTFInputStream<unsigned, FileReadStream> eis(bis); // 用eis包装bis
-
-Document d; // Document为GenericDocument<UTF8<> >
-d.ParseStream<0, AutoUTF<unsigned> >(eis); // 把任何UTFç¼–ç çš„æ–‡ä»¶è§£æžè‡³å†…存中的UTF-8
-
-fclose(fp);
-~~~~~~~~~~
-
-å½“è¦æŒ‡å®šæµçš„ç¼–ç ï¼Œå¯ä½¿ç”¨ä¸Šé¢ä¾‹å­ä¸­`ParseStream()`çš„å‚æ•°`AutoUTF<CharType>`。
-
-ä½ å¯ä»¥ä½¿ç”¨`UTFType GetType()`去获å–UTF类型,并且用`HasBOM()`æ£€æµ‹è¾“å…¥æµæ˜¯å¦å«æœ‰BOM。
-
-## AutoUTFOutputStream {#AutoUTFOutputStream}
-
-相似地,è¦åœ¨è¿è¡Œæ—¶é€‰æ‹©è¾“出的编ç ï¼Œæˆ‘们å¯ä½¿ç”¨`AutoUTFOutputStream`。这个类本身并éžã€Œè‡ªåЍã€ã€‚你需è¦åœ¨è¿è¡Œæ—¶æŒ‡å®šUTFç±»åž‹ï¼Œä»¥åŠæ˜¯å¦å†™å…¥BOM。
-
-~~~~~~~~~~cpp
-using namespace rapidjson;
-
-void WriteJSONFile(FILE* fp, UTFType type, bool putBOM, const Document& d) {
- char writeBuffer[256];
- FileWriteStream bos(fp, writeBuffer, sizeof(writeBuffer));
-
- typedef AutoUTFOutputStream<unsigned, FileWriteStream> OutputStream;
- OutputStream eos(bos, type, putBOM);
-
- Writer<OutputStream, UTF8<>, AutoUTF<> > writer;
- d.Accept(writer);
-}
-~~~~~~~~~~
-
-`AutoUTFInputStream`ï¼`AutoUTFOutputStream`是比`EncodedInputStream`ï¼`EncodedOutputStream`方便。但å‰è€…会产生一点è¿è¡ŒæœŸé¢å¤–开销。
-
-# è‡ªå®šä¹‰æµ {#CustomStream}
-
-é™¤äº†å†…å­˜ï¼æ–‡ä»¶æµï¼Œä½¿ç”¨è€…å¯åˆ›å»ºè‡ªè¡Œå®šä¹‰é€‚é…RapidJSON APIçš„æµç±»ã€‚例如,你å¯ä»¥åˆ›å»ºç½‘络æµã€ä»ŽåŽ‹ç¼©æ–‡ä»¶è¯»å–çš„æµç­‰ç­‰ã€‚
-
-RapidJSON利用模æ¿ç»“åˆä¸åŒçš„类型。åªè¦ä¸€ä¸ªç±»åŒ…嫿‰€æœ‰æ‰€éœ€çš„æŽ¥å£ï¼Œå°±å¯ä»¥ä½œä¸ºä¸€ä¸ªæµã€‚æµçš„æŽ¥åˆå®šä¹‰åœ¨`rapidjson/rapidjson.h`的注释里:
-
-~~~~~~~~~~cpp
-concept Stream {
- typename Ch; //!< æµçš„字符类型
-
- //! 从æµè¯»å–当å‰å­—符,ä¸ç§»åŠ¨è¯»å–æŒ‡é’ˆï¼ˆread cursor)
- Ch Peek() const;
-
- //! 从æµè¯»å–当å‰å­—ç¬¦ï¼Œç§»åŠ¨è¯»å–æŒ‡é’ˆè‡³ä¸‹ä¸€å­—符。
- Ch Take();
-
- //! 获å–è¯»å–æŒ‡é’ˆã€‚
- //! \return ä»Žå¼€å§‹ä»¥æ¥æ‰€è¯»è¿‡çš„字符数é‡ã€‚
- size_t Tell();
-
- //! 从当å‰è¯»å–指针开始写入æ“作。
- //! \return 返回开始写入的指针。
- Ch* PutBegin();
-
- //! 写入一个字符。
- void Put(Ch c);
-
- //! 清空缓冲区。
- void Flush();
-
- //! 完æˆå†™ä½œæ“作。
- //! \param begin PutBegin()返回的开始写入指针。
- //! \return 已写入的字符数é‡ã€‚
- size_t PutEnd(Ch* begin);
-}
-~~~~~~~~~~
-
-输入æµå¿…须实现`Peek()`ã€`Take()`åŠ`Tell()`。
-输出æµå¿…须实现`Put()`åŠ`Flush()`。
-`PutBegin()`åŠ`PutEnd()`是特殊的接å£ï¼Œä»…用于原ä½ï¼ˆ*in situ*)解æžã€‚一般的æµä¸éœ€å®žçŽ°å®ƒä»¬ã€‚ç„¶è€Œï¼Œå³ä½¿æŽ¥å£ä¸éœ€ç”¨äºŽæŸäº›æµï¼Œä»ç„¶éœ€è¦æä¾›ç©ºå®žçŽ°ï¼Œå¦åˆ™ä¼šäº§ç”Ÿç¼–译错误。
-
-## 例å­ï¼šistream的包装类 {#ExampleIStreamWrapper}
-
-以下的简å•例孿˜¯`std::istream`的包装类,它åªéœ€çް3个函数。
-
-~~~~~~~~~~cpp
-class MyIStreamWrapper {
-public:
- typedef char Ch;
-
- MyIStreamWrapper(std::istream& is) : is_(is) {
- }
-
- Ch Peek() const { // 1
- int c = is_.peek();
- return c == std::char_traits<char>::eof() ? '\0' : (Ch)c;
- }
-
- Ch Take() { // 2
- int c = is_.get();
- return c == std::char_traits<char>::eof() ? '\0' : (Ch)c;
- }
-
- size_t Tell() const { return (size_t)is_.tellg(); } // 3
-
- Ch* PutBegin() { assert(false); return 0; }
- void Put(Ch) { assert(false); }
- void Flush() { assert(false); }
- size_t PutEnd(Ch*) { assert(false); return 0; }
-
-private:
- MyIStreamWrapper(const MyIStreamWrapper&);
- MyIStreamWrapper& operator=(const MyIStreamWrapper&);
-
- std::istream& is_;
-};
-~~~~~~~~~~
-
-使用者能用它æ¥åŒ…装`std::stringstream`ã€`std::ifstream`的实例。
-
-~~~~~~~~~~cpp
-const char* json = "[1,2,3,4]";
-std::stringstream ss(json);
-MyIStreamWrapper is(ss);
-
-Document d;
-d.ParseStream(is);
-~~~~~~~~~~
-
-ä½†è¦æ³¨æ„,由于标准库的内部开销问,此实现的性能å¯èƒ½ä¸å¦‚RapidJSONçš„å†…å­˜ï¼æ–‡ä»¶æµã€‚
-
-## 例å­ï¼šostream的包装类 {#ExampleOStreamWrapper}
-
-ä»¥ä¸‹çš„ä¾‹å­æ˜¯`std::istream`的包装类,它åªéœ€å®žçް2个函数。
-
-~~~~~~~~~~cpp
-class MyOStreamWrapper {
-public:
- typedef char Ch;
-
- OStreamWrapper(std::ostream& os) : os_(os) {
- }
-
- Ch Peek() const { assert(false); return '\0'; }
- Ch Take() { assert(false); return '\0'; }
- size_t Tell() const { }
-
- Ch* PutBegin() { assert(false); return 0; }
- void Put(Ch c) { os_.put(c); } // 1
- void Flush() { os_.flush(); } // 2
- size_t PutEnd(Ch*) { assert(false); return 0; }
-
-private:
- MyOStreamWrapper(const MyOStreamWrapper&);
- MyOStreamWrapper& operator=(const MyOStreamWrapper&);
-
- std::ostream& os_;
-};
-~~~~~~~~~~
-
-使用者能用它æ¥åŒ…装`std::stringstream`ã€`std::ofstream`的实例。
-
-~~~~~~~~~~cpp
-Document d;
-// ...
-
-std::stringstream ss;
-MyOStreamWrapper os(ss);
-
-Writer<MyOStreamWrapper> writer(os);
-d.Accept(writer);
-~~~~~~~~~~
-
-ä½†è¦æ³¨æ„,由于标准库的内部开销问,此实现的性能å¯èƒ½ä¸å¦‚RapidJSONçš„å†…å­˜ï¼æ–‡ä»¶æµã€‚
-
-# 总结 {#Summary}
-
-本节æè¿°äº†RapidJSONæä¾›çš„å„ç§æµçš„类。内存æµå¾ˆç®€å•。若JSON存储在文件中,文件æµå¯å‡å°‘JSONè§£æžåŠç”Ÿæˆæ‰€éœ€çš„内存é‡ã€‚ç¼–ç æµåœ¨å­—节æµå’Œå­—符æµä¹‹é—´ä½œè½¬æ¢ã€‚最åŽï¼Œä½¿ç”¨è€…å¯ä½¿ç”¨ä¸€ä¸ªç®€å•接å£åˆ›å»ºè‡ªå®šä¹‰çš„æµã€‚
diff --git a/3rdparty/rapidjson/doc/tutorial.md b/3rdparty/rapidjson/doc/tutorial.md
deleted file mode 100644
index 121102345b4..00000000000
--- a/3rdparty/rapidjson/doc/tutorial.md
+++ /dev/null
@@ -1,517 +0,0 @@
-# Tutorial
-
-This tutorial introduces the basics of the Document Object Model(DOM) API.
-
-As shown in [Usage at a glance](@ref index), a JSON can be parsed into DOM, and then the DOM can be queried and modified easily, and finally be converted back to JSON.
-
-[TOC]
-
-# Value & Document {#ValueDocument}
-
-Each JSON value is stored in a type called `Value`. A `Document`, representing the DOM, contains the root `Value` of the DOM tree. All public types and functions of RapidJSON are defined in the `rapidjson` namespace.
-
-# Query Value {#QueryValue}
-
-In this section, we will use excerpt of `example/tutorial/tutorial.cpp`.
-
-Assumes we have a JSON stored in a C string (`const char* json`):
-~~~~~~~~~~js
-{
- "hello": "world",
- "t": true ,
- "f": false,
- "n": null,
- "i": 123,
- "pi": 3.1416,
- "a": [1, 2, 3, 4]
-}
-~~~~~~~~~~
-
-Parse it into a `Document`:
-~~~~~~~~~~cpp
-#include "rapidjson/document.h"
-
-using namespace rapidjson;
-
-// ...
-Document document;
-document.Parse(json);
-~~~~~~~~~~
-
-The JSON is now parsed into `document` as a *DOM tree*:
-
-![DOM in the tutorial](diagram/tutorial.png)
-
-Since the update to RFC 7159, the root of a conforming JSON document can be any JSON value. In earlier RFC 4627, only objects or arrays were allowed as root values. In this case, the root is an object.
-~~~~~~~~~~cpp
-assert(document.IsObject());
-~~~~~~~~~~
-
-Let's query whether a `"hello"` member exists in the root object. Since a `Value` can contain different types of value, we may need to verify its type and use suitable API to obtain the value. In this example, `"hello"` member associates with a JSON string.
-~~~~~~~~~~cpp
-assert(document.HasMember("hello"));
-assert(document["hello"].IsString());
-printf("hello = %s\n", document["hello"].GetString());
-~~~~~~~~~~
-
-~~~~~~~~~~
-world
-~~~~~~~~~~
-
-JSON true/false values are represented as `bool`.
-~~~~~~~~~~cpp
-assert(document["t"].IsBool());
-printf("t = %s\n", document["t"].GetBool() ? "true" : "false");
-~~~~~~~~~~
-
-~~~~~~~~~~
-true
-~~~~~~~~~~
-
-JSON null can be queryed by `IsNull()`.
-~~~~~~~~~~cpp
-printf("n = %s\n", document["n"].IsNull() ? "null" : "?");
-~~~~~~~~~~
-
-~~~~~~~~~~
-null
-~~~~~~~~~~
-
-JSON number type represents all numeric values. However, C++ needs more specific type for manipulation.
-
-~~~~~~~~~~cpp
-assert(document["i"].IsNumber());
-
-// In this case, IsUint()/IsInt64()/IsUInt64() also return true.
-assert(document["i"].IsInt());
-printf("i = %d\n", document["i"].GetInt());
-// Alternative (int)document["i"]
-
-assert(document["pi"].IsNumber());
-assert(document["pi"].IsDouble());
-printf("pi = %g\n", document["pi"].GetDouble());
-~~~~~~~~~~
-
-~~~~~~~~~~
-i = 123
-pi = 3.1416
-~~~~~~~~~~
-
-JSON array contains a number of elements.
-~~~~~~~~~~cpp
-// Using a reference for consecutive access is handy and faster.
-const Value& a = document["a"];
-assert(a.IsArray());
-for (SizeType i = 0; i < a.Size(); i++) // Uses SizeType instead of size_t
- printf("a[%d] = %d\n", i, a[i].GetInt());
-~~~~~~~~~~
-
-~~~~~~~~~~
-a[0] = 1
-a[1] = 2
-a[2] = 3
-a[3] = 4
-~~~~~~~~~~
-
-Note that, RapidJSON does not automatically convert values between JSON types. If a value is a string, it is invalid to call `GetInt()`, for example. In debug mode it will fail an assertion. In release mode, the behavior is undefined.
-
-In the following, details about querying individual types are discussed.
-
-## Query Array {#QueryArray}
-
-By default, `SizeType` is typedef of `unsigned`. In most systems, array is limited to store up to 2^32-1 elements.
-
-You may access the elements in array by integer literal, for example, `a[0]`, `a[1]`, `a[2]`.
-
-Array is similar to `std::vector`, instead of using indices, you may also use iterator to access all the elements.
-~~~~~~~~~~cpp
-for (Value::ConstValueIterator itr = a.Begin(); itr != a.End(); ++itr)
- printf("%d ", itr->GetInt());
-~~~~~~~~~~
-
-And other familiar query functions:
-* `SizeType Capacity() const`
-* `bool Empty() const`
-
-## Query Object {#QueryObject}
-
-Similar to array, we can access all object members by iterator:
-
-~~~~~~~~~~cpp
-static const char* kTypeNames[] =
- { "Null", "False", "True", "Object", "Array", "String", "Number" };
-
-for (Value::ConstMemberIterator itr = document.MemberBegin();
- itr != document.MemberEnd(); ++itr)
-{
- printf("Type of member %s is %s\n",
- itr->name.GetString(), kTypeNames[itr->value.GetType()]);
-}
-~~~~~~~~~~
-
-~~~~~~~~~~
-Type of member hello is String
-Type of member t is True
-Type of member f is False
-Type of member n is Null
-Type of member i is Number
-Type of member pi is Number
-Type of member a is Array
-~~~~~~~~~~
-
-Note that, when `operator[](const char*)` cannot find the member, it will fail an assertion.
-
-If we are unsure whether a member exists, we need to call `HasMember()` before calling `operator[](const char*)`. However, this incurs two lookup. A better way is to call `FindMember()`, which can check the existence of member and obtain its value at once:
-
-~~~~~~~~~~cpp
-Value::ConstMemberIterator itr = document.FindMember("hello");
-if (itr != document.MemberEnd())
- printf("%s %s\n", itr->value.GetString());
-~~~~~~~~~~
-
-## Querying Number {#QueryNumber}
-
-JSON provide a single numerical type called Number. Number can be integer or real numbers. RFC 4627 says the range of Number is specified by parser.
-
-As C++ provides several integer and floating point number types, the DOM tries to handle these with widest possible range and good performance.
-
-When a Number is parsed, it is stored in the DOM as either one of the following type:
-
-Type | Description
------------|---------------------------------------
-`unsigned` | 32-bit unsigned integer
-`int` | 32-bit signed integer
-`uint64_t` | 64-bit unsigned integer
-`int64_t` | 64-bit signed integer
-`double` | 64-bit double precision floating point
-
-When querying a number, you can check whether the number can be obtained as target type:
-
-Checking | Obtaining
-------------------|---------------------
-`bool IsNumber()` | N/A
-`bool IsUint()` | `unsigned GetUint()`
-`bool IsInt()` | `int GetInt()`
-`bool IsUint64()` | `uint64_t GetUint64()`
-`bool IsInt64()` | `int64_t GetInt64()`
-`bool IsDouble()` | `double GetDouble()`
-
-Note that, an integer value may be obtained in various ways without conversion. For example, A value `x` containing 123 will make `x.IsInt() == x.IsUint() == x.IsInt64() == x.IsUint64() == true`. But a value `y` containing -3000000000 will only makes `x.IsInt64() == true`.
-
-When obtaining the numeric values, `GetDouble()` will convert internal integer representation to a `double`. Note that, `int` and `unsigned` can be safely convert to `double`, but `int64_t` and `uint64_t` may lose precision (since mantissa of `double` is only 52-bits).
-
-## Query String {#QueryString}
-
-In addition to `GetString()`, the `Value` class also contains `GetStringLength()`. Here explains why.
-
-According to RFC 4627, JSON strings can contain Unicode character `U+0000`, which must be escaped as `"\u0000"`. The problem is that, C/C++ often uses null-terminated string, which treats ``\0'` as the terminator symbol.
-
-To conform RFC 4627, RapidJSON supports string containing `U+0000`. If you need to handle this, you can use `GetStringLength()` API to obtain the correct length of string.
-
-For example, after parsing a the following JSON to `Document d`:
-
-~~~~~~~~~~js
-{ "s" : "a\u0000b" }
-~~~~~~~~~~
-The correct length of the value `"a\u0000b"` is 3. But `strlen()` returns 1.
-
-`GetStringLength()` can also improve performance, as user may often need to call `strlen()` for allocating buffer.
-
-Besides, `std::string` also support a constructor:
-
-~~~~~~~~~~cpp
-string(const char* s, size_t count);
-~~~~~~~~~~
-
-which accepts the length of string as parameter. This constructor supports storing null character within the string, and should also provide better performance.
-
-## Comparing values
-
-You can use `==` and `!=` to compare values. Two values are equal if and only if they are have same type and contents. You can also compare values with primitive types. Here is an example.
-
-~~~~~~~~~~cpp
-if (document["hello"] == document["n"]) /*...*/; // Compare values
-if (document["hello"] == "world") /*...*/; // Compare value with literal string
-if (document["i"] != 123) /*...*/; // Compare with integers
-if (document["pi"] != 3.14) /*...*/; // Compare with double.
-~~~~~~~~~~
-
-Array/object compares their elements/members in order. They are equal if and only if their whole subtrees are equal.
-
-Note that, currently if an object contains duplicated named member, comparing equality with any object is always `false`.
-
-# Create/Modify Values {#CreateModifyValues}
-
-There are several ways to create values. After a DOM tree is created and/or modified, it can be saved as JSON again using `Writer`.
-
-## Change Value Type {#ChangeValueType}
-When creating a Value or Document by default constructor, its type is Null. To change its type, call `SetXXX()` or assignment operator, for example:
-
-~~~~~~~~~~cpp
-Document d; // Null
-d.SetObject();
-
-Value v; // Null
-v.SetInt(10);
-v = 10; // Shortcut, same as above
-~~~~~~~~~~
-
-### Overloaded Constructors
-There are also overloaded constructors for several types:
-
-~~~~~~~~~~cpp
-Value b(true); // calls Value(bool)
-Value i(-123); // calls Value(int)
-Value u(123u); // calls Value(unsigned)
-Value d(1.5); // calls Value(double)
-~~~~~~~~~~
-
-To create empty object or array, you may use `SetObject()`/`SetArray()` after default constructor, or using the `Value(Type)` in one shot:
-
-~~~~~~~~~~cpp
-Value o(kObjectType);
-Value a(kArrayType);
-~~~~~~~~~~
-
-## Move Semantics {#MoveSemantics}
-
-A very special decision during design of RapidJSON is that, assignment of value does not copy the source value to destination value. Instead, the value from source is moved to the destination. For example,
-
-~~~~~~~~~~cpp
-Value a(123);
-Value b(456);
-b = a; // a becomes a Null value, b becomes number 123.
-~~~~~~~~~~
-
-![Assignment with move semantics.](diagram/move1.png)
-
-Why? What is the advantage of this semantics?
-
-The simple answer is performance. For fixed size JSON types (Number, True, False, Null), copying them is fast and easy. However, For variable size JSON types (String, Array, Object), copying them will incur a lot of overheads. And these overheads are often unnoticed. Especially when we need to create temporary object, copy it to another variable, and then destruct it.
-
-For example, if normal *copy* semantics was used:
-
-~~~~~~~~~~cpp
-Document d;
-Value o(kObjectType);
-{
- Value contacts(kArrayType);
- // adding elements to contacts array.
- // ...
- o.AddMember("contacts", contacts, d.GetAllocator()); // deep clone contacts (may be with lots of allocations)
- // destruct contacts.
-}
-~~~~~~~~~~
-
-![Copy semantics makes a lots of copy operations.](diagram/move2.png)
-
-The object `o` needs to allocate a buffer of same size as contacts, makes a deep clone of it, and then finally contacts is destructed. This will incur a lot of unnecessary allocations/deallocations and memory copying.
-
-There are solutions to prevent actual copying these data, such as reference counting and garbage collection(GC).
-
-To make RapidJSON simple and fast, we chose to use *move* semantics for assignment. It is similar to `std::auto_ptr` which transfer ownership during assignment. Move is much faster and simpler, it just destructs the original value, `memcpy()` the source to destination, and finally sets the source as Null type.
-
-So, with move semantics, the above example becomes:
-
-~~~~~~~~~~cpp
-Document d;
-Value o(kObjectType);
-{
- Value contacts(kArrayType);
- // adding elements to contacts array.
- o.AddMember("contacts", contacts, d.GetAllocator()); // just memcpy() of contacts itself to the value of new member (16 bytes)
- // contacts became Null here. Its destruction is trivial.
-}
-~~~~~~~~~~
-
-![Move semantics makes no copying.](diagram/move3.png)
-
-This is called move assignment operator in C++11. As RapidJSON supports C++03, it adopts move semantics using assignment operator, and all other modifying function like `AddMember()`, `PushBack()`.
-
-### Move semantics and temporary values {#TemporaryValues}
-
-Sometimes, it is convenient to construct a Value in place, before passing it to one of the "moving" functions, like `PushBack()` or `AddMember()`. As temporary objects can't be converted to proper Value references, the convenience function `Move()` is available:
-
-~~~~~~~~~~cpp
-Value a(kArrayType);
-Document::AllocatorType& allocator = document.GetAllocator();
-// a.PushBack(Value(42), allocator); // will not compile
-a.PushBack(Value().SetInt(42), allocator); // fluent API
-a.PushBack(Value(42).Move(), allocator); // same as above
-~~~~~~~~~~
-
-## Create String {#CreateString}
-RapidJSON provide two strategies for storing string.
-
-1. copy-string: allocates a buffer, and then copy the source data into it.
-2. const-string: simply store a pointer of string.
-
-Copy-string is always safe because it owns a copy of the data. Const-string can be used for storing string literal, and in-situ parsing which we will mentioned in Document section.
-
-To make memory allocation customizable, RapidJSON requires user to pass an instance of allocator, whenever an operation may require allocation. This design is needed to prevent storing a allocator (or Document) pointer per Value.
-
-Therefore, when we assign a copy-string, we call this overloaded `SetString()` with allocator:
-
-~~~~~~~~~~cpp
-Document document;
-Value author;
-char buffer[10];
-int len = sprintf(buffer, "%s %s", "Milo", "Yip"); // dynamically created string.
-author.SetString(buffer, len, document.GetAllocator());
-memset(buffer, 0, sizeof(buffer));
-// author.GetString() still contains "Milo Yip" after buffer is destroyed
-~~~~~~~~~~
-
-In this example, we get the allocator from a `Document` instance. This is a common idiom when using RapidJSON. But you may use other instances of allocator.
-
-Besides, the above `SetString()` requires length. This can handle null characters within a string. There is another `SetString()` overloaded function without the length parameter. And it assumes the input is null-terminated and calls a `strlen()`-like function to obtain the length.
-
-Finally, for string literal or string with safe life-cycle can use const-string version of `SetString()`, which lacks allocator parameter. For string literals (or constant character arrays), simply passing the literal as parameter is safe and efficient:
-
-~~~~~~~~~~cpp
-Value s;
-s.SetString("rapidjson"); // can contain null character, length derived at compile time
-s = "rapidjson"; // shortcut, same as above
-~~~~~~~~~~
-
-For character pointer, the RapidJSON requires to mark it as safe before using it without copying. This can be achieved by using the `StringRef` function:
-
-~~~~~~~~~cpp
-const char * cstr = getenv("USER");
-size_t cstr_len = ...; // in case length is available
-Value s;
-// s.SetString(cstr); // will not compile
-s.SetString(StringRef(cstr)); // ok, assume safe lifetime, null-terminated
-s = StringRef(cstr); // shortcut, same as above
-s.SetString(StringRef(cstr,cstr_len)); // faster, can contain null character
-s = StringRef(cstr,cstr_len); // shortcut, same as above
-
-~~~~~~~~~
-
-## Modify Array {#ModifyArray}
-Value with array type provides similar APIs as `std::vector`.
-
-* `Clear()`
-* `Reserve(SizeType, Allocator&)`
-* `Value& PushBack(Value&, Allocator&)`
-* `template <typename T> GenericValue& PushBack(T, Allocator&)`
-* `Value& PopBack()`
-* `ValueIterator Erase(ConstValueIterator pos)`
-* `ValueIterator Erase(ConstValueIterator first, ConstValueIterator last)`
-
-Note that, `Reserve(...)` and `PushBack(...)` may allocate memory for the array elements, therefore require an allocator.
-
-Here is an example of `PushBack()`:
-
-~~~~~~~~~~cpp
-Value a(kArrayType);
-Document::AllocatorType& allocator = document.GetAllocator();
-
-for (int i = 5; i <= 10; i++)
- a.PushBack(i, allocator); // allocator is needed for potential realloc().
-
-// Fluent interface
-a.PushBack("Lua", allocator).PushBack("Mio", allocator);
-~~~~~~~~~~
-
-Differs from STL, `PushBack()`/`PopBack()` returns the array reference itself. This is called _fluent interface_.
-
-If you want to add a non-constant string or a string without sufficient lifetime (see [Create String](#CreateString)) to the array, you need to create a string Value by using the copy-string API. To avoid the need for an intermediate variable, you can use a [temporary value](#TemporaryValues) in place:
-
-~~~~~~~~~~cpp
-// in-place Value parameter
-contact.PushBack(Value("copy", document.GetAllocator()).Move(), // copy string
- document.GetAllocator());
-
-// explicit parameters
-Value val("key", document.GetAllocator()); // copy string
-contact.PushBack(val, document.GetAllocator());
-~~~~~~~~~~
-
-## Modify Object {#ModifyObject}
-Object is a collection of key-value pairs (members). Each key must be a string value. To modify an object, either add or remove members. THe following APIs are for adding members:
-
-* `Value& AddMember(Value&, Value&, Allocator& allocator)`
-* `Value& AddMember(StringRefType, Value&, Allocator&)`
-* `template <typename T> Value& AddMember(StringRefType, T value, Allocator&)`
-
-Here is an example.
-
-~~~~~~~~~~cpp
-Value contact(kObject);
-contact.AddMember("name", "Milo", document.GetAllocator());
-contact.AddMember("married", true, document.GetAllocator());
-~~~~~~~~~~
-
-The name parameter with `StringRefType` is similar to the interface of `SetString` function for string values. These overloads are used to avoid the need for copying the `name` string, as constant key names are very common in JSON objects.
-
-If you need to create a name from a non-constant string or a string without sufficient lifetime (see [Create String](#CreateString)), you need to create a string Value by using the copy-string API. To avoid the need for an intermediate variable, you can use a [temporary value](#TemporaryValues) in place:
-
-~~~~~~~~~~cpp
-// in-place Value parameter
-contact.AddMember(Value("copy", document.GetAllocator()).Move(), // copy string
- Value().Move(), // null value
- document.GetAllocator());
-
-// explicit parameters
-Value key("key", document.GetAllocator()); // copy string name
-Value val(42); // some value
-contact.AddMember(key, val, document.GetAllocator());
-~~~~~~~~~~
-
-For removing members, there are several choices:
-
-* `bool RemoveMember(const Ch* name)`: Remove a member by search its name (linear time complexity).
-* `bool RemoveMember(const Value& name)`: same as above but `name` is a Value.
-* `MemberIterator RemoveMember(MemberIterator)`: Remove a member by iterator (_constant_ time complexity).
-* `MemberIterator EraseMember(MemberIterator)`: similar to the above but it preserves order of members (linear time complexity).
-* `MemberIterator EraseMember(MemberIterator first, MemberIterator last)`: remove a range of members, preserves order (linear time complexity).
-
-`MemberIterator RemoveMember(MemberIterator)` uses a "move-last" trick to achieve constant time complexity. Basically the member at iterator is destructed, and then the last element is moved to that position. So the order of the remaining members are changed.
-
-## Deep Copy Value {#DeepCopyValue}
-If we really need to copy a DOM tree, we can use two APIs for deep copy: constructor with allocator, and `CopyFrom()`.
-
-~~~~~~~~~~cpp
-Document d;
-Document::AllocatorType& a = d.GetAllocator();
-Value v1("foo");
-// Value v2(v1); // not allowed
-
-Value v2(v1, a); // make a copy
-assert(v1.IsString()); // v1 untouched
-d.SetArray().PushBack(v1, a).PushBack(v2, a);
-assert(v1.IsNull() && v2.IsNull()); // both moved to d
-
-v2.CopyFrom(d, a); // copy whole document to v2
-assert(d.IsArray() && d.Size() == 2); // d untouched
-v1.SetObject().AddMember("array", v2, a);
-d.PushBack(v1, a);
-~~~~~~~~~~
-
-## Swap Values {#SwapValues}
-
-`Swap()` is also provided.
-
-~~~~~~~~~~cpp
-Value a(123);
-Value b("Hello");
-a.Swap(b);
-assert(a.IsString());
-assert(b.IsInt());
-~~~~~~~~~~
-
-Swapping two DOM trees is fast (constant time), despite the complexity of the trees.
-
-# What's next {#WhatsNext}
-
-This tutorial shows the basics of DOM tree query and manipulation. There are several important concepts in RapidJSON:
-
-1. [Streams](doc/stream.md) are channels for reading/writing JSON, which can be a in-memory string, or file stream, etc. User can also create their streams.
-2. [Encoding](doc/encoding.md) defines which character encoding is used in streams and memory. RapidJSON also provide Unicode conversion/validation internally.
-3. [DOM](doc/dom.md)'s basics are already covered in this tutorial. Uncover more advanced features such as *in situ* parsing, other parsing options and advanced usages.
-4. [SAX](doc/sax.md) is the foundation of parsing/generating facility in RapidJSON. Learn how to use `Reader`/`Writer` to implement even faster applications. Also try `PrettyWriter` to format the JSON.
-5. [Performance](doc/performance.md) shows some in-house and third-party benchmarks.
-6. [Internals](doc/internals.md) describes some internal designs and techniques of RapidJSON.
-
-You may also refer to the [FAQ](doc/faq.md), API documentation, examples and unit tests.
diff --git a/3rdparty/rapidjson/doc/tutorial.zh-cn.md b/3rdparty/rapidjson/doc/tutorial.zh-cn.md
deleted file mode 100644
index 37808b08669..00000000000
--- a/3rdparty/rapidjson/doc/tutorial.zh-cn.md
+++ /dev/null
@@ -1,515 +0,0 @@
-# 教程
-
-本教程简介文件对象模型(Document Object Model, DOM)API。
-
-如[用法一览](../readme.zh-cn.md#用法一览)中所示,å¯ä»¥è§£æžä¸€ä¸ªJSON至DOM,然åŽå°±å¯ä»¥è½»æ¾æŸ¥è¯¢åŠä¿®æ”¹DOM,并最终转æ¢å›žJSON。
-
-[TOC]
-
-# Value åŠ Document {#ValueDocument}
-
-æ¯ä¸ªJSON值都储存为`Value`类,而`Document`类则表示整个DOM,它存储了一个DOM树的根`Value`。RapidJSON的所有公开类型åŠå‡½æ•°éƒ½åœ¨`rapidjson`命å空间中。
-
-# 查询Value {#QueryValue}
-
-在本节中,我们会使用到`example/tutorial/tutorial.cpp`中的代ç ç‰‡æ®µã€‚
-
-å‡è®¾æˆ‘们用C语言的字符串储存一个JSON(`const char* json`):
-~~~~~~~~~~js
-{
- "hello": "world",
- "t": true ,
- "f": false,
- "n": null,
- "i": 123,
- "pi": 3.1416,
- "a": [1, 2, 3, 4]
-}
-~~~~~~~~~~
-
-把它解æžè‡³ä¸€ä¸ª`Document`:
-~~~~~~~~~~cpp
-#include "rapidjson/document.h"
-
-using namespace rapidjson;
-
-// ...
-Document document;
-document.Parse(json);
-~~~~~~~~~~
-
-那么现在该JSON就会被解æžè‡³`document`中,æˆä¸ºä¸€æ£µ*DOMæ ‘*:
-
-![教程中的DOM](diagram/tutorial.png)
-
-自从RFC 7159ä½œå‡ºæ›´æ–°ï¼Œåˆæ³•JSON文件的根å¯ä»¥æ˜¯ä»»ä½•类型的JSON值。而在较早的RFC 4627中,根值åªå…许是Object或Array。而在上述例å­ä¸­ï¼Œæ ¹æ˜¯ä¸€ä¸ªObject。
-~~~~~~~~~~cpp
-assert(document.IsObject());
-~~~~~~~~~~
-
-让我们查询一下根Object中有没有`"hello"`æˆå‘˜ã€‚由于一个`Value`å¯åŒ…å«ä¸åŒç±»åž‹çš„值,我们å¯èƒ½éœ€è¦éªŒè¯å®ƒçš„类型,并使用åˆé€‚çš„API去获å–其值。在此例中,`"hello"`æˆå‘˜å…³è”到一个JSON String。
-~~~~~~~~~~cpp
-assert(document.HasMember("hello"));
-assert(document["hello"].IsString());
-printf("hello = %s\n", document["hello"].GetString());
-~~~~~~~~~~
-
-~~~~~~~~~~
-world
-~~~~~~~~~~
-
-JSON True/False值是以`bool`表示的。
-~~~~~~~~~~cpp
-assert(document["t"].IsBool());
-printf("t = %s\n", document["t"].GetBool() ? "true" : "false");
-~~~~~~~~~~
-
-~~~~~~~~~~
-true
-~~~~~~~~~~
-
-JSON Null值å¯ç”¨`IsNull()`查询。
-~~~~~~~~~~cpp
-printf("n = %s\n", document["n"].IsNull() ? "null" : "?");
-~~~~~~~~~~
-
-~~~~~~~~~~
-null
-~~~~~~~~~~
-
-JSON Number类型表示所有数值。然而,C++需è¦ä½¿ç”¨æ›´ä¸“门的类型。
-
-~~~~~~~~~~cpp
-assert(document["i"].IsNumber());
-
-// 在此情况下,IsUint()/IsInt64()/IsUInt64()也会返回 true
-assert(document["i"].IsInt());
-printf("i = %d\n", document["i"].GetInt());
-// å¦ä¸€ç§ç”¨æ³•: (int)document["i"]
-
-assert(document["pi"].IsNumber());
-assert(document["pi"].IsDouble());
-printf("pi = %g\n", document["pi"].GetDouble());
-~~~~~~~~~~
-
-~~~~~~~~~~
-i = 123
-pi = 3.1416
-~~~~~~~~~~
-
-JSON Array包å«ä¸€äº›å…ƒç´ ã€‚
-~~~~~~~~~~cpp
-// 使用引用æ¥è¿žç»­è®¿é—®ï¼Œæ–¹ä¾¿ä¹‹ä½™è¿˜æ›´é«˜æ•ˆã€‚
-const Value& a = document["a"];
-assert(a.IsArray());
-for (SizeType i = 0; i < a.Size(); i++) // 使用 SizeType è€Œä¸æ˜¯ size_t
- printf("a[%d] = %d\n", i, a[i].GetInt());
-~~~~~~~~~~
-
-~~~~~~~~~~
-a[0] = 1
-a[1] = 2
-a[2] = 3
-a[3] = 4
-~~~~~~~~~~
-
-注æ„,RapidJSONå¹¶ä¸è‡ªåŠ¨è½¬æ¢å„ç§JSON类型。例如,对一个Stringçš„Value调用`GetInt()`æ˜¯éžæ³•的。在调试模å¼ä¸‹ï¼Œå®ƒä¼šè¢«æ–­è¨€å¤±è´¥ã€‚在å‘布模å¼ä¸‹ï¼Œå…¶è¡Œä¸ºæ˜¯æœªå®šä¹‰çš„。
-
-以下将会讨论有关查询å„类型的细节。
-
-## 查询Array {#QueryArray}
-
-ç¼ºçœæƒ…况下,`SizeType`是`unsigned`çš„typedef。在多数系统中,Array最多能存储2^32-1个元素。
-
-ä½ å¯ä»¥ç”¨æ•´æ•°å­—é¢é‡è®¿é—®å…ƒç´ ï¼Œå¦‚`a[0]`ã€`a[1]`ã€`a[2]`。
-
-Array与`std::vector`相似,除了使用索引,也å¯ä½¿ç”¨è¿­ä»£å™¨æ¥è®¿é—®æ‰€æœ‰å…ƒç´ ã€‚
-~~~~~~~~~~cpp
-for (Value::ConstValueIterator itr = a.Begin(); itr != a.End(); ++itr)
- printf("%d ", itr->GetInt());
-~~~~~~~~~~
-
-还有一些熟悉的查询函数:
-* `SizeType Capacity() const`
-* `bool Empty() const`
-
-## 查询Object {#QueryObject}
-
-å’ŒArray相似,我们å¯ä»¥ç”¨è¿­ä»£å™¨åŽ»è®¿é—®æ‰€æœ‰Objectæˆå‘˜ï¼š
-
-~~~~~~~~~~cpp
-static const char* kTypeNames[] =
- { "Null", "False", "True", "Object", "Array", "String", "Number" };
-
-for (Value::ConstMemberIterator itr = document.MemberBegin();
- itr != document.MemberEnd(); ++itr)
-{
- printf("Type of member %s is %s\n",
- itr->name.GetString(), kTypeNames[itr->value.GetType()]);
-}
-~~~~~~~~~~
-
-~~~~~~~~~~
-Type of member hello is String
-Type of member t is True
-Type of member f is False
-Type of member n is Null
-Type of member i is Number
-Type of member pi is Number
-Type of member a is Array
-~~~~~~~~~~
-
-注æ„,当`operator[](const char*)`找ä¸åˆ°æˆå‘˜ï¼Œå®ƒä¼šæ–­è¨€å¤±è´¥ã€‚
-
-若我们ä¸ç¡®å®šä¸€ä¸ªæˆå‘˜æ˜¯å¦å­˜åœ¨ï¼Œä¾¿éœ€è¦åœ¨è°ƒç”¨`operator[](const char*)`å‰å…ˆè°ƒç”¨`HasMember()`ã€‚ç„¶è€Œï¼Œè¿™ä¼šå¯¼è‡´ä¸¤æ¬¡æŸ¥æ‰¾ã€‚æ›´å¥½çš„åšæ³•是调用`FindMember()`ï¼Œå®ƒèƒ½åŒæ—¶æ£€æŸ¥æˆå‘˜æ˜¯å¦å­˜åœ¨å¹¶è¿”回它的Value:
-
-~~~~~~~~~~cpp
-Value::ConstMemberIterator itr = document.FindMember("hello");
-if (itr != document.MemberEnd())
- printf("%s %s\n", itr->value.GetString());
-~~~~~~~~~~
-
-## 查询Number {#QueryNumber}
-
-JSONåªæä¾›ä¸€ç§æ•°å€¼ç±»åž‹â”€â”€Number。数字å¯ä»¥æ˜¯æ•´æ•°æˆ–实数。RFC 4627规定数字的范围由解æžå™¨æŒ‡å®šã€‚
-
-由于C++æä¾›å¤šç§æ•´æ•°åŠæµ®ç‚¹æ•°ç±»åž‹ï¼ŒDOMå°è¯•å°½é‡æä¾›æœ€å¹¿çš„èŒƒå›´åŠè‰¯å¥½æ€§èƒ½ã€‚
-
-当解æžä¸€ä¸ªNumberæ—¶, 它会被存储在DOM之中,æˆä¸ºä¸‹åˆ—其中一个类型:
-
-类型 | æè¿°
------------|---------------------------------------
-`unsigned` | 32使— å·æ•´æ•°
-`int` | 32使œ‰å·æ•´æ•°
-`uint64_t` | 64使— å·æ•´æ•°
-`int64_t` | 64使œ‰å·æ•´æ•°
-`double` | 64ä½åŒç²¾åº¦æµ®ç‚¹æ•°
-
-当查询一个Numberæ—¶, ä½ å¯ä»¥æ£€æŸ¥è¯¥æ•°å­—是å¦èƒ½ä»¥ç›®æ ‡ç±»åž‹æ¥æå–:
-
-查检 | æå–
-------------------|---------------------
-`bool IsNumber()` | ä¸é€‚用
-`bool IsUint()` | `unsigned GetUint()`
-`bool IsInt()` | `int GetInt()`
-`bool IsUint64()` | `uint64_t GetUint64()`
-`bool IsInt64()` | `int64_t GetInt64()`
-`bool IsDouble()` | `double GetDouble()`
-
-注æ„,一个整数å¯èƒ½ç”¨å‡ ç§ç±»åž‹æ¥æå–,而无需转æ¢ã€‚例如,一个å为`x`çš„Value包å«123,那么`x.IsInt() == x.IsUint() == x.IsInt64() == x.IsUint64() == true`。但如果一个å为`y`çš„Value包å«-3000000000,那么仅会令`x.IsInt64() == true`。
-
-å½“è¦æå–Number类型,`GetDouble()`æ˜¯ä¼šæŠŠå†…éƒ¨æ•´æ•°çš„è¡¨ç¤ºè½¬æ¢æˆ`double`。注æ„`int` å’Œ`unsigned`å¯ä»¥å®‰å…¨åœ°è½¬æ¢è‡³`double`,但`int64_t`åŠ`uint64_t`å¯èƒ½ä¼šä¸§å¤±ç²¾åº¦ï¼ˆå› ä¸º`double`çš„å°¾æ•°åªæœ‰52ä½ï¼‰ã€‚
-
-## 查询String {#QueryString}
-
-除了`GetString()`,`Value`类也有一个`GetStringLength()`。这里会解释个中原因。
-
-æ ¹æ®RFC 4627,JSON Stringå¯åŒ…å«Unicode字符`U+0000`,在JSON中会表示为`"\u0000"`。问题是,C/C++通常使用空字符结尾字符串(null-terminated string),这ç§å­—符串把``\0'`作为结æŸç¬¦å·ã€‚
-
-为了符åˆRFC 4627,RapidJSON支æŒåŒ…å«`U+0000`çš„String。若你需è¦å¤„ç†è¿™äº›String,便å¯ä½¿ç”¨`GetStringLength()`去获得正确的字符串长度。
-
-例如,当解æžä»¥ä¸‹çš„JSON至`Document d`之åŽï¼š
-
-~~~~~~~~~~js
-{ "s" : "a\u0000b" }
-~~~~~~~~~~
-`"a\u0000b"`值的正确长度应该是3。但`strlen()`会返回1。
-
-`GetStringLength()`也å¯ä»¥æé«˜æ€§èƒ½ï¼Œå› ä¸ºç”¨æˆ·å¯èƒ½éœ€è¦è°ƒç”¨`strlen()`去分é…缓冲。
-
-此外,`std::string`也支æŒè¿™ä¸ªæž„造函数:
-
-~~~~~~~~~~cpp
-string(const char* s, size_t count);
-~~~~~~~~~~
-
-此构造函数接å—å­—ç¬¦ä¸²é•¿åº¦ä½œä¸ºå‚æ•°ã€‚它支æŒåœ¨å­—符串中存储空字符,也应该会有更好的性能。
-
-## 比较两个Value
-
-ä½ å¯ä½¿ç”¨`==`åŠ`!=`去比较两个Value。当且仅当两个Value的类型åŠå†…容相åŒï¼Œå®ƒä»¬æ‰å½“作相等。你也å¯ä»¥æ¯”较Value和它的原生类型值。以下是一个例å­ã€‚
-
-~~~~~~~~~~cpp
-if (document["hello"] == document["n"]) /*...*/; // 比较两个值
-if (document["hello"] == "world") /*...*/; // 与字符串家é¢é‡ä½œæ¯”较
-if (document["i"] != 123) /*...*/; // 与整数作比较
-if (document["pi"] != 3.14) /*...*/; // 与double作比较
-~~~~~~~~~~
-
-Arrayï¼Object顺åºä»¥å®ƒä»¬çš„å…ƒç´ ï¼æˆå‘˜ä½œæ¯”è¾ƒã€‚å½“ä¸”ä»…å½“å®ƒä»¬çš„æ•´ä¸ªå­æ ‘相等,它们æ‰å½“作相等。
-
-注æ„,现时若一个Object嫿œ‰é‡å¤å‘½åçš„æˆå‘˜ï¼Œå®ƒä¸Žä»»ä½•Object作比较都总会返回`false`。
-
-# 创建ï¼ä¿®æ”¹å€¼ {#CreateModifyValues}
-
-æœ‰å¤šç§æ–¹æ³•去创建值。 当一个DOM树被创建或修改åŽï¼Œå¯ä½¿ç”¨`Writer`冿¬¡å­˜å‚¨ä¸ºJSON。
-
-## 改å˜Value类型 {#ChangeValueType}
-当使用默认构造函数创建一个Value或Document,它的类型便会是Nullã€‚è¦æ”¹å˜å…¶ç±»åž‹ï¼Œéœ€è°ƒç”¨`SetXXX()`或赋值æ“作,例如:
-
-~~~~~~~~~~cpp
-Document d; // Null
-d.SetObject();
-
-Value v; // Null
-v.SetInt(10);
-v = 10; // 简写,和上é¢çš„相åŒ
-~~~~~~~~~~
-
-### 构造函数的å„个é‡è½½
-几个类型也有é‡è½½æž„造函数:
-
-~~~~~~~~~~cpp
-Value b(true); // 调用Value(bool)
-Value i(-123); // 调用 Value(int)
-Value u(123u); // 调用Value(unsigned)
-Value d(1.5); // 调用Value(double)
-~~~~~~~~~~
-
-è¦é‡å»ºç©ºObject或Array,å¯åœ¨é»˜è®¤æž„造函数åŽä½¿ç”¨ `SetObject()`/`SetArray()`,或一次性使用`Value(Type)`:
-
-~~~~~~~~~~cpp
-Value o(kObjectType);
-Value a(kArrayType);
-~~~~~~~~~~
-
-## 转移语æ„(Move Semantics) {#MoveSemantics}
-
-在设计RapidJSON时有一个éžå¸¸ç‰¹åˆ«çš„决定,就是Valueèµ‹å€¼å¹¶ä¸æ˜¯æŠŠæ¥æºValueå¤åˆ¶è‡³ç›®çš„Valueï¼Œè€Œæ˜¯æŠŠæŠŠæ¥æºValue转移(move)至目的Value。例如:
-
-~~~~~~~~~~cpp
-Value a(123);
-Value b(456);
-b = a; // aå˜æˆNull,bå˜æˆæ•°å­—123。
-~~~~~~~~~~
-
-![使用移动语æ„赋值。](diagram/move1.png)
-
-ä¸ºä»€ä¹ˆï¼Ÿæ­¤è¯­æ„æœ‰ä½•优点?
-
-最简å•的答案就是性能。对于固定大å°çš„JSON类型(Numberã€Trueã€Falseã€Null),å¤åˆ¶å®ƒä»¬æ˜¯ç®€å•å¿«æ·ã€‚然而,对于å¯å˜å¤§å°çš„JSON类型(Stringã€Arrayã€Object),å¤åˆ¶å®ƒä»¬ä¼šäº§ç”Ÿå¤§é‡å¼€é”€ï¼Œè€Œä¸”这些开销常常ä¸è¢«å¯Ÿè§‰ã€‚尤其是当我们需è¦åˆ›å»ºä¸´æ—¶Object,把它å¤åˆ¶è‡³å¦ä¸€å˜é‡ï¼Œç„¶åŽå†æžæž„它。
-
-例如,若使用正常*å¤åˆ¶*语æ„:
-
-~~~~~~~~~~cpp
-Value o(kObjectType);
-{
- Value contacts(kArrayType);
- // 把元素加进contacts数组。
- // ...
- o.AddMember("contacts", contacts, d.GetAllocator()); // 深度å¤åˆ¶contacts (å¯èƒ½æœ‰å¤§é‡å†…存分é…)
- // æžæž„contacts。
-}
-~~~~~~~~~~
-
-![å¤åˆ¶è¯­æ„产生大é‡çš„å¤åˆ¶æ“作。](diagram/move2.png)
-
-那个`o` Object需è¦åˆ†é…一个和contacts相åŒå¤§å°çš„缓冲区,对conactsåšæ·±åº¦å¤åˆ¶ï¼Œå¹¶æœ€ç»ˆè¦æžæž„contactsã€‚è¿™æ ·ä¼šäº§ç”Ÿå¤§é‡æ— å¿…è¦çš„内存分é…ï¼é‡Šæ”¾ï¼Œä»¥åŠå†…å­˜å¤åˆ¶ã€‚
-
-有一些方案å¯é¿å…实质地å¤åˆ¶è¿™äº›æ•°æ®ï¼Œä¾‹å¦‚引用计数(reference counting)ã€åžƒåœ¾å›žæ”¶ï¼ˆgarbage collection, GC)。
-
-为了使RapidJSON简å•åŠå¿«é€Ÿï¼Œæˆ‘们选择了对赋值采用*转移*语æ„。这方法与`std::auto_ptr`相似,都是在赋值时转移拥有æƒã€‚转移快得多简å•得多,åªéœ€è¦æžæž„原æ¥çš„Valueï¼ŒæŠŠæ¥æº`memcpy()`è‡³ç›®æ ‡ï¼Œæœ€åŽæŠŠæ¥æºè®¾ç½®ä¸ºNull类型。
-
-因此,使用转移语æ„åŽï¼Œä¸Šé¢çš„例å­å˜æˆï¼š
-
-~~~~~~~~~~cpp
-Value o(kObjectType);
-{
- Value contacts(kArrayType);
- // adding elements to contacts array.
- o.AddMember("contacts", contacts, d.GetAllocator()); // åªéœ€ memcpy() contacts本身至新æˆå‘˜çš„Value(16字节)
- // contactsåœ¨è¿™é‡Œå˜æˆNullã€‚å®ƒçš„æžæž„是平凡的。
-}
-~~~~~~~~~~
-
-![转移语æ„ä¸éœ€å¤åˆ¶ã€‚](diagram/move3.png)
-
-在C++11中这称为转移赋值æ“作(move assignment operator)。由于RapidJSON 支æŒC++03,它在赋值æ“作采用转移语æ„,其它修改形函数如`AddMember()`, `PushBack()`也采用转移语æ„。
-
-### 转移语æ„åŠä¸´æ—¶å€¼ {#TemporaryValues}
-
-有时候,我们想直接构造一个Value并传递给一个“转移â€å‡½æ•°ï¼ˆå¦‚`PushBack()`ã€`AddMember()`)。由于临时对象是ä¸èƒ½è½¬æ¢ä¸ºæ­£å¸¸çš„Value引用,我们加入了一个方便的`Move()`函数:
-
-~~~~~~~~~~cpp
-Value a(kArrayType);
-Document::AllocatorType& allocator = document.GetAllocator();
-// a.PushBack(Value(42), allocator); // ä¸èƒ½é€šè¿‡ç¼–译
-a.PushBack(Value().SetInt(42), allocator); // fluent API
-a.PushBack(Value(42).Move(), allocator); // 和上一行相åŒ
-~~~~~~~~~~
-
-## 创建String {#CreateString}
-RapidJSONæä¾›ä¸¤ä¸ªString的存储策略。
-
-1. copy-string: 分é…ç¼“å†²åŒºï¼Œç„¶åŽæŠŠæ¥æºæ•°æ®å¤åˆ¶è‡³å®ƒã€‚
-2. const-string: 简å•地储存字符串的指针。
-
-Copy-string总是安全的,因为它拥有数æ®çš„克隆。Const-stringå¯ç”¨äºŽå­˜å‚¨å­—符串字é¢é‡ï¼Œä»¥åŠç”¨äºŽåœ¨DOM一节中将会æåˆ°çš„in-situè§£æžä¸­ã€‚
-
-ä¸ºäº†è®©ç”¨æˆ·è‡ªå®šä¹‰å†…å­˜åˆ†é…æ–¹å¼ï¼Œå½“一个æ“作å¯èƒ½éœ€è¦å†…å­˜åˆ†é…æ—¶ï¼ŒRapidJSONè¦æ±‚用户传递一个allocator实例作为API傿•°ã€‚此设计é¿å…了在æ¯ä¸ªValue存储allocator(或document)的指针。
-
-因此,当我们把一个copy-string赋值时, è°ƒç”¨å«æœ‰allocatorçš„`SetString()`é‡è½½å‡½æ•°ï¼š
-
-~~~~~~~~~~cpp
-Document document;
-Value author;
-char buffer[10];
-int len = sprintf(buffer, "%s %s", "Milo", "Yip"); // 动æ€åˆ›å»ºçš„字符串。
-author.SetString(buffer, len, document.GetAllocator());
-memset(buffer, 0, sizeof(buffer));
-// 清空bufferåŽauthor.GetString() ä»ç„¶åŒ…å« "Milo Yip"
-~~~~~~~~~~
-
-在此例å­ä¸­ï¼Œæˆ‘们使用`Document`实例的allocator。这是使用RapidJSON时常用的惯用法。但你也å¯ä»¥ç”¨å…¶ä»–allocator实例。
-
-å¦å¤–,上é¢çš„`SetString()`需è¦é•¿åº¦å‚数。这个API能处ç†å«æœ‰ç©ºå­—符的字符串。å¦ä¸€ä¸ª`SetString()`é‡è½½å‡½æ•°æ²¡æœ‰é•¿åº¦å‚数,它å‡è®¾è¾“入是空字符结尾的,并会调用类似`strlen()`的函数去获å–长度。
-
-最åŽï¼Œå¯¹äºŽå­—符串字é¢é‡æˆ–有安全生命周期的字符串,å¯ä»¥ä½¿ç”¨const-string版本的`SetString()`,它没有allocator傿•°ã€‚对于字符串家é¢é‡ï¼ˆæˆ–字符数组常é‡ï¼‰ï¼Œåªéœ€ç®€å•地传递字é¢é‡ï¼Œåˆå®‰å…¨åˆé«˜æ•ˆï¼š
-
-~~~~~~~~~~cpp
-Value s;
-s.SetString("rapidjson"); // å¯åŒ…å«ç©ºå­—ç¬¦ï¼Œé•¿åº¦åœ¨ç¼–è¯‘èæŽ¨å¯¼
-s = "rapidjson"; // 上行的缩写
-~~~~~~~~~~
-
-对于字符指针,RapidJSON需è¦ä½œä¸€ä¸ªæ ‡è®°ï¼Œä»£è¡¨å®ƒä¸å¤åˆ¶ä¹Ÿæ˜¯å®‰å…¨çš„。å¯ä»¥ä½¿ç”¨`StringRef`函数:
-
-~~~~~~~~~cpp
-const char * cstr = getenv("USER");
-size_t cstr_len = ...; // 如果有长度
-Value s;
-// s.SetString(cstr); // è¿™ä¸èƒ½é€šè¿‡ç¼–译
-s.SetString(StringRef(cstr)); // å¯ä»¥ï¼Œå‡è®¾å®ƒçš„生命周期案全,并且是以空字符结尾的
-s = StringRef(cstr); // 上行的缩写
-s.SetString(StringRef(cstr, cstr_len));// 更快,å¯å¤„ç†ç©ºå­—符
-s = StringRef(cstr, cstr_len); // 上行的缩写
-
-~~~~~~~~~
-
-## 修改Array {#ModifyArray}
-Array类型的Valueæä¾›ä¸Ž`std::vector`相似的API。
-
-* `Clear()`
-* `Reserve(SizeType, Allocator&)`
-* `Value& PushBack(Value&, Allocator&)`
-* `template <typename T> GenericValue& PushBack(T, Allocator&)`
-* `Value& PopBack()`
-* `ValueIterator Erase(ConstValueIterator pos)`
-* `ValueIterator Erase(ConstValueIterator first, ConstValueIterator last)`
-
-注æ„,`Reserve(...)`åŠ`PushBack(...)`å¯èƒ½ä¼šä¸ºæ•°ç»„元素分é…内存,所以需è¦ä¸€ä¸ªallocator。
-
-以下是`PushBack()`的例å­ï¼š
-
-~~~~~~~~~~cpp
-Value a(kArrayType);
-Document::AllocatorType& allocator = document.GetAllocator();
-
-for (int i = 5; i <= 10; i++)
- a.PushBack(i, allocator); // å¯èƒ½éœ€è¦è°ƒç”¨realloc()所以需è¦allocator
-
-// æµç•…接å£ï¼ˆFluent interface)
-a.PushBack("Lua", allocator).PushBack("Mio", allocator);
-~~~~~~~~~~
-
-与STLä¸ä¸€æ ·çš„æ˜¯ï¼Œ`PushBack()`/`PopBack()`返回Array本身的引用。这称为æµç•…接å£ï¼ˆ_fluent interface_)。
-
-如果你想在Array中加入一个éžå¸¸é‡å­—符串,或是一个没有足够生命周期的字符串(è§[Create String](#CreateString)),你需è¦ä½¿ç”¨copy-string API去创建一个String。为了é¿å…加入中间å˜é‡ï¼Œå¯ä»¥å°±åœ°ä½¿ç”¨ä¸€ä¸ª[临时值](#TemporaryValues):
-
-~~~~~~~~~~cpp
-// 就地Value傿•°
-contact.PushBack(Value("copy", document.GetAllocator()).Move(), // copy string
- document.GetAllocator());
-
-// 显å¼Value傿•°
-Value val("key", document.GetAllocator()); // copy string
-contact.PushBack(val, document.GetAllocator());
-~~~~~~~~~~
-
-## 修改Object {#ModifyObject}
-Object是键值对的集åˆã€‚æ¯ä¸ªé”®å¿…须为String。è¦ä¿®æ”¹Object,方法是增加或移除æˆå‘˜ã€‚以下的API用æ¥å¢žåŠ åŸŽå‘˜ï¼š
-
-* `Value& AddMember(Value&, Value&, Allocator& allocator)`
-* `Value& AddMember(StringRefType, Value&, Allocator&)`
-* `template <typename T> Value& AddMember(StringRefType, T value, Allocator&)`
-
-以下是一个例å­ã€‚
-
-~~~~~~~~~~cpp
-Value contact(kObject);
-contact.AddMember("name", "Milo", document.GetAllocator());
-contact.AddMember("married", true, document.GetAllocator());
-~~~~~~~~~~
-
-使用`StringRefType`作为name傿•°çš„é‡è½½ç‰ˆæœ¬ä¸Žå­—符串的`SetString`的接å£ç›¸ä¼¼ã€‚ 这些é‡è½½æ˜¯ä¸ºäº†é¿å…å¤åˆ¶`name`字符串,因为JSON object中ç»å¸¸ä¼šä½¿ç”¨å¸¸æ•°é”®å。
-
-如果你需è¦ä»Žéžå¸¸æ•°å­—符串或生命周期ä¸è¶³çš„字符串创建键å(è§[创建String](#CreateString)),你需è¦ä½¿ç”¨copy-string API。为了é¿å…中间å˜é‡ï¼Œå¯ä»¥å°±åœ°ä½¿ç”¨[临时值](#TemporaryValues):
-
-~~~~~~~~~~cpp
-// 就地Value傿•°
-contact.AddMember(Value("copy", document.GetAllocator()).Move(), // copy string
- Value().Move(), // null value
- document.GetAllocator());
-
-// 显å¼å‚æ•°
-Value key("key", document.GetAllocator()); // copy string name
-Value val(42); // æŸValue
-contact.AddMember(key, val, document.GetAllocator());
-~~~~~~~~~~
-
-移除æˆå‘˜æœ‰å‡ ä¸ªé€‰æ‹©ï¼š
-
-* `bool RemoveMember(const Ch* name)`ï¼šä½¿ç”¨é”®åæ¥ç§»é™¤æˆå‘˜ï¼ˆçº¿æ€§æ—¶é—´å¤æ‚度)。
-* `bool RemoveMember(const Value& name)`:除了`name`是一个Value,和上一行相åŒã€‚
-* `MemberIterator RemoveMember(MemberIterator)`:使用迭代器移除æˆå‘˜ï¼ˆ_常数_æ—¶é—´å¤æ‚度)。
-* `MemberIterator EraseMember(MemberIterator)`ï¼šå’Œä¸Šè¡Œç›¸ä¼¼ä½†ç»´æŒæˆå‘˜æ¬¡åºï¼ˆçº¿æ€§æ—¶é—´å¤æ‚度)。
-* `MemberIterator EraseMember(MemberIterator first, MemberIterator last)`:移除一个范围内的æˆå‘˜ï¼Œç»´æŒæ¬¡åºï¼ˆçº¿æ€§æ—¶é—´å¤æ‚度)。
-
-`MemberIterator RemoveMember(MemberIterator)`使用了“转移最åŽâ€æ‰‹æ³•æ¥è¾¾æˆå¸¸æ•°æ—¶é—´å¤æ‚åº¦ã€‚åŸºæœ¬ä¸Šå°±æ˜¯æžæž„迭代器ä½ç½®çš„æˆå‘˜ï¼Œç„¶åŽæŠŠæœ€åŽçš„æˆå‘˜è½¬ç§»è‡³è¿­ä»£å™¨ä½ç½®ã€‚因此,æˆå‘˜çš„æ¬¡åºä¼šè¢«æ”¹å˜ã€‚
-
-## æ·±å¤åˆ¶Value {#DeepCopyValue}
-若我们真的è¦å¤åˆ¶ä¸€ä¸ªDOM树,我们å¯ä½¿ç”¨ä¸¤ä¸ªAPIs作深å¤åˆ¶ï¼šå«allocator的构造函数åŠ`CopyFrom()`。
-
-~~~~~~~~~~cpp
-Document d;
-Document::AllocatorType& a = d.GetAllocator();
-Value v1("foo");
-// Value v2(v1); // ä¸å®¹è®¸
-
-Value v2(v1, a); // 制造一个克隆
-assert(v1.IsString()); // v1ä¸å˜
-d.SetArray().PushBack(v1, a).PushBack(v2, a);
-assert(v1.IsNull() && v2.IsNull()); // 两个都转移动d
-
-v2.CopyFrom(d, a); // 把整个documentå¤åˆ¶è‡³v2
-assert(d.IsArray() && d.Size() == 2); // dä¸å˜
-v1.SetObject().AddMember("array", v2, a);
-d.PushBack(v1, a);
-~~~~~~~~~~
-
-## 交æ¢Value {#SwapValues}
-
-RapidJSON也æä¾›`Swap()`。
-
-~~~~~~~~~~cpp
-Value a(123);
-Value b("Hello");
-a.Swap(b);
-assert(a.IsString());
-assert(b.IsInt());
-~~~~~~~~~~
-
-无论两棵DOMæ ‘æœ‰å¤šå¤æ‚ï¼Œäº¤æ¢æ˜¯å¾ˆå¿«çš„(常数时间)。
-
-# 下一部分 {#WhatsNext}
-
-本教程展示了如何询查åŠä¿®æ”¹DOM树。RapidJSON还有一个é‡è¦æ¦‚念:
-
-1. [æµ](doc/stream.zh-cn.md) 是读写JSON的通é“。æµå¯ä»¥æ˜¯å†…å­˜å­—ç¬¦ä¸²ã€æ–‡ä»¶æµç­‰ã€‚用户也å¯ä»¥è‡ªå®šä¹‰æµã€‚
-2. [ç¼–ç ](doc/encoding.zh-cn.md)å®šä¹‰åœ¨æµæˆ–内存中使用的字符编ç ã€‚RapidJSON也在内部æä¾›Unicode转æ¢åŠæ ¡éªŒåŠŸèƒ½ã€‚
-3. [DOM](doc/dom.zh-cn.md)的基本功能已在本教程里介ç»ã€‚还有更高级的功能,如原ä½ï¼ˆ*in situ*)解æžã€å…¶ä»–è§£æžé€‰é¡¹åŠé«˜çº§ç”¨æ³•。
-4. [SAX](doc/sax.zh-cn.md) 是RapidJSONè§£æžï¼ç”ŸæˆåŠŸèƒ½çš„åŸºç¡€ã€‚å­¦ä¹ ä½¿ç”¨`Reader`/`Writer`去实现更高性能的应用程åºã€‚也å¯ä»¥ä½¿ç”¨`PrettyWriter`去格å¼åŒ–JSON。
-5. [性能](doc/performance.zh-cn.md)展示一些我们åšçš„åŠç¬¬ä¸‰æ–¹çš„æ€§èƒ½æµ‹è¯•。
-6. [技术内幕](doc/internals.zh-cn.md)讲述一些RapidJSONå†…éƒ¨çš„è®¾è®¡åŠæŠ€æœ¯ã€‚
-
-你也å¯ä»¥å‚考[常è§é—®é¢˜](faq.zh-cn.md)ã€API文档ã€ä¾‹å­åŠå•元测试。
diff --git a/3rdparty/rapidjson/example/CMakeLists.txt b/3rdparty/rapidjson/example/CMakeLists.txt
deleted file mode 100644
index c6b8449ffb1..00000000000
--- a/3rdparty/rapidjson/example/CMakeLists.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright (c) 2011 Milo Yip (miloyip@gmail.com)
-# Copyright (c) 2013 Rafal Jeczalik (rjeczalik@gmail.com)
-# Distributed under the MIT License (see license.txt file)
-cmake_minimum_required(VERSION 2.8)
-
-set(EXAMPLES
- capitalize
- condense
- jsonx
- messagereader
- pretty
- prettyauto
- schemavalidator
- serialize
- simpledom
- simplereader
- simplewriter
- tutorial)
-
-include_directories("../include/")
-
-add_definitions(-D__STDC_FORMAT_MACROS)
-
-if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -Weffc++ -Wswitch-default")
-elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -Weffc++ -Wswitch-default -Wfloat-equal -Wimplicit-fallthrough -Weverything")
-elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
- add_definitions(-D_CRT_SECURE_NO_WARNINGS=1)
-endif()
-
-foreach (example ${EXAMPLES})
- add_executable(${example} ${example}/${example}.cpp)
-endforeach()
-
-add_custom_target(examples ALL DEPENDS ${EXAMPLES})
diff --git a/3rdparty/rapidjson/example/capitalize/capitalize.cpp b/3rdparty/rapidjson/example/capitalize/capitalize.cpp
deleted file mode 100644
index adc32b52da1..00000000000
--- a/3rdparty/rapidjson/example/capitalize/capitalize.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-// JSON condenser example
-
-// This example parses JSON from stdin with validation,
-// and re-output the JSON content to stdout with all string capitalized, and without whitespace.
-
-#include "rapidjson/reader.h"
-#include "rapidjson/writer.h"
-#include "rapidjson/filereadstream.h"
-#include "rapidjson/filewritestream.h"
-#include "rapidjson/error/en.h"
-#include <vector>
-#include <cctype>
-
-using namespace rapidjson;
-
-template<typename OutputHandler>
-struct CapitalizeFilter {
- CapitalizeFilter(OutputHandler& out) : out_(out), buffer_() {}
-
- bool Null() { return out_.Null(); }
- bool Bool(bool b) { return out_.Bool(b); }
- bool Int(int i) { return out_.Int(i); }
- bool Uint(unsigned u) { return out_.Uint(u); }
- bool Int64(int64_t i) { return out_.Int64(i); }
- bool Uint64(uint64_t u) { return out_.Uint64(u); }
- bool Double(double d) { return out_.Double(d); }
- bool String(const char* str, SizeType length, bool) {
- buffer_.clear();
- for (SizeType i = 0; i < length; i++)
- buffer_.push_back(static_cast<char>(std::toupper(str[i])));
- return out_.String(&buffer_.front(), length, true); // true = output handler need to copy the string
- }
- bool StartObject() { return out_.StartObject(); }
- bool Key(const char* str, SizeType length, bool copy) { return String(str, length, copy); }
- bool EndObject(SizeType memberCount) { return out_.EndObject(memberCount); }
- bool StartArray() { return out_.StartArray(); }
- bool EndArray(SizeType elementCount) { return out_.EndArray(elementCount); }
-
- OutputHandler& out_;
- std::vector<char> buffer_;
-
-private:
- CapitalizeFilter(const CapitalizeFilter&);
- CapitalizeFilter& operator=(const CapitalizeFilter&);
-};
-
-int main(int, char*[]) {
- // Prepare JSON reader and input stream.
- Reader reader;
- char readBuffer[65536];
- FileReadStream is(stdin, readBuffer, sizeof(readBuffer));
-
- // Prepare JSON writer and output stream.
- char writeBuffer[65536];
- FileWriteStream os(stdout, writeBuffer, sizeof(writeBuffer));
- Writer<FileWriteStream> writer(os);
-
- // JSON reader parse from the input stream and let writer generate the output.
- CapitalizeFilter<Writer<FileWriteStream> > filter(writer);
- if (!reader.Parse(is, filter)) {
- fprintf(stderr, "\nError(%u): %s\n", static_cast<unsigned>(reader.GetErrorOffset()), GetParseError_En(reader.GetParseErrorCode()));
- return 1;
- }
-
- return 0;
-}
diff --git a/3rdparty/rapidjson/example/condense/condense.cpp b/3rdparty/rapidjson/example/condense/condense.cpp
deleted file mode 100644
index 46dc3504397..00000000000
--- a/3rdparty/rapidjson/example/condense/condense.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-// JSON condenser example
-
-// This example parses JSON text from stdin with validation,
-// and re-output the JSON content to stdout without whitespace.
-
-#include "rapidjson/reader.h"
-#include "rapidjson/writer.h"
-#include "rapidjson/filereadstream.h"
-#include "rapidjson/filewritestream.h"
-#include "rapidjson/error/en.h"
-
-using namespace rapidjson;
-
-int main(int, char*[]) {
- // Prepare JSON reader and input stream.
- Reader reader;
- char readBuffer[65536];
- FileReadStream is(stdin, readBuffer, sizeof(readBuffer));
-
- // Prepare JSON writer and output stream.
- char writeBuffer[65536];
- FileWriteStream os(stdout, writeBuffer, sizeof(writeBuffer));
- Writer<FileWriteStream> writer(os);
-
- // JSON reader parse from the input stream and let writer generate the output.
- if (!reader.Parse(is, writer)) {
- fprintf(stderr, "\nError(%u): %s\n", static_cast<unsigned>(reader.GetErrorOffset()), GetParseError_En(reader.GetParseErrorCode()));
- return 1;
- }
-
- return 0;
-}
diff --git a/3rdparty/rapidjson/example/jsonx/jsonx.cpp b/3rdparty/rapidjson/example/jsonx/jsonx.cpp
deleted file mode 100644
index c253ac096df..00000000000
--- a/3rdparty/rapidjson/example/jsonx/jsonx.cpp
+++ /dev/null
@@ -1,200 +0,0 @@
-// JSON to JSONx conversion exmaple, using SAX API.
-// JSONx is an IBM standard format to represent JSON as XML.
-// https://www-01.ibm.com/support/knowledgecenter/SS9H2Y_7.1.0/com.ibm.dp.doc/json_jsonx.html
-// This example parses JSON text from stdin with validation,
-// and convert to JSONx format to stdout.
-// Need compile with -D__STDC_FORMAT_MACROS for defining PRId64 and PRIu64 macros.
-
-#include "rapidjson/reader.h"
-#include "rapidjson/stringbuffer.h"
-#include "rapidjson/filereadstream.h"
-#include "rapidjson/filewritestream.h"
-#include "rapidjson/error/en.h"
-#include <cstdio>
-
-using namespace rapidjson;
-
-// For simplicity, this example only read/write in UTF-8 encoding
-template <typename OutputStream>
-class JsonxWriter {
-public:
- JsonxWriter(OutputStream& os) : os_(os), name_(), level_(0), hasName_(false) {
- }
-
- bool Null() {
- return WriteStartElement("null", true);
- }
-
- bool Bool(bool b) {
- return
- WriteStartElement("boolean") &&
- WriteString(b ? "true" : "false") &&
- WriteEndElement("boolean");
- }
-
- bool Int(int i) {
- char buffer[12];
- return WriteNumberElement(buffer, sprintf(buffer, "%d", i));
- }
-
- bool Uint(unsigned i) {
- char buffer[11];
- return WriteNumberElement(buffer, sprintf(buffer, "%u", i));
- }
-
- bool Int64(int64_t i) {
- char buffer[21];
- return WriteNumberElement(buffer, sprintf(buffer, "%" PRId64, i));
- }
-
- bool Uint64(uint64_t i) {
- char buffer[21];
- return WriteNumberElement(buffer, sprintf(buffer, "%" PRIu64, i));
- }
-
- bool Double(double d) {
- char buffer[30];
- return WriteNumberElement(buffer, sprintf(buffer, "%.17g", d));
- }
-
- bool String(const char* str, SizeType length, bool) {
- return
- WriteStartElement("string") &&
- WriteEscapedText(str, length) &&
- WriteEndElement("string");
- }
-
- bool StartObject() {
- return WriteStartElement("object");
- }
-
- bool Key(const char* str, SizeType length, bool) {
- // backup key to name_
- name_.Clear();
- for (SizeType i = 0; i < length; i++)
- name_.Put(str[i]);
- hasName_ = true;
- return true;
- }
-
- bool EndObject(SizeType) {
- return WriteEndElement("object");
- }
-
- bool StartArray() {
- return WriteStartElement("array");
- }
-
- bool EndArray(SizeType) {
- return WriteEndElement("array");
- }
-
-private:
- bool WriteString(const char* s) {
- while (*s)
- os_.Put(*s++);
- return true;
- }
-
- bool WriteEscapedAttributeValue(const char* s, size_t length) {
- for (size_t i = 0; i < length; i++) {
- switch (s[i]) {
- case '&': WriteString("&amp;"); break;
- case '<': WriteString("&lt;"); break;
- case '"': WriteString("&quot;"); break;
- default: os_.Put(s[i]); break;
- }
- }
- return true;
- }
-
- bool WriteEscapedText(const char* s, size_t length) {
- for (size_t i = 0; i < length; i++) {
- switch (s[i]) {
- case '&': WriteString("&amp;"); break;
- case '<': WriteString("&lt;"); break;
- default: os_.Put(s[i]); break;
- }
- }
- return true;
- }
-
- bool WriteStartElement(const char* type, bool emptyElement = false) {
- if (level_ == 0)
- if (!WriteString("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"))
- return false;
-
- if (!WriteString("<json:") || !WriteString(type))
- return false;
-
- // For root element, need to add declarations
- if (level_ == 0) {
- if (!WriteString(
- " xsi:schemaLocation=\"http://www.datapower.com/schemas/json jsonx.xsd\""
- " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""
- " xmlns:json=\"http://www.ibm.com/xmlns/prod/2009/jsonx\""))
- return false;
- }
-
- if (hasName_) {
- hasName_ = false;
- if (!WriteString(" name=\"") ||
- !WriteEscapedAttributeValue(name_.GetString(), name_.GetSize()) ||
- !WriteString("\""))
- return false;
- }
-
- if (emptyElement)
- return WriteString("/>");
- else {
- level_++;
- return WriteString(">");
- }
- }
-
- bool WriteEndElement(const char* type) {
- if (!WriteString("</json:") ||
- !WriteString(type) ||
- !WriteString(">"))
- return false;
-
- // For the last end tag, flush the output stream.
- if (--level_ == 0)
- os_.Flush();
-
- return true;
- }
-
- bool WriteNumberElement(const char* buffer, int length) {
- if (!WriteStartElement("number"))
- return false;
- for (int j = 0; j < length; j++)
- os_.Put(buffer[j]);
- return WriteEndElement("number");
- }
-
- OutputStream& os_;
- StringBuffer name_;
- unsigned level_;
- bool hasName_;
-};
-
-int main(int, char*[]) {
- // Prepare JSON reader and input stream.
- Reader reader;
- char readBuffer[65536];
- FileReadStream is(stdin, readBuffer, sizeof(readBuffer));
-
- // Prepare JSON writer and output stream.
- char writeBuffer[65536];
- FileWriteStream os(stdout, writeBuffer, sizeof(writeBuffer));
- JsonxWriter<FileWriteStream> writer(os);
-
- // JSON reader parse from the input stream and let writer generate the output.
- if (!reader.Parse(is, writer)) {
- fprintf(stderr, "\nError(%u): %s\n", static_cast<unsigned>(reader.GetErrorOffset()), GetParseError_En(reader.GetParseErrorCode()));
- return 1;
- }
-
- return 0;
-}
diff --git a/3rdparty/rapidjson/example/messagereader/messagereader.cpp b/3rdparty/rapidjson/example/messagereader/messagereader.cpp
deleted file mode 100644
index 3399bc9400e..00000000000
--- a/3rdparty/rapidjson/example/messagereader/messagereader.cpp
+++ /dev/null
@@ -1,105 +0,0 @@
-// Reading a message JSON with Reader (SAX-style API).
-// The JSON should be an object with key-string pairs.
-
-#include "rapidjson/reader.h"
-#include "rapidjson/error/en.h"
-#include <iostream>
-#include <string>
-#include <map>
-
-using namespace std;
-using namespace rapidjson;
-
-typedef map<string, string> MessageMap;
-
-#if defined(__GNUC__)
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(effc++)
-#endif
-
-#ifdef __clang__
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(switch-enum)
-#endif
-
-struct MessageHandler
- : public BaseReaderHandler<UTF8<>, MessageHandler> {
- MessageHandler() : messages_(), state_(kExpectObjectStart), name_() {}
-
- bool StartObject() {
- switch (state_) {
- case kExpectObjectStart:
- state_ = kExpectNameOrObjectEnd;
- return true;
- default:
- return false;
- }
- }
-
- bool String(const char* str, SizeType length, bool) {
- switch (state_) {
- case kExpectNameOrObjectEnd:
- name_ = string(str, length);
- state_ = kExpectValue;
- return true;
- case kExpectValue:
- messages_.insert(MessageMap::value_type(name_, string(str, length)));
- state_ = kExpectNameOrObjectEnd;
- return true;
- default:
- return false;
- }
- }
-
- bool EndObject(SizeType) { return state_ == kExpectNameOrObjectEnd; }
-
- bool Default() { return false; } // All other events are invalid.
-
- MessageMap messages_;
- enum State {
- kExpectObjectStart,
- kExpectNameOrObjectEnd,
- kExpectValue
- }state_;
- std::string name_;
-};
-
-#if defined(__GNUC__)
-RAPIDJSON_DIAG_POP
-#endif
-
-#ifdef __clang__
-RAPIDJSON_DIAG_POP
-#endif
-
-static void ParseMessages(const char* json, MessageMap& messages) {
- Reader reader;
- MessageHandler handler;
- StringStream ss(json);
- if (reader.Parse(ss, handler))
- messages.swap(handler.messages_); // Only change it if success.
- else {
- ParseErrorCode e = reader.GetParseErrorCode();
- size_t o = reader.GetErrorOffset();
- cout << "Error: " << GetParseError_En(e) << endl;;
- cout << " at offset " << o << " near '" << string(json).substr(o, 10) << "...'" << endl;
- }
-}
-
-int main() {
- MessageMap messages;
-
- const char* json1 = "{ \"greeting\" : \"Hello!\", \"farewell\" : \"bye-bye!\" }";
- cout << json1 << endl;
- ParseMessages(json1, messages);
-
- for (MessageMap::const_iterator itr = messages.begin(); itr != messages.end(); ++itr)
- cout << itr->first << ": " << itr->second << endl;
-
- cout << endl << "Parse a JSON with invalid schema." << endl;
- const char* json2 = "{ \"greeting\" : \"Hello!\", \"farewell\" : \"bye-bye!\", \"foo\" : {} }";
- cout << json2 << endl;
- ParseMessages(json2, messages);
-
- return 0;
-}
diff --git a/3rdparty/rapidjson/example/pretty/pretty.cpp b/3rdparty/rapidjson/example/pretty/pretty.cpp
deleted file mode 100644
index 2feff5d02ea..00000000000
--- a/3rdparty/rapidjson/example/pretty/pretty.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-// JSON pretty formatting example
-// This example can only handle UTF-8. For handling other encodings, see prettyauto example.
-
-#include "rapidjson/reader.h"
-#include "rapidjson/prettywriter.h"
-#include "rapidjson/filereadstream.h"
-#include "rapidjson/filewritestream.h"
-#include "rapidjson/error/en.h"
-
-using namespace rapidjson;
-
-int main(int, char*[]) {
- // Prepare reader and input stream.
- Reader reader;
- char readBuffer[65536];
- FileReadStream is(stdin, readBuffer, sizeof(readBuffer));
-
- // Prepare writer and output stream.
- char writeBuffer[65536];
- FileWriteStream os(stdout, writeBuffer, sizeof(writeBuffer));
- PrettyWriter<FileWriteStream> writer(os);
-
- // JSON reader parse from the input stream and let writer generate the output.
- if (!reader.Parse<kParseValidateEncodingFlag>(is, writer)) {
- fprintf(stderr, "\nError(%u): %s\n", static_cast<unsigned>(reader.GetErrorOffset()), GetParseError_En(reader.GetParseErrorCode()));
- return 1;
- }
-
- return 0;
-}
diff --git a/3rdparty/rapidjson/example/prettyauto/prettyauto.cpp b/3rdparty/rapidjson/example/prettyauto/prettyauto.cpp
deleted file mode 100644
index 1687bae5559..00000000000
--- a/3rdparty/rapidjson/example/prettyauto/prettyauto.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-// JSON pretty formatting example
-// This example can handle UTF-8/UTF-16LE/UTF-16BE/UTF-32LE/UTF-32BE.
-// The input firstly convert to UTF8, and then write to the original encoding with pretty formatting.
-
-#include "rapidjson/reader.h"
-#include "rapidjson/prettywriter.h"
-#include "rapidjson/filereadstream.h"
-#include "rapidjson/filewritestream.h"
-#include "rapidjson/encodedstream.h" // NEW
-#include "rapidjson/error/en.h"
-#ifdef _WIN32
-#include <fcntl.h>
-#include <io.h>
-#endif
-
-using namespace rapidjson;
-
-int main(int, char*[]) {
-#ifdef _WIN32
- // Prevent Windows converting between CR+LF and LF
- _setmode(_fileno(stdin), _O_BINARY); // NEW
- _setmode(_fileno(stdout), _O_BINARY); // NEW
-#endif
-
- // Prepare reader and input stream.
- //Reader reader;
- GenericReader<AutoUTF<unsigned>, UTF8<> > reader; // CHANGED
- char readBuffer[65536];
- FileReadStream is(stdin, readBuffer, sizeof(readBuffer));
- AutoUTFInputStream<unsigned, FileReadStream> eis(is); // NEW
-
- // Prepare writer and output stream.
- char writeBuffer[65536];
- FileWriteStream os(stdout, writeBuffer, sizeof(writeBuffer));
-
-#if 1
- // Use the same Encoding of the input. Also use BOM according to input.
- typedef AutoUTFOutputStream<unsigned, FileWriteStream> OutputStream; // NEW
- OutputStream eos(os, eis.GetType(), eis.HasBOM()); // NEW
- PrettyWriter<OutputStream, UTF8<>, AutoUTF<unsigned> > writer(eos); // CHANGED
-#else
- // You may also use static bound encoding type, such as output to UTF-16LE with BOM
- typedef EncodedOutputStream<UTF16LE<>,FileWriteStream> OutputStream; // NEW
- OutputStream eos(os, true); // NEW
- PrettyWriter<OutputStream, UTF8<>, UTF16LE<> > writer(eos); // CHANGED
-#endif
-
- // JSON reader parse from the input stream and let writer generate the output.
- //if (!reader.Parse<kParseValidateEncodingFlag>(is, writer)) {
- if (!reader.Parse<kParseValidateEncodingFlag>(eis, writer)) { // CHANGED
- fprintf(stderr, "\nError(%u): %s\n", static_cast<unsigned>(reader.GetErrorOffset()), GetParseError_En(reader.GetParseErrorCode()));
- return 1;
- }
-
- return 0;
-}
diff --git a/3rdparty/rapidjson/example/schemavalidator/schemavalidator.cpp b/3rdparty/rapidjson/example/schemavalidator/schemavalidator.cpp
deleted file mode 100644
index ce36ea95f00..00000000000
--- a/3rdparty/rapidjson/example/schemavalidator/schemavalidator.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-// Schema Validator example
-
-// The example validates JSON text from stdin with a JSON schema specified in the argument.
-
-#include "rapidjson/error/en.h"
-#include "rapidjson/filereadstream.h"
-#include "rapidjson/schema.h"
-#include "rapidjson/stringbuffer.h"
-
-using namespace rapidjson;
-
-int main(int argc, char *argv[]) {
- if (argc != 2) {
- fprintf(stderr, "Usage: schemavalidator schema.json < input.json\n");
- return EXIT_FAILURE;
- }
-
- // Read a JSON schema from file into Document
- Document d;
- char buffer[4096];
-
- {
- FILE *fp = fopen(argv[1], "r");
- if (!fp) {
- printf("Schema file '%s' not found\n", argv[1]);
- return -1;
- }
- FileReadStream fs(fp, buffer, sizeof(buffer));
- d.ParseStream(fs);
- if (d.HasParseError()) {
- fprintf(stderr, "Schema file '%s' is not a valid JSON\n", argv[1]);
- fprintf(stderr, "Error(offset %u): %s\n",
- static_cast<unsigned>(d.GetErrorOffset()),
- GetParseError_En(d.GetParseError()));
- fclose(fp);
- return EXIT_FAILURE;
- }
- fclose(fp);
- }
-
- // Then convert the Document into SchemaDocument
- SchemaDocument sd(d);
-
- // Use reader to parse the JSON in stdin, and forward SAX events to validator
- SchemaValidator validator(sd);
- Reader reader;
- FileReadStream is(stdin, buffer, sizeof(buffer));
- if (!reader.Parse(is, validator) && reader.GetParseErrorCode() != kParseErrorTermination) {
- // Schema validator error would cause kParseErrorTermination, which will handle it in next step.
- fprintf(stderr, "Input is not a valid JSON\n");
- fprintf(stderr, "Error(offset %u): %s\n",
- static_cast<unsigned>(reader.GetErrorOffset()),
- GetParseError_En(reader.GetParseErrorCode()));
- }
-
- // Check the validation result
- if (validator.IsValid()) {
- printf("Input JSON is valid.\n");
- return EXIT_SUCCESS;
- }
- else {
- printf("Input JSON is invalid.\n");
- StringBuffer sb;
- validator.GetInvalidSchemaPointer().StringifyUriFragment(sb);
- fprintf(stderr, "Invalid schema: %s\n", sb.GetString());
- fprintf(stderr, "Invalid keyword: %s\n", validator.GetInvalidSchemaKeyword());
- sb.Clear();
- validator.GetInvalidDocumentPointer().StringifyUriFragment(sb);
- fprintf(stderr, "Invalid document: %s\n", sb.GetString());
- return EXIT_FAILURE;
- }
-}
diff --git a/3rdparty/rapidjson/example/serialize/serialize.cpp b/3rdparty/rapidjson/example/serialize/serialize.cpp
deleted file mode 100644
index 12d87151e64..00000000000
--- a/3rdparty/rapidjson/example/serialize/serialize.cpp
+++ /dev/null
@@ -1,173 +0,0 @@
-// Serialize example
-// This example shows writing JSON string with writer directly.
-
-#include "rapidjson/prettywriter.h" // for stringify JSON
-#include <cstdio>
-#include <string>
-#include <vector>
-
-using namespace rapidjson;
-
-class Person {
-public:
- Person(const std::string& name, unsigned age) : name_(name), age_(age) {}
- Person(const Person& rhs) : name_(rhs.name_), age_(rhs.age_) {}
- virtual ~Person();
-
- Person& operator=(const Person& rhs) {
- name_ = rhs.name_;
- age_ = rhs.age_;
- return *this;
- }
-
-protected:
- template <typename Writer>
- void Serialize(Writer& writer) const {
- // This base class just write out name-value pairs, without wrapping within an object.
- writer.String("name");
-#if RAPIDJSON_HAS_STDSTRING
- writer.String(name_);
-#else
- writer.String(name_.c_str(), static_cast<SizeType>(name_.length())); // Supplying length of string is faster.
-#endif
- writer.String("age");
- writer.Uint(age_);
- }
-
-private:
- std::string name_;
- unsigned age_;
-};
-
-Person::~Person() {
-}
-
-class Education {
-public:
- Education(const std::string& school, double GPA) : school_(school), GPA_(GPA) {}
- Education(const Education& rhs) : school_(rhs.school_), GPA_(rhs.GPA_) {}
-
- template <typename Writer>
- void Serialize(Writer& writer) const {
- writer.StartObject();
-
- writer.String("school");
-#if RAPIDJSON_HAS_STDSTRING
- writer.String(school_);
-#else
- writer.String(school_.c_str(), static_cast<SizeType>(school_.length()));
-#endif
-
- writer.String("GPA");
- writer.Double(GPA_);
-
- writer.EndObject();
- }
-
-private:
- std::string school_;
- double GPA_;
-};
-
-class Dependent : public Person {
-public:
- Dependent(const std::string& name, unsigned age, Education* education = 0) : Person(name, age), education_(education) {}
- Dependent(const Dependent& rhs) : Person(rhs), education_(0) { education_ = (rhs.education_ == 0) ? 0 : new Education(*rhs.education_); }
- virtual ~Dependent();
-
- Dependent& operator=(const Dependent& rhs) {
- if (this == &rhs)
- return *this;
- delete education_;
- education_ = (rhs.education_ == 0) ? 0 : new Education(*rhs.education_);
- return *this;
- }
-
- template <typename Writer>
- void Serialize(Writer& writer) const {
- writer.StartObject();
-
- Person::Serialize(writer);
-
- writer.String("education");
- if (education_)
- education_->Serialize(writer);
- else
- writer.Null();
-
- writer.EndObject();
- }
-
-private:
-
- Education *education_;
-};
-
-Dependent::~Dependent() {
- delete education_;
-}
-
-class Employee : public Person {
-public:
- Employee(const std::string& name, unsigned age, bool married) : Person(name, age), dependents_(), married_(married) {}
- Employee(const Employee& rhs) : Person(rhs), dependents_(rhs.dependents_), married_(rhs.married_) {}
- virtual ~Employee();
-
- Employee& operator=(const Employee& rhs) {
- static_cast<Person&>(*this) = rhs;
- dependents_ = rhs.dependents_;
- married_ = rhs.married_;
- return *this;
- }
-
- void AddDependent(const Dependent& dependent) {
- dependents_.push_back(dependent);
- }
-
- template <typename Writer>
- void Serialize(Writer& writer) const {
- writer.StartObject();
-
- Person::Serialize(writer);
-
- writer.String("married");
- writer.Bool(married_);
-
- writer.String(("dependents"));
- writer.StartArray();
- for (std::vector<Dependent>::const_iterator dependentItr = dependents_.begin(); dependentItr != dependents_.end(); ++dependentItr)
- dependentItr->Serialize(writer);
- writer.EndArray();
-
- writer.EndObject();
- }
-
-private:
- std::vector<Dependent> dependents_;
- bool married_;
-};
-
-Employee::~Employee() {
-}
-
-int main(int, char*[]) {
- std::vector<Employee> employees;
-
- employees.push_back(Employee("Milo YIP", 34, true));
- employees.back().AddDependent(Dependent("Lua YIP", 3, new Education("Happy Kindergarten", 3.5)));
- employees.back().AddDependent(Dependent("Mio YIP", 1));
-
- employees.push_back(Employee("Percy TSE", 30, false));
-
- StringBuffer sb;
- PrettyWriter<StringBuffer> writer(sb);
-
- writer.StartArray();
- for (std::vector<Employee>::const_iterator employeeItr = employees.begin(); employeeItr != employees.end(); ++employeeItr)
- employeeItr->Serialize(writer);
- writer.EndArray();
-
- puts(sb.GetString());
-
- return 0;
-}
diff --git a/3rdparty/rapidjson/example/simpledom/simpledom.cpp b/3rdparty/rapidjson/example/simpledom/simpledom.cpp
deleted file mode 100644
index 80384199a92..00000000000
--- a/3rdparty/rapidjson/example/simpledom/simpledom.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-// JSON simple example
-// This example does not handle errors.
-
-#include "rapidjson/document.h"
-#include "rapidjson/writer.h"
-#include "rapidjson/stringbuffer.h"
-#include <iostream>
-
-using namespace rapidjson;
-
-int main() {
- // 1. Parse a JSON string into DOM.
- const char* json = "{\"project\":\"rapidjson\",\"stars\":10}";
- Document d;
- d.Parse(json);
-
- // 2. Modify it by DOM.
- Value& s = d["stars"];
- s.SetInt(s.GetInt() + 1);
-
- // 3. Stringify the DOM
- StringBuffer buffer;
- Writer<StringBuffer> writer(buffer);
- d.Accept(writer);
-
- // Output {"project":"rapidjson","stars":11}
- std::cout << buffer.GetString() << std::endl;
- return 0;
-}
diff --git a/3rdparty/rapidjson/example/simplereader/simplereader.cpp b/3rdparty/rapidjson/example/simplereader/simplereader.cpp
deleted file mode 100644
index edbdb6352c5..00000000000
--- a/3rdparty/rapidjson/example/simplereader/simplereader.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-#include "rapidjson/reader.h"
-#include <iostream>
-
-using namespace rapidjson;
-using namespace std;
-
-struct MyHandler {
- bool Null() { cout << "Null()" << endl; return true; }
- bool Bool(bool b) { cout << "Bool(" << boolalpha << b << ")" << endl; return true; }
- bool Int(int i) { cout << "Int(" << i << ")" << endl; return true; }
- bool Uint(unsigned u) { cout << "Uint(" << u << ")" << endl; return true; }
- bool Int64(int64_t i) { cout << "Int64(" << i << ")" << endl; return true; }
- bool Uint64(uint64_t u) { cout << "Uint64(" << u << ")" << endl; return true; }
- bool Double(double d) { cout << "Double(" << d << ")" << endl; return true; }
- bool String(const char* str, SizeType length, bool copy) {
- cout << "String(" << str << ", " << length << ", " << boolalpha << copy << ")" << endl;
- return true;
- }
- bool StartObject() { cout << "StartObject()" << endl; return true; }
- bool Key(const char* str, SizeType length, bool copy) {
- cout << "Key(" << str << ", " << length << ", " << boolalpha << copy << ")" << endl;
- return true;
- }
- bool EndObject(SizeType memberCount) { cout << "EndObject(" << memberCount << ")" << endl; return true; }
- bool StartArray() { cout << "StartArray()" << endl; return true; }
- bool EndArray(SizeType elementCount) { cout << "EndArray(" << elementCount << ")" << endl; return true; }
-};
-
-int main() {
- const char json[] = " { \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3, 4] } ";
-
- MyHandler handler;
- Reader reader;
- StringStream ss(json);
- reader.Parse(ss, handler);
-
- return 0;
-}
diff --git a/3rdparty/rapidjson/example/simplewriter/simplewriter.cpp b/3rdparty/rapidjson/example/simplewriter/simplewriter.cpp
deleted file mode 100644
index f8891504bc8..00000000000
--- a/3rdparty/rapidjson/example/simplewriter/simplewriter.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-#include "rapidjson/writer.h"
-#include "rapidjson/stringbuffer.h"
-#include <iostream>
-
-using namespace rapidjson;
-using namespace std;
-
-int main() {
- StringBuffer s;
- Writer<StringBuffer> writer(s);
-
- writer.StartObject();
- writer.String("hello");
- writer.String("world");
- writer.String("t");
- writer.Bool(true);
- writer.String("f");
- writer.Bool(false);
- writer.String("n");
- writer.Null();
- writer.String("i");
- writer.Uint(123);
- writer.String("pi");
- writer.Double(3.1416);
- writer.String("a");
- writer.StartArray();
- for (unsigned i = 0; i < 4; i++)
- writer.Uint(i);
- writer.EndArray();
- writer.EndObject();
-
- cout << s.GetString() << endl;
-
- return 0;
-}
diff --git a/3rdparty/rapidjson/example/tutorial/tutorial.cpp b/3rdparty/rapidjson/example/tutorial/tutorial.cpp
deleted file mode 100644
index c8bfcc14c18..00000000000
--- a/3rdparty/rapidjson/example/tutorial/tutorial.cpp
+++ /dev/null
@@ -1,151 +0,0 @@
-// Hello World example
-// This example shows basic usage of DOM-style API.
-
-#include "rapidjson/document.h" // rapidjson's DOM-style API
-#include "rapidjson/prettywriter.h" // for stringify JSON
-#include <cstdio>
-
-using namespace rapidjson;
-using namespace std;
-
-int main(int, char*[]) {
- ////////////////////////////////////////////////////////////////////////////
- // 1. Parse a JSON text string to a document.
-
- const char json[] = " { \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3, 4] } ";
- printf("Original JSON:\n %s\n", json);
-
- Document document; // Default template parameter uses UTF8 and MemoryPoolAllocator.
-
-#if 0
- // "normal" parsing, decode strings to new buffers. Can use other input stream via ParseStream().
- if (document.Parse(json).HasParseError())
- return 1;
-#else
- // In-situ parsing, decode strings directly in the source string. Source must be string.
- char buffer[sizeof(json)];
- memcpy(buffer, json, sizeof(json));
- if (document.ParseInsitu(buffer).HasParseError())
- return 1;
-#endif
-
- printf("\nParsing to document succeeded.\n");
-
- ////////////////////////////////////////////////////////////////////////////
- // 2. Access values in document.
-
- printf("\nAccess values in document:\n");
- assert(document.IsObject()); // Document is a JSON value represents the root of DOM. Root can be either an object or array.
-
- assert(document.HasMember("hello"));
- assert(document["hello"].IsString());
- printf("hello = %s\n", document["hello"].GetString());
-
- // Since version 0.2, you can use single lookup to check the existing of member and its value:
- Value::MemberIterator hello = document.FindMember("hello");
- assert(hello != document.MemberEnd());
- assert(hello->value.IsString());
- assert(strcmp("world", hello->value.GetString()) == 0);
- (void)hello;
-
- assert(document["t"].IsBool()); // JSON true/false are bool. Can also uses more specific function IsTrue().
- printf("t = %s\n", document["t"].GetBool() ? "true" : "false");
-
- assert(document["f"].IsBool());
- printf("f = %s\n", document["f"].GetBool() ? "true" : "false");
-
- printf("n = %s\n", document["n"].IsNull() ? "null" : "?");
-
- assert(document["i"].IsNumber()); // Number is a JSON type, but C++ needs more specific type.
- assert(document["i"].IsInt()); // In this case, IsUint()/IsInt64()/IsUInt64() also return true.
- printf("i = %d\n", document["i"].GetInt()); // Alternative (int)document["i"]
-
- assert(document["pi"].IsNumber());
- assert(document["pi"].IsDouble());
- printf("pi = %g\n", document["pi"].GetDouble());
-
- {
- const Value& a = document["a"]; // Using a reference for consecutive access is handy and faster.
- assert(a.IsArray());
- for (SizeType i = 0; i < a.Size(); i++) // rapidjson uses SizeType instead of size_t.
- printf("a[%d] = %d\n", i, a[i].GetInt());
-
- int y = a[0].GetInt();
- (void)y;
-
- // Iterating array with iterators
- printf("a = ");
- for (Value::ConstValueIterator itr = a.Begin(); itr != a.End(); ++itr)
- printf("%d ", itr->GetInt());
- printf("\n");
- }
-
- // Iterating object members
- static const char* kTypeNames[] = { "Null", "False", "True", "Object", "Array", "String", "Number" };
- for (Value::ConstMemberIterator itr = document.MemberBegin(); itr != document.MemberEnd(); ++itr)
- printf("Type of member %s is %s\n", itr->name.GetString(), kTypeNames[itr->value.GetType()]);
-
- ////////////////////////////////////////////////////////////////////////////
- // 3. Modify values in document.
-
- // Change i to a bigger number
- {
- uint64_t f20 = 1; // compute factorial of 20
- for (uint64_t j = 1; j <= 20; j++)
- f20 *= j;
- document["i"] = f20; // Alternate form: document["i"].SetUint64(f20)
- assert(!document["i"].IsInt()); // No longer can be cast as int or uint.
- }
-
- // Adding values to array.
- {
- Value& a = document["a"]; // This time we uses non-const reference.
- Document::AllocatorType& allocator = document.GetAllocator();
- for (int i = 5; i <= 10; i++)
- a.PushBack(i, allocator); // May look a bit strange, allocator is needed for potentially realloc. We normally uses the document's.
-
- // Fluent API
- a.PushBack("Lua", allocator).PushBack("Mio", allocator);
- }
-
- // Making string values.
-
- // This version of SetString() just store the pointer to the string.
- // So it is for literal and string that exists within value's life-cycle.
- {
- document["hello"] = "rapidjson"; // This will invoke strlen()
- // Faster version:
- // document["hello"].SetString("rapidjson", 9);
- }
-
- // This version of SetString() needs an allocator, which means it will allocate a new buffer and copy the the string into the buffer.
- Value author;
- {
- char buffer2[10];
- int len = sprintf(buffer2, "%s %s", "Milo", "Yip"); // synthetic example of dynamically created string.
-
- author.SetString(buffer2, static_cast<SizeType>(len), document.GetAllocator());
- // Shorter but slower version:
- // document["hello"].SetString(buffer, document.GetAllocator());
-
- // Constructor version:
- // Value author(buffer, len, document.GetAllocator());
- // Value author(buffer, document.GetAllocator());
- memset(buffer2, 0, sizeof(buffer2)); // For demonstration purpose.
- }
- // Variable 'buffer' is unusable now but 'author' has already made a copy.
- document.AddMember("author", author, document.GetAllocator());
-
- assert(author.IsNull()); // Move semantic for assignment. After this variable is assigned as a member, the variable becomes null.
-
- ////////////////////////////////////////////////////////////////////////////
- // 4. Stringify JSON
-
- printf("\nModified JSON with reformatting:\n");
- StringBuffer sb;
- PrettyWriter<StringBuffer> writer(sb);
- document.Accept(writer); // Accept() traverses the DOM and generates Handler events.
- puts(sb.GetString());
-
- return 0;
-}
diff --git a/3rdparty/rapidjson/include/rapidjson/allocators.h b/3rdparty/rapidjson/include/rapidjson/allocators.h
deleted file mode 100644
index c705969729a..00000000000
--- a/3rdparty/rapidjson/include/rapidjson/allocators.h
+++ /dev/null
@@ -1,263 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 RAPIDJSON_ALLOCATORS_H_
-#define RAPIDJSON_ALLOCATORS_H_
-
-#include "rapidjson.h"
-
-RAPIDJSON_NAMESPACE_BEGIN
-
-///////////////////////////////////////////////////////////////////////////////
-// Allocator
-
-/*! \class rapidjson::Allocator
- \brief Concept for allocating, resizing and freeing memory block.
-
- Note that Malloc() and Realloc() are non-static but Free() is static.
-
- So if an allocator need to support Free(), it needs to put its pointer in
- the header of memory block.
-
-\code
-concept Allocator {
- static const bool kNeedFree; //!< Whether this allocator needs to call Free().
-
- // Allocate a memory block.
- // \param size of the memory block in bytes.
- // \returns pointer to the memory block.
- void* Malloc(size_t size);
-
- // Resize a memory block.
- // \param originalPtr The pointer to current memory block. Null pointer is permitted.
- // \param originalSize The current size in bytes. (Design issue: since some allocator may not book-keep this, explicitly pass to it can save memory.)
- // \param newSize the new size in bytes.
- void* Realloc(void* originalPtr, size_t originalSize, size_t newSize);
-
- // Free a memory block.
- // \param pointer to the memory block. Null pointer is permitted.
- static void Free(void *ptr);
-};
-\endcode
-*/
-
-///////////////////////////////////////////////////////////////////////////////
-// CrtAllocator
-
-//! C-runtime library allocator.
-/*! This class is just wrapper for standard C library memory routines.
- \note implements Allocator concept
-*/
-class CrtAllocator {
-public:
- static const bool kNeedFree = true;
- void* Malloc(size_t size) {
- if (size) // behavior of malloc(0) is implementation defined.
- return std::malloc(size);
- else
- return NULL; // standardize to returning NULL.
- }
- void* Realloc(void* originalPtr, size_t originalSize, size_t newSize) {
- (void)originalSize;
- if (newSize == 0) {
- std::free(originalPtr);
- return NULL;
- }
- return std::realloc(originalPtr, newSize);
- }
- static void Free(void *ptr) { std::free(ptr); }
-};
-
-///////////////////////////////////////////////////////////////////////////////
-// MemoryPoolAllocator
-
-//! Default memory allocator used by the parser and DOM.
-/*! This allocator allocate memory blocks from pre-allocated memory chunks.
-
- It does not free memory blocks. And Realloc() only allocate new memory.
-
- The memory chunks are allocated by BaseAllocator, which is CrtAllocator by default.
-
- User may also supply a buffer as the first chunk.
-
- If the user-buffer is full then additional chunks are allocated by BaseAllocator.
-
- The user-buffer is not deallocated by this allocator.
-
- \tparam BaseAllocator the allocator type for allocating memory chunks. Default is CrtAllocator.
- \note implements Allocator concept
-*/
-template <typename BaseAllocator = CrtAllocator>
-class MemoryPoolAllocator {
-public:
- static const bool kNeedFree = false; //!< Tell users that no need to call Free() with this allocator. (concept Allocator)
-
- //! Constructor with chunkSize.
- /*! \param chunkSize The size of memory chunk. The default is kDefaultChunkSize.
- \param baseAllocator The allocator for allocating memory chunks.
- */
- MemoryPoolAllocator(size_t chunkSize = kDefaultChunkCapacity, BaseAllocator* baseAllocator = 0) :
- chunkHead_(0), chunk_capacity_(chunkSize), userBuffer_(0), baseAllocator_(baseAllocator), ownBaseAllocator_(0)
- {
- }
-
- //! Constructor with user-supplied buffer.
- /*! The user buffer will be used firstly. When it is full, memory pool allocates new chunk with chunk size.
-
- The user buffer will not be deallocated when this allocator is destructed.
-
- \param buffer User supplied buffer.
- \param size Size of the buffer in bytes. It must at least larger than sizeof(ChunkHeader).
- \param chunkSize The size of memory chunk. The default is kDefaultChunkSize.
- \param baseAllocator The allocator for allocating memory chunks.
- */
- MemoryPoolAllocator(void *buffer, size_t size, size_t chunkSize = kDefaultChunkCapacity, BaseAllocator* baseAllocator = 0) :
- chunkHead_(0), chunk_capacity_(chunkSize), userBuffer_(buffer), baseAllocator_(baseAllocator), ownBaseAllocator_(0)
- {
- RAPIDJSON_ASSERT(buffer != 0);
- RAPIDJSON_ASSERT(size > sizeof(ChunkHeader));
- chunkHead_ = reinterpret_cast<ChunkHeader*>(buffer);
- chunkHead_->capacity = size - sizeof(ChunkHeader);
- chunkHead_->size = 0;
- chunkHead_->next = 0;
- }
-
- //! Destructor.
- /*! This deallocates all memory chunks, excluding the user-supplied buffer.
- */
- ~MemoryPoolAllocator() {
- Clear();
- RAPIDJSON_DELETE(ownBaseAllocator_);
- }
-
- //! Deallocates all memory chunks, excluding the user-supplied buffer.
- void Clear() {
- while (chunkHead_ && chunkHead_ != userBuffer_) {
- ChunkHeader* next = chunkHead_->next;
- baseAllocator_->Free(chunkHead_);
- chunkHead_ = next;
- }
- if (chunkHead_ && chunkHead_ == userBuffer_)
- chunkHead_->size = 0; // Clear user buffer
- }
-
- //! Computes the total capacity of allocated memory chunks.
- /*! \return total capacity in bytes.
- */
- size_t Capacity() const {
- size_t capacity = 0;
- for (ChunkHeader* c = chunkHead_; c != 0; c = c->next)
- capacity += c->capacity;
- return capacity;
- }
-
- //! Computes the memory blocks allocated.
- /*! \return total used bytes.
- */
- size_t Size() const {
- size_t size = 0;
- for (ChunkHeader* c = chunkHead_; c != 0; c = c->next)
- size += c->size;
- return size;
- }
-
- //! Allocates a memory block. (concept Allocator)
- void* Malloc(size_t size) {
- if (!size)
- return NULL;
-
- size = RAPIDJSON_ALIGN(size);
- if (chunkHead_ == 0 || chunkHead_->size + size > chunkHead_->capacity)
- AddChunk(chunk_capacity_ > size ? chunk_capacity_ : size);
-
- void *buffer = reinterpret_cast<char *>(chunkHead_) + RAPIDJSON_ALIGN(sizeof(ChunkHeader)) + chunkHead_->size;
- chunkHead_->size += size;
- return buffer;
- }
-
- //! Resizes a memory block (concept Allocator)
- void* Realloc(void* originalPtr, size_t originalSize, size_t newSize) {
- if (originalPtr == 0)
- return Malloc(newSize);
-
- if (newSize == 0)
- return NULL;
-
- originalSize = RAPIDJSON_ALIGN(originalSize);
- newSize = RAPIDJSON_ALIGN(newSize);
-
- // Do not shrink if new size is smaller than original
- if (originalSize >= newSize)
- return originalPtr;
-
- // Simply expand it if it is the last allocation and there is sufficient space
- if (originalPtr == reinterpret_cast<char *>(chunkHead_) + RAPIDJSON_ALIGN(sizeof(ChunkHeader)) + chunkHead_->size - originalSize) {
- size_t increment = static_cast<size_t>(newSize - originalSize);
- if (chunkHead_->size + increment <= chunkHead_->capacity) {
- chunkHead_->size += increment;
- return originalPtr;
- }
- }
-
- // Realloc process: allocate and copy memory, do not free original buffer.
- void* newBuffer = Malloc(newSize);
- RAPIDJSON_ASSERT(newBuffer != 0); // Do not handle out-of-memory explicitly.
- if (originalSize)
- std::memcpy(newBuffer, originalPtr, originalSize);
- return newBuffer;
- }
-
- //! Frees a memory block (concept Allocator)
- static void Free(void *ptr) { (void)ptr; } // Do nothing
-
-private:
- //! Copy constructor is not permitted.
- MemoryPoolAllocator(const MemoryPoolAllocator& rhs) /* = delete */;
- //! Copy assignment operator is not permitted.
- MemoryPoolAllocator& operator=(const MemoryPoolAllocator& rhs) /* = delete */;
-
- //! Creates a new chunk.
- /*! \param capacity Capacity of the chunk in bytes.
- */
- void AddChunk(size_t capacity) {
- if (!baseAllocator_)
- ownBaseAllocator_ = baseAllocator_ = RAPIDJSON_NEW(BaseAllocator());
- ChunkHeader* chunk = reinterpret_cast<ChunkHeader*>(baseAllocator_->Malloc(RAPIDJSON_ALIGN(sizeof(ChunkHeader)) + capacity));
- chunk->capacity = capacity;
- chunk->size = 0;
- chunk->next = chunkHead_;
- chunkHead_ = chunk;
- }
-
- static const int kDefaultChunkCapacity = 64 * 1024; //!< Default chunk capacity.
-
- //! Chunk header for perpending to each chunk.
- /*! Chunks are stored as a singly linked list.
- */
- struct ChunkHeader {
- size_t capacity; //!< Capacity of the chunk in bytes (excluding the header itself).
- size_t size; //!< Current size of allocated memory in bytes.
- ChunkHeader *next; //!< Next chunk in the linked list.
- };
-
- ChunkHeader *chunkHead_; //!< Head of the chunk linked-list. Only the head chunk serves allocation.
- size_t chunk_capacity_; //!< The minimum capacity of chunk when they are allocated.
- void *userBuffer_; //!< User supplied buffer.
- BaseAllocator* baseAllocator_; //!< base allocator for allocating memory chunks.
- BaseAllocator* ownBaseAllocator_; //!< base allocator created by this object.
-};
-
-RAPIDJSON_NAMESPACE_END
-
-#endif // RAPIDJSON_ENCODINGS_H_
diff --git a/3rdparty/rapidjson/include/rapidjson/document.h b/3rdparty/rapidjson/include/rapidjson/document.h
deleted file mode 100644
index b3c9e0667e6..00000000000
--- a/3rdparty/rapidjson/include/rapidjson/document.h
+++ /dev/null
@@ -1,2189 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 RAPIDJSON_DOCUMENT_H_
-#define RAPIDJSON_DOCUMENT_H_
-
-/*! \file document.h */
-
-#include "reader.h"
-#include "internal/meta.h"
-#include "internal/strfunc.h"
-#include <new> // placement new
-
-#ifdef _MSC_VER
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(4127) // conditional expression is constant
-#endif
-
-#ifdef __clang__
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(padded)
-RAPIDJSON_DIAG_OFF(switch-enum)
-RAPIDJSON_DIAG_OFF(c++98-compat)
-#endif
-
-#ifdef __GNUC__
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(effc++)
-#endif
-
-#ifndef RAPIDJSON_NOMEMBERITERATORCLASS
-#include <iterator> // std::iterator, std::random_access_iterator_tag
-#endif
-
-#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
-#include <utility> // std::move
-#endif
-
-RAPIDJSON_NAMESPACE_BEGIN
-
-// Forward declaration.
-template <typename Encoding, typename Allocator>
-class GenericValue;
-
-template <typename Encoding, typename Allocator, typename StackAllocator>
-class GenericDocument;
-
-//! Name-value pair in a JSON object value.
-/*!
- This class was internal to GenericValue. It used to be a inner struct.
- But a compiler (IBM XL C/C++ for AIX) have reported to have problem with that so it moved as a namespace scope struct.
- https://code.google.com/p/rapidjson/issues/detail?id=64
-*/
-template <typename Encoding, typename Allocator>
-struct GenericMember {
- GenericValue<Encoding, Allocator> name; //!< name of member (must be a string)
- GenericValue<Encoding, Allocator> value; //!< value of member.
-};
-
-///////////////////////////////////////////////////////////////////////////////
-// GenericMemberIterator
-
-#ifndef RAPIDJSON_NOMEMBERITERATORCLASS
-
-//! (Constant) member iterator for a JSON object value
-/*!
- \tparam Const Is this a constant iterator?
- \tparam Encoding Encoding of the value. (Even non-string values need to have the same encoding in a document)
- \tparam Allocator Allocator type for allocating memory of object, array and string.
-
- This class implements a Random Access Iterator for GenericMember elements
- of a GenericValue, see ISO/IEC 14882:2003(E) C++ standard, 24.1 [lib.iterator.requirements].
-
- \note This iterator implementation is mainly intended to avoid implicit
- conversions from iterator values to \c NULL,
- e.g. from GenericValue::FindMember.
-
- \note Define \c RAPIDJSON_NOMEMBERITERATORCLASS to fall back to a
- pointer-based implementation, if your platform doesn't provide
- the C++ <iterator> header.
-
- \see GenericMember, GenericValue::MemberIterator, GenericValue::ConstMemberIterator
- */
-template <bool Const, typename Encoding, typename Allocator>
-class GenericMemberIterator
- : public std::iterator<std::random_access_iterator_tag
- , typename internal::MaybeAddConst<Const,GenericMember<Encoding,Allocator> >::Type> {
-
- friend class GenericValue<Encoding,Allocator>;
- template <bool, typename, typename> friend class GenericMemberIterator;
-
- typedef GenericMember<Encoding,Allocator> PlainType;
- typedef typename internal::MaybeAddConst<Const,PlainType>::Type ValueType;
- typedef std::iterator<std::random_access_iterator_tag,ValueType> BaseType;
-
-public:
- //! Iterator type itself
- typedef GenericMemberIterator Iterator;
- //! Constant iterator type
- typedef GenericMemberIterator<true,Encoding,Allocator> ConstIterator;
- //! Non-constant iterator type
- typedef GenericMemberIterator<false,Encoding,Allocator> NonConstIterator;
-
- //! Pointer to (const) GenericMember
- typedef typename BaseType::pointer Pointer;
- //! Reference to (const) GenericMember
- typedef typename BaseType::reference Reference;
- //! Signed integer type (e.g. \c ptrdiff_t)
- typedef typename BaseType::difference_type DifferenceType;
-
- //! Default constructor (singular value)
- /*! Creates an iterator pointing to no element.
- \note All operations, except for comparisons, are undefined on such values.
- */
- GenericMemberIterator() : ptr_() {}
-
- //! Iterator conversions to more const
- /*!
- \param it (Non-const) iterator to copy from
-
- Allows the creation of an iterator from another GenericMemberIterator
- that is "less const". Especially, creating a non-constant iterator
- from a constant iterator are disabled:
- \li const -> non-const (not ok)
- \li const -> const (ok)
- \li non-const -> const (ok)
- \li non-const -> non-const (ok)
-
- \note If the \c Const template parameter is already \c false, this
- constructor effectively defines a regular copy-constructor.
- Otherwise, the copy constructor is implicitly defined.
- */
- GenericMemberIterator(const NonConstIterator & it) : ptr_(it.ptr_) {}
- Iterator& operator=(const NonConstIterator & it) { ptr_ = it.ptr_; return *this; }
-
- //! @name stepping
- //@{
- Iterator& operator++(){ ++ptr_; return *this; }
- Iterator& operator--(){ --ptr_; return *this; }
- Iterator operator++(int){ Iterator old(*this); ++ptr_; return old; }
- Iterator operator--(int){ Iterator old(*this); --ptr_; return old; }
- //@}
-
- //! @name increment/decrement
- //@{
- Iterator operator+(DifferenceType n) const { return Iterator(ptr_+n); }
- Iterator operator-(DifferenceType n) const { return Iterator(ptr_-n); }
-
- Iterator& operator+=(DifferenceType n) { ptr_+=n; return *this; }
- Iterator& operator-=(DifferenceType n) { ptr_-=n; return *this; }
- //@}
-
- //! @name relations
- //@{
- bool operator==(ConstIterator that) const { return ptr_ == that.ptr_; }
- bool operator!=(ConstIterator that) const { return ptr_ != that.ptr_; }
- bool operator<=(ConstIterator that) const { return ptr_ <= that.ptr_; }
- bool operator>=(ConstIterator that) const { return ptr_ >= that.ptr_; }
- bool operator< (ConstIterator that) const { return ptr_ < that.ptr_; }
- bool operator> (ConstIterator that) const { return ptr_ > that.ptr_; }
- //@}
-
- //! @name dereference
- //@{
- Reference operator*() const { return *ptr_; }
- Pointer operator->() const { return ptr_; }
- Reference operator[](DifferenceType n) const { return ptr_[n]; }
- //@}
-
- //! Distance
- DifferenceType operator-(ConstIterator that) const { return ptr_-that.ptr_; }
-
-private:
- //! Internal constructor from plain pointer
- explicit GenericMemberIterator(Pointer p) : ptr_(p) {}
-
- Pointer ptr_; //!< raw pointer
-};
-
-#else // RAPIDJSON_NOMEMBERITERATORCLASS
-
-// class-based member iterator implementation disabled, use plain pointers
-
-template <bool Const, typename Encoding, typename Allocator>
-struct GenericMemberIterator;
-
-//! non-const GenericMemberIterator
-template <typename Encoding, typename Allocator>
-struct GenericMemberIterator<false,Encoding,Allocator> {
- //! use plain pointer as iterator type
- typedef GenericMember<Encoding,Allocator>* Iterator;
-};
-//! const GenericMemberIterator
-template <typename Encoding, typename Allocator>
-struct GenericMemberIterator<true,Encoding,Allocator> {
- //! use plain const pointer as iterator type
- typedef const GenericMember<Encoding,Allocator>* Iterator;
-};
-
-#endif // RAPIDJSON_NOMEMBERITERATORCLASS
-
-///////////////////////////////////////////////////////////////////////////////
-// GenericStringRef
-
-//! Reference to a constant string (not taking a copy)
-/*!
- \tparam CharType character type of the string
-
- This helper class is used to automatically infer constant string
- references for string literals, especially from \c const \b (!)
- character arrays.
-
- The main use is for creating JSON string values without copying the
- source string via an \ref Allocator. This requires that the referenced
- string pointers have a sufficient lifetime, which exceeds the lifetime
- of the associated GenericValue.
-
- \b Example
- \code
- Value v("foo"); // ok, no need to copy & calculate length
- const char foo[] = "foo";
- v.SetString(foo); // ok
-
- const char* bar = foo;
- // Value x(bar); // not ok, can't rely on bar's lifetime
- Value x(StringRef(bar)); // lifetime explicitly guaranteed by user
- Value y(StringRef(bar, 3)); // ok, explicitly pass length
- \endcode
-
- \see StringRef, GenericValue::SetString
-*/
-template<typename CharType>
-struct GenericStringRef {
- typedef CharType Ch; //!< character type of the string
-
- //! Create string reference from \c const character array
-#ifndef __clang__ // -Wdocumentation
- /*!
- This constructor implicitly creates a constant string reference from
- a \c const character array. It has better performance than
- \ref StringRef(const CharType*) by inferring the string \ref length
- from the array length, and also supports strings containing null
- characters.
-
- \tparam N length of the string, automatically inferred
-
- \param str Constant character array, lifetime assumed to be longer
- than the use of the string in e.g. a GenericValue
-
- \post \ref s == str
-
- \note Constant complexity.
- \note There is a hidden, private overload to disallow references to
- non-const character arrays to be created via this constructor.
- By this, e.g. function-scope arrays used to be filled via
- \c snprintf are excluded from consideration.
- In such cases, the referenced string should be \b copied to the
- GenericValue instead.
- */
-#endif
- template<SizeType N>
- GenericStringRef(const CharType (&str)[N]) RAPIDJSON_NOEXCEPT
- : s(str), length(N-1) {}
-
- //! Explicitly create string reference from \c const character pointer
-#ifndef __clang__ // -Wdocumentation
- /*!
- This constructor can be used to \b explicitly create a reference to
- a constant string pointer.
-
- \see StringRef(const CharType*)
-
- \param str Constant character pointer, lifetime assumed to be longer
- than the use of the string in e.g. a GenericValue
-
- \post \ref s == str
-
- \note There is a hidden, private overload to disallow references to
- non-const character arrays to be created via this constructor.
- By this, e.g. function-scope arrays used to be filled via
- \c snprintf are excluded from consideration.
- In such cases, the referenced string should be \b copied to the
- GenericValue instead.
- */
-#endif
- explicit GenericStringRef(const CharType* str)
- : s(str), length(internal::StrLen(str)){ RAPIDJSON_ASSERT(s != NULL); }
-
- //! Create constant string reference from pointer and length
-#ifndef __clang__ // -Wdocumentation
- /*! \param str constant string, lifetime assumed to be longer than the use of the string in e.g. a GenericValue
- \param len length of the string, excluding the trailing NULL terminator
-
- \post \ref s == str && \ref length == len
- \note Constant complexity.
- */
-#endif
- GenericStringRef(const CharType* str, SizeType len)
- : s(str), length(len) { RAPIDJSON_ASSERT(s != NULL); }
-
- //! implicit conversion to plain CharType pointer
- operator const Ch *() const { return s; }
-
- const Ch* const s; //!< plain CharType pointer
- const SizeType length; //!< length of the string (excluding the trailing NULL terminator)
-
-private:
- //! Disallow construction from non-const array
- template<SizeType N>
- GenericStringRef(CharType (&str)[N]) /* = delete */;
-};
-
-//! Mark a character pointer as constant string
-/*! Mark a plain character pointer as a "string literal". This function
- can be used to avoid copying a character string to be referenced as a
- value in a JSON GenericValue object, if the string's lifetime is known
- to be valid long enough.
- \tparam CharType Character type of the string
- \param str Constant string, lifetime assumed to be longer than the use of the string in e.g. a GenericValue
- \return GenericStringRef string reference object
- \relatesalso GenericStringRef
-
- \see GenericValue::GenericValue(StringRefType), GenericValue::operator=(StringRefType), GenericValue::SetString(StringRefType), GenericValue::PushBack(StringRefType, Allocator&), GenericValue::AddMember
-*/
-template<typename CharType>
-inline GenericStringRef<CharType> StringRef(const CharType* str) {
- return GenericStringRef<CharType>(str, internal::StrLen(str));
-}
-
-//! Mark a character pointer as constant string
-/*! Mark a plain character pointer as a "string literal". This function
- can be used to avoid copying a character string to be referenced as a
- value in a JSON GenericValue object, if the string's lifetime is known
- to be valid long enough.
-
- This version has better performance with supplied length, and also
- supports string containing null characters.
-
- \tparam CharType character type of the string
- \param str Constant string, lifetime assumed to be longer than the use of the string in e.g. a GenericValue
- \param length The length of source string.
- \return GenericStringRef string reference object
- \relatesalso GenericStringRef
-*/
-template<typename CharType>
-inline GenericStringRef<CharType> StringRef(const CharType* str, size_t length) {
- return GenericStringRef<CharType>(str, SizeType(length));
-}
-
-#if RAPIDJSON_HAS_STDSTRING
-//! Mark a string object as constant string
-/*! Mark a string object (e.g. \c std::string) as a "string literal".
- This function can be used to avoid copying a string to be referenced as a
- value in a JSON GenericValue object, if the string's lifetime is known
- to be valid long enough.
-
- \tparam CharType character type of the string
- \param str Constant string, lifetime assumed to be longer than the use of the string in e.g. a GenericValue
- \return GenericStringRef string reference object
- \relatesalso GenericStringRef
- \note Requires the definition of the preprocessor symbol \ref RAPIDJSON_HAS_STDSTRING.
-*/
-template<typename CharType>
-inline GenericStringRef<CharType> StringRef(const std::basic_string<CharType>& str) {
- return GenericStringRef<CharType>(str.data(), SizeType(str.size()));
-}
-#endif
-
-///////////////////////////////////////////////////////////////////////////////
-// GenericValue type traits
-namespace internal {
-
-template <typename T, typename Encoding = void, typename Allocator = void>
-struct IsGenericValueImpl : FalseType {};
-
-// select candidates according to nested encoding and allocator types
-template <typename T> struct IsGenericValueImpl<T, typename Void<typename T::EncodingType>::Type, typename Void<typename T::AllocatorType>::Type>
- : IsBaseOf<GenericValue<typename T::EncodingType, typename T::AllocatorType>, T>::Type {};
-
-// helper to match arbitrary GenericValue instantiations, including derived classes
-template <typename T> struct IsGenericValue : IsGenericValueImpl<T>::Type {};
-
-} // namespace internal
-
-///////////////////////////////////////////////////////////////////////////////
-// GenericValue
-
-//! Represents a JSON value. Use Value for UTF8 encoding and default allocator.
-/*!
- A JSON value can be one of 7 types. This class is a variant type supporting
- these types.
-
- Use the Value if UTF8 and default allocator
-
- \tparam Encoding Encoding of the value. (Even non-string values need to have the same encoding in a document)
- \tparam Allocator Allocator type for allocating memory of object, array and string.
-*/
-template <typename Encoding, typename Allocator = MemoryPoolAllocator<> >
-class GenericValue {
-public:
- //! Name-value pair in an object.
- typedef GenericMember<Encoding, Allocator> Member;
- typedef Encoding EncodingType; //!< Encoding type from template parameter.
- typedef Allocator AllocatorType; //!< Allocator type from template parameter.
- typedef typename Encoding::Ch Ch; //!< Character type derived from Encoding.
- typedef GenericStringRef<Ch> StringRefType; //!< Reference to a constant string
- typedef typename GenericMemberIterator<false,Encoding,Allocator>::Iterator MemberIterator; //!< Member iterator for iterating in object.
- typedef typename GenericMemberIterator<true,Encoding,Allocator>::Iterator ConstMemberIterator; //!< Constant member iterator for iterating in object.
- typedef GenericValue* ValueIterator; //!< Value iterator for iterating in array.
- typedef const GenericValue* ConstValueIterator; //!< Constant value iterator for iterating in array.
- typedef GenericValue<Encoding, Allocator> ValueType; //!< Value type of itself.
-
- //!@name Constructors and destructor.
- //@{
-
- //! Default constructor creates a null value.
- GenericValue() RAPIDJSON_NOEXCEPT : data_(), flags_(kNullFlag) {}
-
-#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
- //! Move constructor in C++11
- GenericValue(GenericValue&& rhs) RAPIDJSON_NOEXCEPT : data_(rhs.data_), flags_(rhs.flags_) {
- rhs.flags_ = kNullFlag; // give up contents
- }
-#endif
-
-private:
- //! Copy constructor is not permitted.
- GenericValue(const GenericValue& rhs);
-
-#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
- //! Moving from a GenericDocument is not permitted.
- template <typename StackAllocator>
- GenericValue(GenericDocument<Encoding,Allocator,StackAllocator>&& rhs);
-
- //! Move assignment from a GenericDocument is not permitted.
- template <typename StackAllocator>
- GenericValue& operator=(GenericDocument<Encoding,Allocator,StackAllocator>&& rhs);
-#endif
-
-public:
-
- //! Constructor with JSON value type.
- /*! This creates a Value of specified type with default content.
- \param type Type of the value.
- \note Default content for number is zero.
- */
- explicit GenericValue(Type type) RAPIDJSON_NOEXCEPT : data_(), flags_() {
- static const unsigned defaultFlags[7] = {
- kNullFlag, kFalseFlag, kTrueFlag, kObjectFlag, kArrayFlag, kShortStringFlag,
- kNumberAnyFlag
- };
- RAPIDJSON_ASSERT(type <= kNumberType);
- flags_ = defaultFlags[type];
-
- // Use ShortString to store empty string.
- if (type == kStringType)
- data_.ss.SetLength(0);
- }
-
- //! Explicit copy constructor (with allocator)
- /*! Creates a copy of a Value by using the given Allocator
- \tparam SourceAllocator allocator of \c rhs
- \param rhs Value to copy from (read-only)
- \param allocator Allocator for allocating copied elements and buffers. Commonly use GenericDocument::GetAllocator().
- \see CopyFrom()
- */
- template< typename SourceAllocator >
- GenericValue(const GenericValue<Encoding, SourceAllocator>& rhs, Allocator & allocator);
-
- //! Constructor for boolean value.
- /*! \param b Boolean value
- \note This constructor is limited to \em real boolean values and rejects
- implicitly converted types like arbitrary pointers. Use an explicit cast
- to \c bool, if you want to construct a boolean JSON value in such cases.
- */
-#ifndef RAPIDJSON_DOXYGEN_RUNNING // hide SFINAE from Doxygen
- template <typename T>
- explicit GenericValue(T b, RAPIDJSON_ENABLEIF((internal::IsSame<bool, T>))) RAPIDJSON_NOEXCEPT // See #472
-#else
- explicit GenericValue(bool b) RAPIDJSON_NOEXCEPT
-#endif
- : data_(), flags_(b ? kTrueFlag : kFalseFlag) {
- // safe-guard against failing SFINAE
- RAPIDJSON_STATIC_ASSERT((internal::IsSame<bool,T>::Value));
- }
-
- //! Constructor for int value.
- explicit GenericValue(int i) RAPIDJSON_NOEXCEPT : data_(), flags_(kNumberIntFlag) {
- data_.n.i64 = i;
- if (i >= 0)
- flags_ |= kUintFlag | kUint64Flag;
- }
-
- //! Constructor for unsigned value.
- explicit GenericValue(unsigned u) RAPIDJSON_NOEXCEPT : data_(), flags_(kNumberUintFlag) {
- data_.n.u64 = u;
- if (!(u & 0x80000000))
- flags_ |= kIntFlag | kInt64Flag;
- }
-
- //! Constructor for int64_t value.
- explicit GenericValue(int64_t i64) RAPIDJSON_NOEXCEPT : data_(), flags_(kNumberInt64Flag) {
- data_.n.i64 = i64;
- if (i64 >= 0) {
- flags_ |= kNumberUint64Flag;
- if (!(static_cast<uint64_t>(i64) & RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0x00000000)))
- flags_ |= kUintFlag;
- if (!(static_cast<uint64_t>(i64) & RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0x80000000)))
- flags_ |= kIntFlag;
- }
- else if (i64 >= static_cast<int64_t>(RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0x80000000)))
- flags_ |= kIntFlag;
- }
-
- //! Constructor for uint64_t value.
- explicit GenericValue(uint64_t u64) RAPIDJSON_NOEXCEPT : data_(), flags_(kNumberUint64Flag) {
- data_.n.u64 = u64;
- if (!(u64 & RAPIDJSON_UINT64_C2(0x80000000, 0x00000000)))
- flags_ |= kInt64Flag;
- if (!(u64 & RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0x00000000)))
- flags_ |= kUintFlag;
- if (!(u64 & RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0x80000000)))
- flags_ |= kIntFlag;
- }
-
- //! Constructor for double value.
- explicit GenericValue(double d) RAPIDJSON_NOEXCEPT : data_(), flags_(kNumberDoubleFlag) { data_.n.d = d; }
-
- //! Constructor for constant string (i.e. do not make a copy of string)
- GenericValue(const Ch* s, SizeType length) RAPIDJSON_NOEXCEPT : data_(), flags_() { SetStringRaw(StringRef(s, length)); }
-
- //! Constructor for constant string (i.e. do not make a copy of string)
- explicit GenericValue(StringRefType s) RAPIDJSON_NOEXCEPT : data_(), flags_() { SetStringRaw(s); }
-
- //! Constructor for copy-string (i.e. do make a copy of string)
- GenericValue(const Ch* s, SizeType length, Allocator& allocator) : data_(), flags_() { SetStringRaw(StringRef(s, length), allocator); }
-
- //! Constructor for copy-string (i.e. do make a copy of string)
- GenericValue(const Ch*s, Allocator& allocator) : data_(), flags_() { SetStringRaw(StringRef(s), allocator); }
-
-#if RAPIDJSON_HAS_STDSTRING
- //! Constructor for copy-string from a string object (i.e. do make a copy of string)
- /*! \note Requires the definition of the preprocessor symbol \ref RAPIDJSON_HAS_STDSTRING.
- */
- GenericValue(const std::basic_string<Ch>& s, Allocator& allocator) : data_(), flags_() { SetStringRaw(StringRef(s), allocator); }
-#endif
-
- //! Destructor.
- /*! Need to destruct elements of array, members of object, or copy-string.
- */
- ~GenericValue() {
- if (Allocator::kNeedFree) { // Shortcut by Allocator's trait
- switch(flags_) {
- case kArrayFlag:
- for (GenericValue* v = data_.a.elements; v != data_.a.elements + data_.a.size; ++v)
- v->~GenericValue();
- Allocator::Free(data_.a.elements);
- break;
-
- case kObjectFlag:
- for (MemberIterator m = MemberBegin(); m != MemberEnd(); ++m)
- m->~Member();
- Allocator::Free(data_.o.members);
- break;
-
- case kCopyStringFlag:
- Allocator::Free(const_cast<Ch*>(data_.s.str));
- break;
-
- default:
- break; // Do nothing for other types.
- }
- }
- }
-
- //@}
-
- //!@name Assignment operators
- //@{
-
- //! Assignment with move semantics.
- /*! \param rhs Source of the assignment. It will become a null value after assignment.
- */
- GenericValue& operator=(GenericValue& rhs) RAPIDJSON_NOEXCEPT {
- RAPIDJSON_ASSERT(this != &rhs);
- this->~GenericValue();
- RawAssign(rhs);
- return *this;
- }
-
-#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
- //! Move assignment in C++11
- GenericValue& operator=(GenericValue&& rhs) RAPIDJSON_NOEXCEPT {
- return *this = rhs.Move();
- }
-#endif
-
- //! Assignment of constant string reference (no copy)
- /*! \param str Constant string reference to be assigned
- \note This overload is needed to avoid clashes with the generic primitive type assignment overload below.
- \see GenericStringRef, operator=(T)
- */
- GenericValue& operator=(StringRefType str) RAPIDJSON_NOEXCEPT {
- GenericValue s(str);
- return *this = s;
- }
-
- //! Assignment with primitive types.
- /*! \tparam T Either \ref Type, \c int, \c unsigned, \c int64_t, \c uint64_t
- \param value The value to be assigned.
-
- \note The source type \c T explicitly disallows all pointer types,
- especially (\c const) \ref Ch*. This helps avoiding implicitly
- referencing character strings with insufficient lifetime, use
- \ref SetString(const Ch*, Allocator&) (for copying) or
- \ref StringRef() (to explicitly mark the pointer as constant) instead.
- All other pointer types would implicitly convert to \c bool,
- use \ref SetBool() instead.
- */
- template <typename T>
- RAPIDJSON_DISABLEIF_RETURN((internal::IsPointer<T>), (GenericValue&))
- operator=(T value) {
- GenericValue v(value);
- return *this = v;
- }
-
- //! Deep-copy assignment from Value
- /*! Assigns a \b copy of the Value to the current Value object
- \tparam SourceAllocator Allocator type of \c rhs
- \param rhs Value to copy from (read-only)
- \param allocator Allocator to use for copying
- */
- template <typename SourceAllocator>
- GenericValue& CopyFrom(const GenericValue<Encoding, SourceAllocator>& rhs, Allocator& allocator) {
- RAPIDJSON_ASSERT(static_cast<void*>(this) != static_cast<void const*>(&rhs));
- this->~GenericValue();
- new (this) GenericValue(rhs, allocator);
- return *this;
- }
-
- //! Exchange the contents of this value with those of other.
- /*!
- \param other Another value.
- \note Constant complexity.
- */
- GenericValue& Swap(GenericValue& other) RAPIDJSON_NOEXCEPT {
- GenericValue temp;
- temp.RawAssign(*this);
- RawAssign(other);
- other.RawAssign(temp);
- return *this;
- }
-
- //! free-standing swap function helper
- /*!
- Helper function to enable support for common swap implementation pattern based on \c std::swap:
- \code
- void swap(MyClass& a, MyClass& b) {
- using std::swap;
- swap(a.value, b.value);
- // ...
- }
- \endcode
- \see Swap()
- */
- friend inline void swap(GenericValue& a, GenericValue& b) RAPIDJSON_NOEXCEPT { a.Swap(b); }
-
- //! Prepare Value for move semantics
- /*! \return *this */
- GenericValue& Move() RAPIDJSON_NOEXCEPT { return *this; }
- //@}
-
- //!@name Equal-to and not-equal-to operators
- //@{
- //! Equal-to operator
- /*!
- \note If an object contains duplicated named member, comparing equality with any object is always \c false.
- \note Linear time complexity (number of all values in the subtree and total lengths of all strings).
- */
- template <typename SourceAllocator>
- bool operator==(const GenericValue<Encoding, SourceAllocator>& rhs) const {
- typedef GenericValue<Encoding, SourceAllocator> RhsType;
- if (GetType() != rhs.GetType())
- return false;
-
- switch (GetType()) {
- case kObjectType: // Warning: O(n^2) inner-loop
- if (data_.o.size != rhs.data_.o.size)
- return false;
- for (ConstMemberIterator lhsMemberItr = MemberBegin(); lhsMemberItr != MemberEnd(); ++lhsMemberItr) {
- typename RhsType::ConstMemberIterator rhsMemberItr = rhs.FindMember(lhsMemberItr->name);
- if (rhsMemberItr == rhs.MemberEnd() || lhsMemberItr->value != rhsMemberItr->value)
- return false;
- }
- return true;
-
- case kArrayType:
- if (data_.a.size != rhs.data_.a.size)
- return false;
- for (SizeType i = 0; i < data_.a.size; i++)
- if ((*this)[i] != rhs[i])
- return false;
- return true;
-
- case kStringType:
- return StringEqual(rhs);
-
- case kNumberType:
- if (IsDouble() || rhs.IsDouble()) {
- double a = GetDouble(); // May convert from integer to double.
- double b = rhs.GetDouble(); // Ditto
- return a >= b && a <= b; // Prevent -Wfloat-equal
- }
- else
- return data_.n.u64 == rhs.data_.n.u64;
-
- default:
- return true;
- }
- }
-
- //! Equal-to operator with const C-string pointer
- bool operator==(const Ch* rhs) const { return *this == GenericValue(StringRef(rhs)); }
-
-#if RAPIDJSON_HAS_STDSTRING
- //! Equal-to operator with string object
- /*! \note Requires the definition of the preprocessor symbol \ref RAPIDJSON_HAS_STDSTRING.
- */
- bool operator==(const std::basic_string<Ch>& rhs) const { return *this == GenericValue(StringRef(rhs)); }
-#endif
-
- //! Equal-to operator with primitive types
- /*! \tparam T Either \ref Type, \c int, \c unsigned, \c int64_t, \c uint64_t, \c double, \c true, \c false
- */
- template <typename T> RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T>,internal::IsGenericValue<T> >), (bool)) operator==(const T& rhs) const { return *this == GenericValue(rhs); }
-
- //! Not-equal-to operator
- /*! \return !(*this == rhs)
- */
- template <typename SourceAllocator>
- bool operator!=(const GenericValue<Encoding, SourceAllocator>& rhs) const { return !(*this == rhs); }
-
- //! Not-equal-to operator with const C-string pointer
- bool operator!=(const Ch* rhs) const { return !(*this == rhs); }
-
- //! Not-equal-to operator with arbitrary types
- /*! \return !(*this == rhs)
- */
- template <typename T> RAPIDJSON_DISABLEIF_RETURN((internal::IsGenericValue<T>), (bool)) operator!=(const T& rhs) const { return !(*this == rhs); }
-
- //! Equal-to operator with arbitrary types (symmetric version)
- /*! \return (rhs == lhs)
- */
- template <typename T> friend RAPIDJSON_DISABLEIF_RETURN((internal::IsGenericValue<T>), (bool)) operator==(const T& lhs, const GenericValue& rhs) { return rhs == lhs; }
-
- //! Not-Equal-to operator with arbitrary types (symmetric version)
- /*! \return !(rhs == lhs)
- */
- template <typename T> friend RAPIDJSON_DISABLEIF_RETURN((internal::IsGenericValue<T>), (bool)) operator!=(const T& lhs, const GenericValue& rhs) { return !(rhs == lhs); }
- //@}
-
- //!@name Type
- //@{
-
- Type GetType() const { return static_cast<Type>(flags_ & kTypeMask); }
- bool IsNull() const { return flags_ == kNullFlag; }
- bool IsFalse() const { return flags_ == kFalseFlag; }
- bool IsTrue() const { return flags_ == kTrueFlag; }
- bool IsBool() const { return (flags_ & kBoolFlag) != 0; }
- bool IsObject() const { return flags_ == kObjectFlag; }
- bool IsArray() const { return flags_ == kArrayFlag; }
- bool IsNumber() const { return (flags_ & kNumberFlag) != 0; }
- bool IsInt() const { return (flags_ & kIntFlag) != 0; }
- bool IsUint() const { return (flags_ & kUintFlag) != 0; }
- bool IsInt64() const { return (flags_ & kInt64Flag) != 0; }
- bool IsUint64() const { return (flags_ & kUint64Flag) != 0; }
- bool IsDouble() const { return (flags_ & kDoubleFlag) != 0; }
- bool IsString() const { return (flags_ & kStringFlag) != 0; }
-
- // Checks whether a number can be losslessly converted to a double.
- bool IsLosslessDouble() const {
- if (!IsNumber()) return false;
- if (IsUint64()) {
- uint64_t u = GetUint64();
- volatile double d = static_cast<double>(u);
- return static_cast<uint64_t>(d) == u;
- }
- if (IsInt64()) {
- int64_t i = GetInt64();
- volatile double d = static_cast<double>(i);
- return static_cast< int64_t>(d) == i;
- }
- return true; // double, int, uint are always lossless
- }
-
- // Checks whether a number is a float (possible lossy).
- bool IsFloat() const {
- if ((flags_ & kDoubleFlag) == 0)
- return false;
- double d = GetDouble();
- return d >= -3.4028234e38 && d <= 3.4028234e38;
- }
- // Checks whether a number can be losslessly converted to a float.
- bool IsLosslessFloat() const {
- if (!IsNumber()) return false;
- double a = GetDouble();
- double b = static_cast<double>(static_cast<float>(a));
- return a >= b && a <= b; // Prevent -Wfloat-equal
- }
-
- //@}
-
- //!@name Null
- //@{
-
- GenericValue& SetNull() { this->~GenericValue(); new (this) GenericValue(); return *this; }
-
- //@}
-
- //!@name Bool
- //@{
-
- bool GetBool() const { RAPIDJSON_ASSERT(IsBool()); return flags_ == kTrueFlag; }
- //!< Set boolean value
- /*! \post IsBool() == true */
- GenericValue& SetBool(bool b) { this->~GenericValue(); new (this) GenericValue(b); return *this; }
-
- //@}
-
- //!@name Object
- //@{
-
- //! Set this value as an empty object.
- /*! \post IsObject() == true */
- GenericValue& SetObject() { this->~GenericValue(); new (this) GenericValue(kObjectType); return *this; }
-
- //! Get the number of members in the object.
- SizeType MemberCount() const { RAPIDJSON_ASSERT(IsObject()); return data_.o.size; }
-
- //! Check whether the object is empty.
- bool ObjectEmpty() const { RAPIDJSON_ASSERT(IsObject()); return data_.o.size == 0; }
-
- //! Get a value from an object associated with the name.
- /*! \pre IsObject() == true
- \tparam T Either \c Ch or \c const \c Ch (template used for disambiguation with \ref operator[](SizeType))
- \note In version 0.1x, if the member is not found, this function returns a null value. This makes issue 7.
- Since 0.2, if the name is not correct, it will assert.
- If user is unsure whether a member exists, user should use HasMember() first.
- A better approach is to use FindMember().
- \note Linear time complexity.
- */
- template <typename T>
- RAPIDJSON_DISABLEIF_RETURN((internal::NotExpr<internal::IsSame<typename internal::RemoveConst<T>::Type, Ch> >),(GenericValue&)) operator[](T* name) {
- GenericValue n(StringRef(name));
- return (*this)[n];
- }
- template <typename T>
- RAPIDJSON_DISABLEIF_RETURN((internal::NotExpr<internal::IsSame<typename internal::RemoveConst<T>::Type, Ch> >),(const GenericValue&)) operator[](T* name) const { return const_cast<GenericValue&>(*this)[name]; }
-
- //! Get a value from an object associated with the name.
- /*! \pre IsObject() == true
- \tparam SourceAllocator Allocator of the \c name value
-
- \note Compared to \ref operator[](T*), this version is faster because it does not need a StrLen().
- And it can also handle strings with embedded null characters.
-
- \note Linear time complexity.
- */
- template <typename SourceAllocator>
- GenericValue& operator[](const GenericValue<Encoding, SourceAllocator>& name) {
- MemberIterator member = FindMember(name);
- if (member != MemberEnd())
- return member->value;
- else {
- RAPIDJSON_ASSERT(false); // see above note
-
- // This will generate -Wexit-time-destructors in clang
- // static GenericValue NullValue;
- // return NullValue;
-
- // Use static buffer and placement-new to prevent destruction
- static char buffer[sizeof(GenericValue)];
- return *new (buffer) GenericValue();
- }
- }
- template <typename SourceAllocator>
- const GenericValue& operator[](const GenericValue<Encoding, SourceAllocator>& name) const { return const_cast<GenericValue&>(*this)[name]; }
-
-#if RAPIDJSON_HAS_STDSTRING
- //! Get a value from an object associated with name (string object).
- GenericValue& operator[](const std::basic_string<Ch>& name) { return (*this)[GenericValue(StringRef(name))]; }
- const GenericValue& operator[](const std::basic_string<Ch>& name) const { return (*this)[GenericValue(StringRef(name))]; }
-#endif
-
- //! Const member iterator
- /*! \pre IsObject() == true */
- ConstMemberIterator MemberBegin() const { RAPIDJSON_ASSERT(IsObject()); return ConstMemberIterator(data_.o.members); }
- //! Const \em past-the-end member iterator
- /*! \pre IsObject() == true */
- ConstMemberIterator MemberEnd() const { RAPIDJSON_ASSERT(IsObject()); return ConstMemberIterator(data_.o.members + data_.o.size); }
- //! Member iterator
- /*! \pre IsObject() == true */
- MemberIterator MemberBegin() { RAPIDJSON_ASSERT(IsObject()); return MemberIterator(data_.o.members); }
- //! \em Past-the-end member iterator
- /*! \pre IsObject() == true */
- MemberIterator MemberEnd() { RAPIDJSON_ASSERT(IsObject()); return MemberIterator(data_.o.members + data_.o.size); }
-
- //! Check whether a member exists in the object.
- /*!
- \param name Member name to be searched.
- \pre IsObject() == true
- \return Whether a member with that name exists.
- \note It is better to use FindMember() directly if you need the obtain the value as well.
- \note Linear time complexity.
- */
- bool HasMember(const Ch* name) const { return FindMember(name) != MemberEnd(); }
-
-#if RAPIDJSON_HAS_STDSTRING
- //! Check whether a member exists in the object with string object.
- /*!
- \param name Member name to be searched.
- \pre IsObject() == true
- \return Whether a member with that name exists.
- \note It is better to use FindMember() directly if you need the obtain the value as well.
- \note Linear time complexity.
- */
- bool HasMember(const std::basic_string<Ch>& name) const { return FindMember(name) != MemberEnd(); }
-#endif
-
- //! Check whether a member exists in the object with GenericValue name.
- /*!
- This version is faster because it does not need a StrLen(). It can also handle string with null character.
- \param name Member name to be searched.
- \pre IsObject() == true
- \return Whether a member with that name exists.
- \note It is better to use FindMember() directly if you need the obtain the value as well.
- \note Linear time complexity.
- */
- template <typename SourceAllocator>
- bool HasMember(const GenericValue<Encoding, SourceAllocator>& name) const { return FindMember(name) != MemberEnd(); }
-
- //! Find member by name.
- /*!
- \param name Member name to be searched.
- \pre IsObject() == true
- \return Iterator to member, if it exists.
- Otherwise returns \ref MemberEnd().
-
- \note Earlier versions of Rapidjson returned a \c NULL pointer, in case
- the requested member doesn't exist. For consistency with e.g.
- \c std::map, this has been changed to MemberEnd() now.
- \note Linear time complexity.
- */
- MemberIterator FindMember(const Ch* name) {
- GenericValue n(StringRef(name));
- return FindMember(n);
- }
-
- ConstMemberIterator FindMember(const Ch* name) const { return const_cast<GenericValue&>(*this).FindMember(name); }
-
- //! Find member by name.
- /*!
- This version is faster because it does not need a StrLen(). It can also handle string with null character.
- \param name Member name to be searched.
- \pre IsObject() == true
- \return Iterator to member, if it exists.
- Otherwise returns \ref MemberEnd().
-
- \note Earlier versions of Rapidjson returned a \c NULL pointer, in case
- the requested member doesn't exist. For consistency with e.g.
- \c std::map, this has been changed to MemberEnd() now.
- \note Linear time complexity.
- */
- template <typename SourceAllocator>
- MemberIterator FindMember(const GenericValue<Encoding, SourceAllocator>& name) {
- RAPIDJSON_ASSERT(IsObject());
- RAPIDJSON_ASSERT(name.IsString());
- MemberIterator member = MemberBegin();
- for ( ; member != MemberEnd(); ++member)
- if (name.StringEqual(member->name))
- break;
- return member;
- }
- template <typename SourceAllocator> ConstMemberIterator FindMember(const GenericValue<Encoding, SourceAllocator>& name) const { return const_cast<GenericValue&>(*this).FindMember(name); }
-
-#if RAPIDJSON_HAS_STDSTRING
- //! Find member by string object name.
- /*!
- \param name Member name to be searched.
- \pre IsObject() == true
- \return Iterator to member, if it exists.
- Otherwise returns \ref MemberEnd().
- */
- MemberIterator FindMember(const std::basic_string<Ch>& name) { return FindMember(StringRef(name)); }
- ConstMemberIterator FindMember(const std::basic_string<Ch>& name) const { return FindMember(StringRef(name)); }
-#endif
-
- //! Add a member (name-value pair) to the object.
- /*! \param name A string value as name of member.
- \param value Value of any type.
- \param allocator Allocator for reallocating memory. It must be the same one as used before. Commonly use GenericDocument::GetAllocator().
- \return The value itself for fluent API.
- \note The ownership of \c name and \c value will be transferred to this object on success.
- \pre IsObject() && name.IsString()
- \post name.IsNull() && value.IsNull()
- \note Amortized Constant time complexity.
- */
- GenericValue& AddMember(GenericValue& name, GenericValue& value, Allocator& allocator) {
- RAPIDJSON_ASSERT(IsObject());
- RAPIDJSON_ASSERT(name.IsString());
-
- Object& o = data_.o;
- if (o.size >= o.capacity) {
- if (o.capacity == 0) {
- o.capacity = kDefaultObjectCapacity;
- o.members = reinterpret_cast<Member*>(allocator.Malloc(o.capacity * sizeof(Member)));
- }
- else {
- SizeType oldCapacity = o.capacity;
- o.capacity += (oldCapacity + 1) / 2; // grow by factor 1.5
- o.members = reinterpret_cast<Member*>(allocator.Realloc(o.members, oldCapacity * sizeof(Member), o.capacity * sizeof(Member)));
- }
- }
- o.members[o.size].name.RawAssign(name);
- o.members[o.size].value.RawAssign(value);
- o.size++;
- return *this;
- }
-
- //! Add a constant string value as member (name-value pair) to the object.
- /*! \param name A string value as name of member.
- \param value constant string reference as value of member.
- \param allocator Allocator for reallocating memory. It must be the same one as used before. Commonly use GenericDocument::GetAllocator().
- \return The value itself for fluent API.
- \pre IsObject()
- \note This overload is needed to avoid clashes with the generic primitive type AddMember(GenericValue&,T,Allocator&) overload below.
- \note Amortized Constant time complexity.
- */
- GenericValue& AddMember(GenericValue& name, StringRefType value, Allocator& allocator) {
- GenericValue v(value);
- return AddMember(name, v, allocator);
- }
-
-#if RAPIDJSON_HAS_STDSTRING
- //! Add a string object as member (name-value pair) to the object.
- /*! \param name A string value as name of member.
- \param value constant string reference as value of member.
- \param allocator Allocator for reallocating memory. It must be the same one as used before. Commonly use GenericDocument::GetAllocator().
- \return The value itself for fluent API.
- \pre IsObject()
- \note This overload is needed to avoid clashes with the generic primitive type AddMember(GenericValue&,T,Allocator&) overload below.
- \note Amortized Constant time complexity.
- */
- GenericValue& AddMember(GenericValue& name, std::basic_string<Ch>& value, Allocator& allocator) {
- GenericValue v(value, allocator);
- return AddMember(name, v, allocator);
- }
-#endif
-
- //! Add any primitive value as member (name-value pair) to the object.
- /*! \tparam T Either \ref Type, \c int, \c unsigned, \c int64_t, \c uint64_t
- \param name A string value as name of member.
- \param value Value of primitive type \c T as value of member
- \param allocator Allocator for reallocating memory. Commonly use GenericDocument::GetAllocator().
- \return The value itself for fluent API.
- \pre IsObject()
-
- \note The source type \c T explicitly disallows all pointer types,
- especially (\c const) \ref Ch*. This helps avoiding implicitly
- referencing character strings with insufficient lifetime, use
- \ref AddMember(StringRefType, GenericValue&, Allocator&) or \ref
- AddMember(StringRefType, StringRefType, Allocator&).
- All other pointer types would implicitly convert to \c bool,
- use an explicit cast instead, if needed.
- \note Amortized Constant time complexity.
- */
- template <typename T>
- RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T>, internal::IsGenericValue<T> >), (GenericValue&))
- AddMember(GenericValue& name, T value, Allocator& allocator) {
- GenericValue v(value);
- return AddMember(name, v, allocator);
- }
-
-#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
- GenericValue& AddMember(GenericValue&& name, GenericValue&& value, Allocator& allocator) {
- return AddMember(name, value, allocator);
- }
- GenericValue& AddMember(GenericValue&& name, GenericValue& value, Allocator& allocator) {
- return AddMember(name, value, allocator);
- }
- GenericValue& AddMember(GenericValue& name, GenericValue&& value, Allocator& allocator) {
- return AddMember(name, value, allocator);
- }
- GenericValue& AddMember(StringRefType name, GenericValue&& value, Allocator& allocator) {
- GenericValue n(name);
- return AddMember(n, value, allocator);
- }
-#endif // RAPIDJSON_HAS_CXX11_RVALUE_REFS
-
-
- //! Add a member (name-value pair) to the object.
- /*! \param name A constant string reference as name of member.
- \param value Value of any type.
- \param allocator Allocator for reallocating memory. It must be the same one as used before. Commonly use GenericDocument::GetAllocator().
- \return The value itself for fluent API.
- \note The ownership of \c value will be transferred to this object on success.
- \pre IsObject()
- \post value.IsNull()
- \note Amortized Constant time complexity.
- */
- GenericValue& AddMember(StringRefType name, GenericValue& value, Allocator& allocator) {
- GenericValue n(name);
- return AddMember(n, value, allocator);
- }
-
- //! Add a constant string value as member (name-value pair) to the object.
- /*! \param name A constant string reference as name of member.
- \param value constant string reference as value of member.
- \param allocator Allocator for reallocating memory. It must be the same one as used before. Commonly use GenericDocument::GetAllocator().
- \return The value itself for fluent API.
- \pre IsObject()
- \note This overload is needed to avoid clashes with the generic primitive type AddMember(StringRefType,T,Allocator&) overload below.
- \note Amortized Constant time complexity.
- */
- GenericValue& AddMember(StringRefType name, StringRefType value, Allocator& allocator) {
- GenericValue v(value);
- return AddMember(name, v, allocator);
- }
-
- //! Add any primitive value as member (name-value pair) to the object.
- /*! \tparam T Either \ref Type, \c int, \c unsigned, \c int64_t, \c uint64_t
- \param name A constant string reference as name of member.
- \param value Value of primitive type \c T as value of member
- \param allocator Allocator for reallocating memory. Commonly use GenericDocument::GetAllocator().
- \return The value itself for fluent API.
- \pre IsObject()
-
- \note The source type \c T explicitly disallows all pointer types,
- especially (\c const) \ref Ch*. This helps avoiding implicitly
- referencing character strings with insufficient lifetime, use
- \ref AddMember(StringRefType, GenericValue&, Allocator&) or \ref
- AddMember(StringRefType, StringRefType, Allocator&).
- All other pointer types would implicitly convert to \c bool,
- use an explicit cast instead, if needed.
- \note Amortized Constant time complexity.
- */
- template <typename T>
- RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T>, internal::IsGenericValue<T> >), (GenericValue&))
- AddMember(StringRefType name, T value, Allocator& allocator) {
- GenericValue n(name);
- return AddMember(n, value, allocator);
- }
-
- //! Remove all members in the object.
- /*! This function do not deallocate memory in the object, i.e. the capacity is unchanged.
- \note Linear time complexity.
- */
- void RemoveAllMembers() {
- RAPIDJSON_ASSERT(IsObject());
- for (MemberIterator m = MemberBegin(); m != MemberEnd(); ++m)
- m->~Member();
- data_.o.size = 0;
- }
-
- //! Remove a member in object by its name.
- /*! \param name Name of member to be removed.
- \return Whether the member existed.
- \note This function may reorder the object members. Use \ref
- EraseMember(ConstMemberIterator) if you need to preserve the
- relative order of the remaining members.
- \note Linear time complexity.
- */
- bool RemoveMember(const Ch* name) {
- GenericValue n(StringRef(name));
- return RemoveMember(n);
- }
-
-#if RAPIDJSON_HAS_STDSTRING
- bool RemoveMember(const std::basic_string<Ch>& name) { return RemoveMember(GenericValue(StringRef(name))); }
-#endif
-
- template <typename SourceAllocator>
- bool RemoveMember(const GenericValue<Encoding, SourceAllocator>& name) {
- MemberIterator m = FindMember(name);
- if (m != MemberEnd()) {
- RemoveMember(m);
- return true;
- }
- else
- return false;
- }
-
- //! Remove a member in object by iterator.
- /*! \param m member iterator (obtained by FindMember() or MemberBegin()).
- \return the new iterator after removal.
- \note This function may reorder the object members. Use \ref
- EraseMember(ConstMemberIterator) if you need to preserve the
- relative order of the remaining members.
- \note Constant time complexity.
- */
- MemberIterator RemoveMember(MemberIterator m) {
- RAPIDJSON_ASSERT(IsObject());
- RAPIDJSON_ASSERT(data_.o.size > 0);
- RAPIDJSON_ASSERT(data_.o.members != 0);
- RAPIDJSON_ASSERT(m >= MemberBegin() && m < MemberEnd());
-
- MemberIterator last(data_.o.members + (data_.o.size - 1));
- if (data_.o.size > 1 && m != last) {
- // Move the last one to this place
- *m = *last;
- }
- else {
- // Only one left, just destroy
- m->~Member();
- }
- --data_.o.size;
- return m;
- }
-
- //! Remove a member from an object by iterator.
- /*! \param pos iterator to the member to remove
- \pre IsObject() == true && \ref MemberBegin() <= \c pos < \ref MemberEnd()
- \return Iterator following the removed element.
- If the iterator \c pos refers to the last element, the \ref MemberEnd() iterator is returned.
- \note This function preserves the relative order of the remaining object
- members. If you do not need this, use the more efficient \ref RemoveMember(MemberIterator).
- \note Linear time complexity.
- */
- MemberIterator EraseMember(ConstMemberIterator pos) {
- return EraseMember(pos, pos +1);
- }
-
- //! Remove members in the range [first, last) from an object.
- /*! \param first iterator to the first member to remove
- \param last iterator following the last member to remove
- \pre IsObject() == true && \ref MemberBegin() <= \c first <= \c last <= \ref MemberEnd()
- \return Iterator following the last removed element.
- \note This function preserves the relative order of the remaining object
- members.
- \note Linear time complexity.
- */
- MemberIterator EraseMember(ConstMemberIterator first, ConstMemberIterator last) {
- RAPIDJSON_ASSERT(IsObject());
- RAPIDJSON_ASSERT(data_.o.size > 0);
- RAPIDJSON_ASSERT(data_.o.members != 0);
- RAPIDJSON_ASSERT(first >= MemberBegin());
- RAPIDJSON_ASSERT(first <= last);
- RAPIDJSON_ASSERT(last <= MemberEnd());
-
- MemberIterator pos = MemberBegin() + (first - MemberBegin());
- for (MemberIterator itr = pos; itr != last; ++itr)
- itr->~Member();
- std::memmove(&*pos, &*last, static_cast<size_t>(MemberEnd() - last) * sizeof(Member));
- data_.o.size -= static_cast<SizeType>(last - first);
- return pos;
- }
-
- //! Erase a member in object by its name.
- /*! \param name Name of member to be removed.
- \return Whether the member existed.
- \note Linear time complexity.
- */
- bool EraseMember(const Ch* name) {
- GenericValue n(StringRef(name));
- return EraseMember(n);
- }
-
-#if RAPIDJSON_HAS_STDSTRING
- bool EraseMember(const std::basic_string<Ch>& name) { return EraseMember(GenericValue(StringRef(name))); }
-#endif
-
- template <typename SourceAllocator>
- bool EraseMember(const GenericValue<Encoding, SourceAllocator>& name) {
- MemberIterator m = FindMember(name);
- if (m != MemberEnd()) {
- EraseMember(m);
- return true;
- }
- else
- return false;
- }
-
- //@}
-
- //!@name Array
- //@{
-
- //! Set this value as an empty array.
- /*! \post IsArray == true */
- GenericValue& SetArray() { this->~GenericValue(); new (this) GenericValue(kArrayType); return *this; }
-
- //! Get the number of elements in array.
- SizeType Size() const { RAPIDJSON_ASSERT(IsArray()); return data_.a.size; }
-
- //! Get the capacity of array.
- SizeType Capacity() const { RAPIDJSON_ASSERT(IsArray()); return data_.a.capacity; }
-
- //! Check whether the array is empty.
- bool Empty() const { RAPIDJSON_ASSERT(IsArray()); return data_.a.size == 0; }
-
- //! Remove all elements in the array.
- /*! This function do not deallocate memory in the array, i.e. the capacity is unchanged.
- \note Linear time complexity.
- */
- void Clear() {
- RAPIDJSON_ASSERT(IsArray());
- for (SizeType i = 0; i < data_.a.size; ++i)
- data_.a.elements[i].~GenericValue();
- data_.a.size = 0;
- }
-
- //! Get an element from array by index.
- /*! \pre IsArray() == true
- \param index Zero-based index of element.
- \see operator[](T*)
- */
- GenericValue& operator[](SizeType index) {
- RAPIDJSON_ASSERT(IsArray());
- RAPIDJSON_ASSERT(index < data_.a.size);
- return data_.a.elements[index];
- }
- const GenericValue& operator[](SizeType index) const { return const_cast<GenericValue&>(*this)[index]; }
-
- //! Element iterator
- /*! \pre IsArray() == true */
- ValueIterator Begin() { RAPIDJSON_ASSERT(IsArray()); return data_.a.elements; }
- //! \em Past-the-end element iterator
- /*! \pre IsArray() == true */
- ValueIterator End() { RAPIDJSON_ASSERT(IsArray()); return data_.a.elements + data_.a.size; }
- //! Constant element iterator
- /*! \pre IsArray() == true */
- ConstValueIterator Begin() const { return const_cast<GenericValue&>(*this).Begin(); }
- //! Constant \em past-the-end element iterator
- /*! \pre IsArray() == true */
- ConstValueIterator End() const { return const_cast<GenericValue&>(*this).End(); }
-
- //! Request the array to have enough capacity to store elements.
- /*! \param newCapacity The capacity that the array at least need to have.
- \param allocator Allocator for reallocating memory. It must be the same one as used before. Commonly use GenericDocument::GetAllocator().
- \return The value itself for fluent API.
- \note Linear time complexity.
- */
- GenericValue& Reserve(SizeType newCapacity, Allocator &allocator) {
- RAPIDJSON_ASSERT(IsArray());
- if (newCapacity > data_.a.capacity) {
- data_.a.elements = static_cast<GenericValue*>(allocator.Realloc(data_.a.elements, data_.a.capacity * sizeof(GenericValue), newCapacity * sizeof(GenericValue)));
- data_.a.capacity = newCapacity;
- }
- return *this;
- }
-
- //! Append a GenericValue at the end of the array.
- /*! \param value Value to be appended.
- \param allocator Allocator for reallocating memory. It must be the same one as used before. Commonly use GenericDocument::GetAllocator().
- \pre IsArray() == true
- \post value.IsNull() == true
- \return The value itself for fluent API.
- \note The ownership of \c value will be transferred to this array on success.
- \note If the number of elements to be appended is known, calls Reserve() once first may be more efficient.
- \note Amortized constant time complexity.
- */
- GenericValue& PushBack(GenericValue& value, Allocator& allocator) {
- RAPIDJSON_ASSERT(IsArray());
- if (data_.a.size >= data_.a.capacity)
- Reserve(data_.a.capacity == 0 ? kDefaultArrayCapacity : (data_.a.capacity + (data_.a.capacity + 1) / 2), allocator);
- data_.a.elements[data_.a.size++].RawAssign(value);
- return *this;
- }
-
-#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
- GenericValue& PushBack(GenericValue&& value, Allocator& allocator) {
- return PushBack(value, allocator);
- }
-#endif // RAPIDJSON_HAS_CXX11_RVALUE_REFS
-
- //! Append a constant string reference at the end of the array.
- /*! \param value Constant string reference to be appended.
- \param allocator Allocator for reallocating memory. It must be the same one used previously. Commonly use GenericDocument::GetAllocator().
- \pre IsArray() == true
- \return The value itself for fluent API.
- \note If the number of elements to be appended is known, calls Reserve() once first may be more efficient.
- \note Amortized constant time complexity.
- \see GenericStringRef
- */
- GenericValue& PushBack(StringRefType value, Allocator& allocator) {
- return (*this).template PushBack<StringRefType>(value, allocator);
- }
-
- //! Append a primitive value at the end of the array.
- /*! \tparam T Either \ref Type, \c int, \c unsigned, \c int64_t, \c uint64_t
- \param value Value of primitive type T to be appended.
- \param allocator Allocator for reallocating memory. It must be the same one as used before. Commonly use GenericDocument::GetAllocator().
- \pre IsArray() == true
- \return The value itself for fluent API.
- \note If the number of elements to be appended is known, calls Reserve() once first may be more efficient.
-
- \note The source type \c T explicitly disallows all pointer types,
- especially (\c const) \ref Ch*. This helps avoiding implicitly
- referencing character strings with insufficient lifetime, use
- \ref PushBack(GenericValue&, Allocator&) or \ref
- PushBack(StringRefType, Allocator&).
- All other pointer types would implicitly convert to \c bool,
- use an explicit cast instead, if needed.
- \note Amortized constant time complexity.
- */
- template <typename T>
- RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T>, internal::IsGenericValue<T> >), (GenericValue&))
- PushBack(T value, Allocator& allocator) {
- GenericValue v(value);
- return PushBack(v, allocator);
- }
-
- //! Remove the last element in the array.
- /*!
- \note Constant time complexity.
- */
- GenericValue& PopBack() {
- RAPIDJSON_ASSERT(IsArray());
- RAPIDJSON_ASSERT(!Empty());
- data_.a.elements[--data_.a.size].~GenericValue();
- return *this;
- }
-
- //! Remove an element of array by iterator.
- /*!
- \param pos iterator to the element to remove
- \pre IsArray() == true && \ref Begin() <= \c pos < \ref End()
- \return Iterator following the removed element. If the iterator pos refers to the last element, the End() iterator is returned.
- \note Linear time complexity.
- */
- ValueIterator Erase(ConstValueIterator pos) {
- return Erase(pos, pos + 1);
- }
-
- //! Remove elements in the range [first, last) of the array.
- /*!
- \param first iterator to the first element to remove
- \param last iterator following the last element to remove
- \pre IsArray() == true && \ref Begin() <= \c first <= \c last <= \ref End()
- \return Iterator following the last removed element.
- \note Linear time complexity.
- */
- ValueIterator Erase(ConstValueIterator first, ConstValueIterator last) {
- RAPIDJSON_ASSERT(IsArray());
- RAPIDJSON_ASSERT(data_.a.size > 0);
- RAPIDJSON_ASSERT(data_.a.elements != 0);
- RAPIDJSON_ASSERT(first >= Begin());
- RAPIDJSON_ASSERT(first <= last);
- RAPIDJSON_ASSERT(last <= End());
- ValueIterator pos = Begin() + (first - Begin());
- for (ValueIterator itr = pos; itr != last; ++itr)
- itr->~GenericValue();
- std::memmove(pos, last, static_cast<size_t>(End() - last) * sizeof(GenericValue));
- data_.a.size -= static_cast<SizeType>(last - first);
- return pos;
- }
-
- //@}
-
- //!@name Number
- //@{
-
- int GetInt() const { RAPIDJSON_ASSERT(flags_ & kIntFlag); return data_.n.i.i; }
- unsigned GetUint() const { RAPIDJSON_ASSERT(flags_ & kUintFlag); return data_.n.u.u; }
- int64_t GetInt64() const { RAPIDJSON_ASSERT(flags_ & kInt64Flag); return data_.n.i64; }
- uint64_t GetUint64() const { RAPIDJSON_ASSERT(flags_ & kUint64Flag); return data_.n.u64; }
-
- //! Get the value as double type.
- /*! \note If the value is 64-bit integer type, it may lose precision. Use \c IsLosslessDouble() to check whether the converison is lossless.
- */
- double GetDouble() const {
- RAPIDJSON_ASSERT(IsNumber());
- if ((flags_ & kDoubleFlag) != 0) return data_.n.d; // exact type, no conversion.
- if ((flags_ & kIntFlag) != 0) return data_.n.i.i; // int -> double
- if ((flags_ & kUintFlag) != 0) return data_.n.u.u; // unsigned -> double
- if ((flags_ & kInt64Flag) != 0) return static_cast<double>(data_.n.i64); // int64_t -> double (may lose precision)
- RAPIDJSON_ASSERT((flags_ & kUint64Flag) != 0); return static_cast<double>(data_.n.u64); // uint64_t -> double (may lose precision)
- }
-
- //! Get the value as float type.
- /*! \note If the value is 64-bit integer type, it may lose precision. Use \c IsLosslessFloat() to check whether the converison is lossless.
- */
- float GetFloat() const {
- RAPIDJSON_ASSERT(IsFloat());
- return static_cast<float>(GetDouble());
- }
-
- GenericValue& SetInt(int i) { this->~GenericValue(); new (this) GenericValue(i); return *this; }
- GenericValue& SetUint(unsigned u) { this->~GenericValue(); new (this) GenericValue(u); return *this; }
- GenericValue& SetInt64(int64_t i64) { this->~GenericValue(); new (this) GenericValue(i64); return *this; }
- GenericValue& SetUint64(uint64_t u64) { this->~GenericValue(); new (this) GenericValue(u64); return *this; }
- GenericValue& SetDouble(double d) { this->~GenericValue(); new (this) GenericValue(d); return *this; }
- GenericValue& SetFloat(float f) { this->~GenericValue(); new (this) GenericValue(f); return *this; }
-
- //@}
-
- //!@name String
- //@{
-
- const Ch* GetString() const { RAPIDJSON_ASSERT(IsString()); return ((flags_ & kInlineStrFlag) ? data_.ss.str : data_.s.str); }
-
- //! Get the length of string.
- /*! Since rapidjson permits "\\u0000" in the json string, strlen(v.GetString()) may not equal to v.GetStringLength().
- */
- SizeType GetStringLength() const { RAPIDJSON_ASSERT(IsString()); return ((flags_ & kInlineStrFlag) ? (data_.ss.GetLength()) : data_.s.length); }
-
- //! Set this value as a string without copying source string.
- /*! This version has better performance with supplied length, and also support string containing null character.
- \param s source string pointer.
- \param length The length of source string, excluding the trailing null terminator.
- \return The value itself for fluent API.
- \post IsString() == true && GetString() == s && GetStringLength() == length
- \see SetString(StringRefType)
- */
- GenericValue& SetString(const Ch* s, SizeType length) { return SetString(StringRef(s, length)); }
-
- //! Set this value as a string without copying source string.
- /*! \param s source string reference
- \return The value itself for fluent API.
- \post IsString() == true && GetString() == s && GetStringLength() == s.length
- */
- GenericValue& SetString(StringRefType s) { this->~GenericValue(); SetStringRaw(s); return *this; }
-
- //! Set this value as a string by copying from source string.
- /*! This version has better performance with supplied length, and also support string containing null character.
- \param s source string.
- \param length The length of source string, excluding the trailing null terminator.
- \param allocator Allocator for allocating copied buffer. Commonly use GenericDocument::GetAllocator().
- \return The value itself for fluent API.
- \post IsString() == true && GetString() != s && strcmp(GetString(),s) == 0 && GetStringLength() == length
- */
- GenericValue& SetString(const Ch* s, SizeType length, Allocator& allocator) { this->~GenericValue(); SetStringRaw(StringRef(s, length), allocator); return *this; }
-
- //! Set this value as a string by copying from source string.
- /*! \param s source string.
- \param allocator Allocator for allocating copied buffer. Commonly use GenericDocument::GetAllocator().
- \return The value itself for fluent API.
- \post IsString() == true && GetString() != s && strcmp(GetString(),s) == 0 && GetStringLength() == length
- */
- GenericValue& SetString(const Ch* s, Allocator& allocator) { return SetString(s, internal::StrLen(s), allocator); }
-
-#if RAPIDJSON_HAS_STDSTRING
- //! Set this value as a string by copying from source string.
- /*! \param s source string.
- \param allocator Allocator for allocating copied buffer. Commonly use GenericDocument::GetAllocator().
- \return The value itself for fluent API.
- \post IsString() == true && GetString() != s.data() && strcmp(GetString(),s.data() == 0 && GetStringLength() == s.size()
- \note Requires the definition of the preprocessor symbol \ref RAPIDJSON_HAS_STDSTRING.
- */
- GenericValue& SetString(const std::basic_string<Ch>& s, Allocator& allocator) { return SetString(s.data(), SizeType(s.size()), allocator); }
-#endif
-
- //@}
-
- //! Generate events of this value to a Handler.
- /*! This function adopts the GoF visitor pattern.
- Typical usage is to output this JSON value as JSON text via Writer, which is a Handler.
- It can also be used to deep clone this value via GenericDocument, which is also a Handler.
- \tparam Handler type of handler.
- \param handler An object implementing concept Handler.
- */
- template <typename Handler>
- bool Accept(Handler& handler) const {
- switch(GetType()) {
- case kNullType: return handler.Null();
- case kFalseType: return handler.Bool(false);
- case kTrueType: return handler.Bool(true);
-
- case kObjectType:
- if (RAPIDJSON_UNLIKELY(!handler.StartObject()))
- return false;
- for (ConstMemberIterator m = MemberBegin(); m != MemberEnd(); ++m) {
- RAPIDJSON_ASSERT(m->name.IsString()); // User may change the type of name by MemberIterator.
- if (RAPIDJSON_UNLIKELY(!handler.Key(m->name.GetString(), m->name.GetStringLength(), (m->name.flags_ & kCopyFlag) != 0)))
- return false;
- if (RAPIDJSON_UNLIKELY(!m->value.Accept(handler)))
- return false;
- }
- return handler.EndObject(data_.o.size);
-
- case kArrayType:
- if (RAPIDJSON_UNLIKELY(!handler.StartArray()))
- return false;
- for (const GenericValue* v = data_.a.elements; v != data_.a.elements + data_.a.size; ++v)
- if (RAPIDJSON_UNLIKELY(!v->Accept(handler)))
- return false;
- return handler.EndArray(data_.a.size);
-
- case kStringType:
- return handler.String(GetString(), GetStringLength(), (flags_ & kCopyFlag) != 0);
-
- default:
- RAPIDJSON_ASSERT(GetType() == kNumberType);
- if (IsDouble()) return handler.Double(data_.n.d);
- else if (IsInt()) return handler.Int(data_.n.i.i);
- else if (IsUint()) return handler.Uint(data_.n.u.u);
- else if (IsInt64()) return handler.Int64(data_.n.i64);
- else return handler.Uint64(data_.n.u64);
- }
- }
-
-private:
- template <typename, typename> friend class GenericValue;
- template <typename, typename, typename> friend class GenericDocument;
-
- enum {
- kBoolFlag = 0x100,
- kNumberFlag = 0x200,
- kIntFlag = 0x400,
- kUintFlag = 0x800,
- kInt64Flag = 0x1000,
- kUint64Flag = 0x2000,
- kDoubleFlag = 0x4000,
- kStringFlag = 0x100000,
- kCopyFlag = 0x200000,
- kInlineStrFlag = 0x400000,
-
- // Initial flags of different types.
- kNullFlag = kNullType,
- kTrueFlag = kTrueType | kBoolFlag,
- kFalseFlag = kFalseType | kBoolFlag,
- kNumberIntFlag = kNumberType | kNumberFlag | kIntFlag | kInt64Flag,
- kNumberUintFlag = kNumberType | kNumberFlag | kUintFlag | kUint64Flag | kInt64Flag,
- kNumberInt64Flag = kNumberType | kNumberFlag | kInt64Flag,
- kNumberUint64Flag = kNumberType | kNumberFlag | kUint64Flag,
- kNumberDoubleFlag = kNumberType | kNumberFlag | kDoubleFlag,
- kNumberAnyFlag = kNumberType | kNumberFlag | kIntFlag | kInt64Flag | kUintFlag | kUint64Flag | kDoubleFlag,
- kConstStringFlag = kStringType | kStringFlag,
- kCopyStringFlag = kStringType | kStringFlag | kCopyFlag,
- kShortStringFlag = kStringType | kStringFlag | kCopyFlag | kInlineStrFlag,
- kObjectFlag = kObjectType,
- kArrayFlag = kArrayType,
-
- kTypeMask = 0xFF // bitwise-and with mask of 0xFF can be optimized by compiler
- };
-
- static const SizeType kDefaultArrayCapacity = 16;
- static const SizeType kDefaultObjectCapacity = 16;
-
- struct String {
- const Ch* str;
- SizeType length;
- unsigned hashcode; //!< reserved
- }; // 12 bytes in 32-bit mode, 16 bytes in 64-bit mode
-
- // implementation detail: ShortString can represent zero-terminated strings up to MaxSize chars
- // (excluding the terminating zero) and store a value to determine the length of the contained
- // string in the last character str[LenPos] by storing "MaxSize - length" there. If the string
- // to store has the maximal length of MaxSize then str[LenPos] will be 0 and therefore act as
- // the string terminator as well. For getting the string length back from that value just use
- // "MaxSize - str[LenPos]".
- // This allows to store 11-chars strings in 32-bit mode and 15-chars strings in 64-bit mode
- // inline (for `UTF8`-encoded strings).
- struct ShortString {
- enum { MaxChars = sizeof(String) / sizeof(Ch), MaxSize = MaxChars - 1, LenPos = MaxSize };
- Ch str[MaxChars];
-
- inline static bool Usable(SizeType len) { return (MaxSize >= len); }
- inline void SetLength(SizeType len) { str[LenPos] = static_cast<Ch>(MaxSize - len); }
- inline SizeType GetLength() const { return static_cast<SizeType>(MaxSize - str[LenPos]); }
- }; // at most as many bytes as "String" above => 12 bytes in 32-bit mode, 16 bytes in 64-bit mode
-
- // By using proper binary layout, retrieval of different integer types do not need conversions.
- union Number {
-#if RAPIDJSON_ENDIAN == RAPIDJSON_LITTLEENDIAN
- struct I {
- int i;
- char padding[4];
- }i;
- struct U {
- unsigned u;
- char padding2[4];
- }u;
-#else
- struct I {
- char padding[4];
- int i;
- }i;
- struct U {
- char padding2[4];
- unsigned u;
- }u;
-#endif
- int64_t i64;
- uint64_t u64;
- double d;
- }; // 8 bytes
-
- struct Object {
- Member* members;
- SizeType size;
- SizeType capacity;
- }; // 12 bytes in 32-bit mode, 16 bytes in 64-bit mode
-
- struct Array {
- GenericValue* elements;
- SizeType size;
- SizeType capacity;
- }; // 12 bytes in 32-bit mode, 16 bytes in 64-bit mode
-
- union Data {
- String s;
- ShortString ss;
- Number n;
- Object o;
- Array a;
- }; // 12 bytes in 32-bit mode, 16 bytes in 64-bit mode
-
- // Initialize this value as array with initial data, without calling destructor.
- void SetArrayRaw(GenericValue* values, SizeType count, Allocator& allocator) {
- flags_ = kArrayFlag;
- if (count) {
- data_.a.elements = static_cast<GenericValue*>(allocator.Malloc(count * sizeof(GenericValue)));
- std::memcpy(data_.a.elements, values, count * sizeof(GenericValue));
- }
- else
- data_.a.elements = NULL;
- data_.a.size = data_.a.capacity = count;
- }
-
- //! Initialize this value as object with initial data, without calling destructor.
- void SetObjectRaw(Member* members, SizeType count, Allocator& allocator) {
- flags_ = kObjectFlag;
- if (count) {
- data_.o.members = static_cast<Member*>(allocator.Malloc(count * sizeof(Member)));
- std::memcpy(data_.o.members, members, count * sizeof(Member));
- }
- else
- data_.o.members = NULL;
- data_.o.size = data_.o.capacity = count;
- }
-
- //! Initialize this value as constant string, without calling destructor.
- void SetStringRaw(StringRefType s) RAPIDJSON_NOEXCEPT {
- flags_ = kConstStringFlag;
- data_.s.str = s;
- data_.s.length = s.length;
- }
-
- //! Initialize this value as copy string with initial data, without calling destructor.
- void SetStringRaw(StringRefType s, Allocator& allocator) {
- Ch* str = NULL;
- if(ShortString::Usable(s.length)) {
- flags_ = kShortStringFlag;
- data_.ss.SetLength(s.length);
- str = data_.ss.str;
- } else {
- flags_ = kCopyStringFlag;
- data_.s.length = s.length;
- str = static_cast<Ch *>(allocator.Malloc((s.length + 1) * sizeof(Ch)));
- data_.s.str = str;
- }
- std::memcpy(str, s, s.length * sizeof(Ch));
- str[s.length] = '\0';
- }
-
- //! Assignment without calling destructor
- void RawAssign(GenericValue& rhs) RAPIDJSON_NOEXCEPT {
- data_ = rhs.data_;
- flags_ = rhs.flags_;
- rhs.flags_ = kNullFlag;
- }
-
- template <typename SourceAllocator>
- bool StringEqual(const GenericValue<Encoding, SourceAllocator>& rhs) const {
- RAPIDJSON_ASSERT(IsString());
- RAPIDJSON_ASSERT(rhs.IsString());
-
- const SizeType len1 = GetStringLength();
- const SizeType len2 = rhs.GetStringLength();
- if(len1 != len2) { return false; }
-
- const Ch* const str1 = GetString();
- const Ch* const str2 = rhs.GetString();
- if(str1 == str2) { return true; } // fast path for constant string
-
- return (std::memcmp(str1, str2, sizeof(Ch) * len1) == 0);
- }
-
- Data data_;
- unsigned flags_;
-};
-
-//! GenericValue with UTF8 encoding
-typedef GenericValue<UTF8<> > Value;
-
-///////////////////////////////////////////////////////////////////////////////
-// GenericDocument
-
-//! A document for parsing JSON text as DOM.
-/*!
- \note implements Handler concept
- \tparam Encoding Encoding for both parsing and string storage.
- \tparam Allocator Allocator for allocating memory for the DOM
- \tparam StackAllocator Allocator for allocating memory for stack during parsing.
- \warning Although GenericDocument inherits from GenericValue, the API does \b not provide any virtual functions, especially no virtual destructor. To avoid memory leaks, do not \c delete a GenericDocument object via a pointer to a GenericValue.
-*/
-template <typename Encoding, typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
-class GenericDocument : public GenericValue<Encoding, Allocator> {
-public:
- typedef typename Encoding::Ch Ch; //!< Character type derived from Encoding.
- typedef GenericValue<Encoding, Allocator> ValueType; //!< Value type of the document.
- typedef Allocator AllocatorType; //!< Allocator type from template parameter.
-
- //! Constructor
- /*! Creates an empty document of specified type.
- \param type Mandatory type of object to create.
- \param allocator Optional allocator for allocating memory.
- \param stackCapacity Optional initial capacity of stack in bytes.
- \param stackAllocator Optional allocator for allocating memory for stack.
- */
- explicit GenericDocument(Type type, Allocator* allocator = 0, size_t stackCapacity = kDefaultStackCapacity, StackAllocator* stackAllocator = 0) :
- GenericValue<Encoding, Allocator>(type), allocator_(allocator), ownAllocator_(0), stack_(stackAllocator, stackCapacity), parseResult_()
- {
- if (!allocator_)
- ownAllocator_ = allocator_ = RAPIDJSON_NEW(Allocator());
- }
-
- //! Constructor
- /*! Creates an empty document which type is Null.
- \param allocator Optional allocator for allocating memory.
- \param stackCapacity Optional initial capacity of stack in bytes.
- \param stackAllocator Optional allocator for allocating memory for stack.
- */
- GenericDocument(Allocator* allocator = 0, size_t stackCapacity = kDefaultStackCapacity, StackAllocator* stackAllocator = 0) :
- allocator_(allocator), ownAllocator_(0), stack_(stackAllocator, stackCapacity), parseResult_()
- {
- if (!allocator_)
- ownAllocator_ = allocator_ = RAPIDJSON_NEW(Allocator());
- }
-
-#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
- //! Move constructor in C++11
- GenericDocument(GenericDocument&& rhs) RAPIDJSON_NOEXCEPT
- : ValueType(std::forward<ValueType>(rhs)), // explicit cast to avoid prohibited move from Document
- allocator_(rhs.allocator_),
- ownAllocator_(rhs.ownAllocator_),
- stack_(std::move(rhs.stack_)),
- parseResult_(rhs.parseResult_)
- {
- rhs.allocator_ = 0;
- rhs.ownAllocator_ = 0;
- rhs.parseResult_ = ParseResult();
- }
-#endif
-
- ~GenericDocument() {
- Destroy();
- }
-
-#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
- //! Move assignment in C++11
- GenericDocument& operator=(GenericDocument&& rhs) RAPIDJSON_NOEXCEPT
- {
- // The cast to ValueType is necessary here, because otherwise it would
- // attempt to call GenericValue's templated assignment operator.
- ValueType::operator=(std::forward<ValueType>(rhs));
-
- // Calling the destructor here would prematurely call stack_'s destructor
- Destroy();
-
- allocator_ = rhs.allocator_;
- ownAllocator_ = rhs.ownAllocator_;
- stack_ = std::move(rhs.stack_);
- parseResult_ = rhs.parseResult_;
-
- rhs.allocator_ = 0;
- rhs.ownAllocator_ = 0;
- rhs.parseResult_ = ParseResult();
-
- return *this;
- }
-#endif
-
- //! Exchange the contents of this document with those of another.
- /*!
- \param rhs Another document.
- \note Constant complexity.
- \see GenericValue::Swap
- */
- GenericDocument& Swap(GenericDocument& rhs) RAPIDJSON_NOEXCEPT {
- ValueType::Swap(rhs);
- stack_.Swap(rhs.stack_);
- internal::Swap(allocator_, rhs.allocator_);
- internal::Swap(ownAllocator_, rhs.ownAllocator_);
- internal::Swap(parseResult_, rhs.parseResult_);
- return *this;
- }
-
- //! free-standing swap function helper
- /*!
- Helper function to enable support for common swap implementation pattern based on \c std::swap:
- \code
- void swap(MyClass& a, MyClass& b) {
- using std::swap;
- swap(a.doc, b.doc);
- // ...
- }
- \endcode
- \see Swap()
- */
- friend inline void swap(GenericDocument& a, GenericDocument& b) RAPIDJSON_NOEXCEPT { a.Swap(b); }
-
- //! Populate this document by a generator which produces SAX events.
- /*! \tparam Generator A functor with <tt>bool f(Handler)</tt> prototype.
- \param g Generator functor which sends SAX events to the parameter.
- \return The document itself for fluent API.
- */
- template <typename Generator>
- GenericDocument& Populate(Generator& g) {
- ClearStackOnExit scope(*this);
- if (g(*this)) {
- RAPIDJSON_ASSERT(stack_.GetSize() == sizeof(ValueType)); // Got one and only one root object
- ValueType::operator=(*stack_.template Pop<ValueType>(1));// Move value from stack to document
- }
- return *this;
- }
-
- //!@name Parse from stream
- //!@{
-
- //! Parse JSON text from an input stream (with Encoding conversion)
- /*! \tparam parseFlags Combination of \ref ParseFlag.
- \tparam SourceEncoding Encoding of input stream
- \tparam InputStream Type of input stream, implementing Stream concept
- \param is Input stream to be parsed.
- \return The document itself for fluent API.
- */
- template <unsigned parseFlags, typename SourceEncoding, typename InputStream>
- GenericDocument& ParseStream(InputStream& is) {
- GenericReader<SourceEncoding, Encoding, StackAllocator> reader(
- stack_.HasAllocator() ? &stack_.GetAllocator() : 0);
- ClearStackOnExit scope(*this);
- parseResult_ = reader.template Parse<parseFlags>(is, *this);
- if (parseResult_) {
- RAPIDJSON_ASSERT(stack_.GetSize() == sizeof(ValueType)); // Got one and only one root object
- ValueType::operator=(*stack_.template Pop<ValueType>(1));// Move value from stack to document
- }
- return *this;
- }
-
- //! Parse JSON text from an input stream
- /*! \tparam parseFlags Combination of \ref ParseFlag.
- \tparam InputStream Type of input stream, implementing Stream concept
- \param is Input stream to be parsed.
- \return The document itself for fluent API.
- */
- template <unsigned parseFlags, typename InputStream>
- GenericDocument& ParseStream(InputStream& is) {
- return ParseStream<parseFlags, Encoding, InputStream>(is);
- }
-
- //! Parse JSON text from an input stream (with \ref kParseDefaultFlags)
- /*! \tparam InputStream Type of input stream, implementing Stream concept
- \param is Input stream to be parsed.
- \return The document itself for fluent API.
- */
- template <typename InputStream>
- GenericDocument& ParseStream(InputStream& is) {
- return ParseStream<kParseDefaultFlags, Encoding, InputStream>(is);
- }
- //!@}
-
- //!@name Parse in-place from mutable string
- //!@{
-
- //! Parse JSON text from a mutable string
- /*! \tparam parseFlags Combination of \ref ParseFlag.
- \param str Mutable zero-terminated string to be parsed.
- \return The document itself for fluent API.
- */
- template <unsigned parseFlags>
- GenericDocument& ParseInsitu(Ch* str) {
- GenericInsituStringStream<Encoding> s(str);
- return ParseStream<parseFlags | kParseInsituFlag>(s);
- }
-
- //! Parse JSON text from a mutable string (with \ref kParseDefaultFlags)
- /*! \param str Mutable zero-terminated string to be parsed.
- \return The document itself for fluent API.
- */
- GenericDocument& ParseInsitu(Ch* str) {
- return ParseInsitu<kParseDefaultFlags>(str);
- }
- //!@}
-
- //!@name Parse from read-only string
- //!@{
-
- //! Parse JSON text from a read-only string (with Encoding conversion)
- /*! \tparam parseFlags Combination of \ref ParseFlag (must not contain \ref kParseInsituFlag).
- \tparam SourceEncoding Transcoding from input Encoding
- \param str Read-only zero-terminated string to be parsed.
- */
- template <unsigned parseFlags, typename SourceEncoding>
- GenericDocument& Parse(const typename SourceEncoding::Ch* str) {
- RAPIDJSON_ASSERT(!(parseFlags & kParseInsituFlag));
- GenericStringStream<SourceEncoding> s(str);
- return ParseStream<parseFlags, SourceEncoding>(s);
- }
-
- //! Parse JSON text from a read-only string
- /*! \tparam parseFlags Combination of \ref ParseFlag (must not contain \ref kParseInsituFlag).
- \param str Read-only zero-terminated string to be parsed.
- */
- template <unsigned parseFlags>
- GenericDocument& Parse(const Ch* str) {
- return Parse<parseFlags, Encoding>(str);
- }
-
- //! Parse JSON text from a read-only string (with \ref kParseDefaultFlags)
- /*! \param str Read-only zero-terminated string to be parsed.
- */
- GenericDocument& Parse(const Ch* str) {
- return Parse<kParseDefaultFlags>(str);
- }
- //!@}
-
- //!@name Handling parse errors
- //!@{
-
- //! Whether a parse error has occured in the last parsing.
- bool HasParseError() const { return parseResult_.IsError(); }
-
- //! Get the \ref ParseErrorCode of last parsing.
- ParseErrorCode GetParseError() const { return parseResult_.Code(); }
-
- //! Get the position of last parsing error in input, 0 otherwise.
- size_t GetErrorOffset() const { return parseResult_.Offset(); }
-
- //! Implicit conversion to get the last parse result
-#ifndef __clang // -Wdocumentation
- /*! \return \ref ParseResult of the last parse operation
-
- \code
- Document doc;
- ParseResult ok = doc.Parse(json);
- if (!ok)
- printf( "JSON parse error: %s (%u)\n", GetParseError_En(ok.Code()), ok.Offset());
- \endcode
- */
-#endif
- operator ParseResult() const { return parseResult_; }
- //!@}
-
- //! Get the allocator of this document.
- Allocator& GetAllocator() {
- RAPIDJSON_ASSERT(allocator_);
- return *allocator_;
- }
-
- //! Get the capacity of stack in bytes.
- size_t GetStackCapacity() const { return stack_.GetCapacity(); }
-
-private:
- // clear stack on any exit from ParseStream, e.g. due to exception
- struct ClearStackOnExit {
- explicit ClearStackOnExit(GenericDocument& d) : d_(d) {}
- ~ClearStackOnExit() { d_.ClearStack(); }
- private:
- ClearStackOnExit(const ClearStackOnExit&);
- ClearStackOnExit& operator=(const ClearStackOnExit&);
- GenericDocument& d_;
- };
-
- // callers of the following private Handler functions
- // template <typename,typename,typename> friend class GenericReader; // for parsing
- template <typename, typename> friend class GenericValue; // for deep copying
-
-public:
- // Implementation of Handler
- bool Null() { new (stack_.template Push<ValueType>()) ValueType(); return true; }
- bool Bool(bool b) { new (stack_.template Push<ValueType>()) ValueType(b); return true; }
- bool Int(int i) { new (stack_.template Push<ValueType>()) ValueType(i); return true; }
- bool Uint(unsigned i) { new (stack_.template Push<ValueType>()) ValueType(i); return true; }
- bool Int64(int64_t i) { new (stack_.template Push<ValueType>()) ValueType(i); return true; }
- bool Uint64(uint64_t i) { new (stack_.template Push<ValueType>()) ValueType(i); return true; }
- bool Double(double d) { new (stack_.template Push<ValueType>()) ValueType(d); return true; }
-
- bool String(const Ch* str, SizeType length, bool copy) {
- if (copy)
- new (stack_.template Push<ValueType>()) ValueType(str, length, GetAllocator());
- else
- new (stack_.template Push<ValueType>()) ValueType(str, length);
- return true;
- }
-
- bool StartObject() { new (stack_.template Push<ValueType>()) ValueType(kObjectType); return true; }
-
- bool Key(const Ch* str, SizeType length, bool copy) { return String(str, length, copy); }
-
- bool EndObject(SizeType memberCount) {
- typename ValueType::Member* members = stack_.template Pop<typename ValueType::Member>(memberCount);
- stack_.template Top<ValueType>()->SetObjectRaw(members, memberCount, GetAllocator());
- return true;
- }
-
- bool StartArray() { new (stack_.template Push<ValueType>()) ValueType(kArrayType); return true; }
-
- bool EndArray(SizeType elementCount) {
- ValueType* elements = stack_.template Pop<ValueType>(elementCount);
- stack_.template Top<ValueType>()->SetArrayRaw(elements, elementCount, GetAllocator());
- return true;
- }
-
-private:
- //! Prohibit copying
- GenericDocument(const GenericDocument&);
- //! Prohibit assignment
- GenericDocument& operator=(const GenericDocument&);
-
- void ClearStack() {
- if (Allocator::kNeedFree)
- while (stack_.GetSize() > 0) // Here assumes all elements in stack array are GenericValue (Member is actually 2 GenericValue objects)
- (stack_.template Pop<ValueType>(1))->~ValueType();
- else
- stack_.Clear();
- stack_.ShrinkToFit();
- }
-
- void Destroy() {
- RAPIDJSON_DELETE(ownAllocator_);
- }
-
- static const size_t kDefaultStackCapacity = 1024;
- Allocator* allocator_;
- Allocator* ownAllocator_;
- internal::Stack<StackAllocator> stack_;
- ParseResult parseResult_;
-};
-
-//! GenericDocument with UTF8 encoding
-typedef GenericDocument<UTF8<> > Document;
-
-// defined here due to the dependency on GenericDocument
-template <typename Encoding, typename Allocator>
-template <typename SourceAllocator>
-inline
-GenericValue<Encoding,Allocator>::GenericValue(const GenericValue<Encoding,SourceAllocator>& rhs, Allocator& allocator)
-{
- switch (rhs.GetType()) {
- case kObjectType:
- case kArrayType: { // perform deep copy via SAX Handler
- GenericDocument<Encoding,Allocator> d(&allocator);
- rhs.Accept(d);
- RawAssign(*d.stack_.template Pop<GenericValue>(1));
- }
- break;
- case kStringType:
- if (rhs.flags_ == kConstStringFlag) {
- flags_ = rhs.flags_;
- data_ = *reinterpret_cast<const Data*>(&rhs.data_);
- } else {
- SetStringRaw(StringRef(rhs.GetString(), rhs.GetStringLength()), allocator);
- }
- break;
- default:
- flags_ = rhs.flags_;
- data_ = *reinterpret_cast<const Data*>(&rhs.data_);
- break;
- }
-}
-
-RAPIDJSON_NAMESPACE_END
-
-#ifdef _MSC_VER
-RAPIDJSON_DIAG_POP
-#endif
-
-#ifdef __clang__
-RAPIDJSON_DIAG_POP
-#endif
-
-#ifdef __GNUC__
-RAPIDJSON_DIAG_POP
-#endif
-
-#endif // RAPIDJSON_DOCUMENT_H_
diff --git a/3rdparty/rapidjson/include/rapidjson/encodedstream.h b/3rdparty/rapidjson/include/rapidjson/encodedstream.h
deleted file mode 100644
index 87d09bbb150..00000000000
--- a/3rdparty/rapidjson/include/rapidjson/encodedstream.h
+++ /dev/null
@@ -1,270 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 RAPIDJSON_ENCODEDSTREAM_H_
-#define RAPIDJSON_ENCODEDSTREAM_H_
-
-#include "stream.h"
-
-#ifdef __GNUC__
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(effc++)
-#endif
-
-#ifdef __clang__
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(padded)
-#endif
-
-RAPIDJSON_NAMESPACE_BEGIN
-
-//! Input byte stream wrapper with a statically bound encoding.
-/*!
- \tparam Encoding The interpretation of encoding of the stream. Either UTF8, UTF16LE, UTF16BE, UTF32LE, UTF32BE.
- \tparam InputByteStream Type of input byte stream. For example, FileReadStream.
-*/
-template <typename Encoding, typename InputByteStream>
-class EncodedInputStream {
- RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);
-public:
- typedef typename Encoding::Ch Ch;
-
- EncodedInputStream(InputByteStream& is) : is_(is) {
- current_ = Encoding::TakeBOM(is_);
- }
-
- Ch Peek() const { return current_; }
- Ch Take() { Ch c = current_; current_ = Encoding::Take(is_); return c; }
- size_t Tell() const { return is_.Tell(); }
-
- // Not implemented
- void Put(Ch) { RAPIDJSON_ASSERT(false); }
- void Flush() { RAPIDJSON_ASSERT(false); }
- Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; }
- size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; }
-
-private:
- EncodedInputStream(const EncodedInputStream&);
- EncodedInputStream& operator=(const EncodedInputStream&);
-
- InputByteStream& is_;
- Ch current_;
-};
-
-//! Output byte stream wrapper with statically bound encoding.
-/*!
- \tparam Encoding The interpretation of encoding of the stream. Either UTF8, UTF16LE, UTF16BE, UTF32LE, UTF32BE.
- \tparam OutputByteStream Type of input byte stream. For example, FileWriteStream.
-*/
-template <typename Encoding, typename OutputByteStream>
-class EncodedOutputStream {
- RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);
-public:
- typedef typename Encoding::Ch Ch;
-
- EncodedOutputStream(OutputByteStream& os, bool putBOM = true) : os_(os) {
- if (putBOM)
- Encoding::PutBOM(os_);
- }
-
- void Put(Ch c) { Encoding::Put(os_, c); }
- void Flush() { os_.Flush(); }
-
- // Not implemented
- Ch Peek() const { RAPIDJSON_ASSERT(false); return 0;}
- Ch Take() { RAPIDJSON_ASSERT(false); return 0;}
- size_t Tell() const { RAPIDJSON_ASSERT(false); return 0; }
- Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; }
- size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; }
-
-private:
- EncodedOutputStream(const EncodedOutputStream&);
- EncodedOutputStream& operator=(const EncodedOutputStream&);
-
- OutputByteStream& os_;
-};
-
-#define RAPIDJSON_ENCODINGS_FUNC(x) UTF8<Ch>::x, UTF16LE<Ch>::x, UTF16BE<Ch>::x, UTF32LE<Ch>::x, UTF32BE<Ch>::x
-
-//! Input stream wrapper with dynamically bound encoding and automatic encoding detection.
-/*!
- \tparam CharType Type of character for reading.
- \tparam InputByteStream type of input byte stream to be wrapped.
-*/
-template <typename CharType, typename InputByteStream>
-class AutoUTFInputStream {
- RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);
-public:
- typedef CharType Ch;
-
- //! Constructor.
- /*!
- \param is input stream to be wrapped.
- \param type UTF encoding type if it is not detected from the stream.
- */
- AutoUTFInputStream(InputByteStream& is, UTFType type = kUTF8) : is_(&is), type_(type), hasBOM_(false) {
- RAPIDJSON_ASSERT(type >= kUTF8 && type <= kUTF32BE);
- DetectType();
- static const TakeFunc f[] = { RAPIDJSON_ENCODINGS_FUNC(Take) };
- takeFunc_ = f[type_];
- current_ = takeFunc_(*is_);
- }
-
- UTFType GetType() const { return type_; }
- bool HasBOM() const { return hasBOM_; }
-
- Ch Peek() const { return current_; }
- Ch Take() { Ch c = current_; current_ = takeFunc_(*is_); return c; }
- size_t Tell() const { return is_->Tell(); }
-
- // Not implemented
- void Put(Ch) { RAPIDJSON_ASSERT(false); }
- void Flush() { RAPIDJSON_ASSERT(false); }
- Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; }
- size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; }
-
-private:
- AutoUTFInputStream(const AutoUTFInputStream&);
- AutoUTFInputStream& operator=(const AutoUTFInputStream&);
-
- // Detect encoding type with BOM or RFC 4627
- void DetectType() {
- // BOM (Byte Order Mark):
- // 00 00 FE FF UTF-32BE
- // FF FE 00 00 UTF-32LE
- // FE FF UTF-16BE
- // FF FE UTF-16LE
- // EF BB BF UTF-8
-
- const unsigned char* c = reinterpret_cast<const unsigned char *>(is_->Peek4());
- if (!c)
- return;
-
- unsigned bom = static_cast<unsigned>(c[0] | (c[1] << 8) | (c[2] << 16) | (c[3] << 24));
- hasBOM_ = false;
- if (bom == 0xFFFE0000) { type_ = kUTF32BE; hasBOM_ = true; is_->Take(); is_->Take(); is_->Take(); is_->Take(); }
- else if (bom == 0x0000FEFF) { type_ = kUTF32LE; hasBOM_ = true; is_->Take(); is_->Take(); is_->Take(); is_->Take(); }
- else if ((bom & 0xFFFF) == 0xFFFE) { type_ = kUTF16BE; hasBOM_ = true; is_->Take(); is_->Take(); }
- else if ((bom & 0xFFFF) == 0xFEFF) { type_ = kUTF16LE; hasBOM_ = true; is_->Take(); is_->Take(); }
- else if ((bom & 0xFFFFFF) == 0xBFBBEF) { type_ = kUTF8; hasBOM_ = true; is_->Take(); is_->Take(); is_->Take(); }
-
- // RFC 4627: Section 3
- // "Since the first two characters of a JSON text will always be ASCII
- // characters [RFC0020], it is possible to determine whether an octet
- // stream is UTF-8, UTF-16 (BE or LE), or UTF-32 (BE or LE) by looking
- // at the pattern of nulls in the first four octets."
- // 00 00 00 xx UTF-32BE
- // 00 xx 00 xx UTF-16BE
- // xx 00 00 00 UTF-32LE
- // xx 00 xx 00 UTF-16LE
- // xx xx xx xx UTF-8
-
- if (!hasBOM_) {
- unsigned pattern = (c[0] ? 1 : 0) | (c[1] ? 2 : 0) | (c[2] ? 4 : 0) | (c[3] ? 8 : 0);
- switch (pattern) {
- case 0x08: type_ = kUTF32BE; break;
- case 0x0A: type_ = kUTF16BE; break;
- case 0x01: type_ = kUTF32LE; break;
- case 0x05: type_ = kUTF16LE; break;
- case 0x0F: type_ = kUTF8; break;
- default: break; // Use type defined by user.
- }
- }
-
- // Runtime check whether the size of character type is sufficient. It only perform checks with assertion.
- if (type_ == kUTF16LE || type_ == kUTF16BE) RAPIDJSON_ASSERT(sizeof(Ch) >= 2);
- if (type_ == kUTF32LE || type_ == kUTF32BE) RAPIDJSON_ASSERT(sizeof(Ch) >= 4);
- }
-
- typedef Ch (*TakeFunc)(InputByteStream& is);
- InputByteStream* is_;
- UTFType type_;
- Ch current_;
- TakeFunc takeFunc_;
- bool hasBOM_;
-};
-
-//! Output stream wrapper with dynamically bound encoding and automatic encoding detection.
-/*!
- \tparam CharType Type of character for writing.
- \tparam OutputByteStream type of output byte stream to be wrapped.
-*/
-template <typename CharType, typename OutputByteStream>
-class AutoUTFOutputStream {
- RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);
-public:
- typedef CharType Ch;
-
- //! Constructor.
- /*!
- \param os output stream to be wrapped.
- \param type UTF encoding type.
- \param putBOM Whether to write BOM at the beginning of the stream.
- */
- AutoUTFOutputStream(OutputByteStream& os, UTFType type, bool putBOM) : os_(&os), type_(type) {
- RAPIDJSON_ASSERT(type >= kUTF8 && type <= kUTF32BE);
-
- // Runtime check whether the size of character type is sufficient. It only perform checks with assertion.
- if (type_ == kUTF16LE || type_ == kUTF16BE) RAPIDJSON_ASSERT(sizeof(Ch) >= 2);
- if (type_ == kUTF32LE || type_ == kUTF32BE) RAPIDJSON_ASSERT(sizeof(Ch) >= 4);
-
- static const PutFunc f[] = { RAPIDJSON_ENCODINGS_FUNC(Put) };
- putFunc_ = f[type_];
-
- if (putBOM)
- PutBOM();
- }
-
- UTFType GetType() const { return type_; }
-
- void Put(Ch c) { putFunc_(*os_, c); }
- void Flush() { os_->Flush(); }
-
- // Not implemented
- Ch Peek() const { RAPIDJSON_ASSERT(false); return 0;}
- Ch Take() { RAPIDJSON_ASSERT(false); return 0;}
- size_t Tell() const { RAPIDJSON_ASSERT(false); return 0; }
- Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; }
- size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; }
-
-private:
- AutoUTFOutputStream(const AutoUTFOutputStream&);
- AutoUTFOutputStream& operator=(const AutoUTFOutputStream&);
-
- void PutBOM() {
- typedef void (*PutBOMFunc)(OutputByteStream&);
- static const PutBOMFunc f[] = { RAPIDJSON_ENCODINGS_FUNC(PutBOM) };
- f[type_](*os_);
- }
-
- typedef void (*PutFunc)(OutputByteStream&, Ch);
-
- OutputByteStream* os_;
- UTFType type_;
- PutFunc putFunc_;
-};
-
-#undef RAPIDJSON_ENCODINGS_FUNC
-
-RAPIDJSON_NAMESPACE_END
-
-#ifdef __clang__
-RAPIDJSON_DIAG_POP
-#endif
-
-#ifdef __GNUC__
-RAPIDJSON_DIAG_POP
-#endif
-
-#endif // RAPIDJSON_FILESTREAM_H_
diff --git a/3rdparty/rapidjson/include/rapidjson/encodings.h b/3rdparty/rapidjson/include/rapidjson/encodings.h
deleted file mode 100644
index edfc9901615..00000000000
--- a/3rdparty/rapidjson/include/rapidjson/encodings.h
+++ /dev/null
@@ -1,712 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 RAPIDJSON_ENCODINGS_H_
-#define RAPIDJSON_ENCODINGS_H_
-
-#include "rapidjson.h"
-
-#ifdef _MSC_VER
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(4244) // conversion from 'type1' to 'type2', possible loss of data
-RAPIDJSON_DIAG_OFF(4702) // unreachable code
-#elif defined(__GNUC__)
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(effc++)
-RAPIDJSON_DIAG_OFF(overflow)
-#endif
-
-RAPIDJSON_NAMESPACE_BEGIN
-
-///////////////////////////////////////////////////////////////////////////////
-// Encoding
-
-/*! \class rapidjson::Encoding
- \brief Concept for encoding of Unicode characters.
-
-\code
-concept Encoding {
- typename Ch; //! Type of character. A "character" is actually a code unit in unicode's definition.
-
- enum { supportUnicode = 1 }; // or 0 if not supporting unicode
-
- //! \brief Encode a Unicode codepoint to an output stream.
- //! \param os Output stream.
- //! \param codepoint An unicode codepoint, ranging from 0x0 to 0x10FFFF inclusively.
- template<typename OutputStream>
- static void Encode(OutputStream& os, unsigned codepoint);
-
- //! \brief Decode a Unicode codepoint from an input stream.
- //! \param is Input stream.
- //! \param codepoint Output of the unicode codepoint.
- //! \return true if a valid codepoint can be decoded from the stream.
- template <typename InputStream>
- static bool Decode(InputStream& is, unsigned* codepoint);
-
- //! \brief Validate one Unicode codepoint from an encoded stream.
- //! \param is Input stream to obtain codepoint.
- //! \param os Output for copying one codepoint.
- //! \return true if it is valid.
- //! \note This function just validating and copying the codepoint without actually decode it.
- template <typename InputStream, typename OutputStream>
- static bool Validate(InputStream& is, OutputStream& os);
-
- // The following functions are deal with byte streams.
-
- //! Take a character from input byte stream, skip BOM if exist.
- template <typename InputByteStream>
- static CharType TakeBOM(InputByteStream& is);
-
- //! Take a character from input byte stream.
- template <typename InputByteStream>
- static Ch Take(InputByteStream& is);
-
- //! Put BOM to output byte stream.
- template <typename OutputByteStream>
- static void PutBOM(OutputByteStream& os);
-
- //! Put a character to output byte stream.
- template <typename OutputByteStream>
- static void Put(OutputByteStream& os, Ch c);
-};
-\endcode
-*/
-
-///////////////////////////////////////////////////////////////////////////////
-// UTF8
-
-//! UTF-8 encoding.
-/*! http://en.wikipedia.org/wiki/UTF-8
- http://tools.ietf.org/html/rfc3629
- \tparam CharType Code unit for storing 8-bit UTF-8 data. Default is char.
- \note implements Encoding concept
-*/
-template<typename CharType = char>
-struct UTF8 {
- typedef CharType Ch;
-
- enum { supportUnicode = 1 };
-
- template<typename OutputStream>
- static void Encode(OutputStream& os, unsigned codepoint) {
- if (codepoint <= 0x7F)
- os.Put(static_cast<Ch>(codepoint & 0xFF));
- else if (codepoint <= 0x7FF) {
- os.Put(static_cast<Ch>(0xC0 | ((codepoint >> 6) & 0xFF)));
- os.Put(static_cast<Ch>(0x80 | ((codepoint & 0x3F))));
- }
- else if (codepoint <= 0xFFFF) {
- os.Put(static_cast<Ch>(0xE0 | ((codepoint >> 12) & 0xFF)));
- os.Put(static_cast<Ch>(0x80 | ((codepoint >> 6) & 0x3F)));
- os.Put(static_cast<Ch>(0x80 | (codepoint & 0x3F)));
- }
- else {
- RAPIDJSON_ASSERT(codepoint <= 0x10FFFF);
- os.Put(static_cast<Ch>(0xF0 | ((codepoint >> 18) & 0xFF)));
- os.Put(static_cast<Ch>(0x80 | ((codepoint >> 12) & 0x3F)));
- os.Put(static_cast<Ch>(0x80 | ((codepoint >> 6) & 0x3F)));
- os.Put(static_cast<Ch>(0x80 | (codepoint & 0x3F)));
- }
- }
-
- template<typename OutputStream>
- static void EncodeUnsafe(OutputStream& os, unsigned codepoint) {
- if (codepoint <= 0x7F)
- PutUnsafe(os, static_cast<Ch>(codepoint & 0xFF));
- else if (codepoint <= 0x7FF) {
- PutUnsafe(os, static_cast<Ch>(0xC0 | ((codepoint >> 6) & 0xFF)));
- PutUnsafe(os, static_cast<Ch>(0x80 | ((codepoint & 0x3F))));
- }
- else if (codepoint <= 0xFFFF) {
- PutUnsafe(os, static_cast<Ch>(0xE0 | ((codepoint >> 12) & 0xFF)));
- PutUnsafe(os, static_cast<Ch>(0x80 | ((codepoint >> 6) & 0x3F)));
- PutUnsafe(os, static_cast<Ch>(0x80 | (codepoint & 0x3F)));
- }
- else {
- RAPIDJSON_ASSERT(codepoint <= 0x10FFFF);
- PutUnsafe(os, static_cast<Ch>(0xF0 | ((codepoint >> 18) & 0xFF)));
- PutUnsafe(os, static_cast<Ch>(0x80 | ((codepoint >> 12) & 0x3F)));
- PutUnsafe(os, static_cast<Ch>(0x80 | ((codepoint >> 6) & 0x3F)));
- PutUnsafe(os, static_cast<Ch>(0x80 | (codepoint & 0x3F)));
- }
- }
-
- template <typename InputStream>
- static bool Decode(InputStream& is, unsigned* codepoint) {
-#define COPY() c = is.Take(); *codepoint = (*codepoint << 6) | (static_cast<unsigned char>(c) & 0x3Fu)
-#define TRANS(mask) result &= ((GetRange(static_cast<unsigned char>(c)) & mask) != 0)
-#define TAIL() COPY(); TRANS(0x70)
- typename InputStream::Ch c = is.Take();
- if (!(c & 0x80)) {
- *codepoint = static_cast<unsigned char>(c);
- return true;
- }
-
- unsigned char type = GetRange(static_cast<unsigned char>(c));
- *codepoint = (0xFF >> type) & static_cast<unsigned char>(c);
- bool result = true;
- switch (type) {
- case 2: TAIL(); return result;
- case 3: TAIL(); TAIL(); return result;
- case 4: COPY(); TRANS(0x50); TAIL(); return result;
- case 5: COPY(); TRANS(0x10); TAIL(); TAIL(); return result;
- case 6: TAIL(); TAIL(); TAIL(); return result;
- case 10: COPY(); TRANS(0x20); TAIL(); return result;
- case 11: COPY(); TRANS(0x60); TAIL(); TAIL(); return result;
- default: return false;
- }
-#undef COPY
-#undef TRANS
-#undef TAIL
- }
-
- template <typename InputStream, typename OutputStream>
- static bool Validate(InputStream& is, OutputStream& os) {
-#define COPY() os.Put(c = is.Take())
-#define TRANS(mask) result &= ((GetRange(static_cast<unsigned char>(c)) & mask) != 0)
-#define TAIL() COPY(); TRANS(0x70)
- Ch c;
- COPY();
- if (!(c & 0x80))
- return true;
-
- bool result = true;
- switch (GetRange(static_cast<unsigned char>(c))) {
- case 2: TAIL(); return result;
- case 3: TAIL(); TAIL(); return result;
- case 4: COPY(); TRANS(0x50); TAIL(); return result;
- case 5: COPY(); TRANS(0x10); TAIL(); TAIL(); return result;
- case 6: TAIL(); TAIL(); TAIL(); return result;
- case 10: COPY(); TRANS(0x20); TAIL(); return result;
- case 11: COPY(); TRANS(0x60); TAIL(); TAIL(); return result;
- default: return false;
- }
-#undef COPY
-#undef TRANS
-#undef TAIL
- }
-
- static unsigned char GetRange(unsigned char c) {
- // Referring to DFA of http://bjoern.hoehrmann.de/utf-8/decoder/dfa/
- // With new mapping 1 -> 0x10, 7 -> 0x20, 9 -> 0x40, such that AND operation can test multiple types.
- static const unsigned char type[] = {
- 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,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,
- 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
- 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,
- 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
- 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
- 8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
- 10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3, 11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,
- };
- return type[c];
- }
-
- template <typename InputByteStream>
- static CharType TakeBOM(InputByteStream& is) {
- RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);
- typename InputByteStream::Ch c = Take(is);
- if (static_cast<unsigned char>(c) != 0xEFu) return c;
- c = is.Take();
- if (static_cast<unsigned char>(c) != 0xBBu) return c;
- c = is.Take();
- if (static_cast<unsigned char>(c) != 0xBFu) return c;
- c = is.Take();
- return c;
- }
-
- template <typename InputByteStream>
- static Ch Take(InputByteStream& is) {
- RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);
- return static_cast<Ch>(is.Take());
- }
-
- template <typename OutputByteStream>
- static void PutBOM(OutputByteStream& os) {
- RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);
- os.Put(static_cast<typename OutputByteStream::Ch>(0xEFu));
- os.Put(static_cast<typename OutputByteStream::Ch>(0xBBu));
- os.Put(static_cast<typename OutputByteStream::Ch>(0xBFu));
- }
-
- template <typename OutputByteStream>
- static void Put(OutputByteStream& os, Ch c) {
- RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);
- os.Put(static_cast<typename OutputByteStream::Ch>(c));
- }
-};
-
-///////////////////////////////////////////////////////////////////////////////
-// UTF16
-
-//! UTF-16 encoding.
-/*! http://en.wikipedia.org/wiki/UTF-16
- http://tools.ietf.org/html/rfc2781
- \tparam CharType Type for storing 16-bit UTF-16 data. Default is wchar_t. C++11 may use char16_t instead.
- \note implements Encoding concept
-
- \note For in-memory access, no need to concern endianness. The code units and code points are represented by CPU's endianness.
- For streaming, use UTF16LE and UTF16BE, which handle endianness.
-*/
-template<typename CharType = wchar_t>
-struct UTF16 {
- typedef CharType Ch;
- RAPIDJSON_STATIC_ASSERT(sizeof(Ch) >= 2);
-
- enum { supportUnicode = 1 };
-
- template<typename OutputStream>
- static void Encode(OutputStream& os, unsigned codepoint) {
- RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputStream::Ch) >= 2);
- if (codepoint <= 0xFFFF) {
- RAPIDJSON_ASSERT(codepoint < 0xD800 || codepoint > 0xDFFF); // Code point itself cannot be surrogate pair
- os.Put(static_cast<typename OutputStream::Ch>(codepoint));
- }
- else {
- RAPIDJSON_ASSERT(codepoint <= 0x10FFFF);
- unsigned v = codepoint - 0x10000;
- os.Put(static_cast<typename OutputStream::Ch>((v >> 10) | 0xD800));
- os.Put((v & 0x3FF) | 0xDC00);
- }
- }
-
-
- template<typename OutputStream>
- static void EncodeUnsafe(OutputStream& os, unsigned codepoint) {
- RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputStream::Ch) >= 2);
- if (codepoint <= 0xFFFF) {
- RAPIDJSON_ASSERT(codepoint < 0xD800 || codepoint > 0xDFFF); // Code point itself cannot be surrogate pair
- PutUnsafe(os, static_cast<typename OutputStream::Ch>(codepoint));
- }
- else {
- RAPIDJSON_ASSERT(codepoint <= 0x10FFFF);
- unsigned v = codepoint - 0x10000;
- PutUnsafe(os, static_cast<typename OutputStream::Ch>((v >> 10) | 0xD800));
- PutUnsafe(os, (v & 0x3FF) | 0xDC00);
- }
- }
-
- template <typename InputStream>
- static bool Decode(InputStream& is, unsigned* codepoint) {
- RAPIDJSON_STATIC_ASSERT(sizeof(typename InputStream::Ch) >= 2);
- typename InputStream::Ch c = is.Take();
- if (c < 0xD800 || c > 0xDFFF) {
- *codepoint = static_cast<unsigned>(c);
- return true;
- }
- else if (c <= 0xDBFF) {
- *codepoint = (static_cast<unsigned>(c) & 0x3FF) << 10;
- c = is.Take();
- *codepoint |= (static_cast<unsigned>(c) & 0x3FF);
- *codepoint += 0x10000;
- return c >= 0xDC00 && c <= 0xDFFF;
- }
- return false;
- }
-
- template <typename InputStream, typename OutputStream>
- static bool Validate(InputStream& is, OutputStream& os) {
- RAPIDJSON_STATIC_ASSERT(sizeof(typename InputStream::Ch) >= 2);
- RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputStream::Ch) >= 2);
- typename InputStream::Ch c;
- os.Put(static_cast<typename OutputStream::Ch>(c = is.Take()));
- if (c < 0xD800 || c > 0xDFFF)
- return true;
- else if (c <= 0xDBFF) {
- os.Put(c = is.Take());
- return c >= 0xDC00 && c <= 0xDFFF;
- }
- return false;
- }
-};
-
-//! UTF-16 little endian encoding.
-template<typename CharType = wchar_t>
-struct UTF16LE : UTF16<CharType> {
- template <typename InputByteStream>
- static CharType TakeBOM(InputByteStream& is) {
- RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);
- CharType c = Take(is);
- return static_cast<uint16_t>(c) == 0xFEFFu ? Take(is) : c;
- }
-
- template <typename InputByteStream>
- static CharType Take(InputByteStream& is) {
- RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);
- unsigned c = static_cast<uint8_t>(is.Take());
- c |= static_cast<unsigned>(static_cast<uint8_t>(is.Take())) << 8;
- return static_cast<CharType>(c);
- }
-
- template <typename OutputByteStream>
- static void PutBOM(OutputByteStream& os) {
- RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);
- os.Put(static_cast<typename OutputByteStream::Ch>(0xFFu));
- os.Put(static_cast<typename OutputByteStream::Ch>(0xFEu));
- }
-
- template <typename OutputByteStream>
- static void Put(OutputByteStream& os, CharType c) {
- RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);
- os.Put(static_cast<typename OutputByteStream::Ch>(static_cast<unsigned>(c) & 0xFFu));
- os.Put(static_cast<typename OutputByteStream::Ch>((static_cast<unsigned>(c) >> 8) & 0xFFu));
- }
-};
-
-//! UTF-16 big endian encoding.
-template<typename CharType = wchar_t>
-struct UTF16BE : UTF16<CharType> {
- template <typename InputByteStream>
- static CharType TakeBOM(InputByteStream& is) {
- RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);
- CharType c = Take(is);
- return static_cast<uint16_t>(c) == 0xFEFFu ? Take(is) : c;
- }
-
- template <typename InputByteStream>
- static CharType Take(InputByteStream& is) {
- RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);
- unsigned c = static_cast<unsigned>(static_cast<uint8_t>(is.Take())) << 8;
- c |= static_cast<uint8_t>(is.Take());
- return static_cast<CharType>(c);
- }
-
- template <typename OutputByteStream>
- static void PutBOM(OutputByteStream& os) {
- RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);
- os.Put(static_cast<typename OutputByteStream::Ch>(0xFEu));
- os.Put(static_cast<typename OutputByteStream::Ch>(0xFFu));
- }
-
- template <typename OutputByteStream>
- static void Put(OutputByteStream& os, CharType c) {
- RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);
- os.Put(static_cast<typename OutputByteStream::Ch>((static_cast<unsigned>(c) >> 8) & 0xFFu));
- os.Put(static_cast<typename OutputByteStream::Ch>(static_cast<unsigned>(c) & 0xFFu));
- }
-};
-
-///////////////////////////////////////////////////////////////////////////////
-// UTF32
-
-//! UTF-32 encoding.
-/*! http://en.wikipedia.org/wiki/UTF-32
- \tparam CharType Type for storing 32-bit UTF-32 data. Default is unsigned. C++11 may use char32_t instead.
- \note implements Encoding concept
-
- \note For in-memory access, no need to concern endianness. The code units and code points are represented by CPU's endianness.
- For streaming, use UTF32LE and UTF32BE, which handle endianness.
-*/
-template<typename CharType = unsigned>
-struct UTF32 {
- typedef CharType Ch;
- RAPIDJSON_STATIC_ASSERT(sizeof(Ch) >= 4);
-
- enum { supportUnicode = 1 };
-
- template<typename OutputStream>
- static void Encode(OutputStream& os, unsigned codepoint) {
- RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputStream::Ch) >= 4);
- RAPIDJSON_ASSERT(codepoint <= 0x10FFFF);
- os.Put(codepoint);
- }
-
- template<typename OutputStream>
- static void EncodeUnsafe(OutputStream& os, unsigned codepoint) {
- RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputStream::Ch) >= 4);
- RAPIDJSON_ASSERT(codepoint <= 0x10FFFF);
- PutUnsafe(os, codepoint);
- }
-
- template <typename InputStream>
- static bool Decode(InputStream& is, unsigned* codepoint) {
- RAPIDJSON_STATIC_ASSERT(sizeof(typename InputStream::Ch) >= 4);
- Ch c = is.Take();
- *codepoint = c;
- return c <= 0x10FFFF;
- }
-
- template <typename InputStream, typename OutputStream>
- static bool Validate(InputStream& is, OutputStream& os) {
- RAPIDJSON_STATIC_ASSERT(sizeof(typename InputStream::Ch) >= 4);
- Ch c;
- os.Put(c = is.Take());
- return c <= 0x10FFFF;
- }
-};
-
-//! UTF-32 little endian enocoding.
-template<typename CharType = unsigned>
-struct UTF32LE : UTF32<CharType> {
- template <typename InputByteStream>
- static CharType TakeBOM(InputByteStream& is) {
- RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);
- CharType c = Take(is);
- return static_cast<uint32_t>(c) == 0x0000FEFFu ? Take(is) : c;
- }
-
- template <typename InputByteStream>
- static CharType Take(InputByteStream& is) {
- RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);
- unsigned c = static_cast<uint8_t>(is.Take());
- c |= static_cast<unsigned>(static_cast<uint8_t>(is.Take())) << 8;
- c |= static_cast<unsigned>(static_cast<uint8_t>(is.Take())) << 16;
- c |= static_cast<unsigned>(static_cast<uint8_t>(is.Take())) << 24;
- return static_cast<CharType>(c);
- }
-
- template <typename OutputByteStream>
- static void PutBOM(OutputByteStream& os) {
- RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);
- os.Put(static_cast<typename OutputByteStream::Ch>(0xFFu));
- os.Put(static_cast<typename OutputByteStream::Ch>(0xFEu));
- os.Put(static_cast<typename OutputByteStream::Ch>(0x00u));
- os.Put(static_cast<typename OutputByteStream::Ch>(0x00u));
- }
-
- template <typename OutputByteStream>
- static void Put(OutputByteStream& os, CharType c) {
- RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);
- os.Put(static_cast<typename OutputByteStream::Ch>(c & 0xFFu));
- os.Put(static_cast<typename OutputByteStream::Ch>((c >> 8) & 0xFFu));
- os.Put(static_cast<typename OutputByteStream::Ch>((c >> 16) & 0xFFu));
- os.Put(static_cast<typename OutputByteStream::Ch>((c >> 24) & 0xFFu));
- }
-};
-
-//! UTF-32 big endian encoding.
-template<typename CharType = unsigned>
-struct UTF32BE : UTF32<CharType> {
- template <typename InputByteStream>
- static CharType TakeBOM(InputByteStream& is) {
- RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);
- CharType c = Take(is);
- return static_cast<uint32_t>(c) == 0x0000FEFFu ? Take(is) : c;
- }
-
- template <typename InputByteStream>
- static CharType Take(InputByteStream& is) {
- RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);
- unsigned c = static_cast<unsigned>(static_cast<uint8_t>(is.Take())) << 24;
- c |= static_cast<unsigned>(static_cast<uint8_t>(is.Take())) << 16;
- c |= static_cast<unsigned>(static_cast<uint8_t>(is.Take())) << 8;
- c |= static_cast<unsigned>(static_cast<uint8_t>(is.Take()));
- return static_cast<CharType>(c);
- }
-
- template <typename OutputByteStream>
- static void PutBOM(OutputByteStream& os) {
- RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);
- os.Put(static_cast<typename OutputByteStream::Ch>(0x00u));
- os.Put(static_cast<typename OutputByteStream::Ch>(0x00u));
- os.Put(static_cast<typename OutputByteStream::Ch>(0xFEu));
- os.Put(static_cast<typename OutputByteStream::Ch>(0xFFu));
- }
-
- template <typename OutputByteStream>
- static void Put(OutputByteStream& os, CharType c) {
- RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);
- os.Put(static_cast<typename OutputByteStream::Ch>((c >> 24) & 0xFFu));
- os.Put(static_cast<typename OutputByteStream::Ch>((c >> 16) & 0xFFu));
- os.Put(static_cast<typename OutputByteStream::Ch>((c >> 8) & 0xFFu));
- os.Put(static_cast<typename OutputByteStream::Ch>(c & 0xFFu));
- }
-};
-
-///////////////////////////////////////////////////////////////////////////////
-// ASCII
-
-//! ASCII encoding.
-/*! http://en.wikipedia.org/wiki/ASCII
- \tparam CharType Code unit for storing 7-bit ASCII data. Default is char.
- \note implements Encoding concept
-*/
-template<typename CharType = char>
-struct ASCII {
- typedef CharType Ch;
-
- enum { supportUnicode = 0 };
-
- template<typename OutputStream>
- static void Encode(OutputStream& os, unsigned codepoint) {
- RAPIDJSON_ASSERT(codepoint <= 0x7F);
- os.Put(static_cast<Ch>(codepoint & 0xFF));
- }
-
- template<typename OutputStream>
- static void EncodeUnsafe(OutputStream& os, unsigned codepoint) {
- RAPIDJSON_ASSERT(codepoint <= 0x7F);
- PutUnsafe(os, static_cast<Ch>(codepoint & 0xFF));
- }
-
- template <typename InputStream>
- static bool Decode(InputStream& is, unsigned* codepoint) {
- uint8_t c = static_cast<uint8_t>(is.Take());
- *codepoint = c;
- return c <= 0X7F;
- }
-
- template <typename InputStream, typename OutputStream>
- static bool Validate(InputStream& is, OutputStream& os) {
- uint8_t c = static_cast<uint8_t>(is.Take());
- os.Put(static_cast<typename OutputStream::Ch>(c));
- return c <= 0x7F;
- }
-
- template <typename InputByteStream>
- static CharType TakeBOM(InputByteStream& is) {
- RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);
- uint8_t c = static_cast<uint8_t>(Take(is));
- return static_cast<Ch>(c);
- }
-
- template <typename InputByteStream>
- static Ch Take(InputByteStream& is) {
- RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1);
- return static_cast<Ch>(is.Take());
- }
-
- template <typename OutputByteStream>
- static void PutBOM(OutputByteStream& os) {
- RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);
- (void)os;
- }
-
- template <typename OutputByteStream>
- static void Put(OutputByteStream& os, Ch c) {
- RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1);
- os.Put(static_cast<typename OutputByteStream::Ch>(c));
- }
-};
-
-///////////////////////////////////////////////////////////////////////////////
-// AutoUTF
-
-//! Runtime-specified UTF encoding type of a stream.
-enum UTFType {
- kUTF8 = 0, //!< UTF-8.
- kUTF16LE = 1, //!< UTF-16 little endian.
- kUTF16BE = 2, //!< UTF-16 big endian.
- kUTF32LE = 3, //!< UTF-32 little endian.
- kUTF32BE = 4 //!< UTF-32 big endian.
-};
-
-//! Dynamically select encoding according to stream's runtime-specified UTF encoding type.
-/*! \note This class can be used with AutoUTFInputtStream and AutoUTFOutputStream, which provides GetType().
-*/
-template<typename CharType>
-struct AutoUTF {
- typedef CharType Ch;
-
- enum { supportUnicode = 1 };
-
-#define RAPIDJSON_ENCODINGS_FUNC(x) UTF8<Ch>::x, UTF16LE<Ch>::x, UTF16BE<Ch>::x, UTF32LE<Ch>::x, UTF32BE<Ch>::x
-
- template<typename OutputStream>
- RAPIDJSON_FORCEINLINE static void Encode(OutputStream& os, unsigned codepoint) {
- typedef void (*EncodeFunc)(OutputStream&, unsigned);
- static const EncodeFunc f[] = { RAPIDJSON_ENCODINGS_FUNC(Encode) };
- (*f[os.GetType()])(os, codepoint);
- }
-
- template<typename OutputStream>
- RAPIDJSON_FORCEINLINE static void EncodeUnsafe(OutputStream& os, unsigned codepoint) {
- typedef void (*EncodeFunc)(OutputStream&, unsigned);
- static const EncodeFunc f[] = { RAPIDJSON_ENCODINGS_FUNC(EncodeUnsafe) };
- (*f[os.GetType()])(os, codepoint);
- }
-
- template <typename InputStream>
- RAPIDJSON_FORCEINLINE static bool Decode(InputStream& is, unsigned* codepoint) {
- typedef bool (*DecodeFunc)(InputStream&, unsigned*);
- static const DecodeFunc f[] = { RAPIDJSON_ENCODINGS_FUNC(Decode) };
- return (*f[is.GetType()])(is, codepoint);
- }
-
- template <typename InputStream, typename OutputStream>
- RAPIDJSON_FORCEINLINE static bool Validate(InputStream& is, OutputStream& os) {
- typedef bool (*ValidateFunc)(InputStream&, OutputStream&);
- static const ValidateFunc f[] = { RAPIDJSON_ENCODINGS_FUNC(Validate) };
- return (*f[is.GetType()])(is, os);
- }
-
-#undef RAPIDJSON_ENCODINGS_FUNC
-};
-
-///////////////////////////////////////////////////////////////////////////////
-// Transcoder
-
-//! Encoding conversion.
-template<typename SourceEncoding, typename TargetEncoding>
-struct Transcoder {
- //! Take one Unicode codepoint from source encoding, convert it to target encoding and put it to the output stream.
- template<typename InputStream, typename OutputStream>
- RAPIDJSON_FORCEINLINE static bool Transcode(InputStream& is, OutputStream& os) {
- unsigned codepoint;
- if (!SourceEncoding::Decode(is, &codepoint))
- return false;
- TargetEncoding::Encode(os, codepoint);
- return true;
- }
-
- template<typename InputStream, typename OutputStream>
- RAPIDJSON_FORCEINLINE static bool TranscodeUnsafe(InputStream& is, OutputStream& os) {
- unsigned codepoint;
- if (!SourceEncoding::Decode(is, &codepoint))
- return false;
- TargetEncoding::EncodeUnsafe(os, codepoint);
- return true;
- }
-
- //! Validate one Unicode codepoint from an encoded stream.
- template<typename InputStream, typename OutputStream>
- RAPIDJSON_FORCEINLINE static bool Validate(InputStream& is, OutputStream& os) {
- return Transcode(is, os); // Since source/target encoding is different, must transcode.
- }
-};
-
-// Forward declaration.
-template<typename Stream>
-inline void PutUnsafe(Stream& stream, typename Stream::Ch c);
-
-//! Specialization of Transcoder with same source and target encoding.
-template<typename Encoding>
-struct Transcoder<Encoding, Encoding> {
- template<typename InputStream, typename OutputStream>
- RAPIDJSON_FORCEINLINE static bool Transcode(InputStream& is, OutputStream& os) {
- os.Put(is.Take()); // Just copy one code unit. This semantic is different from primary template class.
- return true;
- }
-
- template<typename InputStream, typename OutputStream>
- RAPIDJSON_FORCEINLINE static bool TranscodeUnsafe(InputStream& is, OutputStream& os) {
- PutUnsafe(os, is.Take()); // Just copy one code unit. This semantic is different from primary template class.
- return true;
- }
-
- template<typename InputStream, typename OutputStream>
- RAPIDJSON_FORCEINLINE static bool Validate(InputStream& is, OutputStream& os) {
- return Encoding::Validate(is, os); // source/target encoding are the same
- }
-};
-
-RAPIDJSON_NAMESPACE_END
-
-#if defined(__GNUC__) || defined(_MSC_VER)
-RAPIDJSON_DIAG_POP
-#endif
-
-#endif // RAPIDJSON_ENCODINGS_H_
diff --git a/3rdparty/rapidjson/include/rapidjson/error/en.h b/3rdparty/rapidjson/include/rapidjson/error/en.h
deleted file mode 100644
index c2315fda7d5..00000000000
--- a/3rdparty/rapidjson/include/rapidjson/error/en.h
+++ /dev/null
@@ -1,74 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 RAPIDJSON_ERROR_EN_H_
-#define RAPIDJSON_ERROR_EN_H_
-
-#include "error.h"
-
-#ifdef __clang__
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(switch-enum)
-RAPIDJSON_DIAG_OFF(covered-switch-default)
-#endif
-
-RAPIDJSON_NAMESPACE_BEGIN
-
-//! Maps error code of parsing into error message.
-/*!
- \ingroup RAPIDJSON_ERRORS
- \param parseErrorCode Error code obtained in parsing.
- \return the error message.
- \note User can make a copy of this function for localization.
- Using switch-case is safer for future modification of error codes.
-*/
-inline const RAPIDJSON_ERROR_CHARTYPE* GetParseError_En(ParseErrorCode parseErrorCode) {
- switch (parseErrorCode) {
- case kParseErrorNone: return RAPIDJSON_ERROR_STRING("No error.");
-
- case kParseErrorDocumentEmpty: return RAPIDJSON_ERROR_STRING("The document is empty.");
- case kParseErrorDocumentRootNotSingular: return RAPIDJSON_ERROR_STRING("The document root must not follow by other values.");
-
- case kParseErrorValueInvalid: return RAPIDJSON_ERROR_STRING("Invalid value.");
-
- case kParseErrorObjectMissName: return RAPIDJSON_ERROR_STRING("Missing a name for object member.");
- case kParseErrorObjectMissColon: return RAPIDJSON_ERROR_STRING("Missing a colon after a name of object member.");
- case kParseErrorObjectMissCommaOrCurlyBracket: return RAPIDJSON_ERROR_STRING("Missing a comma or '}' after an object member.");
-
- case kParseErrorArrayMissCommaOrSquareBracket: return RAPIDJSON_ERROR_STRING("Missing a comma or ']' after an array element.");
-
- case kParseErrorStringUnicodeEscapeInvalidHex: return RAPIDJSON_ERROR_STRING("Incorrect hex digit after \\u escape in string.");
- case kParseErrorStringUnicodeSurrogateInvalid: return RAPIDJSON_ERROR_STRING("The surrogate pair in string is invalid.");
- case kParseErrorStringEscapeInvalid: return RAPIDJSON_ERROR_STRING("Invalid escape character in string.");
- case kParseErrorStringMissQuotationMark: return RAPIDJSON_ERROR_STRING("Missing a closing quotation mark in string.");
- case kParseErrorStringInvalidEncoding: return RAPIDJSON_ERROR_STRING("Invalid encoding in string.");
-
- case kParseErrorNumberTooBig: return RAPIDJSON_ERROR_STRING("Number too big to be stored in double.");
- case kParseErrorNumberMissFraction: return RAPIDJSON_ERROR_STRING("Miss fraction part in number.");
- case kParseErrorNumberMissExponent: return RAPIDJSON_ERROR_STRING("Miss exponent in number.");
-
- case kParseErrorTermination: return RAPIDJSON_ERROR_STRING("Terminate parsing due to Handler error.");
- case kParseErrorUnspecificSyntaxError: return RAPIDJSON_ERROR_STRING("Unspecific syntax error.");
-
- default: return RAPIDJSON_ERROR_STRING("Unknown error.");
- }
-}
-
-RAPIDJSON_NAMESPACE_END
-
-#ifdef __clang__
-RAPIDJSON_DIAG_POP
-#endif
-
-#endif // RAPIDJSON_ERROR_EN_H_
diff --git a/3rdparty/rapidjson/include/rapidjson/error/error.h b/3rdparty/rapidjson/include/rapidjson/error/error.h
deleted file mode 100644
index 95cb31a72fe..00000000000
--- a/3rdparty/rapidjson/include/rapidjson/error/error.h
+++ /dev/null
@@ -1,155 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 RAPIDJSON_ERROR_ERROR_H_
-#define RAPIDJSON_ERROR_ERROR_H_
-
-#include "../rapidjson.h"
-
-#ifdef __clang__
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(padded)
-#endif
-
-/*! \file error.h */
-
-/*! \defgroup RAPIDJSON_ERRORS RapidJSON error handling */
-
-///////////////////////////////////////////////////////////////////////////////
-// RAPIDJSON_ERROR_CHARTYPE
-
-//! Character type of error messages.
-/*! \ingroup RAPIDJSON_ERRORS
- The default character type is \c char.
- On Windows, user can define this macro as \c TCHAR for supporting both
- unicode/non-unicode settings.
-*/
-#ifndef RAPIDJSON_ERROR_CHARTYPE
-#define RAPIDJSON_ERROR_CHARTYPE char
-#endif
-
-///////////////////////////////////////////////////////////////////////////////
-// RAPIDJSON_ERROR_STRING
-
-//! Macro for converting string literial to \ref RAPIDJSON_ERROR_CHARTYPE[].
-/*! \ingroup RAPIDJSON_ERRORS
- By default this conversion macro does nothing.
- On Windows, user can define this macro as \c _T(x) for supporting both
- unicode/non-unicode settings.
-*/
-#ifndef RAPIDJSON_ERROR_STRING
-#define RAPIDJSON_ERROR_STRING(x) x
-#endif
-
-RAPIDJSON_NAMESPACE_BEGIN
-
-///////////////////////////////////////////////////////////////////////////////
-// ParseErrorCode
-
-//! Error code of parsing.
-/*! \ingroup RAPIDJSON_ERRORS
- \see GenericReader::Parse, GenericReader::GetParseErrorCode
-*/
-enum ParseErrorCode {
- kParseErrorNone = 0, //!< No error.
-
- kParseErrorDocumentEmpty, //!< The document is empty.
- kParseErrorDocumentRootNotSingular, //!< The document root must not follow by other values.
-
- kParseErrorValueInvalid, //!< Invalid value.
-
- kParseErrorObjectMissName, //!< Missing a name for object member.
- kParseErrorObjectMissColon, //!< Missing a colon after a name of object member.
- kParseErrorObjectMissCommaOrCurlyBracket, //!< Missing a comma or '}' after an object member.
-
- kParseErrorArrayMissCommaOrSquareBracket, //!< Missing a comma or ']' after an array element.
-
- kParseErrorStringUnicodeEscapeInvalidHex, //!< Incorrect hex digit after \\u escape in string.
- kParseErrorStringUnicodeSurrogateInvalid, //!< The surrogate pair in string is invalid.
- kParseErrorStringEscapeInvalid, //!< Invalid escape character in string.
- kParseErrorStringMissQuotationMark, //!< Missing a closing quotation mark in string.
- kParseErrorStringInvalidEncoding, //!< Invalid encoding in string.
-
- kParseErrorNumberTooBig, //!< Number too big to be stored in double.
- kParseErrorNumberMissFraction, //!< Miss fraction part in number.
- kParseErrorNumberMissExponent, //!< Miss exponent in number.
-
- kParseErrorTermination, //!< Parsing was terminated.
- kParseErrorUnspecificSyntaxError //!< Unspecific syntax error.
-};
-
-//! Result of parsing (wraps ParseErrorCode)
-/*!
- \ingroup RAPIDJSON_ERRORS
- \code
- Document doc;
- ParseResult ok = doc.Parse("[42]");
- if (!ok) {
- fprintf(stderr, "JSON parse error: %s (%u)",
- GetParseError_En(ok.Code()), ok.Offset());
- exit(EXIT_FAILURE);
- }
- \endcode
- \see GenericReader::Parse, GenericDocument::Parse
-*/
-struct ParseResult {
-public:
- //! Default constructor, no error.
- ParseResult() : code_(kParseErrorNone), offset_(0) {}
- //! Constructor to set an error.
- ParseResult(ParseErrorCode code, size_t offset) : code_(code), offset_(offset) {}
-
- //! Get the error code.
- ParseErrorCode Code() const { return code_; }
- //! Get the error offset, if \ref IsError(), 0 otherwise.
- size_t Offset() const { return offset_; }
-
- //! Conversion to \c bool, returns \c true, iff !\ref IsError().
- operator bool() const { return !IsError(); }
- //! Whether the result is an error.
- bool IsError() const { return code_ != kParseErrorNone; }
-
- bool operator==(const ParseResult& that) const { return code_ == that.code_; }
- bool operator==(ParseErrorCode code) const { return code_ == code; }
- friend bool operator==(ParseErrorCode code, const ParseResult & err) { return code == err.code_; }
-
- //! Reset error code.
- void Clear() { Set(kParseErrorNone); }
- //! Update error code and offset.
- void Set(ParseErrorCode code, size_t offset = 0) { code_ = code; offset_ = offset; }
-
-private:
- ParseErrorCode code_;
- size_t offset_;
-};
-
-//! Function pointer type of GetParseError().
-/*! \ingroup RAPIDJSON_ERRORS
-
- This is the prototype for \c GetParseError_X(), where \c X is a locale.
- User can dynamically change locale in runtime, e.g.:
-\code
- GetParseErrorFunc GetParseError = GetParseError_En; // or whatever
- const RAPIDJSON_ERROR_CHARTYPE* s = GetParseError(document.GetParseErrorCode());
-\endcode
-*/
-typedef const RAPIDJSON_ERROR_CHARTYPE* (*GetParseErrorFunc)(ParseErrorCode);
-
-RAPIDJSON_NAMESPACE_END
-
-#ifdef __clang__
-RAPIDJSON_DIAG_POP
-#endif
-
-#endif // RAPIDJSON_ERROR_ERROR_H_
diff --git a/3rdparty/rapidjson/include/rapidjson/filereadstream.h b/3rdparty/rapidjson/include/rapidjson/filereadstream.h
deleted file mode 100644
index b56ea13b342..00000000000
--- a/3rdparty/rapidjson/include/rapidjson/filereadstream.h
+++ /dev/null
@@ -1,99 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 RAPIDJSON_FILEREADSTREAM_H_
-#define RAPIDJSON_FILEREADSTREAM_H_
-
-#include "stream.h"
-#include <cstdio>
-
-#ifdef __clang__
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(padded)
-RAPIDJSON_DIAG_OFF(unreachable-code)
-RAPIDJSON_DIAG_OFF(missing-noreturn)
-#endif
-
-RAPIDJSON_NAMESPACE_BEGIN
-
-//! File byte stream for input using fread().
-/*!
- \note implements Stream concept
-*/
-class FileReadStream {
-public:
- typedef char Ch; //!< Character type (byte).
-
- //! Constructor.
- /*!
- \param fp File pointer opened for read.
- \param buffer user-supplied buffer.
- \param bufferSize size of buffer in bytes. Must >=4 bytes.
- */
- FileReadStream(std::FILE* fp, char* buffer, size_t bufferSize) : fp_(fp), buffer_(buffer), bufferSize_(bufferSize), bufferLast_(0), current_(buffer_), readCount_(0), count_(0), eof_(false) {
- RAPIDJSON_ASSERT(fp_ != 0);
- RAPIDJSON_ASSERT(bufferSize >= 4);
- Read();
- }
-
- Ch Peek() const { return *current_; }
- Ch Take() { Ch c = *current_; Read(); return c; }
- size_t Tell() const { return count_ + static_cast<size_t>(current_ - buffer_); }
-
- // Not implemented
- void Put(Ch) { RAPIDJSON_ASSERT(false); }
- void Flush() { RAPIDJSON_ASSERT(false); }
- Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; }
- size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; }
-
- // For encoding detection only.
- const Ch* Peek4() const {
- return (current_ + 4 <= bufferLast_) ? current_ : 0;
- }
-
-private:
- void Read() {
- if (current_ < bufferLast_)
- ++current_;
- else if (!eof_) {
- count_ += readCount_;
- readCount_ = fread(buffer_, 1, bufferSize_, fp_);
- bufferLast_ = buffer_ + readCount_ - 1;
- current_ = buffer_;
-
- if (readCount_ < bufferSize_) {
- buffer_[readCount_] = '\0';
- ++bufferLast_;
- eof_ = true;
- }
- }
- }
-
- std::FILE* fp_;
- Ch *buffer_;
- size_t bufferSize_;
- Ch *bufferLast_;
- Ch *current_;
- size_t readCount_;
- size_t count_; //!< Number of characters read
- bool eof_;
-};
-
-RAPIDJSON_NAMESPACE_END
-
-#ifdef __clang__
-RAPIDJSON_DIAG_POP
-#endif
-
-#endif // RAPIDJSON_FILESTREAM_H_
diff --git a/3rdparty/rapidjson/include/rapidjson/filewritestream.h b/3rdparty/rapidjson/include/rapidjson/filewritestream.h
deleted file mode 100644
index 6378dd60ed4..00000000000
--- a/3rdparty/rapidjson/include/rapidjson/filewritestream.h
+++ /dev/null
@@ -1,104 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 RAPIDJSON_FILEWRITESTREAM_H_
-#define RAPIDJSON_FILEWRITESTREAM_H_
-
-#include "stream.h"
-#include <cstdio>
-
-#ifdef __clang__
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(unreachable-code)
-#endif
-
-RAPIDJSON_NAMESPACE_BEGIN
-
-//! Wrapper of C file stream for input using fread().
-/*!
- \note implements Stream concept
-*/
-class FileWriteStream {
-public:
- typedef char Ch; //!< Character type. Only support char.
-
- FileWriteStream(std::FILE* fp, char* buffer, size_t bufferSize) : fp_(fp), buffer_(buffer), bufferEnd_(buffer + bufferSize), current_(buffer_) {
- RAPIDJSON_ASSERT(fp_ != 0);
- }
-
- void Put(char c) {
- if (current_ >= bufferEnd_)
- Flush();
-
- *current_++ = c;
- }
-
- void PutN(char c, size_t n) {
- size_t avail = static_cast<size_t>(bufferEnd_ - current_);
- while (n > avail) {
- std::memset(current_, c, avail);
- current_ += avail;
- Flush();
- n -= avail;
- avail = static_cast<size_t>(bufferEnd_ - current_);
- }
-
- if (n > 0) {
- std::memset(current_, c, n);
- current_ += n;
- }
- }
-
- void Flush() {
- if (current_ != buffer_) {
- size_t result = fwrite(buffer_, 1, static_cast<size_t>(current_ - buffer_), fp_);
- if (result < static_cast<size_t>(current_ - buffer_)) {
- // failure deliberately ignored at this time
- // added to avoid warn_unused_result build errors
- }
- current_ = buffer_;
- }
- }
-
- // Not implemented
- char Peek() const { RAPIDJSON_ASSERT(false); return 0; }
- char Take() { RAPIDJSON_ASSERT(false); return 0; }
- size_t Tell() const { RAPIDJSON_ASSERT(false); return 0; }
- char* PutBegin() { RAPIDJSON_ASSERT(false); return 0; }
- size_t PutEnd(char*) { RAPIDJSON_ASSERT(false); return 0; }
-
-private:
- // Prohibit copy constructor & assignment operator.
- FileWriteStream(const FileWriteStream&);
- FileWriteStream& operator=(const FileWriteStream&);
-
- std::FILE* fp_;
- char *buffer_;
- char *bufferEnd_;
- char *current_;
-};
-
-//! Implement specialized version of PutN() with memset() for better performance.
-template<>
-inline void PutN(FileWriteStream& stream, char c, size_t n) {
- stream.PutN(c, n);
-}
-
-RAPIDJSON_NAMESPACE_END
-
-#ifdef __clang__
-RAPIDJSON_DIAG_POP
-#endif
-
-#endif // RAPIDJSON_FILESTREAM_H_
diff --git a/3rdparty/rapidjson/include/rapidjson/fwd.h b/3rdparty/rapidjson/include/rapidjson/fwd.h
deleted file mode 100644
index e8104e841bc..00000000000
--- a/3rdparty/rapidjson/include/rapidjson/fwd.h
+++ /dev/null
@@ -1,151 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 RAPIDJSON_FWD_H_
-#define RAPIDJSON_FWD_H_
-
-#include "rapidjson.h"
-
-RAPIDJSON_NAMESPACE_BEGIN
-
-// encodings.h
-
-template<typename CharType> struct UTF8;
-template<typename CharType> struct UTF16;
-template<typename CharType> struct UTF16BE;
-template<typename CharType> struct UTF16LE;
-template<typename CharType> struct UTF32;
-template<typename CharType> struct UTF32BE;
-template<typename CharType> struct UTF32LE;
-template<typename CharType> struct ASCII;
-template<typename CharType> struct AutoUTF;
-
-template<typename SourceEncoding, typename TargetEncoding>
-struct Transcoder;
-
-// allocators.h
-
-class CrtAllocator;
-
-template <typename BaseAllocator>
-class MemoryPoolAllocator;
-
-// stream.h
-
-template <typename Encoding>
-struct GenericStringStream;
-
-typedef GenericStringStream<UTF8<char> > StringStream;
-
-template <typename Encoding>
-struct GenericInsituStringStream;
-
-typedef GenericInsituStringStream<UTF8<char> > InsituStringStream;
-
-// stringbuffer.h
-
-template <typename Encoding, typename Allocator>
-class GenericStringBuffer;
-
-typedef GenericStringBuffer<UTF8<char>, CrtAllocator> StringBuffer;
-
-// filereadstream.h
-
-class FileReadStream;
-
-// filewritestream.h
-
-class FileWriteStream;
-
-// memorybuffer.h
-
-template <typename Allocator>
-struct GenericMemoryBuffer;
-
-typedef GenericMemoryBuffer<CrtAllocator> MemoryBuffer;
-
-// memorystream.h
-
-struct MemoryStream;
-
-// reader.h
-
-template<typename Encoding, typename Derived>
-struct BaseReaderHandler;
-
-template <typename SourceEncoding, typename TargetEncoding, typename StackAllocator>
-class GenericReader;
-
-typedef GenericReader<UTF8<char>, UTF8<char>, CrtAllocator> Reader;
-
-// writer.h
-
-template<typename OutputStream, typename SourceEncoding, typename TargetEncoding, typename StackAllocator, unsigned writeFlags>
-class Writer;
-
-// prettywriter.h
-
-template<typename OutputStream, typename SourceEncoding, typename TargetEncoding, typename StackAllocator, unsigned writeFlags>
-class PrettyWriter;
-
-// document.h
-
-template <typename Encoding, typename Allocator>
-struct GenericMember;
-
-template <bool Const, typename Encoding, typename Allocator>
-class GenericMemberIterator;
-
-template<typename CharType>
-struct GenericStringRef;
-
-template <typename Encoding, typename Allocator>
-class GenericValue;
-
-typedef GenericValue<UTF8<char>, MemoryPoolAllocator<CrtAllocator> > Value;
-
-template <typename Encoding, typename Allocator, typename StackAllocator>
-class GenericDocument;
-
-typedef GenericDocument<UTF8<char>, MemoryPoolAllocator<CrtAllocator>, CrtAllocator> Document;
-
-// pointer.h
-
-template <typename ValueType, typename Allocator>
-class GenericPointer;
-
-typedef GenericPointer<Value, CrtAllocator> Pointer;
-
-// schema.h
-
-template <typename SchemaDocumentType>
-class IGenericRemoteSchemaDocumentProvider;
-
-template <typename ValueT, typename Allocator>
-class GenericSchemaDocument;
-
-typedef GenericSchemaDocument<Value, CrtAllocator> SchemaDocument;
-typedef IGenericRemoteSchemaDocumentProvider<SchemaDocument> IRemoteSchemaDocumentProvider;
-
-template <
- typename SchemaDocumentType,
- typename OutputHandler,
- typename StateAllocator>
-class GenericSchemaValidator;
-
-typedef GenericSchemaValidator<SchemaDocument, BaseReaderHandler<UTF8<char>, void>, CrtAllocator> SchemaValidator;
-
-RAPIDJSON_NAMESPACE_END
-
-#endif // RAPIDJSON_RAPIDJSONFWD_H_
diff --git a/3rdparty/rapidjson/include/rapidjson/internal/biginteger.h b/3rdparty/rapidjson/include/rapidjson/internal/biginteger.h
deleted file mode 100644
index 9d3e88c9981..00000000000
--- a/3rdparty/rapidjson/include/rapidjson/internal/biginteger.h
+++ /dev/null
@@ -1,290 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 RAPIDJSON_BIGINTEGER_H_
-#define RAPIDJSON_BIGINTEGER_H_
-
-#include "../rapidjson.h"
-
-#if defined(_MSC_VER) && defined(_M_AMD64)
-#include <intrin.h> // for _umul128
-#pragma intrinsic(_umul128)
-#endif
-
-RAPIDJSON_NAMESPACE_BEGIN
-namespace internal {
-
-class BigInteger {
-public:
- typedef uint64_t Type;
-
- BigInteger(const BigInteger& rhs) : count_(rhs.count_) {
- std::memcpy(digits_, rhs.digits_, count_ * sizeof(Type));
- }
-
- explicit BigInteger(uint64_t u) : count_(1) {
- digits_[0] = u;
- }
-
- BigInteger(const char* decimals, size_t length) : count_(1) {
- RAPIDJSON_ASSERT(length > 0);
- digits_[0] = 0;
- size_t i = 0;
- const size_t kMaxDigitPerIteration = 19; // 2^64 = 18446744073709551616 > 10^19
- while (length >= kMaxDigitPerIteration) {
- AppendDecimal64(decimals + i, decimals + i + kMaxDigitPerIteration);
- length -= kMaxDigitPerIteration;
- i += kMaxDigitPerIteration;
- }
-
- if (length > 0)
- AppendDecimal64(decimals + i, decimals + i + length);
- }
-
- BigInteger& operator=(const BigInteger &rhs)
- {
- if (this != &rhs) {
- count_ = rhs.count_;
- std::memcpy(digits_, rhs.digits_, count_ * sizeof(Type));
- }
- return *this;
- }
-
- BigInteger& operator=(uint64_t u) {
- digits_[0] = u;
- count_ = 1;
- return *this;
- }
-
- BigInteger& operator+=(uint64_t u) {
- Type backup = digits_[0];
- digits_[0] += u;
- for (size_t i = 0; i < count_ - 1; i++) {
- if (digits_[i] >= backup)
- return *this; // no carry
- backup = digits_[i + 1];
- digits_[i + 1] += 1;
- }
-
- // Last carry
- if (digits_[count_ - 1] < backup)
- PushBack(1);
-
- return *this;
- }
-
- BigInteger& operator*=(uint64_t u) {
- if (u == 0) return *this = 0;
- if (u == 1) return *this;
- if (*this == 1) return *this = u;
-
- uint64_t k = 0;
- for (size_t i = 0; i < count_; i++) {
- uint64_t hi;
- digits_[i] = MulAdd64(digits_[i], u, k, &hi);
- k = hi;
- }
-
- if (k > 0)
- PushBack(k);
-
- return *this;
- }
-
- BigInteger& operator*=(uint32_t u) {
- if (u == 0) return *this = 0;
- if (u == 1) return *this;
- if (*this == 1) return *this = u;
-
- uint64_t k = 0;
- for (size_t i = 0; i < count_; i++) {
- const uint64_t c = digits_[i] >> 32;
- const uint64_t d = digits_[i] & 0xFFFFFFFF;
- const uint64_t uc = u * c;
- const uint64_t ud = u * d;
- const uint64_t p0 = ud + k;
- const uint64_t p1 = uc + (p0 >> 32);
- digits_[i] = (p0 & 0xFFFFFFFF) | (p1 << 32);
- k = p1 >> 32;
- }
-
- if (k > 0)
- PushBack(k);
-
- return *this;
- }
-
- BigInteger& operator<<=(size_t shift) {
- if (IsZero() || shift == 0) return *this;
-
- size_t offset = shift / kTypeBit;
- size_t interShift = shift % kTypeBit;
- RAPIDJSON_ASSERT(count_ + offset <= kCapacity);
-
- if (interShift == 0) {
- std::memmove(&digits_[count_ - 1 + offset], &digits_[count_ - 1], count_ * sizeof(Type));
- count_ += offset;
- }
- else {
- digits_[count_] = 0;
- for (size_t i = count_; i > 0; i--)
- digits_[i + offset] = (digits_[i] << interShift) | (digits_[i - 1] >> (kTypeBit - interShift));
- digits_[offset] = digits_[0] << interShift;
- count_ += offset;
- if (digits_[count_])
- count_++;
- }
-
- std::memset(digits_, 0, offset * sizeof(Type));
-
- return *this;
- }
-
- bool operator==(const BigInteger& rhs) const {
- return count_ == rhs.count_ && std::memcmp(digits_, rhs.digits_, count_ * sizeof(Type)) == 0;
- }
-
- bool operator==(const Type rhs) const {
- return count_ == 1 && digits_[0] == rhs;
- }
-
- BigInteger& MultiplyPow5(unsigned exp) {
- static const uint32_t kPow5[12] = {
- 5,
- 5 * 5,
- 5 * 5 * 5,
- 5 * 5 * 5 * 5,
- 5 * 5 * 5 * 5 * 5,
- 5 * 5 * 5 * 5 * 5 * 5,
- 5 * 5 * 5 * 5 * 5 * 5 * 5,
- 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5,
- 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5,
- 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5,
- 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5,
- 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5
- };
- if (exp == 0) return *this;
- for (; exp >= 27; exp -= 27) *this *= RAPIDJSON_UINT64_C2(0X6765C793, 0XFA10079D); // 5^27
- for (; exp >= 13; exp -= 13) *this *= static_cast<uint32_t>(1220703125u); // 5^13
- if (exp > 0) *this *= kPow5[exp - 1];
- return *this;
- }
-
- // Compute absolute difference of this and rhs.
- // Assume this != rhs
- bool Difference(const BigInteger& rhs, BigInteger* out) const {
- int cmp = Compare(rhs);
- RAPIDJSON_ASSERT(cmp != 0);
- const BigInteger *a, *b; // Makes a > b
- bool ret;
- if (cmp < 0) { a = &rhs; b = this; ret = true; }
- else { a = this; b = &rhs; ret = false; }
-
- Type borrow = 0;
- for (size_t i = 0; i < a->count_; i++) {
- Type d = a->digits_[i] - borrow;
- if (i < b->count_)
- d -= b->digits_[i];
- borrow = (d > a->digits_[i]) ? 1 : 0;
- out->digits_[i] = d;
- if (d != 0)
- out->count_ = i + 1;
- }
-
- return ret;
- }
-
- int Compare(const BigInteger& rhs) const {
- if (count_ != rhs.count_)
- return count_ < rhs.count_ ? -1 : 1;
-
- for (size_t i = count_; i-- > 0;)
- if (digits_[i] != rhs.digits_[i])
- return digits_[i] < rhs.digits_[i] ? -1 : 1;
-
- return 0;
- }
-
- size_t GetCount() const { return count_; }
- Type GetDigit(size_t index) const { RAPIDJSON_ASSERT(index < count_); return digits_[index]; }
- bool IsZero() const { return count_ == 1 && digits_[0] == 0; }
-
-private:
- void AppendDecimal64(const char* begin, const char* end) {
- uint64_t u = ParseUint64(begin, end);
- if (IsZero())
- *this = u;
- else {
- unsigned exp = static_cast<unsigned>(end - begin);
- (MultiplyPow5(exp) <<= exp) += u; // *this = *this * 10^exp + u
- }
- }
-
- void PushBack(Type digit) {
- RAPIDJSON_ASSERT(count_ < kCapacity);
- digits_[count_++] = digit;
- }
-
- static uint64_t ParseUint64(const char* begin, const char* end) {
- uint64_t r = 0;
- for (const char* p = begin; p != end; ++p) {
- RAPIDJSON_ASSERT(*p >= '0' && *p <= '9');
- r = r * 10u + static_cast<unsigned>(*p - '0');
- }
- return r;
- }
-
- // Assume a * b + k < 2^128
- static uint64_t MulAdd64(uint64_t a, uint64_t b, uint64_t k, uint64_t* outHigh) {
-#if defined(_MSC_VER) && defined(_M_AMD64)
- uint64_t low = _umul128(a, b, outHigh) + k;
- if (low < k)
- (*outHigh)++;
- return low;
-#elif (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && defined(__x86_64__)
- __extension__ typedef unsigned __int128 uint128;
- uint128 p = static_cast<uint128>(a) * static_cast<uint128>(b);
- p += k;
- *outHigh = static_cast<uint64_t>(p >> 64);
- return static_cast<uint64_t>(p);
-#else
- const uint64_t a0 = a & 0xFFFFFFFF, a1 = a >> 32, b0 = b & 0xFFFFFFFF, b1 = b >> 32;
- uint64_t x0 = a0 * b0, x1 = a0 * b1, x2 = a1 * b0, x3 = a1 * b1;
- x1 += (x0 >> 32); // can't give carry
- x1 += x2;
- if (x1 < x2)
- x3 += (static_cast<uint64_t>(1) << 32);
- uint64_t lo = (x1 << 32) + (x0 & 0xFFFFFFFF);
- uint64_t hi = x3 + (x1 >> 32);
-
- lo += k;
- if (lo < k)
- hi++;
- *outHigh = hi;
- return lo;
-#endif
- }
-
- static const size_t kBitCount = 3328; // 64bit * 54 > 10^1000
- static const size_t kCapacity = kBitCount / sizeof(Type);
- static const size_t kTypeBit = sizeof(Type) * 8;
-
- Type digits_[kCapacity];
- size_t count_;
-};
-
-} // namespace internal
-RAPIDJSON_NAMESPACE_END
-
-#endif // RAPIDJSON_BIGINTEGER_H_
diff --git a/3rdparty/rapidjson/include/rapidjson/internal/diyfp.h b/3rdparty/rapidjson/include/rapidjson/internal/diyfp.h
deleted file mode 100644
index c9fefdc6139..00000000000
--- a/3rdparty/rapidjson/include/rapidjson/internal/diyfp.h
+++ /dev/null
@@ -1,258 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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.
-
-// This is a C++ header-only implementation of Grisu2 algorithm from the publication:
-// Loitsch, Florian. "Printing floating-point numbers quickly and accurately with
-// integers." ACM Sigplan Notices 45.6 (2010): 233-243.
-
-#ifndef RAPIDJSON_DIYFP_H_
-#define RAPIDJSON_DIYFP_H_
-
-#include "../rapidjson.h"
-
-#if defined(_MSC_VER) && defined(_M_AMD64)
-#include <intrin.h>
-#pragma intrinsic(_BitScanReverse64)
-#pragma intrinsic(_umul128)
-#endif
-
-RAPIDJSON_NAMESPACE_BEGIN
-namespace internal {
-
-#ifdef __GNUC__
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(effc++)
-#endif
-
-#ifdef __clang__
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(padded)
-#endif
-
-struct DiyFp {
- DiyFp() : f(), e() {}
-
- DiyFp(uint64_t fp, int exp) : f(fp), e(exp) {}
-
- explicit DiyFp(double d) {
- union {
- double d;
- uint64_t u64;
- } u = { d };
-
- int biased_e = static_cast<int>((u.u64 & kDpExponentMask) >> kDpSignificandSize);
- uint64_t significand = (u.u64 & kDpSignificandMask);
- if (biased_e != 0) {
- f = significand + kDpHiddenBit;
- e = biased_e - kDpExponentBias;
- }
- else {
- f = significand;
- e = kDpMinExponent + 1;
- }
- }
-
- DiyFp operator-(const DiyFp& rhs) const {
- return DiyFp(f - rhs.f, e);
- }
-
- DiyFp operator*(const DiyFp& rhs) const {
-#if defined(_MSC_VER) && defined(_M_AMD64)
- uint64_t h;
- uint64_t l = _umul128(f, rhs.f, &h);
- if (l & (uint64_t(1) << 63)) // rounding
- h++;
- return DiyFp(h, e + rhs.e + 64);
-#elif (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && defined(__x86_64__)
- __extension__ typedef unsigned __int128 uint128;
- uint128 p = static_cast<uint128>(f) * static_cast<uint128>(rhs.f);
- uint64_t h = static_cast<uint64_t>(p >> 64);
- uint64_t l = static_cast<uint64_t>(p);
- if (l & (uint64_t(1) << 63)) // rounding
- h++;
- return DiyFp(h, e + rhs.e + 64);
-#else
- const uint64_t M32 = 0xFFFFFFFF;
- const uint64_t a = f >> 32;
- const uint64_t b = f & M32;
- const uint64_t c = rhs.f >> 32;
- const uint64_t d = rhs.f & M32;
- const uint64_t ac = a * c;
- const uint64_t bc = b * c;
- const uint64_t ad = a * d;
- const uint64_t bd = b * d;
- uint64_t tmp = (bd >> 32) + (ad & M32) + (bc & M32);
- tmp += 1U << 31; /// mult_round
- return DiyFp(ac + (ad >> 32) + (bc >> 32) + (tmp >> 32), e + rhs.e + 64);
-#endif
- }
-
- DiyFp Normalize() const {
-#if defined(_MSC_VER) && defined(_M_AMD64)
- unsigned long index;
- _BitScanReverse64(&index, f);
- return DiyFp(f << (63 - index), e - (63 - index));
-#elif defined(__GNUC__) && __GNUC__ >= 4
- int s = __builtin_clzll(f);
- return DiyFp(f << s, e - s);
-#else
- DiyFp res = *this;
- while (!(res.f & (static_cast<uint64_t>(1) << 63))) {
- res.f <<= 1;
- res.e--;
- }
- return res;
-#endif
- }
-
- DiyFp NormalizeBoundary() const {
- DiyFp res = *this;
- while (!(res.f & (kDpHiddenBit << 1))) {
- res.f <<= 1;
- res.e--;
- }
- res.f <<= (kDiySignificandSize - kDpSignificandSize - 2);
- res.e = res.e - (kDiySignificandSize - kDpSignificandSize - 2);
- return res;
- }
-
- void NormalizedBoundaries(DiyFp* minus, DiyFp* plus) const {
- DiyFp pl = DiyFp((f << 1) + 1, e - 1).NormalizeBoundary();
- DiyFp mi = (f == kDpHiddenBit) ? DiyFp((f << 2) - 1, e - 2) : DiyFp((f << 1) - 1, e - 1);
- mi.f <<= mi.e - pl.e;
- mi.e = pl.e;
- *plus = pl;
- *minus = mi;
- }
-
- double ToDouble() const {
- union {
- double d;
- uint64_t u64;
- }u;
- const uint64_t be = (e == kDpDenormalExponent && (f & kDpHiddenBit) == 0) ? 0 :
- static_cast<uint64_t>(e + kDpExponentBias);
- u.u64 = (f & kDpSignificandMask) | (be << kDpSignificandSize);
- return u.d;
- }
-
- static const int kDiySignificandSize = 64;
- static const int kDpSignificandSize = 52;
- static const int kDpExponentBias = 0x3FF + kDpSignificandSize;
- static const int kDpMaxExponent = 0x7FF - kDpExponentBias;
- static const int kDpMinExponent = -kDpExponentBias;
- static const int kDpDenormalExponent = -kDpExponentBias + 1;
- static const uint64_t kDpExponentMask = RAPIDJSON_UINT64_C2(0x7FF00000, 0x00000000);
- static const uint64_t kDpSignificandMask = RAPIDJSON_UINT64_C2(0x000FFFFF, 0xFFFFFFFF);
- static const uint64_t kDpHiddenBit = RAPIDJSON_UINT64_C2(0x00100000, 0x00000000);
-
- uint64_t f;
- int e;
-};
-
-inline DiyFp GetCachedPowerByIndex(size_t index) {
- // 10^-348, 10^-340, ..., 10^340
- static const uint64_t kCachedPowers_F[] = {
- RAPIDJSON_UINT64_C2(0xfa8fd5a0, 0x081c0288), RAPIDJSON_UINT64_C2(0xbaaee17f, 0xa23ebf76),
- RAPIDJSON_UINT64_C2(0x8b16fb20, 0x3055ac76), RAPIDJSON_UINT64_C2(0xcf42894a, 0x5dce35ea),
- RAPIDJSON_UINT64_C2(0x9a6bb0aa, 0x55653b2d), RAPIDJSON_UINT64_C2(0xe61acf03, 0x3d1a45df),
- RAPIDJSON_UINT64_C2(0xab70fe17, 0xc79ac6ca), RAPIDJSON_UINT64_C2(0xff77b1fc, 0xbebcdc4f),
- RAPIDJSON_UINT64_C2(0xbe5691ef, 0x416bd60c), RAPIDJSON_UINT64_C2(0x8dd01fad, 0x907ffc3c),
- RAPIDJSON_UINT64_C2(0xd3515c28, 0x31559a83), RAPIDJSON_UINT64_C2(0x9d71ac8f, 0xada6c9b5),
- RAPIDJSON_UINT64_C2(0xea9c2277, 0x23ee8bcb), RAPIDJSON_UINT64_C2(0xaecc4991, 0x4078536d),
- RAPIDJSON_UINT64_C2(0x823c1279, 0x5db6ce57), RAPIDJSON_UINT64_C2(0xc2109436, 0x4dfb5637),
- RAPIDJSON_UINT64_C2(0x9096ea6f, 0x3848984f), RAPIDJSON_UINT64_C2(0xd77485cb, 0x25823ac7),
- RAPIDJSON_UINT64_C2(0xa086cfcd, 0x97bf97f4), RAPIDJSON_UINT64_C2(0xef340a98, 0x172aace5),
- RAPIDJSON_UINT64_C2(0xb23867fb, 0x2a35b28e), RAPIDJSON_UINT64_C2(0x84c8d4df, 0xd2c63f3b),
- RAPIDJSON_UINT64_C2(0xc5dd4427, 0x1ad3cdba), RAPIDJSON_UINT64_C2(0x936b9fce, 0xbb25c996),
- RAPIDJSON_UINT64_C2(0xdbac6c24, 0x7d62a584), RAPIDJSON_UINT64_C2(0xa3ab6658, 0x0d5fdaf6),
- RAPIDJSON_UINT64_C2(0xf3e2f893, 0xdec3f126), RAPIDJSON_UINT64_C2(0xb5b5ada8, 0xaaff80b8),
- RAPIDJSON_UINT64_C2(0x87625f05, 0x6c7c4a8b), RAPIDJSON_UINT64_C2(0xc9bcff60, 0x34c13053),
- RAPIDJSON_UINT64_C2(0x964e858c, 0x91ba2655), RAPIDJSON_UINT64_C2(0xdff97724, 0x70297ebd),
- RAPIDJSON_UINT64_C2(0xa6dfbd9f, 0xb8e5b88f), RAPIDJSON_UINT64_C2(0xf8a95fcf, 0x88747d94),
- RAPIDJSON_UINT64_C2(0xb9447093, 0x8fa89bcf), RAPIDJSON_UINT64_C2(0x8a08f0f8, 0xbf0f156b),
- RAPIDJSON_UINT64_C2(0xcdb02555, 0x653131b6), RAPIDJSON_UINT64_C2(0x993fe2c6, 0xd07b7fac),
- RAPIDJSON_UINT64_C2(0xe45c10c4, 0x2a2b3b06), RAPIDJSON_UINT64_C2(0xaa242499, 0x697392d3),
- RAPIDJSON_UINT64_C2(0xfd87b5f2, 0x8300ca0e), RAPIDJSON_UINT64_C2(0xbce50864, 0x92111aeb),
- RAPIDJSON_UINT64_C2(0x8cbccc09, 0x6f5088cc), RAPIDJSON_UINT64_C2(0xd1b71758, 0xe219652c),
- RAPIDJSON_UINT64_C2(0x9c400000, 0x00000000), RAPIDJSON_UINT64_C2(0xe8d4a510, 0x00000000),
- RAPIDJSON_UINT64_C2(0xad78ebc5, 0xac620000), RAPIDJSON_UINT64_C2(0x813f3978, 0xf8940984),
- RAPIDJSON_UINT64_C2(0xc097ce7b, 0xc90715b3), RAPIDJSON_UINT64_C2(0x8f7e32ce, 0x7bea5c70),
- RAPIDJSON_UINT64_C2(0xd5d238a4, 0xabe98068), RAPIDJSON_UINT64_C2(0x9f4f2726, 0x179a2245),
- RAPIDJSON_UINT64_C2(0xed63a231, 0xd4c4fb27), RAPIDJSON_UINT64_C2(0xb0de6538, 0x8cc8ada8),
- RAPIDJSON_UINT64_C2(0x83c7088e, 0x1aab65db), RAPIDJSON_UINT64_C2(0xc45d1df9, 0x42711d9a),
- RAPIDJSON_UINT64_C2(0x924d692c, 0xa61be758), RAPIDJSON_UINT64_C2(0xda01ee64, 0x1a708dea),
- RAPIDJSON_UINT64_C2(0xa26da399, 0x9aef774a), RAPIDJSON_UINT64_C2(0xf209787b, 0xb47d6b85),
- RAPIDJSON_UINT64_C2(0xb454e4a1, 0x79dd1877), RAPIDJSON_UINT64_C2(0x865b8692, 0x5b9bc5c2),
- RAPIDJSON_UINT64_C2(0xc83553c5, 0xc8965d3d), RAPIDJSON_UINT64_C2(0x952ab45c, 0xfa97a0b3),
- RAPIDJSON_UINT64_C2(0xde469fbd, 0x99a05fe3), RAPIDJSON_UINT64_C2(0xa59bc234, 0xdb398c25),
- RAPIDJSON_UINT64_C2(0xf6c69a72, 0xa3989f5c), RAPIDJSON_UINT64_C2(0xb7dcbf53, 0x54e9bece),
- RAPIDJSON_UINT64_C2(0x88fcf317, 0xf22241e2), RAPIDJSON_UINT64_C2(0xcc20ce9b, 0xd35c78a5),
- RAPIDJSON_UINT64_C2(0x98165af3, 0x7b2153df), RAPIDJSON_UINT64_C2(0xe2a0b5dc, 0x971f303a),
- RAPIDJSON_UINT64_C2(0xa8d9d153, 0x5ce3b396), RAPIDJSON_UINT64_C2(0xfb9b7cd9, 0xa4a7443c),
- RAPIDJSON_UINT64_C2(0xbb764c4c, 0xa7a44410), RAPIDJSON_UINT64_C2(0x8bab8eef, 0xb6409c1a),
- RAPIDJSON_UINT64_C2(0xd01fef10, 0xa657842c), RAPIDJSON_UINT64_C2(0x9b10a4e5, 0xe9913129),
- RAPIDJSON_UINT64_C2(0xe7109bfb, 0xa19c0c9d), RAPIDJSON_UINT64_C2(0xac2820d9, 0x623bf429),
- RAPIDJSON_UINT64_C2(0x80444b5e, 0x7aa7cf85), RAPIDJSON_UINT64_C2(0xbf21e440, 0x03acdd2d),
- RAPIDJSON_UINT64_C2(0x8e679c2f, 0x5e44ff8f), RAPIDJSON_UINT64_C2(0xd433179d, 0x9c8cb841),
- RAPIDJSON_UINT64_C2(0x9e19db92, 0xb4e31ba9), RAPIDJSON_UINT64_C2(0xeb96bf6e, 0xbadf77d9),
- RAPIDJSON_UINT64_C2(0xaf87023b, 0x9bf0ee6b)
- };
- static const int16_t kCachedPowers_E[] = {
- -1220, -1193, -1166, -1140, -1113, -1087, -1060, -1034, -1007, -980,
- -954, -927, -901, -874, -847, -821, -794, -768, -741, -715,
- -688, -661, -635, -608, -582, -555, -529, -502, -475, -449,
- -422, -396, -369, -343, -316, -289, -263, -236, -210, -183,
- -157, -130, -103, -77, -50, -24, 3, 30, 56, 83,
- 109, 136, 162, 189, 216, 242, 269, 295, 322, 348,
- 375, 402, 428, 455, 481, 508, 534, 561, 588, 614,
- 641, 667, 694, 720, 747, 774, 800, 827, 853, 880,
- 907, 933, 960, 986, 1013, 1039, 1066
- };
- return DiyFp(kCachedPowers_F[index], kCachedPowers_E[index]);
-}
-
-inline DiyFp GetCachedPower(int e, int* K) {
-
- //int k = static_cast<int>(ceil((-61 - e) * 0.30102999566398114)) + 374;
- double dk = (-61 - e) * 0.30102999566398114 + 347; // dk must be positive, so can do ceiling in positive
- int k = static_cast<int>(dk);
- if (dk - k > 0.0)
- k++;
-
- unsigned index = static_cast<unsigned>((k >> 3) + 1);
- *K = -(-348 + static_cast<int>(index << 3)); // decimal exponent no need lookup table
-
- return GetCachedPowerByIndex(index);
-}
-
-inline DiyFp GetCachedPower10(int exp, int *outExp) {
- unsigned index = (static_cast<unsigned>(exp) + 348u) / 8u;
- *outExp = -348 + static_cast<int>(index) * 8;
- return GetCachedPowerByIndex(index);
- }
-
-#ifdef __GNUC__
-RAPIDJSON_DIAG_POP
-#endif
-
-#ifdef __clang__
-RAPIDJSON_DIAG_POP
-RAPIDJSON_DIAG_OFF(padded)
-#endif
-
-} // namespace internal
-RAPIDJSON_NAMESPACE_END
-
-#endif // RAPIDJSON_DIYFP_H_
diff --git a/3rdparty/rapidjson/include/rapidjson/internal/dtoa.h b/3rdparty/rapidjson/include/rapidjson/internal/dtoa.h
deleted file mode 100644
index 940d61a0548..00000000000
--- a/3rdparty/rapidjson/include/rapidjson/internal/dtoa.h
+++ /dev/null
@@ -1,243 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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.
-
-// This is a C++ header-only implementation of Grisu2 algorithm from the publication:
-// Loitsch, Florian. "Printing floating-point numbers quickly and accurately with
-// integers." ACM Sigplan Notices 45.6 (2010): 233-243.
-
-#ifndef RAPIDJSON_DTOA_
-#define RAPIDJSON_DTOA_
-
-#include "itoa.h" // GetDigitsLut()
-#include "diyfp.h"
-#include "ieee754.h"
-
-RAPIDJSON_NAMESPACE_BEGIN
-namespace internal {
-
-#ifdef __GNUC__
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(effc++)
-#endif
-
-inline void GrisuRound(char* buffer, int len, uint64_t delta, uint64_t rest, uint64_t ten_kappa, uint64_t wp_w) {
- while (rest < wp_w && delta - rest >= ten_kappa &&
- (rest + ten_kappa < wp_w || /// closer
- wp_w - rest > rest + ten_kappa - wp_w)) {
- buffer[len - 1]--;
- rest += ten_kappa;
- }
-}
-
-inline unsigned CountDecimalDigit32(uint32_t n) {
- // Simple pure C++ implementation was faster than __builtin_clz version in this situation.
- if (n < 10) return 1;
- if (n < 100) return 2;
- if (n < 1000) return 3;
- if (n < 10000) return 4;
- if (n < 100000) return 5;
- if (n < 1000000) return 6;
- if (n < 10000000) return 7;
- if (n < 100000000) return 8;
- // Will not reach 10 digits in DigitGen()
- //if (n < 1000000000) return 9;
- //return 10;
- return 9;
-}
-
-inline void DigitGen(const DiyFp& W, const DiyFp& Mp, uint64_t delta, char* buffer, int* len, int* K) {
- static const uint32_t kPow10[] = { 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000 };
- const DiyFp one(uint64_t(1) << -Mp.e, Mp.e);
- const DiyFp wp_w = Mp - W;
- uint32_t p1 = static_cast<uint32_t>(Mp.f >> -one.e);
- uint64_t p2 = Mp.f & (one.f - 1);
- unsigned kappa = CountDecimalDigit32(p1); // kappa in [0, 9]
- *len = 0;
-
- while (kappa > 0) {
- uint32_t d = 0;
- switch (kappa) {
- case 9: d = p1 / 100000000; p1 %= 100000000; break;
- case 8: d = p1 / 10000000; p1 %= 10000000; break;
- case 7: d = p1 / 1000000; p1 %= 1000000; break;
- case 6: d = p1 / 100000; p1 %= 100000; break;
- case 5: d = p1 / 10000; p1 %= 10000; break;
- case 4: d = p1 / 1000; p1 %= 1000; break;
- case 3: d = p1 / 100; p1 %= 100; break;
- case 2: d = p1 / 10; p1 %= 10; break;
- case 1: d = p1; p1 = 0; break;
- default:;
- }
- if (d || *len)
- buffer[(*len)++] = static_cast<char>('0' + static_cast<char>(d));
- kappa--;
- uint64_t tmp = (static_cast<uint64_t>(p1) << -one.e) + p2;
- if (tmp <= delta) {
- *K += kappa;
- GrisuRound(buffer, *len, delta, tmp, static_cast<uint64_t>(kPow10[kappa]) << -one.e, wp_w.f);
- return;
- }
- }
-
- // kappa = 0
- for (;;) {
- p2 *= 10;
- delta *= 10;
- char d = static_cast<char>(p2 >> -one.e);
- if (d || *len)
- buffer[(*len)++] = static_cast<char>('0' + d);
- p2 &= one.f - 1;
- kappa--;
- if (p2 < delta) {
- *K += kappa;
- GrisuRound(buffer, *len, delta, p2, one.f, wp_w.f * kPow10[-static_cast<int>(kappa)]);
- return;
- }
- }
-}
-
-inline void Grisu2(double value, char* buffer, int* length, int* K) {
- const DiyFp v(value);
- DiyFp w_m, w_p;
- v.NormalizedBoundaries(&w_m, &w_p);
-
- const DiyFp c_mk = GetCachedPower(w_p.e, K);
- const DiyFp W = v.Normalize() * c_mk;
- DiyFp Wp = w_p * c_mk;
- DiyFp Wm = w_m * c_mk;
- Wm.f++;
- Wp.f--;
- DigitGen(W, Wp, Wp.f - Wm.f, buffer, length, K);
-}
-
-inline char* WriteExponent(int K, char* buffer) {
- if (K < 0) {
- *buffer++ = '-';
- K = -K;
- }
-
- if (K >= 100) {
- *buffer++ = static_cast<char>('0' + static_cast<char>(K / 100));
- K %= 100;
- const char* d = GetDigitsLut() + K * 2;
- *buffer++ = d[0];
- *buffer++ = d[1];
- }
- else if (K >= 10) {
- const char* d = GetDigitsLut() + K * 2;
- *buffer++ = d[0];
- *buffer++ = d[1];
- }
- else
- *buffer++ = static_cast<char>('0' + static_cast<char>(K));
-
- return buffer;
-}
-
-inline char* Prettify(char* buffer, int length, int k, int maxDecimalPlaces) {
- const int kk = length + k; // 10^(kk-1) <= v < 10^kk
-
- if (length <= kk && kk <= 21) {
- // 1234e7 -> 12340000000
- for (int i = length; i < kk; i++)
- buffer[i] = '0';
- buffer[kk] = '.';
- buffer[kk + 1] = '0';
- return &buffer[kk + 2];
- }
- else if (0 < kk && kk <= 21) {
- // 1234e-2 -> 12.34
- std::memmove(&buffer[kk + 1], &buffer[kk], static_cast<size_t>(length - kk));
- buffer[kk] = '.';
- if (length > kk + maxDecimalPlaces) {
- // When maxDecimalPlaces = 2, 1.2345 -> 1.23, 1.102 -> 1.1
- // Remove extra trailing zeros (at least one) after truncation.
- for (int i = kk + maxDecimalPlaces; i > kk + 1; i--)
- if (buffer[i] != '0')
- return &buffer[i + 1];
- return &buffer[kk + 2]; // Reserve one zero
- }
- else
- return &buffer[length + 1];
- }
- else if (-6 < kk && kk <= 0) {
- // 1234e-6 -> 0.001234
- const int offset = 2 - kk;
- std::memmove(&buffer[offset], &buffer[0], static_cast<size_t>(length));
- buffer[0] = '0';
- buffer[1] = '.';
- for (int i = 2; i < offset; i++)
- buffer[i] = '0';
- if (length + offset > maxDecimalPlaces) {
- // When maxDecimalPlaces = 2, 0.123 -> 0.12, 0.102 -> 0.1
- // Remove extra trailing zeros (at least one) after truncation.
- for (int i = maxDecimalPlaces + 1; i > 2; i--)
- if (buffer[i] != '0')
- return &buffer[i + 1];
- return &buffer[3]; // Reserve one zero
- }
- else
- return &buffer[length + offset];
- }
- else if (kk < -maxDecimalPlaces) {
- // Truncate to zero
- buffer[0] = '0';
- buffer[1] = '.';
- buffer[2] = '0';
- return &buffer[3];
- }
- else if (length == 1) {
- // 1e30
- buffer[1] = 'e';
- return WriteExponent(kk - 1, &buffer[2]);
- }
- else {
- // 1234e30 -> 1.234e33
- std::memmove(&buffer[2], &buffer[1], static_cast<size_t>(length - 1));
- buffer[1] = '.';
- buffer[length + 1] = 'e';
- return WriteExponent(kk - 1, &buffer[0 + length + 2]);
- }
-}
-
-inline char* dtoa(double value, char* buffer, int maxDecimalPlaces = 324) {
- RAPIDJSON_ASSERT(maxDecimalPlaces >= 1);
- Double d(value);
- if (d.IsZero()) {
- if (d.Sign())
- *buffer++ = '-'; // -0.0, Issue #289
- buffer[0] = '0';
- buffer[1] = '.';
- buffer[2] = '0';
- return &buffer[3];
- }
- else {
- if (value < 0) {
- *buffer++ = '-';
- value = -value;
- }
- int length, K;
- Grisu2(value, buffer, &length, &K);
- return Prettify(buffer, length, K, maxDecimalPlaces);
- }
-}
-
-#ifdef __GNUC__
-RAPIDJSON_DIAG_POP
-#endif
-
-} // namespace internal
-RAPIDJSON_NAMESPACE_END
-
-#endif // RAPIDJSON_DTOA_
diff --git a/3rdparty/rapidjson/include/rapidjson/internal/ieee754.h b/3rdparty/rapidjson/include/rapidjson/internal/ieee754.h
deleted file mode 100644
index 82bb0b99e5c..00000000000
--- a/3rdparty/rapidjson/include/rapidjson/internal/ieee754.h
+++ /dev/null
@@ -1,78 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 RAPIDJSON_IEEE754_
-#define RAPIDJSON_IEEE754_
-
-#include "../rapidjson.h"
-
-RAPIDJSON_NAMESPACE_BEGIN
-namespace internal {
-
-class Double {
-public:
- Double() {}
- Double(double d) : d_(d) {}
- Double(uint64_t u) : u_(u) {}
-
- double Value() const { return d_; }
- uint64_t Uint64Value() const { return u_; }
-
- double NextPositiveDouble() const {
- RAPIDJSON_ASSERT(!Sign());
- return Double(u_ + 1).Value();
- }
-
- bool Sign() const { return (u_ & kSignMask) != 0; }
- uint64_t Significand() const { return u_ & kSignificandMask; }
- int Exponent() const { return static_cast<int>(((u_ & kExponentMask) >> kSignificandSize) - kExponentBias); }
-
- bool IsNan() const { return (u_ & kExponentMask) == kExponentMask && Significand() != 0; }
- bool IsInf() const { return (u_ & kExponentMask) == kExponentMask && Significand() == 0; }
- bool IsNanOrInf() const { return (u_ & kExponentMask) == kExponentMask; }
- bool IsNormal() const { return (u_ & kExponentMask) != 0 || Significand() == 0; }
- bool IsZero() const { return (u_ & (kExponentMask | kSignificandMask)) == 0; }
-
- uint64_t IntegerSignificand() const { return IsNormal() ? Significand() | kHiddenBit : Significand(); }
- int IntegerExponent() const { return (IsNormal() ? Exponent() : kDenormalExponent) - kSignificandSize; }
- uint64_t ToBias() const { return (u_ & kSignMask) ? ~u_ + 1 : u_ | kSignMask; }
-
- static unsigned EffectiveSignificandSize(int order) {
- if (order >= -1021)
- return 53;
- else if (order <= -1074)
- return 0;
- else
- return static_cast<unsigned>(order) + 1074;
- }
-
-private:
- static const int kSignificandSize = 52;
- static const int kExponentBias = 0x3FF;
- static const int kDenormalExponent = 1 - kExponentBias;
- static const uint64_t kSignMask = RAPIDJSON_UINT64_C2(0x80000000, 0x00000000);
- static const uint64_t kExponentMask = RAPIDJSON_UINT64_C2(0x7FF00000, 0x00000000);
- static const uint64_t kSignificandMask = RAPIDJSON_UINT64_C2(0x000FFFFF, 0xFFFFFFFF);
- static const uint64_t kHiddenBit = RAPIDJSON_UINT64_C2(0x00100000, 0x00000000);
-
- union {
- double d_;
- uint64_t u_;
- };
-};
-
-} // namespace internal
-RAPIDJSON_NAMESPACE_END
-
-#endif // RAPIDJSON_IEEE754_
diff --git a/3rdparty/rapidjson/include/rapidjson/internal/itoa.h b/3rdparty/rapidjson/include/rapidjson/internal/itoa.h
deleted file mode 100644
index 01a4e7e72d7..00000000000
--- a/3rdparty/rapidjson/include/rapidjson/internal/itoa.h
+++ /dev/null
@@ -1,304 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 RAPIDJSON_ITOA_
-#define RAPIDJSON_ITOA_
-
-#include "../rapidjson.h"
-
-RAPIDJSON_NAMESPACE_BEGIN
-namespace internal {
-
-inline const char* GetDigitsLut() {
- static const char cDigitsLut[200] = {
- '0','0','0','1','0','2','0','3','0','4','0','5','0','6','0','7','0','8','0','9',
- '1','0','1','1','1','2','1','3','1','4','1','5','1','6','1','7','1','8','1','9',
- '2','0','2','1','2','2','2','3','2','4','2','5','2','6','2','7','2','8','2','9',
- '3','0','3','1','3','2','3','3','3','4','3','5','3','6','3','7','3','8','3','9',
- '4','0','4','1','4','2','4','3','4','4','4','5','4','6','4','7','4','8','4','9',
- '5','0','5','1','5','2','5','3','5','4','5','5','5','6','5','7','5','8','5','9',
- '6','0','6','1','6','2','6','3','6','4','6','5','6','6','6','7','6','8','6','9',
- '7','0','7','1','7','2','7','3','7','4','7','5','7','6','7','7','7','8','7','9',
- '8','0','8','1','8','2','8','3','8','4','8','5','8','6','8','7','8','8','8','9',
- '9','0','9','1','9','2','9','3','9','4','9','5','9','6','9','7','9','8','9','9'
- };
- return cDigitsLut;
-}
-
-inline char* u32toa(uint32_t value, char* buffer) {
- const char* cDigitsLut = GetDigitsLut();
-
- if (value < 10000) {
- const uint32_t d1 = (value / 100) << 1;
- const uint32_t d2 = (value % 100) << 1;
-
- if (value >= 1000)
- *buffer++ = cDigitsLut[d1];
- if (value >= 100)
- *buffer++ = cDigitsLut[d1 + 1];
- if (value >= 10)
- *buffer++ = cDigitsLut[d2];
- *buffer++ = cDigitsLut[d2 + 1];
- }
- else if (value < 100000000) {
- // value = bbbbcccc
- const uint32_t b = value / 10000;
- const uint32_t c = value % 10000;
-
- const uint32_t d1 = (b / 100) << 1;
- const uint32_t d2 = (b % 100) << 1;
-
- const uint32_t d3 = (c / 100) << 1;
- const uint32_t d4 = (c % 100) << 1;
-
- if (value >= 10000000)
- *buffer++ = cDigitsLut[d1];
- if (value >= 1000000)
- *buffer++ = cDigitsLut[d1 + 1];
- if (value >= 100000)
- *buffer++ = cDigitsLut[d2];
- *buffer++ = cDigitsLut[d2 + 1];
-
- *buffer++ = cDigitsLut[d3];
- *buffer++ = cDigitsLut[d3 + 1];
- *buffer++ = cDigitsLut[d4];
- *buffer++ = cDigitsLut[d4 + 1];
- }
- else {
- // value = aabbbbcccc in decimal
-
- const uint32_t a = value / 100000000; // 1 to 42
- value %= 100000000;
-
- if (a >= 10) {
- const unsigned i = a << 1;
- *buffer++ = cDigitsLut[i];
- *buffer++ = cDigitsLut[i + 1];
- }
- else
- *buffer++ = static_cast<char>('0' + static_cast<char>(a));
-
- const uint32_t b = value / 10000; // 0 to 9999
- const uint32_t c = value % 10000; // 0 to 9999
-
- const uint32_t d1 = (b / 100) << 1;
- const uint32_t d2 = (b % 100) << 1;
-
- const uint32_t d3 = (c / 100) << 1;
- const uint32_t d4 = (c % 100) << 1;
-
- *buffer++ = cDigitsLut[d1];
- *buffer++ = cDigitsLut[d1 + 1];
- *buffer++ = cDigitsLut[d2];
- *buffer++ = cDigitsLut[d2 + 1];
- *buffer++ = cDigitsLut[d3];
- *buffer++ = cDigitsLut[d3 + 1];
- *buffer++ = cDigitsLut[d4];
- *buffer++ = cDigitsLut[d4 + 1];
- }
- return buffer;
-}
-
-inline char* i32toa(int32_t value, char* buffer) {
- uint32_t u = static_cast<uint32_t>(value);
- if (value < 0) {
- *buffer++ = '-';
- u = ~u + 1;
- }
-
- return u32toa(u, buffer);
-}
-
-inline char* u64toa(uint64_t value, char* buffer) {
- const char* cDigitsLut = GetDigitsLut();
- const uint64_t kTen8 = 100000000;
- const uint64_t kTen9 = kTen8 * 10;
- const uint64_t kTen10 = kTen8 * 100;
- const uint64_t kTen11 = kTen8 * 1000;
- const uint64_t kTen12 = kTen8 * 10000;
- const uint64_t kTen13 = kTen8 * 100000;
- const uint64_t kTen14 = kTen8 * 1000000;
- const uint64_t kTen15 = kTen8 * 10000000;
- const uint64_t kTen16 = kTen8 * kTen8;
-
- if (value < kTen8) {
- uint32_t v = static_cast<uint32_t>(value);
- if (v < 10000) {
- const uint32_t d1 = (v / 100) << 1;
- const uint32_t d2 = (v % 100) << 1;
-
- if (v >= 1000)
- *buffer++ = cDigitsLut[d1];
- if (v >= 100)
- *buffer++ = cDigitsLut[d1 + 1];
- if (v >= 10)
- *buffer++ = cDigitsLut[d2];
- *buffer++ = cDigitsLut[d2 + 1];
- }
- else {
- // value = bbbbcccc
- const uint32_t b = v / 10000;
- const uint32_t c = v % 10000;
-
- const uint32_t d1 = (b / 100) << 1;
- const uint32_t d2 = (b % 100) << 1;
-
- const uint32_t d3 = (c / 100) << 1;
- const uint32_t d4 = (c % 100) << 1;
-
- if (value >= 10000000)
- *buffer++ = cDigitsLut[d1];
- if (value >= 1000000)
- *buffer++ = cDigitsLut[d1 + 1];
- if (value >= 100000)
- *buffer++ = cDigitsLut[d2];
- *buffer++ = cDigitsLut[d2 + 1];
-
- *buffer++ = cDigitsLut[d3];
- *buffer++ = cDigitsLut[d3 + 1];
- *buffer++ = cDigitsLut[d4];
- *buffer++ = cDigitsLut[d4 + 1];
- }
- }
- else if (value < kTen16) {
- const uint32_t v0 = static_cast<uint32_t>(value / kTen8);
- const uint32_t v1 = static_cast<uint32_t>(value % kTen8);
-
- const uint32_t b0 = v0 / 10000;
- const uint32_t c0 = v0 % 10000;
-
- const uint32_t d1 = (b0 / 100) << 1;
- const uint32_t d2 = (b0 % 100) << 1;
-
- const uint32_t d3 = (c0 / 100) << 1;
- const uint32_t d4 = (c0 % 100) << 1;
-
- const uint32_t b1 = v1 / 10000;
- const uint32_t c1 = v1 % 10000;
-
- const uint32_t d5 = (b1 / 100) << 1;
- const uint32_t d6 = (b1 % 100) << 1;
-
- const uint32_t d7 = (c1 / 100) << 1;
- const uint32_t d8 = (c1 % 100) << 1;
-
- if (value >= kTen15)
- *buffer++ = cDigitsLut[d1];
- if (value >= kTen14)
- *buffer++ = cDigitsLut[d1 + 1];
- if (value >= kTen13)
- *buffer++ = cDigitsLut[d2];
- if (value >= kTen12)
- *buffer++ = cDigitsLut[d2 + 1];
- if (value >= kTen11)
- *buffer++ = cDigitsLut[d3];
- if (value >= kTen10)
- *buffer++ = cDigitsLut[d3 + 1];
- if (value >= kTen9)
- *buffer++ = cDigitsLut[d4];
- if (value >= kTen8)
- *buffer++ = cDigitsLut[d4 + 1];
-
- *buffer++ = cDigitsLut[d5];
- *buffer++ = cDigitsLut[d5 + 1];
- *buffer++ = cDigitsLut[d6];
- *buffer++ = cDigitsLut[d6 + 1];
- *buffer++ = cDigitsLut[d7];
- *buffer++ = cDigitsLut[d7 + 1];
- *buffer++ = cDigitsLut[d8];
- *buffer++ = cDigitsLut[d8 + 1];
- }
- else {
- const uint32_t a = static_cast<uint32_t>(value / kTen16); // 1 to 1844
- value %= kTen16;
-
- if (a < 10)
- *buffer++ = static_cast<char>('0' + static_cast<char>(a));
- else if (a < 100) {
- const uint32_t i = a << 1;
- *buffer++ = cDigitsLut[i];
- *buffer++ = cDigitsLut[i + 1];
- }
- else if (a < 1000) {
- *buffer++ = static_cast<char>('0' + static_cast<char>(a / 100));
-
- const uint32_t i = (a % 100) << 1;
- *buffer++ = cDigitsLut[i];
- *buffer++ = cDigitsLut[i + 1];
- }
- else {
- const uint32_t i = (a / 100) << 1;
- const uint32_t j = (a % 100) << 1;
- *buffer++ = cDigitsLut[i];
- *buffer++ = cDigitsLut[i + 1];
- *buffer++ = cDigitsLut[j];
- *buffer++ = cDigitsLut[j + 1];
- }
-
- const uint32_t v0 = static_cast<uint32_t>(value / kTen8);
- const uint32_t v1 = static_cast<uint32_t>(value % kTen8);
-
- const uint32_t b0 = v0 / 10000;
- const uint32_t c0 = v0 % 10000;
-
- const uint32_t d1 = (b0 / 100) << 1;
- const uint32_t d2 = (b0 % 100) << 1;
-
- const uint32_t d3 = (c0 / 100) << 1;
- const uint32_t d4 = (c0 % 100) << 1;
-
- const uint32_t b1 = v1 / 10000;
- const uint32_t c1 = v1 % 10000;
-
- const uint32_t d5 = (b1 / 100) << 1;
- const uint32_t d6 = (b1 % 100) << 1;
-
- const uint32_t d7 = (c1 / 100) << 1;
- const uint32_t d8 = (c1 % 100) << 1;
-
- *buffer++ = cDigitsLut[d1];
- *buffer++ = cDigitsLut[d1 + 1];
- *buffer++ = cDigitsLut[d2];
- *buffer++ = cDigitsLut[d2 + 1];
- *buffer++ = cDigitsLut[d3];
- *buffer++ = cDigitsLut[d3 + 1];
- *buffer++ = cDigitsLut[d4];
- *buffer++ = cDigitsLut[d4 + 1];
- *buffer++ = cDigitsLut[d5];
- *buffer++ = cDigitsLut[d5 + 1];
- *buffer++ = cDigitsLut[d6];
- *buffer++ = cDigitsLut[d6 + 1];
- *buffer++ = cDigitsLut[d7];
- *buffer++ = cDigitsLut[d7 + 1];
- *buffer++ = cDigitsLut[d8];
- *buffer++ = cDigitsLut[d8 + 1];
- }
-
- return buffer;
-}
-
-inline char* i64toa(int64_t value, char* buffer) {
- uint64_t u = static_cast<uint64_t>(value);
- if (value < 0) {
- *buffer++ = '-';
- u = ~u + 1;
- }
-
- return u64toa(u, buffer);
-}
-
-} // namespace internal
-RAPIDJSON_NAMESPACE_END
-
-#endif // RAPIDJSON_ITOA_
diff --git a/3rdparty/rapidjson/include/rapidjson/internal/meta.h b/3rdparty/rapidjson/include/rapidjson/internal/meta.h
deleted file mode 100644
index 5a9aaa42866..00000000000
--- a/3rdparty/rapidjson/include/rapidjson/internal/meta.h
+++ /dev/null
@@ -1,181 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 RAPIDJSON_INTERNAL_META_H_
-#define RAPIDJSON_INTERNAL_META_H_
-
-#include "../rapidjson.h"
-
-#ifdef __GNUC__
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(effc++)
-#endif
-#if defined(_MSC_VER)
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(6334)
-#endif
-
-#if RAPIDJSON_HAS_CXX11_TYPETRAITS
-#include <type_traits>
-#endif
-
-//@cond RAPIDJSON_INTERNAL
-RAPIDJSON_NAMESPACE_BEGIN
-namespace internal {
-
-// Helper to wrap/convert arbitrary types to void, useful for arbitrary type matching
-template <typename T> struct Void { typedef void Type; };
-
-///////////////////////////////////////////////////////////////////////////////
-// BoolType, TrueType, FalseType
-//
-template <bool Cond> struct BoolType {
- static const bool Value = Cond;
- typedef BoolType Type;
-};
-typedef BoolType<true> TrueType;
-typedef BoolType<false> FalseType;
-
-
-///////////////////////////////////////////////////////////////////////////////
-// SelectIf, BoolExpr, NotExpr, AndExpr, OrExpr
-//
-
-template <bool C> struct SelectIfImpl { template <typename T1, typename T2> struct Apply { typedef T1 Type; }; };
-template <> struct SelectIfImpl<false> { template <typename T1, typename T2> struct Apply { typedef T2 Type; }; };
-template <bool C, typename T1, typename T2> struct SelectIfCond : SelectIfImpl<C>::template Apply<T1,T2> {};
-template <typename C, typename T1, typename T2> struct SelectIf : SelectIfCond<C::Value, T1, T2> {};
-
-template <bool Cond1, bool Cond2> struct AndExprCond : FalseType {};
-template <> struct AndExprCond<true, true> : TrueType {};
-template <bool Cond1, bool Cond2> struct OrExprCond : TrueType {};
-template <> struct OrExprCond<false, false> : FalseType {};
-
-template <typename C> struct BoolExpr : SelectIf<C,TrueType,FalseType>::Type {};
-template <typename C> struct NotExpr : SelectIf<C,FalseType,TrueType>::Type {};
-template <typename C1, typename C2> struct AndExpr : AndExprCond<C1::Value, C2::Value>::Type {};
-template <typename C1, typename C2> struct OrExpr : OrExprCond<C1::Value, C2::Value>::Type {};
-
-
-///////////////////////////////////////////////////////////////////////////////
-// AddConst, MaybeAddConst, RemoveConst
-template <typename T> struct AddConst { typedef const T Type; };
-template <bool Constify, typename T> struct MaybeAddConst : SelectIfCond<Constify, const T, T> {};
-template <typename T> struct RemoveConst { typedef T Type; };
-template <typename T> struct RemoveConst<const T> { typedef T Type; };
-
-
-///////////////////////////////////////////////////////////////////////////////
-// IsSame, IsConst, IsMoreConst, IsPointer
-//
-template <typename T, typename U> struct IsSame : FalseType {};
-template <typename T> struct IsSame<T, T> : TrueType {};
-
-template <typename T> struct IsConst : FalseType {};
-template <typename T> struct IsConst<const T> : TrueType {};
-
-template <typename CT, typename T>
-struct IsMoreConst
- : AndExpr<IsSame<typename RemoveConst<CT>::Type, typename RemoveConst<T>::Type>,
- BoolType<IsConst<CT>::Value >= IsConst<T>::Value> >::Type {};
-
-template <typename T> struct IsPointer : FalseType {};
-template <typename T> struct IsPointer<T*> : TrueType {};
-
-///////////////////////////////////////////////////////////////////////////////
-// IsBaseOf
-//
-#if RAPIDJSON_HAS_CXX11_TYPETRAITS
-
-template <typename B, typename D> struct IsBaseOf
- : BoolType< ::std::is_base_of<B,D>::value> {};
-
-#else // simplified version adopted from Boost
-
-template<typename B, typename D> struct IsBaseOfImpl {
- RAPIDJSON_STATIC_ASSERT(sizeof(B) != 0);
- RAPIDJSON_STATIC_ASSERT(sizeof(D) != 0);
-
- typedef char (&Yes)[1];
- typedef char (&No) [2];
-
- template <typename T>
- static Yes Check(const D*, T);
- static No Check(const B*, int);
-
- struct Host {
- operator const B*() const;
- operator const D*();
- };
-
- enum { Value = (sizeof(Check(Host(), 0)) == sizeof(Yes)) };
-};
-
-template <typename B, typename D> struct IsBaseOf
- : OrExpr<IsSame<B, D>, BoolExpr<IsBaseOfImpl<B, D> > >::Type {};
-
-#endif // RAPIDJSON_HAS_CXX11_TYPETRAITS
-
-
-//////////////////////////////////////////////////////////////////////////
-// EnableIf / DisableIf
-//
-template <bool Condition, typename T = void> struct EnableIfCond { typedef T Type; };
-template <typename T> struct EnableIfCond<false, T> { /* empty */ };
-
-template <bool Condition, typename T = void> struct DisableIfCond { typedef T Type; };
-template <typename T> struct DisableIfCond<true, T> { /* empty */ };
-
-template <typename Condition, typename T = void>
-struct EnableIf : EnableIfCond<Condition::Value, T> {};
-
-template <typename Condition, typename T = void>
-struct DisableIf : DisableIfCond<Condition::Value, T> {};
-
-// SFINAE helpers
-struct SfinaeTag {};
-template <typename T> struct RemoveSfinaeTag;
-template <typename T> struct RemoveSfinaeTag<SfinaeTag&(*)(T)> { typedef T Type; };
-
-#define RAPIDJSON_REMOVEFPTR_(type) \
- typename ::RAPIDJSON_NAMESPACE::internal::RemoveSfinaeTag \
- < ::RAPIDJSON_NAMESPACE::internal::SfinaeTag&(*) type>::Type
-
-#define RAPIDJSON_ENABLEIF(cond) \
- typename ::RAPIDJSON_NAMESPACE::internal::EnableIf \
- <RAPIDJSON_REMOVEFPTR_(cond)>::Type * = NULL
-
-#define RAPIDJSON_DISABLEIF(cond) \
- typename ::RAPIDJSON_NAMESPACE::internal::DisableIf \
- <RAPIDJSON_REMOVEFPTR_(cond)>::Type * = NULL
-
-#define RAPIDJSON_ENABLEIF_RETURN(cond,returntype) \
- typename ::RAPIDJSON_NAMESPACE::internal::EnableIf \
- <RAPIDJSON_REMOVEFPTR_(cond), \
- RAPIDJSON_REMOVEFPTR_(returntype)>::Type
-
-#define RAPIDJSON_DISABLEIF_RETURN(cond,returntype) \
- typename ::RAPIDJSON_NAMESPACE::internal::DisableIf \
- <RAPIDJSON_REMOVEFPTR_(cond), \
- RAPIDJSON_REMOVEFPTR_(returntype)>::Type
-
-} // namespace internal
-RAPIDJSON_NAMESPACE_END
-//@endcond
-
-#if defined(__GNUC__) || defined(_MSC_VER)
-RAPIDJSON_DIAG_POP
-#endif
-
-#endif // RAPIDJSON_INTERNAL_META_H_
diff --git a/3rdparty/rapidjson/include/rapidjson/internal/pow10.h b/3rdparty/rapidjson/include/rapidjson/internal/pow10.h
deleted file mode 100644
index 02f475d705f..00000000000
--- a/3rdparty/rapidjson/include/rapidjson/internal/pow10.h
+++ /dev/null
@@ -1,55 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 RAPIDJSON_POW10_
-#define RAPIDJSON_POW10_
-
-#include "../rapidjson.h"
-
-RAPIDJSON_NAMESPACE_BEGIN
-namespace internal {
-
-//! Computes integer powers of 10 in double (10.0^n).
-/*! This function uses lookup table for fast and accurate results.
- \param n non-negative exponent. Must <= 308.
- \return 10.0^n
-*/
-inline double Pow10(int n) {
- static const double e[] = { // 1e-0...1e308: 309 * 8 bytes = 2472 bytes
- 1e+0,
- 1e+1, 1e+2, 1e+3, 1e+4, 1e+5, 1e+6, 1e+7, 1e+8, 1e+9, 1e+10, 1e+11, 1e+12, 1e+13, 1e+14, 1e+15, 1e+16, 1e+17, 1e+18, 1e+19, 1e+20,
- 1e+21, 1e+22, 1e+23, 1e+24, 1e+25, 1e+26, 1e+27, 1e+28, 1e+29, 1e+30, 1e+31, 1e+32, 1e+33, 1e+34, 1e+35, 1e+36, 1e+37, 1e+38, 1e+39, 1e+40,
- 1e+41, 1e+42, 1e+43, 1e+44, 1e+45, 1e+46, 1e+47, 1e+48, 1e+49, 1e+50, 1e+51, 1e+52, 1e+53, 1e+54, 1e+55, 1e+56, 1e+57, 1e+58, 1e+59, 1e+60,
- 1e+61, 1e+62, 1e+63, 1e+64, 1e+65, 1e+66, 1e+67, 1e+68, 1e+69, 1e+70, 1e+71, 1e+72, 1e+73, 1e+74, 1e+75, 1e+76, 1e+77, 1e+78, 1e+79, 1e+80,
- 1e+81, 1e+82, 1e+83, 1e+84, 1e+85, 1e+86, 1e+87, 1e+88, 1e+89, 1e+90, 1e+91, 1e+92, 1e+93, 1e+94, 1e+95, 1e+96, 1e+97, 1e+98, 1e+99, 1e+100,
- 1e+101,1e+102,1e+103,1e+104,1e+105,1e+106,1e+107,1e+108,1e+109,1e+110,1e+111,1e+112,1e+113,1e+114,1e+115,1e+116,1e+117,1e+118,1e+119,1e+120,
- 1e+121,1e+122,1e+123,1e+124,1e+125,1e+126,1e+127,1e+128,1e+129,1e+130,1e+131,1e+132,1e+133,1e+134,1e+135,1e+136,1e+137,1e+138,1e+139,1e+140,
- 1e+141,1e+142,1e+143,1e+144,1e+145,1e+146,1e+147,1e+148,1e+149,1e+150,1e+151,1e+152,1e+153,1e+154,1e+155,1e+156,1e+157,1e+158,1e+159,1e+160,
- 1e+161,1e+162,1e+163,1e+164,1e+165,1e+166,1e+167,1e+168,1e+169,1e+170,1e+171,1e+172,1e+173,1e+174,1e+175,1e+176,1e+177,1e+178,1e+179,1e+180,
- 1e+181,1e+182,1e+183,1e+184,1e+185,1e+186,1e+187,1e+188,1e+189,1e+190,1e+191,1e+192,1e+193,1e+194,1e+195,1e+196,1e+197,1e+198,1e+199,1e+200,
- 1e+201,1e+202,1e+203,1e+204,1e+205,1e+206,1e+207,1e+208,1e+209,1e+210,1e+211,1e+212,1e+213,1e+214,1e+215,1e+216,1e+217,1e+218,1e+219,1e+220,
- 1e+221,1e+222,1e+223,1e+224,1e+225,1e+226,1e+227,1e+228,1e+229,1e+230,1e+231,1e+232,1e+233,1e+234,1e+235,1e+236,1e+237,1e+238,1e+239,1e+240,
- 1e+241,1e+242,1e+243,1e+244,1e+245,1e+246,1e+247,1e+248,1e+249,1e+250,1e+251,1e+252,1e+253,1e+254,1e+255,1e+256,1e+257,1e+258,1e+259,1e+260,
- 1e+261,1e+262,1e+263,1e+264,1e+265,1e+266,1e+267,1e+268,1e+269,1e+270,1e+271,1e+272,1e+273,1e+274,1e+275,1e+276,1e+277,1e+278,1e+279,1e+280,
- 1e+281,1e+282,1e+283,1e+284,1e+285,1e+286,1e+287,1e+288,1e+289,1e+290,1e+291,1e+292,1e+293,1e+294,1e+295,1e+296,1e+297,1e+298,1e+299,1e+300,
- 1e+301,1e+302,1e+303,1e+304,1e+305,1e+306,1e+307,1e+308
- };
- RAPIDJSON_ASSERT(n >= 0 && n <= 308);
- return e[n];
-}
-
-} // namespace internal
-RAPIDJSON_NAMESPACE_END
-
-#endif // RAPIDJSON_POW10_
diff --git a/3rdparty/rapidjson/include/rapidjson/internal/regex.h b/3rdparty/rapidjson/include/rapidjson/internal/regex.h
deleted file mode 100644
index aeb0e3ef535..00000000000
--- a/3rdparty/rapidjson/include/rapidjson/internal/regex.h
+++ /dev/null
@@ -1,696 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 RAPIDJSON_INTERNAL_REGEX_H_
-#define RAPIDJSON_INTERNAL_REGEX_H_
-
-#include "../allocators.h"
-#include "../stream.h"
-#include "stack.h"
-
-#ifdef __clang__
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(padded)
-RAPIDJSON_DIAG_OFF(switch-enum)
-RAPIDJSON_DIAG_OFF(implicit-fallthrough)
-#endif
-
-#ifdef __GNUC__
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(effc++)
-#endif
-
-#ifndef RAPIDJSON_REGEX_VERBOSE
-#define RAPIDJSON_REGEX_VERBOSE 0
-#endif
-
-RAPIDJSON_NAMESPACE_BEGIN
-namespace internal {
-
-///////////////////////////////////////////////////////////////////////////////
-// GenericRegex
-
-static const SizeType kRegexInvalidState = ~SizeType(0); //!< Represents an invalid index in GenericRegex::State::out, out1
-static const SizeType kRegexInvalidRange = ~SizeType(0);
-
-//! Regular expression engine with subset of ECMAscript grammar.
-/*!
- Supported regular expression syntax:
- - \c ab Concatenation
- - \c a|b Alternation
- - \c a? Zero or one
- - \c a* Zero or more
- - \c a+ One or more
- - \c a{3} Exactly 3 times
- - \c a{3,} At least 3 times
- - \c a{3,5} 3 to 5 times
- - \c (ab) Grouping
- - \c ^a At the beginning
- - \c a$ At the end
- - \c . Any character
- - \c [abc] Character classes
- - \c [a-c] Character class range
- - \c [a-z0-9_] Character class combination
- - \c [^abc] Negated character classes
- - \c [^a-c] Negated character class range
- - \c [\b] Backspace (U+0008)
- - \c \\| \\\\ ... Escape characters
- - \c \\f Form feed (U+000C)
- - \c \\n Line feed (U+000A)
- - \c \\r Carriage return (U+000D)
- - \c \\t Tab (U+0009)
- - \c \\v Vertical tab (U+000B)
-
- \note This is a Thompson NFA engine, implemented with reference to
- Cox, Russ. "Regular Expression Matching Can Be Simple And Fast (but is slow in Java, Perl, PHP, Python, Ruby,...).",
- https://swtch.com/~rsc/regexp/regexp1.html
-*/
-template <typename Encoding, typename Allocator = CrtAllocator>
-class GenericRegex {
-public:
- typedef typename Encoding::Ch Ch;
-
- GenericRegex(const Ch* source, Allocator* allocator = 0) :
- states_(allocator, 256), ranges_(allocator, 256), root_(kRegexInvalidState), stateCount_(), rangeCount_(),
- stateSet_(), state0_(allocator, 0), state1_(allocator, 0), anchorBegin_(), anchorEnd_()
- {
- GenericStringStream<Encoding> ss(source);
- DecodedStream<GenericStringStream<Encoding> > ds(ss);
- Parse(ds);
- }
-
- ~GenericRegex() {
- Allocator::Free(stateSet_);
- }
-
- bool IsValid() const {
- return root_ != kRegexInvalidState;
- }
-
- template <typename InputStream>
- bool Match(InputStream& is) const {
- return SearchWithAnchoring(is, true, true);
- }
-
- bool Match(const Ch* s) const {
- GenericStringStream<Encoding> is(s);
- return Match(is);
- }
-
- template <typename InputStream>
- bool Search(InputStream& is) const {
- return SearchWithAnchoring(is, anchorBegin_, anchorEnd_);
- }
-
- bool Search(const Ch* s) const {
- GenericStringStream<Encoding> is(s);
- return Search(is);
- }
-
-private:
- enum Operator {
- kZeroOrOne,
- kZeroOrMore,
- kOneOrMore,
- kConcatenation,
- kAlternation,
- kLeftParenthesis
- };
-
- static const unsigned kAnyCharacterClass = 0xFFFFFFFF; //!< For '.'
- static const unsigned kRangeCharacterClass = 0xFFFFFFFE;
- static const unsigned kRangeNegationFlag = 0x80000000;
-
- struct Range {
- unsigned start; //
- unsigned end;
- SizeType next;
- };
-
- struct State {
- SizeType out; //!< Equals to kInvalid for matching state
- SizeType out1; //!< Equals to non-kInvalid for split
- SizeType rangeStart;
- unsigned codepoint;
- };
-
- struct Frag {
- Frag(SizeType s, SizeType o, SizeType m) : start(s), out(o), minIndex(m) {}
- SizeType start;
- SizeType out; //!< link-list of all output states
- SizeType minIndex;
- };
-
- template <typename SourceStream>
- class DecodedStream {
- public:
- DecodedStream(SourceStream& ss) : ss_(ss), codepoint_() { Decode(); }
- unsigned Peek() { return codepoint_; }
- unsigned Take() {
- unsigned c = codepoint_;
- if (c) // No further decoding when '\0'
- Decode();
- return c;
- }
-
- private:
- void Decode() {
- if (!Encoding::Decode(ss_, &codepoint_))
- codepoint_ = 0;
- }
-
- SourceStream& ss_;
- unsigned codepoint_;
- };
-
- State& GetState(SizeType index) {
- RAPIDJSON_ASSERT(index < stateCount_);
- return states_.template Bottom<State>()[index];
- }
-
- const State& GetState(SizeType index) const {
- RAPIDJSON_ASSERT(index < stateCount_);
- return states_.template Bottom<State>()[index];
- }
-
- Range& GetRange(SizeType index) {
- RAPIDJSON_ASSERT(index < rangeCount_);
- return ranges_.template Bottom<Range>()[index];
- }
-
- const Range& GetRange(SizeType index) const {
- RAPIDJSON_ASSERT(index < rangeCount_);
- return ranges_.template Bottom<Range>()[index];
- }
-
- template <typename InputStream>
- void Parse(DecodedStream<InputStream>& ds) {
- Allocator allocator;
- Stack<Allocator> operandStack(&allocator, 256); // Frag
- Stack<Allocator> operatorStack(&allocator, 256); // Operator
- Stack<Allocator> atomCountStack(&allocator, 256); // unsigned (Atom per parenthesis)
-
- *atomCountStack.template Push<unsigned>() = 0;
-
- unsigned codepoint;
- while (ds.Peek() != 0) {
- switch (codepoint = ds.Take()) {
- case '^':
- anchorBegin_ = true;
- break;
-
- case '$':
- anchorEnd_ = true;
- break;
-
- case '|':
- while (!operatorStack.Empty() && *operatorStack.template Top<Operator>() < kAlternation)
- if (!Eval(operandStack, *operatorStack.template Pop<Operator>(1)))
- return;
- *operatorStack.template Push<Operator>() = kAlternation;
- *atomCountStack.template Top<unsigned>() = 0;
- break;
-
- case '(':
- *operatorStack.template Push<Operator>() = kLeftParenthesis;
- *atomCountStack.template Push<unsigned>() = 0;
- break;
-
- case ')':
- while (!operatorStack.Empty() && *operatorStack.template Top<Operator>() != kLeftParenthesis)
- if (!Eval(operandStack, *operatorStack.template Pop<Operator>(1)))
- return;
- if (operatorStack.Empty())
- return;
- operatorStack.template Pop<Operator>(1);
- atomCountStack.template Pop<unsigned>(1);
- ImplicitConcatenation(atomCountStack, operatorStack);
- break;
-
- case '?':
- if (!Eval(operandStack, kZeroOrOne))
- return;
- break;
-
- case '*':
- if (!Eval(operandStack, kZeroOrMore))
- return;
- break;
-
- case '+':
- if (!Eval(operandStack, kOneOrMore))
- return;
- break;
-
- case '{':
- {
- unsigned n, m;
- if (!ParseUnsigned(ds, &n))
- return;
-
- if (ds.Peek() == ',') {
- ds.Take();
- if (ds.Peek() == '}')
- m = kInfinityQuantifier;
- else if (!ParseUnsigned(ds, &m) || m < n)
- return;
- }
- else
- m = n;
-
- if (!EvalQuantifier(operandStack, n, m) || ds.Peek() != '}')
- return;
- ds.Take();
- }
- break;
-
- case '.':
- PushOperand(operandStack, kAnyCharacterClass);
- ImplicitConcatenation(atomCountStack, operatorStack);
- break;
-
- case '[':
- {
- SizeType range;
- if (!ParseRange(ds, &range))
- return;
- SizeType s = NewState(kRegexInvalidState, kRegexInvalidState, kRangeCharacterClass);
- GetState(s).rangeStart = range;
- *operandStack.template Push<Frag>() = Frag(s, s, s);
- }
- ImplicitConcatenation(atomCountStack, operatorStack);
- break;
-
- case '\\': // Escape character
- if (!CharacterEscape(ds, &codepoint))
- return; // Unsupported escape character
- // fall through to default
-
- default: // Pattern character
- PushOperand(operandStack, codepoint);
- ImplicitConcatenation(atomCountStack, operatorStack);
- }
- }
-
- while (!operatorStack.Empty())
- if (!Eval(operandStack, *operatorStack.template Pop<Operator>(1)))
- return;
-
- // Link the operand to matching state.
- if (operandStack.GetSize() == sizeof(Frag)) {
- Frag* e = operandStack.template Pop<Frag>(1);
- Patch(e->out, NewState(kRegexInvalidState, kRegexInvalidState, 0));
- root_ = e->start;
-
-#if RAPIDJSON_REGEX_VERBOSE
- printf("root: %d\n", root_);
- for (SizeType i = 0; i < stateCount_ ; i++) {
- State& s = GetState(i);
- printf("[%2d] out: %2d out1: %2d c: '%c'\n", i, s.out, s.out1, (char)s.codepoint);
- }
- printf("\n");
-#endif
- }
-
- // Preallocate buffer for SearchWithAnchoring()
- RAPIDJSON_ASSERT(stateSet_ == 0);
- if (stateCount_ > 0) {
- stateSet_ = static_cast<unsigned*>(states_.GetAllocator().Malloc(GetStateSetSize()));
- state0_.template Reserve<SizeType>(stateCount_);
- state1_.template Reserve<SizeType>(stateCount_);
- }
- }
-
- SizeType NewState(SizeType out, SizeType out1, unsigned codepoint) {
- State* s = states_.template Push<State>();
- s->out = out;
- s->out1 = out1;
- s->codepoint = codepoint;
- s->rangeStart = kRegexInvalidRange;
- return stateCount_++;
- }
-
- void PushOperand(Stack<Allocator>& operandStack, unsigned codepoint) {
- SizeType s = NewState(kRegexInvalidState, kRegexInvalidState, codepoint);
- *operandStack.template Push<Frag>() = Frag(s, s, s);
- }
-
- void ImplicitConcatenation(Stack<Allocator>& atomCountStack, Stack<Allocator>& operatorStack) {
- if (*atomCountStack.template Top<unsigned>())
- *operatorStack.template Push<Operator>() = kConcatenation;
- (*atomCountStack.template Top<unsigned>())++;
- }
-
- SizeType Append(SizeType l1, SizeType l2) {
- SizeType old = l1;
- while (GetState(l1).out != kRegexInvalidState)
- l1 = GetState(l1).out;
- GetState(l1).out = l2;
- return old;
- }
-
- void Patch(SizeType l, SizeType s) {
- for (SizeType next; l != kRegexInvalidState; l = next) {
- next = GetState(l).out;
- GetState(l).out = s;
- }
- }
-
- bool Eval(Stack<Allocator>& operandStack, Operator op) {
- switch (op) {
- case kConcatenation:
- if (operandStack.GetSize() >= sizeof(Frag) * 2) {
- Frag e2 = *operandStack.template Pop<Frag>(1);
- Frag e1 = *operandStack.template Pop<Frag>(1);
- Patch(e1.out, e2.start);
- *operandStack.template Push<Frag>() = Frag(e1.start, e2.out, Min(e1.minIndex, e2.minIndex));
- return true;
- }
- return false;
-
- case kAlternation:
- if (operandStack.GetSize() >= sizeof(Frag) * 2) {
- Frag e2 = *operandStack.template Pop<Frag>(1);
- Frag e1 = *operandStack.template Pop<Frag>(1);
- SizeType s = NewState(e1.start, e2.start, 0);
- *operandStack.template Push<Frag>() = Frag(s, Append(e1.out, e2.out), Min(e1.minIndex, e2.minIndex));
- return true;
- }
- return false;
-
- case kZeroOrOne:
- if (operandStack.GetSize() >= sizeof(Frag)) {
- Frag e = *operandStack.template Pop<Frag>(1);
- SizeType s = NewState(kRegexInvalidState, e.start, 0);
- *operandStack.template Push<Frag>() = Frag(s, Append(e.out, s), e.minIndex);
- return true;
- }
- return false;
-
- case kZeroOrMore:
- if (operandStack.GetSize() >= sizeof(Frag)) {
- Frag e = *operandStack.template Pop<Frag>(1);
- SizeType s = NewState(kRegexInvalidState, e.start, 0);
- Patch(e.out, s);
- *operandStack.template Push<Frag>() = Frag(s, s, e.minIndex);
- return true;
- }
- return false;
-
- case kOneOrMore:
- if (operandStack.GetSize() >= sizeof(Frag)) {
- Frag e = *operandStack.template Pop<Frag>(1);
- SizeType s = NewState(kRegexInvalidState, e.start, 0);
- Patch(e.out, s);
- *operandStack.template Push<Frag>() = Frag(e.start, s, e.minIndex);
- return true;
- }
- return false;
-
- default:
- return false;
- }
- }
-
- bool EvalQuantifier(Stack<Allocator>& operandStack, unsigned n, unsigned m) {
- RAPIDJSON_ASSERT(n <= m);
- if (operandStack.GetSize() < sizeof(Frag))
- return false;
-
- if (n == 0) {
- if (m == 0) // a{0} not support
- return false;
- else if (m == kInfinityQuantifier)
- Eval(operandStack, kZeroOrMore); // a{0,} -> a*
- else {
- Eval(operandStack, kZeroOrOne); // a{0,5} -> a?
- for (unsigned i = 0; i < m - 1; i++)
- CloneTopOperand(operandStack); // a{0,5} -> a? a? a? a? a?
- for (unsigned i = 0; i < m - 1; i++)
- Eval(operandStack, kConcatenation); // a{0,5} -> a?a?a?a?a?
- }
- return true;
- }
-
- for (unsigned i = 0; i < n - 1; i++) // a{3} -> a a a
- CloneTopOperand(operandStack);
-
- if (m == kInfinityQuantifier)
- Eval(operandStack, kOneOrMore); // a{3,} -> a a a+
- else if (m > n) {
- CloneTopOperand(operandStack); // a{3,5} -> a a a a
- Eval(operandStack, kZeroOrOne); // a{3,5} -> a a a a?
- for (unsigned i = n; i < m - 1; i++)
- CloneTopOperand(operandStack); // a{3,5} -> a a a a? a?
- for (unsigned i = n; i < m; i++)
- Eval(operandStack, kConcatenation); // a{3,5} -> a a aa?a?
- }
-
- for (unsigned i = 0; i < n - 1; i++)
- Eval(operandStack, kConcatenation); // a{3} -> aaa, a{3,} -> aaa+, a{3.5} -> aaaa?a?
-
- return true;
- }
-
- static SizeType Min(SizeType a, SizeType b) { return a < b ? a : b; }
-
- void CloneTopOperand(Stack<Allocator>& operandStack) {
- const Frag *src = operandStack.template Top<Frag>();
- SizeType count = stateCount_ - src->minIndex; // Assumes top operand contains states in [src->minIndex, stateCount_)
- State* s = states_.template Push<State>(count);
- memcpy(s, &GetState(src->minIndex), count * sizeof(State));
- for (SizeType j = 0; j < count; j++) {
- if (s[j].out != kRegexInvalidState)
- s[j].out += count;
- if (s[j].out1 != kRegexInvalidState)
- s[j].out1 += count;
- }
- *operandStack.template Push<Frag>() = Frag(src->start + count, src->out + count, src->minIndex + count);
- stateCount_ += count;
- }
-
- template <typename InputStream>
- bool ParseUnsigned(DecodedStream<InputStream>& ds, unsigned* u) {
- unsigned r = 0;
- if (ds.Peek() < '0' || ds.Peek() > '9')
- return false;
- while (ds.Peek() >= '0' && ds.Peek() <= '9') {
- if (r >= 429496729 && ds.Peek() > '5') // 2^32 - 1 = 4294967295
- return false; // overflow
- r = r * 10 + (ds.Take() - '0');
- }
- *u = r;
- return true;
- }
-
- template <typename InputStream>
- bool ParseRange(DecodedStream<InputStream>& ds, SizeType* range) {
- bool isBegin = true;
- bool negate = false;
- int step = 0;
- SizeType start = kRegexInvalidRange;
- SizeType current = kRegexInvalidRange;
- unsigned codepoint;
- while ((codepoint = ds.Take()) != 0) {
- if (isBegin) {
- isBegin = false;
- if (codepoint == '^') {
- negate = true;
- continue;
- }
- }
-
- switch (codepoint) {
- case ']':
- if (start == kRegexInvalidRange)
- return false; // Error: nothing inside []
- if (step == 2) { // Add trailing '-'
- SizeType r = NewRange('-');
- RAPIDJSON_ASSERT(current != kRegexInvalidRange);
- GetRange(current).next = r;
- }
- if (negate)
- GetRange(start).start |= kRangeNegationFlag;
- *range = start;
- return true;
-
- case '\\':
- if (ds.Peek() == 'b') {
- ds.Take();
- codepoint = 0x0008; // Escape backspace character
- }
- else if (!CharacterEscape(ds, &codepoint))
- return false;
- // fall through to default
-
- default:
- switch (step) {
- case 1:
- if (codepoint == '-') {
- step++;
- break;
- }
- // fall through to step 0 for other characters
-
- case 0:
- {
- SizeType r = NewRange(codepoint);
- if (current != kRegexInvalidRange)
- GetRange(current).next = r;
- if (start == kRegexInvalidRange)
- start = r;
- current = r;
- }
- step = 1;
- break;
-
- default:
- RAPIDJSON_ASSERT(step == 2);
- GetRange(current).end = codepoint;
- step = 0;
- }
- }
- }
- return false;
- }
-
- SizeType NewRange(unsigned codepoint) {
- Range* r = ranges_.template Push<Range>();
- r->start = r->end = codepoint;
- r->next = kRegexInvalidRange;
- return rangeCount_++;
- }
-
- template <typename InputStream>
- bool CharacterEscape(DecodedStream<InputStream>& ds, unsigned* escapedCodepoint) {
- unsigned codepoint;
- switch (codepoint = ds.Take()) {
- case '^':
- case '$':
- case '|':
- case '(':
- case ')':
- case '?':
- case '*':
- case '+':
- case '.':
- case '[':
- case ']':
- case '{':
- case '}':
- case '\\':
- *escapedCodepoint = codepoint; return true;
- case 'f': *escapedCodepoint = 0x000C; return true;
- case 'n': *escapedCodepoint = 0x000A; return true;
- case 'r': *escapedCodepoint = 0x000D; return true;
- case 't': *escapedCodepoint = 0x0009; return true;
- case 'v': *escapedCodepoint = 0x000B; return true;
- default:
- return false; // Unsupported escape character
- }
- }
-
- template <typename InputStream>
- bool SearchWithAnchoring(InputStream& is, bool anchorBegin, bool anchorEnd) const {
- RAPIDJSON_ASSERT(IsValid());
- DecodedStream<InputStream> ds(is);
-
- state0_.Clear();
- Stack<Allocator> *current = &state0_, *next = &state1_;
- const size_t stateSetSize = GetStateSetSize();
- std::memset(stateSet_, 0, stateSetSize);
-
- bool matched = AddState(*current, root_);
- unsigned codepoint;
- while (!current->Empty() && (codepoint = ds.Take()) != 0) {
- std::memset(stateSet_, 0, stateSetSize);
- next->Clear();
- matched = false;
- for (const SizeType* s = current->template Bottom<SizeType>(); s != current->template End<SizeType>(); ++s) {
- const State& sr = GetState(*s);
- if (sr.codepoint == codepoint ||
- sr.codepoint == kAnyCharacterClass ||
- (sr.codepoint == kRangeCharacterClass && MatchRange(sr.rangeStart, codepoint)))
- {
- matched = AddState(*next, sr.out) || matched;
- if (!anchorEnd && matched)
- return true;
- }
- if (!anchorBegin)
- AddState(*next, root_);
- }
- internal::Swap(current, next);
- }
-
- return matched;
- }
-
- size_t GetStateSetSize() const {
- return (stateCount_ + 31) / 32 * 4;
- }
-
- // Return whether the added states is a match state
- bool AddState(Stack<Allocator>& l, SizeType index) const {
- if (index == kRegexInvalidState)
- return true;
-
- const State& s = GetState(index);
- if (s.out1 != kRegexInvalidState) { // Split
- bool matched = AddState(l, s.out);
- return AddState(l, s.out1) || matched;
- }
- else if (!(stateSet_[index >> 5] & (1 << (index & 31)))) {
- stateSet_[index >> 5] |= (1 << (index & 31));
- *l.template PushUnsafe<SizeType>() = index;
- }
- return s.out == kRegexInvalidState; // by using PushUnsafe() above, we can ensure s is not validated due to reallocation.
- }
-
- bool MatchRange(SizeType rangeIndex, unsigned codepoint) const {
- bool yes = (GetRange(rangeIndex).start & kRangeNegationFlag) == 0;
- while (rangeIndex != kRegexInvalidRange) {
- const Range& r = GetRange(rangeIndex);
- if (codepoint >= (r.start & ~kRangeNegationFlag) && codepoint <= r.end)
- return yes;
- rangeIndex = r.next;
- }
- return !yes;
- }
-
- Stack<Allocator> states_;
- Stack<Allocator> ranges_;
- SizeType root_;
- SizeType stateCount_;
- SizeType rangeCount_;
-
- static const unsigned kInfinityQuantifier = ~0u;
-
- // For SearchWithAnchoring()
- uint32_t* stateSet_; // allocated by states_.GetAllocator()
- mutable Stack<Allocator> state0_;
- mutable Stack<Allocator> state1_;
- bool anchorBegin_;
- bool anchorEnd_;
-};
-
-typedef GenericRegex<UTF8<> > Regex;
-
-} // namespace internal
-RAPIDJSON_NAMESPACE_END
-
-#ifdef __clang__
-RAPIDJSON_DIAG_POP
-#endif
-
-#endif // RAPIDJSON_INTERNAL_REGEX_H_
diff --git a/3rdparty/rapidjson/include/rapidjson/internal/stack.h b/3rdparty/rapidjson/include/rapidjson/internal/stack.h
deleted file mode 100644
index 022c9aab411..00000000000
--- a/3rdparty/rapidjson/include/rapidjson/internal/stack.h
+++ /dev/null
@@ -1,230 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 RAPIDJSON_INTERNAL_STACK_H_
-#define RAPIDJSON_INTERNAL_STACK_H_
-
-#include "../allocators.h"
-#include "swap.h"
-
-#if defined(__clang__)
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(c++98-compat)
-#endif
-
-RAPIDJSON_NAMESPACE_BEGIN
-namespace internal {
-
-///////////////////////////////////////////////////////////////////////////////
-// Stack
-
-//! A type-unsafe stack for storing different types of data.
-/*! \tparam Allocator Allocator for allocating stack memory.
-*/
-template <typename Allocator>
-class Stack {
-public:
- // Optimization note: Do not allocate memory for stack_ in constructor.
- // Do it lazily when first Push() -> Expand() -> Resize().
- Stack(Allocator* allocator, size_t stackCapacity) : allocator_(allocator), ownAllocator_(0), stack_(0), stackTop_(0), stackEnd_(0), initialCapacity_(stackCapacity) {
- }
-
-#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
- Stack(Stack&& rhs)
- : allocator_(rhs.allocator_),
- ownAllocator_(rhs.ownAllocator_),
- stack_(rhs.stack_),
- stackTop_(rhs.stackTop_),
- stackEnd_(rhs.stackEnd_),
- initialCapacity_(rhs.initialCapacity_)
- {
- rhs.allocator_ = 0;
- rhs.ownAllocator_ = 0;
- rhs.stack_ = 0;
- rhs.stackTop_ = 0;
- rhs.stackEnd_ = 0;
- rhs.initialCapacity_ = 0;
- }
-#endif
-
- ~Stack() {
- Destroy();
- }
-
-#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
- Stack& operator=(Stack&& rhs) {
- if (&rhs != this)
- {
- Destroy();
-
- allocator_ = rhs.allocator_;
- ownAllocator_ = rhs.ownAllocator_;
- stack_ = rhs.stack_;
- stackTop_ = rhs.stackTop_;
- stackEnd_ = rhs.stackEnd_;
- initialCapacity_ = rhs.initialCapacity_;
-
- rhs.allocator_ = 0;
- rhs.ownAllocator_ = 0;
- rhs.stack_ = 0;
- rhs.stackTop_ = 0;
- rhs.stackEnd_ = 0;
- rhs.initialCapacity_ = 0;
- }
- return *this;
- }
-#endif
-
- void Swap(Stack& rhs) RAPIDJSON_NOEXCEPT {
- internal::Swap(allocator_, rhs.allocator_);
- internal::Swap(ownAllocator_, rhs.ownAllocator_);
- internal::Swap(stack_, rhs.stack_);
- internal::Swap(stackTop_, rhs.stackTop_);
- internal::Swap(stackEnd_, rhs.stackEnd_);
- internal::Swap(initialCapacity_, rhs.initialCapacity_);
- }
-
- void Clear() { stackTop_ = stack_; }
-
- void ShrinkToFit() {
- if (Empty()) {
- // If the stack is empty, completely deallocate the memory.
- Allocator::Free(stack_);
- stack_ = 0;
- stackTop_ = 0;
- stackEnd_ = 0;
- }
- else
- Resize(GetSize());
- }
-
- // Optimization note: try to minimize the size of this function for force inline.
- // Expansion is run very infrequently, so it is moved to another (probably non-inline) function.
- template<typename T>
- RAPIDJSON_FORCEINLINE void Reserve(size_t count = 1) {
- // Expand the stack if needed
- if (RAPIDJSON_UNLIKELY(stackTop_ + sizeof(T) * count > stackEnd_))
- Expand<T>(count);
- }
-
- template<typename T>
- RAPIDJSON_FORCEINLINE T* Push(size_t count = 1) {
- Reserve<T>(count);
- return PushUnsafe<T>(count);
- }
-
- template<typename T>
- RAPIDJSON_FORCEINLINE T* PushUnsafe(size_t count = 1) {
- RAPIDJSON_ASSERT(stackTop_ + sizeof(T) * count <= stackEnd_);
- T* ret = reinterpret_cast<T*>(stackTop_);
- stackTop_ += sizeof(T) * count;
- return ret;
- }
-
- template<typename T>
- T* Pop(size_t count) {
- RAPIDJSON_ASSERT(GetSize() >= count * sizeof(T));
- stackTop_ -= count * sizeof(T);
- return reinterpret_cast<T*>(stackTop_);
- }
-
- template<typename T>
- T* Top() {
- RAPIDJSON_ASSERT(GetSize() >= sizeof(T));
- return reinterpret_cast<T*>(stackTop_ - sizeof(T));
- }
-
- template<typename T>
- const T* Top() const {
- RAPIDJSON_ASSERT(GetSize() >= sizeof(T));
- return reinterpret_cast<T*>(stackTop_ - sizeof(T));
- }
-
- template<typename T>
- T* End() { return reinterpret_cast<T*>(stackTop_); }
-
- template<typename T>
- const T* End() const { return reinterpret_cast<T*>(stackTop_); }
-
- template<typename T>
- T* Bottom() { return reinterpret_cast<T*>(stack_); }
-
- template<typename T>
- const T* Bottom() const { return reinterpret_cast<T*>(stack_); }
-
- bool HasAllocator() const {
- return allocator_ != 0;
- }
-
- Allocator& GetAllocator() {
- RAPIDJSON_ASSERT(allocator_);
- return *allocator_;
- }
-
- bool Empty() const { return stackTop_ == stack_; }
- size_t GetSize() const { return static_cast<size_t>(stackTop_ - stack_); }
- size_t GetCapacity() const { return static_cast<size_t>(stackEnd_ - stack_); }
-
-private:
- template<typename T>
- void Expand(size_t count) {
- // Only expand the capacity if the current stack exists. Otherwise just create a stack with initial capacity.
- size_t newCapacity;
- if (stack_ == 0) {
- if (!allocator_)
- ownAllocator_ = allocator_ = RAPIDJSON_NEW(Allocator());
- newCapacity = initialCapacity_;
- } else {
- newCapacity = GetCapacity();
- newCapacity += (newCapacity + 1) / 2;
- }
- size_t newSize = GetSize() + sizeof(T) * count;
- if (newCapacity < newSize)
- newCapacity = newSize;
-
- Resize(newCapacity);
- }
-
- void Resize(size_t newCapacity) {
- const size_t size = GetSize(); // Backup the current size
- stack_ = static_cast<char*>(allocator_->Realloc(stack_, GetCapacity(), newCapacity));
- stackTop_ = stack_ + size;
- stackEnd_ = stack_ + newCapacity;
- }
-
- void Destroy() {
- Allocator::Free(stack_);
- RAPIDJSON_DELETE(ownAllocator_); // Only delete if it is owned by the stack
- }
-
- // Prohibit copy constructor & assignment operator.
- Stack(const Stack&);
- Stack& operator=(const Stack&);
-
- Allocator* allocator_;
- Allocator* ownAllocator_;
- char *stack_;
- char *stackTop_;
- char *stackEnd_;
- size_t initialCapacity_;
-};
-
-} // namespace internal
-RAPIDJSON_NAMESPACE_END
-
-#if defined(__clang__)
-RAPIDJSON_DIAG_POP
-#endif
-
-#endif // RAPIDJSON_STACK_H_
diff --git a/3rdparty/rapidjson/include/rapidjson/internal/strfunc.h b/3rdparty/rapidjson/include/rapidjson/internal/strfunc.h
deleted file mode 100644
index 2edfae52678..00000000000
--- a/3rdparty/rapidjson/include/rapidjson/internal/strfunc.h
+++ /dev/null
@@ -1,55 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 RAPIDJSON_INTERNAL_STRFUNC_H_
-#define RAPIDJSON_INTERNAL_STRFUNC_H_
-
-#include "../stream.h"
-
-RAPIDJSON_NAMESPACE_BEGIN
-namespace internal {
-
-//! Custom strlen() which works on different character types.
-/*! \tparam Ch Character type (e.g. char, wchar_t, short)
- \param s Null-terminated input string.
- \return Number of characters in the string.
- \note This has the same semantics as strlen(), the return value is not number of Unicode codepoints.
-*/
-template <typename Ch>
-inline SizeType StrLen(const Ch* s) {
- const Ch* p = s;
- while (*p) ++p;
- return SizeType(p - s);
-}
-
-//! Returns number of code points in a encoded string.
-template<typename Encoding>
-bool CountStringCodePoint(const typename Encoding::Ch* s, SizeType length, SizeType* outCount) {
- GenericStringStream<Encoding> is(s);
- const typename Encoding::Ch* end = s + length;
- SizeType count = 0;
- while (is.src_ < end) {
- unsigned codepoint;
- if (!Encoding::Decode(is, &codepoint))
- return false;
- count++;
- }
- *outCount = count;
- return true;
-}
-
-} // namespace internal
-RAPIDJSON_NAMESPACE_END
-
-#endif // RAPIDJSON_INTERNAL_STRFUNC_H_
diff --git a/3rdparty/rapidjson/include/rapidjson/internal/strtod.h b/3rdparty/rapidjson/include/rapidjson/internal/strtod.h
deleted file mode 100644
index fd4b01e8dde..00000000000
--- a/3rdparty/rapidjson/include/rapidjson/internal/strtod.h
+++ /dev/null
@@ -1,269 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 RAPIDJSON_STRTOD_
-#define RAPIDJSON_STRTOD_
-
-#include "ieee754.h"
-#include "biginteger.h"
-#include "diyfp.h"
-#include "pow10.h"
-
-RAPIDJSON_NAMESPACE_BEGIN
-namespace internal {
-
-inline double FastPath(double significand, int exp) {
- if (exp < -308)
- return 0.0;
- else if (exp >= 0)
- return significand * internal::Pow10(exp);
- else
- return significand / internal::Pow10(-exp);
-}
-
-inline double StrtodNormalPrecision(double d, int p) {
- if (p < -308) {
- // Prevent expSum < -308, making Pow10(p) = 0
- d = FastPath(d, -308);
- d = FastPath(d, p + 308);
- }
- else
- d = FastPath(d, p);
- return d;
-}
-
-template <typename T>
-inline T Min3(T a, T b, T c) {
- T m = a;
- if (m > b) m = b;
- if (m > c) m = c;
- return m;
-}
-
-inline int CheckWithinHalfULP(double b, const BigInteger& d, int dExp) {
- const Double db(b);
- const uint64_t bInt = db.IntegerSignificand();
- const int bExp = db.IntegerExponent();
- const int hExp = bExp - 1;
-
- int dS_Exp2 = 0, dS_Exp5 = 0, bS_Exp2 = 0, bS_Exp5 = 0, hS_Exp2 = 0, hS_Exp5 = 0;
-
- // Adjust for decimal exponent
- if (dExp >= 0) {
- dS_Exp2 += dExp;
- dS_Exp5 += dExp;
- }
- else {
- bS_Exp2 -= dExp;
- bS_Exp5 -= dExp;
- hS_Exp2 -= dExp;
- hS_Exp5 -= dExp;
- }
-
- // Adjust for binary exponent
- if (bExp >= 0)
- bS_Exp2 += bExp;
- else {
- dS_Exp2 -= bExp;
- hS_Exp2 -= bExp;
- }
-
- // Adjust for half ulp exponent
- if (hExp >= 0)
- hS_Exp2 += hExp;
- else {
- dS_Exp2 -= hExp;
- bS_Exp2 -= hExp;
- }
-
- // Remove common power of two factor from all three scaled values
- int common_Exp2 = Min3(dS_Exp2, bS_Exp2, hS_Exp2);
- dS_Exp2 -= common_Exp2;
- bS_Exp2 -= common_Exp2;
- hS_Exp2 -= common_Exp2;
-
- BigInteger dS = d;
- dS.MultiplyPow5(static_cast<unsigned>(dS_Exp5)) <<= static_cast<unsigned>(dS_Exp2);
-
- BigInteger bS(bInt);
- bS.MultiplyPow5(static_cast<unsigned>(bS_Exp5)) <<= static_cast<unsigned>(bS_Exp2);
-
- BigInteger hS(1);
- hS.MultiplyPow5(static_cast<unsigned>(hS_Exp5)) <<= static_cast<unsigned>(hS_Exp2);
-
- BigInteger delta(0);
- dS.Difference(bS, &delta);
-
- return delta.Compare(hS);
-}
-
-inline bool StrtodFast(double d, int p, double* result) {
- // Use fast path for string-to-double conversion if possible
- // see http://www.exploringbinary.com/fast-path-decimal-to-floating-point-conversion/
- if (p > 22 && p < 22 + 16) {
- // Fast Path Cases In Disguise
- d *= internal::Pow10(p - 22);
- p = 22;
- }
-
- if (p >= -22 && p <= 22 && d <= 9007199254740991.0) { // 2^53 - 1
- *result = FastPath(d, p);
- return true;
- }
- else
- return false;
-}
-
-// Compute an approximation and see if it is within 1/2 ULP
-inline bool StrtodDiyFp(const char* decimals, size_t length, size_t decimalPosition, int exp, double* result) {
- uint64_t significand = 0;
- size_t i = 0; // 2^64 - 1 = 18446744073709551615, 1844674407370955161 = 0x1999999999999999
- for (; i < length; i++) {
- if (significand > RAPIDJSON_UINT64_C2(0x19999999, 0x99999999) ||
- (significand == RAPIDJSON_UINT64_C2(0x19999999, 0x99999999) && decimals[i] > '5'))
- break;
- significand = significand * 10u + static_cast<unsigned>(decimals[i] - '0');
- }
-
- if (i < length && decimals[i] >= '5') // Rounding
- significand++;
-
- size_t remaining = length - i;
- const unsigned kUlpShift = 3;
- const unsigned kUlp = 1 << kUlpShift;
- int error = (remaining == 0) ? 0 : kUlp / 2;
-
- DiyFp v(significand, 0);
- v = v.Normalize();
- error <<= -v.e;
-
- const int dExp = static_cast<int>(decimalPosition) - static_cast<int>(i) + exp;
-
- int actualExp;
- DiyFp cachedPower = GetCachedPower10(dExp, &actualExp);
- if (actualExp != dExp) {
- static const DiyFp kPow10[] = {
- DiyFp(RAPIDJSON_UINT64_C2(0xa0000000, 00000000), -60), // 10^1
- DiyFp(RAPIDJSON_UINT64_C2(0xc8000000, 00000000), -57), // 10^2
- DiyFp(RAPIDJSON_UINT64_C2(0xfa000000, 00000000), -54), // 10^3
- DiyFp(RAPIDJSON_UINT64_C2(0x9c400000, 00000000), -50), // 10^4
- DiyFp(RAPIDJSON_UINT64_C2(0xc3500000, 00000000), -47), // 10^5
- DiyFp(RAPIDJSON_UINT64_C2(0xf4240000, 00000000), -44), // 10^6
- DiyFp(RAPIDJSON_UINT64_C2(0x98968000, 00000000), -40) // 10^7
- };
- int adjustment = dExp - actualExp - 1;
- RAPIDJSON_ASSERT(adjustment >= 0 && adjustment < 7);
- v = v * kPow10[adjustment];
- if (length + static_cast<unsigned>(adjustment)> 19u) // has more digits than decimal digits in 64-bit
- error += kUlp / 2;
- }
-
- v = v * cachedPower;
-
- error += kUlp + (error == 0 ? 0 : 1);
-
- const int oldExp = v.e;
- v = v.Normalize();
- error <<= oldExp - v.e;
-
- const unsigned effectiveSignificandSize = Double::EffectiveSignificandSize(64 + v.e);
- unsigned precisionSize = 64 - effectiveSignificandSize;
- if (precisionSize + kUlpShift >= 64) {
- unsigned scaleExp = (precisionSize + kUlpShift) - 63;
- v.f >>= scaleExp;
- v.e += scaleExp;
- error = (error >> scaleExp) + 1 + static_cast<int>(kUlp);
- precisionSize -= scaleExp;
- }
-
- DiyFp rounded(v.f >> precisionSize, v.e + static_cast<int>(precisionSize));
- const uint64_t precisionBits = (v.f & ((uint64_t(1) << precisionSize) - 1)) * kUlp;
- const uint64_t halfWay = (uint64_t(1) << (precisionSize - 1)) * kUlp;
- if (precisionBits >= halfWay + static_cast<unsigned>(error)) {
- rounded.f++;
- if (rounded.f & (DiyFp::kDpHiddenBit << 1)) { // rounding overflows mantissa (issue #340)
- rounded.f >>= 1;
- rounded.e++;
- }
- }
-
- *result = rounded.ToDouble();
-
- return halfWay - static_cast<unsigned>(error) >= precisionBits || precisionBits >= halfWay + static_cast<unsigned>(error);
-}
-
-inline double StrtodBigInteger(double approx, const char* decimals, size_t length, size_t decimalPosition, int exp) {
- const BigInteger dInt(decimals, length);
- const int dExp = static_cast<int>(decimalPosition) - static_cast<int>(length) + exp;
- Double a(approx);
- int cmp = CheckWithinHalfULP(a.Value(), dInt, dExp);
- if (cmp < 0)
- return a.Value(); // within half ULP
- else if (cmp == 0) {
- // Round towards even
- if (a.Significand() & 1)
- return a.NextPositiveDouble();
- else
- return a.Value();
- }
- else // adjustment
- return a.NextPositiveDouble();
-}
-
-inline double StrtodFullPrecision(double d, int p, const char* decimals, size_t length, size_t decimalPosition, int exp) {
- RAPIDJSON_ASSERT(d >= 0.0);
- RAPIDJSON_ASSERT(length >= 1);
-
- double result;
- if (StrtodFast(d, p, &result))
- return result;
-
- // Trim leading zeros
- while (*decimals == '0' && length > 1) {
- length--;
- decimals++;
- decimalPosition--;
- }
-
- // Trim trailing zeros
- while (decimals[length - 1] == '0' && length > 1) {
- length--;
- decimalPosition--;
- exp++;
- }
-
- // Trim right-most digits
- const int kMaxDecimalDigit = 780;
- if (static_cast<int>(length) > kMaxDecimalDigit) {
- int delta = (static_cast<int>(length) - kMaxDecimalDigit);
- exp += delta;
- decimalPosition -= static_cast<unsigned>(delta);
- length = kMaxDecimalDigit;
- }
-
- // If too small, underflow to zero
- if (int(length) + exp < -324)
- return 0.0;
-
- if (StrtodDiyFp(decimals, length, decimalPosition, exp, &result))
- return result;
-
- // Use approximation from StrtodDiyFp and make adjustment with BigInteger comparison
- return StrtodBigInteger(result, decimals, length, decimalPosition, exp);
-}
-
-} // namespace internal
-RAPIDJSON_NAMESPACE_END
-
-#endif // RAPIDJSON_STRTOD_
diff --git a/3rdparty/rapidjson/include/rapidjson/internal/swap.h b/3rdparty/rapidjson/include/rapidjson/internal/swap.h
deleted file mode 100644
index 666e49f97b6..00000000000
--- a/3rdparty/rapidjson/include/rapidjson/internal/swap.h
+++ /dev/null
@@ -1,46 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 RAPIDJSON_INTERNAL_SWAP_H_
-#define RAPIDJSON_INTERNAL_SWAP_H_
-
-#include "../rapidjson.h"
-
-#if defined(__clang__)
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(c++98-compat)
-#endif
-
-RAPIDJSON_NAMESPACE_BEGIN
-namespace internal {
-
-//! Custom swap() to avoid dependency on C++ <algorithm> header
-/*! \tparam T Type of the arguments to swap, should be instantiated with primitive C++ types only.
- \note This has the same semantics as std::swap().
-*/
-template <typename T>
-inline void Swap(T& a, T& b) RAPIDJSON_NOEXCEPT {
- T tmp = a;
- a = b;
- b = tmp;
-}
-
-} // namespace internal
-RAPIDJSON_NAMESPACE_END
-
-#if defined(__clang__)
-RAPIDJSON_DIAG_POP
-#endif
-
-#endif // RAPIDJSON_INTERNAL_SWAP_H_
diff --git a/3rdparty/rapidjson/include/rapidjson/istreamwrapper.h b/3rdparty/rapidjson/include/rapidjson/istreamwrapper.h
deleted file mode 100644
index 9efeea24f46..00000000000
--- a/3rdparty/rapidjson/include/rapidjson/istreamwrapper.h
+++ /dev/null
@@ -1,105 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 "stream.h"
-#include <iosfwd>
-
-#ifdef __clang__
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(padded)
-#endif
-
-RAPIDJSON_NAMESPACE_BEGIN
-
-//! Wrapper of \c std::basic_istream into RapidJSON's Stream concept.
-/*!
- The classes can be wrapped including but not limited to:
-
- - \c std::istringstream
- - \c std::stringstream
- - \c std::wistringstream
- - \c std::wstringstream
- - \c std::ifstream
- - \c std::fstream
- - \c std::wifstream
- - \c std::wfstream
-
- \tparam StreamType Class derived from \c std::basic_istream.
-*/
-
-template <typename StreamType>
-class BasicIStreamWrapper {
-public:
- typedef typename StreamType::char_type Ch;
- BasicIStreamWrapper(StreamType& stream) : stream_(stream), count_(), peekBuffer_() {}
-
- Ch Peek() const {
- typename StreamType::int_type c = stream_.peek();
- return RAPIDJSON_LIKELY(c != StreamType::traits_type::eof()) ? static_cast<Ch>(c) : '\0';
- }
-
- Ch Take() {
- typename StreamType::int_type c = stream_.get();
- if (RAPIDJSON_LIKELY(c != StreamType::traits_type::eof())) {
- count_++;
- return static_cast<Ch>(c);
- }
- else
- return '\0';
- }
-
- // tellg() may return -1 when failed. So we count by ourself.
- size_t Tell() const { return count_; }
-
- Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; }
- void Put(Ch) { RAPIDJSON_ASSERT(false); }
- void Flush() { RAPIDJSON_ASSERT(false); }
- size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; }
-
- // For encoding detection only.
- const Ch* Peek4() const {
- RAPIDJSON_ASSERT(sizeof(Ch) == 1); // Only usable for byte stream.
- int i;
- bool hasError = false;
- for (i = 0; i < 4; ++i) {
- typename StreamType::int_type c = stream_.get();
- if (c == StreamType::traits_type::eof()) {
- hasError = true;
- stream_.clear();
- break;
- }
- peekBuffer_[i] = static_cast<Ch>(c);
- }
- for (--i; i >= 0; --i)
- stream_.putback(peekBuffer_[i]);
- return !hasError ? peekBuffer_ : 0;
- }
-
-private:
- BasicIStreamWrapper(const BasicIStreamWrapper&);
- BasicIStreamWrapper& operator=(const BasicIStreamWrapper&);
-
- StreamType& stream_;
- size_t count_; //!< Number of characters read. Note:
- mutable Ch peekBuffer_[4];
-};
-
-typedef BasicIStreamWrapper<std::istream> IStreamWrapper;
-typedef BasicIStreamWrapper<std::wistream> WIStreamWrapper;
-
-#ifdef __clang__
-RAPIDJSON_DIAG_POP
-#endif
-
-RAPIDJSON_NAMESPACE_END
diff --git a/3rdparty/rapidjson/include/rapidjson/memorybuffer.h b/3rdparty/rapidjson/include/rapidjson/memorybuffer.h
deleted file mode 100644
index 39bee1dec1c..00000000000
--- a/3rdparty/rapidjson/include/rapidjson/memorybuffer.h
+++ /dev/null
@@ -1,70 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 RAPIDJSON_MEMORYBUFFER_H_
-#define RAPIDJSON_MEMORYBUFFER_H_
-
-#include "stream.h"
-#include "internal/stack.h"
-
-RAPIDJSON_NAMESPACE_BEGIN
-
-//! Represents an in-memory output byte stream.
-/*!
- This class is mainly for being wrapped by EncodedOutputStream or AutoUTFOutputStream.
-
- It is similar to FileWriteBuffer but the destination is an in-memory buffer instead of a file.
-
- Differences between MemoryBuffer and StringBuffer:
- 1. StringBuffer has Encoding but MemoryBuffer is only a byte buffer.
- 2. StringBuffer::GetString() returns a null-terminated string. MemoryBuffer::GetBuffer() returns a buffer without terminator.
-
- \tparam Allocator type for allocating memory buffer.
- \note implements Stream concept
-*/
-template <typename Allocator = CrtAllocator>
-struct GenericMemoryBuffer {
- typedef char Ch; // byte
-
- GenericMemoryBuffer(Allocator* allocator = 0, size_t capacity = kDefaultCapacity) : stack_(allocator, capacity) {}
-
- void Put(Ch c) { *stack_.template Push<Ch>() = c; }
- void Flush() {}
-
- void Clear() { stack_.Clear(); }
- void ShrinkToFit() { stack_.ShrinkToFit(); }
- Ch* Push(size_t count) { return stack_.template Push<Ch>(count); }
- void Pop(size_t count) { stack_.template Pop<Ch>(count); }
-
- const Ch* GetBuffer() const {
- return stack_.template Bottom<Ch>();
- }
-
- size_t GetSize() const { return stack_.GetSize(); }
-
- static const size_t kDefaultCapacity = 256;
- mutable internal::Stack<Allocator> stack_;
-};
-
-typedef GenericMemoryBuffer<> MemoryBuffer;
-
-//! Implement specialized version of PutN() with memset() for better performance.
-template<>
-inline void PutN(MemoryBuffer& memoryBuffer, char c, size_t n) {
- std::memset(memoryBuffer.stack_.Push<char>(n), c, n * sizeof(c));
-}
-
-RAPIDJSON_NAMESPACE_END
-
-#endif // RAPIDJSON_MEMORYBUFFER_H_
diff --git a/3rdparty/rapidjson/include/rapidjson/memorystream.h b/3rdparty/rapidjson/include/rapidjson/memorystream.h
deleted file mode 100644
index 7381e0b7dd2..00000000000
--- a/3rdparty/rapidjson/include/rapidjson/memorystream.h
+++ /dev/null
@@ -1,71 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 RAPIDJSON_MEMORYSTREAM_H_
-#define RAPIDJSON_MEMORYSTREAM_H_
-
-#include "stream.h"
-
-#ifdef __clang__
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(unreachable-code)
-RAPIDJSON_DIAG_OFF(missing-noreturn)
-#endif
-
-RAPIDJSON_NAMESPACE_BEGIN
-
-//! Represents an in-memory input byte stream.
-/*!
- This class is mainly for being wrapped by EncodedInputStream or AutoUTFInputStream.
-
- It is similar to FileReadBuffer but the source is an in-memory buffer instead of a file.
-
- Differences between MemoryStream and StringStream:
- 1. StringStream has encoding but MemoryStream is a byte stream.
- 2. MemoryStream needs size of the source buffer and the buffer don't need to be null terminated. StringStream assume null-terminated string as source.
- 3. MemoryStream supports Peek4() for encoding detection. StringStream is specified with an encoding so it should not have Peek4().
- \note implements Stream concept
-*/
-struct MemoryStream {
- typedef char Ch; // byte
-
- MemoryStream(const Ch *src, size_t size) : src_(src), begin_(src), end_(src + size), size_(size) {}
-
- Ch Peek() const { return (src_ == end_) ? '\0' : *src_; }
- Ch Take() { return (src_ == end_) ? '\0' : *src_++; }
- size_t Tell() const { return static_cast<size_t>(src_ - begin_); }
-
- Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; }
- void Put(Ch) { RAPIDJSON_ASSERT(false); }
- void Flush() { RAPIDJSON_ASSERT(false); }
- size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; }
-
- // For encoding detection only.
- const Ch* Peek4() const {
- return Tell() + 4 <= size_ ? src_ : 0;
- }
-
- const Ch* src_; //!< Current read position.
- const Ch* begin_; //!< Original head of the string.
- const Ch* end_; //!< End of stream.
- size_t size_; //!< Size of the stream.
-};
-
-RAPIDJSON_NAMESPACE_END
-
-#ifdef __clang__
-RAPIDJSON_DIAG_POP
-#endif
-
-#endif // RAPIDJSON_MEMORYBUFFER_H_
diff --git a/3rdparty/rapidjson/include/rapidjson/msinttypes/inttypes.h b/3rdparty/rapidjson/include/rapidjson/msinttypes/inttypes.h
deleted file mode 100644
index 18111286bf5..00000000000
--- a/3rdparty/rapidjson/include/rapidjson/msinttypes/inttypes.h
+++ /dev/null
@@ -1,316 +0,0 @@
-// ISO C9x compliant inttypes.h for Microsoft Visual Studio
-// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
-//
-// Copyright (c) 2006-2013 Alexander Chemeris
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// 1. Redistributions of source code must retain the above copyright notice,
-// this list of conditions and the following disclaimer.
-//
-// 2. 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.
-//
-// 3. Neither the name of the product 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 AUTHOR ``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 AUTHOR 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.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-// The above software in this distribution may have been modified by
-// THL A29 Limited ("Tencent Modifications").
-// All Tencent Modifications are Copyright (C) 2015 THL A29 Limited.
-
-#ifndef _MSC_VER // [
-#error "Use this header only with Microsoft Visual C++ compilers!"
-#endif // _MSC_VER ]
-
-#ifndef _MSC_INTTYPES_H_ // [
-#define _MSC_INTTYPES_H_
-
-#if _MSC_VER > 1000
-#pragma once
-#endif
-
-#include "stdint.h"
-
-// miloyip: VC supports inttypes.h since VC2013
-#if _MSC_VER >= 1800
-#include <inttypes.h>
-#else
-
-// 7.8 Format conversion of integer types
-
-typedef struct {
- intmax_t quot;
- intmax_t rem;
-} imaxdiv_t;
-
-// 7.8.1 Macros for format specifiers
-
-#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) // [ See footnote 185 at page 198
-
-// The fprintf macros for signed integers are:
-#define PRId8 "d"
-#define PRIi8 "i"
-#define PRIdLEAST8 "d"
-#define PRIiLEAST8 "i"
-#define PRIdFAST8 "d"
-#define PRIiFAST8 "i"
-
-#define PRId16 "hd"
-#define PRIi16 "hi"
-#define PRIdLEAST16 "hd"
-#define PRIiLEAST16 "hi"
-#define PRIdFAST16 "hd"
-#define PRIiFAST16 "hi"
-
-#define PRId32 "I32d"
-#define PRIi32 "I32i"
-#define PRIdLEAST32 "I32d"
-#define PRIiLEAST32 "I32i"
-#define PRIdFAST32 "I32d"
-#define PRIiFAST32 "I32i"
-
-#define PRId64 "I64d"
-#define PRIi64 "I64i"
-#define PRIdLEAST64 "I64d"
-#define PRIiLEAST64 "I64i"
-#define PRIdFAST64 "I64d"
-#define PRIiFAST64 "I64i"
-
-#define PRIdMAX "I64d"
-#define PRIiMAX "I64i"
-
-#define PRIdPTR "Id"
-#define PRIiPTR "Ii"
-
-// The fprintf macros for unsigned integers are:
-#define PRIo8 "o"
-#define PRIu8 "u"
-#define PRIx8 "x"
-#define PRIX8 "X"
-#define PRIoLEAST8 "o"
-#define PRIuLEAST8 "u"
-#define PRIxLEAST8 "x"
-#define PRIXLEAST8 "X"
-#define PRIoFAST8 "o"
-#define PRIuFAST8 "u"
-#define PRIxFAST8 "x"
-#define PRIXFAST8 "X"
-
-#define PRIo16 "ho"
-#define PRIu16 "hu"
-#define PRIx16 "hx"
-#define PRIX16 "hX"
-#define PRIoLEAST16 "ho"
-#define PRIuLEAST16 "hu"
-#define PRIxLEAST16 "hx"
-#define PRIXLEAST16 "hX"
-#define PRIoFAST16 "ho"
-#define PRIuFAST16 "hu"
-#define PRIxFAST16 "hx"
-#define PRIXFAST16 "hX"
-
-#define PRIo32 "I32o"
-#define PRIu32 "I32u"
-#define PRIx32 "I32x"
-#define PRIX32 "I32X"
-#define PRIoLEAST32 "I32o"
-#define PRIuLEAST32 "I32u"
-#define PRIxLEAST32 "I32x"
-#define PRIXLEAST32 "I32X"
-#define PRIoFAST32 "I32o"
-#define PRIuFAST32 "I32u"
-#define PRIxFAST32 "I32x"
-#define PRIXFAST32 "I32X"
-
-#define PRIo64 "I64o"
-#define PRIu64 "I64u"
-#define PRIx64 "I64x"
-#define PRIX64 "I64X"
-#define PRIoLEAST64 "I64o"
-#define PRIuLEAST64 "I64u"
-#define PRIxLEAST64 "I64x"
-#define PRIXLEAST64 "I64X"
-#define PRIoFAST64 "I64o"
-#define PRIuFAST64 "I64u"
-#define PRIxFAST64 "I64x"
-#define PRIXFAST64 "I64X"
-
-#define PRIoMAX "I64o"
-#define PRIuMAX "I64u"
-#define PRIxMAX "I64x"
-#define PRIXMAX "I64X"
-
-#define PRIoPTR "Io"
-#define PRIuPTR "Iu"
-#define PRIxPTR "Ix"
-#define PRIXPTR "IX"
-
-// The fscanf macros for signed integers are:
-#define SCNd8 "d"
-#define SCNi8 "i"
-#define SCNdLEAST8 "d"
-#define SCNiLEAST8 "i"
-#define SCNdFAST8 "d"
-#define SCNiFAST8 "i"
-
-#define SCNd16 "hd"
-#define SCNi16 "hi"
-#define SCNdLEAST16 "hd"
-#define SCNiLEAST16 "hi"
-#define SCNdFAST16 "hd"
-#define SCNiFAST16 "hi"
-
-#define SCNd32 "ld"
-#define SCNi32 "li"
-#define SCNdLEAST32 "ld"
-#define SCNiLEAST32 "li"
-#define SCNdFAST32 "ld"
-#define SCNiFAST32 "li"
-
-#define SCNd64 "I64d"
-#define SCNi64 "I64i"
-#define SCNdLEAST64 "I64d"
-#define SCNiLEAST64 "I64i"
-#define SCNdFAST64 "I64d"
-#define SCNiFAST64 "I64i"
-
-#define SCNdMAX "I64d"
-#define SCNiMAX "I64i"
-
-#ifdef _WIN64 // [
-# define SCNdPTR "I64d"
-# define SCNiPTR "I64i"
-#else // _WIN64 ][
-# define SCNdPTR "ld"
-# define SCNiPTR "li"
-#endif // _WIN64 ]
-
-// The fscanf macros for unsigned integers are:
-#define SCNo8 "o"
-#define SCNu8 "u"
-#define SCNx8 "x"
-#define SCNX8 "X"
-#define SCNoLEAST8 "o"
-#define SCNuLEAST8 "u"
-#define SCNxLEAST8 "x"
-#define SCNXLEAST8 "X"
-#define SCNoFAST8 "o"
-#define SCNuFAST8 "u"
-#define SCNxFAST8 "x"
-#define SCNXFAST8 "X"
-
-#define SCNo16 "ho"
-#define SCNu16 "hu"
-#define SCNx16 "hx"
-#define SCNX16 "hX"
-#define SCNoLEAST16 "ho"
-#define SCNuLEAST16 "hu"
-#define SCNxLEAST16 "hx"
-#define SCNXLEAST16 "hX"
-#define SCNoFAST16 "ho"
-#define SCNuFAST16 "hu"
-#define SCNxFAST16 "hx"
-#define SCNXFAST16 "hX"
-
-#define SCNo32 "lo"
-#define SCNu32 "lu"
-#define SCNx32 "lx"
-#define SCNX32 "lX"
-#define SCNoLEAST32 "lo"
-#define SCNuLEAST32 "lu"
-#define SCNxLEAST32 "lx"
-#define SCNXLEAST32 "lX"
-#define SCNoFAST32 "lo"
-#define SCNuFAST32 "lu"
-#define SCNxFAST32 "lx"
-#define SCNXFAST32 "lX"
-
-#define SCNo64 "I64o"
-#define SCNu64 "I64u"
-#define SCNx64 "I64x"
-#define SCNX64 "I64X"
-#define SCNoLEAST64 "I64o"
-#define SCNuLEAST64 "I64u"
-#define SCNxLEAST64 "I64x"
-#define SCNXLEAST64 "I64X"
-#define SCNoFAST64 "I64o"
-#define SCNuFAST64 "I64u"
-#define SCNxFAST64 "I64x"
-#define SCNXFAST64 "I64X"
-
-#define SCNoMAX "I64o"
-#define SCNuMAX "I64u"
-#define SCNxMAX "I64x"
-#define SCNXMAX "I64X"
-
-#ifdef _WIN64 // [
-# define SCNoPTR "I64o"
-# define SCNuPTR "I64u"
-# define SCNxPTR "I64x"
-# define SCNXPTR "I64X"
-#else // _WIN64 ][
-# define SCNoPTR "lo"
-# define SCNuPTR "lu"
-# define SCNxPTR "lx"
-# define SCNXPTR "lX"
-#endif // _WIN64 ]
-
-#endif // __STDC_FORMAT_MACROS ]
-
-// 7.8.2 Functions for greatest-width integer types
-
-// 7.8.2.1 The imaxabs function
-#define imaxabs _abs64
-
-// 7.8.2.2 The imaxdiv function
-
-// This is modified version of div() function from Microsoft's div.c found
-// in %MSVC.NET%\crt\src\div.c
-#ifdef STATIC_IMAXDIV // [
-static
-#else // STATIC_IMAXDIV ][
-_inline
-#endif // STATIC_IMAXDIV ]
-imaxdiv_t __cdecl imaxdiv(intmax_t numer, intmax_t denom)
-{
- imaxdiv_t result;
-
- result.quot = numer / denom;
- result.rem = numer % denom;
-
- if (numer < 0 && result.rem > 0) {
- // did division wrong; must fix up
- ++result.quot;
- result.rem -= denom;
- }
-
- return result;
-}
-
-// 7.8.2.3 The strtoimax and strtoumax functions
-#define strtoimax _strtoi64
-#define strtoumax _strtoui64
-
-// 7.8.2.4 The wcstoimax and wcstoumax functions
-#define wcstoimax _wcstoi64
-#define wcstoumax _wcstoui64
-
-#endif // _MSC_VER >= 1800
-
-#endif // _MSC_INTTYPES_H_ ]
diff --git a/3rdparty/rapidjson/include/rapidjson/msinttypes/stdint.h b/3rdparty/rapidjson/include/rapidjson/msinttypes/stdint.h
deleted file mode 100644
index 3d4477b9a02..00000000000
--- a/3rdparty/rapidjson/include/rapidjson/msinttypes/stdint.h
+++ /dev/null
@@ -1,300 +0,0 @@
-// ISO C9x compliant stdint.h for Microsoft Visual Studio
-// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
-//
-// Copyright (c) 2006-2013 Alexander Chemeris
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// 1. Redistributions of source code must retain the above copyright notice,
-// this list of conditions and the following disclaimer.
-//
-// 2. 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.
-//
-// 3. Neither the name of the product 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 AUTHOR ``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 AUTHOR 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.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-// The above software in this distribution may have been modified by
-// THL A29 Limited ("Tencent Modifications").
-// All Tencent Modifications are Copyright (C) 2015 THL A29 Limited.
-
-#ifndef _MSC_VER // [
-#error "Use this header only with Microsoft Visual C++ compilers!"
-#endif // _MSC_VER ]
-
-#ifndef _MSC_STDINT_H_ // [
-#define _MSC_STDINT_H_
-
-#if _MSC_VER > 1000
-#pragma once
-#endif
-
-// miloyip: Originally Visual Studio 2010 uses its own stdint.h. However it generates warning with INT64_C(), so change to use this file for vs2010.
-#if _MSC_VER >= 1600 // [
-#include <stdint.h>
-
-#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [ See footnote 224 at page 260
-
-#undef INT8_C
-#undef INT16_C
-#undef INT32_C
-#undef INT64_C
-#undef UINT8_C
-#undef UINT16_C
-#undef UINT32_C
-#undef UINT64_C
-
-// 7.18.4.1 Macros for minimum-width integer constants
-
-#define INT8_C(val) val##i8
-#define INT16_C(val) val##i16
-#define INT32_C(val) val##i32
-#define INT64_C(val) val##i64
-
-#define UINT8_C(val) val##ui8
-#define UINT16_C(val) val##ui16
-#define UINT32_C(val) val##ui32
-#define UINT64_C(val) val##ui64
-
-// 7.18.4.2 Macros for greatest-width integer constants
-// These #ifndef's are needed to prevent collisions with <boost/cstdint.hpp>.
-// Check out Issue 9 for the details.
-#ifndef INTMAX_C // [
-# define INTMAX_C INT64_C
-#endif // INTMAX_C ]
-#ifndef UINTMAX_C // [
-# define UINTMAX_C UINT64_C
-#endif // UINTMAX_C ]
-
-#endif // __STDC_CONSTANT_MACROS ]
-
-#else // ] _MSC_VER >= 1700 [
-
-#include <limits.h>
-
-// For Visual Studio 6 in C++ mode and for many Visual Studio versions when
-// compiling for ARM we have to wrap <wchar.h> include with 'extern "C++" {}'
-// or compiler would give many errors like this:
-// error C2733: second C linkage of overloaded function 'wmemchr' not allowed
-#if defined(__cplusplus) && !defined(_M_ARM)
-extern "C" {
-#endif
-# include <wchar.h>
-#if defined(__cplusplus) && !defined(_M_ARM)
-}
-#endif
-
-// Define _W64 macros to mark types changing their size, like intptr_t.
-#ifndef _W64
-# if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
-# define _W64 __w64
-# else
-# define _W64
-# endif
-#endif
-
-
-// 7.18.1 Integer types
-
-// 7.18.1.1 Exact-width integer types
-
-// Visual Studio 6 and Embedded Visual C++ 4 doesn't
-// realize that, e.g. char has the same size as __int8
-// so we give up on __intX for them.
-#if (_MSC_VER < 1300)
- typedef signed char int8_t;
- typedef signed short int16_t;
- typedef signed int int32_t;
- typedef unsigned char uint8_t;
- typedef unsigned short uint16_t;
- typedef unsigned int uint32_t;
-#else
- typedef signed __int8 int8_t;
- typedef signed __int16 int16_t;
- typedef signed __int32 int32_t;
- typedef unsigned __int8 uint8_t;
- typedef unsigned __int16 uint16_t;
- typedef unsigned __int32 uint32_t;
-#endif
-typedef signed __int64 int64_t;
-typedef unsigned __int64 uint64_t;
-
-
-// 7.18.1.2 Minimum-width integer types
-typedef int8_t int_least8_t;
-typedef int16_t int_least16_t;
-typedef int32_t int_least32_t;
-typedef int64_t int_least64_t;
-typedef uint8_t uint_least8_t;
-typedef uint16_t uint_least16_t;
-typedef uint32_t uint_least32_t;
-typedef uint64_t uint_least64_t;
-
-// 7.18.1.3 Fastest minimum-width integer types
-typedef int8_t int_fast8_t;
-typedef int16_t int_fast16_t;
-typedef int32_t int_fast32_t;
-typedef int64_t int_fast64_t;
-typedef uint8_t uint_fast8_t;
-typedef uint16_t uint_fast16_t;
-typedef uint32_t uint_fast32_t;
-typedef uint64_t uint_fast64_t;
-
-// 7.18.1.4 Integer types capable of holding object pointers
-#ifdef _WIN64 // [
- typedef signed __int64 intptr_t;
- typedef unsigned __int64 uintptr_t;
-#else // _WIN64 ][
- typedef _W64 signed int intptr_t;
- typedef _W64 unsigned int uintptr_t;
-#endif // _WIN64 ]
-
-// 7.18.1.5 Greatest-width integer types
-typedef int64_t intmax_t;
-typedef uint64_t uintmax_t;
-
-
-// 7.18.2 Limits of specified-width integer types
-
-#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 220 at page 257 and footnote 221 at page 259
-
-// 7.18.2.1 Limits of exact-width integer types
-#define INT8_MIN ((int8_t)_I8_MIN)
-#define INT8_MAX _I8_MAX
-#define INT16_MIN ((int16_t)_I16_MIN)
-#define INT16_MAX _I16_MAX
-#define INT32_MIN ((int32_t)_I32_MIN)
-#define INT32_MAX _I32_MAX
-#define INT64_MIN ((int64_t)_I64_MIN)
-#define INT64_MAX _I64_MAX
-#define UINT8_MAX _UI8_MAX
-#define UINT16_MAX _UI16_MAX
-#define UINT32_MAX _UI32_MAX
-#define UINT64_MAX _UI64_MAX
-
-// 7.18.2.2 Limits of minimum-width integer types
-#define INT_LEAST8_MIN INT8_MIN
-#define INT_LEAST8_MAX INT8_MAX
-#define INT_LEAST16_MIN INT16_MIN
-#define INT_LEAST16_MAX INT16_MAX
-#define INT_LEAST32_MIN INT32_MIN
-#define INT_LEAST32_MAX INT32_MAX
-#define INT_LEAST64_MIN INT64_MIN
-#define INT_LEAST64_MAX INT64_MAX
-#define UINT_LEAST8_MAX UINT8_MAX
-#define UINT_LEAST16_MAX UINT16_MAX
-#define UINT_LEAST32_MAX UINT32_MAX
-#define UINT_LEAST64_MAX UINT64_MAX
-
-// 7.18.2.3 Limits of fastest minimum-width integer types
-#define INT_FAST8_MIN INT8_MIN
-#define INT_FAST8_MAX INT8_MAX
-#define INT_FAST16_MIN INT16_MIN
-#define INT_FAST16_MAX INT16_MAX
-#define INT_FAST32_MIN INT32_MIN
-#define INT_FAST32_MAX INT32_MAX
-#define INT_FAST64_MIN INT64_MIN
-#define INT_FAST64_MAX INT64_MAX
-#define UINT_FAST8_MAX UINT8_MAX
-#define UINT_FAST16_MAX UINT16_MAX
-#define UINT_FAST32_MAX UINT32_MAX
-#define UINT_FAST64_MAX UINT64_MAX
-
-// 7.18.2.4 Limits of integer types capable of holding object pointers
-#ifdef _WIN64 // [
-# define INTPTR_MIN INT64_MIN
-# define INTPTR_MAX INT64_MAX
-# define UINTPTR_MAX UINT64_MAX
-#else // _WIN64 ][
-# define INTPTR_MIN INT32_MIN
-# define INTPTR_MAX INT32_MAX
-# define UINTPTR_MAX UINT32_MAX
-#endif // _WIN64 ]
-
-// 7.18.2.5 Limits of greatest-width integer types
-#define INTMAX_MIN INT64_MIN
-#define INTMAX_MAX INT64_MAX
-#define UINTMAX_MAX UINT64_MAX
-
-// 7.18.3 Limits of other integer types
-
-#ifdef _WIN64 // [
-# define PTRDIFF_MIN _I64_MIN
-# define PTRDIFF_MAX _I64_MAX
-#else // _WIN64 ][
-# define PTRDIFF_MIN _I32_MIN
-# define PTRDIFF_MAX _I32_MAX
-#endif // _WIN64 ]
-
-#define SIG_ATOMIC_MIN INT_MIN
-#define SIG_ATOMIC_MAX INT_MAX
-
-#ifndef SIZE_MAX // [
-# ifdef _WIN64 // [
-# define SIZE_MAX _UI64_MAX
-# else // _WIN64 ][
-# define SIZE_MAX _UI32_MAX
-# endif // _WIN64 ]
-#endif // SIZE_MAX ]
-
-// WCHAR_MIN and WCHAR_MAX are also defined in <wchar.h>
-#ifndef WCHAR_MIN // [
-# define WCHAR_MIN 0
-#endif // WCHAR_MIN ]
-#ifndef WCHAR_MAX // [
-# define WCHAR_MAX _UI16_MAX
-#endif // WCHAR_MAX ]
-
-#define WINT_MIN 0
-#define WINT_MAX _UI16_MAX
-
-#endif // __STDC_LIMIT_MACROS ]
-
-
-// 7.18.4 Limits of other integer types
-
-#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [ See footnote 224 at page 260
-
-// 7.18.4.1 Macros for minimum-width integer constants
-
-#define INT8_C(val) val##i8
-#define INT16_C(val) val##i16
-#define INT32_C(val) val##i32
-#define INT64_C(val) val##i64
-
-#define UINT8_C(val) val##ui8
-#define UINT16_C(val) val##ui16
-#define UINT32_C(val) val##ui32
-#define UINT64_C(val) val##ui64
-
-// 7.18.4.2 Macros for greatest-width integer constants
-// These #ifndef's are needed to prevent collisions with <boost/cstdint.hpp>.
-// Check out Issue 9 for the details.
-#ifndef INTMAX_C // [
-# define INTMAX_C INT64_C
-#endif // INTMAX_C ]
-#ifndef UINTMAX_C // [
-# define UINTMAX_C UINT64_C
-#endif // UINTMAX_C ]
-
-#endif // __STDC_CONSTANT_MACROS ]
-
-#endif // _MSC_VER >= 1600 ]
-
-#endif // _MSC_STDINT_H_ ]
diff --git a/3rdparty/rapidjson/include/rapidjson/ostreamwrapper.h b/3rdparty/rapidjson/include/rapidjson/ostreamwrapper.h
deleted file mode 100644
index 8bf36dcd04c..00000000000
--- a/3rdparty/rapidjson/include/rapidjson/ostreamwrapper.h
+++ /dev/null
@@ -1,76 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 "stream.h"
-#include <iosfwd>
-
-#ifdef __clang__
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(padded)
-#endif
-
-RAPIDJSON_NAMESPACE_BEGIN
-
-//! Wrapper of \c std::basic_ostream into RapidJSON's Stream concept.
-/*!
- The classes can be wrapped including but not limited to:
-
- - \c std::ostringstream
- - \c std::stringstream
- - \c std::wpstringstream
- - \c std::wstringstream
- - \c std::ifstream
- - \c std::fstream
- - \c std::wofstream
- - \c std::wfstream
-
- \tparam StreamType Class derived from \c std::basic_ostream.
-*/
-
-template <typename StreamType>
-class BasicOStreamWrapper {
-public:
- typedef typename StreamType::char_type Ch;
- BasicOStreamWrapper(StreamType& stream) : stream_(stream) {}
-
- void Put(Ch c) {
- stream_.put(c);
- }
-
- void Flush() {
- stream_.flush();
- }
-
- // Not implemented
- char Peek() const { RAPIDJSON_ASSERT(false); return 0; }
- char Take() { RAPIDJSON_ASSERT(false); return 0; }
- size_t Tell() const { RAPIDJSON_ASSERT(false); return 0; }
- char* PutBegin() { RAPIDJSON_ASSERT(false); return 0; }
- size_t PutEnd(char*) { RAPIDJSON_ASSERT(false); return 0; }
-
-private:
- BasicOStreamWrapper(const BasicOStreamWrapper&);
- BasicOStreamWrapper& operator=(const BasicOStreamWrapper&);
-
- StreamType& stream_;
-};
-
-typedef BasicOStreamWrapper<std::ostream> OStreamWrapper;
-typedef BasicOStreamWrapper<std::wostream> WOStreamWrapper;
-
-#ifdef __clang__
-RAPIDJSON_DIAG_POP
-#endif
-
-RAPIDJSON_NAMESPACE_END
diff --git a/3rdparty/rapidjson/include/rapidjson/pointer.h b/3rdparty/rapidjson/include/rapidjson/pointer.h
deleted file mode 100644
index eddeab427ea..00000000000
--- a/3rdparty/rapidjson/include/rapidjson/pointer.h
+++ /dev/null
@@ -1,1345 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 RAPIDJSON_POINTER_H_
-#define RAPIDJSON_POINTER_H_
-
-#include "document.h"
-#include "internal/itoa.h"
-
-#ifdef __clang__
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(switch-enum)
-#endif
-
-RAPIDJSON_NAMESPACE_BEGIN
-
-static const SizeType kPointerInvalidIndex = ~SizeType(0); //!< Represents an invalid index in GenericPointer::Token
-
-//! Error code of parsing.
-/*! \ingroup RAPIDJSON_ERRORS
- \see GenericPointer::GenericPointer, GenericPointer::GetParseErrorCode
-*/
-enum PointerParseErrorCode {
- kPointerParseErrorNone = 0, //!< The parse is successful
-
- kPointerParseErrorTokenMustBeginWithSolidus, //!< A token must begin with a '/'
- kPointerParseErrorInvalidEscape, //!< Invalid escape
- kPointerParseErrorInvalidPercentEncoding, //!< Invalid percent encoding in URI fragment
- kPointerParseErrorCharacterMustPercentEncode //!< A character must percent encoded in URI fragment
-};
-
-///////////////////////////////////////////////////////////////////////////////
-// GenericPointer
-
-//! Represents a JSON Pointer. Use Pointer for UTF8 encoding and default allocator.
-/*!
- This class implements RFC 6901 "JavaScript Object Notation (JSON) Pointer"
- (https://tools.ietf.org/html/rfc6901).
-
- A JSON pointer is for identifying a specific value in a JSON document
- (GenericDocument). It can simplify coding of DOM tree manipulation, because it
- can access multiple-level depth of DOM tree with single API call.
-
- After it parses a string representation (e.g. "/foo/0" or URI fragment
- representation (e.g. "#/foo/0") into its internal representation (tokens),
- it can be used to resolve a specific value in multiple documents, or sub-tree
- of documents.
-
- Contrary to GenericValue, Pointer can be copy constructed and copy assigned.
- Apart from assignment, a Pointer cannot be modified after construction.
-
- Although Pointer is very convenient, please aware that constructing Pointer
- involves parsing and dynamic memory allocation. A special constructor with user-
- supplied tokens eliminates these.
-
- GenericPointer depends on GenericDocument and GenericValue.
-
- \tparam ValueType The value type of the DOM tree. E.g. GenericValue<UTF8<> >
- \tparam Allocator The allocator type for allocating memory for internal representation.
-
- \note GenericPointer uses same encoding of ValueType.
- However, Allocator of GenericPointer is independent of Allocator of Value.
-*/
-template <typename ValueType, typename Allocator = CrtAllocator>
-class GenericPointer {
-public:
- typedef typename ValueType::EncodingType EncodingType; //!< Encoding type from Value
- typedef typename ValueType::Ch Ch; //!< Character type from Value
-
- //! A token is the basic units of internal representation.
- /*!
- A JSON pointer string representation "/foo/123" is parsed to two tokens:
- "foo" and 123. 123 will be represented in both numeric form and string form.
- They are resolved according to the actual value type (object or array).
-
- For token that are not numbers, or the numeric value is out of bound
- (greater than limits of SizeType), they are only treated as string form
- (i.e. the token's index will be equal to kPointerInvalidIndex).
-
- This struct is public so that user can create a Pointer without parsing and
- allocation, using a special constructor.
- */
- struct Token {
- const Ch* name; //!< Name of the token. It has null character at the end but it can contain null character.
- SizeType length; //!< Length of the name.
- SizeType index; //!< A valid array index, if it is not equal to kPointerInvalidIndex.
- };
-
- //!@name Constructors and destructor.
- //@{
-
- //! Default constructor.
- GenericPointer(Allocator* allocator = 0) : allocator_(allocator), ownAllocator_(), nameBuffer_(), tokens_(), tokenCount_(), parseErrorOffset_(), parseErrorCode_(kPointerParseErrorNone) {}
-
- //! Constructor that parses a string or URI fragment representation.
- /*!
- \param source A null-terminated, string or URI fragment representation of JSON pointer.
- \param allocator User supplied allocator for this pointer. If no allocator is provided, it creates a self-owned one.
- */
- explicit GenericPointer(const Ch* source, Allocator* allocator = 0) : allocator_(allocator), ownAllocator_(), nameBuffer_(), tokens_(), tokenCount_(), parseErrorOffset_(), parseErrorCode_(kPointerParseErrorNone) {
- Parse(source, internal::StrLen(source));
- }
-
-#if RAPIDJSON_HAS_STDSTRING
- //! Constructor that parses a string or URI fragment representation.
- /*!
- \param source A string or URI fragment representation of JSON pointer.
- \param allocator User supplied allocator for this pointer. If no allocator is provided, it creates a self-owned one.
- \note Requires the definition of the preprocessor symbol \ref RAPIDJSON_HAS_STDSTRING.
- */
- explicit GenericPointer(const std::basic_string<Ch>& source, Allocator* allocator = 0) : allocator_(allocator), ownAllocator_(), nameBuffer_(), tokens_(), tokenCount_(), parseErrorOffset_(), parseErrorCode_(kPointerParseErrorNone) {
- Parse(source.c_str(), source.size());
- }
-#endif
-
- //! Constructor that parses a string or URI fragment representation, with length of the source string.
- /*!
- \param source A string or URI fragment representation of JSON pointer.
- \param length Length of source.
- \param allocator User supplied allocator for this pointer. If no allocator is provided, it creates a self-owned one.
- \note Slightly faster than the overload without length.
- */
- GenericPointer(const Ch* source, size_t length, Allocator* allocator = 0) : allocator_(allocator), ownAllocator_(), nameBuffer_(), tokens_(), tokenCount_(), parseErrorOffset_(), parseErrorCode_(kPointerParseErrorNone) {
- Parse(source, length);
- }
-
- //! Constructor with user-supplied tokens.
- /*!
- This constructor let user supplies const array of tokens.
- This prevents the parsing process and eliminates allocation.
- This is preferred for memory constrained environments.
-
- \param tokens An constant array of tokens representing the JSON pointer.
- \param tokenCount Number of tokens.
-
- \b Example
- \code
- #define NAME(s) { s, sizeof(s) / sizeof(s[0]) - 1, kPointerInvalidIndex }
- #define INDEX(i) { #i, sizeof(#i) - 1, i }
-
- static const Pointer::Token kTokens[] = { NAME("foo"), INDEX(123) };
- static const Pointer p(kTokens, sizeof(kTokens) / sizeof(kTokens[0]));
- // Equivalent to static const Pointer p("/foo/123");
-
- #undef NAME
- #undef INDEX
- \endcode
- */
- GenericPointer(const Token* tokens, size_t tokenCount) : allocator_(), ownAllocator_(), nameBuffer_(), tokens_(const_cast<Token*>(tokens)), tokenCount_(tokenCount), parseErrorOffset_(), parseErrorCode_(kPointerParseErrorNone) {}
-
- //! Copy constructor.
- GenericPointer(const GenericPointer& rhs, Allocator* allocator = 0) : allocator_(allocator), ownAllocator_(), nameBuffer_(), tokens_(), tokenCount_(), parseErrorOffset_(), parseErrorCode_(kPointerParseErrorNone) {
- *this = rhs;
- }
-
- //! Destructor.
- ~GenericPointer() {
- if (nameBuffer_) // If user-supplied tokens constructor is used, nameBuffer_ is nullptr and tokens_ are not deallocated.
- Allocator::Free(tokens_);
- RAPIDJSON_DELETE(ownAllocator_);
- }
-
- //! Assignment operator.
- GenericPointer& operator=(const GenericPointer& rhs) {
- if (this != &rhs) {
- // Do not delete ownAllcator
- if (nameBuffer_)
- Allocator::Free(tokens_);
-
- tokenCount_ = rhs.tokenCount_;
- parseErrorOffset_ = rhs.parseErrorOffset_;
- parseErrorCode_ = rhs.parseErrorCode_;
-
- if (rhs.nameBuffer_)
- CopyFromRaw(rhs); // Normally parsed tokens.
- else {
- tokens_ = rhs.tokens_; // User supplied const tokens.
- nameBuffer_ = 0;
- }
- }
- return *this;
- }
-
- //@}
-
- //!@name Append token
- //@{
-
- //! Append a token and return a new Pointer
- /*!
- \param token Token to be appended.
- \param allocator Allocator for the newly return Pointer.
- \return A new Pointer with appended token.
- */
- GenericPointer Append(const Token& token, Allocator* allocator = 0) const {
- GenericPointer r;
- r.allocator_ = allocator;
- Ch *p = r.CopyFromRaw(*this, 1, token.length + 1);
- std::memcpy(p, token.name, (token.length + 1) * sizeof(Ch));
- r.tokens_[tokenCount_].name = p;
- r.tokens_[tokenCount_].length = token.length;
- r.tokens_[tokenCount_].index = token.index;
- return r;
- }
-
- //! Append a name token with length, and return a new Pointer
- /*!
- \param name Name to be appended.
- \param length Length of name.
- \param allocator Allocator for the newly return Pointer.
- \return A new Pointer with appended token.
- */
- GenericPointer Append(const Ch* name, SizeType length, Allocator* allocator = 0) const {
- Token token = { name, length, kPointerInvalidIndex };
- return Append(token, allocator);
- }
-
- //! Append a name token without length, and return a new Pointer
- /*!
- \param name Name (const Ch*) to be appended.
- \param allocator Allocator for the newly return Pointer.
- \return A new Pointer with appended token.
- */
- template <typename T>
- RAPIDJSON_DISABLEIF_RETURN((internal::NotExpr<internal::IsSame<typename internal::RemoveConst<T>::Type, Ch> >), (GenericPointer))
- Append(T* name, Allocator* allocator = 0) const {
- return Append(name, StrLen(name), allocator);
- }
-
-#if RAPIDJSON_HAS_STDSTRING
- //! Append a name token, and return a new Pointer
- /*!
- \param name Name to be appended.
- \param allocator Allocator for the newly return Pointer.
- \return A new Pointer with appended token.
- */
- GenericPointer Append(const std::basic_string<Ch>& name, Allocator* allocator = 0) const {
- return Append(name.c_str(), static_cast<SizeType>(name.size()), allocator);
- }
-#endif
-
- //! Append a index token, and return a new Pointer
- /*!
- \param index Index to be appended.
- \param allocator Allocator for the newly return Pointer.
- \return A new Pointer with appended token.
- */
- GenericPointer Append(SizeType index, Allocator* allocator = 0) const {
- char buffer[21];
- char* end = sizeof(SizeType) == 4 ? internal::u32toa(index, buffer) : internal::u64toa(index, buffer);
- SizeType length = static_cast<SizeType>(end - buffer);
- buffer[length] = '\0';
-
- if (sizeof(Ch) == 1) {
- Token token = { reinterpret_cast<Ch*>(buffer), length, index };
- return Append(token, allocator);
- }
- else {
- Ch name[21];
- for (size_t i = 0; i <= length; i++)
- name[i] = buffer[i];
- Token token = { name, length, index };
- return Append(token, allocator);
- }
- }
-
- //! Append a token by value, and return a new Pointer
- /*!
- \param token token to be appended.
- \param allocator Allocator for the newly return Pointer.
- \return A new Pointer with appended token.
- */
- GenericPointer Append(const ValueType& token, Allocator* allocator = 0) const {
- if (token.IsString())
- return Append(token.GetString(), token.GetStringLength(), allocator);
- else {
- RAPIDJSON_ASSERT(token.IsUint64());
- RAPIDJSON_ASSERT(token.GetUint64() <= SizeType(~0));
- return Append(static_cast<SizeType>(token.GetUint64()), allocator);
- }
- }
-
- //!@name Handling Parse Error
- //@{
-
- //! Check whether this is a valid pointer.
- bool IsValid() const { return parseErrorCode_ == kPointerParseErrorNone; }
-
- //! Get the parsing error offset in code unit.
- size_t GetParseErrorOffset() const { return parseErrorOffset_; }
-
- //! Get the parsing error code.
- PointerParseErrorCode GetParseErrorCode() const { return parseErrorCode_; }
-
- //@}
-
- //! Get the allocator of this pointer.
- Allocator& GetAllocator() { return *allocator_; }
-
- //!@name Tokens
- //@{
-
- //! Get the token array (const version only).
- const Token* GetTokens() const { return tokens_; }
-
- //! Get the number of tokens.
- size_t GetTokenCount() const { return tokenCount_; }
-
- //@}
-
- //!@name Equality/inequality operators
- //@{
-
- //! Equality operator.
- /*!
- \note When any pointers are invalid, always returns false.
- */
- bool operator==(const GenericPointer& rhs) const {
- if (!IsValid() || !rhs.IsValid() || tokenCount_ != rhs.tokenCount_)
- return false;
-
- for (size_t i = 0; i < tokenCount_; i++) {
- if (tokens_[i].index != rhs.tokens_[i].index ||
- tokens_[i].length != rhs.tokens_[i].length ||
- (tokens_[i].length != 0 && std::memcmp(tokens_[i].name, rhs.tokens_[i].name, sizeof(Ch)* tokens_[i].length) != 0))
- {
- return false;
- }
- }
-
- return true;
- }
-
- //! Inequality operator.
- /*!
- \note When any pointers are invalid, always returns true.
- */
- bool operator!=(const GenericPointer& rhs) const { return !(*this == rhs); }
-
- //@}
-
- //!@name Stringify
- //@{
-
- //! Stringify the pointer into string representation.
- /*!
- \tparam OutputStream Type of output stream.
- \param os The output stream.
- */
- template<typename OutputStream>
- bool Stringify(OutputStream& os) const {
- return Stringify<false, OutputStream>(os);
- }
-
- //! Stringify the pointer into URI fragment representation.
- /*!
- \tparam OutputStream Type of output stream.
- \param os The output stream.
- */
- template<typename OutputStream>
- bool StringifyUriFragment(OutputStream& os) const {
- return Stringify<true, OutputStream>(os);
- }
-
- //@}
-
- //!@name Create value
- //@{
-
- //! Create a value in a subtree.
- /*!
- If the value is not exist, it creates all parent values and a JSON Null value.
- So it always succeed and return the newly created or existing value.
-
- Remind that it may change types of parents according to tokens, so it
- potentially removes previously stored values. For example, if a document
- was an array, and "/foo" is used to create a value, then the document
- will be changed to an object, and all existing array elements are lost.
-
- \param root Root value of a DOM subtree to be resolved. It can be any value other than document root.
- \param allocator Allocator for creating the values if the specified value or its parents are not exist.
- \param alreadyExist If non-null, it stores whether the resolved value is already exist.
- \return The resolved newly created (a JSON Null value), or already exists value.
- */
- ValueType& Create(ValueType& root, typename ValueType::AllocatorType& allocator, bool* alreadyExist = 0) const {
- RAPIDJSON_ASSERT(IsValid());
- ValueType* v = &root;
- bool exist = true;
- for (const Token *t = tokens_; t != tokens_ + tokenCount_; ++t) {
- if (v->IsArray() && t->name[0] == '-' && t->length == 1) {
- v->PushBack(ValueType().Move(), allocator);
- v = &((*v)[v->Size() - 1]);
- exist = false;
- }
- else {
- if (t->index == kPointerInvalidIndex) { // must be object name
- if (!v->IsObject())
- v->SetObject(); // Change to Object
- }
- else { // object name or array index
- if (!v->IsArray() && !v->IsObject())
- v->SetArray(); // Change to Array
- }
-
- if (v->IsArray()) {
- if (t->index >= v->Size()) {
- v->Reserve(t->index + 1, allocator);
- while (t->index >= v->Size())
- v->PushBack(ValueType().Move(), allocator);
- exist = false;
- }
- v = &((*v)[t->index]);
- }
- else {
- typename ValueType::MemberIterator m = v->FindMember(GenericStringRef<Ch>(t->name, t->length));
- if (m == v->MemberEnd()) {
- v->AddMember(ValueType(t->name, t->length, allocator).Move(), ValueType().Move(), allocator);
- v = &(--v->MemberEnd())->value; // Assumes AddMember() appends at the end
- exist = false;
- }
- else
- v = &m->value;
- }
- }
- }
-
- if (alreadyExist)
- *alreadyExist = exist;
-
- return *v;
- }
-
- //! Creates a value in a document.
- /*!
- \param document A document to be resolved.
- \param alreadyExist If non-null, it stores whether the resolved value is already exist.
- \return The resolved newly created, or already exists value.
- */
- template <typename stackAllocator>
- ValueType& Create(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document, bool* alreadyExist = 0) const {
- return Create(document, document.GetAllocator(), alreadyExist);
- }
-
- //@}
-
- //!@name Query value
- //@{
-
- //! Query a value in a subtree.
- /*!
- \param root Root value of a DOM sub-tree to be resolved. It can be any value other than document root.
- \param unresolvedTokenIndex If the pointer cannot resolve a token in the pointer, this parameter can obtain the index of unresolved token.
- \return Pointer to the value if it can be resolved. Otherwise null.
-
- \note
- There are only 3 situations when a value cannot be resolved:
- 1. A value in the path is not an array nor object.
- 2. An object value does not contain the token.
- 3. A token is out of range of an array value.
-
- Use unresolvedTokenIndex to retrieve the token index.
- */
- ValueType* Get(ValueType& root, size_t* unresolvedTokenIndex = 0) const {
- RAPIDJSON_ASSERT(IsValid());
- ValueType* v = &root;
- for (const Token *t = tokens_; t != tokens_ + tokenCount_; ++t) {
- switch (v->GetType()) {
- case kObjectType:
- {
- typename ValueType::MemberIterator m = v->FindMember(GenericStringRef<Ch>(t->name, t->length));
- if (m == v->MemberEnd())
- break;
- v = &m->value;
- }
- continue;
- case kArrayType:
- if (t->index == kPointerInvalidIndex || t->index >= v->Size())
- break;
- v = &((*v)[t->index]);
- continue;
- default:
- break;
- }
-
- // Error: unresolved token
- if (unresolvedTokenIndex)
- *unresolvedTokenIndex = static_cast<size_t>(t - tokens_);
- return 0;
- }
- return v;
- }
-
- //! Query a const value in a const subtree.
- /*!
- \param root Root value of a DOM sub-tree to be resolved. It can be any value other than document root.
- \return Pointer to the value if it can be resolved. Otherwise null.
- */
- const ValueType* Get(const ValueType& root, size_t* unresolvedTokenIndex = 0) const {
- return Get(const_cast<ValueType&>(root), unresolvedTokenIndex);
- }
-
- //@}
-
- //!@name Query a value with default
- //@{
-
- //! Query a value in a subtree with default value.
- /*!
- Similar to Get(), but if the specified value do not exists, it creates all parents and clone the default value.
- So that this function always succeed.
-
- \param root Root value of a DOM sub-tree to be resolved. It can be any value other than document root.
- \param defaultValue Default value to be cloned if the value was not exists.
- \param allocator Allocator for creating the values if the specified value or its parents are not exist.
- \see Create()
- */
- ValueType& GetWithDefault(ValueType& root, const ValueType& defaultValue, typename ValueType::AllocatorType& allocator) const {
- bool alreadyExist;
- Value& v = Create(root, allocator, &alreadyExist);
- return alreadyExist ? v : v.CopyFrom(defaultValue, allocator);
- }
-
- //! Query a value in a subtree with default null-terminated string.
- ValueType& GetWithDefault(ValueType& root, const Ch* defaultValue, typename ValueType::AllocatorType& allocator) const {
- bool alreadyExist;
- Value& v = Create(root, allocator, &alreadyExist);
- return alreadyExist ? v : v.SetString(defaultValue, allocator);
- }
-
-#if RAPIDJSON_HAS_STDSTRING
- //! Query a value in a subtree with default std::basic_string.
- ValueType& GetWithDefault(ValueType& root, const std::basic_string<Ch>& defaultValue, typename ValueType::AllocatorType& allocator) const {
- bool alreadyExist;
- Value& v = Create(root, allocator, &alreadyExist);
- return alreadyExist ? v : v.SetString(defaultValue, allocator);
- }
-#endif
-
- //! Query a value in a subtree with default primitive value.
- /*!
- \tparam T Either \ref Type, \c int, \c unsigned, \c int64_t, \c uint64_t, \c bool
- */
- template <typename T>
- RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T>, internal::IsGenericValue<T> >), (ValueType&))
- GetWithDefault(ValueType& root, T defaultValue, typename ValueType::AllocatorType& allocator) const {
- return GetWithDefault(root, ValueType(defaultValue).Move(), allocator);
- }
-
- //! Query a value in a document with default value.
- template <typename stackAllocator>
- ValueType& GetWithDefault(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document, const ValueType& defaultValue) const {
- return GetWithDefault(document, defaultValue, document.GetAllocator());
- }
-
- //! Query a value in a document with default null-terminated string.
- template <typename stackAllocator>
- ValueType& GetWithDefault(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document, const Ch* defaultValue) const {
- return GetWithDefault(document, defaultValue, document.GetAllocator());
- }
-
-#if RAPIDJSON_HAS_STDSTRING
- //! Query a value in a document with default std::basic_string.
- template <typename stackAllocator>
- ValueType& GetWithDefault(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document, const std::basic_string<Ch>& defaultValue) const {
- return GetWithDefault(document, defaultValue, document.GetAllocator());
- }
-#endif
-
- //! Query a value in a document with default primitive value.
- /*!
- \tparam T Either \ref Type, \c int, \c unsigned, \c int64_t, \c uint64_t, \c bool
- */
- template <typename T, typename stackAllocator>
- RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T>, internal::IsGenericValue<T> >), (ValueType&))
- GetWithDefault(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document, T defaultValue) const {
- return GetWithDefault(document, defaultValue, document.GetAllocator());
- }
-
- //@}
-
- //!@name Set a value
- //@{
-
- //! Set a value in a subtree, with move semantics.
- /*!
- It creates all parents if they are not exist or types are different to the tokens.
- So this function always succeeds but potentially remove existing values.
-
- \param root Root value of a DOM sub-tree to be resolved. It can be any value other than document root.
- \param value Value to be set.
- \param allocator Allocator for creating the values if the specified value or its parents are not exist.
- \see Create()
- */
- ValueType& Set(ValueType& root, ValueType& value, typename ValueType::AllocatorType& allocator) const {
- return Create(root, allocator) = value;
- }
-
- //! Set a value in a subtree, with copy semantics.
- ValueType& Set(ValueType& root, const ValueType& value, typename ValueType::AllocatorType& allocator) const {
- return Create(root, allocator).CopyFrom(value, allocator);
- }
-
- //! Set a null-terminated string in a subtree.
- ValueType& Set(ValueType& root, const Ch* value, typename ValueType::AllocatorType& allocator) const {
- return Create(root, allocator) = ValueType(value, allocator).Move();
- }
-
-#if RAPIDJSON_HAS_STDSTRING
- //! Set a std::basic_string in a subtree.
- ValueType& Set(ValueType& root, const std::basic_string<Ch>& value, typename ValueType::AllocatorType& allocator) const {
- return Create(root, allocator) = ValueType(value, allocator).Move();
- }
-#endif
-
- //! Set a primitive value in a subtree.
- /*!
- \tparam T Either \ref Type, \c int, \c unsigned, \c int64_t, \c uint64_t, \c bool
- */
- template <typename T>
- RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T>, internal::IsGenericValue<T> >), (ValueType&))
- Set(ValueType& root, T value, typename ValueType::AllocatorType& allocator) const {
- return Create(root, allocator) = ValueType(value).Move();
- }
-
- //! Set a value in a document, with move semantics.
- template <typename stackAllocator>
- ValueType& Set(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document, ValueType& value) const {
- return Create(document) = value;
- }
-
- //! Set a value in a document, with copy semantics.
- template <typename stackAllocator>
- ValueType& Set(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document, const ValueType& value) const {
- return Create(document).CopyFrom(value, document.GetAllocator());
- }
-
- //! Set a null-terminated string in a document.
- template <typename stackAllocator>
- ValueType& Set(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document, const Ch* value) const {
- return Create(document) = ValueType(value, document.GetAllocator()).Move();
- }
-
-#if RAPIDJSON_HAS_STDSTRING
- //! Sets a std::basic_string in a document.
- template <typename stackAllocator>
- ValueType& Set(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document, const std::basic_string<Ch>& value) const {
- return Create(document) = ValueType(value, document.GetAllocator()).Move();
- }
-#endif
-
- //! Set a primitive value in a document.
- /*!
- \tparam T Either \ref Type, \c int, \c unsigned, \c int64_t, \c uint64_t, \c bool
- */
- template <typename T, typename stackAllocator>
- RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T>, internal::IsGenericValue<T> >), (ValueType&))
- Set(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document, T value) const {
- return Create(document) = value;
- }
-
- //@}
-
- //!@name Swap a value
- //@{
-
- //! Swap a value with a value in a subtree.
- /*!
- It creates all parents if they are not exist or types are different to the tokens.
- So this function always succeeds but potentially remove existing values.
-
- \param root Root value of a DOM sub-tree to be resolved. It can be any value other than document root.
- \param value Value to be swapped.
- \param allocator Allocator for creating the values if the specified value or its parents are not exist.
- \see Create()
- */
- ValueType& Swap(ValueType& root, ValueType& value, typename ValueType::AllocatorType& allocator) const {
- return Create(root, allocator).Swap(value);
- }
-
- //! Swap a value with a value in a document.
- template <typename stackAllocator>
- ValueType& Swap(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document, ValueType& value) const {
- return Create(document).Swap(value);
- }
-
- //@}
-
- //! Erase a value in a subtree.
- /*!
- \param root Root value of a DOM sub-tree to be resolved. It can be any value other than document root.
- \return Whether the resolved value is found and erased.
-
- \note Erasing with an empty pointer \c Pointer(""), i.e. the root, always fail and return false.
- */
- bool Erase(ValueType& root) const {
- RAPIDJSON_ASSERT(IsValid());
- if (tokenCount_ == 0) // Cannot erase the root
- return false;
-
- ValueType* v = &root;
- const Token* last = tokens_ + (tokenCount_ - 1);
- for (const Token *t = tokens_; t != last; ++t) {
- switch (v->GetType()) {
- case kObjectType:
- {
- typename ValueType::MemberIterator m = v->FindMember(GenericStringRef<Ch>(t->name, t->length));
- if (m == v->MemberEnd())
- return false;
- v = &m->value;
- }
- break;
- case kArrayType:
- if (t->index == kPointerInvalidIndex || t->index >= v->Size())
- return false;
- v = &((*v)[t->index]);
- break;
- default:
- return false;
- }
- }
-
- switch (v->GetType()) {
- case kObjectType:
- return v->EraseMember(GenericStringRef<Ch>(last->name, last->length));
- case kArrayType:
- if (last->index == kPointerInvalidIndex || last->index >= v->Size())
- return false;
- v->Erase(v->Begin() + last->index);
- return true;
- default:
- return false;
- }
- }
-
-private:
- //! Clone the content from rhs to this.
- /*!
- \param rhs Source pointer.
- \param extraToken Extra tokens to be allocated.
- \param extraNameBufferSize Extra name buffer size (in number of Ch) to be allocated.
- \return Start of non-occupied name buffer, for storing extra names.
- */
- Ch* CopyFromRaw(const GenericPointer& rhs, size_t extraToken = 0, size_t extraNameBufferSize = 0) {
- if (!allocator_) // allocator is independently owned.
- ownAllocator_ = allocator_ = RAPIDJSON_NEW(Allocator());
-
- size_t nameBufferSize = rhs.tokenCount_; // null terminators for tokens
- for (Token *t = rhs.tokens_; t != rhs.tokens_ + rhs.tokenCount_; ++t)
- nameBufferSize += t->length;
-
- tokenCount_ = rhs.tokenCount_ + extraToken;
- tokens_ = static_cast<Token *>(allocator_->Malloc(tokenCount_ * sizeof(Token) + (nameBufferSize + extraNameBufferSize) * sizeof(Ch)));
- nameBuffer_ = reinterpret_cast<Ch *>(tokens_ + tokenCount_);
- std::memcpy(tokens_, rhs.tokens_, rhs.tokenCount_ * sizeof(Token));
- std::memcpy(nameBuffer_, rhs.nameBuffer_, nameBufferSize * sizeof(Ch));
-
- // Adjust pointers to name buffer
- std::ptrdiff_t diff = nameBuffer_ - rhs.nameBuffer_;
- for (Token *t = tokens_; t != tokens_ + rhs.tokenCount_; ++t)
- t->name += diff;
-
- return nameBuffer_ + nameBufferSize;
- }
-
- //! Check whether a character should be percent-encoded.
- /*!
- According to RFC 3986 2.3 Unreserved Characters.
- \param c The character (code unit) to be tested.
- */
- bool NeedPercentEncode(Ch c) const {
- return !((c >= '0' && c <= '9') || (c >= 'A' && c <='Z') || (c >= 'a' && c <= 'z') || c == '-' || c == '.' || c == '_' || c =='~');
- }
-
- //! Parse a JSON String or its URI fragment representation into tokens.
-#ifndef __clang__ // -Wdocumentation
- /*!
- \param source Either a JSON Pointer string, or its URI fragment representation. Not need to be null terminated.
- \param length Length of the source string.
- \note Source cannot be JSON String Representation of JSON Pointer, e.g. In "/\u0000", \u0000 will not be unescaped.
- */
-#endif
- void Parse(const Ch* source, size_t length) {
- RAPIDJSON_ASSERT(source != NULL);
- RAPIDJSON_ASSERT(nameBuffer_ == 0);
- RAPIDJSON_ASSERT(tokens_ == 0);
-
- // Create own allocator if user did not supply.
- if (!allocator_)
- ownAllocator_ = allocator_ = RAPIDJSON_NEW(Allocator());
-
- // Count number of '/' as tokenCount
- tokenCount_ = 0;
- for (const Ch* s = source; s != source + length; s++)
- if (*s == '/')
- tokenCount_++;
-
- Token* token = tokens_ = static_cast<Token *>(allocator_->Malloc(tokenCount_ * sizeof(Token) + length * sizeof(Ch)));
- Ch* name = nameBuffer_ = reinterpret_cast<Ch *>(tokens_ + tokenCount_);
- size_t i = 0;
-
- // Detect if it is a URI fragment
- bool uriFragment = false;
- if (source[i] == '#') {
- uriFragment = true;
- i++;
- }
-
- if (i != length && source[i] != '/') {
- parseErrorCode_ = kPointerParseErrorTokenMustBeginWithSolidus;
- goto error;
- }
-
- while (i < length) {
- RAPIDJSON_ASSERT(source[i] == '/');
- i++; // consumes '/'
-
- token->name = name;
- bool isNumber = true;
-
- while (i < length && source[i] != '/') {
- Ch c = source[i];
- if (uriFragment) {
- // Decoding percent-encoding for URI fragment
- if (c == '%') {
- PercentDecodeStream is(&source[i], source + length);
- GenericInsituStringStream<EncodingType> os(name);
- Ch* begin = os.PutBegin();
- if (!Transcoder<UTF8<>, EncodingType>().Validate(is, os) || !is.IsValid()) {
- parseErrorCode_ = kPointerParseErrorInvalidPercentEncoding;
- goto error;
- }
- size_t len = os.PutEnd(begin);
- i += is.Tell() - 1;
- if (len == 1)
- c = *name;
- else {
- name += len;
- isNumber = false;
- i++;
- continue;
- }
- }
- else if (NeedPercentEncode(c)) {
- parseErrorCode_ = kPointerParseErrorCharacterMustPercentEncode;
- goto error;
- }
- }
-
- i++;
-
- // Escaping "~0" -> '~', "~1" -> '/'
- if (c == '~') {
- if (i < length) {
- c = source[i];
- if (c == '0') c = '~';
- else if (c == '1') c = '/';
- else {
- parseErrorCode_ = kPointerParseErrorInvalidEscape;
- goto error;
- }
- i++;
- }
- else {
- parseErrorCode_ = kPointerParseErrorInvalidEscape;
- goto error;
- }
- }
-
- // First check for index: all of characters are digit
- if (c < '0' || c > '9')
- isNumber = false;
-
- *name++ = c;
- }
- token->length = static_cast<SizeType>(name - token->name);
- if (token->length == 0)
- isNumber = false;
- *name++ = '\0'; // Null terminator
-
- // Second check for index: more than one digit cannot have leading zero
- if (isNumber && token->length > 1 && token->name[0] == '0')
- isNumber = false;
-
- // String to SizeType conversion
- SizeType n = 0;
- if (isNumber) {
- for (size_t j = 0; j < token->length; j++) {
- SizeType m = n * 10 + static_cast<SizeType>(token->name[j] - '0');
- if (m < n) { // overflow detection
- isNumber = false;
- break;
- }
- n = m;
- }
- }
-
- token->index = isNumber ? n : kPointerInvalidIndex;
- token++;
- }
-
- RAPIDJSON_ASSERT(name <= nameBuffer_ + length); // Should not overflow buffer
- parseErrorCode_ = kPointerParseErrorNone;
- return;
-
- error:
- Allocator::Free(tokens_);
- nameBuffer_ = 0;
- tokens_ = 0;
- tokenCount_ = 0;
- parseErrorOffset_ = i;
- return;
- }
-
- //! Stringify to string or URI fragment representation.
- /*!
- \tparam uriFragment True for stringifying to URI fragment representation. False for string representation.
- \tparam OutputStream type of output stream.
- \param os The output stream.
- */
- template<bool uriFragment, typename OutputStream>
- bool Stringify(OutputStream& os) const {
- RAPIDJSON_ASSERT(IsValid());
-
- if (uriFragment)
- os.Put('#');
-
- for (Token *t = tokens_; t != tokens_ + tokenCount_; ++t) {
- os.Put('/');
- for (size_t j = 0; j < t->length; j++) {
- Ch c = t->name[j];
- if (c == '~') {
- os.Put('~');
- os.Put('0');
- }
- else if (c == '/') {
- os.Put('~');
- os.Put('1');
- }
- else if (uriFragment && NeedPercentEncode(c)) {
- // Transcode to UTF8 sequence
- GenericStringStream<typename ValueType::EncodingType> source(&t->name[j]);
- PercentEncodeStream<OutputStream> target(os);
- if (!Transcoder<EncodingType, UTF8<> >().Validate(source, target))
- return false;
- j += source.Tell() - 1;
- }
- else
- os.Put(c);
- }
- }
- return true;
- }
-
- //! A helper stream for decoding a percent-encoded sequence into code unit.
- /*!
- This stream decodes %XY triplet into code unit (0-255).
- If it encounters invalid characters, it sets output code unit as 0 and
- mark invalid, and to be checked by IsValid().
- */
- class PercentDecodeStream {
- public:
- typedef typename ValueType::Ch Ch;
-
- //! Constructor
- /*!
- \param source Start of the stream
- \param end Past-the-end of the stream.
- */
- PercentDecodeStream(const Ch* source, const Ch* end) : src_(source), head_(source), end_(end), valid_(true) {}
-
- Ch Take() {
- if (*src_ != '%' || src_ + 3 > end_) { // %XY triplet
- valid_ = false;
- return 0;
- }
- src_++;
- Ch c = 0;
- for (int j = 0; j < 2; j++) {
- c <<= 4;
- Ch h = *src_;
- if (h >= '0' && h <= '9') c += h - '0';
- else if (h >= 'A' && h <= 'F') c += h - 'A' + 10;
- else if (h >= 'a' && h <= 'f') c += h - 'a' + 10;
- else {
- valid_ = false;
- return 0;
- }
- src_++;
- }
- return c;
- }
-
- size_t Tell() const { return static_cast<size_t>(src_ - head_); }
- bool IsValid() const { return valid_; }
-
- private:
- const Ch* src_; //!< Current read position.
- const Ch* head_; //!< Original head of the string.
- const Ch* end_; //!< Past-the-end position.
- bool valid_; //!< Whether the parsing is valid.
- };
-
- //! A helper stream to encode character (UTF-8 code unit) into percent-encoded sequence.
- template <typename OutputStream>
- class PercentEncodeStream {
- public:
- PercentEncodeStream(OutputStream& os) : os_(os) {}
- void Put(char c) { // UTF-8 must be byte
- unsigned char u = static_cast<unsigned char>(c);
- static const char hexDigits[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
- os_.Put('%');
- os_.Put(hexDigits[u >> 4]);
- os_.Put(hexDigits[u & 15]);
- }
- private:
- OutputStream& os_;
- };
-
- Allocator* allocator_; //!< The current allocator. It is either user-supplied or equal to ownAllocator_.
- Allocator* ownAllocator_; //!< Allocator owned by this Pointer.
- Ch* nameBuffer_; //!< A buffer containing all names in tokens.
- Token* tokens_; //!< A list of tokens.
- size_t tokenCount_; //!< Number of tokens in tokens_.
- size_t parseErrorOffset_; //!< Offset in code unit when parsing fail.
- PointerParseErrorCode parseErrorCode_; //!< Parsing error code.
-};
-
-//! GenericPointer for Value (UTF-8, default allocator).
-typedef GenericPointer<Value> Pointer;
-
-//!@name Helper functions for GenericPointer
-//@{
-
-//////////////////////////////////////////////////////////////////////////////
-
-template <typename T>
-typename T::ValueType& CreateValueByPointer(T& root, const GenericPointer<typename T::ValueType>& pointer, typename T::AllocatorType& a) {
- return pointer.Create(root, a);
-}
-
-template <typename T, typename CharType, size_t N>
-typename T::ValueType& CreateValueByPointer(T& root, const CharType(&source)[N], typename T::AllocatorType& a) {
- return GenericPointer<typename T::ValueType>(source, N - 1).Create(root, a);
-}
-
-// No allocator parameter
-
-template <typename DocumentType>
-typename DocumentType::ValueType& CreateValueByPointer(DocumentType& document, const GenericPointer<typename DocumentType::ValueType>& pointer) {
- return pointer.Create(document);
-}
-
-template <typename DocumentType, typename CharType, size_t N>
-typename DocumentType::ValueType& CreateValueByPointer(DocumentType& document, const CharType(&source)[N]) {
- return GenericPointer<typename DocumentType::ValueType>(source, N - 1).Create(document);
-}
-
-//////////////////////////////////////////////////////////////////////////////
-
-template <typename T>
-typename T::ValueType* GetValueByPointer(T& root, const GenericPointer<typename T::ValueType>& pointer, size_t* unresolvedTokenIndex = 0) {
- return pointer.Get(root, unresolvedTokenIndex);
-}
-
-template <typename T>
-const typename T::ValueType* GetValueByPointer(const T& root, const GenericPointer<typename T::ValueType>& pointer, size_t* unresolvedTokenIndex = 0) {
- return pointer.Get(root, unresolvedTokenIndex);
-}
-
-template <typename T, typename CharType, size_t N>
-typename T::ValueType* GetValueByPointer(T& root, const CharType (&source)[N], size_t* unresolvedTokenIndex = 0) {
- return GenericPointer<typename T::ValueType>(source, N - 1).Get(root, unresolvedTokenIndex);
-}
-
-template <typename T, typename CharType, size_t N>
-const typename T::ValueType* GetValueByPointer(const T& root, const CharType(&source)[N], size_t* unresolvedTokenIndex = 0) {
- return GenericPointer<typename T::ValueType>(source, N - 1).Get(root, unresolvedTokenIndex);
-}
-
-//////////////////////////////////////////////////////////////////////////////
-
-template <typename T>
-typename T::ValueType& GetValueByPointerWithDefault(T& root, const GenericPointer<typename T::ValueType>& pointer, const typename T::ValueType& defaultValue, typename T::AllocatorType& a) {
- return pointer.GetWithDefault(root, defaultValue, a);
-}
-
-template <typename T>
-typename T::ValueType& GetValueByPointerWithDefault(T& root, const GenericPointer<typename T::ValueType>& pointer, const typename T::Ch* defaultValue, typename T::AllocatorType& a) {
- return pointer.GetWithDefault(root, defaultValue, a);
-}
-
-#if RAPIDJSON_HAS_STDSTRING
-template <typename T>
-typename T::ValueType& GetValueByPointerWithDefault(T& root, const GenericPointer<typename T::ValueType>& pointer, const std::basic_string<typename T::Ch>& defaultValue, typename T::AllocatorType& a) {
- return pointer.GetWithDefault(root, defaultValue, a);
-}
-#endif
-
-template <typename T, typename T2>
-RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T2>, internal::IsGenericValue<T2> >), (typename T::ValueType&))
-GetValueByPointerWithDefault(T& root, const GenericPointer<typename T::ValueType>& pointer, T2 defaultValue, typename T::AllocatorType& a) {
- return pointer.GetWithDefault(root, defaultValue, a);
-}
-
-template <typename T, typename CharType, size_t N>
-typename T::ValueType& GetValueByPointerWithDefault(T& root, const CharType(&source)[N], const typename T::ValueType& defaultValue, typename T::AllocatorType& a) {
- return GenericPointer<typename T::ValueType>(source, N - 1).GetWithDefault(root, defaultValue, a);
-}
-
-template <typename T, typename CharType, size_t N>
-typename T::ValueType& GetValueByPointerWithDefault(T& root, const CharType(&source)[N], const typename T::Ch* defaultValue, typename T::AllocatorType& a) {
- return GenericPointer<typename T::ValueType>(source, N - 1).GetWithDefault(root, defaultValue, a);
-}
-
-#if RAPIDJSON_HAS_STDSTRING
-template <typename T, typename CharType, size_t N>
-typename T::ValueType& GetValueByPointerWithDefault(T& root, const CharType(&source)[N], const std::basic_string<typename T::Ch>& defaultValue, typename T::AllocatorType& a) {
- return GenericPointer<typename T::ValueType>(source, N - 1).GetWithDefault(root, defaultValue, a);
-}
-#endif
-
-template <typename T, typename CharType, size_t N, typename T2>
-RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T2>, internal::IsGenericValue<T2> >), (typename T::ValueType&))
-GetValueByPointerWithDefault(T& root, const CharType(&source)[N], T2 defaultValue, typename T::AllocatorType& a) {
- return GenericPointer<typename T::ValueType>(source, N - 1).GetWithDefault(root, defaultValue, a);
-}
-
-// No allocator parameter
-
-template <typename DocumentType>
-typename DocumentType::ValueType& GetValueByPointerWithDefault(DocumentType& document, const GenericPointer<typename DocumentType::ValueType>& pointer, const typename DocumentType::ValueType& defaultValue) {
- return pointer.GetWithDefault(document, defaultValue);
-}
-
-template <typename DocumentType>
-typename DocumentType::ValueType& GetValueByPointerWithDefault(DocumentType& document, const GenericPointer<typename DocumentType::ValueType>& pointer, const typename DocumentType::Ch* defaultValue) {
- return pointer.GetWithDefault(document, defaultValue);
-}
-
-#if RAPIDJSON_HAS_STDSTRING
-template <typename DocumentType>
-typename DocumentType::ValueType& GetValueByPointerWithDefault(DocumentType& document, const GenericPointer<typename DocumentType::ValueType>& pointer, const std::basic_string<typename DocumentType::Ch>& defaultValue) {
- return pointer.GetWithDefault(document, defaultValue);
-}
-#endif
-
-template <typename DocumentType, typename T2>
-RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T2>, internal::IsGenericValue<T2> >), (typename DocumentType::ValueType&))
-GetValueByPointerWithDefault(DocumentType& document, const GenericPointer<typename DocumentType::ValueType>& pointer, T2 defaultValue) {
- return pointer.GetWithDefault(document, defaultValue);
-}
-
-template <typename DocumentType, typename CharType, size_t N>
-typename DocumentType::ValueType& GetValueByPointerWithDefault(DocumentType& document, const CharType(&source)[N], const typename DocumentType::ValueType& defaultValue) {
- return GenericPointer<typename DocumentType::ValueType>(source, N - 1).GetWithDefault(document, defaultValue);
-}
-
-template <typename DocumentType, typename CharType, size_t N>
-typename DocumentType::ValueType& GetValueByPointerWithDefault(DocumentType& document, const CharType(&source)[N], const typename DocumentType::Ch* defaultValue) {
- return GenericPointer<typename DocumentType::ValueType>(source, N - 1).GetWithDefault(document, defaultValue);
-}
-
-#if RAPIDJSON_HAS_STDSTRING
-template <typename DocumentType, typename CharType, size_t N>
-typename DocumentType::ValueType& GetValueByPointerWithDefault(DocumentType& document, const CharType(&source)[N], const std::basic_string<typename DocumentType::Ch>& defaultValue) {
- return GenericPointer<typename DocumentType::ValueType>(source, N - 1).GetWithDefault(document, defaultValue);
-}
-#endif
-
-template <typename DocumentType, typename CharType, size_t N, typename T2>
-RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T2>, internal::IsGenericValue<T2> >), (typename DocumentType::ValueType&))
-GetValueByPointerWithDefault(DocumentType& document, const CharType(&source)[N], T2 defaultValue) {
- return GenericPointer<typename DocumentType::ValueType>(source, N - 1).GetWithDefault(document, defaultValue);
-}
-
-//////////////////////////////////////////////////////////////////////////////
-
-template <typename T>
-typename T::ValueType& SetValueByPointer(T& root, const GenericPointer<typename T::ValueType>& pointer, typename T::ValueType& value, typename T::AllocatorType& a) {
- return pointer.Set(root, value, a);
-}
-
-template <typename T>
-typename T::ValueType& SetValueByPointer(T& root, const GenericPointer<typename T::ValueType>& pointer, const typename T::ValueType& value, typename T::AllocatorType& a) {
- return pointer.Set(root, value, a);
-}
-
-template <typename T>
-typename T::ValueType& SetValueByPointer(T& root, const GenericPointer<typename T::ValueType>& pointer, const typename T::Ch* value, typename T::AllocatorType& a) {
- return pointer.Set(root, value, a);
-}
-
-#if RAPIDJSON_HAS_STDSTRING
-template <typename T>
-typename T::ValueType& SetValueByPointer(T& root, const GenericPointer<typename T::ValueType>& pointer, const std::basic_string<typename T::Ch>& value, typename T::AllocatorType& a) {
- return pointer.Set(root, value, a);
-}
-#endif
-
-template <typename T, typename T2>
-RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T2>, internal::IsGenericValue<T2> >), (typename T::ValueType&))
-SetValueByPointer(T& root, const GenericPointer<typename T::ValueType>& pointer, T2 value, typename T::AllocatorType& a) {
- return pointer.Set(root, value, a);
-}
-
-template <typename T, typename CharType, size_t N>
-typename T::ValueType& SetValueByPointer(T& root, const CharType(&source)[N], typename T::ValueType& value, typename T::AllocatorType& a) {
- return GenericPointer<typename T::ValueType>(source, N - 1).Set(root, value, a);
-}
-
-template <typename T, typename CharType, size_t N>
-typename T::ValueType& SetValueByPointer(T& root, const CharType(&source)[N], const typename T::ValueType& value, typename T::AllocatorType& a) {
- return GenericPointer<typename T::ValueType>(source, N - 1).Set(root, value, a);
-}
-
-template <typename T, typename CharType, size_t N>
-typename T::ValueType& SetValueByPointer(T& root, const CharType(&source)[N], const typename T::Ch* value, typename T::AllocatorType& a) {
- return GenericPointer<typename T::ValueType>(source, N - 1).Set(root, value, a);
-}
-
-#if RAPIDJSON_HAS_STDSTRING
-template <typename T, typename CharType, size_t N>
-typename T::ValueType& SetValueByPointer(T& root, const CharType(&source)[N], const std::basic_string<typename T::Ch>& value, typename T::AllocatorType& a) {
- return GenericPointer<typename T::ValueType>(source, N - 1).Set(root, value, a);
-}
-#endif
-
-template <typename T, typename CharType, size_t N, typename T2>
-RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T2>, internal::IsGenericValue<T2> >), (typename T::ValueType&))
-SetValueByPointer(T& root, const CharType(&source)[N], T2 value, typename T::AllocatorType& a) {
- return GenericPointer<typename T::ValueType>(source, N - 1).Set(root, value, a);
-}
-
-// No allocator parameter
-
-template <typename DocumentType>
-typename DocumentType::ValueType& SetValueByPointer(DocumentType& document, const GenericPointer<typename DocumentType::ValueType>& pointer, typename DocumentType::ValueType& value) {
- return pointer.Set(document, value);
-}
-
-template <typename DocumentType>
-typename DocumentType::ValueType& SetValueByPointer(DocumentType& document, const GenericPointer<typename DocumentType::ValueType>& pointer, const typename DocumentType::ValueType& value) {
- return pointer.Set(document, value);
-}
-
-template <typename DocumentType>
-typename DocumentType::ValueType& SetValueByPointer(DocumentType& document, const GenericPointer<typename DocumentType::ValueType>& pointer, const typename DocumentType::Ch* value) {
- return pointer.Set(document, value);
-}
-
-#if RAPIDJSON_HAS_STDSTRING
-template <typename DocumentType>
-typename DocumentType::ValueType& SetValueByPointer(DocumentType& document, const GenericPointer<typename DocumentType::ValueType>& pointer, const std::basic_string<typename DocumentType::Ch>& value) {
- return pointer.Set(document, value);
-}
-#endif
-
-template <typename DocumentType, typename T2>
-RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T2>, internal::IsGenericValue<T2> >), (typename DocumentType::ValueType&))
-SetValueByPointer(DocumentType& document, const GenericPointer<typename DocumentType::ValueType>& pointer, T2 value) {
- return pointer.Set(document, value);
-}
-
-template <typename DocumentType, typename CharType, size_t N>
-typename DocumentType::ValueType& SetValueByPointer(DocumentType& document, const CharType(&source)[N], typename DocumentType::ValueType& value) {
- return GenericPointer<typename DocumentType::ValueType>(source, N - 1).Set(document, value);
-}
-
-template <typename DocumentType, typename CharType, size_t N>
-typename DocumentType::ValueType& SetValueByPointer(DocumentType& document, const CharType(&source)[N], const typename DocumentType::ValueType& value) {
- return GenericPointer<typename DocumentType::ValueType>(source, N - 1).Set(document, value);
-}
-
-template <typename DocumentType, typename CharType, size_t N>
-typename DocumentType::ValueType& SetValueByPointer(DocumentType& document, const CharType(&source)[N], const typename DocumentType::Ch* value) {
- return GenericPointer<typename DocumentType::ValueType>(source, N - 1).Set(document, value);
-}
-
-#if RAPIDJSON_HAS_STDSTRING
-template <typename DocumentType, typename CharType, size_t N>
-typename DocumentType::ValueType& SetValueByPointer(DocumentType& document, const CharType(&source)[N], const std::basic_string<typename DocumentType::Ch>& value) {
- return GenericPointer<typename DocumentType::ValueType>(source, N - 1).Set(document, value);
-}
-#endif
-
-template <typename DocumentType, typename CharType, size_t N, typename T2>
-RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T2>, internal::IsGenericValue<T2> >), (typename DocumentType::ValueType&))
-SetValueByPointer(DocumentType& document, const CharType(&source)[N], T2 value) {
- return GenericPointer<typename DocumentType::ValueType>(source, N - 1).Set(document, value);
-}
-
-//////////////////////////////////////////////////////////////////////////////
-
-template <typename T>
-typename T::ValueType& SwapValueByPointer(T& root, const GenericPointer<typename T::ValueType>& pointer, typename T::ValueType& value, typename T::AllocatorType& a) {
- return pointer.Swap(root, value, a);
-}
-
-template <typename T, typename CharType, size_t N>
-typename T::ValueType& SwapValueByPointer(T& root, const CharType(&source)[N], typename T::ValueType& value, typename T::AllocatorType& a) {
- return GenericPointer<typename T::ValueType>(source, N - 1).Swap(root, value, a);
-}
-
-template <typename DocumentType>
-typename DocumentType::ValueType& SwapValueByPointer(DocumentType& document, const GenericPointer<typename DocumentType::ValueType>& pointer, typename DocumentType::ValueType& value) {
- return pointer.Swap(document, value);
-}
-
-template <typename DocumentType, typename CharType, size_t N>
-typename DocumentType::ValueType& SwapValueByPointer(DocumentType& document, const CharType(&source)[N], typename DocumentType::ValueType& value) {
- return GenericPointer<typename DocumentType::ValueType>(source, N - 1).Swap(document, value);
-}
-
-//////////////////////////////////////////////////////////////////////////////
-
-template <typename T>
-bool EraseValueByPointer(T& root, const GenericPointer<typename T::ValueType>& pointer) {
- return pointer.Erase(root);
-}
-
-template <typename T, typename CharType, size_t N>
-bool EraseValueByPointer(T& root, const CharType(&source)[N]) {
- return GenericPointer<typename T::ValueType>(source, N - 1).Erase(root);
-}
-
-//@}
-
-RAPIDJSON_NAMESPACE_END
-
-#ifdef __clang__
-RAPIDJSON_DIAG_POP
-#endif
-
-#endif // RAPIDJSON_POINTER_H_
diff --git a/3rdparty/rapidjson/include/rapidjson/prettywriter.h b/3rdparty/rapidjson/include/rapidjson/prettywriter.h
deleted file mode 100644
index c74e1f10b01..00000000000
--- a/3rdparty/rapidjson/include/rapidjson/prettywriter.h
+++ /dev/null
@@ -1,223 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 RAPIDJSON_PRETTYWRITER_H_
-#define RAPIDJSON_PRETTYWRITER_H_
-
-#include "writer.h"
-
-#ifdef __GNUC__
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(effc++)
-#endif
-
-RAPIDJSON_NAMESPACE_BEGIN
-
-//! Writer with indentation and spacing.
-/*!
- \tparam OutputStream Type of ouptut os.
- \tparam SourceEncoding Encoding of source string.
- \tparam TargetEncoding Encoding of output stream.
- \tparam StackAllocator Type of allocator for allocating memory of stack.
-*/
-template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags>
-class PrettyWriter : public Writer<OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags> {
-public:
- typedef Writer<OutputStream, SourceEncoding, TargetEncoding, StackAllocator> Base;
- typedef typename Base::Ch Ch;
-
- //! Constructor
- /*! \param os Output stream.
- \param allocator User supplied allocator. If it is null, it will create a private one.
- \param levelDepth Initial capacity of stack.
- */
- explicit PrettyWriter(OutputStream& os, StackAllocator* allocator = 0, size_t levelDepth = Base::kDefaultLevelDepth) :
- Base(os, allocator, levelDepth), indentChar_(' '), indentCharCount_(4) {}
-
-
- explicit PrettyWriter(StackAllocator* allocator = 0, size_t levelDepth = Base::kDefaultLevelDepth) :
- Base(allocator, levelDepth), indentChar_(' '), indentCharCount_(4) {}
-
- //! Set custom indentation.
- /*! \param indentChar Character for indentation. Must be whitespace character (' ', '\\t', '\\n', '\\r').
- \param indentCharCount Number of indent characters for each indentation level.
- \note The default indentation is 4 spaces.
- */
- PrettyWriter& SetIndent(Ch indentChar, unsigned indentCharCount) {
- RAPIDJSON_ASSERT(indentChar == ' ' || indentChar == '\t' || indentChar == '\n' || indentChar == '\r');
- indentChar_ = indentChar;
- indentCharCount_ = indentCharCount;
- return *this;
- }
-
- /*! @name Implementation of Handler
- \see Handler
- */
- //@{
-
- bool Null() { PrettyPrefix(kNullType); return Base::WriteNull(); }
- bool Bool(bool b) { PrettyPrefix(b ? kTrueType : kFalseType); return Base::WriteBool(b); }
- bool Int(int i) { PrettyPrefix(kNumberType); return Base::WriteInt(i); }
- bool Uint(unsigned u) { PrettyPrefix(kNumberType); return Base::WriteUint(u); }
- bool Int64(int64_t i64) { PrettyPrefix(kNumberType); return Base::WriteInt64(i64); }
- bool Uint64(uint64_t u64) { PrettyPrefix(kNumberType); return Base::WriteUint64(u64); }
- bool Double(double d) { PrettyPrefix(kNumberType); return Base::WriteDouble(d); }
-
- bool String(const Ch* str, SizeType length, bool copy = false) {
- (void)copy;
- PrettyPrefix(kStringType);
- return Base::WriteString(str, length);
- }
-
-#if RAPIDJSON_HAS_STDSTRING
- bool String(const std::basic_string<Ch>& str) {
- return String(str.data(), SizeType(str.size()));
- }
-#endif
-
- bool StartObject() {
- PrettyPrefix(kObjectType);
- new (Base::level_stack_.template Push<typename Base::Level>()) typename Base::Level(false);
- return Base::WriteStartObject();
- }
-
- bool Key(const Ch* str, SizeType length, bool copy = false) { return String(str, length, copy); }
-
- bool EndObject(SizeType memberCount = 0) {
- (void)memberCount;
- RAPIDJSON_ASSERT(Base::level_stack_.GetSize() >= sizeof(typename Base::Level));
- RAPIDJSON_ASSERT(!Base::level_stack_.template Top<typename Base::Level>()->inArray);
- bool empty = Base::level_stack_.template Pop<typename Base::Level>(1)->valueCount == 0;
-
- if (!empty) {
- Base::os_->Put('\n');
- WriteIndent();
- }
- bool ret = Base::WriteEndObject();
- (void)ret;
- RAPIDJSON_ASSERT(ret == true);
- if (Base::level_stack_.Empty()) // end of json text
- Base::os_->Flush();
- return true;
- }
-
- bool StartArray() {
- PrettyPrefix(kArrayType);
- new (Base::level_stack_.template Push<typename Base::Level>()) typename Base::Level(true);
- return Base::WriteStartArray();
- }
-
- bool EndArray(SizeType memberCount = 0) {
- (void)memberCount;
- RAPIDJSON_ASSERT(Base::level_stack_.GetSize() >= sizeof(typename Base::Level));
- RAPIDJSON_ASSERT(Base::level_stack_.template Top<typename Base::Level>()->inArray);
- bool empty = Base::level_stack_.template Pop<typename Base::Level>(1)->valueCount == 0;
-
- if (!empty) {
- Base::os_->Put('\n');
- WriteIndent();
- }
- bool ret = Base::WriteEndArray();
- (void)ret;
- RAPIDJSON_ASSERT(ret == true);
- if (Base::level_stack_.Empty()) // end of json text
- Base::os_->Flush();
- return true;
- }
-
- //@}
-
- /*! @name Convenience extensions */
- //@{
-
- //! Simpler but slower overload.
- bool String(const Ch* str) { return String(str, internal::StrLen(str)); }
- bool Key(const Ch* str) { return Key(str, internal::StrLen(str)); }
-
- //@}
-
- //! Write a raw JSON value.
- /*!
- For user to write a stringified JSON as a value.
-
- \param json A well-formed JSON value. It should not contain null character within [0, length - 1] range.
- \param length Length of the json.
- \param type Type of the root of json.
- \note When using PrettyWriter::RawValue(), the result json may not be indented correctly.
- */
- bool RawValue(const Ch* json, size_t length, Type type) { PrettyPrefix(type); return Base::WriteRawValue(json, length); }
-
-protected:
- void PrettyPrefix(Type type) {
- (void)type;
- if (Base::level_stack_.GetSize() != 0) { // this value is not at root
- typename Base::Level* level = Base::level_stack_.template Top<typename Base::Level>();
-
- if (level->inArray) {
- if (level->valueCount > 0) {
- Base::os_->Put(','); // add comma if it is not the first element in array
- Base::os_->Put('\n');
- }
- else
- Base::os_->Put('\n');
- WriteIndent();
- }
- else { // in object
- if (level->valueCount > 0) {
- if (level->valueCount % 2 == 0) {
- Base::os_->Put(',');
- Base::os_->Put('\n');
- }
- else {
- Base::os_->Put(':');
- Base::os_->Put(' ');
- }
- }
- else
- Base::os_->Put('\n');
-
- if (level->valueCount % 2 == 0)
- WriteIndent();
- }
- if (!level->inArray && level->valueCount % 2 == 0)
- RAPIDJSON_ASSERT(type == kStringType); // if it's in object, then even number should be a name
- level->valueCount++;
- }
- else {
- RAPIDJSON_ASSERT(!Base::hasRoot_); // Should only has one and only one root.
- Base::hasRoot_ = true;
- }
- }
-
- void WriteIndent() {
- size_t count = (Base::level_stack_.GetSize() / sizeof(typename Base::Level)) * indentCharCount_;
- PutN(*Base::os_, static_cast<typename TargetEncoding::Ch>(indentChar_), count);
- }
-
- Ch indentChar_;
- unsigned indentCharCount_;
-
-private:
- // Prohibit copy constructor & assignment operator.
- PrettyWriter(const PrettyWriter&);
- PrettyWriter& operator=(const PrettyWriter&);
-};
-
-RAPIDJSON_NAMESPACE_END
-
-#ifdef __GNUC__
-RAPIDJSON_DIAG_POP
-#endif
-
-#endif // RAPIDJSON_RAPIDJSON_H_
diff --git a/3rdparty/rapidjson/include/rapidjson/rapidjson.h b/3rdparty/rapidjson/include/rapidjson/rapidjson.h
deleted file mode 100644
index 7a5db71bd0a..00000000000
--- a/3rdparty/rapidjson/include/rapidjson/rapidjson.h
+++ /dev/null
@@ -1,569 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 RAPIDJSON_RAPIDJSON_H_
-#define RAPIDJSON_RAPIDJSON_H_
-
-/*!\file rapidjson.h
- \brief common definitions and configuration
-
- \see RAPIDJSON_CONFIG
- */
-
-/*! \defgroup RAPIDJSON_CONFIG RapidJSON configuration
- \brief Configuration macros for library features
-
- Some RapidJSON features are configurable to adapt the library to a wide
- variety of platforms, environments and usage scenarios. Most of the
- features can be configured in terms of overriden or predefined
- preprocessor macros at compile-time.
-
- Some additional customization is available in the \ref RAPIDJSON_ERRORS APIs.
-
- \note These macros should be given on the compiler command-line
- (where applicable) to avoid inconsistent values when compiling
- different translation units of a single application.
- */
-
-#include <cstdlib> // malloc(), realloc(), free(), size_t
-#include <cstring> // memset(), memcpy(), memmove(), memcmp()
-
-///////////////////////////////////////////////////////////////////////////////
-// RAPIDJSON_VERSION_STRING
-//
-// ALWAYS synchronize the following 3 macros with corresponding variables in /CMakeLists.txt.
-//
-
-//!@cond RAPIDJSON_HIDDEN_FROM_DOXYGEN
-// token stringification
-#define RAPIDJSON_STRINGIFY(x) RAPIDJSON_DO_STRINGIFY(x)
-#define RAPIDJSON_DO_STRINGIFY(x) #x
-//!@endcond
-
-/*! \def RAPIDJSON_MAJOR_VERSION
- \ingroup RAPIDJSON_CONFIG
- \brief Major version of RapidJSON in integer.
-*/
-/*! \def RAPIDJSON_MINOR_VERSION
- \ingroup RAPIDJSON_CONFIG
- \brief Minor version of RapidJSON in integer.
-*/
-/*! \def RAPIDJSON_PATCH_VERSION
- \ingroup RAPIDJSON_CONFIG
- \brief Patch version of RapidJSON in integer.
-*/
-/*! \def RAPIDJSON_VERSION_STRING
- \ingroup RAPIDJSON_CONFIG
- \brief Version of RapidJSON in "<major>.<minor>.<patch>" string format.
-*/
-#define RAPIDJSON_MAJOR_VERSION 1
-#define RAPIDJSON_MINOR_VERSION 0
-#define RAPIDJSON_PATCH_VERSION 2
-#define RAPIDJSON_VERSION_STRING \
- RAPIDJSON_STRINGIFY(RAPIDJSON_MAJOR_VERSION.RAPIDJSON_MINOR_VERSION.RAPIDJSON_PATCH_VERSION)
-
-///////////////////////////////////////////////////////////////////////////////
-// RAPIDJSON_NAMESPACE_(BEGIN|END)
-/*! \def RAPIDJSON_NAMESPACE
- \ingroup RAPIDJSON_CONFIG
- \brief provide custom rapidjson namespace
-
- In order to avoid symbol clashes and/or "One Definition Rule" errors
- between multiple inclusions of (different versions of) RapidJSON in
- a single binary, users can customize the name of the main RapidJSON
- namespace.
-
- In case of a single nesting level, defining \c RAPIDJSON_NAMESPACE
- to a custom name (e.g. \c MyRapidJSON) is sufficient. If multiple
- levels are needed, both \ref RAPIDJSON_NAMESPACE_BEGIN and \ref
- RAPIDJSON_NAMESPACE_END need to be defined as well:
-
- \code
- // in some .cpp file
- #define RAPIDJSON_NAMESPACE my::rapidjson
- #define RAPIDJSON_NAMESPACE_BEGIN namespace my { namespace rapidjson {
- #define RAPIDJSON_NAMESPACE_END } }
- #include "rapidjson/..."
- \endcode
-
- \see rapidjson
- */
-/*! \def RAPIDJSON_NAMESPACE_BEGIN
- \ingroup RAPIDJSON_CONFIG
- \brief provide custom rapidjson namespace (opening expression)
- \see RAPIDJSON_NAMESPACE
-*/
-/*! \def RAPIDJSON_NAMESPACE_END
- \ingroup RAPIDJSON_CONFIG
- \brief provide custom rapidjson namespace (closing expression)
- \see RAPIDJSON_NAMESPACE
-*/
-#ifndef RAPIDJSON_NAMESPACE
-#define RAPIDJSON_NAMESPACE rapidjson
-#endif
-#ifndef RAPIDJSON_NAMESPACE_BEGIN
-#define RAPIDJSON_NAMESPACE_BEGIN namespace RAPIDJSON_NAMESPACE {
-#endif
-#ifndef RAPIDJSON_NAMESPACE_END
-#define RAPIDJSON_NAMESPACE_END }
-#endif
-
-///////////////////////////////////////////////////////////////////////////////
-// RAPIDJSON_HAS_STDSTRING
-
-#ifndef RAPIDJSON_HAS_STDSTRING
-#ifdef RAPIDJSON_DOXYGEN_RUNNING
-#define RAPIDJSON_HAS_STDSTRING 1 // force generation of documentation
-#else
-#define RAPIDJSON_HAS_STDSTRING 0 // no std::string support by default
-#endif
-/*! \def RAPIDJSON_HAS_STDSTRING
- \ingroup RAPIDJSON_CONFIG
- \brief Enable RapidJSON support for \c std::string
-
- By defining this preprocessor symbol to \c 1, several convenience functions for using
- \ref rapidjson::GenericValue with \c std::string are enabled, especially
- for construction and comparison.
-
- \hideinitializer
-*/
-#endif // !defined(RAPIDJSON_HAS_STDSTRING)
-
-#if RAPIDJSON_HAS_STDSTRING
-#include <string>
-#endif // RAPIDJSON_HAS_STDSTRING
-
-///////////////////////////////////////////////////////////////////////////////
-// RAPIDJSON_NO_INT64DEFINE
-
-/*! \def RAPIDJSON_NO_INT64DEFINE
- \ingroup RAPIDJSON_CONFIG
- \brief Use external 64-bit integer types.
-
- RapidJSON requires the 64-bit integer types \c int64_t and \c uint64_t types
- to be available at global scope.
-
- If users have their own definition, define RAPIDJSON_NO_INT64DEFINE to
- prevent RapidJSON from defining its own types.
-*/
-#ifndef RAPIDJSON_NO_INT64DEFINE
-//!@cond RAPIDJSON_HIDDEN_FROM_DOXYGEN
-#ifdef _MSC_VER
-#include "msinttypes/stdint.h"
-#include "msinttypes/inttypes.h"
-#else
-// Other compilers should have this.
-#include <stdint.h>
-#include <inttypes.h>
-#endif
-//!@endcond
-#ifdef RAPIDJSON_DOXYGEN_RUNNING
-#define RAPIDJSON_NO_INT64DEFINE
-#endif
-#endif // RAPIDJSON_NO_INT64TYPEDEF
-
-///////////////////////////////////////////////////////////////////////////////
-// RAPIDJSON_FORCEINLINE
-
-#ifndef RAPIDJSON_FORCEINLINE
-//!@cond RAPIDJSON_HIDDEN_FROM_DOXYGEN
-#if defined(_MSC_VER) && defined(NDEBUG)
-#define RAPIDJSON_FORCEINLINE __forceinline
-#elif defined(__GNUC__) && __GNUC__ >= 4 && defined(NDEBUG)
-#define RAPIDJSON_FORCEINLINE __attribute__((always_inline))
-#else
-#define RAPIDJSON_FORCEINLINE
-#endif
-//!@endcond
-#endif // RAPIDJSON_FORCEINLINE
-
-///////////////////////////////////////////////////////////////////////////////
-// RAPIDJSON_ENDIAN
-#define RAPIDJSON_LITTLEENDIAN 0 //!< Little endian machine
-#define RAPIDJSON_BIGENDIAN 1 //!< Big endian machine
-
-//! Endianness of the machine.
-/*!
- \def RAPIDJSON_ENDIAN
- \ingroup RAPIDJSON_CONFIG
-
- GCC 4.6 provided macro for detecting endianness of the target machine. But other
- compilers may not have this. User can define RAPIDJSON_ENDIAN to either
- \ref RAPIDJSON_LITTLEENDIAN or \ref RAPIDJSON_BIGENDIAN.
-
- Default detection implemented with reference to
- \li https://gcc.gnu.org/onlinedocs/gcc-4.6.0/cpp/Common-Predefined-Macros.html
- \li http://www.boost.org/doc/libs/1_42_0/boost/detail/endian.hpp
-*/
-#ifndef RAPIDJSON_ENDIAN
-// Detect with GCC 4.6's macro
-# ifdef __BYTE_ORDER__
-# if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
-# define RAPIDJSON_ENDIAN RAPIDJSON_LITTLEENDIAN
-# elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
-# define RAPIDJSON_ENDIAN RAPIDJSON_BIGENDIAN
-# else
-# error Unknown machine endianess detected. User needs to define RAPIDJSON_ENDIAN.
-# endif // __BYTE_ORDER__
-// Detect with GLIBC's endian.h
-# elif defined(__GLIBC__)
-# include <endian.h>
-# if (__BYTE_ORDER == __LITTLE_ENDIAN)
-# define RAPIDJSON_ENDIAN RAPIDJSON_LITTLEENDIAN
-# elif (__BYTE_ORDER == __BIG_ENDIAN)
-# define RAPIDJSON_ENDIAN RAPIDJSON_BIGENDIAN
-# else
-# error Unknown machine endianess detected. User needs to define RAPIDJSON_ENDIAN.
-# endif // __GLIBC__
-// Detect with _LITTLE_ENDIAN and _BIG_ENDIAN macro
-# elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN)
-# define RAPIDJSON_ENDIAN RAPIDJSON_LITTLEENDIAN
-# elif defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN)
-# define RAPIDJSON_ENDIAN RAPIDJSON_BIGENDIAN
-// Detect with architecture macros
-# elif defined(__sparc) || defined(__sparc__) || defined(_POWER) || defined(__powerpc__) || defined(__ppc__) || defined(__hpux) || defined(__hppa) || defined(_MIPSEB) || defined(_POWER) || defined(__s390__)
-# define RAPIDJSON_ENDIAN RAPIDJSON_BIGENDIAN
-# elif defined(__i386__) || defined(__alpha__) || defined(__ia64) || defined(__ia64__) || defined(_M_IX86) || defined(_M_IA64) || defined(_M_ALPHA) || defined(__amd64) || defined(__amd64__) || defined(_M_AMD64) || defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || defined(__bfin__)
-# define RAPIDJSON_ENDIAN RAPIDJSON_LITTLEENDIAN
-# elif defined(_MSC_VER) && defined(_M_ARM)
-# define RAPIDJSON_ENDIAN RAPIDJSON_LITTLEENDIAN
-# elif defined(RAPIDJSON_DOXYGEN_RUNNING)
-# define RAPIDJSON_ENDIAN
-# else
-# error Unknown machine endianess detected. User needs to define RAPIDJSON_ENDIAN.
-# endif
-#endif // RAPIDJSON_ENDIAN
-
-///////////////////////////////////////////////////////////////////////////////
-// RAPIDJSON_64BIT
-
-//! Whether using 64-bit architecture
-#ifndef RAPIDJSON_64BIT
-#if defined(__LP64__) || defined(_WIN64) || defined(__EMSCRIPTEN__)
-#define RAPIDJSON_64BIT 1
-#else
-#define RAPIDJSON_64BIT 0
-#endif
-#endif // RAPIDJSON_64BIT
-
-///////////////////////////////////////////////////////////////////////////////
-// RAPIDJSON_ALIGN
-
-//! Data alignment of the machine.
-/*! \ingroup RAPIDJSON_CONFIG
- \param x pointer to align
-
- Some machines require strict data alignment. Currently the default uses 4 bytes
- alignment. User can customize by defining the RAPIDJSON_ALIGN function macro.
-*/
-#ifndef RAPIDJSON_ALIGN
-#if RAPIDJSON_64BIT == 1
-#define RAPIDJSON_ALIGN(x) (((x) + static_cast<uint64_t>(7u)) & ~static_cast<uint64_t>(7u))
-#else
-#define RAPIDJSON_ALIGN(x) (((x) + 3u) & ~3u)
-#endif
-#endif
-
-///////////////////////////////////////////////////////////////////////////////
-// RAPIDJSON_UINT64_C2
-
-//! Construct a 64-bit literal by a pair of 32-bit integer.
-/*!
- 64-bit literal with or without ULL suffix is prone to compiler warnings.
- UINT64_C() is C macro which cause compilation problems.
- Use this macro to define 64-bit constants by a pair of 32-bit integer.
-*/
-#ifndef RAPIDJSON_UINT64_C2
-#define RAPIDJSON_UINT64_C2(high32, low32) ((static_cast<uint64_t>(high32) << 32) | static_cast<uint64_t>(low32))
-#endif
-
-///////////////////////////////////////////////////////////////////////////////
-// RAPIDJSON_SSE2/RAPIDJSON_SSE42/RAPIDJSON_SIMD
-
-/*! \def RAPIDJSON_SIMD
- \ingroup RAPIDJSON_CONFIG
- \brief Enable SSE2/SSE4.2 optimization.
-
- RapidJSON supports optimized implementations for some parsing operations
- based on the SSE2 or SSE4.2 SIMD extensions on modern Intel-compatible
- processors.
-
- To enable these optimizations, two different symbols can be defined;
- \code
- // Enable SSE2 optimization.
- #define RAPIDJSON_SSE2
-
- // Enable SSE4.2 optimization.
- #define RAPIDJSON_SSE42
- \endcode
-
- \c RAPIDJSON_SSE42 takes precedence, if both are defined.
-
- If any of these symbols is defined, RapidJSON defines the macro
- \c RAPIDJSON_SIMD to indicate the availability of the optimized code.
-*/
-#if defined(RAPIDJSON_SSE2) || defined(RAPIDJSON_SSE42) \
- || defined(RAPIDJSON_DOXYGEN_RUNNING)
-#define RAPIDJSON_SIMD
-#endif
-
-///////////////////////////////////////////////////////////////////////////////
-// RAPIDJSON_NO_SIZETYPEDEFINE
-
-#ifndef RAPIDJSON_NO_SIZETYPEDEFINE
-/*! \def RAPIDJSON_NO_SIZETYPEDEFINE
- \ingroup RAPIDJSON_CONFIG
- \brief User-provided \c SizeType definition.
-
- In order to avoid using 32-bit size types for indexing strings and arrays,
- define this preprocessor symbol and provide the type rapidjson::SizeType
- before including RapidJSON:
- \code
- #define RAPIDJSON_NO_SIZETYPEDEFINE
- namespace rapidjson { typedef ::std::size_t SizeType; }
- #include "rapidjson/..."
- \endcode
-
- \see rapidjson::SizeType
-*/
-#ifdef RAPIDJSON_DOXYGEN_RUNNING
-#define RAPIDJSON_NO_SIZETYPEDEFINE
-#endif
-RAPIDJSON_NAMESPACE_BEGIN
-//! Size type (for string lengths, array sizes, etc.)
-/*! RapidJSON uses 32-bit array/string indices even on 64-bit platforms,
- instead of using \c size_t. Users may override the SizeType by defining
- \ref RAPIDJSON_NO_SIZETYPEDEFINE.
-*/
-typedef unsigned SizeType;
-RAPIDJSON_NAMESPACE_END
-#endif
-
-// always import std::size_t to rapidjson namespace
-RAPIDJSON_NAMESPACE_BEGIN
-using std::size_t;
-RAPIDJSON_NAMESPACE_END
-
-///////////////////////////////////////////////////////////////////////////////
-// RAPIDJSON_ASSERT
-
-//! Assertion.
-/*! \ingroup RAPIDJSON_CONFIG
- By default, rapidjson uses C \c assert() for internal assertions.
- User can override it by defining RAPIDJSON_ASSERT(x) macro.
-
- \note Parsing errors are handled and can be customized by the
- \ref RAPIDJSON_ERRORS APIs.
-*/
-#ifndef RAPIDJSON_ASSERT
-#include <cassert>
-#define RAPIDJSON_ASSERT(x) assert(x)
-#endif // RAPIDJSON_ASSERT
-
-///////////////////////////////////////////////////////////////////////////////
-// RAPIDJSON_STATIC_ASSERT
-
-// Adopt from boost
-#ifndef RAPIDJSON_STATIC_ASSERT
-#ifndef __clang__
-//!@cond RAPIDJSON_HIDDEN_FROM_DOXYGEN
-#endif
-RAPIDJSON_NAMESPACE_BEGIN
-template <bool x> struct STATIC_ASSERTION_FAILURE;
-template <> struct STATIC_ASSERTION_FAILURE<true> { enum { value = 1 }; };
-template<int x> struct StaticAssertTest {};
-RAPIDJSON_NAMESPACE_END
-
-#define RAPIDJSON_JOIN(X, Y) RAPIDJSON_DO_JOIN(X, Y)
-#define RAPIDJSON_DO_JOIN(X, Y) RAPIDJSON_DO_JOIN2(X, Y)
-#define RAPIDJSON_DO_JOIN2(X, Y) X##Y
-
-#if defined(__GNUC__)
-#define RAPIDJSON_STATIC_ASSERT_UNUSED_ATTRIBUTE __attribute__((unused))
-#else
-#define RAPIDJSON_STATIC_ASSERT_UNUSED_ATTRIBUTE
-#endif
-#ifndef __clang__
-//!@endcond
-#endif
-
-/*! \def RAPIDJSON_STATIC_ASSERT
- \brief (Internal) macro to check for conditions at compile-time
- \param x compile-time condition
- \hideinitializer
- */
-#define RAPIDJSON_STATIC_ASSERT(x) \
- typedef ::RAPIDJSON_NAMESPACE::StaticAssertTest< \
- sizeof(::RAPIDJSON_NAMESPACE::STATIC_ASSERTION_FAILURE<bool(x) >)> \
- RAPIDJSON_JOIN(StaticAssertTypedef, __LINE__) RAPIDJSON_STATIC_ASSERT_UNUSED_ATTRIBUTE
-#endif
-
-///////////////////////////////////////////////////////////////////////////////
-// RAPIDJSON_LIKELY, RAPIDJSON_UNLIKELY
-
-//! Compiler branching hint for expression with high probability to be true.
-/*!
- \ingroup RAPIDJSON_CONFIG
- \param x Boolean expression likely to be true.
-*/
-#ifndef RAPIDJSON_LIKELY
-#if defined(__GNUC__) || defined(__clang__)
-#define RAPIDJSON_LIKELY(x) __builtin_expect(!!(x), 1)
-#else
-#define RAPIDJSON_LIKELY(x) x
-#endif
-#endif
-
-//! Compiler branching hint for expression with low probability to be true.
-/*!
- \ingroup RAPIDJSON_CONFIG
- \param x Boolean expression unlikely to be true.
-*/
-#ifndef RAPIDJSON_UNLIKELY
-#if defined(__GNUC__) || defined(__clang__)
-#define RAPIDJSON_UNLIKELY(x) __builtin_expect(!!(x), 0)
-#else
-#define RAPIDJSON_UNLIKELY(x) x
-#endif
-#endif
-
-///////////////////////////////////////////////////////////////////////////////
-// Helpers
-
-//!@cond RAPIDJSON_HIDDEN_FROM_DOXYGEN
-
-#define RAPIDJSON_MULTILINEMACRO_BEGIN do {
-#define RAPIDJSON_MULTILINEMACRO_END \
-} while((void)0, 0)
-
-// adopted from Boost
-#define RAPIDJSON_VERSION_CODE(x,y,z) \
- (((x)*100000) + ((y)*100) + (z))
-
-///////////////////////////////////////////////////////////////////////////////
-// RAPIDJSON_DIAG_PUSH/POP, RAPIDJSON_DIAG_OFF
-
-#if defined(__GNUC__)
-#define RAPIDJSON_GNUC \
- RAPIDJSON_VERSION_CODE(__GNUC__,__GNUC_MINOR__,__GNUC_PATCHLEVEL__)
-#endif
-
-#if defined(__clang__) || (defined(RAPIDJSON_GNUC) && RAPIDJSON_GNUC >= RAPIDJSON_VERSION_CODE(4,2,0))
-
-#define RAPIDJSON_PRAGMA(x) _Pragma(RAPIDJSON_STRINGIFY(x))
-#define RAPIDJSON_DIAG_PRAGMA(x) RAPIDJSON_PRAGMA(GCC diagnostic x)
-#define RAPIDJSON_DIAG_OFF(x) \
- RAPIDJSON_DIAG_PRAGMA(ignored RAPIDJSON_STRINGIFY(RAPIDJSON_JOIN(-W,x)))
-
-// push/pop support in Clang and GCC>=4.6
-#if defined(__clang__) || (defined(RAPIDJSON_GNUC) && RAPIDJSON_GNUC >= RAPIDJSON_VERSION_CODE(4,6,0))
-#define RAPIDJSON_DIAG_PUSH RAPIDJSON_DIAG_PRAGMA(push)
-#define RAPIDJSON_DIAG_POP RAPIDJSON_DIAG_PRAGMA(pop)
-#else // GCC >= 4.2, < 4.6
-#define RAPIDJSON_DIAG_PUSH /* ignored */
-#define RAPIDJSON_DIAG_POP /* ignored */
-#endif
-
-#elif defined(_MSC_VER)
-
-// pragma (MSVC specific)
-#define RAPIDJSON_PRAGMA(x) __pragma(x)
-#define RAPIDJSON_DIAG_PRAGMA(x) RAPIDJSON_PRAGMA(warning(x))
-
-#define RAPIDJSON_DIAG_OFF(x) RAPIDJSON_DIAG_PRAGMA(disable: x)
-#define RAPIDJSON_DIAG_PUSH RAPIDJSON_DIAG_PRAGMA(push)
-#define RAPIDJSON_DIAG_POP RAPIDJSON_DIAG_PRAGMA(pop)
-
-#else
-
-#define RAPIDJSON_DIAG_OFF(x) /* ignored */
-#define RAPIDJSON_DIAG_PUSH /* ignored */
-#define RAPIDJSON_DIAG_POP /* ignored */
-
-#endif // RAPIDJSON_DIAG_*
-
-///////////////////////////////////////////////////////////////////////////////
-// C++11 features
-
-#ifndef RAPIDJSON_HAS_CXX11_RVALUE_REFS
-#if defined(__clang__)
-#define RAPIDJSON_HAS_CXX11_RVALUE_REFS __has_feature(cxx_rvalue_references) && \
- (defined(_LIBCPP_VERSION) || defined(__GLIBCXX__) && __GLIBCXX__ >= 20080306)
-#elif (defined(RAPIDJSON_GNUC) && (RAPIDJSON_GNUC >= RAPIDJSON_VERSION_CODE(4,3,0)) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || \
- (defined(_MSC_VER) && _MSC_VER >= 1600)
-
-#define RAPIDJSON_HAS_CXX11_RVALUE_REFS 1
-#else
-#define RAPIDJSON_HAS_CXX11_RVALUE_REFS 0
-#endif
-#endif // RAPIDJSON_HAS_CXX11_RVALUE_REFS
-
-#ifndef RAPIDJSON_HAS_CXX11_NOEXCEPT
-#if defined(__clang__)
-#define RAPIDJSON_HAS_CXX11_NOEXCEPT __has_feature(cxx_noexcept)
-#elif (defined(RAPIDJSON_GNUC) && (RAPIDJSON_GNUC >= RAPIDJSON_VERSION_CODE(4,6,0)) && defined(__GXX_EXPERIMENTAL_CXX0X__))
-// (defined(_MSC_VER) && _MSC_VER >= ????) // not yet supported
-#define RAPIDJSON_HAS_CXX11_NOEXCEPT 1
-#else
-#define RAPIDJSON_HAS_CXX11_NOEXCEPT 0
-#endif
-#endif
-#if RAPIDJSON_HAS_CXX11_NOEXCEPT
-#define RAPIDJSON_NOEXCEPT noexcept
-#else
-#define RAPIDJSON_NOEXCEPT /* noexcept */
-#endif // RAPIDJSON_HAS_CXX11_NOEXCEPT
-
-// no automatic detection, yet
-#ifndef RAPIDJSON_HAS_CXX11_TYPETRAITS
-#define RAPIDJSON_HAS_CXX11_TYPETRAITS 0
-#endif
-
-//!@endcond
-
-///////////////////////////////////////////////////////////////////////////////
-// new/delete
-
-#ifndef RAPIDJSON_NEW
-///! customization point for global \c new
-#define RAPIDJSON_NEW(x) new x
-#endif
-#ifndef RAPIDJSON_DELETE
-///! customization point for global \c delete
-#define RAPIDJSON_DELETE(x) delete x
-#endif
-
-///////////////////////////////////////////////////////////////////////////////
-// Type
-
-/*! \namespace rapidjson
- \brief main RapidJSON namespace
- \see RAPIDJSON_NAMESPACE
-*/
-RAPIDJSON_NAMESPACE_BEGIN
-
-//! Type of JSON value
-enum Type {
- kNullType = 0, //!< null
- kFalseType = 1, //!< false
- kTrueType = 2, //!< true
- kObjectType = 3, //!< object
- kArrayType = 4, //!< array
- kStringType = 5, //!< string
- kNumberType = 6 //!< number
-};
-
-RAPIDJSON_NAMESPACE_END
-
-#endif // RAPIDJSON_RAPIDJSON_H_
diff --git a/3rdparty/rapidjson/include/rapidjson/reader.h b/3rdparty/rapidjson/include/rapidjson/reader.h
deleted file mode 100644
index ed6a1e77cc4..00000000000
--- a/3rdparty/rapidjson/include/rapidjson/reader.h
+++ /dev/null
@@ -1,1696 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 RAPIDJSON_READER_H_
-#define RAPIDJSON_READER_H_
-
-/*! \file reader.h */
-
-#include "allocators.h"
-#include "stream.h"
-#include "internal/meta.h"
-#include "internal/stack.h"
-#include "internal/strtod.h"
-
-#if defined(RAPIDJSON_SIMD) && defined(_MSC_VER)
-#include <intrin.h>
-#pragma intrinsic(_BitScanForward)
-#endif
-#ifdef RAPIDJSON_SSE42
-#include <nmmintrin.h>
-#elif defined(RAPIDJSON_SSE2)
-#include <emmintrin.h>
-#endif
-
-#ifdef _MSC_VER
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(4127) // conditional expression is constant
-RAPIDJSON_DIAG_OFF(4702) // unreachable code
-#endif
-
-#ifdef __clang__
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(padded)
-RAPIDJSON_DIAG_OFF(switch-enum)
-#endif
-
-#ifdef __GNUC__
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(effc++)
-#endif
-
-//!@cond RAPIDJSON_HIDDEN_FROM_DOXYGEN
-#define RAPIDJSON_NOTHING /* deliberately empty */
-#ifndef RAPIDJSON_PARSE_ERROR_EARLY_RETURN
-#define RAPIDJSON_PARSE_ERROR_EARLY_RETURN(value) \
- RAPIDJSON_MULTILINEMACRO_BEGIN \
- if (RAPIDJSON_UNLIKELY(HasParseError())) { return value; } \
- RAPIDJSON_MULTILINEMACRO_END
-#endif
-#define RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID \
- RAPIDJSON_PARSE_ERROR_EARLY_RETURN(RAPIDJSON_NOTHING)
-//!@endcond
-
-/*! \def RAPIDJSON_PARSE_ERROR_NORETURN
- \ingroup RAPIDJSON_ERRORS
- \brief Macro to indicate a parse error.
- \param parseErrorCode \ref rapidjson::ParseErrorCode of the error
- \param offset position of the error in JSON input (\c size_t)
-
- This macros can be used as a customization point for the internal
- error handling mechanism of RapidJSON.
-
- A common usage model is to throw an exception instead of requiring the
- caller to explicitly check the \ref rapidjson::GenericReader::Parse's
- return value:
-
- \code
- #define RAPIDJSON_PARSE_ERROR_NORETURN(parseErrorCode,offset) \
- throw ParseException(parseErrorCode, #parseErrorCode, offset)
-
- #include <stdexcept> // std::runtime_error
- #include "rapidjson/error/error.h" // rapidjson::ParseResult
-
- struct ParseException : std::runtime_error, rapidjson::ParseResult {
- ParseException(rapidjson::ParseErrorCode code, const char* msg, size_t offset)
- : std::runtime_error(msg), ParseResult(code, offset) {}
- };
-
- #include "rapidjson/reader.h"
- \endcode
-
- \see RAPIDJSON_PARSE_ERROR, rapidjson::GenericReader::Parse
- */
-#ifndef RAPIDJSON_PARSE_ERROR_NORETURN
-#define RAPIDJSON_PARSE_ERROR_NORETURN(parseErrorCode, offset) \
- RAPIDJSON_MULTILINEMACRO_BEGIN \
- RAPIDJSON_ASSERT(!HasParseError()); /* Error can only be assigned once */ \
- SetParseError(parseErrorCode, offset); \
- RAPIDJSON_MULTILINEMACRO_END
-#endif
-
-/*! \def RAPIDJSON_PARSE_ERROR
- \ingroup RAPIDJSON_ERRORS
- \brief (Internal) macro to indicate and handle a parse error.
- \param parseErrorCode \ref rapidjson::ParseErrorCode of the error
- \param offset position of the error in JSON input (\c size_t)
-
- Invokes RAPIDJSON_PARSE_ERROR_NORETURN and stops the parsing.
-
- \see RAPIDJSON_PARSE_ERROR_NORETURN
- \hideinitializer
- */
-#ifndef RAPIDJSON_PARSE_ERROR
-#define RAPIDJSON_PARSE_ERROR(parseErrorCode, offset) \
- RAPIDJSON_MULTILINEMACRO_BEGIN \
- RAPIDJSON_PARSE_ERROR_NORETURN(parseErrorCode, offset); \
- RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID; \
- RAPIDJSON_MULTILINEMACRO_END
-#endif
-
-#include "error/error.h" // ParseErrorCode, ParseResult
-
-RAPIDJSON_NAMESPACE_BEGIN
-
-///////////////////////////////////////////////////////////////////////////////
-// ParseFlag
-
-/*! \def RAPIDJSON_PARSE_DEFAULT_FLAGS
- \ingroup RAPIDJSON_CONFIG
- \brief User-defined kParseDefaultFlags definition.
-
- User can define this as any \c ParseFlag combinations.
-*/
-#ifndef RAPIDJSON_PARSE_DEFAULT_FLAGS
-#define RAPIDJSON_PARSE_DEFAULT_FLAGS kParseNoFlags
-#endif
-
-//! Combination of parseFlags
-/*! \see Reader::Parse, Document::Parse, Document::ParseInsitu, Document::ParseStream
- */
-enum ParseFlag {
- kParseNoFlags = 0, //!< No flags are set.
- kParseInsituFlag = 1, //!< In-situ(destructive) parsing.
- kParseValidateEncodingFlag = 2, //!< Validate encoding of JSON strings.
- kParseIterativeFlag = 4, //!< Iterative(constant complexity in terms of function call stack size) parsing.
- kParseStopWhenDoneFlag = 8, //!< After parsing a complete JSON root from stream, stop further processing the rest of stream. When this flag is used, parser will not generate kParseErrorDocumentRootNotSingular error.
- kParseFullPrecisionFlag = 16, //!< Parse number in full precision (but slower).
- kParseCommentsFlag = 32, //!< Allow one-line (//) and multi-line (/**/) comments.
- kParseDefaultFlags = RAPIDJSON_PARSE_DEFAULT_FLAGS //!< Default parse flags. Can be customized by defining RAPIDJSON_PARSE_DEFAULT_FLAGS
-};
-
-///////////////////////////////////////////////////////////////////////////////
-// Handler
-
-/*! \class rapidjson::Handler
- \brief Concept for receiving events from GenericReader upon parsing.
- The functions return true if no error occurs. If they return false,
- the event publisher should terminate the process.
-\code
-concept Handler {
- typename Ch;
-
- bool Null();
- bool Bool(bool b);
- bool Int(int i);
- bool Uint(unsigned i);
- bool Int64(int64_t i);
- bool Uint64(uint64_t i);
- bool Double(double d);
- bool String(const Ch* str, SizeType length, bool copy);
- bool StartObject();
- bool Key(const Ch* str, SizeType length, bool copy);
- bool EndObject(SizeType memberCount);
- bool StartArray();
- bool EndArray(SizeType elementCount);
-};
-\endcode
-*/
-///////////////////////////////////////////////////////////////////////////////
-// BaseReaderHandler
-
-//! Default implementation of Handler.
-/*! This can be used as base class of any reader handler.
- \note implements Handler concept
-*/
-template<typename Encoding = UTF8<>, typename Derived = void>
-struct BaseReaderHandler {
- typedef typename Encoding::Ch Ch;
-
- typedef typename internal::SelectIf<internal::IsSame<Derived, void>, BaseReaderHandler, Derived>::Type Override;
-
- bool Default() { return true; }
- bool Null() { return static_cast<Override&>(*this).Default(); }
- bool Bool(bool) { return static_cast<Override&>(*this).Default(); }
- bool Int(int) { return static_cast<Override&>(*this).Default(); }
- bool Uint(unsigned) { return static_cast<Override&>(*this).Default(); }
- bool Int64(int64_t) { return static_cast<Override&>(*this).Default(); }
- bool Uint64(uint64_t) { return static_cast<Override&>(*this).Default(); }
- bool Double(double) { return static_cast<Override&>(*this).Default(); }
- bool String(const Ch*, SizeType, bool) { return static_cast<Override&>(*this).Default(); }
- bool StartObject() { return static_cast<Override&>(*this).Default(); }
- bool Key(const Ch* str, SizeType len, bool copy) { return static_cast<Override&>(*this).String(str, len, copy); }
- bool EndObject(SizeType) { return static_cast<Override&>(*this).Default(); }
- bool StartArray() { return static_cast<Override&>(*this).Default(); }
- bool EndArray(SizeType) { return static_cast<Override&>(*this).Default(); }
-};
-
-///////////////////////////////////////////////////////////////////////////////
-// StreamLocalCopy
-
-namespace internal {
-
-template<typename Stream, int = StreamTraits<Stream>::copyOptimization>
-class StreamLocalCopy;
-
-//! Do copy optimization.
-template<typename Stream>
-class StreamLocalCopy<Stream, 1> {
-public:
- StreamLocalCopy(Stream& original) : s(original), original_(original) {}
- ~StreamLocalCopy() { original_ = s; }
-
- Stream s;
-
-private:
- StreamLocalCopy& operator=(const StreamLocalCopy&) /* = delete */;
-
- Stream& original_;
-};
-
-//! Keep reference.
-template<typename Stream>
-class StreamLocalCopy<Stream, 0> {
-public:
- StreamLocalCopy(Stream& original) : s(original) {}
-
- Stream& s;
-
-private:
- StreamLocalCopy& operator=(const StreamLocalCopy&) /* = delete */;
-};
-
-} // namespace internal
-
-///////////////////////////////////////////////////////////////////////////////
-// SkipWhitespace
-
-//! Skip the JSON white spaces in a stream.
-/*! \param is A input stream for skipping white spaces.
- \note This function has SSE2/SSE4.2 specialization.
-*/
-template<typename InputStream>
-void SkipWhitespace(InputStream& is) {
- internal::StreamLocalCopy<InputStream> copy(is);
- InputStream& s(copy.s);
-
- while (s.Peek() == ' ' || s.Peek() == '\n' || s.Peek() == '\r' || s.Peek() == '\t')
- s.Take();
-}
-
-#ifdef RAPIDJSON_SSE42
-//! Skip whitespace with SSE 4.2 pcmpistrm instruction, testing 16 8-byte characters at once.
-inline const char *SkipWhitespace_SIMD(const char* p) {
- // Fast return for single non-whitespace
- if (*p == ' ' || *p == '\n' || *p == '\r' || *p == '\t')
- ++p;
- else
- return p;
-
- // 16-byte align to the next boundary
- const char* nextAligned = reinterpret_cast<const char*>((reinterpret_cast<size_t>(p) + 15) & static_cast<size_t>(~15));
- while (p != nextAligned)
- if (*p == ' ' || *p == '\n' || *p == '\r' || *p == '\t')
- ++p;
- else
- return p;
-
- // The rest of string using SIMD
- static const char whitespace[16] = " \n\r\t";
- const __m128i w = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&whitespace[0]));
-
- for (;; p += 16) {
- const __m128i s = _mm_load_si128(reinterpret_cast<const __m128i *>(p));
- const int r = _mm_cvtsi128_si32(_mm_cmpistrm(w, s, _SIDD_UBYTE_OPS | _SIDD_CMP_EQUAL_ANY | _SIDD_BIT_MASK | _SIDD_NEGATIVE_POLARITY));
- if (r != 0) { // some of characters is non-whitespace
-#ifdef _MSC_VER // Find the index of first non-whitespace
- unsigned long offset;
- _BitScanForward(&offset, r);
- return p + offset;
-#else
- return p + __builtin_ffs(r) - 1;
-#endif
- }
- }
-}
-
-#elif defined(RAPIDJSON_SSE2)
-
-//! Skip whitespace with SSE2 instructions, testing 16 8-byte characters at once.
-inline const char *SkipWhitespace_SIMD(const char* p) {
- // Fast return for single non-whitespace
- if (*p == ' ' || *p == '\n' || *p == '\r' || *p == '\t')
- ++p;
- else
- return p;
-
- // 16-byte align to the next boundary
- const char* nextAligned = reinterpret_cast<const char*>((reinterpret_cast<size_t>(p) + 15) & static_cast<size_t>(~15));
- while (p != nextAligned)
- if (*p == ' ' || *p == '\n' || *p == '\r' || *p == '\t')
- ++p;
- else
- return p;
-
- // The rest of string
- #define C16(c) { c, c, c, c, c, c, c, c, c, c, c, c, c, c, c, c }
- static const char whitespaces[4][16] = { C16(' '), C16('\n'), C16('\r'), C16('\t') };
- #undef C16
-
- const __m128i w0 = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&whitespaces[0][0]));
- const __m128i w1 = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&whitespaces[1][0]));
- const __m128i w2 = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&whitespaces[2][0]));
- const __m128i w3 = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&whitespaces[3][0]));
-
- for (;; p += 16) {
- const __m128i s = _mm_load_si128(reinterpret_cast<const __m128i *>(p));
- __m128i x = _mm_cmpeq_epi8(s, w0);
- x = _mm_or_si128(x, _mm_cmpeq_epi8(s, w1));
- x = _mm_or_si128(x, _mm_cmpeq_epi8(s, w2));
- x = _mm_or_si128(x, _mm_cmpeq_epi8(s, w3));
- unsigned short r = static_cast<unsigned short>(~_mm_movemask_epi8(x));
- if (r != 0) { // some of characters may be non-whitespace
-#ifdef _MSC_VER // Find the index of first non-whitespace
- unsigned long offset;
- _BitScanForward(&offset, r);
- return p + offset;
-#else
- return p + __builtin_ffs(r) - 1;
-#endif
- }
- }
-}
-
-#endif // RAPIDJSON_SSE2
-
-#ifdef RAPIDJSON_SIMD
-//! Template function specialization for InsituStringStream
-template<> inline void SkipWhitespace(InsituStringStream& is) {
- is.src_ = const_cast<char*>(SkipWhitespace_SIMD(is.src_));
-}
-
-//! Template function specialization for StringStream
-template<> inline void SkipWhitespace(StringStream& is) {
- is.src_ = SkipWhitespace_SIMD(is.src_);
-}
-#endif // RAPIDJSON_SIMD
-
-///////////////////////////////////////////////////////////////////////////////
-// GenericReader
-
-//! SAX-style JSON parser. Use \ref Reader for UTF8 encoding and default allocator.
-/*! GenericReader parses JSON text from a stream, and send events synchronously to an
- object implementing Handler concept.
-
- It needs to allocate a stack for storing a single decoded string during
- non-destructive parsing.
-
- For in-situ parsing, the decoded string is directly written to the source
- text string, no temporary buffer is required.
-
- A GenericReader object can be reused for parsing multiple JSON text.
-
- \tparam SourceEncoding Encoding of the input stream.
- \tparam TargetEncoding Encoding of the parse output.
- \tparam StackAllocator Allocator type for stack.
-*/
-template <typename SourceEncoding, typename TargetEncoding, typename StackAllocator = CrtAllocator>
-class GenericReader {
-public:
- typedef typename SourceEncoding::Ch Ch; //!< SourceEncoding character type
-
- //! Constructor.
- /*! \param stackAllocator Optional allocator for allocating stack memory. (Only use for non-destructive parsing)
- \param stackCapacity stack capacity in bytes for storing a single decoded string. (Only use for non-destructive parsing)
- */
- GenericReader(StackAllocator* stackAllocator = 0, size_t stackCapacity = kDefaultStackCapacity) : stack_(stackAllocator, stackCapacity), parseResult_() {}
-
- //! Parse JSON text.
- /*! \tparam parseFlags Combination of \ref ParseFlag.
- \tparam InputStream Type of input stream, implementing Stream concept.
- \tparam Handler Type of handler, implementing Handler concept.
- \param is Input stream to be parsed.
- \param handler The handler to receive events.
- \return Whether the parsing is successful.
- */
- template <unsigned parseFlags, typename InputStream, typename Handler>
- ParseResult Parse(InputStream& is, Handler& handler) {
- if (parseFlags & kParseIterativeFlag)
- return IterativeParse<parseFlags>(is, handler);
-
- parseResult_.Clear();
-
- ClearStackOnExit scope(*this);
-
- SkipWhitespaceAndComments<parseFlags>(is);
- RAPIDJSON_PARSE_ERROR_EARLY_RETURN(parseResult_);
-
- if (RAPIDJSON_UNLIKELY(is.Peek() == '\0')) {
- RAPIDJSON_PARSE_ERROR_NORETURN(kParseErrorDocumentEmpty, is.Tell());
- RAPIDJSON_PARSE_ERROR_EARLY_RETURN(parseResult_);
- }
- else {
- ParseValue<parseFlags>(is, handler);
- RAPIDJSON_PARSE_ERROR_EARLY_RETURN(parseResult_);
-
- if (!(parseFlags & kParseStopWhenDoneFlag)) {
- SkipWhitespaceAndComments<parseFlags>(is);
- RAPIDJSON_PARSE_ERROR_EARLY_RETURN(parseResult_);
-
- if (RAPIDJSON_UNLIKELY(is.Peek() != '\0')) {
- RAPIDJSON_PARSE_ERROR_NORETURN(kParseErrorDocumentRootNotSingular, is.Tell());
- RAPIDJSON_PARSE_ERROR_EARLY_RETURN(parseResult_);
- }
- }
- }
-
- return parseResult_;
- }
-
- //! Parse JSON text (with \ref kParseDefaultFlags)
- /*! \tparam InputStream Type of input stream, implementing Stream concept
- \tparam Handler Type of handler, implementing Handler concept.
- \param is Input stream to be parsed.
- \param handler The handler to receive events.
- \return Whether the parsing is successful.
- */
- template <typename InputStream, typename Handler>
- ParseResult Parse(InputStream& is, Handler& handler) {
- return Parse<kParseDefaultFlags>(is, handler);
- }
-
- //! Whether a parse error has occured in the last parsing.
- bool HasParseError() const { return parseResult_.IsError(); }
-
- //! Get the \ref ParseErrorCode of last parsing.
- ParseErrorCode GetParseErrorCode() const { return parseResult_.Code(); }
-
- //! Get the position of last parsing error in input, 0 otherwise.
- size_t GetErrorOffset() const { return parseResult_.Offset(); }
-
-protected:
- void SetParseError(ParseErrorCode code, size_t offset) { parseResult_.Set(code, offset); }
-
-private:
- // Prohibit copy constructor & assignment operator.
- GenericReader(const GenericReader&);
- GenericReader& operator=(const GenericReader&);
-
- void ClearStack() { stack_.Clear(); }
-
- // clear stack on any exit from ParseStream, e.g. due to exception
- struct ClearStackOnExit {
- explicit ClearStackOnExit(GenericReader& r) : r_(r) {}
- ~ClearStackOnExit() { r_.ClearStack(); }
- private:
- GenericReader& r_;
- ClearStackOnExit(const ClearStackOnExit&);
- ClearStackOnExit& operator=(const ClearStackOnExit&);
- };
-
- template<unsigned parseFlags, typename InputStream>
- void SkipWhitespaceAndComments(InputStream& is) {
- SkipWhitespace(is);
-
- if (parseFlags & kParseCommentsFlag) {
- while (RAPIDJSON_UNLIKELY(Consume(is, '/'))) {
- if (Consume(is, '*')) {
- while (true) {
- if (RAPIDJSON_UNLIKELY(is.Peek() == '\0'))
- RAPIDJSON_PARSE_ERROR(kParseErrorUnspecificSyntaxError, is.Tell());
- else if (Consume(is, '*')) {
- if (Consume(is, '/'))
- break;
- }
- else
- is.Take();
- }
- }
- else if (RAPIDJSON_LIKELY(Consume(is, '/')))
- while (is.Peek() != '\0' && is.Take() != '\n');
- else
- RAPIDJSON_PARSE_ERROR(kParseErrorUnspecificSyntaxError, is.Tell());
-
- SkipWhitespace(is);
- }
- }
- }
-
- // Parse object: { string : value, ... }
- template<unsigned parseFlags, typename InputStream, typename Handler>
- void ParseObject(InputStream& is, Handler& handler) {
- RAPIDJSON_ASSERT(is.Peek() == '{');
- is.Take(); // Skip '{'
-
- if (RAPIDJSON_UNLIKELY(!handler.StartObject()))
- RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell());
-
- SkipWhitespaceAndComments<parseFlags>(is);
- RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;
-
- if (Consume(is, '}')) {
- if (RAPIDJSON_UNLIKELY(!handler.EndObject(0))) // empty object
- RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell());
- return;
- }
-
- for (SizeType memberCount = 0;;) {
- if (RAPIDJSON_UNLIKELY(is.Peek() != '"'))
- RAPIDJSON_PARSE_ERROR(kParseErrorObjectMissName, is.Tell());
-
- ParseString<parseFlags>(is, handler, true);
- RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;
-
- SkipWhitespaceAndComments<parseFlags>(is);
- RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;
-
- if (RAPIDJSON_UNLIKELY(!Consume(is, ':')))
- RAPIDJSON_PARSE_ERROR(kParseErrorObjectMissColon, is.Tell());
-
- SkipWhitespaceAndComments<parseFlags>(is);
- RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;
-
- ParseValue<parseFlags>(is, handler);
- RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;
-
- SkipWhitespaceAndComments<parseFlags>(is);
- RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;
-
- ++memberCount;
-
- switch (is.Peek()) {
- case ',':
- is.Take();
- SkipWhitespaceAndComments<parseFlags>(is);
- RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;
- break;
- case '}':
- is.Take();
- if (RAPIDJSON_UNLIKELY(!handler.EndObject(memberCount)))
- RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell());
- return;
- default:
- RAPIDJSON_PARSE_ERROR(kParseErrorObjectMissCommaOrCurlyBracket, is.Tell());
- break;
- }
- }
- }
-
- // Parse array: [ value, ... ]
- template<unsigned parseFlags, typename InputStream, typename Handler>
- void ParseArray(InputStream& is, Handler& handler) {
- RAPIDJSON_ASSERT(is.Peek() == '[');
- is.Take(); // Skip '['
-
- if (RAPIDJSON_UNLIKELY(!handler.StartArray()))
- RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell());
-
- SkipWhitespaceAndComments<parseFlags>(is);
- RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;
-
- if (Consume(is, ']')) {
- if (RAPIDJSON_UNLIKELY(!handler.EndArray(0))) // empty array
- RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell());
- return;
- }
-
- for (SizeType elementCount = 0;;) {
- ParseValue<parseFlags>(is, handler);
- RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;
-
- ++elementCount;
- SkipWhitespaceAndComments<parseFlags>(is);
- RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;
-
- if (Consume(is, ',')) {
- SkipWhitespaceAndComments<parseFlags>(is);
- RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;
- }
- else if (Consume(is, ']')) {
- if (RAPIDJSON_UNLIKELY(!handler.EndArray(elementCount)))
- RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell());
- return;
- }
- else
- RAPIDJSON_PARSE_ERROR(kParseErrorArrayMissCommaOrSquareBracket, is.Tell());
- }
- }
-
- template<unsigned parseFlags, typename InputStream, typename Handler>
- void ParseNull(InputStream& is, Handler& handler) {
- RAPIDJSON_ASSERT(is.Peek() == 'n');
- is.Take();
-
- if (RAPIDJSON_LIKELY(Consume(is, 'u') && Consume(is, 'l') && Consume(is, 'l'))) {
- if (RAPIDJSON_UNLIKELY(!handler.Null()))
- RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell());
- }
- else
- RAPIDJSON_PARSE_ERROR(kParseErrorValueInvalid, is.Tell());
- }
-
- template<unsigned parseFlags, typename InputStream, typename Handler>
- void ParseTrue(InputStream& is, Handler& handler) {
- RAPIDJSON_ASSERT(is.Peek() == 't');
- is.Take();
-
- if (RAPIDJSON_LIKELY(Consume(is, 'r') && Consume(is, 'u') && Consume(is, 'e'))) {
- if (RAPIDJSON_UNLIKELY(!handler.Bool(true)))
- RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell());
- }
- else
- RAPIDJSON_PARSE_ERROR(kParseErrorValueInvalid, is.Tell());
- }
-
- template<unsigned parseFlags, typename InputStream, typename Handler>
- void ParseFalse(InputStream& is, Handler& handler) {
- RAPIDJSON_ASSERT(is.Peek() == 'f');
- is.Take();
-
- if (RAPIDJSON_LIKELY(Consume(is, 'a') && Consume(is, 'l') && Consume(is, 's') && Consume(is, 'e'))) {
- if (RAPIDJSON_UNLIKELY(!handler.Bool(false)))
- RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell());
- }
- else
- RAPIDJSON_PARSE_ERROR(kParseErrorValueInvalid, is.Tell());
- }
-
- template<typename InputStream>
- RAPIDJSON_FORCEINLINE static bool Consume(InputStream& is, typename InputStream::Ch expect) {
- if (RAPIDJSON_LIKELY(is.Peek() == expect)) {
- is.Take();
- return true;
- }
- else
- return false;
- }
-
- // Helper function to parse four hexidecimal digits in \uXXXX in ParseString().
- template<typename InputStream>
- unsigned ParseHex4(InputStream& is, size_t escapeOffset) {
- unsigned codepoint = 0;
- for (int i = 0; i < 4; i++) {
- Ch c = is.Peek();
- codepoint <<= 4;
- codepoint += static_cast<unsigned>(c);
- if (c >= '0' && c <= '9')
- codepoint -= '0';
- else if (c >= 'A' && c <= 'F')
- codepoint -= 'A' - 10;
- else if (c >= 'a' && c <= 'f')
- codepoint -= 'a' - 10;
- else {
- RAPIDJSON_PARSE_ERROR_NORETURN(kParseErrorStringUnicodeEscapeInvalidHex, escapeOffset);
- RAPIDJSON_PARSE_ERROR_EARLY_RETURN(0);
- }
- is.Take();
- }
- return codepoint;
- }
-
- template <typename CharType>
- class StackStream {
- public:
- typedef CharType Ch;
-
- StackStream(internal::Stack<StackAllocator>& stack) : stack_(stack), length_(0) {}
- RAPIDJSON_FORCEINLINE void Put(Ch c) {
- *stack_.template Push<Ch>() = c;
- ++length_;
- }
-
- RAPIDJSON_FORCEINLINE void* Push(SizeType count) {
- length_ += count;
- return stack_.template Push<Ch>(count);
- }
-
- size_t Length() const { return length_; }
-
- Ch* Pop() {
- return stack_.template Pop<Ch>(length_);
- }
-
- private:
- StackStream(const StackStream&);
- StackStream& operator=(const StackStream&);
-
- internal::Stack<StackAllocator>& stack_;
- SizeType length_;
- };
-
- // Parse string and generate String event. Different code paths for kParseInsituFlag.
- template<unsigned parseFlags, typename InputStream, typename Handler>
- void ParseString(InputStream& is, Handler& handler, bool isKey = false) {
- internal::StreamLocalCopy<InputStream> copy(is);
- InputStream& s(copy.s);
-
- RAPIDJSON_ASSERT(s.Peek() == '\"');
- s.Take(); // Skip '\"'
-
- bool success = false;
- if (parseFlags & kParseInsituFlag) {
- typename InputStream::Ch *head = s.PutBegin();
- ParseStringToStream<parseFlags, SourceEncoding, SourceEncoding>(s, s);
- RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;
- size_t length = s.PutEnd(head) - 1;
- RAPIDJSON_ASSERT(length <= 0xFFFFFFFF);
- const typename TargetEncoding::Ch* const str = reinterpret_cast<typename TargetEncoding::Ch*>(head);
- success = (isKey ? handler.Key(str, SizeType(length), false) : handler.String(str, SizeType(length), false));
- }
- else {
- StackStream<typename TargetEncoding::Ch> stackStream(stack_);
- ParseStringToStream<parseFlags, SourceEncoding, TargetEncoding>(s, stackStream);
- RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;
- SizeType length = static_cast<SizeType>(stackStream.Length()) - 1;
- const typename TargetEncoding::Ch* const str = stackStream.Pop();
- success = (isKey ? handler.Key(str, length, true) : handler.String(str, length, true));
- }
- if (RAPIDJSON_UNLIKELY(!success))
- RAPIDJSON_PARSE_ERROR(kParseErrorTermination, s.Tell());
- }
-
- // Parse string to an output is
- // This function handles the prefix/suffix double quotes, escaping, and optional encoding validation.
- template<unsigned parseFlags, typename SEncoding, typename TEncoding, typename InputStream, typename OutputStream>
- RAPIDJSON_FORCEINLINE void ParseStringToStream(InputStream& is, OutputStream& os) {
-//!@cond RAPIDJSON_HIDDEN_FROM_DOXYGEN
-#define Z16 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
- static const char escape[256] = {
- Z16, Z16, 0, 0,'\"', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,'/',
- Z16, Z16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,'\\', 0, 0, 0,
- 0, 0,'\b', 0, 0, 0,'\f', 0, 0, 0, 0, 0, 0, 0,'\n', 0,
- 0, 0,'\r', 0,'\t', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- Z16, Z16, Z16, Z16, Z16, Z16, Z16, Z16
- };
-#undef Z16
-//!@endcond
-
- for (;;) {
- // Scan and copy string before "\\\"" or < 0x20. This is an optional optimzation.
- if (!(parseFlags & kParseValidateEncodingFlag))
- ScanCopyUnescapedString(is, os);
-
- Ch c = is.Peek();
- if (RAPIDJSON_UNLIKELY(c == '\\')) { // Escape
- size_t escapeOffset = is.Tell(); // For invalid escaping, report the inital '\\' as error offset
- is.Take();
- Ch e = is.Peek();
- if ((sizeof(Ch) == 1 || unsigned(e) < 256) && RAPIDJSON_LIKELY(escape[static_cast<unsigned char>(e)])) {
- is.Take();
- os.Put(static_cast<typename TEncoding::Ch>(escape[static_cast<unsigned char>(e)]));
- }
- else if (RAPIDJSON_LIKELY(e == 'u')) { // Unicode
- is.Take();
- unsigned codepoint = ParseHex4(is, escapeOffset);
- RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;
- if (RAPIDJSON_UNLIKELY(codepoint >= 0xD800 && codepoint <= 0xDBFF)) {
- // Handle UTF-16 surrogate pair
- if (RAPIDJSON_UNLIKELY(!Consume(is, '\\') || !Consume(is, 'u')))
- RAPIDJSON_PARSE_ERROR(kParseErrorStringUnicodeSurrogateInvalid, escapeOffset);
- unsigned codepoint2 = ParseHex4(is, escapeOffset);
- RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;
- if (RAPIDJSON_UNLIKELY(codepoint2 < 0xDC00 || codepoint2 > 0xDFFF))
- RAPIDJSON_PARSE_ERROR(kParseErrorStringUnicodeSurrogateInvalid, escapeOffset);
- codepoint = (((codepoint - 0xD800) << 10) | (codepoint2 - 0xDC00)) + 0x10000;
- }
- TEncoding::Encode(os, codepoint);
- }
- else
- RAPIDJSON_PARSE_ERROR(kParseErrorStringEscapeInvalid, escapeOffset);
- }
- else if (RAPIDJSON_UNLIKELY(c == '"')) { // Closing double quote
- is.Take();
- os.Put('\0'); // null-terminate the string
- return;
- }
- else if (RAPIDJSON_UNLIKELY(static_cast<unsigned>(c) < 0x20)) { // RFC 4627: unescaped = %x20-21 / %x23-5B / %x5D-10FFFF
- if (c == '\0')
- RAPIDJSON_PARSE_ERROR(kParseErrorStringMissQuotationMark, is.Tell());
- else
- RAPIDJSON_PARSE_ERROR(kParseErrorStringEscapeInvalid, is.Tell());
- }
- else {
- size_t offset = is.Tell();
- if (RAPIDJSON_UNLIKELY((parseFlags & kParseValidateEncodingFlag ?
- !Transcoder<SEncoding, TEncoding>::Validate(is, os) :
- !Transcoder<SEncoding, TEncoding>::Transcode(is, os))))
- RAPIDJSON_PARSE_ERROR(kParseErrorStringInvalidEncoding, offset);
- }
- }
- }
-
- template<typename InputStream, typename OutputStream>
- static RAPIDJSON_FORCEINLINE void ScanCopyUnescapedString(InputStream&, OutputStream&) {
- // Do nothing for generic version
- }
-
-#if defined(RAPIDJSON_SSE2) || defined(RAPIDJSON_SSE42)
- // StringStream -> StackStream<char>
- static RAPIDJSON_FORCEINLINE void ScanCopyUnescapedString(StringStream& is, StackStream<char>& os) {
- const char* p = is.src_;
-
- // Scan one by one until alignment (unaligned load may cross page boundary and cause crash)
- const char* nextAligned = reinterpret_cast<const char*>((reinterpret_cast<size_t>(p) + 15) & static_cast<size_t>(~15));
- while (p != nextAligned)
- if (RAPIDJSON_UNLIKELY(*p == '\"') || RAPIDJSON_UNLIKELY(*p == '\\') || RAPIDJSON_UNLIKELY(static_cast<unsigned>(*p) < 0x20)) {
- is.src_ = p;
- return;
- }
- else
- os.Put(*p++);
-
- // The rest of string using SIMD
- static const char dquote[16] = { '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"' };
- static const char bslash[16] = { '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\' };
- static const char space[16] = { 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19 };
- const __m128i dq = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&dquote[0]));
- const __m128i bs = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&bslash[0]));
- const __m128i sp = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&space[0]));
-
- for (;; p += 16) {
- const __m128i s = _mm_load_si128(reinterpret_cast<const __m128i *>(p));
- const __m128i t1 = _mm_cmpeq_epi8(s, dq);
- const __m128i t2 = _mm_cmpeq_epi8(s, bs);
- const __m128i t3 = _mm_cmpeq_epi8(_mm_max_epu8(s, sp), sp); // s < 0x20 <=> max(s, 0x19) == 0x19
- const __m128i x = _mm_or_si128(_mm_or_si128(t1, t2), t3);
- unsigned short r = static_cast<unsigned short>(_mm_movemask_epi8(x));
- if (RAPIDJSON_UNLIKELY(r != 0)) { // some of characters is escaped
- SizeType length;
- #ifdef _MSC_VER // Find the index of first escaped
- unsigned long offset;
- _BitScanForward(&offset, r);
- length = offset;
- #else
- length = static_cast<SizeType>(__builtin_ffs(r) - 1);
- #endif
- char* q = reinterpret_cast<char*>(os.Push(length));
- for (size_t i = 0; i < length; i++)
- q[i] = p[i];
-
- p += length;
- break;
- }
- _mm_storeu_si128(reinterpret_cast<__m128i *>(os.Push(16)), s);
- }
-
- is.src_ = p;
- }
-
- // InsituStringStream -> InsituStringStream
- static RAPIDJSON_FORCEINLINE void ScanCopyUnescapedString(InsituStringStream& is, InsituStringStream& os) {
- RAPIDJSON_ASSERT(&is == &os);
- (void)os;
-
- if (is.src_ == is.dst_) {
- SkipUnescapedString(is);
- return;
- }
-
- char* p = is.src_;
- char *q = is.dst_;
-
- // Scan one by one until alignment (unaligned load may cross page boundary and cause crash)
- const char* nextAligned = reinterpret_cast<const char*>((reinterpret_cast<size_t>(p) + 15) & static_cast<size_t>(~15));
- while (p != nextAligned)
- if (RAPIDJSON_UNLIKELY(*p == '\"') || RAPIDJSON_UNLIKELY(*p == '\\') || RAPIDJSON_UNLIKELY(static_cast<unsigned>(*p) < 0x20)) {
- is.src_ = p;
- is.dst_ = q;
- return;
- }
- else
- *q++ = *p++;
-
- // The rest of string using SIMD
- static const char dquote[16] = { '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"' };
- static const char bslash[16] = { '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\' };
- static const char space[16] = { 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19 };
- const __m128i dq = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&dquote[0]));
- const __m128i bs = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&bslash[0]));
- const __m128i sp = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&space[0]));
-
- for (;; p += 16, q += 16) {
- const __m128i s = _mm_load_si128(reinterpret_cast<const __m128i *>(p));
- const __m128i t1 = _mm_cmpeq_epi8(s, dq);
- const __m128i t2 = _mm_cmpeq_epi8(s, bs);
- const __m128i t3 = _mm_cmpeq_epi8(_mm_max_epu8(s, sp), sp); // s < 0x20 <=> max(s, 0x19) == 0x19
- const __m128i x = _mm_or_si128(_mm_or_si128(t1, t2), t3);
- unsigned short r = static_cast<unsigned short>(_mm_movemask_epi8(x));
- if (RAPIDJSON_UNLIKELY(r != 0)) { // some of characters is escaped
- size_t length;
-#ifdef _MSC_VER // Find the index of first escaped
- unsigned long offset;
- _BitScanForward(&offset, r);
- length = offset;
-#else
- length = static_cast<size_t>(__builtin_ffs(r) - 1);
-#endif
- for (const char* pend = p + length; p != pend; )
- *q++ = *p++;
- break;
- }
- _mm_storeu_si128(reinterpret_cast<__m128i *>(q), s);
- }
-
- is.src_ = p;
- is.dst_ = q;
- }
-
- // When read/write pointers are the same for insitu stream, just skip unescaped characters
- static RAPIDJSON_FORCEINLINE void SkipUnescapedString(InsituStringStream& is) {
- RAPIDJSON_ASSERT(is.src_ == is.dst_);
- char* p = is.src_;
-
- // Scan one by one until alignment (unaligned load may cross page boundary and cause crash)
- const char* nextAligned = reinterpret_cast<const char*>((reinterpret_cast<size_t>(p) + 15) & static_cast<size_t>(~15));
- for (; p != nextAligned; p++)
- if (RAPIDJSON_UNLIKELY(*p == '\"') || RAPIDJSON_UNLIKELY(*p == '\\') || RAPIDJSON_UNLIKELY(static_cast<unsigned>(*p) < 0x20)) {
- is.src_ = is.dst_ = p;
- return;
- }
-
- // The rest of string using SIMD
- static const char dquote[16] = { '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"' };
- static const char bslash[16] = { '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\' };
- static const char space[16] = { 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19 };
- const __m128i dq = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&dquote[0]));
- const __m128i bs = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&bslash[0]));
- const __m128i sp = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&space[0]));
-
- for (;; p += 16) {
- const __m128i s = _mm_load_si128(reinterpret_cast<const __m128i *>(p));
- const __m128i t1 = _mm_cmpeq_epi8(s, dq);
- const __m128i t2 = _mm_cmpeq_epi8(s, bs);
- const __m128i t3 = _mm_cmpeq_epi8(_mm_max_epu8(s, sp), sp); // s < 0x20 <=> max(s, 0x19) == 0x19
- const __m128i x = _mm_or_si128(_mm_or_si128(t1, t2), t3);
- unsigned short r = static_cast<unsigned short>(_mm_movemask_epi8(x));
- if (RAPIDJSON_UNLIKELY(r != 0)) { // some of characters is escaped
- size_t length;
-#ifdef _MSC_VER // Find the index of first escaped
- unsigned long offset;
- _BitScanForward(&offset, r);
- length = offset;
-#else
- length = static_cast<size_t>(__builtin_ffs(r) - 1);
-#endif
- p += length;
- break;
- }
- }
-
- is.src_ = is.dst_ = p;
- }
-#endif
-
- template<typename InputStream, bool backup>
- class NumberStream;
-
- template<typename InputStream>
- class NumberStream<InputStream, false> {
- public:
- typedef typename InputStream::Ch Ch;
-
- NumberStream(GenericReader& reader, InputStream& s) : is(s) { (void)reader; }
- ~NumberStream() {}
-
- RAPIDJSON_FORCEINLINE Ch Peek() const { return is.Peek(); }
- RAPIDJSON_FORCEINLINE Ch TakePush() { return is.Take(); }
- RAPIDJSON_FORCEINLINE Ch Take() { return is.Take(); }
- size_t Tell() { return is.Tell(); }
- size_t Length() { return 0; }
- const char* Pop() { return 0; }
-
- protected:
- NumberStream& operator=(const NumberStream&);
-
- InputStream& is;
- };
-
- template<typename InputStream>
- class NumberStream<InputStream, true> : public NumberStream<InputStream, false> {
- typedef NumberStream<InputStream, false> Base;
- public:
- NumberStream(GenericReader& reader, InputStream& is) : NumberStream<InputStream, false>(reader, is), stackStream(reader.stack_) {}
- ~NumberStream() {}
-
- RAPIDJSON_FORCEINLINE Ch TakePush() {
- stackStream.Put(static_cast<char>(Base::is.Peek()));
- return Base::is.Take();
- }
-
- size_t Length() { return stackStream.Length(); }
-
- const char* Pop() {
- stackStream.Put('\0');
- return stackStream.Pop();
- }
-
- private:
- StackStream<char> stackStream;
- };
-
- template<unsigned parseFlags, typename InputStream, typename Handler>
- void ParseNumber(InputStream& is, Handler& handler) {
- internal::StreamLocalCopy<InputStream> copy(is);
- NumberStream<InputStream, (parseFlags & kParseFullPrecisionFlag) != 0> s(*this, copy.s);
- size_t startOffset = s.Tell();
-
- // Parse minus
- bool minus = Consume(s, '-');
-
- // Parse int: zero / ( digit1-9 *DIGIT )
- unsigned i = 0;
- uint64_t i64 = 0;
- bool use64bit = false;
- int significandDigit = 0;
- if (RAPIDJSON_UNLIKELY(s.Peek() == '0')) {
- i = 0;
- s.TakePush();
- }
- else if (RAPIDJSON_LIKELY(s.Peek() >= '1' && s.Peek() <= '9')) {
- i = static_cast<unsigned>(s.TakePush() - '0');
-
- if (minus)
- while (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) {
- if (RAPIDJSON_UNLIKELY(i >= 214748364)) { // 2^31 = 2147483648
- if (RAPIDJSON_LIKELY(i != 214748364 || s.Peek() > '8')) {
- i64 = i;
- use64bit = true;
- break;
- }
- }
- i = i * 10 + static_cast<unsigned>(s.TakePush() - '0');
- significandDigit++;
- }
- else
- while (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) {
- if (RAPIDJSON_UNLIKELY(i >= 429496729)) { // 2^32 - 1 = 4294967295
- if (RAPIDJSON_LIKELY(i != 429496729 || s.Peek() > '5')) {
- i64 = i;
- use64bit = true;
- break;
- }
- }
- i = i * 10 + static_cast<unsigned>(s.TakePush() - '0');
- significandDigit++;
- }
- }
- else
- RAPIDJSON_PARSE_ERROR(kParseErrorValueInvalid, s.Tell());
-
- // Parse 64bit int
- bool useDouble = false;
- double d = 0.0;
- if (use64bit) {
- if (minus)
- while (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) {
- if (RAPIDJSON_UNLIKELY(i64 >= RAPIDJSON_UINT64_C2(0x0CCCCCCC, 0xCCCCCCCC))) // 2^63 = 9223372036854775808
- if (RAPIDJSON_LIKELY(i64 != RAPIDJSON_UINT64_C2(0x0CCCCCCC, 0xCCCCCCCC) || s.Peek() > '8')) {
- d = static_cast<double>(i64);
- useDouble = true;
- break;
- }
- i64 = i64 * 10 + static_cast<unsigned>(s.TakePush() - '0');
- significandDigit++;
- }
- else
- while (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) {
- if (RAPIDJSON_UNLIKELY(i64 >= RAPIDJSON_UINT64_C2(0x19999999, 0x99999999))) // 2^64 - 1 = 18446744073709551615
- if (RAPIDJSON_LIKELY(i64 != RAPIDJSON_UINT64_C2(0x19999999, 0x99999999) || s.Peek() > '5')) {
- d = static_cast<double>(i64);
- useDouble = true;
- break;
- }
- i64 = i64 * 10 + static_cast<unsigned>(s.TakePush() - '0');
- significandDigit++;
- }
- }
-
- // Force double for big integer
- if (useDouble) {
- while (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) {
- if (RAPIDJSON_UNLIKELY(d >= 1.7976931348623157e307)) // DBL_MAX / 10.0
- RAPIDJSON_PARSE_ERROR(kParseErrorNumberTooBig, startOffset);
- d = d * 10 + (s.TakePush() - '0');
- }
- }
-
- // Parse frac = decimal-point 1*DIGIT
- int expFrac = 0;
- size_t decimalPosition;
- if (Consume(s, '.')) {
- decimalPosition = s.Length();
-
- if (RAPIDJSON_UNLIKELY(!(s.Peek() >= '0' && s.Peek() <= '9')))
- RAPIDJSON_PARSE_ERROR(kParseErrorNumberMissFraction, s.Tell());
-
- if (!useDouble) {
-#if RAPIDJSON_64BIT
- // Use i64 to store significand in 64-bit architecture
- if (!use64bit)
- i64 = i;
-
- while (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) {
- if (i64 > RAPIDJSON_UINT64_C2(0x1FFFFF, 0xFFFFFFFF)) // 2^53 - 1 for fast path
- break;
- else {
- i64 = i64 * 10 + static_cast<unsigned>(s.TakePush() - '0');
- --expFrac;
- if (i64 != 0)
- significandDigit++;
- }
- }
-
- d = static_cast<double>(i64);
-#else
- // Use double to store significand in 32-bit architecture
- d = static_cast<double>(use64bit ? i64 : i);
-#endif
- useDouble = true;
- }
-
- while (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) {
- if (significandDigit < 17) {
- d = d * 10.0 + (s.TakePush() - '0');
- --expFrac;
- if (RAPIDJSON_LIKELY(d > 0.0))
- significandDigit++;
- }
- else
- s.TakePush();
- }
- }
- else
- decimalPosition = s.Length(); // decimal position at the end of integer.
-
- // Parse exp = e [ minus / plus ] 1*DIGIT
- int exp = 0;
- if (Consume(s, 'e') || Consume(s, 'E')) {
- if (!useDouble) {
- d = static_cast<double>(use64bit ? i64 : i);
- useDouble = true;
- }
-
- bool expMinus = false;
- if (Consume(s, '+'))
- ;
- else if (Consume(s, '-'))
- expMinus = true;
-
- if (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) {
- exp = static_cast<int>(s.Take() - '0');
- if (expMinus) {
- while (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) {
- exp = exp * 10 + static_cast<int>(s.Take() - '0');
- if (exp >= 214748364) { // Issue #313: prevent overflow exponent
- while (RAPIDJSON_UNLIKELY(s.Peek() >= '0' && s.Peek() <= '9')) // Consume the rest of exponent
- s.Take();
- }
- }
- }
- else { // positive exp
- int maxExp = 308 - expFrac;
- while (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) {
- exp = exp * 10 + static_cast<int>(s.Take() - '0');
- if (RAPIDJSON_UNLIKELY(exp > maxExp))
- RAPIDJSON_PARSE_ERROR(kParseErrorNumberTooBig, startOffset);
- }
- }
- }
- else
- RAPIDJSON_PARSE_ERROR(kParseErrorNumberMissExponent, s.Tell());
-
- if (expMinus)
- exp = -exp;
- }
-
- // Finish parsing, call event according to the type of number.
- bool cont = true;
- size_t length = s.Length();
- const char* decimal = s.Pop(); // Pop stack no matter if it will be used or not.
-
- if (useDouble) {
- int p = exp + expFrac;
- if (parseFlags & kParseFullPrecisionFlag)
- d = internal::StrtodFullPrecision(d, p, decimal, length, decimalPosition, exp);
- else
- d = internal::StrtodNormalPrecision(d, p);
-
- cont = handler.Double(minus ? -d : d);
- }
- else {
- if (use64bit) {
- if (minus)
- cont = handler.Int64(static_cast<int64_t>(~i64 + 1));
- else
- cont = handler.Uint64(i64);
- }
- else {
- if (minus)
- cont = handler.Int(static_cast<int32_t>(~i + 1));
- else
- cont = handler.Uint(i);
- }
- }
- if (RAPIDJSON_UNLIKELY(!cont))
- RAPIDJSON_PARSE_ERROR(kParseErrorTermination, startOffset);
- }
-
- // Parse any JSON value
- template<unsigned parseFlags, typename InputStream, typename Handler>
- void ParseValue(InputStream& is, Handler& handler) {
- switch (is.Peek()) {
- case 'n': ParseNull <parseFlags>(is, handler); break;
- case 't': ParseTrue <parseFlags>(is, handler); break;
- case 'f': ParseFalse <parseFlags>(is, handler); break;
- case '"': ParseString<parseFlags>(is, handler); break;
- case '{': ParseObject<parseFlags>(is, handler); break;
- case '[': ParseArray <parseFlags>(is, handler); break;
- default :
- ParseNumber<parseFlags>(is, handler);
- break;
-
- }
- }
-
- // Iterative Parsing
-
- // States
- enum IterativeParsingState {
- IterativeParsingStartState = 0,
- IterativeParsingFinishState,
- IterativeParsingErrorState,
-
- // Object states
- IterativeParsingObjectInitialState,
- IterativeParsingMemberKeyState,
- IterativeParsingKeyValueDelimiterState,
- IterativeParsingMemberValueState,
- IterativeParsingMemberDelimiterState,
- IterativeParsingObjectFinishState,
-
- // Array states
- IterativeParsingArrayInitialState,
- IterativeParsingElementState,
- IterativeParsingElementDelimiterState,
- IterativeParsingArrayFinishState,
-
- // Single value state
- IterativeParsingValueState
- };
-
- enum { cIterativeParsingStateCount = IterativeParsingValueState + 1 };
-
- // Tokens
- enum Token {
- LeftBracketToken = 0,
- RightBracketToken,
-
- LeftCurlyBracketToken,
- RightCurlyBracketToken,
-
- CommaToken,
- ColonToken,
-
- StringToken,
- FalseToken,
- TrueToken,
- NullToken,
- NumberToken,
-
- kTokenCount
- };
-
- RAPIDJSON_FORCEINLINE Token Tokenize(Ch c) {
-
-//!@cond RAPIDJSON_HIDDEN_FROM_DOXYGEN
-#define N NumberToken
-#define N16 N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N
- // Maps from ASCII to Token
- static const unsigned char tokenMap[256] = {
- N16, // 00~0F
- N16, // 10~1F
- N, N, StringToken, N, N, N, N, N, N, N, N, N, CommaToken, N, N, N, // 20~2F
- N, N, N, N, N, N, N, N, N, N, ColonToken, N, N, N, N, N, // 30~3F
- N16, // 40~4F
- N, N, N, N, N, N, N, N, N, N, N, LeftBracketToken, N, RightBracketToken, N, N, // 50~5F
- N, N, N, N, N, N, FalseToken, N, N, N, N, N, N, N, NullToken, N, // 60~6F
- N, N, N, N, TrueToken, N, N, N, N, N, N, LeftCurlyBracketToken, N, RightCurlyBracketToken, N, N, // 70~7F
- N16, N16, N16, N16, N16, N16, N16, N16 // 80~FF
- };
-#undef N
-#undef N16
-//!@endcond
-
- if (sizeof(Ch) == 1 || static_cast<unsigned>(c) < 256)
- return static_cast<Token>(tokenMap[static_cast<unsigned char>(c)]);
- else
- return NumberToken;
- }
-
- RAPIDJSON_FORCEINLINE IterativeParsingState Predict(IterativeParsingState state, Token token) {
- // current state x one lookahead token -> new state
- static const char G[cIterativeParsingStateCount][kTokenCount] = {
- // Start
- {
- IterativeParsingArrayInitialState, // Left bracket
- IterativeParsingErrorState, // Right bracket
- IterativeParsingObjectInitialState, // Left curly bracket
- IterativeParsingErrorState, // Right curly bracket
- IterativeParsingErrorState, // Comma
- IterativeParsingErrorState, // Colon
- IterativeParsingValueState, // String
- IterativeParsingValueState, // False
- IterativeParsingValueState, // True
- IterativeParsingValueState, // Null
- IterativeParsingValueState // Number
- },
- // Finish(sink state)
- {
- IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState,
- IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState,
- IterativeParsingErrorState
- },
- // Error(sink state)
- {
- IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState,
- IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState,
- IterativeParsingErrorState
- },
- // ObjectInitial
- {
- IterativeParsingErrorState, // Left bracket
- IterativeParsingErrorState, // Right bracket
- IterativeParsingErrorState, // Left curly bracket
- IterativeParsingObjectFinishState, // Right curly bracket
- IterativeParsingErrorState, // Comma
- IterativeParsingErrorState, // Colon
- IterativeParsingMemberKeyState, // String
- IterativeParsingErrorState, // False
- IterativeParsingErrorState, // True
- IterativeParsingErrorState, // Null
- IterativeParsingErrorState // Number
- },
- // MemberKey
- {
- IterativeParsingErrorState, // Left bracket
- IterativeParsingErrorState, // Right bracket
- IterativeParsingErrorState, // Left curly bracket
- IterativeParsingErrorState, // Right curly bracket
- IterativeParsingErrorState, // Comma
- IterativeParsingKeyValueDelimiterState, // Colon
- IterativeParsingErrorState, // String
- IterativeParsingErrorState, // False
- IterativeParsingErrorState, // True
- IterativeParsingErrorState, // Null
- IterativeParsingErrorState // Number
- },
- // KeyValueDelimiter
- {
- IterativeParsingArrayInitialState, // Left bracket(push MemberValue state)
- IterativeParsingErrorState, // Right bracket
- IterativeParsingObjectInitialState, // Left curly bracket(push MemberValue state)
- IterativeParsingErrorState, // Right curly bracket
- IterativeParsingErrorState, // Comma
- IterativeParsingErrorState, // Colon
- IterativeParsingMemberValueState, // String
- IterativeParsingMemberValueState, // False
- IterativeParsingMemberValueState, // True
- IterativeParsingMemberValueState, // Null
- IterativeParsingMemberValueState // Number
- },
- // MemberValue
- {
- IterativeParsingErrorState, // Left bracket
- IterativeParsingErrorState, // Right bracket
- IterativeParsingErrorState, // Left curly bracket
- IterativeParsingObjectFinishState, // Right curly bracket
- IterativeParsingMemberDelimiterState, // Comma
- IterativeParsingErrorState, // Colon
- IterativeParsingErrorState, // String
- IterativeParsingErrorState, // False
- IterativeParsingErrorState, // True
- IterativeParsingErrorState, // Null
- IterativeParsingErrorState // Number
- },
- // MemberDelimiter
- {
- IterativeParsingErrorState, // Left bracket
- IterativeParsingErrorState, // Right bracket
- IterativeParsingErrorState, // Left curly bracket
- IterativeParsingErrorState, // Right curly bracket
- IterativeParsingErrorState, // Comma
- IterativeParsingErrorState, // Colon
- IterativeParsingMemberKeyState, // String
- IterativeParsingErrorState, // False
- IterativeParsingErrorState, // True
- IterativeParsingErrorState, // Null
- IterativeParsingErrorState // Number
- },
- // ObjectFinish(sink state)
- {
- IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState,
- IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState,
- IterativeParsingErrorState
- },
- // ArrayInitial
- {
- IterativeParsingArrayInitialState, // Left bracket(push Element state)
- IterativeParsingArrayFinishState, // Right bracket
- IterativeParsingObjectInitialState, // Left curly bracket(push Element state)
- IterativeParsingErrorState, // Right curly bracket
- IterativeParsingErrorState, // Comma
- IterativeParsingErrorState, // Colon
- IterativeParsingElementState, // String
- IterativeParsingElementState, // False
- IterativeParsingElementState, // True
- IterativeParsingElementState, // Null
- IterativeParsingElementState // Number
- },
- // Element
- {
- IterativeParsingErrorState, // Left bracket
- IterativeParsingArrayFinishState, // Right bracket
- IterativeParsingErrorState, // Left curly bracket
- IterativeParsingErrorState, // Right curly bracket
- IterativeParsingElementDelimiterState, // Comma
- IterativeParsingErrorState, // Colon
- IterativeParsingErrorState, // String
- IterativeParsingErrorState, // False
- IterativeParsingErrorState, // True
- IterativeParsingErrorState, // Null
- IterativeParsingErrorState // Number
- },
- // ElementDelimiter
- {
- IterativeParsingArrayInitialState, // Left bracket(push Element state)
- IterativeParsingErrorState, // Right bracket
- IterativeParsingObjectInitialState, // Left curly bracket(push Element state)
- IterativeParsingErrorState, // Right curly bracket
- IterativeParsingErrorState, // Comma
- IterativeParsingErrorState, // Colon
- IterativeParsingElementState, // String
- IterativeParsingElementState, // False
- IterativeParsingElementState, // True
- IterativeParsingElementState, // Null
- IterativeParsingElementState // Number
- },
- // ArrayFinish(sink state)
- {
- IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState,
- IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState,
- IterativeParsingErrorState
- },
- // Single Value (sink state)
- {
- IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState,
- IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState,
- IterativeParsingErrorState
- }
- }; // End of G
-
- return static_cast<IterativeParsingState>(G[state][token]);
- }
-
- // Make an advance in the token stream and state based on the candidate destination state which was returned by Transit().
- // May return a new state on state pop.
- template <unsigned parseFlags, typename InputStream, typename Handler>
- RAPIDJSON_FORCEINLINE IterativeParsingState Transit(IterativeParsingState src, Token token, IterativeParsingState dst, InputStream& is, Handler& handler) {
- (void)token;
-
- switch (dst) {
- case IterativeParsingErrorState:
- return dst;
-
- case IterativeParsingObjectInitialState:
- case IterativeParsingArrayInitialState:
- {
- // Push the state(Element or MemeberValue) if we are nested in another array or value of member.
- // In this way we can get the correct state on ObjectFinish or ArrayFinish by frame pop.
- IterativeParsingState n = src;
- if (src == IterativeParsingArrayInitialState || src == IterativeParsingElementDelimiterState)
- n = IterativeParsingElementState;
- else if (src == IterativeParsingKeyValueDelimiterState)
- n = IterativeParsingMemberValueState;
- // Push current state.
- *stack_.template Push<SizeType>(1) = n;
- // Initialize and push the member/element count.
- *stack_.template Push<SizeType>(1) = 0;
- // Call handler
- bool hr = (dst == IterativeParsingObjectInitialState) ? handler.StartObject() : handler.StartArray();
- // On handler short circuits the parsing.
- if (!hr) {
- RAPIDJSON_PARSE_ERROR_NORETURN(kParseErrorTermination, is.Tell());
- return IterativeParsingErrorState;
- }
- else {
- is.Take();
- return dst;
- }
- }
-
- case IterativeParsingMemberKeyState:
- ParseString<parseFlags>(is, handler, true);
- if (HasParseError())
- return IterativeParsingErrorState;
- else
- return dst;
-
- case IterativeParsingKeyValueDelimiterState:
- RAPIDJSON_ASSERT(token == ColonToken);
- is.Take();
- return dst;
-
- case IterativeParsingMemberValueState:
- // Must be non-compound value. Or it would be ObjectInitial or ArrayInitial state.
- ParseValue<parseFlags>(is, handler);
- if (HasParseError()) {
- return IterativeParsingErrorState;
- }
- return dst;
-
- case IterativeParsingElementState:
- // Must be non-compound value. Or it would be ObjectInitial or ArrayInitial state.
- ParseValue<parseFlags>(is, handler);
- if (HasParseError()) {
- return IterativeParsingErrorState;
- }
- return dst;
-
- case IterativeParsingMemberDelimiterState:
- case IterativeParsingElementDelimiterState:
- is.Take();
- // Update member/element count.
- *stack_.template Top<SizeType>() = *stack_.template Top<SizeType>() + 1;
- return dst;
-
- case IterativeParsingObjectFinishState:
- {
- // Get member count.
- SizeType c = *stack_.template Pop<SizeType>(1);
- // If the object is not empty, count the last member.
- if (src == IterativeParsingMemberValueState)
- ++c;
- // Restore the state.
- IterativeParsingState n = static_cast<IterativeParsingState>(*stack_.template Pop<SizeType>(1));
- // Transit to Finish state if this is the topmost scope.
- if (n == IterativeParsingStartState)
- n = IterativeParsingFinishState;
- // Call handler
- bool hr = handler.EndObject(c);
- // On handler short circuits the parsing.
- if (!hr) {
- RAPIDJSON_PARSE_ERROR_NORETURN(kParseErrorTermination, is.Tell());
- return IterativeParsingErrorState;
- }
- else {
- is.Take();
- return n;
- }
- }
-
- case IterativeParsingArrayFinishState:
- {
- // Get element count.
- SizeType c = *stack_.template Pop<SizeType>(1);
- // If the array is not empty, count the last element.
- if (src == IterativeParsingElementState)
- ++c;
- // Restore the state.
- IterativeParsingState n = static_cast<IterativeParsingState>(*stack_.template Pop<SizeType>(1));
- // Transit to Finish state if this is the topmost scope.
- if (n == IterativeParsingStartState)
- n = IterativeParsingFinishState;
- // Call handler
- bool hr = handler.EndArray(c);
- // On handler short circuits the parsing.
- if (!hr) {
- RAPIDJSON_PARSE_ERROR_NORETURN(kParseErrorTermination, is.Tell());
- return IterativeParsingErrorState;
- }
- else {
- is.Take();
- return n;
- }
- }
-
- default:
- // This branch is for IterativeParsingValueState actually.
- // Use `default:` rather than
- // `case IterativeParsingValueState:` is for code coverage.
-
- // The IterativeParsingStartState is not enumerated in this switch-case.
- // It is impossible for that case. And it can be caught by following assertion.
-
- // The IterativeParsingFinishState is not enumerated in this switch-case either.
- // It is a "derivative" state which cannot triggered from Predict() directly.
- // Therefore it cannot happen here. And it can be caught by following assertion.
- RAPIDJSON_ASSERT(dst == IterativeParsingValueState);
-
- // Must be non-compound value. Or it would be ObjectInitial or ArrayInitial state.
- ParseValue<parseFlags>(is, handler);
- if (HasParseError()) {
- return IterativeParsingErrorState;
- }
- return IterativeParsingFinishState;
- }
- }
-
- template <typename InputStream>
- void HandleError(IterativeParsingState src, InputStream& is) {
- if (HasParseError()) {
- // Error flag has been set.
- return;
- }
-
- switch (src) {
- case IterativeParsingStartState: RAPIDJSON_PARSE_ERROR(kParseErrorDocumentEmpty, is.Tell()); return;
- case IterativeParsingFinishState: RAPIDJSON_PARSE_ERROR(kParseErrorDocumentRootNotSingular, is.Tell()); return;
- case IterativeParsingObjectInitialState:
- case IterativeParsingMemberDelimiterState: RAPIDJSON_PARSE_ERROR(kParseErrorObjectMissName, is.Tell()); return;
- case IterativeParsingMemberKeyState: RAPIDJSON_PARSE_ERROR(kParseErrorObjectMissColon, is.Tell()); return;
- case IterativeParsingMemberValueState: RAPIDJSON_PARSE_ERROR(kParseErrorObjectMissCommaOrCurlyBracket, is.Tell()); return;
- case IterativeParsingElementState: RAPIDJSON_PARSE_ERROR(kParseErrorArrayMissCommaOrSquareBracket, is.Tell()); return;
- default: RAPIDJSON_PARSE_ERROR(kParseErrorUnspecificSyntaxError, is.Tell()); return;
- }
- }
-
- template <unsigned parseFlags, typename InputStream, typename Handler>
- ParseResult IterativeParse(InputStream& is, Handler& handler) {
- parseResult_.Clear();
- ClearStackOnExit scope(*this);
- IterativeParsingState state = IterativeParsingStartState;
-
- SkipWhitespaceAndComments<parseFlags>(is);
- RAPIDJSON_PARSE_ERROR_EARLY_RETURN(parseResult_);
- while (is.Peek() != '\0') {
- Token t = Tokenize(is.Peek());
- IterativeParsingState n = Predict(state, t);
- IterativeParsingState d = Transit<parseFlags>(state, t, n, is, handler);
-
- if (d == IterativeParsingErrorState) {
- HandleError(state, is);
- break;
- }
-
- state = d;
-
- // Do not further consume streams if a root JSON has been parsed.
- if ((parseFlags & kParseStopWhenDoneFlag) && state == IterativeParsingFinishState)
- break;
-
- SkipWhitespaceAndComments<parseFlags>(is);
- RAPIDJSON_PARSE_ERROR_EARLY_RETURN(parseResult_);
- }
-
- // Handle the end of file.
- if (state != IterativeParsingFinishState)
- HandleError(state, is);
-
- return parseResult_;
- }
-
- static const size_t kDefaultStackCapacity = 256; //!< Default stack capacity in bytes for storing a single decoded string.
- internal::Stack<StackAllocator> stack_; //!< A stack for storing decoded string temporarily during non-destructive parsing.
- ParseResult parseResult_;
-}; // class GenericReader
-
-//! Reader with UTF8 encoding and default allocator.
-typedef GenericReader<UTF8<>, UTF8<> > Reader;
-
-RAPIDJSON_NAMESPACE_END
-
-#ifdef __clang__
-RAPIDJSON_DIAG_POP
-#endif
-
-
-#ifdef __GNUC__
-RAPIDJSON_DIAG_POP
-#endif
-
-#ifdef _MSC_VER
-RAPIDJSON_DIAG_POP
-#endif
-
-#endif // RAPIDJSON_READER_H_
diff --git a/3rdparty/rapidjson/include/rapidjson/schema.h b/3rdparty/rapidjson/include/rapidjson/schema.h
deleted file mode 100644
index e47f89aa3ba..00000000000
--- a/3rdparty/rapidjson/include/rapidjson/schema.h
+++ /dev/null
@@ -1,1979 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available->
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip-> All rights reserved->
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License-> You may obtain a copy of the License at
-//
-// http://opensource->org/licenses/MIT
-//
-// 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 RAPIDJSON_SCHEMA_H_
-#define RAPIDJSON_SCHEMA_H_
-
-#include "document.h"
-#include "pointer.h"
-#include <cmath> // abs, floor
-
-#ifdef __clang__
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(weak-vtables)
-RAPIDJSON_DIAG_OFF(exit-time-destructors)
-RAPIDJSON_DIAG_OFF(c++98-compat-pedantic)
-#endif
-
-#if !defined(RAPIDJSON_SCHEMA_USE_INTERNALREGEX)
-#define RAPIDJSON_SCHEMA_USE_INTERNALREGEX 1
-#else
-#define RAPIDJSON_SCHEMA_USE_INTERNALREGEX 0
-#endif
-
-#if !RAPIDJSON_SCHEMA_USE_INTERNALREGEX && !defined(RAPIDJSON_SCHEMA_USE_STDREGEX) && (__cplusplus >=201103L || (defined(_MSC_VER) && _MSC_VER >= 1800))
-#define RAPIDJSON_SCHEMA_USE_STDREGEX 1
-#else
-#define RAPIDJSON_SCHEMA_USE_STDREGEX 0
-#endif
-
-#if RAPIDJSON_SCHEMA_USE_INTERNALREGEX
-#include "internal/regex.h"
-#elif RAPIDJSON_SCHEMA_USE_STDREGEX
-#include <regex>
-#endif
-
-#if RAPIDJSON_SCHEMA_USE_INTERNALREGEX || RAPIDJSON_SCHEMA_USE_STDREGEX
-#define RAPIDJSON_SCHEMA_HAS_REGEX 1
-#else
-#define RAPIDJSON_SCHEMA_HAS_REGEX 0
-#endif
-
-#ifndef RAPIDJSON_SCHEMA_VERBOSE
-#define RAPIDJSON_SCHEMA_VERBOSE 0
-#endif
-
-#if RAPIDJSON_SCHEMA_VERBOSE
-#include "stringbuffer.h"
-#endif
-
-#if defined(__GNUC__)
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(effc++)
-#endif
-
-#ifdef __clang__
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(variadic-macros)
-#endif
-
-RAPIDJSON_NAMESPACE_BEGIN
-
-///////////////////////////////////////////////////////////////////////////////
-// Verbose Utilities
-
-#if RAPIDJSON_SCHEMA_VERBOSE
-
-namespace internal {
-
-inline void PrintInvalidKeyword(const char* keyword) {
- printf("Fail keyword: %s\n", keyword);
-}
-
-inline void PrintInvalidKeyword(const wchar_t* keyword) {
- wprintf(L"Fail keyword: %ls\n", keyword);
-}
-
-inline void PrintInvalidDocument(const char* document) {
- printf("Fail document: %s\n\n", document);
-}
-
-inline void PrintInvalidDocument(const wchar_t* document) {
- wprintf(L"Fail document: %ls\n\n", document);
-}
-
-inline void PrintValidatorPointers(unsigned depth, const char* s, const char* d) {
- printf("S: %*s%s\nD: %*s%s\n\n", depth * 4, " ", s, depth * 4, " ", d);
-}
-
-inline void PrintValidatorPointers(unsigned depth, const wchar_t* s, const wchar_t* d) {
- wprintf(L"S: %*ls%ls\nD: %*ls%ls\n\n", depth * 4, L" ", s, depth * 4, L" ", d);
-}
-
-} // namespace internal
-
-#endif // RAPIDJSON_SCHEMA_VERBOSE
-
-///////////////////////////////////////////////////////////////////////////////
-// RAPIDJSON_INVALID_KEYWORD_RETURN
-
-#if RAPIDJSON_SCHEMA_VERBOSE
-#define RAPIDJSON_INVALID_KEYWORD_VERBOSE(keyword) internal::PrintInvalidKeyword(keyword)
-#else
-#define RAPIDJSON_INVALID_KEYWORD_VERBOSE(keyword)
-#endif
-
-#define RAPIDJSON_INVALID_KEYWORD_RETURN(keyword)\
-RAPIDJSON_MULTILINEMACRO_BEGIN\
- context.invalidKeyword = keyword.GetString();\
- RAPIDJSON_INVALID_KEYWORD_VERBOSE(keyword.GetString());\
- return false;\
-RAPIDJSON_MULTILINEMACRO_END
-
-///////////////////////////////////////////////////////////////////////////////
-// Forward declarations
-
-template <typename ValueType, typename Allocator>
-class GenericSchemaDocument;
-
-namespace internal {
-
-template <typename SchemaDocumentType>
-class Schema;
-
-///////////////////////////////////////////////////////////////////////////////
-// ISchemaValidator
-
-class ISchemaValidator {
-public:
- virtual ~ISchemaValidator() {}
- virtual bool IsValid() const = 0;
-};
-
-///////////////////////////////////////////////////////////////////////////////
-// ISchemaStateFactory
-
-template <typename SchemaType>
-class ISchemaStateFactory {
-public:
- virtual ~ISchemaStateFactory() {}
- virtual ISchemaValidator* CreateSchemaValidator(const SchemaType&) = 0;
- virtual void DestroySchemaValidator(ISchemaValidator* validator) = 0;
- virtual void* CreateHasher() = 0;
- virtual uint64_t GetHashCode(void* hasher) = 0;
- virtual void DestroryHasher(void* hasher) = 0;
- virtual void* MallocState(size_t size) = 0;
- virtual void* ReallocState(void* originalPtr, size_t originalSize, size_t newSize) = 0;
- virtual void FreeState(void* p) = 0;
-};
-
-///////////////////////////////////////////////////////////////////////////////
-// Hasher
-
-// For comparison of compound value
-template<typename Encoding, typename Allocator>
-class Hasher {
-public:
- typedef typename Encoding::Ch Ch;
-
- Hasher(Allocator* allocator = 0, size_t stackCapacity = kDefaultSize) : stack_(allocator, stackCapacity) {}
-
- bool Null() { return WriteType(kNullType); }
- bool Bool(bool b) { return WriteType(b ? kTrueType : kFalseType); }
- bool Int(int i) { Number n; n.u.i = i; n.d = static_cast<double>(i); return WriteNumber(n); }
- bool Uint(unsigned u) { Number n; n.u.u = u; n.d = static_cast<double>(u); return WriteNumber(n); }
- bool Int64(int64_t i) { Number n; n.u.i = i; n.d = static_cast<double>(i); return WriteNumber(n); }
- bool Uint64(uint64_t u) { Number n; n.u.u = u; n.d = static_cast<double>(u); return WriteNumber(n); }
- bool Double(double d) {
- Number n;
- if (d < 0) n.u.i = static_cast<int64_t>(d);
- else n.u.u = static_cast<uint64_t>(d);
- n.d = d;
- return WriteNumber(n);
- }
-
- bool String(const Ch* str, SizeType len, bool) {
- WriteBuffer(kStringType, str, len * sizeof(Ch));
- return true;
- }
-
- bool StartObject() { return true; }
- bool Key(const Ch* str, SizeType len, bool copy) { return String(str, len, copy); }
- bool EndObject(SizeType memberCount) {
- uint64_t h = Hash(0, kObjectType);
- uint64_t* kv = stack_.template Pop<uint64_t>(memberCount * 2);
- for (SizeType i = 0; i < memberCount; i++)
- h ^= Hash(kv[i * 2], kv[i * 2 + 1]); // Use xor to achieve member order insensitive
- *stack_.template Push<uint64_t>() = h;
- return true;
- }
-
- bool StartArray() { return true; }
- bool EndArray(SizeType elementCount) {
- uint64_t h = Hash(0, kArrayType);
- uint64_t* e = stack_.template Pop<uint64_t>(elementCount);
- for (SizeType i = 0; i < elementCount; i++)
- h = Hash(h, e[i]); // Use hash to achieve element order sensitive
- *stack_.template Push<uint64_t>() = h;
- return true;
- }
-
- bool IsValid() const { return stack_.GetSize() == sizeof(uint64_t); }
-
- uint64_t GetHashCode() const {
- RAPIDJSON_ASSERT(IsValid());
- return *stack_.template Top<uint64_t>();
- }
-
-private:
- static const size_t kDefaultSize = 256;
- struct Number {
- union U {
- uint64_t u;
- int64_t i;
- }u;
- double d;
- };
-
- bool WriteType(Type type) { return WriteBuffer(type, 0, 0); }
-
- bool WriteNumber(const Number& n) { return WriteBuffer(kNumberType, &n, sizeof(n)); }
-
- bool WriteBuffer(Type type, const void* data, size_t len) {
- // FNV-1a from http://isthe.com/chongo/tech/comp/fnv/
- uint64_t h = Hash(RAPIDJSON_UINT64_C2(0x84222325, 0xcbf29ce4), type);
- const unsigned char* d = static_cast<const unsigned char*>(data);
- for (size_t i = 0; i < len; i++)
- h = Hash(h, d[i]);
- *stack_.template Push<uint64_t>() = h;
- return true;
- }
-
- static uint64_t Hash(uint64_t h, uint64_t d) {
- static const uint64_t kPrime = RAPIDJSON_UINT64_C2(0x00000100, 0x000001b3);
- h ^= d;
- h *= kPrime;
- return h;
- }
-
- Stack<Allocator> stack_;
-};
-
-///////////////////////////////////////////////////////////////////////////////
-// SchemaValidationContext
-
-template <typename SchemaDocumentType>
-struct SchemaValidationContext {
- typedef Schema<SchemaDocumentType> SchemaType;
- typedef ISchemaStateFactory<SchemaType> SchemaValidatorFactoryType;
- typedef typename SchemaType::ValueType ValueType;
- typedef typename ValueType::Ch Ch;
-
- enum PatternValidatorType {
- kPatternValidatorOnly,
- kPatternValidatorWithProperty,
- kPatternValidatorWithAdditionalProperty
- };
-
- SchemaValidationContext(SchemaValidatorFactoryType& f, const SchemaType* s) :
- factory(f),
- schema(s),
- valueSchema(),
- invalidKeyword(),
- hasher(),
- arrayElementHashCodes(),
- validators(),
- validatorCount(),
- patternPropertiesValidators(),
- patternPropertiesValidatorCount(),
- patternPropertiesSchemas(),
- patternPropertiesSchemaCount(),
- valuePatternValidatorType(kPatternValidatorOnly),
- objectDependencies(),
- inArray(false),
- valueUniqueness(false),
- arrayUniqueness(false)
- {
- }
-
- ~SchemaValidationContext() {
- if (hasher)
- factory.DestroryHasher(hasher);
- if (validators) {
- for (SizeType i = 0; i < validatorCount; i++)
- factory.DestroySchemaValidator(validators[i]);
- factory.FreeState(validators);
- }
- if (patternPropertiesValidators) {
- for (SizeType i = 0; i < patternPropertiesValidatorCount; i++)
- factory.DestroySchemaValidator(patternPropertiesValidators[i]);
- factory.FreeState(patternPropertiesValidators);
- }
- if (patternPropertiesSchemas)
- factory.FreeState(patternPropertiesSchemas);
- if (objectDependencies)
- factory.FreeState(objectDependencies);
- }
-
- SchemaValidatorFactoryType& factory;
- const SchemaType* schema;
- const SchemaType* valueSchema;
- const Ch* invalidKeyword;
- void* hasher; // Only validator access
- void* arrayElementHashCodes; // Only validator access this
- ISchemaValidator** validators;
- SizeType validatorCount;
- ISchemaValidator** patternPropertiesValidators;
- SizeType patternPropertiesValidatorCount;
- const SchemaType** patternPropertiesSchemas;
- SizeType patternPropertiesSchemaCount;
- PatternValidatorType valuePatternValidatorType;
- PatternValidatorType objectPatternValidatorType;
- SizeType objectRequiredCount;
- SizeType arrayElementIndex;
- bool* objectDependencies;
- bool inArray;
- bool valueUniqueness;
- bool arrayUniqueness;
-};
-
-///////////////////////////////////////////////////////////////////////////////
-// Schema
-
-template <typename SchemaDocumentType>
-class Schema {
-public:
- typedef typename SchemaDocumentType::ValueType ValueType;
- typedef typename SchemaDocumentType::AllocatorType AllocatorType;
- typedef typename SchemaDocumentType::PointerType PointerType;
- typedef typename ValueType::EncodingType EncodingType;
- typedef typename EncodingType::Ch Ch;
- typedef SchemaValidationContext<SchemaDocumentType> Context;
- typedef Schema<SchemaDocumentType> SchemaType;
- typedef GenericValue<EncodingType, AllocatorType> SValue;
- friend class GenericSchemaDocument<ValueType, AllocatorType>;
-
- Schema(SchemaDocumentType* schemaDocument, const PointerType& p, const ValueType& value, const ValueType& document, AllocatorType* allocator) :
- allocator_(allocator),
- enum_(),
- enumCount_(),
- not_(),
- type_((1 << kTotalSchemaType) - 1), // typeless
- validatorCount_(),
- properties_(),
- additionalPropertiesSchema_(),
- patternProperties_(),
- patternPropertyCount_(),
- propertyCount_(),
- requiredCount_(),
- minProperties_(),
- maxProperties_(SizeType(~0)),
- additionalProperties_(true),
- hasDependencies_(),
- hasSchemaDependencies_(),
- additionalItemsSchema_(),
- itemsList_(),
- itemsTuple_(),
- itemsTupleCount_(),
- minItems_(),
- maxItems_(SizeType(~0)),
- additionalItems_(true),
- uniqueItems_(false),
- pattern_(),
- minLength_(0),
- maxLength_(~SizeType(0)),
- exclusiveMinimum_(false),
- exclusiveMaximum_(false)
- {
- typedef typename SchemaDocumentType::ValueType ValueType;
- typedef typename ValueType::ConstValueIterator ConstValueIterator;
- typedef typename ValueType::ConstMemberIterator ConstMemberIterator;
-
- if (!value.IsObject())
- return;
-
- if (const ValueType* v = GetMember(value, GetTypeString())) {
- type_ = 0;
- if (v->IsString())
- AddType(*v);
- else if (v->IsArray())
- for (ConstValueIterator itr = v->Begin(); itr != v->End(); ++itr)
- AddType(*itr);
- }
-
- if (const ValueType* v = GetMember(value, GetEnumString()))
- if (v->IsArray() && v->Size() > 0) {
- enum_ = static_cast<uint64_t*>(allocator_->Malloc(sizeof(uint64_t) * v->Size()));
- for (ConstValueIterator itr = v->Begin(); itr != v->End(); ++itr) {
- typedef Hasher<EncodingType, MemoryPoolAllocator<> > EnumHasherType;
- char buffer[256 + 24];
- MemoryPoolAllocator<> hasherAllocator(buffer, sizeof(buffer));
- EnumHasherType h(&hasherAllocator, 256);
- itr->Accept(h);
- enum_[enumCount_++] = h.GetHashCode();
- }
- }
-
- AssignIfExist(allOf_, *schemaDocument, p, value, GetAllOfString(), document);
- AssignIfExist(anyOf_, *schemaDocument, p, value, GetAnyOfString(), document);
- AssignIfExist(oneOf_, *schemaDocument, p, value, GetOneOfString(), document);
-
- if (const ValueType* v = GetMember(value, GetNotString())) {
- schemaDocument->CreateSchema(&not_, p.Append(GetNotString(), allocator_), *v, document);
- notValidatorIndex_ = validatorCount_;
- validatorCount_++;
- }
-
- // Object
-
- const ValueType* properties = GetMember(value, GetPropertiesString());
- const ValueType* required = GetMember(value, GetRequiredString());
- const ValueType* dependencies = GetMember(value, GetDependenciesString());
- {
- // Gather properties from properties/required/dependencies
- SValue allProperties(kArrayType);
-
- if (properties && properties->IsObject())
- for (ConstMemberIterator itr = properties->MemberBegin(); itr != properties->MemberEnd(); ++itr)
- AddUniqueElement(allProperties, itr->name);
-
- if (required && required->IsArray())
- for (ConstValueIterator itr = required->Begin(); itr != required->End(); ++itr)
- if (itr->IsString())
- AddUniqueElement(allProperties, *itr);
-
- if (dependencies && dependencies->IsObject())
- for (ConstMemberIterator itr = dependencies->MemberBegin(); itr != dependencies->MemberEnd(); ++itr) {
- AddUniqueElement(allProperties, itr->name);
- if (itr->value.IsArray())
- for (ConstValueIterator i = itr->value.Begin(); i != itr->value.End(); ++i)
- if (i->IsString())
- AddUniqueElement(allProperties, *i);
- }
-
- if (allProperties.Size() > 0) {
- propertyCount_ = allProperties.Size();
- properties_ = static_cast<Property*>(allocator_->Malloc(sizeof(Property) * propertyCount_));
- for (SizeType i = 0; i < propertyCount_; i++) {
- new (&properties_[i]) Property();
- properties_[i].name = allProperties[i];
- properties_[i].schema = GetTypeless();
- }
- }
- }
-
- if (properties && properties->IsObject()) {
- PointerType q = p.Append(GetPropertiesString(), allocator_);
- for (ConstMemberIterator itr = properties->MemberBegin(); itr != properties->MemberEnd(); ++itr) {
- SizeType index;
- if (FindPropertyIndex(itr->name, &index))
- schemaDocument->CreateSchema(&properties_[index].schema, q.Append(itr->name, allocator_), itr->value, document);
- }
- }
-
- if (const ValueType* v = GetMember(value, GetPatternPropertiesString())) {
- PointerType q = p.Append(GetPatternPropertiesString(), allocator_);
- patternProperties_ = static_cast<PatternProperty*>(allocator_->Malloc(sizeof(PatternProperty) * v->MemberCount()));
- patternPropertyCount_ = 0;
-
- for (ConstMemberIterator itr = v->MemberBegin(); itr != v->MemberEnd(); ++itr) {
- new (&patternProperties_[patternPropertyCount_]) PatternProperty();
- patternProperties_[patternPropertyCount_].pattern = CreatePattern(itr->name);
- schemaDocument->CreateSchema(&patternProperties_[patternPropertyCount_].schema, q.Append(itr->name, allocator_), itr->value, document);
- patternPropertyCount_++;
- }
- }
-
- if (required && required->IsArray())
- for (ConstValueIterator itr = required->Begin(); itr != required->End(); ++itr)
- if (itr->IsString()) {
- SizeType index;
- if (FindPropertyIndex(*itr, &index)) {
- properties_[index].required = true;
- requiredCount_++;
- }
- }
-
- if (dependencies && dependencies->IsObject()) {
- PointerType q = p.Append(GetDependenciesString(), allocator_);
- hasDependencies_ = true;
- for (ConstMemberIterator itr = dependencies->MemberBegin(); itr != dependencies->MemberEnd(); ++itr) {
- SizeType sourceIndex;
- if (FindPropertyIndex(itr->name, &sourceIndex)) {
- if (itr->value.IsArray()) {
- properties_[sourceIndex].dependencies = static_cast<bool*>(allocator_->Malloc(sizeof(bool) * propertyCount_));
- std::memset(properties_[sourceIndex].dependencies, 0, sizeof(bool)* propertyCount_);
- for (ConstValueIterator targetItr = itr->value.Begin(); targetItr != itr->value.End(); ++targetItr) {
- SizeType targetIndex;
- if (FindPropertyIndex(*targetItr, &targetIndex))
- properties_[sourceIndex].dependencies[targetIndex] = true;
- }
- }
- else if (itr->value.IsObject()) {
- hasSchemaDependencies_ = true;
- schemaDocument->CreateSchema(&properties_[sourceIndex].dependenciesSchema, q.Append(itr->name, allocator_), itr->value, document);
- properties_[sourceIndex].dependenciesValidatorIndex = validatorCount_;
- validatorCount_++;
- }
- }
- }
- }
-
- if (const ValueType* v = GetMember(value, GetAdditionalPropertiesString())) {
- if (v->IsBool())
- additionalProperties_ = v->GetBool();
- else if (v->IsObject())
- schemaDocument->CreateSchema(&additionalPropertiesSchema_, p.Append(GetAdditionalPropertiesString(), allocator_), *v, document);
- }
-
- AssignIfExist(minProperties_, value, GetMinPropertiesString());
- AssignIfExist(maxProperties_, value, GetMaxPropertiesString());
-
- // Array
- if (const ValueType* v = GetMember(value, GetItemsString())) {
- PointerType q = p.Append(GetItemsString(), allocator_);
- if (v->IsObject()) // List validation
- schemaDocument->CreateSchema(&itemsList_, q, *v, document);
- else if (v->IsArray()) { // Tuple validation
- itemsTuple_ = static_cast<const Schema**>(allocator_->Malloc(sizeof(const Schema*) * v->Size()));
- SizeType index = 0;
- for (ConstValueIterator itr = v->Begin(); itr != v->End(); ++itr, index++)
- schemaDocument->CreateSchema(&itemsTuple_[itemsTupleCount_++], q.Append(index, allocator_), *itr, document);
- }
- }
-
- AssignIfExist(minItems_, value, GetMinItemsString());
- AssignIfExist(maxItems_, value, GetMaxItemsString());
-
- if (const ValueType* v = GetMember(value, GetAdditionalItemsString())) {
- if (v->IsBool())
- additionalItems_ = v->GetBool();
- else if (v->IsObject())
- schemaDocument->CreateSchema(&additionalItemsSchema_, p.Append(GetAdditionalItemsString(), allocator_), *v, document);
- }
-
- AssignIfExist(uniqueItems_, value, GetUniqueItemsString());
-
- // String
- AssignIfExist(minLength_, value, GetMinLengthString());
- AssignIfExist(maxLength_, value, GetMaxLengthString());
-
- if (const ValueType* v = GetMember(value, GetPatternString()))
- pattern_ = CreatePattern(*v);
-
- // Number
- if (const ValueType* v = GetMember(value, GetMinimumString()))
- if (v->IsNumber())
- minimum_.CopyFrom(*v, *allocator_);
-
- if (const ValueType* v = GetMember(value, GetMaximumString()))
- if (v->IsNumber())
- maximum_.CopyFrom(*v, *allocator_);
-
- AssignIfExist(exclusiveMinimum_, value, GetExclusiveMinimumString());
- AssignIfExist(exclusiveMaximum_, value, GetExclusiveMaximumString());
-
- if (const ValueType* v = GetMember(value, GetMultipleOfString()))
- if (v->IsNumber() && v->GetDouble() > 0.0)
- multipleOf_.CopyFrom(*v, *allocator_);
- }
-
- ~Schema() {
- allocator_->Free(enum_);
- if (properties_) {
- for (SizeType i = 0; i < propertyCount_; i++)
- properties_[i].~Property();
- AllocatorType::Free(properties_);
- }
- if (patternProperties_) {
- for (SizeType i = 0; i < patternPropertyCount_; i++)
- patternProperties_[i].~PatternProperty();
- AllocatorType::Free(patternProperties_);
- }
- AllocatorType::Free(itemsTuple_);
-#if RAPIDJSON_SCHEMA_HAS_REGEX
- if (pattern_) {
- pattern_->~RegexType();
- allocator_->Free(pattern_);
- }
-#endif
- }
-
- bool BeginValue(Context& context) const {
- if (context.inArray) {
- if (uniqueItems_)
- context.valueUniqueness = true;
-
- if (itemsList_)
- context.valueSchema = itemsList_;
- else if (itemsTuple_) {
- if (context.arrayElementIndex < itemsTupleCount_)
- context.valueSchema = itemsTuple_[context.arrayElementIndex];
- else if (additionalItemsSchema_)
- context.valueSchema = additionalItemsSchema_;
- else if (additionalItems_)
- context.valueSchema = GetTypeless();
- else
- RAPIDJSON_INVALID_KEYWORD_RETURN(GetItemsString());
- }
- else
- context.valueSchema = GetTypeless();
-
- context.arrayElementIndex++;
- }
- return true;
- }
-
- RAPIDJSON_FORCEINLINE bool EndValue(Context& context) const {
- if (context.patternPropertiesValidatorCount > 0) {
- bool otherValid = false;
- SizeType count = context.patternPropertiesValidatorCount;
- if (context.objectPatternValidatorType != Context::kPatternValidatorOnly)
- otherValid = context.patternPropertiesValidators[--count]->IsValid();
-
- bool patternValid = true;
- for (SizeType i = 0; i < count; i++)
- if (!context.patternPropertiesValidators[i]->IsValid()) {
- patternValid = false;
- break;
- }
-
- if (context.objectPatternValidatorType == Context::kPatternValidatorOnly) {
- if (!patternValid)
- RAPIDJSON_INVALID_KEYWORD_RETURN(GetPatternPropertiesString());
- }
- else if (context.objectPatternValidatorType == Context::kPatternValidatorWithProperty) {
- if (!patternValid || !otherValid)
- RAPIDJSON_INVALID_KEYWORD_RETURN(GetPatternPropertiesString());
- }
- else if (!patternValid && !otherValid) // kPatternValidatorWithAdditionalProperty)
- RAPIDJSON_INVALID_KEYWORD_RETURN(GetPatternPropertiesString());
- }
-
- if (enum_) {
- const uint64_t h = context.factory.GetHashCode(context.hasher);
- for (SizeType i = 0; i < enumCount_; i++)
- if (enum_[i] == h)
- goto foundEnum;
- RAPIDJSON_INVALID_KEYWORD_RETURN(GetEnumString());
- foundEnum:;
- }
-
- if (allOf_.schemas)
- for (SizeType i = allOf_.begin; i < allOf_.begin + allOf_.count; i++)
- if (!context.validators[i]->IsValid())
- RAPIDJSON_INVALID_KEYWORD_RETURN(GetAllOfString());
-
- if (anyOf_.schemas) {
- for (SizeType i = anyOf_.begin; i < anyOf_.begin + anyOf_.count; i++)
- if (context.validators[i]->IsValid())
- goto foundAny;
- RAPIDJSON_INVALID_KEYWORD_RETURN(GetAnyOfString());
- foundAny:;
- }
-
- if (oneOf_.schemas) {
- bool oneValid = false;
- for (SizeType i = oneOf_.begin; i < oneOf_.begin + oneOf_.count; i++)
- if (context.validators[i]->IsValid()) {
- if (oneValid)
- RAPIDJSON_INVALID_KEYWORD_RETURN(GetOneOfString());
- else
- oneValid = true;
- }
- if (!oneValid)
- RAPIDJSON_INVALID_KEYWORD_RETURN(GetOneOfString());
- }
-
- if (not_ && context.validators[notValidatorIndex_]->IsValid())
- RAPIDJSON_INVALID_KEYWORD_RETURN(GetNotString());
-
- return true;
- }
-
- bool Null(Context& context) const {
- if (!(type_ & (1 << kNullSchemaType)))
- RAPIDJSON_INVALID_KEYWORD_RETURN(GetTypeString());
- return CreateParallelValidator(context);
- }
-
- bool Bool(Context& context, bool) const {
- if (!(type_ & (1 << kBooleanSchemaType)))
- RAPIDJSON_INVALID_KEYWORD_RETURN(GetTypeString());
- return CreateParallelValidator(context);
- }
-
- bool Int(Context& context, int i) const {
- if (!CheckInt(context, i))
- return false;
- return CreateParallelValidator(context);
- }
-
- bool Uint(Context& context, unsigned u) const {
- if (!CheckUint(context, u))
- return false;
- return CreateParallelValidator(context);
- }
-
- bool Int64(Context& context, int64_t i) const {
- if (!CheckInt(context, i))
- return false;
- return CreateParallelValidator(context);
- }
-
- bool Uint64(Context& context, uint64_t u) const {
- if (!CheckUint(context, u))
- return false;
- return CreateParallelValidator(context);
- }
-
- bool Double(Context& context, double d) const {
- if (!(type_ & (1 << kNumberSchemaType)))
- RAPIDJSON_INVALID_KEYWORD_RETURN(GetTypeString());
-
- if (!minimum_.IsNull() && !CheckDoubleMinimum(context, d))
- return false;
-
- if (!maximum_.IsNull() && !CheckDoubleMaximum(context, d))
- return false;
-
- if (!multipleOf_.IsNull() && !CheckDoubleMultipleOf(context, d))
- return false;
-
- return CreateParallelValidator(context);
- }
-
- bool String(Context& context, const Ch* str, SizeType length, bool) const {
- if (!(type_ & (1 << kStringSchemaType)))
- RAPIDJSON_INVALID_KEYWORD_RETURN(GetTypeString());
-
- if (minLength_ != 0 || maxLength_ != SizeType(~0)) {
- SizeType count;
- if (internal::CountStringCodePoint<EncodingType>(str, length, &count)) {
- if (count < minLength_)
- RAPIDJSON_INVALID_KEYWORD_RETURN(GetMinLengthString());
- if (count > maxLength_)
- RAPIDJSON_INVALID_KEYWORD_RETURN(GetMaxLengthString());
- }
- }
-
- if (pattern_ && !IsPatternMatch(pattern_, str, length))
- RAPIDJSON_INVALID_KEYWORD_RETURN(GetPatternString());
-
- return CreateParallelValidator(context);
- }
-
- bool StartObject(Context& context) const {
- if (!(type_ & (1 << kObjectSchemaType)))
- RAPIDJSON_INVALID_KEYWORD_RETURN(GetTypeString());
-
- context.objectRequiredCount = 0;
- if (hasDependencies_) {
- context.objectDependencies = static_cast<bool*>(context.factory.MallocState(sizeof(bool) * propertyCount_));
- std::memset(context.objectDependencies, 0, sizeof(bool) * propertyCount_);
- }
-
- if (patternProperties_) { // pre-allocate schema array
- SizeType count = patternPropertyCount_ + 1; // extra for valuePatternValidatorType
- context.patternPropertiesSchemas = static_cast<const SchemaType**>(context.factory.MallocState(sizeof(const SchemaType*) * count));
- context.patternPropertiesSchemaCount = 0;
- std::memset(context.patternPropertiesSchemas, 0, sizeof(SchemaType*) * count);
- }
-
- return CreateParallelValidator(context);
- }
-
- bool Key(Context& context, const Ch* str, SizeType len, bool) const {
- if (patternProperties_) {
- context.patternPropertiesSchemaCount = 0;
- for (SizeType i = 0; i < patternPropertyCount_; i++)
- if (patternProperties_[i].pattern && IsPatternMatch(patternProperties_[i].pattern, str, len))
- context.patternPropertiesSchemas[context.patternPropertiesSchemaCount++] = patternProperties_[i].schema;
- }
-
- SizeType index;
- if (FindPropertyIndex(ValueType(str, len).Move(), &index)) {
- if (context.patternPropertiesSchemaCount > 0) {
- context.patternPropertiesSchemas[context.patternPropertiesSchemaCount++] = properties_[index].schema;
- context.valueSchema = GetTypeless();
- context.valuePatternValidatorType = Context::kPatternValidatorWithProperty;
- }
- else
- context.valueSchema = properties_[index].schema;
-
- if (properties_[index].required)
- context.objectRequiredCount++;
-
- if (hasDependencies_)
- context.objectDependencies[index] = true;
-
- return true;
- }
-
- if (additionalPropertiesSchema_) {
- if (additionalPropertiesSchema_ && context.patternPropertiesSchemaCount > 0) {
- context.patternPropertiesSchemas[context.patternPropertiesSchemaCount++] = additionalPropertiesSchema_;
- context.valueSchema = GetTypeless();
- context.valuePatternValidatorType = Context::kPatternValidatorWithAdditionalProperty;
- }
- else
- context.valueSchema = additionalPropertiesSchema_;
- return true;
- }
- else if (additionalProperties_) {
- context.valueSchema = GetTypeless();
- return true;
- }
-
- if (context.patternPropertiesSchemaCount == 0) // patternProperties are not additional properties
- RAPIDJSON_INVALID_KEYWORD_RETURN(GetAdditionalPropertiesString());
-
- return true;
- }
-
- bool EndObject(Context& context, SizeType memberCount) const {
- if (context.objectRequiredCount != requiredCount_)
- RAPIDJSON_INVALID_KEYWORD_RETURN(GetRequiredString());
-
- if (memberCount < minProperties_)
- RAPIDJSON_INVALID_KEYWORD_RETURN(GetMinPropertiesString());
-
- if (memberCount > maxProperties_)
- RAPIDJSON_INVALID_KEYWORD_RETURN(GetMaxPropertiesString());
-
- if (hasDependencies_) {
- for (SizeType sourceIndex = 0; sourceIndex < propertyCount_; sourceIndex++)
- if (context.objectDependencies[sourceIndex]) {
- if (properties_[sourceIndex].dependencies) {
- for (SizeType targetIndex = 0; targetIndex < propertyCount_; targetIndex++)
- if (properties_[sourceIndex].dependencies[targetIndex] && !context.objectDependencies[targetIndex])
- RAPIDJSON_INVALID_KEYWORD_RETURN(GetDependenciesString());
- }
- else if (properties_[sourceIndex].dependenciesSchema)
- if (!context.validators[properties_[sourceIndex].dependenciesValidatorIndex]->IsValid())
- RAPIDJSON_INVALID_KEYWORD_RETURN(GetDependenciesString());
- }
- }
-
- return true;
- }
-
- bool StartArray(Context& context) const {
- if (!(type_ & (1 << kArraySchemaType)))
- RAPIDJSON_INVALID_KEYWORD_RETURN(GetTypeString());
-
- context.arrayElementIndex = 0;
- context.inArray = true;
-
- return CreateParallelValidator(context);
- }
-
- bool EndArray(Context& context, SizeType elementCount) const {
- context.inArray = false;
-
- if (elementCount < minItems_)
- RAPIDJSON_INVALID_KEYWORD_RETURN(GetMinItemsString());
-
- if (elementCount > maxItems_)
- RAPIDJSON_INVALID_KEYWORD_RETURN(GetMaxItemsString());
-
- return true;
- }
-
- // Generate functions for string literal according to Ch
-#define RAPIDJSON_STRING_(name, ...) \
- static const ValueType& Get##name##String() {\
- static const Ch s[] = { __VA_ARGS__, '\0' };\
- static const ValueType v(s, sizeof(s) / sizeof(Ch) - 1);\
- return v;\
- }
-
- RAPIDJSON_STRING_(Null, 'n', 'u', 'l', 'l')
- RAPIDJSON_STRING_(Boolean, 'b', 'o', 'o', 'l', 'e', 'a', 'n')
- RAPIDJSON_STRING_(Object, 'o', 'b', 'j', 'e', 'c', 't')
- RAPIDJSON_STRING_(Array, 'a', 'r', 'r', 'a', 'y')
- RAPIDJSON_STRING_(String, 's', 't', 'r', 'i', 'n', 'g')
- RAPIDJSON_STRING_(Number, 'n', 'u', 'm', 'b', 'e', 'r')
- RAPIDJSON_STRING_(Integer, 'i', 'n', 't', 'e', 'g', 'e', 'r')
- RAPIDJSON_STRING_(Type, 't', 'y', 'p', 'e')
- RAPIDJSON_STRING_(Enum, 'e', 'n', 'u', 'm')
- RAPIDJSON_STRING_(AllOf, 'a', 'l', 'l', 'O', 'f')
- RAPIDJSON_STRING_(AnyOf, 'a', 'n', 'y', 'O', 'f')
- RAPIDJSON_STRING_(OneOf, 'o', 'n', 'e', 'O', 'f')
- RAPIDJSON_STRING_(Not, 'n', 'o', 't')
- RAPIDJSON_STRING_(Properties, 'p', 'r', 'o', 'p', 'e', 'r', 't', 'i', 'e', 's')
- RAPIDJSON_STRING_(Required, 'r', 'e', 'q', 'u', 'i', 'r', 'e', 'd')
- RAPIDJSON_STRING_(Dependencies, 'd', 'e', 'p', 'e', 'n', 'd', 'e', 'n', 'c', 'i', 'e', 's')
- RAPIDJSON_STRING_(PatternProperties, 'p', 'a', 't', 't', 'e', 'r', 'n', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'i', 'e', 's')
- RAPIDJSON_STRING_(AdditionalProperties, 'a', 'd', 'd', 'i', 't', 'i', 'o', 'n', 'a', 'l', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'i', 'e', 's')
- RAPIDJSON_STRING_(MinProperties, 'm', 'i', 'n', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'i', 'e', 's')
- RAPIDJSON_STRING_(MaxProperties, 'm', 'a', 'x', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'i', 'e', 's')
- RAPIDJSON_STRING_(Items, 'i', 't', 'e', 'm', 's')
- RAPIDJSON_STRING_(MinItems, 'm', 'i', 'n', 'I', 't', 'e', 'm', 's')
- RAPIDJSON_STRING_(MaxItems, 'm', 'a', 'x', 'I', 't', 'e', 'm', 's')
- RAPIDJSON_STRING_(AdditionalItems, 'a', 'd', 'd', 'i', 't', 'i', 'o', 'n', 'a', 'l', 'I', 't', 'e', 'm', 's')
- RAPIDJSON_STRING_(UniqueItems, 'u', 'n', 'i', 'q', 'u', 'e', 'I', 't', 'e', 'm', 's')
- RAPIDJSON_STRING_(MinLength, 'm', 'i', 'n', 'L', 'e', 'n', 'g', 't', 'h')
- RAPIDJSON_STRING_(MaxLength, 'm', 'a', 'x', 'L', 'e', 'n', 'g', 't', 'h')
- RAPIDJSON_STRING_(Pattern, 'p', 'a', 't', 't', 'e', 'r', 'n')
- RAPIDJSON_STRING_(Minimum, 'm', 'i', 'n', 'i', 'm', 'u', 'm')
- RAPIDJSON_STRING_(Maximum, 'm', 'a', 'x', 'i', 'm', 'u', 'm')
- RAPIDJSON_STRING_(ExclusiveMinimum, 'e', 'x', 'c', 'l', 'u', 's', 'i', 'v', 'e', 'M', 'i', 'n', 'i', 'm', 'u', 'm')
- RAPIDJSON_STRING_(ExclusiveMaximum, 'e', 'x', 'c', 'l', 'u', 's', 'i', 'v', 'e', 'M', 'a', 'x', 'i', 'm', 'u', 'm')
- RAPIDJSON_STRING_(MultipleOf, 'm', 'u', 'l', 't', 'i', 'p', 'l', 'e', 'O', 'f')
-
-#undef RAPIDJSON_STRING_
-
-private:
- enum SchemaValueType {
- kNullSchemaType,
- kBooleanSchemaType,
- kObjectSchemaType,
- kArraySchemaType,
- kStringSchemaType,
- kNumberSchemaType,
- kIntegerSchemaType,
- kTotalSchemaType
- };
-
-#if RAPIDJSON_SCHEMA_USE_INTERNALREGEX
- typedef internal::GenericRegex<EncodingType> RegexType;
-#elif RAPIDJSON_SCHEMA_USE_STDREGEX
- typedef std::basic_regex<Ch> RegexType;
-#else
- typedef char RegexType;
-#endif
-
- struct SchemaArray {
- SchemaArray() : schemas(), count() {}
- ~SchemaArray() { AllocatorType::Free(schemas); }
- const SchemaType** schemas;
- SizeType begin; // begin index of context.validators
- SizeType count;
- };
-
- static const SchemaType* GetTypeless() {
- static SchemaType typeless(0, PointerType(), ValueType(kObjectType).Move(), ValueType(kObjectType).Move(), 0);
- return &typeless;
- }
-
- template <typename V1, typename V2>
- void AddUniqueElement(V1& a, const V2& v) {
- for (typename V1::ConstValueIterator itr = a.Begin(); itr != a.End(); ++itr)
- if (*itr == v)
- return;
- V1 c(v, *allocator_);
- a.PushBack(c, *allocator_);
- }
-
- static const ValueType* GetMember(const ValueType& value, const ValueType& name) {
- typename ValueType::ConstMemberIterator itr = value.FindMember(name);
- return itr != value.MemberEnd() ? &(itr->value) : 0;
- }
-
- static void AssignIfExist(bool& out, const ValueType& value, const ValueType& name) {
- if (const ValueType* v = GetMember(value, name))
- if (v->IsBool())
- out = v->GetBool();
- }
-
- static void AssignIfExist(SizeType& out, const ValueType& value, const ValueType& name) {
- if (const ValueType* v = GetMember(value, name))
- if (v->IsUint64() && v->GetUint64() <= SizeType(~0))
- out = static_cast<SizeType>(v->GetUint64());
- }
-
- void AssignIfExist(SchemaArray& out, SchemaDocumentType& schemaDocument, const PointerType& p, const ValueType& value, const ValueType& name, const ValueType& document) {
- if (const ValueType* v = GetMember(value, name)) {
- if (v->IsArray() && v->Size() > 0) {
- PointerType q = p.Append(name, allocator_);
- out.count = v->Size();
- out.schemas = static_cast<const Schema**>(allocator_->Malloc(out.count * sizeof(const Schema*)));
- memset(out.schemas, 0, sizeof(Schema*)* out.count);
- for (SizeType i = 0; i < out.count; i++)
- schemaDocument.CreateSchema(&out.schemas[i], q.Append(i, allocator_), (*v)[i], document);
- out.begin = validatorCount_;
- validatorCount_ += out.count;
- }
- }
- }
-
-#if RAPIDJSON_SCHEMA_USE_INTERNALREGEX
- template <typename ValueType>
- RegexType* CreatePattern(const ValueType& value) {
- if (value.IsString()) {
- RegexType* r = new (allocator_->Malloc(sizeof(RegexType))) RegexType(value.GetString());
- if (!r->IsValid()) {
- r->~RegexType();
- r = 0;
- }
- return r;
- }
- return 0;
- }
-
- static bool IsPatternMatch(const RegexType* pattern, const Ch *str, SizeType) {
- return pattern->Search(str);
- }
-#elif RAPIDJSON_SCHEMA_USE_STDREGEX
- template <typename ValueType>
- RegexType* CreatePattern(const ValueType& value) {
- if (value.IsString())
- try {
- return new (allocator_->Malloc(sizeof(RegexType))) RegexType(value.GetString(), std::size_t(value.GetStringLength()), std::regex_constants::ECMAScript);
- }
- catch (const std::regex_error&) {
- }
- return 0;
- }
-
- static bool IsPatternMatch(const RegexType* pattern, const Ch *str, SizeType length) {
- std::match_results<const Ch*> r;
- return std::regex_search(str, str + length, r, *pattern);
- }
-#else
- template <typename ValueType>
- RegexType* CreatePattern(const ValueType&) { return 0; }
-
- static bool IsPatternMatch(const RegexType*, const Ch *, SizeType) { return true; }
-#endif // RAPIDJSON_SCHEMA_USE_STDREGEX
-
- void AddType(const ValueType& type) {
- if (type == GetNullString() ) type_ |= 1 << kNullSchemaType;
- else if (type == GetBooleanString()) type_ |= 1 << kBooleanSchemaType;
- else if (type == GetObjectString() ) type_ |= 1 << kObjectSchemaType;
- else if (type == GetArrayString() ) type_ |= 1 << kArraySchemaType;
- else if (type == GetStringString() ) type_ |= 1 << kStringSchemaType;
- else if (type == GetIntegerString()) type_ |= 1 << kIntegerSchemaType;
- else if (type == GetNumberString() ) type_ |= (1 << kNumberSchemaType) | (1 << kIntegerSchemaType);
- }
-
- bool CreateParallelValidator(Context& context) const {
- if (enum_ || context.arrayUniqueness)
- context.hasher = context.factory.CreateHasher();
-
- if (validatorCount_) {
- RAPIDJSON_ASSERT(context.validators == 0);
- context.validators = static_cast<ISchemaValidator**>(context.factory.MallocState(sizeof(ISchemaValidator*) * validatorCount_));
- context.validatorCount = validatorCount_;
-
- if (allOf_.schemas)
- CreateSchemaValidators(context, allOf_);
-
- if (anyOf_.schemas)
- CreateSchemaValidators(context, anyOf_);
-
- if (oneOf_.schemas)
- CreateSchemaValidators(context, oneOf_);
-
- if (not_)
- context.validators[notValidatorIndex_] = context.factory.CreateSchemaValidator(*not_);
-
- if (hasSchemaDependencies_) {
- for (SizeType i = 0; i < propertyCount_; i++)
- if (properties_[i].dependenciesSchema)
- context.validators[properties_[i].dependenciesValidatorIndex] = context.factory.CreateSchemaValidator(*properties_[i].dependenciesSchema);
- }
- }
-
- return true;
- }
-
- void CreateSchemaValidators(Context& context, const SchemaArray& schemas) const {
- for (SizeType i = 0; i < schemas.count; i++)
- context.validators[schemas.begin + i] = context.factory.CreateSchemaValidator(*schemas.schemas[i]);
- }
-
- // O(n)
- bool FindPropertyIndex(const ValueType& name, SizeType* outIndex) const {
- SizeType len = name.GetStringLength();
- const Ch* str = name.GetString();
- for (SizeType index = 0; index < propertyCount_; index++)
- if (properties_[index].name.GetStringLength() == len &&
- (std::memcmp(properties_[index].name.GetString(), str, sizeof(Ch) * len) == 0))
- {
- *outIndex = index;
- return true;
- }
- return false;
- }
-
- bool CheckInt(Context& context, int64_t i) const {
- if (!(type_ & ((1 << kIntegerSchemaType) | (1 << kNumberSchemaType))))
- RAPIDJSON_INVALID_KEYWORD_RETURN(GetTypeString());
-
- if (!minimum_.IsNull()) {
- if (minimum_.IsInt64()) {
- if (exclusiveMinimum_ ? i <= minimum_.GetInt64() : i < minimum_.GetInt64())
- RAPIDJSON_INVALID_KEYWORD_RETURN(GetMinimumString());
- }
- else if (!CheckDoubleMinimum(context, static_cast<double>(i)))
- return false;
- }
-
- if (!maximum_.IsNull()) {
- if (maximum_.IsInt64()) {
- if (exclusiveMaximum_ ? i >= maximum_.GetInt64() : i > maximum_.GetInt64())
- RAPIDJSON_INVALID_KEYWORD_RETURN(GetMaximumString());
- }
- else if (!CheckDoubleMaximum(context, static_cast<double>(i)))
- return false;
- }
-
- if (!multipleOf_.IsNull()) {
- if (multipleOf_.IsUint64()) {
- if (static_cast<uint64_t>(i >= 0 ? i : -i) % multipleOf_.GetUint64() != 0)
- RAPIDJSON_INVALID_KEYWORD_RETURN(GetMultipleOfString());
- }
- else if (!CheckDoubleMultipleOf(context, static_cast<double>(i)))
- return false;
- }
-
- return true;
- }
-
- bool CheckUint(Context& context, uint64_t i) const {
- if (!(type_ & ((1 << kIntegerSchemaType) | (1 << kNumberSchemaType))))
- RAPIDJSON_INVALID_KEYWORD_RETURN(GetTypeString());
-
- if (!minimum_.IsNull()) {
- if (minimum_.IsUint64()) {
- if (exclusiveMinimum_ ? i <= minimum_.GetUint64() : i < minimum_.GetUint64())
- RAPIDJSON_INVALID_KEYWORD_RETURN(GetMinimumString());
- }
- else if (!CheckDoubleMinimum(context, static_cast<double>(i)))
- return false;
- }
-
- if (!maximum_.IsNull()) {
- if (maximum_.IsUint64()) {
- if (exclusiveMaximum_ ? i >= maximum_.GetUint64() : i > maximum_.GetUint64())
- RAPIDJSON_INVALID_KEYWORD_RETURN(GetMaximumString());
- }
- else if (!CheckDoubleMaximum(context, static_cast<double>(i)))
- return false;
- }
-
- if (!multipleOf_.IsNull()) {
- if (multipleOf_.IsUint64()) {
- if (i % multipleOf_.GetUint64() != 0)
- RAPIDJSON_INVALID_KEYWORD_RETURN(GetMultipleOfString());
- }
- else if (!CheckDoubleMultipleOf(context, static_cast<double>(i)))
- return false;
- }
-
- return true;
- }
-
- bool CheckDoubleMinimum(Context& context, double d) const {
- if (exclusiveMinimum_ ? d <= minimum_.GetDouble() : d < minimum_.GetDouble())
- RAPIDJSON_INVALID_KEYWORD_RETURN(GetMinimumString());
- return true;
- }
-
- bool CheckDoubleMaximum(Context& context, double d) const {
- if (exclusiveMaximum_ ? d >= maximum_.GetDouble() : d > maximum_.GetDouble())
- RAPIDJSON_INVALID_KEYWORD_RETURN(GetMaximumString());
- return true;
- }
-
- bool CheckDoubleMultipleOf(Context& context, double d) const {
- double a = std::abs(d), b = std::abs(multipleOf_.GetDouble());
- double q = std::floor(a / b);
- double r = a - q * b;
- if (r > 0.0)
- RAPIDJSON_INVALID_KEYWORD_RETURN(GetMultipleOfString());
- return true;
- }
-
- struct Property {
- Property() : schema(), dependenciesSchema(), dependenciesValidatorIndex(), dependencies(), required(false) {}
- ~Property() { AllocatorType::Free(dependencies); }
- SValue name;
- const SchemaType* schema;
- const SchemaType* dependenciesSchema;
- SizeType dependenciesValidatorIndex;
- bool* dependencies;
- bool required;
- };
-
- struct PatternProperty {
- PatternProperty() : schema(), pattern() {}
- ~PatternProperty() {
- if (pattern) {
- pattern->~RegexType();
- AllocatorType::Free(pattern);
- }
- }
- const SchemaType* schema;
- RegexType* pattern;
- };
-
- AllocatorType* allocator_;
- uint64_t* enum_;
- SizeType enumCount_;
- SchemaArray allOf_;
- SchemaArray anyOf_;
- SchemaArray oneOf_;
- const SchemaType* not_;
- unsigned type_; // bitmask of kSchemaType
- SizeType validatorCount_;
- SizeType notValidatorIndex_;
-
- Property* properties_;
- const SchemaType* additionalPropertiesSchema_;
- PatternProperty* patternProperties_;
- SizeType patternPropertyCount_;
- SizeType propertyCount_;
- SizeType requiredCount_;
- SizeType minProperties_;
- SizeType maxProperties_;
- bool additionalProperties_;
- bool hasDependencies_;
- bool hasSchemaDependencies_;
-
- const SchemaType* additionalItemsSchema_;
- const SchemaType* itemsList_;
- const SchemaType** itemsTuple_;
- SizeType itemsTupleCount_;
- SizeType minItems_;
- SizeType maxItems_;
- bool additionalItems_;
- bool uniqueItems_;
-
- RegexType* pattern_;
- SizeType minLength_;
- SizeType maxLength_;
-
- SValue minimum_;
- SValue maximum_;
- SValue multipleOf_;
- bool exclusiveMinimum_;
- bool exclusiveMaximum_;
-};
-
-template<typename Stack, typename Ch>
-struct TokenHelper {
- RAPIDJSON_FORCEINLINE static void AppendIndexToken(Stack& documentStack, SizeType index) {
- *documentStack.template Push<Ch>() = '/';
- char buffer[21];
- size_t length = static_cast<size_t>((sizeof(SizeType) == 4 ? u32toa(index, buffer) : u64toa(index, buffer)) - buffer);
- for (size_t i = 0; i < length; i++)
- *documentStack.template Push<Ch>() = buffer[i];
- }
-};
-
-// Partial specialized version for char to prevent buffer copying.
-template <typename Stack>
-struct TokenHelper<Stack, char> {
- RAPIDJSON_FORCEINLINE static void AppendIndexToken(Stack& documentStack, SizeType index) {
- if (sizeof(SizeType) == 4) {
- char *buffer = documentStack.template Push<char>(1 + 10); // '/' + uint
- *buffer++ = '/';
- const char* end = internal::u32toa(index, buffer);
- documentStack.template Pop<char>(static_cast<size_t>(10 - (end - buffer)));
- }
- else {
- char *buffer = documentStack.template Push<char>(1 + 20); // '/' + uint64
- *buffer++ = '/';
- const char* end = internal::u64toa(index, buffer);
- documentStack.template Pop<char>(static_cast<size_t>(20 - (end - buffer)));
- }
- }
-};
-
-} // namespace internal
-
-///////////////////////////////////////////////////////////////////////////////
-// IGenericRemoteSchemaDocumentProvider
-
-template <typename SchemaDocumentType>
-class IGenericRemoteSchemaDocumentProvider {
-public:
- typedef typename SchemaDocumentType::Ch Ch;
-
- virtual ~IGenericRemoteSchemaDocumentProvider() {}
- virtual const SchemaDocumentType* GetRemoteDocument(const Ch* uri, SizeType length) = 0;
-};
-
-///////////////////////////////////////////////////////////////////////////////
-// GenericSchemaDocument
-
-//! JSON schema document.
-/*!
- A JSON schema document is a compiled version of a JSON schema.
- It is basically a tree of internal::Schema.
-
- \note This is an immutable class (i.e. its instance cannot be modified after construction).
- \tparam ValueT Type of JSON value (e.g. \c Value ), which also determine the encoding.
- \tparam Allocator Allocator type for allocating memory of this document.
-*/
-template <typename ValueT, typename Allocator = CrtAllocator>
-class GenericSchemaDocument {
-public:
- typedef ValueT ValueType;
- typedef IGenericRemoteSchemaDocumentProvider<GenericSchemaDocument> IRemoteSchemaDocumentProviderType;
- typedef Allocator AllocatorType;
- typedef typename ValueType::EncodingType EncodingType;
- typedef typename EncodingType::Ch Ch;
- typedef internal::Schema<GenericSchemaDocument> SchemaType;
- typedef GenericPointer<ValueType, Allocator> PointerType;
- friend class internal::Schema<GenericSchemaDocument>;
- template <typename, typename, typename>
- friend class GenericSchemaValidator;
-
- //! Constructor.
- /*!
- Compile a JSON document into schema document.
-
- \param document A JSON document as source.
- \param remoteProvider An optional remote schema document provider for resolving remote reference. Can be null.
- \param allocator An optional allocator instance for allocating memory. Can be null.
- */
- GenericSchemaDocument(const ValueType& document, IRemoteSchemaDocumentProviderType* remoteProvider = 0, Allocator* allocator = 0) :
- remoteProvider_(remoteProvider),
- allocator_(allocator),
- ownAllocator_(),
- root_(),
- schemaMap_(allocator, kInitialSchemaMapSize),
- schemaRef_(allocator, kInitialSchemaRefSize)
- {
- if (!allocator_)
- ownAllocator_ = allocator_ = RAPIDJSON_NEW(Allocator());
-
- // Generate root schema, it will call CreateSchema() to create sub-schemas,
- // And call AddRefSchema() if there are $ref.
- CreateSchemaRecursive(&root_, PointerType(), document, document);
-
- // Resolve $ref
- while (!schemaRef_.Empty()) {
- SchemaRefEntry* refEntry = schemaRef_.template Pop<SchemaRefEntry>(1);
- if (const SchemaType* s = GetSchema(refEntry->target)) {
- if (refEntry->schema)
- *refEntry->schema = s;
-
- // Create entry in map if not exist
- if (!GetSchema(refEntry->source)) {
- new (schemaMap_.template Push<SchemaEntry>()) SchemaEntry(refEntry->source, const_cast<SchemaType*>(s), false, allocator_);
- }
- }
- refEntry->~SchemaRefEntry();
- }
-
- RAPIDJSON_ASSERT(root_ != 0);
-
- schemaRef_.ShrinkToFit(); // Deallocate all memory for ref
- }
-
- //! Destructor
- ~GenericSchemaDocument() {
- while (!schemaMap_.Empty())
- schemaMap_.template Pop<SchemaEntry>(1)->~SchemaEntry();
-
- RAPIDJSON_DELETE(ownAllocator_);
- }
-
- //! Get the root schema.
- const SchemaType& GetRoot() const { return *root_; }
-
-private:
- struct SchemaRefEntry {
- SchemaRefEntry(const PointerType& s, const PointerType& t, const SchemaType** outSchema, Allocator *allocator) : source(s, allocator), target(t, allocator), schema(outSchema) {}
- PointerType source;
- PointerType target;
- const SchemaType** schema;
- };
-
- struct SchemaEntry {
- SchemaEntry(const PointerType& p, SchemaType* s, bool o, Allocator* allocator) : pointer(p, allocator), schema(s), owned(o) {}
- ~SchemaEntry() {
- if (owned) {
- schema->~SchemaType();
- Allocator::Free(schema);
- }
- }
- PointerType pointer;
- SchemaType* schema;
- bool owned;
- };
-
- void CreateSchemaRecursive(const SchemaType** schema, const PointerType& pointer, const ValueType& v, const ValueType& document) {
- if (schema)
- *schema = SchemaType::GetTypeless();
-
- if (v.GetType() == kObjectType) {
- const SchemaType* s = GetSchema(pointer);
- if (!s)
- CreateSchema(schema, pointer, v, document);
- else if (schema)
- *schema = s;
-
- for (typename ValueType::ConstMemberIterator itr = v.MemberBegin(); itr != v.MemberEnd(); ++itr)
- CreateSchemaRecursive(0, pointer.Append(itr->name, allocator_), itr->value, document);
- }
- else if (v.GetType() == kArrayType)
- for (SizeType i = 0; i < v.Size(); i++)
- CreateSchemaRecursive(0, pointer.Append(i, allocator_), v[i], document);
- }
-
- void CreateSchema(const SchemaType** schema, const PointerType& pointer, const ValueType& v, const ValueType& document) {
- RAPIDJSON_ASSERT(pointer.IsValid());
- if (v.IsObject()) {
- if (!HandleRefSchema(pointer, schema, v, document)) {
- SchemaType* s = new (allocator_->Malloc(sizeof(SchemaType))) SchemaType(this, pointer, v, document, allocator_);
- new (schemaMap_.template Push<SchemaEntry>()) SchemaEntry(pointer, s, true, allocator_);
- if (schema)
- *schema = s;
- }
- }
- }
-
- bool HandleRefSchema(const PointerType& source, const SchemaType** schema, const ValueType& v, const ValueType& document) {
- static const Ch kRefString[] = { '$', 'r', 'e', 'f', '\0' };
- static const ValueType kRefValue(kRefString, 4);
-
- typename ValueType::ConstMemberIterator itr = v.FindMember(kRefValue);
- if (itr == v.MemberEnd())
- return false;
-
- if (itr->value.IsString()) {
- SizeType len = itr->value.GetStringLength();
- if (len > 0) {
- const Ch* s = itr->value.GetString();
- SizeType i = 0;
- while (i < len && s[i] != '#') // Find the first #
- i++;
-
- if (i > 0) { // Remote reference, resolve immediately
- if (remoteProvider_) {
- if (const GenericSchemaDocument* remoteDocument = remoteProvider_->GetRemoteDocument(s, i - 1)) {
- PointerType pointer(&s[i], len - i, allocator_);
- if (pointer.IsValid()) {
- if (const SchemaType* sc = remoteDocument->GetSchema(pointer)) {
- if (schema)
- *schema = sc;
- return true;
- }
- }
- }
- }
- }
- else if (s[i] == '#') { // Local reference, defer resolution
- PointerType pointer(&s[i], len - i, allocator_);
- if (pointer.IsValid()) {
- if (const ValueType* nv = pointer.Get(document))
- if (HandleRefSchema(source, schema, *nv, document))
- return true;
-
- new (schemaRef_.template Push<SchemaRefEntry>()) SchemaRefEntry(source, pointer, schema, allocator_);
- return true;
- }
- }
- }
- }
- return false;
- }
-
- const SchemaType* GetSchema(const PointerType& pointer) const {
- for (const SchemaEntry* target = schemaMap_.template Bottom<SchemaEntry>(); target != schemaMap_.template End<SchemaEntry>(); ++target)
- if (pointer == target->pointer)
- return target->schema;
- return 0;
- }
-
- PointerType GetPointer(const SchemaType* schema) const {
- for (const SchemaEntry* target = schemaMap_.template Bottom<SchemaEntry>(); target != schemaMap_.template End<SchemaEntry>(); ++target)
- if (schema == target->schema)
- return target->pointer;
- return PointerType();
- }
-
- static const size_t kInitialSchemaMapSize = 64;
- static const size_t kInitialSchemaRefSize = 64;
-
- IRemoteSchemaDocumentProviderType* remoteProvider_;
- Allocator *allocator_;
- Allocator *ownAllocator_;
- const SchemaType* root_; //!< Root schema.
- internal::Stack<Allocator> schemaMap_; // Stores created Pointer -> Schemas
- internal::Stack<Allocator> schemaRef_; // Stores Pointer from $ref and schema which holds the $ref
-};
-
-//! GenericSchemaDocument using Value type.
-typedef GenericSchemaDocument<Value> SchemaDocument;
-//! IGenericRemoteSchemaDocumentProvider using SchemaDocument.
-typedef IGenericRemoteSchemaDocumentProvider<SchemaDocument> IRemoteSchemaDocumentProvider;
-
-///////////////////////////////////////////////////////////////////////////////
-// GenericSchemaValidator
-
-//! JSON Schema Validator.
-/*!
- A SAX style JSON schema validator.
- It uses a \c GenericSchemaDocument to validate SAX events.
- It delegates the incoming SAX events to an output handler.
- The default output handler does nothing.
- It can be reused multiple times by calling \c Reset().
-
- \tparam SchemaDocumentType Type of schema document.
- \tparam OutputHandler Type of output handler. Default handler does nothing.
- \tparam StateAllocator Allocator for storing the internal validation states.
-*/
-template <
- typename SchemaDocumentType,
- typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>,
- typename StateAllocator = CrtAllocator>
-class GenericSchemaValidator :
- public internal::ISchemaStateFactory<typename SchemaDocumentType::SchemaType>,
- public internal::ISchemaValidator
-{
-public:
- typedef typename SchemaDocumentType::SchemaType SchemaType;
- typedef typename SchemaDocumentType::PointerType PointerType;
- typedef typename SchemaType::EncodingType EncodingType;
- typedef typename EncodingType::Ch Ch;
-
- //! Constructor without output handler.
- /*!
- \param schemaDocument The schema document to conform to.
- \param allocator Optional allocator for storing internal validation states.
- \param schemaStackCapacity Optional initial capacity of schema path stack.
- \param documentStackCapacity Optional initial capacity of document path stack.
- */
- GenericSchemaValidator(
- const SchemaDocumentType& schemaDocument,
- StateAllocator* allocator = 0,
- size_t schemaStackCapacity = kDefaultSchemaStackCapacity,
- size_t documentStackCapacity = kDefaultDocumentStackCapacity)
- :
- schemaDocument_(&schemaDocument),
- root_(schemaDocument.GetRoot()),
- outputHandler_(GetNullHandler()),
- stateAllocator_(allocator),
- ownStateAllocator_(0),
- schemaStack_(allocator, schemaStackCapacity),
- documentStack_(allocator, documentStackCapacity),
- valid_(true)
-#if RAPIDJSON_SCHEMA_VERBOSE
- , depth_(0)
-#endif
- {
- }
-
- //! Constructor with output handler.
- /*!
- \param schemaDocument The schema document to conform to.
- \param allocator Optional allocator for storing internal validation states.
- \param schemaStackCapacity Optional initial capacity of schema path stack.
- \param documentStackCapacity Optional initial capacity of document path stack.
- */
- GenericSchemaValidator(
- const SchemaDocumentType& schemaDocument,
- OutputHandler& outputHandler,
- StateAllocator* allocator = 0,
- size_t schemaStackCapacity = kDefaultSchemaStackCapacity,
- size_t documentStackCapacity = kDefaultDocumentStackCapacity)
- :
- schemaDocument_(&schemaDocument),
- root_(schemaDocument.GetRoot()),
- outputHandler_(outputHandler),
- stateAllocator_(allocator),
- ownStateAllocator_(0),
- schemaStack_(allocator, schemaStackCapacity),
- documentStack_(allocator, documentStackCapacity),
- valid_(true)
-#if RAPIDJSON_SCHEMA_VERBOSE
- , depth_(0)
-#endif
- {
- }
-
- //! Destructor.
- ~GenericSchemaValidator() {
- Reset();
- RAPIDJSON_DELETE(ownStateAllocator_);
- }
-
- //! Reset the internal states.
- void Reset() {
- while (!schemaStack_.Empty())
- PopSchema();
- documentStack_.Clear();
- valid_ = true;
- }
-
- //! Checks whether the current state is valid.
- // Implementation of ISchemaValidator
- virtual bool IsValid() const { return valid_; }
-
- //! Gets the JSON pointer pointed to the invalid schema.
- PointerType GetInvalidSchemaPointer() const {
- return schemaStack_.Empty() ? PointerType() : schemaDocument_->GetPointer(&CurrentSchema());
- }
-
- //! Gets the keyword of invalid schema.
- const Ch* GetInvalidSchemaKeyword() const {
- return schemaStack_.Empty() ? 0 : CurrentContext().invalidKeyword;
- }
-
- //! Gets the JSON pointer pointed to the invalid value.
- PointerType GetInvalidDocumentPointer() const {
- return documentStack_.Empty() ? PointerType() : PointerType(documentStack_.template Bottom<Ch>(), documentStack_.GetSize() / sizeof(Ch));
- }
-
-#if RAPIDJSON_SCHEMA_VERBOSE
-#define RAPIDJSON_SCHEMA_HANDLE_BEGIN_VERBOSE_() \
-RAPIDJSON_MULTILINEMACRO_BEGIN\
- *documentStack_.template Push<Ch>() = '\0';\
- documentStack_.template Pop<Ch>(1);\
- internal::PrintInvalidDocument(documentStack_.template Bottom<Ch>());\
-RAPIDJSON_MULTILINEMACRO_END
-#else
-#define RAPIDJSON_SCHEMA_HANDLE_BEGIN_VERBOSE_()
-#endif
-
-#define RAPIDJSON_SCHEMA_HANDLE_BEGIN_(method, arg1)\
- if (!valid_) return false; \
- if (!BeginValue() || !CurrentSchema().method arg1) {\
- RAPIDJSON_SCHEMA_HANDLE_BEGIN_VERBOSE_();\
- return valid_ = false;\
- }
-
-#define RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(method, arg2)\
- for (Context* context = schemaStack_.template Bottom<Context>(); context != schemaStack_.template End<Context>(); context++) {\
- if (context->hasher)\
- static_cast<HasherType*>(context->hasher)->method arg2;\
- if (context->validators)\
- for (SizeType i_ = 0; i_ < context->validatorCount; i_++)\
- static_cast<GenericSchemaValidator*>(context->validators[i_])->method arg2;\
- if (context->patternPropertiesValidators)\
- for (SizeType i_ = 0; i_ < context->patternPropertiesValidatorCount; i_++)\
- static_cast<GenericSchemaValidator*>(context->patternPropertiesValidators[i_])->method arg2;\
- }
-
-#define RAPIDJSON_SCHEMA_HANDLE_END_(method, arg2)\
- return valid_ = EndValue() && outputHandler_.method arg2
-
-#define RAPIDJSON_SCHEMA_HANDLE_VALUE_(method, arg1, arg2) \
- RAPIDJSON_SCHEMA_HANDLE_BEGIN_ (method, arg1);\
- RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(method, arg2);\
- RAPIDJSON_SCHEMA_HANDLE_END_ (method, arg2)
-
- bool Null() { RAPIDJSON_SCHEMA_HANDLE_VALUE_(Null, (CurrentContext() ), ( )); }
- bool Bool(bool b) { RAPIDJSON_SCHEMA_HANDLE_VALUE_(Bool, (CurrentContext(), b), (b)); }
- bool Int(int i) { RAPIDJSON_SCHEMA_HANDLE_VALUE_(Int, (CurrentContext(), i), (i)); }
- bool Uint(unsigned u) { RAPIDJSON_SCHEMA_HANDLE_VALUE_(Uint, (CurrentContext(), u), (u)); }
- bool Int64(int64_t i) { RAPIDJSON_SCHEMA_HANDLE_VALUE_(Int64, (CurrentContext(), i), (i)); }
- bool Uint64(uint64_t u) { RAPIDJSON_SCHEMA_HANDLE_VALUE_(Uint64, (CurrentContext(), u), (u)); }
- bool Double(double d) { RAPIDJSON_SCHEMA_HANDLE_VALUE_(Double, (CurrentContext(), d), (d)); }
- bool String(const Ch* str, SizeType length, bool copy)
- { RAPIDJSON_SCHEMA_HANDLE_VALUE_(String, (CurrentContext(), str, length, copy), (str, length, copy)); }
-
- bool StartObject() {
- RAPIDJSON_SCHEMA_HANDLE_BEGIN_(StartObject, (CurrentContext()));
- RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(StartObject, ());
- return valid_ = outputHandler_.StartObject();
- }
-
- bool Key(const Ch* str, SizeType len, bool copy) {
- if (!valid_) return false;
- AppendToken(str, len);
- if (!CurrentSchema().Key(CurrentContext(), str, len, copy)) return valid_ = false;
- RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(Key, (str, len, copy));
- return valid_ = outputHandler_.Key(str, len, copy);
- }
-
- bool EndObject(SizeType memberCount) {
- if (!valid_) return false;
- RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(EndObject, (memberCount));
- if (!CurrentSchema().EndObject(CurrentContext(), memberCount)) return valid_ = false;
- RAPIDJSON_SCHEMA_HANDLE_END_(EndObject, (memberCount));
- }
-
- bool StartArray() {
- RAPIDJSON_SCHEMA_HANDLE_BEGIN_(StartArray, (CurrentContext()));
- RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(StartArray, ());
- return valid_ = outputHandler_.StartArray();
- }
-
- bool EndArray(SizeType elementCount) {
- if (!valid_) return false;
- RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(EndArray, (elementCount));
- if (!CurrentSchema().EndArray(CurrentContext(), elementCount)) return valid_ = false;
- RAPIDJSON_SCHEMA_HANDLE_END_(EndArray, (elementCount));
- }
-
-#undef RAPIDJSON_SCHEMA_HANDLE_BEGIN_VERBOSE_
-#undef RAPIDJSON_SCHEMA_HANDLE_BEGIN_
-#undef RAPIDJSON_SCHEMA_HANDLE_PARALLEL_
-#undef RAPIDJSON_SCHEMA_HANDLE_VALUE_
-
- // Implementation of ISchemaStateFactory<SchemaType>
- virtual ISchemaValidator* CreateSchemaValidator(const SchemaType& root) {
- return new (GetStateAllocator().Malloc(sizeof(GenericSchemaValidator))) GenericSchemaValidator(*schemaDocument_, root,
-#if RAPIDJSON_SCHEMA_VERBOSE
- depth_ + 1,
-#endif
- &GetStateAllocator());
- }
-
- virtual void DestroySchemaValidator(ISchemaValidator* validator) {
- GenericSchemaValidator* v = static_cast<GenericSchemaValidator*>(validator);
- v->~GenericSchemaValidator();
- StateAllocator::Free(v);
- }
-
- virtual void* CreateHasher() {
- return new (GetStateAllocator().Malloc(sizeof(HasherType))) HasherType(&GetStateAllocator());
- }
-
- virtual uint64_t GetHashCode(void* hasher) {
- return static_cast<HasherType*>(hasher)->GetHashCode();
- }
-
- virtual void DestroryHasher(void* hasher) {
- HasherType* h = static_cast<HasherType*>(hasher);
- h->~HasherType();
- StateAllocator::Free(h);
- }
-
- virtual void* MallocState(size_t size) {
- return GetStateAllocator().Malloc(size);
- }
-
- virtual void* ReallocState(void* originalPtr, size_t originalSize, size_t newSize) {
- return GetStateAllocator().Realloc(originalPtr, originalSize, newSize);
- }
-
- virtual void FreeState(void* p) {
- return StateAllocator::Free(p);
- }
-
-private:
- typedef typename SchemaType::Context Context;
- typedef GenericValue<UTF8<>, StateAllocator> HashCodeArray;
- typedef internal::Hasher<EncodingType, StateAllocator> HasherType;
-
- GenericSchemaValidator(
- const SchemaDocumentType& schemaDocument,
- const SchemaType& root,
-#if RAPIDJSON_SCHEMA_VERBOSE
- unsigned depth,
-#endif
- StateAllocator* allocator = 0,
- size_t schemaStackCapacity = kDefaultSchemaStackCapacity,
- size_t documentStackCapacity = kDefaultDocumentStackCapacity)
- :
- schemaDocument_(&schemaDocument),
- root_(root),
- outputHandler_(GetNullHandler()),
- stateAllocator_(allocator),
- ownStateAllocator_(0),
- schemaStack_(allocator, schemaStackCapacity),
- documentStack_(allocator, documentStackCapacity),
- valid_(true)
-#if RAPIDJSON_SCHEMA_VERBOSE
- , depth_(depth)
-#endif
- {
- }
-
- StateAllocator& GetStateAllocator() {
- if (!stateAllocator_)
- stateAllocator_ = ownStateAllocator_ = RAPIDJSON_NEW(StateAllocator());
- return *stateAllocator_;
- }
-
- bool BeginValue() {
- if (schemaStack_.Empty())
- PushSchema(root_);
- else {
- if (CurrentContext().inArray)
- internal::TokenHelper<internal::Stack<StateAllocator>, Ch>::AppendIndexToken(documentStack_, CurrentContext().arrayElementIndex);
-
- if (!CurrentSchema().BeginValue(CurrentContext()))
- return false;
-
- SizeType count = CurrentContext().patternPropertiesSchemaCount;
- const SchemaType** sa = CurrentContext().patternPropertiesSchemas;
- typename Context::PatternValidatorType patternValidatorType = CurrentContext().valuePatternValidatorType;
- bool valueUniqueness = CurrentContext().valueUniqueness;
- if (CurrentContext().valueSchema)
- PushSchema(*CurrentContext().valueSchema);
-
- if (count > 0) {
- CurrentContext().objectPatternValidatorType = patternValidatorType;
- ISchemaValidator**& va = CurrentContext().patternPropertiesValidators;
- SizeType& validatorCount = CurrentContext().patternPropertiesValidatorCount;
- va = static_cast<ISchemaValidator**>(MallocState(sizeof(ISchemaValidator*) * count));
- for (SizeType i = 0; i < count; i++)
- va[validatorCount++] = CreateSchemaValidator(*sa[i]);
- }
-
- CurrentContext().arrayUniqueness = valueUniqueness;
- }
- return true;
- }
-
- bool EndValue() {
- if (!CurrentSchema().EndValue(CurrentContext()))
- return false;
-
-#if RAPIDJSON_SCHEMA_VERBOSE
- GenericStringBuffer<EncodingType> sb;
- schemaDocument_->GetPointer(&CurrentSchema()).Stringify(sb);
-
- *documentStack_.template Push<Ch>() = '\0';
- documentStack_.template Pop<Ch>(1);
- internal::PrintValidatorPointers(depth_, sb.GetString(), documentStack_.template Bottom<Ch>());
-#endif
-
- uint64_t h = CurrentContext().arrayUniqueness ? static_cast<HasherType*>(CurrentContext().hasher)->GetHashCode() : 0;
-
- PopSchema();
-
- if (!schemaStack_.Empty()) {
- Context& context = CurrentContext();
- if (context.valueUniqueness) {
- HashCodeArray* a = static_cast<HashCodeArray*>(context.arrayElementHashCodes);
- if (!a)
- CurrentContext().arrayElementHashCodes = a = new (GetStateAllocator().Malloc(sizeof(HashCodeArray))) HashCodeArray(kArrayType);
- for (typename HashCodeArray::ConstValueIterator itr = a->Begin(); itr != a->End(); ++itr)
- if (itr->GetUint64() == h)
- RAPIDJSON_INVALID_KEYWORD_RETURN(SchemaType::GetUniqueItemsString());
- a->PushBack(h, GetStateAllocator());
- }
- }
-
- // Remove the last token of document pointer
- while (!documentStack_.Empty() && *documentStack_.template Pop<Ch>(1) != '/')
- ;
-
- return true;
- }
-
- void AppendToken(const Ch* str, SizeType len) {
- documentStack_.template Reserve<Ch>(1 + len * 2); // worst case all characters are escaped as two characters
- *documentStack_.template PushUnsafe<Ch>() = '/';
- for (SizeType i = 0; i < len; i++) {
- if (str[i] == '~') {
- *documentStack_.template PushUnsafe<Ch>() = '~';
- *documentStack_.template PushUnsafe<Ch>() = '0';
- }
- else if (str[i] == '/') {
- *documentStack_.template PushUnsafe<Ch>() = '~';
- *documentStack_.template PushUnsafe<Ch>() = '1';
- }
- else
- *documentStack_.template PushUnsafe<Ch>() = str[i];
- }
- }
-
- RAPIDJSON_FORCEINLINE void PushSchema(const SchemaType& schema) { new (schemaStack_.template Push<Context>()) Context(*this, &schema); }
-
- RAPIDJSON_FORCEINLINE void PopSchema() {
- Context* c = schemaStack_.template Pop<Context>(1);
- if (HashCodeArray* a = static_cast<HashCodeArray*>(c->arrayElementHashCodes)) {
- a->~HashCodeArray();
- StateAllocator::Free(a);
- }
- c->~Context();
- }
-
- const SchemaType& CurrentSchema() const { return *schemaStack_.template Top<Context>()->schema; }
- Context& CurrentContext() { return *schemaStack_.template Top<Context>(); }
- const Context& CurrentContext() const { return *schemaStack_.template Top<Context>(); }
-
- static OutputHandler& GetNullHandler() {
- static OutputHandler nullHandler;
- return nullHandler;
- }
-
- static const size_t kDefaultSchemaStackCapacity = 1024;
- static const size_t kDefaultDocumentStackCapacity = 256;
- const SchemaDocumentType* schemaDocument_;
- const SchemaType& root_;
- OutputHandler& outputHandler_;
- StateAllocator* stateAllocator_;
- StateAllocator* ownStateAllocator_;
- internal::Stack<StateAllocator> schemaStack_; //!< stack to store the current path of schema (BaseSchemaType *)
- internal::Stack<StateAllocator> documentStack_; //!< stack to store the current path of validating document (Ch)
- bool valid_;
-#if RAPIDJSON_SCHEMA_VERBOSE
- unsigned depth_;
-#endif
-};
-
-typedef GenericSchemaValidator<SchemaDocument> SchemaValidator;
-
-///////////////////////////////////////////////////////////////////////////////
-// SchemaValidatingReader
-
-//! A helper class for parsing with validation.
-/*!
- This helper class is a functor, designed as a parameter of \ref GenericDocument::Populate().
-
- \tparam parseFlags Combination of \ref ParseFlag.
- \tparam InputStream Type of input stream, implementing Stream concept.
- \tparam SourceEncoding Encoding of the input stream.
- \tparam SchemaDocumentType Type of schema document.
- \tparam StackAllocator Allocator type for stack.
-*/
-template <
- unsigned parseFlags,
- typename InputStream,
- typename SourceEncoding,
- typename SchemaDocumentType = SchemaDocument,
- typename StackAllocator = CrtAllocator>
-class SchemaValidatingReader {
-public:
- typedef typename SchemaDocumentType::PointerType PointerType;
- typedef typename InputStream::Ch Ch;
-
- //! Constructor
- /*!
- \param is Input stream.
- \param sd Schema document.
- */
- SchemaValidatingReader(InputStream& is, const SchemaDocumentType& sd) : is_(is), sd_(sd), invalidSchemaKeyword_(), isValid_(true) {}
-
- template <typename Handler>
- bool operator()(Handler& handler) {
- GenericReader<SourceEncoding, typename SchemaDocumentType::EncodingType, StackAllocator> reader;
- GenericSchemaValidator<SchemaDocumentType, Handler> validator(sd_, handler);
- parseResult_ = reader.template Parse<parseFlags>(is_, validator);
-
- if ((isValid_ = validator.IsValid())) {
- invalidSchemaPointer_ = PointerType();
- invalidSchemaKeyword_ = 0;
- invalidDocumentPointer_ = PointerType();
- }
- else {
- invalidSchemaPointer_ = validator.GetInvalidSchemaPointer();
- invalidSchemaKeyword_ = validator.GetInvalidSchemaKeyword();
- invalidDocumentPointer_ = validator.GetInvalidDocumentPointer();
- }
-
- return parseResult_;
- }
-
- const ParseResult& GetParseResult() const { return parseResult_; }
- bool IsValid() const { return isValid_; }
- const PointerType& GetInvalidSchemaPointer() const { return invalidSchemaPointer_; }
- const Ch* GetInvalidSchemaKeyword() const { return invalidSchemaKeyword_; }
- const PointerType& GetInvalidDocumentPointer() const { return invalidDocumentPointer_; }
-
-private:
- InputStream& is_;
- const SchemaDocumentType& sd_;
-
- ParseResult parseResult_;
- PointerType invalidSchemaPointer_;
- const Ch* invalidSchemaKeyword_;
- PointerType invalidDocumentPointer_;
- bool isValid_;
-};
-
-RAPIDJSON_NAMESPACE_END
-
-#if defined(__GNUC__)
-RAPIDJSON_DIAG_POP
-#endif
-
-#ifdef __clang__
-RAPIDJSON_DIAG_POP
-#endif
-
-#endif // RAPIDJSON_SCHEMA_H_
diff --git a/3rdparty/rapidjson/include/rapidjson/stream.h b/3rdparty/rapidjson/include/rapidjson/stream.h
deleted file mode 100644
index dd2783b4134..00000000000
--- a/3rdparty/rapidjson/include/rapidjson/stream.h
+++ /dev/null
@@ -1,179 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 "rapidjson.h"
-
-#ifndef RAPIDJSON_STREAM_H_
-#define RAPIDJSON_STREAM_H_
-
-#include "encodings.h"
-
-RAPIDJSON_NAMESPACE_BEGIN
-
-///////////////////////////////////////////////////////////////////////////////
-// Stream
-
-/*! \class rapidjson::Stream
- \brief Concept for reading and writing characters.
-
- For read-only stream, no need to implement PutBegin(), Put(), Flush() and PutEnd().
-
- For write-only stream, only need to implement Put() and Flush().
-
-\code
-concept Stream {
- typename Ch; //!< Character type of the stream.
-
- //! Read the current character from stream without moving the read cursor.
- Ch Peek() const;
-
- //! Read the current character from stream and moving the read cursor to next character.
- Ch Take();
-
- //! Get the current read cursor.
- //! \return Number of characters read from start.
- size_t Tell();
-
- //! Begin writing operation at the current read pointer.
- //! \return The begin writer pointer.
- Ch* PutBegin();
-
- //! Write a character.
- void Put(Ch c);
-
- //! Flush the buffer.
- void Flush();
-
- //! End the writing operation.
- //! \param begin The begin write pointer returned by PutBegin().
- //! \return Number of characters written.
- size_t PutEnd(Ch* begin);
-}
-\endcode
-*/
-
-//! Provides additional information for stream.
-/*!
- By using traits pattern, this type provides a default configuration for stream.
- For custom stream, this type can be specialized for other configuration.
- See TEST(Reader, CustomStringStream) in readertest.cpp for example.
-*/
-template<typename Stream>
-struct StreamTraits {
- //! Whether to make local copy of stream for optimization during parsing.
- /*!
- By default, for safety, streams do not use local copy optimization.
- Stream that can be copied fast should specialize this, like StreamTraits<StringStream>.
- */
- enum { copyOptimization = 0 };
-};
-
-//! Reserve n characters for writing to a stream.
-template<typename Stream>
-inline void PutReserve(Stream& stream, size_t count) {
- (void)stream;
- (void)count;
-}
-
-//! Write character to a stream, presuming buffer is reserved.
-template<typename Stream>
-inline void PutUnsafe(Stream& stream, typename Stream::Ch c) {
- stream.Put(c);
-}
-
-//! Put N copies of a character to a stream.
-template<typename Stream, typename Ch>
-inline void PutN(Stream& stream, Ch c, size_t n) {
- PutReserve<Stream>(stream, n);
- for (size_t i = 0; i < n; i++)
- PutUnsafe(stream, c);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// StringStream
-
-//! Read-only string stream.
-/*! \note implements Stream concept
-*/
-template <typename Encoding>
-struct GenericStringStream {
- typedef typename Encoding::Ch Ch;
-
- GenericStringStream(const Ch *src) : src_(src), head_(src) {}
-
- Ch Peek() const { return *src_; }
- Ch Take() { return *src_++; }
- size_t Tell() const { return static_cast<size_t>(src_ - head_); }
-
- Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; }
- void Put(Ch) { RAPIDJSON_ASSERT(false); }
- void Flush() { RAPIDJSON_ASSERT(false); }
- size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; }
-
- const Ch* src_; //!< Current read position.
- const Ch* head_; //!< Original head of the string.
-};
-
-template <typename Encoding>
-struct StreamTraits<GenericStringStream<Encoding> > {
- enum { copyOptimization = 1 };
-};
-
-//! String stream with UTF8 encoding.
-typedef GenericStringStream<UTF8<> > StringStream;
-
-///////////////////////////////////////////////////////////////////////////////
-// InsituStringStream
-
-//! A read-write string stream.
-/*! This string stream is particularly designed for in-situ parsing.
- \note implements Stream concept
-*/
-template <typename Encoding>
-struct GenericInsituStringStream {
- typedef typename Encoding::Ch Ch;
-
- GenericInsituStringStream(Ch *src) : src_(src), dst_(0), head_(src) {}
-
- // Read
- Ch Peek() { return *src_; }
- Ch Take() { return *src_++; }
- size_t Tell() { return static_cast<size_t>(src_ - head_); }
-
- // Write
- void Put(Ch c) { RAPIDJSON_ASSERT(dst_ != 0); *dst_++ = c; }
-
- Ch* PutBegin() { return dst_ = src_; }
- size_t PutEnd(Ch* begin) { return static_cast<size_t>(dst_ - begin); }
- void Flush() {}
-
- Ch* Push(size_t count) { Ch* begin = dst_; dst_ += count; return begin; }
- void Pop(size_t count) { dst_ -= count; }
-
- Ch* src_;
- Ch* dst_;
- Ch* head_;
-};
-
-template <typename Encoding>
-struct StreamTraits<GenericInsituStringStream<Encoding> > {
- enum { copyOptimization = 1 };
-};
-
-//! Insitu string stream with UTF8 encoding.
-typedef GenericInsituStringStream<UTF8<> > InsituStringStream;
-
-RAPIDJSON_NAMESPACE_END
-
-#endif // RAPIDJSON_STREAM_H_
diff --git a/3rdparty/rapidjson/include/rapidjson/stringbuffer.h b/3rdparty/rapidjson/include/rapidjson/stringbuffer.h
deleted file mode 100644
index 78f34d2098e..00000000000
--- a/3rdparty/rapidjson/include/rapidjson/stringbuffer.h
+++ /dev/null
@@ -1,117 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 RAPIDJSON_STRINGBUFFER_H_
-#define RAPIDJSON_STRINGBUFFER_H_
-
-#include "stream.h"
-#include "internal/stack.h"
-
-#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
-#include <utility> // std::move
-#endif
-
-#include "internal/stack.h"
-
-#if defined(__clang__)
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(c++98-compat)
-#endif
-
-RAPIDJSON_NAMESPACE_BEGIN
-
-//! Represents an in-memory output stream.
-/*!
- \tparam Encoding Encoding of the stream.
- \tparam Allocator type for allocating memory buffer.
- \note implements Stream concept
-*/
-template <typename Encoding, typename Allocator = CrtAllocator>
-class GenericStringBuffer {
-public:
- typedef typename Encoding::Ch Ch;
-
- GenericStringBuffer(Allocator* allocator = 0, size_t capacity = kDefaultCapacity) : stack_(allocator, capacity) {}
-
-#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
- GenericStringBuffer(GenericStringBuffer&& rhs) : stack_(std::move(rhs.stack_)) {}
- GenericStringBuffer& operator=(GenericStringBuffer&& rhs) {
- if (&rhs != this)
- stack_ = std::move(rhs.stack_);
- return *this;
- }
-#endif
-
- void Put(Ch c) { *stack_.template Push<Ch>() = c; }
- void PutUnsafe(Ch c) { *stack_.template PushUnsafe<Ch>() = c; }
- void Flush() {}
-
- void Clear() { stack_.Clear(); }
- void ShrinkToFit() {
- // Push and pop a null terminator. This is safe.
- *stack_.template Push<Ch>() = '\0';
- stack_.ShrinkToFit();
- stack_.template Pop<Ch>(1);
- }
-
- void Reserve(size_t count) { stack_.template Reserve<Ch>(count); }
- Ch* Push(size_t count) { return stack_.template Push<Ch>(count); }
- Ch* PushUnsafe(size_t count) { return stack_.template PushUnsafe<Ch>(count); }
- void Pop(size_t count) { stack_.template Pop<Ch>(count); }
-
- const Ch* GetString() const {
- // Push and pop a null terminator. This is safe.
- *stack_.template Push<Ch>() = '\0';
- stack_.template Pop<Ch>(1);
-
- return stack_.template Bottom<Ch>();
- }
-
- size_t GetSize() const { return stack_.GetSize(); }
-
- static const size_t kDefaultCapacity = 256;
- mutable internal::Stack<Allocator> stack_;
-
-private:
- // Prohibit copy constructor & assignment operator.
- GenericStringBuffer(const GenericStringBuffer&);
- GenericStringBuffer& operator=(const GenericStringBuffer&);
-};
-
-//! String buffer with UTF8 encoding
-typedef GenericStringBuffer<UTF8<> > StringBuffer;
-
-template<typename Encoding, typename Allocator>
-inline void PutReserve(GenericStringBuffer<Encoding, Allocator>& stream, size_t count) {
- stream.Reserve(count);
-}
-
-template<typename Encoding, typename Allocator>
-inline void PutUnsafe(GenericStringBuffer<Encoding, Allocator>& stream, typename Encoding::Ch c) {
- stream.PutUnsafe(c);
-}
-
-//! Implement specialized version of PutN() with memset() for better performance.
-template<>
-inline void PutN(GenericStringBuffer<UTF8<> >& stream, char c, size_t n) {
- std::memset(stream.stack_.Push<char>(n), c, n * sizeof(c));
-}
-
-RAPIDJSON_NAMESPACE_END
-
-#if defined(__clang__)
-RAPIDJSON_DIAG_POP
-#endif
-
-#endif // RAPIDJSON_STRINGBUFFER_H_
diff --git a/3rdparty/rapidjson/include/rapidjson/writer.h b/3rdparty/rapidjson/include/rapidjson/writer.h
deleted file mode 100644
index a64c79fe245..00000000000
--- a/3rdparty/rapidjson/include/rapidjson/writer.h
+++ /dev/null
@@ -1,558 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 RAPIDJSON_WRITER_H_
-#define RAPIDJSON_WRITER_H_
-
-#include "stream.h"
-#include "internal/stack.h"
-#include "internal/strfunc.h"
-#include "internal/dtoa.h"
-#include "internal/itoa.h"
-#include "stringbuffer.h"
-#include <new> // placement new
-
-#ifdef _MSC_VER
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(4127) // conditional expression is constant
-#endif
-
-#ifdef __clang__
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(padded)
-#endif
-
-RAPIDJSON_NAMESPACE_BEGIN
-
-///////////////////////////////////////////////////////////////////////////////
-// WriteFlag
-
-/*! \def RAPIDJSON_WRITE_DEFAULT_FLAGS
- \ingroup RAPIDJSON_CONFIG
- \brief User-defined kWriteDefaultFlags definition.
-
- User can define this as any \c WriteFlag combinations.
-*/
-#ifndef RAPIDJSON_WRITE_DEFAULT_FLAGS
-#define RAPIDJSON_WRITE_DEFAULT_FLAGS kWriteNoFlags
-#endif
-
-//! Combination of writeFlags
-enum WriteFlag {
- kWriteNoFlags = 0, //!< No flags are set.
- kWriteValidateEncodingFlag = 1, //!< Validate encoding of JSON strings.
- kWriteDefaultFlags = RAPIDJSON_WRITE_DEFAULT_FLAGS //!< Default write flags. Can be customized by defining RAPIDJSON_WRITE_DEFAULT_FLAGS
-};
-
-//! JSON writer
-/*! Writer implements the concept Handler.
- It generates JSON text by events to an output os.
-
- User may programmatically calls the functions of a writer to generate JSON text.
-
- On the other side, a writer can also be passed to objects that generates events,
-
- for example Reader::Parse() and Document::Accept().
-
- \tparam OutputStream Type of output stream.
- \tparam SourceEncoding Encoding of source string.
- \tparam TargetEncoding Encoding of output stream.
- \tparam StackAllocator Type of allocator for allocating memory of stack.
- \note implements Handler concept
-*/
-template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags>
-class Writer {
-public:
- typedef typename SourceEncoding::Ch Ch;
-
- static const int kDefaultMaxDecimalPlaces = 324;
-
- //! Constructor
- /*! \param os Output stream.
- \param stackAllocator User supplied allocator. If it is null, it will create a private one.
- \param levelDepth Initial capacity of stack.
- */
- explicit
- Writer(OutputStream& os, StackAllocator* stackAllocator = 0, size_t levelDepth = kDefaultLevelDepth) :
- os_(&os), level_stack_(stackAllocator, levelDepth * sizeof(Level)), maxDecimalPlaces_(kDefaultMaxDecimalPlaces), hasRoot_(false) {}
-
- explicit
- Writer(StackAllocator* allocator = 0, size_t levelDepth = kDefaultLevelDepth) :
- os_(0), level_stack_(allocator, levelDepth * sizeof(Level)), maxDecimalPlaces_(kDefaultMaxDecimalPlaces), hasRoot_(false) {}
-
- //! Reset the writer with a new stream.
- /*!
- This function reset the writer with a new stream and default settings,
- in order to make a Writer object reusable for output multiple JSONs.
-
- \param os New output stream.
- \code
- Writer<OutputStream> writer(os1);
- writer.StartObject();
- // ...
- writer.EndObject();
-
- writer.Reset(os2);
- writer.StartObject();
- // ...
- writer.EndObject();
- \endcode
- */
- void Reset(OutputStream& os) {
- os_ = &os;
- hasRoot_ = false;
- level_stack_.Clear();
- }
-
- //! Checks whether the output is a complete JSON.
- /*!
- A complete JSON has a complete root object or array.
- */
- bool IsComplete() const {
- return hasRoot_ && level_stack_.Empty();
- }
-
- int GetMaxDecimalPlaces() const {
- return maxDecimalPlaces_;
- }
-
- //! Sets the maximum number of decimal places for double output.
- /*!
- This setting truncates the output with specified number of decimal places.
-
- For example,
-
- \code
- writer.SetMaxDecimalPlaces(3);
- writer.StartArray();
- writer.Double(0.12345); // "0.123"
- writer.Double(0.0001); // "0.0"
- writer.Double(1.234567890123456e30); // "1.234567890123456e30" (do not truncate significand for positive exponent)
- writer.Double(1.23e-4); // "0.0" (do truncate significand for negative exponent)
- writer.EndArray();
- \endcode
-
- The default setting does not truncate any decimal places. You can restore to this setting by calling
- \code
- writer.SetMaxDecimalPlaces(Writer::kDefaultMaxDecimalPlaces);
- \endcode
- */
- void SetMaxDecimalPlaces(int maxDecimalPlaces) {
- maxDecimalPlaces_ = maxDecimalPlaces;
- }
-
- /*!@name Implementation of Handler
- \see Handler
- */
- //@{
-
- bool Null() { Prefix(kNullType); return WriteNull(); }
- bool Bool(bool b) { Prefix(b ? kTrueType : kFalseType); return WriteBool(b); }
- bool Int(int i) { Prefix(kNumberType); return WriteInt(i); }
- bool Uint(unsigned u) { Prefix(kNumberType); return WriteUint(u); }
- bool Int64(int64_t i64) { Prefix(kNumberType); return WriteInt64(i64); }
- bool Uint64(uint64_t u64) { Prefix(kNumberType); return WriteUint64(u64); }
-
- //! Writes the given \c double value to the stream
- /*!
- \param d The value to be written.
- \return Whether it is succeed.
- */
- bool Double(double d) { Prefix(kNumberType); return WriteDouble(d); }
-
- bool String(const Ch* str, SizeType length, bool copy = false) {
- (void)copy;
- Prefix(kStringType);
- return WriteString(str, length);
- }
-
-#if RAPIDJSON_HAS_STDSTRING
- bool String(const std::basic_string<Ch>& str) {
- return String(str.data(), SizeType(str.size()));
- }
-#endif
-
- bool StartObject() {
- Prefix(kObjectType);
- new (level_stack_.template Push<Level>()) Level(false);
- return WriteStartObject();
- }
-
- bool Key(const Ch* str, SizeType length, bool copy = false) { return String(str, length, copy); }
-
- bool EndObject(SizeType memberCount = 0) {
- (void)memberCount;
- RAPIDJSON_ASSERT(level_stack_.GetSize() >= sizeof(Level));
- RAPIDJSON_ASSERT(!level_stack_.template Top<Level>()->inArray);
- level_stack_.template Pop<Level>(1);
- bool ret = WriteEndObject();
- if (RAPIDJSON_UNLIKELY(level_stack_.Empty())) // end of json text
- os_->Flush();
- return ret;
- }
-
- bool StartArray() {
- Prefix(kArrayType);
- new (level_stack_.template Push<Level>()) Level(true);
- return WriteStartArray();
- }
-
- bool EndArray(SizeType elementCount = 0) {
- (void)elementCount;
- RAPIDJSON_ASSERT(level_stack_.GetSize() >= sizeof(Level));
- RAPIDJSON_ASSERT(level_stack_.template Top<Level>()->inArray);
- level_stack_.template Pop<Level>(1);
- bool ret = WriteEndArray();
- if (RAPIDJSON_UNLIKELY(level_stack_.Empty())) // end of json text
- os_->Flush();
- return ret;
- }
- //@}
-
- /*! @name Convenience extensions */
- //@{
-
- //! Simpler but slower overload.
- bool String(const Ch* str) { return String(str, internal::StrLen(str)); }
- bool Key(const Ch* str) { return Key(str, internal::StrLen(str)); }
-
- //@}
-
- //! Write a raw JSON value.
- /*!
- For user to write a stringified JSON as a value.
-
- \param json A well-formed JSON value. It should not contain null character within [0, length - 1] range.
- \param length Length of the json.
- \param type Type of the root of json.
- */
- bool RawValue(const Ch* json, size_t length, Type type) { Prefix(type); return WriteRawValue(json, length); }
-
-protected:
- //! Information for each nested level
- struct Level {
- Level(bool inArray_) : valueCount(0), inArray(inArray_) {}
- size_t valueCount; //!< number of values in this level
- bool inArray; //!< true if in array, otherwise in object
- };
-
- static const size_t kDefaultLevelDepth = 32;
-
- bool WriteNull() {
- PutReserve(*os_, 4);
- PutUnsafe(*os_, 'n'); PutUnsafe(*os_, 'u'); PutUnsafe(*os_, 'l'); PutUnsafe(*os_, 'l'); return true;
- }
-
- bool WriteBool(bool b) {
- if (b) {
- PutReserve(*os_, 4);
- PutUnsafe(*os_, 't'); PutUnsafe(*os_, 'r'); PutUnsafe(*os_, 'u'); PutUnsafe(*os_, 'e');
- }
- else {
- PutReserve(*os_, 5);
- PutUnsafe(*os_, 'f'); PutUnsafe(*os_, 'a'); PutUnsafe(*os_, 'l'); PutUnsafe(*os_, 's'); PutUnsafe(*os_, 'e');
- }
- return true;
- }
-
- bool WriteInt(int i) {
- char buffer[11];
- const char* end = internal::i32toa(i, buffer);
- PutReserve(*os_, static_cast<size_t>(end - buffer));
- for (const char* p = buffer; p != end; ++p)
- PutUnsafe(*os_, static_cast<typename TargetEncoding::Ch>(*p));
- return true;
- }
-
- bool WriteUint(unsigned u) {
- char buffer[10];
- const char* end = internal::u32toa(u, buffer);
- PutReserve(*os_, static_cast<size_t>(end - buffer));
- for (const char* p = buffer; p != end; ++p)
- PutUnsafe(*os_, static_cast<typename TargetEncoding::Ch>(*p));
- return true;
- }
-
- bool WriteInt64(int64_t i64) {
- char buffer[21];
- const char* end = internal::i64toa(i64, buffer);
- PutReserve(*os_, static_cast<size_t>(end - buffer));
- for (const char* p = buffer; p != end; ++p)
- PutUnsafe(*os_, static_cast<typename TargetEncoding::Ch>(*p));
- return true;
- }
-
- bool WriteUint64(uint64_t u64) {
- char buffer[20];
- char* end = internal::u64toa(u64, buffer);
- PutReserve(*os_, static_cast<size_t>(end - buffer));
- for (char* p = buffer; p != end; ++p)
- PutUnsafe(*os_, static_cast<typename TargetEncoding::Ch>(*p));
- return true;
- }
-
- bool WriteDouble(double d) {
- if (internal::Double(d).IsNanOrInf())
- return false;
-
- char buffer[25];
- char* end = internal::dtoa(d, buffer, maxDecimalPlaces_);
- PutReserve(*os_, static_cast<size_t>(end - buffer));
- for (char* p = buffer; p != end; ++p)
- PutUnsafe(*os_, static_cast<typename TargetEncoding::Ch>(*p));
- return true;
- }
-
- bool WriteString(const Ch* str, SizeType length) {
- static const typename TargetEncoding::Ch hexDigits[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
- static const char escape[256] = {
-#define Z16 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
- //0 1 2 3 4 5 6 7 8 9 A B C D E F
- 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'b', 't', 'n', 'u', 'f', 'r', 'u', 'u', // 00
- 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', // 10
- 0, 0, '"', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 20
- Z16, Z16, // 30~4F
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,'\\', 0, 0, 0, // 50
- Z16, Z16, Z16, Z16, Z16, Z16, Z16, Z16, Z16, Z16 // 60~FF
-#undef Z16
- };
-
- if (TargetEncoding::supportUnicode)
- PutReserve(*os_, 2 + length * 6); // "\uxxxx..."
- else
- PutReserve(*os_, 2 + length * 12); // "\uxxxx\uyyyy..."
-
- PutUnsafe(*os_, '\"');
- GenericStringStream<SourceEncoding> is(str);
- while (ScanWriteUnescapedString(is, length)) {
- const Ch c = is.Peek();
- if (!TargetEncoding::supportUnicode && static_cast<unsigned>(c) >= 0x80) {
- // Unicode escaping
- unsigned codepoint;
- if (RAPIDJSON_UNLIKELY(!SourceEncoding::Decode(is, &codepoint)))
- return false;
- PutUnsafe(*os_, '\\');
- PutUnsafe(*os_, 'u');
- if (codepoint <= 0xD7FF || (codepoint >= 0xE000 && codepoint <= 0xFFFF)) {
- PutUnsafe(*os_, hexDigits[(codepoint >> 12) & 15]);
- PutUnsafe(*os_, hexDigits[(codepoint >> 8) & 15]);
- PutUnsafe(*os_, hexDigits[(codepoint >> 4) & 15]);
- PutUnsafe(*os_, hexDigits[(codepoint ) & 15]);
- }
- else {
- RAPIDJSON_ASSERT(codepoint >= 0x010000 && codepoint <= 0x10FFFF);
- // Surrogate pair
- unsigned s = codepoint - 0x010000;
- unsigned lead = (s >> 10) + 0xD800;
- unsigned trail = (s & 0x3FF) + 0xDC00;
- PutUnsafe(*os_, hexDigits[(lead >> 12) & 15]);
- PutUnsafe(*os_, hexDigits[(lead >> 8) & 15]);
- PutUnsafe(*os_, hexDigits[(lead >> 4) & 15]);
- PutUnsafe(*os_, hexDigits[(lead ) & 15]);
- PutUnsafe(*os_, '\\');
- PutUnsafe(*os_, 'u');
- PutUnsafe(*os_, hexDigits[(trail >> 12) & 15]);
- PutUnsafe(*os_, hexDigits[(trail >> 8) & 15]);
- PutUnsafe(*os_, hexDigits[(trail >> 4) & 15]);
- PutUnsafe(*os_, hexDigits[(trail ) & 15]);
- }
- }
- else if ((sizeof(Ch) == 1 || static_cast<unsigned>(c) < 256) && RAPIDJSON_UNLIKELY(escape[static_cast<unsigned char>(c)])) {
- is.Take();
- PutUnsafe(*os_, '\\');
- PutUnsafe(*os_, static_cast<typename TargetEncoding::Ch>(escape[static_cast<unsigned char>(c)]));
- if (escape[static_cast<unsigned char>(c)] == 'u') {
- PutUnsafe(*os_, '0');
- PutUnsafe(*os_, '0');
- PutUnsafe(*os_, hexDigits[static_cast<unsigned char>(c) >> 4]);
- PutUnsafe(*os_, hexDigits[static_cast<unsigned char>(c) & 0xF]);
- }
- }
- else if (RAPIDJSON_UNLIKELY(!(writeFlags & kWriteValidateEncodingFlag ?
- Transcoder<SourceEncoding, TargetEncoding>::Validate(is, *os_) :
- Transcoder<SourceEncoding, TargetEncoding>::TranscodeUnsafe(is, *os_))))
- return false;
- }
- PutUnsafe(*os_, '\"');
- return true;
- }
-
- bool ScanWriteUnescapedString(GenericStringStream<SourceEncoding>& is, size_t length) {
- return RAPIDJSON_LIKELY(is.Tell() < length);
- }
-
- bool WriteStartObject() { os_->Put('{'); return true; }
- bool WriteEndObject() { os_->Put('}'); return true; }
- bool WriteStartArray() { os_->Put('['); return true; }
- bool WriteEndArray() { os_->Put(']'); return true; }
-
- bool WriteRawValue(const Ch* json, size_t length) {
- PutReserve(*os_, length);
- for (size_t i = 0; i < length; i++) {
- RAPIDJSON_ASSERT(json[i] != '\0');
- PutUnsafe(*os_, json[i]);
- }
- return true;
- }
-
- void Prefix(Type type) {
- (void)type;
- if (RAPIDJSON_LIKELY(level_stack_.GetSize() != 0)) { // this value is not at root
- Level* level = level_stack_.template Top<Level>();
- if (level->valueCount > 0) {
- if (level->inArray)
- os_->Put(','); // add comma if it is not the first element in array
- else // in object
- os_->Put((level->valueCount % 2 == 0) ? ',' : ':');
- }
- if (!level->inArray && level->valueCount % 2 == 0)
- RAPIDJSON_ASSERT(type == kStringType); // if it's in object, then even number should be a name
- level->valueCount++;
- }
- else {
- RAPIDJSON_ASSERT(!hasRoot_); // Should only has one and only one root.
- hasRoot_ = true;
- }
- }
-
- OutputStream* os_;
- internal::Stack<StackAllocator> level_stack_;
- int maxDecimalPlaces_;
- bool hasRoot_;
-
-private:
- // Prohibit copy constructor & assignment operator.
- Writer(const Writer&);
- Writer& operator=(const Writer&);
-};
-
-// Full specialization for StringStream to prevent memory copying
-
-template<>
-inline bool Writer<StringBuffer>::WriteInt(int i) {
- char *buffer = os_->Push(11);
- const char* end = internal::i32toa(i, buffer);
- os_->Pop(static_cast<size_t>(11 - (end - buffer)));
- return true;
-}
-
-template<>
-inline bool Writer<StringBuffer>::WriteUint(unsigned u) {
- char *buffer = os_->Push(10);
- const char* end = internal::u32toa(u, buffer);
- os_->Pop(static_cast<size_t>(10 - (end - buffer)));
- return true;
-}
-
-template<>
-inline bool Writer<StringBuffer>::WriteInt64(int64_t i64) {
- char *buffer = os_->Push(21);
- const char* end = internal::i64toa(i64, buffer);
- os_->Pop(static_cast<size_t>(21 - (end - buffer)));
- return true;
-}
-
-template<>
-inline bool Writer<StringBuffer>::WriteUint64(uint64_t u) {
- char *buffer = os_->Push(20);
- const char* end = internal::u64toa(u, buffer);
- os_->Pop(static_cast<size_t>(20 - (end - buffer)));
- return true;
-}
-
-template<>
-inline bool Writer<StringBuffer>::WriteDouble(double d) {
- if (internal::Double(d).IsNanOrInf())
- return false;
-
- char *buffer = os_->Push(25);
- char* end = internal::dtoa(d, buffer, maxDecimalPlaces_);
- os_->Pop(static_cast<size_t>(25 - (end - buffer)));
- return true;
-}
-
-#if defined(RAPIDJSON_SSE2) || defined(RAPIDJSON_SSE42)
-template<>
-inline bool Writer<StringBuffer>::ScanWriteUnescapedString(StringStream& is, size_t length) {
- if (length < 16)
- return RAPIDJSON_LIKELY(is.Tell() < length);
-
- if (!RAPIDJSON_LIKELY(is.Tell() < length))
- return false;
-
- const char* p = is.src_;
- const char* end = is.head_ + length;
- const char* nextAligned = reinterpret_cast<const char*>((reinterpret_cast<size_t>(p) + 15) & static_cast<size_t>(~15));
- const char* endAligned = reinterpret_cast<const char*>(reinterpret_cast<size_t>(end) & static_cast<size_t>(~15));
- if (nextAligned > end)
- return true;
-
- while (p != nextAligned)
- if (*p < 0x20 || *p == '\"' || *p == '\\') {
- is.src_ = p;
- return RAPIDJSON_LIKELY(is.Tell() < length);
- }
- else
- os_->PutUnsafe(*p++);
-
- // The rest of string using SIMD
- static const char dquote[16] = { '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"' };
- static const char bslash[16] = { '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\' };
- static const char space[16] = { 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19 };
- const __m128i dq = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&dquote[0]));
- const __m128i bs = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&bslash[0]));
- const __m128i sp = _mm_loadu_si128(reinterpret_cast<const __m128i *>(&space[0]));
-
- for (; p != endAligned; p += 16) {
- const __m128i s = _mm_load_si128(reinterpret_cast<const __m128i *>(p));
- const __m128i t1 = _mm_cmpeq_epi8(s, dq);
- const __m128i t2 = _mm_cmpeq_epi8(s, bs);
- const __m128i t3 = _mm_cmpeq_epi8(_mm_max_epu8(s, sp), sp); // s < 0x20 <=> max(s, 0x19) == 0x19
- const __m128i x = _mm_or_si128(_mm_or_si128(t1, t2), t3);
- unsigned short r = static_cast<unsigned short>(_mm_movemask_epi8(x));
- if (RAPIDJSON_UNLIKELY(r != 0)) { // some of characters is escaped
- SizeType len;
-#ifdef _MSC_VER // Find the index of first escaped
- unsigned long offset;
- _BitScanForward(&offset, r);
- len = offset;
-#else
- len = static_cast<SizeType>(__builtin_ffs(r) - 1);
-#endif
- char* q = reinterpret_cast<char*>(os_->PushUnsafe(len));
- for (size_t i = 0; i < len; i++)
- q[i] = p[i];
-
- p += len;
- break;
- }
- _mm_storeu_si128(reinterpret_cast<__m128i *>(os_->PushUnsafe(16)), s);
- }
-
- is.src_ = p;
- return RAPIDJSON_LIKELY(is.Tell() < length);
-}
-#endif // defined(RAPIDJSON_SSE2) || defined(RAPIDJSON_SSE42)
-
-RAPIDJSON_NAMESPACE_END
-
-#ifdef _MSC_VER
-RAPIDJSON_DIAG_POP
-#endif
-
-#ifdef __clang__
-RAPIDJSON_DIAG_POP
-#endif
-
-#endif // RAPIDJSON_RAPIDJSON_H_
diff --git a/3rdparty/rapidjson/library.json b/3rdparty/rapidjson/library.json
deleted file mode 100644
index 47fd352ac7e..00000000000
--- a/3rdparty/rapidjson/library.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "name": "RapidJSON",
- "keywords": "json, sax, dom, parser, generator",
- "description": "A fast JSON parser/generator for C++ with both SAX/DOM style API",
- "include": "include",
- "examples": "example/*/*.cpp",
- "repository":
- {
- "type": "git",
- "url": "https://github.com/miloyip/rapidjson"
- }
-}
diff --git a/3rdparty/rapidjson/license.txt b/3rdparty/rapidjson/license.txt
deleted file mode 100644
index 7ccc161c84b..00000000000
--- a/3rdparty/rapidjson/license.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-Tencent is pleased to support the open source community by making RapidJSON available.
-
-Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-
-If you have downloaded a copy of the RapidJSON binary from Tencent, please note that the RapidJSON binary is licensed under the MIT License.
-If you have downloaded a copy of the RapidJSON source code from Tencent, please note that RapidJSON source code is licensed under the MIT License, except for the third-party components listed below which are subject to different license terms. Your integration of RapidJSON into your own projects may require compliance with the MIT License, as well as the other licenses applicable to the third-party components included within RapidJSON. To avoid the problematic JSON license in your own projects, it's sufficient to exclude the bin/jsonchecker/ directory, as it's the only code under the JSON license.
-A copy of the MIT License is included in this file.
-
-Other dependencies and licenses:
-
-Open Source Software Licensed Under the BSD License:
---------------------------------------------------------------------
-
-The msinttypes r29
-Copyright (c) 2006-2013 Alexander Chemeris
-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 copyright holder 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 REGENTS 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 REGENTS AND 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.
-
-Open Source Software Licensed Under the JSON License:
---------------------------------------------------------------------
-
-json.org
-Copyright (c) 2002 JSON.org
-All Rights Reserved.
-
-JSON_checker
-Copyright (c) 2002 JSON.org
-All Rights Reserved.
-
-
-Terms of the JSON License:
----------------------------------------------------
-
-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 shall be used for Good, not Evil.
-
-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.
-
-
-Terms of the MIT License:
---------------------------------------------------------------------
-
-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/3rdparty/rapidjson/rapidjson.autopkg b/3rdparty/rapidjson/rapidjson.autopkg
deleted file mode 100644
index d91aaeff681..00000000000
--- a/3rdparty/rapidjson/rapidjson.autopkg
+++ /dev/null
@@ -1,75 +0,0 @@
-nuget {
- //Usage: Write-NuGetPackage rapidjson.autopkg -defines:MYVERSION=1.0.2
- //Be sure you are running Powershell 3.0 and have the CoApp powershell extensions installed properly.
- nuspec {
- id = rapidjson;
- version : ${MYVERSION};
- title: "rapidjson";
- authors: {"https://github.com/miloyip/rapidjson/releases/tag/v1.0.2"};
- owners: {"@lsantos (github)"};
- licenseUrl: "https://github.com/miloyip/rapidjson/blob/master/license.txt";
- projectUrl: "https://github.com/miloyip/rapidjson/";
- iconUrl: "https://cdn1.iconfinder.com/data/icons/fatcow/32x32/json.png";
- requireLicenseAcceptance:false;
- summary: @"A fast JSON parser/generator for C++ with both SAX/DOM style API";
-
- // if you need to span several lines you can prefix a string with an @ symbol (exactly like c# does).
- description: @"Rapidjson is an attempt to create the fastest JSON parser and generator.
-
- - Small but complete. Supports both SAX and DOM style API. SAX parser only a few hundred lines of code.
- - Fast. In the order of magnitude of strlen(). Optionally supports SSE2/SSE4.2 for acceleration.
- - Self-contained. Minimal dependency on standard libraries. No BOOST, not even STL.
- - Compact. Each JSON value is 16 or 20 bytes for 32 or 64-bit machines respectively (excluding text string storage). With the custom memory allocator, parser allocates memory compactly during parsing.
- - Full RFC4627 compliance. Supports UTF-8, UTF-16 and UTF-32.
- - Support both in-situ parsing (directly decode strings into the source JSON text) and non-destructive parsing (decode strings into new buffers).
- - Parse number to int/unsigned/int64_t/uint64_t/double depending on input
- - Support custom memory allocation. Also, the default memory pool allocator can also be supplied with a user buffer (such as a buffer allocated on user's heap or - programme stack) to minimize allocation.
-
- As the name implies, rapidjson is inspired by rapidxml.";
-
- releaseNotes: @"
-Added
- Add Value::XXXMember(...) overloads for std::string (#335)
-
-Fixed
- Include rapidjson.h for all internal/error headers.
- Parsing some numbers incorrectly in full-precision mode (kFullPrecisionParseFlag) (#342)
- Fix alignment of 64bit platforms (#328)
- Fix MemoryPoolAllocator::Clear() to clear user-buffer (0691502)
-
-Changed
- CMakeLists for include as a thirdparty in projects (#334, #337)
- Change Document::ParseStream() to use stack allocator for Reader (ffbe386)";
-
- copyright: "Copyright 2015";
- tags: { native, coapp, JSON, nativepackage };
- language: en-US;
- };
-
- dependencies {
- packages : {
- //TODO: Add dependecies here in [pkg.name]/[version] form per newline
- //zlib/[1.2.8],
- };
- }
-
- // the files that go into the content folders
- files {
- #defines {
- SDK_ROOT = .\;
- }
-
- // grab all the files in the include folder
- // the folder that contains all the .h files will
- // automatically get added to the Includes path.
- nestedinclude += {
- #destination = ${d_include}rapidjson;
- "${SDK_ROOT}include\rapidjson\**\*.h"
- };
- };
-
- targets {
- // We're trying to be standard about these sorts of thing. (Will help with config.h later :D)
- //Defines += HAS_EQCORE;
- };
-} \ No newline at end of file
diff --git a/3rdparty/rapidjson/readme.md b/3rdparty/rapidjson/readme.md
deleted file mode 100644
index 9a3d6a7b5be..00000000000
--- a/3rdparty/rapidjson/readme.md
+++ /dev/null
@@ -1,129 +0,0 @@
-![](doc/logo/rapidjson.png)
-
-![](https://img.shields.io/badge/release-v1.0.2-blue.png)
-
-## A fast JSON parser/generator for C++ with both SAX/DOM style API
-
-Tencent is pleased to support the open source community by making RapidJSON available.
-
-Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-
-* [RapidJSON GitHub](https://github.com/miloyip/rapidjson/)
-* RapidJSON Documentation
- * [English](http://rapidjson.org/)
- * [简体中文](http://rapidjson.org/zh-cn/)
- * [GitBook](https://www.gitbook.com/book/miloyip/rapidjson/) with downloadable PDF/EPUB/MOBI, without API reference.
-
-## Build status
-
-| [Linux][lin-link] | [Windows][win-link] | [Coveralls][cov-link] |
-| :---------------: | :-----------------: | :-------------------: |
-| ![lin-badge] | ![win-badge] | ![cov-badge] |
-
-[lin-badge]: https://travis-ci.org/miloyip/rapidjson.png?branch=master "Travis build status"
-[lin-link]: https://travis-ci.org/miloyip/rapidjson "Travis build status"
-[win-badge]: https://ci.appveyor.com/api/projects/status/u658dcuwxo14a8m9/branch/master "AppVeyor build status"
-[win-link]: https://ci.appveyor.com/project/miloyip/rapidjson/branch/master "AppVeyor build status"
-[cov-badge]: https://coveralls.io/repos/miloyip/rapidjson/badge.png?branch=master
-[cov-link]: https://coveralls.io/r/miloyip/rapidjson?branch=master
-
-## Introduction
-
-RapidJSON is a JSON parser and generator for C++. It was inspired by [RapidXml](http://rapidxml.sourceforge.net/).
-
-* RapidJSON is **small** but **complete**. It supports both SAX and DOM style API. The SAX parser is only a half thousand lines of code.
-
-* RapidJSON is **fast**. Its performance can be comparable to `strlen()`. It also optionally supports SSE2/SSE4.2 for acceleration.
-
-* RapidJSON is **self-contained** and **header-only**. It does not depend on external libraries such as BOOST. It even does not depend on STL.
-
-* RapidJSON is **memory-friendly**. Each JSON value occupies exactly 16/20 bytes for most 32/64-bit machines (excluding text string). By default it uses a fast memory allocator, and the parser allocates memory compactly during parsing.
-
-* RapidJSON is **Unicode-friendly**. It supports UTF-8, UTF-16, UTF-32 (LE & BE), and their detection, validation and transcoding internally. For example, you can read a UTF-8 file and let RapidJSON transcode the JSON strings into UTF-16 in the DOM. It also supports surrogates and "\u0000" (null character).
-
-More features can be read [here](doc/features.md).
-
-JSON(JavaScript Object Notation) is a light-weight data exchange format. RapidJSON should be in fully compliance with RFC7159/ECMA-404. More information about JSON can be obtained at
-* [Introducing JSON](http://json.org/)
-* [RFC7159: The JavaScript Object Notation (JSON) Data Interchange Format](http://www.ietf.org/rfc/rfc7159.txt)
-* [Standard ECMA-404: The JSON Data Interchange Format](http://www.ecma-international.org/publications/standards/Ecma-404.htm)
-
-## Compatibility
-
-RapidJSON is cross-platform. Some platform/compiler combinations which have been tested are shown as follows.
-* Visual C++ 2008/2010/2013 on Windows (32/64-bit)
-* GNU C++ 3.8.x on Cygwin
-* Clang 3.4 on Mac OS X (32/64-bit) and iOS
-* Clang 3.4 on Android NDK
-
-Users can build and run the unit tests on their platform/compiler.
-
-## Installation
-
-RapidJSON is a header-only C++ library. Just copy the `include/rapidjson` folder to system or project's include path.
-
-RapidJSON uses following software as its dependencies:
-* [CMake](https://cmake.org/) as a general build tool
-* (optional)[Doxygen](http://www.doxygen.org) to build documentation
-* (optional)[googletest](https://github.com/google/googletest) for unit and performance testing
-
-To generate user documentation and run tests please proceed with the steps below:
-
-1. Execute `git submodule update --init` to get the files of thirdparty submodules (google test).
-2. Create directory called `build` in rapidjson source directory.
-3. Change to `build` directory and run `cmake ..` command to configure your build. Windows users can do the same with cmake-gui application.
-4. On Windows, build the solution found in the build directory. On Linux, run `make` from the build directory.
-
-On successfull build you will find compiled test and example binaries in `bin`
-directory. The generated documentation will be available in `doc/html`
-directory of the build tree. To run tests after finished build please run `make
-test` or `ctest` from your build tree. You can get detailed output using `ctest
--V` command.
-
-It is possible to install library system-wide by running `make install` command
-from the build tree with administrative privileges. This will install all files
-according to system preferences. Once RapidJSON is installed, it is possible
-to use it from other CMake projects by adding `find_package(RapidJSON)` line to
-your CMakeLists.txt.
-
-## Usage at a glance
-
-This simple example parses a JSON string into a document (DOM), make a simple modification of the DOM, and finally stringify the DOM to a JSON string.
-
-~~~~~~~~~~cpp
-// rapidjson/example/simpledom/simpledom.cpp`
-#include "rapidjson/document.h"
-#include "rapidjson/writer.h"
-#include "rapidjson/stringbuffer.h"
-#include <iostream>
-
-using namespace rapidjson;
-
-int main() {
- // 1. Parse a JSON string into DOM.
- const char* json = "{\"project\":\"rapidjson\",\"stars\":10}";
- Document d;
- d.Parse(json);
-
- // 2. Modify it by DOM.
- Value& s = d["stars"];
- s.SetInt(s.GetInt() + 1);
-
- // 3. Stringify the DOM
- StringBuffer buffer;
- Writer<StringBuffer> writer(buffer);
- d.Accept(writer);
-
- // Output {"project":"rapidjson","stars":11}
- std::cout << buffer.GetString() << std::endl;
- return 0;
-}
-~~~~~~~~~~
-
-Note that this example did not handle potential errors.
-
-The following diagram shows the process.
-
-![simpledom](doc/diagram/simpledom.png)
-
-More [examples](https://github.com/miloyip/rapidjson/tree/master/example) are available.
diff --git a/3rdparty/rapidjson/readme.zh-cn.md b/3rdparty/rapidjson/readme.zh-cn.md
deleted file mode 100644
index 5124f8eedef..00000000000
--- a/3rdparty/rapidjson/readme.zh-cn.md
+++ /dev/null
@@ -1,121 +0,0 @@
-![](doc/logo/rapidjson.png)
-
-![](https://img.shields.io/badge/release-v1.0.2-blue.png)
-
-## 高效的C++ JSONè§£æžï¼ç”Ÿæˆå™¨ï¼Œæä¾›SAXåŠDOM风格API
-
-Tencent is pleased to support the open source community by making RapidJSON available.
-
-Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-
-* [RapidJSON GitHub](https://github.com/miloyip/rapidjson/)
-* RapidJSON 文档
- * [English](http://rapidjson.org/)
- * [简体中文](http://rapidjson.org/zh-cn/)
- * [GitBook](https://www.gitbook.com/book/miloyip/rapidjson/)å¯ä¸‹è½½PDF/EPUB/MOBI,但ä¸å«APIå‚考手册。
-
-## Build 状æ€
-
-| [Linux][lin-link] | [Windows][win-link] | [Coveralls][cov-link] |
-| :---------------: | :-----------------: | :-------------------: |
-| ![lin-badge] | ![win-badge] | ![cov-badge] |
-
-[lin-badge]: https://travis-ci.org/miloyip/rapidjson.png?branch=master "Travis build status"
-[lin-link]: https://travis-ci.org/miloyip/rapidjson "Travis build status"
-[win-badge]: https://ci.appveyor.com/api/projects/status/u658dcuwxo14a8m9/branch/master "AppVeyor build status"
-[win-link]: https://ci.appveyor.com/project/miloyip/rapidjson/branch/master "AppVeyor build status"
-[cov-badge]: https://coveralls.io/repos/miloyip/rapidjson/badge.png?branch=master
-[cov-link]: https://coveralls.io/r/miloyip/rapidjson?branch=master
-
-## 简介
-
-RapidJSON是一个C++çš„JSONè§£æžå™¨åŠç”Ÿæˆå™¨ã€‚å®ƒçš„çµæ„Ÿæ¥è‡ª[RapidXml](http://rapidxml.sourceforge.net/)。
-
-* RapidJSONå°è€Œå…¨ã€‚å®ƒåŒæ—¶æ”¯æŒSAXå’ŒDOM风格的API。SAXè§£æžå™¨åªæœ‰çº¦500行代ç ã€‚
-
-* RapidJSON快。它的性能å¯ä¸Ž`strlen()`ç›¸æ¯”ã€‚å¯æ”¯æŒSSE2/SSE4.2加速。
-
-* RapidJSON独立。它ä¸ä¾èµ–于BOOST等外部库。它甚至ä¸ä¾èµ–于STL。
-
-* RapidJSON对内存å‹å¥½ã€‚在大部分32/64使œºå™¨ä¸Šï¼Œæ¯ä¸ªJSON值åªå 16或20字节(除字符串外)。它预设使用一个快速的内存分é…器,令分æžå™¨å¯ä»¥ç´§å‡‘地分é…内存。
-
-* RapidJSON对Unicodeå‹å¥½ã€‚它支æŒUTF-8ã€UTF-16ã€UTF-32 (大端åºï¼å°ç«¯åº),并内部支æŒè¿™äº›ç¼–ç çš„æ£€æµ‹ã€æ ¡éªŒåŠè½¬ç ã€‚例如,RapidJSONå¯ä»¥åœ¨åˆ†æžä¸€ä¸ªUTF-8文件至DOM时,把当中的JSON字符串转ç è‡³UTF-16。它也支æŒä»£ç†å¯¹ï¼ˆsurrogate pair)åŠ`"\u0000"`(空字符)。
-
-在[这里](doc/features.md)å¯è¯»å–更多特点。
-
-JSON(JavaScript Object Notation)是一个轻é‡çš„æ•°æ®äº¤æ¢æ ¼å¼ã€‚RapidJSON应该完全éµä»ŽRFC7159/ECMA-404。 关于JSON的更多信æ¯å¯å‚考:
-* [Introducing JSON](http://json.org/)
-* [RFC7159: The JavaScript Object Notation (JSON) Data Interchange Format](http://www.ietf.org/rfc/rfc7159.txt)
-* [Standard ECMA-404: The JSON Data Interchange Format](http://www.ecma-international.org/publications/standards/Ecma-404.htm)
-
-## 兼容性
-
-RapidJSON是跨平å°çš„。以下是一些曾测试的平å°ï¼ç¼–译器组åˆï¼š
-* Visual C++ 2008/2010/2013 在 Windows (32/64-bit)
-* GNU C++ 3.8.x 在 Cygwin
-* Clang 3.4 在 Mac OS X (32/64-bit) åŠ iOS
-* Clang 3.4 在 Android NDK
-
-用户也å¯ä»¥åœ¨ä»–们的平å°ä¸Šç”ŸæˆåŠæ‰§è¡Œå•元测试。
-
-## 安装
-
-RapidJSONæ˜¯åªæœ‰å¤´æ–‡ä»¶çš„C++库。åªéœ€æŠŠ`include/rapidjson`目录å¤åˆ¶è‡³ç³»ç»Ÿæˆ–项目的include目录中。
-
-RapidJSONä¾èµ–于以下软件:
-* [CMake](http://www.cmake.org) 作为通用生æˆå·¥å…·
-* (optional)[Doxygen](http://www.doxygen.org)ç”¨äºŽç”Ÿæˆæ–‡æ¡£
-* (optional)[googletest](https://code.google.com/p/googletest/)用于å•å…ƒåŠæ€§èƒ½æµ‹è¯•
-
-ç”Ÿæˆæµ‹è¯•åŠä¾‹å­çš„æ­¥éª¤ï¼š
-
-1. 执行 `git submodule update --init` åŽ»èŽ·å– thirdparty submodules (google test)。
-2. 在rapidjson目渌下,建立一个`build`目录。
-3. 在`build`目录下执行`cmake ..`命令以设置生æˆã€‚Windows用户å¯ä½¿ç”¨cmake-gui应用程åºã€‚
-4. 在Windows下,编译生æˆåœ¨build目录中的solution。在Linux下,于build目录è¿è¡Œ`make`。
-
-æˆåŠŸç”ŸæˆåŽï¼Œä½ ä¼šåœ¨`bin`的目录下找到编译åŽçš„æµ‹è¯•åŠä¾‹å­å¯æ‰§è¡Œæ–‡ä»¶ã€‚而生æˆçš„æ–‡æ¡£å°†ä½äºŽbuild下的`doc/html`ç›®å½•ã€‚è¦æ‰§è¡Œæµ‹è¯•,请在build下执行`make test`或`ctest`。使用`ctest -V`命令å¯èŽ·å–详细的输出。
-
-我们也å¯ä»¥æŠŠç¨‹åºåº“安装至全系统中,åªè¦åœ¨å…·ç®¡ç†æ¬Šé™ä¸‹ä»Žbuild目录执行`make install`命令。这样会按系统的å好设置安装所有文件。当安装RapidJSONåŽï¼Œå…¶ä»–çš„CMake项目需è¦ä½¿ç”¨å®ƒæ—¶ï¼Œå¯ä»¥é€šè¿‡åœ¨`CMakeLists.txt`加入一å¥`find_package(RapidJSON)`。
-
-## 用法一览
-
-此简å•例å­è§£æžä¸€ä¸ªJSON字符串至一个document (DOM),对DOM作出简å•修改,最终把DOM转æ¢ï¼ˆstringify)至JSON字符串。
-
-~~~~~~~~~~cpp
-// rapidjson/example/simpledom/simpledom.cpp`
-#include "rapidjson/document.h"
-#include "rapidjson/writer.h"
-#include "rapidjson/stringbuffer.h"
-#include <iostream>
-
-using namespace rapidjson;
-
-int main() {
- // 1. 把JSONè§£æžè‡³DOM。
- const char* json = "{\"project\":\"rapidjson\",\"stars\":10}";
- Document d;
- d.Parse(json);
-
- // 2. 利用DOM作出修改。
- Value& s = d["stars"];
- s.SetInt(s.GetInt() + 1);
-
- // 3. 把DOM转æ¢ï¼ˆstringify)æˆJSON。
- StringBuffer buffer;
- Writer<StringBuffer> writer(buffer);
- d.Accept(writer);
-
- // Output {"project":"rapidjson","stars":11}
- std::cout << buffer.GetString() << std::endl;
- return 0;
-}
-~~~~~~~~~~
-
-æ³¨æ„æ­¤ä¾‹å­å¹¶æ²¡æœ‰å¤„ç†æ½œåœ¨é”™è¯¯ã€‚
-
-下图展示执行过程。
-
-![simpledom](doc/diagram/simpledom.png)
-
-还有许多[例å­](https://github.com/miloyip/rapidjson/tree/master/example)å¯ä¾›å‚考。
diff --git a/3rdparty/rapidjson/test/CMakeLists.txt b/3rdparty/rapidjson/test/CMakeLists.txt
deleted file mode 100644
index 11c1b04c7d1..00000000000
--- a/3rdparty/rapidjson/test/CMakeLists.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-find_package(GTestSrc)
-
-IF(GTESTSRC_FOUND)
- enable_testing()
-
- if (WIN32 AND (NOT CYGWIN) AND (NOT MINGW))
- set(gtest_disable_pthreads ON)
- set(gtest_force_shared_crt ON)
- endif()
-
- add_subdirectory(${GTEST_SOURCE_DIR} ${CMAKE_BINARY_DIR}/googletest)
- include_directories(SYSTEM ${GTEST_INCLUDE_DIR})
-
- set(TEST_LIBRARIES gtest gtest_main)
-
- add_custom_target(tests ALL)
- add_subdirectory(perftest)
- add_subdirectory(unittest)
-
-ENDIF(GTESTSRC_FOUND)
diff --git a/3rdparty/rapidjson/test/perftest/CMakeLists.txt b/3rdparty/rapidjson/test/perftest/CMakeLists.txt
deleted file mode 100644
index c88cf707451..00000000000
--- a/3rdparty/rapidjson/test/perftest/CMakeLists.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-set(PERFTEST_SOURCES
- misctest.cpp
- perftest.cpp
- platformtest.cpp
- rapidjsontest.cpp
- schematest.cpp)
-
-add_executable(perftest ${PERFTEST_SOURCES})
-target_link_libraries(perftest ${TEST_LIBRARIES})
-
-add_dependencies(tests perftest)
-
-IF(NOT (CMAKE_BUILD_TYPE STREQUAL "Debug"))
-add_test(NAME perftest
- COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/perftest
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
-ENDIF()
diff --git a/3rdparty/rapidjson/test/perftest/misctest.cpp b/3rdparty/rapidjson/test/perftest/misctest.cpp
deleted file mode 100644
index aac84778429..00000000000
--- a/3rdparty/rapidjson/test/perftest/misctest.cpp
+++ /dev/null
@@ -1,974 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 "perftest.h"
-
-#if TEST_MISC
-
-#define __STDC_FORMAT_MACROS
-#include "rapidjson/stringbuffer.h"
-
-#define protected public
-#include "rapidjson/writer.h"
-#undef private
-
-class Misc : public PerfTest {
-};
-
-// Copyright (c) 2008-2010 Bjoern Hoehrmann <bjoern@hoehrmann.de>
-// See http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ for details.
-
-#define UTF8_ACCEPT 0
-#define UTF8_REJECT 12
-
-static const unsigned char utf8d[] = {
- // The first part of the table maps bytes to character classes that
- // to reduce the size of the transition table and create bitmasks.
- 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,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,
- 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
- 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
- 8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
- 10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3, 11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,
-
- // The second part is a transition table that maps a combination
- // of a state of the automaton and a character class to a state.
- 0,12,24,36,60,96,84,12,12,12,48,72, 12,12,12,12,12,12,12,12,12,12,12,12,
- 12, 0,12,12,12,12,12, 0,12, 0,12,12, 12,24,12,12,12,12,12,24,12,24,12,12,
- 12,12,12,12,12,12,12,24,12,12,12,12, 12,24,12,12,12,12,12,12,12,24,12,12,
- 12,12,12,12,12,12,12,36,12,36,12,12, 12,36,12,12,12,12,12,36,12,36,12,12,
- 12,36,12,12,12,12,12,12,12,12,12,12,
-};
-
-static unsigned inline decode(unsigned* state, unsigned* codep, unsigned byte) {
- unsigned type = utf8d[byte];
-
- *codep = (*state != UTF8_ACCEPT) ?
- (byte & 0x3fu) | (*codep << 6) :
- (0xff >> type) & (byte);
-
- *state = utf8d[256 + *state + type];
- return *state;
-}
-
-static bool IsUTF8(unsigned char* s) {
- unsigned codepoint, state = 0;
-
- while (*s)
- decode(&state, &codepoint, *s++);
-
- return state == UTF8_ACCEPT;
-}
-
-TEST_F(Misc, Hoehrmann_IsUTF8) {
- for (size_t i = 0; i < kTrialCount; i++) {
- EXPECT_TRUE(IsUTF8((unsigned char*)json_));
- }
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// CountDecimalDigit: Count number of decimal places
-
-inline unsigned CountDecimalDigit_naive(unsigned n) {
- unsigned count = 1;
- while (n >= 10) {
- n /= 10;
- count++;
- }
- return count;
-}
-
-inline unsigned CountDecimalDigit_enroll4(unsigned n) {
- unsigned count = 1;
- while (n >= 10000) {
- n /= 10000u;
- count += 4;
- }
- if (n < 10) return count;
- if (n < 100) return count + 1;
- if (n < 1000) return count + 2;
- return count + 3;
-}
-
-inline unsigned CountDecimalDigit64_enroll4(uint64_t n) {
- unsigned count = 1;
- while (n >= 10000) {
- n /= 10000u;
- count += 4;
- }
- if (n < 10) return count;
- if (n < 100) return count + 1;
- if (n < 1000) return count + 2;
- return count + 3;
-}
-
-inline unsigned CountDecimalDigit_fast(unsigned n) {
- static const uint32_t powers_of_10[] = {
- 0,
- 10,
- 100,
- 1000,
- 10000,
- 100000,
- 1000000,
- 10000000,
- 100000000,
- 1000000000
- };
-
-#if defined(_M_IX86) || defined(_M_X64)
- unsigned long i = 0;
- _BitScanReverse(&i, n | 1);
- uint32_t t = (i + 1) * 1233 >> 12;
-#elif defined(__GNUC__)
- uint32_t t = (32 - __builtin_clz(n | 1)) * 1233 >> 12;
-#else
-#error
-#endif
- return t - (n < powers_of_10[t]) + 1;
-}
-
-inline unsigned CountDecimalDigit64_fast(uint64_t n) {
- static const uint64_t powers_of_10[] = {
- 0,
- 10,
- 100,
- 1000,
- 10000,
- 100000,
- 1000000,
- 10000000,
- 100000000,
- 1000000000,
- 10000000000,
- 100000000000,
- 1000000000000,
- 10000000000000,
- 100000000000000,
- 1000000000000000,
- 10000000000000000,
- 100000000000000000,
- 1000000000000000000,
- 10000000000000000000U
- };
-
-#if defined(_M_IX86)
- uint64_t m = n | 1;
- unsigned long i = 0;
- if (_BitScanReverse(&i, m >> 32))
- i += 32;
- else
- _BitScanReverse(&i, m & 0xFFFFFFFF);
- uint32_t t = (i + 1) * 1233 >> 12;
-#elif defined(_M_X64)
- unsigned long i = 0;
- _BitScanReverse64(&i, n | 1);
- uint32_t t = (i + 1) * 1233 >> 12;
-#elif defined(__GNUC__)
- uint32_t t = (64 - __builtin_clzll(n | 1)) * 1233 >> 12;
-#else
-#error
-#endif
-
- return t - (n < powers_of_10[t]) + 1;
-}
-
-#if 0
-// Exhaustive, very slow
-TEST_F(Misc, CountDecimalDigit_Verify) {
- unsigned i = 0;
- do {
- if (i % (65536 * 256) == 0)
- printf("%u\n", i);
- ASSERT_EQ(CountDecimalDigit_enroll4(i), CountDecimalDigit_fast(i));
- i++;
- } while (i != 0);
-}
-
-static const unsigned kDigits10Trial = 1000000000u;
-TEST_F(Misc, CountDecimalDigit_naive) {
- unsigned sum = 0;
- for (unsigned i = 0; i < kDigits10Trial; i++)
- sum += CountDecimalDigit_naive(i);
- printf("%u\n", sum);
-}
-
-TEST_F(Misc, CountDecimalDigit_enroll4) {
- unsigned sum = 0;
- for (unsigned i = 0; i < kDigits10Trial; i++)
- sum += CountDecimalDigit_enroll4(i);
- printf("%u\n", sum);
-}
-
-TEST_F(Misc, CountDecimalDigit_fast) {
- unsigned sum = 0;
- for (unsigned i = 0; i < kDigits10Trial; i++)
- sum += CountDecimalDigit_fast(i);
- printf("%u\n", sum);
-}
-#endif
-
-TEST_F(Misc, CountDecimalDigit64_VerifyFast) {
- uint64_t i = 1, j;
- do {
- //printf("%" PRIu64 "\n", i);
- ASSERT_EQ(CountDecimalDigit64_enroll4(i), CountDecimalDigit64_fast(i));
- j = i;
- i *= 3;
- } while (j < i);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// integer-to-string conversion
-
-// https://gist.github.com/anonymous/7179097
-static const int randval[] ={
- 936116, 369532, 453755, -72860, 209713, 268347, 435278, -360266, -416287, -182064,
- -644712, 944969, 640463, -366588, 471577, -69401, -744294, -505829, 923883, 831785,
- -601136, -636767, -437054, 591718, 100758, 231907, -719038, 973540, -605220, 506659,
- -871653, 462533, 764843, -919138, 404305, -630931, -288711, -751454, -173726, -718208,
- 432689, -281157, 360737, 659827, 19174, -376450, 769984, -858198, 439127, 734703,
- -683426, 7, 386135, 186997, -643900, -744422, -604708, -629545, 42313, -933592,
- -635566, 182308, 439024, -367219, -73924, -516649, 421935, -470515, 413507, -78952,
- -427917, -561158, 737176, 94538, 572322, 405217, 709266, -357278, -908099, -425447,
- 601119, 750712, -862285, -177869, 900102, 384877, 157859, -641680, 503738, -702558,
- 278225, 463290, 268378, -212840, 580090, 347346, -473985, -950968, -114547, -839893,
- -738032, -789424, 409540, 493495, 432099, 119755, 905004, -174834, 338266, 234298,
- 74641, -965136, -754593, 685273, 466924, 920560, 385062, 796402, -67229, 994864,
- 376974, 299869, -647540, -128724, 469890, -163167, -547803, -743363, 486463, -621028,
- 612288, 27459, -514224, 126342, -66612, 803409, -777155, -336453, -284002, 472451,
- 342390, -163630, 908356, -456147, -825607, 268092, -974715, 287227, 227890, -524101,
- 616370, -782456, 922098, -624001, -813690, 171605, -192962, 796151, 707183, -95696,
- -23163, -721260, 508892, 430715, 791331, 482048, -996102, 863274, 275406, -8279,
- -556239, -902076, 268647, -818565, 260069, -798232, -172924, -566311, -806503, -885992,
- 813969, -78468, 956632, 304288, 494867, -508784, 381751, 151264, 762953, 76352,
- 594902, 375424, 271700, -743062, 390176, 924237, 772574, 676610, 435752, -153847,
- 3959, -971937, -294181, -538049, -344620, -170136, 19120, -703157, 868152, -657961,
- -818631, 219015, -872729, -940001, -956570, 880727, -345910, 942913, -942271, -788115,
- 225294, 701108, -517736, -416071, 281940, 488730, 942698, 711494, 838382, -892302,
- -533028, 103052, 528823, 901515, 949577, 159364, 718227, -241814, -733661, -462928,
- -495829, 165170, 513580, -629188, -509571, -459083, 198437, 77198, -644612, 811276,
- -422298, -860842, -52584, 920369, 686424, -530667, -243476, 49763, 345866, -411960,
- -114863, 470810, -302860, 683007, -509080, 2, -174981, -772163, -48697, 447770,
- -268246, 213268, 269215, 78810, -236340, -639140, -864323, 505113, -986569, -325215,
- 541859, 163070, -819998, -645161, -583336, 573414, 696417, -132375, 3, -294501,
- 320435, 682591, 840008, 351740, 426951, 609354, 898154, -943254, 227321, -859793,
- -727993, 44137, -497965, -782239, 14955, -746080, -243366, 9837, -233083, 606507,
- -995864, -615287, -994307, 602715, 770771, -315040, 610860, 446102, -307120, 710728,
- -590392, -230474, -762625, -637525, 134963, -202700, -766902, -985541, 218163, 682009,
- 926051, 525156, -61195, 403211, -810098, 245539, -431733, 179998, -806533, 745943,
- 447597, 131973, -187130, 826019, 286107, -937230, -577419, 20254, 681802, -340500,
- 323080, 266283, -667617, 309656, 416386, 611863, 759991, -534257, 523112, -634892,
- -169913, -204905, -909867, -882185, -944908, 741811, -717675, 967007, -317396, 407230,
- -412805, 792905, 994873, 744793, -456797, 713493, 355232, 116900, -945199, 880539,
- 342505, -580824, -262273, 982968, -349497, -735488, 311767, -455191, 570918, 389734,
- -958386, 10262, -99267, 155481, 304210, 204724, 704367, -144893, -233664, -671441,
- 896849, 408613, 762236, 322697, 981321, 688476, 13663, -970704, -379507, 896412,
- 977084, 348869, 875948, 341348, 318710, 512081, 6163, 669044, 833295, 811883,
- 708756, -802534, -536057, 608413, -389625, -694603, 541106, -110037, 720322, -540581,
- 645420, 32980, 62442, 510157, -981870, -87093, -325960, -500494, -718291, -67889,
- 991501, 374804, 769026, -978869, 294747, 714623, 413327, -199164, 671368, 804789,
- -362507, 798196, -170790, -568895, -869379, 62020, -316693, -837793, 644994, -39341,
- -417504, -243068, -957756, 99072, 622234, -739992, 225668, 8863, -505910, 82483,
- -559244, 241572, 1315, -36175, -54990, 376813, -11, 162647, -688204, -486163,
- -54934, -197470, 744223, -762707, 732540, 996618, 351561, -445933, -898491, 486531,
- 456151, 15276, 290186, -817110, -52995, 313046, -452533, -96267, 94470, -500176,
- -818026, -398071, -810548, -143325, -819741, 1338, -897676, -101577, -855445, 37309,
- 285742, 953804, -777927, -926962, -811217, -936744, -952245, -802300, -490188, -964953,
- -552279, 329142, -570048, -505756, 682898, -381089, -14352, 175138, 152390, -582268,
- -485137, 717035, 805329, 239572, -730409, 209643, -184403, -385864, 675086, 819648,
- 629058, -527109, -488666, -171981, 532788, 552441, 174666, 984921, 766514, 758787,
- 716309, 338801, -978004, -412163, 876079, -734212, 789557, -160491, -522719, 56644,
- -991, -286038, -53983, 663740, 809812, 919889, -717502, -137704, 220511, 184396,
- -825740, -588447, 430870, 124309, 135956, 558662, -307087, -788055, -451328, 812260,
- 931601, 324347, -482989, -117858, -278861, 189068, -172774, 929057, 293787, 198161,
- -342386, -47173, 906555, -759955, -12779, 777604, -97869, 899320, 927486, -25284,
- -848550, 259450, -485856, -17820, 88, 171400, 235492, -326783, -340793, 886886,
- 112428, -246280, 5979, 648444, -114982, 991013, -56489, -9497, 419706, 632820,
- -341664, 393926, -848977, -22538, 257307, 773731, -905319, 491153, 734883, -868212,
- -951053, 644458, -580758, 764735, 584316, 297077, 28852, -397710, -953669, 201772,
- 879050, -198237, -588468, 448102, -116837, 770007, -231812, 642906, -582166, -885828,
- 9, 305082, -996577, 303559, 75008, -772956, -447960, 599825, -295552, 870739,
- -386278, -950300, 485359, -457081, 629461, -850276, 550496, -451755, -620841, -11766,
- -950137, 832337, 28711, -273398, -507197, 91921, -271360, -705991, -753220, -388968,
- 967945, 340434, -320883, -662793, -554617, -574568, 477946, -6148, -129519, 689217,
- 920020, -656315, -974523, -212525, 80921, -612532, 645096, 545655, 655713, -591631,
- -307385, -816688, -618823, -113713, 526430, 673063, 735916, -809095, -850417, 639004,
- 432281, -388185, 270708, 860146, -39902, -786157, -258180, -246169, -966720, -264957,
- 548072, -306010, -57367, -635665, 933824, 70553, -989936, -488741, 72411, -452509,
- 529831, 956277, 449019, -577850, -360986, -803418, 48833, 296073, 203430, 609591,
- 715483, 470964, 658106, -718254, -96424, 790163, 334739, 181070, -373578, 5,
- -435088, 329841, 330939, -256602, 394355, 912412, 231910, 927278, -661933, 788539,
- -769664, -893274, -96856, 298205, 901043, -608122, -527430, 183618, -553963, -35246,
- -393924, 948832, -483198, 594501, 35460, -407007, 93494, -336881, -634072, 984205,
- -812161, 944664, -31062, 753872, 823933, -69566, 50445, 290147, 85134, 34706,
- 551902, 405202, -991246, -84642, 154341, 316432, -695101, -651588, -5030, 137564,
- -294665, 332541, 528307, -90572, -344923, 523766, -758498, -968047, 339028, 494578,
- 593129, -725773, 31834, -718406, -208638, 159665, -2043, 673344, -442767, 75816,
- 755442, 769257, -158730, -410272, 691688, 589550, -878398, -184121, 460679, 346312,
- 294163, -544602, 653308, 254167, -276979, 52073, -892684, 887653, -41222, 983065,
- -68258, -408799, -99069, -674069, -863635, -32890, 622757, -743862, 40872, -4837,
- -967228, 522370, -903951, -818669, 524459, 514702, 925801, 20007, -299229, 579348,
- 626021, 430089, 348139, -562692, -607728, -130606, -928451, -424793, -458647, -448892,
- -312230, 143337, 109746, 880042, -339658, -785614, 938995, 540916, 118429, 661351,
- -402967, 404729, -40918, -976535, 743230, 713110, 440182, -381314, -499252, 74613,
- 193652, 912717, 491323, 583633, 324691, 459397, 281253, 195540, -2764, -888651,
- 892449, 132663, -478373, -430002, -314551, 527826, 247165, 557966, 554778, 481531,
- -946634, 431685, -769059, -348371, 174046, 184597, -354867, 584422, 227390, -850397,
- -542924, -849093, -737769, 325359, 736314, 269101, 767940, 674809, 81413, -447458,
- 445076, 189072, 906218, 502688, -718476, -863827, -731381, 100660, 623249, 710008,
- 572060, 922203, 685740, 55096, 263394, -243695, -353910, -516788, 388471, 455165,
- 844103, -643772, 363976, 268875, -899450, 104470, 104029, -238874, -274659, 732969,
- -676443, 953291, -916289, -861849, -242344, 958083, -479593, -970395, 799831, 277841,
- -243236, -283462, -201510, 166263, -259105, -575706, 878926, 891064, 895297, 655262,
- -34807, -809833, -89281, 342585, 554920, 1, 902141, -333425, 139703, 852318,
- -618438, 329498, -932596, -692836, -513372, 733656, -523411, 85779, 500478, -682697,
- -502836, 138776, 156341, -420037, -557964, -556378, 710993, -50383, -877159, 916334,
- 132996, 583516, -603392, -111615, -12288, -780214, 476780, 123327, 137607, 519956,
- 745837, 17358, -158581, -53490
-};
-static const size_t randvalCount = sizeof(randval) / sizeof(randval[0]);
-static const size_t kItoaTrialCount = 10000;
-
-static const char digits[201] =
-"0001020304050607080910111213141516171819"
-"2021222324252627282930313233343536373839"
-"4041424344454647484950515253545556575859"
-"6061626364656667686970717273747576777879"
-"8081828384858687888990919293949596979899";
-
-// Prevent code being optimized out
-//#define OUTPUT_LENGTH(length) printf("", length)
-#define OUTPUT_LENGTH(length) printf("%u\n", (unsigned)length)
-
-template<typename OutputStream>
-class Writer1 {
-public:
- Writer1() : os_() {}
- Writer1(OutputStream& os) : os_(&os) {}
-
- void Reset(OutputStream& os) {
- os_ = &os;
- }
-
- bool WriteInt(int i) {
- if (i < 0) {
- os_->Put('-');
- i = -i;
- }
- return WriteUint((unsigned)i);
- }
-
- bool WriteUint(unsigned u) {
- char buffer[10];
- char *p = buffer;
- do {
- *p++ = char(u % 10) + '0';
- u /= 10;
- } while (u > 0);
-
- do {
- --p;
- os_->Put(*p);
- } while (p != buffer);
- return true;
- }
-
- bool WriteInt64(int64_t i64) {
- if (i64 < 0) {
- os_->Put('-');
- i64 = -i64;
- }
- WriteUint64((uint64_t)i64);
- return true;
- }
-
- bool WriteUint64(uint64_t u64) {
- char buffer[20];
- char *p = buffer;
- do {
- *p++ = char(u64 % 10) + '0';
- u64 /= 10;
- } while (u64 > 0);
-
- do {
- --p;
- os_->Put(*p);
- } while (p != buffer);
- return true;
- }
-
-private:
- OutputStream* os_;
-};
-
-template<>
-bool Writer1<rapidjson::StringBuffer>::WriteUint(unsigned u) {
- char buffer[10];
- char* p = buffer;
- do {
- *p++ = char(u % 10) + '0';
- u /= 10;
- } while (u > 0);
-
- char* d = os_->Push(p - buffer);
- do {
- --p;
- *d++ = *p;
- } while (p != buffer);
- return true;
-}
-
-// Using digits LUT to reduce divsion/modulo
-template<typename OutputStream>
-class Writer2 {
-public:
- Writer2() : os_() {}
- Writer2(OutputStream& os) : os_(&os) {}
-
- void Reset(OutputStream& os) {
- os_ = &os;
- }
-
- bool WriteInt(int i) {
- if (i < 0) {
- os_->Put('-');
- i = -i;
- }
- return WriteUint((unsigned)i);
- }
-
- bool WriteUint(unsigned u) {
- char buffer[10];
- char* p = buffer;
- while (u >= 100) {
- const unsigned i = (u % 100) << 1;
- u /= 100;
- *p++ = digits[i + 1];
- *p++ = digits[i];
- }
- if (u < 10)
- *p++ = char(u) + '0';
- else {
- const unsigned i = u << 1;
- *p++ = digits[i + 1];
- *p++ = digits[i];
- }
-
- do {
- --p;
- os_->Put(*p);
- } while (p != buffer);
- return true;
- }
-
- bool WriteInt64(int64_t i64) {
- if (i64 < 0) {
- os_->Put('-');
- i64 = -i64;
- }
- WriteUint64((uint64_t)i64);
- return true;
- }
-
- bool WriteUint64(uint64_t u64) {
- char buffer[20];
- char* p = buffer;
- while (u64 >= 100) {
- const unsigned i = static_cast<unsigned>(u64 % 100) << 1;
- u64 /= 100;
- *p++ = digits[i + 1];
- *p++ = digits[i];
- }
- if (u64 < 10)
- *p++ = char(u64) + '0';
- else {
- const unsigned i = static_cast<unsigned>(u64) << 1;
- *p++ = digits[i + 1];
- *p++ = digits[i];
- }
-
- do {
- --p;
- os_->Put(*p);
- } while (p != buffer);
- return true;
- }
-
-private:
- OutputStream* os_;
-};
-
-// First pass to count digits
-template<typename OutputStream>
-class Writer3 {
-public:
- Writer3() : os_() {}
- Writer3(OutputStream& os) : os_(&os) {}
-
- void Reset(OutputStream& os) {
- os_ = &os;
- }
-
- bool WriteInt(int i) {
- if (i < 0) {
- os_->Put('-');
- i = -i;
- }
- return WriteUint((unsigned)i);
- }
-
- bool WriteUint(unsigned u) {
- char buffer[10];
- char *p = buffer;
- do {
- *p++ = char(u % 10) + '0';
- u /= 10;
- } while (u > 0);
-
- do {
- --p;
- os_->Put(*p);
- } while (p != buffer);
- return true;
- }
-
- bool WriteInt64(int64_t i64) {
- if (i64 < 0) {
- os_->Put('-');
- i64 = -i64;
- }
- WriteUint64((uint64_t)i64);
- return true;
- }
-
- bool WriteUint64(uint64_t u64) {
- char buffer[20];
- char *p = buffer;
- do {
- *p++ = char(u64 % 10) + '0';
- u64 /= 10;
- } while (u64 > 0);
-
- do {
- --p;
- os_->Put(*p);
- } while (p != buffer);
- return true;
- }
-
-private:
- void WriteUintReverse(char* d, unsigned u) {
- do {
- *--d = char(u % 10) + '0';
- u /= 10;
- } while (u > 0);
- }
-
- void WriteUint64Reverse(char* d, uint64_t u) {
- do {
- *--d = char(u % 10) + '0';
- u /= 10;
- } while (u > 0);
- }
-
- OutputStream* os_;
-};
-
-template<>
-inline bool Writer3<rapidjson::StringBuffer>::WriteUint(unsigned u) {
- unsigned digit = CountDecimalDigit_fast(u);
- WriteUintReverse(os_->Push(digit) + digit, u);
- return true;
-}
-
-template<>
-inline bool Writer3<rapidjson::InsituStringStream>::WriteUint(unsigned u) {
- unsigned digit = CountDecimalDigit_fast(u);
- WriteUintReverse(os_->Push(digit) + digit, u);
- return true;
-}
-
-template<>
-inline bool Writer3<rapidjson::StringBuffer>::WriteUint64(uint64_t u) {
- unsigned digit = CountDecimalDigit64_fast(u);
- WriteUint64Reverse(os_->Push(digit) + digit, u);
- return true;
-}
-
-template<>
-inline bool Writer3<rapidjson::InsituStringStream>::WriteUint64(uint64_t u) {
- unsigned digit = CountDecimalDigit64_fast(u);
- WriteUint64Reverse(os_->Push(digit) + digit, u);
- return true;
-}
-
-// Using digits LUT to reduce divsion/modulo, two passes
-template<typename OutputStream>
-class Writer4 {
-public:
- Writer4() : os_() {}
- Writer4(OutputStream& os) : os_(&os) {}
-
- void Reset(OutputStream& os) {
- os_ = &os;
- }
-
- bool WriteInt(int i) {
- if (i < 0) {
- os_->Put('-');
- i = -i;
- }
- return WriteUint((unsigned)i);
- }
-
- bool WriteUint(unsigned u) {
- char buffer[10];
- char* p = buffer;
- while (u >= 100) {
- const unsigned i = (u % 100) << 1;
- u /= 100;
- *p++ = digits[i + 1];
- *p++ = digits[i];
- }
- if (u < 10)
- *p++ = char(u) + '0';
- else {
- const unsigned i = u << 1;
- *p++ = digits[i + 1];
- *p++ = digits[i];
- }
-
- do {
- --p;
- os_->Put(*p);
- } while (p != buffer);
- return true;
- }
-
- bool WriteInt64(int64_t i64) {
- if (i64 < 0) {
- os_->Put('-');
- i64 = -i64;
- }
- WriteUint64((uint64_t)i64);
- return true;
- }
-
- bool WriteUint64(uint64_t u64) {
- char buffer[20];
- char* p = buffer;
- while (u64 >= 100) {
- const unsigned i = static_cast<unsigned>(u64 % 100) << 1;
- u64 /= 100;
- *p++ = digits[i + 1];
- *p++ = digits[i];
- }
- if (u64 < 10)
- *p++ = char(u64) + '0';
- else {
- const unsigned i = static_cast<unsigned>(u64) << 1;
- *p++ = digits[i + 1];
- *p++ = digits[i];
- }
-
- do {
- --p;
- os_->Put(*p);
- } while (p != buffer);
- return true;
- }
-
-private:
- void WriteUintReverse(char* d, unsigned u) {
- while (u >= 100) {
- const unsigned i = (u % 100) << 1;
- u /= 100;
- *--d = digits[i + 1];
- *--d = digits[i];
- }
- if (u < 10) {
- *--d = char(u) + '0';
- }
- else {
- const unsigned i = u << 1;
- *--d = digits[i + 1];
- *--d = digits[i];
- }
- }
-
- void WriteUint64Reverse(char* d, uint64_t u) {
- while (u >= 100) {
- const unsigned i = (u % 100) << 1;
- u /= 100;
- *--d = digits[i + 1];
- *--d = digits[i];
- }
- if (u < 10) {
- *--d = char(u) + '0';
- }
- else {
- const unsigned i = u << 1;
- *--d = digits[i + 1];
- *--d = digits[i];
- }
- }
-
- OutputStream* os_;
-};
-
-template<>
-inline bool Writer4<rapidjson::StringBuffer>::WriteUint(unsigned u) {
- unsigned digit = CountDecimalDigit_fast(u);
- WriteUintReverse(os_->Push(digit) + digit, u);
- return true;
-}
-
-template<>
-inline bool Writer4<rapidjson::InsituStringStream>::WriteUint(unsigned u) {
- unsigned digit = CountDecimalDigit_fast(u);
- WriteUintReverse(os_->Push(digit) + digit, u);
- return true;
-}
-
-template<>
-inline bool Writer4<rapidjson::StringBuffer>::WriteUint64(uint64_t u) {
- unsigned digit = CountDecimalDigit64_fast(u);
- WriteUint64Reverse(os_->Push(digit) + digit, u);
- return true;
-}
-
-template<>
-inline bool Writer4<rapidjson::InsituStringStream>::WriteUint64(uint64_t u) {
- unsigned digit = CountDecimalDigit64_fast(u);
- WriteUint64Reverse(os_->Push(digit) + digit, u);
- return true;
-}
-
-template <typename Writer>
-void itoa_Writer_StringBufferVerify() {
- rapidjson::StringBuffer sb;
- Writer writer(sb);
- for (size_t j = 0; j < randvalCount; j++) {
- char buffer[32];
- sprintf(buffer, "%d", randval[j]);
- writer.WriteInt(randval[j]);
- ASSERT_STREQ(buffer, sb.GetString());
- sb.Clear();
- }
-}
-
-template <typename Writer>
-void itoa_Writer_InsituStringStreamVerify() {
- Writer writer;
- for (size_t j = 0; j < randvalCount; j++) {
- char buffer[32];
- sprintf(buffer, "%d", randval[j]);
- char buffer2[32];
- rapidjson::InsituStringStream ss(buffer2);
- writer.Reset(ss);
- char* begin = ss.PutBegin();
- writer.WriteInt(randval[j]);
- ss.Put('\0');
- ss.PutEnd(begin);
- ASSERT_STREQ(buffer, buffer2);
- }
-}
-
-template <typename Writer>
-void itoa_Writer_StringBuffer() {
- size_t length = 0;
-
- rapidjson::StringBuffer sb;
- Writer writer(sb);
-
- for (size_t i = 0; i < kItoaTrialCount; i++) {
- for (size_t j = 0; j < randvalCount; j++) {
- writer.WriteInt(randval[j]);
- length += sb.GetSize();
- sb.Clear();
- }
- }
- OUTPUT_LENGTH(length);
-}
-
-template <typename Writer>
-void itoa_Writer_InsituStringStream() {
- size_t length = 0;
-
- char buffer[32];
- Writer writer;
- for (size_t i = 0; i < kItoaTrialCount; i++) {
- for (size_t j = 0; j < randvalCount; j++) {
- rapidjson::InsituStringStream ss(buffer);
- writer.Reset(ss);
- char* begin = ss.PutBegin();
- writer.WriteInt(randval[j]);
- length += ss.PutEnd(begin);
- }
- }
- OUTPUT_LENGTH(length);
-};
-
-template <typename Writer>
-void itoa64_Writer_StringBufferVerify() {
- rapidjson::StringBuffer sb;
- Writer writer(sb);
- for (size_t j = 0; j < randvalCount; j++) {
- char buffer[32];
- int64_t x = randval[j] * randval[j];
- sprintf(buffer, "%" PRIi64, x);
- writer.WriteInt64(x);
- ASSERT_STREQ(buffer, sb.GetString());
- sb.Clear();
- }
-}
-
-template <typename Writer>
-void itoa64_Writer_InsituStringStreamVerify() {
- Writer writer;
- for (size_t j = 0; j < randvalCount; j++) {
- char buffer[32];
- int64_t x = randval[j] * randval[j];
- sprintf(buffer, "%" PRIi64, x);
- char buffer2[32];
- rapidjson::InsituStringStream ss(buffer2);
- writer.Reset(ss);
- char* begin = ss.PutBegin();
- writer.WriteInt64(x);
- ss.Put('\0');
- ss.PutEnd(begin);
- ASSERT_STREQ(buffer, buffer2);
- }
-}
-
-template <typename Writer>
-void itoa64_Writer_StringBuffer() {
- size_t length = 0;
-
- rapidjson::StringBuffer sb;
- Writer writer(sb);
-
- for (size_t i = 0; i < kItoaTrialCount; i++) {
- for (size_t j = 0; j < randvalCount; j++) {
- writer.WriteInt64(randval[j] * randval[j]);
- length += sb.GetSize();
- sb.Clear();
- }
- }
- OUTPUT_LENGTH(length);
-}
-
-template <typename Writer>
-void itoa64_Writer_InsituStringStream() {
- size_t length = 0;
-
- char buffer[32];
- Writer writer;
- for (size_t i = 0; i < kItoaTrialCount; i++) {
- for (size_t j = 0; j < randvalCount; j++) {
- rapidjson::InsituStringStream ss(buffer);
- writer.Reset(ss);
- char* begin = ss.PutBegin();
- writer.WriteInt64(randval[j] * randval[j]);
- length += ss.PutEnd(begin);
- }
- }
- OUTPUT_LENGTH(length);
-};
-
-// Full specialization for InsituStringStream to prevent memory copying
-// (normally we will not use InsituStringStream for writing, just for testing)
-
-namespace rapidjson {
-
-template<>
-bool rapidjson::Writer<InsituStringStream>::WriteInt(int i) {
- char *buffer = os_->Push(11);
- const char* end = internal::i32toa(i, buffer);
- os_->Pop(11 - (end - buffer));
- return true;
-}
-
-template<>
-bool Writer<InsituStringStream>::WriteUint(unsigned u) {
- char *buffer = os_->Push(10);
- const char* end = internal::u32toa(u, buffer);
- os_->Pop(10 - (end - buffer));
- return true;
-}
-
-template<>
-bool Writer<InsituStringStream>::WriteInt64(int64_t i64) {
- char *buffer = os_->Push(21);
- const char* end = internal::i64toa(i64, buffer);
- os_->Pop(21 - (end - buffer));
- return true;
-}
-
-template<>
-bool Writer<InsituStringStream>::WriteUint64(uint64_t u) {
- char *buffer = os_->Push(20);
- const char* end = internal::u64toa(u, buffer);
- os_->Pop(20 - (end - buffer));
- return true;
-}
-
-} // namespace rapidjson
-
-TEST_F(Misc, itoa_Writer_StringBufferVerify) { itoa_Writer_StringBufferVerify<rapidjson::Writer<rapidjson::StringBuffer> >(); }
-TEST_F(Misc, itoa_Writer1_StringBufferVerify) { itoa_Writer_StringBufferVerify<Writer1<rapidjson::StringBuffer> >(); }
-TEST_F(Misc, itoa_Writer2_StringBufferVerify) { itoa_Writer_StringBufferVerify<Writer2<rapidjson::StringBuffer> >(); }
-TEST_F(Misc, itoa_Writer3_StringBufferVerify) { itoa_Writer_StringBufferVerify<Writer3<rapidjson::StringBuffer> >(); }
-TEST_F(Misc, itoa_Writer4_StringBufferVerify) { itoa_Writer_StringBufferVerify<Writer4<rapidjson::StringBuffer> >(); }
-TEST_F(Misc, itoa_Writer_InsituStringStreamVerify) { itoa_Writer_InsituStringStreamVerify<rapidjson::Writer<rapidjson::InsituStringStream> >(); }
-TEST_F(Misc, itoa_Writer1_InsituStringStreamVerify) { itoa_Writer_InsituStringStreamVerify<Writer1<rapidjson::InsituStringStream> >(); }
-TEST_F(Misc, itoa_Writer2_InsituStringStreamVerify) { itoa_Writer_InsituStringStreamVerify<Writer2<rapidjson::InsituStringStream> >(); }
-TEST_F(Misc, itoa_Writer3_InsituStringStreamVerify) { itoa_Writer_InsituStringStreamVerify<Writer3<rapidjson::InsituStringStream> >(); }
-TEST_F(Misc, itoa_Writer4_InsituStringStreamVerify) { itoa_Writer_InsituStringStreamVerify<Writer4<rapidjson::InsituStringStream> >(); }
-TEST_F(Misc, itoa_Writer_StringBuffer) { itoa_Writer_StringBuffer<rapidjson::Writer<rapidjson::StringBuffer> >(); }
-TEST_F(Misc, itoa_Writer1_StringBuffer) { itoa_Writer_StringBuffer<Writer1<rapidjson::StringBuffer> >(); }
-TEST_F(Misc, itoa_Writer2_StringBuffer) { itoa_Writer_StringBuffer<Writer2<rapidjson::StringBuffer> >(); }
-TEST_F(Misc, itoa_Writer3_StringBuffer) { itoa_Writer_StringBuffer<Writer3<rapidjson::StringBuffer> >(); }
-TEST_F(Misc, itoa_Writer4_StringBuffer) { itoa_Writer_StringBuffer<Writer4<rapidjson::StringBuffer> >(); }
-TEST_F(Misc, itoa_Writer_InsituStringStream) { itoa_Writer_InsituStringStream<rapidjson::Writer<rapidjson::InsituStringStream> >(); }
-TEST_F(Misc, itoa_Writer1_InsituStringStream) { itoa_Writer_InsituStringStream<Writer1<rapidjson::InsituStringStream> >(); }
-TEST_F(Misc, itoa_Writer2_InsituStringStream) { itoa_Writer_InsituStringStream<Writer2<rapidjson::InsituStringStream> >(); }
-TEST_F(Misc, itoa_Writer3_InsituStringStream) { itoa_Writer_InsituStringStream<Writer3<rapidjson::InsituStringStream> >(); }
-TEST_F(Misc, itoa_Writer4_InsituStringStream) { itoa_Writer_InsituStringStream<Writer4<rapidjson::InsituStringStream> >(); }
-
-TEST_F(Misc, itoa64_Writer_StringBufferVerify) { itoa64_Writer_StringBufferVerify<rapidjson::Writer<rapidjson::StringBuffer> >(); }
-TEST_F(Misc, itoa64_Writer1_StringBufferVerify) { itoa64_Writer_StringBufferVerify<Writer1<rapidjson::StringBuffer> >(); }
-TEST_F(Misc, itoa64_Writer2_StringBufferVerify) { itoa64_Writer_StringBufferVerify<Writer2<rapidjson::StringBuffer> >(); }
-TEST_F(Misc, itoa64_Writer3_StringBufferVerify) { itoa64_Writer_StringBufferVerify<Writer3<rapidjson::StringBuffer> >(); }
-TEST_F(Misc, itoa64_Writer4_StringBufferVerify) { itoa64_Writer_StringBufferVerify<Writer4<rapidjson::StringBuffer> >(); }
-TEST_F(Misc, itoa64_Writer_InsituStringStreamVerify) { itoa64_Writer_InsituStringStreamVerify<rapidjson::Writer<rapidjson::InsituStringStream> >(); }
-TEST_F(Misc, itoa64_Writer1_InsituStringStreamVerify) { itoa64_Writer_InsituStringStreamVerify<Writer1<rapidjson::InsituStringStream> >(); }
-TEST_F(Misc, itoa64_Writer2_InsituStringStreamVerify) { itoa64_Writer_InsituStringStreamVerify<Writer2<rapidjson::InsituStringStream> >(); }
-TEST_F(Misc, itoa64_Writer3_InsituStringStreamVerify) { itoa64_Writer_InsituStringStreamVerify<Writer3<rapidjson::InsituStringStream> >(); }
-TEST_F(Misc, itoa64_Writer4_InsituStringStreamVerify) { itoa64_Writer_InsituStringStreamVerify<Writer4<rapidjson::InsituStringStream> >(); }
-TEST_F(Misc, itoa64_Writer_StringBuffer) { itoa64_Writer_StringBuffer<rapidjson::Writer<rapidjson::StringBuffer> >(); }
-TEST_F(Misc, itoa64_Writer1_StringBuffer) { itoa64_Writer_StringBuffer<Writer1<rapidjson::StringBuffer> >(); }
-TEST_F(Misc, itoa64_Writer2_StringBuffer) { itoa64_Writer_StringBuffer<Writer2<rapidjson::StringBuffer> >(); }
-TEST_F(Misc, itoa64_Writer3_StringBuffer) { itoa64_Writer_StringBuffer<Writer3<rapidjson::StringBuffer> >(); }
-TEST_F(Misc, itoa64_Writer4_StringBuffer) { itoa64_Writer_StringBuffer<Writer4<rapidjson::StringBuffer> >(); }
-TEST_F(Misc, itoa64_Writer_InsituStringStream) { itoa64_Writer_InsituStringStream<rapidjson::Writer<rapidjson::InsituStringStream> >(); }
-TEST_F(Misc, itoa64_Writer1_InsituStringStream) { itoa64_Writer_InsituStringStream<Writer1<rapidjson::InsituStringStream> >(); }
-TEST_F(Misc, itoa64_Writer2_InsituStringStream) { itoa64_Writer_InsituStringStream<Writer2<rapidjson::InsituStringStream> >(); }
-TEST_F(Misc, itoa64_Writer3_InsituStringStream) { itoa64_Writer_InsituStringStream<Writer3<rapidjson::InsituStringStream> >(); }
-TEST_F(Misc, itoa64_Writer4_InsituStringStream) { itoa64_Writer_InsituStringStream<Writer4<rapidjson::InsituStringStream> >(); }
-
-#endif // TEST_MISC
diff --git a/3rdparty/rapidjson/test/perftest/perftest.cpp b/3rdparty/rapidjson/test/perftest/perftest.cpp
deleted file mode 100644
index 4e79f1f5180..00000000000
--- a/3rdparty/rapidjson/test/perftest/perftest.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 "perftest.h"
-
-int main(int argc, char **argv) {
-#if _MSC_VER
- _CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
- //void *testWhetherMemoryLeakDetectionWorks = malloc(1);
-#endif
- ::testing::InitGoogleTest(&argc, argv);
- return RUN_ALL_TESTS();
-}
diff --git a/3rdparty/rapidjson/test/perftest/perftest.h b/3rdparty/rapidjson/test/perftest/perftest.h
deleted file mode 100644
index 029940934c7..00000000000
--- a/3rdparty/rapidjson/test/perftest/perftest.h
+++ /dev/null
@@ -1,180 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 PERFTEST_H_
-#define PERFTEST_H_
-
-#define TEST_RAPIDJSON 1
-#define TEST_PLATFORM 0
-#define TEST_MISC 0
-
-#define TEST_VERSION_CODE(x,y,z) \
- (((x)*100000) + ((y)*100) + (z))
-
-// __SSE2__ and __SSE4_2__ are recognized by gcc, clang, and the Intel compiler.
-// We use -march=native with gmake to enable -msse2 and -msse4.2, if supported.
-#if defined(__SSE4_2__)
-# define RAPIDJSON_SSE42
-#elif defined(__SSE2__)
-# define RAPIDJSON_SSE2
-#endif
-
-////////////////////////////////////////////////////////////////////////////////
-// Google Test
-
-#ifdef __cplusplus
-
-// gtest indirectly included inttypes.h, without __STDC_CONSTANT_MACROS.
-#ifndef __STDC_CONSTANT_MACROS
-# define __STDC_CONSTANT_MACROS 1 // required by C++ standard
-#endif
-
-#if defined(__clang__) || defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
-#if defined(__clang__) || (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
-#pragma GCC diagnostic push
-#endif
-#pragma GCC diagnostic ignored "-Weffc++"
-#endif
-
-#include "gtest/gtest.h"
-
-#if defined(__clang__) || defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
-#pragma GCC diagnostic pop
-#endif
-
-#ifdef _MSC_VER
-#define _CRTDBG_MAP_ALLOC
-#include <crtdbg.h>
-#pragma warning(disable : 4996) // 'function': was declared deprecated
-#endif
-
-//! Base class for all performance tests
-class PerfTest : public ::testing::Test {
-public:
- PerfTest() : filename_(), json_(), length_(), whitespace_(), whitespace_length_() {}
-
- virtual void SetUp() {
- {
- const char *paths[] = {
- "data/sample.json",
- "bin/data/sample.json",
- "../bin/data/sample.json",
- "../../bin/data/sample.json",
- "../../../bin/data/sample.json"
- };
-
- FILE *fp = 0;
- for (size_t i = 0; i < sizeof(paths) / sizeof(paths[0]); i++) {
- fp = fopen(filename_ = paths[i], "rb");
- if (fp)
- break;
- }
- ASSERT_TRUE(fp != 0);
-
- fseek(fp, 0, SEEK_END);
- length_ = (size_t)ftell(fp);
- fseek(fp, 0, SEEK_SET);
- json_ = (char*)malloc(length_ + 1);
- ASSERT_EQ(length_, fread(json_, 1, length_, fp));
- json_[length_] = '\0';
- fclose(fp);
- }
-
- // whitespace test
- {
- whitespace_length_ = 1024 * 1024;
- whitespace_ = (char *)malloc(whitespace_length_ + 4);
- char *p = whitespace_;
- for (size_t i = 0; i < whitespace_length_; i += 4) {
- *p++ = ' ';
- *p++ = '\n';
- *p++ = '\r';
- *p++ = '\t';
- }
- *p++ = '[';
- *p++ = '0';
- *p++ = ']';
- *p++ = '\0';
- }
-
- // types test
- {
- const char *typespaths[] = {
- "data/types",
- "bin/types",
- "../bin/types",
- "../../bin/types/",
- "../../../bin/types"
- };
-
- const char* typesfilenames[] = {
- "booleans.json",
- "floats.json",
- "guids.json",
- "integers.json",
- "mixed.json",
- "nulls.json",
- "paragraphs.json"
- };
-
- for (size_t j = 0; j < sizeof(typesfilenames) / sizeof(typesfilenames[0]); j++) {
- types_[j] = 0;
- for (size_t i = 0; i < sizeof(typespaths) / sizeof(typespaths[0]); i++) {
- char filename[256];
- sprintf(filename, "%s/%s", typespaths[i], typesfilenames[j]);
- if (FILE* fp = fopen(filename, "rb")) {
- fseek(fp, 0, SEEK_END);
- typesLength_[j] = (size_t)ftell(fp);
- fseek(fp, 0, SEEK_SET);
- types_[j] = (char*)malloc(typesLength_[j] + 1);
- ASSERT_EQ(typesLength_[j], fread(types_[j], 1, typesLength_[j], fp));
- types_[j][typesLength_[j]] = '\0';
- fclose(fp);
- break;
- }
- }
- }
- }
- }
-
- virtual void TearDown() {
- free(json_);
- free(whitespace_);
- json_ = 0;
- whitespace_ = 0;
- for (size_t i = 0; i < 7; i++) {
- free(types_[i]);
- types_[i] = 0;
- }
- }
-
-private:
- PerfTest(const PerfTest&);
- PerfTest& operator=(const PerfTest&);
-
-protected:
- const char* filename_;
- char *json_;
- size_t length_;
- char *whitespace_;
- size_t whitespace_length_;
- char *types_[7];
- size_t typesLength_[7];
-
- static const size_t kTrialCount = 1000;
-};
-
-#endif // __cplusplus
-
-#endif // PERFTEST_H_
diff --git a/3rdparty/rapidjson/test/perftest/platformtest.cpp b/3rdparty/rapidjson/test/perftest/platformtest.cpp
deleted file mode 100644
index bb905ca73be..00000000000
--- a/3rdparty/rapidjson/test/perftest/platformtest.cpp
+++ /dev/null
@@ -1,166 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 "perftest.h"
-
-// This file is for giving the performance characteristics of the platform (compiler/OS/CPU).
-
-#if TEST_PLATFORM
-
-#include <cmath>
-#include <fcntl.h>
-
-// Windows
-#ifdef _WIN32
-#include <windows.h>
-#endif
-
-// UNIX
-#if defined(unix) || defined(__unix__) || defined(__unix)
-#include <unistd.h>
-#ifdef _POSIX_MAPPED_FILES
-#include <sys/mman.h>
-#endif
-#endif
-
-class Platform : public PerfTest {
-public:
- virtual void SetUp() {
- PerfTest::SetUp();
-
- // temp buffer for testing
- temp_ = (char *)malloc(length_ + 1);
- memcpy(temp_, json_, length_);
- checkSum_ = CheckSum();
- }
-
- char CheckSum() {
- char c = 0;
- for (size_t i = 0; i < length_; ++i)
- c += temp_[i];
- return c;
- }
-
- virtual void TearDown() {
- PerfTest::TearDown();
- free(temp_);
- }
-
-protected:
- char *temp_;
- char checkSum_;
-};
-
-TEST_F(Platform, CheckSum) {
- for (int i = 0; i < kTrialCount; i++)
- EXPECT_EQ(checkSum_, CheckSum());
-}
-
-TEST_F(Platform, strlen) {
- for (int i = 0; i < kTrialCount; i++) {
- size_t l = strlen(json_);
- EXPECT_EQ(length_, l);
- }
-}
-
-TEST_F(Platform, memcmp) {
- for (int i = 0; i < kTrialCount; i++) {
- EXPECT_EQ(0, memcmp(temp_, json_, length_));
- }
-}
-
-TEST_F(Platform, pow) {
- double sum = 0;
- for (int i = 0; i < kTrialCount * kTrialCount; i++)
- sum += pow(10.0, i & 255);
- EXPECT_GT(sum, 0.0);
-}
-
-TEST_F(Platform, Whitespace_strlen) {
- for (int i = 0; i < kTrialCount; i++) {
- size_t l = strlen(whitespace_);
- EXPECT_GT(l, whitespace_length_);
- }
-}
-
-TEST_F(Platform, Whitespace_strspn) {
- for (int i = 0; i < kTrialCount; i++) {
- size_t l = strspn(whitespace_, " \n\r\t");
- EXPECT_EQ(whitespace_length_, l);
- }
-}
-
-TEST_F(Platform, fread) {
- for (int i = 0; i < kTrialCount; i++) {
- FILE *fp = fopen(filename_, "rb");
- ASSERT_EQ(length_, fread(temp_, 1, length_, fp));
- EXPECT_EQ(checkSum_, CheckSum());
- fclose(fp);
- }
-}
-
-#ifdef _MSC_VER
-TEST_F(Platform, read) {
- for (int i = 0; i < kTrialCount; i++) {
- int fd = _open(filename_, _O_BINARY | _O_RDONLY);
- ASSERT_NE(-1, fd);
- ASSERT_EQ(length_, _read(fd, temp_, length_));
- EXPECT_EQ(checkSum_, CheckSum());
- _close(fd);
- }
-}
-#else
-TEST_F(Platform, read) {
- for (int i = 0; i < kTrialCount; i++) {
- int fd = open(filename_, O_RDONLY);
- ASSERT_NE(-1, fd);
- ASSERT_EQ(length_, read(fd, temp_, length_));
- EXPECT_EQ(checkSum_, CheckSum());
- close(fd);
- }
-}
-#endif
-
-#ifdef _WIN32
-TEST_F(Platform, MapViewOfFile) {
- for (int i = 0; i < kTrialCount; i++) {
- HANDLE file = CreateFile(filename_, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
- ASSERT_NE(INVALID_HANDLE_VALUE, file);
- HANDLE mapObject = CreateFileMapping(file, NULL, PAGE_READONLY, 0, length_, NULL);
- ASSERT_NE(INVALID_HANDLE_VALUE, mapObject);
- void *p = MapViewOfFile(mapObject, FILE_MAP_READ, 0, 0, length_);
- ASSERT_TRUE(p != NULL);
- EXPECT_EQ(checkSum_, CheckSum());
- ASSERT_TRUE(UnmapViewOfFile(p) == TRUE);
- ASSERT_TRUE(CloseHandle(mapObject) == TRUE);
- ASSERT_TRUE(CloseHandle(file) == TRUE);
- }
-}
-#endif
-
-#ifdef _POSIX_MAPPED_FILES
-TEST_F(Platform, mmap) {
- for (int i = 0; i < kTrialCount; i++) {
- int fd = open(filename_, O_RDONLY);
- ASSERT_NE(-1, fd);
- void *p = mmap(NULL, length_, PROT_READ, MAP_PRIVATE, fd, 0);
- ASSERT_TRUE(p != NULL);
- EXPECT_EQ(checkSum_, CheckSum());
- munmap(p, length_);
- close(fd);
- }
-}
-#endif
-
-#endif // TEST_PLATFORM
diff --git a/3rdparty/rapidjson/test/perftest/rapidjsontest.cpp b/3rdparty/rapidjson/test/perftest/rapidjsontest.cpp
deleted file mode 100644
index 74424ac332b..00000000000
--- a/3rdparty/rapidjson/test/perftest/rapidjsontest.cpp
+++ /dev/null
@@ -1,422 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 "perftest.h"
-
-#if TEST_RAPIDJSON
-
-#include "rapidjson/rapidjson.h"
-#include "rapidjson/document.h"
-#include "rapidjson/prettywriter.h"
-#include "rapidjson/stringbuffer.h"
-#include "rapidjson/filereadstream.h"
-#include "rapidjson/encodedstream.h"
-#include "rapidjson/memorystream.h"
-
-#ifdef RAPIDJSON_SSE2
-#define SIMD_SUFFIX(name) name##_SSE2
-#elif defined(RAPIDJSON_SSE42)
-#define SIMD_SUFFIX(name) name##_SSE42
-#else
-#define SIMD_SUFFIX(name) name
-#endif
-
-using namespace rapidjson;
-
-class RapidJson : public PerfTest {
-public:
- RapidJson() : temp_(), doc_() {}
-
- virtual void SetUp() {
- PerfTest::SetUp();
-
- // temp buffer for insitu parsing.
- temp_ = (char *)malloc(length_ + 1);
-
- // Parse as a document
- EXPECT_FALSE(doc_.Parse(json_).HasParseError());
-
- for (size_t i = 0; i < 7; i++)
- EXPECT_FALSE(typesDoc_[i].Parse(types_[i]).HasParseError());
- }
-
- virtual void TearDown() {
- PerfTest::TearDown();
- free(temp_);
- }
-
-private:
- RapidJson(const RapidJson&);
- RapidJson& operator=(const RapidJson&);
-
-protected:
- char *temp_;
- Document doc_;
- Document typesDoc_[7];
-};
-
-TEST_F(RapidJson, SIMD_SUFFIX(ReaderParseInsitu_DummyHandler)) {
- for (size_t i = 0; i < kTrialCount; i++) {
- memcpy(temp_, json_, length_ + 1);
- InsituStringStream s(temp_);
- BaseReaderHandler<> h;
- Reader reader;
- EXPECT_TRUE(reader.Parse<kParseInsituFlag>(s, h));
- }
-}
-
-TEST_F(RapidJson, SIMD_SUFFIX(ReaderParseInsitu_DummyHandler_ValidateEncoding)) {
- for (size_t i = 0; i < kTrialCount; i++) {
- memcpy(temp_, json_, length_ + 1);
- InsituStringStream s(temp_);
- BaseReaderHandler<> h;
- Reader reader;
- EXPECT_TRUE(reader.Parse<kParseInsituFlag | kParseValidateEncodingFlag>(s, h));
- }
-}
-
-TEST_F(RapidJson, SIMD_SUFFIX(ReaderParse_DummyHandler)) {
- for (size_t i = 0; i < kTrialCount; i++) {
- StringStream s(json_);
- BaseReaderHandler<> h;
- Reader reader;
- EXPECT_TRUE(reader.Parse(s, h));
- }
-}
-
-#define TEST_TYPED(index, Name)\
-TEST_F(RapidJson, SIMD_SUFFIX(ReaderParse_DummyHandler_##Name)) {\
- for (size_t i = 0; i < kTrialCount * 10; i++) {\
- StringStream s(types_[index]);\
- BaseReaderHandler<> h;\
- Reader reader;\
- EXPECT_TRUE(reader.Parse(s, h));\
- }\
-}\
-TEST_F(RapidJson, SIMD_SUFFIX(ReaderParseInsitu_DummyHandler_##Name)) {\
- for (size_t i = 0; i < kTrialCount * 10; i++) {\
- memcpy(temp_, types_[index], typesLength_[index] + 1);\
- InsituStringStream s(temp_);\
- BaseReaderHandler<> h;\
- Reader reader;\
- EXPECT_TRUE(reader.Parse<kParseInsituFlag>(s, h));\
- }\
-}
-
-TEST_TYPED(0, Booleans)
-TEST_TYPED(1, Floats)
-TEST_TYPED(2, Guids)
-TEST_TYPED(3, Integers)
-TEST_TYPED(4, Mixed)
-TEST_TYPED(5, Nulls)
-TEST_TYPED(6, Paragraphs)
-
-#undef TEST_TYPED
-
-TEST_F(RapidJson, SIMD_SUFFIX(ReaderParse_DummyHandler_FullPrecision)) {
- for (size_t i = 0; i < kTrialCount; i++) {
- StringStream s(json_);
- BaseReaderHandler<> h;
- Reader reader;
- EXPECT_TRUE(reader.Parse<kParseFullPrecisionFlag>(s, h));
- }
-}
-
-TEST_F(RapidJson, SIMD_SUFFIX(ReaderParseIterative_DummyHandler)) {
- for (size_t i = 0; i < kTrialCount; i++) {
- StringStream s(json_);
- BaseReaderHandler<> h;
- Reader reader;
- EXPECT_TRUE(reader.Parse<kParseIterativeFlag>(s, h));
- }
-}
-
-TEST_F(RapidJson, SIMD_SUFFIX(ReaderParseIterativeInsitu_DummyHandler)) {
- for (size_t i = 0; i < kTrialCount; i++) {
- memcpy(temp_, json_, length_ + 1);
- InsituStringStream s(temp_);
- BaseReaderHandler<> h;
- Reader reader;
- EXPECT_TRUE(reader.Parse<kParseIterativeFlag|kParseInsituFlag>(s, h));
- }
-}
-
-TEST_F(RapidJson, SIMD_SUFFIX(ReaderParse_DummyHandler_ValidateEncoding)) {
- for (size_t i = 0; i < kTrialCount; i++) {
- StringStream s(json_);
- BaseReaderHandler<> h;
- Reader reader;
- EXPECT_TRUE(reader.Parse<kParseValidateEncodingFlag>(s, h));
- }
-}
-
-TEST_F(RapidJson, SIMD_SUFFIX(DocumentParseInsitu_MemoryPoolAllocator)) {
- for (size_t i = 0; i < kTrialCount; i++) {
- memcpy(temp_, json_, length_ + 1);
- Document doc;
- doc.ParseInsitu(temp_);
- ASSERT_TRUE(doc.IsObject());
- }
-}
-
-TEST_F(RapidJson, SIMD_SUFFIX(DocumentParseIterativeInsitu_MemoryPoolAllocator)) {
- for (size_t i = 0; i < kTrialCount; i++) {
- memcpy(temp_, json_, length_ + 1);
- Document doc;
- doc.ParseInsitu<kParseIterativeFlag>(temp_);
- ASSERT_TRUE(doc.IsObject());
- }
-}
-
-TEST_F(RapidJson, SIMD_SUFFIX(DocumentParse_MemoryPoolAllocator)) {
- for (size_t i = 0; i < kTrialCount; i++) {
- Document doc;
- doc.Parse(json_);
- ASSERT_TRUE(doc.IsObject());
- }
-}
-
-TEST_F(RapidJson, SIMD_SUFFIX(DocumentParseIterative_MemoryPoolAllocator)) {
- for (size_t i = 0; i < kTrialCount; i++) {
- Document doc;
- doc.Parse<kParseIterativeFlag>(json_);
- ASSERT_TRUE(doc.IsObject());
- }
-}
-
-TEST_F(RapidJson, SIMD_SUFFIX(DocumentParse_CrtAllocator)) {
- for (size_t i = 0; i < kTrialCount; i++) {
- memcpy(temp_, json_, length_ + 1);
- GenericDocument<UTF8<>, CrtAllocator> doc;
- doc.Parse(temp_);
- ASSERT_TRUE(doc.IsObject());
- }
-}
-
-TEST_F(RapidJson, SIMD_SUFFIX(DocumentParseEncodedInputStream_MemoryStream)) {
- for (size_t i = 0; i < kTrialCount; i++) {
- MemoryStream ms(json_, length_);
- EncodedInputStream<UTF8<>, MemoryStream> is(ms);
- Document doc;
- doc.ParseStream<0, UTF8<> >(is);
- ASSERT_TRUE(doc.IsObject());
- }
-}
-
-TEST_F(RapidJson, SIMD_SUFFIX(DocumentParseAutoUTFInputStream_MemoryStream)) {
- for (size_t i = 0; i < kTrialCount; i++) {
- MemoryStream ms(json_, length_);
- AutoUTFInputStream<unsigned, MemoryStream> is(ms);
- Document doc;
- doc.ParseStream<0, AutoUTF<unsigned> >(is);
- ASSERT_TRUE(doc.IsObject());
- }
-}
-
-template<typename T>
-size_t Traverse(const T& value) {
- size_t count = 1;
- switch(value.GetType()) {
- case kObjectType:
- for (typename T::ConstMemberIterator itr = value.MemberBegin(); itr != value.MemberEnd(); ++itr) {
- count++; // name
- count += Traverse(itr->value);
- }
- break;
-
- case kArrayType:
- for (typename T::ConstValueIterator itr = value.Begin(); itr != value.End(); ++itr)
- count += Traverse(*itr);
- break;
-
- default:
- // Do nothing.
- break;
- }
- return count;
-}
-
-TEST_F(RapidJson, DocumentTraverse) {
- for (size_t i = 0; i < kTrialCount; i++) {
- size_t count = Traverse(doc_);
- EXPECT_EQ(4339u, count);
- //if (i == 0)
- // std::cout << count << std::endl;
- }
-}
-
-#ifdef __GNUC__
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(effc++)
-#endif
-
-struct ValueCounter : public BaseReaderHandler<> {
- ValueCounter() : count_(1) {} // root
-
- bool EndObject(SizeType memberCount) { count_ += memberCount * 2; return true; }
- bool EndArray(SizeType elementCount) { count_ += elementCount; return true; }
-
- SizeType count_;
-};
-
-#ifdef __GNUC__
-RAPIDJSON_DIAG_POP
-#endif
-
-TEST_F(RapidJson, DocumentAccept) {
- for (size_t i = 0; i < kTrialCount; i++) {
- ValueCounter counter;
- doc_.Accept(counter);
- EXPECT_EQ(4339u, counter.count_);
- }
-}
-
-struct NullStream {
- typedef char Ch;
-
- NullStream() /*: length_(0)*/ {}
- void Put(Ch) { /*++length_;*/ }
- void Flush() {}
- //size_t length_;
-};
-
-TEST_F(RapidJson, Writer_NullStream) {
- for (size_t i = 0; i < kTrialCount; i++) {
- NullStream s;
- Writer<NullStream> writer(s);
- doc_.Accept(writer);
- //if (i == 0)
- // std::cout << s.length_ << std::endl;
- }
-}
-
-TEST_F(RapidJson, SIMD_SUFFIX(Writer_StringBuffer)) {
- for (size_t i = 0; i < kTrialCount; i++) {
- StringBuffer s(0, 1024 * 1024);
- Writer<StringBuffer> writer(s);
- doc_.Accept(writer);
- const char* str = s.GetString();
- (void)str;
- //if (i == 0)
- // std::cout << strlen(str) << std::endl;
- }
-}
-
-#define TEST_TYPED(index, Name)\
-TEST_F(RapidJson, SIMD_SUFFIX(Writer_StringBuffer_##Name)) {\
- for (size_t i = 0; i < kTrialCount * 10; i++) {\
- StringBuffer s(0, 1024 * 1024);\
- Writer<StringBuffer> writer(s);\
- typesDoc_[index].Accept(writer);\
- const char* str = s.GetString();\
- (void)str;\
- }\
-}
-
-TEST_TYPED(0, Booleans)
-TEST_TYPED(1, Floats)
-TEST_TYPED(2, Guids)
-TEST_TYPED(3, Integers)
-TEST_TYPED(4, Mixed)
-TEST_TYPED(5, Nulls)
-TEST_TYPED(6, Paragraphs)
-
-#undef TEST_TYPED
-
-TEST_F(RapidJson, SIMD_SUFFIX(PrettyWriter_StringBuffer)) {
- for (size_t i = 0; i < kTrialCount; i++) {
- StringBuffer s(0, 2048 * 1024);
- PrettyWriter<StringBuffer> writer(s);
- writer.SetIndent(' ', 1);
- doc_.Accept(writer);
- const char* str = s.GetString();
- (void)str;
- //if (i == 0)
- // std::cout << strlen(str) << std::endl;
- }
-}
-
-TEST_F(RapidJson, internal_Pow10) {
- double sum = 0;
- for (size_t i = 0; i < kTrialCount * kTrialCount; i++)
- sum += internal::Pow10(int(i & 255));
- EXPECT_GT(sum, 0.0);
-}
-
-TEST_F(RapidJson, SkipWhitespace_Basic) {
- for (size_t i = 0; i < kTrialCount; i++) {
- rapidjson::StringStream s(whitespace_);
- while (s.Peek() == ' ' || s.Peek() == '\n' || s.Peek() == '\r' || s.Peek() == '\t')
- s.Take();
- ASSERT_EQ('[', s.Peek());
- }
-}
-
-TEST_F(RapidJson, SIMD_SUFFIX(SkipWhitespace)) {
- for (size_t i = 0; i < kTrialCount; i++) {
- rapidjson::StringStream s(whitespace_);
- rapidjson::SkipWhitespace(s);
- ASSERT_EQ('[', s.Peek());
- }
-}
-
-TEST_F(RapidJson, SkipWhitespace_strspn) {
- for (size_t i = 0; i < kTrialCount; i++) {
- const char* s = whitespace_ + std::strspn(whitespace_, " \t\r\n");
- ASSERT_EQ('[', *s);
- }
-}
-
-TEST_F(RapidJson, UTF8_Validate) {
- NullStream os;
-
- for (size_t i = 0; i < kTrialCount; i++) {
- StringStream is(json_);
- bool result = true;
- while (is.Peek() != '\0')
- result &= UTF8<>::Validate(is, os);
- EXPECT_TRUE(result);
- }
-}
-
-TEST_F(RapidJson, FileReadStream) {
- for (size_t i = 0; i < kTrialCount; i++) {
- FILE *fp = fopen(filename_, "rb");
- char buffer[65536];
- FileReadStream s(fp, buffer, sizeof(buffer));
- while (s.Take() != '\0')
- ;
- fclose(fp);
- }
-}
-
-TEST_F(RapidJson, SIMD_SUFFIX(ReaderParse_DummyHandler_FileReadStream)) {
- for (size_t i = 0; i < kTrialCount; i++) {
- FILE *fp = fopen(filename_, "rb");
- char buffer[65536];
- FileReadStream s(fp, buffer, sizeof(buffer));
- BaseReaderHandler<> h;
- Reader reader;
- reader.Parse(s, h);
- fclose(fp);
- }
-}
-
-TEST_F(RapidJson, StringBuffer) {
- StringBuffer sb;
- for (int i = 0; i < 32 * 1024 * 1024; i++)
- sb.Put(i & 0x7f);
-}
-
-#endif // TEST_RAPIDJSON
diff --git a/3rdparty/rapidjson/test/perftest/schematest.cpp b/3rdparty/rapidjson/test/perftest/schematest.cpp
deleted file mode 100644
index 468f5fe6f6a..00000000000
--- a/3rdparty/rapidjson/test/perftest/schematest.cpp
+++ /dev/null
@@ -1,216 +0,0 @@
-#include "perftest.h"
-
-#if TEST_RAPIDJSON
-
-#include "rapidjson/schema.h"
-#include <ctime>
-#include <string>
-#include <vector>
-
-#define ARRAY_SIZE(a) sizeof(a) / sizeof(a[0])
-
-using namespace rapidjson;
-
-template <typename Allocator>
-static char* ReadFile(const char* filename, Allocator& allocator) {
- const char *paths[] = {
- "",
- "bin/",
- "../bin/",
- "../../bin/",
- "../../../bin/"
- };
- char buffer[1024];
- FILE *fp = 0;
- for (size_t i = 0; i < sizeof(paths) / sizeof(paths[0]); i++) {
- sprintf(buffer, "%s%s", paths[i], filename);
- fp = fopen(buffer, "rb");
- if (fp)
- break;
- }
-
- if (!fp)
- return 0;
-
- fseek(fp, 0, SEEK_END);
- size_t length = static_cast<size_t>(ftell(fp));
- fseek(fp, 0, SEEK_SET);
- char* json = reinterpret_cast<char*>(allocator.Malloc(length + 1));
- size_t readLength = fread(json, 1, length, fp);
- json[readLength] = '\0';
- fclose(fp);
- return json;
-}
-
-class Schema : public PerfTest {
-public:
- Schema() {}
-
- virtual void SetUp() {
- PerfTest::SetUp();
-
- const char* filenames[] = {
- "additionalItems.json",
- "additionalProperties.json",
- "allOf.json",
- "anyOf.json",
- "default.json",
- "definitions.json",
- "dependencies.json",
- "enum.json",
- "items.json",
- "maximum.json",
- "maxItems.json",
- "maxLength.json",
- "maxProperties.json",
- "minimum.json",
- "minItems.json",
- "minLength.json",
- "minProperties.json",
- "multipleOf.json",
- "not.json",
- "oneOf.json",
- "pattern.json",
- "patternProperties.json",
- "properties.json",
- "ref.json",
- "refRemote.json",
- "required.json",
- "type.json",
- "uniqueItems.json"
- };
-
- char jsonBuffer[65536];
- MemoryPoolAllocator<> jsonAllocator(jsonBuffer, sizeof(jsonBuffer));
-
- for (size_t i = 0; i < ARRAY_SIZE(filenames); i++) {
- char filename[FILENAME_MAX];
- sprintf(filename, "jsonschema/tests/draft4/%s", filenames[i]);
- char* json = ReadFile(filename, jsonAllocator);
- if (!json) {
- printf("json test suite file %s not found", filename);
- return;
- }
-
- Document d;
- d.Parse(json);
- if (d.HasParseError()) {
- printf("json test suite file %s has parse error", filename);
- return;
- }
-
- for (Value::ConstValueIterator schemaItr = d.Begin(); schemaItr != d.End(); ++schemaItr) {
- std::string schemaDescription = (*schemaItr)["description"].GetString();
- if (IsExcludeTestSuite(schemaDescription))
- continue;
-
- TestSuite* ts = new TestSuite;
- ts->schema = new SchemaDocument((*schemaItr)["schema"]);
-
- const Value& tests = (*schemaItr)["tests"];
- for (Value::ConstValueIterator testItr = tests.Begin(); testItr != tests.End(); ++testItr) {
- if (IsExcludeTest(schemaDescription + ", " + (*testItr)["description"].GetString()))
- continue;
-
- Document* d2 = new Document;
- d2->CopyFrom((*testItr)["data"], d2->GetAllocator());
- ts->tests.push_back(d2);
- }
- testSuites.push_back(ts);
- }
- }
- }
-
- virtual void TearDown() {
- PerfTest::TearDown();
- for (TestSuiteList::const_iterator itr = testSuites.begin(); itr != testSuites.end(); ++itr)
- delete *itr;
- testSuites.clear();
- }
-
-private:
- // Using the same exclusion in https://github.com/json-schema/JSON-Schema-Test-Suite
- static bool IsExcludeTestSuite(const std::string& description) {
- const char* excludeTestSuites[] = {
- //lost failing these tests
- "remote ref",
- "remote ref, containing refs itself",
- "fragment within remote ref",
- "ref within remote ref",
- "change resolution scope",
- // these below were added to get jsck in the benchmarks)
- "uniqueItems validation",
- "valid definition",
- "invalid definition"
- };
-
- for (size_t i = 0; i < ARRAY_SIZE(excludeTestSuites); i++)
- if (excludeTestSuites[i] == description)
- return true;
- return false;
- }
-
- // Using the same exclusion in https://github.com/json-schema/JSON-Schema-Test-Suite
- static bool IsExcludeTest(const std::string& description) {
- const char* excludeTests[] = {
- //lots of validators fail these
- "invalid definition, invalid definition schema",
- "maxLength validation, two supplementary Unicode code points is long enough",
- "minLength validation, one supplementary Unicode code point is not long enough",
- //this is to get tv4 in the benchmarks
- "heterogeneous enum validation, something else is invalid"
- };
-
- for (size_t i = 0; i < ARRAY_SIZE(excludeTests); i++)
- if (excludeTests[i] == description)
- return true;
- return false;
- }
-
- Schema(const Schema&);
- Schema& operator=(const Schema&);
-
-protected:
- typedef std::vector<Document*> DocumentList;
-
- struct TestSuite {
- TestSuite() : schema() {}
- ~TestSuite() {
- delete schema;
- for (DocumentList::iterator itr = tests.begin(); itr != tests.end(); ++itr)
- delete *itr;
- }
- SchemaDocument* schema;
- DocumentList tests;
- };
-
- typedef std::vector<TestSuite* > TestSuiteList;
- TestSuiteList testSuites;
-};
-
-TEST_F(Schema, TestSuite) {
- char validatorBuffer[65536];
- MemoryPoolAllocator<> validatorAllocator(validatorBuffer, sizeof(validatorBuffer));
-
- const int trialCount = 100000;
- int testCount = 0;
- clock_t start = clock();
- for (int i = 0; i < trialCount; i++) {
- for (TestSuiteList::const_iterator itr = testSuites.begin(); itr != testSuites.end(); ++itr) {
- const TestSuite& ts = **itr;
- GenericSchemaValidator<SchemaDocument, BaseReaderHandler<UTF8<> >, MemoryPoolAllocator<> > validator(*ts.schema, &validatorAllocator);
- for (DocumentList::const_iterator testItr = ts.tests.begin(); testItr != ts.tests.end(); ++testItr) {
- validator.Reset();
- (*testItr)->Accept(validator);
- testCount++;
- }
- validatorAllocator.Clear();
- }
- }
- clock_t end = clock();
- double duration = double(end - start) / CLOCKS_PER_SEC;
- printf("%d trials in %f s -> %f trials per sec\n", trialCount, duration, trialCount / duration);
- printf("%d tests per trial\n", testCount / trialCount);
-}
-
-#endif
diff --git a/3rdparty/rapidjson/test/unittest/CMakeLists.txt b/3rdparty/rapidjson/test/unittest/CMakeLists.txt
deleted file mode 100644
index 0ae166282e5..00000000000
--- a/3rdparty/rapidjson/test/unittest/CMakeLists.txt
+++ /dev/null
@@ -1,61 +0,0 @@
-set(UNITTEST_SOURCES
- allocatorstest.cpp
- bigintegertest.cpp
- documenttest.cpp
- dtoatest.cpp
- encodedstreamtest.cpp
- encodingstest.cpp
- fwdtest.cpp
- filestreamtest.cpp
- itoatest.cpp
- istreamwrappertest.cpp
- jsoncheckertest.cpp
- namespacetest.cpp
- pointertest.cpp
- prettywritertest.cpp
- ostreamwrappertest.cpp
- readertest.cpp
- regextest.cpp
- schematest.cpp
- simdtest.cpp
- strfunctest.cpp
- stringbuffertest.cpp
- strtodtest.cpp
- unittest.cpp
- valuetest.cpp
- writertest.cpp)
-
-if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -Weffc++ -Wswitch-default -Wfloat-equal")
-elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -Weffc++ -Wswitch-default -Wfloat-equal -Wimplicit-fallthrough -Weverything")
-elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
- add_definitions(-D_CRT_SECURE_NO_WARNINGS=1)
-endif()
-
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DRAPIDJSON_HAS_STDSTRING=1")
-
-add_library(namespacetest STATIC namespacetest.cpp)
-
-add_executable(unittest ${UNITTEST_SOURCES})
-target_link_libraries(unittest ${TEST_LIBRARIES} namespacetest)
-
-add_dependencies(tests unittest)
-
-add_test(NAME unittest
- COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
-
-if(NOT MSVC)
- # Not running SIMD.* unit test cases for Valgrind
- add_test(NAME valgrind_unittest
- COMMAND valgrind --leak-check=full --error-exitcode=1 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest --gtest_filter=-SIMD.*
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
-
- if(CMAKE_BUILD_TYPE STREQUAL "Debug")
- add_test(NAME symbol_check
- COMMAND sh -c "objdump -t -C libnamespacetest.a | grep rapidjson ; test $? -ne 0"
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
- endif(CMAKE_BUILD_TYPE STREQUAL "Debug")
-
-endif(NOT MSVC)
diff --git a/3rdparty/rapidjson/test/unittest/allocatorstest.cpp b/3rdparty/rapidjson/test/unittest/allocatorstest.cpp
deleted file mode 100644
index a5958de199e..00000000000
--- a/3rdparty/rapidjson/test/unittest/allocatorstest.cpp
+++ /dev/null
@@ -1,102 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 "unittest.h"
-
-#include "rapidjson/allocators.h"
-
-using namespace rapidjson;
-
-template <typename Allocator>
-void TestAllocator(Allocator& a) {
- EXPECT_TRUE(a.Malloc(0) == 0);
-
- uint8_t* p = static_cast<uint8_t*>(a.Malloc(100));
- EXPECT_TRUE(p != 0);
- for (size_t i = 0; i < 100; i++)
- p[i] = static_cast<uint8_t>(i);
-
- // Expand
- uint8_t* q = static_cast<uint8_t*>(a.Realloc(p, 100, 200));
- EXPECT_TRUE(q != 0);
- for (size_t i = 0; i < 100; i++)
- EXPECT_EQ(i, q[i]);
- for (size_t i = 100; i < 200; i++)
- q[i] = static_cast<uint8_t>(i);
-
- // Shrink
- uint8_t *r = static_cast<uint8_t*>(a.Realloc(q, 200, 150));
- EXPECT_TRUE(r != 0);
- for (size_t i = 0; i < 150; i++)
- EXPECT_EQ(i, r[i]);
-
- Allocator::Free(r);
-
- // Realloc to zero size
- EXPECT_TRUE(a.Realloc(a.Malloc(1), 1, 0) == 0);
-}
-
-TEST(Allocator, CrtAllocator) {
- CrtAllocator a;
- TestAllocator(a);
-}
-
-TEST(Allocator, MemoryPoolAllocator) {
- MemoryPoolAllocator<> a;
- TestAllocator(a);
-
- for (size_t i = 1; i < 1000; i++) {
- EXPECT_TRUE(a.Malloc(i) != 0);
- EXPECT_LE(a.Size(), a.Capacity());
- }
-}
-
-TEST(Allocator, Alignment) {
-#if RAPIDJSON_64BIT == 1
- EXPECT_EQ(RAPIDJSON_UINT64_C2(0x00000000, 0x00000000), RAPIDJSON_ALIGN(0));
- for (uint64_t i = 1; i < 8; i++) {
- EXPECT_EQ(RAPIDJSON_UINT64_C2(0x00000000, 0x00000008), RAPIDJSON_ALIGN(i));
- EXPECT_EQ(RAPIDJSON_UINT64_C2(0x00000000, 0x00000010), RAPIDJSON_ALIGN(RAPIDJSON_UINT64_C2(0x00000000, 0x00000008) + i));
- EXPECT_EQ(RAPIDJSON_UINT64_C2(0x00000001, 0x00000000), RAPIDJSON_ALIGN(RAPIDJSON_UINT64_C2(0x00000000, 0xFFFFFFF8) + i));
- EXPECT_EQ(RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0xFFFFFFF8), RAPIDJSON_ALIGN(RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0xFFFFFFF0) + i));
- }
-#else
- EXPECT_EQ(0u, RAPIDJSON_ALIGN(0u));
- for (uint32_t i = 1; i < 4; i++) {
- EXPECT_EQ(4u, RAPIDJSON_ALIGN(i));
- EXPECT_EQ(8u, RAPIDJSON_ALIGN(4u + i));
- EXPECT_EQ(0xFFFFFFF8u, RAPIDJSON_ALIGN(0xFFFFFFF4u + i));
- EXPECT_EQ(0xFFFFFFFCu, RAPIDJSON_ALIGN(0xFFFFFFF8u + i));
- }
-#endif
-}
-
-TEST(Allocator, Issue399) {
- MemoryPoolAllocator<> a;
- void* p = a.Malloc(100);
- void* q = a.Realloc(p, 100, 200);
- EXPECT_EQ(p, q);
-
- // exhuasive testing
- for (size_t j = 1; j < 32; j++) {
- a.Clear();
- a.Malloc(j); // some unaligned size
- p = a.Malloc(1);
- for (size_t i = 1; i < 1024; i++) {
- q = a.Realloc(p, i, i + 1);
- EXPECT_EQ(p, q);
- p = q;
- }
- }
-}
diff --git a/3rdparty/rapidjson/test/unittest/bigintegertest.cpp b/3rdparty/rapidjson/test/unittest/bigintegertest.cpp
deleted file mode 100644
index a68e1444672..00000000000
--- a/3rdparty/rapidjson/test/unittest/bigintegertest.cpp
+++ /dev/null
@@ -1,133 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 "unittest.h"
-
-#include "rapidjson/internal/biginteger.h"
-
-using namespace rapidjson::internal;
-
-#define BIGINTEGER_LITERAL(s) BigInteger(s, sizeof(s) - 1)
-
-static const BigInteger kZero(0);
-static const BigInteger kOne(1);
-static const BigInteger kUint64Max = BIGINTEGER_LITERAL("18446744073709551615");
-static const BigInteger kTwo64 = BIGINTEGER_LITERAL("18446744073709551616");
-
-TEST(BigInteger, Constructor) {
- EXPECT_TRUE(kZero.IsZero());
- EXPECT_TRUE(kZero == kZero);
- EXPECT_TRUE(kZero == BIGINTEGER_LITERAL("0"));
- EXPECT_TRUE(kZero == BIGINTEGER_LITERAL("00"));
-
- const BigInteger a(123);
- EXPECT_TRUE(a == a);
- EXPECT_TRUE(a == BIGINTEGER_LITERAL("123"));
- EXPECT_TRUE(a == BIGINTEGER_LITERAL("0123"));
-
- EXPECT_EQ(2u, kTwo64.GetCount());
- EXPECT_EQ(0u, kTwo64.GetDigit(0));
- EXPECT_EQ(1u, kTwo64.GetDigit(1));
-}
-
-TEST(BigInteger, AddUint64) {
- BigInteger a = kZero;
- a += 0u;
- EXPECT_TRUE(kZero == a);
-
- a += 1u;
- EXPECT_TRUE(kOne == a);
-
- a += 1u;
- EXPECT_TRUE(BigInteger(2) == a);
-
- EXPECT_TRUE(BigInteger(RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0xFFFFFFFF)) == kUint64Max);
- BigInteger b = kUint64Max;
- b += 1u;
- EXPECT_TRUE(kTwo64 == b);
- b += RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0xFFFFFFFF);
- EXPECT_TRUE(BIGINTEGER_LITERAL("36893488147419103231") == b);
-}
-
-TEST(BigInteger, MultiplyUint64) {
- BigInteger a = kZero;
- a *= static_cast <uint64_t>(0);
- EXPECT_TRUE(kZero == a);
- a *= static_cast <uint64_t>(123);
- EXPECT_TRUE(kZero == a);
-
- BigInteger b = kOne;
- b *= static_cast<uint64_t>(1);
- EXPECT_TRUE(kOne == b);
- b *= static_cast<uint64_t>(0);
- EXPECT_TRUE(kZero == b);
-
- BigInteger c(123);
- c *= static_cast<uint64_t>(456u);
- EXPECT_TRUE(BigInteger(123u * 456u) == c);
- c *= RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0xFFFFFFFF);
- EXPECT_TRUE(BIGINTEGER_LITERAL("1034640981606221330982120") == c);
- c *= RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0xFFFFFFFF);
- EXPECT_TRUE(BIGINTEGER_LITERAL("19085757395861596536664473018420572782123800") == c);
-}
-
-TEST(BigInteger, MultiplyUint32) {
- BigInteger a = kZero;
- a *= static_cast <uint32_t>(0);
- EXPECT_TRUE(kZero == a);
- a *= static_cast <uint32_t>(123);
- EXPECT_TRUE(kZero == a);
-
- BigInteger b = kOne;
- b *= static_cast<uint32_t>(1);
- EXPECT_TRUE(kOne == b);
- b *= static_cast<uint32_t>(0);
- EXPECT_TRUE(kZero == b);
-
- BigInteger c(123);
- c *= static_cast<uint32_t>(456u);
- EXPECT_TRUE(BigInteger(123u * 456u) == c);
- c *= 0xFFFFFFFFu;
- EXPECT_TRUE(BIGINTEGER_LITERAL("240896125641960") == c);
- c *= 0xFFFFFFFFu;
- EXPECT_TRUE(BIGINTEGER_LITERAL("1034640981124429079698200") == c);
-}
-
-TEST(BigInteger, LeftShift) {
- BigInteger a = kZero;
- a <<= 1;
- EXPECT_TRUE(kZero == a);
- a <<= 64;
- EXPECT_TRUE(kZero == a);
-
- a = BigInteger(123);
- a <<= 0;
- EXPECT_TRUE(BigInteger(123) == a);
- a <<= 1;
- EXPECT_TRUE(BigInteger(246) == a);
- a <<= 64;
- EXPECT_TRUE(BIGINTEGER_LITERAL("4537899042132549697536") == a);
- a <<= 99;
- EXPECT_TRUE(BIGINTEGER_LITERAL("2876235222267216943024851750785644982682875244576768") == a);
-}
-
-TEST(BigInteger, Compare) {
- EXPECT_EQ(0, kZero.Compare(kZero));
- EXPECT_EQ(1, kOne.Compare(kZero));
- EXPECT_EQ(-1, kZero.Compare(kOne));
- EXPECT_EQ(0, kUint64Max.Compare(kUint64Max));
- EXPECT_EQ(0, kTwo64.Compare(kTwo64));
- EXPECT_EQ(-1, kUint64Max.Compare(kTwo64));
- EXPECT_EQ(1, kTwo64.Compare(kUint64Max));
-}
diff --git a/3rdparty/rapidjson/test/unittest/documenttest.cpp b/3rdparty/rapidjson/test/unittest/documenttest.cpp
deleted file mode 100644
index afe696a1e21..00000000000
--- a/3rdparty/rapidjson/test/unittest/documenttest.cpp
+++ /dev/null
@@ -1,589 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 "unittest.h"
-#include "rapidjson/document.h"
-#include "rapidjson/writer.h"
-#include "rapidjson/filereadstream.h"
-#include "rapidjson/encodedstream.h"
-#include "rapidjson/stringbuffer.h"
-#include <sstream>
-#include <algorithm>
-
-#ifdef __clang__
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(c++98-compat)
-RAPIDJSON_DIAG_OFF(missing-variable-declarations)
-#endif
-
-using namespace rapidjson;
-
-template <typename DocumentType>
-void ParseCheck(DocumentType& doc) {
- typedef typename DocumentType::ValueType ValueType;
-
- EXPECT_FALSE(doc.HasParseError());
- EXPECT_TRUE(static_cast<ParseResult>(doc));
-
- EXPECT_TRUE(doc.IsObject());
-
- EXPECT_TRUE(doc.HasMember("hello"));
- const ValueType& hello = doc["hello"];
- EXPECT_TRUE(hello.IsString());
- EXPECT_STREQ("world", hello.GetString());
-
- EXPECT_TRUE(doc.HasMember("t"));
- const ValueType& t = doc["t"];
- EXPECT_TRUE(t.IsTrue());
-
- EXPECT_TRUE(doc.HasMember("f"));
- const ValueType& f = doc["f"];
- EXPECT_TRUE(f.IsFalse());
-
- EXPECT_TRUE(doc.HasMember("n"));
- const ValueType& n = doc["n"];
- EXPECT_TRUE(n.IsNull());
-
- EXPECT_TRUE(doc.HasMember("i"));
- const ValueType& i = doc["i"];
- EXPECT_TRUE(i.IsNumber());
- EXPECT_EQ(123, i.GetInt());
-
- EXPECT_TRUE(doc.HasMember("pi"));
- const ValueType& pi = doc["pi"];
- EXPECT_TRUE(pi.IsNumber());
- EXPECT_DOUBLE_EQ(3.1416, pi.GetDouble());
-
- EXPECT_TRUE(doc.HasMember("a"));
- const ValueType& a = doc["a"];
- EXPECT_TRUE(a.IsArray());
- EXPECT_EQ(4u, a.Size());
- for (SizeType j = 0; j < 4; j++)
- EXPECT_EQ(j + 1, a[j].GetUint());
-}
-
-template <typename Allocator, typename StackAllocator>
-void ParseTest() {
- typedef GenericDocument<UTF8<>, Allocator, StackAllocator> DocumentType;
- DocumentType doc;
-
- const char* json = " { \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3, 4] } ";
-
- doc.Parse(json);
- ParseCheck(doc);
-
- doc.SetNull();
- StringStream s(json);
- doc.template ParseStream<0>(s);
- ParseCheck(doc);
-
- doc.SetNull();
- char *buffer = strdup(json);
- doc.ParseInsitu(buffer);
- ParseCheck(doc);
- free(buffer);
-}
-
-TEST(Document, Parse) {
- ParseTest<MemoryPoolAllocator<>, CrtAllocator>();
- ParseTest<MemoryPoolAllocator<>, MemoryPoolAllocator<> >();
- ParseTest<CrtAllocator, MemoryPoolAllocator<> >();
- ParseTest<CrtAllocator, CrtAllocator>();
-}
-
-TEST(Document, UnchangedOnParseError) {
- Document doc;
- doc.SetArray().PushBack(0, doc.GetAllocator());
-
- ParseResult err = doc.Parse("{]");
- EXPECT_TRUE(doc.HasParseError());
- EXPECT_EQ(err.Code(), doc.GetParseError());
- EXPECT_EQ(err.Offset(), doc.GetErrorOffset());
- EXPECT_TRUE(doc.IsArray());
- EXPECT_EQ(doc.Size(), 1u);
-
- err = doc.Parse("{}");
- EXPECT_FALSE(doc.HasParseError());
- EXPECT_FALSE(err.IsError());
- EXPECT_EQ(err.Code(), doc.GetParseError());
- EXPECT_EQ(err.Offset(), doc.GetErrorOffset());
- EXPECT_TRUE(doc.IsObject());
- EXPECT_EQ(doc.MemberCount(), 0u);
-}
-
-static FILE* OpenEncodedFile(const char* filename) {
- const char *paths[] = {
- "encodings",
- "bin/encodings",
- "../bin/encodings",
- "../../bin/encodings",
- "../../../bin/encodings"
- };
- char buffer[1024];
- for (size_t i = 0; i < sizeof(paths) / sizeof(paths[0]); i++) {
- sprintf(buffer, "%s/%s", paths[i], filename);
- FILE *fp = fopen(buffer, "rb");
- if (fp)
- return fp;
- }
- return 0;
-}
-
-TEST(Document, ParseStream_EncodedInputStream) {
- // UTF8 -> UTF16
- FILE* fp = OpenEncodedFile("utf8.json");
- char buffer[256];
- FileReadStream bis(fp, buffer, sizeof(buffer));
- EncodedInputStream<UTF8<>, FileReadStream> eis(bis);
-
- GenericDocument<UTF16<> > d;
- d.ParseStream<0, UTF8<> >(eis);
- EXPECT_FALSE(d.HasParseError());
-
- fclose(fp);
-
- wchar_t expected[] = L"I can eat glass and it doesn't hurt me.";
- GenericValue<UTF16<> >& v = d[L"en"];
- EXPECT_TRUE(v.IsString());
- EXPECT_EQ(sizeof(expected) / sizeof(wchar_t) - 1, v.GetStringLength());
- EXPECT_EQ(0, StrCmp(expected, v.GetString()));
-
- // UTF16 -> UTF8 in memory
- StringBuffer bos;
- typedef EncodedOutputStream<UTF8<>, StringBuffer> OutputStream;
- OutputStream eos(bos, false); // Not writing BOM
- {
- Writer<OutputStream, UTF16<>, UTF8<> > writer(eos);
- d.Accept(writer);
- }
-
- // Condense the original file and compare.
- fp = OpenEncodedFile("utf8.json");
- FileReadStream is(fp, buffer, sizeof(buffer));
- Reader reader;
- StringBuffer bos2;
- Writer<StringBuffer> writer2(bos2);
- reader.Parse(is, writer2);
- fclose(fp);
-
- EXPECT_EQ(bos.GetSize(), bos2.GetSize());
- EXPECT_EQ(0, memcmp(bos.GetString(), bos2.GetString(), bos2.GetSize()));
-}
-
-TEST(Document, ParseStream_AutoUTFInputStream) {
- // Any -> UTF8
- FILE* fp = OpenEncodedFile("utf32be.json");
- char buffer[256];
- FileReadStream bis(fp, buffer, sizeof(buffer));
- AutoUTFInputStream<unsigned, FileReadStream> eis(bis);
-
- Document d;
- d.ParseStream<0, AutoUTF<unsigned> >(eis);
- EXPECT_FALSE(d.HasParseError());
-
- fclose(fp);
-
- char expected[] = "I can eat glass and it doesn't hurt me.";
- Value& v = d["en"];
- EXPECT_TRUE(v.IsString());
- EXPECT_EQ(sizeof(expected) - 1, v.GetStringLength());
- EXPECT_EQ(0, StrCmp(expected, v.GetString()));
-
- // UTF8 -> UTF8 in memory
- StringBuffer bos;
- Writer<StringBuffer> writer(bos);
- d.Accept(writer);
-
- // Condense the original file and compare.
- fp = OpenEncodedFile("utf8.json");
- FileReadStream is(fp, buffer, sizeof(buffer));
- Reader reader;
- StringBuffer bos2;
- Writer<StringBuffer> writer2(bos2);
- reader.Parse(is, writer2);
- fclose(fp);
-
- EXPECT_EQ(bos.GetSize(), bos2.GetSize());
- EXPECT_EQ(0, memcmp(bos.GetString(), bos2.GetString(), bos2.GetSize()));
-}
-
-TEST(Document, Swap) {
- Document d1;
- Document::AllocatorType& a = d1.GetAllocator();
-
- d1.SetArray().PushBack(1, a).PushBack(2, a);
-
- Value o;
- o.SetObject().AddMember("a", 1, a);
-
- // Swap between Document and Value
- // d1.Swap(o); // doesn't compile
- o.Swap(d1);
- EXPECT_TRUE(d1.IsObject());
- EXPECT_TRUE(o.IsArray());
-
- // Swap between Document and Document
- Document d2;
- d2.SetArray().PushBack(3, a);
- d1.Swap(d2);
- EXPECT_TRUE(d1.IsArray());
- EXPECT_TRUE(d2.IsObject());
- EXPECT_EQ(&d2.GetAllocator(), &a);
-
- // reset value
- Value().Swap(d1);
- EXPECT_TRUE(d1.IsNull());
-
- // reset document, including allocator
- Document().Swap(d2);
- EXPECT_TRUE(d2.IsNull());
- EXPECT_NE(&d2.GetAllocator(), &a);
-
- // testing std::swap compatibility
- d1.SetBool(true);
- using std::swap;
- swap(d1, d2);
- EXPECT_TRUE(d1.IsNull());
- EXPECT_TRUE(d2.IsTrue());
-
- swap(o, d2);
- EXPECT_TRUE(o.IsTrue());
- EXPECT_TRUE(d2.IsArray());
-}
-
-
-// This should be slow due to assignment in inner-loop.
-struct OutputStringStream : public std::ostringstream {
- typedef char Ch;
-
- virtual ~OutputStringStream();
-
- void Put(char c) {
- put(c);
- }
- void Flush() {}
-};
-
-OutputStringStream::~OutputStringStream() {}
-
-TEST(Document, AcceptWriter) {
- Document doc;
- doc.Parse(" { \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3, 4] } ");
-
- OutputStringStream os;
- Writer<OutputStringStream> writer(os);
- doc.Accept(writer);
-
- EXPECT_EQ("{\"hello\":\"world\",\"t\":true,\"f\":false,\"n\":null,\"i\":123,\"pi\":3.1416,\"a\":[1,2,3,4]}", os.str());
-}
-
-TEST(Document, UserBuffer) {
- typedef GenericDocument<UTF8<>, MemoryPoolAllocator<>, MemoryPoolAllocator<> > DocumentType;
- char valueBuffer[4096];
- char parseBuffer[1024];
- MemoryPoolAllocator<> valueAllocator(valueBuffer, sizeof(valueBuffer));
- MemoryPoolAllocator<> parseAllocator(parseBuffer, sizeof(parseBuffer));
- DocumentType doc(&valueAllocator, sizeof(parseBuffer) / 2, &parseAllocator);
- doc.Parse(" { \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3, 4] } ");
- EXPECT_FALSE(doc.HasParseError());
- EXPECT_LE(valueAllocator.Size(), sizeof(valueBuffer));
- EXPECT_LE(parseAllocator.Size(), sizeof(parseBuffer));
-
- // Cover MemoryPoolAllocator::Capacity()
- EXPECT_LE(valueAllocator.Size(), valueAllocator.Capacity());
- EXPECT_LE(parseAllocator.Size(), parseAllocator.Capacity());
-}
-
-// Issue 226: Value of string type should not point to NULL
-TEST(Document, AssertAcceptInvalidNameType) {
- Document doc;
- doc.SetObject();
- doc.AddMember("a", 0, doc.GetAllocator());
- doc.FindMember("a")->name.SetNull(); // Change name to non-string type.
-
- OutputStringStream os;
- Writer<OutputStringStream> writer(os);
- ASSERT_THROW(doc.Accept(writer), AssertException);
-}
-
-// Issue 44: SetStringRaw doesn't work with wchar_t
-TEST(Document, UTF16_Document) {
- GenericDocument< UTF16<> > json;
- json.Parse<kParseValidateEncodingFlag>(L"[{\"created_at\":\"Wed Oct 30 17:13:20 +0000 2012\"}]");
-
- ASSERT_TRUE(json.IsArray());
- GenericValue< UTF16<> >& v = json[0];
- ASSERT_TRUE(v.IsObject());
-
- GenericValue< UTF16<> >& s = v[L"created_at"];
- ASSERT_TRUE(s.IsString());
-
- EXPECT_EQ(0, memcmp(L"Wed Oct 30 17:13:20 +0000 2012", s.GetString(), (s.GetStringLength() + 1) * sizeof(wchar_t)));
-}
-
-#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
-
-#if 0 // Many old compiler does not support these. Turn it off temporaily.
-
-#include <type_traits>
-
-TEST(Document, Traits) {
- static_assert(std::is_constructible<Document>::value, "");
- static_assert(std::is_default_constructible<Document>::value, "");
-#ifndef _MSC_VER
- static_assert(!std::is_copy_constructible<Document>::value, "");
-#endif
- static_assert(std::is_move_constructible<Document>::value, "");
-
- static_assert(!std::is_nothrow_constructible<Document>::value, "");
- static_assert(!std::is_nothrow_default_constructible<Document>::value, "");
-#ifndef _MSC_VER
- static_assert(!std::is_nothrow_copy_constructible<Document>::value, "");
- static_assert(std::is_nothrow_move_constructible<Document>::value, "");
-#endif
-
- static_assert(std::is_assignable<Document,Document>::value, "");
-#ifndef _MSC_VER
- static_assert(!std::is_copy_assignable<Document>::value, "");
-#endif
- static_assert(std::is_move_assignable<Document>::value, "");
-
-#ifndef _MSC_VER
- static_assert(std::is_nothrow_assignable<Document, Document>::value, "");
-#endif
- static_assert(!std::is_nothrow_copy_assignable<Document>::value, "");
-#ifndef _MSC_VER
- static_assert(std::is_nothrow_move_assignable<Document>::value, "");
-#endif
-
- static_assert( std::is_destructible<Document>::value, "");
-#ifndef _MSC_VER
- static_assert(std::is_nothrow_destructible<Document>::value, "");
-#endif
-}
-
-#endif
-
-template <typename Allocator>
-struct DocumentMove: public ::testing::Test {
-};
-
-typedef ::testing::Types< CrtAllocator, MemoryPoolAllocator<> > MoveAllocatorTypes;
-TYPED_TEST_CASE(DocumentMove, MoveAllocatorTypes);
-
-TYPED_TEST(DocumentMove, MoveConstructor) {
- typedef TypeParam Allocator;
- typedef GenericDocument<UTF8<>, Allocator> Document;
- Allocator allocator;
-
- Document a(&allocator);
- a.Parse("[\"one\", \"two\", \"three\"]");
- EXPECT_FALSE(a.HasParseError());
- EXPECT_TRUE(a.IsArray());
- EXPECT_EQ(3u, a.Size());
- EXPECT_EQ(&a.GetAllocator(), &allocator);
-
- // Document b(a); // does not compile (!is_copy_constructible)
- Document b(std::move(a));
- EXPECT_TRUE(a.IsNull());
- EXPECT_TRUE(b.IsArray());
- EXPECT_EQ(3u, b.Size());
- EXPECT_THROW(a.GetAllocator(), AssertException);
- EXPECT_EQ(&b.GetAllocator(), &allocator);
-
- b.Parse("{\"Foo\": \"Bar\", \"Baz\": 42}");
- EXPECT_FALSE(b.HasParseError());
- EXPECT_TRUE(b.IsObject());
- EXPECT_EQ(2u, b.MemberCount());
-
- // Document c = a; // does not compile (!is_copy_constructible)
- Document c = std::move(b);
- EXPECT_TRUE(b.IsNull());
- EXPECT_TRUE(c.IsObject());
- EXPECT_EQ(2u, c.MemberCount());
- EXPECT_THROW(b.GetAllocator(), AssertException);
- EXPECT_EQ(&c.GetAllocator(), &allocator);
-}
-
-TYPED_TEST(DocumentMove, MoveConstructorParseError) {
- typedef TypeParam Allocator;
- typedef GenericDocument<UTF8<>, Allocator> Document;
-
- ParseResult noError;
- Document a;
- a.Parse("{ 4 = 4]");
- ParseResult error(a.GetParseError(), a.GetErrorOffset());
- EXPECT_TRUE(a.HasParseError());
- EXPECT_NE(error.Code(), noError.Code());
- EXPECT_NE(error.Offset(), noError.Offset());
-
- Document b(std::move(a));
- EXPECT_FALSE(a.HasParseError());
- EXPECT_TRUE(b.HasParseError());
- EXPECT_EQ(a.GetParseError(), noError.Code());
- EXPECT_EQ(b.GetParseError(), error.Code());
- EXPECT_EQ(a.GetErrorOffset(), noError.Offset());
- EXPECT_EQ(b.GetErrorOffset(), error.Offset());
-
- Document c(std::move(b));
- EXPECT_FALSE(b.HasParseError());
- EXPECT_TRUE(c.HasParseError());
- EXPECT_EQ(b.GetParseError(), noError.Code());
- EXPECT_EQ(c.GetParseError(), error.Code());
- EXPECT_EQ(b.GetErrorOffset(), noError.Offset());
- EXPECT_EQ(c.GetErrorOffset(), error.Offset());
-}
-
-// This test does not properly use parsing, just for testing.
-// It must call ClearStack() explicitly to prevent memory leak.
-// But here we cannot as ClearStack() is private.
-#if 0
-TYPED_TEST(DocumentMove, MoveConstructorStack) {
- typedef TypeParam Allocator;
- typedef UTF8<> Encoding;
- typedef GenericDocument<Encoding, Allocator> Document;
-
- Document a;
- size_t defaultCapacity = a.GetStackCapacity();
-
- // Trick Document into getting GetStackCapacity() to return non-zero
- typedef GenericReader<Encoding, Encoding, Allocator> Reader;
- Reader reader(&a.GetAllocator());
- GenericStringStream<Encoding> is("[\"one\", \"two\", \"three\"]");
- reader.template Parse<kParseDefaultFlags>(is, a);
- size_t capacity = a.GetStackCapacity();
- EXPECT_GT(capacity, 0u);
-
- Document b(std::move(a));
- EXPECT_EQ(a.GetStackCapacity(), defaultCapacity);
- EXPECT_EQ(b.GetStackCapacity(), capacity);
-
- Document c = std::move(b);
- EXPECT_EQ(b.GetStackCapacity(), defaultCapacity);
- EXPECT_EQ(c.GetStackCapacity(), capacity);
-}
-#endif
-
-TYPED_TEST(DocumentMove, MoveAssignment) {
- typedef TypeParam Allocator;
- typedef GenericDocument<UTF8<>, Allocator> Document;
- Allocator allocator;
-
- Document a(&allocator);
- a.Parse("[\"one\", \"two\", \"three\"]");
- EXPECT_FALSE(a.HasParseError());
- EXPECT_TRUE(a.IsArray());
- EXPECT_EQ(3u, a.Size());
- EXPECT_EQ(&a.GetAllocator(), &allocator);
-
- // Document b; b = a; // does not compile (!is_copy_assignable)
- Document b;
- b = std::move(a);
- EXPECT_TRUE(a.IsNull());
- EXPECT_TRUE(b.IsArray());
- EXPECT_EQ(3u, b.Size());
- EXPECT_THROW(a.GetAllocator(), AssertException);
- EXPECT_EQ(&b.GetAllocator(), &allocator);
-
- b.Parse("{\"Foo\": \"Bar\", \"Baz\": 42}");
- EXPECT_FALSE(b.HasParseError());
- EXPECT_TRUE(b.IsObject());
- EXPECT_EQ(2u, b.MemberCount());
-
- // Document c; c = a; // does not compile (see static_assert)
- Document c;
- c = std::move(b);
- EXPECT_TRUE(b.IsNull());
- EXPECT_TRUE(c.IsObject());
- EXPECT_EQ(2u, c.MemberCount());
- EXPECT_THROW(b.GetAllocator(), AssertException);
- EXPECT_EQ(&c.GetAllocator(), &allocator);
-}
-
-TYPED_TEST(DocumentMove, MoveAssignmentParseError) {
- typedef TypeParam Allocator;
- typedef GenericDocument<UTF8<>, Allocator> Document;
-
- ParseResult noError;
- Document a;
- a.Parse("{ 4 = 4]");
- ParseResult error(a.GetParseError(), a.GetErrorOffset());
- EXPECT_TRUE(a.HasParseError());
- EXPECT_NE(error.Code(), noError.Code());
- EXPECT_NE(error.Offset(), noError.Offset());
-
- Document b;
- b = std::move(a);
- EXPECT_FALSE(a.HasParseError());
- EXPECT_TRUE(b.HasParseError());
- EXPECT_EQ(a.GetParseError(), noError.Code());
- EXPECT_EQ(b.GetParseError(), error.Code());
- EXPECT_EQ(a.GetErrorOffset(), noError.Offset());
- EXPECT_EQ(b.GetErrorOffset(), error.Offset());
-
- Document c;
- c = std::move(b);
- EXPECT_FALSE(b.HasParseError());
- EXPECT_TRUE(c.HasParseError());
- EXPECT_EQ(b.GetParseError(), noError.Code());
- EXPECT_EQ(c.GetParseError(), error.Code());
- EXPECT_EQ(b.GetErrorOffset(), noError.Offset());
- EXPECT_EQ(c.GetErrorOffset(), error.Offset());
-}
-
-// This test does not properly use parsing, just for testing.
-// It must call ClearStack() explicitly to prevent memory leak.
-// But here we cannot as ClearStack() is private.
-#if 0
-TYPED_TEST(DocumentMove, MoveAssignmentStack) {
- typedef TypeParam Allocator;
- typedef UTF8<> Encoding;
- typedef GenericDocument<Encoding, Allocator> Document;
-
- Document a;
- size_t defaultCapacity = a.GetStackCapacity();
-
- // Trick Document into getting GetStackCapacity() to return non-zero
- typedef GenericReader<Encoding, Encoding, Allocator> Reader;
- Reader reader(&a.GetAllocator());
- GenericStringStream<Encoding> is("[\"one\", \"two\", \"three\"]");
- reader.template Parse<kParseDefaultFlags>(is, a);
- size_t capacity = a.GetStackCapacity();
- EXPECT_GT(capacity, 0u);
-
- Document b;
- b = std::move(a);
- EXPECT_EQ(a.GetStackCapacity(), defaultCapacity);
- EXPECT_EQ(b.GetStackCapacity(), capacity);
-
- Document c;
- c = std::move(b);
- EXPECT_EQ(b.GetStackCapacity(), defaultCapacity);
- EXPECT_EQ(c.GetStackCapacity(), capacity);
-}
-#endif
-
-#endif // RAPIDJSON_HAS_CXX11_RVALUE_REFS
-
-// Issue 22: Memory corruption via operator=
-// Fixed by making unimplemented assignment operator private.
-//TEST(Document, Assignment) {
-// Document d1;
-// Document d2;
-// d1 = d2;
-//}
-
-#ifdef __clang__
-RAPIDJSON_DIAG_POP
-#endif
diff --git a/3rdparty/rapidjson/test/unittest/dtoatest.cpp b/3rdparty/rapidjson/test/unittest/dtoatest.cpp
deleted file mode 100644
index da020957211..00000000000
--- a/3rdparty/rapidjson/test/unittest/dtoatest.cpp
+++ /dev/null
@@ -1,91 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 "unittest.h"
-#include "rapidjson/internal/dtoa.h"
-
-#ifdef __GNUC__
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(type-limits)
-#endif
-
-using namespace rapidjson::internal;
-
-TEST(dtoa, normal) {
- char buffer[30];
-
-#define TEST_DTOA(d, a)\
- *dtoa(d, buffer) = '\0';\
- EXPECT_STREQ(a, buffer)
-
- TEST_DTOA(0.0, "0.0");
- TEST_DTOA(-0.0, "-0.0");
- TEST_DTOA(1.0, "1.0");
- TEST_DTOA(-1.0, "-1.0");
- TEST_DTOA(1.2345, "1.2345");
- TEST_DTOA(1.2345678, "1.2345678");
- TEST_DTOA(0.123456789012, "0.123456789012");
- TEST_DTOA(1234567.8, "1234567.8");
- TEST_DTOA(0.000001, "0.000001");
- TEST_DTOA(0.0000001, "1e-7");
- TEST_DTOA(1e30, "1e30");
- TEST_DTOA(1.234567890123456e30, "1.234567890123456e30");
- TEST_DTOA(5e-324, "5e-324"); // Min subnormal positive double
- TEST_DTOA(2.225073858507201e-308, "2.225073858507201e-308"); // Max subnormal positive double
- TEST_DTOA(2.2250738585072014e-308, "2.2250738585072014e-308"); // Min normal positive double
- TEST_DTOA(1.7976931348623157e308, "1.7976931348623157e308"); // Max double
-
-#undef TEST_DTOA
-}
-
-TEST(dtoa, maxDecimalPlaces) {
- char buffer[30];
-
-#define TEST_DTOA(m, d, a)\
- *dtoa(d, buffer, m) = '\0';\
- EXPECT_STREQ(a, buffer)
-
- TEST_DTOA(3, 0.0, "0.0");
- TEST_DTOA(1, 0.0, "0.0");
- TEST_DTOA(3, -0.0, "-0.0");
- TEST_DTOA(3, 1.0, "1.0");
- TEST_DTOA(3, -1.0, "-1.0");
- TEST_DTOA(3, 1.2345, "1.234");
- TEST_DTOA(2, 1.2345, "1.23");
- TEST_DTOA(1, 1.2345, "1.2");
- TEST_DTOA(3, 1.2345678, "1.234");
- TEST_DTOA(3, 1.0001, "1.0");
- TEST_DTOA(2, 1.0001, "1.0");
- TEST_DTOA(1, 1.0001, "1.0");
- TEST_DTOA(3, 0.123456789012, "0.123");
- TEST_DTOA(2, 0.123456789012, "0.12");
- TEST_DTOA(1, 0.123456789012, "0.1");
- TEST_DTOA(4, 0.0001, "0.0001");
- TEST_DTOA(3, 0.0001, "0.0");
- TEST_DTOA(2, 0.0001, "0.0");
- TEST_DTOA(1, 0.0001, "0.0");
- TEST_DTOA(3, 1234567.8, "1234567.8");
- TEST_DTOA(3, 1e30, "1e30");
- TEST_DTOA(3, 5e-324, "0.0"); // Min subnormal positive double
- TEST_DTOA(3, 2.225073858507201e-308, "0.0"); // Max subnormal positive double
- TEST_DTOA(3, 2.2250738585072014e-308, "0.0"); // Min normal positive double
- TEST_DTOA(3, 1.7976931348623157e308, "1.7976931348623157e308"); // Max double
-
-#undef TEST_DTOA
-}
-
-
-#ifdef __GNUC__
-RAPIDJSON_DIAG_POP
-#endif
diff --git a/3rdparty/rapidjson/test/unittest/encodedstreamtest.cpp b/3rdparty/rapidjson/test/unittest/encodedstreamtest.cpp
deleted file mode 100644
index bc234d3ba76..00000000000
--- a/3rdparty/rapidjson/test/unittest/encodedstreamtest.cpp
+++ /dev/null
@@ -1,313 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 "unittest.h"
-#include "rapidjson/filereadstream.h"
-#include "rapidjson/filewritestream.h"
-#include "rapidjson/encodedstream.h"
-#include "rapidjson/stringbuffer.h"
-#include "rapidjson/memorystream.h"
-#include "rapidjson/memorybuffer.h"
-
-using namespace rapidjson;
-
-class EncodedStreamTest : public ::testing::Test {
-public:
- EncodedStreamTest() : json_(), length_() {}
- virtual ~EncodedStreamTest();
-
- virtual void SetUp() {
- json_ = ReadFile("utf8.json", true, &length_);
- }
-
- virtual void TearDown() {
- free(json_);
- json_ = 0;
- }
-
-private:
- EncodedStreamTest(const EncodedStreamTest&);
- EncodedStreamTest& operator=(const EncodedStreamTest&);
-
-protected:
- static FILE* Open(const char* filename) {
- const char *paths[] = {
- "encodings",
- "bin/encodings",
- "../bin/encodings",
- "../../bin/encodings",
- "../../../bin/encodings"
- };
- char buffer[1024];
- for (size_t i = 0; i < sizeof(paths) / sizeof(paths[0]); i++) {
- sprintf(buffer, "%s/%s", paths[i], filename);
- FILE *fp = fopen(buffer, "rb");
- if (fp)
- return fp;
- }
- return 0;
- }
-
- static char *ReadFile(const char* filename, bool appendPath, size_t* outLength) {
- FILE *fp = appendPath ? Open(filename) : fopen(filename, "rb");
-
- if (!fp) {
- *outLength = 0;
- return 0;
- }
-
- fseek(fp, 0, SEEK_END);
- *outLength = static_cast<size_t>(ftell(fp));
- fseek(fp, 0, SEEK_SET);
- char* buffer = static_cast<char*>(malloc(*outLength + 1));
- size_t readLength = fread(buffer, 1, *outLength, fp);
- buffer[readLength] = '\0';
- fclose(fp);
- return buffer;
- }
-
- template <typename FileEncoding, typename MemoryEncoding>
- void TestEncodedInputStream(const char* filename) {
- // Test FileReadStream
- {
- char buffer[16];
- FILE *fp = Open(filename);
- ASSERT_TRUE(fp != 0);
- FileReadStream fs(fp, buffer, sizeof(buffer));
- EncodedInputStream<FileEncoding, FileReadStream> eis(fs);
- StringStream s(json_);
-
- while (eis.Peek() != '\0') {
- unsigned expected, actual;
- EXPECT_TRUE(UTF8<>::Decode(s, &expected));
- EXPECT_TRUE(MemoryEncoding::Decode(eis, &actual));
- EXPECT_EQ(expected, actual);
- }
- EXPECT_EQ('\0', s.Peek());
- fclose(fp);
- }
-
- // Test MemoryStream
- {
- size_t size;
- char* data = ReadFile(filename, true, &size);
- MemoryStream ms(data, size);
- EncodedInputStream<FileEncoding, MemoryStream> eis(ms);
- StringStream s(json_);
-
- while (eis.Peek() != '\0') {
- unsigned expected, actual;
- EXPECT_TRUE(UTF8<>::Decode(s, &expected));
- EXPECT_TRUE(MemoryEncoding::Decode(eis, &actual));
- EXPECT_EQ(expected, actual);
- }
- EXPECT_EQ('\0', s.Peek());
- free(data);
- EXPECT_EQ(size, eis.Tell());
- }
- }
-
- void TestAutoUTFInputStream(const char *filename, bool expectHasBOM) {
- // Test FileReadStream
- {
- char buffer[16];
- FILE *fp = Open(filename);
- ASSERT_TRUE(fp != 0);
- FileReadStream fs(fp, buffer, sizeof(buffer));
- AutoUTFInputStream<unsigned, FileReadStream> eis(fs);
- EXPECT_EQ(expectHasBOM, eis.HasBOM());
- StringStream s(json_);
- while (eis.Peek() != '\0') {
- unsigned expected, actual;
- EXPECT_TRUE(UTF8<>::Decode(s, &expected));
- EXPECT_TRUE(AutoUTF<unsigned>::Decode(eis, &actual));
- EXPECT_EQ(expected, actual);
- }
- EXPECT_EQ('\0', s.Peek());
- fclose(fp);
- }
-
- // Test MemoryStream
- {
- size_t size;
- char* data = ReadFile(filename, true, &size);
- MemoryStream ms(data, size);
- AutoUTFInputStream<unsigned, MemoryStream> eis(ms);
- EXPECT_EQ(expectHasBOM, eis.HasBOM());
- StringStream s(json_);
-
- while (eis.Peek() != '\0') {
- unsigned expected, actual;
- EXPECT_TRUE(UTF8<>::Decode(s, &expected));
- EXPECT_TRUE(AutoUTF<unsigned>::Decode(eis, &actual));
- EXPECT_EQ(expected, actual);
- }
- EXPECT_EQ('\0', s.Peek());
- free(data);
- EXPECT_EQ(size, eis.Tell());
- }
- }
-
- template <typename FileEncoding, typename MemoryEncoding>
- void TestEncodedOutputStream(const char* expectedFilename, bool putBOM) {
- // Test FileWriteStream
- {
- char filename[L_tmpnam];
- FILE* fp = TempFile(filename);
- char buffer[16];
- FileWriteStream os(fp, buffer, sizeof(buffer));
- EncodedOutputStream<FileEncoding, FileWriteStream> eos(os, putBOM);
- StringStream s(json_);
- while (s.Peek() != '\0') {
- bool success = Transcoder<UTF8<>, MemoryEncoding>::Transcode(s, eos);
- EXPECT_TRUE(success);
- }
- eos.Flush();
- fclose(fp);
- EXPECT_TRUE(CompareFile(filename, expectedFilename));
- remove(filename);
- }
-
- // Test MemoryBuffer
- {
- MemoryBuffer mb;
- EncodedOutputStream<FileEncoding, MemoryBuffer> eos(mb, putBOM);
- StringStream s(json_);
- while (s.Peek() != '\0') {
- bool success = Transcoder<UTF8<>, MemoryEncoding>::Transcode(s, eos);
- EXPECT_TRUE(success);
- }
- eos.Flush();
- EXPECT_TRUE(CompareBufferFile(mb.GetBuffer(), mb.GetSize(), expectedFilename));
- }
- }
-
- void TestAutoUTFOutputStream(UTFType type, bool putBOM, const char *expectedFilename) {
- // Test FileWriteStream
- {
- char filename[L_tmpnam];
- FILE* fp = TempFile(filename);
-
- char buffer[16];
- FileWriteStream os(fp, buffer, sizeof(buffer));
- AutoUTFOutputStream<unsigned, FileWriteStream> eos(os, type, putBOM);
- StringStream s(json_);
- while (s.Peek() != '\0') {
- bool success = Transcoder<UTF8<>, AutoUTF<unsigned> >::Transcode(s, eos);
- EXPECT_TRUE(success);
- }
- eos.Flush();
- fclose(fp);
- EXPECT_TRUE(CompareFile(filename, expectedFilename));
- remove(filename);
- }
-
- // Test MemoryBuffer
- {
- MemoryBuffer mb;
- AutoUTFOutputStream<unsigned, MemoryBuffer> eos(mb, type, putBOM);
- StringStream s(json_);
- while (s.Peek() != '\0') {
- bool success = Transcoder<UTF8<>, AutoUTF<unsigned> >::Transcode(s, eos);
- EXPECT_TRUE(success);
- }
- eos.Flush();
- EXPECT_TRUE(CompareBufferFile(mb.GetBuffer(), mb.GetSize(), expectedFilename));
- }
- }
-
- bool CompareFile(const char* filename, const char* expectedFilename) {
- size_t actualLength, expectedLength;
- char* actualBuffer = ReadFile(filename, false, &actualLength);
- char* expectedBuffer = ReadFile(expectedFilename, true, &expectedLength);
- bool ret = (expectedLength == actualLength) && memcmp(expectedBuffer, actualBuffer, actualLength) == 0;
- free(actualBuffer);
- free(expectedBuffer);
- return ret;
- }
-
- bool CompareBufferFile(const char* actualBuffer, size_t actualLength, const char* expectedFilename) {
- size_t expectedLength;
- char* expectedBuffer = ReadFile(expectedFilename, true, &expectedLength);
- bool ret = (expectedLength == actualLength) && memcmp(expectedBuffer, actualBuffer, actualLength) == 0;
- free(expectedBuffer);
- return ret;
- }
-
- char *json_;
- size_t length_;
-};
-
-EncodedStreamTest::~EncodedStreamTest() {}
-
-TEST_F(EncodedStreamTest, EncodedInputStream) {
- TestEncodedInputStream<UTF8<>, UTF8<> >("utf8.json");
- TestEncodedInputStream<UTF8<>, UTF8<> >("utf8bom.json");
- TestEncodedInputStream<UTF16LE<>, UTF16<> >("utf16le.json");
- TestEncodedInputStream<UTF16LE<>, UTF16<> >("utf16lebom.json");
- TestEncodedInputStream<UTF16BE<>, UTF16<> >("utf16be.json");
- TestEncodedInputStream<UTF16BE<>, UTF16<> >("utf16bebom.json");
- TestEncodedInputStream<UTF32LE<>, UTF32<> >("utf32le.json");
- TestEncodedInputStream<UTF32LE<>, UTF32<> >("utf32lebom.json");
- TestEncodedInputStream<UTF32BE<>, UTF32<> >("utf32be.json");
- TestEncodedInputStream<UTF32BE<>, UTF32<> >("utf32bebom.json");
-}
-
-TEST_F(EncodedStreamTest, AutoUTFInputStream) {
- TestAutoUTFInputStream("utf8.json", false);
- TestAutoUTFInputStream("utf8bom.json", true);
- TestAutoUTFInputStream("utf16le.json", false);
- TestAutoUTFInputStream("utf16lebom.json",true);
- TestAutoUTFInputStream("utf16be.json", false);
- TestAutoUTFInputStream("utf16bebom.json",true);
- TestAutoUTFInputStream("utf32le.json", false);
- TestAutoUTFInputStream("utf32lebom.json",true);
- TestAutoUTFInputStream("utf32be.json", false);
- TestAutoUTFInputStream("utf32bebom.json", true);
-
- {
- // Auto detection fail, use user defined UTF type
- const char json[] = "{ }";
- MemoryStream ms(json, sizeof(json));
- AutoUTFInputStream<unsigned, MemoryStream> eis(ms, kUTF8);
- EXPECT_FALSE(eis.HasBOM());
- EXPECT_EQ(kUTF8, eis.GetType());
- }
-}
-
-TEST_F(EncodedStreamTest, EncodedOutputStream) {
- TestEncodedOutputStream<UTF8<>, UTF8<> >("utf8.json", false);
- TestEncodedOutputStream<UTF8<>, UTF8<> >("utf8bom.json", true);
- TestEncodedOutputStream<UTF16LE<>, UTF16<> >("utf16le.json", false);
- TestEncodedOutputStream<UTF16LE<>, UTF16<> >("utf16lebom.json",true);
- TestEncodedOutputStream<UTF16BE<>, UTF16<> >("utf16be.json", false);
- TestEncodedOutputStream<UTF16BE<>, UTF16<> >("utf16bebom.json",true);
- TestEncodedOutputStream<UTF32LE<>, UTF32<> >("utf32le.json", false);
- TestEncodedOutputStream<UTF32LE<>, UTF32<> >("utf32lebom.json",true);
- TestEncodedOutputStream<UTF32BE<>, UTF32<> >("utf32be.json", false);
- TestEncodedOutputStream<UTF32BE<>, UTF32<> >("utf32bebom.json",true);
-}
-
-TEST_F(EncodedStreamTest, AutoUTFOutputStream) {
- TestAutoUTFOutputStream(kUTF8, false, "utf8.json");
- TestAutoUTFOutputStream(kUTF8, true, "utf8bom.json");
- TestAutoUTFOutputStream(kUTF16LE, false, "utf16le.json");
- TestAutoUTFOutputStream(kUTF16LE, true, "utf16lebom.json");
- TestAutoUTFOutputStream(kUTF16BE, false, "utf16be.json");
- TestAutoUTFOutputStream(kUTF16BE, true, "utf16bebom.json");
- TestAutoUTFOutputStream(kUTF32LE, false, "utf32le.json");
- TestAutoUTFOutputStream(kUTF32LE, true, "utf32lebom.json");
- TestAutoUTFOutputStream(kUTF32BE, false, "utf32be.json");
- TestAutoUTFOutputStream(kUTF32BE, true, "utf32bebom.json");
-}
diff --git a/3rdparty/rapidjson/test/unittest/encodingstest.cpp b/3rdparty/rapidjson/test/unittest/encodingstest.cpp
deleted file mode 100644
index b3cbb76607b..00000000000
--- a/3rdparty/rapidjson/test/unittest/encodingstest.cpp
+++ /dev/null
@@ -1,425 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 "unittest.h"
-#include "rapidjson/filereadstream.h"
-#include "rapidjson/filewritestream.h"
-#include "rapidjson/encodedstream.h"
-#include "rapidjson/stringbuffer.h"
-
-using namespace rapidjson;
-
-// Verification of encoders/decoders with Hoehrmann's UTF8 decoder
-
-// http://www.unicode.org/Public/UNIDATA/Blocks.txt
-static const unsigned kCodepointRanges[] = {
- 0x0000, 0x007F, // Basic Latin
- 0x0080, 0x00FF, // Latin-1 Supplement
- 0x0100, 0x017F, // Latin Extended-A
- 0x0180, 0x024F, // Latin Extended-B
- 0x0250, 0x02AF, // IPA Extensions
- 0x02B0, 0x02FF, // Spacing Modifier Letters
- 0x0300, 0x036F, // Combining Diacritical Marks
- 0x0370, 0x03FF, // Greek and Coptic
- 0x0400, 0x04FF, // Cyrillic
- 0x0500, 0x052F, // Cyrillic Supplement
- 0x0530, 0x058F, // Armenian
- 0x0590, 0x05FF, // Hebrew
- 0x0600, 0x06FF, // Arabic
- 0x0700, 0x074F, // Syriac
- 0x0750, 0x077F, // Arabic Supplement
- 0x0780, 0x07BF, // Thaana
- 0x07C0, 0x07FF, // NKo
- 0x0800, 0x083F, // Samaritan
- 0x0840, 0x085F, // Mandaic
- 0x0900, 0x097F, // Devanagari
- 0x0980, 0x09FF, // Bengali
- 0x0A00, 0x0A7F, // Gurmukhi
- 0x0A80, 0x0AFF, // Gujarati
- 0x0B00, 0x0B7F, // Oriya
- 0x0B80, 0x0BFF, // Tamil
- 0x0C00, 0x0C7F, // Telugu
- 0x0C80, 0x0CFF, // Kannada
- 0x0D00, 0x0D7F, // Malayalam
- 0x0D80, 0x0DFF, // Sinhala
- 0x0E00, 0x0E7F, // Thai
- 0x0E80, 0x0EFF, // Lao
- 0x0F00, 0x0FFF, // Tibetan
- 0x1000, 0x109F, // Myanmar
- 0x10A0, 0x10FF, // Georgian
- 0x1100, 0x11FF, // Hangul Jamo
- 0x1200, 0x137F, // Ethiopic
- 0x1380, 0x139F, // Ethiopic Supplement
- 0x13A0, 0x13FF, // Cherokee
- 0x1400, 0x167F, // Unified Canadian Aboriginal Syllabics
- 0x1680, 0x169F, // Ogham
- 0x16A0, 0x16FF, // Runic
- 0x1700, 0x171F, // Tagalog
- 0x1720, 0x173F, // Hanunoo
- 0x1740, 0x175F, // Buhid
- 0x1760, 0x177F, // Tagbanwa
- 0x1780, 0x17FF, // Khmer
- 0x1800, 0x18AF, // Mongolian
- 0x18B0, 0x18FF, // Unified Canadian Aboriginal Syllabics Extended
- 0x1900, 0x194F, // Limbu
- 0x1950, 0x197F, // Tai Le
- 0x1980, 0x19DF, // New Tai Lue
- 0x19E0, 0x19FF, // Khmer Symbols
- 0x1A00, 0x1A1F, // Buginese
- 0x1A20, 0x1AAF, // Tai Tham
- 0x1B00, 0x1B7F, // Balinese
- 0x1B80, 0x1BBF, // Sundanese
- 0x1BC0, 0x1BFF, // Batak
- 0x1C00, 0x1C4F, // Lepcha
- 0x1C50, 0x1C7F, // Ol Chiki
- 0x1CD0, 0x1CFF, // Vedic Extensions
- 0x1D00, 0x1D7F, // Phonetic Extensions
- 0x1D80, 0x1DBF, // Phonetic Extensions Supplement
- 0x1DC0, 0x1DFF, // Combining Diacritical Marks Supplement
- 0x1E00, 0x1EFF, // Latin Extended Additional
- 0x1F00, 0x1FFF, // Greek Extended
- 0x2000, 0x206F, // General Punctuation
- 0x2070, 0x209F, // Superscripts and Subscripts
- 0x20A0, 0x20CF, // Currency Symbols
- 0x20D0, 0x20FF, // Combining Diacritical Marks for Symbols
- 0x2100, 0x214F, // Letterlike Symbols
- 0x2150, 0x218F, // Number Forms
- 0x2190, 0x21FF, // Arrows
- 0x2200, 0x22FF, // Mathematical Operators
- 0x2300, 0x23FF, // Miscellaneous Technical
- 0x2400, 0x243F, // Control Pictures
- 0x2440, 0x245F, // Optical Character Recognition
- 0x2460, 0x24FF, // Enclosed Alphanumerics
- 0x2500, 0x257F, // Box Drawing
- 0x2580, 0x259F, // Block Elements
- 0x25A0, 0x25FF, // Geometric Shapes
- 0x2600, 0x26FF, // Miscellaneous Symbols
- 0x2700, 0x27BF, // Dingbats
- 0x27C0, 0x27EF, // Miscellaneous Mathematical Symbols-A
- 0x27F0, 0x27FF, // Supplemental Arrows-A
- 0x2800, 0x28FF, // Braille Patterns
- 0x2900, 0x297F, // Supplemental Arrows-B
- 0x2980, 0x29FF, // Miscellaneous Mathematical Symbols-B
- 0x2A00, 0x2AFF, // Supplemental Mathematical Operators
- 0x2B00, 0x2BFF, // Miscellaneous Symbols and Arrows
- 0x2C00, 0x2C5F, // Glagolitic
- 0x2C60, 0x2C7F, // Latin Extended-C
- 0x2C80, 0x2CFF, // Coptic
- 0x2D00, 0x2D2F, // Georgian Supplement
- 0x2D30, 0x2D7F, // Tifinagh
- 0x2D80, 0x2DDF, // Ethiopic Extended
- 0x2DE0, 0x2DFF, // Cyrillic Extended-A
- 0x2E00, 0x2E7F, // Supplemental Punctuation
- 0x2E80, 0x2EFF, // CJK Radicals Supplement
- 0x2F00, 0x2FDF, // Kangxi Radicals
- 0x2FF0, 0x2FFF, // Ideographic Description Characters
- 0x3000, 0x303F, // CJK Symbols and Punctuation
- 0x3040, 0x309F, // Hiragana
- 0x30A0, 0x30FF, // Katakana
- 0x3100, 0x312F, // Bopomofo
- 0x3130, 0x318F, // Hangul Compatibility Jamo
- 0x3190, 0x319F, // Kanbun
- 0x31A0, 0x31BF, // Bopomofo Extended
- 0x31C0, 0x31EF, // CJK Strokes
- 0x31F0, 0x31FF, // Katakana Phonetic Extensions
- 0x3200, 0x32FF, // Enclosed CJK Letters and Months
- 0x3300, 0x33FF, // CJK Compatibility
- 0x3400, 0x4DBF, // CJK Unified Ideographs Extension A
- 0x4DC0, 0x4DFF, // Yijing Hexagram Symbols
- 0x4E00, 0x9FFF, // CJK Unified Ideographs
- 0xA000, 0xA48F, // Yi Syllables
- 0xA490, 0xA4CF, // Yi Radicals
- 0xA4D0, 0xA4FF, // Lisu
- 0xA500, 0xA63F, // Vai
- 0xA640, 0xA69F, // Cyrillic Extended-B
- 0xA6A0, 0xA6FF, // Bamum
- 0xA700, 0xA71F, // Modifier Tone Letters
- 0xA720, 0xA7FF, // Latin Extended-D
- 0xA800, 0xA82F, // Syloti Nagri
- 0xA830, 0xA83F, // Common Indic Number Forms
- 0xA840, 0xA87F, // Phags-pa
- 0xA880, 0xA8DF, // Saurashtra
- 0xA8E0, 0xA8FF, // Devanagari Extended
- 0xA900, 0xA92F, // Kayah Li
- 0xA930, 0xA95F, // Rejang
- 0xA960, 0xA97F, // Hangul Jamo Extended-A
- 0xA980, 0xA9DF, // Javanese
- 0xAA00, 0xAA5F, // Cham
- 0xAA60, 0xAA7F, // Myanmar Extended-A
- 0xAA80, 0xAADF, // Tai Viet
- 0xAB00, 0xAB2F, // Ethiopic Extended-A
- 0xABC0, 0xABFF, // Meetei Mayek
- 0xAC00, 0xD7AF, // Hangul Syllables
- 0xD7B0, 0xD7FF, // Hangul Jamo Extended-B
- //0xD800, 0xDB7F, // High Surrogates
- //0xDB80, 0xDBFF, // High Private Use Surrogates
- //0xDC00, 0xDFFF, // Low Surrogates
- 0xE000, 0xF8FF, // Private Use Area
- 0xF900, 0xFAFF, // CJK Compatibility Ideographs
- 0xFB00, 0xFB4F, // Alphabetic Presentation Forms
- 0xFB50, 0xFDFF, // Arabic Presentation Forms-A
- 0xFE00, 0xFE0F, // Variation Selectors
- 0xFE10, 0xFE1F, // Vertical Forms
- 0xFE20, 0xFE2F, // Combining Half Marks
- 0xFE30, 0xFE4F, // CJK Compatibility Forms
- 0xFE50, 0xFE6F, // Small Form Variants
- 0xFE70, 0xFEFF, // Arabic Presentation Forms-B
- 0xFF00, 0xFFEF, // Halfwidth and Fullwidth Forms
- 0xFFF0, 0xFFFF, // Specials
- 0x10000, 0x1007F, // Linear B Syllabary
- 0x10080, 0x100FF, // Linear B Ideograms
- 0x10100, 0x1013F, // Aegean Numbers
- 0x10140, 0x1018F, // Ancient Greek Numbers
- 0x10190, 0x101CF, // Ancient Symbols
- 0x101D0, 0x101FF, // Phaistos Disc
- 0x10280, 0x1029F, // Lycian
- 0x102A0, 0x102DF, // Carian
- 0x10300, 0x1032F, // Old Italic
- 0x10330, 0x1034F, // Gothic
- 0x10380, 0x1039F, // Ugaritic
- 0x103A0, 0x103DF, // Old Persian
- 0x10400, 0x1044F, // Deseret
- 0x10450, 0x1047F, // Shavian
- 0x10480, 0x104AF, // Osmanya
- 0x10800, 0x1083F, // Cypriot Syllabary
- 0x10840, 0x1085F, // Imperial Aramaic
- 0x10900, 0x1091F, // Phoenician
- 0x10920, 0x1093F, // Lydian
- 0x10A00, 0x10A5F, // Kharoshthi
- 0x10A60, 0x10A7F, // Old South Arabian
- 0x10B00, 0x10B3F, // Avestan
- 0x10B40, 0x10B5F, // Inscriptional Parthian
- 0x10B60, 0x10B7F, // Inscriptional Pahlavi
- 0x10C00, 0x10C4F, // Old Turkic
- 0x10E60, 0x10E7F, // Rumi Numeral Symbols
- 0x11000, 0x1107F, // Brahmi
- 0x11080, 0x110CF, // Kaithi
- 0x12000, 0x123FF, // Cuneiform
- 0x12400, 0x1247F, // Cuneiform Numbers and Punctuation
- 0x13000, 0x1342F, // Egyptian Hieroglyphs
- 0x16800, 0x16A3F, // Bamum Supplement
- 0x1B000, 0x1B0FF, // Kana Supplement
- 0x1D000, 0x1D0FF, // Byzantine Musical Symbols
- 0x1D100, 0x1D1FF, // Musical Symbols
- 0x1D200, 0x1D24F, // Ancient Greek Musical Notation
- 0x1D300, 0x1D35F, // Tai Xuan Jing Symbols
- 0x1D360, 0x1D37F, // Counting Rod Numerals
- 0x1D400, 0x1D7FF, // Mathematical Alphanumeric Symbols
- 0x1F000, 0x1F02F, // Mahjong Tiles
- 0x1F030, 0x1F09F, // Domino Tiles
- 0x1F0A0, 0x1F0FF, // Playing Cards
- 0x1F100, 0x1F1FF, // Enclosed Alphanumeric Supplement
- 0x1F200, 0x1F2FF, // Enclosed Ideographic Supplement
- 0x1F300, 0x1F5FF, // Miscellaneous Symbols And Pictographs
- 0x1F600, 0x1F64F, // Emoticons
- 0x1F680, 0x1F6FF, // Transport And Map Symbols
- 0x1F700, 0x1F77F, // Alchemical Symbols
- 0x20000, 0x2A6DF, // CJK Unified Ideographs Extension B
- 0x2A700, 0x2B73F, // CJK Unified Ideographs Extension C
- 0x2B740, 0x2B81F, // CJK Unified Ideographs Extension D
- 0x2F800, 0x2FA1F, // CJK Compatibility Ideographs Supplement
- 0xE0000, 0xE007F, // Tags
- 0xE0100, 0xE01EF, // Variation Selectors Supplement
- 0xF0000, 0xFFFFF, // Supplementary Private Use Area-A
- 0x100000, 0x10FFFF, // Supplementary Private Use Area-B
- 0xFFFFFFFF
-};
-
-// Copyright (c) 2008-2010 Bjoern Hoehrmann <bjoern@hoehrmann.de>
-// See http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ for details.
-
-#define UTF8_ACCEPT 0u
-
-static const unsigned char utf8d[] = {
- // The first part of the table maps bytes to character classes that
- // to reduce the size of the transition table and create bitmasks.
- 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,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,
- 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
- 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
- 8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
- 10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3, 11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,
-
- // The second part is a transition table that maps a combination
- // of a state of the automaton and a character class to a state.
- 0,12,24,36,60,96,84,12,12,12,48,72, 12,12,12,12,12,12,12,12,12,12,12,12,
- 12, 0,12,12,12,12,12, 0,12, 0,12,12, 12,24,12,12,12,12,12,24,12,24,12,12,
- 12,12,12,12,12,12,12,24,12,12,12,12, 12,24,12,12,12,12,12,12,12,24,12,12,
- 12,12,12,12,12,12,12,36,12,36,12,12, 12,36,12,12,12,12,12,36,12,36,12,12,
- 12,36,12,12,12,12,12,12,12,12,12,12,
-};
-
-static unsigned inline decode(unsigned* state, unsigned* codep, unsigned byte) {
- unsigned type = utf8d[byte];
-
- *codep = (*state != UTF8_ACCEPT) ?
- (byte & 0x3fu) | (*codep << 6) :
- (0xff >> type) & (byte);
-
- *state = utf8d[256 + *state + type];
- return *state;
-}
-
-//static bool IsUTF8(unsigned char* s) {
-// unsigned codepoint, state = 0;
-//
-// while (*s)
-// decode(&state, &codepoint, *s++);
-//
-// return state == UTF8_ACCEPT;
-//}
-
-TEST(EncodingsTest, UTF8) {
- StringBuffer os, os2;
- for (const unsigned* range = kCodepointRanges; *range != 0xFFFFFFFF; range += 2) {
- for (unsigned codepoint = range[0]; codepoint <= range[1]; ++codepoint) {
- os.Clear();
- UTF8<>::Encode(os, codepoint);
- const char* encodedStr = os.GetString();
-
- // Decode with Hoehrmann
- {
- unsigned decodedCodepoint = 0;
- unsigned state = 0;
-
- unsigned decodedCount = 0;
- for (const char* s = encodedStr; *s; ++s)
- if (!decode(&state, &decodedCodepoint, static_cast<unsigned char>(*s))) {
- EXPECT_EQ(codepoint, decodedCodepoint);
- decodedCount++;
- }
-
- if (*encodedStr) // This decoder cannot handle U+0000
- EXPECT_EQ(1u, decodedCount); // Should only contain one code point
-
- EXPECT_EQ(UTF8_ACCEPT, state);
- if (UTF8_ACCEPT != state)
- std::cout << std::hex << codepoint << " " << decodedCodepoint << std::endl;
- }
-
- // Decode
- {
- StringStream is(encodedStr);
- unsigned decodedCodepoint;
- bool result = UTF8<>::Decode(is, &decodedCodepoint);
- EXPECT_TRUE(result);
- EXPECT_EQ(codepoint, decodedCodepoint);
- if (!result || codepoint != decodedCodepoint)
- std::cout << std::hex << codepoint << " " << decodedCodepoint << std::endl;
- }
-
- // Validate
- {
- StringStream is(encodedStr);
- os2.Clear();
- bool result = UTF8<>::Validate(is, os2);
- EXPECT_TRUE(result);
- EXPECT_EQ(0, StrCmp(encodedStr, os2.GetString()));
- }
- }
- }
-}
-
-TEST(EncodingsTest, UTF16) {
- GenericStringBuffer<UTF16<> > os, os2;
- GenericStringBuffer<UTF8<> > utf8os;
- for (const unsigned* range = kCodepointRanges; *range != 0xFFFFFFFF; range += 2) {
- for (unsigned codepoint = range[0]; codepoint <= range[1]; ++codepoint) {
- os.Clear();
- UTF16<>::Encode(os, codepoint);
- const UTF16<>::Ch* encodedStr = os.GetString();
-
- // Encode with Hoehrmann's code
- if (codepoint != 0) // cannot handle U+0000
- {
- // encode with UTF8<> first
- utf8os.Clear();
- UTF8<>::Encode(utf8os, codepoint);
-
- // transcode from UTF8 to UTF16 with Hoehrmann's code
- unsigned decodedCodepoint = 0;
- unsigned state = 0;
- UTF16<>::Ch buffer[3], *p = &buffer[0];
- for (const char* s = utf8os.GetString(); *s; ++s) {
- if (!decode(&state, &decodedCodepoint, static_cast<unsigned char>(*s)))
- break;
- }
-
- if (codepoint <= 0xFFFF)
- *p++ = static_cast<UTF16<>::Ch>(decodedCodepoint);
- else {
- // Encode code points above U+FFFF as surrogate pair.
- *p++ = static_cast<UTF16<>::Ch>(0xD7C0 + (decodedCodepoint >> 10));
- *p++ = static_cast<UTF16<>::Ch>(0xDC00 + (decodedCodepoint & 0x3FF));
- }
- *p++ = '\0';
-
- EXPECT_EQ(0, StrCmp(buffer, encodedStr));
- }
-
- // Decode
- {
- GenericStringStream<UTF16<> > is(encodedStr);
- unsigned decodedCodepoint;
- bool result = UTF16<>::Decode(is, &decodedCodepoint);
- EXPECT_TRUE(result);
- EXPECT_EQ(codepoint, decodedCodepoint);
- if (!result || codepoint != decodedCodepoint)
- std::cout << std::hex << codepoint << " " << decodedCodepoint << std::endl;
- }
-
- // Validate
- {
- GenericStringStream<UTF16<> > is(encodedStr);
- os2.Clear();
- bool result = UTF16<>::Validate(is, os2);
- EXPECT_TRUE(result);
- EXPECT_EQ(0, StrCmp(encodedStr, os2.GetString()));
- }
- }
- }
-}
-
-TEST(EncodingsTest, UTF32) {
- GenericStringBuffer<UTF32<> > os, os2;
- for (const unsigned* range = kCodepointRanges; *range != 0xFFFFFFFF; range += 2) {
- for (unsigned codepoint = range[0]; codepoint <= range[1]; ++codepoint) {
- os.Clear();
- UTF32<>::Encode(os, codepoint);
- const UTF32<>::Ch* encodedStr = os.GetString();
-
- // Decode
- {
- GenericStringStream<UTF32<> > is(encodedStr);
- unsigned decodedCodepoint;
- bool result = UTF32<>::Decode(is, &decodedCodepoint);
- EXPECT_TRUE(result);
- EXPECT_EQ(codepoint, decodedCodepoint);
- if (!result || codepoint != decodedCodepoint)
- std::cout << std::hex << codepoint << " " << decodedCodepoint << std::endl;
- }
-
- // Validate
- {
- GenericStringStream<UTF32<> > is(encodedStr);
- os2.Clear();
- bool result = UTF32<>::Validate(is, os2);
- EXPECT_TRUE(result);
- EXPECT_EQ(0, StrCmp(encodedStr, os2.GetString()));
- }
- }
- }
-}
diff --git a/3rdparty/rapidjson/test/unittest/filestreamtest.cpp b/3rdparty/rapidjson/test/unittest/filestreamtest.cpp
deleted file mode 100644
index a38133fa7f6..00000000000
--- a/3rdparty/rapidjson/test/unittest/filestreamtest.cpp
+++ /dev/null
@@ -1,112 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 "unittest.h"
-#include "rapidjson/filereadstream.h"
-#include "rapidjson/filewritestream.h"
-#include "rapidjson/encodedstream.h"
-
-using namespace rapidjson;
-
-class FileStreamTest : public ::testing::Test {
-public:
- FileStreamTest() : filename_(), json_(), length_() {}
- virtual ~FileStreamTest();
-
- virtual void SetUp() {
- const char *paths[] = {
- "data/sample.json",
- "bin/data/sample.json",
- "../bin/data/sample.json",
- "../../bin/data/sample.json",
- "../../../bin/data/sample.json"
- };
- FILE* fp = 0;
- for (size_t i = 0; i < sizeof(paths) / sizeof(paths[0]); i++) {
- fp = fopen(paths[i], "rb");
- if (fp) {
- filename_ = paths[i];
- break;
- }
- }
- ASSERT_TRUE(fp != 0);
-
- fseek(fp, 0, SEEK_END);
- length_ = static_cast<size_t>(ftell(fp));
- fseek(fp, 0, SEEK_SET);
- json_ = static_cast<char*>(malloc(length_ + 1));
- size_t readLength = fread(json_, 1, length_, fp);
- json_[readLength] = '\0';
- fclose(fp);
- }
-
- virtual void TearDown() {
- free(json_);
- json_ = 0;
- }
-
-private:
- FileStreamTest(const FileStreamTest&);
- FileStreamTest& operator=(const FileStreamTest&);
-
-protected:
- const char* filename_;
- char *json_;
- size_t length_;
-};
-
-FileStreamTest::~FileStreamTest() {}
-
-TEST_F(FileStreamTest, FileReadStream) {
- FILE *fp = fopen(filename_, "rb");
- ASSERT_TRUE(fp != 0);
- char buffer[65536];
- FileReadStream s(fp, buffer, sizeof(buffer));
-
- for (size_t i = 0; i < length_; i++) {
- EXPECT_EQ(json_[i], s.Peek());
- EXPECT_EQ(json_[i], s.Peek()); // 2nd time should be the same
- EXPECT_EQ(json_[i], s.Take());
- }
-
- EXPECT_EQ(length_, s.Tell());
- EXPECT_EQ('\0', s.Peek());
-
- fclose(fp);
-}
-
-TEST_F(FileStreamTest, FileWriteStream) {
- char filename[L_tmpnam];
- FILE* fp = TempFile(filename);
-
- char buffer[65536];
- FileWriteStream os(fp, buffer, sizeof(buffer));
- for (size_t i = 0; i < length_; i++)
- os.Put(json_[i]);
- os.Flush();
- fclose(fp);
-
- // Read it back to verify
- fp = fopen(filename, "rb");
- FileReadStream is(fp, buffer, sizeof(buffer));
-
- for (size_t i = 0; i < length_; i++)
- EXPECT_EQ(json_[i], is.Take());
-
- EXPECT_EQ(length_, is.Tell());
- fclose(fp);
-
- //std::cout << filename << std::endl;
- remove(filename);
-}
diff --git a/3rdparty/rapidjson/test/unittest/fwdtest.cpp b/3rdparty/rapidjson/test/unittest/fwdtest.cpp
deleted file mode 100644
index 4f326846116..00000000000
--- a/3rdparty/rapidjson/test/unittest/fwdtest.cpp
+++ /dev/null
@@ -1,227 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 "unittest.h"
-
-// Using forward declared types here.
-
-#include "rapidjson/fwd.h"
-
-#ifdef __GNUC__
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(effc++)
-#endif
-
-using namespace rapidjson;
-
-struct Foo {
- Foo();
- ~Foo();
-
- // encodings.h
- UTF8<char>* utf8;
- UTF16<wchar_t>* utf16;
- UTF16BE<wchar_t>* utf16be;
- UTF16LE<wchar_t>* utf16le;
- UTF32<unsigned>* utf32;
- UTF32BE<unsigned>* utf32be;
- UTF32LE<unsigned>* utf32le;
- ASCII<char>* ascii;
- AutoUTF<unsigned>* autoutf;
- Transcoder<UTF8<char>, UTF8<char> >* transcoder;
-
- // allocators.h
- CrtAllocator* crtallocator;
- MemoryPoolAllocator<CrtAllocator>* memorypoolallocator;
-
- // stream.h
- StringStream* stringstream;
- InsituStringStream* insitustringstream;
-
- // stringbuffer.h
- StringBuffer* stringbuffer;
-
- // // filereadstream.h
- // FileReadStream* filereadstream;
-
- // // filewritestream.h
- // FileWriteStream* filewritestream;
-
- // memorybuffer.h
- MemoryBuffer* memorybuffer;
-
- // memorystream.h
- MemoryStream* memorystream;
-
- // reader.h
- BaseReaderHandler<UTF8<char>, void>* basereaderhandler;
- Reader* reader;
-
- // writer.h
- Writer<StringBuffer, UTF8<char>, UTF8<char>, CrtAllocator, 0>* writer;
-
- // prettywriter.h
- PrettyWriter<StringBuffer, UTF8<char>, UTF8<char>, CrtAllocator, 0>* prettywriter;
-
- // document.h
- Value* value;
- Document* document;
-
- // pointer.h
- Pointer* pointer;
-
- // schema.h
- SchemaDocument* schemadocument;
- SchemaValidator* schemavalidator;
-
- // char buffer[16];
-};
-
-// Using type definitions here.
-
-#include "rapidjson/stringbuffer.h"
-#include "rapidjson/filereadstream.h"
-#include "rapidjson/filewritestream.h"
-#include "rapidjson/memorybuffer.h"
-#include "rapidjson/memorystream.h"
-#include "rapidjson/document.h" // -> reader.h
-#include "rapidjson/writer.h"
-#include "rapidjson/prettywriter.h"
-#include "rapidjson/schema.h" // -> pointer.h
-
-Foo::Foo() :
- // encodings.h
- utf8(RAPIDJSON_NEW(UTF8<>)),
- utf16(RAPIDJSON_NEW(UTF16<>)),
- utf16be(RAPIDJSON_NEW(UTF16BE<>)),
- utf16le(RAPIDJSON_NEW(UTF16LE<>)),
- utf32(RAPIDJSON_NEW(UTF32<>)),
- utf32be(RAPIDJSON_NEW(UTF32BE<>)),
- utf32le(RAPIDJSON_NEW(UTF32LE<>)),
- ascii(RAPIDJSON_NEW(ASCII<>)),
- autoutf(RAPIDJSON_NEW(AutoUTF<unsigned>)),
- transcoder(RAPIDJSON_NEW((Transcoder<UTF8<>, UTF8<> >))),
-
- // allocators.h
- crtallocator(RAPIDJSON_NEW(CrtAllocator)),
- memorypoolallocator(RAPIDJSON_NEW(MemoryPoolAllocator<>)),
-
- // stream.h
- stringstream(RAPIDJSON_NEW(StringStream(0))),
- insitustringstream(RAPIDJSON_NEW(InsituStringStream(0))),
-
- // stringbuffer.h
- stringbuffer(RAPIDJSON_NEW(StringBuffer)),
-
- // // filereadstream.h
- // filereadstream(RAPIDJSON_NEW(FileReadStream(stdout, buffer, sizeof(buffer)))),
-
- // // filewritestream.h
- // filewritestream(RAPIDJSON_NEW(FileWriteStream(stdout, buffer, sizeof(buffer)))),
-
- // memorybuffer.h
- memorybuffer(RAPIDJSON_NEW(MemoryBuffer)),
-
- // memorystream.h
- memorystream(RAPIDJSON_NEW(MemoryStream(0, 0))),
-
- // reader.h
- basereaderhandler(RAPIDJSON_NEW((BaseReaderHandler<UTF8<>, void>))),
- reader(RAPIDJSON_NEW(Reader)),
-
- // writer.h
- writer(RAPIDJSON_NEW((Writer<StringBuffer>))),
-
- // prettywriter.h
- prettywriter(RAPIDJSON_NEW((PrettyWriter<StringBuffer>))),
-
- // document.h
- value(RAPIDJSON_NEW(Value)),
- document(RAPIDJSON_NEW(Document)),
-
- // pointer.h
- pointer(RAPIDJSON_NEW(Pointer)),
-
- // schema.h
- schemadocument(RAPIDJSON_NEW(SchemaDocument(*document))),
- schemavalidator(RAPIDJSON_NEW(SchemaValidator(*schemadocument)))
-{
-
-}
-
-Foo::~Foo() {
- // encodings.h
- RAPIDJSON_DELETE(utf8);
- RAPIDJSON_DELETE(utf16);
- RAPIDJSON_DELETE(utf16be);
- RAPIDJSON_DELETE(utf16le);
- RAPIDJSON_DELETE(utf32);
- RAPIDJSON_DELETE(utf32be);
- RAPIDJSON_DELETE(utf32le);
- RAPIDJSON_DELETE(ascii);
- RAPIDJSON_DELETE(autoutf);
- RAPIDJSON_DELETE(transcoder);
-
- // allocators.h
- RAPIDJSON_DELETE(crtallocator);
- RAPIDJSON_DELETE(memorypoolallocator);
-
- // stream.h
- RAPIDJSON_DELETE(stringstream);
- RAPIDJSON_DELETE(insitustringstream);
-
- // stringbuffer.h
- RAPIDJSON_DELETE(stringbuffer);
-
- // // filereadstream.h
- // RAPIDJSON_DELETE(filereadstream);
-
- // // filewritestream.h
- // RAPIDJSON_DELETE(filewritestream);
-
- // memorybuffer.h
- RAPIDJSON_DELETE(memorybuffer);
-
- // memorystream.h
- RAPIDJSON_DELETE(memorystream);
-
- // reader.h
- RAPIDJSON_DELETE(basereaderhandler);
- RAPIDJSON_DELETE(reader);
-
- // writer.h
- RAPIDJSON_DELETE(writer);
-
- // prettywriter.h
- RAPIDJSON_DELETE(prettywriter);
-
- // document.h
- RAPIDJSON_DELETE(value);
- RAPIDJSON_DELETE(document);
-
- // pointer.h
- RAPIDJSON_DELETE(pointer);
-
- // schema.h
- RAPIDJSON_DELETE(schemadocument);
- RAPIDJSON_DELETE(schemavalidator);
-}
-
-TEST(Fwd, Fwd) {
- Foo f;
-}
-
-#ifdef __GNUC__
-RAPIDJSON_DIAG_POP
-#endif
diff --git a/3rdparty/rapidjson/test/unittest/istreamwrappertest.cpp b/3rdparty/rapidjson/test/unittest/istreamwrappertest.cpp
deleted file mode 100644
index f6b0fa916e2..00000000000
--- a/3rdparty/rapidjson/test/unittest/istreamwrappertest.cpp
+++ /dev/null
@@ -1,171 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 "unittest.h"
-
-#include "rapidjson/istreamwrapper.h"
-#include "rapidjson/encodedstream.h"
-#include "rapidjson/document.h"
-#include <sstream>
-#include <fstream>
-
-using namespace rapidjson;
-using namespace std;
-
-template <typename StringStreamType>
-static void TestStringStream() {
- typedef typename StringStreamType::char_type Ch;
-
- {
- StringStreamType iss;
- BasicIStreamWrapper<StringStreamType> is(iss);
- EXPECT_EQ(0, is.Tell());
- if (sizeof(Ch) == 1) {
- EXPECT_EQ(0, is.Peek4());
- EXPECT_EQ(0, is.Tell());
- }
- EXPECT_EQ(0, is.Peek());
- EXPECT_EQ(0, is.Take());
- EXPECT_EQ(0, is.Tell());
- }
-
- {
- Ch s[] = { 'A', 'B', 'C', '\0' };
- StringStreamType iss(s);
- BasicIStreamWrapper<StringStreamType> is(iss);
- EXPECT_EQ(0, is.Tell());
- if (sizeof(Ch) == 1)
- EXPECT_EQ(0, is.Peek4()); // less than 4 bytes
- for (int i = 0; i < 3; i++) {
- EXPECT_EQ(static_cast<size_t>(i), is.Tell());
- EXPECT_EQ('A' + i, is.Peek());
- EXPECT_EQ('A' + i, is.Peek());
- EXPECT_EQ('A' + i, is.Take());
- }
- EXPECT_EQ(3, is.Tell());
- EXPECT_EQ(0, is.Peek());
- EXPECT_EQ(0, is.Take());
- }
-
- {
- Ch s[] = { 'A', 'B', 'C', 'D', 'E', '\0' };
- StringStreamType iss(s);
- BasicIStreamWrapper<StringStreamType> is(iss);
- if (sizeof(Ch) == 1) {
- const Ch* c = is.Peek4();
- for (int i = 0; i < 4; i++)
- EXPECT_EQ('A' + i, c[i]);
- EXPECT_EQ(0, is.Tell());
- }
- for (int i = 0; i < 5; i++) {
- EXPECT_EQ(static_cast<size_t>(i), is.Tell());
- EXPECT_EQ('A' + i, is.Peek());
- EXPECT_EQ('A' + i, is.Peek());
- EXPECT_EQ('A' + i, is.Take());
- }
- EXPECT_EQ(5, is.Tell());
- EXPECT_EQ(0, is.Peek());
- EXPECT_EQ(0, is.Take());
- }
-}
-
-TEST(IStreamWrapper, istringstream) {
- TestStringStream<istringstream>();
-}
-
-TEST(IStreamWrapper, stringstream) {
- TestStringStream<stringstream>();
-}
-
-TEST(IStreamWrapper, wistringstream) {
- TestStringStream<wistringstream>();
-}
-
-TEST(IStreamWrapper, wstringstream) {
- TestStringStream<wstringstream>();
-}
-
-template <typename FileStreamType>
-static bool Open(FileStreamType& fs, const char* filename) {
- const char *paths[] = {
- "encodings",
- "bin/encodings",
- "../bin/encodings",
- "../../bin/encodings",
- "../../../bin/encodings"
- };
- char buffer[1024];
- for (size_t i = 0; i < sizeof(paths) / sizeof(paths[0]); i++) {
- sprintf(buffer, "%s/%s", paths[i], filename);
- fs.open(buffer, ios_base::in | ios_base::binary);
- if (fs.is_open())
- return true;
- }
- return false;
-}
-
-TEST(IStreamWrapper, ifstream) {
- ifstream ifs;
- ASSERT_TRUE(Open(ifs, "utf8bom.json"));
- IStreamWrapper isw(ifs);
- EncodedInputStream<UTF8<>, IStreamWrapper> eis(isw);
- Document d;
- EXPECT_TRUE(!d.ParseStream(eis).HasParseError());
- EXPECT_TRUE(d.IsObject());
- EXPECT_EQ(5, d.MemberCount());
-}
-
-TEST(IStreamWrapper, fstream) {
- fstream fs;
- ASSERT_TRUE(Open(fs, "utf8bom.json"));
- IStreamWrapper isw(fs);
- EncodedInputStream<UTF8<>, IStreamWrapper> eis(isw);
- Document d;
- EXPECT_TRUE(!d.ParseStream(eis).HasParseError());
- EXPECT_TRUE(d.IsObject());
- EXPECT_EQ(5, d.MemberCount());
-}
-
-// wifstream/wfstream only works on C++11 with codecvt_utf16
-// But many C++11 library still not have it.
-#if 0
-#include <codecvt>
-
-TEST(IStreamWrapper, wifstream) {
- wifstream ifs;
- ASSERT_TRUE(Open(ifs, "utf16bebom.json"));
- ifs.imbue(std::locale(ifs.getloc(),
- new std::codecvt_utf16<wchar_t, 0x10ffff, std::consume_header>));
- WIStreamWrapper isw(ifs);
- GenericDocument<UTF16<> > d;
- d.ParseStream<kParseDefaultFlags, UTF16<>, WIStreamWrapper>(isw);
- EXPECT_TRUE(!d.HasParseError());
- EXPECT_TRUE(d.IsObject());
- EXPECT_EQ(5, d.MemberCount());
-}
-
-TEST(IStreamWrapper, wfstream) {
- wfstream fs;
- ASSERT_TRUE(Open(fs, "utf16bebom.json"));
- fs.imbue(std::locale(fs.getloc(),
- new std::codecvt_utf16<wchar_t, 0x10ffff, std::consume_header>));
- WIStreamWrapper isw(fs);
- GenericDocument<UTF16<> > d;
- d.ParseStream<kParseDefaultFlags, UTF16<>, WIStreamWrapper>(isw);
- EXPECT_TRUE(!d.HasParseError());
- EXPECT_TRUE(d.IsObject());
- EXPECT_EQ(5, d.MemberCount());
-}
-
-#endif // RAPIDJSON_HAS_CXX11_RVALUE_REFS
diff --git a/3rdparty/rapidjson/test/unittest/itoatest.cpp b/3rdparty/rapidjson/test/unittest/itoatest.cpp
deleted file mode 100644
index 9c3107d4178..00000000000
--- a/3rdparty/rapidjson/test/unittest/itoatest.cpp
+++ /dev/null
@@ -1,158 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 "unittest.h"
-#include "rapidjson/internal/itoa.h"
-
-#ifdef __GNUC__
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(type-limits)
-#endif
-
-using namespace rapidjson::internal;
-
-template <typename T>
-struct Traits {
-};
-
-template <>
-struct Traits<uint32_t> {
- enum { kBufferSize = 11 };
- enum { kMaxDigit = 10 };
- static uint32_t Negate(uint32_t x) { return x; }
-};
-
-template <>
-struct Traits<int32_t> {
- enum { kBufferSize = 12 };
- enum { kMaxDigit = 10 };
- static int32_t Negate(int32_t x) { return -x; }
-};
-
-template <>
-struct Traits<uint64_t> {
- enum { kBufferSize = 21 };
- enum { kMaxDigit = 20 };
- static uint64_t Negate(uint64_t x) { return x; }
-};
-
-template <>
-struct Traits<int64_t> {
- enum { kBufferSize = 22 };
- enum { kMaxDigit = 20 };
- static int64_t Negate(int64_t x) { return -x; }
-};
-
-template <typename T>
-static void VerifyValue(T value, void(*f)(T, char*), char* (*g)(T, char*)) {
- char buffer1[Traits<T>::kBufferSize];
- char buffer2[Traits<T>::kBufferSize];
-
- f(value, buffer1);
- *g(value, buffer2) = '\0';
-
-
- EXPECT_STREQ(buffer1, buffer2);
-}
-
-template <typename T>
-static void Verify(void(*f)(T, char*), char* (*g)(T, char*)) {
- // Boundary cases
- VerifyValue<T>(0, f, g);
- VerifyValue<T>(std::numeric_limits<T>::min(), f, g);
- VerifyValue<T>(std::numeric_limits<T>::max(), f, g);
-
- // 2^n - 1, 2^n, 10^n - 1, 10^n until overflow
- for (uint32_t power = 2; power <= 10; power += 8) {
- T i = 1, last;
- do {
- VerifyValue<T>(i - 1, f, g);
- VerifyValue<T>(i, f, g);
- if (std::numeric_limits<T>::min() < 0) {
- VerifyValue<T>(Traits<T>::Negate(i), f, g);
- VerifyValue<T>(Traits<T>::Negate(i + 1), f, g);
- }
- last = i;
- i *= power;
- } while (last < i);
- }
-}
-
-static void u32toa_naive(uint32_t value, char* buffer) {
- char temp[10];
- char *p = temp;
- do {
- *p++ = char(value % 10) + '0';
- value /= 10;
- } while (value > 0);
-
- do {
- *buffer++ = *--p;
- } while (p != temp);
-
- *buffer = '\0';
-}
-
-static void i32toa_naive(int32_t value, char* buffer) {
- uint32_t u = static_cast<uint32_t>(value);
- if (value < 0) {
- *buffer++ = '-';
- u = ~u + 1;
- }
- u32toa_naive(u, buffer);
-}
-
-static void u64toa_naive(uint64_t value, char* buffer) {
- char temp[20];
- char *p = temp;
- do {
- *p++ = char(value % 10) + '0';
- value /= 10;
- } while (value > 0);
-
- do {
- *buffer++ = *--p;
- } while (p != temp);
-
- *buffer = '\0';
-}
-
-static void i64toa_naive(int64_t value, char* buffer) {
- uint64_t u = static_cast<uint64_t>(value);
- if (value < 0) {
- *buffer++ = '-';
- u = ~u + 1;
- }
- u64toa_naive(u, buffer);
-}
-
-TEST(itoa, u32toa) {
- Verify(u32toa_naive, u32toa);
-}
-
-TEST(itoa, i32toa) {
- Verify(i32toa_naive, i32toa);
-}
-
-TEST(itoa, u64toa) {
- Verify(u64toa_naive, u64toa);
-}
-
-TEST(itoa, i64toa) {
- Verify(i64toa_naive, i64toa);
-}
-
-#ifdef __GNUC__
-RAPIDJSON_DIAG_POP
-#endif
diff --git a/3rdparty/rapidjson/test/unittest/jsoncheckertest.cpp b/3rdparty/rapidjson/test/unittest/jsoncheckertest.cpp
deleted file mode 100644
index bea788d26e3..00000000000
--- a/3rdparty/rapidjson/test/unittest/jsoncheckertest.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 "unittest.h"
-
-#include "rapidjson/document.h"
-
-using namespace rapidjson;
-
-static char* ReadFile(const char* filename, size_t& length) {
- const char *paths[] = {
- "jsonchecker",
- "bin/jsonchecker",
- "../bin/jsonchecker",
- "../../bin/jsonchecker",
- "../../../bin/jsonchecker"
- };
- char buffer[1024];
- FILE *fp = 0;
- for (size_t i = 0; i < sizeof(paths) / sizeof(paths[0]); i++) {
- sprintf(buffer, "%s/%s", paths[i], filename);
- fp = fopen(buffer, "rb");
- if (fp)
- break;
- }
-
- if (!fp)
- return 0;
-
- fseek(fp, 0, SEEK_END);
- length = static_cast<size_t>(ftell(fp));
- fseek(fp, 0, SEEK_SET);
- char* json = static_cast<char*>(malloc(length + 1));
- size_t readLength = fread(json, 1, length, fp);
- json[readLength] = '\0';
- fclose(fp);
- return json;
-}
-
-TEST(JsonChecker, Reader) {
- char filename[256];
-
- // jsonchecker/failXX.json
- for (int i = 1; i <= 33; i++) {
- if (i == 1) // fail1.json is valid in rapidjson, which has no limitation on type of root element (RFC 7159).
- continue;
- if (i == 18) // fail18.json is valid in rapidjson, which has no limitation on depth of nesting.
- continue;
-
- sprintf(filename, "fail%d.json", i);
- size_t length;
- char* json = ReadFile(filename, length);
- if (!json) {
- printf("jsonchecker file %s not found", filename);
- ADD_FAILURE();
- continue;
- }
-
- GenericDocument<UTF8<>, CrtAllocator> document; // Use Crt allocator to check exception-safety (no memory leak)
- document.Parse(json);
- EXPECT_TRUE(document.HasParseError());
-
- document.Parse<kParseIterativeFlag>(json);
- EXPECT_TRUE(document.HasParseError());
-
- free(json);
- }
-
- // passX.json
- for (int i = 1; i <= 3; i++) {
- sprintf(filename, "pass%d.json", i);
- size_t length;
- char* json = ReadFile(filename, length);
- if (!json) {
- printf("jsonchecker file %s not found", filename);
- continue;
- }
-
- GenericDocument<UTF8<>, CrtAllocator> document; // Use Crt allocator to check exception-safety (no memory leak)
- document.Parse(json);
- EXPECT_FALSE(document.HasParseError());
-
- document.Parse<kParseIterativeFlag>(json);
- EXPECT_FALSE(document.HasParseError());
-
- free(json);
- }
-}
diff --git a/3rdparty/rapidjson/test/unittest/namespacetest.cpp b/3rdparty/rapidjson/test/unittest/namespacetest.cpp
deleted file mode 100644
index 1814724aec6..00000000000
--- a/3rdparty/rapidjson/test/unittest/namespacetest.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 "unittest.h"
-
-// test another instantiation of RapidJSON in a different namespace
-
-#define RAPIDJSON_NAMESPACE my::rapid::json
-#define RAPIDJSON_NAMESPACE_BEGIN namespace my { namespace rapid { namespace json {
-#define RAPIDJSON_NAMESPACE_END } } }
-
-// include lots of RapidJSON files
-
-#include "rapidjson/document.h"
-#include "rapidjson/writer.h"
-#include "rapidjson/filereadstream.h"
-#include "rapidjson/filewritestream.h"
-#include "rapidjson/encodedstream.h"
-#include "rapidjson/stringbuffer.h"
-
-static const char json[] = "{\"hello\":\"world\",\"t\":true,\"f\":false,\"n\":null,\"i\":123,\"pi\":3.1416,\"a\":[1,2,3,4]}";
-
-TEST(NamespaceTest,Using) {
- using namespace RAPIDJSON_NAMESPACE;
- typedef GenericDocument<UTF8<>, CrtAllocator> DocumentType;
- DocumentType doc;
-
- doc.Parse(json);
- EXPECT_TRUE(!doc.HasParseError());
-}
-
-TEST(NamespaceTest,Direct) {
- typedef RAPIDJSON_NAMESPACE::Document Document;
- typedef RAPIDJSON_NAMESPACE::Reader Reader;
- typedef RAPIDJSON_NAMESPACE::StringStream StringStream;
- typedef RAPIDJSON_NAMESPACE::StringBuffer StringBuffer;
- typedef RAPIDJSON_NAMESPACE::Writer<StringBuffer> WriterType;
-
- StringStream s(json);
- StringBuffer buffer;
- WriterType writer(buffer);
- buffer.ShrinkToFit();
- Reader reader;
- reader.Parse(s, writer);
-
- EXPECT_STREQ(json, buffer.GetString());
- EXPECT_EQ(sizeof(json)-1, buffer.GetSize());
- EXPECT_TRUE(writer.IsComplete());
-
- Document doc;
- doc.Parse(buffer.GetString());
- EXPECT_TRUE(!doc.HasParseError());
-
- buffer.Clear();
- writer.Reset(buffer);
- doc.Accept(writer);
- EXPECT_STREQ(json, buffer.GetString());
- EXPECT_TRUE(writer.IsComplete());
-}
diff --git a/3rdparty/rapidjson/test/unittest/ostreamwrappertest.cpp b/3rdparty/rapidjson/test/unittest/ostreamwrappertest.cpp
deleted file mode 100644
index b1d1cd827fc..00000000000
--- a/3rdparty/rapidjson/test/unittest/ostreamwrappertest.cpp
+++ /dev/null
@@ -1,91 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 "unittest.h"
-
-#include "rapidjson/ostreamwrapper.h"
-#include "rapidjson/encodedstream.h"
-#include "rapidjson/document.h"
-#include <sstream>
-#include <fstream>
-
-using namespace rapidjson;
-using namespace std;
-
-template <typename StringStreamType>
-static void TestStringStream() {
- typedef typename StringStreamType::char_type Ch;
-
- Ch s[] = { 'A', 'B', 'C', '\0' };
- StringStreamType oss(s);
- BasicOStreamWrapper<StringStreamType> os(oss);
- for (size_t i = 0; i < 3; i++)
- os.Put(s[i]);
- os.Flush();
- for (size_t i = 0; i < 3; i++)
- EXPECT_EQ(s[i], oss.str()[i]);
-}
-
-TEST(OStreamWrapper, ostringstream) {
- TestStringStream<ostringstream>();
-}
-
-TEST(OStreamWrapper, stringstream) {
- TestStringStream<stringstream>();
-}
-
-TEST(OStreamWrapper, wostringstream) {
- TestStringStream<wostringstream>();
-}
-
-TEST(OStreamWrapper, wstringstream) {
- TestStringStream<wstringstream>();
-}
-
-TEST(OStreamWrapper, cout) {
- OStreamWrapper os(cout);
- const char* s = "Hello World!\n";
- while (*s)
- os.Put(*s++);
- os.Flush();
-}
-
-template <typename FileStreamType>
-static void TestFileStream() {
- char filename[L_tmpnam];
- FILE* fp = TempFile(filename);
- fclose(fp);
-
- const char* s = "Hello World!\n";
- {
- ofstream ofs(filename, ios::out | ios::binary);
- BasicOStreamWrapper<ofstream> osw(ofs);
- for (const char* p = s; *p; p++)
- osw.Put(*p);
- osw.Flush();
- }
-
- fp = fopen(filename, "r");
- for (const char* p = s; *p; p++)
- EXPECT_EQ(*p, static_cast<char>(fgetc(fp)));
- fclose(fp);
-}
-
-TEST(OStreamWrapper, ofstream) {
- TestFileStream<ofstream>();
-}
-
-TEST(OStreamWrapper, fstream) {
- TestFileStream<fstream>();
-}
diff --git a/3rdparty/rapidjson/test/unittest/pointertest.cpp b/3rdparty/rapidjson/test/unittest/pointertest.cpp
deleted file mode 100644
index dbddbedee25..00000000000
--- a/3rdparty/rapidjson/test/unittest/pointertest.cpp
+++ /dev/null
@@ -1,1524 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 "unittest.h"
-#include "rapidjson/pointer.h"
-#include "rapidjson/stringbuffer.h"
-#include <sstream>
-
-using namespace rapidjson;
-
-static const char kJson[] = "{\n"
-" \"foo\":[\"bar\", \"baz\"],\n"
-" \"\" : 0,\n"
-" \"a/b\" : 1,\n"
-" \"c%d\" : 2,\n"
-" \"e^f\" : 3,\n"
-" \"g|h\" : 4,\n"
-" \"i\\\\j\" : 5,\n"
-" \"k\\\"l\" : 6,\n"
-" \" \" : 7,\n"
-" \"m~n\" : 8\n"
-"}";
-
-TEST(Pointer, DefaultConstructor) {
- Pointer p;
- EXPECT_TRUE(p.IsValid());
- EXPECT_EQ(0u, p.GetTokenCount());
-}
-
-TEST(Pointer, Parse) {
- {
- Pointer p("");
- EXPECT_TRUE(p.IsValid());
- EXPECT_EQ(0u, p.GetTokenCount());
- }
-
- {
- Pointer p("/");
- EXPECT_TRUE(p.IsValid());
- EXPECT_EQ(1u, p.GetTokenCount());
- EXPECT_EQ(0u, p.GetTokens()[0].length);
- EXPECT_STREQ("", p.GetTokens()[0].name);
- EXPECT_EQ(kPointerInvalidIndex, p.GetTokens()[0].index);
- }
-
- {
- Pointer p("/foo");
- EXPECT_TRUE(p.IsValid());
- EXPECT_EQ(1u, p.GetTokenCount());
- EXPECT_EQ(3u, p.GetTokens()[0].length);
- EXPECT_STREQ("foo", p.GetTokens()[0].name);
- EXPECT_EQ(kPointerInvalidIndex, p.GetTokens()[0].index);
- }
-
- #if RAPIDJSON_HAS_STDSTRING
- {
- Pointer p(std::string("/foo"));
- EXPECT_TRUE(p.IsValid());
- EXPECT_EQ(1u, p.GetTokenCount());
- EXPECT_EQ(3u, p.GetTokens()[0].length);
- EXPECT_STREQ("foo", p.GetTokens()[0].name);
- EXPECT_EQ(kPointerInvalidIndex, p.GetTokens()[0].index);
- }
- #endif
-
- {
- Pointer p("/foo/0");
- EXPECT_TRUE(p.IsValid());
- EXPECT_EQ(2u, p.GetTokenCount());
- EXPECT_EQ(3u, p.GetTokens()[0].length);
- EXPECT_STREQ("foo", p.GetTokens()[0].name);
- EXPECT_EQ(kPointerInvalidIndex, p.GetTokens()[0].index);
- EXPECT_EQ(1u, p.GetTokens()[1].length);
- EXPECT_STREQ("0", p.GetTokens()[1].name);
- EXPECT_EQ(0u, p.GetTokens()[1].index);
- }
-
- {
- // Unescape ~1
- Pointer p("/a~1b");
- EXPECT_TRUE(p.IsValid());
- EXPECT_EQ(1u, p.GetTokenCount());
- EXPECT_EQ(3u, p.GetTokens()[0].length);
- EXPECT_STREQ("a/b", p.GetTokens()[0].name);
- }
-
- {
- // Unescape ~0
- Pointer p("/m~0n");
- EXPECT_TRUE(p.IsValid());
- EXPECT_EQ(1u, p.GetTokenCount());
- EXPECT_EQ(3u, p.GetTokens()[0].length);
- EXPECT_STREQ("m~n", p.GetTokens()[0].name);
- }
-
- {
- // empty name
- Pointer p("/");
- EXPECT_TRUE(p.IsValid());
- EXPECT_EQ(1u, p.GetTokenCount());
- EXPECT_EQ(0u, p.GetTokens()[0].length);
- EXPECT_STREQ("", p.GetTokens()[0].name);
- }
-
- {
- // empty and non-empty name
- Pointer p("//a");
- EXPECT_TRUE(p.IsValid());
- EXPECT_EQ(2u, p.GetTokenCount());
- EXPECT_EQ(0u, p.GetTokens()[0].length);
- EXPECT_STREQ("", p.GetTokens()[0].name);
- EXPECT_EQ(1u, p.GetTokens()[1].length);
- EXPECT_STREQ("a", p.GetTokens()[1].name);
- }
-
- {
- // Null characters
- Pointer p("/\0\0", 3);
- EXPECT_TRUE(p.IsValid());
- EXPECT_EQ(1u, p.GetTokenCount());
- EXPECT_EQ(2u, p.GetTokens()[0].length);
- EXPECT_EQ('\0', p.GetTokens()[0].name[0]);
- EXPECT_EQ('\0', p.GetTokens()[0].name[1]);
- EXPECT_EQ('\0', p.GetTokens()[0].name[2]);
- }
-
- {
- // Valid index
- Pointer p("/123");
- EXPECT_TRUE(p.IsValid());
- EXPECT_EQ(1u, p.GetTokenCount());
- EXPECT_STREQ("123", p.GetTokens()[0].name);
- EXPECT_EQ(123u, p.GetTokens()[0].index);
- }
-
- {
- // Invalid index (with leading zero)
- Pointer p("/01");
- EXPECT_TRUE(p.IsValid());
- EXPECT_EQ(1u, p.GetTokenCount());
- EXPECT_STREQ("01", p.GetTokens()[0].name);
- EXPECT_EQ(kPointerInvalidIndex, p.GetTokens()[0].index);
- }
-
- if (sizeof(SizeType) == 4) {
- // Invalid index (overflow)
- Pointer p("/4294967296");
- EXPECT_TRUE(p.IsValid());
- EXPECT_EQ(1u, p.GetTokenCount());
- EXPECT_STREQ("4294967296", p.GetTokens()[0].name);
- EXPECT_EQ(kPointerInvalidIndex, p.GetTokens()[0].index);
- }
-
- {
- // kPointerParseErrorTokenMustBeginWithSolidus
- Pointer p(" ");
- EXPECT_FALSE(p.IsValid());
- EXPECT_EQ(kPointerParseErrorTokenMustBeginWithSolidus, p.GetParseErrorCode());
- EXPECT_EQ(0u, p.GetParseErrorOffset());
- }
-
- {
- // kPointerParseErrorInvalidEscape
- Pointer p("/~");
- EXPECT_FALSE(p.IsValid());
- EXPECT_EQ(kPointerParseErrorInvalidEscape, p.GetParseErrorCode());
- EXPECT_EQ(2u, p.GetParseErrorOffset());
- }
-
- {
- // kPointerParseErrorInvalidEscape
- Pointer p("/~2");
- EXPECT_FALSE(p.IsValid());
- EXPECT_EQ(kPointerParseErrorInvalidEscape, p.GetParseErrorCode());
- EXPECT_EQ(2u, p.GetParseErrorOffset());
- }
-}
-
-TEST(Pointer, Parse_URIFragment) {
- {
- Pointer p("#");
- EXPECT_TRUE(p.IsValid());
- EXPECT_EQ(0u, p.GetTokenCount());
- }
-
- {
- Pointer p("#/foo");
- EXPECT_TRUE(p.IsValid());
- EXPECT_EQ(1u, p.GetTokenCount());
- EXPECT_EQ(3u, p.GetTokens()[0].length);
- EXPECT_STREQ("foo", p.GetTokens()[0].name);
- }
-
- {
- Pointer p("#/foo/0");
- EXPECT_TRUE(p.IsValid());
- EXPECT_EQ(2u, p.GetTokenCount());
- EXPECT_EQ(3u, p.GetTokens()[0].length);
- EXPECT_STREQ("foo", p.GetTokens()[0].name);
- EXPECT_EQ(1u, p.GetTokens()[1].length);
- EXPECT_STREQ("0", p.GetTokens()[1].name);
- EXPECT_EQ(0u, p.GetTokens()[1].index);
- }
-
- {
- // Unescape ~1
- Pointer p("#/a~1b");
- EXPECT_TRUE(p.IsValid());
- EXPECT_EQ(1u, p.GetTokenCount());
- EXPECT_EQ(3u, p.GetTokens()[0].length);
- EXPECT_STREQ("a/b", p.GetTokens()[0].name);
- }
-
- {
- // Unescape ~0
- Pointer p("#/m~0n");
- EXPECT_TRUE(p.IsValid());
- EXPECT_EQ(1u, p.GetTokenCount());
- EXPECT_EQ(3u, p.GetTokens()[0].length);
- EXPECT_STREQ("m~n", p.GetTokens()[0].name);
- }
-
- {
- // empty name
- Pointer p("#/");
- EXPECT_TRUE(p.IsValid());
- EXPECT_EQ(1u, p.GetTokenCount());
- EXPECT_EQ(0u, p.GetTokens()[0].length);
- EXPECT_STREQ("", p.GetTokens()[0].name);
- }
-
- {
- // empty and non-empty name
- Pointer p("#//a");
- EXPECT_TRUE(p.IsValid());
- EXPECT_EQ(2u, p.GetTokenCount());
- EXPECT_EQ(0u, p.GetTokens()[0].length);
- EXPECT_STREQ("", p.GetTokens()[0].name);
- EXPECT_EQ(1u, p.GetTokens()[1].length);
- EXPECT_STREQ("a", p.GetTokens()[1].name);
- }
-
- {
- // Null characters
- Pointer p("#/%00%00");
- EXPECT_TRUE(p.IsValid());
- EXPECT_EQ(1u, p.GetTokenCount());
- EXPECT_EQ(2u, p.GetTokens()[0].length);
- EXPECT_EQ('\0', p.GetTokens()[0].name[0]);
- EXPECT_EQ('\0', p.GetTokens()[0].name[1]);
- EXPECT_EQ('\0', p.GetTokens()[0].name[2]);
- }
-
- {
- // Percentage Escapes
- EXPECT_STREQ("c%d", Pointer("#/c%25d").GetTokens()[0].name);
- EXPECT_STREQ("e^f", Pointer("#/e%5Ef").GetTokens()[0].name);
- EXPECT_STREQ("g|h", Pointer("#/g%7Ch").GetTokens()[0].name);
- EXPECT_STREQ("i\\j", Pointer("#/i%5Cj").GetTokens()[0].name);
- EXPECT_STREQ("k\"l", Pointer("#/k%22l").GetTokens()[0].name);
- EXPECT_STREQ(" ", Pointer("#/%20").GetTokens()[0].name);
- }
-
- {
- // Valid index
- Pointer p("#/123");
- EXPECT_TRUE(p.IsValid());
- EXPECT_EQ(1u, p.GetTokenCount());
- EXPECT_STREQ("123", p.GetTokens()[0].name);
- EXPECT_EQ(123u, p.GetTokens()[0].index);
- }
-
- {
- // Invalid index (with leading zero)
- Pointer p("#/01");
- EXPECT_TRUE(p.IsValid());
- EXPECT_EQ(1u, p.GetTokenCount());
- EXPECT_STREQ("01", p.GetTokens()[0].name);
- EXPECT_EQ(kPointerInvalidIndex, p.GetTokens()[0].index);
- }
-
- if (sizeof(SizeType) == 4) {
- // Invalid index (overflow)
- Pointer p("#/4294967296");
- EXPECT_TRUE(p.IsValid());
- EXPECT_EQ(1u, p.GetTokenCount());
- EXPECT_STREQ("4294967296", p.GetTokens()[0].name);
- EXPECT_EQ(kPointerInvalidIndex, p.GetTokens()[0].index);
- }
-
- {
- // Decode UTF-8 perecent encoding to UTF-8
- Pointer p("#/%C2%A2");
- EXPECT_TRUE(p.IsValid());
- EXPECT_EQ(1u, p.GetTokenCount());
- EXPECT_STREQ("\xC2\xA2", p.GetTokens()[0].name);
- }
-
- {
- // Decode UTF-8 perecent encoding to UTF-16
- GenericPointer<GenericValue<UTF16<> > > p(L"#/%C2%A2");
- EXPECT_TRUE(p.IsValid());
- EXPECT_EQ(1u, p.GetTokenCount());
- EXPECT_EQ(static_cast<UTF16<>::Ch>(0x00A2), p.GetTokens()[0].name[0]);
- EXPECT_EQ(1u, p.GetTokens()[0].length);
- }
-
- {
- // Decode UTF-8 perecent encoding to UTF-16
- GenericPointer<GenericValue<UTF16<> > > p(L"#/%E2%82%AC");
- EXPECT_TRUE(p.IsValid());
- EXPECT_EQ(1u, p.GetTokenCount());
- EXPECT_EQ(static_cast<UTF16<>::Ch>(0x20AC), p.GetTokens()[0].name[0]);
- EXPECT_EQ(1u, p.GetTokens()[0].length);
- }
-
- {
- // kPointerParseErrorTokenMustBeginWithSolidus
- Pointer p("# ");
- EXPECT_FALSE(p.IsValid());
- EXPECT_EQ(kPointerParseErrorTokenMustBeginWithSolidus, p.GetParseErrorCode());
- EXPECT_EQ(1u, p.GetParseErrorOffset());
- }
-
- {
- // kPointerParseErrorInvalidEscape
- Pointer p("#/~");
- EXPECT_FALSE(p.IsValid());
- EXPECT_EQ(kPointerParseErrorInvalidEscape, p.GetParseErrorCode());
- EXPECT_EQ(3u, p.GetParseErrorOffset());
- }
-
- {
- // kPointerParseErrorInvalidEscape
- Pointer p("#/~2");
- EXPECT_FALSE(p.IsValid());
- EXPECT_EQ(kPointerParseErrorInvalidEscape, p.GetParseErrorCode());
- EXPECT_EQ(3u, p.GetParseErrorOffset());
- }
-
- {
- // kPointerParseErrorInvalidPercentEncoding
- Pointer p("#/%");
- EXPECT_FALSE(p.IsValid());
- EXPECT_EQ(kPointerParseErrorInvalidPercentEncoding, p.GetParseErrorCode());
- EXPECT_EQ(2u, p.GetParseErrorOffset());
- }
-
- {
- // kPointerParseErrorInvalidPercentEncoding (invalid hex)
- Pointer p("#/%g0");
- EXPECT_FALSE(p.IsValid());
- EXPECT_EQ(kPointerParseErrorInvalidPercentEncoding, p.GetParseErrorCode());
- EXPECT_EQ(2u, p.GetParseErrorOffset());
- }
-
- {
- // kPointerParseErrorInvalidPercentEncoding (invalid hex)
- Pointer p("#/%0g");
- EXPECT_FALSE(p.IsValid());
- EXPECT_EQ(kPointerParseErrorInvalidPercentEncoding, p.GetParseErrorCode());
- EXPECT_EQ(2u, p.GetParseErrorOffset());
- }
-
- {
- // kPointerParseErrorInvalidPercentEncoding (incomplete UTF-8 sequence)
- Pointer p("#/%C2");
- EXPECT_FALSE(p.IsValid());
- EXPECT_EQ(kPointerParseErrorInvalidPercentEncoding, p.GetParseErrorCode());
- EXPECT_EQ(2u, p.GetParseErrorOffset());
- }
-
- {
- // kPointerParseErrorCharacterMustPercentEncode
- Pointer p("#/ ");
- EXPECT_FALSE(p.IsValid());
- EXPECT_EQ(kPointerParseErrorCharacterMustPercentEncode, p.GetParseErrorCode());
- EXPECT_EQ(2u, p.GetParseErrorOffset());
- }
-
- {
- // kPointerParseErrorCharacterMustPercentEncode
- Pointer p("#/\n");
- EXPECT_FALSE(p.IsValid());
- EXPECT_EQ(kPointerParseErrorCharacterMustPercentEncode, p.GetParseErrorCode());
- EXPECT_EQ(2u, p.GetParseErrorOffset());
- }
-}
-
-TEST(Pointer, Stringify) {
- // Test by roundtrip
- const char* sources[] = {
- "",
- "/foo",
- "/foo/0",
- "/",
- "/a~1b",
- "/c%d",
- "/e^f",
- "/g|h",
- "/i\\j",
- "/k\"l",
- "/ ",
- "/m~0n",
- "/\xC2\xA2",
- "/\xE2\x82\xAC",
- "/\xF0\x9D\x84\x9E"
- };
-
- for (size_t i = 0; i < sizeof(sources) / sizeof(sources[0]); i++) {
- Pointer p(sources[i]);
- StringBuffer s;
- EXPECT_TRUE(p.Stringify(s));
- EXPECT_STREQ(sources[i], s.GetString());
-
- // Stringify to URI fragment
- StringBuffer s2;
- EXPECT_TRUE(p.StringifyUriFragment(s2));
- Pointer p2(s2.GetString(), s2.GetSize());
- EXPECT_TRUE(p2.IsValid());
- EXPECT_TRUE(p == p2);
- }
-
- {
- // Strigify to URI fragment with an invalid UTF-8 sequence
- Pointer p("/\xC2");
- StringBuffer s;
- EXPECT_FALSE(p.StringifyUriFragment(s));
- }
-}
-
-// Construct a Pointer with static tokens, no dynamic allocation involved.
-#define NAME(s) { s, sizeof(s) / sizeof(s[0]) - 1, kPointerInvalidIndex }
-#define INDEX(i) { #i, sizeof(#i) - 1, i }
-
-static const Pointer::Token kTokens[] = { NAME("foo"), INDEX(0) }; // equivalent to "/foo/0"
-
-#undef NAME
-#undef INDEX
-
-TEST(Pointer, ConstructorWithToken) {
- Pointer p(kTokens, sizeof(kTokens) / sizeof(kTokens[0]));
- EXPECT_TRUE(p.IsValid());
- EXPECT_EQ(2u, p.GetTokenCount());
- EXPECT_EQ(3u, p.GetTokens()[0].length);
- EXPECT_STREQ("foo", p.GetTokens()[0].name);
- EXPECT_EQ(1u, p.GetTokens()[1].length);
- EXPECT_STREQ("0", p.GetTokens()[1].name);
- EXPECT_EQ(0u, p.GetTokens()[1].index);
-}
-
-TEST(Pointer, CopyConstructor) {
- {
- Pointer p("/foo/0");
- Pointer q(p);
- EXPECT_TRUE(q.IsValid());
- EXPECT_EQ(2u, q.GetTokenCount());
- EXPECT_EQ(3u, q.GetTokens()[0].length);
- EXPECT_STREQ("foo", q.GetTokens()[0].name);
- EXPECT_EQ(1u, q.GetTokens()[1].length);
- EXPECT_STREQ("0", q.GetTokens()[1].name);
- EXPECT_EQ(0u, q.GetTokens()[1].index);
- }
-
- // Static tokens
- {
- Pointer p(kTokens, sizeof(kTokens) / sizeof(kTokens[0]));
- Pointer q(p);
- EXPECT_TRUE(q.IsValid());
- EXPECT_EQ(2u, q.GetTokenCount());
- EXPECT_EQ(3u, q.GetTokens()[0].length);
- EXPECT_STREQ("foo", q.GetTokens()[0].name);
- EXPECT_EQ(1u, q.GetTokens()[1].length);
- EXPECT_STREQ("0", q.GetTokens()[1].name);
- EXPECT_EQ(0u, q.GetTokens()[1].index);
- }
-}
-
-TEST(Pointer, Assignment) {
- {
- Pointer p("/foo/0");
- Pointer q;
- q = p;
- EXPECT_TRUE(q.IsValid());
- EXPECT_EQ(2u, q.GetTokenCount());
- EXPECT_EQ(3u, q.GetTokens()[0].length);
- EXPECT_STREQ("foo", q.GetTokens()[0].name);
- EXPECT_EQ(1u, q.GetTokens()[1].length);
- EXPECT_STREQ("0", q.GetTokens()[1].name);
- EXPECT_EQ(0u, q.GetTokens()[1].index);
- q = q;
- EXPECT_TRUE(q.IsValid());
- EXPECT_EQ(2u, q.GetTokenCount());
- EXPECT_EQ(3u, q.GetTokens()[0].length);
- EXPECT_STREQ("foo", q.GetTokens()[0].name);
- EXPECT_EQ(1u, q.GetTokens()[1].length);
- EXPECT_STREQ("0", q.GetTokens()[1].name);
- EXPECT_EQ(0u, q.GetTokens()[1].index);
- }
-
- // Static tokens
- {
- Pointer p(kTokens, sizeof(kTokens) / sizeof(kTokens[0]));
- Pointer q;
- q = p;
- EXPECT_TRUE(q.IsValid());
- EXPECT_EQ(2u, q.GetTokenCount());
- EXPECT_EQ(3u, q.GetTokens()[0].length);
- EXPECT_STREQ("foo", q.GetTokens()[0].name);
- EXPECT_EQ(1u, q.GetTokens()[1].length);
- EXPECT_STREQ("0", q.GetTokens()[1].name);
- EXPECT_EQ(0u, q.GetTokens()[1].index);
- }
-}
-
-TEST(Pointer, Append) {
- {
- Pointer p;
- Pointer q = p.Append("foo");
- EXPECT_TRUE(Pointer("/foo") == q);
- q = q.Append(1234);
- EXPECT_TRUE(Pointer("/foo/1234") == q);
- q = q.Append("");
- EXPECT_TRUE(Pointer("/foo/1234/") == q);
- }
-
- {
- Pointer p;
- Pointer q = p.Append(Value("foo").Move());
- EXPECT_TRUE(Pointer("/foo") == q);
- q = q.Append(Value(1234).Move());
- EXPECT_TRUE(Pointer("/foo/1234") == q);
- q = q.Append(Value(kStringType).Move());
- EXPECT_TRUE(Pointer("/foo/1234/") == q);
- }
-
-#if RAPIDJSON_HAS_STDSTRING
- {
- Pointer p;
- Pointer q = p.Append(std::string("foo"));
- EXPECT_TRUE(Pointer("/foo") == q);
- }
-#endif
-}
-
-TEST(Pointer, Equality) {
- EXPECT_TRUE(Pointer("/foo/0") == Pointer("/foo/0"));
- EXPECT_FALSE(Pointer("/foo/0") == Pointer("/foo/1"));
- EXPECT_FALSE(Pointer("/foo/0") == Pointer("/foo/0/1"));
- EXPECT_FALSE(Pointer("/foo/0") == Pointer("a"));
- EXPECT_FALSE(Pointer("a") == Pointer("a")); // Invalid always not equal
-}
-
-TEST(Pointer, Inequality) {
- EXPECT_FALSE(Pointer("/foo/0") != Pointer("/foo/0"));
- EXPECT_TRUE(Pointer("/foo/0") != Pointer("/foo/1"));
- EXPECT_TRUE(Pointer("/foo/0") != Pointer("/foo/0/1"));
- EXPECT_TRUE(Pointer("/foo/0") != Pointer("a"));
- EXPECT_TRUE(Pointer("a") != Pointer("a")); // Invalid always not equal
-}
-
-TEST(Pointer, Create) {
- Document d;
- {
- Value* v = &Pointer("").Create(d, d.GetAllocator());
- EXPECT_EQ(&d, v);
- }
- {
- Value* v = &Pointer("/foo").Create(d, d.GetAllocator());
- EXPECT_EQ(&d["foo"], v);
- }
- {
- Value* v = &Pointer("/foo/0").Create(d, d.GetAllocator());
- EXPECT_EQ(&d["foo"][0], v);
- }
- {
- Value* v = &Pointer("/foo/-").Create(d, d.GetAllocator());
- EXPECT_EQ(&d["foo"][1], v);
- }
-
- {
- Value* v = &Pointer("/foo/-/-").Create(d, d.GetAllocator());
- // "foo/-" is a newly created null value x.
- // "foo/-/-" finds that x is not an array, it converts x to empty object
- // and treats - as "-" member name
- EXPECT_EQ(&d["foo"][2]["-"], v);
- }
-
- {
- // Document with no allocator
- Value* v = &Pointer("/foo/-").Create(d);
- EXPECT_EQ(&d["foo"][3], v);
- }
-
- {
- // Value (not document) must give allocator
- Value* v = &Pointer("/-").Create(d["foo"], d.GetAllocator());
- EXPECT_EQ(&d["foo"][4], v);
- }
-}
-
-TEST(Pointer, Get) {
- Document d;
- d.Parse(kJson);
-
- EXPECT_EQ(&d, Pointer("").Get(d));
- EXPECT_EQ(&d["foo"], Pointer("/foo").Get(d));
- EXPECT_EQ(&d["foo"][0], Pointer("/foo/0").Get(d));
- EXPECT_EQ(&d[""], Pointer("/").Get(d));
- EXPECT_EQ(&d["a/b"], Pointer("/a~1b").Get(d));
- EXPECT_EQ(&d["c%d"], Pointer("/c%d").Get(d));
- EXPECT_EQ(&d["e^f"], Pointer("/e^f").Get(d));
- EXPECT_EQ(&d["g|h"], Pointer("/g|h").Get(d));
- EXPECT_EQ(&d["i\\j"], Pointer("/i\\j").Get(d));
- EXPECT_EQ(&d["k\"l"], Pointer("/k\"l").Get(d));
- EXPECT_EQ(&d[" "], Pointer("/ ").Get(d));
- EXPECT_EQ(&d["m~n"], Pointer("/m~0n").Get(d));
- EXPECT_TRUE(Pointer("/abc").Get(d) == 0);
- size_t unresolvedTokenIndex;
- EXPECT_TRUE(Pointer("/foo/2").Get(d, &unresolvedTokenIndex) == 0); // Out of boundary
- EXPECT_EQ(1, unresolvedTokenIndex);
- EXPECT_TRUE(Pointer("/foo/a").Get(d, &unresolvedTokenIndex) == 0); // "/foo" is an array, cannot query by "a"
- EXPECT_EQ(1, unresolvedTokenIndex);
- EXPECT_TRUE(Pointer("/foo/0/0").Get(d, &unresolvedTokenIndex) == 0); // "/foo/0" is an string, cannot further query
- EXPECT_EQ(2, unresolvedTokenIndex);
- EXPECT_TRUE(Pointer("/foo/0/a").Get(d, &unresolvedTokenIndex) == 0); // "/foo/0" is an string, cannot further query
- EXPECT_EQ(2, unresolvedTokenIndex);
-}
-
-TEST(Pointer, GetWithDefault) {
- Document d;
- d.Parse(kJson);
-
- // Value version
- Document::AllocatorType& a = d.GetAllocator();
- const Value v("qux");
- EXPECT_TRUE(Value("bar") == Pointer("/foo/0").GetWithDefault(d, v, a));
- EXPECT_TRUE(Value("baz") == Pointer("/foo/1").GetWithDefault(d, v, a));
- EXPECT_TRUE(Value("qux") == Pointer("/foo/2").GetWithDefault(d, v, a));
- EXPECT_TRUE(Value("last") == Pointer("/foo/-").GetWithDefault(d, Value("last").Move(), a));
- EXPECT_STREQ("last", d["foo"][3].GetString());
-
- EXPECT_TRUE(Pointer("/foo/null").GetWithDefault(d, Value().Move(), a).IsNull());
- EXPECT_TRUE(Pointer("/foo/null").GetWithDefault(d, "x", a).IsNull());
-
- // Generic version
- EXPECT_EQ(-1, Pointer("/foo/int").GetWithDefault(d, -1, a).GetInt());
- EXPECT_EQ(-1, Pointer("/foo/int").GetWithDefault(d, -2, a).GetInt());
- EXPECT_EQ(0x87654321, Pointer("/foo/uint").GetWithDefault(d, 0x87654321, a).GetUint());
- EXPECT_EQ(0x87654321, Pointer("/foo/uint").GetWithDefault(d, 0x12345678, a).GetUint());
-
- const int64_t i64 = static_cast<int64_t>(RAPIDJSON_UINT64_C2(0x80000000, 0));
- EXPECT_EQ(i64, Pointer("/foo/int64").GetWithDefault(d, i64, a).GetInt64());
- EXPECT_EQ(i64, Pointer("/foo/int64").GetWithDefault(d, i64 + 1, a).GetInt64());
-
- const uint64_t u64 = RAPIDJSON_UINT64_C2(0xFFFFFFFFF, 0xFFFFFFFFF);
- EXPECT_EQ(u64, Pointer("/foo/uint64").GetWithDefault(d, u64, a).GetUint64());
- EXPECT_EQ(u64, Pointer("/foo/uint64").GetWithDefault(d, u64 - 1, a).GetUint64());
-
- EXPECT_TRUE(Pointer("/foo/true").GetWithDefault(d, true, a).IsTrue());
- EXPECT_TRUE(Pointer("/foo/true").GetWithDefault(d, false, a).IsTrue());
-
- EXPECT_TRUE(Pointer("/foo/false").GetWithDefault(d, false, a).IsFalse());
- EXPECT_TRUE(Pointer("/foo/false").GetWithDefault(d, true, a).IsFalse());
-
- // StringRef version
- EXPECT_STREQ("Hello", Pointer("/foo/hello").GetWithDefault(d, "Hello", a).GetString());
-
- // Copy string version
- {
- char buffer[256];
- strcpy(buffer, "World");
- EXPECT_STREQ("World", Pointer("/foo/world").GetWithDefault(d, buffer, a).GetString());
- memset(buffer, 0, sizeof(buffer));
- }
- EXPECT_STREQ("World", GetValueByPointer(d, "/foo/world")->GetString());
-
-#if RAPIDJSON_HAS_STDSTRING
- EXPECT_STREQ("C++", Pointer("/foo/C++").GetWithDefault(d, std::string("C++"), a).GetString());
-#endif
-}
-
-TEST(Pointer, GetWithDefault_NoAllocator) {
- Document d;
- d.Parse(kJson);
-
- // Value version
- const Value v("qux");
- EXPECT_TRUE(Value("bar") == Pointer("/foo/0").GetWithDefault(d, v));
- EXPECT_TRUE(Value("baz") == Pointer("/foo/1").GetWithDefault(d, v));
- EXPECT_TRUE(Value("qux") == Pointer("/foo/2").GetWithDefault(d, v));
- EXPECT_TRUE(Value("last") == Pointer("/foo/-").GetWithDefault(d, Value("last").Move()));
- EXPECT_STREQ("last", d["foo"][3].GetString());
-
- EXPECT_TRUE(Pointer("/foo/null").GetWithDefault(d, Value().Move()).IsNull());
- EXPECT_TRUE(Pointer("/foo/null").GetWithDefault(d, "x").IsNull());
-
- // Generic version
- EXPECT_EQ(-1, Pointer("/foo/int").GetWithDefault(d, -1).GetInt());
- EXPECT_EQ(-1, Pointer("/foo/int").GetWithDefault(d, -2).GetInt());
- EXPECT_EQ(0x87654321, Pointer("/foo/uint").GetWithDefault(d, 0x87654321).GetUint());
- EXPECT_EQ(0x87654321, Pointer("/foo/uint").GetWithDefault(d, 0x12345678).GetUint());
-
- const int64_t i64 = static_cast<int64_t>(RAPIDJSON_UINT64_C2(0x80000000, 0));
- EXPECT_EQ(i64, Pointer("/foo/int64").GetWithDefault(d, i64).GetInt64());
- EXPECT_EQ(i64, Pointer("/foo/int64").GetWithDefault(d, i64 + 1).GetInt64());
-
- const uint64_t u64 = RAPIDJSON_UINT64_C2(0xFFFFFFFFF, 0xFFFFFFFFF);
- EXPECT_EQ(u64, Pointer("/foo/uint64").GetWithDefault(d, u64).GetUint64());
- EXPECT_EQ(u64, Pointer("/foo/uint64").GetWithDefault(d, u64 - 1).GetUint64());
-
- EXPECT_TRUE(Pointer("/foo/true").GetWithDefault(d, true).IsTrue());
- EXPECT_TRUE(Pointer("/foo/true").GetWithDefault(d, false).IsTrue());
-
- EXPECT_TRUE(Pointer("/foo/false").GetWithDefault(d, false).IsFalse());
- EXPECT_TRUE(Pointer("/foo/false").GetWithDefault(d, true).IsFalse());
-
- // StringRef version
- EXPECT_STREQ("Hello", Pointer("/foo/hello").GetWithDefault(d, "Hello").GetString());
-
- // Copy string version
- {
- char buffer[256];
- strcpy(buffer, "World");
- EXPECT_STREQ("World", Pointer("/foo/world").GetWithDefault(d, buffer).GetString());
- memset(buffer, 0, sizeof(buffer));
- }
- EXPECT_STREQ("World", GetValueByPointer(d, "/foo/world")->GetString());
-
-#if RAPIDJSON_HAS_STDSTRING
- EXPECT_STREQ("C++", Pointer("/foo/C++").GetWithDefault(d, std::string("C++")).GetString());
-#endif
-}
-
-TEST(Pointer, Set) {
- Document d;
- d.Parse(kJson);
- Document::AllocatorType& a = d.GetAllocator();
-
- // Value version
- Pointer("/foo/0").Set(d, Value(123).Move(), a);
- EXPECT_EQ(123, d["foo"][0].GetInt());
-
- Pointer("/foo/-").Set(d, Value(456).Move(), a);
- EXPECT_EQ(456, d["foo"][2].GetInt());
-
- Pointer("/foo/null").Set(d, Value().Move(), a);
- EXPECT_TRUE(GetValueByPointer(d, "/foo/null")->IsNull());
-
- // Const Value version
- const Value foo(d["foo"], a);
- Pointer("/clone").Set(d, foo, a);
- EXPECT_EQ(foo, *GetValueByPointer(d, "/clone"));
-
- // Generic version
- Pointer("/foo/int").Set(d, -1, a);
- EXPECT_EQ(-1, GetValueByPointer(d, "/foo/int")->GetInt());
-
- Pointer("/foo/uint").Set(d, 0x87654321, a);
- EXPECT_EQ(0x87654321, GetValueByPointer(d, "/foo/uint")->GetUint());
-
- const int64_t i64 = static_cast<int64_t>(RAPIDJSON_UINT64_C2(0x80000000, 0));
- Pointer("/foo/int64").Set(d, i64, a);
- EXPECT_EQ(i64, GetValueByPointer(d, "/foo/int64")->GetInt64());
-
- const uint64_t u64 = RAPIDJSON_UINT64_C2(0xFFFFFFFFF, 0xFFFFFFFFF);
- Pointer("/foo/uint64").Set(d, u64, a);
- EXPECT_EQ(u64, GetValueByPointer(d, "/foo/uint64")->GetUint64());
-
- Pointer("/foo/true").Set(d, true, a);
- EXPECT_TRUE(GetValueByPointer(d, "/foo/true")->IsTrue());
-
- Pointer("/foo/false").Set(d, false, a);
- EXPECT_TRUE(GetValueByPointer(d, "/foo/false")->IsFalse());
-
- // StringRef version
- Pointer("/foo/hello").Set(d, "Hello", a);
- EXPECT_STREQ("Hello", GetValueByPointer(d, "/foo/hello")->GetString());
-
- // Copy string version
- {
- char buffer[256];
- strcpy(buffer, "World");
- Pointer("/foo/world").Set(d, buffer, a);
- memset(buffer, 0, sizeof(buffer));
- }
- EXPECT_STREQ("World", GetValueByPointer(d, "/foo/world")->GetString());
-
-#if RAPIDJSON_HAS_STDSTRING
- Pointer("/foo/c++").Set(d, std::string("C++"), a);
- EXPECT_STREQ("C++", GetValueByPointer(d, "/foo/c++")->GetString());
-#endif
-}
-
-TEST(Pointer, Set_NoAllocator) {
- Document d;
- d.Parse(kJson);
-
- // Value version
- Pointer("/foo/0").Set(d, Value(123).Move());
- EXPECT_EQ(123, d["foo"][0].GetInt());
-
- Pointer("/foo/-").Set(d, Value(456).Move());
- EXPECT_EQ(456, d["foo"][2].GetInt());
-
- Pointer("/foo/null").Set(d, Value().Move());
- EXPECT_TRUE(GetValueByPointer(d, "/foo/null")->IsNull());
-
- // Const Value version
- const Value foo(d["foo"], d.GetAllocator());
- Pointer("/clone").Set(d, foo);
- EXPECT_EQ(foo, *GetValueByPointer(d, "/clone"));
-
- // Generic version
- Pointer("/foo/int").Set(d, -1);
- EXPECT_EQ(-1, GetValueByPointer(d, "/foo/int")->GetInt());
-
- Pointer("/foo/uint").Set(d, 0x87654321);
- EXPECT_EQ(0x87654321, GetValueByPointer(d, "/foo/uint")->GetUint());
-
- const int64_t i64 = static_cast<int64_t>(RAPIDJSON_UINT64_C2(0x80000000, 0));
- Pointer("/foo/int64").Set(d, i64);
- EXPECT_EQ(i64, GetValueByPointer(d, "/foo/int64")->GetInt64());
-
- const uint64_t u64 = RAPIDJSON_UINT64_C2(0xFFFFFFFFF, 0xFFFFFFFFF);
- Pointer("/foo/uint64").Set(d, u64);
- EXPECT_EQ(u64, GetValueByPointer(d, "/foo/uint64")->GetUint64());
-
- Pointer("/foo/true").Set(d, true);
- EXPECT_TRUE(GetValueByPointer(d, "/foo/true")->IsTrue());
-
- Pointer("/foo/false").Set(d, false);
- EXPECT_TRUE(GetValueByPointer(d, "/foo/false")->IsFalse());
-
- // StringRef version
- Pointer("/foo/hello").Set(d, "Hello");
- EXPECT_STREQ("Hello", GetValueByPointer(d, "/foo/hello")->GetString());
-
- // Copy string version
- {
- char buffer[256];
- strcpy(buffer, "World");
- Pointer("/foo/world").Set(d, buffer);
- memset(buffer, 0, sizeof(buffer));
- }
- EXPECT_STREQ("World", GetValueByPointer(d, "/foo/world")->GetString());
-
-#if RAPIDJSON_HAS_STDSTRING
- Pointer("/foo/c++").Set(d, std::string("C++"));
- EXPECT_STREQ("C++", GetValueByPointer(d, "/foo/c++")->GetString());
-#endif
-}
-
-TEST(Pointer, Swap) {
- Document d;
- d.Parse(kJson);
- Document::AllocatorType& a = d.GetAllocator();
- Pointer("/foo/0").Swap(d, *Pointer("/foo/1").Get(d), a);
- EXPECT_STREQ("baz", d["foo"][0].GetString());
- EXPECT_STREQ("bar", d["foo"][1].GetString());
-}
-
-TEST(Pointer, Swap_NoAllocator) {
- Document d;
- d.Parse(kJson);
- Pointer("/foo/0").Swap(d, *Pointer("/foo/1").Get(d));
- EXPECT_STREQ("baz", d["foo"][0].GetString());
- EXPECT_STREQ("bar", d["foo"][1].GetString());
-}
-
-TEST(Pointer, Erase) {
- Document d;
- d.Parse(kJson);
-
- EXPECT_FALSE(Pointer("").Erase(d));
- EXPECT_FALSE(Pointer("/nonexist").Erase(d));
- EXPECT_FALSE(Pointer("/nonexist/nonexist").Erase(d));
- EXPECT_FALSE(Pointer("/foo/nonexist").Erase(d));
- EXPECT_FALSE(Pointer("/foo/nonexist/nonexist").Erase(d));
- EXPECT_FALSE(Pointer("/foo/0/nonexist").Erase(d));
- EXPECT_FALSE(Pointer("/foo/0/nonexist/nonexist").Erase(d));
- EXPECT_FALSE(Pointer("/foo/2/nonexist").Erase(d));
- EXPECT_TRUE(Pointer("/foo/0").Erase(d));
- EXPECT_EQ(1u, d["foo"].Size());
- EXPECT_STREQ("baz", d["foo"][0].GetString());
- EXPECT_TRUE(Pointer("/foo/0").Erase(d));
- EXPECT_TRUE(d["foo"].Empty());
- EXPECT_TRUE(Pointer("/foo").Erase(d));
- EXPECT_TRUE(Pointer("/foo").Get(d) == 0);
-
- Pointer("/a/0/b/0").Create(d);
-
- EXPECT_TRUE(Pointer("/a/0/b/0").Get(d) != 0);
- EXPECT_TRUE(Pointer("/a/0/b/0").Erase(d));
- EXPECT_TRUE(Pointer("/a/0/b/0").Get(d) == 0);
-
- EXPECT_TRUE(Pointer("/a/0/b").Get(d) != 0);
- EXPECT_TRUE(Pointer("/a/0/b").Erase(d));
- EXPECT_TRUE(Pointer("/a/0/b").Get(d) == 0);
-
- EXPECT_TRUE(Pointer("/a/0").Get(d) != 0);
- EXPECT_TRUE(Pointer("/a/0").Erase(d));
- EXPECT_TRUE(Pointer("/a/0").Get(d) == 0);
-
- EXPECT_TRUE(Pointer("/a").Get(d) != 0);
- EXPECT_TRUE(Pointer("/a").Erase(d));
- EXPECT_TRUE(Pointer("/a").Get(d) == 0);
-}
-
-TEST(Pointer, CreateValueByPointer) {
- Document d;
- Document::AllocatorType& a = d.GetAllocator();
-
- {
- Value& v = CreateValueByPointer(d, Pointer("/foo/0"), a);
- EXPECT_EQ(&d["foo"][0], &v);
- }
- {
- Value& v = CreateValueByPointer(d, "/foo/1", a);
- EXPECT_EQ(&d["foo"][1], &v);
- }
-}
-
-TEST(Pointer, CreateValueByPointer_NoAllocator) {
- Document d;
-
- {
- Value& v = CreateValueByPointer(d, Pointer("/foo/0"));
- EXPECT_EQ(&d["foo"][0], &v);
- }
- {
- Value& v = CreateValueByPointer(d, "/foo/1");
- EXPECT_EQ(&d["foo"][1], &v);
- }
-}
-
-TEST(Pointer, GetValueByPointer) {
- Document d;
- d.Parse(kJson);
-
- EXPECT_EQ(&d["foo"][0], GetValueByPointer(d, Pointer("/foo/0")));
- EXPECT_EQ(&d["foo"][0], GetValueByPointer(d, "/foo/0"));
-
- size_t unresolvedTokenIndex;
- EXPECT_TRUE(GetValueByPointer(d, "/foo/2", &unresolvedTokenIndex) == 0); // Out of boundary
- EXPECT_EQ(1, unresolvedTokenIndex);
- EXPECT_TRUE(GetValueByPointer(d, "/foo/a", &unresolvedTokenIndex) == 0); // "/foo" is an array, cannot query by "a"
- EXPECT_EQ(1, unresolvedTokenIndex);
- EXPECT_TRUE(GetValueByPointer(d, "/foo/0/0", &unresolvedTokenIndex) == 0); // "/foo/0" is an string, cannot further query
- EXPECT_EQ(2, unresolvedTokenIndex);
- EXPECT_TRUE(GetValueByPointer(d, "/foo/0/a", &unresolvedTokenIndex) == 0); // "/foo/0" is an string, cannot further query
- EXPECT_EQ(2, unresolvedTokenIndex);
-
- // const version
- const Value& v = d;
- EXPECT_EQ(&d["foo"][0], GetValueByPointer(v, Pointer("/foo/0")));
- EXPECT_EQ(&d["foo"][0], GetValueByPointer(v, "/foo/0"));
-
- EXPECT_TRUE(GetValueByPointer(v, "/foo/2", &unresolvedTokenIndex) == 0); // Out of boundary
- EXPECT_EQ(1, unresolvedTokenIndex);
- EXPECT_TRUE(GetValueByPointer(v, "/foo/a", &unresolvedTokenIndex) == 0); // "/foo" is an array, cannot query by "a"
- EXPECT_EQ(1, unresolvedTokenIndex);
- EXPECT_TRUE(GetValueByPointer(v, "/foo/0/0", &unresolvedTokenIndex) == 0); // "/foo/0" is an string, cannot further query
- EXPECT_EQ(2, unresolvedTokenIndex);
- EXPECT_TRUE(GetValueByPointer(v, "/foo/0/a", &unresolvedTokenIndex) == 0); // "/foo/0" is an string, cannot further query
- EXPECT_EQ(2, unresolvedTokenIndex);
-
-}
-
-TEST(Pointer, GetValueByPointerWithDefault_Pointer) {
- Document d;
- d.Parse(kJson);
-
- Document::AllocatorType& a = d.GetAllocator();
- const Value v("qux");
- EXPECT_TRUE(Value("bar") == GetValueByPointerWithDefault(d, Pointer("/foo/0"), v, a));
- EXPECT_TRUE(Value("bar") == GetValueByPointerWithDefault(d, Pointer("/foo/0"), v, a));
- EXPECT_TRUE(Value("baz") == GetValueByPointerWithDefault(d, Pointer("/foo/1"), v, a));
- EXPECT_TRUE(Value("qux") == GetValueByPointerWithDefault(d, Pointer("/foo/2"), v, a));
- EXPECT_TRUE(Value("last") == GetValueByPointerWithDefault(d, Pointer("/foo/-"), Value("last").Move(), a));
- EXPECT_STREQ("last", d["foo"][3].GetString());
-
- EXPECT_TRUE(GetValueByPointerWithDefault(d, Pointer("/foo/null"), Value().Move(), a).IsNull());
- EXPECT_TRUE(GetValueByPointerWithDefault(d, Pointer("/foo/null"), "x", a).IsNull());
-
- // Generic version
- EXPECT_EQ(-1, GetValueByPointerWithDefault(d, Pointer("/foo/int"), -1, a).GetInt());
- EXPECT_EQ(-1, GetValueByPointerWithDefault(d, Pointer("/foo/int"), -2, a).GetInt());
- EXPECT_EQ(0x87654321, GetValueByPointerWithDefault(d, Pointer("/foo/uint"), 0x87654321, a).GetUint());
- EXPECT_EQ(0x87654321, GetValueByPointerWithDefault(d, Pointer("/foo/uint"), 0x12345678, a).GetUint());
-
- const int64_t i64 = static_cast<int64_t>(RAPIDJSON_UINT64_C2(0x80000000, 0));
- EXPECT_EQ(i64, GetValueByPointerWithDefault(d, Pointer("/foo/int64"), i64, a).GetInt64());
- EXPECT_EQ(i64, GetValueByPointerWithDefault(d, Pointer("/foo/int64"), i64 + 1, a).GetInt64());
-
- const uint64_t u64 = RAPIDJSON_UINT64_C2(0xFFFFFFFFF, 0xFFFFFFFFF);
- EXPECT_EQ(u64, GetValueByPointerWithDefault(d, Pointer("/foo/uint64"), u64, a).GetUint64());
- EXPECT_EQ(u64, GetValueByPointerWithDefault(d, Pointer("/foo/uint64"), u64 - 1, a).GetUint64());
-
- EXPECT_TRUE(GetValueByPointerWithDefault(d, Pointer("/foo/true"), true, a).IsTrue());
- EXPECT_TRUE(GetValueByPointerWithDefault(d, Pointer("/foo/true"), false, a).IsTrue());
-
- EXPECT_TRUE(GetValueByPointerWithDefault(d, Pointer("/foo/false"), false, a).IsFalse());
- EXPECT_TRUE(GetValueByPointerWithDefault(d, Pointer("/foo/false"), true, a).IsFalse());
-
- // StringRef version
- EXPECT_STREQ("Hello", GetValueByPointerWithDefault(d, Pointer("/foo/hello"), "Hello", a).GetString());
-
- // Copy string version
- {
- char buffer[256];
- strcpy(buffer, "World");
- EXPECT_STREQ("World", GetValueByPointerWithDefault(d, Pointer("/foo/world"), buffer, a).GetString());
- memset(buffer, 0, sizeof(buffer));
- }
- EXPECT_STREQ("World", GetValueByPointer(d, Pointer("/foo/world"))->GetString());
-
-#if RAPIDJSON_HAS_STDSTRING
- EXPECT_STREQ("C++", GetValueByPointerWithDefault(d, Pointer("/foo/C++"), std::string("C++"), a).GetString());
-#endif
-}
-
-TEST(Pointer, GetValueByPointerWithDefault_String) {
- Document d;
- d.Parse(kJson);
-
- Document::AllocatorType& a = d.GetAllocator();
- const Value v("qux");
- EXPECT_TRUE(Value("bar") == GetValueByPointerWithDefault(d, "/foo/0", v, a));
- EXPECT_TRUE(Value("bar") == GetValueByPointerWithDefault(d, "/foo/0", v, a));
- EXPECT_TRUE(Value("baz") == GetValueByPointerWithDefault(d, "/foo/1", v, a));
- EXPECT_TRUE(Value("qux") == GetValueByPointerWithDefault(d, "/foo/2", v, a));
- EXPECT_TRUE(Value("last") == GetValueByPointerWithDefault(d, "/foo/-", Value("last").Move(), a));
- EXPECT_STREQ("last", d["foo"][3].GetString());
-
- EXPECT_TRUE(GetValueByPointerWithDefault(d, "/foo/null", Value().Move(), a).IsNull());
- EXPECT_TRUE(GetValueByPointerWithDefault(d, "/foo/null", "x", a).IsNull());
-
- // Generic version
- EXPECT_EQ(-1, GetValueByPointerWithDefault(d, "/foo/int", -1, a).GetInt());
- EXPECT_EQ(-1, GetValueByPointerWithDefault(d, "/foo/int", -2, a).GetInt());
- EXPECT_EQ(0x87654321, GetValueByPointerWithDefault(d, "/foo/uint", 0x87654321, a).GetUint());
- EXPECT_EQ(0x87654321, GetValueByPointerWithDefault(d, "/foo/uint", 0x12345678, a).GetUint());
-
- const int64_t i64 = static_cast<int64_t>(RAPIDJSON_UINT64_C2(0x80000000, 0));
- EXPECT_EQ(i64, GetValueByPointerWithDefault(d, "/foo/int64", i64, a).GetInt64());
- EXPECT_EQ(i64, GetValueByPointerWithDefault(d, "/foo/int64", i64 + 1, a).GetInt64());
-
- const uint64_t u64 = RAPIDJSON_UINT64_C2(0xFFFFFFFFF, 0xFFFFFFFFF);
- EXPECT_EQ(u64, GetValueByPointerWithDefault(d, "/foo/uint64", u64, a).GetUint64());
- EXPECT_EQ(u64, GetValueByPointerWithDefault(d, "/foo/uint64", u64 - 1, a).GetUint64());
-
- EXPECT_TRUE(GetValueByPointerWithDefault(d, "/foo/true", true, a).IsTrue());
- EXPECT_TRUE(GetValueByPointerWithDefault(d, "/foo/true", false, a).IsTrue());
-
- EXPECT_TRUE(GetValueByPointerWithDefault(d, "/foo/false", false, a).IsFalse());
- EXPECT_TRUE(GetValueByPointerWithDefault(d, "/foo/false", true, a).IsFalse());
-
- // StringRef version
- EXPECT_STREQ("Hello", GetValueByPointerWithDefault(d, "/foo/hello", "Hello", a).GetString());
-
- // Copy string version
- {
- char buffer[256];
- strcpy(buffer, "World");
- EXPECT_STREQ("World", GetValueByPointerWithDefault(d, "/foo/world", buffer, a).GetString());
- memset(buffer, 0, sizeof(buffer));
- }
- EXPECT_STREQ("World", GetValueByPointer(d, "/foo/world")->GetString());
-
-#if RAPIDJSON_HAS_STDSTRING
- EXPECT_STREQ("C++", GetValueByPointerWithDefault(d, "/foo/C++", std::string("C++"), a).GetString());
-#endif
-}
-
-TEST(Pointer, GetValueByPointerWithDefault_Pointer_NoAllocator) {
- Document d;
- d.Parse(kJson);
-
- const Value v("qux");
- EXPECT_TRUE(Value("bar") == GetValueByPointerWithDefault(d, Pointer("/foo/0"), v));
- EXPECT_TRUE(Value("bar") == GetValueByPointerWithDefault(d, Pointer("/foo/0"), v));
- EXPECT_TRUE(Value("baz") == GetValueByPointerWithDefault(d, Pointer("/foo/1"), v));
- EXPECT_TRUE(Value("qux") == GetValueByPointerWithDefault(d, Pointer("/foo/2"), v));
- EXPECT_TRUE(Value("last") == GetValueByPointerWithDefault(d, Pointer("/foo/-"), Value("last").Move()));
- EXPECT_STREQ("last", d["foo"][3].GetString());
-
- EXPECT_TRUE(GetValueByPointerWithDefault(d, Pointer("/foo/null"), Value().Move()).IsNull());
- EXPECT_TRUE(GetValueByPointerWithDefault(d, Pointer("/foo/null"), "x").IsNull());
-
- // Generic version
- EXPECT_EQ(-1, GetValueByPointerWithDefault(d, Pointer("/foo/int"), -1).GetInt());
- EXPECT_EQ(-1, GetValueByPointerWithDefault(d, Pointer("/foo/int"), -2).GetInt());
- EXPECT_EQ(0x87654321, GetValueByPointerWithDefault(d, Pointer("/foo/uint"), 0x87654321).GetUint());
- EXPECT_EQ(0x87654321, GetValueByPointerWithDefault(d, Pointer("/foo/uint"), 0x12345678).GetUint());
-
- const int64_t i64 = static_cast<int64_t>(RAPIDJSON_UINT64_C2(0x80000000, 0));
- EXPECT_EQ(i64, GetValueByPointerWithDefault(d, Pointer("/foo/int64"), i64).GetInt64());
- EXPECT_EQ(i64, GetValueByPointerWithDefault(d, Pointer("/foo/int64"), i64 + 1).GetInt64());
-
- const uint64_t u64 = RAPIDJSON_UINT64_C2(0xFFFFFFFFF, 0xFFFFFFFFF);
- EXPECT_EQ(u64, GetValueByPointerWithDefault(d, Pointer("/foo/uint64"), u64).GetUint64());
- EXPECT_EQ(u64, GetValueByPointerWithDefault(d, Pointer("/foo/uint64"), u64 - 1).GetUint64());
-
- EXPECT_TRUE(GetValueByPointerWithDefault(d, Pointer("/foo/true"), true).IsTrue());
- EXPECT_TRUE(GetValueByPointerWithDefault(d, Pointer("/foo/true"), false).IsTrue());
-
- EXPECT_TRUE(GetValueByPointerWithDefault(d, Pointer("/foo/false"), false).IsFalse());
- EXPECT_TRUE(GetValueByPointerWithDefault(d, Pointer("/foo/false"), true).IsFalse());
-
- // StringRef version
- EXPECT_STREQ("Hello", GetValueByPointerWithDefault(d, Pointer("/foo/hello"), "Hello").GetString());
-
- // Copy string version
- {
- char buffer[256];
- strcpy(buffer, "World");
- EXPECT_STREQ("World", GetValueByPointerWithDefault(d, Pointer("/foo/world"), buffer).GetString());
- memset(buffer, 0, sizeof(buffer));
- }
- EXPECT_STREQ("World", GetValueByPointer(d, Pointer("/foo/world"))->GetString());
-
-#if RAPIDJSON_HAS_STDSTRING
- EXPECT_STREQ("C++", GetValueByPointerWithDefault(d, Pointer("/foo/C++"), std::string("C++")).GetString());
-#endif
-}
-
-TEST(Pointer, GetValueByPointerWithDefault_String_NoAllocator) {
- Document d;
- d.Parse(kJson);
-
- const Value v("qux");
- EXPECT_TRUE(Value("bar") == GetValueByPointerWithDefault(d, "/foo/0", v));
- EXPECT_TRUE(Value("bar") == GetValueByPointerWithDefault(d, "/foo/0", v));
- EXPECT_TRUE(Value("baz") == GetValueByPointerWithDefault(d, "/foo/1", v));
- EXPECT_TRUE(Value("qux") == GetValueByPointerWithDefault(d, "/foo/2", v));
- EXPECT_TRUE(Value("last") == GetValueByPointerWithDefault(d, "/foo/-", Value("last").Move()));
- EXPECT_STREQ("last", d["foo"][3].GetString());
-
- EXPECT_TRUE(GetValueByPointerWithDefault(d, "/foo/null", Value().Move()).IsNull());
- EXPECT_TRUE(GetValueByPointerWithDefault(d, "/foo/null", "x").IsNull());
-
- // Generic version
- EXPECT_EQ(-1, GetValueByPointerWithDefault(d, "/foo/int", -1).GetInt());
- EXPECT_EQ(-1, GetValueByPointerWithDefault(d, "/foo/int", -2).GetInt());
- EXPECT_EQ(0x87654321, GetValueByPointerWithDefault(d, "/foo/uint", 0x87654321).GetUint());
- EXPECT_EQ(0x87654321, GetValueByPointerWithDefault(d, "/foo/uint", 0x12345678).GetUint());
-
- const int64_t i64 = static_cast<int64_t>(RAPIDJSON_UINT64_C2(0x80000000, 0));
- EXPECT_EQ(i64, GetValueByPointerWithDefault(d, "/foo/int64", i64).GetInt64());
- EXPECT_EQ(i64, GetValueByPointerWithDefault(d, "/foo/int64", i64 + 1).GetInt64());
-
- const uint64_t u64 = RAPIDJSON_UINT64_C2(0xFFFFFFFFF, 0xFFFFFFFFF);
- EXPECT_EQ(u64, GetValueByPointerWithDefault(d, "/foo/uint64", u64).GetUint64());
- EXPECT_EQ(u64, GetValueByPointerWithDefault(d, "/foo/uint64", u64 - 1).GetUint64());
-
- EXPECT_TRUE(GetValueByPointerWithDefault(d, "/foo/true", true).IsTrue());
- EXPECT_TRUE(GetValueByPointerWithDefault(d, "/foo/true", false).IsTrue());
-
- EXPECT_TRUE(GetValueByPointerWithDefault(d, "/foo/false", false).IsFalse());
- EXPECT_TRUE(GetValueByPointerWithDefault(d, "/foo/false", true).IsFalse());
-
- // StringRef version
- EXPECT_STREQ("Hello", GetValueByPointerWithDefault(d, "/foo/hello", "Hello").GetString());
-
- // Copy string version
- {
- char buffer[256];
- strcpy(buffer, "World");
- EXPECT_STREQ("World", GetValueByPointerWithDefault(d, "/foo/world", buffer).GetString());
- memset(buffer, 0, sizeof(buffer));
- }
- EXPECT_STREQ("World", GetValueByPointer(d, "/foo/world")->GetString());
-
-#if RAPIDJSON_HAS_STDSTRING
- EXPECT_STREQ("C++", GetValueByPointerWithDefault(d, Pointer("/foo/C++"), std::string("C++")).GetString());
-#endif
-}
-
-TEST(Pointer, SetValueByPointer_Pointer) {
- Document d;
- d.Parse(kJson);
- Document::AllocatorType& a = d.GetAllocator();
-
- // Value version
- SetValueByPointer(d, Pointer("/foo/0"), Value(123).Move(), a);
- EXPECT_EQ(123, d["foo"][0].GetInt());
-
- SetValueByPointer(d, Pointer("/foo/null"), Value().Move(), a);
- EXPECT_TRUE(GetValueByPointer(d, "/foo/null")->IsNull());
-
- // Const Value version
- const Value foo(d["foo"], d.GetAllocator());
- SetValueByPointer(d, Pointer("/clone"), foo, a);
- EXPECT_EQ(foo, *GetValueByPointer(d, "/clone"));
-
- // Generic version
- SetValueByPointer(d, Pointer("/foo/int"), -1, a);
- EXPECT_EQ(-1, GetValueByPointer(d, "/foo/int")->GetInt());
-
- SetValueByPointer(d, Pointer("/foo/uint"), 0x87654321, a);
- EXPECT_EQ(0x87654321, GetValueByPointer(d, "/foo/uint")->GetUint());
-
- const int64_t i64 = static_cast<int64_t>(RAPIDJSON_UINT64_C2(0x80000000, 0));
- SetValueByPointer(d, Pointer("/foo/int64"), i64, a);
- EXPECT_EQ(i64, GetValueByPointer(d, "/foo/int64")->GetInt64());
-
- const uint64_t u64 = RAPIDJSON_UINT64_C2(0xFFFFFFFFF, 0xFFFFFFFFF);
- SetValueByPointer(d, Pointer("/foo/uint64"), u64, a);
- EXPECT_EQ(u64, GetValueByPointer(d, "/foo/uint64")->GetUint64());
-
- SetValueByPointer(d, Pointer("/foo/true"), true, a);
- EXPECT_TRUE(GetValueByPointer(d, "/foo/true")->IsTrue());
-
- SetValueByPointer(d, Pointer("/foo/false"), false, a);
- EXPECT_TRUE(GetValueByPointer(d, "/foo/false")->IsFalse());
-
- // StringRef version
- SetValueByPointer(d, Pointer("/foo/hello"), "Hello", a);
- EXPECT_STREQ("Hello", GetValueByPointer(d, "/foo/hello")->GetString());
-
- // Copy string version
- {
- char buffer[256];
- strcpy(buffer, "World");
- SetValueByPointer(d, Pointer("/foo/world"), buffer, a);
- memset(buffer, 0, sizeof(buffer));
- }
- EXPECT_STREQ("World", GetValueByPointer(d, "/foo/world")->GetString());
-
-#if RAPIDJSON_HAS_STDSTRING
- SetValueByPointer(d, Pointer("/foo/c++"), std::string("C++"), a);
- EXPECT_STREQ("C++", GetValueByPointer(d, "/foo/c++")->GetString());
-#endif
-}
-
-TEST(Pointer, SetValueByPointer_String) {
- Document d;
- d.Parse(kJson);
- Document::AllocatorType& a = d.GetAllocator();
-
- // Value version
- SetValueByPointer(d, "/foo/0", Value(123).Move(), a);
- EXPECT_EQ(123, d["foo"][0].GetInt());
-
- SetValueByPointer(d, "/foo/null", Value().Move(), a);
- EXPECT_TRUE(GetValueByPointer(d, "/foo/null")->IsNull());
-
- // Const Value version
- const Value foo(d["foo"], d.GetAllocator());
- SetValueByPointer(d, "/clone", foo, a);
- EXPECT_EQ(foo, *GetValueByPointer(d, "/clone"));
-
- // Generic version
- SetValueByPointer(d, "/foo/int", -1, a);
- EXPECT_EQ(-1, GetValueByPointer(d, "/foo/int")->GetInt());
-
- SetValueByPointer(d, "/foo/uint", 0x87654321, a);
- EXPECT_EQ(0x87654321, GetValueByPointer(d, "/foo/uint")->GetUint());
-
- const int64_t i64 = static_cast<int64_t>(RAPIDJSON_UINT64_C2(0x80000000, 0));
- SetValueByPointer(d, "/foo/int64", i64, a);
- EXPECT_EQ(i64, GetValueByPointer(d, "/foo/int64")->GetInt64());
-
- const uint64_t u64 = RAPIDJSON_UINT64_C2(0xFFFFFFFFF, 0xFFFFFFFFF);
- SetValueByPointer(d, "/foo/uint64", u64, a);
- EXPECT_EQ(u64, GetValueByPointer(d, "/foo/uint64")->GetUint64());
-
- SetValueByPointer(d, "/foo/true", true, a);
- EXPECT_TRUE(GetValueByPointer(d, "/foo/true")->IsTrue());
-
- SetValueByPointer(d, "/foo/false", false, a);
- EXPECT_TRUE(GetValueByPointer(d, "/foo/false")->IsFalse());
-
- // StringRef version
- SetValueByPointer(d, "/foo/hello", "Hello", a);
- EXPECT_STREQ("Hello", GetValueByPointer(d, "/foo/hello")->GetString());
-
- // Copy string version
- {
- char buffer[256];
- strcpy(buffer, "World");
- SetValueByPointer(d, "/foo/world", buffer, a);
- memset(buffer, 0, sizeof(buffer));
- }
- EXPECT_STREQ("World", GetValueByPointer(d, "/foo/world")->GetString());
-
-#if RAPIDJSON_HAS_STDSTRING
- SetValueByPointer(d, "/foo/c++", std::string("C++"), a);
- EXPECT_STREQ("C++", GetValueByPointer(d, "/foo/c++")->GetString());
-#endif
-}
-
-TEST(Pointer, SetValueByPointer_Pointer_NoAllocator) {
- Document d;
- d.Parse(kJson);
-
- // Value version
- SetValueByPointer(d, Pointer("/foo/0"), Value(123).Move());
- EXPECT_EQ(123, d["foo"][0].GetInt());
-
- SetValueByPointer(d, Pointer("/foo/null"), Value().Move());
- EXPECT_TRUE(GetValueByPointer(d, "/foo/null")->IsNull());
-
- // Const Value version
- const Value foo(d["foo"], d.GetAllocator());
- SetValueByPointer(d, Pointer("/clone"), foo);
- EXPECT_EQ(foo, *GetValueByPointer(d, "/clone"));
-
- // Generic version
- SetValueByPointer(d, Pointer("/foo/int"), -1);
- EXPECT_EQ(-1, GetValueByPointer(d, "/foo/int")->GetInt());
-
- SetValueByPointer(d, Pointer("/foo/uint"), 0x87654321);
- EXPECT_EQ(0x87654321, GetValueByPointer(d, "/foo/uint")->GetUint());
-
- const int64_t i64 = static_cast<int64_t>(RAPIDJSON_UINT64_C2(0x80000000, 0));
- SetValueByPointer(d, Pointer("/foo/int64"), i64);
- EXPECT_EQ(i64, GetValueByPointer(d, "/foo/int64")->GetInt64());
-
- const uint64_t u64 = RAPIDJSON_UINT64_C2(0xFFFFFFFFF, 0xFFFFFFFFF);
- SetValueByPointer(d, Pointer("/foo/uint64"), u64);
- EXPECT_EQ(u64, GetValueByPointer(d, "/foo/uint64")->GetUint64());
-
- SetValueByPointer(d, Pointer("/foo/true"), true);
- EXPECT_TRUE(GetValueByPointer(d, "/foo/true")->IsTrue());
-
- SetValueByPointer(d, Pointer("/foo/false"), false);
- EXPECT_TRUE(GetValueByPointer(d, "/foo/false")->IsFalse());
-
- // StringRef version
- SetValueByPointer(d, Pointer("/foo/hello"), "Hello");
- EXPECT_STREQ("Hello", GetValueByPointer(d, "/foo/hello")->GetString());
-
- // Copy string version
- {
- char buffer[256];
- strcpy(buffer, "World");
- SetValueByPointer(d, Pointer("/foo/world"), buffer);
- memset(buffer, 0, sizeof(buffer));
- }
- EXPECT_STREQ("World", GetValueByPointer(d, "/foo/world")->GetString());
-
-#if RAPIDJSON_HAS_STDSTRING
- SetValueByPointer(d, Pointer("/foo/c++"), std::string("C++"));
- EXPECT_STREQ("C++", GetValueByPointer(d, "/foo/c++")->GetString());
-#endif
-}
-
-TEST(Pointer, SetValueByPointer_String_NoAllocator) {
- Document d;
- d.Parse(kJson);
-
- // Value version
- SetValueByPointer(d, "/foo/0", Value(123).Move());
- EXPECT_EQ(123, d["foo"][0].GetInt());
-
- SetValueByPointer(d, "/foo/null", Value().Move());
- EXPECT_TRUE(GetValueByPointer(d, "/foo/null")->IsNull());
-
- // Const Value version
- const Value foo(d["foo"], d.GetAllocator());
- SetValueByPointer(d, "/clone", foo);
- EXPECT_EQ(foo, *GetValueByPointer(d, "/clone"));
-
- // Generic version
- SetValueByPointer(d, "/foo/int", -1);
- EXPECT_EQ(-1, GetValueByPointer(d, "/foo/int")->GetInt());
-
- SetValueByPointer(d, "/foo/uint", 0x87654321);
- EXPECT_EQ(0x87654321, GetValueByPointer(d, "/foo/uint")->GetUint());
-
- const int64_t i64 = static_cast<int64_t>(RAPIDJSON_UINT64_C2(0x80000000, 0));
- SetValueByPointer(d, "/foo/int64", i64);
- EXPECT_EQ(i64, GetValueByPointer(d, "/foo/int64")->GetInt64());
-
- const uint64_t u64 = RAPIDJSON_UINT64_C2(0xFFFFFFFFF, 0xFFFFFFFFF);
- SetValueByPointer(d, "/foo/uint64", u64);
- EXPECT_EQ(u64, GetValueByPointer(d, "/foo/uint64")->GetUint64());
-
- SetValueByPointer(d, "/foo/true", true);
- EXPECT_TRUE(GetValueByPointer(d, "/foo/true")->IsTrue());
-
- SetValueByPointer(d, "/foo/false", false);
- EXPECT_TRUE(GetValueByPointer(d, "/foo/false")->IsFalse());
-
- // StringRef version
- SetValueByPointer(d, "/foo/hello", "Hello");
- EXPECT_STREQ("Hello", GetValueByPointer(d, "/foo/hello")->GetString());
-
- // Copy string version
- {
- char buffer[256];
- strcpy(buffer, "World");
- SetValueByPointer(d, "/foo/world", buffer);
- memset(buffer, 0, sizeof(buffer));
- }
- EXPECT_STREQ("World", GetValueByPointer(d, "/foo/world")->GetString());
-
-#if RAPIDJSON_HAS_STDSTRING
- SetValueByPointer(d, "/foo/c++", std::string("C++"));
- EXPECT_STREQ("C++", GetValueByPointer(d, "/foo/c++")->GetString());
-#endif
-}
-
-TEST(Pointer, SwapValueByPointer) {
- Document d;
- d.Parse(kJson);
- Document::AllocatorType& a = d.GetAllocator();
- SwapValueByPointer(d, Pointer("/foo/0"), *GetValueByPointer(d, "/foo/1"), a);
- EXPECT_STREQ("baz", d["foo"][0].GetString());
- EXPECT_STREQ("bar", d["foo"][1].GetString());
-
- SwapValueByPointer(d, "/foo/0", *GetValueByPointer(d, "/foo/1"), a);
- EXPECT_STREQ("bar", d["foo"][0].GetString());
- EXPECT_STREQ("baz", d["foo"][1].GetString());
-}
-
-TEST(Pointer, SwapValueByPointer_NoAllocator) {
- Document d;
- d.Parse(kJson);
- SwapValueByPointer(d, Pointer("/foo/0"), *GetValueByPointer(d, "/foo/1"));
- EXPECT_STREQ("baz", d["foo"][0].GetString());
- EXPECT_STREQ("bar", d["foo"][1].GetString());
-
- SwapValueByPointer(d, "/foo/0", *GetValueByPointer(d, "/foo/1"));
- EXPECT_STREQ("bar", d["foo"][0].GetString());
- EXPECT_STREQ("baz", d["foo"][1].GetString());
-}
-
-TEST(Pointer, EraseValueByPointer_Pointer) {
- Document d;
- d.Parse(kJson);
-
- EXPECT_FALSE(EraseValueByPointer(d, Pointer("")));
- EXPECT_FALSE(Pointer("/foo/nonexist").Erase(d));
- EXPECT_TRUE(EraseValueByPointer(d, Pointer("/foo/0")));
- EXPECT_EQ(1u, d["foo"].Size());
- EXPECT_STREQ("baz", d["foo"][0].GetString());
- EXPECT_TRUE(EraseValueByPointer(d, Pointer("/foo/0")));
- EXPECT_TRUE(d["foo"].Empty());
- EXPECT_TRUE(EraseValueByPointer(d, Pointer("/foo")));
- EXPECT_TRUE(Pointer("/foo").Get(d) == 0);
-}
-
-TEST(Pointer, EraseValueByPointer_String) {
- Document d;
- d.Parse(kJson);
-
- EXPECT_FALSE(EraseValueByPointer(d, ""));
- EXPECT_FALSE(Pointer("/foo/nonexist").Erase(d));
- EXPECT_TRUE(EraseValueByPointer(d, "/foo/0"));
- EXPECT_EQ(1u, d["foo"].Size());
- EXPECT_STREQ("baz", d["foo"][0].GetString());
- EXPECT_TRUE(EraseValueByPointer(d, "/foo/0"));
- EXPECT_TRUE(d["foo"].Empty());
- EXPECT_TRUE(EraseValueByPointer(d, "/foo"));
- EXPECT_TRUE(Pointer("/foo").Get(d) == 0);
-}
-
-TEST(Pointer, Ambiguity) {
- {
- Document d;
- d.Parse("{\"0\" : [123]}");
- EXPECT_EQ(123, Pointer("/0/0").Get(d)->GetInt());
- Pointer("/0/a").Set(d, 456); // Change array [123] to object {456}
- EXPECT_EQ(456, Pointer("/0/a").Get(d)->GetInt());
- }
-
- {
- Document d;
- EXPECT_FALSE(d.Parse("[{\"0\": 123}]").HasParseError());
- EXPECT_EQ(123, Pointer("/0/0").Get(d)->GetInt());
- Pointer("/0/1").Set(d, 456); // 1 is treated as "1" to index object
- EXPECT_EQ(123, Pointer("/0/0").Get(d)->GetInt());
- EXPECT_EQ(456, Pointer("/0/1").Get(d)->GetInt());
- }
-}
-
-// https://github.com/miloyip/rapidjson/issues/483
-namespace myjson {
-
-class MyAllocator
-{
-public:
- static const bool kNeedFree = true;
- void * Malloc(size_t _size) { return malloc(_size); }
- void * Realloc(void *_org_p, size_t _org_size, size_t _new_size) { (void)_org_size; return realloc(_org_p, _new_size); }
- static void Free(void *_p) { return free(_p); }
-};
-
-typedef rapidjson::GenericDocument<
- rapidjson::UTF8<>,
- rapidjson::MemoryPoolAllocator< MyAllocator >,
- MyAllocator
- > Document;
-
-typedef rapidjson::GenericPointer<
- ::myjson::Document::ValueType,
- MyAllocator
- > Pointer;
-
-typedef ::myjson::Document::ValueType Value;
-
-}
-
-TEST(Pointer, Issue483) {
- std::string mystr, path;
- myjson::Document document;
- myjson::Value value(rapidjson::kStringType);
- value.SetString(mystr.c_str(), static_cast<SizeType>(mystr.length()), document.GetAllocator());
- myjson::Pointer(path.c_str()).Set(document, value, document.GetAllocator());
-}
diff --git a/3rdparty/rapidjson/test/unittest/prettywritertest.cpp b/3rdparty/rapidjson/test/unittest/prettywritertest.cpp
deleted file mode 100644
index e05d710f8cb..00000000000
--- a/3rdparty/rapidjson/test/unittest/prettywritertest.cpp
+++ /dev/null
@@ -1,180 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 "unittest.h"
-#include "rapidjson/reader.h"
-#include "rapidjson/prettywriter.h"
-#include "rapidjson/stringbuffer.h"
-#include "rapidjson/filewritestream.h"
-
-using namespace rapidjson;
-
-static const char kJson[] = "{\"hello\":\"world\",\"t\":true,\"f\":false,\"n\":null,\"i\":123,\"pi\":3.1416,\"a\":[1,2,3,-1],\"u64\":1234567890123456789,\"i64\":-1234567890123456789}";
-static const char kPrettyJson[] =
-"{\n"
-" \"hello\": \"world\",\n"
-" \"t\": true,\n"
-" \"f\": false,\n"
-" \"n\": null,\n"
-" \"i\": 123,\n"
-" \"pi\": 3.1416,\n"
-" \"a\": [\n"
-" 1,\n"
-" 2,\n"
-" 3,\n"
-" -1\n"
-" ],\n"
-" \"u64\": 1234567890123456789,\n"
-" \"i64\": -1234567890123456789\n"
-"}";
-
-TEST(PrettyWriter, Basic) {
- StringBuffer buffer;
- PrettyWriter<StringBuffer> writer(buffer);
- Reader reader;
- StringStream s(kJson);
- reader.Parse(s, writer);
- EXPECT_STREQ(kPrettyJson, buffer.GetString());
-}
-
-TEST(PrettyWriter, SetIndent) {
- StringBuffer buffer;
- PrettyWriter<StringBuffer> writer(buffer);
- writer.SetIndent('\t', 1);
- Reader reader;
- StringStream s(kJson);
- reader.Parse(s, writer);
- EXPECT_STREQ(
- "{\n"
- "\t\"hello\": \"world\",\n"
- "\t\"t\": true,\n"
- "\t\"f\": false,\n"
- "\t\"n\": null,\n"
- "\t\"i\": 123,\n"
- "\t\"pi\": 3.1416,\n"
- "\t\"a\": [\n"
- "\t\t1,\n"
- "\t\t2,\n"
- "\t\t3,\n"
- "\t\t-1\n"
- "\t],\n"
- "\t\"u64\": 1234567890123456789,\n"
- "\t\"i64\": -1234567890123456789\n"
- "}",
- buffer.GetString());
-}
-
-TEST(PrettyWriter, String) {
- StringBuffer buffer;
- PrettyWriter<StringBuffer> writer(buffer);
- EXPECT_TRUE(writer.StartArray());
- EXPECT_TRUE(writer.String("Hello\n"));
- EXPECT_TRUE(writer.EndArray());
- EXPECT_STREQ("[\n \"Hello\\n\"\n]", buffer.GetString());
-}
-
-#if RAPIDJSON_HAS_STDSTRING
-TEST(PrettyWriter, String_STDSTRING) {
- StringBuffer buffer;
- PrettyWriter<StringBuffer> writer(buffer);
- EXPECT_TRUE(writer.StartArray());
- EXPECT_TRUE(writer.String(std::string("Hello\n")));
- EXPECT_TRUE(writer.EndArray());
- EXPECT_STREQ("[\n \"Hello\\n\"\n]", buffer.GetString());
-}
-#endif
-
-#include <sstream>
-
-class OStreamWrapper {
-public:
- typedef char Ch;
-
- OStreamWrapper(std::ostream& os) : os_(os) {}
-
- Ch Peek() const { assert(false); return '\0'; }
- Ch Take() { assert(false); return '\0'; }
- size_t Tell() const { return 0; }
-
- Ch* PutBegin() { assert(false); return 0; }
- void Put(Ch c) { os_.put(c); }
- void Flush() { os_.flush(); }
- size_t PutEnd(Ch*) { assert(false); return 0; }
-
-private:
- OStreamWrapper(const OStreamWrapper&);
- OStreamWrapper& operator=(const OStreamWrapper&);
-
- std::ostream& os_;
-};
-
-// For covering PutN() generic version
-TEST(PrettyWriter, OStreamWrapper) {
- StringStream s(kJson);
-
- std::stringstream ss;
- OStreamWrapper os(ss);
-
- PrettyWriter<OStreamWrapper> writer(os);
-
- Reader reader;
- reader.Parse(s, writer);
-
- std::string actual = ss.str();
- EXPECT_STREQ(kPrettyJson, actual.c_str());
-}
-
-// For covering FileWriteStream::PutN()
-TEST(PrettyWriter, FileWriteStream) {
- char filename[L_tmpnam];
- FILE* fp = TempFile(filename);
- char buffer[16];
- FileWriteStream os(fp, buffer, sizeof(buffer));
- PrettyWriter<FileWriteStream> writer(os);
- Reader reader;
- StringStream s(kJson);
- reader.Parse(s, writer);
- fclose(fp);
-
- fp = fopen(filename, "rb");
- fseek(fp, 0, SEEK_END);
- size_t size = static_cast<size_t>(ftell(fp));
- fseek(fp, 0, SEEK_SET);
- char* json = static_cast<char*>(malloc(size + 1));
- size_t readLength = fread(json, 1, size, fp);
- json[readLength] = '\0';
- fclose(fp);
- remove(filename);
- EXPECT_STREQ(kPrettyJson, json);
- free(json);
-}
-
-TEST(PrettyWriter, RawValue) {
- StringBuffer buffer;
- PrettyWriter<StringBuffer> writer(buffer);
- writer.StartObject();
- writer.Key("a");
- writer.Int(1);
- writer.Key("raw");
- const char json[] = "[\"Hello\\nWorld\", 123.456]";
- writer.RawValue(json, strlen(json), kArrayType);
- writer.EndObject();
- EXPECT_TRUE(writer.IsComplete());
- EXPECT_STREQ(
- "{\n"
- " \"a\": 1,\n"
- " \"raw\": [\"Hello\\nWorld\", 123.456]\n" // no indentation within raw value
- "}",
- buffer.GetString());
-}
diff --git a/3rdparty/rapidjson/test/unittest/readertest.cpp b/3rdparty/rapidjson/test/unittest/readertest.cpp
deleted file mode 100644
index a07e59a6c9f..00000000000
--- a/3rdparty/rapidjson/test/unittest/readertest.cpp
+++ /dev/null
@@ -1,1517 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 "unittest.h"
-
-#include "rapidjson/reader.h"
-#include "rapidjson/internal/dtoa.h"
-#include "rapidjson/internal/itoa.h"
-#include "rapidjson/memorystream.h"
-
-using namespace rapidjson;
-
-#ifdef __GNUC__
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(effc++)
-RAPIDJSON_DIAG_OFF(float-equal)
-RAPIDJSON_DIAG_OFF(missing-noreturn)
-#endif
-
-#ifdef __clang__
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(variadic-macros)
-RAPIDJSON_DIAG_OFF(c++98-compat-pedantic)
-#endif
-
-template<bool expect>
-struct ParseBoolHandler : BaseReaderHandler<UTF8<>, ParseBoolHandler<expect> > {
- ParseBoolHandler() : step_(0) {}
- bool Default() { ADD_FAILURE(); return false; }
- // gcc 4.8.x generates warning in EXPECT_EQ(bool, bool) on this gtest version.
- // Workaround with EXPECT_TRUE().
- bool Bool(bool b) { /*EXPECT_EQ(expect, b); */EXPECT_TRUE(expect == b); ++step_; return true; }
-
- unsigned step_;
-};
-
-TEST(Reader, ParseTrue) {
- StringStream s("true");
- ParseBoolHandler<true> h;
- Reader reader;
- reader.Parse(s, h);
- EXPECT_EQ(1u, h.step_);
-}
-
-TEST(Reader, ParseFalse) {
- StringStream s("false");
- ParseBoolHandler<false> h;
- Reader reader;
- reader.Parse(s, h);
- EXPECT_EQ(1u, h.step_);
-}
-
-struct ParseIntHandler : BaseReaderHandler<UTF8<>, ParseIntHandler> {
- ParseIntHandler() : step_(0), actual_() {}
- bool Default() { ADD_FAILURE(); return false; }
- bool Int(int i) { actual_ = i; step_++; return true; }
-
- unsigned step_;
- int actual_;
-};
-
-struct ParseUintHandler : BaseReaderHandler<UTF8<>, ParseUintHandler> {
- ParseUintHandler() : step_(0), actual_() {}
- bool Default() { ADD_FAILURE(); return false; }
- bool Uint(unsigned i) { actual_ = i; step_++; return true; }
-
- unsigned step_;
- unsigned actual_;
-};
-
-struct ParseInt64Handler : BaseReaderHandler<UTF8<>, ParseInt64Handler> {
- ParseInt64Handler() : step_(0), actual_() {}
- bool Default() { ADD_FAILURE(); return false; }
- bool Int64(int64_t i) { actual_ = i; step_++; return true; }
-
- unsigned step_;
- int64_t actual_;
-};
-
-struct ParseUint64Handler : BaseReaderHandler<UTF8<>, ParseUint64Handler> {
- ParseUint64Handler() : step_(0), actual_() {}
- bool Default() { ADD_FAILURE(); return false; }
- bool Uint64(uint64_t i) { actual_ = i; step_++; return true; }
-
- unsigned step_;
- uint64_t actual_;
-};
-
-struct ParseDoubleHandler : BaseReaderHandler<UTF8<>, ParseDoubleHandler> {
- ParseDoubleHandler() : step_(0), actual_() {}
- bool Default() { ADD_FAILURE(); return false; }
- bool Double(double d) { actual_ = d; step_++; return true; }
-
- unsigned step_;
- double actual_;
-};
-
-TEST(Reader, ParseNumber_Integer) {
-#define TEST_INTEGER(Handler, str, x) \
- { \
- StringStream s(str); \
- Handler h; \
- Reader reader; \
- reader.Parse(s, h); \
- EXPECT_EQ(1u, h.step_); \
- EXPECT_EQ(x, h.actual_); \
- }
-
- TEST_INTEGER(ParseUintHandler, "0", 0u);
- TEST_INTEGER(ParseUintHandler, "123", 123u);
- TEST_INTEGER(ParseUintHandler, "2147483648", 2147483648u); // 2^31 - 1 (cannot be stored in int)
- TEST_INTEGER(ParseUintHandler, "4294967295", 4294967295u);
-
- TEST_INTEGER(ParseIntHandler, "-123", -123);
- TEST_INTEGER(ParseIntHandler, "-2147483648", static_cast<int32_t>(0x80000000)); // -2^31 (min of int)
-
- TEST_INTEGER(ParseUint64Handler, "4294967296", RAPIDJSON_UINT64_C2(1, 0)); // 2^32 (max of unsigned + 1, force to use uint64_t)
- TEST_INTEGER(ParseUint64Handler, "18446744073709551615", RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0xFFFFFFFF)); // 2^64 - 1 (max of uint64_t)
-
- TEST_INTEGER(ParseInt64Handler, "-2147483649", static_cast<int64_t>(RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0x7FFFFFFF))); // -2^31 -1 (min of int - 1, force to use int64_t)
- TEST_INTEGER(ParseInt64Handler, "-9223372036854775808", static_cast<int64_t>(RAPIDJSON_UINT64_C2(0x80000000, 0x00000000))); // -2^63 (min of int64_t)
-
- // Random test for uint32_t/int32_t
- {
- union {
- uint32_t u;
- int32_t i;
- }u;
- Random r;
-
- for (unsigned i = 0; i < 100000; i++) {
- u.u = r();
-
- char buffer[32];
- *internal::u32toa(u.u, buffer) = '\0';
- TEST_INTEGER(ParseUintHandler, buffer, u.u);
-
- if (u.i < 0) {
- *internal::i32toa(u.i, buffer) = '\0';
- TEST_INTEGER(ParseIntHandler, buffer, u.i);
- }
- }
- }
-
- // Random test for uint64_t/int64_t
- {
- union {
- uint64_t u;
- int64_t i;
- }u;
- Random r;
-
- for (unsigned i = 0; i < 100000; i++) {
- u.u = uint64_t(r()) << 32;
- u.u |= r();
-
- char buffer[32];
- if (u.u > uint64_t(4294967295u)) {
- *internal::u64toa(u.u, buffer) = '\0';
- TEST_INTEGER(ParseUint64Handler, buffer, u.u);
- }
-
- if (u.i < -int64_t(2147483648u)) {
- *internal::i64toa(u.i, buffer) = '\0';
- TEST_INTEGER(ParseInt64Handler, buffer, u.i);
- }
- }
- }
-#undef TEST_INTEGER
-}
-
-template<bool fullPrecision>
-static void TestParseDouble() {
-#define TEST_DOUBLE(fullPrecision, str, x) \
- { \
- StringStream s(str); \
- ParseDoubleHandler h; \
- Reader reader; \
- ASSERT_EQ(kParseErrorNone, reader.Parse<fullPrecision ? kParseFullPrecisionFlag : 0>(s, h).Code()); \
- EXPECT_EQ(1u, h.step_); \
- internal::Double e(x), a(h.actual_); \
- if (fullPrecision) { \
- EXPECT_EQ(e.Uint64Value(), a.Uint64Value()); \
- if (e.Uint64Value() != a.Uint64Value()) \
- printf(" String: %s\n Actual: %.17g\nExpected: %.17g\n", str, h.actual_, x); \
- } \
- else { \
- EXPECT_EQ(e.Sign(), a.Sign()); /* for 0.0 != -0.0 */ \
- EXPECT_DOUBLE_EQ(x, h.actual_); \
- } \
- }
-
- TEST_DOUBLE(fullPrecision, "0.0", 0.0);
- TEST_DOUBLE(fullPrecision, "-0.0", -0.0); // For checking issue #289
- TEST_DOUBLE(fullPrecision, "1.0", 1.0);
- TEST_DOUBLE(fullPrecision, "-1.0", -1.0);
- TEST_DOUBLE(fullPrecision, "1.5", 1.5);
- TEST_DOUBLE(fullPrecision, "-1.5", -1.5);
- TEST_DOUBLE(fullPrecision, "3.1416", 3.1416);
- TEST_DOUBLE(fullPrecision, "1E10", 1E10);
- TEST_DOUBLE(fullPrecision, "1e10", 1e10);
- TEST_DOUBLE(fullPrecision, "1E+10", 1E+10);
- TEST_DOUBLE(fullPrecision, "1E-10", 1E-10);
- TEST_DOUBLE(fullPrecision, "-1E10", -1E10);
- TEST_DOUBLE(fullPrecision, "-1e10", -1e10);
- TEST_DOUBLE(fullPrecision, "-1E+10", -1E+10);
- TEST_DOUBLE(fullPrecision, "-1E-10", -1E-10);
- TEST_DOUBLE(fullPrecision, "1.234E+10", 1.234E+10);
- TEST_DOUBLE(fullPrecision, "1.234E-10", 1.234E-10);
- TEST_DOUBLE(fullPrecision, "1.79769e+308", 1.79769e+308);
- TEST_DOUBLE(fullPrecision, "2.22507e-308", 2.22507e-308);
- TEST_DOUBLE(fullPrecision, "-1.79769e+308", -1.79769e+308);
- TEST_DOUBLE(fullPrecision, "-2.22507e-308", -2.22507e-308);
- TEST_DOUBLE(fullPrecision, "4.9406564584124654e-324", 4.9406564584124654e-324); // minimum denormal
- TEST_DOUBLE(fullPrecision, "2.2250738585072009e-308", 2.2250738585072009e-308); // Max subnormal double
- TEST_DOUBLE(fullPrecision, "2.2250738585072014e-308", 2.2250738585072014e-308); // Min normal positive double
- TEST_DOUBLE(fullPrecision, "1.7976931348623157e+308", 1.7976931348623157e+308); // Max double
- TEST_DOUBLE(fullPrecision, "1e-10000", 0.0); // must underflow
- TEST_DOUBLE(fullPrecision, "18446744073709551616", 18446744073709551616.0); // 2^64 (max of uint64_t + 1, force to use double)
- TEST_DOUBLE(fullPrecision, "-9223372036854775809", -9223372036854775809.0); // -2^63 - 1(min of int64_t + 1, force to use double)
- TEST_DOUBLE(fullPrecision, "0.9868011474609375", 0.9868011474609375); // https://github.com/miloyip/rapidjson/issues/120
- TEST_DOUBLE(fullPrecision, "123e34", 123e34); // Fast Path Cases In Disguise
- TEST_DOUBLE(fullPrecision, "45913141877270640000.0", 45913141877270640000.0);
- TEST_DOUBLE(fullPrecision, "2.2250738585072011e-308", 2.2250738585072011e-308); // http://www.exploringbinary.com/php-hangs-on-numeric-value-2-2250738585072011e-308/
- TEST_DOUBLE(fullPrecision, "1e-00011111111111", 0.0); // Issue #313
- TEST_DOUBLE(fullPrecision, "-1e-00011111111111", -0.0);
- TEST_DOUBLE(fullPrecision, "1e-214748363", 0.0); // Maximum supported negative exponent
- TEST_DOUBLE(fullPrecision, "1e-214748364", 0.0);
- TEST_DOUBLE(fullPrecision, "1e-21474836311", 0.0);
- TEST_DOUBLE(fullPrecision, "0.017976931348623157e+310", 1.7976931348623157e+308); // Max double in another form
-
- // Since
- // abs((2^-1022 - 2^-1074) - 2.2250738585072012e-308) = 3.109754131239141401123495768877590405345064751974375599... ¡Á 10^-324
- // abs((2^-1022) - 2.2250738585072012e-308) = 1.830902327173324040642192159804623318305533274168872044... ¡Á 10 ^ -324
- // So 2.2250738585072012e-308 should round to 2^-1022 = 2.2250738585072014e-308
- TEST_DOUBLE(fullPrecision, "2.2250738585072012e-308", 2.2250738585072014e-308); // http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/
-
- // More closer to normal/subnormal boundary
- // boundary = 2^-1022 - 2^-1075 = 2.225073858507201136057409796709131975934819546351645648... ¡Á 10^-308
- TEST_DOUBLE(fullPrecision, "2.22507385850720113605740979670913197593481954635164564e-308", 2.2250738585072009e-308);
- TEST_DOUBLE(fullPrecision, "2.22507385850720113605740979670913197593481954635164565e-308", 2.2250738585072014e-308);
-
- // 1.0 is in (1.0 - 2^-54, 1.0 + 2^-53)
- // 1.0 - 2^-54 = 0.999999999999999944488848768742172978818416595458984375
- TEST_DOUBLE(fullPrecision, "0.999999999999999944488848768742172978818416595458984375", 1.0); // round to even
- TEST_DOUBLE(fullPrecision, "0.999999999999999944488848768742172978818416595458984374", 0.99999999999999989); // previous double
- TEST_DOUBLE(fullPrecision, "0.999999999999999944488848768742172978818416595458984376", 1.0); // next double
- // 1.0 + 2^-53 = 1.00000000000000011102230246251565404236316680908203125
- TEST_DOUBLE(fullPrecision, "1.00000000000000011102230246251565404236316680908203125", 1.0); // round to even
- TEST_DOUBLE(fullPrecision, "1.00000000000000011102230246251565404236316680908203124", 1.0); // previous double
- TEST_DOUBLE(fullPrecision, "1.00000000000000011102230246251565404236316680908203126", 1.00000000000000022); // next double
-
- // Numbers from https://github.com/floitsch/double-conversion/blob/master/test/cctest/test-strtod.cc
-
- TEST_DOUBLE(fullPrecision, "72057594037927928.0", 72057594037927928.0);
- TEST_DOUBLE(fullPrecision, "72057594037927936.0", 72057594037927936.0);
- TEST_DOUBLE(fullPrecision, "72057594037927932.0", 72057594037927936.0);
- TEST_DOUBLE(fullPrecision, "7205759403792793199999e-5", 72057594037927928.0);
- TEST_DOUBLE(fullPrecision, "7205759403792793200001e-5", 72057594037927936.0);
-
- TEST_DOUBLE(fullPrecision, "9223372036854774784.0", 9223372036854774784.0);
- TEST_DOUBLE(fullPrecision, "9223372036854775808.0", 9223372036854775808.0);
- TEST_DOUBLE(fullPrecision, "9223372036854775296.0", 9223372036854775808.0);
- TEST_DOUBLE(fullPrecision, "922337203685477529599999e-5", 9223372036854774784.0);
- TEST_DOUBLE(fullPrecision, "922337203685477529600001e-5", 9223372036854775808.0);
-
- TEST_DOUBLE(fullPrecision, "10141204801825834086073718800384", 10141204801825834086073718800384.0);
- TEST_DOUBLE(fullPrecision, "10141204801825835211973625643008", 10141204801825835211973625643008.0);
- TEST_DOUBLE(fullPrecision, "10141204801825834649023672221696", 10141204801825835211973625643008.0);
- TEST_DOUBLE(fullPrecision, "1014120480182583464902367222169599999e-5", 10141204801825834086073718800384.0);
- TEST_DOUBLE(fullPrecision, "1014120480182583464902367222169600001e-5", 10141204801825835211973625643008.0);
-
- TEST_DOUBLE(fullPrecision, "5708990770823838890407843763683279797179383808", 5708990770823838890407843763683279797179383808.0);
- TEST_DOUBLE(fullPrecision, "5708990770823839524233143877797980545530986496", 5708990770823839524233143877797980545530986496.0);
- TEST_DOUBLE(fullPrecision, "5708990770823839207320493820740630171355185152", 5708990770823839524233143877797980545530986496.0);
- TEST_DOUBLE(fullPrecision, "5708990770823839207320493820740630171355185151999e-3", 5708990770823838890407843763683279797179383808.0);
- TEST_DOUBLE(fullPrecision, "5708990770823839207320493820740630171355185152001e-3", 5708990770823839524233143877797980545530986496.0);
-
- {
- char n1e308[310]; // '1' followed by 308 '0'
- n1e308[0] = '1';
- for (int i = 1; i < 309; i++)
- n1e308[i] = '0';
- n1e308[309] = '\0';
- TEST_DOUBLE(fullPrecision, n1e308, 1E308);
- }
-
- // Cover trimming
- TEST_DOUBLE(fullPrecision,
-"2.22507385850720113605740979670913197593481954635164564802342610972482222202107694551652952390813508"
-"7914149158913039621106870086438694594645527657207407820621743379988141063267329253552286881372149012"
-"9811224514518898490572223072852551331557550159143974763979834118019993239625482890171070818506906306"
-"6665599493827577257201576306269066333264756530000924588831643303777979186961204949739037782970490505"
-"1080609940730262937128958950003583799967207254304360284078895771796150945516748243471030702609144621"
-"5722898802581825451803257070188608721131280795122334262883686223215037756666225039825343359745688844"
-"2390026549819838548794829220689472168983109969836584681402285424333066033985088644580400103493397042"
-"7567186443383770486037861622771738545623065874679014086723327636718751234567890123456789012345678901"
-"e-308",
- 2.2250738585072014e-308);
-
- {
- static const unsigned count = 100; // Tested with 1000000 locally
- Random r;
- Reader reader; // Reusing reader to prevent heap allocation
-
- // Exhaustively test different exponents with random significant
- for (uint64_t exp = 0; exp < 2047; exp++) {
- ;
- for (unsigned i = 0; i < count; i++) {
- // Need to call r() in two statements for cross-platform coherent sequence.
- uint64_t u = (exp << 52) | uint64_t(r() & 0x000FFFFF) << 32;
- u |= uint64_t(r());
- internal::Double d = internal::Double(u);
-
- char buffer[32];
- *internal::dtoa(d.Value(), buffer) = '\0';
-
- StringStream s(buffer);
- ParseDoubleHandler h;
- ASSERT_EQ(kParseErrorNone, reader.Parse<fullPrecision ? kParseFullPrecisionFlag : 0>(s, h).Code());
- EXPECT_EQ(1u, h.step_);
- internal::Double a(h.actual_);
- if (fullPrecision) {
- EXPECT_EQ(d.Uint64Value(), a.Uint64Value());
- if (d.Uint64Value() != a.Uint64Value())
- printf(" String: %s\n Actual: %.17g\nExpected: %.17g\n", buffer, h.actual_, d.Value());
- }
- else {
- EXPECT_EQ(d.Sign(), a.Sign()); // for 0.0 != -0.0
- EXPECT_DOUBLE_EQ(d.Value(), h.actual_);
- }
- }
- }
- }
-
- // Issue #340
- TEST_DOUBLE(fullPrecision, "7.450580596923828e-9", 7.450580596923828e-9);
- {
- internal::Double d(1.0);
- for (int i = 0; i < 324; i++) {
- char buffer[32];
- *internal::dtoa(d.Value(), buffer) = '\0';
-
- StringStream s(buffer);
- ParseDoubleHandler h;
- Reader reader;
- ASSERT_EQ(kParseErrorNone, reader.Parse<fullPrecision ? kParseFullPrecisionFlag : 0>(s, h).Code());
- EXPECT_EQ(1u, h.step_);
- internal::Double a(h.actual_);
- if (fullPrecision) {
- EXPECT_EQ(d.Uint64Value(), a.Uint64Value());
- if (d.Uint64Value() != a.Uint64Value())
- printf(" String: %s\n Actual: %.17g\nExpected: %.17g\n", buffer, h.actual_, d.Value());
- }
- else {
- EXPECT_EQ(d.Sign(), a.Sign()); // for 0.0 != -0.0
- EXPECT_DOUBLE_EQ(d.Value(), h.actual_);
- }
-
-
- d = d.Value() * 0.5;
- }
- }
-#undef TEST_DOUBLE
-}
-
-TEST(Reader, ParseNumber_NormalPrecisionDouble) {
- TestParseDouble<false>();
-}
-
-TEST(Reader, ParseNumber_FullPrecisionDouble) {
- TestParseDouble<true>();
-}
-
-TEST(Reader, ParseNumber_NormalPrecisionError) {
- static unsigned count = 1000000;
- Random r;
-
- double ulpSum = 0.0;
- double ulpMax = 0.0;
- for (unsigned i = 0; i < count; i++) {
- internal::Double e, a;
- do {
- // Need to call r() in two statements for cross-platform coherent sequence.
- uint64_t u = uint64_t(r()) << 32;
- u |= uint64_t(r());
- e = u;
- } while (e.IsNan() || e.IsInf() || !e.IsNormal());
-
- char buffer[32];
- *internal::dtoa(e.Value(), buffer) = '\0';
-
- StringStream s(buffer);
- ParseDoubleHandler h;
- Reader reader;
- ASSERT_EQ(kParseErrorNone, reader.Parse(s, h).Code());
- EXPECT_EQ(1u, h.step_);
-
- a = h.actual_;
- uint64_t bias1 = e.ToBias();
- uint64_t bias2 = a.ToBias();
- double ulp = static_cast<double>(bias1 >= bias2 ? bias1 - bias2 : bias2 - bias1);
- ulpMax = std::max(ulpMax, ulp);
- ulpSum += ulp;
- }
- printf("ULP Average = %g, Max = %g \n", ulpSum / count, ulpMax);
-}
-
-TEST(Reader, ParseNumber_Error) {
-#define TEST_NUMBER_ERROR(errorCode, str, errorOffset, streamPos) \
- { \
- char buffer[1001]; \
- sprintf(buffer, "%s", str); \
- InsituStringStream s(buffer); \
- BaseReaderHandler<> h; \
- Reader reader; \
- EXPECT_FALSE(reader.Parse(s, h)); \
- EXPECT_EQ(errorCode, reader.GetParseErrorCode());\
- EXPECT_EQ(errorOffset, reader.GetErrorOffset());\
- EXPECT_EQ(streamPos, s.Tell());\
- }
-
- // Number too big to be stored in double.
- {
- char n1e309[311]; // '1' followed by 309 '0'
- n1e309[0] = '1';
- for (int i = 1; i < 310; i++)
- n1e309[i] = '0';
- n1e309[310] = '\0';
- TEST_NUMBER_ERROR(kParseErrorNumberTooBig, n1e309, 0, 309);
- }
- TEST_NUMBER_ERROR(kParseErrorNumberTooBig, "1e309", 0, 5);
-
- // Miss fraction part in number.
- TEST_NUMBER_ERROR(kParseErrorNumberMissFraction, "1.", 2, 2);
- TEST_NUMBER_ERROR(kParseErrorNumberMissFraction, "1.a", 2, 2);
-
- // Miss exponent in number.
- TEST_NUMBER_ERROR(kParseErrorNumberMissExponent, "1e", 2, 2);
- TEST_NUMBER_ERROR(kParseErrorNumberMissExponent, "1e_", 2, 2);
-
-#undef TEST_NUMBER_ERROR
-}
-
-template <typename Encoding>
-struct ParseStringHandler : BaseReaderHandler<Encoding, ParseStringHandler<Encoding> > {
- ParseStringHandler() : str_(0), length_(0), copy_() {}
- ~ParseStringHandler() { EXPECT_TRUE(str_ != 0); if (copy_) free(const_cast<typename Encoding::Ch*>(str_)); }
-
- ParseStringHandler(const ParseStringHandler&);
- ParseStringHandler& operator=(const ParseStringHandler&);
-
- bool Default() { ADD_FAILURE(); return false; }
- bool String(const typename Encoding::Ch* str, size_t length, bool copy) {
- EXPECT_EQ(0, str_);
- if (copy) {
- str_ = static_cast<typename Encoding::Ch*>(malloc((length + 1) * sizeof(typename Encoding::Ch)));
- memcpy(const_cast<typename Encoding::Ch*>(str_), str, (length + 1) * sizeof(typename Encoding::Ch));
- }
- else
- str_ = str;
- length_ = length;
- copy_ = copy;
- return true;
- }
-
- const typename Encoding::Ch* str_;
- size_t length_;
- bool copy_;
-};
-
-TEST(Reader, ParseString) {
-#define TEST_STRING(Encoding, e, x) \
- { \
- Encoding::Ch* buffer = StrDup(x); \
- GenericInsituStringStream<Encoding> is(buffer); \
- ParseStringHandler<Encoding> h; \
- GenericReader<Encoding, Encoding> reader; \
- reader.Parse<kParseInsituFlag | kParseValidateEncodingFlag>(is, h); \
- EXPECT_EQ(0, StrCmp<Encoding::Ch>(e, h.str_)); \
- EXPECT_EQ(StrLen(e), h.length_); \
- free(buffer); \
- GenericStringStream<Encoding> s(x); \
- ParseStringHandler<Encoding> h2; \
- GenericReader<Encoding, Encoding> reader2; \
- reader2.Parse(s, h2); \
- EXPECT_EQ(0, StrCmp<Encoding::Ch>(e, h2.str_)); \
- EXPECT_EQ(StrLen(e), h2.length_); \
- }
-
- // String constant L"\xXX" can only specify character code in bytes, which is not endianness-neutral.
- // And old compiler does not support u"" and U"" string literal. So here specify string literal by array of Ch.
- // In addition, GCC 4.8 generates -Wnarrowing warnings when character code >= 128 are assigned to signed integer types.
- // Therefore, utype is added for declaring unsigned array, and then cast it to Encoding::Ch.
-#define ARRAY(...) { __VA_ARGS__ }
-#define TEST_STRINGARRAY(Encoding, utype, array, x) \
- { \
- static const utype ue[] = array; \
- static const Encoding::Ch* e = reinterpret_cast<const Encoding::Ch *>(&ue[0]); \
- TEST_STRING(Encoding, e, x); \
- }
-
-#define TEST_STRINGARRAY2(Encoding, utype, earray, xarray) \
- { \
- static const utype ue[] = earray; \
- static const utype xe[] = xarray; \
- static const Encoding::Ch* e = reinterpret_cast<const Encoding::Ch *>(&ue[0]); \
- static const Encoding::Ch* x = reinterpret_cast<const Encoding::Ch *>(&xe[0]); \
- TEST_STRING(Encoding, e, x); \
- }
-
- TEST_STRING(UTF8<>, "", "\"\"");
- TEST_STRING(UTF8<>, "Hello", "\"Hello\"");
- TEST_STRING(UTF8<>, "Hello\nWorld", "\"Hello\\nWorld\"");
- TEST_STRING(UTF8<>, "\"\\/\b\f\n\r\t", "\"\\\"\\\\/\\b\\f\\n\\r\\t\"");
- TEST_STRING(UTF8<>, "\x24", "\"\\u0024\""); // Dollar sign U+0024
- TEST_STRING(UTF8<>, "\xC2\xA2", "\"\\u00A2\""); // Cents sign U+00A2
- TEST_STRING(UTF8<>, "\xE2\x82\xAC", "\"\\u20AC\""); // Euro sign U+20AC
- TEST_STRING(UTF8<>, "\xF0\x9D\x84\x9E", "\"\\uD834\\uDD1E\""); // G clef sign U+1D11E
-
- // UTF16
- TEST_STRING(UTF16<>, L"", L"\"\"");
- TEST_STRING(UTF16<>, L"Hello", L"\"Hello\"");
- TEST_STRING(UTF16<>, L"Hello\nWorld", L"\"Hello\\nWorld\"");
- TEST_STRING(UTF16<>, L"\"\\/\b\f\n\r\t", L"\"\\\"\\\\/\\b\\f\\n\\r\\t\"");
- TEST_STRINGARRAY(UTF16<>, wchar_t, ARRAY(0x0024, 0x0000), L"\"\\u0024\"");
- TEST_STRINGARRAY(UTF16<>, wchar_t, ARRAY(0x00A2, 0x0000), L"\"\\u00A2\""); // Cents sign U+00A2
- TEST_STRINGARRAY(UTF16<>, wchar_t, ARRAY(0x20AC, 0x0000), L"\"\\u20AC\""); // Euro sign U+20AC
- TEST_STRINGARRAY(UTF16<>, wchar_t, ARRAY(0xD834, 0xDD1E, 0x0000), L"\"\\uD834\\uDD1E\""); // G clef sign U+1D11E
-
- // UTF32
- TEST_STRINGARRAY2(UTF32<>, unsigned, ARRAY('\0'), ARRAY('\"', '\"', '\0'));
- TEST_STRINGARRAY2(UTF32<>, unsigned, ARRAY('H', 'e', 'l', 'l', 'o', '\0'), ARRAY('\"', 'H', 'e', 'l', 'l', 'o', '\"', '\0'));
- TEST_STRINGARRAY2(UTF32<>, unsigned, ARRAY('H', 'e', 'l', 'l', 'o', '\n', 'W', 'o', 'r', 'l', 'd', '\0'), ARRAY('\"', 'H', 'e', 'l', 'l', 'o', '\\', 'n', 'W', 'o', 'r', 'l', 'd', '\"', '\0'));
- TEST_STRINGARRAY2(UTF32<>, unsigned, ARRAY('\"', '\\', '/', '\b', '\f', '\n', '\r', '\t', '\0'), ARRAY('\"', '\\', '\"', '\\', '\\', '/', '\\', 'b', '\\', 'f', '\\', 'n', '\\', 'r', '\\', 't', '\"', '\0'));
- TEST_STRINGARRAY2(UTF32<>, unsigned, ARRAY(0x00024, 0x0000), ARRAY('\"', '\\', 'u', '0', '0', '2', '4', '\"', '\0'));
- TEST_STRINGARRAY2(UTF32<>, unsigned, ARRAY(0x000A2, 0x0000), ARRAY('\"', '\\', 'u', '0', '0', 'A', '2', '\"', '\0')); // Cents sign U+00A2
- TEST_STRINGARRAY2(UTF32<>, unsigned, ARRAY(0x020AC, 0x0000), ARRAY('\"', '\\', 'u', '2', '0', 'A', 'C', '\"', '\0')); // Euro sign U+20AC
- TEST_STRINGARRAY2(UTF32<>, unsigned, ARRAY(0x1D11E, 0x0000), ARRAY('\"', '\\', 'u', 'D', '8', '3', '4', '\\', 'u', 'D', 'D', '1', 'E', '\"', '\0')); // G clef sign U+1D11E
-
-#undef TEST_STRINGARRAY
-#undef ARRAY
-#undef TEST_STRING
-
- // Support of null character in string
- {
- StringStream s("\"Hello\\u0000World\"");
- const char e[] = "Hello\0World";
- ParseStringHandler<UTF8<> > h;
- Reader reader;
- reader.Parse(s, h);
- EXPECT_EQ(0, memcmp(e, h.str_, h.length_ + 1));
- EXPECT_EQ(11u, h.length_);
- }
-}
-
-TEST(Reader, ParseString_Transcoding) {
- const char* x = "\"Hello\"";
- const wchar_t* e = L"Hello";
- GenericStringStream<UTF8<> > is(x);
- GenericReader<UTF8<>, UTF16<> > reader;
- ParseStringHandler<UTF16<> > h;
- reader.Parse(is, h);
- EXPECT_EQ(0, StrCmp<UTF16<>::Ch>(e, h.str_));
- EXPECT_EQ(StrLen(e), h.length_);
-}
-
-TEST(Reader, ParseString_TranscodingWithValidation) {
- const char* x = "\"Hello\"";
- const wchar_t* e = L"Hello";
- GenericStringStream<UTF8<> > is(x);
- GenericReader<UTF8<>, UTF16<> > reader;
- ParseStringHandler<UTF16<> > h;
- reader.Parse<kParseValidateEncodingFlag>(is, h);
- EXPECT_EQ(0, StrCmp<UTF16<>::Ch>(e, h.str_));
- EXPECT_EQ(StrLen(e), h.length_);
-}
-
-TEST(Reader, ParseString_NonDestructive) {
- StringStream s("\"Hello\\nWorld\"");
- ParseStringHandler<UTF8<> > h;
- Reader reader;
- reader.Parse(s, h);
- EXPECT_EQ(0, StrCmp("Hello\nWorld", h.str_));
- EXPECT_EQ(11u, h.length_);
-}
-
-template <typename Encoding>
-ParseErrorCode TestString(const typename Encoding::Ch* str) {
- GenericStringStream<Encoding> s(str);
- BaseReaderHandler<Encoding> h;
- GenericReader<Encoding, Encoding> reader;
- reader.template Parse<kParseValidateEncodingFlag>(s, h);
- return reader.GetParseErrorCode();
-}
-
-TEST(Reader, ParseString_Error) {
-#define TEST_STRING_ERROR(errorCode, str, errorOffset, streamPos)\
-{\
- GenericStringStream<UTF8<> > s(str);\
- BaseReaderHandler<UTF8<> > h;\
- GenericReader<UTF8<> , UTF8<> > reader;\
- reader.Parse<kParseValidateEncodingFlag>(s, h);\
- EXPECT_EQ(errorCode, reader.GetParseErrorCode());\
- EXPECT_EQ(errorOffset, reader.GetErrorOffset());\
- EXPECT_EQ(streamPos, s.Tell());\
-}
-
-#define ARRAY(...) { __VA_ARGS__ }
-#define TEST_STRINGENCODING_ERROR(Encoding, TargetEncoding, utype, array) \
- { \
- static const utype ue[] = array; \
- static const Encoding::Ch* e = reinterpret_cast<const Encoding::Ch *>(&ue[0]); \
- EXPECT_EQ(kParseErrorStringInvalidEncoding, TestString<Encoding>(e));\
- /* decode error */\
- GenericStringStream<Encoding> s(e);\
- BaseReaderHandler<TargetEncoding> h;\
- GenericReader<Encoding, TargetEncoding> reader;\
- reader.Parse(s, h);\
- EXPECT_EQ(kParseErrorStringInvalidEncoding, reader.GetParseErrorCode());\
- }
-
- // Invalid escape character in string.
- TEST_STRING_ERROR(kParseErrorStringEscapeInvalid, "[\"\\a\"]", 2, 3);
-
- // Incorrect hex digit after \\u escape in string.
- TEST_STRING_ERROR(kParseErrorStringUnicodeEscapeInvalidHex, "[\"\\uABCG\"]", 2, 7);
-
- // Quotation in \\u escape in string (Issue #288)
- TEST_STRING_ERROR(kParseErrorStringUnicodeEscapeInvalidHex, "[\"\\uaaa\"]", 2, 7);
- TEST_STRING_ERROR(kParseErrorStringUnicodeEscapeInvalidHex, "[\"\\uD800\\uFFF\"]", 2, 13);
-
- // The surrogate pair in string is invalid.
- TEST_STRING_ERROR(kParseErrorStringUnicodeSurrogateInvalid, "[\"\\uD800X\"]", 2, 8);
- TEST_STRING_ERROR(kParseErrorStringUnicodeSurrogateInvalid, "[\"\\uD800\\uFFFF\"]", 2, 14);
-
- // Missing a closing quotation mark in string.
- TEST_STRING_ERROR(kParseErrorStringMissQuotationMark, "[\"Test]", 7, 7);
-
- // http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt
-
- // 3 Malformed sequences
-
- // 3.1 Unexpected continuation bytes
- {
- char e[] = { '[', '\"', 0, '\"', ']', '\0' };
- for (unsigned char c = 0x80u; c <= 0xBFu; c++) {
- e[2] = static_cast<char>(c);
- ParseErrorCode error = TestString<UTF8<> >(e);
- EXPECT_EQ(kParseErrorStringInvalidEncoding, error);
- if (error != kParseErrorStringInvalidEncoding)
- std::cout << static_cast<unsigned>(c) << std::endl;
- }
- }
-
- // 3.2 Lonely start characters, 3.5 Impossible bytes
- {
- char e[] = { '[', '\"', 0, ' ', '\"', ']', '\0' };
- for (unsigned c = 0xC0u; c <= 0xFFu; c++) {
- e[2] = static_cast<char>(c);
- int streamPos;
- if (c <= 0xC1u)
- streamPos = 3; // 0xC0 - 0xC1
- else if (c <= 0xDFu)
- streamPos = 4; // 0xC2 - 0xDF
- else if (c <= 0xEFu)
- streamPos = 5; // 0xE0 - 0xEF
- else if (c <= 0xF4u)
- streamPos = 6; // 0xF0 - 0xF4
- else
- streamPos = 3; // 0xF5 - 0xFF
- TEST_STRING_ERROR(kParseErrorStringInvalidEncoding, e, 2, streamPos);
- }
- }
-
- // 4 Overlong sequences
-
- // 4.1 Examples of an overlong ASCII character
- TEST_STRINGENCODING_ERROR(UTF8<>, UTF16<>, unsigned char, ARRAY('[', '\"', 0xC0u, 0xAFu, '\"', ']', '\0'));
- TEST_STRINGENCODING_ERROR(UTF8<>, UTF16<>, unsigned char, ARRAY('[', '\"', 0xE0u, 0x80u, 0xAFu, '\"', ']', '\0'));
- TEST_STRINGENCODING_ERROR(UTF8<>, UTF16<>, unsigned char, ARRAY('[', '\"', 0xF0u, 0x80u, 0x80u, 0xAFu, '\"', ']', '\0'));
-
- // 4.2 Maximum overlong sequences
- TEST_STRINGENCODING_ERROR(UTF8<>, UTF16<>, unsigned char, ARRAY('[', '\"', 0xC1u, 0xBFu, '\"', ']', '\0'));
- TEST_STRINGENCODING_ERROR(UTF8<>, UTF16<>, unsigned char, ARRAY('[', '\"', 0xE0u, 0x9Fu, 0xBFu, '\"', ']', '\0'));
- TEST_STRINGENCODING_ERROR(UTF8<>, UTF16<>, unsigned char, ARRAY('[', '\"', 0xF0u, 0x8Fu, 0xBFu, 0xBFu, '\"', ']', '\0'));
-
- // 4.3 Overlong representation of the NUL character
- TEST_STRINGENCODING_ERROR(UTF8<>, UTF16<>, unsigned char, ARRAY('[', '\"', 0xC0u, 0x80u, '\"', ']', '\0'));
- TEST_STRINGENCODING_ERROR(UTF8<>, UTF16<>, unsigned char, ARRAY('[', '\"', 0xE0u, 0x80u, 0x80u, '\"', ']', '\0'));
- TEST_STRINGENCODING_ERROR(UTF8<>, UTF16<>, unsigned char, ARRAY('[', '\"', 0xF0u, 0x80u, 0x80u, 0x80u, '\"', ']', '\0'));
-
- // 5 Illegal code positions
-
- // 5.1 Single UTF-16 surrogates
- TEST_STRINGENCODING_ERROR(UTF8<>, UTF16<>, unsigned char, ARRAY('[', '\"', 0xEDu, 0xA0u, 0x80u, '\"', ']', '\0'));
- TEST_STRINGENCODING_ERROR(UTF8<>, UTF16<>, unsigned char, ARRAY('[', '\"', 0xEDu, 0xADu, 0xBFu, '\"', ']', '\0'));
- TEST_STRINGENCODING_ERROR(UTF8<>, UTF16<>, unsigned char, ARRAY('[', '\"', 0xEDu, 0xAEu, 0x80u, '\"', ']', '\0'));
- TEST_STRINGENCODING_ERROR(UTF8<>, UTF16<>, unsigned char, ARRAY('[', '\"', 0xEDu, 0xAFu, 0xBFu, '\"', ']', '\0'));
- TEST_STRINGENCODING_ERROR(UTF8<>, UTF16<>, unsigned char, ARRAY('[', '\"', 0xEDu, 0xB0u, 0x80u, '\"', ']', '\0'));
- TEST_STRINGENCODING_ERROR(UTF8<>, UTF16<>, unsigned char, ARRAY('[', '\"', 0xEDu, 0xBEu, 0x80u, '\"', ']', '\0'));
- TEST_STRINGENCODING_ERROR(UTF8<>, UTF16<>, unsigned char, ARRAY('[', '\"', 0xEDu, 0xBFu, 0xBFu, '\"', ']', '\0'));
-
- // Malform UTF-16 sequences
- TEST_STRINGENCODING_ERROR(UTF16<>, UTF8<>, wchar_t, ARRAY('[', '\"', 0xDC00, 0xDC00, '\"', ']', '\0'));
- TEST_STRINGENCODING_ERROR(UTF16<>, UTF8<>, wchar_t, ARRAY('[', '\"', 0xD800, 0xD800, '\"', ']', '\0'));
-
- // Malform UTF-32 sequence
- TEST_STRINGENCODING_ERROR(UTF32<>, UTF8<>, unsigned, ARRAY('[', '\"', 0x110000, '\"', ']', '\0'));
-
- // Malform ASCII sequence
- TEST_STRINGENCODING_ERROR(ASCII<>, UTF8<>, char, ARRAY('[', '\"', char(0x80), '\"', ']', '\0'));
-
-#undef ARRAY
-#undef TEST_STRINGARRAY_ERROR
-}
-
-template <unsigned count>
-struct ParseArrayHandler : BaseReaderHandler<UTF8<>, ParseArrayHandler<count> > {
- ParseArrayHandler() : step_(0) {}
-
- bool Default() { ADD_FAILURE(); return false; }
- bool Uint(unsigned i) { EXPECT_EQ(step_, i); step_++; return true; }
- bool StartArray() { EXPECT_EQ(0u, step_); step_++; return true; }
- bool EndArray(SizeType) { step_++; return true; }
-
- unsigned step_;
-};
-
-TEST(Reader, ParseEmptyArray) {
- char *json = StrDup("[ ] ");
- InsituStringStream s(json);
- ParseArrayHandler<0> h;
- Reader reader;
- reader.Parse(s, h);
- EXPECT_EQ(2u, h.step_);
- free(json);
-}
-
-TEST(Reader, ParseArray) {
- char *json = StrDup("[1, 2, 3, 4]");
- InsituStringStream s(json);
- ParseArrayHandler<4> h;
- Reader reader;
- reader.Parse(s, h);
- EXPECT_EQ(6u, h.step_);
- free(json);
-}
-
-TEST(Reader, ParseArray_Error) {
-#define TEST_ARRAY_ERROR(errorCode, str, errorOffset) \
- { \
- int streamPos = errorOffset; \
- char buffer[1001]; \
- strncpy(buffer, str, 1000); \
- InsituStringStream s(buffer); \
- BaseReaderHandler<> h; \
- GenericReader<UTF8<>, UTF8<>, CrtAllocator> reader; \
- EXPECT_FALSE(reader.Parse(s, h)); \
- EXPECT_EQ(errorCode, reader.GetParseErrorCode());\
- EXPECT_EQ(errorOffset, reader.GetErrorOffset());\
- EXPECT_EQ(streamPos, s.Tell());\
- }
-
- // Missing a comma or ']' after an array element.
- TEST_ARRAY_ERROR(kParseErrorArrayMissCommaOrSquareBracket, "[1", 2);
- TEST_ARRAY_ERROR(kParseErrorArrayMissCommaOrSquareBracket, "[1}", 2);
- TEST_ARRAY_ERROR(kParseErrorArrayMissCommaOrSquareBracket, "[1 2]", 3);
-
-#undef TEST_ARRAY_ERROR
-}
-
-struct ParseObjectHandler : BaseReaderHandler<UTF8<>, ParseObjectHandler> {
- ParseObjectHandler() : step_(0) {}
-
- bool Default() { ADD_FAILURE(); return false; }
- bool Null() { EXPECT_EQ(8u, step_); step_++; return true; }
- bool Bool(bool b) {
- switch(step_) {
- case 4: EXPECT_TRUE(b); step_++; return true;
- case 6: EXPECT_FALSE(b); step_++; return true;
- default: ADD_FAILURE(); return false;
- }
- }
- bool Int(int i) {
- switch(step_) {
- case 10: EXPECT_EQ(123, i); step_++; return true;
- case 15: EXPECT_EQ(1, i); step_++; return true;
- case 16: EXPECT_EQ(2, i); step_++; return true;
- case 17: EXPECT_EQ(3, i); step_++; return true;
- default: ADD_FAILURE(); return false;
- }
- }
- bool Uint(unsigned i) { return Int(static_cast<int>(i)); }
- bool Double(double d) { EXPECT_EQ(12u, step_); EXPECT_DOUBLE_EQ(3.1416, d); step_++; return true; }
- bool String(const char* str, size_t, bool) {
- switch(step_) {
- case 1: EXPECT_STREQ("hello", str); step_++; return true;
- case 2: EXPECT_STREQ("world", str); step_++; return true;
- case 3: EXPECT_STREQ("t", str); step_++; return true;
- case 5: EXPECT_STREQ("f", str); step_++; return true;
- case 7: EXPECT_STREQ("n", str); step_++; return true;
- case 9: EXPECT_STREQ("i", str); step_++; return true;
- case 11: EXPECT_STREQ("pi", str); step_++; return true;
- case 13: EXPECT_STREQ("a", str); step_++; return true;
- default: ADD_FAILURE(); return false;
- }
- }
- bool StartObject() { EXPECT_EQ(0u, step_); step_++; return true; }
- bool EndObject(SizeType memberCount) { EXPECT_EQ(19u, step_); EXPECT_EQ(7u, memberCount); step_++; return true; }
- bool StartArray() { EXPECT_EQ(14u, step_); step_++; return true; }
- bool EndArray(SizeType elementCount) { EXPECT_EQ(18u, step_); EXPECT_EQ(3u, elementCount); step_++; return true; }
-
- unsigned step_;
-};
-
-TEST(Reader, ParseObject) {
- const char* json = "{ \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3] } ";
-
- // Insitu
- {
- char* json2 = StrDup(json);
- InsituStringStream s(json2);
- ParseObjectHandler h;
- Reader reader;
- reader.Parse<kParseInsituFlag>(s, h);
- EXPECT_EQ(20u, h.step_);
- free(json2);
- }
-
- // Normal
- {
- StringStream s(json);
- ParseObjectHandler h;
- Reader reader;
- reader.Parse(s, h);
- EXPECT_EQ(20u, h.step_);
- }
-}
-
-struct ParseEmptyObjectHandler : BaseReaderHandler<UTF8<>, ParseEmptyObjectHandler> {
- ParseEmptyObjectHandler() : step_(0) {}
-
- bool Default() { ADD_FAILURE(); return false; }
- bool StartObject() { EXPECT_EQ(0u, step_); step_++; return true; }
- bool EndObject(SizeType) { EXPECT_EQ(1u, step_); step_++; return true; }
-
- unsigned step_;
-};
-
-TEST(Reader, Parse_EmptyObject) {
- StringStream s("{ } ");
- ParseEmptyObjectHandler h;
- Reader reader;
- reader.Parse(s, h);
- EXPECT_EQ(2u, h.step_);
-}
-
-struct ParseMultipleRootHandler : BaseReaderHandler<UTF8<>, ParseMultipleRootHandler> {
- ParseMultipleRootHandler() : step_(0) {}
-
- bool Default() { ADD_FAILURE(); return false; }
- bool StartObject() { EXPECT_EQ(0u, step_); step_++; return true; }
- bool EndObject(SizeType) { EXPECT_EQ(1u, step_); step_++; return true; }
- bool StartArray() { EXPECT_EQ(2u, step_); step_++; return true; }
- bool EndArray(SizeType) { EXPECT_EQ(3u, step_); step_++; return true; }
-
- unsigned step_;
-};
-
-template <unsigned parseFlags>
-void TestMultipleRoot() {
- StringStream s("{}[] a");
- ParseMultipleRootHandler h;
- Reader reader;
- EXPECT_TRUE(reader.Parse<parseFlags>(s, h));
- EXPECT_EQ(2u, h.step_);
- EXPECT_TRUE(reader.Parse<parseFlags>(s, h));
- EXPECT_EQ(4u, h.step_);
- EXPECT_EQ(' ', s.Take());
- EXPECT_EQ('a', s.Take());
-}
-
-TEST(Reader, Parse_MultipleRoot) {
- TestMultipleRoot<kParseStopWhenDoneFlag>();
-}
-
-TEST(Reader, ParseIterative_MultipleRoot) {
- TestMultipleRoot<kParseIterativeFlag | kParseStopWhenDoneFlag>();
-}
-
-template <unsigned parseFlags>
-void TestInsituMultipleRoot() {
- char* buffer = strdup("{}[] a");
- InsituStringStream s(buffer);
- ParseMultipleRootHandler h;
- Reader reader;
- EXPECT_TRUE(reader.Parse<kParseInsituFlag | parseFlags>(s, h));
- EXPECT_EQ(2u, h.step_);
- EXPECT_TRUE(reader.Parse<kParseInsituFlag | parseFlags>(s, h));
- EXPECT_EQ(4u, h.step_);
- EXPECT_EQ(' ', s.Take());
- EXPECT_EQ('a', s.Take());
- free(buffer);
-}
-
-TEST(Reader, ParseInsitu_MultipleRoot) {
- TestInsituMultipleRoot<kParseStopWhenDoneFlag>();
-}
-
-TEST(Reader, ParseInsituIterative_MultipleRoot) {
- TestInsituMultipleRoot<kParseIterativeFlag | kParseStopWhenDoneFlag>();
-}
-
-#define TEST_ERROR(errorCode, str, errorOffset) \
- { \
- int streamPos = errorOffset; \
- char buffer[1001]; \
- strncpy(buffer, str, 1000); \
- InsituStringStream s(buffer); \
- BaseReaderHandler<> h; \
- Reader reader; \
- EXPECT_FALSE(reader.Parse(s, h)); \
- EXPECT_EQ(errorCode, reader.GetParseErrorCode());\
- EXPECT_EQ(errorOffset, reader.GetErrorOffset());\
- EXPECT_EQ(streamPos, s.Tell());\
- }
-
-TEST(Reader, ParseDocument_Error) {
- // The document is empty.
- TEST_ERROR(kParseErrorDocumentEmpty, "", 0);
- TEST_ERROR(kParseErrorDocumentEmpty, " ", 1);
- TEST_ERROR(kParseErrorDocumentEmpty, " \n", 2);
-
- // The document root must not follow by other values.
- TEST_ERROR(kParseErrorDocumentRootNotSingular, "[] 0", 3);
- TEST_ERROR(kParseErrorDocumentRootNotSingular, "{} 0", 3);
- TEST_ERROR(kParseErrorDocumentRootNotSingular, "null []", 5);
- TEST_ERROR(kParseErrorDocumentRootNotSingular, "0 {}", 2);
-}
-
-TEST(Reader, ParseValue_Error) {
- // Invalid value.
- TEST_ERROR(kParseErrorValueInvalid, "nulL", 3);
- TEST_ERROR(kParseErrorValueInvalid, "truE", 3);
- TEST_ERROR(kParseErrorValueInvalid, "falsE", 4);
- TEST_ERROR(kParseErrorValueInvalid, "a]", 0);
- TEST_ERROR(kParseErrorValueInvalid, ".1", 0);
-}
-
-TEST(Reader, ParseObject_Error) {
- // Missing a name for object member.
- TEST_ERROR(kParseErrorObjectMissName, "{1}", 1);
- TEST_ERROR(kParseErrorObjectMissName, "{:1}", 1);
- TEST_ERROR(kParseErrorObjectMissName, "{null:1}", 1);
- TEST_ERROR(kParseErrorObjectMissName, "{true:1}", 1);
- TEST_ERROR(kParseErrorObjectMissName, "{false:1}", 1);
- TEST_ERROR(kParseErrorObjectMissName, "{1:1}", 1);
- TEST_ERROR(kParseErrorObjectMissName, "{[]:1}", 1);
- TEST_ERROR(kParseErrorObjectMissName, "{{}:1}", 1);
- TEST_ERROR(kParseErrorObjectMissName, "{xyz:1}", 1);
-
- // Missing a colon after a name of object member.
- TEST_ERROR(kParseErrorObjectMissColon, "{\"a\" 1}", 5);
- TEST_ERROR(kParseErrorObjectMissColon, "{\"a\",1}", 4);
-
- // Must be a comma or '}' after an object member
- TEST_ERROR(kParseErrorObjectMissCommaOrCurlyBracket, "{\"a\":1]", 6);
-
- // This tests that MemoryStream is checking the length in Peek().
- {
- MemoryStream ms("{\"a\"", 1);
- BaseReaderHandler<> h;
- Reader reader;
- EXPECT_FALSE(reader.Parse<kParseStopWhenDoneFlag>(ms, h));
- EXPECT_EQ(kParseErrorObjectMissName, reader.GetParseErrorCode());
- }
-}
-
-#undef TEST_ERROR
-
-TEST(Reader, SkipWhitespace) {
- StringStream ss(" A \t\tB\n \n\nC\r\r \rD \t\n\r E");
- const char* expected = "ABCDE";
- for (size_t i = 0; i < 5; i++) {
- SkipWhitespace(ss);
- EXPECT_EQ(expected[i], ss.Take());
- }
-}
-
-// Test implementing a stream without copy stream optimization.
-// Clone from GenericStringStream except that copy constructor is disabled.
-template <typename Encoding>
-class CustomStringStream {
-public:
- typedef typename Encoding::Ch Ch;
-
- CustomStringStream(const Ch *src) : src_(src), head_(src) {}
-
- Ch Peek() const { return *src_; }
- Ch Take() { return *src_++; }
- size_t Tell() const { return static_cast<size_t>(src_ - head_); }
-
- Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; }
- void Put(Ch) { RAPIDJSON_ASSERT(false); }
- void Flush() { RAPIDJSON_ASSERT(false); }
- size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; }
-
-private:
- // Prohibit copy constructor & assignment operator.
- CustomStringStream(const CustomStringStream&);
- CustomStringStream& operator=(const CustomStringStream&);
-
- const Ch* src_; //!< Current read position.
- const Ch* head_; //!< Original head of the string.
-};
-
-// If the following code is compiled, it should generate compilation error as predicted.
-// Because CustomStringStream<> is not copyable via making copy constructor private.
-#if 0
-namespace rapidjson {
-
-template <typename Encoding>
-struct StreamTraits<CustomStringStream<Encoding> > {
- enum { copyOptimization = 1 };
-};
-
-} // namespace rapidjson
-#endif
-
-TEST(Reader, CustomStringStream) {
- const char* json = "{ \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3] } ";
- CustomStringStream<UTF8<char> > s(json);
- ParseObjectHandler h;
- Reader reader;
- reader.Parse(s, h);
- EXPECT_EQ(20u, h.step_);
-}
-
-#include <sstream>
-
-class IStreamWrapper {
-public:
- typedef char Ch;
-
- IStreamWrapper(std::istream& is) : is_(is) {}
-
- Ch Peek() const {
- int c = is_.peek();
- return c == std::char_traits<char>::eof() ? '\0' : static_cast<Ch>(c);
- }
-
- Ch Take() {
- int c = is_.get();
- return c == std::char_traits<char>::eof() ? '\0' : static_cast<Ch>(c);
- }
-
- size_t Tell() const { return static_cast<size_t>(is_.tellg()); }
-
- Ch* PutBegin() { assert(false); return 0; }
- void Put(Ch) { assert(false); }
- void Flush() { assert(false); }
- size_t PutEnd(Ch*) { assert(false); return 0; }
-
-private:
- IStreamWrapper(const IStreamWrapper&);
- IStreamWrapper& operator=(const IStreamWrapper&);
-
- std::istream& is_;
-};
-
-TEST(Reader, Parse_IStreamWrapper_StringStream) {
- const char* json = "[1,2,3,4]";
-
- std::stringstream ss(json);
- IStreamWrapper is(ss);
-
- Reader reader;
- ParseArrayHandler<4> h;
- reader.Parse(is, h);
- EXPECT_FALSE(reader.HasParseError());
-}
-
-// Test iterative parsing.
-
-#define TESTERRORHANDLING(text, errorCode, offset)\
-{\
- int streamPos = offset; \
- StringStream json(text); \
- BaseReaderHandler<> handler; \
- Reader reader; \
- reader.Parse<kParseIterativeFlag>(json, handler); \
- EXPECT_TRUE(reader.HasParseError()); \
- EXPECT_EQ(errorCode, reader.GetParseErrorCode()); \
- EXPECT_EQ(offset, reader.GetErrorOffset()); \
- EXPECT_EQ(streamPos, json.Tell()); \
-}
-
-TEST(Reader, IterativeParsing_ErrorHandling) {
- TESTERRORHANDLING("{\"a\": a}", kParseErrorValueInvalid, 6u);
-
- TESTERRORHANDLING("", kParseErrorDocumentEmpty, 0u);
- TESTERRORHANDLING("{}{}", kParseErrorDocumentRootNotSingular, 2u);
-
- TESTERRORHANDLING("{1}", kParseErrorObjectMissName, 1u);
- TESTERRORHANDLING("{\"a\", 1}", kParseErrorObjectMissColon, 4u);
- TESTERRORHANDLING("{\"a\"}", kParseErrorObjectMissColon, 4u);
- TESTERRORHANDLING("{\"a\": 1", kParseErrorObjectMissCommaOrCurlyBracket, 7u);
- TESTERRORHANDLING("[1 2 3]", kParseErrorArrayMissCommaOrSquareBracket, 3u);
- TESTERRORHANDLING("{\"a: 1", kParseErrorStringMissQuotationMark, 6u);
-
- // Any JSON value can be a valid root element in RFC7159.
- TESTERRORHANDLING("\"ab", kParseErrorStringMissQuotationMark, 3u);
- TESTERRORHANDLING("truE", kParseErrorValueInvalid, 3u);
- TESTERRORHANDLING("False", kParseErrorValueInvalid, 0u);
- TESTERRORHANDLING("true, false", kParseErrorDocumentRootNotSingular, 4u);
- TESTERRORHANDLING("false, false", kParseErrorDocumentRootNotSingular, 5u);
- TESTERRORHANDLING("nulL", kParseErrorValueInvalid, 3u);
- TESTERRORHANDLING("null , null", kParseErrorDocumentRootNotSingular, 5u);
- TESTERRORHANDLING("1a", kParseErrorDocumentRootNotSingular, 1u);
-}
-
-template<typename Encoding = UTF8<> >
-struct IterativeParsingReaderHandler {
- typedef typename Encoding::Ch Ch;
-
- const static int LOG_NULL = -1;
- const static int LOG_BOOL = -2;
- const static int LOG_INT = -3;
- const static int LOG_UINT = -4;
- const static int LOG_INT64 = -5;
- const static int LOG_UINT64 = -6;
- const static int LOG_DOUBLE = -7;
- const static int LOG_STRING = -8;
- const static int LOG_STARTOBJECT = -9;
- const static int LOG_KEY = -10;
- const static int LOG_ENDOBJECT = -11;
- const static int LOG_STARTARRAY = -12;
- const static int LOG_ENDARRAY = -13;
-
- const static size_t LogCapacity = 256;
- int Logs[LogCapacity];
- size_t LogCount;
-
- IterativeParsingReaderHandler() : LogCount(0) {
- }
-
- bool Null() { RAPIDJSON_ASSERT(LogCount < LogCapacity); Logs[LogCount++] = LOG_NULL; return true; }
-
- bool Bool(bool) { RAPIDJSON_ASSERT(LogCount < LogCapacity); Logs[LogCount++] = LOG_BOOL; return true; }
-
- bool Int(int) { RAPIDJSON_ASSERT(LogCount < LogCapacity); Logs[LogCount++] = LOG_INT; return true; }
-
- bool Uint(unsigned) { RAPIDJSON_ASSERT(LogCount < LogCapacity); Logs[LogCount++] = LOG_INT; return true; }
-
- bool Int64(int64_t) { RAPIDJSON_ASSERT(LogCount < LogCapacity); Logs[LogCount++] = LOG_INT64; return true; }
-
- bool Uint64(uint64_t) { RAPIDJSON_ASSERT(LogCount < LogCapacity); Logs[LogCount++] = LOG_UINT64; return true; }
-
- bool Double(double) { RAPIDJSON_ASSERT(LogCount < LogCapacity); Logs[LogCount++] = LOG_DOUBLE; return true; }
-
- bool String(const Ch*, SizeType, bool) { RAPIDJSON_ASSERT(LogCount < LogCapacity); Logs[LogCount++] = LOG_STRING; return true; }
-
- bool StartObject() { RAPIDJSON_ASSERT(LogCount < LogCapacity); Logs[LogCount++] = LOG_STARTOBJECT; return true; }
-
- bool Key (const Ch*, SizeType, bool) { RAPIDJSON_ASSERT(LogCount < LogCapacity); Logs[LogCount++] = LOG_KEY; return true; }
-
- bool EndObject(SizeType c) {
- RAPIDJSON_ASSERT(LogCount < LogCapacity);
- Logs[LogCount++] = LOG_ENDOBJECT;
- Logs[LogCount++] = static_cast<int>(c);
- return true;
- }
-
- bool StartArray() { RAPIDJSON_ASSERT(LogCount < LogCapacity); Logs[LogCount++] = LOG_STARTARRAY; return true; }
-
- bool EndArray(SizeType c) {
- RAPIDJSON_ASSERT(LogCount < LogCapacity);
- Logs[LogCount++] = LOG_ENDARRAY;
- Logs[LogCount++] = static_cast<int>(c);
- return true;
- }
-};
-
-TEST(Reader, IterativeParsing_General) {
- {
- StringStream is("[1, {\"k\": [1, 2]}, null, false, true, \"string\", 1.2]");
- Reader reader;
- IterativeParsingReaderHandler<> handler;
-
- ParseResult r = reader.Parse<kParseIterativeFlag>(is, handler);
-
- EXPECT_FALSE(r.IsError());
- EXPECT_FALSE(reader.HasParseError());
-
- int e[] = {
- handler.LOG_STARTARRAY,
- handler.LOG_INT,
- handler.LOG_STARTOBJECT,
- handler.LOG_KEY,
- handler.LOG_STARTARRAY,
- handler.LOG_INT,
- handler.LOG_INT,
- handler.LOG_ENDARRAY, 2,
- handler.LOG_ENDOBJECT, 1,
- handler.LOG_NULL,
- handler.LOG_BOOL,
- handler.LOG_BOOL,
- handler.LOG_STRING,
- handler.LOG_DOUBLE,
- handler.LOG_ENDARRAY, 7
- };
-
- EXPECT_EQ(sizeof(e) / sizeof(int), handler.LogCount);
-
- for (size_t i = 0; i < handler.LogCount; ++i) {
- EXPECT_EQ(e[i], handler.Logs[i]) << "i = " << i;
- }
- }
-}
-
-TEST(Reader, IterativeParsing_Count) {
- {
- StringStream is("[{}, {\"k\": 1}, [1], []]");
- Reader reader;
- IterativeParsingReaderHandler<> handler;
-
- ParseResult r = reader.Parse<kParseIterativeFlag>(is, handler);
-
- EXPECT_FALSE(r.IsError());
- EXPECT_FALSE(reader.HasParseError());
-
- int e[] = {
- handler.LOG_STARTARRAY,
- handler.LOG_STARTOBJECT,
- handler.LOG_ENDOBJECT, 0,
- handler.LOG_STARTOBJECT,
- handler.LOG_KEY,
- handler.LOG_INT,
- handler.LOG_ENDOBJECT, 1,
- handler.LOG_STARTARRAY,
- handler.LOG_INT,
- handler.LOG_ENDARRAY, 1,
- handler.LOG_STARTARRAY,
- handler.LOG_ENDARRAY, 0,
- handler.LOG_ENDARRAY, 4
- };
-
- EXPECT_EQ(sizeof(e) / sizeof(int), handler.LogCount);
-
- for (size_t i = 0; i < handler.LogCount; ++i) {
- EXPECT_EQ(e[i], handler.Logs[i]) << "i = " << i;
- }
- }
-}
-
-// Test iterative parsing on kParseErrorTermination.
-struct HandlerTerminateAtStartObject : public IterativeParsingReaderHandler<> {
- bool StartObject() { return false; }
-};
-
-struct HandlerTerminateAtStartArray : public IterativeParsingReaderHandler<> {
- bool StartArray() { return false; }
-};
-
-struct HandlerTerminateAtEndObject : public IterativeParsingReaderHandler<> {
- bool EndObject(SizeType) { return false; }
-};
-
-struct HandlerTerminateAtEndArray : public IterativeParsingReaderHandler<> {
- bool EndArray(SizeType) { return false; }
-};
-
-TEST(Reader, IterativeParsing_ShortCircuit) {
- {
- HandlerTerminateAtStartObject handler;
- Reader reader;
- StringStream is("[1, {}]");
-
- ParseResult r = reader.Parse<kParseIterativeFlag>(is, handler);
-
- EXPECT_TRUE(reader.HasParseError());
- EXPECT_EQ(kParseErrorTermination, r.Code());
- EXPECT_EQ(4u, r.Offset());
- }
-
- {
- HandlerTerminateAtStartArray handler;
- Reader reader;
- StringStream is("{\"a\": []}");
-
- ParseResult r = reader.Parse<kParseIterativeFlag>(is, handler);
-
- EXPECT_TRUE(reader.HasParseError());
- EXPECT_EQ(kParseErrorTermination, r.Code());
- EXPECT_EQ(6u, r.Offset());
- }
-
- {
- HandlerTerminateAtEndObject handler;
- Reader reader;
- StringStream is("[1, {}]");
-
- ParseResult r = reader.Parse<kParseIterativeFlag>(is, handler);
-
- EXPECT_TRUE(reader.HasParseError());
- EXPECT_EQ(kParseErrorTermination, r.Code());
- EXPECT_EQ(5u, r.Offset());
- }
-
- {
- HandlerTerminateAtEndArray handler;
- Reader reader;
- StringStream is("{\"a\": []}");
-
- ParseResult r = reader.Parse<kParseIterativeFlag>(is, handler);
-
- EXPECT_TRUE(reader.HasParseError());
- EXPECT_EQ(kParseErrorTermination, r.Code());
- EXPECT_EQ(7u, r.Offset());
- }
-}
-
-// For covering BaseReaderHandler default functions
-TEST(Reader, BaseReaderHandler_Default) {
- BaseReaderHandler<> h;
- Reader reader;
- StringStream is("[null, true, -1, 1, -1234567890123456789, 1234567890123456789, 3.14, \"s\", { \"a\" : 1 }]");
- EXPECT_TRUE(reader.Parse(is, h));
-}
-
-template <int e>
-struct TerminateHandler {
- bool Null() { return e != 0; }
- bool Bool(bool) { return e != 1; }
- bool Int(int) { return e != 2; }
- bool Uint(unsigned) { return e != 3; }
- bool Int64(int64_t) { return e != 4; }
- bool Uint64(uint64_t) { return e != 5; }
- bool Double(double) { return e != 6; }
- bool String(const char*, SizeType, bool) { return e != 7; }
- bool StartObject() { return e != 8; }
- bool Key(const char*, SizeType, bool) { return e != 9; }
- bool EndObject(SizeType) { return e != 10; }
- bool StartArray() { return e != 11; }
- bool EndArray(SizeType) { return e != 12; }
-};
-
-#define TEST_TERMINATION(e, json)\
-{\
- Reader reader;\
- TerminateHandler<e> h;\
- StringStream is(json);\
- EXPECT_FALSE(reader.Parse(is, h));\
- EXPECT_EQ(kParseErrorTermination, reader.GetParseErrorCode());\
-}
-
-TEST(Reader, ParseTerminationByHandler) {
- TEST_TERMINATION(0, "[null");
- TEST_TERMINATION(1, "[true");
- TEST_TERMINATION(1, "[false");
- TEST_TERMINATION(2, "[-1");
- TEST_TERMINATION(3, "[1");
- TEST_TERMINATION(4, "[-1234567890123456789");
- TEST_TERMINATION(5, "[1234567890123456789");
- TEST_TERMINATION(6, "[0.5]");
- TEST_TERMINATION(7, "[\"a\"");
- TEST_TERMINATION(8, "[{");
- TEST_TERMINATION(9, "[{\"a\"");
- TEST_TERMINATION(10, "[{}");
- TEST_TERMINATION(10, "[{\"a\":1}"); // non-empty object
- TEST_TERMINATION(11, "{\"a\":[");
- TEST_TERMINATION(12, "{\"a\":[]");
- TEST_TERMINATION(12, "{\"a\":[1]"); // non-empty array
-}
-
-TEST(Reader, ParseComments) {
- const char* json =
- "// Here is a one-line comment.\n"
- "{// And here's another one\n"
- " /*And here's an in-line one.*/\"hello\" : \"world\","
- " \"t\" :/* And one with '*' symbol*/true ,"
- "/* A multiline comment\n"
- " goes here*/"
- " \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3]"
- "}/*And the last one to be sure */";
-
- StringStream s(json);
- ParseObjectHandler h;
- Reader reader;
- EXPECT_TRUE(reader.Parse<kParseCommentsFlag>(s, h));
- EXPECT_EQ(20u, h.step_);
-}
-
-TEST(Reader, ParseEmptyInlineComment) {
- const char* json = "{/**/\"hello\" : \"world\", \"t\" : true, \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3] }";
-
- StringStream s(json);
- ParseObjectHandler h;
- Reader reader;
- EXPECT_TRUE(reader.Parse<kParseCommentsFlag>(s, h));
- EXPECT_EQ(20u, h.step_);
-}
-
-TEST(Reader, ParseEmptyOnelineComment) {
- const char* json = "{//\n\"hello\" : \"world\", \"t\" : true, \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3] }";
-
- StringStream s(json);
- ParseObjectHandler h;
- Reader reader;
- EXPECT_TRUE(reader.Parse<kParseCommentsFlag>(s, h));
- EXPECT_EQ(20u, h.step_);
-}
-
-TEST(Reader, ParseMultipleCommentsInARow) {
- const char* json =
- "{/* first comment *//* second */\n"
- "/* third */ /*fourth*/// last one\n"
- "\"hello\" : \"world\", \"t\" : true, \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3] }";
-
- StringStream s(json);
- ParseObjectHandler h;
- Reader reader;
- EXPECT_TRUE(reader.Parse<kParseCommentsFlag>(s, h));
- EXPECT_EQ(20u, h.step_);
-}
-
-TEST(Reader, InlineCommentsAreDisabledByDefault) {
- {
- const char* json = "{/* Inline comment. */\"hello\" : \"world\", \"t\" : true, \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3] }";
-
- StringStream s(json);
- ParseObjectHandler h;
- Reader reader;
- EXPECT_FALSE(reader.Parse<kParseDefaultFlags>(s, h));
- }
-
- {
- const char* json =
- "{\"hello\" : /* Multiline comment starts here\n"
- " continues here\n"
- " and ends here */\"world\", \"t\" :true , \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3] }";
-
- StringStream s(json);
- ParseObjectHandler h;
- Reader reader;
- EXPECT_FALSE(reader.Parse<kParseDefaultFlags>(s, h));
- }
-}
-
-TEST(Reader, OnelineCommentsAreDisabledByDefault) {
- const char* json = "{// One-line comment\n\"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3] }";
-
- StringStream s(json);
- ParseObjectHandler h;
- Reader reader;
- EXPECT_FALSE(reader.Parse<kParseDefaultFlags>(s, h));
-}
-
-TEST(Reader, EofAfterOneLineComment) {
- const char* json = "{\"hello\" : \"world\" // EOF is here -->\0 \n}";
-
- StringStream s(json);
- ParseObjectHandler h;
- Reader reader;
- EXPECT_FALSE(reader.Parse<kParseCommentsFlag>(s, h));
- EXPECT_EQ(kParseErrorObjectMissCommaOrCurlyBracket, reader.GetParseErrorCode());
-}
-
-TEST(Reader, IncompleteMultilineComment) {
- const char* json = "{\"hello\" : \"world\" /* EOF is here -->\0 */}";
-
- StringStream s(json);
- ParseObjectHandler h;
- Reader reader;
- EXPECT_FALSE(reader.Parse<kParseCommentsFlag>(s, h));
- EXPECT_EQ(kParseErrorUnspecificSyntaxError, reader.GetParseErrorCode());
-}
-
-TEST(Reader, IncompleteMultilineComment2) {
- const char* json = "{\"hello\" : \"world\" /* *\0 */}";
-
- StringStream s(json);
- ParseObjectHandler h;
- Reader reader;
- EXPECT_FALSE(reader.Parse<kParseCommentsFlag>(s, h));
- EXPECT_EQ(kParseErrorUnspecificSyntaxError, reader.GetParseErrorCode());
-}
-
-TEST(Reader, UnrecognizedComment) {
- const char* json = "{\"hello\" : \"world\" /! }";
-
- StringStream s(json);
- ParseObjectHandler h;
- Reader reader;
- EXPECT_FALSE(reader.Parse<kParseCommentsFlag>(s, h));
- EXPECT_EQ(kParseErrorUnspecificSyntaxError, reader.GetParseErrorCode());
-}
-
-#ifdef __GNUC__
-RAPIDJSON_DIAG_POP
-#endif
-
-#ifdef __clang__
-RAPIDJSON_DIAG_POP
-#endif
diff --git a/3rdparty/rapidjson/test/unittest/regextest.cpp b/3rdparty/rapidjson/test/unittest/regextest.cpp
deleted file mode 100644
index e3371d168ca..00000000000
--- a/3rdparty/rapidjson/test/unittest/regextest.cpp
+++ /dev/null
@@ -1,576 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 "unittest.h"
-#include "rapidjson/internal/regex.h"
-
-using namespace rapidjson::internal;
-
-TEST(Regex, Concatenation) {
- Regex re("abc");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match("abc"));
- EXPECT_FALSE(re.Match(""));
- EXPECT_FALSE(re.Match("a"));
- EXPECT_FALSE(re.Match("b"));
- EXPECT_FALSE(re.Match("ab"));
- EXPECT_FALSE(re.Match("abcd"));
-}
-
-TEST(Regex, Alternation1) {
- Regex re("abab|abbb");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match("abab"));
- EXPECT_TRUE(re.Match("abbb"));
- EXPECT_FALSE(re.Match(""));
- EXPECT_FALSE(re.Match("ab"));
- EXPECT_FALSE(re.Match("ababa"));
- EXPECT_FALSE(re.Match("abb"));
- EXPECT_FALSE(re.Match("abbbb"));
-}
-
-TEST(Regex, Alternation2) {
- Regex re("a|b|c");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match("a"));
- EXPECT_TRUE(re.Match("b"));
- EXPECT_TRUE(re.Match("c"));
- EXPECT_FALSE(re.Match(""));
- EXPECT_FALSE(re.Match("aa"));
- EXPECT_FALSE(re.Match("ab"));
-}
-
-TEST(Regex, Parenthesis1) {
- Regex re("(ab)c");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match("abc"));
- EXPECT_FALSE(re.Match(""));
- EXPECT_FALSE(re.Match("a"));
- EXPECT_FALSE(re.Match("b"));
- EXPECT_FALSE(re.Match("ab"));
- EXPECT_FALSE(re.Match("abcd"));
-}
-
-TEST(Regex, Parenthesis2) {
- Regex re("a(bc)");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match("abc"));
- EXPECT_FALSE(re.Match(""));
- EXPECT_FALSE(re.Match("a"));
- EXPECT_FALSE(re.Match("b"));
- EXPECT_FALSE(re.Match("ab"));
- EXPECT_FALSE(re.Match("abcd"));
-}
-
-TEST(Regex, Parenthesis3) {
- Regex re("(a|b)(c|d)");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match("ac"));
- EXPECT_TRUE(re.Match("ad"));
- EXPECT_TRUE(re.Match("bc"));
- EXPECT_TRUE(re.Match("bd"));
- EXPECT_FALSE(re.Match(""));
- EXPECT_FALSE(re.Match("ab"));
- EXPECT_FALSE(re.Match("cd"));
-}
-
-TEST(Regex, ZeroOrOne1) {
- Regex re("a?");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match(""));
- EXPECT_TRUE(re.Match("a"));
- EXPECT_FALSE(re.Match("aa"));
-}
-
-TEST(Regex, ZeroOrOne2) {
- Regex re("a?b");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match("b"));
- EXPECT_TRUE(re.Match("ab"));
- EXPECT_FALSE(re.Match("a"));
- EXPECT_FALSE(re.Match("aa"));
- EXPECT_FALSE(re.Match("bb"));
- EXPECT_FALSE(re.Match("ba"));
-}
-
-TEST(Regex, ZeroOrOne3) {
- Regex re("ab?");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match("a"));
- EXPECT_TRUE(re.Match("ab"));
- EXPECT_FALSE(re.Match("b"));
- EXPECT_FALSE(re.Match("aa"));
- EXPECT_FALSE(re.Match("bb"));
- EXPECT_FALSE(re.Match("ba"));
-}
-
-TEST(Regex, ZeroOrOne4) {
- Regex re("a?b?");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match(""));
- EXPECT_TRUE(re.Match("a"));
- EXPECT_TRUE(re.Match("b"));
- EXPECT_TRUE(re.Match("ab"));
- EXPECT_FALSE(re.Match("aa"));
- EXPECT_FALSE(re.Match("bb"));
- EXPECT_FALSE(re.Match("ba"));
- EXPECT_FALSE(re.Match("abc"));
-}
-
-TEST(Regex, ZeroOrOne5) {
- Regex re("a(ab)?b");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match("ab"));
- EXPECT_TRUE(re.Match("aabb"));
- EXPECT_FALSE(re.Match("aab"));
- EXPECT_FALSE(re.Match("abb"));
-}
-
-TEST(Regex, ZeroOrMore1) {
- Regex re("a*");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match(""));
- EXPECT_TRUE(re.Match("a"));
- EXPECT_TRUE(re.Match("aa"));
- EXPECT_FALSE(re.Match("b"));
- EXPECT_FALSE(re.Match("ab"));
-}
-
-TEST(Regex, ZeroOrMore2) {
- Regex re("a*b");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match("b"));
- EXPECT_TRUE(re.Match("ab"));
- EXPECT_TRUE(re.Match("aab"));
- EXPECT_FALSE(re.Match(""));
- EXPECT_FALSE(re.Match("bb"));
-}
-
-TEST(Regex, ZeroOrMore3) {
- Regex re("a*b*");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match(""));
- EXPECT_TRUE(re.Match("a"));
- EXPECT_TRUE(re.Match("aa"));
- EXPECT_TRUE(re.Match("b"));
- EXPECT_TRUE(re.Match("bb"));
- EXPECT_TRUE(re.Match("ab"));
- EXPECT_TRUE(re.Match("aabb"));
- EXPECT_FALSE(re.Match("ba"));
-}
-
-TEST(Regex, ZeroOrMore4) {
- Regex re("a(ab)*b");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match("ab"));
- EXPECT_TRUE(re.Match("aabb"));
- EXPECT_TRUE(re.Match("aababb"));
- EXPECT_FALSE(re.Match(""));
- EXPECT_FALSE(re.Match("aa"));
-}
-
-TEST(Regex, OneOrMore1) {
- Regex re("a+");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match("a"));
- EXPECT_TRUE(re.Match("aa"));
- EXPECT_FALSE(re.Match(""));
- EXPECT_FALSE(re.Match("b"));
- EXPECT_FALSE(re.Match("ab"));
-}
-
-TEST(Regex, OneOrMore2) {
- Regex re("a+b");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match("ab"));
- EXPECT_TRUE(re.Match("aab"));
- EXPECT_FALSE(re.Match(""));
- EXPECT_FALSE(re.Match("b"));
-}
-
-TEST(Regex, OneOrMore3) {
- Regex re("a+b+");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match("ab"));
- EXPECT_TRUE(re.Match("aab"));
- EXPECT_TRUE(re.Match("abb"));
- EXPECT_TRUE(re.Match("aabb"));
- EXPECT_FALSE(re.Match(""));
- EXPECT_FALSE(re.Match("b"));
- EXPECT_FALSE(re.Match("ba"));
-}
-
-TEST(Regex, OneOrMore4) {
- Regex re("a(ab)+b");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match("aabb"));
- EXPECT_TRUE(re.Match("aababb"));
- EXPECT_FALSE(re.Match(""));
- EXPECT_FALSE(re.Match("ab"));
-}
-
-TEST(Regex, QuantifierExact1) {
- Regex re("ab{3}c");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match("abbbc"));
- EXPECT_FALSE(re.Match("ac"));
- EXPECT_FALSE(re.Match("abc"));
- EXPECT_FALSE(re.Match("abbc"));
- EXPECT_FALSE(re.Match("abbbbc"));
-}
-
-TEST(Regex, QuantifierExact2) {
- Regex re("a(bc){3}d");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match("abcbcbcd"));
- EXPECT_FALSE(re.Match("ad"));
- EXPECT_FALSE(re.Match("abcd"));
- EXPECT_FALSE(re.Match("abcbcd"));
- EXPECT_FALSE(re.Match("abcbcbcbcd"));
-}
-
-TEST(Regex, QuantifierExact3) {
- Regex re("a(b|c){3}d");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match("abbbd"));
- EXPECT_TRUE(re.Match("acccd"));
- EXPECT_TRUE(re.Match("abcbd"));
- EXPECT_FALSE(re.Match("ad"));
- EXPECT_FALSE(re.Match("abbd"));
- EXPECT_FALSE(re.Match("accccd"));
- EXPECT_FALSE(re.Match("abbbbd"));
-}
-
-TEST(Regex, QuantifierMin1) {
- Regex re("ab{3,}c");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match("abbbc"));
- EXPECT_TRUE(re.Match("abbbbc"));
- EXPECT_TRUE(re.Match("abbbbbc"));
- EXPECT_FALSE(re.Match("ac"));
- EXPECT_FALSE(re.Match("abc"));
- EXPECT_FALSE(re.Match("abbc"));
-}
-
-TEST(Regex, QuantifierMin2) {
- Regex re("a(bc){3,}d");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match("abcbcbcd"));
- EXPECT_TRUE(re.Match("abcbcbcbcd"));
- EXPECT_FALSE(re.Match("ad"));
- EXPECT_FALSE(re.Match("abcd"));
- EXPECT_FALSE(re.Match("abcbcd"));
-}
-
-TEST(Regex, QuantifierMin3) {
- Regex re("a(b|c){3,}d");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match("abbbd"));
- EXPECT_TRUE(re.Match("acccd"));
- EXPECT_TRUE(re.Match("abcbd"));
- EXPECT_TRUE(re.Match("accccd"));
- EXPECT_TRUE(re.Match("abbbbd"));
- EXPECT_FALSE(re.Match("ad"));
- EXPECT_FALSE(re.Match("abbd"));
-}
-
-TEST(Regex, QuantifierMinMax1) {
- Regex re("ab{3,5}c");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match("abbbc"));
- EXPECT_TRUE(re.Match("abbbbc"));
- EXPECT_TRUE(re.Match("abbbbbc"));
- EXPECT_FALSE(re.Match("ac"));
- EXPECT_FALSE(re.Match("abc"));
- EXPECT_FALSE(re.Match("abbc"));
- EXPECT_FALSE(re.Match("abbbbbbc"));
-}
-
-TEST(Regex, QuantifierMinMax2) {
- Regex re("a(bc){3,5}d");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match("abcbcbcd"));
- EXPECT_TRUE(re.Match("abcbcbcbcd"));
- EXPECT_TRUE(re.Match("abcbcbcbcbcd"));
- EXPECT_FALSE(re.Match("ad"));
- EXPECT_FALSE(re.Match("abcd"));
- EXPECT_FALSE(re.Match("abcbcd"));
- EXPECT_FALSE(re.Match("abcbcbcbcbcbcd"));
-}
-
-TEST(Regex, QuantifierMinMax3) {
- Regex re("a(b|c){3,5}d");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match("abbbd"));
- EXPECT_TRUE(re.Match("acccd"));
- EXPECT_TRUE(re.Match("abcbd"));
- EXPECT_TRUE(re.Match("accccd"));
- EXPECT_TRUE(re.Match("abbbbd"));
- EXPECT_TRUE(re.Match("acccccd"));
- EXPECT_TRUE(re.Match("abbbbbd"));
- EXPECT_FALSE(re.Match("ad"));
- EXPECT_FALSE(re.Match("abbd"));
- EXPECT_FALSE(re.Match("accccccd"));
- EXPECT_FALSE(re.Match("abbbbbbd"));
-}
-
-// Issue538
-TEST(Regex, QuantifierMinMax4) {
- Regex re("a(b|c){0,3}d");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match("ad"));
- EXPECT_TRUE(re.Match("abd"));
- EXPECT_TRUE(re.Match("acd"));
- EXPECT_TRUE(re.Match("abbd"));
- EXPECT_TRUE(re.Match("accd"));
- EXPECT_TRUE(re.Match("abcd"));
- EXPECT_TRUE(re.Match("abbbd"));
- EXPECT_TRUE(re.Match("acccd"));
- EXPECT_FALSE(re.Match("abbbbd"));
- EXPECT_FALSE(re.Match("add"));
- EXPECT_FALSE(re.Match("accccd"));
- EXPECT_FALSE(re.Match("abcbcd"));
-}
-
-// Issue538
-TEST(Regex, QuantifierMinMax5) {
- Regex re("a(b|c){0,}d");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match("ad"));
- EXPECT_TRUE(re.Match("abd"));
- EXPECT_TRUE(re.Match("acd"));
- EXPECT_TRUE(re.Match("abbd"));
- EXPECT_TRUE(re.Match("accd"));
- EXPECT_TRUE(re.Match("abcd"));
- EXPECT_TRUE(re.Match("abbbd"));
- EXPECT_TRUE(re.Match("acccd"));
- EXPECT_TRUE(re.Match("abbbbd"));
- EXPECT_TRUE(re.Match("accccd"));
- EXPECT_TRUE(re.Match("abcbcd"));
- EXPECT_FALSE(re.Match("add"));
- EXPECT_FALSE(re.Match("aad"));
-}
-
-#define EURO "\xE2\x82\xAC" // "\xE2\x82\xAC" is UTF-8 sequence of Euro sign U+20AC
-
-TEST(Regex, Unicode) {
- Regex re("a" EURO "+b");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match("a" EURO "b"));
- EXPECT_TRUE(re.Match("a" EURO EURO "b"));
- EXPECT_FALSE(re.Match("a?b"));
- EXPECT_FALSE(re.Match("a" EURO "\xAC" "b")); // unaware of UTF-8 will match
-}
-
-TEST(Regex, AnyCharacter) {
- Regex re(".");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match("a"));
- EXPECT_TRUE(re.Match("b"));
- EXPECT_TRUE(re.Match(EURO));
- EXPECT_FALSE(re.Match(""));
- EXPECT_FALSE(re.Match("aa"));
-}
-
-TEST(Regex, CharacterRange1) {
- Regex re("[abc]");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match("a"));
- EXPECT_TRUE(re.Match("b"));
- EXPECT_TRUE(re.Match("c"));
- EXPECT_FALSE(re.Match(""));
- EXPECT_FALSE(re.Match("`"));
- EXPECT_FALSE(re.Match("d"));
- EXPECT_FALSE(re.Match("aa"));
-}
-
-TEST(Regex, CharacterRange2) {
- Regex re("[^abc]");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match("`"));
- EXPECT_TRUE(re.Match("d"));
- EXPECT_FALSE(re.Match("a"));
- EXPECT_FALSE(re.Match("b"));
- EXPECT_FALSE(re.Match("c"));
- EXPECT_FALSE(re.Match(""));
- EXPECT_FALSE(re.Match("aa"));
-}
-
-TEST(Regex, CharacterRange3) {
- Regex re("[a-c]");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match("a"));
- EXPECT_TRUE(re.Match("b"));
- EXPECT_TRUE(re.Match("c"));
- EXPECT_FALSE(re.Match(""));
- EXPECT_FALSE(re.Match("`"));
- EXPECT_FALSE(re.Match("d"));
- EXPECT_FALSE(re.Match("aa"));
-}
-
-TEST(Regex, CharacterRange4) {
- Regex re("[^a-c]");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match("`"));
- EXPECT_TRUE(re.Match("d"));
- EXPECT_FALSE(re.Match("a"));
- EXPECT_FALSE(re.Match("b"));
- EXPECT_FALSE(re.Match("c"));
- EXPECT_FALSE(re.Match(""));
- EXPECT_FALSE(re.Match("aa"));
-}
-
-TEST(Regex, CharacterRange5) {
- Regex re("[-]");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match("-"));
- EXPECT_FALSE(re.Match(""));
- EXPECT_FALSE(re.Match("a"));
-}
-
-TEST(Regex, CharacterRange6) {
- Regex re("[a-]");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match("a"));
- EXPECT_TRUE(re.Match("-"));
- EXPECT_FALSE(re.Match(""));
- EXPECT_FALSE(re.Match("`"));
- EXPECT_FALSE(re.Match("b"));
-}
-
-TEST(Regex, CharacterRange7) {
- Regex re("[-a]");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match("a"));
- EXPECT_TRUE(re.Match("-"));
- EXPECT_FALSE(re.Match(""));
- EXPECT_FALSE(re.Match("`"));
- EXPECT_FALSE(re.Match("b"));
-}
-
-TEST(Regex, CharacterRange8) {
- Regex re("[a-zA-Z0-9]*");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match("Milo"));
- EXPECT_TRUE(re.Match("MT19937"));
- EXPECT_TRUE(re.Match("43"));
- EXPECT_FALSE(re.Match("a_b"));
- EXPECT_FALSE(re.Match("!"));
-}
-
-TEST(Regex, Search) {
- Regex re("abc");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Search("abc"));
- EXPECT_TRUE(re.Search("_abc"));
- EXPECT_TRUE(re.Search("abc_"));
- EXPECT_TRUE(re.Search("_abc_"));
- EXPECT_TRUE(re.Search("__abc__"));
- EXPECT_TRUE(re.Search("abcabc"));
- EXPECT_FALSE(re.Search("a"));
- EXPECT_FALSE(re.Search("ab"));
- EXPECT_FALSE(re.Search("bc"));
- EXPECT_FALSE(re.Search("cba"));
-}
-
-TEST(Regex, Search_BeginAnchor) {
- Regex re("^abc");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Search("abc"));
- EXPECT_TRUE(re.Search("abc_"));
- EXPECT_TRUE(re.Search("abcabc"));
- EXPECT_FALSE(re.Search("_abc"));
- EXPECT_FALSE(re.Search("_abc_"));
- EXPECT_FALSE(re.Search("a"));
- EXPECT_FALSE(re.Search("ab"));
- EXPECT_FALSE(re.Search("bc"));
- EXPECT_FALSE(re.Search("cba"));
-}
-
-TEST(Regex, Search_EndAnchor) {
- Regex re("abc$");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Search("abc"));
- EXPECT_TRUE(re.Search("_abc"));
- EXPECT_TRUE(re.Search("abcabc"));
- EXPECT_FALSE(re.Search("abc_"));
- EXPECT_FALSE(re.Search("_abc_"));
- EXPECT_FALSE(re.Search("a"));
- EXPECT_FALSE(re.Search("ab"));
- EXPECT_FALSE(re.Search("bc"));
- EXPECT_FALSE(re.Search("cba"));
-}
-
-TEST(Regex, Search_BothAnchor) {
- Regex re("^abc$");
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Search("abc"));
- EXPECT_FALSE(re.Search(""));
- EXPECT_FALSE(re.Search("a"));
- EXPECT_FALSE(re.Search("b"));
- EXPECT_FALSE(re.Search("ab"));
- EXPECT_FALSE(re.Search("abcd"));
-}
-
-TEST(Regex, Escape) {
- const char* s = "\\^\\$\\|\\(\\)\\?\\*\\+\\.\\[\\]\\{\\}\\\\\\f\\n\\r\\t\\v[\\b][\\[][\\]]";
- Regex re(s);
- ASSERT_TRUE(re.IsValid());
- EXPECT_TRUE(re.Match("^$|()?*+.[]{}\\\x0C\n\r\t\x0B\b[]"));
- EXPECT_FALSE(re.Match(s)); // Not escaping
-}
-
-TEST(Regex, Invalid) {
-#define TEST_INVALID(s) \
- {\
- Regex re(s);\
- EXPECT_FALSE(re.IsValid());\
- }
-
- TEST_INVALID("");
- TEST_INVALID("a|");
- TEST_INVALID("()");
- TEST_INVALID(")");
- TEST_INVALID("(a))");
- TEST_INVALID("(a|)");
- TEST_INVALID("(a||b)");
- TEST_INVALID("(|b)");
- TEST_INVALID("?");
- TEST_INVALID("*");
- TEST_INVALID("+");
- TEST_INVALID("{");
- TEST_INVALID("{}");
- TEST_INVALID("a{a}");
- TEST_INVALID("a{0}");
- TEST_INVALID("a{-1}");
- TEST_INVALID("a{}");
- // TEST_INVALID("a{0,}"); // Support now
- TEST_INVALID("a{,0}");
- TEST_INVALID("a{1,0}");
- TEST_INVALID("a{-1,0}");
- TEST_INVALID("a{-1,1}");
- TEST_INVALID("[]");
- TEST_INVALID("[^]");
- TEST_INVALID("[\\a]");
- TEST_INVALID("\\a");
-
-#undef TEST_INVALID
-}
-
-TEST(Regex, Issue538) {
- Regex re("^[0-9]+(\\\\.[0-9]+){0,2}");
- EXPECT_TRUE(re.IsValid());
-}
-
-#undef EURO
diff --git a/3rdparty/rapidjson/test/unittest/schematest.cpp b/3rdparty/rapidjson/test/unittest/schematest.cpp
deleted file mode 100644
index 623c65ac61e..00000000000
--- a/3rdparty/rapidjson/test/unittest/schematest.cpp
+++ /dev/null
@@ -1,1157 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 "unittest.h"
-#include "rapidjson/schema.h"
-#include "rapidjson/stringbuffer.h"
-#include "rapidjson/writer.h"
-
-#ifdef __clang__
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(variadic-macros)
-#endif
-
-using namespace rapidjson;
-
-#define TEST_HASHER(json1, json2, expected) \
-{\
- Document d1, d2;\
- d1.Parse(json1);\
- ASSERT_FALSE(d1.HasParseError());\
- d2.Parse(json2);\
- ASSERT_FALSE(d2.HasParseError());\
- internal::Hasher<Value, CrtAllocator> h1, h2;\
- d1.Accept(h1);\
- d2.Accept(h2);\
- ASSERT_TRUE(h1.IsValid());\
- ASSERT_TRUE(h2.IsValid());\
- /*printf("%s: 0x%016llx\n%s: 0x%016llx\n\n", json1, h1.GetHashCode(), json2, h2.GetHashCode());*/\
- EXPECT_TRUE(expected == (h1.GetHashCode() == h2.GetHashCode()));\
-}
-
-TEST(SchemaValidator, Hasher) {
- TEST_HASHER("null", "null", true);
-
- TEST_HASHER("true", "true", true);
- TEST_HASHER("false", "false", true);
- TEST_HASHER("true", "false", false);
- TEST_HASHER("false", "true", false);
- TEST_HASHER("true", "null", false);
- TEST_HASHER("false", "null", false);
-
- TEST_HASHER("1", "1", true);
- TEST_HASHER("1.5", "1.5", true);
- TEST_HASHER("1", "1.0", true);
- TEST_HASHER("1", "-1", false);
- TEST_HASHER("0.0", "-0.0", false);
- TEST_HASHER("1", "true", false);
- TEST_HASHER("0", "false", false);
- TEST_HASHER("0", "null", false);
-
- TEST_HASHER("\"\"", "\"\"", true);
- TEST_HASHER("\"\"", "\"\\u0000\"", false);
- TEST_HASHER("\"Hello\"", "\"Hello\"", true);
- TEST_HASHER("\"Hello\"", "\"World\"", false);
- TEST_HASHER("\"Hello\"", "null", false);
- TEST_HASHER("\"Hello\\u0000\"", "\"Hello\"", false);
- TEST_HASHER("\"\"", "null", false);
- TEST_HASHER("\"\"", "true", false);
- TEST_HASHER("\"\"", "false", false);
-
- TEST_HASHER("[]", "[ ]", true);
- TEST_HASHER("[1, true, false]", "[1, true, false]", true);
- TEST_HASHER("[1, true, false]", "[1, true]", false);
- TEST_HASHER("[1, 2]", "[2, 1]", false);
- TEST_HASHER("[[1], 2]", "[[1, 2]]", false);
- TEST_HASHER("[1, 2]", "[1, [2]]", false);
- TEST_HASHER("[]", "null", false);
- TEST_HASHER("[]", "true", false);
- TEST_HASHER("[]", "false", false);
- TEST_HASHER("[]", "0", false);
- TEST_HASHER("[]", "0.0", false);
- TEST_HASHER("[]", "\"\"", false);
-
- TEST_HASHER("{}", "{ }", true);
- TEST_HASHER("{\"a\":1}", "{\"a\":1}", true);
- TEST_HASHER("{\"a\":1}", "{\"b\":1}", false);
- TEST_HASHER("{\"a\":1}", "{\"a\":2}", false);
- TEST_HASHER("{\"a\":1, \"b\":2}", "{\"b\":2, \"a\":1}", true); // Member order insensitive
- TEST_HASHER("{}", "null", false);
- TEST_HASHER("{}", "false", false);
- TEST_HASHER("{}", "true", false);
- TEST_HASHER("{}", "0", false);
- TEST_HASHER("{}", "0.0", false);
- TEST_HASHER("{}", "\"\"", false);
-}
-
-// Test cases following http://spacetelescope.github.io/understanding-json-schema
-
-#define VALIDATE(schema, json, expected) \
-{\
- SchemaValidator validator(schema);\
- Document d;\
- /*printf("\n%s\n", json);*/\
- d.Parse(json);\
- EXPECT_FALSE(d.HasParseError());\
- EXPECT_TRUE(expected == d.Accept(validator));\
- EXPECT_TRUE(expected == validator.IsValid());\
- if (expected && !validator.IsValid()) {\
- StringBuffer sb;\
- validator.GetInvalidSchemaPointer().StringifyUriFragment(sb);\
- printf("Invalid schema: %s\n", sb.GetString());\
- printf("Invalid keyword: %s\n", validator.GetInvalidSchemaKeyword());\
- sb.Clear();\
- validator.GetInvalidDocumentPointer().StringifyUriFragment(sb);\
- printf("Invalid document: %s\n", sb.GetString());\
- }\
-}
-
-#define INVALIDATE(schema, json, invalidSchemaPointer, invalidSchemaKeyword, invalidDocumentPointer) \
-{\
- SchemaValidator validator(schema);\
- Document d;\
- /*printf("\n%s\n", json);*/\
- d.Parse(json);\
- EXPECT_FALSE(d.HasParseError());\
- EXPECT_FALSE(d.Accept(validator));\
- EXPECT_FALSE(validator.IsValid());\
- if (validator.GetInvalidSchemaPointer() != Pointer(invalidSchemaPointer)) {\
- StringBuffer sb;\
- validator.GetInvalidSchemaPointer().Stringify(sb);\
- printf("GetInvalidSchemaPointer() Expected: %s Actual: %s\n", invalidSchemaPointer, sb.GetString());\
- ADD_FAILURE();\
- }\
- ASSERT_TRUE(validator.GetInvalidSchemaKeyword() != 0);\
- if (strcmp(validator.GetInvalidSchemaKeyword(), invalidSchemaKeyword) != 0) {\
- printf("GetInvalidSchemaKeyword() Expected: %s Actual %s\n", invalidSchemaKeyword, validator.GetInvalidSchemaKeyword());\
- ADD_FAILURE();\
- }\
- if (validator.GetInvalidDocumentPointer() != Pointer(invalidDocumentPointer)) {\
- StringBuffer sb;\
- validator.GetInvalidDocumentPointer().Stringify(sb);\
- printf("GetInvalidDocumentPointer() Expected: %s Actual: %s\n", invalidDocumentPointer, sb.GetString());\
- ADD_FAILURE();\
- }\
-}
-
-TEST(SchemaValidator, Typeless) {
- Document sd;
- sd.Parse("{}");
- SchemaDocument s(sd);
-
- VALIDATE(s, "42", true);
- VALIDATE(s, "\"I'm a string\"", true);
- VALIDATE(s, "{ \"an\": [ \"arbitrarily\", \"nested\" ], \"data\": \"structure\" }", true);
-}
-
-TEST(SchemaValidator, MultiType) {
- Document sd;
- sd.Parse("{ \"type\": [\"number\", \"string\"] }");
- SchemaDocument s(sd);
-
- VALIDATE(s, "42", true);
- VALIDATE(s, "\"Life, the universe, and everything\"", true);
- INVALIDATE(s, "[\"Life\", \"the universe\", \"and everything\"]", "", "type", "");
-}
-
-TEST(SchemaValidator, Enum_Typed) {
- Document sd;
- sd.Parse("{ \"type\": \"string\", \"enum\" : [\"red\", \"amber\", \"green\"] }");
- SchemaDocument s(sd);
-
- VALIDATE(s, "\"red\"", true);
- INVALIDATE(s, "\"blue\"", "", "enum", "");
-}
-
-TEST(SchemaValidator, Enum_Typless) {
- Document sd;
- sd.Parse("{ \"enum\": [\"red\", \"amber\", \"green\", null, 42] }");
- SchemaDocument s(sd);
-
- VALIDATE(s, "\"red\"", true);
- VALIDATE(s, "null", true);
- VALIDATE(s, "42", true);
- INVALIDATE(s, "0", "", "enum", "");
-}
-
-TEST(SchemaValidator, Enum_InvalidType) {
- Document sd;
- sd.Parse("{ \"type\": \"string\", \"enum\": [\"red\", \"amber\", \"green\", null] }");
- SchemaDocument s(sd);
-
- VALIDATE(s, "\"red\"", true);
- INVALIDATE(s, "null", "", "type", "");
-}
-
-TEST(SchemaValidator, AllOf) {
- {
- Document sd;
- sd.Parse("{\"allOf\": [{ \"type\": \"string\" }, { \"type\": \"string\", \"maxLength\": 5 }]}");
- SchemaDocument s(sd);
-
- VALIDATE(s, "\"ok\"", true);
- INVALIDATE(s, "\"too long\"", "", "allOf", "");
- }
- {
- Document sd;
- sd.Parse("{\"allOf\": [{ \"type\": \"string\" }, { \"type\": \"number\" } ] }");
- SchemaDocument s(sd);
-
- VALIDATE(s, "\"No way\"", false);
- INVALIDATE(s, "-1", "", "allOf", "");
- }
-}
-
-TEST(SchemaValidator, AnyOf) {
- Document sd;
- sd.Parse("{\"anyOf\": [{ \"type\": \"string\" }, { \"type\": \"number\" } ] }");
- SchemaDocument s(sd);
-
- VALIDATE(s, "\"Yes\"", true);
- VALIDATE(s, "42", true);
- INVALIDATE(s, "{ \"Not a\": \"string or number\" }", "", "anyOf", "");
-}
-
-TEST(SchemaValidator, OneOf) {
- Document sd;
- sd.Parse("{\"oneOf\": [{ \"type\": \"number\", \"multipleOf\": 5 }, { \"type\": \"number\", \"multipleOf\": 3 } ] }");
- SchemaDocument s(sd);
-
- VALIDATE(s, "10", true);
- VALIDATE(s, "9", true);
- INVALIDATE(s, "2", "", "oneOf", "");
- INVALIDATE(s, "15", "", "oneOf", "");
-}
-
-TEST(SchemaValidator, Not) {
- Document sd;
- sd.Parse("{\"not\":{ \"type\": \"string\"}}");
- SchemaDocument s(sd);
-
- VALIDATE(s, "42", true);
- VALIDATE(s, "{ \"key\": \"value\" }", true);
- INVALIDATE(s, "\"I am a string\"", "", "not", "");
-}
-
-TEST(SchemaValidator, Ref) {
- Document sd;
- sd.Parse(
- "{"
- " \"$schema\": \"http://json-schema.org/draft-04/schema#\","
- ""
- " \"definitions\": {"
- " \"address\": {"
- " \"type\": \"object\","
- " \"properties\": {"
- " \"street_address\": { \"type\": \"string\" },"
- " \"city\": { \"type\": \"string\" },"
- " \"state\": { \"type\": \"string\" }"
- " },"
- " \"required\": [\"street_address\", \"city\", \"state\"]"
- " }"
- " },"
- " \"type\": \"object\","
- " \"properties\": {"
- " \"billing_address\": { \"$ref\": \"#/definitions/address\" },"
- " \"shipping_address\": { \"$ref\": \"#/definitions/address\" }"
- " }"
- "}");
- SchemaDocument s(sd);
-
- VALIDATE(s, "{\"shipping_address\": {\"street_address\": \"1600 Pennsylvania Avenue NW\", \"city\": \"Washington\", \"state\": \"DC\"}, \"billing_address\": {\"street_address\": \"1st Street SE\", \"city\": \"Washington\", \"state\": \"DC\"} }", true);
-}
-
-TEST(SchemaValidator, Ref_AllOf) {
- Document sd;
- sd.Parse(
- "{"
- " \"$schema\": \"http://json-schema.org/draft-04/schema#\","
- ""
- " \"definitions\": {"
- " \"address\": {"
- " \"type\": \"object\","
- " \"properties\": {"
- " \"street_address\": { \"type\": \"string\" },"
- " \"city\": { \"type\": \"string\" },"
- " \"state\": { \"type\": \"string\" }"
- " },"
- " \"required\": [\"street_address\", \"city\", \"state\"]"
- " }"
- " },"
- " \"type\": \"object\","
- " \"properties\": {"
- " \"billing_address\": { \"$ref\": \"#/definitions/address\" },"
- " \"shipping_address\": {"
- " \"allOf\": ["
- " { \"$ref\": \"#/definitions/address\" },"
- " { \"properties\":"
- " { \"type\": { \"enum\": [ \"residential\", \"business\" ] } },"
- " \"required\": [\"type\"]"
- " }"
- " ]"
- " }"
- " }"
- "}");
- SchemaDocument s(sd);
-
- INVALIDATE(s, "{\"shipping_address\": {\"street_address\": \"1600 Pennsylvania Avenue NW\", \"city\": \"Washington\", \"state\": \"DC\"} }", "/properties/shipping_address", "allOf", "/shipping_address");
- VALIDATE(s, "{\"shipping_address\": {\"street_address\": \"1600 Pennsylvania Avenue NW\", \"city\": \"Washington\", \"state\": \"DC\", \"type\": \"business\"} }", true);
-}
-
-TEST(SchemaValidator, String) {
- Document sd;
- sd.Parse("{\"type\":\"string\"}");
- SchemaDocument s(sd);
-
- VALIDATE(s, "\"I'm a string\"", true);
- INVALIDATE(s, "42", "", "type", "");
-}
-
-TEST(SchemaValidator, String_LengthRange) {
- Document sd;
- sd.Parse("{\"type\":\"string\",\"minLength\":2,\"maxLength\":3}");
- SchemaDocument s(sd);
-
- INVALIDATE(s, "\"A\"", "", "minLength", "");
- VALIDATE(s, "\"AB\"", true);
- VALIDATE(s, "\"ABC\"", true);
- INVALIDATE(s, "\"ABCD\"", "", "maxLength", "");
-}
-
-#if RAPIDJSON_SCHEMA_HAS_REGEX
-TEST(SchemaValidator, String_Pattern) {
- Document sd;
- sd.Parse("{\"type\":\"string\",\"pattern\":\"^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$\"}");
- SchemaDocument s(sd);
-
- VALIDATE(s, "\"555-1212\"", true);
- VALIDATE(s, "\"(888)555-1212\"", true);
- INVALIDATE(s, "\"(888)555-1212 ext. 532\"", "", "pattern", "");
- INVALIDATE(s, "\"(800)FLOWERS\"", "", "pattern", "");
-}
-#endif
-
-TEST(SchemaValidator, Integer) {
- Document sd;
- sd.Parse("{\"type\":\"integer\"}");
- SchemaDocument s(sd);
-
- VALIDATE(s, "42", true);
- VALIDATE(s, "-1", true);
- INVALIDATE(s, "3.1415926", "", "type", "");
- INVALIDATE(s, "\"42\"", "", "type", "");
-}
-
-TEST(SchemaValidator, Integer_Range) {
- Document sd;
- sd.Parse("{\"type\":\"integer\",\"minimum\":0,\"maximum\":100,\"exclusiveMaximum\":true}");
- SchemaDocument s(sd);
-
- INVALIDATE(s, "-1", "", "minimum", "");
- VALIDATE(s, "0", true);
- VALIDATE(s, "10", true);
- VALIDATE(s, "99", true);
- INVALIDATE(s, "100", "", "maximum", "");
- INVALIDATE(s, "101", "", "maximum", "");
-}
-
-TEST(SchemaValidator, Integer_Range64Boundary) {
- Document sd;
- sd.Parse("{\"type\":\"integer\",\"minimum\":-9223372036854775807,\"maximum\":18446744073709551614}");
- SchemaDocument s(sd);
-
- INVALIDATE(s, "-9223372036854775808", "", "minimum", "");
- VALIDATE(s, "-9223372036854775807", true);
- VALIDATE(s, "18446744073709551614", true);
- INVALIDATE(s, "18446744073709551615", "", "maximum", "");
-}
-
-TEST(SchemaValidator, Integer_Range64BoundaryExclusive) {
- Document sd;
- sd.Parse("{\"type\":\"integer\",\"minimum\":-9223372036854775808,\"maximum\":18446744073709551615,\"exclusiveMinimum\":true,\"exclusiveMaximum\":true}");
- SchemaDocument s(sd);
-
- INVALIDATE(s, "-9223372036854775808", "", "minimum", "");
- VALIDATE(s, "-9223372036854775807", true);
- VALIDATE(s, "18446744073709551614", true);
- INVALIDATE(s, "18446744073709551615", "", "maximum", "");
-}
-
-TEST(SchemaValidator, Integer_MultipleOf) {
- Document sd;
- sd.Parse("{\"type\":\"integer\",\"multipleOf\":10}");
- SchemaDocument s(sd);
-
- VALIDATE(s, "0", true);
- VALIDATE(s, "10", true);
- VALIDATE(s, "-10", true);
- VALIDATE(s, "20", true);
- INVALIDATE(s, "23", "", "multipleOf", "");
- INVALIDATE(s, "-23", "", "multipleOf", "");
-}
-
-TEST(SchemaValidator, Integer_MultipleOf64Boundary) {
- Document sd;
- sd.Parse("{\"type\":\"integer\",\"multipleOf\":18446744073709551615}");
- SchemaDocument s(sd);
-
- VALIDATE(s, "0", true);
- VALIDATE(s, "18446744073709551615", true);
- INVALIDATE(s, "18446744073709551614", "", "multipleOf", "");
-}
-
-TEST(SchemaValidator, Number_Range) {
- Document sd;
- sd.Parse("{\"type\":\"number\",\"minimum\":0,\"maximum\":100,\"exclusiveMaximum\":true}");
- SchemaDocument s(sd);
-
- INVALIDATE(s, "-1", "", "minimum", "");
- VALIDATE(s, "0", true);
- VALIDATE(s, "10", true);
- VALIDATE(s, "99", true);
- INVALIDATE(s, "100", "", "maximum", "");
- INVALIDATE(s, "101", "", "maximum", "");
-}
-
-TEST(SchemaValidator, Number_MultipleOf) {
- Document sd;
- sd.Parse("{\"type\":\"number\",\"multipleOf\":10.0}");
- SchemaDocument s(sd);
-
- VALIDATE(s, "0", true);
- VALIDATE(s, "10", true);
- VALIDATE(s, "-10", true);
- VALIDATE(s, "20", true);
- INVALIDATE(s, "23", "", "multipleOf", "");
-}
-
-TEST(SchemaValidator, Number_MultipleOfOne) {
- Document sd;
- sd.Parse("{\"type\":\"number\",\"multipleOf\":1}");
- SchemaDocument s(sd);
-
- VALIDATE(s, "42", true);
- VALIDATE(s, "42.0", true);
- INVALIDATE(s, "3.1415926", "", "multipleOf", "");
-}
-
-TEST(SchemaValidator, Object) {
- Document sd;
- sd.Parse("{\"type\":\"object\"}");
- SchemaDocument s(sd);
-
- VALIDATE(s, "{\"key\":\"value\",\"another_key\":\"another_value\"}", true);
- VALIDATE(s, "{\"Sun\":1.9891e30,\"Jupiter\":1.8986e27,\"Saturn\":5.6846e26,\"Neptune\":10.243e25,\"Uranus\":8.6810e25,\"Earth\":5.9736e24,\"Venus\":4.8685e24,\"Mars\":6.4185e23,\"Mercury\":3.3022e23,\"Moon\":7.349e22,\"Pluto\":1.25e22}", true);
- INVALIDATE(s, "[\"An\", \"array\", \"not\", \"an\", \"object\"]", "", "type", "");
- INVALIDATE(s, "\"Not an object\"", "", "type", "");
-}
-
-TEST(SchemaValidator, Object_Properties) {
- Document sd;
- sd.Parse(
- "{"
- " \"type\": \"object\","
- " \"properties\" : {"
- " \"number\": { \"type\": \"number\" },"
- " \"street_name\" : { \"type\": \"string\" },"
- " \"street_type\" : { \"type\": \"string\", \"enum\" : [\"Street\", \"Avenue\", \"Boulevard\"] }"
- " }"
- "}");
-
- SchemaDocument s(sd);
-
- VALIDATE(s, "{ \"number\": 1600, \"street_name\": \"Pennsylvania\", \"street_type\": \"Avenue\" }", true);
- INVALIDATE(s, "{ \"number\": \"1600\", \"street_name\": \"Pennsylvania\", \"street_type\": \"Avenue\" }", "/properties/number", "type", "/number");
- VALIDATE(s, "{ \"number\": 1600, \"street_name\": \"Pennsylvania\" }", true);
- VALIDATE(s, "{}", true);
- VALIDATE(s, "{ \"number\": 1600, \"street_name\": \"Pennsylvania\", \"street_type\": \"Avenue\", \"direction\": \"NW\" }", true);
-}
-
-TEST(SchemaValidator, Object_AdditionalPropertiesBoolean) {
- Document sd;
- sd.Parse(
- "{"
- " \"type\": \"object\","
- " \"properties\" : {"
- " \"number\": { \"type\": \"number\" },"
- " \"street_name\" : { \"type\": \"string\" },"
- " \"street_type\" : { \"type\": \"string\","
- " \"enum\" : [\"Street\", \"Avenue\", \"Boulevard\"]"
- " }"
- " },"
- " \"additionalProperties\": false"
- "}");
-
- SchemaDocument s(sd);
-
- VALIDATE(s, "{ \"number\": 1600, \"street_name\": \"Pennsylvania\", \"street_type\": \"Avenue\" }", true);
- INVALIDATE(s, "{ \"number\": 1600, \"street_name\": \"Pennsylvania\", \"street_type\": \"Avenue\", \"direction\": \"NW\" }", "", "additionalProperties", "/direction");
-}
-
-TEST(SchemaValidator, Object_AdditionalPropertiesObject) {
- Document sd;
- sd.Parse(
- "{"
- " \"type\": \"object\","
- " \"properties\" : {"
- " \"number\": { \"type\": \"number\" },"
- " \"street_name\" : { \"type\": \"string\" },"
- " \"street_type\" : { \"type\": \"string\","
- " \"enum\" : [\"Street\", \"Avenue\", \"Boulevard\"]"
- " }"
- " },"
- " \"additionalProperties\": { \"type\": \"string\" }"
- "}");
- SchemaDocument s(sd);
-
- VALIDATE(s, "{ \"number\": 1600, \"street_name\": \"Pennsylvania\", \"street_type\": \"Avenue\" }", true);
- VALIDATE(s, "{ \"number\": 1600, \"street_name\": \"Pennsylvania\", \"street_type\": \"Avenue\", \"direction\": \"NW\" }", true);
- INVALIDATE(s, "{ \"number\": 1600, \"street_name\": \"Pennsylvania\", \"street_type\": \"Avenue\", \"office_number\": 201 }", "/additionalProperties", "type", "/office_number");
-}
-
-TEST(SchemaValidator, Object_Required) {
- Document sd;
- sd.Parse(
- "{"
- " \"type\": \"object\","
- " \"properties\" : {"
- " \"name\": { \"type\": \"string\" },"
- " \"email\" : { \"type\": \"string\" },"
- " \"address\" : { \"type\": \"string\" },"
- " \"telephone\" : { \"type\": \"string\" }"
- " },"
- " \"required\":[\"name\", \"email\"]"
- "}");
- SchemaDocument s(sd);
-
- VALIDATE(s, "{ \"name\": \"William Shakespeare\", \"email\" : \"bill@stratford-upon-avon.co.uk\" }", true);
- VALIDATE(s, "{ \"name\": \"William Shakespeare\", \"email\" : \"bill@stratford-upon-avon.co.uk\", \"address\" : \"Henley Street, Stratford-upon-Avon, Warwickshire, England\", \"authorship\" : \"in question\"}", true);
- INVALIDATE(s, "{ \"name\": \"William Shakespeare\", \"address\" : \"Henley Street, Stratford-upon-Avon, Warwickshire, England\" }", "", "required", "");
-}
-
-
-TEST(SchemaValidator, Object_PropertiesRange) {
- Document sd;
- sd.Parse("{\"type\":\"object\", \"minProperties\":2, \"maxProperties\":3}");
- SchemaDocument s(sd);
-
- INVALIDATE(s, "{}", "", "minProperties", "");
- INVALIDATE(s, "{\"a\":0}", "", "minProperties", "");
- VALIDATE(s, "{\"a\":0,\"b\":1}", true);
- VALIDATE(s, "{\"a\":0,\"b\":1,\"c\":2}", true);
- INVALIDATE(s, "{\"a\":0,\"b\":1,\"c\":2,\"d\":3}", "", "maxProperties", "");
-}
-
-TEST(SchemaValidator, Object_PropertyDependencies) {
- Document sd;
- sd.Parse(
- "{"
- " \"type\": \"object\","
- " \"properties\": {"
- " \"name\": { \"type\": \"string\" },"
- " \"credit_card\": { \"type\": \"number\" },"
- " \"billing_address\": { \"type\": \"string\" }"
- " },"
- " \"required\": [\"name\"],"
- " \"dependencies\": {"
- " \"credit_card\": [\"billing_address\"]"
- " }"
- "}");
- SchemaDocument s(sd);
-
- VALIDATE(s, "{ \"name\": \"John Doe\", \"credit_card\": 5555555555555555, \"billing_address\": \"555 Debtor's Lane\" }", true);
- INVALIDATE(s, "{ \"name\": \"John Doe\", \"credit_card\": 5555555555555555 }", "", "dependencies", "");
- VALIDATE(s, "{ \"name\": \"John Doe\"}", true);
- VALIDATE(s, "{ \"name\": \"John Doe\", \"billing_address\": \"555 Debtor's Lane\" }", true);
-}
-
-TEST(SchemaValidator, Object_SchemaDependencies) {
- Document sd;
- sd.Parse(
- "{"
- " \"type\": \"object\","
- " \"properties\" : {"
- " \"name\": { \"type\": \"string\" },"
- " \"credit_card\" : { \"type\": \"number\" }"
- " },"
- " \"required\" : [\"name\"],"
- " \"dependencies\" : {"
- " \"credit_card\": {"
- " \"properties\": {"
- " \"billing_address\": { \"type\": \"string\" }"
- " },"
- " \"required\" : [\"billing_address\"]"
- " }"
- " }"
- "}");
- SchemaDocument s(sd);
-
- VALIDATE(s, "{\"name\": \"John Doe\", \"credit_card\" : 5555555555555555,\"billing_address\" : \"555 Debtor's Lane\"}", true);
- INVALIDATE(s, "{\"name\": \"John Doe\", \"credit_card\" : 5555555555555555 }", "", "dependencies", "");
- VALIDATE(s, "{\"name\": \"John Doe\", \"billing_address\" : \"555 Debtor's Lane\"}", true);
-}
-
-#if RAPIDJSON_SCHEMA_HAS_REGEX
-TEST(SchemaValidator, Object_PatternProperties) {
- Document sd;
- sd.Parse(
- "{"
- " \"type\": \"object\","
- " \"patternProperties\": {"
- " \"^S_\": { \"type\": \"string\" },"
- " \"^I_\": { \"type\": \"integer\" }"
- " }"
- "}");
- SchemaDocument s(sd);
-
- VALIDATE(s, "{ \"S_25\": \"This is a string\" }", true);
- VALIDATE(s, "{ \"I_0\": 42 }", true);
- INVALIDATE(s, "{ \"S_0\": 42 }", "", "patternProperties", "/S_0");
- INVALIDATE(s, "{ \"I_42\": \"This is a string\" }", "", "patternProperties", "/I_42");
- VALIDATE(s, "{ \"keyword\": \"value\" }", true);
-}
-
-TEST(SchemaValidator, Object_PatternProperties_AdditionalProperties) {
- Document sd;
- sd.Parse(
- "{"
- " \"type\": \"object\","
- " \"properties\": {"
- " \"builtin\": { \"type\": \"number\" }"
- " },"
- " \"patternProperties\": {"
- " \"^S_\": { \"type\": \"string\" },"
- " \"^I_\": { \"type\": \"integer\" }"
- " },"
- " \"additionalProperties\": { \"type\": \"string\" }"
- "}");
- SchemaDocument s(sd);
-
- VALIDATE(s, "{ \"builtin\": 42 }", true);
- VALIDATE(s, "{ \"keyword\": \"value\" }", true);
- INVALIDATE(s, "{ \"keyword\": 42 }", "/additionalProperties", "type", "/keyword");
-}
-#endif
-
-TEST(SchemaValidator, Array) {
- Document sd;
- sd.Parse("{\"type\":\"array\"}");
- SchemaDocument s(sd);
-
- VALIDATE(s, "[1, 2, 3, 4, 5]", true);
- VALIDATE(s, "[3, \"different\", { \"types\" : \"of values\" }]", true);
- INVALIDATE(s, "{\"Not\": \"an array\"}", "", "type", "");
-}
-
-TEST(SchemaValidator, Array_ItemsList) {
- Document sd;
- sd.Parse(
- "{"
- " \"type\": \"array\","
- " \"items\" : {"
- " \"type\": \"number\""
- " }"
- "}");
- SchemaDocument s(sd);
-
- VALIDATE(s, "[1, 2, 3, 4, 5]", true);
- INVALIDATE(s, "[1, 2, \"3\", 4, 5]", "/items", "type", "/2");
- VALIDATE(s, "[]", true);
-}
-
-TEST(SchemaValidator, Array_ItemsTuple) {
- Document sd;
- sd.Parse(
- "{"
- " \"type\": \"array\","
- " \"items\": ["
- " {"
- " \"type\": \"number\""
- " },"
- " {"
- " \"type\": \"string\""
- " },"
- " {"
- " \"type\": \"string\","
- " \"enum\": [\"Street\", \"Avenue\", \"Boulevard\"]"
- " },"
- " {"
- " \"type\": \"string\","
- " \"enum\": [\"NW\", \"NE\", \"SW\", \"SE\"]"
- " }"
- " ]"
- "}");
- SchemaDocument s(sd);
-
- VALIDATE(s, "[1600, \"Pennsylvania\", \"Avenue\", \"NW\"]", true);
- INVALIDATE(s, "[24, \"Sussex\", \"Drive\"]", "/items/2", "enum", "/2");
- INVALIDATE(s, "[\"Palais de l'Elysee\"]", "/items/0", "type", "/0");
- VALIDATE(s, "[10, \"Downing\", \"Street\"]", true);
- VALIDATE(s, "[1600, \"Pennsylvania\", \"Avenue\", \"NW\", \"Washington\"]", true);
-}
-
-TEST(SchemaValidator, Array_AdditionalItmes) {
- Document sd;
- sd.Parse(
- "{"
- " \"type\": \"array\","
- " \"items\": ["
- " {"
- " \"type\": \"number\""
- " },"
- " {"
- " \"type\": \"string\""
- " },"
- " {"
- " \"type\": \"string\","
- " \"enum\": [\"Street\", \"Avenue\", \"Boulevard\"]"
- " },"
- " {"
- " \"type\": \"string\","
- " \"enum\": [\"NW\", \"NE\", \"SW\", \"SE\"]"
- " }"
- " ],"
- " \"additionalItems\": false"
- "}");
- SchemaDocument s(sd);
-
- VALIDATE(s, "[1600, \"Pennsylvania\", \"Avenue\", \"NW\"]", true);
- VALIDATE(s, "[1600, \"Pennsylvania\", \"Avenue\"]", true);
- INVALIDATE(s, "[1600, \"Pennsylvania\", \"Avenue\", \"NW\", \"Washington\"]", "", "items", "/4");
-}
-
-TEST(SchemaValidator, Array_ItemsRange) {
- Document sd;
- sd.Parse("{\"type\": \"array\",\"minItems\": 2,\"maxItems\" : 3}");
- SchemaDocument s(sd);
-
- INVALIDATE(s, "[]", "", "minItems", "");
- INVALIDATE(s, "[1]", "", "minItems", "");
- VALIDATE(s, "[1, 2]", true);
- VALIDATE(s, "[1, 2, 3]", true);
- INVALIDATE(s, "[1, 2, 3, 4]", "", "maxItems", "");
-}
-
-TEST(SchemaValidator, Array_UniqueItems) {
- Document sd;
- sd.Parse("{\"type\": \"array\", \"uniqueItems\": true}");
- SchemaDocument s(sd);
-
- VALIDATE(s, "[1, 2, 3, 4, 5]", true);
- INVALIDATE(s, "[1, 2, 3, 3, 4]", "", "uniqueItems", "/3");
- VALIDATE(s, "[]", true);
-}
-
-TEST(SchemaValidator, Boolean) {
- Document sd;
- sd.Parse("{\"type\":\"boolean\"}");
- SchemaDocument s(sd);
-
- VALIDATE(s, "true", true);
- VALIDATE(s, "false", true);
- INVALIDATE(s, "\"true\"", "", "type", "");
- INVALIDATE(s, "0", "", "type", "");
-}
-
-TEST(SchemaValidator, Null) {
- Document sd;
- sd.Parse("{\"type\":\"null\"}");
- SchemaDocument s(sd);
-
- VALIDATE(s, "null", true);
- INVALIDATE(s, "false", "", "type", "");
- INVALIDATE(s, "0", "", "type", "");
- INVALIDATE(s, "\"\"", "", "type", "");
-}
-
-// Additional tests
-
-TEST(SchemaValidator, ObjectInArray) {
- Document sd;
- sd.Parse("{\"type\":\"array\", \"items\": { \"type\":\"string\" }}");
- SchemaDocument s(sd);
-
- VALIDATE(s, "[\"a\"]", true);
- INVALIDATE(s, "[1]", "/items", "type", "/0");
- INVALIDATE(s, "[{}]", "/items", "type", "/0");
-}
-
-TEST(SchemaValidator, MultiTypeInObject) {
- Document sd;
- sd.Parse(
- "{"
- " \"type\":\"object\","
- " \"properties\": {"
- " \"tel\" : {"
- " \"type\":[\"integer\", \"string\"]"
- " }"
- " }"
- "}");
- SchemaDocument s(sd);
-
- VALIDATE(s, "{ \"tel\": 999 }", true);
- VALIDATE(s, "{ \"tel\": \"123-456\" }", true);
- INVALIDATE(s, "{ \"tel\": true }", "/properties/tel", "type", "/tel");
-}
-
-TEST(SchemaValidator, MultiTypeWithObject) {
- Document sd;
- sd.Parse(
- "{"
- " \"type\": [\"object\",\"string\"],"
- " \"properties\": {"
- " \"tel\" : {"
- " \"type\": \"integer\""
- " }"
- " }"
- "}");
- SchemaDocument s(sd);
-
- VALIDATE(s, "\"Hello\"", true);
- VALIDATE(s, "{ \"tel\": 999 }", true);
- INVALIDATE(s, "{ \"tel\": \"fail\" }", "/properties/tel", "type", "/tel");
-}
-
-TEST(SchemaValidator, AllOf_Nested) {
- Document sd;
- sd.Parse(
- "{"
- " \"allOf\": ["
- " { \"type\": \"string\", \"minLength\": 2 },"
- " { \"type\": \"string\", \"maxLength\": 5 },"
- " { \"allOf\": [ { \"enum\" : [\"ok\", \"okay\", \"OK\", \"o\"] }, { \"enum\" : [\"ok\", \"OK\", \"o\"]} ] }"
- " ]"
- "}");
- SchemaDocument s(sd);
-
- VALIDATE(s, "\"ok\"", true);
- VALIDATE(s, "\"OK\"", true);
- INVALIDATE(s, "\"okay\"", "", "allOf", "");
- INVALIDATE(s, "\"o\"", "", "allOf", "");
- INVALIDATE(s, "\"n\"", "", "allOf", "");
- INVALIDATE(s, "\"too long\"", "", "allOf", "");
- INVALIDATE(s, "123", "", "allOf", "");
-}
-
-template <typename Allocator>
-static char* ReadFile(const char* filename, Allocator& allocator) {
- const char *paths[] = {
- "",
- "bin/",
- "../bin/",
- "../../bin/",
- "../../../bin/"
- };
- char buffer[1024];
- FILE *fp = 0;
- for (size_t i = 0; i < sizeof(paths) / sizeof(paths[0]); i++) {
- sprintf(buffer, "%s%s", paths[i], filename);
- fp = fopen(buffer, "rb");
- if (fp)
- break;
- }
-
- if (!fp)
- return 0;
-
- fseek(fp, 0, SEEK_END);
- size_t length = static_cast<size_t>(ftell(fp));
- fseek(fp, 0, SEEK_SET);
- char* json = reinterpret_cast<char*>(allocator.Malloc(length + 1));
- size_t readLength = fread(json, 1, length, fp);
- json[readLength] = '\0';
- fclose(fp);
- return json;
-}
-
-TEST(SchemaValidator, ValidateMetaSchema) {
- CrtAllocator allocator;
- char* json = ReadFile("draft-04/schema", allocator);
- Document d;
- d.Parse(json);
- ASSERT_FALSE(d.HasParseError());
- SchemaDocument sd(d);
- SchemaValidator validator(sd);
- if (!d.Accept(validator)) {
- StringBuffer sb;
- validator.GetInvalidSchemaPointer().StringifyUriFragment(sb);
- printf("Invalid schema: %s\n", sb.GetString());
- printf("Invalid keyword: %s\n", validator.GetInvalidSchemaKeyword());
- sb.Clear();
- validator.GetInvalidDocumentPointer().StringifyUriFragment(sb);
- printf("Invalid document: %s\n", sb.GetString());
- ADD_FAILURE();
- }
- CrtAllocator::Free(json);
-}
-
-TEST(SchemaValidator, ValidateMetaSchema_UTF16) {
- typedef GenericDocument<UTF16<> > D;
- typedef GenericSchemaDocument<D::ValueType> SD;
- typedef GenericSchemaValidator<SD> SV;
-
- CrtAllocator allocator;
- char* json = ReadFile("draft-04/schema", allocator);
-
- D d;
- StringStream ss(json);
- d.ParseStream<0, UTF8<> >(ss);
- ASSERT_FALSE(d.HasParseError());
- SD sd(d);
- SV validator(sd);
- if (!d.Accept(validator)) {
- GenericStringBuffer<UTF16<> > sb;
- validator.GetInvalidSchemaPointer().StringifyUriFragment(sb);
- wprintf(L"Invalid schema: %ls\n", sb.GetString());
- wprintf(L"Invalid keyword: %ls\n", validator.GetInvalidSchemaKeyword());
- sb.Clear();
- validator.GetInvalidDocumentPointer().StringifyUriFragment(sb);
- wprintf(L"Invalid document: %ls\n", sb.GetString());
- ADD_FAILURE();
- }
- CrtAllocator::Free(json);
-}
-
-template <typename SchemaDocumentType = SchemaDocument>
-class RemoteSchemaDocumentProvider : public IGenericRemoteSchemaDocumentProvider<SchemaDocumentType> {
-public:
- RemoteSchemaDocumentProvider() :
- documentAllocator_(documentBuffer_, sizeof(documentBuffer_)),
- schemaAllocator_(schemaBuffer_, sizeof(schemaBuffer_))
- {
- const char* filenames[kCount] = {
- "jsonschema/remotes/integer.json",
- "jsonschema/remotes/subSchemas.json",
- "jsonschema/remotes/folder/folderInteger.json",
- "draft-04/schema"
- };
-
- for (size_t i = 0; i < kCount; i++) {
- sd_[i] = 0;
-
- char jsonBuffer[8192];
- MemoryPoolAllocator<> jsonAllocator(jsonBuffer, sizeof(jsonBuffer));
- char* json = ReadFile(filenames[i], jsonAllocator);
- if (!json) {
- printf("json remote file %s not found", filenames[i]);
- ADD_FAILURE();
- }
- else {
- char stackBuffer[4096];
- MemoryPoolAllocator<> stackAllocator(stackBuffer, sizeof(stackBuffer));
- DocumentType d(&documentAllocator_, 1024, &stackAllocator);
- d.Parse(json);
- sd_[i] = new SchemaDocumentType(d, 0, &schemaAllocator_);
- MemoryPoolAllocator<>::Free(json);
- }
- };
- }
-
- ~RemoteSchemaDocumentProvider() {
- for (size_t i = 0; i < kCount; i++)
- delete sd_[i];
- }
-
- virtual const SchemaDocumentType* GetRemoteDocument(const char* uri, SizeType length) {
- const char* uris[kCount] = {
- "http://localhost:1234/integer.json",
- "http://localhost:1234/subSchemas.json",
- "http://localhost:1234/folder/folderInteger.json",
- "http://json-schema.org/draft-04/schema"
- };
-
- for (size_t i = 0; i < kCount; i++)
- if (strncmp(uri, uris[i], length) == 0)
- return sd_[i];
- return 0;
- }
-
-private:
- typedef GenericDocument<typename SchemaDocumentType::EncodingType, MemoryPoolAllocator<>, MemoryPoolAllocator<> > DocumentType;
-
- RemoteSchemaDocumentProvider(const RemoteSchemaDocumentProvider&);
- RemoteSchemaDocumentProvider& operator=(const RemoteSchemaDocumentProvider&);
-
- static const size_t kCount = 4;
- SchemaDocumentType* sd_[kCount];
- typename DocumentType::AllocatorType documentAllocator_;
- typename SchemaDocumentType::AllocatorType schemaAllocator_;
- char documentBuffer_[16384];
- char schemaBuffer_[128 * 1024];
-};
-
-TEST(SchemaValidator, TestSuite) {
- const char* filenames[] = {
- "additionalItems.json",
- "additionalProperties.json",
- "allOf.json",
- "anyOf.json",
- "default.json",
- "definitions.json",
- "dependencies.json",
- "enum.json",
- "items.json",
- "maximum.json",
- "maxItems.json",
- "maxLength.json",
- "maxProperties.json",
- "minimum.json",
- "minItems.json",
- "minLength.json",
- "minProperties.json",
- "multipleOf.json",
- "not.json",
- "oneOf.json",
- "pattern.json",
- "patternProperties.json",
- "properties.json",
- "ref.json",
- "refRemote.json",
- "required.json",
- "type.json",
- "uniqueItems.json"
- };
-
- const char* onlyRunDescription = 0;
- //const char* onlyRunDescription = "a string is a string";
-
- unsigned testCount = 0;
- unsigned passCount = 0;
-
- typedef GenericSchemaDocument<Value, MemoryPoolAllocator<> > SchemaDocumentType;
- RemoteSchemaDocumentProvider<SchemaDocumentType> provider;
-
- char jsonBuffer[65536];
- char documentBuffer[65536];
- char documentStackBuffer[65536];
- char schemaBuffer[65536];
- char validatorBuffer[65536];
- MemoryPoolAllocator<> jsonAllocator(jsonBuffer, sizeof(jsonBuffer));
- MemoryPoolAllocator<> documentAllocator(documentBuffer, sizeof(documentBuffer));
- MemoryPoolAllocator<> documentStackAllocator(documentStackBuffer, sizeof(documentStackBuffer));
- MemoryPoolAllocator<> schemaAllocator(schemaBuffer, sizeof(schemaBuffer));
- MemoryPoolAllocator<> validatorAllocator(validatorBuffer, sizeof(validatorBuffer));
-
- for (size_t i = 0; i < sizeof(filenames) / sizeof(filenames[0]); i++) {
- char filename[FILENAME_MAX];
- sprintf(filename, "jsonschema/tests/draft4/%s", filenames[i]);
- char* json = ReadFile(filename, jsonAllocator);
- if (!json) {
- printf("json test suite file %s not found", filename);
- ADD_FAILURE();
- }
- else {
- GenericDocument<UTF8<>, MemoryPoolAllocator<>, MemoryPoolAllocator<> > d(&documentAllocator, 1024, &documentStackAllocator);
- d.Parse(json);
- if (d.HasParseError()) {
- printf("json test suite file %s has parse error", filename);
- ADD_FAILURE();
- }
- else {
- for (Value::ConstValueIterator schemaItr = d.Begin(); schemaItr != d.End(); ++schemaItr) {
- {
- SchemaDocumentType schema((*schemaItr)["schema"], &provider, &schemaAllocator);
- GenericSchemaValidator<SchemaDocumentType, BaseReaderHandler<UTF8<> >, MemoryPoolAllocator<> > validator(schema, &validatorAllocator);
- const char* description1 = (*schemaItr)["description"].GetString();
- const Value& tests = (*schemaItr)["tests"];
- for (Value::ConstValueIterator testItr = tests.Begin(); testItr != tests.End(); ++testItr) {
- const char* description2 = (*testItr)["description"].GetString();
- if (!onlyRunDescription || strcmp(description2, onlyRunDescription) == 0) {
- const Value& data = (*testItr)["data"];
- bool expected = (*testItr)["valid"].GetBool();
- testCount++;
- validator.Reset();
- bool actual = data.Accept(validator);
- if (expected != actual)
- printf("Fail: %30s \"%s\" \"%s\"\n", filename, description1, description2);
- else
- passCount++;
- }
- }
- //printf("%zu %zu %zu\n", documentAllocator.Size(), schemaAllocator.Size(), validatorAllocator.Size());
- }
- schemaAllocator.Clear();
- validatorAllocator.Clear();
- }
- }
- }
- documentAllocator.Clear();
- MemoryPoolAllocator<>::Free(json);
- jsonAllocator.Clear();
- }
- printf("%d / %d passed (%2d%%)\n", passCount, testCount, passCount * 100 / testCount);
- // if (passCount != testCount)
- // ADD_FAILURE();
-}
-
-TEST(SchemaValidatingReader, Simple) {
- Document sd;
- sd.Parse("{ \"type\": \"string\", \"enum\" : [\"red\", \"amber\", \"green\"] }");
- SchemaDocument s(sd);
-
- Document d;
- StringStream ss("\"red\"");
- SchemaValidatingReader<kParseDefaultFlags, StringStream, UTF8<> > reader(ss, s);
- d.Populate(reader);
- EXPECT_TRUE(reader.GetParseResult());
- EXPECT_TRUE(reader.IsValid());
- EXPECT_TRUE(d.IsString());
- EXPECT_STREQ("red", d.GetString());
-}
-
-TEST(SchemaValidatingReader, Invalid) {
- Document sd;
- sd.Parse("{\"type\":\"string\",\"minLength\":2,\"maxLength\":3}");
- SchemaDocument s(sd);
-
- Document d;
- StringStream ss("\"ABCD\"");
- SchemaValidatingReader<kParseDefaultFlags, StringStream, UTF8<> > reader(ss, s);
- d.Populate(reader);
- EXPECT_FALSE(reader.GetParseResult());
- EXPECT_FALSE(reader.IsValid());
- EXPECT_EQ(kParseErrorTermination, reader.GetParseResult().Code());
- EXPECT_STREQ("maxLength", reader.GetInvalidSchemaKeyword());
- EXPECT_TRUE(reader.GetInvalidSchemaPointer() == SchemaDocument::PointerType(""));
- EXPECT_TRUE(reader.GetInvalidDocumentPointer() == SchemaDocument::PointerType(""));
- EXPECT_TRUE(d.IsNull());
-}
-
-TEST(SchemaValidatingWriter, Simple) {
- Document sd;
- sd.Parse("{\"type\":\"string\",\"minLength\":2,\"maxLength\":3}");
- SchemaDocument s(sd);
-
- Document d;
- StringBuffer sb;
- Writer<StringBuffer> writer(sb);
- GenericSchemaValidator<SchemaDocument, Writer<StringBuffer> > validator(s, writer);
-
- d.Parse("\"red\"");
- EXPECT_TRUE(d.Accept(validator));
- EXPECT_TRUE(validator.IsValid());
- EXPECT_STREQ("\"red\"", sb.GetString());
-
- sb.Clear();
- validator.Reset();
- d.Parse("\"ABCD\"");
- EXPECT_FALSE(d.Accept(validator));
- EXPECT_FALSE(validator.IsValid());
- EXPECT_TRUE(validator.GetInvalidSchemaPointer() == SchemaDocument::PointerType(""));
- EXPECT_TRUE(validator.GetInvalidDocumentPointer() == SchemaDocument::PointerType(""));
-}
-
-#ifdef __clang__
-RAPIDJSON_DIAG_POP
-#endif
diff --git a/3rdparty/rapidjson/test/unittest/simdtest.cpp b/3rdparty/rapidjson/test/unittest/simdtest.cpp
deleted file mode 100644
index 6ded7402fbf..00000000000
--- a/3rdparty/rapidjson/test/unittest/simdtest.cpp
+++ /dev/null
@@ -1,159 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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.
-
-// Since Travis CI installs old Valgrind 3.7.0, which fails with some SSE4.2
-// The unit tests prefix with SIMD should be skipped by Valgrind test
-
-// __SSE2__ and __SSE4_2__ are recognized by gcc, clang, and the Intel compiler.
-// We use -march=native with gmake to enable -msse2 and -msse4.2, if supported.
-#if defined(__SSE4_2__)
-# define RAPIDJSON_SSE42
-#elif defined(__SSE2__)
-# define RAPIDJSON_SSE2
-#endif
-
-#define RAPIDJSON_NAMESPACE rapidjson_simd
-
-#include "unittest.h"
-
-#include "rapidjson/reader.h"
-#include "rapidjson/writer.h"
-
-#ifdef __GNUC__
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(effc++)
-#endif
-
-using namespace rapidjson_simd;
-
-#ifdef RAPIDJSON_SSE2
-#define SIMD_SUFFIX(name) name##_SSE2
-#elif defined(RAPIDJSON_SSE42)
-#define SIMD_SUFFIX(name) name##_SSE42
-#else
-#define SIMD_SUFFIX(name) name
-#endif
-
-template <typename StreamType>
-void TestSkipWhitespace() {
- for (size_t step = 1; step < 32; step++) {
- char buffer[1025];
- for (size_t i = 0; i < 1024; i++)
- buffer[i] = " \t\r\n"[i % 4];
- for (size_t i = 0; i < 1024; i += step)
- buffer[i] = 'X';
- buffer[1024] = '\0';
-
- StreamType s(buffer);
- size_t i = 0;
- for (;;) {
- SkipWhitespace(s);
- if (s.Peek() == '\0')
- break;
- EXPECT_EQ(i, s.Tell());
- EXPECT_EQ('X', s.Take());
- i += step;
- }
- }
-}
-
-TEST(SIMD, SIMD_SUFFIX(SkipWhitespace)) {
- TestSkipWhitespace<StringStream>();
- TestSkipWhitespace<InsituStringStream>();
-}
-
-struct ScanCopyUnescapedStringHandler : BaseReaderHandler<UTF8<>, ScanCopyUnescapedStringHandler> {
- bool String(const char* str, size_t length, bool) {
- memcpy(buffer, str, length + 1);
- return true;
- }
- char buffer[1024 + 5];
-};
-
-template <unsigned parseFlags, typename StreamType>
-void TestScanCopyUnescapedString() {
- for (size_t step = 0; step < 1024; step++) {
- char json[1024 + 5];
- char *p = json;
- *p ++= '\"';
- for (size_t i = 0; i < step; i++)
- *p++= "ABCD"[i % 4];
- *p++ = '\\';
- *p++ = '\\';
- *p++ = '\"';
- *p++ = '\0';
-
- StreamType s(json);
- Reader reader;
- ScanCopyUnescapedStringHandler h;
- reader.Parse<parseFlags>(s, h);
- EXPECT_TRUE(memcmp(h.buffer, json + 1, step) == 0);
- EXPECT_EQ('\\', h.buffer[step]); // escaped
- EXPECT_EQ('\0', h.buffer[step + 1]);
- }
-}
-
-TEST(SIMD, SIMD_SUFFIX(ScanCopyUnescapedString)) {
- TestScanCopyUnescapedString<kParseDefaultFlags, StringStream>();
- TestScanCopyUnescapedString<kParseInsituFlag, InsituStringStream>();
-}
-
-TEST(SIMD, SIMD_SUFFIX(ScanWriteUnescapedString)) {
- for (size_t step = 0; step < 1024; step++) {
- char s[2048 + 1];
- char *p = s;
- for (size_t i = 0; i < step; i++)
- *p++= "ABCD"[i % 4];
- char escape = "\0\n\\\""[step % 4];
- *p++ = escape;
- for (size_t i = 0; i < step; i++)
- *p++= "ABCD"[i % 4];
-
- StringBuffer sb;
- Writer<StringBuffer> writer(sb);
- writer.String(s, SizeType(step * 2 + 1));
- const char* q = sb.GetString();
- EXPECT_EQ('\"', *q++);
- for (size_t i = 0; i < step; i++)
- EXPECT_EQ("ABCD"[i % 4], *q++);
- if (escape == '\0') {
- EXPECT_EQ('\\', *q++);
- EXPECT_EQ('u', *q++);
- EXPECT_EQ('0', *q++);
- EXPECT_EQ('0', *q++);
- EXPECT_EQ('0', *q++);
- EXPECT_EQ('0', *q++);
- }
- else if (escape == '\n') {
- EXPECT_EQ('\\', *q++);
- EXPECT_EQ('n', *q++);
- }
- else if (escape == '\\') {
- EXPECT_EQ('\\', *q++);
- EXPECT_EQ('\\', *q++);
- }
- else if (escape == '\"') {
- EXPECT_EQ('\\', *q++);
- EXPECT_EQ('\"', *q++);
- }
- for (size_t i = 0; i < step; i++)
- EXPECT_EQ("ABCD"[i % 4], *q++);
- EXPECT_EQ('\"', *q++);
- EXPECT_EQ('\0', *q++);
- }
-}
-
-#ifdef __GNUC__
-RAPIDJSON_DIAG_POP
-#endif
diff --git a/3rdparty/rapidjson/test/unittest/strfunctest.cpp b/3rdparty/rapidjson/test/unittest/strfunctest.cpp
deleted file mode 100644
index cc1bb22f0e9..00000000000
--- a/3rdparty/rapidjson/test/unittest/strfunctest.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 "unittest.h"
-#include "rapidjson/internal/strfunc.h"
-
-using namespace rapidjson;
-using namespace rapidjson::internal;
-
-TEST(StrFunc, CountStringCodePoint) {
- SizeType count;
- EXPECT_TRUE(CountStringCodePoint<UTF8<> >("", 0, &count));
- EXPECT_EQ(0u, count);
- EXPECT_TRUE(CountStringCodePoint<UTF8<> >("Hello", 5, &count));
- EXPECT_EQ(5u, count);
- EXPECT_TRUE(CountStringCodePoint<UTF8<> >("\xC2\xA2\xE2\x82\xAC\xF0\x9D\x84\x9E", 9, &count)); // cents euro G-clef
- EXPECT_EQ(3u, count);
- EXPECT_FALSE(CountStringCodePoint<UTF8<> >("\xC2\xA2\xE2\x82\xAC\xF0\x9D\x84\x9E\x80", 10, &count));
-}
diff --git a/3rdparty/rapidjson/test/unittest/stringbuffertest.cpp b/3rdparty/rapidjson/test/unittest/stringbuffertest.cpp
deleted file mode 100644
index 9be98fce268..00000000000
--- a/3rdparty/rapidjson/test/unittest/stringbuffertest.cpp
+++ /dev/null
@@ -1,163 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 "unittest.h"
-#include "rapidjson/stringbuffer.h"
-#include "rapidjson/writer.h"
-
-#ifdef __clang__
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(c++98-compat)
-#endif
-
-using namespace rapidjson;
-
-TEST(StringBuffer, InitialSize) {
- StringBuffer buffer;
- EXPECT_EQ(0u, buffer.GetSize());
- EXPECT_STREQ("", buffer.GetString());
-}
-
-TEST(StringBuffer, Put) {
- StringBuffer buffer;
- buffer.Put('A');
-
- EXPECT_EQ(1u, buffer.GetSize());
- EXPECT_STREQ("A", buffer.GetString());
-}
-
-TEST(StringBuffer, Clear) {
- StringBuffer buffer;
- buffer.Put('A');
- buffer.Put('B');
- buffer.Put('C');
- buffer.Clear();
-
- EXPECT_EQ(0u, buffer.GetSize());
- EXPECT_STREQ("", buffer.GetString());
-}
-
-TEST(StringBuffer, Push) {
- StringBuffer buffer;
- buffer.Push(5);
-
- EXPECT_EQ(5u, buffer.GetSize());
-
- // Causes sudden expansion to make the stack's capacity equal to size
- buffer.Push(65536u);
- EXPECT_EQ(5u + 65536u, buffer.GetSize());
-}
-
-TEST(StringBuffer, Pop) {
- StringBuffer buffer;
- buffer.Put('A');
- buffer.Put('B');
- buffer.Put('C');
- buffer.Put('D');
- buffer.Put('E');
- buffer.Pop(3);
-
- EXPECT_EQ(2u, buffer.GetSize());
- EXPECT_STREQ("AB", buffer.GetString());
-}
-
-#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
-
-#if 0 // Many old compiler does not support these. Turn it off temporaily.
-
-#include <type_traits>
-
-TEST(StringBuffer, Traits) {
- static_assert( std::is_constructible<StringBuffer>::value, "");
- static_assert( std::is_default_constructible<StringBuffer>::value, "");
-#ifndef _MSC_VER
- static_assert(!std::is_copy_constructible<StringBuffer>::value, "");
-#endif
- static_assert( std::is_move_constructible<StringBuffer>::value, "");
-
- static_assert(!std::is_nothrow_constructible<StringBuffer>::value, "");
- static_assert(!std::is_nothrow_default_constructible<StringBuffer>::value, "");
-
-#if !defined(_MSC_VER) || _MSC_VER >= 1800
- static_assert(!std::is_nothrow_copy_constructible<StringBuffer>::value, "");
- static_assert(!std::is_nothrow_move_constructible<StringBuffer>::value, "");
-#endif
-
- static_assert( std::is_assignable<StringBuffer,StringBuffer>::value, "");
-#ifndef _MSC_VER
- static_assert(!std::is_copy_assignable<StringBuffer>::value, "");
-#endif
- static_assert( std::is_move_assignable<StringBuffer>::value, "");
-
-#if !defined(_MSC_VER) || _MSC_VER >= 1800
- static_assert(!std::is_nothrow_assignable<StringBuffer, StringBuffer>::value, "");
-#endif
-
- static_assert(!std::is_nothrow_copy_assignable<StringBuffer>::value, "");
- static_assert(!std::is_nothrow_move_assignable<StringBuffer>::value, "");
-
- static_assert( std::is_destructible<StringBuffer>::value, "");
-#ifndef _MSC_VER
- static_assert(std::is_nothrow_destructible<StringBuffer>::value, "");
-#endif
-}
-
-#endif
-
-TEST(StringBuffer, MoveConstructor) {
- StringBuffer x;
- x.Put('A');
- x.Put('B');
- x.Put('C');
- x.Put('D');
-
- EXPECT_EQ(4u, x.GetSize());
- EXPECT_STREQ("ABCD", x.GetString());
-
- // StringBuffer y(x); // does not compile (!is_copy_constructible)
- StringBuffer y(std::move(x));
- EXPECT_EQ(0u, x.GetSize());
- EXPECT_EQ(4u, y.GetSize());
- EXPECT_STREQ("ABCD", y.GetString());
-
- // StringBuffer z = y; // does not compile (!is_copy_assignable)
- StringBuffer z = std::move(y);
- EXPECT_EQ(0u, y.GetSize());
- EXPECT_EQ(4u, z.GetSize());
- EXPECT_STREQ("ABCD", z.GetString());
-}
-
-TEST(StringBuffer, MoveAssignment) {
- StringBuffer x;
- x.Put('A');
- x.Put('B');
- x.Put('C');
- x.Put('D');
-
- EXPECT_EQ(4u, x.GetSize());
- EXPECT_STREQ("ABCD", x.GetString());
-
- StringBuffer y;
- // y = x; // does not compile (!is_copy_assignable)
- y = std::move(x);
- EXPECT_EQ(0u, x.GetSize());
- EXPECT_EQ(4u, y.GetSize());
- EXPECT_STREQ("ABCD", y.GetString());
-}
-
-#endif // RAPIDJSON_HAS_CXX11_RVALUE_REFS
-
-#ifdef __clang__
-RAPIDJSON_DIAG_POP
-#endif
diff --git a/3rdparty/rapidjson/test/unittest/strtodtest.cpp b/3rdparty/rapidjson/test/unittest/strtodtest.cpp
deleted file mode 100644
index a42d96e4a67..00000000000
--- a/3rdparty/rapidjson/test/unittest/strtodtest.cpp
+++ /dev/null
@@ -1,132 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 "unittest.h"
-
-#include "rapidjson/internal/strtod.h"
-
-#ifdef __clang__
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(unreachable-code)
-#endif
-
-#define BIGINTEGER_LITERAL(s) BigInteger(s, sizeof(s) - 1)
-
-using namespace rapidjson::internal;
-
-TEST(Strtod, CheckApproximationCase) {
- static const int kSignificandSize = 52;
- static const int kExponentBias = 0x3FF;
- static const uint64_t kExponentMask = RAPIDJSON_UINT64_C2(0x7FF00000, 0x00000000);
- static const uint64_t kSignificandMask = RAPIDJSON_UINT64_C2(0x000FFFFF, 0xFFFFFFFF);
- static const uint64_t kHiddenBit = RAPIDJSON_UINT64_C2(0x00100000, 0x00000000);
-
- // http://www.exploringbinary.com/using-integers-to-check-a-floating-point-approximation/
- // Let b = 0x1.465a72e467d88p-149
- // = 5741268244528520 x 2^-201
- union {
- double d;
- uint64_t u;
- }u;
- u.u = 0x465a72e467d88 | ((static_cast<uint64_t>(-149 + kExponentBias)) << kSignificandSize);
- const double b = u.d;
- const uint64_t bInt = (u.u & kSignificandMask) | kHiddenBit;
- const int bExp = ((u.u & kExponentMask) >> kSignificandSize) - kExponentBias - kSignificandSize;
- EXPECT_DOUBLE_EQ(1.7864e-45, b);
- EXPECT_EQ(RAPIDJSON_UINT64_C2(0x001465a7, 0x2e467d88), bInt);
- EXPECT_EQ(-201, bExp);
-
- // Let d = 17864 x 10-49
- const char dInt[] = "17864";
- const int dExp = -49;
-
- // Let h = 2^(bExp-1)
- const int hExp = bExp - 1;
- EXPECT_EQ(-202, hExp);
-
- int dS_Exp2 = 0;
- int dS_Exp5 = 0;
- int bS_Exp2 = 0;
- int bS_Exp5 = 0;
- int hS_Exp2 = 0;
- int hS_Exp5 = 0;
-
- // Adjust for decimal exponent
- if (dExp >= 0) {
- dS_Exp2 += dExp;
- dS_Exp5 += dExp;
- }
- else {
- bS_Exp2 -= dExp;
- bS_Exp5 -= dExp;
- hS_Exp2 -= dExp;
- hS_Exp5 -= dExp;
- }
-
- // Adjust for binary exponent
- if (bExp >= 0)
- bS_Exp2 += bExp;
- else {
- dS_Exp2 -= bExp;
- hS_Exp2 -= bExp;
- }
-
- // Adjust for half ulp exponent
- if (hExp >= 0)
- hS_Exp2 += hExp;
- else {
- dS_Exp2 -= hExp;
- bS_Exp2 -= hExp;
- }
-
- // Remove common power of two factor from all three scaled values
- int common_Exp2 = std::min(dS_Exp2, std::min(bS_Exp2, hS_Exp2));
- dS_Exp2 -= common_Exp2;
- bS_Exp2 -= common_Exp2;
- hS_Exp2 -= common_Exp2;
-
- EXPECT_EQ(153, dS_Exp2);
- EXPECT_EQ(0, dS_Exp5);
- EXPECT_EQ(1, bS_Exp2);
- EXPECT_EQ(49, bS_Exp5);
- EXPECT_EQ(0, hS_Exp2);
- EXPECT_EQ(49, hS_Exp5);
-
- BigInteger dS = BIGINTEGER_LITERAL(dInt);
- dS.MultiplyPow5(static_cast<unsigned>(dS_Exp5)) <<= static_cast<size_t>(dS_Exp2);
-
- BigInteger bS(bInt);
- bS.MultiplyPow5(static_cast<unsigned>(bS_Exp5)) <<= static_cast<size_t>(bS_Exp2);
-
- BigInteger hS(1);
- hS.MultiplyPow5(static_cast<unsigned>(hS_Exp5)) <<= static_cast<size_t>(hS_Exp2);
-
- EXPECT_TRUE(BIGINTEGER_LITERAL("203970822259994138521801764465966248930731085529088") == dS);
- EXPECT_TRUE(BIGINTEGER_LITERAL("203970822259994122305215569213032722473144531250000") == bS);
- EXPECT_TRUE(BIGINTEGER_LITERAL("17763568394002504646778106689453125") == hS);
-
- EXPECT_EQ(1, dS.Compare(bS));
-
- BigInteger delta(0);
- EXPECT_FALSE(dS.Difference(bS, &delta));
- EXPECT_TRUE(BIGINTEGER_LITERAL("16216586195252933526457586554279088") == delta);
- EXPECT_TRUE(bS.Difference(dS, &delta));
- EXPECT_TRUE(BIGINTEGER_LITERAL("16216586195252933526457586554279088") == delta);
-
- EXPECT_EQ(-1, delta.Compare(hS));
-}
-
-#ifdef __clang__
-RAPIDJSON_DIAG_POP
-#endif
diff --git a/3rdparty/rapidjson/test/unittest/unittest.cpp b/3rdparty/rapidjson/test/unittest/unittest.cpp
deleted file mode 100644
index e0e8576ee21..00000000000
--- a/3rdparty/rapidjson/test/unittest/unittest.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 "unittest.h"
-#include "rapidjson/rapidjson.h"
-
-#ifdef __clang__
-#pragma GCC diagnostic push
-#if __has_warning("-Wdeprecated")
-#pragma GCC diagnostic ignored "-Wdeprecated"
-#endif
-#endif
-
-AssertException::~AssertException() throw() {}
-
-#ifdef __clang__
-#pragma GCC diagnostic pop
-#endif
-
-int main(int argc, char **argv) {
- ::testing::InitGoogleTest(&argc, argv);
-
- std::cout << "RapidJSON v" << RAPIDJSON_VERSION_STRING << std::endl;
-
-#ifdef _MSC_VER
- _CrtMemState memoryState = { 0 };
- _CrtMemCheckpoint(&memoryState);
- //_CrtSetBreakAlloc(X);
- //void *testWhetherMemoryLeakDetectionWorks = malloc(1);
-#endif
-
- int ret = RUN_ALL_TESTS();
-
-#ifdef _MSC_VER
- // Current gtest constantly leak 2 blocks at exit
- _CrtMemDumpAllObjectsSince(&memoryState);
-#endif
- return ret;
-}
diff --git a/3rdparty/rapidjson/test/unittest/unittest.h b/3rdparty/rapidjson/test/unittest/unittest.h
deleted file mode 100644
index e125bf88dc3..00000000000
--- a/3rdparty/rapidjson/test/unittest/unittest.h
+++ /dev/null
@@ -1,135 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 UNITTEST_H_
-#define UNITTEST_H_
-
-// gtest indirectly included inttypes.h, without __STDC_CONSTANT_MACROS.
-#ifndef __STDC_CONSTANT_MACROS
-#ifdef __clang__
-#pragma GCC diagnostic push
-#if __has_warning("-Wreserved-id-macro")
-#pragma GCC diagnostic ignored "-Wreserved-id-macro"
-#endif
-#endif
-
-# define __STDC_CONSTANT_MACROS 1 // required by C++ standard
-
-#ifdef __clang__
-#pragma GCC diagnostic pop
-#endif
-#endif
-
-#ifdef _MSC_VER
-#define _CRTDBG_MAP_ALLOC
-#include <crtdbg.h>
-#pragma warning(disable : 4996) // 'function': was declared deprecated
-#endif
-
-#if defined(__clang__) || defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
-#if defined(__clang__) || (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
-#pragma GCC diagnostic push
-#endif
-#pragma GCC diagnostic ignored "-Weffc++"
-#endif
-
-#include "gtest/gtest.h"
-#include <stdexcept>
-
-#if defined(__clang__) || defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
-#pragma GCC diagnostic pop
-#endif
-
-#ifdef __clang__
-// All TEST() macro generated this warning, disable globally
-#pragma GCC diagnostic ignored "-Wglobal-constructors"
-#endif
-
-template <typename Ch>
-inline unsigned StrLen(const Ch* s) {
- const Ch* p = s;
- while (*p) p++;
- return unsigned(p - s);
-}
-
-template<typename Ch>
-inline int StrCmp(const Ch* s1, const Ch* s2) {
- while(*s1 && (*s1 == *s2)) { s1++; s2++; }
- return static_cast<unsigned>(*s1) < static_cast<unsigned>(*s2) ? -1 : static_cast<unsigned>(*s1) > static_cast<unsigned>(*s2);
-}
-
-template <typename Ch>
-inline Ch* StrDup(const Ch* str) {
- size_t bufferSize = sizeof(Ch) * (StrLen(str) + 1);
- Ch* buffer = static_cast<Ch*>(malloc(bufferSize));
- memcpy(buffer, str, bufferSize);
- return buffer;
-}
-
-inline FILE* TempFile(char *filename) {
-#ifdef _MSC_VER
- filename = tmpnam(filename);
-
- // For Visual Studio, tmpnam() adds a backslash in front. Remove it.
- if (filename[0] == '\\')
- for (int i = 0; filename[i] != '\0'; i++)
- filename[i] = filename[i + 1];
-
- return fopen(filename, "wb");
-#else
- strcpy(filename, "/tmp/fileXXXXXX");
- int fd = mkstemp(filename);
- return fdopen(fd, "w");
-#endif
-}
-
-// Use exception for catching assert
-#ifdef _MSC_VER
-#pragma warning(disable : 4127)
-#endif
-
-#ifdef __clang__
-#pragma GCC diagnostic push
-#if __has_warning("-Wdeprecated")
-#pragma GCC diagnostic ignored "-Wdeprecated"
-#endif
-#endif
-
-class AssertException : public std::logic_error {
-public:
- AssertException(const char* w) : std::logic_error(w) {}
- AssertException(const AssertException& rhs) : std::logic_error(rhs) {}
- virtual ~AssertException() throw();
-};
-
-#ifdef __clang__
-#pragma GCC diagnostic pop
-#endif
-
-#define RAPIDJSON_ASSERT(x) if (!(x)) throw AssertException(RAPIDJSON_STRINGIFY(x))
-
-class Random {
-public:
- Random(unsigned seed = 0) : mSeed(seed) {}
-
- unsigned operator()() {
- mSeed = 214013 * mSeed + 2531011;
- return mSeed;
- }
-
-private:
- unsigned mSeed;
-};
-
-#endif // UNITTEST_H_
diff --git a/3rdparty/rapidjson/test/unittest/valuetest.cpp b/3rdparty/rapidjson/test/unittest/valuetest.cpp
deleted file mode 100644
index 5e88a77e3a3..00000000000
--- a/3rdparty/rapidjson/test/unittest/valuetest.cpp
+++ /dev/null
@@ -1,1498 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 "unittest.h"
-#include "rapidjson/document.h"
-#include <algorithm>
-
-#ifdef __clang__
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(c++98-compat)
-#endif
-
-using namespace rapidjson;
-
-TEST(Value, DefaultConstructor) {
- Value x;
- EXPECT_EQ(kNullType, x.GetType());
- EXPECT_TRUE(x.IsNull());
-
- //std::cout << "sizeof(Value): " << sizeof(x) << std::endl;
-}
-
-// Should not pass compilation
-//TEST(Value, copy_constructor) {
-// Value x(1234);
-// Value y = x;
-//}
-
-#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
-
-#if 0 // Many old compiler does not support these. Turn it off temporaily.
-
-#include <type_traits>
-
-TEST(Value, Traits) {
- typedef GenericValue<UTF8<>, CrtAllocator> Value;
- static_assert(std::is_constructible<Value>::value, "");
- static_assert(std::is_default_constructible<Value>::value, "");
-#ifndef _MSC_VER
- static_assert(!std::is_copy_constructible<Value>::value, "");
-#endif
- static_assert(std::is_move_constructible<Value>::value, "");
-
-#ifndef _MSC_VER
- static_assert(std::is_nothrow_constructible<Value>::value, "");
- static_assert(std::is_nothrow_default_constructible<Value>::value, "");
- static_assert(!std::is_nothrow_copy_constructible<Value>::value, "");
- static_assert(std::is_nothrow_move_constructible<Value>::value, "");
-#endif
-
- static_assert(std::is_assignable<Value,Value>::value, "");
-#ifndef _MSC_VER
- static_assert(!std::is_copy_assignable<Value>::value, "");
-#endif
- static_assert(std::is_move_assignable<Value>::value, "");
-
-#ifndef _MSC_VER
- static_assert(std::is_nothrow_assignable<Value, Value>::value, "");
-#endif
- static_assert(!std::is_nothrow_copy_assignable<Value>::value, "");
-#ifndef _MSC_VER
- static_assert(std::is_nothrow_move_assignable<Value>::value, "");
-#endif
-
- static_assert(std::is_destructible<Value>::value, "");
-#ifndef _MSC_VER
- static_assert(std::is_nothrow_destructible<Value>::value, "");
-#endif
-}
-
-#endif
-
-TEST(Value, MoveConstructor) {
- typedef GenericValue<UTF8<>, CrtAllocator> Value;
- Value::AllocatorType allocator;
-
- Value x((Value(kArrayType)));
- x.Reserve(4u, allocator);
- x.PushBack(1, allocator).PushBack(2, allocator).PushBack(3, allocator).PushBack(4, allocator);
- EXPECT_TRUE(x.IsArray());
- EXPECT_EQ(4u, x.Size());
-
- // Value y(x); // does not compile (!is_copy_constructible)
- Value y(std::move(x));
- EXPECT_TRUE(x.IsNull());
- EXPECT_TRUE(y.IsArray());
- EXPECT_EQ(4u, y.Size());
-
- // Value z = y; // does not compile (!is_copy_assignable)
- Value z = std::move(y);
- EXPECT_TRUE(y.IsNull());
- EXPECT_TRUE(z.IsArray());
- EXPECT_EQ(4u, z.Size());
-}
-
-#endif // RAPIDJSON_HAS_CXX11_RVALUE_REFS
-
-TEST(Value, AssignmentOperator) {
- Value x(1234);
- Value y;
- y = x;
- EXPECT_TRUE(x.IsNull()); // move semantic
- EXPECT_EQ(1234, y.GetInt());
-
- y = 5678;
- EXPECT_TRUE(y.IsInt());
- EXPECT_EQ(5678, y.GetInt());
-
- x = "Hello";
- EXPECT_TRUE(x.IsString());
- EXPECT_STREQ(x.GetString(),"Hello");
-
- y = StringRef(x.GetString(),x.GetStringLength());
- EXPECT_TRUE(y.IsString());
- EXPECT_EQ(y.GetString(),x.GetString());
- EXPECT_EQ(y.GetStringLength(),x.GetStringLength());
-
- static char mstr[] = "mutable";
- // y = mstr; // should not compile
- y = StringRef(mstr);
- EXPECT_TRUE(y.IsString());
- EXPECT_EQ(y.GetString(),mstr);
-
-#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
- // C++11 move assignment
- x = Value("World");
- EXPECT_TRUE(x.IsString());
- EXPECT_STREQ("World", x.GetString());
-
- x = std::move(y);
- EXPECT_TRUE(y.IsNull());
- EXPECT_TRUE(x.IsString());
- EXPECT_EQ(x.GetString(), mstr);
-
- y = std::move(Value().SetInt(1234));
- EXPECT_TRUE(y.IsInt());
- EXPECT_EQ(1234, y);
-#endif // RAPIDJSON_HAS_CXX11_RVALUE_REFS
-}
-
-template <typename A, typename B>
-void TestEqual(const A& a, const B& b) {
- EXPECT_TRUE (a == b);
- EXPECT_FALSE(a != b);
- EXPECT_TRUE (b == a);
- EXPECT_FALSE(b != a);
-}
-
-template <typename A, typename B>
-void TestUnequal(const A& a, const B& b) {
- EXPECT_FALSE(a == b);
- EXPECT_TRUE (a != b);
- EXPECT_FALSE(b == a);
- EXPECT_TRUE (b != a);
-}
-
-TEST(Value, EqualtoOperator) {
- Value::AllocatorType allocator;
- Value x(kObjectType);
- x.AddMember("hello", "world", allocator)
- .AddMember("t", Value(true).Move(), allocator)
- .AddMember("f", Value(false).Move(), allocator)
- .AddMember("n", Value(kNullType).Move(), allocator)
- .AddMember("i", 123, allocator)
- .AddMember("pi", 3.14, allocator)
- .AddMember("a", Value(kArrayType).Move().PushBack(1, allocator).PushBack(2, allocator).PushBack(3, allocator), allocator);
-
- // Test templated operator==() and operator!=()
- TestEqual(x["hello"], "world");
- const char* cc = "world";
- TestEqual(x["hello"], cc);
- char* c = strdup("world");
- TestEqual(x["hello"], c);
- free(c);
-
- TestEqual(x["t"], true);
- TestEqual(x["f"], false);
- TestEqual(x["i"], 123);
- TestEqual(x["pi"], 3.14);
-
- // Test operator==() (including different allocators)
- CrtAllocator crtAllocator;
- GenericValue<UTF8<>, CrtAllocator> y;
- GenericDocument<UTF8<>, CrtAllocator> z(&crtAllocator);
- y.CopyFrom(x, crtAllocator);
- z.CopyFrom(y, z.GetAllocator());
- TestEqual(x, y);
- TestEqual(y, z);
- TestEqual(z, x);
-
- // Swapping member order should be fine.
- EXPECT_TRUE(y.RemoveMember("t"));
- TestUnequal(x, y);
- TestUnequal(z, y);
- EXPECT_TRUE(z.RemoveMember("t"));
- TestUnequal(x, z);
- TestEqual(y, z);
- y.AddMember("t", false, crtAllocator);
- z.AddMember("t", false, z.GetAllocator());
- TestUnequal(x, y);
- TestUnequal(z, x);
- y["t"] = true;
- z["t"] = true;
- TestEqual(x, y);
- TestEqual(y, z);
- TestEqual(z, x);
-
- // Swapping element order is not OK
- x["a"][0].Swap(x["a"][1]);
- TestUnequal(x, y);
- x["a"][0].Swap(x["a"][1]);
- TestEqual(x, y);
-
- // Array of different size
- x["a"].PushBack(4, allocator);
- TestUnequal(x, y);
- x["a"].PopBack();
- TestEqual(x, y);
-
- // Issue #129: compare Uint64
- x.SetUint64(RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0xFFFFFFF0));
- y.SetUint64(RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0xFFFFFFFF));
- TestUnequal(x, y);
-}
-
-template <typename Value>
-void TestCopyFrom() {
- typename Value::AllocatorType a;
- Value v1(1234);
- Value v2(v1, a); // deep copy constructor
- EXPECT_TRUE(v1.GetType() == v2.GetType());
- EXPECT_EQ(v1.GetInt(), v2.GetInt());
-
- v1.SetString("foo");
- v2.CopyFrom(v1, a);
- EXPECT_TRUE(v1.GetType() == v2.GetType());
- EXPECT_STREQ(v1.GetString(), v2.GetString());
- EXPECT_EQ(v1.GetString(), v2.GetString()); // string NOT copied
-
- v1.SetString("bar", a); // copy string
- v2.CopyFrom(v1, a);
- EXPECT_TRUE(v1.GetType() == v2.GetType());
- EXPECT_STREQ(v1.GetString(), v2.GetString());
- EXPECT_NE(v1.GetString(), v2.GetString()); // string copied
-
-
- v1.SetArray().PushBack(1234, a);
- v2.CopyFrom(v1, a);
- EXPECT_TRUE(v2.IsArray());
- EXPECT_EQ(v1.Size(), v2.Size());
-
- v1.PushBack(Value().SetString("foo", a), a); // push string copy
- EXPECT_TRUE(v1.Size() != v2.Size());
- v2.CopyFrom(v1, a);
- EXPECT_TRUE(v1.Size() == v2.Size());
- EXPECT_STREQ(v1[1].GetString(), v2[1].GetString());
- EXPECT_NE(v1[1].GetString(), v2[1].GetString()); // string got copied
-}
-
-TEST(Value, CopyFrom) {
- TestCopyFrom<Value>();
- TestCopyFrom<GenericValue<UTF8<>, CrtAllocator> >();
-}
-
-TEST(Value, Swap) {
- Value v1(1234);
- Value v2(kObjectType);
-
- EXPECT_EQ(&v1, &v1.Swap(v2));
- EXPECT_TRUE(v1.IsObject());
- EXPECT_TRUE(v2.IsInt());
- EXPECT_EQ(1234, v2.GetInt());
-
- // testing std::swap compatibility
- using std::swap;
- swap(v1, v2);
- EXPECT_TRUE(v1.IsInt());
- EXPECT_TRUE(v2.IsObject());
-}
-
-TEST(Value, Null) {
- // Default constructor
- Value x;
- EXPECT_EQ(kNullType, x.GetType());
- EXPECT_TRUE(x.IsNull());
-
- EXPECT_FALSE(x.IsTrue());
- EXPECT_FALSE(x.IsFalse());
- EXPECT_FALSE(x.IsNumber());
- EXPECT_FALSE(x.IsString());
- EXPECT_FALSE(x.IsObject());
- EXPECT_FALSE(x.IsArray());
-
- // Constructor with type
- Value y(kNullType);
- EXPECT_TRUE(y.IsNull());
-
- // SetNull();
- Value z(true);
- z.SetNull();
- EXPECT_TRUE(z.IsNull());
-}
-
-TEST(Value, True) {
- // Constructor with bool
- Value x(true);
- EXPECT_EQ(kTrueType, x.GetType());
- EXPECT_TRUE(x.GetBool());
- EXPECT_TRUE(x.IsBool());
- EXPECT_TRUE(x.IsTrue());
-
- EXPECT_FALSE(x.IsNull());
- EXPECT_FALSE(x.IsFalse());
- EXPECT_FALSE(x.IsNumber());
- EXPECT_FALSE(x.IsString());
- EXPECT_FALSE(x.IsObject());
- EXPECT_FALSE(x.IsArray());
-
- // Constructor with type
- Value y(kTrueType);
- EXPECT_TRUE(y.IsTrue());
-
- // SetBool()
- Value z;
- z.SetBool(true);
- EXPECT_TRUE(z.IsTrue());
-}
-
-TEST(Value, False) {
- // Constructor with bool
- Value x(false);
- EXPECT_EQ(kFalseType, x.GetType());
- EXPECT_TRUE(x.IsBool());
- EXPECT_TRUE(x.IsFalse());
-
- EXPECT_FALSE(x.IsNull());
- EXPECT_FALSE(x.IsTrue());
- EXPECT_FALSE(x.GetBool());
- //EXPECT_FALSE((bool)x);
- EXPECT_FALSE(x.IsNumber());
- EXPECT_FALSE(x.IsString());
- EXPECT_FALSE(x.IsObject());
- EXPECT_FALSE(x.IsArray());
-
- // Constructor with type
- Value y(kFalseType);
- EXPECT_TRUE(y.IsFalse());
-
- // SetBool()
- Value z;
- z.SetBool(false);
- EXPECT_TRUE(z.IsFalse());
-}
-
-TEST(Value, Int) {
- // Constructor with int
- Value x(1234);
- EXPECT_EQ(kNumberType, x.GetType());
- EXPECT_EQ(1234, x.GetInt());
- EXPECT_EQ(1234u, x.GetUint());
- EXPECT_EQ(1234, x.GetInt64());
- EXPECT_EQ(1234u, x.GetUint64());
- EXPECT_NEAR(1234.0, x.GetDouble(), 0.0);
- //EXPECT_EQ(1234, (int)x);
- //EXPECT_EQ(1234, (unsigned)x);
- //EXPECT_EQ(1234, (int64_t)x);
- //EXPECT_EQ(1234, (uint64_t)x);
- //EXPECT_EQ(1234, (double)x);
- EXPECT_TRUE(x.IsNumber());
- EXPECT_TRUE(x.IsInt());
- EXPECT_TRUE(x.IsUint());
- EXPECT_TRUE(x.IsInt64());
- EXPECT_TRUE(x.IsUint64());
-
- EXPECT_FALSE(x.IsDouble());
- EXPECT_FALSE(x.IsNull());
- EXPECT_FALSE(x.IsBool());
- EXPECT_FALSE(x.IsFalse());
- EXPECT_FALSE(x.IsTrue());
- EXPECT_FALSE(x.IsString());
- EXPECT_FALSE(x.IsObject());
- EXPECT_FALSE(x.IsArray());
-
- Value nx(-1234);
- EXPECT_EQ(-1234, nx.GetInt());
- EXPECT_EQ(-1234, nx.GetInt64());
- EXPECT_TRUE(nx.IsInt());
- EXPECT_TRUE(nx.IsInt64());
- EXPECT_FALSE(nx.IsUint());
- EXPECT_FALSE(nx.IsUint64());
-
- // Constructor with type
- Value y(kNumberType);
- EXPECT_TRUE(y.IsNumber());
- EXPECT_TRUE(y.IsInt());
- EXPECT_EQ(0, y.GetInt());
-
- // SetInt()
- Value z;
- z.SetInt(1234);
- EXPECT_EQ(1234, z.GetInt());
-
- // operator=(int)
- z = 5678;
- EXPECT_EQ(5678, z.GetInt());
-}
-
-TEST(Value, Uint) {
- // Constructor with int
- Value x(1234u);
- EXPECT_EQ(kNumberType, x.GetType());
- EXPECT_EQ(1234, x.GetInt());
- EXPECT_EQ(1234u, x.GetUint());
- EXPECT_EQ(1234, x.GetInt64());
- EXPECT_EQ(1234u, x.GetUint64());
- EXPECT_TRUE(x.IsNumber());
- EXPECT_TRUE(x.IsInt());
- EXPECT_TRUE(x.IsUint());
- EXPECT_TRUE(x.IsInt64());
- EXPECT_TRUE(x.IsUint64());
- EXPECT_NEAR(1234.0, x.GetDouble(), 0.0); // Number can always be cast as double but !IsDouble().
-
- EXPECT_FALSE(x.IsDouble());
- EXPECT_FALSE(x.IsNull());
- EXPECT_FALSE(x.IsBool());
- EXPECT_FALSE(x.IsFalse());
- EXPECT_FALSE(x.IsTrue());
- EXPECT_FALSE(x.IsString());
- EXPECT_FALSE(x.IsObject());
- EXPECT_FALSE(x.IsArray());
-
- // SetUint()
- Value z;
- z.SetUint(1234);
- EXPECT_EQ(1234u, z.GetUint());
-
- // operator=(unsigned)
- z = 5678u;
- EXPECT_EQ(5678u, z.GetUint());
-
- z = 2147483648u; // 2^31, cannot cast as int
- EXPECT_EQ(2147483648u, z.GetUint());
- EXPECT_FALSE(z.IsInt());
- EXPECT_TRUE(z.IsInt64()); // Issue 41: Incorrect parsing of unsigned int number types
-}
-
-TEST(Value, Int64) {
- // Constructor with int
- Value x(int64_t(1234));
- EXPECT_EQ(kNumberType, x.GetType());
- EXPECT_EQ(1234, x.GetInt());
- EXPECT_EQ(1234u, x.GetUint());
- EXPECT_EQ(1234, x.GetInt64());
- EXPECT_EQ(1234u, x.GetUint64());
- EXPECT_TRUE(x.IsNumber());
- EXPECT_TRUE(x.IsInt());
- EXPECT_TRUE(x.IsUint());
- EXPECT_TRUE(x.IsInt64());
- EXPECT_TRUE(x.IsUint64());
-
- EXPECT_FALSE(x.IsDouble());
- EXPECT_FALSE(x.IsNull());
- EXPECT_FALSE(x.IsBool());
- EXPECT_FALSE(x.IsFalse());
- EXPECT_FALSE(x.IsTrue());
- EXPECT_FALSE(x.IsString());
- EXPECT_FALSE(x.IsObject());
- EXPECT_FALSE(x.IsArray());
-
- Value nx(int64_t(-1234));
- EXPECT_EQ(-1234, nx.GetInt());
- EXPECT_EQ(-1234, nx.GetInt64());
- EXPECT_TRUE(nx.IsInt());
- EXPECT_TRUE(nx.IsInt64());
- EXPECT_FALSE(nx.IsUint());
- EXPECT_FALSE(nx.IsUint64());
-
- // SetInt64()
- Value z;
- z.SetInt64(1234);
- EXPECT_EQ(1234, z.GetInt64());
-
- z.SetInt64(2147483648u); // 2^31, cannot cast as int
- EXPECT_FALSE(z.IsInt());
- EXPECT_TRUE(z.IsUint());
- EXPECT_NEAR(2147483648.0, z.GetDouble(), 0.0);
-
- z.SetInt64(int64_t(4294967295u) + 1); // 2^32, cannot cast as uint
- EXPECT_FALSE(z.IsInt());
- EXPECT_FALSE(z.IsUint());
- EXPECT_NEAR(4294967296.0, z.GetDouble(), 0.0);
-
- z.SetInt64(-int64_t(2147483648u) - 1); // -2^31-1, cannot cast as int
- EXPECT_FALSE(z.IsInt());
- EXPECT_NEAR(-2147483649.0, z.GetDouble(), 0.0);
-
- z.SetInt64(static_cast<int64_t>(RAPIDJSON_UINT64_C2(0x80000000, 00000000)));
- EXPECT_DOUBLE_EQ(-9223372036854775808.0, z.GetDouble());
-}
-
-TEST(Value, Uint64) {
- // Constructor with int
- Value x(uint64_t(1234));
- EXPECT_EQ(kNumberType, x.GetType());
- EXPECT_EQ(1234, x.GetInt());
- EXPECT_EQ(1234u, x.GetUint());
- EXPECT_EQ(1234, x.GetInt64());
- EXPECT_EQ(1234u, x.GetUint64());
- EXPECT_TRUE(x.IsNumber());
- EXPECT_TRUE(x.IsInt());
- EXPECT_TRUE(x.IsUint());
- EXPECT_TRUE(x.IsInt64());
- EXPECT_TRUE(x.IsUint64());
-
- EXPECT_FALSE(x.IsDouble());
- EXPECT_FALSE(x.IsNull());
- EXPECT_FALSE(x.IsBool());
- EXPECT_FALSE(x.IsFalse());
- EXPECT_FALSE(x.IsTrue());
- EXPECT_FALSE(x.IsString());
- EXPECT_FALSE(x.IsObject());
- EXPECT_FALSE(x.IsArray());
-
- // SetUint64()
- Value z;
- z.SetUint64(1234);
- EXPECT_EQ(1234u, z.GetUint64());
-
- z.SetUint64(uint64_t(2147483648u)); // 2^31, cannot cast as int
- EXPECT_FALSE(z.IsInt());
- EXPECT_TRUE(z.IsUint());
- EXPECT_TRUE(z.IsInt64());
-
- z.SetUint64(uint64_t(4294967295u) + 1); // 2^32, cannot cast as uint
- EXPECT_FALSE(z.IsInt());
- EXPECT_FALSE(z.IsUint());
- EXPECT_TRUE(z.IsInt64());
-
- z.SetUint64(RAPIDJSON_UINT64_C2(0x80000000, 0x00000000)); // 2^63 cannot cast as int64
- EXPECT_FALSE(z.IsInt64());
- EXPECT_EQ(RAPIDJSON_UINT64_C2(0x80000000, 0x00000000), z.GetUint64()); // Issue 48
- EXPECT_DOUBLE_EQ(9223372036854775808.0, z.GetDouble());
-}
-
-TEST(Value, Double) {
- // Constructor with double
- Value x(12.34);
- EXPECT_EQ(kNumberType, x.GetType());
- EXPECT_NEAR(12.34, x.GetDouble(), 0.0);
- EXPECT_TRUE(x.IsNumber());
- EXPECT_TRUE(x.IsDouble());
-
- EXPECT_FALSE(x.IsInt());
- EXPECT_FALSE(x.IsNull());
- EXPECT_FALSE(x.IsBool());
- EXPECT_FALSE(x.IsFalse());
- EXPECT_FALSE(x.IsTrue());
- EXPECT_FALSE(x.IsString());
- EXPECT_FALSE(x.IsObject());
- EXPECT_FALSE(x.IsArray());
-
- // SetDouble()
- Value z;
- z.SetDouble(12.34);
- EXPECT_NEAR(12.34, z.GetDouble(), 0.0);
-
- z = 56.78;
- EXPECT_NEAR(56.78, z.GetDouble(), 0.0);
-}
-
-TEST(Value, Float) {
- // Constructor with double
- Value x(12.34f);
- EXPECT_EQ(kNumberType, x.GetType());
- EXPECT_NEAR(12.34f, x.GetFloat(), 0.0);
- EXPECT_TRUE(x.IsNumber());
- EXPECT_TRUE(x.IsDouble());
- EXPECT_TRUE(x.IsFloat());
-
- EXPECT_FALSE(x.IsInt());
- EXPECT_FALSE(x.IsNull());
- EXPECT_FALSE(x.IsBool());
- EXPECT_FALSE(x.IsFalse());
- EXPECT_FALSE(x.IsTrue());
- EXPECT_FALSE(x.IsString());
- EXPECT_FALSE(x.IsObject());
- EXPECT_FALSE(x.IsArray());
-
- // SetFloat()
- Value z;
- z.SetFloat(12.34f);
- EXPECT_NEAR(12.34f, z.GetFloat(), 0.0f);
-
- z = 56.78f;
- EXPECT_NEAR(56.78f, z.GetFloat(), 0.0f);
-}
-
-TEST(Value, IsLosslessDouble) {
- EXPECT_TRUE(Value(12.34).IsLosslessDouble());
- EXPECT_TRUE(Value(-123).IsLosslessDouble());
- EXPECT_TRUE(Value(2147483648u).IsLosslessDouble());
- EXPECT_TRUE(Value(static_cast<int64_t>(-RAPIDJSON_UINT64_C2(0x40000000, 0x00000000))).IsLosslessDouble());
- EXPECT_TRUE(Value(RAPIDJSON_UINT64_C2(0xA0000000, 0x00000000)).IsLosslessDouble());
-
- EXPECT_FALSE(Value(static_cast<int64_t>(-RAPIDJSON_UINT64_C2(0x7FFFFFFF, 0xFFFFFFFF))).IsLosslessDouble());
- EXPECT_FALSE(Value(RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0xFFFFFFFF)).IsLosslessDouble());
-}
-
-TEST(Value, IsLosslessFloat) {
- EXPECT_TRUE(Value(12.25).IsLosslessFloat());
- EXPECT_TRUE(Value(-123).IsLosslessFloat());
- EXPECT_TRUE(Value(2147483648u).IsLosslessFloat());
- EXPECT_TRUE(Value(3.4028234e38f).IsLosslessFloat());
- EXPECT_TRUE(Value(-3.4028234e38f).IsLosslessFloat());
- EXPECT_FALSE(Value(3.4028235e38).IsLosslessFloat());
- EXPECT_FALSE(Value(0.3).IsLosslessFloat());
-}
-
-TEST(Value, String) {
- // Construction with const string
- Value x("Hello", 5); // literal
- EXPECT_EQ(kStringType, x.GetType());
- EXPECT_TRUE(x.IsString());
- EXPECT_STREQ("Hello", x.GetString());
- EXPECT_EQ(5u, x.GetStringLength());
-
- EXPECT_FALSE(x.IsNumber());
- EXPECT_FALSE(x.IsNull());
- EXPECT_FALSE(x.IsBool());
- EXPECT_FALSE(x.IsFalse());
- EXPECT_FALSE(x.IsTrue());
- EXPECT_FALSE(x.IsObject());
- EXPECT_FALSE(x.IsArray());
-
- static const char cstr[] = "World"; // const array
- Value(cstr).Swap(x);
- EXPECT_TRUE(x.IsString());
- EXPECT_EQ(x.GetString(), cstr);
- EXPECT_EQ(x.GetStringLength(), sizeof(cstr)-1);
-
- static char mstr[] = "Howdy"; // non-const array
- // Value(mstr).Swap(x); // should not compile
- Value(StringRef(mstr)).Swap(x);
- EXPECT_TRUE(x.IsString());
- EXPECT_EQ(x.GetString(), mstr);
- EXPECT_EQ(x.GetStringLength(), sizeof(mstr)-1);
- strncpy(mstr,"Hello", sizeof(mstr));
- EXPECT_STREQ(x.GetString(), "Hello");
-
- const char* pstr = cstr;
- //Value(pstr).Swap(x); // should not compile
- Value(StringRef(pstr)).Swap(x);
- EXPECT_TRUE(x.IsString());
- EXPECT_EQ(x.GetString(), cstr);
- EXPECT_EQ(x.GetStringLength(), sizeof(cstr)-1);
-
- char* mpstr = mstr;
- Value(StringRef(mpstr,sizeof(mstr)-1)).Swap(x);
- EXPECT_TRUE(x.IsString());
- EXPECT_EQ(x.GetString(), mstr);
- EXPECT_EQ(x.GetStringLength(), 5u);
- EXPECT_STREQ(x.GetString(), "Hello");
-
- // Constructor with copy string
- MemoryPoolAllocator<> allocator;
- Value c(x.GetString(), x.GetStringLength(), allocator);
- EXPECT_NE(x.GetString(), c.GetString());
- EXPECT_EQ(x.GetStringLength(), c.GetStringLength());
- EXPECT_STREQ(x.GetString(), c.GetString());
- //x.SetString("World");
- x.SetString("World", 5);
- EXPECT_STREQ("Hello", c.GetString());
- EXPECT_EQ(5u, c.GetStringLength());
-
- // Constructor with type
- Value y(kStringType);
- EXPECT_TRUE(y.IsString());
- EXPECT_STREQ("", y.GetString()); // Empty string should be "" instead of 0 (issue 226)
- EXPECT_EQ(0u, y.GetStringLength());
-
- // SetConsttring()
- Value z;
- z.SetString("Hello");
- EXPECT_TRUE(x.IsString());
- z.SetString("Hello", 5);
- EXPECT_STREQ("Hello", z.GetString());
- EXPECT_STREQ("Hello", z.GetString());
- EXPECT_EQ(5u, z.GetStringLength());
-
- z.SetString("Hello");
- EXPECT_TRUE(z.IsString());
- EXPECT_STREQ("Hello", z.GetString());
-
- //z.SetString(mstr); // should not compile
- //z.SetString(pstr); // should not compile
- z.SetString(StringRef(mstr));
- EXPECT_TRUE(z.IsString());
- EXPECT_STREQ(z.GetString(), mstr);
-
- z.SetString(cstr);
- EXPECT_TRUE(z.IsString());
- EXPECT_EQ(cstr, z.GetString());
-
- z = cstr;
- EXPECT_TRUE(z.IsString());
- EXPECT_EQ(cstr, z.GetString());
-
- // SetString()
- char s[] = "World";
- Value w;
- w.SetString(s, static_cast<SizeType>(strlen(s)), allocator);
- s[0] = '\0';
- EXPECT_STREQ("World", w.GetString());
- EXPECT_EQ(5u, w.GetStringLength());
-
-#if RAPIDJSON_HAS_STDSTRING
- {
- std::string str = "Hello World";
- str[5] = '\0';
- EXPECT_STREQ(str.data(),"Hello"); // embedded '\0'
- EXPECT_EQ(str.size(), 11u);
-
- // no copy
- Value vs0(StringRef(str));
- EXPECT_TRUE(vs0.IsString());
- EXPECT_EQ(vs0.GetString(), str.data());
- EXPECT_EQ(vs0.GetStringLength(), str.size());
- TestEqual(vs0, str);
-
- // do copy
- Value vs1(str, allocator);
- EXPECT_TRUE(vs1.IsString());
- EXPECT_NE(vs1.GetString(), str.data());
- EXPECT_NE(vs1.GetString(), str); // not equal due to embedded '\0'
- EXPECT_EQ(vs1.GetStringLength(), str.size());
- TestEqual(vs1, str);
-
- // SetString
- str = "World";
- vs0.SetNull().SetString(str, allocator);
- EXPECT_TRUE(vs0.IsString());
- EXPECT_STREQ(vs0.GetString(), str.c_str());
- EXPECT_EQ(vs0.GetStringLength(), str.size());
- TestEqual(str, vs0);
- TestUnequal(str, vs1);
-
- // vs1 = str; // should not compile
- vs1 = StringRef(str);
- TestEqual(str, vs1);
- TestEqual(vs0, vs1);
- }
-#endif // RAPIDJSON_HAS_STDSTRING
-}
-
-// Issue 226: Value of string type should not point to NULL
-TEST(Value, SetStringNullException) {
- Value v;
- EXPECT_THROW(v.SetString(0, 0), AssertException);
-}
-
-TEST(Value, Array) {
- Value x(kArrayType);
- const Value& y = x;
- Value::AllocatorType allocator;
-
- EXPECT_EQ(kArrayType, x.GetType());
- EXPECT_TRUE(x.IsArray());
- EXPECT_TRUE(x.Empty());
- EXPECT_EQ(0u, x.Size());
- EXPECT_TRUE(y.IsArray());
- EXPECT_TRUE(y.Empty());
- EXPECT_EQ(0u, y.Size());
-
- EXPECT_FALSE(x.IsNull());
- EXPECT_FALSE(x.IsBool());
- EXPECT_FALSE(x.IsFalse());
- EXPECT_FALSE(x.IsTrue());
- EXPECT_FALSE(x.IsString());
- EXPECT_FALSE(x.IsObject());
-
- // PushBack()
- Value v;
- x.PushBack(v, allocator);
- v.SetBool(true);
- x.PushBack(v, allocator);
- v.SetBool(false);
- x.PushBack(v, allocator);
- v.SetInt(123);
- x.PushBack(v, allocator);
- //x.PushBack((const char*)"foo", allocator); // should not compile
- x.PushBack("foo", allocator);
-
- EXPECT_FALSE(x.Empty());
- EXPECT_EQ(5u, x.Size());
- EXPECT_FALSE(y.Empty());
- EXPECT_EQ(5u, y.Size());
- EXPECT_TRUE(x[SizeType(0)].IsNull());
- EXPECT_TRUE(x[1].IsTrue());
- EXPECT_TRUE(x[2].IsFalse());
- EXPECT_TRUE(x[3].IsInt());
- EXPECT_EQ(123, x[3].GetInt());
- EXPECT_TRUE(y[SizeType(0)].IsNull());
- EXPECT_TRUE(y[1].IsTrue());
- EXPECT_TRUE(y[2].IsFalse());
- EXPECT_TRUE(y[3].IsInt());
- EXPECT_EQ(123, y[3].GetInt());
- EXPECT_TRUE(y[4].IsString());
- EXPECT_STREQ("foo", y[4].GetString());
-
-#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
- // PushBack(GenericValue&&, Allocator&);
- {
- Value y2(kArrayType);
- y2.PushBack(Value(true), allocator);
- y2.PushBack(std::move(Value(kArrayType).PushBack(Value(1), allocator).PushBack("foo", allocator)), allocator);
- EXPECT_EQ(2u, y2.Size());
- EXPECT_TRUE(y2[0].IsTrue());
- EXPECT_TRUE(y2[1].IsArray());
- EXPECT_EQ(2u, y2[1].Size());
- EXPECT_TRUE(y2[1][0].IsInt());
- EXPECT_TRUE(y2[1][1].IsString());
- }
-#endif
-
- // iterator
- Value::ValueIterator itr = x.Begin();
- EXPECT_TRUE(itr != x.End());
- EXPECT_TRUE(itr->IsNull());
- ++itr;
- EXPECT_TRUE(itr != x.End());
- EXPECT_TRUE(itr->IsTrue());
- ++itr;
- EXPECT_TRUE(itr != x.End());
- EXPECT_TRUE(itr->IsFalse());
- ++itr;
- EXPECT_TRUE(itr != x.End());
- EXPECT_TRUE(itr->IsInt());
- EXPECT_EQ(123, itr->GetInt());
- ++itr;
- EXPECT_TRUE(itr != x.End());
- EXPECT_TRUE(itr->IsString());
- EXPECT_STREQ("foo", itr->GetString());
-
- // const iterator
- Value::ConstValueIterator citr = y.Begin();
- EXPECT_TRUE(citr != y.End());
- EXPECT_TRUE(citr->IsNull());
- ++citr;
- EXPECT_TRUE(citr != y.End());
- EXPECT_TRUE(citr->IsTrue());
- ++citr;
- EXPECT_TRUE(citr != y.End());
- EXPECT_TRUE(citr->IsFalse());
- ++citr;
- EXPECT_TRUE(citr != y.End());
- EXPECT_TRUE(citr->IsInt());
- EXPECT_EQ(123, citr->GetInt());
- ++citr;
- EXPECT_TRUE(citr != y.End());
- EXPECT_TRUE(citr->IsString());
- EXPECT_STREQ("foo", citr->GetString());
-
- // PopBack()
- x.PopBack();
- EXPECT_EQ(4u, x.Size());
- EXPECT_TRUE(y[SizeType(0)].IsNull());
- EXPECT_TRUE(y[1].IsTrue());
- EXPECT_TRUE(y[2].IsFalse());
- EXPECT_TRUE(y[3].IsInt());
-
- // Clear()
- x.Clear();
- EXPECT_TRUE(x.Empty());
- EXPECT_EQ(0u, x.Size());
- EXPECT_TRUE(y.Empty());
- EXPECT_EQ(0u, y.Size());
-
- // Erase(ValueIterator)
-
- // Use array of array to ensure removed elements' destructor is called.
- // [[0],[1],[2],...]
- for (int i = 0; i < 10; i++)
- x.PushBack(Value(kArrayType).PushBack(i, allocator).Move(), allocator);
-
- // Erase the first
- itr = x.Erase(x.Begin());
- EXPECT_EQ(x.Begin(), itr);
- EXPECT_EQ(9u, x.Size());
- for (int i = 0; i < 9; i++)
- EXPECT_EQ(i + 1, x[static_cast<SizeType>(i)][0].GetInt());
-
- // Ease the last
- itr = x.Erase(x.End() - 1);
- EXPECT_EQ(x.End(), itr);
- EXPECT_EQ(8u, x.Size());
- for (int i = 0; i < 8; i++)
- EXPECT_EQ(i + 1, x[static_cast<SizeType>(i)][0].GetInt());
-
- // Erase the middle
- itr = x.Erase(x.Begin() + 4);
- EXPECT_EQ(x.Begin() + 4, itr);
- EXPECT_EQ(7u, x.Size());
- for (int i = 0; i < 4; i++)
- EXPECT_EQ(i + 1, x[static_cast<SizeType>(i)][0].GetInt());
- for (int i = 4; i < 7; i++)
- EXPECT_EQ(i + 2, x[static_cast<SizeType>(i)][0].GetInt());
-
- // Erase(ValueIterator, ValueIterator)
- // Exhaustive test with all 0 <= first < n, first <= last <= n cases
- const unsigned n = 10;
- for (unsigned first = 0; first < n; first++) {
- for (unsigned last = first; last <= n; last++) {
- x.Clear();
- for (unsigned i = 0; i < n; i++)
- x.PushBack(Value(kArrayType).PushBack(i, allocator).Move(), allocator);
-
- itr = x.Erase(x.Begin() + first, x.Begin() + last);
- if (last == n)
- EXPECT_EQ(x.End(), itr);
- else
- EXPECT_EQ(x.Begin() + first, itr);
-
- size_t removeCount = last - first;
- EXPECT_EQ(n - removeCount, x.Size());
- for (unsigned i = 0; i < first; i++)
- EXPECT_EQ(i, x[i][0].GetUint());
- for (unsigned i = first; i < n - removeCount; i++)
- EXPECT_EQ(i + removeCount, x[static_cast<SizeType>(i)][0].GetUint());
- }
- }
-
- // Working in gcc without C++11, but VS2013 cannot compile. To be diagnosed.
- // http://en.wikipedia.org/wiki/Erase-remove_idiom
- x.Clear();
- for (int i = 0; i < 10; i++)
- if (i % 2 == 0)
- x.PushBack(i, allocator);
- else
- x.PushBack(Value(kNullType).Move(), allocator);
-
- const Value null(kNullType);
- x.Erase(std::remove(x.Begin(), x.End(), null), x.End());
- EXPECT_EQ(5u, x.Size());
- for (int i = 0; i < 5; i++)
- EXPECT_EQ(i * 2, x[static_cast<SizeType>(i)]);
-
- // SetArray()
- Value z;
- z.SetArray();
- EXPECT_TRUE(z.IsArray());
- EXPECT_TRUE(z.Empty());
-}
-
-TEST(Value, Object) {
- Value x(kObjectType);
- const Value& y = x; // const version
- Value::AllocatorType allocator;
-
- EXPECT_EQ(kObjectType, x.GetType());
- EXPECT_TRUE(x.IsObject());
- EXPECT_TRUE(x.ObjectEmpty());
- EXPECT_EQ(0u, x.MemberCount());
- EXPECT_EQ(kObjectType, y.GetType());
- EXPECT_TRUE(y.IsObject());
- EXPECT_TRUE(y.ObjectEmpty());
- EXPECT_EQ(0u, y.MemberCount());
-
- // AddMember()
- x.AddMember("A", "Apple", allocator);
- EXPECT_FALSE(x.ObjectEmpty());
- EXPECT_EQ(1u, x.MemberCount());
-
- Value value("Banana", 6);
- x.AddMember("B", "Banana", allocator);
- EXPECT_EQ(2u, x.MemberCount());
-
- // AddMember<T>(StringRefType, T, Allocator)
- {
- Value o(kObjectType);
- o.AddMember("true", true, allocator);
- o.AddMember("false", false, allocator);
- o.AddMember("int", -1, allocator);
- o.AddMember("uint", 1u, allocator);
- o.AddMember("int64", int64_t(-4294967296), allocator);
- o.AddMember("uint64", uint64_t(4294967296), allocator);
- o.AddMember("double", 3.14, allocator);
- o.AddMember("string", "Jelly", allocator);
-
- EXPECT_TRUE(o["true"].GetBool());
- EXPECT_FALSE(o["false"].GetBool());
- EXPECT_EQ(-1, o["int"].GetInt());
- EXPECT_EQ(1u, o["uint"].GetUint());
- EXPECT_EQ(int64_t(-4294967296), o["int64"].GetInt64());
- EXPECT_EQ(uint64_t(4294967296), o["uint64"].GetUint64());
- EXPECT_STREQ("Jelly",o["string"].GetString());
- EXPECT_EQ(8u, o.MemberCount());
- }
-
- // AddMember<T>(Value&, T, Allocator)
- {
- Value o(kObjectType);
-
- Value n("s");
- o.AddMember(n, "string", allocator);
- EXPECT_EQ(1u, o.MemberCount());
-
- Value count("#");
- o.AddMember(count, o.MemberCount(), allocator);
- EXPECT_EQ(2u, o.MemberCount());
- }
-
-#if RAPIDJSON_HAS_STDSTRING
- {
- // AddMember(StringRefType, const std::string&, Allocator)
- Value o(kObjectType);
- o.AddMember("b", std::string("Banana"), allocator);
- EXPECT_STREQ("Banana", o["b"].GetString());
-
- // RemoveMember(const std::string&)
- o.RemoveMember(std::string("b"));
- EXPECT_TRUE(o.ObjectEmpty());
- }
-#endif
-
-#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
- // AddMember(GenericValue&&, ...) variants
- {
- Value o(kObjectType);
- o.AddMember(Value("true"), Value(true), allocator);
- o.AddMember(Value("false"), Value(false).Move(), allocator); // value is lvalue ref
- o.AddMember(Value("int").Move(), Value(-1), allocator); // name is lvalue ref
- o.AddMember("uint", std::move(Value().SetUint(1u)), allocator); // name is literal, value is rvalue
- EXPECT_TRUE(o["true"].GetBool());
- EXPECT_FALSE(o["false"].GetBool());
- EXPECT_EQ(-1, o["int"].GetInt());
- EXPECT_EQ(1u, o["uint"].GetUint());
- EXPECT_EQ(4u, o.MemberCount());
- }
-#endif
-
- // Tests a member with null character
- Value name;
- const Value C0D("C\0D", 3);
- name.SetString(C0D.GetString(), 3);
- value.SetString("CherryD", 7);
- x.AddMember(name, value, allocator);
-
- // HasMember()
- EXPECT_TRUE(x.HasMember("A"));
- EXPECT_TRUE(x.HasMember("B"));
- EXPECT_TRUE(y.HasMember("A"));
- EXPECT_TRUE(y.HasMember("B"));
-
-#if RAPIDJSON_HAS_STDSTRING
- EXPECT_TRUE(x.HasMember(std::string("A")));
-#endif
-
- name.SetString("C\0D");
- EXPECT_TRUE(x.HasMember(name));
- EXPECT_TRUE(y.HasMember(name));
-
- GenericValue<UTF8<>, CrtAllocator> othername("A");
- EXPECT_TRUE(x.HasMember(othername));
- EXPECT_TRUE(y.HasMember(othername));
- othername.SetString("C\0D");
- EXPECT_TRUE(x.HasMember(othername));
- EXPECT_TRUE(y.HasMember(othername));
-
- // operator[]
- EXPECT_STREQ("Apple", x["A"].GetString());
- EXPECT_STREQ("Banana", x["B"].GetString());
- EXPECT_STREQ("CherryD", x[C0D].GetString());
- EXPECT_STREQ("CherryD", x[othername].GetString());
- EXPECT_THROW(x["nonexist"], AssertException);
-
- // const operator[]
- EXPECT_STREQ("Apple", y["A"].GetString());
- EXPECT_STREQ("Banana", y["B"].GetString());
- EXPECT_STREQ("CherryD", y[C0D].GetString());
-
-#if RAPIDJSON_HAS_STDSTRING
- EXPECT_STREQ("Apple", x["A"].GetString());
- EXPECT_STREQ("Apple", y[std::string("A")].GetString());
-#endif
-
- // member iterator
- Value::MemberIterator itr = x.MemberBegin();
- EXPECT_TRUE(itr != x.MemberEnd());
- EXPECT_STREQ("A", itr->name.GetString());
- EXPECT_STREQ("Apple", itr->value.GetString());
- ++itr;
- EXPECT_TRUE(itr != x.MemberEnd());
- EXPECT_STREQ("B", itr->name.GetString());
- EXPECT_STREQ("Banana", itr->value.GetString());
- ++itr;
- EXPECT_TRUE(itr != x.MemberEnd());
- EXPECT_TRUE(memcmp(itr->name.GetString(), "C\0D", 4) == 0);
- EXPECT_STREQ("CherryD", itr->value.GetString());
- ++itr;
- EXPECT_FALSE(itr != x.MemberEnd());
-
- // const member iterator
- Value::ConstMemberIterator citr = y.MemberBegin();
- EXPECT_TRUE(citr != y.MemberEnd());
- EXPECT_STREQ("A", citr->name.GetString());
- EXPECT_STREQ("Apple", citr->value.GetString());
- ++citr;
- EXPECT_TRUE(citr != y.MemberEnd());
- EXPECT_STREQ("B", citr->name.GetString());
- EXPECT_STREQ("Banana", citr->value.GetString());
- ++citr;
- EXPECT_TRUE(citr != y.MemberEnd());
- EXPECT_TRUE(memcmp(citr->name.GetString(), "C\0D", 4) == 0);
- EXPECT_STREQ("CherryD", citr->value.GetString());
- ++citr;
- EXPECT_FALSE(citr != y.MemberEnd());
-
- // member iterator conversions/relations
- itr = x.MemberBegin();
- citr = x.MemberBegin(); // const conversion
- TestEqual(itr, citr);
- EXPECT_TRUE(itr < x.MemberEnd());
- EXPECT_FALSE(itr > y.MemberEnd());
- EXPECT_TRUE(citr < x.MemberEnd());
- EXPECT_FALSE(citr > y.MemberEnd());
- ++citr;
- TestUnequal(itr, citr);
- EXPECT_FALSE(itr < itr);
- EXPECT_TRUE(itr < citr);
- EXPECT_FALSE(itr > itr);
- EXPECT_TRUE(citr > itr);
- EXPECT_EQ(1, citr - x.MemberBegin());
- EXPECT_EQ(0, itr - y.MemberBegin());
- itr += citr - x.MemberBegin();
- EXPECT_EQ(1, itr - y.MemberBegin());
- TestEqual(citr, itr);
- EXPECT_TRUE(itr <= citr);
- EXPECT_TRUE(citr <= itr);
- itr++;
- EXPECT_TRUE(itr >= citr);
- EXPECT_FALSE(citr >= itr);
-
- // RemoveMember()
- EXPECT_TRUE(x.RemoveMember("A"));
- EXPECT_FALSE(x.HasMember("A"));
-
- EXPECT_TRUE(x.RemoveMember("B"));
- EXPECT_FALSE(x.HasMember("B"));
-
- EXPECT_FALSE(x.RemoveMember("nonexist"));
-
- EXPECT_TRUE(x.RemoveMember(othername));
- EXPECT_FALSE(x.HasMember(name));
-
- EXPECT_TRUE(x.MemberBegin() == x.MemberEnd());
-
- // EraseMember(ConstMemberIterator)
-
- // Use array members to ensure removed elements' destructor is called.
- // { "a": [0], "b": [1],[2],...]
- const char keys[][2] = { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j" };
- for (int i = 0; i < 10; i++)
- x.AddMember(keys[i], Value(kArrayType).PushBack(i, allocator), allocator);
-
- // MemberCount, iterator difference
- EXPECT_EQ(x.MemberCount(), SizeType(x.MemberEnd() - x.MemberBegin()));
-
- // Erase the first
- itr = x.EraseMember(x.MemberBegin());
- EXPECT_FALSE(x.HasMember(keys[0]));
- EXPECT_EQ(x.MemberBegin(), itr);
- EXPECT_EQ(9u, x.MemberCount());
- for (; itr != x.MemberEnd(); ++itr) {
- size_t i = static_cast<size_t>((itr - x.MemberBegin())) + 1;
- EXPECT_STREQ(itr->name.GetString(), keys[i]);
- EXPECT_EQ(i, itr->value[0].GetInt());
- }
-
- // Erase the last
- itr = x.EraseMember(x.MemberEnd() - 1);
- EXPECT_FALSE(x.HasMember(keys[9]));
- EXPECT_EQ(x.MemberEnd(), itr);
- EXPECT_EQ(8u, x.MemberCount());
- for (; itr != x.MemberEnd(); ++itr) {
- size_t i = static_cast<size_t>(itr - x.MemberBegin()) + 1;
- EXPECT_STREQ(itr->name.GetString(), keys[i]);
- EXPECT_EQ(i, itr->value[0].GetInt());
- }
-
- // Erase the middle
- itr = x.EraseMember(x.MemberBegin() + 4);
- EXPECT_FALSE(x.HasMember(keys[5]));
- EXPECT_EQ(x.MemberBegin() + 4, itr);
- EXPECT_EQ(7u, x.MemberCount());
- for (; itr != x.MemberEnd(); ++itr) {
- size_t i = static_cast<size_t>(itr - x.MemberBegin());
- i += (i < 4) ? 1 : 2;
- EXPECT_STREQ(itr->name.GetString(), keys[i]);
- EXPECT_EQ(i, itr->value[0].GetInt());
- }
-
- // EraseMember(ConstMemberIterator, ConstMemberIterator)
- // Exhaustive test with all 0 <= first < n, first <= last <= n cases
- const unsigned n = 10;
- for (unsigned first = 0; first < n; first++) {
- for (unsigned last = first; last <= n; last++) {
- Value(kObjectType).Swap(x);
- for (unsigned i = 0; i < n; i++)
- x.AddMember(keys[i], Value(kArrayType).PushBack(i, allocator), allocator);
-
- itr = x.EraseMember(x.MemberBegin() + static_cast<int>(first), x.MemberBegin() + static_cast<int>(last));
- if (last == n)
- EXPECT_EQ(x.MemberEnd(), itr);
- else
- EXPECT_EQ(x.MemberBegin() + static_cast<int>(first), itr);
-
- size_t removeCount = last - first;
- EXPECT_EQ(n - removeCount, x.MemberCount());
- for (unsigned i = 0; i < first; i++)
- EXPECT_EQ(i, x[keys[i]][0].GetUint());
- for (unsigned i = first; i < n - removeCount; i++)
- EXPECT_EQ(i + removeCount, x[keys[i+removeCount]][0].GetUint());
- }
- }
-
- // RemoveAllMembers()
- x.RemoveAllMembers();
- EXPECT_TRUE(x.ObjectEmpty());
- EXPECT_EQ(0u, x.MemberCount());
-
- // SetObject()
- Value z;
- z.SetObject();
- EXPECT_TRUE(z.IsObject());
-}
-
-TEST(Value, EraseMember_String) {
- Value::AllocatorType allocator;
- Value x(kObjectType);
- x.AddMember("A", "Apple", allocator);
- x.AddMember("B", "Banana", allocator);
-
- EXPECT_TRUE(x.EraseMember("B"));
- EXPECT_FALSE(x.HasMember("B"));
-
- EXPECT_FALSE(x.EraseMember("nonexist"));
-
- GenericValue<UTF8<>, CrtAllocator> othername("A");
- EXPECT_TRUE(x.EraseMember(othername));
- EXPECT_FALSE(x.HasMember("A"));
-
- EXPECT_TRUE(x.MemberBegin() == x.MemberEnd());
-}
-
-TEST(Value, BigNestedArray) {
- MemoryPoolAllocator<> allocator;
- Value x(kArrayType);
- static const SizeType n = 200;
-
- for (SizeType i = 0; i < n; i++) {
- Value y(kArrayType);
- for (SizeType j = 0; j < n; j++) {
- Value number(static_cast<int>(i * n + j));
- y.PushBack(number, allocator);
- }
- x.PushBack(y, allocator);
- }
-
- for (SizeType i = 0; i < n; i++)
- for (SizeType j = 0; j < n; j++) {
- EXPECT_TRUE(x[i][j].IsInt());
- EXPECT_EQ(static_cast<int>(i * n + j), x[i][j].GetInt());
- }
-}
-
-TEST(Value, BigNestedObject) {
- MemoryPoolAllocator<> allocator;
- Value x(kObjectType);
- static const SizeType n = 200;
-
- for (SizeType i = 0; i < n; i++) {
- char name1[10];
- sprintf(name1, "%d", i);
-
- // Value name(name1); // should not compile
- Value name(name1, static_cast<SizeType>(strlen(name1)), allocator);
- Value object(kObjectType);
-
- for (SizeType j = 0; j < n; j++) {
- char name2[10];
- sprintf(name2, "%d", j);
-
- Value name3(name2, static_cast<SizeType>(strlen(name2)), allocator);
- Value number(static_cast<int>(i * n + j));
- object.AddMember(name3, number, allocator);
- }
-
- // x.AddMember(name1, object, allocator); // should not compile
- x.AddMember(name, object, allocator);
- }
-
- for (SizeType i = 0; i < n; i++) {
- char name1[10];
- sprintf(name1, "%d", i);
-
- for (SizeType j = 0; j < n; j++) {
- char name2[10];
- sprintf(name2, "%d", j);
- x[name1];
- EXPECT_EQ(static_cast<int>(i * n + j), x[name1][name2].GetInt());
- }
- }
-}
-
-// Issue 18: Error removing last element of object
-// http://code.google.com/p/rapidjson/issues/detail?id=18
-TEST(Value, RemoveLastElement) {
- rapidjson::Document doc;
- rapidjson::Document::AllocatorType& allocator = doc.GetAllocator();
- rapidjson::Value objVal(rapidjson::kObjectType);
- objVal.AddMember("var1", 123, allocator);
- objVal.AddMember("var2", "444", allocator);
- objVal.AddMember("var3", 555, allocator);
- EXPECT_TRUE(objVal.HasMember("var3"));
- objVal.RemoveMember("var3"); // Assertion here in r61
- EXPECT_FALSE(objVal.HasMember("var3"));
-}
-
-// Issue 38: Segmentation fault with CrtAllocator
-TEST(Document, CrtAllocator) {
- typedef GenericValue<UTF8<>, CrtAllocator> V;
-
- V::AllocatorType allocator;
- V o(kObjectType);
- o.AddMember("x", 1, allocator); // Should not call destructor on uninitialized name/value of newly allocated members.
-
- V a(kArrayType);
- a.PushBack(1, allocator); // Should not call destructor on uninitialized Value of newly allocated elements.
-}
-
-static void TestShortStringOptimization(const char* str) {
- const rapidjson::SizeType len = static_cast<rapidjson::SizeType>(strlen(str));
-
- rapidjson::Document doc;
- rapidjson::Value val;
- val.SetString(str, len, doc.GetAllocator());
-
- EXPECT_EQ(val.GetStringLength(), len);
- EXPECT_STREQ(val.GetString(), str);
-}
-
-TEST(Value, AllocateShortString) {
- TestShortStringOptimization(""); // edge case: empty string
- TestShortStringOptimization("12345678"); // regular case for short strings: 8 chars
- TestShortStringOptimization("12345678901"); // edge case: 11 chars in 32-bit mode (=> short string)
- TestShortStringOptimization("123456789012"); // edge case: 12 chars in 32-bit mode (=> regular string)
- TestShortStringOptimization("123456789012345"); // edge case: 15 chars in 64-bit mode (=> short string)
- TestShortStringOptimization("1234567890123456"); // edge case: 16 chars in 64-bit mode (=> regular string)
-}
-
-template <int e>
-struct TerminateHandler {
- bool Null() { return e != 0; }
- bool Bool(bool) { return e != 1; }
- bool Int(int) { return e != 2; }
- bool Uint(unsigned) { return e != 3; }
- bool Int64(int64_t) { return e != 4; }
- bool Uint64(uint64_t) { return e != 5; }
- bool Double(double) { return e != 6; }
- bool String(const char*, SizeType, bool) { return e != 7; }
- bool StartObject() { return e != 8; }
- bool Key(const char*, SizeType, bool) { return e != 9; }
- bool EndObject(SizeType) { return e != 10; }
- bool StartArray() { return e != 11; }
- bool EndArray(SizeType) { return e != 12; }
-};
-
-#define TEST_TERMINATION(e, json)\
-{\
- Document d; \
- EXPECT_FALSE(d.Parse(json).HasParseError()); \
- Reader reader; \
- TerminateHandler<e> h;\
- EXPECT_FALSE(d.Accept(h));\
-}
-
-TEST(Value, AcceptTerminationByHandler) {
- TEST_TERMINATION(0, "[null]");
- TEST_TERMINATION(1, "[true]");
- TEST_TERMINATION(1, "[false]");
- TEST_TERMINATION(2, "[-1]");
- TEST_TERMINATION(3, "[2147483648]");
- TEST_TERMINATION(4, "[-1234567890123456789]");
- TEST_TERMINATION(5, "[9223372036854775808]");
- TEST_TERMINATION(6, "[0.5]");
- TEST_TERMINATION(7, "[\"a\"]");
- TEST_TERMINATION(8, "[{}]");
- TEST_TERMINATION(9, "[{\"a\":1}]");
- TEST_TERMINATION(10, "[{}]");
- TEST_TERMINATION(11, "{\"a\":[]}");
- TEST_TERMINATION(12, "{\"a\":[]}");
-}
-
-struct ValueIntComparer {
- bool operator()(const Value& lhs, const Value& rhs) const {
- return lhs.GetInt() < rhs.GetInt();
- }
-};
-
-#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
-TEST(Value, Sorting) {
- Value::AllocatorType allocator;
- Value a(kArrayType);
- a.PushBack(5, allocator);
- a.PushBack(1, allocator);
- a.PushBack(3, allocator);
- std::sort(a.Begin(), a.End(), ValueIntComparer());
- EXPECT_EQ(1, a[0].GetInt());
- EXPECT_EQ(3, a[1].GetInt());
- EXPECT_EQ(5, a[2].GetInt());
-}
-#endif
-
-// http://stackoverflow.com/questions/35222230/
-
-static void MergeDuplicateKey(Value& v, Value::AllocatorType& a) {
- if (v.IsObject()) {
- // Convert all key:value into key:[value]
- for (Value::MemberIterator itr = v.MemberBegin(); itr != v.MemberEnd(); ++itr)
- itr->value = Value(kArrayType).Move().PushBack(itr->value, a);
-
- // Merge arrays if key is duplicated
- for (Value::MemberIterator itr = v.MemberBegin(); itr != v.MemberEnd();) {
- Value::MemberIterator itr2 = v.FindMember(itr->name);
- if (itr != itr2) {
- itr2->value.PushBack(itr->value[0], a);
- itr = v.EraseMember(itr);
- }
- else
- ++itr;
- }
-
- // Convert key:[values] back to key:value if there is only one value
- for (Value::MemberIterator itr = v.MemberBegin(); itr != v.MemberEnd(); ++itr) {
- if (itr->value.Size() == 1)
- itr->value = itr->value[0];
- MergeDuplicateKey(itr->value, a); // Recursion on the value
- }
- }
- else if (v.IsArray())
- for (Value::ValueIterator itr = v.Begin(); itr != v.End(); ++itr)
- MergeDuplicateKey(*itr, a);
-}
-
-TEST(Value, MergeDuplicateKey) {
- Document d;
- d.Parse(
- "{"
- " \"key1\": {"
- " \"a\": \"asdf\","
- " \"b\": \"foo\","
- " \"b\": \"bar\","
- " \"c\": \"fdas\""
- " }"
- "}");
-
- Document d2;
- d2.Parse(
- "{"
- " \"key1\": {"
- " \"a\": \"asdf\","
- " \"b\": ["
- " \"foo\","
- " \"bar\""
- " ],"
- " \"c\": \"fdas\""
- " }"
- "}");
-
- EXPECT_NE(d2, d);
- MergeDuplicateKey(d, d.GetAllocator());
- EXPECT_EQ(d2, d);
-}
-
-#ifdef __clang__
-RAPIDJSON_DIAG_POP
-#endif
diff --git a/3rdparty/rapidjson/test/unittest/writertest.cpp b/3rdparty/rapidjson/test/unittest/writertest.cpp
deleted file mode 100644
index 238aa79e72e..00000000000
--- a/3rdparty/rapidjson/test/unittest/writertest.cpp
+++ /dev/null
@@ -1,441 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// 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 "unittest.h"
-
-#include "rapidjson/document.h"
-#include "rapidjson/reader.h"
-#include "rapidjson/writer.h"
-#include "rapidjson/stringbuffer.h"
-
-using namespace rapidjson;
-
-TEST(Writer, Compact) {
- StringStream s("{ \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3] } ");
- StringBuffer buffer;
- Writer<StringBuffer> writer(buffer);
- buffer.ShrinkToFit();
- Reader reader;
- reader.Parse<0>(s, writer);
- EXPECT_STREQ("{\"hello\":\"world\",\"t\":true,\"f\":false,\"n\":null,\"i\":123,\"pi\":3.1416,\"a\":[1,2,3]}", buffer.GetString());
- EXPECT_EQ(77u, buffer.GetSize());
- EXPECT_TRUE(writer.IsComplete());
-}
-
-// json -> parse -> writer -> json
-#define TEST_ROUNDTRIP(json) \
- { \
- StringStream s(json); \
- StringBuffer buffer; \
- Writer<StringBuffer> writer(buffer); \
- Reader reader; \
- reader.Parse<kParseFullPrecisionFlag>(s, writer); \
- EXPECT_STREQ(json, buffer.GetString()); \
- EXPECT_TRUE(writer.IsComplete()); \
- }
-
-TEST(Writer, Root) {
- TEST_ROUNDTRIP("null");
- TEST_ROUNDTRIP("true");
- TEST_ROUNDTRIP("false");
- TEST_ROUNDTRIP("0");
- TEST_ROUNDTRIP("\"foo\"");
- TEST_ROUNDTRIP("[]");
- TEST_ROUNDTRIP("{}");
-}
-
-TEST(Writer, Int) {
- TEST_ROUNDTRIP("[-1]");
- TEST_ROUNDTRIP("[-123]");
- TEST_ROUNDTRIP("[-2147483648]");
-}
-
-TEST(Writer, UInt) {
- TEST_ROUNDTRIP("[0]");
- TEST_ROUNDTRIP("[1]");
- TEST_ROUNDTRIP("[123]");
- TEST_ROUNDTRIP("[2147483647]");
- TEST_ROUNDTRIP("[4294967295]");
-}
-
-TEST(Writer, Int64) {
- TEST_ROUNDTRIP("[-1234567890123456789]");
- TEST_ROUNDTRIP("[-9223372036854775808]");
-}
-
-TEST(Writer, Uint64) {
- TEST_ROUNDTRIP("[1234567890123456789]");
- TEST_ROUNDTRIP("[9223372036854775807]");
-}
-
-TEST(Writer, String) {
- TEST_ROUNDTRIP("[\"Hello\"]");
- TEST_ROUNDTRIP("[\"Hello\\u0000World\"]");
- TEST_ROUNDTRIP("[\"\\\"\\\\/\\b\\f\\n\\r\\t\"]");
-
-#if RAPIDJSON_HAS_STDSTRING
- {
- StringBuffer buffer;
- Writer<StringBuffer> writer(buffer);
- writer.String(std::string("Hello\n"));
- EXPECT_STREQ("\"Hello\\n\"", buffer.GetString());
- }
-#endif
-}
-
-TEST(Writer, Double) {
- TEST_ROUNDTRIP("[1.2345,1.2345678,0.123456789012,1234567.8]");
- TEST_ROUNDTRIP("0.0");
- TEST_ROUNDTRIP("-0.0"); // Issue #289
- TEST_ROUNDTRIP("1e30");
- TEST_ROUNDTRIP("1.0");
- TEST_ROUNDTRIP("5e-324"); // Min subnormal positive double
- TEST_ROUNDTRIP("2.225073858507201e-308"); // Max subnormal positive double
- TEST_ROUNDTRIP("2.2250738585072014e-308"); // Min normal positive double
- TEST_ROUNDTRIP("1.7976931348623157e308"); // Max double
-
-}
-
-TEST(Writer, Transcode) {
- const char json[] = "{\"hello\":\"world\",\"t\":true,\"f\":false,\"n\":null,\"i\":123,\"pi\":3.1416,\"a\":[1,2,3],\"dollar\":\"\x24\",\"cents\":\"\xC2\xA2\",\"euro\":\"\xE2\x82\xAC\",\"gclef\":\"\xF0\x9D\x84\x9E\"}";
-
- // UTF8 -> UTF16 -> UTF8
- {
- StringStream s(json);
- StringBuffer buffer;
- Writer<StringBuffer, UTF16<>, UTF8<> > writer(buffer);
- GenericReader<UTF8<>, UTF16<> > reader;
- reader.Parse(s, writer);
- EXPECT_STREQ(json, buffer.GetString());
- }
-
- // UTF8 -> UTF8 -> ASCII -> UTF8 -> UTF8
- {
- StringStream s(json);
- StringBuffer buffer;
- Writer<StringBuffer, UTF8<>, ASCII<> > writer(buffer);
- Reader reader;
- reader.Parse(s, writer);
-
- StringBuffer buffer2;
- Writer<StringBuffer> writer2(buffer2);
- GenericReader<ASCII<>, UTF8<> > reader2;
- StringStream s2(buffer.GetString());
- reader2.Parse(s2, writer2);
-
- EXPECT_STREQ(json, buffer2.GetString());
- }
-}
-
-#include <sstream>
-
-class OStreamWrapper {
-public:
- typedef char Ch;
-
- OStreamWrapper(std::ostream& os) : os_(os) {}
-
- Ch Peek() const { assert(false); return '\0'; }
- Ch Take() { assert(false); return '\0'; }
- size_t Tell() const { return 0; }
-
- Ch* PutBegin() { assert(false); return 0; }
- void Put(Ch c) { os_.put(c); }
- void Flush() { os_.flush(); }
- size_t PutEnd(Ch*) { assert(false); return 0; }
-
-private:
- OStreamWrapper(const OStreamWrapper&);
- OStreamWrapper& operator=(const OStreamWrapper&);
-
- std::ostream& os_;
-};
-
-TEST(Writer, OStreamWrapper) {
- StringStream s("{ \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3], \"u64\": 1234567890123456789, \"i64\":-1234567890123456789 } ");
-
- std::stringstream ss;
- OStreamWrapper os(ss);
-
- Writer<OStreamWrapper> writer(os);
-
- Reader reader;
- reader.Parse<0>(s, writer);
-
- std::string actual = ss.str();
- EXPECT_STREQ("{\"hello\":\"world\",\"t\":true,\"f\":false,\"n\":null,\"i\":123,\"pi\":3.1416,\"a\":[1,2,3],\"u64\":1234567890123456789,\"i64\":-1234567890123456789}", actual.c_str());
-}
-
-TEST(Writer, AssertRootMayBeAnyValue) {
-#define T(x)\
- {\
- StringBuffer buffer;\
- Writer<StringBuffer> writer(buffer);\
- EXPECT_TRUE(x);\
- }
- T(writer.Bool(false));
- T(writer.Bool(true));
- T(writer.Null());
- T(writer.Int(0));
- T(writer.Uint(0));
- T(writer.Int64(0));
- T(writer.Uint64(0));
- T(writer.Double(0));
- T(writer.String("foo"));
-#undef T
-}
-
-TEST(Writer, AssertIncorrectObjectLevel) {
- StringBuffer buffer;
- Writer<StringBuffer> writer(buffer);
- writer.StartObject();
- writer.EndObject();
- ASSERT_THROW(writer.EndObject(), AssertException);
-}
-
-TEST(Writer, AssertIncorrectArrayLevel) {
- StringBuffer buffer;
- Writer<StringBuffer> writer(buffer);
- writer.StartArray();
- writer.EndArray();
- ASSERT_THROW(writer.EndArray(), AssertException);
-}
-
-TEST(Writer, AssertIncorrectEndObject) {
- StringBuffer buffer;
- Writer<StringBuffer> writer(buffer);
- writer.StartObject();
- ASSERT_THROW(writer.EndArray(), AssertException);
-}
-
-TEST(Writer, AssertIncorrectEndArray) {
- StringBuffer buffer;
- Writer<StringBuffer> writer(buffer);
- writer.StartObject();
- ASSERT_THROW(writer.EndArray(), AssertException);
-}
-
-TEST(Writer, AssertObjectKeyNotString) {
-#define T(x)\
- {\
- StringBuffer buffer;\
- Writer<StringBuffer> writer(buffer);\
- writer.StartObject();\
- ASSERT_THROW(x, AssertException); \
- }
- T(writer.Bool(false));
- T(writer.Bool(true));
- T(writer.Null());
- T(writer.Int(0));
- T(writer.Uint(0));
- T(writer.Int64(0));
- T(writer.Uint64(0));
- T(writer.Double(0));
- T(writer.StartObject());
- T(writer.StartArray());
-#undef T
-}
-
-TEST(Writer, AssertMultipleRoot) {
- StringBuffer buffer;
- Writer<StringBuffer> writer(buffer);
-
- writer.StartObject();
- writer.EndObject();
- ASSERT_THROW(writer.StartObject(), AssertException);
-
- writer.Reset(buffer);
- writer.Null();
- ASSERT_THROW(writer.Int(0), AssertException);
-
- writer.Reset(buffer);
- writer.String("foo");
- ASSERT_THROW(writer.StartArray(), AssertException);
-
- writer.Reset(buffer);
- writer.StartArray();
- writer.EndArray();
- //ASSERT_THROW(writer.Double(3.14), AssertException);
-}
-
-TEST(Writer, RootObjectIsComplete) {
- StringBuffer buffer;
- Writer<StringBuffer> writer(buffer);
- EXPECT_FALSE(writer.IsComplete());
- writer.StartObject();
- EXPECT_FALSE(writer.IsComplete());
- writer.String("foo");
- EXPECT_FALSE(writer.IsComplete());
- writer.Int(1);
- EXPECT_FALSE(writer.IsComplete());
- writer.EndObject();
- EXPECT_TRUE(writer.IsComplete());
-}
-
-TEST(Writer, RootArrayIsComplete) {
- StringBuffer buffer;
- Writer<StringBuffer> writer(buffer);
- EXPECT_FALSE(writer.IsComplete());
- writer.StartArray();
- EXPECT_FALSE(writer.IsComplete());
- writer.String("foo");
- EXPECT_FALSE(writer.IsComplete());
- writer.Int(1);
- EXPECT_FALSE(writer.IsComplete());
- writer.EndArray();
- EXPECT_TRUE(writer.IsComplete());
-}
-
-TEST(Writer, RootValueIsComplete) {
-#define T(x)\
- {\
- StringBuffer buffer;\
- Writer<StringBuffer> writer(buffer);\
- EXPECT_FALSE(writer.IsComplete()); \
- x; \
- EXPECT_TRUE(writer.IsComplete()); \
- }
- T(writer.Null());
- T(writer.Bool(true));
- T(writer.Bool(false));
- T(writer.Int(0));
- T(writer.Uint(0));
- T(writer.Int64(0));
- T(writer.Uint64(0));
- T(writer.Double(0));
- T(writer.String(""));
-#undef T
-}
-
-TEST(Writer, InvalidEncoding) {
- // Fail in decoding invalid UTF-8 sequence http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt
- {
- GenericStringBuffer<UTF16<> > buffer;
- Writer<GenericStringBuffer<UTF16<> >, UTF8<>, UTF16<> > writer(buffer);
- writer.StartArray();
- EXPECT_FALSE(writer.String("\xfe"));
- EXPECT_FALSE(writer.String("\xff"));
- EXPECT_FALSE(writer.String("\xfe\xfe\xff\xff"));
- writer.EndArray();
- }
-
- // Fail in encoding
- {
- StringBuffer buffer;
- Writer<StringBuffer, UTF32<> > writer(buffer);
- static const UTF32<>::Ch s[] = { 0x110000, 0 }; // Out of U+0000 to U+10FFFF
- EXPECT_FALSE(writer.String(s));
- }
-
- // Fail in unicode escaping in ASCII output
- {
- StringBuffer buffer;
- Writer<StringBuffer, UTF32<>, ASCII<> > writer(buffer);
- static const UTF32<>::Ch s[] = { 0x110000, 0 }; // Out of U+0000 to U+10FFFF
- EXPECT_FALSE(writer.String(s));
- }
-}
-
-TEST(Writer, ValidateEncoding) {
- {
- StringBuffer buffer;
- Writer<StringBuffer, UTF8<>, UTF8<>, CrtAllocator, kWriteValidateEncodingFlag> writer(buffer);
- writer.StartArray();
- EXPECT_TRUE(writer.String("\x24")); // Dollar sign U+0024
- EXPECT_TRUE(writer.String("\xC2\xA2")); // Cents sign U+00A2
- EXPECT_TRUE(writer.String("\xE2\x82\xAC")); // Euro sign U+20AC
- EXPECT_TRUE(writer.String("\xF0\x9D\x84\x9E")); // G clef sign U+1D11E
- writer.EndArray();
- EXPECT_STREQ("[\"\x24\",\"\xC2\xA2\",\"\xE2\x82\xAC\",\"\xF0\x9D\x84\x9E\"]", buffer.GetString());
- }
-
- // Fail in decoding invalid UTF-8 sequence http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt
- {
- StringBuffer buffer;
- Writer<StringBuffer, UTF8<>, UTF8<>, CrtAllocator, kWriteValidateEncodingFlag> writer(buffer);
- writer.StartArray();
- EXPECT_FALSE(writer.String("\xfe"));
- EXPECT_FALSE(writer.String("\xff"));
- EXPECT_FALSE(writer.String("\xfe\xfe\xff\xff"));
- writer.EndArray();
- }
-}
-
-TEST(Writer, InvalidEventSequence) {
- // {]
- {
- StringBuffer buffer;
- Writer<StringBuffer> writer(buffer);
- writer.StartObject();
- EXPECT_THROW(writer.EndArray(), AssertException);
- EXPECT_FALSE(writer.IsComplete());
- }
-
- // [}
- {
- StringBuffer buffer;
- Writer<StringBuffer> writer(buffer);
- writer.StartArray();
- EXPECT_THROW(writer.EndObject(), AssertException);
- EXPECT_FALSE(writer.IsComplete());
- }
-
- // { 1:
- {
- StringBuffer buffer;
- Writer<StringBuffer> writer(buffer);
- writer.StartObject();
- EXPECT_THROW(writer.Int(1), AssertException);
- EXPECT_FALSE(writer.IsComplete());
- }
-}
-
-extern double zero; // clang -Wmissing-variable-declarations
-double zero = 0.0; // Use global variable to prevent compiler warning
-
-TEST(Writer, NaN) {
- double nan = zero / zero;
- EXPECT_TRUE(internal::Double(nan).IsNan());
- StringBuffer buffer;
- Writer<StringBuffer> writer(buffer);
- EXPECT_FALSE(writer.Double(nan));
-}
-
-TEST(Writer, Inf) {
- double inf = 1.0 / zero;
- EXPECT_TRUE(internal::Double(inf).IsInf());
- StringBuffer buffer;
- {
- Writer<StringBuffer> writer(buffer);
- EXPECT_FALSE(writer.Double(inf));
- }
- {
- Writer<StringBuffer> writer(buffer);
- EXPECT_FALSE(writer.Double(-inf));
- }
-}
-
-TEST(Writer, RawValue) {
- StringBuffer buffer;
- Writer<StringBuffer> writer(buffer);
- writer.StartObject();
- writer.Key("a");
- writer.Int(1);
- writer.Key("raw");
- const char json[] = "[\"Hello\\nWorld\", 123.456]";
- writer.RawValue(json, strlen(json), kArrayType);
- writer.EndObject();
- EXPECT_TRUE(writer.IsComplete());
- EXPECT_STREQ("{\"a\":1,\"raw\":[\"Hello\\nWorld\", 123.456]}", buffer.GetString());
-}
diff --git a/3rdparty/rapidjson/travis-doxygen.sh b/3rdparty/rapidjson/travis-doxygen.sh
deleted file mode 100644
index e9eb6b9c2b9..00000000000
--- a/3rdparty/rapidjson/travis-doxygen.sh
+++ /dev/null
@@ -1,122 +0,0 @@
-#!/bin/bash
-# Update Doxygen documentation after push to 'master'.
-# Author: @pah
-
-set -e
-
-DOXYGEN_VER=doxygen-1.8.7
-DOXYGEN_TAR=${DOXYGEN_VER}.linux.bin.tar.gz
-DOXYGEN_URL="http://ftp.stack.nl/pub/users/dimitri/${DOXYGEN_TAR}"
-DOXYGEN_BIN="/usr/local/bin/doxygen"
-
-: ${GITHUB_REPO:="miloyip/rapidjson"}
-GITHUB_HOST="github.com"
-GITHUB_CLONE="git://${GITHUB_HOST}/${GITHUB_REPO}"
-GITHUB_URL="https://${GITHUB_HOST}/${GITHUB_PUSH-${GITHUB_REPO}}"
-
-# if not set, ignore password
-#GIT_ASKPASS="${TRAVIS_BUILD_DIR}/gh_ignore_askpass.sh"
-
-skip() {
- echo "$@" 1>&2
- echo "Exiting..." 1>&2
- exit 0
-}
-
-abort() {
- echo "Error: $@" 1>&2
- echo "Exiting..." 1>&2
- exit 1
-}
-
-# TRAVIS_BUILD_DIR not set, exiting
-[ -d "${TRAVIS_BUILD_DIR-/nonexistent}" ] || \
- abort '${TRAVIS_BUILD_DIR} not set or nonexistent.'
-
-# check for pull-requests
-[ "${TRAVIS_PULL_REQUEST}" = "false" ] || \
- skip "Not running Doxygen for pull-requests."
-
-# check for branch name
-[ "${TRAVIS_BRANCH}" = "master" ] || \
- skip "Running Doxygen only for updates on 'master' branch (current: ${TRAVIS_BRANCH})."
-
-# check for job number
-[ "${TRAVIS_JOB_NUMBER}" = "${TRAVIS_BUILD_NUMBER}.1" ] || \
- skip "Running Doxygen only on first job of build ${TRAVIS_BUILD_NUMBER} (current: ${TRAVIS_JOB_NUMBER})."
-
-# install doxygen binary distribution
-doxygen_install()
-{
- wget -O - "${DOXYGEN_URL}" | \
- tar xz -C ${TMPDIR-/tmp} ${DOXYGEN_VER}/bin/doxygen
- export PATH="${TMPDIR-/tmp}/${DOXYGEN_VER}/bin:$PATH"
-}
-
-doxygen_run()
-{
- cd "${TRAVIS_BUILD_DIR}";
- doxygen ${TRAVIS_BUILD_DIR}/build/doc/Doxyfile;
- doxygen ${TRAVIS_BUILD_DIR}/build/doc/Doxyfile.zh-cn;
-}
-
-gh_pages_prepare()
-{
- cd "${TRAVIS_BUILD_DIR}/build/doc";
- [ ! -d "html" ] || \
- abort "Doxygen target directory already exists."
- git --version
- git clone -b gh-pages "${GITHUB_CLONE}" html
- cd html
- # setup git config (with defaults)
- git config user.name "${GIT_NAME-travis}"
- git config user.email "${GIT_EMAIL-"travis@localhost"}"
- # clean working dir
- rm -f .git/index
- git clean -df
-}
-
-gh_pages_commit() {
- cd "${TRAVIS_BUILD_DIR}/build/doc/html";
- echo "rapidjson.org" > CNAME
- git add --all;
- git diff-index --quiet HEAD || git commit -m "Automatic doxygen build";
-}
-
-gh_setup_askpass() {
- cat > ${GIT_ASKPASS} <<EOF
-#!/bin/bash
-echo
-exit 0
-EOF
- chmod a+x "$GIT_ASKPASS"
-}
-
-gh_pages_push() {
- # check for secure variables
- [ "${TRAVIS_SECURE_ENV_VARS}" = "true" ] || \
- skip "Secure variables not available, not updating GitHub pages."
- # check for GitHub access token
- [ "${GH_TOKEN+set}" = set ] || \
- skip "GitHub access token not available, not updating GitHub pages."
- [ "${#GH_TOKEN}" -eq 40 ] || \
- abort "GitHub token invalid: found ${#GH_TOKEN} characters, expected 40."
-
- cd "${TRAVIS_BUILD_DIR}/build/doc/html";
- # setup credentials (hide in "set -x" mode)
- git remote set-url --push origin "${GITHUB_URL}"
- git config credential.helper 'store'
- # ( set +x ; git config credential.username "${GH_TOKEN}" )
- ( set +x ; [ -f ${HOME}/.git-credentials ] || \
- ( echo "https://${GH_TOKEN}:@${GITHUB_HOST}" > ${HOME}/.git-credentials ; \
- chmod go-rw ${HOME}/.git-credentials ) )
- # push to GitHub
- git push origin gh-pages
-}
-
-doxygen_install
-gh_pages_prepare
-doxygen_run
-gh_pages_commit
-gh_pages_push
-
diff --git a/artwork/monochrome-matrix.png b/artwork/monochrome-matrix.png
index c1180363087..f68ac273519 100644
--- a/artwork/monochrome-matrix.png
+++ b/artwork/monochrome-matrix.png
Binary files differ
diff --git a/benchmarks/eminline_native.cpp b/benchmarks/eminline_native.cpp
deleted file mode 100644
index 07bfa02bb1d..00000000000
--- a/benchmarks/eminline_native.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Miodrag Milanovic
-
-#include "benchmark/benchmark_api.h"
-#include "osdcomm.h"
-#include "eminline.h"
-static void BM_count_leading_zeros_native(benchmark::State& state) {
- UINT32 cnt = 0x332533;
- while (state.KeepRunning()) {
- (void)count_leading_zeros(cnt);
- cnt++;
- }
-}
-// Register the function as a benchmark
-BENCHMARK(BM_count_leading_zeros_native);
diff --git a/benchmarks/eminline_noasm.cpp b/benchmarks/eminline_noasm.cpp
deleted file mode 100644
index 43c9e36b020..00000000000
--- a/benchmarks/eminline_noasm.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Miodrag Milanovic
-
-#include "benchmark/benchmark_api.h"
-#include <time.h>
-#include "osdcore.h"
-#include "osdcomm.h"
-#define MAME_NOASM 1
-osd_ticks_t osd_ticks(void)
-{
- // use the standard library clock function
- return clock();
-}
-#include "eminline.h"
-
-static void BM_count_leading_zeros_noasm(benchmark::State& state) {
- UINT32 cnt = 0x332533;
- while (state.KeepRunning()) {
- (void)count_leading_zeros(cnt);
- cnt++;
- }
-}
-// Register the function as a benchmark
-BENCHMARK(BM_count_leading_zeros_noasm);
diff --git a/benchmarks/main.cpp b/benchmarks/main.cpp
deleted file mode 100644
index c859b918976..00000000000
--- a/benchmarks/main.cpp
+++ /dev/null
@@ -1,6 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Miodrag Milanovic
-
-#include "benchmark/benchmark_api.h"
-
-BENCHMARK_MAIN(); \ No newline at end of file
diff --git a/docs/emscripten.txt b/docs/emscripten.txt
deleted file mode 100644
index dbc8bd5ad48..00000000000
--- a/docs/emscripten.txt
+++ /dev/null
@@ -1,60 +0,0 @@
-Compiling MAME to JavaScript via Emscripten
-===========================================
-
-First, download and install Emscripten by following the instructions at the
-official site:
-
-https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html
-
-Once Emscripten has been installed, it should be possible to compile MAME
-out-of-the-box using Emscripten's 'emmake' tool. Because a full MAME compile is
-too large to load into a web browser at once, you will want to use the SOURCES
-parameter to compile only a subset of the project, e.g. (in the mame directory):
-
-emmake make SUBTARGET=pacmantest SOURCES=src/mame/drivers/pacman.cpp
-
-The SOURCES parameter should have the path to at least one driver .cpp file.
-The make process will attempt to locate and include all dependencies necessary
-to produce a complete build including the specified driver(s). However,
-sometimes it is necessary to manually specify additional files (using commas) if
-this process misses something. E.g.:
-
-emmake make SUBTARGET=apple2e SOURCES=src/mame/drivers/apple2e.cpp,src/mame/machine/applefdc.cpp
-
-The value of the SUBTARGET parameter serves only to differentiate multiple
-builds and need not be set to any specific value.
-
-Other make parameters can also be used, e.g. -j for multithreaded compilation.
-
-When the compilation reaches the emcc phase, you may see a number of "unresolved
-symbol" warnings. At the moment, this is expected for OpenGL-related functions
-such as glPointSize. Any others may indicate that an additional dependency file
-needs to be specified in the SOURCES list. Unfortunately this process is not
-automated and you will need to search the source tree to locate the files
-supplying the missing symbols. You may also be able to get away with ignoring
-the warnings if the code path referencing them is not used at run-time.
-
-If all goes well, a .js file will be output to the current directory. This file
-cannot be run by itself, but requires an HTML loader to provide it with a canvas
-to output to and pass in command-line parameters. The Emularity project provides
-such a loader:
-
-https://github.com/db48x/emularity
-
-There are example .html files in that repository which can be edited to point
-to your newly compiled MAME js filename and pass in whatever parameters you
-desire. You will then need to place all of the following on a web server:
-
-* The compiled MAME .js file
-* The .js files from the Emularity package (loader.js, browserfs.js, etc.)
-* A .zip file with the ROMs for the MAME driver you would like to run (if any)
-* Any software files you would like to run with the MAME driver
-* An Emularity loader .html modified to point to all of the above
-
-You need to use a web server instead of opening the local files directly due to
-security restrictions in modern web browsers.
-
-If the result fails to run, you can open the Web Console in your browser to see
-any error output which may have been produced (e.g. missing or incorrect ROM
-files). A "ReferenceError: foo is not defined" error most likely indicates that
-a needed source file was omitted from the SOURCES list.
diff --git a/docs/hlsl.txt b/docs/hlsl.txt
index d42f608c5c5..93fd8ca1ac4 100644
--- a/docs/hlsl.txt
+++ b/docs/hlsl.txt
@@ -8,8 +8,6 @@ yiq_enable 0/1 Enables YIQ-colorspace post-processing.
NTSC TV appearance on TV-based systems when configured
properly.
hlslpath [path] Path to the .fx files that are in use. (default: hlsl)
-hlsl_prescale_x [horizontal] HLSL pre-scale override factor for X. (0 for auto)
-hlsl_prescale_y [vertical] HLSL pre-scale override factor for Y. (0 for auto)
hlsl_write [filename] Enables HLSL AVI writing. (huge disk bandwidth suggested)
hlsl_snap_width [width] HLSL upscaled-snapshot width. (default: 2048)
hlsl_snap_height [height] HLSL upscaled-snapshot height. (default: 1536)
diff --git a/docs/luaengine.md b/docs/luaengine.md
index 223a421cc27..a17cefcdb80 100644
--- a/docs/luaengine.md
+++ b/docs/luaengine.md
@@ -26,10 +26,9 @@ currently available to LUA scripts:
* machine metadata (app version, current rom, rom details)
* machine control (starting, pausing, resetting, stopping)
* machine hooks (on frame painting and on user events)
- * machine options (hard reset required for options to take affect)
* devices introspection (device tree listing, memory and register enumeration)
* screens introspection (screens listing, screen details, frames counting)
- * screen snaps and HUD drawing (text, lines, boxes on multiple screens)
+ * screen HUD drawing (text, lines, boxes on multiple screens)
* memory read/write (8/16/32/64 bits, signed and unsigned)
* registers and states control (states enumeration, get and set)
@@ -156,35 +155,3 @@ program
41
```
-manager:options()
-manager:machine():options()
-manager:machine():ui():options()
-```
-> opts = manager:machine():options()
-> for k, entry in pairs(opts.entries) do print(string.format("%10s: %s\n%11s %s", k, entry:value(), "", entry:description())) end
-diff_directory: diff
- directory to save hard drive image differeVnce files
-joystick_contradictory: false
- enable contradictory direction digital joystick input at the same time
- scalemode: none
- Scale mode: none, hwblit, hwbest, yv12, yuy2, yv12x2, yuy2x2 (-video soft only)
- oslog: false
- output error.log data to the system debugger
-[...]
-> print(opts.entries["sleep"]:value())
-true
-> print(opts.entries["sleep"]:value("invalid"))
-Illegal boolean value for sleep: "invalid"; reverting to 1
-true
-> print(opts.entries["sleep"]:value(false))
-false
-```
-
-individual screen snapshots
-```
-> local screen = manager:machine().screens[":screen"]
-> screen:snapshot()
-saved snap/gridlee/0000.png
-> screen:snapshot('%g.png')
-saved snap/gridlee.png
-```
diff --git a/hash/c128_cart.xml b/hash/c128_cart.xml
index 953195810c2..37793234d7f 100644
--- a/hash/c128_cart.xml
+++ b/hash/c128_cart.xml
@@ -12,7 +12,7 @@ Missing dumps:
-->
<software name="c128diag">
- <description>C-128 Diagnostic (v1.1)</description>
+ <description>C128 Diagnostic (v1.1)</description>
<year>1987</year>
<publisher>Commodore</publisher>
@@ -21,13 +21,13 @@ Missing dumps:
<feature name="exrom" value="1" />
<dataarea name="roml" size="0x2000">
- <rom name="c128diag.bin" size="0x2000" crc="584f6750" sha1="b3cfd8508b887e9c7e72ed2b0c44fe63e6b44ac4" offset="0" />
+ <rom name="c128diag.bin" size="0x2000" crc="584f6750" sha1="b3cfd8508b887e9c7e72ed2b0c44fe63e6b44ac4" offset="0x0000" />
</dataarea>
</part>
</software>
<software name="c128diaga" cloneof="c128diag">
- <description>C-128 Diagnostic (v1.4)</description>
+ <description>C128 Diagnostic</description>
<year>198?</year>
<publisher>Commodore</publisher>
@@ -41,23 +41,8 @@ Missing dumps:
</part>
</software>
- <software name="c128diagb" cloneof="c128diag">
- <description>C128/C128D Diagnostic (Rev 785260)</description>
- <year>198?</year>
- <publisher>Commodore</publisher>
-
- <part name="cart" interface="c64_cart">
- <feature name="game" value="1" />
- <feature name="exrom" value="1" />
-
- <dataarea name="roml" size="0x4000">
- <rom name="c128_785260.bin" size="0x2000" crc="d4a4e162" sha1="2c861c89be4e556982435d076b012362545f03ca" offset="0" />
- </dataarea>
- </part>
- </software>
-
<software name="c128diagdcr" cloneof="c128diag">
- <description>C-128DCR Integral Diag 1.0</description>
+ <description>C128DCR Diagnostic</description>
<year>198?</year>
<publisher>Commodore</publisher>
@@ -82,23 +67,7 @@ Missing dumps:
<feature name="exrom" value="1" />
<dataarea name="roml" size="0x2000">
- <rom name="c128diag_588121.bin" size="0x2000" crc="b11107be" sha1="c7149ed420d95faa1ab2ecb4a536f5e6effd45e3" offset="0" />
- </dataarea>
- </part>
- </software>
-
- <software name="c128dg40a" cloneof="c128dg40">
- <description>C128/40 Diagnostic (Rev 789010)</description>
- <year>198?</year>
- <publisher>Commodore</publisher>
- <sharedfeat name="compatibility" value="NTSC,PAL"/>
-
- <part name="cart" interface="c64_cart">
- <feature name="game" value="1" />
- <feature name="exrom" value="1" />
-
- <dataarea name="roml" size="0x2000">
- <rom name="c128diag_789010.bin" size="0x2000" crc="3b5fcdbd" sha1="da8851745b90dfafe4e05b2bf4e8e224b553170a" offset="0" />
+ <rom name="c128diag.bin" size="0x2000" crc="b11107be" sha1="c7149ed420d95faa1ab2ecb4a536f5e6effd45e3" offset="0" />
</dataarea>
</part>
</software>
@@ -132,7 +101,7 @@ Missing dumps:
<feature name="exrom" value="1" />
<dataarea name="roml" size="0x2000">
- <rom name="mach_128_v1a.bin" size="0x2000" crc="f91ed380" sha1="6f04d73fcde8b28903075e3adcd2d7ff49d2518a" offset="0" />
+ <rom name="mach_128_v1a.bin" size="0x2000" crc="f91ed380" sha1="6f04d73fcde8b28903075e3adcd2d7ff49d2518a" offset="0x0000" />
</dataarea>
</part>
@@ -154,7 +123,7 @@ Missing dumps:
<feature name="exrom" value="1" />
<dataarea name="roml" size="0x2000">
- <rom name="mach_128_v2a.bin" size="0x2000" crc="fc60d92e" sha1="7f487134d314b4c5158954ad057e01c0da32a468" offset="0" />
+ <rom name="mach_128_v2a.bin" size="0x2000" crc="fc60d92e" sha1="7f487134d314b4c5158954ad057e01c0da32a468" offset="0x0000" />
</dataarea>
</part>
diff --git a/hash/c64_cart.xml b/hash/c64_cart.xml
index e908c22b88c..fe0fcd71bbc 100644
--- a/hash/c64_cart.xml
+++ b/hash/c64_cart.xml
@@ -4772,7 +4772,7 @@
</software>
<software name="c64diag">
- <description>C-64 Diagnostic (Rev 586220)</description>
+ <description>C-64 Diagnostic r.586220</description>
<year>19??</year>
<publisher>&lt;unknown&gt;</publisher>
<part name="cart" interface="c64_cart">
@@ -4844,7 +4844,6 @@
<description>C64 Diagnostic</description>
<year>19??</year>
<publisher>Commodore</publisher>
- <info name="serial" value="324528-02" />
<part name="cart" interface="c64_cart">
<feature name="exrom" value="0" />
<feature name="game" value="1" />
@@ -4854,19 +4853,6 @@
</part>
</software>
- <software name="c64dia41">
- <description>C-64 Diagnostic (Rev 4.1.0)</description>
- <year>19??</year>
- <publisher>Commodore</publisher>
- <part name="cart" interface="c64_cart">
- <feature name="exrom" value="0" />
- <feature name="game" value="1" />
- <dataarea name="roml" size="0x2000">
- <rom name="commodorediagrev410.bin" size="0x2000" crc="9d1a9181" sha1="5800219da86c00e583f7100e91febe528208ec46" offset="0x0000" />
- </dataarea>
- </part>
- </software>
-
<software name="calcres">
<description>Calc Result</description>
<year>1983</year>
diff --git a/hash/casloopy.xml b/hash/casloopy.xml
index 26e36c95a97..6573fddaa37 100644
--- a/hash/casloopy.xml
+++ b/hash/casloopy.xml
@@ -91,7 +91,7 @@
<year>1996</year>
<publisher>Casio</publisher>
<info name="serial" value="XK-504"/>
- <info name="alt_name" value="ルーピータウンã®ãŠã¸ã‚„ãŒã»ã—ã„!"/>
+ <info name="alt_name" value="ルーピータウンã®ãŠã¸ã‚„ãŒã»ã—ã„!"/>
<part name="cart" interface="loopy_cart">
<dataarea name="rom" size="0x300000">
<rom name="CHIP1.IC104" size="0x200000" crc="bae71d45" sha1="79628715ccedd9bc3fd72d21fa9ea6513b88cf51" offset="0x000000" />
diff --git a/hash/electron_cass.xml b/hash/electron_cass.xml
deleted file mode 100644
index 8dce4799365..00000000000
--- a/hash/electron_cass.xml
+++ /dev/null
@@ -1,10418 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
-
-<!-- Electron Tapes -->
-
-<!-- I believe all the Cassette images here are original, so some require the manuals for additional copy protection -->
-
-<!-- Loading Instructions:
-
- To load the software use CHAIN"" or *RUN.
-
- To start/stop the tape you must use the MAME menus, so you'll have to turn full keyboard mode off with Scroll Lock, then navigate the menus, turning Scroll Lock back on when you're finished.
--->
-
-<!-- This list was compiled from the archive at http://www.stairwaytohell.com/. Additional titles will be added as they are made available at http://stardot.org.uk/ forum. -->
-
-<softwarelist name="electron_cass" description="Electron cassettes">
-
- <!-- Games -->
-
- <software name="3dbombal">
- <description>3D Bomb Alley</description>
- <year>198?</year>
- <publisher>Software Invasion</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7383">
- <rom name="3dbomballey_e.uef" size="7383" crc="029daa46" sha1="5ff4de0edd47c72aa93040b484093441cfb3e0d8" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="3ddotty">
- <description>3D Dotty</description>
- <year>1987</year>
- <publisher>Blue Ribbon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8436">
- <rom name="3ddotty_e.uef" size="8436" crc="df321d40" sha1="816afae80550043dfe478c388ad31863438a941f" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="3ddottypias" cloneof="3ddotty">
- <description>3D Dotty (Play It Again Sam 10)</description>
- <year>1989</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="13394">
- <rom name="3ddotty-piasrr_e.uef" size="13394" crc="3b93b49b" sha1="c9b68482852432d8d865902c1a54c10955b1512f" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="3dmaze">
- <description>3D Maze</description>
- <year>1983</year>
- <publisher>I.J.K.</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="3052">
- <rom name="3dmaze-ijk_e.uef" size="3052" crc="6cb1d6b3" sha1="77de4eff1b62db16d226518746488aba83a090eb" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="3dpool">
- <description>3D Pool</description>
- <year>1989</year>
- <publisher>Firebird</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="21062">
- <rom name="3dpool_e.uef" size="21062" crc="c5d2f6af" sha1="c634ece8747af0caf7b38a172377ae17cd553fd3" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="3dtankzo">
- <description>3D Tank Zone</description>
- <year>1983</year>
- <publisher>Dynabyte</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9664">
- <rom name="3dtankzone_e.uef" size="9664" crc="ca219221" sha1="bb27e387139f613e2563de3d8603b36e252cf80e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="fiveston">
- <description>Five Stones of Anadon</description>
- <year>1983</year>
- <publisher>Softek</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="15460">
- <rom name="fivestonesofanadon_be.uef" size="15460" crc="eb54926a" sha1="4472b402898e587f47cb1ab8cc651380186b5217" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="747flsim">
- <description>747 Flight Simulator</description>
- <year>1984</year>
- <publisher>DACC</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="5752">
- <rom name="747flightsimulator_e.uef" size="5752" crc="aa4c4d8c" sha1="339bdc221b08b6d9767d423d298bd605deeb05fc" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="747">
- <description>747</description>
- <year>1984</year>
- <publisher>Doctor Soft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8498">
- <rom name="747_e.uef" size="8498" crc="34181c66" sha1="cfa5ebd1b7d0cc668b8908deea46e0424e8e1b7c" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="qofsport">
- <description>A Question of Sport</description>
- <year>198?</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="93815">
- <rom name="aquestionofsport_e.uef" size="93815" crc="4cc02427" sha1="9fdaeb0d8c691e2bf266bf9c8485b233a2dec82c" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="avousfra">
- <description>A Vous La France!</description>
- <year>198?</year>
- <publisher>BBC Soft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="186960">
- <rom name="avouslafrance_be.uef" size="186960" crc="be118e9b" sha1="26a0f5bb2dc892c41216f9360507936dc23e4d7c" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="abyss">
- <description>Abyss</description>
- <year>1984</year>
- <publisher>CCS</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9031">
- <rom name="abyss_be.uef" size="9031" crc="2288e891" sha1="5819e83b7166520b127800d5c8b7d250c49d2406" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="acornu42">
- <description>Acorn User Issue 42 (Jan 1986)</description>
- <year>1986</year>
- <publisher>Acorn User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="21077">
- <rom name="au42-jan86_e.uef" size="21077" crc="2b40e0a5" sha1="740dbce8c6fcd256f32ab26993ab916d8ec6d6ce" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="acornu48">
- <description>Acorn User Issue 48 (Jul 1986)</description>
- <year>1986</year>
- <publisher>Acorn User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="14516">
- <rom name="au48-jul86_e.uef" size="14516" crc="e370d4ca" sha1="927b92ed2ff23143c0c5096de4d8c9c7627595a1" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="acornu50">
- <description>Acorn User Issue 50 (Sep 1986)</description>
- <year>1986</year>
- <publisher>Acorn User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="31104">
- <rom name="au50-sep86_e.uef" size="31104" crc="c8660724" sha1="f52ac3c80f93192bd20945aea37ab2c42e290440" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="acornu52">
- <description>Acorn User Issue 52 (Nov 1986)</description>
- <year>1986</year>
- <publisher>Acorn User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="33391">
- <rom name="au52-nov86_e.uef" size="33391" crc="75a0f90e" sha1="20da64244415eae26d33c9997fac0dc4c9d14d44" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="acornu53">
- <description>Acorn User Issue 53 (Dec 1986)</description>
- <year>1986</year>
- <publisher>Acorn User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="26967">
- <rom name="au53-dec86_e.uef" size="26967" crc="9438b52d" sha1="b6ec5c3cfa481c25b81e6715b76f533934b81c3a" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="acornu54">
- <description>Acorn User Issue 54 (Jan 1987)</description>
- <year>1987</year>
- <publisher>Acorn User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="26491">
- <rom name="au54-jan87_e.uef" size="26491" crc="0b32218c" sha1="d38b5bc0bddf0b738f1612406ae3e84554ff7862" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="acornu55">
- <description>Acorn User Issue 55 (Feb 1987)</description>
- <year>1987</year>
- <publisher>Acorn User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="30306">
- <rom name="au55-feb87_e.uef" size="30306" crc="0f289642" sha1="5b22dd4cfe1e9c9f869bdd34ea4c94cea8455451" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="acornu56">
- <description>Acorn User Issue 56 (Mar 1987)</description>
- <year>1987</year>
- <publisher>Acorn User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="35774">
- <rom name="au56-mar87_e.uef" size="35774" crc="d3b63e4f" sha1="f750e41080c030093095795059e4fcf99cf61ecc" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="acornu57">
- <description>Acorn User Issue 57 (Apr 1987)</description>
- <year>1987</year>
- <publisher>Acorn User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="36379">
- <rom name="au57-apr87_e.uef" size="36379" crc="16403bd8" sha1="ec706ace1d84255d54b8e6d0927f4a4789b4253e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="acornu58">
- <description>Acorn User Issue 58 (May 1987)</description>
- <year>1987</year>
- <publisher>Acorn User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="14073">
- <rom name="au58-may87_e.uef" size="14073" crc="3486c99c" sha1="700ab48ec62c4a66fad93358b0c781125be643a2" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="acornu59">
- <description>Acorn User Issue 59 (Jun 1987)</description>
- <year>1987</year>
- <publisher>Acorn User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="14962">
- <rom name="au59-jun87_e.uef" size="14962" crc="62f819ea" sha1="81b117ac6474cf924c1e92d3c6b1179c1abf17ee" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="acornu60">
- <description>Acorn User Issue 60 (Jul 1987)</description>
- <year>1987</year>
- <publisher>Acorn User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="12631">
- <rom name="au60-jul87_e.uef" size="12631" crc="ba301c10" sha1="68d8ffe371e3d2a397d355da83a50c8a45c7d5f1" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="adv4pack">
- <description>Adventure 4 Pack</description>
- <year>1987</year>
- <publisher>Potter</publisher>
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Heaxgram Of Trutania Valley"/>
- <dataarea name="cass" size="10702">
- <rom name="hexagramoftrutaniavalley_be.uef" size="10702" crc="7ca1379e" sha1="91a21f1b7aa7e668c946dd1c1bb2700ced749ba9" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Inner Space"/>
- <dataarea name="cass" size="10752">
- <rom name="innerspace_be.uef" size="10752" crc="6aff0cbb" sha1="27db31f925b5a662bdc01a641b0fc40832abbc9d" offset="0"/>
- </dataarea>
- </part>
- <part name="cass3" interface="electron_cass">
- <feature name="part_id" value="Philosopher's Stone"/>
- <dataarea name="cass" size="10578">
- <rom name="philosophersstone_be.uef" size="10578" crc="efb8a0a2" sha1="2912335a2c79571b3264499f7ace3d46d488f4d8" offset="0"/>
- </dataarea>
- </part>
- <part name="cass4" interface="electron_cass">
- <feature name="part_id" value="Stranded On Iloofrak"/>
- <dataarea name="cass" size="12404">
- <rom name="strandedoniloofrax_be.uef" size="12404" crc="a46bdf11" sha1="dc86bf0362c3e8125308d4ac174a549ae965351a" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="advanth">
- <description>Adventure Anthology</description>
- <year>198?</year>
- <publisher>Database</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="24401">
- <rom name="adventureanthology_e.uef" size="24401" crc="0a78200e" sha1="ec1b67e24df40b9d1c954e35d0d88c0de1e9072f" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="advland">
- <description>Adventureland</description>
- <year>198?</year>
- <publisher>Adventure International</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10808">
- <rom name="adv1-adventureland_e.uef" size="10808" crc="ac7d7728" sha1="2a918a18b44e40d3068bb6bea6f63cb335dab64e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="adventur">
- <description>Adventure</description>
- <year>1984</year>
- <publisher>Micro Power</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8515">
- <rom name="adventure-Micro Power_e.uef" size="8515" crc="8eabc302" sha1="3073bb57401655b711c679f93ab10fcac037f3f4" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="airline">
- <description>Airline</description>
- <year>1983</year>
- <publisher>CCS</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10205">
- <rom name="airline_e.uef" size="10205" crc="7c34ac2c" sha1="83fa877553d44caa2cdee801c5228e322275c07c" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="alienbre">
- <description>Alien Break In</description>
- <year>1983</year>
- <publisher>Romik</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8719">
- <rom name="alienbreakin_e.uef" size="8719" crc="c1b4fc6f" sha1="8cfbc512cd7e390a81648fc2ed30afd963e8cf16" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="aliendro">
- <description>Alien Dropout</description>
- <year>1984</year>
- <publisher>Superior Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6159">
- <rom name="aliendropout_e.uef" size="6159" crc="ee1a010f" sha1="66b630a737a1b781dac34f7addf8779eae2d9a7d" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="alphatro">
- <description>Alphatron</description>
- <year>1984</year>
- <publisher>Tynesoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8006">
- <rom name="alphatron_e.uef" size="8006" crc="cd292d4e" sha1="e33904775b1fc42a481c06e5e6dca6b93c1e21b0" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="amsuds">
- <description>American Suds</description>
- <year>1986</year>
- <publisher>Riverdale</publisher>
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Part 1"/>
- <dataarea name="cass" size="10645">
- <rom name="americansuds-pt1_be.uef" size="10645" crc="bbba8a02" sha1="05bee4976191e3f67ff3c1d67d57261b508dcc94" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Part 2"/>
- <dataarea name="cass" size="10434">
- <rom name="americansuds-pt2_be.uef" size="10434" crc="4b35ba6a" sha1="06586a7ad13735a85a6259074e5917bb607e03f7" offset="0"/>
- </dataarea>
- </part>
- <part name="cass3" interface="electron_cass">
- <feature name="part_id" value="Part 3"/>
- <dataarea name="cass" size="10892">
- <rom name="americansuds-pt3_be.uef" size="10892" crc="5e684124" sha1="24b12118544e9e01ca63380b4b9ef4c2677c965b" offset="0"/>
- </dataarea>
- </part>
- <part name="cass4" interface="electron_cass">
- <feature name="part_id" value="Part 4"/>
- <dataarea name="cass" size="10935">
- <rom name="americansuds-pt4_be.uef" size="10935" crc="8f5d1deb" sha1="681282f14eac3014c656c666f2d0eb1e22efa93e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="anarchyz">
- <description>Anarchy Zone</description>
- <year>1988</year>
- <publisher>Atlantis</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="18846">
- <rom name="anarchyzone_be.uef" size="18846" crc="cc9200b9" sha1="2820ad843d1a20e41c4a4295bd18e50de6309a3c" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="angles">
- <description>Angles</description>
- <year>198?</year>
- <publisher>Garland Computing</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6353">
- <rom name="t-angl.uef" size="6353" crc="c4f45fce" sha1="4bd270479b843d0c3706b449e6ddac260f720f24" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="annabelg">
- <description>Annabel Gray</description>
- <year>19??</year>
- <publisher>Lee</publisher>
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Part 1"/>
- <dataarea name="cass" size="12533">
- <rom name="annabelgray-pt1_be.uef" size="12533" crc="5e466131" sha1="8ceb3a881790854393b4b4f6bf0792b6c84db806" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Part 2"/>
- <dataarea name="cass" size="12439">
- <rom name="annabelgray-pt2_be.uef" size="12439" crc="1fa621e2" sha1="15efd0bb58e6b9ccb63ede49bbf8b8e9e6004336" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="abgenjnr">
- <description>Answer Back - General Knowledge Junior Quiz</description>
- <year>1984</year>
- <publisher>Kosmos</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="44893">
- <rom name="answerbackgeneralknowledgejuniorquiz_be.uef" size="44893" crc="4c6402be" sha1="8312ef689067999f3a3fecad4dc49a5462a55024" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="abgensnr">
- <description>Answer Back - General Knowledge Senior Quiz</description>
- <year>1984</year>
- <publisher>Kosmos</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="50459">
- <rom name="answerbackgeneralknowledgeseniorquiz_be.uef" size="50459" crc="10af9fb4" sha1="1eb71cd63b8046831dcbae01cbfffa105620c99b" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="absports">
- <description>Answer Back - Sports Quiz</description>
- <year>1984</year>
- <publisher>Kosmos</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="49263">
- <rom name="answerbacksportsquiz_be.uef" size="49263" crc="6880855b" sha1="636114d1ac2935cfef8046e2a462db5132fe8636" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="argcreat">
- <description>Arcade Game Creator</description>
- <year>198?</year>
- <publisher>Database</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="12465">
- <rom name="arcadegamecreator_e.uef" size="12465" crc="40495057" sha1="afebb3dd31041bc1bd9dfb06160f7ab5c04524b2" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="arsoccer">
- <description>Arcade Soccer</description>
- <year>1989</year>
- <publisher>4th Dimension</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="21822">
- <rom name="arcadesoccer_e.uef" size="21822" crc="d11a213b" sha1="6436c12493d1b65875ece102f04042f8607ef516" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="arcadiang" cloneof="arcadian">
- <description>Arcadians (Ger)</description>
- <year>1984</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="GLG14" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="14907">
- <rom name="arcadians-german_e.uef" size="14907" crc="4632a13f" sha1="f8c04362a01bb126ed022d5d5131747d4952bca8" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="arcadiansrr" cloneof="arcadian">
- <description>Arcadians (The Acornsoft Hits Vol.2)</description>
- <year>1987</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="14546">
- <rom name="arcadians-srr_e.uef" size="14546" crc="83d9dd81" sha1="b968b539fdb05789f3ed39f5e60b222f831d55e6" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="arcadian">
- <description>Arcadians</description>
- <year>1984</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="SLG14" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="14491">
- <rom name="arcadians_e.uef" size="14491" crc="cfda79c2" sha1="250bdfd3ed9855c9f30e3b41f84fe1928dc77e6a" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="arena3k">
- <description>Arena 3000</description>
- <year>198?</year>
- <publisher>Microdeal</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10480">
- <rom name="arena3000_e.uef" size="10480" crc="7205ac5e" sha1="58efe5b93f94848f4af4307b928365d766c694ee" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="reptonwo">
- <description>Repton Around the World in 40 Screens</description>
- <year>1987</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="56169">
- <rom name="reptonaroundtheworld_e.uef" size="56169" crc="c9014cac" sha1="08749ac1a58ef0827908e16ca3c0c92badef9be4" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="arrowd1">
- <description>Arrow of Death Part 1</description>
- <year>198?</year>
- <publisher>Adventure International</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11347">
- <rom name="mystadv3-arrowofdeath_e.uef" size="11347" crc="bd340c5f" sha1="dbeec1c55a2a94f9804c0a5db2cc61d13202f3ee" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="arrowd2">
- <description>Arrow of Death Part 2</description>
- <year>198?</year>
- <publisher>Adventure International</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8858">
- <rom name="mystadv4-arrowofdeathpart2_e.uef" size="8858" crc="e49aa474" sha1="a086cc89431069edcf14d46bccf997b9794164d3" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="aslangc">
- <description>Assembly Language Course</description>
- <year>198?</year>
- <publisher>Honeyfold</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6911">
- <rom name="beginnersassembly_e.uef" size="6911" crc="b0c9df8a" sha1="7dec13357d2abe16e375dc92f6b3030f9d1d19cf" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="astplumb">
- <description>Astro Plumber</description>
- <year>1985</year>
- <publisher>Blue Ribbon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7829">
- <rom name="astroplumber_e.uef" size="7829" crc="56492221" sha1="dd4d8617a55b5c5fc7e2c02c20b339db566e6b08" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="atomsmas">
- <description>Atom Smasher</description>
- <year>1983</year>
- <publisher>Romik</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="4995">
- <rom name="atomsmasher_e.uef" size="4995" crc="5605b46f" sha1="f84edf6818c580f0a3697b1f3742410e10f380d7" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="aufwiede">
- <description>Auf Wiedersehen Pet</description>
- <year>1984</year>
- <publisher>Tynesoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8547">
- <rom name="aufwiedersehenpet_be.uef" size="8547" crc="d96e694a" sha1="f8a2488eb33f492bdfc6c39e15d1aeac1e12144d" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="ballistx">
- <description>Ballistix</description>
- <year>1989</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="19641">
- <rom name="ballistix_e.uef" size="19641" crc="9f619b68" sha1="f5070049f88acc6f57ba8e9c5e11558540cdaaef" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="balloonb">
- <description>Balloon Buster</description>
- <year>1989</year>
- <publisher>Blue Ribbon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9995">
- <rom name="balloonbuster_e.uef" size="9995" crc="4418fcc8" sha1="5e8ffe72097401fab3b76438ea7c56a94e08ff06" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="bandits3">
- <description>Bandits at 3 O'clock</description>
- <year>1984</year>
- <publisher>Micro Power</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6436">
- <rom name="banditsat3oclock_e.uef" size="6436" crc="e4032ec6" sha1="7cb0cd1331bdae0aa20f332d6352acd55396bfab" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="barbill">
- <description>Bar Billiards</description>
- <year>1987</year>
- <publisher>Blue Ribbon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7914">
- <rom name="barbilliards_e.uef" size="7914" crc="1f4a813a" sha1="34d9172c19546cb9672638910a59dfb46c3e3c9c" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="barbar">
- <description>Barbarian</description>
- <year>1988</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="50735">
- <rom name="barbarian_e.uef" size="50735" crc="79d9a8af" sha1="a51fdbc8e3d0663a8a7bb1e595c1dfd0c9496f8c" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="barbar2">
- <description>Barbarian 2</description>
- <year>1989</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="41308">
- <rom name="barbarian2_e.uef" size="41308" crc="71488a15" sha1="cadface993e7a31bb5a253e36ee93d75eaf33144" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="baron">
- <description>Baron</description>
- <year>1989</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="22584">
- <rom name="baron_e.uef" size="22584" crc="865de835" sha1="ceee28097bb3682fe0799a91d20570e2ec3c3299" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="batl1917">
- <description>Battle 1917</description>
- <year>1983</year>
- <publisher>CCS</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="3854">
- <rom name="battle1917_e.uef" size="3854" crc="05c5a30e" sha1="fa47ff472d6ae71bdd269e7a93735bef26abc99d" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="battlefi">
- <description>Battlefields</description>
- <year>1985</year>
- <publisher>BBC Soft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="17693">
- <rom name="battlefields_be.uef" size="17693" crc="72254a84" sha1="521cea8eec76908f66ec79e163223d6a79a7d7fc" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="bzone2k">
- <description>Battlezone 2000</description>
- <year>1983</year>
- <publisher>Lothlorien</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="5499">
- <rom name="battlezone2000_be.uef" size="5499" crc="da72a0f3" sha1="aed27242a6fc841b22d36274aa8c4e402c41fb33" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="bzonesix">
- <description>Battlezone Six</description>
- <year>198?</year>
- <publisher>Kansas</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8684">
- <rom name="battlezonesix_e.uef" size="8684" crc="8609cc30" sha1="78153efd8f0b378ce0882876f0c5e088c587d542" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="treeknowg" cloneof="treeknow">
- <description>Baum der Weisheit (Ger)</description>
- <year>1983</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="GLE04" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7682">
- <rom name="treeofknowledge-german_e.uef" size="7682" crc="64156d77" sha1="e87eac5342ceb84f7ed254a2132418fedc1e21aa" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="mmindqm">
- <description>BBC Mastermind Quizmaster</description>
- <year>1984</year>
- <publisher>Mirrorsoft-Ivan Berg</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="5436">
- <rom name="mastermindquizmaster_be.uef" size="5436" crc="1cd42c57" sha1="f2c1171a603128cf7f9abc5e32dc9afe41c8e97e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="beacheada" cloneof="beachead">
- <description>Beach Head (Americana)</description>
- <year>198?</year>
- <publisher>Americana</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="17628">
- <rom name="beachhead_e.uef" size="17628" crc="9fb53671" sha1="4874c0a41920183e64e1bc2b6318328cc9f29631" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="beachead">
- <description>Beach Head</description>
- <year>1984</year>
- <publisher>U.S. Gold</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="17628">
- <rom name="beachhead_e.uef" size="17628" crc="9fb53671" sha1="4874c0a41920183e64e1bc2b6318328cc9f29631" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="beebtrek">
- <description>Beebtrek</description>
- <year>1984</year>
- <publisher>Software For All</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7235">
- <rom name="beebtrek_be.uef" size="7235" crc="0d25509e" sha1="512adbb3cb8d1846f06fe9b4474e35ef711bd752" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="bertboot">
- <description>Bert Boot</description>
- <year>1984</year>
- <publisher>Highlight Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7172">
- <rom name="bertboot_e.uef" size="7172" crc="57acfa15" sha1="29d1b9d0678edadc1d49173721a759b7e1f75c80" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="bestau">
- <description>Best of Acorn User</description>
- <year>198?</year>
- <publisher>Acorn User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="25889">
- <rom name="bestofacornuser_e.uef" size="25889" crc="7e7eef08" sha1="36ddec4e9aaf4d2c14fd7b5ff9240ff39afa131a" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="bestpcw">
- <description>Best of PCW Software</description>
- <year>198?</year>
- <publisher>PCW</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="140340">
- <rom name="pcwbestofsoftware_e.uef" size="140340" crc="79f4e934" sha1="250b7b91a1910f21cd0b1c302dfac979d9d0db7a" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="bestlang">
- <description>The Best Four: Language</description>
- <year>1985</year>
- <publisher>ASK</publisher>
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Facemaker"/>
- <dataarea name="cass" size="12006">
- <rom name="bfl-facemaker_be.uef" size="12006" crc="4543c740" sha1="0692279dbbe551a28e11f005c4a213f5bb8fa67c" offset="0" />
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Hide and Seek"/>
- <dataarea name="cass" size="12919">
- <rom name="bfl-hideandseek_be.uef" size="12919" crc="b0de220e" sha1="f424e48ee6632f4fae7f5ef817925e1d73523052" offset="0" />
- </dataarea>
- </part>
- <part name="cass3" interface="electron_cass">
- <feature name="part_id" value="Podd"/>
- <dataarea name="cass" size="11435">
- <rom name="bfl-podd_be.uef" size="11435" crc="d6e3f02e" sha1="2cab0c8424189febb288df2ffbc2f2c37e9c09e8" offset="0" />
- </dataarea>
- </part>
- <part name="cass4" interface="electron_cass">
- <feature name="part_id" value="Words Words Words"/>
- <dataarea name="cass" size="13013">
- <rom name="bfl-wordswordswords_be.uef" size="13013" crc="70a0f49e" sha1="fc687cf3e45514abaebec713f168c5fd68afb72c" offset="0" />
- </dataarea>
- </part>
- </software>
-
- <software name="biology">
- <description>Biology</description>
- <year>1983</year>
- <publisher>Acornsoft/Ivan Berg</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="51155">
- <rom name="biology-ivanberg_be.uef" size="51155" crc="57e129ee" sha1="ee7371e89a264a0f9af5042b65b4db59fc5d2145" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="birdiecd">
- <description>Birdie Barrage</description>
- <year>1984</year>
- <publisher>CDS</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7232">
- <rom name="birdiebarrage_e.uef" size="7232" crc="7b8925e5" sha1="7c06617c1ae63f80b538635346024c6dacbb65d4" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="birdspre">
- <description>Birds of Prey</description>
- <year>1983</year>
- <publisher>Romik</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="4781">
- <rom name="birdsofprey_e.uef" size="4781" crc="bb351757" sha1="0a7e05484605bb7a614614ba3da5a2362c4e170e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="birdstri">
- <description>Birdstrike</description>
- <year>198?</year>
- <publisher>Firebird</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6385">
- <rom name="t-bird.uef" size="6385" crc="8035ad27" sha1="5045567cab5e62231c93dd2c3365c9ad3928027b" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="blagger">
- <description>Blagger</description>
- <year>198?</year>
- <publisher>Alligata</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6969">
- <rom name="blagger_e.uef" size="6969" crc="a3b4c644" sha1="673c85fc90d7d3dc647cc10fa7ca30d4a4282c36" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="blaggerpias" cloneof="blagger">
- <description>Blagger (Play It Again Sam 12)</description>
- <year>1990</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8117">
- <rom name="blagger-piasrr_e.uef" size="8117" crc="03a2522f" sha1="f2e6786e1fafff6ffbe0c4a0dd9aa07207d5f58b" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="blitzkri">
- <description>Blitzkrieg</description>
- <year>1984</year>
- <publisher>Software Invasion</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11295">
- <rom name="blitzkrieg_e.uef" size="11295" crc="c0ad9e3a" sha1="ad1a648291ed70842c1866b6c2132ba5870c620b" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="bbgoldru">
- <description>Blockbusters Gold Run</description>
- <year>1985</year>
- <publisher>Macsen</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="25425">
- <rom name="blockbustersgoldrun_e.uef" size="25425" crc="b7d5c561" sha1="fb4b6d955acd4f9b6aa510acbb7f1a0378b6f4f8" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="bbusters">
- <description>Blockbusters</description>
- <year>1985</year>
- <publisher>Macsen</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="28292">
- <rom name="blockbusters_e.uef" size="28292" crc="19d3fcae" sha1="4c2d992dfeb30cb4087f5c449d68bc13aa82e886" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="bloodmut">
- <description>Blood of the Mutineers</description>
- <year>1988</year>
- <publisher>Robico</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="18393">
- <rom name="bloodofthemutineers_e.uef" size="18393" crc="f0a0432d" sha1="565668bb90a13eea67bb64d186cf1e110ffe292c" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="bluedrag">
- <description>Blue Dragon</description>
- <year>1984</year>
- <publisher>MP Software</publisher>
- <info name="usage" value="Load with *RUN" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="20769">
- <rom name="bluedragon_run_be.uef" size="20769" crc="3d66b1d7" sha1="cfe35122482ceebaa294ecc071f694c07ba1e523" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="bobbycha">
- <description>Bobby Charlton Soccer</description>
- <year>1985</year>
- <publisher>DACC</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="13019">
- <rom name="bobbycharltonsoccer_e.uef" size="13019" crc="7a31bf08" sha1="c810fe4a68f576024674494c9038418bb075bb58" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="boffin">
- <description>Boffin</description>
- <year>1985</year>
- <publisher>Addictive</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="16537">
- <rom name="boffin2-modified_be.uef" size="16537" crc="ee48b1fe" sha1="29e33cc6bbf31b1b9443918aa34cf3c689c00c2d" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="bombbaro">
- <description>Bomber Baron</description>
- <year>198?</year>
- <publisher>Optyx</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="4218">
- <rom name="bomberbaron_e.uef" size="4218" crc="6ea5df24" sha1="0e6831ccb38491df0d4beb669cd07cf5c1908697" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="bonecrun">
- <description>Bone Cruncher</description>
- <year>1987</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="23578">
- <rom name="bonecruncher_e.uef" size="23578" crc="5db04665" sha1="43e10472909f0aaccb6603ea9939532cb0cf2e66" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="bdash">
- <description>Boulder Dash</description>
- <year>1988</year>
- <publisher>Tynesoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="25449">
- <rom name="boulderdash_e.uef" size="25449" crc="be7128a5" sha1="4d683d1f7aaf547cb754c90098f10a3c6f6b1102" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="bbombs">
- <description>Bouncing Bombs</description>
- <year>198?</year>
- <publisher>Tynesoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6100">
- <rom name="bouncingbombs_e.uef" size="6100" crc="95f1d532" sha1="19c7a6a071e49b0729499d554688b7fe7729093a" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="boxer">
- <description>Boxer</description>
- <year>1984</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="SLG31" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9849">
- <rom name="boxer_e.uef" size="9849" crc="2d28715d" sha1="ae57a0b43a28f0dc288f2fa5a3f9151827424565" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="bozobrav">
- <description>Bozo the Brave</description>
- <year>1985</year>
- <publisher>Tynesoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="5010">
- <rom name="bozothebrave_e.uef" size="5010" crc="c661df8c" sha1="be5461dd2e5d3ec6e4d3c7c95a11ba3325ba670e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="braz">
- <description>Braz</description>
- <year>1987</year>
- <publisher>Livewire</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9790">
- <rom name="braz_e.uef" size="9790" crc="07302d17" sha1="ce64e8ddf6c4b9d4809f58a2d7c86babe8831dd1" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="breakthr">
- <description>Breakthrough</description>
- <year>1990</year>
- <publisher>Audiogenic</publisher>
- <info name="usage" value="Load with *RUN" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="20169">
- <rom name="breakthrough_run_e.uef" size="20169" crc="347ae5a5" sha1="5def500c9f1ddabf8b12b0e1843be05386958ff4" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="brianclo">
- <description>Brian Cloughs Football Fortunes</description>
- <year>1987</year>
- <publisher>CDS</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="15364">
- <rom name="briancloughsfootballfortunes_be.uef" size="15364" crc="dcb909b0" sha1="6a7c00520ec5dd83e0021a5d171782690c4227e2" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="brianjac">
- <description>Brian Jacks Superstar Challenge</description>
- <year>1985</year>
- <publisher>Martech</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="13095">
- <rom name="brianjackssuperstarchallenge_e.uef" size="13095" crc="e1bfbfa9" sha1="fd30a4eb212ea404e01e1452004933670fc75f43" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="bridgema">
- <description>Bridgemaster</description>
- <year>19??</year>
- <publisher>J Keyne</publisher>
- <part name="cass1" interface="electron_cass">
- <dataarea name="cass" size="5041">
- <rom name="bridgemaster-tapea_be.uef" size="5041" crc="ba94bafc" sha1="752800f97f445afa16dcca40c488113892c4050c" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <dataarea name="cass" size="5805">
- <rom name="bridgemaster-tapeb_be.uef" size="5805" crc="6512bfc3" sha1="2005318732bb1014d5137bedde9c6203c64f360c" offset="0"/>
- </dataarea>
- </part>
- <part name="cass3" interface="electron_cass">
- <dataarea name="cass" size="5690">
- <rom name="bridgemaster-tapec_be.uef" size="5690" crc="ef6ce2ba" sha1="c2ddae81ee7951da1808eda070cd5633ad2991a6" offset="0"/>
- </dataarea>
- </part>
- <part name="cass4" interface="electron_cass">
- <dataarea name="cass" size="5744">
- <rom name="bridgemaster-taped_be.uef" size="5744" crc="004a5565" sha1="2d8f8d4f03e3d22c483ac1f1b5a9912c9b5984c7" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="buckbanz">
- <description>Buckaroo Banzai</description>
- <year>198?</year>
- <publisher>Adventure International</publisher>
- <info name="usage" value="Load with *RUN" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10067">
- <rom name="adv15-buckaroobanzai-scoops_run_e.uef" size="10067" crc="6e4d3458" sha1="0ac766e89ae2550ac42245b54782fff4b29f7f01" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="rodeogam">
- <description>Buffalo Bills Rodeo Games</description>
- <year>1989</year>
- <publisher>Tynesoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="98630">
- <rom name="buffalobillsrodeogames_e.uef" size="98630" crc="3887f88f" sha1="dfe060875a3954c65240682cb920c8ea1262ef53" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="bugblast">
- <description>Bug Blaster</description>
- <year>1984</year>
- <publisher>Alligata</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7910">
- <rom name="bugblaster_e.uef" size="7910" crc="e8303f52" sha1="3bb2403ec12a71960616eb02a95a67b3576820ff" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="bugeyesa" cloneof="bugeyes">
- <description>Bug Eyes (Audiogenic)</description>
- <year>198?</year>
- <publisher>Audiogenic</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9837">
- <rom name="spaceagentzeldameetsthebugeyes_e.uef" size="9837" crc="3d5cdd25" sha1="892e275bff5c8d94a0ef41b4f7e1f6c7d0dc468f" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="bugeyes">
- <description>Bug Eyes</description>
- <year>1985</year>
- <publisher>Icon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9837">
- <rom name="bugeyes_e.uef" size="9837" crc="3d5cdd25" sha1="892e275bff5c8d94a0ef41b4f7e1f6c7d0dc468f" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="bugblastpias" cloneof="bugblast">
- <description>Bug Blaster (Play It Again Sam 5)</description>
- <year>1987</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="13622">
- <rom name="bugblaster-piasrr_e.uef" size="13622" crc="b9a65e81" sha1="1b60ec24d61afa9b13766b1e991b66687bdab7e6" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="bugs">
- <description>Bugs</description>
- <year>1984</year>
- <publisher>Virgin Games</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="4276">
- <rom name="bugs_e.uef" size="4276" crc="baccb319" sha1="65db34438d85422e2dccd3c1ad47ec1c1df21205" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="bullseye">
- <description>Bullseye</description>
- <year>1984</year>
- <publisher>Macsen</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="22053">
- <rom name="bullseye_e.uef" size="22053" crc="e5cf04e5" sha1="8f601c6b9f5baff7d8dc7d438962846928f49621" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="bumblbee">
- <description>Bumble Bee</description>
- <year>1984</year>
- <publisher>Micro Power</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9285">
- <rom name="bumblebee_e.uef" size="9285" crc="fc97c541" sha1="a5e4a20152e6d54a5abb64dc2087a538756c1a4a" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="bunfun">
- <description>Bun Fun</description>
- <year>1984</year>
- <publisher>Squirrel Soft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="4513">
- <rom name="bunfun_e.uef" size="4513" crc="faba33cc" sha1="c77ed41ded904cf66c0ecc023a8cae80c2ecde5a" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="busgames">
- <description>Business Games</description>
- <year>1984</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="SLE03" />
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Stokmark"/>
- <dataarea name="cass" size="5903">
- <rom name="bg-stokmark_e.uef" size="5903" crc="934ab4f6" sha1="587b929dfee2fe089449ccc1fc5cfd75a9d04fd6" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Telemark"/>
- <dataarea name="cass" size="7848">
- <rom name="bg-telemark_e.uef" size="7848" crc="232cf821" sha1="9805a0f2abda28e2319841d530d2cc721ecabfa5" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="camelot">
- <description>Camelot</description>
- <year>1989</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="17573">
- <rom name="camelot_e.uef" size="17573" crc="a93d9465" sha1="fdd354ba34d1d920f37df2105c8795c2ea434b51" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="cascad50">
- <description>Cascade 50</description>
- <year>1984</year>
- <publisher>Cascade</publisher>
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Side 1"/>
- <dataarea name="cass" size="44865">
- <rom name="cassette50-side1_e.hq.uef" size="44865" crc="8aadebe9" sha1="822d471764de0e85a0df08893cec99ee65543500" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Side 2"/>
- <dataarea name="cass" size="40150">
- <rom name="cassette50-side2_e.hq.uef" size="40150" crc="1de6bdb8" sha1="7efefda3afa8f6c04aa3a86d27b3195ede7fb00d" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="castlass">
- <description>Castle Assault</description>
- <year>1985</year>
- <publisher>Blue Ribbon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7407">
- <rom name="castleassault_e.uef" size="7407" crc="a94b7309" sha1="8ed698f5e668fe345f04d5b24a0029377f94bf1a" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="castfran">
- <description>Castle Frankenstein</description>
- <year>1984</year>
- <publisher>Epic</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="15627">
- <rom name="castlefrankenstein_e.uef" size="15627" crc="abba8793" sha1="414c28f247e99cf9a979ee1757bca3815c454d4f" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="cofriddl">
- <description>Castle of Riddles</description>
- <year>1984</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="SLG17" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="16066">
- <rom name="castleofriddles_e.uef" size="16066" crc="62c43ded" sha1="b9ee76f443c2419e0cce65eb60b7cad34cffc52d" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="cskullord">
- <description>Castle of the Skull Lord</description>
- <year>1984</year>
- <publisher>Samurai</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8770">
- <rom name="castleofskulllord-bugged_e.uef" size="8770" crc="4ee5f158" sha1="a6c4fa607121a434e4e26485fb55b61b7937fcdd" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="castlclo">
- <description>Castles and Clowns</description>
- <year>198?</year>
- <publisher>Macmillian</publisher>
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Clown"/>
- <dataarea name="cass" size="8622">
- <rom name="cac-clown_be.uef" size="8622" crc="7586ea21" sha1="e0e58bfefb5417cf42ea868bff9b5a69098bdeca" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="King of the Castle"/>
- <dataarea name="cass" size="9059">
- <rom name="cac-kingofthecastle_be.uef" size="9059" crc="a3aa8576" sha1="c02fe5ea4c7e8c6a432b4e4d5de45d260600d900" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="caterpil">
- <description>Caterpillar (I.J.K.)</description>
- <year>1984</year>
- <publisher>I.J.K.</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="5599">
- <rom name="caterpillar-ijk_e.uef" size="5599" crc="41720f24" sha1="9f943d1f41d12b993e7dcdf169392e7ec66dc19b" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="caterpir">
- <description>Caterpillar (Romik)</description>
- <year>1984</year>
- <publisher>Romik</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="5861">
- <rom name="caterpillar-romik_e.uef" size="5861" crc="c73cb3a8" sha1="20a91ba7afd2a39148c9088c37eb48f93063d3ce" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="caveman">
- <description>Caveman</description>
- <year>198?</year>
- <publisher>Kansas</publisher>
- <info name="usage" value="Load with *LOAD then RUN" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6874">
- <rom name="caveman_starload_run_e.uef" size="6874" crc="77750ded" sha1="4c7413e020cc70aba51c15a4ad857e88f589e539" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="cavemanc">
- <description>Caveman Capers</description>
- <year>1985</year>
- <publisher>Icon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8335">
- <rom name="cavemancapers_e.uef" size="8335" crc="3d28ba19" sha1="d1a2b07fc2b47aadaeb7435d5bd99ea0da3053be" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="cavemanca" cloneof="cavemanc">
- <description>Caveman Capers (Alternative)</description>
- <year>198?</year>
- <publisher>Alternative</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8335">
- <rom name="cavemancapers_e.uef" size="8335" crc="3d28ba19" sha1="d1a2b07fc2b47aadaeb7435d5bd99ea0da3053be" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="centibug">
- <description>Centibug</description>
- <year>1984</year>
- <publisher>Superior Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="5876">
- <rom name="centibug_e.uef" size="5876" crc="b1f171ec" sha1="ce9c8c0468981855a538d9d4aaf183612e02c5da" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="chessa">
- <description>Chess (Acornsoft)</description>
- <year>1984</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="SLG10" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11945">
- <rom name="chess-acornsoft_e.uef" size="11945" crc="e7df9652" sha1="d370f4df6c6cae8f0aabb426394e9ba718f3336a" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="chessmp">
- <description>Chess (Micro Power)</description>
- <year>1984</year>
- <publisher>Micro Power</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="5959">
- <rom name="chess-Micro Power_e.uef" size="5959" crc="fa4b456e" sha1="34f86f5d22888c38e2d3bacba9b5845b89a31529" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="chesss">
- <description>Chess (Superior Software)</description>
- <year>1984</year>
- <publisher>Superior Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10559">
- <rom name="chess-superior_be.uef" size="10559" crc="fcad0b1c" sha1="85748bfdb78eb4c6e2a09bb88c655cbef8dd16be" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="chipbust">
- <description>Chip Buster</description>
- <year>198?</year>
- <publisher>Software Invasion</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="12848">
- <rom name="chipbuster_e.hq.uef" size="12848" crc="deee29e5" sha1="0f5749861e0399e84f3fe110b69603071689f3d0" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="chuckieg">
- <description>Chuckie Egg</description>
- <year>1984</year>
- <publisher>A&amp;F Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8182">
- <rom name="chuckieegg_e.uef" size="8182" crc="80183697" sha1="e727562710a44cb8f88e6331bb2b7b4279f9e477" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="chukee">
- <description>Chukee The Upgrade</description>
- <year>1984</year>
- <publisher>Bit Twiddlers</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="4162">
- <rom name="chukee_e.uef" size="4162" crc="4007f957" sha1="bf381f48f88eeae829a2ec416bb30f14ac8b2013" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="circus">
- <description>Circus</description>
- <year>198?</year>
- <publisher>Adventure International</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11077">
- <rom name="adv_07_circus.uef" size="11077" crc="24a9b79b" sha1="9cab835198d3c24e16965703cf689665121c868f" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="circusga">
- <description>Circus Games</description>
- <year>1988</year>
- <publisher>Tynesoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="60698">
- <rom name="circusgames_e.uef" size="60698" crc="6c71d2db" sha1="5fda62d7de2348006ab3f38955439e5a678b2e2f" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="citadel">
- <description>Citadel (Play It Again Sam 1)</description>
- <year>1987</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="20372">
- <rom name="citadel-piasrr_e.uef" size="20372" crc="b70794ef" sha1="805549616c54bc2745dc19b01d90a25164c1e342" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="classadv">
- <description>Classic Adventure</description>
- <year>1984</year>
- <publisher>Melbourne House</publisher>
- <info name="usage" value="Load with *RUN" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="15315">
- <rom name="classicadventure_run_be.uef" size="15315" crc="490129e0" sha1="5ba069331d5816d2785a0ccf5fcea38d2d0f2b1b" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="classarc">
- <description>Classic Arcade Games</description>
- <year>198?</year>
- <publisher>Database</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="32639">
- <rom name="classicarcadegames_e.uef" size="32639" crc="1fcbc4ec" sha1="668f984549565a2df4046037fb64a708f73b40e4" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="9cardbd1">
- <description>9 Classic Card and Board Games Vol.1</description>
- <year>198?</year>
- <publisher>Database</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="33879">
- <rom name="9classiccardandboardgamesvol1_be.uef" size="33879" crc="446f66f5" sha1="b179c2ed7ce9534e8e74b8069ab956dfed3fb6eb" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="9cardbd2">
- <description>9 Classic Card and Board Games Vol.2</description>
- <year>1986</year>
- <publisher>Database</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="38434">
- <rom name="9classiccardandboardgamesvol2_be.uef" size="38434" crc="6eae50a8" sha1="58aa71564cb815c2bb2a6c216ac0c155261d989e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="clogger">
- <description>Clogger</description>
- <year>1988</year>
- <publisher>Impact</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="25452">
- <rom name="clogger_e.uef" size="25452" crc="387d73a9" sha1="b6612bee0f893e7dcfbfe4e9a54686db5bfd972a" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="codedro">
- <description>Codename: Droid</description>
- <year>1987</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="23751">
- <rom name="codenamedroid_e.uef" size="23751" crc="478717fa" sha1="d48f7487d5d61b2d533c3b5bfb6735773ffb13d9" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="colos4br">
- <description>Colossus Bridge 4</description>
- <year>1988</year>
- <publisher>CDS</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="18376">
- <rom name="colossus4bridge_e.uef" size="18376" crc="a0a3ab59" sha1="3760e2c2f319d4327d4ca95a7ac613ad73bd1a18" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="colos4ch">
- <description>Colossus Chess 4</description>
- <year>1988</year>
- <publisher>CDS</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="15702">
- <rom name="colossus4chess_e.uef" size="15702" crc="44af3a47" sha1="acf829702e1dc8464398b1e51ed51530075bedec" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="comblynxa" cloneof="comblynx">
- <description>Combat Lynx Alternative)</description>
- <year>198?</year>
- <publisher>Alternative</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="19039">
- <rom name="combatlynx_e.uef" size="19039" crc="15040f17" sha1="2ff2d8c63057c390fa955b413aa521f6219d0c2b" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="comblynx">
- <description>Combat Lynx</description>
- <year>1984</year>
- <publisher>Durell</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="19039">
- <rom name="combatlynx_e.uef" size="19039" crc="15040f17" sha1="2ff2d8c63057c390fa955b413aa521f6219d0c2b" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="comm3joy">
- <description>Commander 3 Joystick</description>
- <year>1984</year>
- <publisher>Bud Computers</publisher>
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Joystick Programming Utility"/>
- <dataarea name="cass" size="1724">
- <rom name="cm3-programmingutility_e.uef" size="1724" crc="b97875fb" sha1="8f4a2bf0958aa38353f1d56d2696c10347007bb5" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Adval Utility"/>
- <dataarea name="cass" size="1171">
- <rom name="cm3-advalutility_e.uef" size="1171" crc="b6dedba4" sha1="ac05b22467f2a3629f7c61b9730436dd77b2cf79" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="commando">
- <description>Commando</description>
- <year>1985</year>
- <publisher>Elite</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="19252">
- <rom name="commando_e.uef" size="19252" crc="6263812b" sha1="8037952f630df867707dac948bc6968fbce72d66" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="commandopias" cloneof="commando">
- <description>Commando (Play It Again Sam-3)</description>
- <year>1989</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="21296">
- <rom name="commando-piasrr_e.uef" size="21296" crc="fb487314" sha1="620e8ff4d2b043bbfb0a5a0204d652ffed068a4f" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="cwealthg">
- <description>Commonwealth Games</description>
- <year>1986</year>
- <publisher>Tynesoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="54617">
- <rom name="commonwealthgames_e.uef" size="54617" crc="785549bf" sha1="e75c16fffe258807c6f41a804394d8a0f53bc550" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="condred">
- <description>Condition Red</description>
- <year>198?</year>
- <publisher>Blue Ribbon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10494">
- <rom name="conditionred_e.uef" size="10494" crc="2bdd17ab" sha1="17aaf73faa0bc26598c4b8d6b9bba86444022bf8" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="confuzioa" cloneof="confuzio">
- <description>Confuzion (Alternative)</description>
- <year>198?</year>
- <publisher>Alternative</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8743">
- <rom name="confuzion_be.uef" size="8743" crc="989ddd27" sha1="5b189c0a1e23705bd39c3df7bc05f714142daf85" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="confuzio">
- <description>Confuzion</description>
- <year>1985</year>
- <publisher>Incentive</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8743">
- <rom name="confuzion_be.uef" size="8743" crc="989ddd27" sha1="5b189c0a1e23705bd39c3df7bc05f714142daf85" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="constell">
- <description>Constellation</description>
- <year>1984</year>
- <publisher>Superior Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="4832">
- <rom name="constellation-superior_e.uef" size="4832" crc="dc567bd6" sha1="292418b6b8c6b14b8c534c2632f37af6c57d56ed" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="cbridge">
- <description>Contract Bridge</description>
- <year>1984</year>
- <publisher>Alligata</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8671">
- <rom name="contractbridge_e.uef" size="8671" crc="95bc1f15" sha1="f1b167a422517dfe09a1d4ed18e515a622996a6e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="copsnrob">
- <description>Cops n Robbers</description>
- <year>1987</year>
- <publisher>Atlantis</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7661">
- <rom name="copsnrobbers_be.uef" size="7661" crc="8a7a9026" sha1="5576140bfb362192b6203ecd9b423bccdafa6d25" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="corncrop">
- <description>Corn Cropper</description>
- <year>1984</year>
- <publisher>CCS</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9915">
- <rom name="corncropper_e.uef" size="9915" crc="ea309a17" sha1="a0e4440355865b16aee39d26b636d87b3acc5d9a" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="corpclim">
- <description>Corporate Climber</description>
- <year>198?</year>
- <publisher>Dynabyte</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7135">
- <rom name="corporateclimber_e.uef" size="7135" crc="022cd5dd" sha1="86299501800638d8bcbe1bc39b6b76681ace7b59" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="cosmicca">
- <description>Cosmic Camouflage</description>
- <year>1988</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="12295">
- <rom name="cosmiccamouflage_e.uef" size="12295" crc="9e3cb164" sha1="09ba1f92c3ae7e71834200b8e611ed451f3126cc" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="countoli">
- <description>Count with Oliver</description>
- <year>1985</year>
- <publisher>Mirrorsoft</publisher>
- <part name="cass" interface="electron_cass">
- <feature name="part_id" value="Lollipops"/>
- <dataarea name="cass" size="7814">
- <rom name="cwo-lollipops_be.uef" size="7814" crc="9e494015" sha1="09feec7f7032257f335f019c254043fc83da2954" offset="0"/>
- </dataarea>
- </part>
- <part name="cass" interface="electron_cass">
- <feature name="part_id" value="Toyshop"/>
- <dataarea name="cass" size="7051">
- <rom name="cwo-toyshop_be.uef" size="7051" crc="c2b70beb" sha1="712c3bd3f7bc5b3e59cec18190ac5f631c45f049" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="countfun">
- <description>Counting Fun</description>
- <year>1984</year>
- <publisher>Gemini</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="4314">
- <rom name="t-coun.uef" size="4314" crc="50a22118" sha1="182337955afa4ce114530b28c0d1ba986fdce045" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="crack_up">
- <description>Crack Up</description>
- <year>1989</year>
- <publisher>Atlantis</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7887">
- <rom name="crackup_e.uef" size="7887" crc="ec432faa" sha1="ecab2edbe4cdf4a0e0d2cc36f4199cb2a2723355" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="crazeeri">
- <description>Crazee Rider</description>
- <year>1987</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="26817">
- <rom name="crazeerider_e.uef" size="26817" crc="4dbebd36" sha1="d7d7acac6fe8985b2e25cafe2e58aee82a7c42e9" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="czerbert">
- <description>Crazy Er*bert</description>
- <year>1987</year>
- <publisher>Alternative</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8008">
- <rom name="crazyerbert_be.uef" size="8008" crc="2cd641c3" sha1="4f72dd4df5beab04e13e5dee6ab23bc7dcaf2945" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="crtracer">
- <description>Crazy Tracer</description>
- <year>1983</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="SLG26" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9423">
- <rom name="crazytracer_e.uef" size="9423" crc="e3682ecf" sha1="9d1aa72ab53870dcc6a38540e859f178dc7b237b" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="creepyca">
- <description>Creepy Cave</description>
- <year>1987</year>
- <publisher>Atlantis</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11752">
- <rom name="creepycave_be.uef" size="11752" crc="d835f9b9" sha1="5a0080e2b1fc0a4b2355789db0fb43089a16ec61" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="cricket">
- <description>Cricket</description>
- <year>1986</year>
- <publisher>Bug Byte</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11598">
- <rom name="cricket_be.uef" size="11598" crc="1fb0a611" sha1="6d9bd3a2c9b4bfbc0b16a482afaff08b03472947" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="crimedet">
- <description>Crime &amp; Detection Quiz</description>
- <year>1983</year>
- <publisher>Acornsoft/Ivan Berg</publisher>
- <info name="release" value="XBX02" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="56292">
- <rom name="crimedetectionquiz_be.uef" size="56292" crc="1af0f115" sha1="805e3c0cef96a294851909a25c5b9feb35dbcc06" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="croaker">
- <description>Croaker</description>
- <year>1984</year>
- <publisher>Micro Power</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="5502">
- <rom name="croaker_e.uef" size="5502" crc="784ea736" sha1="2d10ee198d095e7d525e2f7de2dbe08a160024df" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="crownjew">
- <description>Crown Jewels</description>
- <year>1984</year>
- <publisher>Alligata</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9498">
- <rom name="crownjewels_e.uef" size="9498" crc="fcc7a08a" sha1="bca85f8718727b535de69ff6c2f28786f2bd26ef" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="ccastles">
- <description>Crystal Castles</description>
- <year>1986</year>
- <publisher>U.S. Gold</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="12457">
- <rom name="crystalcastles_e.uef" size="12457" crc="2662f88e" sha1="1e101f9130009dc5db6b5f6c4f43ac59f7a5bcf7" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="custardp">
- <description>Custard Pie Fight</description>
- <year>1984</year>
- <publisher>Comsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="5117">
- <rom name="custardpiefight_e.uef" size="5117" crc="98f0166a" sha1="777e011ebc0b52c516c7f972d5c4dc509aae96ff" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="cybermis">
- <description>Cybertron Mission</description>
- <year>1984</year>
- <publisher>Micro Power</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8835">
- <rom name="cybertronmission_e.uef" size="8835" crc="c69d2572" sha1="2d1969ce23a82a7ba33647e789c3626568002dc2" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="cyborgwa">
- <description>Cyborg Warriors</description>
- <year>1991</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="15793">
- <rom name="cyborgwarriors_e.uef" size="15793" crc="b5aff38d" sha1="abee878cdaf1ee175f35580eb33309fad00e84b7" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="cylonatt">
- <description>Cylon Attack</description>
- <year>1984</year>
- <publisher>A&amp;F Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="17773">
- <rom name="cylonattack_e.uef" size="17773" crc="bfe29e83" sha1="6a0b66335e732c095f95f6aec852becba9b30a7b" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="cyloninv">
- <description>Cylon Invasion</description>
- <year>1985</year>
- <publisher>Tynesoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="5970">
- <rom name="cyloninvasion_e.uef" size="5970" crc="88ed3000" sha1="c6e68ded7f2dcb425e912b277e91bd70f3c04cae" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="dallas">
- <description>Dallas</description>
- <year>1983</year>
- <publisher>CCS</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8253">
- <rom name="dallas_e.uef" size="8253" crc="5e113f65" sha1="2a719eb365442010cb955e7f28720365b9705eb8" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="dangruxb">
- <description>Danger UXB</description>
- <year>1983</year>
- <publisher>Micro Power</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="5800">
- <rom name="dangeruxb_e.uef" size="5800" crc="356398d8" sha1="aff202c442882a5b2eb303fb353a25cf6333ca97" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="dddenis">
- <description>Dare Devil Dennis</description>
- <year>1984</year>
- <publisher>Visions</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7441">
- <rom name="daredevildenis_e.uef" size="7441" crc="29525c90" sha1="04f65a1a1bca3909fa53b48d2b655f55a78369da" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="dartsbr">
- <description>Darts</description>
- <year>1985</year>
- <publisher>Blue Ribbon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6800">
- <rom name="darts-blueribbon_e.uef" size="6800" crc="362795bd" sha1="be8664912fc2fa39fef4f0db4ade52210c3689fa" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="datafile">
- <description>Data File</description>
- <year>198?</year>
- <publisher>Kansas</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6579">
- <rom name="datafile_e.uef" size="6579" crc="a824ca53" sha1="7bfa56819fae911f157558e256c6d278361cf328" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="deadaliv">
- <description>Dead or Alive</description>
- <year>1988</year>
- <publisher>Alternative</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7921">
- <rom name="deadoralive_be.uef" size="7921" crc="683d7f2f" sha1="198a16a7bb3d909b8a3fb3dd82bc7a8cf219d556" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="deathsta">
- <description>Death Star (The Superior Collection Vol.3)</description>
- <year>1987</year>
- <publisher>Superior Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9388">
- <rom name="deathstar-scrr_e.uef" size="9388" crc="893add95" sha1="476ab5207aca4c3d2b48cd88178742f7aedc1c2a" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="deathstabr" cloneof="deathsta">
- <description>Death Star (Blue Ribbon)</description>
- <year>198?</year>
- <publisher>Superior Software/Blue Ribbon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9330">
- <rom name="deathstar-brrr_e.uef" size="9330" crc="f8384ea1" sha1="6f293419173378ada33ea316276f90d55f98b71f" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="denisdri">
- <description>Denis Through the Drinking Glass</description>
- <year>1984</year>
- <publisher>Melbourne House</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="20577">
- <rom name="denisthroughthedrinkingglass_e.uef" size="20577" crc="88830df4" sha1="e5fe867ca4bee8d10144771eb5f3c18e1cfaf2b4" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="dmfinsbu">
- <description>Depot Master Finsbury Park</description>
- <year>1989</year>
- <publisher>Ashley Greenup</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7563">
- <rom name="depotmasterfinsburypark_be.uef" size="7563" crc="797fde02" sha1="b5b57309815c113ccdf9016f1fd7a79ce526f8cf" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="dmoldoakd" cloneof="dmoldoak">
- <description>Depot Master Old Oak Common (Dee-Kay)</description>
- <year>198?</year>
- <publisher>Dee-Kay</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7612">
- <rom name="depotmaster_old_oak_common.uef" size="7612" crc="bdb72a54" sha1="02d9cc85959937597ec80e88a819e2ae6f37bf95" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="dmoldoak">
- <description>Depot Master Old Oak Common</description>
- <year>1989</year>
- <publisher>Ashley Greenup</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7612">
- <rom name="depotmasteroldoakcommon_be.uef" size="7612" crc="bdb72a54" sha1="02d9cc85959937597ec80e88a819e2ae6f37bf95" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="dskdiary">
- <description>Desk Diary</description>
- <year>1983</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="SLB01" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10631">
- <rom name="deskdiary_e.uef" size="10631" crc="e0a376f4" sha1="e2e3abe886aa94855351094f7dd3259c9b648934" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="despride">
- <description>Despatch Rider</description>
- <year>1987</year>
- <publisher>Audiogenic</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11723">
- <rom name="despatchrider_e.uef" size="11723" crc="082d4200" sha1="9912f778341011cec90ad9a7946d8707c23ce156" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="diaminebr" cloneof="diamine">
- <description>Diamond Mine (Blue Ribbon)</description>
- <year>1985</year>
- <publisher>Blue Ribbon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="4881">
- <rom name="diamondmine-blueribbon_e.uef" size="4881" crc="d825ace8" sha1="80c46593a5e1d5a9e03ecb7ee10a08c84eb6c730" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="diamine">
- <description>Diamond Mine</description>
- <year>1983</year>
- <publisher>MRM Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="4920">
- <rom name="diamondmine-mrm_e.uef" size="4920" crc="f48d29e6" sha1="dc9b3f980f0ea8ccc4c76eb1b2d4f60c226a9dfa" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="diamine2">
- <description>Diamond Mine 2</description>
- <year>1985</year>
- <publisher>Blue Ribbon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7911">
- <rom name="diamondmine2-blueribbon_e.uef" size="7911" crc="242b5e00" sha1="02ca341b3e1af2a4b8e499913cc53b457e192c2f" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="diampete">
- <description>Diamond Pete</description>
- <year>198?</year>
- <publisher>Alligata</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9194">
- <rom name="diamondpete_e.uef" size="9194" crc="ff982b0a" sha1="8b9fca9f394363e1ae4411461ee3701126fcdba5" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="disassem">
- <description>Disassembler</description>
- <year>198?</year>
- <publisher>Superior Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="2612">
- <rom name="disassembler-superior_e.uef" size="2612" crc="e786b8bc" sha1="c0e3d5ee0be0944aedb6ba2cdd695da42d66a986" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="dgeezers">
- <description>Dodgy Geezers</description>
- <year>1986</year>
- <publisher>Melbourne House</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="59343">
- <rom name="dodgygeezers_be.uef" size="59343" crc="fdd7636c" sha1="64c0b66637de07ffad66d7f5ee30127c3b7e9d41" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="dogfaces">
- <description>Dogfight for Aces Only</description>
- <year>198?</year>
- <publisher>slogger</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10080">
- <rom name="dogfight-opus_e.uef" size="10080" crc="bdde02c3" sha1="c693536b24412fe415f32bd94afb9b7e45ce9448" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="dominoes">
- <description>Dominoes (Blue Ribbon)</description>
- <year>198?</year>
- <publisher>Blue Ribbon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6339">
- <rom name="dominoes_e.uef" size="6339" crc="49bb1c26" sha1="50e1e07251503da925505b263a0b14f2f8bd506b" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="dominoeg">
- <description>Dominoes (Garland)</description>
- <year>1984</year>
- <publisher>Garland Computing</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10583">
- <rom name="dominoes-garland_be.uef" size="10583" crc="4734ec77" sha1="b98482401f571ece2a3e91846520172f70424fe3" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="dracisla">
- <description>Dracula Island</description>
- <year>1986</year>
- <publisher>Kansas</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9320">
- <rom name="draculaisland_e.uef" size="9320" crc="9151891d" sha1="d46f95742ef63565016363d906ef0267b4497402" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="drainman">
- <description>Drain Mania</description>
- <year>1985</year>
- <publisher>Icon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="13725">
- <rom name="drainmania_e.uef" size="13725" crc="1e2913a2" sha1="c0f447986e3f426e714a92cb7fab9ca4c37e9436" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="draughtc">
- <description>Draughts (Computer Concepts)</description>
- <year>1983</year>
- <publisher>Computer Concepts</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9292">
- <rom name="draughts-computerconcepts_be.uef" size="9292" crc="3bb34dc1" sha1="b2fb6cb6cf82a3d615f6ad41670029e8ca984a7d" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="draughtr">
- <description>Draughts and Reversi</description>
- <year>198?</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="SLG20" />
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Draughts"/>
- <dataarea name="cass" size="6150">
- <rom name="dar-draughts_e.uef" size="6150" crc="00671a30" sha1="650bb64f57720d37905ac4822428bb1856f19c57" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Reversi"/>
- <dataarea name="cass" size="5668">
- <rom name="dar-reversi_e.uef" size="5668" crc="af4c37b1" sha1="cc397a3f359ad6488719a1a4379f26e47605f3c9" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="draughts">
- <description>Draughts (Superior Software)</description>
- <year>1984</year>
- <publisher>Superior Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="3939">
- <rom name="draughts-superior_e.uef" size="3939" crc="5da73d42" sha1="09dad980a0e1b0d12fa59319627df5c5a2936b4d" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="draw">
- <description>Draw</description>
- <year>198?</year>
- <publisher>Micro Power</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8280">
- <rom name="draw_e.uef" size="8280" crc="d1418e04" sha1="0354ed40034c4ed52f567a0f2515a6e1a14e25f1" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="dunjunz">
- <description>Dunjunz</description>
- <year>1987</year>
- <publisher>Bug Byte</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="29079">
- <rom name="dunjunz_e.uef" size="29079" crc="9d95a59d" sha1="156fcf50a207afa8c8d847b28667d2a490c3c6a4" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="eddiekid">
- <description>Eddie Kidd Jump Challenge</description>
- <year>1985</year>
- <publisher>Martech</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="13591">
- <rom name="eddiekiddjumpchallenge_e.uef" size="13591" crc="4c00fa33" sha1="d3123c27fcd6164a7e2aca3aa200e0bc1cff8663" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="introcasg" cloneof="introcas">
- <description>Einfuhrungs Kassette (Ger)</description>
- <year>1983</year>
- <publisher>Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="49580">
- <rom name="introductorycassette-german_e.uef" size="49580" crc="85bc6c80" sha1="e218442dca4696f8c5ed7d6e8e1b144de7ca02fa" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="elcomp1">
- <description>Electron Computing 1</description>
- <year>1983</year>
- <publisher>Electron Computing</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="32377">
- <rom name="electroncomputing1_e.uef" size="32377" crc="1a01a4d7" sha1="165ff98655a3a71df36350a3aec8dcde94e9c615" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="elcomp2">
- <description>Electron Computing 2</description>
- <year>1983</year>
- <publisher>Electron Computing</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="33997">
- <rom name="electroncomputing2_e.uef" size="33997" crc="15fc6e0b" sha1="6cea10862b922fa000330ec8dabd23b51b34f8ff" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="elcomp3">
- <description>Electron Computing 3</description>
- <year>1983</year>
- <publisher>Electron Computing</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="28633">
- <rom name="electroncomputing3_e.uef" size="28633" crc="8e1b530f" sha1="abcc806233e5efb1db5e881cca7803441ee55d3f" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="elcomp4">
- <description>Electron Computing 4</description>
- <year>1983</year>
- <publisher>Electron Computing</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="48541">
- <rom name="electroncomputing4_e.uef" size="48541" crc="d86234df" sha1="7556b88441afe7bc8fbea794c31bc4e643c91938" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="elcomp5">
- <description>Electron Computing 5</description>
- <year>1983</year>
- <publisher>Electron Computing</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="30482">
- <rom name="electroncomputing5_e.uef" size="30482" crc="53c16815" sha1="c5689552fd330bab52c4fd04e9cd20846822a10e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="elcomp6">
- <description>Electron Computing 6</description>
- <year>1983</year>
- <publisher>Electron Computing</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="32680">
- <rom name="electroncomputing6_e.uef" size="32680" crc="c7ccb2b5" sha1="4c1b12a69a69d0c490edc6256e481360ca933a6f" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="elcomp7">
- <description>Electron Computing 7</description>
- <year>1983</year>
- <publisher>Electron Computing</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="34119">
- <rom name="electroncomputing7_e.uef" size="34119" crc="e54c30db" sha1="b53c03bdf54754909ff3ae6835654862dda93b62" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="elbugint">
- <description>Elbug Introductory Cassette</description>
- <year>1983</year>
- <publisher>Elbug</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="16321">
- <rom name="elbugintroductorycassette_e.uef" size="16321" crc="68cab51a" sha1="351d3141e02be1ef972a97aa3789a63b34ec96c5" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="einvader">
- <description>Electron Invaders</description>
- <year>1984</year>
- <publisher>Micro Power</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6929">
- <rom name="electroninvaders_e.uef" size="6929" crc="30fd1e16" sha1="99cc722c927d8f48c791a7ba000c063a88849a3d" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser101">
- <description>Electron User Vol.1-1</description>
- <year>1984</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="20200">
- <rom name="eu1-1-4_e.uef" size="20200" crc="16531ed8" sha1="1bea1e108914fc46a17707a81d29f860e075a81e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser105">
- <description>Electron User Vol.1-5</description>
- <year>1984</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11633">
- <rom name="eu1-5_e.uef" size="11633" crc="710c6dd0" sha1="a58314345b1d6b08cfeed0909750deb768ed3d5a" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser106">
- <description>Electron User Vol.1-6</description>
- <year>1984</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="20922">
- <rom name="eu1-6_e.uef" size="20922" crc="517bd47f" sha1="5ef852c51d36e6683200c82906c6d1a284d550f8" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser107">
- <description>Electron User Vol.1-7</description>
- <year>1984</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="15524">
- <rom name="eu1-7_e.uef" size="15524" crc="55d09d6b" sha1="b851e0f86ab62ffd4b5f51d9b14287980824de9b" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser108">
- <description>Electron User Vol.1-8</description>
- <year>1984</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="16419">
- <rom name="eu1-8_e.uef" size="16419" crc="9fc455b7" sha1="84881bda718dc96f6a58a8c4f39ff569bd2612fb" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser109">
- <description>Electron User Vol.1-9</description>
- <year>1984</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8644">
- <rom name="eu1-9_e.uef" size="8644" crc="d8d39340" sha1="0f5e5296f873c7e4e6e06420498384ca2b225145" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser110">
- <description>Electron User Vol.1-10</description>
- <year>1984</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="12791">
- <rom name="eu1-10_e.uef" size="12791" crc="8f0e3ba6" sha1="cc37e7ccb9829ccee099093d114e89a54ee1770a" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser111">
- <description>Electron User Vol.1-11</description>
- <year>1984</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="17561">
- <rom name="eu1-11_e.uef" size="17561" crc="051db8c4" sha1="4ac73f632acb98a8c6404dbebcffce335059b14f" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser112">
- <description>Electron User Vol.1-12</description>
- <year>1984</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="19574">
- <rom name="eu1-12_e.uef" size="19574" crc="f176a6d0" sha1="c70fb87b1165a1c0bb21d56692a7c863aab6402f" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser201">
- <description>Electron User Vol.2-1</description>
- <year>1984</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="14025">
- <rom name="eu2-1_e.uef" size="14025" crc="6ed8dc89" sha1="cf8ca1fb02860ac300f3d209cc5c2b45165fe312" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser202">
- <description>Electron User Vol.2-2</description>
- <year>1984</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="16010">
- <rom name="eu2-2_e.uef" size="16010" crc="d0ff3150" sha1="695d5d0afcefc2ddebfd73404023e5e66a139416" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser203">
- <description>Electron User Vol.2-3</description>
- <year>1984</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="16233">
- <rom name="eu2-3_e.uef" size="16233" crc="2a8cd001" sha1="0da879179e15ad656ef0cde096a848882ee7020a" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser204">
- <description>Electron User Vol.2-4</description>
- <year>1985</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="19039">
- <rom name="eu2-4_e.uef" size="19039" crc="a22d0af2" sha1="177fb907562f909dac94974c52901810bcbaa929" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser205">
- <description>Electron User Vol.2-5</description>
- <year>1985</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="30558">
- <rom name="eu2-5_e.uef" size="30558" crc="17592809" sha1="3afa91790b20bc9a13721214e2795d6376f372ce" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser206">
- <description>Electron User Vol.2-6</description>
- <year>1985</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="21741">
- <rom name="eu2-6_e.uef" size="21741" crc="9250085f" sha1="4d9f77288e2b98b197e43876e17fb9e1bf054282" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser207">
- <description>Electron User Vol.2-7</description>
- <year>1985</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="22557">
- <rom name="eu2-7_e.uef" size="22557" crc="357c0c19" sha1="3ba0b9c556b52f2857d158731d725a54cd1cd597" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser208">
- <description>Electron User Vol.2-8</description>
- <year>1985</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="18137">
- <rom name="eu2-8_e.uef" size="18137" crc="66031002" sha1="29949537b8b149c8a0895002ab51ea0f34148aff" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser209">
- <description>Electron User Vol.2-9</description>
- <year>1985</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="23864">
- <rom name="eu2-9_e.uef" size="23864" crc="86885dde" sha1="7d8ef371334a4fa5d12aa1f2a8c9dd6a6d75b4b6" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser210">
- <description>Electron User Vol.2-10</description>
- <year>1985</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="19220">
- <rom name="eu2-10_e.uef" size="19220" crc="5f8be92c" sha1="f395f95995466b15bdfe57f1b50b55fab3ef96ca" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser211">
- <description>Electron User Vol.2-11</description>
- <year>1985</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="18067">
- <rom name="eu2-11_e.uef" size="18067" crc="8b62ebb4" sha1="7996f49e06c52523b372f6d77443fee5289215a2" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser212">
- <description>Electron User Vol.2-12</description>
- <year>1985</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="22271">
- <rom name="eu2-12_e.uef" size="22271" crc="db3824cc" sha1="464dfaf9490d0857a518b621e40d2cf03c7c2296" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser301">
- <description>Electron User Vol.3-1</description>
- <year>1985</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="15405">
- <rom name="eu3-1_e.uef" size="15405" crc="f4eeffbe" sha1="0b63f2a51a8f387de941ca198b10a17bd915a9b1" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser302">
- <description>Electron User Vol.3-2</description>
- <year>1985</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="17905">
- <rom name="eu3-2_e.uef" size="17905" crc="398d6843" sha1="490ab44d30a5a97d1e7dc891f56445e7850244bf" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser303">
- <description>Electron User Vol.3-3</description>
- <year>1985</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="19990">
- <rom name="eu3-3_e.uef" size="19990" crc="41d6b19b" sha1="6c0d105e9f0e740ce2f043a2ea1dadcfc3a7af46" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser304">
- <description>Electron User Vol.3-4</description>
- <year>1986</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="13591">
- <rom name="eu3-4_e.uef" size="13591" crc="a61b72e8" sha1="3390b74b07d9c8155d2b0e98f8f289e79485f902" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser305">
- <description>Electron User Vol.3-5</description>
- <year>1986</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="19149">
- <rom name="eu3-5_e.uef" size="19149" crc="7a0296c3" sha1="4b2b110be5d6f3b4192dfa154ded2bc99b9eebdf" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser306">
- <description>Electron User Vol.3-6</description>
- <year>1986</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="19441">
- <rom name="eu3-6_e.uef" size="19441" crc="928cfb3a" sha1="6f13ed693e561213aecf8f9cbaea773af74bf7e4" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser307">
- <description>Electron User Vol.3-7</description>
- <year>1986</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11371">
- <rom name="eu3-7_e.uef" size="11371" crc="506a466c" sha1="4e94f92945eec765ebe9170ff142d6c86961f663" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser308">
- <description>Electron User Vol.3-8</description>
- <year>1986</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="13799">
- <rom name="eu3-8_e.uef" size="13799" crc="09108806" sha1="ccf439f60924c78eeb1daf0a05ea6d2836b0c0b9" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser309">
- <description>Electron User Vol.3-9</description>
- <year>1986</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="15641">
- <rom name="eu3-9_e.uef" size="15641" crc="67552812" sha1="587118e6b3b6e2045eb1728657284833e4beb496" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser310">
- <description>Electron User Vol.3-10</description>
- <year>1986</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="17768">
- <rom name="eu3-10_e.uef" size="17768" crc="3b1cec66" sha1="72126331596fdebe690c5814809b023ca4579a1e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser311">
- <description>Electron User Vol.3-11</description>
- <year>1986</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="18516">
- <rom name="eu3-11_e.uef" size="18516" crc="e1c5b902" sha1="3e2433012c3eb44f149367b8b1b3fcd61401f5dd" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser312">
- <description>Electron User Vol.3-12</description>
- <year>1986</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="20682">
- <rom name="eu3-12_e.uef" size="20682" crc="6b31890d" sha1="fd13f0f47eeb77307a96150e91fd060f1a242ff2" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser401">
- <description>Electron User Vol.4-1</description>
- <year>1986</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="21261">
- <rom name="eu4-1_e.uef" size="21261" crc="ff0b251c" sha1="71d128792c1271d6689faf65fd53ea910dde0c28" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser402">
- <description>Electron User Vol.4-2</description>
- <year>1986</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="15428">
- <rom name="eu4-2_e.uef" size="15428" crc="f328dded" sha1="857b589101498d60b4dce75b3699c0d3ebe01437" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser403">
- <description>Electron User Vol.4-3</description>
- <year>1986</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="17747">
- <rom name="eu4-3_e.uef" size="17747" crc="7638447d" sha1="1d6ef1cfa0ef888f5b74fdd34da518834504a583" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser404">
- <description>Electron User Vol.4-4</description>
- <year>1987</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="12642">
- <rom name="eu4-4_e.uef" size="12642" crc="074524aa" sha1="e0cdf5a68584bde99403fed5f2f7305fbf2c1173" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser405">
- <description>Electron User Vol.4-5</description>
- <year>1987</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="17034">
- <rom name="eu4-5_e.uef" size="17034" crc="b4cddbc8" sha1="7d4ebf0975dfb1f0b13c6c3b9ccb051f58c61fa4" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser406">
- <description>Electron User Vol.4-6</description>
- <year>1987</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="23990">
- <rom name="eu4-6_e.uef" size="23990" crc="49308204" sha1="c8826ff31d8e6964d629c2408eef7e0db6829a22" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser407">
- <description>Electron User Vol.4-7</description>
- <year>1987</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="15190">
- <rom name="eu4-7_e.uef" size="15190" crc="fce023d3" sha1="9209852e321f008f19731f2cc4a89eebcb624bde" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser408">
- <description>Electron User Vol.4-8</description>
- <year>1987</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="18371">
- <rom name="eu4-8_e.uef" size="18371" crc="f5e6ff84" sha1="7a6e9652c048408a2db85f74a79712b39257dcc6" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser409">
- <description>Electron User Vol.4-9</description>
- <year>1987</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="24635">
- <rom name="eu4-9_e.uef" size="24635" crc="73c3bc86" sha1="bc2b43c94078a3e53c5065609aa10a3cd4b0c9f4" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser410">
- <description>Electron User Vol.4-10</description>
- <year>1987</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="20300">
- <rom name="eu4-10_e.uef" size="20300" crc="47bdbf5b" sha1="dbe97a2fdbc39659cace4afec364ada973728b04" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser411">
- <description>Electron User Vol.4-11</description>
- <year>1987</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="15608">
- <rom name="eu4-11_e.uef" size="15608" crc="539674ba" sha1="187a99dd4a336db90b67bdf411f6f6522a48d878" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser412">
- <description>Electron User Vol.4-12</description>
- <year>1987</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="25055">
- <rom name="eu4-12_e.uef" size="25055" crc="6be38dce" sha1="05526ca006897eb960cbabd981ebd46ed8a9ef9e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser501">
- <description>Electron User Vol.5-1</description>
- <year>1987</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="13386">
- <rom name="eu5-1_e.uef" size="13386" crc="47ecded0" sha1="f9b1b0b6d26126b3ccca8cd41faa7417472b0d58" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser502">
- <description>Electron User Vol.5-2</description>
- <year>1987</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="13748">
- <rom name="eu5-2_e.uef" size="13748" crc="d4d741e8" sha1="b45cfeb35911edf98df91210bcd32468f20793b5" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser503">
- <description>Electron User Vol.5-3</description>
- <year>1987</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="13725">
- <rom name="eu5-3_e.uef" size="13725" crc="21391e66" sha1="5ec4b4416ab27f3c192f4508a73fd4582ff754d5" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser504">
- <description>Electron User Vol.5-4</description>
- <year>1988</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="19231">
- <rom name="eu5-4_e.uef" size="19231" crc="7f5dfec7" sha1="b31d9a8b7003942a8bd8112466d2787814c2b0a5" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser505">
- <description>Electron User Vol.5-5</description>
- <year>1988</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="18840">
- <rom name="eu5-5_e.uef" size="18840" crc="751a03cf" sha1="e217d3f317d1cc419cc3edf3b99513e5425250d2" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser506">
- <description>Electron User Vol.5-6</description>
- <year>1988</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="19762">
- <rom name="eu5-6_e.uef" size="19762" crc="d5b3aa34" sha1="99d86681c900329d0ec69e62a8a658b7dc2597dc" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser507">
- <description>Electron User Vol.5-7</description>
- <year>1988</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="24754">
- <rom name="eu5-7_e.uef" size="24754" crc="a70286ec" sha1="4736d7bb571be5939e2850de9859c4b29bbfc5e1" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser508">
- <description>Electron User Vol.5-8</description>
- <year>1988</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="16851">
- <rom name="eu5-8_e.uef" size="16851" crc="82ffa545" sha1="8494edf40111105a7a306326fa7c1292595578f1" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser509">
- <description>Electron User Vol.5-9</description>
- <year>1988</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11630">
- <rom name="eu5-9_e.uef" size="11630" crc="90efc0f0" sha1="d131d98100fafc9a5f4686eb41b785262c7cee4b" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser510">
- <description>Electron User Vol.5-10</description>
- <year>1988</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="18294">
- <rom name="eu5-10_e.uef" size="18294" crc="3f0812cf" sha1="f2049e2863dd74fa6af68efb304b4b9ef202276a" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser511">
- <description>Electron User Vol.5-11</description>
- <year>1988</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="13104">
- <rom name="eu5-11_e.uef" size="13104" crc="c361d598" sha1="9bcd609f13f9fc874d1721d2a61387c066476f7f" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser512">
- <description>Electron User Vol.5-12</description>
- <year>1988</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="16145">
- <rom name="eu5-12_e.uef" size="16145" crc="e753cccd" sha1="63d417d8dbea0b83daaeb2aadf4b5bcd5b04af6a" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser601">
- <description>Electron User Vol.6-1</description>
- <year>1988</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="23050">
- <rom name="eu6-1_e.uef" size="23050" crc="cea7bf60" sha1="be2e16e0cb90e771b30d504d359c709155e0c667" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser602">
- <description>Electron User Vol.6-2</description>
- <year>1988</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="15169">
- <rom name="eu6-2_e.uef" size="15169" crc="45194564" sha1="c2b30edc0bd5453dc7ccd04f54ea16f3b7510c19" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser603">
- <description>Electron User Vol.6-3</description>
- <year>1988</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="13276">
- <rom name="eu6-3_e.uef" size="13276" crc="b4b89cc8" sha1="b7f5cccb37c053644850f893cb1c9e6e0ac3e502" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser604">
- <description>Electron User Vol.6-4</description>
- <year>1989</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10297">
- <rom name="eu6-4_e.uef" size="10297" crc="a3b53468" sha1="e160388c43bb095e0287c4ebf52a1e4ff6fd0230" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser605">
- <description>Electron User Vol.6-5</description>
- <year>1989</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="12168">
- <rom name="eu6-5_e.uef" size="12168" crc="5077448d" sha1="bf83b555a508331a0432234eeb13a8f2214ff08e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser606">
- <description>Electron User Vol.6-6</description>
- <year>1989</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11843">
- <rom name="eu6-6_e.uef" size="11843" crc="ae93e82c" sha1="4cb5e941f017d02c833929ef9ecfdcaedd2d4fdf" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser607">
- <description>Electron User Vol.6-7</description>
- <year>1989</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11438">
- <rom name="eu6-7_e.uef" size="11438" crc="c178a4d6" sha1="8112b9e3b56cd887c4f23b190d1dadb1a002ee36" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser608">
- <description>Electron User Vol.6-8</description>
- <year>1989</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="16776">
- <rom name="eu6-8_e.uef" size="16776" crc="ddea04ce" sha1="b0cc2b6c1e9b184c1108436b8a12ca4db96a6a8e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser609">
- <description>Electron User Vol.6-9</description>
- <year>1989</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="23858">
- <rom name="eu6-9_e.uef" size="23858" crc="ebdc111b" sha1="7647ed7746c9d654d501db4d0228d3e49525361f" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser610">
- <description>Electron User Vol.6-10</description>
- <year>1989</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="17916">
- <rom name="eu6-10_e.uef" size="17916" crc="7e0f543d" sha1="2c2cce4810228c66f4bf320661c473fef6a2edf9" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser611">
- <description>Electron User Vol.6-11</description>
- <year>1989</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="17287">
- <rom name="eu6-11_e.uef" size="17287" crc="8346b588" sha1="4a919f960b6cb9ce04053c1c4a60265ca0e5a7b1" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser612">
- <description>Electron User Vol.6-12</description>
- <year>1989</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="19444">
- <rom name="eu6-12_e.uef" size="19444" crc="1d29a910" sha1="1a7d78e967600fa0ec2e744a306fcb1a435c7244" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser701">
- <description>Electron User Vol.7-1</description>
- <year>1989</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="21433">
- <rom name="eu7-1_e.uef" size="21433" crc="e0b17aca" sha1="832c08467187a61931e44e9e6a7f524cb1384d71" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser702">
- <description>Electron User Vol.7-2</description>
- <year>1989</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="23884">
- <rom name="eu7-2_e.uef" size="23884" crc="31b8f957" sha1="91c3300298add49ddc2f56e3ab93226cdc8cbe54" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser703">
- <description>Electron User Vol.7-3</description>
- <year>1989</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="18717">
- <rom name="eu7-3_e.uef" size="18717" crc="b3378f25" sha1="a8493a3cdfd54989d1d6e7a6e07cb9bdce7e04fb" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser704">
- <description>Electron User Vol.7-4</description>
- <year>1990</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="16769">
- <rom name="eu7-4_e.uef" size="16769" crc="3b251b5f" sha1="015cb29863dd83594fe6c30818d385ad7b61e0df" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser705">
- <description>Electron User Vol.7-5</description>
- <year>1990</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="16813">
- <rom name="eu7-5_e.uef" size="16813" crc="05498408" sha1="3123eab74d47cf34d80d36ff873165b03f5dce8f" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser706">
- <description>Electron User Vol.7-6</description>
- <year>1990</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="23284">
- <rom name="eu7-6_e.uef" size="23284" crc="fe00d4e2" sha1="9ee6f76d4a1ab893bb1d9ee7b0c46f64cee92d04" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser707">
- <description>Electron User Vol.7-7</description>
- <year>1990</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="17076">
- <rom name="eu7-7_e.uef" size="17076" crc="d3d61c81" sha1="b7f8bb0980ff011bbe92d10ac67810f2d88891d7" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser708">
- <description>Electron User Vol.7-8</description>
- <year>1990</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="17596">
- <rom name="eu7-8_e.uef" size="17596" crc="a6f27613" sha1="8525d3487bea6e89b95efa8103218edddc764df8" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser709">
- <description>Electron User Vol.7-9</description>
- <year>1990</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7733">
- <rom name="eu7-9_e.uef" size="7733" crc="3b97a9b7" sha1="3f483aa48cc2bcecb25b94be5922623b736468c3" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="euser710">
- <description>Electron User Vol.7-10</description>
- <year>1990</year>
- <publisher>Electron User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="28506">
- <rom name="eu7-10_e.uef" size="28506" crc="406f741d" sha1="40466e277428d1bafbab1a99a85bc910e675b0db" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="elite">
- <description>Elite</description>
- <year>1984</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="SLG38" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="24486">
- <rom name="elite_e.uef" size="24486" crc="b4552c81" sha1="6af8263b24b759d8d6f7d4f79717cb018a655aa5" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="elites" cloneof="elite">
- <description>Elite (Superior Software)</description>
- <year>198?</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="24515">
- <rom name="elite-srr_e.uef" size="24515" crc="daa78649" sha1="ae2e718087151fbd56275c8bf1611adaf03d8a6c" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="elixir">
- <description>Elixir</description>
- <year>1987</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="20934">
- <rom name="elixir_e.uef" size="20934" crc="050074c6" sha1="b5d1e63b873766b1808dd616657a63b474d0dcff" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="empire">
- <description>Empire</description>
- <year>1985</year>
- <publisher>Shards Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7886">
- <rom name="empire_be.uef" size="7886" crc="ed04cf14" sha1="16840742a068bbfce34f166b13bae83041a35132" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="enigma">
- <description>Enigma</description>
- <year>1983</year>
- <publisher>Brainbox</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6227">
- <rom name="enigma_e.uef" size="6227" crc="7f96928a" sha1="3d6bd4f8edce86b9eabcda1acb6d8b984e173ae9" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="erbert">
- <description>Er*Bert</description>
- <year>1984</year>
- <publisher>Microbyte</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7842">
- <rom name="erbert_e.uef" size="7842" crc="14d5a9db" sha1="c70e796d59f618cc278475fe3771aa968e34bcab" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="embalpha">
- <description>Escape from Moonbase Alpha</description>
- <year>1983</year>
- <publisher>Micro Power</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6239">
- <rom name="escapefrommoonbasealpha_e.uef" size="6239" crc="a124ab73" sha1="1e59506f87b68ff91be641e2b4592632f5d62145" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="escapep7">
- <description>Escape from Pulsar Seven</description>
- <year>198?</year>
- <publisher>Adventure International</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11854">
- <rom name="mystadv5-escapefrompulsar7_e.uef" size="11854" crc="77bfd2d0" sha1="e11361bde1bcde8978b18a8e11d94e2ac3e5379d" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="etype">
- <description>E-Type</description>
- <year>1990</year>
- <publisher>4th Dimension</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="25578">
- <rom name="etype_e.uef" size="25578" crc="d7b70e9d" sha1="21dba7718c5800f8b60790cba14d4ac638a8b100" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="eurknowl">
- <description>European Knowledge</description>
- <year>198?</year>
- <publisher>Micro Power</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11251">
- <rom name="europeanknowledge_e.uef" size="11251" crc="c56f1a2f" sha1="32a28203ccfdf53b37e16951e300de231fb290f1" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="evenstar">
- <description>Evening Star</description>
- <year>1987</year>
- <publisher>Hewson Consultants</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="16345">
- <rom name="eveningstar_e.uef" size="16345" crc="bfe66960" sha1="7337a96ffd94835d4bcc7f028a328d9080c4e2cb" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="exile">
- <description>Exile</description>
- <year>1988</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="50599">
- <rom name="exile_e.uef" size="50599" crc="c67c1df2" sha1="f261a37bf31a353d2ff103840d7f18d5578e5923" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="expladv">
- <description>Exploring Adventures</description>
- <year>1984</year>
- <publisher>Duckworth</publisher>
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Castlemaze Adventure"/>
- <dataarea name="cass" size="7690">
- <rom name="expladv-castlemazeadventure_e.uef" size="7690" crc="dd5c3084" sha1="bb596536be9b348f0bf48e40c6fe51131a0425fc" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Tunnel Adventure"/>
- <dataarea name="cass" size="7961">
- <rom name="expladv-tunneladventure_e.uef" size="7961" crc="0b5fc247" sha1="df3d055311aea897263d8d661461a62d249c35eb" offset="0"/>
- </dataarea>
- </part>
- <part name="cass3" interface="electron_cass">
- <feature name="part_id" value="Underground Adventure"/>
- <dataarea name="cass" size="7414">
- <rom name="expladv-undegroundadventure_e.uef" size="7414" crc="faf80534" sha1="3193e6aeccb8e5901e52d64324700adc981be938" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="ffjungen">
- <description>Factfile 500 - Junior General Knowledge</description>
- <year>1985</year>
- <publisher>Kosmos</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="25992">
- <rom name="factfile500-juniorgeneralknowledge_be.uef" size="25992" crc="a5edf090" sha1="01e27f9d9c2e7f99fb4b3e906b53f71e8b0f5390" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="ffsengen">
- <description>Factfile 500 - Senior General Knowledge</description>
- <year>1985</year>
- <publisher>Kosmos</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="29897">
- <rom name="factfile500-seniorgeneralknowledge_be.uef" size="29897" crc="886c83fc" sha1="5c973c02de2e9898a4548eaf90b33dcfa3991578" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="ffssport">
- <description>Factfile 500 - Super Sports</description>
- <year>1985</year>
- <publisher>Kosmos</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="28369">
- <rom name="factfile500-supersports_be.uef" size="28369" crc="f6e390b5" sha1="586da7830c814185297954500ecb87a306c6f83b" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="fantdiam">
- <description>Fantasia Diamond</description>
- <year>1984</year>
- <publisher>Hewson Consultants</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="14023">
- <rom name="fantasiadiamond_be.uef" size="14023" crc="05abfffb" sha1="b71f2539c76be388560585ccca602b36d0b0d831" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="feasexpt">
- <description>Feasibility Experiment</description>
- <year>198?</year>
- <publisher>Adventure International</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="12102">
- <rom name="mystadv6-circus_e.uef" size="12102" crc="4a558738" sha1="cf7264efba98d4d75f94147faf4b873313b407a4" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="farmgirl">
- <description>Felicity Farm Girl</description>
- <year>1984</year>
- <publisher>Gemini</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="5065">
- <rom name="t-feli.uef" size="5065" crc="cec38a26" sha1="60bff9c5cbe8a5c4398ffa2b11b7a842c89cabb8" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="felixmon">
- <description>Felix and the Fruit Monsters</description>
- <year>1983</year>
- <publisher>Micro Power</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7240">
- <rom name="felixandthefruitmonsters_e.uef" size="7240" crc="ca2d61e1" sha1="225dc191efb7ea202ab1375ac52bce11c2eb62af" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="felixfac">
- <description>Felix in the Factory</description>
- <year>1983</year>
- <publisher>Micro Power</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7984">
- <rom name="felixinthefactory_e.uef" size="7984" crc="389405a2" sha1="d4b02c2e563b7b8cf4cf17d951fac7aa92eef720" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="felixwee">
- <description>Felix Meets the Evil Weevils</description>
- <year>1984</year>
- <publisher>Micro Power</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11153">
- <rom name="felixmeetstheevilweevils_e.uef" size="11153" crc="ad658ae2" sha1="9f897e150db556abea8e1d91d0c854c44e3884f1" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="fighterp">
- <description>Fighter Pilot</description>
- <year>1984</year>
- <publisher>Kansas</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="3866">
- <rom name="fighterpilot_e.uef" size="3866" crc="55f85a37" sha1="26134f4f53e16c4b1380694c8e5137359ae46443" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="finestfa">
- <description>Finest Favourites</description>
- <year>198?</year>
- <publisher>Acorn User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="26998">
- <rom name="finestfavourites_e.uef" size="26998" crc="791bee2f" sha1="175600476e07ea5132371e833936536a4074ed70" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="fireisla">
- <description>Fire Island</description>
- <year>1984</year>
- <publisher>Hollsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10298">
- <rom name="fireisland_e.uef" size="10298" crc="7875509b" sha1="6f9ba787788f55ba793d645f6d2aee2c3a3597cf" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="firebug">
- <description>Firebug</description>
- <year>1984</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="SLG??" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10091">
- <rom name="firebug_e.uef" size="10091" crc="d483899a" sha1="56419688be06edd504be7fec750de738b9dd54b7" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="firetrak">
- <description>Fire Track</description>
- <year>198?</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="19805">
- <rom name="firetrack_e.uef" size="19805" crc="b74d3f60" sha1="5995f766121b7442e6b158e5a979b78c07ac619e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="firienwo">
- <description>Firien Wood</description>
- <year>1983</year>
- <publisher>MP Software</publisher>
- <info name="usage" value="Load with *RUN" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="17419">
- <rom name="firienwood_run_e.uef" size="17419" crc="1a3332a8" sha1="7ff09c82a6d1d83584248fca9f9511fe119f2904" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="fbjoyutl">
- <description>First Byte Joystick Utility</description>
- <year>198?</year>
- <publisher>First Byte</publisher>
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Games"/>
- <dataarea name="cass" size="3982">
- <rom name="fbjoy-1games_e.uef" size="3982" crc="7ebb3341" sha1="68fa196c997a92fe119c2e582beea47da9f3ea81" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Setup"/>
- <dataarea name="cass" size="3103">
- <rom name="fbjoy-2setup_e.uef" size="3103" crc="a14bbd09" sha1="6b8567d417024314577eba52d0ab5f710c2f6f6e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="fmchess">
- <description>First Moves Chess</description>
- <year>1985</year>
- <publisher>Longman</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="14409">
- <rom name="firstmoveschess_be.uef" size="14409" crc="5bc94acc" sha1="4c0b105738ac00b7f373b8d5cf014d82e32c73ff" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="mrmenfir">
- <description>First Steps with the Mr.Men</description>
- <year>1983</year>
- <publisher>Mirrorsoft</publisher>
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Mr.Greedy's Ice Cream Hunt"/>
- <dataarea name="cass" size="4412">
- <rom name="fswtmm-a1-mrgreedysicecreamhunt_e.uef" size="4412" crc="6961c3e3" sha1="f2ce67d234c601ed1b610c7a417f7ac249a10def" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Mr.Silly's Hat Games"/>
- <dataarea name="cass" size="4326">
- <rom name="fswtmm-a2-mrsillyshatgames_e.uef" size="4326" crc="d5ca3c09" sha1="896c8023e2096153d3c52ed9c25b27ef20cd03ae" offset="0"/>
- </dataarea>
- </part>
- <part name="cass3" interface="electron_cass">
- <feature name="part_id" value="Mr.Forgetful's Wardrobe Game"/>
- <dataarea name="cass" size="4998">
- <rom name="fswtmm-b1-mrforgetfulswardrobegame_e.uef" size="4998" crc="11076d84" sha1="c0dfa7dbf362a10665b2afda25eac0dd5df7bf58" offset="0"/>
- </dataarea>
- </part>
- <part name="cass4" interface="electron_cass">
- <feature name="part_id" value="Mr.Forgetful's Letter Game"/>
- <dataarea name="cass" size="5325">
- <rom name="fswtmm-b2-mrforgetfulslettergame_e.uef" size="5325" crc="1e8e5891" sha1="84d1cd00358a23cbfe1c27699923943d6f834be8" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="fpath737">
- <description>Flight Path 737</description>
- <year>198?</year>
- <publisher>Midas</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="12000">
- <rom name="flightpath737_e.uef" size="12000" crc="49ad1a42" sha1="efec80e3107cd1de38b558df3ccd81c8007a1f5f" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="fss3">
- <description>FSS3 - Flint Strikes Back</description>
- <year>1983</year>
- <publisher>Potter</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7821">
- <rom name="fss3-flintstrikesback_be.uef" size="7821" crc="4f648c4d" sha1="f35d01cd0da0763a2f4b678898c361900ba1a201" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="footbman">
- <description>Football Manager</description>
- <year>1984</year>
- <publisher>Addictive</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11842">
- <rom name="footballmanager_e.uef" size="11842" crc="e0bcc03a" sha1="5158d883226a417319277fe83f4fb66f8a62c5bd" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="footbyea">
- <description>Footballer of the Year</description>
- <year>198?</year>
- <publisher>Gremlin</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="17729">
- <rom name="footballeroftheyear_e.uef" size="17729" crc="ef448749" sha1="e031093ca6a046dc0af218fbdc674f3c3c9c3d07" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="footbyeak" cloneof="footbyea">
- <description>Footballer of the Year (Kixx)</description>
- <year>198?</year>
- <publisher>Kixx</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="17729">
- <rom name="footballeroftheyear_e.uef" size="17729" crc="ef448749" sha1="e031093ca6a046dc0af218fbdc674f3c3c9c3d07" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="frenchru">
- <description>French On The Run</description>
- <year>198?</year>
- <publisher>Database</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="54382">
- <rom name="frenchontherun_e.uef" size="54382" crc="00576757" sha1="5b7790b17623159f96f3a3d457521b5ebaab94b5" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="forthg">
- <description>FORTH (Ger)</description>
- <year>1983</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="GLL01" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="17704">
- <rom name="forth-german_e.uef" size="17704" crc="a86e46bd" sha1="d210ebdaa4c1ab1e4afbfc388430eaea2f31c91b" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="forth">
- <description>FORTH</description>
- <year>1983</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="SLL01" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="17677">
- <rom name="forth_e.uef" size="17677" crc="e34b79a8" sha1="296690ee06d80ebbca0bd8fcf16214b67cee2424" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="frak">
- <description>Frak!</description>
- <year>1984</year>
- <publisher>Aardvark</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="24221">
- <rom name="frakv11_e.uef" size="24221" crc="f1330371" sha1="7d8c89dcd98bc0a74ea72b479ee1da0ea4de5595" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="fraka" cloneof="frak">
- <description>Frak! (Alternative)</description>
- <year>198?</year>
- <publisher>Alternative</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="24221">
- <rom name="frakv11_e.uef" size="24221" crc="f1330371" sha1="7d8c89dcd98bc0a74ea72b479ee1da0ea4de5595" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="frakpias" cloneof="frak">
- <description>Frak! (Play It Again Sam 4)</description>
- <year>1988</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="24923">
- <rom name="frakv2-piasrr_e.uef" size="24923" crc="443256ca" sha1="5cdf9969a764b4e86caeab103ef879e65e671055" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="frnk2000atrr" cloneof="frnk2000">
- <description>Frankenstein 2000 (Atlantis)</description>
- <year>198?</year>
- <publisher>Atlantis</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11973">
- <rom name="frankenstein2000_e.uef" size="11973" crc="769a3084" sha1="7bcb667bdc782a4b15cb89a1005b91ba4b77cf2c" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="frnk2000">
- <description>Frankenstein 2000</description>
- <year>1985</year>
- <publisher>Icon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11973">
- <rom name="frankenstein2000_e.uef" size="11973" crc="769a3084" sha1="7bcb667bdc782a4b15cb89a1005b91ba4b77cf2c" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="frnk2000au">
- <description>Frankenstein 2000 (Audiogenic)</description>
- <year>198?</year>
- <publisher>Audiogenic</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11973">
- <rom name="frankenstein2000_e.uef" size="11973" crc="769a3084" sha1="7bcb667bdc782a4b15cb89a1005b91ba4b77cf2c" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="freefall">
- <description>Free Fall</description>
- <year>1983</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="SLG28" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="14563">
- <rom name="freefall_e.uef" size="14563" crc="0cd0301f" sha1="f665f593aae7347fc2ddc50e5175411c96ac70b7" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="freefallg" cloneof="freefall">
- <description>Freier Fall (Ger)</description>
- <year>1983</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="GLG22" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="14454">
- <rom name="freefall-german_e.uef" size="14454" crc="0206f8b1" sha1="b3e4e95fb5b89036ab4e7c4cf6e8719c1ae57c34" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="frenchrus" cloneof="frenchru">
- <description>French on the Run (Swift)</description>
- <year>198?</year>
- <publisher>Swift</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="54434">
- <rom name="frenchontherun-srr_e.uef" size="54434" crc="eb28b7f1" sha1="236a5f45c26d8e29ca236d6b2c025d12c2e7ea77" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="frenzy">
- <description>Frenzy</description>
- <year>1983</year>
- <publisher>Micro Power</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8754">
- <rom name="frenzy_e.uef" size="8754" crc="1cdf4de0" sha1="3bfd09de8eb677da12d30b0ea379b8abe7a30374" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="frootrai">
- <description>Froot Raid</description>
- <year>1987</year>
- <publisher>Audiogenic</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8450">
- <rom name="frootraid_e.uef" size="8450" crc="1d68adf8" sha1="fe63309620b712fb37281b9436f0e9b161b42a66" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="fruitcat">
- <description>Fruit Catcher</description>
- <year>198?</year>
- <publisher>Live Wire</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9366">
- <rom name="fruitcatcher_be.uef" size="9366" crc="f3d7a43b" sha1="c6c6057ffed14fd2c1de3a9f534fbc33455292d7" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="fruitmd">
- <description>Fruit Machine</description>
- <year>1984</year>
- <publisher>Doctor Soft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9426">
- <rom name="fruitmachine-doctorsoft_e.uef" size="9426" crc="2d7110fd" sha1="9e5c9b36c003d373c96de3243481a01b24713683" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="fruitms">
- <description>Fruit Machine (Superior Software)</description>
- <year>1983</year>
- <publisher>Superior Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="5154">
- <rom name="fruitmachine-superior_e.uef" size="5154" crc="ffd61e29" sha1="a807626ad18683b598f7ce163f2f02686b0fa225" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="fruitmac">
- <description>Fruit Machine (Alligata)</description>
- <year>1983</year>
- <publisher>Alligata</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="4594">
- <rom name="fruitmachine-alligata_e.uef" size="4594" crc="4754cf44" sha1="968f49b04beed1a0f8d3d817efaae69248617828" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="fruitsim">
- <description>Fruit Machine Simulator</description>
- <year>198?</year>
- <publisher>Codemasters</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10917">
- <rom name="fruitmachinesimulator_e.uef" size="10917" crc="57049296" sha1="67e03cfdf480705576176ad79818fc3f8329f1cb" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="fs2-68">
- <description>Fun School 2 (For 6-8 year olds)</description>
- <year>1989</year>
- <publisher>Database Educational Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="23020">
- <rom name="funschool2-6to8_be.uef" size="23020" crc="e4a90cf1" sha1="e5c219e2df219baae6adb56b1294837fbbff598f" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="fs2-ov8">
- <description>Fun School 2 (For the Over-8s)</description>
- <year>1989</year>
- <publisher>Database Educational Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="25666">
- <rom name="funschool2-over8_be.uef" size="25666" crc="3b0179fa" sha1="7f68ae668e2771116fac37bf57c8448195a6e79d" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="fs2-un6">
- <description>Fun School 2 (For Under 6s)</description>
- <year>1989</year>
- <publisher>Database Educational Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="19488">
- <rom name="funschool2-under6_be.uef" size="19488" crc="5b96b37a" sha1="5da6422a91a4016f6eea1bd0ee81673e4290f00e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="funumber">
- <description>Fun With Numbers</description>
- <year>1984</year>
- <publisher>Golem</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10065">
- <rom name="funwithnumbers_be.uef" size="10065" crc="972d444c" sha1="8cb66a645655cff1b16ec5b0d7ba4290013476f8" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="futuresh">
- <description>Future Shock</description>
- <year>1986</year>
- <publisher>Tynesoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="22428">
- <rom name="futureshock_e.hq.uef" size="22428" crc="a6bde267" sha1="700cf9e0cc9253e10b69c136210a645b64e434ac" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="galcmder">
- <description>Galactic Commander</description>
- <year>1983</year>
- <publisher>Micro Power</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8704">
- <rom name="galacticcommander_e.uef" size="8704" crc="e0eed8be" sha1="7d7bc66e4836aab72f12e32e3480aa2025597d98" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="galpatro">
- <description>Galactic Patrol</description>
- <year>1984</year>
- <publisher>Mastertronic</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8094">
- <rom name="galacticpatrol_e.uef" size="8094" crc="a8717a13" sha1="54b60983e262d428dcf6de74da0c6360a31174f3" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="galadrie">
- <description>Galadriel in Distress</description>
- <year>1984</year>
- <publisher>Potter</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7558">
- <rom name="galadrielindistress_be.uef" size="7558" crc="bcdb4599" sha1="527b957bec5b23535fb6cf975e9858ee0e23a4ee" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="galaforc">
- <description>Galaforce</description>
- <year>1986</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="16514">
- <rom name="galaforce_e.uef" size="16514" crc="f0a07948" sha1="f1832c770f41b5913f7d045470de2002e1d9ce27" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="galafor2">
- <description>Galaforce 2</description>
- <year>1988</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="22892">
- <rom name="galaforce2_e.uef" size="22892" crc="89cdeaab" sha1="ae6f487a78b4614eca089d805494a6e462930d28" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="galilee">
- <description>Galilee</description>
- <year>1985</year>
- <publisher>Shards Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="19971">
- <rom name="galilee_be.uef" size="19971" crc="d1649b13" sha1="06e8d9c1ac749cc6313eaec078ba135158bed16d" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="augamesc">
- <description>Acorn User Games Compendium</description>
- <year>198?</year>
- <publisher>Acorn User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="36381">
- <rom name="acornusergamescompendium_e.uef" size="36381" crc="9d5405ee" sha1="b67952043de3196a8e0a1de58186b40c7486256d" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="gatecras">
- <description>Gatecrasher</description>
- <year>198?</year>
- <publisher>Quicksilva</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7724">
- <rom name="gatecrasher_e.uef" size="7724" crc="ce7e9d08" sha1="a9c1bf184298debaf73e53e91c324d7a141427ba" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="gauntlet">
- <description>Gauntlet</description>
- <year>198?</year>
- <publisher>Micro Power</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="14885">
- <rom name="gauntlet_e.uef" size="14885" crc="d651966b" sha1="d55f4864cd31f4487e414cd6f689a982425b5133" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="ghostown">
- <description>Ghost Town</description>
- <year>198?</year>
- <publisher>Adventure International</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10213">
- <rom name="adv9-ghosttown_e.uef" size="10213" crc="479bc6e5" sha1="b95d78c3b3bd1fde0bbd47bc39f8939be76108c1" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="ghouls">
- <description>Ghouls</description>
- <year>1984</year>
- <publisher>Micro Power</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="12609">
- <rom name="ghouls_e.uef" size="12609" crc="03e2ff11" sha1="ed5f8cda33ec14a87e6760da539c7d148588d11f" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="ghoulspias" cloneof="ghouls">
- <description>Ghouls (Play It Again Sam 7)</description>
- <year>1989</year>
- <publisher>Superior Software/Blue Ribbon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="17768">
- <rom name="ghouls-piasrr_e.uef" size="17768" crc="01a8717a" sha1="2e1f92aabb39d941d2a465691d7a0710fad0d1f7" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="gisburne">
- <description>Gisburne's Castle</description>
- <year>1985</year>
- <publisher>Martech</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="14067">
- <rom name="gisburnescastle_e.uef" size="14067" crc="6452a180" sha1="730c73e856d4f58fa3d15454b53c2122973a6082" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="go">
- <description>Go</description>
- <year>1984</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="SLG42" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="13084">
- <rom name="go_e.uef" size="13084" crc="c9d1f67a" sha1="aad78888f145d53d4dcda8ff3f4affe41b7a26bb" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="goal">
- <description>Goal!</description>
- <year>1986</year>
- <publisher>Tynesoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10601">
- <rom name="goal_e.uef" size="10601" crc="0a56d27f" sha1="d148088b854bcecc96a71eb2520b12d4fbc3354a" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="goldenv">
- <description>Golden Voyage</description>
- <year>198?</year>
- <publisher>Adventure International</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11452">
- <rom name="adv12-goldenvoyage_e.uef" size="11452" crc="d78f7db2" sha1="5f789c1388ac5b70010bf9af87434c61943d6b69" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="golfbr">
- <description>Golf (Blue Ribbon)</description>
- <year>198?</year>
- <publisher>Blue Ribbon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7097">
- <rom name="golf-blueribbon_e.uef" size="7097" crc="3bb5a432" sha1="54897a294b5d975691abc39ad253823adf26f3e6" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="golfys">
- <description>Golf (Yes Software)</description>
- <year>1986</year>
- <publisher>Yes Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="4664">
- <rom name="golf-yessoftware_be.uef" size="4664" crc="4ec31ff5" sha1="973afe143cb87f2859a45be4a5a56e69d9ee5ac3" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="gorph">
- <description>Gorph</description>
- <year>1984</year>
- <publisher>Doctor Soft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8519">
- <rom name="gorph_e.uef" size="8519" crc="b26afe18" sha1="818d496e36993e6a0cbb20e9762c1533ccdb0f8a" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="ggoochcra" cloneof="ggoochcr">
- <description>Graham Gooch's Test Cricket (Alternative)</description>
- <year>198?</year>
- <publisher>Alternative</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="18383">
- <rom name="grahamgoochmatchcricket-arr_e.uef" size="18383" crc="11762a0b" sha1="24feb73957b628c2617e792e7eca19cc45706a19" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="ggoochcr">
- <description>Graham Gooch's Test Cricket</description>
- <year>1985</year>
- <publisher>Audiogenic</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="15717">
- <rom name="grahamgooch_e.uef" size="15717" crc="b1d0bba8" sha1="248d4653e7c26e48a5e33ce1a5f98f443d310fbc" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="augraphi">
- <description>Acorn User Graphics</description>
- <year>1985</year>
- <publisher>Acorn User</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="22647">
- <rom name="acornusergraphics_e.uef" size="22647" crc="ef182dc2" sha1="58b67cf7c70e4eb5a12d4317ece1d916b3045d55" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="graphito">
- <description>Graphito</description>
- <year>1984</year>
- <publisher>Addison-Wesley</publisher>
- <part name="cass" interface="electron_cass">
- <feature name="part_id" value="Side One"/>
- <dataarea name="cass" size="22943">
- <rom name="graphitosideone_be.uef" size="22943" crc="8dc66cc7" sha1="b9de070e071fe222491cb3eabf0db76c03bd600e" offset="0"/>
- </dataarea>
- </part>
- <part name="cass" interface="electron_cass">
- <feature name="part_id" value="Side Two"/>
- <dataarea name="cass" size="24492">
- <rom name="graphitosidetwo_be.uef" size="24492" crc="5116e227" sha1="2ecfee4a61320800087f02f278fff63b45826b6a" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="gremlins">
- <description>Gremlins</description>
- <year>198?</year>
- <publisher>Adventure International</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9959">
- <rom name="gremlins_e.uef" size="9959" crc="8d05722c" sha1="2ba325c0a332493f3301d444060f4c6bec2b357e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="gridiron">
- <description>Grid Iron</description>
- <year>1988</year>
- <publisher>Top Ten</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7803">
- <rom name="gridiron_be.uef" size="7803" crc="28567486" sha1="aef086d4b2fb114dd17f43596d7a02a5a3c4118e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="gridirn2">
- <description>Grid Iron 2</description>
- <year>1991</year>
- <publisher>Alternative</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11437">
- <rom name="gridiron2_be.uef" size="11437" crc="dabeea7f" sha1="ee92a4eff2e97e4a73f5616050a1db84599bff22" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="guardian">
- <description>Guardian</description>
- <year>198?</year>
- <publisher>Alligata</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8304">
- <rom name="guardian_e.uef" size="8304" crc="405195c2" sha1="9259f4dfa9cde9775d3be88e4afde83b3e2b7ad8" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="guardianpias" cloneof="guardian">
- <description>Guardian (Play It Again Sam 4)</description>
- <year>1988</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="13794">
- <rom name="guardian-piasrr_e.uef" size="13794" crc="32cffa12" sha1="c59e1a8fc58a77d062bfa9f0b7a936676c85c2b1" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="gunfight">
- <description>Gunfighter</description>
- <year>198?</year>
- <publisher>Atlantis</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="14858">
- <rom name="gunfighter_be.uef" size="14858" crc="f7c32692" sha1="79f0c00f8c5edcd32309662e964cc54edb4e6a6d" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="gunsmoke">
- <description>Gunsmoke</description>
- <year>1983</year>
- <publisher>Software Invasion</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7969">
- <rom name="gunsmoke_e.uef" size="7969" crc="43078542" sha1="a0163f9d85e0ec7f9a106eb7408988d96498c567" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="gyroscop">
- <description>Gyroscope</description>
- <year>198?</year>
- <publisher>Melbourne House</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="13044">
- <rom name="gyroscope_e.uef" size="13044" crc="6b798c8a" sha1="43712fce9dd9afeb38d263dc0bef8dd266a09e23" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="hampstea">
- <description>Hampstead</description>
- <year>1984</year>
- <publisher>Melbourne House</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="18337">
- <rom name="hampstead_be.uef" size="18337" crc="336d96d2" sha1="71aa2ee910251b5d9839b2f0a6094efde2b5340b" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="hardhath">
- <description>Hard Hat Harry</description>
- <year>2011</year>
- <publisher>Retro Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7043">
- <rom name="t-hard.uef" size="7043" crc="78bc66db" sha1="b744b0b47f001054f406e11ca1170e04e6470da3" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="hareraisp">
- <description>Hareraiser (Prelude)</description>
- <year>198?</year>
- <publisher>Haresoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6455">
- <rom name="hareraiserpartone_e.uef" size="6455" crc="3f0c8aeb" sha1="ed1c6f9ab151139aabf927f380060845277d4a0b" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="harleq">
- <description>Harlequin</description>
- <year>1984</year>
- <publisher>Kansas</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10106">
- <rom name="harlequin_b.uef" size="10106" crc="86515ca0" sha1="8818e12fcd96ab25dd3173183c0f4f9f75212718" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="haushalt">
- <description>Haushaltbudget (Ger)</description>
- <year>1983</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="GLB05" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9990">
- <rom name="personalmoneymanagement-german_e.uef" size="9990" crc="7c883803" sha1="8d8e1af227a4728f54647cbb7dadaaddf5546c1a" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="heathrow">
- <description>Heathrow ATC</description>
- <year>1984</year>
- <publisher>Hewson Consultants</publisher>
- <info name="usage" value="Load with *RUN" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6535">
- <rom name="heathrowatc_run_e.uef" size="6535" crc="1dd5a364" sha1="4d04298d423cc6b186eb63bffe56b21cae1d5e91" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="hellhole">
- <description>Hell Hole</description>
- <year>198?</year>
- <publisher>Alligata</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7777">
- <rom name="hellhole_e.uef" size="7777" crc="0cd9d58e" sha1="5202c6c70301b38703becc27fcb807c0c7366cdd" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="heltersk">
- <description>Helter Skelter</description>
- <year>1990</year>
- <publisher>Audiogenic</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="20508">
- <rom name="helterskelter_e.uef" size="20508" crc="6b749c1d" sha1="01eda75dcebccd23b8fe53df1b85c18cebdc9ba4" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="hercules">
- <description>Hercules</description>
- <year>198?</year>
- <publisher>Power House</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6500">
- <rom name="hercules_be.uef" size="6500" crc="412929cd" sha1="26a8508a498d497406c48550efb63528ffc8fb2c" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="mrmenher">
- <description>Mr Men: Here and There</description>
- <year>1985</year>
- <publisher>Mirrorsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="14708">
- <rom name="mrmen-hereandthere_be.uef" size="14708" crc="f858ccff" sha1="b0cc45aa86f9e4e0b4565c5516d86d6fe6c7fc66" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="hex">
- <description>Hex</description>
- <year>1988</year>
- <publisher>Larsoft</publisher>
- <info name="usage" value="Load with *RUN" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11052">
- <rom name="hex_run_be.uef" size="11052" crc="a33ae13d" sha1="74082078172915c34f79fb7d149ba572a033b6da" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="hiqquiz">
- <description>Hi-Q Quiz</description>
- <year>1989</year>
- <publisher>Blue Ribbon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8049">
- <rom name="hiqquiz_e.uef" size="8049" crc="02b0c777" sha1="4b92bda9f28cdf8a9df3d757b5497cd743ae97fe" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="histquiz">
- <description>History Quiz</description>
- <year>1983</year>
- <publisher>Acornsoft/Ivan Berg</publisher>
- <info name="release" value="XBX04" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="49953">
- <rom name="historyquiz_be.uef" size="49953" crc="749b31c3" sha1="b50d2993ea9394c3225c93297d6e794f92a2ba63" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="hobgobl">
- <description>Hobgoblin</description>
- <year>1989</year>
- <publisher>Atlantis</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11571">
- <rom name="hobgoblin_e.uef" size="11571" crc="abbebaf3" sha1="f84e26912d592b3a3dc4055f418fdead775f8d51" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="hobgobl2">
- <description>Hobgoblin 2</description>
- <year>1990</year>
- <publisher>Atlantis</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="15051">
- <rom name="hobgoblin2_e.uef" size="15051" crc="f9a7e527" sha1="c38ae54b00eb780ee038f8e8e59a2c1f35bac95d" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="holedout">
- <description>Holed Out</description>
- <year>1989</year>
- <publisher>4th Dimension</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="30357">
- <rom name="holedout_e.uef" size="30357" crc="08be05b8" sha1="0cf29f9892ae508b274a495c9983f7381e873014" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="holedoc1">
- <description>Holed Out Extra Courses Vol.1</description>
- <year>1990</year>
- <publisher>4th Dimension</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="35728">
- <rom name="holedoutextracoursesvol1_e.uef" size="35728" crc="55037948" sha1="3e9759c5fea700dccd07d7dfa04204fbb4aa0dbd" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="holedoc2">
- <description>Holed Out Extra Courses Vol.2</description>
- <year>1990</year>
- <publisher>4th Dimension</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="35726">
- <rom name="holedoutextracoursesvol2_e.uef" size="35726" crc="69d7be59" sha1="3c230cd27d0e2b6b94d4751dff46f2739fb85fc6" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="hopper">
- <description>Hopper</description>
- <year>1983</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="SLG23" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8360">
- <rom name="hopper_e.uef" size="8360" crc="aa8793db" sha1="9f18cd8c431090dad7d2a479ce6a954949efb9ae" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="hopperpias" cloneof="hopper">
- <description>Hopper (Play It Again Sam 6)</description>
- <year>1989</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11804">
- <rom name="hopper-piasrr_e.uef" size="11804" crc="a3e8dc48" sha1="652a55eec44233ef3025ac5af748aee196880498" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="horserac">
- <description>Horserace</description>
- <year>1983</year>
- <publisher>Dynabyte</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6922">
- <rom name="horserace_e.uef" size="6922" crc="05554865" sha1="d2d32efee1e4eabfc34e6dbacc69ce9a8134ef9c" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="hostages">
- <description>Hostages</description>
- <year>1990</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="35558">
- <rom name="hostages_e.uef" size="35558" crc="c38330b2" sha1="78e55ed607b5149186f1718efb96124e207f8eb2" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="hulka" cloneof="qphulk">
- <description>The Hulk</description>
- <year>1990</year>
- <publisher>Americana</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11347">
- <rom name="questprobethehulk_e.uef" size="11347" crc="84380b88" sha1="39e3818d131727e07a9f996e750b1b1edad8a6d0" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="qphulk">
- <description>Questprobe: The Hulk</description>
- <year>198?</year>
- <publisher>Adventure International</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11347">
- <rom name="questprobethehulk_e.uef" size="11347" crc="84380b88" sha1="39e3818d131727e07a9f996e750b1b1edad8a6d0" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="qpthing">
- <description>Questprobe: Human Torch and The Thing</description>
- <year>198?</year>
- <publisher>Adventure International</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="12031">
- <rom name="questprobehumantorchthething_e.uef" size="12031" crc="16224adf" sha1="fbdafc824016701ef662f4c331f63054765d0fae" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="hnchback">
- <description>Hunchback</description>
- <year>1983</year>
- <publisher>Ocean</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="5405">
- <rom name="hunchback-ocean_e.uef" size="5405" crc="67e23bf3" sha1="b69dc54cd8dc940c92e58edd9a8e318fa8f19993" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="hnchbackpias" cloneof="hnchback">
- <description>Hunchback (Play It Again Sam 6)</description>
- <year>198?</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10458">
- <rom name="hunchback-superiorpiasrr_e.uef" size="10458" crc="4919281d" sha1="d0abab908a26d5087292f1dfe1621c54f6ff8ce7" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="hunkdory">
- <description>Hunkidory</description>
- <year>1986</year>
- <publisher>Bug Byte</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="12720">
- <rom name="hunkidory_be.uef" size="12720" crc="99441907" sha1="38f1d5550739b1fa19917f5b306c6f5a8ee8af79" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="hypervpr">
- <description>Hyper Viper</description>
- <year>2011</year>
- <publisher>Retro Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6405">
- <rom name="t-hype.uef" size="6405" crc="2440a28e" sha1="499bb75aea398a7ebaaacb7664f531cd6125f958" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="hyprball">
- <description>Hyperball</description>
- <year>1990</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="25389">
- <rom name="hyperball_e.uef" size="25389" crc="7f352ea0" sha1="0ff3b564a69ee43a561e0c78ee4b33a2f6f80ee2" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="hyperdri">
- <description>Hyperdrive</description>
- <year>1983</year>
- <publisher>I.J.K.</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="3816">
- <rom name="hyperdrive_e.uef" size="3816" crc="7b8dcf8e" sha1="6a82327258b00274066d272495aad2ecee4dcc37" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="ianbotha">
- <description>Ian Botham's Test Match</description>
- <year>1986</year>
- <publisher>Tynesoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10860">
- <rom name="ianbothamstestmatch_e.uef" size="10860" crc="363dfe77" sha1="6342a959f287cfde5f5276a6c01a9733ec76f277" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="icarus">
- <description>Icarus</description>
- <year>1988</year>
- <publisher>Mandarin</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="25454">
- <rom name="icarus_e.uef" size="25454" crc="5057ba1f" sha1="7bce17b55306f191209a706fdcacbb86e07ba22a" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="icehocky">
- <description>Ice Hockey</description>
- <year>1986</year>
- <publisher>Bug Byte</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7056">
- <rom name="icehockey_be.uef" size="7056" crc="ce41bdee" sha1="9e70f094b749395e08e34477c9b5638c50b0d980" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="ideurope">
- <description>Identify Europe</description>
- <year>198?</year>
- <publisher>Kosmos</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11576">
- <rom name="identifyeurope_be.uef" size="11576" crc="d274b8df" sha1="bd8465fea4785d5250a96a4e95a407e8efc380ce" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="identiki">
- <description>Identikit</description>
- <year>1984</year>
- <publisher>Stell</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="5726">
- <rom name="identikit_be.uef" size="5726" crc="c3a01ad5" sha1="9a20789222750d4339eef8ca60ba453c9267111a" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="imv2tcop">
- <description>ImageV2 Tape Copier</description>
- <year>198?</year>
- <publisher>Peter Donn</publisher>
- <info name="usage" value="Load with *RUN" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="1308">
- <rom name="imagetapecopier_run_e.uef" size="1308" crc="bd4d5fa9" sha1="d9fd3e65168760fbb8c51ca93ff6ef19d0634a22" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="imogen">
- <description>Imogen</description>
- <year>1987</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="58595">
- <rom name="imogen_e.uef" size="58595" crc="a36e6d41" sha1="c80a4146bbb1f1f1b3a258a06241d5ad16431a9d" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="impact">
- <description>Impact</description>
- <year>1987</year>
- <publisher>Audiogenic</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="16191">
- <rom name="impact_e.uef" size="16191" crc="b40c4b45" sha1="958a428b252242ef9b08c223a3d4eb9cca2e3523" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="impmiss">
- <description>Impossible Mission</description>
- <year>1986</year>
- <publisher>U.S. Gold</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="22237">
- <rom name="impossiblemission_e.uef" size="22237" crc="5d2f524c" sha1="4e613c246c80a1f30a8d8719ad3211cf52614288" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="atahaulp">
- <description>In Search of Atahaulpa</description>
- <year>198?</year>
- <publisher>Lee</publisher>
- <part name="cass" interface="electron_cass">
- <feature name="part_id" value="Part 1"/>
- <dataarea name="cass" size="12851">
- <rom name="insearchofatahaulpa-pt1_be.uef" size="12851" crc="83783735" sha1="d3a1f6516a0a5be24825e7019f11d89b0c83d8f5" offset="0"/>
- </dataarea>
- </part>
- <part name="cass" interface="electron_cass">
- <feature name="part_id" value="Part 2"/>
- <dataarea name="cass" size="11759">
- <rom name="insearchofatahaulpa-pt2_be.uef" size="11759" crc="2474f012" sha1="f552732e68d4b8cb790ef9bffb71ec7654d401c0" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="indoorso">
- <description>Indoor Soccer</description>
- <year>1988</year>
- <publisher>Alternative</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="15358">
- <rom name="indoorsoccer_be.uef" size="15358" crc="6b9695d8" sha1="28fda895a1d093e03558ce64863e1b911185b9a7" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="indoorsp">
- <description>Indoor Sports</description>
- <year>1988</year>
- <publisher>Tynesoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="69725">
- <rom name="indoorsports_e.uef" size="69725" crc="f31b20e2" sha1="0dc77463f74429d70e9e229a51ae22a0ab700a5d" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="inertia">
- <description>Inertia</description>
- <year>1990</year>
- <publisher>4th Dimension</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="16381">
- <rom name="inertia_e.uef" size="16381" crc="b41d2c4f" sha1="a50ca5e986e267f5f1dc9df8f48361feddc88cc3" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="intergal">
- <description>Intergalactic Trader</description>
- <year>1983</year>
- <publisher>Micro Power</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8252">
- <rom name="intergalactictrader_e.uef" size="8252" crc="9e4de83a" sha1="5315448d479c92cfbb8e7d504a2fe23f521ae091" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="introcas">
- <description>Introductory Cassette</description>
- <year>1983</year>
- <publisher>Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="58802">
- <rom name="intro_e.uef" size="58802" crc="0ecf3d0f" sha1="3e6773570d60b9e465ea1bcb66b995e00ebcf116" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="inu">
- <description>Inu</description>
- <year>19??</year>
- <publisher>MRJ</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="3475">
- <rom name="inu_be.uef" size="3475" crc="e358fdbc" sha1="40264fc65bba2224ff2212f63451b1cf01406235" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="invaderi">
- <description>Invaders (I.J.K.)</description>
- <year>198?</year>
- <publisher>I.J.K.</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6530">
- <rom name="invaders-ijk_e.uef" size="6530" crc="8529a2e2" sha1="a542d971f0af52957e36655516a53b09184ae26a" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="invaders">
- <description>Invaders (Superior Software)</description>
- <year>1983</year>
- <publisher>Superior Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="4780">
- <rom name="invaders-superior_e.uef" size="4780" crc="69b8329c" sha1="22331a12deb89848cca63c964b58268b7ad17f5b" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="jackatta">
- <description>Jack Attack</description>
- <year>1986</year>
- <publisher>Bug Byte</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11782">
- <rom name="jackattack_e.uef" size="11782" crc="98bb7088" sha1="1ff9a557cbbf2d45b5d095c333c65715b9ffd47d" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="jetbootj">
- <description>Jet-Boot Jack</description>
- <year>1984</year>
- <publisher>English Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="12990">
- <rom name="jetbootjack_e.uef" size="12990" crc="65843cb8" sha1="bcea59e265190e64ad717468e0db48d887c2dce6" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="jetpjack">
- <description>Jet-Power Jack</description>
- <year>1984</year>
- <publisher>Micro Power</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8578">
- <rom name="jetpowerjack_e.uef" size="8578" crc="3159bda1" sha1="ddd9374f4ccb2f0ce907761742e1ac8aedb4461d" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="jetsetw">
- <description>Jet Set Willy</description>
- <year>1984</year>
- <publisher>Tynesoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="17235">
- <rom name="jetsetwilly_e.uef" size="17235" crc="39e4a800" sha1="11764a6cf14c646ad09fdc9df41587f4195d3818" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="jetsetw2">
- <description>Jet Set Willy II</description>
- <year>1985</year>
- <publisher>Tynesoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="17435">
- <rom name="jetsetwilly2_e.uef" size="17435" crc="a28512cb" sha1="9bff8d014caedfdc3d29dc407066a432f4dddaf5" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="joeblade">
- <description>Joe Blade</description>
- <year>1987</year>
- <publisher>Players</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="14773">
- <rom name="joeblade_e.uef" size="14773" crc="9f9063b8" sha1="3ea58a666ceb9f4ee193ca23ba43ceea15baae68" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="joeblad2">
- <description>Joe Blade II</description>
- <year>1988</year>
- <publisher>Players</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="16931">
- <rom name="joeblade2_e.uef" size="16931" crc="3231b11f" sha1="f79b72f7773c2c4c09c8b73f70108eaad12cf5c9" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="joey">
- <description>Joey</description>
- <year>1985</year>
- <publisher>Blue Ribbon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10068">
- <rom name="joey_e.uef" size="10068" crc="bb28a27d" sha1="44f48ec45ea2db1962f392c6e8fa89d63e0d38d8" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="johnyreb">
- <description>Johnny Reb</description>
- <year>1984</year>
- <publisher>Lothlorien</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8604">
- <rom name="johnnyreb_be.uef" size="8604" crc="203794a7" sha1="d58e4253d08b19cf080b642edd03cc5c1a4f9033" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="joyport">
- <description>Joyport</description>
- <year>1984</year>
- <publisher>Signpoint</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="784">
- <rom name="adval-switchedjoystickroutine_e.uef" size="784" crc="b0876ea4" sha1="a34ead57ae3ece65045906ef2aff6cb42b28f822" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="jugglepu">
- <description>Juggle Puzzle</description>
- <year>1984</year>
- <publisher>Acornsoft/ASK</publisher>
- <info name="release" value="XBE27" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8139">
- <rom name="jugglepuzzle_be.uef" size="8139" crc="1569b7c6" sha1="ad458c1d2a24879f61c1b4574c767c26a93fd08e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="jungleji">
- <description>Jungle Jive</description>
- <year>1984</year>
- <publisher>Virgin Games</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="4738">
- <rom name="junglejive_e.uef" size="4738" crc="d6b33eb1" sha1="db009e9bfab2cbe95a3c397b923892f477f38a1b" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="jnrmath">
- <description>Junior Maths Pack</description>
- <year>1983</year>
- <publisher>Micro Power</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7383">
- <rom name="juniormathspack_e.uef" size="7383" crc="6a81950f" sha1="c55c6ad162cea426c124fe506daaef65f5dc241e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="kamakazi">
- <description>Kamakazi</description>
- <year>1983</year>
- <publisher>A&amp;F Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="5843">
- <rom name="kamakazi_e.uef" size="5843" crc="9f3908f5" sha1="cc9f76e093692e9f6f782216885dd5bc55749775" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="kane">
- <description>Kane</description>
- <year>1986</year>
- <publisher>Mastertronic</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10525">
- <rom name="kane_be.uef" size="10525" crc="0513803f" sha1="71026356066afd4d8a954ef599e8b22c3eb0fee6" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="karatecs">
- <description>Karate Combat (The Superior Collection Vol.3)</description>
- <year>1987</year>
- <publisher>Superior Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="14565">
- <rom name="karatecombat-scrr_e.uef" size="14565" crc="94b2709a" sha1="9f1278ecfd59d06f065d7e351894503503c377f1" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="kastle">
- <description>Kastle</description>
- <year>198?</year>
- <publisher>Tynesoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="19262">
- <rom name="kastle_e.hq.uef" size="19262" crc="8735f931" sha1="d1e814336c58781fdf045fe76928141ea497c7d6" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="kayleth">
- <description>Kayleth</description>
- <year>1986</year>
- <publisher>U.S. Gold</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="17685">
- <rom name="kayleth_e.uef" size="17685" crc="75c793c6" sha1="8b8ec8b837306b4434d52d4d4fad9399371af8ad" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="killaped">
- <description>Killapede</description>
- <year>1986</year>
- <publisher>Players</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7792">
- <rom name="killapede_be.uef" size="7792" crc="d8a5cb96" sha1="3b693f3e8cace3a30f937736db3c931728ffffb7" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="killergo">
- <description>Killer Gorilla</description>
- <year>1984</year>
- <publisher>Micro Power</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8817">
- <rom name="killergorilla_e.uef" size="8817" crc="33fc46b7" sha1="f780db1555982c5e32f9bfcc9b9965de6c93c1ae" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="killerg2">
- <description>Killer Gorilla 2 (Play It Again Sam 3)</description>
- <year>1989</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="15106">
- <rom name="killergorilla2-pias_e.uef" size="15106" crc="c0881089" sha1="66c68b9fafa4413366477ecb96b7cbb59fc8ac65" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="killergopias" cloneof="killergo">
- <description>Killer Gorilla (Play It Again Sam 3)</description>
- <year>1989</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="14249">
- <rom name="killergorilla-piasrr_e.uef" size="14249" crc="eaa07d94" sha1="7a9e8fadcce1adc77c365c99676cfc6a9a177166" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="kissink">
- <description>Kissin' Kousins</description>
- <year>1985</year>
- <publisher>English Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11292">
- <rom name="kissincousins_e.uef" size="11292" crc="26aa6148" sha1="6e16dda67e7ab27e345fef4636bb889a58c37a36" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="knowpsiq">
- <description>Know Your Own Personality</description>
- <year>1984</year>
- <publisher>Mirrorsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="18158">
- <rom name="knowyourownpsi-q_be.uef" size="18158" crc="eccd0da5" sha1="59a8ff08fc0a3ed5d1aa3cd1b4474f3d0da2b117" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="kourtyd">
- <description>Kourtyard</description>
- <year>1988</year>
- <publisher>Godax</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="23707">
- <rom name="kourtyard_e.uef" size="23707" crc="29b62bba" sha1="7adcc9561e735a53059005d7be8aa72d926fb2c4" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="crgraphsg">
- <description>Kreative Graphiken (Ger)</description>
- <year>1983</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="GLX01" />
- <part name="cass" interface="electron_cass">
- <feature name="part_id" value="Side 1"/>
- <dataarea name="cass" size="3687">
- <rom name="creativegraphics-side1-german_e.uef" size="3687" crc="d684b248" sha1="84fcf16855813eec08c7c5b7290d2bbb247c93f8" offset="0"/>
- </dataarea>
- </part>
- <part name="cass" interface="electron_cass">
- <feature name="part_id" value="Side 2"/>
- <dataarea name="cass" size="7486">
- <rom name="creativegraphics-side2-german_e.uef" size="7486" crc="203b2441" sha1="cca3c0cccdf7940025301cb48e5bbd85027136f7" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="lsreflex">
- <description>Laser Reflex</description>
- <year>1984</year>
- <publisher>Talent</publisher>
- <info name="usage" value="Load with *RUN" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="12506">
- <rom name="lazerreflex_run_e.uef" size="12506" crc="b4804ada" sha1="ad662f9c47fa4181b6db38611a843b8afbdc5925" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="leaguech">
- <description>League Challenge</description>
- <year>1986</year>
- <publisher>Atlantis</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8706">
- <rom name="leaguechallenge_be.uef" size="8706" crc="156c9881" sha1="c28b55db37eb3514f220e9987a0197a825b39b62" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="lemmsynd">
- <description>Lemming Syndrome</description>
- <year>1983</year>
- <publisher>Dynabyte</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6388">
- <rom name="lemmingsyndrome_e.uef" size="6388" crc="380a2a8d" sha1="53030733c346efb309b105ca9ba2f98476d0b1aa" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="letscmp1">
- <description>Let's Compute Issue 1</description>
- <year>1990</year>
- <publisher>Let's Compute</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="40745">
- <rom name="letscompute1_be.uef" size="40745" crc="f2e9082c" sha1="df7722636cbef766d6941f22423598c7589d8826" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="lickill">
- <description>Licence to Kill</description>
- <year>1989</year>
- <publisher>Alternative</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9507">
- <rom name="licensetokill_e.uef" size="9507" crc="f5e7dace" sha1="b0fc1399157889e4e0e9d22e4b23f9b9a812222f" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="lispg" cloneof="lisp">
- <description>LISP (Ger)</description>
- <year>198?</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="GLL02" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="13387">
- <rom name="lisp-german_e.uef" size="13387" crc="28b793bb" sha1="2dc3ab7e6e885130fdb43dd27b7d365d92a476f9" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="lisp">
- <description>LISP</description>
- <year>198?</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="SLL02" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="13383">
- <rom name="lisp_e.uef" size="13383" crc="256694f4" sha1="0d54e32d9fa3930bce100f1a47ba3fadd65d01b5" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="lockluck">
- <description>Locks of Luck</description>
- <year>1986</year>
- <publisher>Magus</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="20342">
- <rom name="locksofluck_e.uef" size="20342" crc="23b2079f" sha1="2049afe1c027146f8384dc3ad289ebec79ed5f56" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="locomoti">
- <description>Locomotion</description>
- <year>1985</year>
- <publisher>BBC Soft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="14769">
- <rom name="locomotion_e.uef" size="14769" crc="de2507bb" sha1="e9feab9649b64bfcde253c90e2b8c1a67ba06545" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="honeylog">
- <description>Honey Logo</description>
- <year>1985</year>
- <publisher>Honeyfold</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9301">
- <rom name="honeylogo_be.uef" size="9301" crc="89897c5e" sha1="90b4cdb626712f58dda0846637535b5e28aff182" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="logo">
- <description>Logo (Extensions and Samples)</description>
- <year>1984</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="SBD21" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="43914">
- <rom name="logo-extensionsandexamples_e.uef" size="43914" crc="3e785c70" sha1="0ff37419357f69c17614b9a79f3df8e20ef3b673" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="look_sharp">
- <description>Look Sharp!</description>
- <year>1985</year>
- <publisher>Mirrorsoft</publisher>
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Old MacDonalds Farm"/>
- <dataarea name="cass" size="7497">
- <rom name="ls-oldmacdonaldsfarm_be.uef" size="7497" crc="3f11d07f" sha1="359952f8fa204271f387760fd1b9632a563fd381" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Sort"/>
- <dataarea name="cass" size="8068">
- <rom name="ls-sort_be.uef" size="8068" crc="aaaabdfd" sha1="1ec43458d43de2c146df7c85c4484128132c7e06" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="loonloco">
- <description>Loony Loco</description>
- <year>198?</year>
- <publisher>Kansas</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10608">
- <rom name="loonyloco_e.uef" size="10608" crc="e6f6b5ea" sha1="12b6932b57393f27ff62d2b6dbcf3ae458dc0f4a" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="loopz">
- <description>Loopz</description>
- <year>1990</year>
- <publisher>Audiogenic</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="14456">
- <rom name="loopz_e.uef" size="14456" crc="82928c5a" sha1="21e3217df60da8410232703b7d00bdd05d013542" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="lrescue">
- <description>Lunar Rescue</description>
- <year>1983</year>
- <publisher>Alligata</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8506">
- <rom name="lunarrescue_e.uef" size="8506" crc="d667b9b2" sha1="78e48942f249de06ab50b1094d3b155585bb6b5f" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="magicmus">
- <description>Magic Mushrooms</description>
- <year>1985</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="SLG46" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9110">
- <rom name="magicmushrooms_e.uef" size="9110" crc="4f1b2dcf" sha1="8ca21d8bb2d1691cdc240162e1cb44788360c86b" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="magicmussrr" cloneof="magicmus">
- <description>Magic Mushrooms (The Acornsoft Hits Vol.1)</description>
- <year>1987</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9091">
- <rom name="magicmushrooms-srr_e.uef" size="9091" crc="b513e672" sha1="f8cb9daf82ae263d33263c41174133414e00d153" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="magnmoon">
- <description>Magnetic Moon</description>
- <year>1987</year>
- <publisher>Elk Adventure Club</publisher>
- <part name="cass" interface="electron_cass">
- <feature name="part_id" value="Part 1"/>
- <dataarea name="cass" size="12224">
- <rom name="magneticmoon-pt1_be.uef" size="12224" crc="07a7a715" sha1="c0076c62477efd5ba34b11d00fcc6cf814edf37e" offset="0"/>
- </dataarea>
- </part>
- <part name="cass" interface="electron_cass">
- <feature name="part_id" value="Part 2"/>
- <dataarea name="cass" size="10367">
- <rom name="magneticmoon-pt2_be.uef" size="10367" crc="1d9bf270" sha1="3e5ba399d5d2dc7edcb7f43cd9a3d111800dd40d" offset="0"/>
- </dataarea>
- </part>
- <part name="cass" interface="electron_cass">
- <feature name="part_id" value="Part 3"/>
- <dataarea name="cass" size="10471">
- <rom name="magneticmoon-pt3_be.uef" size="10471" crc="bfc74912" sha1="9a383a100997b3dcc7eab19b07ef3f93c1017177" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="mango">
- <description>Mango</description>
- <year>1987</year>
- <publisher>Blue Ribbon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7112">
- <rom name="mango_e.uef" size="7112" crc="fd7a1f45" sha1="b08d773a6bb8f8fc148d2475e01dca0b91099f9e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="maniacmow">
- <description>Maniac Mower</description>
- <year>198?</year>
- <publisher>Kansas</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="5535">
- <rom name="maniacmower_e.uef" size="5535" crc="42fa4e7f" sha1="ae6d573e10665c59305044383e0bd60f8773cd9e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="masterbk">
- <description>Master Break</description>
- <year>198?</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="80849">
- <rom name="masterbreak_e.uef" size="80849" crc="979bca27" sha1="ff0422dafe21359e0d6e99e9f48e91a691ced442" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="mathsinv">
- <description>Maths Invaders</description>
- <year>1984</year>
- <publisher>Stell</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="4226">
- <rom name="mathsinvaders_be.uef" size="4226" crc="8b6ffbc6" sha1="2fb93666cfc0182b9c8b57d79b22bc26f51a6b89" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="mathorv1">
- <description>Maths 'O' Level Revision Part One</description>
- <year>1984</year>
- <publisher>Ampalsoft</publisher>
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Arithmetic"/>
- <dataarea name="cass" size="18090">
- <rom name="ccmaths-arithmetic_e.uef" size="18090" crc="46efbecc" sha1="9d974d277f95d586eb6d1261e3d98aed253bd443" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Calculus 1"/>
- <dataarea name="cass" size="10134">
- <rom name="ccmaths-calculus1_e.uef" size="10134" crc="5e7c89f2" sha1="3e4a5ae0be7bb768a2e3590751603086250097d8" offset="0"/>
- </dataarea>
- </part>
- <part name="cass3" interface="electron_cass">
- <feature name="part_id" value="Calculus 2"/>
- <dataarea name="cass" size="14633">
- <rom name="ccmaths-calculus2_e.uef" size="14633" crc="69418a2f" sha1="dc2f1df52bf8a5403cd8c00b9469ba52e15b22eb" offset="0"/>
- </dataarea>
- </part>
- <part name="cass4" interface="electron_cass">
- <feature name="part_id" value="Construction"/>
- <dataarea name="cass" size="10618">
- <rom name="ccmaths-construction_e.uef" size="10618" crc="ea3e0b6c" sha1="8af554a1168b24173bec69de8e7252412f5146e5" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="mathtuto">
- <description>Maths Tutor</description>
- <year>1985</year>
- <publisher>Century</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="14594">
- <rom name="mathstutor_be.uef" size="14594" crc="f1da555d" sha1="ad2bbcb4f857a41150519e7182e859f02bdb537f" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="mathst1">
- <description>Maths with a Story: 1</description>
- <year>1984</year>
- <publisher>BBC Soft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="22029">
- <rom name="mathswithastory1_e.uef" size="22029" crc="0d57484c" sha1="5bd21e67ef975741e04057455979175f43567db0" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="mathst2">
- <description>Maths with a Story: 2</description>
- <year>1984</year>
- <publisher>BBC Soft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="23745">
- <rom name="mathswithastory2_e.uef" size="23745" crc="4b4dec0d" sha1="7884354d880276db4b9a24d725c45586094c8438" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="maze">
- <description>Maze</description>
- <year>1983</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="SLG11" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10823">
- <rom name="maze_e.uef" size="10823" crc="4619d048" sha1="285ade572bf416646ccc117bf1efd8e67c79b636" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="mazesrr" cloneof="maze">
- <description>Maze (The Acornsoft Hits Vol.1)</description>
- <year>1987</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10823">
- <rom name="maze-srr_e.uef" size="10823" crc="256c76ea" sha1="d641323b851dc3ee3151d4f79cd884341869083c" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="memicro">
- <description>Me &amp; My Micro</description>
- <year>1984</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="SLX18" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="12695">
- <rom name="meandmymicro_e.uef" size="12695" crc="b0bf740f" sha1="f5b1b84cac71f421dc38cc523b90bddee05331cd" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="megaforc">
- <description>Mega Force</description>
- <year>198?</year>
- <publisher>Tynesoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="16686">
- <rom name="megaforce_e.uef" size="16686" crc="71f35e8e" sha1="f7d31ae4f972dc58221d91e1dc9f423026c73a6e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="mendipst">
- <description>Mendips Stone</description>
- <year>1986</year>
- <publisher>Dee-Kay</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7945">
- <rom name="mendipsstone_be.uef" size="7945" crc="bc59d28b" sha1="8ccaff6be99b48c0a827e20414dd6d4ccb8b5fa4" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="mteacht2">
- <description>Merlin Teaches Tables 2</description>
- <year>1984</year>
- <publisher>Hodder and Stoughton</publisher>
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Merlins Magic Skittles"/>
- <dataarea name="cass" size="4826">
- <rom name="mtt3-merlinsmagicskittles_e.uef" size="4826" crc="c4cf364b" sha1="b3333da7d0349989c32d4d410ca0fd09df70b7dc" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Merlins Magic Calculator"/>
- <dataarea name="cass" size="6316">
- <rom name="mtt4-merlinsmagiccalculator_e.uef" size="6316" crc="ea55e8ab" sha1="d0610a1bc185632e66a660ba60e9873e2f16b004" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="meteors">
- <description>Meteors</description>
- <year>198?</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="SLG13" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7102">
- <rom name="meteors_e.uef" size="7102" crc="1a5c6fb0" sha1="5f05ae0d5e9ea79ee456f4021b5d6953c6de6c39" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="meteorssrr" cloneof="meteors">
- <description>Meteors (The Acornsoft Hits Vol.2)</description>
- <year>1987</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6906">
- <rom name="meteors-srr_e.uef" size="6906" crc="f701e857" sha1="ccb0505bb2a80c02723a870dbfdcdf0d1b737098" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="meteorsg" cloneof="meteors">
- <description>Meteors (Ger)</description>
- <year>198?</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="GLG13" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7853">
- <rom name="meteors-german_e.uef" size="7853" crc="379c5514" sha1="05a55caa2dccd60f9d2abc20a7d5e6cec7f93dd7" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="mexico86">
- <description>Mexico 86</description>
- <year>1986</year>
- <publisher>Qualsoft</publisher>
- <part name="cass" interface="electron_cass">
- <feature name="part_id" value="Finals"/>
- <dataarea name="cass" size="8478">
- <rom name="mexico86finals_e.uef" size="8478" crc="a70af89d" sha1="3ba32b540cd0c422406ed49e6054bea9cc9000ec" offset="0"/>
- </dataarea>
- </part>
- <part name="cass" interface="electron_cass">
- <feature name="part_id" value="Qualifiers"/>
- <dataarea name="cass" size="8557">
- <rom name="mexico86qualifiers_e.uef" size="8557" crc="2398c3a2" sha1="9610c80168d7ac65a56531ab940aecc58d013d0e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="microlym">
- <description>Micro Olympics</description>
- <year>1984</year>
- <publisher>database</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="38809">
- <rom name="microolympics_e.uef" size="38809" crc="65b3258b" sha1="0a7e2d5e661310bf1c42ed60b912f8efc5b2597d" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="microbal">
- <description>Microball</description>
- <year>1986</year>
- <publisher>Alternative</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6691">
- <rom name="microball_be.uef" size="6691" crc="c9605892" sha1="a43dd11ea91b4ec72094e9410b4492c88b35abfa" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="plus1joy">
- <description>Plus 1 Joystick Utility</description>
- <year>1986</year>
- <publisher>Micro Power</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="2000">
- <rom name="micropowerplusonejoystickutil_e.uef" size="2000" crc="43f44d49" sha1="e9bbd3708440907eee22f3560c1231c684ae1c04" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="mikie">
- <description>Mikie</description>
- <year>1986</year>
- <publisher>Imagine</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="16596">
- <rom name="mikie_e.uef" size="16596" crc="eba2d1df" sha1="ea0e79657e963897bf7bea62245fbd4694c8bb2e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="milliona">
- <description>Millionaire</description>
- <year>1984</year>
- <publisher>Incentive</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11996">
- <rom name="millionaire_e.uef" size="11996" crc="e76af807" sha1="36b5e3b509609722dd09b31ac93ab346ff10b463" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="minedout">
- <description>Mined-Out</description>
- <year>1983</year>
- <publisher>Quicksilva</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8962">
- <rom name="minedout_e.uef" size="8962" crc="46725e3e" sha1="89dee5d9fb4113545839fd81560b6fa78ec3eda1" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="mineshaf">
- <description>Mineshaft</description>
- <year>1984</year>
- <publisher>Durell</publisher>
- <info name="usage" value="Load with *RUN" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11061">
- <rom name="mineshaft_run_e.uef" size="11061" crc="27b6d9d1" sha1="c5ff5998eeb9585721cba93022d5971de06b173a" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="mineshafa" cloneof="mineshaf">
- <description>Mineshaft (Alternative)</description>
- <year>1990</year>
- <publisher>Alternative</publisher>
- <info name="usage" value="Load with *RUN" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11061">
- <rom name="mineshaft_run_e.uef" size="11061" crc="27b6d9d1" sha1="c5ff5998eeb9585721cba93022d5971de06b173a" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="moffices" cloneof="moffice">
- <description>Mini Office (Summit)</description>
- <year>198?</year>
- <publisher>Summit</publisher>
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Word Processor"/>
- <dataarea name="cass" size="13220">
- <rom name="mo-word_e.uef" size="13220" crc="f6d6ce7b" sha1="0acfdba0e7bf203c69bbe846dcf7aba6ac30a036" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Database"/>
- <dataarea name="cass" size="13599">
- <rom name="mo-dbase_e.uef" size="13599" crc="9792cb4c" sha1="901c85cd0355c9259499637376c7f4732f1dc3f1" offset="0"/>
- </dataarea>
- </part>
- <part name="cass3" interface="electron_cass">
- <feature name="part_id" value="Spreadsheet"/>
- <dataarea name="cass" size="16020">
- <rom name="mo-spread_e.uef" size="16020" crc="322d5074" sha1="542ebb4e429647c532edb94e027ce4e1cc0b01e1" offset="0"/>
- </dataarea>
- </part>
- <part name="cass4" interface="electron_cass">
- <feature name="part_id" value="Graphics"/>
- <dataarea name="cass" size="10151">
- <rom name="mo-graph_e.uef" size="10151" crc="6651846c" sha1="9910dc690898fafa42b3eec71b7c29d2ed23dd91" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="moffice">
- <description>Mini Office</description>
- <year>1984</year>
- <publisher>Database</publisher>
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Word Processor"/>
- <dataarea name="cass" size="13220">
- <rom name="mo-word_e.uef" size="13220" crc="f6d6ce7b" sha1="0acfdba0e7bf203c69bbe846dcf7aba6ac30a036" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Database"/>
- <dataarea name="cass" size="13599">
- <rom name="mo-dbase_e.uef" size="13599" crc="9792cb4c" sha1="901c85cd0355c9259499637376c7f4732f1dc3f1" offset="0"/>
- </dataarea>
- </part>
- <part name="cass3" interface="electron_cass">
- <feature name="part_id" value="Spreadsheet"/>
- <dataarea name="cass" size="16020">
- <rom name="mo-spread_e.uef" size="16020" crc="322d5074" sha1="542ebb4e429647c532edb94e027ce4e1cc0b01e1" offset="0"/>
- </dataarea>
- </part>
- <part name="cass4" interface="electron_cass">
- <feature name="part_id" value="Graphics"/>
- <dataarea name="cass" size="10151">
- <rom name="mo-graph_e.uef" size="10151" crc="6651846c" sha1="9910dc690898fafa42b3eec71b7c29d2ed23dd91" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="misscont">
- <description>Missile Control</description>
- <year>1983</year>
- <publisher>Gemini</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10010">
- <rom name="missilecontrol_e.uef" size="10010" crc="afcfad7b" sha1="bc3e9daee7fbe881e146d234491d8f4720faed5c" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="missxp2">
- <description>Mission XP2</description>
- <year>1984</year>
- <publisher>Hollsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8463">
- <rom name="missionxp-2_e.uef" size="8463" crc="e1d7e35d" sha1="0b09dd32476793feebcb97f53c82cc5563f51976" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="monkeynu">
- <description>Monkey Nuts</description>
- <year>1988</year>
- <publisher>Bug Byte</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="5939">
- <rom name="monkeynuts_be.uef" size="5939" crc="db99bc0c" sha1="8af887dd4c8f430da8aab97a9713f244ee7afe0c" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="monsters">
- <description>Monsters</description>
- <year>1983</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="SLG??" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7704">
- <rom name="monsters_e.uef" size="7704" crc="c68083db" sha1="7328541b2ab8d701f95168467db34959da546160" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="monsterspias" cloneof="monsters">
- <description>Monsters (Play It Again Sam 11)</description>
- <year>1990</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7491">
- <rom name="monsters-piasrr_e.uef" size="7491" crc="38e15c5c" sha1="54e051dd8f09b530bdf9b2954af7c4e356af66a0" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="monsterssrr" cloneof="monsters">
- <description>Monsters (The Acornsoft Hits Vol.1)</description>
- <year>1987</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7704">
- <rom name="monsters-srr_e.uef" size="7704" crc="943768d5" sha1="dbd0a93777dcc59a0e7ac05f15cfe3bfe2601ccd" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="moonbugg">
- <description>Moon Buggy</description>
- <year>1985</year>
- <publisher>Kansas</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9319">
- <rom name="moonbuggy_e.uef" size="9319" crc="e382f2cf" sha1="ff92a0833adee6cd6dba58c74f2dc23645a99400" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="moonraid">
- <description>Moon Raider</description>
- <year>1983</year>
- <publisher>Micro Power</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10297">
- <rom name="moonraider_e.uef" size="10297" crc="c22401a6" sha1="9d589bd9c1be1b042130d8034da9b3570c29048b" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="moonraidpias">
- <description>Moon Raider (Play It Again Sam 5)</description>
- <year>1989</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="15924">
- <rom name="moonraider-piasrr_e.uef" size="15924" crc="7ff443d6" sha1="4d7eaa720691d2efce4a27cc8a4c09b4b573f3a9" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="mtrap">
- <description>Mouse Trap</description>
- <year>198?</year>
- <publisher>Tynesoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="14280">
- <rom name="mousetrap_e.uef" size="14280" crc="fff275ed" sha1="25d4b89621bf2d502e975a192dc2b1968cd42ec4" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="mrwiz">
- <description>Mr Wiz</description>
- <year>1984</year>
- <publisher>Superior Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="12337">
- <rom name="mrwiz-piasrr_e.uef" size="12337" crc="1f09960d" sha1="f82501c6afeb9fb6b2146a381e0effb4645f3ac1" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="mrwizsc" cloneof="mrwiz">
- <description>Mr Wiz (The Superior Collection Vol.3)</description>
- <year>1987</year>
- <publisher>Superior Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7089">
- <rom name="mrwiz-scrr_e.uef" size="7089" crc="53ccb7b6" sha1="42cb88a966d0b09f53520e0c2cedaba982100c22" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="mrwizbr" cloneof="mrwiz">
- <description>Mr Wiz (Blue Ribbon)</description>
- <year>198?</year>
- <publisher>Superior Software/Blue Ribbon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6950">
- <rom name="mrwiz-brrr_e.uef" size="6950" crc="c7461935" sha1="68549ca4817fb94ca90896af0c3470145e1d6d43" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="myorem">
- <description>Myorem</description>
- <year>1986</year>
- <publisher>Robico</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="21686">
- <rom name="rht3-myorem_e.uef" size="21686" crc="267807b1" sha1="781fc48b78a443df662820cd17b529b79cb825ff" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="funhouse">
- <description>Mystery Fun House</description>
- <year>198?</year>
- <publisher>Adventure International</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10850">
- <rom name="adv7-mysteryfunhouse_e.uef" size="10850" crc="922a7f52" sha1="11fb88d5085785470921949bb65a78cef0cc8bb5" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="javastar">
- <description>The Mystery of the Java Star</description>
- <year>1985</year>
- <publisher>Shards Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="35175">
- <rom name="mysteryofthejavastar_e.uef" size="35175" crc="a017d0ca" sha1="37a0987ecd0e011b12d88b429e3d1570042b96f5" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="network">
- <description>Network (Play It Again Sam 15)</description>
- <year>1991</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="22573">
- <rom name="network-piasrr_e.uef" size="22573" crc="55a56ef5" sha1="7ade0c875ef8635d3d5f8ef1f0df72b1eca6ffd8" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="nightstr">
- <description>Night Strike</description>
- <year>198?</year>
- <publisher>Alternative</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6068">
- <rom name="nightstrike_e.uef" size="6068" crc="cdd2c760" sha1="6f529475a240cb68d0ce75902cbb8d9c8f6b2657" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="nmaremaz">
- <description>Nightmare Maze</description>
- <year>1984</year>
- <publisher>MRM Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6976">
- <rom name="nightmaremaze-mrm_e.uef" size="6976" crc="fa4845ff" sha1="8c2373d85d52419494a4ee1f55327738e8bc0418" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="nightwld">
- <description>Nightworld</description>
- <year>1986</year>
- <publisher>Alligata</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="13845">
- <rom name="nightworld_e.uef" size="13845" crc="1bbb811b" sha1="c4533033662e1ba63d289c7ac3185f630851f9b2" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="nmaremazbr" cloneof="nmaremaz">
- <description>Nightmare Maze (Blue Ribbon)</description>
- <year>1984</year>
- <publisher>Blue Ribbon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7221">
- <rom name="nightmaremaze_e.uef" size="7221" crc="edbab352" sha1="f2ac599435ddf605c4a5c7008bb9d50ad265696e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="numbergu">
- <description>Number Gulper</description>
- <year>1984</year>
- <publisher>Acornsoft/ASK</publisher>
- <info name="release" value="XBE13" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11352">
- <rom name="numbergulper_be.uef" size="11352" crc="5cda773f" sha1="9f037647ff6bf5107f3282e231098125b5b548d1" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="olspecta">
- <description>Olympic Spectacular</description>
- <year>198?</year>
- <publisher>Alternative</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="38809">
- <rom name="microolympics_e.uef" size="38809" crc="65b3258b" sha1="0a7e2d5e661310bf1c42ed60b912f8efc5b2597d" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="omegaorb">
- <description>Omega Orb</description>
- <year>1986</year>
- <publisher>Audiogenic</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="22736">
- <rom name="omegaorb_e.uef" size="22736" crc="0b871510" sha1="9a2180a58110fcbe7c282ccf148f4e37f7608d07" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="omegaorba" cloneof="omegaorb">
- <description>Omega Orb (Atlantis)</description>
- <year>198?</year>
- <publisher>Atlantis</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="22736">
- <rom name="omegaorb_e.uef" size="22736" crc="0b871510" sha1="9a2180a58110fcbe7c282ccf148f4e37f7608d07" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="osprey">
- <description>Osprey!</description>
- <year>198?</year>
- <publisher>Bourne Educational Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8238">
- <rom name="osprey_e.uef" size="8238" crc="a3fe9647" sha1="655ff8b22aef3425a8f698412722b75984d93b44" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="overdriv">
- <description>Overdrive</description>
- <year>1984</year>
- <publisher>Superior Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="5719">
- <rom name="overdrive_e.uef" size="5719" crc="32d9c6a5" sha1="285388e5a3785bd48b992775263b398711851cea" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="overdrivesc" cloneof="overdriv">
- <description>Overdrive (The Superior Collection Vol.3)</description>
- <year>1987</year>
- <publisher>Superior Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="5616">
- <rom name="overdrive-scrr_e.uef" size="5616" crc="d95b4c7a" sha1="a1e3bfef042c17f698d132d18f9ccc3fd50002a6" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="oxbridge">
- <description>Oxbridge</description>
- <year>1986</year>
- <publisher>Tynesoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="14697">
- <rom name="oxbridge_e.uef" size="14697" crc="f90b590f" sha1="90856401514fc91734ab46d5947f16e3cc9acd74" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="palmagic">
- <description>Palace of Magic</description>
- <year>1987</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="24222">
- <rom name="palaceofmagic_e.uef" size="24222" crc="6fc790bb" sha1="3a09e6a478be03c54f734c2e6e4f63414649c5f7" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="pandemon">
- <description>Pandemonium (Play It Again Sam 13)</description>
- <year>1990</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="21085">
- <rom name="pandemonium-piasrr_e.uef" size="21085" crc="9ff4d87d" sha1="9e935474809d1e379d4f8afec20abbe4aa7dd423" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="panik">
- <description>Panik</description>
- <year>1987</year>
- <publisher>Atlantis</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6747">
- <rom name="panik_be.uef" size="6747" crc="52635e7e" sha1="ab2b0423d25f675c96eff6138fc61136ee57368d" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="paperboy">
- <description>Paperboy</description>
- <year>1984</year>
- <publisher>Elite</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="16237">
- <rom name="paperboy_e.uef" size="16237" crc="41285565" sha1="36974cef92c31ca5dacb79115e6851f576cb736c" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="paras">
- <description>Paras</description>
- <year>1983</year>
- <publisher>Lothlorien</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6556">
- <rom name="paras_be.uef" size="6556" crc="237d2802" sha1="7980839b0e89ec348b081f85fc7a876922706be3" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="pauldani">
- <description>Paul Daniels' Magic Show</description>
- <year>1984</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="SLX11" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="26092">
- <rom name="pauldanielsmagicshow_e.uef" size="26092" crc="73c53d37" sha1="cf86cb299e98db03204359385ed7839b2ec2faa4" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="pcwgames">
- <description>PCW Games Collection</description>
- <year>198?</year>
- <publisher>PCW</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="61587">
- <rom name="pcwgamescollection_e.uef" size="61587" crc="f9981392" sha1="ca8d244f07e9490af283c2542a2a7295266cec03" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="pedro">
- <description>Pedro</description>
- <year>1984</year>
- <publisher>Imagine</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11094">
- <rom name="pedro_e.uef" size="11094" crc="581fac2e" sha1="f07a1c9ca27f4fdaf5956c03b8ac6676f9eb229d" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="peekocg" cloneof="peekoc">
- <description>Peeko-Computer (Ger)</description>
- <year>1983</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="GBE02" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="4745">
- <rom name="peekocomputer-german_e.uef" size="4745" crc="9c50c7bf" sha1="618ff6d8517aa11de61c277c916da99f7ae9e3cf" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="peekoc">
- <description>Peeko-Computer</description>
- <year>1983</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="SLE02" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="4690">
- <rom name="peekocomputer_e.uef" size="4690" crc="436c1a4c" sha1="5943cb90f4428e33ebc58d125f488acc8199be26" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="pegleg">
- <description>Peg Leg</description>
- <year>1984</year>
- <publisher>I.J.K.</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7663">
- <rom name="pegleg_e.uef" size="7663" crc="4aa0f6e3" sha1="ec95a2282c93678cf22eb4cd4367b32473d154bc" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="pengi">
- <description>Pengi</description>
- <year>1984</year>
- <publisher>Visions</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8904">
- <rom name="pengi_e.uef" size="8904" crc="ca894573" sha1="2bb8b386c36021e069b533e59551f62c0a4c9034" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="pengwyn">
- <description>Pengwyn</description>
- <year>1984</year>
- <publisher>Postern</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6915">
- <rom name="pengwyn_e.uef" size="6915" crc="9f6299a0" sha1="4e1e44e16cd30506f8e32d3ce9e3630df3530b30" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="ppenguin">
- <description>Percy Penguin</description>
- <year>1984</year>
- <publisher>Superior Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6098">
- <rom name="percypenguin_e.uef" size="6098" crc="507c769c" sha1="fd4d947e4ae2acb5f23b85e2d12fba905c2312ce" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="ppenguinpias" cloneof="ppenguin">
- <description>Percy Penguin (Play It Again Sam 13)</description>
- <year>1990</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6617">
- <rom name="percypenguin_piasrr_e.uef" size="6617" crc="34b22e9c" sha1="a80802f3db05d91e2fb6fce7e25b0acca3eb599d" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="ppenguinbr" cloneof="ppenguin">
- <description>Percy Penguin (Blue Ribbon)</description>
- <year>198?</year>
- <publisher>Superior Software/Blue Ribbon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6093">
- <rom name="percypenguin_brrr_e.uef" size="6093" crc="8aee05cf" sha1="814ad9a887db4262c174e9f94708fbb38a48287a" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="perplex">
- <description>Perplexity</description>
- <year>1989</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="19033">
- <rom name="perplexity_e.uef" size="19033" crc="1feb057c" sha1="920a2714aeeb8bd329d6a32596e51cf9273de370" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="persandr">
- <description>Perseus and Andromeda</description>
- <year>198?</year>
- <publisher>Adventure International</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="12030">
- <rom name="mystadv9-perseusandandromeda_e.uef" size="12030" crc="8036d9b6" sha1="ff7ac0cfa548ad11f1d421b3776392f7d2ea528d" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="pettigre">
- <description>Pettigrews Diary</description>
- <year>1984</year>
- <publisher>Shards Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="26625">
- <rom name="pettigrewsdiary_e.uef" size="26625" crc="e94fa0b9" sha1="d46aba0458625b1a0cc6ea32bbdd7be409f99339" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="phancomb">
- <description>Phantom Combat</description>
- <year>1985</year>
- <publisher>Doctor Soft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="19566">
- <rom name="phantomcombat_e.uef" size="19566" crc="dc41315b" sha1="d159a0f77dcc23a4ab39cea39e51fbbfd775e315" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="phartomb">
- <description>Pharoahs Tomb</description>
- <year>1983</year>
- <publisher>A&amp;F Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9595">
- <rom name="pharaohstomb_e.uef" size="9595" crc="9211ab90" sha1="6823430bba7254389ddecb145b770ccea0c0d733" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="phquest">
- <description>Philosophers Quest</description>
- <year>1983</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="SLG01" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="16289">
- <rom name="philosophersquest_e.uef" size="16289" crc="0ccc815f" sha1="cff1b7d7374b581cb8d8a1c0c8d4c46922746e1f" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="pinball">
- <description>Pinball</description>
- <year>1983</year>
- <publisher>Microbyte</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7021">
- <rom name="pinball-microbyte_e.uef" size="7021" crc="d6bdfea3" sha1="33101b824c503eb652682ec0f2de247deffa11b4" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="pinbarcd">
- <description>Pinball Arcade</description>
- <year>1984</year>
- <publisher>Kansas</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8205">
- <rom name="pinballarcade_e.uef" size="8205" crc="255f2505" sha1="7bc501a03dadeaf591a5aec0b2773569800d5f08" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="pipeline">
- <description>Pipeline</description>
- <year>1989</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="47274">
- <rom name="pipeline_e.uef" size="47274" crc="13d4ba7d" sha1="6627a08316dfb635c20c39f75a12e725700a1d50" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="pipemania">
- <description>Pipe Mania</description>
- <year>1989</year>
- <publisher>Empire</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="20029">
- <rom name="pipemania_e.uef" size="20029" crc="08208134" sha1="77890a791b8dcba5fa8f158684846200be1d5da0" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="piratead">
- <description>Pirate Adventure</description>
- <year>198?</year>
- <publisher>Adventure International</publisher>
- <info name="usage" value="Load with *RUN" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10453">
- <rom name="adv2-pirateadventure-scoops_run_e.uef" size="10453" crc="1fd51684" sha1="4a523e32746b910e9444d2f966813105d745c998" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="planb">
- <description>Plan B</description>
- <year>1987</year>
- <publisher>Bug Byte</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="14068">
- <rom name="planb_be.uef" size="14068" crc="10ab9c08" sha1="78522bb8943ef4c9356dfc62959d4ec8e28875cd" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="planb2">
- <description>Plan B2</description>
- <year>1987</year>
- <publisher>Bug Byte</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="13657">
- <rom name="planb2_be.uef" size="13657" crc="6b826f62" sha1="8051d6651c19c757840435473890b05b1b500e03" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="planecra">
- <description>Plane Crash</description>
- <year>1989</year>
- <publisher>Labyrinth</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="19956">
- <rom name="planecrash_be.uef" size="19956" crc="6c7ef044" sha1="4183019362053f16370e3993cddac424e325bc0c" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="plantoidg" cloneof="plantoid">
- <description>Planetoid (Ger)</description>
- <year>1983</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="GLG15" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10095">
- <rom name="planetoid-german_e.uef" size="10095" crc="52ce1732" sha1="7fc7e372cf3de614e2cd111be786804ea19c66d5" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="plantoidsrr" cloneof="plantoid">
- <description>Planetoid (The Acornsoft Hits Vol.1)</description>
- <year>1987</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9790">
- <rom name="planetoid-srr_e.uef" size="9790" crc="640eaa3a" sha1="09008e75dc377f0dab301c164349224c2757e248" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="plantoid">
- <description>Planetoid</description>
- <year>1983</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="SLG15" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9789">
- <rom name="planetoid_e.uef" size="9789" crc="3bc62483" sha1="4f6a85a1bd337b3bb960d66cf35a7bb16aa2002f" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="playcard">
- <description>Play Your Cards Right</description>
- <year>198?</year>
- <publisher>Britannia</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10226">
- <rom name="bruceforsythsplayyourcardsright_e.uef" size="10226" crc="1991b78f" sha1="532bf7b4e29ea3d5cb798b6f15e2a21926704e8e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="playbox">
- <description>Playbox</description>
- <year>1984</year>
- <publisher>Comsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="15603">
- <rom name="playbox_e.uef" size="15603" crc="3d013ffa" sha1="224ad4ba624daf993588beb27c478212ba82db94" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="plunder">
- <description>Plunder</description>
- <year>1984</year>
- <publisher>CCS</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9490">
- <rom name="plunder_e.uef" size="9490" crc="5b76b83b" sha1="cd77a08467bcc2fec61ae3f056d43757e5273168" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="podd">
- <description>Podd</description>
- <year>1984</year>
- <publisher>Acornsoft/ASK</publisher>
- <info name="release" value="XBE26" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10487">
- <rom name="podd_be.uef" size="10487" crc="dac846b0" sha1="3b1d08c721338a38c4d2b74c91ddfed4986eb079" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="poker">
- <description>Poker</description>
- <year>1986</year>
- <publisher>Duckworth</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="16407">
- <rom name="poker-duckworth_be.uef" size="16407" crc="6f751ed1" sha1="0a8da36718e45b44f5e881855c0d024466059985" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="ponyexpr">
- <description>Pony Express</description>
- <year>1984</year>
- <publisher>Hollsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9030">
- <rom name="ponyexpress_e.uef" size="9030" crc="fa5532e8" sha1="a138bbf06c90054713a81e5e038586f55fd6a096" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="poolhall">
- <description>Pool Hall</description>
- <year>1984</year>
- <publisher>Dynabyte</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7171">
- <rom name="poolhall_e.uef" size="7171" crc="cfc34e78" sha1="e08c8f7466d62ee44b1f85378eeef81f4d4df2e4" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="positron">
- <description>Positron</description>
- <year>1983</year>
- <publisher>Micro Power</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6158">
- <rom name="positron_e.uef" size="6158" crc="cd06a1fa" sha1="4ddf9b0956e1f0d4c8a1f13489a4fb62d6a9c866" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="predator">
- <description>Predator</description>
- <year>1988</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="20693">
- <rom name="predator_e.uef" size="20693" crc="2930b146" sha1="8f1bf6a35a48dc8b7c3efb5f432b85341f5d5c1c" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="primart">
- <description>Primary Art</description>
- <year>1984</year>
- <publisher>Alligata</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="4443">
- <rom name="primaryart_e.uef" size="4443" crc="e1b801f6" sha1="a64484b0ac09553a9bc691b0fc57b8fc753cc6f1" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="progolf">
- <description>Pro Golf</description>
- <year>1988</year>
- <publisher>Atlantis</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="32395">
- <rom name="progolf_be.uef" size="32395" crc="15819f50" sha1="adf75311b703786d9551145d6d1f8fa1df285ec9" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="proboxin">
- <description>Pro Boxing Simulator</description>
- <year>198?</year>
- <publisher>Codemasters</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="21508">
- <rom name="proboxingsimulator_e.hq.uef" size="21508" crc="da9ede60" sha1="aded29e58876d5979de2ff1cb041cae03c083fa8" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="projthes">
- <description>Project Thesius</description>
- <year>1986</year>
- <publisher>Robico</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="17255">
- <rom name="projectthesius_e.uef" size="17255" crc="be1039f0" sha1="a75be7f31dde26a7ebb76523afce5bd55f4f1a98" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="psycast">
- <description>Psycastria</description>
- <year>1986</year>
- <publisher>Audiogenic</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="23082">
- <rom name="psycastria_e.uef" size="23082" crc="a2c3d299" sha1="4f982b3b856afe08ef015c1097796af1c8f80eed" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="psycasta" cloneof="psycast">
- <description>Psycastria (Alternative)</description>
- <year>198?</year>
- <publisher>Alternative</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="23082">
- <rom name="psycastria_e.uef" size="23082" crc="a2c3d299" sha1="4f982b3b856afe08ef015c1097796af1c8f80eed" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="psycast2">
- <description>Psycastria 2</description>
- <year>1989</year>
- <publisher>Audiogenic</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="20454">
- <rom name="psycastria2_e.uef" size="20454" crc="467bd920" sha1="6e66ccf674f42f7a7d9662549f06e73ff27c4e30" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="psycast2a" cloneof="psycast2">
- <description>Psycastria 2 (Atlantis)</description>
- <year>19??</year>
- <publisher>Atlantis</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="20603">
- <rom name="psycastria2-atlantis_e.uef" size="20603" crc="e8c89501" sha1="b3ad0bd071f0141c5c6f53da941574b15aa451af" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="pyrdoom">
- <description>Pyramid of Doom</description>
- <year>198?</year>
- <publisher>Adventure International</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10506">
- <rom name="adv8-pyramidofdoom_e.uef" size="10506" crc="5517b85e" sha1="6a19351f36d65d70c96700efebcb82da129a8832" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="qbix">
- <description>Q*Bix</description>
- <year>1984</year>
- <publisher>Alligata</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7571">
- <rom name="qbix_e.uef" size="7571" crc="4fac33ff" sha1="0d41c9ed6974dfc5255402fd2299978d450c5f14" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="quest">
- <description>Quest</description>
- <year>1988</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="17889">
- <rom name="quest_e.uef" size="17889" crc="605adabc" sha1="d84a86301330b6ffcb44ca0a6c3adf502cc91997" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="questfr">
- <description>Quest for Freedom</description>
- <year>1986</year>
- <publisher>I.J.K.</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="16281">
- <rom name="questforfreedom_e.uef" size="16281" crc="247ecdfd" sha1="258b55378b051e9b5cff5e71c883e056ad71c9c7" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="quikthin">
- <description>Quick Thinking!</description>
- <year>1985</year>
- <publisher>Mirrorsoft</publisher>
- <part name="cass1" interface="electron_cass">
- <dataarea name="cass" size="6895">
- <rom name="qt-1-sumvaders_e.uef" size="6895" crc="1a10bf5e" sha1="e816a3585087a938188ab0155c177e19ca2663c0" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <dataarea name="cass" size="9878">
- <rom name="qt-2-robottables_e.uef" size="9878" crc="e2d327bd" sha1="71bcc58e278769def485892c393024b83b87b45a" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="qwak">
- <description>Qwak</description>
- <year>1989</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="15685">
- <rom name="qwak_e.uef" size="15685" crc="01c7f925" sha1="f081e335118c94a08c5e2a4d4ebeeb3d0b039d5d" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="ransack">
- <description>Ransack!</description>
- <year>1987</year>
- <publisher>Audiogenic</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="22015">
- <rom name="ransack_e.uef" size="22015" crc="97a94640" sha1="28a9309fbf569df2626b0329ea9f6904025d3053" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="ravage">
- <description>Ravage</description>
- <year>1985</year>
- <publisher>Blue Ribbon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8760">
- <rom name="ravage_e.uef" size="8760" crc="f9ab7792" sha1="d2138b0903a26efa012ef1ec4b3ebf0420517720" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="ravskull">
- <description>Ravenskull</description>
- <year>1987</year>
- <publisher>Superior Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="24836">
- <rom name="ravenskull_e.uef" size="24836" crc="d457bac2" sha1="fdeeddc748fab4dae865bebd6297f1001406a0f1" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="ravskullpias" cloneof="ravskull">
- <description>Ravenskull (Play It Again Sam)</description>
- <year>198?</year>
- <publisher>Superior Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="24815">
- <rom name="ravenskull-piasrr_e.uef" size="24815" crc="c99f1e83" sha1="0c66f66131ab7afd79d1f75e8ac32445e64f1fd8" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="readra3">
- <description>Read Right Away 3</description>
- <year>1985</year>
- <publisher>Highlight Software</publisher>
- <part name="cass1" interface="electron_cass">
- <dataarea name="cass" size="6909">
- <rom name="breakin_e.uef" size="6909" crc="a07c1e36" sha1="33432f3cd37eb07d4bea82c258d0d08a191df9b7" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <dataarea name="cass" size="6694">
- <rom name="magice_e.uef" size="6694" crc="0235ad79" sha1="973069447e85b3705bc8408dc91b06fc84571bd2" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="villsoul">
- <description>Village of the Lost Souls</description>
- <year>1987</year>
- <publisher>Robico</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="23561">
- <rom name="villageoflostsouls-rr_e.uef" size="23561" crc="609fd0ac" sha1="b7821a38521dd240ccc94ebaca039148444bcbcb" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="rebelpla">
- <description>Rebel Planet</description>
- <year>1986</year>
- <publisher>U.S. Gold</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="22378">
- <rom name="rebelplanet_e.uef" size="22378" crc="abc2bdde" sha1="6d24caa16fc5ef049c628040450abd755bc43cee" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="redcoats">
- <description>Red Coats</description>
- <year>1985</year>
- <publisher>Lothlorien</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10181">
- <rom name="redcoats_be.uef" size="10181" crc="77f3fa73" sha1="df466166aff5cdefc2f1958688455d4ad6baa38c" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="relucthe">
- <description>Reluctant Hero</description>
- <year>1987</year>
- <publisher>Elk Adventure Club</publisher>
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Part 1"/>
- <dataarea name="cass" size="14192">
- <rom name="reluctanthero-pt1_be.uef" size="14192" crc="a723bbaa" sha1="e1c97335a5e85253014f03998925c7d6ca99c588" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Part 2"/>
- <dataarea name="cass" size="11070">
- <rom name="reluctanthero-pt2_be.uef" size="11070" crc="1e9a871b" sha1="b2245e11105e4513f164d9ce80ab54d15cd758b3" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="repton">
- <description>Repton</description>
- <year>1985</year>
- <publisher>Superior Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="24399">
- <rom name="repton_e.uef" size="24399" crc="28c29fb0" sha1="053fffcb52eed6b0a2cbe2b5490f397653f3d8a2" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="reptonbr" cloneof="repton">
- <description>Repton (Blue Ribbon)</description>
- <year>198?</year>
- <publisher>Superior Software/Blue Ribbon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="17053">
- <rom name="repton-brrr_e.uef" size="17053" crc="d67d17fb" sha1="bc70c2a6b6bbd6adc6b825cdb110c74f638121ff" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="repton2br" cloneof="repton2">
- <description>Repton 2 (Blue Ribbon)</description>
- <year>198?</year>
- <publisher>Superior Software/Blue Ribbon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="18545">
- <rom name="repton2-brrr_e.uef" size="18545" crc="224294e8" sha1="c4e6cd22b59b51c903e3a250455dec681f75b0a0" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="repton2">
- <description>Repton 2</description>
- <year>1985</year>
- <publisher>Superior Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="18477">
- <rom name="repton2_e.uef" size="18477" crc="bfa53f08" sha1="103602bdbdffd91c9495299dbb6e066f14ce2795" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="repton2sc" cloneof="repton2">
- <description>Repton 2 (The Superior Collection Vol.3)</description>
- <year>1987</year>
- <publisher>Superior Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="18544">
- <rom name="repton2-scrr_e.uef" size="18544" crc="3d5eeee1" sha1="8896abd8196cbfadc98e9d62f691c888105b99a8" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="repton3">
- <description>Repton 3</description>
- <year>1986</year>
- <publisher>Superior Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="40938">
- <rom name="repton3_e.uef" size="40938" crc="6f4726b8" sha1="33d0ffe526f9c08588ead8f50d2d6f73e015189b" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="reptonin">
- <description>Repton Infinity</description>
- <year>1988</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="95130">
- <rom name="reptoninfinity_e.uef" size="95130" crc="b231cedc" sha1="69b043c751053ac8152498a461832aa39eeb1620" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="reptonsc" cloneof="repton">
- <description>Repton (The Superior Collection Vol.3)</description>
- <year>1987</year>
- <publisher>Superior Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="17101">
- <rom name="repton-scrr_e.uef" size="17101" crc="d0d30178" sha1="c986a1964902f37c5a511b7fd0c24032e215b1ea" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="reptonti">
- <description>Repton Thru Time</description>
- <year>1988</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="58112">
- <rom name="reptonthrutime_e.uef" size="58112" crc="d5b0df56" sha1="e1ae9ac6a342304c7184c181d916721da7e9605d" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="fss2">
- <description>FSS2 - Return of Flint</description>
- <year>1983</year>
- <publisher>Potter</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10006">
- <rom name="fss2-returnofflint_be.uef" size="10006" crc="b6a90c4d" sha1="5e0f7cc6d8e80337186d53f33e6f080f1878363e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="retr2">
- <description>Return of R2</description>
- <year>1987</year>
- <publisher>Blue Ribbon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10770">
- <rom name="returnofr2_e.uef" size="10770" crc="dd513e0d" sha1="e6c8433daa9ef523f876d2e2d9226da10294c979" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="revzor">
- <description>Revenge of Zor</description>
- <year>1983</year>
- <publisher>Kansas</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9850">
- <rom name="revengeofzor_e.uef" size="9850" crc="311883f3" sha1="7cf0e9ccf95039812f634993102d4e0224ee4bae" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="reversik">
- <description>Reversi (Kansas)</description>
- <year>198?</year>
- <publisher>Kansas</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="3769">
- <rom name="reversi-Kansas_e.uef" size="3769" crc="94b380d6" sha1="b7bb8b8792893a8a99bfbe0742bd57b897651aa6" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="reversis">
- <description>Reversi (Superior Software)</description>
- <year>1983</year>
- <publisher>Superior Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8595">
- <rom name="reversi-superior_e.uef" size="8595" crc="3c220cca" sha1="a9b9bef99c2fff02adf8ebdf82670410f0fe0ef0" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="rhanson">
- <description>Rick Hanson</description>
- <year>1986</year>
- <publisher>Robico</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="19666">
- <rom name="rickhanson_e.uef" size="19666" crc="5262a180" sha1="9ed7f7b428d0b5f5502cc8ccda2282d9ff6a3445" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="ricochet">
- <description>Ricochet</description>
- <year>1989</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="49457">
- <rom name="ricochet_e.uef" size="49457" crc="73e75f20" sha1="d391c9bbb5a9939a1d70308399cb6d6a3f6222fe" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="rigattac">
- <description>Rig Attack</description>
- <year>1985</year>
- <publisher>Tynesoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8296">
- <rom name="rigattack_e.uef" size="8296" crc="f0b4a26d" sha1="80221e33f3ccaae67da06e3c9923f718666b0284" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="rikroadi">
- <description>Rik the Roadie</description>
- <year>1987</year>
- <publisher>Alternative</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="13639">
- <rom name="riktheroadie_be.uef" size="13639" crc="3ccdf2a0" sha1="2e743dda56e4be861327dc4335ae3a0572ef1f13" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="ringtime">
- <description>Ring of Time</description>
- <year>1983</year>
- <publisher>Kansas</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9632">
- <rom name="ringoftime_e.uef" size="9632" crc="88f55acb" sha1="e095013fb81fa6d706dd932a937240cfc68ea2be" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="robinshw">
- <description>Robin of Sherwood</description>
- <year>198?</year>
- <publisher>Adventure International</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10918">
- <rom name="robinofsherwood.uef" size="10918" crc="f3569bde" sha1="0f88daa800fe105c468fe97c4f067fcdc4b7b602" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="roboto">
- <description>Roboto</description>
- <year>1985</year>
- <publisher>Bug Byte</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="20298">
- <rom name="roboto_e.uef" size="20298" crc="07e5a556" sha1="af5bc26c8a5fe9e61fac94e08241afd095ae9ace" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="robotron">
- <description>Robotron: 2084</description>
- <year>1983</year>
- <publisher>Atarisoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="13085">
- <rom name="robotron_e.uef" size="13085" crc="8694a598" sha1="9672381a9789e89b989914edf7f277c13a1ebd81" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="rohak">
- <description>Rohak the Swordsman</description>
- <year>1987</year>
- <publisher>Elk Adventure Club</publisher>
- <info name="usage" value="Load with *RUN" />
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Part 1"/>
- <dataarea name="cass" size="12915">
- <rom name="rohaktheswordsman-pt1_be.uef" size="12915" crc="a96635d9" sha1="03d906ac5a6df1c95b7814710b5db0524e7dcfc0" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Part 2"/>
- <dataarea name="cass" size="10388">
- <rom name="rohaktheswordsman-pt2_run_be.uef" size="10388" crc="203423dd" sha1="da7d0ffefe738a31834fcb7b18636cd7fb1c0809" offset="0"/>
- </dataarea>
- </part>
- <part name="cass3" interface="electron_cass">
- <feature name="part_id" value="Part 3"/>
- <dataarea name="cass" size="10530">
- <rom name="rohaktheswordsman-pt3_run_be.uef" size="10530" crc="e9e6fae7" sha1="e75c6deea3ba3cad12d8fa818939220251cff156" offset="0"/>
- </dataarea>
- </part>
- <part name="cass4" interface="electron_cass">
- <feature name="part_id" value="Part 4"/>
- <dataarea name="cass" size="10535">
- <rom name="rohaktheswordsman-pt4_run_be.uef" size="10535" crc="98f13055" sha1="3ca8831ac63c1a88a24acd4db209dc922732041e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="romanemp">
- <description>Roman Empire</description>
- <year>1983</year>
- <publisher>Lothlorien</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6608">
- <rom name="romanempire_be.uef" size="6608" crc="bbb58ac0" sha1="b2f7bd5628444f721b5dc71f156b5ef77aba4992" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="roundone">
- <description>Round Ones</description>
- <year>1988</year>
- <publisher>Alternative</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="19294">
- <rom name="roundones_be.uef" size="19294" crc="16f34fdf" sha1="1bd9baa99c04d167f2f3804627e2a390db0e047e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="rowfour">
- <description>Row of Four</description>
- <year>1983</year>
- <publisher>Software For All</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="4581">
- <rom name="rowoffour_be.uef" size="4581" crc="fdaf772b" sha1="80ac6f1832f123fe3c70d96aef646389570bf516" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="rtcbirmi">
- <description>RTC Birmingham</description>
- <year>1987</year>
- <publisher>Dee-Kay</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8222">
- <rom name="rtcbirmingham_be.uef" size="8222" crc="ef8b2908" sha1="4c18a4b2f63e4f811ea54b2ed03710f18e20a402" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="rtccrewe">
- <description>RTC Crewe</description>
- <year>1987</year>
- <publisher>Dee-Kay</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8527">
- <rom name="rtccrewe_be.uef" size="8527" crc="56eec158" sha1="785f4f2fa8fedc287e80c0ea60675e884dc95402" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="rtcdonca">
- <description>RTC Doncaster</description>
- <year>1988</year>
- <publisher>Dee-Kay</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7551">
- <rom name="rtcdoncaster_be.uef" size="7551" crc="abced791" sha1="750cf1971d166bff1d08229a416160439c74c6a0" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="rubbletr">
- <description>Rubble Trouble</description>
- <year>1983</year>
- <publisher>Micro Power</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="12583">
- <rom name="rubbletrouble_e.uef" size="12583" crc="191358a8" sha1="f24aebb06c8ea02ed1548b40b3ee77d43a0c14a5" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="runestaf">
- <description>Runestaff</description>
- <year>1987</year>
- <publisher>Squaresoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="13665">
- <rom name="runestaff_e.uef" size="13665" crc="b9fc46ca" sha1="79f1f1c51ab96df3bc0f65f9c39e5511e6ae7035" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="sadimcas">
- <description>Sadim Castle</description>
- <year>1984</year>
- <publisher>MP Software</publisher>
- <info name="usage" value="Load with *RUN" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="20252">
- <rom name="sadimcastle_run_be.uef" size="20252" crc="4f26b1c8" sha1="de2cf82eecb1d18d2dc5a045735a588cd34b4c5c" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="rhansont">
- <description>The Rick Hanson Trilogy</description>
- <year>1986</year>
- <publisher>Robico</publisher>
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Rick Hanson"/>
- <dataarea name="cass" size="19658">
- <rom name="rht1-rickhanson_e.uef" size="19658" crc="8ebf9066" sha1="6680a569e9c64d9732e682bcfa4777fcc53ca227" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Project Thesius"/>
- <dataarea name="cass" size="17438">
- <rom name="rht2-projectthesius_e.uef" size="17438" crc="85c5a75d" sha1="f69d93e207e68fd1f72aefbe1036e2e5dfec4471" offset="0"/>
- </dataarea>
- </part>
- <part name="cass3" interface="electron_cass">
- <feature name="part_id" value="Myorem"/>
- <dataarea name="cass" size="21686">
- <rom name="rht3-myorem_e.uef" size="21686" crc="267807b1" sha1="781fc48b78a443df662820cd17b529b79cb825ff" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="saigon">
- <description>Saigon</description>
- <year>1988</year>
- <publisher>Tynesoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="28491">
- <rom name="saigon_e.uef" size="28491" crc="f48ca2c4" sha1="0f488b5fbd81830cc8e974a8c6c96f97167482c1" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="saracoid">
- <description>Saracoid</description>
- <year>1984</year>
- <publisher>Audiogenic</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7507">
- <rom name="saracoid_e.uef" size="7507" crc="219323db" sha1="25a8b0d07fef72872b4192e747955d95d7b5d4fa" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="sascomm">
- <description>SAS Commander</description>
- <year>1984</year>
- <publisher>Comsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7282">
- <rom name="sascommander_e.uef" size="7282" crc="613f9c22" sha1="2396b0aebf869e66d8834e598643c8f311a0073b" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="savagei1">
- <description>Savage Island Part One</description>
- <year>198?</year>
- <publisher>Adventure International</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11462">
- <rom name="adv10-savageislandpartone_e.uef" size="11462" crc="363e70cc" sha1="7714f8846ae804456f66309e23194adfa7239024" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="savagei2">
- <description>Savage Island Part Two</description>
- <year>198?</year>
- <publisher>Adventure International</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9995">
- <rom name="adv11-savageislandparttwo_e.uef" size="9995" crc="5bc8a9cb" sha1="f23915d3c38aea05983cc7f07fbb7901eb665dfd" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="savponds">
- <description>Savage Pond</description>
- <year>1984</year>
- <publisher>Starcade</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11724">
- <rom name="savagepond-starcade_e.uef" size="11724" crc="8adca171" sha1="e1fd1738b68bff6eb5507a9da30e8eb651ea2d3e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="savpondb" cloneof="savponds">
- <description>Savage Pond (Bug Byte)</description>
- <year>1986</year>
- <publisher>Bug Byte</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11724">
- <rom name="savagepond-starcade_e.uef" size="11724" crc="8adca171" sha1="e1fd1738b68bff6eb5507a9da30e8eb651ea2d3e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="scfiquiz">
- <description>Science Fiction Quiz</description>
- <year>1983</year>
- <publisher>Acornsoft/Ivan Berg</publisher>
- <info name="release" value="XBX05" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="55315">
- <rom name="sciencefictionquiz_be.uef" size="55315" crc="67f74c65" sha1="351eedce83d731fad6ac908d3fe7687fba4dbed5" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="seaqueen">
- <description>Sea Queen</description>
- <year>198?</year>
- <publisher>Danosoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="13589">
- <rom name="seaqueen_be.uef" size="13589" crc="c83e6bb5" sha1="65092d1c9574082caf99c40640a14e3e131db520" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="secrmiss">
- <description>Secret Mission</description>
- <year>198?</year>
- <publisher>Adventure International</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10480">
- <rom name="adv3-secretmission_e.uef" size="10480" crc="23c6b7ab" sha1="7e7d96457ab4db055182961b4bc118bc8f4fb1e4" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="serplair">
- <description>Serpents Lair</description>
- <year>1984</year>
- <publisher>Comsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11358">
- <rom name="serpentslair_e.uef" size="11358" crc="8ddf18e8" sha1="b5516c78c4c84e7310c8e8e31af67e5a01a0c9ec" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="shangwar">
- <description>Shanghai Warriors</description>
- <year>1989</year>
- <publisher>Players</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="15972">
- <rom name="shanghaiwarriors_e.uef" size="15972" crc="5f17e8b0" sha1="f8896fe6bc8eb4fa17ea82ed28a693c7a424ce02" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="shark">
- <description>Shark</description>
- <year>1988</year>
- <publisher>Audiogenic</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10319">
- <rom name="shark_e.uef" size="10319" crc="133e764c" sha1="6a0f427be8a5d6a43be448c143492ba117c7bf07" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="sharkatt">
- <description>Shark Attack</description>
- <year>1984</year>
- <publisher>Romik</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6501">
- <rom name="sharkattack_e.uef" size="6501" crc="f6a2f032" sha1="2b64269037575d71fe85c065a970f2dd32aba2d8" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="shbounds">
- <description>Shedmaster Bounds Green</description>
- <year>1987</year>
- <publisher>Dee-Kay</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7782">
- <rom name="shedmasterboundsgreen_be.uef" size="7782" crc="3b4b1e8c" sha1="7b89e3a903d026d2a380e1855b953e5ebf610cde" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="shfinpar">
- <description>Shedmaster Finsbury Park</description>
- <year>198?</year>
- <publisher>Dee-Kay</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7479">
- <rom name="shedmasterfinsburypark_be.uef" size="7479" crc="d611e533" sha1="88970796ea38b34f3809ffb2d2dfa642c700c396" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="shuffle">
- <description>Shuffle</description>
- <year>1986</year>
- <publisher>Budgie</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6885">
- <rom name="shuffle_e.uef" size="6885" crc="e3ccb0ea" sha1="dc1ec36cdda288a9dd1bf9393f10aceb25e1086c" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="sim">
- <description>Sim</description>
- <year>1984</year>
- <publisher>Viper</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9991">
- <rom name="sim_e.uef" size="9991" crc="f03211db" sha1="d946694f4f4ef41276f4e7532872fb218e03450d" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="simcity">
- <description>Sim City</description>
- <year>1990</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="38841">
- <rom name="simcity_e.uef" size="38841" crc="10ef6a87" sha1="37697968209bdb615ceb7777be46046155b219a0" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="skirmish">
- <description>Skirmish</description>
- <year>1988</year>
- <publisher>Godax</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10897">
- <rom name="skirmish_e.uef" size="10897" crc="0175c0fc" sha1="835f25030b0bfae5b27384777abfd72e96d85fee" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="skirmishpias" cloneof="skirmish">
- <description>Skirmish (Play It Again Sam-12)</description>
- <year>1990</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11931">
- <rom name="skirmish-piasrr_e.uef" size="11931" crc="669bd812" sha1="ae1aa50f21fac574b6d9c72da76022d7df13ae0f" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="skyhawk">
- <description>Skyhawk</description>
- <year>1986</year>
- <publisher>Bug Byte</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="5491">
- <rom name="skyhawk-Bug Byte_be.uef" size="5491" crc="80d12790" sha1="87ced191b307d55ec7c38b380ba134d4475832d2" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="smashgra">
- <description>Smash and Grab</description>
- <year>1984</year>
- <publisher>Superior Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9019">
- <rom name="smashandgrab_e.uef" size="9019" crc="fe412fe1" sha1="860c86089299a4671bbed16cbc4442b98ff434b4" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="smashgrabsc" cloneof="smashgra">
- <description>Smash and Grab (The Superior Collection Vol.3)</description>
- <year>1987</year>
- <publisher>Superior Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9033">
- <rom name="smashandgrab-scrr_e.uef" size="9033" crc="a28d54aa" sha1="31c7250b59437dc2b3d3c21d6a8cbe043147c81f" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="snake">
- <description>Snake</description>
- <year>198?</year>
- <publisher>Kansas</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="3019">
- <rom name="snake-Kansas_e.uef" size="3019" crc="fd3f7380" sha1="7330c7d1d92ab9a3423c3a801e0878ac032097a8" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="snapper">
- <description>Snapper</description>
- <year>1983</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="SLG04" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7514">
- <rom name="snapper_e.uef" size="7514" crc="569815e4" sha1="7591e35f26d55145e6f5639b3e0cf4e19aa24574" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="snapperpias" cloneof="snapper">
- <description>Snapper (Play It Again Sam 7)</description>
- <year>1989</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11701">
- <rom name="snapper-piasrr_e.uef" size="11701" crc="50996121" sha1="9b24fa9909d0e0b0871d556777ba1aaadbe18403" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="snookerv">
- <description>Snooker (Visions)</description>
- <year>198?</year>
- <publisher>Visions</publisher>
- <info name="usage" value="Load with *RUN" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6430">
- <rom name="snooker-visions_run_e.uef" size="6430" crc="16cd27be" sha1="ef303579c2309f083f699b8162ec0c44a77bdeab" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="snookerb" cloneof="snookera">
- <description>Snooker (Blue Ribbon)</description>
- <year>198?</year>
- <publisher>Superior Software/Blue Ribbon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7094">
- <rom name="snooker-srr_e.uef" size="7094" crc="28073ff6" sha1="2f5b21560bd9da06cb713dffeb9fd4722efc507a" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="snookera">
- <description>Snooker (Acornsoft)</description>
- <year>1983</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="SLG21" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7690">
- <rom name="snooker-acornsoft_e.uef" size="7690" crc="654e44dc" sha1="4963029ab451dc8b605b3523d8c4892e4b68724a" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="soccboss">
- <description>Soccer Boss</description>
- <year>1989</year>
- <publisher>Alternative</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8806">
- <rom name="soccerboss_be.uef" size="8806" crc="098d960c" sha1="923c4f65eb252eb685a66da0a6a9fb0fb930e8cc" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="soccersu">
- <description>Soccer Supremo</description>
- <year>1984</year>
- <publisher>Qualsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8680">
- <rom name="soccersupremo_e.uef" size="8680" crc="6b8c32f6" sha1="f6e4a20ba9afddbc7e5e3f49ecbb5ab671d294e5" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="softcent">
- <description>The Soft Centre Collection</description>
- <year>1985</year>
- <publisher>Soft Centre</publisher>
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Dicer"/>
- <dataarea name="cass" size="4656">
- <rom name="sc-dicer_e.uef" size="4656" crc="00bbb6cf" sha1="7652d025345c695be33ea565752158197b86a369" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Fortune Valley"/>
- <dataarea name="cass" size="8049">
- <rom name="sc-fortunevalley_e.uef" size="8049" crc="63d32be6" sha1="8b80bd9ed27d6114267dc6bea2800868928ae6c9" offset="0"/>
- </dataarea>
- </part>
- <part name="cass3" interface="electron_cass">
- <feature name="part_id" value="Hi-Lo"/>
- <dataarea name="cass" size="4786">
- <rom name="sc-hilo_e.uef" size="4786" crc="d68593e2" sha1="1a36d7e1b5d801d40dadf4dd6a7e98aa4cbfdaae" offset="0"/>
- </dataarea>
- </part>
- <part name="cass4" interface="electron_cass">
- <feature name="part_id" value="The Lost Treasure"/>
- <dataarea name="cass" size="6274">
- <rom name="sc-losttreasureofkingraybon_e.uef" size="6274" crc="ea044297" sha1="9841e6f88859703a4ad2dd3b76d45465e059cd7f" offset="0"/>
- </dataarea>
- </part>
- <part name="cass5" interface="electron_cass">
- <feature name="part_id" value="The Search"/>
- <dataarea name="cass" size="9640">
- <rom name="sc-searchforprincesslavinia_e.uef" size="9640" crc="b30fcee3" sha1="2bb74cd5e64c181daafb1dc68d3b806434dc0b87" offset="0"/>
- </dataarea>
- </part>
- <part name="cass6" interface="electron_cass">
- <feature name="part_id" value="Snowball"/>
- <dataarea name="cass" size="5469">
- <rom name="sc-snowball_e.uef" size="5469" crc="d92fce45" sha1="5c9b4916a5a73d0d04cdfb7dd8b3e5a56c260013" offset="0"/>
- </dataarea>
- </part>
- <part name="cass7" interface="electron_cass">
- <feature name="part_id" value="Super Hanger"/>
- <dataarea name="cass" size="5485">
- <rom name="sc-superhanger_e.uef" size="5485" crc="1403ab03" sha1="17365f1ea7f05ac0ccdd9261772a8e5f8ca7a1a8" offset="0"/>
- </dataarea>
- </part>
- <part name="cass8" interface="electron_cass">
- <feature name="part_id" value="Wizard Adventure"/>
- <dataarea name="cass" size="6239">
- <rom name="sc-wizardadventure_e.uef" size="6239" crc="1ffd91f9" sha1="5318b80c5a7221692810378b5bcdf37e51e6b506" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="sorcclay">
- <description>Sorceror of Claymorgue Castle</description>
- <year>198?</year>
- <publisher>Adventure International</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10674">
- <rom name="adv13-sorcerorclaymorguecastle_e.uef" size="10674" crc="5026b8ff" sha1="4d1a62ccc21807327d95b17446cb7f8291cd5a0d" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="sdevonhy">
- <description>South Devon Hydraulics</description>
- <year>1986</year>
- <publisher>Dee-Kay</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9817">
- <rom name="southdevonhydraulics_be.uef" size="9817" crc="077ca5a1" sha1="3740634d311e3c629fca3ddc9bb2c7f2fb096100" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="sbelle">
- <description>Southern Belle</description>
- <year>1986</year>
- <publisher>Hewson Consultants</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="16183">
- <rom name="southernbelle_e.uef" size="16183" crc="6d39c1a6" sha1="d174e159510b4f167a6e1c3654f5c25846fb58aa" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="spcavern">
- <description>Space Caverns</description>
- <year>1985</year>
- <publisher>Tynesoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6316">
- <rom name="spacecaverns_e.uef" size="6316" crc="18acc989" sha1="8636f944874eaf2b1eb0425be1528a80543330b5" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="spranger">
- <description>Space Ranger</description>
- <year>1986</year>
- <publisher>Audiogenic</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7724">
- <rom name="spaceranger_e.uef" size="7724" crc="c2c09a47" sha1="af62353a6af734a2e754b8308b992ded2d710d01" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="spshuttm">
- <description>Space Shuttle</description>
- <year>1983</year>
- <publisher>Microdeal</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7794">
- <rom name="spaceshuttle-microdeal_e.uef" size="7794" crc="534d2759" sha1="104010b64d9f15938e6cd4359639db90e50b5494" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="spstatal">
- <description>Space Station Alpha</description>
- <year>198?</year>
- <publisher>Icon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6307">
- <rom name="spacestationalpha_e.uef" size="6307" crc="1d1cced2" sha1="9edbf0e085a69099dbecc76f83c665ed8f61394c" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="spmansid">
- <description>Spaceman Sid</description>
- <year>1984</year>
- <publisher>English Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="13211">
- <rom name="spacemansid_e.uef" size="13211" crc="6536a2ce" sha1="ad746d17be4b28bca800455e6e88005934a7a9b1" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="spascal">
- <description>S-Pascal (Ger)</description>
- <year>198?</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="GLL08" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11630">
- <rom name="s-pascal-german_e.uef" size="11630" crc="53c25588" sha1="4a8e2266630498aedb78bf29a465b66e3b9e70a6" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="specops">
- <description>Special Operations</description>
- <year>1984</year>
- <publisher>Lothlorien</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="20282">
- <rom name="specialoperations_be.uef" size="20282" crc="a5f811fc" sha1="d6a1d9eec0389855e3c97b6310ef94beaacf2040" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="spectape">
- <description>Spectapede</description>
- <year>198?</year>
- <publisher>Mastertronic</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7966">
- <rom name="spectipede_e.uef" size="7966" crc="cdad7ba3" sha1="078a673a5aebb7f514442e271677053ccc30f3d7" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="spellbin">
- <description>Spellbinder</description>
- <year>1987</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="30405">
- <rom name="spellbinder_e.uef" size="30405" crc="f6fe04d2" sha1="4faac857762f7ddadd17a515f8c08020f9977139" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="sphdest">
- <description>Sphere of Destiny</description>
- <year>1986</year>
- <publisher>Audiogenic</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="21816">
- <rom name="sphereofdestiny_e.uef" size="21816" crc="a2584c25" sha1="c17c92c3af2c792c1d5f416247a7ea456bace4f7" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="sphdest2">
- <description>Sphere of Destiny 2</description>
- <year>1988</year>
- <publisher>Audiogenic</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="18220">
- <rom name="sphereofdestiny2_e.uef" size="18220" crc="9023bbc1" sha1="0e8e94b2c55cc18865c1b0d8c7c0dcd27fd42eee" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="sphinx">
- <description>Sphinx Adventure</description>
- <year>1983</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="SLG07" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11661">
- <rom name="sphinxadventure_e.uef" size="11661" crc="1d085545" sha1="7c8b17104fc143523ccc499db087a1cea36e0e14" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="spidermn">
- <description>Spiderman</description>
- <year>198?</year>
- <publisher>Adventure International</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10529">
- <rom name="questprobespiderman_e.uef" size="10529" crc="794f3bf3" sha1="87edf82ed7a4ed0551629ddd616b41b0d3f0ec3b" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="spit40a" cloneof="spit40">
- <description>Spitfire 40 (Alternative)</description>
- <year>198?</year>
- <publisher>Alternative</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="20832">
- <rom name="spitfire40_e.uef" size="20832" crc="6cf84fda" sha1="b8c1835a6170ede55124abe708e23a274d57030c" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="spit40">
- <description>Spitfire 40</description>
- <year>1985</year>
- <publisher>Mirrorsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="20832">
- <rom name="spitfire40_e.uef" size="20832" crc="6cf84fda" sha1="b8c1835a6170ede55124abe708e23a274d57030c" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="spooksv">
- <description>Spooksville</description>
- <year>1988</year>
- <publisher>Blue Ribbon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10193">
- <rom name="spooksville_e.uef" size="10193" crc="e596b5df" sha1="688d81632f67ce4879d3b848f7efbf71f8937f20" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="sporttri">
- <description>Sporting Triangles</description>
- <year>1990</year>
- <publisher>CDS</publisher>
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Tape 1"/>
- <dataarea name="cass" size="38897">
- <rom name="sportingtrianglescassette1_be.uef" size="38897" crc="c37b2b57" sha1="30bbc74cce8ac3662e3243e9369533068d8db52e" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Tape 2"/>
- <dataarea name="cass" size="46327">
- <rom name="sportingtrianglescassette2_be.uef" size="46327" crc="9481e84b" sha1="f27c48b6cb378b401578a4d112b56448d550b06d" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="spyvsspy">
- <description>Spy vs Spy</description>
- <year>1984</year>
- <publisher>Tynesoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="22140">
- <rom name="spyvsspy_e.hq.uef" size="22140" crc="447a7e94" sha1="4dd149fad133ac7da2c7f5302dd6265059d50f29" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="spycat">
- <description>Spycat</description>
- <year>1988</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="29114">
- <rom name="spycat_e.uef" size="29114" crc="1ff5b7a9" sha1="f9f2b1c1bb62666d29f98834dd2b6d50a31089d8" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="squeakal">
- <description>Squeakaliser</description>
- <year>198?</year>
- <publisher>Bug Byte</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="14002">
- <rom name="squeakaliser_e.uef" size="14002" crc="13d18c17" sha1="95ad073d21f5cf17b325d9c9a62ce11a56be841e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="stairhel">
- <description>Stairway to Hell</description>
- <year>1985</year>
- <publisher>Software Invasion</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="21413">
- <rom name="stairwaytohell_e.hq.uef" size="21413" crc="e608f3ab" sha1="8d759e7bd1d916197a6081b3de6756afb3643d03" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="stardrif">
- <description>Star Drifter</description>
- <year>1985</year>
- <publisher>Firebird</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="14000">
- <rom name="t-star.uef" size="14000" crc="0927e824" sha1="af31c00d9284a6651ca95c06280d30f8581cbdf6" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="starfo7">
- <description>Star Force Seven</description>
- <year>198?</year>
- <publisher>Bug Byte</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="17465">
- <rom name="starforceseven_e.uef" size="17465" crc="fc1e2dbc" sha1="c632dcfcfe7aa6620a85cd4a9825e1860f6fa882" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="starport">
- <description>Star Port</description>
- <year>1990</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="15852">
- <rom name="starport_e.uef" size="15852" crc="8ff7890a" sha1="c1d8331832d8f235571fb7be391e81de88156c02" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="starseek">
- <description>Star Seeker</description>
- <year>1985</year>
- <publisher>Mirrorsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="12077">
- <rom name="starfinder_be.uef" size="12077" crc="69d1bd3e" sha1="f2a5d0ed65165bbc72075569a3eb1d3890131363" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="starwars">
- <description>Star Wars</description>
- <year>1987</year>
- <publisher>Domark</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="20622">
- <rom name="starwars_e.uef" size="20622" crc="dde11b62" sha1="0417c0d7c105a46e0b2bd0a33e411ed4241a57c6" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="starmaz2">
- <description>Starmaze 2</description>
- <year>1984</year>
- <publisher>Mastertronic</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="3506">
- <rom name="starmaze2_e.uef" size="3506" crc="f648f96d" sha1="b0fd7e341103c8886ac7f7a122ddfcd3bfd3951a" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="sshipcom">
- <description>Starship Command</description>
- <year>1983</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="SLG22" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="12960">
- <rom name="starshipcommand_e.uef" size="12960" crc="ca76b98c" sha1="edc260b941fa55e4b2306ce4ccab258d43dfd927" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="sshipcomg" cloneof="sshipcom">
- <description>Starship Command (Ger)</description>
- <year>1983</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="GLG22" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="12613">
- <rom name="starshipcommand-german_e.uef" size="12613" crc="919aad02" sha1="37b39530bf5e28a919d4d4d9f4e5f16bed1898db" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="starques">
- <description>Starship Quest</description>
- <year>1987</year>
- <publisher>Elk Adventure Club</publisher>
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Part 1"/>
- <dataarea name="cass" size="12656">
- <rom name="starshipquest-pt1_be.uef" size="12656" crc="01577bd6" sha1="3b6173f5a48d92b95daa4e2247400717edfa1439" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Part 2"/>
- <dataarea name="cass" size="10241">
- <rom name="starshipquest-pt2_be.uef" size="10241" crc="36a649cf" sha1="1fa123d966b27be8e23b884f1a35faa8c96f3ae8" offset="0"/>
- </dataarea>
- </part>
- <part name="cass3" interface="electron_cass">
- <feature name="part_id" value="Part 3"/>
- <dataarea name="cass" size="10653">
- <rom name="starshipquest-pt3_be.uef" size="10653" crc="c37fd2e4" sha1="10716471f6dfee7e969c5d93e8103d1752c06ec0" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="sshipcomb" cloneof="sshipcom">
- <description>Starship Command (Blue Ribbon)</description>
- <year>198?</year>
- <publisher>Superior Software/Blue Ribbon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="12942">
- <rom name="starshipcommand-srr_e.uef" size="12942" crc="22b05b65" sha1="fad352844467b018950d31ed23e9f4f82c07f5be" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="spkbegin">
- <description>Starter Pack: Beginners</description>
- <year>1984</year>
- <publisher>Collins Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="30097">
- <rom name="electronstarterpack_e.uef" size="30097" crc="5c4bab0e" sha1="5d70c9e9ff3d4bf0a997528e2c307f652b4c079e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="stdsnook">
- <description>Steve Davis Snooker</description>
- <year>1986</year>
- <publisher>CDS</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7405">
- <rom name="stevedavissnooker_e.uef" size="7405" crc="940ccdac" sha1="9014148148c811d58d45dc3b124d5f8ffd9a81b1" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="stdnookpias" cloneof="stdsnook">
- <description>Steve Davis Snooker (Play It Again Sam 9)</description>
- <year>1989</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="12624">
- <rom name="stevedavissnooker-piasrr_e.uef" size="12624" crc="a2a229b5" sha1="fa0770a74bb2737d2553e585a75116d8d5f7f450" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="stix">
- <description>Stix</description>
- <year>1984</year>
- <publisher>Supersoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="4492">
- <rom name="stix_e.uef" size="4492" crc="698b8877" sha1="9a8856e7e40e2be0c2c73e093225135a6943f29e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="stockcar">
- <description>Stock Car</description>
- <year>1983</year>
- <publisher>Micro Power</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11478">
- <rom name="stockcar_e.uef" size="11478" crc="2c43f4d0" sha1="070045bfe56bcf4363aa0117ae24dd2995235ea2" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="stormcyc">
- <description>Stormcycle</description>
- <year>1989</year>
- <publisher>Atlantis</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="13579">
- <rom name="stormcycle_e.uef" size="13579" crc="94700802" sha1="1c0c54683180feb97f3f8c275c40b72ecf7080fd" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="stranded">
- <description>Stranded</description>
- <year>1984</year>
- <publisher>Superior Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9833">
- <rom name="stranded_e.uef" size="9833" crc="b1b52331" sha1="45ce15992f2a28345fc88d0e75e84aa4bfa5bf7c" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="strodyss">
- <description>Strange Odyssey</description>
- <year>198?</year>
- <publisher>Adventure International</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11109">
- <rom name="adv6-strangeodyssey_e.uef" size="11109" crc="3cb694a1" sha1="21fd80e71466de072eac063266c880a042056429" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="stratobo">
- <description>Stratobomber</description>
- <year>1983</year>
- <publisher>I.J.K.</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="5421">
- <rom name="stratobomber_e.uef" size="5421" crc="8968e42d" sha1="a684f095514869f1702224f16302de8d3100b389" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="sharriera" cloneof="sharrier">
- <description>Strike Force Harrier (Alternative)</description>
- <year>198?</year>
- <publisher>Alternative</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="19114">
- <rom name="strikeforceharrier_e.uef" size="19114" crc="89a899a0" sha1="f1ee839e42e29ca0499d99ec020acd5144c86244" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="sharrier">
- <description>Strike Force Harrier</description>
- <year>1985</year>
- <publisher>Mirrorsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="19114">
- <rom name="strikeforceharrier_e.uef" size="19114" crc="89a899a0" sha1="f1ee839e42e29ca0499d99ec020acd5144c86244" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="spoker2p">
- <description>Strip Poker II Plus</description>
- <year>1989</year>
- <publisher>Anco</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="46260">
- <rom name="strippokeriiplus_be.uef" size="46260" crc="e81d48d6" sha1="87c9850f784ead3c638e04a5845aa58291964d25" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="strip2">
- <description>Stripper II</description>
- <year>198?</year>
- <publisher>Aggressive</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="919">
- <rom name="stripperii_be.uef" size="919" crc="71afdc6e" sha1="1f5b5120a20119d0ec5a001fabecf33e99cf6457" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="strykun">
- <description>Stryker's Run</description>
- <year>1986</year>
- <publisher>Superior Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="14205">
- <rom name="strykersrun_e.uef" size="14205" crc="758aae1b" sha1="8447c8178f28b40669580fe7663fad8f3544cd48" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="subwayvi">
- <description>Subway Vigilante</description>
- <year>1989</year>
- <publisher>Players</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="17024">
- <rom name="subwayvigilante_e.uef" size="17024" crc="dbc6ab06" sha1="b7f94b01c44d2ee6f072911f82cfc5a1e0bc9e8e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="suds">
- <description>Suds</description>
- <year>1986</year>
- <publisher>Riverdale</publisher>
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Part 1"/>
- <dataarea name="cass" size="10780">
- <rom name="suds-pt1_be.uef" size="10780" crc="76d35920" sha1="c895df01063eaf068e860c6d21ac4191edefd157" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Part 2"/>
- <dataarea name="cass" size="9860">
- <rom name="suds-pt2_be.uef" size="9860" crc="a65f7dba" sha1="f0501a881ffb55460efb60a6d3e3e01dbb8ac808" offset="0"/>
- </dataarea>
- </part>
- <part name="cass3" interface="electron_cass">
- <feature name="part_id" value="Part 3"/>
- <dataarea name="cass" size="9081">
- <rom name="suds-pt3_be.uef" size="9081" crc="664a6f48" sha1="9bd6d372a82a4a0d0f5ca6752cecf055d70fbaa6" offset="0"/>
- </dataarea>
- </part>
- <part name="cass4" interface="electron_cass">
- <feature name="part_id" value="Part 4"/>
- <dataarea name="cass" size="9271">
- <rom name="suds-pt4_be.uef" size="9271" crc="6d0ceb39" sha1="367229021238c2910c9feda6f3cf1217fba0dd36" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="fss1">
- <description>FSS1 - Super Spy Flint</description>
- <year>1983</year>
- <publisher>Potter</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8271">
- <rom name="fss1-superspyflint_be.uef" size="8271" crc="7604bb35" sha1="91a7555f8095642bf7fd7e24eaad34a15bf4dea1" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="suprgolf">
- <description>Super Golf</description>
- <year>1984</year>
- <publisher>Squirrel</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6675">
- <rom name="supergolf_e.uef" size="6675" crc="7d7ceb7a" sha1="892fdd57552c289182a00f1df53fc1c023077733" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="suprhang">
- <description>Super Hangman</description>
- <year>1983</year>
- <publisher>I.J.K.</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8053">
- <rom name="superhangman_e.uef" size="8053" crc="3d4b6dbf" sha1="8d9e8c972f8ec5b450190ba72eeece3134a2c18f" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="suprpool">
- <description>Super Pool</description>
- <year>1984</year>
- <publisher>Software Invasion</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9592">
- <rom name="superpool_e.uef" size="9592" crc="24dbd09f" sha1="0cea7a369f2fe17f53400e5609caec5b48f26d69" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="sfruit">
- <description>Super Fruit</description>
- <year>1984</year>
- <publisher>Simonsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8552">
- <rom name="superfruit.uef" size="8552" crc="adccd49d" sha1="2ae87477163e0cca635ecf360b986db893f41984" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="supsocc">
- <description>Superior Soccer</description>
- <year>1989</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="21116">
- <rom name="superiorsoccer_e.uef" size="21116" crc="2e319279" sha1="74779d0899ec6f5d4ae23937836b89b2bba82245" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="suprmang">
- <description>Superman: The Game</description>
- <year>1988</year>
- <publisher>First Star</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="15357">
- <rom name="supermanthegame_be.uef" size="15357" crc="860d0e26" sha1="4153e20a68d95ed47a9d832b79c5af8b361afe89" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="survivrs">
- <description>Survivors</description>
- <year>1987</year>
- <publisher>Atlantis</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8444">
- <rom name="survivors_be.uef" size="8444" crc="a58f3496" sha1="14e19156a333e4ae8afb366224a45bd9f718352e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="swag">
- <description>Swag</description>
- <year>1984</year>
- <publisher>Micro Power</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9742">
- <rom name="swag_e.uef" size="9742" crc="565bb9f2" sha1="a688e433d52cc8cec96bfcff7c69f14a5ddde8c5" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="swoop">
- <description>Swoop</description>
- <year>1983</year>
- <publisher>Micro Power</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6385">
- <rom name="swoop_e.uef" size="6385" crc="1bf5d75f" sha1="07dbc5d53fa2808903f4bfaed253edb3d558d8f4" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="symmetry">
- <description>Symmetry</description>
- <year>198?</year>
- <publisher>Garland Computing</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6781">
- <rom name="symmetry_be.uef" size="6781" crc="825eb59d" sha1="4e0e12e537d77cccfddab088118527c92e848c12" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="syncron">
- <description>Syncron (The Superior Collection Vol.3)</description>
- <year>1987</year>
- <publisher>Superior Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="26651">
- <rom name="syncron_e.uef" size="26651" crc="e0469b62" sha1="a9159b3d29b15035e1e2874bafce54112d397bb6" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="system8">
- <description>System_8</description>
- <year>198?</year>
- <publisher>Blue Ribbon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="5859">
- <rom name="system8_e.uef" size="5859" crc="fe6848bc" sha1="f009431d01a4dcf8a47a5bb140853911a77c8178" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="arabiann">
- <description>Tales of the Arabian Nights</description>
- <year>1985</year>
- <publisher>Interceptor</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9777">
- <rom name="talesofthearabiannights_be.uef" size="9777" crc="5c7a784d" sha1="ba02ec2b041ad0f6692cbcb727536b089898c87d" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="tankattc">
- <description>Tank Attack</description>
- <year>1989</year>
- <publisher>CDS</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="12961">
- <rom name="tankattack_be.uef" size="12961" crc="e267006e" sha1="c15e57b3792d7bb1c5f385f5c32e6066537640c3" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="tarzan">
- <description>Tarzan</description>
- <year>1987</year>
- <publisher>Martech</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="26499">
- <rom name="t-tarz.uef" size="26499" crc="a64011f9" sha1="9797a0a746a450287c024be8a71b168406ef31a9" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="tarzanb">
- <description>Tarzan Boy</description>
- <year>1984</year>
- <publisher>Alligata</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7941">
- <rom name="tarzanboy_e.uef" size="7941" crc="e84d7901" sha1="0ae230a2c4e689f5af1dbf4321d2729e9aa555fd" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="tempest">
- <description>Tempest</description>
- <year>1985</year>
- <publisher>Superior Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8711">
- <rom name="tempest_e.uef" size="8711" crc="95642718" sha1="3ee58f6d80b0e808c4ae6099ac11428e47a9809d" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="templetn">
- <description>Templeton</description>
- <year>1986</year>
- <publisher>Bug Byte</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6644">
- <rom name="templeton_be.uef" size="6644" crc="d8abc060" sha1="ad2b9ce1f6b85bb69a7edba59fa3c78b66ce2165" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="tenindia">
- <description>Ten Little Indians</description>
- <year>1983</year>
- <publisher>Adventure International</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11811">
- <rom name="mystadv10-tenlittleindians_e.uef" size="11811" crc="78cefd7b" sha1="7b76e3d728887fa571ebd07edc924e11aa6f43e5" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="tenbest1">
- <description>Ten of the Best! Vol.1</description>
- <year>1984</year>
- <publisher>Database</publisher>
- <part name="cass0" interface="electron_cass">
- <feature name="part_id" value="Menu"/>
- <dataarea name="cass" size="559">
- <rom name="10best1_e.uef" size="559" crc="b667550e" sha1="6e356a8e2a4487f78cf1dfc05845a2286a0507d8" offset="0"/>
- </dataarea>
- </part>
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Jam Butty"/>
- <dataarea name="cass" size="4959">
- <rom name="10best1-jambutty_e.uef" size="4959" crc="e104ea68" sha1="1ece0e663d567593feec80c1e111fd308b5040d0" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Golf"/>
- <dataarea name="cass" size="2969">
- <rom name="10best1-golf_e.uef" size="2969" crc="fcceaae1" sha1="407d3b5f8bf44bde064aa90f2635b4f0cabf2215" offset="0"/>
- </dataarea>
- </part>
- <part name="cass3" interface="electron_cass">
- <feature name="part_id" value="Haunted House"/>
- <dataarea name="cass" size="6341">
- <rom name="10best1-hauntedhouse_e.uef" size="6341" crc="f220a044" sha1="974000aaf52ca543d8abee93a5dde9a7cad7c9d9" offset="0"/>
- </dataarea>
- </part>
- <part name="cass4" interface="electron_cass">
- <feature name="part_id" value="Space Hike"/>
- <dataarea name="cass" size="3480">
- <rom name="10best1-spacehike_e.uef" size="3480" crc="5e8f24ec" sha1="f335611db4f6396000dfd9828ac6bc7125fa14c2" offset="0"/>
- </dataarea>
- </part>
- <part name="cass5" interface="electron_cass">
- <feature name="part_id" value="Parkys Peril"/>
- <dataarea name="cass" size="1504">
- <rom name="10best1-parkysperil_e.uef" size="1504" crc="eaf06e3d" sha1="7d5f2e3350be3af2407913c4cf1fef44fed50a29" offset="0"/>
- </dataarea>
- </part>
- <part name="cass6" interface="electron_cass">
- <feature name="part_id" value="Rally Driver"/>
- <dataarea name="cass" size="1820">
- <rom name="10best1-rallydriver_e.uef" size="1820" crc="f89f19b6" sha1="b0f53976cd0452b8bec42afdf9452686284a1600" offset="0"/>
- </dataarea>
- </part>
- <part name="cass7" interface="electron_cass">
- <feature name="part_id" value="Alphaswap"/>
- <dataarea name="cass" size="2734">
- <rom name="10best1-alphaswap_e.uef" size="2734" crc="3d5b1c2b" sha1="fe48cf224ff1f74127fad5fe07eb235ff19828c4" offset="0"/>
- </dataarea>
- </part>
- <part name="cass8" interface="electron_cass">
- <feature name="part_id" value="Knockout"/>
- <dataarea name="cass" size="2438">
- <rom name="10best1-knockout_e.uef" size="2438" crc="b764e9d2" sha1="2e53324cc7caf04f07e89d3a29ad5d24b1e25889" offset="0"/>
- </dataarea>
- </part>
- <part name="cass9" interface="electron_cass">
- <feature name="part_id" value="Moneymaze"/>
- <dataarea name="cass" size="2860">
- <rom name="10best1-moneymaze_e.uef" size="2860" crc="7dcb0f6e" sha1="130547b652397e8f04cfe4080f91286ef1541b4a" offset="0"/>
- </dataarea>
- </part>
- <part name="cass10" interface="electron_cass">
- <feature name="part_id" value="Lander"/>
- <dataarea name="cass" size="2425">
- <rom name="10best1-lander_e.uef" size="2425" crc="556dfa34" sha1="02c14af7ac4582841c4a23dca80e028d5c2c8c87" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="tenbest2">
- <description>Ten of the Best! Vol.2</description>
- <year>1984</year>
- <publisher>Database</publisher>
- <part name="cass0" interface="electron_cass">
- <feature name="part_id" value="Menu"/>
- <dataarea name="cass" size="562">
- <rom name="10best2_e.uef" size="562" crc="ad06e132" sha1="ed991e494fd668da214d4105d0bef0d7a43421a9" offset="0"/>
- </dataarea>
- </part>
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Atom Smash"/>
- <dataarea name="cass" size="6959">
- <rom name="10best2-atomsmash_e.uef" size="6959" crc="29fc892b" sha1="c74b61e51a5e2eb01408d2e3a3e6d92f8dc27918" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Bunny Blitz"/>
- <dataarea name="cass" size="1666">
- <rom name="10best2-bunny_e.uef" size="1666" crc="1096ee99" sha1="ec1bce94d4194085e627b9e5b55c067e8913a987" offset="0"/>
- </dataarea>
- </part>
- <part name="cass3" interface="electron_cass">
- <feature name="part_id" value="Sandcastle"/>
- <dataarea name="cass" size="5706">
- <rom name="10best2-sandcastle_e.uef" size="5706" crc="579f0cc0" sha1="6b3a5d59a3e2e88b0bc5a23c62bc23b2e6671005" offset="0"/>
- </dataarea>
- </part>
- <part name="cass4" interface="electron_cass">
- <feature name="part_id" value="Reaction Tester"/>
- <dataarea name="cass" size="1206">
- <rom name="10best2-reactiontester_e.uef" size="1206" crc="97edffb0" sha1="64b747efdfba836d1e4aa3903f24b2a6d1828e3e" offset="0"/>
- </dataarea>
- </part>
- <part name="cass5" interface="electron_cass">
- <feature name="part_id" value="Solitaire"/>
- <dataarea name="cass" size="2327">
- <rom name="10best2-solitaire_e.uef" size="2327" crc="1939d3db" sha1="aa94cf98f3bf18905c8947327571fa8d5590f9ac" offset="0"/>
- </dataarea>
- </part>
- <part name="cass6" interface="electron_cass">
- <feature name="part_id" value="Jumper"/>
- <dataarea name="cass" size="1968">
- <rom name="10best2-jumper_e.uef" size="1968" crc="f47b6881" sha1="48d7574b69d37a3463b0fe70a0c6acfb890ed1a4" offset="0"/>
- </dataarea>
- </part>
- <part name="cass7" interface="electron_cass">
- <feature name="part_id" value="Break Free"/>
- <dataarea name="cass" size="3517">
- <rom name="10best2-breakfree_e.uef" size="3517" crc="d8fb5d4b" sha1="e070e45360841c8d178b10fde9f461cef13b50e0" offset="0"/>
- </dataarea>
- </part>
- <part name="cass8" interface="electron_cass">
- <feature name="part_id" value="Codebreaker"/>
- <dataarea name="cass" size="2108">
- <rom name="10best2-codebreaker_e.uef" size="2108" crc="b260db2f" sha1="b1593a47c0c991b92099a4083175e375b2e49222" offset="0"/>
- </dataarea>
- </part>
- <part name="cass9" interface="electron_cass">
- <feature name="part_id" value="Parachute"/>
- <dataarea name="cass" size="3195">
- <rom name="10best2-parachute_e.uef" size="3195" crc="213b2c35" sha1="4cf4e945073b0779e47d42745bb25abca30a3531" offset="0"/>
- </dataarea>
- </part>
- <part name="cass10" interface="electron_cass">
- <feature name="part_id" value="Star Fight"/>
- <dataarea name="cass" size="4024">
- <rom name="10best2-starfight_e.uef" size="4024" crc="b9f6cd6e" sha1="9986a532523f0faef807ba21bf32a4e12273f99f" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="tenbest3">
- <description>Ten of the Best! Vol.3</description>
- <year>1984</year>
- <publisher>Database</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="49741">
- <rom name="10ofthebestvol3_e.uef" size="49741" crc="dee3ac52" sha1="c485aade8c27e5ac298f39341e6ab576d9af0ea0" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="tennis">
- <description>Tennis</description>
- <year>198?</year>
- <publisher>Bug Byte</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10627">
- <rom name="tennis_e.uef" size="10627" crc="cb521bab" sha1="9a8006ad0812f23bec08212b734252ae7a98ab38" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="dskdiaryg" cloneof="dskdiary">
- <description>Terminkalendar (Ger)</description>
- <year>1983</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="GLB01" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11300">
- <rom name="deskdiary-german_e.uef" size="11300" crc="969f996b" sha1="a4c7000be618e669c04b441f310dbe08a40b8729" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="terrormo">
- <description>Terrormolinos</description>
- <year>1985</year>
- <publisher>Melbourne House</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="22823">
- <rom name="terrormolinos_be.uef" size="22823" crc="b9dfb7e5" sha1="7b6c405998f1f28818d1db11447b10347f3d4396" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="tesselat">
- <description>Tesselator</description>
- <year>1985</year>
- <publisher>Addison-Wesley</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6235">
- <rom name="tesselator.uef" size="6235" crc="7d834881" sha1="19dc360b7624b4d812ebc49f4379affbdecb6cd6" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="tmatch">
- <description>Test Match</description>
- <year>1983</year>
- <publisher>CRL</publisher>
- <part name="cass" interface="electron_cass">
- <feature name="part_id" value="Side 1"/>
- <dataarea name="cass" size="10182">
- <rom name="testmatch-side1_e.uef" size="10182" crc="b366843a" sha1="bf5fb8767ea6f77fc84ab720d4a50527fa211eb2" offset="0"/>
- </dataarea>
- </part>
- <part name="cass" interface="electron_cass">
- <feature name="part_id" value="Side 2"/>
- <dataarea name="cass" size="10560">
- <rom name="testmatch-side2_e.uef" size="10560" crc="027bd6a8" sha1="7388f12afa8bff8d4464f6312ac64d7c5ad4ac2c" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="tetris">
- <description>Tetris</description>
- <year>1988</year>
- <publisher>Mirrorsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6120">
- <rom name="tetris_be.uef" size="6120" crc="ff711e11" sha1="21effa836b3c9e4ed3039c1be205f4e78c86762c" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="thaibox">
- <description>Thai Boxing</description>
- <year>1984</year>
- <publisher>Anco</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8174">
- <rom name="thaiboxing_e.uef" size="8174" crc="215ce725" sha1="502e034b0b382799a941a4e7f2a8fcd7b50d7141" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="thamesl">
- <description>Thames Local</description>
- <year>1986</year>
- <publisher>Dee-Kay</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9334">
- <rom name="thames_local.uef" size="9334" crc="d313a3de" sha1="20db76cc4073b56e2a1049aa3f28b753b07fe8f7" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="advcreat">
- <description>The Adventure Creator</description>
- <year>1986</year>
- <publisher>Incentive</publisher>
- <part name="cass" interface="electron_cass">
- <feature name="part_id" value="Side 1"/>
- <dataarea name="cass" size="11147">
- <rom name="adventurecreator-side1_be.uef" size="11147" crc="ba879f45" sha1="ebe76a4867abe84694710c2524f7886d2ebae4fd" offset="0"/>
- </dataarea>
- </part>
- <part name="cass" interface="electron_cass">
- <feature name="part_id" value="Side 2"/>
- <dataarea name="cass" size="6335">
- <rom name="adventurecreator-side2_be.uef" size="6335" crc="e6ae14f8" sha1="d17790b4f51ae0439016897148c6a0c9f5c47c60" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="artstudi">
- <description>The Art Studio</description>
- <year>1989</year>
- <publisher>Impact</publisher>
- <part name="cass" interface="electron_cass">
- <feature name="part_id" value="Side 1 MODE4"/>
- <dataarea name="cass" size="12647">
- <rom name="theartstudio-side1mode4_be.uef" size="12647" crc="df5049f8" sha1="cb37bd80c626f88e2de6d3b05838606ecff7ca5f" offset="0"/>
- </dataarea>
- </part>
- <part name="cass" interface="electron_cass">
- <feature name="part_id" value="Side 2 MODE5"/>
- <dataarea name="cass" size="13064">
- <rom name="theartstudio-side2mode5_be.uef" size="13064" crc="22ab434f" sha1="a2e8a9373ca60f576d16e795e82e3e8eacd62595" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="axeofkol">
- <description>The Axe of Kolt</description>
- <year>1987</year>
- <publisher>Elk Adventure Club</publisher>
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Part 1"/>
- <dataarea name="cass" size="14406">
- <rom name="axeofkolt-pt1_be.uef" size="14406" crc="05ca98fc" sha1="0b0a6ab7e88fdb353e6103cb099eeefed1c726d5" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Part 2"/>
- <dataarea name="cass" size="11086">
- <rom name="axeofkolt-pt2_be.uef" size="11086" crc="98322c43" sha1="fea681b3a86e490456b29d8d918c3a51516d5dda" offset="0"/>
- </dataarea>
- </part>
- <part name="cass3" interface="electron_cass">
- <feature name="part_id" value="Part 3"/>
- <dataarea name="cass" size="10930">
- <rom name="axeofkolt-pt3_be.uef" size="10930" crc="cf80e6c3" sha1="b02092dec746215e6780e2401f63a421ad8d442c" offset="0"/>
- </dataarea>
- </part>
- <part name="cass4" interface="electron_cass">
- <feature name="part_id" value="Part 4"/>
- <dataarea name="cass" size="10808">
- <rom name="axeofkolt-pt4_be.uef" size="10808" crc="2af8d97a" sha1="6f45f4ff60048025294b1fd3966b6e1dc17b1e77" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="banprinc">
- <description>The Banished Prince</description>
- <year>1984</year>
- <publisher>Orbit</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="12621">
- <rom name="thebanishedprince_e.uef" size="12621" crc="dd4b87cc" sha1="bce640fde7f07acea67d9b8e804ec52e169b1af2" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="thebigko">
- <description>The Big KO!</description>
- <year>1987</year>
- <publisher>Tynesoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="31101">
- <rom name="thebigko_e.uef" size="31101" crc="a376d0f3" sha1="61cb06da9fc9d8382c72cca1e21bf1b84c0c13b2" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="theboss">
- <description>The Boss</description>
- <year>1985</year>
- <publisher>Peaksoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8808">
- <rom name="theboss_be.uef" size="8808" crc="2832b1c3" sha1="36af9eb1243039d46f8a0040196d2bcb4f35c5a5" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="thecount">
- <description>The Count</description>
- <year>198?</year>
- <publisher>Adventure International</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11335">
- <rom name="adv5-thecount_e.uef" size="11335" crc="a2a11e1f" sha1="174664fa4f1b0b54cdf54936e70184f62222c150" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="datingga">
- <description>The Dating Game</description>
- <year>1983</year>
- <publisher>Acornsoft/Ivan Berg</publisher>
- <info name="release" value="XBX08" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="18349">
- <rom name="datinggame_be.uef" size="18349" crc="d85ba7f9" sha1="f876136f0025e31dc41cda98e63c188b5ee6f868" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="druidsci">
- <description>The Druids Circle</description>
- <year>1984</year>
- <publisher>Hollsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9266">
- <rom name="druidscircle_e.uef" size="9266" crc="9154b8a4" sha1="de5b7eff6294131a7e74c85cca3d11513982643c" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="electape">
- <description>The Electron Tape - BASIC, Sound and Graphics</description>
- <year>1983</year>
- <publisher>Addison-Wesley</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="29502">
- <rom name="basicsoundandgraphics_e.uef" size="29502" crc="1fe14115" sha1="87a232c74c519b219fae315ab6e508bacb3f498f" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="eyezolto">
- <description>The Eye of Zolton</description>
- <year>1983</year>
- <publisher>Softek</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="14263">
- <rom name="eyeofzolton_be.uef" size="14263" crc="164729a6" sha1="0a8e7b9a15abec0295222fef1db87317cb798fd4" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="ferryman">
- <description>The Ferryman Awaits</description>
- <year>1986</year>
- <publisher>Kansas</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="21534">
- <rom name="ferrymanawaits_e.uef" size="21534" crc="4efd6a41" sha1="f8525585ce0283f4517ae24d54bfb7f66e3659e0" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="fivedoct">
- <description>The Five Doctors</description>
- <year>1984</year>
- <publisher>DW Gore</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="13324">
- <rom name="fivedoctors_be.uef" size="13324" crc="4008f86c" sha1="1937a5c4899ec572cdab9411d50fd45afd7db3fa" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="fivetwin">
- <description>The Five Doctors &amp; The Twin Dilemma</description>
- <year>1984</year>
- <publisher>W Games</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="13324">
- <rom name="the_five_doctors_and_the_twin_dilemma.uef" size="13324" crc="4008f86c" sha1="1937a5c4899ec572cdab9411d50fd45afd7db3fa" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="fourwand">
- <description>The Four Wands</description>
- <year>1988</year>
- <publisher>DW Gore</publisher>
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Part 1"/>
- <dataarea name="cass" size="11465">
- <rom name="thefourwands-pt1_be.uef" size="11465" crc="eebae37b" sha1="ee18f1b8a6332fd572d6d32a2b2e107d0d3360ff" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Part 2"/>
- <dataarea name="cass" size="10749">
- <rom name="thefourwands-pt2_be.uef" size="10749" crc="3e8821a5" sha1="10ff75d238cf636203dd38d728b0d48d75d4ba1b" offset="0"/>
- </dataarea>
- </part>
- <part name="cass3" interface="electron_cass">
- <feature name="part_id" value="Part 3"/>
- <dataarea name="cass" size="10891">
- <rom name="thefourwands-pt3_be.uef" size="10891" crc="aaf524a2" sha1="ebf1f5611a32cb3ca91a7df834275deea1fa598f" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="gldbaton">
- <description>The Golden Baton</description>
- <year>198?</year>
- <publisher>Adventure International</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11547">
- <rom name="mystadv1-goldenbaton_e.uef" size="11547" crc="27d87cbd" sha1="d3ef8f3fec90803d0e4ea04cd8a1212b54fbb3f0" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="goldfigu">
- <description>The Golden Figurine</description>
- <year>1988</year>
- <publisher>Atlantis</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="12784">
- <rom name="goldenfigurine_be.uef" size="12784" crc="6e3b3194" sha1="339bf02618299562ab796f198ac177a0fc1ad284" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="greatwal">
- <description>The Great Wall</description>
- <year>1984</year>
- <publisher>Artic</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="12961">
- <rom name="greatwall_be.uef" size="12961" crc="9cea38f1" sha1="049626d50624f041df80af11e272c8e2e552efda" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="greedydw">
- <description>The Greedy Dwarf</description>
- <year>1984</year>
- <publisher>Goldstar</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="13879">
- <rom name="greedydwarf_e.uef" size="13879" crc="5a828284" sha1="f09700b1f829ef097b9d7c3bb048472f66e0a15b" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="hacker">
- <description>The Hacker</description>
- <year>198?</year>
- <publisher>Firebird</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9658">
- <rom name="t-hack.uef" size="9658" crc="aa0b8f8f" sha1="9cb674c231532058bdd7e83a197de28865b7861e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="huntshau">
- <description>The Hunt: Search for Shauna</description>
- <year>1987</year>
- <publisher>Robico</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="22958">
- <rom name="thehuntsearchforshauna_e.uef" size="22958" crc="f789f0be" sha1="ab1710e3d8d80cf905f691f474726ca55472be68" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="incatrea">
- <description>The Inca Treasure</description>
- <year>1989</year>
- <publisher>DW Gore</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10510">
- <rom name="incatreasure_be.uef" size="10510" crc="511498a3" sha1="ebf37a02fd955635a3b002a59283e51609fe473d" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="kettrilo">
- <description>The Ket Trilogy</description>
- <year>1985</year>
- <publisher>Incentive</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="42920">
- <rom name="kettrilogy_be.uef" size="42920" crc="38c8fa1e" sha1="2e98321f9dedfa7210c274b4033017b2b74dc39e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="kingdomk">
- <description>The Kingdom of Klein</description>
- <year>1984</year>
- <publisher>Epic</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="16244">
- <rom name="kingdomofklein_e.uef" size="16244" crc="6dc5b9ff" sha1="a0aec9649ce0f80360aabfdd49a4a96be8e8633b" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="lastninj">
- <description>The Last Ninja</description>
- <year>1988</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="42157">
- <rom name="lastninja_e.uef" size="42157" crc="8a0087a8" sha1="9c24ed76ff6bb0f4feb86d9301bd89aafb6ff661" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="lastnin2">
- <description>The Last Ninja 2</description>
- <year>1988</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="40562">
- <rom name="lastninja2_e.uef" size="40562" crc="f4b85276" sha1="793092d4cc09456351e4cb19f094fa4c33e39b9a" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="lastfree">
- <description>The Last of the Free</description>
- <year>1986</year>
- <publisher>Audiogenic</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="17187">
- <rom name="lastofthefree_e.uef" size="17187" crc="ed4558ed" sha1="06991ac5dfe6df7fe332b56c2de5261d1f073994" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="lastfreea" cloneof="lastfree">
- <description>The Last of the Free (Atlantis)</description>
- <year>1989</year>
- <publisher>Atlantis</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="17187">
- <rom name="lastofthefree_e.uef" size="17187" crc="ed4558ed" sha1="06991ac5dfe6df7fe332b56c2de5261d1f073994" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="liferept">
- <description>The Life of Repton</description>
- <year>1987</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="55831">
- <rom name="reptonthelifeof_e.uef" size="55831" crc="805876e5" sha1="7416efe015d6311cf4f6060bf42c2ff27c8557f9" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="magsword">
- <description>The Magic Sword</description>
- <year>1984</year>
- <publisher>Database Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="17505">
- <rom name="themagicsword_e.uef" size="17505" crc="d54e99de" sha1="5a1f36f5b6cd95b9821e22695e4a13d6f4833a31" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="themine">
- <description>The Mine</description>
- <year>1984</year>
- <publisher>Micro Power</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10185">
- <rom name="themine_e.uef" size="10185" crc="0715436d" sha1="8275f62bcd8266a87f9c38ec9a8001de61dc64e5" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="ninedanc">
- <description>The Nine Dancers</description>
- <year>1986</year>
- <publisher>Larsoft</publisher>
- <info name="usage" value="Load with *RUN" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10622">
- <rom name="theninedancers_run_be.uef" size="10622" crc="1f7088cd" sha1="cacd4da33cb303023fc0ba590e9eeda2ec724174" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="puppetmn">
- <description>The Puppetman</description>
- <year>1987</year>
- <publisher>Larsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10818">
- <rom name="puppetman_run_be.uef" size="10818" crc="8d7c3753" sha1="32cdcf829baac9e5480bb6a2c5709f3fbc8419e8" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="holygrai">
- <description>The Quest for the Holy Grail</description>
- <year>198?</year>
- <publisher>Epic</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="16242">
- <rom name="questfortheholygrail_e.uef" size="16242" crc="13c11ecb" sha1="9be6203d899dc4c24c13b08c9c9a80f06c4f923f" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="thequill">
- <description>The Quill</description>
- <year>198?</year>
- <publisher>Gilsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7792">
- <rom name="thequill_be.uef" size="7792" crc="1e50751c" sha1="975ff668923867f865644028c8170681f1c7ad22" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="salandra">
- <description>Rising of Salandra - Parts 1 &amp; 2</description>
- <year>1984</year>
- <publisher>Larsoft</publisher>
- <info name="usage" value="Load with *RUN" />
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="The Prophecy"/>
- <dataarea name="cass" size="9223">
- <rom name="ros1-theprophecy_run_be.uef" size="9223" crc="f7899448" sha1="3052ff98547e3d1af8a417282db8d1d89d92a963" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Return of the Warrior"/>
- <dataarea name="cass" size="10509">
- <rom name="ros2-returnofthewarrior_run_be.uef" size="10509" crc="3ba81ddc" sha1="984b771e4acfa0cdf334c93d790104b54a1f63c5" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="spanisha">
- <description>The Spanish Tutor - Level A</description>
- <year>1984</year>
- <publisher>Kosmos</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="15735">
- <rom name="thespanishtutor-levela_e.uef" size="15735" crc="6fbd3551" sha1="11696ee2208b191be35c9e25d15b890ac9f1d6b5" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="stafflaw">
- <description>The Staff of Law</description>
- <year>1984</year>
- <publisher>Potter</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8981">
- <rom name="staffoflaw_be.uef" size="8981" crc="fe177a23" sha1="8303349aa60bd331216424770c164fbaa1dd8ff9" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="stolenla">
- <description>The Stolen Lamp</description>
- <year>1984</year>
- <publisher>Lothlorien</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11040">
- <rom name="stolenlamp_be.uef" size="11040" crc="7ca49f5c" sha1="7cf2706abc9e843a81b743b1c0555f557945793c" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="survivor">
- <description>Survivor</description>
- <year>1985</year>
- <publisher>MP Software</publisher>
- <info name="usage" value="Load with *RUN" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="18287">
- <rom name="survivor_run_e.uef" size="18287" crc="d4ea8eb7" sha1="fdcc9aad9b9ad7ed7c7824a7b1d671a6baa027aa" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="timemach">
- <description>The Time Machine</description>
- <year>198?</year>
- <publisher>Adventure International</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9258">
- <rom name="mystadv2-timemachine_e.uef" size="9258" crc="316737aa" sha1="048383da56c1d67ed4ce9b46d476f465c0479d20" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="twinorbs">
- <description>The Twin Orbs of Aalinor</description>
- <year>1985</year>
- <publisher>Potter</publisher>
- <info name="usage" value="Load with *RUN" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="19284">
- <rom name="twinorbsofaalinor_run_be.uef" size="19284" crc="4742c3e4" sha1="5aaee6fba903d89fcc71971df99001641db3e020" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="valley">
- <description>The Valley</description>
- <year>198?</year>
- <publisher>ASP Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11397">
- <rom name="thevalley_e.uef" size="11397" crc="dbdddcc9" sha1="f876499a98f70a8836e57e052484519e49a82d8d" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="valkings">
- <description>The Valley of the Kings</description>
- <year>1985</year>
- <publisher>MP Software</publisher>
- <info name="usage" value="Load with *RUN" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="17674">
- <rom name="valleyofthekings_run_be.uef" size="17674" crc="b1effaaa" sha1="a0aa6a7059ef0dd5bd3d4bac15c6137281b81602" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="woftef">
- <description>The Way of the Exploding Fist</description>
- <year>1985</year>
- <publisher>Melbourne House</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="14769">
- <rom name="wayoftheexplodingfistv2_e.hq.uef" size="14769" crc="547dc00b" sha1="19910ae26eeda0f5e60df8ecbcc0c953bfbc2216" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="wheelfor">
- <description>Wheel of Fortune</description>
- <year>1984</year>
- <publisher>Epic</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="19429">
- <rom name="wheeloffortune_e.uef" size="19429" crc="5199546a" sha1="aa1d1981d906debc6c81b41922b8dd2de3d381ec" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="thrust">
- <description>Thrust</description>
- <year>1986</year>
- <publisher>Superior Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="19184">
- <rom name="thrust_e.uef" size="19184" crc="ea9ebf3a" sha1="dbece5afe625ea58b28e6c5fba113bc024900e3f" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="tstruck">
- <description>Thunderstruck</description>
- <year>1985</year>
- <publisher>Audiogenic</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="16880">
- <rom name="thunderstruck_e.uef" size="16880" crc="a67bc9b0" sha1="0da10a61100f94d6eb3c532432936ca415cb6f3a" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="tstruck2">
- <description>Thunderstruck 2: Mind Master</description>
- <year>1986</year>
- <publisher>Audiogenic</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="19706">
- <rom name="thunderstruck2_e.uef" size="19706" crc="481149a0" sha1="696aa1d5a5199b2dbdade7f01f885b7cf0d74e7c" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="time">
- <description>Time</description>
- <year>1984</year>
- <publisher>Stell</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8691">
- <rom name="time_e.uef" size="8691" crc="923482a3" sha1="d524bd28688e9b5ffd57286160830e150351141f" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="tombdeat">
- <description>Tomb of Death</description>
- <year>1984</year>
- <publisher>Hollsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8855">
- <rom name="tombofdeath_e.uef" size="8855" crc="dbaab767" sha1="e9738e67d8f32ebc840294f2f51ae94d5c5ecdcc" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="tomcat">
- <description>Tomcat</description>
- <year>1989</year>
- <publisher>Players</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="28659">
- <rom name="tomcat_be.uef" size="28659" crc="9a3708b0" sha1="684dacd343d7483673ea7832f28bbced572d7f4c" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="topstail">
- <description>Tops and Tails</description>
- <year>1985</year>
- <publisher>Macmillian</publisher>
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Snakes and Ladders"/>
- <dataarea name="cass" size="9665">
- <rom name="tat-snakesandladders_be.uef" size="9665" crc="1ff59a40" sha1="e43da34a97960199094fa0f379e17972ebde92b2" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Tail End"/>
- <dataarea name="cass" size="9392">
- <rom name="tat-tailend_be.uef" size="9392" crc="498e708d" sha1="ca70869eb30b1622d2933fa45aad9ef240f5da31" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="traditio">
- <description>Traditional Games</description>
- <year>1983</year>
- <publisher>Gemini</publisher>
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Accordian"/>
- <dataarea name="cass" size="2672">
- <rom name="tg-accordian_be.uef" size="2672" crc="3a620f75" sha1="5c1fda51b7d6211cf87a6f8f3a1ca0878bb7ad61" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Backgammon"/>
- <dataarea name="cass" size="4723">
- <rom name="tg-backgammon_be.uef" size="4723" crc="a4fc635e" sha1="cad405c987c8bf72eeed6b19ea577e8e59372b85" offset="0"/>
- </dataarea>
- </part>
- <part name="cass3" interface="electron_cass">
- <feature name="part_id" value="Gin Rummy"/>
- <dataarea name="cass" size="3995">
- <rom name="tg-ginrummy_be.uef" size="3995" crc="65cdb3a0" sha1="326394f88256f77849a3275772c5cc40fb8588d1" offset="0"/>
- </dataarea>
- </part>
- <part name="cass4" interface="electron_cass">
- <feature name="part_id" value="Piquet"/>
- <dataarea name="cass" size="4129">
- <rom name="tg-piquet_be.uef" size="4129" crc="e6755a3b" sha1="0ce6c4e3c0a361216d2a2737f216f715667abddd" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="trapper">
- <description>Trapper</description>
- <year>1987</year>
- <publisher>Blue Ribbon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6398">
- <rom name="trapper_e.uef" size="6398" crc="20c8a8da" sha1="e77e649d93e98bde945f67b82ec999c7505cbc85" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="treashnt">
- <description>Treasure Hunt</description>
- <year>1986</year>
- <publisher>Macsen</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="23030">
- <rom name="treasurehunt_e.uef" size="23030" crc="aca1b87d" sha1="657bb04aaf5ece2bb0a3fce9804e11c5b0c1d861" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="treeknow">
- <description>Tree of Knowledge</description>
- <year>198?</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="SLE04" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10758">
- <rom name="treeofknowledge_e.uef" size="10758" crc="1e18e50d" sha1="1796147d2e044ddcefcdb00594bc65e2491568f2" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="trekii">
- <description>Trek II</description>
- <year>1985</year>
- <publisher>Tynesoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8040">
- <rom name="trekii_e.uef" size="8040" crc="4a44690d" sha1="73283edd0f8c2945a1a3cd26d12d6ef3dc83b5c9" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="triple1">
- <description>Triple Decker 1</description>
- <year>1988</year>
- <publisher>Alternative</publisher>
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Day at the Races"/>
- <dataarea name="cass" size="3758">
- <rom name="td1-dayattheraces_be.uef" size="3758" crc="98ad60b1" sha1="33b518d6ff7bf6aaadcd8fcbc93dcbbe8bb8288a" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Grand Prix"/>
- <dataarea name="cass" size="3106">
- <rom name="td1-grandprix_be.uef" size="3106" crc="d1d4d48d" sha1="19afd5ee6c65f59502b34cf1a486b801cb9e619c" offset="0"/>
- </dataarea>
- </part>
- <part name="cass3" interface="electron_cass">
- <feature name="part_id" value="Manic Mole"/>
- <dataarea name="cass" size="6029">
- <rom name="td1-manicmole_be.uef" size="6029" crc="b7c33543" sha1="3ea65fc0b7e391c5816ee50c164869ecea9d9862" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="triple2">
- <description>Triple Decker 2</description>
- <year>1988</year>
- <publisher>Alternative</publisher>
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Haunted House"/>
- <dataarea name="cass" size="6341">
- <rom name="td2-hauntedhouse_be.uef" size="6341" crc="f220a044" sha1="974000aaf52ca543d8abee93a5dde9a7cad7c9d9" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Invasion Force"/>
- <dataarea name="cass" size="3817">
- <rom name="td2-invasionforce_be.uef" size="3817" crc="1bc8de92" sha1="390a98f4ed21f804e42fdded33cc47f89dae5845" offset="0"/>
- </dataarea>
- </part>
- <part name="cass3" interface="electron_cass">
- <feature name="part_id" value="Parachute"/>
- <dataarea name="cass" size="3189">
- <rom name="td2-parachute_be.uef" size="3189" crc="f7d5340d" sha1="2765974ab62cb5c7b432271219b2267e45d33e00" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="triple3">
- <description>Triple Decker 3</description>
- <year>1988</year>
- <publisher>Alternative</publisher>
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Jam Butty"/>
- <dataarea name="cass" size="4959">
- <rom name="td3-jambutty_be.uef" size="4959" crc="e104ea68" sha1="1ece0e663d567593feec80c1e111fd308b5040d0" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Lander"/>
- <dataarea name="cass" size="2425">
- <rom name="td3-lander_be.uef" size="2425" crc="556dfa34" sha1="02c14af7ac4582841c4a23dca80e028d5c2c8c87" offset="0"/>
- </dataarea>
- </part>
- <part name="cass3" interface="electron_cass">
- <feature name="part_id" value="Lunar Invasion"/>
- <dataarea name="cass" size="5597">
- <rom name="td3-lunarinvasion_be.uef" size="5597" crc="86ff28d6" sha1="086319c9695ee8d5ed1ffa8962bf5a7f5d76c2be" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="triple4">
- <description>Triple Decker 4</description>
- <year>1988</year>
- <publisher>Alternative</publisher>
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Fishing"/>
- <dataarea name="cass" size="4316">
- <rom name="td4-fishing_be.uef" size="4316" crc="30128ecd" sha1="4c1ae505585158c2e408d645ca7bcae78d00a3d7" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Golf"/>
- <dataarea name="cass" size="2959">
- <rom name="td4-golf_be.uef" size="2959" crc="adaf81b4" sha1="9b3f2ec7cce0d758ee0c5f3a68ab936ee38e2f86" offset="0"/>
- </dataarea>
- </part>
- <part name="cass3" interface="electron_cass">
- <feature name="part_id" value="Howzat"/>
- <dataarea name="cass" size="5319">
- <rom name="td4-howzat_be.uef" size="5319" crc="27b76b55" sha1="af52dd65256abcdf88891fee936ee673c4e300c5" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="triple5">
- <description>Triple Decker 5</description>
- <year>1988</year>
- <publisher>Alternative</publisher>
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Karate Warrior"/>
- <dataarea name="cass" size="5631">
- <rom name="td5-karatewarrior_be.uef" size="5631" crc="121a519d" sha1="6e321d160e5ceb3757d76cdf59b7169770b074b5" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Skramble"/>
- <dataarea name="cass" size="6800">
- <rom name="td5-skramble_be.uef" size="6800" crc="2d425461" sha1="7e0ab205fd8eaed8a748d0df9afc2d538e194f88" offset="0"/>
- </dataarea>
- </part>
- <part name="cass3" interface="electron_cass">
- <feature name="part_id" value="Starfight"/>
- <dataarea name="cass" size="4024">
- <rom name="td5-starfight_be.uef" size="4024" crc="b9f6cd6e" sha1="9986a532523f0faef807ba21bf32a4e12273f99f" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="triple6">
- <description>Triple Decker 6</description>
- <year>1988</year>
- <publisher>Alternative</publisher>
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Castles of Sand"/>
- <dataarea name="cass" size="5703">
- <rom name="td6-castleofsands_be.uef" size="5703" crc="20827c9f" sha1="ea22fe3dd338cc52e58bdcd2b23b6edd6f704cdb" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Cavern Capers"/>
- <dataarea name="cass" size="6890">
- <rom name="td6-caverncapers_be.uef" size="6890" crc="fa93f549" sha1="b5da4f0c96019a705449e878114bac314ee330e3" offset="0"/>
- </dataarea>
- </part>
- <part name="cass3" interface="electron_cass">
- <feature name="part_id" value="Snap Dragon"/>
- <dataarea name="cass" size="4171">
- <rom name="td6-snapdragon_be.uef" size="4171" crc="6d9369b9" sha1="428ef9cd739290973b4954653855528f0252a3f2" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="triple7">
- <description>Triple Decker 7</description>
- <year>1988</year>
- <publisher>Alternative</publisher>
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Atom Smash"/>
- <dataarea name="cass" size="6959">
- <rom name="td7-atomsmash_be.uef" size="6959" crc="29fc892b" sha1="c74b61e51a5e2eb01408d2e3a3e6d92f8dc27918" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Knockout"/>
- <dataarea name="cass" size="2438">
- <rom name="td7-knockout_be.uef" size="2438" crc="b764e9d2" sha1="2e53324cc7caf04f07e89d3a29ad5d24b1e25889" offset="0"/>
- </dataarea>
- </part>
- <part name="cass3" interface="electron_cass">
- <feature name="part_id" value="Reaction Tester"/>
- <dataarea name="cass" size="1206">
- <rom name="td7-reactiontester_be.uef" size="1206" crc="97edffb0" sha1="64b747efdfba836d1e4aa3903f24b2a6d1828e3e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="triple8">
- <description>Triple Decker 8</description>
- <year>198?</year>
- <publisher>Alternative</publisher>
- <part name="cass" interface="electron_cass">
- <feature name="part_id" value="Fruit Worm"/>
- <dataarea name="cass1" size="5785">
- <rom name="td8-fruitworm_e.uef" size="5785" crc="1a78cd86" sha1="6dda88bc98a7a8a1a5b9cec194b0b2815e644c65" offset="0"/>
- </dataarea>
- </part>
- <part name="cass" interface="electron_cass">
- <feature name="part_id" value="Grebit"/>
- <dataarea name="cass2" size="6664">
- <rom name="td8-grebit_e.uef" size="6664" crc="d584cdf0" sha1="a5e2177d1380079b9b31b69da3daff9475be68f5" offset="0"/>
- </dataarea>
- </part>
- <part name="cass" interface="electron_cass">
- <feature name="part_id" value="Mr Freeze"/>
- <dataarea name="cass3" size="5484">
- <rom name="td8-mrfreeze_e.uef" size="5484" crc="4b4994e8" sha1="8bf14738dbeef8ac91191706649d80e54d2b4f12" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="triple9">
- <description>Triple Decker 09</description>
- <year>1988</year>
- <publisher>Alternative</publisher>
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Break Free"/>
- <dataarea name="cass" size="3517">
- <rom name="td9-breakfree_be.uef" size="3517" crc="d8fb5d4b" sha1="e070e45360841c8d178b10fde9f461cef13b50e0" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Code Breaker"/>
- <dataarea name="cass" size="2108">
- <rom name="td9-codebreaker_be.uef" size="2108" crc="b260db2f" sha1="b1593a47c0c991b92099a4083175e375b2e49222" offset="0"/>
- </dataarea>
- </part>
- <part name="cass3" interface="electron_cass">
- <feature name="part_id" value="Missile Jammer"/>
- <dataarea name="cass" size="3223">
- <rom name="td9-missilejammer_be.uef" size="3223" crc="8b5553da" sha1="f60628e9bf0e3d39af0767cee37750c10db37e4a" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="triple10">
- <description>Triple Decker 10</description>
- <year>1988</year>
- <publisher>Alternative</publisher>
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Bunny Blitz"/>
- <dataarea name="cass" size="1660">
- <rom name="td10-bunnyblitz_be.uef" size="1660" crc="99f1a92b" sha1="abecf28d379e97dd2b436996713a16e995e75d6d" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Money Maze"/>
- <dataarea name="cass" size="2856">
- <rom name="td10-moneymaze_be.uef" size="2856" crc="63772dac" sha1="12ab136d164ff5e4229df1e5386adb0d5050c4a3" offset="0"/>
- </dataarea>
- </part>
- <part name="cass3" interface="electron_cass">
- <feature name="part_id" value="Rock Fall"/>
- <dataarea name="cass" size="5148">
- <rom name="td10-rockfall_be.uef" size="5148" crc="50d5a42c" sha1="e56ccb7cead9a85a9b789df1f63b7e698dfce298" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="turfform">
- <description>Turf Form</description>
- <year>1988</year>
- <publisher>Blue Ribbon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="4744">
- <rom name="turfform_e.uef" size="4744" crc="78e32978" sha1="8620242ea420e0541ee241d536abf1b8628142c3" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="turtleg">
- <description>Turtle Graphics</description>
- <year>198?</year>
- <publisher>Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8382">
- <rom name="turtlegraphics_e.uef" size="8382" crc="da057171" sha1="751d5ef5b788b2b53432d13227c8d2b2f9f98f5e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="twelfnig">
- <description>Twelfth Night</description>
- <year>198?</year>
- <publisher>Penguin Study Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="16860">
- <rom name="twelfthnight_e.uef" size="16860" crc="684bb55f" sha1="c316b7aa9f462a01da5685a06e8311ba604ee675" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="kingdomv">
- <description>Twin Kingdom Valley</description>
- <year>1983</year>
- <publisher>Bug Byte</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="21339">
- <rom name="twinkingdomvalley-modified_e.uef" size="21339" crc="8a5becdb" sha1="bff28a8f9e20b25d304ccfb06e425df7d6e4e988" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="ukpm">
- <description>U.K. PM</description>
- <year>1984</year>
- <publisher>I.J.K.</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10356">
- <rom name="ukpm_e.uef" size="10356" crc="729bc02a" sha1="69a71c48a12989477a06e1b426f297b16d4771e7" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="ultron">
- <description>Ultron</description>
- <year>1984</year>
- <publisher>Icon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6994">
- <rom name="ultron_e.uef" size="6994" crc="56f04c8c" sha1="1700a8ad51db0c947e47a5f61b17eb6ffa6c1fba" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="uranians">
- <description>Uranians</description>
- <year>1986</year>
- <publisher>Bug Byte</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9761">
- <rom name="uranians_e.uef" size="9761" crc="b9a4444d" sha1="67fad5c86b267b1dfa1f6d21138197f4e6ea70c0" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="usdragr">
- <description>US Drag Racing</description>
- <year>198?</year>
- <publisher>Tynesoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11645">
- <rom name="usdragracing_e.uef" size="11645" crc="b1dd0415" sha1="bc751c1bc051c4712219f2e0fb7f7c2fd9b187c6" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="vegasjac">
- <description>Vegas Jackpot</description>
- <year>1984</year>
- <publisher>Mastertronic</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="4746">
- <rom name="vegasjackpot_be.uef" size="4746" crc="8e911cc8" sha1="1a091378dbc3e369a690b0dc318ac5a5ee925064" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="vcardarc">
- <description>Video Card Arcade</description>
- <year>1987</year>
- <publisher>Blue Ribbon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9882">
- <rom name="videocardarcade_e.uef" size="9882" crc="79538b65" sha1="180b383d1c736bd509d6a0af40159c951a262a82" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="videoreva" cloneof="videorev">
- <description>Videos Revenge (Alternative)</description>
- <year>1987</year>
- <publisher>Alternative</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7202">
- <rom name="videopinball_be.uef" size="7202" crc="8968f16c" sha1="c0f8fe9d4953bc1947b9e888f1999b34f90a68d1" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="videosrevf" cloneof="videorev">
- <description>Videos Revenge (Firebird)</description>
- <year>198?</year>
- <publisher>Firebird</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7917">
- <rom name="t-vide.uef" size="7917" crc="c05560fa" sha1="e47f7e4d92f88a4b766051d5b3a47d3b88f0eade" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="videorev">
- <description>Videos Revenge</description>
- <year>198?</year>
- <publisher>Budgie</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="13097">
- <rom name="videosrevenge_e.uef" size="13097" crc="3646ec1a" sha1="8320fa3da20a38c1541feabbb59a1c43394301d7" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="videosrevpias" cloneof="videorev">
- <description>Videos Revenge (Play It Again Sam 17)</description>
- <year>1991</year>
- <publisher>Superior Software/Blue Ribbon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="14110">
- <rom name="videosrevenge-piasrr_e.uef" size="14110" crc="69b90639" sha1="9f26bb44195aafb3fb7d57b742bc3e1498ca6264" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="vindaloo">
- <description>Vindaloo</description>
- <year>1986</year>
- <publisher>Tynesoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="12054">
- <rom name="vindaloo_e.uef" size="12054" crc="db73fed1" sha1="716a6bf56a877c2256c805369035d98ea288a84a" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="voodooc">
- <description>Voodoo Castle</description>
- <year>198?</year>
- <publisher>Adventure International</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10703">
- <rom name="adv4-voodoocastle_e.uef" size="10703" crc="15d5c170" sha1="43e6fce75bf3ad5d31b95528cdcdef60b4c1bbea" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="vortex">
- <description>Vortex</description>
- <year>1983</year>
- <publisher>Software Invasion</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11384">
- <rom name="vortex_e.uef" size="11384" crc="16cdb721" sha1="afacc020d80a97c3dd134f36d35a3f75942133f5" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="voxbox">
- <description>Voxbox Demonstration</description>
- <year>1985</year>
- <publisher>Millsgrade</publisher>
- <part name="cass1" interface="electron_cass">
- <feature name="part_id" value="Side 1"/>
- <dataarea name="cass" size="9740">
- <rom name="voxbox-side1_e.uef" size="9740" crc="e063558a" sha1="f63c2620fbaa9dd24c86f766a8478777344db785" offset="0"/>
- </dataarea>
- </part>
- <part name="cass2" interface="electron_cass">
- <feature name="part_id" value="Side 1"/>
- <dataarea name="cass" size="1660">
- <rom name="voxbox-side2_e.uef" size="1660" crc="7db123f2" sha1="6d36b0a195cb7abd5c655932e0b330518b34c486" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="walkplnk">
- <description>Walk the Plank</description>
- <year>198?</year>
- <publisher>Mastertronic</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="3913">
- <rom name="walktheplank_e.uef" size="3913" crc="32a19c95" sha1="acb362083ae550ea1abc24d7a12473a0216f1d55" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="warehous">
- <description>Warehouse</description>
- <year>1988</year>
- <publisher>Top Ten</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="20040">
- <rom name="warehouse_be.uef" size="20040" crc="2037f76e" sha1="3d0f5a26dbfbf2c203a694253a58b8752839506d" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="warp1">
- <description>Warp-1</description>
- <year>1984</year>
- <publisher>Icon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8604">
- <rom name="warp1_e.uef" size="8604" crc="6bf365aa" sha1="b27af291f149e13aa63cd92e2dd1f2aefe942b63" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="waterloo">
- <description>Waterloo</description>
- <year>1984</year>
- <publisher>Lothlorien</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8852">
- <rom name="waterloo_e.uef" size="8852" crc="62b0c4e7" sha1="eb17ab3c470acb187a25d3ab4092fcd38cfdac4b" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="waxworks">
- <description>Waxworks</description>
- <year>198?</year>
- <publisher>Adventure International</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10919">
- <rom name="mystadv11-waxworks_e.uef" size="10919" crc="90d51141" sha1="b3184a8e6e3ea92b5ed8f95e8bb790e90dea34ec" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="webwar">
- <description>Web War</description>
- <year>1984</year>
- <publisher>Artic</publisher>
- <info name="usage" value="Load with *RUN" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="5829">
- <rom name="webwar_run_be.uef" size="5829" crc="3162419e" sha1="53335eab6f52ae60148c7ff9cbefb0f78b15c246" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="weetabix">
- <description>Weetabix versus The Titchies</description>
- <year>1984</year>
- <publisher>Romik</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="5066">
- <rom name="weetabixversusthetitchies_be.uef" size="5066" crc="7cf373b6" sha1="ffc962e699bce8e8dbb39a115ee421d392dde095" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="west">
- <description>West</description>
- <year>198?</year>
- <publisher>Talent</publisher>
- <info name="usage" value="Load with *RUN" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="19558">
- <rom name="west_run_e.uef" size="19558" crc="b215551d" sha1="92a66cccd04a80e773874228c618d26273c985a3" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="wetzone">
- <description>Wet Zone</description>
- <year>198?</year>
- <publisher>Tynesoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7795">
- <rom name="wetzone_e.uef" size="7795" crc="c8d31584" sha1="bf989cf6d0f9afb678c2ef9dc03ad0427d5788d1" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="where">
- <description>Where</description>
- <year>1983</year>
- <publisher>Micro Power</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7327">
- <rom name="where_e.uef" size="7327" crc="a5c0e9a1" sha1="625b5a4ad138566bed807cbc716c269e0ed673c8" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="whichsal">
- <description>Which Salt?</description>
- <year>1984</year>
- <publisher>Micro Power</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="8993">
- <rom name="whichsalt_e.uef" size="8993" crc="7457ae59" sha1="5c8ad81c8c5ef11943a0af1a062764d59b65598b" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="wknigh11">
- <description>White Knight Mk11</description>
- <year>1983</year>
- <publisher>BBC Soft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="12860">
- <rom name="whiteknightmk11_e.uef" size="12860" crc="afb6743d" sha1="f5abccf9554ae2e4fb032e57f2a96c2a392fa57c" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="whimagic">
- <description>White Magic</description>
- <year>1989</year>
- <publisher>4th Dimension</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="32060">
- <rom name="whitemagic_e.uef" size="32060" crc="cc3dbae1" sha1="e97aca33f3182b88dd69e67dd16395c832ef5523" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="whoopsy">
- <description>Whoopsy</description>
- <year>1985</year>
- <publisher>Shards Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="7888">
- <rom name="whoopsy_be.uef" size="7888" crc="290c038d" sha1="21e15caa15046002e8b392fd32a7b8108978d90e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="wolmpia">
- <description>Winter Olmpiad 88</description>
- <year>1988</year>
- <publisher>Tynesoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="54860">
- <rom name="winterolympiad_e.uef" size="54860" crc="9dae248a" sha1="b0e983bbd09b2a5d36656784798ff4fd7ec1d2dd" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="wolympic">
- <description>Winter Olympics</description>
- <year>1986</year>
- <publisher>Tynesoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="28695">
- <rom name="winterolympics_e.uef" size="28695" crc="209cfe02" sha1="251f3bd5bc1d353ed20892c1c45ce9e5cf143ba8" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="wizardak">
- <description>Wizard of Akyrz</description>
- <year>198?</year>
- <publisher>Adventure International</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11279">
- <rom name="mystadv8-wizardofakyrz_e.uef" size="11279" crc="867d317d" sha1="ab958988ae745f9c41ab642888a60d112226eec4" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="wizzym">
- <description>Wizzys Mansion</description>
- <year>1986</year>
- <publisher>Audiogenic</publisher>
- <info name="usage" value="Load with *RUN" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="11075">
- <rom name="wizzysmansion_run_e.uef" size="11075" crc="429b4740" sha1="d3ac9421e40ec2139205ca90d915c496191b83cb" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="woks">
- <description>Woks</description>
- <year>1984</year>
- <publisher>Artic</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="12790">
- <rom name="woks_be.uef" size="12790" crc="a395efb0" sha1="ba0c99bd64dc4a4b68c799c3d03fe0c6c178777e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="wongo">
- <description>Wongo</description>
- <year>1986</year>
- <publisher>Icon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9502">
- <rom name="wongo_e.uef" size="9502" crc="bf97bf88" sha1="d5e12e073797b015d082fb4d175a99fa60adf902" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="woodbury">
- <description>Woodbury End</description>
- <year>1986</year>
- <publisher>Shards Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="13437">
- <rom name="woodburyend_be.uef" size="13437" crc="ab628f1e" sha1="e39f8fb6e6a0826d0a4fc6530780ed5dd4e97a3b" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="woodland">
- <description>Woodland Terror</description>
- <year>1984</year>
- <publisher>MP Software</publisher>
- <info name="usage" value="Load with *RUN" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="19936">
- <rom name="woodlandterror_run_be.uef" size="19936" crc="41dc9054" sha1="2a34167159c2bb14267d75cc0032c870b748c04e" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="woodlandearly" cloneof="woodland">
- <description>Woodland Terror (early)</description>
- <year>1984</year>
- <publisher>MP Software</publisher>
- <info name="usage" value="Load with *RUN" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="18286">
- <rom name="woodlandterror-early_run_be.uef" size="18286" crc="445505a0" sha1="4aab34f0c203811bd78796f0497eac2626c7341a" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="wordhunt">
- <description>Word Hunt</description>
- <year>198?</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="SLE05" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10666">
- <rom name="wordhunt_e.uef" size="10666" crc="6ee70f35" sha1="d32ad469f042e829f56a346dca442a25bf9741e1" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="wordseq">
- <description>Word Sequencing</description>
- <year>1984</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="SLE06" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10095">
- <rom name="wordsequencing_e.uef" size="10095" crc="48c903c4" sha1="3aa7b764c640411acc257c7937718b1e41f1c05b" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="wrldgeo">
- <description>World Geography</description>
- <year>198?</year>
- <publisher>Superior Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9563">
- <rom name="worldgeography_e.uef" size="9563" crc="e9386ef1" sha1="bbe343d9f44375557e1b6476277cfcbb89b2c354" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="wychwood">
- <description>Wychwood</description>
- <year>1987</year>
- <publisher>Larsoft</publisher>
- <info name="usage" value="Load with *RUN" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="10541">
- <rom name="wychwood_run_be.uef" size="10541" crc="7fbdf797" sha1="4ae3955e01f4aad1bd23d4e0aec2d8a964da66c1" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="xadomy">
- <description>Xadomy</description>
- <year>1984</year>
- <publisher>Brassington Enterprises</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6340">
- <rom name="xadomy_be.uef" size="6340" crc="9b36857d" sha1="f2ddb08b1728c46bd8211ee6eacb5b99493b2171" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="xanagram">
- <description>Xanagrams</description>
- <year>1984</year>
- <publisher>Postern</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="27303">
- <rom name="xanagrams_e.uef" size="27303" crc="e947995c" sha1="2be283661c44204a0847cc1ffae37c3d1b3b5efc" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="xor">
- <description>XOR</description>
- <year>1987</year>
- <publisher>Logotron</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="20115">
- <rom name="xor_e.uef" size="20115" crc="0edf6211" sha1="f09d8dd6231eb0a92bc200200bd7aabaa553b2d2" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="xorproc">
- <description>XOR: Procyon's Mazes</description>
- <year>1987</year>
- <publisher>Logotron</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="20519">
- <rom name="xor-procyon_e.uef" size="20519" crc="8ae6f38f" sha1="f281f701029f0786d9e13d5ddde7512510358294" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="yiear">
- <description>Yie Ar Kung Fu</description>
- <year>1984</year>
- <publisher>Imagine</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="19064">
- <rom name="yiearkungfu_e.uef" size="19064" crc="b7250fbc" sha1="66603039f1a47f5548c4c465ac85021037c52f72" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="yiear2">
- <description>Yie Ar Kung Fu 2</description>
- <year>198?</year>
- <publisher>Imagine</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="20421">
- <rom name="yiearkungfu2_e.uef" size="20421" crc="76c36f94" sha1="7660d67d428c9b42b356b4ccc28e96191bf1c346" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="yc0504">
- <description>Your Computer Vol.5-4</description>
- <year>1985</year>
- <publisher>Your Computer</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9381">
- <rom name="t-y504.uef" size="9381" crc="9a80add7" sha1="76a73fd950188abc6a223090b7f1a8447ca593c8" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="zalaga">
- <description>Zalaga</description>
- <year>1983</year>
- <publisher>Aardvark</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="18967">
- <rom name="zalaga_e.uef" size="18967" crc="739262c4" sha1="a5d3c1598484e1729462770a8de28d0eaf823e24" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="zalagapias" cloneof="zalaga">
- <description>Zalaga (Play It Again Sam 10)</description>
- <year>1989</year>
- <publisher>Superior Software/Acornsoft</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="23528">
- <rom name="zalaga-piasrr_e.uef" size="23528" crc="6c3352af" sha1="3a53e74c38bb283760f92d0b6d970aa10bedb319" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="zalagaa" cloneof="zalaga">
- <description>Zalaga (Alternative)</description>
- <year>198?</year>
- <publisher>Alternative</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="20293">
- <rom name="zalaga-alrr_e.uef" size="20293" crc="99ae102c" sha1="b933fcda2f10e846235bc21aabc7e030599e4a9f" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="zkongjun">
- <description>Zany Kong Junior</description>
- <year>198?</year>
- <publisher>Superior Software</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="9905">
- <rom name="zanykongjunior_e.uef" size="9905" crc="b335969e" sha1="c5c963b1dcb045aa79d3b056721a3a074bae17c1" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="zeichenbr">
- <description>Zeichenbrett (Ger)</description>
- <year>198?</year>
- <publisher>Acornsoft</publisher>
- <info name="release" value="GLX03" />
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="18354">
- <rom name="picturemaker-german_e.uef" size="18354" crc="e158301b" sha1="d7a8358f81544dbfbba357798e8fa748aedcc0c5" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="zenon">
- <description>Zenon</description>
- <year>1989</year>
- <publisher>Impact</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="15261">
- <rom name="zenon_e.uef" size="15261" crc="94a8b329" sha1="be3c638fb111b96041f32aff0ef460ac1d3db410" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="ziggy">
- <description>Ziggy</description>
- <year>1987</year>
- <publisher>Audiogenic</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="18575">
- <rom name="ziggy_e.uef" size="18575" crc="b501666a" sha1="7073d7d99157de12066b4c91029b7ea350e20706" offset="0"/>
- </dataarea>
- </part>
- </software>
-
- <software name="zorakk">
- <description>Zorakk the Conqueror</description>
- <year>198?</year>
- <publisher>Icon</publisher>
- <part name="cass" interface="electron_cass">
- <dataarea name="cass" size="6220">
- <rom name="zorakktheconqueror_e.uef" size="6220" crc="d5a35425" sha1="0e9641c81a413cbae035db89858335ba3670a495" offset="0"/>
- </dataarea>
- </part>
- </software>
-</softwarelist>
diff --git a/hash/fidel_scc.xml b/hash/fidel_scc.xml
deleted file mode 100644
index d6afe1e7d07..00000000000
--- a/hash/fidel_scc.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
-
-<softwarelist name="fidel_scc" description="Fidelity SCC Modules">
-
-<!-- Sensory Chess Challenger: 9, 12, A/S, .. -->
-
- <software name="cb16">
- <description>Challenger Book Openings 2</description>
- <year>1982</year>
- <publisher>Fidelity Electronics</publisher>
- <part name="cart" interface="fidel_scc">
- <dataarea name="rom" size="0x4000">
- <rom name="101-1042a01" size="0x2000" crc="591b3e4a" sha1="f75ae850f2f70808b5423f847ff12ee890752bf8" offset="0x0000" />
- <rom name="101-1042a02" size="0x2000" crc="1bdf0a21" sha1="1c6f673c0bf846e705d15c802f433ac1dc9b153c" offset="0x2000" />
- </dataarea>
- </part>
- </software>
-
-</softwarelist>
diff --git a/hash/k28m2.xml b/hash/k28m2.xml
deleted file mode 100644
index 27ce1fdf58f..00000000000
--- a/hash/k28m2.xml
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
-
-<softwarelist name="k28m2" description="K28 model 7-232 modules">
-
- <software name="m1">
- <description>Expansion Module 1</description>
- <year>1986?</year>
- <publisher>Tiger Electronics</publisher>
- <info name="serial" value="CM62086"/>
- <part name="cart" interface="k28m2">
- <dataarea name="rom" size="0x4000">
- <rom name="cm62086.vsm" size="0x4000" crc="0349798b" sha1="afdad242f9c7dec0c5fd83670e3d8f1637140e76" offset="0" />
- </dataarea>
- </part>
- </software>
-
- <software name="m2">
- <description>Expansion Module 2</description>
- <year>1986</year>
- <publisher>Tiger Electronics</publisher>
- <info name="serial" value="CM62216"/>
- <part name="cart" interface="k28m2">
- <dataarea name="rom" size="0x4000">
- <rom name="cm62216.vsm" size="0x4000" crc="1c99306f" sha1="7bfadeec79bdc231c4e3447149e2f6542cfe077d" offset="0" />
- </dataarea>
- </part>
- </software>
-
- <software name="m3">
- <description>Expansion Module 3</description>
- <year>1986</year>
- <publisher>Tiger Electronics</publisher>
- <info name="serial" value="CM62215"/>
- <part name="cart" interface="k28m2">
- <dataarea name="rom" size="0x4000">
- <rom name="cm62215.vsm" size="0x4000" crc="f2deb9a2" sha1="9fb264b869d1298ebd76811931bed83ac122fe4b" offset="0" />
- </dataarea>
- </part>
- </software>
-
- <software name="m4">
- <description>Expansion Module 4</description>
- <year>1986</year>
- <publisher>Tiger Electronics</publisher>
- <info name="serial" value="CM62217"/>
- <part name="cart" interface="k28m2">
- <dataarea name="rom" size="0x4000">
- <rom name="cm62217.vsm" size="0x4000" crc="995936b2" sha1="8bd0fea4ade9972d1d6cb521f9367c971c7eead6" offset="0" />
- </dataarea>
- </part>
- </software>
-
-<!--
- <software name="m5">
- <description>Expansion Module 5</description>
- <year>1987</year>
- <publisher>Tiger Electronics</publisher>
- <info name="serial" value="CM62218"/>
- <part name="cart" interface="k28m2">
- <dataarea name="rom" size="0x4000">
- <rom name="cm62217.vsm" size="0x4000" crc="x" sha1="x" offset="0" />
- </dataarea>
- </part>
- </software>
--->
-
- <software name="m6">
- <description>Expansion Module 6</description>
- <year>1987</year>
- <publisher>Tiger Electronics</publisher>
- <info name="serial" value="CM62219"/>
- <part name="cart" interface="k28m2">
- <dataarea name="rom" size="0x4000">
- <rom name="cm62219.vsm" size="0x4000" crc="177b5cb5" sha1="2ed44fea8f931fc8aa46dafdda1c6c30b8c9dc01" offset="0" />
- </dataarea>
- </part>
- </software>
-
-
-</softwarelist>
diff --git a/hash/m5_cart.xml b/hash/m5_cart.xml
index c090bd9cfe1..b23d9269ae3 100644
--- a/hash/m5_cart.xml
+++ b/hash/m5_cart.xml
@@ -57,8 +57,8 @@ Learning Soft:
Programming Languages:
- - FALC
- - FALC-II
+ - FLAC
+ - FLAC-II
- BASIC-I
- BASIC-G
- BASIC-F
@@ -97,7 +97,7 @@ and why some of the dumps below have weird size?
<info name="usage" value="Requires 36k RAM" />
<part name="cart" interface="m5_cart">
<dataarea name="rom" size="8192">
- <rom name="tank battalion (1980)(namco)(jp).bin" size="8192" crc="daa0d610" sha1="5867090fbe2584654dd2c2aaa215e69243f2f599" offset="00000"/>
+ <rom name="tank battlaion (1980)(namco)(jp).bin" size="8192" crc="daa0d610" sha1="5867090fbe2584654dd2c2aaa215e69243f2f599" offset="00000" status="baddump" />
</dataarea>
</part>
</software>
@@ -162,7 +162,7 @@ and why some of the dumps below have weird size?
<info name="alt_title" value="スーパーコブラ" />
<part name="cart" interface="m5_cart">
<dataarea name="rom" size="8192">
- <rom name="super cobra (1981)(konami)(jp).bin" size="8192" crc="55cbd90b" sha1="d29f1d1d88a0b6738b68cf8d2406fbf1f05ba39b" offset="00000"/>
+ <rom name="super cobra (1981)(konami)(jp).bin" size="8192" crc="55cbd90b" sha1="d29f1d1d88a0b6738b68cf8d2406fbf1f05ba39b" offset="00000" status="baddump" />
</dataarea>
</part>
</software>
@@ -232,14 +232,14 @@ and why some of the dumps below have weird size?
</software>
<software name="pooyana" cloneof="pooyan">
- <description>Pooyan (Alt)Modified version cooperating with 64kB RAM</description>
+ <description>Pooyan (Alt)</description>
<year>1982</year>
<publisher>Konami</publisher>
<info name="serial" value="11" />
<info name="alt_title" value="プーヤン" />
<part name="cart" interface="m5_cart">
<dataarea name="rom" size="8192">
- <rom name="pooyan (1982)(konami)(jp).bin" size="8192" crc="ded8b4f4" sha1="4c9e58e52d336b4c01a24e3ca2e62fb7757407fd" offset="00000"/>
+ <rom name="pooyan (1982)(konami)(jp).bin" size="8192" crc="ded8b4f4" sha1="4c9e58e52d336b4c01a24e3ca2e62fb7757407fd" offset="00000" status="baddump" />
</dataarea>
</part>
</software>
@@ -252,7 +252,7 @@ and why some of the dumps below have weird size?
<info name="alt_title" value="ヘビーボクシング" />
<part name="cart" interface="m5_cart">
<dataarea name="rom" size="8192">
- <rom name="heavy boxing (1983)(takara)(jp).bin" size="8192" crc="19540dce" sha1="388838ed501bcc3a9fd18e32488f13a6ce6a0689" offset="00000"/>
+ <rom name="heavy boxing (1983)(takara)(jp).bin" size="8192" crc="19540dce" sha1="388838ed501bcc3a9fd18e32488f13a6ce6a0689" offset="00000" status="baddump" />
</dataarea>
</part>
</software>
@@ -265,7 +265,7 @@ and why some of the dumps below have weird size?
<info name="alt_title" value="リアルテニス" />
<part name="cart" interface="m5_cart">
<dataarea name="rom" size="8192">
- <rom name="real tennis (1983)(takara)(jp).bin" size="8192" crc="ed80d6c9" sha1="03f3385b360c3573edab1fca53f82b4d6a4f8736" offset="00000"/>
+ <rom name="real tennis (1983)(takara)(jp).bin" size="8192" crc="ed80d6c9" sha1="03f3385b360c3573edab1fca53f82b4d6a4f8736" offset="00000" status="baddump" />
</dataarea>
</part>
</software>
@@ -278,7 +278,7 @@ and why some of the dumps below have weird size?
<info name="alt_title" value="ワードメイズ" />
<part name="cart" interface="m5_cart">
<dataarea name="rom" size="8192">
- <rom name="word maze (19xx)(sord)(jp).bin" size="8192" crc="fda88e0d" sha1="a0fbe727bfca773d3cc193eb7a9c77e7b418b0a2" offset="00000"/>
+ <rom name="word maze (19xx)(sord)(jp).bin" size="8192" crc="fda88e0d" sha1="a0fbe727bfca773d3cc193eb7a9c77e7b418b0a2" offset="00000" status="baddump" />
</dataarea>
</part>
</software>
@@ -344,7 +344,7 @@ and why some of the dumps below have weird size?
<info name="alt_title" value="エスキモン" />
<part name="cart" interface="m5_cart">
<dataarea name="rom" size="8192">
- <rom name="eskimon (1984)(takara)(jp).bin" size="8192" crc="96931021" sha1="115eee645e5213c16ad4a27bbeed5e2f3fa4be22" offset="00000" />
+ <rom name="eskimon (1984)(takara)(jp).bin" size="8192" crc="96931021" sha1="115eee645e5213c16ad4a27bbeed5e2f3fa4be22" offset="00000" status="baddump" />
</dataarea>
</part>
</software>
@@ -357,7 +357,7 @@ and why some of the dumps below have weird size?
<info name="alt_title" value="ファニーマウス" />
<part name="cart" interface="m5_cart">
<dataarea name="rom" size="8192">
- <rom name="funny mouse (1983)(takara)(jp).bin" size="8192" crc="94145074" sha1="43c2a1a5959ab8057c7d149472512a0c7996c798" offset="00000" />
+ <rom name="funny mouse (1983)(takara)(jp).bin" size="8192" crc="94145074" sha1="43c2a1a5959ab8057c7d149472512a0c7996c798" offset="00000" status="baddump" />
</dataarea>
</part>
</software>
@@ -394,7 +394,7 @@ and why some of the dumps below have weird size?
<publisher>Takara</publisher>
<part name="cart" interface="m5_cart">
<dataarea name="rom" size="4096">
- <rom name="dragon attack (1983)(takara)(jp).bin" size="4096" crc="5862d06c" sha1="f2707ad6dd564df01e7f81a21a00842e17cd49a4" offset="00000" />
+ <rom name="dragon attack (1983)(takara)(jp).bin" size="4096" crc="5862d06c" sha1="f2707ad6dd564df01e7f81a21a00842e17cd49a4" offset="00000" status="baddump" />
</dataarea>
</part>
</software>
@@ -405,7 +405,7 @@ and why some of the dumps below have weird size?
<publisher>Takara</publisher>
<part name="cart" interface="m5_cart">
<dataarea name="rom" size="4096">
- <rom name="fruit search (1983)(takara)(jp).bin" size="4096" crc="333ac50f" sha1="a838fbf0bc4513d3b6bcc3165f1eac33ca27d6fa" offset="00000"/>
+ <rom name="fruit search (1983)(takara)(jp).bin" size="4096" crc="333ac50f" sha1="a838fbf0bc4513d3b6bcc3165f1eac33ca27d6fa" offset="00000" status="baddump" />
</dataarea>
</part>
</software>
@@ -431,7 +431,7 @@ and why some of the dumps below have weird size?
<publisher>Sord</publisher>
<part name="cart" interface="m5_cart">
<dataarea name="rom" size="20480">
- <rom name="basic-f (198x)(sord)(jp).bin" size="20480" crc="47be051f" sha1="9942b8f05a441b5dee7ab31ec5b8a643f7e268b8" offset="00000"/>
+ <rom name="basic-f (198x)(sord)(jp).bin" size="20480" crc="47be051f" sha1="9942b8f05a441b5dee7ab31ec5b8a643f7e268b8" offset="00000" status="baddump" />
</dataarea>
</part>
</software>
@@ -442,7 +442,7 @@ and why some of the dumps below have weird size?
<publisher>Sord</publisher>
<part name="cart" interface="m5_cart">
<dataarea name="rom" size="16384">
- <rom name="basic-g (198x)(sord)(jp).bin" size="16384" crc="107b5ddc" sha1="071fa84c7b10d9d7841c504564825609ebf66140" offset="00000"/>
+ <rom name="basic-g (198x)(sord)(jp).bin" size="16384" crc="107b5ddc" sha1="071fa84c7b10d9d7841c504564825609ebf66140" offset="00000" status="baddump" />
</dataarea>
</part>
</software>
@@ -453,7 +453,7 @@ and why some of the dumps below have weird size?
<publisher>Sord</publisher>
<part name="cart" interface="m5_cart">
<dataarea name="rom" size="8192">
- <rom name="basic-i (198x)(sord)(jp).bin" size="8192" crc="9a98e6ce" sha1="d11f7623919ee593e275e9f00f8a4acf7aed3cf5" offset="00000"/>
+ <rom name="basic-i (198x)(sord)(jp).bin" size="8192" crc="9a98e6ce" sha1="d11f7623919ee593e275e9f00f8a4acf7aed3cf5" offset="00000" status="baddump" />
</dataarea>
</part>
</software>
@@ -465,7 +465,7 @@ and why some of the dumps below have weird size?
<info name="usage" value="Requires 36k RAM" />
<part name="cart" interface="m5_cart">
<dataarea name="rom" size="16384">
- <rom name="falc (198x)(sord)(jp).bin" size="16384" crc="78037f97" sha1="4cd917388a626d38dd8b16834c2e610d0ba6d505" offset="00000" />
+ <rom name="falc (198x)(sord)(jp).bin" size="16384" crc="78037f97" sha1="4cd917388a626d38dd8b16834c2e610d0ba6d505" offset="00000" status="baddump" />
</dataarea>
</part>
</software>
@@ -476,32 +476,32 @@ and why some of the dumps below have weird size?
<publisher>Sord</publisher>
<part name="cart" interface="m5_cart">
<dataarea name="rom" size="16384">
- <rom name="zzz-unk-pdesigner.bin" size="16384" crc="af987f7b" sha1="3a4cffc8d81a384f8bb2dfebf5e02cda1f0c7e21" offset="00000"/>
+ <rom name="zzz-unk-pdesigne.bin" size="16384" crc="af987f7b" sha1="3a4cffc8d81a384f8bb2dfebf5e02cda1f0c7e21" offset="00000" status="baddump" />
</dataarea>
</part>
</software>
<!-- Unidentified items -->
<software name="basicw">
- <!-- Modified Basic-F with floppy support(WD2797B) -->
+ <!-- is this legit?!? might it be Disk BASIC? -->
<description>BASIC-W</description>
<year>198?</year>
<publisher>Sord?</publisher>
<part name="cart" interface="m5_cart">
<dataarea name="rom" size="20480">
- <rom name="basic-w (198x)(sord)(jp).bin" size="20480" crc="2b1087cf" sha1="aa8d7c6c405e1360f074590abdc3d82df07cb564" offset="00000"/>
+ <rom name="basic-w (198x)(sord)(jp).bin" size="20480" crc="2b1087cf" sha1="aa8d7c6c405e1360f074590abdc3d82df07cb564" offset="00000" status="baddump" />
</dataarea>
</part>
</software>
<software name="m5term">
- <!-- Terminal for serial interface -->
+ <!-- is this legit?!? might it be M-Editor? -->
<description>M5 Terminal</description>
<year>19??</year>
<publisher>&lt;unknown&gt;</publisher>
<part name="cart" interface="m5_cart">
<dataarea name="rom" size="7168">
- <rom name="m5 terminal (19xx)(-).bin" size="7168" crc="2b73c483" sha1="53c093d4c3c5ba990bf8673963f9ff529e99a252" offset="00000" />
+ <rom name="m5 terminal (19xx)(-).bin" size="7168" crc="2b73c483" sha1="53c093d4c3c5ba990bf8673963f9ff529e99a252" offset="00000" status="baddump" />
</dataarea>
</part>
</software>
@@ -512,7 +512,7 @@ and why some of the dumps below have weird size?
<publisher>&lt;unknown&gt;</publisher>
<part name="cart" interface="m5_cart">
<dataarea name="rom" size="4400">
- <rom name="zac banic (19xx)(-).bin" size="4400" crc="fd421eea" sha1="6c3d5c15817617508de5f994c0a980ff6c6ca303" offset="00000"/>
+ <rom name="zac banic (19xx)(-).bin" size="4400" crc="fd421eea" sha1="6c3d5c15817617508de5f994c0a980ff6c6ca303" offset="00000" status="baddump" />
</dataarea>
</part>
</software>
@@ -536,7 +536,7 @@ and why some of the dumps below have weird size?
<info name="usage" value="Requires 36k RAM" />
<part name="cart" interface="m5_cart">
<dataarea name="rom" size="6176">
- <rom name="drops (1986)(spc)(jp).bin" size="6176" crc="fa321348" sha1="e9a44e12eed9d51cdb40ce4b6f1cb19a1ebed35d" offset="00000" />
+ <rom name="drops (1986)(spc)(jp).bin" size="6176" crc="fa321348" sha1="e9a44e12eed9d51cdb40ce4b6f1cb19a1ebed35d" offset="00000" status="baddump" />
</dataarea>
</part>
</software>
@@ -548,7 +548,7 @@ and why some of the dumps below have weird size?
<info name="usage" value="Requires 36k RAM" />
<part name="cart" interface="m5_cart">
<dataarea name="rom" size="5920">
- <rom name="jumping jack (1986)(spc)(jp).bin" size="5920" crc="49030973" sha1="c8716276fe6c4b0808078086f505efce1137afc9" offset="00000"/>
+ <rom name="jumping jack (1986)(spc)(jp).bin" size="5920" crc="49030973" sha1="c8716276fe6c4b0808078086f505efce1137afc9" offset="00000" status="baddump" />
</dataarea>
</part>
</software>
@@ -560,7 +560,7 @@ and why some of the dumps below have weird size?
<info name="usage" value="Requires 36k RAM" />
<part name="cart" interface="m5_cart">
<dataarea name="rom" size="12288">
- <rom name="masterchess (19xx)(-).bin" size="12288" crc="c10a6e96" sha1="5dd24aae17c3a293ae91ef5086c1c4f3e59263ed" offset="00000"/>
+ <rom name="masterchess (19xx)(-).bin" size="12288" crc="c10a6e96" sha1="5dd24aae17c3a293ae91ef5086c1c4f3e59263ed" offset="00000" status="baddump" />
</dataarea>
</part>
</software>
@@ -572,7 +572,7 @@ and why some of the dumps below have weird size?
<info name="usage" value="Requires 36k RAM" />
<part name="cart" interface="m5_cart">
<dataarea name="rom" size="6392">
- <rom name="reversi (19xx)(games of skill).bin" size="6392" crc="ca2cd257" sha1="a048a1055d175ace09155e50da0387986e150f92" offset="00000" />
+ <rom name="reversi (19xx)(games of skill).bin" size="6392" crc="ca2cd257" sha1="a048a1055d175ace09155e50da0387986e150f92" offset="00000" status="baddump" />
</dataarea>
</part>
</software>
@@ -580,10 +580,11 @@ and why some of the dumps below have weird size?
<!-- these come from TOSEC: they do not work and it's not clear where they
come from... they might be eventually removed -->
-<!-- Actualy this is wordmaze translated into Czech 1990 by ROS-->
+<!-- the first contains Czech text strings so it might be a real Czech cart,
+but we need more info -->
<software name="unk_maze" supported="no">
<description>Unknown CSMAZE</description>
- <year>1983</year>
+ <year>19??</year>
<publisher>&lt;unknown&gt;</publisher>
<part name="cart" interface="m5_cart">
<dataarea name="rom" size="8448">
@@ -605,88 +606,4 @@ come from... they might be eventually removed -->
</part>
</software>
-
-
-<!-- This is only Sord memory expansion -->
- <software name="em-5" supported="no">
- <description>EM-5 Expansion memory 32Kb</description>
- <year>198?</year>
- <publisher>Sord</publisher>
- <part name="cart" interface="m5_cart">
- <feature name="slot" value="ram"/>
- <dataarea name="ram" size="32768">
- </dataarea>
- </part>
- </software>
-
-<!-- Homebrew memory modules -->
-
- <software name="64kbi" supported="no">
- <description>EM-64 Expansion memory 64Kb</description>
- <year>198?</year>
- <publisher>unknown</publisher>
- <part name="cart" interface="m5_cart">
- <feature name="slot" value="ram"/>
- <dataarea name="ram" size="65536">
- </dataarea>
- </part>
- </software>
-
- <software name="64kbf" supported="no">
- <description>64Kbf Expansion memory 64Kb</description>
- <year>199?</year>
- <publisher>unknown</publisher>
- <part name="cart" interface="m5_cart">
- <feature name="slot" value="ram"/>
- <dataarea name="ram" size="65536">
- </dataarea>
- <dataarea name="rom" size="20480">
- <rom name="basic-f (198x)(sord)(jp).bin" size="20480" crc="47be051f" sha1="9942b8f05a441b5dee7ab31ec5b8a643f7e268b8" offset="00000"/>
- </dataarea>
- </part>
- </software>
-
- <software name="64krx" supported="no">
- <description>64Krx Expansion board 64Kb</description>
- <year>199?</year>
- <publisher>unknown</publisher>
- <part name="cart" interface="m5_cart">
- <feature name="slot" value="ram"/>
- <dataarea name="ram" size="65536">
- </dataarea>
- <dataarea name="rom" size="0x16000">
- <rom name="krx_rom2.rom" size="0x2000" crc="5AF18FBD" sha1="cd67d65fb51cdb3a47cc8350a878a77360a353c8" offset="0x0000"/>
- <rom name="basic-i (198x)(sord)(jp).bin" size="0x2000" crc="9a98e6ce" sha1="d11f7623919ee593e275e9f00f8a4acf7aed3cf5" offset="0x2000"/>
- <rom name="krx_rom4.rom" size="0x4000" crc="27FFB883" sha1="be930946e7cd5f0f3e803792906e087cce122703" offset="0x6000"/>
- <rom name="krx_rom5.rom" size="0x4000" crc="107B5DDC" sha1="071fa84c7b10d9d7841c504564825609ebf66140" offset="0xa000"/>
- <rom name="krx_rom6.rom" size="0x4000" crc="4D6E9C1A" sha1="d8bf96fc4016e245fd84d713fd988dd503a38d0b" offset="0xe000"/>
- <rom name="krx_rom7.rom" size="0x4000" crc="4EF7830A" sha1="9527236af9dd0db25498f4029793703ba8672af5" offset="0x12000"/>
- </dataarea>
- </part>
- </software>
-
- <!-- Brno mod ROMs -->
-
- <software name="brnoboot" supported="no">
- <description>Boot for Brno ramdisk</description>
- <year>1989</year>
- <publisher>&lt;Pavel Brychta a spol.&gt;</publisher>
- <part name="cart" interface="m5_cart">
- <dataarea name="rom" size="3456">
- <rom name="brno_boot.rom" size="3456" crc="60008729" sha1="FB26E2AE9F74B0AE0D723B417A038A8EF3D72782" offset="00000"/>
- </dataarea>
- </part>
- </software>
-
- <software name="brno_win" supported="no">
- <description>Brno windows boot</description>
- <year>1989</year>
- <publisher>&lt;Ladislav Novak&gt;</publisher>
- <part name="cart" interface="m5_cart">
- <dataarea name="rom" size="8192">
- <rom name="brno_win.rom" size="8192" crc="f4cfb2ee" sha1="23f41d2d9ac915545409dd0163f3dc298f04eea2" offset="00000"/>
- </dataarea>
- </part>
- </software>
-
</softwarelist>
diff --git a/hash/m5_flop.xml b/hash/m5_flop.xml
deleted file mode 100644
index 54ab259fc8c..00000000000
--- a/hash/m5_flop.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
-<softwarelist name="m5_flop" description="Sord m5 diskettes">
-
- <software name="bb">
- <description>Booting diskette for CP/M.[Brno mod]</description>
- <year>1989</year>
- <publisher></publisher>
- <part name="flop1" interface="floppy_5_25">
- <dataarea name="flop" size="860416">
- <rom name="brno_boot_cpm.dsk" size="860416" crc="9484f399" sha1="efd1e664d5f4b80a7d49078cc80d187f72f4bc2f" offset="0" />
- </dataarea>
- </part>
- </software>
-
-</softwarelist>
diff --git a/hash/pico.xml b/hash/pico.xml
index 08dc5b5ec30..71ba190c791 100644
--- a/hash/pico.xml
+++ b/hash/pico.xml
@@ -1818,7 +1818,7 @@ Published by Others (T-yyy*** serial codes, for yyy depending on the publisher)
<year>1995</year>
<publisher>Imagineer</publisher>
<part name="cart" interface="pico_cart">
- <feature name="pcb" value="171-6882A" />
+ <feature name="pcb" value="171-6882A" />
<dataarea name="rom" size="524288">
<rom name="mpr-18565-t.ic1" size="524288" crc="8ba23bbe" sha1="85e6ed98f5e7bfa04c1b099bba79ddd34ccdd40e" offset="000000" loadflag="load16_word_swap" />
</dataarea>
diff --git a/hash/snotec.xml b/hash/snotec.xml
index b34d3410bf3..2873bd4f522 100644
--- a/hash/snotec.xml
+++ b/hash/snotec.xml
@@ -72,42 +72,4 @@
</dataarea>
</part>
</software>
-
- <software name="caudit">
- <description>Challenge Audition</description>
- <year>1998</year>
- <publisher>Bandai</publisher>
- <part name="rom" interface="genius_cart">
- <dataarea name="rom" size="0x40000">
- <rom name="Audition.ic1" size="0x40000" crc="685fc899" sha1="0e203ed002450031663d6626380d39b88dc7b1ab" offset="0" />
- </dataarea>
- <dataarea name="eeprom" size="0x4000">
- </dataarea>
- </part>
- </software>
-
- <software name="conan">
- <description>Detective Conan</description>
- <year>1996</year>
- <publisher>Bandai</publisher>
- <part name="rom" interface="genius_cart">
- <dataarea name="rom" size="0x40000">
- <rom name="LH532KV6.IC1" size="0x40000" crc="edf3cc1e" sha1="0b759ff7dd2bd6809e5634679f758de106fed654" offset="0" />
- </dataarea>
- </part>
- </software>
-
- <software name="magicalf">
- <description>Magical Fortune</description>
- <year>1996</year>
- <publisher>Bandai</publisher>
- <part name="rom" interface="genius_cart">
- <dataarea name="rom" size="0x40000">
- <rom name="LH532KWU.ic1" size="0x40000" crc="b0017e0d" sha1="0147f0c61fa47509971222cbacfafd382ed2e31d" offset="0" />
- </dataarea>
- <dataarea name="eeprom" size="0x800">
- </dataarea>
- </part>
- </software>
-
</softwarelist>
diff --git a/hlsl/artwork_support/distortion.fx b/hlsl/artwork_support/distortion.fx
deleted file mode 100644
index 333363afeb8..00000000000
--- a/hlsl/artwork_support/distortion.fx
+++ /dev/null
@@ -1,101 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:ImJezze
-//-----------------------------------------------------------------------------
-// Distortion Effect
-//-----------------------------------------------------------------------------
-
-//-----------------------------------------------------------------------------
-// Sampler Definitions
-//-----------------------------------------------------------------------------
-
-texture DiffuseTexture;
-
-sampler DiffuseSampler = sampler_state
-{
- Texture = <DiffuseTexture>;
- MipFilter = LINEAR;
- MinFilter = LINEAR;
- MagFilter = LINEAR;
- AddressU = CLAMP;
- AddressV = CLAMP;
- AddressW = CLAMP;
-};
-
-//-----------------------------------------------------------------------------
-// Vertex Definitions
-//-----------------------------------------------------------------------------
-
-struct VS_INPUT
-{
- float4 Position : POSITION;
- float4 Color : COLOR0;
- float2 TexCoord : TEXCOORD0;
-};
-
-struct VS_OUTPUT
-{
- float4 Position : POSITION;
- float4 Color : COLOR0;
- float2 TexCoord : TEXCOORD0;
-};
-
-struct PS_INPUT
-{
- float4 Color : COLOR0;
- float2 TexCoord : TEXCOORD0;
-};
-
-//-----------------------------------------------------------------------------
-// Distortion Vertex Shader
-//-----------------------------------------------------------------------------
-
-uniform float2 ScreenDims; // size of the window or fullscreen
-uniform float2 TargetDims;
-
-VS_OUTPUT vs_main(VS_INPUT Input)
-{
- VS_OUTPUT Output = (VS_OUTPUT)0;
-
- Output.Position = float4(Input.Position.xyz, 1.0f);
- Output.Position.xy /= ScreenDims;
- Output.Position.y = 1.0f - Output.Position.y; // flip y
- Output.Position.xy -= 0.5f; // center
- Output.Position.xy *= 2.0f; // zoom
-
- Output.Color = Input.Color;
-
- Output.TexCoord = Input.Position.xy / ScreenDims;
- Output.TexCoord += 0.5f / TargetDims; // half texel offset correction (DX9)
-
- return Output;
-}
-
-//-----------------------------------------------------------------------------
-// Post-Processing Pixel Shader
-//-----------------------------------------------------------------------------
-
-float4 ps_main(PS_INPUT Input) : COLOR
-{
- float2 BaseCoord = Input.TexCoord;
-
- // Color
- float4 BaseColor = tex2D(DiffuseSampler, BaseCoord);
- BaseColor.a = 1.0f;
-
- return BaseColor;
-}
-
-//-----------------------------------------------------------------------------
-// Distortion Effect
-//-----------------------------------------------------------------------------
-
-technique DefaultTechnique
-{
- pass Pass0
- {
- Lighting = FALSE;
-
- VertexShader = compile vs_3_0 vs_main();
- PixelShader = compile ps_3_0 ps_main();
- }
-} \ No newline at end of file
diff --git a/hlsl/artwork_support/post.fx b/hlsl/artwork_support/post.fx
deleted file mode 100644
index 9a3b693cd61..00000000000
--- a/hlsl/artwork_support/post.fx
+++ /dev/null
@@ -1,535 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Ryan Holtz,ImJezze
-//-----------------------------------------------------------------------------
-// Scanline, Shadowmask & Distortion Effect
-//-----------------------------------------------------------------------------
-
-//-----------------------------------------------------------------------------
-// Sampler Definitions
-//-----------------------------------------------------------------------------
-
-texture DiffuseTexture;
-
-sampler DiffuseSampler = sampler_state
-{
- Texture = <DiffuseTexture>;
- MipFilter = LINEAR;
- MinFilter = LINEAR;
- MagFilter = LINEAR;
- AddressU = CLAMP;
- AddressV = CLAMP;
- AddressW = CLAMP;
-};
-
-texture ShadowTexture;
-
-sampler ShadowSampler = sampler_state
-{
- Texture = <ShadowTexture>;
- MipFilter = LINEAR;
- MinFilter = LINEAR;
- MagFilter = LINEAR;
- AddressU = WRAP;
- AddressV = WRAP;
- AddressW = WRAP;
-};
-
-//-----------------------------------------------------------------------------
-// Vertex Definitions
-//-----------------------------------------------------------------------------
-
-struct VS_INPUT
-{
- float4 Position : POSITION;
- float4 Color : COLOR0;
- float2 TexCoord : TEXCOORD0;
-};
-
-struct VS_OUTPUT
-{
- float4 Position : POSITION;
- float4 Color : COLOR0;
- float2 TexCoord : TEXCOORD0;
- float2 ScreenCoord : TEXCOORD1;
-};
-
-struct PS_INPUT
-{
- float4 Color : COLOR0;
- float2 TexCoord : TEXCOORD0;
- float2 ScreenCoord : TEXCOORD1;
-};
-
-//-----------------------------------------------------------------------------
-// Constants
-//-----------------------------------------------------------------------------
-
-static const float Epsilon = 1.0e-7f;
-static const float PI = 3.1415927f;
-static const float PHI = 1.618034f;
-static const float E = 2.7182817f;
-static const float Gelfond = 23.140692f; // e^pi (Gelfond constant)
-static const float GelfondSchneider = 2.6651442f; // 2^sqrt(2) (Gelfond-Schneider constant)
-
-//-----------------------------------------------------------------------------
-// Functions
-//-----------------------------------------------------------------------------
-
-// www.stackoverflow.com/questions/5149544/can-i-generate-a-random-number-inside-a-pixel-shader/
-float random(float2 seed)
-{
- // irrationals for pseudo randomness
- float2 i = float2(Gelfond, GelfondSchneider);
-
- return frac(cos(dot(seed, i)) * 123456.0f);
-}
-
-// www.dinodini.wordpress.com/2010/04/05/normalized-tunable-sigmoid-functions/
-float normalizedSigmoid(float n, float k)
-{
- // valid for n and k in range of -1.0 and 1.0
- return (n - n * k) / (k - abs(n) * 2.0f * k + 1);
-}
-
-// www.iquilezles.org/www/articles/distfunctions/distfunctions.htm
-float roundBox(float2 p, float2 b, float r)
-{
- return length(max(abs(p) - b + r, 0.0f)) - r;
-}
-
-//-----------------------------------------------------------------------------
-// Scanline, Shadowmask & Distortion Vertex Shader
-//-----------------------------------------------------------------------------
-
-uniform float2 ScreenDims; // size of the window or fullscreen
-uniform float2 SourceDims; // size of the texture in power-of-two size
-uniform float2 SourceRect; // size of the uv rectangle
-uniform float2 TargetDims; // size of the target surface
-uniform float2 QuadDims; // size of the screen quad
-
-uniform float2 ShadowDims = float2(32.0f, 32.0f); // size of the shadow texture (extended to power-of-two size)
-uniform float2 ShadowUVOffset = float2(0.0f, 0.0f);
-
-uniform bool SwapXY = false;
-
-uniform int RotationType = 0; // 0 = 0°, 1 = 90°, 2 = 180°, 3 = 270°
-
-uniform bool PrepareBloom = false; // disables some effects for rendering bloom textures
-uniform bool PrepareVector = false;
-
-VS_OUTPUT vs_main(VS_INPUT Input)
-{
- VS_OUTPUT Output = (VS_OUTPUT)0;
-
- float2 shadowUVOffset = ShadowUVOffset;
- shadowUVOffset = SwapXY
- ? shadowUVOffset.yx
- : shadowUVOffset.xy;
-
- float2 ScreenCoordOffset = 0.0f;
- ScreenCoordOffset += shadowUVOffset;
-
- Output.ScreenCoord = Input.Position.xy;
- Output.ScreenCoord += ScreenCoordOffset;
-
- Output.Position = float4(Input.Position.xyz, 1.0f);
- Output.Position.xy /= ScreenDims;
- Output.Position.y = 1.0f - Output.Position.y; // flip y
- Output.Position.xy -= 0.5f; // center
- Output.Position.xy *= 2.0f; // zoom
-
- Output.TexCoord = PrepareVector
- ? Input.Position.xy / ScreenDims
- : Input.TexCoord;
- Output.TexCoord += 0.5f / TargetDims; // half texel offset correction (DX9)
-
- Output.Color = Input.Color;
-
- return Output;
-}
-
-//-----------------------------------------------------------------------------
-// Scanline, Shadowmask & Distortion Pixel Shader
-//-----------------------------------------------------------------------------
-
-uniform float HumBarHertzRate = 60.0f / 59.94f - 1.0f; // difference between the 59.94 Hz field rate and 60 Hz line frequency (NTSC)
-uniform float HumBarAlpha = 0.0f;
-
-uniform float TimeMilliseconds = 0.0f;
-
-uniform float2 ScreenScale = float2(1.0f, 1.0f);
-uniform float2 ScreenOffset = float2(0.0f, 0.0f);
-
-uniform float ScanlineAlpha = 1.0f;
-uniform float ScanlineScale = 1.0f;
-uniform float ScanlineBrightScale = 1.0f;
-uniform float ScanlineBrightOffset = 1.0f;
-uniform float ScanlineOffset = 1.0f;
-uniform float ScanlineHeight = 1.0f;
-
-uniform float3 BackColor = float3(0.0f, 0.0f, 0.0f);
-
-uniform float CurvatureAmount = 1.0f;
-uniform float RoundCornerAmount = 0.0f;
-uniform float SmoothBorderAmount = 0.0f;
-uniform float VignettingAmount = 0.0f;
-uniform float ReflectionAmount = 0.0f;
-
-uniform int ShadowTileMode = 0; // 0 based on screen dimension, 1 based on source dimension
-uniform float ShadowAlpha = 0.0f;
-uniform float2 ShadowCount = float2(6.0f, 6.0f);
-uniform float2 ShadowUV = float2(0.25f, 0.25f);
-
-uniform float3 Power = float3(1.0f, 1.0f, 1.0f);
-uniform float3 Floor = float3(0.0f, 0.0f, 0.0f);
-
-float2 GetRatioCorrection()
-{
- if (PrepareVector)
- {
- float ScreenRatio = ScreenDims.x / ScreenDims.y;
- float QuadRatio = QuadDims.x / QuadDims.y;
- float ScreenQuadRatio = QuadRatio / ScreenRatio;
-
- return ScreenQuadRatio > 1.0f
- ? float2(1.0, 1.0f / ScreenQuadRatio)
- : float2(ScreenQuadRatio, 1.0);
- }
- else
- {
- return SourceRect;
- }
-}
-
-float GetNoiseFactor(float n, float random)
-{
- // smaller n become more noisy
- return 1.0f + random * max(0.0f, 0.25f * pow(E, -8 * n));
-}
-
-float GetVignetteFactor(float2 coord, float amount)
-{
- float2 VignetteCoord = coord;
-
- float VignetteLength = length(VignetteCoord);
- float VignetteBlur = (amount * 0.75f) + 0.25;
-
- // 0.5 full screen fitting circle
- float VignetteRadius = 1.0f - (amount * 0.25f);
- float Vignette = smoothstep(VignetteRadius, VignetteRadius - VignetteBlur, VignetteLength);
-
- return saturate(Vignette);
-}
-
-float GetSpotAddend(float2 coord, float amount)
-{
- float2 RatioCorrection = GetRatioCorrection();
-
- // normalized screen canvas ratio
- float2 CanvasRatio = PrepareVector
- ? float2(1.0f, QuadDims.y / QuadDims.x)
- : float2(1.0f, SwapXY
- ? QuadDims.x / QuadDims.y
- : QuadDims.y / QuadDims.x);
-
- // upper right quadrant
- float2 spotOffset = PrepareVector
- ? RotationType == 1 // 90°
- ? float2(-0.25f, -0.25f)
- : RotationType == 2 // 180°
- ? float2(0.25f, -0.25f)
- : RotationType == 3 // 270°
- ? float2(0.25f, 0.25f)
- : float2(-0.25f, 0.25f)
- : SwapXY
- ? float2(0.25f, 0.25f)
- : float2(-0.25f, 0.25f);
-
- float2 SpotCoord = coord;
- SpotCoord += spotOffset * RatioCorrection;
- SpotCoord *= CanvasRatio;
- SpotCoord /= RatioCorrection;
-
- float SpotBlur = amount;
-
- // 0.5 full screen fitting circle
- float SpotRadius = amount * 0.75f;
- float Spot = smoothstep(SpotRadius, SpotRadius - SpotBlur, length(SpotCoord));
-
- float SigmoidSpot = amount * normalizedSigmoid(Spot, 0.75);
-
- // increase strength by 100%
- SigmoidSpot = SigmoidSpot * 2.0f;
-
- return saturate(SigmoidSpot);
-}
-
-float GetRoundCornerFactor(float2 coord, float radiusAmount, float smoothAmount)
-{
- float2 RatioCorrection = GetRatioCorrection();
-
- // reduce smooth amount down to radius amount
- smoothAmount = min(smoothAmount, radiusAmount);
-
- float2 CanvasDims = PrepareVector
- ? ScreenDims
- : SwapXY
- ? QuadDims.yx / SourceRect
- : QuadDims.xy / SourceRect;
-
- coord = PrepareVector
- ? coord
- : coord - 1.0f / SourceDims; // alignment correction (raster graphics)
-
- float range = min(QuadDims.x, QuadDims.y) * 0.5;
- float radius = range * max(radiusAmount, 0.0025f);
- float smooth = 1.0 / (range * max(smoothAmount, 0.0025f));
-
- // compute box
- float box = roundBox(CanvasDims * (coord * 2.0f), CanvasDims * RatioCorrection, radius);
-
- // apply smooth
- box *= smooth;
- box += 1.0f - pow(smooth * 0.5f, 0.5f);
-
- float border = smoothstep(1.0f, 0.0f, box);
-
- return saturate(border);
-}
-
-// www.francois-tarlier.com/blog/cubic-lens-distortion-shader/
-float2 GetDistortedCoords(float2 centerCoord, float amount)
-{
- // lens distortion coefficient
- float k = amount;
-
- // cubic distortion value
- float kcube = amount * 2.0f;
-
- // compute cubic distortion factor
- float r2 = centerCoord.x * centerCoord.x + centerCoord.y * centerCoord.y;
- float f = kcube == 0.0f
- ? 1.0f + r2 * k
- : 1.0f + r2 * (k + kcube * sqrt(r2));
-
- // fit screen bounds
- f /= 1.0f + amount * 0.5f;
-
- // apply cubic distortion factor
- centerCoord *= f;
-
- return centerCoord;
-}
-
-float2 GetCoords(float2 coord, float2 centerOffset, float distortionAmount)
-{
- float2 RatioCorrection = GetRatioCorrection();
-
- // center coordinates
- coord -= centerOffset;
-
- // apply ratio difference between screen and quad
- coord /= RatioCorrection;
-
- // distort coordinates
- coord = GetDistortedCoords(coord, distortionAmount);
-
- // revert ratio difference between screen and quad
- coord *= RatioCorrection;
-
- // un-center coordinates
- coord += centerOffset;
-
- return coord;
-}
-
-float2 GetAdjustedCoords(float2 coord, float2 centerOffset, float distortionAmount)
-{
- float2 RatioCorrection = GetRatioCorrection();
-
- // center coordinates
- coord -= centerOffset;
-
- // apply ratio difference between screen and quad
- coord /= RatioCorrection;
-
- // apply screen scale
- coord /= ScreenScale;
-
- // distort coordinates
- coord = GetDistortedCoords(coord, distortionAmount);
-
- // revert ratio difference between screen and quad
- coord *= RatioCorrection;
-
- // un-center coordinates
- coord += centerOffset;
-
- // apply screen offset
- coord += (centerOffset * 2.0) * ScreenOffset;
-
- return coord;
-}
-
-float4 ps_main(PS_INPUT Input) : COLOR
-{
- float2 ScreenTexelDims = 1.0f / ScreenDims;
- float2 SourceTexelDims = 1.0f / SourceDims;
-
- float2 HalfSourceRect = SourceRect * 0.5f;
-
- float2 ScreenCoord = Input.ScreenCoord / ScreenDims;
- ScreenCoord = GetCoords(ScreenCoord, float2(0.5f, 0.5f), CurvatureAmount * 0.25f); // reduced amount
-
- float2 DistortionCoord = Input.TexCoord;
- DistortionCoord = GetCoords(DistortionCoord, HalfSourceRect, CurvatureAmount * 0.25f); // reduced amount
-
- float2 BaseCoord = Input.TexCoord;
- BaseCoord = GetAdjustedCoords(BaseCoord, HalfSourceRect, CurvatureAmount * 0.25f); // reduced amount
-
- float2 DistortionCoordCentered = DistortionCoord;
- DistortionCoordCentered -= HalfSourceRect;
-
- float2 BaseCoordCentered = BaseCoord;
- BaseCoordCentered -= HalfSourceRect;
-
- float4 BaseColor = tex2D(DiffuseSampler, BaseCoord);
- BaseColor.a = 1.0f;
-
- if (BaseCoord.x < 0.0f || BaseCoord.y < 0.0f)
- {
- BaseColor.rgb = 0.0f;
- }
-
- // Mask Simulation (may not affect bloom)
- if (!PrepareBloom && ShadowAlpha > 0.0f)
- {
- float2 shadowDims = ShadowDims;
- shadowDims = SwapXY
- ? shadowDims.yx
- : shadowDims.xy;
-
- float2 shadowUV = ShadowUV;
- // shadowUV = SwapXY
- // ? shadowUV.yx
- // : shadowUV.xy;
-
- float2 screenCoord = ShadowTileMode == 0 ? ScreenCoord : BaseCoord;
- screenCoord = SwapXY
- ? screenCoord.yx
- : screenCoord.xy;
-
- float2 shadowCount = ShadowCount;
- shadowCount = SwapXY
- ? shadowCount.yx
- : shadowCount.xy;
-
- float2 shadowTile = ((ShadowTileMode == 0 ? ScreenTexelDims : SourceTexelDims) * shadowCount);
- shadowTile = SwapXY
- ? shadowTile.yx
- : shadowTile.xy;
-
- float2 ShadowFrac = frac(screenCoord / shadowTile);
- float2 ShadowCoord = (ShadowFrac * shadowUV);
- ShadowCoord += 0.5f / shadowDims; // half texel offset
- // ShadowCoord = SwapXY
- // ? ShadowCoord.yx
- // : ShadowCoord.xy;
-
- float4 ShadowColor = tex2D(ShadowSampler, ShadowCoord);
- float3 ShadowMaskColor = lerp(1.0f, ShadowColor.rgb, ShadowAlpha);
- float ShadowMaskClear = (1.0f - ShadowColor.a) * ShadowAlpha;
-
- // apply shadow mask color
- BaseColor.rgb *= ShadowMaskColor;
- // clear shadow mask by background color
- BaseColor.rgb = lerp(BaseColor.rgb, BackColor, ShadowMaskClear);
- }
-
- // Color Compression (may not affect bloom)
- if (!PrepareBloom)
- {
- // increasing the floor of the signal without affecting the ceiling
- BaseColor.rgb = Floor + (1.0f - Floor) * BaseColor.rgb;
- }
-
- // Color Power (may affect bloom)
- BaseColor.r = pow(BaseColor.r, Power.r);
- BaseColor.g = pow(BaseColor.g, Power.g);
- BaseColor.b = pow(BaseColor.b, Power.b);
-
- // Scanline Simulation (may not affect bloom)
- if (!PrepareBloom)
- {
- // Scanline Simulation (may not affect vector screen)
- if (!PrepareVector && ScanlineAlpha > 0.0f)
- {
- float ScanCoord = BaseCoord.y * SourceDims.y * ScanlineScale * PI;
- float ScanCoordJitter = ScanlineOffset * PHI;
- float ScanSine = sin(ScanCoord + ScanCoordJitter);
- float ScanSineScaled = pow(ScanSine * ScanSine, ScanlineHeight);
- float ScanBrightness = ScanSineScaled * ScanlineBrightScale + 1.0f + ScanlineBrightOffset;
-
- BaseColor.rgb *= lerp(1.0f, ScanBrightness * 0.5f, ScanlineAlpha);
- }
-
- // Hum Bar Simulation (may not affect vector screen)
- if (!PrepareVector && HumBarAlpha > 0.0f)
- {
- float HumTimeStep = frac(TimeMilliseconds * HumBarHertzRate);
- float HumBrightness = 1.0 - frac(BaseCoord.y / SourceRect.y + HumTimeStep) * HumBarAlpha;
- BaseColor.rgb *= HumBrightness;
- }
- }
-
- // Output
- float4 Output = PrepareVector
- ? BaseColor * (Input.Color + float4(1.0f, 1.0f, 1.0f, 0.0f))
- : BaseColor * Input.Color;
- Output.a = 1.0f;
-
- // Vignetting Simulation (may not affect bloom)
- if (!PrepareBloom)
- {
- float2 VignetteCoord = DistortionCoordCentered;
-
- float VignetteFactor = GetVignetteFactor(VignetteCoord, VignettingAmount);
- Output.rgb *= VignetteFactor;
- }
-
- // Light Reflection Simulation (may not affect bloom)
- if (!PrepareBloom)
- {
- float3 LightColor = float3(1.0f, 0.90f, 0.80f);
-
- float2 SpotCoord = DistortionCoordCentered;
- float2 NoiseCoord = DistortionCoordCentered;
-
- float SpotAddend = GetSpotAddend(SpotCoord, ReflectionAmount);
- float NoiseFactor = GetNoiseFactor(SpotAddend, random(NoiseCoord));
- Output.rgb += SpotAddend * NoiseFactor * LightColor;
- }
-
- // Round Corners Simulation (may affect bloom)
- float2 RoundCornerCoord = DistortionCoordCentered;
-
- float roundCornerFactor = GetRoundCornerFactor(RoundCornerCoord, RoundCornerAmount, SmoothBorderAmount);
- Output.rgb *= roundCornerFactor;
-
- return Output;
-}
-
-//-----------------------------------------------------------------------------
-// Scanline & Shadowmask Effect
-//-----------------------------------------------------------------------------
-
-technique DefaultTechnique
-{
- pass Pass0
- {
- Lighting = FALSE;
-
- VertexShader = compile vs_3_0 vs_main();
- PixelShader = compile ps_3_0 ps_main();
- }
-} \ No newline at end of file
diff --git a/hlsl/deconverge.fx b/hlsl/deconverge.fx
index 3c1cbeeeb1f..df5bc2e6b49 100644
--- a/hlsl/deconverge.fx
+++ b/hlsl/deconverge.fx
@@ -68,48 +68,47 @@ VS_OUTPUT vs_main(VS_INPUT Input)
{
VS_OUTPUT Output = (VS_OUTPUT)0;
- float2 HalfSourceRect = SourceRect * 0.5f;
-
- float2 QuadRatio =
- float2(1.0f, SwapXY
- ? QuadDims.y / QuadDims.x
- : QuadDims.x / QuadDims.y);
-
- // imaginary texel dimensions independed from quad dimensions, but dependend on quad ratio
- float2 FixedTexelDims = (1.0f / 1024.0) * SourceRect * QuadRatio;
-
Output.Position = float4(Input.Position.xyz, 1.0f);
Output.Position.xy /= ScreenDims;
Output.Position.y = 1.0f - Output.Position.y; // flip y
Output.Position.xy -= 0.5f; // center
Output.Position.xy *= 2.0f; // toom
- float2 TexCoord = Input.TexCoord;
+ float2 TexCoord = Input.Position.xy / ScreenDims;
TexCoord += 0.5f / TargetDims; // half texel offset correction (DX9)
-
- Output.Color = Input.Color;
+
+ // we have to handle the swap of the coordinates ourself, because we are using screen not texture coordinates
+ float3 convergeX = SwapXY ? ConvergeY : ConvergeX;
+ float3 convergeY = SwapXY ? ConvergeX : ConvergeY;
+ float3 radialConvergeX = SwapXY ? RadialConvergeY : RadialConvergeX;
+ float3 radialConvergeY = SwapXY ? RadialConvergeX : RadialConvergeY;
+
+ // imaginary texel dimensions independed from screen dimension, but ratio
+ float2 TexelDims = (1.0f / 1024) * (QuadDims / ScreenDims);
Output.TexCoordX = TexCoord.xxx;
Output.TexCoordY = TexCoord.yyy;
// center coordinates
- Output.TexCoordX -= HalfSourceRect.xxx;
- Output.TexCoordY -= HalfSourceRect.yyy;
+ Output.TexCoordX -= 0.5f * SourceRect.xxx;
+ Output.TexCoordY -= 0.5f * SourceRect.yyy;
// radial converge offset to "translate" the most outer pixel as thay would be translated by the linar converge with the same amount
float2 radialConvergeOffset = 2.0f / SourceRect;
// radial converge
- Output.TexCoordX *= 1.0f + RadialConvergeX * FixedTexelDims.xxx * radialConvergeOffset.xxx;
- Output.TexCoordY *= 1.0f + RadialConvergeY * FixedTexelDims.yyy * radialConvergeOffset.yyy;
-
+ Output.TexCoordX *= 1.0f + radialConvergeX * TexelDims.xxx * radialConvergeOffset.xxx;
+ Output.TexCoordY *= 1.0f + radialConvergeY * TexelDims.yyy * radialConvergeOffset.yyy;
+
// un-center coordinates
- Output.TexCoordX += HalfSourceRect.xxx;
- Output.TexCoordY += HalfSourceRect.yyy;
+ Output.TexCoordX += 0.5f * SourceRect.xxx;
+ Output.TexCoordY += 0.5f * SourceRect.yyy;
// linear converge
- Output.TexCoordX += ConvergeX * FixedTexelDims.xxx;
- Output.TexCoordY += ConvergeY * FixedTexelDims.yyy;
+ Output.TexCoordX += convergeX * TexelDims.xxx;
+ Output.TexCoordY += convergeY * TexelDims.yyy;
+
+ Output.Color = Input.Color;
return Output;
}
diff --git a/hlsl/distortion.fx b/hlsl/distortion.fx
index 63d35789393..6fd27a99795 100644
--- a/hlsl/distortion.fx
+++ b/hlsl/distortion.fx
@@ -119,7 +119,7 @@ uniform float ReflectionAmount = 0.0f;
uniform int RotationType = 0; // 0 = 0°, 1 = 90°, 2 = 180°, 3 = 270°
-float2 GetRatioCorrection()
+float2 GetScreenQuadRatio()
{
float ScreenRatio = ScreenDims.x / ScreenDims.y;
float QuadRatio = QuadDims.x / QuadDims.y;
@@ -130,6 +130,15 @@ float2 GetRatioCorrection()
: float2(ScreenQuadRatio, 1.0);
}
+float2 GetQuadRatio()
+{
+ float QuadRatio = QuadDims.x / QuadDims.y;
+
+ return QuadRatio > 1.0f
+ ? float2 (1.0f, 1.0f / QuadRatio)
+ : float2 (QuadRatio, 1.0f);
+}
+
float GetNoiseFactor(float3 n, float random)
{
// smaller n become more noisy
@@ -138,7 +147,7 @@ float GetNoiseFactor(float3 n, float random)
float GetVignetteFactor(float2 coord, float amount)
{
- float2 VignetteCoord = coord;
+ float2 VignetteCoord = coord / (QuadDims / ScreenDims);
float VignetteLength = length(VignetteCoord);
float VignetteBlur = (amount * 0.75f) + 0.25;
@@ -152,10 +161,7 @@ float GetVignetteFactor(float2 coord, float amount)
float GetSpotAddend(float2 coord, float amount)
{
- float2 RatioCorrection = GetRatioCorrection();
-
- // normalized screen quad ratio
- float2 QuadRatio = float2 (1.0f, QuadDims.y / QuadDims.x);
+ float2 QuadRatio = GetQuadRatio();
// upper right quadrant
float2 spotOffset =
@@ -167,10 +173,9 @@ float GetSpotAddend(float2 coord, float amount)
? float2(0.25f, 0.25f)
: float2(-0.25f, 0.25f);
- float2 SpotCoord = coord;
- SpotCoord += spotOffset * RatioCorrection;
+ float2 SpotCoord = coord / (QuadDims / ScreenDims);
+ SpotCoord += spotOffset * QuadRatio;
SpotCoord *= QuadRatio;
- SpotCoord /= RatioCorrection;
float SpotBlur = amount;
@@ -188,7 +193,7 @@ float GetSpotAddend(float2 coord, float amount)
float GetRoundCornerFactor(float2 coord, float radiusAmount, float smoothAmount)
{
- float2 RatioCorrection = GetRatioCorrection();
+ float2 ScreenQuadRatio = GetScreenQuadRatio();
// reduce smooth amount down to radius amount
smoothAmount = min(smoothAmount, radiusAmount);
@@ -198,7 +203,7 @@ float GetRoundCornerFactor(float2 coord, float radiusAmount, float smoothAmount)
float smooth = 1.0 / (range * max(smoothAmount, 0.0025f));
// compute box
- float box = roundBox(ScreenDims * (coord * 2.0f), ScreenDims * RatioCorrection, radius);
+ float box = roundBox(ScreenDims * (coord * 2.0f), ScreenDims * ScreenQuadRatio, radius);
// apply smooth
box *= smooth;
@@ -235,19 +240,19 @@ float2 GetDistortedCoords(float2 centerCoord, float amount)
float2 GetCoords(float2 coord, float distortionAmount)
{
- float2 RatioCorrection = GetRatioCorrection();
+ float2 ScreenQuadRatio = GetScreenQuadRatio();
// center coordinates
coord -= 0.5f;
// apply ratio difference between screen and quad
- coord /= RatioCorrection;
+ coord /= ScreenQuadRatio;
// distort coordinates
coord = GetDistortedCoords(coord, distortionAmount);
// revert ratio difference between screen and quad
- coord *= RatioCorrection;
+ coord *= ScreenQuadRatio;
// un-center coordinates
coord += 0.5f;
@@ -257,21 +262,18 @@ float2 GetCoords(float2 coord, float distortionAmount)
float4 ps_main(PS_INPUT Input) : COLOR
{
- float2 TexCoord = Input.TexCoord;
- float2 BaseCoord = TexCoord;
-
// Screen Curvature
- BaseCoord = GetCoords(BaseCoord, CurvatureAmount * 0.25f); // reduced amount
+ float2 TexCoord = GetCoords(Input.TexCoord, CurvatureAmount * 0.25f); // reduced amount
- float2 BaseCoordCentered = BaseCoord;
- BaseCoordCentered -= 0.5f;
+ float2 TexCoordCentered = TexCoord;
+ TexCoordCentered -= 0.5f;
// Color
- float4 BaseColor = tex2D(DiffuseSampler, BaseCoord);
+ float4 BaseColor = tex2D(DiffuseSampler, TexCoord);
BaseColor.a = 1.0f;
// Vignetting Simulation
- float2 VignetteCoord = BaseCoordCentered;
+ float2 VignetteCoord = TexCoordCentered;
float VignetteFactor = GetVignetteFactor(VignetteCoord, VignettingAmount);
BaseColor.rgb *= VignetteFactor;
@@ -279,15 +281,15 @@ float4 ps_main(PS_INPUT Input) : COLOR
// Light Reflection Simulation
float3 LightColor = float3(1.0f, 0.90f, 0.80f); // color temperature 5.000 Kelvin
- float2 SpotCoord = BaseCoordCentered;
- float2 NoiseCoord = BaseCoordCentered;
+ float2 SpotCoord = TexCoordCentered;
+ float2 NoiseCoord = TexCoordCentered;
float SpotAddend = GetSpotAddend(SpotCoord, ReflectionAmount);
float NoiseFactor = GetNoiseFactor(SpotAddend, random(NoiseCoord));
BaseColor.rgb += SpotAddend * NoiseFactor * LightColor;
// Round Corners Simulation
- float2 RoundCornerCoord = BaseCoordCentered;
+ float2 RoundCornerCoord = TexCoordCentered;
float roundCornerFactor = GetRoundCornerFactor(RoundCornerCoord, RoundCornerAmount, SmoothBorderAmount);
BaseColor.rgb *= roundCornerFactor;
diff --git a/hlsl/downsample.fx b/hlsl/downsample.fx
index 122172350f9..3afcdc703dd 100644
--- a/hlsl/downsample.fx
+++ b/hlsl/downsample.fx
@@ -53,15 +53,24 @@ struct PS_INPUT
uniform float2 ScreenDims;
uniform float2 TargetDims;
+uniform float2 SourceDims;
uniform float2 SourceRect;
+uniform float2 QuadDims;
-uniform bool PrepareVector;
+uniform bool VectorScreen;
+
+static const float2 Coord0Offset = float2(-0.5f, -0.5f);
+static const float2 Coord1Offset = float2( 0.5f, -0.5f);
+static const float2 Coord2Offset = float2(-0.5f, 0.5f);
+static const float2 Coord3Offset = float2( 0.5f, 0.5f);
VS_OUTPUT vs_main(VS_INPUT Input)
{
VS_OUTPUT Output = (VS_OUTPUT)0;
float2 TargetTexelDims = 1.0f / TargetDims;
+ float2 ScreenTexelDims = 1.0f / ScreenDims;
+ float2 SourceTexelDims = 1.0f / SourceDims;
Output.Position = float4(Input.Position.xyz, 1.0f);
Output.Position.xy /= ScreenDims;
@@ -72,14 +81,19 @@ VS_OUTPUT vs_main(VS_INPUT Input)
Output.Color = Input.Color;
float2 TexCoord = Input.Position.xy / ScreenDims;
- TexCoord += PrepareVector
- ? 0.5f / TargetDims // half texel offset correction (DX9) - only for vector grpahics
- : 0.0f;
-
- Output.TexCoord01.xy = TexCoord + float2(-0.5f, -0.5f) * TargetTexelDims;
- Output.TexCoord01.zw = TexCoord + float2( 0.5f, -0.5f) * TargetTexelDims;
- Output.TexCoord23.xy = TexCoord + float2(-0.5f, 0.5f) * TargetTexelDims;
- Output.TexCoord23.zw = TexCoord + float2( 0.5f, 0.5f) * TargetTexelDims;
+ TexCoord += 0.5f / TargetDims; // half texel offset correction (DX9)
+
+ float2 VectorTexelOffset = ScreenTexelDims * -0.5;
+ float2 RasterTexelOffset = SourceTexelDims * (0.5f * SourceRect) * (1.0f - (QuadDims / ScreenDims));
+
+ TexCoord += VectorScreen
+ ? VectorTexelOffset
+ : RasterTexelOffset;
+
+ Output.TexCoord01.xy = TexCoord + Coord0Offset * TargetTexelDims;
+ Output.TexCoord01.zw = TexCoord + Coord1Offset * TargetTexelDims;
+ Output.TexCoord23.xy = TexCoord + Coord2Offset * TargetTexelDims;
+ Output.TexCoord23.zw = TexCoord + Coord3Offset * TargetTexelDims;
return Output;
}
diff --git a/hlsl/focus.fx b/hlsl/focus.fx
index c5e5262fedd..1e2e668911b 100644
--- a/hlsl/focus.fx
+++ b/hlsl/focus.fx
@@ -51,7 +51,6 @@ struct PS_INPUT
uniform float2 ScreenDims;
uniform float2 TargetDims;
-uniform float2 SourceRect;
uniform float2 QuadDims;
VS_OUTPUT vs_main(VS_INPUT Input)
@@ -64,7 +63,7 @@ VS_OUTPUT vs_main(VS_INPUT Input)
Output.Position.xy -= 0.5f; // center
Output.Position.xy *= 2.0f; // zoom
- float2 TexCoord = Input.TexCoord;
+ float2 TexCoord = Input.Position.xy / ScreenDims;
TexCoord += 0.5f / TargetDims; // half texel offset correction (DX9)
Output.TexCoord = TexCoord;
@@ -78,30 +77,28 @@ VS_OUTPUT vs_main(VS_INPUT Input)
// Defocus Pixel Shader
//-----------------------------------------------------------------------------
-float2 Coord1Offset = float2( 0.75f, 0.50f);
-float2 Coord2Offset = float2( 0.25f, 1.00f);
-float2 Coord3Offset = float2(-0.50f, 0.75f);
-float2 Coord4Offset = float2(-1.00f, 0.25f);
-float2 Coord5Offset = float2(-0.75f, -0.50f);
-float2 Coord6Offset = float2(-0.25f, -1.00f);
-float2 Coord7Offset = float2( 0.50f, -0.75f);
-float2 Coord8Offset = float2( 1.00f, -0.25f);
-
uniform float2 Defocus = float2(0.0f, 0.0f);
uniform bool SwapXY = false;
+static const float2 Coord1Offset = float2( 0.75f, 0.50f);
+static const float2 Coord2Offset = float2( 0.25f, 1.00f);
+static const float2 Coord3Offset = float2(-0.50f, 0.75f);
+static const float2 Coord4Offset = float2(-1.00f, 0.25f);
+static const float2 Coord5Offset = float2(-0.75f, -0.50f);
+static const float2 Coord6Offset = float2(-0.25f, -1.00f);
+static const float2 Coord7Offset = float2( 0.50f, -0.75f);
+static const float2 Coord8Offset = float2( 1.00f, -0.25f);
+
float4 ps_main(PS_INPUT Input) : COLOR
{
- float2 QuadRatio =
- float2(1.0f, SwapXY
- ? QuadDims.y / QuadDims.x
- : QuadDims.x / QuadDims.y);
+ // we have to handle the swap of the coordinates ourself, because we are using screen not texture coordinates
+ float2 defocus = SwapXY ? Defocus.yx : Defocus.xy;
- // imaginary texel dimensions independed from quad dimensions, but dependend on quad ratio
- float2 TexelDims = (1.0f / 1024.0) * SourceRect * QuadRatio;
+ // imaginary texel dimensions independed from screen dimension, but ratio
+ float2 TexelDims = (1.0f / 1024) * (QuadDims / ScreenDims);
- float2 DefocusTexelDims = Defocus * TexelDims;
+ float2 DefocusTexelDims = defocus * TexelDims;
float4 d = tex2D(DiffuseSampler, Input.TexCoord);
float3 d1 = tex2D(DiffuseSampler, Input.TexCoord + Coord1Offset * DefocusTexelDims).rgb;
diff --git a/hlsl/ntsc.fx b/hlsl/ntsc.fx
index 107be16af16..94460ea6be0 100644
--- a/hlsl/ntsc.fx
+++ b/hlsl/ntsc.fx
@@ -44,7 +44,7 @@ struct PS_INPUT
};
//-----------------------------------------------------------------------------
-// YIQ Decode Vertex Shader
+// YIQ Vertex Shader
//-----------------------------------------------------------------------------
uniform float2 ScreenDims;
diff --git a/hlsl/phosphor.fx b/hlsl/phosphor.fx
index 7d665b44749..97defea0205 100644
--- a/hlsl/phosphor.fx
+++ b/hlsl/phosphor.fx
@@ -79,7 +79,7 @@ VS_OUTPUT vs_main(VS_INPUT Input)
Output.Position.xy -= 0.5f; // center
Output.Position.xy *= 2.0f; // zoom
- Output.TexCoord = Input.TexCoord;
+ Output.TexCoord = Input.Position.xy / ScreenDims;
Output.TexCoord += 0.5f / TargetDims; // half texel offset correction (DX9)
Output.PrevCoord = Output.TexCoord;
diff --git a/hlsl/post.fx b/hlsl/post.fx
index deec349e2fc..d972926f629 100644
--- a/hlsl/post.fx
+++ b/hlsl/post.fx
@@ -49,15 +49,17 @@ struct VS_OUTPUT
{
float4 Position : POSITION;
float4 Color : COLOR0;
- float2 TexCoord : TEXCOORD0;
- float2 ScreenCoord : TEXCOORD1;
+ float2 SourceCoord : TEXCOORD0;
+ float2 TexCoord : TEXCOORD1;
+ float2 ScreenCoord : TEXCOORD2;
};
struct PS_INPUT
{
float4 Color : COLOR0;
- float2 TexCoord : TEXCOORD0;
- float2 ScreenCoord : TEXCOORD1;
+ float2 SourceCoord : TEXCOORD0;
+ float2 TexCoord : TEXCOORD1;
+ float2 ScreenCoord : TEXCOORD2;
};
//-----------------------------------------------------------------------------
@@ -82,34 +84,31 @@ uniform float2 ShadowUVOffset = float2(0.0f, 0.0f);
uniform bool SwapXY = false;
uniform bool PrepareBloom = false; // disables some effects for rendering bloom textures
-uniform bool PrepareVector = false;
+uniform bool VectorScreen = false;
VS_OUTPUT vs_main(VS_INPUT Input)
{
VS_OUTPUT Output = (VS_OUTPUT)0;
- float2 shadowUVOffset = ShadowUVOffset;
- shadowUVOffset = SwapXY
- ? shadowUVOffset.yx
- : shadowUVOffset.xy;
-
- float2 ScreenCoordOffset = 0.0f;
- ScreenCoordOffset += shadowUVOffset;
-
- Output.ScreenCoord = Input.Position.xy;
- Output.ScreenCoord += ScreenCoordOffset;
-
Output.Position = float4(Input.Position.xyz, 1.0f);
Output.Position.xy /= ScreenDims;
Output.Position.y = 1.0f - Output.Position.y; // flip y
Output.Position.xy -= 0.5f; // center
Output.Position.xy *= 2.0f; // zoom
- Output.TexCoord = PrepareVector
- ? Input.Position.xy / ScreenDims
- : Input.TexCoord;
+ Output.TexCoord = Input.Position.xy / ScreenDims;
Output.TexCoord += 0.5f / TargetDims; // half texel offset correction (DX9)
+ Output.SourceCoord = Input.TexCoord;
+
+ float2 ScreenCoordOffset = ShadowUVOffset;
+ ScreenCoordOffset = SwapXY
+ ? ShadowUVOffset.yx
+ : ShadowUVOffset.xy;
+
+ Output.ScreenCoord = Input.Position.xy / ScreenDims;
+ Output.ScreenCoord += ScreenCoordOffset / ScreenDims;
+
Output.Color = Input.Color;
return Output;
@@ -119,7 +118,7 @@ VS_OUTPUT vs_main(VS_INPUT Input)
// Scanline & Shadowmask Pixel Shader
//-----------------------------------------------------------------------------
-uniform float HumBarHertzRate = 60.0f / 59.94f - 1.0f; // difference between the 59.94 Hz field rate and 60 Hz line frequency (NTSC)
+uniform float HumBarDesync = 60.0f / 59.94f - 1.0f; // difference between the 59.94 Hz field rate and 60 Hz line frequency (NTSC)
uniform float HumBarAlpha = 0.0f;
uniform float TimeMilliseconds = 0.0f;
@@ -165,21 +164,16 @@ float4 ps_main(PS_INPUT Input) : COLOR
{
float2 ScreenTexelDims = 1.0f / ScreenDims;
float2 SourceTexelDims = 1.0f / SourceDims;
- float2 SourceRes = SourceDims * SourceRect;
- float2 HalfSourceRect = SourceRect * 0.5f;
-
- float2 ScreenCoord = Input.ScreenCoord / ScreenDims;
- float2 BaseCoord = GetAdjustedCoords(Input.TexCoord, HalfSourceRect);
+ float2 ScreenCoord = Input.ScreenCoord;
+ float2 TexCoord = GetAdjustedCoords(Input.TexCoord, 0.5f);
+ float2 SourceCoord = GetAdjustedCoords(Input.SourceCoord, 0.5f * SourceRect);
// Color
- float4 BaseColor = tex2D(DiffuseSampler, BaseCoord);
+ float4 BaseColor = tex2D(DiffuseSampler, TexCoord);
BaseColor.a = 1.0f;
- if (BaseCoord.x < 0.0f || BaseCoord.y < 0.0f)
- {
- BaseColor.rgb = 0.0f;
- }
+ clip(TexCoord < 0.0f || TexCoord > 1.0f ? -1 : 1);
// Mask Simulation (may not affect bloom)
if (!PrepareBloom && ShadowAlpha > 0.0f)
@@ -194,7 +188,7 @@ float4 ps_main(PS_INPUT Input) : COLOR
// ? shadowUV.yx
// : shadowUV.xy;
- float2 screenCoord = ShadowTileMode == 0 ? ScreenCoord : BaseCoord;
+ float2 screenCoord = ShadowTileMode == 0 ? ScreenCoord : SourceCoord;
screenCoord = SwapXY
? screenCoord.yx
: screenCoord.xy;
@@ -204,7 +198,7 @@ float4 ps_main(PS_INPUT Input) : COLOR
? shadowCount.yx
: shadowCount.xy;
- float2 shadowTile = ((ShadowTileMode == 0 ? ScreenTexelDims : SourceTexelDims) * shadowCount);
+ float2 shadowTile = (ShadowTileMode == 0 ? ScreenTexelDims : SourceTexelDims) * shadowCount;
shadowTile = SwapXY
? shadowTile.yx
: shadowTile.xy;
@@ -242,33 +236,33 @@ float4 ps_main(PS_INPUT Input) : COLOR
if (!PrepareBloom)
{
// Scanline Simulation (may not affect vector screen)
- if (!PrepareVector && ScanlineAlpha > 0.0f)
+ if (!VectorScreen && ScanlineAlpha > 0.0f)
{
- float ScanCoord = BaseCoord.y * SourceDims.y * ScanlineScale * PI;
- float ScanCoordJitter = ScanlineOffset * PHI;
- float ScanSine = sin(ScanCoord + ScanCoordJitter);
- float ScanSineScaled = pow(ScanSine * ScanSine, ScanlineHeight);
- float ScanBrightness = ScanSineScaled * ScanlineBrightScale + 1.0f + ScanlineBrightOffset;
+ float BrightnessOffset = (ScanlineBrightOffset * ScanlineAlpha);
+ float BrightnessScale = (ScanlineBrightScale * ScanlineAlpha) + (1.0f - ScanlineAlpha);
+
+ float ColorBrightness = 0.299f * BaseColor.r + 0.587f * BaseColor.g + 0.114 * BaseColor.b;
- BaseColor.rgb *= lerp(1.0f, ScanBrightness * 0.5f, ScanlineAlpha);
+ float ScanlineCoord = SourceCoord.y * SourceDims.y * ScanlineScale * PI;
+ float ScanlineCoordJitter = ScanlineOffset * PHI;
+ float ScanlineSine = sin(ScanlineCoord + ScanlineCoordJitter);
+ float ScanlineWide = ScanlineHeight + max(1.0f, ScanlineHeight) * (1.0f - ColorBrightness);
+ float ScanlineAmount = pow(ScanlineSine * ScanlineSine, ScanlineWide);
+ float ScanlineBrightness = ScanlineAmount * BrightnessScale + BrightnessOffset * BrightnessScale;
+
+ BaseColor.rgb *= lerp(1.0f, ScanlineBrightness, ScanlineAlpha);
}
// Hum Bar Simulation (may not affect vector screen)
- if (!PrepareVector && HumBarAlpha > 0.0f)
+ if (!VectorScreen && HumBarAlpha > 0.0f)
{
- float HumTimeStep = frac(TimeMilliseconds * HumBarHertzRate);
- float HumBrightness = 1.0 - frac(BaseCoord.y / SourceRect.y + HumTimeStep) * HumBarAlpha;
- BaseColor.rgb *= HumBrightness;
+ float HumBarStep = frac(TimeMilliseconds * HumBarDesync);
+ float HumBarBrightness = 1.0 - frac(SourceCoord.y / SourceRect.y + HumBarStep) * HumBarAlpha;
+ BaseColor.rgb *= HumBarBrightness;
}
}
- // Output
- float4 Output = PrepareVector
- ? BaseColor * (Input.Color + float4(1.0f, 1.0f, 1.0f, 0.0f))
- : BaseColor * Input.Color;
- Output.a = 1.0f;
-
- return Output;
+ return BaseColor;
}
//-----------------------------------------------------------------------------
diff --git a/hlsl/prescale.fx b/hlsl/prescale.fx
index 846c02577ce..1cbcaa0f753 100644
--- a/hlsl/prescale.fx
+++ b/hlsl/prescale.fx
@@ -1,7 +1,11 @@
// license:BSD-3-Clause
-// copyright-holders:Ryan Holtz
+// copyright-holders:Ryan Holtz,Themaister,ImJezze
//-----------------------------------------------------------------------------
-// Prescale Effect
+// Pre-scale Effect
+//
+// Uses the hardware bilinear interpolator to avoid having to sample 4 times manually.
+//
+// https://github.com/libretro/common-shaders/blob/master/retro/shaders/sharp-bilinear.cg
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
@@ -13,9 +17,9 @@ texture Diffuse;
sampler DiffuseSampler = sampler_state
{
Texture = <Diffuse>;
- MipFilter = NONE;
- MinFilter = NONE;
- MagFilter = NONE;
+ MipFilter = LINEAR;
+ MinFilter = LINEAR;
+ MagFilter = LINEAR;
AddressU = CLAMP;
AddressV = CLAMP;
AddressW = CLAMP;
@@ -45,39 +49,53 @@ struct PS_INPUT
};
//-----------------------------------------------------------------------------
-// Prescale Vertex Shader
+// Pre-scale Vertex Shader
//-----------------------------------------------------------------------------
uniform float2 ScreenDims;
uniform float2 TargetDims;
+uniform float2 SourceDims;
VS_OUTPUT vs_main(VS_INPUT Input)
{
VS_OUTPUT Output = (VS_OUTPUT)0;
-
+
Output.Position = float4(Input.Position.xyz, 1.0f);
Output.Position.xy /= ScreenDims;
Output.Position.y = 1.0f - Output.Position.y; // flip y
Output.Position.xy -= 0.5f; // center
Output.Position.xy *= 2.0f; // zoom
-
+
Output.TexCoord = Input.TexCoord;
- Output.TexCoord += 0.5f / TargetDims; // half texel offset correction (DX9)
+ // Output.TexCoord += 0.5f / targetDims; // half texel offset correction (DX9)
return Output;
}
//-----------------------------------------------------------------------------
-// Prescale Pixel Shader
+// Pre-scale Pixel Shader
//-----------------------------------------------------------------------------
float4 ps_main(PS_INPUT Input) : COLOR
{
- return tex2D(DiffuseSampler, Input.TexCoord);
+ float2 Scale = TargetDims / SourceDims;
+
+ float2 TexelDims = Input.TexCoord * SourceDims;
+ float2 i = floor(TexelDims);
+ float2 s = frac(TexelDims);
+
+ // Figure out where in the texel to sample to get the correct pre-scaled bilinear.
+ float2 CenterDistance = s - 0.5f;
+ float2 RegionRange = 0.5f - 0.5f / Scale;
+ float2 f = (CenterDistance - clamp(CenterDistance, -RegionRange, RegionRange)) * Scale + 0.5f;
+
+ float2 TexCoord = (i + f) / SourceDims;
+
+ return tex2D(DiffuseSampler, TexCoord);
}
//-----------------------------------------------------------------------------
-// Prescale Technique
+// Pre-scale Technique
//-----------------------------------------------------------------------------
technique DefaultTechnique
@@ -89,4 +107,4 @@ technique DefaultTechnique
VertexShader = compile vs_3_0 vs_main();
PixelShader = compile ps_3_0 ps_main();
}
-}
+} \ No newline at end of file
diff --git a/hlsl/primary.fx b/hlsl/primary.fx
index f0a1c1da0e7..3f08afd3dca 100644
--- a/hlsl/primary.fx
+++ b/hlsl/primary.fx
@@ -55,8 +55,7 @@ uniform float2 ScreenDims;
uniform float2 TargetDims;
uniform bool PostPass;
-
-uniform float Brighten;
+uniform bool VectorScreen;
VS_OUTPUT vs_main(VS_INPUT Input)
{
@@ -70,12 +69,16 @@ VS_OUTPUT vs_main(VS_INPUT Input)
float2 targetDims = TargetDims + Epsilon; // bug: with exact target dimensions the font disappears
- Output.TexCoord = PostPass
- ? Input.Position.xy / ScreenDims
- : Input.TexCoord;
- Output.TexCoord += PostPass
- ? 0.5f / targetDims // half texel offset correction (DX9)
- : 0.0f;
+ if (PostPass)
+ {
+ Output.TexCoord = Input.Position.xy / ScreenDims;
+ Output.TexCoord += 0.5f / targetDims; // half texel offset correction (DX9)
+ }
+ else
+ {
+ Output.TexCoord = Input.TexCoord;
+ // Output.TexCoord += 0.5f / targetDims; // half texel offset correction (DX9)
+ }
Output.Color = Input.Color;
@@ -89,7 +92,9 @@ VS_OUTPUT vs_main(VS_INPUT Input)
float4 ps_main(PS_INPUT Input) : COLOR
{
float4 BaseTexel = tex2D(DiffuseSampler, Input.TexCoord);
- BaseTexel *= Input.Color + float4(Brighten, Brighten, Brighten, 0.0f);
+ BaseTexel *= PostPass && VectorScreen
+ ? Input.Color + float4(1.0f, 1.0f, 1.0f, 0.0f)
+ : Input.Color;
return BaseTexel;
}
diff --git a/language/Afrikaans/strings.po b/language/Afrikaans/strings.po
deleted file mode 100644
index f2b6720d5a4..00000000000
--- a/language/Afrikaans/strings.po
+++ /dev/null
@@ -1,205 +0,0 @@
-# Afrikaans translations for PACKAGE package.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: af\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Albanian/strings.po b/language/Albanian/strings.po
deleted file mode 100644
index 875e7215802..00000000000
--- a/language/Albanian/strings.po
+++ /dev/null
@@ -1,205 +0,0 @@
-# Albanian translations for PACKAGE package.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: sq\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Arabic/strings.po b/language/Arabic/strings.po
deleted file mode 100644
index 0e29fb6dd54..00000000000
--- a/language/Arabic/strings.po
+++ /dev/null
@@ -1,205 +0,0 @@
-# Arabic translations for PACKAGE package.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: ar\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Basque/strings.po b/language/Basque/strings.po
deleted file mode 100644
index fd494567c8f..00000000000
--- a/language/Basque/strings.po
+++ /dev/null
@@ -1,206 +0,0 @@
-# Basque translations for PACKAGE package
-# PACKAGE paketearen Ingelesezko itzulpena.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: eu\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Belarusian/strings.po b/language/Belarusian/strings.po
deleted file mode 100644
index 313121920a9..00000000000
--- a/language/Belarusian/strings.po
+++ /dev/null
@@ -1,208 +0,0 @@
-# Belarusian translations for PACKAGE package
-# Áåëàðóñê³ ïåðàêëàä äëÿ PACKAGE.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: be\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
-"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Bosnian/strings.po b/language/Bosnian/strings.po
deleted file mode 100644
index b0c4e13ab46..00000000000
--- a/language/Bosnian/strings.po
+++ /dev/null
@@ -1,205 +0,0 @@
-# Bosnian translations for PACKAGE package.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: bs\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Bulgarian/strings.po b/language/Bulgarian/strings.po
deleted file mode 100644
index 8df71d9cfb2..00000000000
--- a/language/Bulgarian/strings.po
+++ /dev/null
@@ -1,207 +0,0 @@
-# Bulgarian translations for PACKAGE package
-# Áúëãàðñêè ïðåâîä çà ïàêåò PACKAGE.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: bg\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Burmese/strings.po b/language/Burmese/strings.po
deleted file mode 100644
index 80efe901d07..00000000000
--- a/language/Burmese/strings.po
+++ /dev/null
@@ -1,205 +0,0 @@
-# Burmese translations for PACKAGE package.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: my\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Catalan/strings.po b/language/Catalan/strings.po
deleted file mode 100644
index 0f78b74e8a6..00000000000
--- a/language/Catalan/strings.po
+++ /dev/null
@@ -1,206 +0,0 @@
-# Catalan translations for PACKAGE package
-# Traduccions al català del paquet «PACKAGE».
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: ca\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Chinese (Simple)/strings.po b/language/Chinese (Simple)/strings.po
deleted file mode 100644
index c05be51e4f6..00000000000
--- a/language/Chinese (Simple)/strings.po
+++ /dev/null
@@ -1,205 +0,0 @@
-# Chinese translations for PACKAGE package.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: zh\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Chinese (Traditional)/strings.po b/language/Chinese (Traditional)/strings.po
deleted file mode 100644
index cfa7ed79099..00000000000
--- a/language/Chinese (Traditional)/strings.po
+++ /dev/null
@@ -1,206 +0,0 @@
-# Chinese translations for PACKAGE package
-# PACKAGE ®M¥óªº¶Ç²Î¦rº~»y½Ķ.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: zh_TW\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Croatian/strings.po b/language/Croatian/strings.po
deleted file mode 100644
index f3a65ce340b..00000000000
--- a/language/Croatian/strings.po
+++ /dev/null
@@ -1,207 +0,0 @@
-# Croatian translations for PACKAGE package.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: hr\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
-"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Czech/strings.po b/language/Czech/strings.po
deleted file mode 100644
index e6af92c9b82..00000000000
--- a/language/Czech/strings.po
+++ /dev/null
@@ -1,206 +0,0 @@
-# Czech translations for PACKAGE package.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: cs\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Danish/strings.po b/language/Danish/strings.po
deleted file mode 100644
index 7502565000b..00000000000
--- a/language/Danish/strings.po
+++ /dev/null
@@ -1,207 +0,0 @@
-# Danish translations for PACKAGE package
-# Danske oversættelser for pakke PACKAGE.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: da\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Dutch/strings.po b/language/Dutch/strings.po
deleted file mode 100644
index 4e2f72edcda..00000000000
--- a/language/Dutch/strings.po
+++ /dev/null
@@ -1,207 +0,0 @@
-# Dutch translations for PACKAGE package
-# Nederlandse vertalingen voor het pakket PACKAGE.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: nl\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/English/strings.po b/language/English/strings.po
deleted file mode 100644
index fdf4c2f21e4..00000000000
--- a/language/English/strings.po
+++ /dev/null
@@ -1,208 +0,0 @@
-# English translations for PACKAGE package.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 18:03+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: en\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr "Audit in progress..."
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr "New Barcode:"
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr "Enter Code"
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr "Barcode length invalid!"
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-"Cheat Comment:\n"
-"%s"
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr "All cheats reloaded"
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr "Autofire Settings"
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr "Reset All"
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr "Reload All"
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr "Autofire Status"
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr "Disabled"
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr "Enabled"
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr "On"
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr "Off"
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr "No buttons found on this machine!"
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr "Autofire Delay"
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr "Device Mapping"
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr "Main filter"
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr "Other filter"
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr "Remove last filter"
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr "Add filter"
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr "Select custom filters:"
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr "Input (general)"
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr "Input (this Machine)"
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr "Analog Controls"
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr "Dip Switches"
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr "Machine Configuration"
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr "Bookkeeping Info"
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr "Machine Information"
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr "Image Information"
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr "File Manager"
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr "Tape Control"
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr "Pseudo terminals"
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr "Bios Selection"
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr "Slot Devices"
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr "Barcode Reader"
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr "Network Devices"
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr "Keyboard Mode"
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr "Slider Controls"
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr "Video Options"
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr "Crosshair Options"
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr "Cheat"
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr "External DAT View"
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr "Add To Favorites"
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr "Remove From Favorites"
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr "Select New Machine"
diff --git a/language/Estonian/strings.po b/language/Estonian/strings.po
deleted file mode 100644
index b00e95fbf9e..00000000000
--- a/language/Estonian/strings.po
+++ /dev/null
@@ -1,206 +0,0 @@
-# Estonian translations for PACKAGE package.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: et\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Finnish/strings.po b/language/Finnish/strings.po
deleted file mode 100644
index 1e480fd7f38..00000000000
--- a/language/Finnish/strings.po
+++ /dev/null
@@ -1,207 +0,0 @@
-# Finnish translations for PACKAGE package
-# Suomenkielinen käännös PACKAGE-paketille.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: fi\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/French (Canada)/strings.po b/language/French (Canada)/strings.po
deleted file mode 100644
index 21f71583f1c..00000000000
--- a/language/French (Canada)/strings.po
+++ /dev/null
@@ -1,207 +0,0 @@
-# French translations for PACKAGE package
-# Traductions françaises du paquet PACKAGE.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: fr_CA\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/French/strings.po b/language/French/strings.po
deleted file mode 100644
index 7ccba6b1a68..00000000000
--- a/language/French/strings.po
+++ /dev/null
@@ -1,207 +0,0 @@
-# French translations for PACKAGE package
-# Traductions françaises du paquet PACKAGE.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: fr\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Georgian/strings.po b/language/Georgian/strings.po
deleted file mode 100644
index e4eff9cadde..00000000000
--- a/language/Georgian/strings.po
+++ /dev/null
@@ -1,205 +0,0 @@
-# Georgian translations for PACKAGE package.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: ka\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/German/strings.po b/language/German/strings.po
deleted file mode 100644
index 1ddd470877f..00000000000
--- a/language/German/strings.po
+++ /dev/null
@@ -1,207 +0,0 @@
-# German translations for PACKAGE package
-# German translation for PACKAGE.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: de\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Greek/strings.po b/language/Greek/strings.po
deleted file mode 100644
index 141d7ea1a7c..00000000000
--- a/language/Greek/strings.po
+++ /dev/null
@@ -1,206 +0,0 @@
-# Greek translations for PACKAGE package.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: el\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Hebrew/strings.po b/language/Hebrew/strings.po
deleted file mode 100644
index d1776b29a90..00000000000
--- a/language/Hebrew/strings.po
+++ /dev/null
@@ -1,206 +0,0 @@
-# Hebrew translations for PACKAGE package.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: he\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Hindi/strings.po b/language/Hindi/strings.po
deleted file mode 100644
index de37777c238..00000000000
--- a/language/Hindi/strings.po
+++ /dev/null
@@ -1,205 +0,0 @@
-# Hindi translations for PACKAGE package.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: hi\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Hungarian/strings.po b/language/Hungarian/strings.po
deleted file mode 100644
index 28e7f3feca1..00000000000
--- a/language/Hungarian/strings.po
+++ /dev/null
@@ -1,206 +0,0 @@
-# Hungarian translations for PACKAGE package.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: hu\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Indonesian/strings.po b/language/Indonesian/strings.po
deleted file mode 100644
index 9b9e814fc6f..00000000000
--- a/language/Indonesian/strings.po
+++ /dev/null
@@ -1,206 +0,0 @@
-# Indonesian translations for PACKAGE package
-# Terjemahan bahasa inggris untuk paket PACKAGE.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: id\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Italian/strings.po b/language/Italian/strings.po
deleted file mode 100644
index 48807f2eb3e..00000000000
--- a/language/Italian/strings.po
+++ /dev/null
@@ -1,207 +0,0 @@
-# Italian translations for PACKAGE package
-# Traduzioni italiane per il pacchetto PACKAGE..
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: it\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Japanese/strings.po b/language/Japanese/strings.po
deleted file mode 100644
index e56170719d7..00000000000
--- a/language/Japanese/strings.po
+++ /dev/null
@@ -1,207 +0,0 @@
-# Japanese translations for PACKAGE package
-# PACKAGE ƒpƒbƒP[ƒW‚ɑ΂·‚é‰p–ó.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: ja\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Korean/strings.po b/language/Korean/strings.po
deleted file mode 100644
index 1f813e98b40..00000000000
--- a/language/Korean/strings.po
+++ /dev/null
@@ -1,207 +0,0 @@
-# Korean translations for PACKAGE package
-# PACKAGE ÆÐŰÁö¿¡ ´ëÇÑ Çѱ¹¾î ¹ø¿ª¹®.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: ko\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Latvian/strings.po b/language/Latvian/strings.po
deleted file mode 100644
index 6861c42c676..00000000000
--- a/language/Latvian/strings.po
+++ /dev/null
@@ -1,207 +0,0 @@
-# Latvian translations for PACKAGE package.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: lv\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : "
-"2);\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Lithuanian/strings.po b/language/Lithuanian/strings.po
deleted file mode 100644
index 1f26549246e..00000000000
--- a/language/Lithuanian/strings.po
+++ /dev/null
@@ -1,207 +0,0 @@
-# Lithuanian translations for PACKAGE package.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: lt\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n"
-"%100<10 || n%100>=20) ? 1 : 2);\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Macedonian/strings.po b/language/Macedonian/strings.po
deleted file mode 100644
index c6addbc306b..00000000000
--- a/language/Macedonian/strings.po
+++ /dev/null
@@ -1,205 +0,0 @@
-# Macedonian translations for PACKAGE package.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: mk\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Norwegian/strings.po b/language/Norwegian/strings.po
deleted file mode 100644
index 188ad0213cb..00000000000
--- a/language/Norwegian/strings.po
+++ /dev/null
@@ -1,206 +0,0 @@
-# Norwegian translations for PACKAGE package.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: no\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Persian/strings.po b/language/Persian/strings.po
deleted file mode 100644
index bc0ebc14f91..00000000000
--- a/language/Persian/strings.po
+++ /dev/null
@@ -1,205 +0,0 @@
-# Persian translations for PACKAGE package.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: fa\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Polish/strings.po b/language/Polish/strings.po
deleted file mode 100644
index 66fdfa4f22a..00000000000
--- a/language/Polish/strings.po
+++ /dev/null
@@ -1,208 +0,0 @@
-# Polish translations for PACKAGE package
-# Polskie t³umaczenia dla pakietu PACKAGE.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: pl\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
-"|| n%100>=20) ? 1 : 2);\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Portuguese (Brazil)/strings.po b/language/Portuguese (Brazil)/strings.po
deleted file mode 100644
index 405572d8fab..00000000000
--- a/language/Portuguese (Brazil)/strings.po
+++ /dev/null
@@ -1,207 +0,0 @@
-# Portuguese translations for PACKAGE package
-# Traduções em português brasileiro para o pacote PACKAGE.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: pt_BR\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Portuguese/strings.po b/language/Portuguese/strings.po
deleted file mode 100644
index 95ad6aa751a..00000000000
--- a/language/Portuguese/strings.po
+++ /dev/null
@@ -1,206 +0,0 @@
-# Portuguese translations for PACKAGE package.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: pt\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Romanian/strings.po b/language/Romanian/strings.po
deleted file mode 100644
index ac27ab15196..00000000000
--- a/language/Romanian/strings.po
+++ /dev/null
@@ -1,208 +0,0 @@
-# Romanian translations for PACKAGE package
-# Traducerea în limba românã pentru pachetul PACKAGE.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: ro\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < "
-"20)) ? 1 : 2;\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Russian/strings.po b/language/Russian/strings.po
deleted file mode 100644
index da30e8091ee..00000000000
--- a/language/Russian/strings.po
+++ /dev/null
@@ -1,208 +0,0 @@
-# Russian translations for PACKAGE package
-# Àíãëèéñêèå ïåðåâîäû äëÿ ïàêåòà PACKAGE.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: ru\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
-"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Serbian (Cyrillic)/strings.po b/language/Serbian (Cyrillic)/strings.po
deleted file mode 100644
index 0ca033e07cd..00000000000
--- a/language/Serbian (Cyrillic)/strings.po
+++ /dev/null
@@ -1,207 +0,0 @@
-# Serbian translations for PACKAGE package.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: sr\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
-"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Serbian/strings.po b/language/Serbian/strings.po
deleted file mode 100644
index 0ca033e07cd..00000000000
--- a/language/Serbian/strings.po
+++ /dev/null
@@ -1,207 +0,0 @@
-# Serbian translations for PACKAGE package.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: sr\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
-"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Slovak/strings.po b/language/Slovak/strings.po
deleted file mode 100644
index 9e1f1fbeb7b..00000000000
--- a/language/Slovak/strings.po
+++ /dev/null
@@ -1,207 +0,0 @@
-# Slovak translations for PACKAGE package
-# Slovenské preklady pre balík PACKAGE.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: sk\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Slovenian/strings.po b/language/Slovenian/strings.po
deleted file mode 100644
index 5ced154cac3..00000000000
--- a/language/Slovenian/strings.po
+++ /dev/null
@@ -1,208 +0,0 @@
-# Slovenian translations for PACKAGE package
-# Slovenski prevodi paketa PACKAGE.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: sl\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n"
-"%100==4 ? 2 : 3);\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Spanish (Mexico)/strings.po b/language/Spanish (Mexico)/strings.po
deleted file mode 100644
index 9265b82449d..00000000000
--- a/language/Spanish (Mexico)/strings.po
+++ /dev/null
@@ -1,207 +0,0 @@
-# Spanish translations for PACKAGE package
-# Traducciones al español para el paquete PACKAGE.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: es_MX\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Spanish/strings.po b/language/Spanish/strings.po
deleted file mode 100644
index cf7ff2a40e2..00000000000
--- a/language/Spanish/strings.po
+++ /dev/null
@@ -1,207 +0,0 @@
-# Spanish translations for PACKAGE package
-# Traducciones al español para el paquete PACKAGE.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: es\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Swedish/strings.po b/language/Swedish/strings.po
deleted file mode 100644
index 93a3a3d2a22..00000000000
--- a/language/Swedish/strings.po
+++ /dev/null
@@ -1,206 +0,0 @@
-# Swedish translations for PACKAGE package.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: sv\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Thai/strings.po b/language/Thai/strings.po
deleted file mode 100644
index 74064822595..00000000000
--- a/language/Thai/strings.po
+++ /dev/null
@@ -1,205 +0,0 @@
-# Thai translations for PACKAGE package.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: th\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Turkish/strings.po b/language/Turkish/strings.po
deleted file mode 100644
index 5d93e32478c..00000000000
--- a/language/Turkish/strings.po
+++ /dev/null
@@ -1,207 +0,0 @@
-# Turkish translations for PACKAGE package
-# PACKAGE paketi için Türkçe çeviriler.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: tr\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Ukrainian/strings.po b/language/Ukrainian/strings.po
deleted file mode 100644
index 99aa71b325c..00000000000
--- a/language/Ukrainian/strings.po
+++ /dev/null
@@ -1,207 +0,0 @@
-# Ukrainian translations for PACKAGE package.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: uk\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
-"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/language/Vietnamese/strings.po b/language/Vietnamese/strings.po
deleted file mode 100644
index c8069020e27..00000000000
--- a/language/Vietnamese/strings.po
+++ /dev/null
@@ -1,206 +0,0 @@
-# Vietnamese translations for PACKAGE package.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: MAME\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-02-20 21:38+0100\n"
-"PO-Revision-Date: 2016-02-20 18:03+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: MAME Language Team\n"
-"Language: vi\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
-
-#: src/emu/ui/auditmenu.cpp:111
-msgid "Audit in progress..."
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:72
-msgid "New Barcode:"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:76
-msgid "Enter Code"
-msgstr ""
-
-#: src/emu/ui/barcode.cpp:118
-msgid "Barcode length invalid!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:78
-#, c-format
-msgid ""
-"Cheat Comment:\n"
-"%s"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:91
-msgid "All cheats reloaded"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:122
-msgid "Autofire Settings"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:140
-msgid "Reset All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:143
-msgid "Reload All"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Autofire Status"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Disabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:259
-msgid "Enabled"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "On"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:285 src/emu/ui/cheatopt.cpp:291
-msgid "Off"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:302
-msgid "No buttons found on this machine!"
-msgstr ""
-
-#: src/emu/ui/cheatopt.cpp:313 src/emu/ui/cheatopt.cpp:317
-msgid "Autofire Delay"
-msgstr ""
-
-#: src/emu/ui/ctrlmenu.cpp:106 src/emu/ui/ctrlmenu.cpp:126
-msgid "Device Mapping"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:156 src/emu/ui/custmenu.cpp:441
-msgid "Main filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:165 src/emu/ui/custmenu.cpp:450
-msgid "Other filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:192 src/emu/ui/custmenu.cpp:504
-msgid "Remove last filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:195 src/emu/ui/custmenu.cpp:507
-msgid "Add filter"
-msgstr ""
-
-#: src/emu/ui/custmenu.cpp:210 src/emu/ui/custmenu.cpp:230
-#: src/emu/ui/custmenu.cpp:523 src/emu/ui/custmenu.cpp:543
-msgid "Select custom filters:"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:53
-msgid "Input (general)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:55
-msgid "Input (this Machine)"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:59
-msgid "Analog Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:61
-msgid "Dip Switches"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:64
-msgid "Machine Configuration"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:68
-msgid "Bookkeeping Info"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:71
-msgid "Machine Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:77
-msgid "Image Information"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:80
-msgid "File Manager"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:85
-msgid "Tape Control"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:90
-msgid "Pseudo terminals"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:93
-msgid "Bios Selection"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:99
-msgid "Slot Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:106
-msgid "Barcode Reader"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:113
-msgid "Network Devices"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:118
-msgid "Keyboard Mode"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:121
-msgid "Slider Controls"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:124
-msgid "Video Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:128
-msgid "Crosshair Options"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:132
-msgid "Cheat"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:136
-msgid "External DAT View"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:142
-msgid "Add To Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:144
-msgid "Remove From Favorites"
-msgstr ""
-
-#: src/emu/ui/mainmenu.cpp:151
-msgid "Select New Machine"
-msgstr ""
diff --git a/makefile b/makefile
index 582be0296c6..7818353125d 100644
--- a/makefile
+++ b/makefile
@@ -20,9 +20,10 @@
# SUBTARGET = tiny
# TOOLS = 1
# TESTS = 1
-# BENCHMARKS = 1
# OSD = sdl
+# USE_BGFX = 1
+# NO_OPENGL = 1
# USE_DISPATCH_GL = 0
# MODERN_WIN_API = 0
# USE_XAUDIO2 = 0
@@ -66,13 +67,13 @@
# MESA_INSTALL_ROOT = /opt/mesa
# SDL_INSTALL_ROOT = /opt/sdl2
# SDL_FRAMEWORK_PATH = $(HOME)/Library/Frameworks
-# USE_LIBSDL = 1
+# SDL_LIBVER = sdl
+# MACOSX_USE_LIBSDL = 1
# CYGWIN_BUILD = 1
# BUILDDIR = build
# TARGETOS = windows
# CROSS_BUILD = 1
-# TOOLCHAIN =
# OVERRIDE_CC = cc
# OVERRIDE_CXX = c++
# OVERRIDE_LD = ld
@@ -268,9 +269,9 @@ WINDRES := $(MINGW32)/bin/windres
endif
else
ifeq ($(ARCHITECTURE),_x64)
-WINDRES := $(word 1,$(TOOLCHAIN) x86_64-w64-mingw32-)windres
+WINDRES := x86_64-w64-mingw32-windres
else
-WINDRES := $(word 1,$(TOOLCHAIN) i686-w64-mingw32-)windres
+WINDRES := i686-w64-mingw32-windres
endif
endif
@@ -309,7 +310,6 @@ PYTHON := $(PYTHON_EXECUTABLE)
endif
CC := $(SILENT)gcc
LD := $(SILENT)g++
-CXX:= $(SILENT)g++
#-------------------------------------------------
# specify OSD layer: windows, sdl, etc.
@@ -405,9 +405,6 @@ endif
PARAMS+= --distro=$(DISTRO)
-ifdef TOOLCHAIN
-PARAMS += --TOOLCHAIN='$(TOOLCHAIN)'
-endif
ifdef OVERRIDE_CC
PARAMS += --CC='$(OVERRIDE_CC)'
ifndef CROSS_BUILD
@@ -476,10 +473,6 @@ ifdef TESTS
PARAMS += --with-tests
endif
-ifdef BENCHMARKS
-PARAMS += --with-benchmarks
-endif
-
ifdef SYMBOLS
PARAMS += --SYMBOLS='$(SYMBOLS)'
endif
@@ -560,6 +553,10 @@ ifdef DONT_USE_NETWORK
PARAMS += --DONT_USE_NETWORK='$(DONT_USE_NETWORK)'
endif
+ifdef NO_OPENGL
+PARAMS += --NO_OPENGL='$(NO_OPENGL)'
+endif
+
ifdef USE_DISPATCH_GL
PARAMS += --USE_DISPATCH_GL='$(USE_DISPATCH_GL)'
endif
@@ -624,8 +621,8 @@ ifdef SDL_FRAMEWORK_PATH
PARAMS += --SDL_FRAMEWORK_PATH='$(SDL_FRAMEWORK_PATH)'
endif
-ifdef USE_LIBSDL
-PARAMS += --USE_LIBSDL='$(USE_LIBSDL)'
+ifdef MACOSX_USE_LIBSDL
+PARAMS += --MACOSX_USE_LIBSDL='$(MACOSX_USE_LIBSDL)'
endif
ifdef LDOPTS
@@ -701,7 +698,6 @@ SCRIPTS = scripts/genie.lua \
scripts/src/sound.lua \
scripts/src/tools.lua \
scripts/src/tests.lua \
- scripts/src/benchmarks.lua \
scripts/src/video.lua \
scripts/src/bus.lua \
scripts/src/netlist.lua \
@@ -774,12 +770,12 @@ endif
ifeq ($(OS),windows)
ifeq (posix,$(SHELLTYPE))
-GCC_VERSION := $(shell $(TOOLCHAIN)$(subst @,,$(CC)) -dumpversion 2> /dev/null)
-CLANG_VERSION := $(shell $(TOOLCHAIN)$(subst @,,$(CC)) --version 2> /dev/null| head -n 1 | grep clang | sed "s/^.*[^0-9]\([0-9]*\.[0-9]*\.[0-9]*\).*$$/\1/" | head -n 1)
+GCC_VERSION := $(shell $(subst @,,$(CC)) -dumpversion 2> /dev/null)
+CLANG_VERSION := $(shell $(subst @,,$(CC)) --version 2> /dev/null| head -n 1 | grep clang | sed "s/^.*[^0-9]\([0-9]*\.[0-9]*\.[0-9]*\).*$$/\1/" | head -n 1)
PYTHON_AVAILABLE := $(shell $(PYTHON) --version > /dev/null 2>&1 && echo python)
else
-GCC_VERSION := $(shell $(TOOLCHAIN)$(subst @,,$(CC)) -dumpversion 2> NUL)
-CLANG_VERSION := $(shell $(TOOLCHAIN)$(subst @,,$(CC)) --version 2> NUL| head -n 1 | grep clang | sed "s/^.*[^0-9]\([0-9]*\.[0-9]*\.[0-9]*\).*$$/\1/" | head -n 1)
+GCC_VERSION := $(shell $(subst @,,$(CC)) -dumpversion 2> NUL)
+CLANG_VERSION := $(shell $(subst @,,$(CC)) --version 2> NUL| head -n 1 | grep clang | sed "s/^.*[^0-9]\([0-9]*\.[0-9]*\.[0-9]*\).*$$/\1/" | head -n 1)
PYTHON_AVAILABLE := $(shell $(PYTHON) --version > NUL 2>&1 && echo python)
endif
ifdef MSBUILD
@@ -796,9 +792,9 @@ MSBUILD_PARAMS += /p:Platform=win32
endif
endif
else
-GCC_VERSION := $(shell $(TOOLCHAIN)$(subst @,,$(CC)) -dumpversion 2> /dev/null)
+GCC_VERSION := $(shell $(subst @,,$(CC)) -dumpversion 2> /dev/null)
ifneq ($(OS),solaris)
-CLANG_VERSION := $(shell $(TOOLCHAIN)$(subst @,,$(CC)) --version 2> /dev/null | head -n 1 | grep -e 'version [0-9]\.[0-9]\(\.[0-9]\)\?' -o | grep -e '[0-9]\.[0-9]\(\.[0-9]\)\?' -o | tail -n 1)
+CLANG_VERSION := $(shell $(subst @,,$(CC)) --version 2> /dev/null | head -n 1 | grep -e 'version [0-9]\.[0-9]\(\.[0-9]\)\?' -o | grep -e '[0-9]\.[0-9]\(\.[0-9]\)\?' -o | tail -n 1)
endif
PYTHON_AVAILABLE := $(shell $(PYTHON) --version > /dev/null 2>&1 && echo python)
endif
@@ -1193,7 +1189,7 @@ endif
ifndef MARVELL_ROOTFS
$(error MARVELL_ROOTFS is not set)
endif
- $(SILENT) $(GENIE) $(PARAMS) --gcc=steamlink --gcc_version=$(GCC_VERSION) --NO_OPENGL=1 --NO_USE_MIDI=1 --NO_X11=1 --NOASM=1 --SDL_INSTALL_ROOT=$(MARVELL_ROOTFS)/usr gmake
+ $(SILENT) $(GENIE) $(PARAMS) --gcc=steamlink --gcc_version=$(GCC_VERSION) --USE_BGFX=0 --NO_OPENGL=1 --NO_USE_MIDI=1 --NO_X11=1 --NOASM=1 --SDL_INSTALL_ROOT=$(MARVELL_ROOTFS)/usr gmake
.PHONY: steamlink
ifndef MARVELL_SDK_PATH
@@ -1233,14 +1229,10 @@ $(GENIE): $(GENIE_SRC)
3rdparty/genie/src/hosts/%.c:
-.PHONY: genieclean
-genieclean:
- $(SILENT) $(MAKE) $(MAKEPARAMS) -C 3rdparty/genie/build/gmake.$(GENIEOS) -f genie.make clean
-
-clean: genieclean
+clean:
@echo Cleaning...
-@rm -rf $(BUILDDIR)
- $(SILENT) $(MAKE) -C $(SRC)/devices/cpu/m68000 clean
+ $(SILENT) $(MAKE) $(MAKEPARAMS) -C 3rdparty/genie/build/gmake.$(GENIEOS) -f genie.make clean
GEN_FOLDERS := $(GENDIR)/$(TARGET)/layout/ $(GENDIR)/$(TARGET)/$(SUBTARGET)/
@@ -1257,24 +1249,15 @@ endif
$(GEN_FOLDERS):
-$(call MKDIR,$@)
-genie: $(GENIE)
-
generate: \
- genie \
+ $(GENIE) \
$(GEN_FOLDERS) \
- $(patsubst $(SRC)/%.lay,$(GENDIR)/%.lh,$(LAYOUTS)) \
- $(SRC)/devices/cpu/m68000/m68kops.cpp
+ $(patsubst $(SRC)/%.lay,$(GENDIR)/%.lh,$(LAYOUTS))
$(GENDIR)/%.lh: $(SRC)/%.lay scripts/build/file2str.py | $(GEN_FOLDERS)
@echo Converting $<...
$(SILENT)$(PYTHON) scripts/build/file2str.py $< $@ layout_$(basename $(notdir $<))
-$(SRC)/devices/cpu/m68000/m68kops.cpp: $(SRC)/devices/cpu/m68000/m68k_in.cpp $(SRC)/devices/cpu/m68000/m68kmake.cpp
-ifeq ($(TARGETOS),asmjs)
- $(SILENT) $(MAKE) -C $(SRC)/devices/cpu/m68000
-else
- $(SILENT) $(MAKE) -C $(SRC)/devices/cpu/m68000 CC="$(CC)" CXX="$(CXX)"
-endif
#-------------------------------------------------
# Regression tests
@@ -1370,167 +1353,3 @@ cppcheck:
@echo Generate CppCheck analysis report
cppcheck --enable=all src/ $(CPPCHECK_PARAMS) -j9
-.PHONY: shaders
-
-shaders:
- $(SILENT) $(MAKE) -C $(SRC)/osd/modules/render/bgfx rebuild
-
-.PHONY: translation
-
-translation:
- $(SILENT) echo Generating mame.pot
- $(SILENT) find src/emu/ui -iname "*.cpp" | xargs xgettext --from-code=UTF-8 -k_ -o mame.pot
- $(SILENT) echo Afrikaans
- $(SILENT) msgmerge -U "language/Afrikaans/strings.po" mame.pot
- $(SILENT) echo Albanian
- $(SILENT) msgmerge -U "language/Albanian/strings.po" mame.pot
- $(SILENT) echo Arabic
- $(SILENT) msgmerge -U "language/Arabic/strings.po" mame.pot
- $(SILENT) echo Basque
- $(SILENT) msgmerge -U "language/Basque/strings.po" mame.pot
- $(SILENT) echo Belarusian
- $(SILENT) msgmerge -U "language/Belarusian/strings.po" mame.pot
- $(SILENT) echo Bosnian
- $(SILENT) msgmerge -U "language/Bosnian/strings.po" mame.pot
- $(SILENT) echo Bulgarian
- $(SILENT) msgmerge -U "language/Bulgarian/strings.po" mame.pot
- $(SILENT) echo Burmese
- $(SILENT) msgmerge -U "language/Burmese/strings.po" mame.pot
- $(SILENT) echo Catalan
- $(SILENT) msgmerge -U "language/Catalan/strings.po" mame.pot
- $(SILENT) echo Chinese (Simple)
- $(SILENT) msgmerge -U "language/Chinese (Simple)/strings.po" mame.pot
- $(SILENT) echo Chinese (Traditional)
- $(SILENT) msgmerge -U "language/Chinese (Traditional)/strings.po" mame.pot
- $(SILENT) echo Croatian
- $(SILENT) msgmerge -U "language/Croatian/strings.po" mame.pot
- $(SILENT) echo Czech
- $(SILENT) msgmerge -U "language/Czech/strings.po" mame.pot
- $(SILENT) echo Danish
- $(SILENT) msgmerge -U "language/Danish/strings.po" mame.pot
- $(SILENT) echo Dutch
- $(SILENT) msgmerge -U "language/Dutch/strings.po" mame.pot
- $(SILENT) echo English
- $(SILENT) msgmerge -U "language/English/strings.po" mame.pot
- $(SILENT) echo Estonian
- $(SILENT) msgmerge -U "language/Estonian/strings.po" mame.pot
- $(SILENT) echo Finnish
- $(SILENT) msgmerge -U "language/Finnish/strings.po" mame.pot
- $(SILENT) echo French
- $(SILENT) msgmerge -U "language/French/strings.po" mame.pot
- $(SILENT) echo French (Canada)
- $(SILENT) msgmerge -U "language/French (Canada)/strings.po" mame.pot
- $(SILENT) echo Georgian
- $(SILENT) msgmerge -U "language/Georgian/strings.po" mame.pot
- $(SILENT) echo German
- $(SILENT) msgmerge -U "language/German/strings.po" mame.pot
- $(SILENT) echo Greek
- $(SILENT) msgmerge -U "language/Greek/strings.po" mame.pot
- $(SILENT) echo Hebrew
- $(SILENT) msgmerge -U "language/Hebrew/strings.po" mame.pot
- $(SILENT) echo Hindi
- $(SILENT) msgmerge -U "language/Hindi/strings.po" mame.pot
- $(SILENT) echo Hungarian
- $(SILENT) msgmerge -U "language/Hungarian/strings.po" mame.pot
- $(SILENT) echo Indonesian
- $(SILENT) msgmerge -U "language/Indonesian/strings.po" mame.pot
- $(SILENT) echo Italian
- $(SILENT) msgmerge -U "language/Italian/strings.po" mame.pot
- $(SILENT) echo Japanese
- $(SILENT) msgmerge -U "language/Japanese/strings.po" mame.pot
- $(SILENT) echo Korean
- $(SILENT) msgmerge -U "language/Korean/strings.po" mame.pot
- $(SILENT) echo Latvian
- $(SILENT) msgmerge -U "language/Latvian/strings.po" mame.pot
- $(SILENT) echo Lithuanian
- $(SILENT) msgmerge -U "language/Lithuanian/strings.po" mame.pot
- $(SILENT) echo Macedonian
- $(SILENT) msgmerge -U "language/Macedonian/strings.po" mame.pot
- $(SILENT) echo Norwegian
- $(SILENT) msgmerge -U "language/Norwegian/strings.po" mame.pot
- $(SILENT) echo Persian
- $(SILENT) msgmerge -U "language/Persian/strings.po" mame.pot
- $(SILENT) echo Polish
- $(SILENT) msgmerge -U "language/Polish/strings.po" mame.pot
- $(SILENT) echo Portuguese
- $(SILENT) msgmerge -U "language/Portuguese/strings.po" mame.pot
- $(SILENT) echo Portuguese (Brazil)
- $(SILENT) msgmerge -U "language/Portuguese (Brazil)/strings.po" mame.pot
- $(SILENT) echo Romanian
- $(SILENT) msgmerge -U "language/Romanian/strings.po" mame.pot
- $(SILENT) echo Russian
- $(SILENT) msgmerge -U "language/Russian/strings.po" mame.pot
- $(SILENT) echo Serbian
- $(SILENT) msgmerge -U "language/Serbian/strings.po" mame.pot
- $(SILENT) echo Serbian (Cyrillic)
- $(SILENT) msgmerge -U "language/Serbian (Cyrillic)/strings.po" mame.pot
- $(SILENT) echo Slovak
- $(SILENT) msgmerge -U "language/Slovak/strings.po" mame.pot
- $(SILENT) echo Slovenian
- $(SILENT) msgmerge -U "language/Slovenian/strings.po" mame.pot
- $(SILENT) echo Spanish
- $(SILENT) msgmerge -U "language/Spanish/strings.po" mame.pot
- $(SILENT) echo Spanish (Mexico)
- $(SILENT) msgmerge -U "language/Spanish (Mexico)/strings.po" mame.pot
- $(SILENT) echo Swedish
- $(SILENT) msgmerge -U "language/Swedish/strings.po" mame.pot
- $(SILENT) echo Thai
- $(SILENT) msgmerge -U "language/Thai/strings.po" mame.pot
- $(SILENT) echo Turkish
- $(SILENT) msgmerge -U "language/Turkish/strings.po" mame.pot
- $(SILENT) echo Ukrainian
- $(SILENT) msgmerge -U "language/Ukrainian/strings.po" mame.pot
- $(SILENT) echo Vietnamese
- $(SILENT) msgmerge -U "language/Vietnamese/strings.po" mame.pot
- $(SILENT) msgfmt --check --output-file "language/Afrikaans/strings.mo" "language/Afrikaans/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Albanian/strings.mo" "language/Albanian/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Arabic/strings.mo" "language/Arabic/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Basque/strings.mo" "language/Basque/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Belarusian/strings.mo" "language/Belarusian/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Bosnian/strings.mo" "language/Bosnian/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Bulgarian/strings.mo" "language/Bulgarian/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Burmese/strings.mo" "language/Burmese/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Catalan/strings.mo" "language/Catalan/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Chinese (Simple)/strings.mo" "language/Chinese (Simple)/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Chinese (Traditional)/strings.mo" "language/Chinese (Traditional)/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Croatian/strings.mo" "language/Croatian/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Czech/strings.mo" "language/Czech/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Danish/strings.mo" "language/Danish/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Dutch/strings.mo" "language/Dutch/strings.po"
- $(SILENT) msgfmt --check --output-file "language/English/strings.mo" "language/English/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Estonian/strings.mo" "language/Estonian/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Finnish/strings.mo" "language/Finnish/strings.po"
- $(SILENT) msgfmt --check --output-file "language/French/strings.mo" "language/French/strings.po"
- $(SILENT) msgfmt --check --output-file "language/French (Canada)/strings.mo" "language/French (Canada)/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Georgian/strings.mo" "language/Georgian/strings.po"
- $(SILENT) msgfmt --check --output-file "language/German/strings.mo" "language/German/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Greek/strings.mo" "language/Greek/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Hebrew/strings.mo" "language/Hebrew/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Hindi/strings.mo" "language/Hindi/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Hungarian/strings.mo" "language/Hungarian/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Indonesian/strings.mo" "language/Indonesian/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Italian/strings.mo" "language/Italian/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Japanese/strings.mo" "language/Japanese/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Korean/strings.mo" "language/Korean/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Latvian/strings.mo" "language/Latvian/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Lithuanian/strings.mo" "language/Lithuanian/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Macedonian/strings.mo" "language/Macedonian/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Norwegian/strings.mo" "language/Norwegian/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Persian/strings.mo" "language/Persian/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Polish/strings.mo" "language/Polish/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Portuguese/strings.mo" "language/Portuguese/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Portuguese (Brazil)/strings.mo" "language/Portuguese (Brazil)/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Romanian/strings.mo" "language/Romanian/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Russian/strings.mo" "language/Russian/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Serbian/strings.mo" "language/Serbian/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Serbian (Cyrillic)/strings.mo" "language/Serbian (Cyrillic)/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Slovak/strings.mo" "language/Slovak/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Slovenian/strings.mo" "language/Slovenian/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Spanish/strings.mo" "language/Spanish/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Spanish (Mexico)/strings.mo" "language/Spanish (Mexico)/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Swedish/strings.mo" "language/Swedish/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Thai/strings.mo" "language/Thai/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Turkish/strings.mo" "language/Turkish/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Ukrainian/strings.mo" "language/Ukrainian/strings.po"
- $(SILENT) msgfmt --check --output-file "language/Vietnamese/strings.mo" "language/Vietnamese/strings.po"
-
diff --git a/plugins/boot.lua b/plugins/boot.lua
deleted file mode 100644
index 4f8c6a0ee96..00000000000
--- a/plugins/boot.lua
+++ /dev/null
@@ -1,24 +0,0 @@
-require('lfs')
-local uv = require('luv')
-local cwd = uv.cwd()
-package.path = cwd .. "/plugins/?.lua;" .. cwd .. "/plugins/?/init.lua"
-
-local json = require('json')
-function readAll(file)
- local f = io.open(file, "rb")
- local content = f:read("*all")
- f:close()
- return content
-end
-
-for file in lfs.dir("plugins") do
- if (file~="." and file~=".." and lfs.attributes("plugins/" .. file,"mode")=="directory") then
- local filename = "plugins/" .. file .. "/plugin.json"
- local meta = json.parse(readAll(filename))
- if (meta["plugin"]["type"]=="plugin") and (meta["plugin"]["start"]=="true") then
- server = require(meta["plugin"]["name"])
- server.startplugin();
- end
- end
-end
-
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
deleted file mode 100644
index 8c4fbe6a0f5..00000000000
--- a/plugins/dummy/init.lua
+++ /dev/null
@@ -1,20 +0,0 @@
-local exports = {}
-exports.name = "dummy"
-exports.version = "0.0.1"
-exports.description = "A dummy example"
-exports.license = "MIT"
-exports.author = { name = "Miodrag Milanovic" }
-
-local dummy = exports
-
-function dummy.startplugin()
- emu.register_start(function()
- print("Starting " .. emu.gamename())
- end)
-
- emu.register_stop(function()
- print("Exiting " .. emu.gamename())
- end)
-end
-
-return exports
diff --git a/plugins/dummy/plugin.json b/plugins/dummy/plugin.json
deleted file mode 100644
index 4d877fa4dfa..00000000000
--- a/plugins/dummy/plugin.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "plugin": {
- "name": "dummy",
- "version": "0.0.1",
- "author": "Miodrag Milanovic",
- "type": "plugin",
- "start": "false",
- }
-} \ No newline at end of file
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/LICENSE b/plugins/json/LICENSE
deleted file mode 100644
index 5789b767285..00000000000
--- a/plugins/json/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/json/README.md b/plugins/json/README.md
deleted file mode 100644
index 71965e3d0f7..00000000000
--- a/plugins/json/README.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# luv-json
-A luv port of luvit's json module
diff --git a/plugins/json/init.lua b/plugins/json/init.lua
deleted file mode 100644
index d49352cc6ff..00000000000
--- a/plugins/json/init.lua
+++ /dev/null
@@ -1,732 +0,0 @@
-local exports = {}
-exports.name = "luvit/json"
-exports.version = "2.5.0"
-exports.homepage = "http://dkolf.de/src/dkjson-lua.fsl"
-exports.description = "David Kolf's JSON library repackaged for lit."
-exports.tags = {"json", "codec"}
-exports.license = "MIT"
-exports.author = {
- name = "David Kolf",
- homepage = "http://dkolf.de/",
-}
-exports.contributors = {
- "Tim Caswell",
-}
-
--- Module options:
-local always_try_using_lpeg = false
-local register_global_module_table = false
-local global_module_name = 'json'
-
---[==[
-
-David Kolf's JSON module for Lua 5.1/5.2
-
-Version 2.5
-
-
-For the documentation see the corresponding readme.txt or visit
-<http://dkolf.de/src/dkjson-lua.fsl/>.
-
-You can contact the author by sending an e-mail to 'david' at the
-domain 'dkolf.de'.
-
-
-Copyright (C) 2010-2013 David Heiko Kolf
-
-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.
-
---]==]
-
--- global dependencies:
-local pairs, type, tostring, tonumber, getmetatable, setmetatable =
- pairs, type, tostring, tonumber, getmetatable, setmetatable
-local error, require, pcall, select = error, require, pcall, select
-local floor, huge = math.floor, math.huge
-local strrep, gsub, strsub, strbyte, strchar, strfind, strlen, strformat =
- string.rep, string.gsub, string.sub, string.byte, string.char,
- string.find, string.len, string.format
-local strmatch = string.match
-local concat = table.concat
-
-local json = exports
-json.original_version = "dkjson 2.5"
-
-if register_global_module_table then
- _G[global_module_name] = json
-end
-
-_ENV = nil -- blocking globals in Lua 5.2
-
-pcall (function()
- -- Enable access to blocked metatables.
- -- Don't worry, this module doesn't change anything in them.
- local debmeta = require "debug".getmetatable
- if debmeta then getmetatable = debmeta end
-end)
-
-json.null = setmetatable ({}, {
- __tojson = function () return "null" end
-})
-
-local function isarray (tbl)
- local max, n, arraylen = 0, 0, 0
- for k,v in pairs (tbl) do
- if k == 'n' and type(v) == 'number' then
- arraylen = v
- if v > max then
- max = v
- end
- else
- if type(k) ~= 'number' or k < 1 or floor(k) ~= k then
- return false
- end
- if k > max then
- max = k
- end
- n = n + 1
- end
- end
- if max > 10 and max > arraylen and max > n * 2 then
- return false -- don't create an array with too many holes
- end
- return true, max
-end
-
-local escapecodes = {
- ["\""] = "\\\"", ["\\"] = "\\\\", ["\b"] = "\\b", ["\f"] = "\\f",
- ["\n"] = "\\n", ["\r"] = "\\r", ["\t"] = "\\t"
-}
-
-local function escapeutf8 (uchar)
- local value = escapecodes[uchar]
- if value then
- return value
- end
- local a, b, c, d = strbyte (uchar, 1, 4)
- a, b, c, d = a or 0, b or 0, c or 0, d or 0
- if a <= 0x7f then
- value = a
- elseif 0xc0 <= a and a <= 0xdf and b >= 0x80 then
- value = (a - 0xc0) * 0x40 + b - 0x80
- elseif 0xe0 <= a and a <= 0xef and b >= 0x80 and c >= 0x80 then
- value = ((a - 0xe0) * 0x40 + b - 0x80) * 0x40 + c - 0x80
- elseif 0xf0 <= a and a <= 0xf7 and b >= 0x80 and c >= 0x80 and d >= 0x80 then
- value = (((a - 0xf0) * 0x40 + b - 0x80) * 0x40 + c - 0x80) * 0x40 + d - 0x80
- else
- return ""
- end
- if value <= 0xffff then
- return strformat ("\\u%.4x", value)
- elseif value <= 0x10ffff then
- -- encode as UTF-16 surrogate pair
- value = value - 0x10000
- local highsur, lowsur = 0xD800 + floor (value/0x400), 0xDC00 + (value % 0x400)
- return strformat ("\\u%.4x\\u%.4x", highsur, lowsur)
- else
- return ""
- end
-end
-
-local function fsub (str, pattern, repl)
- -- gsub always builds a new string in a buffer, even when no match
- -- exists. First using find should be more efficient when most strings
- -- don't contain the pattern.
- if strfind (str, pattern) then
- return gsub (str, pattern, repl)
- else
- return str
- end
-end
-
-local function quotestring (value)
- -- based on the regexp "escapable" in https://github.com/douglascrockford/JSON-js
- value = fsub (value, "[%z\1-\31\"\\\127]", escapeutf8)
- if strfind (value, "[\194\216\220\225\226\239]") then
- value = fsub (value, "\194[\128-\159\173]", escapeutf8)
- value = fsub (value, "\216[\128-\132]", escapeutf8)
- value = fsub (value, "\220\143", escapeutf8)
- value = fsub (value, "\225\158[\180\181]", escapeutf8)
- value = fsub (value, "\226\128[\140-\143\168-\175]", escapeutf8)
- value = fsub (value, "\226\129[\160-\175]", escapeutf8)
- value = fsub (value, "\239\187\191", escapeutf8)
- value = fsub (value, "\239\191[\176-\191]", escapeutf8)
- end
- return "\"" .. value .. "\""
-end
-json.quotestring = quotestring
-
-local function replace(str, o, n)
- local i, j = strfind (str, o, 1, true)
- if i then
- return strsub(str, 1, i-1) .. n .. strsub(str, j+1, -1)
- else
- return str
- end
-end
-
--- locale independent num2str and str2num functions
-local decpoint, numfilter
-
-local function updatedecpoint ()
- decpoint = strmatch(tostring(0.5), "([^05+])")
- -- build a filter that can be used to remove group separators
- numfilter = "[^0-9%-%+eE" .. gsub(decpoint, "[%^%$%(%)%%%.%[%]%*%+%-%?]", "%%%0") .. "]+"
-end
-
-updatedecpoint()
-
-local function num2str (num)
- return replace(fsub(tostring(num), numfilter, ""), decpoint, ".")
-end
-
-local function str2num (str)
- local num = tonumber(replace(str, ".", decpoint))
- if not num then
- updatedecpoint()
- num = tonumber(replace(str, ".", decpoint))
- end
- return num
-end
-
-local function addnewline2 (level, buffer, buflen)
- buffer[buflen+1] = "\n"
- buffer[buflen+2] = strrep (" ", level)
- buflen = buflen + 2
- return buflen
-end
-
-function json.addnewline (state)
- if state.indent then
- state.bufferlen = addnewline2 (state.level or 0,
- state.buffer, state.bufferlen or #(state.buffer))
- end
-end
-
-local encode2 -- forward declaration
-
-local function addpair (key, value, prev, indent, level, buffer, buflen, tables, globalorder, state)
- local kt = type (key)
- if kt ~= 'string' and kt ~= 'number' then
- return nil, "type '" .. kt .. "' is not supported as a key by JSON."
- end
- if prev then
- buflen = buflen + 1
- buffer[buflen] = ","
- end
- if indent then
- buflen = addnewline2 (level, buffer, buflen)
- end
- buffer[buflen+1] = quotestring (key)
- buffer[buflen+2] = ":"
- return encode2 (value, indent, level, buffer, buflen + 2, tables, globalorder, state)
-end
-
-local function appendcustom(res, buffer, state)
- local buflen = state.bufferlen
- if type (res) == 'string' then
- buflen = buflen + 1
- buffer[buflen] = res
- end
- return buflen
-end
-
-local function exception(reason, value, state, buffer, buflen, defaultmessage)
- defaultmessage = defaultmessage or reason
- local handler = state.exception
- if not handler then
- return nil, defaultmessage
- else
- state.bufferlen = buflen
- local ret, msg = handler (reason, value, state, defaultmessage)
- if not ret then return nil, msg or defaultmessage end
- return appendcustom(ret, buffer, state)
- end
-end
-
-function json.encodeexception(reason, value, state, defaultmessage)
- return quotestring("<" .. defaultmessage .. ">")
-end
-
-encode2 = function (value, indent, level, buffer, buflen, tables, globalorder, state)
- local valtype = type (value)
- local valmeta = getmetatable (value)
- valmeta = type (valmeta) == 'table' and valmeta -- only tables
- local valtojson = valmeta and valmeta.__tojson
- if valtojson then
- if tables[value] then
- return exception('reference cycle', value, state, buffer, buflen)
- end
- tables[value] = true
- state.bufferlen = buflen
- local ret, msg = valtojson (value, state)
- if not ret then return exception('custom encoder failed', value, state, buffer, buflen, msg) end
- tables[value] = nil
- buflen = appendcustom(ret, buffer, state)
- elseif value == nil then
- buflen = buflen + 1
- buffer[buflen] = "null"
- elseif valtype == 'number' then
- local s
- if value ~= value or value >= huge or -value >= huge then
- -- This is the behaviour of the original JSON implementation.
- s = "null"
- else
- s = num2str (value)
- end
- buflen = buflen + 1
- buffer[buflen] = s
- elseif valtype == 'boolean' then
- buflen = buflen + 1
- buffer[buflen] = value and "true" or "false"
- elseif valtype == 'string' then
- buflen = buflen + 1
- buffer[buflen] = quotestring (value)
- elseif valtype == 'table' then
- if tables[value] then
- return exception('reference cycle', value, state, buffer, buflen)
- end
- tables[value] = true
- level = level + 1
- local isa, n = isarray (value)
- if n == 0 and valmeta and valmeta.__jsontype == 'object' then
- isa = false
- end
- local msg
- if isa then -- JSON array
- buflen = buflen + 1
- buffer[buflen] = "["
- for i = 1, n do
- buflen, msg = encode2 (value[i], indent, level, buffer, buflen, tables, globalorder, state)
- if not buflen then return nil, msg end
- if i < n then
- buflen = buflen + 1
- buffer[buflen] = ","
- end
- end
- buflen = buflen + 1
- buffer[buflen] = "]"
- else -- JSON object
- local prev = false
- buflen = buflen + 1
- buffer[buflen] = "{"
- local order = valmeta and valmeta.__jsonorder or globalorder
- if order then
- local used = {}
- n = #order
- for i = 1, n do
- local k = order[i]
- local v = value[k]
- local _
- if v then
- used[k] = true
- buflen, _ = addpair (k, v, prev, indent, level, buffer, buflen, tables, globalorder, state)
- prev = true -- add a seperator before the next element
- end
- end
- for k,v in pairs (value) do
- if not used[k] then
- buflen, msg = addpair (k, v, prev, indent, level, buffer, buflen, tables, globalorder, state)
- if not buflen then return nil, msg end
- prev = true -- add a seperator before the next element
- end
- end
- else -- unordered
- for k,v in pairs (value) do
- buflen, msg = addpair (k, v, prev, indent, level, buffer, buflen, tables, globalorder, state)
- if not buflen then return nil, msg end
- prev = true -- add a seperator before the next element
- end
- end
- if indent then
- buflen = addnewline2 (level - 1, buffer, buflen)
- end
- buflen = buflen + 1
- buffer[buflen] = "}"
- end
- tables[value] = nil
- else
- return exception ('unsupported type', value, state, buffer, buflen,
- "type '" .. valtype .. "' is not supported by JSON.")
- end
- return buflen
-end
-
-function json.encode (value, state)
- state = state or {}
- local oldbuffer = state.buffer
- local buffer = oldbuffer or {}
- state.buffer = buffer
- updatedecpoint()
- local ret, msg = encode2 (value, state.indent, state.level or 0,
- buffer, state.bufferlen or 0, state.tables or {}, state.keyorder, state)
- if not ret then
- error (msg, 2)
- elseif oldbuffer == buffer then
- state.bufferlen = ret
- return true
- else
- state.bufferlen = nil
- state.buffer = nil
- return concat (buffer)
- end
-end
-
-local function loc (str, where)
- local line, pos, linepos = 1, 1, 0
- while true do
- pos = strfind (str, "\n", pos, true)
- if pos and pos < where then
- line = line + 1
- linepos = pos
- pos = pos + 1
- else
- break
- end
- end
- return "line " .. line .. ", column " .. (where - linepos)
-end
-
-local function unterminated (str, what, where)
- return nil, strlen (str) + 1, "unterminated " .. what .. " at " .. loc (str, where)
-end
-
-local function scanwhite (str, pos)
- while true do
- pos = strfind (str, "%S", pos)
- if not pos then return nil end
- local sub2 = strsub (str, pos, pos + 1)
- if sub2 == "\239\187" and strsub (str, pos + 2, pos + 2) == "\191" then
- -- UTF-8 Byte Order Mark
- pos = pos + 3
- elseif sub2 == "//" then
- pos = strfind (str, "[\n\r]", pos + 2)
- if not pos then return nil end
- elseif sub2 == "/*" then
- pos = strfind (str, "*/", pos + 2)
- if not pos then return nil end
- pos = pos + 2
- else
- return pos
- end
- end
-end
-
-local escapechars = {
- ["\""] = "\"", ["\\"] = "\\", ["/"] = "/", ["b"] = "\b", ["f"] = "\f",
- ["n"] = "\n", ["r"] = "\r", ["t"] = "\t"
-}
-
-local function unichar (value)
- if value < 0 then
- return nil
- elseif value <= 0x007f then
- return strchar (value)
- elseif value <= 0x07ff then
- return strchar (0xc0 + floor(value/0x40),
- 0x80 + (floor(value) % 0x40))
- elseif value <= 0xffff then
- return strchar (0xe0 + floor(value/0x1000),
- 0x80 + (floor(value/0x40) % 0x40),
- 0x80 + (floor(value) % 0x40))
- elseif value <= 0x10ffff then
- return strchar (0xf0 + floor(value/0x40000),
- 0x80 + (floor(value/0x1000) % 0x40),
- 0x80 + (floor(value/0x40) % 0x40),
- 0x80 + (floor(value) % 0x40))
- else
- return nil
- end
-end
-
-local function scanstring (str, pos)
- local lastpos = pos + 1
- local buffer, n = {}, 0
- while true do
- local nextpos = strfind (str, "[\"\\]", lastpos)
- if not nextpos then
- return unterminated (str, "string", pos)
- end
- if nextpos > lastpos then
- n = n + 1
- buffer[n] = strsub (str, lastpos, nextpos - 1)
- end
- if strsub (str, nextpos, nextpos) == "\"" then
- lastpos = nextpos + 1
- break
- else
- local escchar = strsub (str, nextpos + 1, nextpos + 1)
- local value
- if escchar == "u" then
- value = tonumber (strsub (str, nextpos + 2, nextpos + 5), 16)
- if value then
- local value2
- if 0xD800 <= value and value <= 0xDBff then
- -- we have the high surrogate of UTF-16. Check if there is a
- -- low surrogate escaped nearby to combine them.
- if strsub (str, nextpos + 6, nextpos + 7) == "\\u" then
- value2 = tonumber (strsub (str, nextpos + 8, nextpos + 11), 16)
- if value2 and 0xDC00 <= value2 and value2 <= 0xDFFF then
- value = (value - 0xD800) * 0x400 + (value2 - 0xDC00) + 0x10000
- else
- value2 = nil -- in case it was out of range for a low surrogate
- end
- end
- end
- value = value and unichar (value)
- if value then
- if value2 then
- lastpos = nextpos + 12
- else
- lastpos = nextpos + 6
- end
- end
- end
- end
- if not value then
- value = escapechars[escchar] or escchar
- lastpos = nextpos + 2
- end
- n = n + 1
- buffer[n] = value
- end
- end
- if n == 1 then
- return buffer[1], lastpos
- elseif n > 1 then
- return concat (buffer), lastpos
- else
- return "", lastpos
- end
-end
-
-local scanvalue -- forward declaration
-
-local function scantable (what, closechar, str, startpos, nullval, objectmeta, arraymeta)
- local tbl, n = {}, 0
- local pos = startpos + 1
- if what == 'object' then
- setmetatable (tbl, objectmeta)
- else
- setmetatable (tbl, arraymeta)
- end
- while true do
- pos = scanwhite (str, pos)
- if not pos then return unterminated (str, what, startpos) end
- local char = strsub (str, pos, pos)
- if char == closechar then
- return tbl, pos + 1
- end
- local val1, err
- val1, pos, err = scanvalue (str, pos, nullval, objectmeta, arraymeta)
- if err then return nil, pos, err end
- pos = scanwhite (str, pos)
- if not pos then return unterminated (str, what, startpos) end
- char = strsub (str, pos, pos)
- if char == ":" then
- if val1 == nil then
- return nil, pos, "cannot use nil as table index (at " .. loc (str, pos) .. ")"
- end
- pos = scanwhite (str, pos + 1)
- if not pos then return unterminated (str, what, startpos) end
- local val2
- val2, pos, err = scanvalue (str, pos, nullval, objectmeta, arraymeta)
- if err then return nil, pos, err end
- tbl[val1] = val2
- pos = scanwhite (str, pos)
- if not pos then return unterminated (str, what, startpos) end
- char = strsub (str, pos, pos)
- else
- n = n + 1
- tbl[n] = val1
- end
- if char == "," then
- pos = pos + 1
- end
- end
-end
-
-scanvalue = function (str, pos, nullval, objectmeta, arraymeta)
- pos = pos or 1
- pos = scanwhite (str, pos)
- if not pos then
- return nil, strlen (str) + 1, "no valid JSON value (reached the end)"
- end
- local char = strsub (str, pos, pos)
- if char == "{" then
- return scantable ('object', "}", str, pos, nullval, objectmeta, arraymeta)
- elseif char == "[" then
- return scantable ('array', "]", str, pos, nullval, objectmeta, arraymeta)
- elseif char == "\"" then
- return scanstring (str, pos)
- else
- local pstart, pend = strfind (str, "^%-?[%d%.]+[eE]?[%+%-]?%d*", pos)
- if pstart then
- local number = str2num (strsub (str, pstart, pend))
- if number then
- return number, pend + 1
- end
- end
- pstart, pend = strfind (str, "^%a%w*", pos)
- if pstart then
- local name = strsub (str, pstart, pend)
- if name == "true" then
- return true, pend + 1
- elseif name == "false" then
- return false, pend + 1
- elseif name == "null" then
- return nullval, pend + 1
- end
- end
- return nil, pos, "no valid JSON value at " .. loc (str, pos)
- end
-end
-
-local function optionalmetatables(...)
- if select("#", ...) > 0 then
- return ...
- else
- return {__jsontype = 'object'}, {__jsontype = 'array'}
- end
-end
-
-function json.decode (str, pos, nullval, ...)
- local objectmeta, arraymeta = optionalmetatables(...)
- return scanvalue (str, pos, nullval, objectmeta, arraymeta)
-end
-
-function json.use_lpeg ()
- local g = require ("lpeg")
-
- if g.version() == "0.11" then
- error "due to a bug in LPeg 0.11, it cannot be used for JSON matching"
- end
-
- local pegmatch = g.match
- local P, S, R = g.P, g.S, g.R
-
- local function ErrorCall (str, pos, msg, state)
- if not state.msg then
- state.msg = msg .. " at " .. loc (str, pos)
- state.pos = pos
- end
- return false
- end
-
- local function Err (msg)
- return g.Cmt (g.Cc (msg) * g.Carg (2), ErrorCall)
- end
-
- local SingleLineComment = P"//" * (1 - S"\n\r")^0
- local MultiLineComment = P"/*" * (1 - P"*/")^0 * P"*/"
- local Space = (S" \n\r\t" + P"\239\187\191" + SingleLineComment + MultiLineComment)^0
-
- local PlainChar = 1 - S"\"\\\n\r"
- local EscapeSequence = (P"\\" * g.C (S"\"\\/bfnrt" + Err "unsupported escape sequence")) / escapechars
- local HexDigit = R("09", "af", "AF")
- local function UTF16Surrogate (match, pos, high, low)
- high, low = tonumber (high, 16), tonumber (low, 16)
- if 0xD800 <= high and high <= 0xDBff and 0xDC00 <= low and low <= 0xDFFF then
- return true, unichar ((high - 0xD800) * 0x400 + (low - 0xDC00) + 0x10000)
- else
- return false
- end
- end
- local function UTF16BMP (hex)
- return unichar (tonumber (hex, 16))
- end
- local U16Sequence = (P"\\u" * g.C (HexDigit * HexDigit * HexDigit * HexDigit))
- local UnicodeEscape = g.Cmt (U16Sequence * U16Sequence, UTF16Surrogate) + U16Sequence/UTF16BMP
- local Char = UnicodeEscape + EscapeSequence + PlainChar
- local String = P"\"" * g.Cs (Char ^ 0) * (P"\"" + Err "unterminated string")
- local Integer = P"-"^(-1) * (P"0" + (R"19" * R"09"^0))
- local Fractal = P"." * R"09"^0
- local Exponent = (S"eE") * (S"+-")^(-1) * R"09"^1
- local Number = (Integer * Fractal^(-1) * Exponent^(-1))/str2num
- local Constant = P"true" * g.Cc (true) + P"false" * g.Cc (false) + P"null" * g.Carg (1)
- local SimpleValue = Number + String + Constant
- local ArrayContent, ObjectContent
-
- -- The functions parsearray and parseobject parse only a single value/pair
- -- at a time and store them directly to avoid hitting the LPeg limits.
- local function parsearray (str, pos, nullval, state)
- local obj, cont
- local npos
- local t, nt = {}, 0
- repeat
- obj, cont, npos = pegmatch (ArrayContent, str, pos, nullval, state)
- if not npos then break end
- pos = npos
- nt = nt + 1
- t[nt] = obj
- until cont == 'last'
- return pos, setmetatable (t, state.arraymeta)
- end
-
- local function parseobject (str, pos, nullval, state)
- local obj, key, cont
- local npos
- local t = {}
- repeat
- key, obj, cont, npos = pegmatch (ObjectContent, str, pos, nullval, state)
- if not npos then break end
- pos = npos
- t[key] = obj
- until cont == 'last'
- return pos, setmetatable (t, state.objectmeta)
- end
-
- local Array = P"[" * g.Cmt (g.Carg(1) * g.Carg(2), parsearray) * Space * (P"]" + Err "']' expected")
- local Object = P"{" * g.Cmt (g.Carg(1) * g.Carg(2), parseobject) * Space * (P"}" + Err "'}' expected")
- local Value = Space * (Array + Object + SimpleValue)
- local ExpectedValue = Value + Space * Err "value expected"
- ArrayContent = Value * Space * (P"," * g.Cc'cont' + g.Cc'last') * g.Cp()
- local Pair = g.Cg (Space * String * Space * (P":" + Err "colon expected") * ExpectedValue)
- ObjectContent = Pair * Space * (P"," * g.Cc'cont' + g.Cc'last') * g.Cp()
- local DecodeValue = ExpectedValue * g.Cp ()
-
- function json.decode (str, pos, nullval, ...)
- local state = {}
- state.objectmeta, state.arraymeta = optionalmetatables(...)
- local obj, retpos = pegmatch (DecodeValue, str, pos, nullval, state)
- if state.msg then
- return nil, state.pos, state.msg
- else
- return obj, retpos
- end
- end
-
- -- use this function only once:
- json.use_lpeg = function () return json end
-
- json.using_lpeg = true
-
- return json -- so you can get the module using json = require "dkjson".use_lpeg()
-end
-
-if always_try_using_lpeg then
- pcall (json.use_lpeg)
-end
-
-json.parse = json.decode
-json.stringify = json.encode
-
-return exports
diff --git a/plugins/json/plugin.json b/plugins/json/plugin.json
deleted file mode 100644
index c5a0c77355d..00000000000
--- a/plugins/json/plugin.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "plugin": {
- "name": "json",
- "version": "2.5.0",
- "author": "David Kolf",
- "type": "library",
- }
-} \ No newline at end of file
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/jedutil/baseline/ampal18p8/pal10h8-as-ampal18p8.txt b/regtests/jedutil/baseline/ampal18p8/pal10h8-as-ampal18p8.txt
deleted file mode 100644
index 5b8dae63d99..00000000000
--- a/regtests/jedutil/baseline/ampal18p8/pal10h8-as-ampal18p8.txt
+++ /dev/null
@@ -1,97 +0,0 @@
-Inputs:
-
-1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19
-
-Outputs:
-
-12 (Combinatorial, Output feedback output, Active high)
-13 (Combinatorial, Output feedback output, Active high)
-14 (Combinatorial, Output feedback output, Active high)
-15 (Combinatorial, Output feedback output, Active high)
-16 (Combinatorial, Output feedback output, Active high)
-17 (Combinatorial, Output feedback output, Active high)
-18 (Combinatorial, Output feedback output, Active high)
-19 (Combinatorial, Output feedback output, Active high)
-
-Equations:
-
-o12 = i2 +
- i1 & i3 +
- i4 & /i11 +
- i5 +
- i6 +
- /i1 & i7 +
- i8 +
- i9 & i11
-o12.oe = vcc
-
-o13 = /i2 +
- /i4 +
- /i3 & /i6 +
- /i8 +
- /i11 +
- /i9 +
- /i1 & /i7 +
- /i5
-o13.oe = vcc
-
-o14 = i4 +
- /i8 & i11 +
- /i6 +
- /i2 +
- i5 & /i11 +
- i7 +
- /i3 & /i9 +
- /i1
-o14.oe = vcc
-
-o15 = i5 +
- /i1 +
- i1 & i7 +
- /i3 +
- i1 & /i3 +
- i2 & i9 +
- /i8 +
- i4
-o15.oe = vcc
-
-o16 = i6 +
- i3 & i11 +
- i6 & i8 +
- /i1 +
- /i8 +
- /i7 & /i8 +
- /i2 & /i9 +
- /i5 & i7 & i8
-o16.oe = vcc
-
-o17 = i7 +
- i2 & i9 +
- i3 & i4 +
- /i5 +
- /i9 +
- /i8 +
- /i1 & /i11 +
- i6 & i9
-o17.oe = vcc
-
-o18 = /i1 +
- /i3 +
- /i5 +
- /i7 +
- /i9 +
- /i11 +
- i1 & i7 & i11 +
- i3 & i5 & i9
-o18.oe = vcc
-
-o19 = i3 & i11 +
- i1 +
- /i1 & /i9 +
- /i3 & /i5 & /i7 +
- i2 +
- i4 +
- i6 +
- i8
-o19.oe = vcc
-
diff --git a/regtests/jedutil/baseline/ampal18p8/pal10l8-as-ampal18p8.txt b/regtests/jedutil/baseline/ampal18p8/pal10l8-as-ampal18p8.txt
deleted file mode 100644
index 78a3cef7b0d..00000000000
--- a/regtests/jedutil/baseline/ampal18p8/pal10l8-as-ampal18p8.txt
+++ /dev/null
@@ -1,97 +0,0 @@
-Inputs:
-
-1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19
-
-Outputs:
-
-12 (Combinatorial, Output feedback output, Active low)
-13 (Combinatorial, Output feedback output, Active low)
-14 (Combinatorial, Output feedback output, Active low)
-15 (Combinatorial, Output feedback output, Active low)
-16 (Combinatorial, Output feedback output, Active low)
-17 (Combinatorial, Output feedback output, Active low)
-18 (Combinatorial, Output feedback output, Active low)
-19 (Combinatorial, Output feedback output, Active low)
-
-Equations:
-
-/o12 = /i1 & i7 +
- i8 +
- i9 & i11 +
- i2 +
- i1 & i3 +
- i5 +
- i4 & /i11 +
- i6
-o12.oe = vcc
-
-/o13 = /i8 +
- /i11 +
- /i9 +
- /i3 & /i6 +
- /i1 & /i7 +
- /i2 +
- /i4 +
- /i5
-o13.oe = vcc
-
-/o14 = /i3 & /i9 +
- /i6 +
- /i2 +
- i4 +
- /i8 & i11 +
- i7 +
- i5 & /i11 +
- /i1
-o14.oe = vcc
-
-/o15 = i4 +
- i1 & /i3 +
- i2 & i9 +
- i5 +
- i1 & i7 +
- /i3 +
- /i8 +
- /i1
-o15.oe = vcc
-
-/o16 = i6 +
- /i2 & /i9 +
- i3 & i11 +
- /i8 +
- i6 & i8 +
- /i1 +
- /i5 & i7 & i8 +
- /i7 & /i8
-o16.oe = vcc
-
-/o17 = i3 & i4 +
- /i5 +
- /i9 +
- /i1 & /i11 +
- i7 +
- i2 & i9 +
- i6 & i9 +
- /i8
-o17.oe = vcc
-
-/o18 = /i9 +
- i3 & i5 & i9 +
- /i7 +
- /i11 +
- /i1 +
- /i3 +
- /i5 +
- i1 & i7 & i11
-o18.oe = vcc
-
-/o19 = /i3 & /i5 & /i7 +
- i2 +
- i8 +
- i3 & i11 +
- i1 +
- i4 +
- i6 +
- /i1 & /i9
-o19.oe = vcc
-
diff --git a/regtests/jedutil/baseline/ampal18p8/pal12h6-as-ampal18p8.txt b/regtests/jedutil/baseline/ampal18p8/pal12h6-as-ampal18p8.txt
deleted file mode 100644
index 4f70393f5b5..00000000000
--- a/regtests/jedutil/baseline/ampal18p8/pal12h6-as-ampal18p8.txt
+++ /dev/null
@@ -1,75 +0,0 @@
-Inputs:
-
-1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19
-
-Outputs:
-
-13 (Combinatorial, Output feedback output, Active high)
-14 (Combinatorial, Output feedback output, Active high)
-15 (Combinatorial, Output feedback output, Active high)
-16 (Combinatorial, Output feedback output, Active high)
-17 (Combinatorial, Output feedback output, Active high)
-18 (Combinatorial, Output feedback output, Active high)
-
-Equations:
-
-o13 = /i2 +
- /i4 +
- /i3 & /i6 +
- /i8 +
- /i11 +
- /i9 +
- /i1 & /i7 +
- /i5
-o13.oe = vcc
-
-o14 = i4 +
- /i8 & i11 +
- /i6 +
- /i2 +
- i5 & /i11 +
- i7 +
- /i3 & /i9 +
- /i1 & /i12
-o14.oe = vcc
-
-o15 = i5 & i19 +
- /i1 +
- i1 & i7 +
- /i3 +
- i1 & /i3 +
- i2 & i9 +
- /i8 +
- i4
-o15.oe = vcc
-
-o16 = i6 +
- i3 & i11 +
- i6 & i8 +
- /i1 +
- /i8 +
- /i7 & /i8 +
- /i2 & /i9 +
- /i5 & i7 & i8
-o16.oe = vcc
-
-o17 = i7 & i12 +
- i2 & i9 +
- i3 & i4 +
- /i5 +
- /i9 +
- /i8 +
- /i1 & /i11 +
- i6 & i9
-o17.oe = vcc
-
-o18 = /i1 +
- /i3 +
- /i5 +
- /i7 +
- /i9 & /i19 +
- /i11 +
- i1 & i7 & i11 +
- i3 & i5 & i9
-o18.oe = vcc
-
diff --git a/regtests/jedutil/baseline/ampal18p8/pal12l6-as-ampal18p8.txt b/regtests/jedutil/baseline/ampal18p8/pal12l6-as-ampal18p8.txt
deleted file mode 100644
index 31e39086292..00000000000
--- a/regtests/jedutil/baseline/ampal18p8/pal12l6-as-ampal18p8.txt
+++ /dev/null
@@ -1,75 +0,0 @@
-Inputs:
-
-1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19
-
-Outputs:
-
-13 (Combinatorial, Output feedback output, Active low)
-14 (Combinatorial, Output feedback output, Active low)
-15 (Combinatorial, Output feedback output, Active low)
-16 (Combinatorial, Output feedback output, Active low)
-17 (Combinatorial, Output feedback output, Active low)
-18 (Combinatorial, Output feedback output, Active low)
-
-Equations:
-
-/o13 = /i8 +
- /i11 +
- /i9 +
- /i3 & /i6 +
- /i1 & /i7 +
- /i2 +
- /i4 & /i12 +
- /i5
-o13.oe = vcc
-
-/o14 = /i3 & /i9 & i19 +
- /i6 +
- /i2 +
- i4 +
- /i8 & i11 +
- i7 +
- i5 & /i11 +
- /i1
-o14.oe = vcc
-
-/o15 = i4 +
- i1 & /i3 +
- i2 & i9 +
- i5 +
- i1 & i7 +
- /i3 +
- /i8 +
- /i1
-o15.oe = vcc
-
-/o16 = i6 +
- /i2 & /i9 +
- i3 & i11 +
- /i8 +
- i6 & i8 +
- /i1 +
- /i5 & i7 & i8 +
- /i7 & /i8 & i12
-o16.oe = vcc
-
-/o17 = i3 & i4 +
- /i5 +
- /i9 +
- /i1 & /i11 +
- i7 +
- i2 & i9 & /i19 +
- i6 & i9 +
- /i8
-o17.oe = vcc
-
-/o18 = /i9 +
- i3 & i5 & i9 +
- /i7 +
- /i11 +
- /i1 +
- /i3 +
- /i5 +
- i1 & i7 & i11
-o18.oe = vcc
-
diff --git a/regtests/jedutil/baseline/ampal18p8/pal14h4-as-ampal18p8.txt b/regtests/jedutil/baseline/ampal18p8/pal14h4-as-ampal18p8.txt
deleted file mode 100644
index 4c7f55a1dba..00000000000
--- a/regtests/jedutil/baseline/ampal18p8/pal14h4-as-ampal18p8.txt
+++ /dev/null
@@ -1,53 +0,0 @@
-Inputs:
-
-1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19
-
-Outputs:
-
-14 (Combinatorial, Output feedback output, Active high)
-15 (Combinatorial, Output feedback output, Active high)
-16 (Combinatorial, Output feedback output, Active high)
-17 (Combinatorial, Output feedback output, Active high)
-
-Equations:
-
-o14 = i4 +
- /i8 & i11 +
- /i12 +
- /i2 +
- i5 & /i11 +
- i7 & i12 +
- /i3 & /i9 +
- /i1
-o14.oe = vcc
-
-o15 = i5 +
- /i13 +
- i1 & i7 +
- /i3 +
- /i3 & i13 +
- i2 & i9 +
- /i8 +
- i4
-o15.oe = vcc
-
-o16 = i6 +
- i3 & i11 +
- i6 & i18 +
- /i1 +
- /i18 +
- /i7 & /i8 +
- /i2 & /i9 +
- /i5 & i7 & i8
-o16.oe = vcc
-
-o17 = i7 +
- i2 & i19 +
- i3 & i4 +
- /i5 +
- /i9 +
- /i19 +
- /i1 & /i11 +
- i6 & i9
-o17.oe = vcc
-
diff --git a/regtests/jedutil/baseline/ampal18p8/pal14l4-as-ampal18p8.txt b/regtests/jedutil/baseline/ampal18p8/pal14l4-as-ampal18p8.txt
deleted file mode 100644
index 967c5f1702d..00000000000
--- a/regtests/jedutil/baseline/ampal18p8/pal14l4-as-ampal18p8.txt
+++ /dev/null
@@ -1,53 +0,0 @@
-Inputs:
-
-1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19
-
-Outputs:
-
-14 (Combinatorial, Output feedback output, Active low)
-15 (Combinatorial, Output feedback output, Active low)
-16 (Combinatorial, Output feedback output, Active low)
-17 (Combinatorial, Output feedback output, Active low)
-
-Equations:
-
-/o14 = /i8 & i11 +
- i4 +
- /i12 +
- i5 & /i11 +
- i1 +
- i7 & i12 +
- /i3 & /i9 +
- /i2
-o14.oe = vcc
-
-/o15 = i1 & i7 +
- /i8 +
- i5 +
- /i13 +
- /i3 +
- i2 & i9 +
- i4 +
- /i3 & i13
-o15.oe = vcc
-
-/o16 = /i18 +
- i3 & i11 +
- i6 +
- i6 & i18 +
- /i1 +
- /i5 & i7 & i8 +
- /i2 & /i9 +
- /i7 & /i8
-o16.oe = vcc
-
-/o17 = i2 & i19 +
- /i9 +
- /i19 +
- i3 & i4 +
- i6 & i9 +
- /i5 +
- /i1 & /i11 +
- i7
-o17.oe = vcc
-
diff --git a/regtests/jedutil/baseline/ampal18p8/pal16h2-as-ampal18p8.txt b/regtests/jedutil/baseline/ampal18p8/pal16h2-as-ampal18p8.txt
deleted file mode 100644
index 358dc093584..00000000000
--- a/regtests/jedutil/baseline/ampal18p8/pal16h2-as-ampal18p8.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-Inputs:
-
-1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19
-
-Outputs:
-
-15 (Combinatorial, Output feedback output, Active high)
-16 (Combinatorial, Output feedback output, Active high)
-
-Equations:
-
-o15 = i5 +
- /i13 & /i14 +
- i1 & i7 +
- /i3 & i14 +
- /i3 & i13 +
- i2 & i9 +
- /i8 +
- i4
-o15.oe = vcc
-
-o16 = i6 +
- i3 & i11 +
- i6 & i18 +
- /i1 & /i17 +
- /i18 +
- /i7 & /i8 +
- /i2 & /i9 +
- /i5 & i7 & i8 & i17
-o16.oe = vcc
-
diff --git a/regtests/jedutil/baseline/ampal18p8/pal16l2-as-ampal18p8.txt b/regtests/jedutil/baseline/ampal18p8/pal16l2-as-ampal18p8.txt
deleted file mode 100644
index 615dda7cdb6..00000000000
--- a/regtests/jedutil/baseline/ampal18p8/pal16l2-as-ampal18p8.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-Inputs:
-
-1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19
-
-Outputs:
-
-15 (Combinatorial, Output feedback output, Active low)
-16 (Combinatorial, Output feedback output, Active low)
-
-Equations:
-
-/o15 = i5 & /i11 +
- /i3 & i14 +
- /i3 & i13 +
- /i13 & /i14 +
- i1 & i7 & i12 +
- /i8 & i18 +
- i2 & i9 +
- i4 & i17 & /i19
-o15.oe = vcc
-
-/o16 = /i2 & /i9 & i19 +
- i3 & i11 & /i18 +
- /i5 & i7 & i8 & i17 +
- i6 & i18 +
- /i1 & i14 & /i17 +
- i13 & /i18 +
- /i7 & /i8 & /i12 +
- i6
-o16.oe = vcc
-
diff --git a/regtests/jedutil/baseline/ampal18p8/pal16l8-as-ampal18p8.txt b/regtests/jedutil/baseline/ampal18p8/pal16l8-as-ampal18p8.txt
deleted file mode 100644
index 5608bdc0ccc..00000000000
--- a/regtests/jedutil/baseline/ampal18p8/pal16l8-as-ampal18p8.txt
+++ /dev/null
@@ -1,89 +0,0 @@
-Inputs:
-
-1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19
-
-Outputs:
-
-12 (Combinatorial, Output feedback output, Active high)
-13 (Combinatorial, Output feedback output, Active low)
-14 (Combinatorial, Output feedback output, Active low)
-15 (Combinatorial, Output feedback output, Active low)
-16 (Combinatorial, Output feedback output, Active low)
-17 (Combinatorial, Output feedback output, Active low)
-18 (Combinatorial, Output feedback output, Active high)
-19 (Combinatorial, Output feedback output, Active high)
-
-Equations:
-
-o12 = i1 & /i2 +
- /i1 & i3 +
- /i3 & i7 +
- i4 & o13 +
- i6 & /o13 +
- i6 & /i7 +
- /i6 & /i8 & /i9
-o12.oe = /i5
-
-/o13 = i3 +
- o14 +
- /i11 +
- i2 +
- /i4 & /o14 +
- i8 & i9 +
- i5
-o13.oe = vcc
-
-/o14 = i4 +
- /i8 & i11 +
- o15 +
- /i2 +
- i5 & /i11 +
- i7 +
- /i3 & /i9
-o14.oe = i1
-
-/o15 = i5 +
- /o16 +
- i1 & i7 +
- /i3 +
- /i3 & o16 +
- i2 & i9 +
- /i8
-o15.oe = vcc
-
-/o16 = i6 +
- i3 & i11 +
- i6 & o17 +
- /i1 +
- /o17 +
- /i7 & /i8 +
- /i2 & /i9
-o16.oe = /i11
-
-/o17 = i7 +
- i2 & o18 +
- i3 & i4 +
- /i5 +
- /i9 +
- /o18 +
- /i1 & /i11
-o17.oe = vcc
-
-o18 = i3 +
- i8 +
- i9 & i11 +
- i1 +
- /i4 +
- i2 +
- i5 & /i7
-o18.oe = vcc
-
-o19 = o18 +
- o17 +
- o16 +
- o15 +
- o14 +
- o13 +
- /o13 & /o14 & /o15 & /o16 & /o17 & /o18
-o19.oe = i3
-
diff --git a/regtests/jedutil/eqns/PALASM/ampal18p8/pal10h8-as-ampal18p8.pds b/regtests/jedutil/eqns/PALASM/ampal18p8/pal10h8-as-ampal18p8.pds
deleted file mode 100644
index 3cf9c714392..00000000000
--- a/regtests/jedutil/eqns/PALASM/ampal18p8/pal10h8-as-ampal18p8.pds
+++ /dev/null
@@ -1,119 +0,0 @@
-;PALASM Design Description
-
-;---------------------------------- Declaration Segment ------------
-TITLE PAL10H8 Test
-PATTERN A
-REVISION 1.0
-AUTHOR MAMEDev
-COMPANY MAMEDev
-DATE 08/25/13
-
-CHIP PAL10H8Test PAL18P8
-
-SIGNATURE #b0010011001100110011001100110011001100110011001100110011001100100
-
-;---------------------------------- PIN Declarations ---------------
-PIN 1 I1 COMBINATORIAL ;
-PIN 2 I2 COMBINATORIAL ;
-PIN 3 I3 COMBINATORIAL ;
-PIN 4 I4 COMBINATORIAL ;
-PIN 5 I5 COMBINATORIAL ;
-PIN 6 I6 COMBINATORIAL ;
-PIN 7 I7 COMBINATORIAL ;
-PIN 8 I8 COMBINATORIAL ;
-PIN 9 I9 COMBINATORIAL ;
-PIN 10 GND ;
-PIN 11 I11 COMBINATORIAL ;
-PIN 12 O12 COMBINATORIAL ;
-PIN 13 O13 COMBINATORIAL ;
-PIN 14 O14 COMBINATORIAL ;
-PIN 15 O15 COMBINATORIAL ;
-PIN 16 O16 COMBINATORIAL ;
-PIN 17 O17 COMBINATORIAL ;
-PIN 18 O18 COMBINATORIAL ;
-PIN 19 O19 COMBINATORIAL ;
-PIN 20 VCC ;
-
-;----------------------------------- Boolean Equation Segment ------
-EQUATIONS
-
-MINIMIZE_OFF
-
-O12 = I2 +
- I1 * I3 +
- I4 * /I11 +
- I5 +
- I6 +
- /I1 * I7 +
- I8 +
- I9 * I11
-
-O13 = /I2 +
- /I4 +
- /I3 * /I6 +
- /I8 +
- /I11 +
- /I9 +
- /I1 * /I7 +
- /I5
-
-O14 = I4 +
- /I8 * I11 +
- /I6 +
- /I2 +
- I5 * /I11 +
- I7 +
- /I3 * /I9 +
- /I1
-
-O15 = I5 +
- /I1 +
- I1 * I7 +
- /I3 +
- I1 * /I3 +
- I2 * I9 +
- /I8 +
- I4
-
-O16 = I6 +
- I3 * I11 +
- I6 * I8 +
- /I1 +
- /I8 +
- /I7 * /I8 +
- /I2 * /I9 +
- /i5 * I7 * I8
-
-O17 = I7 +
- I2 * I9 +
- I3 * I4 +
- /I5 +
- /I9 +
- /I8 +
- /I1 * /I11 +
- I6 * I9
-
-O18 = /I1 +
- /I3 +
- /I5 +
- /I7 +
- /I9 +
- /I11 +
- I1 * I7 * I11 +
- I3 * I5 * I9
-
-O19 = I3 * I11 +
- I1 +
- /I1 * /I9 +
- /I3 * /I5 * /I7 +
- I2 +
- I4 +
- I6 +
- I8
-
-MINIMIZE_ON
-
-;----------------------------------- Simulation Segment ------------
-SIMULATION
-
-;-------------------------------------------------------------------
diff --git a/regtests/jedutil/eqns/PALASM/ampal18p8/pal10l8-as-ampal18p8.pds b/regtests/jedutil/eqns/PALASM/ampal18p8/pal10l8-as-ampal18p8.pds
deleted file mode 100644
index 4841fd124fe..00000000000
--- a/regtests/jedutil/eqns/PALASM/ampal18p8/pal10l8-as-ampal18p8.pds
+++ /dev/null
@@ -1,119 +0,0 @@
-;PALASM Design Description
-
-;---------------------------------- Declaration Segment ------------
-TITLE PAL10L8 Test
-PATTERN A
-REVISION 1.0
-AUTHOR MAMEDev
-COMPANY MAMEDev
-DATE 08/25/13
-
-CHIP PAL10L8Test PAL18P8
-
-SIGNATURE #b0010011001100110011001100110011001100110011001100110011001100100
-
-;---------------------------------- PIN Declarations ---------------
-PIN 1 I1 COMBINATORIAL ;
-PIN 2 I2 COMBINATORIAL ;
-PIN 3 I3 COMBINATORIAL ;
-PIN 4 I4 COMBINATORIAL ;
-PIN 5 I5 COMBINATORIAL ;
-PIN 6 I6 COMBINATORIAL ;
-PIN 7 I7 COMBINATORIAL ;
-PIN 8 I8 COMBINATORIAL ;
-PIN 9 I9 COMBINATORIAL ;
-PIN 10 GND ;
-PIN 11 I11 COMBINATORIAL ;
-PIN 12 O12 COMBINATORIAL ;
-PIN 13 O13 COMBINATORIAL ;
-PIN 14 O14 COMBINATORIAL ;
-PIN 15 O15 COMBINATORIAL ;
-PIN 16 O16 COMBINATORIAL ;
-PIN 17 O17 COMBINATORIAL ;
-PIN 18 O18 COMBINATORIAL ;
-PIN 19 O19 COMBINATORIAL ;
-PIN 20 VCC ;
-
-;----------------------------------- Boolean Equation Segment ------
-EQUATIONS
-
-MINIMIZE_OFF
-
-/O12 = /I1 * I7 +
- I8 +
- I9 * I11 +
- I2 +
- I1 * I3 +
- I5 +
- I4 * /I11 +
- I6
-
-/O13 = /I8 +
- /I11 +
- /I9 +
- /I3 * /I6 +
- /I1 * /I7 +
- /I2 +
- /I4 +
- /I5
-
-/O14 = /I3 * /I9 +
- /I6 +
- /I2 +
- I4 +
- /I8 * I11 +
- I7 +
- I5 * /I11 +
- /I1
-
-/O15 = I4 +
- I1 * /I3 +
- I2 * I9 +
- I5 +
- I1 * I7 +
- /I3 +
- /I8 +
- /I1
-
-/O16 = I6 +
- /I2 * /I9 +
- I3 * I11 +
- /I8 +
- I6 * I8 +
- /I1 +
- /i5 * I7 * I8 +
- /I7 * /I8
-
-/O17 = I3 * I4 +
- /I5 +
- /I9 +
- /I1 * /I11 +
- I7 +
- I2 * I9 +
- I6 * I9 +
- /I8
-
-/O18 = /I9 +
- I3 * I5 * I9 +
- /I7 +
- /I11 +
- /I1 +
- /I3 +
- /I5 +
- I1 * I7 * I11
-
-/O19 = /I3 * /I5 * /I7 +
- I2 +
- I8 +
- I3 * I11 +
- I1 +
- I4 +
- I6 +
- /I1 * /I9
-
-MINIMIZE_ON
-
-;----------------------------------- Simulation Segment ------------
-SIMULATION
-
-;-------------------------------------------------------------------
diff --git a/regtests/jedutil/eqns/PALASM/ampal18p8/pal12h6-as-ampal18p8.pds b/regtests/jedutil/eqns/PALASM/ampal18p8/pal12h6-as-ampal18p8.pds
deleted file mode 100644
index ebe77ff8db4..00000000000
--- a/regtests/jedutil/eqns/PALASM/ampal18p8/pal12h6-as-ampal18p8.pds
+++ /dev/null
@@ -1,101 +0,0 @@
-;PALASM Design Description
-
-;---------------------------------- Declaration Segment ------------
-TITLE PAL12H6 Test
-PATTERN A
-REVISION 1.0
-AUTHOR MAMEDev
-COMPANY MAMEDev
-DATE 08/25/13
-
-CHIP PAL12H6Test PAL18P8
-
-SIGNATURE #b0010011001100110011001100110011001100110011001100110011001100100
-
-;---------------------------------- PIN Declarations ---------------
-PIN 1 I1 COMBINATORIAL ;
-PIN 2 I2 COMBINATORIAL ;
-PIN 3 I3 COMBINATORIAL ;
-PIN 4 I4 COMBINATORIAL ;
-PIN 5 I5 COMBINATORIAL ;
-PIN 6 I6 COMBINATORIAL ;
-PIN 7 I7 COMBINATORIAL ;
-PIN 8 I8 COMBINATORIAL ;
-PIN 9 I9 COMBINATORIAL ;
-PIN 10 GND ;
-PIN 11 I11 COMBINATORIAL ;
-PIN 12 I12 COMBINATORIAL ;
-PIN 13 O13 COMBINATORIAL ;
-PIN 14 O14 COMBINATORIAL ;
-PIN 15 O15 COMBINATORIAL ;
-PIN 16 O16 COMBINATORIAL ;
-PIN 17 O17 COMBINATORIAL ;
-PIN 18 O18 COMBINATORIAL ;
-PIN 19 I19 COMBINATORIAL ;
-PIN 20 VCC ;
-
-;----------------------------------- Boolean Equation Segment ------
-EQUATIONS
-
-MINIMIZE_OFF
-
-O13 = /I2 +
- /I4 +
- /I3 * /I6 +
- /I8 +
- /I11 +
- /I9 +
- /I1 * /I7 +
- /I5
-
-O14 = I4 +
- /I8 * I11 +
- /I6 +
- /I2 +
- I5 * /I11 +
- I7 +
- /I3 * /I9 +
- /I1 * /I12
-
-O15 = I5 * I19 +
- /I1 +
- I1 * I7 +
- /I3 +
- I1 * /I3 +
- I2 * I9 +
- /I8 +
- I4
-
-O16 = I6 +
- I3 * I11 +
- I6 * I8 +
- /I1 +
- /I8 +
- /I7 * /I8 +
- /I2 * /I9 +
- /i5 * I7 * I8
-
-O17 = I7 * I12 +
- I2 * I9 +
- I3 * I4 +
- /I5 +
- /I9 +
- /I8 +
- /I1 * /I11 +
- I6 * I9
-
-O18 = /I1 +
- /I3 +
- /I5 +
- /I7 +
- /I9 * /I19 +
- /I11 +
- I1 * I7 * I11 +
- I3 * I5 * I9
-
-MINIMIZE_ON
-
-;----------------------------------- Simulation Segment ------------
-SIMULATION
-
-;-------------------------------------------------------------------
diff --git a/regtests/jedutil/eqns/PALASM/ampal18p8/pal12l6-as-ampal18p8.pds b/regtests/jedutil/eqns/PALASM/ampal18p8/pal12l6-as-ampal18p8.pds
deleted file mode 100644
index 3568dd79538..00000000000
--- a/regtests/jedutil/eqns/PALASM/ampal18p8/pal12l6-as-ampal18p8.pds
+++ /dev/null
@@ -1,101 +0,0 @@
-;PALASM Design Description
-
-;---------------------------------- Declaration Segment ------------
-TITLE PAL12L6 Test
-PATTERN A
-REVISION 1.0
-AUTHOR MAMEDev
-COMPANY MAMEDev
-DATE 08/25/13
-
-CHIP PAL12L6Test PAL18P8
-
-SIGNATURE #b0010011001100110011001100110011001100110011001100110011001100100
-
-;---------------------------------- PIN Declarations ---------------
-PIN 1 I1 COMBINATORIAL ;
-PIN 2 I2 COMBINATORIAL ;
-PIN 3 I3 COMBINATORIAL ;
-PIN 4 I4 COMBINATORIAL ;
-PIN 5 I5 COMBINATORIAL ;
-PIN 6 I6 COMBINATORIAL ;
-PIN 7 I7 COMBINATORIAL ;
-PIN 8 I8 COMBINATORIAL ;
-PIN 9 I9 COMBINATORIAL ;
-PIN 10 GND ;
-PIN 11 I11 COMBINATORIAL ;
-PIN 12 I12 COMBINATORIAL ;
-PIN 13 O13 COMBINATORIAL ;
-PIN 14 O14 COMBINATORIAL ;
-PIN 15 O15 COMBINATORIAL ;
-PIN 16 O16 COMBINATORIAL ;
-PIN 17 O17 COMBINATORIAL ;
-PIN 18 O18 COMBINATORIAL ;
-PIN 19 I19 COMBINATORIAL ;
-PIN 20 VCC ;
-
-;----------------------------------- Boolean Equation Segment ------
-EQUATIONS
-
-MINIMIZE_OFF
-
-/O13 = /I8 +
- /I11 +
- /I9 +
- /I3 * /I6 +
- /I1 * /I7 +
- /I2 +
- /I4 * /I12 +
- /I5
-
-/O14 = /I3 * /I9 * I19 +
- /I6 +
- /I2 +
- I4 +
- /I8 * I11 +
- I7 +
- I5 * /I11 +
- /I1
-
-/O15 = I4 +
- I1 * /I3 +
- I2 * I9 +
- I5 +
- I1 * I7 +
- /I3 +
- /I8 +
- /I1
-
-/O16 = I6 +
- /I2 * /I9 +
- I3 * I11 +
- /I8 +
- I6 * I8 +
- /I1 +
- /i5 * I7 * I8 +
- /I7 * /I8 * I12
-
-/O17 = I3 * I4 +
- /I5 +
- /I9 +
- /I1 * /I11 +
- I7 +
- I2 * I9 * /I19 +
- I6 * I9 +
- /I8
-
-/O18 = /I9 +
- I3 * I5 * I9 +
- /I7 +
- /I11 +
- /I1 +
- /I3 +
- /I5 +
- I1 * I7 * I11
-
-MINIMIZE_ON
-
-;----------------------------------- Simulation Segment ------------
-SIMULATION
-
-;-------------------------------------------------------------------
diff --git a/regtests/jedutil/eqns/PALASM/ampal18p8/pal14h4-as-ampal18p8.pds b/regtests/jedutil/eqns/PALASM/ampal18p8/pal14h4-as-ampal18p8.pds
deleted file mode 100644
index 1da96c947de..00000000000
--- a/regtests/jedutil/eqns/PALASM/ampal18p8/pal14h4-as-ampal18p8.pds
+++ /dev/null
@@ -1,83 +0,0 @@
-;PALASM Design Description
-
-;---------------------------------- Declaration Segment ------------
-TITLE PAL14H4 Test
-PATTERN A
-REVISION 1.0
-AUTHOR MAMEDev
-COMPANY MAMEDev
-DATE 08/25/13
-
-CHIP PAL14H4Test PAL18P8
-
-SIGNATURE #b0010011001100110011001100110011001100110011001100110011001100100
-
-;---------------------------------- PIN Declarations ---------------
-PIN 1 I1 COMBINATORIAL ;
-PIN 2 I2 COMBINATORIAL ;
-PIN 3 I3 COMBINATORIAL ;
-PIN 4 I4 COMBINATORIAL ;
-PIN 5 I5 COMBINATORIAL ;
-PIN 6 I6 COMBINATORIAL ;
-PIN 7 I7 COMBINATORIAL ;
-PIN 8 I8 COMBINATORIAL ;
-PIN 9 I9 COMBINATORIAL ;
-PIN 10 GND ;
-PIN 11 I11 COMBINATORIAL ;
-PIN 12 I12 COMBINATORIAL ;
-PIN 13 I13 COMBINATORIAL ;
-PIN 14 O14 COMBINATORIAL ;
-PIN 15 O15 COMBINATORIAL ;
-PIN 16 O16 COMBINATORIAL ;
-PIN 17 O17 COMBINATORIAL ;
-PIN 18 I18 COMBINATORIAL ;
-PIN 19 I19 COMBINATORIAL ;
-PIN 20 VCC ;
-
-;----------------------------------- Boolean Equation Segment ------
-EQUATIONS
-
-MINIMIZE_OFF
-
-O14 = I4 +
- /I8 * I11 +
- /I12 +
- /I2 +
- I5 * /I11 +
- I7 * I12 +
- /I3 * /I9 +
- /I1
-
-O15 = I5 +
- /I13 +
- I1 * I7 +
- /I3 +
- /I3 * I13 +
- I2 * I9 +
- /I8 +
- I4
-
-O16 = I6 +
- I3 * I11 +
- I6 * I18 +
- /I1 +
- /I18 +
- /I7 * /I8 +
- /I2 * /I9 +
- /i5 * I7 * I8
-
-O17 = I7 +
- I2 * I19 +
- I3 * I4 +
- /I5 +
- /I9 +
- /I19 +
- /I1 * /I11 +
- I6 * I9
-
-MINIMIZE_ON
-
-;----------------------------------- Simulation Segment ------------
-SIMULATION
-
-;-------------------------------------------------------------------
diff --git a/regtests/jedutil/eqns/PALASM/ampal18p8/pal14l4-as-ampal18p8.pds b/regtests/jedutil/eqns/PALASM/ampal18p8/pal14l4-as-ampal18p8.pds
deleted file mode 100644
index a2857768646..00000000000
--- a/regtests/jedutil/eqns/PALASM/ampal18p8/pal14l4-as-ampal18p8.pds
+++ /dev/null
@@ -1,83 +0,0 @@
-;PALASM Design Description
-
-;---------------------------------- Declaration Segment ------------
-TITLE PAL14L4 Test
-PATTERN A
-REVISION 1.0
-AUTHOR MAMEDev
-COMPANY MAMEDev
-DATE 08/25/13
-
-CHIP PAL14L4Test PAL18P8
-
-SIGNATURE #b0010011001100110011001100110011001100110011001100110011001100100
-
-;---------------------------------- PIN Declarations ---------------
-PIN 1 I1 COMBINATORIAL ;
-PIN 2 I2 COMBINATORIAL ;
-PIN 3 I3 COMBINATORIAL ;
-PIN 4 I4 COMBINATORIAL ;
-PIN 5 I5 COMBINATORIAL ;
-PIN 6 I6 COMBINATORIAL ;
-PIN 7 I7 COMBINATORIAL ;
-PIN 8 I8 COMBINATORIAL ;
-PIN 9 I9 COMBINATORIAL ;
-PIN 10 GND ;
-PIN 11 I11 COMBINATORIAL ;
-PIN 12 I12 COMBINATORIAL ;
-PIN 13 I13 COMBINATORIAL ;
-PIN 14 O14 COMBINATORIAL ;
-PIN 15 O15 COMBINATORIAL ;
-PIN 16 O16 COMBINATORIAL ;
-PIN 17 O17 COMBINATORIAL ;
-PIN 18 I18 COMBINATORIAL ;
-PIN 19 I19 COMBINATORIAL ;
-PIN 20 VCC ;
-
-;----------------------------------- Boolean Equation Segment ------
-EQUATIONS
-
-MINIMIZE_OFF
-
-/O14 = /I8 * I11 +
- I4 +
- /I12 +
- I5 * /I11 +
- I1 +
- I7 * I12 +
- /I3 * /I9 +
- /I2
-
-/O15 = I1 * I7 +
- /I8 +
- I5 +
- /I13 +
- /I3 +
- I2 * I9 +
- I4 +
- /I3 * I13
-
-/O16 = /I18 +
- I3 * I11 +
- I6 +
- I6 * I18 +
- /I1 +
- /i5 * I7 * I8 +
- /I2 * /I9 +
- /I7 * /I8
-
-/O17 = I2 * I19 +
- /I9 +
- /I19 +
- I3 * I4 +
- I6 * I9 +
- /I5 +
- /I1 * /I11 +
- I7
-
-MINIMIZE_ON
-
-;----------------------------------- Simulation Segment ------------
-SIMULATION
-
-;-------------------------------------------------------------------
diff --git a/regtests/jedutil/eqns/PALASM/ampal18p8/pal16h2-as-ampal18p8.pds b/regtests/jedutil/eqns/PALASM/ampal18p8/pal16h2-as-ampal18p8.pds
deleted file mode 100644
index d9b7a4509a9..00000000000
--- a/regtests/jedutil/eqns/PALASM/ampal18p8/pal16h2-as-ampal18p8.pds
+++ /dev/null
@@ -1,65 +0,0 @@
-;PALASM Design Description
-
-;---------------------------------- Declaration Segment ------------
-TITLE PAL16H2 Test
-PATTERN A
-REVISION 1.0
-AUTHOR MAMEDev
-COMPANY MAMEDev
-DATE 08/25/13
-
-CHIP PAL16H2Test PAL18P8
-
-SIGNATURE #b0010011001100110011001100110011001100110011001100110011001100100
-
-;---------------------------------- PIN Declarations ---------------
-PIN 1 I1 COMBINATORIAL ;
-PIN 2 I2 COMBINATORIAL ;
-PIN 3 I3 COMBINATORIAL ;
-PIN 4 I4 COMBINATORIAL ;
-PIN 5 I5 COMBINATORIAL ;
-PIN 6 I6 COMBINATORIAL ;
-PIN 7 I7 COMBINATORIAL ;
-PIN 8 I8 COMBINATORIAL ;
-PIN 9 I9 COMBINATORIAL ;
-PIN 10 GND ;
-PIN 11 I11 COMBINATORIAL ;
-PIN 12 I12 COMBINATORIAL ;
-PIN 13 I13 COMBINATORIAL ;
-PIN 14 I14 COMBINATORIAL ;
-PIN 15 O15 COMBINATORIAL ;
-PIN 16 O16 COMBINATORIAL ;
-PIN 17 I17 COMBINATORIAL ;
-PIN 18 I18 COMBINATORIAL ;
-PIN 19 I19 COMBINATORIAL ;
-PIN 20 VCC ;
-
-;----------------------------------- Boolean Equation Segment ------
-EQUATIONS
-
-MINIMIZE_OFF
-
-O15 = I5 +
- /I13 * /I14 +
- I1 * I7 +
- /I3 * I14 +
- /I3 * I13 +
- I2 * I9 +
- /I8 +
- I4
-
-O16 = I6 +
- I3 * I11 +
- I6 * I18 +
- /I1 * /I17 +
- /I18 +
- /I7 * /I8 +
- /I2 * /I9 +
- /i5 * I7 * I8 * I17
-
-MINIMIZE_ON
-
-;----------------------------------- Simulation Segment ------------
-SIMULATION
-
-;-------------------------------------------------------------------
diff --git a/regtests/jedutil/eqns/PALASM/ampal18p8/pal16l2-as-ampal18p8.pds b/regtests/jedutil/eqns/PALASM/ampal18p8/pal16l2-as-ampal18p8.pds
deleted file mode 100644
index 3b7fd87a2c9..00000000000
--- a/regtests/jedutil/eqns/PALASM/ampal18p8/pal16l2-as-ampal18p8.pds
+++ /dev/null
@@ -1,65 +0,0 @@
-;PALASM Design Description
-
-;---------------------------------- Declaration Segment ------------
-TITLE PAL16L2 Test
-PATTERN A
-REVISION 1.0
-AUTHOR MAMEDev
-COMPANY MAMEDev
-DATE 08/25/13
-
-CHIP PAL16L2Test PAL18P8
-
-SIGNATURE #b0010011001100110011001100110011001100110011001100110011001100100
-
-;---------------------------------- PIN Declarations ---------------
-PIN 1 I1 COMBINATORIAL ;
-PIN 2 I2 COMBINATORIAL ;
-PIN 3 I3 COMBINATORIAL ;
-PIN 4 I4 COMBINATORIAL ;
-PIN 5 I5 COMBINATORIAL ;
-PIN 6 I6 COMBINATORIAL ;
-PIN 7 I7 COMBINATORIAL ;
-PIN 8 I8 COMBINATORIAL ;
-PIN 9 I9 COMBINATORIAL ;
-PIN 10 GND ;
-PIN 11 I11 COMBINATORIAL ;
-PIN 12 I12 COMBINATORIAL ;
-PIN 13 I13 COMBINATORIAL ;
-PIN 14 I14 COMBINATORIAL ;
-PIN 15 O15 COMBINATORIAL ;
-PIN 16 O16 COMBINATORIAL ;
-PIN 17 I17 COMBINATORIAL ;
-PIN 18 I18 COMBINATORIAL ;
-PIN 19 I19 COMBINATORIAL ;
-PIN 20 VCC ;
-
-;----------------------------------- Boolean Equation Segment ------
-EQUATIONS
-
-MINIMIZE_OFF
-
-/O15 = I5 * /I11 +
- /I3 * I14 +
- /I3 * I13 +
- /I13 * /I14 +
- I1 * I7 * I12 +
- /I8 * I18 +
- I2 * I9 +
- I4 * I17 * /I19
-
-/O16 = /I2 * /I9 * I19 +
- I3 * I11 * /I18 +
- /i5 * I7 * I8 * I17 +
- I6 * I18 +
- /I1 * I14 * /I17 +
- I13 * /I18 +
- /I7 * /I8 * /I12 +
- I6
-
-MINIMIZE_ON
-
-;----------------------------------- Simulation Segment ------------
-SIMULATION
-
-;-------------------------------------------------------------------
diff --git a/regtests/jedutil/eqns/PALASM/ampal18p8/pal16l8-as-ampal18p8.pds b/regtests/jedutil/eqns/PALASM/ampal18p8/pal16l8-as-ampal18p8.pds
deleted file mode 100644
index ff01258418b..00000000000
--- a/regtests/jedutil/eqns/PALASM/ampal18p8/pal16l8-as-ampal18p8.pds
+++ /dev/null
@@ -1,119 +0,0 @@
-;PALASM Design Description
-
-;---------------------------------- Declaration Segment ------------
-TITLE PAL16L8 Test 1
-PATTERN A
-REVISION 1.0
-AUTHOR MAMEDev
-COMPANY MAMEDev
-DATE 08/25/13
-
-CHIP PAL16L8 PAL18P8
-
-SIGNATURE #b1110011001100110011001100110011001100110011001100110011001100110
-
-;---------------------------------- PIN Declarations ---------------
-PIN 1 I1 COMBINATORIAL ;
-PIN 2 I2 COMBINATORIAL ;
-PIN 3 I3 COMBINATORIAL ;
-PIN 4 I4 COMBINATORIAL ;
-PIN 5 I5 COMBINATORIAL ;
-PIN 6 I6 COMBINATORIAL ;
-PIN 7 I7 COMBINATORIAL ;
-PIN 8 I8 COMBINATORIAL ;
-PIN 9 I9 COMBINATORIAL ;
-PIN 10 GND ;
-PIN 11 I11 COMBINATORIAL ;
-PIN 12 O12 COMBINATORIAL ;
-PIN 13 O13 COMBINATORIAL ;
-PIN 14 O14 COMBINATORIAL ;
-PIN 15 O15 COMBINATORIAL ;
-PIN 16 O16 COMBINATORIAL ;
-PIN 17 O17 COMBINATORIAL ;
-PIN 18 O18 COMBINATORIAL ;
-PIN 19 O19 COMBINATORIAL ;
-PIN 20 VCC ;
-
-;----------------------------------- Boolean Equation Segment ------
-EQUATIONS
-
-MINIMIZE_OFF
-
-O12 = I1 * /I2 +
- /I1 * I3 +
- /I3 * I7 +
- I4 * O13 +
- I6 * /O13 +
- I6 * /I7 +
- /I6 * /I8 * /I9
-O12.TRST = /I5
-
-/O13 = I3 +
- O14 +
- /I11 +
- I2 +
- /I4 * /O14 +
- I8 * I9 +
- I5
-O13.TRST = VCC
-
-/O14 = I4 +
- /I8 * I11 +
- O15 +
- /I2 +
- I5 * /I11 +
- I7 +
- /I3 * /I9
-O14.TRST = I1
-
-/O15 = I5 +
- /O16 +
- I1 * I7 +
- /I3 +
- /I3 * O16 +
- I2 * I9 +
- /I8
-O15.TRST = VCC
-
-/O16 = I6 +
- I3 * I11 +
- I6 * O17 +
- /I1 +
- /O17 +
- /I7 * /I8 +
- /I2 * /I9
-O16.TRST = /I11
-
-/O17 = I7 +
- I2 * O18 +
- I3 * I4 +
- /I5 +
- /I9 +
- /O18 +
- /I1 * /I11
-O17.TRST = VCC
-
-O18 = I3 +
- I8 +
- I9 * I11 +
- I1 +
- /I4 +
- I2 +
- I5 * /I7
-O18.TRST = VCC
-
-O19 = O18 +
- O17 +
- O16 +
- O15 +
- O14 +
- O13 +
- /O13 * /O14 * /O15 * /O16 * /O17 * /O18
-O19.TRST = I3
-
-MINIMIZE_ON
-
-;----------------------------------- Simulation Segment ------------
-SIMULATION
-
-;-------------------------------------------------------------------
diff --git a/3rdparty/libuv/test/fixtures/empty_file b/regtests/jedutil/eqns/pal10l8/pal10l8.eqn
index e69de29bb2d..e69de29bb2d 100644
--- a/3rdparty/libuv/test/fixtures/empty_file
+++ b/regtests/jedutil/eqns/pal10l8/pal10l8.eqn
diff --git a/regtests/jedutil/eqns/pal12h6/pal12h6.eqn b/regtests/jedutil/eqns/pal12h6/pal12h6.eqn
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/regtests/jedutil/eqns/pal12h6/pal12h6.eqn
diff --git a/regtests/jedutil/eqns/pal12l6/pal12l6.eqn b/regtests/jedutil/eqns/pal12l6/pal12l6.eqn
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/regtests/jedutil/eqns/pal12l6/pal12l6.eqn
diff --git a/regtests/jedutil/eqns/pal14h4/pal14h4.eqn b/regtests/jedutil/eqns/pal14h4/pal14h4.eqn
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/regtests/jedutil/eqns/pal14h4/pal14h4.eqn
diff --git a/regtests/jedutil/eqns/pal14l4/pal14l4.eqn b/regtests/jedutil/eqns/pal14l4/pal14l4.eqn
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/regtests/jedutil/eqns/pal14l4/pal14l4.eqn
diff --git a/regtests/jedutil/eqns/pal16c1/pal16c1.eqn b/regtests/jedutil/eqns/pal16c1/pal16c1.eqn
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/regtests/jedutil/eqns/pal16c1/pal16c1.eqn
diff --git a/regtests/jedutil/eqns/pal16h2/pal16h2.eqn b/regtests/jedutil/eqns/pal16h2/pal16h2.eqn
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/regtests/jedutil/eqns/pal16h2/pal16h2.eqn
diff --git a/regtests/jedutil/eqns/pal16l2/pal16l2.eqn b/regtests/jedutil/eqns/pal16l2/pal16l2.eqn
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/regtests/jedutil/eqns/pal16l2/pal16l2.eqn
diff --git a/regtests/jedutil/eqns/pal16l8/pal16l8.eqn b/regtests/jedutil/eqns/pal16l8/pal16l8.eqn
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/regtests/jedutil/eqns/pal16l8/pal16l8.eqn
diff --git a/regtests/jedutil/eqns/pal16r4/pal16r4.eqn b/regtests/jedutil/eqns/pal16r4/pal16r4.eqn
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/regtests/jedutil/eqns/pal16r4/pal16r4.eqn
diff --git a/regtests/jedutil/eqns/pal16r6/pal16r6.eqn b/regtests/jedutil/eqns/pal16r6/pal16r6.eqn
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/regtests/jedutil/eqns/pal16r6/pal16r6.eqn
diff --git a/regtests/jedutil/eqns/pal16r8/pal16r8.eqn b/regtests/jedutil/eqns/pal16r8/pal16r8.eqn
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/regtests/jedutil/eqns/pal16r8/pal16r8.eqn
diff --git a/regtests/jedutil/eqns/pal20l10/pal20l10.eqn b/regtests/jedutil/eqns/pal20l10/pal20l10.eqn
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/regtests/jedutil/eqns/pal20l10/pal20l10.eqn
diff --git a/regtests/jedutil/eqns/pal20l8/pal20l8.eqn b/regtests/jedutil/eqns/pal20l8/pal20l8.eqn
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/regtests/jedutil/eqns/pal20l8/pal20l8.eqn
diff --git a/regtests/jedutil/eqns/pal20r4/pal20r4.eqn b/regtests/jedutil/eqns/pal20r4/pal20r4.eqn
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/regtests/jedutil/eqns/pal20r4/pal20r4.eqn
diff --git a/regtests/jedutil/eqns/pal20r6/pal20r6.eqn b/regtests/jedutil/eqns/pal20r6/pal20r6.eqn
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/regtests/jedutil/eqns/pal20r6/pal20r6.eqn
diff --git a/regtests/jedutil/eqns/pal20r8/pal20r8.eqn b/regtests/jedutil/eqns/pal20r8/pal20r8.eqn
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/regtests/jedutil/eqns/pal20r8/pal20r8.eqn
diff --git a/regtests/jedutil/eqns/readme.txt b/regtests/jedutil/eqns/readme.txt
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/regtests/jedutil/eqns/readme.txt
diff --git a/regtests/jedutil/jeds/ampal18p8/pal10h8-as-ampal18p8.jed b/regtests/jedutil/jeds/ampal18p8/pal10h8-as-ampal18p8.jed
deleted file mode 100644
index 0fb38aa728c..00000000000
--- a/regtests/jedutil/jeds/ampal18p8/pal10h8-as-ampal18p8.jed
+++ /dev/null
@@ -1,90 +0,0 @@
-
-PALASM4 PAL ASSEMBLER - MARKET RELEASE 1.5a (8-20-92)
- (C) - COPYRIGHT ADVANCED MICRO DEVICES INC., 1992
-
-
-TITLE :PAL10H8 Test AUTHOR :MAMEDev
-PATTERN :A COMPANY:MAMEDev
-REVISION:1.0 DATE :08/25/13
-
-
-PAL18P8
-PAL10H8TEST*
-QP20*
-QF2600*
-G0*F0*
-L0000 111111111111111111111111111111111111*
-L0036 111101111111111111111111111111011111*
-L0072 110111111111111111111111111111111111*
-L0108 111011111111111111111111111110111111*
-L0144 111110111111101111111011111111111111*
-L0180 011111111111111111111111111111111111*
-L0216 111111110111111111111111111111111111*
-L0252 111111111111111101111111111111111111*
-L0288 111111111111111111111111011111111111*
-L0324 111111111111111111111111111111111111*
-L0360 111011111111111111111111111111111111*
-L0396 111110111111111111111111111111111111*
-L0432 111111111111101111111111111111111111*
-L0468 111111111111111111111011111111111111*
-L0504 111111111111111111111111111110111111*
-L0540 111111111111111111111111111111101111*
-L0576 110111111111111111110111111111011111*
-L0612 111101111111011111111111111101111111*
-L0648 111111111111111111111111111111111111*
-L0684 111111111111111111110111111111111111*
-L0720 011111111111111111111111111101111111*
-L0756 111101110111111111111111111111111111*
-L0792 111111111111101111111111111111111111*
-L0828 111111111111111111111111111110111111*
-L0864 111111111111111111111111101111111111*
-L0900 111011111111111111111111111111101111*
-L0936 111111111111111101111111111101111111*
-L0972 111111111111111111111111111111111111*
-L1008 111111111111111101111111111111111111*
-L1044 111101111111111111111111111111011111*
-L1080 111111111111111101111111011111111111*
-L1116 111011111111111111111111111111111111*
-L1152 111111111111111111111111101111111111*
-L1188 111111111111111111111011101111111111*
-L1224 101111111111111111111111111110111111*
-L1260 111111111111101111110111011111111111*
-L1296 111111111111111111111111111111111111*
-L1332 111111111111011111111111111111111111*
-L1368 111011111111111111111111111111111111*
-L1404 110111111111111111110111111111111111*
-L1440 111110111111111111111111111111111111*
-L1476 110110111111111111111111111111111111*
-L1512 011111111111111111111111111101111111*
-L1548 111111111111111111111111101111111111*
-L1584 111111110111111111111111111111111111*
-L1620 111111111111111111111111111111111111*
-L1656 111111110111111111111111111111111111*
-L1692 111111111111111111111111101111011111*
-L1728 111111111111111110111111111111111111*
-L1764 101111111111111111111111111111111111*
-L1800 111111111111011111111111111111101111*
-L1836 111111111111111111110111111111111111*
-L1872 111110111111111111111111111110111111*
-L1908 111011111111111111111111111111111111*
-L1944 111111111111111111111111111111111111*
-L1980 101111111111111111111111111111111111*
-L2016 111111111011111111111111111111111111*
-L2052 111110111111111110111111111111111111*
-L2088 111111111111111111111111101111111111*
-L2124 111111111111111111111111111111101111*
-L2160 111111111111111111111111111110111111*
-L2196 111011111111111111111011111111111111*
-L2232 111111111111101111111111111111111111*
-L2268 111111111111111111111111111111111111*
-L2304 011111111111111111111111111111111111*
-L2340 110101111111111111111111111111111111*
-L2376 111111110111111111111111111111101111*
-L2412 111111111111011111111111111111111111*
-L2448 111111111111111101111111111111111111*
-L2484 111011111111111111110111111111111111*
-L2520 111111111111111111111111011111111111*
-L2556 111111111111111111111111111101011111*
-L2592 11111111*
-C3B70*
-67FE
diff --git a/regtests/jedutil/jeds/ampal18p8/pal10l8-as-ampal18p8.jed b/regtests/jedutil/jeds/ampal18p8/pal10l8-as-ampal18p8.jed
deleted file mode 100644
index 8c4757be5ad..00000000000
--- a/regtests/jedutil/jeds/ampal18p8/pal10l8-as-ampal18p8.jed
+++ /dev/null
@@ -1,90 +0,0 @@
-
-PALASM4 PAL ASSEMBLER - MARKET RELEASE 1.5a (8-20-92)
- (C) - COPYRIGHT ADVANCED MICRO DEVICES INC., 1992
-
-
-TITLE :PAL10L8 Test AUTHOR :MAMEDev
-PATTERN :A COMPANY:MAMEDev
-REVISION:1.0 DATE :08/25/13
-
-
-PAL18P8
-PAL10L8TEST*
-QP20*
-QF2600*
-G0*F0*
-L0000 111111111111111111111111111111111111*
-L0036 111110111111101111111011111111111111*
-L0072 011111111111111111111111111111111111*
-L0108 111111111111111111111111011111111111*
-L0144 111101111111111111111111111111011111*
-L0180 110111111111111111111111111111111111*
-L0216 111111110111111111111111111111111111*
-L0252 111111111111111101111111111111111111*
-L0288 111011111111111111111111111110111111*
-L0324 111111111111111111111111111111111111*
-L0360 111111111111111111111111111110111111*
-L0396 111101111111011111111111111101111111*
-L0432 111111111111111111111011111111111111*
-L0468 111111111111111111111111111111101111*
-L0504 111011111111111111111111111111111111*
-L0540 111110111111111111111111111111111111*
-L0576 111111111111101111111111111111111111*
-L0612 110111111111111111110111111111011111*
-L0648 111111111111111111111111111111111111*
-L0684 111101110111111111111111111111111111*
-L0720 111111111111101111111111111111111111*
-L0756 111111111111111111111111111110111111*
-L0792 111011111111111111111111111111101111*
-L0828 111111111111111111110111111111111111*
-L0864 011111111111111111111111111101111111*
-L0900 111111111111111101111111111101111111*
-L0936 111111111111111111111111101111111111*
-L0972 111111111111111111111111111111111111*
-L1008 111111111111111101111111111111111111*
-L1044 101111111111111111111111111110111111*
-L1080 111101111111111111111111111111011111*
-L1116 111111111111111111111111101111111111*
-L1152 111111111111111101111111011111111111*
-L1188 111011111111111111111111111111111111*
-L1224 111111111111101111110111011111111111*
-L1260 111111111111111111111011101111111111*
-L1296 111111111111111111111111111111111111*
-L1332 111111110111111111111111111111111111*
-L1368 110110111111111111111111111111111111*
-L1404 011111111111111111111111111101111111*
-L1440 111111111111011111111111111111111111*
-L1476 110111111111111111110111111111111111*
-L1512 111110111111111111111111111111111111*
-L1548 111111111111111111111111101111111111*
-L1584 111011111111111111111111111111111111*
-L1620 111111111111111111111111111111111111*
-L1656 111110111111111111111111111110111111*
-L1692 111111111111111110111111111111111111*
-L1728 101111111111111111111111111111111111*
-L1764 111111110111111111111111111111111111*
-L1800 111111111111111111111111101111011111*
-L1836 111111111111111111110111111111111111*
-L1872 111111111111011111111111111111101111*
-L1908 111011111111111111111111111111111111*
-L1944 111111111111111111111111111111111111*
-L1980 111111111111111111111111101111111111*
-L2016 111111111111111111111111111111101111*
-L2052 111111111111111111111111111110111111*
-L2088 111110111111111110111111111111111111*
-L2124 111011111111111111111011111111111111*
-L2160 101111111111111111111111111111111111*
-L2196 111111111011111111111111111111111111*
-L2232 111111111111101111111111111111111111*
-L2268 111111111111111111111111111111111111*
-L2304 111011111111111111110111111111111111*
-L2340 111111111111111111111111011111111111*
-L2376 111111111111111111111111111101011111*
-L2412 011111111111111111111111111111111111*
-L2448 110101111111111111111111111111111111*
-L2484 111111111111011111111111111111111111*
-L2520 111111110111111111111111111111101111*
-L2556 111111111111111101111111111111111111*
-L2592 00000000*
-C3981*
-67F3
diff --git a/regtests/jedutil/jeds/ampal18p8/pal12h6-as-ampal18p8.jed b/regtests/jedutil/jeds/ampal18p8/pal12h6-as-ampal18p8.jed
deleted file mode 100644
index 0af9422206e..00000000000
--- a/regtests/jedutil/jeds/ampal18p8/pal12h6-as-ampal18p8.jed
+++ /dev/null
@@ -1,90 +0,0 @@
-
-PALASM4 PAL ASSEMBLER - MARKET RELEASE 1.5a (8-20-92)
- (C) - COPYRIGHT ADVANCED MICRO DEVICES INC., 1992
-
-
-TITLE :PAL12H6 Test AUTHOR :MAMEDev
-PATTERN :A COMPANY:MAMEDev
-REVISION:1.0 DATE :08/25/13
-
-
-PAL18P8
-PAL12H6TEST*
-QP20*
-QF2600*
-G0*F0*
-L0000 000000000000000000000000000000000000*
-L0036 000000000000000000000000000000000000*
-L0072 000000000000000000000000000000000000*
-L0108 000000000000000000000000000000000000*
-L0144 000000000000000000000000000000000000*
-L0180 000000000000000000000000000000000000*
-L0216 000000000000000000000000000000000000*
-L0252 000000000000000000000000000000000000*
-L0288 000000000000000000000000000000000000*
-L0324 111111111111111111111111111111111111*
-L0360 111011111111111111111111111111111111*
-L0396 111110111111111111111111111111111111*
-L0432 111111111111101111111111111111111111*
-L0468 111111111111111111111011111111111111*
-L0504 111111111111111111111111111110111011*
-L0540 111111111111111111111111111111101111*
-L0576 110111111111111111110111111111011111*
-L0612 111101111111011111111111111101111111*
-L0648 111111111111111111111111111111111111*
-L0684 111111111111111111110111111111111101*
-L0720 011111111111111111111111111101111111*
-L0756 111101110111111111111111111111111111*
-L0792 111111111111101111111111111111111111*
-L0828 111111111111111111111111111110111111*
-L0864 111111111111111111111111101111111111*
-L0900 111011111111111111111111111111101111*
-L0936 111111111111111101111111111101111111*
-L0972 111111111111111111111111111111111111*
-L1008 111111111111111101111111111111111111*
-L1044 111101111111111111111111111111011111*
-L1080 111111111111111101111111011111111111*
-L1116 111011111111111111111111111111111111*
-L1152 111111111111111111111111101111111111*
-L1188 111111111111111111111011101111111111*
-L1224 101111111111111111111111111110111111*
-L1260 111111111111101111110111011111111111*
-L1296 111111111111111111111111111111111111*
-L1332 111111111111011111111111111111110111*
-L1368 111011111111111111111111111111111111*
-L1404 110111111111111111110111111111111111*
-L1440 111110111111111111111111111111111111*
-L1476 110110111111111111111111111111111111*
-L1512 011111111111111111111111111101111111*
-L1548 111111111111111111111111101111111111*
-L1584 111111110111111111111111111111111111*
-L1620 111111111111111111111111111111111111*
-L1656 111111110111111111111111111111111111*
-L1692 111111111111111111111111101111011111*
-L1728 111111111111111110111111111111111111*
-L1764 101111111111111111111111111111111111*
-L1800 111111111111011111111111111111101111*
-L1836 111111111111111111110111111111111111*
-L1872 111110111111111111111111111110111111*
-L1908 111011111111111111111111111111111110*
-L1944 111111111111111111111111111111111111*
-L1980 101111111111111111111111111111111111*
-L2016 111111111011111111111111111111111111*
-L2052 111110111111111110111111111111111111*
-L2088 111111111111111111111111101111111111*
-L2124 111111111111111111111111111111101111*
-L2160 111111111111111111111111111110111111*
-L2196 111011111111111111111011111111111111*
-L2232 111111111111101111111111111111111111*
-L2268 000000000000000000000000000000000000*
-L2304 000000000000000000000000000000000000*
-L2340 000000000000000000000000000000000000*
-L2376 000000000000000000000000000000000000*
-L2412 000000000000000000000000000000000000*
-L2448 000000000000000000000000000000000000*
-L2484 000000000000000000000000000000000000*
-L2520 000000000000000000000000000000000000*
-L2556 000000000000000000000000000000000000*
-L2592 01111110*
-CEBC7*
-65AD
diff --git a/regtests/jedutil/jeds/ampal18p8/pal12l6-as-ampal18p8.jed b/regtests/jedutil/jeds/ampal18p8/pal12l6-as-ampal18p8.jed
deleted file mode 100644
index 0e75276288c..00000000000
--- a/regtests/jedutil/jeds/ampal18p8/pal12l6-as-ampal18p8.jed
+++ /dev/null
@@ -1,90 +0,0 @@
-
-PALASM4 PAL ASSEMBLER - MARKET RELEASE 1.5a (8-20-92)
- (C) - COPYRIGHT ADVANCED MICRO DEVICES INC., 1992
-
-
-TITLE :PAL12L6 Test AUTHOR :MAMEDev
-PATTERN :A COMPANY:MAMEDev
-REVISION:1.0 DATE :08/25/13
-
-
-PAL18P8
-PAL12L6TEST*
-QP20*
-QF2600*
-G0*F0*
-L0000 000000000000000000000000000000000000*
-L0036 000000000000000000000000000000000000*
-L0072 000000000000000000000000000000000000*
-L0108 000000000000000000000000000000000000*
-L0144 000000000000000000000000000000000000*
-L0180 000000000000000000000000000000000000*
-L0216 000000000000000000000000000000000000*
-L0252 000000000000000000000000000000000000*
-L0288 000000000000000000000000000000000000*
-L0324 111111111111111111111111111111111111*
-L0360 111111111111111111111111111110111111*
-L0396 111101111111011111111111111101111111*
-L0432 111111111111111111111011111111111111*
-L0468 111111111111111111111111111111101111*
-L0504 111011111111111111111111111111111111*
-L0540 111110111111111111111111111111111111*
-L0576 111111111111101111111111111111111111*
-L0612 110111111111111111110111111111011111*
-L0648 111111111111111111111111111111111111*
-L0684 111101110111111111111111111111111111*
-L0720 111111111111101111111111111111111111*
-L0756 111111111111111111111111111110111111*
-L0792 111011111111111111111111111111101111*
-L0828 111111111111111111110111111111111111*
-L0864 011111111111111111111111111101111011*
-L0900 111111111111111101111111111101111111*
-L0936 111111111111111111111111101111111111*
-L0972 111111111111111111111111111111111111*
-L1008 111111111111111101111111111111111111*
-L1044 101111111111111111111111111110111111*
-L1080 111101111111111111111111111111011111*
-L1116 111111111111111111111111101111111111*
-L1152 111111111111111101111111011111111111*
-L1188 111011111111111111111111111111111111*
-L1224 111111111111101111110111011111111111*
-L1260 111111111111111111111011101111111101*
-L1296 111111111111111111111111111111111111*
-L1332 111111110111111111111111111111111111*
-L1368 110110111111111111111111111111111111*
-L1404 011111111111111111111111111101111111*
-L1440 111111111111011111111111111111111111*
-L1476 110111111111111111110111111111111111*
-L1512 111110111111111111111111111111111111*
-L1548 111111111111111111111111101111111111*
-L1584 111011111111111111111111111111111111*
-L1620 111111111111111111111111111111111111*
-L1656 111110111111111111111111111110110111*
-L1692 111111111111111110111111111111111111*
-L1728 101111111111111111111111111111111111*
-L1764 111111110111111111111111111111111111*
-L1800 111111111111111111111111101111011111*
-L1836 111111111111111111110111111111111111*
-L1872 111111111111011111111111111111101111*
-L1908 111011111111111111111111111111111111*
-L1944 111111111111111111111111111111111111*
-L1980 111111111111111111111111101111111111*
-L2016 111111111111111111111111111111101111*
-L2052 111111111111111111111111111110111111*
-L2088 111110111111111110111111111111111111*
-L2124 111011111111111111111011111111111111*
-L2160 101111111111111111111111111111111111*
-L2196 111111111011111111111111111111111110*
-L2232 111111111111101111111111111111111111*
-L2268 000000000000000000000000000000000000*
-L2304 000000000000000000000000000000000000*
-L2340 000000000000000000000000000000000000*
-L2376 000000000000000000000000000000000000*
-L2412 000000000000000000000000000000000000*
-L2448 000000000000000000000000000000000000*
-L2484 000000000000000000000000000000000000*
-L2520 000000000000000000000000000000000000*
-L2556 000000000000000000000000000000000000*
-L2592 00000000*
-CEA1D*
-65A5
diff --git a/regtests/jedutil/jeds/ampal18p8/pal14h4-as-ampal18p8.jed b/regtests/jedutil/jeds/ampal18p8/pal14h4-as-ampal18p8.jed
deleted file mode 100644
index 4c12853a026..00000000000
--- a/regtests/jedutil/jeds/ampal18p8/pal14h4-as-ampal18p8.jed
+++ /dev/null
@@ -1,90 +0,0 @@
-
-PALASM4 PAL ASSEMBLER - MARKET RELEASE 1.5a (8-20-92)
- (C) - COPYRIGHT ADVANCED MICRO DEVICES INC., 1992
-
-
-TITLE :PAL14H4 Test AUTHOR :MAMEDev
-PATTERN :A COMPANY:MAMEDev
-REVISION:1.0 DATE :08/25/13
-
-
-PAL18P8
-PAL14H4TEST*
-QP20*
-QF2600*
-G0*F0*
-L0000 000000000000000000000000000000000000*
-L0036 000000000000000000000000000000000000*
-L0072 000000000000000000000000000000000000*
-L0108 000000000000000000000000000000000000*
-L0144 000000000000000000000000000000000000*
-L0180 000000000000000000000000000000000000*
-L0216 000000000000000000000000000000000000*
-L0252 000000000000000000000000000000000000*
-L0288 000000000000000000000000000000000000*
-L0324 000000000000000000000000000000000000*
-L0360 000000000000000000000000000000000000*
-L0396 000000000000000000000000000000000000*
-L0432 000000000000000000000000000000000000*
-L0468 000000000000000000000000000000000000*
-L0504 000000000000000000000000000000000000*
-L0540 000000000000000000000000000000000000*
-L0576 000000000000000000000000000000000000*
-L0612 000000000000000000000000000000000000*
-L0648 111111111111111111111111111111111111*
-L0684 111111111111111111110111111111111111*
-L0720 011111111111111111111111111111110111*
-L0756 111101110111111111111111111111111111*
-L0792 111111111111101111111111111111111111*
-L0828 111111111111111111111111111110111111*
-L0864 111111111111111111111111111111111011*
-L0900 111011111111111111111111111111101111*
-L0936 111111111111111101111111111101111111*
-L0972 111111111111111111111111111111111111*
-L1008 111111111111111101111111111111111111*
-L1044 111101111111111111111111111111011111*
-L1080 111111011111111101111111111111111111*
-L1116 111011111111111111111111111111111111*
-L1152 111111101111111111111111111111111111*
-L1188 111111111111111111111011101111111111*
-L1224 101111111111111111111111111110111111*
-L1260 111111111111101111110111011111111111*
-L1296 111111111111111111111111111111111111*
-L1332 111111111111011111111111111111111111*
-L1368 111111111111111111111111111011111111*
-L1404 110111111111111111110111111111111111*
-L1440 111110111111111111111111111111111111*
-L1476 111110111111111111111111110111111111*
-L1512 011111111111111111111111111101111111*
-L1548 111111111111111111111111101111111111*
-L1584 111111110111111111111111111111111111*
-L1620 111111111111111111111111111111111111*
-L1656 111111110111111111111111111111111111*
-L1692 111111111111111111111111101111011111*
-L1728 111111111111111111111111111111111110*
-L1764 101111111111111111111111111111111111*
-L1800 111111111111011111111111111111101111*
-L1836 111111111111111111110111111111111101*
-L1872 111110111111111111111111111110111111*
-L1908 111011111111111111111111111111111111*
-L1944 000000000000000000000000000000000000*
-L1980 000000000000000000000000000000000000*
-L2016 000000000000000000000000000000000000*
-L2052 000000000000000000000000000000000000*
-L2088 000000000000000000000000000000000000*
-L2124 000000000000000000000000000000000000*
-L2160 000000000000000000000000000000000000*
-L2196 000000000000000000000000000000000000*
-L2232 000000000000000000000000000000000000*
-L2268 000000000000000000000000000000000000*
-L2304 000000000000000000000000000000000000*
-L2340 000000000000000000000000000000000000*
-L2376 000000000000000000000000000000000000*
-L2412 000000000000000000000000000000000000*
-L2448 000000000000000000000000000000000000*
-L2484 000000000000000000000000000000000000*
-L2520 000000000000000000000000000000000000*
-L2556 000000000000000000000000000000000000*
-L2592 00111100*
-C9C6F*
-6333
diff --git a/regtests/jedutil/jeds/ampal18p8/pal14l4-as-ampal18p8.jed b/regtests/jedutil/jeds/ampal18p8/pal14l4-as-ampal18p8.jed
deleted file mode 100644
index 26c645dcc77..00000000000
--- a/regtests/jedutil/jeds/ampal18p8/pal14l4-as-ampal18p8.jed
+++ /dev/null
@@ -1,90 +0,0 @@
-
-PALASM4 PAL ASSEMBLER - MARKET RELEASE 1.5a (8-20-92)
- (C) - COPYRIGHT ADVANCED MICRO DEVICES INC., 1992
-
-
-TITLE :PAL14L4 Test AUTHOR :MAMEDev
-PATTERN :A COMPANY:MAMEDev
-REVISION:1.0 DATE :08/25/13
-
-
-PAL18P8
-PAL14L4TEST*
-QP20*
-QF2600*
-G0*F0*
-L0000 000000000000000000000000000000000000*
-L0036 000000000000000000000000000000000000*
-L0072 000000000000000000000000000000000000*
-L0108 000000000000000000000000000000000000*
-L0144 000000000000000000000000000000000000*
-L0180 000000000000000000000000000000000000*
-L0216 000000000000000000000000000000000000*
-L0252 000000000000000000000000000000000000*
-L0288 000000000000000000000000000000000000*
-L0324 000000000000000000000000000000000000*
-L0360 000000000000000000000000000000000000*
-L0396 000000000000000000000000000000000000*
-L0432 000000000000000000000000000000000000*
-L0468 000000000000000000000000000000000000*
-L0504 000000000000000000000000000000000000*
-L0540 000000000000000000000000000000000000*
-L0576 000000000000000000000000000000000000*
-L0612 000000000000000000000000000000000000*
-L0648 111111111111111111111111111111111111*
-L0684 011111111111111111111111111111110111*
-L0720 111111111111111111111111111110111111*
-L0756 111111111111111111111111111111111011*
-L0792 111101110111111111111111111111111111*
-L0828 111111111111111101111111111101111111*
-L0864 111111111111101111111111111111111111*
-L0900 111011111111111111111111111111101111*
-L0936 111111111111111111110111111111111111*
-L0972 111111111111111111111111111111111111*
-L1008 111111101111111111111111111111111111*
-L1044 111101111111111111111111111111011111*
-L1080 111111111111111101111111111111111111*
-L1116 111111011111111101111111111111111111*
-L1152 111011111111111111111111111111111111*
-L1188 111111111111101111110111011111111111*
-L1224 101111111111111111111111111110111111*
-L1260 111111111111111111111011101111111111*
-L1296 111111111111111111111111111111111111*
-L1332 110111111111111111110111111111111111*
-L1368 111111111111111111111111101111111111*
-L1404 111111111111011111111111111111111111*
-L1440 111111111111111111111111111011111111*
-L1476 111110111111111111111111111111111111*
-L1512 011111111111111111111111111101111111*
-L1548 111111110111111111111111111111111111*
-L1584 111110111111111111111111110111111111*
-L1620 111111111111111111111111111111111111*
-L1656 111111111111111111111111101111011111*
-L1692 111111110111111111111111111111111111*
-L1728 111111111111111111111111111111111110*
-L1764 111111111111011111111111111111101111*
-L1800 110111111111111111111111111111111111*
-L1836 111111111111111111110111111111111101*
-L1872 111110111111111111111111111110111111*
-L1908 101111111111111111111111111111111111*
-L1944 000000000000000000000000000000000000*
-L1980 000000000000000000000000000000000000*
-L2016 000000000000000000000000000000000000*
-L2052 000000000000000000000000000000000000*
-L2088 000000000000000000000000000000000000*
-L2124 000000000000000000000000000000000000*
-L2160 000000000000000000000000000000000000*
-L2196 000000000000000000000000000000000000*
-L2232 000000000000000000000000000000000000*
-L2268 000000000000000000000000000000000000*
-L2304 000000000000000000000000000000000000*
-L2340 000000000000000000000000000000000000*
-L2376 000000000000000000000000000000000000*
-L2412 000000000000000000000000000000000000*
-L2448 000000000000000000000000000000000000*
-L2484 000000000000000000000000000000000000*
-L2520 000000000000000000000000000000000000*
-L2556 000000000000000000000000000000000000*
-L2592 00000000*
-C9D90*
-6321
diff --git a/regtests/jedutil/jeds/ampal18p8/pal16h2-as-ampal18p8.jed b/regtests/jedutil/jeds/ampal18p8/pal16h2-as-ampal18p8.jed
deleted file mode 100644
index 5482c396281..00000000000
--- a/regtests/jedutil/jeds/ampal18p8/pal16h2-as-ampal18p8.jed
+++ /dev/null
@@ -1,90 +0,0 @@
-
-PALASM4 PAL ASSEMBLER - MARKET RELEASE 1.5a (8-20-92)
- (C) - COPYRIGHT ADVANCED MICRO DEVICES INC., 1992
-
-
-TITLE :PAL16H2 Test AUTHOR :MAMEDev
-PATTERN :A COMPANY:MAMEDev
-REVISION:1.0 DATE :08/25/13
-
-
-PAL18P8
-PAL16H2TEST*
-QP20*
-QF2600*
-G0*F0*
-L0000 000000000000000000000000000000000000*
-L0036 000000000000000000000000000000000000*
-L0072 000000000000000000000000000000000000*
-L0108 000000000000000000000000000000000000*
-L0144 000000000000000000000000000000000000*
-L0180 000000000000000000000000000000000000*
-L0216 000000000000000000000000000000000000*
-L0252 000000000000000000000000000000000000*
-L0288 000000000000000000000000000000000000*
-L0324 000000000000000000000000000000000000*
-L0360 000000000000000000000000000000000000*
-L0396 000000000000000000000000000000000000*
-L0432 000000000000000000000000000000000000*
-L0468 000000000000000000000000000000000000*
-L0504 000000000000000000000000000000000000*
-L0540 000000000000000000000000000000000000*
-L0576 000000000000000000000000000000000000*
-L0612 000000000000000000000000000000000000*
-L0648 000000000000000000000000000000000000*
-L0684 000000000000000000000000000000000000*
-L0720 000000000000000000000000000000000000*
-L0756 000000000000000000000000000000000000*
-L0792 000000000000000000000000000000000000*
-L0828 000000000000000000000000000000000000*
-L0864 000000000000000000000000000000000000*
-L0900 000000000000000000000000000000000000*
-L0936 000000000000000000000000000000000000*
-L0972 111111111111111111111111111111111111*
-L1008 111111111111111101111111111111111111*
-L1044 111101111111111111111111111111011111*
-L1080 111111011111111101111111111111111111*
-L1116 111011111110111111111111111111111111*
-L1152 111111101111111111111111111111111111*
-L1188 111111111111111111111011101111111111*
-L1224 101111111111111111111111111110111111*
-L1260 111111111101101111110111011111111111*
-L1296 111111111111111111111111111111111111*
-L1332 111111111111011111111111111111111111*
-L1368 111111111111111111111110111011111111*
-L1404 110111111111111111110111111111111111*
-L1440 111110111111111111111101111111111111*
-L1476 111110111111111111111111110111111111*
-L1512 011111111111111111111111111101111111*
-L1548 111111111111111111111111101111111111*
-L1584 111111110111111111111111111111111111*
-L1620 000000000000000000000000000000000000*
-L1656 000000000000000000000000000000000000*
-L1692 000000000000000000000000000000000000*
-L1728 000000000000000000000000000000000000*
-L1764 000000000000000000000000000000000000*
-L1800 000000000000000000000000000000000000*
-L1836 000000000000000000000000000000000000*
-L1872 000000000000000000000000000000000000*
-L1908 000000000000000000000000000000000000*
-L1944 000000000000000000000000000000000000*
-L1980 000000000000000000000000000000000000*
-L2016 000000000000000000000000000000000000*
-L2052 000000000000000000000000000000000000*
-L2088 000000000000000000000000000000000000*
-L2124 000000000000000000000000000000000000*
-L2160 000000000000000000000000000000000000*
-L2196 000000000000000000000000000000000000*
-L2232 000000000000000000000000000000000000*
-L2268 000000000000000000000000000000000000*
-L2304 000000000000000000000000000000000000*
-L2340 000000000000000000000000000000000000*
-L2376 000000000000000000000000000000000000*
-L2412 000000000000000000000000000000000000*
-L2448 000000000000000000000000000000000000*
-L2484 000000000000000000000000000000000000*
-L2520 000000000000000000000000000000000000*
-L2556 000000000000000000000000000000000000*
-L2592 00011000*
-C4CCB*
-60C1
diff --git a/regtests/jedutil/jeds/ampal18p8/pal16l2-as-ampal18p8.jed b/regtests/jedutil/jeds/ampal18p8/pal16l2-as-ampal18p8.jed
deleted file mode 100644
index 46172b48c41..00000000000
--- a/regtests/jedutil/jeds/ampal18p8/pal16l2-as-ampal18p8.jed
+++ /dev/null
@@ -1,90 +0,0 @@
-
-PALASM4 PAL ASSEMBLER - MARKET RELEASE 1.5a (8-20-92)
- (C) - COPYRIGHT ADVANCED MICRO DEVICES INC., 1992
-
-
-TITLE :PAL16L2 Test AUTHOR :MAMEDev
-PATTERN :A COMPANY:MAMEDev
-REVISION:1.0 DATE :08/25/13
-
-
-PAL18P8
-PAL16L2TEST*
-QP20*
-QF2600*
-G0*F0*
-L0000 000000000000000000000000000000000000*
-L0036 000000000000000000000000000000000000*
-L0072 000000000000000000000000000000000000*
-L0108 000000000000000000000000000000000000*
-L0144 000000000000000000000000000000000000*
-L0180 000000000000000000000000000000000000*
-L0216 000000000000000000000000000000000000*
-L0252 000000000000000000000000000000000000*
-L0288 000000000000000000000000000000000000*
-L0324 000000000000000000000000000000000000*
-L0360 000000000000000000000000000000000000*
-L0396 000000000000000000000000000000000000*
-L0432 000000000000000000000000000000000000*
-L0468 000000000000000000000000000000000000*
-L0504 000000000000000000000000000000000000*
-L0540 000000000000000000000000000000000000*
-L0576 000000000000000000000000000000000000*
-L0612 000000000000000000000000000000000000*
-L0648 000000000000000000000000000000000000*
-L0684 000000000000000000000000000000000000*
-L0720 000000000000000000000000000000000000*
-L0756 000000000000000000000000000000000000*
-L0792 000000000000000000000000000000000000*
-L0828 000000000000000000000000000000000000*
-L0864 000000000000000000000000000000000000*
-L0900 000000000000000000000000000000000000*
-L0936 000000000000000000000000000000000000*
-L0972 111111111111111111111111111111111111*
-L1008 101111111111111111111111111110110111*
-L1044 111101101111111111111111111111011111*
-L1080 111111111101101111110111011111111111*
-L1116 111111011111111101111111111111111111*
-L1152 111011111110111111111101111111111111*
-L1188 111111101111111111111111110111111111*
-L1224 111111111111111111111011101111111110*
-L1260 111111111111111101111111111111111111*
-L1296 111111111111111111111111111111111111*
-L1332 111111111111011111111111111111101111*
-L1368 111110111111111111111101111111111111*
-L1404 111110111111111111111111110111111111*
-L1440 111111111111111111111110111011111111*
-L1476 110111111111111111110111111111111101*
-L1512 111111011111111111111111101111111111*
-L1548 011111111111111111111111111101111111*
-L1584 111111110101111111111111111111111011*
-L1620 000000000000000000000000000000000000*
-L1656 000000000000000000000000000000000000*
-L1692 000000000000000000000000000000000000*
-L1728 000000000000000000000000000000000000*
-L1764 000000000000000000000000000000000000*
-L1800 000000000000000000000000000000000000*
-L1836 000000000000000000000000000000000000*
-L1872 000000000000000000000000000000000000*
-L1908 000000000000000000000000000000000000*
-L1944 000000000000000000000000000000000000*
-L1980 000000000000000000000000000000000000*
-L2016 000000000000000000000000000000000000*
-L2052 000000000000000000000000000000000000*
-L2088 000000000000000000000000000000000000*
-L2124 000000000000000000000000000000000000*
-L2160 000000000000000000000000000000000000*
-L2196 000000000000000000000000000000000000*
-L2232 000000000000000000000000000000000000*
-L2268 000000000000000000000000000000000000*
-L2304 000000000000000000000000000000000000*
-L2340 000000000000000000000000000000000000*
-L2376 000000000000000000000000000000000000*
-L2412 000000000000000000000000000000000000*
-L2448 000000000000000000000000000000000000*
-L2484 000000000000000000000000000000000000*
-L2520 000000000000000000000000000000000000*
-L2556 000000000000000000000000000000000000*
-L2592 00000000*
-C4D56*
-60A0
diff --git a/regtests/jedutil/jeds/ampal18p8/pal16l8-as-ampal18p8.jed b/regtests/jedutil/jeds/ampal18p8/pal16l8-as-ampal18p8.jed
deleted file mode 100644
index 24a3d01d789..00000000000
--- a/regtests/jedutil/jeds/ampal18p8/pal16l8-as-ampal18p8.jed
+++ /dev/null
@@ -1,90 +0,0 @@
-
-PALASM4 PAL ASSEMBLER - MARKET RELEASE 1.5a (8-20-92)
- (C) - COPYRIGHT ADVANCED MICRO DEVICES INC., 1992
-
-
-TITLE :PAL16L8 Test 1 AUTHOR :MAMEDev
-PATTERN :A COMPANY:MAMEDev
-REVISION:1.0 DATE :08/25/13
-
-
-PAL18P8
-PAL16L8*
-QP20*
-QF2600*
-G0*F0*
-L0000 111101111111111111111111111111111111*
-L0036 111111011111111111111111111111111111*
-L0072 111111111101111111111111111111111111*
-L0108 111111111111110111111111111111111111*
-L0144 111111111111111111011111111111111111*
-L0180 111111111111111111111101111111111111*
-L0216 111111111111111111111111110111111111*
-L0252 111111101110111011101110111011111111*
-L0288 000000000000000000000000000000000000*
-L0324 111111111111111111111111111111111111*
-L0360 111101111111111111111111111111111111*
-L0396 111111111111111111111111011111111111*
-L0432 111111111111111111111111111101011111*
-L0468 110111111111111111111111111111111111*
-L0504 111111111011111111111111111111111111*
-L0540 011111111111111111111111111111111111*
-L0576 111111111111011111111011111111111111*
-L0612 000000000000000000000000000000000000*
-L0648 111111111111111111111111111111111111*
-L0684 111111111111111111110111111111111111*
-L0720 011111011111111111111111111111111111*
-L0756 111101110111111111111111111111111111*
-L0792 111111111111101111111111111111111111*
-L0828 111111111111111111111111111110111111*
-L0864 111111101111111111111111111111111111*
-L0900 111011111111111111111111111111101111*
-L0936 000000000000000000000000000000000000*
-L0972 111111111111111111111111111111101111*
-L1008 111111111111111101111111111111111111*
-L1044 111101111111111111111111111111011111*
-L1080 111111111101111101111111111111111111*
-L1116 111011111111111111111111111111111111*
-L1152 111111111110111111111111111111111111*
-L1188 111111111111111111111011101111111111*
-L1224 101111111111111111111111111110111111*
-L1260 000000000000000000000000000000000000*
-L1296 111111111111111111111111111111111111*
-L1332 111111111111011111111111111111111111*
-L1368 111111111111111011111111111111111111*
-L1404 110111111111111111110111111111111111*
-L1440 111110111111111111111111111111111111*
-L1476 111110111111110111111111111111111111*
-L1512 011111111111111111111111111101111111*
-L1548 111111111111111111111111101111111111*
-L1584 000000000000000000000000000000000000*
-L1620 110111111111111111111111111111111111*
-L1656 111111110111111111111111111111111111*
-L1692 111111111111111111111111101111011111*
-L1728 111111111111111111011111111111111111*
-L1764 101111111111111111111111111111111111*
-L1800 111111111111011111111111111111101111*
-L1836 111111111111111111110111111111111111*
-L1872 111110111111111111111111111110111111*
-L1908 000000000000000000000000000000000000*
-L1944 111111111111111111111111111111111111*
-L1980 111101111111111111111111111111111111*
-L2016 111111111111111111111101111111111111*
-L2052 111111111111111111111111111111101111*
-L2088 011111111111111111111111111111111111*
-L2124 111111111011111111111110111111111111*
-L2160 111111111111111111111111011101111111*
-L2196 111111111111011111111111111111111111*
-L2232 000000000000000000000000000000000000*
-L2268 111111111111101111111111111111111111*
-L2304 100111111111111111111111111111111111*
-L2340 111001111111111111111111111111111111*
-L2376 111110111111111111110111111111111111*
-L2412 111111110111111111111111110111111111*
-L2448 111111111111111101111111111011111111*
-L2484 111111111111111101111011111111111111*
-L2520 111111111111111110111111101110111111*
-L2556 000000000000000000000000000000000000*
-L2592 11000001*
-C1616*
-6599
diff --git a/scripts/build/makedep.py b/scripts/build/makedep.py
index 88035d776af..eba69370621 100644
--- a/scripts/build/makedep.py
+++ b/scripts/build/makedep.py
@@ -204,9 +204,7 @@ def parse_file_for_drivers(root, srcfile):
if len(content)>0:
if content.startswith('COMP') or content.startswith('CONS') or content.startswith('GAME') or content.startswith('SYST') or content.startswith('GAMEL'):
name = content[4:]
- splitname = name.rsplit(',', 14)
- if len(splitname)>1:
- drivers.append(splitname[1])
+ drivers.append(name.rsplit(',', 14)[1])
return 0
def parse_lua_file(srcfile):
diff --git a/scripts/genie.lua b/scripts/genie.lua
index 984196e2af7..2fcfb323653 100644
--- a/scripts/genie.lua
+++ b/scripts/genie.lua
@@ -83,11 +83,6 @@ newoption {
}
newoption {
- trigger = "with-benchmarks",
- description = "Enable building benchmarks.",
-}
-
-newoption {
trigger = "osd",
description = "Choose OSD layer implementation",
}
@@ -198,11 +193,6 @@ newoption {
}
newoption {
- trigger = "TOOLCHAIN",
- description = "Toolchain prefix"
-}
-
-newoption {
trigger = "PROFILE",
description = "Enable profiling.",
}
@@ -276,6 +266,15 @@ newoption {
}
newoption {
+ trigger = "USE_BGFX",
+ description = "Use of BGFX.",
+ allowed = {
+ { "0", "Disabled" },
+ { "1", "Enabled" },
+ }
+}
+
+newoption {
trigger = "DEPRECATED",
description = "Generate deprecation warnings during compilation.",
allowed = {
@@ -418,8 +417,9 @@ if _OPTIONS["NOASM"]=="1" and not _OPTIONS["FORCE_DRC_C_BACKEND"] then
_OPTIONS["FORCE_DRC_C_BACKEND"] = "1"
end
-if(_OPTIONS["TOOLCHAIN"] == nil) then
- _OPTIONS['TOOLCHAIN'] = ""
+USE_BGFX = 1
+if(_OPTIONS["USE_BGFX"]~=nil) then
+ USE_BGFX = tonumber(_OPTIONS["USE_BGFX"])
end
GEN_DIR = MAME_BUILD_DIR .. "generated/"
@@ -666,10 +666,9 @@ end
--DEFS += -DUSE_SYSTEM_JPEGLIB
--endif
+ --To support casting in Lua 5.3
defines {
- "LUA_COMPAT_ALL",
- "LUA_COMPAT_5_1",
- "LUA_COMPAT_5_2",
+ "LUA_COMPAT_APIINTCASTS",
}
if _ACTION == "gmake" then
@@ -1045,7 +1044,6 @@ configuration { "nacl*" }
configuration { "linux-*" }
links {
"dl",
- "rt",
}
if _OPTIONS["distro"]=="debian-stable" then
defines
@@ -1059,10 +1057,7 @@ configuration { "linux-*" }
configuration { "steamlink" }
links {
"dl",
- "EGL",
- "GLESv2",
- "SDL2",
- }
+ }
defines {
"EGL_API_FB",
}
@@ -1084,11 +1079,6 @@ configuration { "mingw*" }
"advapi32",
"shlwapi",
"wsock32",
- "ws2_32",
- "psapi",
- "iphlpapi",
- "shell32",
- "userenv",
}
configuration { "mingw-clang" }
linkoptions {
@@ -1110,11 +1100,6 @@ configuration { "vs*" }
"advapi32",
"shlwapi",
"wsock32",
- "ws2_32",
- "psapi",
- "iphlpapi",
- "shell32",
- "userenv",
}
buildoptions {
@@ -1234,7 +1219,6 @@ configuration { "vs2015" }
"/wd4463", -- warning C4463: overflow; assigning 1 to bit-field that can only hold values from -1 to 0
"/wd4297", -- warning C4297: 'xxx::~xxx': function assumed not to throw an exception but does
"/wd4319", -- warning C4319: 'operator' : zero extending 'type' to 'type' of greater size
- "/wd4592", -- warning C4592: symbol will be dynamically initialized (implementation limitation)
}
configuration { "winphone8* or winstore8*" }
removelinks {
@@ -1298,7 +1282,10 @@ else
startproject (_OPTIONS["subtarget"])
end
mainProject(_OPTIONS["target"],_OPTIONS["subtarget"])
-strip()
+
+if (_OPTIONS["STRIP_SYMBOLS"]=="1") then
+ strip()
+end
if _OPTIONS["with-tools"] then
group "tools"
@@ -1309,8 +1296,3 @@ if _OPTIONS["with-tests"] then
group "tests"
dofile(path.join("src", "tests.lua"))
end
-
-if _OPTIONS["with-benchmarks"] then
- group "benchmarks"
- dofile(path.join("src", "benchmarks.lua"))
-end
diff --git a/scripts/src/3rdparty.lua b/scripts/src/3rdparty.lua
index 04038127dfb..2bee6477f01 100644
--- a/scripts/src/3rdparty.lua
+++ b/scripts/src/3rdparty.lua
@@ -280,11 +280,6 @@ end
buildoptions {
"-Wno-enum-conversion",
}
- if _OPTIONS["targetos"]=="macosx" then
- buildoptions_c {
- "-Wno-unknown-attributes",
- }
- end
end
configuration { }
@@ -403,8 +398,6 @@ end
configuration { }
defines {
"LUA_COMPAT_ALL",
- "LUA_COMPAT_5_1",
- "LUA_COMPAT_5_2",
}
if not (_OPTIONS["targetos"]=="windows") and not (_OPTIONS["targetos"]=="asmjs") then
defines {
@@ -465,19 +458,20 @@ links {
end
--------------------------------------------------
--- small lua library objects
+-- sqlite3 lua library objects
--------------------------------------------------
-project "lualibs"
+project "lsqlite3"
uuid "1d84edab-94cf-48fb-83ee-b75bc697660e"
kind "StaticLib"
+ -- options {
+ -- "ForceCPP",
+ -- }
+
configuration { "vs*" }
buildoptions {
"/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data
- "/wd4055", -- warning C4055: 'type cast': from data pointer 'void *' to function pointer 'xxx'
- "/wd4152", -- warning C4152: nonstandard extension, function/data pointer conversion in expression
- "/wd4130", -- warning C4130: '==': logical operation on address of string constant
}
configuration { }
@@ -493,69 +487,9 @@ project "lualibs"
MAME_DIR .. "3rdparty/lua/src",
}
end
- if _OPTIONS["with-bundled-zlib"] then
- includedirs {
- MAME_DIR .. "3rdparty/zlib",
- }
- end
files {
MAME_DIR .. "3rdparty/lsqlite3/lsqlite3.c",
- MAME_DIR .. "3rdparty/lua-zlib/lua_zlib.c",
- MAME_DIR .. "3rdparty/luafilesystem/src/lfs.c",
- }
-
---------------------------------------------------
--- luv lua library objects
---------------------------------------------------
-
-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-maybe-uninitialized",
- "-Wno-undef",
- }
-
- 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",
}
--------------------------------------------------
@@ -705,6 +639,7 @@ end
-- BGFX library objects
--------------------------------------------------
+if (USE_BGFX == 1) then
project "bgfx"
uuid "d3e7e119-35cf-4f4f-aba0-d3bdcd1b879a"
kind "StaticLib"
@@ -729,14 +664,10 @@ end
MAME_DIR .. "3rdparty/bgfx/include",
MAME_DIR .. "3rdparty/bgfx/3rdparty",
MAME_DIR .. "3rdparty/bx/include",
+ MAME_DIR .. "3rdparty/bgfx/3rdparty/khronos",
MAME_DIR .. "3rdparty/bgfx/3rdparty/dxsdk/include",
}
- configuration { "not steamlink"}
- includedirs {
- MAME_DIR .. "3rdparty/bgfx/3rdparty/khronos",
- }
-
configuration { "vs*" }
includedirs {
MAME_DIR .. "3rdparty/bx/include/compat/msvc",
@@ -832,6 +763,7 @@ end
MAME_DIR .. "3rdparty/bgfx/src/renderer_mtl.mm",
}
end
+end
--------------------------------------------------
-- PortAudio library objects
@@ -987,194 +919,37 @@ links {
end
--------------------------------------------------
--- libuv library objects
+-- GoogleTest library objects
--------------------------------------------------
-project "uv"
- uuid "cd2afe7f-139d-49c3-9000-fc9119f3cea0"
- kind "StaticLib"
- includedirs {
- MAME_DIR .. "3rdparty/libuv/include",
- MAME_DIR .. "3rdparty/libuv/src",
- MAME_DIR .. "3rdparty/libuv/src/win",
- }
+project "gtest"
+ uuid "fa306a8d-fb10-4d4a-9d2e-fdb9076407b4"
+ kind "StaticLib"
configuration { "gmake" }
- buildoptions_c {
- "-Wno-strict-prototypes",
- "-Wno-bad-function-cast",
- "-Wno-write-strings",
- "-Wno-missing-braces",
+ buildoptions {
"-Wno-undef",
"-Wno-unused-variable",
}
-
- local version = str_to_version(_OPTIONS["gcc_version"])
- if (_OPTIONS["gcc"]~=nil) then
- if string.find(_OPTIONS["gcc"], "clang") then
- buildoptions_c {
- "-Wno-unknown-warning-option",
- "-Wno-unknown-attributes",
- "-Wno-null-dereference",
- "-Wno-unused-but-set-variable",
- "-Wno-maybe-uninitialized",
- }
- else
- buildoptions_c {
- "-Wno-unused-but-set-variable",
- "-Wno-maybe-uninitialized",
- }
- end
- end
+ configuration { "mingw-clang" }
+ buildoptions {
+ "-O0", -- crash of compiler when doing optimization
+ }
configuration { "vs*" }
+if _OPTIONS["vs"]=="intel-15" then
buildoptions {
- "/wd4054", -- warning C4054: 'type cast' : from function pointer 'xxx' to data pointer 'void *'
- "/wd4204", -- warning C4204: nonstandard extension used : non-constant aggregate initializer
- "/wd4210", -- warning C4210: nonstandard extension used : function given file scope
- "/wd4701", -- warning C4701: potentially uninitialized local variable 'xxx' used
- "/wd4703", -- warning C4703: potentially uninitialized local pointer variable 'xxx' used
- "/wd4477", -- warning C4477: '<function>' : format string '<format-string>' requires an argument of type '<type>', but variadic argument <position> has type '<type>'
+ "/Qwd1195", -- error #1195: conversion from integer to smaller pointer
}
+end
configuration { }
- files {
- MAME_DIR .. "3rdparty/libuv/src/fs-poll.c",
- MAME_DIR .. "3rdparty/libuv/src/inet.c",
- MAME_DIR .. "3rdparty/libuv/src/threadpool.c",
- MAME_DIR .. "3rdparty/libuv/src/uv-common.c",
- MAME_DIR .. "3rdparty/libuv/src/version.c",
+ includedirs {
+ MAME_DIR .. "3rdparty/googletest/googletest/include",
+ MAME_DIR .. "3rdparty/googletest/googletest",
}
-
- if _OPTIONS["targetos"]=="windows" then
- defines {
- "WIN32_LEAN_AND_MEAN",
- "_WIN32_WINNT=0x0502",
- }
- if _ACTION == "vs2013" then
- files {
- MAME_DIR .. "3rdparty/libuv/src/win/snprintf.c",
- }
- end
- configuration { }
- files {
- MAME_DIR .. "3rdparty/libuv/src/win/async.c",
- MAME_DIR .. "3rdparty/libuv/src/win/core.c",
- MAME_DIR .. "3rdparty/libuv/src/win/dl.c",
- MAME_DIR .. "3rdparty/libuv/src/win/error.c",
- MAME_DIR .. "3rdparty/libuv/src/win/fs-event.c",
- MAME_DIR .. "3rdparty/libuv/src/win/fs.c",
- MAME_DIR .. "3rdparty/libuv/src/win/getaddrinfo.c",
- MAME_DIR .. "3rdparty/libuv/src/win/getnameinfo.c",
- MAME_DIR .. "3rdparty/libuv/src/win/handle.c",
- MAME_DIR .. "3rdparty/libuv/src/win/loop-watcher.c",
- MAME_DIR .. "3rdparty/libuv/src/win/pipe.c",
- MAME_DIR .. "3rdparty/libuv/src/win/poll.c",
- MAME_DIR .. "3rdparty/libuv/src/win/process-stdio.c",
- MAME_DIR .. "3rdparty/libuv/src/win/process.c",
- MAME_DIR .. "3rdparty/libuv/src/win/req.c",
- MAME_DIR .. "3rdparty/libuv/src/win/signal.c",
- MAME_DIR .. "3rdparty/libuv/src/win/stream.c",
- MAME_DIR .. "3rdparty/libuv/src/win/tcp.c",
- MAME_DIR .. "3rdparty/libuv/src/win/thread.c",
- MAME_DIR .. "3rdparty/libuv/src/win/timer.c",
- MAME_DIR .. "3rdparty/libuv/src/win/tty.c",
- MAME_DIR .. "3rdparty/libuv/src/win/udp.c",
- MAME_DIR .. "3rdparty/libuv/src/win/util.c",
- MAME_DIR .. "3rdparty/libuv/src/win/winapi.c",
- MAME_DIR .. "3rdparty/libuv/src/win/winsock.c",
- }
- end
-
- if _OPTIONS["targetos"]~="windows" then
- files {
- MAME_DIR .. "3rdparty/libuv/src/unix/async.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/atomic-ops.h",
- MAME_DIR .. "3rdparty/libuv/src/unix/core.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/dl.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/fs.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/getaddrinfo.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/getnameinfo.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/internal.h",
- MAME_DIR .. "3rdparty/libuv/src/unix/loop-watcher.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/loop.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/pipe.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/poll.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/process.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/signal.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/spinlock.h",
- MAME_DIR .. "3rdparty/libuv/src/unix/stream.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/tcp.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/thread.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/timer.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/tty.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/udp.c",
- }
- end
- if _OPTIONS["targetos"]=="linux" then
- defines {
- "_GNU_SOURCE",
- }
- files {
- MAME_DIR .. "3rdparty/libuv/src/unix/linux-core.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/linux-inotify.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/linux-syscalls.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/linux-syscalls.h",
- MAME_DIR .. "3rdparty/libuv/src/unix/proctitle.c",
- }
- end
- if _OPTIONS["targetos"]=="macosx" then
- defines {
- "_DARWIN_USE_64_BIT_INODE=1",
- "_DARWIN_UNLIMITED_SELECT=1",
- }
- files {
- MAME_DIR .. "3rdparty/libuv/src/unix/darwin.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/darwin-proctitle.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/fsevents.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/kqueue.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/proctitle.c",
- }
- end
- if _OPTIONS["targetos"]=="solaris" then
- defines {
- "__EXTENSIONS__",
- "_XOPEN_SOURCE=500",
- }
- files {
- MAME_DIR .. "3rdparty/libuv/src/unix/sunos.c",
- }
- end
- if _OPTIONS["targetos"]=="freebsd" then
- files {
- MAME_DIR .. "3rdparty/libuv/src/unix/freebsd.c",
- MAME_DIR .. "3rdparty/libuv/src/unix/kqueue.c",
- }
- end
-
- if (_OPTIONS["SHADOW_CHECK"]=="1") then
- removebuildoptions {
- "-Wshadow"
- }
- end
-
---------------------------------------------------
--- HTTP parser library objects
---------------------------------------------------
-
-project "http-parser"
- uuid "90c6ba59-bdb2-4fee-8b44-57601d690e14"
- kind "StaticLib"
-
- configuration { }
-
files {
- MAME_DIR .. "3rdparty/http-parser/http_parser.c",
+ MAME_DIR .. "3rdparty/googletest/googletest/src/gtest-all.cc",
}
- if (_OPTIONS["SHADOW_CHECK"]=="1") then
- removebuildoptions {
- "-Wshadow"
- }
- end
diff --git a/scripts/src/benchmarks.lua b/scripts/src/benchmarks.lua
deleted file mode 100644
index f774e3f45ca..00000000000
--- a/scripts/src/benchmarks.lua
+++ /dev/null
@@ -1,74 +0,0 @@
--- license:BSD-3-Clause
--- copyright-holders:MAMEdev Team
-
----------------------------------------------------------------------------
---
--- benchmarks.lua
---
--- Rules for building benchmarks
---
----------------------------------------------------------------------------
-
---------------------------------------------------
--- Google Benchmark library objects
---------------------------------------------------
-
-project "benchmark"
- uuid "60a7e05c-8b4f-497c-bfda-2949a009ba0d"
- kind "StaticLib"
-
- configuration { }
- defines {
- "HAVE_STD_REGEX",
- }
-
- includedirs {
- MAME_DIR .. "3rdparty/benchmark/include",
- }
- files {
- MAME_DIR .. "3rdparty/benchmark/src/benchmark.cc",
- MAME_DIR .. "3rdparty/benchmark/src/colorprint.cc",
- MAME_DIR .. "3rdparty/benchmark/src/commandlineflags.cc",
- MAME_DIR .. "3rdparty/benchmark/src/console_reporter.cc",
- MAME_DIR .. "3rdparty/benchmark/src/csv_reporter.cc",
- MAME_DIR .. "3rdparty/benchmark/src/json_reporter.cc",
- MAME_DIR .. "3rdparty/benchmark/src/log.cc",
- MAME_DIR .. "3rdparty/benchmark/src/reporter.cc",
- MAME_DIR .. "3rdparty/benchmark/src/sleep.cc",
- MAME_DIR .. "3rdparty/benchmark/src/string_util.cc",
- MAME_DIR .. "3rdparty/benchmark/src/sysinfo.cc",
- MAME_DIR .. "3rdparty/benchmark/src/walltime.cc",
- MAME_DIR .. "3rdparty/benchmark/src/re_std.cc",
- }
-
-
-
-project("benchmarks")
- uuid ("a9750a48-d283-4a6d-b126-31c7ce049af1")
- kind "ConsoleApp"
-
- flags {
- "Symbols", -- always include minimum symbols for executables
- }
-
- if _OPTIONS["SEPARATE_BIN"]~="1" then
- targetdir(MAME_DIR)
- end
-
- configuration { }
-
- links {
- "benchmark",
- }
-
- includedirs {
- MAME_DIR .. "3rdparty/benchmark/include",
- MAME_DIR .. "src/osd",
- }
-
- files {
- MAME_DIR .. "benchmarks/main.cpp",
- MAME_DIR .. "benchmarks/eminline_native.cpp",
- MAME_DIR .. "benchmarks/eminline_noasm.cpp",
- }
-
diff --git a/scripts/src/bus.lua b/scripts/src/bus.lua
index 9514e9f5a74..bafa63a269d 100644
--- a/scripts/src/bus.lua
+++ b/scripts/src/bus.lua
@@ -2558,17 +2558,3 @@ if (BUSES["CGENIE_PARALLEL"]~=null) then
MAME_DIR .. "src/devices/bus/cgenie/parallel/printer.h",
}
end
-
----------------------------------------------------
---
---@src/devices/bus/m5/slot.h,BUSES["M5"] = true
----------------------------------------------------
-if (BUSES["M5"]~=null) then
- files {
- MAME_DIR .. "src/devices/bus/m5/slot.cpp",
- MAME_DIR .. "src/devices/bus/m5/slot.h",
- MAME_DIR .. "src/devices/bus/m5/rom.cpp",
- MAME_DIR .. "src/devices/bus/m5/rom.h",
- }
-end
-
diff --git a/scripts/src/cpu.lua b/scripts/src/cpu.lua
index ed6378f93f8..0c2882df5e5 100644
--- a/scripts/src/cpu.lua
+++ b/scripts/src/cpu.lua
@@ -10,6 +10,14 @@
---------------------------------------------------------------------------
--------------------------------------------------
+-- Shared code
+--------------------------------------------------
+
+files {
+ MAME_DIR .. "src/devices/cpu/vtlb.cpp",
+}
+
+--------------------------------------------------
-- Dynamic recompiler objects
--------------------------------------------------
@@ -35,6 +43,7 @@ if (CPUS["SH2"]~=null or CPUS["MIPS"]~=null or CPUS["POWERPC"]~=null or CPUS["RS
MAME_DIR .. "src/devices/cpu/drcbex64.cpp",
MAME_DIR .. "src/devices/cpu/drcbex64.h",
MAME_DIR .. "src/devices/cpu/drcumlsh.h",
+ MAME_DIR .. "src/devices/cpu/vtlb.h",
MAME_DIR .. "src/devices/cpu/x86emit.h",
}
end
diff --git a/scripts/src/emu.lua b/scripts/src/emu.lua
index e0358285114..01e61852d60 100644
--- a/scripts/src/emu.lua
+++ b/scripts/src/emu.lua
@@ -38,18 +38,6 @@ if _OPTIONS["with-bundled-lua"] then
}
end
-if (_OPTIONS["targetos"] == "windows") then
- defines {
- "UI_WINDOWS",
- }
-end
-
-if (_OPTIONS["osd"] == "sdl") then
- defines {
- "UI_SDL",
- }
-end
-
files {
MAME_DIR .. "src/emu/emu.h",
MAME_DIR .. "src/emu/gamedrv.h",
@@ -117,8 +105,6 @@ files {
MAME_DIR .. "src/emu/distate.h",
MAME_DIR .. "src/emu/divideo.cpp",
MAME_DIR .. "src/emu/divideo.h",
- MAME_DIR .. "src/emu/divtlb.cpp",
- MAME_DIR .. "src/emu/divtlb.h",
MAME_DIR .. "src/emu/drawgfx.cpp",
MAME_DIR .. "src/emu/drawgfx.h",
MAME_DIR .. "src/emu/drawgfxm.h",
@@ -222,6 +208,8 @@ files {
MAME_DIR .. "src/emu/ui/info_pty.h",
MAME_DIR .. "src/emu/ui/inputmap.cpp",
MAME_DIR .. "src/emu/ui/inputmap.h",
+ MAME_DIR .. "src/emu/ui/selgame.cpp",
+ MAME_DIR .. "src/emu/ui/selgame.h",
MAME_DIR .. "src/emu/ui/sliders.cpp",
MAME_DIR .. "src/emu/ui/sliders.h",
MAME_DIR .. "src/emu/ui/slotopt.cpp",
@@ -234,48 +222,6 @@ files {
MAME_DIR .. "src/emu/ui/videoopt.h",
MAME_DIR .. "src/emu/ui/viewgfx.cpp",
MAME_DIR .. "src/emu/ui/viewgfx.h",
- MAME_DIR .. "src/emu/ui/auditmenu.cpp",
- MAME_DIR .. "src/emu/ui/auditmenu.h",
- MAME_DIR .. "src/emu/ui/cmddata.h",
- MAME_DIR .. "src/emu/ui/cmdrender.h",
- MAME_DIR .. "src/emu/ui/ctrlmenu.cpp",
- MAME_DIR .. "src/emu/ui/ctrlmenu.h",
- MAME_DIR .. "src/emu/ui/custmenu.cpp",
- MAME_DIR .. "src/emu/ui/custmenu.h",
- MAME_DIR .. "src/emu/ui/custui.cpp",
- MAME_DIR .. "src/emu/ui/custui.h",
- MAME_DIR .. "src/emu/ui/datfile.cpp",
- MAME_DIR .. "src/emu/ui/datfile.h",
- MAME_DIR .. "src/emu/ui/datmenu.cpp",
- MAME_DIR .. "src/emu/ui/datmenu.h",
- MAME_DIR .. "src/emu/ui/defimg.h",
- MAME_DIR .. "src/emu/ui/dirmenu.cpp",
- MAME_DIR .. "src/emu/ui/dirmenu.h",
- MAME_DIR .. "src/emu/ui/dsplmenu.cpp",
- MAME_DIR .. "src/emu/ui/dsplmenu.h",
- MAME_DIR .. "src/emu/ui/icorender.h",
- MAME_DIR .. "src/emu/ui/inifile.cpp",
- MAME_DIR .. "src/emu/ui/inifile.h",
- MAME_DIR .. "src/emu/ui/miscmenu.cpp",
- MAME_DIR .. "src/emu/ui/miscmenu.h",
- MAME_DIR .. "src/emu/ui/moptions.cpp",
- MAME_DIR .. "src/emu/ui/moptions.h",
- MAME_DIR .. "src/emu/ui/optsmenu.cpp",
- MAME_DIR .. "src/emu/ui/optsmenu.h",
- MAME_DIR .. "src/emu/ui/selector.cpp",
- MAME_DIR .. "src/emu/ui/selector.h",
- MAME_DIR .. "src/emu/ui/selgame.cpp",
- MAME_DIR .. "src/emu/ui/selgame.h",
- MAME_DIR .. "src/emu/ui/simpleselgame.cpp",
- MAME_DIR .. "src/emu/ui/simpleselgame.h",
- MAME_DIR .. "src/emu/ui/selsoft.cpp",
- MAME_DIR .. "src/emu/ui/selsoft.h",
- MAME_DIR .. "src/emu/ui/sndmenu.cpp",
- MAME_DIR .. "src/emu/ui/sndmenu.h",
- MAME_DIR .. "src/emu/ui/starimg.h",
- MAME_DIR .. "src/emu/ui/toolbar.h",
- MAME_DIR .. "src/emu/ui/utils.cpp",
- MAME_DIR .. "src/emu/ui/utils.h",
MAME_DIR .. "src/emu/validity.cpp",
MAME_DIR .. "src/emu/validity.h",
MAME_DIR .. "src/emu/video.cpp",
@@ -387,7 +333,6 @@ dependency {
-- additional dependencies
--------------------------------------------------
{ MAME_DIR .. "src/emu/rendfont.cpp", GEN_DIR .. "emu/uismall.fh" },
- { MAME_DIR .. "src/emu/rendfont.cpp", GEN_DIR .. "emu/ui/uicmd14.fh" },
-------------------------------------------------
-- core layouts
--------------------------------------------------
@@ -407,8 +352,7 @@ dependency {
}
custombuildtask {
- { MAME_DIR .. "src/emu/uismall.png" , GEN_DIR .. "emu/uismall.fh", { MAME_DIR.. "scripts/build/png2bdc.py", MAME_DIR .. "scripts/build/file2str.py" }, {"@echo Converting uismall.png...", PYTHON .. " $(1) $(<) temp.bdc", PYTHON .. " $(2) temp.bdc $(@) font_uismall UINT8" }},
- { MAME_DIR .. "src/emu/ui/uicmd14.png" , GEN_DIR .. "emu/ui/uicmd14.fh", { MAME_DIR.. "scripts/build/png2bdc.py", MAME_DIR .. "scripts/build/file2str.py" }, {"@echo Converting uicmd14.png...", PYTHON .. " $(1) $(<) temp_cmd.bdc", PYTHON .. " $(2) temp_cmd.bdc $(@) font_uicmd14 UINT8" }},
+ { MAME_DIR .. "src/emu/uismall.png" , GEN_DIR .. "emu/uismall.fh", { MAME_DIR.. "scripts/build/png2bdc.py", MAME_DIR .. "scripts/build/file2str.py" }, {"@echo Converting uismall.png...", PYTHON .. " $(1) $(<) temp.bdc", PYTHON .. " $(2) temp.bdc $(@) font_uismall UINT8" }},
layoutbuildtask("emu/layout", "dualhovu"),
layoutbuildtask("emu/layout", "dualhsxs"),
diff --git a/scripts/src/machine.lua b/scripts/src/machine.lua
index fbc923b3073..5a97d22d015 100644
--- a/scripts/src/machine.lua
+++ b/scripts/src/machine.lua
@@ -773,18 +773,6 @@ end
---------------------------------------------------
--
---@src/devices/machine/hp_taco.h,MACHINES["HP_TACO"] = true
----------------------------------------------------
-
-if (MACHINES["HP_TACO"]~=null) then
- files {
- MAME_DIR .. "src/devices/machine/hp_taco.cpp",
- MAME_DIR .. "src/devices/machine/hp_taco.h",
- }
-end
-
----------------------------------------------------
---
--@src/devices/machine/i2cmem.h,MACHINES["I2CMEM"] = true
---------------------------------------------------
diff --git a/scripts/src/main.lua b/scripts/src/main.lua
index 9873ba269c9..da633c55212 100644
--- a/scripts/src/main.lua
+++ b/scripts/src/main.lua
@@ -88,7 +88,7 @@ end
targetextension ".bc"
if os.getenv("EMSCRIPTEN") then
postbuildcommands {
- os.getenv("EMSCRIPTEN") .. "/emcc -O3 -s DISABLE_EXCEPTION_CATCHING=2 -s USE_SDL=2 --memory-init-file 0 -s ALLOW_MEMORY_GROWTH=0 -s TOTAL_MEMORY=268435456 -s EXCEPTION_CATCHING_WHITELIST='[\"__ZN15running_machine17start_all_devicesEv\"]' -s EXPORTED_FUNCTIONS=\"['_main', '_malloc', '__Z14js_get_machinev', '__Z9js_get_uiv', '__Z12js_get_soundv', '__ZN10ui_manager12set_show_fpsEb', '__ZNK10ui_manager8show_fpsEv', '__ZN13sound_manager4muteEbh', '_SDL_PauseAudio']\" $(TARGET) -o " .. _MAKE.esc(MAME_DIR) .. _OPTIONS["target"] .. _OPTIONS["subtarget"] .. ".js --pre-js " .. _MAKE.esc(MAME_DIR) .. "src/osd/modules/sound/js_sound.js --post-js " .. _MAKE.esc(MAME_DIR) .. "src/osd/sdl/emscripten_post.js",
+ os.getenv("EMSCRIPTEN") .. "/emcc -O3 -s DISABLE_EXCEPTION_CATCHING=2 -s USE_SDL=2 --memory-init-file 0 -s ALLOW_MEMORY_GROWTH=0 -s TOTAL_MEMORY=268435456 -s EXCEPTION_CATCHING_WHITELIST='[\"__ZN15running_machine17start_all_devicesEv\"]' -s EXPORTED_FUNCTIONS=\"['_main', '_malloc', '__Z14js_get_machinev', '__Z9js_get_uiv', '__Z12js_get_soundv', '__ZN10ui_manager12set_show_fpsEb', '__ZNK10ui_manager8show_fpsEv', '__ZN13sound_manager4muteEbh', '_SDL_PauseAudio']\" $(TARGET) -o " .. _MAKE.esc(MAME_DIR) .. _OPTIONS["target"] .. _OPTIONS["subtarget"] .. ".js --post-js " .. _MAKE.esc(MAME_DIR) .. "src/osd/sdl/emscripten_post.js",
}
end
@@ -128,10 +128,7 @@ end
"jpeg",
"7z",
"lua",
- "lualibs",
- "luv",
- "uv",
- "http-parser",
+ "lsqlite3",
}
if _OPTIONS["with-bundled-zlib"] then
@@ -169,8 +166,12 @@ end
"portmidi",
}
end
- links {
- "bgfx",
+ if (USE_BGFX == 1) then
+ links {
+ "bgfx"
+ }
+ end
+ links{
"ocore_" .. _OPTIONS["osd"],
}
diff --git a/scripts/src/osd/modules.lua b/scripts/src/osd/modules.lua
index ea70ca132de..87e684a50f6 100644
--- a/scripts/src/osd/modules.lua
+++ b/scripts/src/osd/modules.lua
@@ -89,6 +89,7 @@ function osdmodulesbuild()
MAME_DIR .. "src/osd/modules/opengl/gl_shader_mgr.h",
MAME_DIR .. "src/osd/modules/opengl/gl_shader_tool.h",
MAME_DIR .. "src/osd/modules/opengl/osd_opengl.h",
+ MAME_DIR .. "src/osd/modules/opengl/SDL1211_opengl.h",
}
defines {
"USE_OPENGL=1",
@@ -100,15 +101,18 @@ function osdmodulesbuild()
end
end
- files {
- MAME_DIR .. "src/osd/modules/render/drawbgfx.cpp",
- MAME_DIR .. "src/osd/modules/render/binpacker.cpp",
- }
- includedirs {
- MAME_DIR .. "3rdparty/bgfx/include",
- MAME_DIR .. "3rdparty/bx/include",
- MAME_DIR .. "3rdparty/rapidjson/include",
- }
+ if USE_BGFX == 1 then
+ files {
+ MAME_DIR .. "src/osd/modules/render/drawbgfx.cpp",
+ }
+ defines {
+ "USE_BGFX"
+ }
+ includedirs {
+ MAME_DIR .. "3rdparty/bgfx/include",
+ MAME_DIR .. "3rdparty/bx/include",
+ }
+ end
if _OPTIONS["NO_USE_MIDI"]=="1" then
defines {
@@ -352,6 +356,14 @@ newoption {
},
}
+if not _OPTIONS["NO_OPENGL"] then
+ if _OPTIONS["targetos"]=="os2" then
+ _OPTIONS["NO_OPENGL"] = "1"
+ else
+ _OPTIONS["NO_OPENGL"] = "0"
+ end
+end
+
newoption {
trigger = "USE_DISPATCH_GL",
description = "Use GL-dispatching",
@@ -362,7 +374,11 @@ newoption {
}
if not _OPTIONS["USE_DISPATCH_GL"] then
- _OPTIONS["USE_DISPATCH_GL"] = "0"
+ if USE_BGFX == 1 then
+ _OPTIONS["USE_DISPATCH_GL"] = "0"
+ else
+ _OPTIONS["USE_DISPATCH_GL"] = "1"
+ end
end
newoption {
diff --git a/scripts/src/osd/osdmini.lua b/scripts/src/osd/osdmini.lua
index b05839e7873..803b7413014 100644
--- a/scripts/src/osd/osdmini.lua
+++ b/scripts/src/osd/osdmini.lua
@@ -79,7 +79,6 @@ project ("osd_" .. _OPTIONS["osd"])
MAME_DIR .. "src/osd/modules/sound/coreaudio_sound.cpp",
MAME_DIR .. "src/osd/modules/sound/sdl_sound.cpp",
MAME_DIR .. "src/osd/modules/sound/none.cpp",
- MAME_DIR .. "src/osd/modules/sound/xaudio2_sound.cpp",
}
project ("ocore_" .. _OPTIONS["osd"])
@@ -125,6 +124,7 @@ project ("ocore_" .. _OPTIONS["osd"])
MAME_DIR .. "src/osd/osdmini/minidir.cpp",
MAME_DIR .. "src/osd/osdmini/minifile.cpp",
MAME_DIR .. "src/osd/osdmini/minimisc.cpp",
+ MAME_DIR .. "src/osd/osdmini/minisync.cpp",
MAME_DIR .. "src/osd/osdmini/minitime.cpp",
MAME_DIR .. "src/osd/modules/sync/work_mini.cpp",
}
diff --git a/scripts/src/osd/osdmini_cfg.lua b/scripts/src/osd/osdmini_cfg.lua
index 586075d3cac..ff9539066b2 100644
--- a/scripts/src/osd/osdmini_cfg.lua
+++ b/scripts/src/osd/osdmini_cfg.lua
@@ -7,6 +7,4 @@ defines {
"USE_SDL",
"SDLMAME_NOASM=1",
"USE_OPENGL=0",
- "NO_USE_MIDI=1",
- "USE_XAUDIO2=0",
}
diff --git a/scripts/src/osd/sdl.lua b/scripts/src/osd/sdl.lua
index b89a25814ad..6acb5a2d262 100644
--- a/scripts/src/osd/sdl.lua
+++ b/scripts/src/osd/sdl.lua
@@ -39,23 +39,29 @@ function maintargetosdoptions(_target,_subtarget)
end
if BASE_TARGETOS=="unix" and _OPTIONS["targetos"]~="macosx" then
- links {
- "SDL2_ttf",
- }
+ if _OPTIONS["SDL_LIBVER"]=="sdl2" then
+ links {
+ "SDL2_ttf",
+ }
+ else
+ links {
+ "SDL_ttf",
+ }
+ end
local str = backtick("pkg-config --libs fontconfig")
addlibfromstring(str)
addoptionsfromstring(str)
end
if _OPTIONS["targetos"]=="windows" then
- if _OPTIONS["USE_LIBSDL"]~="1" then
+ if _OPTIONS["SDL_LIBVER"]=="sdl2" then
links {
"SDL2.dll",
}
else
- local str = backtick(sdlconfigcmd() .. " --libs | sed 's/ -lSDLmain//'")
- addlibfromstring(str)
- addoptionsfromstring(str)
+ links {
+ "SDL.dll",
+ }
end
links {
"psapi",
@@ -87,21 +93,16 @@ function maintargetosdoptions(_target,_subtarget)
configuration { "mingw*" or "vs*" }
targetprefix "sdl"
- links {
- "psapi"
- }
configuration { }
end
function sdlconfigcmd()
- if _OPTIONS["targetos"]=="asmjs" then
- return "sdl2-config"
- elseif not _OPTIONS["SDL_INSTALL_ROOT"] then
- return _OPTIONS['TOOLCHAIN'] .. "pkg-config sdl2"
+ if not _OPTIONS["SDL_INSTALL_ROOT"] then
+ return _OPTIONS["SDL_LIBVER"] .. "-config"
else
- return path.join(_OPTIONS["SDL_INSTALL_ROOT"],"bin","sdl2") .. "-config"
+ return path.join(_OPTIONS["SDL_INSTALL_ROOT"],"bin",_OPTIONS["SDL_LIBVER"]) .. "-config"
end
end
@@ -147,6 +148,23 @@ if not _OPTIONS["NO_USE_XINPUT"] then
end
newoption {
+ trigger = "SDL_LIBVER",
+ description = "Choose SDL version",
+ allowed = {
+ { "sdl", "SDL" },
+ { "sdl2", "SDL 2" },
+ },
+}
+
+if not _OPTIONS["SDL_LIBVER"] then
+ if _OPTIONS["targetos"]=="os2" then
+ _OPTIONS["SDL_LIBVER"] = "sdl"
+ else
+ _OPTIONS["SDL_LIBVER"] = "sdl2"
+ end
+end
+
+newoption {
trigger = "SDL2_MULTIAPI",
description = "Use couriersud's multi-keyboard patch for SDL 2.1? (this API was removed prior to the 2.0 release)",
allowed = {
@@ -174,16 +192,16 @@ if not _OPTIONS["SDL_FRAMEWORK_PATH"] then
end
newoption {
- trigger = "USE_LIBSDL",
- description = "Use SDL library on OS (rather than framework/dll)",
+ trigger = "MACOSX_USE_LIBSDL",
+ description = "Use SDL library on OS (rather than framework)",
allowed = {
- { "0", "Use framework/dll" },
+ { "0", "Use framework" },
{ "1", "Use library" },
},
}
-if not _OPTIONS["USE_LIBSDL"] then
- _OPTIONS["USE_LIBSDL"] = "0"
+if not _OPTIONS["MACOSX_USE_LIBSDL"] then
+ _OPTIONS["MACOSX_USE_LIBSDL"] = "0"
end
@@ -217,6 +235,10 @@ elseif _OPTIONS["targetos"]=="os2" then
SYNC_IMPLEMENTATION = "os2"
end
+if _OPTIONS["SDL_LIBVER"]=="sdl" then
+ USE_BGFX = 0
+end
+
if BASE_TARGETOS=="unix" then
if _OPTIONS["targetos"]=="macosx" then
local os_version = str_to_version(backtick("sw_vers -productVersion"))
@@ -233,27 +255,39 @@ if BASE_TARGETOS=="unix" then
"-weak_framework Metal",
}
end
- if _OPTIONS["USE_LIBSDL"]~="1" then
+ if _OPTIONS["MACOSX_USE_LIBSDL"]~="1" then
linkoptions {
"-F" .. _OPTIONS["SDL_FRAMEWORK_PATH"],
}
- links {
- "SDL2.framework",
- }
+ if _OPTIONS["SDL_LIBVER"]=="sdl2" then
+ links {
+ "SDL2.framework",
+ }
+ else
+ links {
+ "SDL.framework",
+ }
+ end
else
- local str = backtick(sdlconfigcmd() .. " --libs --static | sed 's/-lSDLmain//'")
+ local str = backtick(sdlconfigcmd() .. " --libs | sed 's/-lSDLmain//'")
addlibfromstring(str)
addoptionsfromstring(str)
end
else
if _OPTIONS["NO_X11"]=="1" then
_OPTIONS["USE_QTDEBUG"] = "0"
+ USE_BGFX = 0
else
libdirs {
"/usr/X11/lib",
"/usr/X11R6/lib",
"/usr/openwin/lib",
}
+ if _OPTIONS["SDL_LIBVER"]=="sdl" then
+ links {
+ "X11",
+ }
+ end
end
local str = backtick(sdlconfigcmd() .. " --libs")
addlibfromstring(str)
@@ -370,6 +404,13 @@ project ("osd_" .. _OPTIONS["osd"])
MAME_DIR .. "src/osd/modules/debugger/osx/watchpointsview.h",
MAME_DIR .. "src/osd/modules/debugger/osx/debugosx.h",
}
+ if _OPTIONS["SDL_LIBVER"]=="sdl" then
+ -- SDLMain_tmpl isn't necessary for SDL2
+ files {
+ MAME_DIR .. "src/osd/sdl/SDLMain_tmpl.mm",
+ MAME_DIR .. "src/osd/sdl/SDLMain_tmpl.h",
+ }
+ end
end
files {
@@ -390,10 +431,12 @@ project ("osd_" .. _OPTIONS["osd"])
MAME_DIR .. "src/osd/sdl/watchdog.h",
MAME_DIR .. "src/osd/modules/render/drawsdl.cpp",
}
- files {
- MAME_DIR .. "src/osd/modules/render/draw13.cpp",
- MAME_DIR .. "src/osd/modules/render/blit13.h",
- }
+ if _OPTIONS["SDL_LIBVER"]=="sdl2" then
+ files {
+ MAME_DIR .. "src/osd/modules/render/draw13.cpp",
+ MAME_DIR .. "src/osd/modules/render/blit13.h",
+ }
+ end
project ("ocore_" .. _OPTIONS["osd"])
@@ -486,14 +529,14 @@ if _OPTIONS["with-tools"] then
}
if _OPTIONS["targetos"] == "windows" then
- if _OPTIONS["USE_LIBSDL"]~="1" then
+ if _OPTIONS["SDL_LIBVER"] == "sdl2" then
links {
"SDL2.dll",
}
else
- local str = backtick(sdlconfigcmd() .. " --libs | sed 's/ -lSDLmain//'")
- addlibfromstring(str)
- addoptionsfromstring(str)
+ links {
+ "SDL.dll",
+ }
end
links {
"psapi",
@@ -504,14 +547,12 @@ if _OPTIONS["with-tools"] then
files {
MAME_DIR .. "src/osd/sdl/main.cpp",
}
+ elseif _OPTIONS["targetos"] == "macosx" and _OPTIONS["SDL_LIBVER"] == "sdl" then
+ -- SDLMain_tmpl isn't necessary for SDL2
+ files {
+ MAME_DIR .. "src/osd/sdl/SDLMain_tmpl.mm",
+ }
end
-
- configuration { "mingw*" or "vs*" }
- targetextension ".exe"
-
- configuration { }
-
- strip()
end
@@ -553,6 +594,4 @@ if _OPTIONS["targetos"] == "macosx" and _OPTIONS["with-tools"] then
files {
MAME_DIR .. "src/osd/sdl/aueffectutil.mm",
}
-
- strip()
end
diff --git a/scripts/src/osd/sdl_cfg.lua b/scripts/src/osd/sdl_cfg.lua
index bdeb7274ef1..2dc1a7e465a 100644
--- a/scripts/src/osd/sdl_cfg.lua
+++ b/scripts/src/osd/sdl_cfg.lua
@@ -56,12 +56,18 @@ if _OPTIONS["NO_USE_MIDI"]~="1" and _OPTIONS["targetos"]=="linux" then
}
end
-defines {
- "SDLMAME_SDL2=1",
-}
-if _OPTIONS["SDL2_MULTIAPI"]=="1" then
+if _OPTIONS["SDL_LIBVER"]=="sdl2" then
+ defines {
+ "SDLMAME_SDL2=1",
+ }
+ if _OPTIONS["SDL2_MULTIAPI"]=="1" then
+ defines {
+ "SDL2_MULTIAPI",
+ }
+ end
+else
defines {
- "SDL2_MULTIAPI",
+ "SDLMAME_SDL2=0",
}
end
@@ -75,7 +81,7 @@ if BASE_TARGETOS=="unix" then
"SDLMAME_UNIX",
}
if _OPTIONS["targetos"]=="macosx" then
- if _OPTIONS["USE_LIBSDL"]~="1" then
+ if _OPTIONS["MACOSX_USE_LIBSDL"]~="1" then
buildoptions {
"-F" .. _OPTIONS["SDL_FRAMEWORK_PATH"],
}
@@ -145,21 +151,3 @@ elseif _OPTIONS["targetos"]=="os2" then
backtick(sdlconfigcmd() .. " --cflags"),
}
end
-
-configuration { "osx*" }
- includedirs {
- MAME_DIR .. "3rdparty/bx/include/compat/osx",
- }
-
-configuration { "freebsd" }
- includedirs {
- MAME_DIR .. "3rdparty/bx/include/compat/freebsd",
- }
-
-configuration { "netbsd" }
- includedirs {
- MAME_DIR .. "3rdparty/bx/include/compat/freebsd",
- }
-
-configuration { }
-
diff --git a/scripts/src/osd/windows.lua b/scripts/src/osd/windows.lua
index 54464477e24..fd508e645c5 100644
--- a/scripts/src/osd/windows.lua
+++ b/scripts/src/osd/windows.lua
@@ -159,6 +159,7 @@ project ("osd_" .. _OPTIONS["osd"])
MAME_DIR .. "src/osd/modules/render/d3d/d3dcomm.h",
MAME_DIR .. "src/osd/modules/render/d3d/d3dhlsl.h",
MAME_DIR .. "src/osd/modules/render/d3d/d3dintf.h",
+ MAME_DIR .. "src/osd/modules/render/drawdd.cpp",
MAME_DIR .. "src/osd/modules/render/drawgdi.cpp",
MAME_DIR .. "src/osd/modules/render/drawnone.cpp",
MAME_DIR .. "src/osd/windows/input.cpp",
diff --git a/scripts/src/osd/windows_cfg.lua b/scripts/src/osd/windows_cfg.lua
index 3e656017816..19ef05c3ce9 100644
--- a/scripts/src/osd/windows_cfg.lua
+++ b/scripts/src/osd/windows_cfg.lua
@@ -50,7 +50,7 @@ end
if _OPTIONS["USE_SDL"]=="1" then
defines {
- "SDLMAME_SDL2=1",
+ "SDLMAME_SDL2=0",
"USE_XINPUT=0",
"USE_SDL=1",
"USE_SDL_SOUND",
diff --git a/scripts/src/tests.lua b/scripts/src/tests.lua
index d30cff64df2..99d82fcb6cb 100644
--- a/scripts/src/tests.lua
+++ b/scripts/src/tests.lua
@@ -8,78 +8,42 @@
-- Rules for building tests
--
---------------------------------------------------------------------------
---------------------------------------------------
--- GoogleTest library objects
---------------------------------------------------
-
-project "gtest"
- uuid "fa306a8d-fb10-4d4a-9d2e-fdb9076407b4"
- kind "StaticLib"
-
- configuration { "gmake" }
- buildoptions {
- "-Wno-undef",
- "-Wno-unused-variable",
- }
-
- configuration { "mingw-clang" }
- buildoptions {
- "-O0", -- crash of compiler when doing optimization
- }
-
- configuration { "vs*" }
-if _OPTIONS["vs"]=="intel-15" then
- buildoptions {
- "/Qwd1195", -- error #1195: conversion from integer to smaller pointer
- }
-end
-
- configuration { }
-
- includedirs {
- MAME_DIR .. "3rdparty/googletest/googletest/include",
- MAME_DIR .. "3rdparty/googletest/googletest",
- }
- files {
- MAME_DIR .. "3rdparty/googletest/googletest/src/gtest-all.cc",
- }
-
project("tests")
- uuid ("66d4c639-196b-4065-a411-7ee9266564f5")
- kind "ConsoleApp"
-
- flags {
- "Symbols", -- always include minimum symbols for executables
- }
-
- if _OPTIONS["SEPARATE_BIN"]~="1" then
- targetdir(MAME_DIR)
- end
+uuid ("66d4c639-196b-4065-a411-7ee9266564f5")
+kind "ConsoleApp"
- configuration { "gmake" }
- buildoptions {
- "-Wno-undef",
- }
+flags {
+ "Symbols", -- always include minimum symbols for executables
+}
- configuration { }
-
- links {
- "gtest",
- "utils",
- "expat",
- "zlib",
- "ocore_" .. _OPTIONS["osd"],
- }
+if _OPTIONS["SEPARATE_BIN"]~="1" then
+ targetdir(MAME_DIR)
+end
- includedirs {
- MAME_DIR .. "3rdparty/googletest/googletest/include",
- MAME_DIR .. "src/osd",
- MAME_DIR .. "src/lib/util",
+configuration { "gmake" }
+ buildoptions {
+ "-Wno-undef",
}
- files {
- MAME_DIR .. "tests/main.cpp",
- MAME_DIR .. "tests/lib/util/corestr.cpp",
- }
+configuration { }
+
+links {
+ "gtest",
+ "utils",
+ "expat",
+ "zlib",
+ "ocore_" .. _OPTIONS["osd"],
+}
+
+includedirs {
+ MAME_DIR .. "3rdparty/googletest/googletest/include",
+ MAME_DIR .. "src/osd",
+ MAME_DIR .. "src/lib/util",
+}
+
+files {
+ MAME_DIR .. "tests/main.cpp",
+ MAME_DIR .. "tests/lib/util/corestr.cpp",
+}
diff --git a/scripts/src/tools.lua b/scripts/src/tools.lua
index 421f5cc76b5..19942651f0c 100644
--- a/scripts/src/tools.lua
+++ b/scripts/src/tools.lua
@@ -50,13 +50,6 @@ files {
MAME_DIR .. "src/tools/romcmp.cpp",
}
-configuration { "mingw*" or "vs*" }
- targetextension ".exe"
-
-configuration { }
-
-strip()
-
--------------------------------------------------
-- chdman
--------------------------------------------------
@@ -111,13 +104,6 @@ files {
MAME_DIR .. "src/version.cpp",
}
-configuration { "mingw*" or "vs*" }
- targetextension ".exe"
-
-configuration { }
-
-strip()
-
--------------------------------------------------
-- jedutil
--------------------------------------------------
@@ -159,13 +145,6 @@ files {
MAME_DIR .. "src/tools/jedutil.cpp",
}
-configuration { "mingw*" or "vs*" }
- targetextension ".exe"
-
-configuration { }
-
-strip()
-
--------------------------------------------------
-- unidasm
--------------------------------------------------
@@ -222,12 +201,6 @@ files {
MAME_DIR .. "src/emu/emucore.cpp",
}
-configuration { "mingw*" or "vs*" }
- targetextension ".exe"
-
-configuration { }
-
-strip()
--------------------------------------------------
-- ldresample
@@ -282,13 +255,6 @@ files {
MAME_DIR .. "src/tools/ldresample.cpp",
}
-configuration { "mingw*" or "vs*" }
- targetextension ".exe"
-
-configuration { }
-
-strip()
-
--------------------------------------------------
-- ldverify
--------------------------------------------------
@@ -342,13 +308,6 @@ files {
MAME_DIR .. "src/tools/ldverify.cpp",
}
-configuration { "mingw*" or "vs*" }
- targetextension ".exe"
-
-configuration { }
-
-strip()
-
--------------------------------------------------
-- regrep
--------------------------------------------------
@@ -390,13 +349,6 @@ files {
MAME_DIR .. "src/tools/regrep.cpp",
}
-configuration { "mingw*" or "vs*" }
- targetextension ".exe"
-
-configuration { }
-
-strip()
-
--------------------------------------------------
-- srcclean
---------------------------------------------------
@@ -438,13 +390,6 @@ files {
MAME_DIR .. "src/tools/srcclean.cpp",
}
-configuration { "mingw*" or "vs*" }
- targetextension ".exe"
-
-configuration { }
-
-strip()
-
--------------------------------------------------
-- src2html
--------------------------------------------------
@@ -486,13 +431,6 @@ files {
MAME_DIR .. "src/tools/src2html.cpp",
}
-configuration { "mingw*" or "vs*" }
- targetextension ".exe"
-
-configuration { }
-
-strip()
-
--------------------------------------------------
-- split
--------------------------------------------------
@@ -545,13 +483,6 @@ files {
MAME_DIR .. "src/tools/split.cpp",
}
-configuration { "mingw*" or "vs*" }
- targetextension ".exe"
-
-configuration { }
-
-strip()
-
--------------------------------------------------
-- pngcmp
--------------------------------------------------
@@ -593,13 +524,6 @@ files {
MAME_DIR .. "src/tools/pngcmp.cpp",
}
-configuration { "mingw*" or "vs*" }
- targetextension ".exe"
-
-configuration { }
-
-strip()
-
--------------------------------------------------
-- nltool
--------------------------------------------------
@@ -654,13 +578,6 @@ files {
MAME_DIR .. "src/lib/netlist/prg/nltool.cpp",
}
-configuration { "mingw*" or "vs*" }
- targetextension ".exe"
-
-configuration { }
-
-strip()
-
--------------------------------------------------
-- nlwav
--------------------------------------------------
@@ -693,13 +610,6 @@ files {
MAME_DIR .. "src/lib/netlist/prg/nlwav.cpp",
}
-configuration { "mingw*" or "vs*" }
- targetextension ".exe"
-
-configuration { }
-
-strip()
-
--------------------------------------------------
-- castool
--------------------------------------------------
@@ -754,13 +664,6 @@ files {
MAME_DIR .. "src/tools/castool.cpp",
}
-configuration { "mingw*" or "vs*" }
- targetextension ".exe"
-
-configuration { }
-
-strip()
-
--------------------------------------------------
-- floptool
--------------------------------------------------
@@ -816,13 +719,6 @@ files {
MAME_DIR .. "src/tools/floptool.cpp",
}
-configuration { "mingw*" or "vs*" }
- targetextension ".exe"
-
-configuration { }
-
-strip()
-
--------------------------------------------------
-- imgtool
--------------------------------------------------
@@ -926,10 +822,3 @@ files {
MAME_DIR .. "src/tools/imgtool/modules/bml3.cpp",
MAME_DIR .. "src/tools/imgtool/modules/hp48.cpp",
}
-
-configuration { "mingw*" or "vs*" }
- targetextension ".exe"
-
-configuration { }
-
-strip()
diff --git a/scripts/src/video.lua b/scripts/src/video.lua
index 96a310f154b..a09ef123fca 100644
--- a/scripts/src/video.lua
+++ b/scripts/src/video.lua
@@ -156,18 +156,6 @@ end
--------------------------------------------------
--
---@src/devices/video/ef9364.h,VIDEOS["EF9364"] = true
---------------------------------------------------
-
-if (VIDEOS["EF9364"]~=null) then
- files {
- MAME_DIR .. "src/devices/video/ef9364.cpp",
- MAME_DIR .. "src/devices/video/ef9364.h",
- }
-end
-
---------------------------------------------------
---
--@src/devices/video/ef9365.h,VIDEOS["EF9365"] = true
--------------------------------------------------
@@ -842,15 +830,3 @@ if (VIDEOS["CRTC_EGA"]~=null) then
MAME_DIR .. "src/devices/video/crtc_ega.h",
}
end
-
---------------------------------------------------
---
---@src/devices/video/jangou_blitter.h,VIDEOS["JANGOU_BLITTER"] = true
---------------------------------------------------
-
-if (VIDEOS["JANGOU_BLITTER"]~=null) then
- files {
- MAME_DIR .. "src/devices/video/jangou_blitter.cpp",
- MAME_DIR .. "src/devices/video/jangou_blitter.h",
- }
-end
diff --git a/scripts/target/mame/arcade.lua b/scripts/target/mame/arcade.lua
index f59119796fc..c00c3d4731c 100644
--- a/scripts/target/mame/arcade.lua
+++ b/scripts/target/mame/arcade.lua
@@ -275,7 +275,6 @@ VIDEOS["BUFSPRITE"] = true
VIDEOS["DM9368"] = true
--VIDEOS["EF9340_1"] = true
--VIDEOS["EF9345"] = true
---VIDEOS["EF9364"] = true
--VIDEOS["EF9365"] = true
--VIDEOS["GF4500"] = true
VIDEOS["GF7600GS"] = true
@@ -295,7 +294,6 @@ VIDEOS["HUC6270"] = true
--VIDEOS["HUC6272"] = true
--VIDEOS["I8244"] = true
VIDEOS["I8275"] = true
-VIDEOS["JANGOU_BLITTER"] = true
VIDEOS["M50458"] = true
VIDEOS["MB90082"] = true
VIDEOS["MB_VCU"] = true
@@ -4021,8 +4019,6 @@ files {
createMAMEProjects(_target, _subtarget, "zaccaria")
files {
- MAME_DIR .. "src/mame/audio/zaccaria.cpp",
- MAME_DIR .. "src/mame/audio/zaccaria.h",
MAME_DIR .. "src/mame/drivers/laserbat.cpp",
MAME_DIR .. "src/mame/includes/laserbat.h",
MAME_DIR .. "src/mame/video/laserbat.cpp",
@@ -4249,7 +4245,6 @@ files {
MAME_DIR .. "src/mame/machine/inder_vid.cpp",
MAME_DIR .. "src/mame/machine/inder_vid.h",
MAME_DIR .. "src/mame/drivers/corona.cpp",
- MAME_DIR .. "src/mame/drivers/amazonlf.cpp",
MAME_DIR .. "src/mame/drivers/crystal.cpp",
MAME_DIR .. "src/mame/video/vrender0.cpp",
MAME_DIR .. "src/mame/video/vrender0.h",
@@ -4416,7 +4411,6 @@ files {
MAME_DIR .. "src/mame/includes/news.h",
MAME_DIR .. "src/mame/video/news.cpp",
MAME_DIR .. "src/mame/drivers/nexus3d.cpp",
- MAME_DIR .. "src/mame/drivers/nibble.cpp",
MAME_DIR .. "src/mame/drivers/norautp.cpp",
MAME_DIR .. "src/mame/includes/norautp.h",
MAME_DIR .. "src/mame/audio/norautp.cpp",
diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua
index 80be3e7c76c..cfbf4e0667a 100644
--- a/scripts/target/mame/mess.lua
+++ b/scripts/target/mame/mess.lua
@@ -273,7 +273,6 @@ VIDEOS["DL1416"] = true
VIDEOS["DM9368"] = true
VIDEOS["EF9340_1"] = true
VIDEOS["EF9345"] = true
-VIDEOS["EF9364"] = true
VIDEOS["EF9365"] = true
VIDEOS["GF4500"] = true
--VIDEOS+= EPIC12"] = true
@@ -398,7 +397,6 @@ MACHINES["ER2055"] = true
MACHINES["F3853"] = true
MACHINES["HD63450"] = true
MACHINES["HD64610"] = true
-MACHINES["HP_TACO"] = true
MACHINES["I2CMEM"] = true
MACHINES["I80130"] = true
MACHINES["I8089"] = true
@@ -620,7 +618,6 @@ BUSES["ISA"] = true
BUSES["ISBX"] = true
BUSES["KC"] = true
BUSES["LPCI"] = true
-BUSES["M5"] = true
BUSES["MACPDS"] = true
BUSES["MIDI"] = true
BUSES["MEGADRIVE"] = true
@@ -1188,6 +1185,9 @@ files {
createMESSProjects(_target, _subtarget, "apple")
files {
MAME_DIR .. "src/mame/drivers/apple1.cpp",
+ MAME_DIR .. "src/mame/includes/apple1.h",
+ MAME_DIR .. "src/mame/machine/apple1.cpp",
+ MAME_DIR .. "src/mame/video/apple1.cpp",
MAME_DIR .. "src/mame/drivers/apple2.cpp",
MAME_DIR .. "src/mame/includes/apple2.h",
MAME_DIR .. "src/mame/drivers/apple2e.cpp",
@@ -1701,7 +1701,6 @@ files {
MAME_DIR .. "src/mame/drivers/fidelz80.cpp",
MAME_DIR .. "src/mame/includes/fidelz80.h",
MAME_DIR .. "src/mame/drivers/fidel6502.cpp",
- MAME_DIR .. "src/mame/drivers/fidel68k.cpp",
}
createMESSProjects(_target, _subtarget, "force")
@@ -2091,8 +2090,6 @@ files {
MAME_DIR .. "src/mame/machine/pc9801_cbus.h",
MAME_DIR .. "src/mame/machine/pc9801_kbd.cpp",
MAME_DIR .. "src/mame/machine/pc9801_kbd.h",
- MAME_DIR .. "src/mame/machine/pc9801_cd.cpp",
- MAME_DIR .. "src/mame/machine/pc9801_cd.h",
MAME_DIR .. "src/mame/drivers/tk80bs.cpp",
MAME_DIR .. "src/mame/drivers/hh_ucom4.cpp",
MAME_DIR .. "src/mame/includes/hh_ucom4.h",
@@ -2770,7 +2767,6 @@ files {
MAME_DIR .. "src/mame/includes/gamecom.h",
MAME_DIR .. "src/mame/machine/gamecom.cpp",
MAME_DIR .. "src/mame/video/gamecom.cpp",
- MAME_DIR .. "src/mame/drivers/k28.cpp",
}
createMESSProjects(_target, _subtarget, "tigertel")
@@ -3032,7 +3028,6 @@ files {
MAME_DIR .. "src/mame/drivers/ampro.cpp",
MAME_DIR .. "src/mame/drivers/amust.cpp",
MAME_DIR .. "src/mame/drivers/applix.cpp",
- MAME_DIR .. "src/mame/drivers/argox.cpp",
MAME_DIR .. "src/mame/drivers/attache.cpp",
MAME_DIR .. "src/mame/drivers/aussiebyte.cpp",
MAME_DIR .. "src/mame/includes/aussiebyte.h",
@@ -3087,7 +3082,6 @@ files {
MAME_DIR .. "src/mame/audio/gamate.cpp",
MAME_DIR .. "src/mame/drivers/gameking.cpp",
MAME_DIR .. "src/mame/drivers/gimix.cpp",
- MAME_DIR .. "src/mame/drivers/goupil.cpp",
MAME_DIR .. "src/mame/drivers/grfd2301.cpp",
MAME_DIR .. "src/mame/drivers/harriet.cpp",
MAME_DIR .. "src/mame/drivers/hprot1.cpp",
@@ -3131,7 +3125,6 @@ files {
MAME_DIR .. "src/mame/drivers/mx2178.cpp",
MAME_DIR .. "src/mame/drivers/mycom.cpp",
MAME_DIR .. "src/mame/drivers/myvision.cpp",
- MAME_DIR .. "src/mame/drivers/notetaker.cpp",
MAME_DIR .. "src/mame/drivers/ngen.cpp",
MAME_DIR .. "src/mame/machine/ngen_kb.cpp",
MAME_DIR .. "src/mame/machine/ngen_kb.h",
diff --git a/scripts/toolchain.lua b/scripts/toolchain.lua
index 137a873ae09..7fad61ce928 100644
--- a/scripts/toolchain.lua
+++ b/scripts/toolchain.lua
@@ -4,11 +4,6 @@
--
local naclToolchain = ""
-local toolchainPrefix = ""
-
-if _OPTIONS['TOOLCHAIN'] then
- toolchainPrefix = _OPTIONS["TOOLCHAIN"]
-end
newoption {
trigger = "gcc",
@@ -209,18 +204,15 @@ function toolchain(_buildDir, _subDir)
if not os.getenv("MINGW32") then
print("Set MINGW32 envrionment variable.")
end
- if not toolchainPrefix then
- toolchainPrefix = "$(MINGW32)/bin/i686-w64-mingw32-"
- end
- premake.gcc.cc = toolchainPrefix .. "gcc"
- premake.gcc.cxx = toolchainPrefix .. "g++"
+ premake.gcc.cc = "$(MINGW32)/bin/i686-w64-mingw32-gcc"
+ premake.gcc.cxx = "$(MINGW32)/bin/i686-w64-mingw32-g++"
-- work around GCC 4.9.2 not having proper linker for LTO=1 usage
local version_4_ar = str_to_version(_OPTIONS["gcc_version"])
if (version_4_ar < 50000) then
- premake.gcc.ar = toolchainPrefix .. "ar"
+ premake.gcc.ar = "$(MINGW32)/bin/ar"
end
if (version_4_ar >= 50000) then
- premake.gcc.ar = toolchainPrefix .. "gcc-ar"
+ premake.gcc.ar = "$(MINGW32)/bin/gcc-ar"
end
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-mingw32-gcc")
end
@@ -229,22 +221,20 @@ function toolchain(_buildDir, _subDir)
if not os.getenv("MINGW64") then
print("Set MINGW64 envrionment variable.")
end
- if not toolchainPrefix then
- toolchainPrefix = "$(MINGW64)/bin/x86_64-w64-mingw32-"
- end
- premake.gcc.cc = toolchainPrefix .. "gcc"
- premake.gcc.cxx = toolchainPrefix .. "g++"
+ premake.gcc.cc = "$(MINGW64)/bin/x86_64-w64-mingw32-gcc"
+ premake.gcc.cxx = "$(MINGW64)/bin/x86_64-w64-mingw32-g++"
-- work around GCC 4.9.2 not having proper linker for LTO=1 usage
local version_4_ar = str_to_version(_OPTIONS["gcc_version"])
if (version_4_ar < 50000) then
- premake.gcc.ar = toolchainPrefix .. "ar"
+ premake.gcc.ar = "$(MINGW64)/bin/ar"
end
if (version_4_ar >= 50000) then
- premake.gcc.ar = toolchainPrefix .. "gcc-ar"
+ premake.gcc.ar = "$(MINGW64)/bin/gcc-ar"
end
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-mingw64-gcc")
end
+
if "mingw-clang" == _OPTIONS["gcc"] then
premake.gcc.cc = "clang"
premake.gcc.cxx = "clang++"
@@ -293,17 +283,18 @@ function toolchain(_buildDir, _subDir)
if "osx" == _OPTIONS["gcc"] then
if os.is("linux") then
- premake.gcc.cc = toolchainPrefix .. "clang"
- premake.gcc.cxx = toolchainPrefix .. "clang++"
- premake.gcc.ar = toolchainPrefix .. "ar"
+ local osxToolchain = "x86_64-apple-darwin13-"
+ premake.gcc.cc = osxToolchain .. "clang"
+ premake.gcc.cxx = osxToolchain .. "clang++"
+ premake.gcc.ar = osxToolchain .. "ar"
end
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-osx")
end
if "osx-clang" == _OPTIONS["gcc"] then
- premake.gcc.cc = toolchainPrefix .. "clang"
- premake.gcc.cxx = toolchainPrefix .. "clang++"
- premake.gcc.ar = toolchainPrefix .. "ar"
+ premake.gcc.cc = "clang"
+ premake.gcc.cxx = "clang++"
+ premake.gcc.ar = "ar"
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-osx-clang")
end
@@ -505,9 +496,7 @@ function toolchain(_buildDir, _subDir)
configuration { "steamlink" }
objdir ( _buildDir .. "steamlink/obj")
- defines {
- "__STEAMLINK__=1", -- There is no special prefedined compiler symbol to detect SteamLink, faking it.
- }
+
buildoptions {
"-marm",
"-mfloat-abi=hard",
@@ -920,15 +909,6 @@ function toolchain(_buildDir, _subDir)
end
function strip()
- if _OPTIONS["STRIP_SYMBOLS"]~="1" then
- return true
- end
-
- configuration { "osx-*", "Release" }
- postbuildcommands {
- "$(SILENT) echo Stripping symbols.",
- "$(SILENT) " .. (_OPTIONS['TOOLCHAIN'] and toolchainPrefix) .. "strip \"$(TARGET)\"",
- }
configuration { "android-arm", "Release" }
postbuildcommands {
@@ -957,12 +937,13 @@ function strip()
configuration { "mingw*", "x64", "Release" }
postbuildcommands {
"$(SILENT) echo Stripping symbols.",
- "$(SILENT) " .. (_OPTIONS['TOOLCHAIN'] and toolchainPrefix or "$(MINGW64)/bin/") .. "strip -s \"$(TARGET)\"",
+ "$(SILENT) $(MINGW64)/bin/strip -s \"$(TARGET)\"",
}
+
configuration { "mingw*", "x32", "Release" }
postbuildcommands {
"$(SILENT) echo Stripping symbols.",
- "$(SILENT) " .. (_OPTIONS['TOOLCHAIN'] and toolchainPrefix or "$(MINGW32)/bin/") .. "strip -s \"$(TARGET)\"",
+ "$(SILENT) $(MINGW32)/bin/strip -s \"$(TARGET)\""
}
configuration { "pnacl" }
diff --git a/shaders/dx11/fs_line.bin b/shaders/dx11/fs_line.bin
deleted file mode 100644
index 5bd281a0889..00000000000
--- a/shaders/dx11/fs_line.bin
+++ /dev/null
Binary files differ
diff --git a/shaders/dx11/fs_quad.bin b/shaders/dx11/fs_quad.bin
deleted file mode 100644
index 5bd281a0889..00000000000
--- a/shaders/dx11/fs_quad.bin
+++ /dev/null
Binary files differ
diff --git a/shaders/dx11/fs_quad_texture.bin b/shaders/dx11/fs_quad_texture.bin
deleted file mode 100644
index 80d85fb1107..00000000000
--- a/shaders/dx11/fs_quad_texture.bin
+++ /dev/null
Binary files differ
diff --git a/shaders/dx11/vs_line.bin b/shaders/dx11/vs_line.bin
deleted file mode 100644
index 24d50eb25ac..00000000000
--- a/shaders/dx11/vs_line.bin
+++ /dev/null
Binary files differ
diff --git a/shaders/dx11/vs_quad.bin b/shaders/dx11/vs_quad.bin
deleted file mode 100644
index 24d50eb25ac..00000000000
--- a/shaders/dx11/vs_quad.bin
+++ /dev/null
Binary files differ
diff --git a/shaders/dx11/vs_quad_texture.bin b/shaders/dx11/vs_quad_texture.bin
deleted file mode 100644
index b0bebf9da4c..00000000000
--- a/shaders/dx11/vs_quad_texture.bin
+++ /dev/null
Binary files differ
diff --git a/shaders/dx9/fs_line.bin b/shaders/dx9/fs_line.bin
deleted file mode 100644
index 5bfd5497f0b..00000000000
--- a/shaders/dx9/fs_line.bin
+++ /dev/null
Binary files differ
diff --git a/shaders/dx9/fs_quad.bin b/shaders/dx9/fs_quad.bin
deleted file mode 100644
index 5bfd5497f0b..00000000000
--- a/shaders/dx9/fs_quad.bin
+++ /dev/null
Binary files differ
diff --git a/shaders/dx9/fs_quad_texture.bin b/shaders/dx9/fs_quad_texture.bin
deleted file mode 100644
index ef8fa0730c3..00000000000
--- a/shaders/dx9/fs_quad_texture.bin
+++ /dev/null
Binary files differ
diff --git a/shaders/dx9/vs_line.bin b/shaders/dx9/vs_line.bin
deleted file mode 100644
index 9bd4a9797e0..00000000000
--- a/shaders/dx9/vs_line.bin
+++ /dev/null
Binary files differ
diff --git a/shaders/dx9/vs_quad.bin b/shaders/dx9/vs_quad.bin
deleted file mode 100644
index 9bd4a9797e0..00000000000
--- a/shaders/dx9/vs_quad.bin
+++ /dev/null
Binary files differ
diff --git a/shaders/dx9/vs_quad_texture.bin b/shaders/dx9/vs_quad_texture.bin
deleted file mode 100644
index ea94c83e62d..00000000000
--- a/shaders/dx9/vs_quad_texture.bin
+++ /dev/null
Binary files differ
diff --git a/shaders/gles/fs_line.bin b/shaders/gles/fs_line.bin
deleted file mode 100644
index de509a3eeb5..00000000000
--- a/shaders/gles/fs_line.bin
+++ /dev/null
Binary files differ
diff --git a/shaders/gles/fs_quad.bin b/shaders/gles/fs_quad.bin
deleted file mode 100644
index de509a3eeb5..00000000000
--- a/shaders/gles/fs_quad.bin
+++ /dev/null
Binary files differ
diff --git a/shaders/gles/fs_quad_texture.bin b/shaders/gles/fs_quad_texture.bin
deleted file mode 100644
index 22e2f0c23d0..00000000000
--- a/shaders/gles/fs_quad_texture.bin
+++ /dev/null
Binary files differ
diff --git a/shaders/gles/vs_line.bin b/shaders/gles/vs_line.bin
deleted file mode 100644
index db0ff91e152..00000000000
--- a/shaders/gles/vs_line.bin
+++ /dev/null
Binary files differ
diff --git a/shaders/gles/vs_quad.bin b/shaders/gles/vs_quad.bin
deleted file mode 100644
index db0ff91e152..00000000000
--- a/shaders/gles/vs_quad.bin
+++ /dev/null
Binary files differ
diff --git a/shaders/gles/vs_quad_texture.bin b/shaders/gles/vs_quad_texture.bin
deleted file mode 100644
index 9dd618de8a0..00000000000
--- a/shaders/gles/vs_quad_texture.bin
+++ /dev/null
Binary files differ
diff --git a/shaders/glsl/fs_line.bin b/shaders/glsl/fs_line.bin
deleted file mode 100644
index 6f8e3df8290..00000000000
--- a/shaders/glsl/fs_line.bin
+++ /dev/null
Binary files differ
diff --git a/shaders/glsl/fs_quad.bin b/shaders/glsl/fs_quad.bin
deleted file mode 100644
index 6f8e3df8290..00000000000
--- a/shaders/glsl/fs_quad.bin
+++ /dev/null
Binary files differ
diff --git a/shaders/glsl/fs_quad_texture.bin b/shaders/glsl/fs_quad_texture.bin
deleted file mode 100644
index db0fe2b487b..00000000000
--- a/shaders/glsl/fs_quad_texture.bin
+++ /dev/null
Binary files differ
diff --git a/shaders/glsl/vs_line.bin b/shaders/glsl/vs_line.bin
deleted file mode 100644
index 7c8490550c7..00000000000
--- a/shaders/glsl/vs_line.bin
+++ /dev/null
Binary files differ
diff --git a/shaders/glsl/vs_quad.bin b/shaders/glsl/vs_quad.bin
deleted file mode 100644
index 7c8490550c7..00000000000
--- a/shaders/glsl/vs_quad.bin
+++ /dev/null
Binary files differ
diff --git a/shaders/glsl/vs_quad_texture.bin b/shaders/glsl/vs_quad_texture.bin
deleted file mode 100644
index af6c9349f41..00000000000
--- a/shaders/glsl/vs_quad_texture.bin
+++ /dev/null
Binary files differ
diff --git a/shaders/metal/fs_line.bin b/shaders/metal/fs_line.bin
deleted file mode 100644
index fb726f353c0..00000000000
--- a/shaders/metal/fs_line.bin
+++ /dev/null
Binary files differ
diff --git a/shaders/metal/fs_quad.bin b/shaders/metal/fs_quad.bin
deleted file mode 100644
index fb726f353c0..00000000000
--- a/shaders/metal/fs_quad.bin
+++ /dev/null
Binary files differ
diff --git a/shaders/metal/fs_quad_texture.bin b/shaders/metal/fs_quad_texture.bin
deleted file mode 100644
index 6a3da392480..00000000000
--- a/shaders/metal/fs_quad_texture.bin
+++ /dev/null
Binary files differ
diff --git a/shaders/metal/vs_line.bin b/shaders/metal/vs_line.bin
deleted file mode 100644
index d2eeed80dfd..00000000000
--- a/shaders/metal/vs_line.bin
+++ /dev/null
Binary files differ
diff --git a/shaders/metal/vs_quad.bin b/shaders/metal/vs_quad.bin
deleted file mode 100644
index d2eeed80dfd..00000000000
--- a/shaders/metal/vs_quad.bin
+++ /dev/null
Binary files differ
diff --git a/shaders/metal/vs_quad_texture.bin b/shaders/metal/vs_quad_texture.bin
deleted file mode 100644
index 122b7dee5c3..00000000000
--- a/shaders/metal/vs_quad_texture.bin
+++ /dev/null
Binary files differ
diff --git a/src/devices/bus/a2bus/a2pic.cpp b/src/devices/bus/a2bus/a2pic.cpp
index c16ee6f2140..f47f964f192 100644
--- a/src/devices/bus/a2bus/a2pic.cpp
+++ b/src/devices/bus/a2bus/a2pic.cpp
@@ -49,11 +49,11 @@ static INPUT_PORTS_START( pic )
PORT_DIPSETTING( 0x06, "13 microseconds" )
PORT_DIPSETTING( 0x07, "15 microseconds" )
- PORT_DIPNAME( 0x08, 0x08, "Strobe polarity (SW4)" )
+ PORT_DIPNAME( 0x08, 0x00, "Strobe polarity (SW4)" )
PORT_DIPSETTING( 0x00, "Positive" )
PORT_DIPSETTING( 0x08, "Negative" )
- PORT_DIPNAME( 0x10, 0x10, "Acknowledge polarity (SW5)" )
+ PORT_DIPNAME( 0x10, 0x00, "Acknowledge polarity (SW5)" )
PORT_DIPSETTING( 0x00, "Positive" )
PORT_DIPSETTING( 0x10, "Negative" )
@@ -181,27 +181,13 @@ UINT8 a2bus_pic_device::read_cnxx(address_space &space, UINT8 offset)
UINT8 a2bus_pic_device::read_c0nx(address_space &space, UINT8 offset)
{
- UINT8 rv = 0;
-
switch (offset)
{
case 3:
return m_ctx_data_in->read();
case 4:
- rv = m_ack;
-
- // clear flip-flop
- if (m_dsw1->read() & 0x10) // negative polarity
- {
- m_ack |= 0x80;
- }
- else
- {
- m_ack &= ~0x80;
- }
-
- return rv;
+ return m_ack;
case 6: // does reading this really work?
m_irqenable = true;
diff --git a/src/devices/bus/abcbus/lux10828.cpp b/src/devices/bus/abcbus/lux10828.cpp
index e14bdf9a20e..32bc5e619bc 100644
--- a/src/devices/bus/abcbus/lux10828.cpp
+++ b/src/devices/bus/abcbus/lux10828.cpp
@@ -310,14 +310,14 @@ WRITE_LINE_MEMBER( luxor_55_10828_device::fdc_intrq_w )
m_fdc_irq = state;
m_pio->port_b_write(state << 7);
- if (state) m_maincpu->set_input_line(Z80_INPUT_LINE_BOGUSWAIT, CLEAR_LINE);
+ if (state) m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, CLEAR_LINE);
}
WRITE_LINE_MEMBER( luxor_55_10828_device::fdc_drq_w )
{
m_fdc_drq = state;
- if (state) m_maincpu->set_input_line(Z80_INPUT_LINE_BOGUSWAIT, CLEAR_LINE);
+ if (state) m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, CLEAR_LINE);
}
@@ -654,7 +654,7 @@ READ8_MEMBER( luxor_55_10828_device::fdc_r )
{
logerror("Z80 WAIT not supported by MAME core\n");
- m_maincpu->set_input_line(Z80_INPUT_LINE_BOGUSWAIT, ASSERT_LINE);
+ m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, ASSERT_LINE);
}
return m_fdc->gen_r(offset);
@@ -671,7 +671,7 @@ WRITE8_MEMBER( luxor_55_10828_device::fdc_w )
{
logerror("Z80 WAIT not supported by MAME core\n");
- m_maincpu->set_input_line(Z80_INPUT_LINE_BOGUSWAIT, ASSERT_LINE);
+ m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, ASSERT_LINE);
}
m_fdc->gen_w(offset, data);
diff --git a/src/devices/bus/amiga/zorro/zorro.h b/src/devices/bus/amiga/zorro/zorro.h
index 7a37e334ada..fb14b7f09ca 100644
--- a/src/devices/bus/amiga/zorro/zorro.h
+++ b/src/devices/bus/amiga/zorro/zorro.h
@@ -166,10 +166,8 @@
#define MCFG_EXPANSION_SLOT_ADD(_cputag, _slot_intf, _def_slot) \
MCFG_DEVICE_ADD(EXP_SLOT_TAG, EXP_SLOT, 0) \
- device_t *temp = device; \
zorro_device::set_cputag(*device, _cputag); \
- MCFG_ZORRO_SLOT_ADD(EXP_SLOT_TAG, "slot", _slot_intf, _def_slot) \
- device = temp;
+ MCFG_ZORRO_SLOT_ADD(EXP_SLOT_TAG, "slot", _slot_intf, _def_slot)
// callbacks
#define MCFG_EXPANSION_SLOT_OVR_HANDLER(_devcb) \
diff --git a/src/devices/bus/centronics/epson_lx810l.cpp b/src/devices/bus/centronics/epson_lx810l.cpp
index 77a130b26bf..fc7d557d928 100644
--- a/src/devices/bus/centronics/epson_lx810l.cpp
+++ b/src/devices/bus/centronics/epson_lx810l.cpp
@@ -26,7 +26,7 @@
*/
#include "epson_lx810l.h"
-//extern const char layout_lx800[]; /* use layout from lx800 */
+extern const char layout_lx800[]; /* use layout from lx800 */
//#define LX810LDEBUG
#ifdef LX810LDEBUG
@@ -132,7 +132,7 @@ static MACHINE_CONFIG_FRAGMENT( epson_lx810l )
MCFG_UPD7810_CO0(WRITELINE(epson_lx810l_t, co0_w))
MCFG_UPD7810_CO1(WRITELINE(epson_lx810l_t, co1_w))
-// MCFG_DEFAULT_LAYOUT(layout_lx800)
+ MCFG_DEFAULT_LAYOUT(layout_lx800)
/* video hardware (simulates paper) */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/devices/bus/isa/3c505.cpp b/src/devices/bus/isa/3c505.cpp
index 371526d29ee..2cb640e91d5 100644
--- a/src/devices/bus/isa/3c505.cpp
+++ b/src/devices/bus/isa/3c505.cpp
@@ -26,6 +26,8 @@ static int verbose = VERBOSE;
#define LOG1(d,x) { if (verbose > 0) LOG(d,x)}
#define LOG2(d,x) { if (verbose > 1) LOG(d,x)}
+#define MAINCPU "maincpu"
+
#ifdef LSB_FIRST
static UINT16 uint16_to_le(UINT16 value)
{
@@ -422,7 +424,7 @@ const char *threecom3c505_device::cpu_context()
{
static char statebuf[64]; /* string buffer containing state description */
- device_t *cpu = machine().firstcpu;
+ device_t *cpu = machine().device(MAINCPU);
osd_ticks_t t = osd_ticks();
int s = t / osd_ticks_per_second();
int ms = (t % osd_ticks_per_second()) / 1000;
@@ -440,18 +442,6 @@ const char *threecom3c505_device::cpu_context()
return statebuf;
}
-/*-------------------------------------------------
- logerror - log an error message (w/o device tags)
- -------------------------------------------------*/
-
-void threecom3c505_device::logerror(const char *format, ...) const
-{
- va_list arg;
- va_start(arg, format);
- machine().vlogerror(format, arg);
- va_end(arg);
-}
-
//**************************************************************************
// data_buffer
//**************************************************************************
@@ -865,8 +855,8 @@ void threecom3c505_device::do_receive_command()
void threecom3c505_device::set_command_pending(int state)
{
- LOG2(this,("set_command_pending %d -> %d m_wait_for_ack=%d m_wait_for_nak=%d m_rx_pending=%d",
- m_command_pending, state, m_wait_for_ack, m_wait_for_nak, m_rx_pending));
+ LOG2(this,("set_command_pending %d -> %d m_wait_for_ack=%d m_wait_for_nak=%d m_rx_pending=%d%s",
+ m_command_pending, state, m_wait_for_ack, m_wait_for_nak, m_rx_pending, state ? "" :"\n"));
//- verbose = onoff ? 1 : 2;
@@ -1667,7 +1657,7 @@ void threecom3c505_device::set_verbose(int on_off)
int threecom3c505_device::tx_data(device_t *device, const UINT8 data[], int length)
{
- LOG1(this,("threecom3c505_device::tx_data length=%d", length));
+ LOG1(device,("threecom3c505_device::tx_data length=%d", length));
return 1;
}
diff --git a/src/devices/bus/isa/3c505.h b/src/devices/bus/isa/3c505.h
index 80cdd496a03..e31317792da 100644
--- a/src/devices/bus/isa/3c505.h
+++ b/src/devices/bus/isa/3c505.h
@@ -143,7 +143,6 @@ protected:
virtual int setfilter(device_t *, int);
const char *cpu_context();
- void logerror(const char *format, ...) const;
// device-level overrides
virtual void device_start() override;
diff --git a/src/devices/bus/isa/omti8621.cpp b/src/devices/bus/isa/omti8621.cpp
index a1379bc229d..5f42c31200b 100644
--- a/src/devices/bus/isa/omti8621.cpp
+++ b/src/devices/bus/isa/omti8621.cpp
@@ -73,10 +73,6 @@ protected:
virtual void device_reset() override;
void omti_disk_config(UINT16 disk_type);
-
-private:
- void logerror(const char *format, ...) const;
-
public:
UINT16 m_type;
UINT16 m_cylinders;
@@ -689,18 +685,6 @@ void omti8621_device::set_esdi_defect_list(UINT8 lun, UINT8 head)
memset(disk->m_esdi_defect_list+6, 0xff, 5); // end of defect list
}
-/*-------------------------------------------------
- logerror - log an error message (w/o device tags)
- -------------------------------------------------*/
-
-void omti8621_device::logerror(const char *format, ...) const
-{
- va_list arg;
- va_start(arg, format);
- machine().vlogerror(format, arg);
- va_end(arg);
-}
-
/***************************************************************************
log_command - log command from a command descriptor block
***************************************************************************/
@@ -709,80 +693,83 @@ void omti8621_device::log_command(const UINT8 cdb[], const UINT16 cdb_length)
{
if (verbose > 0) {
int i;
- logerror("%s: OMTI command ", cpu_context(this));
+ char sb[100];
+ std::string text(cpu_context(this));
+ text += ": OMTI command ";
switch (cdb[0]) {
case OMTI_CMD_TEST_DRIVE_READY: // 0x00
- logerror("Test Drive Ready");
+ text += "Test Drive Ready";
break;
case OMTI_CMD_RECALIBRATE: // 0x01
- logerror("Recalibrate");
+ text += "Recalibrate";
break;
case OMTI_CMD_REQUEST_SENSE: // 0x03
- logerror("Request Sense");
+ text += "Request Sense";
break;
case OMTI_CMD_READ_VERIFY: // 0x05
- logerror("Read Verify");
+ text += "Read Verify";
break;
case OMTI_CMD_FORMAT_TRACK: // 0x06
- logerror("Format Track");
+ text += "Format Track";
break;
case OMTI_CMD_FORMAT_BAD_TRACK: // 0x07
- logerror("Format Bad Track");
+ text += "Format Bad Track";
break;
case OMTI_CMD_READ: // 0x08
- logerror("Read");
+ text += "Read";
break;
case OMTI_CMD_WRITE: // 0x0A
- logerror("Write");
+ text += "Write";
break;
case OMTI_CMD_SEEK: // 0x0B
- logerror("Seek");
+ text += "Seek";
break;
case OMTI_CMD_READ_SECTOR_BUFFER: // 0x0E
- logerror("Read Sector Buffer");
+ text += "Read Sector Buffer";
break;
case OMTI_CMD_WRITE_SECTOR_BUFFER: // 0x0F
- logerror("Write Sector Buffer");
+ text += "Write Sector Buffer";
break;
case OMTI_CMD_ASSIGN_ALTERNATE_TRACK: // 0x11
- logerror("Assign Alternate Track");
+ text += "Assign Alternate Track";
break;
case OMTI_CMD_READ_DATA_TO_BUFFER: // 0x1E
- logerror("Read Data to Buffer");
+ text += "Read Data to Buffer";
break;
case OMTI_CMD_WRITE_DATA_FROM_BUFFER: // 0x1F
- logerror("Write Data from Buffer");
+ text += "Write Data from Buffer";
break;
case OMTI_CMD_COPY: // 0x20
- logerror("Copy");
+ text += "Copy";
break;
case OMTI_CMD_READ_ESDI_DEFECT_LIST: // 0x37
- logerror("Read ESDI Defect List");
+ text += "Read ESDI Defect List";
break;
case OMTI_CMD_RAM_DIAGNOSTICS: // 0xE0
- logerror("RAM. Diagnostic");
+ text += "RAM. Diagnostic";
break;
case OMTI_CMD_CONTROLLER_INT_DIAGNOSTIC: // 0xE4
- logerror("Controller Int. Diagnostic");
+ text += "Controller Int. Diagnostic";
break;
case OMTI_CMD_READ_LONG: // 0xE5
- logerror("Read Long");
+ text += "Read Long";
break;
case OMTI_CMD_WRITE_LONG: // 0xE6
- logerror("Write Long");
+ text += "Write Long";
break;
case OMTI_CMD_READ_CONFIGURATION: // 0xEC
- logerror("Read Configuration");
+ text += "Read Configuration";
break;
case OMTI_CMD_INVALID_COMMAND: // 0xFF
- logerror("Invalid Command");
+ text += "Invalid Command";
break;
default:
- logerror("!!! Unexpected Command !!!");
+ text += "!!! Unexpected Command !!!";
}
// logerror(" (%02x, length=%02x)", cdb[0], cdb_length);
for (i = 0; i < cdb_length; i++) {
- logerror(" %02x", cdb[i]);
+ sprintf(sb, " %02x", cdb[i]);
+ text += sb;
}
switch (cdb[0]) {
@@ -793,10 +780,12 @@ void omti8621_device::log_command(const UINT8 cdb[], const UINT16 cdb_length)
case OMTI_CMD_READ_DATA_TO_BUFFER: // 0x1E
case OMTI_CMD_WRITE_DATA_FROM_BUFFER: // 0x1F
case OMTI_CMD_COPY: // 0x20
- logerror(" (diskaddr=%x count=%x)", get_disk_address(cdb), cdb[4]);
+ sprintf(sb, " (diskaddr=%x count=%x)", get_disk_address(cdb), cdb[4]);
+ text += sb;
break;
}
- logerror("\n");
+ text += "\n";
+ logerror(text.c_str());
}
}
@@ -806,18 +795,25 @@ void omti8621_device::log_command(const UINT8 cdb[], const UINT16 cdb_length)
void omti8621_device::log_data()
{
- if (verbose > 0) {
+ if (verbose > 0)
+ {
int i;
- logerror("%s: OMTI data (length=%02x)", cpu_context(this),
+ char sb[100];
+ sprintf(sb, "%s: OMTI data (length=%02x)", cpu_context(this),
data_length);
- for (i = 0; i < data_length && i < OMTI_DISK_SECTOR_SIZE; i++) {
- logerror(" %02x", data_buffer[i]);
+ std::string text(sb);
+ for (i = 0; i < data_length && i < OMTI_DISK_SECTOR_SIZE; i++)
+ {
+ sprintf(sb, " %02x", data_buffer[i]);
+ text += sb;
}
- if (i < data_length) {
- logerror(" ...");
+ if (i < data_length)
+ {
+ text += " ...";
}
- logerror("\n");
+ text += "\n";
+ logerror(text.c_str());
}
}
@@ -1355,18 +1351,6 @@ void omti_disk_image_device::omti_disk_config(UINT16 disk_type)
}
/*-------------------------------------------------
- logerror - log an error message (w/o device tags)
- -------------------------------------------------*/
-
-void omti_disk_image_device::logerror(const char *format, ...) const
-{
- va_list arg;
- va_start(arg, format);
- machine().vlogerror(format, arg);
- va_end(arg);
-}
-
-/*-------------------------------------------------
device start callback
-------------------------------------------------*/
diff --git a/src/devices/bus/isa/omti8621.h b/src/devices/bus/isa/omti8621.h
index 7554df8ddf6..04dff836316 100644
--- a/src/devices/bus/isa/omti8621.h
+++ b/src/devices/bus/isa/omti8621.h
@@ -114,9 +114,6 @@ private:
void copy_sectors(INT32 dst_addr, INT32 src_addr, UINT8 count, UINT8 lun);
void format_track(const UINT8 * cdb);
void set_esdi_defect_list(UINT8 lun, UINT8 head);
-
- void logerror(const char *format, ...) const;
-
void log_command(const UINT8 cdb[], const UINT16 cdb_length);
void log_data();
void do_command(const UINT8 cdb[], const UINT16 cdb_length);
diff --git a/src/devices/bus/isa/sc499.cpp b/src/devices/bus/isa/sc499.cpp
index 3d94caa2b2c..4effacb3394 100644
--- a/src/devices/bus/isa/sc499.cpp
+++ b/src/devices/bus/isa/sc499.cpp
@@ -409,34 +409,13 @@ const char *sc499_device::cpu_context()
{
static char statebuf[64]; /* string buffer containing state description */
- device_t *cpu = machine().firstcpu;
osd_ticks_t t = osd_ticks();
int s = t / osd_ticks_per_second();
int ms = (t % osd_ticks_per_second()) / 1000;
- /* if we have an executing CPU, output data */
- if (cpu != nullptr)
- {
- sprintf(statebuf, "%d.%03d %s pc=%08x - %s", s, ms, cpu->tag(),
- cpu->safe_pcbase(), tag());
- }
- else
- {
- sprintf(statebuf, "%d.%03d", s, ms);
- }
- return statebuf;
-}
-
-/*-------------------------------------------------
- logerror - log an error message (w/o device tags)
- -------------------------------------------------*/
+ sprintf(statebuf, "%d.%03d%s:", s, ms, tag());
-void sc499_device::logerror(const char *format, ...) const
-{
- va_list arg;
- va_start(arg, format);
- machine().vlogerror(format, arg);
- va_end(arg);
+ return statebuf;
}
/*-------------------------------------------------
diff --git a/src/devices/bus/isa/sc499.h b/src/devices/bus/isa/sc499.h
index 2b5b1ddaa6a..8c63f810073 100644
--- a/src/devices/bus/isa/sc499.h
+++ b/src/devices/bus/isa/sc499.h
@@ -80,7 +80,6 @@ private:
virtual void eop_w(int state) override;
const char *cpu_context();
- void logerror(const char *format, ...) const;
void tape_status_clear(UINT16 value);
void tape_status_set(UINT16 value);
diff --git a/src/devices/bus/m5/rom.cpp b/src/devices/bus/m5/rom.cpp
deleted file mode 100644
index bffd33df541..00000000000
--- a/src/devices/bus/m5/rom.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Fabio Priuli
-/***********************************************************************************************************
-
-
- M5 cart emulation
-
-
- ***********************************************************************************************************/
-
-
-#include "emu.h"
-#include "rom.h"
-
-
-//-------------------------------------------------
-// m5_rom_device - constructor
-//-------------------------------------------------
-
-const device_type M5_ROM_STD = &device_creator<m5_rom_device>;
-const device_type M5_ROM_RAM = &device_creator<m5_ram_device>;
-
-
-m5_rom_device::m5_rom_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
- : device_t(mconfig, type, name, tag, owner, clock, shortname, source),
- device_m5_cart_interface( mconfig, *this )
-{
-}
-
-m5_rom_device::m5_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : device_t(mconfig, M5_ROM_STD, "M5 Standard ROM Carts", tag, owner, clock, "m5_rom", __FILE__),
- device_m5_cart_interface( mconfig, *this )
-{
-}
-
-
-m5_ram_device::m5_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : m5_rom_device(mconfig, M5_ROM_RAM, "M5 Expansion memory cart", tag, owner, clock, "m5_ram", __FILE__)
-{
-}
-
-
-/*-------------------------------------------------
- mapper specific handlers
- -------------------------------------------------*/
-
-READ8_MEMBER(m5_rom_device::read_rom)
-{
- if (offset < m_rom_size)
- return m_rom[offset];
- else
- return 0xff;
-}
-
-READ8_MEMBER(m5_ram_device::read_ram)
-{
- return m_ram[offset];
-}
-
-WRITE8_MEMBER(m5_ram_device::write_ram)
-{
- m_ram[offset] = data;
-}
diff --git a/src/devices/bus/m5/rom.h b/src/devices/bus/m5/rom.h
deleted file mode 100644
index dedd7555f1c..00000000000
--- a/src/devices/bus/m5/rom.h
+++ /dev/null
@@ -1,50 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Fabio Priuli
-#ifndef __M5_ROM_H
-#define __M5_ROM_H
-
-#include "slot.h"
-
-
-// ======================> m5_rom_device
-
-class m5_rom_device : public device_t,
- public device_m5_cart_interface
-{
-public:
- // construction/destruction
- m5_rom_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
- m5_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
- // device-level overrides
- virtual void device_start() override {}
- virtual void device_reset() override {}
-
- // reading and writing
- virtual DECLARE_READ8_MEMBER(read_rom) override;
-};
-
-// ======================> m5_ram_device
-
-class m5_ram_device : public m5_rom_device
-{
-public:
- // construction/destruction
- m5_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
- // device-level overrides
- virtual void device_start() override {}
- virtual void device_reset() override {}
-
- // reading and writing
- virtual DECLARE_READ8_MEMBER(read_ram) override;
- virtual DECLARE_WRITE8_MEMBER(write_ram) override;
-};
-
-
-// device type definition
-extern const device_type M5_ROM_STD;
-extern const device_type M5_ROM_RAM;
-
-
-#endif
diff --git a/src/devices/bus/m5/slot.cpp b/src/devices/bus/m5/slot.cpp
deleted file mode 100644
index 162d802136e..00000000000
--- a/src/devices/bus/m5/slot.cpp
+++ /dev/null
@@ -1,276 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Fabio Priuli
-/***********************************************************************************************************
-
- M5 cart emulation
- (through slot devices)
-
- ***********************************************************************************************************/
-
-
-#include "emu.h"
-#include "slot.h"
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-const device_type M5_CART_SLOT = &device_creator<m5_cart_slot_device>;
-
-//**************************************************************************
-// M5 Cartridges Interface
-//**************************************************************************
-
-//-------------------------------------------------
-// device_m5_cart_interface - constructor
-//-------------------------------------------------
-
-device_m5_cart_interface::device_m5_cart_interface(const machine_config &mconfig, device_t &device)
- : device_slot_card_interface(mconfig, device),
- m_rom(NULL),
- m_rom_size(0)
-{
-}
-
-
-//-------------------------------------------------
-// ~device_m5_cart_interface - destructor
-//-------------------------------------------------
-
-device_m5_cart_interface::~device_m5_cart_interface()
-{
-}
-
-//-------------------------------------------------
-// rom_alloc - alloc the space for the cart
-//-------------------------------------------------
-
-void device_m5_cart_interface::rom_alloc(UINT32 size, const char *tag)
-{
- if (m_rom == NULL)
- {
- m_rom = device().machine().memory().region_alloc(std::string(tag).append(M5SLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base();
- m_rom_size = size;
- }
-}
-
-
-//-------------------------------------------------
-// ram_alloc - alloc the space for the ram
-//-------------------------------------------------
-
-void device_m5_cart_interface::ram_alloc(UINT32 size)
-{
- m_ram.resize(size);
-}
-
-
-//**************************************************************************
-// LIVE DEVICE
-//**************************************************************************
-
-//-------------------------------------------------
-// m5_cart_slot_device - constructor
-//-------------------------------------------------
-m5_cart_slot_device::m5_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- device_t(mconfig, M5_CART_SLOT, "M5 Cartridge Slot", tag, owner, clock, "m5_cart_slot", __FILE__),
- device_image_interface(mconfig, *this),
- device_slot_interface(mconfig, *this),
- m_type(M5_STD), m_cart(nullptr)
-{
-}
-
-
-//-------------------------------------------------
-// m5_cart_slot_device - destructor
-//-------------------------------------------------
-
-m5_cart_slot_device::~m5_cart_slot_device()
-{
-}
-
-//-------------------------------------------------
-// device_start - device-specific startup
-//-------------------------------------------------
-
-void m5_cart_slot_device::device_start()
-{
- m_cart = dynamic_cast<device_m5_cart_interface *>(get_card_device());
-}
-
-//-------------------------------------------------
-// device_config_complete - perform any
-// operations now that the configuration is
-// complete
-//-------------------------------------------------
-
-void m5_cart_slot_device::device_config_complete()
-{
- // set brief and instance name
- update_names();
-}
-
-
-//-------------------------------------------------
-// M5 PCB
-//-------------------------------------------------
-
-struct m5_slot
-{
- int pcb_id;
- const char *slot_option;
-};
-
-// Here, we take the feature attribute from .xml (i.e. the PCB name) and we assign a unique ID to it
-static const m5_slot slot_list[] =
-{
- {EM_5,"em-5"},
- {MEM64KBI,"64kbi"},
- {MEM64KBF,"64kbf"},
- {MEM64KRX,"64krx"}
-};
-
-static int m5_get_pcb_id(const char *slot)
-{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
- {
- if (!core_stricmp(slot_list[i].slot_option, slot))
- return slot_list[i].pcb_id;
- }
-
- return 0;
-}
-
-static const char *m5_get_slot(int type)
-{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
- {
- if (slot_list[i].pcb_id == type)
- return slot_list[i].slot_option;
- }
-
- return "std";
-}
-
-
-/*-------------------------------------------------
- call load
- -------------------------------------------------*/
-
-bool m5_cart_slot_device::call_load()
-{
- if (m_cart)
- {
- m_type=M5_STD;
-
- if (software_entry() != NULL)
- {
- const char *pcb_name = get_feature("slot");
- //software_info *name=m_software_info_ptr;
- if (pcb_name) //is it ram cart?
- m_type = m5_get_pcb_id(m_full_software_name.c_str());
- else
- m_type=M5_STD; //standard cart(no feature line in xml)
- }
-
- if (m_type == M5_STD || m_type>2) //carts with roms
- {
-
- UINT32 size = (software_entry() == NULL) ? length() : get_software_region_length("rom");
-
- if (size > 0x5000 && m_type == M5_STD)
- {
- seterror(IMAGE_ERROR_UNSPECIFIED, "Image extends beyond the expected size for an M5 cart");
- return IMAGE_INIT_FAIL;
- }
-
- m_cart->rom_alloc(size, tag());
-
- if (software_entry() == NULL)
- fread(m_cart->get_rom_base(), size);
- else
- memcpy(m_cart->get_rom_base(), get_software_region("rom"), size);
-
- }
- if (!M5_STD)
- if (get_software_region("ram"))
- m_cart->ram_alloc(get_software_region_length("ram"));
-
-
- //printf("Type: %s\n", m5_get_slot(m_type));
- }
-
- return IMAGE_INIT_PASS;
-}
-
-
-/*-------------------------------------------------
- call softlist load
- -------------------------------------------------*/
-
-bool m5_cart_slot_device::call_softlist_load(software_list_device &swlist, const char *swname, const rom_entry *start_entry)
-{
- machine().rom_load().load_software_part_region(*this, swlist, swname, start_entry);
- return TRUE;
-}
-
-
-/*-------------------------------------------------
- get default card software
- -------------------------------------------------*/
-
-std::string m5_cart_slot_device::get_default_card_software()
-{
- std::string result;
- if (open_image_file(mconfig().options()))
- {
- const char *slot_string = "std";
- //UINT32 size = core_fsize(m_file);
- int type = M5_STD;
-
-
- slot_string = m5_get_slot(type);
-
- //printf("type: %s\n", slot_string);
- clear();
-
- result.assign(slot_string);
- return result;
- }
-
- return software_get_default_slot("std");
-}
-
-/*-------------------------------------------------
- read
- -------------------------------------------------*/
-
-READ8_MEMBER(m5_cart_slot_device::read_rom)
-{
- if (m_cart)
- return m_cart->read_rom(space, offset);
- else
- return 0xff;
-}
-
-/*-------------------------------------------------
- read
- -------------------------------------------------*/
-
-READ8_MEMBER(m5_cart_slot_device::read_ram)
-{
- if (m_cart)
- return m_cart->read_ram(space, offset);
- else
- return 0xff;
-}
-
-/*-------------------------------------------------
- write
- -------------------------------------------------*/
-
-WRITE8_MEMBER(m5_cart_slot_device::write_ram)
-{
- if (m_cart)
- m_cart->write_ram(space, offset, data);
-}
diff --git a/src/devices/bus/m5/slot.h b/src/devices/bus/m5/slot.h
deleted file mode 100644
index 177977043cf..00000000000
--- a/src/devices/bus/m5/slot.h
+++ /dev/null
@@ -1,118 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Fabio Priuli
-#ifndef __M5_SLOT_H
-#define __M5_SLOT_H
-
-/***************************************************************************
- TYPE DEFINITIONS
- ***************************************************************************/
-
-
-/* PCB */
-enum
-{
- EM_5 = 1,
- MEM64KBI,
- MEM64KBF,
- MEM64KRX
-};
-
-
-#define M5_STD 0
-
-
-// ======================> device_m5_cart_interface
-
-class device_m5_cart_interface : public device_slot_card_interface
-{
-public:
- // construction/destruction
- device_m5_cart_interface(const machine_config &mconfig, device_t &device);
- virtual ~device_m5_cart_interface();
-
- // reading and writing
- virtual DECLARE_READ8_MEMBER(read_rom) { return 0xff; }
- virtual DECLARE_READ8_MEMBER(read_ram) { return 0xff; }
- virtual DECLARE_WRITE8_MEMBER(write_ram) {}
-
- void rom_alloc(UINT32 size, const char *tag);
- void ram_alloc(UINT32 size);
- UINT8* get_rom_base() { return m_rom; }
- UINT8* get_ram_base() { return &m_ram[0]; }
- UINT32 get_rom_size() { return m_rom_size; }
- UINT32 get_ram_size() { return m_ram.size(); }
-
- void save_ram() { device().save_item(NAME(m_ram)); }
-
-protected:
- // internal state
- UINT8 *m_rom;
- UINT32 m_rom_size;
- dynamic_buffer m_ram;
-};
-
-
-// ======================> m5_cart_slot_device
-
-class m5_cart_slot_device : public device_t,
- public device_image_interface,
- public device_slot_interface
-{
-public:
- // construction/destruction
- m5_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- virtual ~m5_cart_slot_device();
-
- // device-level overrides
- virtual void device_start() override;
- virtual void device_config_complete() override;
-
- // image-level overrides
- virtual bool call_load() override;
- virtual void call_unload() override {}
- virtual bool call_softlist_load(software_list_device &swlist, const char *swname, const rom_entry *start_entry) override;
-
- int get_type() { return m_type; }
-
- void save_ram() { if (m_cart && m_cart->get_ram_size()) m_cart->save_ram(); }
-
- virtual iodevice_t image_type() const override { return IO_CARTSLOT; }
- virtual bool is_readable() const override { return 1; }
- virtual bool is_writeable() const override { return 0; }
- virtual bool is_creatable() const override { return 0; }
- virtual bool must_be_loaded() const override { return 0; }
- virtual bool is_reset_on_load() const override { return 1; }
- virtual const option_guide *create_option_guide() const override { return NULL; }
- virtual const char *image_interface() const override { return "m5_cart"; }
- virtual const char *file_extensions() const override { return "bin,rom"; }
-
- // slot interface overrides
- virtual std::string get_default_card_software() override;
-
- // reading and writing
- virtual DECLARE_READ8_MEMBER(read_rom);
- virtual DECLARE_READ8_MEMBER(read_ram);
- virtual DECLARE_WRITE8_MEMBER(write_ram);
-
-protected:
-
- int m_type;
- device_m5_cart_interface* m_cart;
-};
-
-
-
-// device type definition
-extern const device_type M5_CART_SLOT;
-
-
-/***************************************************************************
- DEVICE CONFIGURATION MACROS
- ***************************************************************************/
-
-#define M5SLOT_ROM_REGION_TAG ":cart:rom"
-
-#define MCFG_M5_CARTRIDGE_ADD(_tag,_slot_intf,_def_slot) \
- MCFG_DEVICE_ADD(_tag, M5_CART_SLOT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
-#endif
diff --git a/src/devices/bus/neogeo/bootleg_prot.cpp b/src/devices/bus/neogeo/bootleg_prot.cpp
index 145e17efa0b..8c023f00091 100644
--- a/src/devices/bus/neogeo/bootleg_prot.cpp
+++ b/src/devices/bus/neogeo/bootleg_prot.cpp
@@ -142,7 +142,8 @@ WRITE16_MEMBER( ngbootleg_prot_device::kof10th_custom_w )
//UINT16 *prom = (UINT16*)m_mainrom;
COMBINE_DATA(&m_cartridge_ram2[(0x00000/2) + (offset & 0xFFFF)]);
} else { // Write S data on-the-fly
- m_fixedrom[offset] = BITSWAP8(data,7,6,0,4,3,2,1,5);
+ UINT8 *srom = m_fixedrom;
+ srom[offset] = BITSWAP8(data,7,6,0,4,3,2,1,5);
}
}
@@ -172,7 +173,6 @@ void ngbootleg_prot_device::install_kof10th_protection (cpu_device* maincpu, neo
maincpu->space(AS_PROGRAM).install_write_handler(0x240000, 0x2fffff, write16_delegate(FUNC(ngbootleg_prot_device::kof10th_bankswitch_w),this));
memcpy(m_cartridge_ram2, cpurom + 0xe0000, 0x20000);
- save_pointer(NAME(m_fixedrom), 0x40000);
}
void ngbootleg_prot_device::decrypt_kof10th(UINT8* cpurom, UINT32 cpurom_size)
diff --git a/src/devices/bus/ti99_peb/bwg.cpp b/src/devices/bus/ti99_peb/bwg.cpp
index 4716ccedf8a..4085dcfe230 100644
--- a/src/devices/bus/ti99_peb/bwg.cpp
+++ b/src/devices/bus/ti99_peb/bwg.cpp
@@ -151,7 +151,7 @@ SETADDRESS_DBIN_MEMBER( snug_bwg_device::setaddress_dbin )
&& ((state==ASSERT_LINE && ((m_address & 0x1ff8)==0x1ff0)) // read
|| (state==CLEAR_LINE && ((m_address & 0x1ff8)==0x1ff8))); // write
- m_WDsel = m_WDsel0 && WORD_ALIGNED(m_address);
+ m_WDsel = m_WDsel0 && ((m_address & 1)==0);
// Is the RTC selected on the card? (even addr)
m_RTCsel = m_inDsrArea && m_rtc_enabled && ((m_address & 0x1fe1)==0x1fe0);
diff --git a/src/devices/bus/ti99_peb/hfdc.cpp b/src/devices/bus/ti99_peb/hfdc.cpp
index 46ca7a1b819..c3e4779c1ef 100644
--- a/src/devices/bus/ti99_peb/hfdc.cpp
+++ b/src/devices/bus/ti99_peb/hfdc.cpp
@@ -232,7 +232,7 @@ READ8Z_MEMBER(myarc_hfdc_device::readz)
if (m_dip == CLEAR_LINE) *value = m_buffer_ram[(m_ram_page[bank]<<10) | (m_address & 0x03ff)];
if (TRACE_RAM)
{
- if (WORD_ALIGNED(m_address))
+ if ((m_address & 1)==0) // only show even addresses with words
{
int valword = (((*value) << 8) | m_buffer_ram[(m_ram_page[bank]<<10) | ((m_address+1) & 0x03ff)])&0xffff;
logerror("%s: %04x[%02x] -> %04x\n", tag(), m_address & 0xffff, m_ram_page[bank], valword);
@@ -246,7 +246,7 @@ READ8Z_MEMBER(myarc_hfdc_device::readz)
*value = m_dsrrom[(m_rom_page << 12) | (m_address & 0x0fff)];
if (TRACE_ROM)
{
- if (WORD_ALIGNED(m_address))
+ if ((m_address & 1)==0) // only show even addresses with words
{
int valword = (((*value) << 8) | m_dsrrom[(m_rom_page << 12) | ((m_address + 1) & 0x0fff)])&0xffff;
logerror("%s: %04x[%02x] -> %04x\n", tag(), m_address & 0xffff, m_rom_page, valword);
diff --git a/src/devices/cpu/alto2/alto2cpu.cpp b/src/devices/cpu/alto2/alto2cpu.cpp
index 653f56949e5..a3538dee290 100644
--- a/src/devices/cpu/alto2/alto2cpu.cpp
+++ b/src/devices/cpu/alto2/alto2cpu.cpp
@@ -204,9 +204,7 @@ alto2_cpu_device::alto2_cpu_device(const machine_config& mconfig, const char* ta
m_ether_a49(nullptr),
m_eth()
{
- m_ucode_config.m_is_octal = true;
- m_const_config.m_is_octal = true;
- m_iomem_config.m_is_octal = true;
+ m_is_octal = true;
memset(m_task_mpc, 0x00, sizeof(m_task_mpc));
memset(m_task_next2, 0x00, sizeof(m_task_next2));
memset(m_r, 0x00, sizeof(m_r));
diff --git a/src/devices/cpu/arm/arm.cpp b/src/devices/cpu/arm/arm.cpp
index 34dc1635639..41724668f53 100644
--- a/src/devices/cpu/arm/arm.cpp
+++ b/src/devices/cpu/arm/arm.cpp
@@ -259,7 +259,7 @@ void arm_cpu_device::cpu_write32( int addr, UINT32 data )
{
/* Unaligned writes are treated as normal writes */
m_program->write_dword(addr&ADDRESS_MASK,data);
- if (ARM_DEBUG_CORE && !DWORD_ALIGNED(addr)) logerror("%08x: Unaligned write %08x\n",R15,addr);
+ if (ARM_DEBUG_CORE && addr&3) logerror("%08x: Unaligned write %08x\n",R15,addr);
}
void arm_cpu_device::cpu_write8( int addr, UINT8 data )
@@ -272,9 +272,9 @@ UINT32 arm_cpu_device::cpu_read32( int addr )
UINT32 result = m_program->read_dword(addr&ADDRESS_MASK);
/* Unaligned reads rotate the word, they never combine words */
- if (!DWORD_ALIGNED(addr))
+ if (addr&3)
{
- if (ARM_DEBUG_CORE && !WORD_ALIGNED(addr))
+ if (ARM_DEBUG_CORE && addr&1)
logerror("%08x: Unaligned byte read %08x\n",R15,addr);
if ((addr&3)==1)
diff --git a/src/devices/cpu/asap/asap.cpp b/src/devices/cpu/asap/asap.cpp
index b369ab6d07b..c22d0cdcee2 100644
--- a/src/devices/cpu/asap/asap.cpp
+++ b/src/devices/cpu/asap/asap.cpp
@@ -364,7 +364,7 @@ inline UINT8 asap_device::readbyte(offs_t address)
inline UINT16 asap_device::readword(offs_t address)
{
// aligned reads are easy
- if (WORD_ALIGNED(address))
+ if (!(address & 1))
return m_program->read_word(address);
// misaligned reads are tricky
@@ -379,7 +379,7 @@ inline UINT16 asap_device::readword(offs_t address)
inline UINT32 asap_device::readlong(offs_t address)
{
// aligned reads are easy
- if (DWORD_ALIGNED(address))
+ if (!(address & 3))
return m_program->read_dword(address);
// misaligned reads are tricky
@@ -405,7 +405,7 @@ inline void asap_device::writebyte(offs_t address, UINT8 data)
inline void asap_device::writeword(offs_t address, UINT16 data)
{
// aligned writes are easy
- if (WORD_ALIGNED(address))
+ if (!(address & 1))
{
m_program->write_word(address, data);
return;
@@ -429,7 +429,7 @@ inline void asap_device::writeword(offs_t address, UINT16 data)
inline void asap_device::writelong(offs_t address, UINT32 data)
{
// aligned writes are easy
- if (DWORD_ALIGNED(address))
+ if (!(address & 3))
{
m_program->write_dword(address, data);
return;
diff --git a/src/devices/cpu/dsp32/dsp32.cpp b/src/devices/cpu/dsp32/dsp32.cpp
index 98640f7d1b4..f060e81d13c 100644
--- a/src/devices/cpu/dsp32/dsp32.cpp
+++ b/src/devices/cpu/dsp32/dsp32.cpp
@@ -452,8 +452,7 @@ inline void dsp32c_device::WBYTE(offs_t addr, UINT8 data)
inline UINT16 dsp32c_device::RWORD(offs_t addr)
{
#if DETECT_MISALIGNED_MEMORY
- if (!WORD_ALIGNED(addr))
- osd_printf_error("Unaligned word read @ %06X, PC=%06X\n", addr, PC);
+ if (addr & 1) fprintf(stderr, "Unaligned word read @ %06X, PC=%06X\n", addr, PC);
#endif
return m_program->read_word(addr);
}
@@ -461,8 +460,7 @@ inline UINT16 dsp32c_device::RWORD(offs_t addr)
inline UINT32 dsp32c_device::RLONG(offs_t addr)
{
#if DETECT_MISALIGNED_MEMORY
- if (!DWORD_ALIGNED(addr))
- osd_printf_error("Unaligned long read @ %06X, PC=%06X\n", addr, PC);
+ if (addr & 3) fprintf(stderr, "Unaligned long read @ %06X, PC=%06X\n", addr, PC);
#endif
return m_program->read_dword(addr);
}
@@ -470,8 +468,7 @@ inline UINT32 dsp32c_device::RLONG(offs_t addr)
inline void dsp32c_device::WWORD(offs_t addr, UINT16 data)
{
#if DETECT_MISALIGNED_MEMORY
- if (!WORD_ALIGNED(addr))
- osd_printf_error("Unaligned word write @ %06X, PC=%06X\n", addr, PC);
+ if (addr & 1) fprintf(stderr, "Unaligned word write @ %06X, PC=%06X\n", addr, PC);
#endif
m_program->write_word(addr, data);
}
@@ -479,8 +476,7 @@ inline void dsp32c_device::WWORD(offs_t addr, UINT16 data)
inline void dsp32c_device::WLONG(offs_t addr, UINT32 data)
{
#if DETECT_MISALIGNED_MEMORY
- if (!DWORD_ALIGNED(addr))
- osd_printf_error("Unaligned long write @ %06X, PC=%06X\n", addr, PC);
+ if (addr & 3) fprintf(stderr, "Unaligned long write @ %06X, PC=%06X\n", addr, PC);
#endif
m_program->write_dword(addr, data);
}
diff --git a/src/devices/cpu/h8/h8.cpp b/src/devices/cpu/h8/h8.cpp
index ba8b853e9ec..bc78626b00b 100644
--- a/src/devices/cpu/h8/h8.cpp
+++ b/src/devices/cpu/h8/h8.cpp
@@ -281,7 +281,7 @@ void h8_device::disassemble_am(char *&buffer, int am, offs_t pc, const UINT8 *op
"e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7",
};
- static const char *const r32_names[8] = {
+ static const char *const r32_names[88] = {
"er0", "er1", "er2", "er3", "er4", "er5", "er6", "sp",
};
diff --git a/src/devices/cpu/hd61700/hd61700.cpp b/src/devices/cpu/hd61700/hd61700.cpp
index 4e8d2c6590d..c786c7235ba 100644
--- a/src/devices/cpu/hd61700/hd61700.cpp
+++ b/src/devices/cpu/hd61700/hd61700.cpp
@@ -2654,7 +2654,7 @@ void hd61700_cpu_device::execute_run()
}
//if is in the internal ROM align the pc
- if (!WORD_ALIGNED(m_fetch_addr) && m_pc < INT_ROM)
+ if ((m_fetch_addr&1) && m_pc < INT_ROM)
set_pc((m_fetch_addr+1)>>1);
m_icount -= 3;
@@ -2871,7 +2871,7 @@ inline void hd61700_cpu_device::check_optional_jr(UINT8 arg)
{
if (arg & 0x80)
{
- if (m_pc < INT_ROM && WORD_ALIGNED(m_fetch_addr)) read_op();
+ if (m_pc < INT_ROM && !(m_fetch_addr&1)) read_op();
UINT8 arg1 = read_op();
diff --git a/src/devices/cpu/hphybrid/hphybrid.cpp b/src/devices/cpu/hphybrid/hphybrid.cpp
index 71aec796760..052c7058604 100644
--- a/src/devices/cpu/hphybrid/hphybrid.cpp
+++ b/src/devices/cpu/hphybrid/hphybrid.cpp
@@ -673,7 +673,12 @@ UINT16 hp_hybrid_cpu_device::RM(UINT32 addr)
return RIO(CURRENT_PA , addr_wo_bsc - HP_REG_R4_ADDR);
case HP_REG_IV_ADDR:
- return m_reg_IV;
+ // Correct?
+ if (!BIT(m_flags , HPHYBRID_IRH_SVC_BIT) && !BIT(m_flags , HPHYBRID_IRL_SVC_BIT)) {
+ return m_reg_IV;
+ } else {
+ return m_reg_IV | CURRENT_PA;
+ }
case HP_REG_PA_ADDR:
return CURRENT_PA;
@@ -1016,7 +1021,7 @@ void hp_hybrid_cpu_device::check_for_interrupts(void)
// Do a double-indirect JSM IV,I instruction
WM(AEC_CASE_C , ++m_reg_R , m_reg_P);
- m_reg_P = RM(AEC_CASE_I , m_reg_IV + CURRENT_PA);
+ m_reg_P = RM(AEC_CASE_I , RM(HP_REG_IV_ADDR));
m_reg_I = fetch();
}
diff --git a/src/devices/cpu/i386/i386.cpp b/src/devices/cpu/i386/i386.cpp
index 4f593de3dea..f0d57ada9a0 100644
--- a/src/devices/cpu/i386/i386.cpp
+++ b/src/devices/cpu/i386/i386.cpp
@@ -41,31 +41,23 @@ const device_type PENTIUM4 = &device_creator<pentium4_device>;
i386_device::i386_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: cpu_device(mconfig, I386, "I386", tag, owner, clock, "i386", __FILE__)
- , device_vtlb_interface(mconfig, *this, AS_PROGRAM)
, m_program_config("program", ENDIANNESS_LITTLE, 32, 32, 0)
, m_io_config("io", ENDIANNESS_LITTLE, 32, 16, 0)
, m_smiact(*this)
{
m_program_config.m_logaddr_width = 32;
m_program_config.m_page_shift = 12;
-
- // 32 unified
- set_vtlb_dynamic_entries(32);
}
i386_device::i386_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source, int program_data_width, int program_addr_width, int io_data_width)
: cpu_device(mconfig, type, name, tag, owner, clock, shortname, source)
- , device_vtlb_interface(mconfig, *this, AS_PROGRAM)
, m_program_config("program", ENDIANNESS_LITTLE, program_data_width, program_addr_width, 0)
, m_io_config("io", ENDIANNESS_LITTLE, io_data_width, 16, 0)
, m_smiact(*this)
{
m_program_config.m_logaddr_width = 32;
m_program_config.m_page_shift = 12;
-
- // 32 unified
- set_vtlb_dynamic_entries(32);
}
i386SX_device::i386SX_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
@@ -81,15 +73,11 @@ i486_device::i486_device(const machine_config &mconfig, const char *tag, device_
pentium_device::pentium_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: i386_device(mconfig, PENTIUM, "PENTIUM", tag, owner, clock, "pentium", __FILE__)
{
- // 64 dtlb small, 8 dtlb large, 32 itlb
- set_vtlb_dynamic_entries(96);
}
pentium_device::pentium_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
: i386_device(mconfig, type, name, tag, owner, clock, shortname, source)
{
- // 64 dtlb small, 8 dtlb large, 32 itlb
- set_vtlb_dynamic_entries(96);
}
mediagx_device::mediagx_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
@@ -105,29 +93,21 @@ pentium_pro_device::pentium_pro_device(const machine_config &mconfig, const char
pentium_mmx_device::pentium_mmx_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: pentium_device(mconfig, PENTIUM_MMX, "Pentium MMX", tag, owner, clock, "pentium_mmx", __FILE__)
{
- // 64 dtlb small, 8 dtlb large, 32 itlb small, 2 itlb large
- set_vtlb_dynamic_entries(96);
}
pentium2_device::pentium2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: pentium_device(mconfig, PENTIUM2, "Pentium II", tag, owner, clock, "pentium2", __FILE__)
{
- // 64 dtlb small, 8 dtlb large, 32 itlb small, 2 itlb large
- set_vtlb_dynamic_entries(96);
}
pentium3_device::pentium3_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: pentium_device(mconfig, PENTIUM3, "Pentium III", tag, owner, clock, "pentium3", __FILE__)
{
- // 64 dtlb small, 8 dtlb large, 32 itlb small, 2 itlb large
- set_vtlb_dynamic_entries(96);
}
pentium4_device::pentium4_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: pentium_device(mconfig, PENTIUM4, "Pentium 4", tag, owner, clock, "pentium4", __FILE__)
{
- // 128 dtlb, 64 itlb
- set_vtlb_dynamic_entries(196);
}
@@ -976,10 +956,10 @@ void i386_device::i386_trap(int irq, int irq_gate, int trap_level)
//logerror("IRQ (%08x): Interrupt during V8086 task\n",m_pc);
if(type & 0x08)
{
- PUSH32SEG(m_sreg[GS].selector & 0xffff);
- PUSH32SEG(m_sreg[FS].selector & 0xffff);
- PUSH32SEG(m_sreg[DS].selector & 0xffff);
- PUSH32SEG(m_sreg[ES].selector & 0xffff);
+ PUSH32(m_sreg[GS].selector & 0xffff);
+ PUSH32(m_sreg[FS].selector & 0xffff);
+ PUSH32(m_sreg[DS].selector & 0xffff);
+ PUSH32(m_sreg[ES].selector & 0xffff);
}
else
{
@@ -1001,7 +981,7 @@ void i386_device::i386_trap(int irq, int irq_gate, int trap_level)
if(type & 0x08)
{
// 32-bit gate
- PUSH32SEG(oldSS);
+ PUSH32(oldSS);
PUSH32(oldESP);
}
else
@@ -1063,7 +1043,7 @@ void i386_device::i386_trap(int irq, int irq_gate, int trap_level)
else
{
PUSH32(oldflags & 0x00ffffff );
- PUSH32SEG(m_sreg[CS].selector );
+ PUSH32(m_sreg[CS].selector );
if(irq == 3 || irq == 4 || irq == 9 || irq_gate == 1)
PUSH32(m_eip );
else
@@ -1326,7 +1306,7 @@ void i386_device::i386_task_switch(UINT16 selector, UINT8 nested)
}
m_cr[3] = READ32(tss+0x1c); // CR3 (PDBR)
if(oldcr3 != m_cr[3])
- vtlb_flush_dynamic();
+ vtlb_flush_dynamic(m_vtlb);
/* Set the busy bit in the new task's descriptor */
if(selector & 0x0004)
@@ -1935,7 +1915,7 @@ void i386_device::i386_protected_mode_call(UINT16 seg, UINT32 off, int indirect,
if(operand32 != 0)
{
- PUSH32SEG(oldSS);
+ PUSH32(oldSS);
PUSH32(oldESP);
}
else
@@ -2069,7 +2049,7 @@ void i386_device::i386_protected_mode_call(UINT16 seg, UINT32 off, int indirect,
else
{
/* 32-bit operand size */
- PUSH32SEG(m_sreg[CS].selector );
+ PUSH32(m_sreg[CS].selector );
PUSH32(m_eip );
m_sreg[CS].selector = selector;
m_performed_intersegment_jump = 1;
@@ -2364,7 +2344,6 @@ void i386_device::i386_protected_mode_iret(int operand32)
I386_SREG desc,stack;
UINT8 CPL, RPL, DPL;
UINT32 newflags;
- UINT8 IOPL = m_IOP1 | (m_IOP2 << 1);
CPL = m_CPL;
UINT32 ea = i386_translate(SS, (STACK_32BIT)?REG32(ESP):REG16(SP), 0);
@@ -2384,7 +2363,7 @@ void i386_device::i386_protected_mode_iret(int operand32)
if(V8086_MODE)
{
UINT32 oldflags = get_flags();
- if(IOPL != 3)
+ if(!m_IOP1 || !m_IOP2)
{
logerror("IRET (%08x): Is in Virtual 8086 mode and IOPL != 3.\n",m_pc);
FAULT(FAULT_GP,0)
@@ -2456,8 +2435,6 @@ void i386_device::i386_protected_mode_iret(int operand32)
{
UINT32 oldflags = get_flags();
newflags = (newflags & ~0x00003000) | (oldflags & 0x00003000);
- if(CPL > IOPL)
- newflags = (newflags & ~0x200 ) | (oldflags & 0x200);
}
set_flags(newflags);
m_eip = POP32() & 0xffff; // high 16 bits are ignored
@@ -2574,7 +2551,7 @@ void i386_device::i386_protected_mode_iret(int operand32)
}
if((desc.flags & 0x0080) == 0)
{
- logerror("IRET: (%08x) Return CS segment is not present.\n", m_pc);
+ logerror("IRET: Return CS segment is not present.\n");
FAULT(FAULT_NP,newCS & ~0x03)
}
if(newEIP > desc.limit)
@@ -2587,8 +2564,6 @@ void i386_device::i386_protected_mode_iret(int operand32)
{
UINT32 oldflags = get_flags();
newflags = (newflags & ~0x00003000) | (oldflags & 0x00003000);
- if(CPL > IOPL)
- newflags = (newflags & ~0x200 ) | (oldflags & 0x200);
}
if(operand32 == 0)
@@ -2758,8 +2733,6 @@ void i386_device::i386_protected_mode_iret(int operand32)
{
UINT32 oldflags = get_flags();
newflags = (newflags & ~0x00003000) | (oldflags & 0x00003000);
- if(CPL > IOPL)
- newflags = (newflags & ~0x200 ) | (oldflags & 0x200);
}
if(operand32 == 0)
@@ -3205,7 +3178,7 @@ void i386_device::i386_postload()
CHANGE_PC(m_eip);
}
-void i386_device::i386_common_init()
+void i386_device::i386_common_init(int tlbsize)
{
int i, j;
static const int regs8[8] = {AL,CL,DL,BL,AH,CH,DH,BH};
@@ -3238,6 +3211,7 @@ void i386_device::i386_common_init()
m_program = &space(AS_PROGRAM);
m_direct = &m_program->direct();
m_io = &space(AS_IO);
+ m_vtlb = vtlb_alloc(this, AS_PROGRAM, 0, tlbsize);
m_smi = false;
m_debugger_temp = 0;
m_lock = false;
@@ -3320,7 +3294,7 @@ void i386_device::i386_common_init()
void i386_device::device_start()
{
- i386_common_init();
+ i386_common_init(32);
build_opcode_table(OP_I386);
m_cycle_table_rm = cycle_table_rm[CPU_CYCLES_I386].get();
@@ -3724,6 +3698,7 @@ void i386_device::zero_state()
void i386_device::device_reset()
{
zero_state();
+ vtlb_flush_dynamic(m_vtlb);
m_sreg[CS].selector = 0xf000;
m_sreg[CS].base = 0xffff0000;
@@ -3756,7 +3731,6 @@ void i386_device::device_reset()
// Family 3 (386), Model 0 (DX), Stepping 8 (D1)
REG32(EAX) = 0;
REG32(EDX) = (3 << 8) | (0 << 4) | (8);
- m_cpu_version = REG32(EDX);
m_CPL = 0;
@@ -3830,7 +3804,7 @@ void i386_device::pentium_smi()
WRITE32(REG32(ESI), smram_state+SMRAM_ESI);
WRITE32(REG32(EDI), smram_state+SMRAM_EDI);
WRITE32(m_eip, smram_state+SMRAM_EIP);
- WRITE32(old_flags, smram_state+SMRAM_EFLAGS);
+ WRITE32(old_flags, smram_state+SMRAM_EAX);
WRITE32(m_cr[3], smram_state+SMRAM_CR3);
WRITE32(old_cr0, smram_state+SMRAM_CR0);
@@ -3916,7 +3890,7 @@ void i386_device::i386_set_a20_line(int state)
m_a20_mask = ~(1 << 20);
}
// TODO: how does A20M and the tlb interact
- vtlb_flush_dynamic();
+ vtlb_flush_dynamic(m_vtlb);
}
void i386_device::execute_run()
@@ -4002,7 +3976,7 @@ offs_t i386_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *opr
void i486_device::device_start()
{
- i386_common_init();
+ i386_common_init(32);
build_opcode_table(OP_I386 | OP_FPU | OP_I486);
build_x87_opcode_table();
@@ -4015,6 +3989,7 @@ void i486_device::device_start()
void i486_device::device_reset()
{
zero_state();
+ vtlb_flush_dynamic(m_vtlb);
m_sreg[CS].selector = 0xf000;
m_sreg[CS].base = 0xffff0000;
@@ -4047,7 +4022,6 @@ void i486_device::device_reset()
// Family 4 (486), Model 0/1 (DX), Stepping 3
REG32(EAX) = 0;
REG32(EDX) = (4 << 8) | (0 << 4) | (3);
- m_cpu_version = REG32(EDX);
CHANGE_PC(m_eip);
}
@@ -4059,7 +4033,8 @@ void i486_device::device_reset()
void pentium_device::device_start()
{
- i386_common_init();
+ // 64 dtlb small, 8 dtlb large, 32 itlb
+ i386_common_init(96);
register_state_i386_x87();
build_opcode_table(OP_I386 | OP_FPU | OP_I486 | OP_PENTIUM);
@@ -4071,6 +4046,7 @@ void pentium_device::device_start()
void pentium_device::device_reset()
{
zero_state();
+ vtlb_flush_dynamic(m_vtlb);
m_sreg[CS].selector = 0xf000;
m_sreg[CS].base = 0xffff0000;
@@ -4131,7 +4107,8 @@ void pentium_device::device_reset()
void mediagx_device::device_start()
{
- i386_common_init();
+ // probably 32 unified
+ i386_common_init(32);
register_state_i386_x87();
build_x87_opcode_table();
@@ -4143,6 +4120,7 @@ void mediagx_device::device_start()
void mediagx_device::device_reset()
{
zero_state();
+ vtlb_flush_dynamic(m_vtlb);
m_sreg[CS].selector = 0xf000;
m_sreg[CS].base = 0xffff0000;
@@ -4194,7 +4172,8 @@ void mediagx_device::device_reset()
void pentium_pro_device::device_start()
{
- i386_common_init();
+ // 64 dtlb small, 32 itlb
+ i386_common_init(96);
register_state_i386_x87();
build_x87_opcode_table();
@@ -4206,6 +4185,7 @@ void pentium_pro_device::device_start()
void pentium_pro_device::device_reset()
{
zero_state();
+ vtlb_flush_dynamic(m_vtlb);
m_sreg[CS].selector = 0xf000;
m_sreg[CS].base = 0xffff0000;
@@ -4267,7 +4247,8 @@ void pentium_pro_device::device_reset()
void pentium_mmx_device::device_start()
{
- i386_common_init();
+ // 64 dtlb small, 8 dtlb large, 32 itlb small, 2 itlb large
+ i386_common_init(96);
register_state_i386_x87();
build_x87_opcode_table();
@@ -4279,6 +4260,7 @@ void pentium_mmx_device::device_start()
void pentium_mmx_device::device_reset()
{
zero_state();
+ vtlb_flush_dynamic(m_vtlb);
m_sreg[CS].selector = 0xf000;
m_sreg[CS].base = 0xffff0000;
@@ -4338,7 +4320,8 @@ void pentium_mmx_device::device_reset()
void pentium2_device::device_start()
{
- i386_common_init();
+ // 64 dtlb small, 8 dtlb large, 32 itlb small, 2 itlb large
+ i386_common_init(96);
register_state_i386_x87();
build_x87_opcode_table();
@@ -4350,6 +4333,7 @@ void pentium2_device::device_start()
void pentium2_device::device_reset()
{
zero_state();
+ vtlb_flush_dynamic(m_vtlb);
m_sreg[CS].selector = 0xf000;
m_sreg[CS].base = 0xffff0000;
@@ -4403,7 +4387,8 @@ void pentium2_device::device_reset()
void pentium3_device::device_start()
{
- i386_common_init();
+ // 64 dtlb small, 8 dtlb large, 32 itlb small, 2 itlb large
+ i386_common_init(96);
register_state_i386_x87_xmm();
build_x87_opcode_table();
@@ -4415,6 +4400,7 @@ void pentium3_device::device_start()
void pentium3_device::device_reset()
{
zero_state();
+ vtlb_flush_dynamic(m_vtlb);
m_sreg[CS].selector = 0xf000;
m_sreg[CS].base = 0xffff0000;
@@ -4470,7 +4456,8 @@ void pentium3_device::device_reset()
void pentium4_device::device_start()
{
- i386_common_init();
+ // 128 dtlb, 64 itlb
+ i386_common_init(196);
register_state_i386_x87_xmm();
build_x87_opcode_table();
@@ -4482,6 +4469,7 @@ void pentium4_device::device_start()
void pentium4_device::device_reset()
{
zero_state();
+ vtlb_flush_dynamic(m_vtlb);
m_sreg[CS].selector = 0xf000;
m_sreg[CS].base = 0xffff0000;
diff --git a/src/devices/cpu/i386/i386.h b/src/devices/cpu/i386/i386.h
index 8e64458f228..c9ef38b4280 100644
--- a/src/devices/cpu/i386/i386.h
+++ b/src/devices/cpu/i386/i386.h
@@ -8,7 +8,7 @@
#include "softfloat/milieu.h"
#include "softfloat/softfloat.h"
#include "debug/debugcpu.h"
-#include "divtlb.h"
+#include "cpu/vtlb.h"
#define INPUT_LINE_A20 1
@@ -24,7 +24,7 @@
#define X86_NUM_CPUS 4
-class i386_device : public cpu_device, public device_vtlb_interface
+class i386_device : public cpu_device
{
public:
// construction/destruction
@@ -270,6 +270,8 @@ struct I386_CALL_GATE
UINT8 *m_cycle_table_pm;
UINT8 *m_cycle_table_rm;
+ vtlb_state *m_vtlb;
+
bool m_smm;
bool m_smi;
bool m_smi_latched;
@@ -333,7 +335,6 @@ struct I386_CALL_GATE
inline UINT32 DEC32(UINT32 dst);
inline void PUSH16(UINT16 value);
inline void PUSH32(UINT32 value);
- inline void PUSH32SEG(UINT32 value);
inline void PUSH8(UINT8 value);
inline UINT8 POP8();
inline UINT16 POP16();
@@ -1410,7 +1411,7 @@ struct I386_CALL_GATE
void build_x87_opcode_table_df();
void build_x87_opcode_table();
void i386_postload();
- void i386_common_init();
+ void i386_common_init(int tlbsize);
void build_opcode_table(UINT32 features);
void pentium_smi();
void zero_state();
diff --git a/src/devices/cpu/i386/i386op32.inc b/src/devices/cpu/i386/i386op32.inc
index 89c7bab44b4..af5358e4bff 100644
--- a/src/devices/cpu/i386/i386op32.inc
+++ b/src/devices/cpu/i386/i386op32.inc
@@ -475,7 +475,7 @@ void i386_device::i386_call_abs32() // Opcode 0x9a
}
else
{
- PUSH32SEG(m_sreg[CS].selector );
+ PUSH32(m_sreg[CS].selector );
PUSH32(m_eip );
m_sreg[CS].selector = ptr;
m_performed_intersegment_jump = 1;
@@ -1717,7 +1717,7 @@ void i386_device::i386_push_cs32() // Opcode 0x0e
else
offset = (REG16(SP) - 4) & 0xffff;
if(i386_limit_check(SS,offset) == 0)
- PUSH32SEG(m_sreg[CS].selector );
+ PUSH32(m_sreg[CS].selector );
else
FAULT(FAULT_SS,0)
CYCLES(CYCLES_PUSH_SREG);
@@ -1731,7 +1731,7 @@ void i386_device::i386_push_ds32() // Opcode 0x1e
else
offset = (REG16(SP) - 4) & 0xffff;
if(i386_limit_check(SS,offset) == 0)
- PUSH32SEG(m_sreg[DS].selector );
+ PUSH32(m_sreg[DS].selector );
else
FAULT(FAULT_SS,0)
CYCLES(CYCLES_PUSH_SREG);
@@ -1745,7 +1745,7 @@ void i386_device::i386_push_es32() // Opcode 0x06
else
offset = (REG16(SP) - 4) & 0xffff;
if(i386_limit_check(SS,offset) == 0)
- PUSH32SEG(m_sreg[ES].selector );
+ PUSH32(m_sreg[ES].selector );
else
FAULT(FAULT_SS,0)
CYCLES(CYCLES_PUSH_SREG);
@@ -1759,7 +1759,7 @@ void i386_device::i386_push_fs32() // Opcode 0x0f a0
else
offset = (REG16(SP) - 4) & 0xffff;
if(i386_limit_check(SS,offset) == 0)
- PUSH32SEG(m_sreg[FS].selector );
+ PUSH32(m_sreg[FS].selector );
else
FAULT(FAULT_SS,0)
CYCLES(CYCLES_PUSH_SREG);
@@ -1773,7 +1773,7 @@ void i386_device::i386_push_gs32() // Opcode 0x0f a8
else
offset = (REG16(SP) - 4) & 0xffff;
if(i386_limit_check(SS,offset) == 0)
- PUSH32SEG(m_sreg[GS].selector );
+ PUSH32(m_sreg[GS].selector );
else
FAULT(FAULT_SS,0)
CYCLES(CYCLES_PUSH_SREG);
@@ -1787,7 +1787,7 @@ void i386_device::i386_push_ss32() // Opcode 0x16
else
offset = (REG16(SP) - 4) & 0xffff;
if(i386_limit_check(SS,offset) == 0)
- PUSH32SEG(m_sreg[SS].selector );
+ PUSH32(m_sreg[SS].selector );
else
FAULT(FAULT_SS,0)
CYCLES(CYCLES_PUSH_SREG);
@@ -2845,7 +2845,7 @@ void i386_device::i386_groupFF_32() // Opcode 0xff
}
else
{
- PUSH32SEG(m_sreg[CS].selector );
+ PUSH32(m_sreg[CS].selector );
PUSH32(m_eip );
m_sreg[CS].selector = selector;
m_performed_intersegment_jump = 1;
diff --git a/src/devices/cpu/i386/i386ops.h b/src/devices/cpu/i386/i386ops.h
index ccf89a8720d..2760b9cf410 100644
--- a/src/devices/cpu/i386/i386ops.h
+++ b/src/devices/cpu/i386/i386ops.h
@@ -297,7 +297,6 @@ const i386_device::X86_OPCODE i386_device::s_x86_opcode_table[] =
{ 0x03, OP_2BYTE|OP_I386, &i386_device::i386_lsl_r16_rm16, &i386_device::i386_lsl_r32_rm32, false},
{ 0x06, OP_2BYTE|OP_I386, &i386_device::i386_clts, &i386_device::i386_clts, false},
{ 0x07, OP_2BYTE|OP_I386, &i386_device::i386_loadall, &i386_device::i386_loadall, false},
- { 0x07, OP_2BYTE|OP_I486, &i386_device::i386_invalid, &i386_device::i386_invalid, false},
{ 0x08, OP_2BYTE|OP_I486, &i386_device::i486_invd, &i386_device::i486_invd, false},
{ 0x09, OP_2BYTE|OP_I486, &i386_device::i486_wbinvd, &i386_device::i486_wbinvd, false},
{ 0x0B, OP_2BYTE|OP_PENTIUM, &i386_device::pentium_ud2, &i386_device::pentium_ud2, false},
diff --git a/src/devices/cpu/i386/i386ops.inc b/src/devices/cpu/i386/i386ops.inc
index 2f13445c8be..dc237c98469 100644
--- a/src/devices/cpu/i386/i386ops.inc
+++ b/src/devices/cpu/i386/i386ops.inc
@@ -701,7 +701,7 @@ void i386_device::i386_mov_cr_r32() // Opcode 0x0f 22
case 2: CYCLES(CYCLES_MOV_REG_CR2); break;
case 3:
CYCLES(CYCLES_MOV_REG_CR3);
- vtlb_flush_dynamic();
+ vtlb_flush_dynamic(m_vtlb);
break;
case 4: CYCLES(1); break; // TODO
default:
@@ -2504,66 +2504,7 @@ void i386_device::i386_mov_tr_r32() // Opcode 0x0f 26
void i386_device::i386_loadall() // Opcode 0x0f 0x07 (0x0f 0x05 on 80286), undocumented
{
- if(PROTECTED_MODE && (m_CPL != 0))
- FAULT(FAULT_GP,0)
- UINT32 ea = i386_translate(ES, REG32(EDI), 0);
- m_cr[0] = READ32(ea) & 0xfffeffff; // wp not supported on 386
- set_flags(READ32(ea + 0x04));
- m_eip = READ32(ea + 0x08);
- REG32(EDI) = READ32(ea + 0x0c);
- REG32(ESI) = READ32(ea + 0x10);
- REG32(EBP) = READ32(ea + 0x14);
- REG32(ESP) = READ32(ea + 0x18);
- REG32(EBX) = READ32(ea + 0x1c);
- REG32(EDX) = READ32(ea + 0x20);
- REG32(ECX) = READ32(ea + 0x24);
- REG32(EAX) = READ32(ea + 0x28);
- m_dr[6] = READ32(ea + 0x2c);
- m_dr[7] = READ32(ea + 0x30);
- m_task.segment = READ16(ea + 0x34);
- m_ldtr.segment = READ16(ea + 0x38);
- m_sreg[GS].selector = READ16(ea + 0x3c);
- m_sreg[FS].selector = READ16(ea + 0x40);
- m_sreg[DS].selector = READ16(ea + 0x44);
- m_sreg[SS].selector = READ16(ea + 0x48);
- m_sreg[CS].selector = READ16(ea + 0x4c);
- m_sreg[ES].selector = READ16(ea + 0x50);
- m_task.flags = READ32(ea + 0x54) >> 8;
- m_task.base = READ32(ea + 0x58);
- m_task.limit = READ32(ea + 0x5c);
- m_idtr.base = READ32(ea + 0x64);
- m_idtr.limit = READ32(ea + 0x68);
- m_gdtr.base = READ32(ea + 0x70);
- m_gdtr.limit = READ32(ea + 0x74);
- m_ldtr.flags = READ32(ea + 0x78) >> 8;
- m_ldtr.base = READ32(ea + 0x7c);
- m_ldtr.limit = READ32(ea + 0x80);
- m_sreg[GS].flags = READ32(ea + 0x84) >> 8;
- m_sreg[GS].base = READ32(ea + 0x88);
- m_sreg[GS].limit = READ32(ea + 0x8c);
- m_sreg[FS].flags = READ32(ea + 0x90) >> 8;
- m_sreg[FS].base = READ32(ea + 0x94);
- m_sreg[FS].limit = READ32(ea + 0x98);
- m_sreg[DS].flags = READ32(ea + 0x9c) >> 8;
- m_sreg[DS].base = READ32(ea + 0xa0);
- m_sreg[DS].limit = READ32(ea + 0xa4);
- m_sreg[SS].flags = READ32(ea + 0xa8) >> 8;
- m_sreg[SS].base = READ32(ea + 0xac);
- m_sreg[SS].limit = READ32(ea + 0xb0);
- m_sreg[CS].flags = READ32(ea + 0xb4) >> 8;
- m_sreg[CS].base = READ32(ea + 0xb8);
- m_sreg[CS].limit = READ32(ea + 0xbc);
- m_sreg[ES].flags = READ32(ea + 0xc0) >> 8;
- m_sreg[ES].base = READ32(ea + 0xc4);
- m_sreg[ES].limit = READ32(ea + 0xc8);
- m_CPL = (m_sreg[SS].flags >> 5) & 3; // cpl == dpl of ss
-
- for(int i = 0; i < GS; i++)
- {
- m_sreg[i].valid = (m_sreg[i].flags & 0x80) ? true : false;
- m_sreg[i].d = (m_sreg[i].flags & 0x4000) ? 1 : 0;
- }
- CHANGE_PC(m_eip);
+ fatalerror("i386: LOADALL unimplemented at %08X\n", m_pc - 1);
}
void i386_device::i386_invalid()
diff --git a/src/devices/cpu/i386/i386priv.h b/src/devices/cpu/i386/i386priv.h
index 0a471adfe36..9913d851fa2 100644
--- a/src/devices/cpu/i386/i386priv.h
+++ b/src/devices/cpu/i386/i386priv.h
@@ -486,7 +486,7 @@ int i386_device::translate_address(int pl, int type, UINT32 *address, UINT32 *er
if(!(m_cr[0] & 0x80000000)) // Some (very few) old OS's won't work with this
return TRUE;
- const vtlb_entry *table = vtlb_table();
+ const vtlb_entry *table = vtlb_table(m_vtlb);
UINT32 index = *address >> 12;
vtlb_entry entry = table[index];
if(type == TRANSLATE_FETCH)
@@ -506,7 +506,7 @@ int i386_device::translate_address(int pl, int type, UINT32 *address, UINT32 *er
*error |= 1;
return FALSE;
}
- vtlb_dynload(index, *address, entry);
+ vtlb_dynload(m_vtlb, index, *address, entry);
return TRUE;
}
if(!(entry & (1 << type)))
@@ -557,7 +557,7 @@ UINT16 i386_device::FETCH16()
UINT16 value;
UINT32 address = m_pc, error;
- if( !WORD_ALIGNED(address) ) { /* Unaligned read */
+ if( address & 0x1 ) { /* Unaligned read */
value = (FETCH() << 0);
value |= (FETCH() << 8);
} else {
@@ -575,7 +575,7 @@ UINT32 i386_device::FETCH32()
UINT32 value;
UINT32 address = m_pc, error;
- if( !DWORD_ALIGNED(m_pc) ) { /* Unaligned read */
+ if( m_pc & 0x3 ) { /* Unaligned read */
value = (FETCH() << 0);
value |= (FETCH() << 8);
value |= (FETCH() << 16);
@@ -607,7 +607,7 @@ UINT16 i386_device::READ16(UINT32 ea)
UINT16 value;
UINT32 address = ea, error;
- if( !WORD_ALIGNED(ea) ) { /* Unaligned read */
+ if( ea & 0x1 ) { /* Unaligned read */
value = (READ8( address+0 ) << 0);
value |= (READ8( address+1 ) << 8);
} else {
@@ -624,7 +624,7 @@ UINT32 i386_device::READ32(UINT32 ea)
UINT32 value;
UINT32 address = ea, error;
- if( !DWORD_ALIGNED(ea) ) { /* Unaligned read */
+ if( ea & 0x3 ) { /* Unaligned read */
value = (READ8( address+0 ) << 0);
value |= (READ8( address+1 ) << 8);
value |= (READ8( address+2 ) << 16),
@@ -644,7 +644,7 @@ UINT64 i386_device::READ64(UINT32 ea)
UINT64 value;
UINT32 address = ea, error;
- if( !QWORD_ALIGNED(ea) ) { /* Unaligned read */
+ if( ea & 0x7 ) { /* Unaligned read */
value = (((UINT64) READ8( address+0 )) << 0);
value |= (((UINT64) READ8( address+1 )) << 8);
value |= (((UINT64) READ8( address+2 )) << 16);
@@ -678,7 +678,7 @@ UINT16 i386_device::READ16PL0(UINT32 ea)
UINT16 value;
UINT32 address = ea, error;
- if( !WORD_ALIGNED(ea) ) { /* Unaligned read */
+ if( ea & 0x1 ) { /* Unaligned read */
value = (READ8PL0( address+0 ) << 0);
value |= (READ8PL0( address+1 ) << 8);
} else {
@@ -696,7 +696,7 @@ UINT32 i386_device::READ32PL0(UINT32 ea)
UINT32 value;
UINT32 address = ea, error;
- if( !DWORD_ALIGNED(ea) ) { /* Unaligned read */
+ if( ea & 0x3 ) { /* Unaligned read */
value = (READ8PL0( address+0 ) << 0);
value |= (READ8PL0( address+1 ) << 8);
value |= (READ8PL0( address+2 ) << 16);
@@ -732,7 +732,7 @@ void i386_device::WRITE16(UINT32 ea, UINT16 value)
{
UINT32 address = ea, error;
- if( !WORD_ALIGNED(ea) ) { /* Unaligned write */
+ if( ea & 0x1 ) { /* Unaligned write */
WRITE8( address+0, value & 0xff );
WRITE8( address+1, (value >> 8) & 0xff );
} else {
@@ -747,7 +747,7 @@ void i386_device::WRITE32(UINT32 ea, UINT32 value)
{
UINT32 address = ea, error;
- if( !DWORD_ALIGNED(ea) ) { /* Unaligned write */
+ if( ea & 0x3 ) { /* Unaligned write */
WRITE8( address+0, value & 0xff );
WRITE8( address+1, (value >> 8) & 0xff );
WRITE8( address+2, (value >> 16) & 0xff );
@@ -765,7 +765,7 @@ void i386_device::WRITE64(UINT32 ea, UINT64 value)
{
UINT32 address = ea, error;
- if( !QWORD_ALIGNED(ea) ) { /* Unaligned write */
+ if( ea & 0x7 ) { /* Unaligned write */
WRITE8( address+0, value & 0xff );
WRITE8( address+1, (value >> 8) & 0xff );
WRITE8( address+2, (value >> 16) & 0xff );
@@ -1000,23 +1000,6 @@ void i386_device::PUSH32(UINT32 value)
REG16(SP) = new_esp;
}
}
-
-void i386_device::PUSH32SEG(UINT32 value)
-{
- UINT32 ea, new_esp;
- if( STACK_32BIT ) {
- new_esp = REG32(ESP) - 4;
- ea = i386_translate(SS, new_esp, 1);
- ((m_cpu_version & 0xf00) == 0x300) ? WRITE16(ea, value) : WRITE32(ea, value ); // 486 also?
- REG32(ESP) = new_esp;
- } else {
- new_esp = (REG16(SP) - 4) & 0xffff;
- ea = i386_translate(SS, new_esp, 1);
- ((m_cpu_version & 0xf00) == 0x300) ? WRITE16(ea, value) : WRITE32(ea, value );
- REG16(SP) = new_esp;
- }
-}
-
void i386_device::PUSH8(UINT8 value)
{
if( m_operand_size ) {
diff --git a/src/devices/cpu/i386/i486ops.inc b/src/devices/cpu/i386/i486ops.inc
index 8be406692d4..d22f6c079c3 100644
--- a/src/devices/cpu/i386/i486ops.inc
+++ b/src/devices/cpu/i386/i486ops.inc
@@ -312,7 +312,7 @@ void i386_device::i486_group0F01_16() // Opcode 0x0f 01
}
ea = GetEA(modrm,-1);
CYCLES(25); // TODO: add to cycles.h
- vtlb_flush_address(ea);
+ vtlb_flush_address(m_vtlb, ea);
break;
}
default:
@@ -430,7 +430,7 @@ void i386_device::i486_group0F01_32() // Opcode 0x0f 01
}
ea = GetEA(modrm,-1);
CYCLES(25); // TODO: add to cycles.h
- vtlb_flush_address(ea);
+ vtlb_flush_address(m_vtlb, ea);
break;
}
default:
@@ -500,12 +500,12 @@ void i386_device::i486_mov_cr_r32() // Opcode 0x0f 22
case 0:
CYCLES(CYCLES_MOV_REG_CR0);
if((oldcr ^ m_cr[cr]) & 0x80010000)
- vtlb_flush_dynamic();
+ vtlb_flush_dynamic(m_vtlb);
break;
case 2: CYCLES(CYCLES_MOV_REG_CR2); break;
case 3:
CYCLES(CYCLES_MOV_REG_CR3);
- vtlb_flush_dynamic();
+ vtlb_flush_dynamic(m_vtlb);
break;
case 4: CYCLES(1); break; // TODO
default:
diff --git a/src/devices/cpu/i4004/i4004.cpp b/src/devices/cpu/i4004/i4004.cpp
index 371074238c9..d4ba8891260 100644
--- a/src/devices/cpu/i4004/i4004.cpp
+++ b/src/devices/cpu/i4004/i4004.cpp
@@ -30,9 +30,7 @@ i4004_cpu_device::i4004_cpu_device(const machine_config &mconfig, const char *ta
, m_io_config("io", ENDIANNESS_LITTLE, 8, 6, 0)
, m_data_config("data", ENDIANNESS_LITTLE, 8, 12, 0), m_A(0), m_C(0), m_TEST(0), m_flags(0), m_program(nullptr), m_direct(nullptr), m_data(nullptr), m_io(nullptr), m_icount(0), m_pc_pos(0), m_addr_mask(0)
{
- m_program_config.m_is_octal = true;
- m_io_config.m_is_octal = true;
- m_data_config.m_is_octal = true;
+ m_is_octal = true;
}
diff --git a/src/devices/cpu/i8089/i8089.cpp b/src/devices/cpu/i8089/i8089.cpp
index ade9e4f768b..22494cfdd2f 100644
--- a/src/devices/cpu/i8089/i8089.cpp
+++ b/src/devices/cpu/i8089/i8089.cpp
@@ -289,7 +289,7 @@ UINT16 i8089_device::read_word(bool space, offs_t address)
UINT16 data;
address_space *aspace = (space ? m_io : m_mem);
- if (sysbus_width() && WORD_ALIGNED(address))
+ if (sysbus_width() && !(address & 1))
{
data = aspace->read_word(address);
}
@@ -311,7 +311,7 @@ void i8089_device::write_word(bool space, offs_t address, UINT16 data)
{
address_space *aspace = (space ? m_io : m_mem);
- if (sysbus_width() && WORD_ALIGNED(address))
+ if (sysbus_width() && !(address & 1))
{
aspace->write_word(address, data);
}
diff --git a/src/devices/cpu/i86/i86.txt b/src/devices/cpu/i86/i86.txt
index fb27b8526fe..39b54d6a8d0 100644
--- a/src/devices/cpu/i86/i86.txt
+++ b/src/devices/cpu/i86/i86.txt
@@ -29,7 +29,6 @@ mov sreg, doesnot disable until next operation is executed
8086/8088
---------
"mov cs, " causes unconditional jump!
-0xd6 is salc (sbb al,al) as all other intel x86-16 and -32 cpus
80C86/80C88
-----------
@@ -37,10 +36,9 @@ mov sreg, doesnot disable until next operation is executed
80186/80188
-----------
-integrated pic, timer and dmac entirely incompatible with 8259, 825[3,4] and 82[3,5]7
+integrated pic8259, pit8253, dma8253 (but not at standard pc addresses)
additional instructions
-#BR/bound/int 5, #UD/illegal instruction/int 6, #NM/coprocessor unavailable/int 7 support
-"mov cs, " ignored (likely causes int 6)
+"mov cs, " ?
shift count anded with 0x1f
80188
@@ -54,7 +52,6 @@ although it is based on 80186 instruction set, some behaviours follow 8086
8080 emulation mode
"mov cs, " ignored
shift count not anded (acts like 8086)
-0xd6 is xlat alias
NEC 70116 (V30)
---------------
@@ -72,11 +69,11 @@ no 8080 emulation mode
NEC V40
-------
-pinout, integrated peripherals 8259,54,37 clones at nonpc compatible addresses
+pinout, integrated peripherals as 80186
NEC V50
-------
-pinout, integrated peripherals as v40
+pinout, integrated peripherals as 80188
NEC V33?
--------
@@ -95,9 +92,9 @@ v30? emulation mode (without 8080 emulation mode)
80286
-----
-80186 with additional instructions but no peripherals
+80186 with additional instructions
24 bit address bus,
-protected mode selector/descriptor
+protected mode
80386 and later
---------------
diff --git a/src/devices/cpu/i960/i960.cpp b/src/devices/cpu/i960/i960.cpp
index f754445379b..224b844387c 100644
--- a/src/devices/cpu/i960/i960.cpp
+++ b/src/devices/cpu/i960/i960.cpp
@@ -26,7 +26,7 @@ i960_cpu_device::i960_cpu_device(const machine_config &mconfig, const char *tag,
UINT32 i960_cpu_device::i960_read_dword_unaligned(UINT32 address)
{
- if (!DWORD_ALIGNED(address))
+ if (address & 3)
return m_program->read_byte(address) | m_program->read_byte(address+1)<<8 | m_program->read_byte(address+2)<<16 | m_program->read_byte(address+3)<<24;
else
return m_program->read_dword(address);
@@ -34,7 +34,7 @@ UINT32 i960_cpu_device::i960_read_dword_unaligned(UINT32 address)
UINT16 i960_cpu_device::i960_read_word_unaligned(UINT32 address)
{
- if (!WORD_ALIGNED(address))
+ if (address & 1)
return m_program->read_byte(address) | m_program->read_byte(address+1)<<8;
else
return m_program->read_word(address);
@@ -42,7 +42,7 @@ UINT16 i960_cpu_device::i960_read_word_unaligned(UINT32 address)
void i960_cpu_device::i960_write_dword_unaligned(UINT32 address, UINT32 data)
{
- if (!DWORD_ALIGNED(address))
+ if (address & 3)
{
m_program->write_byte(address, data & 0xff);
m_program->write_byte(address+1, (data>>8)&0xff);
@@ -57,7 +57,7 @@ void i960_cpu_device::i960_write_dword_unaligned(UINT32 address, UINT32 data)
void i960_cpu_device::i960_write_word_unaligned(UINT32 address, UINT16 data)
{
- if (!WORD_ALIGNED(address))
+ if (address & 1)
{
m_program->write_byte(address, data & 0xff);
m_program->write_byte(address+1, (data>>8)&0xff);
diff --git a/src/devices/cpu/m37710/m37710il.h b/src/devices/cpu/m37710/m37710il.h
index eb79f0fddd6..ffc1aed0a7a 100644
--- a/src/devices/cpu/m37710/m37710il.h
+++ b/src/devices/cpu/m37710/m37710il.h
@@ -42,7 +42,7 @@ inline UINT32 m37710_cpu_device::m37710i_read_16_normal(UINT32 address)
inline UINT32 m37710_cpu_device::m37710i_read_16_immediate(UINT32 address)
{
- if (!WORD_ALIGNED(address))
+ if (address & 1)
return m37710_read_8_immediate(address) | (m37710_read_8_immediate(address+1)<<8);
else
return m37710_read_16_immediate(address);
@@ -65,7 +65,7 @@ inline void m37710_cpu_device::m37710i_write_16_direct(UINT32 address, UINT32 va
inline UINT32 m37710_cpu_device::m37710i_read_24_normal(UINT32 address)
{
- if (!WORD_ALIGNED(address))
+ if (address & 1)
return m37710_read_8(address) | (m37710_read_16(address+1)<<8);
else
return m37710_read_16(address) | (m37710_read_8(address+2)<<16);
@@ -73,7 +73,7 @@ inline UINT32 m37710_cpu_device::m37710i_read_24_normal(UINT32 address)
inline UINT32 m37710_cpu_device::m37710i_read_24_immediate(UINT32 address)
{
- if (!WORD_ALIGNED(address))
+ if (address & 1)
return m37710_read_8_immediate(address) | (m37710_read_16_immediate(address+1)<<8);
else
return m37710_read_16_immediate(address) | (m37710_read_8_immediate(address+2)<<16);
@@ -81,7 +81,7 @@ inline UINT32 m37710_cpu_device::m37710i_read_24_immediate(UINT32 address)
inline UINT32 m37710_cpu_device::m37710i_read_24_direct(UINT32 address)
{
- if (!WORD_ALIGNED(address))
+ if (address & 1)
return m37710_read_8(address) | (m37710_read_16(address+1)<<8);
else
return m37710_read_16(address) | (m37710_read_8(address+2)<<16);
diff --git a/src/devices/cpu/m6800/6800dasm.cpp b/src/devices/cpu/m6800/6800dasm.cpp
index 2e94ef3b62d..49f908013cd 100644
--- a/src/devices/cpu/m6800/6800dasm.cpp
+++ b/src/devices/cpu/m6800/6800dasm.cpp
@@ -52,8 +52,7 @@ enum op_names {
rts, sba, sbca, sbcb, sec, sev, sta, stb,
_std, sei, sts, stx, suba, subb, subd, swi,
wai, tab, tap, tba, tim, tpa, tst, tsta,
- tstb, tsx, txs, asx1, asx2, xgdx, addx, adcx,
- bitx
+ tstb, tsx, txs, asx1, asx2, xgdx, addx, adcx
};
static const char *const op_name_str[] = {
@@ -72,8 +71,7 @@ static const char *const op_name_str[] = {
"rts", "sba", "sbca", "sbcb", "sec", "sev", "sta", "stb",
"std", "sei", "sts", "stx", "suba", "subb", "subd", "swi",
"wai", "tab", "tap", "tba", "tim", "tpa", "tst", "tsta",
- "tstb", "tsx", "txs", "asx1", "asx2", "xgdx", "addx", "adcx",
- "bitx"
+ "tstb", "tsx", "txs", "asx1", "asx2", "xgdx", "addx", "adcx"
};
/*
@@ -84,7 +82,7 @@ static const char *const op_name_str[] = {
* 2 invalid opcode for 1:6800/6802/6808, 2:6801/6803, 4:HD63701
*/
-static const UINT8 table[0x104][3] = {
+static const UINT8 table[0x102][3] = {
{ill, inh,7},{nop, inh,0},{ill, inh,7},{ill, inh,7},/* 00 */
{lsrd,inh,1},{asld,inh,1},{tap, inh,0},{tpa, inh,0},
{inx, inh,0},{dex, inh,0},{clv, inh,0},{sev, inh,0},
@@ -153,11 +151,7 @@ static const UINT8 table[0x104][3] = {
/* extra instruction $fc for NSC-8105 */
{addx,ext,0},
/* extra instruction $ec for NSC-8105 */
- {adcx,imb,0},
- /* extra instruction $bb for NSC-8105 */
- {bitx,imx,0},
- /* extra instruction $b2 for NSC-8105 */
- {stx,imx,0}
+ {adcx,imb,0}
};
/* some macros to keep things short */
@@ -194,8 +188,6 @@ static unsigned Dasm680x (int subtype, char *buf, unsigned pc, const UINT8 *opro
/* and check for extra instruction */
if (code == 0xfc) code = 0x0100;
if (code == 0xec) code = 0x0101;
- if (code == 0x7b) code = 0x0102;
- if (code == 0x71) code = 0x0103;
}
opcode = table[code][0];
diff --git a/src/devices/cpu/m6800/6800ops.inc b/src/devices/cpu/m6800/6800ops.inc
index 078529d16ab..cf0360c7538 100644
--- a/src/devices/cpu/m6800/6800ops.inc
+++ b/src/devices/cpu/m6800/6800ops.inc
@@ -2073,12 +2073,11 @@ OP_HANDLER( ldd_ix )
}
/* $ec ADCX immediate -**** NSC8105 only. Flags are a guess - copied from addb_im() */
-// actually this is ADDX, causes garbage in nightgal.cpp otherwise
OP_HANDLER( adcx_im )
{
UINT16 t,r;
IMMBYTE(t);
- r = X+t;
+ r = X+t+(CC&0x01);
CLR_HNZVC;
SET_FLAGS8(X,t,r);
SET_H(X,t,r);
@@ -2283,26 +2282,3 @@ OP_HANDLER( stx_ex )
EXTENDED;
WM16(EAD,&m_x);
}
-
-/* NSC8105 specific, guessed opcodes (tested by Night Gal Summer) */
-// $bb - $mask & [X + $disp8]
-OP_HANDLER( btst_ix )
-{
- UINT8 val;
- UINT8 mask = M_RDOP_ARG(PCD);
- {EA=X+(M_RDOP_ARG(PCD+1));PC+=2;}
- val = RM(EAD) & mask;
- CLR_NZVC; SET_NZ8(val);
-}
-
-// $b2 - assuming correct, store first byte to (X + $disp8)
-OP_HANDLER( stx_nsc )
-{
- IMM8;
- UINT8 val = RM(EAD);
- IMM8;
- EA = X + RM(EAD);
- CLR_NZV;
- SET_NZ8(val);
- WM(EAD,val);
-} \ No newline at end of file
diff --git a/src/devices/cpu/m6800/6800tbl.inc b/src/devices/cpu/m6800/6800tbl.inc
index 10515e54bdc..38376dadd59 100644
--- a/src/devices/cpu/m6800/6800tbl.inc
+++ b/src/devices/cpu/m6800/6800tbl.inc
@@ -105,54 +105,30 @@ const m6800_cpu_device::op_func m6800_cpu_device::hd63701_insn[0x100] = {
};
const m6800_cpu_device::op_func m6800_cpu_device::nsc8105_insn[0x100] = {
-// 0
&m6800_cpu_device::illegal,&m6800_cpu_device::illegal,&m6800_cpu_device::nop, &m6800_cpu_device::illegal,&m6800_cpu_device::illegal,&m6800_cpu_device::tap, &m6800_cpu_device::illegal,&m6800_cpu_device::tpa,
-// 8
&m6800_cpu_device::inx, &m6800_cpu_device::clv, &m6800_cpu_device::dex, &m6800_cpu_device::sev, &m6800_cpu_device::clc, &m6800_cpu_device::cli, &m6800_cpu_device::sec, &m6800_cpu_device::sei,
-// 10
&m6800_cpu_device::sba, &m6800_cpu_device::illegal,&m6800_cpu_device::cba, &m6800_cpu_device::illegal,&m6800_cpu_device::illegal,&m6800_cpu_device::tab, &m6800_cpu_device::illegal,&m6800_cpu_device::tba,
-// 18
&m6800_cpu_device::illegal,&m6800_cpu_device::illegal,&m6800_cpu_device::daa, &m6800_cpu_device::aba, &m6800_cpu_device::illegal,&m6800_cpu_device::illegal,&m6800_cpu_device::illegal,&m6800_cpu_device::illegal,
-// 20
&m6800_cpu_device::bra, &m6800_cpu_device::bhi, &m6800_cpu_device::brn, &m6800_cpu_device::bls, &m6800_cpu_device::bcc, &m6800_cpu_device::bne, &m6800_cpu_device::bcs, &m6800_cpu_device::beq,
-// 28
&m6800_cpu_device::bvc, &m6800_cpu_device::bpl, &m6800_cpu_device::bvs, &m6800_cpu_device::bmi, &m6800_cpu_device::bge, &m6800_cpu_device::bgt, &m6800_cpu_device::blt, &m6800_cpu_device::ble,
-// 30
&m6800_cpu_device::tsx, &m6800_cpu_device::pula, &m6800_cpu_device::ins, &m6800_cpu_device::pulb, &m6800_cpu_device::des, &m6800_cpu_device::psha, &m6800_cpu_device::txs, &m6800_cpu_device::pshb,
-// 38
&m6800_cpu_device::illegal,&m6800_cpu_device::illegal,&m6800_cpu_device::rts, &m6800_cpu_device::rti, &m6800_cpu_device::illegal,&m6800_cpu_device::wai, &m6800_cpu_device::illegal,&m6800_cpu_device::swi,
-// 40
&m6800_cpu_device::suba_im,&m6800_cpu_device::sbca_im,&m6800_cpu_device::cmpa_im,&m6800_cpu_device::illegal,&m6800_cpu_device::anda_im,&m6800_cpu_device::lda_im, &m6800_cpu_device::bita_im,&m6800_cpu_device::sta_im,
-// 48
&m6800_cpu_device::eora_im,&m6800_cpu_device::ora_im, &m6800_cpu_device::adca_im,&m6800_cpu_device::adda_im,&m6800_cpu_device::cmpx_im,&m6800_cpu_device::lds_im, &m6800_cpu_device::bsr, &m6800_cpu_device::sts_im,
-// 50
&m6800_cpu_device::suba_di,&m6800_cpu_device::sbca_di,&m6800_cpu_device::cmpa_di,&m6800_cpu_device::illegal,&m6800_cpu_device::anda_di,&m6800_cpu_device::lda_di, &m6800_cpu_device::bita_di,&m6800_cpu_device::sta_di,
-// 58
&m6800_cpu_device::eora_di,&m6800_cpu_device::ora_di, &m6800_cpu_device::adca_di,&m6800_cpu_device::adda_di,&m6800_cpu_device::cmpx_di,&m6800_cpu_device::lds_di, &m6800_cpu_device::jsr_di, &m6800_cpu_device::sts_di,
-// 60
&m6800_cpu_device::suba_ix,&m6800_cpu_device::sbca_ix,&m6800_cpu_device::cmpa_ix,&m6800_cpu_device::illegal,&m6800_cpu_device::anda_ix,&m6800_cpu_device::lda_ix, &m6800_cpu_device::bita_ix,&m6800_cpu_device::sta_ix,
-// 68
&m6800_cpu_device::eora_ix,&m6800_cpu_device::ora_ix, &m6800_cpu_device::adca_ix,&m6800_cpu_device::adda_ix,&m6800_cpu_device::cmpx_ix,&m6800_cpu_device::lds_ix, &m6800_cpu_device::jsr_ix, &m6800_cpu_device::sts_ix,
-// 70
&m6800_cpu_device::suba_ex,&m6800_cpu_device::sbca_ex,&m6800_cpu_device::cmpa_ex,&m6800_cpu_device::illegal,&m6800_cpu_device::anda_ex,&m6800_cpu_device::lda_ex, &m6800_cpu_device::bita_ex,&m6800_cpu_device::sta_ex,
-// 78
&m6800_cpu_device::eora_ex,&m6800_cpu_device::ora_ex, &m6800_cpu_device::adca_ex,&m6800_cpu_device::adda_ex,&m6800_cpu_device::cmpx_ex,&m6800_cpu_device::lds_ex, &m6800_cpu_device::jsr_ex, &m6800_cpu_device::sts_ex,
-// 80
&m6800_cpu_device::nega, &m6800_cpu_device::illegal,&m6800_cpu_device::illegal,&m6800_cpu_device::coma, &m6800_cpu_device::lsra, &m6800_cpu_device::rora, &m6800_cpu_device::illegal,&m6800_cpu_device::asra,
-// 88
&m6800_cpu_device::asla, &m6800_cpu_device::deca, &m6800_cpu_device::rola, &m6800_cpu_device::illegal,&m6800_cpu_device::inca, &m6800_cpu_device::illegal,&m6800_cpu_device::tsta, &m6800_cpu_device::clra,
-// 90
&m6800_cpu_device::negb, &m6800_cpu_device::illegal,&m6800_cpu_device::illegal,&m6800_cpu_device::comb, &m6800_cpu_device::lsrb, &m6800_cpu_device::rorb, &m6800_cpu_device::illegal,&m6800_cpu_device::asrb,
-// 98
&m6800_cpu_device::aslb, &m6800_cpu_device::decb, &m6800_cpu_device::rolb, &m6800_cpu_device::illegal,&m6800_cpu_device::incb, &m6800_cpu_device::illegal,&m6800_cpu_device::tstb, &m6800_cpu_device::clrb,
-// a0
&m6800_cpu_device::neg_ix, &m6800_cpu_device::illegal,&m6800_cpu_device::illegal,&m6800_cpu_device::com_ix, &m6800_cpu_device::lsr_ix, &m6800_cpu_device::ror_ix, &m6800_cpu_device::illegal,&m6800_cpu_device::asr_ix,
-// a8
&m6800_cpu_device::asl_ix, &m6800_cpu_device::dec_ix, &m6800_cpu_device::rol_ix, &m6800_cpu_device::illegal,&m6800_cpu_device::inc_ix, &m6800_cpu_device::jmp_ix, &m6800_cpu_device::tst_ix, &m6800_cpu_device::clr_ix,
-// b0
-&m6800_cpu_device::neg_ex, &m6800_cpu_device::illegal,&m6800_cpu_device::stx_nsc,&m6800_cpu_device::com_ex, &m6800_cpu_device::lsr_ex, &m6800_cpu_device::ror_ex, &m6800_cpu_device::illegal,&m6800_cpu_device::asr_ex,
-// b8
-&m6800_cpu_device::asl_ex, &m6800_cpu_device::dec_ex, &m6800_cpu_device::rol_ex, &m6800_cpu_device::btst_ix,&m6800_cpu_device::inc_ex, &m6800_cpu_device::jmp_ex, &m6800_cpu_device::tst_ex, &m6800_cpu_device::clr_ex,
+&m6800_cpu_device::neg_ex, &m6800_cpu_device::illegal,&m6800_cpu_device::illegal,&m6800_cpu_device::com_ex, &m6800_cpu_device::lsr_ex, &m6800_cpu_device::ror_ex, &m6800_cpu_device::illegal,&m6800_cpu_device::asr_ex,
+&m6800_cpu_device::asl_ex, &m6800_cpu_device::dec_ex, &m6800_cpu_device::rol_ex, &m6800_cpu_device::illegal,&m6800_cpu_device::inc_ex, &m6800_cpu_device::jmp_ex, &m6800_cpu_device::tst_ex, &m6800_cpu_device::clr_ex,
&m6800_cpu_device::subb_im,&m6800_cpu_device::sbcb_im,&m6800_cpu_device::cmpb_im,&m6800_cpu_device::illegal,&m6800_cpu_device::andb_im,&m6800_cpu_device::ldb_im, &m6800_cpu_device::bitb_im,&m6800_cpu_device::stb_im,
&m6800_cpu_device::eorb_im,&m6800_cpu_device::orb_im, &m6800_cpu_device::adcb_im,&m6800_cpu_device::addb_im,&m6800_cpu_device::illegal,&m6800_cpu_device::ldx_im, &m6800_cpu_device::illegal,&m6800_cpu_device::stx_im,
&m6800_cpu_device::subb_di,&m6800_cpu_device::sbcb_di,&m6800_cpu_device::cmpb_di,&m6800_cpu_device::illegal,&m6800_cpu_device::andb_di,&m6800_cpu_device::ldb_di, &m6800_cpu_device::bitb_di,&m6800_cpu_device::stb_di,
diff --git a/src/devices/cpu/m6800/m6800.cpp b/src/devices/cpu/m6800/m6800.cpp
index 730d7a1be4b..84d3b8d03e2 100644
--- a/src/devices/cpu/m6800/m6800.cpp
+++ b/src/devices/cpu/m6800/m6800.cpp
@@ -488,7 +488,7 @@ const UINT8 m6800_cpu_device::cycles_63701[256] =
const UINT8 m6800_cpu_device::cycles_nsc8105[256] =
{
/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
- /*0*/ 5,XX, 2,XX,XX, 2,XX, 2, 4, 2, 4, 2, 2, 2, 2, 2,
+ /*0*/ XX,XX, 2,XX,XX, 2,XX, 2, 4, 2, 4, 2, 2, 2, 2, 2,
/*1*/ 2,XX, 2,XX,XX, 2,XX, 2,XX,XX, 2, 2,XX,XX,XX,XX,
/*2*/ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
/*3*/ 4, 4, 4, 4, 4, 4, 4, 4,XX,XX, 5,10,XX, 9,XX,12,
@@ -499,7 +499,7 @@ const UINT8 m6800_cpu_device::cycles_nsc8105[256] =
/*8*/ 2,XX,XX, 2, 2, 2,XX, 2, 2, 2, 2,XX, 2,XX, 2, 2,
/*9*/ 2,XX,XX, 2, 2, 2,XX, 2, 2, 2, 2,XX, 2,XX, 2, 2,
/*A*/ 7,XX,XX, 7, 7, 7,XX, 7, 7, 7, 7,XX, 7, 4, 7, 7,
- /*B*/ 6,XX,XX, 6, 6, 6,XX, 6, 6, 6, 6, 5, 6, 3, 6, 6,
+ /*B*/ 6,XX,XX, 6, 6, 6,XX, 6, 6, 6, 6,XX, 6, 3, 6, 6,
/*C*/ 2, 2, 2,XX, 2, 2, 2, 3, 2, 2, 2, 2,XX, 3,XX, 4,
/*D*/ 3, 3, 3,XX, 3, 3, 3, 4, 3, 3, 3, 3,XX, 4,XX, 5,
/*E*/ 5, 5, 5,XX, 5, 5, 5, 6, 5, 5, 5, 5, 5, 6,XX, 7,
diff --git a/src/devices/cpu/m6800/m6800.h b/src/devices/cpu/m6800/m6800.h
index 82696a6ee43..bb6055e8ad0 100644
--- a/src/devices/cpu/m6800/m6800.h
+++ b/src/devices/cpu/m6800/m6800.h
@@ -426,8 +426,6 @@ protected:
void cpx_im();
void cpx_ix();
void trap();
- void btst_ix();
- void stx_nsc();
};
diff --git a/src/devices/cpu/m68000/m68kcpu.cpp b/src/devices/cpu/m68000/m68kcpu.cpp
index aaa1db079cf..dc7e0b14a6f 100644
--- a/src/devices/cpu/m68000/m68kcpu.cpp
+++ b/src/devices/cpu/m68000/m68kcpu.cpp
@@ -1383,7 +1383,7 @@ UINT16 m68000_base_device::readword_d32_mmu(offs_t address)
UINT32 address0 = pmmu_translate_addr(this, address);
if (mmu_tmp_buserror_occurred) {
return ~0;
- } else if (WORD_ALIGNED(address)) {
+ } else if (!(address & 1)) {
return m_space->read_word(address0);
} else {
UINT32 address1 = pmmu_translate_addr(this, address + 1);
@@ -1396,7 +1396,7 @@ UINT16 m68000_base_device::readword_d32_mmu(offs_t address)
}
}
- if (WORD_ALIGNED(address))
+ if (!(address & 1))
return m_space->read_word(address);
result = m_space->read_byte(address) << 8;
return result | m_space->read_byte(address + 1);
@@ -1410,7 +1410,7 @@ void m68000_base_device::writeword_d32_mmu(offs_t address, UINT16 data)
UINT32 address0 = pmmu_translate_addr(this, address);
if (mmu_tmp_buserror_occurred) {
return;
- } else if (WORD_ALIGNED(address)) {
+ } else if (!(address & 1)) {
m_space->write_word(address0, data);
return;
} else {
@@ -1425,7 +1425,7 @@ void m68000_base_device::writeword_d32_mmu(offs_t address, UINT16 data)
}
}
- if (WORD_ALIGNED(address))
+ if (!(address & 1))
{
m_space->write_word(address, data);
return;
@@ -1447,13 +1447,13 @@ UINT32 m68000_base_device::readlong_d32_mmu(offs_t address)
} else if ((address +3) & 0xfc) {
// not at page boundary; use default code
address = address0;
- } else if (DWORD_ALIGNED(address)) { // 0
+ } else if (!(address & 3)) { // 0
return m_space->read_dword(address0);
} else {
UINT32 address2 = pmmu_translate_addr(this, address+2);
if (mmu_tmp_buserror_occurred) {
return ~0;
- } else if (WORD_ALIGNED(address)) { // 2
+ } else if (!(address & 1)) { // 2
result = m_space->read_word(address0) << 16;
return result | m_space->read_word(address2);
} else {
@@ -1470,9 +1470,9 @@ UINT32 m68000_base_device::readlong_d32_mmu(offs_t address)
}
}
- if (DWORD_ALIGNED(address))
+ if (!(address & 3))
return m_space->read_dword(address);
- else if (WORD_ALIGNED(address))
+ else if (!(address & 1))
{
result = m_space->read_word(address) << 16;
return result | m_space->read_word(address + 2);
@@ -1493,14 +1493,14 @@ void m68000_base_device::writelong_d32_mmu(offs_t address, UINT32 data)
} else if ((address +3) & 0xfc) {
// not at page boundary; use default code
address = address0;
- } else if (DWORD_ALIGNED(address)) { // 0
+ } else if (!(address & 3)) { // 0
m_space->write_dword(address0, data);
return;
} else {
UINT32 address2 = pmmu_translate_addr(this, address+2);
if (mmu_tmp_buserror_occurred) {
return;
- } else if (WORD_ALIGNED(address)) { // 2
+ } else if (!(address & 1)) { // 2
m_space->write_word(address0, data >> 16);
m_space->write_word(address2, data);
return;
@@ -1519,12 +1519,12 @@ void m68000_base_device::writelong_d32_mmu(offs_t address, UINT32 data)
}
}
- if (DWORD_ALIGNED(address))
+ if (!(address & 3))
{
m_space->write_dword(address, data);
return;
}
- else if (WORD_ALIGNED(address))
+ else if (!(address & 1))
{
m_space->write_word(address, data >> 16);
m_space->write_word(address + 2, data);
@@ -1594,7 +1594,7 @@ UINT16 m68000_base_device::readword_d32_hmmu(offs_t address)
address = hmmu_translate_addr(this, address);
}
- if (WORD_ALIGNED(address))
+ if (!(address & 1))
return m_space->read_word(address);
result = m_space->read_byte(address) << 8;
return result | m_space->read_byte(address + 1);
@@ -1608,7 +1608,7 @@ void m68000_base_device::writeword_d32_hmmu(offs_t address, UINT16 data)
address = hmmu_translate_addr(this, address);
}
- if (WORD_ALIGNED(address))
+ if (!(address & 1))
{
m_space->write_word(address, data);
return;
@@ -1627,9 +1627,9 @@ UINT32 m68000_base_device::readlong_d32_hmmu(offs_t address)
address = hmmu_translate_addr(this, address);
}
- if (DWORD_ALIGNED(address))
+ if (!(address & 3))
return m_space->read_dword(address);
- else if (WORD_ALIGNED(address))
+ else if (!(address & 1))
{
result = m_space->read_word(address) << 16;
return result | m_space->read_word(address + 2);
@@ -1647,12 +1647,12 @@ void m68000_base_device::writelong_d32_hmmu(offs_t address, UINT32 data)
address = hmmu_translate_addr(this, address);
}
- if (DWORD_ALIGNED(address))
+ if (!(address & 3))
{
m_space->write_dword(address, data);
return;
}
- else if (WORD_ALIGNED(address))
+ else if (!(address & 1))
{
m_space->write_word(address, data >> 16);
m_space->write_word(address + 2, data);
diff --git a/src/devices/cpu/m68000/m68kcpu.h b/src/devices/cpu/m68000/m68kcpu.h
index 7860298988f..5cec889e002 100644
--- a/src/devices/cpu/m68000/m68kcpu.h
+++ b/src/devices/cpu/m68000/m68kcpu.h
@@ -626,7 +626,7 @@ static inline unsigned int m68k_read_pcrelative_8(m68000_base_device *m68k, unsi
static inline unsigned int m68k_read_pcrelative_16(m68000_base_device *m68k, unsigned int address)
{
- if (!WORD_ALIGNED(address))
+ if(address & 1)
return
(m68k->readimm16(address-1) << 8) |
(m68k->readimm16(address+1) >> 8);
@@ -638,7 +638,7 @@ static inline unsigned int m68k_read_pcrelative_16(m68000_base_device *m68k, uns
static inline unsigned int m68k_read_pcrelative_32(m68000_base_device *m68k, unsigned int address)
{
- if (!WORD_ALIGNED(address))
+ if(address & 1)
return
(m68k->readimm16(address-1) << 24) |
(m68k->readimm16(address+1) << 8) |
diff --git a/src/devices/cpu/m68000/m68kmake.cpp b/src/devices/cpu/m68000/m68kmake.cpp
index 941ae23f0aa..f36797d76ba 100644
--- a/src/devices/cpu/m68000/m68kmake.cpp
+++ b/src/devices/cpu/m68000/m68kmake.cpp
@@ -670,7 +670,7 @@ static opcode_struct* find_opcode(char* name, int size, char* spec_proc, char* s
opcode_struct* op;
- for(op = g_opcode_input_table;op->name[0] != 0;op++)
+ for(op = g_opcode_input_table;op->name != nullptr;op++)
{
if( strcmp(name, op->name) == 0 &&
(size == op->size) &&
diff --git a/src/devices/cpu/m68000/m68kops.cpp b/src/devices/cpu/m68000/m68kops.cpp
new file mode 100644
index 00000000000..0505f863c73
--- /dev/null
+++ b/src/devices/cpu/m68000/m68kops.cpp
@@ -0,0 +1,34874 @@
+#include "emu.h"
+#include "m68kcpu.h"
+extern void m68040_fpu_op0(m68000_base_device *m68k);
+extern void m68040_fpu_op1(m68000_base_device *m68k);
+extern void m68881_mmu_ops(m68000_base_device *m68k);
+extern void m68881_ftrap(m68000_base_device *m68k);
+
+/* ======================================================================== */
+/* ========================= INSTRUCTION HANDLERS ========================= */
+/* ======================================================================== */
+
+
+void m68000_base_device_ops::m68k_op_1010(m68000_base_device* mc68kcpu)
+{
+ m68ki_exception_1010(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_1111(m68000_base_device* mc68kcpu)
+{
+ m68ki_exception_1111(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_040fpu0_32(m68000_base_device* mc68kcpu)
+{
+ if((mc68kcpu)->has_fpu)
+ {
+ m68040_fpu_op0(mc68kcpu);
+ return;
+ }
+ m68ki_exception_1111(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_040fpu1_32(m68000_base_device* mc68kcpu)
+{
+ if((mc68kcpu)->has_fpu)
+ {
+ m68040_fpu_op1(mc68kcpu);
+ return;
+ }
+ m68ki_exception_1111(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_abcd_8_rr(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = DY(mc68kcpu);
+ UINT32 dst = *r_dst;
+ UINT32 res = LOW_NIBBLE(src) + LOW_NIBBLE(dst) + XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
+
+ if(res > 9)
+ res += 6;
+ res += HIGH_NIBBLE(src) + HIGH_NIBBLE(dst);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = (res > 0x99) << 8;
+ if((mc68kcpu)->c_flag)
+ res -= 0xa0;
+
+ (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
+ (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
+
+ res = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
+}
+
+
+void m68000_base_device_ops::m68k_op_abcd_8_mm_ax7(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AY_PD_8(mc68kcpu);
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = LOW_NIBBLE(src) + LOW_NIBBLE(dst) + XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
+
+ if(res > 9)
+ res += 6;
+ res += HIGH_NIBBLE(src) + HIGH_NIBBLE(dst);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = (res > 0x99) << 8;
+ if((mc68kcpu)->c_flag)
+ res -= 0xa0;
+
+ (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
+ (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
+
+ res = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_8((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_abcd_8_mm_ay7(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_A7_PD_8(mc68kcpu);
+ UINT32 ea = EA_AX_PD_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = LOW_NIBBLE(src) + LOW_NIBBLE(dst) + XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
+
+ if(res > 9)
+ res += 6;
+ res += HIGH_NIBBLE(src) + HIGH_NIBBLE(dst);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = (res > 0x99) << 8;
+ if((mc68kcpu)->c_flag)
+ res -= 0xa0;
+
+ (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
+ (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
+
+ res = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_8((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_abcd_8_mm_axy7(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_A7_PD_8(mc68kcpu);
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = LOW_NIBBLE(src) + LOW_NIBBLE(dst) + XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
+
+ if(res > 9)
+ res += 6;
+ res += HIGH_NIBBLE(src) + HIGH_NIBBLE(dst);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = (res > 0x99) << 8;
+ if((mc68kcpu)->c_flag)
+ res -= 0xa0;
+
+ (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
+ (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
+
+ res = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_8((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_abcd_8_mm(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AY_PD_8(mc68kcpu);
+ UINT32 ea = EA_AX_PD_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = LOW_NIBBLE(src) + LOW_NIBBLE(dst) + XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
+
+ if(res > 9)
+ res += 6;
+ res += HIGH_NIBBLE(src) + HIGH_NIBBLE(dst);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = (res > 0x99) << 8;
+ if((mc68kcpu)->c_flag)
+ res -= 0xa0;
+
+ (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
+ (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
+
+ res = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_8((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_add_8_er_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_8(DY(mc68kcpu));
+ UINT32 dst = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_add_8_er_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AY_AI_8(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_add_8_er_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AY_PI_8(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_add_8_er_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_A7_PI_8(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_add_8_er_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AY_PD_8(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_add_8_er_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_A7_PD_8(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_add_8_er_di(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AY_DI_8(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_add_8_er_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AY_IX_8(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_add_8_er_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AW_8(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_add_8_er_al(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AL_8(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_add_8_er_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_PCDI_8(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_add_8_er_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_PCIX_8(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_add_8_er_i(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_add_16_er_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_16(DY(mc68kcpu));
+ UINT32 dst = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_add_16_er_a(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_16(AY(mc68kcpu));
+ UINT32 dst = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_add_16_er_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AY_AI_16(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_add_16_er_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AY_PI_16(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_add_16_er_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AY_PD_16(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_add_16_er_di(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AY_DI_16(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_add_16_er_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AY_IX_16(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_add_16_er_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AW_16(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_add_16_er_al(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AL_16(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_add_16_er_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_PCDI_16(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_add_16_er_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_PCIX_16(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_add_16_er_i(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_add_32_er_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = DY(mc68kcpu);
+ UINT32 dst = *r_dst;
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ *r_dst = (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_add_32_er_a(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = AY(mc68kcpu);
+ UINT32 dst = *r_dst;
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ *r_dst = (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_add_32_er_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AY_AI_32(mc68kcpu);
+ UINT32 dst = *r_dst;
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ *r_dst = (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_add_32_er_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AY_PI_32(mc68kcpu);
+ UINT32 dst = *r_dst;
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ *r_dst = (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_add_32_er_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AY_PD_32(mc68kcpu);
+ UINT32 dst = *r_dst;
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ *r_dst = (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_add_32_er_di(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AY_DI_32(mc68kcpu);
+ UINT32 dst = *r_dst;
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ *r_dst = (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_add_32_er_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AY_IX_32(mc68kcpu);
+ UINT32 dst = *r_dst;
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ *r_dst = (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_add_32_er_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AW_32(mc68kcpu);
+ UINT32 dst = *r_dst;
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ *r_dst = (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_add_32_er_al(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AL_32(mc68kcpu);
+ UINT32 dst = *r_dst;
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ *r_dst = (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_add_32_er_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_PCDI_32(mc68kcpu);
+ UINT32 dst = *r_dst;
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ *r_dst = (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_add_32_er_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_PCIX_32(mc68kcpu);
+ UINT32 dst = *r_dst;
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ *r_dst = (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_add_32_er_i(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 dst = *r_dst;
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ *r_dst = (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_add_8_re_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_8(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_8(DX(mc68kcpu));
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_add_8_re_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_8(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_8(DX(mc68kcpu));
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_add_8_re_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_A7_PI_8(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_8(DX(mc68kcpu));
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_add_8_re_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_8(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_8(DX(mc68kcpu));
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_add_8_re_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_8(DX(mc68kcpu));
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_add_8_re_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_8(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_8(DX(mc68kcpu));
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_add_8_re_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_8(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_8(DX(mc68kcpu));
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_add_8_re_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_8(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_8(DX(mc68kcpu));
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_add_8_re_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_8(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_8(DX(mc68kcpu));
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_add_16_re_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_16(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_16(DX(mc68kcpu));
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_add_16_re_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_16(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_16(DX(mc68kcpu));
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_add_16_re_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_16(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_16(DX(mc68kcpu));
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_add_16_re_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_16(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_16(DX(mc68kcpu));
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_add_16_re_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_16(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_16(DX(mc68kcpu));
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_add_16_re_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_16(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_16(DX(mc68kcpu));
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_add_16_re_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_16(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_16(DX(mc68kcpu));
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_add_32_re_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_32(mc68kcpu);
+ UINT32 src = DX(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_add_32_re_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_32(mc68kcpu);
+ UINT32 src = DX(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_add_32_re_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_32(mc68kcpu);
+ UINT32 src = DX(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_add_32_re_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_32(mc68kcpu);
+ UINT32 src = DX(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_add_32_re_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_32(mc68kcpu);
+ UINT32 src = DX(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_add_32_re_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_32(mc68kcpu);
+ UINT32 src = DX(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_add_32_re_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_32(mc68kcpu);
+ UINT32 src = DX(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_adda_16_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst + MAKE_INT_16(DY(mc68kcpu)));
+}
+
+
+void m68000_base_device_ops::m68k_op_adda_16_a(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst + MAKE_INT_16(AY(mc68kcpu)));
+}
+
+
+void m68000_base_device_ops::m68k_op_adda_16_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = MAKE_INT_16(OPER_AY_AI_16(mc68kcpu));
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
+}
+
+
+void m68000_base_device_ops::m68k_op_adda_16_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = MAKE_INT_16(OPER_AY_PI_16(mc68kcpu));
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
+}
+
+
+void m68000_base_device_ops::m68k_op_adda_16_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = MAKE_INT_16(OPER_AY_PD_16(mc68kcpu));
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
+}
+
+
+void m68000_base_device_ops::m68k_op_adda_16_di(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = MAKE_INT_16(OPER_AY_DI_16(mc68kcpu));
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
+}
+
+
+void m68000_base_device_ops::m68k_op_adda_16_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = MAKE_INT_16(OPER_AY_IX_16(mc68kcpu));
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
+}
+
+
+void m68000_base_device_ops::m68k_op_adda_16_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = MAKE_INT_16(OPER_AW_16(mc68kcpu));
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
+}
+
+
+void m68000_base_device_ops::m68k_op_adda_16_al(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = MAKE_INT_16(OPER_AL_16(mc68kcpu));
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
+}
+
+
+void m68000_base_device_ops::m68k_op_adda_16_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = MAKE_INT_16(OPER_PCDI_16(mc68kcpu));
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
+}
+
+
+void m68000_base_device_ops::m68k_op_adda_16_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = MAKE_INT_16(OPER_PCIX_16(mc68kcpu));
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
+}
+
+
+void m68000_base_device_ops::m68k_op_adda_16_i(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = MAKE_INT_16(OPER_I_16(mc68kcpu));
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
+}
+
+
+void m68000_base_device_ops::m68k_op_adda_32_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst + DY(mc68kcpu));
+}
+
+
+void m68000_base_device_ops::m68k_op_adda_32_a(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst + AY(mc68kcpu));
+}
+
+
+void m68000_base_device_ops::m68k_op_adda_32_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = OPER_AY_AI_32(mc68kcpu);
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
+}
+
+
+void m68000_base_device_ops::m68k_op_adda_32_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = OPER_AY_PI_32(mc68kcpu);
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
+}
+
+
+void m68000_base_device_ops::m68k_op_adda_32_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = OPER_AY_PD_32(mc68kcpu);
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
+}
+
+
+void m68000_base_device_ops::m68k_op_adda_32_di(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = OPER_AY_DI_32(mc68kcpu);
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
+}
+
+
+void m68000_base_device_ops::m68k_op_adda_32_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = OPER_AY_IX_32(mc68kcpu);
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
+}
+
+
+void m68000_base_device_ops::m68k_op_adda_32_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = OPER_AW_32(mc68kcpu);
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
+}
+
+
+void m68000_base_device_ops::m68k_op_adda_32_al(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = OPER_AL_32(mc68kcpu);
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
+}
+
+
+void m68000_base_device_ops::m68k_op_adda_32_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = OPER_PCDI_32(mc68kcpu);
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
+}
+
+
+void m68000_base_device_ops::m68k_op_adda_32_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = OPER_PCIX_32(mc68kcpu);
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
+}
+
+
+void m68000_base_device_ops::m68k_op_adda_32_i(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = OPER_I_32(mc68kcpu);
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
+}
+
+
+void m68000_base_device_ops::m68k_op_addi_8_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_addi_8_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AY_AI_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addi_8_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AY_PI_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addi_8_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_A7_PI_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addi_8_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AY_PD_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addi_8_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addi_8_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AY_DI_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addi_8_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AY_IX_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addi_8_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AW_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addi_8_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AL_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addi_16_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_addi_16_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_AI_16(mc68kcpu);
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addi_16_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_PI_16(mc68kcpu);
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addi_16_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_PD_16(mc68kcpu);
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addi_16_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_DI_16(mc68kcpu);
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addi_16_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_IX_16(mc68kcpu);
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addi_16_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AW_16(mc68kcpu);
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addi_16_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AL_16(mc68kcpu);
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addi_32_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 dst = *r_dst;
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ *r_dst = (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_addi_32_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AY_AI_32(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addi_32_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AY_PI_32(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addi_32_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AY_PD_32(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addi_32_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AY_DI_32(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addi_32_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AY_IX_32(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addi_32_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AW_32(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addi_32_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AL_32(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addq_8_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 dst = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_addq_8_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AY_AI_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addq_8_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AY_PI_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addq_8_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_A7_PI_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addq_8_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AY_PD_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addq_8_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addq_8_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AY_DI_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addq_8_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AY_IX_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addq_8_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AW_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addq_8_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AL_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addq_16_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 dst = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_addq_16_a(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AY(mc68kcpu);
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst + ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1);
+}
+
+
+void m68000_base_device_ops::m68k_op_addq_16_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AY_AI_16(mc68kcpu);
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addq_16_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AY_PI_16(mc68kcpu);
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addq_16_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AY_PD_16(mc68kcpu);
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addq_16_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AY_DI_16(mc68kcpu);
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addq_16_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AY_IX_16(mc68kcpu);
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addq_16_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AW_16(mc68kcpu);
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addq_16_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AL_16(mc68kcpu);
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addq_32_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 dst = *r_dst;
+ UINT32 res = src + dst;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ *r_dst = (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_addq_32_a(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AY(mc68kcpu);
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst + ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1);
+}
+
+
+void m68000_base_device_ops::m68k_op_addq_32_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AY_AI_32(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addq_32_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AY_PI_32(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addq_32_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AY_PD_32(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addq_32_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AY_DI_32(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addq_32_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AY_IX_32(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addq_32_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AW_32(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addq_32_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AL_32(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = src + dst;
+
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_addx_8_rr(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_8(DY(mc68kcpu));
+ UINT32 dst = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = src + dst + XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+
+ res = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
+}
+
+
+void m68000_base_device_ops::m68k_op_addx_16_rr(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_16(DY(mc68kcpu));
+ UINT32 dst = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = src + dst + XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+
+ res = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+}
+
+
+void m68000_base_device_ops::m68k_op_addx_32_rr(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = DY(mc68kcpu);
+ UINT32 dst = *r_dst;
+ UINT32 res = src + dst + XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
+
+ res = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ *r_dst = res;
+}
+
+
+void m68000_base_device_ops::m68k_op_addx_8_mm_ax7(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AY_PD_8(mc68kcpu);
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = src + dst + XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+
+ res = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_8((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_addx_8_mm_ay7(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_A7_PD_8(mc68kcpu);
+ UINT32 ea = EA_AX_PD_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = src + dst + XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+
+ res = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_8((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_addx_8_mm_axy7(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_A7_PD_8(mc68kcpu);
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = src + dst + XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+
+ res = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_8((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_addx_8_mm(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AY_PD_8(mc68kcpu);
+ UINT32 ea = EA_AX_PD_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = src + dst + XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+
+ res = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_8((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_addx_16_mm(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AY_PD_16(mc68kcpu);
+ UINT32 ea = EA_AX_PD_16(mc68kcpu);
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = src + dst + XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+
+ res = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_16((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_addx_32_mm(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AY_PD_32(mc68kcpu);
+ UINT32 ea = EA_AX_PD_32(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = src + dst + XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
+
+ res = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_32((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_and_8_er_d(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(DX(mc68kcpu) &= (DY(mc68kcpu) | 0xffffff00));
+
+ (mc68kcpu)->n_flag = NFLAG_8((mc68kcpu)->not_z_flag);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_and_8_er_ai(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(DX(mc68kcpu) &= (OPER_AY_AI_8(mc68kcpu) | 0xffffff00));
+
+ (mc68kcpu)->n_flag = NFLAG_8((mc68kcpu)->not_z_flag);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_and_8_er_pi(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(DX(mc68kcpu) &= (OPER_AY_PI_8(mc68kcpu) | 0xffffff00));
+
+ (mc68kcpu)->n_flag = NFLAG_8((mc68kcpu)->not_z_flag);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_and_8_er_pi7(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(DX(mc68kcpu) &= (OPER_A7_PI_8(mc68kcpu) | 0xffffff00));
+
+ (mc68kcpu)->n_flag = NFLAG_8((mc68kcpu)->not_z_flag);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_and_8_er_pd(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(DX(mc68kcpu) &= (OPER_AY_PD_8(mc68kcpu) | 0xffffff00));
+
+ (mc68kcpu)->n_flag = NFLAG_8((mc68kcpu)->not_z_flag);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_and_8_er_pd7(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(DX(mc68kcpu) &= (OPER_A7_PD_8(mc68kcpu) | 0xffffff00));
+
+ (mc68kcpu)->n_flag = NFLAG_8((mc68kcpu)->not_z_flag);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_and_8_er_di(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(DX(mc68kcpu) &= (OPER_AY_DI_8(mc68kcpu) | 0xffffff00));
+
+ (mc68kcpu)->n_flag = NFLAG_8((mc68kcpu)->not_z_flag);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_and_8_er_ix(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(DX(mc68kcpu) &= (OPER_AY_IX_8(mc68kcpu) | 0xffffff00));
+
+ (mc68kcpu)->n_flag = NFLAG_8((mc68kcpu)->not_z_flag);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_and_8_er_aw(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(DX(mc68kcpu) &= (OPER_AW_8(mc68kcpu) | 0xffffff00));
+
+ (mc68kcpu)->n_flag = NFLAG_8((mc68kcpu)->not_z_flag);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_and_8_er_al(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(DX(mc68kcpu) &= (OPER_AL_8(mc68kcpu) | 0xffffff00));
+
+ (mc68kcpu)->n_flag = NFLAG_8((mc68kcpu)->not_z_flag);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_and_8_er_pcdi(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(DX(mc68kcpu) &= (OPER_PCDI_8(mc68kcpu) | 0xffffff00));
+
+ (mc68kcpu)->n_flag = NFLAG_8((mc68kcpu)->not_z_flag);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_and_8_er_pcix(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(DX(mc68kcpu) &= (OPER_PCIX_8(mc68kcpu) | 0xffffff00));
+
+ (mc68kcpu)->n_flag = NFLAG_8((mc68kcpu)->not_z_flag);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_and_8_er_i(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(DX(mc68kcpu) &= (OPER_I_8(mc68kcpu) | 0xffffff00));
+
+ (mc68kcpu)->n_flag = NFLAG_8((mc68kcpu)->not_z_flag);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_and_16_er_d(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(DX(mc68kcpu) &= (DY(mc68kcpu) | 0xffff0000));
+
+ (mc68kcpu)->n_flag = NFLAG_16((mc68kcpu)->not_z_flag);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_and_16_er_ai(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(DX(mc68kcpu) &= (OPER_AY_AI_16(mc68kcpu) | 0xffff0000));
+
+ (mc68kcpu)->n_flag = NFLAG_16((mc68kcpu)->not_z_flag);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_and_16_er_pi(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(DX(mc68kcpu) &= (OPER_AY_PI_16(mc68kcpu) | 0xffff0000));
+
+ (mc68kcpu)->n_flag = NFLAG_16((mc68kcpu)->not_z_flag);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_and_16_er_pd(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(DX(mc68kcpu) &= (OPER_AY_PD_16(mc68kcpu) | 0xffff0000));
+
+ (mc68kcpu)->n_flag = NFLAG_16((mc68kcpu)->not_z_flag);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_and_16_er_di(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(DX(mc68kcpu) &= (OPER_AY_DI_16(mc68kcpu) | 0xffff0000));
+
+ (mc68kcpu)->n_flag = NFLAG_16((mc68kcpu)->not_z_flag);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_and_16_er_ix(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(DX(mc68kcpu) &= (OPER_AY_IX_16(mc68kcpu) | 0xffff0000));
+
+ (mc68kcpu)->n_flag = NFLAG_16((mc68kcpu)->not_z_flag);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_and_16_er_aw(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(DX(mc68kcpu) &= (OPER_AW_16(mc68kcpu) | 0xffff0000));
+
+ (mc68kcpu)->n_flag = NFLAG_16((mc68kcpu)->not_z_flag);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_and_16_er_al(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(DX(mc68kcpu) &= (OPER_AL_16(mc68kcpu) | 0xffff0000));
+
+ (mc68kcpu)->n_flag = NFLAG_16((mc68kcpu)->not_z_flag);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_and_16_er_pcdi(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(DX(mc68kcpu) &= (OPER_PCDI_16(mc68kcpu) | 0xffff0000));
+
+ (mc68kcpu)->n_flag = NFLAG_16((mc68kcpu)->not_z_flag);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_and_16_er_pcix(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(DX(mc68kcpu) &= (OPER_PCIX_16(mc68kcpu) | 0xffff0000));
+
+ (mc68kcpu)->n_flag = NFLAG_16((mc68kcpu)->not_z_flag);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_and_16_er_i(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(DX(mc68kcpu) &= (OPER_I_16(mc68kcpu) | 0xffff0000));
+
+ (mc68kcpu)->n_flag = NFLAG_16((mc68kcpu)->not_z_flag);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_and_32_er_d(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = DX(mc68kcpu) &= DY(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32((mc68kcpu)->not_z_flag);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_and_32_er_ai(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = DX(mc68kcpu) &= OPER_AY_AI_32(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32((mc68kcpu)->not_z_flag);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_and_32_er_pi(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = DX(mc68kcpu) &= OPER_AY_PI_32(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32((mc68kcpu)->not_z_flag);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_and_32_er_pd(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = DX(mc68kcpu) &= OPER_AY_PD_32(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32((mc68kcpu)->not_z_flag);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_and_32_er_di(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = DX(mc68kcpu) &= OPER_AY_DI_32(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32((mc68kcpu)->not_z_flag);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_and_32_er_ix(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = DX(mc68kcpu) &= OPER_AY_IX_32(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32((mc68kcpu)->not_z_flag);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_and_32_er_aw(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = DX(mc68kcpu) &= OPER_AW_32(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32((mc68kcpu)->not_z_flag);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_and_32_er_al(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = DX(mc68kcpu) &= OPER_AL_32(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32((mc68kcpu)->not_z_flag);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_and_32_er_pcdi(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = DX(mc68kcpu) &= OPER_PCDI_32(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32((mc68kcpu)->not_z_flag);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_and_32_er_pcix(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = DX(mc68kcpu) &= OPER_PCIX_32(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32((mc68kcpu)->not_z_flag);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_and_32_er_i(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = DX(mc68kcpu) &= OPER_I_32(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32((mc68kcpu)->not_z_flag);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_and_8_re_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_8(mc68kcpu);
+ UINT32 res = DX(mc68kcpu) & m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_and_8_re_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_8(mc68kcpu);
+ UINT32 res = DX(mc68kcpu) & m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_and_8_re_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_A7_PI_8(mc68kcpu);
+ UINT32 res = DX(mc68kcpu) & m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_and_8_re_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_8(mc68kcpu);
+ UINT32 res = DX(mc68kcpu) & m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_and_8_re_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+ UINT32 res = DX(mc68kcpu) & m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_and_8_re_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_8(mc68kcpu);
+ UINT32 res = DX(mc68kcpu) & m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_and_8_re_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_8(mc68kcpu);
+ UINT32 res = DX(mc68kcpu) & m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_and_8_re_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_8(mc68kcpu);
+ UINT32 res = DX(mc68kcpu) & m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_and_8_re_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_8(mc68kcpu);
+ UINT32 res = DX(mc68kcpu) & m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_and_16_re_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_16(mc68kcpu);
+ UINT32 res = DX(mc68kcpu) & m68ki_read_16((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_and_16_re_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_16(mc68kcpu);
+ UINT32 res = DX(mc68kcpu) & m68ki_read_16((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_and_16_re_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_16(mc68kcpu);
+ UINT32 res = DX(mc68kcpu) & m68ki_read_16((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_and_16_re_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_16(mc68kcpu);
+ UINT32 res = DX(mc68kcpu) & m68ki_read_16((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_and_16_re_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_16(mc68kcpu);
+ UINT32 res = DX(mc68kcpu) & m68ki_read_16((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_and_16_re_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_16(mc68kcpu);
+ UINT32 res = DX(mc68kcpu) & m68ki_read_16((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_and_16_re_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_16(mc68kcpu);
+ UINT32 res = DX(mc68kcpu) & m68ki_read_16((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_and_32_re_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_32(mc68kcpu);
+ UINT32 res = DX(mc68kcpu) & m68ki_read_32((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+
+ m68ki_write_32((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_and_32_re_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_32(mc68kcpu);
+ UINT32 res = DX(mc68kcpu) & m68ki_read_32((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+
+ m68ki_write_32((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_and_32_re_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_32(mc68kcpu);
+ UINT32 res = DX(mc68kcpu) & m68ki_read_32((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+
+ m68ki_write_32((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_and_32_re_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_32(mc68kcpu);
+ UINT32 res = DX(mc68kcpu) & m68ki_read_32((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+
+ m68ki_write_32((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_and_32_re_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_32(mc68kcpu);
+ UINT32 res = DX(mc68kcpu) & m68ki_read_32((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+
+ m68ki_write_32((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_and_32_re_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_32(mc68kcpu);
+ UINT32 res = DX(mc68kcpu) & m68ki_read_32((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+
+ m68ki_write_32((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_and_32_re_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_32(mc68kcpu);
+ UINT32 res = DX(mc68kcpu) & m68ki_read_32((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+
+ m68ki_write_32((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_andi_8_d(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(DY(mc68kcpu) &= (OPER_I_8(mc68kcpu) | 0xffffff00));
+
+ (mc68kcpu)->n_flag = NFLAG_8((mc68kcpu)->not_z_flag);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_andi_8_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AY_AI_8(mc68kcpu);
+ UINT32 res = src & m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+
+ m68ki_write_8((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_andi_8_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AY_PI_8(mc68kcpu);
+ UINT32 res = src & m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+
+ m68ki_write_8((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_andi_8_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_A7_PI_8(mc68kcpu);
+ UINT32 res = src & m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+
+ m68ki_write_8((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_andi_8_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AY_PD_8(mc68kcpu);
+ UINT32 res = src & m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+
+ m68ki_write_8((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_andi_8_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+ UINT32 res = src & m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+
+ m68ki_write_8((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_andi_8_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AY_DI_8(mc68kcpu);
+ UINT32 res = src & m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+
+ m68ki_write_8((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_andi_8_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AY_IX_8(mc68kcpu);
+ UINT32 res = src & m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+
+ m68ki_write_8((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_andi_8_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AW_8(mc68kcpu);
+ UINT32 res = src & m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+
+ m68ki_write_8((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_andi_8_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AL_8(mc68kcpu);
+ UINT32 res = src & m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+
+ m68ki_write_8((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_andi_16_d(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(DY(mc68kcpu) &= (OPER_I_16(mc68kcpu) | 0xffff0000));
+
+ (mc68kcpu)->n_flag = NFLAG_16((mc68kcpu)->not_z_flag);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_andi_16_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_AI_16(mc68kcpu);
+ UINT32 res = src & m68ki_read_16((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+
+ m68ki_write_16((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_andi_16_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_PI_16(mc68kcpu);
+ UINT32 res = src & m68ki_read_16((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+
+ m68ki_write_16((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_andi_16_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_PD_16(mc68kcpu);
+ UINT32 res = src & m68ki_read_16((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+
+ m68ki_write_16((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_andi_16_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_DI_16(mc68kcpu);
+ UINT32 res = src & m68ki_read_16((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+
+ m68ki_write_16((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_andi_16_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_IX_16(mc68kcpu);
+ UINT32 res = src & m68ki_read_16((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+
+ m68ki_write_16((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_andi_16_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AW_16(mc68kcpu);
+ UINT32 res = src & m68ki_read_16((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+
+ m68ki_write_16((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_andi_16_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AL_16(mc68kcpu);
+ UINT32 res = src & m68ki_read_16((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+
+ m68ki_write_16((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_andi_32_d(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = DY(mc68kcpu) &= (OPER_I_32(mc68kcpu));
+
+ (mc68kcpu)->n_flag = NFLAG_32((mc68kcpu)->not_z_flag);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_andi_32_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AY_AI_32(mc68kcpu);
+ UINT32 res = src & m68ki_read_32((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+
+ m68ki_write_32((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_andi_32_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AY_PI_32(mc68kcpu);
+ UINT32 res = src & m68ki_read_32((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+
+ m68ki_write_32((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_andi_32_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AY_PD_32(mc68kcpu);
+ UINT32 res = src & m68ki_read_32((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+
+ m68ki_write_32((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_andi_32_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AY_DI_32(mc68kcpu);
+ UINT32 res = src & m68ki_read_32((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+
+ m68ki_write_32((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_andi_32_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AY_IX_32(mc68kcpu);
+ UINT32 res = src & m68ki_read_32((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+
+ m68ki_write_32((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_andi_32_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AW_32(mc68kcpu);
+ UINT32 res = src & m68ki_read_32((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+
+ m68ki_write_32((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_andi_32_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AL_32(mc68kcpu);
+ UINT32 res = src & m68ki_read_32((mc68kcpu), ea);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+
+ m68ki_write_32((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_andi_16_toc(m68000_base_device* mc68kcpu)
+{
+ m68ki_set_ccr((mc68kcpu), m68ki_get_ccr(mc68kcpu) & OPER_I_16(mc68kcpu));
+}
+
+
+void m68000_base_device_ops::m68k_op_andi_16_tos(m68000_base_device* mc68kcpu)
+{
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 src = OPER_I_16(mc68kcpu);
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_set_sr((mc68kcpu), m68ki_get_sr(mc68kcpu) & src);
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_asr_8_s(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 src = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = src >> shift;
+
+ if(shift != 0)
+ (mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
+
+ if(GET_MSB_8(src))
+ res |= m68ki_shift_8_table[shift];
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src << (9-shift);
+}
+
+
+void m68000_base_device_ops::m68k_op_asr_16_s(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 src = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = src >> shift;
+
+ if(shift != 0)
+ (mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
+
+ if(GET_MSB_16(src))
+ res |= m68ki_shift_16_table[shift];
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src << (9-shift);
+}
+
+
+void m68000_base_device_ops::m68k_op_asr_32_s(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 src = *r_dst;
+ UINT32 res = src >> shift;
+
+ if(shift != 0)
+ (mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
+
+ if(GET_MSB_32(src))
+ res |= m68ki_shift_32_table[shift];
+
+ *r_dst = res;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src << (9-shift);
+}
+
+
+void m68000_base_device_ops::m68k_op_asr_8_r(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 shift = DX(mc68kcpu) & 0x3f;
+ UINT32 src = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = src >> shift;
+
+ if(shift != 0)
+ {
+ (mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
+
+ if(shift < 8)
+ {
+ if(GET_MSB_8(src))
+ res |= m68ki_shift_8_table[shift];
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
+
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src << (9-shift);
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ return;
+ }
+
+ if(GET_MSB_8(src))
+ {
+ *r_dst |= 0xff;
+ (mc68kcpu)->c_flag = CFLAG_SET;
+ (mc68kcpu)->x_flag = XFLAG_SET;
+ (mc68kcpu)->n_flag = NFLAG_SET;
+ (mc68kcpu)->not_z_flag = ZFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ return;
+ }
+
+ *r_dst &= 0xffffff00;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->x_flag = XFLAG_CLEAR;
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = ZFLAG_SET;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ return;
+ }
+
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->n_flag = NFLAG_8(src);
+ (mc68kcpu)->not_z_flag = src;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_asr_16_r(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 shift = DX(mc68kcpu) & 0x3f;
+ UINT32 src = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = src >> shift;
+
+ if(shift != 0)
+ {
+ (mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
+
+ if(shift < 16)
+ {
+ if(GET_MSB_16(src))
+ res |= m68ki_shift_16_table[shift];
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = (src >> (shift - 1))<<8;
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ return;
+ }
+
+ if(GET_MSB_16(src))
+ {
+ *r_dst |= 0xffff;
+ (mc68kcpu)->c_flag = CFLAG_SET;
+ (mc68kcpu)->x_flag = XFLAG_SET;
+ (mc68kcpu)->n_flag = NFLAG_SET;
+ (mc68kcpu)->not_z_flag = ZFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ return;
+ }
+
+ *r_dst &= 0xffff0000;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->x_flag = XFLAG_CLEAR;
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = ZFLAG_SET;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ return;
+ }
+
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->n_flag = NFLAG_16(src);
+ (mc68kcpu)->not_z_flag = src;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_asr_32_r(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 shift = DX(mc68kcpu) & 0x3f;
+ UINT32 src = *r_dst;
+ UINT32 res = src >> shift;
+
+ if(shift != 0)
+ {
+ (mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
+
+ if(shift < 32)
+ {
+ if(GET_MSB_32(src))
+ res |= m68ki_shift_32_table[shift];
+
+ *r_dst = res;
+
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = (src >> (shift - 1))<<8;
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ return;
+ }
+
+ if(GET_MSB_32(src))
+ {
+ *r_dst = 0xffffffff;
+ (mc68kcpu)->c_flag = CFLAG_SET;
+ (mc68kcpu)->x_flag = XFLAG_SET;
+ (mc68kcpu)->n_flag = NFLAG_SET;
+ (mc68kcpu)->not_z_flag = ZFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ return;
+ }
+
+ *r_dst = 0;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->x_flag = XFLAG_CLEAR;
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = ZFLAG_SET;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ return;
+ }
+
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->n_flag = NFLAG_32(src);
+ (mc68kcpu)->not_z_flag = src;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_asr_16_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = src >> 1;
+
+ if(GET_MSB_16(src))
+ res |= 0x8000;
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = src << 8;
+}
+
+
+void m68000_base_device_ops::m68k_op_asr_16_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = src >> 1;
+
+ if(GET_MSB_16(src))
+ res |= 0x8000;
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = src << 8;
+}
+
+
+void m68000_base_device_ops::m68k_op_asr_16_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = src >> 1;
+
+ if(GET_MSB_16(src))
+ res |= 0x8000;
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = src << 8;
+}
+
+
+void m68000_base_device_ops::m68k_op_asr_16_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = src >> 1;
+
+ if(GET_MSB_16(src))
+ res |= 0x8000;
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = src << 8;
+}
+
+
+void m68000_base_device_ops::m68k_op_asr_16_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = src >> 1;
+
+ if(GET_MSB_16(src))
+ res |= 0x8000;
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = src << 8;
+}
+
+
+void m68000_base_device_ops::m68k_op_asr_16_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = src >> 1;
+
+ if(GET_MSB_16(src))
+ res |= 0x8000;
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = src << 8;
+}
+
+
+void m68000_base_device_ops::m68k_op_asr_16_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = src >> 1;
+
+ if(GET_MSB_16(src))
+ res |= 0x8000;
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = src << 8;
+}
+
+
+void m68000_base_device_ops::m68k_op_asl_8_s(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 src = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = MASK_OUT_ABOVE_8(src << shift);
+
+ if(shift != 0)
+ (mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
+
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src << shift;
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ src &= m68ki_shift_8_table[shift + 1];
+ (mc68kcpu)->v_flag = (!(src == 0 || (src == m68ki_shift_8_table[shift + 1] && shift < 8)))<<7;
+}
+
+
+void m68000_base_device_ops::m68k_op_asl_16_s(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 src = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = MASK_OUT_ABOVE_16(src << shift);
+
+ if(shift != 0)
+ (mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src >> (8-shift);
+ src &= m68ki_shift_16_table[shift + 1];
+ (mc68kcpu)->v_flag = (!(src == 0 || src == m68ki_shift_16_table[shift + 1]))<<7;
+}
+
+
+void m68000_base_device_ops::m68k_op_asl_32_s(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 src = *r_dst;
+ UINT32 res = MASK_OUT_ABOVE_32(src << shift);
+
+ if(shift != 0)
+ (mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
+
+ *r_dst = res;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src >> (24-shift);
+ src &= m68ki_shift_32_table[shift + 1];
+ (mc68kcpu)->v_flag = (!(src == 0 || src == m68ki_shift_32_table[shift + 1]))<<7;
+}
+
+
+void m68000_base_device_ops::m68k_op_asl_8_r(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 shift = DX(mc68kcpu) & 0x3f;
+ UINT32 src = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = MASK_OUT_ABOVE_8(src << shift);
+
+ if(shift != 0)
+ {
+ (mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
+
+ if(shift < 8)
+ {
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src << shift;
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ src &= m68ki_shift_8_table[shift + 1];
+ (mc68kcpu)->v_flag = (!(src == 0 || src == m68ki_shift_8_table[shift + 1]))<<7;
+ return;
+ }
+
+ *r_dst &= 0xffffff00;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = ((shift == 8 ? src & 1 : 0))<<8;
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = ZFLAG_SET;
+ (mc68kcpu)->v_flag = (!(src == 0))<<7;
+ return;
+ }
+
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->n_flag = NFLAG_8(src);
+ (mc68kcpu)->not_z_flag = src;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_asl_16_r(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 shift = DX(mc68kcpu) & 0x3f;
+ UINT32 src = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = MASK_OUT_ABOVE_16(src << shift);
+
+ if(shift != 0)
+ {
+ (mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
+
+ if(shift < 16)
+ {
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = (src << shift) >> 8;
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ src &= m68ki_shift_16_table[shift + 1];
+ (mc68kcpu)->v_flag = (!(src == 0 || src == m68ki_shift_16_table[shift + 1]))<<7;
+ return;
+ }
+
+ *r_dst &= 0xffff0000;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = ((shift == 16 ? src & 1 : 0))<<8;
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = ZFLAG_SET;
+ (mc68kcpu)->v_flag = (!(src == 0))<<7;
+ return;
+ }
+
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->n_flag = NFLAG_16(src);
+ (mc68kcpu)->not_z_flag = src;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_asl_32_r(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 shift = DX(mc68kcpu) & 0x3f;
+ UINT32 src = *r_dst;
+ UINT32 res = MASK_OUT_ABOVE_32(src << shift);
+
+ if(shift != 0)
+ {
+ (mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
+
+ if(shift < 32)
+ {
+ *r_dst = res;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = (src >> (32 - shift)) << 8;
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ src &= m68ki_shift_32_table[shift + 1];
+ (mc68kcpu)->v_flag = (!(src == 0 || src == m68ki_shift_32_table[shift + 1]))<<7;
+ return;
+ }
+
+ *r_dst = 0;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = ((shift == 32 ? src & 1 : 0))<<8;
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = ZFLAG_SET;
+ (mc68kcpu)->v_flag = (!(src == 0))<<7;
+ return;
+ }
+
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->n_flag = NFLAG_32(src);
+ (mc68kcpu)->not_z_flag = src;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_asl_16_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = MASK_OUT_ABOVE_16(src << 1);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src >> 7;
+ src &= 0xc000;
+ (mc68kcpu)->v_flag = (!(src == 0 || src == 0xc000))<<7;
+}
+
+
+void m68000_base_device_ops::m68k_op_asl_16_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = MASK_OUT_ABOVE_16(src << 1);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src >> 7;
+ src &= 0xc000;
+ (mc68kcpu)->v_flag = (!(src == 0 || src == 0xc000))<<7;
+}
+
+
+void m68000_base_device_ops::m68k_op_asl_16_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = MASK_OUT_ABOVE_16(src << 1);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src >> 7;
+ src &= 0xc000;
+ (mc68kcpu)->v_flag = (!(src == 0 || src == 0xc000))<<7;
+}
+
+
+void m68000_base_device_ops::m68k_op_asl_16_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = MASK_OUT_ABOVE_16(src << 1);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src >> 7;
+ src &= 0xc000;
+ (mc68kcpu)->v_flag = (!(src == 0 || src == 0xc000))<<7;
+}
+
+
+void m68000_base_device_ops::m68k_op_asl_16_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = MASK_OUT_ABOVE_16(src << 1);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src >> 7;
+ src &= 0xc000;
+ (mc68kcpu)->v_flag = (!(src == 0 || src == 0xc000))<<7;
+}
+
+
+void m68000_base_device_ops::m68k_op_asl_16_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = MASK_OUT_ABOVE_16(src << 1);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src >> 7;
+ src &= 0xc000;
+ (mc68kcpu)->v_flag = (!(src == 0 || src == 0xc000))<<7;
+}
+
+
+void m68000_base_device_ops::m68k_op_asl_16_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = MASK_OUT_ABOVE_16(src << 1);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src >> 7;
+ src &= 0xc000;
+ (mc68kcpu)->v_flag = (!(src == 0 || src == 0xc000))<<7;
+}
+
+
+void m68000_base_device_ops::m68k_op_bhi_8(m68000_base_device* mc68kcpu)
+{
+ if(COND_HI(mc68kcpu))
+ {
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
+ return;
+ }
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_b;
+}
+
+
+void m68000_base_device_ops::m68k_op_bls_8(m68000_base_device* mc68kcpu)
+{
+ if(COND_LS(mc68kcpu))
+ {
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
+ return;
+ }
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_b;
+}
+
+
+void m68000_base_device_ops::m68k_op_bcc_8(m68000_base_device* mc68kcpu)
+{
+ if(COND_CC(mc68kcpu))
+ {
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
+ return;
+ }
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_b;
+}
+
+
+void m68000_base_device_ops::m68k_op_bcs_8(m68000_base_device* mc68kcpu)
+{
+ if(COND_CS(mc68kcpu))
+ {
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
+ return;
+ }
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_b;
+}
+
+
+void m68000_base_device_ops::m68k_op_bne_8(m68000_base_device* mc68kcpu)
+{
+ if(COND_NE(mc68kcpu))
+ {
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
+ return;
+ }
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_b;
+}
+
+
+void m68000_base_device_ops::m68k_op_beq_8(m68000_base_device* mc68kcpu)
+{
+ if(COND_EQ(mc68kcpu))
+ {
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
+ return;
+ }
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_b;
+}
+
+
+void m68000_base_device_ops::m68k_op_bvc_8(m68000_base_device* mc68kcpu)
+{
+ if(COND_VC(mc68kcpu))
+ {
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
+ return;
+ }
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_b;
+}
+
+
+void m68000_base_device_ops::m68k_op_bvs_8(m68000_base_device* mc68kcpu)
+{
+ if(COND_VS(mc68kcpu))
+ {
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
+ return;
+ }
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_b;
+}
+
+
+void m68000_base_device_ops::m68k_op_bpl_8(m68000_base_device* mc68kcpu)
+{
+ if(COND_PL(mc68kcpu))
+ {
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
+ return;
+ }
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_b;
+}
+
+
+void m68000_base_device_ops::m68k_op_bmi_8(m68000_base_device* mc68kcpu)
+{
+ if(COND_MI(mc68kcpu))
+ {
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
+ return;
+ }
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_b;
+}
+
+
+void m68000_base_device_ops::m68k_op_bge_8(m68000_base_device* mc68kcpu)
+{
+ if(COND_GE(mc68kcpu))
+ {
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
+ return;
+ }
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_b;
+}
+
+
+void m68000_base_device_ops::m68k_op_blt_8(m68000_base_device* mc68kcpu)
+{
+ if(COND_LT(mc68kcpu))
+ {
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
+ return;
+ }
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_b;
+}
+
+
+void m68000_base_device_ops::m68k_op_bgt_8(m68000_base_device* mc68kcpu)
+{
+ if(COND_GT(mc68kcpu))
+ {
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
+ return;
+ }
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_b;
+}
+
+
+void m68000_base_device_ops::m68k_op_ble_8(m68000_base_device* mc68kcpu)
+{
+ if(COND_LE(mc68kcpu))
+ {
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
+ return;
+ }
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_b;
+}
+
+
+void m68000_base_device_ops::m68k_op_bhi_16(m68000_base_device* mc68kcpu)
+{
+ if(COND_HI(mc68kcpu))
+ {
+ UINT32 offset = OPER_I_16(mc68kcpu);
+ REG_PC(mc68kcpu) -= 2;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_16((mc68kcpu), offset);
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_w;
+}
+
+
+void m68000_base_device_ops::m68k_op_bls_16(m68000_base_device* mc68kcpu)
+{
+ if(COND_LS(mc68kcpu))
+ {
+ UINT32 offset = OPER_I_16(mc68kcpu);
+ REG_PC(mc68kcpu) -= 2;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_16((mc68kcpu), offset);
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_w;
+}
+
+
+void m68000_base_device_ops::m68k_op_bcc_16(m68000_base_device* mc68kcpu)
+{
+ if(COND_CC(mc68kcpu))
+ {
+ UINT32 offset = OPER_I_16(mc68kcpu);
+ REG_PC(mc68kcpu) -= 2;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_16((mc68kcpu), offset);
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_w;
+}
+
+
+void m68000_base_device_ops::m68k_op_bcs_16(m68000_base_device* mc68kcpu)
+{
+ if(COND_CS(mc68kcpu))
+ {
+ UINT32 offset = OPER_I_16(mc68kcpu);
+ REG_PC(mc68kcpu) -= 2;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_16((mc68kcpu), offset);
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_w;
+}
+
+
+void m68000_base_device_ops::m68k_op_bne_16(m68000_base_device* mc68kcpu)
+{
+ if(COND_NE(mc68kcpu))
+ {
+ UINT32 offset = OPER_I_16(mc68kcpu);
+ REG_PC(mc68kcpu) -= 2;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_16((mc68kcpu), offset);
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_w;
+}
+
+
+void m68000_base_device_ops::m68k_op_beq_16(m68000_base_device* mc68kcpu)
+{
+ if(COND_EQ(mc68kcpu))
+ {
+ UINT32 offset = OPER_I_16(mc68kcpu);
+ REG_PC(mc68kcpu) -= 2;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_16((mc68kcpu), offset);
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_w;
+}
+
+
+void m68000_base_device_ops::m68k_op_bvc_16(m68000_base_device* mc68kcpu)
+{
+ if(COND_VC(mc68kcpu))
+ {
+ UINT32 offset = OPER_I_16(mc68kcpu);
+ REG_PC(mc68kcpu) -= 2;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_16((mc68kcpu), offset);
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_w;
+}
+
+
+void m68000_base_device_ops::m68k_op_bvs_16(m68000_base_device* mc68kcpu)
+{
+ if(COND_VS(mc68kcpu))
+ {
+ UINT32 offset = OPER_I_16(mc68kcpu);
+ REG_PC(mc68kcpu) -= 2;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_16((mc68kcpu), offset);
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_w;
+}
+
+
+void m68000_base_device_ops::m68k_op_bpl_16(m68000_base_device* mc68kcpu)
+{
+ if(COND_PL(mc68kcpu))
+ {
+ UINT32 offset = OPER_I_16(mc68kcpu);
+ REG_PC(mc68kcpu) -= 2;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_16((mc68kcpu), offset);
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_w;
+}
+
+
+void m68000_base_device_ops::m68k_op_bmi_16(m68000_base_device* mc68kcpu)
+{
+ if(COND_MI(mc68kcpu))
+ {
+ UINT32 offset = OPER_I_16(mc68kcpu);
+ REG_PC(mc68kcpu) -= 2;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_16((mc68kcpu), offset);
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_w;
+}
+
+
+void m68000_base_device_ops::m68k_op_bge_16(m68000_base_device* mc68kcpu)
+{
+ if(COND_GE(mc68kcpu))
+ {
+ UINT32 offset = OPER_I_16(mc68kcpu);
+ REG_PC(mc68kcpu) -= 2;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_16((mc68kcpu), offset);
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_w;
+}
+
+
+void m68000_base_device_ops::m68k_op_blt_16(m68000_base_device* mc68kcpu)
+{
+ if(COND_LT(mc68kcpu))
+ {
+ UINT32 offset = OPER_I_16(mc68kcpu);
+ REG_PC(mc68kcpu) -= 2;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_16((mc68kcpu), offset);
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_w;
+}
+
+
+void m68000_base_device_ops::m68k_op_bgt_16(m68000_base_device* mc68kcpu)
+{
+ if(COND_GT(mc68kcpu))
+ {
+ UINT32 offset = OPER_I_16(mc68kcpu);
+ REG_PC(mc68kcpu) -= 2;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_16((mc68kcpu), offset);
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_w;
+}
+
+
+void m68000_base_device_ops::m68k_op_ble_16(m68000_base_device* mc68kcpu)
+{
+ if(COND_LE(mc68kcpu))
+ {
+ UINT32 offset = OPER_I_16(mc68kcpu);
+ REG_PC(mc68kcpu) -= 2;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_16((mc68kcpu), offset);
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_w;
+}
+
+
+void m68000_base_device_ops::m68k_op_bhi_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_HI(mc68kcpu))
+ {
+ UINT32 offset = OPER_I_32(mc68kcpu);
+ REG_PC(mc68kcpu) -= 4;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_32((mc68kcpu), offset);
+ return;
+ }
+ REG_PC(mc68kcpu) += 4;
+ return;
+ }
+ else
+ {
+ if(COND_HI(mc68kcpu))
+ {
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
+ return;
+ }
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_b;
+ }
+}
+
+
+void m68000_base_device_ops::m68k_op_bls_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_LS(mc68kcpu))
+ {
+ UINT32 offset = OPER_I_32(mc68kcpu);
+ REG_PC(mc68kcpu) -= 4;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_32((mc68kcpu), offset);
+ return;
+ }
+ REG_PC(mc68kcpu) += 4;
+ return;
+ }
+ else
+ {
+ if(COND_LS(mc68kcpu))
+ {
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
+ return;
+ }
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_b;
+ }
+}
+
+
+void m68000_base_device_ops::m68k_op_bcc_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_CC(mc68kcpu))
+ {
+ UINT32 offset = OPER_I_32(mc68kcpu);
+ REG_PC(mc68kcpu) -= 4;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_32((mc68kcpu), offset);
+ return;
+ }
+ REG_PC(mc68kcpu) += 4;
+ return;
+ }
+ else
+ {
+ if(COND_CC(mc68kcpu))
+ {
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
+ return;
+ }
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_b;
+ }
+}
+
+
+void m68000_base_device_ops::m68k_op_bcs_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_CS(mc68kcpu))
+ {
+ UINT32 offset = OPER_I_32(mc68kcpu);
+ REG_PC(mc68kcpu) -= 4;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_32((mc68kcpu), offset);
+ return;
+ }
+ REG_PC(mc68kcpu) += 4;
+ return;
+ }
+ else
+ {
+ if(COND_CS(mc68kcpu))
+ {
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
+ return;
+ }
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_b;
+ }
+}
+
+
+void m68000_base_device_ops::m68k_op_bne_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_NE(mc68kcpu))
+ {
+ UINT32 offset = OPER_I_32(mc68kcpu);
+ REG_PC(mc68kcpu) -= 4;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_32((mc68kcpu), offset);
+ return;
+ }
+ REG_PC(mc68kcpu) += 4;
+ return;
+ }
+ else
+ {
+ if(COND_NE(mc68kcpu))
+ {
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
+ return;
+ }
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_b;
+ }
+}
+
+
+void m68000_base_device_ops::m68k_op_beq_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_EQ(mc68kcpu))
+ {
+ UINT32 offset = OPER_I_32(mc68kcpu);
+ REG_PC(mc68kcpu) -= 4;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_32((mc68kcpu), offset);
+ return;
+ }
+ REG_PC(mc68kcpu) += 4;
+ return;
+ }
+ else
+ {
+ if(COND_EQ(mc68kcpu))
+ {
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
+ return;
+ }
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_b;
+ }
+}
+
+
+void m68000_base_device_ops::m68k_op_bvc_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_VC(mc68kcpu))
+ {
+ UINT32 offset = OPER_I_32(mc68kcpu);
+ REG_PC(mc68kcpu) -= 4;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_32((mc68kcpu), offset);
+ return;
+ }
+ REG_PC(mc68kcpu) += 4;
+ return;
+ }
+ else
+ {
+ if(COND_VC(mc68kcpu))
+ {
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
+ return;
+ }
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_b;
+ }
+}
+
+
+void m68000_base_device_ops::m68k_op_bvs_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_VS(mc68kcpu))
+ {
+ UINT32 offset = OPER_I_32(mc68kcpu);
+ REG_PC(mc68kcpu) -= 4;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_32((mc68kcpu), offset);
+ return;
+ }
+ REG_PC(mc68kcpu) += 4;
+ return;
+ }
+ else
+ {
+ if(COND_VS(mc68kcpu))
+ {
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
+ return;
+ }
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_b;
+ }
+}
+
+
+void m68000_base_device_ops::m68k_op_bpl_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_PL(mc68kcpu))
+ {
+ UINT32 offset = OPER_I_32(mc68kcpu);
+ REG_PC(mc68kcpu) -= 4;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_32((mc68kcpu), offset);
+ return;
+ }
+ REG_PC(mc68kcpu) += 4;
+ return;
+ }
+ else
+ {
+ if(COND_PL(mc68kcpu))
+ {
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
+ return;
+ }
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_b;
+ }
+}
+
+
+void m68000_base_device_ops::m68k_op_bmi_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_MI(mc68kcpu))
+ {
+ UINT32 offset = OPER_I_32(mc68kcpu);
+ REG_PC(mc68kcpu) -= 4;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_32((mc68kcpu), offset);
+ return;
+ }
+ REG_PC(mc68kcpu) += 4;
+ return;
+ }
+ else
+ {
+ if(COND_MI(mc68kcpu))
+ {
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
+ return;
+ }
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_b;
+ }
+}
+
+
+void m68000_base_device_ops::m68k_op_bge_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_GE(mc68kcpu))
+ {
+ UINT32 offset = OPER_I_32(mc68kcpu);
+ REG_PC(mc68kcpu) -= 4;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_32((mc68kcpu), offset);
+ return;
+ }
+ REG_PC(mc68kcpu) += 4;
+ return;
+ }
+ else
+ {
+ if(COND_GE(mc68kcpu))
+ {
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
+ return;
+ }
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_b;
+ }
+}
+
+
+void m68000_base_device_ops::m68k_op_blt_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_LT(mc68kcpu))
+ {
+ UINT32 offset = OPER_I_32(mc68kcpu);
+ REG_PC(mc68kcpu) -= 4;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_32((mc68kcpu), offset);
+ return;
+ }
+ REG_PC(mc68kcpu) += 4;
+ return;
+ }
+ else
+ {
+ if(COND_LT(mc68kcpu))
+ {
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
+ return;
+ }
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_b;
+ }
+}
+
+
+void m68000_base_device_ops::m68k_op_bgt_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_GT(mc68kcpu))
+ {
+ UINT32 offset = OPER_I_32(mc68kcpu);
+ REG_PC(mc68kcpu) -= 4;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_32((mc68kcpu), offset);
+ return;
+ }
+ REG_PC(mc68kcpu) += 4;
+ return;
+ }
+ else
+ {
+ if(COND_GT(mc68kcpu))
+ {
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
+ return;
+ }
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_b;
+ }
+}
+
+
+void m68000_base_device_ops::m68k_op_ble_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_LE(mc68kcpu))
+ {
+ UINT32 offset = OPER_I_32(mc68kcpu);
+ REG_PC(mc68kcpu) -= 4;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_32((mc68kcpu), offset);
+ return;
+ }
+ REG_PC(mc68kcpu) += 4;
+ return;
+ }
+ else
+ {
+ if(COND_LE(mc68kcpu))
+ {
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
+ return;
+ }
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_bcc_notake_b;
+ }
+}
+
+
+void m68000_base_device_ops::m68k_op_bchg_32_r_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 mask = 1 << (DX(mc68kcpu) & 0x1f);
+
+ (mc68kcpu)->not_z_flag = *r_dst & mask;
+ *r_dst ^= mask;
+}
+
+
+void m68000_base_device_ops::m68k_op_bchg_8_r_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 mask = 1 << (DX(mc68kcpu) & 7);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src ^ mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bchg_8_r_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 mask = 1 << (DX(mc68kcpu) & 7);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src ^ mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bchg_8_r_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_A7_PI_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 mask = 1 << (DX(mc68kcpu) & 7);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src ^ mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bchg_8_r_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 mask = 1 << (DX(mc68kcpu) & 7);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src ^ mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bchg_8_r_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 mask = 1 << (DX(mc68kcpu) & 7);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src ^ mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bchg_8_r_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 mask = 1 << (DX(mc68kcpu) & 7);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src ^ mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bchg_8_r_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 mask = 1 << (DX(mc68kcpu) & 7);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src ^ mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bchg_8_r_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 mask = 1 << (DX(mc68kcpu) & 7);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src ^ mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bchg_8_r_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 mask = 1 << (DX(mc68kcpu) & 7);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src ^ mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bchg_32_s_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 mask = 1 << (OPER_I_8(mc68kcpu) & 0x1f);
+
+ (mc68kcpu)->not_z_flag = *r_dst & mask;
+ *r_dst ^= mask;
+}
+
+
+void m68000_base_device_ops::m68k_op_bchg_8_s_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 mask = 1 << (OPER_I_8(mc68kcpu) & 7);
+ UINT32 ea = EA_AY_AI_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src ^ mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bchg_8_s_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 mask = 1 << (OPER_I_8(mc68kcpu) & 7);
+ UINT32 ea = EA_AY_PI_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src ^ mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bchg_8_s_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32 mask = 1 << (OPER_I_8(mc68kcpu) & 7);
+ UINT32 ea = EA_A7_PI_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src ^ mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bchg_8_s_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 mask = 1 << (OPER_I_8(mc68kcpu) & 7);
+ UINT32 ea = EA_AY_PD_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src ^ mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bchg_8_s_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32 mask = 1 << (OPER_I_8(mc68kcpu) & 7);
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src ^ mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bchg_8_s_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 mask = 1 << (OPER_I_8(mc68kcpu) & 7);
+ UINT32 ea = EA_AY_DI_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src ^ mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bchg_8_s_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 mask = 1 << (OPER_I_8(mc68kcpu) & 7);
+ UINT32 ea = EA_AY_IX_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src ^ mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bchg_8_s_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 mask = 1 << (OPER_I_8(mc68kcpu) & 7);
+ UINT32 ea = EA_AW_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src ^ mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bchg_8_s_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 mask = 1 << (OPER_I_8(mc68kcpu) & 7);
+ UINT32 ea = EA_AL_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src ^ mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bclr_32_r_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 mask = 1 << (DX(mc68kcpu) & 0x1f);
+
+ (mc68kcpu)->not_z_flag = *r_dst & mask;
+ *r_dst &= ~mask;
+}
+
+
+void m68000_base_device_ops::m68k_op_bclr_8_r_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 mask = 1 << (DX(mc68kcpu) & 7);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src & ~mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bclr_8_r_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 mask = 1 << (DX(mc68kcpu) & 7);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src & ~mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bclr_8_r_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_A7_PI_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 mask = 1 << (DX(mc68kcpu) & 7);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src & ~mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bclr_8_r_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 mask = 1 << (DX(mc68kcpu) & 7);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src & ~mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bclr_8_r_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 mask = 1 << (DX(mc68kcpu) & 7);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src & ~mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bclr_8_r_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 mask = 1 << (DX(mc68kcpu) & 7);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src & ~mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bclr_8_r_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 mask = 1 << (DX(mc68kcpu) & 7);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src & ~mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bclr_8_r_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 mask = 1 << (DX(mc68kcpu) & 7);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src & ~mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bclr_8_r_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 mask = 1 << (DX(mc68kcpu) & 7);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src & ~mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bclr_32_s_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 mask = 1 << (OPER_I_8(mc68kcpu) & 0x1f);
+
+ (mc68kcpu)->not_z_flag = *r_dst & mask;
+ *r_dst &= ~mask;
+}
+
+
+void m68000_base_device_ops::m68k_op_bclr_8_s_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 mask = 1 << (OPER_I_8(mc68kcpu) & 7);
+ UINT32 ea = EA_AY_AI_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src & ~mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bclr_8_s_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 mask = 1 << (OPER_I_8(mc68kcpu) & 7);
+ UINT32 ea = EA_AY_PI_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src & ~mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bclr_8_s_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32 mask = 1 << (OPER_I_8(mc68kcpu) & 7);
+ UINT32 ea = EA_A7_PI_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src & ~mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bclr_8_s_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 mask = 1 << (OPER_I_8(mc68kcpu) & 7);
+ UINT32 ea = EA_AY_PD_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src & ~mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bclr_8_s_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32 mask = 1 << (OPER_I_8(mc68kcpu) & 7);
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src & ~mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bclr_8_s_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 mask = 1 << (OPER_I_8(mc68kcpu) & 7);
+ UINT32 ea = EA_AY_DI_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src & ~mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bclr_8_s_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 mask = 1 << (OPER_I_8(mc68kcpu) & 7);
+ UINT32 ea = EA_AY_IX_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src & ~mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bclr_8_s_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 mask = 1 << (OPER_I_8(mc68kcpu) & 7);
+ UINT32 ea = EA_AW_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src & ~mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bclr_8_s_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 mask = 1 << (OPER_I_8(mc68kcpu) & 7);
+ UINT32 ea = EA_AL_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src & ~mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfchg_32_d(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32* data = &DY(mc68kcpu);
+ UINT64 mask;
+
+
+ if(BIT_B(word2))
+ offset = REG_D(mc68kcpu)[offset&7];
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ offset &= 31;
+ width = ((width-1) & 31) + 1;
+
+ mask = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
+ mask = ROR_32(mask, offset);
+
+ (mc68kcpu)->n_flag = NFLAG_32(*data<<offset);
+ (mc68kcpu)->not_z_flag = *data & mask;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ *data ^= mask;
+
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfchg_32_ai(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 mask_base;
+ UINT32 data_long;
+ UINT32 mask_long;
+ UINT32 data_byte = 0;
+ UINT32 mask_byte = 0;
+ UINT32 ea = EA_AY_AI_8(mc68kcpu);
+
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ width = ((width-1) & 31) + 1;
+
+ mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
+ mask_long = mask_base >> offset;
+
+ data_long = m68ki_read_32((mc68kcpu), ea);
+ (mc68kcpu)->n_flag = NFLAG_32(data_long << offset);
+ (mc68kcpu)->not_z_flag = data_long & mask_long;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ m68ki_write_32((mc68kcpu), ea, data_long ^ mask_long);
+
+ if((width + offset) > 32)
+ {
+ mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
+ data_byte = m68ki_read_8((mc68kcpu), ea+4);
+ (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
+ m68ki_write_8((mc68kcpu), ea+4, data_byte ^ mask_byte);
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfchg_32_di(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 mask_base;
+ UINT32 data_long;
+ UINT32 mask_long;
+ UINT32 data_byte = 0;
+ UINT32 mask_byte = 0;
+ UINT32 ea = EA_AY_DI_8(mc68kcpu);
+
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ width = ((width-1) & 31) + 1;
+
+ mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
+ mask_long = mask_base >> offset;
+
+ data_long = m68ki_read_32((mc68kcpu), ea);
+ (mc68kcpu)->n_flag = NFLAG_32(data_long << offset);
+ (mc68kcpu)->not_z_flag = data_long & mask_long;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ m68ki_write_32((mc68kcpu), ea, data_long ^ mask_long);
+
+ if((width + offset) > 32)
+ {
+ mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
+ data_byte = m68ki_read_8((mc68kcpu), ea+4);
+ (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
+ m68ki_write_8((mc68kcpu), ea+4, data_byte ^ mask_byte);
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfchg_32_ix(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 mask_base;
+ UINT32 data_long;
+ UINT32 mask_long;
+ UINT32 data_byte = 0;
+ UINT32 mask_byte = 0;
+ UINT32 ea = EA_AY_IX_8(mc68kcpu);
+
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ width = ((width-1) & 31) + 1;
+
+ mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
+ mask_long = mask_base >> offset;
+
+ data_long = m68ki_read_32((mc68kcpu), ea);
+ (mc68kcpu)->n_flag = NFLAG_32(data_long << offset);
+ (mc68kcpu)->not_z_flag = data_long & mask_long;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ m68ki_write_32((mc68kcpu), ea, data_long ^ mask_long);
+
+ if((width + offset) > 32)
+ {
+ mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
+ data_byte = m68ki_read_8((mc68kcpu), ea+4);
+ (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
+ m68ki_write_8((mc68kcpu), ea+4, data_byte ^ mask_byte);
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfchg_32_aw(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 mask_base;
+ UINT32 data_long;
+ UINT32 mask_long;
+ UINT32 data_byte = 0;
+ UINT32 mask_byte = 0;
+ UINT32 ea = EA_AW_8(mc68kcpu);
+
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ width = ((width-1) & 31) + 1;
+
+ mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
+ mask_long = mask_base >> offset;
+
+ data_long = m68ki_read_32((mc68kcpu), ea);
+ (mc68kcpu)->n_flag = NFLAG_32(data_long << offset);
+ (mc68kcpu)->not_z_flag = data_long & mask_long;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ m68ki_write_32((mc68kcpu), ea, data_long ^ mask_long);
+
+ if((width + offset) > 32)
+ {
+ mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
+ data_byte = m68ki_read_8((mc68kcpu), ea+4);
+ (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
+ m68ki_write_8((mc68kcpu), ea+4, data_byte ^ mask_byte);
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfchg_32_al(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 mask_base;
+ UINT32 data_long;
+ UINT32 mask_long;
+ UINT32 data_byte = 0;
+ UINT32 mask_byte = 0;
+ UINT32 ea = EA_AL_8(mc68kcpu);
+
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ width = ((width-1) & 31) + 1;
+
+ mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
+ mask_long = mask_base >> offset;
+
+ data_long = m68ki_read_32((mc68kcpu), ea);
+ (mc68kcpu)->n_flag = NFLAG_32(data_long << offset);
+ (mc68kcpu)->not_z_flag = data_long & mask_long;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ m68ki_write_32((mc68kcpu), ea, data_long ^ mask_long);
+
+ if((width + offset) > 32)
+ {
+ mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
+ data_byte = m68ki_read_8((mc68kcpu), ea+4);
+ (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
+ m68ki_write_8((mc68kcpu), ea+4, data_byte ^ mask_byte);
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfclr_32_d(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32* data = &DY(mc68kcpu);
+ UINT64 mask;
+
+
+ if(BIT_B(word2))
+ offset = REG_D(mc68kcpu)[offset&7];
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+
+ offset &= 31;
+ width = ((width-1) & 31) + 1;
+
+
+ mask = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
+ mask = ROR_32(mask, offset);
+
+ (mc68kcpu)->n_flag = NFLAG_32(*data<<offset);
+ (mc68kcpu)->not_z_flag = *data & mask;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ *data &= ~mask;
+
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfclr_32_ai(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 mask_base;
+ UINT32 data_long;
+ UINT32 mask_long;
+ UINT32 data_byte = 0;
+ UINT32 mask_byte = 0;
+ UINT32 ea = EA_AY_AI_8(mc68kcpu);
+
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ width = ((width-1) & 31) + 1;
+
+ mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
+ mask_long = mask_base >> offset;
+
+ data_long = m68ki_read_32((mc68kcpu), ea);
+ (mc68kcpu)->n_flag = NFLAG_32(data_long << offset);
+ (mc68kcpu)->not_z_flag = data_long & mask_long;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ m68ki_write_32((mc68kcpu), ea, data_long & ~mask_long);
+
+ if((width + offset) > 32)
+ {
+ mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
+ data_byte = m68ki_read_8((mc68kcpu), ea+4);
+ (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
+ m68ki_write_8((mc68kcpu), ea+4, data_byte & ~mask_byte);
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfclr_32_di(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 mask_base;
+ UINT32 data_long;
+ UINT32 mask_long;
+ UINT32 data_byte = 0;
+ UINT32 mask_byte = 0;
+ UINT32 ea = EA_AY_DI_8(mc68kcpu);
+
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ width = ((width-1) & 31) + 1;
+
+ mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
+ mask_long = mask_base >> offset;
+
+ data_long = m68ki_read_32((mc68kcpu), ea);
+ (mc68kcpu)->n_flag = NFLAG_32(data_long << offset);
+ (mc68kcpu)->not_z_flag = data_long & mask_long;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ m68ki_write_32((mc68kcpu), ea, data_long & ~mask_long);
+
+ if((width + offset) > 32)
+ {
+ mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
+ data_byte = m68ki_read_8((mc68kcpu), ea+4);
+ (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
+ m68ki_write_8((mc68kcpu), ea+4, data_byte & ~mask_byte);
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfclr_32_ix(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 mask_base;
+ UINT32 data_long;
+ UINT32 mask_long;
+ UINT32 data_byte = 0;
+ UINT32 mask_byte = 0;
+ UINT32 ea = EA_AY_IX_8(mc68kcpu);
+
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ width = ((width-1) & 31) + 1;
+
+ mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
+ mask_long = mask_base >> offset;
+
+ data_long = m68ki_read_32((mc68kcpu), ea);
+ (mc68kcpu)->n_flag = NFLAG_32(data_long << offset);
+ (mc68kcpu)->not_z_flag = data_long & mask_long;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ m68ki_write_32((mc68kcpu), ea, data_long & ~mask_long);
+
+ if((width + offset) > 32)
+ {
+ mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
+ data_byte = m68ki_read_8((mc68kcpu), ea+4);
+ (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
+ m68ki_write_8((mc68kcpu), ea+4, data_byte & ~mask_byte);
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfclr_32_aw(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 mask_base;
+ UINT32 data_long;
+ UINT32 mask_long;
+ UINT32 data_byte = 0;
+ UINT32 mask_byte = 0;
+ UINT32 ea = EA_AW_8(mc68kcpu);
+
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ width = ((width-1) & 31) + 1;
+
+ mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
+ mask_long = mask_base >> offset;
+
+ data_long = m68ki_read_32((mc68kcpu), ea);
+ (mc68kcpu)->n_flag = NFLAG_32(data_long << offset);
+ (mc68kcpu)->not_z_flag = data_long & mask_long;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ m68ki_write_32((mc68kcpu), ea, data_long & ~mask_long);
+
+ if((width + offset) > 32)
+ {
+ mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
+ data_byte = m68ki_read_8((mc68kcpu), ea+4);
+ (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
+ m68ki_write_8((mc68kcpu), ea+4, data_byte & ~mask_byte);
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfclr_32_al(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 mask_base;
+ UINT32 data_long;
+ UINT32 mask_long;
+ UINT32 data_byte = 0;
+ UINT32 mask_byte = 0;
+ UINT32 ea = EA_AL_8(mc68kcpu);
+
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ width = ((width-1) & 31) + 1;
+
+ mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
+ mask_long = mask_base >> offset;
+
+ data_long = m68ki_read_32((mc68kcpu), ea);
+ (mc68kcpu)->n_flag = NFLAG_32(data_long << offset);
+ (mc68kcpu)->not_z_flag = data_long & mask_long;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ m68ki_write_32((mc68kcpu), ea, data_long & ~mask_long);
+
+ if((width + offset) > 32)
+ {
+ mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
+ data_byte = m68ki_read_8((mc68kcpu), ea+4);
+ (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
+ m68ki_write_8((mc68kcpu), ea+4, data_byte & ~mask_byte);
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfexts_32_d(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT64 data = DY(mc68kcpu);
+
+
+ if(BIT_B(word2))
+ offset = REG_D(mc68kcpu)[offset&7];
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ offset &= 31;
+ width = ((width-1) & 31) + 1;
+
+ data = ROL_32(data, offset);
+ (mc68kcpu)->n_flag = NFLAG_32(data);
+ data = MAKE_INT_32(data) >> (32 - width);
+
+ (mc68kcpu)->not_z_flag = data;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ REG_D(mc68kcpu)[(word2>>12)&7] = data;
+
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfexts_32_ai(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 data;
+ UINT32 ea = EA_AY_AI_8(mc68kcpu);
+
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ if(BIT_B(word2))
+ {
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ }
+ width = ((width-1) & 31) + 1;
+
+ data = (offset+width) < 8 ? (m68ki_read_8((mc68kcpu), ea) << 24) :
+ (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
+
+ data = MASK_OUT_ABOVE_32(data<<offset);
+
+ if((offset+width) > 32)
+ data |= (m68ki_read_8((mc68kcpu), ea+4) << offset) >> 8;
+
+ (mc68kcpu)->n_flag = NFLAG_32(data);
+ data = MAKE_INT_32(data) >> (32 - width);
+
+ (mc68kcpu)->not_z_flag = data;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = data;
+
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfexts_32_di(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 data;
+ UINT32 ea = EA_AY_DI_8(mc68kcpu);
+
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ if(BIT_B(word2))
+ {
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ }
+ width = ((width-1) & 31) + 1;
+
+ data = (offset+width) < 8 ? (m68ki_read_8((mc68kcpu), ea) << 24) :
+ (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
+
+ data = MASK_OUT_ABOVE_32(data<<offset);
+
+ if((offset+width) > 32)
+ data |= (m68ki_read_8((mc68kcpu), ea+4) << offset) >> 8;
+
+ (mc68kcpu)->n_flag = NFLAG_32(data);
+ data = MAKE_INT_32(data) >> (32 - width);
+
+ (mc68kcpu)->not_z_flag = data;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = data;
+
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfexts_32_ix(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 data;
+ UINT32 ea = EA_AY_IX_8(mc68kcpu);
+
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ if(BIT_B(word2))
+ {
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ }
+ width = ((width-1) & 31) + 1;
+
+ data = (offset+width) < 8 ? (m68ki_read_8((mc68kcpu), ea) << 24) :
+ (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
+
+ data = MASK_OUT_ABOVE_32(data<<offset);
+
+ if((offset+width) > 32)
+ data |= (m68ki_read_8((mc68kcpu), ea+4) << offset) >> 8;
+
+ (mc68kcpu)->n_flag = NFLAG_32(data);
+ data = MAKE_INT_32(data) >> (32 - width);
+
+ (mc68kcpu)->not_z_flag = data;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = data;
+
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfexts_32_aw(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 data;
+ UINT32 ea = EA_AW_8(mc68kcpu);
+
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ if(BIT_B(word2))
+ {
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ }
+ width = ((width-1) & 31) + 1;
+
+ data = (offset+width) < 8 ? (m68ki_read_8((mc68kcpu), ea) << 24) :
+ (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
+
+ data = MASK_OUT_ABOVE_32(data<<offset);
+
+ if((offset+width) > 32)
+ data |= (m68ki_read_8((mc68kcpu), ea+4) << offset) >> 8;
+
+ (mc68kcpu)->n_flag = NFLAG_32(data);
+ data = MAKE_INT_32(data) >> (32 - width);
+
+ (mc68kcpu)->not_z_flag = data;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = data;
+
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfexts_32_al(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 data;
+ UINT32 ea = EA_AL_8(mc68kcpu);
+
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ if(BIT_B(word2))
+ {
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ }
+ width = ((width-1) & 31) + 1;
+
+ data = (offset+width) < 8 ? (m68ki_read_8((mc68kcpu), ea) << 24) :
+ (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
+
+ data = MASK_OUT_ABOVE_32(data<<offset);
+
+ if((offset+width) > 32)
+ data |= (m68ki_read_8((mc68kcpu), ea+4) << offset) >> 8;
+
+ (mc68kcpu)->n_flag = NFLAG_32(data);
+ data = MAKE_INT_32(data) >> (32 - width);
+
+ (mc68kcpu)->not_z_flag = data;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = data;
+
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfexts_32_pcdi(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 data;
+ UINT32 ea = EA_PCDI_8(mc68kcpu);
+
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ if(BIT_B(word2))
+ {
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ }
+ width = ((width-1) & 31) + 1;
+
+ data = (offset+width) < 8 ? (m68ki_read_8((mc68kcpu), ea) << 24) :
+ (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
+
+ data = MASK_OUT_ABOVE_32(data<<offset);
+
+ if((offset+width) > 32)
+ data |= (m68ki_read_8((mc68kcpu), ea+4) << offset) >> 8;
+
+ (mc68kcpu)->n_flag = NFLAG_32(data);
+ data = MAKE_INT_32(data) >> (32 - width);
+
+ (mc68kcpu)->not_z_flag = data;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = data;
+
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfexts_32_pcix(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 data;
+ UINT32 ea = EA_PCIX_8(mc68kcpu);
+
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ if(BIT_B(word2))
+ {
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ }
+ width = ((width-1) & 31) + 1;
+
+ data = (offset+width) < 8 ? (m68ki_read_8((mc68kcpu), ea) << 24) :
+ (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
+
+ data = MASK_OUT_ABOVE_32(data<<offset);
+
+ if((offset+width) > 32)
+ data |= (m68ki_read_8((mc68kcpu), ea+4) << offset) >> 8;
+
+ (mc68kcpu)->n_flag = NFLAG_32(data);
+ data = MAKE_INT_32(data) >> (32 - width);
+
+ (mc68kcpu)->not_z_flag = data;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = data;
+
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfextu_32_d(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT64 data = DY(mc68kcpu);
+
+
+ if(BIT_B(word2))
+ offset = REG_D(mc68kcpu)[offset&7];
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ offset &= 31;
+ width = ((width-1) & 31) + 1;
+
+ data = ROL_32(data, offset);
+ (mc68kcpu)->n_flag = NFLAG_32(data);
+ data >>= 32 - width;
+
+ (mc68kcpu)->not_z_flag = data;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ REG_D(mc68kcpu)[(word2>>12)&7] = data;
+
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfextu_32_ai(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 data;
+ UINT32 ea = EA_AY_AI_8(mc68kcpu);
+
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ if(BIT_B(word2))
+ {
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ }
+ width = ((width-1) & 31) + 1;
+
+ data = (offset+width) < 8 ? (m68ki_read_8((mc68kcpu), ea) << 24) :
+ (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
+ data = MASK_OUT_ABOVE_32(data<<offset);
+
+ if((offset+width) > 32)
+ data |= (m68ki_read_8((mc68kcpu), ea+4) << offset) >> 8;
+
+ (mc68kcpu)->n_flag = NFLAG_32(data);
+ data >>= (32 - width);
+
+ (mc68kcpu)->not_z_flag = data;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = data;
+
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfextu_32_di(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 data;
+ UINT32 ea = EA_AY_DI_8(mc68kcpu);
+
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ if(BIT_B(word2))
+ {
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ }
+ width = ((width-1) & 31) + 1;
+
+ data = (offset+width) < 8 ? (m68ki_read_8((mc68kcpu), ea) << 24) :
+ (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
+ data = MASK_OUT_ABOVE_32(data<<offset);
+
+ if((offset+width) > 32)
+ data |= (m68ki_read_8((mc68kcpu), ea+4) << offset) >> 8;
+
+ (mc68kcpu)->n_flag = NFLAG_32(data);
+ data >>= (32 - width);
+
+ (mc68kcpu)->not_z_flag = data;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = data;
+
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfextu_32_ix(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 data;
+ UINT32 ea = EA_AY_IX_8(mc68kcpu);
+
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ if(BIT_B(word2))
+ {
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ }
+ width = ((width-1) & 31) + 1;
+
+ data = (offset+width) < 8 ? (m68ki_read_8((mc68kcpu), ea) << 24) :
+ (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
+ data = MASK_OUT_ABOVE_32(data<<offset);
+
+ if((offset+width) > 32)
+ data |= (m68ki_read_8((mc68kcpu), ea+4) << offset) >> 8;
+
+ (mc68kcpu)->n_flag = NFLAG_32(data);
+ data >>= (32 - width);
+
+ (mc68kcpu)->not_z_flag = data;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = data;
+
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfextu_32_aw(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 data;
+ UINT32 ea = EA_AW_8(mc68kcpu);
+
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ if(BIT_B(word2))
+ {
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ }
+ width = ((width-1) & 31) + 1;
+
+ data = (offset+width) < 8 ? (m68ki_read_8((mc68kcpu), ea) << 24) :
+ (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
+ data = MASK_OUT_ABOVE_32(data<<offset);
+
+ if((offset+width) > 32)
+ data |= (m68ki_read_8((mc68kcpu), ea+4) << offset) >> 8;
+
+ (mc68kcpu)->n_flag = NFLAG_32(data);
+ data >>= (32 - width);
+
+ (mc68kcpu)->not_z_flag = data;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = data;
+
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfextu_32_al(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 data;
+ UINT32 ea = EA_AL_8(mc68kcpu);
+
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ if(BIT_B(word2))
+ {
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ }
+ width = ((width-1) & 31) + 1;
+
+ data = (offset+width) < 8 ? (m68ki_read_8((mc68kcpu), ea) << 24) :
+ (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
+ data = MASK_OUT_ABOVE_32(data<<offset);
+
+ if((offset+width) > 32)
+ data |= (m68ki_read_8((mc68kcpu), ea+4) << offset) >> 8;
+
+ (mc68kcpu)->n_flag = NFLAG_32(data);
+ data >>= (32 - width);
+
+ (mc68kcpu)->not_z_flag = data;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = data;
+
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfextu_32_pcdi(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 data;
+ UINT32 ea = EA_PCDI_8(mc68kcpu);
+
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ if(BIT_B(word2))
+ {
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ }
+ width = ((width-1) & 31) + 1;
+
+ data = (offset+width) < 8 ? (m68ki_read_8((mc68kcpu), ea) << 24) :
+ (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
+ data = MASK_OUT_ABOVE_32(data<<offset);
+
+ if((offset+width) > 32)
+ data |= (m68ki_read_8((mc68kcpu), ea+4) << offset) >> 8;
+
+ (mc68kcpu)->n_flag = NFLAG_32(data);
+ data >>= (32 - width);
+
+ (mc68kcpu)->not_z_flag = data;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = data;
+
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfextu_32_pcix(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 data;
+ UINT32 ea = EA_PCIX_8(mc68kcpu);
+
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ if(BIT_B(word2))
+ {
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ }
+ width = ((width-1) & 31) + 1;
+
+ data = (offset+width) < 8 ? (m68ki_read_8((mc68kcpu), ea) << 24) :
+ (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
+ data = MASK_OUT_ABOVE_32(data<<offset);
+
+ if((offset+width) > 32)
+ data |= (m68ki_read_8((mc68kcpu), ea+4) << offset) >> 8;
+
+ (mc68kcpu)->n_flag = NFLAG_32(data);
+ data >>= (32 - width);
+
+ (mc68kcpu)->not_z_flag = data;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = data;
+
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfffo_32_d(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT64 data = DY(mc68kcpu);
+ UINT32 bit;
+
+
+ if(BIT_B(word2))
+ offset = REG_D(mc68kcpu)[offset&7];
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ offset &= 31;
+ width = ((width-1) & 31) + 1;
+
+ data = ROL_32(data, offset);
+ (mc68kcpu)->n_flag = NFLAG_32(data);
+ data >>= 32 - width;
+
+ (mc68kcpu)->not_z_flag = data;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ for(bit = 1<<(width-1);bit && !(data & bit);bit>>= 1)
+ offset++;
+
+ REG_D(mc68kcpu)[(word2>>12)&7] = offset;
+
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfffo_32_ai(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ INT32 local_offset;
+ UINT32 width = word2;
+ UINT32 data;
+ UINT32 bit;
+ UINT32 ea = EA_AY_AI_8(mc68kcpu);
+
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ local_offset = offset % 8;
+ if(local_offset < 0)
+ {
+ local_offset += 8;
+ ea--;
+ }
+ width = ((width-1) & 31) + 1;
+
+ data = (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
+ data = MASK_OUT_ABOVE_32(data<<local_offset);
+
+ if((local_offset+width) > 32)
+ data |= (m68ki_read_8((mc68kcpu), ea+4) << local_offset) >> 8;
+
+ (mc68kcpu)->n_flag = NFLAG_32(data);
+ data >>= (32 - width);
+
+ (mc68kcpu)->not_z_flag = data;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ for(bit = 1<<(width-1);bit && !(data & bit);bit>>= 1)
+ offset++;
+
+ REG_D(mc68kcpu)[(word2>>12)&7] = offset;
+
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfffo_32_di(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ INT32 local_offset;
+ UINT32 width = word2;
+ UINT32 data;
+ UINT32 bit;
+ UINT32 ea = EA_AY_DI_8(mc68kcpu);
+
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ local_offset = offset % 8;
+ if(local_offset < 0)
+ {
+ local_offset += 8;
+ ea--;
+ }
+ width = ((width-1) & 31) + 1;
+
+ data = (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
+ data = MASK_OUT_ABOVE_32(data<<local_offset);
+
+ if((local_offset+width) > 32)
+ data |= (m68ki_read_8((mc68kcpu), ea+4) << local_offset) >> 8;
+
+ (mc68kcpu)->n_flag = NFLAG_32(data);
+ data >>= (32 - width);
+
+ (mc68kcpu)->not_z_flag = data;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ for(bit = 1<<(width-1);bit && !(data & bit);bit>>= 1)
+ offset++;
+
+ REG_D(mc68kcpu)[(word2>>12)&7] = offset;
+
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfffo_32_ix(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ INT32 local_offset;
+ UINT32 width = word2;
+ UINT32 data;
+ UINT32 bit;
+ UINT32 ea = EA_AY_IX_8(mc68kcpu);
+
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ local_offset = offset % 8;
+ if(local_offset < 0)
+ {
+ local_offset += 8;
+ ea--;
+ }
+ width = ((width-1) & 31) + 1;
+
+ data = (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
+ data = MASK_OUT_ABOVE_32(data<<local_offset);
+
+ if((local_offset+width) > 32)
+ data |= (m68ki_read_8((mc68kcpu), ea+4) << local_offset) >> 8;
+
+ (mc68kcpu)->n_flag = NFLAG_32(data);
+ data >>= (32 - width);
+
+ (mc68kcpu)->not_z_flag = data;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ for(bit = 1<<(width-1);bit && !(data & bit);bit>>= 1)
+ offset++;
+
+ REG_D(mc68kcpu)[(word2>>12)&7] = offset;
+
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfffo_32_aw(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ INT32 local_offset;
+ UINT32 width = word2;
+ UINT32 data;
+ UINT32 bit;
+ UINT32 ea = EA_AW_8(mc68kcpu);
+
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ local_offset = offset % 8;
+ if(local_offset < 0)
+ {
+ local_offset += 8;
+ ea--;
+ }
+ width = ((width-1) & 31) + 1;
+
+ data = (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
+ data = MASK_OUT_ABOVE_32(data<<local_offset);
+
+ if((local_offset+width) > 32)
+ data |= (m68ki_read_8((mc68kcpu), ea+4) << local_offset) >> 8;
+
+ (mc68kcpu)->n_flag = NFLAG_32(data);
+ data >>= (32 - width);
+
+ (mc68kcpu)->not_z_flag = data;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ for(bit = 1<<(width-1);bit && !(data & bit);bit>>= 1)
+ offset++;
+
+ REG_D(mc68kcpu)[(word2>>12)&7] = offset;
+
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfffo_32_al(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ INT32 local_offset;
+ UINT32 width = word2;
+ UINT32 data;
+ UINT32 bit;
+ UINT32 ea = EA_AL_8(mc68kcpu);
+
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ local_offset = offset % 8;
+ if(local_offset < 0)
+ {
+ local_offset += 8;
+ ea--;
+ }
+ width = ((width-1) & 31) + 1;
+
+ data = (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
+ data = MASK_OUT_ABOVE_32(data<<local_offset);
+
+ if((local_offset+width) > 32)
+ data |= (m68ki_read_8((mc68kcpu), ea+4) << local_offset) >> 8;
+
+ (mc68kcpu)->n_flag = NFLAG_32(data);
+ data >>= (32 - width);
+
+ (mc68kcpu)->not_z_flag = data;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ for(bit = 1<<(width-1);bit && !(data & bit);bit>>= 1)
+ offset++;
+
+ REG_D(mc68kcpu)[(word2>>12)&7] = offset;
+
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfffo_32_pcdi(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ INT32 local_offset;
+ UINT32 width = word2;
+ UINT32 data;
+ UINT32 bit;
+ UINT32 ea = EA_PCDI_8(mc68kcpu);
+
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ local_offset = offset % 8;
+ if(local_offset < 0)
+ {
+ local_offset += 8;
+ ea--;
+ }
+ width = ((width-1) & 31) + 1;
+
+ data = (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
+ data = MASK_OUT_ABOVE_32(data<<local_offset);
+
+ if((local_offset+width) > 32)
+ data |= (m68ki_read_8((mc68kcpu), ea+4) << local_offset) >> 8;
+
+ (mc68kcpu)->n_flag = NFLAG_32(data);
+ data >>= (32 - width);
+
+ (mc68kcpu)->not_z_flag = data;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ for(bit = 1<<(width-1);bit && !(data & bit);bit>>= 1)
+ offset++;
+
+ REG_D(mc68kcpu)[(word2>>12)&7] = offset;
+
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfffo_32_pcix(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ INT32 local_offset;
+ UINT32 width = word2;
+ UINT32 data;
+ UINT32 bit;
+ UINT32 ea = EA_PCIX_8(mc68kcpu);
+
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ local_offset = offset % 8;
+ if(local_offset < 0)
+ {
+ local_offset += 8;
+ ea--;
+ }
+ width = ((width-1) & 31) + 1;
+
+ data = (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
+ data = MASK_OUT_ABOVE_32(data<<local_offset);
+
+ if((local_offset+width) > 32)
+ data |= (m68ki_read_8((mc68kcpu), ea+4) << local_offset) >> 8;
+
+ (mc68kcpu)->n_flag = NFLAG_32(data);
+ data >>= (32 - width);
+
+ (mc68kcpu)->not_z_flag = data;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ for(bit = 1<<(width-1);bit && !(data & bit);bit>>= 1)
+ offset++;
+
+ REG_D(mc68kcpu)[(word2>>12)&7] = offset;
+
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfins_32_d(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32* data = &DY(mc68kcpu);
+ UINT64 mask;
+ UINT64 insert = REG_D(mc68kcpu)[(word2>>12)&7];
+
+
+ if(BIT_B(word2))
+ offset = REG_D(mc68kcpu)[offset&7];
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+
+ offset &= 31;
+ width = ((width-1) & 31) + 1;
+
+
+ mask = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
+ mask = ROR_32(mask, offset);
+
+ insert = MASK_OUT_ABOVE_32(insert << (32 - width));
+ (mc68kcpu)->n_flag = NFLAG_32(insert);
+ (mc68kcpu)->not_z_flag = insert;
+ insert = ROR_32(insert, offset);
+
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ *data &= ~mask;
+ *data |= insert;
+
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfins_32_ai(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 insert_base = REG_D(mc68kcpu)[(word2>>12)&7];
+ UINT32 insert_long;
+ UINT32 insert_byte;
+ UINT32 mask_base;
+ UINT32 data_long;
+ UINT32 mask_long;
+ UINT32 data_byte = 0;
+ UINT32 mask_byte = 0;
+ UINT32 ea = EA_AY_AI_8(mc68kcpu);
+
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ if(BIT_B(word2))
+ {
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ }
+ width = ((width-1) & 31) + 1;
+
+ mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
+ mask_long = mask_base >> offset;
+
+ insert_base = MASK_OUT_ABOVE_32(insert_base << (32 - width));
+ (mc68kcpu)->n_flag = NFLAG_32(insert_base);
+ (mc68kcpu)->not_z_flag = insert_base;
+ insert_long = insert_base >> offset;
+
+ data_long = (offset+width) < 8 ? (m68ki_read_8((mc68kcpu), ea) << 24) :
+ (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ if((width + offset) < 8)
+ {
+ m68ki_write_8((mc68kcpu), ea, ((data_long & ~mask_long) | insert_long) >> 24);
+ }
+ else if((width + offset) < 16)
+ {
+ m68ki_write_16((mc68kcpu), ea, ((data_long & ~mask_long) | insert_long) >> 16);
+ }
+ else
+ {
+ m68ki_write_32((mc68kcpu), ea, (data_long & ~mask_long) | insert_long);
+ }
+
+ if((width + offset) > 32)
+ {
+ mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
+ insert_byte = MASK_OUT_ABOVE_8(insert_base) << (8-offset);
+ data_byte = m68ki_read_8((mc68kcpu), ea+4);
+ (mc68kcpu)->not_z_flag |= (insert_byte & mask_byte);
+ m68ki_write_8((mc68kcpu), ea+4, (data_byte & ~mask_byte) | insert_byte);
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfins_32_di(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 insert_base = REG_D(mc68kcpu)[(word2>>12)&7];
+ UINT32 insert_long;
+ UINT32 insert_byte;
+ UINT32 mask_base;
+ UINT32 data_long;
+ UINT32 mask_long;
+ UINT32 data_byte = 0;
+ UINT32 mask_byte = 0;
+ UINT32 ea = EA_AY_DI_8(mc68kcpu);
+
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ if(BIT_B(word2))
+ {
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ }
+ width = ((width-1) & 31) + 1;
+
+ mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
+ mask_long = mask_base >> offset;
+
+ insert_base = MASK_OUT_ABOVE_32(insert_base << (32 - width));
+ (mc68kcpu)->n_flag = NFLAG_32(insert_base);
+ (mc68kcpu)->not_z_flag = insert_base;
+ insert_long = insert_base >> offset;
+
+ data_long = (offset+width) < 8 ? (m68ki_read_8((mc68kcpu), ea) << 24) :
+ (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ if((width + offset) < 8)
+ {
+ m68ki_write_8((mc68kcpu), ea, ((data_long & ~mask_long) | insert_long) >> 24);
+ }
+ else if((width + offset) < 16)
+ {
+ m68ki_write_16((mc68kcpu), ea, ((data_long & ~mask_long) | insert_long) >> 16);
+ }
+ else
+ {
+ m68ki_write_32((mc68kcpu), ea, (data_long & ~mask_long) | insert_long);
+ }
+
+ if((width + offset) > 32)
+ {
+ mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
+ insert_byte = MASK_OUT_ABOVE_8(insert_base) << (8-offset);
+ data_byte = m68ki_read_8((mc68kcpu), ea+4);
+ (mc68kcpu)->not_z_flag |= (insert_byte & mask_byte);
+ m68ki_write_8((mc68kcpu), ea+4, (data_byte & ~mask_byte) | insert_byte);
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfins_32_ix(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 insert_base = REG_D(mc68kcpu)[(word2>>12)&7];
+ UINT32 insert_long;
+ UINT32 insert_byte;
+ UINT32 mask_base;
+ UINT32 data_long;
+ UINT32 mask_long;
+ UINT32 data_byte = 0;
+ UINT32 mask_byte = 0;
+ UINT32 ea = EA_AY_IX_8(mc68kcpu);
+
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ if(BIT_B(word2))
+ {
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ }
+ width = ((width-1) & 31) + 1;
+
+ mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
+ mask_long = mask_base >> offset;
+
+ insert_base = MASK_OUT_ABOVE_32(insert_base << (32 - width));
+ (mc68kcpu)->n_flag = NFLAG_32(insert_base);
+ (mc68kcpu)->not_z_flag = insert_base;
+ insert_long = insert_base >> offset;
+
+ data_long = (offset+width) < 8 ? (m68ki_read_8((mc68kcpu), ea) << 24) :
+ (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ if((width + offset) < 8)
+ {
+ m68ki_write_8((mc68kcpu), ea, ((data_long & ~mask_long) | insert_long) >> 24);
+ }
+ else if((width + offset) < 16)
+ {
+ m68ki_write_16((mc68kcpu), ea, ((data_long & ~mask_long) | insert_long) >> 16);
+ }
+ else
+ {
+ m68ki_write_32((mc68kcpu), ea, (data_long & ~mask_long) | insert_long);
+ }
+
+ if((width + offset) > 32)
+ {
+ mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
+ insert_byte = MASK_OUT_ABOVE_8(insert_base) << (8-offset);
+ data_byte = m68ki_read_8((mc68kcpu), ea+4);
+ (mc68kcpu)->not_z_flag |= (insert_byte & mask_byte);
+ m68ki_write_8((mc68kcpu), ea+4, (data_byte & ~mask_byte) | insert_byte);
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfins_32_aw(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 insert_base = REG_D(mc68kcpu)[(word2>>12)&7];
+ UINT32 insert_long;
+ UINT32 insert_byte;
+ UINT32 mask_base;
+ UINT32 data_long;
+ UINT32 mask_long;
+ UINT32 data_byte = 0;
+ UINT32 mask_byte = 0;
+ UINT32 ea = EA_AW_8(mc68kcpu);
+
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ if(BIT_B(word2))
+ {
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ }
+ width = ((width-1) & 31) + 1;
+
+ mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
+ mask_long = mask_base >> offset;
+
+ insert_base = MASK_OUT_ABOVE_32(insert_base << (32 - width));
+ (mc68kcpu)->n_flag = NFLAG_32(insert_base);
+ (mc68kcpu)->not_z_flag = insert_base;
+ insert_long = insert_base >> offset;
+
+ data_long = (offset+width) < 8 ? (m68ki_read_8((mc68kcpu), ea) << 24) :
+ (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ if((width + offset) < 8)
+ {
+ m68ki_write_8((mc68kcpu), ea, ((data_long & ~mask_long) | insert_long) >> 24);
+ }
+ else if((width + offset) < 16)
+ {
+ m68ki_write_16((mc68kcpu), ea, ((data_long & ~mask_long) | insert_long) >> 16);
+ }
+ else
+ {
+ m68ki_write_32((mc68kcpu), ea, (data_long & ~mask_long) | insert_long);
+ }
+
+ if((width + offset) > 32)
+ {
+ mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
+ insert_byte = MASK_OUT_ABOVE_8(insert_base) << (8-offset);
+ data_byte = m68ki_read_8((mc68kcpu), ea+4);
+ (mc68kcpu)->not_z_flag |= (insert_byte & mask_byte);
+ m68ki_write_8((mc68kcpu), ea+4, (data_byte & ~mask_byte) | insert_byte);
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfins_32_al(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 insert_base = REG_D(mc68kcpu)[(word2>>12)&7];
+ UINT32 insert_long;
+ UINT32 insert_byte;
+ UINT32 mask_base;
+ UINT32 data_long;
+ UINT32 mask_long;
+ UINT32 data_byte = 0;
+ UINT32 mask_byte = 0;
+ UINT32 ea = EA_AL_8(mc68kcpu);
+
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ if(BIT_B(word2))
+ {
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ }
+ width = ((width-1) & 31) + 1;
+
+ mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
+ mask_long = mask_base >> offset;
+
+ insert_base = MASK_OUT_ABOVE_32(insert_base << (32 - width));
+ (mc68kcpu)->n_flag = NFLAG_32(insert_base);
+ (mc68kcpu)->not_z_flag = insert_base;
+ insert_long = insert_base >> offset;
+
+ data_long = (offset+width) < 8 ? (m68ki_read_8((mc68kcpu), ea) << 24) :
+ (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ if((width + offset) < 8)
+ {
+ m68ki_write_8((mc68kcpu), ea, ((data_long & ~mask_long) | insert_long) >> 24);
+ }
+ else if((width + offset) < 16)
+ {
+ m68ki_write_16((mc68kcpu), ea, ((data_long & ~mask_long) | insert_long) >> 16);
+ }
+ else
+ {
+ m68ki_write_32((mc68kcpu), ea, (data_long & ~mask_long) | insert_long);
+ }
+
+ if((width + offset) > 32)
+ {
+ mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
+ insert_byte = MASK_OUT_ABOVE_8(insert_base) << (8-offset);
+ data_byte = m68ki_read_8((mc68kcpu), ea+4);
+ (mc68kcpu)->not_z_flag |= (insert_byte & mask_byte);
+ m68ki_write_8((mc68kcpu), ea+4, (data_byte & ~mask_byte) | insert_byte);
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfset_32_d(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32* data = &DY(mc68kcpu);
+ UINT64 mask;
+
+
+ if(BIT_B(word2))
+ offset = REG_D(mc68kcpu)[offset&7];
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+
+ offset &= 31;
+ width = ((width-1) & 31) + 1;
+
+
+ mask = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
+ mask = ROR_32(mask, offset);
+
+ (mc68kcpu)->n_flag = NFLAG_32(*data<<offset);
+ (mc68kcpu)->not_z_flag = *data & mask;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ *data |= mask;
+
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfset_32_ai(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 mask_base;
+ UINT32 data_long;
+ UINT32 mask_long;
+ UINT32 data_byte = 0;
+ UINT32 mask_byte = 0;
+ UINT32 ea = EA_AY_AI_8(mc68kcpu);
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ width = ((width-1) & 31) + 1;
+
+ mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
+ mask_long = mask_base >> offset;
+
+ data_long = m68ki_read_32((mc68kcpu), ea);
+ (mc68kcpu)->n_flag = NFLAG_32(data_long << offset);
+ (mc68kcpu)->not_z_flag = data_long & mask_long;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ m68ki_write_32((mc68kcpu), ea, data_long | mask_long);
+
+ if((width + offset) > 32)
+ {
+ mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
+ data_byte = m68ki_read_8((mc68kcpu), ea+4);
+ (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
+ m68ki_write_8((mc68kcpu), ea+4, data_byte | mask_byte);
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfset_32_di(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 mask_base;
+ UINT32 data_long;
+ UINT32 mask_long;
+ UINT32 data_byte = 0;
+ UINT32 mask_byte = 0;
+ UINT32 ea = EA_AY_DI_8(mc68kcpu);
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ width = ((width-1) & 31) + 1;
+
+ mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
+ mask_long = mask_base >> offset;
+
+ data_long = m68ki_read_32((mc68kcpu), ea);
+ (mc68kcpu)->n_flag = NFLAG_32(data_long << offset);
+ (mc68kcpu)->not_z_flag = data_long & mask_long;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ m68ki_write_32((mc68kcpu), ea, data_long | mask_long);
+
+ if((width + offset) > 32)
+ {
+ mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
+ data_byte = m68ki_read_8((mc68kcpu), ea+4);
+ (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
+ m68ki_write_8((mc68kcpu), ea+4, data_byte | mask_byte);
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfset_32_ix(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 mask_base;
+ UINT32 data_long;
+ UINT32 mask_long;
+ UINT32 data_byte = 0;
+ UINT32 mask_byte = 0;
+ UINT32 ea = EA_AY_IX_8(mc68kcpu);
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ width = ((width-1) & 31) + 1;
+
+ mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
+ mask_long = mask_base >> offset;
+
+ data_long = m68ki_read_32((mc68kcpu), ea);
+ (mc68kcpu)->n_flag = NFLAG_32(data_long << offset);
+ (mc68kcpu)->not_z_flag = data_long & mask_long;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ m68ki_write_32((mc68kcpu), ea, data_long | mask_long);
+
+ if((width + offset) > 32)
+ {
+ mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
+ data_byte = m68ki_read_8((mc68kcpu), ea+4);
+ (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
+ m68ki_write_8((mc68kcpu), ea+4, data_byte | mask_byte);
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfset_32_aw(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 mask_base;
+ UINT32 data_long;
+ UINT32 mask_long;
+ UINT32 data_byte = 0;
+ UINT32 mask_byte = 0;
+ UINT32 ea = EA_AW_8(mc68kcpu);
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ width = ((width-1) & 31) + 1;
+
+ mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
+ mask_long = mask_base >> offset;
+
+ data_long = m68ki_read_32((mc68kcpu), ea);
+ (mc68kcpu)->n_flag = NFLAG_32(data_long << offset);
+ (mc68kcpu)->not_z_flag = data_long & mask_long;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ m68ki_write_32((mc68kcpu), ea, data_long | mask_long);
+
+ if((width + offset) > 32)
+ {
+ mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
+ data_byte = m68ki_read_8((mc68kcpu), ea+4);
+ (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
+ m68ki_write_8((mc68kcpu), ea+4, data_byte | mask_byte);
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bfset_32_al(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 mask_base;
+ UINT32 data_long;
+ UINT32 mask_long;
+ UINT32 data_byte = 0;
+ UINT32 mask_byte = 0;
+ UINT32 ea = EA_AL_8(mc68kcpu);
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ width = ((width-1) & 31) + 1;
+
+ mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
+ mask_long = mask_base >> offset;
+
+ data_long = m68ki_read_32((mc68kcpu), ea);
+ (mc68kcpu)->n_flag = NFLAG_32(data_long << offset);
+ (mc68kcpu)->not_z_flag = data_long & mask_long;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ m68ki_write_32((mc68kcpu), ea, data_long | mask_long);
+
+ if((width + offset) > 32)
+ {
+ mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
+ data_byte = m68ki_read_8((mc68kcpu), ea+4);
+ (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
+ m68ki_write_8((mc68kcpu), ea+4, data_byte | mask_byte);
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bftst_32_d(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32* data = &DY(mc68kcpu);
+ UINT64 mask;
+
+
+ if(BIT_B(word2))
+ offset = REG_D(mc68kcpu)[offset&7];
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+
+ offset &= 31;
+ width = ((width-1) & 31) + 1;
+
+
+ mask = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
+ mask = ROR_32(mask, offset);
+
+ (mc68kcpu)->n_flag = NFLAG_32(*data<<offset);
+ (mc68kcpu)->not_z_flag = *data & mask;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bftst_32_ai(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 mask_base;
+ UINT32 data_long;
+ UINT32 mask_long;
+ UINT32 data_byte = 0;
+ UINT32 mask_byte = 0;
+ UINT32 ea = EA_AY_AI_8(mc68kcpu);
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ width = ((width-1) & 31) + 1;
+
+
+ mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
+ mask_long = mask_base >> offset;
+
+ data_long = m68ki_read_32((mc68kcpu), ea);
+ (mc68kcpu)->n_flag = ((data_long & (0x80000000 >> offset))<<offset)>>24;
+ (mc68kcpu)->not_z_flag = data_long & mask_long;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ if((width + offset) > 32)
+ {
+ mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
+ data_byte = m68ki_read_8((mc68kcpu), ea+4);
+ (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bftst_32_di(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 mask_base;
+ UINT32 data_long;
+ UINT32 mask_long;
+ UINT32 data_byte = 0;
+ UINT32 mask_byte = 0;
+ UINT32 ea = EA_AY_DI_8(mc68kcpu);
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ width = ((width-1) & 31) + 1;
+
+
+ mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
+ mask_long = mask_base >> offset;
+
+ data_long = m68ki_read_32((mc68kcpu), ea);
+ (mc68kcpu)->n_flag = ((data_long & (0x80000000 >> offset))<<offset)>>24;
+ (mc68kcpu)->not_z_flag = data_long & mask_long;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ if((width + offset) > 32)
+ {
+ mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
+ data_byte = m68ki_read_8((mc68kcpu), ea+4);
+ (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bftst_32_ix(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 mask_base;
+ UINT32 data_long;
+ UINT32 mask_long;
+ UINT32 data_byte = 0;
+ UINT32 mask_byte = 0;
+ UINT32 ea = EA_AY_IX_8(mc68kcpu);
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ width = ((width-1) & 31) + 1;
+
+
+ mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
+ mask_long = mask_base >> offset;
+
+ data_long = m68ki_read_32((mc68kcpu), ea);
+ (mc68kcpu)->n_flag = ((data_long & (0x80000000 >> offset))<<offset)>>24;
+ (mc68kcpu)->not_z_flag = data_long & mask_long;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ if((width + offset) > 32)
+ {
+ mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
+ data_byte = m68ki_read_8((mc68kcpu), ea+4);
+ (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bftst_32_aw(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 mask_base;
+ UINT32 data_long;
+ UINT32 mask_long;
+ UINT32 data_byte = 0;
+ UINT32 mask_byte = 0;
+ UINT32 ea = EA_AW_8(mc68kcpu);
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ width = ((width-1) & 31) + 1;
+
+
+ mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
+ mask_long = mask_base >> offset;
+
+ data_long = m68ki_read_32((mc68kcpu), ea);
+ (mc68kcpu)->n_flag = ((data_long & (0x80000000 >> offset))<<offset)>>24;
+ (mc68kcpu)->not_z_flag = data_long & mask_long;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ if((width + offset) > 32)
+ {
+ mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
+ data_byte = m68ki_read_8((mc68kcpu), ea+4);
+ (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bftst_32_al(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 mask_base;
+ UINT32 data_long;
+ UINT32 mask_long;
+ UINT32 data_byte = 0;
+ UINT32 mask_byte = 0;
+ UINT32 ea = EA_AL_8(mc68kcpu);
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ width = ((width-1) & 31) + 1;
+
+
+ mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
+ mask_long = mask_base >> offset;
+
+ data_long = m68ki_read_32((mc68kcpu), ea);
+ (mc68kcpu)->n_flag = ((data_long & (0x80000000 >> offset))<<offset)>>24;
+ (mc68kcpu)->not_z_flag = data_long & mask_long;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ if((width + offset) > 32)
+ {
+ mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
+ data_byte = m68ki_read_8((mc68kcpu), ea+4);
+ (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bftst_32_pcdi(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 mask_base;
+ UINT32 data_long;
+ UINT32 mask_long;
+ UINT32 data_byte = 0;
+ UINT32 mask_byte = 0;
+ UINT32 ea = EA_PCDI_8(mc68kcpu);
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ width = ((width-1) & 31) + 1;
+
+
+ mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
+ mask_long = mask_base >> offset;
+
+ data_long = m68ki_read_32((mc68kcpu), ea);
+ (mc68kcpu)->n_flag = ((data_long & (0x80000000 >> offset))<<offset)>>24;
+ (mc68kcpu)->not_z_flag = data_long & mask_long;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ if((width + offset) > 32)
+ {
+ mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
+ data_byte = m68ki_read_8((mc68kcpu), ea+4);
+ (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bftst_32_pcix(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ INT32 offset = (word2>>6)&31;
+ UINT32 width = word2;
+ UINT32 mask_base;
+ UINT32 data_long;
+ UINT32 mask_long;
+ UINT32 data_byte = 0;
+ UINT32 mask_byte = 0;
+ UINT32 ea = EA_PCIX_8(mc68kcpu);
+
+ if(BIT_B(word2))
+ offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
+ if(BIT_5(word2))
+ width = REG_D(mc68kcpu)[width&7];
+
+ /* Offset is signed so we have to use ugly math =( */
+ ea += offset / 8;
+ offset %= 8;
+ if(offset < 0)
+ {
+ offset += 8;
+ ea--;
+ }
+ width = ((width-1) & 31) + 1;
+
+
+ mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
+ mask_long = mask_base >> offset;
+
+ data_long = m68ki_read_32((mc68kcpu), ea);
+ (mc68kcpu)->n_flag = ((data_long & (0x80000000 >> offset))<<offset)>>24;
+ (mc68kcpu)->not_z_flag = data_long & mask_long;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ if((width + offset) > 32)
+ {
+ mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
+ data_byte = m68ki_read_8((mc68kcpu), ea+4);
+ (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bkpt(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
+ {
+ if (!(mc68kcpu)->bkpt_ack_callback.isnull())
+ ((mc68kcpu)->bkpt_ack_callback)((*mc68kcpu->program), 0, CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type) ? (mc68kcpu)->ir & 7 : 0, 0xffffffff);
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_bra_8(m68000_base_device* mc68kcpu)
+{
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
+ if(REG_PC(mc68kcpu) == REG_PPC(mc68kcpu) && (mc68kcpu)->remaining_cycles > 0)
+ (mc68kcpu)->remaining_cycles = 0;
+}
+
+
+void m68000_base_device_ops::m68k_op_bra_16(m68000_base_device* mc68kcpu)
+{
+ UINT32 offset = OPER_I_16(mc68kcpu);
+ REG_PC(mc68kcpu) -= 2;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_16((mc68kcpu), offset);
+ if(REG_PC(mc68kcpu) == REG_PPC(mc68kcpu) && (mc68kcpu)->remaining_cycles > 0)
+ (mc68kcpu)->remaining_cycles = 0;
+}
+
+
+void m68000_base_device_ops::m68k_op_bra_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 offset = OPER_I_32(mc68kcpu);
+ REG_PC(mc68kcpu) -= 4;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_32((mc68kcpu), offset);
+ if(REG_PC(mc68kcpu) == REG_PPC(mc68kcpu) && (mc68kcpu)->remaining_cycles > 0)
+ (mc68kcpu)->remaining_cycles = 0;
+ return;
+ }
+ else
+ {
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
+ if(REG_PC(mc68kcpu) == REG_PPC(mc68kcpu) && (mc68kcpu)->remaining_cycles > 0)
+ (mc68kcpu)->remaining_cycles = 0;
+ }
+}
+
+
+void m68000_base_device_ops::m68k_op_bset_32_r_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 mask = 1 << (DX(mc68kcpu) & 0x1f);
+
+ (mc68kcpu)->not_z_flag = *r_dst & mask;
+ *r_dst |= mask;
+}
+
+
+void m68000_base_device_ops::m68k_op_bset_8_r_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 mask = 1 << (DX(mc68kcpu) & 7);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src | mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bset_8_r_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 mask = 1 << (DX(mc68kcpu) & 7);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src | mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bset_8_r_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_A7_PI_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 mask = 1 << (DX(mc68kcpu) & 7);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src | mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bset_8_r_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 mask = 1 << (DX(mc68kcpu) & 7);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src | mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bset_8_r_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 mask = 1 << (DX(mc68kcpu) & 7);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src | mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bset_8_r_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 mask = 1 << (DX(mc68kcpu) & 7);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src | mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bset_8_r_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 mask = 1 << (DX(mc68kcpu) & 7);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src | mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bset_8_r_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 mask = 1 << (DX(mc68kcpu) & 7);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src | mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bset_8_r_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 mask = 1 << (DX(mc68kcpu) & 7);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src | mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bset_32_s_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 mask = 1 << (OPER_I_8(mc68kcpu) & 0x1f);
+
+ (mc68kcpu)->not_z_flag = *r_dst & mask;
+ *r_dst |= mask;
+}
+
+
+void m68000_base_device_ops::m68k_op_bset_8_s_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 mask = 1 << (OPER_I_8(mc68kcpu) & 7);
+ UINT32 ea = EA_AY_AI_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src | mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bset_8_s_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 mask = 1 << (OPER_I_8(mc68kcpu) & 7);
+ UINT32 ea = EA_AY_PI_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src | mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bset_8_s_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32 mask = 1 << (OPER_I_8(mc68kcpu) & 7);
+ UINT32 ea = EA_A7_PI_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src | mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bset_8_s_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 mask = 1 << (OPER_I_8(mc68kcpu) & 7);
+ UINT32 ea = EA_AY_PD_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src | mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bset_8_s_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32 mask = 1 << (OPER_I_8(mc68kcpu) & 7);
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src | mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bset_8_s_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 mask = 1 << (OPER_I_8(mc68kcpu) & 7);
+ UINT32 ea = EA_AY_DI_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src | mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bset_8_s_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 mask = 1 << (OPER_I_8(mc68kcpu) & 7);
+ UINT32 ea = EA_AY_IX_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src | mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bset_8_s_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 mask = 1 << (OPER_I_8(mc68kcpu) & 7);
+ UINT32 ea = EA_AW_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src | mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bset_8_s_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 mask = 1 << (OPER_I_8(mc68kcpu) & 7);
+ UINT32 ea = EA_AL_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->not_z_flag = src & mask;
+ m68ki_write_8((mc68kcpu), ea, src | mask);
+}
+
+
+void m68000_base_device_ops::m68k_op_bsr_8(m68000_base_device* mc68kcpu)
+{
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_push_32((mc68kcpu), REG_PC(mc68kcpu));
+ m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
+}
+
+
+void m68000_base_device_ops::m68k_op_bsr_16(m68000_base_device* mc68kcpu)
+{
+ UINT32 offset = OPER_I_16(mc68kcpu);
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_push_32((mc68kcpu), REG_PC(mc68kcpu));
+ REG_PC(mc68kcpu) -= 2;
+ m68ki_branch_16((mc68kcpu), offset);
+}
+
+
+void m68000_base_device_ops::m68k_op_bsr_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 offset = OPER_I_32(mc68kcpu);
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_push_32((mc68kcpu), REG_PC(mc68kcpu));
+ REG_PC(mc68kcpu) -= 4;
+ m68ki_branch_32((mc68kcpu), offset);
+ return;
+ }
+ else
+ {
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_push_32((mc68kcpu), REG_PC(mc68kcpu));
+ m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
+ }
+}
+
+
+void m68000_base_device_ops::m68k_op_btst_32_r_d(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = DY(mc68kcpu) & (1 << (DX(mc68kcpu) & 0x1f));
+}
+
+
+void m68000_base_device_ops::m68k_op_btst_8_r_ai(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = OPER_AY_AI_8(mc68kcpu) & (1 << (DX(mc68kcpu) & 7));
+}
+
+
+void m68000_base_device_ops::m68k_op_btst_8_r_pi(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = OPER_AY_PI_8(mc68kcpu) & (1 << (DX(mc68kcpu) & 7));
+}
+
+
+void m68000_base_device_ops::m68k_op_btst_8_r_pi7(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = OPER_A7_PI_8(mc68kcpu) & (1 << (DX(mc68kcpu) & 7));
+}
+
+
+void m68000_base_device_ops::m68k_op_btst_8_r_pd(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = OPER_AY_PD_8(mc68kcpu) & (1 << (DX(mc68kcpu) & 7));
+}
+
+
+void m68000_base_device_ops::m68k_op_btst_8_r_pd7(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = OPER_A7_PD_8(mc68kcpu) & (1 << (DX(mc68kcpu) & 7));
+}
+
+
+void m68000_base_device_ops::m68k_op_btst_8_r_di(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = OPER_AY_DI_8(mc68kcpu) & (1 << (DX(mc68kcpu) & 7));
+}
+
+
+void m68000_base_device_ops::m68k_op_btst_8_r_ix(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = OPER_AY_IX_8(mc68kcpu) & (1 << (DX(mc68kcpu) & 7));
+}
+
+
+void m68000_base_device_ops::m68k_op_btst_8_r_aw(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = OPER_AW_8(mc68kcpu) & (1 << (DX(mc68kcpu) & 7));
+}
+
+
+void m68000_base_device_ops::m68k_op_btst_8_r_al(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = OPER_AL_8(mc68kcpu) & (1 << (DX(mc68kcpu) & 7));
+}
+
+
+void m68000_base_device_ops::m68k_op_btst_8_r_pcdi(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = OPER_PCDI_8(mc68kcpu) & (1 << (DX(mc68kcpu) & 7));
+}
+
+
+void m68000_base_device_ops::m68k_op_btst_8_r_pcix(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = OPER_PCIX_8(mc68kcpu) & (1 << (DX(mc68kcpu) & 7));
+}
+
+
+void m68000_base_device_ops::m68k_op_btst_8_r_i(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = OPER_I_8(mc68kcpu) & (1 << (DX(mc68kcpu) & 7));
+}
+
+
+void m68000_base_device_ops::m68k_op_btst_32_s_d(m68000_base_device* mc68kcpu)
+{
+ (mc68kcpu)->not_z_flag = DY(mc68kcpu) & (1 << (OPER_I_8(mc68kcpu) & 0x1f));
+}
+
+
+void m68000_base_device_ops::m68k_op_btst_8_s_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 bit = OPER_I_8(mc68kcpu) & 7;
+
+ (mc68kcpu)->not_z_flag = OPER_AY_AI_8(mc68kcpu) & (1 << bit);
+}
+
+
+void m68000_base_device_ops::m68k_op_btst_8_s_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 bit = OPER_I_8(mc68kcpu) & 7;
+
+ (mc68kcpu)->not_z_flag = OPER_AY_PI_8(mc68kcpu) & (1 << bit);
+}
+
+
+void m68000_base_device_ops::m68k_op_btst_8_s_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32 bit = OPER_I_8(mc68kcpu) & 7;
+
+ (mc68kcpu)->not_z_flag = OPER_A7_PI_8(mc68kcpu) & (1 << bit);
+}
+
+
+void m68000_base_device_ops::m68k_op_btst_8_s_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 bit = OPER_I_8(mc68kcpu) & 7;
+
+ (mc68kcpu)->not_z_flag = OPER_AY_PD_8(mc68kcpu) & (1 << bit);
+}
+
+
+void m68000_base_device_ops::m68k_op_btst_8_s_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32 bit = OPER_I_8(mc68kcpu) & 7;
+
+ (mc68kcpu)->not_z_flag = OPER_A7_PD_8(mc68kcpu) & (1 << bit);
+}
+
+
+void m68000_base_device_ops::m68k_op_btst_8_s_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 bit = OPER_I_8(mc68kcpu) & 7;
+
+ (mc68kcpu)->not_z_flag = OPER_AY_DI_8(mc68kcpu) & (1 << bit);
+}
+
+
+void m68000_base_device_ops::m68k_op_btst_8_s_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 bit = OPER_I_8(mc68kcpu) & 7;
+
+ (mc68kcpu)->not_z_flag = OPER_AY_IX_8(mc68kcpu) & (1 << bit);
+}
+
+
+void m68000_base_device_ops::m68k_op_btst_8_s_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 bit = OPER_I_8(mc68kcpu) & 7;
+
+ (mc68kcpu)->not_z_flag = OPER_AW_8(mc68kcpu) & (1 << bit);
+}
+
+
+void m68000_base_device_ops::m68k_op_btst_8_s_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 bit = OPER_I_8(mc68kcpu) & 7;
+
+ (mc68kcpu)->not_z_flag = OPER_AL_8(mc68kcpu) & (1 << bit);
+}
+
+
+void m68000_base_device_ops::m68k_op_btst_8_s_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32 bit = OPER_I_8(mc68kcpu) & 7;
+
+ (mc68kcpu)->not_z_flag = OPER_PCDI_8(mc68kcpu) & (1 << bit);
+}
+
+
+void m68000_base_device_ops::m68k_op_btst_8_s_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32 bit = OPER_I_8(mc68kcpu) & 7;
+
+ (mc68kcpu)->not_z_flag = OPER_PCIX_8(mc68kcpu) & (1 << bit);
+}
+
+
+void m68000_base_device_ops::m68k_op_callm_32_ai(m68000_base_device* mc68kcpu)
+{
+ /* note: watch out for pcrelative modes */
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ {
+ UINT32 ea = EA_AY_AI_32(mc68kcpu);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ REG_PC(mc68kcpu) += 2;
+(void)ea; /* just to avoid an 'unused variable' warning */
+ mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (callm)\n",
+ (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_callm_32_di(m68000_base_device* mc68kcpu)
+{
+ /* note: watch out for pcrelative modes */
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ {
+ UINT32 ea = EA_AY_DI_32(mc68kcpu);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ REG_PC(mc68kcpu) += 2;
+(void)ea; /* just to avoid an 'unused variable' warning */
+ mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (callm)\n",
+ (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_callm_32_ix(m68000_base_device* mc68kcpu)
+{
+ /* note: watch out for pcrelative modes */
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ {
+ UINT32 ea = EA_AY_IX_32(mc68kcpu);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ REG_PC(mc68kcpu) += 2;
+(void)ea; /* just to avoid an 'unused variable' warning */
+ mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (callm)\n",
+ (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_callm_32_aw(m68000_base_device* mc68kcpu)
+{
+ /* note: watch out for pcrelative modes */
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ {
+ UINT32 ea = EA_AW_32(mc68kcpu);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ REG_PC(mc68kcpu) += 2;
+(void)ea; /* just to avoid an 'unused variable' warning */
+ mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (callm)\n",
+ (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_callm_32_al(m68000_base_device* mc68kcpu)
+{
+ /* note: watch out for pcrelative modes */
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ {
+ UINT32 ea = EA_AL_32(mc68kcpu);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ REG_PC(mc68kcpu) += 2;
+(void)ea; /* just to avoid an 'unused variable' warning */
+ mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (callm)\n",
+ (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_callm_32_pcdi(m68000_base_device* mc68kcpu)
+{
+ /* note: watch out for pcrelative modes */
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ {
+ UINT32 ea = EA_PCDI_32(mc68kcpu);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ REG_PC(mc68kcpu) += 2;
+(void)ea; /* just to avoid an 'unused variable' warning */
+ mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (callm)\n",
+ (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_callm_32_pcix(m68000_base_device* mc68kcpu)
+{
+ /* note: watch out for pcrelative modes */
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ {
+ UINT32 ea = EA_PCIX_32(mc68kcpu);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ REG_PC(mc68kcpu) += 2;
+(void)ea; /* just to avoid an 'unused variable' warning */
+ mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (callm)\n",
+ (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_cas_8_ai(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_AI_8(mc68kcpu);
+ UINT32 dest = m68ki_read_8((mc68kcpu), ea);
+ UINT32* compare = &REG_D(mc68kcpu)[word2 & 7];
+ UINT32 res = dest - MASK_OUT_ABOVE_8(*compare);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(*compare, dest, res);
+ (mc68kcpu)->c_flag = CFLAG_8(res);
+
+ if(COND_NE(mc68kcpu))
+ *compare = MASK_OUT_BELOW_8(*compare) | dest;
+ else
+ {
+ (mc68kcpu)->remaining_cycles -= 3;
+ m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(REG_D(mc68kcpu)[(word2 >> 6) & 7]));
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_cas_8_pi(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_PI_8(mc68kcpu);
+ UINT32 dest = m68ki_read_8((mc68kcpu), ea);
+ UINT32* compare = &REG_D(mc68kcpu)[word2 & 7];
+ UINT32 res = dest - MASK_OUT_ABOVE_8(*compare);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(*compare, dest, res);
+ (mc68kcpu)->c_flag = CFLAG_8(res);
+
+ if(COND_NE(mc68kcpu))
+ *compare = MASK_OUT_BELOW_8(*compare) | dest;
+ else
+ {
+ (mc68kcpu)->remaining_cycles -= 3;
+ m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(REG_D(mc68kcpu)[(word2 >> 6) & 7]));
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_cas_8_pi7(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_A7_PI_8(mc68kcpu);
+ UINT32 dest = m68ki_read_8((mc68kcpu), ea);
+ UINT32* compare = &REG_D(mc68kcpu)[word2 & 7];
+ UINT32 res = dest - MASK_OUT_ABOVE_8(*compare);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(*compare, dest, res);
+ (mc68kcpu)->c_flag = CFLAG_8(res);
+
+ if(COND_NE(mc68kcpu))
+ *compare = MASK_OUT_BELOW_8(*compare) | dest;
+ else
+ {
+ (mc68kcpu)->remaining_cycles -= 3;
+ m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(REG_D(mc68kcpu)[(word2 >> 6) & 7]));
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_cas_8_pd(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_PD_8(mc68kcpu);
+ UINT32 dest = m68ki_read_8((mc68kcpu), ea);
+ UINT32* compare = &REG_D(mc68kcpu)[word2 & 7];
+ UINT32 res = dest - MASK_OUT_ABOVE_8(*compare);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(*compare, dest, res);
+ (mc68kcpu)->c_flag = CFLAG_8(res);
+
+ if(COND_NE(mc68kcpu))
+ *compare = MASK_OUT_BELOW_8(*compare) | dest;
+ else
+ {
+ (mc68kcpu)->remaining_cycles -= 3;
+ m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(REG_D(mc68kcpu)[(word2 >> 6) & 7]));
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_cas_8_pd7(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+ UINT32 dest = m68ki_read_8((mc68kcpu), ea);
+ UINT32* compare = &REG_D(mc68kcpu)[word2 & 7];
+ UINT32 res = dest - MASK_OUT_ABOVE_8(*compare);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(*compare, dest, res);
+ (mc68kcpu)->c_flag = CFLAG_8(res);
+
+ if(COND_NE(mc68kcpu))
+ *compare = MASK_OUT_BELOW_8(*compare) | dest;
+ else
+ {
+ (mc68kcpu)->remaining_cycles -= 3;
+ m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(REG_D(mc68kcpu)[(word2 >> 6) & 7]));
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_cas_8_di(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_DI_8(mc68kcpu);
+ UINT32 dest = m68ki_read_8((mc68kcpu), ea);
+ UINT32* compare = &REG_D(mc68kcpu)[word2 & 7];
+ UINT32 res = dest - MASK_OUT_ABOVE_8(*compare);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(*compare, dest, res);
+ (mc68kcpu)->c_flag = CFLAG_8(res);
+
+ if(COND_NE(mc68kcpu))
+ *compare = MASK_OUT_BELOW_8(*compare) | dest;
+ else
+ {
+ (mc68kcpu)->remaining_cycles -= 3;
+ m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(REG_D(mc68kcpu)[(word2 >> 6) & 7]));
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_cas_8_ix(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_IX_8(mc68kcpu);
+ UINT32 dest = m68ki_read_8((mc68kcpu), ea);
+ UINT32* compare = &REG_D(mc68kcpu)[word2 & 7];
+ UINT32 res = dest - MASK_OUT_ABOVE_8(*compare);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(*compare, dest, res);
+ (mc68kcpu)->c_flag = CFLAG_8(res);
+
+ if(COND_NE(mc68kcpu))
+ *compare = MASK_OUT_BELOW_8(*compare) | dest;
+ else
+ {
+ (mc68kcpu)->remaining_cycles -= 3;
+ m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(REG_D(mc68kcpu)[(word2 >> 6) & 7]));
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_cas_8_aw(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AW_8(mc68kcpu);
+ UINT32 dest = m68ki_read_8((mc68kcpu), ea);
+ UINT32* compare = &REG_D(mc68kcpu)[word2 & 7];
+ UINT32 res = dest - MASK_OUT_ABOVE_8(*compare);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(*compare, dest, res);
+ (mc68kcpu)->c_flag = CFLAG_8(res);
+
+ if(COND_NE(mc68kcpu))
+ *compare = MASK_OUT_BELOW_8(*compare) | dest;
+ else
+ {
+ (mc68kcpu)->remaining_cycles -= 3;
+ m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(REG_D(mc68kcpu)[(word2 >> 6) & 7]));
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_cas_8_al(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AL_8(mc68kcpu);
+ UINT32 dest = m68ki_read_8((mc68kcpu), ea);
+ UINT32* compare = &REG_D(mc68kcpu)[word2 & 7];
+ UINT32 res = dest - MASK_OUT_ABOVE_8(*compare);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(*compare, dest, res);
+ (mc68kcpu)->c_flag = CFLAG_8(res);
+
+ if(COND_NE(mc68kcpu))
+ *compare = MASK_OUT_BELOW_8(*compare) | dest;
+ else
+ {
+ (mc68kcpu)->remaining_cycles -= 3;
+ m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(REG_D(mc68kcpu)[(word2 >> 6) & 7]));
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_cas_16_ai(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_AI_16(mc68kcpu);
+ UINT32 dest = m68ki_read_16((mc68kcpu), ea);
+ UINT32* compare = &REG_D(mc68kcpu)[word2 & 7];
+ UINT32 res = dest - MASK_OUT_ABOVE_16(*compare);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(*compare, dest, res);
+ (mc68kcpu)->c_flag = CFLAG_16(res);
+
+ if(COND_NE(mc68kcpu))
+ *compare = MASK_OUT_BELOW_16(*compare) | dest;
+ else
+ {
+ (mc68kcpu)->remaining_cycles -= 3;
+ m68ki_write_16((mc68kcpu), ea, MASK_OUT_ABOVE_16(REG_D(mc68kcpu)[(word2 >> 6) & 7]));
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_cas_16_pi(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_PI_16(mc68kcpu);
+ UINT32 dest = m68ki_read_16((mc68kcpu), ea);
+ UINT32* compare = &REG_D(mc68kcpu)[word2 & 7];
+ UINT32 res = dest - MASK_OUT_ABOVE_16(*compare);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(*compare, dest, res);
+ (mc68kcpu)->c_flag = CFLAG_16(res);
+
+ if(COND_NE(mc68kcpu))
+ *compare = MASK_OUT_BELOW_16(*compare) | dest;
+ else
+ {
+ (mc68kcpu)->remaining_cycles -= 3;
+ m68ki_write_16((mc68kcpu), ea, MASK_OUT_ABOVE_16(REG_D(mc68kcpu)[(word2 >> 6) & 7]));
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_cas_16_pd(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_PD_16(mc68kcpu);
+ UINT32 dest = m68ki_read_16((mc68kcpu), ea);
+ UINT32* compare = &REG_D(mc68kcpu)[word2 & 7];
+ UINT32 res = dest - MASK_OUT_ABOVE_16(*compare);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(*compare, dest, res);
+ (mc68kcpu)->c_flag = CFLAG_16(res);
+
+ if(COND_NE(mc68kcpu))
+ *compare = MASK_OUT_BELOW_16(*compare) | dest;
+ else
+ {
+ (mc68kcpu)->remaining_cycles -= 3;
+ m68ki_write_16((mc68kcpu), ea, MASK_OUT_ABOVE_16(REG_D(mc68kcpu)[(word2 >> 6) & 7]));
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_cas_16_di(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_DI_16(mc68kcpu);
+ UINT32 dest = m68ki_read_16((mc68kcpu), ea);
+ UINT32* compare = &REG_D(mc68kcpu)[word2 & 7];
+ UINT32 res = dest - MASK_OUT_ABOVE_16(*compare);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(*compare, dest, res);
+ (mc68kcpu)->c_flag = CFLAG_16(res);
+
+ if(COND_NE(mc68kcpu))
+ *compare = MASK_OUT_BELOW_16(*compare) | dest;
+ else
+ {
+ (mc68kcpu)->remaining_cycles -= 3;
+ m68ki_write_16((mc68kcpu), ea, MASK_OUT_ABOVE_16(REG_D(mc68kcpu)[(word2 >> 6) & 7]));
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_cas_16_ix(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_IX_16(mc68kcpu);
+ UINT32 dest = m68ki_read_16((mc68kcpu), ea);
+ UINT32* compare = &REG_D(mc68kcpu)[word2 & 7];
+ UINT32 res = dest - MASK_OUT_ABOVE_16(*compare);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(*compare, dest, res);
+ (mc68kcpu)->c_flag = CFLAG_16(res);
+
+ if(COND_NE(mc68kcpu))
+ *compare = MASK_OUT_BELOW_16(*compare) | dest;
+ else
+ {
+ (mc68kcpu)->remaining_cycles -= 3;
+ m68ki_write_16((mc68kcpu), ea, MASK_OUT_ABOVE_16(REG_D(mc68kcpu)[(word2 >> 6) & 7]));
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_cas_16_aw(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AW_16(mc68kcpu);
+ UINT32 dest = m68ki_read_16((mc68kcpu), ea);
+ UINT32* compare = &REG_D(mc68kcpu)[word2 & 7];
+ UINT32 res = dest - MASK_OUT_ABOVE_16(*compare);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(*compare, dest, res);
+ (mc68kcpu)->c_flag = CFLAG_16(res);
+
+ if(COND_NE(mc68kcpu))
+ *compare = MASK_OUT_BELOW_16(*compare) | dest;
+ else
+ {
+ (mc68kcpu)->remaining_cycles -= 3;
+ m68ki_write_16((mc68kcpu), ea, MASK_OUT_ABOVE_16(REG_D(mc68kcpu)[(word2 >> 6) & 7]));
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_cas_16_al(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AL_16(mc68kcpu);
+ UINT32 dest = m68ki_read_16((mc68kcpu), ea);
+ UINT32* compare = &REG_D(mc68kcpu)[word2 & 7];
+ UINT32 res = dest - MASK_OUT_ABOVE_16(*compare);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(*compare, dest, res);
+ (mc68kcpu)->c_flag = CFLAG_16(res);
+
+ if(COND_NE(mc68kcpu))
+ *compare = MASK_OUT_BELOW_16(*compare) | dest;
+ else
+ {
+ (mc68kcpu)->remaining_cycles -= 3;
+ m68ki_write_16((mc68kcpu), ea, MASK_OUT_ABOVE_16(REG_D(mc68kcpu)[(word2 >> 6) & 7]));
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_cas_32_ai(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_AI_32(mc68kcpu);
+ UINT32 dest = m68ki_read_32((mc68kcpu), ea);
+ UINT32* compare = &REG_D(mc68kcpu)[word2 & 7];
+ UINT32 res = dest - *compare;
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(*compare, dest, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(*compare, dest, res);
+
+ if(COND_NE(mc68kcpu))
+ *compare = dest;
+ else
+ {
+ (mc68kcpu)->remaining_cycles -= 3;
+ m68ki_write_32((mc68kcpu), ea, REG_D(mc68kcpu)[(word2 >> 6) & 7]);
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_cas_32_pi(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_PI_32(mc68kcpu);
+ UINT32 dest = m68ki_read_32((mc68kcpu), ea);
+ UINT32* compare = &REG_D(mc68kcpu)[word2 & 7];
+ UINT32 res = dest - *compare;
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(*compare, dest, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(*compare, dest, res);
+
+ if(COND_NE(mc68kcpu))
+ *compare = dest;
+ else
+ {
+ (mc68kcpu)->remaining_cycles -= 3;
+ m68ki_write_32((mc68kcpu), ea, REG_D(mc68kcpu)[(word2 >> 6) & 7]);
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_cas_32_pd(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_PD_32(mc68kcpu);
+ UINT32 dest = m68ki_read_32((mc68kcpu), ea);
+ UINT32* compare = &REG_D(mc68kcpu)[word2 & 7];
+ UINT32 res = dest - *compare;
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(*compare, dest, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(*compare, dest, res);
+
+ if(COND_NE(mc68kcpu))
+ *compare = dest;
+ else
+ {
+ (mc68kcpu)->remaining_cycles -= 3;
+ m68ki_write_32((mc68kcpu), ea, REG_D(mc68kcpu)[(word2 >> 6) & 7]);
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_cas_32_di(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_DI_32(mc68kcpu);
+ UINT32 dest = m68ki_read_32((mc68kcpu), ea);
+ UINT32* compare = &REG_D(mc68kcpu)[word2 & 7];
+ UINT32 res = dest - *compare;
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(*compare, dest, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(*compare, dest, res);
+
+ if(COND_NE(mc68kcpu))
+ *compare = dest;
+ else
+ {
+ (mc68kcpu)->remaining_cycles -= 3;
+ m68ki_write_32((mc68kcpu), ea, REG_D(mc68kcpu)[(word2 >> 6) & 7]);
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_cas_32_ix(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_IX_32(mc68kcpu);
+ UINT32 dest = m68ki_read_32((mc68kcpu), ea);
+ UINT32* compare = &REG_D(mc68kcpu)[word2 & 7];
+ UINT32 res = dest - *compare;
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(*compare, dest, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(*compare, dest, res);
+
+ if(COND_NE(mc68kcpu))
+ *compare = dest;
+ else
+ {
+ (mc68kcpu)->remaining_cycles -= 3;
+ m68ki_write_32((mc68kcpu), ea, REG_D(mc68kcpu)[(word2 >> 6) & 7]);
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_cas_32_aw(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AW_32(mc68kcpu);
+ UINT32 dest = m68ki_read_32((mc68kcpu), ea);
+ UINT32* compare = &REG_D(mc68kcpu)[word2 & 7];
+ UINT32 res = dest - *compare;
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(*compare, dest, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(*compare, dest, res);
+
+ if(COND_NE(mc68kcpu))
+ *compare = dest;
+ else
+ {
+ (mc68kcpu)->remaining_cycles -= 3;
+ m68ki_write_32((mc68kcpu), ea, REG_D(mc68kcpu)[(word2 >> 6) & 7]);
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_cas_32_al(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AL_32(mc68kcpu);
+ UINT32 dest = m68ki_read_32((mc68kcpu), ea);
+ UINT32* compare = &REG_D(mc68kcpu)[word2 & 7];
+ UINT32 res = dest - *compare;
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(*compare, dest, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(*compare, dest, res);
+
+ if(COND_NE(mc68kcpu))
+ *compare = dest;
+ else
+ {
+ (mc68kcpu)->remaining_cycles -= 3;
+ m68ki_write_32((mc68kcpu), ea, REG_D(mc68kcpu)[(word2 >> 6) & 7]);
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_cas2_16(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_32(mc68kcpu);
+ UINT32* compare1 = &REG_D(mc68kcpu)[(word2 >> 16) & 7];
+ UINT32 ea1 = REG_DA(mc68kcpu)[(word2 >> 28) & 15];
+ UINT32 dest1 = m68ki_read_16((mc68kcpu), ea1);
+ UINT32 res1 = dest1 - MASK_OUT_ABOVE_16(*compare1);
+ UINT32* compare2 = &REG_D(mc68kcpu)[word2 & 7];
+ UINT32 ea2 = REG_DA(mc68kcpu)[(word2 >> 12) & 15];
+ UINT32 dest2 = m68ki_read_16((mc68kcpu), ea2);
+ UINT32 res2;
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ (mc68kcpu)->n_flag = NFLAG_16(res1);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res1);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(*compare1, dest1, res1);
+ (mc68kcpu)->c_flag = CFLAG_16(res1);
+
+ if(COND_EQ(mc68kcpu))
+ {
+ res2 = dest2 - MASK_OUT_ABOVE_16(*compare2);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res2);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res2);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(*compare2, dest2, res2);
+ (mc68kcpu)->c_flag = CFLAG_16(res2);
+
+ if(COND_EQ(mc68kcpu))
+ {
+ (mc68kcpu)->remaining_cycles -= 3;
+ m68ki_write_16((mc68kcpu), ea1, REG_D(mc68kcpu)[(word2 >> 22) & 7]);
+ m68ki_write_16((mc68kcpu), ea2, REG_D(mc68kcpu)[(word2 >> 6) & 7]);
+ return;
+ }
+ }
+ *compare1 = BIT_1F(word2) ? MAKE_INT_16(dest1) : MASK_OUT_BELOW_16(*compare1) | dest1;
+ *compare2 = BIT_F(word2) ? MAKE_INT_16(dest2) : MASK_OUT_BELOW_16(*compare2) | dest2;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_cas2_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_32(mc68kcpu);
+ UINT32* compare1 = &REG_D(mc68kcpu)[(word2 >> 16) & 7];
+ UINT32 ea1 = REG_DA(mc68kcpu)[(word2 >> 28) & 15];
+ UINT32 dest1 = m68ki_read_32((mc68kcpu), ea1);
+ UINT32 res1 = dest1 - *compare1;
+ UINT32* compare2 = &REG_D(mc68kcpu)[word2 & 7];
+ UINT32 ea2 = REG_DA(mc68kcpu)[(word2 >> 12) & 15];
+ UINT32 dest2 = m68ki_read_32((mc68kcpu), ea2);
+ UINT32 res2;
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ (mc68kcpu)->n_flag = NFLAG_32(res1);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res1);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(*compare1, dest1, res1);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(*compare1, dest1, res1);
+
+ if(COND_EQ(mc68kcpu))
+ {
+ res2 = dest2 - *compare2;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res2);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res2);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(*compare2, dest2, res2);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(*compare2, dest2, res2);
+
+ if(COND_EQ(mc68kcpu))
+ {
+ (mc68kcpu)->remaining_cycles -= 3;
+ m68ki_write_32((mc68kcpu), ea1, REG_D(mc68kcpu)[(word2 >> 22) & 7]);
+ m68ki_write_32((mc68kcpu), ea2, REG_D(mc68kcpu)[(word2 >> 6) & 7]);
+ return;
+ }
+ }
+ *compare1 = dest1;
+ *compare2 = dest2;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk_16_d(m68000_base_device* mc68kcpu)
+{
+ INT32 src = MAKE_INT_16(DX(mc68kcpu));
+ INT32 bound = MAKE_INT_16(DY(mc68kcpu));
+
+ (mc68kcpu)->not_z_flag = ZFLAG_16(src); /* Undocumented */
+ (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
+ (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
+
+ if(src >= 0 && src <= bound)
+ {
+ return;
+ }
+ (mc68kcpu)->n_flag = (src < 0)<<7;
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk_16_ai(m68000_base_device* mc68kcpu)
+{
+ INT32 src = MAKE_INT_16(DX(mc68kcpu));
+ INT32 bound = MAKE_INT_16(OPER_AY_AI_16(mc68kcpu));
+
+ (mc68kcpu)->not_z_flag = ZFLAG_16(src); /* Undocumented */
+ (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
+ (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
+
+ if(src >= 0 && src <= bound)
+ {
+ return;
+ }
+ (mc68kcpu)->n_flag = (src < 0)<<7;
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk_16_pi(m68000_base_device* mc68kcpu)
+{
+ INT32 src = MAKE_INT_16(DX(mc68kcpu));
+ INT32 bound = MAKE_INT_16(OPER_AY_PI_16(mc68kcpu));
+
+ (mc68kcpu)->not_z_flag = ZFLAG_16(src); /* Undocumented */
+ (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
+ (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
+
+ if(src >= 0 && src <= bound)
+ {
+ return;
+ }
+ (mc68kcpu)->n_flag = (src < 0)<<7;
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk_16_pd(m68000_base_device* mc68kcpu)
+{
+ INT32 src = MAKE_INT_16(DX(mc68kcpu));
+ INT32 bound = MAKE_INT_16(OPER_AY_PD_16(mc68kcpu));
+
+ (mc68kcpu)->not_z_flag = ZFLAG_16(src); /* Undocumented */
+ (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
+ (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
+
+ if(src >= 0 && src <= bound)
+ {
+ return;
+ }
+ (mc68kcpu)->n_flag = (src < 0)<<7;
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk_16_di(m68000_base_device* mc68kcpu)
+{
+ INT32 src = MAKE_INT_16(DX(mc68kcpu));
+ INT32 bound = MAKE_INT_16(OPER_AY_DI_16(mc68kcpu));
+
+ (mc68kcpu)->not_z_flag = ZFLAG_16(src); /* Undocumented */
+ (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
+ (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
+
+ if(src >= 0 && src <= bound)
+ {
+ return;
+ }
+ (mc68kcpu)->n_flag = (src < 0)<<7;
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk_16_ix(m68000_base_device* mc68kcpu)
+{
+ INT32 src = MAKE_INT_16(DX(mc68kcpu));
+ INT32 bound = MAKE_INT_16(OPER_AY_IX_16(mc68kcpu));
+
+ (mc68kcpu)->not_z_flag = ZFLAG_16(src); /* Undocumented */
+ (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
+ (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
+
+ if(src >= 0 && src <= bound)
+ {
+ return;
+ }
+ (mc68kcpu)->n_flag = (src < 0)<<7;
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk_16_aw(m68000_base_device* mc68kcpu)
+{
+ INT32 src = MAKE_INT_16(DX(mc68kcpu));
+ INT32 bound = MAKE_INT_16(OPER_AW_16(mc68kcpu));
+
+ (mc68kcpu)->not_z_flag = ZFLAG_16(src); /* Undocumented */
+ (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
+ (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
+
+ if(src >= 0 && src <= bound)
+ {
+ return;
+ }
+ (mc68kcpu)->n_flag = (src < 0)<<7;
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk_16_al(m68000_base_device* mc68kcpu)
+{
+ INT32 src = MAKE_INT_16(DX(mc68kcpu));
+ INT32 bound = MAKE_INT_16(OPER_AL_16(mc68kcpu));
+
+ (mc68kcpu)->not_z_flag = ZFLAG_16(src); /* Undocumented */
+ (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
+ (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
+
+ if(src >= 0 && src <= bound)
+ {
+ return;
+ }
+ (mc68kcpu)->n_flag = (src < 0)<<7;
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk_16_pcdi(m68000_base_device* mc68kcpu)
+{
+ INT32 src = MAKE_INT_16(DX(mc68kcpu));
+ INT32 bound = MAKE_INT_16(OPER_PCDI_16(mc68kcpu));
+
+ (mc68kcpu)->not_z_flag = ZFLAG_16(src); /* Undocumented */
+ (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
+ (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
+
+ if(src >= 0 && src <= bound)
+ {
+ return;
+ }
+ (mc68kcpu)->n_flag = (src < 0)<<7;
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk_16_pcix(m68000_base_device* mc68kcpu)
+{
+ INT32 src = MAKE_INT_16(DX(mc68kcpu));
+ INT32 bound = MAKE_INT_16(OPER_PCIX_16(mc68kcpu));
+
+ (mc68kcpu)->not_z_flag = ZFLAG_16(src); /* Undocumented */
+ (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
+ (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
+
+ if(src >= 0 && src <= bound)
+ {
+ return;
+ }
+ (mc68kcpu)->n_flag = (src < 0)<<7;
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk_16_i(m68000_base_device* mc68kcpu)
+{
+ INT32 src = MAKE_INT_16(DX(mc68kcpu));
+ INT32 bound = MAKE_INT_16(OPER_I_16(mc68kcpu));
+
+ (mc68kcpu)->not_z_flag = ZFLAG_16(src); /* Undocumented */
+ (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
+ (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
+
+ if(src >= 0 && src <= bound)
+ {
+ return;
+ }
+ (mc68kcpu)->n_flag = (src < 0)<<7;
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk_32_d(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ INT32 src = MAKE_INT_32(DX(mc68kcpu));
+ INT32 bound = MAKE_INT_32(DY(mc68kcpu));
+
+ (mc68kcpu)->not_z_flag = ZFLAG_32(src); /* Undocumented */
+ (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
+ (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
+
+ if(src >= 0 && src <= bound)
+ {
+ return;
+ }
+ (mc68kcpu)->n_flag = (src < 0)<<7;
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk_32_ai(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ INT32 src = MAKE_INT_32(DX(mc68kcpu));
+ INT32 bound = MAKE_INT_32(OPER_AY_AI_32(mc68kcpu));
+
+ (mc68kcpu)->not_z_flag = ZFLAG_32(src); /* Undocumented */
+ (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
+ (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
+
+ if(src >= 0 && src <= bound)
+ {
+ return;
+ }
+ (mc68kcpu)->n_flag = (src < 0)<<7;
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk_32_pi(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ INT32 src = MAKE_INT_32(DX(mc68kcpu));
+ INT32 bound = MAKE_INT_32(OPER_AY_PI_32(mc68kcpu));
+
+ (mc68kcpu)->not_z_flag = ZFLAG_32(src); /* Undocumented */
+ (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
+ (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
+
+ if(src >= 0 && src <= bound)
+ {
+ return;
+ }
+ (mc68kcpu)->n_flag = (src < 0)<<7;
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk_32_pd(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ INT32 src = MAKE_INT_32(DX(mc68kcpu));
+ INT32 bound = MAKE_INT_32(OPER_AY_PD_32(mc68kcpu));
+
+ (mc68kcpu)->not_z_flag = ZFLAG_32(src); /* Undocumented */
+ (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
+ (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
+
+ if(src >= 0 && src <= bound)
+ {
+ return;
+ }
+ (mc68kcpu)->n_flag = (src < 0)<<7;
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk_32_di(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ INT32 src = MAKE_INT_32(DX(mc68kcpu));
+ INT32 bound = MAKE_INT_32(OPER_AY_DI_32(mc68kcpu));
+
+ (mc68kcpu)->not_z_flag = ZFLAG_32(src); /* Undocumented */
+ (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
+ (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
+
+ if(src >= 0 && src <= bound)
+ {
+ return;
+ }
+ (mc68kcpu)->n_flag = (src < 0)<<7;
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk_32_ix(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ INT32 src = MAKE_INT_32(DX(mc68kcpu));
+ INT32 bound = MAKE_INT_32(OPER_AY_IX_32(mc68kcpu));
+
+ (mc68kcpu)->not_z_flag = ZFLAG_32(src); /* Undocumented */
+ (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
+ (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
+
+ if(src >= 0 && src <= bound)
+ {
+ return;
+ }
+ (mc68kcpu)->n_flag = (src < 0)<<7;
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk_32_aw(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ INT32 src = MAKE_INT_32(DX(mc68kcpu));
+ INT32 bound = MAKE_INT_32(OPER_AW_32(mc68kcpu));
+
+ (mc68kcpu)->not_z_flag = ZFLAG_32(src); /* Undocumented */
+ (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
+ (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
+
+ if(src >= 0 && src <= bound)
+ {
+ return;
+ }
+ (mc68kcpu)->n_flag = (src < 0)<<7;
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk_32_al(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ INT32 src = MAKE_INT_32(DX(mc68kcpu));
+ INT32 bound = MAKE_INT_32(OPER_AL_32(mc68kcpu));
+
+ (mc68kcpu)->not_z_flag = ZFLAG_32(src); /* Undocumented */
+ (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
+ (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
+
+ if(src >= 0 && src <= bound)
+ {
+ return;
+ }
+ (mc68kcpu)->n_flag = (src < 0)<<7;
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk_32_pcdi(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ INT32 src = MAKE_INT_32(DX(mc68kcpu));
+ INT32 bound = MAKE_INT_32(OPER_PCDI_32(mc68kcpu));
+
+ (mc68kcpu)->not_z_flag = ZFLAG_32(src); /* Undocumented */
+ (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
+ (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
+
+ if(src >= 0 && src <= bound)
+ {
+ return;
+ }
+ (mc68kcpu)->n_flag = (src < 0)<<7;
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk_32_pcix(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ INT32 src = MAKE_INT_32(DX(mc68kcpu));
+ INT32 bound = MAKE_INT_32(OPER_PCIX_32(mc68kcpu));
+
+ (mc68kcpu)->not_z_flag = ZFLAG_32(src); /* Undocumented */
+ (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
+ (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
+
+ if(src >= 0 && src <= bound)
+ {
+ return;
+ }
+ (mc68kcpu)->n_flag = (src < 0)<<7;
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk_32_i(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ INT32 src = MAKE_INT_32(DX(mc68kcpu));
+ INT32 bound = MAKE_INT_32(OPER_I_32(mc68kcpu));
+
+ (mc68kcpu)->not_z_flag = ZFLAG_32(src); /* Undocumented */
+ (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
+ (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
+
+ if(src >= 0 && src <= bound)
+ {
+ return;
+ }
+ (mc68kcpu)->n_flag = (src < 0)<<7;
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk2cmp2_8_pcdi(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15]&0xff;
+ UINT32 ea = EA_PCDI_8(mc68kcpu);
+ UINT32 lower_bound = m68ki_read_pcrel_8((mc68kcpu), ea);
+ UINT32 upper_bound = m68ki_read_pcrel_8((mc68kcpu), ea + 1);
+
+ if(!BIT_F(word2))
+ (mc68kcpu)->c_flag = MAKE_INT_8(compare) - MAKE_INT_8(lower_bound);
+ else
+ (mc68kcpu)->c_flag = compare - lower_bound;
+ (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
+ if(COND_CS(mc68kcpu))
+ {
+ if(BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+
+ (mc68kcpu)->c_flag = upper_bound - compare;
+ if(COND_CS(mc68kcpu) && BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk2cmp2_8_pcix(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15]&0xff;
+ UINT32 ea = EA_PCIX_8(mc68kcpu);
+ UINT32 lower_bound = m68ki_read_pcrel_8((mc68kcpu), ea);
+ UINT32 upper_bound = m68ki_read_pcrel_8((mc68kcpu), ea + 1);
+
+ if(!BIT_F(word2))
+ (mc68kcpu)->c_flag = MAKE_INT_8(compare) - MAKE_INT_8(lower_bound);
+ else
+ (mc68kcpu)->c_flag = compare - lower_bound;
+ (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
+ if(COND_CS(mc68kcpu))
+ {
+ if(BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+
+ (mc68kcpu)->c_flag = upper_bound - compare;
+ if(COND_CS(mc68kcpu) && BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk2cmp2_8_ai(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15]&0xff;
+ UINT32 ea = EA_AY_AI_8(mc68kcpu);
+ UINT32 lower_bound = m68ki_read_8((mc68kcpu), ea);
+ UINT32 upper_bound = m68ki_read_8((mc68kcpu), ea + 1);
+
+ if(!BIT_F(word2))
+ (mc68kcpu)->c_flag = MAKE_INT_8(compare) - MAKE_INT_8(lower_bound);
+ else
+ (mc68kcpu)->c_flag = compare - lower_bound;
+ (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
+ if(COND_CS(mc68kcpu))
+ {
+ if(BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+
+ (mc68kcpu)->c_flag = upper_bound - compare;
+ if(COND_CS(mc68kcpu) && BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk2cmp2_8_di(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15]&0xff;
+ UINT32 ea = EA_AY_DI_8(mc68kcpu);
+ UINT32 lower_bound = m68ki_read_8((mc68kcpu), ea);
+ UINT32 upper_bound = m68ki_read_8((mc68kcpu), ea + 1);
+
+ if(!BIT_F(word2))
+ (mc68kcpu)->c_flag = MAKE_INT_8(compare) - MAKE_INT_8(lower_bound);
+ else
+ (mc68kcpu)->c_flag = compare - lower_bound;
+ (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
+ if(COND_CS(mc68kcpu))
+ {
+ if(BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+
+ (mc68kcpu)->c_flag = upper_bound - compare;
+ if(COND_CS(mc68kcpu) && BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk2cmp2_8_ix(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15]&0xff;
+ UINT32 ea = EA_AY_IX_8(mc68kcpu);
+ UINT32 lower_bound = m68ki_read_8((mc68kcpu), ea);
+ UINT32 upper_bound = m68ki_read_8((mc68kcpu), ea + 1);
+
+ if(!BIT_F(word2))
+ (mc68kcpu)->c_flag = MAKE_INT_8(compare) - MAKE_INT_8(lower_bound);
+ else
+ (mc68kcpu)->c_flag = compare - lower_bound;
+ (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
+ if(COND_CS(mc68kcpu))
+ {
+ if(BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+
+ (mc68kcpu)->c_flag = upper_bound - compare;
+ if(COND_CS(mc68kcpu) && BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk2cmp2_8_aw(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15]&0xff;
+ UINT32 ea = EA_AW_8(mc68kcpu);
+ UINT32 lower_bound = m68ki_read_8((mc68kcpu), ea);
+ UINT32 upper_bound = m68ki_read_8((mc68kcpu), ea + 1);
+
+ if(!BIT_F(word2))
+ (mc68kcpu)->c_flag = MAKE_INT_8(compare) - MAKE_INT_8(lower_bound);
+ else
+ (mc68kcpu)->c_flag = compare - lower_bound;
+ (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
+ if(COND_CS(mc68kcpu))
+ {
+ if(BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+
+ (mc68kcpu)->c_flag = upper_bound - compare;
+ if(COND_CS(mc68kcpu) && BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk2cmp2_8_al(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15]&0xff;
+ UINT32 ea = EA_AL_8(mc68kcpu);
+ UINT32 lower_bound = m68ki_read_8((mc68kcpu), ea);
+ UINT32 upper_bound = m68ki_read_8((mc68kcpu), ea + 1);
+
+ if(!BIT_F(word2))
+ (mc68kcpu)->c_flag = MAKE_INT_8(compare) - MAKE_INT_8(lower_bound);
+ else
+ (mc68kcpu)->c_flag = compare - lower_bound;
+ (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
+ if(COND_CS(mc68kcpu))
+ {
+ if(BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+
+ (mc68kcpu)->c_flag = upper_bound - compare;
+ if(COND_CS(mc68kcpu) && BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk2cmp2_16_pcdi(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15]&0xffff;
+ UINT32 ea = EA_PCDI_16(mc68kcpu);
+ UINT32 lower_bound = m68ki_read_pcrel_16((mc68kcpu), ea);
+ UINT32 upper_bound = m68ki_read_pcrel_16((mc68kcpu), ea + 2);
+
+ if(!BIT_F(word2))
+ (mc68kcpu)->c_flag = MAKE_INT_16(compare) - MAKE_INT_16(lower_bound);
+ else
+ (mc68kcpu)->c_flag = compare - lower_bound;
+ (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
+ (mc68kcpu)->c_flag = CFLAG_16((mc68kcpu)->c_flag);
+ if(COND_CS(mc68kcpu))
+ {
+ if(BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+
+ if(!BIT_F(word2))
+ (mc68kcpu)->c_flag = MAKE_INT_16(upper_bound) - MAKE_INT_16(compare);
+ else
+ (mc68kcpu)->c_flag = upper_bound - compare;
+ (mc68kcpu)->c_flag = CFLAG_16((mc68kcpu)->c_flag);
+ if(COND_CS(mc68kcpu) && BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk2cmp2_16_pcix(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15]&0xffff;
+ UINT32 ea = EA_PCIX_16(mc68kcpu);
+ UINT32 lower_bound = m68ki_read_pcrel_16((mc68kcpu), ea);
+ UINT32 upper_bound = m68ki_read_pcrel_16((mc68kcpu), ea + 2);
+
+ if(!BIT_F(word2))
+ (mc68kcpu)->c_flag = MAKE_INT_16(compare) - MAKE_INT_16(lower_bound);
+ else
+ (mc68kcpu)->c_flag = compare - lower_bound;
+ (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
+ (mc68kcpu)->c_flag = CFLAG_16((mc68kcpu)->c_flag);
+ if(COND_CS(mc68kcpu))
+ {
+ if(BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+
+ if(!BIT_F(word2))
+ (mc68kcpu)->c_flag = MAKE_INT_16(upper_bound) - MAKE_INT_16(compare);
+ else
+ (mc68kcpu)->c_flag = upper_bound - compare;
+ (mc68kcpu)->c_flag = CFLAG_16((mc68kcpu)->c_flag);
+ if(COND_CS(mc68kcpu) && BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk2cmp2_16_ai(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15]&0xffff;
+ UINT32 ea = EA_AY_AI_16(mc68kcpu);
+ UINT32 lower_bound = m68ki_read_16((mc68kcpu), ea);
+ UINT32 upper_bound = m68ki_read_16((mc68kcpu), ea + 2);
+
+ if(!BIT_F(word2))
+ (mc68kcpu)->c_flag = MAKE_INT_16(compare) - MAKE_INT_16(lower_bound);
+ else
+ (mc68kcpu)->c_flag = compare - lower_bound;
+
+ (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
+ (mc68kcpu)->c_flag = CFLAG_16((mc68kcpu)->c_flag);
+ if(COND_CS(mc68kcpu))
+ {
+ if(BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+ if(!BIT_F(word2))
+ (mc68kcpu)->c_flag = MAKE_INT_16(upper_bound) - MAKE_INT_16(compare);
+ else
+ (mc68kcpu)->c_flag = upper_bound - compare;
+
+ (mc68kcpu)->c_flag = CFLAG_16((mc68kcpu)->c_flag);
+ if(COND_CS(mc68kcpu) && BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk2cmp2_16_di(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15]&0xffff;
+ UINT32 ea = EA_AY_DI_16(mc68kcpu);
+ UINT32 lower_bound = m68ki_read_16((mc68kcpu), ea);
+ UINT32 upper_bound = m68ki_read_16((mc68kcpu), ea + 2);
+
+ if(!BIT_F(word2))
+ (mc68kcpu)->c_flag = MAKE_INT_16(compare) - MAKE_INT_16(lower_bound);
+ else
+ (mc68kcpu)->c_flag = compare - lower_bound;
+
+ (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
+ (mc68kcpu)->c_flag = CFLAG_16((mc68kcpu)->c_flag);
+ if(COND_CS(mc68kcpu))
+ {
+ if(BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+ if(!BIT_F(word2))
+ (mc68kcpu)->c_flag = MAKE_INT_16(upper_bound) - MAKE_INT_16(compare);
+ else
+ (mc68kcpu)->c_flag = upper_bound - compare;
+
+ (mc68kcpu)->c_flag = CFLAG_16((mc68kcpu)->c_flag);
+ if(COND_CS(mc68kcpu) && BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk2cmp2_16_ix(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15]&0xffff;
+ UINT32 ea = EA_AY_IX_16(mc68kcpu);
+ UINT32 lower_bound = m68ki_read_16((mc68kcpu), ea);
+ UINT32 upper_bound = m68ki_read_16((mc68kcpu), ea + 2);
+
+ if(!BIT_F(word2))
+ (mc68kcpu)->c_flag = MAKE_INT_16(compare) - MAKE_INT_16(lower_bound);
+ else
+ (mc68kcpu)->c_flag = compare - lower_bound;
+
+ (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
+ (mc68kcpu)->c_flag = CFLAG_16((mc68kcpu)->c_flag);
+ if(COND_CS(mc68kcpu))
+ {
+ if(BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+ if(!BIT_F(word2))
+ (mc68kcpu)->c_flag = MAKE_INT_16(upper_bound) - MAKE_INT_16(compare);
+ else
+ (mc68kcpu)->c_flag = upper_bound - compare;
+
+ (mc68kcpu)->c_flag = CFLAG_16((mc68kcpu)->c_flag);
+ if(COND_CS(mc68kcpu) && BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk2cmp2_16_aw(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15]&0xffff;
+ UINT32 ea = EA_AW_16(mc68kcpu);
+ UINT32 lower_bound = m68ki_read_16((mc68kcpu), ea);
+ UINT32 upper_bound = m68ki_read_16((mc68kcpu), ea + 2);
+
+ if(!BIT_F(word2))
+ (mc68kcpu)->c_flag = MAKE_INT_16(compare) - MAKE_INT_16(lower_bound);
+ else
+ (mc68kcpu)->c_flag = compare - lower_bound;
+
+ (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
+ (mc68kcpu)->c_flag = CFLAG_16((mc68kcpu)->c_flag);
+ if(COND_CS(mc68kcpu))
+ {
+ if(BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+ if(!BIT_F(word2))
+ (mc68kcpu)->c_flag = MAKE_INT_16(upper_bound) - MAKE_INT_16(compare);
+ else
+ (mc68kcpu)->c_flag = upper_bound - compare;
+
+ (mc68kcpu)->c_flag = CFLAG_16((mc68kcpu)->c_flag);
+ if(COND_CS(mc68kcpu) && BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk2cmp2_16_al(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15]&0xffff;
+ UINT32 ea = EA_AL_16(mc68kcpu);
+ UINT32 lower_bound = m68ki_read_16((mc68kcpu), ea);
+ UINT32 upper_bound = m68ki_read_16((mc68kcpu), ea + 2);
+
+ if(!BIT_F(word2))
+ (mc68kcpu)->c_flag = MAKE_INT_16(compare) - MAKE_INT_16(lower_bound);
+ else
+ (mc68kcpu)->c_flag = compare - lower_bound;
+
+ (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
+ (mc68kcpu)->c_flag = CFLAG_16((mc68kcpu)->c_flag);
+ if(COND_CS(mc68kcpu))
+ {
+ if(BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+ if(!BIT_F(word2))
+ (mc68kcpu)->c_flag = MAKE_INT_16(upper_bound) - MAKE_INT_16(compare);
+ else
+ (mc68kcpu)->c_flag = upper_bound - compare;
+
+ (mc68kcpu)->c_flag = CFLAG_16((mc68kcpu)->c_flag);
+ if(COND_CS(mc68kcpu) && BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk2cmp2_32_pcdi(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15];
+ UINT32 ea = EA_PCDI_32(mc68kcpu);
+ UINT32 lower_bound = m68ki_read_pcrel_32((mc68kcpu), ea);
+ UINT32 upper_bound = m68ki_read_pcrel_32((mc68kcpu), ea + 4);
+
+ (mc68kcpu)->c_flag = compare - lower_bound;
+ (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(lower_bound, compare, (mc68kcpu)->c_flag);
+ if(COND_CS(mc68kcpu))
+ {
+ if(BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+
+ (mc68kcpu)->c_flag = upper_bound - compare;
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(compare, upper_bound, (mc68kcpu)->c_flag);
+ if(COND_CS(mc68kcpu) && BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk2cmp2_32_pcix(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15];
+ UINT32 ea = EA_PCIX_32(mc68kcpu);
+ UINT32 lower_bound = m68ki_read_pcrel_32((mc68kcpu), ea);
+ UINT32 upper_bound = m68ki_read_pcrel_32((mc68kcpu), ea + 4);
+
+ (mc68kcpu)->c_flag = compare - lower_bound;
+ (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(lower_bound, compare, (mc68kcpu)->c_flag);
+ if(COND_CS(mc68kcpu))
+ {
+ if(BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+
+ (mc68kcpu)->c_flag = upper_bound - compare;
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(compare, upper_bound, (mc68kcpu)->c_flag);
+ if(COND_CS(mc68kcpu) && BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk2cmp2_32_ai(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15];
+ UINT32 ea = EA_AY_AI_32(mc68kcpu);
+ UINT32 lower_bound = m68ki_read_32((mc68kcpu), ea);
+ UINT32 upper_bound = m68ki_read_32((mc68kcpu), ea + 4);
+
+ (mc68kcpu)->c_flag = compare - lower_bound;
+ (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(lower_bound, compare, (mc68kcpu)->c_flag);
+ if(COND_CS(mc68kcpu))
+ {
+ if(BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+
+ (mc68kcpu)->c_flag = upper_bound - compare;
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(compare, upper_bound, (mc68kcpu)->c_flag);
+ if(COND_CS(mc68kcpu) && BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk2cmp2_32_di(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15];
+ UINT32 ea = EA_AY_DI_32(mc68kcpu);
+ UINT32 lower_bound = m68ki_read_32((mc68kcpu), ea);
+ UINT32 upper_bound = m68ki_read_32((mc68kcpu), ea + 4);
+
+ (mc68kcpu)->c_flag = compare - lower_bound;
+ (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(lower_bound, compare, (mc68kcpu)->c_flag);
+ if(COND_CS(mc68kcpu))
+ {
+ if(BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+
+ (mc68kcpu)->c_flag = upper_bound - compare;
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(compare, upper_bound, (mc68kcpu)->c_flag);
+ if(COND_CS(mc68kcpu) && BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk2cmp2_32_ix(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15];
+ UINT32 ea = EA_AY_IX_32(mc68kcpu);
+ UINT32 lower_bound = m68ki_read_32((mc68kcpu), ea);
+ UINT32 upper_bound = m68ki_read_32((mc68kcpu), ea + 4);
+
+ (mc68kcpu)->c_flag = compare - lower_bound;
+ (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(lower_bound, compare, (mc68kcpu)->c_flag);
+ if(COND_CS(mc68kcpu))
+ {
+ if(BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+
+ (mc68kcpu)->c_flag = upper_bound - compare;
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(compare, upper_bound, (mc68kcpu)->c_flag);
+ if(COND_CS(mc68kcpu) && BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk2cmp2_32_aw(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15];
+ UINT32 ea = EA_AW_32(mc68kcpu);
+ UINT32 lower_bound = m68ki_read_32((mc68kcpu), ea);
+ UINT32 upper_bound = m68ki_read_32((mc68kcpu), ea + 4);
+
+ (mc68kcpu)->c_flag = compare - lower_bound;
+ (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(lower_bound, compare, (mc68kcpu)->c_flag);
+ if(COND_CS(mc68kcpu))
+ {
+ if(BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+
+ (mc68kcpu)->c_flag = upper_bound - compare;
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(compare, upper_bound, (mc68kcpu)->c_flag);
+ if(COND_CS(mc68kcpu) && BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_chk2cmp2_32_al(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15];
+ UINT32 ea = EA_AL_32(mc68kcpu);
+ UINT32 lower_bound = m68ki_read_32((mc68kcpu), ea);
+ UINT32 upper_bound = m68ki_read_32((mc68kcpu), ea + 4);
+
+ (mc68kcpu)->c_flag = compare - lower_bound;
+ (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(lower_bound, compare, (mc68kcpu)->c_flag);
+ if(COND_CS(mc68kcpu))
+ {
+ if(BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+
+ (mc68kcpu)->c_flag = upper_bound - compare;
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(compare, upper_bound, (mc68kcpu)->c_flag);
+ if(COND_CS(mc68kcpu) && BIT_B(word2))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_clr_8_d(m68000_base_device* mc68kcpu)
+{
+ DY(mc68kcpu) &= 0xffffff00;
+
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = ZFLAG_SET;
+}
+
+
+void m68000_base_device_ops::m68k_op_clr_8_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_8(mc68kcpu);
+
+ if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
+ {
+ m68ki_read_8((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
+ }
+
+ m68ki_write_8((mc68kcpu), ea, 0);
+
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = ZFLAG_SET;
+}
+
+
+void m68000_base_device_ops::m68k_op_clr_8_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_8(mc68kcpu);
+
+ if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
+ {
+ m68ki_read_8((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
+ }
+
+ m68ki_write_8((mc68kcpu), ea, 0);
+
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = ZFLAG_SET;
+}
+
+
+void m68000_base_device_ops::m68k_op_clr_8_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_A7_PI_8(mc68kcpu);
+
+ if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
+ {
+ m68ki_read_8((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
+ }
+
+ m68ki_write_8((mc68kcpu), ea, 0);
+
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = ZFLAG_SET;
+}
+
+
+void m68000_base_device_ops::m68k_op_clr_8_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_8(mc68kcpu);
+
+ if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
+ {
+ m68ki_read_8((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
+ }
+
+ m68ki_write_8((mc68kcpu), ea, 0);
+
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = ZFLAG_SET;
+}
+
+
+void m68000_base_device_ops::m68k_op_clr_8_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+
+ if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
+ {
+ m68ki_read_8((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
+ }
+
+ m68ki_write_8((mc68kcpu), ea, 0);
+
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = ZFLAG_SET;
+}
+
+
+void m68000_base_device_ops::m68k_op_clr_8_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_8(mc68kcpu);
+
+ if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
+ {
+ m68ki_read_8((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
+ }
+
+ m68ki_write_8((mc68kcpu), ea, 0);
+
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = ZFLAG_SET;
+}
+
+
+void m68000_base_device_ops::m68k_op_clr_8_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_8(mc68kcpu);
+
+ if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
+ {
+ m68ki_read_8((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
+ }
+
+ m68ki_write_8((mc68kcpu), ea, 0);
+
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = ZFLAG_SET;
+}
+
+
+void m68000_base_device_ops::m68k_op_clr_8_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_8(mc68kcpu);
+
+ if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
+ {
+ m68ki_read_8((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
+ }
+
+ m68ki_write_8((mc68kcpu), ea, 0);
+
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = ZFLAG_SET;
+}
+
+
+void m68000_base_device_ops::m68k_op_clr_8_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_8(mc68kcpu);
+
+ if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
+ {
+ m68ki_read_8((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
+ }
+
+ m68ki_write_8((mc68kcpu), ea, 0);
+
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = ZFLAG_SET;
+}
+
+
+void m68000_base_device_ops::m68k_op_clr_16_d(m68000_base_device* mc68kcpu)
+{
+ DY(mc68kcpu) &= 0xffff0000;
+
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = ZFLAG_SET;
+}
+
+
+void m68000_base_device_ops::m68k_op_clr_16_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_16(mc68kcpu);
+
+ if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
+ {
+ m68ki_read_16((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
+ }
+
+ m68ki_write_16((mc68kcpu), ea, 0);
+
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = ZFLAG_SET;
+}
+
+
+void m68000_base_device_ops::m68k_op_clr_16_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_16(mc68kcpu);
+
+ if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
+ {
+ m68ki_read_16((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
+ }
+
+ m68ki_write_16((mc68kcpu), ea, 0);
+
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = ZFLAG_SET;
+}
+
+
+void m68000_base_device_ops::m68k_op_clr_16_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_16(mc68kcpu);
+
+ if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
+ {
+ m68ki_read_16((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
+ }
+
+ m68ki_write_16((mc68kcpu), ea, 0);
+
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = ZFLAG_SET;
+}
+
+
+void m68000_base_device_ops::m68k_op_clr_16_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_16(mc68kcpu);
+
+ if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
+ {
+ m68ki_read_16((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
+ }
+
+ m68ki_write_16((mc68kcpu), ea, 0);
+
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = ZFLAG_SET;
+}
+
+
+void m68000_base_device_ops::m68k_op_clr_16_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_16(mc68kcpu);
+
+ if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
+ {
+ m68ki_read_16((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
+ }
+
+ m68ki_write_16((mc68kcpu), ea, 0);
+
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = ZFLAG_SET;
+}
+
+
+void m68000_base_device_ops::m68k_op_clr_16_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_16(mc68kcpu);
+
+ if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
+ {
+ m68ki_read_16((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
+ }
+
+ m68ki_write_16((mc68kcpu), ea, 0);
+
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = ZFLAG_SET;
+}
+
+
+void m68000_base_device_ops::m68k_op_clr_16_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_16(mc68kcpu);
+
+ if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
+ {
+ m68ki_read_16((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
+ }
+
+ m68ki_write_16((mc68kcpu), ea, 0);
+
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = ZFLAG_SET;
+}
+
+
+void m68000_base_device_ops::m68k_op_clr_32_d(m68000_base_device* mc68kcpu)
+{
+ DY(mc68kcpu) = 0;
+
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = ZFLAG_SET;
+}
+
+
+void m68000_base_device_ops::m68k_op_clr_32_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_32(mc68kcpu);
+
+ if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
+ {
+ m68ki_read_32((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
+ }
+
+ m68ki_write_32((mc68kcpu), ea, 0);
+
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = ZFLAG_SET;
+}
+
+
+void m68000_base_device_ops::m68k_op_clr_32_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_32(mc68kcpu);
+
+ if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
+ {
+ m68ki_read_32((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
+ }
+
+ m68ki_write_32((mc68kcpu), ea, 0);
+
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = ZFLAG_SET;
+}
+
+
+void m68000_base_device_ops::m68k_op_clr_32_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_32(mc68kcpu);
+
+ if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
+ {
+ m68ki_read_32((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
+ }
+
+ m68ki_write_32((mc68kcpu), ea, 0);
+
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = ZFLAG_SET;
+}
+
+
+void m68000_base_device_ops::m68k_op_clr_32_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_32(mc68kcpu);
+
+ if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
+ {
+ m68ki_read_32((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
+ }
+
+ m68ki_write_32((mc68kcpu), ea, 0);
+
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = ZFLAG_SET;
+}
+
+
+void m68000_base_device_ops::m68k_op_clr_32_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_32(mc68kcpu);
+
+ if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
+ {
+ m68ki_read_32((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
+ }
+
+ m68ki_write_32((mc68kcpu), ea, 0);
+
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = ZFLAG_SET;
+}
+
+
+void m68000_base_device_ops::m68k_op_clr_32_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_32(mc68kcpu);
+
+ if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
+ {
+ m68ki_read_32((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
+ }
+
+ m68ki_write_32((mc68kcpu), ea, 0);
+
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = ZFLAG_SET;
+}
+
+
+void m68000_base_device_ops::m68k_op_clr_32_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_32(mc68kcpu);
+
+ if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
+ {
+ m68ki_read_32((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
+ }
+
+ m68ki_write_32((mc68kcpu), ea, 0);
+
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = ZFLAG_SET;
+}
+
+
+void m68000_base_device_ops::m68k_op_cmp_8_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = MASK_OUT_ABOVE_8(DY(mc68kcpu));
+ UINT32 dst = MASK_OUT_ABOVE_8(DX(mc68kcpu));
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_8(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmp_8_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AY_AI_8(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_8(DX(mc68kcpu));
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_8(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmp_8_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AY_PI_8(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_8(DX(mc68kcpu));
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_8(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmp_8_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_A7_PI_8(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_8(DX(mc68kcpu));
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_8(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmp_8_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AY_PD_8(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_8(DX(mc68kcpu));
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_8(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmp_8_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_A7_PD_8(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_8(DX(mc68kcpu));
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_8(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmp_8_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AY_DI_8(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_8(DX(mc68kcpu));
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_8(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmp_8_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AY_IX_8(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_8(DX(mc68kcpu));
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_8(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmp_8_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AW_8(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_8(DX(mc68kcpu));
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_8(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmp_8_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AL_8(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_8(DX(mc68kcpu));
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_8(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmp_8_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_PCDI_8(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_8(DX(mc68kcpu));
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_8(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmp_8_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_PCIX_8(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_8(DX(mc68kcpu));
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_8(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmp_8_i(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_8(DX(mc68kcpu));
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_8(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmp_16_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = MASK_OUT_ABOVE_16(DY(mc68kcpu));
+ UINT32 dst = MASK_OUT_ABOVE_16(DX(mc68kcpu));
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_16(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmp_16_a(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = MASK_OUT_ABOVE_16(AY(mc68kcpu));
+ UINT32 dst = MASK_OUT_ABOVE_16(DX(mc68kcpu));
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_16(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmp_16_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AY_AI_16(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_16(DX(mc68kcpu));
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_16(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmp_16_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AY_PI_16(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_16(DX(mc68kcpu));
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_16(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmp_16_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AY_PD_16(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_16(DX(mc68kcpu));
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_16(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmp_16_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AY_DI_16(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_16(DX(mc68kcpu));
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_16(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmp_16_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AY_IX_16(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_16(DX(mc68kcpu));
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_16(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmp_16_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AW_16(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_16(DX(mc68kcpu));
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_16(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmp_16_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AL_16(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_16(DX(mc68kcpu));
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_16(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmp_16_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_PCDI_16(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_16(DX(mc68kcpu));
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_16(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmp_16_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_PCIX_16(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_16(DX(mc68kcpu));
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_16(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmp_16_i(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_16(DX(mc68kcpu));
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_16(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmp_32_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = DY(mc68kcpu);
+ UINT32 dst = DX(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmp_32_a(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = AY(mc68kcpu);
+ UINT32 dst = DX(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmp_32_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AY_AI_32(mc68kcpu);
+ UINT32 dst = DX(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmp_32_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AY_PI_32(mc68kcpu);
+ UINT32 dst = DX(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmp_32_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AY_PD_32(mc68kcpu);
+ UINT32 dst = DX(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmp_32_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AY_DI_32(mc68kcpu);
+ UINT32 dst = DX(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmp_32_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AY_IX_32(mc68kcpu);
+ UINT32 dst = DX(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmp_32_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AW_32(mc68kcpu);
+ UINT32 dst = DX(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmp_32_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AL_32(mc68kcpu);
+ UINT32 dst = DX(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmp_32_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_PCDI_32(mc68kcpu);
+ UINT32 dst = DX(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmp_32_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_PCIX_32(mc68kcpu);
+ UINT32 dst = DX(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmp_32_i(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 dst = DX(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpa_16_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = MAKE_INT_16(DY(mc68kcpu));
+ UINT32 dst = AX(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpa_16_a(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = MAKE_INT_16(AY(mc68kcpu));
+ UINT32 dst = AX(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpa_16_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = MAKE_INT_16(OPER_AY_AI_16(mc68kcpu));
+ UINT32 dst = AX(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpa_16_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = MAKE_INT_16(OPER_AY_PI_16(mc68kcpu));
+ UINT32 dst = AX(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpa_16_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = MAKE_INT_16(OPER_AY_PD_16(mc68kcpu));
+ UINT32 dst = AX(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpa_16_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = MAKE_INT_16(OPER_AY_DI_16(mc68kcpu));
+ UINT32 dst = AX(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpa_16_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = MAKE_INT_16(OPER_AY_IX_16(mc68kcpu));
+ UINT32 dst = AX(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpa_16_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = MAKE_INT_16(OPER_AW_16(mc68kcpu));
+ UINT32 dst = AX(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpa_16_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = MAKE_INT_16(OPER_AL_16(mc68kcpu));
+ UINT32 dst = AX(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpa_16_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = MAKE_INT_16(OPER_PCDI_16(mc68kcpu));
+ UINT32 dst = AX(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpa_16_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = MAKE_INT_16(OPER_PCIX_16(mc68kcpu));
+ UINT32 dst = AX(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpa_16_i(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = MAKE_INT_16(OPER_I_16(mc68kcpu));
+ UINT32 dst = AX(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpa_32_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = DY(mc68kcpu);
+ UINT32 dst = AX(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpa_32_a(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = AY(mc68kcpu);
+ UINT32 dst = AX(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpa_32_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AY_AI_32(mc68kcpu);
+ UINT32 dst = AX(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpa_32_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AY_PI_32(mc68kcpu);
+ UINT32 dst = AX(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpa_32_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AY_PD_32(mc68kcpu);
+ UINT32 dst = AX(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpa_32_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AY_DI_32(mc68kcpu);
+ UINT32 dst = AX(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpa_32_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AY_IX_32(mc68kcpu);
+ UINT32 dst = AX(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpa_32_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AW_32(mc68kcpu);
+ UINT32 dst = AX(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpa_32_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AL_32(mc68kcpu);
+ UINT32 dst = AX(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpa_32_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_PCDI_32(mc68kcpu);
+ UINT32 dst = AX(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpa_32_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_PCIX_32(mc68kcpu);
+ UINT32 dst = AX(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpa_32_i(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 dst = AX(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpi_8_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_8(DY(mc68kcpu));
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_8(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpi_8_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 dst = OPER_AY_AI_8(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_8(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpi_8_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 dst = OPER_AY_PI_8(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_8(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpi_8_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 dst = OPER_A7_PI_8(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_8(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpi_8_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 dst = OPER_AY_PD_8(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_8(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpi_8_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 dst = OPER_A7_PD_8(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_8(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpi_8_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 dst = OPER_AY_DI_8(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_8(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpi_8_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 dst = OPER_AY_IX_8(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_8(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpi_8_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 dst = OPER_AW_8(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_8(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpi_8_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 dst = OPER_AL_8(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_8(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpi_8_pcdi(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 dst = OPER_PCDI_8(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_8(res);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpi_8_pcix(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 dst = OPER_PCIX_8(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_8(res);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpi_16_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_16(DY(mc68kcpu));
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_16(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpi_16_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 dst = OPER_AY_AI_16(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_16(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpi_16_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 dst = OPER_AY_PI_16(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_16(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpi_16_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 dst = OPER_AY_PD_16(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_16(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpi_16_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 dst = OPER_AY_DI_16(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_16(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpi_16_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 dst = OPER_AY_IX_16(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_16(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpi_16_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 dst = OPER_AW_16(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_16(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpi_16_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 dst = OPER_AL_16(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_16(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpi_16_pcdi(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 dst = OPER_PCDI_16(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_16(res);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpi_16_pcix(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 dst = OPER_PCIX_16(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_16(res);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpi_32_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 dst = DY(mc68kcpu);
+ UINT32 res = dst - src;
+
+ if (!(mc68kcpu)->cmpild_instr_callback.isnull())
+ ((mc68kcpu)->cmpild_instr_callback)(*(mc68kcpu)->program, (mc68kcpu)->ir & 7, src, 0xffffffff);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpi_32_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 dst = OPER_AY_AI_32(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpi_32_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 dst = OPER_AY_PI_32(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpi_32_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 dst = OPER_AY_PD_32(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpi_32_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 dst = OPER_AY_DI_32(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpi_32_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 dst = OPER_AY_IX_32(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpi_32_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 dst = OPER_AW_32(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpi_32_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 dst = OPER_AL_32(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpi_32_pcdi(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 dst = OPER_PCDI_32(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpi_32_pcix(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 dst = OPER_PCIX_32(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpm_8_ax7(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AY_PI_8(mc68kcpu);
+ UINT32 dst = OPER_A7_PI_8(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_8(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpm_8_ay7(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_A7_PI_8(mc68kcpu);
+ UINT32 dst = OPER_AX_PI_8(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_8(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpm_8_axy7(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_A7_PI_8(mc68kcpu);
+ UINT32 dst = OPER_A7_PI_8(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_8(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpm_8(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AY_PI_8(mc68kcpu);
+ UINT32 dst = OPER_AX_PI_8(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_8(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpm_16(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AY_PI_16(mc68kcpu);
+ UINT32 dst = OPER_AX_PI_16(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_16(res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cmpm_32(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AY_PI_32(mc68kcpu);
+ UINT32 dst = OPER_AX_PI_32(mc68kcpu);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_cpbcc_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (cpbcc)\n",
+ (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir);
+ return;
+ }
+ m68ki_exception_1111(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_cpdbcc_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (cpdbcc)\n",
+ (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir);
+ return;
+ }
+ m68ki_exception_1111(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_cpgen_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type) && (mc68kcpu->has_fpu || mc68kcpu->has_pmmu))
+ {
+ mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (cpgen)\n",
+ (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir);
+ return;
+ }
+ m68ki_exception_1111(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_cpscc_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (cpscc)\n",
+ (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir);
+ return;
+ }
+ m68ki_exception_1111(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_cptrapcc_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (cptrapcc)\n",
+ (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir);
+ return;
+ }
+ m68ki_exception_1111(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_ftrapcc_32(m68000_base_device* mc68kcpu)
+{
+ if((mc68kcpu)->has_fpu)
+ {
+ m68881_ftrap(mc68kcpu);
+ return;
+ }
+ m68ki_exception_1111(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_dbt_16(m68000_base_device* mc68kcpu)
+{
+ REG_PC(mc68kcpu) += 2;
+}
+
+
+void m68000_base_device_ops::m68k_op_dbf_16(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(*r_dst - 1);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+ if(res != 0xffff)
+ {
+ UINT32 offset = OPER_I_16(mc68kcpu);
+ REG_PC(mc68kcpu) -= 2;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_16((mc68kcpu), offset);
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_dbcc_f_noexp;
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_dbcc_f_exp;
+}
+
+
+void m68000_base_device_ops::m68k_op_dbhi_16(m68000_base_device* mc68kcpu)
+{
+ if(COND_NOT_HI(mc68kcpu))
+ {
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(*r_dst - 1);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+ if(res != 0xffff)
+ {
+ UINT32 offset = OPER_I_16(mc68kcpu);
+ REG_PC(mc68kcpu) -= 2;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_16((mc68kcpu), offset);
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_dbcc_f_noexp;
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_dbcc_f_exp;
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+}
+
+
+void m68000_base_device_ops::m68k_op_dbls_16(m68000_base_device* mc68kcpu)
+{
+ if(COND_NOT_LS(mc68kcpu))
+ {
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(*r_dst - 1);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+ if(res != 0xffff)
+ {
+ UINT32 offset = OPER_I_16(mc68kcpu);
+ REG_PC(mc68kcpu) -= 2;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_16((mc68kcpu), offset);
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_dbcc_f_noexp;
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_dbcc_f_exp;
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+}
+
+
+void m68000_base_device_ops::m68k_op_dbcc_16(m68000_base_device* mc68kcpu)
+{
+ if(COND_NOT_CC(mc68kcpu))
+ {
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(*r_dst - 1);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+ if(res != 0xffff)
+ {
+ UINT32 offset = OPER_I_16(mc68kcpu);
+ REG_PC(mc68kcpu) -= 2;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_16((mc68kcpu), offset);
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_dbcc_f_noexp;
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_dbcc_f_exp;
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+}
+
+
+void m68000_base_device_ops::m68k_op_dbcs_16(m68000_base_device* mc68kcpu)
+{
+ if(COND_NOT_CS(mc68kcpu))
+ {
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(*r_dst - 1);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+ if(res != 0xffff)
+ {
+ UINT32 offset = OPER_I_16(mc68kcpu);
+ REG_PC(mc68kcpu) -= 2;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_16((mc68kcpu), offset);
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_dbcc_f_noexp;
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_dbcc_f_exp;
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+}
+
+
+void m68000_base_device_ops::m68k_op_dbne_16(m68000_base_device* mc68kcpu)
+{
+ if(COND_NOT_NE(mc68kcpu))
+ {
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(*r_dst - 1);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+ if(res != 0xffff)
+ {
+ UINT32 offset = OPER_I_16(mc68kcpu);
+ REG_PC(mc68kcpu) -= 2;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_16((mc68kcpu), offset);
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_dbcc_f_noexp;
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_dbcc_f_exp;
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+}
+
+
+void m68000_base_device_ops::m68k_op_dbeq_16(m68000_base_device* mc68kcpu)
+{
+ if(COND_NOT_EQ(mc68kcpu))
+ {
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(*r_dst - 1);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+ if(res != 0xffff)
+ {
+ UINT32 offset = OPER_I_16(mc68kcpu);
+ REG_PC(mc68kcpu) -= 2;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_16((mc68kcpu), offset);
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_dbcc_f_noexp;
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_dbcc_f_exp;
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+}
+
+
+void m68000_base_device_ops::m68k_op_dbvc_16(m68000_base_device* mc68kcpu)
+{
+ if(COND_NOT_VC(mc68kcpu))
+ {
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(*r_dst - 1);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+ if(res != 0xffff)
+ {
+ UINT32 offset = OPER_I_16(mc68kcpu);
+ REG_PC(mc68kcpu) -= 2;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_16((mc68kcpu), offset);
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_dbcc_f_noexp;
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_dbcc_f_exp;
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+}
+
+
+void m68000_base_device_ops::m68k_op_dbvs_16(m68000_base_device* mc68kcpu)
+{
+ if(COND_NOT_VS(mc68kcpu))
+ {
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(*r_dst - 1);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+ if(res != 0xffff)
+ {
+ UINT32 offset = OPER_I_16(mc68kcpu);
+ REG_PC(mc68kcpu) -= 2;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_16((mc68kcpu), offset);
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_dbcc_f_noexp;
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_dbcc_f_exp;
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+}
+
+
+void m68000_base_device_ops::m68k_op_dbpl_16(m68000_base_device* mc68kcpu)
+{
+ if(COND_NOT_PL(mc68kcpu))
+ {
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(*r_dst - 1);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+ if(res != 0xffff)
+ {
+ UINT32 offset = OPER_I_16(mc68kcpu);
+ REG_PC(mc68kcpu) -= 2;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_16((mc68kcpu), offset);
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_dbcc_f_noexp;
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_dbcc_f_exp;
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+}
+
+
+void m68000_base_device_ops::m68k_op_dbmi_16(m68000_base_device* mc68kcpu)
+{
+ if(COND_NOT_MI(mc68kcpu))
+ {
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(*r_dst - 1);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+ if(res != 0xffff)
+ {
+ UINT32 offset = OPER_I_16(mc68kcpu);
+ REG_PC(mc68kcpu) -= 2;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_16((mc68kcpu), offset);
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_dbcc_f_noexp;
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_dbcc_f_exp;
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+}
+
+
+void m68000_base_device_ops::m68k_op_dbge_16(m68000_base_device* mc68kcpu)
+{
+ if(COND_NOT_GE(mc68kcpu))
+ {
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(*r_dst - 1);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+ if(res != 0xffff)
+ {
+ UINT32 offset = OPER_I_16(mc68kcpu);
+ REG_PC(mc68kcpu) -= 2;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_16((mc68kcpu), offset);
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_dbcc_f_noexp;
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_dbcc_f_exp;
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+}
+
+
+void m68000_base_device_ops::m68k_op_dblt_16(m68000_base_device* mc68kcpu)
+{
+ if(COND_NOT_LT(mc68kcpu))
+ {
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(*r_dst - 1);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+ if(res != 0xffff)
+ {
+ UINT32 offset = OPER_I_16(mc68kcpu);
+ REG_PC(mc68kcpu) -= 2;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_16((mc68kcpu), offset);
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_dbcc_f_noexp;
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_dbcc_f_exp;
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+}
+
+
+void m68000_base_device_ops::m68k_op_dbgt_16(m68000_base_device* mc68kcpu)
+{
+ if(COND_NOT_GT(mc68kcpu))
+ {
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(*r_dst - 1);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+ if(res != 0xffff)
+ {
+ UINT32 offset = OPER_I_16(mc68kcpu);
+ REG_PC(mc68kcpu) -= 2;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_16((mc68kcpu), offset);
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_dbcc_f_noexp;
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_dbcc_f_exp;
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+}
+
+
+void m68000_base_device_ops::m68k_op_dble_16(m68000_base_device* mc68kcpu)
+{
+ if(COND_NOT_LE(mc68kcpu))
+ {
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(*r_dst - 1);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+ if(res != 0xffff)
+ {
+ UINT32 offset = OPER_I_16(mc68kcpu);
+ REG_PC(mc68kcpu) -= 2;
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_branch_16((mc68kcpu), offset);
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_dbcc_f_noexp;
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_dbcc_f_exp;
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+}
+
+
+void m68000_base_device_ops::m68k_op_divs_16_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ INT32 src = MAKE_INT_16(DY(mc68kcpu));
+ INT32 quotient;
+ INT32 remainder;
+
+ if(src != 0)
+ {
+ if((UINT32)*r_dst == 0x80000000 && src == -1)
+ {
+ (mc68kcpu)->not_z_flag = 0;
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ *r_dst = 0;
+ return;
+ }
+
+ quotient = MAKE_INT_32(*r_dst) / src;
+ remainder = MAKE_INT_32(*r_dst) % src;
+
+ if(quotient == MAKE_INT_16(quotient))
+ {
+ (mc68kcpu)->not_z_flag = quotient;
+ (mc68kcpu)->n_flag = NFLAG_16(quotient);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
+ return;
+ }
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
+}
+
+
+void m68000_base_device_ops::m68k_op_divs_16_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ INT32 src = MAKE_INT_16(OPER_AY_AI_16(mc68kcpu));
+ INT32 quotient;
+ INT32 remainder;
+
+ if(src != 0)
+ {
+ if((UINT32)*r_dst == 0x80000000 && src == -1)
+ {
+ (mc68kcpu)->not_z_flag = 0;
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ *r_dst = 0;
+ return;
+ }
+
+ quotient = MAKE_INT_32(*r_dst) / src;
+ remainder = MAKE_INT_32(*r_dst) % src;
+
+ if(quotient == MAKE_INT_16(quotient))
+ {
+ (mc68kcpu)->not_z_flag = quotient;
+ (mc68kcpu)->n_flag = NFLAG_16(quotient);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
+ return;
+ }
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
+}
+
+
+void m68000_base_device_ops::m68k_op_divs_16_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ INT32 src = MAKE_INT_16(OPER_AY_PI_16(mc68kcpu));
+ INT32 quotient;
+ INT32 remainder;
+
+ if(src != 0)
+ {
+ if((UINT32)*r_dst == 0x80000000 && src == -1)
+ {
+ (mc68kcpu)->not_z_flag = 0;
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ *r_dst = 0;
+ return;
+ }
+
+ quotient = MAKE_INT_32(*r_dst) / src;
+ remainder = MAKE_INT_32(*r_dst) % src;
+
+ if(quotient == MAKE_INT_16(quotient))
+ {
+ (mc68kcpu)->not_z_flag = quotient;
+ (mc68kcpu)->n_flag = NFLAG_16(quotient);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
+ return;
+ }
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
+}
+
+
+void m68000_base_device_ops::m68k_op_divs_16_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ INT32 src = MAKE_INT_16(OPER_AY_PD_16(mc68kcpu));
+ INT32 quotient;
+ INT32 remainder;
+
+ if(src != 0)
+ {
+ if((UINT32)*r_dst == 0x80000000 && src == -1)
+ {
+ (mc68kcpu)->not_z_flag = 0;
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ *r_dst = 0;
+ return;
+ }
+
+ quotient = MAKE_INT_32(*r_dst) / src;
+ remainder = MAKE_INT_32(*r_dst) % src;
+
+ if(quotient == MAKE_INT_16(quotient))
+ {
+ (mc68kcpu)->not_z_flag = quotient;
+ (mc68kcpu)->n_flag = NFLAG_16(quotient);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
+ return;
+ }
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
+}
+
+
+void m68000_base_device_ops::m68k_op_divs_16_di(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ INT32 src = MAKE_INT_16(OPER_AY_DI_16(mc68kcpu));
+ INT32 quotient;
+ INT32 remainder;
+
+ if(src != 0)
+ {
+ if((UINT32)*r_dst == 0x80000000 && src == -1)
+ {
+ (mc68kcpu)->not_z_flag = 0;
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ *r_dst = 0;
+ return;
+ }
+
+ quotient = MAKE_INT_32(*r_dst) / src;
+ remainder = MAKE_INT_32(*r_dst) % src;
+
+ if(quotient == MAKE_INT_16(quotient))
+ {
+ (mc68kcpu)->not_z_flag = quotient;
+ (mc68kcpu)->n_flag = NFLAG_16(quotient);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
+ return;
+ }
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
+}
+
+
+void m68000_base_device_ops::m68k_op_divs_16_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ INT32 src = MAKE_INT_16(OPER_AY_IX_16(mc68kcpu));
+ INT32 quotient;
+ INT32 remainder;
+
+ if(src != 0)
+ {
+ if((UINT32)*r_dst == 0x80000000 && src == -1)
+ {
+ (mc68kcpu)->not_z_flag = 0;
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ *r_dst = 0;
+ return;
+ }
+
+ quotient = MAKE_INT_32(*r_dst) / src;
+ remainder = MAKE_INT_32(*r_dst) % src;
+
+ if(quotient == MAKE_INT_16(quotient))
+ {
+ (mc68kcpu)->not_z_flag = quotient;
+ (mc68kcpu)->n_flag = NFLAG_16(quotient);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
+ return;
+ }
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
+}
+
+
+void m68000_base_device_ops::m68k_op_divs_16_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ INT32 src = MAKE_INT_16(OPER_AW_16(mc68kcpu));
+ INT32 quotient;
+ INT32 remainder;
+
+ if(src != 0)
+ {
+ if((UINT32)*r_dst == 0x80000000 && src == -1)
+ {
+ (mc68kcpu)->not_z_flag = 0;
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ *r_dst = 0;
+ return;
+ }
+
+ quotient = MAKE_INT_32(*r_dst) / src;
+ remainder = MAKE_INT_32(*r_dst) % src;
+
+ if(quotient == MAKE_INT_16(quotient))
+ {
+ (mc68kcpu)->not_z_flag = quotient;
+ (mc68kcpu)->n_flag = NFLAG_16(quotient);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
+ return;
+ }
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
+}
+
+
+void m68000_base_device_ops::m68k_op_divs_16_al(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ INT32 src = MAKE_INT_16(OPER_AL_16(mc68kcpu));
+ INT32 quotient;
+ INT32 remainder;
+
+ if(src != 0)
+ {
+ if((UINT32)*r_dst == 0x80000000 && src == -1)
+ {
+ (mc68kcpu)->not_z_flag = 0;
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ *r_dst = 0;
+ return;
+ }
+
+ quotient = MAKE_INT_32(*r_dst) / src;
+ remainder = MAKE_INT_32(*r_dst) % src;
+
+ if(quotient == MAKE_INT_16(quotient))
+ {
+ (mc68kcpu)->not_z_flag = quotient;
+ (mc68kcpu)->n_flag = NFLAG_16(quotient);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
+ return;
+ }
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
+}
+
+
+void m68000_base_device_ops::m68k_op_divs_16_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ INT32 src = MAKE_INT_16(OPER_PCDI_16(mc68kcpu));
+ INT32 quotient;
+ INT32 remainder;
+
+ if(src != 0)
+ {
+ if((UINT32)*r_dst == 0x80000000 && src == -1)
+ {
+ (mc68kcpu)->not_z_flag = 0;
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ *r_dst = 0;
+ return;
+ }
+
+ quotient = MAKE_INT_32(*r_dst) / src;
+ remainder = MAKE_INT_32(*r_dst) % src;
+
+ if(quotient == MAKE_INT_16(quotient))
+ {
+ (mc68kcpu)->not_z_flag = quotient;
+ (mc68kcpu)->n_flag = NFLAG_16(quotient);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
+ return;
+ }
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
+}
+
+
+void m68000_base_device_ops::m68k_op_divs_16_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ INT32 src = MAKE_INT_16(OPER_PCIX_16(mc68kcpu));
+ INT32 quotient;
+ INT32 remainder;
+
+ if(src != 0)
+ {
+ if((UINT32)*r_dst == 0x80000000 && src == -1)
+ {
+ (mc68kcpu)->not_z_flag = 0;
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ *r_dst = 0;
+ return;
+ }
+
+ quotient = MAKE_INT_32(*r_dst) / src;
+ remainder = MAKE_INT_32(*r_dst) % src;
+
+ if(quotient == MAKE_INT_16(quotient))
+ {
+ (mc68kcpu)->not_z_flag = quotient;
+ (mc68kcpu)->n_flag = NFLAG_16(quotient);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
+ return;
+ }
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
+}
+
+
+void m68000_base_device_ops::m68k_op_divs_16_i(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ INT32 src = MAKE_INT_16(OPER_I_16(mc68kcpu));
+ INT32 quotient;
+ INT32 remainder;
+
+ if(src != 0)
+ {
+ if((UINT32)*r_dst == 0x80000000 && src == -1)
+ {
+ (mc68kcpu)->not_z_flag = 0;
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ *r_dst = 0;
+ return;
+ }
+
+ quotient = MAKE_INT_32(*r_dst) / src;
+ remainder = MAKE_INT_32(*r_dst) % src;
+
+ if(quotient == MAKE_INT_16(quotient))
+ {
+ (mc68kcpu)->not_z_flag = quotient;
+ (mc68kcpu)->n_flag = NFLAG_16(quotient);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
+ return;
+ }
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
+}
+
+
+void m68000_base_device_ops::m68k_op_divu_16_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_16(DY(mc68kcpu));
+
+ if(src != 0)
+ {
+ UINT32 quotient = *r_dst / src;
+ UINT32 remainder = *r_dst % src;
+
+ if(quotient < 0x10000)
+ {
+ (mc68kcpu)->not_z_flag = quotient;
+ (mc68kcpu)->n_flag = NFLAG_16(quotient);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
+ return;
+ }
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
+}
+
+
+void m68000_base_device_ops::m68k_op_divu_16_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AY_AI_16(mc68kcpu);
+
+ if(src != 0)
+ {
+ UINT32 quotient = *r_dst / src;
+ UINT32 remainder = *r_dst % src;
+
+ if(quotient < 0x10000)
+ {
+ (mc68kcpu)->not_z_flag = quotient;
+ (mc68kcpu)->n_flag = NFLAG_16(quotient);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
+ return;
+ }
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
+}
+
+
+void m68000_base_device_ops::m68k_op_divu_16_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AY_PI_16(mc68kcpu);
+
+ if(src != 0)
+ {
+ UINT32 quotient = *r_dst / src;
+ UINT32 remainder = *r_dst % src;
+
+ if(quotient < 0x10000)
+ {
+ (mc68kcpu)->not_z_flag = quotient;
+ (mc68kcpu)->n_flag = NFLAG_16(quotient);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
+ return;
+ }
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
+}
+
+
+void m68000_base_device_ops::m68k_op_divu_16_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AY_PD_16(mc68kcpu);
+
+ if(src != 0)
+ {
+ UINT32 quotient = *r_dst / src;
+ UINT32 remainder = *r_dst % src;
+
+ if(quotient < 0x10000)
+ {
+ (mc68kcpu)->not_z_flag = quotient;
+ (mc68kcpu)->n_flag = NFLAG_16(quotient);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
+ return;
+ }
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
+}
+
+
+void m68000_base_device_ops::m68k_op_divu_16_di(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AY_DI_16(mc68kcpu);
+
+ if(src != 0)
+ {
+ UINT32 quotient = *r_dst / src;
+ UINT32 remainder = *r_dst % src;
+
+ if(quotient < 0x10000)
+ {
+ (mc68kcpu)->not_z_flag = quotient;
+ (mc68kcpu)->n_flag = NFLAG_16(quotient);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
+ return;
+ }
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
+}
+
+
+void m68000_base_device_ops::m68k_op_divu_16_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AY_IX_16(mc68kcpu);
+
+ if(src != 0)
+ {
+ UINT32 quotient = *r_dst / src;
+ UINT32 remainder = *r_dst % src;
+
+ if(quotient < 0x10000)
+ {
+ (mc68kcpu)->not_z_flag = quotient;
+ (mc68kcpu)->n_flag = NFLAG_16(quotient);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
+ return;
+ }
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
+}
+
+
+void m68000_base_device_ops::m68k_op_divu_16_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AW_16(mc68kcpu);
+
+ if(src != 0)
+ {
+ UINT32 quotient = *r_dst / src;
+ UINT32 remainder = *r_dst % src;
+
+ if(quotient < 0x10000)
+ {
+ (mc68kcpu)->not_z_flag = quotient;
+ (mc68kcpu)->n_flag = NFLAG_16(quotient);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
+ return;
+ }
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
+}
+
+
+void m68000_base_device_ops::m68k_op_divu_16_al(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AL_16(mc68kcpu);
+
+ if(src != 0)
+ {
+ UINT32 quotient = *r_dst / src;
+ UINT32 remainder = *r_dst % src;
+
+ if(quotient < 0x10000)
+ {
+ (mc68kcpu)->not_z_flag = quotient;
+ (mc68kcpu)->n_flag = NFLAG_16(quotient);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
+ return;
+ }
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
+}
+
+
+void m68000_base_device_ops::m68k_op_divu_16_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_PCDI_16(mc68kcpu);
+
+ if(src != 0)
+ {
+ UINT32 quotient = *r_dst / src;
+ UINT32 remainder = *r_dst % src;
+
+ if(quotient < 0x10000)
+ {
+ (mc68kcpu)->not_z_flag = quotient;
+ (mc68kcpu)->n_flag = NFLAG_16(quotient);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
+ return;
+ }
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
+}
+
+
+void m68000_base_device_ops::m68k_op_divu_16_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_PCIX_16(mc68kcpu);
+
+ if(src != 0)
+ {
+ UINT32 quotient = *r_dst / src;
+ UINT32 remainder = *r_dst % src;
+
+ if(quotient < 0x10000)
+ {
+ (mc68kcpu)->not_z_flag = quotient;
+ (mc68kcpu)->n_flag = NFLAG_16(quotient);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
+ return;
+ }
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
+}
+
+
+void m68000_base_device_ops::m68k_op_divu_16_i(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_I_16(mc68kcpu);
+
+ if(src != 0)
+ {
+ UINT32 quotient = *r_dst / src;
+ UINT32 remainder = *r_dst % src;
+
+ if(quotient < 0x10000)
+ {
+ (mc68kcpu)->not_z_flag = quotient;
+ (mc68kcpu)->n_flag = NFLAG_16(quotient);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
+ return;
+ }
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
+}
+
+
+void m68000_base_device_ops::m68k_op_divl_32_d(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT64 divisor = DY(mc68kcpu);
+ UINT64 dividend = 0;
+ UINT64 quotient = 0;
+ UINT64 remainder = 0;
+
+ if(divisor != 0)
+ {
+ if(BIT_A(word2)) /* 64 bit */
+ {
+ dividend = REG_D(mc68kcpu)[word2 & 7];
+ dividend <<= 32;
+ dividend |= REG_D(mc68kcpu)[(word2 >> 12) & 7];
+
+ if(BIT_B(word2)) /* signed */
+ {
+ quotient = (UINT64)((INT64)dividend / (INT64)((INT32)divisor));
+ remainder = (UINT64)((INT64)dividend % (INT64)((INT32)divisor));
+ if((INT64)quotient != (INT64)((INT32)quotient))
+ {
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ }
+ else /* unsigned */
+ {
+ quotient = dividend / divisor;
+ if(quotient > 0xffffffff)
+ {
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ remainder = dividend % divisor;
+ }
+ }
+ else /* 32 bit */
+ {
+ dividend = REG_D(mc68kcpu)[(word2 >> 12) & 7];
+ if(BIT_B(word2)) /* signed */
+ {
+ quotient = (UINT64)((INT64)((INT32)dividend) / (INT64)((INT32)divisor));
+ remainder = (UINT64)((INT64)((INT32)dividend) % (INT64)((INT32)divisor));
+ }
+ else /* unsigned */
+ {
+ quotient = dividend / divisor;
+ remainder = dividend % divisor;
+ }
+ }
+
+ REG_D(mc68kcpu)[word2 & 7] = remainder;
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = quotient;
+
+ (mc68kcpu)->n_flag = NFLAG_32(quotient);
+ (mc68kcpu)->not_z_flag = quotient;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ return;
+ }
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_divl_32_ai(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT64 divisor = OPER_AY_AI_32(mc68kcpu);
+ UINT64 dividend = 0;
+ UINT64 quotient = 0;
+ UINT64 remainder = 0;
+
+ if(divisor != 0)
+ {
+ if(BIT_A(word2)) /* 64 bit */
+ {
+ dividend = REG_D(mc68kcpu)[word2 & 7];
+ dividend <<= 32;
+ dividend |= REG_D(mc68kcpu)[(word2 >> 12) & 7];
+
+ if(BIT_B(word2)) /* signed */
+ {
+ quotient = (UINT64)((INT64)dividend / (INT64)((INT32)divisor));
+ remainder = (UINT64)((INT64)dividend % (INT64)((INT32)divisor));
+ if((INT64)quotient != (INT64)((INT32)quotient))
+ {
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ }
+ else /* unsigned */
+ {
+ quotient = dividend / divisor;
+ if(quotient > 0xffffffff)
+ {
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ remainder = dividend % divisor;
+ }
+ }
+ else /* 32 bit */
+ {
+ dividend = REG_D(mc68kcpu)[(word2 >> 12) & 7];
+ if(BIT_B(word2)) /* signed */
+ {
+ quotient = (UINT64)((INT64)((INT32)dividend) / (INT64)((INT32)divisor));
+ remainder = (UINT64)((INT64)((INT32)dividend) % (INT64)((INT32)divisor));
+ }
+ else /* unsigned */
+ {
+ quotient = dividend / divisor;
+ remainder = dividend % divisor;
+ }
+ }
+
+ REG_D(mc68kcpu)[word2 & 7] = remainder;
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = quotient;
+
+ (mc68kcpu)->n_flag = NFLAG_32(quotient);
+ (mc68kcpu)->not_z_flag = quotient;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ return;
+ }
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_divl_32_pi(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT64 divisor = OPER_AY_PI_32(mc68kcpu);
+ UINT64 dividend = 0;
+ UINT64 quotient = 0;
+ UINT64 remainder = 0;
+
+ if(divisor != 0)
+ {
+ if(BIT_A(word2)) /* 64 bit */
+ {
+ dividend = REG_D(mc68kcpu)[word2 & 7];
+ dividend <<= 32;
+ dividend |= REG_D(mc68kcpu)[(word2 >> 12) & 7];
+
+ if(BIT_B(word2)) /* signed */
+ {
+ quotient = (UINT64)((INT64)dividend / (INT64)((INT32)divisor));
+ remainder = (UINT64)((INT64)dividend % (INT64)((INT32)divisor));
+ if((INT64)quotient != (INT64)((INT32)quotient))
+ {
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ }
+ else /* unsigned */
+ {
+ quotient = dividend / divisor;
+ if(quotient > 0xffffffff)
+ {
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ remainder = dividend % divisor;
+ }
+ }
+ else /* 32 bit */
+ {
+ dividend = REG_D(mc68kcpu)[(word2 >> 12) & 7];
+ if(BIT_B(word2)) /* signed */
+ {
+ quotient = (UINT64)((INT64)((INT32)dividend) / (INT64)((INT32)divisor));
+ remainder = (UINT64)((INT64)((INT32)dividend) % (INT64)((INT32)divisor));
+ }
+ else /* unsigned */
+ {
+ quotient = dividend / divisor;
+ remainder = dividend % divisor;
+ }
+ }
+
+ REG_D(mc68kcpu)[word2 & 7] = remainder;
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = quotient;
+
+ (mc68kcpu)->n_flag = NFLAG_32(quotient);
+ (mc68kcpu)->not_z_flag = quotient;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ return;
+ }
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_divl_32_pd(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT64 divisor = OPER_AY_PD_32(mc68kcpu);
+ UINT64 dividend = 0;
+ UINT64 quotient = 0;
+ UINT64 remainder = 0;
+
+ if(divisor != 0)
+ {
+ if(BIT_A(word2)) /* 64 bit */
+ {
+ dividend = REG_D(mc68kcpu)[word2 & 7];
+ dividend <<= 32;
+ dividend |= REG_D(mc68kcpu)[(word2 >> 12) & 7];
+
+ if(BIT_B(word2)) /* signed */
+ {
+ quotient = (UINT64)((INT64)dividend / (INT64)((INT32)divisor));
+ remainder = (UINT64)((INT64)dividend % (INT64)((INT32)divisor));
+ if((INT64)quotient != (INT64)((INT32)quotient))
+ {
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ }
+ else /* unsigned */
+ {
+ quotient = dividend / divisor;
+ if(quotient > 0xffffffff)
+ {
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ remainder = dividend % divisor;
+ }
+ }
+ else /* 32 bit */
+ {
+ dividend = REG_D(mc68kcpu)[(word2 >> 12) & 7];
+ if(BIT_B(word2)) /* signed */
+ {
+ quotient = (UINT64)((INT64)((INT32)dividend) / (INT64)((INT32)divisor));
+ remainder = (UINT64)((INT64)((INT32)dividend) % (INT64)((INT32)divisor));
+ }
+ else /* unsigned */
+ {
+ quotient = dividend / divisor;
+ remainder = dividend % divisor;
+ }
+ }
+
+ REG_D(mc68kcpu)[word2 & 7] = remainder;
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = quotient;
+
+ (mc68kcpu)->n_flag = NFLAG_32(quotient);
+ (mc68kcpu)->not_z_flag = quotient;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ return;
+ }
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_divl_32_di(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT64 divisor = OPER_AY_DI_32(mc68kcpu);
+ UINT64 dividend = 0;
+ UINT64 quotient = 0;
+ UINT64 remainder = 0;
+
+ if(divisor != 0)
+ {
+ if(BIT_A(word2)) /* 64 bit */
+ {
+ dividend = REG_D(mc68kcpu)[word2 & 7];
+ dividend <<= 32;
+ dividend |= REG_D(mc68kcpu)[(word2 >> 12) & 7];
+
+ if(BIT_B(word2)) /* signed */
+ {
+ quotient = (UINT64)((INT64)dividend / (INT64)((INT32)divisor));
+ remainder = (UINT64)((INT64)dividend % (INT64)((INT32)divisor));
+ if((INT64)quotient != (INT64)((INT32)quotient))
+ {
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ }
+ else /* unsigned */
+ {
+ quotient = dividend / divisor;
+ if(quotient > 0xffffffff)
+ {
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ remainder = dividend % divisor;
+ }
+ }
+ else /* 32 bit */
+ {
+ dividend = REG_D(mc68kcpu)[(word2 >> 12) & 7];
+ if(BIT_B(word2)) /* signed */
+ {
+ quotient = (UINT64)((INT64)((INT32)dividend) / (INT64)((INT32)divisor));
+ remainder = (UINT64)((INT64)((INT32)dividend) % (INT64)((INT32)divisor));
+ }
+ else /* unsigned */
+ {
+ quotient = dividend / divisor;
+ remainder = dividend % divisor;
+ }
+ }
+
+ REG_D(mc68kcpu)[word2 & 7] = remainder;
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = quotient;
+
+ (mc68kcpu)->n_flag = NFLAG_32(quotient);
+ (mc68kcpu)->not_z_flag = quotient;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ return;
+ }
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_divl_32_ix(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT64 divisor = OPER_AY_IX_32(mc68kcpu);
+ UINT64 dividend = 0;
+ UINT64 quotient = 0;
+ UINT64 remainder = 0;
+
+ if(divisor != 0)
+ {
+ if(BIT_A(word2)) /* 64 bit */
+ {
+ dividend = REG_D(mc68kcpu)[word2 & 7];
+ dividend <<= 32;
+ dividend |= REG_D(mc68kcpu)[(word2 >> 12) & 7];
+
+ if(BIT_B(word2)) /* signed */
+ {
+ quotient = (UINT64)((INT64)dividend / (INT64)((INT32)divisor));
+ remainder = (UINT64)((INT64)dividend % (INT64)((INT32)divisor));
+ if((INT64)quotient != (INT64)((INT32)quotient))
+ {
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ }
+ else /* unsigned */
+ {
+ quotient = dividend / divisor;
+ if(quotient > 0xffffffff)
+ {
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ remainder = dividend % divisor;
+ }
+ }
+ else /* 32 bit */
+ {
+ dividend = REG_D(mc68kcpu)[(word2 >> 12) & 7];
+ if(BIT_B(word2)) /* signed */
+ {
+ quotient = (UINT64)((INT64)((INT32)dividend) / (INT64)((INT32)divisor));
+ remainder = (UINT64)((INT64)((INT32)dividend) % (INT64)((INT32)divisor));
+ }
+ else /* unsigned */
+ {
+ quotient = dividend / divisor;
+ remainder = dividend % divisor;
+ }
+ }
+
+ REG_D(mc68kcpu)[word2 & 7] = remainder;
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = quotient;
+
+ (mc68kcpu)->n_flag = NFLAG_32(quotient);
+ (mc68kcpu)->not_z_flag = quotient;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ return;
+ }
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_divl_32_aw(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT64 divisor = OPER_AW_32(mc68kcpu);
+ UINT64 dividend = 0;
+ UINT64 quotient = 0;
+ UINT64 remainder = 0;
+
+ if(divisor != 0)
+ {
+ if(BIT_A(word2)) /* 64 bit */
+ {
+ dividend = REG_D(mc68kcpu)[word2 & 7];
+ dividend <<= 32;
+ dividend |= REG_D(mc68kcpu)[(word2 >> 12) & 7];
+
+ if(BIT_B(word2)) /* signed */
+ {
+ quotient = (UINT64)((INT64)dividend / (INT64)((INT32)divisor));
+ remainder = (UINT64)((INT64)dividend % (INT64)((INT32)divisor));
+ if((INT64)quotient != (INT64)((INT32)quotient))
+ {
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ }
+ else /* unsigned */
+ {
+ quotient = dividend / divisor;
+ if(quotient > 0xffffffff)
+ {
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ remainder = dividend % divisor;
+ }
+ }
+ else /* 32 bit */
+ {
+ dividend = REG_D(mc68kcpu)[(word2 >> 12) & 7];
+ if(BIT_B(word2)) /* signed */
+ {
+ quotient = (UINT64)((INT64)((INT32)dividend) / (INT64)((INT32)divisor));
+ remainder = (UINT64)((INT64)((INT32)dividend) % (INT64)((INT32)divisor));
+ }
+ else /* unsigned */
+ {
+ quotient = dividend / divisor;
+ remainder = dividend % divisor;
+ }
+ }
+
+ REG_D(mc68kcpu)[word2 & 7] = remainder;
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = quotient;
+
+ (mc68kcpu)->n_flag = NFLAG_32(quotient);
+ (mc68kcpu)->not_z_flag = quotient;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ return;
+ }
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_divl_32_al(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT64 divisor = OPER_AL_32(mc68kcpu);
+ UINT64 dividend = 0;
+ UINT64 quotient = 0;
+ UINT64 remainder = 0;
+
+ if(divisor != 0)
+ {
+ if(BIT_A(word2)) /* 64 bit */
+ {
+ dividend = REG_D(mc68kcpu)[word2 & 7];
+ dividend <<= 32;
+ dividend |= REG_D(mc68kcpu)[(word2 >> 12) & 7];
+
+ if(BIT_B(word2)) /* signed */
+ {
+ quotient = (UINT64)((INT64)dividend / (INT64)((INT32)divisor));
+ remainder = (UINT64)((INT64)dividend % (INT64)((INT32)divisor));
+ if((INT64)quotient != (INT64)((INT32)quotient))
+ {
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ }
+ else /* unsigned */
+ {
+ quotient = dividend / divisor;
+ if(quotient > 0xffffffff)
+ {
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ remainder = dividend % divisor;
+ }
+ }
+ else /* 32 bit */
+ {
+ dividend = REG_D(mc68kcpu)[(word2 >> 12) & 7];
+ if(BIT_B(word2)) /* signed */
+ {
+ quotient = (UINT64)((INT64)((INT32)dividend) / (INT64)((INT32)divisor));
+ remainder = (UINT64)((INT64)((INT32)dividend) % (INT64)((INT32)divisor));
+ }
+ else /* unsigned */
+ {
+ quotient = dividend / divisor;
+ remainder = dividend % divisor;
+ }
+ }
+
+ REG_D(mc68kcpu)[word2 & 7] = remainder;
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = quotient;
+
+ (mc68kcpu)->n_flag = NFLAG_32(quotient);
+ (mc68kcpu)->not_z_flag = quotient;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ return;
+ }
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_divl_32_pcdi(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT64 divisor = OPER_PCDI_32(mc68kcpu);
+ UINT64 dividend = 0;
+ UINT64 quotient = 0;
+ UINT64 remainder = 0;
+
+ if(divisor != 0)
+ {
+ if(BIT_A(word2)) /* 64 bit */
+ {
+ dividend = REG_D(mc68kcpu)[word2 & 7];
+ dividend <<= 32;
+ dividend |= REG_D(mc68kcpu)[(word2 >> 12) & 7];
+
+ if(BIT_B(word2)) /* signed */
+ {
+ quotient = (UINT64)((INT64)dividend / (INT64)((INT32)divisor));
+ remainder = (UINT64)((INT64)dividend % (INT64)((INT32)divisor));
+ if((INT64)quotient != (INT64)((INT32)quotient))
+ {
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ }
+ else /* unsigned */
+ {
+ quotient = dividend / divisor;
+ if(quotient > 0xffffffff)
+ {
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ remainder = dividend % divisor;
+ }
+ }
+ else /* 32 bit */
+ {
+ dividend = REG_D(mc68kcpu)[(word2 >> 12) & 7];
+ if(BIT_B(word2)) /* signed */
+ {
+ quotient = (UINT64)((INT64)((INT32)dividend) / (INT64)((INT32)divisor));
+ remainder = (UINT64)((INT64)((INT32)dividend) % (INT64)((INT32)divisor));
+ }
+ else /* unsigned */
+ {
+ quotient = dividend / divisor;
+ remainder = dividend % divisor;
+ }
+ }
+
+ REG_D(mc68kcpu)[word2 & 7] = remainder;
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = quotient;
+
+ (mc68kcpu)->n_flag = NFLAG_32(quotient);
+ (mc68kcpu)->not_z_flag = quotient;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ return;
+ }
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_divl_32_pcix(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT64 divisor = OPER_PCIX_32(mc68kcpu);
+ UINT64 dividend = 0;
+ UINT64 quotient = 0;
+ UINT64 remainder = 0;
+
+ if(divisor != 0)
+ {
+ if(BIT_A(word2)) /* 64 bit */
+ {
+ dividend = REG_D(mc68kcpu)[word2 & 7];
+ dividend <<= 32;
+ dividend |= REG_D(mc68kcpu)[(word2 >> 12) & 7];
+
+ if(BIT_B(word2)) /* signed */
+ {
+ quotient = (UINT64)((INT64)dividend / (INT64)((INT32)divisor));
+ remainder = (UINT64)((INT64)dividend % (INT64)((INT32)divisor));
+ if((INT64)quotient != (INT64)((INT32)quotient))
+ {
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ }
+ else /* unsigned */
+ {
+ quotient = dividend / divisor;
+ if(quotient > 0xffffffff)
+ {
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ remainder = dividend % divisor;
+ }
+ }
+ else /* 32 bit */
+ {
+ dividend = REG_D(mc68kcpu)[(word2 >> 12) & 7];
+ if(BIT_B(word2)) /* signed */
+ {
+ quotient = (UINT64)((INT64)((INT32)dividend) / (INT64)((INT32)divisor));
+ remainder = (UINT64)((INT64)((INT32)dividend) % (INT64)((INT32)divisor));
+ }
+ else /* unsigned */
+ {
+ quotient = dividend / divisor;
+ remainder = dividend % divisor;
+ }
+ }
+
+ REG_D(mc68kcpu)[word2 & 7] = remainder;
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = quotient;
+
+ (mc68kcpu)->n_flag = NFLAG_32(quotient);
+ (mc68kcpu)->not_z_flag = quotient;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ return;
+ }
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_divl_32_i(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT64 divisor = OPER_I_32(mc68kcpu);
+ UINT64 dividend = 0;
+ UINT64 quotient = 0;
+ UINT64 remainder = 0;
+
+ if(divisor != 0)
+ {
+ if(BIT_A(word2)) /* 64 bit */
+ {
+ dividend = REG_D(mc68kcpu)[word2 & 7];
+ dividend <<= 32;
+ dividend |= REG_D(mc68kcpu)[(word2 >> 12) & 7];
+
+ if(BIT_B(word2)) /* signed */
+ {
+ quotient = (UINT64)((INT64)dividend / (INT64)((INT32)divisor));
+ remainder = (UINT64)((INT64)dividend % (INT64)((INT32)divisor));
+ if((INT64)quotient != (INT64)((INT32)quotient))
+ {
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ }
+ else /* unsigned */
+ {
+ quotient = dividend / divisor;
+ if(quotient > 0xffffffff)
+ {
+ (mc68kcpu)->v_flag = VFLAG_SET;
+ return;
+ }
+ remainder = dividend % divisor;
+ }
+ }
+ else /* 32 bit */
+ {
+ dividend = REG_D(mc68kcpu)[(word2 >> 12) & 7];
+ if(BIT_B(word2)) /* signed */
+ {
+ quotient = (UINT64)((INT64)((INT32)dividend) / (INT64)((INT32)divisor));
+ remainder = (UINT64)((INT64)((INT32)dividend) % (INT64)((INT32)divisor));
+ }
+ else /* unsigned */
+ {
+ quotient = dividend / divisor;
+ remainder = dividend % divisor;
+ }
+ }
+
+ REG_D(mc68kcpu)[word2 & 7] = remainder;
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = quotient;
+
+ (mc68kcpu)->n_flag = NFLAG_32(quotient);
+ (mc68kcpu)->not_z_flag = quotient;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ return;
+ }
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_eor_8_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_8(DY(mc68kcpu) ^= MASK_OUT_ABOVE_8(DX(mc68kcpu)));
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eor_8_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_8(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_8(DX(mc68kcpu) ^ m68ki_read_8((mc68kcpu), ea));
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eor_8_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_8(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_8(DX(mc68kcpu) ^ m68ki_read_8((mc68kcpu), ea));
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eor_8_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_A7_PI_8(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_8(DX(mc68kcpu) ^ m68ki_read_8((mc68kcpu), ea));
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eor_8_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_8(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_8(DX(mc68kcpu) ^ m68ki_read_8((mc68kcpu), ea));
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eor_8_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_8(DX(mc68kcpu) ^ m68ki_read_8((mc68kcpu), ea));
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eor_8_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_8(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_8(DX(mc68kcpu) ^ m68ki_read_8((mc68kcpu), ea));
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eor_8_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_8(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_8(DX(mc68kcpu) ^ m68ki_read_8((mc68kcpu), ea));
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eor_8_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_8(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_8(DX(mc68kcpu) ^ m68ki_read_8((mc68kcpu), ea));
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eor_8_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_8(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_8(DX(mc68kcpu) ^ m68ki_read_8((mc68kcpu), ea));
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eor_16_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_16(DY(mc68kcpu) ^= MASK_OUT_ABOVE_16(DX(mc68kcpu)));
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eor_16_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_16(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(DX(mc68kcpu) ^ m68ki_read_16((mc68kcpu), ea));
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eor_16_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_16(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(DX(mc68kcpu) ^ m68ki_read_16((mc68kcpu), ea));
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eor_16_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_16(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(DX(mc68kcpu) ^ m68ki_read_16((mc68kcpu), ea));
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eor_16_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_16(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(DX(mc68kcpu) ^ m68ki_read_16((mc68kcpu), ea));
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eor_16_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_16(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(DX(mc68kcpu) ^ m68ki_read_16((mc68kcpu), ea));
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eor_16_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_16(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(DX(mc68kcpu) ^ m68ki_read_16((mc68kcpu), ea));
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eor_16_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_16(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(DX(mc68kcpu) ^ m68ki_read_16((mc68kcpu), ea));
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eor_32_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = DY(mc68kcpu) ^= DX(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eor_32_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_32(mc68kcpu);
+ UINT32 res = DX(mc68kcpu) ^ m68ki_read_32((mc68kcpu), ea);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eor_32_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_32(mc68kcpu);
+ UINT32 res = DX(mc68kcpu) ^ m68ki_read_32((mc68kcpu), ea);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eor_32_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_32(mc68kcpu);
+ UINT32 res = DX(mc68kcpu) ^ m68ki_read_32((mc68kcpu), ea);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eor_32_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_32(mc68kcpu);
+ UINT32 res = DX(mc68kcpu) ^ m68ki_read_32((mc68kcpu), ea);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eor_32_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_32(mc68kcpu);
+ UINT32 res = DX(mc68kcpu) ^ m68ki_read_32((mc68kcpu), ea);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eor_32_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_32(mc68kcpu);
+ UINT32 res = DX(mc68kcpu) ^ m68ki_read_32((mc68kcpu), ea);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eor_32_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_32(mc68kcpu);
+ UINT32 res = DX(mc68kcpu) ^ m68ki_read_32((mc68kcpu), ea);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eori_8_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_8(DY(mc68kcpu) ^= OPER_I_8(mc68kcpu));
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eori_8_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AY_AI_8(mc68kcpu);
+ UINT32 res = src ^ m68ki_read_8((mc68kcpu), ea);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eori_8_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AY_PI_8(mc68kcpu);
+ UINT32 res = src ^ m68ki_read_8((mc68kcpu), ea);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eori_8_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_A7_PI_8(mc68kcpu);
+ UINT32 res = src ^ m68ki_read_8((mc68kcpu), ea);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eori_8_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AY_PD_8(mc68kcpu);
+ UINT32 res = src ^ m68ki_read_8((mc68kcpu), ea);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eori_8_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+ UINT32 res = src ^ m68ki_read_8((mc68kcpu), ea);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eori_8_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AY_DI_8(mc68kcpu);
+ UINT32 res = src ^ m68ki_read_8((mc68kcpu), ea);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eori_8_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AY_IX_8(mc68kcpu);
+ UINT32 res = src ^ m68ki_read_8((mc68kcpu), ea);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eori_8_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AW_8(mc68kcpu);
+ UINT32 res = src ^ m68ki_read_8((mc68kcpu), ea);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eori_8_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AL_8(mc68kcpu);
+ UINT32 res = src ^ m68ki_read_8((mc68kcpu), ea);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eori_16_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_16(DY(mc68kcpu) ^= OPER_I_16(mc68kcpu));
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eori_16_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_AI_16(mc68kcpu);
+ UINT32 res = src ^ m68ki_read_16((mc68kcpu), ea);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eori_16_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_PI_16(mc68kcpu);
+ UINT32 res = src ^ m68ki_read_16((mc68kcpu), ea);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eori_16_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_PD_16(mc68kcpu);
+ UINT32 res = src ^ m68ki_read_16((mc68kcpu), ea);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eori_16_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_DI_16(mc68kcpu);
+ UINT32 res = src ^ m68ki_read_16((mc68kcpu), ea);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eori_16_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_IX_16(mc68kcpu);
+ UINT32 res = src ^ m68ki_read_16((mc68kcpu), ea);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eori_16_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AW_16(mc68kcpu);
+ UINT32 res = src ^ m68ki_read_16((mc68kcpu), ea);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eori_16_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AL_16(mc68kcpu);
+ UINT32 res = src ^ m68ki_read_16((mc68kcpu), ea);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eori_32_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = DY(mc68kcpu) ^= OPER_I_32(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eori_32_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AY_AI_32(mc68kcpu);
+ UINT32 res = src ^ m68ki_read_32((mc68kcpu), ea);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eori_32_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AY_PI_32(mc68kcpu);
+ UINT32 res = src ^ m68ki_read_32((mc68kcpu), ea);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eori_32_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AY_PD_32(mc68kcpu);
+ UINT32 res = src ^ m68ki_read_32((mc68kcpu), ea);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eori_32_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AY_DI_32(mc68kcpu);
+ UINT32 res = src ^ m68ki_read_32((mc68kcpu), ea);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eori_32_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AY_IX_32(mc68kcpu);
+ UINT32 res = src ^ m68ki_read_32((mc68kcpu), ea);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eori_32_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AW_32(mc68kcpu);
+ UINT32 res = src ^ m68ki_read_32((mc68kcpu), ea);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eori_32_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AL_32(mc68kcpu);
+ UINT32 res = src ^ m68ki_read_32((mc68kcpu), ea);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_eori_16_toc(m68000_base_device* mc68kcpu)
+{
+ m68ki_set_ccr((mc68kcpu), m68ki_get_ccr(mc68kcpu) ^ OPER_I_16(mc68kcpu));
+}
+
+
+void m68000_base_device_ops::m68k_op_eori_16_tos(m68000_base_device* mc68kcpu)
+{
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 src = OPER_I_16(mc68kcpu);
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_set_sr((mc68kcpu), m68ki_get_sr(mc68kcpu) ^ src);
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_exg_32_dd(m68000_base_device* mc68kcpu)
+{
+ UINT32* reg_a = &DX(mc68kcpu);
+ UINT32* reg_b = &DY(mc68kcpu);
+ UINT32 tmp = *reg_a;
+ *reg_a = *reg_b;
+ *reg_b = tmp;
+}
+
+
+void m68000_base_device_ops::m68k_op_exg_32_aa(m68000_base_device* mc68kcpu)
+{
+ UINT32* reg_a = &AX(mc68kcpu);
+ UINT32* reg_b = &AY(mc68kcpu);
+ UINT32 tmp = *reg_a;
+ *reg_a = *reg_b;
+ *reg_b = tmp;
+}
+
+
+void m68000_base_device_ops::m68k_op_exg_32_da(m68000_base_device* mc68kcpu)
+{
+ UINT32* reg_a = &DX(mc68kcpu);
+ UINT32* reg_b = &AY(mc68kcpu);
+ UINT32 tmp = *reg_a;
+ *reg_a = *reg_b;
+ *reg_b = tmp;
+}
+
+
+void m68000_base_device_ops::m68k_op_ext_16(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | MASK_OUT_ABOVE_8(*r_dst) | (GET_MSB_8(*r_dst) ? 0xff00 : 0);
+
+ (mc68kcpu)->n_flag = NFLAG_16(*r_dst);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(*r_dst);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ext_32(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+
+ *r_dst = MASK_OUT_ABOVE_16(*r_dst) | (GET_MSB_16(*r_dst) ? 0xffff0000 : 0);
+
+ (mc68kcpu)->n_flag = NFLAG_32(*r_dst);
+ (mc68kcpu)->not_z_flag = *r_dst;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_extb_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32* r_dst = &DY(mc68kcpu);
+
+ *r_dst = MASK_OUT_ABOVE_8(*r_dst) | (GET_MSB_8(*r_dst) ? 0xffffff00 : 0);
+
+ (mc68kcpu)->n_flag = NFLAG_32(*r_dst);
+ (mc68kcpu)->not_z_flag = *r_dst;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_illegal(m68000_base_device* mc68kcpu)
+{
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_jmp_32_ai(m68000_base_device* mc68kcpu)
+{
+ m68ki_jump((mc68kcpu), EA_AY_AI_32(mc68kcpu));
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ if(REG_PC(mc68kcpu) == REG_PPC(mc68kcpu) && (mc68kcpu)->remaining_cycles > 0)
+ (mc68kcpu)->remaining_cycles = 0;
+}
+
+
+void m68000_base_device_ops::m68k_op_jmp_32_di(m68000_base_device* mc68kcpu)
+{
+ m68ki_jump((mc68kcpu), EA_AY_DI_32(mc68kcpu));
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ if(REG_PC(mc68kcpu) == REG_PPC(mc68kcpu) && (mc68kcpu)->remaining_cycles > 0)
+ (mc68kcpu)->remaining_cycles = 0;
+}
+
+
+void m68000_base_device_ops::m68k_op_jmp_32_ix(m68000_base_device* mc68kcpu)
+{
+ m68ki_jump((mc68kcpu), EA_AY_IX_32(mc68kcpu));
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ if(REG_PC(mc68kcpu) == REG_PPC(mc68kcpu) && (mc68kcpu)->remaining_cycles > 0)
+ (mc68kcpu)->remaining_cycles = 0;
+}
+
+
+void m68000_base_device_ops::m68k_op_jmp_32_aw(m68000_base_device* mc68kcpu)
+{
+ m68ki_jump((mc68kcpu), EA_AW_32(mc68kcpu));
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ if(REG_PC(mc68kcpu) == REG_PPC(mc68kcpu) && (mc68kcpu)->remaining_cycles > 0)
+ (mc68kcpu)->remaining_cycles = 0;
+}
+
+
+void m68000_base_device_ops::m68k_op_jmp_32_al(m68000_base_device* mc68kcpu)
+{
+ m68ki_jump((mc68kcpu), EA_AL_32(mc68kcpu));
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ if(REG_PC(mc68kcpu) == REG_PPC(mc68kcpu) && (mc68kcpu)->remaining_cycles > 0)
+ (mc68kcpu)->remaining_cycles = 0;
+}
+
+
+void m68000_base_device_ops::m68k_op_jmp_32_pcdi(m68000_base_device* mc68kcpu)
+{
+ m68ki_jump((mc68kcpu), EA_PCDI_32(mc68kcpu));
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ if(REG_PC(mc68kcpu) == REG_PPC(mc68kcpu) && (mc68kcpu)->remaining_cycles > 0)
+ (mc68kcpu)->remaining_cycles = 0;
+}
+
+
+void m68000_base_device_ops::m68k_op_jmp_32_pcix(m68000_base_device* mc68kcpu)
+{
+ m68ki_jump((mc68kcpu), EA_PCIX_32(mc68kcpu));
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ if(REG_PC(mc68kcpu) == REG_PPC(mc68kcpu) && (mc68kcpu)->remaining_cycles > 0)
+ (mc68kcpu)->remaining_cycles = 0;
+}
+
+
+void m68000_base_device_ops::m68k_op_jsr_32_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_32(mc68kcpu);
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_push_32((mc68kcpu), REG_PC(mc68kcpu));
+ m68ki_jump((mc68kcpu), ea);
+}
+
+
+void m68000_base_device_ops::m68k_op_jsr_32_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_32(mc68kcpu);
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_push_32((mc68kcpu), REG_PC(mc68kcpu));
+ m68ki_jump((mc68kcpu), ea);
+}
+
+
+void m68000_base_device_ops::m68k_op_jsr_32_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_32(mc68kcpu);
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_push_32((mc68kcpu), REG_PC(mc68kcpu));
+ m68ki_jump((mc68kcpu), ea);
+}
+
+
+void m68000_base_device_ops::m68k_op_jsr_32_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_32(mc68kcpu);
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_push_32((mc68kcpu), REG_PC(mc68kcpu));
+ m68ki_jump((mc68kcpu), ea);
+}
+
+
+void m68000_base_device_ops::m68k_op_jsr_32_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_32(mc68kcpu);
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_push_32((mc68kcpu), REG_PC(mc68kcpu));
+ m68ki_jump((mc68kcpu), ea);
+}
+
+
+void m68000_base_device_ops::m68k_op_jsr_32_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_PCDI_32(mc68kcpu);
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_push_32((mc68kcpu), REG_PC(mc68kcpu));
+ m68ki_jump((mc68kcpu), ea);
+}
+
+
+void m68000_base_device_ops::m68k_op_jsr_32_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_PCIX_32(mc68kcpu);
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_push_32((mc68kcpu), REG_PC(mc68kcpu));
+ m68ki_jump((mc68kcpu), ea);
+}
+
+
+void m68000_base_device_ops::m68k_op_lea_32_ai(m68000_base_device* mc68kcpu)
+{
+ AX(mc68kcpu) = EA_AY_AI_32(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_lea_32_di(m68000_base_device* mc68kcpu)
+{
+ AX(mc68kcpu) = EA_AY_DI_32(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_lea_32_ix(m68000_base_device* mc68kcpu)
+{
+ AX(mc68kcpu) = EA_AY_IX_32(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_lea_32_aw(m68000_base_device* mc68kcpu)
+{
+ AX(mc68kcpu) = EA_AW_32(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_lea_32_al(m68000_base_device* mc68kcpu)
+{
+ AX(mc68kcpu) = EA_AL_32(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_lea_32_pcdi(m68000_base_device* mc68kcpu)
+{
+ AX(mc68kcpu) = EA_PCDI_32(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_lea_32_pcix(m68000_base_device* mc68kcpu)
+{
+ AX(mc68kcpu) = EA_PCIX_32(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_link_16_a7(m68000_base_device* mc68kcpu)
+{
+ REG_A(mc68kcpu)[7] -= 4;
+ m68ki_write_32((mc68kcpu), REG_A(mc68kcpu)[7], REG_A(mc68kcpu)[7]);
+ REG_A(mc68kcpu)[7] = MASK_OUT_ABOVE_32(REG_A(mc68kcpu)[7] + MAKE_INT_16(OPER_I_16(mc68kcpu)));
+}
+
+
+void m68000_base_device_ops::m68k_op_link_16(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AY(mc68kcpu);
+
+ m68ki_push_32((mc68kcpu), *r_dst);
+ *r_dst = REG_A(mc68kcpu)[7];
+ REG_A(mc68kcpu)[7] = MASK_OUT_ABOVE_32(REG_A(mc68kcpu)[7] + MAKE_INT_16(OPER_I_16(mc68kcpu)));
+}
+
+
+void m68000_base_device_ops::m68k_op_link_32_a7(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ REG_A(mc68kcpu)[7] -= 4;
+ m68ki_write_32((mc68kcpu), REG_A(mc68kcpu)[7], REG_A(mc68kcpu)[7]);
+ REG_A(mc68kcpu)[7] = MASK_OUT_ABOVE_32(REG_A(mc68kcpu)[7] + OPER_I_32(mc68kcpu));
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_link_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32* r_dst = &AY(mc68kcpu);
+
+ m68ki_push_32((mc68kcpu), *r_dst);
+ *r_dst = REG_A(mc68kcpu)[7];
+ REG_A(mc68kcpu)[7] = MASK_OUT_ABOVE_32(REG_A(mc68kcpu)[7] + OPER_I_32(mc68kcpu));
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_lsr_8_s(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 src = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = src >> shift;
+
+ if(shift != 0)
+ (mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src << (9-shift);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_lsr_16_s(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 src = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = src >> shift;
+
+ if(shift != 0)
+ (mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src << (9-shift);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_lsr_32_s(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 src = *r_dst;
+ UINT32 res = src >> shift;
+
+ if(shift != 0)
+ (mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
+
+ *r_dst = res;
+
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src << (9-shift);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_lsr_8_r(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 shift = DX(mc68kcpu) & 0x3f;
+ UINT32 src = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = src >> shift;
+
+ if(shift != 0)
+ {
+ (mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
+
+ if(shift <= 8)
+ {
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src << (9-shift);
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ return;
+ }
+
+ *r_dst &= 0xffffff00;
+ (mc68kcpu)->x_flag = XFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = ZFLAG_SET;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ return;
+ }
+
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->n_flag = NFLAG_8(src);
+ (mc68kcpu)->not_z_flag = src;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_lsr_16_r(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 shift = DX(mc68kcpu) & 0x3f;
+ UINT32 src = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = src >> shift;
+
+ if(shift != 0)
+ {
+ (mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
+
+ if(shift <= 16)
+ {
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = (src >> (shift - 1))<<8;
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ return;
+ }
+
+ *r_dst &= 0xffff0000;
+ (mc68kcpu)->x_flag = XFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = ZFLAG_SET;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ return;
+ }
+
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->n_flag = NFLAG_16(src);
+ (mc68kcpu)->not_z_flag = src;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_lsr_32_r(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 shift = DX(mc68kcpu) & 0x3f;
+ UINT32 src = *r_dst;
+ UINT32 res = src >> shift;
+
+ if(shift != 0)
+ {
+ (mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
+
+ if(shift < 32)
+ {
+ *r_dst = res;
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = (src >> (shift - 1))<<8;
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ return;
+ }
+
+ *r_dst = 0;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = (shift == 32 ? GET_MSB_32(src)>>23 : 0);
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = ZFLAG_SET;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ return;
+ }
+
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->n_flag = NFLAG_32(src);
+ (mc68kcpu)->not_z_flag = src;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_lsr_16_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = src >> 1;
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = src << 8;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_lsr_16_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = src >> 1;
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = src << 8;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_lsr_16_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = src >> 1;
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = src << 8;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_lsr_16_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = src >> 1;
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = src << 8;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_lsr_16_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = src >> 1;
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = src << 8;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_lsr_16_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = src >> 1;
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = src << 8;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_lsr_16_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = src >> 1;
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = src << 8;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_lsl_8_s(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 src = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = MASK_OUT_ABOVE_8(src << shift);
+
+ if(shift != 0)
+ (mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src << shift;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_lsl_16_s(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 src = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = MASK_OUT_ABOVE_16(src << shift);
+
+ if(shift != 0)
+ (mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src >> (8-shift);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_lsl_32_s(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 src = *r_dst;
+ UINT32 res = MASK_OUT_ABOVE_32(src << shift);
+
+ if(shift != 0)
+ (mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
+
+ *r_dst = res;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src >> (24-shift);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_lsl_8_r(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 shift = DX(mc68kcpu) & 0x3f;
+ UINT32 src = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = MASK_OUT_ABOVE_8(src << shift);
+
+ if(shift != 0)
+ {
+ (mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
+
+ if(shift <= 8)
+ {
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src << shift;
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ return;
+ }
+
+ *r_dst &= 0xffffff00;
+ (mc68kcpu)->x_flag = XFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = ZFLAG_SET;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ return;
+ }
+
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->n_flag = NFLAG_8(src);
+ (mc68kcpu)->not_z_flag = src;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_lsl_16_r(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 shift = DX(mc68kcpu) & 0x3f;
+ UINT32 src = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = MASK_OUT_ABOVE_16(src << shift);
+
+ if(shift != 0)
+ {
+ (mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
+
+ if(shift <= 16)
+ {
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = (src << shift) >> 8;
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ return;
+ }
+
+ *r_dst &= 0xffff0000;
+ (mc68kcpu)->x_flag = XFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = ZFLAG_SET;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ return;
+ }
+
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->n_flag = NFLAG_16(src);
+ (mc68kcpu)->not_z_flag = src;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_lsl_32_r(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 shift = DX(mc68kcpu) & 0x3f;
+ UINT32 src = *r_dst;
+ UINT32 res = MASK_OUT_ABOVE_32(src << shift);
+
+ if(shift != 0)
+ {
+ (mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
+
+ if(shift < 32)
+ {
+ *r_dst = res;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = (src >> (32 - shift)) << 8;
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ return;
+ }
+
+ *r_dst = 0;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = ((shift == 32 ? src & 1 : 0))<<8;
+ (mc68kcpu)->n_flag = NFLAG_CLEAR;
+ (mc68kcpu)->not_z_flag = ZFLAG_SET;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ return;
+ }
+
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->n_flag = NFLAG_32(src);
+ (mc68kcpu)->not_z_flag = src;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_lsl_16_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = MASK_OUT_ABOVE_16(src << 1);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src >> 7;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_lsl_16_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = MASK_OUT_ABOVE_16(src << 1);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src >> 7;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_lsl_16_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = MASK_OUT_ABOVE_16(src << 1);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src >> 7;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_lsl_16_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = MASK_OUT_ABOVE_16(src << 1);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src >> 7;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_lsl_16_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = MASK_OUT_ABOVE_16(src << 1);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src >> 7;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_lsl_16_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = MASK_OUT_ABOVE_16(src << 1);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src >> 7;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_lsl_16_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = MASK_OUT_ABOVE_16(src << 1);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src >> 7;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_d_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_8(DY(mc68kcpu));
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_d_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_AI_8(mc68kcpu);
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_d_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PI_8(mc68kcpu);
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_d_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_A7_PI_8(mc68kcpu);
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_d_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PD_8(mc68kcpu);
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_d_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_A7_PD_8(mc68kcpu);
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_d_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_DI_8(mc68kcpu);
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_d_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_IX_8(mc68kcpu);
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_d_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AW_8(mc68kcpu);
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_d_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AL_8(mc68kcpu);
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_d_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCDI_8(mc68kcpu);
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_d_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCIX_8(mc68kcpu);
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_d_i(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_I_8(mc68kcpu);
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_ai_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_8(DY(mc68kcpu));
+ UINT32 ea = EA_AX_AI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_ai_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_AI_8(mc68kcpu);
+ UINT32 ea = EA_AX_AI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_ai_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PI_8(mc68kcpu);
+ UINT32 ea = EA_AX_AI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_ai_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_A7_PI_8(mc68kcpu);
+ UINT32 ea = EA_AX_AI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_ai_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PD_8(mc68kcpu);
+ UINT32 ea = EA_AX_AI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_ai_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_A7_PD_8(mc68kcpu);
+ UINT32 ea = EA_AX_AI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_ai_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_DI_8(mc68kcpu);
+ UINT32 ea = EA_AX_AI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_ai_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_IX_8(mc68kcpu);
+ UINT32 ea = EA_AX_AI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_ai_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AW_8(mc68kcpu);
+ UINT32 ea = EA_AX_AI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_ai_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AL_8(mc68kcpu);
+ UINT32 ea = EA_AX_AI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_ai_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCDI_8(mc68kcpu);
+ UINT32 ea = EA_AX_AI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_ai_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCIX_8(mc68kcpu);
+ UINT32 ea = EA_AX_AI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_ai_i(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AX_AI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pi7_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_8(DY(mc68kcpu));
+ UINT32 ea = EA_A7_PI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pi_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_8(DY(mc68kcpu));
+ UINT32 ea = EA_AX_PI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pi7_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_AI_8(mc68kcpu);
+ UINT32 ea = EA_A7_PI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pi7_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PI_8(mc68kcpu);
+ UINT32 ea = EA_A7_PI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pi7_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_A7_PI_8(mc68kcpu);
+ UINT32 ea = EA_A7_PI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pi7_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PD_8(mc68kcpu);
+ UINT32 ea = EA_A7_PI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pi7_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_A7_PD_8(mc68kcpu);
+ UINT32 ea = EA_A7_PI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pi7_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_DI_8(mc68kcpu);
+ UINT32 ea = EA_A7_PI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pi7_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_IX_8(mc68kcpu);
+ UINT32 ea = EA_A7_PI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pi7_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AW_8(mc68kcpu);
+ UINT32 ea = EA_A7_PI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pi7_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AL_8(mc68kcpu);
+ UINT32 ea = EA_A7_PI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pi7_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCDI_8(mc68kcpu);
+ UINT32 ea = EA_A7_PI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pi7_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCIX_8(mc68kcpu);
+ UINT32 ea = EA_A7_PI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pi7_i(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_A7_PI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pi_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_AI_8(mc68kcpu);
+ UINT32 ea = EA_AX_PI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pi_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PI_8(mc68kcpu);
+ UINT32 ea = EA_AX_PI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pi_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_A7_PI_8(mc68kcpu);
+ UINT32 ea = EA_AX_PI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pi_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PD_8(mc68kcpu);
+ UINT32 ea = EA_AX_PI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pi_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_A7_PD_8(mc68kcpu);
+ UINT32 ea = EA_AX_PI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pi_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_DI_8(mc68kcpu);
+ UINT32 ea = EA_AX_PI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pi_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_IX_8(mc68kcpu);
+ UINT32 ea = EA_AX_PI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pi_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AW_8(mc68kcpu);
+ UINT32 ea = EA_AX_PI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pi_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AL_8(mc68kcpu);
+ UINT32 ea = EA_AX_PI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pi_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCDI_8(mc68kcpu);
+ UINT32 ea = EA_AX_PI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pi_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCIX_8(mc68kcpu);
+ UINT32 ea = EA_AX_PI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pi_i(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AX_PI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pd7_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_8(DY(mc68kcpu));
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pd_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_8(DY(mc68kcpu));
+ UINT32 ea = EA_AX_PD_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pd7_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_AI_8(mc68kcpu);
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pd7_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PI_8(mc68kcpu);
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pd7_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_A7_PI_8(mc68kcpu);
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pd7_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PD_8(mc68kcpu);
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pd7_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_A7_PD_8(mc68kcpu);
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pd7_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_DI_8(mc68kcpu);
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pd7_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_IX_8(mc68kcpu);
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pd7_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AW_8(mc68kcpu);
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pd7_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AL_8(mc68kcpu);
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pd7_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCDI_8(mc68kcpu);
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pd7_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCIX_8(mc68kcpu);
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pd7_i(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pd_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_AI_8(mc68kcpu);
+ UINT32 ea = EA_AX_PD_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pd_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PI_8(mc68kcpu);
+ UINT32 ea = EA_AX_PD_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pd_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_A7_PI_8(mc68kcpu);
+ UINT32 ea = EA_AX_PD_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pd_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PD_8(mc68kcpu);
+ UINT32 ea = EA_AX_PD_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pd_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_A7_PD_8(mc68kcpu);
+ UINT32 ea = EA_AX_PD_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pd_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_DI_8(mc68kcpu);
+ UINT32 ea = EA_AX_PD_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pd_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_IX_8(mc68kcpu);
+ UINT32 ea = EA_AX_PD_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pd_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AW_8(mc68kcpu);
+ UINT32 ea = EA_AX_PD_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pd_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AL_8(mc68kcpu);
+ UINT32 ea = EA_AX_PD_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pd_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCDI_8(mc68kcpu);
+ UINT32 ea = EA_AX_PD_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pd_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCIX_8(mc68kcpu);
+ UINT32 ea = EA_AX_PD_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_pd_i(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AX_PD_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_di_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_8(DY(mc68kcpu));
+ UINT32 ea = EA_AX_DI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_di_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_AI_8(mc68kcpu);
+ UINT32 ea = EA_AX_DI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_di_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PI_8(mc68kcpu);
+ UINT32 ea = EA_AX_DI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_di_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_A7_PI_8(mc68kcpu);
+ UINT32 ea = EA_AX_DI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_di_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PD_8(mc68kcpu);
+ UINT32 ea = EA_AX_DI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_di_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_A7_PD_8(mc68kcpu);
+ UINT32 ea = EA_AX_DI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_di_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_DI_8(mc68kcpu);
+ UINT32 ea = EA_AX_DI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_di_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_IX_8(mc68kcpu);
+ UINT32 ea = EA_AX_DI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_di_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AW_8(mc68kcpu);
+ UINT32 ea = EA_AX_DI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_di_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AL_8(mc68kcpu);
+ UINT32 ea = EA_AX_DI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_di_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCDI_8(mc68kcpu);
+ UINT32 ea = EA_AX_DI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_di_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCIX_8(mc68kcpu);
+ UINT32 ea = EA_AX_DI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_di_i(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AX_DI_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_ix_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_8(DY(mc68kcpu));
+ UINT32 ea = EA_AX_IX_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_ix_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_AI_8(mc68kcpu);
+ UINT32 ea = EA_AX_IX_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_ix_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PI_8(mc68kcpu);
+ UINT32 ea = EA_AX_IX_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_ix_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_A7_PI_8(mc68kcpu);
+ UINT32 ea = EA_AX_IX_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_ix_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PD_8(mc68kcpu);
+ UINT32 ea = EA_AX_IX_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_ix_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_A7_PD_8(mc68kcpu);
+ UINT32 ea = EA_AX_IX_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_ix_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_DI_8(mc68kcpu);
+ UINT32 ea = EA_AX_IX_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_ix_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_IX_8(mc68kcpu);
+ UINT32 ea = EA_AX_IX_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_ix_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AW_8(mc68kcpu);
+ UINT32 ea = EA_AX_IX_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_ix_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AL_8(mc68kcpu);
+ UINT32 ea = EA_AX_IX_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_ix_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCDI_8(mc68kcpu);
+ UINT32 ea = EA_AX_IX_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_ix_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCIX_8(mc68kcpu);
+ UINT32 ea = EA_AX_IX_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_ix_i(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AX_IX_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_aw_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_8(DY(mc68kcpu));
+ UINT32 ea = EA_AW_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_aw_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_AI_8(mc68kcpu);
+ UINT32 ea = EA_AW_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_aw_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PI_8(mc68kcpu);
+ UINT32 ea = EA_AW_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_aw_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_A7_PI_8(mc68kcpu);
+ UINT32 ea = EA_AW_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_aw_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PD_8(mc68kcpu);
+ UINT32 ea = EA_AW_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_aw_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_A7_PD_8(mc68kcpu);
+ UINT32 ea = EA_AW_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_aw_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_DI_8(mc68kcpu);
+ UINT32 ea = EA_AW_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_aw_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_IX_8(mc68kcpu);
+ UINT32 ea = EA_AW_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_aw_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AW_8(mc68kcpu);
+ UINT32 ea = EA_AW_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_aw_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AL_8(mc68kcpu);
+ UINT32 ea = EA_AW_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_aw_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCDI_8(mc68kcpu);
+ UINT32 ea = EA_AW_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_aw_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCIX_8(mc68kcpu);
+ UINT32 ea = EA_AW_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_aw_i(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AW_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_al_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_8(DY(mc68kcpu));
+ UINT32 ea = EA_AL_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_al_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_AI_8(mc68kcpu);
+ UINT32 ea = EA_AL_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_al_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PI_8(mc68kcpu);
+ UINT32 ea = EA_AL_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_al_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_A7_PI_8(mc68kcpu);
+ UINT32 ea = EA_AL_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_al_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PD_8(mc68kcpu);
+ UINT32 ea = EA_AL_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_al_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_A7_PD_8(mc68kcpu);
+ UINT32 ea = EA_AL_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_al_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_DI_8(mc68kcpu);
+ UINT32 ea = EA_AL_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_al_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_IX_8(mc68kcpu);
+ UINT32 ea = EA_AL_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_al_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AW_8(mc68kcpu);
+ UINT32 ea = EA_AL_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_al_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AL_8(mc68kcpu);
+ UINT32 ea = EA_AL_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_al_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCDI_8(mc68kcpu);
+ UINT32 ea = EA_AL_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_al_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCIX_8(mc68kcpu);
+ UINT32 ea = EA_AL_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_8_al_i(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AL_8(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_d_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_16(DY(mc68kcpu));
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_d_a(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_16(AY(mc68kcpu));
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_d_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_AI_16(mc68kcpu);
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_d_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PI_16(mc68kcpu);
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_d_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PD_16(mc68kcpu);
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_d_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_DI_16(mc68kcpu);
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_d_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_IX_16(mc68kcpu);
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_d_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AW_16(mc68kcpu);
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_d_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AL_16(mc68kcpu);
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_d_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCDI_16(mc68kcpu);
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_d_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCIX_16(mc68kcpu);
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_d_i(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_I_16(mc68kcpu);
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_ai_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_16(DY(mc68kcpu));
+ UINT32 ea = EA_AX_AI_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_ai_a(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_16(AY(mc68kcpu));
+ UINT32 ea = EA_AX_AI_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_ai_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_AI_16(mc68kcpu);
+ UINT32 ea = EA_AX_AI_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_ai_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PI_16(mc68kcpu);
+ UINT32 ea = EA_AX_AI_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_ai_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PD_16(mc68kcpu);
+ UINT32 ea = EA_AX_AI_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_ai_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_DI_16(mc68kcpu);
+ UINT32 ea = EA_AX_AI_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_ai_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_IX_16(mc68kcpu);
+ UINT32 ea = EA_AX_AI_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_ai_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AW_16(mc68kcpu);
+ UINT32 ea = EA_AX_AI_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_ai_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AL_16(mc68kcpu);
+ UINT32 ea = EA_AX_AI_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_ai_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCDI_16(mc68kcpu);
+ UINT32 ea = EA_AX_AI_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_ai_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCIX_16(mc68kcpu);
+ UINT32 ea = EA_AX_AI_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_ai_i(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AX_AI_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_pi_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_16(DY(mc68kcpu));
+ UINT32 ea = EA_AX_PI_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_pi_a(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_16(AY(mc68kcpu));
+ UINT32 ea = EA_AX_PI_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_pi_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_AI_16(mc68kcpu);
+ UINT32 ea = EA_AX_PI_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_pi_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PI_16(mc68kcpu);
+ UINT32 ea = EA_AX_PI_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_pi_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PD_16(mc68kcpu);
+ UINT32 ea = EA_AX_PI_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_pi_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_DI_16(mc68kcpu);
+ UINT32 ea = EA_AX_PI_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_pi_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_IX_16(mc68kcpu);
+ UINT32 ea = EA_AX_PI_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_pi_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AW_16(mc68kcpu);
+ UINT32 ea = EA_AX_PI_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_pi_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AL_16(mc68kcpu);
+ UINT32 ea = EA_AX_PI_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_pi_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCDI_16(mc68kcpu);
+ UINT32 ea = EA_AX_PI_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_pi_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCIX_16(mc68kcpu);
+ UINT32 ea = EA_AX_PI_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_pi_i(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AX_PI_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_pd_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_16(DY(mc68kcpu));
+ UINT32 ea = EA_AX_PD_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_pd_a(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_16(AY(mc68kcpu));
+ UINT32 ea = EA_AX_PD_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_pd_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_AI_16(mc68kcpu);
+ UINT32 ea = EA_AX_PD_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_pd_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PI_16(mc68kcpu);
+ UINT32 ea = EA_AX_PD_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_pd_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PD_16(mc68kcpu);
+ UINT32 ea = EA_AX_PD_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_pd_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_DI_16(mc68kcpu);
+ UINT32 ea = EA_AX_PD_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_pd_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_IX_16(mc68kcpu);
+ UINT32 ea = EA_AX_PD_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_pd_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AW_16(mc68kcpu);
+ UINT32 ea = EA_AX_PD_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_pd_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AL_16(mc68kcpu);
+ UINT32 ea = EA_AX_PD_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_pd_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCDI_16(mc68kcpu);
+ UINT32 ea = EA_AX_PD_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_pd_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCIX_16(mc68kcpu);
+ UINT32 ea = EA_AX_PD_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_pd_i(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AX_PD_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_di_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_16(DY(mc68kcpu));
+ UINT32 ea = EA_AX_DI_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_di_a(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_16(AY(mc68kcpu));
+ UINT32 ea = EA_AX_DI_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_di_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_AI_16(mc68kcpu);
+ UINT32 ea = EA_AX_DI_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_di_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PI_16(mc68kcpu);
+ UINT32 ea = EA_AX_DI_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_di_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PD_16(mc68kcpu);
+ UINT32 ea = EA_AX_DI_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_di_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_DI_16(mc68kcpu);
+ UINT32 ea = EA_AX_DI_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_di_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_IX_16(mc68kcpu);
+ UINT32 ea = EA_AX_DI_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_di_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AW_16(mc68kcpu);
+ UINT32 ea = EA_AX_DI_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_di_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AL_16(mc68kcpu);
+ UINT32 ea = EA_AX_DI_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_di_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCDI_16(mc68kcpu);
+ UINT32 ea = EA_AX_DI_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_di_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCIX_16(mc68kcpu);
+ UINT32 ea = EA_AX_DI_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_di_i(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AX_DI_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_ix_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_16(DY(mc68kcpu));
+ UINT32 ea = EA_AX_IX_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_ix_a(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_16(AY(mc68kcpu));
+ UINT32 ea = EA_AX_IX_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_ix_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_AI_16(mc68kcpu);
+ UINT32 ea = EA_AX_IX_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_ix_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PI_16(mc68kcpu);
+ UINT32 ea = EA_AX_IX_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_ix_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PD_16(mc68kcpu);
+ UINT32 ea = EA_AX_IX_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_ix_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_DI_16(mc68kcpu);
+ UINT32 ea = EA_AX_IX_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_ix_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_IX_16(mc68kcpu);
+ UINT32 ea = EA_AX_IX_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_ix_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AW_16(mc68kcpu);
+ UINT32 ea = EA_AX_IX_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_ix_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AL_16(mc68kcpu);
+ UINT32 ea = EA_AX_IX_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_ix_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCDI_16(mc68kcpu);
+ UINT32 ea = EA_AX_IX_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_ix_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCIX_16(mc68kcpu);
+ UINT32 ea = EA_AX_IX_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_ix_i(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AX_IX_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_aw_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_16(DY(mc68kcpu));
+ UINT32 ea = EA_AW_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_aw_a(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_16(AY(mc68kcpu));
+ UINT32 ea = EA_AW_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_aw_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_AI_16(mc68kcpu);
+ UINT32 ea = EA_AW_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_aw_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PI_16(mc68kcpu);
+ UINT32 ea = EA_AW_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_aw_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PD_16(mc68kcpu);
+ UINT32 ea = EA_AW_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_aw_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_DI_16(mc68kcpu);
+ UINT32 ea = EA_AW_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_aw_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_IX_16(mc68kcpu);
+ UINT32 ea = EA_AW_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_aw_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AW_16(mc68kcpu);
+ UINT32 ea = EA_AW_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_aw_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AL_16(mc68kcpu);
+ UINT32 ea = EA_AW_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_aw_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCDI_16(mc68kcpu);
+ UINT32 ea = EA_AW_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_aw_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCIX_16(mc68kcpu);
+ UINT32 ea = EA_AW_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_aw_i(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AW_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_al_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_16(DY(mc68kcpu));
+ UINT32 ea = EA_AL_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_al_a(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_16(AY(mc68kcpu));
+ UINT32 ea = EA_AL_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_al_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_AI_16(mc68kcpu);
+ UINT32 ea = EA_AL_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_al_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PI_16(mc68kcpu);
+ UINT32 ea = EA_AL_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_al_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PD_16(mc68kcpu);
+ UINT32 ea = EA_AL_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_al_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_DI_16(mc68kcpu);
+ UINT32 ea = EA_AL_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_al_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_IX_16(mc68kcpu);
+ UINT32 ea = EA_AL_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_al_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AW_16(mc68kcpu);
+ UINT32 ea = EA_AL_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_al_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AL_16(mc68kcpu);
+ UINT32 ea = EA_AL_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_al_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCDI_16(mc68kcpu);
+ UINT32 ea = EA_AL_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_al_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCIX_16(mc68kcpu);
+ UINT32 ea = EA_AL_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_al_i(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AL_16(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_d_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = DY(mc68kcpu);
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = res;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_d_a(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = AY(mc68kcpu);
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = res;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_d_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_AI_32(mc68kcpu);
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = res;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_d_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PI_32(mc68kcpu);
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = res;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_d_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PD_32(mc68kcpu);
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = res;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_d_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_DI_32(mc68kcpu);
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = res;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_d_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_IX_32(mc68kcpu);
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = res;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_d_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AW_32(mc68kcpu);
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = res;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_d_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AL_32(mc68kcpu);
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = res;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_d_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCDI_32(mc68kcpu);
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = res;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_d_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCIX_32(mc68kcpu);
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = res;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_d_i(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_I_32(mc68kcpu);
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = res;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_ai_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = DY(mc68kcpu);
+ UINT32 ea = EA_AX_AI_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_ai_a(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = AY(mc68kcpu);
+ UINT32 ea = EA_AX_AI_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_ai_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_AI_32(mc68kcpu);
+ UINT32 ea = EA_AX_AI_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_ai_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PI_32(mc68kcpu);
+ UINT32 ea = EA_AX_AI_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_ai_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PD_32(mc68kcpu);
+ UINT32 ea = EA_AX_AI_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_ai_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_DI_32(mc68kcpu);
+ UINT32 ea = EA_AX_AI_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_ai_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_IX_32(mc68kcpu);
+ UINT32 ea = EA_AX_AI_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_ai_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AW_32(mc68kcpu);
+ UINT32 ea = EA_AX_AI_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_ai_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AL_32(mc68kcpu);
+ UINT32 ea = EA_AX_AI_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_ai_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCDI_32(mc68kcpu);
+ UINT32 ea = EA_AX_AI_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_ai_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCIX_32(mc68kcpu);
+ UINT32 ea = EA_AX_AI_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_ai_i(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AX_AI_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_pi_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = DY(mc68kcpu);
+ UINT32 ea = EA_AX_PI_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_pi_a(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = AY(mc68kcpu);
+ UINT32 ea = EA_AX_PI_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_pi_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_AI_32(mc68kcpu);
+ UINT32 ea = EA_AX_PI_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_pi_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PI_32(mc68kcpu);
+ UINT32 ea = EA_AX_PI_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_pi_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PD_32(mc68kcpu);
+ UINT32 ea = EA_AX_PI_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_pi_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_DI_32(mc68kcpu);
+ UINT32 ea = EA_AX_PI_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_pi_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_IX_32(mc68kcpu);
+ UINT32 ea = EA_AX_PI_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_pi_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AW_32(mc68kcpu);
+ UINT32 ea = EA_AX_PI_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_pi_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AL_32(mc68kcpu);
+ UINT32 ea = EA_AX_PI_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_pi_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCDI_32(mc68kcpu);
+ UINT32 ea = EA_AX_PI_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_pi_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCIX_32(mc68kcpu);
+ UINT32 ea = EA_AX_PI_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_pi_i(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AX_PI_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_pd_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = DY(mc68kcpu);
+ UINT32 ea = EA_AX_PD_32(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea+2, res & 0xFFFF );
+ m68ki_write_16((mc68kcpu), ea, (res >> 16) & 0xFFFF );
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_pd_a(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = AY(mc68kcpu);
+ UINT32 ea = EA_AX_PD_32(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea+2, res & 0xFFFF );
+ m68ki_write_16((mc68kcpu), ea, (res >> 16) & 0xFFFF );
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_pd_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_AI_32(mc68kcpu);
+ UINT32 ea = EA_AX_PD_32(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea+2, res & 0xFFFF );
+ m68ki_write_16((mc68kcpu), ea, (res >> 16) & 0xFFFF );
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_pd_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PI_32(mc68kcpu);
+ UINT32 ea = EA_AX_PD_32(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea+2, res & 0xFFFF );
+ m68ki_write_16((mc68kcpu), ea, (res >> 16) & 0xFFFF );
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_pd_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PD_32(mc68kcpu);
+ UINT32 ea = EA_AX_PD_32(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea+2, res & 0xFFFF );
+ m68ki_write_16((mc68kcpu), ea, (res >> 16) & 0xFFFF );
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_pd_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_DI_32(mc68kcpu);
+ UINT32 ea = EA_AX_PD_32(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea+2, res & 0xFFFF );
+ m68ki_write_16((mc68kcpu), ea, (res >> 16) & 0xFFFF );
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_pd_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_IX_32(mc68kcpu);
+ UINT32 ea = EA_AX_PD_32(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea+2, res & 0xFFFF );
+ m68ki_write_16((mc68kcpu), ea, (res >> 16) & 0xFFFF );
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_pd_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AW_32(mc68kcpu);
+ UINT32 ea = EA_AX_PD_32(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea+2, res & 0xFFFF );
+ m68ki_write_16((mc68kcpu), ea, (res >> 16) & 0xFFFF );
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_pd_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AL_32(mc68kcpu);
+ UINT32 ea = EA_AX_PD_32(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea+2, res & 0xFFFF );
+ m68ki_write_16((mc68kcpu), ea, (res >> 16) & 0xFFFF );
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_pd_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCDI_32(mc68kcpu);
+ UINT32 ea = EA_AX_PD_32(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea+2, res & 0xFFFF );
+ m68ki_write_16((mc68kcpu), ea, (res >> 16) & 0xFFFF );
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_pd_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCIX_32(mc68kcpu);
+ UINT32 ea = EA_AX_PD_32(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea+2, res & 0xFFFF );
+ m68ki_write_16((mc68kcpu), ea, (res >> 16) & 0xFFFF );
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_pd_i(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AX_PD_32(mc68kcpu);
+
+ m68ki_write_16((mc68kcpu), ea+2, res & 0xFFFF );
+ m68ki_write_16((mc68kcpu), ea, (res >> 16) & 0xFFFF );
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_di_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = DY(mc68kcpu);
+ UINT32 ea = EA_AX_DI_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_di_a(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = AY(mc68kcpu);
+ UINT32 ea = EA_AX_DI_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_di_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_AI_32(mc68kcpu);
+ UINT32 ea = EA_AX_DI_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_di_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PI_32(mc68kcpu);
+ UINT32 ea = EA_AX_DI_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_di_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PD_32(mc68kcpu);
+ UINT32 ea = EA_AX_DI_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_di_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_DI_32(mc68kcpu);
+ UINT32 ea = EA_AX_DI_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_di_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_IX_32(mc68kcpu);
+ UINT32 ea = EA_AX_DI_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_di_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AW_32(mc68kcpu);
+ UINT32 ea = EA_AX_DI_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_di_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AL_32(mc68kcpu);
+ UINT32 ea = EA_AX_DI_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_di_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCDI_32(mc68kcpu);
+ UINT32 ea = EA_AX_DI_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_di_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCIX_32(mc68kcpu);
+ UINT32 ea = EA_AX_DI_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_di_i(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AX_DI_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_ix_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = DY(mc68kcpu);
+ UINT32 ea = EA_AX_IX_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_ix_a(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = AY(mc68kcpu);
+ UINT32 ea = EA_AX_IX_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_ix_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_AI_32(mc68kcpu);
+ UINT32 ea = EA_AX_IX_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_ix_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PI_32(mc68kcpu);
+ UINT32 ea = EA_AX_IX_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_ix_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PD_32(mc68kcpu);
+ UINT32 ea = EA_AX_IX_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_ix_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_DI_32(mc68kcpu);
+ UINT32 ea = EA_AX_IX_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_ix_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_IX_32(mc68kcpu);
+ UINT32 ea = EA_AX_IX_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_ix_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AW_32(mc68kcpu);
+ UINT32 ea = EA_AX_IX_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_ix_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AL_32(mc68kcpu);
+ UINT32 ea = EA_AX_IX_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_ix_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCDI_32(mc68kcpu);
+ UINT32 ea = EA_AX_IX_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_ix_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCIX_32(mc68kcpu);
+ UINT32 ea = EA_AX_IX_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_ix_i(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AX_IX_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_aw_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = DY(mc68kcpu);
+ UINT32 ea = EA_AW_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_aw_a(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = AY(mc68kcpu);
+ UINT32 ea = EA_AW_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_aw_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_AI_32(mc68kcpu);
+ UINT32 ea = EA_AW_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_aw_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PI_32(mc68kcpu);
+ UINT32 ea = EA_AW_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_aw_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PD_32(mc68kcpu);
+ UINT32 ea = EA_AW_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_aw_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_DI_32(mc68kcpu);
+ UINT32 ea = EA_AW_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_aw_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_IX_32(mc68kcpu);
+ UINT32 ea = EA_AW_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_aw_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AW_32(mc68kcpu);
+ UINT32 ea = EA_AW_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_aw_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AL_32(mc68kcpu);
+ UINT32 ea = EA_AW_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_aw_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCDI_32(mc68kcpu);
+ UINT32 ea = EA_AW_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_aw_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCIX_32(mc68kcpu);
+ UINT32 ea = EA_AW_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_aw_i(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AW_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_al_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = DY(mc68kcpu);
+ UINT32 ea = EA_AL_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_al_a(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = AY(mc68kcpu);
+ UINT32 ea = EA_AL_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_al_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_AI_32(mc68kcpu);
+ UINT32 ea = EA_AL_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_al_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PI_32(mc68kcpu);
+ UINT32 ea = EA_AL_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_al_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PD_32(mc68kcpu);
+ UINT32 ea = EA_AL_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_al_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_DI_32(mc68kcpu);
+ UINT32 ea = EA_AL_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_al_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_IX_32(mc68kcpu);
+ UINT32 ea = EA_AL_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_al_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AW_32(mc68kcpu);
+ UINT32 ea = EA_AL_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_al_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AL_32(mc68kcpu);
+ UINT32 ea = EA_AL_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_al_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCDI_32(mc68kcpu);
+ UINT32 ea = EA_AL_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_al_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_PCIX_32(mc68kcpu);
+ UINT32 ea = EA_AL_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_al_i(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AL_32(mc68kcpu);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_movea_16_d(m68000_base_device* mc68kcpu)
+{
+ AX(mc68kcpu) = MAKE_INT_16(DY(mc68kcpu));
+}
+
+
+void m68000_base_device_ops::m68k_op_movea_16_a(m68000_base_device* mc68kcpu)
+{
+ AX(mc68kcpu) = MAKE_INT_16(AY(mc68kcpu));
+}
+
+
+void m68000_base_device_ops::m68k_op_movea_16_ai(m68000_base_device* mc68kcpu)
+{
+ AX(mc68kcpu) = MAKE_INT_16(OPER_AY_AI_16(mc68kcpu));
+}
+
+
+void m68000_base_device_ops::m68k_op_movea_16_pi(m68000_base_device* mc68kcpu)
+{
+ AX(mc68kcpu) = MAKE_INT_16(OPER_AY_PI_16(mc68kcpu));
+}
+
+
+void m68000_base_device_ops::m68k_op_movea_16_pd(m68000_base_device* mc68kcpu)
+{
+ AX(mc68kcpu) = MAKE_INT_16(OPER_AY_PD_16(mc68kcpu));
+}
+
+
+void m68000_base_device_ops::m68k_op_movea_16_di(m68000_base_device* mc68kcpu)
+{
+ AX(mc68kcpu) = MAKE_INT_16(OPER_AY_DI_16(mc68kcpu));
+}
+
+
+void m68000_base_device_ops::m68k_op_movea_16_ix(m68000_base_device* mc68kcpu)
+{
+ AX(mc68kcpu) = MAKE_INT_16(OPER_AY_IX_16(mc68kcpu));
+}
+
+
+void m68000_base_device_ops::m68k_op_movea_16_aw(m68000_base_device* mc68kcpu)
+{
+ AX(mc68kcpu) = MAKE_INT_16(OPER_AW_16(mc68kcpu));
+}
+
+
+void m68000_base_device_ops::m68k_op_movea_16_al(m68000_base_device* mc68kcpu)
+{
+ AX(mc68kcpu) = MAKE_INT_16(OPER_AL_16(mc68kcpu));
+}
+
+
+void m68000_base_device_ops::m68k_op_movea_16_pcdi(m68000_base_device* mc68kcpu)
+{
+ AX(mc68kcpu) = MAKE_INT_16(OPER_PCDI_16(mc68kcpu));
+}
+
+
+void m68000_base_device_ops::m68k_op_movea_16_pcix(m68000_base_device* mc68kcpu)
+{
+ AX(mc68kcpu) = MAKE_INT_16(OPER_PCIX_16(mc68kcpu));
+}
+
+
+void m68000_base_device_ops::m68k_op_movea_16_i(m68000_base_device* mc68kcpu)
+{
+ AX(mc68kcpu) = MAKE_INT_16(OPER_I_16(mc68kcpu));
+}
+
+
+void m68000_base_device_ops::m68k_op_movea_32_d(m68000_base_device* mc68kcpu)
+{
+ AX(mc68kcpu) = DY(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_movea_32_a(m68000_base_device* mc68kcpu)
+{
+ AX(mc68kcpu) = AY(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_movea_32_ai(m68000_base_device* mc68kcpu)
+{
+ AX(mc68kcpu) = OPER_AY_AI_32(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_movea_32_pi(m68000_base_device* mc68kcpu)
+{
+ AX(mc68kcpu) = OPER_AY_PI_32(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_movea_32_pd(m68000_base_device* mc68kcpu)
+{
+ AX(mc68kcpu) = OPER_AY_PD_32(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_movea_32_di(m68000_base_device* mc68kcpu)
+{
+ AX(mc68kcpu) = OPER_AY_DI_32(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_movea_32_ix(m68000_base_device* mc68kcpu)
+{
+ AX(mc68kcpu) = OPER_AY_IX_32(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_movea_32_aw(m68000_base_device* mc68kcpu)
+{
+ AX(mc68kcpu) = OPER_AW_32(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_movea_32_al(m68000_base_device* mc68kcpu)
+{
+ AX(mc68kcpu) = OPER_AL_32(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_movea_32_pcdi(m68000_base_device* mc68kcpu)
+{
+ AX(mc68kcpu) = OPER_PCDI_32(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_movea_32_pcix(m68000_base_device* mc68kcpu)
+{
+ AX(mc68kcpu) = OPER_PCIX_32(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_movea_32_i(m68000_base_device* mc68kcpu)
+{
+ AX(mc68kcpu) = OPER_I_32(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_frc_d(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
+ {
+ DY(mc68kcpu) = MASK_OUT_BELOW_16(DY(mc68kcpu)) | m68ki_get_ccr(mc68kcpu);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_frc_ai(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
+ {
+ m68ki_write_16((mc68kcpu), EA_AY_AI_16(mc68kcpu), m68ki_get_ccr(mc68kcpu));
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_frc_pi(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
+ {
+ m68ki_write_16((mc68kcpu), EA_AY_PI_16(mc68kcpu), m68ki_get_ccr(mc68kcpu));
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_frc_pd(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
+ {
+ m68ki_write_16((mc68kcpu), EA_AY_PD_16(mc68kcpu), m68ki_get_ccr(mc68kcpu));
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_frc_di(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
+ {
+ m68ki_write_16((mc68kcpu), EA_AY_DI_16(mc68kcpu), m68ki_get_ccr(mc68kcpu));
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_frc_ix(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
+ {
+ m68ki_write_16((mc68kcpu), EA_AY_IX_16(mc68kcpu), m68ki_get_ccr(mc68kcpu));
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_frc_aw(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
+ {
+ m68ki_write_16((mc68kcpu), EA_AW_16(mc68kcpu), m68ki_get_ccr(mc68kcpu));
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_frc_al(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
+ {
+ m68ki_write_16((mc68kcpu), EA_AL_16(mc68kcpu), m68ki_get_ccr(mc68kcpu));
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_toc_d(m68000_base_device* mc68kcpu)
+{
+ m68ki_set_ccr((mc68kcpu), DY(mc68kcpu));
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_toc_ai(m68000_base_device* mc68kcpu)
+{
+ m68ki_set_ccr((mc68kcpu), OPER_AY_AI_16(mc68kcpu));
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_toc_pi(m68000_base_device* mc68kcpu)
+{
+ m68ki_set_ccr((mc68kcpu), OPER_AY_PI_16(mc68kcpu));
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_toc_pd(m68000_base_device* mc68kcpu)
+{
+ m68ki_set_ccr((mc68kcpu), OPER_AY_PD_16(mc68kcpu));
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_toc_di(m68000_base_device* mc68kcpu)
+{
+ m68ki_set_ccr((mc68kcpu), OPER_AY_DI_16(mc68kcpu));
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_toc_ix(m68000_base_device* mc68kcpu)
+{
+ m68ki_set_ccr((mc68kcpu), OPER_AY_IX_16(mc68kcpu));
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_toc_aw(m68000_base_device* mc68kcpu)
+{
+ m68ki_set_ccr((mc68kcpu), OPER_AW_16(mc68kcpu));
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_toc_al(m68000_base_device* mc68kcpu)
+{
+ m68ki_set_ccr((mc68kcpu), OPER_AL_16(mc68kcpu));
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_toc_pcdi(m68000_base_device* mc68kcpu)
+{
+ m68ki_set_ccr((mc68kcpu), OPER_PCDI_16(mc68kcpu));
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_toc_pcix(m68000_base_device* mc68kcpu)
+{
+ m68ki_set_ccr((mc68kcpu), OPER_PCIX_16(mc68kcpu));
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_toc_i(m68000_base_device* mc68kcpu)
+{
+ m68ki_set_ccr((mc68kcpu), OPER_I_16(mc68kcpu));
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_frs_d(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type) || (mc68kcpu)->s_flag) /* NS990408 */
+ {
+ DY(mc68kcpu) = MASK_OUT_BELOW_16(DY(mc68kcpu)) | m68ki_get_sr(mc68kcpu);
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_frs_ai(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type) || (mc68kcpu)->s_flag) /* NS990408 */
+ {
+ UINT32 ea = EA_AY_AI_16(mc68kcpu);
+ m68ki_write_16((mc68kcpu), ea, m68ki_get_sr(mc68kcpu));
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_frs_pi(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type) || (mc68kcpu)->s_flag) /* NS990408 */
+ {
+ UINT32 ea = EA_AY_PI_16(mc68kcpu);
+ m68ki_write_16((mc68kcpu), ea, m68ki_get_sr(mc68kcpu));
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_frs_pd(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type) || (mc68kcpu)->s_flag) /* NS990408 */
+ {
+ UINT32 ea = EA_AY_PD_16(mc68kcpu);
+ m68ki_write_16((mc68kcpu), ea, m68ki_get_sr(mc68kcpu));
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_frs_di(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type) || (mc68kcpu)->s_flag) /* NS990408 */
+ {
+ UINT32 ea = EA_AY_DI_16(mc68kcpu);
+ m68ki_write_16((mc68kcpu), ea, m68ki_get_sr(mc68kcpu));
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_frs_ix(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type) || (mc68kcpu)->s_flag) /* NS990408 */
+ {
+ UINT32 ea = EA_AY_IX_16(mc68kcpu);
+ m68ki_write_16((mc68kcpu), ea, m68ki_get_sr(mc68kcpu));
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_frs_aw(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type) || (mc68kcpu)->s_flag) /* NS990408 */
+ {
+ UINT32 ea = EA_AW_16(mc68kcpu);
+ m68ki_write_16((mc68kcpu), ea, m68ki_get_sr(mc68kcpu));
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_frs_al(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type) || (mc68kcpu)->s_flag) /* NS990408 */
+ {
+ UINT32 ea = EA_AL_16(mc68kcpu);
+ m68ki_write_16((mc68kcpu), ea, m68ki_get_sr(mc68kcpu));
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_tos_d(m68000_base_device* mc68kcpu)
+{
+ if((mc68kcpu)->s_flag)
+ {
+ m68ki_set_sr((mc68kcpu), DY(mc68kcpu));
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_tos_ai(m68000_base_device* mc68kcpu)
+{
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 new_sr = OPER_AY_AI_16(mc68kcpu);
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_set_sr((mc68kcpu), new_sr);
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_tos_pi(m68000_base_device* mc68kcpu)
+{
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 new_sr = OPER_AY_PI_16(mc68kcpu);
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_set_sr((mc68kcpu), new_sr);
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_tos_pd(m68000_base_device* mc68kcpu)
+{
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 new_sr = OPER_AY_PD_16(mc68kcpu);
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_set_sr((mc68kcpu), new_sr);
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_tos_di(m68000_base_device* mc68kcpu)
+{
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 new_sr = OPER_AY_DI_16(mc68kcpu);
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_set_sr((mc68kcpu), new_sr);
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_tos_ix(m68000_base_device* mc68kcpu)
+{
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 new_sr = OPER_AY_IX_16(mc68kcpu);
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_set_sr((mc68kcpu), new_sr);
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_tos_aw(m68000_base_device* mc68kcpu)
+{
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 new_sr = OPER_AW_16(mc68kcpu);
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_set_sr((mc68kcpu), new_sr);
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_tos_al(m68000_base_device* mc68kcpu)
+{
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 new_sr = OPER_AL_16(mc68kcpu);
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_set_sr((mc68kcpu), new_sr);
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_tos_pcdi(m68000_base_device* mc68kcpu)
+{
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 new_sr = OPER_PCDI_16(mc68kcpu);
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_set_sr((mc68kcpu), new_sr);
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_tos_pcix(m68000_base_device* mc68kcpu)
+{
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 new_sr = OPER_PCIX_16(mc68kcpu);
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_set_sr((mc68kcpu), new_sr);
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_move_16_tos_i(m68000_base_device* mc68kcpu)
+{
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 new_sr = OPER_I_16(mc68kcpu);
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_set_sr((mc68kcpu), new_sr);
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_fru(m68000_base_device* mc68kcpu)
+{
+ if((mc68kcpu)->s_flag)
+ {
+ AY(mc68kcpu) = REG_USP(mc68kcpu);
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_move_32_tou(m68000_base_device* mc68kcpu)
+{
+ if((mc68kcpu)->s_flag)
+ {
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ REG_USP(mc68kcpu) = AY(mc68kcpu);
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_movec_32_cr(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
+ {
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ switch (word2 & 0xfff)
+ {
+ case 0x000: /* SFC */
+ REG_DA(mc68kcpu)[(word2 >> 12) & 15] = (mc68kcpu)->sfc;
+ return;
+ case 0x001: /* DFC */
+ REG_DA(mc68kcpu)[(word2 >> 12) & 15] = (mc68kcpu)->dfc;
+ return;
+ case 0x002: /* CACR */
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ REG_DA(mc68kcpu)[(word2 >> 12) & 15] = (mc68kcpu)->cacr;
+ return;
+ }
+ return;
+ case 0x800: /* USP */
+ REG_DA(mc68kcpu)[(word2 >> 12) & 15] = REG_USP(mc68kcpu);
+ return;
+ case 0x801: /* VBR */
+ REG_DA(mc68kcpu)[(word2 >> 12) & 15] = (mc68kcpu)->vbr;
+ return;
+ case 0x802: /* CAAR */
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ REG_DA(mc68kcpu)[(word2 >> 12) & 15] = (mc68kcpu)->caar;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+ break;
+ case 0x803: /* MSP */
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ REG_DA(mc68kcpu)[(word2 >> 12) & 15] = (mc68kcpu)->m_flag ? REG_SP(mc68kcpu) : REG_MSP(mc68kcpu);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ case 0x804: /* ISP */
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ REG_DA(mc68kcpu)[(word2 >> 12) & 15] = (mc68kcpu)->m_flag ? REG_ISP(mc68kcpu) : REG_SP(mc68kcpu);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ case 0x003: /* TC */
+ if(CPU_TYPE_IS_040_PLUS((mc68kcpu)->cpu_type))
+ {
+ REG_DA(mc68kcpu)[(word2 >> 12) & 15] = mc68kcpu->mmu_tc;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ case 0x004: /* ITT0 (040+, ACR0 on ColdFire) */
+ if(CPU_TYPE_IS_040_PLUS((mc68kcpu)->cpu_type))
+ {
+ REG_DA(mc68kcpu)[(word2 >> 12) & 15] = mc68kcpu->mmu_itt0;
+ return;
+ }
+ else if(CPU_TYPE_IS_COLDFIRE((mc68kcpu)->cpu_type))
+ {
+ REG_DA(mc68kcpu)[(word2 >> 12) & 15] = mc68kcpu->mmu_acr0;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ case 0x005: /* ITT1 (040+, ACR1 on ColdFire) */
+ if(CPU_TYPE_IS_040_PLUS((mc68kcpu)->cpu_type))
+ {
+ REG_DA(mc68kcpu)[(word2 >> 12) & 15] = mc68kcpu->mmu_itt1;
+ return;
+ }
+ else if(CPU_TYPE_IS_COLDFIRE((mc68kcpu)->cpu_type))
+ {
+ REG_DA(mc68kcpu)[(word2 >> 12) & 15] = mc68kcpu->mmu_acr1;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ case 0x006: /* DTT0 */
+ if(CPU_TYPE_IS_040_PLUS((mc68kcpu)->cpu_type))
+ {
+ REG_DA(mc68kcpu)[(word2 >> 12) & 15] = mc68kcpu->mmu_dtt0;
+ return;
+ }
+ else if(CPU_TYPE_IS_COLDFIRE((mc68kcpu)->cpu_type))
+ {
+ REG_DA(mc68kcpu)[(word2 >> 12) & 15] = mc68kcpu->mmu_acr2;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ case 0x007: /* DTT1 */
+ if(CPU_TYPE_IS_040_PLUS((mc68kcpu)->cpu_type))
+ {
+ REG_DA(mc68kcpu)[(word2 >> 12) & 15] = mc68kcpu->mmu_dtt1;
+ return;
+ }
+ else if(CPU_TYPE_IS_COLDFIRE((mc68kcpu)->cpu_type))
+ {
+ REG_DA(mc68kcpu)[(word2 >> 12) & 15] = mc68kcpu->mmu_acr3;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ case 0x805: /* MMUSR */
+ if(CPU_TYPE_IS_040_PLUS((mc68kcpu)->cpu_type))
+ {
+ REG_DA(mc68kcpu)[(word2 >> 12) & 15] = mc68kcpu->mmu_sr_040;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ case 0x806: /* URP */
+ if(CPU_TYPE_IS_040_PLUS((mc68kcpu)->cpu_type))
+ {
+ REG_DA(mc68kcpu)[(word2 >> 12) & 15] = mc68kcpu->mmu_urp_aptr;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ case 0x807: /* SRP */
+ if(CPU_TYPE_IS_040_PLUS((mc68kcpu)->cpu_type))
+ {
+ REG_DA(mc68kcpu)[(word2 >> 12) & 15] = mc68kcpu->mmu_srp_aptr;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ case 0xc00: // ROMBAR0
+ if(CPU_TYPE_IS_COLDFIRE((mc68kcpu)->cpu_type))
+ {
+ /* TODO */
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ case 0xc01: // ROMBAR1
+ if(CPU_TYPE_IS_COLDFIRE((mc68kcpu)->cpu_type))
+ {
+ /* TODO */
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ case 0xc04: // RAMBAR0
+ if(CPU_TYPE_IS_COLDFIRE((mc68kcpu)->cpu_type))
+ {
+ /* TODO */
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ case 0xc05: // RAMBAR1
+ if(CPU_TYPE_IS_COLDFIRE((mc68kcpu)->cpu_type))
+ {
+ /* TODO */
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ case 0xc0c: // MPCR
+ if(CPU_TYPE_IS_COLDFIRE((mc68kcpu)->cpu_type))
+ {
+ /* TODO */
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ case 0xc0d: // EDRAMBAR
+ if(CPU_TYPE_IS_COLDFIRE((mc68kcpu)->cpu_type))
+ {
+ /* TODO */
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ case 0xc0e: // SECMBAR
+ if(CPU_TYPE_IS_COLDFIRE((mc68kcpu)->cpu_type))
+ {
+ /* TODO */
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ case 0xc0f: // MBAR
+ if(CPU_TYPE_IS_COLDFIRE((mc68kcpu)->cpu_type))
+ {
+ /* TODO */
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ default:
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ }
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_movec_32_rc(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
+ {
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ switch (word2 & 0xfff)
+ {
+ case 0x000: /* SFC */
+ (mc68kcpu)->sfc = REG_DA(mc68kcpu)[(word2 >> 12) & 15] & 7;
+ return;
+ case 0x001: /* DFC */
+ (mc68kcpu)->dfc = REG_DA(mc68kcpu)[(word2 >> 12) & 15] & 7;
+ return;
+ case 0x002: /* CACR */
+ /* Only EC020 and later have CACR */
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ /* 68030 can write all bits except 5-7, 040 can write all */
+ if (CPU_TYPE_IS_040_PLUS((mc68kcpu)->cpu_type))
+ {
+ (mc68kcpu)->cacr = REG_DA(mc68kcpu)[(word2 >> 12) & 15];
+ }
+ else if (CPU_TYPE_IS_030_PLUS((mc68kcpu)->cpu_type))
+ {
+ (mc68kcpu)->cacr = REG_DA(mc68kcpu)[(word2 >> 12) & 15] & 0xff1f;
+ }
+ else
+ {
+ (mc68kcpu)->cacr = REG_DA(mc68kcpu)[(word2 >> 12) & 15] & 0x0f;
+ }
+
+// mc68kcpu->logerror("movec to cacr=%04x\n", (mc68kcpu)->cacr);
+ if ((mc68kcpu)->cacr & (M68K_CACR_CI | M68K_CACR_CEI))
+ {
+ m68ki_ic_clear(mc68kcpu);
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ case 0x800: /* USP */
+ REG_USP(mc68kcpu) = REG_DA(mc68kcpu)[(word2 >> 12) & 15];
+ return;
+ case 0x801: /* VBR */
+ (mc68kcpu)->vbr = REG_DA(mc68kcpu)[(word2 >> 12) & 15];
+ return;
+ case 0x802: /* CAAR */
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ (mc68kcpu)->caar = REG_DA(mc68kcpu)[(word2 >> 12) & 15];
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ case 0x803: /* MSP */
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ /* we are in supervisor mode so just check for M flag */
+ if(!(mc68kcpu)->m_flag)
+ {
+ REG_MSP(mc68kcpu) = REG_DA(mc68kcpu)[(word2 >> 12) & 15];
+ return;
+ }
+ REG_SP(mc68kcpu) = REG_DA(mc68kcpu)[(word2 >> 12) & 15];
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ case 0x804: /* ISP */
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(!(mc68kcpu)->m_flag)
+ {
+ REG_SP(mc68kcpu) = REG_DA(mc68kcpu)[(word2 >> 12) & 15];
+ return;
+ }
+ REG_ISP(mc68kcpu) = REG_DA(mc68kcpu)[(word2 >> 12) & 15];
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ case 0x003: /* TC */
+ if (CPU_TYPE_IS_040_PLUS((mc68kcpu)->cpu_type))
+ {
+ mc68kcpu->mmu_tc = REG_DA(mc68kcpu)[(word2 >> 12) & 15];
+
+ if (mc68kcpu->mmu_tc & 0x8000)
+ {
+ mc68kcpu->pmmu_enabled = 1;
+ }
+ else
+ {
+ mc68kcpu->pmmu_enabled = 0;
+ }
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ case 0x004: /* ITT0 */
+ if (CPU_TYPE_IS_040_PLUS((mc68kcpu)->cpu_type))
+ {
+ mc68kcpu->mmu_itt0 = REG_DA(mc68kcpu)[(word2 >> 12) & 15];
+ return;
+ }
+ else if(CPU_TYPE_IS_COLDFIRE((mc68kcpu)->cpu_type))
+ {
+ mc68kcpu->mmu_acr0 = REG_DA(mc68kcpu)[(word2 >> 12) & 15];
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ case 0x005: /* ITT1 */
+ if (CPU_TYPE_IS_040_PLUS((mc68kcpu)->cpu_type))
+ {
+ mc68kcpu->mmu_itt1 = REG_DA(mc68kcpu)[(word2 >> 12) & 15];
+ return;
+ }
+ else if(CPU_TYPE_IS_COLDFIRE((mc68kcpu)->cpu_type))
+ {
+ mc68kcpu->mmu_acr1 = REG_DA(mc68kcpu)[(word2 >> 12) & 15];
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ case 0x006: /* DTT0 */
+ if (CPU_TYPE_IS_040_PLUS((mc68kcpu)->cpu_type))
+ {
+ mc68kcpu->mmu_dtt0 = REG_DA(mc68kcpu)[(word2 >> 12) & 15];
+ return;
+ }
+ else if(CPU_TYPE_IS_COLDFIRE((mc68kcpu)->cpu_type))
+ {
+ mc68kcpu->mmu_acr2 = REG_DA(mc68kcpu)[(word2 >> 12) & 15];
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ case 0x007: /* DTT1 */
+ if (CPU_TYPE_IS_040_PLUS((mc68kcpu)->cpu_type))
+ {
+ mc68kcpu->mmu_dtt1 = REG_DA(mc68kcpu)[(word2 >> 12) & 15];
+ return;
+ }
+ else if(CPU_TYPE_IS_COLDFIRE((mc68kcpu)->cpu_type))
+ {
+ mc68kcpu->mmu_acr3 = REG_DA(mc68kcpu)[(word2 >> 12) & 15];
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ case 0x805: /* MMUSR */
+ if (CPU_TYPE_IS_040_PLUS((mc68kcpu)->cpu_type))
+ {
+ mc68kcpu->mmu_sr_040 = REG_DA(mc68kcpu)[(word2 >> 12) & 15];
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ case 0x806: /* URP */
+ if (CPU_TYPE_IS_040_PLUS((mc68kcpu)->cpu_type))
+ {
+ mc68kcpu->mmu_urp_aptr = REG_DA(mc68kcpu)[(word2 >> 12) & 15];
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ case 0x807: /* SRP */
+ if (CPU_TYPE_IS_040_PLUS((mc68kcpu)->cpu_type))
+ {
+ mc68kcpu->mmu_srp_aptr = REG_DA(mc68kcpu)[(word2 >> 12) & 15];
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ case 0xc00: // ROMBAR0
+ if(CPU_TYPE_IS_COLDFIRE((mc68kcpu)->cpu_type))
+ {
+ /* TODO */
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ case 0xc01: // ROMBAR1
+ if(CPU_TYPE_IS_COLDFIRE((mc68kcpu)->cpu_type))
+ {
+ /* TODO */
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ case 0xc04: // RAMBAR0
+ if(CPU_TYPE_IS_COLDFIRE((mc68kcpu)->cpu_type))
+ {
+ /* TODO */
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ case 0xc05: // RAMBAR1
+ if(CPU_TYPE_IS_COLDFIRE((mc68kcpu)->cpu_type))
+ {
+ /* TODO */
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ case 0xc0c: // MPCR
+ if(CPU_TYPE_IS_COLDFIRE((mc68kcpu)->cpu_type))
+ {
+ /* TODO */
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ case 0xc0d: // EDRAMBAR
+ if(CPU_TYPE_IS_COLDFIRE((mc68kcpu)->cpu_type))
+ {
+ /* TODO */
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ case 0xc0e: // SECMBAR
+ if(CPU_TYPE_IS_COLDFIRE((mc68kcpu)->cpu_type))
+ {
+ /* TODO */
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ case 0xc0f: // MBAR
+ if(CPU_TYPE_IS_COLDFIRE((mc68kcpu)->cpu_type))
+ {
+ /* TODO */
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ default:
+ m68ki_exception_illegal(mc68kcpu);
+ return;
+ }
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_movem_16_re_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 i = 0;
+ UINT32 register_list = OPER_I_16(mc68kcpu);
+ UINT32 ea = AY(mc68kcpu);
+ UINT32 count = 0;
+
+ for(; i < 16; i++)
+ if(register_list & (1 << i))
+ {
+ ea -= 2;
+ m68ki_write_16((mc68kcpu), ea, MASK_OUT_ABOVE_16(REG_DA(mc68kcpu)[15-i]));
+ count++;
+ }
+ AY(mc68kcpu) = ea;
+
+ (mc68kcpu)->remaining_cycles -= count<<(mc68kcpu)->cyc_movem_w;
+}
+
+
+void m68000_base_device_ops::m68k_op_movem_16_re_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 i = 0;
+ UINT32 register_list = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_AI_16(mc68kcpu);
+ UINT32 count = 0;
+
+ for(; i < 16; i++)
+ if(register_list & (1 << i))
+ {
+ m68ki_write_16((mc68kcpu), ea, MASK_OUT_ABOVE_16(REG_DA(mc68kcpu)[i]));
+ ea += 2;
+ count++;
+ }
+
+ (mc68kcpu)->remaining_cycles -= count<<(mc68kcpu)->cyc_movem_w;
+}
+
+
+void m68000_base_device_ops::m68k_op_movem_16_re_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 i = 0;
+ UINT32 register_list = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_DI_16(mc68kcpu);
+ UINT32 count = 0;
+
+ for(; i < 16; i++)
+ if(register_list & (1 << i))
+ {
+ m68ki_write_16((mc68kcpu), ea, MASK_OUT_ABOVE_16(REG_DA(mc68kcpu)[i]));
+ ea += 2;
+ count++;
+ }
+
+ (mc68kcpu)->remaining_cycles -= count<<(mc68kcpu)->cyc_movem_w;
+}
+
+
+void m68000_base_device_ops::m68k_op_movem_16_re_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 i = 0;
+ UINT32 register_list = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_IX_16(mc68kcpu);
+ UINT32 count = 0;
+
+ for(; i < 16; i++)
+ if(register_list & (1 << i))
+ {
+ m68ki_write_16((mc68kcpu), ea, MASK_OUT_ABOVE_16(REG_DA(mc68kcpu)[i]));
+ ea += 2;
+ count++;
+ }
+
+ (mc68kcpu)->remaining_cycles -= count<<(mc68kcpu)->cyc_movem_w;
+}
+
+
+void m68000_base_device_ops::m68k_op_movem_16_re_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 i = 0;
+ UINT32 register_list = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AW_16(mc68kcpu);
+ UINT32 count = 0;
+
+ for(; i < 16; i++)
+ if(register_list & (1 << i))
+ {
+ m68ki_write_16((mc68kcpu), ea, MASK_OUT_ABOVE_16(REG_DA(mc68kcpu)[i]));
+ ea += 2;
+ count++;
+ }
+
+ (mc68kcpu)->remaining_cycles -= count<<(mc68kcpu)->cyc_movem_w;
+}
+
+
+void m68000_base_device_ops::m68k_op_movem_16_re_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 i = 0;
+ UINT32 register_list = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AL_16(mc68kcpu);
+ UINT32 count = 0;
+
+ for(; i < 16; i++)
+ if(register_list & (1 << i))
+ {
+ m68ki_write_16((mc68kcpu), ea, MASK_OUT_ABOVE_16(REG_DA(mc68kcpu)[i]));
+ ea += 2;
+ count++;
+ }
+
+ (mc68kcpu)->remaining_cycles -= count<<(mc68kcpu)->cyc_movem_w;
+}
+
+
+void m68000_base_device_ops::m68k_op_movem_32_re_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 i = 0;
+ UINT32 register_list = OPER_I_16(mc68kcpu);
+ UINT32 ea = AY(mc68kcpu);
+ UINT32 count = 0;
+
+ for(; i < 16; i++)
+ if(register_list & (1 << i))
+ {
+ ea -= 4;
+ m68ki_write_16((mc68kcpu), ea+2, REG_DA(mc68kcpu)[15-i] & 0xFFFF );
+ m68ki_write_16((mc68kcpu), ea, (REG_DA(mc68kcpu)[15-i] >> 16) & 0xFFFF );
+ count++;
+ }
+ AY(mc68kcpu) = ea;
+
+ (mc68kcpu)->remaining_cycles -= count<<(mc68kcpu)->cyc_movem_l;
+}
+
+
+void m68000_base_device_ops::m68k_op_movem_32_re_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 i = 0;
+ UINT32 register_list = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_AI_32(mc68kcpu);
+ UINT32 count = 0;
+
+ for(; i < 16; i++)
+ if(register_list & (1 << i))
+ {
+ m68ki_write_32((mc68kcpu), ea, REG_DA(mc68kcpu)[i]);
+ ea += 4;
+ count++;
+ }
+
+ (mc68kcpu)->remaining_cycles -= count<<(mc68kcpu)->cyc_movem_l;
+}
+
+
+void m68000_base_device_ops::m68k_op_movem_32_re_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 i = 0;
+ UINT32 register_list = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_DI_32(mc68kcpu);
+ UINT32 count = 0;
+
+ for(; i < 16; i++)
+ if(register_list & (1 << i))
+ {
+ m68ki_write_32((mc68kcpu), ea, REG_DA(mc68kcpu)[i]);
+ ea += 4;
+ count++;
+ }
+
+ (mc68kcpu)->remaining_cycles -= count<<(mc68kcpu)->cyc_movem_l;
+}
+
+
+void m68000_base_device_ops::m68k_op_movem_32_re_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 i = 0;
+ UINT32 register_list = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_IX_32(mc68kcpu);
+ UINT32 count = 0;
+
+ for(; i < 16; i++)
+ if(register_list & (1 << i))
+ {
+ m68ki_write_32((mc68kcpu), ea, REG_DA(mc68kcpu)[i]);
+ ea += 4;
+ count++;
+ }
+
+ (mc68kcpu)->remaining_cycles -= count<<(mc68kcpu)->cyc_movem_l;
+}
+
+
+void m68000_base_device_ops::m68k_op_movem_32_re_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 i = 0;
+ UINT32 register_list = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AW_32(mc68kcpu);
+ UINT32 count = 0;
+
+ for(; i < 16; i++)
+ if(register_list & (1 << i))
+ {
+ m68ki_write_32((mc68kcpu), ea, REG_DA(mc68kcpu)[i]);
+ ea += 4;
+ count++;
+ }
+
+ (mc68kcpu)->remaining_cycles -= count<<(mc68kcpu)->cyc_movem_l;
+}
+
+
+void m68000_base_device_ops::m68k_op_movem_32_re_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 i = 0;
+ UINT32 register_list = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AL_32(mc68kcpu);
+ UINT32 count = 0;
+
+ for(; i < 16; i++)
+ if(register_list & (1 << i))
+ {
+ m68ki_write_32((mc68kcpu), ea, REG_DA(mc68kcpu)[i]);
+ ea += 4;
+ count++;
+ }
+
+ (mc68kcpu)->remaining_cycles -= count<<(mc68kcpu)->cyc_movem_l;
+}
+
+
+void m68000_base_device_ops::m68k_op_movem_16_er_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 i = 0;
+ UINT32 register_list = OPER_I_16(mc68kcpu);
+ UINT32 ea = AY(mc68kcpu);
+ UINT32 count = 0;
+
+ for(; i < 16; i++)
+ if(register_list & (1 << i))
+ {
+ REG_DA(mc68kcpu)[i] = MAKE_INT_16(MASK_OUT_ABOVE_16(m68ki_read_16((mc68kcpu), ea)));
+ ea += 2;
+ count++;
+ }
+ AY(mc68kcpu) = ea;
+
+ (mc68kcpu)->remaining_cycles -= count<<(mc68kcpu)->cyc_movem_w;
+}
+
+
+void m68000_base_device_ops::m68k_op_movem_16_er_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32 i = 0;
+ UINT32 register_list = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_PCDI_16(mc68kcpu);
+ UINT32 count = 0;
+
+ for(; i < 16; i++)
+ if(register_list & (1 << i))
+ {
+ REG_DA(mc68kcpu)[i] = MAKE_INT_16(MASK_OUT_ABOVE_16(m68ki_read_pcrel_16((mc68kcpu), ea)));
+ ea += 2;
+ count++;
+ }
+
+ (mc68kcpu)->remaining_cycles -= count<<(mc68kcpu)->cyc_movem_w;
+}
+
+
+void m68000_base_device_ops::m68k_op_movem_16_er_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32 i = 0;
+ UINT32 register_list = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_PCIX_16(mc68kcpu);
+ UINT32 count = 0;
+
+ for(; i < 16; i++)
+ if(register_list & (1 << i))
+ {
+ REG_DA(mc68kcpu)[i] = MAKE_INT_16(MASK_OUT_ABOVE_16(m68ki_read_pcrel_16((mc68kcpu), ea)));
+ ea += 2;
+ count++;
+ }
+
+ (mc68kcpu)->remaining_cycles -= count<<(mc68kcpu)->cyc_movem_w;
+}
+
+
+void m68000_base_device_ops::m68k_op_movem_16_er_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 i = 0;
+ UINT32 register_list = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_AI_16(mc68kcpu);
+ UINT32 count = 0;
+
+ for(; i < 16; i++)
+ if(register_list & (1 << i))
+ {
+ REG_DA(mc68kcpu)[i] = MAKE_INT_16(MASK_OUT_ABOVE_16(m68ki_read_16((mc68kcpu), ea)));
+ ea += 2;
+ count++;
+ }
+
+ (mc68kcpu)->remaining_cycles -= count<<(mc68kcpu)->cyc_movem_w;
+}
+
+
+void m68000_base_device_ops::m68k_op_movem_16_er_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 i = 0;
+ UINT32 register_list = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_DI_16(mc68kcpu);
+ UINT32 count = 0;
+
+ for(; i < 16; i++)
+ if(register_list & (1 << i))
+ {
+ REG_DA(mc68kcpu)[i] = MAKE_INT_16(MASK_OUT_ABOVE_16(m68ki_read_16((mc68kcpu), ea)));
+ ea += 2;
+ count++;
+ }
+
+ (mc68kcpu)->remaining_cycles -= count<<(mc68kcpu)->cyc_movem_w;
+}
+
+
+void m68000_base_device_ops::m68k_op_movem_16_er_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 i = 0;
+ UINT32 register_list = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_IX_16(mc68kcpu);
+ UINT32 count = 0;
+
+ for(; i < 16; i++)
+ if(register_list & (1 << i))
+ {
+ REG_DA(mc68kcpu)[i] = MAKE_INT_16(MASK_OUT_ABOVE_16(m68ki_read_16((mc68kcpu), ea)));
+ ea += 2;
+ count++;
+ }
+
+ (mc68kcpu)->remaining_cycles -= count<<(mc68kcpu)->cyc_movem_w;
+}
+
+
+void m68000_base_device_ops::m68k_op_movem_16_er_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 i = 0;
+ UINT32 register_list = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AW_16(mc68kcpu);
+ UINT32 count = 0;
+
+ for(; i < 16; i++)
+ if(register_list & (1 << i))
+ {
+ REG_DA(mc68kcpu)[i] = MAKE_INT_16(MASK_OUT_ABOVE_16(m68ki_read_16((mc68kcpu), ea)));
+ ea += 2;
+ count++;
+ }
+
+ (mc68kcpu)->remaining_cycles -= count<<(mc68kcpu)->cyc_movem_w;
+}
+
+
+void m68000_base_device_ops::m68k_op_movem_16_er_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 i = 0;
+ UINT32 register_list = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AL_16(mc68kcpu);
+ UINT32 count = 0;
+
+ for(; i < 16; i++)
+ if(register_list & (1 << i))
+ {
+ REG_DA(mc68kcpu)[i] = MAKE_INT_16(MASK_OUT_ABOVE_16(m68ki_read_16((mc68kcpu), ea)));
+ ea += 2;
+ count++;
+ }
+
+ (mc68kcpu)->remaining_cycles -= count<<(mc68kcpu)->cyc_movem_w;
+}
+
+
+void m68000_base_device_ops::m68k_op_movem_32_er_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 i = 0;
+ UINT32 register_list = OPER_I_16(mc68kcpu);
+ UINT32 ea = AY(mc68kcpu);
+ UINT32 count = 0;
+
+ for(; i < 16; i++)
+ if(register_list & (1 << i))
+ {
+ REG_DA(mc68kcpu)[i] = m68ki_read_32((mc68kcpu), ea);
+ ea += 4;
+ count++;
+ }
+ AY(mc68kcpu) = ea;
+
+ (mc68kcpu)->remaining_cycles -= count<<(mc68kcpu)->cyc_movem_l;
+}
+
+
+void m68000_base_device_ops::m68k_op_movem_32_er_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32 i = 0;
+ UINT32 register_list = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_PCDI_32(mc68kcpu);
+ UINT32 count = 0;
+
+ for(; i < 16; i++)
+ if(register_list & (1 << i))
+ {
+ REG_DA(mc68kcpu)[i] = m68ki_read_pcrel_32((mc68kcpu), ea);
+ ea += 4;
+ count++;
+ }
+
+ (mc68kcpu)->remaining_cycles -= count<<(mc68kcpu)->cyc_movem_l;
+}
+
+
+void m68000_base_device_ops::m68k_op_movem_32_er_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32 i = 0;
+ UINT32 register_list = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_PCIX_32(mc68kcpu);
+ UINT32 count = 0;
+
+ for(; i < 16; i++)
+ if(register_list & (1 << i))
+ {
+ REG_DA(mc68kcpu)[i] = m68ki_read_pcrel_32((mc68kcpu), ea);
+ ea += 4;
+ count++;
+ }
+
+ (mc68kcpu)->remaining_cycles -= count<<(mc68kcpu)->cyc_movem_l;
+}
+
+
+void m68000_base_device_ops::m68k_op_movem_32_er_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 i = 0;
+ UINT32 register_list = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_AI_32(mc68kcpu);
+ UINT32 count = 0;
+
+ for(; i < 16; i++)
+ if(register_list & (1 << i))
+ {
+ REG_DA(mc68kcpu)[i] = m68ki_read_32((mc68kcpu), ea);
+ ea += 4;
+ count++;
+ }
+
+ (mc68kcpu)->remaining_cycles -= count<<(mc68kcpu)->cyc_movem_l;
+}
+
+
+void m68000_base_device_ops::m68k_op_movem_32_er_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 i = 0;
+ UINT32 register_list = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_DI_32(mc68kcpu);
+ UINT32 count = 0;
+
+ for(; i < 16; i++)
+ if(register_list & (1 << i))
+ {
+ REG_DA(mc68kcpu)[i] = m68ki_read_32((mc68kcpu), ea);
+ ea += 4;
+ count++;
+ }
+
+ (mc68kcpu)->remaining_cycles -= count<<(mc68kcpu)->cyc_movem_l;
+}
+
+
+void m68000_base_device_ops::m68k_op_movem_32_er_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 i = 0;
+ UINT32 register_list = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_IX_32(mc68kcpu);
+ UINT32 count = 0;
+
+ for(; i < 16; i++)
+ if(register_list & (1 << i))
+ {
+ REG_DA(mc68kcpu)[i] = m68ki_read_32((mc68kcpu), ea);
+ ea += 4;
+ count++;
+ }
+
+ (mc68kcpu)->remaining_cycles -= count<<(mc68kcpu)->cyc_movem_l;
+}
+
+
+void m68000_base_device_ops::m68k_op_movem_32_er_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 i = 0;
+ UINT32 register_list = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AW_32(mc68kcpu);
+ UINT32 count = 0;
+
+ for(; i < 16; i++)
+ if(register_list & (1 << i))
+ {
+ REG_DA(mc68kcpu)[i] = m68ki_read_32((mc68kcpu), ea);
+ ea += 4;
+ count++;
+ }
+
+ (mc68kcpu)->remaining_cycles -= count<<(mc68kcpu)->cyc_movem_l;
+}
+
+
+void m68000_base_device_ops::m68k_op_movem_32_er_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 i = 0;
+ UINT32 register_list = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AL_32(mc68kcpu);
+ UINT32 count = 0;
+
+ for(; i < 16; i++)
+ if(register_list & (1 << i))
+ {
+ REG_DA(mc68kcpu)[i] = m68ki_read_32((mc68kcpu), ea);
+ ea += 4;
+ count++;
+ }
+
+ (mc68kcpu)->remaining_cycles -= count<<(mc68kcpu)->cyc_movem_l;
+}
+
+
+void m68000_base_device_ops::m68k_op_movep_16_re(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_16(mc68kcpu);
+ UINT32 src = DX(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(src >> 8));
+ m68ki_write_8((mc68kcpu), ea += 2, MASK_OUT_ABOVE_8(src));
+}
+
+
+void m68000_base_device_ops::m68k_op_movep_32_re(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_32(mc68kcpu);
+ UINT32 src = DX(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(src >> 24));
+ m68ki_write_8((mc68kcpu), ea += 2, MASK_OUT_ABOVE_8(src >> 16));
+ m68ki_write_8((mc68kcpu), ea += 2, MASK_OUT_ABOVE_8(src >> 8));
+ m68ki_write_8((mc68kcpu), ea += 2, MASK_OUT_ABOVE_8(src));
+}
+
+
+void m68000_base_device_ops::m68k_op_movep_16_er(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_16(mc68kcpu);
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | ((m68ki_read_8((mc68kcpu), ea) << 8) + m68ki_read_8((mc68kcpu), ea + 2));
+}
+
+
+void m68000_base_device_ops::m68k_op_movep_32_er(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_32(mc68kcpu);
+
+ DX(mc68kcpu) = (m68ki_read_8((mc68kcpu), ea) << 24) + (m68ki_read_8((mc68kcpu), ea + 2) << 16)
+ + (m68ki_read_8((mc68kcpu), ea + 4) << 8) + m68ki_read_8((mc68kcpu), ea + 6);
+}
+
+
+void m68000_base_device_ops::m68k_op_moves_8_ai(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
+ {
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_AI_8(mc68kcpu);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ if(BIT_B(word2)) /* Register to memory */
+ {
+ m68ki_write_8_fc((mc68kcpu), ea, (mc68kcpu)->dfc, MASK_OUT_ABOVE_8(REG_DA(mc68kcpu)[(word2 >> 12) & 15]));
+ return;
+ }
+ if(BIT_F(word2)) /* Memory to address register */
+ {
+ REG_A(mc68kcpu)[(word2 >> 12) & 7] = MAKE_INT_8(m68ki_read_8_fc((mc68kcpu), ea, (mc68kcpu)->sfc));
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ /* Memory to data register */
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_BELOW_8(REG_D(mc68kcpu)[(word2 >> 12) & 7]) | m68ki_read_8_fc((mc68kcpu), ea, (mc68kcpu)->sfc);
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_moves_8_pi(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
+ {
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_PI_8(mc68kcpu);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ if(BIT_B(word2)) /* Register to memory */
+ {
+ m68ki_write_8_fc((mc68kcpu), ea, (mc68kcpu)->dfc, MASK_OUT_ABOVE_8(REG_DA(mc68kcpu)[(word2 >> 12) & 15]));
+ return;
+ }
+ if(BIT_F(word2)) /* Memory to address register */
+ {
+ REG_A(mc68kcpu)[(word2 >> 12) & 7] = MAKE_INT_8(m68ki_read_8_fc((mc68kcpu), ea, (mc68kcpu)->sfc));
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ /* Memory to data register */
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_BELOW_8(REG_D(mc68kcpu)[(word2 >> 12) & 7]) | m68ki_read_8_fc((mc68kcpu), ea, (mc68kcpu)->sfc);
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_moves_8_pi7(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
+ {
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_A7_PI_8(mc68kcpu);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ if(BIT_B(word2)) /* Register to memory */
+ {
+ m68ki_write_8_fc((mc68kcpu), ea, (mc68kcpu)->dfc, MASK_OUT_ABOVE_8(REG_DA(mc68kcpu)[(word2 >> 12) & 15]));
+ return;
+ }
+ if(BIT_F(word2)) /* Memory to address register */
+ {
+ REG_A(mc68kcpu)[(word2 >> 12) & 7] = MAKE_INT_8(m68ki_read_8_fc((mc68kcpu), ea, (mc68kcpu)->sfc));
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ /* Memory to data register */
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_BELOW_8(REG_D(mc68kcpu)[(word2 >> 12) & 7]) | m68ki_read_8_fc((mc68kcpu), ea, (mc68kcpu)->sfc);
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_moves_8_pd(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
+ {
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_PD_8(mc68kcpu);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ if(BIT_B(word2)) /* Register to memory */
+ {
+ m68ki_write_8_fc((mc68kcpu), ea, (mc68kcpu)->dfc, MASK_OUT_ABOVE_8(REG_DA(mc68kcpu)[(word2 >> 12) & 15]));
+ return;
+ }
+ if(BIT_F(word2)) /* Memory to address register */
+ {
+ REG_A(mc68kcpu)[(word2 >> 12) & 7] = MAKE_INT_8(m68ki_read_8_fc((mc68kcpu), ea, (mc68kcpu)->sfc));
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ /* Memory to data register */
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_BELOW_8(REG_D(mc68kcpu)[(word2 >> 12) & 7]) | m68ki_read_8_fc((mc68kcpu), ea, (mc68kcpu)->sfc);
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_moves_8_pd7(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
+ {
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ if(BIT_B(word2)) /* Register to memory */
+ {
+ m68ki_write_8_fc((mc68kcpu), ea, (mc68kcpu)->dfc, MASK_OUT_ABOVE_8(REG_DA(mc68kcpu)[(word2 >> 12) & 15]));
+ return;
+ }
+ if(BIT_F(word2)) /* Memory to address register */
+ {
+ REG_A(mc68kcpu)[(word2 >> 12) & 7] = MAKE_INT_8(m68ki_read_8_fc((mc68kcpu), ea, (mc68kcpu)->sfc));
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ /* Memory to data register */
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_BELOW_8(REG_D(mc68kcpu)[(word2 >> 12) & 7]) | m68ki_read_8_fc((mc68kcpu), ea, (mc68kcpu)->sfc);
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_moves_8_di(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
+ {
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_DI_8(mc68kcpu);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ if(BIT_B(word2)) /* Register to memory */
+ {
+ m68ki_write_8_fc((mc68kcpu), ea, (mc68kcpu)->dfc, MASK_OUT_ABOVE_8(REG_DA(mc68kcpu)[(word2 >> 12) & 15]));
+ return;
+ }
+ if(BIT_F(word2)) /* Memory to address register */
+ {
+ REG_A(mc68kcpu)[(word2 >> 12) & 7] = MAKE_INT_8(m68ki_read_8_fc((mc68kcpu), ea, (mc68kcpu)->sfc));
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ /* Memory to data register */
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_BELOW_8(REG_D(mc68kcpu)[(word2 >> 12) & 7]) | m68ki_read_8_fc((mc68kcpu), ea, (mc68kcpu)->sfc);
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_moves_8_ix(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
+ {
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_IX_8(mc68kcpu);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ if(BIT_B(word2)) /* Register to memory */
+ {
+ m68ki_write_8_fc((mc68kcpu), ea, (mc68kcpu)->dfc, MASK_OUT_ABOVE_8(REG_DA(mc68kcpu)[(word2 >> 12) & 15]));
+ return;
+ }
+ if(BIT_F(word2)) /* Memory to address register */
+ {
+ REG_A(mc68kcpu)[(word2 >> 12) & 7] = MAKE_INT_8(m68ki_read_8_fc((mc68kcpu), ea, (mc68kcpu)->sfc));
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ /* Memory to data register */
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_BELOW_8(REG_D(mc68kcpu)[(word2 >> 12) & 7]) | m68ki_read_8_fc((mc68kcpu), ea, (mc68kcpu)->sfc);
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_moves_8_aw(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
+ {
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AW_8(mc68kcpu);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ if(BIT_B(word2)) /* Register to memory */
+ {
+ m68ki_write_8_fc((mc68kcpu), ea, (mc68kcpu)->dfc, MASK_OUT_ABOVE_8(REG_DA(mc68kcpu)[(word2 >> 12) & 15]));
+ return;
+ }
+ if(BIT_F(word2)) /* Memory to address register */
+ {
+ REG_A(mc68kcpu)[(word2 >> 12) & 7] = MAKE_INT_8(m68ki_read_8_fc((mc68kcpu), ea, (mc68kcpu)->sfc));
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ /* Memory to data register */
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_BELOW_8(REG_D(mc68kcpu)[(word2 >> 12) & 7]) | m68ki_read_8_fc((mc68kcpu), ea, (mc68kcpu)->sfc);
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_moves_8_al(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
+ {
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AL_8(mc68kcpu);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ if(BIT_B(word2)) /* Register to memory */
+ {
+ m68ki_write_8_fc((mc68kcpu), ea, (mc68kcpu)->dfc, MASK_OUT_ABOVE_8(REG_DA(mc68kcpu)[(word2 >> 12) & 15]));
+ return;
+ }
+ if(BIT_F(word2)) /* Memory to address register */
+ {
+ REG_A(mc68kcpu)[(word2 >> 12) & 7] = MAKE_INT_8(m68ki_read_8_fc((mc68kcpu), ea, (mc68kcpu)->sfc));
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ /* Memory to data register */
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_BELOW_8(REG_D(mc68kcpu)[(word2 >> 12) & 7]) | m68ki_read_8_fc((mc68kcpu), ea, (mc68kcpu)->sfc);
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_moves_16_ai(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
+ {
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_AI_16(mc68kcpu);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ if(BIT_B(word2)) /* Register to memory */
+ {
+ m68ki_write_16_fc((mc68kcpu), ea, (mc68kcpu)->dfc, MASK_OUT_ABOVE_16(REG_DA(mc68kcpu)[(word2 >> 12) & 15]));
+ return;
+ }
+ if(BIT_F(word2)) /* Memory to address register */
+ {
+ REG_A(mc68kcpu)[(word2 >> 12) & 7] = MAKE_INT_16(m68ki_read_16_fc((mc68kcpu), ea, (mc68kcpu)->sfc));
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ /* Memory to data register */
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_BELOW_16(REG_D(mc68kcpu)[(word2 >> 12) & 7]) | m68ki_read_16_fc((mc68kcpu), ea, (mc68kcpu)->sfc);
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_moves_16_pi(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
+ {
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_PI_16(mc68kcpu);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ if(BIT_B(word2)) /* Register to memory */
+ {
+ m68ki_write_16_fc((mc68kcpu), ea, (mc68kcpu)->dfc, MASK_OUT_ABOVE_16(REG_DA(mc68kcpu)[(word2 >> 12) & 15]));
+ return;
+ }
+ if(BIT_F(word2)) /* Memory to address register */
+ {
+ REG_A(mc68kcpu)[(word2 >> 12) & 7] = MAKE_INT_16(m68ki_read_16_fc((mc68kcpu), ea, (mc68kcpu)->sfc));
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ /* Memory to data register */
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_BELOW_16(REG_D(mc68kcpu)[(word2 >> 12) & 7]) | m68ki_read_16_fc((mc68kcpu), ea, (mc68kcpu)->sfc);
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_moves_16_pd(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
+ {
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_PD_16(mc68kcpu);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ if(BIT_B(word2)) /* Register to memory */
+ {
+ m68ki_write_16_fc((mc68kcpu), ea, (mc68kcpu)->dfc, MASK_OUT_ABOVE_16(REG_DA(mc68kcpu)[(word2 >> 12) & 15]));
+ return;
+ }
+ if(BIT_F(word2)) /* Memory to address register */
+ {
+ REG_A(mc68kcpu)[(word2 >> 12) & 7] = MAKE_INT_16(m68ki_read_16_fc((mc68kcpu), ea, (mc68kcpu)->sfc));
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ /* Memory to data register */
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_BELOW_16(REG_D(mc68kcpu)[(word2 >> 12) & 7]) | m68ki_read_16_fc((mc68kcpu), ea, (mc68kcpu)->sfc);
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_moves_16_di(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
+ {
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_DI_16(mc68kcpu);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ if(BIT_B(word2)) /* Register to memory */
+ {
+ m68ki_write_16_fc((mc68kcpu), ea, (mc68kcpu)->dfc, MASK_OUT_ABOVE_16(REG_DA(mc68kcpu)[(word2 >> 12) & 15]));
+ return;
+ }
+ if(BIT_F(word2)) /* Memory to address register */
+ {
+ REG_A(mc68kcpu)[(word2 >> 12) & 7] = MAKE_INT_16(m68ki_read_16_fc((mc68kcpu), ea, (mc68kcpu)->sfc));
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ /* Memory to data register */
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_BELOW_16(REG_D(mc68kcpu)[(word2 >> 12) & 7]) | m68ki_read_16_fc((mc68kcpu), ea, (mc68kcpu)->sfc);
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_moves_16_ix(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
+ {
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_IX_16(mc68kcpu);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ if(BIT_B(word2)) /* Register to memory */
+ {
+ m68ki_write_16_fc((mc68kcpu), ea, (mc68kcpu)->dfc, MASK_OUT_ABOVE_16(REG_DA(mc68kcpu)[(word2 >> 12) & 15]));
+ return;
+ }
+ if(BIT_F(word2)) /* Memory to address register */
+ {
+ REG_A(mc68kcpu)[(word2 >> 12) & 7] = MAKE_INT_16(m68ki_read_16_fc((mc68kcpu), ea, (mc68kcpu)->sfc));
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ /* Memory to data register */
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_BELOW_16(REG_D(mc68kcpu)[(word2 >> 12) & 7]) | m68ki_read_16_fc((mc68kcpu), ea, (mc68kcpu)->sfc);
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_moves_16_aw(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
+ {
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AW_16(mc68kcpu);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ if(BIT_B(word2)) /* Register to memory */
+ {
+ m68ki_write_16_fc((mc68kcpu), ea, (mc68kcpu)->dfc, MASK_OUT_ABOVE_16(REG_DA(mc68kcpu)[(word2 >> 12) & 15]));
+ return;
+ }
+ if(BIT_F(word2)) /* Memory to address register */
+ {
+ REG_A(mc68kcpu)[(word2 >> 12) & 7] = MAKE_INT_16(m68ki_read_16_fc((mc68kcpu), ea, (mc68kcpu)->sfc));
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ /* Memory to data register */
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_BELOW_16(REG_D(mc68kcpu)[(word2 >> 12) & 7]) | m68ki_read_16_fc((mc68kcpu), ea, (mc68kcpu)->sfc);
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_moves_16_al(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
+ {
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AL_16(mc68kcpu);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ if(BIT_B(word2)) /* Register to memory */
+ {
+ m68ki_write_16_fc((mc68kcpu), ea, (mc68kcpu)->dfc, MASK_OUT_ABOVE_16(REG_DA(mc68kcpu)[(word2 >> 12) & 15]));
+ return;
+ }
+ if(BIT_F(word2)) /* Memory to address register */
+ {
+ REG_A(mc68kcpu)[(word2 >> 12) & 7] = MAKE_INT_16(m68ki_read_16_fc((mc68kcpu), ea, (mc68kcpu)->sfc));
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ /* Memory to data register */
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_BELOW_16(REG_D(mc68kcpu)[(word2 >> 12) & 7]) | m68ki_read_16_fc((mc68kcpu), ea, (mc68kcpu)->sfc);
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_moves_32_ai(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
+ {
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_AI_32(mc68kcpu);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ if(BIT_B(word2)) /* Register to memory */
+ {
+ m68ki_write_32_fc((mc68kcpu), ea, (mc68kcpu)->dfc, REG_DA(mc68kcpu)[(word2 >> 12) & 15]);
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ /* Memory to register */
+ REG_DA(mc68kcpu)[(word2 >> 12) & 15] = m68ki_read_32_fc((mc68kcpu), ea, (mc68kcpu)->sfc);
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_moves_32_pi(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
+ {
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_PI_32(mc68kcpu);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ if(BIT_B(word2)) /* Register to memory */
+ {
+ m68ki_write_32_fc((mc68kcpu), ea, (mc68kcpu)->dfc, REG_DA(mc68kcpu)[(word2 >> 12) & 15]);
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ /* Memory to register */
+ REG_DA(mc68kcpu)[(word2 >> 12) & 15] = m68ki_read_32_fc((mc68kcpu), ea, (mc68kcpu)->sfc);
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_moves_32_pd(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
+ {
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_PD_32(mc68kcpu);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ if(BIT_B(word2)) /* Register to memory */
+ {
+ m68ki_write_32_fc((mc68kcpu), ea, (mc68kcpu)->dfc, REG_DA(mc68kcpu)[(word2 >> 12) & 15]);
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ /* Memory to register */
+ REG_DA(mc68kcpu)[(word2 >> 12) & 15] = m68ki_read_32_fc((mc68kcpu), ea, (mc68kcpu)->sfc);
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_moves_32_di(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
+ {
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_DI_32(mc68kcpu);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ if(BIT_B(word2)) /* Register to memory */
+ {
+ m68ki_write_32_fc((mc68kcpu), ea, (mc68kcpu)->dfc, REG_DA(mc68kcpu)[(word2 >> 12) & 15]);
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ /* Memory to register */
+ REG_DA(mc68kcpu)[(word2 >> 12) & 15] = m68ki_read_32_fc((mc68kcpu), ea, (mc68kcpu)->sfc);
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_moves_32_ix(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
+ {
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_IX_32(mc68kcpu);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ if(BIT_B(word2)) /* Register to memory */
+ {
+ m68ki_write_32_fc((mc68kcpu), ea, (mc68kcpu)->dfc, REG_DA(mc68kcpu)[(word2 >> 12) & 15]);
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ /* Memory to register */
+ REG_DA(mc68kcpu)[(word2 >> 12) & 15] = m68ki_read_32_fc((mc68kcpu), ea, (mc68kcpu)->sfc);
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_moves_32_aw(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
+ {
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AW_32(mc68kcpu);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ if(BIT_B(word2)) /* Register to memory */
+ {
+ m68ki_write_32_fc((mc68kcpu), ea, (mc68kcpu)->dfc, REG_DA(mc68kcpu)[(word2 >> 12) & 15]);
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ /* Memory to register */
+ REG_DA(mc68kcpu)[(word2 >> 12) & 15] = m68ki_read_32_fc((mc68kcpu), ea, (mc68kcpu)->sfc);
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_moves_32_al(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
+ {
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AL_32(mc68kcpu);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ if(BIT_B(word2)) /* Register to memory */
+ {
+ m68ki_write_32_fc((mc68kcpu), ea, (mc68kcpu)->dfc, REG_DA(mc68kcpu)[(word2 >> 12) & 15]);
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ /* Memory to register */
+ REG_DA(mc68kcpu)[(word2 >> 12) & 15] = m68ki_read_32_fc((mc68kcpu), ea, (mc68kcpu)->sfc);
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ (mc68kcpu)->remaining_cycles -= 2;
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_moveq_32(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = DX(mc68kcpu) = MAKE_INT_8(MASK_OUT_ABOVE_8((mc68kcpu)->ir));
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_move16_32(m68000_base_device* mc68kcpu)
+{
+ UINT16 w2 = OPER_I_16(mc68kcpu);
+ int ax = (mc68kcpu)->ir & 7;
+ int ay = (w2 >> 12) & 7;
+ m68ki_write_32((mc68kcpu), REG_A(mc68kcpu)[ay], m68ki_read_32((mc68kcpu), REG_A(mc68kcpu)[ax]));
+ m68ki_write_32((mc68kcpu), REG_A(mc68kcpu)[ay]+4, m68ki_read_32((mc68kcpu), REG_A(mc68kcpu)[ax]+4));
+ m68ki_write_32((mc68kcpu), REG_A(mc68kcpu)[ay]+8, m68ki_read_32((mc68kcpu), REG_A(mc68kcpu)[ax]+8));
+ m68ki_write_32((mc68kcpu), REG_A(mc68kcpu)[ay]+12, m68ki_read_32((mc68kcpu), REG_A(mc68kcpu)[ax]+12));
+
+ REG_A(mc68kcpu)[ax] += 16;
+ REG_A(mc68kcpu)[ay] += 16;
+}
+
+
+void m68000_base_device_ops::m68k_op_muls_16_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_32(MAKE_INT_16(DY(mc68kcpu)) * MAKE_INT_16(MASK_OUT_ABOVE_16(*r_dst)));
+
+ *r_dst = res;
+
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_muls_16_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_32(MAKE_INT_16(OPER_AY_AI_16(mc68kcpu)) * MAKE_INT_16(MASK_OUT_ABOVE_16(*r_dst)));
+
+ *r_dst = res;
+
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_muls_16_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_32(MAKE_INT_16(OPER_AY_PI_16(mc68kcpu)) * MAKE_INT_16(MASK_OUT_ABOVE_16(*r_dst)));
+
+ *r_dst = res;
+
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_muls_16_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_32(MAKE_INT_16(OPER_AY_PD_16(mc68kcpu)) * MAKE_INT_16(MASK_OUT_ABOVE_16(*r_dst)));
+
+ *r_dst = res;
+
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_muls_16_di(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_32(MAKE_INT_16(OPER_AY_DI_16(mc68kcpu)) * MAKE_INT_16(MASK_OUT_ABOVE_16(*r_dst)));
+
+ *r_dst = res;
+
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_muls_16_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_32(MAKE_INT_16(OPER_AY_IX_16(mc68kcpu)) * MAKE_INT_16(MASK_OUT_ABOVE_16(*r_dst)));
+
+ *r_dst = res;
+
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_muls_16_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_32(MAKE_INT_16(OPER_AW_16(mc68kcpu)) * MAKE_INT_16(MASK_OUT_ABOVE_16(*r_dst)));
+
+ *r_dst = res;
+
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_muls_16_al(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_32(MAKE_INT_16(OPER_AL_16(mc68kcpu)) * MAKE_INT_16(MASK_OUT_ABOVE_16(*r_dst)));
+
+ *r_dst = res;
+
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_muls_16_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_32(MAKE_INT_16(OPER_PCDI_16(mc68kcpu)) * MAKE_INT_16(MASK_OUT_ABOVE_16(*r_dst)));
+
+ *r_dst = res;
+
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_muls_16_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_32(MAKE_INT_16(OPER_PCIX_16(mc68kcpu)) * MAKE_INT_16(MASK_OUT_ABOVE_16(*r_dst)));
+
+ *r_dst = res;
+
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_muls_16_i(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_32(MAKE_INT_16(OPER_I_16(mc68kcpu)) * MAKE_INT_16(MASK_OUT_ABOVE_16(*r_dst)));
+
+ *r_dst = res;
+
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_mulu_16_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(DY(mc68kcpu)) * MASK_OUT_ABOVE_16(*r_dst);
+
+ *r_dst = res;
+
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_mulu_16_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 res = OPER_AY_AI_16(mc68kcpu) * MASK_OUT_ABOVE_16(*r_dst);
+
+ *r_dst = res;
+
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_mulu_16_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 res = OPER_AY_PI_16(mc68kcpu) * MASK_OUT_ABOVE_16(*r_dst);
+
+ *r_dst = res;
+
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_mulu_16_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 res = OPER_AY_PD_16(mc68kcpu) * MASK_OUT_ABOVE_16(*r_dst);
+
+ *r_dst = res;
+
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_mulu_16_di(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 res = OPER_AY_DI_16(mc68kcpu) * MASK_OUT_ABOVE_16(*r_dst);
+
+ *r_dst = res;
+
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_mulu_16_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 res = OPER_AY_IX_16(mc68kcpu) * MASK_OUT_ABOVE_16(*r_dst);
+
+ *r_dst = res;
+
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_mulu_16_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 res = OPER_AW_16(mc68kcpu) * MASK_OUT_ABOVE_16(*r_dst);
+
+ *r_dst = res;
+
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_mulu_16_al(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 res = OPER_AL_16(mc68kcpu) * MASK_OUT_ABOVE_16(*r_dst);
+
+ *r_dst = res;
+
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_mulu_16_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 res = OPER_PCDI_16(mc68kcpu) * MASK_OUT_ABOVE_16(*r_dst);
+
+ *r_dst = res;
+
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_mulu_16_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 res = OPER_PCIX_16(mc68kcpu) * MASK_OUT_ABOVE_16(*r_dst);
+
+ *r_dst = res;
+
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_mulu_16_i(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 res = OPER_I_16(mc68kcpu) * MASK_OUT_ABOVE_16(*r_dst);
+
+ *r_dst = res;
+
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_mull_32_d(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT64 src = DY(mc68kcpu);
+ UINT64 dst = REG_D(mc68kcpu)[(word2 >> 12) & 7];
+ UINT64 res;
+
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ if(BIT_B(word2)) /* signed */
+ {
+ res = (INT64)((INT32)src) * (INT64)((INT32)dst);
+ if(!BIT_A(word2))
+ {
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = ((INT64)res != (INT32)res)<<7;
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
+ return;
+ }
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
+ (mc68kcpu)->n_flag = NFLAG_64(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
+ return;
+ }
+
+ res = src * dst;
+ if(!BIT_A(word2))
+ {
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = (res > 0xffffffff)<<7;
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
+ return;
+ }
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
+ (mc68kcpu)->n_flag = NFLAG_64(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_mull_32_ai(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT64 src = OPER_AY_AI_32(mc68kcpu);
+ UINT64 dst = REG_D(mc68kcpu)[(word2 >> 12) & 7];
+ UINT64 res;
+
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ if(BIT_B(word2)) /* signed */
+ {
+ res = (INT64)((INT32)src) * (INT64)((INT32)dst);
+ if(!BIT_A(word2))
+ {
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = ((INT64)res != (INT32)res)<<7;
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
+ return;
+ }
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
+ (mc68kcpu)->n_flag = NFLAG_64(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
+ return;
+ }
+
+ res = src * dst;
+ if(!BIT_A(word2))
+ {
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = (res > 0xffffffff)<<7;
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
+ return;
+ }
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
+ (mc68kcpu)->n_flag = NFLAG_64(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_mull_32_pi(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT64 src = OPER_AY_PI_32(mc68kcpu);
+ UINT64 dst = REG_D(mc68kcpu)[(word2 >> 12) & 7];
+ UINT64 res;
+
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ if(BIT_B(word2)) /* signed */
+ {
+ res = (INT64)((INT32)src) * (INT64)((INT32)dst);
+ if(!BIT_A(word2))
+ {
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = ((INT64)res != (INT32)res)<<7;
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
+ return;
+ }
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
+ (mc68kcpu)->n_flag = NFLAG_64(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
+ return;
+ }
+
+ res = src * dst;
+ if(!BIT_A(word2))
+ {
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = (res > 0xffffffff)<<7;
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
+ return;
+ }
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
+ (mc68kcpu)->n_flag = NFLAG_64(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_mull_32_pd(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT64 src = OPER_AY_PD_32(mc68kcpu);
+ UINT64 dst = REG_D(mc68kcpu)[(word2 >> 12) & 7];
+ UINT64 res;
+
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ if(BIT_B(word2)) /* signed */
+ {
+ res = (INT64)((INT32)src) * (INT64)((INT32)dst);
+ if(!BIT_A(word2))
+ {
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = ((INT64)res != (INT32)res)<<7;
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
+ return;
+ }
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
+ (mc68kcpu)->n_flag = NFLAG_64(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
+ return;
+ }
+
+ res = src * dst;
+ if(!BIT_A(word2))
+ {
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = (res > 0xffffffff)<<7;
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
+ return;
+ }
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
+ (mc68kcpu)->n_flag = NFLAG_64(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_mull_32_di(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT64 src = OPER_AY_DI_32(mc68kcpu);
+ UINT64 dst = REG_D(mc68kcpu)[(word2 >> 12) & 7];
+ UINT64 res;
+
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ if(BIT_B(word2)) /* signed */
+ {
+ res = (INT64)((INT32)src) * (INT64)((INT32)dst);
+ if(!BIT_A(word2))
+ {
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = ((INT64)res != (INT32)res)<<7;
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
+ return;
+ }
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
+ (mc68kcpu)->n_flag = NFLAG_64(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
+ return;
+ }
+
+ res = src * dst;
+ if(!BIT_A(word2))
+ {
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = (res > 0xffffffff)<<7;
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
+ return;
+ }
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
+ (mc68kcpu)->n_flag = NFLAG_64(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_mull_32_ix(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT64 src = OPER_AY_IX_32(mc68kcpu);
+ UINT64 dst = REG_D(mc68kcpu)[(word2 >> 12) & 7];
+ UINT64 res;
+
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ if(BIT_B(word2)) /* signed */
+ {
+ res = (INT64)((INT32)src) * (INT64)((INT32)dst);
+ if(!BIT_A(word2))
+ {
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = ((INT64)res != (INT32)res)<<7;
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
+ return;
+ }
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
+ (mc68kcpu)->n_flag = NFLAG_64(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
+ return;
+ }
+
+ res = src * dst;
+ if(!BIT_A(word2))
+ {
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = (res > 0xffffffff)<<7;
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
+ return;
+ }
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
+ (mc68kcpu)->n_flag = NFLAG_64(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_mull_32_aw(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT64 src = OPER_AW_32(mc68kcpu);
+ UINT64 dst = REG_D(mc68kcpu)[(word2 >> 12) & 7];
+ UINT64 res;
+
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ if(BIT_B(word2)) /* signed */
+ {
+ res = (INT64)((INT32)src) * (INT64)((INT32)dst);
+ if(!BIT_A(word2))
+ {
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = ((INT64)res != (INT32)res)<<7;
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
+ return;
+ }
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
+ (mc68kcpu)->n_flag = NFLAG_64(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
+ return;
+ }
+
+ res = src * dst;
+ if(!BIT_A(word2))
+ {
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = (res > 0xffffffff)<<7;
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
+ return;
+ }
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
+ (mc68kcpu)->n_flag = NFLAG_64(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_mull_32_al(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT64 src = OPER_AL_32(mc68kcpu);
+ UINT64 dst = REG_D(mc68kcpu)[(word2 >> 12) & 7];
+ UINT64 res;
+
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ if(BIT_B(word2)) /* signed */
+ {
+ res = (INT64)((INT32)src) * (INT64)((INT32)dst);
+ if(!BIT_A(word2))
+ {
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = ((INT64)res != (INT32)res)<<7;
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
+ return;
+ }
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
+ (mc68kcpu)->n_flag = NFLAG_64(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
+ return;
+ }
+
+ res = src * dst;
+ if(!BIT_A(word2))
+ {
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = (res > 0xffffffff)<<7;
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
+ return;
+ }
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
+ (mc68kcpu)->n_flag = NFLAG_64(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_mull_32_pcdi(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT64 src = OPER_PCDI_32(mc68kcpu);
+ UINT64 dst = REG_D(mc68kcpu)[(word2 >> 12) & 7];
+ UINT64 res;
+
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ if(BIT_B(word2)) /* signed */
+ {
+ res = (INT64)((INT32)src) * (INT64)((INT32)dst);
+ if(!BIT_A(word2))
+ {
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = ((INT64)res != (INT32)res)<<7;
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
+ return;
+ }
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
+ (mc68kcpu)->n_flag = NFLAG_64(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
+ return;
+ }
+
+ res = src * dst;
+ if(!BIT_A(word2))
+ {
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = (res > 0xffffffff)<<7;
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
+ return;
+ }
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
+ (mc68kcpu)->n_flag = NFLAG_64(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_mull_32_pcix(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT64 src = OPER_PCIX_32(mc68kcpu);
+ UINT64 dst = REG_D(mc68kcpu)[(word2 >> 12) & 7];
+ UINT64 res;
+
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ if(BIT_B(word2)) /* signed */
+ {
+ res = (INT64)((INT32)src) * (INT64)((INT32)dst);
+ if(!BIT_A(word2))
+ {
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = ((INT64)res != (INT32)res)<<7;
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
+ return;
+ }
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
+ (mc68kcpu)->n_flag = NFLAG_64(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
+ return;
+ }
+
+ res = src * dst;
+ if(!BIT_A(word2))
+ {
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = (res > 0xffffffff)<<7;
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
+ return;
+ }
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
+ (mc68kcpu)->n_flag = NFLAG_64(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_mull_32_i(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 word2 = OPER_I_16(mc68kcpu);
+ UINT64 src = OPER_I_32(mc68kcpu);
+ UINT64 dst = REG_D(mc68kcpu)[(word2 >> 12) & 7];
+ UINT64 res;
+
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ if(BIT_B(word2)) /* signed */
+ {
+ res = (INT64)((INT32)src) * (INT64)((INT32)dst);
+ if(!BIT_A(word2))
+ {
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = ((INT64)res != (INT32)res)<<7;
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
+ return;
+ }
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
+ (mc68kcpu)->n_flag = NFLAG_64(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
+ return;
+ }
+
+ res = src * dst;
+ if(!BIT_A(word2))
+ {
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->v_flag = (res > 0xffffffff)<<7;
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
+ return;
+ }
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
+ (mc68kcpu)->n_flag = NFLAG_64(res);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
+ REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_nbcd_8_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 dst = *r_dst;
+ UINT32 res = MASK_OUT_ABOVE_8(0x9a - dst - XFLAG_AS_1(mc68kcpu));
+
+ if(res != 0x9a)
+ {
+ (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
+
+ if((res & 0x0f) == 0xa)
+ res = (res & 0xf0) + 0x10;
+
+ res = MASK_OUT_ABOVE_8(res);
+
+ (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
+
+ (mc68kcpu)->not_z_flag |= res;
+ (mc68kcpu)->c_flag = CFLAG_SET;
+ (mc68kcpu)->x_flag = XFLAG_SET;
+ }
+ else
+ {
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->x_flag = XFLAG_CLEAR;
+ }
+ (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
+}
+
+
+void m68000_base_device_ops::m68k_op_nbcd_8_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = MASK_OUT_ABOVE_8(0x9a - dst - XFLAG_AS_1(mc68kcpu));
+
+ if(res != 0x9a)
+ {
+ (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
+
+ if((res & 0x0f) == 0xa)
+ res = (res & 0xf0) + 0x10;
+
+ res = MASK_OUT_ABOVE_8(res);
+
+ (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
+
+ m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(res));
+
+ (mc68kcpu)->not_z_flag |= res;
+ (mc68kcpu)->c_flag = CFLAG_SET;
+ (mc68kcpu)->x_flag = XFLAG_SET;
+ }
+ else
+ {
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->x_flag = XFLAG_CLEAR;
+ }
+ (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
+}
+
+
+void m68000_base_device_ops::m68k_op_nbcd_8_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = MASK_OUT_ABOVE_8(0x9a - dst - XFLAG_AS_1(mc68kcpu));
+
+ if(res != 0x9a)
+ {
+ (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
+
+ if((res & 0x0f) == 0xa)
+ res = (res & 0xf0) + 0x10;
+
+ res = MASK_OUT_ABOVE_8(res);
+
+ (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
+
+ m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(res));
+
+ (mc68kcpu)->not_z_flag |= res;
+ (mc68kcpu)->c_flag = CFLAG_SET;
+ (mc68kcpu)->x_flag = XFLAG_SET;
+ }
+ else
+ {
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->x_flag = XFLAG_CLEAR;
+ }
+ (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
+}
+
+
+void m68000_base_device_ops::m68k_op_nbcd_8_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_A7_PI_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = MASK_OUT_ABOVE_8(0x9a - dst - XFLAG_AS_1(mc68kcpu));
+
+ if(res != 0x9a)
+ {
+ (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
+
+ if((res & 0x0f) == 0xa)
+ res = (res & 0xf0) + 0x10;
+
+ res = MASK_OUT_ABOVE_8(res);
+
+ (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
+
+ m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(res));
+
+ (mc68kcpu)->not_z_flag |= res;
+ (mc68kcpu)->c_flag = CFLAG_SET;
+ (mc68kcpu)->x_flag = XFLAG_SET;
+ }
+ else
+ {
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->x_flag = XFLAG_CLEAR;
+ }
+ (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
+}
+
+
+void m68000_base_device_ops::m68k_op_nbcd_8_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = MASK_OUT_ABOVE_8(0x9a - dst - XFLAG_AS_1(mc68kcpu));
+
+ if(res != 0x9a)
+ {
+ (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
+
+ if((res & 0x0f) == 0xa)
+ res = (res & 0xf0) + 0x10;
+
+ res = MASK_OUT_ABOVE_8(res);
+
+ (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
+
+ m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(res));
+
+ (mc68kcpu)->not_z_flag |= res;
+ (mc68kcpu)->c_flag = CFLAG_SET;
+ (mc68kcpu)->x_flag = XFLAG_SET;
+ }
+ else
+ {
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->x_flag = XFLAG_CLEAR;
+ }
+ (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
+}
+
+
+void m68000_base_device_ops::m68k_op_nbcd_8_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = MASK_OUT_ABOVE_8(0x9a - dst - XFLAG_AS_1(mc68kcpu));
+
+ if(res != 0x9a)
+ {
+ (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
+
+ if((res & 0x0f) == 0xa)
+ res = (res & 0xf0) + 0x10;
+
+ res = MASK_OUT_ABOVE_8(res);
+
+ (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
+
+ m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(res));
+
+ (mc68kcpu)->not_z_flag |= res;
+ (mc68kcpu)->c_flag = CFLAG_SET;
+ (mc68kcpu)->x_flag = XFLAG_SET;
+ }
+ else
+ {
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->x_flag = XFLAG_CLEAR;
+ }
+ (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
+}
+
+
+void m68000_base_device_ops::m68k_op_nbcd_8_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = MASK_OUT_ABOVE_8(0x9a - dst - XFLAG_AS_1(mc68kcpu));
+
+ if(res != 0x9a)
+ {
+ (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
+
+ if((res & 0x0f) == 0xa)
+ res = (res & 0xf0) + 0x10;
+
+ res = MASK_OUT_ABOVE_8(res);
+
+ (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
+
+ m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(res));
+
+ (mc68kcpu)->not_z_flag |= res;
+ (mc68kcpu)->c_flag = CFLAG_SET;
+ (mc68kcpu)->x_flag = XFLAG_SET;
+ }
+ else
+ {
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->x_flag = XFLAG_CLEAR;
+ }
+ (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
+}
+
+
+void m68000_base_device_ops::m68k_op_nbcd_8_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = MASK_OUT_ABOVE_8(0x9a - dst - XFLAG_AS_1(mc68kcpu));
+
+ if(res != 0x9a)
+ {
+ (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
+
+ if((res & 0x0f) == 0xa)
+ res = (res & 0xf0) + 0x10;
+
+ res = MASK_OUT_ABOVE_8(res);
+
+ (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
+
+ m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(res));
+
+ (mc68kcpu)->not_z_flag |= res;
+ (mc68kcpu)->c_flag = CFLAG_SET;
+ (mc68kcpu)->x_flag = XFLAG_SET;
+ }
+ else
+ {
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->x_flag = XFLAG_CLEAR;
+ }
+ (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
+}
+
+
+void m68000_base_device_ops::m68k_op_nbcd_8_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = MASK_OUT_ABOVE_8(0x9a - dst - XFLAG_AS_1(mc68kcpu));
+
+ if(res != 0x9a)
+ {
+ (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
+
+ if((res & 0x0f) == 0xa)
+ res = (res & 0xf0) + 0x10;
+
+ res = MASK_OUT_ABOVE_8(res);
+
+ (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
+
+ m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(res));
+
+ (mc68kcpu)->not_z_flag |= res;
+ (mc68kcpu)->c_flag = CFLAG_SET;
+ (mc68kcpu)->x_flag = XFLAG_SET;
+ }
+ else
+ {
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->x_flag = XFLAG_CLEAR;
+ }
+ (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
+}
+
+
+void m68000_base_device_ops::m68k_op_nbcd_8_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = MASK_OUT_ABOVE_8(0x9a - dst - XFLAG_AS_1(mc68kcpu));
+
+ if(res != 0x9a)
+ {
+ (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
+
+ if((res & 0x0f) == 0xa)
+ res = (res & 0xf0) + 0x10;
+
+ res = MASK_OUT_ABOVE_8(res);
+
+ (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
+
+ m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(res));
+
+ (mc68kcpu)->not_z_flag |= res;
+ (mc68kcpu)->c_flag = CFLAG_SET;
+ (mc68kcpu)->x_flag = XFLAG_SET;
+ }
+ else
+ {
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->x_flag = XFLAG_CLEAR;
+ }
+ (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
+}
+
+
+void m68000_base_device_ops::m68k_op_neg_8_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 res = 0 - MASK_OUT_ABOVE_8(*r_dst);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = *r_dst & res;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_neg_8_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = 0 - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = src & res;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_neg_8_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = 0 - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = src & res;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_neg_8_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_A7_PI_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = 0 - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = src & res;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_neg_8_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = 0 - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = src & res;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_neg_8_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = 0 - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = src & res;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_neg_8_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = 0 - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = src & res;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_neg_8_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = 0 - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = src & res;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_neg_8_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = 0 - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = src & res;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_neg_8_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = 0 - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = src & res;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_neg_16_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 res = 0 - MASK_OUT_ABOVE_16(*r_dst);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = (*r_dst & res)>>8;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_neg_16_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = 0 - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = (src & res)>>8;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_neg_16_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = 0 - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = (src & res)>>8;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_neg_16_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = 0 - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = (src & res)>>8;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_neg_16_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = 0 - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = (src & res)>>8;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_neg_16_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = 0 - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = (src & res)>>8;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_neg_16_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = 0 - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = (src & res)>>8;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_neg_16_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = 0 - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = (src & res)>>8;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_neg_32_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 res = 0 - *r_dst;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_SUB_32(*r_dst, 0, res);
+ (mc68kcpu)->v_flag = (*r_dst & res)>>24;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ *r_dst = (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_neg_32_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_32(mc68kcpu);
+ UINT32 src = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = 0 - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_SUB_32(src, 0, res);
+ (mc68kcpu)->v_flag = (src & res)>>24;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_neg_32_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_32(mc68kcpu);
+ UINT32 src = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = 0 - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_SUB_32(src, 0, res);
+ (mc68kcpu)->v_flag = (src & res)>>24;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_neg_32_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_32(mc68kcpu);
+ UINT32 src = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = 0 - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_SUB_32(src, 0, res);
+ (mc68kcpu)->v_flag = (src & res)>>24;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_neg_32_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_32(mc68kcpu);
+ UINT32 src = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = 0 - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_SUB_32(src, 0, res);
+ (mc68kcpu)->v_flag = (src & res)>>24;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_neg_32_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_32(mc68kcpu);
+ UINT32 src = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = 0 - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_SUB_32(src, 0, res);
+ (mc68kcpu)->v_flag = (src & res)>>24;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_neg_32_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_32(mc68kcpu);
+ UINT32 src = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = 0 - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_SUB_32(src, 0, res);
+ (mc68kcpu)->v_flag = (src & res)>>24;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_neg_32_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_32(mc68kcpu);
+ UINT32 src = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = 0 - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_SUB_32(src, 0, res);
+ (mc68kcpu)->v_flag = (src & res)>>24;
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_negx_8_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 res = 0 - MASK_OUT_ABOVE_8(*r_dst) - XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = *r_dst & res;
+
+ res = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
+}
+
+
+void m68000_base_device_ops::m68k_op_negx_8_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = 0 - src - XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = src & res;
+
+ res = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_8((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_negx_8_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = 0 - src - XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = src & res;
+
+ res = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_8((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_negx_8_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_A7_PI_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = 0 - src - XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = src & res;
+
+ res = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_8((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_negx_8_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = 0 - src - XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = src & res;
+
+ res = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_8((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_negx_8_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = 0 - src - XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = src & res;
+
+ res = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_8((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_negx_8_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = 0 - src - XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = src & res;
+
+ res = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_8((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_negx_8_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = 0 - src - XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = src & res;
+
+ res = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_8((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_negx_8_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = 0 - src - XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = src & res;
+
+ res = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_8((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_negx_8_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = 0 - src - XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = src & res;
+
+ res = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_8((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_negx_16_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 res = 0 - MASK_OUT_ABOVE_16(*r_dst) - XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = (*r_dst & res)>>8;
+
+ res = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+}
+
+
+void m68000_base_device_ops::m68k_op_negx_16_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = 0 - MASK_OUT_ABOVE_16(src) - XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = (src & res)>>8;
+
+ res = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_16((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_negx_16_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = 0 - MASK_OUT_ABOVE_16(src) - XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = (src & res)>>8;
+
+ res = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_16((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_negx_16_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = 0 - MASK_OUT_ABOVE_16(src) - XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = (src & res)>>8;
+
+ res = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_16((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_negx_16_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = 0 - MASK_OUT_ABOVE_16(src) - XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = (src & res)>>8;
+
+ res = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_16((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_negx_16_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = 0 - MASK_OUT_ABOVE_16(src) - XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = (src & res)>>8;
+
+ res = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_16((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_negx_16_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = 0 - MASK_OUT_ABOVE_16(src) - XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = (src & res)>>8;
+
+ res = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_16((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_negx_16_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = 0 - MASK_OUT_ABOVE_16(src) - XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = (src & res)>>8;
+
+ res = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_16((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_negx_32_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 res = 0 - MASK_OUT_ABOVE_32(*r_dst) - XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(*r_dst, 0, res);
+ (mc68kcpu)->v_flag = (*r_dst & res)>>24;
+
+ res = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ *r_dst = res;
+}
+
+
+void m68000_base_device_ops::m68k_op_negx_32_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_32(mc68kcpu);
+ UINT32 src = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = 0 - MASK_OUT_ABOVE_32(src) - XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, 0, res);
+ (mc68kcpu)->v_flag = (src & res)>>24;
+
+ res = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_32((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_negx_32_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_32(mc68kcpu);
+ UINT32 src = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = 0 - MASK_OUT_ABOVE_32(src) - XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, 0, res);
+ (mc68kcpu)->v_flag = (src & res)>>24;
+
+ res = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_32((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_negx_32_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_32(mc68kcpu);
+ UINT32 src = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = 0 - MASK_OUT_ABOVE_32(src) - XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, 0, res);
+ (mc68kcpu)->v_flag = (src & res)>>24;
+
+ res = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_32((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_negx_32_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_32(mc68kcpu);
+ UINT32 src = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = 0 - MASK_OUT_ABOVE_32(src) - XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, 0, res);
+ (mc68kcpu)->v_flag = (src & res)>>24;
+
+ res = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_32((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_negx_32_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_32(mc68kcpu);
+ UINT32 src = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = 0 - MASK_OUT_ABOVE_32(src) - XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, 0, res);
+ (mc68kcpu)->v_flag = (src & res)>>24;
+
+ res = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_32((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_negx_32_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_32(mc68kcpu);
+ UINT32 src = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = 0 - MASK_OUT_ABOVE_32(src) - XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, 0, res);
+ (mc68kcpu)->v_flag = (src & res)>>24;
+
+ res = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_32((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_negx_32_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_32(mc68kcpu);
+ UINT32 src = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = 0 - MASK_OUT_ABOVE_32(src) - XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, 0, res);
+ (mc68kcpu)->v_flag = (src & res)>>24;
+
+ res = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_32((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_nop(m68000_base_device* mc68kcpu)
+{
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+}
+
+
+void m68000_base_device_ops::m68k_op_not_8_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_8(~*r_dst);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_not_8_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_8(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_8(~m68ki_read_8((mc68kcpu), ea));
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_not_8_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_8(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_8(~m68ki_read_8((mc68kcpu), ea));
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_not_8_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_A7_PI_8(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_8(~m68ki_read_8((mc68kcpu), ea));
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_not_8_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_8(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_8(~m68ki_read_8((mc68kcpu), ea));
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_not_8_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_8(~m68ki_read_8((mc68kcpu), ea));
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_not_8_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_8(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_8(~m68ki_read_8((mc68kcpu), ea));
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_not_8_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_8(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_8(~m68ki_read_8((mc68kcpu), ea));
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_not_8_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_8(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_8(~m68ki_read_8((mc68kcpu), ea));
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_not_8_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_8(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_8(~m68ki_read_8((mc68kcpu), ea));
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_not_16_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(~*r_dst);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_not_16_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_16(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(~m68ki_read_16((mc68kcpu), ea));
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_not_16_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_16(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(~m68ki_read_16((mc68kcpu), ea));
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_not_16_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_16(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(~m68ki_read_16((mc68kcpu), ea));
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_not_16_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_16(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(~m68ki_read_16((mc68kcpu), ea));
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_not_16_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_16(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(~m68ki_read_16((mc68kcpu), ea));
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_not_16_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_16(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(~m68ki_read_16((mc68kcpu), ea));
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_not_16_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_16(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(~m68ki_read_16((mc68kcpu), ea));
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_not_32_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 res = *r_dst = MASK_OUT_ABOVE_32(~*r_dst);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_not_32_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_32(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_32(~m68ki_read_32((mc68kcpu), ea));
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_not_32_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_32(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_32(~m68ki_read_32((mc68kcpu), ea));
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_not_32_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_32(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_32(~m68ki_read_32((mc68kcpu), ea));
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_not_32_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_32(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_32(~m68ki_read_32((mc68kcpu), ea));
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_not_32_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_32(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_32(~m68ki_read_32((mc68kcpu), ea));
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_not_32_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_32(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_32(~m68ki_read_32((mc68kcpu), ea));
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_not_32_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_32(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_32(~m68ki_read_32((mc68kcpu), ea));
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_8_er_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_8((DX(mc68kcpu) |= MASK_OUT_ABOVE_8(DY(mc68kcpu))));
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_8_er_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_8((DX(mc68kcpu) |= OPER_AY_AI_8(mc68kcpu)));
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_8_er_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_8((DX(mc68kcpu) |= OPER_AY_PI_8(mc68kcpu)));
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_8_er_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_8((DX(mc68kcpu) |= OPER_A7_PI_8(mc68kcpu)));
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_8_er_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_8((DX(mc68kcpu) |= OPER_AY_PD_8(mc68kcpu)));
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_8_er_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_8((DX(mc68kcpu) |= OPER_A7_PD_8(mc68kcpu)));
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_8_er_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_8((DX(mc68kcpu) |= OPER_AY_DI_8(mc68kcpu)));
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_8_er_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_8((DX(mc68kcpu) |= OPER_AY_IX_8(mc68kcpu)));
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_8_er_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_8((DX(mc68kcpu) |= OPER_AW_8(mc68kcpu)));
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_8_er_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_8((DX(mc68kcpu) |= OPER_AL_8(mc68kcpu)));
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_8_er_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_8((DX(mc68kcpu) |= OPER_PCDI_8(mc68kcpu)));
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_8_er_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_8((DX(mc68kcpu) |= OPER_PCIX_8(mc68kcpu)));
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_8_er_i(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_8((DX(mc68kcpu) |= OPER_I_8(mc68kcpu)));
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_16_er_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_16((DX(mc68kcpu) |= MASK_OUT_ABOVE_16(DY(mc68kcpu))));
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_16_er_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_16((DX(mc68kcpu) |= OPER_AY_AI_16(mc68kcpu)));
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_16_er_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_16((DX(mc68kcpu) |= OPER_AY_PI_16(mc68kcpu)));
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_16_er_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_16((DX(mc68kcpu) |= OPER_AY_PD_16(mc68kcpu)));
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_16_er_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_16((DX(mc68kcpu) |= OPER_AY_DI_16(mc68kcpu)));
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_16_er_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_16((DX(mc68kcpu) |= OPER_AY_IX_16(mc68kcpu)));
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_16_er_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_16((DX(mc68kcpu) |= OPER_AW_16(mc68kcpu)));
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_16_er_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_16((DX(mc68kcpu) |= OPER_AL_16(mc68kcpu)));
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_16_er_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_16((DX(mc68kcpu) |= OPER_PCDI_16(mc68kcpu)));
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_16_er_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_16((DX(mc68kcpu) |= OPER_PCIX_16(mc68kcpu)));
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_16_er_i(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_16((DX(mc68kcpu) |= OPER_I_16(mc68kcpu)));
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_32_er_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = DX(mc68kcpu) |= DY(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_32_er_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = DX(mc68kcpu) |= OPER_AY_AI_32(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_32_er_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = DX(mc68kcpu) |= OPER_AY_PI_32(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_32_er_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = DX(mc68kcpu) |= OPER_AY_PD_32(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_32_er_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = DX(mc68kcpu) |= OPER_AY_DI_32(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_32_er_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = DX(mc68kcpu) |= OPER_AY_IX_32(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_32_er_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = DX(mc68kcpu) |= OPER_AW_32(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_32_er_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = DX(mc68kcpu) |= OPER_AL_32(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_32_er_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = DX(mc68kcpu) |= OPER_PCDI_32(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_32_er_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = DX(mc68kcpu) |= OPER_PCIX_32(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_32_er_i(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = DX(mc68kcpu) |= OPER_I_32(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_8_re_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_8(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_8(DX(mc68kcpu) | m68ki_read_8((mc68kcpu), ea));
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_8_re_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_8(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_8(DX(mc68kcpu) | m68ki_read_8((mc68kcpu), ea));
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_8_re_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_A7_PI_8(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_8(DX(mc68kcpu) | m68ki_read_8((mc68kcpu), ea));
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_8_re_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_8(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_8(DX(mc68kcpu) | m68ki_read_8((mc68kcpu), ea));
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_8_re_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_8(DX(mc68kcpu) | m68ki_read_8((mc68kcpu), ea));
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_8_re_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_8(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_8(DX(mc68kcpu) | m68ki_read_8((mc68kcpu), ea));
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_8_re_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_8(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_8(DX(mc68kcpu) | m68ki_read_8((mc68kcpu), ea));
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_8_re_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_8(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_8(DX(mc68kcpu) | m68ki_read_8((mc68kcpu), ea));
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_8_re_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_8(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_8(DX(mc68kcpu) | m68ki_read_8((mc68kcpu), ea));
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_16_re_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_16(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(DX(mc68kcpu) | m68ki_read_16((mc68kcpu), ea));
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_16_re_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_16(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(DX(mc68kcpu) | m68ki_read_16((mc68kcpu), ea));
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_16_re_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_16(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(DX(mc68kcpu) | m68ki_read_16((mc68kcpu), ea));
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_16_re_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_16(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(DX(mc68kcpu) | m68ki_read_16((mc68kcpu), ea));
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_16_re_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_16(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(DX(mc68kcpu) | m68ki_read_16((mc68kcpu), ea));
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_16_re_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_16(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(DX(mc68kcpu) | m68ki_read_16((mc68kcpu), ea));
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_16_re_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_16(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(DX(mc68kcpu) | m68ki_read_16((mc68kcpu), ea));
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_32_re_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_32(mc68kcpu);
+ UINT32 res = DX(mc68kcpu) | m68ki_read_32((mc68kcpu), ea);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_32_re_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_32(mc68kcpu);
+ UINT32 res = DX(mc68kcpu) | m68ki_read_32((mc68kcpu), ea);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_32_re_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_32(mc68kcpu);
+ UINT32 res = DX(mc68kcpu) | m68ki_read_32((mc68kcpu), ea);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_32_re_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_32(mc68kcpu);
+ UINT32 res = DX(mc68kcpu) | m68ki_read_32((mc68kcpu), ea);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_32_re_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_32(mc68kcpu);
+ UINT32 res = DX(mc68kcpu) | m68ki_read_32((mc68kcpu), ea);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_32_re_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_32(mc68kcpu);
+ UINT32 res = DX(mc68kcpu) | m68ki_read_32((mc68kcpu), ea);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_or_32_re_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_32(mc68kcpu);
+ UINT32 res = DX(mc68kcpu) | m68ki_read_32((mc68kcpu), ea);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ori_8_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_8((DY(mc68kcpu) |= OPER_I_8(mc68kcpu)));
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ori_8_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AY_AI_8(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_8(src | m68ki_read_8((mc68kcpu), ea));
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ori_8_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AY_PI_8(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_8(src | m68ki_read_8((mc68kcpu), ea));
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ori_8_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_A7_PI_8(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_8(src | m68ki_read_8((mc68kcpu), ea));
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ori_8_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AY_PD_8(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_8(src | m68ki_read_8((mc68kcpu), ea));
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ori_8_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_8(src | m68ki_read_8((mc68kcpu), ea));
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ori_8_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AY_DI_8(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_8(src | m68ki_read_8((mc68kcpu), ea));
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ori_8_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AY_IX_8(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_8(src | m68ki_read_8((mc68kcpu), ea));
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ori_8_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AW_8(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_8(src | m68ki_read_8((mc68kcpu), ea));
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ori_8_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AL_8(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_8(src | m68ki_read_8((mc68kcpu), ea));
+
+ m68ki_write_8((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ori_16_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_16(DY(mc68kcpu) |= OPER_I_16(mc68kcpu));
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ori_16_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_AI_16(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(src | m68ki_read_16((mc68kcpu), ea));
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ori_16_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_PI_16(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(src | m68ki_read_16((mc68kcpu), ea));
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ori_16_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_PD_16(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(src | m68ki_read_16((mc68kcpu), ea));
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ori_16_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_DI_16(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(src | m68ki_read_16((mc68kcpu), ea));
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ori_16_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_IX_16(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(src | m68ki_read_16((mc68kcpu), ea));
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ori_16_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AW_16(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(src | m68ki_read_16((mc68kcpu), ea));
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ori_16_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AL_16(mc68kcpu);
+ UINT32 res = MASK_OUT_ABOVE_16(src | m68ki_read_16((mc68kcpu), ea));
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ori_32_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = DY(mc68kcpu) |= OPER_I_32(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ori_32_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AY_AI_32(mc68kcpu);
+ UINT32 res = src | m68ki_read_32((mc68kcpu), ea);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ori_32_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AY_PI_32(mc68kcpu);
+ UINT32 res = src | m68ki_read_32((mc68kcpu), ea);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ori_32_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AY_PD_32(mc68kcpu);
+ UINT32 res = src | m68ki_read_32((mc68kcpu), ea);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ori_32_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AY_DI_32(mc68kcpu);
+ UINT32 res = src | m68ki_read_32((mc68kcpu), ea);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ori_32_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AY_IX_32(mc68kcpu);
+ UINT32 res = src | m68ki_read_32((mc68kcpu), ea);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ori_32_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AW_32(mc68kcpu);
+ UINT32 res = src | m68ki_read_32((mc68kcpu), ea);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ori_32_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AL_32(mc68kcpu);
+ UINT32 res = src | m68ki_read_32((mc68kcpu), ea);
+
+ m68ki_write_32((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ori_16_toc(m68000_base_device* mc68kcpu)
+{
+ m68ki_set_ccr((mc68kcpu), m68ki_get_ccr(mc68kcpu) | OPER_I_16(mc68kcpu));
+}
+
+
+void m68000_base_device_ops::m68k_op_ori_16_tos(m68000_base_device* mc68kcpu)
+{
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 src = OPER_I_16(mc68kcpu);
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_set_sr((mc68kcpu), m68ki_get_sr(mc68kcpu) | src);
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_pack_16_rr(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ /* Note: DX(mc68kcpu) and DY(mc68kcpu) are reversed in Motorola's docs */
+ UINT32 src = DY(mc68kcpu) + OPER_I_16(mc68kcpu);
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | ((src >> 4) & 0x00f0) | (src & 0x000f);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_pack_16_mm_ax7(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ /* Note: AX and AY are reversed in Motorola's docs */
+ UINT32 ea_src = EA_AY_PD_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea_src);
+ ea_src = EA_AY_PD_8(mc68kcpu);
+ src = ((src << 8) | m68ki_read_8((mc68kcpu), ea_src)) + OPER_I_16(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), EA_A7_PD_8(mc68kcpu), ((src >> 8) & 0x000f) | ((src<<4) & 0x00f0));
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_pack_16_mm_ay7(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ /* Note: AX and AY are reversed in Motorola's docs */
+ UINT32 ea_src = EA_A7_PD_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea_src);
+ ea_src = EA_A7_PD_8(mc68kcpu);
+ src = ((src << 8) | m68ki_read_8((mc68kcpu), ea_src)) + OPER_I_16(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), EA_AX_PD_8(mc68kcpu), ((src >> 8) & 0x000f) | ((src<<4) & 0x00f0));
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_pack_16_mm_axy7(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 ea_src = EA_A7_PD_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea_src);
+ ea_src = EA_A7_PD_8(mc68kcpu);
+ src = ((src << 8) | m68ki_read_8((mc68kcpu), ea_src)) + OPER_I_16(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), EA_A7_PD_8(mc68kcpu), ((src >> 8) & 0x000f) | ((src<<4) & 0x00f0));
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_pack_16_mm(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ /* Note: AX and AY are reversed in Motorola's docs */
+ UINT32 ea_src = EA_AY_PD_8(mc68kcpu);
+ UINT32 src = m68ki_read_8((mc68kcpu), ea_src);
+ ea_src = EA_AY_PD_8(mc68kcpu);
+ src = ((src << 8) | m68ki_read_8((mc68kcpu), ea_src)) + OPER_I_16(mc68kcpu);
+
+ m68ki_write_8((mc68kcpu), EA_AX_PD_8(mc68kcpu), ((src >> 8) & 0x000f) | ((src<<4) & 0x00f0));
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_pea_32_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_32(mc68kcpu);
+
+ m68ki_push_32((mc68kcpu), ea);
+}
+
+
+void m68000_base_device_ops::m68k_op_pea_32_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_32(mc68kcpu);
+
+ m68ki_push_32((mc68kcpu), ea);
+}
+
+
+void m68000_base_device_ops::m68k_op_pea_32_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_32(mc68kcpu);
+
+ m68ki_push_32((mc68kcpu), ea);
+}
+
+
+void m68000_base_device_ops::m68k_op_pea_32_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_32(mc68kcpu);
+
+ m68ki_push_32((mc68kcpu), ea);
+}
+
+
+void m68000_base_device_ops::m68k_op_pea_32_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_32(mc68kcpu);
+
+ m68ki_push_32((mc68kcpu), ea);
+}
+
+
+void m68000_base_device_ops::m68k_op_pea_32_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_PCDI_32(mc68kcpu);
+
+ m68ki_push_32((mc68kcpu), ea);
+}
+
+
+void m68000_base_device_ops::m68k_op_pea_32_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_PCIX_32(mc68kcpu);
+
+ m68ki_push_32((mc68kcpu), ea);
+}
+
+
+void m68000_base_device_ops::m68k_op_pflusha_32(m68000_base_device* mc68kcpu)
+{
+ if ((CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type)) && ((mc68kcpu)->has_pmmu))
+ {
+ mc68kcpu->logerror("68040: unhandled PFLUSHA (ir=%04x)\n", mc68kcpu->ir);
+ return;
+ }
+ m68ki_exception_1111(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_pflushan_32(m68000_base_device* mc68kcpu)
+{
+ if ((CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type)) && ((mc68kcpu)->has_pmmu))
+ {
+ mc68kcpu->logerror("68040: unhandled PFLUSHAN (ir=%04x)\n", mc68kcpu->ir);
+ return;
+ }
+ m68ki_exception_1111(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_pmmu_32(m68000_base_device* mc68kcpu)
+{
+ if ((CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type)) && ((mc68kcpu)->has_pmmu))
+ {
+ m68881_mmu_ops(mc68kcpu);
+ }
+ else
+ {
+ m68ki_exception_1111(mc68kcpu);
+ }
+}
+
+
+void m68000_base_device_ops::m68k_op_ptest_32(m68000_base_device* mc68kcpu)
+{
+ if ((CPU_TYPE_IS_040_PLUS((mc68kcpu)->cpu_type)) && ((mc68kcpu)->has_pmmu))
+ {
+ mc68kcpu->logerror("68040: unhandled PTEST\n");
+ return;
+ }
+ else
+ {
+ m68ki_exception_1111(mc68kcpu);
+ }
+}
+
+
+void m68000_base_device_ops::m68k_op_reset(m68000_base_device* mc68kcpu)
+{
+ if((mc68kcpu)->s_flag)
+ {
+ if (!(mc68kcpu)->reset_instr_callback.isnull())
+ ((mc68kcpu)->reset_instr_callback)(1);
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_reset;
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_ror_8_s(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 orig_shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 shift = orig_shift & 7;
+ UINT32 src = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = ROR_8(src, shift);
+
+ if(orig_shift != 0)
+ (mc68kcpu)->remaining_cycles -= orig_shift<<(mc68kcpu)->cyc_shift;
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = src << (9-orig_shift);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ror_16_s(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 src = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = ROR_16(src, shift);
+
+ if(shift != 0)
+ (mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = src << (9-shift);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ror_32_s(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT64 src = *r_dst;
+ UINT32 res = ROR_32(src, shift);
+
+ if(shift != 0)
+ (mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
+
+ *r_dst = res;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = src << (9-shift);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ror_8_r(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 orig_shift = DX(mc68kcpu) & 0x3f;
+ UINT32 shift = orig_shift & 7;
+ UINT32 src = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = ROR_8(src, shift);
+
+ if(orig_shift != 0)
+ {
+ (mc68kcpu)->remaining_cycles -= orig_shift<<(mc68kcpu)->cyc_shift;
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
+ (mc68kcpu)->c_flag = src << (8-((shift-1)&7));
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ return;
+ }
+
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->n_flag = NFLAG_8(src);
+ (mc68kcpu)->not_z_flag = src;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ror_16_r(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 orig_shift = DX(mc68kcpu) & 0x3f;
+ UINT32 shift = orig_shift & 15;
+ UINT32 src = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = ROR_16(src, shift);
+
+ if(orig_shift != 0)
+ {
+ (mc68kcpu)->remaining_cycles -= orig_shift<<(mc68kcpu)->cyc_shift;
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+ (mc68kcpu)->c_flag = (src >> ((shift - 1) & 15)) << 8;
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ return;
+ }
+
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->n_flag = NFLAG_16(src);
+ (mc68kcpu)->not_z_flag = src;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ror_32_r(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 orig_shift = DX(mc68kcpu) & 0x3f;
+ UINT32 shift = orig_shift & 31;
+ UINT64 src = *r_dst;
+ UINT32 res = ROR_32(src, shift);
+
+ if(orig_shift != 0)
+ {
+ (mc68kcpu)->remaining_cycles -= orig_shift<<(mc68kcpu)->cyc_shift;
+
+ *r_dst = res;
+ (mc68kcpu)->c_flag = (src >> ((shift - 1) & 31)) << 8;
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ return;
+ }
+
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->n_flag = NFLAG_32(src);
+ (mc68kcpu)->not_z_flag = src;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ror_16_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = ROR_16(src, 1);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = src << 8;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ror_16_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = ROR_16(src, 1);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = src << 8;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ror_16_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = ROR_16(src, 1);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = src << 8;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ror_16_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = ROR_16(src, 1);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = src << 8;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ror_16_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = ROR_16(src, 1);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = src << 8;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ror_16_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = ROR_16(src, 1);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = src << 8;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_ror_16_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = ROR_16(src, 1);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = src << 8;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_rol_8_s(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 orig_shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 shift = orig_shift & 7;
+ UINT32 src = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = ROL_8(src, shift);
+
+ if(orig_shift != 0)
+ (mc68kcpu)->remaining_cycles -= orig_shift<<(mc68kcpu)->cyc_shift;
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = src << orig_shift;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_rol_16_s(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 src = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = ROL_16(src, shift);
+
+ if(shift != 0)
+ (mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = src >> (8-shift);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_rol_32_s(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT64 src = *r_dst;
+ UINT32 res = ROL_32(src, shift);
+
+ if(shift != 0)
+ (mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
+
+ *r_dst = res;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = src >> (24-shift);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_rol_8_r(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 orig_shift = DX(mc68kcpu) & 0x3f;
+ UINT32 shift = orig_shift & 7;
+ UINT32 src = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = ROL_8(src, shift);
+
+ if(orig_shift != 0)
+ {
+ (mc68kcpu)->remaining_cycles -= orig_shift<<(mc68kcpu)->cyc_shift;
+
+ if(shift != 0)
+ {
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
+ (mc68kcpu)->c_flag = src << shift;
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ return;
+ }
+ (mc68kcpu)->c_flag = (src & 1)<<8;
+ (mc68kcpu)->n_flag = NFLAG_8(src);
+ (mc68kcpu)->not_z_flag = src;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ return;
+ }
+
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->n_flag = NFLAG_8(src);
+ (mc68kcpu)->not_z_flag = src;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_rol_16_r(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 orig_shift = DX(mc68kcpu) & 0x3f;
+ UINT32 shift = orig_shift & 15;
+ UINT32 src = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = MASK_OUT_ABOVE_16(ROL_16(src, shift));
+
+ if(orig_shift != 0)
+ {
+ (mc68kcpu)->remaining_cycles -= orig_shift<<(mc68kcpu)->cyc_shift;
+
+ if(shift != 0)
+ {
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+ (mc68kcpu)->c_flag = (src << shift) >> 8;
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ return;
+ }
+ (mc68kcpu)->c_flag = (src & 1)<<8;
+ (mc68kcpu)->n_flag = NFLAG_16(src);
+ (mc68kcpu)->not_z_flag = src;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ return;
+ }
+
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->n_flag = NFLAG_16(src);
+ (mc68kcpu)->not_z_flag = src;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_rol_32_r(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 orig_shift = DX(mc68kcpu) & 0x3f;
+ UINT32 shift = orig_shift & 31;
+ UINT64 src = *r_dst;
+ UINT32 res = ROL_32(src, shift);
+
+ if(orig_shift != 0)
+ {
+ (mc68kcpu)->remaining_cycles -= orig_shift<<(mc68kcpu)->cyc_shift;
+
+ *r_dst = res;
+
+ (mc68kcpu)->c_flag = (src >> ((32 - shift) & 0x1f)) << 8;
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ return;
+ }
+
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->n_flag = NFLAG_32(src);
+ (mc68kcpu)->not_z_flag = src;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_rol_16_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = MASK_OUT_ABOVE_16(ROL_16(src, 1));
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = src >> 7;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_rol_16_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = MASK_OUT_ABOVE_16(ROL_16(src, 1));
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = src >> 7;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_rol_16_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = MASK_OUT_ABOVE_16(ROL_16(src, 1));
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = src >> 7;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_rol_16_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = MASK_OUT_ABOVE_16(ROL_16(src, 1));
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = src >> 7;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_rol_16_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = MASK_OUT_ABOVE_16(ROL_16(src, 1));
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = src >> 7;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_rol_16_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = MASK_OUT_ABOVE_16(ROL_16(src, 1));
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = src >> 7;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_rol_16_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = MASK_OUT_ABOVE_16(ROL_16(src, 1));
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->c_flag = src >> 7;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_roxr_8_s(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 src = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = ROR_9(src | (XFLAG_AS_1(mc68kcpu) << 8), shift);
+
+ if(shift != 0)
+ (mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
+
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res;
+ res = MASK_OUT_ABOVE_8(res);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_roxr_16_s(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 src = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = ROR_17(src | (XFLAG_AS_1(mc68kcpu) << 16), shift);
+
+ if(shift != 0)
+ (mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
+
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 8;
+ res = MASK_OUT_ABOVE_16(res);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_roxr_32_s(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT64 src = *r_dst;
+ UINT64 res = src | (((UINT64)XFLAG_AS_1(mc68kcpu)) << 32);
+
+ if(shift != 0)
+ (mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
+
+ res = ROR_33_64(res, shift);
+
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 24;
+ res = MASK_OUT_ABOVE_32(res);
+
+ *r_dst = res;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_roxr_8_r(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 orig_shift = DX(mc68kcpu) & 0x3f;
+
+ if(orig_shift != 0)
+ {
+ UINT32 shift = orig_shift % 9;
+ UINT32 src = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = ROR_9(src | (XFLAG_AS_1(mc68kcpu) << 8), shift);
+
+ (mc68kcpu)->remaining_cycles -= orig_shift<<(mc68kcpu)->cyc_shift;
+
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res;
+ res = MASK_OUT_ABOVE_8(res);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ return;
+ }
+
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag;
+ (mc68kcpu)->n_flag = NFLAG_8(*r_dst);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(*r_dst);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_roxr_16_r(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 orig_shift = DX(mc68kcpu) & 0x3f;
+
+ if(orig_shift != 0)
+ {
+ UINT32 shift = orig_shift % 17;
+ UINT32 src = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = ROR_17(src | (XFLAG_AS_1(mc68kcpu) << 16), shift);
+
+ (mc68kcpu)->remaining_cycles -= orig_shift<<(mc68kcpu)->cyc_shift;
+
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 8;
+ res = MASK_OUT_ABOVE_16(res);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ return;
+ }
+
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag;
+ (mc68kcpu)->n_flag = NFLAG_16(*r_dst);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(*r_dst);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_roxr_32_r(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 orig_shift = DX(mc68kcpu) & 0x3f;
+
+ if(orig_shift != 0)
+ {
+ UINT32 shift = orig_shift % 33;
+ UINT64 src = *r_dst;
+ UINT64 res = src | (((UINT64)XFLAG_AS_1(mc68kcpu)) << 32);
+
+ res = ROR_33_64(res, shift);
+
+ (mc68kcpu)->remaining_cycles -= orig_shift<<(mc68kcpu)->cyc_shift;
+
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 24;
+ res = MASK_OUT_ABOVE_32(res);
+
+ *r_dst = res;
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ return;
+ }
+
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag;
+ (mc68kcpu)->n_flag = NFLAG_32(*r_dst);
+ (mc68kcpu)->not_z_flag = *r_dst;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_roxr_16_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = ROR_17(src | (XFLAG_AS_1(mc68kcpu) << 16), 1);
+
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 8;
+ res = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_roxr_16_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = ROR_17(src | (XFLAG_AS_1(mc68kcpu) << 16), 1);
+
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 8;
+ res = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_roxr_16_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = ROR_17(src | (XFLAG_AS_1(mc68kcpu) << 16), 1);
+
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 8;
+ res = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_roxr_16_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = ROR_17(src | (XFLAG_AS_1(mc68kcpu) << 16), 1);
+
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 8;
+ res = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_roxr_16_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = ROR_17(src | (XFLAG_AS_1(mc68kcpu) << 16), 1);
+
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 8;
+ res = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_roxr_16_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = ROR_17(src | (XFLAG_AS_1(mc68kcpu) << 16), 1);
+
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 8;
+ res = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_roxr_16_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = ROR_17(src | (XFLAG_AS_1(mc68kcpu) << 16), 1);
+
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 8;
+ res = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_roxl_8_s(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 src = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = ROL_9(src | (XFLAG_AS_1(mc68kcpu) << 8), shift);
+
+ if(shift != 0)
+ (mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
+
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res;
+ res = MASK_OUT_ABOVE_8(res);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_roxl_16_s(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 src = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = ROL_17(src | (XFLAG_AS_1(mc68kcpu) << 16), shift);
+
+ if(shift != 0)
+ (mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
+
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 8;
+ res = MASK_OUT_ABOVE_16(res);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_roxl_32_s(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT64 src = *r_dst;
+ UINT64 res = src | (((UINT64)XFLAG_AS_1(mc68kcpu)) << 32);
+
+ if(shift != 0)
+ (mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
+
+ res = ROL_33_64(res, shift);
+
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 24;
+ res = MASK_OUT_ABOVE_32(res);
+
+ *r_dst = res;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_roxl_8_r(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 orig_shift = DX(mc68kcpu) & 0x3f;
+
+
+ if(orig_shift != 0)
+ {
+ UINT32 shift = orig_shift % 9;
+ UINT32 src = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = ROL_9(src | (XFLAG_AS_1(mc68kcpu) << 8), shift);
+
+ (mc68kcpu)->remaining_cycles -= orig_shift<<(mc68kcpu)->cyc_shift;
+
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res;
+ res = MASK_OUT_ABOVE_8(res);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ return;
+ }
+
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag;
+ (mc68kcpu)->n_flag = NFLAG_8(*r_dst);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(*r_dst);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_roxl_16_r(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 orig_shift = DX(mc68kcpu) & 0x3f;
+
+ if(orig_shift != 0)
+ {
+ UINT32 shift = orig_shift % 17;
+ UINT32 src = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = ROL_17(src | (XFLAG_AS_1(mc68kcpu) << 16), shift);
+
+ (mc68kcpu)->remaining_cycles -= orig_shift<<(mc68kcpu)->cyc_shift;
+
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 8;
+ res = MASK_OUT_ABOVE_16(res);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ return;
+ }
+
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag;
+ (mc68kcpu)->n_flag = NFLAG_16(*r_dst);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(*r_dst);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_roxl_32_r(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 orig_shift = DX(mc68kcpu) & 0x3f;
+
+ if(orig_shift != 0)
+ {
+ UINT32 shift = orig_shift % 33;
+ UINT64 src = *r_dst;
+ UINT64 res = src | (((UINT64)XFLAG_AS_1(mc68kcpu)) << 32);
+
+ res = ROL_33_64(res, shift);
+
+ (mc68kcpu)->remaining_cycles -= orig_shift<<(mc68kcpu)->cyc_shift;
+
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 24;
+ res = MASK_OUT_ABOVE_32(res);
+
+ *r_dst = res;
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ return;
+ }
+
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag;
+ (mc68kcpu)->n_flag = NFLAG_32(*r_dst);
+ (mc68kcpu)->not_z_flag = *r_dst;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_roxl_16_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = ROL_17(src | (XFLAG_AS_1(mc68kcpu) << 16), 1);
+
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 8;
+ res = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_roxl_16_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = ROL_17(src | (XFLAG_AS_1(mc68kcpu) << 16), 1);
+
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 8;
+ res = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_roxl_16_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = ROL_17(src | (XFLAG_AS_1(mc68kcpu) << 16), 1);
+
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 8;
+ res = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_roxl_16_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = ROL_17(src | (XFLAG_AS_1(mc68kcpu) << 16), 1);
+
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 8;
+ res = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_roxl_16_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = ROL_17(src | (XFLAG_AS_1(mc68kcpu) << 16), 1);
+
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 8;
+ res = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_roxl_16_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = ROL_17(src | (XFLAG_AS_1(mc68kcpu) << 16), 1);
+
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 8;
+ res = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_roxl_16_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_16(mc68kcpu);
+ UINT32 src = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = ROL_17(src | (XFLAG_AS_1(mc68kcpu) << 16), 1);
+
+ (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 8;
+ res = MASK_OUT_ABOVE_16(res);
+
+ m68ki_write_16((mc68kcpu), ea, res);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_rtd_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 new_pc = m68ki_pull_32(mc68kcpu);
+
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ REG_A(mc68kcpu)[7] = MASK_OUT_ABOVE_32(REG_A(mc68kcpu)[7] + MAKE_INT_16(OPER_I_16(mc68kcpu)));
+ m68ki_jump((mc68kcpu), new_pc);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_rte_32(m68000_base_device* mc68kcpu)
+{
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 new_sr;
+ UINT32 new_pc;
+ UINT32 format_word;
+
+ if (!(mc68kcpu)->rte_instr_callback.isnull())
+ ((mc68kcpu)->rte_instr_callback)(1);
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+
+ if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
+ {
+ new_sr = m68ki_pull_16(mc68kcpu);
+ new_pc = m68ki_pull_32(mc68kcpu);
+ m68ki_jump((mc68kcpu), new_pc);
+ m68ki_set_sr((mc68kcpu), new_sr);
+
+ (mc68kcpu)->instr_mode = INSTRUCTION_YES;
+ (mc68kcpu)->run_mode = RUN_MODE_NORMAL;
+
+ return;
+ }
+
+ if(CPU_TYPE_IS_010((mc68kcpu)->cpu_type))
+ {
+ format_word = m68ki_read_16((mc68kcpu), REG_A(mc68kcpu)[7]+6) >> 12;
+ if(format_word == 0)
+ {
+ new_sr = m68ki_pull_16(mc68kcpu);
+ new_pc = m68ki_pull_32(mc68kcpu);
+ m68ki_fake_pull_16(mc68kcpu); /* format word */
+ m68ki_jump((mc68kcpu), new_pc);
+ m68ki_set_sr((mc68kcpu), new_sr);
+ (mc68kcpu)->instr_mode = INSTRUCTION_YES;
+ (mc68kcpu)->run_mode = RUN_MODE_NORMAL;
+ return;
+ }
+ (mc68kcpu)->instr_mode = INSTRUCTION_YES;
+ (mc68kcpu)->run_mode = RUN_MODE_NORMAL;
+ /* Not handling bus fault (9) */
+ m68ki_exception_format_error(mc68kcpu);
+ return;
+ }
+
+ /* Otherwise it's 020 */
+rte_loop:
+ format_word = m68ki_read_16((mc68kcpu), REG_A(mc68kcpu)[7]+6) >> 12;
+ switch(format_word)
+ {
+ case 0: /* Normal */
+ new_sr = m68ki_pull_16(mc68kcpu);
+ new_pc = m68ki_pull_32(mc68kcpu);
+ m68ki_fake_pull_16(mc68kcpu); /* format word */
+ m68ki_jump((mc68kcpu), new_pc);
+ m68ki_set_sr((mc68kcpu), new_sr);
+ (mc68kcpu)->instr_mode = INSTRUCTION_YES;
+ (mc68kcpu)->run_mode = RUN_MODE_NORMAL;
+ return;
+ case 1: /* Throwaway */
+ new_sr = m68ki_pull_16(mc68kcpu);
+ m68ki_fake_pull_32(mc68kcpu); /* program counter */
+ m68ki_fake_pull_16(mc68kcpu); /* format word */
+ m68ki_set_sr_noint((mc68kcpu), new_sr);
+ goto rte_loop;
+ case 2: /* Trap */
+ new_sr = m68ki_pull_16(mc68kcpu);
+ new_pc = m68ki_pull_32(mc68kcpu);
+ m68ki_fake_pull_16(mc68kcpu); /* format word */
+ m68ki_fake_pull_32(mc68kcpu); /* address */
+ m68ki_jump((mc68kcpu), new_pc);
+ m68ki_set_sr((mc68kcpu), new_sr);
+ (mc68kcpu)->instr_mode = INSTRUCTION_YES;
+ (mc68kcpu)->run_mode = RUN_MODE_NORMAL;
+ return;
+ case 7: /* 68040 access error */
+ new_sr = m68ki_pull_16(mc68kcpu);
+ new_pc = m68ki_pull_32(mc68kcpu);
+ m68ki_fake_pull_16(mc68kcpu); /* $06: format word */
+ m68ki_fake_pull_32(mc68kcpu); /* $08: effective address */
+ m68ki_fake_pull_16(mc68kcpu); /* $0c: special status word */
+ m68ki_fake_pull_16(mc68kcpu); /* $0e: wb3s */
+ m68ki_fake_pull_16(mc68kcpu); /* $10: wb2s */
+ m68ki_fake_pull_16(mc68kcpu); /* $12: wb1s */
+ m68ki_fake_pull_32(mc68kcpu); /* $14: data fault address */
+ m68ki_fake_pull_32(mc68kcpu); /* $18: wb3a */
+ m68ki_fake_pull_32(mc68kcpu); /* $1c: wb3d */
+ m68ki_fake_pull_32(mc68kcpu); /* $20: wb2a */
+ m68ki_fake_pull_32(mc68kcpu); /* $24: wb2d */
+ m68ki_fake_pull_32(mc68kcpu); /* $28: wb1a */
+ m68ki_fake_pull_32(mc68kcpu); /* $2c: wb1d/pd0 */
+ m68ki_fake_pull_32(mc68kcpu); /* $30: pd1 */
+ m68ki_fake_pull_32(mc68kcpu); /* $34: pd2 */
+ m68ki_fake_pull_32(mc68kcpu); /* $38: pd3 */
+ m68ki_jump((mc68kcpu), new_pc);
+ m68ki_set_sr((mc68kcpu), new_sr);
+ (mc68kcpu)->instr_mode = INSTRUCTION_YES;
+ (mc68kcpu)->run_mode = RUN_MODE_NORMAL;
+ return;
+
+ case 0x0a: /* Bus Error at instruction boundary */
+ new_sr = m68ki_pull_16(mc68kcpu);
+ new_pc = m68ki_pull_32(mc68kcpu);
+ m68ki_fake_pull_16(mc68kcpu); /* $06: format word */
+ m68ki_fake_pull_16(mc68kcpu); /* $08: internal register */
+ m68ki_fake_pull_16(mc68kcpu); /* $0a: special status word */
+ m68ki_fake_pull_16(mc68kcpu); /* $0c: instruction pipe stage c */
+ m68ki_fake_pull_16(mc68kcpu); /* $0e: instruction pipe stage b */
+ m68ki_fake_pull_32(mc68kcpu); /* $10: data fault address */
+ m68ki_fake_pull_32(mc68kcpu); /* $14: internal registers */
+ m68ki_fake_pull_32(mc68kcpu); /* $18: data output buffer */
+ m68ki_fake_pull_32(mc68kcpu); /* $1c: internal registers */
+
+ m68ki_jump((mc68kcpu), new_pc);
+ m68ki_set_sr((mc68kcpu), new_sr);
+ (mc68kcpu)->instr_mode = INSTRUCTION_YES;
+ (mc68kcpu)->run_mode = RUN_MODE_NORMAL;
+ return;
+ case 0x0b: /* Bus Error - Instruction Execution in Progress */
+ new_sr = m68ki_pull_16(mc68kcpu);
+ new_pc = m68ki_pull_32(mc68kcpu);
+ m68ki_fake_pull_16(mc68kcpu); /* $06: format word */
+ m68ki_fake_pull_16(mc68kcpu); /* $08: internal register */
+ m68ki_fake_pull_16(mc68kcpu); /* $0a: special status word */
+ m68ki_fake_pull_16(mc68kcpu); /* $0c: instruction pipe stage c */
+ m68ki_fake_pull_16(mc68kcpu); /* $0e: instruction pipe stage b */
+ m68ki_fake_pull_32(mc68kcpu); /* $10: data fault address */
+ m68ki_fake_pull_32(mc68kcpu); /* $14: internal registers */
+ m68ki_fake_pull_32(mc68kcpu); /* $18: data output buffer */
+ m68ki_fake_pull_32(mc68kcpu); /* $1c: internal registers */
+ m68ki_fake_pull_32(mc68kcpu); /* $20: */
+ m68ki_fake_pull_32(mc68kcpu); /* $24: stage B address */
+ m68ki_fake_pull_32(mc68kcpu); /* $28: */
+ m68ki_fake_pull_32(mc68kcpu); /* $2c: data input buffer */
+ m68ki_fake_pull_32(mc68kcpu); /* $30: */
+ m68ki_fake_pull_16(mc68kcpu); /* $34: */
+ m68ki_fake_pull_16(mc68kcpu); /* $36: version #, internal information */
+ m68ki_fake_pull_32(mc68kcpu); /* $38: */
+ m68ki_fake_pull_32(mc68kcpu); /* $3c: */
+ m68ki_fake_pull_32(mc68kcpu); /* $40: */
+ m68ki_fake_pull_32(mc68kcpu); /* $44: */
+ m68ki_fake_pull_32(mc68kcpu); /* $48: */
+ m68ki_fake_pull_32(mc68kcpu); /* $4c: */
+ m68ki_fake_pull_32(mc68kcpu); /* $50: */
+ m68ki_fake_pull_32(mc68kcpu); /* $54: */
+ m68ki_fake_pull_32(mc68kcpu); /* $58: */
+
+ m68ki_jump((mc68kcpu), new_pc);
+ m68ki_set_sr((mc68kcpu), new_sr);
+ (mc68kcpu)->instr_mode = INSTRUCTION_YES;
+ (mc68kcpu)->run_mode = RUN_MODE_NORMAL;
+ return;
+ }
+ /* Not handling long or short bus fault */
+ (mc68kcpu)->instr_mode = INSTRUCTION_YES;
+ (mc68kcpu)->run_mode = RUN_MODE_NORMAL;
+ m68ki_exception_format_error(mc68kcpu);
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_rtm_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
+ {
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (rtm)\n",
+ (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_rtr_32(m68000_base_device* mc68kcpu)
+{
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_set_ccr((mc68kcpu), m68ki_pull_16(mc68kcpu));
+ m68ki_jump((mc68kcpu), m68ki_pull_32(mc68kcpu));
+}
+
+
+void m68000_base_device_ops::m68k_op_rts_32(m68000_base_device* mc68kcpu)
+{
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ m68ki_jump((mc68kcpu), m68ki_pull_32(mc68kcpu));
+}
+
+
+void m68000_base_device_ops::m68k_op_sbcd_8_rr(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = DY(mc68kcpu);
+ UINT32 dst = *r_dst;
+ UINT32 res = LOW_NIBBLE(dst) - LOW_NIBBLE(src) - XFLAG_AS_1(mc68kcpu);
+
+// (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
+ (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undefined in Motorola's M68000PM/AD rev.1 and safer to assume cleared. */
+
+ if(res > 9)
+ res -= 6;
+ res += HIGH_NIBBLE(dst) - HIGH_NIBBLE(src);
+ if(res > 0x99)
+ {
+ res += 0xa0;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SET;
+ (mc68kcpu)->n_flag = NFLAG_SET; /* Undefined in Motorola's M68000PM/AD rev.1 and safer to follow carry. */
+ }
+ else
+ (mc68kcpu)->n_flag = (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = 0;
+
+ res = MASK_OUT_ABOVE_8(res);
+
+// (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
+// (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
+ (mc68kcpu)->not_z_flag |= res;
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
+}
+
+
+void m68000_base_device_ops::m68k_op_sbcd_8_mm_ax7(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AY_PD_8(mc68kcpu);
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = LOW_NIBBLE(dst) - LOW_NIBBLE(src) - XFLAG_AS_1(mc68kcpu);
+
+// (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
+ (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undefined in Motorola's M68000PM/AD rev.1 and safer to return zero. */
+
+ if(res > 9)
+ res -= 6;
+ res += HIGH_NIBBLE(dst) - HIGH_NIBBLE(src);
+ if(res > 0x99)
+ {
+ res += 0xa0;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SET;
+ (mc68kcpu)->n_flag = NFLAG_SET; /* Undefined in Motorola's M68000PM/AD rev.1 and safer to follow carry. */
+ }
+ else
+ (mc68kcpu)->n_flag = (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = 0;
+
+ res = MASK_OUT_ABOVE_8(res);
+
+// (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
+// (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_8((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_sbcd_8_mm_ay7(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_A7_PD_8(mc68kcpu);
+ UINT32 ea = EA_AX_PD_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = LOW_NIBBLE(dst) - LOW_NIBBLE(src) - XFLAG_AS_1(mc68kcpu);
+
+// (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
+ (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undefined in Motorola's M68000PM/AD rev.1 and safer to return zero. */
+
+ if(res > 9)
+ res -= 6;
+ res += HIGH_NIBBLE(dst) - HIGH_NIBBLE(src);
+ if(res > 0x99)
+ {
+ res += 0xa0;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SET;
+ (mc68kcpu)->n_flag = NFLAG_SET; /* Undefined in Motorola's M68000PM/AD rev.1 and safer to follow carry. */
+ }
+ else
+ (mc68kcpu)->n_flag = (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = 0;
+
+ res = MASK_OUT_ABOVE_8(res);
+
+// (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
+// (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_8((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_sbcd_8_mm_axy7(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_A7_PD_8(mc68kcpu);
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = LOW_NIBBLE(dst) - LOW_NIBBLE(src) - XFLAG_AS_1(mc68kcpu);
+
+// (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
+ (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undefined in Motorola's M68000PM/AD rev.1 and safer to return zero. */
+
+ if(res > 9)
+ res -= 6;
+ res += HIGH_NIBBLE(dst) - HIGH_NIBBLE(src);
+ if(res > 0x99)
+ {
+ res += 0xa0;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SET;
+ (mc68kcpu)->n_flag = NFLAG_SET; /* Undefined in Motorola's M68000PM/AD rev.1 and safer to follow carry. */
+ }
+ else
+ (mc68kcpu)->n_flag = (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = 0;
+
+ res = MASK_OUT_ABOVE_8(res);
+
+// (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
+// (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_8((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_sbcd_8_mm(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AY_PD_8(mc68kcpu);
+ UINT32 ea = EA_AX_PD_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = LOW_NIBBLE(dst) - LOW_NIBBLE(src) - XFLAG_AS_1(mc68kcpu);
+
+// (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
+ (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undefined in Motorola's M68000PM/AD rev.1 and safer to return zero. */
+
+ if(res > 9)
+ res -= 6;
+ res += HIGH_NIBBLE(dst) - HIGH_NIBBLE(src);
+ if(res > 0x99)
+ {
+ res += 0xa0;
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SET;
+ (mc68kcpu)->n_flag = NFLAG_SET; /* Undefined in Motorola's M68000PM/AD rev.1 and safer to follow carry. */
+ }
+ else
+ (mc68kcpu)->n_flag = (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = 0;
+
+ res = MASK_OUT_ABOVE_8(res);
+
+// (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
+// (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_8((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_st_8_d(m68000_base_device* mc68kcpu)
+{
+ DY(mc68kcpu) |= 0xff;
+}
+
+
+void m68000_base_device_ops::m68k_op_st_8_ai(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_AI_8(mc68kcpu), 0xff);
+}
+
+
+void m68000_base_device_ops::m68k_op_st_8_pi(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_PI_8(mc68kcpu), 0xff);
+}
+
+
+void m68000_base_device_ops::m68k_op_st_8_pi7(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_A7_PI_8(mc68kcpu), 0xff);
+}
+
+
+void m68000_base_device_ops::m68k_op_st_8_pd(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_PD_8(mc68kcpu), 0xff);
+}
+
+
+void m68000_base_device_ops::m68k_op_st_8_pd7(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_A7_PD_8(mc68kcpu), 0xff);
+}
+
+
+void m68000_base_device_ops::m68k_op_st_8_di(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_DI_8(mc68kcpu), 0xff);
+}
+
+
+void m68000_base_device_ops::m68k_op_st_8_ix(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_IX_8(mc68kcpu), 0xff);
+}
+
+
+void m68000_base_device_ops::m68k_op_st_8_aw(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AW_8(mc68kcpu), 0xff);
+}
+
+
+void m68000_base_device_ops::m68k_op_st_8_al(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AL_8(mc68kcpu), 0xff);
+}
+
+
+void m68000_base_device_ops::m68k_op_sf_8_d(m68000_base_device* mc68kcpu)
+{
+ DY(mc68kcpu) &= 0xffffff00;
+}
+
+
+void m68000_base_device_ops::m68k_op_sf_8_ai(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_AI_8(mc68kcpu), 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sf_8_pi(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_PI_8(mc68kcpu), 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sf_8_pi7(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_A7_PI_8(mc68kcpu), 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sf_8_pd(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_PD_8(mc68kcpu), 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sf_8_pd7(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_A7_PD_8(mc68kcpu), 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sf_8_di(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_DI_8(mc68kcpu), 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sf_8_ix(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_IX_8(mc68kcpu), 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sf_8_aw(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AW_8(mc68kcpu), 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sf_8_al(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AL_8(mc68kcpu), 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_shi_8_d(m68000_base_device* mc68kcpu)
+{
+ if(COND_HI(mc68kcpu))
+ {
+ DY(mc68kcpu) |= 0xff;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_scc_r_true;
+ return;
+ }
+ DY(mc68kcpu) &= 0xffffff00;
+}
+
+
+void m68000_base_device_ops::m68k_op_sls_8_d(m68000_base_device* mc68kcpu)
+{
+ if(COND_LS(mc68kcpu))
+ {
+ DY(mc68kcpu) |= 0xff;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_scc_r_true;
+ return;
+ }
+ DY(mc68kcpu) &= 0xffffff00;
+}
+
+
+void m68000_base_device_ops::m68k_op_scc_8_d(m68000_base_device* mc68kcpu)
+{
+ if(COND_CC(mc68kcpu))
+ {
+ DY(mc68kcpu) |= 0xff;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_scc_r_true;
+ return;
+ }
+ DY(mc68kcpu) &= 0xffffff00;
+}
+
+
+void m68000_base_device_ops::m68k_op_scs_8_d(m68000_base_device* mc68kcpu)
+{
+ if(COND_CS(mc68kcpu))
+ {
+ DY(mc68kcpu) |= 0xff;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_scc_r_true;
+ return;
+ }
+ DY(mc68kcpu) &= 0xffffff00;
+}
+
+
+void m68000_base_device_ops::m68k_op_sne_8_d(m68000_base_device* mc68kcpu)
+{
+ if(COND_NE(mc68kcpu))
+ {
+ DY(mc68kcpu) |= 0xff;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_scc_r_true;
+ return;
+ }
+ DY(mc68kcpu) &= 0xffffff00;
+}
+
+
+void m68000_base_device_ops::m68k_op_seq_8_d(m68000_base_device* mc68kcpu)
+{
+ if(COND_EQ(mc68kcpu))
+ {
+ DY(mc68kcpu) |= 0xff;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_scc_r_true;
+ return;
+ }
+ DY(mc68kcpu) &= 0xffffff00;
+}
+
+
+void m68000_base_device_ops::m68k_op_svc_8_d(m68000_base_device* mc68kcpu)
+{
+ if(COND_VC(mc68kcpu))
+ {
+ DY(mc68kcpu) |= 0xff;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_scc_r_true;
+ return;
+ }
+ DY(mc68kcpu) &= 0xffffff00;
+}
+
+
+void m68000_base_device_ops::m68k_op_svs_8_d(m68000_base_device* mc68kcpu)
+{
+ if(COND_VS(mc68kcpu))
+ {
+ DY(mc68kcpu) |= 0xff;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_scc_r_true;
+ return;
+ }
+ DY(mc68kcpu) &= 0xffffff00;
+}
+
+
+void m68000_base_device_ops::m68k_op_spl_8_d(m68000_base_device* mc68kcpu)
+{
+ if(COND_PL(mc68kcpu))
+ {
+ DY(mc68kcpu) |= 0xff;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_scc_r_true;
+ return;
+ }
+ DY(mc68kcpu) &= 0xffffff00;
+}
+
+
+void m68000_base_device_ops::m68k_op_smi_8_d(m68000_base_device* mc68kcpu)
+{
+ if(COND_MI(mc68kcpu))
+ {
+ DY(mc68kcpu) |= 0xff;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_scc_r_true;
+ return;
+ }
+ DY(mc68kcpu) &= 0xffffff00;
+}
+
+
+void m68000_base_device_ops::m68k_op_sge_8_d(m68000_base_device* mc68kcpu)
+{
+ if(COND_GE(mc68kcpu))
+ {
+ DY(mc68kcpu) |= 0xff;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_scc_r_true;
+ return;
+ }
+ DY(mc68kcpu) &= 0xffffff00;
+}
+
+
+void m68000_base_device_ops::m68k_op_slt_8_d(m68000_base_device* mc68kcpu)
+{
+ if(COND_LT(mc68kcpu))
+ {
+ DY(mc68kcpu) |= 0xff;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_scc_r_true;
+ return;
+ }
+ DY(mc68kcpu) &= 0xffffff00;
+}
+
+
+void m68000_base_device_ops::m68k_op_sgt_8_d(m68000_base_device* mc68kcpu)
+{
+ if(COND_GT(mc68kcpu))
+ {
+ DY(mc68kcpu) |= 0xff;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_scc_r_true;
+ return;
+ }
+ DY(mc68kcpu) &= 0xffffff00;
+}
+
+
+void m68000_base_device_ops::m68k_op_sle_8_d(m68000_base_device* mc68kcpu)
+{
+ if(COND_LE(mc68kcpu))
+ {
+ DY(mc68kcpu) |= 0xff;
+ (mc68kcpu)->remaining_cycles -= (mc68kcpu)->cyc_scc_r_true;
+ return;
+ }
+ DY(mc68kcpu) &= 0xffffff00;
+}
+
+
+void m68000_base_device_ops::m68k_op_shi_8_ai(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_AI_8(mc68kcpu), COND_HI(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_shi_8_pi(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_PI_8(mc68kcpu), COND_HI(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_shi_8_pi7(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_A7_PI_8(mc68kcpu), COND_HI(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_shi_8_pd(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_PD_8(mc68kcpu), COND_HI(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_shi_8_pd7(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_A7_PD_8(mc68kcpu), COND_HI(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_shi_8_di(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_DI_8(mc68kcpu), COND_HI(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_shi_8_ix(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_IX_8(mc68kcpu), COND_HI(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_shi_8_aw(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AW_8(mc68kcpu), COND_HI(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_shi_8_al(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AL_8(mc68kcpu), COND_HI(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sls_8_ai(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_AI_8(mc68kcpu), COND_LS(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sls_8_pi(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_PI_8(mc68kcpu), COND_LS(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sls_8_pi7(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_A7_PI_8(mc68kcpu), COND_LS(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sls_8_pd(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_PD_8(mc68kcpu), COND_LS(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sls_8_pd7(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_A7_PD_8(mc68kcpu), COND_LS(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sls_8_di(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_DI_8(mc68kcpu), COND_LS(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sls_8_ix(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_IX_8(mc68kcpu), COND_LS(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sls_8_aw(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AW_8(mc68kcpu), COND_LS(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sls_8_al(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AL_8(mc68kcpu), COND_LS(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_scc_8_ai(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_AI_8(mc68kcpu), COND_CC(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_scc_8_pi(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_PI_8(mc68kcpu), COND_CC(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_scc_8_pi7(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_A7_PI_8(mc68kcpu), COND_CC(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_scc_8_pd(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_PD_8(mc68kcpu), COND_CC(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_scc_8_pd7(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_A7_PD_8(mc68kcpu), COND_CC(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_scc_8_di(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_DI_8(mc68kcpu), COND_CC(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_scc_8_ix(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_IX_8(mc68kcpu), COND_CC(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_scc_8_aw(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AW_8(mc68kcpu), COND_CC(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_scc_8_al(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AL_8(mc68kcpu), COND_CC(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_scs_8_ai(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_AI_8(mc68kcpu), COND_CS(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_scs_8_pi(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_PI_8(mc68kcpu), COND_CS(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_scs_8_pi7(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_A7_PI_8(mc68kcpu), COND_CS(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_scs_8_pd(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_PD_8(mc68kcpu), COND_CS(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_scs_8_pd7(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_A7_PD_8(mc68kcpu), COND_CS(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_scs_8_di(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_DI_8(mc68kcpu), COND_CS(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_scs_8_ix(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_IX_8(mc68kcpu), COND_CS(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_scs_8_aw(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AW_8(mc68kcpu), COND_CS(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_scs_8_al(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AL_8(mc68kcpu), COND_CS(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sne_8_ai(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_AI_8(mc68kcpu), COND_NE(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sne_8_pi(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_PI_8(mc68kcpu), COND_NE(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sne_8_pi7(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_A7_PI_8(mc68kcpu), COND_NE(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sne_8_pd(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_PD_8(mc68kcpu), COND_NE(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sne_8_pd7(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_A7_PD_8(mc68kcpu), COND_NE(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sne_8_di(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_DI_8(mc68kcpu), COND_NE(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sne_8_ix(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_IX_8(mc68kcpu), COND_NE(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sne_8_aw(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AW_8(mc68kcpu), COND_NE(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sne_8_al(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AL_8(mc68kcpu), COND_NE(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_seq_8_ai(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_AI_8(mc68kcpu), COND_EQ(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_seq_8_pi(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_PI_8(mc68kcpu), COND_EQ(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_seq_8_pi7(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_A7_PI_8(mc68kcpu), COND_EQ(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_seq_8_pd(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_PD_8(mc68kcpu), COND_EQ(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_seq_8_pd7(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_A7_PD_8(mc68kcpu), COND_EQ(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_seq_8_di(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_DI_8(mc68kcpu), COND_EQ(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_seq_8_ix(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_IX_8(mc68kcpu), COND_EQ(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_seq_8_aw(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AW_8(mc68kcpu), COND_EQ(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_seq_8_al(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AL_8(mc68kcpu), COND_EQ(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_svc_8_ai(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_AI_8(mc68kcpu), COND_VC(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_svc_8_pi(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_PI_8(mc68kcpu), COND_VC(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_svc_8_pi7(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_A7_PI_8(mc68kcpu), COND_VC(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_svc_8_pd(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_PD_8(mc68kcpu), COND_VC(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_svc_8_pd7(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_A7_PD_8(mc68kcpu), COND_VC(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_svc_8_di(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_DI_8(mc68kcpu), COND_VC(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_svc_8_ix(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_IX_8(mc68kcpu), COND_VC(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_svc_8_aw(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AW_8(mc68kcpu), COND_VC(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_svc_8_al(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AL_8(mc68kcpu), COND_VC(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_svs_8_ai(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_AI_8(mc68kcpu), COND_VS(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_svs_8_pi(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_PI_8(mc68kcpu), COND_VS(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_svs_8_pi7(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_A7_PI_8(mc68kcpu), COND_VS(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_svs_8_pd(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_PD_8(mc68kcpu), COND_VS(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_svs_8_pd7(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_A7_PD_8(mc68kcpu), COND_VS(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_svs_8_di(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_DI_8(mc68kcpu), COND_VS(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_svs_8_ix(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_IX_8(mc68kcpu), COND_VS(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_svs_8_aw(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AW_8(mc68kcpu), COND_VS(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_svs_8_al(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AL_8(mc68kcpu), COND_VS(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_spl_8_ai(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_AI_8(mc68kcpu), COND_PL(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_spl_8_pi(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_PI_8(mc68kcpu), COND_PL(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_spl_8_pi7(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_A7_PI_8(mc68kcpu), COND_PL(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_spl_8_pd(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_PD_8(mc68kcpu), COND_PL(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_spl_8_pd7(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_A7_PD_8(mc68kcpu), COND_PL(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_spl_8_di(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_DI_8(mc68kcpu), COND_PL(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_spl_8_ix(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_IX_8(mc68kcpu), COND_PL(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_spl_8_aw(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AW_8(mc68kcpu), COND_PL(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_spl_8_al(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AL_8(mc68kcpu), COND_PL(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_smi_8_ai(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_AI_8(mc68kcpu), COND_MI(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_smi_8_pi(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_PI_8(mc68kcpu), COND_MI(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_smi_8_pi7(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_A7_PI_8(mc68kcpu), COND_MI(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_smi_8_pd(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_PD_8(mc68kcpu), COND_MI(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_smi_8_pd7(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_A7_PD_8(mc68kcpu), COND_MI(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_smi_8_di(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_DI_8(mc68kcpu), COND_MI(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_smi_8_ix(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_IX_8(mc68kcpu), COND_MI(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_smi_8_aw(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AW_8(mc68kcpu), COND_MI(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_smi_8_al(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AL_8(mc68kcpu), COND_MI(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sge_8_ai(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_AI_8(mc68kcpu), COND_GE(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sge_8_pi(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_PI_8(mc68kcpu), COND_GE(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sge_8_pi7(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_A7_PI_8(mc68kcpu), COND_GE(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sge_8_pd(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_PD_8(mc68kcpu), COND_GE(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sge_8_pd7(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_A7_PD_8(mc68kcpu), COND_GE(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sge_8_di(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_DI_8(mc68kcpu), COND_GE(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sge_8_ix(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_IX_8(mc68kcpu), COND_GE(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sge_8_aw(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AW_8(mc68kcpu), COND_GE(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sge_8_al(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AL_8(mc68kcpu), COND_GE(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_slt_8_ai(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_AI_8(mc68kcpu), COND_LT(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_slt_8_pi(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_PI_8(mc68kcpu), COND_LT(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_slt_8_pi7(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_A7_PI_8(mc68kcpu), COND_LT(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_slt_8_pd(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_PD_8(mc68kcpu), COND_LT(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_slt_8_pd7(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_A7_PD_8(mc68kcpu), COND_LT(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_slt_8_di(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_DI_8(mc68kcpu), COND_LT(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_slt_8_ix(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_IX_8(mc68kcpu), COND_LT(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_slt_8_aw(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AW_8(mc68kcpu), COND_LT(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_slt_8_al(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AL_8(mc68kcpu), COND_LT(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sgt_8_ai(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_AI_8(mc68kcpu), COND_GT(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sgt_8_pi(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_PI_8(mc68kcpu), COND_GT(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sgt_8_pi7(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_A7_PI_8(mc68kcpu), COND_GT(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sgt_8_pd(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_PD_8(mc68kcpu), COND_GT(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sgt_8_pd7(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_A7_PD_8(mc68kcpu), COND_GT(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sgt_8_di(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_DI_8(mc68kcpu), COND_GT(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sgt_8_ix(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_IX_8(mc68kcpu), COND_GT(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sgt_8_aw(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AW_8(mc68kcpu), COND_GT(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sgt_8_al(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AL_8(mc68kcpu), COND_GT(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sle_8_ai(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_AI_8(mc68kcpu), COND_LE(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sle_8_pi(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_PI_8(mc68kcpu), COND_LE(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sle_8_pi7(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_A7_PI_8(mc68kcpu), COND_LE(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sle_8_pd(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_PD_8(mc68kcpu), COND_LE(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sle_8_pd7(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_A7_PD_8(mc68kcpu), COND_LE(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sle_8_di(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_DI_8(mc68kcpu), COND_LE(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sle_8_ix(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AY_IX_8(mc68kcpu), COND_LE(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sle_8_aw(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AW_8(mc68kcpu), COND_LE(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_sle_8_al(m68000_base_device* mc68kcpu)
+{
+ m68ki_write_8((mc68kcpu), EA_AL_8(mc68kcpu), COND_LE(mc68kcpu) ? 0xff : 0);
+}
+
+
+void m68000_base_device_ops::m68k_op_stop(m68000_base_device* mc68kcpu)
+{
+ if((mc68kcpu)->s_flag)
+ {
+ UINT32 new_sr = OPER_I_16(mc68kcpu);
+ m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
+ (mc68kcpu)->stopped |= STOP_LEVEL_STOP;
+ m68ki_set_sr((mc68kcpu), new_sr);
+ (mc68kcpu)->remaining_cycles = 0;
+ return;
+ }
+ m68ki_exception_privilege_violation(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_8_er_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_8(DY(mc68kcpu));
+ UINT32 dst = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_8_er_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AY_AI_8(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_8_er_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AY_PI_8(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_8_er_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_A7_PI_8(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_8_er_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AY_PD_8(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_8_er_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_A7_PD_8(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_8_er_di(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AY_DI_8(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_8_er_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AY_IX_8(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_8_er_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AW_8(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_8_er_al(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AL_8(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_8_er_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_PCDI_8(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_8_er_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_PCIX_8(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_8_er_i(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_16_er_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_16(DY(mc68kcpu));
+ UINT32 dst = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_16_er_a(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_16(AY(mc68kcpu));
+ UINT32 dst = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_16_er_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AY_AI_16(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_16_er_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AY_PI_16(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_16_er_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AY_PD_16(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_16_er_di(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AY_DI_16(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_16_er_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AY_IX_16(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_16_er_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AW_16(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_16_er_al(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AL_16(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_16_er_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_PCDI_16(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_16_er_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_PCIX_16(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_16_er_i(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_32_er_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = DY(mc68kcpu);
+ UINT32 dst = *r_dst;
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ *r_dst = (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_32_er_a(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = AY(mc68kcpu);
+ UINT32 dst = *r_dst;
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ *r_dst = (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_32_er_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AY_AI_32(mc68kcpu);
+ UINT32 dst = *r_dst;
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ *r_dst = (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_32_er_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AY_PI_32(mc68kcpu);
+ UINT32 dst = *r_dst;
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ *r_dst = (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_32_er_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AY_PD_32(mc68kcpu);
+ UINT32 dst = *r_dst;
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ *r_dst = (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_32_er_di(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AY_DI_32(mc68kcpu);
+ UINT32 dst = *r_dst;
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ *r_dst = (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_32_er_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AY_IX_32(mc68kcpu);
+ UINT32 dst = *r_dst;
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ *r_dst = (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_32_er_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AW_32(mc68kcpu);
+ UINT32 dst = *r_dst;
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ *r_dst = (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_32_er_al(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_AL_32(mc68kcpu);
+ UINT32 dst = *r_dst;
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ *r_dst = (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_32_er_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_PCDI_32(mc68kcpu);
+ UINT32 dst = *r_dst;
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ *r_dst = (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_32_er_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_PCIX_32(mc68kcpu);
+ UINT32 dst = *r_dst;
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ *r_dst = (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_32_er_i(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 dst = *r_dst;
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+
+ *r_dst = (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_8_re_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_8(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_8(DX(mc68kcpu));
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_8_re_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_8(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_8(DX(mc68kcpu));
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_8_re_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_A7_PI_8(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_8(DX(mc68kcpu));
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_8_re_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_8(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_8(DX(mc68kcpu));
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_8_re_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_8(DX(mc68kcpu));
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_8_re_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_8(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_8(DX(mc68kcpu));
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_8_re_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_8(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_8(DX(mc68kcpu));
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_8_re_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_8(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_8(DX(mc68kcpu));
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_8_re_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_8(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_8(DX(mc68kcpu));
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_16_re_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_16(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_16(DX(mc68kcpu));
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_16_re_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_16(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_16(DX(mc68kcpu));
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_16_re_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_16(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_16(DX(mc68kcpu));
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_16_re_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_16(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_16(DX(mc68kcpu));
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_16_re_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_16(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_16(DX(mc68kcpu));
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_16_re_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_16(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_16(DX(mc68kcpu));
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_16_re_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_16(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_16(DX(mc68kcpu));
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_32_re_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_32(mc68kcpu);
+ UINT32 src = DX(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_32_re_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_32(mc68kcpu);
+ UINT32 src = DX(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_32_re_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_32(mc68kcpu);
+ UINT32 src = DX(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_32_re_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_32(mc68kcpu);
+ UINT32 src = DX(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_32_re_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_32(mc68kcpu);
+ UINT32 src = DX(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_32_re_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_32(mc68kcpu);
+ UINT32 src = DX(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_sub_32_re_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_32(mc68kcpu);
+ UINT32 src = DX(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_suba_16_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst - MAKE_INT_16(DY(mc68kcpu)));
+}
+
+
+void m68000_base_device_ops::m68k_op_suba_16_a(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst - MAKE_INT_16(AY(mc68kcpu)));
+}
+
+
+void m68000_base_device_ops::m68k_op_suba_16_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = MAKE_INT_16(OPER_AY_AI_16(mc68kcpu));
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
+}
+
+
+void m68000_base_device_ops::m68k_op_suba_16_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = MAKE_INT_16(OPER_AY_PI_16(mc68kcpu));
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
+}
+
+
+void m68000_base_device_ops::m68k_op_suba_16_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = MAKE_INT_16(OPER_AY_PD_16(mc68kcpu));
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
+}
+
+
+void m68000_base_device_ops::m68k_op_suba_16_di(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = MAKE_INT_16(OPER_AY_DI_16(mc68kcpu));
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
+}
+
+
+void m68000_base_device_ops::m68k_op_suba_16_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = MAKE_INT_16(OPER_AY_IX_16(mc68kcpu));
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
+}
+
+
+void m68000_base_device_ops::m68k_op_suba_16_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = MAKE_INT_16(OPER_AW_16(mc68kcpu));
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
+}
+
+
+void m68000_base_device_ops::m68k_op_suba_16_al(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = MAKE_INT_16(OPER_AL_16(mc68kcpu));
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
+}
+
+
+void m68000_base_device_ops::m68k_op_suba_16_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = MAKE_INT_16(OPER_PCDI_16(mc68kcpu));
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
+}
+
+
+void m68000_base_device_ops::m68k_op_suba_16_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = MAKE_INT_16(OPER_PCIX_16(mc68kcpu));
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
+}
+
+
+void m68000_base_device_ops::m68k_op_suba_16_i(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = MAKE_INT_16(OPER_I_16(mc68kcpu));
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
+}
+
+
+void m68000_base_device_ops::m68k_op_suba_32_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst - DY(mc68kcpu));
+}
+
+
+void m68000_base_device_ops::m68k_op_suba_32_a(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst - AY(mc68kcpu));
+}
+
+
+void m68000_base_device_ops::m68k_op_suba_32_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = OPER_AY_AI_32(mc68kcpu);
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
+}
+
+
+void m68000_base_device_ops::m68k_op_suba_32_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = OPER_AY_PI_32(mc68kcpu);
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
+}
+
+
+void m68000_base_device_ops::m68k_op_suba_32_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = OPER_AY_PD_32(mc68kcpu);
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
+}
+
+
+void m68000_base_device_ops::m68k_op_suba_32_di(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = OPER_AY_DI_32(mc68kcpu);
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
+}
+
+
+void m68000_base_device_ops::m68k_op_suba_32_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = OPER_AY_IX_32(mc68kcpu);
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
+}
+
+
+void m68000_base_device_ops::m68k_op_suba_32_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = OPER_AW_32(mc68kcpu);
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
+}
+
+
+void m68000_base_device_ops::m68k_op_suba_32_al(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = OPER_AL_32(mc68kcpu);
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
+}
+
+
+void m68000_base_device_ops::m68k_op_suba_32_pcdi(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = OPER_PCDI_32(mc68kcpu);
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
+}
+
+
+void m68000_base_device_ops::m68k_op_suba_32_pcix(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = OPER_PCIX_32(mc68kcpu);
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
+}
+
+
+void m68000_base_device_ops::m68k_op_suba_32_i(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AX(mc68kcpu);
+ UINT32 src = OPER_I_32(mc68kcpu);
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
+}
+
+
+void m68000_base_device_ops::m68k_op_subi_8_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_subi_8_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AY_AI_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subi_8_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AY_PI_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subi_8_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_A7_PI_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subi_8_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AY_PD_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subi_8_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subi_8_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AY_DI_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subi_8_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AY_IX_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subi_8_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AW_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subi_8_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_8(mc68kcpu);
+ UINT32 ea = EA_AL_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subi_16_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 dst = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_subi_16_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_AI_16(mc68kcpu);
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subi_16_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_PI_16(mc68kcpu);
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subi_16_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_PD_16(mc68kcpu);
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subi_16_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_DI_16(mc68kcpu);
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subi_16_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AY_IX_16(mc68kcpu);
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subi_16_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AW_16(mc68kcpu);
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subi_16_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_16(mc68kcpu);
+ UINT32 ea = EA_AL_16(mc68kcpu);
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subi_32_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 dst = *r_dst;
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+
+ *r_dst = (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_subi_32_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AY_AI_32(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subi_32_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AY_PI_32(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subi_32_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AY_PD_32(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subi_32_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AY_DI_32(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subi_32_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AY_IX_32(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subi_32_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AW_32(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subi_32_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_I_32(mc68kcpu);
+ UINT32 ea = EA_AL_32(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subq_8_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 dst = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_subq_8_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AY_AI_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subq_8_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AY_PI_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subq_8_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_A7_PI_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subq_8_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AY_PD_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subq_8_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subq_8_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AY_DI_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subq_8_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AY_IX_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subq_8_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AW_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subq_8_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AL_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+
+ m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subq_16_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 dst = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_subq_16_a(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AY(mc68kcpu);
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst - (((((mc68kcpu)->ir >> 9) - 1) & 7) + 1));
+}
+
+
+void m68000_base_device_ops::m68k_op_subq_16_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AY_AI_16(mc68kcpu);
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subq_16_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AY_PI_16(mc68kcpu);
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subq_16_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AY_PD_16(mc68kcpu);
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subq_16_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AY_DI_16(mc68kcpu);
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subq_16_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AY_IX_16(mc68kcpu);
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subq_16_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AW_16(mc68kcpu);
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subq_16_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AL_16(mc68kcpu);
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+
+ m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subq_32_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 dst = *r_dst;
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+
+ *r_dst = (mc68kcpu)->not_z_flag;
+}
+
+
+void m68000_base_device_ops::m68k_op_subq_32_a(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AY(mc68kcpu);
+
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst - (((((mc68kcpu)->ir >> 9) - 1) & 7) + 1));
+}
+
+
+void m68000_base_device_ops::m68k_op_subq_32_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AY_AI_32(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subq_32_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AY_PI_32(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subq_32_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AY_PD_32(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subq_32_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AY_DI_32(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subq_32_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AY_IX_32(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subq_32_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AW_32(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subq_32_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
+ UINT32 ea = EA_AL_32(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = dst - src;
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+
+ m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
+}
+
+
+void m68000_base_device_ops::m68k_op_subx_8_rr(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_8(DY(mc68kcpu));
+ UINT32 dst = MASK_OUT_ABOVE_8(*r_dst);
+ UINT32 res = dst - src - XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+
+ res = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
+}
+
+
+void m68000_base_device_ops::m68k_op_subx_16_rr(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = MASK_OUT_ABOVE_16(DY(mc68kcpu));
+ UINT32 dst = MASK_OUT_ABOVE_16(*r_dst);
+ UINT32 res = dst - src - XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+
+ res = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
+}
+
+
+void m68000_base_device_ops::m68k_op_subx_32_rr(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DX(mc68kcpu);
+ UINT32 src = DY(mc68kcpu);
+ UINT32 dst = *r_dst;
+ UINT32 res = dst - src - XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+
+ res = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ *r_dst = res;
+}
+
+
+void m68000_base_device_ops::m68k_op_subx_8_mm_ax7(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AY_PD_8(mc68kcpu);
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = dst - src - XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+
+ res = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_8((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_subx_8_mm_ay7(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_A7_PD_8(mc68kcpu);
+ UINT32 ea = EA_AX_PD_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = dst - src - XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+
+ res = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_8((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_subx_8_mm_axy7(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_A7_PD_8(mc68kcpu);
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = dst - src - XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+
+ res = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_8((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_subx_8_mm(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AY_PD_8(mc68kcpu);
+ UINT32 ea = EA_AX_PD_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+ UINT32 res = dst - src - XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
+
+ res = MASK_OUT_ABOVE_8(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_8((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_subx_16_mm(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AY_PD_16(mc68kcpu);
+ UINT32 ea = EA_AX_PD_16(mc68kcpu);
+ UINT32 dst = m68ki_read_16((mc68kcpu), ea);
+ UINT32 res = dst - src - XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
+
+ res = MASK_OUT_ABOVE_16(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_16((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_subx_32_mm(m68000_base_device* mc68kcpu)
+{
+ UINT32 src = OPER_AY_PD_32(mc68kcpu);
+ UINT32 ea = EA_AX_PD_32(mc68kcpu);
+ UINT32 dst = m68ki_read_32((mc68kcpu), ea);
+ UINT32 res = dst - src - XFLAG_AS_1(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
+ (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
+
+ res = MASK_OUT_ABOVE_32(res);
+ (mc68kcpu)->not_z_flag |= res;
+
+ m68ki_write_32((mc68kcpu), ea, res);
+}
+
+
+void m68000_base_device_ops::m68k_op_swap_32(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(*r_dst<<16);
+ *r_dst = (*r_dst>>16) | (mc68kcpu)->not_z_flag;
+
+ (mc68kcpu)->not_z_flag = *r_dst;
+ (mc68kcpu)->n_flag = NFLAG_32(*r_dst);
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_tas_8_d(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &DY(mc68kcpu);
+
+ (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(*r_dst);
+ (mc68kcpu)->n_flag = NFLAG_8(*r_dst);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ *r_dst |= 0x80;
+}
+
+
+void m68000_base_device_ops::m68k_op_tas_8_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_AI_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->not_z_flag = dst;
+ (mc68kcpu)->n_flag = NFLAG_8(dst);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ /* On the 68000 and 68010, the TAS instruction uses a unique bus cycle that may have
+ side effects (e.g. delaying DMA) or may fail to write back at all depending on the
+ bus implementation.
+ In particular, the Genesis/Megadrive games Gargoyles and Ex-Mutants need the TAS
+ to fail to write back in order to function properly. */
+ if (CPU_TYPE_IS_010_LESS((mc68kcpu)->cpu_type) && !(mc68kcpu)->tas_write_callback.isnull())
+ ((mc68kcpu)->tas_write_callback)(*(mc68kcpu)->program, ea, dst | 0x80, 0xff);
+ else
+ m68ki_write_8((mc68kcpu), ea, dst | 0x80);
+}
+
+
+void m68000_base_device_ops::m68k_op_tas_8_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PI_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->not_z_flag = dst;
+ (mc68kcpu)->n_flag = NFLAG_8(dst);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ /* On the 68000 and 68010, the TAS instruction uses a unique bus cycle that may have
+ side effects (e.g. delaying DMA) or may fail to write back at all depending on the
+ bus implementation.
+ In particular, the Genesis/Megadrive games Gargoyles and Ex-Mutants need the TAS
+ to fail to write back in order to function properly. */
+ if (CPU_TYPE_IS_010_LESS((mc68kcpu)->cpu_type) && !(mc68kcpu)->tas_write_callback.isnull())
+ ((mc68kcpu)->tas_write_callback)(*(mc68kcpu)->program, ea, dst | 0x80, 0xff);
+ else
+ m68ki_write_8((mc68kcpu), ea, dst | 0x80);
+}
+
+
+void m68000_base_device_ops::m68k_op_tas_8_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_A7_PI_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->not_z_flag = dst;
+ (mc68kcpu)->n_flag = NFLAG_8(dst);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ /* On the 68000 and 68010, the TAS instruction uses a unique bus cycle that may have
+ side effects (e.g. delaying DMA) or may fail to write back at all depending on the
+ bus implementation.
+ In particular, the Genesis/Megadrive games Gargoyles and Ex-Mutants need the TAS
+ to fail to write back in order to function properly. */
+ if (CPU_TYPE_IS_010_LESS((mc68kcpu)->cpu_type) && !(mc68kcpu)->tas_write_callback.isnull())
+ ((mc68kcpu)->tas_write_callback)(*(mc68kcpu)->program, ea, dst | 0x80, 0xff);
+ else
+ m68ki_write_8((mc68kcpu), ea, dst | 0x80);
+}
+
+
+void m68000_base_device_ops::m68k_op_tas_8_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_PD_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->not_z_flag = dst;
+ (mc68kcpu)->n_flag = NFLAG_8(dst);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ /* On the 68000 and 68010, the TAS instruction uses a unique bus cycle that may have
+ side effects (e.g. delaying DMA) or may fail to write back at all depending on the
+ bus implementation.
+ In particular, the Genesis/Megadrive games Gargoyles and Ex-Mutants need the TAS
+ to fail to write back in order to function properly. */
+ if (CPU_TYPE_IS_010_LESS((mc68kcpu)->cpu_type) && !(mc68kcpu)->tas_write_callback.isnull())
+ ((mc68kcpu)->tas_write_callback)(*(mc68kcpu)->program, ea, dst | 0x80, 0xff);
+ else
+ m68ki_write_8((mc68kcpu), ea, dst | 0x80);
+}
+
+
+void m68000_base_device_ops::m68k_op_tas_8_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_A7_PD_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->not_z_flag = dst;
+ (mc68kcpu)->n_flag = NFLAG_8(dst);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ /* On the 68000 and 68010, the TAS instruction uses a unique bus cycle that may have
+ side effects (e.g. delaying DMA) or may fail to write back at all depending on the
+ bus implementation.
+ In particular, the Genesis/Megadrive games Gargoyles and Ex-Mutants need the TAS
+ to fail to write back in order to function properly. */
+ if (CPU_TYPE_IS_010_LESS((mc68kcpu)->cpu_type) && !(mc68kcpu)->tas_write_callback.isnull())
+ ((mc68kcpu)->tas_write_callback)(*(mc68kcpu)->program, ea, dst | 0x80, 0xff);
+ else
+ m68ki_write_8((mc68kcpu), ea, dst | 0x80);
+}
+
+
+void m68000_base_device_ops::m68k_op_tas_8_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_DI_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->not_z_flag = dst;
+ (mc68kcpu)->n_flag = NFLAG_8(dst);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ /* On the 68000 and 68010, the TAS instruction uses a unique bus cycle that may have
+ side effects (e.g. delaying DMA) or may fail to write back at all depending on the
+ bus implementation.
+ In particular, the Genesis/Megadrive games Gargoyles and Ex-Mutants need the TAS
+ to fail to write back in order to function properly. */
+ if (CPU_TYPE_IS_010_LESS((mc68kcpu)->cpu_type) && !(mc68kcpu)->tas_write_callback.isnull())
+ ((mc68kcpu)->tas_write_callback)(*(mc68kcpu)->program, ea, dst | 0x80, 0xff);
+ else
+ m68ki_write_8((mc68kcpu), ea, dst | 0x80);
+}
+
+
+void m68000_base_device_ops::m68k_op_tas_8_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AY_IX_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->not_z_flag = dst;
+ (mc68kcpu)->n_flag = NFLAG_8(dst);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ /* On the 68000 and 68010, the TAS instruction uses a unique bus cycle that may have
+ side effects (e.g. delaying DMA) or may fail to write back at all depending on the
+ bus implementation.
+ In particular, the Genesis/Megadrive games Gargoyles and Ex-Mutants need the TAS
+ to fail to write back in order to function properly. */
+ if (CPU_TYPE_IS_010_LESS((mc68kcpu)->cpu_type) && !(mc68kcpu)->tas_write_callback.isnull())
+ ((mc68kcpu)->tas_write_callback)(*(mc68kcpu)->program, ea, dst | 0x80, 0xff);
+ else
+ m68ki_write_8((mc68kcpu), ea, dst | 0x80);
+}
+
+
+void m68000_base_device_ops::m68k_op_tas_8_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AW_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->not_z_flag = dst;
+ (mc68kcpu)->n_flag = NFLAG_8(dst);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ /* On the 68000 and 68010, the TAS instruction uses a unique bus cycle that may have
+ side effects (e.g. delaying DMA) or may fail to write back at all depending on the
+ bus implementation.
+ In particular, the Genesis/Megadrive games Gargoyles and Ex-Mutants need the TAS
+ to fail to write back in order to function properly. */
+ if (CPU_TYPE_IS_010_LESS((mc68kcpu)->cpu_type) && !(mc68kcpu)->tas_write_callback.isnull())
+ ((mc68kcpu)->tas_write_callback)(*(mc68kcpu)->program, ea, dst | 0x80, 0xff);
+ else
+ m68ki_write_8((mc68kcpu), ea, dst | 0x80);
+}
+
+
+void m68000_base_device_ops::m68k_op_tas_8_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 ea = EA_AL_8(mc68kcpu);
+ UINT32 dst = m68ki_read_8((mc68kcpu), ea);
+
+ (mc68kcpu)->not_z_flag = dst;
+ (mc68kcpu)->n_flag = NFLAG_8(dst);
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+
+ /* On the 68000 and 68010, the TAS instruction uses a unique bus cycle that may have
+ side effects (e.g. delaying DMA) or may fail to write back at all depending on the
+ bus implementation.
+ In particular, the Genesis/Megadrive games Gargoyles and Ex-Mutants need the TAS
+ to fail to write back in order to function properly. */
+ if (CPU_TYPE_IS_010_LESS((mc68kcpu)->cpu_type) && !(mc68kcpu)->tas_write_callback.isnull())
+ ((mc68kcpu)->tas_write_callback)(*(mc68kcpu)->program, ea, dst | 0x80, 0xff);
+ else
+ m68ki_write_8((mc68kcpu), ea, dst | 0x80);
+}
+
+
+void m68000_base_device_ops::m68k_op_trap(m68000_base_device* mc68kcpu)
+{
+ /* Trap#n stacks exception frame type 0 */
+ m68ki_exception_trapN((mc68kcpu), EXCEPTION_TRAP_BASE + ((mc68kcpu)->ir & 0xf)); /* HJB 990403 */
+}
+
+
+void m68000_base_device_ops::m68k_op_trapt(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_trapt_16(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_trapt_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_trapf(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_trapf_16(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ REG_PC(mc68kcpu) += 2;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_trapf_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ REG_PC(mc68kcpu) += 4;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_traphi(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_HI(mc68kcpu))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_trapls(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_LS(mc68kcpu))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_trapcc(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_CC(mc68kcpu))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_trapcs(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_CS(mc68kcpu))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_trapne(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_NE(mc68kcpu))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_trapeq(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_EQ(mc68kcpu))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_trapvc(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_VC(mc68kcpu))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_trapvs(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_VS(mc68kcpu))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_trappl(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_PL(mc68kcpu))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_trapmi(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_MI(mc68kcpu))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_trapge(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_GE(mc68kcpu))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_traplt(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_LT(mc68kcpu))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_trapgt(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_GT(mc68kcpu))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_traple(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_LE(mc68kcpu))
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_traphi_16(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_HI(mc68kcpu))
+ {
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_trapls_16(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_LS(mc68kcpu))
+ {
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_trapcc_16(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_CC(mc68kcpu))
+ {
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_trapcs_16(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_CS(mc68kcpu))
+ {
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_trapne_16(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_NE(mc68kcpu))
+ {
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_trapeq_16(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_EQ(mc68kcpu))
+ {
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_trapvc_16(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_VC(mc68kcpu))
+ {
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_trapvs_16(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_VS(mc68kcpu))
+ {
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_trappl_16(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_PL(mc68kcpu))
+ {
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_trapmi_16(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_MI(mc68kcpu))
+ {
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_trapge_16(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_GE(mc68kcpu))
+ {
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_traplt_16(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_LT(mc68kcpu))
+ {
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_trapgt_16(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_GT(mc68kcpu))
+ {
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_traple_16(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_LE(mc68kcpu))
+ {
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ REG_PC(mc68kcpu) += 2;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_traphi_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_HI(mc68kcpu))
+ {
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ REG_PC(mc68kcpu) += 4;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_trapls_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_LS(mc68kcpu))
+ {
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ REG_PC(mc68kcpu) += 4;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_trapcc_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_CC(mc68kcpu))
+ {
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ REG_PC(mc68kcpu) += 4;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_trapcs_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_CS(mc68kcpu))
+ {
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ REG_PC(mc68kcpu) += 4;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_trapne_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_NE(mc68kcpu))
+ {
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ REG_PC(mc68kcpu) += 4;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_trapeq_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_EQ(mc68kcpu))
+ {
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ REG_PC(mc68kcpu) += 4;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_trapvc_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_VC(mc68kcpu))
+ {
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ REG_PC(mc68kcpu) += 4;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_trapvs_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_VS(mc68kcpu))
+ {
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ REG_PC(mc68kcpu) += 4;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_trappl_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_PL(mc68kcpu))
+ {
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ REG_PC(mc68kcpu) += 4;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_trapmi_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_MI(mc68kcpu))
+ {
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ REG_PC(mc68kcpu) += 4;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_trapge_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_GE(mc68kcpu))
+ {
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ REG_PC(mc68kcpu) += 4;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_traplt_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_LT(mc68kcpu))
+ {
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ REG_PC(mc68kcpu) += 4;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_trapgt_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_GT(mc68kcpu))
+ {
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ REG_PC(mc68kcpu) += 4;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_traple_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ if(COND_LE(mc68kcpu))
+ {
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+ return;
+ }
+ REG_PC(mc68kcpu) += 4;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_trapv(m68000_base_device* mc68kcpu)
+{
+ if(COND_VC(mc68kcpu))
+ {
+ return;
+ }
+ m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
+}
+
+
+void m68000_base_device_ops::m68k_op_tst_8_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_8(DY(mc68kcpu));
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_tst_8_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_AI_8(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_tst_8_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PI_8(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_tst_8_pi7(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_A7_PI_8(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_tst_8_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PD_8(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_tst_8_pd7(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_A7_PD_8(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_tst_8_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_DI_8(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_tst_8_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_IX_8(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_tst_8_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AW_8(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_tst_8_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AL_8(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_tst_8_pcdi(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 res = OPER_PCDI_8(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_tst_8_pcix(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 res = OPER_PCIX_8(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_tst_8_i(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 res = OPER_I_8(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_8(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_tst_16_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = MASK_OUT_ABOVE_16(DY(mc68kcpu));
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_tst_16_a(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 res = MAKE_INT_16(AY(mc68kcpu));
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_tst_16_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_AI_16(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_tst_16_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PI_16(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_tst_16_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PD_16(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_tst_16_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_DI_16(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_tst_16_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_IX_16(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_tst_16_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AW_16(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_tst_16_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AL_16(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_tst_16_pcdi(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 res = OPER_PCDI_16(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_tst_16_pcix(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 res = OPER_PCIX_16(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_tst_16_i(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 res = OPER_I_16(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_16(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_tst_32_d(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = DY(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_tst_32_a(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 res = AY(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_tst_32_ai(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_AI_32(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_tst_32_pi(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PI_32(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_tst_32_pd(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_PD_32(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_tst_32_di(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_DI_32(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_tst_32_ix(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AY_IX_32(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_tst_32_aw(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AW_32(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_tst_32_al(m68000_base_device* mc68kcpu)
+{
+ UINT32 res = OPER_AL_32(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+}
+
+
+void m68000_base_device_ops::m68k_op_tst_32_pcdi(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 res = OPER_PCDI_32(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_tst_32_pcix(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 res = OPER_PCIX_32(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_tst_32_i(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 res = OPER_I_32(mc68kcpu);
+
+ (mc68kcpu)->n_flag = NFLAG_32(res);
+ (mc68kcpu)->not_z_flag = res;
+ (mc68kcpu)->v_flag = VFLAG_CLEAR;
+ (mc68kcpu)->c_flag = CFLAG_CLEAR;
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_unlk_32_a7(m68000_base_device* mc68kcpu)
+{
+ REG_A(mc68kcpu)[7] = m68ki_read_32((mc68kcpu), REG_A(mc68kcpu)[7]);
+}
+
+
+void m68000_base_device_ops::m68k_op_unlk_32(m68000_base_device* mc68kcpu)
+{
+ UINT32* r_dst = &AY(mc68kcpu);
+
+ REG_A(mc68kcpu)[7] = *r_dst;
+ *r_dst = m68ki_pull_32(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_unpk_16_rr(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ /* Note: DX(mc68kcpu) and DY(mc68kcpu) are reversed in Motorola's docs */
+ UINT32 src = DY(mc68kcpu);
+ UINT32* r_dst = &DX(mc68kcpu);
+
+ *r_dst = MASK_OUT_BELOW_16(*r_dst) | (((((src << 4) & 0x0f00) | (src & 0x000f)) + OPER_I_16(mc68kcpu)) & 0xffff);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_unpk_16_mm_ax7(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ /* Note: AX and AY are reversed in Motorola's docs */
+ UINT32 src = OPER_AY_PD_8(mc68kcpu);
+ UINT32 ea_dst;
+
+ src = (((src << 4) & 0x0f00) | (src & 0x000f)) + OPER_I_16(mc68kcpu);
+ ea_dst = EA_A7_PD_8(mc68kcpu);
+ m68ki_write_8((mc68kcpu), ea_dst, src & 0xff);
+ ea_dst = EA_A7_PD_8(mc68kcpu);
+ m68ki_write_8((mc68kcpu), ea_dst, (src >> 8) & 0xff);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_unpk_16_mm_ay7(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ /* Note: AX and AY are reversed in Motorola's docs */
+ UINT32 src = OPER_A7_PD_8(mc68kcpu);
+ UINT32 ea_dst;
+
+ src = (((src << 4) & 0x0f00) | (src & 0x000f)) + OPER_I_16(mc68kcpu);
+ ea_dst = EA_AX_PD_8(mc68kcpu);
+ m68ki_write_8((mc68kcpu), ea_dst, src & 0xff);
+ ea_dst = EA_AX_PD_8(mc68kcpu);
+ m68ki_write_8((mc68kcpu), ea_dst, (src >> 8) & 0xff);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_unpk_16_mm_axy7(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT32 src = OPER_A7_PD_8(mc68kcpu);
+ UINT32 ea_dst;
+
+ src = (((src << 4) & 0x0f00) | (src & 0x000f)) + OPER_I_16(mc68kcpu);
+ ea_dst = EA_A7_PD_8(mc68kcpu);
+ m68ki_write_8((mc68kcpu), ea_dst, src & 0xff);
+ ea_dst = EA_A7_PD_8(mc68kcpu);
+ m68ki_write_8((mc68kcpu), ea_dst, (src >> 8) & 0xff);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_unpk_16_mm(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
+ {
+ /* Note: AX and AY are reversed in Motorola's docs */
+ UINT32 src = OPER_AY_PD_8(mc68kcpu);
+ UINT32 ea_dst;
+
+ src = (((src << 4) & 0x0f00) | (src & 0x000f)) + OPER_I_16(mc68kcpu);
+ ea_dst = EA_AX_PD_8(mc68kcpu);
+ m68ki_write_8((mc68kcpu), ea_dst, src & 0xff);
+ ea_dst = EA_AX_PD_8(mc68kcpu);
+ m68ki_write_8((mc68kcpu), ea_dst, (src >> 8) & 0xff);
+ return;
+ }
+ m68ki_exception_illegal(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_cinv_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_040_PLUS((mc68kcpu)->cpu_type))
+ {
+ UINT16 ir = mc68kcpu->ir;
+ UINT8 cache = (ir >> 6) & 3;
+// UINT8 scope = (ir >> 3) & 3;
+// mc68kcpu->logerror("68040 %s: pc=%08x ir=%04x cache=%d scope=%d register=%d\n", ir & 0x0020 ? "cpush" : "cinv", REG_PPC(mc68kcpu), ir, cache, scope, ir & 7);
+ switch (cache)
+ {
+ case 2:
+ case 3:
+ // we invalidate/push the whole instruction cache
+ m68ki_ic_clear(mc68kcpu);
+ }
+ return;
+ }
+ m68ki_exception_1111(mc68kcpu);
+}
+
+
+void m68000_base_device_ops::m68k_op_cpush_32(m68000_base_device* mc68kcpu)
+{
+ if(CPU_TYPE_IS_040_PLUS((mc68kcpu)->cpu_type))
+ {
+ mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (cpush)\n",
+ (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir);
+ return;
+ }
+ m68ki_exception_1111(mc68kcpu);
+}
+
+
+/* ======================================================================== */
+/* ============================== END OF FILE ============================= */
+/* ======================================================================== */
+
+
+/* ======================================================================== */
+/* ========================= OPCODE TABLE BUILDER ========================= */
+/* ======================================================================== */
+
+#include "m68kops.h"
+
+#define NUM_CPU_TYPES 7
+
+void (*m68ki_instruction_jump_table[NUM_CPU_TYPES][0x10000])(m68000_base_device *m68k); /* opcode handler jump table */
+unsigned char m68ki_cycles[NUM_CPU_TYPES][0x10000]; /* Cycles used by CPU type */
+
+/* This is used to generate the opcode handler jump table */
+struct opcode_handler_struct
+{
+ void (*opcode_handler)(m68000_base_device *m68k); /* handler function */
+ unsigned int mask; /* mask on opcode */
+ unsigned int match; /* what to match after masking */
+ unsigned char cycles[NUM_CPU_TYPES]; /* cycles each cpu type takes */
+};
+
+
+/* Opcode handler table */
+static const opcode_handler_struct m68k_opcode_handler_table[] =
+{
+/* function mask match 000 010 020 040 */
+
+
+ {m68000_base_device_ops::m68k_op_1010, 0xf000, 0xa000, { 4, 4, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_1111, 0xf000, 0xf000, { 4, 4, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_moveq_32, 0xf100, 0x7000, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_cpbcc_32, 0xf180, 0xf080, {255, 255, 4, 4, 255, 255, 255}},
+ {m68000_base_device_ops::m68k_op_cpgen_32, 0xf1c0, 0xf000, {255, 255, 4, 4, 255, 255, 255}},
+ {m68000_base_device_ops::m68k_op_cpscc_32, 0xf1c0, 0xf040, {255, 255, 4, 4, 255, 255, 255}},
+ {m68000_base_device_ops::m68k_op_pmmu_32, 0xfe00, 0xf000, {255, 255, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_bra_8, 0xff00, 0x6000, { 10, 10, 10, 10, 10, 10, 10}},
+ {m68000_base_device_ops::m68k_op_bsr_8, 0xff00, 0x6100, { 18, 18, 7, 7, 7, 7, 7}},
+ {m68000_base_device_ops::m68k_op_bhi_8, 0xff00, 0x6200, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_bls_8, 0xff00, 0x6300, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_bcc_8, 0xff00, 0x6400, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_bcs_8, 0xff00, 0x6500, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_bne_8, 0xff00, 0x6600, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_beq_8, 0xff00, 0x6700, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_bvc_8, 0xff00, 0x6800, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_bvs_8, 0xff00, 0x6900, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_bpl_8, 0xff00, 0x6a00, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_bmi_8, 0xff00, 0x6b00, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_bge_8, 0xff00, 0x6c00, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_blt_8, 0xff00, 0x6d00, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_bgt_8, 0xff00, 0x6e00, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_ble_8, 0xff00, 0x6f00, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_040fpu0_32, 0xff00, 0xf200, {255, 255, 0, 0, 0, 0, 255}},
+ {m68000_base_device_ops::m68k_op_040fpu1_32, 0xff00, 0xf300, {255, 255, 0, 0, 0, 0, 255}},
+ {m68000_base_device_ops::m68k_op_cinv_32, 0xff20, 0xf400, {255, 255, 255, 255, 16, 255, 255}},
+ {m68000_base_device_ops::m68k_op_cpush_32, 0xff20, 0xf420, {255, 255, 255, 255, 16, 255, 255}},
+ {m68000_base_device_ops::m68k_op_btst_32_r_d, 0xf1f8, 0x0100, { 6, 6, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_movep_16_er, 0xf1f8, 0x0108, { 16, 16, 12, 12, 12, 12, 12}},
+ {m68000_base_device_ops::m68k_op_btst_8_r_ai, 0xf1f8, 0x0110, { 8, 8, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_btst_8_r_pi, 0xf1f8, 0x0118, { 8, 8, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_btst_8_r_pd, 0xf1f8, 0x0120, { 10, 10, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_btst_8_r_di, 0xf1f8, 0x0128, { 12, 12, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_btst_8_r_ix, 0xf1f8, 0x0130, { 14, 14, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_bchg_32_r_d, 0xf1f8, 0x0140, { 8, 8, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_movep_32_er, 0xf1f8, 0x0148, { 24, 24, 18, 18, 18, 18, 18}},
+ {m68000_base_device_ops::m68k_op_bchg_8_r_ai, 0xf1f8, 0x0150, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_bchg_8_r_pi, 0xf1f8, 0x0158, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_bchg_8_r_pd, 0xf1f8, 0x0160, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_bchg_8_r_di, 0xf1f8, 0x0168, { 16, 16, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_bchg_8_r_ix, 0xf1f8, 0x0170, { 18, 18, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_bclr_32_r_d, 0xf1f8, 0x0180, { 10, 10, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_movep_16_re, 0xf1f8, 0x0188, { 16, 16, 11, 11, 11, 11, 11}},
+ {m68000_base_device_ops::m68k_op_bclr_8_r_ai, 0xf1f8, 0x0190, { 12, 14, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_bclr_8_r_pi, 0xf1f8, 0x0198, { 12, 14, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_bclr_8_r_pd, 0xf1f8, 0x01a0, { 14, 16, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_bclr_8_r_di, 0xf1f8, 0x01a8, { 16, 18, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_bclr_8_r_ix, 0xf1f8, 0x01b0, { 18, 20, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_bset_32_r_d, 0xf1f8, 0x01c0, { 8, 8, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_movep_32_re, 0xf1f8, 0x01c8, { 24, 24, 17, 17, 17, 17, 17}},
+ {m68000_base_device_ops::m68k_op_bset_8_r_ai, 0xf1f8, 0x01d0, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_bset_8_r_pi, 0xf1f8, 0x01d8, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_bset_8_r_pd, 0xf1f8, 0x01e0, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_bset_8_r_di, 0xf1f8, 0x01e8, { 16, 16, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_bset_8_r_ix, 0xf1f8, 0x01f0, { 18, 18, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_d_d, 0xf1f8, 0x1000, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_move_8_d_ai, 0xf1f8, 0x1010, { 8, 8, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_move_8_d_pi, 0xf1f8, 0x1018, { 8, 8, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_move_8_d_pd, 0xf1f8, 0x1020, { 10, 10, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_move_8_d_di, 0xf1f8, 0x1028, { 12, 12, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_move_8_d_ix, 0xf1f8, 0x1030, { 14, 14, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_move_8_ai_d, 0xf1f8, 0x1080, { 8, 8, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_ai_ai, 0xf1f8, 0x1090, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_ai_pi, 0xf1f8, 0x1098, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_ai_pd, 0xf1f8, 0x10a0, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_ai_di, 0xf1f8, 0x10a8, { 16, 16, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_ai_ix, 0xf1f8, 0x10b0, { 18, 18, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_pi_d, 0xf1f8, 0x10c0, { 8, 8, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_pi_ai, 0xf1f8, 0x10d0, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_pi_pi, 0xf1f8, 0x10d8, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_pi_pd, 0xf1f8, 0x10e0, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_pi_di, 0xf1f8, 0x10e8, { 16, 16, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_pi_ix, 0xf1f8, 0x10f0, { 18, 18, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_pd_d, 0xf1f8, 0x1100, { 8, 8, 5, 5, 5, 5, 5}},
+ {m68000_base_device_ops::m68k_op_move_8_pd_ai, 0xf1f8, 0x1110, { 12, 12, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_move_8_pd_pi, 0xf1f8, 0x1118, { 12, 12, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_move_8_pd_pd, 0xf1f8, 0x1120, { 14, 14, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_move_8_pd_di, 0xf1f8, 0x1128, { 16, 16, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_move_8_pd_ix, 0xf1f8, 0x1130, { 18, 18, 12, 12, 12, 12, 5}},
+ {m68000_base_device_ops::m68k_op_move_8_di_d, 0xf1f8, 0x1140, { 12, 12, 5, 5, 5, 5, 5}},
+ {m68000_base_device_ops::m68k_op_move_8_di_ai, 0xf1f8, 0x1150, { 16, 16, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_move_8_di_pi, 0xf1f8, 0x1158, { 16, 16, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_move_8_di_pd, 0xf1f8, 0x1160, { 18, 18, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_move_8_di_di, 0xf1f8, 0x1168, { 20, 20, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_move_8_di_ix, 0xf1f8, 0x1170, { 22, 22, 12, 12, 12, 12, 5}},
+ {m68000_base_device_ops::m68k_op_move_8_ix_d, 0xf1f8, 0x1180, { 14, 14, 7, 7, 7, 7, 7}},
+ {m68000_base_device_ops::m68k_op_move_8_ix_ai, 0xf1f8, 0x1190, { 18, 18, 11, 11, 11, 11, 7}},
+ {m68000_base_device_ops::m68k_op_move_8_ix_pi, 0xf1f8, 0x1198, { 18, 18, 11, 11, 11, 11, 7}},
+ {m68000_base_device_ops::m68k_op_move_8_ix_pd, 0xf1f8, 0x11a0, { 20, 20, 12, 12, 12, 12, 7}},
+ {m68000_base_device_ops::m68k_op_move_8_ix_di, 0xf1f8, 0x11a8, { 22, 22, 12, 12, 12, 12, 7}},
+ {m68000_base_device_ops::m68k_op_move_8_ix_ix, 0xf1f8, 0x11b0, { 24, 24, 14, 14, 14, 14, 7}},
+ {m68000_base_device_ops::m68k_op_move_32_d_d, 0xf1f8, 0x2000, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_move_32_d_a, 0xf1f8, 0x2008, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_move_32_d_ai, 0xf1f8, 0x2010, { 12, 12, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_move_32_d_pi, 0xf1f8, 0x2018, { 12, 12, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_move_32_d_pd, 0xf1f8, 0x2020, { 14, 14, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_move_32_d_di, 0xf1f8, 0x2028, { 16, 16, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_move_32_d_ix, 0xf1f8, 0x2030, { 18, 18, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_movea_32_d, 0xf1f8, 0x2040, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_movea_32_a, 0xf1f8, 0x2048, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_movea_32_ai, 0xf1f8, 0x2050, { 12, 12, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_movea_32_pi, 0xf1f8, 0x2058, { 12, 12, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_movea_32_pd, 0xf1f8, 0x2060, { 14, 14, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_movea_32_di, 0xf1f8, 0x2068, { 16, 16, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_movea_32_ix, 0xf1f8, 0x2070, { 18, 18, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_move_32_ai_d, 0xf1f8, 0x2080, { 12, 12, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_move_32_ai_a, 0xf1f8, 0x2088, { 12, 12, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_move_32_ai_ai, 0xf1f8, 0x2090, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_32_ai_pi, 0xf1f8, 0x2098, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_32_ai_pd, 0xf1f8, 0x20a0, { 22, 22, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_move_32_ai_di, 0xf1f8, 0x20a8, { 24, 24, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_move_32_ai_ix, 0xf1f8, 0x20b0, { 26, 26, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_move_32_pi_d, 0xf1f8, 0x20c0, { 12, 12, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_move_32_pi_a, 0xf1f8, 0x20c8, { 12, 12, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_move_32_pi_ai, 0xf1f8, 0x20d0, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_32_pi_pi, 0xf1f8, 0x20d8, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_32_pi_pd, 0xf1f8, 0x20e0, { 22, 22, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_move_32_pi_di, 0xf1f8, 0x20e8, { 24, 24, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_move_32_pi_ix, 0xf1f8, 0x20f0, { 26, 26, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_move_32_pd_d, 0xf1f8, 0x2100, { 12, 14, 5, 5, 5, 5, 5}},
+ {m68000_base_device_ops::m68k_op_move_32_pd_a, 0xf1f8, 0x2108, { 12, 14, 5, 5, 5, 5, 5}},
+ {m68000_base_device_ops::m68k_op_move_32_pd_ai, 0xf1f8, 0x2110, { 20, 22, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_move_32_pd_pi, 0xf1f8, 0x2118, { 20, 22, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_move_32_pd_pd, 0xf1f8, 0x2120, { 22, 24, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_move_32_pd_di, 0xf1f8, 0x2128, { 24, 26, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_move_32_pd_ix, 0xf1f8, 0x2130, { 26, 28, 12, 12, 12, 12, 5}},
+ {m68000_base_device_ops::m68k_op_move_32_di_d, 0xf1f8, 0x2140, { 16, 16, 5, 5, 5, 5, 5}},
+ {m68000_base_device_ops::m68k_op_move_32_di_a, 0xf1f8, 0x2148, { 16, 16, 5, 5, 5, 5, 5}},
+ {m68000_base_device_ops::m68k_op_move_32_di_ai, 0xf1f8, 0x2150, { 24, 24, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_move_32_di_pi, 0xf1f8, 0x2158, { 24, 24, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_move_32_di_pd, 0xf1f8, 0x2160, { 26, 26, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_move_32_di_di, 0xf1f8, 0x2168, { 28, 28, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_move_32_di_ix, 0xf1f8, 0x2170, { 30, 30, 12, 12, 12, 12, 5}},
+ {m68000_base_device_ops::m68k_op_move_32_ix_d, 0xf1f8, 0x2180, { 18, 18, 7, 7, 7, 7, 7}},
+ {m68000_base_device_ops::m68k_op_move_32_ix_a, 0xf1f8, 0x2188, { 18, 18, 7, 7, 7, 7, 7}},
+ {m68000_base_device_ops::m68k_op_move_32_ix_ai, 0xf1f8, 0x2190, { 26, 26, 11, 11, 11, 11, 7}},
+ {m68000_base_device_ops::m68k_op_move_32_ix_pi, 0xf1f8, 0x2198, { 26, 26, 11, 11, 11, 11, 7}},
+ {m68000_base_device_ops::m68k_op_move_32_ix_pd, 0xf1f8, 0x21a0, { 28, 28, 12, 12, 12, 12, 7}},
+ {m68000_base_device_ops::m68k_op_move_32_ix_di, 0xf1f8, 0x21a8, { 30, 30, 12, 12, 12, 12, 7}},
+ {m68000_base_device_ops::m68k_op_move_32_ix_ix, 0xf1f8, 0x21b0, { 32, 32, 14, 14, 14, 14, 7}},
+ {m68000_base_device_ops::m68k_op_move_16_d_d, 0xf1f8, 0x3000, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_move_16_d_a, 0xf1f8, 0x3008, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_move_16_d_ai, 0xf1f8, 0x3010, { 8, 8, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_move_16_d_pi, 0xf1f8, 0x3018, { 8, 8, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_move_16_d_pd, 0xf1f8, 0x3020, { 10, 10, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_move_16_d_di, 0xf1f8, 0x3028, { 12, 12, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_move_16_d_ix, 0xf1f8, 0x3030, { 14, 14, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_movea_16_d, 0xf1f8, 0x3040, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_movea_16_a, 0xf1f8, 0x3048, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_movea_16_ai, 0xf1f8, 0x3050, { 8, 8, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_movea_16_pi, 0xf1f8, 0x3058, { 8, 8, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_movea_16_pd, 0xf1f8, 0x3060, { 10, 10, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_movea_16_di, 0xf1f8, 0x3068, { 12, 12, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_movea_16_ix, 0xf1f8, 0x3070, { 14, 14, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_move_16_ai_d, 0xf1f8, 0x3080, { 8, 8, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_ai_a, 0xf1f8, 0x3088, { 8, 8, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_ai_ai, 0xf1f8, 0x3090, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_ai_pi, 0xf1f8, 0x3098, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_ai_pd, 0xf1f8, 0x30a0, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_ai_di, 0xf1f8, 0x30a8, { 16, 16, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_ai_ix, 0xf1f8, 0x30b0, { 18, 18, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_pi_d, 0xf1f8, 0x30c0, { 8, 8, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_pi_a, 0xf1f8, 0x30c8, { 8, 8, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_pi_ai, 0xf1f8, 0x30d0, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_pi_pi, 0xf1f8, 0x30d8, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_pi_pd, 0xf1f8, 0x30e0, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_pi_di, 0xf1f8, 0x30e8, { 16, 16, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_pi_ix, 0xf1f8, 0x30f0, { 18, 18, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_pd_d, 0xf1f8, 0x3100, { 8, 8, 5, 5, 5, 5, 5}},
+ {m68000_base_device_ops::m68k_op_move_16_pd_a, 0xf1f8, 0x3108, { 8, 8, 5, 5, 5, 5, 5}},
+ {m68000_base_device_ops::m68k_op_move_16_pd_ai, 0xf1f8, 0x3110, { 12, 12, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_move_16_pd_pi, 0xf1f8, 0x3118, { 12, 12, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_move_16_pd_pd, 0xf1f8, 0x3120, { 14, 14, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_move_16_pd_di, 0xf1f8, 0x3128, { 16, 16, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_move_16_pd_ix, 0xf1f8, 0x3130, { 18, 18, 12, 12, 12, 12, 5}},
+ {m68000_base_device_ops::m68k_op_move_16_di_d, 0xf1f8, 0x3140, { 12, 12, 5, 5, 5, 5, 5}},
+ {m68000_base_device_ops::m68k_op_move_16_di_a, 0xf1f8, 0x3148, { 12, 12, 5, 5, 5, 5, 5}},
+ {m68000_base_device_ops::m68k_op_move_16_di_ai, 0xf1f8, 0x3150, { 16, 16, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_move_16_di_pi, 0xf1f8, 0x3158, { 16, 16, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_move_16_di_pd, 0xf1f8, 0x3160, { 18, 18, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_move_16_di_di, 0xf1f8, 0x3168, { 20, 20, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_move_16_di_ix, 0xf1f8, 0x3170, { 22, 22, 12, 12, 12, 12, 5}},
+ {m68000_base_device_ops::m68k_op_move_16_ix_d, 0xf1f8, 0x3180, { 14, 14, 7, 7, 7, 7, 7}},
+ {m68000_base_device_ops::m68k_op_move_16_ix_a, 0xf1f8, 0x3188, { 14, 14, 7, 7, 7, 7, 7}},
+ {m68000_base_device_ops::m68k_op_move_16_ix_ai, 0xf1f8, 0x3190, { 18, 18, 11, 11, 11, 11, 7}},
+ {m68000_base_device_ops::m68k_op_move_16_ix_pi, 0xf1f8, 0x3198, { 18, 18, 11, 11, 11, 11, 7}},
+ {m68000_base_device_ops::m68k_op_move_16_ix_pd, 0xf1f8, 0x31a0, { 20, 20, 12, 12, 12, 12, 7}},
+ {m68000_base_device_ops::m68k_op_move_16_ix_di, 0xf1f8, 0x31a8, { 22, 22, 12, 12, 12, 12, 7}},
+ {m68000_base_device_ops::m68k_op_move_16_ix_ix, 0xf1f8, 0x31b0, { 24, 24, 14, 14, 14, 14, 7}},
+ {m68000_base_device_ops::m68k_op_chk_32_d, 0xf1f8, 0x4100, {255, 255, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_chk_32_ai, 0xf1f8, 0x4110, {255, 255, 12, 12, 12, 12, 8}},
+ {m68000_base_device_ops::m68k_op_chk_32_pi, 0xf1f8, 0x4118, {255, 255, 12, 12, 12, 12, 8}},
+ {m68000_base_device_ops::m68k_op_chk_32_pd, 0xf1f8, 0x4120, {255, 255, 13, 13, 13, 13, 8}},
+ {m68000_base_device_ops::m68k_op_chk_32_di, 0xf1f8, 0x4128, {255, 255, 13, 13, 13, 13, 8}},
+ {m68000_base_device_ops::m68k_op_chk_32_ix, 0xf1f8, 0x4130, {255, 255, 15, 15, 15, 15, 8}},
+ {m68000_base_device_ops::m68k_op_chk_16_d, 0xf1f8, 0x4180, { 10, 8, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_chk_16_ai, 0xf1f8, 0x4190, { 14, 12, 12, 12, 12, 12, 8}},
+ {m68000_base_device_ops::m68k_op_chk_16_pi, 0xf1f8, 0x4198, { 14, 12, 12, 12, 12, 12, 8}},
+ {m68000_base_device_ops::m68k_op_chk_16_pd, 0xf1f8, 0x41a0, { 16, 14, 13, 13, 13, 13, 8}},
+ {m68000_base_device_ops::m68k_op_chk_16_di, 0xf1f8, 0x41a8, { 18, 16, 13, 13, 13, 13, 8}},
+ {m68000_base_device_ops::m68k_op_chk_16_ix, 0xf1f8, 0x41b0, { 20, 18, 15, 15, 15, 15, 8}},
+ {m68000_base_device_ops::m68k_op_lea_32_ai, 0xf1f8, 0x41d0, { 4, 4, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_lea_32_di, 0xf1f8, 0x41e8, { 8, 8, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_lea_32_ix, 0xf1f8, 0x41f0, { 12, 12, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_addq_8_d, 0xf1f8, 0x5000, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_addq_8_ai, 0xf1f8, 0x5010, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_addq_8_pi, 0xf1f8, 0x5018, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_addq_8_pd, 0xf1f8, 0x5020, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_addq_8_di, 0xf1f8, 0x5028, { 16, 16, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_addq_8_ix, 0xf1f8, 0x5030, { 18, 18, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_addq_16_d, 0xf1f8, 0x5040, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_addq_16_a, 0xf1f8, 0x5048, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_addq_16_ai, 0xf1f8, 0x5050, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_addq_16_pi, 0xf1f8, 0x5058, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_addq_16_pd, 0xf1f8, 0x5060, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_addq_16_di, 0xf1f8, 0x5068, { 16, 16, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_addq_16_ix, 0xf1f8, 0x5070, { 18, 18, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_addq_32_d, 0xf1f8, 0x5080, { 8, 8, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_addq_32_a, 0xf1f8, 0x5088, { 8, 8, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_addq_32_ai, 0xf1f8, 0x5090, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_addq_32_pi, 0xf1f8, 0x5098, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_addq_32_pd, 0xf1f8, 0x50a0, { 22, 22, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_addq_32_di, 0xf1f8, 0x50a8, { 24, 24, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_addq_32_ix, 0xf1f8, 0x50b0, { 26, 26, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_subq_8_d, 0xf1f8, 0x5100, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_subq_8_ai, 0xf1f8, 0x5110, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_subq_8_pi, 0xf1f8, 0x5118, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_subq_8_pd, 0xf1f8, 0x5120, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_subq_8_di, 0xf1f8, 0x5128, { 16, 16, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_subq_8_ix, 0xf1f8, 0x5130, { 18, 18, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_subq_16_d, 0xf1f8, 0x5140, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_subq_16_a, 0xf1f8, 0x5148, { 8, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_subq_16_ai, 0xf1f8, 0x5150, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_subq_16_pi, 0xf1f8, 0x5158, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_subq_16_pd, 0xf1f8, 0x5160, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_subq_16_di, 0xf1f8, 0x5168, { 16, 16, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_subq_16_ix, 0xf1f8, 0x5170, { 18, 18, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_subq_32_d, 0xf1f8, 0x5180, { 8, 8, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_subq_32_a, 0xf1f8, 0x5188, { 8, 8, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_subq_32_ai, 0xf1f8, 0x5190, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_subq_32_pi, 0xf1f8, 0x5198, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_subq_32_pd, 0xf1f8, 0x51a0, { 22, 22, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_subq_32_di, 0xf1f8, 0x51a8, { 24, 24, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_subq_32_ix, 0xf1f8, 0x51b0, { 26, 26, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_or_8_er_d, 0xf1f8, 0x8000, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_or_8_er_ai, 0xf1f8, 0x8010, { 8, 8, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_or_8_er_pi, 0xf1f8, 0x8018, { 8, 8, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_or_8_er_pd, 0xf1f8, 0x8020, { 10, 10, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_or_8_er_di, 0xf1f8, 0x8028, { 12, 12, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_or_8_er_ix, 0xf1f8, 0x8030, { 14, 14, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_or_16_er_d, 0xf1f8, 0x8040, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_or_16_er_ai, 0xf1f8, 0x8050, { 8, 8, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_or_16_er_pi, 0xf1f8, 0x8058, { 8, 8, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_or_16_er_pd, 0xf1f8, 0x8060, { 10, 10, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_or_16_er_di, 0xf1f8, 0x8068, { 12, 12, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_or_16_er_ix, 0xf1f8, 0x8070, { 14, 14, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_or_32_er_d, 0xf1f8, 0x8080, { 8, 6, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_or_32_er_ai, 0xf1f8, 0x8090, { 14, 14, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_or_32_er_pi, 0xf1f8, 0x8098, { 14, 14, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_or_32_er_pd, 0xf1f8, 0x80a0, { 16, 16, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_or_32_er_di, 0xf1f8, 0x80a8, { 18, 18, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_or_32_er_ix, 0xf1f8, 0x80b0, { 20, 20, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_divu_16_d, 0xf1f8, 0x80c0, {140, 108, 44, 44, 44, 44, 44}},
+ {m68000_base_device_ops::m68k_op_divu_16_ai, 0xf1f8, 0x80d0, {144, 112, 48, 48, 48, 48, 44}},
+ {m68000_base_device_ops::m68k_op_divu_16_pi, 0xf1f8, 0x80d8, {144, 112, 48, 48, 48, 48, 44}},
+ {m68000_base_device_ops::m68k_op_divu_16_pd, 0xf1f8, 0x80e0, {146, 114, 49, 49, 49, 49, 44}},
+ {m68000_base_device_ops::m68k_op_divu_16_di, 0xf1f8, 0x80e8, {148, 116, 49, 49, 49, 49, 44}},
+ {m68000_base_device_ops::m68k_op_divu_16_ix, 0xf1f8, 0x80f0, {150, 118, 51, 51, 51, 51, 44}},
+ {m68000_base_device_ops::m68k_op_sbcd_8_rr, 0xf1f8, 0x8100, { 6, 6, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_sbcd_8_mm, 0xf1f8, 0x8108, { 18, 18, 16, 16, 16, 16, 16}},
+ {m68000_base_device_ops::m68k_op_or_8_re_ai, 0xf1f8, 0x8110, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_or_8_re_pi, 0xf1f8, 0x8118, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_or_8_re_pd, 0xf1f8, 0x8120, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_or_8_re_di, 0xf1f8, 0x8128, { 16, 16, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_or_8_re_ix, 0xf1f8, 0x8130, { 18, 18, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_pack_16_rr, 0xf1f8, 0x8140, {255, 255, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_pack_16_mm, 0xf1f8, 0x8148, {255, 255, 13, 13, 13, 13, 13}},
+ {m68000_base_device_ops::m68k_op_or_16_re_ai, 0xf1f8, 0x8150, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_or_16_re_pi, 0xf1f8, 0x8158, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_or_16_re_pd, 0xf1f8, 0x8160, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_or_16_re_di, 0xf1f8, 0x8168, { 16, 16, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_or_16_re_ix, 0xf1f8, 0x8170, { 18, 18, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_unpk_16_rr, 0xf1f8, 0x8180, {255, 255, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_unpk_16_mm, 0xf1f8, 0x8188, {255, 255, 13, 13, 13, 13, 13}},
+ {m68000_base_device_ops::m68k_op_or_32_re_ai, 0xf1f8, 0x8190, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_or_32_re_pi, 0xf1f8, 0x8198, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_or_32_re_pd, 0xf1f8, 0x81a0, { 22, 22, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_or_32_re_di, 0xf1f8, 0x81a8, { 24, 24, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_or_32_re_ix, 0xf1f8, 0x81b0, { 26, 26, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_divs_16_d, 0xf1f8, 0x81c0, {158, 122, 56, 56, 56, 56, 56}},
+ {m68000_base_device_ops::m68k_op_divs_16_ai, 0xf1f8, 0x81d0, {162, 126, 60, 60, 60, 60, 56}},
+ {m68000_base_device_ops::m68k_op_divs_16_pi, 0xf1f8, 0x81d8, {162, 126, 60, 60, 60, 60, 56}},
+ {m68000_base_device_ops::m68k_op_divs_16_pd, 0xf1f8, 0x81e0, {164, 128, 61, 61, 61, 61, 56}},
+ {m68000_base_device_ops::m68k_op_divs_16_di, 0xf1f8, 0x81e8, {166, 130, 61, 61, 61, 61, 56}},
+ {m68000_base_device_ops::m68k_op_divs_16_ix, 0xf1f8, 0x81f0, {168, 132, 63, 63, 63, 63, 56}},
+ {m68000_base_device_ops::m68k_op_sub_8_er_d, 0xf1f8, 0x9000, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_sub_8_er_ai, 0xf1f8, 0x9010, { 8, 8, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_sub_8_er_pi, 0xf1f8, 0x9018, { 8, 8, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_sub_8_er_pd, 0xf1f8, 0x9020, { 10, 10, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_sub_8_er_di, 0xf1f8, 0x9028, { 12, 12, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_sub_8_er_ix, 0xf1f8, 0x9030, { 14, 14, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_sub_16_er_d, 0xf1f8, 0x9040, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_sub_16_er_a, 0xf1f8, 0x9048, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_sub_16_er_ai, 0xf1f8, 0x9050, { 8, 8, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_sub_16_er_pi, 0xf1f8, 0x9058, { 8, 8, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_sub_16_er_pd, 0xf1f8, 0x9060, { 10, 10, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_sub_16_er_di, 0xf1f8, 0x9068, { 12, 12, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_sub_16_er_ix, 0xf1f8, 0x9070, { 14, 14, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_sub_32_er_d, 0xf1f8, 0x9080, { 8, 6, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_sub_32_er_a, 0xf1f8, 0x9088, { 8, 6, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_sub_32_er_ai, 0xf1f8, 0x9090, { 14, 14, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_sub_32_er_pi, 0xf1f8, 0x9098, { 14, 14, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_sub_32_er_pd, 0xf1f8, 0x90a0, { 16, 16, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_sub_32_er_di, 0xf1f8, 0x90a8, { 18, 18, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_sub_32_er_ix, 0xf1f8, 0x90b0, { 20, 20, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_suba_16_d, 0xf1f8, 0x90c0, { 8, 8, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_suba_16_a, 0xf1f8, 0x90c8, { 8, 8, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_suba_16_ai, 0xf1f8, 0x90d0, { 12, 12, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_suba_16_pi, 0xf1f8, 0x90d8, { 12, 12, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_suba_16_pd, 0xf1f8, 0x90e0, { 14, 14, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_suba_16_di, 0xf1f8, 0x90e8, { 16, 16, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_suba_16_ix, 0xf1f8, 0x90f0, { 18, 18, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_subx_8_rr, 0xf1f8, 0x9100, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_subx_8_mm, 0xf1f8, 0x9108, { 18, 18, 12, 12, 12, 12, 12}},
+ {m68000_base_device_ops::m68k_op_sub_8_re_ai, 0xf1f8, 0x9110, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_sub_8_re_pi, 0xf1f8, 0x9118, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_sub_8_re_pd, 0xf1f8, 0x9120, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_sub_8_re_di, 0xf1f8, 0x9128, { 16, 16, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_sub_8_re_ix, 0xf1f8, 0x9130, { 18, 18, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_subx_16_rr, 0xf1f8, 0x9140, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_subx_16_mm, 0xf1f8, 0x9148, { 18, 18, 12, 12, 12, 12, 12}},
+ {m68000_base_device_ops::m68k_op_sub_16_re_ai, 0xf1f8, 0x9150, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_sub_16_re_pi, 0xf1f8, 0x9158, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_sub_16_re_pd, 0xf1f8, 0x9160, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_sub_16_re_di, 0xf1f8, 0x9168, { 16, 16, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_sub_16_re_ix, 0xf1f8, 0x9170, { 18, 18, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_subx_32_rr, 0xf1f8, 0x9180, { 8, 6, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_subx_32_mm, 0xf1f8, 0x9188, { 30, 30, 12, 12, 12, 12, 12}},
+ {m68000_base_device_ops::m68k_op_sub_32_re_ai, 0xf1f8, 0x9190, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_sub_32_re_pi, 0xf1f8, 0x9198, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_sub_32_re_pd, 0xf1f8, 0x91a0, { 22, 22, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_sub_32_re_di, 0xf1f8, 0x91a8, { 24, 24, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_sub_32_re_ix, 0xf1f8, 0x91b0, { 26, 26, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_suba_32_d, 0xf1f8, 0x91c0, { 8, 6, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_suba_32_a, 0xf1f8, 0x91c8, { 8, 6, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_suba_32_ai, 0xf1f8, 0x91d0, { 14, 14, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_suba_32_pi, 0xf1f8, 0x91d8, { 14, 14, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_suba_32_pd, 0xf1f8, 0x91e0, { 16, 16, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_suba_32_di, 0xf1f8, 0x91e8, { 18, 18, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_suba_32_ix, 0xf1f8, 0x91f0, { 20, 20, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_cmp_8_d, 0xf1f8, 0xb000, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_cmp_8_ai, 0xf1f8, 0xb010, { 8, 8, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_cmp_8_pi, 0xf1f8, 0xb018, { 8, 8, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_cmp_8_pd, 0xf1f8, 0xb020, { 10, 10, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_cmp_8_di, 0xf1f8, 0xb028, { 12, 12, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_cmp_8_ix, 0xf1f8, 0xb030, { 14, 14, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_cmp_16_d, 0xf1f8, 0xb040, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_cmp_16_a, 0xf1f8, 0xb048, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_cmp_16_ai, 0xf1f8, 0xb050, { 8, 8, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_cmp_16_pi, 0xf1f8, 0xb058, { 8, 8, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_cmp_16_pd, 0xf1f8, 0xb060, { 10, 10, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_cmp_16_di, 0xf1f8, 0xb068, { 12, 12, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_cmp_16_ix, 0xf1f8, 0xb070, { 14, 14, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_cmp_32_d, 0xf1f8, 0xb080, { 6, 6, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_cmp_32_a, 0xf1f8, 0xb088, { 6, 6, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_cmp_32_ai, 0xf1f8, 0xb090, { 14, 14, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_cmp_32_pi, 0xf1f8, 0xb098, { 14, 14, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_cmp_32_pd, 0xf1f8, 0xb0a0, { 16, 16, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_cmp_32_di, 0xf1f8, 0xb0a8, { 18, 18, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_cmp_32_ix, 0xf1f8, 0xb0b0, { 20, 20, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_cmpa_16_d, 0xf1f8, 0xb0c0, { 6, 6, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_cmpa_16_a, 0xf1f8, 0xb0c8, { 6, 6, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_cmpa_16_ai, 0xf1f8, 0xb0d0, { 10, 10, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_cmpa_16_pi, 0xf1f8, 0xb0d8, { 10, 10, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_cmpa_16_pd, 0xf1f8, 0xb0e0, { 12, 12, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_cmpa_16_di, 0xf1f8, 0xb0e8, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_cmpa_16_ix, 0xf1f8, 0xb0f0, { 16, 16, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_eor_8_d, 0xf1f8, 0xb100, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_cmpm_8, 0xf1f8, 0xb108, { 12, 12, 9, 9, 9, 9, 9}},
+ {m68000_base_device_ops::m68k_op_eor_8_ai, 0xf1f8, 0xb110, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_eor_8_pi, 0xf1f8, 0xb118, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_eor_8_pd, 0xf1f8, 0xb120, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_eor_8_di, 0xf1f8, 0xb128, { 16, 16, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_eor_8_ix, 0xf1f8, 0xb130, { 18, 18, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_eor_16_d, 0xf1f8, 0xb140, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_cmpm_16, 0xf1f8, 0xb148, { 12, 12, 9, 9, 9, 9, 9}},
+ {m68000_base_device_ops::m68k_op_eor_16_ai, 0xf1f8, 0xb150, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_eor_16_pi, 0xf1f8, 0xb158, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_eor_16_pd, 0xf1f8, 0xb160, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_eor_16_di, 0xf1f8, 0xb168, { 16, 16, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_eor_16_ix, 0xf1f8, 0xb170, { 18, 18, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_eor_32_d, 0xf1f8, 0xb180, { 8, 6, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_cmpm_32, 0xf1f8, 0xb188, { 20, 20, 9, 9, 9, 9, 9}},
+ {m68000_base_device_ops::m68k_op_eor_32_ai, 0xf1f8, 0xb190, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_eor_32_pi, 0xf1f8, 0xb198, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_eor_32_pd, 0xf1f8, 0xb1a0, { 22, 22, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_eor_32_di, 0xf1f8, 0xb1a8, { 24, 24, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_eor_32_ix, 0xf1f8, 0xb1b0, { 26, 26, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_cmpa_32_d, 0xf1f8, 0xb1c0, { 6, 6, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_cmpa_32_a, 0xf1f8, 0xb1c8, { 6, 6, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_cmpa_32_ai, 0xf1f8, 0xb1d0, { 14, 14, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_cmpa_32_pi, 0xf1f8, 0xb1d8, { 14, 14, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_cmpa_32_pd, 0xf1f8, 0xb1e0, { 16, 16, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_cmpa_32_di, 0xf1f8, 0xb1e8, { 18, 18, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_cmpa_32_ix, 0xf1f8, 0xb1f0, { 20, 20, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_and_8_er_d, 0xf1f8, 0xc000, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_and_8_er_ai, 0xf1f8, 0xc010, { 8, 8, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_and_8_er_pi, 0xf1f8, 0xc018, { 8, 8, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_and_8_er_pd, 0xf1f8, 0xc020, { 10, 10, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_and_8_er_di, 0xf1f8, 0xc028, { 12, 12, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_and_8_er_ix, 0xf1f8, 0xc030, { 14, 14, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_and_16_er_d, 0xf1f8, 0xc040, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_and_16_er_ai, 0xf1f8, 0xc050, { 8, 8, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_and_16_er_pi, 0xf1f8, 0xc058, { 8, 8, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_and_16_er_pd, 0xf1f8, 0xc060, { 10, 10, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_and_16_er_di, 0xf1f8, 0xc068, { 12, 12, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_and_16_er_ix, 0xf1f8, 0xc070, { 14, 14, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_and_32_er_d, 0xf1f8, 0xc080, { 8, 6, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_and_32_er_ai, 0xf1f8, 0xc090, { 14, 14, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_and_32_er_pi, 0xf1f8, 0xc098, { 14, 14, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_and_32_er_pd, 0xf1f8, 0xc0a0, { 16, 16, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_and_32_er_di, 0xf1f8, 0xc0a8, { 18, 18, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_and_32_er_ix, 0xf1f8, 0xc0b0, { 20, 20, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_mulu_16_d, 0xf1f8, 0xc0c0, { 54, 30, 27, 27, 27, 27, 27}},
+ {m68000_base_device_ops::m68k_op_mulu_16_ai, 0xf1f8, 0xc0d0, { 58, 34, 31, 31, 31, 31, 27}},
+ {m68000_base_device_ops::m68k_op_mulu_16_pi, 0xf1f8, 0xc0d8, { 58, 34, 31, 31, 31, 31, 27}},
+ {m68000_base_device_ops::m68k_op_mulu_16_pd, 0xf1f8, 0xc0e0, { 60, 36, 32, 32, 32, 32, 27}},
+ {m68000_base_device_ops::m68k_op_mulu_16_di, 0xf1f8, 0xc0e8, { 62, 38, 32, 32, 32, 32, 27}},
+ {m68000_base_device_ops::m68k_op_mulu_16_ix, 0xf1f8, 0xc0f0, { 64, 40, 34, 34, 34, 34, 27}},
+ {m68000_base_device_ops::m68k_op_abcd_8_rr, 0xf1f8, 0xc100, { 6, 6, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_abcd_8_mm, 0xf1f8, 0xc108, { 18, 18, 16, 16, 16, 16, 16}},
+ {m68000_base_device_ops::m68k_op_and_8_re_ai, 0xf1f8, 0xc110, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_and_8_re_pi, 0xf1f8, 0xc118, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_and_8_re_pd, 0xf1f8, 0xc120, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_and_8_re_di, 0xf1f8, 0xc128, { 16, 16, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_and_8_re_ix, 0xf1f8, 0xc130, { 18, 18, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_exg_32_dd, 0xf1f8, 0xc140, { 6, 6, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_exg_32_aa, 0xf1f8, 0xc148, { 6, 6, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_and_16_re_ai, 0xf1f8, 0xc150, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_and_16_re_pi, 0xf1f8, 0xc158, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_and_16_re_pd, 0xf1f8, 0xc160, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_and_16_re_di, 0xf1f8, 0xc168, { 16, 16, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_and_16_re_ix, 0xf1f8, 0xc170, { 18, 18, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_exg_32_da, 0xf1f8, 0xc188, { 6, 6, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_and_32_re_ai, 0xf1f8, 0xc190, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_and_32_re_pi, 0xf1f8, 0xc198, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_and_32_re_pd, 0xf1f8, 0xc1a0, { 22, 22, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_and_32_re_di, 0xf1f8, 0xc1a8, { 24, 24, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_and_32_re_ix, 0xf1f8, 0xc1b0, { 26, 26, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_muls_16_d, 0xf1f8, 0xc1c0, { 54, 32, 27, 27, 27, 27, 27}},
+ {m68000_base_device_ops::m68k_op_muls_16_ai, 0xf1f8, 0xc1d0, { 58, 36, 31, 31, 31, 31, 27}},
+ {m68000_base_device_ops::m68k_op_muls_16_pi, 0xf1f8, 0xc1d8, { 58, 36, 31, 31, 31, 31, 27}},
+ {m68000_base_device_ops::m68k_op_muls_16_pd, 0xf1f8, 0xc1e0, { 60, 38, 32, 32, 32, 32, 27}},
+ {m68000_base_device_ops::m68k_op_muls_16_di, 0xf1f8, 0xc1e8, { 62, 40, 32, 32, 32, 32, 27}},
+ {m68000_base_device_ops::m68k_op_muls_16_ix, 0xf1f8, 0xc1f0, { 64, 42, 34, 34, 34, 34, 27}},
+ {m68000_base_device_ops::m68k_op_add_8_er_d, 0xf1f8, 0xd000, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_add_8_er_ai, 0xf1f8, 0xd010, { 8, 8, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_add_8_er_pi, 0xf1f8, 0xd018, { 8, 8, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_add_8_er_pd, 0xf1f8, 0xd020, { 10, 10, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_add_8_er_di, 0xf1f8, 0xd028, { 12, 12, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_add_8_er_ix, 0xf1f8, 0xd030, { 14, 14, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_add_16_er_d, 0xf1f8, 0xd040, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_add_16_er_a, 0xf1f8, 0xd048, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_add_16_er_ai, 0xf1f8, 0xd050, { 8, 8, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_add_16_er_pi, 0xf1f8, 0xd058, { 8, 8, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_add_16_er_pd, 0xf1f8, 0xd060, { 10, 10, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_add_16_er_di, 0xf1f8, 0xd068, { 12, 12, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_add_16_er_ix, 0xf1f8, 0xd070, { 14, 14, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_add_32_er_d, 0xf1f8, 0xd080, { 8, 6, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_add_32_er_a, 0xf1f8, 0xd088, { 8, 6, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_add_32_er_ai, 0xf1f8, 0xd090, { 14, 14, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_add_32_er_pi, 0xf1f8, 0xd098, { 14, 14, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_add_32_er_pd, 0xf1f8, 0xd0a0, { 16, 16, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_add_32_er_di, 0xf1f8, 0xd0a8, { 18, 18, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_add_32_er_ix, 0xf1f8, 0xd0b0, { 20, 20, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_adda_16_d, 0xf1f8, 0xd0c0, { 8, 8, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_adda_16_a, 0xf1f8, 0xd0c8, { 8, 8, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_adda_16_ai, 0xf1f8, 0xd0d0, { 12, 12, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_adda_16_pi, 0xf1f8, 0xd0d8, { 12, 12, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_adda_16_pd, 0xf1f8, 0xd0e0, { 14, 14, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_adda_16_di, 0xf1f8, 0xd0e8, { 16, 16, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_adda_16_ix, 0xf1f8, 0xd0f0, { 18, 18, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_addx_8_rr, 0xf1f8, 0xd100, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_addx_8_mm, 0xf1f8, 0xd108, { 18, 18, 12, 12, 12, 12, 12}},
+ {m68000_base_device_ops::m68k_op_add_8_re_ai, 0xf1f8, 0xd110, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_add_8_re_pi, 0xf1f8, 0xd118, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_add_8_re_pd, 0xf1f8, 0xd120, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_add_8_re_di, 0xf1f8, 0xd128, { 16, 16, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_add_8_re_ix, 0xf1f8, 0xd130, { 18, 18, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_addx_16_rr, 0xf1f8, 0xd140, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_addx_16_mm, 0xf1f8, 0xd148, { 18, 18, 12, 12, 12, 12, 12}},
+ {m68000_base_device_ops::m68k_op_add_16_re_ai, 0xf1f8, 0xd150, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_add_16_re_pi, 0xf1f8, 0xd158, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_add_16_re_pd, 0xf1f8, 0xd160, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_add_16_re_di, 0xf1f8, 0xd168, { 16, 16, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_add_16_re_ix, 0xf1f8, 0xd170, { 18, 18, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_addx_32_rr, 0xf1f8, 0xd180, { 8, 6, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_addx_32_mm, 0xf1f8, 0xd188, { 30, 30, 12, 12, 12, 12, 12}},
+ {m68000_base_device_ops::m68k_op_add_32_re_ai, 0xf1f8, 0xd190, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_add_32_re_pi, 0xf1f8, 0xd198, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_add_32_re_pd, 0xf1f8, 0xd1a0, { 22, 22, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_add_32_re_di, 0xf1f8, 0xd1a8, { 24, 24, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_add_32_re_ix, 0xf1f8, 0xd1b0, { 26, 26, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_adda_32_d, 0xf1f8, 0xd1c0, { 8, 6, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_adda_32_a, 0xf1f8, 0xd1c8, { 8, 6, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_adda_32_ai, 0xf1f8, 0xd1d0, { 14, 14, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_adda_32_pi, 0xf1f8, 0xd1d8, { 14, 14, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_adda_32_pd, 0xf1f8, 0xd1e0, { 16, 16, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_adda_32_di, 0xf1f8, 0xd1e8, { 18, 18, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_adda_32_ix, 0xf1f8, 0xd1f0, { 20, 20, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_asr_8_s, 0xf1f8, 0xe000, { 6, 6, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_lsr_8_s, 0xf1f8, 0xe008, { 6, 6, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_roxr_8_s, 0xf1f8, 0xe010, { 6, 6, 12, 12, 12, 12, 12}},
+ {m68000_base_device_ops::m68k_op_ror_8_s, 0xf1f8, 0xe018, { 6, 6, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_asr_8_r, 0xf1f8, 0xe020, { 6, 6, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_lsr_8_r, 0xf1f8, 0xe028, { 6, 6, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_roxr_8_r, 0xf1f8, 0xe030, { 6, 6, 12, 12, 12, 12, 12}},
+ {m68000_base_device_ops::m68k_op_ror_8_r, 0xf1f8, 0xe038, { 6, 6, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_asr_16_s, 0xf1f8, 0xe040, { 6, 6, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_lsr_16_s, 0xf1f8, 0xe048, { 6, 6, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_roxr_16_s, 0xf1f8, 0xe050, { 6, 6, 12, 12, 12, 12, 12}},
+ {m68000_base_device_ops::m68k_op_ror_16_s, 0xf1f8, 0xe058, { 6, 6, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_asr_16_r, 0xf1f8, 0xe060, { 6, 6, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_lsr_16_r, 0xf1f8, 0xe068, { 6, 6, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_roxr_16_r, 0xf1f8, 0xe070, { 6, 6, 12, 12, 12, 12, 12}},
+ {m68000_base_device_ops::m68k_op_ror_16_r, 0xf1f8, 0xe078, { 6, 6, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_asr_32_s, 0xf1f8, 0xe080, { 8, 8, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_lsr_32_s, 0xf1f8, 0xe088, { 8, 8, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_roxr_32_s, 0xf1f8, 0xe090, { 8, 8, 12, 12, 12, 12, 12}},
+ {m68000_base_device_ops::m68k_op_ror_32_s, 0xf1f8, 0xe098, { 8, 8, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_asr_32_r, 0xf1f8, 0xe0a0, { 8, 8, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_lsr_32_r, 0xf1f8, 0xe0a8, { 8, 8, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_roxr_32_r, 0xf1f8, 0xe0b0, { 8, 8, 12, 12, 12, 12, 12}},
+ {m68000_base_device_ops::m68k_op_ror_32_r, 0xf1f8, 0xe0b8, { 8, 8, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_asl_8_s, 0xf1f8, 0xe100, { 6, 6, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_lsl_8_s, 0xf1f8, 0xe108, { 6, 6, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_roxl_8_s, 0xf1f8, 0xe110, { 6, 6, 12, 12, 12, 12, 12}},
+ {m68000_base_device_ops::m68k_op_rol_8_s, 0xf1f8, 0xe118, { 6, 6, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_asl_8_r, 0xf1f8, 0xe120, { 6, 6, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_lsl_8_r, 0xf1f8, 0xe128, { 6, 6, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_roxl_8_r, 0xf1f8, 0xe130, { 6, 6, 12, 12, 12, 12, 12}},
+ {m68000_base_device_ops::m68k_op_rol_8_r, 0xf1f8, 0xe138, { 6, 6, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_asl_16_s, 0xf1f8, 0xe140, { 6, 6, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_lsl_16_s, 0xf1f8, 0xe148, { 6, 6, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_roxl_16_s, 0xf1f8, 0xe150, { 6, 6, 12, 12, 12, 12, 12}},
+ {m68000_base_device_ops::m68k_op_rol_16_s, 0xf1f8, 0xe158, { 6, 6, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_asl_16_r, 0xf1f8, 0xe160, { 6, 6, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_lsl_16_r, 0xf1f8, 0xe168, { 6, 6, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_roxl_16_r, 0xf1f8, 0xe170, { 6, 6, 12, 12, 12, 12, 12}},
+ {m68000_base_device_ops::m68k_op_rol_16_r, 0xf1f8, 0xe178, { 6, 6, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_asl_32_s, 0xf1f8, 0xe180, { 8, 8, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_lsl_32_s, 0xf1f8, 0xe188, { 8, 8, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_roxl_32_s, 0xf1f8, 0xe190, { 8, 8, 12, 12, 12, 12, 12}},
+ {m68000_base_device_ops::m68k_op_rol_32_s, 0xf1f8, 0xe198, { 8, 8, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_asl_32_r, 0xf1f8, 0xe1a0, { 8, 8, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_lsl_32_r, 0xf1f8, 0xe1a8, { 8, 8, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_roxl_32_r, 0xf1f8, 0xe1b0, { 8, 8, 12, 12, 12, 12, 12}},
+ {m68000_base_device_ops::m68k_op_rol_32_r, 0xf1f8, 0xe1b8, { 8, 8, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_cpdbcc_32, 0xf1f8, 0xf048, {255, 255, 4, 4, 255, 255, 255}},
+ {m68000_base_device_ops::m68k_op_cptrapcc_32, 0xf1f8, 0xf078, {255, 255, 4, 4, 255, 255, 255}},
+ {m68000_base_device_ops::m68k_op_ptest_32, 0xffd8, 0xf548, {255, 255, 255, 255, 8, 255, 255}},
+ {m68000_base_device_ops::m68k_op_rtm_32, 0xfff0, 0x06c0, {255, 255, 19, 19, 19, 19, 19}},
+ {m68000_base_device_ops::m68k_op_trap, 0xfff0, 0x4e40, { 4, 4, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_btst_8_r_pi7, 0xf1ff, 0x011f, { 8, 8, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_btst_8_r_pd7, 0xf1ff, 0x0127, { 10, 10, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_btst_8_r_aw, 0xf1ff, 0x0138, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_btst_8_r_al, 0xf1ff, 0x0139, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_btst_8_r_pcdi, 0xf1ff, 0x013a, { 12, 12, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_btst_8_r_pcix, 0xf1ff, 0x013b, { 14, 14, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_btst_8_r_i, 0xf1ff, 0x013c, { 8, 8, 6, 6, 6, 6, 4}},
+ {m68000_base_device_ops::m68k_op_bchg_8_r_pi7, 0xf1ff, 0x015f, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_bchg_8_r_pd7, 0xf1ff, 0x0167, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_bchg_8_r_aw, 0xf1ff, 0x0178, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_bchg_8_r_al, 0xf1ff, 0x0179, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_bclr_8_r_pi7, 0xf1ff, 0x019f, { 12, 14, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_bclr_8_r_pd7, 0xf1ff, 0x01a7, { 14, 16, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_bclr_8_r_aw, 0xf1ff, 0x01b8, { 16, 18, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_bclr_8_r_al, 0xf1ff, 0x01b9, { 20, 22, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_bset_8_r_pi7, 0xf1ff, 0x01df, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_bset_8_r_pd7, 0xf1ff, 0x01e7, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_bset_8_r_aw, 0xf1ff, 0x01f8, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_bset_8_r_al, 0xf1ff, 0x01f9, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_d_pi7, 0xf1ff, 0x101f, { 8, 8, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_move_8_d_pd7, 0xf1ff, 0x1027, { 10, 10, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_move_8_d_aw, 0xf1ff, 0x1038, { 12, 12, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_move_8_d_al, 0xf1ff, 0x1039, { 16, 16, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_move_8_d_pcdi, 0xf1ff, 0x103a, { 12, 12, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_move_8_d_pcix, 0xf1ff, 0x103b, { 14, 14, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_move_8_d_i, 0xf1ff, 0x103c, { 8, 8, 4, 4, 4, 4, 2}},
+ {m68000_base_device_ops::m68k_op_move_8_ai_pi7, 0xf1ff, 0x109f, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_ai_pd7, 0xf1ff, 0x10a7, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_ai_aw, 0xf1ff, 0x10b8, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_ai_al, 0xf1ff, 0x10b9, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_ai_pcdi, 0xf1ff, 0x10ba, { 16, 16, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_ai_pcix, 0xf1ff, 0x10bb, { 18, 18, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_ai_i, 0xf1ff, 0x10bc, { 12, 12, 6, 6, 6, 6, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_pi_pi7, 0xf1ff, 0x10df, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_pi_pd7, 0xf1ff, 0x10e7, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_pi_aw, 0xf1ff, 0x10f8, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_pi_al, 0xf1ff, 0x10f9, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_pi_pcdi, 0xf1ff, 0x10fa, { 16, 16, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_pi_pcix, 0xf1ff, 0x10fb, { 18, 18, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_pi_i, 0xf1ff, 0x10fc, { 12, 12, 6, 6, 6, 6, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_pd_pi7, 0xf1ff, 0x111f, { 12, 12, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_move_8_pd_pd7, 0xf1ff, 0x1127, { 14, 14, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_move_8_pd_aw, 0xf1ff, 0x1138, { 16, 16, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_move_8_pd_al, 0xf1ff, 0x1139, { 20, 20, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_move_8_pd_pcdi, 0xf1ff, 0x113a, { 16, 16, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_move_8_pd_pcix, 0xf1ff, 0x113b, { 18, 18, 12, 12, 12, 12, 5}},
+ {m68000_base_device_ops::m68k_op_move_8_pd_i, 0xf1ff, 0x113c, { 12, 12, 7, 7, 7, 7, 5}},
+ {m68000_base_device_ops::m68k_op_move_8_di_pi7, 0xf1ff, 0x115f, { 16, 16, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_move_8_di_pd7, 0xf1ff, 0x1167, { 18, 18, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_move_8_di_aw, 0xf1ff, 0x1178, { 20, 20, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_move_8_di_al, 0xf1ff, 0x1179, { 24, 24, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_move_8_di_pcdi, 0xf1ff, 0x117a, { 20, 20, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_move_8_di_pcix, 0xf1ff, 0x117b, { 22, 22, 12, 12, 12, 12, 5}},
+ {m68000_base_device_ops::m68k_op_move_8_di_i, 0xf1ff, 0x117c, { 16, 16, 7, 7, 7, 7, 5}},
+ {m68000_base_device_ops::m68k_op_move_8_ix_pi7, 0xf1ff, 0x119f, { 18, 18, 11, 11, 11, 11, 7}},
+ {m68000_base_device_ops::m68k_op_move_8_ix_pd7, 0xf1ff, 0x11a7, { 20, 20, 12, 12, 12, 12, 7}},
+ {m68000_base_device_ops::m68k_op_move_8_ix_aw, 0xf1ff, 0x11b8, { 22, 22, 11, 11, 11, 11, 7}},
+ {m68000_base_device_ops::m68k_op_move_8_ix_al, 0xf1ff, 0x11b9, { 26, 26, 11, 11, 11, 11, 7}},
+ {m68000_base_device_ops::m68k_op_move_8_ix_pcdi, 0xf1ff, 0x11ba, { 22, 22, 12, 12, 12, 12, 7}},
+ {m68000_base_device_ops::m68k_op_move_8_ix_pcix, 0xf1ff, 0x11bb, { 24, 24, 14, 14, 14, 14, 7}},
+ {m68000_base_device_ops::m68k_op_move_8_ix_i, 0xf1ff, 0x11bc, { 18, 18, 9, 9, 9, 9, 7}},
+ {m68000_base_device_ops::m68k_op_move_32_d_aw, 0xf1ff, 0x2038, { 16, 16, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_move_32_d_al, 0xf1ff, 0x2039, { 20, 20, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_move_32_d_pcdi, 0xf1ff, 0x203a, { 16, 16, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_move_32_d_pcix, 0xf1ff, 0x203b, { 18, 18, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_move_32_d_i, 0xf1ff, 0x203c, { 12, 12, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_movea_32_aw, 0xf1ff, 0x2078, { 16, 16, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_movea_32_al, 0xf1ff, 0x2079, { 20, 20, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_movea_32_pcdi, 0xf1ff, 0x207a, { 16, 16, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_movea_32_pcix, 0xf1ff, 0x207b, { 18, 18, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_movea_32_i, 0xf1ff, 0x207c, { 12, 12, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_move_32_ai_aw, 0xf1ff, 0x20b8, { 24, 24, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_32_ai_al, 0xf1ff, 0x20b9, { 28, 28, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_32_ai_pcdi, 0xf1ff, 0x20ba, { 24, 24, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_move_32_ai_pcix, 0xf1ff, 0x20bb, { 26, 26, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_move_32_ai_i, 0xf1ff, 0x20bc, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_32_pi_aw, 0xf1ff, 0x20f8, { 24, 24, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_32_pi_al, 0xf1ff, 0x20f9, { 28, 28, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_32_pi_pcdi, 0xf1ff, 0x20fa, { 24, 24, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_move_32_pi_pcix, 0xf1ff, 0x20fb, { 26, 26, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_move_32_pi_i, 0xf1ff, 0x20fc, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_32_pd_aw, 0xf1ff, 0x2138, { 24, 26, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_move_32_pd_al, 0xf1ff, 0x2139, { 28, 30, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_move_32_pd_pcdi, 0xf1ff, 0x213a, { 24, 26, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_move_32_pd_pcix, 0xf1ff, 0x213b, { 26, 28, 12, 12, 12, 12, 5}},
+ {m68000_base_device_ops::m68k_op_move_32_pd_i, 0xf1ff, 0x213c, { 20, 22, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_move_32_di_aw, 0xf1ff, 0x2178, { 28, 28, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_move_32_di_al, 0xf1ff, 0x2179, { 32, 32, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_move_32_di_pcdi, 0xf1ff, 0x217a, { 28, 28, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_move_32_di_pcix, 0xf1ff, 0x217b, { 30, 30, 12, 12, 12, 12, 5}},
+ {m68000_base_device_ops::m68k_op_move_32_di_i, 0xf1ff, 0x217c, { 24, 24, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_move_32_ix_aw, 0xf1ff, 0x21b8, { 30, 30, 11, 11, 11, 11, 7}},
+ {m68000_base_device_ops::m68k_op_move_32_ix_al, 0xf1ff, 0x21b9, { 34, 34, 11, 11, 11, 11, 7}},
+ {m68000_base_device_ops::m68k_op_move_32_ix_pcdi, 0xf1ff, 0x21ba, { 30, 30, 12, 12, 12, 12, 7}},
+ {m68000_base_device_ops::m68k_op_move_32_ix_pcix, 0xf1ff, 0x21bb, { 32, 32, 14, 14, 14, 14, 7}},
+ {m68000_base_device_ops::m68k_op_move_32_ix_i, 0xf1ff, 0x21bc, { 26, 26, 11, 11, 11, 11, 7}},
+ {m68000_base_device_ops::m68k_op_move_16_d_aw, 0xf1ff, 0x3038, { 12, 12, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_move_16_d_al, 0xf1ff, 0x3039, { 16, 16, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_move_16_d_pcdi, 0xf1ff, 0x303a, { 12, 12, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_move_16_d_pcix, 0xf1ff, 0x303b, { 14, 14, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_move_16_d_i, 0xf1ff, 0x303c, { 8, 8, 4, 4, 4, 4, 2}},
+ {m68000_base_device_ops::m68k_op_movea_16_aw, 0xf1ff, 0x3078, { 12, 12, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_movea_16_al, 0xf1ff, 0x3079, { 16, 16, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_movea_16_pcdi, 0xf1ff, 0x307a, { 12, 12, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_movea_16_pcix, 0xf1ff, 0x307b, { 14, 14, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_movea_16_i, 0xf1ff, 0x307c, { 8, 8, 4, 4, 4, 4, 2}},
+ {m68000_base_device_ops::m68k_op_move_16_ai_aw, 0xf1ff, 0x30b8, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_ai_al, 0xf1ff, 0x30b9, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_ai_pcdi, 0xf1ff, 0x30ba, { 16, 16, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_ai_pcix, 0xf1ff, 0x30bb, { 18, 18, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_ai_i, 0xf1ff, 0x30bc, { 12, 12, 6, 6, 6, 6, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_pi_aw, 0xf1ff, 0x30f8, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_pi_al, 0xf1ff, 0x30f9, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_pi_pcdi, 0xf1ff, 0x30fa, { 16, 16, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_pi_pcix, 0xf1ff, 0x30fb, { 18, 18, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_pi_i, 0xf1ff, 0x30fc, { 12, 12, 6, 6, 6, 6, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_pd_aw, 0xf1ff, 0x3138, { 16, 16, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_move_16_pd_al, 0xf1ff, 0x3139, { 20, 20, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_move_16_pd_pcdi, 0xf1ff, 0x313a, { 16, 16, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_move_16_pd_pcix, 0xf1ff, 0x313b, { 18, 18, 12, 12, 12, 12, 5}},
+ {m68000_base_device_ops::m68k_op_move_16_pd_i, 0xf1ff, 0x313c, { 12, 12, 7, 7, 7, 7, 5}},
+ {m68000_base_device_ops::m68k_op_move_16_di_aw, 0xf1ff, 0x3178, { 20, 20, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_move_16_di_al, 0xf1ff, 0x3179, { 24, 24, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_move_16_di_pcdi, 0xf1ff, 0x317a, { 20, 20, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_move_16_di_pcix, 0xf1ff, 0x317b, { 22, 22, 12, 12, 12, 12, 5}},
+ {m68000_base_device_ops::m68k_op_move_16_di_i, 0xf1ff, 0x317c, { 16, 16, 7, 7, 7, 7, 5}},
+ {m68000_base_device_ops::m68k_op_move_16_ix_aw, 0xf1ff, 0x31b8, { 22, 22, 11, 11, 11, 11, 7}},
+ {m68000_base_device_ops::m68k_op_move_16_ix_al, 0xf1ff, 0x31b9, { 26, 26, 11, 11, 11, 11, 7}},
+ {m68000_base_device_ops::m68k_op_move_16_ix_pcdi, 0xf1ff, 0x31ba, { 22, 22, 12, 12, 12, 12, 7}},
+ {m68000_base_device_ops::m68k_op_move_16_ix_pcix, 0xf1ff, 0x31bb, { 24, 24, 14, 14, 14, 14, 7}},
+ {m68000_base_device_ops::m68k_op_move_16_ix_i, 0xf1ff, 0x31bc, { 18, 18, 9, 9, 9, 9, 7}},
+ {m68000_base_device_ops::m68k_op_chk_32_aw, 0xf1ff, 0x4138, {255, 255, 12, 12, 12, 12, 8}},
+ {m68000_base_device_ops::m68k_op_chk_32_al, 0xf1ff, 0x4139, {255, 255, 12, 12, 12, 12, 8}},
+ {m68000_base_device_ops::m68k_op_chk_32_pcdi, 0xf1ff, 0x413a, {255, 255, 13, 13, 13, 13, 8}},
+ {m68000_base_device_ops::m68k_op_chk_32_pcix, 0xf1ff, 0x413b, {255, 255, 15, 15, 15, 15, 8}},
+ {m68000_base_device_ops::m68k_op_chk_32_i, 0xf1ff, 0x413c, {255, 255, 12, 12, 12, 12, 8}},
+ {m68000_base_device_ops::m68k_op_chk_16_aw, 0xf1ff, 0x41b8, { 18, 16, 12, 12, 12, 12, 8}},
+ {m68000_base_device_ops::m68k_op_chk_16_al, 0xf1ff, 0x41b9, { 22, 20, 12, 12, 12, 12, 8}},
+ {m68000_base_device_ops::m68k_op_chk_16_pcdi, 0xf1ff, 0x41ba, { 18, 16, 13, 13, 13, 13, 8}},
+ {m68000_base_device_ops::m68k_op_chk_16_pcix, 0xf1ff, 0x41bb, { 20, 18, 15, 15, 15, 15, 8}},
+ {m68000_base_device_ops::m68k_op_chk_16_i, 0xf1ff, 0x41bc, { 14, 12, 10, 10, 10, 10, 8}},
+ {m68000_base_device_ops::m68k_op_lea_32_aw, 0xf1ff, 0x41f8, { 8, 8, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_lea_32_al, 0xf1ff, 0x41f9, { 12, 12, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_lea_32_pcdi, 0xf1ff, 0x41fa, { 8, 8, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_lea_32_pcix, 0xf1ff, 0x41fb, { 12, 12, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_addq_8_pi7, 0xf1ff, 0x501f, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_addq_8_pd7, 0xf1ff, 0x5027, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_addq_8_aw, 0xf1ff, 0x5038, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_addq_8_al, 0xf1ff, 0x5039, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_addq_16_aw, 0xf1ff, 0x5078, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_addq_16_al, 0xf1ff, 0x5079, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_addq_32_aw, 0xf1ff, 0x50b8, { 24, 24, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_addq_32_al, 0xf1ff, 0x50b9, { 28, 28, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_subq_8_pi7, 0xf1ff, 0x511f, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_subq_8_pd7, 0xf1ff, 0x5127, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_subq_8_aw, 0xf1ff, 0x5138, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_subq_8_al, 0xf1ff, 0x5139, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_subq_16_aw, 0xf1ff, 0x5178, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_subq_16_al, 0xf1ff, 0x5179, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_subq_32_aw, 0xf1ff, 0x51b8, { 24, 24, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_subq_32_al, 0xf1ff, 0x51b9, { 28, 28, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_or_8_er_pi7, 0xf1ff, 0x801f, { 8, 8, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_or_8_er_pd7, 0xf1ff, 0x8027, { 10, 10, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_or_8_er_aw, 0xf1ff, 0x8038, { 12, 12, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_or_8_er_al, 0xf1ff, 0x8039, { 16, 16, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_or_8_er_pcdi, 0xf1ff, 0x803a, { 12, 12, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_or_8_er_pcix, 0xf1ff, 0x803b, { 14, 14, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_or_8_er_i, 0xf1ff, 0x803c, { 8, 8, 4, 4, 4, 4, 2}},
+ {m68000_base_device_ops::m68k_op_or_16_er_aw, 0xf1ff, 0x8078, { 12, 12, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_or_16_er_al, 0xf1ff, 0x8079, { 16, 16, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_or_16_er_pcdi, 0xf1ff, 0x807a, { 12, 12, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_or_16_er_pcix, 0xf1ff, 0x807b, { 14, 14, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_or_16_er_i, 0xf1ff, 0x807c, { 8, 8, 4, 4, 4, 4, 2}},
+ {m68000_base_device_ops::m68k_op_or_32_er_aw, 0xf1ff, 0x80b8, { 18, 18, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_or_32_er_al, 0xf1ff, 0x80b9, { 22, 22, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_or_32_er_pcdi, 0xf1ff, 0x80ba, { 18, 18, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_or_32_er_pcix, 0xf1ff, 0x80bb, { 20, 20, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_or_32_er_i, 0xf1ff, 0x80bc, { 16, 14, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_divu_16_aw, 0xf1ff, 0x80f8, {148, 116, 48, 48, 48, 48, 44}},
+ {m68000_base_device_ops::m68k_op_divu_16_al, 0xf1ff, 0x80f9, {152, 120, 48, 48, 48, 48, 44}},
+ {m68000_base_device_ops::m68k_op_divu_16_pcdi, 0xf1ff, 0x80fa, {148, 116, 49, 49, 49, 49, 44}},
+ {m68000_base_device_ops::m68k_op_divu_16_pcix, 0xf1ff, 0x80fb, {150, 118, 51, 51, 51, 51, 44}},
+ {m68000_base_device_ops::m68k_op_divu_16_i, 0xf1ff, 0x80fc, {144, 112, 46, 46, 46, 46, 44}},
+ {m68000_base_device_ops::m68k_op_sbcd_8_mm_ay7, 0xf1ff, 0x810f, { 18, 18, 16, 16, 16, 16, 16}},
+ {m68000_base_device_ops::m68k_op_or_8_re_pi7, 0xf1ff, 0x811f, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_or_8_re_pd7, 0xf1ff, 0x8127, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_or_8_re_aw, 0xf1ff, 0x8138, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_or_8_re_al, 0xf1ff, 0x8139, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_pack_16_mm_ay7, 0xf1ff, 0x814f, {255, 255, 13, 13, 13, 13, 13}},
+ {m68000_base_device_ops::m68k_op_or_16_re_aw, 0xf1ff, 0x8178, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_or_16_re_al, 0xf1ff, 0x8179, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_unpk_16_mm_ay7, 0xf1ff, 0x818f, {255, 255, 13, 13, 13, 13, 13}},
+ {m68000_base_device_ops::m68k_op_or_32_re_aw, 0xf1ff, 0x81b8, { 24, 24, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_or_32_re_al, 0xf1ff, 0x81b9, { 28, 28, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_divs_16_aw, 0xf1ff, 0x81f8, {166, 130, 60, 60, 60, 60, 56}},
+ {m68000_base_device_ops::m68k_op_divs_16_al, 0xf1ff, 0x81f9, {170, 134, 60, 60, 60, 60, 56}},
+ {m68000_base_device_ops::m68k_op_divs_16_pcdi, 0xf1ff, 0x81fa, {166, 130, 61, 61, 61, 61, 56}},
+ {m68000_base_device_ops::m68k_op_divs_16_pcix, 0xf1ff, 0x81fb, {168, 132, 63, 63, 63, 63, 56}},
+ {m68000_base_device_ops::m68k_op_divs_16_i, 0xf1ff, 0x81fc, {162, 126, 58, 58, 58, 58, 56}},
+ {m68000_base_device_ops::m68k_op_sub_8_er_pi7, 0xf1ff, 0x901f, { 8, 8, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_sub_8_er_pd7, 0xf1ff, 0x9027, { 10, 10, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_sub_8_er_aw, 0xf1ff, 0x9038, { 12, 12, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_sub_8_er_al, 0xf1ff, 0x9039, { 16, 16, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_sub_8_er_pcdi, 0xf1ff, 0x903a, { 12, 12, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_sub_8_er_pcix, 0xf1ff, 0x903b, { 14, 14, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_sub_8_er_i, 0xf1ff, 0x903c, { 8, 8, 4, 4, 4, 4, 2}},
+ {m68000_base_device_ops::m68k_op_sub_16_er_aw, 0xf1ff, 0x9078, { 12, 12, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_sub_16_er_al, 0xf1ff, 0x9079, { 16, 16, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_sub_16_er_pcdi, 0xf1ff, 0x907a, { 12, 12, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_sub_16_er_pcix, 0xf1ff, 0x907b, { 14, 14, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_sub_16_er_i, 0xf1ff, 0x907c, { 8, 8, 4, 4, 4, 4, 2}},
+ {m68000_base_device_ops::m68k_op_sub_32_er_aw, 0xf1ff, 0x90b8, { 18, 18, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_sub_32_er_al, 0xf1ff, 0x90b9, { 22, 22, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_sub_32_er_pcdi, 0xf1ff, 0x90ba, { 18, 18, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_sub_32_er_pcix, 0xf1ff, 0x90bb, { 20, 20, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_sub_32_er_i, 0xf1ff, 0x90bc, { 16, 14, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_suba_16_aw, 0xf1ff, 0x90f8, { 16, 16, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_suba_16_al, 0xf1ff, 0x90f9, { 20, 20, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_suba_16_pcdi, 0xf1ff, 0x90fa, { 16, 16, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_suba_16_pcix, 0xf1ff, 0x90fb, { 18, 18, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_suba_16_i, 0xf1ff, 0x90fc, { 12, 12, 4, 4, 4, 4, 2}},
+ {m68000_base_device_ops::m68k_op_subx_8_mm_ay7, 0xf1ff, 0x910f, { 18, 18, 12, 12, 12, 12, 12}},
+ {m68000_base_device_ops::m68k_op_sub_8_re_pi7, 0xf1ff, 0x911f, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_sub_8_re_pd7, 0xf1ff, 0x9127, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_sub_8_re_aw, 0xf1ff, 0x9138, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_sub_8_re_al, 0xf1ff, 0x9139, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_sub_16_re_aw, 0xf1ff, 0x9178, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_sub_16_re_al, 0xf1ff, 0x9179, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_sub_32_re_aw, 0xf1ff, 0x91b8, { 24, 24, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_sub_32_re_al, 0xf1ff, 0x91b9, { 28, 28, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_suba_32_aw, 0xf1ff, 0x91f8, { 18, 18, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_suba_32_al, 0xf1ff, 0x91f9, { 22, 22, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_suba_32_pcdi, 0xf1ff, 0x91fa, { 18, 18, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_suba_32_pcix, 0xf1ff, 0x91fb, { 20, 20, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_suba_32_i, 0xf1ff, 0x91fc, { 16, 14, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_cmp_8_pi7, 0xf1ff, 0xb01f, { 8, 8, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_cmp_8_pd7, 0xf1ff, 0xb027, { 10, 10, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_cmp_8_aw, 0xf1ff, 0xb038, { 12, 12, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_cmp_8_al, 0xf1ff, 0xb039, { 16, 16, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_cmp_8_pcdi, 0xf1ff, 0xb03a, { 12, 12, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_cmp_8_pcix, 0xf1ff, 0xb03b, { 14, 14, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_cmp_8_i, 0xf1ff, 0xb03c, { 8, 8, 4, 4, 4, 4, 2}},
+ {m68000_base_device_ops::m68k_op_cmp_16_aw, 0xf1ff, 0xb078, { 12, 12, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_cmp_16_al, 0xf1ff, 0xb079, { 16, 16, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_cmp_16_pcdi, 0xf1ff, 0xb07a, { 12, 12, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_cmp_16_pcix, 0xf1ff, 0xb07b, { 14, 14, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_cmp_16_i, 0xf1ff, 0xb07c, { 8, 8, 4, 4, 4, 4, 2}},
+ {m68000_base_device_ops::m68k_op_cmp_32_aw, 0xf1ff, 0xb0b8, { 18, 18, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_cmp_32_al, 0xf1ff, 0xb0b9, { 22, 22, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_cmp_32_pcdi, 0xf1ff, 0xb0ba, { 18, 18, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_cmp_32_pcix, 0xf1ff, 0xb0bb, { 20, 20, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_cmp_32_i, 0xf1ff, 0xb0bc, { 14, 14, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_cmpa_16_aw, 0xf1ff, 0xb0f8, { 14, 14, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_cmpa_16_al, 0xf1ff, 0xb0f9, { 18, 18, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_cmpa_16_pcdi, 0xf1ff, 0xb0fa, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_cmpa_16_pcix, 0xf1ff, 0xb0fb, { 16, 16, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_cmpa_16_i, 0xf1ff, 0xb0fc, { 10, 10, 6, 6, 6, 6, 4}},
+ {m68000_base_device_ops::m68k_op_cmpm_8_ay7, 0xf1ff, 0xb10f, { 12, 12, 9, 9, 9, 9, 9}},
+ {m68000_base_device_ops::m68k_op_eor_8_pi7, 0xf1ff, 0xb11f, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_eor_8_pd7, 0xf1ff, 0xb127, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_eor_8_aw, 0xf1ff, 0xb138, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_eor_8_al, 0xf1ff, 0xb139, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_eor_16_aw, 0xf1ff, 0xb178, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_eor_16_al, 0xf1ff, 0xb179, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_eor_32_aw, 0xf1ff, 0xb1b8, { 24, 24, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_eor_32_al, 0xf1ff, 0xb1b9, { 28, 28, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_cmpa_32_aw, 0xf1ff, 0xb1f8, { 18, 18, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_cmpa_32_al, 0xf1ff, 0xb1f9, { 22, 22, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_cmpa_32_pcdi, 0xf1ff, 0xb1fa, { 18, 18, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_cmpa_32_pcix, 0xf1ff, 0xb1fb, { 20, 20, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_cmpa_32_i, 0xf1ff, 0xb1fc, { 14, 14, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_and_8_er_pi7, 0xf1ff, 0xc01f, { 8, 8, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_and_8_er_pd7, 0xf1ff, 0xc027, { 10, 10, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_and_8_er_aw, 0xf1ff, 0xc038, { 12, 12, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_and_8_er_al, 0xf1ff, 0xc039, { 16, 16, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_and_8_er_pcdi, 0xf1ff, 0xc03a, { 12, 12, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_and_8_er_pcix, 0xf1ff, 0xc03b, { 14, 14, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_and_8_er_i, 0xf1ff, 0xc03c, { 8, 8, 4, 4, 4, 4, 2}},
+ {m68000_base_device_ops::m68k_op_and_16_er_aw, 0xf1ff, 0xc078, { 12, 12, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_and_16_er_al, 0xf1ff, 0xc079, { 16, 16, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_and_16_er_pcdi, 0xf1ff, 0xc07a, { 12, 12, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_and_16_er_pcix, 0xf1ff, 0xc07b, { 14, 14, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_and_16_er_i, 0xf1ff, 0xc07c, { 8, 8, 4, 4, 4, 4, 2}},
+ {m68000_base_device_ops::m68k_op_and_32_er_aw, 0xf1ff, 0xc0b8, { 18, 18, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_and_32_er_al, 0xf1ff, 0xc0b9, { 22, 22, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_and_32_er_pcdi, 0xf1ff, 0xc0ba, { 18, 18, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_and_32_er_pcix, 0xf1ff, 0xc0bb, { 20, 20, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_and_32_er_i, 0xf1ff, 0xc0bc, { 16, 14, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_mulu_16_aw, 0xf1ff, 0xc0f8, { 62, 38, 31, 31, 31, 31, 27}},
+ {m68000_base_device_ops::m68k_op_mulu_16_al, 0xf1ff, 0xc0f9, { 66, 42, 31, 31, 31, 31, 27}},
+ {m68000_base_device_ops::m68k_op_mulu_16_pcdi, 0xf1ff, 0xc0fa, { 62, 38, 32, 32, 32, 32, 27}},
+ {m68000_base_device_ops::m68k_op_mulu_16_pcix, 0xf1ff, 0xc0fb, { 64, 40, 34, 34, 34, 34, 27}},
+ {m68000_base_device_ops::m68k_op_mulu_16_i, 0xf1ff, 0xc0fc, { 58, 34, 29, 29, 29, 29, 27}},
+ {m68000_base_device_ops::m68k_op_abcd_8_mm_ay7, 0xf1ff, 0xc10f, { 18, 18, 16, 16, 16, 16, 16}},
+ {m68000_base_device_ops::m68k_op_and_8_re_pi7, 0xf1ff, 0xc11f, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_and_8_re_pd7, 0xf1ff, 0xc127, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_and_8_re_aw, 0xf1ff, 0xc138, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_and_8_re_al, 0xf1ff, 0xc139, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_and_16_re_aw, 0xf1ff, 0xc178, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_and_16_re_al, 0xf1ff, 0xc179, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_and_32_re_aw, 0xf1ff, 0xc1b8, { 24, 24, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_and_32_re_al, 0xf1ff, 0xc1b9, { 28, 28, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_muls_16_aw, 0xf1ff, 0xc1f8, { 62, 40, 31, 31, 31, 31, 27}},
+ {m68000_base_device_ops::m68k_op_muls_16_al, 0xf1ff, 0xc1f9, { 66, 44, 31, 31, 31, 31, 27}},
+ {m68000_base_device_ops::m68k_op_muls_16_pcdi, 0xf1ff, 0xc1fa, { 62, 40, 32, 32, 32, 32, 27}},
+ {m68000_base_device_ops::m68k_op_muls_16_pcix, 0xf1ff, 0xc1fb, { 64, 42, 34, 34, 34, 34, 27}},
+ {m68000_base_device_ops::m68k_op_muls_16_i, 0xf1ff, 0xc1fc, { 58, 36, 29, 29, 29, 29, 27}},
+ {m68000_base_device_ops::m68k_op_add_8_er_pi7, 0xf1ff, 0xd01f, { 8, 8, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_add_8_er_pd7, 0xf1ff, 0xd027, { 10, 10, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_add_8_er_aw, 0xf1ff, 0xd038, { 12, 12, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_add_8_er_al, 0xf1ff, 0xd039, { 16, 16, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_add_8_er_pcdi, 0xf1ff, 0xd03a, { 12, 12, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_add_8_er_pcix, 0xf1ff, 0xd03b, { 14, 14, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_add_8_er_i, 0xf1ff, 0xd03c, { 8, 8, 4, 4, 4, 4, 2}},
+ {m68000_base_device_ops::m68k_op_add_16_er_aw, 0xf1ff, 0xd078, { 12, 12, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_add_16_er_al, 0xf1ff, 0xd079, { 16, 16, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_add_16_er_pcdi, 0xf1ff, 0xd07a, { 12, 12, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_add_16_er_pcix, 0xf1ff, 0xd07b, { 14, 14, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_add_16_er_i, 0xf1ff, 0xd07c, { 8, 8, 4, 4, 4, 4, 2}},
+ {m68000_base_device_ops::m68k_op_add_32_er_aw, 0xf1ff, 0xd0b8, { 18, 18, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_add_32_er_al, 0xf1ff, 0xd0b9, { 22, 22, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_add_32_er_pcdi, 0xf1ff, 0xd0ba, { 18, 18, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_add_32_er_pcix, 0xf1ff, 0xd0bb, { 20, 20, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_add_32_er_i, 0xf1ff, 0xd0bc, { 16, 14, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_adda_16_aw, 0xf1ff, 0xd0f8, { 16, 16, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_adda_16_al, 0xf1ff, 0xd0f9, { 20, 20, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_adda_16_pcdi, 0xf1ff, 0xd0fa, { 16, 16, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_adda_16_pcix, 0xf1ff, 0xd0fb, { 18, 18, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_adda_16_i, 0xf1ff, 0xd0fc, { 12, 12, 4, 4, 4, 4, 2}},
+ {m68000_base_device_ops::m68k_op_addx_8_mm_ay7, 0xf1ff, 0xd10f, { 18, 18, 12, 12, 12, 12, 12}},
+ {m68000_base_device_ops::m68k_op_add_8_re_pi7, 0xf1ff, 0xd11f, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_add_8_re_pd7, 0xf1ff, 0xd127, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_add_8_re_aw, 0xf1ff, 0xd138, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_add_8_re_al, 0xf1ff, 0xd139, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_add_16_re_aw, 0xf1ff, 0xd178, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_add_16_re_al, 0xf1ff, 0xd179, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_add_32_re_aw, 0xf1ff, 0xd1b8, { 24, 24, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_add_32_re_al, 0xf1ff, 0xd1b9, { 28, 28, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_adda_32_aw, 0xf1ff, 0xd1f8, { 18, 18, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_adda_32_al, 0xf1ff, 0xd1f9, { 22, 22, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_adda_32_pcdi, 0xf1ff, 0xd1fa, { 18, 18, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_adda_32_pcix, 0xf1ff, 0xd1fb, { 20, 20, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_adda_32_i, 0xf1ff, 0xd1fc, { 16, 14, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_ori_8_d, 0xfff8, 0x0000, { 8, 8, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_ori_8_ai, 0xfff8, 0x0010, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_ori_8_pi, 0xfff8, 0x0018, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_ori_8_pd, 0xfff8, 0x0020, { 18, 18, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_ori_8_di, 0xfff8, 0x0028, { 20, 20, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_ori_8_ix, 0xfff8, 0x0030, { 22, 22, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_ori_16_d, 0xfff8, 0x0040, { 8, 8, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_ori_16_ai, 0xfff8, 0x0050, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_ori_16_pi, 0xfff8, 0x0058, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_ori_16_pd, 0xfff8, 0x0060, { 18, 18, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_ori_16_di, 0xfff8, 0x0068, { 20, 20, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_ori_16_ix, 0xfff8, 0x0070, { 22, 22, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_ori_32_d, 0xfff8, 0x0080, { 16, 14, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_ori_32_ai, 0xfff8, 0x0090, { 28, 28, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_ori_32_pi, 0xfff8, 0x0098, { 28, 28, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_ori_32_pd, 0xfff8, 0x00a0, { 30, 30, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_ori_32_di, 0xfff8, 0x00a8, { 32, 32, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_ori_32_ix, 0xfff8, 0x00b0, { 34, 34, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_chk2cmp2_8_ai, 0xfff8, 0x00d0, {255, 255, 22, 22, 22, 22, 18}},
+ {m68000_base_device_ops::m68k_op_chk2cmp2_8_di, 0xfff8, 0x00e8, {255, 255, 23, 23, 23, 23, 18}},
+ {m68000_base_device_ops::m68k_op_chk2cmp2_8_ix, 0xfff8, 0x00f0, {255, 255, 25, 25, 25, 25, 18}},
+ {m68000_base_device_ops::m68k_op_andi_8_d, 0xfff8, 0x0200, { 8, 8, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_andi_8_ai, 0xfff8, 0x0210, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_andi_8_pi, 0xfff8, 0x0218, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_andi_8_pd, 0xfff8, 0x0220, { 18, 18, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_andi_8_di, 0xfff8, 0x0228, { 20, 20, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_andi_8_ix, 0xfff8, 0x0230, { 22, 22, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_andi_16_d, 0xfff8, 0x0240, { 8, 8, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_andi_16_ai, 0xfff8, 0x0250, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_andi_16_pi, 0xfff8, 0x0258, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_andi_16_pd, 0xfff8, 0x0260, { 18, 18, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_andi_16_di, 0xfff8, 0x0268, { 20, 20, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_andi_16_ix, 0xfff8, 0x0270, { 22, 22, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_andi_32_d, 0xfff8, 0x0280, { 14, 14, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_andi_32_ai, 0xfff8, 0x0290, { 28, 28, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_andi_32_pi, 0xfff8, 0x0298, { 28, 28, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_andi_32_pd, 0xfff8, 0x02a0, { 30, 30, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_andi_32_di, 0xfff8, 0x02a8, { 32, 32, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_andi_32_ix, 0xfff8, 0x02b0, { 34, 34, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_chk2cmp2_16_ai, 0xfff8, 0x02d0, {255, 255, 22, 22, 22, 22, 18}},
+ {m68000_base_device_ops::m68k_op_chk2cmp2_16_di, 0xfff8, 0x02e8, {255, 255, 23, 23, 23, 23, 18}},
+ {m68000_base_device_ops::m68k_op_chk2cmp2_16_ix, 0xfff8, 0x02f0, {255, 255, 25, 25, 25, 25, 18}},
+ {m68000_base_device_ops::m68k_op_subi_8_d, 0xfff8, 0x0400, { 8, 8, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_subi_8_ai, 0xfff8, 0x0410, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_subi_8_pi, 0xfff8, 0x0418, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_subi_8_pd, 0xfff8, 0x0420, { 18, 18, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_subi_8_di, 0xfff8, 0x0428, { 20, 20, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_subi_8_ix, 0xfff8, 0x0430, { 22, 22, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_subi_16_d, 0xfff8, 0x0440, { 8, 8, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_subi_16_ai, 0xfff8, 0x0450, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_subi_16_pi, 0xfff8, 0x0458, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_subi_16_pd, 0xfff8, 0x0460, { 18, 18, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_subi_16_di, 0xfff8, 0x0468, { 20, 20, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_subi_16_ix, 0xfff8, 0x0470, { 22, 22, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_subi_32_d, 0xfff8, 0x0480, { 16, 14, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_subi_32_ai, 0xfff8, 0x0490, { 28, 28, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_subi_32_pi, 0xfff8, 0x0498, { 28, 28, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_subi_32_pd, 0xfff8, 0x04a0, { 30, 30, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_subi_32_di, 0xfff8, 0x04a8, { 32, 32, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_subi_32_ix, 0xfff8, 0x04b0, { 34, 34, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_chk2cmp2_32_ai, 0xfff8, 0x04d0, {255, 255, 22, 22, 22, 22, 18}},
+ {m68000_base_device_ops::m68k_op_chk2cmp2_32_di, 0xfff8, 0x04e8, {255, 255, 23, 23, 23, 23, 18}},
+ {m68000_base_device_ops::m68k_op_chk2cmp2_32_ix, 0xfff8, 0x04f0, {255, 255, 25, 25, 25, 25, 18}},
+ {m68000_base_device_ops::m68k_op_addi_8_d, 0xfff8, 0x0600, { 8, 8, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_addi_8_ai, 0xfff8, 0x0610, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_addi_8_pi, 0xfff8, 0x0618, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_addi_8_pd, 0xfff8, 0x0620, { 18, 18, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_addi_8_di, 0xfff8, 0x0628, { 20, 20, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_addi_8_ix, 0xfff8, 0x0630, { 22, 22, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_addi_16_d, 0xfff8, 0x0640, { 8, 8, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_addi_16_ai, 0xfff8, 0x0650, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_addi_16_pi, 0xfff8, 0x0658, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_addi_16_pd, 0xfff8, 0x0660, { 18, 18, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_addi_16_di, 0xfff8, 0x0668, { 20, 20, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_addi_16_ix, 0xfff8, 0x0670, { 22, 22, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_addi_32_d, 0xfff8, 0x0680, { 16, 14, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_addi_32_ai, 0xfff8, 0x0690, { 28, 28, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_addi_32_pi, 0xfff8, 0x0698, { 28, 28, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_addi_32_pd, 0xfff8, 0x06a0, { 30, 30, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_addi_32_di, 0xfff8, 0x06a8, { 32, 32, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_addi_32_ix, 0xfff8, 0x06b0, { 34, 34, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_callm_32_ai, 0xfff8, 0x06d0, {255, 255, 64, 64, 64, 64, 60}},
+ {m68000_base_device_ops::m68k_op_callm_32_di, 0xfff8, 0x06e8, {255, 255, 65, 65, 65, 65, 60}},
+ {m68000_base_device_ops::m68k_op_callm_32_ix, 0xfff8, 0x06f0, {255, 255, 67, 67, 67, 67, 60}},
+ {m68000_base_device_ops::m68k_op_btst_32_s_d, 0xfff8, 0x0800, { 10, 10, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_btst_8_s_ai, 0xfff8, 0x0810, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_btst_8_s_pi, 0xfff8, 0x0818, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_btst_8_s_pd, 0xfff8, 0x0820, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_btst_8_s_di, 0xfff8, 0x0828, { 16, 16, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_btst_8_s_ix, 0xfff8, 0x0830, { 18, 18, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_bchg_32_s_d, 0xfff8, 0x0840, { 12, 12, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_bchg_8_s_ai, 0xfff8, 0x0850, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_bchg_8_s_pi, 0xfff8, 0x0858, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_bchg_8_s_pd, 0xfff8, 0x0860, { 18, 18, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_bchg_8_s_di, 0xfff8, 0x0868, { 20, 20, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_bchg_8_s_ix, 0xfff8, 0x0870, { 22, 22, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_bclr_32_s_d, 0xfff8, 0x0880, { 14, 14, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_bclr_8_s_ai, 0xfff8, 0x0890, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_bclr_8_s_pi, 0xfff8, 0x0898, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_bclr_8_s_pd, 0xfff8, 0x08a0, { 18, 18, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_bclr_8_s_di, 0xfff8, 0x08a8, { 20, 20, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_bclr_8_s_ix, 0xfff8, 0x08b0, { 22, 22, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_bset_32_s_d, 0xfff8, 0x08c0, { 12, 12, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_bset_8_s_ai, 0xfff8, 0x08d0, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_bset_8_s_pi, 0xfff8, 0x08d8, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_bset_8_s_pd, 0xfff8, 0x08e0, { 18, 18, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_bset_8_s_di, 0xfff8, 0x08e8, { 20, 20, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_bset_8_s_ix, 0xfff8, 0x08f0, { 22, 22, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_eori_8_d, 0xfff8, 0x0a00, { 8, 8, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_eori_8_ai, 0xfff8, 0x0a10, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_eori_8_pi, 0xfff8, 0x0a18, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_eori_8_pd, 0xfff8, 0x0a20, { 18, 18, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_eori_8_di, 0xfff8, 0x0a28, { 20, 20, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_eori_8_ix, 0xfff8, 0x0a30, { 22, 22, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_eori_16_d, 0xfff8, 0x0a40, { 8, 8, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_eori_16_ai, 0xfff8, 0x0a50, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_eori_16_pi, 0xfff8, 0x0a58, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_eori_16_pd, 0xfff8, 0x0a60, { 18, 18, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_eori_16_di, 0xfff8, 0x0a68, { 20, 20, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_eori_16_ix, 0xfff8, 0x0a70, { 22, 22, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_eori_32_d, 0xfff8, 0x0a80, { 16, 14, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_eori_32_ai, 0xfff8, 0x0a90, { 28, 28, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_eori_32_pi, 0xfff8, 0x0a98, { 28, 28, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_eori_32_pd, 0xfff8, 0x0aa0, { 30, 30, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_eori_32_di, 0xfff8, 0x0aa8, { 32, 32, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_eori_32_ix, 0xfff8, 0x0ab0, { 34, 34, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_cas_8_ai, 0xfff8, 0x0ad0, {255, 255, 16, 16, 16, 16, 12}},
+ {m68000_base_device_ops::m68k_op_cas_8_pi, 0xfff8, 0x0ad8, {255, 255, 16, 16, 16, 16, 12}},
+ {m68000_base_device_ops::m68k_op_cas_8_pd, 0xfff8, 0x0ae0, {255, 255, 17, 17, 17, 17, 12}},
+ {m68000_base_device_ops::m68k_op_cas_8_di, 0xfff8, 0x0ae8, {255, 255, 17, 17, 17, 17, 12}},
+ {m68000_base_device_ops::m68k_op_cas_8_ix, 0xfff8, 0x0af0, {255, 255, 19, 19, 19, 19, 12}},
+ {m68000_base_device_ops::m68k_op_cmpi_8_d, 0xfff8, 0x0c00, { 8, 8, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_cmpi_8_ai, 0xfff8, 0x0c10, { 12, 12, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_cmpi_8_pi, 0xfff8, 0x0c18, { 12, 12, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_cmpi_8_pd, 0xfff8, 0x0c20, { 14, 14, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_cmpi_8_di, 0xfff8, 0x0c28, { 16, 16, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_cmpi_8_ix, 0xfff8, 0x0c30, { 18, 18, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_cmpi_16_d, 0xfff8, 0x0c40, { 8, 8, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_cmpi_16_ai, 0xfff8, 0x0c50, { 12, 12, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_cmpi_16_pi, 0xfff8, 0x0c58, { 12, 12, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_cmpi_16_pd, 0xfff8, 0x0c60, { 14, 14, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_cmpi_16_di, 0xfff8, 0x0c68, { 16, 16, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_cmpi_16_ix, 0xfff8, 0x0c70, { 18, 18, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_cmpi_32_d, 0xfff8, 0x0c80, { 14, 12, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_cmpi_32_ai, 0xfff8, 0x0c90, { 20, 20, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_cmpi_32_pi, 0xfff8, 0x0c98, { 20, 20, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_cmpi_32_pd, 0xfff8, 0x0ca0, { 22, 22, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_cmpi_32_di, 0xfff8, 0x0ca8, { 24, 24, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_cmpi_32_ix, 0xfff8, 0x0cb0, { 26, 26, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_cas_16_ai, 0xfff8, 0x0cd0, {255, 255, 16, 16, 16, 16, 12}},
+ {m68000_base_device_ops::m68k_op_cas_16_pi, 0xfff8, 0x0cd8, {255, 255, 16, 16, 16, 16, 12}},
+ {m68000_base_device_ops::m68k_op_cas_16_pd, 0xfff8, 0x0ce0, {255, 255, 17, 17, 17, 17, 12}},
+ {m68000_base_device_ops::m68k_op_cas_16_di, 0xfff8, 0x0ce8, {255, 255, 17, 17, 17, 17, 12}},
+ {m68000_base_device_ops::m68k_op_cas_16_ix, 0xfff8, 0x0cf0, {255, 255, 19, 19, 19, 19, 12}},
+ {m68000_base_device_ops::m68k_op_moves_8_ai, 0xfff8, 0x0e10, {255, 18, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_moves_8_pi, 0xfff8, 0x0e18, {255, 18, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_moves_8_pd, 0xfff8, 0x0e20, {255, 20, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_moves_8_di, 0xfff8, 0x0e28, {255, 26, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_moves_8_ix, 0xfff8, 0x0e30, {255, 30, 12, 12, 12, 12, 5}},
+ {m68000_base_device_ops::m68k_op_moves_16_ai, 0xfff8, 0x0e50, {255, 18, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_moves_16_pi, 0xfff8, 0x0e58, {255, 18, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_moves_16_pd, 0xfff8, 0x0e60, {255, 20, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_moves_16_di, 0xfff8, 0x0e68, {255, 26, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_moves_16_ix, 0xfff8, 0x0e70, {255, 30, 12, 12, 12, 12, 5}},
+ {m68000_base_device_ops::m68k_op_moves_32_ai, 0xfff8, 0x0e90, {255, 22, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_moves_32_pi, 0xfff8, 0x0e98, {255, 22, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_moves_32_pd, 0xfff8, 0x0ea0, {255, 28, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_moves_32_di, 0xfff8, 0x0ea8, {255, 32, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_moves_32_ix, 0xfff8, 0x0eb0, {255, 36, 12, 12, 12, 12, 5}},
+ {m68000_base_device_ops::m68k_op_cas_32_ai, 0xfff8, 0x0ed0, {255, 255, 16, 16, 16, 16, 12}},
+ {m68000_base_device_ops::m68k_op_cas_32_pi, 0xfff8, 0x0ed8, {255, 255, 16, 16, 16, 16, 12}},
+ {m68000_base_device_ops::m68k_op_cas_32_pd, 0xfff8, 0x0ee0, {255, 255, 17, 17, 17, 17, 12}},
+ {m68000_base_device_ops::m68k_op_cas_32_di, 0xfff8, 0x0ee8, {255, 255, 17, 17, 17, 17, 12}},
+ {m68000_base_device_ops::m68k_op_cas_32_ix, 0xfff8, 0x0ef0, {255, 255, 19, 19, 19, 19, 12}},
+ {m68000_base_device_ops::m68k_op_move_8_aw_d, 0xfff8, 0x11c0, { 12, 12, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_aw_ai, 0xfff8, 0x11d0, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_aw_pi, 0xfff8, 0x11d8, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_aw_pd, 0xfff8, 0x11e0, { 18, 18, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_aw_di, 0xfff8, 0x11e8, { 20, 20, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_aw_ix, 0xfff8, 0x11f0, { 22, 22, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_al_d, 0xfff8, 0x13c0, { 16, 16, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_move_8_al_ai, 0xfff8, 0x13d0, { 20, 20, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_move_8_al_pi, 0xfff8, 0x13d8, { 20, 20, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_move_8_al_pd, 0xfff8, 0x13e0, { 22, 22, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_move_8_al_di, 0xfff8, 0x13e8, { 24, 24, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_move_8_al_ix, 0xfff8, 0x13f0, { 26, 26, 13, 13, 13, 13, 6}},
+ {m68000_base_device_ops::m68k_op_move_8_pi7_d, 0xfff8, 0x1ec0, { 8, 8, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_pi7_ai, 0xfff8, 0x1ed0, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_pi7_pi, 0xfff8, 0x1ed8, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_pi7_pd, 0xfff8, 0x1ee0, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_pi7_di, 0xfff8, 0x1ee8, { 16, 16, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_pi7_ix, 0xfff8, 0x1ef0, { 18, 18, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_pd7_d, 0xfff8, 0x1f00, { 8, 8, 5, 5, 5, 5, 5}},
+ {m68000_base_device_ops::m68k_op_move_8_pd7_ai, 0xfff8, 0x1f10, { 12, 12, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_move_8_pd7_pi, 0xfff8, 0x1f18, { 12, 12, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_move_8_pd7_pd, 0xfff8, 0x1f20, { 14, 14, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_move_8_pd7_di, 0xfff8, 0x1f28, { 16, 16, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_move_8_pd7_ix, 0xfff8, 0x1f30, { 18, 18, 12, 12, 12, 12, 5}},
+ {m68000_base_device_ops::m68k_op_move_32_aw_d, 0xfff8, 0x21c0, { 16, 16, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_move_32_aw_a, 0xfff8, 0x21c8, { 16, 16, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_move_32_aw_ai, 0xfff8, 0x21d0, { 24, 24, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_32_aw_pi, 0xfff8, 0x21d8, { 24, 24, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_32_aw_pd, 0xfff8, 0x21e0, { 26, 26, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_move_32_aw_di, 0xfff8, 0x21e8, { 28, 28, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_move_32_aw_ix, 0xfff8, 0x21f0, { 30, 30, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_move_32_al_d, 0xfff8, 0x23c0, { 20, 20, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_move_32_al_a, 0xfff8, 0x23c8, { 20, 20, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_move_32_al_ai, 0xfff8, 0x23d0, { 28, 28, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_move_32_al_pi, 0xfff8, 0x23d8, { 28, 28, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_move_32_al_pd, 0xfff8, 0x23e0, { 30, 30, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_move_32_al_di, 0xfff8, 0x23e8, { 32, 32, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_move_32_al_ix, 0xfff8, 0x23f0, { 34, 34, 13, 13, 13, 13, 6}},
+ {m68000_base_device_ops::m68k_op_move_16_aw_d, 0xfff8, 0x31c0, { 12, 12, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_aw_a, 0xfff8, 0x31c8, { 12, 12, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_aw_ai, 0xfff8, 0x31d0, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_aw_pi, 0xfff8, 0x31d8, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_aw_pd, 0xfff8, 0x31e0, { 18, 18, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_aw_di, 0xfff8, 0x31e8, { 20, 20, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_aw_ix, 0xfff8, 0x31f0, { 22, 22, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_al_d, 0xfff8, 0x33c0, { 16, 16, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_move_16_al_a, 0xfff8, 0x33c8, { 16, 16, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_move_16_al_ai, 0xfff8, 0x33d0, { 20, 20, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_move_16_al_pi, 0xfff8, 0x33d8, { 20, 20, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_move_16_al_pd, 0xfff8, 0x33e0, { 22, 22, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_move_16_al_di, 0xfff8, 0x33e8, { 24, 24, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_move_16_al_ix, 0xfff8, 0x33f0, { 26, 26, 13, 13, 13, 13, 6}},
+ {m68000_base_device_ops::m68k_op_negx_8_d, 0xfff8, 0x4000, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_negx_8_ai, 0xfff8, 0x4010, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_negx_8_pi, 0xfff8, 0x4018, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_negx_8_pd, 0xfff8, 0x4020, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_negx_8_di, 0xfff8, 0x4028, { 16, 16, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_negx_8_ix, 0xfff8, 0x4030, { 18, 18, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_negx_16_d, 0xfff8, 0x4040, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_negx_16_ai, 0xfff8, 0x4050, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_negx_16_pi, 0xfff8, 0x4058, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_negx_16_pd, 0xfff8, 0x4060, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_negx_16_di, 0xfff8, 0x4068, { 16, 16, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_negx_16_ix, 0xfff8, 0x4070, { 18, 18, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_negx_32_d, 0xfff8, 0x4080, { 6, 6, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_negx_32_ai, 0xfff8, 0x4090, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_negx_32_pi, 0xfff8, 0x4098, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_negx_32_pd, 0xfff8, 0x40a0, { 22, 22, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_negx_32_di, 0xfff8, 0x40a8, { 24, 24, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_negx_32_ix, 0xfff8, 0x40b0, { 26, 26, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_frs_d, 0xfff8, 0x40c0, { 6, 4, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_move_16_frs_ai, 0xfff8, 0x40d0, { 12, 12, 12, 12, 12, 12, 8}},
+ {m68000_base_device_ops::m68k_op_move_16_frs_pi, 0xfff8, 0x40d8, { 12, 12, 12, 12, 12, 12, 8}},
+ {m68000_base_device_ops::m68k_op_move_16_frs_pd, 0xfff8, 0x40e0, { 14, 14, 13, 13, 13, 13, 8}},
+ {m68000_base_device_ops::m68k_op_move_16_frs_di, 0xfff8, 0x40e8, { 16, 16, 13, 13, 13, 13, 8}},
+ {m68000_base_device_ops::m68k_op_move_16_frs_ix, 0xfff8, 0x40f0, { 18, 18, 15, 15, 15, 15, 8}},
+ {m68000_base_device_ops::m68k_op_clr_8_d, 0xfff8, 0x4200, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_clr_8_ai, 0xfff8, 0x4210, { 12, 8, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_clr_8_pi, 0xfff8, 0x4218, { 12, 8, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_clr_8_pd, 0xfff8, 0x4220, { 14, 10, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_clr_8_di, 0xfff8, 0x4228, { 16, 12, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_clr_8_ix, 0xfff8, 0x4230, { 18, 14, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_clr_16_d, 0xfff8, 0x4240, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_clr_16_ai, 0xfff8, 0x4250, { 12, 8, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_clr_16_pi, 0xfff8, 0x4258, { 12, 8, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_clr_16_pd, 0xfff8, 0x4260, { 14, 10, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_clr_16_di, 0xfff8, 0x4268, { 16, 12, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_clr_16_ix, 0xfff8, 0x4270, { 18, 14, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_clr_32_d, 0xfff8, 0x4280, { 6, 6, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_clr_32_ai, 0xfff8, 0x4290, { 20, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_clr_32_pi, 0xfff8, 0x4298, { 20, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_clr_32_pd, 0xfff8, 0x42a0, { 22, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_clr_32_di, 0xfff8, 0x42a8, { 24, 16, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_clr_32_ix, 0xfff8, 0x42b0, { 26, 20, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_frc_d, 0xfff8, 0x42c0, {255, 4, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_frc_ai, 0xfff8, 0x42d0, {255, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_frc_pi, 0xfff8, 0x42d8, {255, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_frc_pd, 0xfff8, 0x42e0, {255, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_frc_di, 0xfff8, 0x42e8, {255, 16, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_frc_ix, 0xfff8, 0x42f0, {255, 18, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_neg_8_d, 0xfff8, 0x4400, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_neg_8_ai, 0xfff8, 0x4410, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_neg_8_pi, 0xfff8, 0x4418, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_neg_8_pd, 0xfff8, 0x4420, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_neg_8_di, 0xfff8, 0x4428, { 16, 16, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_neg_8_ix, 0xfff8, 0x4430, { 18, 18, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_neg_16_d, 0xfff8, 0x4440, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_neg_16_ai, 0xfff8, 0x4450, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_neg_16_pi, 0xfff8, 0x4458, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_neg_16_pd, 0xfff8, 0x4460, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_neg_16_di, 0xfff8, 0x4468, { 16, 16, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_neg_16_ix, 0xfff8, 0x4470, { 18, 18, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_neg_32_d, 0xfff8, 0x4480, { 6, 6, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_neg_32_ai, 0xfff8, 0x4490, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_neg_32_pi, 0xfff8, 0x4498, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_neg_32_pd, 0xfff8, 0x44a0, { 22, 22, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_neg_32_di, 0xfff8, 0x44a8, { 24, 24, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_neg_32_ix, 0xfff8, 0x44b0, { 26, 26, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_toc_d, 0xfff8, 0x44c0, { 12, 12, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_toc_ai, 0xfff8, 0x44d0, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_toc_pi, 0xfff8, 0x44d8, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_toc_pd, 0xfff8, 0x44e0, { 18, 18, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_toc_di, 0xfff8, 0x44e8, { 20, 20, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_toc_ix, 0xfff8, 0x44f0, { 22, 22, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_not_8_d, 0xfff8, 0x4600, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_not_8_ai, 0xfff8, 0x4610, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_not_8_pi, 0xfff8, 0x4618, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_not_8_pd, 0xfff8, 0x4620, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_not_8_di, 0xfff8, 0x4628, { 16, 16, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_not_8_ix, 0xfff8, 0x4630, { 18, 18, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_not_16_d, 0xfff8, 0x4640, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_not_16_ai, 0xfff8, 0x4650, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_not_16_pi, 0xfff8, 0x4658, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_not_16_pd, 0xfff8, 0x4660, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_not_16_di, 0xfff8, 0x4668, { 16, 16, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_not_16_ix, 0xfff8, 0x4670, { 18, 18, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_not_32_d, 0xfff8, 0x4680, { 6, 6, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_not_32_ai, 0xfff8, 0x4690, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_not_32_pi, 0xfff8, 0x4698, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_not_32_pd, 0xfff8, 0x46a0, { 22, 22, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_not_32_di, 0xfff8, 0x46a8, { 24, 24, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_not_32_ix, 0xfff8, 0x46b0, { 26, 26, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_tos_d, 0xfff8, 0x46c0, { 12, 12, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_move_16_tos_ai, 0xfff8, 0x46d0, { 16, 16, 12, 12, 12, 12, 8}},
+ {m68000_base_device_ops::m68k_op_move_16_tos_pi, 0xfff8, 0x46d8, { 16, 16, 12, 12, 12, 12, 8}},
+ {m68000_base_device_ops::m68k_op_move_16_tos_pd, 0xfff8, 0x46e0, { 18, 18, 13, 13, 13, 13, 8}},
+ {m68000_base_device_ops::m68k_op_move_16_tos_di, 0xfff8, 0x46e8, { 20, 20, 13, 13, 13, 13, 8}},
+ {m68000_base_device_ops::m68k_op_move_16_tos_ix, 0xfff8, 0x46f0, { 22, 22, 15, 15, 15, 15, 8}},
+ {m68000_base_device_ops::m68k_op_nbcd_8_d, 0xfff8, 0x4800, { 6, 6, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_link_32, 0xfff8, 0x4808, {255, 255, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_nbcd_8_ai, 0xfff8, 0x4810, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_nbcd_8_pi, 0xfff8, 0x4818, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_nbcd_8_pd, 0xfff8, 0x4820, { 14, 14, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_nbcd_8_di, 0xfff8, 0x4828, { 16, 16, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_nbcd_8_ix, 0xfff8, 0x4830, { 18, 18, 13, 13, 13, 13, 6}},
+ {m68000_base_device_ops::m68k_op_swap_32, 0xfff8, 0x4840, { 4, 4, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_bkpt, 0xfff8, 0x4848, {255, 10, 10, 10, 10, 10, 10}},
+ {m68000_base_device_ops::m68k_op_pea_32_ai, 0xfff8, 0x4850, { 12, 12, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_pea_32_di, 0xfff8, 0x4868, { 16, 16, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_pea_32_ix, 0xfff8, 0x4870, { 20, 20, 12, 12, 12, 12, 5}},
+ {m68000_base_device_ops::m68k_op_ext_16, 0xfff8, 0x4880, { 4, 4, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_movem_16_re_ai, 0xfff8, 0x4890, { 8, 8, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_movem_16_re_pd, 0xfff8, 0x48a0, { 8, 8, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_movem_16_re_di, 0xfff8, 0x48a8, { 12, 12, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_movem_16_re_ix, 0xfff8, 0x48b0, { 14, 14, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_ext_32, 0xfff8, 0x48c0, { 4, 4, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_movem_32_re_ai, 0xfff8, 0x48d0, { 8, 8, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_movem_32_re_pd, 0xfff8, 0x48e0, { 8, 8, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_movem_32_re_di, 0xfff8, 0x48e8, { 12, 12, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_movem_32_re_ix, 0xfff8, 0x48f0, { 14, 14, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_extb_32, 0xfff8, 0x49c0, {255, 255, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_tst_8_d, 0xfff8, 0x4a00, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_tst_8_ai, 0xfff8, 0x4a10, { 8, 8, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_tst_8_pi, 0xfff8, 0x4a18, { 8, 8, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_tst_8_pd, 0xfff8, 0x4a20, { 10, 10, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_tst_8_di, 0xfff8, 0x4a28, { 12, 12, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_tst_8_ix, 0xfff8, 0x4a30, { 14, 14, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_tst_16_d, 0xfff8, 0x4a40, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_tst_16_a, 0xfff8, 0x4a48, {255, 255, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_tst_16_ai, 0xfff8, 0x4a50, { 8, 8, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_tst_16_pi, 0xfff8, 0x4a58, { 8, 8, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_tst_16_pd, 0xfff8, 0x4a60, { 10, 10, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_tst_16_di, 0xfff8, 0x4a68, { 12, 12, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_tst_16_ix, 0xfff8, 0x4a70, { 14, 14, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_tst_32_d, 0xfff8, 0x4a80, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_tst_32_a, 0xfff8, 0x4a88, {255, 255, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_tst_32_ai, 0xfff8, 0x4a90, { 12, 12, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_tst_32_pi, 0xfff8, 0x4a98, { 12, 12, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_tst_32_pd, 0xfff8, 0x4aa0, { 14, 14, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_tst_32_di, 0xfff8, 0x4aa8, { 16, 16, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_tst_32_ix, 0xfff8, 0x4ab0, { 18, 18, 9, 9, 9, 9, 2}},
+ {m68000_base_device_ops::m68k_op_tas_8_d, 0xfff8, 0x4ac0, { 4, 4, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_tas_8_ai, 0xfff8, 0x4ad0, { 18, 18, 16, 16, 16, 16, 12}},
+ {m68000_base_device_ops::m68k_op_tas_8_pi, 0xfff8, 0x4ad8, { 18, 18, 16, 16, 16, 16, 12}},
+ {m68000_base_device_ops::m68k_op_tas_8_pd, 0xfff8, 0x4ae0, { 20, 20, 17, 17, 17, 17, 12}},
+ {m68000_base_device_ops::m68k_op_tas_8_di, 0xfff8, 0x4ae8, { 22, 22, 17, 17, 17, 17, 12}},
+ {m68000_base_device_ops::m68k_op_tas_8_ix, 0xfff8, 0x4af0, { 24, 24, 19, 19, 19, 19, 12}},
+ {m68000_base_device_ops::m68k_op_mull_32_d, 0xfff8, 0x4c00, {255, 255, 43, 43, 43, 43, 43}},
+ {m68000_base_device_ops::m68k_op_mull_32_ai, 0xfff8, 0x4c10, {255, 255, 47, 47, 47, 47, 43}},
+ {m68000_base_device_ops::m68k_op_mull_32_pi, 0xfff8, 0x4c18, {255, 255, 47, 47, 47, 47, 43}},
+ {m68000_base_device_ops::m68k_op_mull_32_pd, 0xfff8, 0x4c20, {255, 255, 48, 48, 48, 48, 43}},
+ {m68000_base_device_ops::m68k_op_mull_32_di, 0xfff8, 0x4c28, {255, 255, 48, 48, 48, 48, 43}},
+ {m68000_base_device_ops::m68k_op_mull_32_ix, 0xfff8, 0x4c30, {255, 255, 50, 50, 50, 50, 43}},
+ {m68000_base_device_ops::m68k_op_divl_32_d, 0xfff8, 0x4c40, {255, 255, 84, 84, 84, 84, 84}},
+ {m68000_base_device_ops::m68k_op_divl_32_ai, 0xfff8, 0x4c50, {255, 255, 88, 88, 88, 88, 84}},
+ {m68000_base_device_ops::m68k_op_divl_32_pi, 0xfff8, 0x4c58, {255, 255, 88, 88, 88, 88, 84}},
+ {m68000_base_device_ops::m68k_op_divl_32_pd, 0xfff8, 0x4c60, {255, 255, 89, 89, 89, 89, 84}},
+ {m68000_base_device_ops::m68k_op_divl_32_di, 0xfff8, 0x4c68, {255, 255, 89, 89, 89, 89, 84}},
+ {m68000_base_device_ops::m68k_op_divl_32_ix, 0xfff8, 0x4c70, {255, 255, 91, 91, 91, 91, 84}},
+ {m68000_base_device_ops::m68k_op_movem_16_er_ai, 0xfff8, 0x4c90, { 12, 12, 12, 12, 12, 12, 8}},
+ {m68000_base_device_ops::m68k_op_movem_16_er_pi, 0xfff8, 0x4c98, { 12, 12, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_movem_16_er_di, 0xfff8, 0x4ca8, { 16, 16, 13, 13, 13, 13, 8}},
+ {m68000_base_device_ops::m68k_op_movem_16_er_ix, 0xfff8, 0x4cb0, { 18, 18, 15, 15, 15, 15, 8}},
+ {m68000_base_device_ops::m68k_op_movem_32_er_ai, 0xfff8, 0x4cd0, { 12, 12, 12, 12, 12, 12, 8}},
+ {m68000_base_device_ops::m68k_op_movem_32_er_pi, 0xfff8, 0x4cd8, { 12, 12, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_movem_32_er_di, 0xfff8, 0x4ce8, { 16, 16, 13, 13, 13, 13, 8}},
+ {m68000_base_device_ops::m68k_op_movem_32_er_ix, 0xfff8, 0x4cf0, { 18, 18, 15, 15, 15, 15, 8}},
+ {m68000_base_device_ops::m68k_op_link_16, 0xfff8, 0x4e50, { 16, 16, 5, 5, 5, 5, 5}},
+ {m68000_base_device_ops::m68k_op_unlk_32, 0xfff8, 0x4e58, { 12, 12, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_move_32_tou, 0xfff8, 0x4e60, { 4, 6, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_move_32_fru, 0xfff8, 0x4e68, { 4, 6, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_jsr_32_ai, 0xfff8, 0x4e90, { 16, 16, 4, 4, 4, 4, 0}},
+ {m68000_base_device_ops::m68k_op_jsr_32_di, 0xfff8, 0x4ea8, { 18, 18, 5, 5, 5, 5, 0}},
+ {m68000_base_device_ops::m68k_op_jsr_32_ix, 0xfff8, 0x4eb0, { 22, 22, 7, 7, 7, 7, 0}},
+ {m68000_base_device_ops::m68k_op_jmp_32_ai, 0xfff8, 0x4ed0, { 8, 8, 4, 4, 4, 4, 0}},
+ {m68000_base_device_ops::m68k_op_jmp_32_di, 0xfff8, 0x4ee8, { 10, 10, 5, 5, 5, 5, 0}},
+ {m68000_base_device_ops::m68k_op_jmp_32_ix, 0xfff8, 0x4ef0, { 14, 14, 7, 7, 7, 7, 0}},
+ {m68000_base_device_ops::m68k_op_st_8_d, 0xfff8, 0x50c0, { 6, 4, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_dbt_16, 0xfff8, 0x50c8, { 12, 12, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_st_8_ai, 0xfff8, 0x50d0, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_st_8_pi, 0xfff8, 0x50d8, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_st_8_pd, 0xfff8, 0x50e0, { 14, 14, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_st_8_di, 0xfff8, 0x50e8, { 16, 16, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_st_8_ix, 0xfff8, 0x50f0, { 18, 18, 13, 13, 13, 13, 6}},
+ {m68000_base_device_ops::m68k_op_sf_8_d, 0xfff8, 0x51c0, { 4, 4, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_dbf_16, 0xfff8, 0x51c8, { 12, 12, 6, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_sf_8_ai, 0xfff8, 0x51d0, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_sf_8_pi, 0xfff8, 0x51d8, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_sf_8_pd, 0xfff8, 0x51e0, { 14, 14, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_sf_8_di, 0xfff8, 0x51e8, { 16, 16, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_sf_8_ix, 0xfff8, 0x51f0, { 18, 18, 13, 13, 13, 13, 6}},
+ {m68000_base_device_ops::m68k_op_shi_8_d, 0xfff8, 0x52c0, { 4, 4, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_dbhi_16, 0xfff8, 0x52c8, { 12, 12, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_shi_8_ai, 0xfff8, 0x52d0, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_shi_8_pi, 0xfff8, 0x52d8, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_shi_8_pd, 0xfff8, 0x52e0, { 14, 14, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_shi_8_di, 0xfff8, 0x52e8, { 16, 16, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_shi_8_ix, 0xfff8, 0x52f0, { 18, 18, 13, 13, 13, 13, 6}},
+ {m68000_base_device_ops::m68k_op_sls_8_d, 0xfff8, 0x53c0, { 4, 4, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_dbls_16, 0xfff8, 0x53c8, { 12, 12, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_sls_8_ai, 0xfff8, 0x53d0, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_sls_8_pi, 0xfff8, 0x53d8, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_sls_8_pd, 0xfff8, 0x53e0, { 14, 14, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_sls_8_di, 0xfff8, 0x53e8, { 16, 16, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_sls_8_ix, 0xfff8, 0x53f0, { 18, 18, 13, 13, 13, 13, 6}},
+ {m68000_base_device_ops::m68k_op_scc_8_d, 0xfff8, 0x54c0, { 4, 4, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_dbcc_16, 0xfff8, 0x54c8, { 12, 12, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_scc_8_ai, 0xfff8, 0x54d0, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_scc_8_pi, 0xfff8, 0x54d8, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_scc_8_pd, 0xfff8, 0x54e0, { 14, 14, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_scc_8_di, 0xfff8, 0x54e8, { 16, 16, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_scc_8_ix, 0xfff8, 0x54f0, { 18, 18, 13, 13, 13, 13, 6}},
+ {m68000_base_device_ops::m68k_op_scs_8_d, 0xfff8, 0x55c0, { 4, 4, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_dbcs_16, 0xfff8, 0x55c8, { 12, 12, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_scs_8_ai, 0xfff8, 0x55d0, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_scs_8_pi, 0xfff8, 0x55d8, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_scs_8_pd, 0xfff8, 0x55e0, { 14, 14, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_scs_8_di, 0xfff8, 0x55e8, { 16, 16, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_scs_8_ix, 0xfff8, 0x55f0, { 18, 18, 13, 13, 13, 13, 6}},
+ {m68000_base_device_ops::m68k_op_sne_8_d, 0xfff8, 0x56c0, { 4, 4, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_dbne_16, 0xfff8, 0x56c8, { 12, 12, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_sne_8_ai, 0xfff8, 0x56d0, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_sne_8_pi, 0xfff8, 0x56d8, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_sne_8_pd, 0xfff8, 0x56e0, { 14, 14, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_sne_8_di, 0xfff8, 0x56e8, { 16, 16, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_sne_8_ix, 0xfff8, 0x56f0, { 18, 18, 13, 13, 13, 13, 6}},
+ {m68000_base_device_ops::m68k_op_seq_8_d, 0xfff8, 0x57c0, { 4, 4, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_dbeq_16, 0xfff8, 0x57c8, { 12, 12, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_seq_8_ai, 0xfff8, 0x57d0, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_seq_8_pi, 0xfff8, 0x57d8, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_seq_8_pd, 0xfff8, 0x57e0, { 14, 14, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_seq_8_di, 0xfff8, 0x57e8, { 16, 16, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_seq_8_ix, 0xfff8, 0x57f0, { 18, 18, 13, 13, 13, 13, 6}},
+ {m68000_base_device_ops::m68k_op_svc_8_d, 0xfff8, 0x58c0, { 4, 4, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_dbvc_16, 0xfff8, 0x58c8, { 12, 12, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_svc_8_ai, 0xfff8, 0x58d0, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_svc_8_pi, 0xfff8, 0x58d8, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_svc_8_pd, 0xfff8, 0x58e0, { 14, 14, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_svc_8_di, 0xfff8, 0x58e8, { 16, 16, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_svc_8_ix, 0xfff8, 0x58f0, { 18, 18, 13, 13, 13, 13, 6}},
+ {m68000_base_device_ops::m68k_op_svs_8_d, 0xfff8, 0x59c0, { 4, 4, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_dbvs_16, 0xfff8, 0x59c8, { 12, 12, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_svs_8_ai, 0xfff8, 0x59d0, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_svs_8_pi, 0xfff8, 0x59d8, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_svs_8_pd, 0xfff8, 0x59e0, { 14, 14, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_svs_8_di, 0xfff8, 0x59e8, { 16, 16, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_svs_8_ix, 0xfff8, 0x59f0, { 18, 18, 13, 13, 13, 13, 6}},
+ {m68000_base_device_ops::m68k_op_spl_8_d, 0xfff8, 0x5ac0, { 4, 4, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_dbpl_16, 0xfff8, 0x5ac8, { 12, 12, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_spl_8_ai, 0xfff8, 0x5ad0, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_spl_8_pi, 0xfff8, 0x5ad8, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_spl_8_pd, 0xfff8, 0x5ae0, { 14, 14, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_spl_8_di, 0xfff8, 0x5ae8, { 16, 16, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_spl_8_ix, 0xfff8, 0x5af0, { 18, 18, 13, 13, 13, 13, 6}},
+ {m68000_base_device_ops::m68k_op_smi_8_d, 0xfff8, 0x5bc0, { 4, 4, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_dbmi_16, 0xfff8, 0x5bc8, { 12, 12, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_smi_8_ai, 0xfff8, 0x5bd0, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_smi_8_pi, 0xfff8, 0x5bd8, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_smi_8_pd, 0xfff8, 0x5be0, { 14, 14, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_smi_8_di, 0xfff8, 0x5be8, { 16, 16, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_smi_8_ix, 0xfff8, 0x5bf0, { 18, 18, 13, 13, 13, 13, 6}},
+ {m68000_base_device_ops::m68k_op_sge_8_d, 0xfff8, 0x5cc0, { 4, 4, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_dbge_16, 0xfff8, 0x5cc8, { 12, 12, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_sge_8_ai, 0xfff8, 0x5cd0, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_sge_8_pi, 0xfff8, 0x5cd8, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_sge_8_pd, 0xfff8, 0x5ce0, { 14, 14, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_sge_8_di, 0xfff8, 0x5ce8, { 16, 16, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_sge_8_ix, 0xfff8, 0x5cf0, { 18, 18, 13, 13, 13, 13, 6}},
+ {m68000_base_device_ops::m68k_op_slt_8_d, 0xfff8, 0x5dc0, { 4, 4, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_dblt_16, 0xfff8, 0x5dc8, { 12, 12, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_slt_8_ai, 0xfff8, 0x5dd0, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_slt_8_pi, 0xfff8, 0x5dd8, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_slt_8_pd, 0xfff8, 0x5de0, { 14, 14, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_slt_8_di, 0xfff8, 0x5de8, { 16, 16, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_slt_8_ix, 0xfff8, 0x5df0, { 18, 18, 13, 13, 13, 13, 6}},
+ {m68000_base_device_ops::m68k_op_sgt_8_d, 0xfff8, 0x5ec0, { 4, 4, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_dbgt_16, 0xfff8, 0x5ec8, { 12, 12, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_sgt_8_ai, 0xfff8, 0x5ed0, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_sgt_8_pi, 0xfff8, 0x5ed8, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_sgt_8_pd, 0xfff8, 0x5ee0, { 14, 14, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_sgt_8_di, 0xfff8, 0x5ee8, { 16, 16, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_sgt_8_ix, 0xfff8, 0x5ef0, { 18, 18, 13, 13, 13, 13, 6}},
+ {m68000_base_device_ops::m68k_op_sle_8_d, 0xfff8, 0x5fc0, { 4, 4, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_dble_16, 0xfff8, 0x5fc8, { 12, 12, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_sle_8_ai, 0xfff8, 0x5fd0, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_sle_8_pi, 0xfff8, 0x5fd8, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_sle_8_pd, 0xfff8, 0x5fe0, { 14, 14, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_sle_8_di, 0xfff8, 0x5fe8, { 16, 16, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_sle_8_ix, 0xfff8, 0x5ff0, { 18, 18, 13, 13, 13, 13, 6}},
+ {m68000_base_device_ops::m68k_op_sbcd_8_mm_ax7, 0xfff8, 0x8f08, { 18, 18, 16, 16, 16, 16, 16}},
+ {m68000_base_device_ops::m68k_op_pack_16_mm_ax7, 0xfff8, 0x8f48, {255, 255, 13, 13, 13, 13, 13}},
+ {m68000_base_device_ops::m68k_op_unpk_16_mm_ax7, 0xfff8, 0x8f88, {255, 255, 13, 13, 13, 13, 13}},
+ {m68000_base_device_ops::m68k_op_subx_8_mm_ax7, 0xfff8, 0x9f08, { 18, 18, 12, 12, 12, 12, 12}},
+ {m68000_base_device_ops::m68k_op_cmpm_8_ax7, 0xfff8, 0xbf08, { 12, 12, 9, 9, 9, 9, 9}},
+ {m68000_base_device_ops::m68k_op_abcd_8_mm_ax7, 0xfff8, 0xcf08, { 18, 18, 16, 16, 16, 16, 16}},
+ {m68000_base_device_ops::m68k_op_addx_8_mm_ax7, 0xfff8, 0xdf08, { 18, 18, 12, 12, 12, 12, 12}},
+ {m68000_base_device_ops::m68k_op_asr_16_ai, 0xfff8, 0xe0d0, { 12, 12, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_asr_16_pi, 0xfff8, 0xe0d8, { 12, 12, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_asr_16_pd, 0xfff8, 0xe0e0, { 14, 14, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_asr_16_di, 0xfff8, 0xe0e8, { 16, 16, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_asr_16_ix, 0xfff8, 0xe0f0, { 18, 18, 12, 12, 12, 12, 5}},
+ {m68000_base_device_ops::m68k_op_asl_16_ai, 0xfff8, 0xe1d0, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_asl_16_pi, 0xfff8, 0xe1d8, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_asl_16_pd, 0xfff8, 0xe1e0, { 14, 14, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_asl_16_di, 0xfff8, 0xe1e8, { 16, 16, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_asl_16_ix, 0xfff8, 0xe1f0, { 18, 18, 13, 13, 13, 13, 6}},
+ {m68000_base_device_ops::m68k_op_lsr_16_ai, 0xfff8, 0xe2d0, { 12, 12, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_lsr_16_pi, 0xfff8, 0xe2d8, { 12, 12, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_lsr_16_pd, 0xfff8, 0xe2e0, { 14, 14, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_lsr_16_di, 0xfff8, 0xe2e8, { 16, 16, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_lsr_16_ix, 0xfff8, 0xe2f0, { 18, 18, 12, 12, 12, 12, 5}},
+ {m68000_base_device_ops::m68k_op_lsl_16_ai, 0xfff8, 0xe3d0, { 12, 12, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_lsl_16_pi, 0xfff8, 0xe3d8, { 12, 12, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_lsl_16_pd, 0xfff8, 0xe3e0, { 14, 14, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_lsl_16_di, 0xfff8, 0xe3e8, { 16, 16, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_lsl_16_ix, 0xfff8, 0xe3f0, { 18, 18, 12, 12, 12, 12, 5}},
+ {m68000_base_device_ops::m68k_op_roxr_16_ai, 0xfff8, 0xe4d0, { 12, 12, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_roxr_16_pi, 0xfff8, 0xe4d8, { 12, 12, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_roxr_16_pd, 0xfff8, 0xe4e0, { 14, 14, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_roxr_16_di, 0xfff8, 0xe4e8, { 16, 16, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_roxr_16_ix, 0xfff8, 0xe4f0, { 18, 18, 12, 12, 12, 12, 5}},
+ {m68000_base_device_ops::m68k_op_roxl_16_ai, 0xfff8, 0xe5d0, { 12, 12, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_roxl_16_pi, 0xfff8, 0xe5d8, { 12, 12, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_roxl_16_pd, 0xfff8, 0xe5e0, { 14, 14, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_roxl_16_di, 0xfff8, 0xe5e8, { 16, 16, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_roxl_16_ix, 0xfff8, 0xe5f0, { 18, 18, 12, 12, 12, 12, 5}},
+ {m68000_base_device_ops::m68k_op_ror_16_ai, 0xfff8, 0xe6d0, { 12, 12, 11, 11, 11, 11, 7}},
+ {m68000_base_device_ops::m68k_op_ror_16_pi, 0xfff8, 0xe6d8, { 12, 12, 11, 11, 11, 11, 7}},
+ {m68000_base_device_ops::m68k_op_ror_16_pd, 0xfff8, 0xe6e0, { 14, 14, 12, 12, 12, 12, 7}},
+ {m68000_base_device_ops::m68k_op_ror_16_di, 0xfff8, 0xe6e8, { 16, 16, 12, 12, 12, 12, 7}},
+ {m68000_base_device_ops::m68k_op_ror_16_ix, 0xfff8, 0xe6f0, { 18, 18, 14, 14, 14, 14, 7}},
+ {m68000_base_device_ops::m68k_op_rol_16_ai, 0xfff8, 0xe7d0, { 12, 12, 11, 11, 11, 11, 7}},
+ {m68000_base_device_ops::m68k_op_rol_16_pi, 0xfff8, 0xe7d8, { 12, 12, 11, 11, 11, 11, 7}},
+ {m68000_base_device_ops::m68k_op_rol_16_pd, 0xfff8, 0xe7e0, { 14, 14, 12, 12, 12, 12, 7}},
+ {m68000_base_device_ops::m68k_op_rol_16_di, 0xfff8, 0xe7e8, { 16, 16, 12, 12, 12, 12, 7}},
+ {m68000_base_device_ops::m68k_op_rol_16_ix, 0xfff8, 0xe7f0, { 18, 18, 14, 14, 14, 14, 7}},
+ {m68000_base_device_ops::m68k_op_bftst_32_d, 0xfff8, 0xe8c0, {255, 255, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_bftst_32_ai, 0xfff8, 0xe8d0, {255, 255, 17, 17, 17, 17, 13}},
+ {m68000_base_device_ops::m68k_op_bftst_32_di, 0xfff8, 0xe8e8, {255, 255, 18, 18, 18, 18, 13}},
+ {m68000_base_device_ops::m68k_op_bftst_32_ix, 0xfff8, 0xe8f0, {255, 255, 20, 20, 20, 20, 13}},
+ {m68000_base_device_ops::m68k_op_bfextu_32_d, 0xfff8, 0xe9c0, {255, 255, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_bfextu_32_ai, 0xfff8, 0xe9d0, {255, 255, 19, 19, 19, 19, 15}},
+ {m68000_base_device_ops::m68k_op_bfextu_32_di, 0xfff8, 0xe9e8, {255, 255, 20, 20, 20, 20, 15}},
+ {m68000_base_device_ops::m68k_op_bfextu_32_ix, 0xfff8, 0xe9f0, {255, 255, 22, 22, 22, 22, 15}},
+ {m68000_base_device_ops::m68k_op_bfchg_32_d, 0xfff8, 0xeac0, {255, 255, 12, 12, 12, 12, 12}},
+ {m68000_base_device_ops::m68k_op_bfchg_32_ai, 0xfff8, 0xead0, {255, 255, 24, 24, 24, 24, 20}},
+ {m68000_base_device_ops::m68k_op_bfchg_32_di, 0xfff8, 0xeae8, {255, 255, 25, 25, 25, 25, 20}},
+ {m68000_base_device_ops::m68k_op_bfchg_32_ix, 0xfff8, 0xeaf0, {255, 255, 27, 27, 27, 27, 20}},
+ {m68000_base_device_ops::m68k_op_bfexts_32_d, 0xfff8, 0xebc0, {255, 255, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_bfexts_32_ai, 0xfff8, 0xebd0, {255, 255, 19, 19, 19, 19, 15}},
+ {m68000_base_device_ops::m68k_op_bfexts_32_di, 0xfff8, 0xebe8, {255, 255, 20, 20, 20, 20, 15}},
+ {m68000_base_device_ops::m68k_op_bfexts_32_ix, 0xfff8, 0xebf0, {255, 255, 22, 22, 22, 22, 15}},
+ {m68000_base_device_ops::m68k_op_bfclr_32_d, 0xfff8, 0xecc0, {255, 255, 12, 12, 12, 12, 12}},
+ {m68000_base_device_ops::m68k_op_bfclr_32_ai, 0xfff8, 0xecd0, {255, 255, 24, 24, 24, 24, 20}},
+ {m68000_base_device_ops::m68k_op_bfclr_32_di, 0xfff8, 0xece8, {255, 255, 25, 25, 25, 25, 20}},
+ {m68000_base_device_ops::m68k_op_bfclr_32_ix, 0xfff8, 0xecf0, {255, 255, 27, 27, 27, 27, 20}},
+ {m68000_base_device_ops::m68k_op_bfffo_32_d, 0xfff8, 0xedc0, {255, 255, 18, 18, 18, 18, 18}},
+ {m68000_base_device_ops::m68k_op_bfffo_32_ai, 0xfff8, 0xedd0, {255, 255, 32, 32, 32, 32, 28}},
+ {m68000_base_device_ops::m68k_op_bfffo_32_di, 0xfff8, 0xede8, {255, 255, 33, 33, 33, 33, 28}},
+ {m68000_base_device_ops::m68k_op_bfffo_32_ix, 0xfff8, 0xedf0, {255, 255, 35, 35, 35, 35, 28}},
+ {m68000_base_device_ops::m68k_op_bfset_32_d, 0xfff8, 0xeec0, {255, 255, 12, 12, 12, 12, 12}},
+ {m68000_base_device_ops::m68k_op_bfset_32_ai, 0xfff8, 0xeed0, {255, 255, 24, 24, 24, 24, 20}},
+ {m68000_base_device_ops::m68k_op_bfset_32_di, 0xfff8, 0xeee8, {255, 255, 25, 25, 25, 25, 20}},
+ {m68000_base_device_ops::m68k_op_bfset_32_ix, 0xfff8, 0xeef0, {255, 255, 27, 27, 27, 27, 20}},
+ {m68000_base_device_ops::m68k_op_bfins_32_d, 0xfff8, 0xefc0, {255, 255, 10, 10, 10, 10, 10}},
+ {m68000_base_device_ops::m68k_op_bfins_32_ai, 0xfff8, 0xefd0, {255, 255, 21, 21, 21, 21, 17}},
+ {m68000_base_device_ops::m68k_op_bfins_32_di, 0xfff8, 0xefe8, {255, 255, 22, 22, 22, 22, 17}},
+ {m68000_base_device_ops::m68k_op_bfins_32_ix, 0xfff8, 0xeff0, {255, 255, 24, 24, 24, 24, 17}},
+ {m68000_base_device_ops::m68k_op_ftrapcc_32, 0xfff8, 0xf278, {255, 255, 4, 4, 255, 255, 255}},
+ {m68000_base_device_ops::m68k_op_pflushan_32, 0xfff8, 0xf510, {255, 255, 255, 255, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_pflusha_32, 0xfff8, 0xf518, {255, 255, 255, 255, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_move16_32, 0xfff8, 0xf620, {255, 255, 255, 255, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_ori_8_pi7, 0xffff, 0x001f, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_ori_8_pd7, 0xffff, 0x0027, { 18, 18, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_ori_8_aw, 0xffff, 0x0038, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_ori_8_al, 0xffff, 0x0039, { 24, 24, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_ori_16_toc, 0xffff, 0x003c, { 20, 16, 12, 12, 12, 12, 12}},
+ {m68000_base_device_ops::m68k_op_ori_16_aw, 0xffff, 0x0078, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_ori_16_al, 0xffff, 0x0079, { 24, 24, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_ori_16_tos, 0xffff, 0x007c, { 20, 16, 12, 12, 12, 12, 12}},
+ {m68000_base_device_ops::m68k_op_ori_32_aw, 0xffff, 0x00b8, { 32, 32, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_ori_32_al, 0xffff, 0x00b9, { 36, 36, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_chk2cmp2_8_aw, 0xffff, 0x00f8, {255, 255, 22, 22, 22, 22, 18}},
+ {m68000_base_device_ops::m68k_op_chk2cmp2_8_al, 0xffff, 0x00f9, {255, 255, 22, 22, 22, 22, 18}},
+ {m68000_base_device_ops::m68k_op_chk2cmp2_8_pcdi, 0xffff, 0x00fa, {255, 255, 23, 23, 23, 23, 23}},
+ {m68000_base_device_ops::m68k_op_chk2cmp2_8_pcix, 0xffff, 0x00fb, {255, 255, 23, 23, 23, 23, 23}},
+ {m68000_base_device_ops::m68k_op_andi_8_pi7, 0xffff, 0x021f, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_andi_8_pd7, 0xffff, 0x0227, { 18, 18, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_andi_8_aw, 0xffff, 0x0238, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_andi_8_al, 0xffff, 0x0239, { 24, 24, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_andi_16_toc, 0xffff, 0x023c, { 20, 16, 12, 12, 12, 12, 12}},
+ {m68000_base_device_ops::m68k_op_andi_16_aw, 0xffff, 0x0278, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_andi_16_al, 0xffff, 0x0279, { 24, 24, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_andi_16_tos, 0xffff, 0x027c, { 20, 16, 12, 12, 12, 12, 12}},
+ {m68000_base_device_ops::m68k_op_andi_32_aw, 0xffff, 0x02b8, { 32, 32, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_andi_32_al, 0xffff, 0x02b9, { 36, 36, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_chk2cmp2_16_aw, 0xffff, 0x02f8, {255, 255, 22, 22, 22, 22, 18}},
+ {m68000_base_device_ops::m68k_op_chk2cmp2_16_al, 0xffff, 0x02f9, {255, 255, 22, 22, 22, 22, 18}},
+ {m68000_base_device_ops::m68k_op_chk2cmp2_16_pcdi, 0xffff, 0x02fa, {255, 255, 23, 23, 23, 23, 23}},
+ {m68000_base_device_ops::m68k_op_chk2cmp2_16_pcix, 0xffff, 0x02fb, {255, 255, 23, 23, 23, 23, 23}},
+ {m68000_base_device_ops::m68k_op_subi_8_pi7, 0xffff, 0x041f, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_subi_8_pd7, 0xffff, 0x0427, { 18, 18, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_subi_8_aw, 0xffff, 0x0438, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_subi_8_al, 0xffff, 0x0439, { 24, 24, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_subi_16_aw, 0xffff, 0x0478, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_subi_16_al, 0xffff, 0x0479, { 24, 24, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_subi_32_aw, 0xffff, 0x04b8, { 32, 32, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_subi_32_al, 0xffff, 0x04b9, { 36, 36, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_chk2cmp2_32_aw, 0xffff, 0x04f8, {255, 255, 22, 22, 22, 22, 18}},
+ {m68000_base_device_ops::m68k_op_chk2cmp2_32_al, 0xffff, 0x04f9, {255, 255, 22, 22, 22, 22, 18}},
+ {m68000_base_device_ops::m68k_op_chk2cmp2_32_pcdi, 0xffff, 0x04fa, {255, 255, 23, 23, 23, 23, 23}},
+ {m68000_base_device_ops::m68k_op_chk2cmp2_32_pcix, 0xffff, 0x04fb, {255, 255, 23, 23, 23, 23, 23}},
+ {m68000_base_device_ops::m68k_op_addi_8_pi7, 0xffff, 0x061f, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_addi_8_pd7, 0xffff, 0x0627, { 18, 18, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_addi_8_aw, 0xffff, 0x0638, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_addi_8_al, 0xffff, 0x0639, { 24, 24, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_addi_16_aw, 0xffff, 0x0678, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_addi_16_al, 0xffff, 0x0679, { 24, 24, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_addi_32_aw, 0xffff, 0x06b8, { 32, 32, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_addi_32_al, 0xffff, 0x06b9, { 36, 36, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_callm_32_aw, 0xffff, 0x06f8, {255, 255, 64, 64, 64, 64, 60}},
+ {m68000_base_device_ops::m68k_op_callm_32_al, 0xffff, 0x06f9, {255, 255, 64, 64, 64, 64, 60}},
+ {m68000_base_device_ops::m68k_op_callm_32_pcdi, 0xffff, 0x06fa, {255, 255, 65, 65, 65, 65, 60}},
+ {m68000_base_device_ops::m68k_op_callm_32_pcix, 0xffff, 0x06fb, {255, 255, 67, 67, 67, 67, 60}},
+ {m68000_base_device_ops::m68k_op_btst_8_s_pi7, 0xffff, 0x081f, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_btst_8_s_pd7, 0xffff, 0x0827, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_btst_8_s_aw, 0xffff, 0x0838, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_btst_8_s_al, 0xffff, 0x0839, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_btst_8_s_pcdi, 0xffff, 0x083a, { 16, 16, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_btst_8_s_pcix, 0xffff, 0x083b, { 18, 18, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_bchg_8_s_pi7, 0xffff, 0x085f, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_bchg_8_s_pd7, 0xffff, 0x0867, { 18, 18, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_bchg_8_s_aw, 0xffff, 0x0878, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_bchg_8_s_al, 0xffff, 0x0879, { 24, 24, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_bclr_8_s_pi7, 0xffff, 0x089f, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_bclr_8_s_pd7, 0xffff, 0x08a7, { 18, 18, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_bclr_8_s_aw, 0xffff, 0x08b8, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_bclr_8_s_al, 0xffff, 0x08b9, { 24, 24, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_bset_8_s_pi7, 0xffff, 0x08df, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_bset_8_s_pd7, 0xffff, 0x08e7, { 18, 18, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_bset_8_s_aw, 0xffff, 0x08f8, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_bset_8_s_al, 0xffff, 0x08f9, { 24, 24, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_eori_8_pi7, 0xffff, 0x0a1f, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_eori_8_pd7, 0xffff, 0x0a27, { 18, 18, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_eori_8_aw, 0xffff, 0x0a38, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_eori_8_al, 0xffff, 0x0a39, { 24, 24, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_eori_16_toc, 0xffff, 0x0a3c, { 20, 16, 12, 12, 12, 12, 12}},
+ {m68000_base_device_ops::m68k_op_eori_16_aw, 0xffff, 0x0a78, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_eori_16_al, 0xffff, 0x0a79, { 24, 24, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_eori_16_tos, 0xffff, 0x0a7c, { 20, 16, 12, 12, 12, 12, 12}},
+ {m68000_base_device_ops::m68k_op_eori_32_aw, 0xffff, 0x0ab8, { 32, 32, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_eori_32_al, 0xffff, 0x0ab9, { 36, 36, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_cas_8_pi7, 0xffff, 0x0adf, {255, 255, 16, 16, 16, 16, 12}},
+ {m68000_base_device_ops::m68k_op_cas_8_pd7, 0xffff, 0x0ae7, {255, 255, 17, 17, 17, 17, 12}},
+ {m68000_base_device_ops::m68k_op_cas_8_aw, 0xffff, 0x0af8, {255, 255, 16, 16, 16, 16, 12}},
+ {m68000_base_device_ops::m68k_op_cas_8_al, 0xffff, 0x0af9, {255, 255, 16, 16, 16, 16, 12}},
+ {m68000_base_device_ops::m68k_op_cmpi_8_pi7, 0xffff, 0x0c1f, { 12, 12, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_cmpi_8_pd7, 0xffff, 0x0c27, { 14, 14, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_cmpi_8_aw, 0xffff, 0x0c38, { 16, 16, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_cmpi_8_al, 0xffff, 0x0c39, { 20, 20, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_cmpi_8_pcdi, 0xffff, 0x0c3a, {255, 255, 7, 7, 7, 7, 7}},
+ {m68000_base_device_ops::m68k_op_cmpi_8_pcix, 0xffff, 0x0c3b, {255, 255, 9, 9, 9, 9, 9}},
+ {m68000_base_device_ops::m68k_op_cmpi_16_aw, 0xffff, 0x0c78, { 16, 16, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_cmpi_16_al, 0xffff, 0x0c79, { 20, 20, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_cmpi_16_pcdi, 0xffff, 0x0c7a, {255, 255, 7, 7, 7, 7, 7}},
+ {m68000_base_device_ops::m68k_op_cmpi_16_pcix, 0xffff, 0x0c7b, {255, 255, 9, 9, 9, 9, 9}},
+ {m68000_base_device_ops::m68k_op_cmpi_32_aw, 0xffff, 0x0cb8, { 24, 24, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_cmpi_32_al, 0xffff, 0x0cb9, { 28, 28, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_cmpi_32_pcdi, 0xffff, 0x0cba, {255, 255, 7, 7, 7, 7, 7}},
+ {m68000_base_device_ops::m68k_op_cmpi_32_pcix, 0xffff, 0x0cbb, {255, 255, 9, 9, 9, 9, 9}},
+ {m68000_base_device_ops::m68k_op_cas_16_aw, 0xffff, 0x0cf8, {255, 255, 16, 16, 16, 16, 12}},
+ {m68000_base_device_ops::m68k_op_cas_16_al, 0xffff, 0x0cf9, {255, 255, 16, 16, 16, 16, 12}},
+ {m68000_base_device_ops::m68k_op_cas2_16, 0xffff, 0x0cfc, {255, 255, 12, 12, 12, 12, 12}},
+ {m68000_base_device_ops::m68k_op_moves_8_pi7, 0xffff, 0x0e1f, {255, 18, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_moves_8_pd7, 0xffff, 0x0e27, {255, 20, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_moves_8_aw, 0xffff, 0x0e38, {255, 26, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_moves_8_al, 0xffff, 0x0e39, {255, 30, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_moves_16_aw, 0xffff, 0x0e78, {255, 26, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_moves_16_al, 0xffff, 0x0e79, {255, 30, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_moves_32_aw, 0xffff, 0x0eb8, {255, 32, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_moves_32_al, 0xffff, 0x0eb9, {255, 36, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_cas_32_aw, 0xffff, 0x0ef8, {255, 255, 16, 16, 16, 16, 12}},
+ {m68000_base_device_ops::m68k_op_cas_32_al, 0xffff, 0x0ef9, {255, 255, 16, 16, 16, 16, 12}},
+ {m68000_base_device_ops::m68k_op_cas2_32, 0xffff, 0x0efc, {255, 255, 12, 12, 12, 12, 12}},
+ {m68000_base_device_ops::m68k_op_move_8_aw_pi7, 0xffff, 0x11df, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_aw_pd7, 0xffff, 0x11e7, { 18, 18, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_aw_aw, 0xffff, 0x11f8, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_aw_al, 0xffff, 0x11f9, { 24, 24, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_aw_pcdi, 0xffff, 0x11fa, { 20, 20, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_aw_pcix, 0xffff, 0x11fb, { 22, 22, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_aw_i, 0xffff, 0x11fc, { 16, 16, 6, 6, 6, 6, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_al_pi7, 0xffff, 0x13df, { 20, 20, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_move_8_al_pd7, 0xffff, 0x13e7, { 22, 22, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_move_8_al_aw, 0xffff, 0x13f8, { 24, 24, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_move_8_al_al, 0xffff, 0x13f9, { 28, 28, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_move_8_al_pcdi, 0xffff, 0x13fa, { 24, 24, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_move_8_al_pcix, 0xffff, 0x13fb, { 26, 26, 13, 13, 13, 13, 6}},
+ {m68000_base_device_ops::m68k_op_move_8_al_i, 0xffff, 0x13fc, { 20, 20, 8, 8, 8, 8, 6}},
+ {m68000_base_device_ops::m68k_op_move_8_pi7_pi7, 0xffff, 0x1edf, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_pi7_pd7, 0xffff, 0x1ee7, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_pi7_aw, 0xffff, 0x1ef8, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_pi7_al, 0xffff, 0x1ef9, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_pi7_pcdi, 0xffff, 0x1efa, { 16, 16, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_pi7_pcix, 0xffff, 0x1efb, { 18, 18, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_pi7_i, 0xffff, 0x1efc, { 12, 12, 6, 6, 6, 6, 4}},
+ {m68000_base_device_ops::m68k_op_move_8_pd7_pi7, 0xffff, 0x1f1f, { 12, 12, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_move_8_pd7_pd7, 0xffff, 0x1f27, { 14, 14, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_move_8_pd7_aw, 0xffff, 0x1f38, { 16, 16, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_move_8_pd7_al, 0xffff, 0x1f39, { 20, 20, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_move_8_pd7_pcdi, 0xffff, 0x1f3a, { 16, 16, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_move_8_pd7_pcix, 0xffff, 0x1f3b, { 18, 18, 12, 12, 12, 12, 5}},
+ {m68000_base_device_ops::m68k_op_move_8_pd7_i, 0xffff, 0x1f3c, { 12, 12, 7, 7, 7, 7, 5}},
+ {m68000_base_device_ops::m68k_op_move_32_aw_aw, 0xffff, 0x21f8, { 28, 28, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_32_aw_al, 0xffff, 0x21f9, { 32, 32, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_32_aw_pcdi, 0xffff, 0x21fa, { 28, 28, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_move_32_aw_pcix, 0xffff, 0x21fb, { 30, 30, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_move_32_aw_i, 0xffff, 0x21fc, { 24, 24, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_32_al_aw, 0xffff, 0x23f8, { 32, 32, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_move_32_al_al, 0xffff, 0x23f9, { 36, 36, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_move_32_al_pcdi, 0xffff, 0x23fa, { 32, 32, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_move_32_al_pcix, 0xffff, 0x23fb, { 34, 34, 13, 13, 13, 13, 6}},
+ {m68000_base_device_ops::m68k_op_move_32_al_i, 0xffff, 0x23fc, { 28, 28, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_move_16_aw_aw, 0xffff, 0x31f8, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_aw_al, 0xffff, 0x31f9, { 24, 24, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_aw_pcdi, 0xffff, 0x31fa, { 20, 20, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_aw_pcix, 0xffff, 0x31fb, { 22, 22, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_aw_i, 0xffff, 0x31fc, { 16, 16, 6, 6, 6, 6, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_al_aw, 0xffff, 0x33f8, { 24, 24, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_move_16_al_al, 0xffff, 0x33f9, { 28, 28, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_move_16_al_pcdi, 0xffff, 0x33fa, { 24, 24, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_move_16_al_pcix, 0xffff, 0x33fb, { 26, 26, 13, 13, 13, 13, 6}},
+ {m68000_base_device_ops::m68k_op_move_16_al_i, 0xffff, 0x33fc, { 20, 20, 8, 8, 8, 8, 6}},
+ {m68000_base_device_ops::m68k_op_negx_8_pi7, 0xffff, 0x401f, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_negx_8_pd7, 0xffff, 0x4027, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_negx_8_aw, 0xffff, 0x4038, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_negx_8_al, 0xffff, 0x4039, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_negx_16_aw, 0xffff, 0x4078, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_negx_16_al, 0xffff, 0x4079, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_negx_32_aw, 0xffff, 0x40b8, { 24, 24, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_negx_32_al, 0xffff, 0x40b9, { 28, 28, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_frs_aw, 0xffff, 0x40f8, { 16, 16, 12, 12, 12, 12, 8}},
+ {m68000_base_device_ops::m68k_op_move_16_frs_al, 0xffff, 0x40f9, { 20, 20, 12, 12, 12, 12, 8}},
+ {m68000_base_device_ops::m68k_op_clr_8_pi7, 0xffff, 0x421f, { 12, 8, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_clr_8_pd7, 0xffff, 0x4227, { 14, 10, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_clr_8_aw, 0xffff, 0x4238, { 16, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_clr_8_al, 0xffff, 0x4239, { 20, 14, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_clr_16_aw, 0xffff, 0x4278, { 16, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_clr_16_al, 0xffff, 0x4279, { 20, 14, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_clr_32_aw, 0xffff, 0x42b8, { 24, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_clr_32_al, 0xffff, 0x42b9, { 28, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_frc_aw, 0xffff, 0x42f8, {255, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_frc_al, 0xffff, 0x42f9, {255, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_neg_8_pi7, 0xffff, 0x441f, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_neg_8_pd7, 0xffff, 0x4427, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_neg_8_aw, 0xffff, 0x4438, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_neg_8_al, 0xffff, 0x4439, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_neg_16_aw, 0xffff, 0x4478, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_neg_16_al, 0xffff, 0x4479, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_neg_32_aw, 0xffff, 0x44b8, { 24, 24, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_neg_32_al, 0xffff, 0x44b9, { 28, 28, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_toc_aw, 0xffff, 0x44f8, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_toc_al, 0xffff, 0x44f9, { 24, 24, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_toc_pcdi, 0xffff, 0x44fa, { 20, 20, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_toc_pcix, 0xffff, 0x44fb, { 22, 22, 11, 11, 11, 11, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_toc_i, 0xffff, 0x44fc, { 16, 16, 6, 6, 6, 6, 4}},
+ {m68000_base_device_ops::m68k_op_not_8_pi7, 0xffff, 0x461f, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_not_8_pd7, 0xffff, 0x4627, { 14, 14, 9, 9, 9, 9, 4}},
+ {m68000_base_device_ops::m68k_op_not_8_aw, 0xffff, 0x4638, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_not_8_al, 0xffff, 0x4639, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_not_16_aw, 0xffff, 0x4678, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_not_16_al, 0xffff, 0x4679, { 20, 20, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_not_32_aw, 0xffff, 0x46b8, { 24, 24, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_not_32_al, 0xffff, 0x46b9, { 28, 28, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_move_16_tos_aw, 0xffff, 0x46f8, { 20, 20, 12, 12, 12, 12, 8}},
+ {m68000_base_device_ops::m68k_op_move_16_tos_al, 0xffff, 0x46f9, { 24, 24, 12, 12, 12, 12, 8}},
+ {m68000_base_device_ops::m68k_op_move_16_tos_pcdi, 0xffff, 0x46fa, { 20, 20, 13, 13, 13, 13, 8}},
+ {m68000_base_device_ops::m68k_op_move_16_tos_pcix, 0xffff, 0x46fb, { 22, 22, 15, 15, 15, 15, 8}},
+ {m68000_base_device_ops::m68k_op_move_16_tos_i, 0xffff, 0x46fc, { 16, 16, 10, 10, 10, 10, 8}},
+ {m68000_base_device_ops::m68k_op_link_32_a7, 0xffff, 0x480f, {255, 255, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_nbcd_8_pi7, 0xffff, 0x481f, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_nbcd_8_pd7, 0xffff, 0x4827, { 14, 14, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_nbcd_8_aw, 0xffff, 0x4838, { 16, 16, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_nbcd_8_al, 0xffff, 0x4839, { 20, 20, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_pea_32_aw, 0xffff, 0x4878, { 16, 16, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_pea_32_al, 0xffff, 0x4879, { 20, 20, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_pea_32_pcdi, 0xffff, 0x487a, { 16, 16, 10, 10, 10, 10, 5}},
+ {m68000_base_device_ops::m68k_op_pea_32_pcix, 0xffff, 0x487b, { 20, 20, 12, 12, 12, 12, 5}},
+ {m68000_base_device_ops::m68k_op_movem_16_re_aw, 0xffff, 0x48b8, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_movem_16_re_al, 0xffff, 0x48b9, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_movem_32_re_aw, 0xffff, 0x48f8, { 12, 12, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_movem_32_re_al, 0xffff, 0x48f9, { 16, 16, 8, 8, 8, 8, 4}},
+ {m68000_base_device_ops::m68k_op_tst_8_pi7, 0xffff, 0x4a1f, { 8, 8, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_tst_8_pd7, 0xffff, 0x4a27, { 10, 10, 7, 7, 7, 7, 2}},
+ {m68000_base_device_ops::m68k_op_tst_8_aw, 0xffff, 0x4a38, { 12, 12, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_tst_8_al, 0xffff, 0x4a39, { 16, 16, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_tst_8_pcdi, 0xffff, 0x4a3a, {255, 255, 7, 7, 7, 7, 7}},
+ {m68000_base_device_ops::m68k_op_tst_8_pcix, 0xffff, 0x4a3b, {255, 255, 9, 9, 9, 9, 9}},
+ {m68000_base_device_ops::m68k_op_tst_8_i, 0xffff, 0x4a3c, {255, 255, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_tst_16_aw, 0xffff, 0x4a78, { 12, 12, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_tst_16_al, 0xffff, 0x4a79, { 16, 16, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_tst_16_pcdi, 0xffff, 0x4a7a, {255, 255, 7, 7, 7, 7, 7}},
+ {m68000_base_device_ops::m68k_op_tst_16_pcix, 0xffff, 0x4a7b, {255, 255, 9, 9, 9, 9, 9}},
+ {m68000_base_device_ops::m68k_op_tst_16_i, 0xffff, 0x4a7c, {255, 255, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_tst_32_aw, 0xffff, 0x4ab8, { 16, 16, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_tst_32_al, 0xffff, 0x4ab9, { 20, 20, 6, 6, 6, 6, 2}},
+ {m68000_base_device_ops::m68k_op_tst_32_pcdi, 0xffff, 0x4aba, {255, 255, 7, 7, 7, 7, 7}},
+ {m68000_base_device_ops::m68k_op_tst_32_pcix, 0xffff, 0x4abb, {255, 255, 9, 9, 9, 9, 9}},
+ {m68000_base_device_ops::m68k_op_tst_32_i, 0xffff, 0x4abc, {255, 255, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_tas_8_pi7, 0xffff, 0x4adf, { 18, 18, 16, 16, 16, 16, 12}},
+ {m68000_base_device_ops::m68k_op_tas_8_pd7, 0xffff, 0x4ae7, { 20, 20, 17, 17, 17, 17, 12}},
+ {m68000_base_device_ops::m68k_op_tas_8_aw, 0xffff, 0x4af8, { 22, 22, 16, 16, 16, 16, 12}},
+ {m68000_base_device_ops::m68k_op_tas_8_al, 0xffff, 0x4af9, { 26, 26, 16, 16, 16, 16, 12}},
+ {m68000_base_device_ops::m68k_op_illegal, 0xffff, 0x4afc, { 4, 4, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_mull_32_aw, 0xffff, 0x4c38, {255, 255, 47, 47, 47, 47, 43}},
+ {m68000_base_device_ops::m68k_op_mull_32_al, 0xffff, 0x4c39, {255, 255, 47, 47, 47, 47, 43}},
+ {m68000_base_device_ops::m68k_op_mull_32_pcdi, 0xffff, 0x4c3a, {255, 255, 48, 48, 48, 48, 43}},
+ {m68000_base_device_ops::m68k_op_mull_32_pcix, 0xffff, 0x4c3b, {255, 255, 50, 50, 50, 50, 43}},
+ {m68000_base_device_ops::m68k_op_mull_32_i, 0xffff, 0x4c3c, {255, 255, 47, 47, 47, 47, 43}},
+ {m68000_base_device_ops::m68k_op_divl_32_aw, 0xffff, 0x4c78, {255, 255, 88, 88, 88, 88, 84}},
+ {m68000_base_device_ops::m68k_op_divl_32_al, 0xffff, 0x4c79, {255, 255, 88, 88, 88, 88, 84}},
+ {m68000_base_device_ops::m68k_op_divl_32_pcdi, 0xffff, 0x4c7a, {255, 255, 89, 89, 89, 89, 84}},
+ {m68000_base_device_ops::m68k_op_divl_32_pcix, 0xffff, 0x4c7b, {255, 255, 91, 91, 91, 91, 84}},
+ {m68000_base_device_ops::m68k_op_divl_32_i, 0xffff, 0x4c7c, {255, 255, 88, 88, 88, 88, 84}},
+ {m68000_base_device_ops::m68k_op_movem_16_er_aw, 0xffff, 0x4cb8, { 16, 16, 12, 12, 12, 12, 8}},
+ {m68000_base_device_ops::m68k_op_movem_16_er_al, 0xffff, 0x4cb9, { 20, 20, 12, 12, 12, 12, 8}},
+ {m68000_base_device_ops::m68k_op_movem_16_er_pcdi, 0xffff, 0x4cba, { 16, 16, 9, 9, 9, 9, 9}},
+ {m68000_base_device_ops::m68k_op_movem_16_er_pcix, 0xffff, 0x4cbb, { 18, 18, 11, 11, 11, 11, 11}},
+ {m68000_base_device_ops::m68k_op_movem_32_er_aw, 0xffff, 0x4cf8, { 16, 16, 12, 12, 12, 12, 8}},
+ {m68000_base_device_ops::m68k_op_movem_32_er_al, 0xffff, 0x4cf9, { 20, 20, 12, 12, 12, 12, 8}},
+ {m68000_base_device_ops::m68k_op_movem_32_er_pcdi, 0xffff, 0x4cfa, { 16, 16, 9, 9, 9, 9, 9}},
+ {m68000_base_device_ops::m68k_op_movem_32_er_pcix, 0xffff, 0x4cfb, { 18, 18, 11, 11, 11, 11, 11}},
+ {m68000_base_device_ops::m68k_op_link_16_a7, 0xffff, 0x4e57, { 16, 16, 5, 5, 5, 5, 5}},
+ {m68000_base_device_ops::m68k_op_unlk_32_a7, 0xffff, 0x4e5f, { 12, 12, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_reset, 0xffff, 0x4e70, { 0, 0, 0, 0, 0, 0, 0}},
+ {m68000_base_device_ops::m68k_op_nop, 0xffff, 0x4e71, { 4, 4, 2, 2, 2, 2, 2}},
+ {m68000_base_device_ops::m68k_op_stop, 0xffff, 0x4e72, { 4, 4, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_rte_32, 0xffff, 0x4e73, { 20, 24, 20, 20, 20, 20, 20}},
+ {m68000_base_device_ops::m68k_op_rtd_32, 0xffff, 0x4e74, {255, 16, 10, 10, 10, 10, 10}},
+ {m68000_base_device_ops::m68k_op_rts_32, 0xffff, 0x4e75, { 16, 16, 10, 10, 10, 10, 10}},
+ {m68000_base_device_ops::m68k_op_trapv, 0xffff, 0x4e76, { 4, 4, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_rtr_32, 0xffff, 0x4e77, { 20, 20, 14, 14, 14, 14, 14}},
+ {m68000_base_device_ops::m68k_op_movec_32_cr, 0xffff, 0x4e7a, {255, 12, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_movec_32_rc, 0xffff, 0x4e7b, {255, 10, 12, 12, 12, 12, 12}},
+ {m68000_base_device_ops::m68k_op_jsr_32_aw, 0xffff, 0x4eb8, { 18, 18, 4, 4, 4, 4, 0}},
+ {m68000_base_device_ops::m68k_op_jsr_32_al, 0xffff, 0x4eb9, { 20, 20, 4, 4, 4, 4, 0}},
+ {m68000_base_device_ops::m68k_op_jsr_32_pcdi, 0xffff, 0x4eba, { 18, 18, 5, 5, 5, 5, 0}},
+ {m68000_base_device_ops::m68k_op_jsr_32_pcix, 0xffff, 0x4ebb, { 22, 22, 7, 7, 7, 7, 0}},
+ {m68000_base_device_ops::m68k_op_jmp_32_aw, 0xffff, 0x4ef8, { 10, 10, 4, 4, 4, 4, 0}},
+ {m68000_base_device_ops::m68k_op_jmp_32_al, 0xffff, 0x4ef9, { 12, 12, 4, 4, 4, 4, 0}},
+ {m68000_base_device_ops::m68k_op_jmp_32_pcdi, 0xffff, 0x4efa, { 10, 10, 5, 5, 5, 5, 0}},
+ {m68000_base_device_ops::m68k_op_jmp_32_pcix, 0xffff, 0x4efb, { 14, 14, 7, 7, 7, 7, 0}},
+ {m68000_base_device_ops::m68k_op_st_8_pi7, 0xffff, 0x50df, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_st_8_pd7, 0xffff, 0x50e7, { 14, 14, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_st_8_aw, 0xffff, 0x50f8, { 16, 16, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_st_8_al, 0xffff, 0x50f9, { 20, 20, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_trapt_16, 0xffff, 0x50fa, {255, 255, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_trapt_32, 0xffff, 0x50fb, {255, 255, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_trapt, 0xffff, 0x50fc, {255, 255, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_sf_8_pi7, 0xffff, 0x51df, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_sf_8_pd7, 0xffff, 0x51e7, { 14, 14, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_sf_8_aw, 0xffff, 0x51f8, { 16, 16, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_sf_8_al, 0xffff, 0x51f9, { 20, 20, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_trapf_16, 0xffff, 0x51fa, {255, 255, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_trapf_32, 0xffff, 0x51fb, {255, 255, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_trapf, 0xffff, 0x51fc, {255, 255, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_shi_8_pi7, 0xffff, 0x52df, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_shi_8_pd7, 0xffff, 0x52e7, { 14, 14, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_shi_8_aw, 0xffff, 0x52f8, { 16, 16, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_shi_8_al, 0xffff, 0x52f9, { 20, 20, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_traphi_16, 0xffff, 0x52fa, {255, 255, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_traphi_32, 0xffff, 0x52fb, {255, 255, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_traphi, 0xffff, 0x52fc, {255, 255, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_sls_8_pi7, 0xffff, 0x53df, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_sls_8_pd7, 0xffff, 0x53e7, { 14, 14, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_sls_8_aw, 0xffff, 0x53f8, { 16, 16, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_sls_8_al, 0xffff, 0x53f9, { 20, 20, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_trapls_16, 0xffff, 0x53fa, {255, 255, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_trapls_32, 0xffff, 0x53fb, {255, 255, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_trapls, 0xffff, 0x53fc, {255, 255, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_scc_8_pi7, 0xffff, 0x54df, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_scc_8_pd7, 0xffff, 0x54e7, { 14, 14, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_scc_8_aw, 0xffff, 0x54f8, { 16, 16, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_scc_8_al, 0xffff, 0x54f9, { 20, 20, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_trapcc_16, 0xffff, 0x54fa, {255, 255, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_trapcc_32, 0xffff, 0x54fb, {255, 255, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_trapcc, 0xffff, 0x54fc, {255, 255, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_scs_8_pi7, 0xffff, 0x55df, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_scs_8_pd7, 0xffff, 0x55e7, { 14, 14, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_scs_8_aw, 0xffff, 0x55f8, { 16, 16, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_scs_8_al, 0xffff, 0x55f9, { 20, 20, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_trapcs_16, 0xffff, 0x55fa, {255, 255, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_trapcs_32, 0xffff, 0x55fb, {255, 255, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_trapcs, 0xffff, 0x55fc, {255, 255, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_sne_8_pi7, 0xffff, 0x56df, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_sne_8_pd7, 0xffff, 0x56e7, { 14, 14, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_sne_8_aw, 0xffff, 0x56f8, { 16, 16, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_sne_8_al, 0xffff, 0x56f9, { 20, 20, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_trapne_16, 0xffff, 0x56fa, {255, 255, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_trapne_32, 0xffff, 0x56fb, {255, 255, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_trapne, 0xffff, 0x56fc, {255, 255, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_seq_8_pi7, 0xffff, 0x57df, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_seq_8_pd7, 0xffff, 0x57e7, { 14, 14, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_seq_8_aw, 0xffff, 0x57f8, { 16, 16, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_seq_8_al, 0xffff, 0x57f9, { 20, 20, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_trapeq_16, 0xffff, 0x57fa, {255, 255, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_trapeq_32, 0xffff, 0x57fb, {255, 255, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_trapeq, 0xffff, 0x57fc, {255, 255, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_svc_8_pi7, 0xffff, 0x58df, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_svc_8_pd7, 0xffff, 0x58e7, { 14, 14, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_svc_8_aw, 0xffff, 0x58f8, { 16, 16, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_svc_8_al, 0xffff, 0x58f9, { 20, 20, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_trapvc_16, 0xffff, 0x58fa, {255, 255, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_trapvc_32, 0xffff, 0x58fb, {255, 255, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_trapvc, 0xffff, 0x58fc, {255, 255, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_svs_8_pi7, 0xffff, 0x59df, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_svs_8_pd7, 0xffff, 0x59e7, { 14, 14, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_svs_8_aw, 0xffff, 0x59f8, { 16, 16, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_svs_8_al, 0xffff, 0x59f9, { 20, 20, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_trapvs_16, 0xffff, 0x59fa, {255, 255, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_trapvs_32, 0xffff, 0x59fb, {255, 255, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_trapvs, 0xffff, 0x59fc, {255, 255, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_spl_8_pi7, 0xffff, 0x5adf, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_spl_8_pd7, 0xffff, 0x5ae7, { 14, 14, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_spl_8_aw, 0xffff, 0x5af8, { 16, 16, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_spl_8_al, 0xffff, 0x5af9, { 20, 20, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_trappl_16, 0xffff, 0x5afa, {255, 255, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_trappl_32, 0xffff, 0x5afb, {255, 255, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_trappl, 0xffff, 0x5afc, {255, 255, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_smi_8_pi7, 0xffff, 0x5bdf, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_smi_8_pd7, 0xffff, 0x5be7, { 14, 14, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_smi_8_aw, 0xffff, 0x5bf8, { 16, 16, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_smi_8_al, 0xffff, 0x5bf9, { 20, 20, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_trapmi_16, 0xffff, 0x5bfa, {255, 255, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_trapmi_32, 0xffff, 0x5bfb, {255, 255, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_trapmi, 0xffff, 0x5bfc, {255, 255, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_sge_8_pi7, 0xffff, 0x5cdf, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_sge_8_pd7, 0xffff, 0x5ce7, { 14, 14, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_sge_8_aw, 0xffff, 0x5cf8, { 16, 16, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_sge_8_al, 0xffff, 0x5cf9, { 20, 20, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_trapge_16, 0xffff, 0x5cfa, {255, 255, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_trapge_32, 0xffff, 0x5cfb, {255, 255, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_trapge, 0xffff, 0x5cfc, {255, 255, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_slt_8_pi7, 0xffff, 0x5ddf, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_slt_8_pd7, 0xffff, 0x5de7, { 14, 14, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_slt_8_aw, 0xffff, 0x5df8, { 16, 16, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_slt_8_al, 0xffff, 0x5df9, { 20, 20, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_traplt_16, 0xffff, 0x5dfa, {255, 255, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_traplt_32, 0xffff, 0x5dfb, {255, 255, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_traplt, 0xffff, 0x5dfc, {255, 255, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_sgt_8_pi7, 0xffff, 0x5edf, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_sgt_8_pd7, 0xffff, 0x5ee7, { 14, 14, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_sgt_8_aw, 0xffff, 0x5ef8, { 16, 16, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_sgt_8_al, 0xffff, 0x5ef9, { 20, 20, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_trapgt_16, 0xffff, 0x5efa, {255, 255, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_trapgt_32, 0xffff, 0x5efb, {255, 255, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_trapgt, 0xffff, 0x5efc, {255, 255, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_sle_8_pi7, 0xffff, 0x5fdf, { 12, 12, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_sle_8_pd7, 0xffff, 0x5fe7, { 14, 14, 11, 11, 11, 11, 6}},
+ {m68000_base_device_ops::m68k_op_sle_8_aw, 0xffff, 0x5ff8, { 16, 16, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_sle_8_al, 0xffff, 0x5ff9, { 20, 20, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_traple_16, 0xffff, 0x5ffa, {255, 255, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_traple_32, 0xffff, 0x5ffb, {255, 255, 8, 8, 8, 8, 8}},
+ {m68000_base_device_ops::m68k_op_traple, 0xffff, 0x5ffc, {255, 255, 4, 4, 4, 4, 4}},
+ {m68000_base_device_ops::m68k_op_bra_16, 0xffff, 0x6000, { 10, 10, 10, 10, 10, 10, 10}},
+ {m68000_base_device_ops::m68k_op_bra_32, 0xffff, 0x60ff, { 10, 10, 10, 10, 10, 10, 10}},
+ {m68000_base_device_ops::m68k_op_bsr_16, 0xffff, 0x6100, { 18, 18, 7, 7, 7, 7, 7}},
+ {m68000_base_device_ops::m68k_op_bsr_32, 0xffff, 0x61ff, { 18, 18, 7, 7, 7, 7, 7}},
+ {m68000_base_device_ops::m68k_op_bhi_16, 0xffff, 0x6200, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_bhi_32, 0xffff, 0x62ff, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_bls_16, 0xffff, 0x6300, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_bls_32, 0xffff, 0x63ff, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_bcc_16, 0xffff, 0x6400, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_bcc_32, 0xffff, 0x64ff, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_bcs_16, 0xffff, 0x6500, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_bcs_32, 0xffff, 0x65ff, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_bne_16, 0xffff, 0x6600, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_bne_32, 0xffff, 0x66ff, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_beq_16, 0xffff, 0x6700, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_beq_32, 0xffff, 0x67ff, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_bvc_16, 0xffff, 0x6800, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_bvc_32, 0xffff, 0x68ff, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_bvs_16, 0xffff, 0x6900, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_bvs_32, 0xffff, 0x69ff, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_bpl_16, 0xffff, 0x6a00, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_bpl_32, 0xffff, 0x6aff, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_bmi_16, 0xffff, 0x6b00, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_bmi_32, 0xffff, 0x6bff, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_bge_16, 0xffff, 0x6c00, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_bge_32, 0xffff, 0x6cff, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_blt_16, 0xffff, 0x6d00, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_blt_32, 0xffff, 0x6dff, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_bgt_16, 0xffff, 0x6e00, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_bgt_32, 0xffff, 0x6eff, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_ble_16, 0xffff, 0x6f00, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_ble_32, 0xffff, 0x6fff, { 10, 10, 6, 6, 6, 6, 6}},
+ {m68000_base_device_ops::m68k_op_sbcd_8_mm_axy7, 0xffff, 0x8f0f, { 18, 18, 16, 16, 16, 16, 16}},
+ {m68000_base_device_ops::m68k_op_pack_16_mm_axy7, 0xffff, 0x8f4f, {255, 255, 13, 13, 13, 13, 13}},
+ {m68000_base_device_ops::m68k_op_unpk_16_mm_axy7, 0xffff, 0x8f8f, {255, 255, 13, 13, 13, 13, 13}},
+ {m68000_base_device_ops::m68k_op_subx_8_mm_axy7, 0xffff, 0x9f0f, { 18, 18, 12, 12, 12, 12, 12}},
+ {m68000_base_device_ops::m68k_op_cmpm_8_axy7, 0xffff, 0xbf0f, { 12, 12, 9, 9, 9, 9, 9}},
+ {m68000_base_device_ops::m68k_op_abcd_8_mm_axy7, 0xffff, 0xcf0f, { 18, 18, 16, 16, 16, 16, 16}},
+ {m68000_base_device_ops::m68k_op_addx_8_mm_axy7, 0xffff, 0xdf0f, { 18, 18, 12, 12, 12, 12, 12}},
+ {m68000_base_device_ops::m68k_op_asr_16_aw, 0xffff, 0xe0f8, { 16, 16, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_asr_16_al, 0xffff, 0xe0f9, { 20, 20, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_asl_16_aw, 0xffff, 0xe1f8, { 16, 16, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_asl_16_al, 0xffff, 0xe1f9, { 20, 20, 10, 10, 10, 10, 6}},
+ {m68000_base_device_ops::m68k_op_lsr_16_aw, 0xffff, 0xe2f8, { 16, 16, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_lsr_16_al, 0xffff, 0xe2f9, { 20, 20, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_lsl_16_aw, 0xffff, 0xe3f8, { 16, 16, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_lsl_16_al, 0xffff, 0xe3f9, { 20, 20, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_roxr_16_aw, 0xffff, 0xe4f8, { 16, 16, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_roxr_16_al, 0xffff, 0xe4f9, { 20, 20, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_roxl_16_aw, 0xffff, 0xe5f8, { 16, 16, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_roxl_16_al, 0xffff, 0xe5f9, { 20, 20, 9, 9, 9, 9, 5}},
+ {m68000_base_device_ops::m68k_op_ror_16_aw, 0xffff, 0xe6f8, { 16, 16, 11, 11, 11, 11, 7}},
+ {m68000_base_device_ops::m68k_op_ror_16_al, 0xffff, 0xe6f9, { 20, 20, 11, 11, 11, 11, 7}},
+ {m68000_base_device_ops::m68k_op_rol_16_aw, 0xffff, 0xe7f8, { 16, 16, 11, 11, 11, 11, 7}},
+ {m68000_base_device_ops::m68k_op_rol_16_al, 0xffff, 0xe7f9, { 20, 20, 11, 11, 11, 11, 7}},
+ {m68000_base_device_ops::m68k_op_bftst_32_aw, 0xffff, 0xe8f8, {255, 255, 17, 17, 17, 17, 13}},
+ {m68000_base_device_ops::m68k_op_bftst_32_al, 0xffff, 0xe8f9, {255, 255, 17, 17, 17, 17, 13}},
+ {m68000_base_device_ops::m68k_op_bftst_32_pcdi, 0xffff, 0xe8fa, {255, 255, 18, 18, 18, 18, 13}},
+ {m68000_base_device_ops::m68k_op_bftst_32_pcix, 0xffff, 0xe8fb, {255, 255, 20, 20, 20, 20, 13}},
+ {m68000_base_device_ops::m68k_op_bfextu_32_aw, 0xffff, 0xe9f8, {255, 255, 19, 19, 19, 19, 15}},
+ {m68000_base_device_ops::m68k_op_bfextu_32_al, 0xffff, 0xe9f9, {255, 255, 19, 19, 19, 19, 15}},
+ {m68000_base_device_ops::m68k_op_bfextu_32_pcdi, 0xffff, 0xe9fa, {255, 255, 20, 20, 20, 20, 15}},
+ {m68000_base_device_ops::m68k_op_bfextu_32_pcix, 0xffff, 0xe9fb, {255, 255, 22, 22, 22, 22, 15}},
+ {m68000_base_device_ops::m68k_op_bfchg_32_aw, 0xffff, 0xeaf8, {255, 255, 24, 24, 24, 24, 20}},
+ {m68000_base_device_ops::m68k_op_bfchg_32_al, 0xffff, 0xeaf9, {255, 255, 24, 24, 24, 24, 20}},
+ {m68000_base_device_ops::m68k_op_bfexts_32_aw, 0xffff, 0xebf8, {255, 255, 19, 19, 19, 19, 15}},
+ {m68000_base_device_ops::m68k_op_bfexts_32_al, 0xffff, 0xebf9, {255, 255, 19, 19, 19, 19, 15}},
+ {m68000_base_device_ops::m68k_op_bfexts_32_pcdi, 0xffff, 0xebfa, {255, 255, 20, 20, 20, 20, 15}},
+ {m68000_base_device_ops::m68k_op_bfexts_32_pcix, 0xffff, 0xebfb, {255, 255, 22, 22, 22, 22, 15}},
+ {m68000_base_device_ops::m68k_op_bfclr_32_aw, 0xffff, 0xecf8, {255, 255, 24, 24, 24, 24, 20}},
+ {m68000_base_device_ops::m68k_op_bfclr_32_al, 0xffff, 0xecf9, {255, 255, 24, 24, 24, 24, 20}},
+ {m68000_base_device_ops::m68k_op_bfffo_32_aw, 0xffff, 0xedf8, {255, 255, 32, 32, 32, 32, 28}},
+ {m68000_base_device_ops::m68k_op_bfffo_32_al, 0xffff, 0xedf9, {255, 255, 32, 32, 32, 32, 28}},
+ {m68000_base_device_ops::m68k_op_bfffo_32_pcdi, 0xffff, 0xedfa, {255, 255, 33, 33, 33, 33, 28}},
+ {m68000_base_device_ops::m68k_op_bfffo_32_pcix, 0xffff, 0xedfb, {255, 255, 35, 35, 35, 35, 28}},
+ {m68000_base_device_ops::m68k_op_bfset_32_aw, 0xffff, 0xeef8, {255, 255, 24, 24, 24, 24, 20}},
+ {m68000_base_device_ops::m68k_op_bfset_32_al, 0xffff, 0xeef9, {255, 255, 24, 24, 24, 24, 20}},
+ {m68000_base_device_ops::m68k_op_bfins_32_aw, 0xffff, 0xeff8, {255, 255, 21, 21, 21, 21, 17}},
+ {m68000_base_device_ops::m68k_op_bfins_32_al, 0xffff, 0xeff9, {255, 255, 21, 21, 21, 21, 17}},
+ {nullptr, 0, 0, {0, 0, 0, 0, 0}}
+};
+
+
+/* Build the opcode handler jump table */
+
+static void m68ki_set_one(unsigned short opcode, const opcode_handler_struct *s)
+{
+ for(int i=0; i<NUM_CPU_TYPES; i++)
+ if(s->cycles[i] != 0xff) {
+ m68ki_cycles[i][opcode] = s->cycles[i];
+ m68ki_instruction_jump_table[i][opcode] = s->opcode_handler;
+ }
+}
+
+void m68ki_build_opcode_table(void)
+{
+ const opcode_handler_struct *ostruct;
+ int i;
+ int j;
+ int k;
+
+ for(i = 0; i < 0x10000; i++)
+ {
+ /* default to illegal */
+ for(k=0;k<NUM_CPU_TYPES;k++)
+ {
+ m68ki_instruction_jump_table[k][i] = m68000_base_device_ops::m68k_op_illegal;
+ m68ki_cycles[k][i] = 0;
+ }
+ }
+
+ ostruct = m68k_opcode_handler_table;
+ while(ostruct->mask != 0xff00)
+ {
+ for(i = 0;i < 0x10000;i++)
+ {
+ if((i & ostruct->mask) == ostruct->match)
+ m68ki_set_one(i, ostruct);
+ }
+ ostruct++;
+ }
+ while(ostruct->mask == 0xff00)
+ {
+ for(i = 0;i <= 0xff;i++)
+ m68ki_set_one(ostruct->match | i, ostruct);
+ ostruct++;
+ }
+ while(ostruct->mask == 0xff20)
+ {
+ for(i = 0;i < 4;i++)
+ {
+ for(j = 0;j < 32;j++)
+ {
+ m68ki_set_one(ostruct->match | (i << 6) | j, ostruct);
+ }
+ }
+ ostruct++;
+ }
+ while(ostruct->mask == 0xf1f8)
+ {
+ for(i = 0;i < 8;i++)
+ {
+ for(j = 0;j < 8;j++)
+ m68ki_set_one(ostruct->match | (i << 9) | j, ostruct);
+ }
+ ostruct++;
+ }
+ while(ostruct->mask == 0xffd8)
+ {
+ for(i = 0;i < 2;i++)
+ {
+ for(j = 0;j < 8;j++)
+ {
+ m68ki_set_one(ostruct->match | (i << 5) | j, ostruct);
+ }
+ }
+ ostruct++;
+ }
+ while(ostruct->mask == 0xfff0)
+ {
+ for(i = 0;i <= 0x0f;i++)
+ m68ki_set_one(ostruct->match | i, ostruct);
+ ostruct++;
+ }
+ while(ostruct->mask == 0xf1ff)
+ {
+ for(i = 0;i <= 0x07;i++)
+ m68ki_set_one(ostruct->match | (i << 9), ostruct);
+ ostruct++;
+ }
+ while(ostruct->mask == 0xfff8)
+ {
+ for(i = 0;i <= 0x07;i++)
+ m68ki_set_one(ostruct->match | i, ostruct);
+ ostruct++;
+ }
+ while(ostruct->mask == 0xffff)
+ {
+ m68ki_set_one(ostruct->match, ostruct);
+ ostruct++;
+ }
+
+ // if we fell all the way through with a non-zero mask, the opcode table wasn't built properly
+ if (ostruct->mask != 0)
+ {
+ fatalerror("m68ki_build_opcode_table: unhandled opcode mask %x (match %x), m68k core will not function!\n", ostruct->mask, ostruct->match);
+ }
+}
+
+
+/* ======================================================================== */
+/* ============================== END OF FILE ============================= */
+/* ======================================================================== */
diff --git a/src/devices/cpu/m68000/m68kops.h b/src/devices/cpu/m68000/m68kops.h
new file mode 100644
index 00000000000..3f936f646f2
--- /dev/null
+++ b/src/devices/cpu/m68000/m68kops.h
@@ -0,0 +1,1995 @@
+// license:BSD-3-Clause
+// copyright-holders:Karl Stenerud
+/* ======================================================================== */
+/* ============================ OPCODE HANDLERS =========================== */
+/* ======================================================================== */
+
+
+#ifdef OPCODE_PROTOTYPES
+
+static void m68k_op_1010(m68000_base_device* mc68kcpu);
+static void m68k_op_1111(m68000_base_device* mc68kcpu);
+static void m68k_op_040fpu0_32(m68000_base_device* mc68kcpu);
+static void m68k_op_040fpu1_32(m68000_base_device* mc68kcpu);
+static void m68k_op_abcd_8_rr(m68000_base_device* mc68kcpu);
+static void m68k_op_abcd_8_mm_ax7(m68000_base_device* mc68kcpu);
+static void m68k_op_abcd_8_mm_ay7(m68000_base_device* mc68kcpu);
+static void m68k_op_abcd_8_mm_axy7(m68000_base_device* mc68kcpu);
+static void m68k_op_abcd_8_mm(m68000_base_device* mc68kcpu);
+static void m68k_op_add_8_er_d(m68000_base_device* mc68kcpu);
+static void m68k_op_add_8_er_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_add_8_er_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_add_8_er_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_add_8_er_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_add_8_er_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_add_8_er_di(m68000_base_device* mc68kcpu);
+static void m68k_op_add_8_er_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_add_8_er_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_add_8_er_al(m68000_base_device* mc68kcpu);
+static void m68k_op_add_8_er_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_add_8_er_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_add_8_er_i(m68000_base_device* mc68kcpu);
+static void m68k_op_add_16_er_d(m68000_base_device* mc68kcpu);
+static void m68k_op_add_16_er_a(m68000_base_device* mc68kcpu);
+static void m68k_op_add_16_er_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_add_16_er_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_add_16_er_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_add_16_er_di(m68000_base_device* mc68kcpu);
+static void m68k_op_add_16_er_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_add_16_er_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_add_16_er_al(m68000_base_device* mc68kcpu);
+static void m68k_op_add_16_er_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_add_16_er_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_add_16_er_i(m68000_base_device* mc68kcpu);
+static void m68k_op_add_32_er_d(m68000_base_device* mc68kcpu);
+static void m68k_op_add_32_er_a(m68000_base_device* mc68kcpu);
+static void m68k_op_add_32_er_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_add_32_er_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_add_32_er_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_add_32_er_di(m68000_base_device* mc68kcpu);
+static void m68k_op_add_32_er_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_add_32_er_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_add_32_er_al(m68000_base_device* mc68kcpu);
+static void m68k_op_add_32_er_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_add_32_er_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_add_32_er_i(m68000_base_device* mc68kcpu);
+static void m68k_op_add_8_re_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_add_8_re_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_add_8_re_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_add_8_re_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_add_8_re_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_add_8_re_di(m68000_base_device* mc68kcpu);
+static void m68k_op_add_8_re_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_add_8_re_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_add_8_re_al(m68000_base_device* mc68kcpu);
+static void m68k_op_add_16_re_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_add_16_re_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_add_16_re_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_add_16_re_di(m68000_base_device* mc68kcpu);
+static void m68k_op_add_16_re_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_add_16_re_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_add_16_re_al(m68000_base_device* mc68kcpu);
+static void m68k_op_add_32_re_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_add_32_re_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_add_32_re_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_add_32_re_di(m68000_base_device* mc68kcpu);
+static void m68k_op_add_32_re_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_add_32_re_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_add_32_re_al(m68000_base_device* mc68kcpu);
+static void m68k_op_adda_16_d(m68000_base_device* mc68kcpu);
+static void m68k_op_adda_16_a(m68000_base_device* mc68kcpu);
+static void m68k_op_adda_16_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_adda_16_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_adda_16_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_adda_16_di(m68000_base_device* mc68kcpu);
+static void m68k_op_adda_16_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_adda_16_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_adda_16_al(m68000_base_device* mc68kcpu);
+static void m68k_op_adda_16_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_adda_16_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_adda_16_i(m68000_base_device* mc68kcpu);
+static void m68k_op_adda_32_d(m68000_base_device* mc68kcpu);
+static void m68k_op_adda_32_a(m68000_base_device* mc68kcpu);
+static void m68k_op_adda_32_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_adda_32_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_adda_32_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_adda_32_di(m68000_base_device* mc68kcpu);
+static void m68k_op_adda_32_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_adda_32_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_adda_32_al(m68000_base_device* mc68kcpu);
+static void m68k_op_adda_32_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_adda_32_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_adda_32_i(m68000_base_device* mc68kcpu);
+static void m68k_op_addi_8_d(m68000_base_device* mc68kcpu);
+static void m68k_op_addi_8_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_addi_8_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_addi_8_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_addi_8_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_addi_8_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_addi_8_di(m68000_base_device* mc68kcpu);
+static void m68k_op_addi_8_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_addi_8_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_addi_8_al(m68000_base_device* mc68kcpu);
+static void m68k_op_addi_16_d(m68000_base_device* mc68kcpu);
+static void m68k_op_addi_16_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_addi_16_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_addi_16_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_addi_16_di(m68000_base_device* mc68kcpu);
+static void m68k_op_addi_16_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_addi_16_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_addi_16_al(m68000_base_device* mc68kcpu);
+static void m68k_op_addi_32_d(m68000_base_device* mc68kcpu);
+static void m68k_op_addi_32_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_addi_32_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_addi_32_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_addi_32_di(m68000_base_device* mc68kcpu);
+static void m68k_op_addi_32_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_addi_32_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_addi_32_al(m68000_base_device* mc68kcpu);
+static void m68k_op_addq_8_d(m68000_base_device* mc68kcpu);
+static void m68k_op_addq_8_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_addq_8_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_addq_8_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_addq_8_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_addq_8_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_addq_8_di(m68000_base_device* mc68kcpu);
+static void m68k_op_addq_8_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_addq_8_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_addq_8_al(m68000_base_device* mc68kcpu);
+static void m68k_op_addq_16_d(m68000_base_device* mc68kcpu);
+static void m68k_op_addq_16_a(m68000_base_device* mc68kcpu);
+static void m68k_op_addq_16_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_addq_16_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_addq_16_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_addq_16_di(m68000_base_device* mc68kcpu);
+static void m68k_op_addq_16_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_addq_16_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_addq_16_al(m68000_base_device* mc68kcpu);
+static void m68k_op_addq_32_d(m68000_base_device* mc68kcpu);
+static void m68k_op_addq_32_a(m68000_base_device* mc68kcpu);
+static void m68k_op_addq_32_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_addq_32_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_addq_32_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_addq_32_di(m68000_base_device* mc68kcpu);
+static void m68k_op_addq_32_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_addq_32_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_addq_32_al(m68000_base_device* mc68kcpu);
+static void m68k_op_addx_8_rr(m68000_base_device* mc68kcpu);
+static void m68k_op_addx_16_rr(m68000_base_device* mc68kcpu);
+static void m68k_op_addx_32_rr(m68000_base_device* mc68kcpu);
+static void m68k_op_addx_8_mm_ax7(m68000_base_device* mc68kcpu);
+static void m68k_op_addx_8_mm_ay7(m68000_base_device* mc68kcpu);
+static void m68k_op_addx_8_mm_axy7(m68000_base_device* mc68kcpu);
+static void m68k_op_addx_8_mm(m68000_base_device* mc68kcpu);
+static void m68k_op_addx_16_mm(m68000_base_device* mc68kcpu);
+static void m68k_op_addx_32_mm(m68000_base_device* mc68kcpu);
+static void m68k_op_and_8_er_d(m68000_base_device* mc68kcpu);
+static void m68k_op_and_8_er_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_and_8_er_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_and_8_er_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_and_8_er_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_and_8_er_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_and_8_er_di(m68000_base_device* mc68kcpu);
+static void m68k_op_and_8_er_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_and_8_er_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_and_8_er_al(m68000_base_device* mc68kcpu);
+static void m68k_op_and_8_er_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_and_8_er_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_and_8_er_i(m68000_base_device* mc68kcpu);
+static void m68k_op_and_16_er_d(m68000_base_device* mc68kcpu);
+static void m68k_op_and_16_er_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_and_16_er_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_and_16_er_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_and_16_er_di(m68000_base_device* mc68kcpu);
+static void m68k_op_and_16_er_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_and_16_er_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_and_16_er_al(m68000_base_device* mc68kcpu);
+static void m68k_op_and_16_er_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_and_16_er_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_and_16_er_i(m68000_base_device* mc68kcpu);
+static void m68k_op_and_32_er_d(m68000_base_device* mc68kcpu);
+static void m68k_op_and_32_er_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_and_32_er_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_and_32_er_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_and_32_er_di(m68000_base_device* mc68kcpu);
+static void m68k_op_and_32_er_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_and_32_er_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_and_32_er_al(m68000_base_device* mc68kcpu);
+static void m68k_op_and_32_er_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_and_32_er_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_and_32_er_i(m68000_base_device* mc68kcpu);
+static void m68k_op_and_8_re_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_and_8_re_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_and_8_re_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_and_8_re_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_and_8_re_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_and_8_re_di(m68000_base_device* mc68kcpu);
+static void m68k_op_and_8_re_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_and_8_re_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_and_8_re_al(m68000_base_device* mc68kcpu);
+static void m68k_op_and_16_re_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_and_16_re_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_and_16_re_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_and_16_re_di(m68000_base_device* mc68kcpu);
+static void m68k_op_and_16_re_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_and_16_re_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_and_16_re_al(m68000_base_device* mc68kcpu);
+static void m68k_op_and_32_re_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_and_32_re_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_and_32_re_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_and_32_re_di(m68000_base_device* mc68kcpu);
+static void m68k_op_and_32_re_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_and_32_re_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_and_32_re_al(m68000_base_device* mc68kcpu);
+static void m68k_op_andi_8_d(m68000_base_device* mc68kcpu);
+static void m68k_op_andi_8_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_andi_8_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_andi_8_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_andi_8_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_andi_8_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_andi_8_di(m68000_base_device* mc68kcpu);
+static void m68k_op_andi_8_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_andi_8_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_andi_8_al(m68000_base_device* mc68kcpu);
+static void m68k_op_andi_16_d(m68000_base_device* mc68kcpu);
+static void m68k_op_andi_16_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_andi_16_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_andi_16_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_andi_16_di(m68000_base_device* mc68kcpu);
+static void m68k_op_andi_16_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_andi_16_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_andi_16_al(m68000_base_device* mc68kcpu);
+static void m68k_op_andi_32_d(m68000_base_device* mc68kcpu);
+static void m68k_op_andi_32_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_andi_32_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_andi_32_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_andi_32_di(m68000_base_device* mc68kcpu);
+static void m68k_op_andi_32_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_andi_32_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_andi_32_al(m68000_base_device* mc68kcpu);
+static void m68k_op_andi_16_toc(m68000_base_device* mc68kcpu);
+static void m68k_op_andi_16_tos(m68000_base_device* mc68kcpu);
+static void m68k_op_asr_8_s(m68000_base_device* mc68kcpu);
+static void m68k_op_asr_16_s(m68000_base_device* mc68kcpu);
+static void m68k_op_asr_32_s(m68000_base_device* mc68kcpu);
+static void m68k_op_asr_8_r(m68000_base_device* mc68kcpu);
+static void m68k_op_asr_16_r(m68000_base_device* mc68kcpu);
+static void m68k_op_asr_32_r(m68000_base_device* mc68kcpu);
+static void m68k_op_asr_16_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_asr_16_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_asr_16_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_asr_16_di(m68000_base_device* mc68kcpu);
+static void m68k_op_asr_16_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_asr_16_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_asr_16_al(m68000_base_device* mc68kcpu);
+static void m68k_op_asl_8_s(m68000_base_device* mc68kcpu);
+static void m68k_op_asl_16_s(m68000_base_device* mc68kcpu);
+static void m68k_op_asl_32_s(m68000_base_device* mc68kcpu);
+static void m68k_op_asl_8_r(m68000_base_device* mc68kcpu);
+static void m68k_op_asl_16_r(m68000_base_device* mc68kcpu);
+static void m68k_op_asl_32_r(m68000_base_device* mc68kcpu);
+static void m68k_op_asl_16_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_asl_16_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_asl_16_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_asl_16_di(m68000_base_device* mc68kcpu);
+static void m68k_op_asl_16_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_asl_16_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_asl_16_al(m68000_base_device* mc68kcpu);
+static void m68k_op_bhi_8(m68000_base_device* mc68kcpu);
+static void m68k_op_bls_8(m68000_base_device* mc68kcpu);
+static void m68k_op_bcc_8(m68000_base_device* mc68kcpu);
+static void m68k_op_bcs_8(m68000_base_device* mc68kcpu);
+static void m68k_op_bne_8(m68000_base_device* mc68kcpu);
+static void m68k_op_beq_8(m68000_base_device* mc68kcpu);
+static void m68k_op_bvc_8(m68000_base_device* mc68kcpu);
+static void m68k_op_bvs_8(m68000_base_device* mc68kcpu);
+static void m68k_op_bpl_8(m68000_base_device* mc68kcpu);
+static void m68k_op_bmi_8(m68000_base_device* mc68kcpu);
+static void m68k_op_bge_8(m68000_base_device* mc68kcpu);
+static void m68k_op_blt_8(m68000_base_device* mc68kcpu);
+static void m68k_op_bgt_8(m68000_base_device* mc68kcpu);
+static void m68k_op_ble_8(m68000_base_device* mc68kcpu);
+static void m68k_op_bhi_16(m68000_base_device* mc68kcpu);
+static void m68k_op_bls_16(m68000_base_device* mc68kcpu);
+static void m68k_op_bcc_16(m68000_base_device* mc68kcpu);
+static void m68k_op_bcs_16(m68000_base_device* mc68kcpu);
+static void m68k_op_bne_16(m68000_base_device* mc68kcpu);
+static void m68k_op_beq_16(m68000_base_device* mc68kcpu);
+static void m68k_op_bvc_16(m68000_base_device* mc68kcpu);
+static void m68k_op_bvs_16(m68000_base_device* mc68kcpu);
+static void m68k_op_bpl_16(m68000_base_device* mc68kcpu);
+static void m68k_op_bmi_16(m68000_base_device* mc68kcpu);
+static void m68k_op_bge_16(m68000_base_device* mc68kcpu);
+static void m68k_op_blt_16(m68000_base_device* mc68kcpu);
+static void m68k_op_bgt_16(m68000_base_device* mc68kcpu);
+static void m68k_op_ble_16(m68000_base_device* mc68kcpu);
+static void m68k_op_bhi_32(m68000_base_device* mc68kcpu);
+static void m68k_op_bls_32(m68000_base_device* mc68kcpu);
+static void m68k_op_bcc_32(m68000_base_device* mc68kcpu);
+static void m68k_op_bcs_32(m68000_base_device* mc68kcpu);
+static void m68k_op_bne_32(m68000_base_device* mc68kcpu);
+static void m68k_op_beq_32(m68000_base_device* mc68kcpu);
+static void m68k_op_bvc_32(m68000_base_device* mc68kcpu);
+static void m68k_op_bvs_32(m68000_base_device* mc68kcpu);
+static void m68k_op_bpl_32(m68000_base_device* mc68kcpu);
+static void m68k_op_bmi_32(m68000_base_device* mc68kcpu);
+static void m68k_op_bge_32(m68000_base_device* mc68kcpu);
+static void m68k_op_blt_32(m68000_base_device* mc68kcpu);
+static void m68k_op_bgt_32(m68000_base_device* mc68kcpu);
+static void m68k_op_ble_32(m68000_base_device* mc68kcpu);
+static void m68k_op_bchg_32_r_d(m68000_base_device* mc68kcpu);
+static void m68k_op_bchg_8_r_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_bchg_8_r_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_bchg_8_r_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_bchg_8_r_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_bchg_8_r_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_bchg_8_r_di(m68000_base_device* mc68kcpu);
+static void m68k_op_bchg_8_r_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_bchg_8_r_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_bchg_8_r_al(m68000_base_device* mc68kcpu);
+static void m68k_op_bchg_32_s_d(m68000_base_device* mc68kcpu);
+static void m68k_op_bchg_8_s_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_bchg_8_s_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_bchg_8_s_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_bchg_8_s_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_bchg_8_s_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_bchg_8_s_di(m68000_base_device* mc68kcpu);
+static void m68k_op_bchg_8_s_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_bchg_8_s_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_bchg_8_s_al(m68000_base_device* mc68kcpu);
+static void m68k_op_bclr_32_r_d(m68000_base_device* mc68kcpu);
+static void m68k_op_bclr_8_r_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_bclr_8_r_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_bclr_8_r_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_bclr_8_r_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_bclr_8_r_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_bclr_8_r_di(m68000_base_device* mc68kcpu);
+static void m68k_op_bclr_8_r_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_bclr_8_r_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_bclr_8_r_al(m68000_base_device* mc68kcpu);
+static void m68k_op_bclr_32_s_d(m68000_base_device* mc68kcpu);
+static void m68k_op_bclr_8_s_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_bclr_8_s_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_bclr_8_s_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_bclr_8_s_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_bclr_8_s_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_bclr_8_s_di(m68000_base_device* mc68kcpu);
+static void m68k_op_bclr_8_s_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_bclr_8_s_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_bclr_8_s_al(m68000_base_device* mc68kcpu);
+static void m68k_op_bfchg_32_d(m68000_base_device* mc68kcpu);
+static void m68k_op_bfchg_32_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_bfchg_32_di(m68000_base_device* mc68kcpu);
+static void m68k_op_bfchg_32_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_bfchg_32_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_bfchg_32_al(m68000_base_device* mc68kcpu);
+static void m68k_op_bfclr_32_d(m68000_base_device* mc68kcpu);
+static void m68k_op_bfclr_32_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_bfclr_32_di(m68000_base_device* mc68kcpu);
+static void m68k_op_bfclr_32_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_bfclr_32_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_bfclr_32_al(m68000_base_device* mc68kcpu);
+static void m68k_op_bfexts_32_d(m68000_base_device* mc68kcpu);
+static void m68k_op_bfexts_32_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_bfexts_32_di(m68000_base_device* mc68kcpu);
+static void m68k_op_bfexts_32_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_bfexts_32_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_bfexts_32_al(m68000_base_device* mc68kcpu);
+static void m68k_op_bfexts_32_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_bfexts_32_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_bfextu_32_d(m68000_base_device* mc68kcpu);
+static void m68k_op_bfextu_32_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_bfextu_32_di(m68000_base_device* mc68kcpu);
+static void m68k_op_bfextu_32_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_bfextu_32_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_bfextu_32_al(m68000_base_device* mc68kcpu);
+static void m68k_op_bfextu_32_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_bfextu_32_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_bfffo_32_d(m68000_base_device* mc68kcpu);
+static void m68k_op_bfffo_32_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_bfffo_32_di(m68000_base_device* mc68kcpu);
+static void m68k_op_bfffo_32_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_bfffo_32_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_bfffo_32_al(m68000_base_device* mc68kcpu);
+static void m68k_op_bfffo_32_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_bfffo_32_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_bfins_32_d(m68000_base_device* mc68kcpu);
+static void m68k_op_bfins_32_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_bfins_32_di(m68000_base_device* mc68kcpu);
+static void m68k_op_bfins_32_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_bfins_32_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_bfins_32_al(m68000_base_device* mc68kcpu);
+static void m68k_op_bfset_32_d(m68000_base_device* mc68kcpu);
+static void m68k_op_bfset_32_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_bfset_32_di(m68000_base_device* mc68kcpu);
+static void m68k_op_bfset_32_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_bfset_32_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_bfset_32_al(m68000_base_device* mc68kcpu);
+static void m68k_op_bftst_32_d(m68000_base_device* mc68kcpu);
+static void m68k_op_bftst_32_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_bftst_32_di(m68000_base_device* mc68kcpu);
+static void m68k_op_bftst_32_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_bftst_32_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_bftst_32_al(m68000_base_device* mc68kcpu);
+static void m68k_op_bftst_32_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_bftst_32_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_bkpt(m68000_base_device* mc68kcpu);
+static void m68k_op_bra_8(m68000_base_device* mc68kcpu);
+static void m68k_op_bra_16(m68000_base_device* mc68kcpu);
+static void m68k_op_bra_32(m68000_base_device* mc68kcpu);
+static void m68k_op_bset_32_r_d(m68000_base_device* mc68kcpu);
+static void m68k_op_bset_8_r_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_bset_8_r_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_bset_8_r_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_bset_8_r_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_bset_8_r_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_bset_8_r_di(m68000_base_device* mc68kcpu);
+static void m68k_op_bset_8_r_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_bset_8_r_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_bset_8_r_al(m68000_base_device* mc68kcpu);
+static void m68k_op_bset_32_s_d(m68000_base_device* mc68kcpu);
+static void m68k_op_bset_8_s_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_bset_8_s_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_bset_8_s_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_bset_8_s_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_bset_8_s_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_bset_8_s_di(m68000_base_device* mc68kcpu);
+static void m68k_op_bset_8_s_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_bset_8_s_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_bset_8_s_al(m68000_base_device* mc68kcpu);
+static void m68k_op_bsr_8(m68000_base_device* mc68kcpu);
+static void m68k_op_bsr_16(m68000_base_device* mc68kcpu);
+static void m68k_op_bsr_32(m68000_base_device* mc68kcpu);
+static void m68k_op_btst_32_r_d(m68000_base_device* mc68kcpu);
+static void m68k_op_btst_8_r_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_btst_8_r_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_btst_8_r_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_btst_8_r_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_btst_8_r_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_btst_8_r_di(m68000_base_device* mc68kcpu);
+static void m68k_op_btst_8_r_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_btst_8_r_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_btst_8_r_al(m68000_base_device* mc68kcpu);
+static void m68k_op_btst_8_r_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_btst_8_r_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_btst_8_r_i(m68000_base_device* mc68kcpu);
+static void m68k_op_btst_32_s_d(m68000_base_device* mc68kcpu);
+static void m68k_op_btst_8_s_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_btst_8_s_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_btst_8_s_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_btst_8_s_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_btst_8_s_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_btst_8_s_di(m68000_base_device* mc68kcpu);
+static void m68k_op_btst_8_s_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_btst_8_s_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_btst_8_s_al(m68000_base_device* mc68kcpu);
+static void m68k_op_btst_8_s_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_btst_8_s_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_callm_32_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_callm_32_di(m68000_base_device* mc68kcpu);
+static void m68k_op_callm_32_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_callm_32_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_callm_32_al(m68000_base_device* mc68kcpu);
+static void m68k_op_callm_32_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_callm_32_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_cas_8_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_cas_8_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_cas_8_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_cas_8_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_cas_8_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_cas_8_di(m68000_base_device* mc68kcpu);
+static void m68k_op_cas_8_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_cas_8_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_cas_8_al(m68000_base_device* mc68kcpu);
+static void m68k_op_cas_16_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_cas_16_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_cas_16_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_cas_16_di(m68000_base_device* mc68kcpu);
+static void m68k_op_cas_16_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_cas_16_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_cas_16_al(m68000_base_device* mc68kcpu);
+static void m68k_op_cas_32_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_cas_32_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_cas_32_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_cas_32_di(m68000_base_device* mc68kcpu);
+static void m68k_op_cas_32_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_cas_32_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_cas_32_al(m68000_base_device* mc68kcpu);
+static void m68k_op_cas2_16(m68000_base_device* mc68kcpu);
+static void m68k_op_cas2_32(m68000_base_device* mc68kcpu);
+static void m68k_op_chk_16_d(m68000_base_device* mc68kcpu);
+static void m68k_op_chk_16_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_chk_16_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_chk_16_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_chk_16_di(m68000_base_device* mc68kcpu);
+static void m68k_op_chk_16_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_chk_16_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_chk_16_al(m68000_base_device* mc68kcpu);
+static void m68k_op_chk_16_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_chk_16_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_chk_16_i(m68000_base_device* mc68kcpu);
+static void m68k_op_chk_32_d(m68000_base_device* mc68kcpu);
+static void m68k_op_chk_32_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_chk_32_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_chk_32_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_chk_32_di(m68000_base_device* mc68kcpu);
+static void m68k_op_chk_32_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_chk_32_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_chk_32_al(m68000_base_device* mc68kcpu);
+static void m68k_op_chk_32_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_chk_32_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_chk_32_i(m68000_base_device* mc68kcpu);
+static void m68k_op_chk2cmp2_8_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_chk2cmp2_8_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_chk2cmp2_8_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_chk2cmp2_8_di(m68000_base_device* mc68kcpu);
+static void m68k_op_chk2cmp2_8_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_chk2cmp2_8_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_chk2cmp2_8_al(m68000_base_device* mc68kcpu);
+static void m68k_op_chk2cmp2_16_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_chk2cmp2_16_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_chk2cmp2_16_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_chk2cmp2_16_di(m68000_base_device* mc68kcpu);
+static void m68k_op_chk2cmp2_16_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_chk2cmp2_16_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_chk2cmp2_16_al(m68000_base_device* mc68kcpu);
+static void m68k_op_chk2cmp2_32_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_chk2cmp2_32_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_chk2cmp2_32_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_chk2cmp2_32_di(m68000_base_device* mc68kcpu);
+static void m68k_op_chk2cmp2_32_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_chk2cmp2_32_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_chk2cmp2_32_al(m68000_base_device* mc68kcpu);
+static void m68k_op_clr_8_d(m68000_base_device* mc68kcpu);
+static void m68k_op_clr_8_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_clr_8_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_clr_8_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_clr_8_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_clr_8_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_clr_8_di(m68000_base_device* mc68kcpu);
+static void m68k_op_clr_8_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_clr_8_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_clr_8_al(m68000_base_device* mc68kcpu);
+static void m68k_op_clr_16_d(m68000_base_device* mc68kcpu);
+static void m68k_op_clr_16_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_clr_16_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_clr_16_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_clr_16_di(m68000_base_device* mc68kcpu);
+static void m68k_op_clr_16_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_clr_16_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_clr_16_al(m68000_base_device* mc68kcpu);
+static void m68k_op_clr_32_d(m68000_base_device* mc68kcpu);
+static void m68k_op_clr_32_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_clr_32_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_clr_32_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_clr_32_di(m68000_base_device* mc68kcpu);
+static void m68k_op_clr_32_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_clr_32_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_clr_32_al(m68000_base_device* mc68kcpu);
+static void m68k_op_cmp_8_d(m68000_base_device* mc68kcpu);
+static void m68k_op_cmp_8_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_cmp_8_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_cmp_8_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_cmp_8_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_cmp_8_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_cmp_8_di(m68000_base_device* mc68kcpu);
+static void m68k_op_cmp_8_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_cmp_8_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_cmp_8_al(m68000_base_device* mc68kcpu);
+static void m68k_op_cmp_8_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_cmp_8_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_cmp_8_i(m68000_base_device* mc68kcpu);
+static void m68k_op_cmp_16_d(m68000_base_device* mc68kcpu);
+static void m68k_op_cmp_16_a(m68000_base_device* mc68kcpu);
+static void m68k_op_cmp_16_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_cmp_16_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_cmp_16_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_cmp_16_di(m68000_base_device* mc68kcpu);
+static void m68k_op_cmp_16_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_cmp_16_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_cmp_16_al(m68000_base_device* mc68kcpu);
+static void m68k_op_cmp_16_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_cmp_16_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_cmp_16_i(m68000_base_device* mc68kcpu);
+static void m68k_op_cmp_32_d(m68000_base_device* mc68kcpu);
+static void m68k_op_cmp_32_a(m68000_base_device* mc68kcpu);
+static void m68k_op_cmp_32_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_cmp_32_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_cmp_32_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_cmp_32_di(m68000_base_device* mc68kcpu);
+static void m68k_op_cmp_32_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_cmp_32_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_cmp_32_al(m68000_base_device* mc68kcpu);
+static void m68k_op_cmp_32_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_cmp_32_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_cmp_32_i(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpa_16_d(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpa_16_a(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpa_16_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpa_16_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpa_16_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpa_16_di(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpa_16_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpa_16_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpa_16_al(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpa_16_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpa_16_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpa_16_i(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpa_32_d(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpa_32_a(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpa_32_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpa_32_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpa_32_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpa_32_di(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpa_32_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpa_32_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpa_32_al(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpa_32_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpa_32_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpa_32_i(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpi_8_d(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpi_8_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpi_8_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpi_8_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpi_8_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpi_8_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpi_8_di(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpi_8_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpi_8_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpi_8_al(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpi_8_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpi_8_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpi_16_d(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpi_16_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpi_16_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpi_16_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpi_16_di(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpi_16_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpi_16_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpi_16_al(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpi_16_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpi_16_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpi_32_d(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpi_32_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpi_32_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpi_32_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpi_32_di(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpi_32_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpi_32_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpi_32_al(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpi_32_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpi_32_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpm_8_ax7(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpm_8_ay7(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpm_8_axy7(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpm_8(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpm_16(m68000_base_device* mc68kcpu);
+static void m68k_op_cmpm_32(m68000_base_device* mc68kcpu);
+static void m68k_op_cpbcc_32(m68000_base_device* mc68kcpu);
+static void m68k_op_cpdbcc_32(m68000_base_device* mc68kcpu);
+static void m68k_op_cpgen_32(m68000_base_device* mc68kcpu);
+static void m68k_op_cpscc_32(m68000_base_device* mc68kcpu);
+static void m68k_op_cptrapcc_32(m68000_base_device* mc68kcpu);
+static void m68k_op_ftrapcc_32(m68000_base_device* mc68kcpu);
+static void m68k_op_dbt_16(m68000_base_device* mc68kcpu);
+static void m68k_op_dbf_16(m68000_base_device* mc68kcpu);
+static void m68k_op_dbhi_16(m68000_base_device* mc68kcpu);
+static void m68k_op_dbls_16(m68000_base_device* mc68kcpu);
+static void m68k_op_dbcc_16(m68000_base_device* mc68kcpu);
+static void m68k_op_dbcs_16(m68000_base_device* mc68kcpu);
+static void m68k_op_dbne_16(m68000_base_device* mc68kcpu);
+static void m68k_op_dbeq_16(m68000_base_device* mc68kcpu);
+static void m68k_op_dbvc_16(m68000_base_device* mc68kcpu);
+static void m68k_op_dbvs_16(m68000_base_device* mc68kcpu);
+static void m68k_op_dbpl_16(m68000_base_device* mc68kcpu);
+static void m68k_op_dbmi_16(m68000_base_device* mc68kcpu);
+static void m68k_op_dbge_16(m68000_base_device* mc68kcpu);
+static void m68k_op_dblt_16(m68000_base_device* mc68kcpu);
+static void m68k_op_dbgt_16(m68000_base_device* mc68kcpu);
+static void m68k_op_dble_16(m68000_base_device* mc68kcpu);
+static void m68k_op_divs_16_d(m68000_base_device* mc68kcpu);
+static void m68k_op_divs_16_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_divs_16_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_divs_16_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_divs_16_di(m68000_base_device* mc68kcpu);
+static void m68k_op_divs_16_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_divs_16_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_divs_16_al(m68000_base_device* mc68kcpu);
+static void m68k_op_divs_16_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_divs_16_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_divs_16_i(m68000_base_device* mc68kcpu);
+static void m68k_op_divu_16_d(m68000_base_device* mc68kcpu);
+static void m68k_op_divu_16_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_divu_16_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_divu_16_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_divu_16_di(m68000_base_device* mc68kcpu);
+static void m68k_op_divu_16_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_divu_16_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_divu_16_al(m68000_base_device* mc68kcpu);
+static void m68k_op_divu_16_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_divu_16_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_divu_16_i(m68000_base_device* mc68kcpu);
+static void m68k_op_divl_32_d(m68000_base_device* mc68kcpu);
+static void m68k_op_divl_32_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_divl_32_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_divl_32_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_divl_32_di(m68000_base_device* mc68kcpu);
+static void m68k_op_divl_32_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_divl_32_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_divl_32_al(m68000_base_device* mc68kcpu);
+static void m68k_op_divl_32_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_divl_32_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_divl_32_i(m68000_base_device* mc68kcpu);
+static void m68k_op_eor_8_d(m68000_base_device* mc68kcpu);
+static void m68k_op_eor_8_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_eor_8_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_eor_8_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_eor_8_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_eor_8_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_eor_8_di(m68000_base_device* mc68kcpu);
+static void m68k_op_eor_8_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_eor_8_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_eor_8_al(m68000_base_device* mc68kcpu);
+static void m68k_op_eor_16_d(m68000_base_device* mc68kcpu);
+static void m68k_op_eor_16_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_eor_16_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_eor_16_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_eor_16_di(m68000_base_device* mc68kcpu);
+static void m68k_op_eor_16_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_eor_16_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_eor_16_al(m68000_base_device* mc68kcpu);
+static void m68k_op_eor_32_d(m68000_base_device* mc68kcpu);
+static void m68k_op_eor_32_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_eor_32_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_eor_32_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_eor_32_di(m68000_base_device* mc68kcpu);
+static void m68k_op_eor_32_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_eor_32_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_eor_32_al(m68000_base_device* mc68kcpu);
+static void m68k_op_eori_8_d(m68000_base_device* mc68kcpu);
+static void m68k_op_eori_8_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_eori_8_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_eori_8_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_eori_8_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_eori_8_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_eori_8_di(m68000_base_device* mc68kcpu);
+static void m68k_op_eori_8_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_eori_8_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_eori_8_al(m68000_base_device* mc68kcpu);
+static void m68k_op_eori_16_d(m68000_base_device* mc68kcpu);
+static void m68k_op_eori_16_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_eori_16_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_eori_16_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_eori_16_di(m68000_base_device* mc68kcpu);
+static void m68k_op_eori_16_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_eori_16_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_eori_16_al(m68000_base_device* mc68kcpu);
+static void m68k_op_eori_32_d(m68000_base_device* mc68kcpu);
+static void m68k_op_eori_32_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_eori_32_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_eori_32_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_eori_32_di(m68000_base_device* mc68kcpu);
+static void m68k_op_eori_32_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_eori_32_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_eori_32_al(m68000_base_device* mc68kcpu);
+static void m68k_op_eori_16_toc(m68000_base_device* mc68kcpu);
+static void m68k_op_eori_16_tos(m68000_base_device* mc68kcpu);
+static void m68k_op_exg_32_dd(m68000_base_device* mc68kcpu);
+static void m68k_op_exg_32_aa(m68000_base_device* mc68kcpu);
+static void m68k_op_exg_32_da(m68000_base_device* mc68kcpu);
+static void m68k_op_ext_16(m68000_base_device* mc68kcpu);
+static void m68k_op_ext_32(m68000_base_device* mc68kcpu);
+static void m68k_op_extb_32(m68000_base_device* mc68kcpu);
+static void m68k_op_illegal(m68000_base_device* mc68kcpu);
+static void m68k_op_jmp_32_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_jmp_32_di(m68000_base_device* mc68kcpu);
+static void m68k_op_jmp_32_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_jmp_32_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_jmp_32_al(m68000_base_device* mc68kcpu);
+static void m68k_op_jmp_32_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_jmp_32_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_jsr_32_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_jsr_32_di(m68000_base_device* mc68kcpu);
+static void m68k_op_jsr_32_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_jsr_32_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_jsr_32_al(m68000_base_device* mc68kcpu);
+static void m68k_op_jsr_32_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_jsr_32_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_lea_32_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_lea_32_di(m68000_base_device* mc68kcpu);
+static void m68k_op_lea_32_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_lea_32_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_lea_32_al(m68000_base_device* mc68kcpu);
+static void m68k_op_lea_32_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_lea_32_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_link_16_a7(m68000_base_device* mc68kcpu);
+static void m68k_op_link_16(m68000_base_device* mc68kcpu);
+static void m68k_op_link_32_a7(m68000_base_device* mc68kcpu);
+static void m68k_op_link_32(m68000_base_device* mc68kcpu);
+static void m68k_op_lsr_8_s(m68000_base_device* mc68kcpu);
+static void m68k_op_lsr_16_s(m68000_base_device* mc68kcpu);
+static void m68k_op_lsr_32_s(m68000_base_device* mc68kcpu);
+static void m68k_op_lsr_8_r(m68000_base_device* mc68kcpu);
+static void m68k_op_lsr_16_r(m68000_base_device* mc68kcpu);
+static void m68k_op_lsr_32_r(m68000_base_device* mc68kcpu);
+static void m68k_op_lsr_16_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_lsr_16_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_lsr_16_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_lsr_16_di(m68000_base_device* mc68kcpu);
+static void m68k_op_lsr_16_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_lsr_16_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_lsr_16_al(m68000_base_device* mc68kcpu);
+static void m68k_op_lsl_8_s(m68000_base_device* mc68kcpu);
+static void m68k_op_lsl_16_s(m68000_base_device* mc68kcpu);
+static void m68k_op_lsl_32_s(m68000_base_device* mc68kcpu);
+static void m68k_op_lsl_8_r(m68000_base_device* mc68kcpu);
+static void m68k_op_lsl_16_r(m68000_base_device* mc68kcpu);
+static void m68k_op_lsl_32_r(m68000_base_device* mc68kcpu);
+static void m68k_op_lsl_16_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_lsl_16_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_lsl_16_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_lsl_16_di(m68000_base_device* mc68kcpu);
+static void m68k_op_lsl_16_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_lsl_16_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_lsl_16_al(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_d_d(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_d_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_d_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_d_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_d_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_d_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_d_di(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_d_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_d_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_d_al(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_d_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_d_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_d_i(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_ai_d(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_ai_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_ai_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_ai_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_ai_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_ai_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_ai_di(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_ai_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_ai_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_ai_al(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_ai_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_ai_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_ai_i(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pi7_d(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pi_d(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pi7_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pi7_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pi7_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pi7_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pi7_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pi7_di(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pi7_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pi7_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pi7_al(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pi7_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pi7_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pi7_i(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pi_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pi_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pi_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pi_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pi_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pi_di(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pi_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pi_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pi_al(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pi_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pi_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pi_i(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pd7_d(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pd_d(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pd7_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pd7_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pd7_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pd7_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pd7_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pd7_di(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pd7_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pd7_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pd7_al(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pd7_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pd7_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pd7_i(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pd_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pd_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pd_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pd_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pd_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pd_di(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pd_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pd_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pd_al(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pd_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pd_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_pd_i(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_di_d(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_di_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_di_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_di_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_di_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_di_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_di_di(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_di_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_di_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_di_al(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_di_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_di_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_di_i(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_ix_d(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_ix_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_ix_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_ix_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_ix_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_ix_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_ix_di(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_ix_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_ix_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_ix_al(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_ix_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_ix_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_ix_i(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_aw_d(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_aw_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_aw_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_aw_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_aw_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_aw_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_aw_di(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_aw_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_aw_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_aw_al(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_aw_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_aw_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_aw_i(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_al_d(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_al_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_al_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_al_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_al_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_al_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_al_di(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_al_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_al_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_al_al(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_al_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_al_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_8_al_i(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_d_d(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_d_a(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_d_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_d_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_d_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_d_di(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_d_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_d_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_d_al(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_d_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_d_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_d_i(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_ai_d(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_ai_a(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_ai_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_ai_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_ai_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_ai_di(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_ai_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_ai_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_ai_al(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_ai_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_ai_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_ai_i(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_pi_d(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_pi_a(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_pi_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_pi_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_pi_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_pi_di(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_pi_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_pi_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_pi_al(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_pi_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_pi_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_pi_i(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_pd_d(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_pd_a(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_pd_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_pd_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_pd_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_pd_di(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_pd_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_pd_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_pd_al(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_pd_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_pd_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_pd_i(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_di_d(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_di_a(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_di_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_di_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_di_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_di_di(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_di_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_di_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_di_al(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_di_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_di_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_di_i(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_ix_d(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_ix_a(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_ix_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_ix_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_ix_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_ix_di(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_ix_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_ix_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_ix_al(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_ix_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_ix_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_ix_i(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_aw_d(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_aw_a(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_aw_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_aw_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_aw_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_aw_di(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_aw_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_aw_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_aw_al(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_aw_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_aw_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_aw_i(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_al_d(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_al_a(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_al_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_al_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_al_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_al_di(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_al_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_al_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_al_al(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_al_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_al_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_al_i(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_d_d(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_d_a(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_d_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_d_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_d_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_d_di(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_d_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_d_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_d_al(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_d_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_d_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_d_i(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_ai_d(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_ai_a(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_ai_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_ai_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_ai_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_ai_di(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_ai_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_ai_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_ai_al(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_ai_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_ai_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_ai_i(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_pi_d(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_pi_a(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_pi_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_pi_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_pi_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_pi_di(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_pi_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_pi_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_pi_al(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_pi_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_pi_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_pi_i(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_pd_d(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_pd_a(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_pd_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_pd_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_pd_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_pd_di(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_pd_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_pd_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_pd_al(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_pd_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_pd_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_pd_i(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_di_d(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_di_a(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_di_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_di_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_di_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_di_di(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_di_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_di_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_di_al(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_di_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_di_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_di_i(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_ix_d(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_ix_a(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_ix_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_ix_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_ix_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_ix_di(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_ix_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_ix_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_ix_al(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_ix_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_ix_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_ix_i(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_aw_d(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_aw_a(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_aw_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_aw_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_aw_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_aw_di(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_aw_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_aw_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_aw_al(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_aw_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_aw_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_aw_i(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_al_d(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_al_a(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_al_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_al_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_al_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_al_di(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_al_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_al_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_al_al(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_al_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_al_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_al_i(m68000_base_device* mc68kcpu);
+static void m68k_op_movea_16_d(m68000_base_device* mc68kcpu);
+static void m68k_op_movea_16_a(m68000_base_device* mc68kcpu);
+static void m68k_op_movea_16_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_movea_16_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_movea_16_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_movea_16_di(m68000_base_device* mc68kcpu);
+static void m68k_op_movea_16_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_movea_16_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_movea_16_al(m68000_base_device* mc68kcpu);
+static void m68k_op_movea_16_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_movea_16_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_movea_16_i(m68000_base_device* mc68kcpu);
+static void m68k_op_movea_32_d(m68000_base_device* mc68kcpu);
+static void m68k_op_movea_32_a(m68000_base_device* mc68kcpu);
+static void m68k_op_movea_32_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_movea_32_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_movea_32_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_movea_32_di(m68000_base_device* mc68kcpu);
+static void m68k_op_movea_32_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_movea_32_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_movea_32_al(m68000_base_device* mc68kcpu);
+static void m68k_op_movea_32_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_movea_32_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_movea_32_i(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_frc_d(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_frc_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_frc_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_frc_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_frc_di(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_frc_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_frc_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_frc_al(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_toc_d(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_toc_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_toc_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_toc_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_toc_di(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_toc_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_toc_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_toc_al(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_toc_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_toc_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_toc_i(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_frs_d(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_frs_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_frs_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_frs_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_frs_di(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_frs_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_frs_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_frs_al(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_tos_d(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_tos_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_tos_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_tos_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_tos_di(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_tos_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_tos_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_tos_al(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_tos_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_tos_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_move_16_tos_i(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_fru(m68000_base_device* mc68kcpu);
+static void m68k_op_move_32_tou(m68000_base_device* mc68kcpu);
+static void m68k_op_movec_32_cr(m68000_base_device* mc68kcpu);
+static void m68k_op_movec_32_rc(m68000_base_device* mc68kcpu);
+static void m68k_op_movem_16_re_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_movem_16_re_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_movem_16_re_di(m68000_base_device* mc68kcpu);
+static void m68k_op_movem_16_re_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_movem_16_re_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_movem_16_re_al(m68000_base_device* mc68kcpu);
+static void m68k_op_movem_32_re_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_movem_32_re_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_movem_32_re_di(m68000_base_device* mc68kcpu);
+static void m68k_op_movem_32_re_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_movem_32_re_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_movem_32_re_al(m68000_base_device* mc68kcpu);
+static void m68k_op_movem_16_er_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_movem_16_er_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_movem_16_er_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_movem_16_er_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_movem_16_er_di(m68000_base_device* mc68kcpu);
+static void m68k_op_movem_16_er_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_movem_16_er_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_movem_16_er_al(m68000_base_device* mc68kcpu);
+static void m68k_op_movem_32_er_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_movem_32_er_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_movem_32_er_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_movem_32_er_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_movem_32_er_di(m68000_base_device* mc68kcpu);
+static void m68k_op_movem_32_er_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_movem_32_er_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_movem_32_er_al(m68000_base_device* mc68kcpu);
+static void m68k_op_movep_16_re(m68000_base_device* mc68kcpu);
+static void m68k_op_movep_32_re(m68000_base_device* mc68kcpu);
+static void m68k_op_movep_16_er(m68000_base_device* mc68kcpu);
+static void m68k_op_movep_32_er(m68000_base_device* mc68kcpu);
+static void m68k_op_moves_8_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_moves_8_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_moves_8_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_moves_8_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_moves_8_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_moves_8_di(m68000_base_device* mc68kcpu);
+static void m68k_op_moves_8_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_moves_8_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_moves_8_al(m68000_base_device* mc68kcpu);
+static void m68k_op_moves_16_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_moves_16_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_moves_16_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_moves_16_di(m68000_base_device* mc68kcpu);
+static void m68k_op_moves_16_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_moves_16_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_moves_16_al(m68000_base_device* mc68kcpu);
+static void m68k_op_moves_32_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_moves_32_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_moves_32_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_moves_32_di(m68000_base_device* mc68kcpu);
+static void m68k_op_moves_32_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_moves_32_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_moves_32_al(m68000_base_device* mc68kcpu);
+static void m68k_op_moveq_32(m68000_base_device* mc68kcpu);
+static void m68k_op_move16_32(m68000_base_device* mc68kcpu);
+static void m68k_op_muls_16_d(m68000_base_device* mc68kcpu);
+static void m68k_op_muls_16_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_muls_16_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_muls_16_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_muls_16_di(m68000_base_device* mc68kcpu);
+static void m68k_op_muls_16_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_muls_16_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_muls_16_al(m68000_base_device* mc68kcpu);
+static void m68k_op_muls_16_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_muls_16_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_muls_16_i(m68000_base_device* mc68kcpu);
+static void m68k_op_mulu_16_d(m68000_base_device* mc68kcpu);
+static void m68k_op_mulu_16_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_mulu_16_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_mulu_16_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_mulu_16_di(m68000_base_device* mc68kcpu);
+static void m68k_op_mulu_16_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_mulu_16_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_mulu_16_al(m68000_base_device* mc68kcpu);
+static void m68k_op_mulu_16_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_mulu_16_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_mulu_16_i(m68000_base_device* mc68kcpu);
+static void m68k_op_mull_32_d(m68000_base_device* mc68kcpu);
+static void m68k_op_mull_32_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_mull_32_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_mull_32_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_mull_32_di(m68000_base_device* mc68kcpu);
+static void m68k_op_mull_32_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_mull_32_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_mull_32_al(m68000_base_device* mc68kcpu);
+static void m68k_op_mull_32_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_mull_32_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_mull_32_i(m68000_base_device* mc68kcpu);
+static void m68k_op_nbcd_8_d(m68000_base_device* mc68kcpu);
+static void m68k_op_nbcd_8_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_nbcd_8_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_nbcd_8_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_nbcd_8_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_nbcd_8_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_nbcd_8_di(m68000_base_device* mc68kcpu);
+static void m68k_op_nbcd_8_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_nbcd_8_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_nbcd_8_al(m68000_base_device* mc68kcpu);
+static void m68k_op_neg_8_d(m68000_base_device* mc68kcpu);
+static void m68k_op_neg_8_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_neg_8_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_neg_8_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_neg_8_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_neg_8_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_neg_8_di(m68000_base_device* mc68kcpu);
+static void m68k_op_neg_8_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_neg_8_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_neg_8_al(m68000_base_device* mc68kcpu);
+static void m68k_op_neg_16_d(m68000_base_device* mc68kcpu);
+static void m68k_op_neg_16_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_neg_16_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_neg_16_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_neg_16_di(m68000_base_device* mc68kcpu);
+static void m68k_op_neg_16_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_neg_16_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_neg_16_al(m68000_base_device* mc68kcpu);
+static void m68k_op_neg_32_d(m68000_base_device* mc68kcpu);
+static void m68k_op_neg_32_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_neg_32_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_neg_32_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_neg_32_di(m68000_base_device* mc68kcpu);
+static void m68k_op_neg_32_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_neg_32_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_neg_32_al(m68000_base_device* mc68kcpu);
+static void m68k_op_negx_8_d(m68000_base_device* mc68kcpu);
+static void m68k_op_negx_8_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_negx_8_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_negx_8_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_negx_8_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_negx_8_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_negx_8_di(m68000_base_device* mc68kcpu);
+static void m68k_op_negx_8_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_negx_8_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_negx_8_al(m68000_base_device* mc68kcpu);
+static void m68k_op_negx_16_d(m68000_base_device* mc68kcpu);
+static void m68k_op_negx_16_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_negx_16_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_negx_16_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_negx_16_di(m68000_base_device* mc68kcpu);
+static void m68k_op_negx_16_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_negx_16_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_negx_16_al(m68000_base_device* mc68kcpu);
+static void m68k_op_negx_32_d(m68000_base_device* mc68kcpu);
+static void m68k_op_negx_32_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_negx_32_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_negx_32_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_negx_32_di(m68000_base_device* mc68kcpu);
+static void m68k_op_negx_32_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_negx_32_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_negx_32_al(m68000_base_device* mc68kcpu);
+static void m68k_op_nop(m68000_base_device* mc68kcpu);
+static void m68k_op_not_8_d(m68000_base_device* mc68kcpu);
+static void m68k_op_not_8_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_not_8_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_not_8_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_not_8_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_not_8_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_not_8_di(m68000_base_device* mc68kcpu);
+static void m68k_op_not_8_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_not_8_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_not_8_al(m68000_base_device* mc68kcpu);
+static void m68k_op_not_16_d(m68000_base_device* mc68kcpu);
+static void m68k_op_not_16_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_not_16_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_not_16_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_not_16_di(m68000_base_device* mc68kcpu);
+static void m68k_op_not_16_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_not_16_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_not_16_al(m68000_base_device* mc68kcpu);
+static void m68k_op_not_32_d(m68000_base_device* mc68kcpu);
+static void m68k_op_not_32_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_not_32_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_not_32_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_not_32_di(m68000_base_device* mc68kcpu);
+static void m68k_op_not_32_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_not_32_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_not_32_al(m68000_base_device* mc68kcpu);
+static void m68k_op_or_8_er_d(m68000_base_device* mc68kcpu);
+static void m68k_op_or_8_er_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_or_8_er_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_or_8_er_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_or_8_er_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_or_8_er_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_or_8_er_di(m68000_base_device* mc68kcpu);
+static void m68k_op_or_8_er_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_or_8_er_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_or_8_er_al(m68000_base_device* mc68kcpu);
+static void m68k_op_or_8_er_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_or_8_er_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_or_8_er_i(m68000_base_device* mc68kcpu);
+static void m68k_op_or_16_er_d(m68000_base_device* mc68kcpu);
+static void m68k_op_or_16_er_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_or_16_er_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_or_16_er_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_or_16_er_di(m68000_base_device* mc68kcpu);
+static void m68k_op_or_16_er_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_or_16_er_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_or_16_er_al(m68000_base_device* mc68kcpu);
+static void m68k_op_or_16_er_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_or_16_er_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_or_16_er_i(m68000_base_device* mc68kcpu);
+static void m68k_op_or_32_er_d(m68000_base_device* mc68kcpu);
+static void m68k_op_or_32_er_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_or_32_er_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_or_32_er_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_or_32_er_di(m68000_base_device* mc68kcpu);
+static void m68k_op_or_32_er_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_or_32_er_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_or_32_er_al(m68000_base_device* mc68kcpu);
+static void m68k_op_or_32_er_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_or_32_er_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_or_32_er_i(m68000_base_device* mc68kcpu);
+static void m68k_op_or_8_re_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_or_8_re_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_or_8_re_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_or_8_re_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_or_8_re_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_or_8_re_di(m68000_base_device* mc68kcpu);
+static void m68k_op_or_8_re_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_or_8_re_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_or_8_re_al(m68000_base_device* mc68kcpu);
+static void m68k_op_or_16_re_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_or_16_re_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_or_16_re_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_or_16_re_di(m68000_base_device* mc68kcpu);
+static void m68k_op_or_16_re_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_or_16_re_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_or_16_re_al(m68000_base_device* mc68kcpu);
+static void m68k_op_or_32_re_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_or_32_re_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_or_32_re_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_or_32_re_di(m68000_base_device* mc68kcpu);
+static void m68k_op_or_32_re_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_or_32_re_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_or_32_re_al(m68000_base_device* mc68kcpu);
+static void m68k_op_ori_8_d(m68000_base_device* mc68kcpu);
+static void m68k_op_ori_8_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_ori_8_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_ori_8_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_ori_8_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_ori_8_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_ori_8_di(m68000_base_device* mc68kcpu);
+static void m68k_op_ori_8_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_ori_8_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_ori_8_al(m68000_base_device* mc68kcpu);
+static void m68k_op_ori_16_d(m68000_base_device* mc68kcpu);
+static void m68k_op_ori_16_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_ori_16_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_ori_16_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_ori_16_di(m68000_base_device* mc68kcpu);
+static void m68k_op_ori_16_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_ori_16_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_ori_16_al(m68000_base_device* mc68kcpu);
+static void m68k_op_ori_32_d(m68000_base_device* mc68kcpu);
+static void m68k_op_ori_32_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_ori_32_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_ori_32_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_ori_32_di(m68000_base_device* mc68kcpu);
+static void m68k_op_ori_32_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_ori_32_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_ori_32_al(m68000_base_device* mc68kcpu);
+static void m68k_op_ori_16_toc(m68000_base_device* mc68kcpu);
+static void m68k_op_ori_16_tos(m68000_base_device* mc68kcpu);
+static void m68k_op_pack_16_rr(m68000_base_device* mc68kcpu);
+static void m68k_op_pack_16_mm_ax7(m68000_base_device* mc68kcpu);
+static void m68k_op_pack_16_mm_ay7(m68000_base_device* mc68kcpu);
+static void m68k_op_pack_16_mm_axy7(m68000_base_device* mc68kcpu);
+static void m68k_op_pack_16_mm(m68000_base_device* mc68kcpu);
+static void m68k_op_pea_32_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_pea_32_di(m68000_base_device* mc68kcpu);
+static void m68k_op_pea_32_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_pea_32_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_pea_32_al(m68000_base_device* mc68kcpu);
+static void m68k_op_pea_32_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_pea_32_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_pflusha_32(m68000_base_device* mc68kcpu);
+static void m68k_op_pflushan_32(m68000_base_device* mc68kcpu);
+static void m68k_op_pmmu_32(m68000_base_device* mc68kcpu);
+static void m68k_op_ptest_32(m68000_base_device* mc68kcpu);
+static void m68k_op_reset(m68000_base_device* mc68kcpu);
+static void m68k_op_ror_8_s(m68000_base_device* mc68kcpu);
+static void m68k_op_ror_16_s(m68000_base_device* mc68kcpu);
+static void m68k_op_ror_32_s(m68000_base_device* mc68kcpu);
+static void m68k_op_ror_8_r(m68000_base_device* mc68kcpu);
+static void m68k_op_ror_16_r(m68000_base_device* mc68kcpu);
+static void m68k_op_ror_32_r(m68000_base_device* mc68kcpu);
+static void m68k_op_ror_16_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_ror_16_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_ror_16_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_ror_16_di(m68000_base_device* mc68kcpu);
+static void m68k_op_ror_16_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_ror_16_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_ror_16_al(m68000_base_device* mc68kcpu);
+static void m68k_op_rol_8_s(m68000_base_device* mc68kcpu);
+static void m68k_op_rol_16_s(m68000_base_device* mc68kcpu);
+static void m68k_op_rol_32_s(m68000_base_device* mc68kcpu);
+static void m68k_op_rol_8_r(m68000_base_device* mc68kcpu);
+static void m68k_op_rol_16_r(m68000_base_device* mc68kcpu);
+static void m68k_op_rol_32_r(m68000_base_device* mc68kcpu);
+static void m68k_op_rol_16_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_rol_16_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_rol_16_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_rol_16_di(m68000_base_device* mc68kcpu);
+static void m68k_op_rol_16_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_rol_16_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_rol_16_al(m68000_base_device* mc68kcpu);
+static void m68k_op_roxr_8_s(m68000_base_device* mc68kcpu);
+static void m68k_op_roxr_16_s(m68000_base_device* mc68kcpu);
+static void m68k_op_roxr_32_s(m68000_base_device* mc68kcpu);
+static void m68k_op_roxr_8_r(m68000_base_device* mc68kcpu);
+static void m68k_op_roxr_16_r(m68000_base_device* mc68kcpu);
+static void m68k_op_roxr_32_r(m68000_base_device* mc68kcpu);
+static void m68k_op_roxr_16_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_roxr_16_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_roxr_16_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_roxr_16_di(m68000_base_device* mc68kcpu);
+static void m68k_op_roxr_16_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_roxr_16_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_roxr_16_al(m68000_base_device* mc68kcpu);
+static void m68k_op_roxl_8_s(m68000_base_device* mc68kcpu);
+static void m68k_op_roxl_16_s(m68000_base_device* mc68kcpu);
+static void m68k_op_roxl_32_s(m68000_base_device* mc68kcpu);
+static void m68k_op_roxl_8_r(m68000_base_device* mc68kcpu);
+static void m68k_op_roxl_16_r(m68000_base_device* mc68kcpu);
+static void m68k_op_roxl_32_r(m68000_base_device* mc68kcpu);
+static void m68k_op_roxl_16_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_roxl_16_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_roxl_16_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_roxl_16_di(m68000_base_device* mc68kcpu);
+static void m68k_op_roxl_16_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_roxl_16_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_roxl_16_al(m68000_base_device* mc68kcpu);
+static void m68k_op_rtd_32(m68000_base_device* mc68kcpu);
+static void m68k_op_rte_32(m68000_base_device* mc68kcpu);
+static void m68k_op_rtm_32(m68000_base_device* mc68kcpu);
+static void m68k_op_rtr_32(m68000_base_device* mc68kcpu);
+static void m68k_op_rts_32(m68000_base_device* mc68kcpu);
+static void m68k_op_sbcd_8_rr(m68000_base_device* mc68kcpu);
+static void m68k_op_sbcd_8_mm_ax7(m68000_base_device* mc68kcpu);
+static void m68k_op_sbcd_8_mm_ay7(m68000_base_device* mc68kcpu);
+static void m68k_op_sbcd_8_mm_axy7(m68000_base_device* mc68kcpu);
+static void m68k_op_sbcd_8_mm(m68000_base_device* mc68kcpu);
+static void m68k_op_st_8_d(m68000_base_device* mc68kcpu);
+static void m68k_op_st_8_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_st_8_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_st_8_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_st_8_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_st_8_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_st_8_di(m68000_base_device* mc68kcpu);
+static void m68k_op_st_8_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_st_8_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_st_8_al(m68000_base_device* mc68kcpu);
+static void m68k_op_sf_8_d(m68000_base_device* mc68kcpu);
+static void m68k_op_sf_8_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_sf_8_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_sf_8_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_sf_8_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_sf_8_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_sf_8_di(m68000_base_device* mc68kcpu);
+static void m68k_op_sf_8_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_sf_8_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_sf_8_al(m68000_base_device* mc68kcpu);
+static void m68k_op_shi_8_d(m68000_base_device* mc68kcpu);
+static void m68k_op_sls_8_d(m68000_base_device* mc68kcpu);
+static void m68k_op_scc_8_d(m68000_base_device* mc68kcpu);
+static void m68k_op_scs_8_d(m68000_base_device* mc68kcpu);
+static void m68k_op_sne_8_d(m68000_base_device* mc68kcpu);
+static void m68k_op_seq_8_d(m68000_base_device* mc68kcpu);
+static void m68k_op_svc_8_d(m68000_base_device* mc68kcpu);
+static void m68k_op_svs_8_d(m68000_base_device* mc68kcpu);
+static void m68k_op_spl_8_d(m68000_base_device* mc68kcpu);
+static void m68k_op_smi_8_d(m68000_base_device* mc68kcpu);
+static void m68k_op_sge_8_d(m68000_base_device* mc68kcpu);
+static void m68k_op_slt_8_d(m68000_base_device* mc68kcpu);
+static void m68k_op_sgt_8_d(m68000_base_device* mc68kcpu);
+static void m68k_op_sle_8_d(m68000_base_device* mc68kcpu);
+static void m68k_op_shi_8_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_shi_8_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_shi_8_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_shi_8_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_shi_8_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_shi_8_di(m68000_base_device* mc68kcpu);
+static void m68k_op_shi_8_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_shi_8_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_shi_8_al(m68000_base_device* mc68kcpu);
+static void m68k_op_sls_8_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_sls_8_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_sls_8_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_sls_8_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_sls_8_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_sls_8_di(m68000_base_device* mc68kcpu);
+static void m68k_op_sls_8_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_sls_8_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_sls_8_al(m68000_base_device* mc68kcpu);
+static void m68k_op_scc_8_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_scc_8_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_scc_8_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_scc_8_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_scc_8_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_scc_8_di(m68000_base_device* mc68kcpu);
+static void m68k_op_scc_8_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_scc_8_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_scc_8_al(m68000_base_device* mc68kcpu);
+static void m68k_op_scs_8_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_scs_8_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_scs_8_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_scs_8_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_scs_8_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_scs_8_di(m68000_base_device* mc68kcpu);
+static void m68k_op_scs_8_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_scs_8_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_scs_8_al(m68000_base_device* mc68kcpu);
+static void m68k_op_sne_8_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_sne_8_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_sne_8_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_sne_8_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_sne_8_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_sne_8_di(m68000_base_device* mc68kcpu);
+static void m68k_op_sne_8_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_sne_8_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_sne_8_al(m68000_base_device* mc68kcpu);
+static void m68k_op_seq_8_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_seq_8_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_seq_8_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_seq_8_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_seq_8_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_seq_8_di(m68000_base_device* mc68kcpu);
+static void m68k_op_seq_8_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_seq_8_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_seq_8_al(m68000_base_device* mc68kcpu);
+static void m68k_op_svc_8_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_svc_8_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_svc_8_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_svc_8_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_svc_8_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_svc_8_di(m68000_base_device* mc68kcpu);
+static void m68k_op_svc_8_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_svc_8_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_svc_8_al(m68000_base_device* mc68kcpu);
+static void m68k_op_svs_8_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_svs_8_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_svs_8_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_svs_8_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_svs_8_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_svs_8_di(m68000_base_device* mc68kcpu);
+static void m68k_op_svs_8_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_svs_8_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_svs_8_al(m68000_base_device* mc68kcpu);
+static void m68k_op_spl_8_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_spl_8_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_spl_8_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_spl_8_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_spl_8_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_spl_8_di(m68000_base_device* mc68kcpu);
+static void m68k_op_spl_8_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_spl_8_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_spl_8_al(m68000_base_device* mc68kcpu);
+static void m68k_op_smi_8_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_smi_8_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_smi_8_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_smi_8_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_smi_8_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_smi_8_di(m68000_base_device* mc68kcpu);
+static void m68k_op_smi_8_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_smi_8_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_smi_8_al(m68000_base_device* mc68kcpu);
+static void m68k_op_sge_8_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_sge_8_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_sge_8_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_sge_8_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_sge_8_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_sge_8_di(m68000_base_device* mc68kcpu);
+static void m68k_op_sge_8_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_sge_8_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_sge_8_al(m68000_base_device* mc68kcpu);
+static void m68k_op_slt_8_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_slt_8_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_slt_8_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_slt_8_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_slt_8_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_slt_8_di(m68000_base_device* mc68kcpu);
+static void m68k_op_slt_8_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_slt_8_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_slt_8_al(m68000_base_device* mc68kcpu);
+static void m68k_op_sgt_8_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_sgt_8_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_sgt_8_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_sgt_8_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_sgt_8_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_sgt_8_di(m68000_base_device* mc68kcpu);
+static void m68k_op_sgt_8_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_sgt_8_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_sgt_8_al(m68000_base_device* mc68kcpu);
+static void m68k_op_sle_8_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_sle_8_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_sle_8_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_sle_8_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_sle_8_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_sle_8_di(m68000_base_device* mc68kcpu);
+static void m68k_op_sle_8_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_sle_8_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_sle_8_al(m68000_base_device* mc68kcpu);
+static void m68k_op_stop(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_8_er_d(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_8_er_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_8_er_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_8_er_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_8_er_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_8_er_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_8_er_di(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_8_er_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_8_er_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_8_er_al(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_8_er_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_8_er_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_8_er_i(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_16_er_d(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_16_er_a(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_16_er_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_16_er_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_16_er_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_16_er_di(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_16_er_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_16_er_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_16_er_al(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_16_er_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_16_er_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_16_er_i(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_32_er_d(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_32_er_a(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_32_er_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_32_er_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_32_er_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_32_er_di(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_32_er_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_32_er_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_32_er_al(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_32_er_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_32_er_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_32_er_i(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_8_re_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_8_re_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_8_re_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_8_re_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_8_re_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_8_re_di(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_8_re_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_8_re_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_8_re_al(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_16_re_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_16_re_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_16_re_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_16_re_di(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_16_re_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_16_re_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_16_re_al(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_32_re_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_32_re_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_32_re_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_32_re_di(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_32_re_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_32_re_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_sub_32_re_al(m68000_base_device* mc68kcpu);
+static void m68k_op_suba_16_d(m68000_base_device* mc68kcpu);
+static void m68k_op_suba_16_a(m68000_base_device* mc68kcpu);
+static void m68k_op_suba_16_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_suba_16_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_suba_16_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_suba_16_di(m68000_base_device* mc68kcpu);
+static void m68k_op_suba_16_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_suba_16_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_suba_16_al(m68000_base_device* mc68kcpu);
+static void m68k_op_suba_16_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_suba_16_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_suba_16_i(m68000_base_device* mc68kcpu);
+static void m68k_op_suba_32_d(m68000_base_device* mc68kcpu);
+static void m68k_op_suba_32_a(m68000_base_device* mc68kcpu);
+static void m68k_op_suba_32_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_suba_32_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_suba_32_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_suba_32_di(m68000_base_device* mc68kcpu);
+static void m68k_op_suba_32_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_suba_32_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_suba_32_al(m68000_base_device* mc68kcpu);
+static void m68k_op_suba_32_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_suba_32_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_suba_32_i(m68000_base_device* mc68kcpu);
+static void m68k_op_subi_8_d(m68000_base_device* mc68kcpu);
+static void m68k_op_subi_8_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_subi_8_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_subi_8_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_subi_8_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_subi_8_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_subi_8_di(m68000_base_device* mc68kcpu);
+static void m68k_op_subi_8_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_subi_8_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_subi_8_al(m68000_base_device* mc68kcpu);
+static void m68k_op_subi_16_d(m68000_base_device* mc68kcpu);
+static void m68k_op_subi_16_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_subi_16_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_subi_16_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_subi_16_di(m68000_base_device* mc68kcpu);
+static void m68k_op_subi_16_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_subi_16_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_subi_16_al(m68000_base_device* mc68kcpu);
+static void m68k_op_subi_32_d(m68000_base_device* mc68kcpu);
+static void m68k_op_subi_32_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_subi_32_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_subi_32_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_subi_32_di(m68000_base_device* mc68kcpu);
+static void m68k_op_subi_32_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_subi_32_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_subi_32_al(m68000_base_device* mc68kcpu);
+static void m68k_op_subq_8_d(m68000_base_device* mc68kcpu);
+static void m68k_op_subq_8_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_subq_8_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_subq_8_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_subq_8_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_subq_8_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_subq_8_di(m68000_base_device* mc68kcpu);
+static void m68k_op_subq_8_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_subq_8_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_subq_8_al(m68000_base_device* mc68kcpu);
+static void m68k_op_subq_16_d(m68000_base_device* mc68kcpu);
+static void m68k_op_subq_16_a(m68000_base_device* mc68kcpu);
+static void m68k_op_subq_16_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_subq_16_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_subq_16_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_subq_16_di(m68000_base_device* mc68kcpu);
+static void m68k_op_subq_16_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_subq_16_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_subq_16_al(m68000_base_device* mc68kcpu);
+static void m68k_op_subq_32_d(m68000_base_device* mc68kcpu);
+static void m68k_op_subq_32_a(m68000_base_device* mc68kcpu);
+static void m68k_op_subq_32_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_subq_32_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_subq_32_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_subq_32_di(m68000_base_device* mc68kcpu);
+static void m68k_op_subq_32_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_subq_32_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_subq_32_al(m68000_base_device* mc68kcpu);
+static void m68k_op_subx_8_rr(m68000_base_device* mc68kcpu);
+static void m68k_op_subx_16_rr(m68000_base_device* mc68kcpu);
+static void m68k_op_subx_32_rr(m68000_base_device* mc68kcpu);
+static void m68k_op_subx_8_mm_ax7(m68000_base_device* mc68kcpu);
+static void m68k_op_subx_8_mm_ay7(m68000_base_device* mc68kcpu);
+static void m68k_op_subx_8_mm_axy7(m68000_base_device* mc68kcpu);
+static void m68k_op_subx_8_mm(m68000_base_device* mc68kcpu);
+static void m68k_op_subx_16_mm(m68000_base_device* mc68kcpu);
+static void m68k_op_subx_32_mm(m68000_base_device* mc68kcpu);
+static void m68k_op_swap_32(m68000_base_device* mc68kcpu);
+static void m68k_op_tas_8_d(m68000_base_device* mc68kcpu);
+static void m68k_op_tas_8_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_tas_8_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_tas_8_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_tas_8_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_tas_8_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_tas_8_di(m68000_base_device* mc68kcpu);
+static void m68k_op_tas_8_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_tas_8_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_tas_8_al(m68000_base_device* mc68kcpu);
+static void m68k_op_trap(m68000_base_device* mc68kcpu);
+static void m68k_op_trapt(m68000_base_device* mc68kcpu);
+static void m68k_op_trapt_16(m68000_base_device* mc68kcpu);
+static void m68k_op_trapt_32(m68000_base_device* mc68kcpu);
+static void m68k_op_trapf(m68000_base_device* mc68kcpu);
+static void m68k_op_trapf_16(m68000_base_device* mc68kcpu);
+static void m68k_op_trapf_32(m68000_base_device* mc68kcpu);
+static void m68k_op_traphi(m68000_base_device* mc68kcpu);
+static void m68k_op_trapls(m68000_base_device* mc68kcpu);
+static void m68k_op_trapcc(m68000_base_device* mc68kcpu);
+static void m68k_op_trapcs(m68000_base_device* mc68kcpu);
+static void m68k_op_trapne(m68000_base_device* mc68kcpu);
+static void m68k_op_trapeq(m68000_base_device* mc68kcpu);
+static void m68k_op_trapvc(m68000_base_device* mc68kcpu);
+static void m68k_op_trapvs(m68000_base_device* mc68kcpu);
+static void m68k_op_trappl(m68000_base_device* mc68kcpu);
+static void m68k_op_trapmi(m68000_base_device* mc68kcpu);
+static void m68k_op_trapge(m68000_base_device* mc68kcpu);
+static void m68k_op_traplt(m68000_base_device* mc68kcpu);
+static void m68k_op_trapgt(m68000_base_device* mc68kcpu);
+static void m68k_op_traple(m68000_base_device* mc68kcpu);
+static void m68k_op_traphi_16(m68000_base_device* mc68kcpu);
+static void m68k_op_trapls_16(m68000_base_device* mc68kcpu);
+static void m68k_op_trapcc_16(m68000_base_device* mc68kcpu);
+static void m68k_op_trapcs_16(m68000_base_device* mc68kcpu);
+static void m68k_op_trapne_16(m68000_base_device* mc68kcpu);
+static void m68k_op_trapeq_16(m68000_base_device* mc68kcpu);
+static void m68k_op_trapvc_16(m68000_base_device* mc68kcpu);
+static void m68k_op_trapvs_16(m68000_base_device* mc68kcpu);
+static void m68k_op_trappl_16(m68000_base_device* mc68kcpu);
+static void m68k_op_trapmi_16(m68000_base_device* mc68kcpu);
+static void m68k_op_trapge_16(m68000_base_device* mc68kcpu);
+static void m68k_op_traplt_16(m68000_base_device* mc68kcpu);
+static void m68k_op_trapgt_16(m68000_base_device* mc68kcpu);
+static void m68k_op_traple_16(m68000_base_device* mc68kcpu);
+static void m68k_op_traphi_32(m68000_base_device* mc68kcpu);
+static void m68k_op_trapls_32(m68000_base_device* mc68kcpu);
+static void m68k_op_trapcc_32(m68000_base_device* mc68kcpu);
+static void m68k_op_trapcs_32(m68000_base_device* mc68kcpu);
+static void m68k_op_trapne_32(m68000_base_device* mc68kcpu);
+static void m68k_op_trapeq_32(m68000_base_device* mc68kcpu);
+static void m68k_op_trapvc_32(m68000_base_device* mc68kcpu);
+static void m68k_op_trapvs_32(m68000_base_device* mc68kcpu);
+static void m68k_op_trappl_32(m68000_base_device* mc68kcpu);
+static void m68k_op_trapmi_32(m68000_base_device* mc68kcpu);
+static void m68k_op_trapge_32(m68000_base_device* mc68kcpu);
+static void m68k_op_traplt_32(m68000_base_device* mc68kcpu);
+static void m68k_op_trapgt_32(m68000_base_device* mc68kcpu);
+static void m68k_op_traple_32(m68000_base_device* mc68kcpu);
+static void m68k_op_trapv(m68000_base_device* mc68kcpu);
+static void m68k_op_tst_8_d(m68000_base_device* mc68kcpu);
+static void m68k_op_tst_8_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_tst_8_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_tst_8_pi7(m68000_base_device* mc68kcpu);
+static void m68k_op_tst_8_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_tst_8_pd7(m68000_base_device* mc68kcpu);
+static void m68k_op_tst_8_di(m68000_base_device* mc68kcpu);
+static void m68k_op_tst_8_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_tst_8_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_tst_8_al(m68000_base_device* mc68kcpu);
+static void m68k_op_tst_8_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_tst_8_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_tst_8_i(m68000_base_device* mc68kcpu);
+static void m68k_op_tst_16_d(m68000_base_device* mc68kcpu);
+static void m68k_op_tst_16_a(m68000_base_device* mc68kcpu);
+static void m68k_op_tst_16_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_tst_16_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_tst_16_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_tst_16_di(m68000_base_device* mc68kcpu);
+static void m68k_op_tst_16_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_tst_16_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_tst_16_al(m68000_base_device* mc68kcpu);
+static void m68k_op_tst_16_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_tst_16_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_tst_16_i(m68000_base_device* mc68kcpu);
+static void m68k_op_tst_32_d(m68000_base_device* mc68kcpu);
+static void m68k_op_tst_32_a(m68000_base_device* mc68kcpu);
+static void m68k_op_tst_32_ai(m68000_base_device* mc68kcpu);
+static void m68k_op_tst_32_pi(m68000_base_device* mc68kcpu);
+static void m68k_op_tst_32_pd(m68000_base_device* mc68kcpu);
+static void m68k_op_tst_32_di(m68000_base_device* mc68kcpu);
+static void m68k_op_tst_32_ix(m68000_base_device* mc68kcpu);
+static void m68k_op_tst_32_aw(m68000_base_device* mc68kcpu);
+static void m68k_op_tst_32_al(m68000_base_device* mc68kcpu);
+static void m68k_op_tst_32_pcdi(m68000_base_device* mc68kcpu);
+static void m68k_op_tst_32_pcix(m68000_base_device* mc68kcpu);
+static void m68k_op_tst_32_i(m68000_base_device* mc68kcpu);
+static void m68k_op_unlk_32_a7(m68000_base_device* mc68kcpu);
+static void m68k_op_unlk_32(m68000_base_device* mc68kcpu);
+static void m68k_op_unpk_16_rr(m68000_base_device* mc68kcpu);
+static void m68k_op_unpk_16_mm_ax7(m68000_base_device* mc68kcpu);
+static void m68k_op_unpk_16_mm_ay7(m68000_base_device* mc68kcpu);
+static void m68k_op_unpk_16_mm_axy7(m68000_base_device* mc68kcpu);
+static void m68k_op_unpk_16_mm(m68000_base_device* mc68kcpu);
+static void m68k_op_cinv_32(m68000_base_device* mc68kcpu);
+static void m68k_op_cpush_32(m68000_base_device* mc68kcpu);
+#else
+/* Build the opcode handler table */
+void m68ki_build_opcode_table(void);
+
+extern void (*m68ki_instruction_jump_table[][0x10000])(m68000_base_device *m68k); /* opcode handler jump table */
+extern unsigned char m68ki_cycles[][0x10000];
+
+
+/* ======================================================================== */
+/* ============================== END OF FILE ============================= */
+/* ======================================================================== */
+
+
+#endif
diff --git a/src/devices/cpu/m68000/makefile b/src/devices/cpu/m68000/makefile
index be25a067a78..12b29fa267a 100644
--- a/src/devices/cpu/m68000/makefile
+++ b/src/devices/cpu/m68000/makefile
@@ -8,30 +8,24 @@ ifeq ($(OS),os2)
EXE := .exe
endif
-ifndef verbose
- SILENT = @
-endif
-CC = gcc
-CXX = g++
-
.PHONY: all clean
-all : m68kmake$(EXE) m68kops.cpp
+all : m68kmake$(EXE) m68kops.c clean
clean:
@echo Cleaning...
-@rm -f m68kmake$(EXE)
-@rm -f m68kmake.o
- -@rm -f m68kops.*
-m68kmake.o: m68kmake.cpp
- $(SILENT) $(CC) -x c++ -std=c++11 -o "$@" -c "$<"
+m68kmake.o: m68kmake.c
+ @echo $(notdir $<)
+ @gcc -x c++ -std=gnu++98 -o "$@" -c "$<"
m68kmake$(EXE) : m68kmake.o
@echo Linking $@...
- $(SILENT) $(CXX) -lstdc++ $^ -o $@
+ @g++ -lstdc++ $^ -o $@
-m68kops.cpp: m68kmake$(EXE) m68k_in.cpp
+m68kops.c: m68kmake$(EXE) m68k_in.c
@echo Generating M68K source files...
- $(SILENT) ./m68kmake$(EXE) . m68k_in.cpp
+ @m68kmake$(EXE) . m68k_in.c
diff --git a/src/devices/cpu/mips/mips3.cpp b/src/devices/cpu/mips/mips3.cpp
index 711b9c3edf4..f4747b7304c 100644
--- a/src/devices/cpu/mips/mips3.cpp
+++ b/src/devices/cpu/mips/mips3.cpp
@@ -120,10 +120,8 @@ const device_type RM7000BE = &device_creator<rm7000be_device>;
const device_type RM7000LE = &device_creator<rm7000le_device>;
-// VR4300 and VR5432 have 4 fewer PFN bits, and only 32 TLB entries
mips3_device::mips3_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, mips3_flavor flavor, endianness_t endianness)
: cpu_device(mconfig, type, name, tag, owner, clock, shortname, __FILE__)
- , device_vtlb_interface(mconfig, *this, AS_PROGRAM)
, m_program_config("program", endianness, 32, 32, 0, 32, MIPS3_MIN_PAGE_SHIFT)
, m_flavor(flavor)
, m_core(nullptr)
@@ -136,6 +134,7 @@ mips3_device::mips3_device(const machine_config &mconfig, device_type type, cons
, m_ll_value(0)
, m_lld_value(0)
, m_badcop_value(0)
+ , m_tlb_table(nullptr)
, m_lwl(endianness == ENDIANNESS_BIG ? &mips3_device::lwl_be : &mips3_device::lwl_le)
, m_lwr(endianness == ENDIANNESS_BIG ? &mips3_device::lwr_be : &mips3_device::lwr_le)
, m_swl(endianness == ENDIANNESS_BIG ? &mips3_device::swl_be : &mips3_device::swl_le)
@@ -145,13 +144,14 @@ mips3_device::mips3_device(const machine_config &mconfig, device_type type, cons
, m_sdl(endianness == ENDIANNESS_BIG ? &mips3_device::sdl_be : &mips3_device::sdl_le)
, m_sdr(endianness == ENDIANNESS_BIG ? &mips3_device::sdr_be : &mips3_device::sdr_le)
, c_system_clock(0)
- , m_pfnmask(flavor == MIPS3_TYPE_VR4300 ? 0x000fffff : 0x00ffffff)
- , m_tlbentries(flavor == MIPS3_TYPE_VR4300 ? 32 : MIPS3_MAX_TLB_ENTRIES)
+ , m_pfnmask(0)
+ , m_tlbentries(0)
, m_bigendian(endianness == ENDIANNESS_BIG)
, m_byte_xor(m_bigendian ? BYTE4_XOR_BE(0) : BYTE4_XOR_LE(0))
, m_word_xor(m_bigendian ? WORD_XOR_BE(0) : WORD_XOR_LE(0))
, c_icache_size(0)
, c_dcache_size(0)
+ , m_vtlb(nullptr)
, m_fastram_select(0)
, m_debugger_temp(0)
, m_cache(CACHE_SIZE + sizeof(internal_mips3_state))
@@ -190,14 +190,17 @@ mips3_device::mips3_device(const machine_config &mconfig, device_type type, cons
}
memset(m_fastram, 0, sizeof(m_fastram));
memset(m_hotspot, 0, sizeof(m_hotspot));
-
- // configure the virtual TLB
- set_vtlb_fixed_entries(2 * m_tlbentries + 2);
}
void mips3_device::device_stop()
{
+ if (m_vtlb != nullptr)
+ {
+ vtlb_free(m_vtlb);
+ m_vtlb = nullptr;
+ }
+
if (m_drcfe != nullptr)
{
m_drcfe = nullptr;
@@ -328,12 +331,28 @@ void mips3_device::device_start()
m_program = &space(AS_PROGRAM);
m_direct = &m_program->direct();
+ /* configure flavor-specific parameters */
+ m_pfnmask = 0x00ffffff;
+ m_tlbentries = MIPS3_MAX_TLB_ENTRIES;
+
+ /* VR4300 and VR5432 have 4 fewer PFN bits, and only 32 TLB entries */
+ if (m_flavor == MIPS3_TYPE_VR4300)
+ {
+ m_pfnmask = 0x000fffff;
+ m_tlbentries = 32;
+ }
+
/* set up the endianness */
m_program->accessors(m_memory);
+ /* allocate the virtual TLB */
+ m_vtlb = vtlb_alloc(this, AS_PROGRAM, 2 * m_tlbentries + 2, 0);
+
/* allocate a timer for the compare interrupt */
m_compare_int_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(mips3_device::compare_int_callback), this));
+ m_tlb_table = vtlb_table(m_vtlb);
+
UINT32 flags = 0;
/* initialize the UML generator */
m_drcuml = std::make_unique<drcuml_state>(*this, m_cache, flags, 8, 32, 2);
@@ -931,13 +950,13 @@ void mips3_device::device_reset()
entry->entry_hi = 0xffffffff;
entry->entry_lo[0] = 0xfffffff8;
entry->entry_lo[1] = 0xfffffff8;
- vtlb_load(2 * tlbindex + 0, 0, 0, 0);
- vtlb_load(2 * tlbindex + 1, 0, 0, 0);
+ vtlb_load(m_vtlb, 2 * tlbindex + 0, 0, 0, 0);
+ vtlb_load(m_vtlb, 2 * tlbindex + 1, 0, 0, 0);
}
/* load the fixed TLB range */
- vtlb_load(2 * m_tlbentries + 0, (0xa0000000 - 0x80000000) >> MIPS3_MIN_PAGE_SHIFT, 0x80000000, 0x00000000 | VTLB_READ_ALLOWED | VTLB_WRITE_ALLOWED | VTLB_FETCH_ALLOWED | VTLB_FLAG_VALID);
- vtlb_load(2 * m_tlbentries + 1, (0xc0000000 - 0xa0000000) >> MIPS3_MIN_PAGE_SHIFT, 0xa0000000, 0x00000000 | VTLB_READ_ALLOWED | VTLB_WRITE_ALLOWED | VTLB_FETCH_ALLOWED | VTLB_FLAG_VALID);
+ vtlb_load(m_vtlb, 2 * m_tlbentries + 0, (0xa0000000 - 0x80000000) >> MIPS3_MIN_PAGE_SHIFT, 0x80000000, 0x00000000 | VTLB_READ_ALLOWED | VTLB_WRITE_ALLOWED | VTLB_FETCH_ALLOWED | VTLB_FLAG_VALID);
+ vtlb_load(m_vtlb, 2 * m_tlbentries + 1, (0xc0000000 - 0xa0000000) >> MIPS3_MIN_PAGE_SHIFT, 0xa0000000, 0x00000000 | VTLB_READ_ALLOWED | VTLB_WRITE_ALLOWED | VTLB_FETCH_ALLOWED | VTLB_FLAG_VALID);
m_core->mode = (MODE_KERNEL << 1) | 0;
m_cache_dirty = TRUE;
@@ -950,7 +969,7 @@ bool mips3_device::memory_translate(address_spacenum spacenum, int intention, of
/* only applies to the program address space */
if (spacenum == AS_PROGRAM)
{
- const vtlb_entry *table = vtlb_table();
+ const vtlb_entry *table = vtlb_table(m_vtlb);
vtlb_entry entry = table[address >> MIPS3_MIN_PAGE_SHIFT];
if ((entry & (1 << (intention & (TRANSLATE_TYPE_MASK | TRANSLATE_USER_MASK)))) == 0)
return false;
@@ -979,7 +998,7 @@ offs_t mips3_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *op
inline bool mips3_device::RBYTE(offs_t address, UINT32 *result)
{
- const UINT32 tlbval = vtlb_table()[address >> 12];
+ const UINT32 tlbval = m_tlb_table[address >> 12];
if (tlbval & VTLB_READ_ALLOWED)
{
const UINT32 tlbaddress = (tlbval & ~0xfff) | (address & 0xfff);
@@ -1012,7 +1031,7 @@ inline bool mips3_device::RBYTE(offs_t address, UINT32 *result)
inline bool mips3_device::RHALF(offs_t address, UINT32 *result)
{
- const UINT32 tlbval = vtlb_table()[address >> 12];
+ const UINT32 tlbval = m_tlb_table[address >> 12];
if (tlbval & VTLB_READ_ALLOWED)
{
const UINT32 tlbaddress = (tlbval & ~0xfff) | (address & 0xfff);
@@ -1045,7 +1064,7 @@ inline bool mips3_device::RHALF(offs_t address, UINT32 *result)
inline bool mips3_device::RWORD(offs_t address, UINT32 *result)
{
- const UINT32 tlbval = vtlb_table()[address >> 12];
+ const UINT32 tlbval = m_tlb_table[address >> 12];
if (tlbval & VTLB_READ_ALLOWED)
{
const UINT32 tlbaddress = (tlbval & ~0xfff) | (address & 0xfff);
@@ -1078,7 +1097,7 @@ inline bool mips3_device::RWORD(offs_t address, UINT32 *result)
inline bool mips3_device::RWORD_MASKED(offs_t address, UINT32 *result, UINT32 mem_mask)
{
- const UINT32 tlbval = vtlb_table()[address >> 12];
+ const UINT32 tlbval = m_tlb_table[address >> 12];
if (tlbval & VTLB_READ_ALLOWED)
{
*result = (*m_memory.read_dword_masked)(*m_program, (tlbval & ~0xfff) | (address & 0xfff), mem_mask);
@@ -1101,7 +1120,7 @@ inline bool mips3_device::RWORD_MASKED(offs_t address, UINT32 *result, UINT32 me
inline bool mips3_device::RDOUBLE(offs_t address, UINT64 *result)
{
- const UINT32 tlbval = vtlb_table()[address >> 12];
+ const UINT32 tlbval = m_tlb_table[address >> 12];
if (tlbval & VTLB_READ_ALLOWED)
{
*result = (*m_memory.read_qword)(*m_program, (tlbval & ~0xfff) | (address & 0xfff));
@@ -1124,7 +1143,7 @@ inline bool mips3_device::RDOUBLE(offs_t address, UINT64 *result)
inline bool mips3_device::RDOUBLE_MASKED(offs_t address, UINT64 *result, UINT64 mem_mask)
{
- const UINT32 tlbval = vtlb_table()[address >> 12];
+ const UINT32 tlbval = m_tlb_table[address >> 12];
if (tlbval & VTLB_READ_ALLOWED)
{
*result = (*m_memory.read_qword_masked)(*m_program, (tlbval & ~0xfff) | (address & 0xfff), mem_mask);
@@ -1147,7 +1166,7 @@ inline bool mips3_device::RDOUBLE_MASKED(offs_t address, UINT64 *result, UINT64
inline void mips3_device::WBYTE(offs_t address, UINT8 data)
{
- const UINT32 tlbval = vtlb_table()[address >> 12];
+ const UINT32 tlbval = m_tlb_table[address >> 12];
if (tlbval & VTLB_WRITE_ALLOWED)
{
const UINT32 tlbaddress = (tlbval & ~0xfff) | (address & 0xfff);
@@ -1181,7 +1200,7 @@ inline void mips3_device::WBYTE(offs_t address, UINT8 data)
inline void mips3_device::WHALF(offs_t address, UINT16 data)
{
- const UINT32 tlbval = vtlb_table()[address >> 12];
+ const UINT32 tlbval = m_tlb_table[address >> 12];
if (tlbval & VTLB_WRITE_ALLOWED)
{
const UINT32 tlbaddress = (tlbval & ~0xfff) | (address & 0xfff);
@@ -1215,7 +1234,7 @@ inline void mips3_device::WHALF(offs_t address, UINT16 data)
inline void mips3_device::WWORD(offs_t address, UINT32 data)
{
- const UINT32 tlbval = vtlb_table()[address >> 12];
+ const UINT32 tlbval = m_tlb_table[address >> 12];
if (tlbval & VTLB_WRITE_ALLOWED)
{
const UINT32 tlbaddress = (tlbval & ~0xfff) | (address & 0xfff);
@@ -1249,7 +1268,7 @@ inline void mips3_device::WWORD(offs_t address, UINT32 data)
inline void mips3_device::WWORD_MASKED(offs_t address, UINT32 data, UINT32 mem_mask)
{
- const UINT32 tlbval = vtlb_table()[address >> 12];
+ const UINT32 tlbval = m_tlb_table[address >> 12];
if (tlbval & VTLB_WRITE_ALLOWED)
{
(*m_memory.write_dword_masked)(*m_program, (tlbval & ~0xfff) | (address & 0xfff), data, mem_mask);
@@ -1273,7 +1292,7 @@ inline void mips3_device::WWORD_MASKED(offs_t address, UINT32 data, UINT32 mem_m
inline void mips3_device::WDOUBLE(offs_t address, UINT64 data)
{
- const UINT32 tlbval = vtlb_table()[address >> 12];
+ const UINT32 tlbval = m_tlb_table[address >> 12];
if (tlbval & VTLB_WRITE_ALLOWED)
{
(*m_memory.write_qword)(*m_program, (tlbval & ~0xfff) | (address & 0xfff), data);
@@ -1297,7 +1316,7 @@ inline void mips3_device::WDOUBLE(offs_t address, UINT64 data)
inline void mips3_device::WDOUBLE_MASKED(offs_t address, UINT64 data, UINT64 mem_mask)
{
- const UINT32 tlbval = vtlb_table()[address >> 12];
+ const UINT32 tlbval = m_tlb_table[address >> 12];
if (tlbval & VTLB_WRITE_ALLOWED)
{
(*m_memory.write_qword_masked)(*m_program, (tlbval & ~0xfff) | (address & 0xfff), data, mem_mask);
diff --git a/src/devices/cpu/mips/mips3.h b/src/devices/cpu/mips/mips3.h
index 1715861bb89..9e0de9ed419 100644
--- a/src/devices/cpu/mips/mips3.h
+++ b/src/devices/cpu/mips/mips3.h
@@ -15,7 +15,7 @@
#define __MIPS3_H__
-#include "divtlb.h"
+#include "cpu/vtlb.h"
#include "cpu/drcfe.h"
#include "cpu/drcuml.h"
#include "cpu/drcumlsh.h"
@@ -245,7 +245,7 @@ struct compiler_state
class mips3_frontend;
-class mips3_device : public cpu_device, public device_vtlb_interface
+class mips3_device : public cpu_device
{
friend class mips3_frontend;
@@ -355,6 +355,7 @@ private:
UINT32 m_ll_value;
UINT64 m_lld_value;
UINT32 m_badcop_value;
+ const vtlb_entry *m_tlb_table;
/* endian-dependent load/store */
typedef void (mips3_device::*loadstore_func)(UINT32 op);
@@ -388,6 +389,7 @@ private:
size_t c_dcache_size;
/* MMU */
+ vtlb_state * m_vtlb;
mips3_tlb_entry m_tlb[MIPS3_MAX_TLB_ENTRIES];
/* fast RAM */
diff --git a/src/devices/cpu/mips/mips3com.cpp b/src/devices/cpu/mips/mips3com.cpp
index 2fcf8de1844..bcd6f6f349a 100644
--- a/src/devices/cpu/mips/mips3com.cpp
+++ b/src/devices/cpu/mips/mips3com.cpp
@@ -325,8 +325,8 @@ void mips3_device::tlb_map_entry(int tlbindex)
/* the ASID doesn't match the current ASID, and if the page isn't global, unmap it from the TLB */
if (!tlb_entry_matches_asid(entry, current_asid) && !tlb_entry_is_global(entry))
{
- vtlb_load(2 * tlbindex + 0, 0, 0, 0);
- vtlb_load(2 * tlbindex + 1, 0, 0, 0);
+ vtlb_load(m_vtlb, 2 * tlbindex + 0, 0, 0, 0);
+ vtlb_load(m_vtlb, 2 * tlbindex + 1, 0, 0, 0);
return;
}
@@ -334,8 +334,8 @@ void mips3_device::tlb_map_entry(int tlbindex)
vpn = ((entry->entry_hi >> 13) & 0x07ffffff) << 1;
if (vpn >= (1 << (MIPS3_MAX_PADDR_SHIFT - MIPS3_MIN_PAGE_SHIFT)))
{
- vtlb_load(2 * tlbindex + 0, 0, 0, 0);
- vtlb_load(2 * tlbindex + 1, 0, 0, 0);
+ vtlb_load(m_vtlb, 2 * tlbindex + 0, 0, 0, 0);
+ vtlb_load(m_vtlb, 2 * tlbindex + 1, 0, 0, 0);
return;
}
@@ -369,9 +369,9 @@ void mips3_device::tlb_map_entry(int tlbindex)
/* load the virtual TLB with the corresponding entries */
if ((effvpn + count) <= (0x80000000 >> MIPS3_MIN_PAGE_SHIFT) || effvpn >= (0xc0000000 >> MIPS3_MIN_PAGE_SHIFT))
- vtlb_load(2 * tlbindex + which, count, effvpn << MIPS3_MIN_PAGE_SHIFT, (pfn << MIPS3_MIN_PAGE_SHIFT) | flags);
+ vtlb_load(m_vtlb, 2 * tlbindex + which, count, effvpn << MIPS3_MIN_PAGE_SHIFT, (pfn << MIPS3_MIN_PAGE_SHIFT) | flags);
else
- vtlb_load(2 * tlbindex + which, 0, 0, 0);
+ vtlb_load(m_vtlb, 2 * tlbindex + which, 0, 0, 0);
}
}
diff --git a/src/devices/cpu/mips/mips3com.h b/src/devices/cpu/mips/mips3com.h
index 20facae78d0..86d7f0c7a05 100644
--- a/src/devices/cpu/mips/mips3com.h
+++ b/src/devices/cpu/mips/mips3com.h
@@ -14,6 +14,7 @@
#define __MIPS3COM_H__
#include "mips3.h"
+#include "cpu/vtlb.h"
/***************************************************************************
diff --git a/src/devices/cpu/mips/mips3drc.cpp b/src/devices/cpu/mips/mips3drc.cpp
index 7b6da3a1626..4e6e9771a38 100644
--- a/src/devices/cpu/mips/mips3drc.cpp
+++ b/src/devices/cpu/mips/mips3drc.cpp
@@ -667,7 +667,7 @@ void mips3_device::static_generate_tlb_mismatch()
UML_RECOVER(block, I0, MAPVAR_PC); // recover i0,PC
UML_MOV(block, mem(&m_core->pc), I0); // mov <pc>,i0
UML_SHR(block, I1, I0, 12); // shr i1,i0,12
- UML_LOAD(block, I1, (void *)vtlb_table(), I1, SIZE_DWORD, SCALE_x4);// load i1,[vtlb_table],i1,dword
+ UML_LOAD(block, I1, (void *)vtlb_table(m_vtlb), I1, SIZE_DWORD, SCALE_x4);// load i1,[vtlb_table],i1,dword
if (PRINTF_MMU)
{
static const char text[] = "TLB mismatch @ %08X (ent=%08X)\n";
@@ -839,7 +839,7 @@ void mips3_device::static_generate_memory_accessor(int mode, int size, int iswri
/* general case: assume paging and perform a translation */
UML_SHR(block, I3, I0, 12); // shr i3,i0,12
- UML_LOAD(block, I3, (void *)vtlb_table(), I3, SIZE_DWORD, SCALE_x4);// load i3,[vtlb_table],i3,dword
+ UML_LOAD(block, I3, (void *)vtlb_table(m_vtlb), I3, SIZE_DWORD, SCALE_x4);// load i3,[vtlb_table],i3,dword
UML_TEST(block, I3, iswrite ? VTLB_WRITE_ALLOWED : VTLB_READ_ALLOWED);// test i3,iswrite ? VTLB_WRITE_ALLOWED : VTLB_READ_ALLOWED
UML_JMPc(block, COND_Z, tlbmiss = label++); // jmp tlbmiss,z
UML_ROLINS(block, I0, I3, 0, 0xfffff000); // rolins i0,i3,0,0xfffff000
@@ -1226,7 +1226,7 @@ void mips3_device::generate_sequence_instruction(drcuml_block *block, compiler_s
/* validate our TLB entry at this PC; if we fail, we need to handle it */
if ((desc->flags & OPFLAG_VALIDATE_TLB) && (desc->pc < 0x80000000 || desc->pc >= 0xc0000000))
{
- const vtlb_entry *tlbtable = vtlb_table();
+ const vtlb_entry *tlbtable = vtlb_table(m_vtlb);
/* if we currently have a valid TLB read entry, we just verify */
if (tlbtable[desc->pc >> 12] & VTLB_FETCH_ALLOWED)
diff --git a/src/devices/cpu/pdp1/pdp1.cpp b/src/devices/cpu/pdp1/pdp1.cpp
index d7a9ad008fb..cbb43535d7f 100644
--- a/src/devices/cpu/pdp1/pdp1.cpp
+++ b/src/devices/cpu/pdp1/pdp1.cpp
@@ -384,7 +384,7 @@ pdp1_device::pdp1_device(const machine_config &mconfig, const char *tag, device_
: cpu_device(mconfig, PDP1, "PDP1", tag, owner, clock, "pdp1_cpu", __FILE__)
, m_program_config("program", ENDIANNESS_BIG, 32, 18, 0)
{
- m_program_config.m_is_octal = true;
+ m_is_octal = true;
}
diff --git a/src/devices/cpu/pdp1/tx0.cpp b/src/devices/cpu/pdp1/tx0.cpp
index 8e5b41776a0..3a4fd7f1fb1 100644
--- a/src/devices/cpu/pdp1/tx0.cpp
+++ b/src/devices/cpu/pdp1/tx0.cpp
@@ -61,7 +61,7 @@ tx0_device::tx0_device(const machine_config &mconfig, device_type type, const ch
, m_sel_handler(*this)
, m_io_reset_callback(*this)
{
- m_program_config.m_is_octal = true;
+ m_is_octal = true;
}
tx0_8kw_device::tx0_8kw_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
diff --git a/src/devices/cpu/powerpc/ppc.h b/src/devices/cpu/powerpc/ppc.h
index 450b4ca2257..5e40ee88249 100644
--- a/src/devices/cpu/powerpc/ppc.h
+++ b/src/devices/cpu/powerpc/ppc.h
@@ -14,7 +14,7 @@
#ifndef __PPC_H__
#define __PPC_H__
-#include "divtlb.h"
+#include "cpu/vtlb.h"
#include "cpu/drcfe.h"
#include "cpu/drcuml.h"
#include "cpu/drcumlsh.h"
@@ -171,7 +171,7 @@ enum
class ppc_frontend;
-class ppc_device : public cpu_device, public device_vtlb_interface
+class ppc_device : public cpu_device
{
friend class ppc_frontend;
@@ -462,6 +462,9 @@ protected:
UINT32 m_sebr;
UINT32 m_ser;
+ /* MMU */
+ vtlb_state *m_vtlb;
+
/* architectural distinctions */
powerpc_flavor m_flavor;
UINT32 m_cap;
diff --git a/src/devices/cpu/powerpc/ppccom.cpp b/src/devices/cpu/powerpc/ppccom.cpp
index a9a26b29a5c..9036ff2c794 100644
--- a/src/devices/cpu/powerpc/ppccom.cpp
+++ b/src/devices/cpu/powerpc/ppccom.cpp
@@ -209,11 +209,11 @@ const device_type PPC405GP = &device_creator<ppc405gp_device>;
ppc_device::ppc_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, int address_bits, int data_bits, powerpc_flavor flavor, UINT32 cap, UINT32 tb_divisor, address_map_constructor internal_map)
: cpu_device(mconfig, type, name, tag, owner, clock, shortname, __FILE__)
- , device_vtlb_interface(mconfig, *this, AS_PROGRAM)
, m_program_config("program", ENDIANNESS_BIG, data_bits, address_bits, 0, internal_map)
, c_bus_frequency(0)
, m_core(nullptr)
, m_bus_freq_multiplier(1)
+ , m_vtlb(nullptr)
, m_flavor(flavor)
, m_cap(cap)
, m_tb_divisor(tb_divisor)
@@ -224,11 +224,6 @@ ppc_device::ppc_device(const machine_config &mconfig, device_type type, const ch
{
m_program_config.m_logaddr_width = 32;
m_program_config.m_page_shift = POWERPC_MIN_PAGE_SHIFT;
-
- // configure the virtual TLB
- set_vtlb_dynamic_entries(POWERPC_TLB_ENTRIES);
- if (m_cap & PPCCAP_603_MMU)
- set_vtlb_fixed_entries(PPC603_FIXED_TLB_ENTRIES);
}
//ppc403_device::ppc403_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
@@ -713,6 +708,9 @@ void ppc_device::device_start()
if (!(m_cap & PPCCAP_4XX) && space_config()->m_endianness != ENDIANNESS_NATIVE)
m_codexor = 4;
+ /* allocate the virtual TLB */
+ m_vtlb = vtlb_alloc(this, AS_PROGRAM, (m_cap & PPCCAP_603_MMU) ? PPC603_FIXED_TLB_ENTRIES : 0, POWERPC_TLB_ENTRIES);
+
/* allocate a timer for the compare interrupt */
if ((m_cap & PPCCAP_OEA) && (m_tb_divisor))
m_decrementer_int_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(ppc_device::decrementer_int_callback), this));
@@ -1150,6 +1148,9 @@ void ppc_device::state_string_export(const device_state_entry &entry, std::strin
void ppc_device::device_stop()
{
+ if (m_vtlb != nullptr)
+ vtlb_free(m_vtlb);
+ m_vtlb = nullptr;
}
@@ -1198,11 +1199,12 @@ void ppc_device::device_reset()
m_core->irq_pending = 0;
/* flush the TLB */
+ vtlb_flush_dynamic(m_vtlb);
if (m_cap & PPCCAP_603_MMU)
{
for (int tlbindex = 0; tlbindex < PPC603_FIXED_TLB_ENTRIES; tlbindex++)
{
- vtlb_load(tlbindex, 0, 0, 0);
+ vtlb_load(m_vtlb, tlbindex, 0, 0, 0);
}
}
@@ -1383,7 +1385,7 @@ UINT32 ppc_device::ppccom_translate_address_internal(int intention, offs_t &addr
/* if we're simulating the 603 MMU, fill in the data and stop here */
if (m_cap & PPCCAP_603_MMU)
{
- UINT32 entry = vtlb_table()[address >> 12];
+ UINT32 entry = vtlb_table(m_vtlb)[address >> 12];
m_core->mmu603_cmp = 0x80000000 | ((segreg & 0xffffff) << 7) | (0 << 6) | ((address >> 22) & 0x3f);
m_core->mmu603_hash[0] = hashbase | ((hash << 6) & hashmask);
m_core->mmu603_hash[1] = hashbase | ((~hash << 6) & hashmask);
@@ -1463,7 +1465,7 @@ bool ppc_device::memory_translate(address_spacenum spacenum, int intention, offs
void ppc_device::ppccom_tlb_fill()
{
- vtlb_fill(m_core->param0, m_core->param1);
+ vtlb_fill(m_vtlb, m_core->param0, m_core->param1);
}
@@ -1474,7 +1476,7 @@ void ppc_device::ppccom_tlb_fill()
void ppc_device::ppccom_tlb_flush()
{
- vtlb_flush_dynamic();
+ vtlb_flush_dynamic(m_vtlb);
}
@@ -1490,7 +1492,7 @@ void ppc_device::ppccom_tlb_flush()
void ppc_device::ppccom_execute_tlbie()
{
- vtlb_flush_address(m_core->param0);
+ vtlb_flush_address(m_vtlb, m_core->param0);
}
@@ -1501,7 +1503,7 @@ void ppc_device::ppccom_execute_tlbie()
void ppc_device::ppccom_execute_tlbia()
{
- vtlb_flush_dynamic();
+ vtlb_flush_dynamic(m_vtlb);
}
@@ -1528,7 +1530,7 @@ void ppc_device::ppccom_execute_tlbl()
flags |= VTLB_FETCH_ALLOWED;
/* load the entry */
- vtlb_load(entrynum, 1, address, (m_core->spr[SPR603_RPA] & 0xfffff000) | flags);
+ vtlb_load(m_vtlb, entrynum, 1, address, (m_core->spr[SPR603_RPA] & 0xfffff000) | flags);
}
diff --git a/src/devices/cpu/powerpc/ppcdrc.cpp b/src/devices/cpu/powerpc/ppcdrc.cpp
index 35b984d240d..ed502d344de 100644
--- a/src/devices/cpu/powerpc/ppcdrc.cpp
+++ b/src/devices/cpu/powerpc/ppcdrc.cpp
@@ -743,11 +743,11 @@ void ppc_device::static_generate_tlb_mismatch()
UML_HANDLE(block, *m_tlb_mismatch); // handle tlb_mismatch
UML_RECOVER(block, I0, MAPVAR_PC); // recover i0,PC
UML_SHR(block, I1, I0, 12); // shr i1,i0,12
- UML_LOAD(block, I2, (void *)vtlb_table(), I1, SIZE_DWORD, SCALE_x4); // load i2,[vtlb],i1,dword
+ UML_LOAD(block, I2, (void *)vtlb_table(m_vtlb), I1, SIZE_DWORD, SCALE_x4); // load i2,[vtlb],i1,dword
UML_MOV(block, mem(&m_core->param0), I0); // mov [param0],i0
UML_MOV(block, mem(&m_core->param1), TRANSLATE_FETCH); // mov [param1],TRANSLATE_FETCH
UML_CALLC(block, (c_function)cfunc_ppccom_tlb_fill, this); // callc tlbfill,ppc
- UML_LOAD(block, I1, (void *)vtlb_table(), I1, SIZE_DWORD, SCALE_x4); // load i1,[vtlb],i1,dword
+ UML_LOAD(block, I1, (void *)vtlb_table(m_vtlb), I1, SIZE_DWORD, SCALE_x4); // load i1,[vtlb],i1,dword
UML_TEST(block, I1, VTLB_FETCH_ALLOWED); // test i1,VTLB_FETCH_ALLOWED
UML_JMPc(block, COND_Z, isi = label++); // jmp isi,z
UML_CMP(block, I2, 0); // cmp i2,0
@@ -1021,7 +1021,7 @@ void ppc_device::static_generate_memory_accessor(int mode, int size, int iswrite
if (((m_cap & PPCCAP_OEA) && (mode & MODE_DATA_TRANSLATION)) || (iswrite && (m_cap & PPCCAP_4XX) && (mode & MODE_PROTECTION)))
{
UML_SHR(block, I3, I0, 12); // shr i3,i0,12
- UML_LOAD(block, I3, (void *)vtlb_table(), I3, SIZE_DWORD, SCALE_x4);// load i3,[vtlb],i3,dword
+ UML_LOAD(block, I3, (void *)vtlb_table(m_vtlb), I3, SIZE_DWORD, SCALE_x4);// load i3,[vtlb],i3,dword
UML_TEST(block, I3, (UINT64)1 << translate_type); // test i3,1 << translate_type
UML_JMPc(block, COND_Z, tlbmiss = label++); // jmp tlbmiss,z
UML_LABEL(block, tlbreturn = label++); // tlbreturn:
@@ -1338,7 +1338,7 @@ void ppc_device::static_generate_memory_accessor(int mode, int size, int iswrite
UML_MOV(block, mem(&m_core->param1), translate_type); // mov [param1],translate_type
UML_CALLC(block, (c_function)cfunc_ppccom_tlb_fill, this); // callc tlbfill,ppc
UML_SHR(block, I3, I0, 12); // shr i3,i0,12
- UML_LOAD(block, I3, (void *)vtlb_table(), I3, SIZE_DWORD, SCALE_x4);// load i3,[vtlb],i3,dword
+ UML_LOAD(block, I3, (void *)vtlb_table(m_vtlb), I3, SIZE_DWORD, SCALE_x4);// load i3,[vtlb],i3,dword
UML_TEST(block, I3, (UINT64)1 << translate_type); // test i3,1 << translate_type
UML_JMPc(block, COND_NZ, tlbreturn); // jmp tlbreturn,nz
@@ -1703,7 +1703,7 @@ void ppc_device::generate_sequence_instruction(drcuml_block *block, compiler_sta
/* validate our TLB entry at this PC; if we fail, we need to handle it */
if ((desc->flags & OPFLAG_VALIDATE_TLB) && (m_core->mode & MODE_DATA_TRANSLATION))
{
- const vtlb_entry *tlbtable = vtlb_table();
+ const vtlb_entry *tlbtable = vtlb_table(m_vtlb);
/* if we currently have a valid TLB read entry, we just verify */
if (tlbtable[desc->pc >> 12] != 0)
diff --git a/src/devices/cpu/se3208/se3208.cpp b/src/devices/cpu/se3208/se3208.cpp
index 45c4c38cc86..011cc103909 100644
--- a/src/devices/cpu/se3208/se3208.cpp
+++ b/src/devices/cpu/se3208/se3208.cpp
@@ -54,22 +54,27 @@ se3208_device::se3208_device(const machine_config &mconfig, const char *tag, dev
UINT32 se3208_device::read_dword_unaligned(address_space &space, UINT32 address)
{
- if (DWORD_ALIGNED(address))
- return space.read_dword(address);
- else
+ switch (address & 3)
{
- osd_printf_debug("%08x: dword READ unaligned %08x\n", m_PC, address);
+ case 0:
+ return space.read_dword(address);
+ case 1:
+ case 2:
+ case 3:
+ printf("%08x: dword READ unaligned %08x\n", m_PC, address);
#if ALLOW_UNALIGNED_DWORD_ACCESS
return space.read_byte(address) | space.read_byte(address + 1) << 8 | space.read_byte(address + 2) << 16 | space.read_byte(address + 3) << 24;
#else
return 0;
#endif
}
+
+ return 0;
}
UINT16 se3208_device::read_word_unaligned(address_space &space, UINT32 address)
{
- if (!WORD_ALIGNED(address))
+ if (address & 1)
return space.read_byte(address) | space.read_byte(address+1)<<8;
else
return space.read_word(address);
@@ -77,24 +82,31 @@ UINT16 se3208_device::read_word_unaligned(address_space &space, UINT32 address)
void se3208_device::write_dword_unaligned(address_space &space, UINT32 address, UINT32 data)
{
- if (DWORD_ALIGNED(address))
- space.write_dword(address, data);
- else
+ switch (address & 3)
{
+ case 0:
+ space.write_dword(address, data);
+ break;
+
+ case 1:
+ case 2:
+ case 3:
#if ALLOW_UNALIGNED_DWORD_ACCESS
space.write_byte(address, data & 0xff);
space.write_byte(address + 1, (data >> 8) & 0xff);
space.write_byte(address + 2, (data >> 16) & 0xff);
space.write_byte(address + 3, (data >> 24) & 0xff);
#endif
- osd_printf_debug("%08x: dword WRITE unaligned %08x\n", m_PC, address);
+ printf("%08x: dword WRITE unaligned %08x\n", m_PC, address);
+
+ break;
}
}
void se3208_device::write_word_unaligned(address_space &space, UINT32 address, UINT16 data)
{
- if (!WORD_ALIGNED(address))
+ if (address & 1)
{
space.write_byte(address, data & 0xff);
space.write_byte(address+1, (data>>8)&0xff);
diff --git a/src/devices/cpu/t11/t11.cpp b/src/devices/cpu/t11/t11.cpp
index 5e32e2081f5..72c2e80c91b 100644
--- a/src/devices/cpu/t11/t11.cpp
+++ b/src/devices/cpu/t11/t11.cpp
@@ -49,7 +49,7 @@ t11_device::t11_device(const machine_config &mconfig, device_type type, const ch
, m_program_config("program", ENDIANNESS_LITTLE, 16, 16, 0)
, c_initial_mode(0)
{
- m_program_config.m_is_octal = true;
+ m_is_octal = true;
memset(m_reg, 0x00, sizeof(m_reg));
memset(&m_psw, 0x00, sizeof(m_psw));
}
@@ -59,7 +59,7 @@ t11_device::t11_device(const machine_config &mconfig, const char *tag, device_t
, m_program_config("program", ENDIANNESS_LITTLE, 16, 16, 0)
, c_initial_mode(0)
{
- m_program_config.m_is_octal = true;
+ m_is_octal = true;
memset(m_reg, 0x00, sizeof(m_reg));
memset(&m_psw, 0x00, sizeof(m_psw));
}
diff --git a/src/devices/cpu/vtlb.cpp b/src/devices/cpu/vtlb.cpp
new file mode 100644
index 00000000000..4c9a9a2f311
--- /dev/null
+++ b/src/devices/cpu/vtlb.cpp
@@ -0,0 +1,310 @@
+// license:BSD-3-Clause
+// copyright-holders:Aaron Giles
+/***************************************************************************
+
+ vtlb.c
+
+ Generic virtual TLB implementation.
+
+***************************************************************************/
+
+#include "emu.h"
+#include "vtlb.h"
+
+
+
+/***************************************************************************
+ DEBUGGING
+***************************************************************************/
+
+#define PRINTF_TLB (0)
+
+
+
+/***************************************************************************
+ TYPE DEFINITIONS
+***************************************************************************/
+
+/* VTLB state */
+struct vtlb_state
+{
+ cpu_device * cpudevice; /* CPU device */
+ address_spacenum space; /* address space */
+ int dynamic; /* number of dynamic entries */
+ int fixed; /* number of fixed entries */
+ int dynindex; /* index of next dynamic entry */
+ int pageshift; /* bits to shift to get page index */
+ int addrwidth; /* logical address bus width */
+ std::vector<offs_t> live; /* array of live entries by table index */
+ std::vector<int> fixedpages; /* number of pages each fixed entry covers */
+ std::vector<vtlb_entry> table; /* table of entries by address */
+};
+
+
+
+/***************************************************************************
+ INITIALIZATION/TEARDOWN
+***************************************************************************/
+
+/*-------------------------------------------------
+ vtlb_alloc - allocate a new VTLB for the
+ given CPU
+-------------------------------------------------*/
+
+vtlb_state *vtlb_alloc(device_t *cpu, address_spacenum space, int fixed_entries, int dynamic_entries)
+{
+ vtlb_state *vtlb;
+
+ /* allocate memory for the core structure */
+ vtlb = auto_alloc_clear(cpu->machine(), <vtlb_state>());
+
+ /* fill in CPU information */
+ vtlb->cpudevice = downcast<cpu_device *>(cpu);
+ vtlb->space = space;
+ vtlb->dynamic = dynamic_entries;
+ vtlb->fixed = fixed_entries;
+ const address_space_config *spaceconfig = device_get_space_config(*cpu, space);
+ assert(spaceconfig != nullptr);
+ vtlb->pageshift = spaceconfig->m_page_shift;
+ vtlb->addrwidth = spaceconfig->m_logaddr_width;
+
+ /* validate CPU information */
+ assert((1 << vtlb->pageshift) > VTLB_FLAGS_MASK);
+ assert(vtlb->addrwidth > vtlb->pageshift);
+
+ /* allocate the entry array */
+ vtlb->live.resize(fixed_entries + dynamic_entries);
+ memset(&vtlb->live[0], 0, vtlb->live.size()*sizeof(vtlb->live[0]));
+ cpu->save_item(NAME(vtlb->live));
+
+ /* allocate the lookup table */
+ vtlb->table.resize((size_t) 1 << (vtlb->addrwidth - vtlb->pageshift));
+ memset(&vtlb->table[0], 0, vtlb->table.size()*sizeof(vtlb->table[0]));
+ cpu->save_item(NAME(vtlb->table));
+
+ /* allocate the fixed page count array */
+ if (fixed_entries > 0)
+ {
+ vtlb->fixedpages.resize(fixed_entries);
+ memset(&vtlb->fixedpages[0], 0, fixed_entries*sizeof(vtlb->fixedpages[0]));
+ cpu->save_item(NAME(vtlb->fixedpages));
+ }
+ return vtlb;
+}
+
+
+/*-------------------------------------------------
+ vtlb_free - free an allocated VTLB
+-------------------------------------------------*/
+
+void vtlb_free(vtlb_state *vtlb)
+{
+ auto_free(vtlb->cpudevice->machine(), vtlb);
+}
+
+
+
+/***************************************************************************
+ FILLING
+***************************************************************************/
+
+/*-------------------------------------------------
+ vtlb_fill - rcalled by the CPU core in
+ response to an unmapped access
+-------------------------------------------------*/
+
+int vtlb_fill(vtlb_state *vtlb, offs_t address, int intention)
+{
+ offs_t tableindex = address >> vtlb->pageshift;
+ vtlb_entry entry = vtlb->table[tableindex];
+ offs_t taddress;
+
+ if (PRINTF_TLB)
+ printf("vtlb_fill: %08X(%X) ... ", address, intention);
+
+ /* should not be called here if the entry is in the table already */
+// assert((entry & (1 << intention)) == 0);
+
+ /* if we have no dynamic entries, we always fail */
+ if (vtlb->dynamic == 0)
+ {
+ if (PRINTF_TLB)
+ printf("failed: no dynamic entries\n");
+ return FALSE;
+ }
+
+ /* ask the CPU core to translate for us */
+ taddress = address;
+ if (!vtlb->cpudevice->translate(vtlb->space, intention, taddress))
+ {
+ if (PRINTF_TLB)
+ printf("failed: no translation\n");
+ return FALSE;
+ }
+
+ /* if this is the first successful translation for this address, allocate a new entry */
+ if ((entry & VTLB_FLAGS_MASK) == 0)
+ {
+ int liveindex = vtlb->dynindex++ % vtlb->dynamic;
+
+ /* if an entry already exists at this index, free it */
+ if (vtlb->live[liveindex] != 0)
+ vtlb->table[vtlb->live[liveindex] - 1] = 0;
+
+ /* claim this new entry */
+ vtlb->live[liveindex] = tableindex + 1;
+
+ /* form a new blank entry */
+ entry = (taddress >> vtlb->pageshift) << vtlb->pageshift;
+ entry |= VTLB_FLAG_VALID;
+
+ if (PRINTF_TLB)
+ printf("success (%08X), new entry\n", taddress);
+ }
+
+ /* otherwise, ensure that different intentions do not produce different addresses */
+ else
+ {
+ assert((entry >> vtlb->pageshift) == (taddress >> vtlb->pageshift));
+ assert(entry & VTLB_FLAG_VALID);
+
+ if (PRINTF_TLB)
+ printf("success (%08X), existing entry\n", taddress);
+ }
+
+ /* add the intention to the list of valid intentions and store */
+ entry |= 1 << (intention & (TRANSLATE_TYPE_MASK | TRANSLATE_USER_MASK));
+ vtlb->table[tableindex] = entry;
+ return TRUE;
+}
+
+
+/*-------------------------------------------------
+ vtlb_load - load a fixed VTLB entry
+-------------------------------------------------*/
+
+void vtlb_load(vtlb_state *vtlb, int entrynum, int numpages, offs_t address, vtlb_entry value)
+{
+ offs_t tableindex = address >> vtlb->pageshift;
+ int liveindex = vtlb->dynamic + entrynum;
+ int pagenum;
+
+ /* must be in range */
+ assert(entrynum >= 0 && entrynum < vtlb->fixed);
+
+ if (PRINTF_TLB)
+ printf("vtlb_load %d for %d pages at %08X == %08X\n", entrynum, numpages, address, value);
+
+ /* if an entry already exists at this index, free it */
+ if (vtlb->live[liveindex] != 0)
+ {
+ int pagecount = vtlb->fixedpages[entrynum];
+ int oldtableindex = vtlb->live[liveindex] - 1;
+ for (pagenum = 0; pagenum < pagecount; pagenum++)
+ vtlb->table[oldtableindex + pagenum] = 0;
+ }
+
+ /* claim this new entry */
+ vtlb->live[liveindex] = tableindex + 1;
+
+ /* store the raw value, making sure the "fixed" flag is set */
+ value |= VTLB_FLAG_FIXED;
+ vtlb->fixedpages[entrynum] = numpages;
+ for (pagenum = 0; pagenum < numpages; pagenum++)
+ vtlb->table[tableindex + pagenum] = value + (pagenum << vtlb->pageshift);
+}
+
+/*-------------------------------------------------
+ vtlb_dynload - load a dynamic VTLB entry
+-------------------------------------------------*/
+
+void vtlb_dynload(vtlb_state *vtlb, UINT32 index, offs_t address, vtlb_entry value)
+{
+ vtlb_entry entry = vtlb->table[index];
+
+ if (vtlb->dynamic == 0)
+ {
+ if (PRINTF_TLB)
+ printf("failed: no dynamic entries\n");
+ return;
+ }
+
+ int liveindex = vtlb->dynindex++ % vtlb->dynamic;
+ /* is entry already live? */
+ if (!(entry & VTLB_FLAG_VALID))
+ {
+ /* if an entry already exists at this index, free it */
+ if (vtlb->live[liveindex] != 0)
+ vtlb->table[vtlb->live[liveindex] - 1] = 0;
+
+ /* claim this new entry */
+ vtlb->live[liveindex] = index + 1;
+ }
+ /* form a new blank entry */
+ entry = (address >> vtlb->pageshift) << vtlb->pageshift;
+ entry |= VTLB_FLAG_VALID | value;
+
+ if (PRINTF_TLB)
+ printf("success (%08X), new entry\n", address);
+
+ vtlb->table[index] = entry;
+}
+
+/***************************************************************************
+ FLUSHING
+***************************************************************************/
+
+/*-------------------------------------------------
+ vtlb_flush_dynamic - flush all knowledge
+ from the dynamic part of the VTLB
+-------------------------------------------------*/
+
+void vtlb_flush_dynamic(vtlb_state *vtlb)
+{
+ int liveindex;
+
+ if (PRINTF_TLB)
+ printf("vtlb_flush_dynamic\n");
+
+ /* loop over live entries and release them from the table */
+ for (liveindex = 0; liveindex < vtlb->dynamic; liveindex++)
+ if (vtlb->live[liveindex] != 0)
+ {
+ offs_t tableindex = vtlb->live[liveindex] - 1;
+ vtlb->table[tableindex] = 0;
+ vtlb->live[liveindex] = 0;
+ }
+}
+
+
+/*-------------------------------------------------
+ vtlb_flush_address - flush knowledge of a
+ particular address from the VTLB
+-------------------------------------------------*/
+
+void vtlb_flush_address(vtlb_state *vtlb, offs_t address)
+{
+ offs_t tableindex = address >> vtlb->pageshift;
+
+ if (PRINTF_TLB)
+ printf("vtlb_flush_address %08X\n", address);
+
+ /* free the entry in the table; for speed, we leave the entry in the live array */
+ vtlb->table[tableindex] = 0;
+}
+
+
+
+/***************************************************************************
+ ACCESSORS
+***************************************************************************/
+
+/*-------------------------------------------------
+ vtlb_table - return a pointer to the base of
+ the linear VTLB lookup table
+-------------------------------------------------*/
+
+const vtlb_entry *vtlb_table(vtlb_state *vtlb)
+{
+ return &vtlb->table[0];
+}
diff --git a/src/devices/cpu/vtlb.h b/src/devices/cpu/vtlb.h
new file mode 100644
index 00000000000..f63a0ac50f6
--- /dev/null
+++ b/src/devices/cpu/vtlb.h
@@ -0,0 +1,88 @@
+// license:BSD-3-Clause
+// copyright-holders:Aaron Giles
+/***************************************************************************
+
+ vtlb.h
+
+ Generic virtual TLB implementation.
+
+***************************************************************************/
+
+#pragma once
+
+#ifndef __VTLB_H__
+#define __VTLB_H__
+
+
+
+/***************************************************************************
+ CONSTANTS
+***************************************************************************/
+
+#define VTLB_FLAGS_MASK 0xff
+
+#define VTLB_READ_ALLOWED 0x01 /* (1 << TRANSLATE_READ) */
+#define VTLB_WRITE_ALLOWED 0x02 /* (1 << TRANSLATE_WRITE) */
+#define VTLB_FETCH_ALLOWED 0x04 /* (1 << TRANSLATE_FETCH) */
+#define VTLB_FLAG_VALID 0x08
+#define VTLB_USER_READ_ALLOWED 0x10 /* (1 << TRANSLATE_READ_USER) */
+#define VTLB_USER_WRITE_ALLOWED 0x20 /* (1 << TRANSLATE_WRITE_USER) */
+#define VTLB_USER_FETCH_ALLOWED 0x40 /* (1 << TRANSLATE_FETCH_USER) */
+#define VTLB_FLAG_FIXED 0x80
+
+
+
+/***************************************************************************
+ TYPE DEFINITIONS
+***************************************************************************/
+
+/* represents an entry in the VTLB */
+typedef UINT32 vtlb_entry;
+
+
+/* opaque structure describing VTLB state */
+struct vtlb_state;
+
+
+
+/***************************************************************************
+ FUNCTION PROTOTYPES
+***************************************************************************/
+
+
+/* ----- initialization/teardown ----- */
+
+/* allocate a new VTLB for the given CPU */
+vtlb_state *vtlb_alloc(device_t *cpu, address_spacenum space, int fixed_entries, int dynamic_entries);
+
+/* free an allocated VTLB */
+void vtlb_free(vtlb_state *vtlb);
+
+
+/* ----- filling ----- */
+
+/* called by the CPU core in response to an unmapped access */
+int vtlb_fill(vtlb_state *vtlb, offs_t address, int intention);
+
+/* load a fixed VTLB entry */
+void vtlb_load(vtlb_state *vtlb, int entrynum, int numpages, offs_t address, vtlb_entry value);
+
+/* load a dynamic VTLB entry */
+void vtlb_dynload(vtlb_state *vtlb, UINT32 index, offs_t address, vtlb_entry value);
+
+/* ----- flushing ----- */
+
+/* flush all knowledge from the dynamic part of the VTLB */
+void vtlb_flush_dynamic(vtlb_state *vtlb);
+
+/* flush knowledge of a particular address from the VTLB */
+void vtlb_flush_address(vtlb_state *vtlb, offs_t address);
+
+
+/* ----- accessors ----- */
+
+/* return a pointer to the base of the linear VTLB lookup table */
+const vtlb_entry *vtlb_table(vtlb_state *vtlb);
+
+
+#endif /* __VTLB_H__ */
diff --git a/src/devices/cpu/z80/z80.cpp b/src/devices/cpu/z80/z80.cpp
index e798a1153b2..345ea4334bf 100644
--- a/src/devices/cpu/z80/z80.cpp
+++ b/src/devices/cpu/z80/z80.cpp
@@ -10,7 +10,6 @@
* - If LD A,I or LD A,R is interrupted, P/V flag gets reset, even if IFF2
* was set before this instruction (implemented, but not enabled: we need
* document Z80 types first, see below)
- * - WAIT only stalls between instructions now, it should stall immediately.
* - Ideally, the tiny differences between Z80 types should be supported,
* currently known differences:
* - LD A,I/R P/V flag reset glitch is fixed on CMOS Z80
@@ -3125,27 +3124,6 @@ OP(op,fe) { cp(arg());
OP(op,ff) { rst(0x38); } /* RST 7 */
-void z80_device::take_nmi()
-{
- /* there isn't a valid previous program counter */
- PRVPC = -1;
-
- /* Check if processor was halted */
- leave_halt();
-
-#if HAS_LDAIR_QUIRK
- /* reset parity flag after LD A,I or LD A,R */
- if (m_after_ldair) F &= ~PF;
-#endif
-
- m_iff1 = 0;
- push(m_pc);
- PCD = 0x0066;
- WZ=PCD;
- m_icount -= 11;
- m_nmi_pending = FALSE;
-}
-
void z80_device::take_interrupt()
{
int irq_vector;
@@ -3228,11 +3206,6 @@ void z80_device::take_interrupt()
m_icount -= m_cc_ex[0xff];
}
WZ=PCD;
-
-#if HAS_LDAIR_QUIRK
- /* reset parity flag after LD A,I or LD A,R */
- if (m_after_ldair) F &= ~PF;
-#endif
}
void nsc800_device::take_interrupt_nsc800()
@@ -3266,11 +3239,6 @@ void nsc800_device::take_interrupt_nsc800()
m_icount -= m_cc_op[0xff] + cc_ex[0xff];
WZ=PCD;
-
-#if HAS_LDAIR_QUIRK
- /* reset parity flag after LD A,I or LD A,R */
- if (m_after_ldair) F &= ~PF;
-#endif
}
/****************************************************************************
@@ -3506,25 +3474,44 @@ void nsc800_device::device_reset()
}
/****************************************************************************
- * Execute 'cycles' T-states.
+ * Execute 'cycles' T-states. Return number of T-states really executed
****************************************************************************/
void z80_device::execute_run()
{
+ /* check for NMIs on the way in; they can only be set externally */
+ /* via timers, and can't be dynamically enabled, so it is safe */
+ /* to just check here */
+ if (m_nmi_pending)
+ {
+ LOG(("Z80 '%s' take NMI\n", tag()));
+ PRVPC = -1; /* there isn't a valid previous program counter */
+ leave_halt(); /* Check if processor was halted */
+
+#if HAS_LDAIR_QUIRK
+ /* reset parity flag after LD A,I or LD A,R */
+ if (m_after_ldair) F &= ~PF;
+#endif
+ m_after_ldair = FALSE;
+
+ m_iff1 = 0;
+ push(m_pc);
+ PCD = 0x0066;
+ WZ=PCD;
+ m_icount -= 11;
+ m_nmi_pending = FALSE;
+ }
+
do
{
- if (m_wait_state)
+ /* check for IRQs before each instruction */
+ if (m_irq_state != CLEAR_LINE && m_iff1 && !m_after_ei)
{
- // stalled
- m_icount = 0;
- return;
- }
-
- // check for interrupts before each instruction
- if (m_nmi_pending)
- take_nmi();
- else if (m_irq_state != CLEAR_LINE && m_iff1 && !m_after_ei)
+#if HAS_LDAIR_QUIRK
+ /* reset parity flag after LD A,I or LD A,R */
+ if (m_after_ldair) F &= ~PF;
+#endif
take_interrupt();
-
+ }
m_after_ei = FALSE;
m_after_ldair = FALSE;
@@ -3537,25 +3524,34 @@ void z80_device::execute_run()
void nsc800_device::execute_run()
{
- do
+ /* check for NMIs on the way in; they can only be set externally */
+ /* via timers, and can't be dynamically enabled, so it is safe */
+ /* to just check here */
+ if (m_nmi_pending)
{
- if (m_wait_state)
- {
- // stalled
- m_icount = 0;
- return;
- }
+ LOG(("Z80 '%s' take NMI\n", tag()));
+ PRVPC = -1; /* there isn't a valid previous program counter */
+ leave_halt(); /* Check if processor was halted */
+
+ m_iff1 = 0;
+ push(m_pc);
+ PCD = 0x0066;
+ WZ=PCD;
+ m_icount -= 11;
+ m_nmi_pending = FALSE;
+ }
- // check for interrupts before each instruction
- if (m_nmi_pending)
- take_nmi();
- else if ((m_nsc800_irq_state[NSC800_RSTA] != CLEAR_LINE || m_nsc800_irq_state[NSC800_RSTB] != CLEAR_LINE || m_nsc800_irq_state[NSC800_RSTC] != CLEAR_LINE) && m_iff1 && !m_after_ei)
+ do
+ {
+ /* check for NSC800 IRQs line RSTA, RSTB, RSTC */
+ if ((m_nsc800_irq_state[NSC800_RSTA] != CLEAR_LINE || m_nsc800_irq_state[NSC800_RSTB] != CLEAR_LINE || m_nsc800_irq_state[NSC800_RSTC] != CLEAR_LINE) && m_iff1 && !m_after_ei)
take_interrupt_nsc800();
- else if (m_irq_state != CLEAR_LINE && m_iff1 && !m_after_ei)
+
+ /* check for IRQs before each instruction */
+ if (m_irq_state != CLEAR_LINE && m_iff1 && !m_after_ei)
take_interrupt();
m_after_ei = FALSE;
- m_after_ldair = FALSE;
PRVPC = PCD;
debugger_instruction_hook(this, PCD);
@@ -3591,9 +3587,6 @@ void z80_device::execute_set_input(int inputnum, int state)
case Z80_INPUT_LINE_WAIT:
m_wait_state = state;
break;
-
- default:
- break;
}
}
@@ -3601,6 +3594,17 @@ void nsc800_device::execute_set_input(int inputnum, int state)
{
switch (inputnum)
{
+ case Z80_INPUT_LINE_BUSRQ:
+ m_busrq_state = state;
+ break;
+
+ case INPUT_LINE_NMI:
+ /* mark an NMI pending on the rising edge */
+ if (m_nmi_state == CLEAR_LINE && state != CLEAR_LINE)
+ m_nmi_pending = TRUE;
+ m_nmi_state = state;
+ break;
+
case NSC800_RSTA:
m_nsc800_irq_state[NSC800_RSTA] = state;
break;
@@ -3613,8 +3617,17 @@ void nsc800_device::execute_set_input(int inputnum, int state)
m_nsc800_irq_state[NSC800_RSTC] = state;
break;
- default:
- z80_device::execute_set_input(inputnum, state);
+ case INPUT_LINE_IRQ0:
+ /* update the IRQ state via the daisy chain */
+ m_irq_state = state;
+ if (m_daisy.present())
+ m_irq_state = m_daisy.update_irq_state();
+
+ /* the main execute loop will take the interrupt */
+ break;
+
+ case Z80_INPUT_LINE_WAIT:
+ m_wait_state = state;
break;
}
}
@@ -3737,3 +3750,10 @@ nsc800_device::nsc800_device(const machine_config &mconfig, const char *tag, dev
}
const device_type NSC800 = &device_creator<nsc800_device>;
+
+
+
+WRITE_LINE_MEMBER( z80_device::irq_line )
+{
+ set_input_line( INPUT_LINE_IRQ0, state );
+}
diff --git a/src/devices/cpu/z80/z80.h b/src/devices/cpu/z80/z80.h
index 38cc207347e..c523f101a24 100644
--- a/src/devices/cpu/z80/z80.h
+++ b/src/devices/cpu/z80/z80.h
@@ -19,7 +19,6 @@ enum
NSC800_RSTB,
NSC800_RSTC,
Z80_INPUT_LINE_WAIT,
- Z80_INPUT_LINE_BOGUSWAIT, /* WAIT pin implementation used to be nonexistent, please remove this when all drivers are updated with Z80_INPUT_LINE_WAIT */
Z80_INPUT_LINE_BUSRQ
};
@@ -42,6 +41,8 @@ class z80_device : public cpu_device
public:
z80_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ DECLARE_WRITE_LINE_MEMBER( irq_line );
+
void z80_set_cycle_tables(const UINT8 *op, const UINT8 *cb, const UINT8 *ed, const UINT8 *xy, const UINT8 *xycb, const UINT8 *ex);
template<class _Object> static devcb_base &set_irqack_cb(device_t &device, _Object object) { return downcast<z80_device &>(device).m_irqack_cb.set_callback(object); }
template<class _Object> static devcb_base &set_refresh_cb(device_t &device, _Object object) { return downcast<z80_device &>(device).m_refresh_cb.set_callback(object); }
@@ -237,7 +238,6 @@ protected:
void ei();
void take_interrupt();
- void take_nmi();
// address spaces
const address_space_config m_program_config;
diff --git a/src/devices/imagedev/floppy.cpp b/src/devices/imagedev/floppy.cpp
index cb7e184f811..2d6eb4d5460 100644
--- a/src/devices/imagedev/floppy.cpp
+++ b/src/devices/imagedev/floppy.cpp
@@ -933,7 +933,7 @@ UINT32 floppy_image_device::get_variant() const
ui_menu *floppy_image_device::get_selection_menu(running_machine &machine, render_container *container)
{
- return global_alloc_clear<ui_menu_control_floppy_image>(machine, container, this);
+ return auto_alloc_clear(machine, <ui_menu_control_floppy_image>(machine, container, this));
}
ui_menu_control_floppy_image::ui_menu_control_floppy_image(running_machine &machine, render_container *container, device_image_interface *_image) : ui_menu_control_device_image(machine, container, _image)
@@ -1010,7 +1010,7 @@ void ui_menu_control_floppy_image::hook_load(std::string filename, bool softlist
can_in_place = false;
}
submenu_result = -1;
- ui_menu::stack_push(global_alloc_clear<ui_menu_select_rw>(machine(), container, can_in_place, &submenu_result));
+ ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_select_rw>(machine(), container, can_in_place, &submenu_result)));
state = SELECT_RW;
}
@@ -1036,7 +1036,7 @@ void ui_menu_control_floppy_image::handle()
format_array[total_usable++] = i;
}
submenu_result = -1;
- ui_menu::stack_push(global_alloc_clear<ui_menu_select_format>(machine(), container, format_array, ext_match, total_usable, &submenu_result));
+ ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_select_format>(machine(), container, format_array, ext_match, total_usable, &submenu_result)));
state = SELECT_FORMAT;
break;
@@ -1073,7 +1073,7 @@ void ui_menu_control_floppy_image::handle()
break;
case ui_menu_select_rw::WRITE_OTHER:
- ui_menu::stack_push(global_alloc_clear<ui_menu_file_create>(machine(), container, image, current_directory, current_file, &create_ok));
+ ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_file_create>(machine(), container, image, current_directory, current_file, &create_ok)));
state = CHECK_CREATE;
break;
diff --git a/src/devices/machine/com8116.cpp b/src/devices/machine/com8116.cpp
index f5c177fef62..46a0ce83986 100644
--- a/src/devices/machine/com8116.cpp
+++ b/src/devices/machine/com8116.cpp
@@ -25,59 +25,17 @@
// device type definition
const device_type COM8116 = &device_creator<com8116_device>;
-// Parts with T after the number do not have an internal oscillator and require an external clock source
-// The SMC/COM 5xxx parts are all dual 5v/12v parts, while the 8xxx parts are 5v only
-// SMC/COM5016(T) with no dash, aka 'STD' part on the datasheet
-// Also COM8116(T)/8126(T)/8136(T)/8146(T) and Synertek sy2661-3 and GI AY-5-8116(T)-000 and GI AY-5-8136(T)-000 and WD WD-1943-00 (aka WD8136-00)
-// SMC/COM8156(T) is the same chip but clocked twice as fast and 32x clocks per baud instead of 16x
-// baud rates are 50, 75, 110, 134.5, 150, 300, 600, 1200, 1800, 2000, 2400, 3600, 4800, 7200, 9600, 19200
const int com8116_device::divisors_16X_5_0688MHz[] =
{ 6336, 4224, 2880, 2355, 2112, 1056, 528, 264, 176, 158, 132, 88, 66, 44, 33, 16 };
-// SMC/COM8116-003
-// from http://www.vintagecomputer.net/fjkraan/comp/divcomp/doc/SMC_BaudGen.pdf page 283 (pdf page 20)
-// baud rates are 50, 75, 110, 134.5, 150, 200, 300, 600, 1200, 1800, 2000, 2400, 3600, 4800, 9600, 19200
-const int com8116_device::divisors_16X_6_01835MHz[] =
- { 7523, 5015, 3420, 2797, 2508, 1881, 1254, 627, 313, 209, 188, 157, 104, 78, 39, 20 };
-
-// SMC/COM5016(T)-5 and WD WD-1943-05; Synertek SY2661-1 and 2 are NOT the same as this despite using same clock speed, see below
-// SMC/COM8156(T)-5 is the same chip but clocked twice as fast and 32x clocks per baud instead of 16x
-// baud rates are 50, 75, 110, 134.5, 150, 300, 600, 1200, 1800, 2000, 2400, 3600, 4800, 7200, 9600, 19200
const int com8116_device::divisors_16X_4_9152MHz[] =
{ 6144, 4096, 2793, 2284, 2048, 1024, 512, 256, 171, 154, 128, 85, 64, 43, 32, 16 };
-// SMC/COM5016(T)-6 and WD WD-1943-06
-// baud rates are 50, 75, 110, 134.5, 150, 200, 300, 600, 1200, 1800, 2400, 3600, 4800, 7200, 9600, 19200
const int com8116_device::divisors_32X_5_0688MHz[] =
{ 3168, 2112, 1440, 1177, 1056, 792, 528, 264, 132, 88, 66, 44, 33, 22, 16, 8 };
-// SMC/COM5016(T)-013 (from http://bitsavers.informatik.uni-stuttgart.de/pdf/dec/terminal/vt100/EK-VT100-TM-003_VT100_Technical_Manual_Jul82.pdf page 4-27 (pdf page 78))
-// and from http://www.vintagecomputer.net/fjkraan/comp/divcomp/doc/SMC_BaudGen.pdf page 283 (pdf page 20)
-// SMC/COM5106-013A is the same chip clocked twice as fast, but with 32x clocks per baud instead of 16x
-// baud rates are 50, 75, 110, 134.5, 150, 200, 300, 600, 1200, 1800, 2000, 2400, 3600, 4800, 9600, 19200
-const int com8116_device::divisors_16X_2_7648MHz[] =
- { 3456, 2304, 1571, 1285, 1152, 864, 576, 288, 144, 96, 86, 72, 48, 36, 18, 9 };
-
-// SMC/COM5026(T)-030 (non-standard serial rates, from http://bitsavers.informatik.uni-stuttgart.de/pdf/standardMicrosystems/_dataBooks/1979_StandardMicrosystems.pdf page 135)
-const int com8116_device::divisors_16X_5_0688MHz_030[] =
- { 731, 733, 735, 737, 741, 743, 745, 751, 6970, 5569, 5433, 4752, 4269, 1920, 1584, 301 };
-
-// SMC/COM5036(T)-080 (from http://bitsavers.informatik.uni-stuttgart.de/pdf/standardMicrosystems/_dataBooks/1979_StandardMicrosystems.pdf page 135)
-const int com8116_device::divisors_16X_4_6080MHz[] =
- { 5760, 3840, 2618, 2141, 1920, 960, 480, 240, 160, 144, 120, 80, 60, 40, 30, 15 };
-
-// COM8046 combines the -6 and STD tables into one device as a 32-entry table
-
-// Synertek SY2661-1 (from http://bitsavers.informatik.uni-stuttgart.de/pdf/synertek/_dataBooks/Synertek_1981-1982_Data_Catalog.pdf page 3-40 (pdf page 139))
-// baud rates are 50, 75, 110, 134.5, 150, 200, 300, 600, 1050, 1200, 1800, 2000, 2400, 4800, 9600, 19200
-const int com8116_device::divisors_16X_4_9152MHz_SY2661_1[] =
- { 6144, 4096, 2793, 2284, 2048, 1536, 1024, 512, 292, 256, 171, 154, 128, 64, 32, 16 };
-// Synertek SY2661-2 (from http://bitsavers.informatik.uni-stuttgart.de/pdf/synertek/_dataBooks/Synertek_1981-1982_Data_Catalog.pdf page 3-40 (pdf page 139))
-// baud rates are 45.5, 50, 75, 110, 134.5, 150, 300, 600, 1200, 1800, 2000, 2400, 4800, 9600, 19200, 38400
-const int com8116_device::divisors_16X_4_9152MHz_SY2661_2[] =
- { 6752, 6144, 4096, 2793, 2284, 2048, 1024, 512, 256, 171, 154, 128, 64, 32, 16, 8 };
//**************************************************************************
// LIVE DEVICE
diff --git a/src/devices/machine/com8116.h b/src/devices/machine/com8116.h
index 614be491318..119f40d4b3d 100644
--- a/src/devices/machine/com8116.h
+++ b/src/devices/machine/com8116.h
@@ -63,14 +63,8 @@ public:
DECLARE_WRITE8_MEMBER( stt_w );
static const int divisors_16X_5_0688MHz[];
- static const int divisors_16X_6_01835MHz[];
static const int divisors_16X_4_9152MHz[];
static const int divisors_32X_5_0688MHz[];
- static const int divisors_16X_2_7648MHz[];
- static const int divisors_16X_5_0688MHz_030[];
- static const int divisors_16X_4_6080MHz[];
- static const int divisors_16X_4_9152MHz_SY2661_1[];
- static const int divisors_16X_4_9152MHz_SY2661_2[];
protected:
// device-level overrides
diff --git a/src/devices/machine/corvushd.cpp b/src/devices/machine/corvushd.cpp
index 08536344849..558851c0b7a 100644
--- a/src/devices/machine/corvushd.cpp
+++ b/src/devices/machine/corvushd.cpp
@@ -874,7 +874,7 @@ UINT8 corvus_hdc_t::corvus_read_firmware_block(UINT8 head, UINT8 sector) {
// Status of command
//
UINT8 corvus_hdc_t::corvus_write_firmware_block(UINT8 head, UINT8 sector, UINT8 *buffer) {
- UINT16 relative_sector; // Relative sector on drive for Physical Write
+ UINT16 relative_sector; // Relative sector on drive for Physical Read
UINT8 status;
relative_sector = head * m_sectors_per_track + sector;
diff --git a/src/devices/machine/dmac.cpp b/src/devices/machine/dmac.cpp
index ba1167eb2d5..34992fc4f5c 100644
--- a/src/devices/machine/dmac.cpp
+++ b/src/devices/machine/dmac.cpp
@@ -145,8 +145,6 @@ void dmac_device::check_interrupts()
// any interrupts pending?
if (m_istr & ISTR_INT_MASK)
m_istr |= ISTR_INT_P;
- else
- m_istr &= ~ISTR_INT_P;
}
else
m_istr &= ~ISTR_INT_P;
@@ -204,19 +202,18 @@ READ16_MEMBER( dmac_device::register_read )
case 0x48:
case 0x49:
+ case 0x50:
+ case 0x58:
+ case 0x59:
+ case 0x5a:
+ case 0x5b:
+ case 0x5c:
+ case 0x5e:
+ case 0x5f:
data = m_scsi_read_handler(offset);
if (VERBOSE)
- logerror("%s('%s'): read scsi register @ %02x %04x [mask = %04x]\n", shortname(), basetag(), offset, data, mem_mask);
-
- break;
-
- case 0x50:
- case 0x51:
- case 0x52:
- case 0x53:
- if (VERBOSE)
- logerror("%s('%s'): read xt register @ %02x %04x [mask = %04x]\n", shortname(), basetag(), offset, data, mem_mask);
+ logerror("%s('%s'): read scsi data @ %02x %04x [mask = %04x]\n", shortname(), basetag(), offset, data, mem_mask);
break;
@@ -309,20 +306,20 @@ WRITE16_MEMBER( dmac_device::register_write )
case 0x48:
case 0x49:
+ case 0x50:
+ case 0x58:
+ case 0x59:
+ case 0x5a:
+ case 0x5b:
+ case 0x5c:
+ case 0x5e:
+ case 0x5f:
if (VERBOSE)
- logerror("%s('%s'): write scsi register @ %02x %04x [mask = %04x]\n", shortname(), basetag(), offset, data, mem_mask);
+ logerror("%s('%s'): write scsi data @ %02x %04x [mask = %04x]\n", shortname(), basetag(), offset, data, mem_mask);
m_scsi_write_handler(offset, data, 0xff);
break;
- case 0x50:
- case 0x51:
- case 0x52:
- case 0x53:
- if (VERBOSE)
- logerror("%s('%s'): write xt register @ %02x %04x [mask = %04x]\n", shortname(), basetag(), offset, data, mem_mask);
- break;
-
case 0x70:
if (VERBOSE)
logerror("%s('%s'): write dma start strobe %04x [mask = %04x]\n", shortname(), basetag(), data, mem_mask);
diff --git a/src/devices/machine/dmac.h b/src/devices/machine/dmac.h
index 8580b4c86ab..2d86c427013 100644
--- a/src/devices/machine/dmac.h
+++ b/src/devices/machine/dmac.h
@@ -128,7 +128,7 @@ private:
ISTR_FE_FLG = 0x001 // fifo-empty flag
};
- static const int ISTR_INT_MASK = 0x1ec;
+ static const int ISTR_INT_MASK = 0x1fc;
// callbacks
devcb_write_line m_cfgout_handler;
diff --git a/src/devices/machine/hp_taco.cpp b/src/devices/machine/hp_taco.cpp
deleted file mode 100644
index 76203d31ee3..00000000000
--- a/src/devices/machine/hp_taco.cpp
+++ /dev/null
@@ -1,1467 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:F. Ulivi
-/*********************************************************************
-
- hp_taco.cpp
-
- HP TApe COntroller (5006-3012)
-
-*********************************************************************/
-
-// This device has been reverse engineered entirely through documents & study of HP software.
-// I had no access to the real device to experiment.
-// Available documentation on the internal working of TACO chip is close to nothing. The best
-// I could find is [1] (see below) where all that's described is a (too) brief summary of registers and little else.
-// In other words, no description of the commands that can be issued to TACO chips.
-// So, my main source of information was the careful study of HP software, especially the 9845 system test ROM (09845-66520).
-// The second half of this ROM holds a comprehensive set of tape drive tests.
-// The main shortcomings of my approach are:
-// * I could indentify only those TACO commands that are actually used by the software. I managed
-// to identify 17 out of 32 possible commands. The purpose of the rest of commands is anyone's guess.
-// * I could only guess the behavior of TACO chips in corner cases (especially behavior in various error/abnormal
-// conditions)
-//
-// Documentation I used:
-// [1] HP, manual 64940-90905, may 80 rev. - Model 64940A tape control & drive service manual
-// [2] US patent 4,075,679 describing HP9825 system (this system had a discrete implementation of tape controller). The
-// firmware listing was quite useful in identifying sequences of commands (for example how to find a specific sector etc.).
-// [3] http://www.hp9845.net site
-// [4] April 1978 issue of HP Journal. There is a one-page summary of TACO chip on page 20.
-
-// This is an overview of the TACO/CPU interface.
-//
-// Reg. | R/W | Content
-// =====================
-// R4 | R/W | Data register: words read/written to/from tape pass through this register
-// R5 | R/W | Command and status register (see below)
-// R6 | R/W | Tachometer register. Writing it sets a pulse counter that counts up on either tachometer pulses or IRGs, depending
-// | | on command. When the counter rolls over from 0xffff to 0 it typically ends the command. It's not clear to me
-// | | what value could be read from this register, if it's just the same value that was written last time or the internal
-// | | counter or something else entirely.
-// R7 | R | Checksum register. Reading it clears it.
-// R7 | W | Timing register. It controls somehow the encoding and decoding of bits. For now I completely ignore it because its
-// | | content it's totally unknown to me. It seems safe to do so, anyway. I can see that it's always set to 0x661d before
-// | | writing to tape and to 0x0635 before reading.
-//
-// Format of TACO command/status register (R5)
-// Bit R/W Content
-// ===============
-// 15 RW Tape direction (1 = forward)
-// 14..10 RW Command (see the "enum" below)
-// 9 RW ? Drive ON according to [1], the actual use seems to be selection of gap length
-// 8 RW ? Size of gaps according to [1], N/U in my opinion
-// 7 RW Speed of tape (1 = 90 ips, 0 = 22 ips)
-// 6 RW Option bit for various commands
-// 5 R Current track (1 = B)
-// 4 R Gap detected (1)
-// 3 R Write protection (1)
-// 2 R Servo failure (1)
-// 1 R Cartridge out (1)
-// 0 R Hole detected (1)
-
-// Here's a summary of the on-tape format of HP9845 systems.
-// * A tape has two independent tracks (A & B).
-// * Each track holds 426 sectors.
-// * Each sector has an header and 256 bytes of payload (see below)
-// * Sectors are separated by gaps of uniform magnetization called IRGs (Inter-Record Gaps)
-// * The basic unit of data I/O are 16-bit words
-// * Bits are encoded by different distances between magnetic flux reversals
-// * The structure of tracks is:
-// - Begin of tape holes
-// - The deadzone: 350x 0xffff words
-// - 1" of IRG
-// - Sector #0 (track A) or #426 (track B)
-// - 1" of IRG (2.5" on track A)
-// - Sector #1 (track A) or #427 (track B)
-// - 1" of IRG
-// - Sector #2 (track A) or #428 (track B)
-// - ...and so on up to sector #425/#851
-// - 6" of final gap
-// - Non-recorded tape
-// - End of tape holes
-// * Sector #0 is not used
-// * Sectors #1 and #2 hold the first copy of tape directory
-// * Sectors #3 and #4 hold the second/backup copy of tape directory
-// * User data are stored starting from sector #5
-// * There is no "fragmentation" map (like file allocation table in FAT filesystem): a file
-// spanning more than 1 sector always occupy a single block of contiguous sectors.
-//
-// A sector is structured like this:
-// Word 0: Invisible preamble word (always 0). Preamble comes from 9825, don't know if it's
-// actually there in TACO encoding. I assumed it is.
-// Word 1: Format/sector in use and other unidentified bits.
-// Word 2: Sector number
-// Word 3: Sector length and other bits
-// Word 4: Checksum (sum of words 1..3)
-// Words 5..132: Payload
-// Word 133: Checksum (sum of words 5..132)
-//
-// Physical encoding of words is borrowed from 9825 as I wasn't able
-// to gather any info on the actual encoding of TACO chips.
-// This is how 9825 encodes words on tape:
-// - the unit of encoding are 16-bit words
-// - each word is encoded from MSB to LSB
-// - each word has an extra invisible "1" encoded at the end
-// - tape is read/written at slow speed only (21.98 ips)
-// - a 0 is encoded with a distance between flux reversals of 1/35200 s
-// (giving a maximum density of about 1600 reversals per inch)
-// - a 1 is encoded with a distance that's 1.75 times that of a 0
-//
-// This driver is based on the following model of the actual TACO/tape system:
-// * Tape immediately reaches working speed (no spin-up time)
-// * Inversion of tape direction and change of speed are immediate as well
-// * Time & distance to stop the tape are modeled, though. Firmware is upset by
-// a tape with null braking time/distance.
-// * Speed of tape is exceptionally accurate. Real tape was controlled by a closed loop
-// with something like 1% accuracy on speed.
-// * Storage is modeled by one "map" data structure per track. Each map maps the tape position
-// to the 16-bit word stored at that position. Gaps are modeled by lack of data in the map.
-// There is no model of the physical encoding of bits (except to compute how long each word
-// is on tape).
-// * Read threshold is ignored. Real tapes could be read with either a low or high threshold.
-// * "Flag" bit is used as a busy/ready signal in real TACO. Here I assumed the device is
-// always ready, so Flag is always active.
-// * I tried to fill the (many) gaps on chip behavior with "sensible" solutions. I could only
-// validate my solutions by running the original firmware in MAME, though (no real hw at hand).
-//
-// TODOs/issues:
-// * Some code cleanup
-// * Handling of tape holes seems to be wrong: test "C" of test ROM only works partially
-// * Find out what is read from register R6
-// * Handle device_image_interface::call_display to show state of tape
-// * Find more info on TACO chips (does anyone with a working 9845 or access to internal HP docs want to
-// help me here, please?)
-//
-#include "emu.h"
-#include "hp_taco.h"
-
-// Debugging
-#define VERBOSE 1
-#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
-#define VERBOSE_0 0
-#define LOG_0(x) do { if (VERBOSE_0) logerror x; } while (0)
-
-// Macros to clear/set single bits
-#define BIT_MASK(n) (1U << (n))
-#define BIT_CLR(w , n) ((w) &= ~BIT_MASK(n))
-#define BIT_SET(w , n) ((w) |= BIT_MASK(n))
-
-// Timers
-enum {
- TAPE_TMR_ID,
- HOLE_TMR_ID
-};
-
-// Constants
-#define CMD_REG_MASK 0xffc0 // Command register mask
-#define STATUS_REG_MASK 0x003f // Status register mask
-#define TACH_TICKS_PER_INCH 968 // Tachometer pulses per inch of tape movement
-#define TAPE_POS_FRACT 1024 // 10 bits of fractional part in tape_pos_t
-#define ONE_INCH_POS (TACH_TICKS_PER_INCH * TAPE_POS_FRACT) // Value in tape_pos_t representing 1 inch of tape
-#define TACH_FREQ_SLOW 21276 // Tachometer pulse frequency for slow speed (21.98 ips)
-#define TACH_FREQ_FAST 87196 // Tachometer pulse frequency for fast speed (90.08 ips)
-#define TAPE_LENGTH ((140 * 12 + 72 * 2) * ONE_INCH_POS) // Tape length: 140 ft of usable tape + 72" of punched tape at either end
-#define TAPE_INIT_POS (80 * ONE_INCH_POS) // Initial tape position: 80" from beginning (just past the punched part)
-#define ZERO_BIT_LEN 619 // Length of 0 bits at slow tape speed: 1/(35200 Hz)
-#define ONE_BIT_LEN 1083 // Length of 1 bits at slow tape speed: 1.75 times ZERO_BIT_LEN
-#define QUICK_CMD_USEC 25 // usec for "quick" command execution
-#define FAST_BRAKE_MSEC 73 // Braking time from fast speed to stop (2 ips) in msec (deceleration is 1200 in/s^2)
-#define SLOW_BRAKE_MSEC 17 // Braking time from slow speed to stop in msec
-#define FAST_BRAKE_DIST 3350450 // Braking distance at fast speed (~3.38 in)
-#define SLOW_BRAKE_DIST 197883 // Braking distance at slow speed (~0.2 in)
-#define PREAMBLE_WORD 0 // Value of preamble word
-#define END_GAP_LENGTH (6 * ONE_INCH_POS) // Length of final gap: 6"
-#define MIN_IRG_LENGTH ((tape_pos_t)(0.2 * ONE_INCH_POS)) // Minimum length of IRGs: 0.2" (from 9825, not sure about value in TACO)
-#define NULL_TAPE_POS ((tape_pos_t)-1) // Special value for invalid/unknown tape position
-#define NO_DATA_GAP (17 * ONE_BIT_LEN) // Minimum gap size to detect end of data: length of longest word (0xffff)
-#define FILE_MAGIC 0x4f434154 // Magic value at start of image file: "TACO"
-
-// Parts of command register
-#define CMD_CODE(reg) \
- (((reg) >> 10) & 0x1f)
-#define DIR_FWD(reg) \
- (BIT(reg , 15))
-#define SPEED_FAST(reg) \
- (BIT(reg , 7))
-#define CMD_OPT(reg) \
- (BIT(reg , 6))
-#define UNKNOWN_B9(reg) \
- (BIT(reg , 9))
-#define DIR_FWD_MASK BIT_MASK(15) // Direction = forward
-#define SPEED_FAST_MASK BIT_MASK(7) // Speed = fast
-
-// Commands
-enum {
- CMD_INDTA_INGAP, // 00: scan for data first then for gap
- CMD_UNK_01, // 01: unknown
- CMD_FINAL_GAP, // 02: write final gap
- CMD_INIT_WRITE, // 03: write words for tape formatting
- CMD_STOP, // 04: stop
- CMD_UNK_05, // 05: unknown
- CMD_SET_TRACK, // 06: set A/B track
- CMD_UNK_07, // 07: unknown
- CMD_UNK_08, // 08: unknown
- CMD_UNK_09, // 09: unknown
- CMD_MOVE, // 0a: move tape
- CMD_UNK_0b, // 0b: unknown
- CMD_INGAP_MOVE, // 0c: scan for gap then move a bit further (used to gain some margin when inverting tape movement)
- CMD_UNK_0d, // 0d: unknown
- CMD_CLEAR, // 0e: clear errors/unlatch status bits
- CMD_UNK_0f, // 0f: unknown
- CMD_NOT_INDTA, // 10: scan for end of data
- CMD_UNK_11, // 11: unknown
- CMD_UNK_12, // 12: unknown
- CMD_UNK_13, // 13: unknown
- CMD_UNK_14, // 14: unknown
- CMD_UNK_15, // 15: unknown
- CMD_WRITE_IRG, // 16: write inter-record gap
- CMD_UNK_17, // 17: unknown
- CMD_SCAN_RECORDS, // 18: scan records (count IRGs)
- CMD_RECORD_WRITE, // 19: write record words
- CMD_MOVE_INDTA, // 1a: move then scan for data
- CMD_UNK_1b, // 1b: unknown (for now it seems harmless to handle it as NOP)
- CMD_DELTA_MOVE_HOLE, // 1c: move tape a given distance, intr at end or first hole found (whichever comes first)
- CMD_START_READ, // 1d: start record reading
- CMD_DELTA_MOVE_IRG, // 1e: move tape a given distance, detect gaps in parallel
- CMD_END_READ // 1f: stop reading
-};
-
-// Bits of status register
-#define STATUS_HOLE_BIT 0 // Hole detected
-#define STATUS_CART_OUT_BIT 1 // Cartridge out
-#define STATUS_SFAIL_BIT 2 // Servo failure
-#define STATUS_WPR_BIT 3 // Write protection
-#define STATUS_GAP_BIT 4 // Gap detected
-#define STATUS_TRACKB_BIT 5 // Track B selected
-#define STATUS_CART_OUT_MASK BIT_MASK(STATUS_CART_OUT_BIT) // Cartridge out
-#define STATUS_WPR_MASK BIT_MASK(STATUS_WPR_BIT) // Write protection
-#define STATUS_ERR_MASK (STATUS_CART_OUT_MASK) // Mask of errors in status reg.
-
-// *** Position of tape holes ***
-// At beginning of tape:
-// *START*
-// |<-----24"----->|<---12"--->|<---12"--->|<-----24"----->|
-// O O O O O O O
-// |<->| |<->| |<->|
-// 0.218" 0.218" 0.218"
-// At end of tape:
-// *END*
-// |<-----24"----->|<---12"--->|<---12"--->|<-----24"----->|
-// O O O O
-//
-static const hp_taco_device::tape_pos_t tape_holes[] = {
- (hp_taco_device::tape_pos_t)(23.891 * ONE_INCH_POS), // 24 - 0.218 / 2
- (hp_taco_device::tape_pos_t)(24.109 * ONE_INCH_POS), // 24 + 0.218 / 2
- (hp_taco_device::tape_pos_t)(35.891 * ONE_INCH_POS), // 36 - 0.218 / 2
- (hp_taco_device::tape_pos_t)(36.109 * ONE_INCH_POS), // 36 + 0.218 / 2
- (hp_taco_device::tape_pos_t)(47.891 * ONE_INCH_POS), // 48 - 0.218 / 2
- (hp_taco_device::tape_pos_t)(48.109 * ONE_INCH_POS), // 48 + 0.218 / 2
- 72 * ONE_INCH_POS, // 72
- 1752 * ONE_INCH_POS, // 1752
- 1776 * ONE_INCH_POS, // 1776
- 1788 * ONE_INCH_POS, // 1788
- 1800 * ONE_INCH_POS // 1800
-};
-
-// Device type definition
-const device_type HP_TACO = &device_creator<hp_taco_device>;
-
-// Constructors
-hp_taco_device::hp_taco_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname)
- : device_t(mconfig, type, name, tag, owner, clock, shortname, __FILE__),
- device_image_interface(mconfig , *this),
- m_irq_handler(*this),
- m_flg_handler(*this),
- m_sts_handler(*this),
- m_tape_pos(TAPE_INIT_POS),
- m_image_dirty(false)
-{
- clear_state();
-}
-
-hp_taco_device::hp_taco_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : device_t(mconfig, HP_TACO, "HP TACO", tag, owner, clock, "TACO", __FILE__),
- device_image_interface(mconfig , *this),
- m_irq_handler(*this),
- m_flg_handler(*this),
- m_sts_handler(*this),
- m_tape_pos(TAPE_INIT_POS),
- m_image_dirty(false)
-{
- clear_state();
-}
-
-WRITE16_MEMBER(hp_taco_device::reg_w)
-{
- LOG_0(("wr R%u = %04x\n", 4 + offset , data));
-
- // Any I/O activity clears IRQ
- irq_w(false);
-
- switch (offset) {
- case 0:
- // Data register
- m_data_reg = data;
- m_data_reg_full = true;
- break;
-
- case 1:
- // Command register
- start_cmd_exec(data & CMD_REG_MASK);
- break;
-
- case 2:
- // Tachometer register
- m_tach_reg = data;
- break;
-
- case 3:
- // Timing register
- m_timing_reg = data;
- break;
- }
-}
-
-READ16_MEMBER(hp_taco_device::reg_r)
-{
- UINT16 res = 0;
-
- // Any I/O activity clears IRQ
- irq_w(false);
-
- switch (offset) {
- case 0:
- // Data register
- res = m_data_reg;
- break;
-
- case 1:
- // Command & status register
- res = (m_cmd_reg & CMD_REG_MASK) | (m_status_reg & STATUS_REG_MASK);
- break;
-
- case 2:
- // Tachometer register
- res = m_tach_reg;
- break;
-
- case 3:
- // Checksum register: it clears when read
- res = m_checksum_reg;
- m_checksum_reg = 0;
- break;
- }
-
- LOG_0(("rd R%u = %04x\n", 4 + offset , res));
-
- return res;
-}
-
-READ_LINE_MEMBER(hp_taco_device::flg_r)
-{
- return m_flg;
-}
-
-READ_LINE_MEMBER(hp_taco_device::sts_r)
-{
- return m_sts;
-}
-
-// device_config_complete
-void hp_taco_device::device_config_complete()
-{
- LOG(("device_config_complete"));
- update_names();
-}
-
-// device_start
-void hp_taco_device::device_start()
-{
- LOG(("device_start"));
- m_irq_handler.resolve_safe();
- m_flg_handler.resolve_safe();
- m_sts_handler.resolve_safe();
-
- save_item(NAME(m_data_reg));
- save_item(NAME(m_data_reg_full));
- save_item(NAME(m_cmd_reg));
- save_item(NAME(m_cmd_state));
- save_item(NAME(m_status_reg));
- save_item(NAME(m_tach_reg));
- save_item(NAME(m_checksum_reg));
- save_item(NAME(m_timing_reg));
- save_item(NAME(m_irq));
- save_item(NAME(m_flg));
- save_item(NAME(m_sts));
- save_item(NAME(m_tape_pos));
- save_item(NAME(m_start_time));
- save_item(NAME(m_tape_fwd));
- save_item(NAME(m_tape_fast));
- save_item(NAME(m_image_dirty));
- save_item(NAME(m_tape_wr));
- save_item(NAME(m_rw_pos));
- save_item(NAME(m_next_word));
- save_item(NAME(m_rd_it_valid));
- save_item(NAME(m_gap_detect_start));
-
- m_tape_timer = timer_alloc(TAPE_TMR_ID);
- m_hole_timer = timer_alloc(HOLE_TMR_ID);
-}
-
-// device_stop
-void hp_taco_device::device_stop()
-{
-}
-
-// device_reset
-void hp_taco_device::device_reset()
-{
- LOG(("device_reset"));
- clear_state();
-
- m_irq = false;
- m_flg = true;
-
- m_irq_handler(false);
- m_flg_handler(true);
- set_error(false);
-}
-
-void hp_taco_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
-{
- if (CMD_CODE(m_cmd_reg) != CMD_STOP) {
- update_tape_pos();
- }
-
- switch (id) {
- case TAPE_TMR_ID:
- LOG_0(("Tape tmr @%g\n" , machine().time().as_double()));
-
- tape_pos_t length;
-
- switch (CMD_CODE(m_cmd_reg)) {
- case CMD_INDTA_INGAP:
- if (m_cmd_state == 0) {
- m_cmd_state = 1;
- tape_pos_t target = m_tape_pos;
- if (next_n_gap(target, 1, MIN_IRG_LENGTH)) {
- m_tape_timer->adjust(time_to_target(target));
- }
- return;
- }
- break;
-
- case CMD_RECORD_WRITE:
- if (m_cmd_state == 0) {
- if (m_rd_it->second == PREAMBLE_WORD) {
- LOG_0(("Got preamble\n"));
- m_cmd_state = 1;
- // m_rw_pos already at correct position
- m_tape_timer->adjust(fetch_next_wr_word());
- break;
- } else {
- adv_res_t res = adv_it(m_rd_it);
- if (res != ADV_NO_MORE_DATA) {
- m_tape_timer->adjust(time_to_rd_next_word(m_rw_pos));
- }
- // No IRQ
- return;
- }
- }
- // Intentional fall-through
- case CMD_INIT_WRITE:
- write_word(m_rw_pos , m_next_word , length);
- pos_offset(m_rw_pos , length);
- // Just to be sure..
- m_tape_pos = m_rw_pos;
- m_tape_timer->adjust(fetch_next_wr_word());
- break;
-
- case CMD_STOP:
- move_tape_pos(m_tape_fast ? FAST_BRAKE_DIST : SLOW_BRAKE_DIST);
- stop_tape();
- break;
-
- case CMD_INGAP_MOVE:
- if (m_cmd_state == 0) {
- m_cmd_state = 1;
- m_tape_timer->adjust(time_to_tach_pulses());
- return;
- }
- break;
-
- case CMD_FINAL_GAP:
- case CMD_WRITE_IRG:
- write_gap(m_rw_pos , m_tape_pos);
- m_hole_timer->reset();
- break;
-
- case CMD_SCAN_RECORDS:
- if (m_cmd_state == 0) {
- m_cmd_state = 1;
- tape_pos_t target = m_tape_pos;
- if (next_n_gap(target, 0x10000U - m_tach_reg, MIN_IRG_LENGTH)) {
- LOG_0(("%u gaps @%d\n" , 0x10000U - m_tach_reg, target));
- m_tape_timer->adjust(time_to_target(target));
- }
- return;
- } else {
- m_hole_timer->reset();
- }
- break;
-
- case CMD_MOVE_INDTA:
- if (m_cmd_state == 0) {
- if (next_data(m_rd_it , m_tape_pos , true)) {
- m_cmd_state = 1;
- m_tape_timer->adjust(time_to_target(farthest_end(m_rd_it)));
- }
- // No IRQ
- return;
- }
- // m_cmd_state == 1 -> IRQ & cmd end
- break;
-
- case CMD_DELTA_MOVE_HOLE:
- case CMD_DELTA_MOVE_IRG:
- // Interrupt at end of movement
- m_hole_timer->reset();
- break;
-
- case CMD_START_READ:
- {
- bool set_intr = true;
- // Just to be sure..
- m_tape_pos = m_rw_pos;
- if (m_cmd_state == 0) {
- set_intr = false;
- if (m_rd_it->second == PREAMBLE_WORD) {
- m_cmd_state = 1;
- }
- LOG_0(("Got preamble\n"));
- } else {
- m_data_reg = m_rd_it->second;
- m_checksum_reg += m_data_reg;
- LOG_0(("RD %04x\n" , m_data_reg));
- }
- adv_res_t res = adv_it(m_rd_it);
- LOG_0(("adv_it %d\n" , res));
- if (res == ADV_NO_MORE_DATA) {
- m_rd_it_valid = false;
- } else {
- if (res == ADV_DISCONT_DATA) {
- // Hit a gap, restart preamble search
- m_cmd_state = 0;
- }
- m_tape_timer->adjust(time_to_rd_next_word(m_rw_pos));
- }
- if (!set_intr) {
- return;
- }
- }
- break;
-
- case CMD_END_READ:
- {
- m_tape_pos = m_rw_pos;
- // Note: checksum is not updated
- m_data_reg = m_rd_it->second;
- LOG_0(("Final RD %04x\n" , m_data_reg));
- adv_res_t res = adv_it(m_rd_it);
- if (res == ADV_NO_MORE_DATA) {
- m_rd_it_valid = false;
- }
- m_hole_timer->reset();
- }
- break;
-
- default:
- // Other commands: just raise irq
- break;
- }
- irq_w(true);
- break;
-
- case HOLE_TMR_ID:
- LOG_0(("Hole tmr @%g\n" , machine().time().as_double()));
-
- BIT_SET(m_status_reg , STATUS_HOLE_BIT);
-
- switch (CMD_CODE(m_cmd_reg)) {
- case CMD_FINAL_GAP:
- case CMD_WRITE_IRG:
- write_gap(m_rw_pos , m_tape_pos);
- m_rw_pos = m_tape_pos;
- break;
-
- case CMD_SCAN_RECORDS:
- case CMD_DELTA_MOVE_HOLE:
- // Cmds 18 & 1c are terminated at first hole
- m_tape_timer->reset();
- irq_w(true);
- // No reloading of hole timer
- return;
-
- case CMD_DELTA_MOVE_IRG:
- // TODO: update r6
- m_hole_timer->adjust(time_to_next_hole());
- // No IRQ at holes
- return;
-
- case CMD_START_READ:
- case CMD_END_READ:
- set_error(true);
- break;
-
- default:
- // Other cmds: default processing (update tape pos, set IRQ, schedule timer for next hole)
- break;
- }
-
- irq_w(true);
- m_hole_timer->adjust(time_to_next_hole());
- break;
-
- default:
- break;
- }
-}
-
-void hp_taco_device::clear_state(void)
-{
- m_data_reg = 0;
- m_data_reg_full = false;
- m_cmd_reg = 0;
- m_status_reg = 0;
- m_tach_reg = 0;
- m_checksum_reg = 0;
- m_timing_reg = 0;
- m_cmd_state = 0;
- // m_tape_pos is not reset, tape stays where it is
- m_start_time = attotime::never;
- m_tape_fwd = false;
- m_tape_fast = false;
- // m_image_dirty is not touched
- m_tape_wr = false;
- m_rw_pos = 0;
- m_next_word = 0;
- m_rd_it_valid = false;
- m_gap_detect_start = NULL_TAPE_POS;
-
- set_tape_present(false);
- set_tape_present(is_loaded());
-}
-
-void hp_taco_device::irq_w(bool state)
-{
- if (state != m_irq) {
- m_irq = state;
- m_irq_handler(state);
- LOG_0(("IRQ = %d\n" , state));
- }
-}
-
-void hp_taco_device::set_error(bool state)
-{
- m_sts = !state;
- m_sts_handler(m_sts);
- LOG_0(("error = %d\n" , state));
-}
-
-unsigned hp_taco_device::speed_to_tick_freq(void) const
-{
- return m_tape_fast ? TACH_FREQ_FAST * TAPE_POS_FRACT : TACH_FREQ_SLOW * TAPE_POS_FRACT;
-}
-
-bool hp_taco_device::pos_offset(tape_pos_t& pos , tape_pos_t offset) const
-{
- if (offset == 0) {
- return true;
- }
-
- if (!m_tape_fwd) {
- offset = -offset;
- }
-
- pos += offset;
-
- // In real life tape would unspool..
- if (pos > TAPE_LENGTH) {
- pos = TAPE_LENGTH;
- return false;
- } else if (pos < 0) {
- pos = 0;
- return false;
- } else {
- return true;
- }
-}
-
-void hp_taco_device::move_tape_pos(tape_pos_t delta_pos)
-{
- tape_pos_t tape_start_pos = m_tape_pos;
- if (!pos_offset(m_tape_pos , delta_pos)) {
- LOG(("Tape unspooled!\n"));
- }
- m_start_time = machine().time();
- LOG_0(("Tape pos = %u\n" , m_tape_pos));
- if (any_hole(tape_start_pos , m_tape_pos)) {
- // Crossed one or more holes
- BIT_SET(m_status_reg , STATUS_HOLE_BIT);
- }
-}
-
-void hp_taco_device::update_tape_pos(void)
-{
- if (m_start_time.is_never()) {
- // Tape not moving
- return;
- }
-
- attotime delta_time(machine().time() - m_start_time);
- LOG_0(("delta_time = %g\n" , delta_time.as_double()));
- // How many tachometer ticks has the tape moved?
- tape_pos_t delta_tach = (tape_pos_t)(delta_time.as_ticks(speed_to_tick_freq()));
- LOG_0(("delta_tach = %u\n" , delta_tach));
-
- move_tape_pos(delta_tach);
-
- // Gap detection
- bool gap_detected = false;
- if (m_gap_detect_start != NULL_TAPE_POS && abs(m_gap_detect_start - m_tape_pos) >= MIN_IRG_LENGTH) {
- tape_pos_t tmp = m_tape_pos;
- pos_offset(tmp , -MIN_IRG_LENGTH);
- gap_detected = just_gap(tmp , m_tape_pos);
- }
- if (gap_detected) {
- BIT_SET(m_status_reg, STATUS_GAP_BIT);
- } else {
- BIT_CLR(m_status_reg, STATUS_GAP_BIT);
- }
-}
-
-void hp_taco_device::ensure_a_lt_b(tape_pos_t& a , tape_pos_t& b)
-{
- if (a > b) {
- // Ensure A always comes before B
- tape_pos_t tmp;
- tmp = a;
- a = b;
- b = tmp;
- }
-}
-
-// Is there any hole in a given section of tape?
-bool hp_taco_device::any_hole(tape_pos_t tape_pos_a , tape_pos_t tape_pos_b)
-{
- ensure_a_lt_b(tape_pos_a , tape_pos_b);
-
- for (tape_pos_t hole : tape_holes) {
- if (tape_pos_a < hole && tape_pos_b >= hole) {
- return true;
- }
- }
-
- return false;
-}
-
-// Position of next hole tape will reach in a given direction
-hp_taco_device::tape_pos_t hp_taco_device::next_hole(void) const
-{
- if (m_tape_fwd) {
- for (tape_pos_t hole : tape_holes) {
- if (hole > m_tape_pos) {
- LOG_0(("next hole fwd @%u = %u\n" , m_tape_pos , hole));
- return hole;
- }
- }
- // No more holes: will hit end of tape
- return TAPE_LENGTH;
- } else {
- for (int i = (sizeof(tape_holes) / sizeof(tape_holes[ 0 ])) - 1; i >= 0; i--) {
- if (tape_holes[ i ] < m_tape_pos) {
- LOG_0(("next hole rev @%u = %u\n" , m_tape_pos , tape_holes[ i ]));
- return tape_holes[ i ];
- }
- }
- // No more holes: will hit start of tape
- return 0;
- }
-}
-
-attotime hp_taco_device::time_to_distance(tape_pos_t distance) const
-{
- // +1 for rounding
- return attotime::from_ticks(distance + 1 , speed_to_tick_freq());
-}
-
-attotime hp_taco_device::time_to_target(tape_pos_t target) const
-{
- return time_to_distance(abs(target - m_tape_pos));
-}
-
-bool hp_taco_device::start_tape_cmd(UINT16 cmd_reg , UINT16 must_be_1 , UINT16 must_be_0)
-{
- m_cmd_reg = cmd_reg;
-
- UINT16 to_be_tested = (m_cmd_reg & CMD_REG_MASK) | (m_status_reg & STATUS_REG_MASK);
- // Bits in STATUS_ERR_MASK must always be 0
- must_be_0 |= STATUS_ERR_MASK;
-
- // It's not an error if the error state is already set (sts false)
- if (((to_be_tested & (must_be_1 | must_be_0)) ^ must_be_1) != 0) {
- set_error(true);
- return false;
- } else {
- bool prev_tape_wr = m_tape_wr;
- bool prev_tape_fwd = m_tape_fwd;
- bool prev_tape_fast = m_tape_fast;
- bool not_moving = m_start_time.is_never();
-
- m_start_time = machine().time();
- m_tape_wr = (must_be_0 & STATUS_WPR_MASK) != 0;
- m_tape_fwd = DIR_FWD(m_cmd_reg);
- m_tape_fast = SPEED_FAST(m_cmd_reg);
- // TODO: remove?
- BIT_CLR(m_status_reg, STATUS_HOLE_BIT);
-
- if (m_tape_wr) {
- // Write command: disable gap detector
- m_gap_detect_start = NULL_TAPE_POS;
- BIT_CLR(m_status_reg, STATUS_GAP_BIT);
- m_image_dirty = true;
- } else if (not_moving || prev_tape_wr != m_tape_wr || prev_tape_fwd != m_tape_fwd || prev_tape_fast != m_tape_fast) {
- // Tape started right now, switched from writing to reading, direction changed or speed changed: (re)start gap detector
- m_gap_detect_start = m_tape_pos;
- BIT_CLR(m_status_reg, STATUS_GAP_BIT);
- }
- return true;
- }
-}
-
-void hp_taco_device::stop_tape(void)
-{
- m_start_time = attotime::never;
- m_gap_detect_start = NULL_TAPE_POS;
-}
-
-hp_taco_device::tape_track_t& hp_taco_device::current_track(void)
-{
- return m_tracks[ BIT(m_status_reg , STATUS_TRACKB_BIT) ];
-}
-
-// Return physical length of a 16-bit word on tape
-hp_taco_device::tape_pos_t hp_taco_device::word_length(tape_word_t w)
-{
- unsigned zeros , ones;
-
- // pop count of w
- ones = (w & 0x5555) + ((w >> 1) & 0x5555);
- ones = (ones & 0x3333) + ((ones >> 2) & 0x3333);
- ones = (ones & 0x0f0f) + ((ones >> 4) & 0x0f0f);
- ones = (ones & 0x00ff) + ((ones >> 8) & 0x00ff);
-
- zeros = 16 - ones;
-
- return zeros * ZERO_BIT_LEN + (ones + 1) * ONE_BIT_LEN;
-}
-
-hp_taco_device::tape_pos_t hp_taco_device::word_end_pos(const tape_track_t::iterator& it)
-{
- return it->first + word_length(it->second);
-}
-
-void hp_taco_device::adjust_it(tape_track_t& track , tape_track_t::iterator& it , tape_pos_t pos)
-{
- if (it != track.begin()) {
- it--;
- if (word_end_pos(it) <= pos) {
- it++;
- }
- }
-}
-
-// Write a word on current tape track
-void hp_taco_device::write_word(tape_pos_t start , tape_word_t word , tape_pos_t& length)
-{
- tape_track_t& track = current_track();
- tape_track_t::iterator it_low = track.lower_bound(start);
- adjust_it(track , it_low , start);
- length = word_length(word);
- tape_pos_t end_pos = start + length;
- tape_track_t::iterator it_high = track.lower_bound(end_pos);
-
- track.erase(it_low , it_high);
-
- track.insert(it_high , std::make_pair(start, word));
- LOG_0(("WR %04x @ T%u:%u\n" , word , BIT(m_status_reg , STATUS_TRACKB_BIT) , start));
-}
-
-// Write a gap on current track
-void hp_taco_device::write_gap(tape_pos_t a , tape_pos_t b)
-{
- ensure_a_lt_b(a , b);
- tape_track_t& track = current_track();
- tape_track_t::iterator it_low = track.lower_bound(a);
- adjust_it(track , it_low , a);
- tape_track_t::iterator it_high = track.lower_bound(b);
-
- track.erase(it_low, it_high);
-
- LOG_0(("GAP on T%u:[%u,%u)\n" , BIT(m_status_reg , STATUS_TRACKB_BIT) , a , b));
-}
-
-bool hp_taco_device::just_gap(tape_pos_t a , tape_pos_t b)
-{
- ensure_a_lt_b(a , b);
- tape_track_t& track = current_track();
- tape_track_t::iterator it_low = track.lower_bound(a);
- tape_track_t::iterator it_high = track.lower_bound(b);
-
- adjust_it(track, it_low, a);
-
- return it_low == it_high;
-}
-
-hp_taco_device::tape_pos_t hp_taco_device::farthest_end(const tape_track_t::iterator& it) const
-{
- if (m_tape_fwd) {
- return word_end_pos(it);
- } else {
- return it->first;
- }
-}
-
-bool hp_taco_device::next_data(tape_track_t::iterator& it , tape_pos_t pos , bool inclusive)
-{
- tape_track_t& track = current_track();
- it = track.lower_bound(pos);
- if (m_tape_fwd) {
- if (inclusive) {
- adjust_it(track, it, pos);
- }
- return it != track.end();
- } else {
- // Never more than 2 iterations
- do {
- if (it == track.begin()) {
- it = track.end();
- return false;
- }
- it--;
- } while (!inclusive && word_end_pos(it) > pos);
- return true;
- }
-}
-
-hp_taco_device::adv_res_t hp_taco_device::adv_it(tape_track_t::iterator& it)
-{
- tape_track_t& track = current_track();
- if (m_tape_fwd) {
- tape_pos_t prev_pos = word_end_pos(it);
- it++;
- if (it == track.end()) {
- return ADV_NO_MORE_DATA;
- } else {
- adv_res_t res = prev_pos == it->first ? ADV_CONT_DATA : ADV_DISCONT_DATA;
- return res;
- }
- } else {
- if (it == track.begin()) {
- it = track.end();
- return ADV_NO_MORE_DATA;
- } else {
- tape_pos_t prev_pos = it->first;
- it--;
- return prev_pos == word_end_pos(it) ? ADV_CONT_DATA : ADV_DISCONT_DATA;
- }
- }
-}
-
-attotime hp_taco_device::fetch_next_wr_word(void)
-{
- if (m_data_reg_full) {
- m_next_word = m_data_reg;
- m_data_reg_full = false;
- LOG_0(("next %04x (DR)\n" , m_next_word));
- } else {
- // When data register is empty, write checksum word
- m_next_word = m_checksum_reg;
- LOG_0(("next %04x (CS)\n" , m_next_word));
- }
- // Update checksum with new word
- m_checksum_reg += m_next_word;
-
- return time_to_distance(word_length(m_next_word));
-}
-
-attotime hp_taco_device::time_to_rd_next_word(tape_pos_t& word_rd_pos)
-{
- if (m_rd_it_valid) {
- word_rd_pos = farthest_end(m_rd_it);
- return time_to_target(word_rd_pos);
- } else {
- return attotime::never;
- }
-}
-
-/**
- * Scan for next "n_gaps" gaps
- *
- * @param[in,out] pos Start position on input, start of gap on output
- * @param it Pointer to data word where scan is to start
- * @param n_gaps Number of gaps to scan
- * @param min_gap Minimum gap size
- *
- * @return true if n_gaps gaps are found
- */
-bool hp_taco_device::next_n_gap(tape_pos_t& pos , tape_track_t::iterator it , unsigned n_gaps , tape_pos_t min_gap)
-{
- tape_track_t& track = current_track();
- bool done = false;
- tape_track_t::iterator prev_it;
-
- if (m_tape_fwd) {
- tape_pos_t next_pos;
-
- while (1) {
- if (it == track.end()) {
- next_pos = TAPE_LENGTH;
- done = true;
- } else {
- next_pos = it->first;
- }
- if (((next_pos - pos) >= min_gap && --n_gaps == 0) || done) {
- break;
- }
- adv_res_t adv_res;
- do {
- prev_it = it;
- adv_res = adv_it(it);
- } while (adv_res == ADV_CONT_DATA);
- pos = word_end_pos(prev_it);
- }
- } else {
- tape_pos_t next_pos;
-
- while (1) {
- if (it == track.end()) {
- next_pos = 0;
- done = true;
- } else {
- next_pos = word_end_pos(it);
- }
- if (((pos - next_pos) >= min_gap && --n_gaps == 0) || done) {
- break;
- }
- adv_res_t adv_res;
- do {
- prev_it = it;
- adv_res = adv_it(it);
- } while (adv_res == ADV_CONT_DATA);
- pos = prev_it->first;
- }
- }
-
- // Set "pos" where minimum gap size is met
- pos_offset(pos , min_gap);
-
- return n_gaps == 0;
-}
-
-bool hp_taco_device::next_n_gap(tape_pos_t& pos , unsigned n_gaps , tape_pos_t min_gap)
-{
- tape_track_t::iterator it;
- // First align with next data
- next_data(it, pos, true);
- // Then scan for n_gaps
- return next_n_gap(pos, it, n_gaps, min_gap);
-}
-
-void hp_taco_device::clear_tape(void)
-{
- for (unsigned track_n = 0; track_n < 2; track_n++) {
- m_tracks[ track_n ].clear();
- }
-}
-
-void hp_taco_device::dump_sequence(tape_track_t::const_iterator it_start , unsigned n_words)
-{
- if (n_words) {
- UINT32 tmp32;
- UINT16 tmp16;
-
- tmp32 = n_words;
- fwrite(&tmp32 , sizeof(tmp32));
- tmp32 = it_start->first;
- fwrite(&tmp32 , sizeof(tmp32));
-
- for (unsigned i = 0; i < n_words; i++) {
- tmp16 = it_start->second;
- fwrite(&tmp16 , sizeof(tmp16));
- it_start++;
- }
- }
-}
-
-void hp_taco_device::save_tape(void)
-{
- UINT32 tmp32;
-
- fseek(0, SEEK_SET);
-
- tmp32 = FILE_MAGIC;
- fwrite(&tmp32 , sizeof(tmp32));
-
- for (unsigned track_n = 0; track_n < 2; track_n++) {
- const tape_track_t& track = m_tracks[ track_n ];
- tape_pos_t next_pos = (tape_pos_t)-1;
- unsigned n_words = 0;
- tape_track_t::const_iterator it_start;
- for (tape_track_t::const_iterator it = track.cbegin(); it != track.cend(); it++) {
- if (it->first != next_pos) {
- dump_sequence(it_start , n_words);
- it_start = it;
- n_words = 0;
- }
- next_pos = it->first + word_length(it->second);
- n_words++;
- }
- dump_sequence(it_start , n_words);
- // End of track
- tmp32 = (UINT32)-1;
- fwrite(&tmp32 , sizeof(tmp32));
- }
-}
-
-bool hp_taco_device::load_track(tape_track_t& track)
-{
- UINT32 tmp32;
-
- track.clear();
-
- while (1) {
- if (fread(&tmp32 , sizeof(tmp32)) != sizeof(tmp32)) {
- return false;
- }
-
- if (tmp32 == (UINT32)-1) {
- return true;
- }
-
- unsigned n_words = tmp32;
-
- if (fread(&tmp32 , sizeof(tmp32)) != sizeof(tmp32)) {
- return false;
- }
-
- tape_pos_t pos = (tape_pos_t)tmp32;
-
- for (unsigned i = 0; i < n_words; i++) {
- UINT16 tmp16;
-
- if (fread(&tmp16 , sizeof(tmp16)) != sizeof(tmp16)) {
- return false;
- }
-
- track.insert(std::make_pair(pos , tmp16));
- pos += word_length(tmp16);
- }
- }
-}
-
-bool hp_taco_device::load_tape(void)
-{
- UINT32 magic;
-
- if (fread(&magic , sizeof(magic)) != sizeof(magic) ||
- magic != FILE_MAGIC) {
- return false;
- }
-
- for (unsigned track_n = 0; track_n < 2; track_n++) {
- if (!load_track(m_tracks[ track_n ])) {
- LOG(("load_tape failed"));
- clear_tape();
- return false;
- }
- }
-
- LOG(("load_tape done\n"));
- return true;
-}
-
-void hp_taco_device::set_tape_present(bool present)
-{
- if (present) {
- if (is_readonly()) {
- BIT_SET(m_status_reg, STATUS_WPR_BIT);
- } else {
- BIT_CLR(m_status_reg, STATUS_WPR_BIT);
- }
- // STATUS_CART_OUT_BIT is reset by CMD_CLEAR
- } else {
- BIT_SET(m_status_reg, STATUS_CART_OUT_BIT);
- BIT_SET(m_status_reg, STATUS_WPR_BIT);
- }
-}
-
-attotime hp_taco_device::time_to_next_hole(void) const
-{
- return time_to_target(next_hole());
-}
-
-attotime hp_taco_device::time_to_tach_pulses(void) const
-{
- return time_to_distance((tape_pos_t)(0x10000U - m_tach_reg) * TAPE_POS_FRACT);
-}
-
-void hp_taco_device::start_cmd_exec(UINT16 new_cmd_reg)
-{
- LOG(("Cmd = %02x\n" , CMD_CODE(new_cmd_reg)));
-
- update_tape_pos();
-
- attotime cmd_duration = attotime::never;
- attotime time_to_hole = attotime::never;
-
- unsigned new_cmd_code = CMD_CODE(new_cmd_reg);
-
- if (new_cmd_code != CMD_START_READ &&
- new_cmd_code != CMD_END_READ &&
- new_cmd_code != CMD_CLEAR) {
- m_rd_it_valid = false;
- }
-
- switch (new_cmd_code) {
- case CMD_INDTA_INGAP:
- // Errors: CART OUT,FAST SPEED
- if (start_tape_cmd(new_cmd_reg , 0 , SPEED_FAST_MASK)) {
- m_cmd_state = 0;
- if (next_data(m_rd_it , m_tape_pos , true)) {
- cmd_duration = time_to_target(farthest_end(m_rd_it));
- }
- }
- break;
-
- case CMD_FINAL_GAP:
- // Errors: WP,CART OUT
- if (start_tape_cmd(new_cmd_reg , 0 , STATUS_WPR_MASK)) {
- m_rw_pos = m_tape_pos;
- cmd_duration = time_to_distance(END_GAP_LENGTH);
- time_to_hole = time_to_next_hole();
- }
- break;
-
- case CMD_CLEAR:
- set_error(false);
- BIT_CLR(m_status_reg, STATUS_HOLE_BIT);
- BIT_CLR(m_status_reg, STATUS_CART_OUT_BIT);
- BIT_CLR(m_status_reg, STATUS_WPR_BIT);
- set_tape_present(is_loaded());
- // This is a special command: it doesn't raise IRQ at completion and it
- // doesn't replace current command
- return;
-
- case CMD_NOT_INDTA:
- // Errors: CART OUT,FAST SPEED
- if (start_tape_cmd(new_cmd_reg , 0 , SPEED_FAST_MASK)) {
- tape_pos_t target = m_tape_pos;
- if (next_n_gap(target, 1, NO_DATA_GAP)) {
- LOG_0(("End of data @%d\n" , target));
- cmd_duration = time_to_target(target);
- }
- // Holes detected?
- }
- break;
-
- case CMD_INIT_WRITE:
- // Errors: WP,CART OUT,fast speed,reverse
- if (start_tape_cmd(new_cmd_reg , DIR_FWD_MASK , STATUS_WPR_MASK | SPEED_FAST_MASK)) {
- m_next_word = PREAMBLE_WORD;
- m_rw_pos = m_tape_pos;
- cmd_duration = time_to_distance(word_length(m_next_word));
- }
- break;
-
- case CMD_STOP:
- if (CMD_CODE(m_cmd_reg) != CMD_STOP) {
- if (m_start_time.is_never()) {
- // Tape is already stopped
- cmd_duration = attotime::from_usec(QUICK_CMD_USEC);
- } else {
- // Start braking timer
- cmd_duration = attotime::from_msec(m_tape_fast ? FAST_BRAKE_MSEC : SLOW_BRAKE_MSEC);
- }
- m_cmd_reg = new_cmd_reg;
- } else {
- // TODO: check if ok
- return;
- }
- break;
-
- case CMD_SET_TRACK:
- // Don't know if this command really starts the tape or not (probably it doesn't)
- if (start_tape_cmd(new_cmd_reg , 0 , 0)) {
- // When b9 is 0, set track A/B
- // When b9 is 1, ignore command (in TACO chip it has an unknown purpose)
- if (!UNKNOWN_B9(new_cmd_reg)) {
- if (CMD_OPT(new_cmd_reg)) {
- BIT_SET(m_status_reg, STATUS_TRACKB_BIT);
- } else {
- BIT_CLR(m_status_reg, STATUS_TRACKB_BIT);
- }
- }
- cmd_duration = attotime::from_usec(QUICK_CMD_USEC);
- }
- break;
-
- case CMD_MOVE:
- if (start_tape_cmd(new_cmd_reg , 0 , 0)) {
- time_to_hole = time_to_next_hole();
- }
- break;
-
- case CMD_INGAP_MOVE:
- // Errors: CART OUT,FAST SPEED
- if (start_tape_cmd(new_cmd_reg , 0 , SPEED_FAST_MASK)) {
- m_cmd_state = 0;
- tape_pos_t target = m_tape_pos;
- if (next_n_gap(target, 1, MIN_IRG_LENGTH)) {
- LOG_0(("IRG @%d\n" , target));
- cmd_duration = time_to_target(target);
- }
- // Holes detected?
- }
- break;
-
- case CMD_WRITE_IRG:
- // Errors: WP,CART OUT
- if (start_tape_cmd(new_cmd_reg , 0 , STATUS_WPR_MASK)) {
- m_rw_pos = m_tape_pos;
- cmd_duration = time_to_tach_pulses();
- time_to_hole = time_to_next_hole();
- }
- break;
-
- case CMD_SCAN_RECORDS:
- // Errors: CART OUT
- if (start_tape_cmd(new_cmd_reg , 0 , 0)) {
- m_cmd_state = 0;
- if (next_data(m_rd_it , m_tape_pos , true)) {
- cmd_duration = time_to_target(farthest_end(m_rd_it));
- }
- time_to_hole = time_to_next_hole();
- }
- break;
-
- case CMD_RECORD_WRITE:
- // Errors: WP,CART OUT,fast speed,reverse
- if (start_tape_cmd(new_cmd_reg , DIR_FWD_MASK , STATUS_WPR_MASK | SPEED_FAST_MASK)) {
- // Search for preamble first
- m_cmd_state = 0;
- m_rd_it_valid = next_data(m_rd_it , m_tape_pos , false);
- cmd_duration = time_to_rd_next_word(m_rw_pos);
- // Holes detected?
- }
- break;
-
- case CMD_MOVE_INDTA:
- // Errors: CART OUT,FAST SPEED
- if (start_tape_cmd(new_cmd_reg , 0 , SPEED_FAST_MASK)) {
- m_cmd_state = 0;
- cmd_duration = time_to_tach_pulses();
- // Holes detected?
- }
- break;
-
- case CMD_UNK_1b:
- if (start_tape_cmd(new_cmd_reg , 0 , 0)) {
- // Unknown purpose, but make it a NOP (it's used in "T" test of test ROM)
- cmd_duration = attotime::from_usec(QUICK_CMD_USEC);
- }
- break;
-
- case CMD_DELTA_MOVE_HOLE:
- case CMD_DELTA_MOVE_IRG:
- if (start_tape_cmd(new_cmd_reg , 0 , 0)) {
- cmd_duration = time_to_tach_pulses();
- time_to_hole = time_to_next_hole();
- }
- break;
-
- case CMD_START_READ:
- // Yes, you can read tape backwards: test "C" does that!
- // Because of this DIR_FWD_MASK is not in the "must be 1" mask.
- if (start_tape_cmd(new_cmd_reg , 0 , SPEED_FAST_MASK)) {
- // TODO: check anche m_rw_pos sforato
- if (!m_rd_it_valid) {
- // Search for preamble first
- m_cmd_state = 0;
- m_rd_it_valid = next_data(m_rd_it , m_tape_pos , false);
- }
-
- cmd_duration = time_to_rd_next_word(m_rw_pos);
- time_to_hole = time_to_next_hole();
- }
- break;
-
- case CMD_END_READ:
- // This command only makes sense after CMD_START_READ
- if (CMD_CODE(m_cmd_reg) == CMD_START_READ && m_cmd_state == 1 &&
- start_tape_cmd(new_cmd_reg , 0 , SPEED_FAST_MASK)) {
- LOG_0(("END_READ %d\n" , m_rd_it_valid));
- cmd_duration = time_to_rd_next_word(m_rw_pos);
- time_to_hole = time_to_next_hole();
- }
- break;
-
- default:
- LOG(("Unrecognized command\n"));
- break;
- }
-
- m_tape_timer->adjust(cmd_duration);
- m_hole_timer->adjust(time_to_hole);
-}
-
-bool hp_taco_device::call_load()
-{
- LOG(("call_load %d\n" , has_been_created()));
- if (has_been_created()) {
- clear_tape();
- save_tape();
- } else if (!load_tape()) {
- seterror(IMAGE_ERROR_INVALIDIMAGE , "Wrong format");
- set_tape_present(false);
- return IMAGE_INIT_FAIL;
- }
-
- m_image_dirty = false;
-
- set_tape_present(true);
- return IMAGE_INIT_PASS;
-}
-
-bool hp_taco_device::call_create(int format_type, option_resolution *format_options)
-{
- LOG(("call_create %d\n" , has_been_created()));
- return call_load();
-}
-
-void hp_taco_device::call_unload()
-{
- LOG(("call_unload dirty=%d\n" , m_image_dirty));
- if (m_image_dirty) {
- save_tape();
- m_image_dirty = false;
- }
-
- clear_tape();
- set_tape_present(false);
-}
-
-const char *hp_taco_device::file_extensions() const
-{
- return "hti";
-}
diff --git a/src/devices/machine/hp_taco.h b/src/devices/machine/hp_taco.h
deleted file mode 100644
index c8b794c79a2..00000000000
--- a/src/devices/machine/hp_taco.h
+++ /dev/null
@@ -1,169 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:F. Ulivi
-/*********************************************************************
-
- hp_taco.h
-
- HP TApe COntroller (5006-3012)
-
-*********************************************************************/
-
-#ifndef __HP_TACO_H__
-#define __HP_TACO_H__
-
-#include <map>
-
-#define MCFG_TACO_IRQ_HANDLER(_devcb) \
- devcb = &hp_taco_device::set_irq_handler(*device , DEVCB_##_devcb);
-
-#define MCFG_TACO_FLG_HANDLER(_devcb) \
- devcb = &hp_taco_device::set_flg_handler(*device , DEVCB_##_devcb);
-
-#define MCFG_TACO_STS_HANDLER(_devcb) \
- devcb = &hp_taco_device::set_sts_handler(*device , DEVCB_##_devcb);
-
-class hp_taco_device : public device_t ,
- public device_image_interface
-{
-public:
- // construction/destruction
- hp_taco_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname);
- hp_taco_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
- // static configuration helpers
- template<class _Object> static devcb_base &set_irq_handler(device_t &device, _Object object) { return downcast<hp_taco_device &>(device).m_irq_handler.set_callback(object); }
- template<class _Object> static devcb_base &set_flg_handler(device_t &device, _Object object) { return downcast<hp_taco_device &>(device).m_flg_handler.set_callback(object); }
- template<class _Object> static devcb_base &set_sts_handler(device_t &device, _Object object) { return downcast<hp_taco_device &>(device).m_sts_handler.set_callback(object); }
-
- // Register read/write
- DECLARE_WRITE16_MEMBER(reg_w);
- DECLARE_READ16_MEMBER(reg_r);
-
- // Flag & status read
- DECLARE_READ_LINE_MEMBER(flg_r);
- DECLARE_READ_LINE_MEMBER(sts_r);
-
- // device_image_interface overrides
- virtual bool call_load() override;
- virtual bool call_create(int format_type, option_resolution *format_options) override;
- virtual void call_unload() override;
- virtual iodevice_t image_type() const override { return IO_MAGTAPE; }
- virtual bool is_readable() const override { return true; }
- virtual bool is_writeable() const override { return true; }
- virtual bool is_creatable() const override { return true; }
- virtual bool must_be_loaded() const override { return false; }
- virtual bool is_reset_on_load() const override { return false; }
- virtual const char *file_extensions() const override;
- virtual const option_guide *create_option_guide() const override { return nullptr; }
-
- // Tape position, 1 unit = 1 inch / (968 * 1024)
- typedef INT32 tape_pos_t;
-
- // Words stored on tape
- typedef UINT16 tape_word_t;
-
-protected:
- // device-level overrides
- virtual void device_config_complete() override;
- virtual void device_start() override;
- virtual void device_stop() override;
- virtual void device_reset() override;
- virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
-
-private:
- // Storage of tracks: mapping from a tape position to word stored there
- typedef std::map<tape_pos_t , tape_word_t> tape_track_t;
-
- devcb_write_line m_irq_handler;
- devcb_write_line m_flg_handler;
- devcb_write_line m_sts_handler;
-
- // Registers
- UINT16 m_data_reg;
- bool m_data_reg_full;
- UINT16 m_cmd_reg;
- UINT16 m_status_reg;
- UINT16 m_tach_reg;
- UINT16 m_checksum_reg;
- UINT16 m_timing_reg;
-
- // State
- bool m_irq;
- bool m_flg;
- bool m_sts;
- UINT8 m_cmd_state;
-
- // Tape position & motion
- tape_pos_t m_tape_pos;
- attotime m_start_time; // Tape moving if != never
- bool m_tape_fwd;
- bool m_tape_fast;
-
- // Timers
- emu_timer *m_tape_timer;
- emu_timer *m_hole_timer;
-
- // Content of tape tracks
- tape_track_t m_tracks[ 2 ];
- bool m_image_dirty;
-
- // Reading & writing
- bool m_tape_wr;
- tape_pos_t m_rw_pos;
- UINT16 m_next_word;
- tape_track_t::iterator m_rd_it;
- bool m_rd_it_valid;
-
- // Gap detection
- tape_pos_t m_gap_detect_start;
-
- typedef enum {
- ADV_NO_MORE_DATA,
- ADV_CONT_DATA,
- ADV_DISCONT_DATA
- } adv_res_t;
-
- void clear_state(void);
- void irq_w(bool state);
- void set_error(bool state);
- unsigned speed_to_tick_freq(void) const;
- bool pos_offset(tape_pos_t& pos , tape_pos_t offset) const;
- void move_tape_pos(tape_pos_t delta_pos);
- void update_tape_pos(void);
- static void ensure_a_lt_b(tape_pos_t& a , tape_pos_t& b);
- static bool any_hole(tape_pos_t tape_pos_a , tape_pos_t tape_pos_b);
- tape_pos_t next_hole(void) const;
- attotime time_to_distance(tape_pos_t distance) const;
- attotime time_to_target(tape_pos_t target) const;
- bool start_tape_cmd(UINT16 cmd_reg , UINT16 must_be_1 , UINT16 must_be_0);
- void start_tape(UINT16 cmd_reg);
- void stop_tape(void);
- tape_track_t& current_track(void);
- static tape_pos_t word_length(tape_word_t w);
- static tape_pos_t word_end_pos(const tape_track_t::iterator& it);
- static void adjust_it(tape_track_t& track , tape_track_t::iterator& it , tape_pos_t pos);
- void write_word(tape_pos_t start , tape_word_t word , tape_pos_t& length);
- void write_gap(tape_pos_t a , tape_pos_t b);
- bool just_gap(tape_pos_t a , tape_pos_t b);
- tape_pos_t farthest_end(const tape_track_t::iterator& it) const;
- bool next_data(tape_track_t::iterator& it , tape_pos_t pos , bool inclusive);
- adv_res_t adv_it(tape_track_t::iterator& it);
- attotime fetch_next_wr_word(void);
- attotime time_to_rd_next_word(tape_pos_t& word_rd_pos);
- bool next_n_gap(tape_pos_t& pos , tape_track_t::iterator it , unsigned n_gaps , tape_pos_t min_gap);
- bool next_n_gap(tape_pos_t& pos , unsigned n_gaps , tape_pos_t min_gap);
- void clear_tape(void);
- void dump_sequence(tape_track_t::const_iterator it_start , unsigned n_words);
- void save_tape(void);
- bool load_track(tape_track_t& track);
- bool load_tape(void);
- void set_tape_present(bool present);
- attotime time_to_next_hole(void) const;
- attotime time_to_tach_pulses(void) const;
- void start_cmd_exec(UINT16 new_cmd_reg);
-};
-
-// device type definition
-extern const device_type HP_TACO;
-
-#endif /* __HP_TACO_H__ */
diff --git a/src/devices/machine/i8271.cpp b/src/devices/machine/i8271.cpp
index dfd098a5f82..cd8c0faf5bf 100644
--- a/src/devices/machine/i8271.cpp
+++ b/src/devices/machine/i8271.cpp
@@ -88,7 +88,6 @@ void i8271_device::soft_reset()
flopi[i].live = false;
flopi[i].ready = get_ready(i);
}
- hdl_cb(false);
set_irq(false);
set_drq(false);
command_pos = 0;
@@ -888,7 +887,6 @@ void i8271_device::command_end(floppy_info &fi, bool data_completion)
{
logerror("%s: command done (%s) - %02x\n", tag(), data_completion ? "data" : "seek", rr);
fi.main_state = fi.sub_state = IDLE;
- idle_icnt = 0;
main_phase = PHASE_RESULT;
set_irq(true);
}
@@ -983,7 +981,6 @@ void i8271_device::seek_continue(floppy_info &fi)
void i8271_device::read_data_start(floppy_info &fi)
{
fi.main_state = READ_DATA;
- hdl_cb(true);
fi.sub_state = HEAD_LOAD_DONE;
logerror("%s: command read%s data%s cmd=%02x crn=(%d, %d, %d) len=%02x rate=%d\n",
@@ -1013,7 +1010,6 @@ void i8271_device::read_data_start(floppy_info &fi)
void i8271_device::scan_start(floppy_info &fi)
{
fi.main_state = SCAN_DATA;
- hdl_cb(true);
fi.sub_state = HEAD_LOAD_DONE;
logerror("%s: command scan%s data%s cmd=%02x crn=(%d, %d, %d) len=%02x rate=%d\n",
@@ -1045,7 +1041,6 @@ void i8271_device::scan_start(floppy_info &fi)
void i8271_device::verify_data_start(floppy_info &fi)
{
fi.main_state = VERIFY_DATA;
- hdl_cb(true);
fi.sub_state = HEAD_LOAD_DONE;
logerror("%s: command verify%s data%s cmd=%02x crn=(%d, %d, %d) len=%02x rate=%d\n",
@@ -1103,7 +1098,6 @@ void i8271_device::read_data_continue(floppy_info &fi)
return;
case SEEK_WAIT_STEP_TIME_DONE:
- hdl_cb(true);
do {
if(fi.pcn > command[1])
fi.pcn--;
@@ -1187,9 +1181,7 @@ void i8271_device::read_data_continue(floppy_info &fi)
void i8271_device::write_data_start(floppy_info &fi)
{
fi.main_state = WRITE_DATA;
- hdl_cb(true);
fi.sub_state = HEAD_LOAD_DONE;
-
logerror("%s: command write%s data%s cmd=%02x crn=(%d, %d, %d) len=%02x rate=%d\n",
tag(),
command[0] & 0x04 ? " deleted" : "",
@@ -1246,7 +1238,6 @@ void i8271_device::write_data_continue(floppy_info &fi)
return;
case SEEK_WAIT_STEP_TIME_DONE:
- hdl_cb(true);
do {
if(fi.pcn > command[1])
fi.pcn--;
@@ -1320,7 +1311,6 @@ int i8271_device::calc_sector_size(UINT8 size)
void i8271_device::format_track_start(floppy_info &fi)
{
fi.main_state = FORMAT_TRACK;
- hdl_cb(true);
fi.sub_state = HEAD_LOAD_DONE;
logerror("%s: command format track c=%02x n=%02x sc=%02x gap3=%02x gap5=%02x gap1=%02x\n",
@@ -1374,7 +1364,6 @@ void i8271_device::format_track_continue(floppy_info &fi)
return;
case SEEK_WAIT_STEP_TIME_DONE:
- hdl_cb(true);
do {
if(fi.pcn > command[1])
fi.pcn--;
@@ -1413,7 +1402,6 @@ void i8271_device::format_track_continue(floppy_info &fi)
void i8271_device::read_id_start(floppy_info &fi)
{
fi.main_state = READ_ID;
- hdl_cb(true);
fi.sub_state = HEAD_LOAD_DONE;
logerror("%s: command read id, rate=%d\n",
@@ -1469,7 +1457,6 @@ void i8271_device::read_id_continue(floppy_info &fi)
return;
case SEEK_WAIT_STEP_TIME_DONE:
- hdl_cb(true);
do {
if(fi.pcn > command[1])
fi.pcn--;
@@ -1566,13 +1553,6 @@ void i8271_device::index_callback(floppy_image_device *floppy, int state)
continue;
}
- if (fi.main_state == IDLE) {
- idle_icnt++;
- if (icnt != 0x0f && idle_icnt >= icnt) {
- hdl_cb(false);
- }
- }
-
switch(fi.sub_state) {
case IDLE:
case SEEK_MOVE:
diff --git a/src/devices/machine/i8271.h b/src/devices/machine/i8271.h
index 5c63393a43f..e4409bed389 100644
--- a/src/devices/machine/i8271.h
+++ b/src/devices/machine/i8271.h
@@ -215,7 +215,6 @@ private:
UINT8 srate, hset, icnt, hload;
int sector_size;
int cur_rate;
- int idle_icnt;
static std::string tts(attotime t);
std::string ttsn();
diff --git a/src/devices/machine/k033906.cpp b/src/devices/machine/k033906.cpp
index d9953d2864f..bd32fef29f1 100644
--- a/src/devices/machine/k033906.cpp
+++ b/src/devices/machine/k033906.cpp
@@ -33,7 +33,7 @@ k033906_device::k033906_device(const machine_config &mconfig, const char *tag, d
void k033906_device::device_start()
{
- m_voodoo = (voodoo_device*)machine().device(m_voodoo_tag);
+ m_voodoo = machine().device(m_voodoo_tag);
m_reg_set = 0;
@@ -95,7 +95,7 @@ void k033906_device::reg_w(int reg, UINT32 data)
case 0x10: // initEnable
{
- m_voodoo->voodoo_set_init_enable(data);
+ voodoo_set_init_enable(m_voodoo, data);
break;
}
diff --git a/src/devices/machine/k033906.h b/src/devices/machine/k033906.h
index 438cc5796ab..aa2c685df99 100644
--- a/src/devices/machine/k033906.h
+++ b/src/devices/machine/k033906.h
@@ -12,7 +12,7 @@
#define __K033906_H__
#include "emu.h"
-#include "video/voodoo.h"
+
/***************************************************************************
@@ -58,7 +58,7 @@ private:
int m_reg_set; // 1 = access reg / 0 = access ram
const char *m_voodoo_tag;
- voodoo_device *m_voodoo;
+ device_t *m_voodoo;
UINT32 m_reg[256];
UINT32 m_ram[32768];
diff --git a/src/devices/machine/pic8259.cpp b/src/devices/machine/pic8259.cpp
index 3064e212850..40fe6fd916c 100644
--- a/src/devices/machine/pic8259.cpp
+++ b/src/devices/machine/pic8259.cpp
@@ -133,10 +133,7 @@ UINT32 pic8259_device::acknowledge()
}
}
}
- logerror("Spurious IRQ\n");
- if(m_is_x86)
- return m_base + 7;
- return 0xcd0000 + (m_vector_addr_high << 8) + m_vector_addr_low + (7 << (3-m_vector_size));
+ return 0;
}
diff --git a/src/devices/machine/ram.cpp b/src/devices/machine/ram.cpp
index 7dd8f9250a4..92728b55303 100644
--- a/src/devices/machine/ram.cpp
+++ b/src/devices/machine/ram.cpp
@@ -1,5 +1,5 @@
-// license: BSD-3-Clause
-// copyright-holders: Dirk Best
+// license:GPL-2.0+
+// copyright-holders:Dirk Best
/*************************************************************************
RAM device
@@ -23,6 +23,8 @@
// device type definition
const device_type RAM = &device_creator<ram_device>;
+
+
//-------------------------------------------------
// ram_device - constructor
//-------------------------------------------------
@@ -36,6 +38,8 @@ ram_device::ram_device(const machine_config &mconfig, const char *tag, device_t
m_default_value = 0xCD;
}
+
+
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
@@ -64,6 +68,7 @@ void ram_device::device_start()
save_item(NAME(m_pointer));
}
+
//-------------------------------------------------
// device_validity_check - device-specific validity
// checks
@@ -166,6 +171,8 @@ void ram_device::device_validity_check(validity_checker &valid) const
}
}
+
+
//-------------------------------------------------
// parse_string - convert a ram string to an
// integer value
@@ -203,6 +210,8 @@ UINT32 ram_device::parse_string(const char *s)
return ram;
}
+
+
//-------------------------------------------------
// default_size
//-------------------------------------------------
diff --git a/src/devices/machine/ram.h b/src/devices/machine/ram.h
index 5140309f825..7d3f054895f 100644
--- a/src/devices/machine/ram.h
+++ b/src/devices/machine/ram.h
@@ -1,5 +1,5 @@
-// license: BSD-3-Clause
-// copyright-holders: Dirk Best
+// license:GPL-2.0+
+// copyright-holders:Dirk Best
/*************************************************************************
RAM device
diff --git a/src/devices/sound/votrax.h b/src/devices/sound/votrax.h
index 471a42873f9..540f2b5feb1 100644
--- a/src/devices/sound/votrax.h
+++ b/src/devices/sound/votrax.h
@@ -42,7 +42,7 @@ public:
// writers
DECLARE_WRITE8_MEMBER( write );
DECLARE_WRITE8_MEMBER( inflection_w );
- DECLARE_READ_LINE_MEMBER( request ) { m_stream->update(); return m_request_state; }
+ DECLARE_READ_LINE_MEMBER( request ) { return m_request_state; }
protected:
// device-level overrides
diff --git a/src/devices/video/ef9364.cpp b/src/devices/video/ef9364.cpp
deleted file mode 100644
index b850f05d531..00000000000
--- a/src/devices/video/ef9364.cpp
+++ /dev/null
@@ -1,359 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Jean-Francois DEL NERO
-
-/*********************************************************************
-
- ef9364.cpp
-
- Thomson EF9364 / Sescosem SFF96364 video controller emulator code
-
- This circuit is a simple black and white 8x8 character generator.
- It display 64 columns * 16 rows text page.
- It is able to do automatic text scrolling, page erase.
- The characters font is stored into an external 1KB EPROM.
-
- To see how to use this driver, have a look to the Goupil machine
- driver (goupil.cpp).
- If you have any question or remark, don't hesitate to contact me
- at the email present on this website : http://hxc2001.free.fr/
-
- 01/20/2016
- Jean-Francois DEL NERO
-*********************************************************************/
-
-#include "emu.h"
-#include "ef9364.h"
-
-// devices
-const device_type EF9364 = &device_creator<ef9364_device>;
-
-//-------------------------------------------------
-// default address map
-//-------------------------------------------------
-static ADDRESS_MAP_START( ef9364, AS_0, 8, ef9364_device )
- AM_RANGE(0x00000, ( ( EF9364_TXTPLANE_MAX_SIZE * EF9364_MAX_TXTPLANES ) - 1 ) ) AM_RAM
-ADDRESS_MAP_END
-
-//-------------------------------------------------
-// memory_space_config - return a description of
-// any address spaces owned by this device
-//-------------------------------------------------
-
-const address_space_config *ef9364_device::memory_space_config(address_spacenum spacenum) const
-{
- return (spacenum == AS_0) ? &m_space_config : NULL;
-}
-
-//**************************************************************************
-// INLINE HELPERS
-//**************************************************************************
-
-//**************************************************************************
-// live device
-//**************************************************************************
-
-//-------------------------------------------------
-// ef9364_device - constructor
-//-------------------------------------------------
-
-ef9364_device::ef9364_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- device_t(mconfig, EF9364, "EF9364", tag, owner, clock, "ef9364", __FILE__),
- device_memory_interface(mconfig, *this),
- device_video_interface(mconfig, *this),
- m_space_config("textram", ENDIANNESS_LITTLE, 8, 12, 0, nullptr, *ADDRESS_MAP_NAME(ef9364)),
- m_palette(*this)
-{
- clock_freq = clock;
-}
-
-//-------------------------------------------------
-// static_set_palette_tag: Set the tag of the
-// palette device
-//-------------------------------------------------
-
-void ef9364_device::static_set_palette_tag(device_t &device, const char *tag)
-{
- downcast<ef9364_device &>(device).m_palette.set_tag(tag);
-}
-
-//-------------------------------------------------
-// static_set_nb_of_pages: Set the number of hardware pages
-//-------------------------------------------------
-
-void ef9364_device::static_set_nb_of_pages(device_t &device, int nb_of_pages )
-{
- if( nb_of_pages > 0 && nb_of_pages <= 8 )
- {
- downcast<ef9364_device &>(device).nb_of_pages = nb_of_pages;
- }
-}
-
-//-------------------------------------------------
-// set_color_entry: Set the color value
-// into the palette
-//-------------------------------------------------
-
-void ef9364_device::set_color_entry( int index, UINT8 r, UINT8 g, UINT8 b )
-{
- if( index < 2 )
- {
- palette[index] = rgb_t(r, g, b);
- }
- else
- {
- logerror("Invalid EF9364 Palette entry : %02x\n", index);
- }
-}
-
-//-------------------------------------------------
-// device_start - device-specific startup
-//-------------------------------------------------
-
-void ef9364_device::device_start()
-{
- m_textram = &space(0);
- m_charset = region();
-
- bitplane_xres = EF9364_NB_OF_COLUMNS*8;
- bitplane_yres = EF9364_NB_OF_ROWS*(8+4);
-
- vsync_scanline_pos = 250;
-
- // Default palette : Black and white
- palette[0] = rgb_t(0, 0, 0);
- palette[1] = rgb_t(255, 255, 255);
-
- m_screen_out.allocate( bitplane_xres, m_screen->height() );
-
- cursor_cnt = 0;
- cursor_state = 0;
-
- save_item(NAME(m_border));
-
- save_item(NAME(m_screen_out));
-}
-
-//-------------------------------------------------
-// device_reset - device-specific reset
-//-------------------------------------------------
-
-void ef9364_device::device_reset()
-{
- int i;
-
- x_curs_pos = 0;
- y_curs_pos = 0;
-
- char_latch = 0x00;
-
- for(i=0;i<EF9364_NB_OF_COLUMNS * EF9364_NB_OF_ROWS * nb_of_pages;i++)
- {
- m_textram->write_byte ( i , 0x7F );
- }
-
- memset(m_border, 0, sizeof(m_border));
-
- m_screen_out.fill(0);
-
- set_video_mode();
-}
-
-//-------------------------------------------------
-// set_video_mode: Set output screen format
-//-------------------------------------------------
-
-void ef9364_device::set_video_mode(void)
-{
- UINT16 new_width = bitplane_xres;
-
- if (m_screen->width() != new_width)
- {
- rectangle visarea = m_screen->visible_area();
- visarea.max_x = new_width - 1;
-
- m_screen->configure(new_width, m_screen->height(), visarea, m_screen->frame_period().attoseconds());
- }
-
- //border color
- memset(m_border, 0, sizeof(m_border));
-}
-
-//-------------------------------------------------
-// draw_border: Draw the left and right borders
-// ( No border for the moment ;) )
-//-------------------------------------------------
-
-void ef9364_device::draw_border(UINT16 line)
-{
-}
-
-//-------------------------------------------------
-// screen_update: Framebuffer video ouput
-//-------------------------------------------------
-
-UINT32 ef9364_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
-{
- int x,y,r;
- unsigned char c;
-
- for( r = 0 ; r < EF9364_NB_OF_ROWS ; r++ )
- {
- for( y = 0 ; y < 8 ; y++ )
- {
- for( x = 0 ; x < EF9364_NB_OF_COLUMNS * 8 ; x++ )
- {
- if( ( ( x >> 3 ) != x_curs_pos ) || ( r != y_curs_pos ) || !cursor_state)
- {
- c = m_textram->read_byte( ( r * EF9364_NB_OF_COLUMNS ) + ( x>>3 ) );
-
- if( m_charset->u8(((c&0x7F)<<3) + y ) & (0x80>>(x&7)) )
- m_screen_out.pix32((r*12)+y, x) = palette[1];
- else
- m_screen_out.pix32((r*12)+y, x) = palette[0];
- }
- else
- {
- if(y != 7)
- m_screen_out.pix32((r*12)+y, x) = palette[0];
- else
- m_screen_out.pix32((r*12)+y, x) = palette[1];
- }
- }
- }
- }
-
- cursor_cnt = (cursor_cnt + 1) % 13;
- if(!cursor_cnt)
- cursor_state ^= 1;
-
- copybitmap(bitmap, m_screen_out, 0, 0, 0, 0, cliprect);
- return 0;
-}
-
-//-------------------------------------------------
-// update_scanline: Scanline callback
-//-------------------------------------------------
-
-void ef9364_device::update_scanline(UINT16 scanline)
-{
- if (scanline == vsync_scanline_pos)
- {
- // vsync
- }
-
- if (scanline == 0)
- {
- draw_border(0);
- }
-}
-
-//-------------------------------------------------
-// data_w: Registers write access callback
-//-------------------------------------------------
-
-void ef9364_device::command_w(UINT8 cmd)
-{
- int x,y,i,j;
-
- switch( cmd&7 )
- {
- case 0x0: // Page Erase & Cursor home
- for( y=0 ; y < EF9364_NB_OF_ROWS ; y++ )
- {
- for( x=0 ; x < EF9364_NB_OF_COLUMNS ; x++ )
- {
- m_textram->write_byte ( y * EF9364_NB_OF_COLUMNS + x , 0x7F );
- }
- }
- x_curs_pos = 0;
- y_curs_pos = 0;
- break;
-
- case 0x1: // Erase to end of the line and return cursor
- for( ; x_curs_pos < EF9364_NB_OF_COLUMNS ; x_curs_pos++ )
- {
- m_textram->write_byte ( y_curs_pos * EF9364_NB_OF_COLUMNS + x_curs_pos , 0x7F );
- }
- x_curs_pos = 0;
- break;
-
- case 0x2: // Line feed
- y_curs_pos++;
- if( y_curs_pos >= EF9364_NB_OF_ROWS )
- {
- // Scroll
- for( j = 1 ; j < EF9364_NB_OF_ROWS ; j++ )
- {
- for( i = 0 ; i < EF9364_NB_OF_COLUMNS ; i++ )
- {
- m_textram->write_byte ( (j-1) * EF9364_NB_OF_COLUMNS + i , m_textram->read_byte ( j * EF9364_NB_OF_COLUMNS + i ) );
- }
- }
- // Erase last line
- for( i = 0 ; i < EF9364_NB_OF_COLUMNS ; i++ )
- {
- m_textram->write_byte ( ( EF9364_NB_OF_ROWS - 1 ) * EF9364_NB_OF_COLUMNS + i , 0x7F );
- }
-
- y_curs_pos = EF9364_NB_OF_ROWS - 1;
- }
- break;
-
- case 0x3: // Nop
-
- break;
-
- case 0x4: // Cursor left
- if(x_curs_pos)
- x_curs_pos--;
- break;
-
- case 0x5: // Erasure of cursor Line.
- for( x = 0 ; x < EF9364_NB_OF_COLUMNS ; x++ )
- {
- m_textram->write_byte ( y_curs_pos * EF9364_NB_OF_COLUMNS + x , 0x7F );
- }
- break;
-
- case 0x6: // Cursor up
- if(y_curs_pos)
- y_curs_pos--;
- break;
-
- case 0x7: // Write char
- if(cmd&0x8)
- m_textram->write_byte ( y_curs_pos * EF9364_NB_OF_COLUMNS + x_curs_pos , char_latch );
-
- x_curs_pos++;
- if( x_curs_pos >= EF9364_NB_OF_COLUMNS )
- {
- x_curs_pos=0;
- y_curs_pos++;
- if( y_curs_pos >= EF9364_NB_OF_ROWS )
- {
- // Scroll
- for( j = 1 ; j < EF9364_NB_OF_ROWS ; j++ )
- {
- for( i = 0 ; i < EF9364_NB_OF_COLUMNS ; i++ )
- {
- m_textram->write_byte ( (j-1) * EF9364_NB_OF_COLUMNS + i , m_textram->read_byte ( j * EF9364_NB_OF_COLUMNS + i ) );
- }
- }
- // Erase last line
- for( i = 0 ; i < EF9364_NB_OF_COLUMNS ; i++ )
- {
- m_textram->write_byte ( ( EF9364_NB_OF_ROWS - 1 ) * EF9364_NB_OF_COLUMNS + i , 0x7F );
- }
-
- y_curs_pos = EF9364_NB_OF_ROWS - 1;
- }
- }
- break;
-
- }
-}
-
-void ef9364_device::char_latch_w(UINT8 data)
-{
- char_latch = data;
-}
diff --git a/src/devices/video/ef9364.h b/src/devices/video/ef9364.h
deleted file mode 100644
index 1519d817196..00000000000
--- a/src/devices/video/ef9364.h
+++ /dev/null
@@ -1,104 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Jean-Francois DEL NERO
-/*********************************************************************
-
- ef9364.h
-
- Thomson EF9364 video controller
-
-*********************************************************************/
-
-#pragma once
-
-#ifndef __EF9364_H__
-#define __EF9364_H__
-
-#define EF9364_NB_OF_COLUMNS 64
-#define EF9364_NB_OF_ROWS 16
-
-#define EF9364_TXTPLANE_MAX_SIZE ( EF9364_NB_OF_COLUMNS * EF9364_NB_OF_ROWS )
-#define EF9364_MAX_TXTPLANES 2
-
-#define MCFG_EF9364_PALETTE(_palette_tag) \
- ef9364_device::static_set_palette_tag(*device, "^" _palette_tag);
-
-#define MCFG_EF9364_PAGES_CNT(_pages_number) \
- ef9364_device::static_set_nb_of_pages(*device,_pages_number);
-
-#define MCFG_EF9364_IRQ_HANDLER(_devcb) \
- devcb = &ef9364_device::set_irq_handler(*device, DEVCB_##_devcb);
-
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
-
-// ======================> ef9364_device
-
-class ef9364_device : public device_t,
- public device_memory_interface,
- public device_video_interface
-{
-public:
- // construction/destruction
- ef9364_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
- // static configuration
- static void static_set_palette_tag(device_t &device, const char *tag);
- static void static_set_nb_of_pages(device_t &device, int nb_bitplanes );
-
- // device interface
-
- void update_scanline(UINT16 scanline);
- void set_color_entry( int index, UINT8 r, UINT8 g, UINT8 b );
-
- UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
- void char_latch_w(UINT8 data);
- void command_w(UINT8 cmd);
-
-protected:
- // device-level overrides
- virtual void device_start() override;
- virtual void device_reset() override;
-
- // device_config_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
-
- // address space configurations
- const address_space_config m_space_config;
-
- // inline helper
-
-private:
- void screen_scanning( int force_clear );
- void set_video_mode(void);
- void draw_border(UINT16 line);
-
- // internal state
-
- memory_region *m_charset;
- address_space *m_textram;
-
- UINT8 x_curs_pos;
- UINT8 y_curs_pos;
- UINT8 char_latch;
-
- UINT8 m_border[80]; //border color
-
- rgb_t palette[2];
- int nb_of_pages;
- int bitplane_xres;
- int bitplane_yres;
- int vsync_scanline_pos;
- int cursor_cnt;
- int cursor_state;
-
- UINT32 clock_freq;
- bitmap_rgb32 m_screen_out;
-
- required_device<palette_device> m_palette;
-};
-
-// device type definition
-extern const device_type EF9364;
-
-#endif
diff --git a/src/devices/video/ef9365.cpp b/src/devices/video/ef9365.cpp
index 5f81d7f45b5..f923cfd0813 100644
--- a/src/devices/video/ef9365.cpp
+++ b/src/devices/video/ef9365.cpp
@@ -938,7 +938,7 @@ void ef9365_device::screen_scanning( int force_clear )
void ef9365_device::ef9365_exec(UINT8 cmd)
{
int tmp_delta_x,tmp_delta_y;
- int busy_cycles = 0;
+ int busy_cycles;
m_state = 0;
if( ( cmd>>4 ) == 0 )
diff --git a/src/devices/video/i82730.cpp b/src/devices/video/i82730.cpp
index 8cd78863df3..d344c7006ef 100644
--- a/src/devices/video/i82730.cpp
+++ b/src/devices/video/i82730.cpp
@@ -128,7 +128,7 @@ UINT16 i82730_device::read_word(offs_t address)
{
UINT16 data;
- if (sysbus_16bit() && WORD_ALIGNED(address))
+ if (sysbus_16bit() && !(address & 1))
{
data = m_program->read_word(address);
}
@@ -148,7 +148,7 @@ void i82730_device::write_byte(offs_t address, UINT8 data)
void i82730_device::write_word(offs_t address, UINT16 data)
{
- if (sysbus_16bit() && WORD_ALIGNED(address))
+ if (sysbus_16bit() && !(address & 1))
{
m_program->write_word(address, data);
}
diff --git a/src/devices/video/jangou_blitter.cpp b/src/devices/video/jangou_blitter.cpp
deleted file mode 100644
index e2acdb37ca1..00000000000
--- a/src/devices/video/jangou_blitter.cpp
+++ /dev/null
@@ -1,194 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Angelo Salese
-/***************************************************************************
-
- Jangou Custom Blitter Chip, codename "???" (name scratched afaik)
-
- device emulation by Angelo Salese, from original jangou.cpp implementation
- by Angelo Salese, David Haywood and Phil Bennett.
-
- TODO:
- - BLTFLIP mechanism;
- - clean-ups;
-
-***************************************************************************/
-
-#include "emu.h"
-#include "jangou_blitter.h"
-
-
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-// device type definition
-const device_type JANGOU_BLITTER = &device_creator<jangou_blitter_device>;
-
-
-//**************************************************************************
-// LIVE DEVICE
-//**************************************************************************
-
-//-------------------------------------------------
-// jangou_blitter_device - constructor
-//-------------------------------------------------
-
-jangou_blitter_device::jangou_blitter_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : device_t(mconfig, JANGOU_BLITTER, "Jangou Blitter Custom Chip", tag, owner, clock, "jangou_blitter", __FILE__)
-{
-}
-
-
-//-------------------------------------------------
-// device_start - device-specific startup
-//-------------------------------------------------
-
-void jangou_blitter_device::device_start()
-{
- memory_region *devregion = machine().root_device().memregion("gfx");
- m_gfxrom = devregion->base();
- if (m_gfxrom == nullptr)
- fatalerror("JANGOU_BLITTER: \"gfx\" memory base not found");
- m_gfxrommask = devregion->bytes()-1;
-
- save_item(NAME(m_pen_data));
- save_item(NAME(m_blit_data));
- save_item(NAME(m_blit_buffer));
-}
-
-
-//-------------------------------------------------
-// device_reset - device-specific reset
-//-------------------------------------------------
-
-void jangou_blitter_device::device_reset()
-{
- memset(m_blit_data, 0, ARRAY_LENGTH(m_blit_data));
- memset(m_pen_data, 0, ARRAY_LENGTH(m_pen_data));
- m_bltflip = false;
-}
-
-
-//**************************************************************************
-// READ/WRITE HANDLERS
-//**************************************************************************
-
-// TODO: inline these
-UINT8 jangou_blitter_device::gfx_nibble( UINT32 niboffset )
-{
- if (niboffset & 1)
- return (m_gfxrom[(niboffset >> 1) & m_gfxrommask] & 0xf0) >> 4;
- else
- return (m_gfxrom[(niboffset >> 1) & m_gfxrommask] & 0x0f);
-}
-
-void jangou_blitter_device::plot_gfx_pixel( UINT8 pix, int x, int y )
-{
- if (y < 0 || y >= 256)
- return;
- if (x < 0 || x >= 256)
- return;
-
- if (x & 1)
- m_blit_buffer[(y * 256) + (x >> 1)] = (m_blit_buffer[(y * 256) + (x >> 1)] & 0x0f) | ((pix << 4) & 0xf0);
- else
- m_blit_buffer[(y * 256) + (x >> 1)] = (m_blit_buffer[(y * 256) + (x >> 1)] & 0xf0) | (pix & 0x0f);
-}
-
-WRITE8_MEMBER( jangou_blitter_device::process_w )
-{
- int src, x, y, h, w, flipx;
- m_blit_data[offset] = data;
-
- if (offset == 5)
- {
- int count = 0;
- int xcount, ycount;
-
- w = (m_blit_data[4] & 0xff) + 1;
- h = (m_blit_data[5] & 0xff) + 1;
- src = ((m_blit_data[1] << 8)|(m_blit_data[0] << 0));
- src |= (m_blit_data[6] & 3) << 16;
- x = (m_blit_data[2] & 0xff);
- y = (m_blit_data[3] & 0xff);
-
- #if 0
- if(m_bltflip == true)
- {
- printf("%02x %02x %02x %02x %02x %02x %02x\n", m_blit_data[0], m_blit_data[1], m_blit_data[2],m_blit_data[3], m_blit_data[4], m_blit_data[5],m_blit_data[6]);
- printf("=>");
- for(int i=0;i<0x10;i++)
- printf("%02x ",m_pen_data[i]);
- printf("\n");
- }
- #endif
- // lowest bit of src controls flipping / draw direction?
- flipx = (m_blit_data[0] & 1);
-
- if (!flipx)
- src += (w * h) - 1;
- else
- src -= (w * h) - 1;
-
-
- for (ycount = 0; ycount < h; ycount++)
- {
- for(xcount = 0; xcount < w; xcount++)
- {
- int drawx = (x + xcount) & 0xff;
- int drawy = (y + ycount) & 0xff;
- UINT8 dat = gfx_nibble(src + count);
- UINT8 cur_pen = m_pen_data[dat & 0x0f];
-
- //dat = cur_pen_lo | (cur_pen_hi << 4);
-
- if ((cur_pen & 0xff) != 0)
- plot_gfx_pixel(cur_pen, drawx, drawy);
-
- if (!flipx)
- count--;
- else
- count++;
- }
- }
-
- //UINT32 new_src = src + count;
-
- // update source and height after blitter operation
- // TODO: Jangou doesn't agree with this, later HW?
- #if 0
- m_blit_data[0] = new_src & 0xfe;
- m_blit_data[1] = new_src >> 8;
- m_blit_data[5] = 0;
- m_blit_data[6] = new_src >> 16;
- #endif
- m_bltflip = false;
- }
-}
-
-// Sexy Gal swaps around upper src address
-WRITE8_MEMBER( jangou_blitter_device::alt_process_w )
-{
- const UINT8 translate_addr[7] = { 0, 1, 6, 2, 3, 4, 5 };
-
- process_w(space,translate_addr[offset],data);
-}
-
-WRITE8_MEMBER( jangou_blitter_device::vregs_w )
-{
- // bit 5 set by Jangou, left-over?
- m_pen_data[offset] = data & 0x0f;
-}
-
-WRITE8_MEMBER( jangou_blitter_device::bltflip_w )
-{
- // TODO: unsure about how this works, Charles says it swaps the nibble but afaik it's used for CPU tiles in Night Gal Summer/Sexy Gal and they seems fine?
- // Maybe flipx is actually bltflip for later HW?
- m_bltflip = true;
-}
-
-READ_LINE_MEMBER( jangou_blitter_device::status_r )
-{
- return false;
-}
diff --git a/src/devices/video/jangou_blitter.h b/src/devices/video/jangou_blitter.h
deleted file mode 100644
index 7a39172e7ca..00000000000
--- a/src/devices/video/jangou_blitter.h
+++ /dev/null
@@ -1,71 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Angelo Salese
-/***************************************************************************
-
-Template for skeleton device
-
-***************************************************************************/
-
-#pragma once
-
-#ifndef __JANGOU_BLITTERDEV_H__
-#define __JANGOU_BLITTERDEV_H__
-
-
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_JANGOU_BLITTER_ADD(_tag,_freq) \
- MCFG_DEVICE_ADD(_tag, JANGOU_BLITTER, _freq)
-
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
-
-// ======================> jangou_blitter_device
-
-class jangou_blitter_device : public device_t
-{
-public:
- // construction/destruction
- jangou_blitter_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
- // I/O operations
- DECLARE_WRITE8_MEMBER( process_w );
- DECLARE_WRITE8_MEMBER( alt_process_w );
- DECLARE_WRITE8_MEMBER( vregs_w );
- DECLARE_WRITE8_MEMBER( bltflip_w );
- DECLARE_READ_LINE_MEMBER( status_r );
-
- UINT8 m_blit_buffer[256 * 256];
-
-protected:
- // device-level overrides
- virtual void device_start() override;
- virtual void device_reset() override;
-
-private:
- void plot_gfx_pixel( UINT8 pix, int x, int y );
- UINT8 gfx_nibble( UINT32 niboffset );
- UINT8 m_pen_data[0x10];
- UINT8 m_blit_data[7];
- UINT8 *m_gfxrom;
- UINT32 m_gfxrommask;
- bool m_bltflip;
-};
-
-
-// device type definition
-extern const device_type JANGOU_BLITTER;
-
-
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-
-
-#endif
diff --git a/src/devices/video/mc6845.cpp b/src/devices/video/mc6845.cpp
index 04e7c967869..57813f574ab 100644
--- a/src/devices/video/mc6845.cpp
+++ b/src/devices/video/mc6845.cpp
@@ -553,8 +553,7 @@ void mc6845_device::recompute_parameters(bool postload)
m_hsync_off_pos = hsync_off_pos;
m_vsync_on_pos = vsync_on_pos;
m_vsync_off_pos = vsync_off_pos;
- if (!postload) // set m_line_counter to 0 on normal operation, but not on postload
- m_line_counter = 0;
+ m_line_counter = 0;
}
}
diff --git a/src/devices/video/upd7220.cpp b/src/devices/video/upd7220.cpp
index 32d4d2c3c63..23548f1ecd7 100644
--- a/src/devices/video/upd7220.cpp
+++ b/src/devices/video/upd7220.cpp
@@ -71,8 +71,7 @@ enum
COMMAND_LPRD,
COMMAND_DMAR,
COMMAND_DMAW,
- COMMAND_5A,
- COMMAND_05
+ COMMAND_5A
};
enum
@@ -94,7 +93,6 @@ enum
#define UPD7220_COMMAND_CCHAR 0x4b
#define UPD7220_COMMAND_START 0x6b
#define UPD7220_COMMAND_BCTRL 0x0c // & 0xfe
-#define UPD7220_COMMAND_05 0x05
#define UPD7220_COMMAND_ZOOM 0x46
#define UPD7220_COMMAND_CURS 0x49
#define UPD7220_COMMAND_PRAM 0x70 // & 0xf0
@@ -1051,7 +1049,6 @@ int upd7220_device::translate_command(UINT8 data)
case UPD7220_COMMAND_CURD: command = COMMAND_CURD; break;
case UPD7220_COMMAND_LPRD: command = COMMAND_LPRD; break;
case UPD7220_COMMAND_5A: command = COMMAND_5A; break;
- case UPD7220_COMMAND_05: command = COMMAND_05; break;
default:
switch (data & 0xfe)
{
@@ -1229,10 +1226,6 @@ void upd7220_device::process_fifo()
//LOG(("uPD7220 '%s' DE: 1\n", tag()));
break;
- case COMMAND_05:
- m_de = 0;
- break;
-
case COMMAND_BCTRL: /* display blanking control */
m_de = m_cr & 0x01;
diff --git a/src/devices/video/vooddefs.h b/src/devices/video/vooddefs.h
index 5bef9d4cc8e..e394946d445 100644
--- a/src/devices/video/vooddefs.h
+++ b/src/devices/video/vooddefs.h
@@ -9,6 +9,1349 @@
***************************************************************************/
+/*************************************
+ *
+ * Misc. constants
+ *
+ *************************************/
+
+/* enumeration describing reasons we might be stalled */
+enum
+{
+ NOT_STALLED = 0,
+ STALLED_UNTIL_FIFO_LWM,
+ STALLED_UNTIL_FIFO_EMPTY
+};
+
+
+
+// Use old table lookup versus straight double divide
+#define USE_FAST_RECIP 0
+
+/* maximum number of TMUs */
+#define MAX_TMU 2
+
+/* accumulate operations less than this number of clocks */
+#define ACCUMULATE_THRESHOLD 0
+
+/* number of clocks to set up a triangle (just a guess) */
+#define TRIANGLE_SETUP_CLOCKS 100
+
+/* maximum number of rasterizers */
+#define MAX_RASTERIZERS 1024
+
+/* size of the rasterizer hash table */
+#define RASTER_HASH_SIZE 97
+
+/* flags for LFB writes */
+#define LFB_RGB_PRESENT 1
+#define LFB_ALPHA_PRESENT 2
+#define LFB_DEPTH_PRESENT 4
+#define LFB_DEPTH_PRESENT_MSW 8
+
+/* flags for the register access array */
+#define REGISTER_READ 0x01 /* reads are allowed */
+#define REGISTER_WRITE 0x02 /* writes are allowed */
+#define REGISTER_PIPELINED 0x04 /* writes are pipelined */
+#define REGISTER_FIFO 0x08 /* writes go to FIFO */
+#define REGISTER_WRITETHRU 0x10 /* writes are valid even for CMDFIFO */
+
+/* shorter combinations to make the table smaller */
+#define REG_R (REGISTER_READ)
+#define REG_W (REGISTER_WRITE)
+#define REG_WT (REGISTER_WRITE | REGISTER_WRITETHRU)
+#define REG_RW (REGISTER_READ | REGISTER_WRITE)
+#define REG_RWT (REGISTER_READ | REGISTER_WRITE | REGISTER_WRITETHRU)
+#define REG_RP (REGISTER_READ | REGISTER_PIPELINED)
+#define REG_WP (REGISTER_WRITE | REGISTER_PIPELINED)
+#define REG_RWP (REGISTER_READ | REGISTER_WRITE | REGISTER_PIPELINED)
+#define REG_RWPT (REGISTER_READ | REGISTER_WRITE | REGISTER_PIPELINED | REGISTER_WRITETHRU)
+#define REG_RF (REGISTER_READ | REGISTER_FIFO)
+#define REG_WF (REGISTER_WRITE | REGISTER_FIFO)
+#define REG_RWF (REGISTER_READ | REGISTER_WRITE | REGISTER_FIFO)
+#define REG_RPF (REGISTER_READ | REGISTER_PIPELINED | REGISTER_FIFO)
+#define REG_WPF (REGISTER_WRITE | REGISTER_PIPELINED | REGISTER_FIFO)
+#define REG_RWPF (REGISTER_READ | REGISTER_WRITE | REGISTER_PIPELINED | REGISTER_FIFO)
+
+/* lookup bits is the log2 of the size of the reciprocal/log table */
+#define RECIPLOG_LOOKUP_BITS 9
+
+/* input precision is how many fraction bits the input value has; this is a 64-bit number */
+#define RECIPLOG_INPUT_PREC 32
+
+/* lookup precision is how many fraction bits each table entry contains */
+#define RECIPLOG_LOOKUP_PREC 22
+
+/* output precision is how many fraction bits the result should have */
+#define RECIP_OUTPUT_PREC 15
+#define LOG_OUTPUT_PREC 8
+
+
+
+/*************************************
+ *
+ * Register constants
+ *
+ *************************************/
+
+/* Codes to the right:
+ R = readable
+ W = writeable
+ P = pipelined
+ F = goes to FIFO
+*/
+
+/* 0x000 */
+#define status (0x000/4) /* R P */
+#define intrCtrl (0x004/4) /* RW P -- Voodoo2/Banshee only */
+#define vertexAx (0x008/4) /* W PF */
+#define vertexAy (0x00c/4) /* W PF */
+#define vertexBx (0x010/4) /* W PF */
+#define vertexBy (0x014/4) /* W PF */
+#define vertexCx (0x018/4) /* W PF */
+#define vertexCy (0x01c/4) /* W PF */
+#define startR (0x020/4) /* W PF */
+#define startG (0x024/4) /* W PF */
+#define startB (0x028/4) /* W PF */
+#define startZ (0x02c/4) /* W PF */
+#define startA (0x030/4) /* W PF */
+#define startS (0x034/4) /* W PF */
+#define startT (0x038/4) /* W PF */
+#define startW (0x03c/4) /* W PF */
+
+/* 0x040 */
+#define dRdX (0x040/4) /* W PF */
+#define dGdX (0x044/4) /* W PF */
+#define dBdX (0x048/4) /* W PF */
+#define dZdX (0x04c/4) /* W PF */
+#define dAdX (0x050/4) /* W PF */
+#define dSdX (0x054/4) /* W PF */
+#define dTdX (0x058/4) /* W PF */
+#define dWdX (0x05c/4) /* W PF */
+#define dRdY (0x060/4) /* W PF */
+#define dGdY (0x064/4) /* W PF */
+#define dBdY (0x068/4) /* W PF */
+#define dZdY (0x06c/4) /* W PF */
+#define dAdY (0x070/4) /* W PF */
+#define dSdY (0x074/4) /* W PF */
+#define dTdY (0x078/4) /* W PF */
+#define dWdY (0x07c/4) /* W PF */
+
+/* 0x080 */
+#define triangleCMD (0x080/4) /* W PF */
+#define fvertexAx (0x088/4) /* W PF */
+#define fvertexAy (0x08c/4) /* W PF */
+#define fvertexBx (0x090/4) /* W PF */
+#define fvertexBy (0x094/4) /* W PF */
+#define fvertexCx (0x098/4) /* W PF */
+#define fvertexCy (0x09c/4) /* W PF */
+#define fstartR (0x0a0/4) /* W PF */
+#define fstartG (0x0a4/4) /* W PF */
+#define fstartB (0x0a8/4) /* W PF */
+#define fstartZ (0x0ac/4) /* W PF */
+#define fstartA (0x0b0/4) /* W PF */
+#define fstartS (0x0b4/4) /* W PF */
+#define fstartT (0x0b8/4) /* W PF */
+#define fstartW (0x0bc/4) /* W PF */
+
+/* 0x0c0 */
+#define fdRdX (0x0c0/4) /* W PF */
+#define fdGdX (0x0c4/4) /* W PF */
+#define fdBdX (0x0c8/4) /* W PF */
+#define fdZdX (0x0cc/4) /* W PF */
+#define fdAdX (0x0d0/4) /* W PF */
+#define fdSdX (0x0d4/4) /* W PF */
+#define fdTdX (0x0d8/4) /* W PF */
+#define fdWdX (0x0dc/4) /* W PF */
+#define fdRdY (0x0e0/4) /* W PF */
+#define fdGdY (0x0e4/4) /* W PF */
+#define fdBdY (0x0e8/4) /* W PF */
+#define fdZdY (0x0ec/4) /* W PF */
+#define fdAdY (0x0f0/4) /* W PF */
+#define fdSdY (0x0f4/4) /* W PF */
+#define fdTdY (0x0f8/4) /* W PF */
+#define fdWdY (0x0fc/4) /* W PF */
+
+/* 0x100 */
+#define ftriangleCMD (0x100/4) /* W PF */
+#define fbzColorPath (0x104/4) /* RW PF */
+#define fogMode (0x108/4) /* RW PF */
+#define alphaMode (0x10c/4) /* RW PF */
+#define fbzMode (0x110/4) /* RW F */
+#define lfbMode (0x114/4) /* RW F */
+#define clipLeftRight (0x118/4) /* RW F */
+#define clipLowYHighY (0x11c/4) /* RW F */
+#define nopCMD (0x120/4) /* W F */
+#define fastfillCMD (0x124/4) /* W F */
+#define swapbufferCMD (0x128/4) /* W F */
+#define fogColor (0x12c/4) /* W F */
+#define zaColor (0x130/4) /* W F */
+#define chromaKey (0x134/4) /* W F */
+#define chromaRange (0x138/4) /* W F -- Voodoo2/Banshee only */
+#define userIntrCMD (0x13c/4) /* W F -- Voodoo2/Banshee only */
+
+/* 0x140 */
+#define stipple (0x140/4) /* RW F */
+#define color0 (0x144/4) /* RW F */
+#define color1 (0x148/4) /* RW F */
+#define fbiPixelsIn (0x14c/4) /* R */
+#define fbiChromaFail (0x150/4) /* R */
+#define fbiZfuncFail (0x154/4) /* R */
+#define fbiAfuncFail (0x158/4) /* R */
+#define fbiPixelsOut (0x15c/4) /* R */
+#define fogTable (0x160/4) /* W F */
+
+/* 0x1c0 */
+#define cmdFifoBaseAddr (0x1e0/4) /* RW -- Voodoo2 only */
+#define cmdFifoBump (0x1e4/4) /* RW -- Voodoo2 only */
+#define cmdFifoRdPtr (0x1e8/4) /* RW -- Voodoo2 only */
+#define cmdFifoAMin (0x1ec/4) /* RW -- Voodoo2 only */
+#define colBufferAddr (0x1ec/4) /* RW -- Banshee only */
+#define cmdFifoAMax (0x1f0/4) /* RW -- Voodoo2 only */
+#define colBufferStride (0x1f0/4) /* RW -- Banshee only */
+#define cmdFifoDepth (0x1f4/4) /* RW -- Voodoo2 only */
+#define auxBufferAddr (0x1f4/4) /* RW -- Banshee only */
+#define cmdFifoHoles (0x1f8/4) /* RW -- Voodoo2 only */
+#define auxBufferStride (0x1f8/4) /* RW -- Banshee only */
+
+/* 0x200 */
+#define fbiInit4 (0x200/4) /* RW -- Voodoo/Voodoo2 only */
+#define clipLeftRight1 (0x200/4) /* RW -- Banshee only */
+#define vRetrace (0x204/4) /* R -- Voodoo/Voodoo2 only */
+#define clipTopBottom1 (0x204/4) /* RW -- Banshee only */
+#define backPorch (0x208/4) /* RW -- Voodoo/Voodoo2 only */
+#define videoDimensions (0x20c/4) /* RW -- Voodoo/Voodoo2 only */
+#define fbiInit0 (0x210/4) /* RW -- Voodoo/Voodoo2 only */
+#define fbiInit1 (0x214/4) /* RW -- Voodoo/Voodoo2 only */
+#define fbiInit2 (0x218/4) /* RW -- Voodoo/Voodoo2 only */
+#define fbiInit3 (0x21c/4) /* RW -- Voodoo/Voodoo2 only */
+#define hSync (0x220/4) /* W -- Voodoo/Voodoo2 only */
+#define vSync (0x224/4) /* W -- Voodoo/Voodoo2 only */
+#define clutData (0x228/4) /* W F -- Voodoo/Voodoo2 only */
+#define dacData (0x22c/4) /* W -- Voodoo/Voodoo2 only */
+#define maxRgbDelta (0x230/4) /* W -- Voodoo/Voodoo2 only */
+#define hBorder (0x234/4) /* W -- Voodoo2 only */
+#define vBorder (0x238/4) /* W -- Voodoo2 only */
+#define borderColor (0x23c/4) /* W -- Voodoo2 only */
+
+/* 0x240 */
+#define hvRetrace (0x240/4) /* R -- Voodoo2 only */
+#define fbiInit5 (0x244/4) /* RW -- Voodoo2 only */
+#define fbiInit6 (0x248/4) /* RW -- Voodoo2 only */
+#define fbiInit7 (0x24c/4) /* RW -- Voodoo2 only */
+#define swapPending (0x24c/4) /* W -- Banshee only */
+#define leftOverlayBuf (0x250/4) /* W -- Banshee only */
+#define rightOverlayBuf (0x254/4) /* W -- Banshee only */
+#define fbiSwapHistory (0x258/4) /* R -- Voodoo2/Banshee only */
+#define fbiTrianglesOut (0x25c/4) /* R -- Voodoo2/Banshee only */
+#define sSetupMode (0x260/4) /* W PF -- Voodoo2/Banshee only */
+#define sVx (0x264/4) /* W PF -- Voodoo2/Banshee only */
+#define sVy (0x268/4) /* W PF -- Voodoo2/Banshee only */
+#define sARGB (0x26c/4) /* W PF -- Voodoo2/Banshee only */
+#define sRed (0x270/4) /* W PF -- Voodoo2/Banshee only */
+#define sGreen (0x274/4) /* W PF -- Voodoo2/Banshee only */
+#define sBlue (0x278/4) /* W PF -- Voodoo2/Banshee only */
+#define sAlpha (0x27c/4) /* W PF -- Voodoo2/Banshee only */
+
+/* 0x280 */
+#define sVz (0x280/4) /* W PF -- Voodoo2/Banshee only */
+#define sWb (0x284/4) /* W PF -- Voodoo2/Banshee only */
+#define sWtmu0 (0x288/4) /* W PF -- Voodoo2/Banshee only */
+#define sS_W0 (0x28c/4) /* W PF -- Voodoo2/Banshee only */
+#define sT_W0 (0x290/4) /* W PF -- Voodoo2/Banshee only */
+#define sWtmu1 (0x294/4) /* W PF -- Voodoo2/Banshee only */
+#define sS_Wtmu1 (0x298/4) /* W PF -- Voodoo2/Banshee only */
+#define sT_Wtmu1 (0x29c/4) /* W PF -- Voodoo2/Banshee only */
+#define sDrawTriCMD (0x2a0/4) /* W PF -- Voodoo2/Banshee only */
+#define sBeginTriCMD (0x2a4/4) /* W PF -- Voodoo2/Banshee only */
+
+/* 0x2c0 */
+#define bltSrcBaseAddr (0x2c0/4) /* RW PF -- Voodoo2 only */
+#define bltDstBaseAddr (0x2c4/4) /* RW PF -- Voodoo2 only */
+#define bltXYStrides (0x2c8/4) /* RW PF -- Voodoo2 only */
+#define bltSrcChromaRange (0x2cc/4) /* RW PF -- Voodoo2 only */
+#define bltDstChromaRange (0x2d0/4) /* RW PF -- Voodoo2 only */
+#define bltClipX (0x2d4/4) /* RW PF -- Voodoo2 only */
+#define bltClipY (0x2d8/4) /* RW PF -- Voodoo2 only */
+#define bltSrcXY (0x2e0/4) /* RW PF -- Voodoo2 only */
+#define bltDstXY (0x2e4/4) /* RW PF -- Voodoo2 only */
+#define bltSize (0x2e8/4) /* RW PF -- Voodoo2 only */
+#define bltRop (0x2ec/4) /* RW PF -- Voodoo2 only */
+#define bltColor (0x2f0/4) /* RW PF -- Voodoo2 only */
+#define bltCommand (0x2f8/4) /* RW PF -- Voodoo2 only */
+#define bltData (0x2fc/4) /* W PF -- Voodoo2 only */
+
+/* 0x300 */
+#define textureMode (0x300/4) /* W PF */
+#define tLOD (0x304/4) /* W PF */
+#define tDetail (0x308/4) /* W PF */
+#define texBaseAddr (0x30c/4) /* W PF */
+#define texBaseAddr_1 (0x310/4) /* W PF */
+#define texBaseAddr_2 (0x314/4) /* W PF */
+#define texBaseAddr_3_8 (0x318/4) /* W PF */
+#define trexInit0 (0x31c/4) /* W F -- Voodoo/Voodoo2 only */
+#define trexInit1 (0x320/4) /* W F */
+#define nccTable (0x324/4) /* W F */
+
+
+
+// 2D registers
+#define banshee2D_clip0Min (0x008/4)
+#define banshee2D_clip0Max (0x00c/4)
+#define banshee2D_dstBaseAddr (0x010/4)
+#define banshee2D_dstFormat (0x014/4)
+#define banshee2D_srcColorkeyMin (0x018/4)
+#define banshee2D_srcColorkeyMax (0x01c/4)
+#define banshee2D_dstColorkeyMin (0x020/4)
+#define banshee2D_dstColorkeyMax (0x024/4)
+#define banshee2D_bresError0 (0x028/4)
+#define banshee2D_bresError1 (0x02c/4)
+#define banshee2D_rop (0x030/4)
+#define banshee2D_srcBaseAddr (0x034/4)
+#define banshee2D_commandExtra (0x038/4)
+#define banshee2D_lineStipple (0x03c/4)
+#define banshee2D_lineStyle (0x040/4)
+#define banshee2D_pattern0Alias (0x044/4)
+#define banshee2D_pattern1Alias (0x048/4)
+#define banshee2D_clip1Min (0x04c/4)
+#define banshee2D_clip1Max (0x050/4)
+#define banshee2D_srcFormat (0x054/4)
+#define banshee2D_srcSize (0x058/4)
+#define banshee2D_srcXY (0x05c/4)
+#define banshee2D_colorBack (0x060/4)
+#define banshee2D_colorFore (0x064/4)
+#define banshee2D_dstSize (0x068/4)
+#define banshee2D_dstXY (0x06c/4)
+#define banshee2D_command (0x070/4)
+
+
+/*************************************
+ *
+ * Alias map of the first 64
+ * registers when remapped
+ *
+ *************************************/
+
+static const UINT8 register_alias_map[0x40] =
+{
+ status, 0x004/4, vertexAx, vertexAy,
+ vertexBx, vertexBy, vertexCx, vertexCy,
+ startR, dRdX, dRdY, startG,
+ dGdX, dGdY, startB, dBdX,
+ dBdY, startZ, dZdX, dZdY,
+ startA, dAdX, dAdY, startS,
+ dSdX, dSdY, startT, dTdX,
+ dTdY, startW, dWdX, dWdY,
+
+ triangleCMD,0x084/4, fvertexAx, fvertexAy,
+ fvertexBx, fvertexBy, fvertexCx, fvertexCy,
+ fstartR, fdRdX, fdRdY, fstartG,
+ fdGdX, fdGdY, fstartB, fdBdX,
+ fdBdY, fstartZ, fdZdX, fdZdY,
+ fstartA, fdAdX, fdAdY, fstartS,
+ fdSdX, fdSdY, fstartT, fdTdX,
+ fdTdY, fstartW, fdWdX, fdWdY
+};
+
+
+
+/*************************************
+ *
+ * Table of per-register access rights
+ *
+ *************************************/
+
+static const UINT8 voodoo_register_access[0x100] =
+{
+ /* 0x000 */
+ REG_RP, 0, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+
+ /* 0x040 */
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+
+ /* 0x080 */
+ REG_WPF, 0, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+
+ /* 0x0c0 */
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+
+ /* 0x100 */
+ REG_WPF, REG_RWPF, REG_RWPF, REG_RWPF,
+ REG_RWF, REG_RWF, REG_RWF, REG_RWF,
+ REG_WF, REG_WF, REG_WF, REG_WF,
+ REG_WF, REG_WF, 0, 0,
+
+ /* 0x140 */
+ REG_RWF, REG_RWF, REG_RWF, REG_R,
+ REG_R, REG_R, REG_R, REG_R,
+ REG_WF, REG_WF, REG_WF, REG_WF,
+ REG_WF, REG_WF, REG_WF, REG_WF,
+
+ /* 0x180 */
+ REG_WF, REG_WF, REG_WF, REG_WF,
+ REG_WF, REG_WF, REG_WF, REG_WF,
+ REG_WF, REG_WF, REG_WF, REG_WF,
+ REG_WF, REG_WF, REG_WF, REG_WF,
+
+ /* 0x1c0 */
+ REG_WF, REG_WF, REG_WF, REG_WF,
+ REG_WF, REG_WF, REG_WF, REG_WF,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+
+ /* 0x200 */
+ REG_RW, REG_R, REG_RW, REG_RW,
+ REG_RW, REG_RW, REG_RW, REG_RW,
+ REG_W, REG_W, REG_W, REG_W,
+ REG_W, 0, 0, 0,
+
+ /* 0x240 */
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+
+ /* 0x280 */
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+
+ /* 0x2c0 */
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+
+ /* 0x300 */
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WF,
+ REG_WF, REG_WF, REG_WF, REG_WF,
+ REG_WF, REG_WF, REG_WF, REG_WF,
+
+ /* 0x340 */
+ REG_WF, REG_WF, REG_WF, REG_WF,
+ REG_WF, REG_WF, REG_WF, REG_WF,
+ REG_WF, REG_WF, REG_WF, REG_WF,
+ REG_WF, REG_WF, REG_WF, REG_WF,
+
+ /* 0x380 */
+ REG_WF
+};
+
+
+static const UINT8 voodoo2_register_access[0x100] =
+{
+ /* 0x000 */
+ REG_RP, REG_RWPT, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+
+ /* 0x040 */
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+
+ /* 0x080 */
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+
+ /* 0x0c0 */
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+
+ /* 0x100 */
+ REG_WPF, REG_RWPF, REG_RWPF, REG_RWPF,
+ REG_RWF, REG_RWF, REG_RWF, REG_RWF,
+ REG_WF, REG_WF, REG_WF, REG_WF,
+ REG_WF, REG_WF, REG_WF, REG_WF,
+
+ /* 0x140 */
+ REG_RWF, REG_RWF, REG_RWF, REG_R,
+ REG_R, REG_R, REG_R, REG_R,
+ REG_WF, REG_WF, REG_WF, REG_WF,
+ REG_WF, REG_WF, REG_WF, REG_WF,
+
+ /* 0x180 */
+ REG_WF, REG_WF, REG_WF, REG_WF,
+ REG_WF, REG_WF, REG_WF, REG_WF,
+ REG_WF, REG_WF, REG_WF, REG_WF,
+ REG_WF, REG_WF, REG_WF, REG_WF,
+
+ /* 0x1c0 */
+ REG_WF, REG_WF, REG_WF, REG_WF,
+ REG_WF, REG_WF, REG_WF, REG_WF,
+ REG_RWT, REG_RWT, REG_RWT, REG_RWT,
+ REG_RWT, REG_RWT, REG_RWT, REG_RW,
+
+ /* 0x200 */
+ REG_RWT, REG_R, REG_RWT, REG_RWT,
+ REG_RWT, REG_RWT, REG_RWT, REG_RWT,
+ REG_WT, REG_WT, REG_WF, REG_WT,
+ REG_WT, REG_WT, REG_WT, REG_WT,
+
+ /* 0x240 */
+ REG_R, REG_RWT, REG_RWT, REG_RWT,
+ 0, 0, REG_R, REG_R,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+
+ /* 0x280 */
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, 0, 0,
+ 0, 0, 0, 0,
+
+ /* 0x2c0 */
+ REG_RWPF, REG_RWPF, REG_RWPF, REG_RWPF,
+ REG_RWPF, REG_RWPF, REG_RWPF, REG_RWPF,
+ REG_RWPF, REG_RWPF, REG_RWPF, REG_RWPF,
+ REG_RWPF, REG_RWPF, REG_RWPF, REG_WPF,
+
+ /* 0x300 */
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WF,
+ REG_WF, REG_WF, REG_WF, REG_WF,
+ REG_WF, REG_WF, REG_WF, REG_WF,
+
+ /* 0x340 */
+ REG_WF, REG_WF, REG_WF, REG_WF,
+ REG_WF, REG_WF, REG_WF, REG_WF,
+ REG_WF, REG_WF, REG_WF, REG_WF,
+ REG_WF, REG_WF, REG_WF, REG_WF,
+
+ /* 0x380 */
+ REG_WF
+};
+
+
+static const UINT8 banshee_register_access[0x100] =
+{
+ /* 0x000 */
+ REG_RP, REG_RWPT, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+
+ /* 0x040 */
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+
+ /* 0x080 */
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+
+ /* 0x0c0 */
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+
+ /* 0x100 */
+ REG_WPF, REG_RWPF, REG_RWPF, REG_RWPF,
+ REG_RWF, REG_RWF, REG_RWF, REG_RWF,
+ REG_WF, REG_WF, REG_WF, REG_WF,
+ REG_WF, REG_WF, REG_WF, REG_WF,
+
+ /* 0x140 */
+ REG_RWF, REG_RWF, REG_RWF, REG_R,
+ REG_R, REG_R, REG_R, REG_R,
+ REG_WF, REG_WF, REG_WF, REG_WF,
+ REG_WF, REG_WF, REG_WF, REG_WF,
+
+ /* 0x180 */
+ REG_WF, REG_WF, REG_WF, REG_WF,
+ REG_WF, REG_WF, REG_WF, REG_WF,
+ REG_WF, REG_WF, REG_WF, REG_WF,
+ REG_WF, REG_WF, REG_WF, REG_WF,
+
+ /* 0x1c0 */
+ REG_WF, REG_WF, REG_WF, REG_WF,
+ REG_WF, REG_WF, REG_WF, REG_WF,
+ 0, 0, 0, REG_RWF,
+ REG_RWF, REG_RWF, REG_RWF, 0,
+
+ /* 0x200 */
+ REG_RWF, REG_RWF, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+
+ /* 0x240 */
+ 0, 0, 0, REG_WT,
+ REG_RWF, REG_RWF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_R, REG_R,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+
+ /* 0x280 */
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, 0, 0,
+ 0, 0, 0, 0,
+
+ /* 0x2c0 */
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+
+ /* 0x300 */
+ REG_WPF, REG_WPF, REG_WPF, REG_WPF,
+ REG_WPF, REG_WPF, REG_WPF, 0,
+ REG_WF, REG_WF, REG_WF, REG_WF,
+ REG_WF, REG_WF, REG_WF, REG_WF,
+
+ /* 0x340 */
+ REG_WF, REG_WF, REG_WF, REG_WF,
+ REG_WF, REG_WF, REG_WF, REG_WF,
+ REG_WF, REG_WF, REG_WF, REG_WF,
+ REG_WF, REG_WF, REG_WF, REG_WF,
+
+ /* 0x380 */
+ REG_WF
+};
+
+
+
+/*************************************
+ *
+ * Register string table for debug
+ *
+ *************************************/
+
+static const char *const voodoo_reg_name[] =
+{
+ /* 0x000 */
+ "status", "{intrCtrl}", "vertexAx", "vertexAy",
+ "vertexBx", "vertexBy", "vertexCx", "vertexCy",
+ "startR", "startG", "startB", "startZ",
+ "startA", "startS", "startT", "startW",
+ /* 0x040 */
+ "dRdX", "dGdX", "dBdX", "dZdX",
+ "dAdX", "dSdX", "dTdX", "dWdX",
+ "dRdY", "dGdY", "dBdY", "dZdY",
+ "dAdY", "dSdY", "dTdY", "dWdY",
+ /* 0x080 */
+ "triangleCMD", "reserved084", "fvertexAx", "fvertexAy",
+ "fvertexBx", "fvertexBy", "fvertexCx", "fvertexCy",
+ "fstartR", "fstartG", "fstartB", "fstartZ",
+ "fstartA", "fstartS", "fstartT", "fstartW",
+ /* 0x0c0 */
+ "fdRdX", "fdGdX", "fdBdX", "fdZdX",
+ "fdAdX", "fdSdX", "fdTdX", "fdWdX",
+ "fdRdY", "fdGdY", "fdBdY", "fdZdY",
+ "fdAdY", "fdSdY", "fdTdY", "fdWdY",
+ /* 0x100 */
+ "ftriangleCMD", "fbzColorPath", "fogMode", "alphaMode",
+ "fbzMode", "lfbMode", "clipLeftRight","clipLowYHighY",
+ "nopCMD", "fastfillCMD", "swapbufferCMD","fogColor",
+ "zaColor", "chromaKey", "{chromaRange}","{userIntrCMD}",
+ /* 0x140 */
+ "stipple", "color0", "color1", "fbiPixelsIn",
+ "fbiChromaFail","fbiZfuncFail", "fbiAfuncFail", "fbiPixelsOut",
+ "fogTable160", "fogTable164", "fogTable168", "fogTable16c",
+ "fogTable170", "fogTable174", "fogTable178", "fogTable17c",
+ /* 0x180 */
+ "fogTable180", "fogTable184", "fogTable188", "fogTable18c",
+ "fogTable190", "fogTable194", "fogTable198", "fogTable19c",
+ "fogTable1a0", "fogTable1a4", "fogTable1a8", "fogTable1ac",
+ "fogTable1b0", "fogTable1b4", "fogTable1b8", "fogTable1bc",
+ /* 0x1c0 */
+ "fogTable1c0", "fogTable1c4", "fogTable1c8", "fogTable1cc",
+ "fogTable1d0", "fogTable1d4", "fogTable1d8", "fogTable1dc",
+ "{cmdFifoBaseAddr}","{cmdFifoBump}","{cmdFifoRdPtr}","{cmdFifoAMin}",
+ "{cmdFifoAMax}","{cmdFifoDepth}","{cmdFifoHoles}","reserved1fc",
+ /* 0x200 */
+ "fbiInit4", "vRetrace", "backPorch", "videoDimensions",
+ "fbiInit0", "fbiInit1", "fbiInit2", "fbiInit3",
+ "hSync", "vSync", "clutData", "dacData",
+ "maxRgbDelta", "{hBorder}", "{vBorder}", "{borderColor}",
+ /* 0x240 */
+ "{hvRetrace}", "{fbiInit5}", "{fbiInit6}", "{fbiInit7}",
+ "reserved250", "reserved254", "{fbiSwapHistory}","{fbiTrianglesOut}",
+ "{sSetupMode}", "{sVx}", "{sVy}", "{sARGB}",
+ "{sRed}", "{sGreen}", "{sBlue}", "{sAlpha}",
+ /* 0x280 */
+ "{sVz}", "{sWb}", "{sWtmu0}", "{sS/Wtmu0}",
+ "{sT/Wtmu0}", "{sWtmu1}", "{sS/Wtmu1}", "{sT/Wtmu1}",
+ "{sDrawTriCMD}","{sBeginTriCMD}","reserved2a8", "reserved2ac",
+ "reserved2b0", "reserved2b4", "reserved2b8", "reserved2bc",
+ /* 0x2c0 */
+ "{bltSrcBaseAddr}","{bltDstBaseAddr}","{bltXYStrides}","{bltSrcChromaRange}",
+ "{bltDstChromaRange}","{bltClipX}","{bltClipY}","reserved2dc",
+ "{bltSrcXY}", "{bltDstXY}", "{bltSize}", "{bltRop}",
+ "{bltColor}", "reserved2f4", "{bltCommand}", "{bltData}",
+ /* 0x300 */
+ "textureMode", "tLOD", "tDetail", "texBaseAddr",
+ "texBaseAddr_1","texBaseAddr_2","texBaseAddr_3_8","trexInit0",
+ "trexInit1", "nccTable0.0", "nccTable0.1", "nccTable0.2",
+ "nccTable0.3", "nccTable0.4", "nccTable0.5", "nccTable0.6",
+ /* 0x340 */
+ "nccTable0.7", "nccTable0.8", "nccTable0.9", "nccTable0.A",
+ "nccTable0.B", "nccTable1.0", "nccTable1.1", "nccTable1.2",
+ "nccTable1.3", "nccTable1.4", "nccTable1.5", "nccTable1.6",
+ "nccTable1.7", "nccTable1.8", "nccTable1.9", "nccTable1.A",
+ /* 0x380 */
+ "nccTable1.B"
+};
+
+
+static const char *const banshee_reg_name[] =
+{
+ /* 0x000 */
+ "status", "intrCtrl", "vertexAx", "vertexAy",
+ "vertexBx", "vertexBy", "vertexCx", "vertexCy",
+ "startR", "startG", "startB", "startZ",
+ "startA", "startS", "startT", "startW",
+ /* 0x040 */
+ "dRdX", "dGdX", "dBdX", "dZdX",
+ "dAdX", "dSdX", "dTdX", "dWdX",
+ "dRdY", "dGdY", "dBdY", "dZdY",
+ "dAdY", "dSdY", "dTdY", "dWdY",
+ /* 0x080 */
+ "triangleCMD", "reserved084", "fvertexAx", "fvertexAy",
+ "fvertexBx", "fvertexBy", "fvertexCx", "fvertexCy",
+ "fstartR", "fstartG", "fstartB", "fstartZ",
+ "fstartA", "fstartS", "fstartT", "fstartW",
+ /* 0x0c0 */
+ "fdRdX", "fdGdX", "fdBdX", "fdZdX",
+ "fdAdX", "fdSdX", "fdTdX", "fdWdX",
+ "fdRdY", "fdGdY", "fdBdY", "fdZdY",
+ "fdAdY", "fdSdY", "fdTdY", "fdWdY",
+ /* 0x100 */
+ "ftriangleCMD", "fbzColorPath", "fogMode", "alphaMode",
+ "fbzMode", "lfbMode", "clipLeftRight","clipLowYHighY",
+ "nopCMD", "fastfillCMD", "swapbufferCMD","fogColor",
+ "zaColor", "chromaKey", "chromaRange", "userIntrCMD",
+ /* 0x140 */
+ "stipple", "color0", "color1", "fbiPixelsIn",
+ "fbiChromaFail","fbiZfuncFail", "fbiAfuncFail", "fbiPixelsOut",
+ "fogTable160", "fogTable164", "fogTable168", "fogTable16c",
+ "fogTable170", "fogTable174", "fogTable178", "fogTable17c",
+ /* 0x180 */
+ "fogTable180", "fogTable184", "fogTable188", "fogTable18c",
+ "fogTable190", "fogTable194", "fogTable198", "fogTable19c",
+ "fogTable1a0", "fogTable1a4", "fogTable1a8", "fogTable1ac",
+ "fogTable1b0", "fogTable1b4", "fogTable1b8", "fogTable1bc",
+ /* 0x1c0 */
+ "fogTable1c0", "fogTable1c4", "fogTable1c8", "fogTable1cc",
+ "fogTable1d0", "fogTable1d4", "fogTable1d8", "fogTable1dc",
+ "reserved1e0", "reserved1e4", "reserved1e8", "colBufferAddr",
+ "colBufferStride","auxBufferAddr","auxBufferStride","reserved1fc",
+ /* 0x200 */
+ "clipLeftRight1","clipTopBottom1","reserved208","reserved20c",
+ "reserved210", "reserved214", "reserved218", "reserved21c",
+ "reserved220", "reserved224", "reserved228", "reserved22c",
+ "reserved230", "reserved234", "reserved238", "reserved23c",
+ /* 0x240 */
+ "reserved240", "reserved244", "reserved248", "swapPending",
+ "leftOverlayBuf","rightOverlayBuf","fbiSwapHistory","fbiTrianglesOut",
+ "sSetupMode", "sVx", "sVy", "sARGB",
+ "sRed", "sGreen", "sBlue", "sAlpha",
+ /* 0x280 */
+ "sVz", "sWb", "sWtmu0", "sS/Wtmu0",
+ "sT/Wtmu0", "sWtmu1", "sS/Wtmu1", "sT/Wtmu1",
+ "sDrawTriCMD", "sBeginTriCMD", "reserved2a8", "reserved2ac",
+ "reserved2b0", "reserved2b4", "reserved2b8", "reserved2bc",
+ /* 0x2c0 */
+ "reserved2c0", "reserved2c4", "reserved2c8", "reserved2cc",
+ "reserved2d0", "reserved2d4", "reserved2d8", "reserved2dc",
+ "reserved2e0", "reserved2e4", "reserved2e8", "reserved2ec",
+ "reserved2f0", "reserved2f4", "reserved2f8", "reserved2fc",
+ /* 0x300 */
+ "textureMode", "tLOD", "tDetail", "texBaseAddr",
+ "texBaseAddr_1","texBaseAddr_2","texBaseAddr_3_8","reserved31c",
+ "trexInit1", "nccTable0.0", "nccTable0.1", "nccTable0.2",
+ "nccTable0.3", "nccTable0.4", "nccTable0.5", "nccTable0.6",
+ /* 0x340 */
+ "nccTable0.7", "nccTable0.8", "nccTable0.9", "nccTable0.A",
+ "nccTable0.B", "nccTable1.0", "nccTable1.1", "nccTable1.2",
+ "nccTable1.3", "nccTable1.4", "nccTable1.5", "nccTable1.6",
+ "nccTable1.7", "nccTable1.8", "nccTable1.9", "nccTable1.A",
+ /* 0x380 */
+ "nccTable1.B"
+};
+
+
+
+/*************************************
+ *
+ * Voodoo Banshee I/O space registers
+ *
+ *************************************/
+
+/* 0x000 */
+#define io_status (0x000/4) /* */
+#define io_pciInit0 (0x004/4) /* */
+#define io_sipMonitor (0x008/4) /* */
+#define io_lfbMemoryConfig (0x00c/4) /* */
+#define io_miscInit0 (0x010/4) /* */
+#define io_miscInit1 (0x014/4) /* */
+#define io_dramInit0 (0x018/4) /* */
+#define io_dramInit1 (0x01c/4) /* */
+#define io_agpInit (0x020/4) /* */
+#define io_tmuGbeInit (0x024/4) /* */
+#define io_vgaInit0 (0x028/4) /* */
+#define io_vgaInit1 (0x02c/4) /* */
+#define io_dramCommand (0x030/4) /* */
+#define io_dramData (0x034/4) /* */
+
+/* 0x040 */
+#define io_pllCtrl0 (0x040/4) /* */
+#define io_pllCtrl1 (0x044/4) /* */
+#define io_pllCtrl2 (0x048/4) /* */
+#define io_dacMode (0x04c/4) /* */
+#define io_dacAddr (0x050/4) /* */
+#define io_dacData (0x054/4) /* */
+#define io_rgbMaxDelta (0x058/4) /* */
+#define io_vidProcCfg (0x05c/4) /* */
+#define io_hwCurPatAddr (0x060/4) /* */
+#define io_hwCurLoc (0x064/4) /* */
+#define io_hwCurC0 (0x068/4) /* */
+#define io_hwCurC1 (0x06c/4) /* */
+#define io_vidInFormat (0x070/4) /* */
+#define io_vidInStatus (0x074/4) /* */
+#define io_vidSerialParallelPort (0x078/4) /* */
+#define io_vidInXDecimDeltas (0x07c/4) /* */
+
+/* 0x080 */
+#define io_vidInDecimInitErrs (0x080/4) /* */
+#define io_vidInYDecimDeltas (0x084/4) /* */
+#define io_vidPixelBufThold (0x088/4) /* */
+#define io_vidChromaMin (0x08c/4) /* */
+#define io_vidChromaMax (0x090/4) /* */
+#define io_vidCurrentLine (0x094/4) /* */
+#define io_vidScreenSize (0x098/4) /* */
+#define io_vidOverlayStartCoords (0x09c/4) /* */
+#define io_vidOverlayEndScreenCoord (0x0a0/4) /* */
+#define io_vidOverlayDudx (0x0a4/4) /* */
+#define io_vidOverlayDudxOffsetSrcWidth (0x0a8/4) /* */
+#define io_vidOverlayDvdy (0x0ac/4) /* */
+#define io_vgab0 (0x0b0/4) /* */
+#define io_vgab4 (0x0b4/4) /* */
+#define io_vgab8 (0x0b8/4) /* */
+#define io_vgabc (0x0bc/4) /* */
+
+/* 0x0c0 */
+#define io_vgac0 (0x0c0/4) /* */
+#define io_vgac4 (0x0c4/4) /* */
+#define io_vgac8 (0x0c8/4) /* */
+#define io_vgacc (0x0cc/4) /* */
+#define io_vgad0 (0x0d0/4) /* */
+#define io_vgad4 (0x0d4/4) /* */
+#define io_vgad8 (0x0d8/4) /* */
+#define io_vgadc (0x0dc/4) /* */
+#define io_vidOverlayDvdyOffset (0x0e0/4) /* */
+#define io_vidDesktopStartAddr (0x0e4/4) /* */
+#define io_vidDesktopOverlayStride (0x0e8/4) /* */
+#define io_vidInAddr0 (0x0ec/4) /* */
+#define io_vidInAddr1 (0x0f0/4) /* */
+#define io_vidInAddr2 (0x0f4/4) /* */
+#define io_vidInStride (0x0f8/4) /* */
+#define io_vidCurrOverlayStartAddr (0x0fc/4) /* */
+
+
+
+/*************************************
+ *
+ * Register string table for debug
+ *
+ *************************************/
+
+static const char *const banshee_io_reg_name[] =
+{
+ /* 0x000 */
+ "status", "pciInit0", "sipMonitor", "lfbMemoryConfig",
+ "miscInit0", "miscInit1", "dramInit0", "dramInit1",
+ "agpInit", "tmuGbeInit", "vgaInit0", "vgaInit1",
+ "dramCommand", "dramData", "reserved38", "reserved3c",
+
+ /* 0x040 */
+ "pllCtrl0", "pllCtrl1", "pllCtrl2", "dacMode",
+ "dacAddr", "dacData", "rgbMaxDelta", "vidProcCfg",
+ "hwCurPatAddr", "hwCurLoc", "hwCurC0", "hwCurC1",
+ "vidInFormat", "vidInStatus", "vidSerialParallelPort","vidInXDecimDeltas",
+
+ /* 0x080 */
+ "vidInDecimInitErrs","vidInYDecimDeltas","vidPixelBufThold","vidChromaMin",
+ "vidChromaMax", "vidCurrentLine","vidScreenSize","vidOverlayStartCoords",
+ "vidOverlayEndScreenCoord","vidOverlayDudx","vidOverlayDudxOffsetSrcWidth","vidOverlayDvdy",
+ "vga[b0]", "vga[b4]", "vga[b8]", "vga[bc]",
+
+ /* 0x0c0 */
+ "vga[c0]", "vga[c4]", "vga[c8]", "vga[cc]",
+ "vga[d0]", "vga[d4]", "vga[d8]", "vga[dc]",
+ "vidOverlayDvdyOffset","vidDesktopStartAddr","vidDesktopOverlayStride","vidInAddr0",
+ "vidInAddr1", "vidInAddr2", "vidInStride", "vidCurrOverlayStartAddr"
+};
+
+
+
+/*************************************
+ *
+ * Voodoo Banshee AGP space registers
+ *
+ *************************************/
+
+/* 0x000 */
+#define agpReqSize (0x000/4) /* */
+#define agpHostAddressLow (0x004/4) /* */
+#define agpHostAddressHigh (0x008/4) /* */
+#define agpGraphicsAddress (0x00c/4) /* */
+#define agpGraphicsStride (0x010/4) /* */
+#define agpMoveCMD (0x014/4) /* */
+#define cmdBaseAddr0 (0x020/4) /* */
+#define cmdBaseSize0 (0x024/4) /* */
+#define cmdBump0 (0x028/4) /* */
+#define cmdRdPtrL0 (0x02c/4) /* */
+#define cmdRdPtrH0 (0x030/4) /* */
+#define cmdAMin0 (0x034/4) /* */
+#define cmdAMax0 (0x03c/4) /* */
+
+/* 0x040 */
+#define cmdFifoDepth0 (0x044/4) /* */
+#define cmdHoleCnt0 (0x048/4) /* */
+#define cmdBaseAddr1 (0x050/4) /* */
+#define cmdBaseSize1 (0x054/4) /* */
+#define cmdBump1 (0x058/4) /* */
+#define cmdRdPtrL1 (0x05c/4) /* */
+#define cmdRdPtrH1 (0x060/4) /* */
+#define cmdAMin1 (0x064/4) /* */
+#define cmdAMax1 (0x06c/4) /* */
+#define cmdFifoDepth1 (0x074/4) /* */
+#define cmdHoleCnt1 (0x078/4) /* */
+
+/* 0x080 */
+#define cmdFifoThresh (0x080/4) /* */
+#define cmdHoleInt (0x084/4) /* */
+
+/* 0x100 */
+#define yuvBaseAddress (0x100/4) /* */
+#define yuvStride (0x104/4) /* */
+#define crc1 (0x120/4) /* */
+#define crc2 (0x130/4) /* */
+
+
+
+/*************************************
+ *
+ * Register string table for debug
+ *
+ *************************************/
+
+static const char *const banshee_agp_reg_name[] =
+{
+ /* 0x000 */
+ "agpReqSize", "agpHostAddressLow","agpHostAddressHigh","agpGraphicsAddress",
+ "agpGraphicsStride","agpMoveCMD","reserved18", "reserved1c",
+ "cmdBaseAddr0", "cmdBaseSize0", "cmdBump0", "cmdRdPtrL0",
+ "cmdRdPtrH0", "cmdAMin0", "reserved38", "cmdAMax0",
+
+ /* 0x040 */
+ "reserved40", "cmdFifoDepth0","cmdHoleCnt0", "reserved4c",
+ "cmdBaseAddr1", "cmdBaseSize1", "cmdBump1", "cmdRdPtrL1",
+ "cmdRdPtrH1", "cmdAMin1", "reserved68", "cmdAMax1",
+ "reserved70", "cmdFifoDepth1","cmdHoleCnt1", "reserved7c",
+
+ /* 0x080 */
+ "cmdFifoThresh","cmdHoleInt", "reserved88", "reserved8c",
+ "reserved90", "reserved94", "reserved98", "reserved9c",
+ "reserveda0", "reserveda4", "reserveda8", "reservedac",
+ "reservedb0", "reservedb4", "reservedb8", "reservedbc",
+
+ /* 0x0c0 */
+ "reservedc0", "reservedc4", "reservedc8", "reservedcc",
+ "reservedd0", "reservedd4", "reservedd8", "reserveddc",
+ "reservede0", "reservede4", "reservede8", "reservedec",
+ "reservedf0", "reservedf4", "reservedf8", "reservedfc",
+
+ /* 0x100 */
+ "yuvBaseAddress","yuvStride", "reserved108", "reserved10c",
+ "reserved110", "reserved114", "reserved118", "reserved11c",
+ "crc1", "reserved124", "reserved128", "reserved12c",
+ "crc2", "reserved134", "reserved138", "reserved13c"
+};
+
+
+
+/*************************************
+ *
+ * Dithering tables
+ *
+ *************************************/
+
+static const UINT8 dither_matrix_4x4[16] =
+{
+ 0, 8, 2, 10,
+ 12, 4, 14, 6,
+ 3, 11, 1, 9,
+ 15, 7, 13, 5
+};
+
+static const UINT8 dither_matrix_2x2[16] =
+{
+ 2, 10, 2, 10,
+ 14, 6, 14, 6,
+ 2, 10, 2, 10,
+ 14, 6, 14, 6
+};
+
+
+
+/*************************************
+ *
+ * Macros for extracting pixels
+ *
+ *************************************/
+
+#define EXTRACT_565_TO_888(val, a, b, c) \
+ (a) = (((val) >> 8) & 0xf8) | (((val) >> 13) & 0x07); \
+ (b) = (((val) >> 3) & 0xfc) | (((val) >> 9) & 0x03); \
+ (c) = (((val) << 3) & 0xf8) | (((val) >> 2) & 0x07);
+#define EXTRACT_x555_TO_888(val, a, b, c) \
+ (a) = (((val) >> 7) & 0xf8) | (((val) >> 12) & 0x07); \
+ (b) = (((val) >> 2) & 0xf8) | (((val) >> 7) & 0x07); \
+ (c) = (((val) << 3) & 0xf8) | (((val) >> 2) & 0x07);
+#define EXTRACT_555x_TO_888(val, a, b, c) \
+ (a) = (((val) >> 8) & 0xf8) | (((val) >> 13) & 0x07); \
+ (b) = (((val) >> 3) & 0xf8) | (((val) >> 8) & 0x07); \
+ (c) = (((val) << 2) & 0xf8) | (((val) >> 3) & 0x07);
+#define EXTRACT_1555_TO_8888(val, a, b, c, d) \
+ (a) = ((INT16)(val) >> 15) & 0xff; \
+ EXTRACT_x555_TO_888(val, b, c, d)
+#define EXTRACT_5551_TO_8888(val, a, b, c, d) \
+ EXTRACT_555x_TO_888(val, a, b, c) \
+ (d) = ((val) & 0x0001) ? 0xff : 0x00;
+#define EXTRACT_x888_TO_888(val, a, b, c) \
+ (a) = ((val) >> 16) & 0xff; \
+ (b) = ((val) >> 8) & 0xff; \
+ (c) = ((val) >> 0) & 0xff;
+#define EXTRACT_888x_TO_888(val, a, b, c) \
+ (a) = ((val) >> 24) & 0xff; \
+ (b) = ((val) >> 16) & 0xff; \
+ (c) = ((val) >> 8) & 0xff;
+#define EXTRACT_8888_TO_8888(val, a, b, c, d) \
+ (a) = ((val) >> 24) & 0xff; \
+ (b) = ((val) >> 16) & 0xff; \
+ (c) = ((val) >> 8) & 0xff; \
+ (d) = ((val) >> 0) & 0xff;
+#define EXTRACT_4444_TO_8888(val, a, b, c, d) \
+ (a) = (((val) >> 8) & 0xf0) | (((val) >> 12) & 0x0f); \
+ (b) = (((val) >> 4) & 0xf0) | (((val) >> 8) & 0x0f); \
+ (c) = (((val) >> 0) & 0xf0) | (((val) >> 4) & 0x0f); \
+ (d) = (((val) << 4) & 0xf0) | (((val) >> 0) & 0x0f);
+#define EXTRACT_332_TO_888(val, a, b, c) \
+ (a) = (((val) >> 0) & 0xe0) | (((val) >> 3) & 0x1c) | (((val) >> 6) & 0x03); \
+ (b) = (((val) << 3) & 0xe0) | (((val) >> 0) & 0x1c) | (((val) >> 3) & 0x03); \
+ (c) = (((val) << 6) & 0xc0) | (((val) << 4) & 0x30) | (((val) << 2) & 0x0c) | (((val) << 0) & 0x03);
+
+
+/*************************************
+ *
+ * Misc. macros
+ *
+ *************************************/
+
+/* macro for clamping a value between minimum and maximum values */
+#define CLAMP(val,min,max) do { if ((val) < (min)) { (val) = (min); } else if ((val) > (max)) { (val) = (max); } } while (0)
+
+/* macro to compute the base 2 log for LOD calculations */
+#define LOGB2(x) (log((double)(x)) / log(2.0))
+
+
+
+/*************************************
+ *
+ * Macros for extracting bitfields
+ *
+ *************************************/
+
+#define INITEN_ENABLE_HW_INIT(val) (((val) >> 0) & 1)
+#define INITEN_ENABLE_PCI_FIFO(val) (((val) >> 1) & 1)
+#define INITEN_REMAP_INIT_TO_DAC(val) (((val) >> 2) & 1)
+#define INITEN_ENABLE_SNOOP0(val) (((val) >> 4) & 1)
+#define INITEN_SNOOP0_MEMORY_MATCH(val) (((val) >> 5) & 1)
+#define INITEN_SNOOP0_READWRITE_MATCH(val) (((val) >> 6) & 1)
+#define INITEN_ENABLE_SNOOP1(val) (((val) >> 7) & 1)
+#define INITEN_SNOOP1_MEMORY_MATCH(val) (((val) >> 8) & 1)
+#define INITEN_SNOOP1_READWRITE_MATCH(val) (((val) >> 9) & 1)
+#define INITEN_SLI_BUS_OWNER(val) (((val) >> 10) & 1)
+#define INITEN_SLI_ODD_EVEN(val) (((val) >> 11) & 1)
+#define INITEN_SECONDARY_REV_ID(val) (((val) >> 12) & 0xf) /* voodoo 2 only */
+#define INITEN_MFCTR_FAB_ID(val) (((val) >> 16) & 0xf) /* voodoo 2 only */
+#define INITEN_ENABLE_PCI_INTERRUPT(val) (((val) >> 20) & 1) /* voodoo 2 only */
+#define INITEN_PCI_INTERRUPT_TIMEOUT(val) (((val) >> 21) & 1) /* voodoo 2 only */
+#define INITEN_ENABLE_NAND_TREE_TEST(val) (((val) >> 22) & 1) /* voodoo 2 only */
+#define INITEN_ENABLE_SLI_ADDRESS_SNOOP(val) (((val) >> 23) & 1) /* voodoo 2 only */
+#define INITEN_SLI_SNOOP_ADDRESS(val) (((val) >> 24) & 0xff) /* voodoo 2 only */
+
+#define FBZCP_CC_RGBSELECT(val) (((val) >> 0) & 3)
+#define FBZCP_CC_ASELECT(val) (((val) >> 2) & 3)
+#define FBZCP_CC_LOCALSELECT(val) (((val) >> 4) & 1)
+#define FBZCP_CCA_LOCALSELECT(val) (((val) >> 5) & 3)
+#define FBZCP_CC_LOCALSELECT_OVERRIDE(val) (((val) >> 7) & 1)
+#define FBZCP_CC_ZERO_OTHER(val) (((val) >> 8) & 1)
+#define FBZCP_CC_SUB_CLOCAL(val) (((val) >> 9) & 1)
+#define FBZCP_CC_MSELECT(val) (((val) >> 10) & 7)
+#define FBZCP_CC_REVERSE_BLEND(val) (((val) >> 13) & 1)
+#define FBZCP_CC_ADD_ACLOCAL(val) (((val) >> 14) & 3)
+#define FBZCP_CC_INVERT_OUTPUT(val) (((val) >> 16) & 1)
+#define FBZCP_CCA_ZERO_OTHER(val) (((val) >> 17) & 1)
+#define FBZCP_CCA_SUB_CLOCAL(val) (((val) >> 18) & 1)
+#define FBZCP_CCA_MSELECT(val) (((val) >> 19) & 7)
+#define FBZCP_CCA_REVERSE_BLEND(val) (((val) >> 22) & 1)
+#define FBZCP_CCA_ADD_ACLOCAL(val) (((val) >> 23) & 3)
+#define FBZCP_CCA_INVERT_OUTPUT(val) (((val) >> 25) & 1)
+#define FBZCP_CCA_SUBPIXEL_ADJUST(val) (((val) >> 26) & 1)
+#define FBZCP_TEXTURE_ENABLE(val) (((val) >> 27) & 1)
+#define FBZCP_RGBZW_CLAMP(val) (((val) >> 28) & 1) /* voodoo 2 only */
+#define FBZCP_ANTI_ALIAS(val) (((val) >> 29) & 1) /* voodoo 2 only */
+
+#define ALPHAMODE_ALPHATEST(val) (((val) >> 0) & 1)
+#define ALPHAMODE_ALPHAFUNCTION(val) (((val) >> 1) & 7)
+#define ALPHAMODE_ALPHABLEND(val) (((val) >> 4) & 1)
+#define ALPHAMODE_ANTIALIAS(val) (((val) >> 5) & 1)
+#define ALPHAMODE_SRCRGBBLEND(val) (((val) >> 8) & 15)
+#define ALPHAMODE_DSTRGBBLEND(val) (((val) >> 12) & 15)
+#define ALPHAMODE_SRCALPHABLEND(val) (((val) >> 16) & 15)
+#define ALPHAMODE_DSTALPHABLEND(val) (((val) >> 20) & 15)
+#define ALPHAMODE_ALPHAREF(val) (((val) >> 24) & 0xff)
+
+#define FOGMODE_ENABLE_FOG(val) (((val) >> 0) & 1)
+#define FOGMODE_FOG_ADD(val) (((val) >> 1) & 1)
+#define FOGMODE_FOG_MULT(val) (((val) >> 2) & 1)
+#define FOGMODE_FOG_ZALPHA(val) (((val) >> 3) & 3)
+#define FOGMODE_FOG_CONSTANT(val) (((val) >> 5) & 1)
+#define FOGMODE_FOG_DITHER(val) (((val) >> 6) & 1) /* voodoo 2 only */
+#define FOGMODE_FOG_ZONES(val) (((val) >> 7) & 1) /* voodoo 2 only */
+
+#define FBZMODE_ENABLE_CLIPPING(val) (((val) >> 0) & 1)
+#define FBZMODE_ENABLE_CHROMAKEY(val) (((val) >> 1) & 1)
+#define FBZMODE_ENABLE_STIPPLE(val) (((val) >> 2) & 1)
+#define FBZMODE_WBUFFER_SELECT(val) (((val) >> 3) & 1)
+#define FBZMODE_ENABLE_DEPTHBUF(val) (((val) >> 4) & 1)
+#define FBZMODE_DEPTH_FUNCTION(val) (((val) >> 5) & 7)
+#define FBZMODE_ENABLE_DITHERING(val) (((val) >> 8) & 1)
+#define FBZMODE_RGB_BUFFER_MASK(val) (((val) >> 9) & 1)
+#define FBZMODE_AUX_BUFFER_MASK(val) (((val) >> 10) & 1)
+#define FBZMODE_DITHER_TYPE(val) (((val) >> 11) & 1)
+#define FBZMODE_STIPPLE_PATTERN(val) (((val) >> 12) & 1)
+#define FBZMODE_ENABLE_ALPHA_MASK(val) (((val) >> 13) & 1)
+#define FBZMODE_DRAW_BUFFER(val) (((val) >> 14) & 3)
+#define FBZMODE_ENABLE_DEPTH_BIAS(val) (((val) >> 16) & 1)
+#define FBZMODE_Y_ORIGIN(val) (((val) >> 17) & 1)
+#define FBZMODE_ENABLE_ALPHA_PLANES(val) (((val) >> 18) & 1)
+#define FBZMODE_ALPHA_DITHER_SUBTRACT(val) (((val) >> 19) & 1)
+#define FBZMODE_DEPTH_SOURCE_COMPARE(val) (((val) >> 20) & 1)
+#define FBZMODE_DEPTH_FLOAT_SELECT(val) (((val) >> 21) & 1) /* voodoo 2 only */
+
+#define LFBMODE_WRITE_FORMAT(val) (((val) >> 0) & 0xf)
+#define LFBMODE_WRITE_BUFFER_SELECT(val) (((val) >> 4) & 3)
+#define LFBMODE_READ_BUFFER_SELECT(val) (((val) >> 6) & 3)
+#define LFBMODE_ENABLE_PIXEL_PIPELINE(val) (((val) >> 8) & 1)
+#define LFBMODE_RGBA_LANES(val) (((val) >> 9) & 3)
+#define LFBMODE_WORD_SWAP_WRITES(val) (((val) >> 11) & 1)
+#define LFBMODE_BYTE_SWIZZLE_WRITES(val) (((val) >> 12) & 1)
+#define LFBMODE_Y_ORIGIN(val) (((val) >> 13) & 1)
+#define LFBMODE_WRITE_W_SELECT(val) (((val) >> 14) & 1)
+#define LFBMODE_WORD_SWAP_READS(val) (((val) >> 15) & 1)
+#define LFBMODE_BYTE_SWIZZLE_READS(val) (((val) >> 16) & 1)
+
+#define CHROMARANGE_BLUE_EXCLUSIVE(val) (((val) >> 24) & 1)
+#define CHROMARANGE_GREEN_EXCLUSIVE(val) (((val) >> 25) & 1)
+#define CHROMARANGE_RED_EXCLUSIVE(val) (((val) >> 26) & 1)
+#define CHROMARANGE_UNION_MODE(val) (((val) >> 27) & 1)
+#define CHROMARANGE_ENABLE(val) (((val) >> 28) & 1)
+
+#define FBIINIT0_VGA_PASSTHRU(val) (((val) >> 0) & 1)
+#define FBIINIT0_GRAPHICS_RESET(val) (((val) >> 1) & 1)
+#define FBIINIT0_FIFO_RESET(val) (((val) >> 2) & 1)
+#define FBIINIT0_SWIZZLE_REG_WRITES(val) (((val) >> 3) & 1)
+#define FBIINIT0_STALL_PCIE_FOR_HWM(val) (((val) >> 4) & 1)
+#define FBIINIT0_PCI_FIFO_LWM(val) (((val) >> 6) & 0x1f)
+#define FBIINIT0_LFB_TO_MEMORY_FIFO(val) (((val) >> 11) & 1)
+#define FBIINIT0_TEXMEM_TO_MEMORY_FIFO(val) (((val) >> 12) & 1)
+#define FBIINIT0_ENABLE_MEMORY_FIFO(val) (((val) >> 13) & 1)
+#define FBIINIT0_MEMORY_FIFO_HWM(val) (((val) >> 14) & 0x7ff)
+#define FBIINIT0_MEMORY_FIFO_BURST(val) (((val) >> 25) & 0x3f)
+
+#define FBIINIT1_PCI_DEV_FUNCTION(val) (((val) >> 0) & 1)
+#define FBIINIT1_PCI_WRITE_WAIT_STATES(val) (((val) >> 1) & 1)
+#define FBIINIT1_MULTI_SST1(val) (((val) >> 2) & 1) /* not on voodoo 2 */
+#define FBIINIT1_ENABLE_LFB(val) (((val) >> 3) & 1)
+#define FBIINIT1_X_VIDEO_TILES(val) (((val) >> 4) & 0xf)
+#define FBIINIT1_VIDEO_TIMING_RESET(val) (((val) >> 8) & 1)
+#define FBIINIT1_SOFTWARE_OVERRIDE(val) (((val) >> 9) & 1)
+#define FBIINIT1_SOFTWARE_HSYNC(val) (((val) >> 10) & 1)
+#define FBIINIT1_SOFTWARE_VSYNC(val) (((val) >> 11) & 1)
+#define FBIINIT1_SOFTWARE_BLANK(val) (((val) >> 12) & 1)
+#define FBIINIT1_DRIVE_VIDEO_TIMING(val) (((val) >> 13) & 1)
+#define FBIINIT1_DRIVE_VIDEO_BLANK(val) (((val) >> 14) & 1)
+#define FBIINIT1_DRIVE_VIDEO_SYNC(val) (((val) >> 15) & 1)
+#define FBIINIT1_DRIVE_VIDEO_DCLK(val) (((val) >> 16) & 1)
+#define FBIINIT1_VIDEO_TIMING_VCLK(val) (((val) >> 17) & 1)
+#define FBIINIT1_VIDEO_CLK_2X_DELAY(val) (((val) >> 18) & 3)
+#define FBIINIT1_VIDEO_TIMING_SOURCE(val) (((val) >> 20) & 3)
+#define FBIINIT1_ENABLE_24BPP_OUTPUT(val) (((val) >> 22) & 1)
+#define FBIINIT1_ENABLE_SLI(val) (((val) >> 23) & 1)
+#define FBIINIT1_X_VIDEO_TILES_BIT5(val) (((val) >> 24) & 1) /* voodoo 2 only */
+#define FBIINIT1_ENABLE_EDGE_FILTER(val) (((val) >> 25) & 1)
+#define FBIINIT1_INVERT_VID_CLK_2X(val) (((val) >> 26) & 1)
+#define FBIINIT1_VID_CLK_2X_SEL_DELAY(val) (((val) >> 27) & 3)
+#define FBIINIT1_VID_CLK_DELAY(val) (((val) >> 29) & 3)
+#define FBIINIT1_DISABLE_FAST_READAHEAD(val) (((val) >> 31) & 1)
+
+#define FBIINIT2_DISABLE_DITHER_SUB(val) (((val) >> 0) & 1)
+#define FBIINIT2_DRAM_BANKING(val) (((val) >> 1) & 1)
+#define FBIINIT2_ENABLE_TRIPLE_BUF(val) (((val) >> 4) & 1)
+#define FBIINIT2_ENABLE_FAST_RAS_READ(val) (((val) >> 5) & 1)
+#define FBIINIT2_ENABLE_GEN_DRAM_OE(val) (((val) >> 6) & 1)
+#define FBIINIT2_ENABLE_FAST_READWRITE(val) (((val) >> 7) & 1)
+#define FBIINIT2_ENABLE_PASSTHRU_DITHER(val) (((val) >> 8) & 1)
+#define FBIINIT2_SWAP_BUFFER_ALGORITHM(val) (((val) >> 9) & 3)
+#define FBIINIT2_VIDEO_BUFFER_OFFSET(val) (((val) >> 11) & 0x1ff)
+#define FBIINIT2_ENABLE_DRAM_BANKING(val) (((val) >> 20) & 1)
+#define FBIINIT2_ENABLE_DRAM_READ_FIFO(val) (((val) >> 21) & 1)
+#define FBIINIT2_ENABLE_DRAM_REFRESH(val) (((val) >> 22) & 1)
+#define FBIINIT2_REFRESH_LOAD_VALUE(val) (((val) >> 23) & 0x1ff)
+
+#define FBIINIT3_TRI_REGISTER_REMAP(val) (((val) >> 0) & 1)
+#define FBIINIT3_VIDEO_FIFO_THRESH(val) (((val) >> 1) & 0x1f)
+#define FBIINIT3_DISABLE_TMUS(val) (((val) >> 6) & 1)
+#define FBIINIT3_FBI_MEMORY_TYPE(val) (((val) >> 8) & 7)
+#define FBIINIT3_VGA_PASS_RESET_VAL(val) (((val) >> 11) & 1)
+#define FBIINIT3_HARDCODE_PCI_BASE(val) (((val) >> 12) & 1)
+#define FBIINIT3_FBI2TREX_DELAY(val) (((val) >> 13) & 0xf)
+#define FBIINIT3_TREX2FBI_DELAY(val) (((val) >> 17) & 0x1f)
+#define FBIINIT3_YORIGIN_SUBTRACT(val) (((val) >> 22) & 0x3ff)
+
+#define FBIINIT4_PCI_READ_WAITS(val) (((val) >> 0) & 1)
+#define FBIINIT4_ENABLE_LFB_READAHEAD(val) (((val) >> 1) & 1)
+#define FBIINIT4_MEMORY_FIFO_LWM(val) (((val) >> 2) & 0x3f)
+#define FBIINIT4_MEMORY_FIFO_START_ROW(val) (((val) >> 8) & 0x3ff)
+#define FBIINIT4_MEMORY_FIFO_STOP_ROW(val) (((val) >> 18) & 0x3ff)
+#define FBIINIT4_VIDEO_CLOCKING_DELAY(val) (((val) >> 29) & 7) /* voodoo 2 only */
+
+#define FBIINIT5_DISABLE_PCI_STOP(val) (((val) >> 0) & 1) /* voodoo 2 only */
+#define FBIINIT5_PCI_SLAVE_SPEED(val) (((val) >> 1) & 1) /* voodoo 2 only */
+#define FBIINIT5_DAC_DATA_OUTPUT_WIDTH(val) (((val) >> 2) & 1) /* voodoo 2 only */
+#define FBIINIT5_DAC_DATA_17_OUTPUT(val) (((val) >> 3) & 1) /* voodoo 2 only */
+#define FBIINIT5_DAC_DATA_18_OUTPUT(val) (((val) >> 4) & 1) /* voodoo 2 only */
+#define FBIINIT5_GENERIC_STRAPPING(val) (((val) >> 5) & 0xf) /* voodoo 2 only */
+#define FBIINIT5_BUFFER_ALLOCATION(val) (((val) >> 9) & 3) /* voodoo 2 only */
+#define FBIINIT5_DRIVE_VID_CLK_SLAVE(val) (((val) >> 11) & 1) /* voodoo 2 only */
+#define FBIINIT5_DRIVE_DAC_DATA_16(val) (((val) >> 12) & 1) /* voodoo 2 only */
+#define FBIINIT5_VCLK_INPUT_SELECT(val) (((val) >> 13) & 1) /* voodoo 2 only */
+#define FBIINIT5_MULTI_CVG_DETECT(val) (((val) >> 14) & 1) /* voodoo 2 only */
+#define FBIINIT5_SYNC_RETRACE_READS(val) (((val) >> 15) & 1) /* voodoo 2 only */
+#define FBIINIT5_ENABLE_RHBORDER_COLOR(val) (((val) >> 16) & 1) /* voodoo 2 only */
+#define FBIINIT5_ENABLE_LHBORDER_COLOR(val) (((val) >> 17) & 1) /* voodoo 2 only */
+#define FBIINIT5_ENABLE_BVBORDER_COLOR(val) (((val) >> 18) & 1) /* voodoo 2 only */
+#define FBIINIT5_ENABLE_TVBORDER_COLOR(val) (((val) >> 19) & 1) /* voodoo 2 only */
+#define FBIINIT5_DOUBLE_HORIZ(val) (((val) >> 20) & 1) /* voodoo 2 only */
+#define FBIINIT5_DOUBLE_VERT(val) (((val) >> 21) & 1) /* voodoo 2 only */
+#define FBIINIT5_ENABLE_16BIT_GAMMA(val) (((val) >> 22) & 1) /* voodoo 2 only */
+#define FBIINIT5_INVERT_DAC_HSYNC(val) (((val) >> 23) & 1) /* voodoo 2 only */
+#define FBIINIT5_INVERT_DAC_VSYNC(val) (((val) >> 24) & 1) /* voodoo 2 only */
+#define FBIINIT5_ENABLE_24BIT_DACDATA(val) (((val) >> 25) & 1) /* voodoo 2 only */
+#define FBIINIT5_ENABLE_INTERLACING(val) (((val) >> 26) & 1) /* voodoo 2 only */
+#define FBIINIT5_DAC_DATA_18_CONTROL(val) (((val) >> 27) & 1) /* voodoo 2 only */
+#define FBIINIT5_RASTERIZER_UNIT_MODE(val) (((val) >> 30) & 3) /* voodoo 2 only */
+
+#define FBIINIT6_WINDOW_ACTIVE_COUNTER(val) (((val) >> 0) & 7) /* voodoo 2 only */
+#define FBIINIT6_WINDOW_DRAG_COUNTER(val) (((val) >> 3) & 0x1f) /* voodoo 2 only */
+#define FBIINIT6_SLI_SYNC_MASTER(val) (((val) >> 8) & 1) /* voodoo 2 only */
+#define FBIINIT6_DAC_DATA_22_OUTPUT(val) (((val) >> 9) & 3) /* voodoo 2 only */
+#define FBIINIT6_DAC_DATA_23_OUTPUT(val) (((val) >> 11) & 3) /* voodoo 2 only */
+#define FBIINIT6_SLI_SYNCIN_OUTPUT(val) (((val) >> 13) & 3) /* voodoo 2 only */
+#define FBIINIT6_SLI_SYNCOUT_OUTPUT(val) (((val) >> 15) & 3) /* voodoo 2 only */
+#define FBIINIT6_DAC_RD_OUTPUT(val) (((val) >> 17) & 3) /* voodoo 2 only */
+#define FBIINIT6_DAC_WR_OUTPUT(val) (((val) >> 19) & 3) /* voodoo 2 only */
+#define FBIINIT6_PCI_FIFO_LWM_RDY(val) (((val) >> 21) & 0x7f) /* voodoo 2 only */
+#define FBIINIT6_VGA_PASS_N_OUTPUT(val) (((val) >> 28) & 3) /* voodoo 2 only */
+#define FBIINIT6_X_VIDEO_TILES_BIT0(val) (((val) >> 30) & 1) /* voodoo 2 only */
+
+#define FBIINIT7_GENERIC_STRAPPING(val) (((val) >> 0) & 0xff) /* voodoo 2 only */
+#define FBIINIT7_CMDFIFO_ENABLE(val) (((val) >> 8) & 1) /* voodoo 2 only */
+#define FBIINIT7_CMDFIFO_MEMORY_STORE(val) (((val) >> 9) & 1) /* voodoo 2 only */
+#define FBIINIT7_DISABLE_CMDFIFO_HOLES(val) (((val) >> 10) & 1) /* voodoo 2 only */
+#define FBIINIT7_CMDFIFO_READ_THRESH(val) (((val) >> 11) & 0x1f) /* voodoo 2 only */
+#define FBIINIT7_SYNC_CMDFIFO_WRITES(val) (((val) >> 16) & 1) /* voodoo 2 only */
+#define FBIINIT7_SYNC_CMDFIFO_READS(val) (((val) >> 17) & 1) /* voodoo 2 only */
+#define FBIINIT7_RESET_PCI_PACKER(val) (((val) >> 18) & 1) /* voodoo 2 only */
+#define FBIINIT7_ENABLE_CHROMA_STUFF(val) (((val) >> 19) & 1) /* voodoo 2 only */
+#define FBIINIT7_CMDFIFO_PCI_TIMEOUT(val) (((val) >> 20) & 0x7f) /* voodoo 2 only */
+#define FBIINIT7_ENABLE_TEXTURE_BURST(val) (((val) >> 27) & 1) /* voodoo 2 only */
+
+#define TEXMODE_ENABLE_PERSPECTIVE(val) (((val) >> 0) & 1)
+#define TEXMODE_MINIFICATION_FILTER(val) (((val) >> 1) & 1)
+#define TEXMODE_MAGNIFICATION_FILTER(val) (((val) >> 2) & 1)
+#define TEXMODE_CLAMP_NEG_W(val) (((val) >> 3) & 1)
+#define TEXMODE_ENABLE_LOD_DITHER(val) (((val) >> 4) & 1)
+#define TEXMODE_NCC_TABLE_SELECT(val) (((val) >> 5) & 1)
+#define TEXMODE_CLAMP_S(val) (((val) >> 6) & 1)
+#define TEXMODE_CLAMP_T(val) (((val) >> 7) & 1)
+#define TEXMODE_FORMAT(val) (((val) >> 8) & 0xf)
+#define TEXMODE_TC_ZERO_OTHER(val) (((val) >> 12) & 1)
+#define TEXMODE_TC_SUB_CLOCAL(val) (((val) >> 13) & 1)
+#define TEXMODE_TC_MSELECT(val) (((val) >> 14) & 7)
+#define TEXMODE_TC_REVERSE_BLEND(val) (((val) >> 17) & 1)
+#define TEXMODE_TC_ADD_ACLOCAL(val) (((val) >> 18) & 3)
+#define TEXMODE_TC_INVERT_OUTPUT(val) (((val) >> 20) & 1)
+#define TEXMODE_TCA_ZERO_OTHER(val) (((val) >> 21) & 1)
+#define TEXMODE_TCA_SUB_CLOCAL(val) (((val) >> 22) & 1)
+#define TEXMODE_TCA_MSELECT(val) (((val) >> 23) & 7)
+#define TEXMODE_TCA_REVERSE_BLEND(val) (((val) >> 26) & 1)
+#define TEXMODE_TCA_ADD_ACLOCAL(val) (((val) >> 27) & 3)
+#define TEXMODE_TCA_INVERT_OUTPUT(val) (((val) >> 29) & 1)
+#define TEXMODE_TRILINEAR(val) (((val) >> 30) & 1)
+#define TEXMODE_SEQ_8_DOWNLD(val) (((val) >> 31) & 1)
+
+#define TEXLOD_LODMIN(val) (((val) >> 0) & 0x3f)
+#define TEXLOD_LODMAX(val) (((val) >> 6) & 0x3f)
+#define TEXLOD_LODBIAS(val) (((val) >> 12) & 0x3f)
+#define TEXLOD_LOD_ODD(val) (((val) >> 18) & 1)
+#define TEXLOD_LOD_TSPLIT(val) (((val) >> 19) & 1)
+#define TEXLOD_LOD_S_IS_WIDER(val) (((val) >> 20) & 1)
+#define TEXLOD_LOD_ASPECT(val) (((val) >> 21) & 3)
+#define TEXLOD_LOD_ZEROFRAC(val) (((val) >> 23) & 1)
+#define TEXLOD_TMULTIBASEADDR(val) (((val) >> 24) & 1)
+#define TEXLOD_TDATA_SWIZZLE(val) (((val) >> 25) & 1)
+#define TEXLOD_TDATA_SWAP(val) (((val) >> 26) & 1)
+#define TEXLOD_TDIRECT_WRITE(val) (((val) >> 27) & 1) /* Voodoo 2 only */
+
+#define TEXDETAIL_DETAIL_MAX(val) (((val) >> 0) & 0xff)
+#define TEXDETAIL_DETAIL_BIAS(val) (((val) >> 8) & 0x3f)
+#define TEXDETAIL_DETAIL_SCALE(val) (((val) >> 14) & 7)
+#define TEXDETAIL_RGB_MIN_FILTER(val) (((val) >> 17) & 1) /* Voodoo 2 only */
+#define TEXDETAIL_RGB_MAG_FILTER(val) (((val) >> 18) & 1) /* Voodoo 2 only */
+#define TEXDETAIL_ALPHA_MIN_FILTER(val) (((val) >> 19) & 1) /* Voodoo 2 only */
+#define TEXDETAIL_ALPHA_MAG_FILTER(val) (((val) >> 20) & 1) /* Voodoo 2 only */
+#define TEXDETAIL_SEPARATE_RGBA_FILTER(val) (((val) >> 21) & 1) /* Voodoo 2 only */
+
+#define TREXINIT_SEND_TMU_CONFIG(val) (((val) >> 18) & 1)
/*************************************
@@ -21,6 +1364,377 @@ struct voodoo_state;
struct poly_extra_data;
+struct rgba
+{
+#ifdef LSB_FIRST
+ UINT8 b, g, r, a;
+#else
+ UINT8 a, r, g, b;
+#endif
+};
+
+
+union voodoo_reg
+{
+ INT32 i;
+ UINT32 u;
+ float f;
+ rgba rgb;
+};
+
+
+typedef voodoo_reg rgb_union;
+
+
+struct voodoo_stats
+{
+ UINT8 lastkey; /* last key state */
+ UINT8 display; /* display stats? */
+ INT32 swaps; /* total swaps */
+ INT32 stalls; /* total stalls */
+ INT32 total_triangles; /* total triangles */
+ INT32 total_pixels_in; /* total pixels in */
+ INT32 total_pixels_out; /* total pixels out */
+ INT32 total_chroma_fail; /* total chroma fail */
+ INT32 total_zfunc_fail; /* total z func fail */
+ INT32 total_afunc_fail; /* total a func fail */
+ INT32 total_clipped; /* total clipped */
+ INT32 total_stippled; /* total stippled */
+ INT32 lfb_writes; /* LFB writes */
+ INT32 lfb_reads; /* LFB reads */
+ INT32 reg_writes; /* register writes */
+ INT32 reg_reads; /* register reads */
+ INT32 tex_writes; /* texture writes */
+ INT32 texture_mode[16]; /* 16 different texture modes */
+ UINT8 render_override; /* render override */
+ char buffer[1024]; /* string */
+};
+
+
+/* note that this structure is an even 64 bytes long */
+struct stats_block
+{
+ INT32 pixels_in; /* pixels in statistic */
+ INT32 pixels_out; /* pixels out statistic */
+ INT32 chroma_fail; /* chroma test fail statistic */
+ INT32 zfunc_fail; /* z function test fail statistic */
+ INT32 afunc_fail; /* alpha function test fail statistic */
+ INT32 clip_fail; /* clipping fail statistic */
+ INT32 stipple_count; /* stipple statistic */
+ INT32 filler[64/4 - 7]; /* pad this structure to 64 bytes */
+};
+
+
+struct fifo_state
+{
+ UINT32 * base; /* base of the FIFO */
+ INT32 size; /* size of the FIFO */
+ INT32 in; /* input pointer */
+ INT32 out; /* output pointer */
+};
+
+
+struct cmdfifo_info
+{
+ UINT8 enable; /* enabled? */
+ UINT8 count_holes; /* count holes? */
+ UINT32 base; /* base address in framebuffer RAM */
+ UINT32 end; /* end address in framebuffer RAM */
+ UINT32 rdptr; /* current read pointer */
+ UINT32 amin; /* minimum address */
+ UINT32 amax; /* maximum address */
+ UINT32 depth; /* current depth */
+ UINT32 holes; /* number of holes */
+};
+
+
+struct pci_state
+{
+ fifo_state fifo; /* PCI FIFO */
+ UINT32 init_enable; /* initEnable value */
+ UINT8 stall_state; /* state of the system if we're stalled */
+ UINT8 op_pending; /* true if an operation is pending */
+ attotime op_end_time; /* time when the pending operation ends */
+ emu_timer * continue_timer; /* timer to use to continue processing */
+ UINT32 fifo_mem[64*2]; /* memory backing the PCI FIFO */
+};
+
+
+struct ncc_table
+{
+ UINT8 dirty; /* is the texel lookup dirty? */
+ voodoo_reg * reg; /* pointer to our registers */
+ INT32 ir[4], ig[4], ib[4]; /* I values for R,G,B */
+ INT32 qr[4], qg[4], qb[4]; /* Q values for R,G,B */
+ INT32 y[16]; /* Y values */
+ rgb_t * palette; /* pointer to associated RGB palette */
+ rgb_t * palettea; /* pointer to associated ARGB palette */
+ rgb_t texel[256]; /* texel lookup */
+};
+
+
+struct tmu_state
+{
+ UINT8 * ram; /* pointer to our RAM */
+ UINT32 mask; /* mask to apply to pointers */
+ voodoo_reg * reg; /* pointer to our register base */
+ UINT32 regdirty; /* true if the LOD/mode/base registers have changed */
+
+ UINT32 texaddr_mask; /* mask for texture address */
+ UINT8 texaddr_shift; /* shift for texture address */
+
+ INT64 starts, startt; /* starting S,T (14.18) */
+ INT64 startw; /* starting W (2.30) */
+ INT64 dsdx, dtdx; /* delta S,T per X */
+ INT64 dwdx; /* delta W per X */
+ INT64 dsdy, dtdy; /* delta S,T per Y */
+ INT64 dwdy; /* delta W per Y */
+
+ INT32 lodmin, lodmax; /* min, max LOD values */
+ INT32 lodbias; /* LOD bias */
+ UINT32 lodmask; /* mask of available LODs */
+ UINT32 lodoffset[9]; /* offset of texture base for each LOD */
+ INT32 detailmax; /* detail clamp */
+ INT32 detailbias; /* detail bias */
+ UINT8 detailscale; /* detail scale */
+
+ UINT32 wmask; /* mask for the current texture width */
+ UINT32 hmask; /* mask for the current texture height */
+
+ UINT32 bilinear_mask; /* mask for bilinear resolution (0xf0 for V1, 0xff for V2) */
+
+ ncc_table ncc[2]; /* two NCC tables */
+
+ rgb_t * lookup; /* currently selected lookup */
+ rgb_t * texel[16]; /* texel lookups for each format */
+
+ rgb_t palette[256]; /* palette lookup table */
+ rgb_t palettea[256]; /* palette+alpha lookup table */
+};
+
+
+struct tmu_shared_state
+{
+ rgb_t rgb332[256]; /* RGB 3-3-2 lookup table */
+ rgb_t alpha8[256]; /* alpha 8-bit lookup table */
+ rgb_t int8[256]; /* intensity 8-bit lookup table */
+ rgb_t ai44[256]; /* alpha, intensity 4-4 lookup table */
+
+ rgb_t rgb565[65536]; /* RGB 5-6-5 lookup table */
+ rgb_t argb1555[65536]; /* ARGB 1-5-5-5 lookup table */
+ rgb_t argb4444[65536]; /* ARGB 4-4-4-4 lookup table */
+};
+
+
+struct setup_vertex
+{
+ float x, y; /* X, Y coordinates */
+ float a, r, g, b; /* A, R, G, B values */
+ float z, wb; /* Z and broadcast W values */
+ float w0, s0, t0; /* W, S, T for TMU 0 */
+ float w1, s1, t1; /* W, S, T for TMU 1 */
+};
+
+
+struct fbi_state
+{
+ UINT8 * ram; /* pointer to frame buffer RAM */
+ UINT32 mask; /* mask to apply to pointers */
+ UINT32 rgboffs[3]; /* word offset to 3 RGB buffers */
+ UINT32 auxoffs; /* word offset to 1 aux buffer */
+
+ UINT8 frontbuf; /* front buffer index */
+ UINT8 backbuf; /* back buffer index */
+ UINT8 swaps_pending; /* number of pending swaps */
+ UINT8 video_changed; /* did the frontbuffer video change? */
+
+ UINT32 yorigin; /* Y origin subtract value */
+ UINT32 lfb_base; /* base of LFB in memory */
+ UINT8 lfb_stride; /* stride of LFB accesses in bits */
+
+ UINT32 width; /* width of current frame buffer */
+ UINT32 height; /* height of current frame buffer */
+ UINT32 xoffs; /* horizontal offset (back porch) */
+ UINT32 yoffs; /* vertical offset (back porch) */
+ UINT32 vsyncscan; /* vertical sync scanline */
+ UINT32 rowpixels; /* pixels per row */
+ UINT32 tile_width; /* width of video tiles */
+ UINT32 tile_height; /* height of video tiles */
+ UINT32 x_tiles; /* number of tiles in the X direction */
+
+ emu_timer * vblank_timer; /* VBLANK timer */
+ UINT8 vblank; /* VBLANK state */
+ UINT8 vblank_count; /* number of VBLANKs since last swap */
+ UINT8 vblank_swap_pending; /* a swap is pending, waiting for a vblank */
+ UINT8 vblank_swap; /* swap when we hit this count */
+ UINT8 vblank_dont_swap; /* don't actually swap when we hit this point */
+
+ /* triangle setup info */
+ UINT8 cheating_allowed; /* allow cheating? */
+ INT32 sign; /* triangle sign */
+ INT16 ax, ay; /* vertex A x,y (12.4) */
+ INT16 bx, by; /* vertex B x,y (12.4) */
+ INT16 cx, cy; /* vertex C x,y (12.4) */
+ INT32 startr, startg, startb, starta; /* starting R,G,B,A (12.12) */
+ INT32 startz; /* starting Z (20.12) */
+ INT64 startw; /* starting W (16.32) */
+ INT32 drdx, dgdx, dbdx, dadx; /* delta R,G,B,A per X */
+ INT32 dzdx; /* delta Z per X */
+ INT64 dwdx; /* delta W per X */
+ INT32 drdy, dgdy, dbdy, dady; /* delta R,G,B,A per Y */
+ INT32 dzdy; /* delta Z per Y */
+ INT64 dwdy; /* delta W per Y */
+
+ stats_block lfb_stats; /* LFB-access statistics */
+
+ UINT8 sverts; /* number of vertices ready */
+ setup_vertex svert[3]; /* 3 setup vertices */
+
+ fifo_state fifo; /* framebuffer memory fifo */
+ cmdfifo_info cmdfifo[2]; /* command FIFOs */
+
+ UINT8 fogblend[64]; /* 64-entry fog table */
+ UINT8 fogdelta[64]; /* 64-entry fog table */
+ UINT8 fogdelta_mask; /* mask for for delta (0xff for V1, 0xfc for V2) */
+
+ rgb_t pen[65536]; /* mapping from pixels to pens */
+ rgb_t clut[512]; /* clut gamma data */
+ UINT8 clut_dirty; /* do we need to recompute? */
+};
+
+
+struct dac_state
+{
+ UINT8 reg[8]; /* 8 registers */
+ UINT8 read_result; /* pending read result */
+};
+
+
+struct raster_info
+{
+ raster_info * next; /* pointer to next entry with the same hash */
+ poly_draw_scanline_func callback; /* callback pointer */
+ UINT8 is_generic; /* TRUE if this is one of the generic rasterizers */
+ UINT8 display; /* display index */
+ UINT32 hits; /* how many hits (pixels) we've used this for */
+ UINT32 polys; /* how many polys we've used this for */
+ UINT32 eff_color_path; /* effective fbzColorPath value */
+ UINT32 eff_alpha_mode; /* effective alphaMode value */
+ UINT32 eff_fog_mode; /* effective fogMode value */
+ UINT32 eff_fbz_mode; /* effective fbzMode value */
+ UINT32 eff_tex_mode_0; /* effective textureMode value for TMU #0 */
+ UINT32 eff_tex_mode_1; /* effective textureMode value for TMU #1 */
+ UINT32 hash;
+};
+
+
+struct poly_extra_data
+{
+ voodoo_state * state; /* pointer back to the voodoo state */
+ raster_info * info; /* pointer to rasterizer information */
+
+ INT16 ax, ay; /* vertex A x,y (12.4) */
+ INT32 startr, startg, startb, starta; /* starting R,G,B,A (12.12) */
+ INT32 startz; /* starting Z (20.12) */
+ INT64 startw; /* starting W (16.32) */
+ INT32 drdx, dgdx, dbdx, dadx; /* delta R,G,B,A per X */
+ INT32 dzdx; /* delta Z per X */
+ INT64 dwdx; /* delta W per X */
+ INT32 drdy, dgdy, dbdy, dady; /* delta R,G,B,A per Y */
+ INT32 dzdy; /* delta Z per Y */
+ INT64 dwdy; /* delta W per Y */
+
+ INT64 starts0, startt0; /* starting S,T (14.18) */
+ INT64 startw0; /* starting W (2.30) */
+ INT64 ds0dx, dt0dx; /* delta S,T per X */
+ INT64 dw0dx; /* delta W per X */
+ INT64 ds0dy, dt0dy; /* delta S,T per Y */
+ INT64 dw0dy; /* delta W per Y */
+ INT32 lodbase0; /* used during rasterization */
+
+ INT64 starts1, startt1; /* starting S,T (14.18) */
+ INT64 startw1; /* starting W (2.30) */
+ INT64 ds1dx, dt1dx; /* delta S,T per X */
+ INT64 dw1dx; /* delta W per X */
+ INT64 ds1dy, dt1dy; /* delta S,T per Y */
+ INT64 dw1dy; /* delta W per Y */
+ INT32 lodbase1; /* used during rasterization */
+
+ UINT16 dither[16]; /* dither matrix, for fastfill */
+};
+
+
+struct banshee_info
+{
+ UINT32 io[0x40]; /* I/O registers */
+ UINT32 agp[0x80]; /* AGP registers */
+ UINT8 vga[0x20]; /* VGA registers */
+ UINT8 crtc[0x27]; /* VGA CRTC registers */
+ UINT8 seq[0x05]; /* VGA sequencer registers */
+ UINT8 gc[0x05]; /* VGA graphics controller registers */
+ UINT8 att[0x15]; /* VGA attribute registers */
+ UINT8 attff; /* VGA attribute flip-flop */
+
+ UINT32 blt_regs[0x20]; /* 2D Blitter registers */
+ UINT32 blt_dst_base;
+ UINT32 blt_dst_x;
+ UINT32 blt_dst_y;
+ UINT32 blt_dst_width;
+ UINT32 blt_dst_height;
+ UINT32 blt_dst_stride;
+ UINT32 blt_dst_bpp;
+ UINT32 blt_cmd;
+ UINT32 blt_src_base;
+ UINT32 blt_src_x;
+ UINT32 blt_src_y;
+ UINT32 blt_src_width;
+ UINT32 blt_src_height;
+ UINT32 blt_src_stride;
+ UINT32 blt_src_bpp;
+};
+
+
+struct voodoo_state
+{
+ UINT8 index; /* index of board */
+ voodoo_device *device; /* pointer to our containing device */
+ screen_device *screen; /* the screen we are acting on */
+ device_t *cpu; /* the CPU we interact with */
+ UINT8 type; /* type of system */
+ UINT8 chipmask; /* mask for which chips are available */
+ UINT32 freq; /* operating frequency */
+ attoseconds_t attoseconds_per_cycle; /* attoseconds per cycle */
+ UINT32 extra_cycles; /* extra cycles not yet accounted for */
+ int trigger; /* trigger used for stalling */
+
+ voodoo_reg reg[0x400]; /* raw registers */
+ const UINT8 * regaccess; /* register access array */
+ const char *const * regnames; /* register names array */
+ UINT8 alt_regmap; /* enable alternate register map? */
+
+ pci_state pci; /* PCI state */
+ dac_state dac; /* DAC state */
+
+ fbi_state fbi; /* FBI states */
+ tmu_state tmu[MAX_TMU]; /* TMU states */
+ tmu_shared_state tmushare; /* TMU shared state */
+ banshee_info banshee; /* Banshee state */
+
+ legacy_poly_manager * poly; /* polygon manager */
+ stats_block * thread_stats; /* per-thread statistics */
+
+ voodoo_stats stats; /* internal statistics */
+
+ offs_t last_status_pc; /* PC of last status description (for logging) */
+ UINT32 last_status_value; /* value of last status read (for logging) */
+
+ int next_rasterizer; /* next rasterizer index */
+ raster_info rasterizer[MAX_RASTERIZERS]; /* array of rasterizers */
+ raster_info * raster_hash[RASTER_HASH_SIZE]; /* hash table of rasterizers */
+
+ bool send_config;
+ UINT32 tmu_config;
+};
@@ -631,16 +2345,16 @@ do
} \
while (0)
-static inline bool ATTR_FORCE_INLINE chromaKeyTest(voodoo_device *vd, stats_block *stats, UINT32 fbzModeReg, rgbaint_t rgbaIntColor)
+static inline bool ATTR_FORCE_INLINE chromaKeyTest(voodoo_state *v, stats_block *stats, UINT32 fbzModeReg, rgbaint_t rgbaIntColor)
{
if (FBZMODE_ENABLE_CHROMAKEY(fbzModeReg))
{
rgb_union color;
color.u = (rgbaIntColor.get_a()<<24) | (rgbaIntColor.get_r()<<16) | (rgbaIntColor.get_g()<<8) | rgbaIntColor.get_b();
/* non-range version */
- if (!CHROMARANGE_ENABLE(vd->reg[chromaRange].u))
+ if (!CHROMARANGE_ENABLE(v->reg[chromaRange].u))
{
- if (((color.u ^ vd->reg[chromaKey].u) & 0xffffff) == 0)
+ if (((color.u ^ v->reg[chromaKey].u) & 0xffffff) == 0)
{
stats->chroma_fail++;
return false;
@@ -654,30 +2368,30 @@ static inline bool ATTR_FORCE_INLINE chromaKeyTest(voodoo_device *vd, stats_bloc
int results;
/* check blue */
- low = vd->reg[chromaKey].rgb.b;
- high = vd->reg[chromaRange].rgb.b;
+ low = v->reg[chromaKey].rgb.b;
+ high = v->reg[chromaRange].rgb.b;
test = color.rgb.b;
results = (test >= low && test <= high);
- results ^= CHROMARANGE_BLUE_EXCLUSIVE(vd->reg[chromaRange].u);
+ results ^= CHROMARANGE_BLUE_EXCLUSIVE(v->reg[chromaRange].u);
results <<= 1;
/* check green */
- low = vd->reg[chromaKey].rgb.g;
- high = vd->reg[chromaRange].rgb.g;
+ low = v->reg[chromaKey].rgb.g;
+ high = v->reg[chromaRange].rgb.g;
test = color.rgb.g;
results |= (test >= low && test <= high);
- results ^= CHROMARANGE_GREEN_EXCLUSIVE(vd->reg[chromaRange].u);
+ results ^= CHROMARANGE_GREEN_EXCLUSIVE(v->reg[chromaRange].u);
results <<= 1;
/* check red */
- low = vd->reg[chromaKey].rgb.r;
- high = vd->reg[chromaRange].rgb.r;
+ low = v->reg[chromaKey].rgb.r;
+ high = v->reg[chromaRange].rgb.r;
test = color.rgb.r;
results |= (test >= low && test <= high);
- results ^= CHROMARANGE_RED_EXCLUSIVE(vd->reg[chromaRange].u);
+ results ^= CHROMARANGE_RED_EXCLUSIVE(v->reg[chromaRange].u);
/* final result */
- if (CHROMARANGE_UNION_MODE(vd->reg[chromaRange].u))
+ if (CHROMARANGE_UNION_MODE(v->reg[chromaRange].u))
{
if (results != 0)
{
@@ -806,11 +2520,11 @@ do
} \
while (0)
-static inline bool ATTR_FORCE_INLINE alphaTest(voodoo_device *vd, stats_block *stats, UINT32 alphaModeReg, UINT8 alpha)
+static inline bool ATTR_FORCE_INLINE alphaTest(voodoo_state *v, stats_block *stats, UINT32 alphaModeReg, UINT8 alpha)
{
if (ALPHAMODE_ALPHATEST(alphaModeReg))
{
- UINT8 alpharef = vd->reg[alphaMode].rgb.a;
+ UINT8 alpharef = v->reg[alphaMode].rgb.a;
switch (ALPHAMODE_ALPHAFUNCTION(alphaModeReg))
{
case 0: /* alphaOP = never */
@@ -1353,7 +3067,7 @@ do
} \
while (0)
-static inline void ATTR_FORCE_INLINE applyFogging(voodoo_device *vd, UINT32 fogModeReg, UINT32 fbzCpReg, INT32 x, const UINT8 *dither4, INT32 fogDepth,
+static inline void ATTR_FORCE_INLINE applyFogging(voodoo_state *v, UINT32 fogModeReg, UINT32 fbzCpReg, INT32 x, const UINT8 *dither4, INT32 fogDepth,
rgbaint_t &color, INT32 iterz, INT64 iterw, UINT8 itera)
{
if (FOGMODE_ENABLE_FOG(fogModeReg))
@@ -1361,7 +3075,7 @@ static inline void ATTR_FORCE_INLINE applyFogging(voodoo_device *vd, UINT32 fogM
UINT32 color_alpha = color.get_a();
/* constant fog bypasses everything else */
- rgbaint_t fogColorLocal(vd->reg[fogColor].u);
+ rgbaint_t fogColorLocal(v->reg[fogColor].u);
if (FOGMODE_FOG_CONSTANT(fogModeReg))
{
@@ -1405,11 +3119,11 @@ static inline void ATTR_FORCE_INLINE applyFogging(voodoo_device *vd, UINT32 fogM
{
case 0: /* fog table */
{
- INT32 delta = vd->fbi.fogdelta[fogDepth >> 10];
+ INT32 delta = v->fbi.fogdelta[fogDepth >> 10];
INT32 deltaval;
/* perform the multiply against lower 8 bits of wfloat */
- deltaval = (delta & vd->fbi.fogdelta_mask) *
+ deltaval = (delta & v->fbi.fogdelta_mask) *
((fogDepth >> 2) & 0xff);
/* fog zones allow for negating this value */
@@ -1423,7 +3137,7 @@ static inline void ATTR_FORCE_INLINE applyFogging(voodoo_device *vd, UINT32 fogM
deltaval >>= 4;
/* add to the blending factor */
- fogblend = vd->fbi.fogblend[fogDepth >> 10] + deltaval;
+ fogblend = v->fbi.fogblend[fogDepth >> 10] + deltaval;
break;
}
@@ -1828,7 +3542,7 @@ while (0)
*
*************************************/
-#define PIXEL_PIPELINE_BEGIN(vd, STATS, XX, YY, FBZCOLORPATH, FBZMODE, ITERZ, ITERW) \
+#define PIXEL_PIPELINE_BEGIN(VV, STATS, XX, YY, FBZCOLORPATH, FBZMODE, ITERZ, ITERW) \
do \
{ \
INT32 depthval, wfloat, fogdepth, biasdepth; \
@@ -1845,10 +3559,10 @@ do
/* rotate mode */ \
if (FBZMODE_STIPPLE_PATTERN(FBZMODE) == 0) \
{ \
- vd->reg[stipple].u = (vd->reg[stipple].u << 1) | (vd->reg[stipple].u >> 31);\
- if ((vd->reg[stipple].u & 0x80000000) == 0) \
+ (VV)->reg[stipple].u = ((VV)->reg[stipple].u << 1) | ((VV)->reg[stipple].u >> 31);\
+ if (((VV)->reg[stipple].u & 0x80000000) == 0) \
{ \
- vd->stats.total_stippled++; \
+ (VV)->stats.total_stippled++; \
goto skipdrawdepth; \
} \
} \
@@ -1857,9 +3571,9 @@ do
else \
{ \
int stipple_index = (((YY) & 3) << 3) | (~(XX) & 7); \
- if (((vd->reg[stipple].u >> stipple_index) & 1) == 0) \
+ if ((((VV)->reg[stipple].u >> stipple_index) & 1) == 0) \
{ \
- vd->stats.total_stippled++; \
+ (VV)->stats.total_stippled++; \
goto skipdrawdepth; \
} \
} \
@@ -1883,7 +3597,7 @@ do
/* add the bias for fog selection*/ \
if (FBZMODE_ENABLE_DEPTH_BIAS(FBZMODE)) \
{ \
- fogdepth += (INT16)vd->reg[zaColor].u; \
+ fogdepth += (INT16)(VV)->reg[zaColor].u; \
CLAMP(fogdepth, 0, 0xffff); \
} \
\
@@ -1914,12 +3628,12 @@ do
biasdepth = depthval; \
if (FBZMODE_ENABLE_DEPTH_BIAS(FBZMODE)) \
{ \
- biasdepth += (INT16)vd->reg[zaColor].u; \
+ biasdepth += (INT16)(VV)->reg[zaColor].u; \
CLAMP(biasdepth, 0, 0xffff); \
}
-#define DEPTH_TEST(vd, STATS, XX, FBZMODE) \
+#define DEPTH_TEST(VV, STATS, XX, FBZMODE) \
do \
{ \
/* handle depth buffer testing */ \
@@ -1932,7 +3646,7 @@ do
if (FBZMODE_DEPTH_SOURCE_COMPARE(FBZMODE) == 0) \
depthsource = biasdepth; \
else \
- depthsource = (UINT16)vd->reg[zaColor].u; \
+ depthsource = (UINT16)(VV)->reg[zaColor].u; \
\
/* test against the depth buffer */ \
switch (FBZMODE_DEPTH_FUNCTION(FBZMODE)) \
@@ -2072,11 +3786,11 @@ static inline bool ATTR_FORCE_INLINE depthTest(UINT16 zaColorReg, stats_block *s
return true;
}
-#define PIXEL_PIPELINE_END(vd, STATS, DITHER, DITHER4, DITHER_LOOKUP, XX, dest, depth, FBZMODE, FBZCOLORPATH, ALPHAMODE, FOGMODE, ITERZ, ITERW, ITERAXXX) \
+#define PIXEL_PIPELINE_END(VV, STATS, DITHER, DITHER4, DITHER_LOOKUP, XX, dest, depth, FBZMODE, FBZCOLORPATH, ALPHAMODE, FOGMODE, ITERZ, ITERW, ITERAXXX) \
\
/* perform fogging */ \
preFog.set(color); \
- applyFogging(vd, FOGMODE, FBZCOLORPATH, XX, DITHER4, fogdepth, color, ITERZ, ITERW, ITERAXXX.get_a()); \
+ applyFogging(VV, FOGMODE, FBZCOLORPATH, XX, DITHER4, fogdepth, color, ITERZ, ITERW, ITERAXXX.get_a()); \
/* perform alpha blending */ \
alphaBlend(FBZMODE, ALPHAMODE, XX, DITHER, dest[XX], depth, preFog, color); \
a = color.get_a(); r = color.get_r(); g = color.get_g(); b = color.get_b(); \
@@ -2407,7 +4121,7 @@ do
} \
while (0)
-static inline bool ATTR_FORCE_INLINE combineColor(voodoo_device *vd, stats_block *STATS, UINT32 FBZCOLORPATH, UINT32 FBZMODE, UINT32 ALPHAMODE,
+static inline bool ATTR_FORCE_INLINE combineColor(voodoo_state *VV, stats_block *STATS, UINT32 FBZCOLORPATH, UINT32 FBZMODE, UINT32 ALPHAMODE,
rgbaint_t TEXELARGB, INT32 ITERZ, INT64 ITERW, rgbaint_t &srcColor)
{
rgbaint_t c_other;
@@ -2425,7 +4139,7 @@ static inline bool ATTR_FORCE_INLINE combineColor(voodoo_device *vd, stats_block
break;
case 2: /* color1 RGB */
- c_other.set(vd->reg[color1].u);
+ c_other.set((VV)->reg[color1].u);
break;
default: /* reserved - voodoo3 framebufferRGB */
@@ -2434,9 +4148,9 @@ static inline bool ATTR_FORCE_INLINE combineColor(voodoo_device *vd, stats_block
}
/* handle chroma key */
- if (!chromaKeyTest(vd, STATS, FBZMODE, c_other))
+ if (!chromaKeyTest(VV, STATS, FBZMODE, c_other))
return false;
- //APPLY_CHROMAKEY(vd->m_vds, STATS, FBZMODE, c_other);
+ //APPLY_CHROMAKEY(VV, STATS, FBZMODE, c_other);
/* compute a_other */
switch (FBZCP_CC_ASELECT(FBZCOLORPATH))
@@ -2450,7 +4164,7 @@ static inline bool ATTR_FORCE_INLINE combineColor(voodoo_device *vd, stats_block
break;
case 2: /* color1 alpha */
- c_other.set_a(vd->reg[color1].rgb.a);
+ c_other.set_a((VV)->reg[color1].rgb.a);
break;
default: /* reserved */
@@ -2461,7 +4175,7 @@ static inline bool ATTR_FORCE_INLINE combineColor(voodoo_device *vd, stats_block
/* handle alpha mask */
if (!alphaMaskTest(STATS, FBZMODE, c_other.get_a()))
return false;
- //APPLY_ALPHAMASK(vd->m_vds, STATS, FBZMODE, c_other.rgb.a);
+ //APPLY_ALPHAMASK(VV, STATS, FBZMODE, c_other.rgb.a);
/* compute c_local */
@@ -2470,14 +4184,14 @@ static inline bool ATTR_FORCE_INLINE combineColor(voodoo_device *vd, stats_block
if (FBZCP_CC_LOCALSELECT(FBZCOLORPATH) == 0) /* iterated RGB */
c_local.set(srcColor);
else /* color0 RGB */
- c_local.set(vd->reg[color0].u);
+ c_local.set((VV)->reg[color0].u);
}
else
{
if (!(TEXELARGB.get_a() & 0x80)) /* iterated RGB */
c_local.set(srcColor);
else /* color0 RGB */
- c_local.set(vd->reg[color0].u);
+ c_local.set((VV)->reg[color0].u);
}
/* compute a_local */
@@ -2489,7 +4203,7 @@ static inline bool ATTR_FORCE_INLINE combineColor(voodoo_device *vd, stats_block
break;
case 1: /* color0 alpha */
- c_local.set_a(vd->reg[color0].rgb.a);
+ c_local.set_a((VV)->reg[color0].rgb.a);
break;
case 2: /* clamped iterated Z[27:20] */
@@ -2641,9 +4355,9 @@ static inline bool ATTR_FORCE_INLINE combineColor(voodoo_device *vd, stats_block
/* handle alpha test */
- if (!alphaTest(vd, STATS, ALPHAMODE, srcColor.get_a()))
+ if (!alphaTest(VV, STATS, ALPHAMODE, srcColor.get_a()))
return false;
- //APPLY_ALPHATEST(vd->m_vds, STATS, ALPHAMODE, color.rgb.a);
+ //APPLY_ALPHATEST(VV, STATS, ALPHAMODE, color.rgb.a);
return true;
}
@@ -2658,11 +4372,11 @@ static inline bool ATTR_FORCE_INLINE combineColor(voodoo_device *vd, stats_block
#define RASTERIZER(name, TMUS, FBZCOLORPATH, FBZMODE, ALPHAMODE, FOGMODE, TEXMODE0, TEXMODE1) \
\
-void voodoo_device::raster_##name(void *destbase, INT32 y, const poly_extent *extent, const void *extradata, int threadid) \
+static void raster_##name(void *destbase, INT32 y, const poly_extent *extent, const void *extradata, int threadid) \
{ \
const poly_extra_data *extra = (const poly_extra_data *)extradata; \
- voodoo_device *vd = extra->device; \
- stats_block *stats = &vd->thread_stats[threadid]; \
+ voodoo_state *v = extra->state; \
+ stats_block *stats = &v->thread_stats[threadid]; \
DECLARE_DITHER_POINTERS; \
INT32 startx = extent->startx; \
INT32 stopx = extent->stopx; \
@@ -2680,7 +4394,7 @@ void voodoo_device::raster_##name(void *destbase, INT32 y, const poly_extent *ex
/* determine the screen Y */ \
scry = y; \
if (FBZMODE_Y_ORIGIN(FBZMODE)) \
- scry = (vd->fbi.yorigin - y) & 0x3ff; \
+ scry = (v->fbi.yorigin - y) & 0x3ff; \
\
/* compute dithering */ \
COMPUTE_DITHER_POINTERS(FBZMODE, y); \
@@ -2691,8 +4405,8 @@ void voodoo_device::raster_##name(void *destbase, INT32 y, const poly_extent *ex
INT32 tempclip; \
\
/* Y clipping buys us the whole scanline */ \
- if (scry < ((vd->reg[clipLowYHighY].u >> 16) & 0x3ff) || \
- scry >= (vd->reg[clipLowYHighY].u & 0x3ff)) \
+ if (scry < ((v->reg[clipLowYHighY].u >> 16) & 0x3ff) || \
+ scry >= (v->reg[clipLowYHighY].u & 0x3ff)) \
{ \
stats->pixels_in += stopx - startx; \
stats->clip_fail += stopx - startx; \
@@ -2700,25 +4414,25 @@ void voodoo_device::raster_##name(void *destbase, INT32 y, const poly_extent *ex
} \
\
/* X clipping */ \
- tempclip = (vd->reg[clipLeftRight].u >> 16) & 0x3ff; \
+ tempclip = (v->reg[clipLeftRight].u >> 16) & 0x3ff; \
if (startx < tempclip) \
{ \
stats->pixels_in += tempclip - startx; \
- vd->stats.total_clipped += tempclip - startx; \
+ v->stats.total_clipped += tempclip - startx; \
startx = tempclip; \
} \
- tempclip = vd->reg[clipLeftRight].u & 0x3ff; \
+ tempclip = v->reg[clipLeftRight].u & 0x3ff; \
if (stopx >= tempclip) \
{ \
stats->pixels_in += stopx - tempclip; \
- vd->stats.total_clipped += stopx - tempclip; \
+ v->stats.total_clipped += stopx - tempclip; \
stopx = tempclip - 1; \
} \
} \
\
/* get pointers to the target buffer and depth buffer */ \
- dest = (UINT16 *)destbase + scry * vd->fbi.rowpixels; \
- depth = (vd->fbi.auxoffs != ~0) ? ((UINT16 *)(vd->fbi.ram + vd->fbi.auxoffs) + scry * vd->fbi.rowpixels) : NULL; \
+ dest = (UINT16 *)destbase + scry * v->fbi.rowpixels; \
+ depth = (v->fbi.auxoffs != ~0) ? ((UINT16 *)(v->fbi.ram + v->fbi.auxoffs) + scry * v->fbi.rowpixels) : NULL; \
\
/* compute the starting parameters */ \
dx = startx - (extra->ax >> 4); \
@@ -2751,46 +4465,46 @@ void voodoo_device::raster_##name(void *destbase, INT32 y, const poly_extent *ex
rgbaint_t color, preFog; \
\
/* pixel pipeline part 1 handles depth setup and stippling */ \
- PIXEL_PIPELINE_BEGIN(vd, stats, x, y, FBZCOLORPATH, FBZMODE, iterz, iterw); \
+ PIXEL_PIPELINE_BEGIN(v, stats, x, y, FBZCOLORPATH, FBZMODE, iterz, iterw); \
/* depth testing */ \
- if (!depthTest((UINT16) vd->reg[zaColor].u, stats, depth[x], FBZMODE, biasdepth)) \
+ if (!depthTest((UINT16) v->reg[zaColor].u, stats, depth[x], FBZMODE, biasdepth)) \
goto skipdrawdepth; \
\
/* run the texture pipeline on TMU1 to produce a value in texel */ \
/* note that they set LOD min to 8 to "disable" a TMU */ \
- if (TMUS >= 2 && vd->tmu[1].lodmin < (8 << 8)) { \
+ if (TMUS >= 2 && v->tmu[1].lodmin < (8 << 8)) { \
INT32 tmp; \
const rgbaint_t texelZero(0); \
- texel = genTexture(&vd->tmu[1], x, dither4, TEXMODE1, vd->tmu[1].lookup, extra->lodbase1, \
+ texel = genTexture(&v->tmu[1], x, dither4, TEXMODE1, v->tmu[1].lookup, extra->lodbase1, \
iters1, itert1, iterw1, tmp); \
- texel = combineTexture(&vd->tmu[1], TEXMODE1, texel, texelZero, tmp); \
+ texel = combineTexture(&v->tmu[1], TEXMODE1, texel, texelZero, tmp); \
} \
/* run the texture pipeline on TMU0 to produce a final */ \
/* result in texel */ \
/* note that they set LOD min to 8 to "disable" a TMU */ \
- if (TMUS >= 1 && vd->tmu[0].lodmin < (8 << 8)) \
+ if (TMUS >= 1 && v->tmu[0].lodmin < (8 << 8)) \
{ \
- if (!vd->send_config) \
+ if (!v->send_config) \
{ \
INT32 lod0; \
rgbaint_t texelT0; \
- texelT0 = genTexture(&vd->tmu[0], x, dither4, TEXMODE0, vd->tmu[0].lookup, extra->lodbase0, \
+ texelT0 = genTexture(&v->tmu[0], x, dither4, TEXMODE0, v->tmu[0].lookup, extra->lodbase0, \
iters0, itert0, iterw0, lod0); \
- texel = combineTexture(&vd->tmu[0], TEXMODE0, texelT0, texel, lod0); \
+ texel = combineTexture(&v->tmu[0], TEXMODE0, texelT0, texel, lod0); \
} \
else \
{ \
- texel.set(vd->tmu_config); \
+ texel.set(v->tmu_config); \
} \
} \
\
/* colorpath pipeline selects source colors and does blending */ \
color = clampARGB(iterargb, FBZCOLORPATH); \
- if (!combineColor(vd, stats, FBZCOLORPATH, FBZMODE, ALPHAMODE, texel, iterz, iterw, color)) \
+ if (!combineColor(v, stats, FBZCOLORPATH, FBZMODE, ALPHAMODE, texel, iterz, iterw, color)) \
goto skipdrawdepth; \
\
/* pixel pipeline part 2 handles fog, alpha, and final output */ \
- PIXEL_PIPELINE_END(vd, stats, dither, dither4, dither_lookup, x, dest, depth, \
+ PIXEL_PIPELINE_END(v, stats, dither, dither4, dither_lookup, x, dest, depth, \
FBZMODE, FBZCOLORPATH, ALPHAMODE, FOGMODE, \
iterz, iterw, iterargb); \
\
diff --git a/src/devices/video/voodoo.cpp b/src/devices/video/voodoo.cpp
index 7fe0b94a007..4304b5ebf32 100644
--- a/src/devices/video/voodoo.cpp
+++ b/src/devices/video/voodoo.cpp
@@ -143,7 +143,7 @@ bits(7:4) and bit(24)), X, and Y:
#include "emu.h"
-
+#include "video/polylgcy.h"
#include "video/rgbutil.h"
#include "voodoo.h"
#include "vooddefs.h"
@@ -194,6 +194,50 @@ UINT32 voodoo_reciplog[(2 << RECIPLOG_LOOKUP_BITS) + 2];
+/*************************************
+ *
+ * Prototypes
+ *
+ *************************************/
+
+static void init_fbi(voodoo_state *v, fbi_state *f, void *memory, int fbmem);
+static void init_tmu_shared(tmu_shared_state *s);
+static void init_tmu(voodoo_state *v, tmu_state *t, voodoo_reg *reg, void *memory, int tmem);
+static void soft_reset(voodoo_state *v);
+static void recompute_video_memory(voodoo_state *v);
+static void check_stalled_cpu(voodoo_state *v, attotime current_time);
+static void flush_fifos(voodoo_state *v, attotime current_time);
+static TIMER_CALLBACK( stall_cpu_callback );
+static void stall_cpu(voodoo_state *v, int state, attotime current_time);
+static TIMER_CALLBACK( vblank_callback );
+static INT32 register_w(voodoo_state *v, offs_t offset, UINT32 data);
+static INT32 lfb_direct_w(voodoo_state *v, offs_t offset, UINT32 data, UINT32 mem_mask);
+static INT32 lfb_w(voodoo_state *v, offs_t offset, UINT32 data, UINT32 mem_mask);
+static INT32 texture_w(voodoo_state *v, offs_t offset, UINT32 data);
+static INT32 banshee_2d_w(voodoo_state *v, offs_t offset, UINT32 data);
+
+/* command handlers */
+static INT32 fastfill(voodoo_state *v);
+static INT32 swapbuffer(voodoo_state *v, UINT32 data);
+static INT32 triangle(voodoo_state *v);
+static INT32 begin_triangle(voodoo_state *v);
+static INT32 draw_triangle(voodoo_state *v);
+
+/* triangle helpers */
+static INT32 setup_and_draw_triangle(voodoo_state *v);
+static INT32 triangle_create_work_item(voodoo_state *v, UINT16 *drawbuf, int texcount);
+
+/* rasterizer management */
+static raster_info *add_rasterizer(voodoo_state *v, const raster_info *cinfo);
+static raster_info *find_rasterizer(voodoo_state *v, int texcount);
+static void dump_rasterizer_stats(voodoo_state *v);
+
+/* generic rasterizers */
+static void raster_fastfill(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid);
+static void raster_generic_0tmu(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid);
+static void raster_generic_1tmu(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid);
+static void raster_generic_2tmu(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid);
+
/*************************************
@@ -218,7 +262,7 @@ UINT32 voodoo_reciplog[(2 << RECIPLOG_LOOKUP_BITS) + 2];
*************************************/
#define RASTERIZER_ENTRY(fbzcp, alpha, fog, fbz, tex0, tex1) \
- { NULL, voodoo_device::raster_##fbzcp##_##alpha##_##fog##_##fbz##_##tex0##_##tex1, FALSE, 0, 0, 0, fbzcp, alpha, fog, fbz, tex0, tex1 },
+ { NULL, raster_##fbzcp##_##alpha##_##fog##_##fbz##_##tex0##_##tex1, FALSE, 0, 0, 0, fbzcp, alpha, fog, fbz, tex0, tex1 },
static const raster_info predef_raster_table[] =
{
@@ -234,84 +278,100 @@ static const raster_info predef_raster_table[] =
INLINE FUNCTIONS
***************************************************************************/
+/*-------------------------------------------------
+ get_safe_token - makes sure that the passed
+ in device is, in fact, a voodoo device
+-------------------------------------------------*/
+
+static inline voodoo_state *get_safe_token(device_t *device)
+{
+ assert(device != nullptr);
+ assert((device->type() == VOODOO_1) || (device->type() == VOODOO_2) || (device->type() == VOODOO_BANSHEE) || (device->type() == VOODOO_3));
+
+ return (voodoo_state *)downcast<voodoo_device *>(device)->token();
+}
+
+
+
/*************************************
*
* Video update
*
*************************************/
-int voodoo_device::voodoo_update(bitmap_rgb32 &bitmap, const rectangle &cliprect)
+int voodoo_update(device_t *device, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- int changed = fbi.video_changed;
- int drawbuf = fbi.frontbuf;
+ voodoo_state *v = get_safe_token(device);
+ int changed = v->fbi.video_changed;
+ int drawbuf = v->fbi.frontbuf;
int statskey;
int x, y;
/* reset the video changed flag */
- fbi.video_changed = FALSE;
+ v->fbi.video_changed = FALSE;
/* if we are blank, just fill with black */
- if (vd_type <= TYPE_VOODOO_2 && FBIINIT1_SOFTWARE_BLANK(reg[fbiInit1].u))
+ if (v->type <= TYPE_VOODOO_2 && FBIINIT1_SOFTWARE_BLANK(v->reg[fbiInit1].u))
{
bitmap.fill(0, cliprect);
return changed;
}
/* if the CLUT is dirty, recompute the pens array */
- if (fbi.clut_dirty)
+ if (v->fbi.clut_dirty)
{
UINT8 rtable[32], gtable[64], btable[32];
/* Voodoo/Voodoo-2 have an internal 33-entry CLUT */
- if (vd_type <= TYPE_VOODOO_2)
+ if (v->type <= TYPE_VOODOO_2)
{
/* kludge: some of the Midway games write 0 to the last entry when they obviously mean FF */
- if ((fbi.clut[32] & 0xffffff) == 0 && (fbi.clut[31] & 0xffffff) != 0)
- fbi.clut[32] = 0x20ffffff;
+ if ((v->fbi.clut[32] & 0xffffff) == 0 && (v->fbi.clut[31] & 0xffffff) != 0)
+ v->fbi.clut[32] = 0x20ffffff;
/* compute the R/G/B pens first */
for (x = 0; x < 32; x++)
{
/* treat X as a 5-bit value, scale up to 8 bits, and linear interpolate for red/blue */
y = (x << 3) | (x >> 2);
- rtable[x] = (fbi.clut[y >> 3].r() * (8 - (y & 7)) + fbi.clut[(y >> 3) + 1].r() * (y & 7)) >> 3;
- btable[x] = (fbi.clut[y >> 3].b() * (8 - (y & 7)) + fbi.clut[(y >> 3) + 1].b() * (y & 7)) >> 3;
+ rtable[x] = (v->fbi.clut[y >> 3].r() * (8 - (y & 7)) + v->fbi.clut[(y >> 3) + 1].r() * (y & 7)) >> 3;
+ btable[x] = (v->fbi.clut[y >> 3].b() * (8 - (y & 7)) + v->fbi.clut[(y >> 3) + 1].b() * (y & 7)) >> 3;
/* treat X as a 6-bit value with LSB=0, scale up to 8 bits, and linear interpolate */
y = (x * 2) + 0;
y = (y << 2) | (y >> 4);
- gtable[x*2+0] = (fbi.clut[y >> 3].g() * (8 - (y & 7)) + fbi.clut[(y >> 3) + 1].g() * (y & 7)) >> 3;
+ gtable[x*2+0] = (v->fbi.clut[y >> 3].g() * (8 - (y & 7)) + v->fbi.clut[(y >> 3) + 1].g() * (y & 7)) >> 3;
/* treat X as a 6-bit value with LSB=1, scale up to 8 bits, and linear interpolate */
y = (x * 2) + 1;
y = (y << 2) | (y >> 4);
- gtable[x*2+1] = (fbi.clut[y >> 3].g() * (8 - (y & 7)) + fbi.clut[(y >> 3) + 1].g() * (y & 7)) >> 3;
+ gtable[x*2+1] = (v->fbi.clut[y >> 3].g() * (8 - (y & 7)) + v->fbi.clut[(y >> 3) + 1].g() * (y & 7)) >> 3;
}
}
/* Banshee and later have a 512-entry CLUT that can be bypassed */
else
{
- int which = (banshee.io[io_vidProcCfg] >> 13) & 1;
- int bypass = (banshee.io[io_vidProcCfg] >> 11) & 1;
+ int which = (v->banshee.io[io_vidProcCfg] >> 13) & 1;
+ int bypass = (v->banshee.io[io_vidProcCfg] >> 11) & 1;
/* compute R/G/B pens first */
for (x = 0; x < 32; x++)
{
/* treat X as a 5-bit value, scale up to 8 bits */
y = (x << 3) | (x >> 2);
- rtable[x] = bypass ? y : fbi.clut[which * 256 + y].r();
- btable[x] = bypass ? y : fbi.clut[which * 256 + y].b();
+ rtable[x] = bypass ? y : v->fbi.clut[which * 256 + y].r();
+ btable[x] = bypass ? y : v->fbi.clut[which * 256 + y].b();
/* treat X as a 6-bit value with LSB=0, scale up to 8 bits */
y = (x * 2) + 0;
y = (y << 2) | (y >> 4);
- gtable[x*2+0] = bypass ? y : fbi.clut[which * 256 + y].g();
+ gtable[x*2+0] = bypass ? y : v->fbi.clut[which * 256 + y].g();
/* treat X as a 6-bit value with LSB=1, scale up to 8 bits, and linear interpolate */
y = (x * 2) + 1;
y = (y << 2) | (y >> 4);
- gtable[x*2+1] = bypass ? y : fbi.clut[which * 256 + y].g();
+ gtable[x*2+1] = bypass ? y : v->fbi.clut[which * 256 + y].g();
}
}
@@ -321,45 +381,45 @@ int voodoo_device::voodoo_update(bitmap_rgb32 &bitmap, const rectangle &cliprect
int r = rtable[(x >> 11) & 0x1f];
int g = gtable[(x >> 5) & 0x3f];
int b = btable[x & 0x1f];
- fbi.pen[x] = rgb_t(r, g, b);
+ v->fbi.pen[x] = rgb_t(r, g, b);
}
/* no longer dirty */
- fbi.clut_dirty = FALSE;
+ v->fbi.clut_dirty = FALSE;
changed = TRUE;
}
/* debugging! */
- if (machine().input().code_pressed(KEYCODE_L))
- drawbuf = fbi.backbuf;
+ if (device->machine().input().code_pressed(KEYCODE_L))
+ drawbuf = v->fbi.backbuf;
/* copy from the current front buffer */
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
- if (y >= fbi.yoffs)
+ if (y >= v->fbi.yoffs)
{
- UINT16 *src = (UINT16 *)(fbi.ram + fbi.rgboffs[drawbuf]) + (y - fbi.yoffs) * fbi.rowpixels - fbi.xoffs;
+ UINT16 *src = (UINT16 *)(v->fbi.ram + v->fbi.rgboffs[drawbuf]) + (y - v->fbi.yoffs) * v->fbi.rowpixels - v->fbi.xoffs;
UINT32 *dst = &bitmap.pix32(y);
for (x = cliprect.min_x; x <= cliprect.max_x; x++)
- dst[x] = fbi.pen[src[x]];
+ dst[x] = v->fbi.pen[src[x]];
}
/* update stats display */
- statskey = (machine().input().code_pressed(KEYCODE_BACKSLASH) != 0);
- if (statskey && statskey != stats.lastkey)
- stats.display = !stats.display;
- stats.lastkey = statskey;
+ statskey = (device->machine().input().code_pressed(KEYCODE_BACKSLASH) != 0);
+ if (statskey && statskey != v->stats.lastkey)
+ v->stats.display = !v->stats.display;
+ v->stats.lastkey = statskey;
/* display stats */
- if (stats.display)
- popmessage(stats.buffer, 0, 0);
+ if (v->stats.display)
+ device->popmessage(v->stats.buffer, 0, 0);
/* update render override */
- stats.render_override = machine().input().code_pressed(KEYCODE_ENTER);
- if (DEBUG_DEPTH && stats.render_override)
+ v->stats.render_override = device->machine().input().code_pressed(KEYCODE_ENTER);
+ if (DEBUG_DEPTH && v->stats.render_override)
{
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
{
- UINT16 *src = (UINT16 *)(fbi.ram + fbi.auxoffs) + (y - fbi.yoffs) * fbi.rowpixels - fbi.xoffs;
+ UINT16 *src = (UINT16 *)(v->fbi.ram + v->fbi.auxoffs) + (y - v->fbi.yoffs) * v->fbi.rowpixels - v->fbi.xoffs;
UINT32 *dst = &bitmap.pix32(y);
for (x = cliprect.min_x; x <= cliprect.max_x; x++)
dst[x] = ((src[x] << 8) & 0xff0000) | ((src[x] >> 0) & 0xff00) | ((src[x] >> 8) & 0xff);
@@ -376,27 +436,26 @@ int voodoo_device::voodoo_update(bitmap_rgb32 &bitmap, const rectangle &cliprect
*
*************************************/
-
-int voodoo_device::voodoo_get_type()
+int voodoo_get_type(device_t *device)
{
- voodoo_device *vd = this;
- return vd->vd_type;
+ voodoo_state *v = get_safe_token(device);
+ return v->type;
}
-int voodoo_device::voodoo_is_stalled()
+int voodoo_is_stalled(device_t *device)
{
- voodoo_device *vd = this;
- return (vd->pci.stall_state != NOT_STALLED);
+ voodoo_state *v = get_safe_token(device);
+ return (v->pci.stall_state != NOT_STALLED);
}
-void voodoo_device::voodoo_set_init_enable(UINT32 newval)
+void voodoo_set_init_enable(device_t *device, UINT32 newval)
{
- voodoo_device *vd = this;
- vd->pci.init_enable = newval;
+ voodoo_state *v = get_safe_token(device);
+ v->pci.init_enable = newval;
if (LOG_REGISTERS)
- logerror("VOODOO.%d.REG:initEnable write = %08X\n", vd->index, newval);
+ device->logerror("VOODOO.%d.REG:initEnable write = %08X\n", v->index, newval);
}
@@ -407,7 +466,7 @@ void voodoo_device::voodoo_set_init_enable(UINT32 newval)
*
*************************************/
-void voodoo_device::init_fbi(voodoo_device* vd,fbi_state *f, void *memory, int fbmem)
+static void init_fbi(voodoo_state *v, fbi_state *f, void *memory, int fbmem)
{
int pen;
@@ -425,20 +484,20 @@ void voodoo_device::init_fbi(voodoo_device* vd,fbi_state *f, void *memory, int f
/* init the pens */
f->clut_dirty = TRUE;
- if (vd->vd_type <= TYPE_VOODOO_2)
+ if (v->type <= TYPE_VOODOO_2)
{
for (pen = 0; pen < 32; pen++)
- vd->fbi.clut[pen] = rgb_t(pen, pal5bit(pen), pal5bit(pen), pal5bit(pen));
- vd->fbi.clut[32] = rgb_t(32,0xff,0xff,0xff);
+ v->fbi.clut[pen] = rgb_t(pen, pal5bit(pen), pal5bit(pen), pal5bit(pen));
+ v->fbi.clut[32] = rgb_t(32,0xff,0xff,0xff);
}
else
{
for (pen = 0; pen < 512; pen++)
- vd->fbi.clut[pen] = rgb_t(pen,pen,pen);
+ v->fbi.clut[pen] = rgb_t(pen,pen,pen);
}
/* allocate a VBLANK timer */
- f->vblank_timer = vd->device->machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(voodoo_device::vblank_callback),vd), vd);
+ f->vblank_timer = v->device->machine().scheduler().timer_alloc(FUNC(vblank_callback), v);
f->vblank = FALSE;
/* initialize the memory FIFO */
@@ -446,11 +505,11 @@ void voodoo_device::init_fbi(voodoo_device* vd,fbi_state *f, void *memory, int f
f->fifo.size = f->fifo.in = f->fifo.out = 0;
/* set the fog delta mask */
- f->fogdelta_mask = (vd->vd_type < TYPE_VOODOO_2) ? 0xff : 0xfc;
+ f->fogdelta_mask = (v->type < TYPE_VOODOO_2) ? 0xff : 0xfc;
}
-void voodoo_device::init_tmu_shared(tmu_shared_state *s)
+static void init_tmu_shared(tmu_shared_state *s)
{
int val;
@@ -495,14 +554,14 @@ void voodoo_device::init_tmu_shared(tmu_shared_state *s)
}
-void voodoo_device::init_tmu(voodoo_device* vd, tmu_state *t, voodoo_reg *reg, void *memory, int tmem)
+static void init_tmu(voodoo_state *v, tmu_state *t, voodoo_reg *reg, void *memory, int tmem)
{
/* allocate texture RAM */
t->ram = (UINT8 *)memory;
t->mask = tmem - 1;
t->reg = reg;
t->regdirty = TRUE;
- t->bilinear_mask = (vd->vd_type >= TYPE_VOODOO_2) ? 0xff : 0xf0;
+ t->bilinear_mask = (v->type >= TYPE_VOODOO_2) ? 0xff : 0xf0;
/* mark the NCC tables dirty and configure their registers */
t->ncc[0].dirty = t->ncc[1].dirty = TRUE;
@@ -510,31 +569,31 @@ void voodoo_device::init_tmu(voodoo_device* vd, tmu_state *t, voodoo_reg *reg, v
t->ncc[1].reg = &t->reg[nccTable+12];
/* create pointers to all the tables */
- t->texel[0] = vd->tmushare.rgb332;
+ t->texel[0] = v->tmushare.rgb332;
t->texel[1] = t->ncc[0].texel;
- t->texel[2] = vd->tmushare.alpha8;
- t->texel[3] = vd->tmushare.int8;
- t->texel[4] = vd->tmushare.ai44;
+ t->texel[2] = v->tmushare.alpha8;
+ t->texel[3] = v->tmushare.int8;
+ t->texel[4] = v->tmushare.ai44;
t->texel[5] = t->palette;
- t->texel[6] = (vd->vd_type >= TYPE_VOODOO_2) ? t->palettea : nullptr;
+ t->texel[6] = (v->type >= TYPE_VOODOO_2) ? t->palettea : nullptr;
t->texel[7] = nullptr;
- t->texel[8] = vd->tmushare.rgb332;
+ t->texel[8] = v->tmushare.rgb332;
t->texel[9] = t->ncc[0].texel;
- t->texel[10] = vd->tmushare.rgb565;
- t->texel[11] = vd->tmushare.argb1555;
- t->texel[12] = vd->tmushare.argb4444;
- t->texel[13] = vd->tmushare.int8;
+ t->texel[10] = v->tmushare.rgb565;
+ t->texel[11] = v->tmushare.argb1555;
+ t->texel[12] = v->tmushare.argb4444;
+ t->texel[13] = v->tmushare.int8;
t->texel[14] = t->palette;
t->texel[15] = nullptr;
t->lookup = t->texel[0];
/* attach the palette to NCC table 0 */
t->ncc[0].palette = t->palette;
- if (vd->vd_type >= TYPE_VOODOO_2)
+ if (v->type >= TYPE_VOODOO_2)
t->ncc[0].palettea = t->palettea;
/* set up texture address calculations */
- if (vd->vd_type <= TYPE_VOODOO_2)
+ if (v->type <= TYPE_VOODOO_2)
{
t->texaddr_mask = 0x0fffff;
t->texaddr_shift = 3;
@@ -547,180 +606,181 @@ void voodoo_device::init_tmu(voodoo_device* vd, tmu_state *t, voodoo_reg *reg, v
}
-void voodoo_device::voodoo_postload(voodoo_device *vd)
+static void voodoo_postload(voodoo_state *v)
{
int index, subindex;
- vd->fbi.clut_dirty = TRUE;
- for (index = 0; index < ARRAY_LENGTH(vd->tmu); index++)
+ v->fbi.clut_dirty = TRUE;
+ for (index = 0; index < ARRAY_LENGTH(v->tmu); index++)
{
- vd->tmu[index].regdirty = TRUE;
- for (subindex = 0; subindex < ARRAY_LENGTH(vd->tmu[index].ncc); subindex++)
- vd->tmu[index].ncc[subindex].dirty = TRUE;
+ v->tmu[index].regdirty = TRUE;
+ for (subindex = 0; subindex < ARRAY_LENGTH(v->tmu[index].ncc); subindex++)
+ v->tmu[index].ncc[subindex].dirty = TRUE;
}
/* recompute video memory to get the FBI FIFO base recomputed */
- if (vd->vd_type <= TYPE_VOODOO_2)
- recompute_video_memory(vd);
+ if (v->type <= TYPE_VOODOO_2)
+ recompute_video_memory(v);
}
-static void init_save_state(voodoo_device *vd)
+static void init_save_state(device_t *device)
{
+ voodoo_state *v = get_safe_token(device);
int index, subindex;
- vd->machine().save().register_postload(save_prepost_delegate(FUNC(voodoo_device::voodoo_postload), vd));
+ device->machine().save().register_postload(save_prepost_delegate(FUNC(voodoo_postload), v));
/* register states: core */
- vd->save_item(NAME(vd->extra_cycles));
- vd->save_pointer(NAME(&vd->reg[0].u), ARRAY_LENGTH(vd->reg));
- vd->save_item(NAME(vd->alt_regmap));
+ device->save_item(NAME(v->extra_cycles));
+ device->save_pointer(NAME(&v->reg[0].u), ARRAY_LENGTH(v->reg));
+ device->save_item(NAME(v->alt_regmap));
/* register states: pci */
- vd->save_item(NAME(vd->pci.fifo.in));
- vd->save_item(NAME(vd->pci.fifo.out));
- vd->save_item(NAME(vd->pci.init_enable));
- vd->save_item(NAME(vd->pci.stall_state));
- vd->save_item(NAME(vd->pci.op_pending));
- vd->save_item(NAME(vd->pci.op_end_time));
- vd->save_item(NAME(vd->pci.fifo_mem));
+ device->save_item(NAME(v->pci.fifo.in));
+ device->save_item(NAME(v->pci.fifo.out));
+ device->save_item(NAME(v->pci.init_enable));
+ device->save_item(NAME(v->pci.stall_state));
+ device->save_item(NAME(v->pci.op_pending));
+ device->save_item(NAME(v->pci.op_end_time));
+ device->save_item(NAME(v->pci.fifo_mem));
/* register states: dac */
- vd->save_item(NAME(vd->dac.reg));
- vd->save_item(NAME(vd->dac.read_result));
+ device->save_item(NAME(v->dac.reg));
+ device->save_item(NAME(v->dac.read_result));
/* register states: fbi */
- vd->save_pointer(NAME(vd->fbi.ram), vd->fbi.mask + 1);
- vd->save_item(NAME(vd->fbi.rgboffs));
- vd->save_item(NAME(vd->fbi.auxoffs));
- vd->save_item(NAME(vd->fbi.frontbuf));
- vd->save_item(NAME(vd->fbi.backbuf));
- vd->save_item(NAME(vd->fbi.swaps_pending));
- vd->save_item(NAME(vd->fbi.video_changed));
- vd->save_item(NAME(vd->fbi.yorigin));
- vd->save_item(NAME(vd->fbi.lfb_base));
- vd->save_item(NAME(vd->fbi.lfb_stride));
- vd->save_item(NAME(vd->fbi.width));
- vd->save_item(NAME(vd->fbi.height));
- vd->save_item(NAME(vd->fbi.xoffs));
- vd->save_item(NAME(vd->fbi.yoffs));
- vd->save_item(NAME(vd->fbi.vsyncscan));
- vd->save_item(NAME(vd->fbi.rowpixels));
- vd->save_item(NAME(vd->fbi.vblank));
- vd->save_item(NAME(vd->fbi.vblank_count));
- vd->save_item(NAME(vd->fbi.vblank_swap_pending));
- vd->save_item(NAME(vd->fbi.vblank_swap));
- vd->save_item(NAME(vd->fbi.vblank_dont_swap));
- vd->save_item(NAME(vd->fbi.cheating_allowed));
- vd->save_item(NAME(vd->fbi.sign));
- vd->save_item(NAME(vd->fbi.ax));
- vd->save_item(NAME(vd->fbi.ay));
- vd->save_item(NAME(vd->fbi.bx));
- vd->save_item(NAME(vd->fbi.by));
- vd->save_item(NAME(vd->fbi.cx));
- vd->save_item(NAME(vd->fbi.cy));
- vd->save_item(NAME(vd->fbi.startr));
- vd->save_item(NAME(vd->fbi.startg));
- vd->save_item(NAME(vd->fbi.startb));
- vd->save_item(NAME(vd->fbi.starta));
- vd->save_item(NAME(vd->fbi.startz));
- vd->save_item(NAME(vd->fbi.startw));
- vd->save_item(NAME(vd->fbi.drdx));
- vd->save_item(NAME(vd->fbi.dgdx));
- vd->save_item(NAME(vd->fbi.dbdx));
- vd->save_item(NAME(vd->fbi.dadx));
- vd->save_item(NAME(vd->fbi.dzdx));
- vd->save_item(NAME(vd->fbi.dwdx));
- vd->save_item(NAME(vd->fbi.drdy));
- vd->save_item(NAME(vd->fbi.dgdy));
- vd->save_item(NAME(vd->fbi.dbdy));
- vd->save_item(NAME(vd->fbi.dady));
- vd->save_item(NAME(vd->fbi.dzdy));
- vd->save_item(NAME(vd->fbi.dwdy));
- vd->save_item(NAME(vd->fbi.lfb_stats.pixels_in));
- vd->save_item(NAME(vd->fbi.lfb_stats.pixels_out));
- vd->save_item(NAME(vd->fbi.lfb_stats.chroma_fail));
- vd->save_item(NAME(vd->fbi.lfb_stats.zfunc_fail));
- vd->save_item(NAME(vd->fbi.lfb_stats.afunc_fail));
- vd->save_item(NAME(vd->fbi.lfb_stats.clip_fail));
- vd->save_item(NAME(vd->fbi.lfb_stats.stipple_count));
- vd->save_item(NAME(vd->fbi.sverts));
- for (index = 0; index < ARRAY_LENGTH(vd->fbi.svert); index++)
+ device->save_pointer(NAME(v->fbi.ram), v->fbi.mask + 1);
+ device->save_item(NAME(v->fbi.rgboffs));
+ device->save_item(NAME(v->fbi.auxoffs));
+ device->save_item(NAME(v->fbi.frontbuf));
+ device->save_item(NAME(v->fbi.backbuf));
+ device->save_item(NAME(v->fbi.swaps_pending));
+ device->save_item(NAME(v->fbi.video_changed));
+ device->save_item(NAME(v->fbi.yorigin));
+ device->save_item(NAME(v->fbi.lfb_base));
+ device->save_item(NAME(v->fbi.lfb_stride));
+ device->save_item(NAME(v->fbi.width));
+ device->save_item(NAME(v->fbi.height));
+ device->save_item(NAME(v->fbi.xoffs));
+ device->save_item(NAME(v->fbi.yoffs));
+ device->save_item(NAME(v->fbi.vsyncscan));
+ device->save_item(NAME(v->fbi.rowpixels));
+ device->save_item(NAME(v->fbi.vblank));
+ device->save_item(NAME(v->fbi.vblank_count));
+ device->save_item(NAME(v->fbi.vblank_swap_pending));
+ device->save_item(NAME(v->fbi.vblank_swap));
+ device->save_item(NAME(v->fbi.vblank_dont_swap));
+ device->save_item(NAME(v->fbi.cheating_allowed));
+ device->save_item(NAME(v->fbi.sign));
+ device->save_item(NAME(v->fbi.ax));
+ device->save_item(NAME(v->fbi.ay));
+ device->save_item(NAME(v->fbi.bx));
+ device->save_item(NAME(v->fbi.by));
+ device->save_item(NAME(v->fbi.cx));
+ device->save_item(NAME(v->fbi.cy));
+ device->save_item(NAME(v->fbi.startr));
+ device->save_item(NAME(v->fbi.startg));
+ device->save_item(NAME(v->fbi.startb));
+ device->save_item(NAME(v->fbi.starta));
+ device->save_item(NAME(v->fbi.startz));
+ device->save_item(NAME(v->fbi.startw));
+ device->save_item(NAME(v->fbi.drdx));
+ device->save_item(NAME(v->fbi.dgdx));
+ device->save_item(NAME(v->fbi.dbdx));
+ device->save_item(NAME(v->fbi.dadx));
+ device->save_item(NAME(v->fbi.dzdx));
+ device->save_item(NAME(v->fbi.dwdx));
+ device->save_item(NAME(v->fbi.drdy));
+ device->save_item(NAME(v->fbi.dgdy));
+ device->save_item(NAME(v->fbi.dbdy));
+ device->save_item(NAME(v->fbi.dady));
+ device->save_item(NAME(v->fbi.dzdy));
+ device->save_item(NAME(v->fbi.dwdy));
+ device->save_item(NAME(v->fbi.lfb_stats.pixels_in));
+ device->save_item(NAME(v->fbi.lfb_stats.pixels_out));
+ device->save_item(NAME(v->fbi.lfb_stats.chroma_fail));
+ device->save_item(NAME(v->fbi.lfb_stats.zfunc_fail));
+ device->save_item(NAME(v->fbi.lfb_stats.afunc_fail));
+ device->save_item(NAME(v->fbi.lfb_stats.clip_fail));
+ device->save_item(NAME(v->fbi.lfb_stats.stipple_count));
+ device->save_item(NAME(v->fbi.sverts));
+ for (index = 0; index < ARRAY_LENGTH(v->fbi.svert); index++)
{
- vd->save_item(NAME(vd->fbi.svert[index].x), index);
- vd->save_item(NAME(vd->fbi.svert[index].y), index);
- vd->save_item(NAME(vd->fbi.svert[index].a), index);
- vd->save_item(NAME(vd->fbi.svert[index].r), index);
- vd->save_item(NAME(vd->fbi.svert[index].g), index);
- vd->save_item(NAME(vd->fbi.svert[index].b), index);
- vd->save_item(NAME(vd->fbi.svert[index].z), index);
- vd->save_item(NAME(vd->fbi.svert[index].wb), index);
- vd->save_item(NAME(vd->fbi.svert[index].w0), index);
- vd->save_item(NAME(vd->fbi.svert[index].s0), index);
- vd->save_item(NAME(vd->fbi.svert[index].t0), index);
- vd->save_item(NAME(vd->fbi.svert[index].w1), index);
- vd->save_item(NAME(vd->fbi.svert[index].s1), index);
- vd->save_item(NAME(vd->fbi.svert[index].t1), index);
+ device->save_item(NAME(v->fbi.svert[index].x), index);
+ device->save_item(NAME(v->fbi.svert[index].y), index);
+ device->save_item(NAME(v->fbi.svert[index].a), index);
+ device->save_item(NAME(v->fbi.svert[index].r), index);
+ device->save_item(NAME(v->fbi.svert[index].g), index);
+ device->save_item(NAME(v->fbi.svert[index].b), index);
+ device->save_item(NAME(v->fbi.svert[index].z), index);
+ device->save_item(NAME(v->fbi.svert[index].wb), index);
+ device->save_item(NAME(v->fbi.svert[index].w0), index);
+ device->save_item(NAME(v->fbi.svert[index].s0), index);
+ device->save_item(NAME(v->fbi.svert[index].t0), index);
+ device->save_item(NAME(v->fbi.svert[index].w1), index);
+ device->save_item(NAME(v->fbi.svert[index].s1), index);
+ device->save_item(NAME(v->fbi.svert[index].t1), index);
}
- vd->save_item(NAME(vd->fbi.fifo.size));
- vd->save_item(NAME(vd->fbi.fifo.in));
- vd->save_item(NAME(vd->fbi.fifo.out));
- for (index = 0; index < ARRAY_LENGTH(vd->fbi.cmdfifo); index++)
+ device->save_item(NAME(v->fbi.fifo.size));
+ device->save_item(NAME(v->fbi.fifo.in));
+ device->save_item(NAME(v->fbi.fifo.out));
+ for (index = 0; index < ARRAY_LENGTH(v->fbi.cmdfifo); index++)
{
- vd->save_item(NAME(vd->fbi.cmdfifo[index].enable), index);
- vd->save_item(NAME(vd->fbi.cmdfifo[index].count_holes), index);
- vd->save_item(NAME(vd->fbi.cmdfifo[index].base), index);
- vd->save_item(NAME(vd->fbi.cmdfifo[index].end), index);
- vd->save_item(NAME(vd->fbi.cmdfifo[index].rdptr), index);
- vd->save_item(NAME(vd->fbi.cmdfifo[index].amin), index);
- vd->save_item(NAME(vd->fbi.cmdfifo[index].amax), index);
- vd->save_item(NAME(vd->fbi.cmdfifo[index].depth), index);
- vd->save_item(NAME(vd->fbi.cmdfifo[index].holes), index);
+ device->save_item(NAME(v->fbi.cmdfifo[index].enable), index);
+ device->save_item(NAME(v->fbi.cmdfifo[index].count_holes), index);
+ device->save_item(NAME(v->fbi.cmdfifo[index].base), index);
+ device->save_item(NAME(v->fbi.cmdfifo[index].end), index);
+ device->save_item(NAME(v->fbi.cmdfifo[index].rdptr), index);
+ device->save_item(NAME(v->fbi.cmdfifo[index].amin), index);
+ device->save_item(NAME(v->fbi.cmdfifo[index].amax), index);
+ device->save_item(NAME(v->fbi.cmdfifo[index].depth), index);
+ device->save_item(NAME(v->fbi.cmdfifo[index].holes), index);
}
- vd->save_item(NAME(vd->fbi.fogblend));
- vd->save_item(NAME(vd->fbi.fogdelta));
- vd->save_item(NAME(vd->fbi.clut));
+ device->save_item(NAME(v->fbi.fogblend));
+ device->save_item(NAME(v->fbi.fogdelta));
+ device->save_item(NAME(v->fbi.clut));
/* register states: tmu */
- for (index = 0; index < ARRAY_LENGTH(vd->tmu); index++)
+ for (index = 0; index < ARRAY_LENGTH(v->tmu); index++)
{
- tmu_state *tmu = &vd->tmu[index];
+ tmu_state *tmu = &v->tmu[index];
if (tmu->ram == nullptr)
continue;
- if (tmu->ram != vd->fbi.ram)
- vd->save_pointer(NAME(tmu->ram), tmu->mask + 1, index);
- vd->save_item(NAME(tmu->starts), index);
- vd->save_item(NAME(tmu->startt), index);
- vd->save_item(NAME(tmu->startw), index);
- vd->save_item(NAME(tmu->dsdx), index);
- vd->save_item(NAME(tmu->dtdx), index);
- vd->save_item(NAME(tmu->dwdx), index);
- vd->save_item(NAME(tmu->dsdy), index);
- vd->save_item(NAME(tmu->dtdy), index);
- vd->save_item(NAME(tmu->dwdy), index);
+ if (tmu->ram != v->fbi.ram)
+ device->save_pointer(NAME(tmu->ram), tmu->mask + 1, index);
+ device->save_item(NAME(tmu->starts), index);
+ device->save_item(NAME(tmu->startt), index);
+ device->save_item(NAME(tmu->startw), index);
+ device->save_item(NAME(tmu->dsdx), index);
+ device->save_item(NAME(tmu->dtdx), index);
+ device->save_item(NAME(tmu->dwdx), index);
+ device->save_item(NAME(tmu->dsdy), index);
+ device->save_item(NAME(tmu->dtdy), index);
+ device->save_item(NAME(tmu->dwdy), index);
for (subindex = 0; subindex < ARRAY_LENGTH(tmu->ncc); subindex++)
{
- vd->save_item(NAME(tmu->ncc[subindex].ir), index * ARRAY_LENGTH(tmu->ncc) + subindex);
- vd->save_item(NAME(tmu->ncc[subindex].ig), index * ARRAY_LENGTH(tmu->ncc) + subindex);
- vd->save_item(NAME(tmu->ncc[subindex].ib), index * ARRAY_LENGTH(tmu->ncc) + subindex);
- vd->save_item(NAME(tmu->ncc[subindex].qr), index * ARRAY_LENGTH(tmu->ncc) + subindex);
- vd->save_item(NAME(tmu->ncc[subindex].qg), index * ARRAY_LENGTH(tmu->ncc) + subindex);
- vd->save_item(NAME(tmu->ncc[subindex].qb), index * ARRAY_LENGTH(tmu->ncc) + subindex);
- vd->save_item(NAME(tmu->ncc[subindex].y), index * ARRAY_LENGTH(tmu->ncc) + subindex);
+ device->save_item(NAME(tmu->ncc[subindex].ir), index * ARRAY_LENGTH(tmu->ncc) + subindex);
+ device->save_item(NAME(tmu->ncc[subindex].ig), index * ARRAY_LENGTH(tmu->ncc) + subindex);
+ device->save_item(NAME(tmu->ncc[subindex].ib), index * ARRAY_LENGTH(tmu->ncc) + subindex);
+ device->save_item(NAME(tmu->ncc[subindex].qr), index * ARRAY_LENGTH(tmu->ncc) + subindex);
+ device->save_item(NAME(tmu->ncc[subindex].qg), index * ARRAY_LENGTH(tmu->ncc) + subindex);
+ device->save_item(NAME(tmu->ncc[subindex].qb), index * ARRAY_LENGTH(tmu->ncc) + subindex);
+ device->save_item(NAME(tmu->ncc[subindex].y), index * ARRAY_LENGTH(tmu->ncc) + subindex);
}
}
/* register states: banshee */
- if (vd->vd_type >= TYPE_VOODOO_BANSHEE)
+ if (v->type >= TYPE_VOODOO_BANSHEE)
{
- vd->save_item(NAME(vd->banshee.io));
- vd->save_item(NAME(vd->banshee.agp));
- vd->save_item(NAME(vd->banshee.vga));
- vd->save_item(NAME(vd->banshee.crtc));
- vd->save_item(NAME(vd->banshee.seq));
- vd->save_item(NAME(vd->banshee.gc));
- vd->save_item(NAME(vd->banshee.att));
- vd->save_item(NAME(vd->banshee.attff));
+ device->save_item(NAME(v->banshee.io));
+ device->save_item(NAME(v->banshee.agp));
+ device->save_item(NAME(v->banshee.vga));
+ device->save_item(NAME(v->banshee.crtc));
+ device->save_item(NAME(v->banshee.seq));
+ device->save_item(NAME(v->banshee.gc));
+ device->save_item(NAME(v->banshee.att));
+ device->save_item(NAME(v->banshee.attff));
}
}
@@ -732,27 +792,27 @@ static void init_save_state(voodoo_device *vd)
*
*************************************/
-static void accumulate_statistics(voodoo_device *vd, const stats_block *stats)
+static void accumulate_statistics(voodoo_state *v, const stats_block *stats)
{
/* apply internal voodoo statistics */
- vd->reg[fbiPixelsIn].u += stats->pixels_in;
- vd->reg[fbiPixelsOut].u += stats->pixels_out;
- vd->reg[fbiChromaFail].u += stats->chroma_fail;
- vd->reg[fbiZfuncFail].u += stats->zfunc_fail;
- vd->reg[fbiAfuncFail].u += stats->afunc_fail;
+ v->reg[fbiPixelsIn].u += stats->pixels_in;
+ v->reg[fbiPixelsOut].u += stats->pixels_out;
+ v->reg[fbiChromaFail].u += stats->chroma_fail;
+ v->reg[fbiZfuncFail].u += stats->zfunc_fail;
+ v->reg[fbiAfuncFail].u += stats->afunc_fail;
/* apply emulation statistics */
- vd->stats.total_pixels_in += stats->pixels_in;
- vd->stats.total_pixels_out += stats->pixels_out;
- vd->stats.total_chroma_fail += stats->chroma_fail;
- vd->stats.total_zfunc_fail += stats->zfunc_fail;
- vd->stats.total_afunc_fail += stats->afunc_fail;
- vd->stats.total_clipped += stats->clip_fail;
- vd->stats.total_stippled += stats->stipple_count;
+ v->stats.total_pixels_in += stats->pixels_in;
+ v->stats.total_pixels_out += stats->pixels_out;
+ v->stats.total_chroma_fail += stats->chroma_fail;
+ v->stats.total_zfunc_fail += stats->zfunc_fail;
+ v->stats.total_afunc_fail += stats->afunc_fail;
+ v->stats.total_clipped += stats->clip_fail;
+ v->stats.total_stippled += stats->stipple_count;
}
-static void update_statistics(voodoo_device *vd, int accumulate)
+static void update_statistics(voodoo_state *v, int accumulate)
{
int threadnum;
@@ -760,14 +820,14 @@ static void update_statistics(voodoo_device *vd, int accumulate)
for (threadnum = 0; threadnum < WORK_MAX_THREADS; threadnum++)
{
if (accumulate)
- accumulate_statistics(vd, &vd->thread_stats[threadnum]);
- memset(&vd->thread_stats[threadnum], 0, sizeof(vd->thread_stats[threadnum]));
+ accumulate_statistics(v, &v->thread_stats[threadnum]);
+ memset(&v->thread_stats[threadnum], 0, sizeof(v->thread_stats[threadnum]));
}
/* accumulate/reset statistics from the LFB */
if (accumulate)
- accumulate_statistics(vd, &vd->fbi.lfb_stats);
- memset(&vd->fbi.lfb_stats, 0, sizeof(vd->fbi.lfb_stats));
+ accumulate_statistics(v, &v->fbi.lfb_stats);
+ memset(&v->fbi.lfb_stats, 0, sizeof(v->fbi.lfb_stats));
}
@@ -778,208 +838,210 @@ static void update_statistics(voodoo_device *vd, int accumulate)
*
*************************************/
-void voodoo_device::swap_buffers(voodoo_device *vd)
+static void swap_buffers(voodoo_state *v)
{
int count;
- if (LOG_VBLANK_SWAP) vd->device->logerror("--- swap_buffers @ %d\n", vd->screen->vpos());
+ if (LOG_VBLANK_SWAP) v->device->logerror("--- swap_buffers @ %d\n", v->screen->vpos());
/* force a partial update */
- vd->screen->update_partial(vd->screen->vpos());
- vd->fbi.video_changed = TRUE;
+ v->screen->update_partial(v->screen->vpos());
+ v->fbi.video_changed = TRUE;
/* keep a history of swap intervals */
- count = vd->fbi.vblank_count;
+ count = v->fbi.vblank_count;
if (count > 15)
count = 15;
- vd->reg[fbiSwapHistory].u = (vd->reg[fbiSwapHistory].u << 4) | count;
+ v->reg[fbiSwapHistory].u = (v->reg[fbiSwapHistory].u << 4) | count;
/* rotate the buffers */
- if (vd->vd_type <= TYPE_VOODOO_2)
+ if (v->type <= TYPE_VOODOO_2)
{
- if (vd->vd_type < TYPE_VOODOO_2 || !vd->fbi.vblank_dont_swap)
+ if (v->type < TYPE_VOODOO_2 || !v->fbi.vblank_dont_swap)
{
- if (vd->fbi.rgboffs[2] == ~0)
+ if (v->fbi.rgboffs[2] == ~0)
{
- vd->fbi.frontbuf = 1 - vd->fbi.frontbuf;
- vd->fbi.backbuf = 1 - vd->fbi.frontbuf;
+ v->fbi.frontbuf = 1 - v->fbi.frontbuf;
+ v->fbi.backbuf = 1 - v->fbi.frontbuf;
}
else
{
- vd->fbi.frontbuf = (vd->fbi.frontbuf + 1) % 3;
- vd->fbi.backbuf = (vd->fbi.frontbuf + 1) % 3;
+ v->fbi.frontbuf = (v->fbi.frontbuf + 1) % 3;
+ v->fbi.backbuf = (v->fbi.frontbuf + 1) % 3;
}
}
}
else
- vd->fbi.rgboffs[0] = vd->reg[leftOverlayBuf].u & vd->fbi.mask & ~0x0f;
+ v->fbi.rgboffs[0] = v->reg[leftOverlayBuf].u & v->fbi.mask & ~0x0f;
/* decrement the pending count and reset our state */
- if (vd->fbi.swaps_pending)
- vd->fbi.swaps_pending--;
- vd->fbi.vblank_count = 0;
- vd->fbi.vblank_swap_pending = FALSE;
+ if (v->fbi.swaps_pending)
+ v->fbi.swaps_pending--;
+ v->fbi.vblank_count = 0;
+ v->fbi.vblank_swap_pending = FALSE;
/* reset the last_op_time to now and start processing the next command */
- if (vd->pci.op_pending)
+ if (v->pci.op_pending)
{
- vd->pci.op_end_time = vd->device->machine().time();
- flush_fifos(vd, vd->pci.op_end_time);
+ v->pci.op_end_time = v->device->machine().time();
+ flush_fifos(v, v->pci.op_end_time);
}
/* we may be able to unstall now */
- if (vd->pci.stall_state != NOT_STALLED)
- check_stalled_cpu(vd, vd->device->machine().time());
+ if (v->pci.stall_state != NOT_STALLED)
+ check_stalled_cpu(v, v->device->machine().time());
/* periodically log rasterizer info */
- vd->stats.swaps++;
- if (LOG_RASTERIZERS && vd->stats.swaps % 1000 == 0)
- dump_rasterizer_stats(vd);
+ v->stats.swaps++;
+ if (LOG_RASTERIZERS && v->stats.swaps % 1000 == 0)
+ dump_rasterizer_stats(v);
/* update the statistics (debug) */
- if (vd->stats.display)
+ if (v->stats.display)
{
- const rectangle &visible_area = vd->screen->visible_area();
+ const rectangle &visible_area = v->screen->visible_area();
int screen_area = visible_area.width() * visible_area.height();
- char *statsptr = vd->stats.buffer;
+ char *statsptr = v->stats.buffer;
int pixelcount;
int i;
- update_statistics(vd, TRUE);
- pixelcount = vd->stats.total_pixels_out;
+ update_statistics(v, TRUE);
+ pixelcount = v->stats.total_pixels_out;
- statsptr += sprintf(statsptr, "Swap:%6d\n", vd->stats.swaps);
- statsptr += sprintf(statsptr, "Hist:%08X\n", vd->reg[fbiSwapHistory].u);
- statsptr += sprintf(statsptr, "Stal:%6d\n", vd->stats.stalls);
+ statsptr += sprintf(statsptr, "Swap:%6d\n", v->stats.swaps);
+ statsptr += sprintf(statsptr, "Hist:%08X\n", v->reg[fbiSwapHistory].u);
+ statsptr += sprintf(statsptr, "Stal:%6d\n", v->stats.stalls);
statsptr += sprintf(statsptr, "Rend:%6d%%\n", pixelcount * 100 / screen_area);
- statsptr += sprintf(statsptr, "Poly:%6d\n", vd->stats.total_triangles);
- statsptr += sprintf(statsptr, "PxIn:%6d\n", vd->stats.total_pixels_in);
- statsptr += sprintf(statsptr, "POut:%6d\n", vd->stats.total_pixels_out);
- statsptr += sprintf(statsptr, "Clip:%6d\n", vd->stats.total_clipped);
- statsptr += sprintf(statsptr, "Stip:%6d\n", vd->stats.total_stippled);
- statsptr += sprintf(statsptr, "Chro:%6d\n", vd->stats.total_chroma_fail);
- statsptr += sprintf(statsptr, "ZFun:%6d\n", vd->stats.total_zfunc_fail);
- statsptr += sprintf(statsptr, "AFun:%6d\n", vd->stats.total_afunc_fail);
- statsptr += sprintf(statsptr, "RegW:%6d\n", vd->stats.reg_writes);
- statsptr += sprintf(statsptr, "RegR:%6d\n", vd->stats.reg_reads);
- statsptr += sprintf(statsptr, "LFBW:%6d\n", vd->stats.lfb_writes);
- statsptr += sprintf(statsptr, "LFBR:%6d\n", vd->stats.lfb_reads);
- statsptr += sprintf(statsptr, "TexW:%6d\n", vd->stats.tex_writes);
+ statsptr += sprintf(statsptr, "Poly:%6d\n", v->stats.total_triangles);
+ statsptr += sprintf(statsptr, "PxIn:%6d\n", v->stats.total_pixels_in);
+ statsptr += sprintf(statsptr, "POut:%6d\n", v->stats.total_pixels_out);
+ statsptr += sprintf(statsptr, "Clip:%6d\n", v->stats.total_clipped);
+ statsptr += sprintf(statsptr, "Stip:%6d\n", v->stats.total_stippled);
+ statsptr += sprintf(statsptr, "Chro:%6d\n", v->stats.total_chroma_fail);
+ statsptr += sprintf(statsptr, "ZFun:%6d\n", v->stats.total_zfunc_fail);
+ statsptr += sprintf(statsptr, "AFun:%6d\n", v->stats.total_afunc_fail);
+ statsptr += sprintf(statsptr, "RegW:%6d\n", v->stats.reg_writes);
+ statsptr += sprintf(statsptr, "RegR:%6d\n", v->stats.reg_reads);
+ statsptr += sprintf(statsptr, "LFBW:%6d\n", v->stats.lfb_writes);
+ statsptr += sprintf(statsptr, "LFBR:%6d\n", v->stats.lfb_reads);
+ statsptr += sprintf(statsptr, "TexW:%6d\n", v->stats.tex_writes);
statsptr += sprintf(statsptr, "TexM:");
for (i = 0; i < 16; i++)
- if (vd->stats.texture_mode[i])
+ if (v->stats.texture_mode[i])
*statsptr++ = "0123456789ABCDEF"[i];
*statsptr = 0;
}
/* update statistics */
- vd->stats.stalls = 0;
- vd->stats.total_triangles = 0;
- vd->stats.total_pixels_in = 0;
- vd->stats.total_pixels_out = 0;
- vd->stats.total_chroma_fail = 0;
- vd->stats.total_zfunc_fail = 0;
- vd->stats.total_afunc_fail = 0;
- vd->stats.total_clipped = 0;
- vd->stats.total_stippled = 0;
- vd->stats.reg_writes = 0;
- vd->stats.reg_reads = 0;
- vd->stats.lfb_writes = 0;
- vd->stats.lfb_reads = 0;
- vd->stats.tex_writes = 0;
- memset(vd->stats.texture_mode, 0, sizeof(vd->stats.texture_mode));
+ v->stats.stalls = 0;
+ v->stats.total_triangles = 0;
+ v->stats.total_pixels_in = 0;
+ v->stats.total_pixels_out = 0;
+ v->stats.total_chroma_fail = 0;
+ v->stats.total_zfunc_fail = 0;
+ v->stats.total_afunc_fail = 0;
+ v->stats.total_clipped = 0;
+ v->stats.total_stippled = 0;
+ v->stats.reg_writes = 0;
+ v->stats.reg_reads = 0;
+ v->stats.lfb_writes = 0;
+ v->stats.lfb_reads = 0;
+ v->stats.tex_writes = 0;
+ memset(v->stats.texture_mode, 0, sizeof(v->stats.texture_mode));
}
-static void adjust_vblank_timer(voodoo_device *vd)
+static void adjust_vblank_timer(voodoo_state *v)
{
- attotime vblank_period = vd->screen->time_until_pos(vd->fbi.vsyncscan);
+ attotime vblank_period = v->screen->time_until_pos(v->fbi.vsyncscan);
/* if zero, adjust to next frame, otherwise we may get stuck in an infinite loop */
if (vblank_period == attotime::zero)
- vblank_period = vd->screen->frame_period();
- vd->fbi.vblank_timer->adjust(vblank_period);
+ vblank_period = v->screen->frame_period();
+ v->fbi.vblank_timer->adjust(vblank_period);
}
-TIMER_CALLBACK_MEMBER( voodoo_device::vblank_off_callback )
+static TIMER_CALLBACK( vblank_off_callback )
{
- if (LOG_VBLANK_SWAP) device->logerror("--- vblank end\n");
+ voodoo_state *v = (voodoo_state *)ptr;
+
+ if (LOG_VBLANK_SWAP) v->device->logerror("--- vblank end\n");
/* set internal state and call the client */
- fbi.vblank = FALSE;
+ v->fbi.vblank = FALSE;
// TODO: Vblank IRQ enable is VOODOO3 only?
- if (vd_type >= TYPE_VOODOO_3)
+ if (v->type >= TYPE_VOODOO_3)
{
- if (reg[intrCtrl].u & 0x8) // call IRQ handler if VSYNC interrupt (falling) is enabled
+ if (v->reg[intrCtrl].u & 0x8) // call IRQ handler if VSYNC interrupt (falling) is enabled
{
- reg[intrCtrl].u |= 0x200; // VSYNC int (falling) active
+ v->reg[intrCtrl].u |= 0x200; // VSYNC int (falling) active
- if (!device->m_vblank.isnull())
- device->m_vblank(FALSE);
+ if (!v->device->m_vblank.isnull())
+ v->device->m_vblank(FALSE);
}
}
else
{
- if (!device->m_vblank.isnull())
- device->m_vblank(FALSE);
+ if (!v->device->m_vblank.isnull())
+ v->device->m_vblank(FALSE);
}
/* go to the end of the next frame */
- adjust_vblank_timer(this);
+ adjust_vblank_timer(v);
}
-TIMER_CALLBACK_MEMBER( voodoo_device::vblank_callback )
+static TIMER_CALLBACK( vblank_callback )
{
- if (LOG_VBLANK_SWAP) device->logerror("--- vblank start\n");
+ voodoo_state *v = (voodoo_state *)ptr;
+
+ if (LOG_VBLANK_SWAP) v->device->logerror("--- vblank start\n");
/* flush the pipes */
- if (pci.op_pending)
+ if (v->pci.op_pending)
{
- if (LOG_VBLANK_SWAP) device->logerror("---- vblank flush begin\n");
- flush_fifos(this, machine().time());
- if (LOG_VBLANK_SWAP) device->logerror("---- vblank flush end\n");
+ if (LOG_VBLANK_SWAP) v->device->logerror("---- vblank flush begin\n");
+ flush_fifos(v, machine.time());
+ if (LOG_VBLANK_SWAP) v->device->logerror("---- vblank flush end\n");
}
/* increment the count */
- fbi.vblank_count++;
- if (fbi.vblank_count > 250)
- fbi.vblank_count = 250;
- if (LOG_VBLANK_SWAP) device->logerror("---- vblank count = %d", fbi.vblank_count);
- if (fbi.vblank_swap_pending)
- if (LOG_VBLANK_SWAP) device->logerror(" (target=%d)", fbi.vblank_swap);
- if (LOG_VBLANK_SWAP) device->logerror("\n");
+ v->fbi.vblank_count++;
+ if (v->fbi.vblank_count > 250)
+ v->fbi.vblank_count = 250;
+ if (LOG_VBLANK_SWAP) v->device->logerror("---- vblank count = %d", v->fbi.vblank_count);
+ if (v->fbi.vblank_swap_pending)
+ if (LOG_VBLANK_SWAP) v->device->logerror(" (target=%d)", v->fbi.vblank_swap);
+ if (LOG_VBLANK_SWAP) v->device->logerror("\n");
/* if we're past the swap count, do the swap */
- if (fbi.vblank_swap_pending && fbi.vblank_count >= fbi.vblank_swap)
- swap_buffers(this);
+ if (v->fbi.vblank_swap_pending && v->fbi.vblank_count >= v->fbi.vblank_swap)
+ swap_buffers(v);
/* set a timer for the next off state */
- machine().scheduler().timer_set(screen->time_until_pos(0), timer_expired_delegate(FUNC(voodoo_device::vblank_off_callback),this), 0, this);
-
-
+ machine.scheduler().timer_set(v->screen->time_until_pos(0), FUNC(vblank_off_callback), 0, v);
/* set internal state and call the client */
- fbi.vblank = TRUE;
+ v->fbi.vblank = TRUE;
// TODO: Vblank IRQ enable is VOODOO3 only?
- if (vd_type >= TYPE_VOODOO_3)
+ if (v->type >= TYPE_VOODOO_3)
{
- if (reg[intrCtrl].u & 0x4) // call IRQ handler if VSYNC interrupt (rising) is enabled
+ if (v->reg[intrCtrl].u & 0x4) // call IRQ handler if VSYNC interrupt (rising) is enabled
{
- reg[intrCtrl].u |= 0x100; // VSYNC int (rising) active
+ v->reg[intrCtrl].u |= 0x100; // VSYNC int (rising) active
- if (!device->m_vblank.isnull())
- device->m_vblank(TRUE);
+ if (!v->device->m_vblank.isnull())
+ v->device->m_vblank(TRUE);
}
}
else
{
- if (!device->m_vblank.isnull())
- device->m_vblank(TRUE);
+ if (!v->device->m_vblank.isnull())
+ v->device->m_vblank(TRUE);
}
}
@@ -991,23 +1053,23 @@ TIMER_CALLBACK_MEMBER( voodoo_device::vblank_callback )
*
*************************************/
-static void reset_counters(voodoo_device *vd)
+static void reset_counters(voodoo_state *v)
{
- update_statistics(vd, FALSE);
- vd->reg[fbiPixelsIn].u = 0;
- vd->reg[fbiChromaFail].u = 0;
- vd->reg[fbiZfuncFail].u = 0;
- vd->reg[fbiAfuncFail].u = 0;
- vd->reg[fbiPixelsOut].u = 0;
+ update_statistics(v, FALSE);
+ v->reg[fbiPixelsIn].u = 0;
+ v->reg[fbiChromaFail].u = 0;
+ v->reg[fbiZfuncFail].u = 0;
+ v->reg[fbiAfuncFail].u = 0;
+ v->reg[fbiPixelsOut].u = 0;
}
-void voodoo_device::soft_reset(voodoo_device *vd)
+static void soft_reset(voodoo_state *v)
{
- reset_counters(vd);
- vd->reg[fbiTrianglesOut].u = 0;
- fifo_reset(&vd->fbi.fifo);
- fifo_reset(&vd->pci.fifo);
+ reset_counters(v);
+ v->reg[fbiTrianglesOut].u = 0;
+ fifo_reset(&v->fbi.fifo);
+ fifo_reset(&v->pci.fifo);
}
@@ -1018,103 +1080,103 @@ void voodoo_device::soft_reset(voodoo_device *vd)
*
*************************************/
-void voodoo_device::recompute_video_memory(voodoo_device *vd)
+static void recompute_video_memory(voodoo_state *v)
{
- UINT32 buffer_pages = FBIINIT2_VIDEO_BUFFER_OFFSET(vd->reg[fbiInit2].u);
- UINT32 fifo_start_page = FBIINIT4_MEMORY_FIFO_START_ROW(vd->reg[fbiInit4].u);
- UINT32 fifo_last_page = FBIINIT4_MEMORY_FIFO_STOP_ROW(vd->reg[fbiInit4].u);
+ UINT32 buffer_pages = FBIINIT2_VIDEO_BUFFER_OFFSET(v->reg[fbiInit2].u);
+ UINT32 fifo_start_page = FBIINIT4_MEMORY_FIFO_START_ROW(v->reg[fbiInit4].u);
+ UINT32 fifo_last_page = FBIINIT4_MEMORY_FIFO_STOP_ROW(v->reg[fbiInit4].u);
UINT32 memory_config;
int buf;
/* memory config is determined differently between V1 and V2 */
- memory_config = FBIINIT2_ENABLE_TRIPLE_BUF(vd->reg[fbiInit2].u);
- if (vd->vd_type == TYPE_VOODOO_2 && memory_config == 0)
- memory_config = FBIINIT5_BUFFER_ALLOCATION(vd->reg[fbiInit5].u);
+ memory_config = FBIINIT2_ENABLE_TRIPLE_BUF(v->reg[fbiInit2].u);
+ if (v->type == TYPE_VOODOO_2 && memory_config == 0)
+ memory_config = FBIINIT5_BUFFER_ALLOCATION(v->reg[fbiInit5].u);
/* tiles are 64x16/32; x_tiles specifies how many half-tiles */
- vd->fbi.tile_width = (vd->vd_type == TYPE_VOODOO_1) ? 64 : 32;
- vd->fbi.tile_height = (vd->vd_type == TYPE_VOODOO_1) ? 16 : 32;
- vd->fbi.x_tiles = FBIINIT1_X_VIDEO_TILES(vd->reg[fbiInit1].u);
- if (vd->vd_type == TYPE_VOODOO_2)
+ v->fbi.tile_width = (v->type == TYPE_VOODOO_1) ? 64 : 32;
+ v->fbi.tile_height = (v->type == TYPE_VOODOO_1) ? 16 : 32;
+ v->fbi.x_tiles = FBIINIT1_X_VIDEO_TILES(v->reg[fbiInit1].u);
+ if (v->type == TYPE_VOODOO_2)
{
- vd->fbi.x_tiles = (vd->fbi.x_tiles << 1) |
- (FBIINIT1_X_VIDEO_TILES_BIT5(vd->reg[fbiInit1].u) << 5) |
- (FBIINIT6_X_VIDEO_TILES_BIT0(vd->reg[fbiInit6].u));
+ v->fbi.x_tiles = (v->fbi.x_tiles << 1) |
+ (FBIINIT1_X_VIDEO_TILES_BIT5(v->reg[fbiInit1].u) << 5) |
+ (FBIINIT6_X_VIDEO_TILES_BIT0(v->reg[fbiInit6].u));
}
- vd->fbi.rowpixels = vd->fbi.tile_width * vd->fbi.x_tiles;
+ v->fbi.rowpixels = v->fbi.tile_width * v->fbi.x_tiles;
-// logerror("VOODOO.%d.VIDMEM: buffer_pages=%X fifo=%X-%X tiles=%X rowpix=%d\n", vd->index, buffer_pages, fifo_start_page, fifo_last_page, vd->fbi.x_tiles, vd->fbi.rowpixels);
+// logerror("VOODOO.%d.VIDMEM: buffer_pages=%X fifo=%X-%X tiles=%X rowpix=%d\n", v->index, buffer_pages, fifo_start_page, fifo_last_page, v->fbi.x_tiles, v->fbi.rowpixels);
/* first RGB buffer always starts at 0 */
- vd->fbi.rgboffs[0] = 0;
+ v->fbi.rgboffs[0] = 0;
/* second RGB buffer starts immediately afterwards */
- vd->fbi.rgboffs[1] = buffer_pages * 0x1000;
+ v->fbi.rgboffs[1] = buffer_pages * 0x1000;
/* remaining buffers are based on the config */
switch (memory_config)
{
case 3: /* reserved */
- vd->device->logerror("VOODOO.%d.ERROR:Unexpected memory configuration in recompute_video_memory!\n", vd->index);
+ v->device->logerror("VOODOO.%d.ERROR:Unexpected memory configuration in recompute_video_memory!\n", v->index);
case 0: /* 2 color buffers, 1 aux buffer */
- vd->fbi.rgboffs[2] = ~0;
- vd->fbi.auxoffs = 2 * buffer_pages * 0x1000;
+ v->fbi.rgboffs[2] = ~0;
+ v->fbi.auxoffs = 2 * buffer_pages * 0x1000;
break;
case 1: /* 3 color buffers, 0 aux buffers */
- vd->fbi.rgboffs[2] = 2 * buffer_pages * 0x1000;
- vd->fbi.auxoffs = ~0;
+ v->fbi.rgboffs[2] = 2 * buffer_pages * 0x1000;
+ v->fbi.auxoffs = ~0;
break;
case 2: /* 3 color buffers, 1 aux buffers */
- vd->fbi.rgboffs[2] = 2 * buffer_pages * 0x1000;
- vd->fbi.auxoffs = 3 * buffer_pages * 0x1000;
+ v->fbi.rgboffs[2] = 2 * buffer_pages * 0x1000;
+ v->fbi.auxoffs = 3 * buffer_pages * 0x1000;
break;
}
/* clamp the RGB buffers to video memory */
for (buf = 0; buf < 3; buf++)
- if (vd->fbi.rgboffs[buf] != ~0 && vd->fbi.rgboffs[buf] > vd->fbi.mask)
- vd->fbi.rgboffs[buf] = vd->fbi.mask;
+ if (v->fbi.rgboffs[buf] != ~0 && v->fbi.rgboffs[buf] > v->fbi.mask)
+ v->fbi.rgboffs[buf] = v->fbi.mask;
/* clamp the aux buffer to video memory */
- if (vd->fbi.auxoffs != ~0 && vd->fbi.auxoffs > vd->fbi.mask)
- vd->fbi.auxoffs = vd->fbi.mask;
+ if (v->fbi.auxoffs != ~0 && v->fbi.auxoffs > v->fbi.mask)
+ v->fbi.auxoffs = v->fbi.mask;
/* osd_printf_debug("rgb[0] = %08X rgb[1] = %08X rgb[2] = %08X aux = %08X\n",
- vd->fbi.rgboffs[0], vd->fbi.rgboffs[1], vd->fbi.rgboffs[2], vd->fbi.auxoffs);*/
+ v->fbi.rgboffs[0], v->fbi.rgboffs[1], v->fbi.rgboffs[2], v->fbi.auxoffs);*/
/* compute the memory FIFO location and size */
- if (fifo_last_page > vd->fbi.mask / 0x1000)
- fifo_last_page = vd->fbi.mask / 0x1000;
+ if (fifo_last_page > v->fbi.mask / 0x1000)
+ fifo_last_page = v->fbi.mask / 0x1000;
/* is it valid and enabled? */
- if (fifo_start_page <= fifo_last_page && FBIINIT0_ENABLE_MEMORY_FIFO(vd->reg[fbiInit0].u))
+ if (fifo_start_page <= fifo_last_page && FBIINIT0_ENABLE_MEMORY_FIFO(v->reg[fbiInit0].u))
{
- vd->fbi.fifo.base = (UINT32 *)(vd->fbi.ram + fifo_start_page * 0x1000);
- vd->fbi.fifo.size = (fifo_last_page + 1 - fifo_start_page) * 0x1000 / 4;
- if (vd->fbi.fifo.size > 65536*2)
- vd->fbi.fifo.size = 65536*2;
+ v->fbi.fifo.base = (UINT32 *)(v->fbi.ram + fifo_start_page * 0x1000);
+ v->fbi.fifo.size = (fifo_last_page + 1 - fifo_start_page) * 0x1000 / 4;
+ if (v->fbi.fifo.size > 65536*2)
+ v->fbi.fifo.size = 65536*2;
}
/* if not, disable the FIFO */
else
{
- vd->fbi.fifo.base = nullptr;
- vd->fbi.fifo.size = 0;
+ v->fbi.fifo.base = nullptr;
+ v->fbi.fifo.size = 0;
}
/* reset the FIFO */
- fifo_reset(&vd->fbi.fifo);
+ fifo_reset(&v->fbi.fifo);
/* reset our front/back buffers if they are out of range */
- if (vd->fbi.rgboffs[2] == ~0)
+ if (v->fbi.rgboffs[2] == ~0)
{
- if (vd->fbi.frontbuf == 2)
- vd->fbi.frontbuf = 0;
- if (vd->fbi.backbuf == 2)
- vd->fbi.backbuf = 0;
+ if (v->fbi.frontbuf == 2)
+ v->fbi.frontbuf = 0;
+ if (v->fbi.backbuf == 2)
+ v->fbi.backbuf = 0;
}
}
@@ -1414,9 +1476,9 @@ static inline INT32 prepare_tmu(tmu_state *t)
*
*************************************/
-static int cmdfifo_compute_expected_depth(voodoo_device *vd, cmdfifo_info *f)
+static int cmdfifo_compute_expected_depth(voodoo_state *v, cmdfifo_info *f)
{
- UINT32 *fifobase = (UINT32 *)vd->fbi.ram;
+ UINT32 *fifobase = (UINT32 *)v->fbi.ram;
UINT32 readptr = f->rdptr;
UINT32 command = fifobase[readptr / 4];
int i, count = 0;
@@ -1554,9 +1616,9 @@ static int cmdfifo_compute_expected_depth(voodoo_device *vd, cmdfifo_info *f)
*
*************************************/
-UINT32 voodoo_device::cmdfifo_execute(voodoo_device *vd, cmdfifo_info *f)
+static UINT32 cmdfifo_execute(voodoo_state *v, cmdfifo_info *f)
{
- UINT32 *fifobase = (UINT32 *)vd->fbi.ram;
+ UINT32 *fifobase = (UINT32 *)v->fbi.ram;
UINT32 readptr = f->rdptr;
UINT32 *src = &fifobase[readptr / 4];
UINT32 command = *src++;
@@ -1587,26 +1649,26 @@ UINT32 voodoo_device::cmdfifo_execute(voodoo_device *vd, cmdfifo_info *f)
switch ((command >> 3) & 7)
{
case 0: /* NOP */
- if (LOG_CMDFIFO) vd->device->logerror(" NOP\n");
+ if (LOG_CMDFIFO) v->device->logerror(" NOP\n");
break;
case 1: /* JSR */
- if (LOG_CMDFIFO) vd->device->logerror(" JSR $%06X\n", target);
+ if (LOG_CMDFIFO) v->device->logerror(" JSR $%06X\n", target);
osd_printf_debug("JSR in CMDFIFO!\n");
src = &fifobase[target / 4];
break;
case 2: /* RET */
- if (LOG_CMDFIFO) vd->device->logerror(" RET $%06X\n", target);
+ if (LOG_CMDFIFO) v->device->logerror(" RET $%06X\n", target);
fatalerror("RET in CMDFIFO!\n");
case 3: /* JMP LOCAL FRAME BUFFER */
- if (LOG_CMDFIFO) vd->device->logerror(" JMP LOCAL FRAMEBUF $%06X\n", target);
+ if (LOG_CMDFIFO) v->device->logerror(" JMP LOCAL FRAMEBUF $%06X\n", target);
src = &fifobase[target / 4];
break;
case 4: /* JMP AGP */
- if (LOG_CMDFIFO) vd->device->logerror(" JMP AGP $%06X\n", target);
+ if (LOG_CMDFIFO) v->device->logerror(" JMP AGP $%06X\n", target);
fatalerror("JMP AGP in CMDFIFO!\n");
src = &fifobase[target / 4];
break;
@@ -1634,16 +1696,16 @@ UINT32 voodoo_device::cmdfifo_execute(voodoo_device *vd, cmdfifo_info *f)
inc = (command >> 15) & 1;
target = (command >> 3) & 0xfff;
- if (LOG_CMDFIFO) vd->device->logerror(" PACKET TYPE 1: count=%d inc=%d reg=%04X\n", count, inc, target);
+ if (LOG_CMDFIFO) v->device->logerror(" PACKET TYPE 1: count=%d inc=%d reg=%04X\n", count, inc, target);
- if (vd->vd_type >= TYPE_VOODOO_BANSHEE && (target & 0x800))
+ if (v->type >= TYPE_VOODOO_BANSHEE && (target & 0x800))
{
// Banshee/Voodoo3 2D register writes
/* loop over all registers and write them one at a time */
for (i = 0; i < count; i++, target += inc)
{
- cycles += banshee_2d_w(vd, target & 0xff, *src);
+ cycles += banshee_2d_w(v, target & 0xff, *src);
//logerror(" 2d reg: %03x = %08X\n", target & 0x7ff, *src);
src++;
}
@@ -1652,7 +1714,7 @@ UINT32 voodoo_device::cmdfifo_execute(voodoo_device *vd, cmdfifo_info *f)
{
/* loop over all registers and write them one at a time */
for (i = 0; i < count; i++, target += inc)
- cycles += register_w(vd, target, *src++);
+ cycles += register_w(v, target, *src++);
}
break;
@@ -1665,12 +1727,12 @@ UINT32 voodoo_device::cmdfifo_execute(voodoo_device *vd, cmdfifo_info *f)
1 31:0 = Data word
*/
case 2:
- if (LOG_CMDFIFO) vd->device->logerror(" PACKET TYPE 2: mask=%X\n", (command >> 3) & 0x1ffffff);
+ if (LOG_CMDFIFO) v->device->logerror(" PACKET TYPE 2: mask=%X\n", (command >> 3) & 0x1ffffff);
/* loop over all registers and write them one at a time */
for (i = 3; i <= 31; i++)
if (command & (1 << i))
- cycles += register_w(vd, banshee2D_clip0Min + (i - 3), *src++);
+ cycles += register_w(v, banshee2D_clip0Min + (i - 3), *src++);
break;
/*
@@ -1702,10 +1764,10 @@ UINT32 voodoo_device::cmdfifo_execute(voodoo_device *vd, cmdfifo_info *f)
count = (command >> 6) & 15;
code = (command >> 3) & 7;
- if (LOG_CMDFIFO) vd->device->logerror(" PACKET TYPE 3: count=%d code=%d mask=%03X smode=%02X pc=%d\n", count, code, (command >> 10) & 0xfff, (command >> 22) & 0x3f, (command >> 28) & 1);
+ if (LOG_CMDFIFO) v->device->logerror(" PACKET TYPE 3: count=%d code=%d mask=%03X smode=%02X pc=%d\n", count, code, (command >> 10) & 0xfff, (command >> 22) & 0x3f, (command >> 28) & 1);
/* copy relevant bits into the setup mode register */
- vd->reg[sSetupMode].u = ((command >> 10) & 0xff) | ((command >> 6) & 0xf0000);
+ v->reg[sSetupMode].u = ((command >> 10) & 0xff) | ((command >> 6) & 0xf0000);
/* loop over triangles */
for (i = 0; i < count; i++)
@@ -1772,8 +1834,8 @@ UINT32 voodoo_device::cmdfifo_execute(voodoo_device *vd, cmdfifo_info *f)
/* for a series of individual triangles, initialize all the verts */
if ((code == 1 && i == 0) || (code == 0 && i % 3 == 0))
{
- vd->fbi.sverts = 1;
- vd->fbi.svert[0] = vd->fbi.svert[1] = vd->fbi.svert[2] = svert;
+ v->fbi.sverts = 1;
+ v->fbi.svert[0] = v->fbi.svert[1] = v->fbi.svert[2] = svert;
}
/* otherwise, add this to the list */
@@ -1781,15 +1843,15 @@ UINT32 voodoo_device::cmdfifo_execute(voodoo_device *vd, cmdfifo_info *f)
{
/* for strip mode, shuffle vertex 1 down to 0 */
if (!(command & (1 << 22)))
- vd->fbi.svert[0] = vd->fbi.svert[1];
+ v->fbi.svert[0] = v->fbi.svert[1];
/* copy 2 down to 1 and add our new one regardless */
- vd->fbi.svert[1] = vd->fbi.svert[2];
- vd->fbi.svert[2] = svert;
+ v->fbi.svert[1] = v->fbi.svert[2];
+ v->fbi.svert[2] = svert;
/* if we have enough, draw */
- if (++vd->fbi.sverts >= 3)
- cycles += setup_and_draw_triangle(vd);
+ if (++v->fbi.sverts >= 3)
+ cycles += setup_and_draw_triangle(v);
}
}
@@ -1812,9 +1874,9 @@ UINT32 voodoo_device::cmdfifo_execute(voodoo_device *vd, cmdfifo_info *f)
/* extract parameters */
target = (command >> 3) & 0xfff;
- if (LOG_CMDFIFO) vd->device->logerror(" PACKET TYPE 4: mask=%X reg=%04X pad=%d\n", (command >> 15) & 0x3fff, target, command >> 29);
+ if (LOG_CMDFIFO) v->device->logerror(" PACKET TYPE 4: mask=%X reg=%04X pad=%d\n", (command >> 15) & 0x3fff, target, command >> 29);
- if (vd->vd_type >= TYPE_VOODOO_BANSHEE && (target & 0x800))
+ if (v->type >= TYPE_VOODOO_BANSHEE && (target & 0x800))
{
// Banshee/Voodoo3 2D register writes
@@ -1824,7 +1886,7 @@ UINT32 voodoo_device::cmdfifo_execute(voodoo_device *vd, cmdfifo_info *f)
{
if (command & (1 << i))
{
- cycles += banshee_2d_w(vd, target + (i - 15), *src);
+ cycles += banshee_2d_w(v, target + (i - 15), *src);
//logerror(" 2d reg: %03x = %08X\n", target & 0x7ff, *src);
src++;
}
@@ -1835,7 +1897,7 @@ UINT32 voodoo_device::cmdfifo_execute(voodoo_device *vd, cmdfifo_info *f)
/* loop over all registers and write them one at a time */
for (i = 15; i <= 28; i++)
if (command & (1 << i))
- cycles += register_w(vd, target + (i - 15), *src++);
+ cycles += register_w(v, target + (i - 15), *src++);
}
/* account for the extra dummy words */
@@ -1866,17 +1928,17 @@ UINT32 voodoo_device::cmdfifo_execute(voodoo_device *vd, cmdfifo_info *f)
{
case 0: // Linear FB
{
- if (LOG_CMDFIFO) vd->device->logerror(" PACKET TYPE 5: FB count=%d dest=%08X bd2=%X bdN=%X\n", count, target, (command >> 26) & 15, (command >> 22) & 15);
+ if (LOG_CMDFIFO) v->device->logerror(" PACKET TYPE 5: FB count=%d dest=%08X bd2=%X bdN=%X\n", count, target, (command >> 26) & 15, (command >> 22) & 15);
UINT32 addr = target * 4;
for (i=0; i < count; i++)
{
UINT32 data = *src++;
- vd->fbi.ram[BYTE_XOR_LE(addr + 0)] = (UINT8)(data);
- vd->fbi.ram[BYTE_XOR_LE(addr + 1)] = (UINT8)(data >> 8);
- vd->fbi.ram[BYTE_XOR_LE(addr + 2)] = (UINT8)(data >> 16);
- vd->fbi.ram[BYTE_XOR_LE(addr + 3)] = (UINT8)(data >> 24);
+ v->fbi.ram[BYTE_XOR_LE(addr + 0)] = (UINT8)(data);
+ v->fbi.ram[BYTE_XOR_LE(addr + 1)] = (UINT8)(data >> 8);
+ v->fbi.ram[BYTE_XOR_LE(addr + 2)] = (UINT8)(data >> 16);
+ v->fbi.ram[BYTE_XOR_LE(addr + 3)] = (UINT8)(data >> 24);
addr += 4;
}
@@ -1884,11 +1946,11 @@ UINT32 voodoo_device::cmdfifo_execute(voodoo_device *vd, cmdfifo_info *f)
}
case 2: // 3D LFB
{
- if (LOG_CMDFIFO) vd->device->logerror(" PACKET TYPE 5: 3D LFB count=%d dest=%08X bd2=%X bdN=%X\n", count, target, (command >> 26) & 15, (command >> 22) & 15);
+ if (LOG_CMDFIFO) v->device->logerror(" PACKET TYPE 5: 3D LFB count=%d dest=%08X bd2=%X bdN=%X\n", count, target, (command >> 26) & 15, (command >> 22) & 15);
/* loop over words */
for (i = 0; i < count; i++)
- cycles += lfb_w(vd, target++, *src++, 0xffffffff);
+ cycles += lfb_w(v, target++, *src++, 0xffffffff);
break;
}
@@ -1909,11 +1971,11 @@ UINT32 voodoo_device::cmdfifo_execute(voodoo_device *vd, cmdfifo_info *f)
case 3: // Texture Port
{
- if (LOG_CMDFIFO) vd->device->logerror(" PACKET TYPE 5: textureRAM count=%d dest=%08X bd2=%X bdN=%X\n", count, target, (command >> 26) & 15, (command >> 22) & 15);
+ if (LOG_CMDFIFO) v->device->logerror(" PACKET TYPE 5: textureRAM count=%d dest=%08X bd2=%X bdN=%X\n", count, target, (command >> 26) & 15, (command >> 22) & 15);
/* loop over words */
for (i = 0; i < count; i++)
- cycles += texture_w(vd, target++, *src++);
+ cycles += texture_w(v, target++, *src++);
break;
}
@@ -1939,7 +2001,7 @@ UINT32 voodoo_device::cmdfifo_execute(voodoo_device *vd, cmdfifo_info *f)
*
*************************************/
-INT32 voodoo_device::cmdfifo_execute_if_ready(voodoo_device* vd, cmdfifo_info *f)
+static INT32 cmdfifo_execute_if_ready(voodoo_state *v, cmdfifo_info *f)
{
int needed_depth;
int cycles;
@@ -1949,12 +2011,12 @@ INT32 voodoo_device::cmdfifo_execute_if_ready(voodoo_device* vd, cmdfifo_info *f
return -1;
/* see if we have enough for the current command */
- needed_depth = cmdfifo_compute_expected_depth(vd, f);
+ needed_depth = cmdfifo_compute_expected_depth(v, f);
if (f->depth < needed_depth)
return -1;
/* execute */
- cycles = cmdfifo_execute(vd, f);
+ cycles = cmdfifo_execute(v, f);
f->depth -= needed_depth;
return cycles;
}
@@ -1967,12 +2029,12 @@ INT32 voodoo_device::cmdfifo_execute_if_ready(voodoo_device* vd, cmdfifo_info *f
*
*************************************/
-void voodoo_device::cmdfifo_w(voodoo_device *vd, cmdfifo_info *f, offs_t offset, UINT32 data)
+static void cmdfifo_w(voodoo_state *v, cmdfifo_info *f, offs_t offset, UINT32 data)
{
UINT32 addr = f->base + offset * 4;
- UINT32 *fifobase = (UINT32 *)vd->fbi.ram;
+ UINT32 *fifobase = (UINT32 *)v->fbi.ram;
- if (LOG_CMDFIFO_VERBOSE) vd->device->logerror("CMDFIFO_w(%04X) = %08X\n", offset, data);
+ if (LOG_CMDFIFO_VERBOSE) v->device->logerror("CMDFIFO_w(%04X) = %08X\n", offset, data);
/* write the data */
if (addr < f->end)
@@ -1992,7 +2054,7 @@ void voodoo_device::cmdfifo_w(voodoo_device *vd, cmdfifo_info *f, offs_t offset,
else if (addr < f->amin)
{
if (f->holes != 0)
- vd->device->logerror("Unexpected CMDFIFO: AMin=%08X AMax=%08X Holes=%d WroteTo:%08X\n",
+ v->device->logerror("Unexpected CMDFIFO: AMin=%08X AMax=%08X Holes=%d WroteTo:%08X\n",
f->amin, f->amax, f->holes, addr);
//f->amin = f->amax = addr;
f->holes += (addr - f->base) / 4;
@@ -2022,17 +2084,17 @@ void voodoo_device::cmdfifo_w(voodoo_device *vd, cmdfifo_info *f, offs_t offset,
}
/* execute if we can */
- if (!vd->pci.op_pending)
+ if (!v->pci.op_pending)
{
- INT32 cycles = cmdfifo_execute_if_ready(vd, f);
+ INT32 cycles = cmdfifo_execute_if_ready(v, f);
if (cycles > 0)
{
- vd->pci.op_pending = TRUE;
- vd->pci.op_end_time = vd->device->machine().time() + attotime(0, (attoseconds_t)cycles * vd->attoseconds_per_cycle);
+ v->pci.op_pending = TRUE;
+ v->pci.op_end_time = v->device->machine().time() + attotime(0, (attoseconds_t)cycles * v->attoseconds_per_cycle);
- if (LOG_FIFO_VERBOSE) vd->device->logerror("VOODOO.%d.FIFO:direct write start at %d.%08X%08X end at %d.%08X%08X\n", vd->index,
- vd->device->machine().time().seconds(), (UINT32)(vd->device->machine().time().attoseconds() >> 32), (UINT32)vd->device->machine().time().attoseconds(),
- vd->pci.op_end_time.seconds(), (UINT32)(vd->pci.op_end_time.attoseconds() >> 32), (UINT32)vd->pci.op_end_time.attoseconds());
+ if (LOG_FIFO_VERBOSE) v->device->logerror("VOODOO.%d.FIFO:direct write start at %d.%08X%08X end at %d.%08X%08X\n", v->index,
+ v->device->machine().time().seconds(), (UINT32)(v->device->machine().time().attoseconds() >> 32), (UINT32)v->device->machine().time().attoseconds(),
+ v->pci.op_end_time.seconds(), (UINT32)(v->pci.op_end_time.attoseconds() >> 32), (UINT32)v->pci.op_end_time.attoseconds());
}
}
}
@@ -2046,83 +2108,83 @@ void voodoo_device::cmdfifo_w(voodoo_device *vd, cmdfifo_info *f, offs_t offset,
*
*************************************/
-TIMER_CALLBACK_MEMBER( voodoo_device::stall_cpu_callback )
+static TIMER_CALLBACK( stall_cpu_callback )
{
- check_stalled_cpu(this, machine().time());
+ check_stalled_cpu((voodoo_state *)ptr, machine.time());
}
-void voodoo_device::check_stalled_cpu(voodoo_device* vd, attotime current_time)
+static void check_stalled_cpu(voodoo_state *v, attotime current_time)
{
int resume = FALSE;
/* flush anything we can */
- if (vd->pci.op_pending)
- flush_fifos(vd, current_time);
+ if (v->pci.op_pending)
+ flush_fifos(v, current_time);
/* if we're just stalled until the LWM is passed, see if we're ok now */
- if (vd->pci.stall_state == STALLED_UNTIL_FIFO_LWM)
+ if (v->pci.stall_state == STALLED_UNTIL_FIFO_LWM)
{
/* if there's room in the memory FIFO now, we can proceed */
- if (FBIINIT0_ENABLE_MEMORY_FIFO(vd->reg[fbiInit0].u))
+ if (FBIINIT0_ENABLE_MEMORY_FIFO(v->reg[fbiInit0].u))
{
- if (fifo_items(&vd->fbi.fifo) < 2 * 32 * FBIINIT0_MEMORY_FIFO_HWM(vd->reg[fbiInit0].u))
+ if (fifo_items(&v->fbi.fifo) < 2 * 32 * FBIINIT0_MEMORY_FIFO_HWM(v->reg[fbiInit0].u))
resume = TRUE;
}
- else if (fifo_space(&vd->pci.fifo) > 2 * FBIINIT0_PCI_FIFO_LWM(vd->reg[fbiInit0].u))
+ else if (fifo_space(&v->pci.fifo) > 2 * FBIINIT0_PCI_FIFO_LWM(v->reg[fbiInit0].u))
resume = TRUE;
}
/* if we're stalled until the FIFOs are empty, check now */
- else if (vd->pci.stall_state == STALLED_UNTIL_FIFO_EMPTY)
+ else if (v->pci.stall_state == STALLED_UNTIL_FIFO_EMPTY)
{
- if (FBIINIT0_ENABLE_MEMORY_FIFO(vd->reg[fbiInit0].u))
+ if (FBIINIT0_ENABLE_MEMORY_FIFO(v->reg[fbiInit0].u))
{
- if (fifo_empty(&vd->fbi.fifo) && fifo_empty(&vd->pci.fifo))
+ if (fifo_empty(&v->fbi.fifo) && fifo_empty(&v->pci.fifo))
resume = TRUE;
}
- else if (fifo_empty(&vd->pci.fifo))
+ else if (fifo_empty(&v->pci.fifo))
resume = TRUE;
}
/* resume if necessary */
- if (resume || !vd->pci.op_pending)
+ if (resume || !v->pci.op_pending)
{
- if (LOG_FIFO) vd->device->logerror("VOODOO.%d.FIFO:Stall condition cleared; resuming\n", vd->index);
- vd->pci.stall_state = NOT_STALLED;
+ if (LOG_FIFO) v->device->logerror("VOODOO.%d.FIFO:Stall condition cleared; resuming\n", v->index);
+ v->pci.stall_state = NOT_STALLED;
/* either call the callback, or trigger the trigger */
- if (!vd->device->m_stall.isnull())
- vd->device->m_stall(FALSE);
+ if (!v->device->m_stall.isnull())
+ v->device->m_stall(FALSE);
else
- vd->device->machine().scheduler().trigger(vd->trigger);
+ v->device->machine().scheduler().trigger(v->trigger);
}
/* if not, set a timer for the next one */
else
{
- vd->pci.continue_timer->adjust(vd->pci.op_end_time - current_time);
+ v->pci.continue_timer->adjust(v->pci.op_end_time - current_time);
}
}
-void voodoo_device::stall_cpu(voodoo_device *vd, int state, attotime current_time)
+static void stall_cpu(voodoo_state *v, int state, attotime current_time)
{
/* sanity check */
- if (!vd->pci.op_pending) fatalerror("FIFOs not empty, no op pending!\n");
+ if (!v->pci.op_pending) fatalerror("FIFOs not empty, no op pending!\n");
/* set the state and update statistics */
- vd->pci.stall_state = state;
- vd->stats.stalls++;
+ v->pci.stall_state = state;
+ v->stats.stalls++;
/* either call the callback, or spin the CPU */
- if (!vd->device->m_stall.isnull())
- vd->device->m_stall(TRUE);
+ if (!v->device->m_stall.isnull())
+ v->device->m_stall(TRUE);
else
- vd->cpu->execute().spin_until_trigger(vd->trigger);
+ v->cpu->execute().spin_until_trigger(v->trigger);
/* set a timer to clear the stall */
- vd->pci.continue_timer->adjust(vd->pci.op_end_time - current_time);
+ v->pci.continue_timer->adjust(v->pci.op_end_time - current_time);
}
@@ -2133,7 +2195,7 @@ void voodoo_device::stall_cpu(voodoo_device *vd, int state, attotime current_tim
*
*************************************/
-INT32 voodoo_device::register_w(voodoo_device *vd, offs_t offset, UINT32 data)
+static INT32 register_w(voodoo_state *v, offs_t offset, UINT32 data)
{
UINT32 origdata = data;
INT32 cycles = 0;
@@ -2142,24 +2204,24 @@ INT32 voodoo_device::register_w(voodoo_device *vd, offs_t offset, UINT32 data)
UINT8 chips;
/* statistics */
- vd->stats.reg_writes++;
+ v->stats.reg_writes++;
/* determine which chips we are addressing */
chips = (offset >> 8) & 0xf;
if (chips == 0)
chips = 0xf;
- chips &= vd->chipmask;
+ chips &= v->chipmask;
/* the first 64 registers can be aliased differently */
- if ((offset & 0x800c0) == 0x80000 && vd->alt_regmap)
+ if ((offset & 0x800c0) == 0x80000 && v->alt_regmap)
regnum = register_alias_map[offset & 0x3f];
else
regnum = offset & 0xff;
/* first make sure this register is readable */
- if (!(vd->regaccess[regnum] & REGISTER_WRITE))
+ if (!(v->regaccess[regnum] & REGISTER_WRITE))
{
- vd->device->logerror("VOODOO.%d.ERROR:Invalid attempt to write %s\n", vd->index, vd->regnames[regnum]);
+ v->device->logerror("VOODOO.%d.ERROR:Invalid attempt to write %s\n", v->index, v->regnames[regnum]);
return 0;
}
@@ -2170,227 +2232,227 @@ INT32 voodoo_device::register_w(voodoo_device *vd, offs_t offset, UINT32 data)
case fvertexAx:
data = float_to_int32(data, 4);
case vertexAx:
- if (chips & 1) vd->fbi.ax = (INT16)data;
+ if (chips & 1) v->fbi.ax = (INT16)data;
break;
case fvertexAy:
data = float_to_int32(data, 4);
case vertexAy:
- if (chips & 1) vd->fbi.ay = (INT16)data;
+ if (chips & 1) v->fbi.ay = (INT16)data;
break;
case fvertexBx:
data = float_to_int32(data, 4);
case vertexBx:
- if (chips & 1) vd->fbi.bx = (INT16)data;
+ if (chips & 1) v->fbi.bx = (INT16)data;
break;
case fvertexBy:
data = float_to_int32(data, 4);
case vertexBy:
- if (chips & 1) vd->fbi.by = (INT16)data;
+ if (chips & 1) v->fbi.by = (INT16)data;
break;
case fvertexCx:
data = float_to_int32(data, 4);
case vertexCx:
- if (chips & 1) vd->fbi.cx = (INT16)data;
+ if (chips & 1) v->fbi.cx = (INT16)data;
break;
case fvertexCy:
data = float_to_int32(data, 4);
case vertexCy:
- if (chips & 1) vd->fbi.cy = (INT16)data;
+ if (chips & 1) v->fbi.cy = (INT16)data;
break;
/* RGB data is 12.12 formatted fixed point */
case fstartR:
data = float_to_int32(data, 12);
case startR:
- if (chips & 1) vd->fbi.startr = (INT32)(data << 8) >> 8;
+ if (chips & 1) v->fbi.startr = (INT32)(data << 8) >> 8;
break;
case fstartG:
data = float_to_int32(data, 12);
case startG:
- if (chips & 1) vd->fbi.startg = (INT32)(data << 8) >> 8;
+ if (chips & 1) v->fbi.startg = (INT32)(data << 8) >> 8;
break;
case fstartB:
data = float_to_int32(data, 12);
case startB:
- if (chips & 1) vd->fbi.startb = (INT32)(data << 8) >> 8;
+ if (chips & 1) v->fbi.startb = (INT32)(data << 8) >> 8;
break;
case fstartA:
data = float_to_int32(data, 12);
case startA:
- if (chips & 1) vd->fbi.starta = (INT32)(data << 8) >> 8;
+ if (chips & 1) v->fbi.starta = (INT32)(data << 8) >> 8;
break;
case fdRdX:
data = float_to_int32(data, 12);
case dRdX:
- if (chips & 1) vd->fbi.drdx = (INT32)(data << 8) >> 8;
+ if (chips & 1) v->fbi.drdx = (INT32)(data << 8) >> 8;
break;
case fdGdX:
data = float_to_int32(data, 12);
case dGdX:
- if (chips & 1) vd->fbi.dgdx = (INT32)(data << 8) >> 8;
+ if (chips & 1) v->fbi.dgdx = (INT32)(data << 8) >> 8;
break;
case fdBdX:
data = float_to_int32(data, 12);
case dBdX:
- if (chips & 1) vd->fbi.dbdx = (INT32)(data << 8) >> 8;
+ if (chips & 1) v->fbi.dbdx = (INT32)(data << 8) >> 8;
break;
case fdAdX:
data = float_to_int32(data, 12);
case dAdX:
- if (chips & 1) vd->fbi.dadx = (INT32)(data << 8) >> 8;
+ if (chips & 1) v->fbi.dadx = (INT32)(data << 8) >> 8;
break;
case fdRdY:
data = float_to_int32(data, 12);
case dRdY:
- if (chips & 1) vd->fbi.drdy = (INT32)(data << 8) >> 8;
+ if (chips & 1) v->fbi.drdy = (INT32)(data << 8) >> 8;
break;
case fdGdY:
data = float_to_int32(data, 12);
case dGdY:
- if (chips & 1) vd->fbi.dgdy = (INT32)(data << 8) >> 8;
+ if (chips & 1) v->fbi.dgdy = (INT32)(data << 8) >> 8;
break;
case fdBdY:
data = float_to_int32(data, 12);
case dBdY:
- if (chips & 1) vd->fbi.dbdy = (INT32)(data << 8) >> 8;
+ if (chips & 1) v->fbi.dbdy = (INT32)(data << 8) >> 8;
break;
case fdAdY:
data = float_to_int32(data, 12);
case dAdY:
- if (chips & 1) vd->fbi.dady = (INT32)(data << 8) >> 8;
+ if (chips & 1) v->fbi.dady = (INT32)(data << 8) >> 8;
break;
/* Z data is 20.12 formatted fixed point */
case fstartZ:
data = float_to_int32(data, 12);
case startZ:
- if (chips & 1) vd->fbi.startz = (INT32)data;
+ if (chips & 1) v->fbi.startz = (INT32)data;
break;
case fdZdX:
data = float_to_int32(data, 12);
case dZdX:
- if (chips & 1) vd->fbi.dzdx = (INT32)data;
+ if (chips & 1) v->fbi.dzdx = (INT32)data;
break;
case fdZdY:
data = float_to_int32(data, 12);
case dZdY:
- if (chips & 1) vd->fbi.dzdy = (INT32)data;
+ if (chips & 1) v->fbi.dzdy = (INT32)data;
break;
/* S,T data is 14.18 formatted fixed point, converted to 16.32 internally */
case fstartS:
data64 = float_to_int64(data, 32);
- if (chips & 2) vd->tmu[0].starts = data64;
- if (chips & 4) vd->tmu[1].starts = data64;
+ if (chips & 2) v->tmu[0].starts = data64;
+ if (chips & 4) v->tmu[1].starts = data64;
break;
case startS:
- if (chips & 2) vd->tmu[0].starts = (INT64)(INT32)data << 14;
- if (chips & 4) vd->tmu[1].starts = (INT64)(INT32)data << 14;
+ if (chips & 2) v->tmu[0].starts = (INT64)(INT32)data << 14;
+ if (chips & 4) v->tmu[1].starts = (INT64)(INT32)data << 14;
break;
case fstartT:
data64 = float_to_int64(data, 32);
- if (chips & 2) vd->tmu[0].startt = data64;
- if (chips & 4) vd->tmu[1].startt = data64;
+ if (chips & 2) v->tmu[0].startt = data64;
+ if (chips & 4) v->tmu[1].startt = data64;
break;
case startT:
- if (chips & 2) vd->tmu[0].startt = (INT64)(INT32)data << 14;
- if (chips & 4) vd->tmu[1].startt = (INT64)(INT32)data << 14;
+ if (chips & 2) v->tmu[0].startt = (INT64)(INT32)data << 14;
+ if (chips & 4) v->tmu[1].startt = (INT64)(INT32)data << 14;
break;
case fdSdX:
data64 = float_to_int64(data, 32);
- if (chips & 2) vd->tmu[0].dsdx = data64;
- if (chips & 4) vd->tmu[1].dsdx = data64;
+ if (chips & 2) v->tmu[0].dsdx = data64;
+ if (chips & 4) v->tmu[1].dsdx = data64;
break;
case dSdX:
- if (chips & 2) vd->tmu[0].dsdx = (INT64)(INT32)data << 14;
- if (chips & 4) vd->tmu[1].dsdx = (INT64)(INT32)data << 14;
+ if (chips & 2) v->tmu[0].dsdx = (INT64)(INT32)data << 14;
+ if (chips & 4) v->tmu[1].dsdx = (INT64)(INT32)data << 14;
break;
case fdTdX:
data64 = float_to_int64(data, 32);
- if (chips & 2) vd->tmu[0].dtdx = data64;
- if (chips & 4) vd->tmu[1].dtdx = data64;
+ if (chips & 2) v->tmu[0].dtdx = data64;
+ if (chips & 4) v->tmu[1].dtdx = data64;
break;
case dTdX:
- if (chips & 2) vd->tmu[0].dtdx = (INT64)(INT32)data << 14;
- if (chips & 4) vd->tmu[1].dtdx = (INT64)(INT32)data << 14;
+ if (chips & 2) v->tmu[0].dtdx = (INT64)(INT32)data << 14;
+ if (chips & 4) v->tmu[1].dtdx = (INT64)(INT32)data << 14;
break;
case fdSdY:
data64 = float_to_int64(data, 32);
- if (chips & 2) vd->tmu[0].dsdy = data64;
- if (chips & 4) vd->tmu[1].dsdy = data64;
+ if (chips & 2) v->tmu[0].dsdy = data64;
+ if (chips & 4) v->tmu[1].dsdy = data64;
break;
case dSdY:
- if (chips & 2) vd->tmu[0].dsdy = (INT64)(INT32)data << 14;
- if (chips & 4) vd->tmu[1].dsdy = (INT64)(INT32)data << 14;
+ if (chips & 2) v->tmu[0].dsdy = (INT64)(INT32)data << 14;
+ if (chips & 4) v->tmu[1].dsdy = (INT64)(INT32)data << 14;
break;
case fdTdY:
data64 = float_to_int64(data, 32);
- if (chips & 2) vd->tmu[0].dtdy = data64;
- if (chips & 4) vd->tmu[1].dtdy = data64;
+ if (chips & 2) v->tmu[0].dtdy = data64;
+ if (chips & 4) v->tmu[1].dtdy = data64;
break;
case dTdY:
- if (chips & 2) vd->tmu[0].dtdy = (INT64)(INT32)data << 14;
- if (chips & 4) vd->tmu[1].dtdy = (INT64)(INT32)data << 14;
+ if (chips & 2) v->tmu[0].dtdy = (INT64)(INT32)data << 14;
+ if (chips & 4) v->tmu[1].dtdy = (INT64)(INT32)data << 14;
break;
/* W data is 2.30 formatted fixed point, converted to 16.32 internally */
case fstartW:
data64 = float_to_int64(data, 32);
- if (chips & 1) vd->fbi.startw = data64;
- if (chips & 2) vd->tmu[0].startw = data64;
- if (chips & 4) vd->tmu[1].startw = data64;
+ if (chips & 1) v->fbi.startw = data64;
+ if (chips & 2) v->tmu[0].startw = data64;
+ if (chips & 4) v->tmu[1].startw = data64;
break;
case startW:
- if (chips & 1) vd->fbi.startw = (INT64)(INT32)data << 2;
- if (chips & 2) vd->tmu[0].startw = (INT64)(INT32)data << 2;
- if (chips & 4) vd->tmu[1].startw = (INT64)(INT32)data << 2;
+ if (chips & 1) v->fbi.startw = (INT64)(INT32)data << 2;
+ if (chips & 2) v->tmu[0].startw = (INT64)(INT32)data << 2;
+ if (chips & 4) v->tmu[1].startw = (INT64)(INT32)data << 2;
break;
case fdWdX:
data64 = float_to_int64(data, 32);
- if (chips & 1) vd->fbi.dwdx = data64;
- if (chips & 2) vd->tmu[0].dwdx = data64;
- if (chips & 4) vd->tmu[1].dwdx = data64;
+ if (chips & 1) v->fbi.dwdx = data64;
+ if (chips & 2) v->tmu[0].dwdx = data64;
+ if (chips & 4) v->tmu[1].dwdx = data64;
break;
case dWdX:
- if (chips & 1) vd->fbi.dwdx = (INT64)(INT32)data << 2;
- if (chips & 2) vd->tmu[0].dwdx = (INT64)(INT32)data << 2;
- if (chips & 4) vd->tmu[1].dwdx = (INT64)(INT32)data << 2;
+ if (chips & 1) v->fbi.dwdx = (INT64)(INT32)data << 2;
+ if (chips & 2) v->tmu[0].dwdx = (INT64)(INT32)data << 2;
+ if (chips & 4) v->tmu[1].dwdx = (INT64)(INT32)data << 2;
break;
case fdWdY:
data64 = float_to_int64(data, 32);
- if (chips & 1) vd->fbi.dwdy = data64;
- if (chips & 2) vd->tmu[0].dwdy = data64;
- if (chips & 4) vd->tmu[1].dwdy = data64;
+ if (chips & 1) v->fbi.dwdy = data64;
+ if (chips & 2) v->tmu[0].dwdy = data64;
+ if (chips & 4) v->tmu[1].dwdy = data64;
break;
case dWdY:
- if (chips & 1) vd->fbi.dwdy = (INT64)(INT32)data << 2;
- if (chips & 2) vd->tmu[0].dwdy = (INT64)(INT32)data << 2;
- if (chips & 4) vd->tmu[1].dwdy = (INT64)(INT32)data << 2;
+ if (chips & 1) v->fbi.dwdy = (INT64)(INT32)data << 2;
+ if (chips & 2) v->tmu[0].dwdy = (INT64)(INT32)data << 2;
+ if (chips & 4) v->tmu[1].dwdy = (INT64)(INT32)data << 2;
break;
/* setup bits */
@@ -2398,114 +2460,114 @@ INT32 voodoo_device::register_w(voodoo_device *vd, offs_t offset, UINT32 data)
if (chips & 1)
{
rgb_t rgbdata(data);
- vd->reg[sAlpha].f = rgbdata.a();
- vd->reg[sRed].f = rgbdata.r();
- vd->reg[sGreen].f = rgbdata.g();
- vd->reg[sBlue].f = rgbdata.b();
+ v->reg[sAlpha].f = rgbdata.a();
+ v->reg[sRed].f = rgbdata.r();
+ v->reg[sGreen].f = rgbdata.g();
+ v->reg[sBlue].f = rgbdata.b();
}
break;
/* mask off invalid bits for different cards */
case fbzColorPath:
- poly_wait(vd->poly, vd->regnames[regnum]);
- if (vd->vd_type < TYPE_VOODOO_2)
+ poly_wait(v->poly, v->regnames[regnum]);
+ if (v->type < TYPE_VOODOO_2)
data &= 0x0fffffff;
- if (chips & 1) vd->reg[fbzColorPath].u = data;
+ if (chips & 1) v->reg[fbzColorPath].u = data;
break;
case fbzMode:
- poly_wait(vd->poly, vd->regnames[regnum]);
- if (vd->vd_type < TYPE_VOODOO_2)
+ poly_wait(v->poly, v->regnames[regnum]);
+ if (v->type < TYPE_VOODOO_2)
data &= 0x001fffff;
- if (chips & 1) vd->reg[fbzMode].u = data;
+ if (chips & 1) v->reg[fbzMode].u = data;
break;
case fogMode:
- poly_wait(vd->poly, vd->regnames[regnum]);
- if (vd->vd_type < TYPE_VOODOO_2)
+ poly_wait(v->poly, v->regnames[regnum]);
+ if (v->type < TYPE_VOODOO_2)
data &= 0x0000003f;
- if (chips & 1) vd->reg[fogMode].u = data;
+ if (chips & 1) v->reg[fogMode].u = data;
break;
/* triangle drawing */
case triangleCMD:
- vd->fbi.cheating_allowed = (vd->fbi.ax != 0 || vd->fbi.ay != 0 || vd->fbi.bx > 50 || vd->fbi.by != 0 || vd->fbi.cx != 0 || vd->fbi.cy > 50);
- vd->fbi.sign = data;
- cycles = triangle(vd);
+ v->fbi.cheating_allowed = (v->fbi.ax != 0 || v->fbi.ay != 0 || v->fbi.bx > 50 || v->fbi.by != 0 || v->fbi.cx != 0 || v->fbi.cy > 50);
+ v->fbi.sign = data;
+ cycles = triangle(v);
break;
case ftriangleCMD:
- vd->fbi.cheating_allowed = TRUE;
- vd->fbi.sign = data;
- cycles = triangle(vd);
+ v->fbi.cheating_allowed = TRUE;
+ v->fbi.sign = data;
+ cycles = triangle(v);
break;
case sBeginTriCMD:
- cycles = begin_triangle(vd);
+ cycles = begin_triangle(v);
break;
case sDrawTriCMD:
- cycles = draw_triangle(vd);
+ cycles = draw_triangle(v);
break;
/* other commands */
case nopCMD:
- poly_wait(vd->poly, vd->regnames[regnum]);
+ poly_wait(v->poly, v->regnames[regnum]);
if (data & 1)
- reset_counters(vd);
+ reset_counters(v);
if (data & 2)
- vd->reg[fbiTrianglesOut].u = 0;
+ v->reg[fbiTrianglesOut].u = 0;
break;
case fastfillCMD:
- cycles = fastfill(vd);
+ cycles = fastfill(v);
break;
case swapbufferCMD:
- poly_wait(vd->poly, vd->regnames[regnum]);
- cycles = swapbuffer(vd, data);
+ poly_wait(v->poly, v->regnames[regnum]);
+ cycles = swapbuffer(v, data);
break;
case userIntrCMD:
- poly_wait(vd->poly, vd->regnames[regnum]);
+ poly_wait(v->poly, v->regnames[regnum]);
//fatalerror("userIntrCMD\n");
- vd->reg[intrCtrl].u |= 0x1800;
- vd->reg[intrCtrl].u &= ~0x80000000;
+ v->reg[intrCtrl].u |= 0x1800;
+ v->reg[intrCtrl].u &= ~0x80000000;
// TODO: rename vblank_client for less confusion?
- if (!vd->device->m_vblank.isnull())
- vd->device->m_vblank(TRUE);
+ if (!v->device->m_vblank.isnull())
+ v->device->m_vblank(TRUE);
break;
/* gamma table access -- Voodoo/Voodoo2 only */
case clutData:
- if (vd->vd_type <= TYPE_VOODOO_2 && (chips & 1))
+ if (v->type <= TYPE_VOODOO_2 && (chips & 1))
{
- poly_wait(vd->poly, vd->regnames[regnum]);
- if (!FBIINIT1_VIDEO_TIMING_RESET(vd->reg[fbiInit1].u))
+ poly_wait(v->poly, v->regnames[regnum]);
+ if (!FBIINIT1_VIDEO_TIMING_RESET(v->reg[fbiInit1].u))
{
int index = data >> 24;
if (index <= 32)
{
- vd->fbi.clut[index] = data;
- vd->fbi.clut_dirty = TRUE;
+ v->fbi.clut[index] = data;
+ v->fbi.clut_dirty = TRUE;
}
}
else
- vd->device->logerror("clutData ignored because video timing reset = 1\n");
+ v->device->logerror("clutData ignored because video timing reset = 1\n");
}
break;
/* external DAC access -- Voodoo/Voodoo2 only */
case dacData:
- if (vd->vd_type <= TYPE_VOODOO_2 && (chips & 1))
+ if (v->type <= TYPE_VOODOO_2 && (chips & 1))
{
- poly_wait(vd->poly, vd->regnames[regnum]);
+ poly_wait(v->poly, v->regnames[regnum]);
if (!(data & 0x800))
- dacdata_w(&vd->dac, (data >> 8) & 7, data & 0xff);
+ dacdata_w(&v->dac, (data >> 8) & 7, data & 0xff);
else
- dacdata_r(&vd->dac, (data >> 8) & 7);
+ dacdata_r(&v->dac, (data >> 8) & 7);
}
break;
@@ -2514,35 +2576,35 @@ INT32 voodoo_device::register_w(voodoo_device *vd, offs_t offset, UINT32 data)
case vSync:
case backPorch:
case videoDimensions:
- if (vd->vd_type <= TYPE_VOODOO_2 && (chips & 1))
+ if (v->type <= TYPE_VOODOO_2 && (chips & 1))
{
- poly_wait(vd->poly, vd->regnames[regnum]);
- vd->reg[regnum].u = data;
- if (vd->reg[hSync].u != 0 && vd->reg[vSync].u != 0 && vd->reg[videoDimensions].u != 0)
+ poly_wait(v->poly, v->regnames[regnum]);
+ v->reg[regnum].u = data;
+ if (v->reg[hSync].u != 0 && v->reg[vSync].u != 0 && v->reg[videoDimensions].u != 0)
{
int hvis, vvis, htotal, vtotal, hbp, vbp;
- attoseconds_t refresh = vd->screen->frame_period().attoseconds();
+ attoseconds_t refresh = v->screen->frame_period().attoseconds();
attoseconds_t stdperiod, medperiod, vgaperiod;
attoseconds_t stddiff, meddiff, vgadiff;
rectangle visarea;
- if (vd->vd_type == TYPE_VOODOO_2)
+ if (v->type == TYPE_VOODOO_2)
{
- htotal = ((vd->reg[hSync].u >> 16) & 0x7ff) + 1 + (vd->reg[hSync].u & 0x1ff) + 1;
- vtotal = ((vd->reg[vSync].u >> 16) & 0x1fff) + (vd->reg[vSync].u & 0x1fff);
- hvis = vd->reg[videoDimensions].u & 0x7ff;
- vvis = (vd->reg[videoDimensions].u >> 16) & 0x7ff;
- hbp = (vd->reg[backPorch].u & 0x1ff) + 2;
- vbp = (vd->reg[backPorch].u >> 16) & 0x1ff;
+ htotal = ((v->reg[hSync].u >> 16) & 0x7ff) + 1 + (v->reg[hSync].u & 0x1ff) + 1;
+ vtotal = ((v->reg[vSync].u >> 16) & 0x1fff) + (v->reg[vSync].u & 0x1fff);
+ hvis = v->reg[videoDimensions].u & 0x7ff;
+ vvis = (v->reg[videoDimensions].u >> 16) & 0x7ff;
+ hbp = (v->reg[backPorch].u & 0x1ff) + 2;
+ vbp = (v->reg[backPorch].u >> 16) & 0x1ff;
}
else
{
- htotal = ((vd->reg[hSync].u >> 16) & 0x3ff) + 1 + (vd->reg[hSync].u & 0xff) + 1;
- vtotal = ((vd->reg[vSync].u >> 16) & 0xfff) + (vd->reg[vSync].u & 0xfff);
- hvis = vd->reg[videoDimensions].u & 0x3ff;
- vvis = (vd->reg[videoDimensions].u >> 16) & 0x3ff;
- hbp = (vd->reg[backPorch].u & 0xff) + 2;
- vbp = (vd->reg[backPorch].u >> 16) & 0xff;
+ htotal = ((v->reg[hSync].u >> 16) & 0x3ff) + 1 + (v->reg[hSync].u & 0xff) + 1;
+ vtotal = ((v->reg[vSync].u >> 16) & 0xfff) + (v->reg[vSync].u & 0xfff);
+ hvis = v->reg[videoDimensions].u & 0x3ff;
+ vvis = (v->reg[videoDimensions].u >> 16) & 0x3ff;
+ hbp = (v->reg[backPorch].u & 0xff) + 2;
+ vbp = (v->reg[backPorch].u >> 16) & 0xff;
}
/* create a new visarea */
@@ -2566,61 +2628,61 @@ INT32 voodoo_device::register_w(voodoo_device *vd, offs_t offset, UINT32 data)
if (vgadiff < 0) vgadiff = -vgadiff;
osd_printf_debug("hSync=%08X vSync=%08X backPorch=%08X videoDimensions=%08X\n",
- vd->reg[hSync].u, vd->reg[vSync].u, vd->reg[backPorch].u, vd->reg[videoDimensions].u);
+ v->reg[hSync].u, v->reg[vSync].u, v->reg[backPorch].u, v->reg[videoDimensions].u);
osd_printf_debug("Horiz: %d-%d (%d total) Vert: %d-%d (%d total) -- ", visarea.min_x, visarea.max_x, htotal, visarea.min_y, visarea.max_y, vtotal);
/* configure the screen based on which one matches the closest */
if (stddiff < meddiff && stddiff < vgadiff)
{
- vd->screen->configure(htotal, vtotal, visarea, stdperiod);
+ v->screen->configure(htotal, vtotal, visarea, stdperiod);
osd_printf_debug("Standard resolution, %f Hz\n", ATTOSECONDS_TO_HZ(stdperiod));
}
else if (meddiff < vgadiff)
{
- vd->screen->configure(htotal, vtotal, visarea, medperiod);
+ v->screen->configure(htotal, vtotal, visarea, medperiod);
osd_printf_debug("Medium resolution, %f Hz\n", ATTOSECONDS_TO_HZ(medperiod));
}
else
{
- vd->screen->configure(htotal, vtotal, visarea, vgaperiod);
+ v->screen->configure(htotal, vtotal, visarea, vgaperiod);
osd_printf_debug("VGA resolution, %f Hz\n", ATTOSECONDS_TO_HZ(vgaperiod));
}
/* configure the new framebuffer info */
- vd->fbi.width = hvis;
- vd->fbi.height = vvis;
- vd->fbi.xoffs = hbp;
- vd->fbi.yoffs = vbp;
- vd->fbi.vsyncscan = (vd->reg[vSync].u >> 16) & 0xfff;
+ v->fbi.width = hvis;
+ v->fbi.height = vvis;
+ v->fbi.xoffs = hbp;
+ v->fbi.yoffs = vbp;
+ v->fbi.vsyncscan = (v->reg[vSync].u >> 16) & 0xfff;
/* recompute the time of VBLANK */
- adjust_vblank_timer(vd);
+ adjust_vblank_timer(v);
/* if changing dimensions, update video memory layout */
if (regnum == videoDimensions)
- recompute_video_memory(vd);
+ recompute_video_memory(v);
}
}
break;
/* fbiInit0 can only be written if initEnable says we can -- Voodoo/Voodoo2 only */
case fbiInit0:
- poly_wait(vd->poly, vd->regnames[regnum]);
- if (vd->vd_type <= TYPE_VOODOO_2 && (chips & 1) && INITEN_ENABLE_HW_INIT(vd->pci.init_enable))
+ poly_wait(v->poly, v->regnames[regnum]);
+ if (v->type <= TYPE_VOODOO_2 && (chips & 1) && INITEN_ENABLE_HW_INIT(v->pci.init_enable))
{
- vd->reg[fbiInit0].u = data;
+ v->reg[fbiInit0].u = data;
if (FBIINIT0_GRAPHICS_RESET(data))
- soft_reset(vd);
+ soft_reset(v);
if (FBIINIT0_FIFO_RESET(data))
- fifo_reset(&vd->pci.fifo);
- recompute_video_memory(vd);
+ fifo_reset(&v->pci.fifo);
+ recompute_video_memory(v);
}
break;
/* fbiInit5-7 are Voodoo 2-only; ignore them on anything else */
case fbiInit5:
case fbiInit6:
- if (vd->vd_type < TYPE_VOODOO_2)
+ if (v->type < TYPE_VOODOO_2)
break;
/* else fall through... */
@@ -2629,94 +2691,94 @@ INT32 voodoo_device::register_w(voodoo_device *vd, offs_t offset, UINT32 data)
case fbiInit1:
case fbiInit2:
case fbiInit4:
- poly_wait(vd->poly, vd->regnames[regnum]);
- if (vd->vd_type <= TYPE_VOODOO_2 && (chips & 1) && INITEN_ENABLE_HW_INIT(vd->pci.init_enable))
+ poly_wait(v->poly, v->regnames[regnum]);
+ if (v->type <= TYPE_VOODOO_2 && (chips & 1) && INITEN_ENABLE_HW_INIT(v->pci.init_enable))
{
- vd->reg[regnum].u = data;
- recompute_video_memory(vd);
- vd->fbi.video_changed = TRUE;
+ v->reg[regnum].u = data;
+ recompute_video_memory(v);
+ v->fbi.video_changed = TRUE;
}
break;
case fbiInit3:
- poly_wait(vd->poly, vd->regnames[regnum]);
- if (vd->vd_type <= TYPE_VOODOO_2 && (chips & 1) && INITEN_ENABLE_HW_INIT(vd->pci.init_enable))
+ poly_wait(v->poly, v->regnames[regnum]);
+ if (v->type <= TYPE_VOODOO_2 && (chips & 1) && INITEN_ENABLE_HW_INIT(v->pci.init_enable))
{
- vd->reg[regnum].u = data;
- vd->alt_regmap = FBIINIT3_TRI_REGISTER_REMAP(data);
- vd->fbi.yorigin = FBIINIT3_YORIGIN_SUBTRACT(vd->reg[fbiInit3].u);
- recompute_video_memory(vd);
+ v->reg[regnum].u = data;
+ v->alt_regmap = FBIINIT3_TRI_REGISTER_REMAP(data);
+ v->fbi.yorigin = FBIINIT3_YORIGIN_SUBTRACT(v->reg[fbiInit3].u);
+ recompute_video_memory(v);
}
break;
case fbiInit7:
/* case swapPending: -- Banshee */
- if (vd->vd_type == TYPE_VOODOO_2 && (chips & 1) && INITEN_ENABLE_HW_INIT(vd->pci.init_enable))
+ if (v->type == TYPE_VOODOO_2 && (chips & 1) && INITEN_ENABLE_HW_INIT(v->pci.init_enable))
{
- poly_wait(vd->poly, vd->regnames[regnum]);
- vd->reg[regnum].u = data;
- vd->fbi.cmdfifo[0].enable = FBIINIT7_CMDFIFO_ENABLE(data);
- vd->fbi.cmdfifo[0].count_holes = !FBIINIT7_DISABLE_CMDFIFO_HOLES(data);
+ poly_wait(v->poly, v->regnames[regnum]);
+ v->reg[regnum].u = data;
+ v->fbi.cmdfifo[0].enable = FBIINIT7_CMDFIFO_ENABLE(data);
+ v->fbi.cmdfifo[0].count_holes = !FBIINIT7_DISABLE_CMDFIFO_HOLES(data);
}
- else if (vd->vd_type >= TYPE_VOODOO_BANSHEE)
- vd->fbi.swaps_pending++;
+ else if (v->type >= TYPE_VOODOO_BANSHEE)
+ v->fbi.swaps_pending++;
break;
/* cmdFifo -- Voodoo2 only */
case cmdFifoBaseAddr:
- if (vd->vd_type == TYPE_VOODOO_2 && (chips & 1))
+ if (v->type == TYPE_VOODOO_2 && (chips & 1))
{
- poly_wait(vd->poly, vd->regnames[regnum]);
- vd->reg[regnum].u = data;
- vd->fbi.cmdfifo[0].base = (data & 0x3ff) << 12;
- vd->fbi.cmdfifo[0].end = (((data >> 16) & 0x3ff) + 1) << 12;
+ poly_wait(v->poly, v->regnames[regnum]);
+ v->reg[regnum].u = data;
+ v->fbi.cmdfifo[0].base = (data & 0x3ff) << 12;
+ v->fbi.cmdfifo[0].end = (((data >> 16) & 0x3ff) + 1) << 12;
}
break;
case cmdFifoBump:
- if (vd->vd_type == TYPE_VOODOO_2 && (chips & 1))
+ if (v->type == TYPE_VOODOO_2 && (chips & 1))
fatalerror("cmdFifoBump\n");
break;
case cmdFifoRdPtr:
- if (vd->vd_type == TYPE_VOODOO_2 && (chips & 1))
- vd->fbi.cmdfifo[0].rdptr = data;
+ if (v->type == TYPE_VOODOO_2 && (chips & 1))
+ v->fbi.cmdfifo[0].rdptr = data;
break;
case cmdFifoAMin:
/* case colBufferAddr: -- Banshee */
- if (vd->vd_type == TYPE_VOODOO_2 && (chips & 1))
- vd->fbi.cmdfifo[0].amin = data;
- else if (vd->vd_type >= TYPE_VOODOO_BANSHEE && (chips & 1))
- vd->fbi.rgboffs[1] = data & vd->fbi.mask & ~0x0f;
+ if (v->type == TYPE_VOODOO_2 && (chips & 1))
+ v->fbi.cmdfifo[0].amin = data;
+ else if (v->type >= TYPE_VOODOO_BANSHEE && (chips & 1))
+ v->fbi.rgboffs[1] = data & v->fbi.mask & ~0x0f;
break;
case cmdFifoAMax:
/* case colBufferStride: -- Banshee */
- if (vd->vd_type == TYPE_VOODOO_2 && (chips & 1))
- vd->fbi.cmdfifo[0].amax = data;
- else if (vd->vd_type >= TYPE_VOODOO_BANSHEE && (chips & 1))
+ if (v->type == TYPE_VOODOO_2 && (chips & 1))
+ v->fbi.cmdfifo[0].amax = data;
+ else if (v->type >= TYPE_VOODOO_BANSHEE && (chips & 1))
{
if (data & 0x8000)
- vd->fbi.rowpixels = (data & 0x7f) << 6;
+ v->fbi.rowpixels = (data & 0x7f) << 6;
else
- vd->fbi.rowpixels = (data & 0x3fff) >> 1;
+ v->fbi.rowpixels = (data & 0x3fff) >> 1;
}
break;
case cmdFifoDepth:
/* case auxBufferAddr: -- Banshee */
- if (vd->vd_type == TYPE_VOODOO_2 && (chips & 1))
- vd->fbi.cmdfifo[0].depth = data;
- else if (vd->vd_type >= TYPE_VOODOO_BANSHEE && (chips & 1))
- vd->fbi.auxoffs = data & vd->fbi.mask & ~0x0f;
+ if (v->type == TYPE_VOODOO_2 && (chips & 1))
+ v->fbi.cmdfifo[0].depth = data;
+ else if (v->type >= TYPE_VOODOO_BANSHEE && (chips & 1))
+ v->fbi.auxoffs = data & v->fbi.mask & ~0x0f;
break;
case cmdFifoHoles:
/* case auxBufferStride: -- Banshee */
- if (vd->vd_type == TYPE_VOODOO_2 && (chips & 1))
- vd->fbi.cmdfifo[0].holes = data;
- else if (vd->vd_type >= TYPE_VOODOO_BANSHEE && (chips & 1))
+ if (v->type == TYPE_VOODOO_2 && (chips & 1))
+ v->fbi.cmdfifo[0].holes = data;
+ else if (v->type >= TYPE_VOODOO_BANSHEE && (chips & 1))
{
int rowpixels;
@@ -2724,7 +2786,7 @@ INT32 voodoo_device::register_w(voodoo_device *vd, offs_t offset, UINT32 data)
rowpixels = (data & 0x7f) << 6;
else
rowpixels = (data & 0x3fff) >> 1;
- if (vd->fbi.rowpixels != rowpixels)
+ if (v->fbi.rowpixels != rowpixels)
fatalerror("aux buffer stride differs from color buffer stride\n");
}
break;
@@ -2742,9 +2804,9 @@ INT32 voodoo_device::register_w(voodoo_device *vd, offs_t offset, UINT32 data)
case nccTable+9:
case nccTable+10:
case nccTable+11:
- poly_wait(vd->poly, vd->regnames[regnum]);
- if (chips & 2) ncc_table_write(&vd->tmu[0].ncc[0], regnum - nccTable, data);
- if (chips & 4) ncc_table_write(&vd->tmu[1].ncc[0], regnum - nccTable, data);
+ poly_wait(v->poly, v->regnames[regnum]);
+ if (chips & 2) ncc_table_write(&v->tmu[0].ncc[0], regnum - nccTable, data);
+ if (chips & 4) ncc_table_write(&v->tmu[1].ncc[0], regnum - nccTable, data);
break;
case nccTable+12:
@@ -2759,9 +2821,9 @@ INT32 voodoo_device::register_w(voodoo_device *vd, offs_t offset, UINT32 data)
case nccTable+21:
case nccTable+22:
case nccTable+23:
- poly_wait(vd->poly, vd->regnames[regnum]);
- if (chips & 2) ncc_table_write(&vd->tmu[0].ncc[1], regnum - (nccTable+12), data);
- if (chips & 4) ncc_table_write(&vd->tmu[1].ncc[1], regnum - (nccTable+12), data);
+ poly_wait(v->poly, v->regnames[regnum]);
+ if (chips & 2) ncc_table_write(&v->tmu[0].ncc[1], regnum - (nccTable+12), data);
+ if (chips & 4) ncc_table_write(&v->tmu[1].ncc[1], regnum - (nccTable+12), data);
break;
/* fogTable entries are processed and expanded immediately */
@@ -2797,14 +2859,14 @@ INT32 voodoo_device::register_w(voodoo_device *vd, offs_t offset, UINT32 data)
case fogTable+29:
case fogTable+30:
case fogTable+31:
- poly_wait(vd->poly, vd->regnames[regnum]);
+ poly_wait(v->poly, v->regnames[regnum]);
if (chips & 1)
{
int base = 2 * (regnum - fogTable);
- vd->fbi.fogdelta[base + 0] = (data >> 0) & 0xff;
- vd->fbi.fogblend[base + 0] = (data >> 8) & 0xff;
- vd->fbi.fogdelta[base + 1] = (data >> 16) & 0xff;
- vd->fbi.fogblend[base + 1] = (data >> 24) & 0xff;
+ v->fbi.fogdelta[base + 0] = (data >> 0) & 0xff;
+ v->fbi.fogblend[base + 0] = (data >> 8) & 0xff;
+ v->fbi.fogdelta[base + 1] = (data >> 16) & 0xff;
+ v->fbi.fogblend[base + 1] = (data >> 24) & 0xff;
}
break;
@@ -2816,22 +2878,22 @@ INT32 voodoo_device::register_w(voodoo_device *vd, offs_t offset, UINT32 data)
case texBaseAddr_1:
case texBaseAddr_2:
case texBaseAddr_3_8:
- poly_wait(vd->poly, vd->regnames[regnum]);
+ poly_wait(v->poly, v->regnames[regnum]);
if (chips & 2)
{
- vd->tmu[0].reg[regnum].u = data;
- vd->tmu[0].regdirty = TRUE;
+ v->tmu[0].reg[regnum].u = data;
+ v->tmu[0].regdirty = TRUE;
}
if (chips & 4)
{
- vd->tmu[1].reg[regnum].u = data;
- vd->tmu[1].regdirty = TRUE;
+ v->tmu[1].reg[regnum].u = data;
+ v->tmu[1].regdirty = TRUE;
}
break;
case trexInit1:
/* send tmu config data to the frame buffer */
- vd->send_config = (TREXINIT_SEND_TMU_CONFIG(data) > 0);
+ v->send_config = (TREXINIT_SEND_TMU_CONFIG(data) > 0);
goto default_case;
/* these registers are referenced in the renderer; we must wait for pending work before changing */
@@ -2845,25 +2907,25 @@ INT32 voodoo_device::register_w(voodoo_device *vd, offs_t offset, UINT32 data)
case color0:
case clipLowYHighY:
case clipLeftRight:
- poly_wait(vd->poly, vd->regnames[regnum]);
+ poly_wait(v->poly, v->regnames[regnum]);
/* fall through to default implementation */
/* by default, just feed the data to the chips */
default:
default_case:
- if (chips & 1) vd->reg[0x000 + regnum].u = data;
- if (chips & 2) vd->reg[0x100 + regnum].u = data;
- if (chips & 4) vd->reg[0x200 + regnum].u = data;
- if (chips & 8) vd->reg[0x300 + regnum].u = data;
+ if (chips & 1) v->reg[0x000 + regnum].u = data;
+ if (chips & 2) v->reg[0x100 + regnum].u = data;
+ if (chips & 4) v->reg[0x200 + regnum].u = data;
+ if (chips & 8) v->reg[0x300 + regnum].u = data;
break;
}
if (LOG_REGISTERS)
{
if (regnum < fvertexAx || regnum > fdWdY)
- vd->device->logerror("VOODOO.%d.REG:%s(%d) write = %08X\n", vd->index, (regnum < 0x384/4) ? vd->regnames[regnum] : "oob", chips, origdata);
+ v->device->logerror("VOODOO.%d.REG:%s(%d) write = %08X\n", v->index, (regnum < 0x384/4) ? v->regnames[regnum] : "oob", chips, origdata);
else
- vd->device->logerror("VOODOO.%d.REG:%s(%d) write = %f\n", vd->index, (regnum < 0x384/4) ? vd->regnames[regnum] : "oob", chips, (double) u2f(origdata));
+ v->device->logerror("VOODOO.%d.REG:%s(%d) write = %f\n", v->index, (regnum < 0x384/4) ? v->regnames[regnum] : "oob", chips, (double) u2f(origdata));
}
return cycles;
@@ -2876,25 +2938,25 @@ default_case:
* Voodoo LFB writes
*
*************************************/
-INT32 voodoo_device::lfb_direct_w(voodoo_device *vd, offs_t offset, UINT32 data, UINT32 mem_mask)
-{
+static INT32 lfb_direct_w(voodoo_state *v, offs_t offset, UINT32 data, UINT32 mem_mask)
+{
UINT16 *dest;
UINT32 destmax;
int x, y;
UINT32 bufoffs;
/* statistics */
- vd->stats.lfb_writes++;
+ v->stats.lfb_writes++;
/* byte swizzling */
- if (LFBMODE_BYTE_SWIZZLE_WRITES(vd->reg[lfbMode].u))
+ if (LFBMODE_BYTE_SWIZZLE_WRITES(v->reg[lfbMode].u))
{
data = FLIPENDIAN_INT32(data);
mem_mask = FLIPENDIAN_INT32(mem_mask);
}
/* word swapping */
- if (LFBMODE_WORD_SWAP_WRITES(vd->reg[lfbMode].u))
+ if (LFBMODE_WORD_SWAP_WRITES(v->reg[lfbMode].u))
{
data = (data << 16) | (data >> 16);
mem_mask = (mem_mask << 16) | (mem_mask >> 16);
@@ -2904,26 +2966,25 @@ INT32 voodoo_device::lfb_direct_w(voodoo_device *vd, offs_t offset, UINT32 data,
// For direct lfb access just write the data
/* compute X,Y */
offset <<= 1;
- x = offset & ((1 << vd->fbi.lfb_stride) - 1);
- y = (offset >> vd->fbi.lfb_stride);
- dest = (UINT16 *)(vd->fbi.ram + vd->fbi.lfb_base*4);
- destmax = (vd->fbi.mask + 1 - vd->fbi.lfb_base*4) / 2;
- bufoffs = y * vd->fbi.rowpixels + x;
+ x = offset & ((1 << v->fbi.lfb_stride) - 1);
+ y = (offset >> v->fbi.lfb_stride);
+ dest = (UINT16 *)(v->fbi.ram + v->fbi.lfb_base*4);
+ destmax = (v->fbi.mask + 1 - v->fbi.lfb_base*4) / 2;
+ bufoffs = y * v->fbi.rowpixels + x;
if (bufoffs >= destmax) {
- vd->device->logerror("lfb_direct_w: Buffer offset out of bounds x=%i y=%i offset=%08X bufoffs=%08X data=%08X\n", x, y, offset, (UINT32) bufoffs, data);
+ v->device->logerror("lfb_direct_w: Buffer offset out of bounds x=%i y=%i offset=%08X bufoffs=%08X data=%08X\n", x, y, offset, (UINT32) bufoffs, data);
return 0;
}
if (ACCESSING_BITS_0_15)
dest[bufoffs + 0] = data&0xffff;
if (ACCESSING_BITS_16_31)
dest[bufoffs + 1] = data>>16;
- if (LOG_LFB) vd->device->logerror("VOODOO.%d.LFB:write direct (%d,%d) = %08X & %08X\n", vd->index, x, y, data, mem_mask);
+ if (LOG_LFB) v->device->logerror("VOODOO.%d.LFB:write direct (%d,%d) = %08X & %08X\n", v->index, x, y, data, mem_mask);
return 0;
}
-INT32 voodoo_device::lfb_w(voodoo_device* vd, offs_t offset, UINT32 data, UINT32 mem_mask)
+static INT32 lfb_w(voodoo_state *v, offs_t offset, UINT32 data, UINT32 mem_mask)
{
-
UINT16 *dest, *depth;
UINT32 destmax, depthmax;
int sr[2], sg[2], sb[2], sa[2], sw[2];
@@ -2931,28 +2992,28 @@ INT32 voodoo_device::lfb_w(voodoo_device* vd, offs_t offset, UINT32 data, UINT32
int pix, destbuf;
/* statistics */
- vd->stats.lfb_writes++;
+ v->stats.lfb_writes++;
/* byte swizzling */
- if (LFBMODE_BYTE_SWIZZLE_WRITES(vd->reg[lfbMode].u))
+ if (LFBMODE_BYTE_SWIZZLE_WRITES(v->reg[lfbMode].u))
{
data = FLIPENDIAN_INT32(data);
mem_mask = FLIPENDIAN_INT32(mem_mask);
}
/* word swapping */
- if (LFBMODE_WORD_SWAP_WRITES(vd->reg[lfbMode].u))
+ if (LFBMODE_WORD_SWAP_WRITES(v->reg[lfbMode].u))
{
data = (data << 16) | (data >> 16);
mem_mask = (mem_mask << 16) | (mem_mask >> 16);
}
/* extract default depth and alpha values */
- sw[0] = sw[1] = vd->reg[zaColor].u & 0xffff;
- sa[0] = sa[1] = vd->reg[zaColor].u >> 24;
+ sw[0] = sw[1] = v->reg[zaColor].u & 0xffff;
+ sa[0] = sa[1] = v->reg[zaColor].u >> 24;
/* first extract A,R,G,B from the data */
- switch (LFBMODE_WRITE_FORMAT(vd->reg[lfbMode].u) + 16 * LFBMODE_RGBA_LANES(vd->reg[lfbMode].u))
+ switch (LFBMODE_WRITE_FORMAT(v->reg[lfbMode].u) + 16 * LFBMODE_RGBA_LANES(v->reg[lfbMode].u))
{
case 16*0 + 0: /* ARGB, 16-bit RGB 5-6-5 */
case 16*2 + 0: /* RGBA, 16-bit RGB 5-6-5 */
@@ -3119,13 +3180,13 @@ INT32 voodoo_device::lfb_w(voodoo_device* vd, offs_t offset, UINT32 data, UINT32
break;
default: /* reserved */
- vd->device->logerror("lfb_w: Unknown format\n");
+ v->device->logerror("lfb_w: Unknown format\n");
return 0;
}
/* compute X,Y */
- x = offset & ((1 << vd->fbi.lfb_stride) - 1);
- y = (offset >> vd->fbi.lfb_stride) & 0x3ff;
+ x = offset & ((1 << v->fbi.lfb_stride) - 1);
+ y = (offset >> v->fbi.lfb_stride) & 0x3ff;
/* adjust the mask based on which half of the data is written */
if (!ACCESSING_BITS_0_15)
@@ -3134,47 +3195,47 @@ INT32 voodoo_device::lfb_w(voodoo_device* vd, offs_t offset, UINT32 data, UINT32
mask &= ~(0xf0 + LFB_DEPTH_PRESENT_MSW);
/* select the target buffer */
- destbuf = (vd->vd_type >= TYPE_VOODOO_BANSHEE) ? 1 : LFBMODE_WRITE_BUFFER_SELECT(vd->reg[lfbMode].u);
+ destbuf = (v->type >= TYPE_VOODOO_BANSHEE) ? 1 : LFBMODE_WRITE_BUFFER_SELECT(v->reg[lfbMode].u);
switch (destbuf)
{
case 0: /* front buffer */
- dest = (UINT16 *)(vd->fbi.ram + vd->fbi.rgboffs[vd->fbi.frontbuf]);
- destmax = (vd->fbi.mask + 1 - vd->fbi.rgboffs[vd->fbi.frontbuf]) / 2;
- vd->fbi.video_changed = TRUE;
+ dest = (UINT16 *)(v->fbi.ram + v->fbi.rgboffs[v->fbi.frontbuf]);
+ destmax = (v->fbi.mask + 1 - v->fbi.rgboffs[v->fbi.frontbuf]) / 2;
+ v->fbi.video_changed = TRUE;
break;
case 1: /* back buffer */
- dest = (UINT16 *)(vd->fbi.ram + vd->fbi.rgboffs[vd->fbi.backbuf]);
- destmax = (vd->fbi.mask + 1 - vd->fbi.rgboffs[vd->fbi.backbuf]) / 2;
+ dest = (UINT16 *)(v->fbi.ram + v->fbi.rgboffs[v->fbi.backbuf]);
+ destmax = (v->fbi.mask + 1 - v->fbi.rgboffs[v->fbi.backbuf]) / 2;
break;
default: /* reserved */
return 0;
}
- depth = (UINT16 *)(vd->fbi.ram + vd->fbi.auxoffs);
- depthmax = (vd->fbi.mask + 1 - vd->fbi.auxoffs) / 2;
+ depth = (UINT16 *)(v->fbi.ram + v->fbi.auxoffs);
+ depthmax = (v->fbi.mask + 1 - v->fbi.auxoffs) / 2;
/* simple case: no pipeline */
- if (!LFBMODE_ENABLE_PIXEL_PIPELINE(vd->reg[lfbMode].u))
+ if (!LFBMODE_ENABLE_PIXEL_PIPELINE(v->reg[lfbMode].u))
{
DECLARE_DITHER_POINTERS_NO_DITHER_VAR;
UINT32 bufoffs;
- if (LOG_LFB) vd->device->logerror("VOODOO.%d.LFB:write raw mode %X (%d,%d) = %08X & %08X\n", vd->index, LFBMODE_WRITE_FORMAT(vd->reg[lfbMode].u), x, y, data, mem_mask);
+ if (LOG_LFB) v->device->logerror("VOODOO.%d.LFB:write raw mode %X (%d,%d) = %08X & %08X\n", v->index, LFBMODE_WRITE_FORMAT(v->reg[lfbMode].u), x, y, data, mem_mask);
/* determine the screen Y */
scry = y;
- if (LFBMODE_Y_ORIGIN(vd->reg[lfbMode].u))
- scry = (vd->fbi.yorigin - y) & 0x3ff;
+ if (LFBMODE_Y_ORIGIN(v->reg[lfbMode].u))
+ scry = (v->fbi.yorigin - y) & 0x3ff;
/* advance pointers to the proper row */
- bufoffs = scry * vd->fbi.rowpixels + x;
+ bufoffs = scry * v->fbi.rowpixels + x;
/* compute dithering */
- COMPUTE_DITHER_POINTERS_NO_DITHER_VAR(vd->reg[fbzMode].u, y);
+ COMPUTE_DITHER_POINTERS_NO_DITHER_VAR(v->reg[fbzMode].u, y);
/* wait for any outstanding work to finish */
- poly_wait(vd->poly, "LFB Write");
+ poly_wait(v->poly, "LFB Write");
/* loop over up to two pixels */
for (pix = 0; mask; pix++)
@@ -3186,7 +3247,7 @@ INT32 voodoo_device::lfb_w(voodoo_device* vd, offs_t offset, UINT32 data, UINT32
if ((mask & LFB_RGB_PRESENT) && bufoffs < destmax)
{
/* apply dithering and write to the screen */
- APPLY_DITHER(vd->reg[fbzMode].u, x, dither_lookup, sr[pix], sg[pix], sb[pix]);
+ APPLY_DITHER(v->reg[fbzMode].u, x, dither_lookup, sr[pix], sg[pix], sb[pix]);
dest[bufoffs] = (sr[pix] << 11) | (sg[pix] << 5) | sb[pix];
}
@@ -3194,16 +3255,16 @@ INT32 voodoo_device::lfb_w(voodoo_device* vd, offs_t offset, UINT32 data, UINT32
if (depth && bufoffs < depthmax)
{
/* write to the alpha buffer */
- if ((mask & LFB_ALPHA_PRESENT) && FBZMODE_ENABLE_ALPHA_PLANES(vd->reg[fbzMode].u))
+ if ((mask & LFB_ALPHA_PRESENT) && FBZMODE_ENABLE_ALPHA_PLANES(v->reg[fbzMode].u))
depth[bufoffs] = sa[pix];
/* write to the depth buffer */
- if ((mask & (LFB_DEPTH_PRESENT | LFB_DEPTH_PRESENT_MSW)) && !FBZMODE_ENABLE_ALPHA_PLANES(vd->reg[fbzMode].u))
+ if ((mask & (LFB_DEPTH_PRESENT | LFB_DEPTH_PRESENT_MSW)) && !FBZMODE_ENABLE_ALPHA_PLANES(v->reg[fbzMode].u))
depth[bufoffs] = sw[pix];
}
/* track pixel writes to the frame buffer regardless of mask */
- vd->reg[fbiPixelsOut].u++;
+ v->reg[fbiPixelsOut].u++;
}
/* advance our pointers */
@@ -3218,20 +3279,20 @@ INT32 voodoo_device::lfb_w(voodoo_device* vd, offs_t offset, UINT32 data, UINT32
{
DECLARE_DITHER_POINTERS;
- if (LOG_LFB) vd->device->logerror("VOODOO.%d.LFB:write pipelined mode %X (%d,%d) = %08X & %08X\n", vd->index, LFBMODE_WRITE_FORMAT(vd->reg[lfbMode].u), x, y, data, mem_mask);
+ if (LOG_LFB) v->device->logerror("VOODOO.%d.LFB:write pipelined mode %X (%d,%d) = %08X & %08X\n", v->index, LFBMODE_WRITE_FORMAT(v->reg[lfbMode].u), x, y, data, mem_mask);
/* determine the screen Y */
scry = y;
- if (FBZMODE_Y_ORIGIN(vd->reg[fbzMode].u))
- scry = (vd->fbi.yorigin - y) & 0x3ff;
+ if (FBZMODE_Y_ORIGIN(v->reg[fbzMode].u))
+ scry = (v->fbi.yorigin - y) & 0x3ff;
/* advance pointers to the proper row */
- dest += scry * vd->fbi.rowpixels;
+ dest += scry * v->fbi.rowpixels;
if (depth)
- depth += scry * vd->fbi.rowpixels;
+ depth += scry * v->fbi.rowpixels;
/* compute dithering */
- COMPUTE_DITHER_POINTERS(vd->reg[fbzMode].u, y);
+ COMPUTE_DITHER_POINTERS(v->reg[fbzMode].u, y);
/* loop over up to two pixels */
for (pix = 0; mask; pix++)
@@ -3239,10 +3300,10 @@ INT32 voodoo_device::lfb_w(voodoo_device* vd, offs_t offset, UINT32 data, UINT32
/* make sure we care about this pixel */
if (mask & 0x0f)
{
- stats_block *stats = &vd->fbi.lfb_stats;
+ stats_block *stats = &v->fbi.lfb_stats;
INT64 iterw;
- if (LFBMODE_WRITE_W_SELECT(vd->reg[lfbMode].u)) {
- iterw = (UINT32) vd->reg[zaColor].u << 16;
+ if (LFBMODE_WRITE_W_SELECT(v->reg[lfbMode].u)) {
+ iterw = (UINT32) v->reg[zaColor].u << 16;
} else {
// The most significant fractional bits of 16.32 W are set to z
iterw = (UINT32) sw[pix] << 16;
@@ -3250,12 +3311,12 @@ INT32 voodoo_device::lfb_w(voodoo_device* vd, offs_t offset, UINT32 data, UINT32
INT32 iterz = sw[pix] << 12;
/* apply clipping */
- if (FBZMODE_ENABLE_CLIPPING(vd->reg[fbzMode].u))
+ if (FBZMODE_ENABLE_CLIPPING(v->reg[fbzMode].u))
{
- if (x < ((vd->reg[clipLeftRight].u >> 16) & 0x3ff) ||
- x >= (vd->reg[clipLeftRight].u & 0x3ff) ||
- scry < ((vd->reg[clipLowYHighY].u >> 16) & 0x3ff) ||
- scry >= (vd->reg[clipLowYHighY].u & 0x3ff))
+ if (x < ((v->reg[clipLeftRight].u >> 16) & 0x3ff) ||
+ x >= (v->reg[clipLeftRight].u & 0x3ff) ||
+ scry < ((v->reg[clipLowYHighY].u >> 16) & 0x3ff) ||
+ scry >= (v->reg[clipLowYHighY].u & 0x3ff))
{
stats->pixels_in++;
stats->clip_fail++;
@@ -3268,7 +3329,7 @@ INT32 voodoo_device::lfb_w(voodoo_device* vd, offs_t offset, UINT32 data, UINT32
/* pixel pipeline part 1 handles depth testing and stippling */
- //PIXEL_PIPELINE_BEGIN(v, stats, x, y, vd->reg[fbzColorPath].u, vd->reg[fbzMode].u, iterz, iterw);
+ //PIXEL_PIPELINE_BEGIN(v, stats, x, y, v->reg[fbzColorPath].u, v->reg[fbzMode].u, iterz, iterw);
// Start PIXEL_PIPE_BEGIN copy
//#define PIXEL_PIPELINE_BEGIN(VV, STATS, XX, YY, FBZCOLORPATH, FBZMODE, ITERZ, ITERW)
INT32 fogdepth, biasdepth;
@@ -3280,15 +3341,15 @@ INT32 voodoo_device::lfb_w(voodoo_device* vd, offs_t offset, UINT32 data, UINT32
/* note that for perf reasons, we assume the caller has done clipping */
/* handle stippling */
- if (FBZMODE_ENABLE_STIPPLE(vd->reg[fbzMode].u))
+ if (FBZMODE_ENABLE_STIPPLE(v->reg[fbzMode].u))
{
/* rotate mode */
- if (FBZMODE_STIPPLE_PATTERN(vd->reg[fbzMode].u) == 0)
+ if (FBZMODE_STIPPLE_PATTERN(v->reg[fbzMode].u) == 0)
{
- vd->reg[stipple].u = (vd->reg[stipple].u << 1) | (vd->reg[stipple].u >> 31);
- if ((vd->reg[stipple].u & 0x80000000) == 0)
+ v->reg[stipple].u = (v->reg[stipple].u << 1) | (v->reg[stipple].u >> 31);
+ if ((v->reg[stipple].u & 0x80000000) == 0)
{
- vd->stats.total_stippled++;
+ v->stats.total_stippled++;
goto skipdrawdepth;
}
}
@@ -3297,9 +3358,9 @@ INT32 voodoo_device::lfb_w(voodoo_device* vd, offs_t offset, UINT32 data, UINT32
else
{
int stipple_index = ((y & 3) << 3) | (~x & 7);
- if (((vd->reg[stipple].u >> stipple_index) & 1) == 0)
+ if (((v->reg[stipple].u >> stipple_index) & 1) == 0)
{
- vd->stats.total_stippled++;
+ v->stats.total_stippled++;
goto nextpixel;
}
}
@@ -3311,29 +3372,29 @@ INT32 voodoo_device::lfb_w(voodoo_device* vd, offs_t offset, UINT32 data, UINT32
/* Perform depth testing */
- if (!depthTest((UINT16) vd->reg[zaColor].u, stats, depth[x], vd->reg[fbzMode].u, biasdepth))
+ if (!depthTest((UINT16) v->reg[zaColor].u, stats, depth[x], v->reg[fbzMode].u, biasdepth))
goto nextpixel;
/* use the RGBA we stashed above */
color.set(sa[pix], sr[pix], sg[pix], sb[pix]);
/* handle chroma key */
- if (!chromaKeyTest(vd, stats, vd->reg[fbzMode].u, color))
+ if (!chromaKeyTest(v, stats, v->reg[fbzMode].u, color))
goto nextpixel;
/* handle alpha mask */
- if (!alphaMaskTest(stats, vd->reg[fbzMode].u, color.get_a()))
+ if (!alphaMaskTest(stats, v->reg[fbzMode].u, color.get_a()))
goto nextpixel;
/* handle alpha test */
- if (!alphaTest(vd, stats, vd->reg[alphaMode].u, color.get_a()))
+ if (!alphaTest(v, stats, v->reg[alphaMode].u, color.get_a()))
goto nextpixel;
/* wait for any outstanding work to finish */
- poly_wait(vd->poly, "LFB Write");
+ poly_wait(v->poly, "LFB Write");
/* pixel pipeline part 2 handles color combine, fog, alpha, and final output */
- PIXEL_PIPELINE_END(vd, stats, dither, dither4, dither_lookup, x, dest, depth,
- vd->reg[fbzMode].u, vd->reg[fbzColorPath].u, vd->reg[alphaMode].u, vd->reg[fogMode].u,
+ PIXEL_PIPELINE_END(v, stats, dither, dither4, dither_lookup, x, dest, depth,
+ v->reg[fbzMode].u, v->reg[fbzColorPath].u, v->reg[alphaMode].u, v->reg[fogMode].u,
iterz, iterw, iterargb) {};
nextpixel:
/* advance our pointers */
@@ -3353,24 +3414,24 @@ nextpixel:
*
*************************************/
-INT32 voodoo_device::texture_w(voodoo_device *vd, offs_t offset, UINT32 data)
+static INT32 texture_w(voodoo_state *v, offs_t offset, UINT32 data)
{
int tmunum = (offset >> 19) & 0x03;
tmu_state *t;
/* statistics */
- vd->stats.tex_writes++;
+ v->stats.tex_writes++;
/* point to the right TMU */
- if (!(vd->chipmask & (2 << tmunum)))
+ if (!(v->chipmask & (2 << tmunum)))
return 0;
- t = &vd->tmu[tmunum];
+ t = &v->tmu[tmunum];
if (TEXLOD_TDIRECT_WRITE(t->reg[tLOD].u))
fatalerror("Texture direct write!\n");
/* wait for any outstanding work to finish */
- poly_wait(vd->poly, "Texture write");
+ poly_wait(v->poly, "Texture write");
/* update texture info if dirty */
if (t->regdirty)
@@ -3390,13 +3451,13 @@ INT32 voodoo_device::texture_w(voodoo_device *vd, offs_t offset, UINT32 data)
UINT8 *dest;
/* extract info */
- if (vd->vd_type <= TYPE_VOODOO_2)
+ if (v->type <= TYPE_VOODOO_2)
{
lod = (offset >> 15) & 0x0f;
tt = (offset >> 7) & 0xff;
/* old code has a bit about how this is broken in gauntleg unless we always look at TMU0 */
- if (TEXMODE_SEQ_8_DOWNLD(vd->tmu[0].reg/*t->reg*/[textureMode].u))
+ if (TEXMODE_SEQ_8_DOWNLD(v->tmu[0].reg/*t->reg*/[textureMode].u))
ts = (offset << 2) & 0xfc;
else
ts = (offset << 1) & 0xfc;
@@ -3409,13 +3470,13 @@ INT32 voodoo_device::texture_w(voodoo_device *vd, offs_t offset, UINT32 data)
tbaseaddr = t->lodoffset[lod];
tbaseaddr += tt * ((t->wmask >> lod) + 1) + ts;
- if (LOG_TEXTURE_RAM) vd->device->logerror("Texture 8-bit w: lod=%d s=%d t=%d data=%08X\n", lod, ts, tt, data);
+ if (LOG_TEXTURE_RAM) v->device->logerror("Texture 8-bit w: lod=%d s=%d t=%d data=%08X\n", lod, ts, tt, data);
}
else
{
tbaseaddr = t->lodoffset[0] + offset*4;
- if (LOG_TEXTURE_RAM) vd->device->logerror("Texture 8-bit w: offset=%X data=%08X\n", offset*4, data);
+ if (LOG_TEXTURE_RAM) v->device->logerror("Texture 8-bit w: offset=%X data=%08X\n", offset*4, data);
}
/* write the four bytes in little-endian order */
@@ -3435,7 +3496,7 @@ INT32 voodoo_device::texture_w(voodoo_device *vd, offs_t offset, UINT32 data)
UINT16 *dest;
/* extract info */
- if (vd->vd_type <= TYPE_VOODOO_2)
+ if (v->type <= TYPE_VOODOO_2)
{
lod = (offset >> 15) & 0x0f;
tt = (offset >> 7) & 0xff;
@@ -3449,13 +3510,13 @@ INT32 voodoo_device::texture_w(voodoo_device *vd, offs_t offset, UINT32 data)
tbaseaddr = t->lodoffset[lod];
tbaseaddr += 2 * (tt * ((t->wmask >> lod) + 1) + ts);
- if (LOG_TEXTURE_RAM) vd->device->logerror("Texture 16-bit w: lod=%d s=%d t=%d data=%08X\n", lod, ts, tt, data);
+ if (LOG_TEXTURE_RAM) v->device->logerror("Texture 16-bit w: lod=%d s=%d t=%d data=%08X\n", lod, ts, tt, data);
}
else
{
tbaseaddr = t->lodoffset[0] + offset*4;
- if (LOG_TEXTURE_RAM) vd->device->logerror("Texture 16-bit w: offset=%X data=%08X\n", offset*4, data);
+ if (LOG_TEXTURE_RAM) v->device->logerror("Texture 16-bit w: offset=%X data=%08X\n", offset*4, data);
}
/* write the two words in little-endian order */
@@ -3477,7 +3538,7 @@ INT32 voodoo_device::texture_w(voodoo_device *vd, offs_t offset, UINT32 data)
*
*************************************/
-void voodoo_device::flush_fifos(voodoo_device *vd, attotime current_time)
+static void flush_fifos(voodoo_state *v, attotime current_time)
{
static UINT8 in_flush;
@@ -3486,14 +3547,14 @@ void voodoo_device::flush_fifos(voodoo_device *vd, attotime current_time)
return;
in_flush = TRUE;
- if (!vd->pci.op_pending) fatalerror("flush_fifos called with no pending operation\n");
+ if (!v->pci.op_pending) fatalerror("flush_fifos called with no pending operation\n");
- if (LOG_FIFO_VERBOSE) vd->device->logerror("VOODOO.%d.FIFO:flush_fifos start -- pending=%d.%08X%08X cur=%d.%08X%08X\n", vd->index,
- vd->pci.op_end_time.seconds(), (UINT32)(vd->pci.op_end_time.attoseconds() >> 32), (UINT32)vd->pci.op_end_time.attoseconds(),
+ if (LOG_FIFO_VERBOSE) v->device->logerror("VOODOO.%d.FIFO:flush_fifos start -- pending=%d.%08X%08X cur=%d.%08X%08X\n", v->index,
+ v->pci.op_end_time.seconds(), (UINT32)(v->pci.op_end_time.attoseconds() >> 32), (UINT32)v->pci.op_end_time.attoseconds(),
current_time.seconds(), (UINT32)(current_time.attoseconds() >> 32), (UINT32)current_time.attoseconds());
/* loop while we still have cycles to burn */
- while (vd->pci.op_end_time <= current_time)
+ while (v->pci.op_end_time <= current_time)
{
INT32 extra_cycles = 0;
INT32 cycles;
@@ -3506,27 +3567,27 @@ void voodoo_device::flush_fifos(voodoo_device *vd, attotime current_time)
UINT32 data;
/* we might be in CMDFIFO mode */
- if (vd->fbi.cmdfifo[0].enable)
+ if (v->fbi.cmdfifo[0].enable)
{
/* if we don't have anything to execute, we're done for now */
- cycles = cmdfifo_execute_if_ready(vd, &vd->fbi.cmdfifo[0]);
+ cycles = cmdfifo_execute_if_ready(v, &v->fbi.cmdfifo[0]);
if (cycles == -1)
{
- vd->pci.op_pending = FALSE;
+ v->pci.op_pending = FALSE;
in_flush = FALSE;
- if (LOG_FIFO_VERBOSE) vd->device->logerror("VOODOO.%d.FIFO:flush_fifos end -- CMDFIFO empty\n", vd->index);
+ if (LOG_FIFO_VERBOSE) v->device->logerror("VOODOO.%d.FIFO:flush_fifos end -- CMDFIFO empty\n", v->index);
return;
}
}
- else if (vd->fbi.cmdfifo[1].enable)
+ else if (v->fbi.cmdfifo[1].enable)
{
/* if we don't have anything to execute, we're done for now */
- cycles = cmdfifo_execute_if_ready(vd, &vd->fbi.cmdfifo[1]);
+ cycles = cmdfifo_execute_if_ready(v, &v->fbi.cmdfifo[1]);
if (cycles == -1)
{
- vd->pci.op_pending = FALSE;
+ v->pci.op_pending = FALSE;
in_flush = FALSE;
- if (LOG_FIFO_VERBOSE) vd->device->logerror("VOODOO.%d.FIFO:flush_fifos end -- CMDFIFO empty\n", vd->index);
+ if (LOG_FIFO_VERBOSE) v->device->logerror("VOODOO.%d.FIFO:flush_fifos end -- CMDFIFO empty\n", v->index);
return;
}
}
@@ -3535,15 +3596,15 @@ void voodoo_device::flush_fifos(voodoo_device *vd, attotime current_time)
else
{
/* choose which FIFO to read from */
- if (!fifo_empty(&vd->fbi.fifo))
- fifo = &vd->fbi.fifo;
- else if (!fifo_empty(&vd->pci.fifo))
- fifo = &vd->pci.fifo;
+ if (!fifo_empty(&v->fbi.fifo))
+ fifo = &v->fbi.fifo;
+ else if (!fifo_empty(&v->pci.fifo))
+ fifo = &v->pci.fifo;
else
{
- vd->pci.op_pending = FALSE;
+ v->pci.op_pending = FALSE;
in_flush = FALSE;
- if (LOG_FIFO_VERBOSE) vd->device->logerror("VOODOO.%d.FIFO:flush_fifos end -- FIFOs empty\n", vd->index);
+ if (LOG_FIFO_VERBOSE) v->device->logerror("VOODOO.%d.FIFO:flush_fifos end -- FIFOs empty\n", v->index);
return;
}
@@ -3553,9 +3614,9 @@ void voodoo_device::flush_fifos(voodoo_device *vd, attotime current_time)
/* target the appropriate location */
if ((address & (0xc00000/4)) == 0)
- cycles = register_w(vd, address, data);
+ cycles = register_w(v, address, data);
else if (address & (0x800000/4))
- cycles = texture_w(vd, address, data);
+ cycles = texture_w(v, address, data);
else
{
UINT32 mem_mask = 0xffffffff;
@@ -3567,7 +3628,7 @@ void voodoo_device::flush_fifos(voodoo_device *vd, attotime current_time)
mem_mask &= 0xffff0000;
address &= 0xffffff;
- cycles = lfb_w(vd, address, data, mem_mask);
+ cycles = lfb_w(v, address, data, mem_mask);
}
}
@@ -3584,15 +3645,15 @@ void voodoo_device::flush_fifos(voodoo_device *vd, attotime current_time)
cycles += extra_cycles;
/* account for those cycles */
- vd->pci.op_end_time += attotime(0, (attoseconds_t)cycles * vd->attoseconds_per_cycle);
+ v->pci.op_end_time += attotime(0, (attoseconds_t)cycles * v->attoseconds_per_cycle);
- if (LOG_FIFO_VERBOSE) vd->device->logerror("VOODOO.%d.FIFO:update -- pending=%d.%08X%08X cur=%d.%08X%08X\n", vd->index,
- vd->pci.op_end_time.seconds(), (UINT32)(vd->pci.op_end_time.attoseconds() >> 32), (UINT32)vd->pci.op_end_time.attoseconds(),
+ if (LOG_FIFO_VERBOSE) v->device->logerror("VOODOO.%d.FIFO:update -- pending=%d.%08X%08X cur=%d.%08X%08X\n", v->index,
+ v->pci.op_end_time.seconds(), (UINT32)(v->pci.op_end_time.attoseconds() >> 32), (UINT32)v->pci.op_end_time.attoseconds(),
current_time.seconds(), (UINT32)(current_time.attoseconds() >> 32), (UINT32)current_time.attoseconds());
}
- if (LOG_FIFO_VERBOSE) vd->device->logerror("VOODOO.%d.FIFO:flush_fifos end -- pending command complete at %d.%08X%08X\n", vd->index,
- vd->pci.op_end_time.seconds(), (UINT32)(vd->pci.op_end_time.attoseconds() >> 32), (UINT32)vd->pci.op_end_time.attoseconds());
+ if (LOG_FIFO_VERBOSE) v->device->logerror("VOODOO.%d.FIFO:flush_fifos end -- pending command complete at %d.%08X%08X\n", v->index,
+ v->pci.op_end_time.seconds(), (UINT32)(v->pci.op_end_time.attoseconds() >> 32), (UINT32)v->pci.op_end_time.attoseconds());
in_flush = FALSE;
}
@@ -3608,17 +3669,18 @@ void voodoo_device::flush_fifos(voodoo_device *vd, attotime current_time)
WRITE32_MEMBER( voodoo_device::voodoo_w )
{
+ voodoo_state *v = get_safe_token(this);
int stall = FALSE;
g_profiler.start(PROFILER_USER1);
/* should not be getting accesses while stalled */
- if (pci.stall_state != NOT_STALLED)
+ if (v->pci.stall_state != NOT_STALLED)
logerror("voodoo_w while stalled!\n");
/* if we have something pending, flush the FIFOs up to the current time */
- if (pci.op_pending)
- flush_fifos(this, machine().time());
+ if (v->pci.op_pending)
+ flush_fifos(v, machine().time());
/* special handling for registers */
if ((offset & 0xc00000/4) == 0)
@@ -3626,10 +3688,10 @@ WRITE32_MEMBER( voodoo_device::voodoo_w )
UINT8 access;
/* some special stuff for Voodoo 2 */
- if (vd_type >= TYPE_VOODOO_2)
+ if (v->type >= TYPE_VOODOO_2)
{
/* we might be in CMDFIFO mode */
- if (FBIINIT7_CMDFIFO_ENABLE(reg[fbiInit7].u))
+ if (FBIINIT7_CMDFIFO_ENABLE(v->reg[fbiInit7].u))
{
/* if bit 21 is set, we're writing to the FIFO */
if (offset & 0x200000/4)
@@ -3637,20 +3699,20 @@ WRITE32_MEMBER( voodoo_device::voodoo_w )
/* check for byte swizzling (bit 18) */
if (offset & 0x40000/4)
data = FLIPENDIAN_INT32(data);
- cmdfifo_w(this, &fbi.cmdfifo[0], offset & 0xffff, data);
+ cmdfifo_w(v, &v->fbi.cmdfifo[0], offset & 0xffff, data);
g_profiler.stop();
return;
}
/* we're a register access; but only certain ones are allowed */
- access = regaccess[offset & 0xff];
+ access = v->regaccess[offset & 0xff];
if (!(access & REGISTER_WRITETHRU))
{
/* track swap buffers regardless */
if ((offset & 0xff) == swapbufferCMD)
- fbi.swaps_pending++;
+ v->fbi.swaps_pending++;
- logerror("Ignoring write to %s in CMDFIFO mode\n", regnames[offset & 0xff]);
+ logerror("Ignoring write to %s in CMDFIFO mode\n", v->regnames[offset & 0xff]);
g_profiler.stop();
return;
}
@@ -3663,7 +3725,7 @@ WRITE32_MEMBER( voodoo_device::voodoo_w )
/* check the access behavior; note that the table works even if the */
/* alternate mapping is used */
- access = regaccess[offset & 0xff];
+ access = v->regaccess[offset & 0xff];
/* ignore if writes aren't allowed */
if (!(access & REGISTER_WRITE))
@@ -3678,31 +3740,31 @@ WRITE32_MEMBER( voodoo_device::voodoo_w )
/* track swap buffers */
if ((offset & 0xff) == swapbufferCMD)
- fbi.swaps_pending++;
+ v->fbi.swaps_pending++;
}
/* if we don't have anything pending, or if FIFOs are disabled, just execute */
- if (!pci.op_pending || !INITEN_ENABLE_PCI_FIFO(pci.init_enable))
+ if (!v->pci.op_pending || !INITEN_ENABLE_PCI_FIFO(v->pci.init_enable))
{
int cycles;
/* target the appropriate location */
if ((offset & (0xc00000/4)) == 0)
- cycles = register_w(this, offset, data);
+ cycles = register_w(v, offset, data);
else if (offset & (0x800000/4))
- cycles = texture_w(this, offset, data);
+ cycles = texture_w(v, offset, data);
else
- cycles = lfb_w(this, offset, data, mem_mask);
+ cycles = lfb_w(v, offset, data, mem_mask);
/* if we ended up with cycles, mark the operation pending */
if (cycles)
{
- pci.op_pending = TRUE;
- pci.op_end_time = machine().time() + attotime(0, (attoseconds_t)cycles * attoseconds_per_cycle);
+ v->pci.op_pending = TRUE;
+ v->pci.op_end_time = machine().time() + attotime(0, (attoseconds_t)cycles * v->attoseconds_per_cycle);
- if (LOG_FIFO_VERBOSE) logerror("VOODOO.%d.FIFO:direct write start at %d.%08X%08X end at %d.%08X%08X\n", index,
+ if (LOG_FIFO_VERBOSE) logerror("VOODOO.%d.FIFO:direct write start at %d.%08X%08X end at %d.%08X%08X\n", v->index,
machine().time().seconds(), (UINT32)(machine().time().attoseconds() >> 32), (UINT32)machine().time().attoseconds(),
- pci.op_end_time.seconds(), (UINT32)(pci.op_end_time.attoseconds() >> 32), (UINT32)pci.op_end_time.attoseconds());
+ v->pci.op_end_time.seconds(), (UINT32)(v->pci.op_end_time.attoseconds() >> 32), (UINT32)v->pci.op_end_time.attoseconds());
}
g_profiler.stop();
return;
@@ -3718,56 +3780,56 @@ WRITE32_MEMBER( voodoo_device::voodoo_w )
}
/* if there's room in the PCI FIFO, add there */
- if (LOG_FIFO_VERBOSE) logerror("VOODOO.%d.FIFO:voodoo_w adding to PCI FIFO @ %08X=%08X\n", this, offset, data);
- if (!fifo_full(&pci.fifo))
+ if (LOG_FIFO_VERBOSE) logerror("VOODOO.%d.FIFO:voodoo_w adding to PCI FIFO @ %08X=%08X\n", v->index, offset, data);
+ if (!fifo_full(&v->pci.fifo))
{
- fifo_add(&pci.fifo, offset);
- fifo_add(&pci.fifo, data);
+ fifo_add(&v->pci.fifo, offset);
+ fifo_add(&v->pci.fifo, data);
}
else
fatalerror("PCI FIFO full\n");
/* handle flushing to the memory FIFO */
- if (FBIINIT0_ENABLE_MEMORY_FIFO(reg[fbiInit0].u) &&
- fifo_space(&pci.fifo) <= 2 * FBIINIT4_MEMORY_FIFO_LWM(reg[fbiInit4].u))
+ if (FBIINIT0_ENABLE_MEMORY_FIFO(v->reg[fbiInit0].u) &&
+ fifo_space(&v->pci.fifo) <= 2 * FBIINIT4_MEMORY_FIFO_LWM(v->reg[fbiInit4].u))
{
UINT8 valid[4];
/* determine which types of data can go to the memory FIFO */
valid[0] = TRUE;
- valid[1] = FBIINIT0_LFB_TO_MEMORY_FIFO(reg[fbiInit0].u);
- valid[2] = valid[3] = FBIINIT0_TEXMEM_TO_MEMORY_FIFO(reg[fbiInit0].u);
+ valid[1] = FBIINIT0_LFB_TO_MEMORY_FIFO(v->reg[fbiInit0].u);
+ valid[2] = valid[3] = FBIINIT0_TEXMEM_TO_MEMORY_FIFO(v->reg[fbiInit0].u);
/* flush everything we can */
- if (LOG_FIFO_VERBOSE) logerror("VOODOO.%d.FIFO:voodoo_w moving PCI FIFO to memory FIFO\n", index);
- while (!fifo_empty(&pci.fifo) && valid[(fifo_peek(&pci.fifo) >> 22) & 3])
+ if (LOG_FIFO_VERBOSE) logerror("VOODOO.%d.FIFO:voodoo_w moving PCI FIFO to memory FIFO\n", v->index);
+ while (!fifo_empty(&v->pci.fifo) && valid[(fifo_peek(&v->pci.fifo) >> 22) & 3])
{
- fifo_add(&fbi.fifo, fifo_remove(&pci.fifo));
- fifo_add(&fbi.fifo, fifo_remove(&pci.fifo));
+ fifo_add(&v->fbi.fifo, fifo_remove(&v->pci.fifo));
+ fifo_add(&v->fbi.fifo, fifo_remove(&v->pci.fifo));
}
/* if we're above the HWM as a result, stall */
- if (FBIINIT0_STALL_PCIE_FOR_HWM(reg[fbiInit0].u) &&
- fifo_items(&fbi.fifo) >= 2 * 32 * FBIINIT0_MEMORY_FIFO_HWM(reg[fbiInit0].u))
+ if (FBIINIT0_STALL_PCIE_FOR_HWM(v->reg[fbiInit0].u) &&
+ fifo_items(&v->fbi.fifo) >= 2 * 32 * FBIINIT0_MEMORY_FIFO_HWM(v->reg[fbiInit0].u))
{
- if (LOG_FIFO) logerror("VOODOO.%d.FIFO:voodoo_w hit memory FIFO HWM -- stalling\n", index);
- stall_cpu(this, STALLED_UNTIL_FIFO_LWM, machine().time());
+ if (LOG_FIFO) logerror("VOODOO.%d.FIFO:voodoo_w hit memory FIFO HWM -- stalling\n", v->index);
+ stall_cpu(v, STALLED_UNTIL_FIFO_LWM, machine().time());
}
}
/* if we're at the LWM for the PCI FIFO, stall */
- if (FBIINIT0_STALL_PCIE_FOR_HWM(reg[fbiInit0].u) &&
- fifo_space(&pci.fifo) <= 2 * FBIINIT0_PCI_FIFO_LWM(reg[fbiInit0].u))
+ if (FBIINIT0_STALL_PCIE_FOR_HWM(v->reg[fbiInit0].u) &&
+ fifo_space(&v->pci.fifo) <= 2 * FBIINIT0_PCI_FIFO_LWM(v->reg[fbiInit0].u))
{
- if (LOG_FIFO) logerror("VOODOO.%d.FIFO:voodoo_w hit PCI FIFO free LWM -- stalling\n", index);
- stall_cpu(this, STALLED_UNTIL_FIFO_LWM, machine().time());
+ if (LOG_FIFO) logerror("VOODOO.%d.FIFO:voodoo_w hit PCI FIFO free LWM -- stalling\n", v->index);
+ stall_cpu(v, STALLED_UNTIL_FIFO_LWM, machine().time());
}
/* if we weren't ready, and this is a non-FIFO access, stall until the FIFOs are clear */
if (stall)
{
- if (LOG_FIFO_VERBOSE) logerror("VOODOO.%d.FIFO:voodoo_w wrote non-FIFO register -- stalling until clear\n", index);
- stall_cpu(this, STALLED_UNTIL_FIFO_EMPTY, machine().time());
+ if (LOG_FIFO_VERBOSE) logerror("VOODOO.%d.FIFO:voodoo_w wrote non-FIFO register -- stalling until clear\n", v->index);
+ stall_cpu(v, STALLED_UNTIL_FIFO_EMPTY, machine().time());
}
g_profiler.stop();
@@ -3781,71 +3843,70 @@ WRITE32_MEMBER( voodoo_device::voodoo_w )
*
*************************************/
-static UINT32 register_r(voodoo_device *vd, offs_t offset)
+static UINT32 register_r(voodoo_state *v, offs_t offset)
{
-
int regnum = offset & 0xff;
UINT32 result;
/* statistics */
- vd->stats.reg_reads++;
+ v->stats.reg_reads++;
/* first make sure this register is readable */
- if (!(vd->regaccess[regnum] & REGISTER_READ))
+ if (!(v->regaccess[regnum] & REGISTER_READ))
{
- vd->device->logerror("VOODOO.%d.ERROR:Invalid attempt to read %s\n", vd->index, regnum < 225 ? vd->regnames[regnum] : "unknown register");
+ v->device->logerror("VOODOO.%d.ERROR:Invalid attempt to read %s\n", v->index, regnum < 225 ? v->regnames[regnum] : "unknown register");
return 0xffffffff;
}
/* default result is the FBI register value */
- result = vd->reg[regnum].u;
+ result = v->reg[regnum].u;
/* some registers are dynamic; compute them */
switch (regnum)
{
- case vdstatus:
+ case status:
/* start with a blank slate */
result = 0;
/* bits 5:0 are the PCI FIFO free space */
- if (fifo_empty(&vd->pci.fifo))
+ if (fifo_empty(&v->pci.fifo))
result |= 0x3f << 0;
else
{
- int temp = fifo_space(&vd->pci.fifo)/2;
+ int temp = fifo_space(&v->pci.fifo)/2;
if (temp > 0x3f)
temp = 0x3f;
result |= temp << 0;
}
/* bit 6 is the vertical retrace */
- result |= vd->fbi.vblank << 6;
+ result |= v->fbi.vblank << 6;
/* bit 7 is FBI graphics engine busy */
- if (vd->pci.op_pending)
+ if (v->pci.op_pending)
result |= 1 << 7;
/* bit 8 is TREX busy */
- if (vd->pci.op_pending)
+ if (v->pci.op_pending)
result |= 1 << 8;
/* bit 9 is overall busy */
- if (vd->pci.op_pending)
+ if (v->pci.op_pending)
result |= 1 << 9;
/* Banshee is different starting here */
- if (vd->vd_type < TYPE_VOODOO_BANSHEE)
+ if (v->type < TYPE_VOODOO_BANSHEE)
{
/* bits 11:10 specifies which buffer is visible */
- result |= vd->fbi.frontbuf << 10;
+ result |= v->fbi.frontbuf << 10;
/* bits 27:12 indicate memory FIFO freespace */
- if (!FBIINIT0_ENABLE_MEMORY_FIFO(vd->reg[fbiInit0].u) || fifo_empty(&vd->fbi.fifo))
+ if (!FBIINIT0_ENABLE_MEMORY_FIFO(v->reg[fbiInit0].u) || fifo_empty(&v->fbi.fifo))
result |= 0xffff << 12;
else
{
- int temp = fifo_space(&vd->fbi.fifo)/2;
+ int temp = fifo_space(&v->fbi.fifo)/2;
if (temp > 0xffff)
temp = 0xffff;
result |= temp << 12;
@@ -3856,38 +3917,38 @@ static UINT32 register_r(voodoo_device *vd, offs_t offset)
/* bit 10 is 2D busy */
/* bit 11 is cmd FIFO 0 busy */
- if (vd->fbi.cmdfifo[0].enable && vd->fbi.cmdfifo[0].depth > 0)
+ if (v->fbi.cmdfifo[0].enable && v->fbi.cmdfifo[0].depth > 0)
result |= 1 << 11;
/* bit 12 is cmd FIFO 1 busy */
- if (vd->fbi.cmdfifo[1].enable && vd->fbi.cmdfifo[1].depth > 0)
+ if (v->fbi.cmdfifo[1].enable && v->fbi.cmdfifo[1].depth > 0)
result |= 1 << 12;
}
/* bits 30:28 are the number of pending swaps */
- if (vd->fbi.swaps_pending > 7)
+ if (v->fbi.swaps_pending > 7)
result |= 7 << 28;
else
- result |= vd->fbi.swaps_pending << 28;
+ result |= v->fbi.swaps_pending << 28;
/* bit 31 is not used */
/* eat some cycles since people like polling here */
- if (EAT_CYCLES) vd->cpu->execute().eat_cycles(1000);
+ if (EAT_CYCLES) v->cpu->execute().eat_cycles(1000);
break;
/* bit 2 of the initEnable register maps this to dacRead */
case fbiInit2:
- if (INITEN_REMAP_INIT_TO_DAC(vd->pci.init_enable))
- result = vd->dac.read_result;
+ if (INITEN_REMAP_INIT_TO_DAC(v->pci.init_enable))
+ result = v->dac.read_result;
break;
/* return the current scanline for now */
case vRetrace:
/* eat some cycles since people like polling here */
- if (EAT_CYCLES) vd->cpu->execute().eat_cycles(10);
- result = vd->screen->vpos();
+ if (EAT_CYCLES) v->cpu->execute().eat_cycles(10);
+ result = v->screen->vpos();
break;
/* reserved area in the TMU read by the Vegas startup sequence */
@@ -3898,26 +3959,26 @@ static UINT32 register_r(voodoo_device *vd, offs_t offset)
/* cmdFifo -- Voodoo2 only */
case cmdFifoRdPtr:
- result = vd->fbi.cmdfifo[0].rdptr;
+ result = v->fbi.cmdfifo[0].rdptr;
/* eat some cycles since people like polling here */
- if (EAT_CYCLES) vd->cpu->execute().eat_cycles(1000);
+ if (EAT_CYCLES) v->cpu->execute().eat_cycles(1000);
break;
case cmdFifoAMin:
- result = vd->fbi.cmdfifo[0].amin;
+ result = v->fbi.cmdfifo[0].amin;
break;
case cmdFifoAMax:
- result = vd->fbi.cmdfifo[0].amax;
+ result = v->fbi.cmdfifo[0].amax;
break;
case cmdFifoDepth:
- result = vd->fbi.cmdfifo[0].depth;
+ result = v->fbi.cmdfifo[0].depth;
break;
case cmdFifoHoles:
- result = vd->fbi.cmdfifo[0].holes;
+ result = v->fbi.cmdfifo[0].holes;
break;
/* all counters are 24-bit only */
@@ -3926,9 +3987,9 @@ static UINT32 register_r(voodoo_device *vd, offs_t offset)
case fbiZfuncFail:
case fbiAfuncFail:
case fbiPixelsOut:
- update_statistics(vd, TRUE);
+ update_statistics(v, TRUE);
case fbiTrianglesOut:
- result = vd->reg[regnum].u & 0xffffff;
+ result = v->reg[regnum].u & 0xffffff;
break;
}
@@ -3937,19 +3998,19 @@ static UINT32 register_r(voodoo_device *vd, offs_t offset)
int logit = TRUE;
/* don't log multiple identical status reads from the same address */
- if (regnum == vdstatus)
+ if (regnum == status)
{
- offs_t pc = vd->cpu->safe_pc();
- if (pc == vd->last_status_pc && result == vd->last_status_value)
+ offs_t pc = v->cpu->safe_pc();
+ if (pc == v->last_status_pc && result == v->last_status_value)
logit = FALSE;
- vd->last_status_pc = pc;
- vd->last_status_value = result;
+ v->last_status_pc = pc;
+ v->last_status_value = result;
}
if (regnum == cmdFifoRdPtr)
logit = FALSE;
if (logit)
- vd->device->logerror("VOODOO.%d.REG:%s read = %08X\n", vd->index, vd->regnames[regnum], result);
+ v->device->logerror("VOODOO.%d.REG:%s read = %08X\n", v->index, v->regnames[regnum], result);
}
return result;
@@ -3963,7 +4024,7 @@ static UINT32 register_r(voodoo_device *vd, offs_t offset)
*
*************************************/
-static UINT32 lfb_r(voodoo_device *vd, offs_t offset, bool lfb_3d)
+static UINT32 lfb_r(voodoo_state *v, offs_t offset, bool lfb_3d)
{
UINT16 *buffer;
UINT32 bufmax;
@@ -3972,34 +4033,34 @@ static UINT32 lfb_r(voodoo_device *vd, offs_t offset, bool lfb_3d)
int x, y, scry, destbuf;
/* statistics */
- vd->stats.lfb_reads++;
+ v->stats.lfb_reads++;
/* compute X,Y */
offset <<= 1;
- x = offset & ((1 << vd->fbi.lfb_stride) - 1);
- y = (offset >> vd->fbi.lfb_stride);
+ x = offset & ((1 << v->fbi.lfb_stride) - 1);
+ y = (offset >> v->fbi.lfb_stride);
/* select the target buffer */
if (lfb_3d) {
y &= 0x3ff;
- destbuf = (vd->vd_type >= TYPE_VOODOO_BANSHEE) ? 1 : LFBMODE_READ_BUFFER_SELECT(vd->reg[lfbMode].u);
+ destbuf = (v->type >= TYPE_VOODOO_BANSHEE) ? 1 : LFBMODE_READ_BUFFER_SELECT(v->reg[lfbMode].u);
switch (destbuf)
{
case 0: /* front buffer */
- buffer = (UINT16 *)(vd->fbi.ram + vd->fbi.rgboffs[vd->fbi.frontbuf]);
- bufmax = (vd->fbi.mask + 1 - vd->fbi.rgboffs[vd->fbi.frontbuf]) / 2;
+ buffer = (UINT16 *)(v->fbi.ram + v->fbi.rgboffs[v->fbi.frontbuf]);
+ bufmax = (v->fbi.mask + 1 - v->fbi.rgboffs[v->fbi.frontbuf]) / 2;
break;
case 1: /* back buffer */
- buffer = (UINT16 *)(vd->fbi.ram + vd->fbi.rgboffs[vd->fbi.backbuf]);
- bufmax = (vd->fbi.mask + 1 - vd->fbi.rgboffs[vd->fbi.backbuf]) / 2;
+ buffer = (UINT16 *)(v->fbi.ram + v->fbi.rgboffs[v->fbi.backbuf]);
+ bufmax = (v->fbi.mask + 1 - v->fbi.rgboffs[v->fbi.backbuf]) / 2;
break;
case 2: /* aux buffer */
- if (vd->fbi.auxoffs == ~0)
+ if (v->fbi.auxoffs == ~0)
return 0xffffffff;
- buffer = (UINT16 *)(vd->fbi.ram + vd->fbi.auxoffs);
- bufmax = (vd->fbi.mask + 1 - vd->fbi.auxoffs) / 2;
+ buffer = (UINT16 *)(v->fbi.ram + v->fbi.auxoffs);
+ bufmax = (v->fbi.mask + 1 - v->fbi.auxoffs) / 2;
break;
default: /* reserved */
@@ -4008,37 +4069,37 @@ static UINT32 lfb_r(voodoo_device *vd, offs_t offset, bool lfb_3d)
/* determine the screen Y */
scry = y;
- if (LFBMODE_Y_ORIGIN(vd->reg[lfbMode].u))
- scry = (vd->fbi.yorigin - y) & 0x3ff;
+ if (LFBMODE_Y_ORIGIN(v->reg[lfbMode].u))
+ scry = (v->fbi.yorigin - y) & 0x3ff;
} else {
// Direct lfb access
- buffer = (UINT16 *)(vd->fbi.ram + vd->fbi.lfb_base*4);
- bufmax = (vd->fbi.mask + 1 - vd->fbi.lfb_base*4) / 2;
+ buffer = (UINT16 *)(v->fbi.ram + v->fbi.lfb_base*4);
+ bufmax = (v->fbi.mask + 1 - v->fbi.lfb_base*4) / 2;
scry = y;
}
/* advance pointers to the proper row */
- bufoffs = scry * vd->fbi.rowpixels + x;
+ bufoffs = scry * v->fbi.rowpixels + x;
if (bufoffs >= bufmax) {
- vd->device->logerror("LFB_R: Buffer offset out of bounds x=%i y=%i lfb_3d=%i offset=%08X bufoffs=%08X\n", x, y, lfb_3d, offset, (UINT32) bufoffs);
+ v->device->logerror("LFB_R: Buffer offset out of bounds x=%i y=%i lfb_3d=%i offset=%08X bufoffs=%08X\n", x, y, lfb_3d, offset, (UINT32) bufoffs);
return 0xffffffff;
}
/* wait for any outstanding work to finish */
- poly_wait(vd->poly, "LFB read");
+ poly_wait(v->poly, "LFB read");
/* compute the data */
data = buffer[bufoffs + 0] | (buffer[bufoffs + 1] << 16);
/* word swapping */
- if (LFBMODE_WORD_SWAP_READS(vd->reg[lfbMode].u))
+ if (LFBMODE_WORD_SWAP_READS(v->reg[lfbMode].u))
data = (data << 16) | (data >> 16);
/* byte swizzling */
- if (LFBMODE_BYTE_SWIZZLE_READS(vd->reg[lfbMode].u))
+ if (LFBMODE_BYTE_SWIZZLE_READS(v->reg[lfbMode].u))
data = FLIPENDIAN_INT32(data);
- if (LOG_LFB) vd->device->logerror("VOODOO.%d.LFB:read (%d,%d) = %08X\n", vd->index, x, y, data);
+ if (LOG_LFB) v->device->logerror("VOODOO.%d.LFB:read (%d,%d) = %08X\n", v->index, x, y, data);
return data;
}
@@ -4053,16 +4114,17 @@ static UINT32 lfb_r(voodoo_device *vd, offs_t offset, bool lfb_3d)
READ32_MEMBER( voodoo_device::voodoo_r )
{
+ voodoo_state *v = get_safe_token(this);
/* if we have something pending, flush the FIFOs up to the current time */
- if (pci.op_pending)
- flush_fifos(this, machine().time());
+ if (v->pci.op_pending)
+ flush_fifos(v, machine().time());
/* target the appropriate location */
if (!(offset & (0xc00000/4)))
- return register_r(this, offset);
+ return register_r(v, offset);
else if (!(offset & (0x800000/4)))
- return lfb_r(this, offset, true);
+ return lfb_r(v, offset, true);
return 0xffffffff;
}
@@ -4078,6 +4140,7 @@ READ32_MEMBER( voodoo_device::voodoo_r )
READ32_MEMBER( voodoo_banshee_device::banshee_agp_r )
{
+ voodoo_state *v = get_safe_token(this);
UINT32 result;
offset &= 0x1ff/4;
@@ -4086,63 +4149,64 @@ READ32_MEMBER( voodoo_banshee_device::banshee_agp_r )
switch (offset)
{
case cmdRdPtrL0:
- result = fbi.cmdfifo[0].rdptr;
+ result = v->fbi.cmdfifo[0].rdptr;
break;
case cmdAMin0:
- result = fbi.cmdfifo[0].amin;
+ result = v->fbi.cmdfifo[0].amin;
break;
case cmdAMax0:
- result = fbi.cmdfifo[0].amax;
+ result = v->fbi.cmdfifo[0].amax;
break;
case cmdFifoDepth0:
- result = fbi.cmdfifo[0].depth;
+ result = v->fbi.cmdfifo[0].depth;
break;
case cmdHoleCnt0:
- result = fbi.cmdfifo[0].holes;
+ result = v->fbi.cmdfifo[0].holes;
break;
case cmdRdPtrL1:
- result = fbi.cmdfifo[1].rdptr;
+ result = v->fbi.cmdfifo[1].rdptr;
break;
case cmdAMin1:
- result = fbi.cmdfifo[1].amin;
+ result = v->fbi.cmdfifo[1].amin;
break;
case cmdAMax1:
- result = fbi.cmdfifo[1].amax;
+ result = v->fbi.cmdfifo[1].amax;
break;
case cmdFifoDepth1:
- result = fbi.cmdfifo[1].depth;
+ result = v->fbi.cmdfifo[1].depth;
break;
case cmdHoleCnt1:
- result = fbi.cmdfifo[1].holes;
+ result = v->fbi.cmdfifo[1].holes;
break;
default:
- result = banshee.agp[offset];
+ result = v->banshee.agp[offset];
break;
}
if (LOG_REGISTERS)
- logerror("%s:banshee_r(AGP:%s)\n", device->machine().describe_context(), banshee_agp_reg_name[offset]);
+ logerror("%s:banshee_r(AGP:%s)\n", v->device->machine().describe_context(), banshee_agp_reg_name[offset]);
return result;
}
READ32_MEMBER( voodoo_banshee_device::banshee_r )
{
+ voodoo_state *v = get_safe_token(this);
UINT32 result = 0xffffffff;
/* if we have something pending, flush the FIFOs up to the current time */
- if (pci.op_pending)
- flush_fifos(this, machine().time());
+ if (v->pci.op_pending)
+ flush_fifos(v, machine().time());
if (offset < 0x80000/4)
result = banshee_io_r(space, offset, mem_mask);
@@ -4151,7 +4215,7 @@ READ32_MEMBER( voodoo_banshee_device::banshee_r )
else if (offset < 0x200000/4)
logerror("%s:banshee_r(2D:%X)\n", machine().describe_context(), (offset*4) & 0xfffff);
else if (offset < 0x600000/4)
- result = register_r(this, offset & 0x1fffff/4);
+ result = register_r(v, offset & 0x1fffff/4);
else if (offset < 0x800000/4)
logerror("%s:banshee_r(TEX0:%X)\n", machine().describe_context(), (offset*4) & 0x1fffff);
else if (offset < 0xa00000/4)
@@ -4162,7 +4226,7 @@ READ32_MEMBER( voodoo_banshee_device::banshee_r )
logerror("%s:banshee_r(YUV:%X)\n", machine().describe_context(), (offset*4) & 0x3fffff);
else if (offset < 0x2000000/4)
{
- result = lfb_r(this, offset & 0xffffff/4, true);
+ result = lfb_r(v, offset & 0xffffff/4, true);
} else {
logerror("%s:banshee_r(%X) Access out of bounds\n", machine().describe_context(), offset*4);
}
@@ -4172,26 +4236,27 @@ READ32_MEMBER( voodoo_banshee_device::banshee_r )
READ32_MEMBER( voodoo_banshee_device::banshee_fb_r )
{
+ voodoo_state *v = get_safe_token(this);
UINT32 result = 0xffffffff;
/* if we have something pending, flush the FIFOs up to the current time */
- if (pci.op_pending)
- flush_fifos(this, machine().time());
+ if (v->pci.op_pending)
+ flush_fifos(v, machine().time());
- if (offset < fbi.lfb_base)
+ if (offset < v->fbi.lfb_base)
{
#if LOG_LFB
logerror("%s:banshee_fb_r(%X)\n", machine().describe_context(), offset*4);
#endif
- if (offset*4 <= fbi.mask)
- result = ((UINT32 *)fbi.ram)[offset];
+ if (offset*4 <= v->fbi.mask)
+ result = ((UINT32 *)v->fbi.ram)[offset];
else
logerror("%s:banshee_fb_r(%X) Access out of bounds\n", machine().describe_context(), offset*4);
}
else {
if (LOG_LFB)
- logerror("%s:banshee_fb_r(%X) to lfb_r: %08X lfb_base=%08X\n", machine().describe_context(), offset*4, offset - fbi.lfb_base, fbi.lfb_base);
- result = lfb_r(this, offset - fbi.lfb_base, false);
+ logerror("%s:banshee_fb_r(%X) to lfb_r: %08X lfb_base=%08X\n", machine().describe_context(), offset*4, offset - v->fbi.lfb_base, v->fbi.lfb_base);
+ result = lfb_r(v, offset - v->fbi.lfb_base, false);
}
return result;
}
@@ -4199,6 +4264,7 @@ READ32_MEMBER( voodoo_banshee_device::banshee_fb_r )
READ8_MEMBER( voodoo_banshee_device::banshee_vga_r )
{
+ voodoo_state *v = get_safe_token(this);
UINT8 result = 0xff;
offset &= 0x1f;
@@ -4208,10 +4274,10 @@ READ8_MEMBER( voodoo_banshee_device::banshee_vga_r )
{
/* attribute access */
case 0x3c0:
- if (banshee.vga[0x3c1 & 0x1f] < ARRAY_LENGTH(banshee.att))
- result = banshee.att[banshee.vga[0x3c1 & 0x1f]];
+ if (v->banshee.vga[0x3c1 & 0x1f] < ARRAY_LENGTH(v->banshee.att))
+ result = v->banshee.att[v->banshee.vga[0x3c1 & 0x1f]];
if (LOG_REGISTERS)
- logerror("%s:banshee_att_r(%X)\n", machine().describe_context(), banshee.vga[0x3c1 & 0x1f]);
+ logerror("%s:banshee_att_r(%X)\n", machine().describe_context(), v->banshee.vga[0x3c1 & 0x1f]);
break;
/* Input status 0 */
@@ -4229,41 +4295,41 @@ READ8_MEMBER( voodoo_banshee_device::banshee_vga_r )
/* Sequencer access */
case 0x3c5:
- if (banshee.vga[0x3c4 & 0x1f] < ARRAY_LENGTH(banshee.seq))
- result = banshee.seq[banshee.vga[0x3c4 & 0x1f]];
+ if (v->banshee.vga[0x3c4 & 0x1f] < ARRAY_LENGTH(v->banshee.seq))
+ result = v->banshee.seq[v->banshee.vga[0x3c4 & 0x1f]];
if (LOG_REGISTERS)
- logerror("%s:banshee_seq_r(%X)\n", machine().describe_context(), banshee.vga[0x3c4 & 0x1f]);
+ logerror("%s:banshee_seq_r(%X)\n", machine().describe_context(), v->banshee.vga[0x3c4 & 0x1f]);
break;
/* Feature control */
case 0x3ca:
- result = banshee.vga[0x3da & 0x1f];
- banshee.attff = 0;
+ result = v->banshee.vga[0x3da & 0x1f];
+ v->banshee.attff = 0;
if (LOG_REGISTERS)
logerror("%s:banshee_vga_r(%X)\n", machine().describe_context(), 0x300+offset);
break;
/* Miscellaneous output */
case 0x3cc:
- result = banshee.vga[0x3c2 & 0x1f];
+ result = v->banshee.vga[0x3c2 & 0x1f];
if (LOG_REGISTERS)
logerror("%s:banshee_vga_r(%X)\n", machine().describe_context(), 0x300+offset);
break;
/* Graphics controller access */
case 0x3cf:
- if (banshee.vga[0x3ce & 0x1f] < ARRAY_LENGTH(banshee.gc))
- result = banshee.gc[banshee.vga[0x3ce & 0x1f]];
+ if (v->banshee.vga[0x3ce & 0x1f] < ARRAY_LENGTH(v->banshee.gc))
+ result = v->banshee.gc[v->banshee.vga[0x3ce & 0x1f]];
if (LOG_REGISTERS)
- logerror("%s:banshee_gc_r(%X)\n", machine().describe_context(), banshee.vga[0x3ce & 0x1f]);
+ logerror("%s:banshee_gc_r(%X)\n", machine().describe_context(), v->banshee.vga[0x3ce & 0x1f]);
break;
/* CRTC access */
case 0x3d5:
- if (banshee.vga[0x3d4 & 0x1f] < ARRAY_LENGTH(banshee.crtc))
- result = banshee.crtc[banshee.vga[0x3d4 & 0x1f]];
+ if (v->banshee.vga[0x3d4 & 0x1f] < ARRAY_LENGTH(v->banshee.crtc))
+ result = v->banshee.crtc[v->banshee.vga[0x3d4 & 0x1f]];
if (LOG_REGISTERS)
- logerror("%s:banshee_crtc_r(%X)\n", machine().describe_context(), banshee.vga[0x3d4 & 0x1f]);
+ logerror("%s:banshee_crtc_r(%X)\n", machine().describe_context(), v->banshee.vga[0x3d4 & 0x1f]);
break;
/* Input status 1 */
@@ -4283,7 +4349,7 @@ READ8_MEMBER( voodoo_banshee_device::banshee_vga_r )
break;
default:
- result = banshee.vga[offset];
+ result = v->banshee.vga[offset];
if (LOG_REGISTERS)
logerror("%s:banshee_vga_r(%X)\n", machine().describe_context(), 0x300+offset);
break;
@@ -4294,6 +4360,7 @@ READ8_MEMBER( voodoo_banshee_device::banshee_vga_r )
READ32_MEMBER( voodoo_banshee_device::banshee_io_r )
{
+ voodoo_state *v = get_safe_token(this);
UINT32 result;
offset &= 0xff/4;
@@ -4302,13 +4369,13 @@ READ32_MEMBER( voodoo_banshee_device::banshee_io_r )
switch (offset)
{
case io_status:
- result = register_r(this, 0);
+ result = register_r(v, 0);
break;
case io_dacData:
- result = fbi.clut[banshee.io[io_dacAddr] & 0x1ff] = banshee.io[offset];
+ result = v->fbi.clut[v->banshee.io[io_dacAddr] & 0x1ff] = v->banshee.io[offset];
if (LOG_REGISTERS)
- logerror("%s:banshee_dac_r(%X)\n", machine().describe_context(), banshee.io[io_dacAddr] & 0x1ff);
+ logerror("%s:banshee_dac_r(%X)\n", machine().describe_context(), v->banshee.io[io_dacAddr] & 0x1ff);
break;
case io_vgab0: case io_vgab4: case io_vgab8: case io_vgabc:
@@ -4326,7 +4393,7 @@ READ32_MEMBER( voodoo_banshee_device::banshee_io_r )
break;
default:
- result = banshee.io[offset];
+ result = v->banshee.io[offset];
if (LOG_REGISTERS)
logerror("%s:banshee_io_r(%s)\n", machine().describe_context(), banshee_io_reg_name[offset]);
break;
@@ -4342,9 +4409,9 @@ READ32_MEMBER( voodoo_banshee_device::banshee_rom_r )
return 0xffffffff;
}
-static void blit_2d(voodoo_device *vd, UINT32 data)
+static void blit_2d(voodoo_state *v, UINT32 data)
{
- switch (vd->banshee.blt_cmd)
+ switch (v->banshee.blt_cmd)
{
case 0: // NOP - wait for idle
{
@@ -4367,46 +4434,46 @@ static void blit_2d(voodoo_device *vd, UINT32 data)
case 3: // Host-to-screen blit
{
- UINT32 addr = vd->banshee.blt_dst_base;
+ UINT32 addr = v->banshee.blt_dst_base;
- addr += (vd->banshee.blt_dst_y * vd->banshee.blt_dst_stride) + (vd->banshee.blt_dst_x * vd->banshee.blt_dst_bpp);
+ addr += (v->banshee.blt_dst_y * v->banshee.blt_dst_stride) + (v->banshee.blt_dst_x * v->banshee.blt_dst_bpp);
#if LOG_BANSHEE_2D
- logerror(" blit_2d:host_to_screen: %08x -> %08x, %d, %d\n", data, addr, vd->banshee.blt_dst_x, vd->banshee.blt_dst_y);
+ logerror(" blit_2d:host_to_screen: %08x -> %08x, %d, %d\n", data, addr, v->banshee.blt_dst_x, v->banshee.blt_dst_y);
#endif
- switch (vd->banshee.blt_dst_bpp)
+ switch (v->banshee.blt_dst_bpp)
{
case 1:
- vd->fbi.ram[addr+0] = data & 0xff;
- vd->fbi.ram[addr+1] = (data >> 8) & 0xff;
- vd->fbi.ram[addr+2] = (data >> 16) & 0xff;
- vd->fbi.ram[addr+3] = (data >> 24) & 0xff;
- vd->banshee.blt_dst_x += 4;
+ v->fbi.ram[addr+0] = data & 0xff;
+ v->fbi.ram[addr+1] = (data >> 8) & 0xff;
+ v->fbi.ram[addr+2] = (data >> 16) & 0xff;
+ v->fbi.ram[addr+3] = (data >> 24) & 0xff;
+ v->banshee.blt_dst_x += 4;
break;
case 2:
- vd->fbi.ram[addr+1] = data & 0xff;
- vd->fbi.ram[addr+0] = (data >> 8) & 0xff;
- vd->fbi.ram[addr+3] = (data >> 16) & 0xff;
- vd->fbi.ram[addr+2] = (data >> 24) & 0xff;
- vd->banshee.blt_dst_x += 2;
+ v->fbi.ram[addr+1] = data & 0xff;
+ v->fbi.ram[addr+0] = (data >> 8) & 0xff;
+ v->fbi.ram[addr+3] = (data >> 16) & 0xff;
+ v->fbi.ram[addr+2] = (data >> 24) & 0xff;
+ v->banshee.blt_dst_x += 2;
break;
case 3:
- vd->banshee.blt_dst_x += 1;
+ v->banshee.blt_dst_x += 1;
break;
case 4:
- vd->fbi.ram[addr+3] = data & 0xff;
- vd->fbi.ram[addr+2] = (data >> 8) & 0xff;
- vd->fbi.ram[addr+1] = (data >> 16) & 0xff;
- vd->fbi.ram[addr+0] = (data >> 24) & 0xff;
- vd->banshee.blt_dst_x += 1;
+ v->fbi.ram[addr+3] = data & 0xff;
+ v->fbi.ram[addr+2] = (data >> 8) & 0xff;
+ v->fbi.ram[addr+1] = (data >> 16) & 0xff;
+ v->fbi.ram[addr+0] = (data >> 24) & 0xff;
+ v->banshee.blt_dst_x += 1;
break;
}
- if (vd->banshee.blt_dst_x >= vd->banshee.blt_dst_width)
+ if (v->banshee.blt_dst_x >= v->banshee.blt_dst_width)
{
- vd->banshee.blt_dst_x = 0;
- vd->banshee.blt_dst_y++;
+ v->banshee.blt_dst_x = 0;
+ v->banshee.blt_dst_y++;
}
break;
}
@@ -4433,12 +4500,12 @@ static void blit_2d(voodoo_device *vd, UINT32 data)
default:
{
- fatalerror("blit_2d: unknown command %d\n", vd->banshee.blt_cmd);
+ fatalerror("blit_2d: unknown command %d\n", v->banshee.blt_cmd);
}
}
}
-INT32 voodoo_device::banshee_2d_w(voodoo_device *vd, offs_t offset, UINT32 data)
+static INT32 banshee_2d_w(voodoo_state *v, offs_t offset, UINT32 data)
{
switch (offset)
{
@@ -4447,152 +4514,152 @@ INT32 voodoo_device::banshee_2d_w(voodoo_device *vd, offs_t offset, UINT32 data)
logerror(" 2D:command: cmd %d, ROP0 %02X\n", data & 0xf, data >> 24);
#endif
- vd->banshee.blt_src_x = vd->banshee.blt_regs[banshee2D_srcXY] & 0xfff;
- vd->banshee.blt_src_y = (vd->banshee.blt_regs[banshee2D_srcXY] >> 16) & 0xfff;
- vd->banshee.blt_src_base = vd->banshee.blt_regs[banshee2D_srcBaseAddr] & 0xffffff;
- vd->banshee.blt_src_stride = vd->banshee.blt_regs[banshee2D_srcFormat] & 0x3fff;
- vd->banshee.blt_src_width = vd->banshee.blt_regs[banshee2D_srcSize] & 0xfff;
- vd->banshee.blt_src_height = (vd->banshee.blt_regs[banshee2D_srcSize] >> 16) & 0xfff;
+ v->banshee.blt_src_x = v->banshee.blt_regs[banshee2D_srcXY] & 0xfff;
+ v->banshee.blt_src_y = (v->banshee.blt_regs[banshee2D_srcXY] >> 16) & 0xfff;
+ v->banshee.blt_src_base = v->banshee.blt_regs[banshee2D_srcBaseAddr] & 0xffffff;
+ v->banshee.blt_src_stride = v->banshee.blt_regs[banshee2D_srcFormat] & 0x3fff;
+ v->banshee.blt_src_width = v->banshee.blt_regs[banshee2D_srcSize] & 0xfff;
+ v->banshee.blt_src_height = (v->banshee.blt_regs[banshee2D_srcSize] >> 16) & 0xfff;
- switch ((vd->banshee.blt_regs[banshee2D_srcFormat] >> 16) & 0xf)
+ switch ((v->banshee.blt_regs[banshee2D_srcFormat] >> 16) & 0xf)
{
- case 1: vd->banshee.blt_src_bpp = 1; break;
- case 3: vd->banshee.blt_src_bpp = 2; break;
- case 4: vd->banshee.blt_src_bpp = 3; break;
- case 5: vd->banshee.blt_src_bpp = 4; break;
- case 8: vd->banshee.blt_src_bpp = 2; break;
- case 9: vd->banshee.blt_src_bpp = 2; break;
- default: vd->banshee.blt_src_bpp = 1; break;
+ case 1: v->banshee.blt_src_bpp = 1; break;
+ case 3: v->banshee.blt_src_bpp = 2; break;
+ case 4: v->banshee.blt_src_bpp = 3; break;
+ case 5: v->banshee.blt_src_bpp = 4; break;
+ case 8: v->banshee.blt_src_bpp = 2; break;
+ case 9: v->banshee.blt_src_bpp = 2; break;
+ default: v->banshee.blt_src_bpp = 1; break;
}
- vd->banshee.blt_dst_x = vd->banshee.blt_regs[banshee2D_dstXY] & 0xfff;
- vd->banshee.blt_dst_y = (vd->banshee.blt_regs[banshee2D_dstXY] >> 16) & 0xfff;
- vd->banshee.blt_dst_base = vd->banshee.blt_regs[banshee2D_dstBaseAddr] & 0xffffff;
- vd->banshee.blt_dst_stride = vd->banshee.blt_regs[banshee2D_dstFormat] & 0x3fff;
- vd->banshee.blt_dst_width = vd->banshee.blt_regs[banshee2D_dstSize] & 0xfff;
- vd->banshee.blt_dst_height = (vd->banshee.blt_regs[banshee2D_dstSize] >> 16) & 0xfff;
+ v->banshee.blt_dst_x = v->banshee.blt_regs[banshee2D_dstXY] & 0xfff;
+ v->banshee.blt_dst_y = (v->banshee.blt_regs[banshee2D_dstXY] >> 16) & 0xfff;
+ v->banshee.blt_dst_base = v->banshee.blt_regs[banshee2D_dstBaseAddr] & 0xffffff;
+ v->banshee.blt_dst_stride = v->banshee.blt_regs[banshee2D_dstFormat] & 0x3fff;
+ v->banshee.blt_dst_width = v->banshee.blt_regs[banshee2D_dstSize] & 0xfff;
+ v->banshee.blt_dst_height = (v->banshee.blt_regs[banshee2D_dstSize] >> 16) & 0xfff;
- switch ((vd->banshee.blt_regs[banshee2D_dstFormat] >> 16) & 0x7)
+ switch ((v->banshee.blt_regs[banshee2D_dstFormat] >> 16) & 0x7)
{
- case 1: vd->banshee.blt_dst_bpp = 1; break;
- case 3: vd->banshee.blt_dst_bpp = 2; break;
- case 4: vd->banshee.blt_dst_bpp = 3; break;
- case 5: vd->banshee.blt_dst_bpp = 4; break;
- default: vd->banshee.blt_dst_bpp = 1; break;
+ case 1: v->banshee.blt_dst_bpp = 1; break;
+ case 3: v->banshee.blt_dst_bpp = 2; break;
+ case 4: v->banshee.blt_dst_bpp = 3; break;
+ case 5: v->banshee.blt_dst_bpp = 4; break;
+ default: v->banshee.blt_dst_bpp = 1; break;
}
- vd->banshee.blt_cmd = data & 0xf;
+ v->banshee.blt_cmd = data & 0xf;
break;
case banshee2D_colorBack:
#if LOG_BANSHEE_2D
logerror(" 2D:colorBack: %08X\n", data);
#endif
- vd->banshee.blt_regs[banshee2D_colorBack] = data;
+ v->banshee.blt_regs[banshee2D_colorBack] = data;
break;
case banshee2D_colorFore:
#if LOG_BANSHEE_2D
logerror(" 2D:colorFore: %08X\n", data);
#endif
- vd->banshee.blt_regs[banshee2D_colorFore] = data;
+ v->banshee.blt_regs[banshee2D_colorFore] = data;
break;
case banshee2D_srcBaseAddr:
#if LOG_BANSHEE_2D
logerror(" 2D:srcBaseAddr: %08X, %s\n", data & 0xffffff, data & 0x80000000 ? "tiled" : "non-tiled");
#endif
- vd->banshee.blt_regs[banshee2D_srcBaseAddr] = data;
+ v->banshee.blt_regs[banshee2D_srcBaseAddr] = data;
break;
case banshee2D_dstBaseAddr:
#if LOG_BANSHEE_2D
logerror(" 2D:dstBaseAddr: %08X, %s\n", data & 0xffffff, data & 0x80000000 ? "tiled" : "non-tiled");
#endif
- vd->banshee.blt_regs[banshee2D_dstBaseAddr] = data;
+ v->banshee.blt_regs[banshee2D_dstBaseAddr] = data;
break;
case banshee2D_srcSize:
#if LOG_BANSHEE_2D
logerror(" 2D:srcSize: %d, %d\n", data & 0xfff, (data >> 16) & 0xfff);
#endif
- vd->banshee.blt_regs[banshee2D_srcSize] = data;
+ v->banshee.blt_regs[banshee2D_srcSize] = data;
break;
case banshee2D_dstSize:
#if LOG_BANSHEE_2D
logerror(" 2D:dstSize: %d, %d\n", data & 0xfff, (data >> 16) & 0xfff);
#endif
- vd->banshee.blt_regs[banshee2D_dstSize] = data;
+ v->banshee.blt_regs[banshee2D_dstSize] = data;
break;
case banshee2D_srcXY:
#if LOG_BANSHEE_2D
logerror(" 2D:srcXY: %d, %d\n", data & 0xfff, (data >> 16) & 0xfff);
#endif
- vd->banshee.blt_regs[banshee2D_srcXY] = data;
+ v->banshee.blt_regs[banshee2D_srcXY] = data;
break;
case banshee2D_dstXY:
#if LOG_BANSHEE_2D
logerror(" 2D:dstXY: %d, %d\n", data & 0xfff, (data >> 16) & 0xfff);
#endif
- vd->banshee.blt_regs[banshee2D_dstXY] = data;
+ v->banshee.blt_regs[banshee2D_dstXY] = data;
break;
case banshee2D_srcFormat:
#if LOG_BANSHEE_2D
logerror(" 2D:srcFormat: str %d, fmt %d, packing %d\n", data & 0x3fff, (data >> 16) & 0xf, (data >> 22) & 0x3);
#endif
- vd->banshee.blt_regs[banshee2D_srcFormat] = data;
+ v->banshee.blt_regs[banshee2D_srcFormat] = data;
break;
case banshee2D_dstFormat:
#if LOG_BANSHEE_2D
logerror(" 2D:dstFormat: str %d, fmt %d\n", data & 0x3fff, (data >> 16) & 0xf);
#endif
- vd->banshee.blt_regs[banshee2D_dstFormat] = data;
+ v->banshee.blt_regs[banshee2D_dstFormat] = data;
break;
case banshee2D_clip0Min:
#if LOG_BANSHEE_2D
logerror(" 2D:clip0Min: %d, %d\n", data & 0xfff, (data >> 16) & 0xfff);
#endif
- vd->banshee.blt_regs[banshee2D_clip0Min] = data;
+ v->banshee.blt_regs[banshee2D_clip0Min] = data;
break;
case banshee2D_clip0Max:
#if LOG_BANSHEE_2D
logerror(" 2D:clip0Max: %d, %d\n", data & 0xfff, (data >> 16) & 0xfff);
#endif
- vd->banshee.blt_regs[banshee2D_clip0Max] = data;
+ v->banshee.blt_regs[banshee2D_clip0Max] = data;
break;
case banshee2D_clip1Min:
#if LOG_BANSHEE_2D
logerror(" 2D:clip1Min: %d, %d\n", data & 0xfff, (data >> 16) & 0xfff);
#endif
- vd->banshee.blt_regs[banshee2D_clip1Min] = data;
+ v->banshee.blt_regs[banshee2D_clip1Min] = data;
break;
case banshee2D_clip1Max:
#if LOG_BANSHEE_2D
logerror(" 2D:clip1Max: %d, %d\n", data & 0xfff, (data >> 16) & 0xfff);
#endif
- vd->banshee.blt_regs[banshee2D_clip1Max] = data;
+ v->banshee.blt_regs[banshee2D_clip1Max] = data;
break;
case banshee2D_rop:
#if LOG_BANSHEE_2D
logerror(" 2D:rop: %d, %d, %d\n", data & 0xff, (data >> 8) & 0xff, (data >> 16) & 0xff);
#endif
- vd->banshee.blt_regs[banshee2D_rop] = data;
+ v->banshee.blt_regs[banshee2D_rop] = data;
break;
default:
if (offset >= 0x20 && offset < 0x40)
{
- blit_2d(vd, data);
+ blit_2d(v, data);
}
else if (offset >= 0x40 && offset < 0x80)
{
@@ -4610,85 +4677,86 @@ INT32 voodoo_device::banshee_2d_w(voodoo_device *vd, offs_t offset, UINT32 data)
WRITE32_MEMBER( voodoo_banshee_device::banshee_agp_w )
{
+ voodoo_state *v = get_safe_token(this);
offset &= 0x1ff/4;
/* switch off the offset */
switch (offset)
{
case cmdBaseAddr0:
- COMBINE_DATA(&banshee.agp[offset]);
- fbi.cmdfifo[0].base = (data & 0xffffff) << 12;
- fbi.cmdfifo[0].end = fbi.cmdfifo[0].base + (((banshee.agp[cmdBaseSize0] & 0xff) + 1) << 12);
+ COMBINE_DATA(&v->banshee.agp[offset]);
+ v->fbi.cmdfifo[0].base = (data & 0xffffff) << 12;
+ v->fbi.cmdfifo[0].end = v->fbi.cmdfifo[0].base + (((v->banshee.agp[cmdBaseSize0] & 0xff) + 1) << 12);
break;
case cmdBaseSize0:
- COMBINE_DATA(&banshee.agp[offset]);
- fbi.cmdfifo[0].end = fbi.cmdfifo[0].base + (((banshee.agp[cmdBaseSize0] & 0xff) + 1) << 12);
- fbi.cmdfifo[0].enable = (data >> 8) & 1;
- fbi.cmdfifo[0].count_holes = (~data >> 10) & 1;
+ COMBINE_DATA(&v->banshee.agp[offset]);
+ v->fbi.cmdfifo[0].end = v->fbi.cmdfifo[0].base + (((v->banshee.agp[cmdBaseSize0] & 0xff) + 1) << 12);
+ v->fbi.cmdfifo[0].enable = (data >> 8) & 1;
+ v->fbi.cmdfifo[0].count_holes = (~data >> 10) & 1;
break;
case cmdBump0:
fatalerror("cmdBump0\n");
case cmdRdPtrL0:
- fbi.cmdfifo[0].rdptr = data;
+ v->fbi.cmdfifo[0].rdptr = data;
break;
case cmdAMin0:
- fbi.cmdfifo[0].amin = data;
+ v->fbi.cmdfifo[0].amin = data;
break;
case cmdAMax0:
- fbi.cmdfifo[0].amax = data;
+ v->fbi.cmdfifo[0].amax = data;
break;
case cmdFifoDepth0:
- fbi.cmdfifo[0].depth = data;
+ v->fbi.cmdfifo[0].depth = data;
break;
case cmdHoleCnt0:
- fbi.cmdfifo[0].holes = data;
+ v->fbi.cmdfifo[0].holes = data;
break;
case cmdBaseAddr1:
- COMBINE_DATA(&banshee.agp[offset]);
- fbi.cmdfifo[1].base = (data & 0xffffff) << 12;
- fbi.cmdfifo[1].end = fbi.cmdfifo[1].base + (((banshee.agp[cmdBaseSize1] & 0xff) + 1) << 12);
+ COMBINE_DATA(&v->banshee.agp[offset]);
+ v->fbi.cmdfifo[1].base = (data & 0xffffff) << 12;
+ v->fbi.cmdfifo[1].end = v->fbi.cmdfifo[1].base + (((v->banshee.agp[cmdBaseSize1] & 0xff) + 1) << 12);
break;
case cmdBaseSize1:
- COMBINE_DATA(&banshee.agp[offset]);
- fbi.cmdfifo[1].end = fbi.cmdfifo[1].base + (((banshee.agp[cmdBaseSize1] & 0xff) + 1) << 12);
- fbi.cmdfifo[1].enable = (data >> 8) & 1;
- fbi.cmdfifo[1].count_holes = (~data >> 10) & 1;
+ COMBINE_DATA(&v->banshee.agp[offset]);
+ v->fbi.cmdfifo[1].end = v->fbi.cmdfifo[1].base + (((v->banshee.agp[cmdBaseSize1] & 0xff) + 1) << 12);
+ v->fbi.cmdfifo[1].enable = (data >> 8) & 1;
+ v->fbi.cmdfifo[1].count_holes = (~data >> 10) & 1;
break;
case cmdBump1:
fatalerror("cmdBump1\n");
case cmdRdPtrL1:
- fbi.cmdfifo[1].rdptr = data;
+ v->fbi.cmdfifo[1].rdptr = data;
break;
case cmdAMin1:
- fbi.cmdfifo[1].amin = data;
+ v->fbi.cmdfifo[1].amin = data;
break;
case cmdAMax1:
- fbi.cmdfifo[1].amax = data;
+ v->fbi.cmdfifo[1].amax = data;
break;
case cmdFifoDepth1:
- fbi.cmdfifo[1].depth = data;
+ v->fbi.cmdfifo[1].depth = data;
break;
case cmdHoleCnt1:
- fbi.cmdfifo[1].holes = data;
+ v->fbi.cmdfifo[1].holes = data;
break;
default:
- COMBINE_DATA(&banshee.agp[offset]);
+ COMBINE_DATA(&v->banshee.agp[offset]);
break;
}
@@ -4699,10 +4767,11 @@ WRITE32_MEMBER( voodoo_banshee_device::banshee_agp_w )
WRITE32_MEMBER( voodoo_banshee_device::banshee_w )
{
+ voodoo_state *v = get_safe_token(this);
/* if we have something pending, flush the FIFOs up to the current time */
- if (pci.op_pending)
- flush_fifos(this, machine().time());
+ if (v->pci.op_pending)
+ flush_fifos(v, machine().time());
if (offset < 0x80000/4)
banshee_io_w(space, offset, data, mem_mask);
@@ -4711,7 +4780,7 @@ WRITE32_MEMBER( voodoo_banshee_device::banshee_w )
else if (offset < 0x200000/4)
logerror("%s:banshee_w(2D:%X) = %08X & %08X\n", machine().describe_context(), (offset*4) & 0xfffff, data, mem_mask);
else if (offset < 0x600000/4)
- register_w(this, offset & 0x1fffff/4, data);
+ register_w(v, offset & 0x1fffff/4, data);
else if (offset < 0x800000/4)
logerror("%s:banshee_w(TEX0:%X) = %08X & %08X\n", machine().describe_context(), (offset*4) & 0x1fffff, data, mem_mask);
else if (offset < 0xa00000/4)
@@ -4722,7 +4791,7 @@ WRITE32_MEMBER( voodoo_banshee_device::banshee_w )
logerror("%s:banshee_w(YUV:%X) = %08X & %08X\n", machine().describe_context(), (offset*4) & 0x3fffff, data, mem_mask);
else if (offset < 0x2000000/4)
{
- lfb_w(this, offset & 0xffffff/4, data, mem_mask);
+ lfb_w(v, offset & 0xffffff/4, data, mem_mask);
} else {
logerror("%s:banshee_w Address out of range %08X = %08X & %08X\n", machine().describe_context(), (offset*4), data, mem_mask);
}
@@ -4731,22 +4800,23 @@ WRITE32_MEMBER( voodoo_banshee_device::banshee_w )
WRITE32_MEMBER( voodoo_banshee_device::banshee_fb_w )
{
+ voodoo_state *v = get_safe_token(this);
UINT32 addr = offset*4;
/* if we have something pending, flush the FIFOs up to the current time */
- if (pci.op_pending)
- flush_fifos(this, machine().time());
+ if (v->pci.op_pending)
+ flush_fifos(v, machine().time());
- if (offset < fbi.lfb_base)
+ if (offset < v->fbi.lfb_base)
{
- if (fbi.cmdfifo[0].enable && addr >= fbi.cmdfifo[0].base && addr < fbi.cmdfifo[0].end)
- cmdfifo_w(this, &fbi.cmdfifo[0], (addr - fbi.cmdfifo[0].base) / 4, data);
- else if (fbi.cmdfifo[1].enable && addr >= fbi.cmdfifo[1].base && addr < fbi.cmdfifo[1].end)
- cmdfifo_w(this, &fbi.cmdfifo[1], (addr - fbi.cmdfifo[1].base) / 4, data);
+ if (v->fbi.cmdfifo[0].enable && addr >= v->fbi.cmdfifo[0].base && addr < v->fbi.cmdfifo[0].end)
+ cmdfifo_w(v, &v->fbi.cmdfifo[0], (addr - v->fbi.cmdfifo[0].base) / 4, data);
+ else if (v->fbi.cmdfifo[1].enable && addr >= v->fbi.cmdfifo[1].base && addr < v->fbi.cmdfifo[1].end)
+ cmdfifo_w(v, &v->fbi.cmdfifo[1], (addr - v->fbi.cmdfifo[1].base) / 4, data);
else
{
- if (offset*4 <= fbi.mask)
- COMBINE_DATA(&((UINT32 *)fbi.ram)[offset]);
+ if (offset*4 <= v->fbi.mask)
+ COMBINE_DATA(&((UINT32 *)v->fbi.ram)[offset]);
else
logerror("%s:banshee_fb_w Out of bounds (%X) = %08X & %08X\n", machine().describe_context(), offset*4, data, mem_mask);
#if LOG_LFB
@@ -4755,12 +4825,13 @@ WRITE32_MEMBER( voodoo_banshee_device::banshee_fb_w )
}
}
else
- lfb_direct_w(this, offset - fbi.lfb_base, data, mem_mask);
+ lfb_direct_w(v, offset - v->fbi.lfb_base, data, mem_mask);
}
WRITE8_MEMBER( voodoo_banshee_device::banshee_vga_w )
{
+ voodoo_state *v = get_safe_token(this);
offset &= 0x1f;
/* switch off the offset */
@@ -4769,48 +4840,48 @@ WRITE8_MEMBER( voodoo_banshee_device::banshee_vga_w )
/* attribute access */
case 0x3c0:
case 0x3c1:
- if (banshee.attff == 0)
+ if (v->banshee.attff == 0)
{
- banshee.vga[0x3c1 & 0x1f] = data;
+ v->banshee.vga[0x3c1 & 0x1f] = data;
if (LOG_REGISTERS)
logerror("%s:banshee_vga_w(%X) = %02X\n", machine().describe_context(), 0x3c0+offset, data);
}
else
{
- if (banshee.vga[0x3c1 & 0x1f] < ARRAY_LENGTH(banshee.att))
- banshee.att[banshee.vga[0x3c1 & 0x1f]] = data;
+ if (v->banshee.vga[0x3c1 & 0x1f] < ARRAY_LENGTH(v->banshee.att))
+ v->banshee.att[v->banshee.vga[0x3c1 & 0x1f]] = data;
if (LOG_REGISTERS)
- logerror("%s:banshee_att_w(%X) = %02X\n", machine().describe_context(), banshee.vga[0x3c1 & 0x1f], data);
+ logerror("%s:banshee_att_w(%X) = %02X\n", machine().describe_context(), v->banshee.vga[0x3c1 & 0x1f], data);
}
- banshee.attff ^= 1;
+ v->banshee.attff ^= 1;
break;
/* Sequencer access */
case 0x3c5:
- if (banshee.vga[0x3c4 & 0x1f] < ARRAY_LENGTH(banshee.seq))
- banshee.seq[banshee.vga[0x3c4 & 0x1f]] = data;
+ if (v->banshee.vga[0x3c4 & 0x1f] < ARRAY_LENGTH(v->banshee.seq))
+ v->banshee.seq[v->banshee.vga[0x3c4 & 0x1f]] = data;
if (LOG_REGISTERS)
- logerror("%s:banshee_seq_w(%X) = %02X\n", machine().describe_context(), banshee.vga[0x3c4 & 0x1f], data);
+ logerror("%s:banshee_seq_w(%X) = %02X\n", machine().describe_context(), v->banshee.vga[0x3c4 & 0x1f], data);
break;
/* Graphics controller access */
case 0x3cf:
- if (banshee.vga[0x3ce & 0x1f] < ARRAY_LENGTH(banshee.gc))
- banshee.gc[banshee.vga[0x3ce & 0x1f]] = data;
+ if (v->banshee.vga[0x3ce & 0x1f] < ARRAY_LENGTH(v->banshee.gc))
+ v->banshee.gc[v->banshee.vga[0x3ce & 0x1f]] = data;
if (LOG_REGISTERS)
- logerror("%s:banshee_gc_w(%X) = %02X\n", machine().describe_context(), banshee.vga[0x3ce & 0x1f], data);
+ logerror("%s:banshee_gc_w(%X) = %02X\n", machine().describe_context(), v->banshee.vga[0x3ce & 0x1f], data);
break;
/* CRTC access */
case 0x3d5:
- if (banshee.vga[0x3d4 & 0x1f] < ARRAY_LENGTH(banshee.crtc))
- banshee.crtc[banshee.vga[0x3d4 & 0x1f]] = data;
+ if (v->banshee.vga[0x3d4 & 0x1f] < ARRAY_LENGTH(v->banshee.crtc))
+ v->banshee.crtc[v->banshee.vga[0x3d4 & 0x1f]] = data;
if (LOG_REGISTERS)
- logerror("%s:banshee_crtc_w(%X) = %02X\n", machine().describe_context(), banshee.vga[0x3d4 & 0x1f], data);
+ logerror("%s:banshee_crtc_w(%X) = %02X\n", machine().describe_context(), v->banshee.vga[0x3d4 & 0x1f], data);
break;
default:
- banshee.vga[offset] = data;
+ v->banshee.vga[offset] = data;
if (LOG_REGISTERS)
logerror("%s:banshee_vga_w(%X) = %02X\n", machine().describe_context(), 0x3c0+offset, data);
break;
@@ -4820,72 +4891,73 @@ WRITE8_MEMBER( voodoo_banshee_device::banshee_vga_w )
WRITE32_MEMBER( voodoo_banshee_device::banshee_io_w )
{
+ voodoo_state *v = get_safe_token(this);
UINT32 old;
offset &= 0xff/4;
- old = banshee.io[offset];
+ old = v->banshee.io[offset];
/* switch off the offset */
switch (offset)
{
case io_vidProcCfg:
- COMBINE_DATA(&banshee.io[offset]);
- if ((banshee.io[offset] ^ old) & 0x2800)
- fbi.clut_dirty = TRUE;
+ COMBINE_DATA(&v->banshee.io[offset]);
+ if ((v->banshee.io[offset] ^ old) & 0x2800)
+ v->fbi.clut_dirty = TRUE;
if (LOG_REGISTERS)
logerror("%s:banshee_io_w(%s) = %08X & %08X\n", machine().describe_context(), banshee_io_reg_name[offset], data, mem_mask);
break;
case io_dacData:
- COMBINE_DATA(&banshee.io[offset]);
- if (banshee.io[offset] != fbi.clut[banshee.io[io_dacAddr] & 0x1ff])
+ COMBINE_DATA(&v->banshee.io[offset]);
+ if (v->banshee.io[offset] != v->fbi.clut[v->banshee.io[io_dacAddr] & 0x1ff])
{
- fbi.clut[banshee.io[io_dacAddr] & 0x1ff] = banshee.io[offset];
- fbi.clut_dirty = TRUE;
+ v->fbi.clut[v->banshee.io[io_dacAddr] & 0x1ff] = v->banshee.io[offset];
+ v->fbi.clut_dirty = TRUE;
}
if (LOG_REGISTERS)
- logerror("%s:banshee_dac_w(%X) = %08X & %08X\n", machine().describe_context(), banshee.io[io_dacAddr] & 0x1ff, data, mem_mask);
+ logerror("%s:banshee_dac_w(%X) = %08X & %08X\n", machine().describe_context(), v->banshee.io[io_dacAddr] & 0x1ff, data, mem_mask);
break;
case io_miscInit0:
- COMBINE_DATA(&banshee.io[offset]);
- fbi.yorigin = (data >> 18) & 0xfff;
+ COMBINE_DATA(&v->banshee.io[offset]);
+ v->fbi.yorigin = (data >> 18) & 0xfff;
if (LOG_REGISTERS)
logerror("%s:banshee_io_w(%s) = %08X & %08X\n", machine().describe_context(), banshee_io_reg_name[offset], data, mem_mask);
break;
case io_vidScreenSize:
if (data & 0xfff)
- fbi.width = data & 0xfff;
+ v->fbi.width = data & 0xfff;
if (data & 0xfff000)
- fbi.height = (data >> 12) & 0xfff;
+ v->fbi.height = (data >> 12) & 0xfff;
/* fall through */
case io_vidOverlayDudx:
case io_vidOverlayDvdy:
{
/* warning: this is a hack for now! We should really compute the screen size */
/* from the CRTC registers */
- COMBINE_DATA(&banshee.io[offset]);
+ COMBINE_DATA(&v->banshee.io[offset]);
- int width = fbi.width;
- int height = fbi.height;
+ int width = v->fbi.width;
+ int height = v->fbi.height;
- if (banshee.io[io_vidOverlayDudx] != 0)
- width = (fbi.width * banshee.io[io_vidOverlayDudx]) / 1048576;
- if (banshee.io[io_vidOverlayDvdy] != 0)
- height = (fbi.height * banshee.io[io_vidOverlayDvdy]) / 1048576;
+ if (v->banshee.io[io_vidOverlayDudx] != 0)
+ width = (v->fbi.width * v->banshee.io[io_vidOverlayDudx]) / 1048576;
+ if (v->banshee.io[io_vidOverlayDvdy] != 0)
+ height = (v->fbi.height * v->banshee.io[io_vidOverlayDvdy]) / 1048576;
- screen->set_visible_area(0, width - 1, 0, height - 1);
+ v->screen->set_visible_area(0, width - 1, 0, height - 1);
- adjust_vblank_timer(this);
+ adjust_vblank_timer(v);
if (LOG_REGISTERS)
logerror("%s:banshee_io_w(%s) = %08X & %08X\n", machine().describe_context(), banshee_io_reg_name[offset], data, mem_mask);
break;
}
case io_lfbMemoryConfig:
- fbi.lfb_base = (data & 0x1fff) << (12-2);
- fbi.lfb_stride = ((data >> 13) & 7) + 9;
+ v->fbi.lfb_base = (data & 0x1fff) << (12-2);
+ v->fbi.lfb_stride = ((data >> 13) & 7) + 9;
if (LOG_REGISTERS)
logerror("%s:banshee_io_w(%s) = %08X & %08X\n", machine().describe_context(), banshee_io_reg_name[offset], data, mem_mask);
break;
@@ -4904,7 +4976,7 @@ WRITE32_MEMBER( voodoo_banshee_device::banshee_io_w )
break;
default:
- COMBINE_DATA(&banshee.io[offset]);
+ COMBINE_DATA(&v->banshee.io[offset]);
if (LOG_REGISTERS)
logerror("%s:banshee_io_w(%s) = %08X & %08X\n", machine().describe_context(), banshee_io_reg_name[offset], data, mem_mask);
break;
@@ -4923,6 +4995,7 @@ WRITE32_MEMBER( voodoo_banshee_device::banshee_io_w )
void voodoo_device::common_start_voodoo(UINT8 type)
{
+ voodoo_state *v = get_safe_token(this);
const raster_info *info;
void *fbmem, *tmumem[2];
UINT32 tmumem0, tmumem1;
@@ -4934,17 +5007,17 @@ void voodoo_device::common_start_voodoo(UINT8 type)
assert(m_fbmem > 0);
/* store a pointer back to the device */
- device = this;
- vd_type = type;
+ v->device = this;
+ v->type = type;
/* copy config data */
- freq = clock();
- device->m_vblank.resolve();
- device->m_stall.resolve();
+ v->freq = clock();
+ v->device->m_vblank.resolve();
+ v->device->m_stall.resolve();
/* create a multiprocessor work queue */
- poly = poly_alloc(machine(), 64, sizeof(poly_extra_data), 0);
- thread_stats = auto_alloc_array(machine(), stats_block, WORK_MAX_THREADS);
+ v->poly = poly_alloc(machine(), 64, sizeof(poly_extra_data), 0);
+ v->thread_stats = auto_alloc_array(machine(), stats_block, WORK_MAX_THREADS);
/* create a table of precomputed 1/n and log2(n) values */
/* n ranges from 1.0000 to 2.0000 */
@@ -4975,38 +5048,38 @@ void voodoo_device::common_start_voodoo(UINT8 type)
}
}
- tmu_config = 0x11; // revision 1
+ v->tmu_config = 0x11; // revision 1
/* configure type-specific values */
- switch (vd_type)
+ switch (v->type)
{
case TYPE_VOODOO_1:
- regaccess = voodoo_register_access;
- regnames = voodoo_reg_name;
- alt_regmap = 0;
- fbi.lfb_stride = 10;
+ v->regaccess = voodoo_register_access;
+ v->regnames = voodoo_reg_name;
+ v->alt_regmap = 0;
+ v->fbi.lfb_stride = 10;
break;
case TYPE_VOODOO_2:
- regaccess = voodoo2_register_access;
- regnames = voodoo_reg_name;
- alt_regmap = 0;
- fbi.lfb_stride = 10;
- tmu_config |= 0x800;
+ v->regaccess = voodoo2_register_access;
+ v->regnames = voodoo_reg_name;
+ v->alt_regmap = 0;
+ v->fbi.lfb_stride = 10;
+ v->tmu_config |= 0x800;
break;
case TYPE_VOODOO_BANSHEE:
- regaccess = banshee_register_access;
- regnames = banshee_reg_name;
- alt_regmap = 1;
- fbi.lfb_stride = 11;
+ v->regaccess = banshee_register_access;
+ v->regnames = banshee_reg_name;
+ v->alt_regmap = 1;
+ v->fbi.lfb_stride = 11;
break;
case TYPE_VOODOO_3:
- regaccess = banshee_register_access;
- regnames = banshee_reg_name;
- alt_regmap = 1;
- fbi.lfb_stride = 11;
+ v->regaccess = banshee_register_access;
+ v->regnames = banshee_reg_name;
+ v->alt_regmap = 1;
+ v->fbi.lfb_stride = 11;
break;
default:
@@ -5015,41 +5088,41 @@ void voodoo_device::common_start_voodoo(UINT8 type)
/* set the type, and initialize the chip mask */
device_iterator iter(machine().root_device());
- index = 0;
+ v->index = 0;
for (device_t *scan = iter.first(); scan != nullptr; scan = iter.next())
if (scan->type() == this->type())
{
if (scan == this)
break;
- index++;
+ v->index++;
}
- screen = downcast<screen_device *>(machine().device(m_screen));
- assert_always(screen != nullptr, "Unable to find screen attached to voodoo");
- cpu = machine().device(m_cputag);
- assert_always(cpu != nullptr, "Unable to find CPU attached to voodoo");
+ v->screen = downcast<screen_device *>(machine().device(m_screen));
+ assert_always(v->screen != nullptr, "Unable to find screen attached to voodoo");
+ v->cpu = machine().device(m_cputag);
+ assert_always(v->cpu != nullptr, "Unable to find CPU attached to voodoo");
if (m_tmumem1 != 0)
- tmu_config |= 0xc0; // two TMUs
+ v->tmu_config |= 0xc0; // two TMUs
- chipmask = 0x01;
- attoseconds_per_cycle = ATTOSECONDS_PER_SECOND / freq;
- trigger = 51324 + index;
+ v->chipmask = 0x01;
+ v->attoseconds_per_cycle = ATTOSECONDS_PER_SECOND / v->freq;
+ v->trigger = 51324 + v->index;
/* build the rasterizer table */
for (info = predef_raster_table; info->callback; info++)
- add_rasterizer(this, info);
+ add_rasterizer(v, info);
/* set up the PCI FIFO */
- pci.fifo.base = pci.fifo_mem;
- pci.fifo.size = 64*2;
- pci.fifo.in = pci.fifo.out = 0;
- pci.stall_state = NOT_STALLED;
- pci.continue_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(voodoo_device::stall_cpu_callback),this), nullptr);
-
+ v->pci.fifo.base = v->pci.fifo_mem;
+ v->pci.fifo.size = 64*2;
+ v->pci.fifo.in = v->pci.fifo.out = 0;
+ v->pci.stall_state = NOT_STALLED;
+ v->pci.continue_timer = machine().scheduler().timer_alloc(FUNC(stall_cpu_callback), v);
+
/* allocate memory */
tmumem0 = m_tmumem0;
tmumem1 = m_tmumem1;
- if (vd_type <= TYPE_VOODOO_2)
+ if (v->type <= TYPE_VOODOO_2)
{
/* separate FB/TMU memory */
fbmem = auto_alloc_array(machine(), UINT8, m_fbmem << 20);
@@ -5061,47 +5134,47 @@ void voodoo_device::common_start_voodoo(UINT8 type)
/* shared memory */
tmumem[0] = tmumem[1] = fbmem = auto_alloc_array(machine(), UINT8, m_fbmem << 20);
tmumem0 = m_fbmem;
- if (vd_type == TYPE_VOODOO_3)
+ if (v->type == TYPE_VOODOO_3)
tmumem1 = m_fbmem;
}
/* set up frame buffer */
- init_fbi(this, &fbi, fbmem, m_fbmem << 20);
+ init_fbi(v, &v->fbi, fbmem, m_fbmem << 20);
/* build shared TMU tables */
- init_tmu_shared(&tmushare);
+ init_tmu_shared(&v->tmushare);
/* set up the TMUs */
- init_tmu(this, &tmu[0], &reg[0x100], tmumem[0], tmumem0 << 20);
- chipmask |= 0x02;
+ init_tmu(v, &v->tmu[0], &v->reg[0x100], tmumem[0], tmumem0 << 20);
+ v->chipmask |= 0x02;
if (tmumem1 != 0)
{
- init_tmu(this, &tmu[1], &reg[0x200], tmumem[1], tmumem1 << 20);
- chipmask |= 0x04;
- tmu_config |= 0x40;
+ init_tmu(v, &v->tmu[1], &v->reg[0x200], tmumem[1], tmumem1 << 20);
+ v->chipmask |= 0x04;
+ v->tmu_config |= 0x40;
}
/* initialize some registers */
- memset(reg, 0, sizeof(reg));
- pci.init_enable = 0;
- reg[fbiInit0].u = (1 << 4) | (0x10 << 6);
- reg[fbiInit1].u = (1 << 1) | (1 << 8) | (1 << 12) | (2 << 20);
- reg[fbiInit2].u = (1 << 6) | (0x100 << 23);
- reg[fbiInit3].u = (2 << 13) | (0xf << 17);
- reg[fbiInit4].u = (1 << 0);
+ memset(v->reg, 0, sizeof(v->reg));
+ v->pci.init_enable = 0;
+ v->reg[fbiInit0].u = (1 << 4) | (0x10 << 6);
+ v->reg[fbiInit1].u = (1 << 1) | (1 << 8) | (1 << 12) | (2 << 20);
+ v->reg[fbiInit2].u = (1 << 6) | (0x100 << 23);
+ v->reg[fbiInit3].u = (2 << 13) | (0xf << 17);
+ v->reg[fbiInit4].u = (1 << 0);
/* initialize banshee registers */
- memset(banshee.io, 0, sizeof(banshee.io));
- banshee.io[io_pciInit0] = 0x01800040;
- banshee.io[io_sipMonitor] = 0x40000000;
- banshee.io[io_lfbMemoryConfig] = 0x000a2200;
- banshee.io[io_dramInit0] = 0x00579d29;
- banshee.io[io_dramInit0] |= 0x08000000; // Konami Viper expects 16MBit SGRAMs
- banshee.io[io_dramInit1] = 0x00f02200;
- banshee.io[io_tmuGbeInit] = 0x00000bfb;
+ memset(v->banshee.io, 0, sizeof(v->banshee.io));
+ v->banshee.io[io_pciInit0] = 0x01800040;
+ v->banshee.io[io_sipMonitor] = 0x40000000;
+ v->banshee.io[io_lfbMemoryConfig] = 0x000a2200;
+ v->banshee.io[io_dramInit0] = 0x00579d29;
+ v->banshee.io[io_dramInit0] |= 0x08000000; // Konami Viper expects 16MBit SGRAMs
+ v->banshee.io[io_dramInit1] = 0x00f02200;
+ v->banshee.io[io_tmuGbeInit] = 0x00000bfb;
/* do a soft reset to reset everything else */
- soft_reset(this);
+ soft_reset(v);
/* register for save states */
init_save_state(this);
@@ -5118,12 +5191,12 @@ void voodoo_device::common_start_voodoo(UINT8 type)
command
-------------------------------------------------*/
-INT32 voodoo_device::fastfill(voodoo_device *vd)
+static INT32 fastfill(voodoo_state *v)
{
- int sx = (vd->reg[clipLeftRight].u >> 16) & 0x3ff;
- int ex = (vd->reg[clipLeftRight].u >> 0) & 0x3ff;
- int sy = (vd->reg[clipLowYHighY].u >> 16) & 0x3ff;
- int ey = (vd->reg[clipLowYHighY].u >> 0) & 0x3ff;
+ int sx = (v->reg[clipLeftRight].u >> 16) & 0x3ff;
+ int ex = (v->reg[clipLeftRight].u >> 0) & 0x3ff;
+ int sy = (v->reg[clipLowYHighY].u >> 16) & 0x3ff;
+ int ey = (v->reg[clipLowYHighY].u >> 0) & 0x3ff;
poly_extent extents[64];
UINT16 dithermatrix[16];
UINT16 *drawbuf = nullptr;
@@ -5131,22 +5204,22 @@ INT32 voodoo_device::fastfill(voodoo_device *vd)
int extnum, x, y;
/* if we're not clearing either, take no time */
- if (!FBZMODE_RGB_BUFFER_MASK(vd->reg[fbzMode].u) && !FBZMODE_AUX_BUFFER_MASK(vd->reg[fbzMode].u))
+ if (!FBZMODE_RGB_BUFFER_MASK(v->reg[fbzMode].u) && !FBZMODE_AUX_BUFFER_MASK(v->reg[fbzMode].u))
return 0;
/* are we clearing the RGB buffer? */
- if (FBZMODE_RGB_BUFFER_MASK(vd->reg[fbzMode].u))
+ if (FBZMODE_RGB_BUFFER_MASK(v->reg[fbzMode].u))
{
/* determine the draw buffer */
- int destbuf = (vd->vd_type >= TYPE_VOODOO_BANSHEE) ? 1 : FBZMODE_DRAW_BUFFER(vd->reg[fbzMode].u);
+ int destbuf = (v->type >= TYPE_VOODOO_BANSHEE) ? 1 : FBZMODE_DRAW_BUFFER(v->reg[fbzMode].u);
switch (destbuf)
{
case 0: /* front buffer */
- drawbuf = (UINT16 *)(vd->fbi.ram + vd->fbi.rgboffs[vd->fbi.frontbuf]);
+ drawbuf = (UINT16 *)(v->fbi.ram + v->fbi.rgboffs[v->fbi.frontbuf]);
break;
case 1: /* back buffer */
- drawbuf = (UINT16 *)(vd->fbi.ram + vd->fbi.rgboffs[vd->fbi.backbuf]);
+ drawbuf = (UINT16 *)(v->fbi.ram + v->fbi.rgboffs[v->fbi.backbuf]);
break;
default: /* reserved */
@@ -5157,14 +5230,14 @@ INT32 voodoo_device::fastfill(voodoo_device *vd)
for (y = 0; y < 4; y++)
{
DECLARE_DITHER_POINTERS_NO_DITHER_VAR;
- COMPUTE_DITHER_POINTERS_NO_DITHER_VAR(vd->reg[fbzMode].u, y);
+ COMPUTE_DITHER_POINTERS_NO_DITHER_VAR(v->reg[fbzMode].u, y);
for (x = 0; x < 4; x++)
{
- int r = vd->reg[color1].rgb.r;
- int g = vd->reg[color1].rgb.g;
- int b = vd->reg[color1].rgb.b;
+ int r = v->reg[color1].rgb.r;
+ int g = v->reg[color1].rgb.g;
+ int b = v->reg[color1].rgb.b;
- APPLY_DITHER(vd->reg[fbzMode].u, x, dither_lookup, r, g, b);
+ APPLY_DITHER(v->reg[fbzMode].u, x, dither_lookup, r, g, b);
dithermatrix[y*4 + x] = (r << 11) | (g << 5) | b;
}
}
@@ -5179,13 +5252,13 @@ INT32 voodoo_device::fastfill(voodoo_device *vd)
/* iterate over blocks of extents */
for (y = sy; y < ey; y += ARRAY_LENGTH(extents))
{
- poly_extra_data *extra = (poly_extra_data *)poly_get_extra_data(vd->poly);
+ poly_extra_data *extra = (poly_extra_data *)poly_get_extra_data(v->poly);
int count = MIN(ey - y, ARRAY_LENGTH(extents));
- extra->device= vd;
+ extra->state = v;
memcpy(extra->dither, dithermatrix, sizeof(extra->dither));
- pixels += poly_render_triangle_custom(vd->poly, drawbuf, global_cliprect, raster_fastfill, y, count, extents);
+ pixels += poly_render_triangle_custom(v->poly, drawbuf, global_cliprect, raster_fastfill, y, count, extents);
}
/* 2 pixels per clock */
@@ -5198,23 +5271,23 @@ INT32 voodoo_device::fastfill(voodoo_device *vd)
command
-------------------------------------------------*/
-INT32 voodoo_device::swapbuffer(voodoo_device* vd, UINT32 data)
+static INT32 swapbuffer(voodoo_state *v, UINT32 data)
{
/* set the don't swap value for Voodoo 2 */
- vd->fbi.vblank_swap_pending = TRUE;
- vd->fbi.vblank_swap = (data >> 1) & 0xff;
- vd->fbi.vblank_dont_swap = (data >> 9) & 1;
+ v->fbi.vblank_swap_pending = TRUE;
+ v->fbi.vblank_swap = (data >> 1) & 0xff;
+ v->fbi.vblank_dont_swap = (data >> 9) & 1;
/* if we're not syncing to the retrace, process the command immediately */
if (!(data & 1))
{
- swap_buffers(vd);
+ swap_buffers(v);
return 0;
}
/* determine how many cycles to wait; we deliberately overshoot here because */
/* the final count gets updated on the VBLANK */
- return (vd->fbi.vblank_swap + 1) * vd->freq / 30;
+ return (v->fbi.vblank_swap + 1) * v->freq / 30;
}
@@ -5223,7 +5296,7 @@ INT32 voodoo_device::swapbuffer(voodoo_device* vd, UINT32 data)
command
-------------------------------------------------*/
-INT32 voodoo_device::triangle(voodoo_device *vd)
+static INT32 triangle(voodoo_state *v)
{
int texcount;
UINT16 *drawbuf;
@@ -5234,58 +5307,58 @@ INT32 voodoo_device::triangle(voodoo_device *vd)
/* determine the number of TMUs involved */
texcount = 0;
- if (!FBIINIT3_DISABLE_TMUS(vd->reg[fbiInit3].u) && FBZCP_TEXTURE_ENABLE(vd->reg[fbzColorPath].u))
+ if (!FBIINIT3_DISABLE_TMUS(v->reg[fbiInit3].u) && FBZCP_TEXTURE_ENABLE(v->reg[fbzColorPath].u))
{
texcount = 1;
- if (vd->chipmask & 0x04)
+ if (v->chipmask & 0x04)
texcount = 2;
}
/* perform subpixel adjustments */
- if (FBZCP_CCA_SUBPIXEL_ADJUST(vd->reg[fbzColorPath].u))
+ if (FBZCP_CCA_SUBPIXEL_ADJUST(v->reg[fbzColorPath].u))
{
- INT32 dx = 8 - (vd->fbi.ax & 15);
- INT32 dy = 8 - (vd->fbi.ay & 15);
+ INT32 dx = 8 - (v->fbi.ax & 15);
+ INT32 dy = 8 - (v->fbi.ay & 15);
/* adjust iterated R,G,B,A and W/Z */
- vd->fbi.startr += (dy * vd->fbi.drdy + dx * vd->fbi.drdx) >> 4;
- vd->fbi.startg += (dy * vd->fbi.dgdy + dx * vd->fbi.dgdx) >> 4;
- vd->fbi.startb += (dy * vd->fbi.dbdy + dx * vd->fbi.dbdx) >> 4;
- vd->fbi.starta += (dy * vd->fbi.dady + dx * vd->fbi.dadx) >> 4;
- vd->fbi.startw += (dy * vd->fbi.dwdy + dx * vd->fbi.dwdx) >> 4;
- vd->fbi.startz += mul_32x32_shift(dy, vd->fbi.dzdy, 4) + mul_32x32_shift(dx, vd->fbi.dzdx, 4);
+ v->fbi.startr += (dy * v->fbi.drdy + dx * v->fbi.drdx) >> 4;
+ v->fbi.startg += (dy * v->fbi.dgdy + dx * v->fbi.dgdx) >> 4;
+ v->fbi.startb += (dy * v->fbi.dbdy + dx * v->fbi.dbdx) >> 4;
+ v->fbi.starta += (dy * v->fbi.dady + dx * v->fbi.dadx) >> 4;
+ v->fbi.startw += (dy * v->fbi.dwdy + dx * v->fbi.dwdx) >> 4;
+ v->fbi.startz += mul_32x32_shift(dy, v->fbi.dzdy, 4) + mul_32x32_shift(dx, v->fbi.dzdx, 4);
/* adjust iterated W/S/T for TMU 0 */
if (texcount >= 1)
{
- vd->tmu[0].startw += (dy * vd->tmu[0].dwdy + dx * vd->tmu[0].dwdx) >> 4;
- vd->tmu[0].starts += (dy * vd->tmu[0].dsdy + dx * vd->tmu[0].dsdx) >> 4;
- vd->tmu[0].startt += (dy * vd->tmu[0].dtdy + dx * vd->tmu[0].dtdx) >> 4;
+ v->tmu[0].startw += (dy * v->tmu[0].dwdy + dx * v->tmu[0].dwdx) >> 4;
+ v->tmu[0].starts += (dy * v->tmu[0].dsdy + dx * v->tmu[0].dsdx) >> 4;
+ v->tmu[0].startt += (dy * v->tmu[0].dtdy + dx * v->tmu[0].dtdx) >> 4;
/* adjust iterated W/S/T for TMU 1 */
if (texcount >= 2)
{
- vd->tmu[1].startw += (dy * vd->tmu[1].dwdy + dx * vd->tmu[1].dwdx) >> 4;
- vd->tmu[1].starts += (dy * vd->tmu[1].dsdy + dx * vd->tmu[1].dsdx) >> 4;
- vd->tmu[1].startt += (dy * vd->tmu[1].dtdy + dx * vd->tmu[1].dtdx) >> 4;
+ v->tmu[1].startw += (dy * v->tmu[1].dwdy + dx * v->tmu[1].dwdx) >> 4;
+ v->tmu[1].starts += (dy * v->tmu[1].dsdy + dx * v->tmu[1].dsdx) >> 4;
+ v->tmu[1].startt += (dy * v->tmu[1].dtdy + dx * v->tmu[1].dtdx) >> 4;
}
}
}
/* wait for any outstanding work to finish */
-// poly_wait(vd->poly, "triangle");
+// poly_wait(v->poly, "triangle");
/* determine the draw buffer */
- destbuf = (vd->vd_type >= TYPE_VOODOO_BANSHEE) ? 1 : FBZMODE_DRAW_BUFFER(vd->reg[fbzMode].u);
+ destbuf = (v->type >= TYPE_VOODOO_BANSHEE) ? 1 : FBZMODE_DRAW_BUFFER(v->reg[fbzMode].u);
switch (destbuf)
{
case 0: /* front buffer */
- drawbuf = (UINT16 *)(vd->fbi.ram + vd->fbi.rgboffs[vd->fbi.frontbuf]);
- vd->fbi.video_changed = TRUE;
+ drawbuf = (UINT16 *)(v->fbi.ram + v->fbi.rgboffs[v->fbi.frontbuf]);
+ v->fbi.video_changed = TRUE;
break;
case 1: /* back buffer */
- drawbuf = (UINT16 *)(vd->fbi.ram + vd->fbi.rgboffs[vd->fbi.backbuf]);
+ drawbuf = (UINT16 *)(v->fbi.ram + v->fbi.rgboffs[v->fbi.backbuf]);
break;
default: /* reserved */
@@ -5293,18 +5366,18 @@ INT32 voodoo_device::triangle(voodoo_device *vd)
}
/* find a rasterizer that matches our current state */
- pixels = triangle_create_work_item(vd, drawbuf, texcount);
+ pixels = triangle_create_work_item(v, drawbuf, texcount);
/* update stats */
- vd->reg[fbiTrianglesOut].u++;
+ v->reg[fbiTrianglesOut].u++;
/* update stats */
- vd->stats.total_triangles++;
+ v->stats.total_triangles++;
g_profiler.stop();
/* 1 pixel per clock, plus some setup time */
- if (LOG_REGISTERS) vd->device->logerror("cycles = %d\n", TRIANGLE_SETUP_CLOCKS + pixels);
+ if (LOG_REGISTERS) v->device->logerror("cycles = %d\n", TRIANGLE_SETUP_CLOCKS + pixels);
return TRIANGLE_SETUP_CLOCKS + pixels;
}
@@ -5314,28 +5387,28 @@ INT32 voodoo_device::triangle(voodoo_device *vd)
command
-------------------------------------------------*/
-INT32 voodoo_device::begin_triangle(voodoo_device *vd)
+static INT32 begin_triangle(voodoo_state *v)
{
- setup_vertex *sv = &vd->fbi.svert[2];
+ setup_vertex *sv = &v->fbi.svert[2];
/* extract all the data from registers */
- sv->x = vd->reg[sVx].f;
- sv->y = vd->reg[sVy].f;
- sv->wb = vd->reg[sWb].f;
- sv->w0 = vd->reg[sWtmu0].f;
- sv->s0 = vd->reg[sS_W0].f;
- sv->t0 = vd->reg[sT_W0].f;
- sv->w1 = vd->reg[sWtmu1].f;
- sv->s1 = vd->reg[sS_Wtmu1].f;
- sv->t1 = vd->reg[sT_Wtmu1].f;
- sv->a = vd->reg[sAlpha].f;
- sv->r = vd->reg[sRed].f;
- sv->g = vd->reg[sGreen].f;
- sv->b = vd->reg[sBlue].f;
+ sv->x = v->reg[sVx].f;
+ sv->y = v->reg[sVy].f;
+ sv->wb = v->reg[sWb].f;
+ sv->w0 = v->reg[sWtmu0].f;
+ sv->s0 = v->reg[sS_W0].f;
+ sv->t0 = v->reg[sT_W0].f;
+ sv->w1 = v->reg[sWtmu1].f;
+ sv->s1 = v->reg[sS_Wtmu1].f;
+ sv->t1 = v->reg[sT_Wtmu1].f;
+ sv->a = v->reg[sAlpha].f;
+ sv->r = v->reg[sRed].f;
+ sv->g = v->reg[sGreen].f;
+ sv->b = v->reg[sBlue].f;
/* spread it across all three verts and reset the count */
- vd->fbi.svert[0] = vd->fbi.svert[1] = vd->fbi.svert[2];
- vd->fbi.sverts = 1;
+ v->fbi.svert[0] = v->fbi.svert[1] = v->fbi.svert[2];
+ v->fbi.sverts = 1;
return 0;
}
@@ -5346,36 +5419,36 @@ INT32 voodoo_device::begin_triangle(voodoo_device *vd)
command
-------------------------------------------------*/
-INT32 voodoo_device::draw_triangle(voodoo_device *vd)
+static INT32 draw_triangle(voodoo_state *v)
{
- setup_vertex *sv = &vd->fbi.svert[2];
+ setup_vertex *sv = &v->fbi.svert[2];
int cycles = 0;
/* for strip mode, shuffle vertex 1 down to 0 */
- if (!(vd->reg[sSetupMode].u & (1 << 16)))
- vd->fbi.svert[0] = vd->fbi.svert[1];
+ if (!(v->reg[sSetupMode].u & (1 << 16)))
+ v->fbi.svert[0] = v->fbi.svert[1];
/* copy 2 down to 1 regardless */
- vd->fbi.svert[1] = vd->fbi.svert[2];
+ v->fbi.svert[1] = v->fbi.svert[2];
/* extract all the data from registers */
- sv->x = vd->reg[sVx].f;
- sv->y = vd->reg[sVy].f;
- sv->wb = vd->reg[sWb].f;
- sv->w0 = vd->reg[sWtmu0].f;
- sv->s0 = vd->reg[sS_W0].f;
- sv->t0 = vd->reg[sT_W0].f;
- sv->w1 = vd->reg[sWtmu1].f;
- sv->s1 = vd->reg[sS_Wtmu1].f;
- sv->t1 = vd->reg[sT_Wtmu1].f;
- sv->a = vd->reg[sAlpha].f;
- sv->r = vd->reg[sRed].f;
- sv->g = vd->reg[sGreen].f;
- sv->b = vd->reg[sBlue].f;
+ sv->x = v->reg[sVx].f;
+ sv->y = v->reg[sVy].f;
+ sv->wb = v->reg[sWb].f;
+ sv->w0 = v->reg[sWtmu0].f;
+ sv->s0 = v->reg[sS_W0].f;
+ sv->t0 = v->reg[sT_W0].f;
+ sv->w1 = v->reg[sWtmu1].f;
+ sv->s1 = v->reg[sS_Wtmu1].f;
+ sv->t1 = v->reg[sT_Wtmu1].f;
+ sv->a = v->reg[sAlpha].f;
+ sv->r = v->reg[sRed].f;
+ sv->g = v->reg[sGreen].f;
+ sv->b = v->reg[sBlue].f;
/* if we have enough verts, go ahead and draw */
- if (++vd->fbi.sverts >= 3)
- cycles = setup_and_draw_triangle(vd);
+ if (++v->fbi.sverts >= 3)
+ cycles = setup_and_draw_triangle(v);
return cycles;
}
@@ -5391,32 +5464,32 @@ INT32 voodoo_device::draw_triangle(voodoo_device *vd)
parameters and render the triangle
-------------------------------------------------*/
-INT32 voodoo_device::setup_and_draw_triangle(voodoo_device *vd)
+static INT32 setup_and_draw_triangle(voodoo_state *v)
{
float dx1, dy1, dx2, dy2;
float divisor, tdiv;
/* grab the X/Ys at least */
- vd->fbi.ax = (INT16)(vd->fbi.svert[0].x * 16.0f);
- vd->fbi.ay = (INT16)(vd->fbi.svert[0].y * 16.0f);
- vd->fbi.bx = (INT16)(vd->fbi.svert[1].x * 16.0f);
- vd->fbi.by = (INT16)(vd->fbi.svert[1].y * 16.0f);
- vd->fbi.cx = (INT16)(vd->fbi.svert[2].x * 16.0f);
- vd->fbi.cy = (INT16)(vd->fbi.svert[2].y * 16.0f);
+ v->fbi.ax = (INT16)(v->fbi.svert[0].x * 16.0f);
+ v->fbi.ay = (INT16)(v->fbi.svert[0].y * 16.0f);
+ v->fbi.bx = (INT16)(v->fbi.svert[1].x * 16.0f);
+ v->fbi.by = (INT16)(v->fbi.svert[1].y * 16.0f);
+ v->fbi.cx = (INT16)(v->fbi.svert[2].x * 16.0f);
+ v->fbi.cy = (INT16)(v->fbi.svert[2].y * 16.0f);
/* compute the divisor */
- divisor = 1.0f / ((vd->fbi.svert[0].x - vd->fbi.svert[1].x) * (vd->fbi.svert[0].y - vd->fbi.svert[2].y) -
- (vd->fbi.svert[0].x - vd->fbi.svert[2].x) * (vd->fbi.svert[0].y - vd->fbi.svert[1].y));
+ divisor = 1.0f / ((v->fbi.svert[0].x - v->fbi.svert[1].x) * (v->fbi.svert[0].y - v->fbi.svert[2].y) -
+ (v->fbi.svert[0].x - v->fbi.svert[2].x) * (v->fbi.svert[0].y - v->fbi.svert[1].y));
/* backface culling */
- if (vd->reg[sSetupMode].u & 0x20000)
+ if (v->reg[sSetupMode].u & 0x20000)
{
- int culling_sign = (vd->reg[sSetupMode].u >> 18) & 1;
+ int culling_sign = (v->reg[sSetupMode].u >> 18) & 1;
int divisor_sign = (divisor < 0);
/* if doing strips and ping pong is enabled, apply the ping pong */
- if ((vd->reg[sSetupMode].u & 0x90000) == 0x00000)
- culling_sign ^= (vd->fbi.sverts - 3) & 1;
+ if ((v->reg[sSetupMode].u & 0x90000) == 0x00000)
+ culling_sign ^= (v->fbi.sverts - 3) & 1;
/* if our sign matches the culling sign, we're done for */
if (divisor_sign == culling_sign)
@@ -5424,92 +5497,92 @@ INT32 voodoo_device::setup_and_draw_triangle(voodoo_device *vd)
}
/* compute the dx/dy values */
- dx1 = vd->fbi.svert[0].y - vd->fbi.svert[2].y;
- dx2 = vd->fbi.svert[0].y - vd->fbi.svert[1].y;
- dy1 = vd->fbi.svert[0].x - vd->fbi.svert[1].x;
- dy2 = vd->fbi.svert[0].x - vd->fbi.svert[2].x;
+ dx1 = v->fbi.svert[0].y - v->fbi.svert[2].y;
+ dx2 = v->fbi.svert[0].y - v->fbi.svert[1].y;
+ dy1 = v->fbi.svert[0].x - v->fbi.svert[1].x;
+ dy2 = v->fbi.svert[0].x - v->fbi.svert[2].x;
/* set up R,G,B */
tdiv = divisor * 4096.0f;
- if (vd->reg[sSetupMode].u & (1 << 0))
+ if (v->reg[sSetupMode].u & (1 << 0))
{
- vd->fbi.startr = (INT32)(vd->fbi.svert[0].r * 4096.0f);
- vd->fbi.drdx = (INT32)(((vd->fbi.svert[0].r - vd->fbi.svert[1].r) * dx1 - (vd->fbi.svert[0].r - vd->fbi.svert[2].r) * dx2) * tdiv);
- vd->fbi.drdy = (INT32)(((vd->fbi.svert[0].r - vd->fbi.svert[2].r) * dy1 - (vd->fbi.svert[0].r - vd->fbi.svert[1].r) * dy2) * tdiv);
- vd->fbi.startg = (INT32)(vd->fbi.svert[0].g * 4096.0f);
- vd->fbi.dgdx = (INT32)(((vd->fbi.svert[0].g - vd->fbi.svert[1].g) * dx1 - (vd->fbi.svert[0].g - vd->fbi.svert[2].g) * dx2) * tdiv);
- vd->fbi.dgdy = (INT32)(((vd->fbi.svert[0].g - vd->fbi.svert[2].g) * dy1 - (vd->fbi.svert[0].g - vd->fbi.svert[1].g) * dy2) * tdiv);
- vd->fbi.startb = (INT32)(vd->fbi.svert[0].b * 4096.0f);
- vd->fbi.dbdx = (INT32)(((vd->fbi.svert[0].b - vd->fbi.svert[1].b) * dx1 - (vd->fbi.svert[0].b - vd->fbi.svert[2].b) * dx2) * tdiv);
- vd->fbi.dbdy = (INT32)(((vd->fbi.svert[0].b - vd->fbi.svert[2].b) * dy1 - (vd->fbi.svert[0].b - vd->fbi.svert[1].b) * dy2) * tdiv);
+ v->fbi.startr = (INT32)(v->fbi.svert[0].r * 4096.0f);
+ v->fbi.drdx = (INT32)(((v->fbi.svert[0].r - v->fbi.svert[1].r) * dx1 - (v->fbi.svert[0].r - v->fbi.svert[2].r) * dx2) * tdiv);
+ v->fbi.drdy = (INT32)(((v->fbi.svert[0].r - v->fbi.svert[2].r) * dy1 - (v->fbi.svert[0].r - v->fbi.svert[1].r) * dy2) * tdiv);
+ v->fbi.startg = (INT32)(v->fbi.svert[0].g * 4096.0f);
+ v->fbi.dgdx = (INT32)(((v->fbi.svert[0].g - v->fbi.svert[1].g) * dx1 - (v->fbi.svert[0].g - v->fbi.svert[2].g) * dx2) * tdiv);
+ v->fbi.dgdy = (INT32)(((v->fbi.svert[0].g - v->fbi.svert[2].g) * dy1 - (v->fbi.svert[0].g - v->fbi.svert[1].g) * dy2) * tdiv);
+ v->fbi.startb = (INT32)(v->fbi.svert[0].b * 4096.0f);
+ v->fbi.dbdx = (INT32)(((v->fbi.svert[0].b - v->fbi.svert[1].b) * dx1 - (v->fbi.svert[0].b - v->fbi.svert[2].b) * dx2) * tdiv);
+ v->fbi.dbdy = (INT32)(((v->fbi.svert[0].b - v->fbi.svert[2].b) * dy1 - (v->fbi.svert[0].b - v->fbi.svert[1].b) * dy2) * tdiv);
}
/* set up alpha */
- if (vd->reg[sSetupMode].u & (1 << 1))
+ if (v->reg[sSetupMode].u & (1 << 1))
{
- vd->fbi.starta = (INT32)(vd->fbi.svert[0].a * 4096.0f);
- vd->fbi.dadx = (INT32)(((vd->fbi.svert[0].a - vd->fbi.svert[1].a) * dx1 - (vd->fbi.svert[0].a - vd->fbi.svert[2].a) * dx2) * tdiv);
- vd->fbi.dady = (INT32)(((vd->fbi.svert[0].a - vd->fbi.svert[2].a) * dy1 - (vd->fbi.svert[0].a - vd->fbi.svert[1].a) * dy2) * tdiv);
+ v->fbi.starta = (INT32)(v->fbi.svert[0].a * 4096.0f);
+ v->fbi.dadx = (INT32)(((v->fbi.svert[0].a - v->fbi.svert[1].a) * dx1 - (v->fbi.svert[0].a - v->fbi.svert[2].a) * dx2) * tdiv);
+ v->fbi.dady = (INT32)(((v->fbi.svert[0].a - v->fbi.svert[2].a) * dy1 - (v->fbi.svert[0].a - v->fbi.svert[1].a) * dy2) * tdiv);
}
/* set up Z */
- if (vd->reg[sSetupMode].u & (1 << 2))
+ if (v->reg[sSetupMode].u & (1 << 2))
{
- vd->fbi.startz = (INT32)(vd->fbi.svert[0].z * 4096.0f);
- vd->fbi.dzdx = (INT32)(((vd->fbi.svert[0].z - vd->fbi.svert[1].z) * dx1 - (vd->fbi.svert[0].z - vd->fbi.svert[2].z) * dx2) * tdiv);
- vd->fbi.dzdy = (INT32)(((vd->fbi.svert[0].z - vd->fbi.svert[2].z) * dy1 - (vd->fbi.svert[0].z - vd->fbi.svert[1].z) * dy2) * tdiv);
+ v->fbi.startz = (INT32)(v->fbi.svert[0].z * 4096.0f);
+ v->fbi.dzdx = (INT32)(((v->fbi.svert[0].z - v->fbi.svert[1].z) * dx1 - (v->fbi.svert[0].z - v->fbi.svert[2].z) * dx2) * tdiv);
+ v->fbi.dzdy = (INT32)(((v->fbi.svert[0].z - v->fbi.svert[2].z) * dy1 - (v->fbi.svert[0].z - v->fbi.svert[1].z) * dy2) * tdiv);
}
/* set up Wb */
tdiv = divisor * 65536.0f * 65536.0f;
- if (vd->reg[sSetupMode].u & (1 << 3))
+ if (v->reg[sSetupMode].u & (1 << 3))
{
- vd->fbi.startw = vd->tmu[0].startw = vd->tmu[1].startw = (INT64)(vd->fbi.svert[0].wb * 65536.0f * 65536.0f);
- vd->fbi.dwdx = vd->tmu[0].dwdx = vd->tmu[1].dwdx = ((vd->fbi.svert[0].wb - vd->fbi.svert[1].wb) * dx1 - (vd->fbi.svert[0].wb - vd->fbi.svert[2].wb) * dx2) * tdiv;
- vd->fbi.dwdy = vd->tmu[0].dwdy = vd->tmu[1].dwdy = ((vd->fbi.svert[0].wb - vd->fbi.svert[2].wb) * dy1 - (vd->fbi.svert[0].wb - vd->fbi.svert[1].wb) * dy2) * tdiv;
+ v->fbi.startw = v->tmu[0].startw = v->tmu[1].startw = (INT64)(v->fbi.svert[0].wb * 65536.0f * 65536.0f);
+ v->fbi.dwdx = v->tmu[0].dwdx = v->tmu[1].dwdx = ((v->fbi.svert[0].wb - v->fbi.svert[1].wb) * dx1 - (v->fbi.svert[0].wb - v->fbi.svert[2].wb) * dx2) * tdiv;
+ v->fbi.dwdy = v->tmu[0].dwdy = v->tmu[1].dwdy = ((v->fbi.svert[0].wb - v->fbi.svert[2].wb) * dy1 - (v->fbi.svert[0].wb - v->fbi.svert[1].wb) * dy2) * tdiv;
}
/* set up W0 */
- if (vd->reg[sSetupMode].u & (1 << 4))
+ if (v->reg[sSetupMode].u & (1 << 4))
{
- vd->tmu[0].startw = vd->tmu[1].startw = (INT64)(vd->fbi.svert[0].w0 * 65536.0f * 65536.0f);
- vd->tmu[0].dwdx = vd->tmu[1].dwdx = ((vd->fbi.svert[0].w0 - vd->fbi.svert[1].w0) * dx1 - (vd->fbi.svert[0].w0 - vd->fbi.svert[2].w0) * dx2) * tdiv;
- vd->tmu[0].dwdy = vd->tmu[1].dwdy = ((vd->fbi.svert[0].w0 - vd->fbi.svert[2].w0) * dy1 - (vd->fbi.svert[0].w0 - vd->fbi.svert[1].w0) * dy2) * tdiv;
+ v->tmu[0].startw = v->tmu[1].startw = (INT64)(v->fbi.svert[0].w0 * 65536.0f * 65536.0f);
+ v->tmu[0].dwdx = v->tmu[1].dwdx = ((v->fbi.svert[0].w0 - v->fbi.svert[1].w0) * dx1 - (v->fbi.svert[0].w0 - v->fbi.svert[2].w0) * dx2) * tdiv;
+ v->tmu[0].dwdy = v->tmu[1].dwdy = ((v->fbi.svert[0].w0 - v->fbi.svert[2].w0) * dy1 - (v->fbi.svert[0].w0 - v->fbi.svert[1].w0) * dy2) * tdiv;
}
/* set up S0,T0 */
- if (vd->reg[sSetupMode].u & (1 << 5))
+ if (v->reg[sSetupMode].u & (1 << 5))
{
- vd->tmu[0].starts = vd->tmu[1].starts = (INT64)(vd->fbi.svert[0].s0 * 65536.0f * 65536.0f);
- vd->tmu[0].dsdx = vd->tmu[1].dsdx = ((vd->fbi.svert[0].s0 - vd->fbi.svert[1].s0) * dx1 - (vd->fbi.svert[0].s0 - vd->fbi.svert[2].s0) * dx2) * tdiv;
- vd->tmu[0].dsdy = vd->tmu[1].dsdy = ((vd->fbi.svert[0].s0 - vd->fbi.svert[2].s0) * dy1 - (vd->fbi.svert[0].s0 - vd->fbi.svert[1].s0) * dy2) * tdiv;
- vd->tmu[0].startt = vd->tmu[1].startt = (INT64)(vd->fbi.svert[0].t0 * 65536.0f * 65536.0f);
- vd->tmu[0].dtdx = vd->tmu[1].dtdx = ((vd->fbi.svert[0].t0 - vd->fbi.svert[1].t0) * dx1 - (vd->fbi.svert[0].t0 - vd->fbi.svert[2].t0) * dx2) * tdiv;
- vd->tmu[0].dtdy = vd->tmu[1].dtdy = ((vd->fbi.svert[0].t0 - vd->fbi.svert[2].t0) * dy1 - (vd->fbi.svert[0].t0 - vd->fbi.svert[1].t0) * dy2) * tdiv;
+ v->tmu[0].starts = v->tmu[1].starts = (INT64)(v->fbi.svert[0].s0 * 65536.0f * 65536.0f);
+ v->tmu[0].dsdx = v->tmu[1].dsdx = ((v->fbi.svert[0].s0 - v->fbi.svert[1].s0) * dx1 - (v->fbi.svert[0].s0 - v->fbi.svert[2].s0) * dx2) * tdiv;
+ v->tmu[0].dsdy = v->tmu[1].dsdy = ((v->fbi.svert[0].s0 - v->fbi.svert[2].s0) * dy1 - (v->fbi.svert[0].s0 - v->fbi.svert[1].s0) * dy2) * tdiv;
+ v->tmu[0].startt = v->tmu[1].startt = (INT64)(v->fbi.svert[0].t0 * 65536.0f * 65536.0f);
+ v->tmu[0].dtdx = v->tmu[1].dtdx = ((v->fbi.svert[0].t0 - v->fbi.svert[1].t0) * dx1 - (v->fbi.svert[0].t0 - v->fbi.svert[2].t0) * dx2) * tdiv;
+ v->tmu[0].dtdy = v->tmu[1].dtdy = ((v->fbi.svert[0].t0 - v->fbi.svert[2].t0) * dy1 - (v->fbi.svert[0].t0 - v->fbi.svert[1].t0) * dy2) * tdiv;
}
/* set up W1 */
- if (vd->reg[sSetupMode].u & (1 << 6))
+ if (v->reg[sSetupMode].u & (1 << 6))
{
- vd->tmu[1].startw = (INT64)(vd->fbi.svert[0].w1 * 65536.0f * 65536.0f);
- vd->tmu[1].dwdx = ((vd->fbi.svert[0].w1 - vd->fbi.svert[1].w1) * dx1 - (vd->fbi.svert[0].w1 - vd->fbi.svert[2].w1) * dx2) * tdiv;
- vd->tmu[1].dwdy = ((vd->fbi.svert[0].w1 - vd->fbi.svert[2].w1) * dy1 - (vd->fbi.svert[0].w1 - vd->fbi.svert[1].w1) * dy2) * tdiv;
+ v->tmu[1].startw = (INT64)(v->fbi.svert[0].w1 * 65536.0f * 65536.0f);
+ v->tmu[1].dwdx = ((v->fbi.svert[0].w1 - v->fbi.svert[1].w1) * dx1 - (v->fbi.svert[0].w1 - v->fbi.svert[2].w1) * dx2) * tdiv;
+ v->tmu[1].dwdy = ((v->fbi.svert[0].w1 - v->fbi.svert[2].w1) * dy1 - (v->fbi.svert[0].w1 - v->fbi.svert[1].w1) * dy2) * tdiv;
}
/* set up S1,T1 */
- if (vd->reg[sSetupMode].u & (1 << 7))
+ if (v->reg[sSetupMode].u & (1 << 7))
{
- vd->tmu[1].starts = (INT64)(vd->fbi.svert[0].s1 * 65536.0f * 65536.0f);
- vd->tmu[1].dsdx = ((vd->fbi.svert[0].s1 - vd->fbi.svert[1].s1) * dx1 - (vd->fbi.svert[0].s1 - vd->fbi.svert[2].s1) * dx2) * tdiv;
- vd->tmu[1].dsdy = ((vd->fbi.svert[0].s1 - vd->fbi.svert[2].s1) * dy1 - (vd->fbi.svert[0].s1 - vd->fbi.svert[1].s1) * dy2) * tdiv;
- vd->tmu[1].startt = (INT64)(vd->fbi.svert[0].t1 * 65536.0f * 65536.0f);
- vd->tmu[1].dtdx = ((vd->fbi.svert[0].t1 - vd->fbi.svert[1].t1) * dx1 - (vd->fbi.svert[0].t1 - vd->fbi.svert[2].t1) * dx2) * tdiv;
- vd->tmu[1].dtdy = ((vd->fbi.svert[0].t1 - vd->fbi.svert[2].t1) * dy1 - (vd->fbi.svert[0].t1 - vd->fbi.svert[1].t1) * dy2) * tdiv;
+ v->tmu[1].starts = (INT64)(v->fbi.svert[0].s1 * 65536.0f * 65536.0f);
+ v->tmu[1].dsdx = ((v->fbi.svert[0].s1 - v->fbi.svert[1].s1) * dx1 - (v->fbi.svert[0].s1 - v->fbi.svert[2].s1) * dx2) * tdiv;
+ v->tmu[1].dsdy = ((v->fbi.svert[0].s1 - v->fbi.svert[2].s1) * dy1 - (v->fbi.svert[0].s1 - v->fbi.svert[1].s1) * dy2) * tdiv;
+ v->tmu[1].startt = (INT64)(v->fbi.svert[0].t1 * 65536.0f * 65536.0f);
+ v->tmu[1].dtdx = ((v->fbi.svert[0].t1 - v->fbi.svert[1].t1) * dx1 - (v->fbi.svert[0].t1 - v->fbi.svert[2].t1) * dx2) * tdiv;
+ v->tmu[1].dtdy = ((v->fbi.svert[0].t1 - v->fbi.svert[2].t1) * dy1 - (v->fbi.svert[0].t1 - v->fbi.svert[1].t1) * dy2) * tdiv;
}
/* draw the triangle */
- vd->fbi.cheating_allowed = 1;
- return triangle(vd);
+ v->fbi.cheating_allowed = 1;
+ return triangle(v);
}
@@ -5518,82 +5591,81 @@ INT32 voodoo_device::setup_and_draw_triangle(voodoo_device *vd)
setup and create the work item
-------------------------------------------------*/
-INT32 voodoo_device::triangle_create_work_item(voodoo_device* vd, UINT16 *drawbuf, int texcount)
+static INT32 triangle_create_work_item(voodoo_state *v, UINT16 *drawbuf, int texcount)
{
- poly_extra_data *extra = (poly_extra_data *)poly_get_extra_data(vd->poly);
-
- raster_info *info = find_rasterizer(vd, texcount);
+ poly_extra_data *extra = (poly_extra_data *)poly_get_extra_data(v->poly);
+ raster_info *info = find_rasterizer(v, texcount);
poly_vertex vert[3];
/* fill in the vertex data */
- vert[0].x = (float)vd->fbi.ax * (1.0f / 16.0f);
- vert[0].y = (float)vd->fbi.ay * (1.0f / 16.0f);
- vert[1].x = (float)vd->fbi.bx * (1.0f / 16.0f);
- vert[1].y = (float)vd->fbi.by * (1.0f / 16.0f);
- vert[2].x = (float)vd->fbi.cx * (1.0f / 16.0f);
- vert[2].y = (float)vd->fbi.cy * (1.0f / 16.0f);
+ vert[0].x = (float)v->fbi.ax * (1.0f / 16.0f);
+ vert[0].y = (float)v->fbi.ay * (1.0f / 16.0f);
+ vert[1].x = (float)v->fbi.bx * (1.0f / 16.0f);
+ vert[1].y = (float)v->fbi.by * (1.0f / 16.0f);
+ vert[2].x = (float)v->fbi.cx * (1.0f / 16.0f);
+ vert[2].y = (float)v->fbi.cy * (1.0f / 16.0f);
/* fill in the extra data */
- extra->device = vd;
+ extra->state = v;
extra->info = info;
/* fill in triangle parameters */
- extra->ax = vd->fbi.ax;
- extra->ay = vd->fbi.ay;
- extra->startr = vd->fbi.startr;
- extra->startg = vd->fbi.startg;
- extra->startb = vd->fbi.startb;
- extra->starta = vd->fbi.starta;
- extra->startz = vd->fbi.startz;
- extra->startw = vd->fbi.startw;
- extra->drdx = vd->fbi.drdx;
- extra->dgdx = vd->fbi.dgdx;
- extra->dbdx = vd->fbi.dbdx;
- extra->dadx = vd->fbi.dadx;
- extra->dzdx = vd->fbi.dzdx;
- extra->dwdx = vd->fbi.dwdx;
- extra->drdy = vd->fbi.drdy;
- extra->dgdy = vd->fbi.dgdy;
- extra->dbdy = vd->fbi.dbdy;
- extra->dady = vd->fbi.dady;
- extra->dzdy = vd->fbi.dzdy;
- extra->dwdy = vd->fbi.dwdy;
+ extra->ax = v->fbi.ax;
+ extra->ay = v->fbi.ay;
+ extra->startr = v->fbi.startr;
+ extra->startg = v->fbi.startg;
+ extra->startb = v->fbi.startb;
+ extra->starta = v->fbi.starta;
+ extra->startz = v->fbi.startz;
+ extra->startw = v->fbi.startw;
+ extra->drdx = v->fbi.drdx;
+ extra->dgdx = v->fbi.dgdx;
+ extra->dbdx = v->fbi.dbdx;
+ extra->dadx = v->fbi.dadx;
+ extra->dzdx = v->fbi.dzdx;
+ extra->dwdx = v->fbi.dwdx;
+ extra->drdy = v->fbi.drdy;
+ extra->dgdy = v->fbi.dgdy;
+ extra->dbdy = v->fbi.dbdy;
+ extra->dady = v->fbi.dady;
+ extra->dzdy = v->fbi.dzdy;
+ extra->dwdy = v->fbi.dwdy;
/* fill in texture 0 parameters */
if (texcount > 0)
{
- extra->starts0 = vd->tmu[0].starts;
- extra->startt0 = vd->tmu[0].startt;
- extra->startw0 = vd->tmu[0].startw;
- extra->ds0dx = vd->tmu[0].dsdx;
- extra->dt0dx = vd->tmu[0].dtdx;
- extra->dw0dx = vd->tmu[0].dwdx;
- extra->ds0dy = vd->tmu[0].dsdy;
- extra->dt0dy = vd->tmu[0].dtdy;
- extra->dw0dy = vd->tmu[0].dwdy;
- extra->lodbase0 = prepare_tmu(&vd->tmu[0]);
- vd->stats.texture_mode[TEXMODE_FORMAT(vd->tmu[0].reg[textureMode].u)]++;
+ extra->starts0 = v->tmu[0].starts;
+ extra->startt0 = v->tmu[0].startt;
+ extra->startw0 = v->tmu[0].startw;
+ extra->ds0dx = v->tmu[0].dsdx;
+ extra->dt0dx = v->tmu[0].dtdx;
+ extra->dw0dx = v->tmu[0].dwdx;
+ extra->ds0dy = v->tmu[0].dsdy;
+ extra->dt0dy = v->tmu[0].dtdy;
+ extra->dw0dy = v->tmu[0].dwdy;
+ extra->lodbase0 = prepare_tmu(&v->tmu[0]);
+ v->stats.texture_mode[TEXMODE_FORMAT(v->tmu[0].reg[textureMode].u)]++;
/* fill in texture 1 parameters */
if (texcount > 1)
{
- extra->starts1 = vd->tmu[1].starts;
- extra->startt1 = vd->tmu[1].startt;
- extra->startw1 = vd->tmu[1].startw;
- extra->ds1dx = vd->tmu[1].dsdx;
- extra->dt1dx = vd->tmu[1].dtdx;
- extra->dw1dx = vd->tmu[1].dwdx;
- extra->ds1dy = vd->tmu[1].dsdy;
- extra->dt1dy = vd->tmu[1].dtdy;
- extra->dw1dy = vd->tmu[1].dwdy;
- extra->lodbase1 = prepare_tmu(&vd->tmu[1]);
- vd->stats.texture_mode[TEXMODE_FORMAT(vd->tmu[1].reg[textureMode].u)]++;
+ extra->starts1 = v->tmu[1].starts;
+ extra->startt1 = v->tmu[1].startt;
+ extra->startw1 = v->tmu[1].startw;
+ extra->ds1dx = v->tmu[1].dsdx;
+ extra->dt1dx = v->tmu[1].dtdx;
+ extra->dw1dx = v->tmu[1].dwdx;
+ extra->ds1dy = v->tmu[1].dsdy;
+ extra->dt1dy = v->tmu[1].dtdy;
+ extra->dw1dy = v->tmu[1].dwdy;
+ extra->lodbase1 = prepare_tmu(&v->tmu[1]);
+ v->stats.texture_mode[TEXMODE_FORMAT(v->tmu[1].reg[textureMode].u)]++;
}
}
/* farm the rasterization out to other threads */
info->polys++;
- return poly_render_triangle(vd->poly, drawbuf, global_cliprect, info->callback, 0, &vert[0], &vert[1], &vert[2]);
+ return poly_render_triangle(v->poly, drawbuf, global_cliprect, info->callback, 0, &vert[0], &vert[1], &vert[2]);
}
@@ -5607,12 +5679,12 @@ INT32 voodoo_device::triangle_create_work_item(voodoo_device* vd, UINT16 *drawbu
hash table
-------------------------------------------------*/
-raster_info *voodoo_device::add_rasterizer(voodoo_device *vd, const raster_info *cinfo)
+static raster_info *add_rasterizer(voodoo_state *v, const raster_info *cinfo)
{
- raster_info *info = &vd->rasterizer[vd->next_rasterizer++];
+ raster_info *info = &v->rasterizer[v->next_rasterizer++];
int hash = compute_raster_hash(cinfo);
- assert_always(vd->next_rasterizer <= MAX_RASTERIZERS, "Out of space for new rasterizers!");
+ assert_always(v->next_rasterizer <= MAX_RASTERIZERS, "Out of space for new rasterizers!");
/* make a copy of the info */
*info = *cinfo;
@@ -5623,8 +5695,8 @@ raster_info *voodoo_device::add_rasterizer(voodoo_device *vd, const raster_info
info->hash = hash;
/* hook us into the hash table */
- info->next = vd->raster_hash[hash];
- vd->raster_hash[hash] = info;
+ info->next = v->raster_hash[hash];
+ v->raster_hash[hash] = info;
if (LOG_RASTERIZERS)
printf("Adding rasterizer @ %p : cp=%08X am=%08X %08X fbzM=%08X tm0=%08X tm1=%08X (hash=%d)\n",
@@ -5642,25 +5714,25 @@ raster_info *voodoo_device::add_rasterizer(voodoo_device *vd, const raster_info
it, creating a new one if necessary
-------------------------------------------------*/
-raster_info *voodoo_device::find_rasterizer(voodoo_device *vd, int texcount)
+static raster_info *find_rasterizer(voodoo_state *v, int texcount)
{
raster_info *info, *prev = nullptr;
raster_info curinfo;
int hash;
/* build an info struct with all the parameters */
- curinfo.eff_color_path = normalize_color_path(vd->reg[fbzColorPath].u);
- curinfo.eff_alpha_mode = normalize_alpha_mode(vd->reg[alphaMode].u);
- curinfo.eff_fog_mode = normalize_fog_mode(vd->reg[fogMode].u);
- curinfo.eff_fbz_mode = normalize_fbz_mode(vd->reg[fbzMode].u);
- curinfo.eff_tex_mode_0 = (texcount >= 1) ? normalize_tex_mode(vd->tmu[0].reg[textureMode].u) : 0xffffffff;
- curinfo.eff_tex_mode_1 = (texcount >= 2) ? normalize_tex_mode(vd->tmu[1].reg[textureMode].u) : 0xffffffff;
+ curinfo.eff_color_path = normalize_color_path(v->reg[fbzColorPath].u);
+ curinfo.eff_alpha_mode = normalize_alpha_mode(v->reg[alphaMode].u);
+ curinfo.eff_fog_mode = normalize_fog_mode(v->reg[fogMode].u);
+ curinfo.eff_fbz_mode = normalize_fbz_mode(v->reg[fbzMode].u);
+ curinfo.eff_tex_mode_0 = (texcount >= 1) ? normalize_tex_mode(v->tmu[0].reg[textureMode].u) : 0xffffffff;
+ curinfo.eff_tex_mode_1 = (texcount >= 2) ? normalize_tex_mode(v->tmu[1].reg[textureMode].u) : 0xffffffff;
/* compute the hash */
hash = compute_raster_hash(&curinfo);
/* find the appropriate hash entry */
- for (info = vd->raster_hash[hash]; info; prev = info, info = info->next)
+ for (info = v->raster_hash[hash]; info; prev = info, info = info->next)
if (info->eff_color_path == curinfo.eff_color_path &&
info->eff_alpha_mode == curinfo.eff_alpha_mode &&
info->eff_fog_mode == curinfo.eff_fog_mode &&
@@ -5672,8 +5744,8 @@ raster_info *voodoo_device::find_rasterizer(voodoo_device *vd, int texcount)
if (prev)
{
prev->next = info->next;
- info->next = vd->raster_hash[hash];
- vd->raster_hash[hash] = info;
+ info->next = v->raster_hash[hash];
+ v->raster_hash[hash] = info;
}
/* return the result */
@@ -5689,7 +5761,7 @@ raster_info *voodoo_device::find_rasterizer(voodoo_device *vd, int texcount)
curinfo.next = nullptr;
curinfo.hash = hash;
- return add_rasterizer(vd, &curinfo);
+ return add_rasterizer(v, &curinfo);
}
@@ -5698,7 +5770,7 @@ raster_info *voodoo_device::find_rasterizer(voodoo_device *vd, int texcount)
the current rasterizer usage patterns
-------------------------------------------------*/
-void voodoo_device::dump_rasterizer_stats(voodoo_device *vd)
+static void dump_rasterizer_stats(voodoo_state *v)
{
static UINT8 display_index;
raster_info *cur, *best;
@@ -5714,7 +5786,7 @@ void voodoo_device::dump_rasterizer_stats(voodoo_device *vd)
/* find the highest entry */
for (hash = 0; hash < RASTER_HASH_SIZE; hash++)
- for (cur = vd->raster_hash[hash]; cur; cur = cur->next)
+ for (cur = v->raster_hash[hash]; cur; cur = cur->next)
if (cur->display != display_index && (best == nullptr || cur->hits > best->hits))
best = cur;
@@ -5750,10 +5822,12 @@ voodoo_device::voodoo_device(const machine_config &mconfig, device_type type, co
m_vblank(*this),
m_stall(*this)
{
+ m_token = global_alloc_clear<voodoo_state>();
}
voodoo_device::~voodoo_device()
{
+ global_free(m_token);
}
//-------------------------------------------------
@@ -5772,7 +5846,8 @@ void voodoo_device::device_config_complete()
void voodoo_device::device_reset()
{
- soft_reset(this);
+ voodoo_state *v = get_safe_token(this);
+ soft_reset(v);
}
//-------------------------------------------------
@@ -5781,9 +5856,11 @@ void voodoo_device::device_reset()
void voodoo_device::device_stop()
{
+ voodoo_state *v = get_safe_token(this);
+
/* release the work queue, ensuring all work is finished */
- if (poly != nullptr)
- poly_free(poly);
+ if (v->poly != nullptr)
+ poly_free(v->poly);
}
@@ -5870,26 +5947,26 @@ void voodoo_3_device::device_start()
implementation of the 'fastfill' command
-------------------------------------------------*/
-void voodoo_device::raster_fastfill(void *destbase, INT32 y, const poly_extent *extent, const void *extradata, int threadid)
+static void raster_fastfill(void *destbase, INT32 y, const poly_extent *extent, const void *extradata, int threadid)
{
const poly_extra_data *extra = (const poly_extra_data *)extradata;
- voodoo_device* vd = extra->device;
- stats_block *stats = &vd->thread_stats[threadid];
+ voodoo_state *v = extra->state;
+ stats_block *stats = &v->thread_stats[threadid];
INT32 startx = extent->startx;
INT32 stopx = extent->stopx;
int scry, x;
/* determine the screen Y */
scry = y;
- if (FBZMODE_Y_ORIGIN(vd->reg[fbzMode].u))
- scry = (vd->fbi.yorigin - y) & 0x3ff;
+ if (FBZMODE_Y_ORIGIN(v->reg[fbzMode].u))
+ scry = (v->fbi.yorigin - y) & 0x3ff;
/* fill this RGB row */
- if (FBZMODE_RGB_BUFFER_MASK(vd->reg[fbzMode].u))
+ if (FBZMODE_RGB_BUFFER_MASK(v->reg[fbzMode].u))
{
const UINT16 *ditherow = &extra->dither[(y & 3) * 4];
UINT64 expanded = *(UINT64 *)ditherow;
- UINT16 *dest = (UINT16 *)destbase + scry * vd->fbi.rowpixels;
+ UINT16 *dest = (UINT16 *)destbase + scry * v->fbi.rowpixels;
for (x = startx; x < stopx && (x & 3) != 0; x++)
dest[x] = ditherow[x & 3];
@@ -5901,11 +5978,11 @@ void voodoo_device::raster_fastfill(void *destbase, INT32 y, const poly_extent *
}
/* fill this dest buffer row */
- if (FBZMODE_AUX_BUFFER_MASK(vd->reg[fbzMode].u) && vd->fbi.auxoffs != ~0)
+ if (FBZMODE_AUX_BUFFER_MASK(v->reg[fbzMode].u) && v->fbi.auxoffs != ~0)
{
- UINT16 color = vd->reg[zaColor].u;
+ UINT16 color = v->reg[zaColor].u;
UINT64 expanded = ((UINT64)color << 48) | ((UINT64)color << 32) | (color << 16) | color;
- UINT16 *dest = (UINT16 *)(vd->fbi.ram + vd->fbi.auxoffs) + scry * vd->fbi.rowpixels;
+ UINT16 *dest = (UINT16 *)(v->fbi.ram + v->fbi.auxoffs) + scry * v->fbi.rowpixels;
for (x = startx; x < stopx && (x & 3) != 0; x++)
dest[x] = color;
@@ -5921,21 +5998,21 @@ void voodoo_device::raster_fastfill(void *destbase, INT32 y, const poly_extent *
generic_0tmu - generic rasterizer for 0 TMUs
-------------------------------------------------*/
-RASTERIZER(generic_0tmu, 0, vd->reg[fbzColorPath].u, vd->reg[fbzMode].u, vd->reg[alphaMode].u,
- vd->reg[fogMode].u, 0, 0)
+RASTERIZER(generic_0tmu, 0, v->reg[fbzColorPath].u, v->reg[fbzMode].u, v->reg[alphaMode].u,
+ v->reg[fogMode].u, 0, 0)
/*-------------------------------------------------
generic_1tmu - generic rasterizer for 1 TMU
-------------------------------------------------*/
-RASTERIZER(generic_1tmu, 1, vd->reg[fbzColorPath].u, vd->reg[fbzMode].u, vd->reg[alphaMode].u,
- vd->reg[fogMode].u, vd->tmu[0].reg[textureMode].u, 0)
+RASTERIZER(generic_1tmu, 1, v->reg[fbzColorPath].u, v->reg[fbzMode].u, v->reg[alphaMode].u,
+ v->reg[fogMode].u, v->tmu[0].reg[textureMode].u, 0)
/*-------------------------------------------------
generic_2tmu - generic rasterizer for 2 TMUs
-------------------------------------------------*/
-RASTERIZER(generic_2tmu, 2, vd->reg[fbzColorPath].u, vd->reg[fbzMode].u, vd->reg[alphaMode].u,
- vd->reg[fogMode].u, vd->tmu[0].reg[textureMode].u, vd->tmu[1].reg[textureMode].u)
+RASTERIZER(generic_2tmu, 2, v->reg[fbzColorPath].u, v->reg[fbzMode].u, v->reg[alphaMode].u,
+ v->reg[fogMode].u, v->tmu[0].reg[textureMode].u, v->tmu[1].reg[textureMode].u)
diff --git a/src/devices/video/voodoo.h b/src/devices/video/voodoo.h
index 1dc1a4a59ec..3d92f17f86a 100644
--- a/src/devices/video/voodoo.h
+++ b/src/devices/video/voodoo.h
@@ -11,1694 +11,9 @@
#ifndef __VOODOO_H__
#define __VOODOO_H__
-#include "video/polylgcy.h"
-
#pragma once
-/*************************************
- *
- * Misc. constants
- *
- *************************************/
-
-/* enumeration describing reasons we might be stalled */
-enum
-{
- NOT_STALLED = 0,
- STALLED_UNTIL_FIFO_LWM,
- STALLED_UNTIL_FIFO_EMPTY
-};
-
-
-
-// Use old table lookup versus straight double divide
-#define USE_FAST_RECIP 0
-
-/* maximum number of TMUs */
-#define MAX_TMU 2
-
-/* accumulate operations less than this number of clocks */
-#define ACCUMULATE_THRESHOLD 0
-
-/* number of clocks to set up a triangle (just a guess) */
-#define TRIANGLE_SETUP_CLOCKS 100
-
-/* maximum number of rasterizers */
-#define MAX_RASTERIZERS 1024
-
-/* size of the rasterizer hash table */
-#define RASTER_HASH_SIZE 97
-
-/* flags for LFB writes */
-#define LFB_RGB_PRESENT 1
-#define LFB_ALPHA_PRESENT 2
-#define LFB_DEPTH_PRESENT 4
-#define LFB_DEPTH_PRESENT_MSW 8
-
-/* flags for the register access array */
-#define REGISTER_READ 0x01 /* reads are allowed */
-#define REGISTER_WRITE 0x02 /* writes are allowed */
-#define REGISTER_PIPELINED 0x04 /* writes are pipelined */
-#define REGISTER_FIFO 0x08 /* writes go to FIFO */
-#define REGISTER_WRITETHRU 0x10 /* writes are valid even for CMDFIFO */
-
-/* shorter combinations to make the table smaller */
-#define REG_R (REGISTER_READ)
-#define REG_W (REGISTER_WRITE)
-#define REG_WT (REGISTER_WRITE | REGISTER_WRITETHRU)
-#define REG_RW (REGISTER_READ | REGISTER_WRITE)
-#define REG_RWT (REGISTER_READ | REGISTER_WRITE | REGISTER_WRITETHRU)
-#define REG_RP (REGISTER_READ | REGISTER_PIPELINED)
-#define REG_WP (REGISTER_WRITE | REGISTER_PIPELINED)
-#define REG_RWP (REGISTER_READ | REGISTER_WRITE | REGISTER_PIPELINED)
-#define REG_RWPT (REGISTER_READ | REGISTER_WRITE | REGISTER_PIPELINED | REGISTER_WRITETHRU)
-#define REG_RF (REGISTER_READ | REGISTER_FIFO)
-#define REG_WF (REGISTER_WRITE | REGISTER_FIFO)
-#define REG_RWF (REGISTER_READ | REGISTER_WRITE | REGISTER_FIFO)
-#define REG_RPF (REGISTER_READ | REGISTER_PIPELINED | REGISTER_FIFO)
-#define REG_WPF (REGISTER_WRITE | REGISTER_PIPELINED | REGISTER_FIFO)
-#define REG_RWPF (REGISTER_READ | REGISTER_WRITE | REGISTER_PIPELINED | REGISTER_FIFO)
-
-/* lookup bits is the log2 of the size of the reciprocal/log table */
-#define RECIPLOG_LOOKUP_BITS 9
-
-/* input precision is how many fraction bits the input value has; this is a 64-bit number */
-#define RECIPLOG_INPUT_PREC 32
-
-/* lookup precision is how many fraction bits each table entry contains */
-#define RECIPLOG_LOOKUP_PREC 22
-
-/* output precision is how many fraction bits the result should have */
-#define RECIP_OUTPUT_PREC 15
-#define LOG_OUTPUT_PREC 8
-
-
-
-/*************************************
- *
- * Register constants
- *
- *************************************/
-
-/* Codes to the right:
- R = readable
- W = writeable
- P = pipelined
- F = goes to FIFO
-*/
-
-/* 0x000 */
-#define vdstatus (0x000/4) /* R P */
-#define intrCtrl (0x004/4) /* RW P -- Voodoo2/Banshee only */
-#define vertexAx (0x008/4) /* W PF */
-#define vertexAy (0x00c/4) /* W PF */
-#define vertexBx (0x010/4) /* W PF */
-#define vertexBy (0x014/4) /* W PF */
-#define vertexCx (0x018/4) /* W PF */
-#define vertexCy (0x01c/4) /* W PF */
-#define startR (0x020/4) /* W PF */
-#define startG (0x024/4) /* W PF */
-#define startB (0x028/4) /* W PF */
-#define startZ (0x02c/4) /* W PF */
-#define startA (0x030/4) /* W PF */
-#define startS (0x034/4) /* W PF */
-#define startT (0x038/4) /* W PF */
-#define startW (0x03c/4) /* W PF */
-
-/* 0x040 */
-#define dRdX (0x040/4) /* W PF */
-#define dGdX (0x044/4) /* W PF */
-#define dBdX (0x048/4) /* W PF */
-#define dZdX (0x04c/4) /* W PF */
-#define dAdX (0x050/4) /* W PF */
-#define dSdX (0x054/4) /* W PF */
-#define dTdX (0x058/4) /* W PF */
-#define dWdX (0x05c/4) /* W PF */
-#define dRdY (0x060/4) /* W PF */
-#define dGdY (0x064/4) /* W PF */
-#define dBdY (0x068/4) /* W PF */
-#define dZdY (0x06c/4) /* W PF */
-#define dAdY (0x070/4) /* W PF */
-#define dSdY (0x074/4) /* W PF */
-#define dTdY (0x078/4) /* W PF */
-#define dWdY (0x07c/4) /* W PF */
-
-/* 0x080 */
-#define triangleCMD (0x080/4) /* W PF */
-#define fvertexAx (0x088/4) /* W PF */
-#define fvertexAy (0x08c/4) /* W PF */
-#define fvertexBx (0x090/4) /* W PF */
-#define fvertexBy (0x094/4) /* W PF */
-#define fvertexCx (0x098/4) /* W PF */
-#define fvertexCy (0x09c/4) /* W PF */
-#define fstartR (0x0a0/4) /* W PF */
-#define fstartG (0x0a4/4) /* W PF */
-#define fstartB (0x0a8/4) /* W PF */
-#define fstartZ (0x0ac/4) /* W PF */
-#define fstartA (0x0b0/4) /* W PF */
-#define fstartS (0x0b4/4) /* W PF */
-#define fstartT (0x0b8/4) /* W PF */
-#define fstartW (0x0bc/4) /* W PF */
-
-/* 0x0c0 */
-#define fdRdX (0x0c0/4) /* W PF */
-#define fdGdX (0x0c4/4) /* W PF */
-#define fdBdX (0x0c8/4) /* W PF */
-#define fdZdX (0x0cc/4) /* W PF */
-#define fdAdX (0x0d0/4) /* W PF */
-#define fdSdX (0x0d4/4) /* W PF */
-#define fdTdX (0x0d8/4) /* W PF */
-#define fdWdX (0x0dc/4) /* W PF */
-#define fdRdY (0x0e0/4) /* W PF */
-#define fdGdY (0x0e4/4) /* W PF */
-#define fdBdY (0x0e8/4) /* W PF */
-#define fdZdY (0x0ec/4) /* W PF */
-#define fdAdY (0x0f0/4) /* W PF */
-#define fdSdY (0x0f4/4) /* W PF */
-#define fdTdY (0x0f8/4) /* W PF */
-#define fdWdY (0x0fc/4) /* W PF */
-
-/* 0x100 */
-#define ftriangleCMD (0x100/4) /* W PF */
-#define fbzColorPath (0x104/4) /* RW PF */
-#define fogMode (0x108/4) /* RW PF */
-#define alphaMode (0x10c/4) /* RW PF */
-#define fbzMode (0x110/4) /* RW F */
-#define lfbMode (0x114/4) /* RW F */
-#define clipLeftRight (0x118/4) /* RW F */
-#define clipLowYHighY (0x11c/4) /* RW F */
-#define nopCMD (0x120/4) /* W F */
-#define fastfillCMD (0x124/4) /* W F */
-#define swapbufferCMD (0x128/4) /* W F */
-#define fogColor (0x12c/4) /* W F */
-#define zaColor (0x130/4) /* W F */
-#define chromaKey (0x134/4) /* W F */
-#define chromaRange (0x138/4) /* W F -- Voodoo2/Banshee only */
-#define userIntrCMD (0x13c/4) /* W F -- Voodoo2/Banshee only */
-
-/* 0x140 */
-#define stipple (0x140/4) /* RW F */
-#define color0 (0x144/4) /* RW F */
-#define color1 (0x148/4) /* RW F */
-#define fbiPixelsIn (0x14c/4) /* R */
-#define fbiChromaFail (0x150/4) /* R */
-#define fbiZfuncFail (0x154/4) /* R */
-#define fbiAfuncFail (0x158/4) /* R */
-#define fbiPixelsOut (0x15c/4) /* R */
-#define fogTable (0x160/4) /* W F */
-
-/* 0x1c0 */
-#define cmdFifoBaseAddr (0x1e0/4) /* RW -- Voodoo2 only */
-#define cmdFifoBump (0x1e4/4) /* RW -- Voodoo2 only */
-#define cmdFifoRdPtr (0x1e8/4) /* RW -- Voodoo2 only */
-#define cmdFifoAMin (0x1ec/4) /* RW -- Voodoo2 only */
-#define colBufferAddr (0x1ec/4) /* RW -- Banshee only */
-#define cmdFifoAMax (0x1f0/4) /* RW -- Voodoo2 only */
-#define colBufferStride (0x1f0/4) /* RW -- Banshee only */
-#define cmdFifoDepth (0x1f4/4) /* RW -- Voodoo2 only */
-#define auxBufferAddr (0x1f4/4) /* RW -- Banshee only */
-#define cmdFifoHoles (0x1f8/4) /* RW -- Voodoo2 only */
-#define auxBufferStride (0x1f8/4) /* RW -- Banshee only */
-
-/* 0x200 */
-#define fbiInit4 (0x200/4) /* RW -- Voodoo/Voodoo2 only */
-#define clipLeftRight1 (0x200/4) /* RW -- Banshee only */
-#define vRetrace (0x204/4) /* R -- Voodoo/Voodoo2 only */
-#define clipTopBottom1 (0x204/4) /* RW -- Banshee only */
-#define backPorch (0x208/4) /* RW -- Voodoo/Voodoo2 only */
-#define videoDimensions (0x20c/4) /* RW -- Voodoo/Voodoo2 only */
-#define fbiInit0 (0x210/4) /* RW -- Voodoo/Voodoo2 only */
-#define fbiInit1 (0x214/4) /* RW -- Voodoo/Voodoo2 only */
-#define fbiInit2 (0x218/4) /* RW -- Voodoo/Voodoo2 only */
-#define fbiInit3 (0x21c/4) /* RW -- Voodoo/Voodoo2 only */
-#define hSync (0x220/4) /* W -- Voodoo/Voodoo2 only */
-#define vSync (0x224/4) /* W -- Voodoo/Voodoo2 only */
-#define clutData (0x228/4) /* W F -- Voodoo/Voodoo2 only */
-#define dacData (0x22c/4) /* W -- Voodoo/Voodoo2 only */
-#define maxRgbDelta (0x230/4) /* W -- Voodoo/Voodoo2 only */
-#define hBorder (0x234/4) /* W -- Voodoo2 only */
-#define vBorder (0x238/4) /* W -- Voodoo2 only */
-#define borderColor (0x23c/4) /* W -- Voodoo2 only */
-
-/* 0x240 */
-#define hvRetrace (0x240/4) /* R -- Voodoo2 only */
-#define fbiInit5 (0x244/4) /* RW -- Voodoo2 only */
-#define fbiInit6 (0x248/4) /* RW -- Voodoo2 only */
-#define fbiInit7 (0x24c/4) /* RW -- Voodoo2 only */
-#define swapPending (0x24c/4) /* W -- Banshee only */
-#define leftOverlayBuf (0x250/4) /* W -- Banshee only */
-#define rightOverlayBuf (0x254/4) /* W -- Banshee only */
-#define fbiSwapHistory (0x258/4) /* R -- Voodoo2/Banshee only */
-#define fbiTrianglesOut (0x25c/4) /* R -- Voodoo2/Banshee only */
-#define sSetupMode (0x260/4) /* W PF -- Voodoo2/Banshee only */
-#define sVx (0x264/4) /* W PF -- Voodoo2/Banshee only */
-#define sVy (0x268/4) /* W PF -- Voodoo2/Banshee only */
-#define sARGB (0x26c/4) /* W PF -- Voodoo2/Banshee only */
-#define sRed (0x270/4) /* W PF -- Voodoo2/Banshee only */
-#define sGreen (0x274/4) /* W PF -- Voodoo2/Banshee only */
-#define sBlue (0x278/4) /* W PF -- Voodoo2/Banshee only */
-#define sAlpha (0x27c/4) /* W PF -- Voodoo2/Banshee only */
-
-/* 0x280 */
-#define sVz (0x280/4) /* W PF -- Voodoo2/Banshee only */
-#define sWb (0x284/4) /* W PF -- Voodoo2/Banshee only */
-#define sWtmu0 (0x288/4) /* W PF -- Voodoo2/Banshee only */
-#define sS_W0 (0x28c/4) /* W PF -- Voodoo2/Banshee only */
-#define sT_W0 (0x290/4) /* W PF -- Voodoo2/Banshee only */
-#define sWtmu1 (0x294/4) /* W PF -- Voodoo2/Banshee only */
-#define sS_Wtmu1 (0x298/4) /* W PF -- Voodoo2/Banshee only */
-#define sT_Wtmu1 (0x29c/4) /* W PF -- Voodoo2/Banshee only */
-#define sDrawTriCMD (0x2a0/4) /* W PF -- Voodoo2/Banshee only */
-#define sBeginTriCMD (0x2a4/4) /* W PF -- Voodoo2/Banshee only */
-
-/* 0x2c0 */
-#define bltSrcBaseAddr (0x2c0/4) /* RW PF -- Voodoo2 only */
-#define bltDstBaseAddr (0x2c4/4) /* RW PF -- Voodoo2 only */
-#define bltXYStrides (0x2c8/4) /* RW PF -- Voodoo2 only */
-#define bltSrcChromaRange (0x2cc/4) /* RW PF -- Voodoo2 only */
-#define bltDstChromaRange (0x2d0/4) /* RW PF -- Voodoo2 only */
-#define bltClipX (0x2d4/4) /* RW PF -- Voodoo2 only */
-#define bltClipY (0x2d8/4) /* RW PF -- Voodoo2 only */
-#define bltSrcXY (0x2e0/4) /* RW PF -- Voodoo2 only */
-#define bltDstXY (0x2e4/4) /* RW PF -- Voodoo2 only */
-#define bltSize (0x2e8/4) /* RW PF -- Voodoo2 only */
-#define bltRop (0x2ec/4) /* RW PF -- Voodoo2 only */
-#define bltColor (0x2f0/4) /* RW PF -- Voodoo2 only */
-#define bltCommand (0x2f8/4) /* RW PF -- Voodoo2 only */
-#define bltData (0x2fc/4) /* W PF -- Voodoo2 only */
-
-/* 0x300 */
-#define textureMode (0x300/4) /* W PF */
-#define tLOD (0x304/4) /* W PF */
-#define tDetail (0x308/4) /* W PF */
-#define texBaseAddr (0x30c/4) /* W PF */
-#define texBaseAddr_1 (0x310/4) /* W PF */
-#define texBaseAddr_2 (0x314/4) /* W PF */
-#define texBaseAddr_3_8 (0x318/4) /* W PF */
-#define trexInit0 (0x31c/4) /* W F -- Voodoo/Voodoo2 only */
-#define trexInit1 (0x320/4) /* W F */
-#define nccTable (0x324/4) /* W F */
-
-
-
-// 2D registers
-#define banshee2D_clip0Min (0x008/4)
-#define banshee2D_clip0Max (0x00c/4)
-#define banshee2D_dstBaseAddr (0x010/4)
-#define banshee2D_dstFormat (0x014/4)
-#define banshee2D_srcColorkeyMin (0x018/4)
-#define banshee2D_srcColorkeyMax (0x01c/4)
-#define banshee2D_dstColorkeyMin (0x020/4)
-#define banshee2D_dstColorkeyMax (0x024/4)
-#define banshee2D_bresError0 (0x028/4)
-#define banshee2D_bresError1 (0x02c/4)
-#define banshee2D_rop (0x030/4)
-#define banshee2D_srcBaseAddr (0x034/4)
-#define banshee2D_commandExtra (0x038/4)
-#define banshee2D_lineStipple (0x03c/4)
-#define banshee2D_lineStyle (0x040/4)
-#define banshee2D_pattern0Alias (0x044/4)
-#define banshee2D_pattern1Alias (0x048/4)
-#define banshee2D_clip1Min (0x04c/4)
-#define banshee2D_clip1Max (0x050/4)
-#define banshee2D_srcFormat (0x054/4)
-#define banshee2D_srcSize (0x058/4)
-#define banshee2D_srcXY (0x05c/4)
-#define banshee2D_colorBack (0x060/4)
-#define banshee2D_colorFore (0x064/4)
-#define banshee2D_dstSize (0x068/4)
-#define banshee2D_dstXY (0x06c/4)
-#define banshee2D_command (0x070/4)
-
-
-/*************************************
- *
- * Alias map of the first 64
- * registers when remapped
- *
- *************************************/
-
-static const UINT8 register_alias_map[0x40] =
-{
- vdstatus, 0x004/4, vertexAx, vertexAy,
- vertexBx, vertexBy, vertexCx, vertexCy,
- startR, dRdX, dRdY, startG,
- dGdX, dGdY, startB, dBdX,
- dBdY, startZ, dZdX, dZdY,
- startA, dAdX, dAdY, startS,
- dSdX, dSdY, startT, dTdX,
- dTdY, startW, dWdX, dWdY,
-
- triangleCMD,0x084/4, fvertexAx, fvertexAy,
- fvertexBx, fvertexBy, fvertexCx, fvertexCy,
- fstartR, fdRdX, fdRdY, fstartG,
- fdGdX, fdGdY, fstartB, fdBdX,
- fdBdY, fstartZ, fdZdX, fdZdY,
- fstartA, fdAdX, fdAdY, fstartS,
- fdSdX, fdSdY, fstartT, fdTdX,
- fdTdY, fstartW, fdWdX, fdWdY
-};
-
-
-
-/*************************************
- *
- * Table of per-register access rights
- *
- *************************************/
-
-static const UINT8 voodoo_register_access[0x100] =
-{
- /* 0x000 */
- REG_RP, 0, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
-
- /* 0x040 */
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
-
- /* 0x080 */
- REG_WPF, 0, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
-
- /* 0x0c0 */
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
-
- /* 0x100 */
- REG_WPF, REG_RWPF, REG_RWPF, REG_RWPF,
- REG_RWF, REG_RWF, REG_RWF, REG_RWF,
- REG_WF, REG_WF, REG_WF, REG_WF,
- REG_WF, REG_WF, 0, 0,
-
- /* 0x140 */
- REG_RWF, REG_RWF, REG_RWF, REG_R,
- REG_R, REG_R, REG_R, REG_R,
- REG_WF, REG_WF, REG_WF, REG_WF,
- REG_WF, REG_WF, REG_WF, REG_WF,
-
- /* 0x180 */
- REG_WF, REG_WF, REG_WF, REG_WF,
- REG_WF, REG_WF, REG_WF, REG_WF,
- REG_WF, REG_WF, REG_WF, REG_WF,
- REG_WF, REG_WF, REG_WF, REG_WF,
-
- /* 0x1c0 */
- REG_WF, REG_WF, REG_WF, REG_WF,
- REG_WF, REG_WF, REG_WF, REG_WF,
- 0, 0, 0, 0,
- 0, 0, 0, 0,
-
- /* 0x200 */
- REG_RW, REG_R, REG_RW, REG_RW,
- REG_RW, REG_RW, REG_RW, REG_RW,
- REG_W, REG_W, REG_W, REG_W,
- REG_W, 0, 0, 0,
-
- /* 0x240 */
- 0, 0, 0, 0,
- 0, 0, 0, 0,
- 0, 0, 0, 0,
- 0, 0, 0, 0,
-
- /* 0x280 */
- 0, 0, 0, 0,
- 0, 0, 0, 0,
- 0, 0, 0, 0,
- 0, 0, 0, 0,
-
- /* 0x2c0 */
- 0, 0, 0, 0,
- 0, 0, 0, 0,
- 0, 0, 0, 0,
- 0, 0, 0, 0,
-
- /* 0x300 */
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WF,
- REG_WF, REG_WF, REG_WF, REG_WF,
- REG_WF, REG_WF, REG_WF, REG_WF,
-
- /* 0x340 */
- REG_WF, REG_WF, REG_WF, REG_WF,
- REG_WF, REG_WF, REG_WF, REG_WF,
- REG_WF, REG_WF, REG_WF, REG_WF,
- REG_WF, REG_WF, REG_WF, REG_WF,
-
- /* 0x380 */
- REG_WF
-};
-
-
-static const UINT8 voodoo2_register_access[0x100] =
-{
- /* 0x000 */
- REG_RP, REG_RWPT, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
-
- /* 0x040 */
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
-
- /* 0x080 */
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
-
- /* 0x0c0 */
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
-
- /* 0x100 */
- REG_WPF, REG_RWPF, REG_RWPF, REG_RWPF,
- REG_RWF, REG_RWF, REG_RWF, REG_RWF,
- REG_WF, REG_WF, REG_WF, REG_WF,
- REG_WF, REG_WF, REG_WF, REG_WF,
-
- /* 0x140 */
- REG_RWF, REG_RWF, REG_RWF, REG_R,
- REG_R, REG_R, REG_R, REG_R,
- REG_WF, REG_WF, REG_WF, REG_WF,
- REG_WF, REG_WF, REG_WF, REG_WF,
-
- /* 0x180 */
- REG_WF, REG_WF, REG_WF, REG_WF,
- REG_WF, REG_WF, REG_WF, REG_WF,
- REG_WF, REG_WF, REG_WF, REG_WF,
- REG_WF, REG_WF, REG_WF, REG_WF,
-
- /* 0x1c0 */
- REG_WF, REG_WF, REG_WF, REG_WF,
- REG_WF, REG_WF, REG_WF, REG_WF,
- REG_RWT, REG_RWT, REG_RWT, REG_RWT,
- REG_RWT, REG_RWT, REG_RWT, REG_RW,
-
- /* 0x200 */
- REG_RWT, REG_R, REG_RWT, REG_RWT,
- REG_RWT, REG_RWT, REG_RWT, REG_RWT,
- REG_WT, REG_WT, REG_WF, REG_WT,
- REG_WT, REG_WT, REG_WT, REG_WT,
-
- /* 0x240 */
- REG_R, REG_RWT, REG_RWT, REG_RWT,
- 0, 0, REG_R, REG_R,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
-
- /* 0x280 */
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, 0, 0,
- 0, 0, 0, 0,
-
- /* 0x2c0 */
- REG_RWPF, REG_RWPF, REG_RWPF, REG_RWPF,
- REG_RWPF, REG_RWPF, REG_RWPF, REG_RWPF,
- REG_RWPF, REG_RWPF, REG_RWPF, REG_RWPF,
- REG_RWPF, REG_RWPF, REG_RWPF, REG_WPF,
-
- /* 0x300 */
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WF,
- REG_WF, REG_WF, REG_WF, REG_WF,
- REG_WF, REG_WF, REG_WF, REG_WF,
-
- /* 0x340 */
- REG_WF, REG_WF, REG_WF, REG_WF,
- REG_WF, REG_WF, REG_WF, REG_WF,
- REG_WF, REG_WF, REG_WF, REG_WF,
- REG_WF, REG_WF, REG_WF, REG_WF,
-
- /* 0x380 */
- REG_WF
-};
-
-
-static const UINT8 banshee_register_access[0x100] =
-{
- /* 0x000 */
- REG_RP, REG_RWPT, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
-
- /* 0x040 */
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
-
- /* 0x080 */
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
-
- /* 0x0c0 */
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
-
- /* 0x100 */
- REG_WPF, REG_RWPF, REG_RWPF, REG_RWPF,
- REG_RWF, REG_RWF, REG_RWF, REG_RWF,
- REG_WF, REG_WF, REG_WF, REG_WF,
- REG_WF, REG_WF, REG_WF, REG_WF,
-
- /* 0x140 */
- REG_RWF, REG_RWF, REG_RWF, REG_R,
- REG_R, REG_R, REG_R, REG_R,
- REG_WF, REG_WF, REG_WF, REG_WF,
- REG_WF, REG_WF, REG_WF, REG_WF,
-
- /* 0x180 */
- REG_WF, REG_WF, REG_WF, REG_WF,
- REG_WF, REG_WF, REG_WF, REG_WF,
- REG_WF, REG_WF, REG_WF, REG_WF,
- REG_WF, REG_WF, REG_WF, REG_WF,
-
- /* 0x1c0 */
- REG_WF, REG_WF, REG_WF, REG_WF,
- REG_WF, REG_WF, REG_WF, REG_WF,
- 0, 0, 0, REG_RWF,
- REG_RWF, REG_RWF, REG_RWF, 0,
-
- /* 0x200 */
- REG_RWF, REG_RWF, 0, 0,
- 0, 0, 0, 0,
- 0, 0, 0, 0,
- 0, 0, 0, 0,
-
- /* 0x240 */
- 0, 0, 0, REG_WT,
- REG_RWF, REG_RWF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_R, REG_R,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
-
- /* 0x280 */
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, 0, 0,
- 0, 0, 0, 0,
-
- /* 0x2c0 */
- 0, 0, 0, 0,
- 0, 0, 0, 0,
- 0, 0, 0, 0,
- 0, 0, 0, 0,
-
- /* 0x300 */
- REG_WPF, REG_WPF, REG_WPF, REG_WPF,
- REG_WPF, REG_WPF, REG_WPF, 0,
- REG_WF, REG_WF, REG_WF, REG_WF,
- REG_WF, REG_WF, REG_WF, REG_WF,
-
- /* 0x340 */
- REG_WF, REG_WF, REG_WF, REG_WF,
- REG_WF, REG_WF, REG_WF, REG_WF,
- REG_WF, REG_WF, REG_WF, REG_WF,
- REG_WF, REG_WF, REG_WF, REG_WF,
-
- /* 0x380 */
- REG_WF
-};
-
-
-
-/*************************************
- *
- * Register string table for debug
- *
- *************************************/
-
-static const char *const voodoo_reg_name[] =
-{
- /* 0x000 */
- "status", "{intrCtrl}", "vertexAx", "vertexAy",
- "vertexBx", "vertexBy", "vertexCx", "vertexCy",
- "startR", "startG", "startB", "startZ",
- "startA", "startS", "startT", "startW",
- /* 0x040 */
- "dRdX", "dGdX", "dBdX", "dZdX",
- "dAdX", "dSdX", "dTdX", "dWdX",
- "dRdY", "dGdY", "dBdY", "dZdY",
- "dAdY", "dSdY", "dTdY", "dWdY",
- /* 0x080 */
- "triangleCMD", "reserved084", "fvertexAx", "fvertexAy",
- "fvertexBx", "fvertexBy", "fvertexCx", "fvertexCy",
- "fstartR", "fstartG", "fstartB", "fstartZ",
- "fstartA", "fstartS", "fstartT", "fstartW",
- /* 0x0c0 */
- "fdRdX", "fdGdX", "fdBdX", "fdZdX",
- "fdAdX", "fdSdX", "fdTdX", "fdWdX",
- "fdRdY", "fdGdY", "fdBdY", "fdZdY",
- "fdAdY", "fdSdY", "fdTdY", "fdWdY",
- /* 0x100 */
- "ftriangleCMD", "fbzColorPath", "fogMode", "alphaMode",
- "fbzMode", "lfbMode", "clipLeftRight","clipLowYHighY",
- "nopCMD", "fastfillCMD", "swapbufferCMD","fogColor",
- "zaColor", "chromaKey", "{chromaRange}","{userIntrCMD}",
- /* 0x140 */
- "stipple", "color0", "color1", "fbiPixelsIn",
- "fbiChromaFail","fbiZfuncFail", "fbiAfuncFail", "fbiPixelsOut",
- "fogTable160", "fogTable164", "fogTable168", "fogTable16c",
- "fogTable170", "fogTable174", "fogTable178", "fogTable17c",
- /* 0x180 */
- "fogTable180", "fogTable184", "fogTable188", "fogTable18c",
- "fogTable190", "fogTable194", "fogTable198", "fogTable19c",
- "fogTable1a0", "fogTable1a4", "fogTable1a8", "fogTable1ac",
- "fogTable1b0", "fogTable1b4", "fogTable1b8", "fogTable1bc",
- /* 0x1c0 */
- "fogTable1c0", "fogTable1c4", "fogTable1c8", "fogTable1cc",
- "fogTable1d0", "fogTable1d4", "fogTable1d8", "fogTable1dc",
- "{cmdFifoBaseAddr}","{cmdFifoBump}","{cmdFifoRdPtr}","{cmdFifoAMin}",
- "{cmdFifoAMax}","{cmdFifoDepth}","{cmdFifoHoles}","reserved1fc",
- /* 0x200 */
- "fbiInit4", "vRetrace", "backPorch", "videoDimensions",
- "fbiInit0", "fbiInit1", "fbiInit2", "fbiInit3",
- "hSync", "vSync", "clutData", "dacData",
- "maxRgbDelta", "{hBorder}", "{vBorder}", "{borderColor}",
- /* 0x240 */
- "{hvRetrace}", "{fbiInit5}", "{fbiInit6}", "{fbiInit7}",
- "reserved250", "reserved254", "{fbiSwapHistory}","{fbiTrianglesOut}",
- "{sSetupMode}", "{sVx}", "{sVy}", "{sARGB}",
- "{sRed}", "{sGreen}", "{sBlue}", "{sAlpha}",
- /* 0x280 */
- "{sVz}", "{sWb}", "{sWtmu0}", "{sS/Wtmu0}",
- "{sT/Wtmu0}", "{sWtmu1}", "{sS/Wtmu1}", "{sT/Wtmu1}",
- "{sDrawTriCMD}","{sBeginTriCMD}","reserved2a8", "reserved2ac",
- "reserved2b0", "reserved2b4", "reserved2b8", "reserved2bc",
- /* 0x2c0 */
- "{bltSrcBaseAddr}","{bltDstBaseAddr}","{bltXYStrides}","{bltSrcChromaRange}",
- "{bltDstChromaRange}","{bltClipX}","{bltClipY}","reserved2dc",
- "{bltSrcXY}", "{bltDstXY}", "{bltSize}", "{bltRop}",
- "{bltColor}", "reserved2f4", "{bltCommand}", "{bltData}",
- /* 0x300 */
- "textureMode", "tLOD", "tDetail", "texBaseAddr",
- "texBaseAddr_1","texBaseAddr_2","texBaseAddr_3_8","trexInit0",
- "trexInit1", "nccTable0.0", "nccTable0.1", "nccTable0.2",
- "nccTable0.3", "nccTable0.4", "nccTable0.5", "nccTable0.6",
- /* 0x340 */
- "nccTable0.7", "nccTable0.8", "nccTable0.9", "nccTable0.A",
- "nccTable0.B", "nccTable1.0", "nccTable1.1", "nccTable1.2",
- "nccTable1.3", "nccTable1.4", "nccTable1.5", "nccTable1.6",
- "nccTable1.7", "nccTable1.8", "nccTable1.9", "nccTable1.A",
- /* 0x380 */
- "nccTable1.B"
-};
-
-
-static const char *const banshee_reg_name[] =
-{
- /* 0x000 */
- "status", "intrCtrl", "vertexAx", "vertexAy",
- "vertexBx", "vertexBy", "vertexCx", "vertexCy",
- "startR", "startG", "startB", "startZ",
- "startA", "startS", "startT", "startW",
- /* 0x040 */
- "dRdX", "dGdX", "dBdX", "dZdX",
- "dAdX", "dSdX", "dTdX", "dWdX",
- "dRdY", "dGdY", "dBdY", "dZdY",
- "dAdY", "dSdY", "dTdY", "dWdY",
- /* 0x080 */
- "triangleCMD", "reserved084", "fvertexAx", "fvertexAy",
- "fvertexBx", "fvertexBy", "fvertexCx", "fvertexCy",
- "fstartR", "fstartG", "fstartB", "fstartZ",
- "fstartA", "fstartS", "fstartT", "fstartW",
- /* 0x0c0 */
- "fdRdX", "fdGdX", "fdBdX", "fdZdX",
- "fdAdX", "fdSdX", "fdTdX", "fdWdX",
- "fdRdY", "fdGdY", "fdBdY", "fdZdY",
- "fdAdY", "fdSdY", "fdTdY", "fdWdY",
- /* 0x100 */
- "ftriangleCMD", "fbzColorPath", "fogMode", "alphaMode",
- "fbzMode", "lfbMode", "clipLeftRight","clipLowYHighY",
- "nopCMD", "fastfillCMD", "swapbufferCMD","fogColor",
- "zaColor", "chromaKey", "chromaRange", "userIntrCMD",
- /* 0x140 */
- "stipple", "color0", "color1", "fbiPixelsIn",
- "fbiChromaFail","fbiZfuncFail", "fbiAfuncFail", "fbiPixelsOut",
- "fogTable160", "fogTable164", "fogTable168", "fogTable16c",
- "fogTable170", "fogTable174", "fogTable178", "fogTable17c",
- /* 0x180 */
- "fogTable180", "fogTable184", "fogTable188", "fogTable18c",
- "fogTable190", "fogTable194", "fogTable198", "fogTable19c",
- "fogTable1a0", "fogTable1a4", "fogTable1a8", "fogTable1ac",
- "fogTable1b0", "fogTable1b4", "fogTable1b8", "fogTable1bc",
- /* 0x1c0 */
- "fogTable1c0", "fogTable1c4", "fogTable1c8", "fogTable1cc",
- "fogTable1d0", "fogTable1d4", "fogTable1d8", "fogTable1dc",
- "reserved1e0", "reserved1e4", "reserved1e8", "colBufferAddr",
- "colBufferStride","auxBufferAddr","auxBufferStride","reserved1fc",
- /* 0x200 */
- "clipLeftRight1","clipTopBottom1","reserved208","reserved20c",
- "reserved210", "reserved214", "reserved218", "reserved21c",
- "reserved220", "reserved224", "reserved228", "reserved22c",
- "reserved230", "reserved234", "reserved238", "reserved23c",
- /* 0x240 */
- "reserved240", "reserved244", "reserved248", "swapPending",
- "leftOverlayBuf","rightOverlayBuf","fbiSwapHistory","fbiTrianglesOut",
- "sSetupMode", "sVx", "sVy", "sARGB",
- "sRed", "sGreen", "sBlue", "sAlpha",
- /* 0x280 */
- "sVz", "sWb", "sWtmu0", "sS/Wtmu0",
- "sT/Wtmu0", "sWtmu1", "sS/Wtmu1", "sT/Wtmu1",
- "sDrawTriCMD", "sBeginTriCMD", "reserved2a8", "reserved2ac",
- "reserved2b0", "reserved2b4", "reserved2b8", "reserved2bc",
- /* 0x2c0 */
- "reserved2c0", "reserved2c4", "reserved2c8", "reserved2cc",
- "reserved2d0", "reserved2d4", "reserved2d8", "reserved2dc",
- "reserved2e0", "reserved2e4", "reserved2e8", "reserved2ec",
- "reserved2f0", "reserved2f4", "reserved2f8", "reserved2fc",
- /* 0x300 */
- "textureMode", "tLOD", "tDetail", "texBaseAddr",
- "texBaseAddr_1","texBaseAddr_2","texBaseAddr_3_8","reserved31c",
- "trexInit1", "nccTable0.0", "nccTable0.1", "nccTable0.2",
- "nccTable0.3", "nccTable0.4", "nccTable0.5", "nccTable0.6",
- /* 0x340 */
- "nccTable0.7", "nccTable0.8", "nccTable0.9", "nccTable0.A",
- "nccTable0.B", "nccTable1.0", "nccTable1.1", "nccTable1.2",
- "nccTable1.3", "nccTable1.4", "nccTable1.5", "nccTable1.6",
- "nccTable1.7", "nccTable1.8", "nccTable1.9", "nccTable1.A",
- /* 0x380 */
- "nccTable1.B"
-};
-
-
-
-/*************************************
- *
- * Voodoo Banshee I/O space registers
- *
- *************************************/
-
-/* 0x000 */
-#define io_status (0x000/4) /* */
-#define io_pciInit0 (0x004/4) /* */
-#define io_sipMonitor (0x008/4) /* */
-#define io_lfbMemoryConfig (0x00c/4) /* */
-#define io_miscInit0 (0x010/4) /* */
-#define io_miscInit1 (0x014/4) /* */
-#define io_dramInit0 (0x018/4) /* */
-#define io_dramInit1 (0x01c/4) /* */
-#define io_agpInit (0x020/4) /* */
-#define io_tmuGbeInit (0x024/4) /* */
-#define io_vgaInit0 (0x028/4) /* */
-#define io_vgaInit1 (0x02c/4) /* */
-#define io_dramCommand (0x030/4) /* */
-#define io_dramData (0x034/4) /* */
-
-/* 0x040 */
-#define io_pllCtrl0 (0x040/4) /* */
-#define io_pllCtrl1 (0x044/4) /* */
-#define io_pllCtrl2 (0x048/4) /* */
-#define io_dacMode (0x04c/4) /* */
-#define io_dacAddr (0x050/4) /* */
-#define io_dacData (0x054/4) /* */
-#define io_rgbMaxDelta (0x058/4) /* */
-#define io_vidProcCfg (0x05c/4) /* */
-#define io_hwCurPatAddr (0x060/4) /* */
-#define io_hwCurLoc (0x064/4) /* */
-#define io_hwCurC0 (0x068/4) /* */
-#define io_hwCurC1 (0x06c/4) /* */
-#define io_vidInFormat (0x070/4) /* */
-#define io_vidInStatus (0x074/4) /* */
-#define io_vidSerialParallelPort (0x078/4) /* */
-#define io_vidInXDecimDeltas (0x07c/4) /* */
-
-/* 0x080 */
-#define io_vidInDecimInitErrs (0x080/4) /* */
-#define io_vidInYDecimDeltas (0x084/4) /* */
-#define io_vidPixelBufThold (0x088/4) /* */
-#define io_vidChromaMin (0x08c/4) /* */
-#define io_vidChromaMax (0x090/4) /* */
-#define io_vidCurrentLine (0x094/4) /* */
-#define io_vidScreenSize (0x098/4) /* */
-#define io_vidOverlayStartCoords (0x09c/4) /* */
-#define io_vidOverlayEndScreenCoord (0x0a0/4) /* */
-#define io_vidOverlayDudx (0x0a4/4) /* */
-#define io_vidOverlayDudxOffsetSrcWidth (0x0a8/4) /* */
-#define io_vidOverlayDvdy (0x0ac/4) /* */
-#define io_vgab0 (0x0b0/4) /* */
-#define io_vgab4 (0x0b4/4) /* */
-#define io_vgab8 (0x0b8/4) /* */
-#define io_vgabc (0x0bc/4) /* */
-
-/* 0x0c0 */
-#define io_vgac0 (0x0c0/4) /* */
-#define io_vgac4 (0x0c4/4) /* */
-#define io_vgac8 (0x0c8/4) /* */
-#define io_vgacc (0x0cc/4) /* */
-#define io_vgad0 (0x0d0/4) /* */
-#define io_vgad4 (0x0d4/4) /* */
-#define io_vgad8 (0x0d8/4) /* */
-#define io_vgadc (0x0dc/4) /* */
-#define io_vidOverlayDvdyOffset (0x0e0/4) /* */
-#define io_vidDesktopStartAddr (0x0e4/4) /* */
-#define io_vidDesktopOverlayStride (0x0e8/4) /* */
-#define io_vidInAddr0 (0x0ec/4) /* */
-#define io_vidInAddr1 (0x0f0/4) /* */
-#define io_vidInAddr2 (0x0f4/4) /* */
-#define io_vidInStride (0x0f8/4) /* */
-#define io_vidCurrOverlayStartAddr (0x0fc/4) /* */
-
-
-
-/*************************************
- *
- * Register string table for debug
- *
- *************************************/
-
-static const char *const banshee_io_reg_name[] =
-{
- /* 0x000 */
- "status", "pciInit0", "sipMonitor", "lfbMemoryConfig",
- "miscInit0", "miscInit1", "dramInit0", "dramInit1",
- "agpInit", "tmuGbeInit", "vgaInit0", "vgaInit1",
- "dramCommand", "dramData", "reserved38", "reserved3c",
-
- /* 0x040 */
- "pllCtrl0", "pllCtrl1", "pllCtrl2", "dacMode",
- "dacAddr", "dacData", "rgbMaxDelta", "vidProcCfg",
- "hwCurPatAddr", "hwCurLoc", "hwCurC0", "hwCurC1",
- "vidInFormat", "vidInStatus", "vidSerialParallelPort","vidInXDecimDeltas",
-
- /* 0x080 */
- "vidInDecimInitErrs","vidInYDecimDeltas","vidPixelBufThold","vidChromaMin",
- "vidChromaMax", "vidCurrentLine","vidScreenSize","vidOverlayStartCoords",
- "vidOverlayEndScreenCoord","vidOverlayDudx","vidOverlayDudxOffsetSrcWidth","vidOverlayDvdy",
- "vga[b0]", "vga[b4]", "vga[b8]", "vga[bc]",
-
- /* 0x0c0 */
- "vga[c0]", "vga[c4]", "vga[c8]", "vga[cc]",
- "vga[d0]", "vga[d4]", "vga[d8]", "vga[dc]",
- "vidOverlayDvdyOffset","vidDesktopStartAddr","vidDesktopOverlayStride","vidInAddr0",
- "vidInAddr1", "vidInAddr2", "vidInStride", "vidCurrOverlayStartAddr"
-};
-
-
-
-/*************************************
- *
- * Voodoo Banshee AGP space registers
- *
- *************************************/
-
-/* 0x000 */
-#define agpReqSize (0x000/4) /* */
-#define agpHostAddressLow (0x004/4) /* */
-#define agpHostAddressHigh (0x008/4) /* */
-#define agpGraphicsAddress (0x00c/4) /* */
-#define agpGraphicsStride (0x010/4) /* */
-#define agpMoveCMD (0x014/4) /* */
-#define cmdBaseAddr0 (0x020/4) /* */
-#define cmdBaseSize0 (0x024/4) /* */
-#define cmdBump0 (0x028/4) /* */
-#define cmdRdPtrL0 (0x02c/4) /* */
-#define cmdRdPtrH0 (0x030/4) /* */
-#define cmdAMin0 (0x034/4) /* */
-#define cmdAMax0 (0x03c/4) /* */
-
-/* 0x040 */
-#define cmdFifoDepth0 (0x044/4) /* */
-#define cmdHoleCnt0 (0x048/4) /* */
-#define cmdBaseAddr1 (0x050/4) /* */
-#define cmdBaseSize1 (0x054/4) /* */
-#define cmdBump1 (0x058/4) /* */
-#define cmdRdPtrL1 (0x05c/4) /* */
-#define cmdRdPtrH1 (0x060/4) /* */
-#define cmdAMin1 (0x064/4) /* */
-#define cmdAMax1 (0x06c/4) /* */
-#define cmdFifoDepth1 (0x074/4) /* */
-#define cmdHoleCnt1 (0x078/4) /* */
-
-/* 0x080 */
-#define cmdFifoThresh (0x080/4) /* */
-#define cmdHoleInt (0x084/4) /* */
-
-/* 0x100 */
-#define yuvBaseAddress (0x100/4) /* */
-#define yuvStride (0x104/4) /* */
-#define crc1 (0x120/4) /* */
-#define crc2 (0x130/4) /* */
-
-
-
-/*************************************
- *
- * Register string table for debug
- *
- *************************************/
-
-static const char *const banshee_agp_reg_name[] =
-{
- /* 0x000 */
- "agpReqSize", "agpHostAddressLow","agpHostAddressHigh","agpGraphicsAddress",
- "agpGraphicsStride","agpMoveCMD","reserved18", "reserved1c",
- "cmdBaseAddr0", "cmdBaseSize0", "cmdBump0", "cmdRdPtrL0",
- "cmdRdPtrH0", "cmdAMin0", "reserved38", "cmdAMax0",
-
- /* 0x040 */
- "reserved40", "cmdFifoDepth0","cmdHoleCnt0", "reserved4c",
- "cmdBaseAddr1", "cmdBaseSize1", "cmdBump1", "cmdRdPtrL1",
- "cmdRdPtrH1", "cmdAMin1", "reserved68", "cmdAMax1",
- "reserved70", "cmdFifoDepth1","cmdHoleCnt1", "reserved7c",
-
- /* 0x080 */
- "cmdFifoThresh","cmdHoleInt", "reserved88", "reserved8c",
- "reserved90", "reserved94", "reserved98", "reserved9c",
- "reserveda0", "reserveda4", "reserveda8", "reservedac",
- "reservedb0", "reservedb4", "reservedb8", "reservedbc",
-
- /* 0x0c0 */
- "reservedc0", "reservedc4", "reservedc8", "reservedcc",
- "reservedd0", "reservedd4", "reservedd8", "reserveddc",
- "reservede0", "reservede4", "reservede8", "reservedec",
- "reservedf0", "reservedf4", "reservedf8", "reservedfc",
-
- /* 0x100 */
- "yuvBaseAddress","yuvStride", "reserved108", "reserved10c",
- "reserved110", "reserved114", "reserved118", "reserved11c",
- "crc1", "reserved124", "reserved128", "reserved12c",
- "crc2", "reserved134", "reserved138", "reserved13c"
-};
-
-
-
-/*************************************
- *
- * Dithering tables
- *
- *************************************/
-
-static const UINT8 dither_matrix_4x4[16] =
-{
- 0, 8, 2, 10,
- 12, 4, 14, 6,
- 3, 11, 1, 9,
- 15, 7, 13, 5
-};
-
-static const UINT8 dither_matrix_2x2[16] =
-{
- 2, 10, 2, 10,
- 14, 6, 14, 6,
- 2, 10, 2, 10,
- 14, 6, 14, 6
-};
-
-
-
-/*************************************
- *
- * Macros for extracting pixels
- *
- *************************************/
-
-#define EXTRACT_565_TO_888(val, a, b, c) \
- (a) = (((val) >> 8) & 0xf8) | (((val) >> 13) & 0x07); \
- (b) = (((val) >> 3) & 0xfc) | (((val) >> 9) & 0x03); \
- (c) = (((val) << 3) & 0xf8) | (((val) >> 2) & 0x07);
-#define EXTRACT_x555_TO_888(val, a, b, c) \
- (a) = (((val) >> 7) & 0xf8) | (((val) >> 12) & 0x07); \
- (b) = (((val) >> 2) & 0xf8) | (((val) >> 7) & 0x07); \
- (c) = (((val) << 3) & 0xf8) | (((val) >> 2) & 0x07);
-#define EXTRACT_555x_TO_888(val, a, b, c) \
- (a) = (((val) >> 8) & 0xf8) | (((val) >> 13) & 0x07); \
- (b) = (((val) >> 3) & 0xf8) | (((val) >> 8) & 0x07); \
- (c) = (((val) << 2) & 0xf8) | (((val) >> 3) & 0x07);
-#define EXTRACT_1555_TO_8888(val, a, b, c, d) \
- (a) = ((INT16)(val) >> 15) & 0xff; \
- EXTRACT_x555_TO_888(val, b, c, d)
-#define EXTRACT_5551_TO_8888(val, a, b, c, d) \
- EXTRACT_555x_TO_888(val, a, b, c) \
- (d) = ((val) & 0x0001) ? 0xff : 0x00;
-#define EXTRACT_x888_TO_888(val, a, b, c) \
- (a) = ((val) >> 16) & 0xff; \
- (b) = ((val) >> 8) & 0xff; \
- (c) = ((val) >> 0) & 0xff;
-#define EXTRACT_888x_TO_888(val, a, b, c) \
- (a) = ((val) >> 24) & 0xff; \
- (b) = ((val) >> 16) & 0xff; \
- (c) = ((val) >> 8) & 0xff;
-#define EXTRACT_8888_TO_8888(val, a, b, c, d) \
- (a) = ((val) >> 24) & 0xff; \
- (b) = ((val) >> 16) & 0xff; \
- (c) = ((val) >> 8) & 0xff; \
- (d) = ((val) >> 0) & 0xff;
-#define EXTRACT_4444_TO_8888(val, a, b, c, d) \
- (a) = (((val) >> 8) & 0xf0) | (((val) >> 12) & 0x0f); \
- (b) = (((val) >> 4) & 0xf0) | (((val) >> 8) & 0x0f); \
- (c) = (((val) >> 0) & 0xf0) | (((val) >> 4) & 0x0f); \
- (d) = (((val) << 4) & 0xf0) | (((val) >> 0) & 0x0f);
-#define EXTRACT_332_TO_888(val, a, b, c) \
- (a) = (((val) >> 0) & 0xe0) | (((val) >> 3) & 0x1c) | (((val) >> 6) & 0x03); \
- (b) = (((val) << 3) & 0xe0) | (((val) >> 0) & 0x1c) | (((val) >> 3) & 0x03); \
- (c) = (((val) << 6) & 0xc0) | (((val) << 4) & 0x30) | (((val) << 2) & 0x0c) | (((val) << 0) & 0x03);
-
-
-/*************************************
- *
- * Misc. macros
- *
- *************************************/
-
-/* macro for clamping a value between minimum and maximum values */
-#define CLAMP(val,min,max) do { if ((val) < (min)) { (val) = (min); } else if ((val) > (max)) { (val) = (max); } } while (0)
-
-/* macro to compute the base 2 log for LOD calculations */
-#define LOGB2(x) (log((double)(x)) / log(2.0))
-
-
-
-/*************************************
- *
- * Macros for extracting bitfields
- *
- *************************************/
-
-#define INITEN_ENABLE_HW_INIT(val) (((val) >> 0) & 1)
-#define INITEN_ENABLE_PCI_FIFO(val) (((val) >> 1) & 1)
-#define INITEN_REMAP_INIT_TO_DAC(val) (((val) >> 2) & 1)
-#define INITEN_ENABLE_SNOOP0(val) (((val) >> 4) & 1)
-#define INITEN_SNOOP0_MEMORY_MATCH(val) (((val) >> 5) & 1)
-#define INITEN_SNOOP0_READWRITE_MATCH(val) (((val) >> 6) & 1)
-#define INITEN_ENABLE_SNOOP1(val) (((val) >> 7) & 1)
-#define INITEN_SNOOP1_MEMORY_MATCH(val) (((val) >> 8) & 1)
-#define INITEN_SNOOP1_READWRITE_MATCH(val) (((val) >> 9) & 1)
-#define INITEN_SLI_BUS_OWNER(val) (((val) >> 10) & 1)
-#define INITEN_SLI_ODD_EVEN(val) (((val) >> 11) & 1)
-#define INITEN_SECONDARY_REV_ID(val) (((val) >> 12) & 0xf) /* voodoo 2 only */
-#define INITEN_MFCTR_FAB_ID(val) (((val) >> 16) & 0xf) /* voodoo 2 only */
-#define INITEN_ENABLE_PCI_INTERRUPT(val) (((val) >> 20) & 1) /* voodoo 2 only */
-#define INITEN_PCI_INTERRUPT_TIMEOUT(val) (((val) >> 21) & 1) /* voodoo 2 only */
-#define INITEN_ENABLE_NAND_TREE_TEST(val) (((val) >> 22) & 1) /* voodoo 2 only */
-#define INITEN_ENABLE_SLI_ADDRESS_SNOOP(val) (((val) >> 23) & 1) /* voodoo 2 only */
-#define INITEN_SLI_SNOOP_ADDRESS(val) (((val) >> 24) & 0xff) /* voodoo 2 only */
-
-#define FBZCP_CC_RGBSELECT(val) (((val) >> 0) & 3)
-#define FBZCP_CC_ASELECT(val) (((val) >> 2) & 3)
-#define FBZCP_CC_LOCALSELECT(val) (((val) >> 4) & 1)
-#define FBZCP_CCA_LOCALSELECT(val) (((val) >> 5) & 3)
-#define FBZCP_CC_LOCALSELECT_OVERRIDE(val) (((val) >> 7) & 1)
-#define FBZCP_CC_ZERO_OTHER(val) (((val) >> 8) & 1)
-#define FBZCP_CC_SUB_CLOCAL(val) (((val) >> 9) & 1)
-#define FBZCP_CC_MSELECT(val) (((val) >> 10) & 7)
-#define FBZCP_CC_REVERSE_BLEND(val) (((val) >> 13) & 1)
-#define FBZCP_CC_ADD_ACLOCAL(val) (((val) >> 14) & 3)
-#define FBZCP_CC_INVERT_OUTPUT(val) (((val) >> 16) & 1)
-#define FBZCP_CCA_ZERO_OTHER(val) (((val) >> 17) & 1)
-#define FBZCP_CCA_SUB_CLOCAL(val) (((val) >> 18) & 1)
-#define FBZCP_CCA_MSELECT(val) (((val) >> 19) & 7)
-#define FBZCP_CCA_REVERSE_BLEND(val) (((val) >> 22) & 1)
-#define FBZCP_CCA_ADD_ACLOCAL(val) (((val) >> 23) & 3)
-#define FBZCP_CCA_INVERT_OUTPUT(val) (((val) >> 25) & 1)
-#define FBZCP_CCA_SUBPIXEL_ADJUST(val) (((val) >> 26) & 1)
-#define FBZCP_TEXTURE_ENABLE(val) (((val) >> 27) & 1)
-#define FBZCP_RGBZW_CLAMP(val) (((val) >> 28) & 1) /* voodoo 2 only */
-#define FBZCP_ANTI_ALIAS(val) (((val) >> 29) & 1) /* voodoo 2 only */
-
-#define ALPHAMODE_ALPHATEST(val) (((val) >> 0) & 1)
-#define ALPHAMODE_ALPHAFUNCTION(val) (((val) >> 1) & 7)
-#define ALPHAMODE_ALPHABLEND(val) (((val) >> 4) & 1)
-#define ALPHAMODE_ANTIALIAS(val) (((val) >> 5) & 1)
-#define ALPHAMODE_SRCRGBBLEND(val) (((val) >> 8) & 15)
-#define ALPHAMODE_DSTRGBBLEND(val) (((val) >> 12) & 15)
-#define ALPHAMODE_SRCALPHABLEND(val) (((val) >> 16) & 15)
-#define ALPHAMODE_DSTALPHABLEND(val) (((val) >> 20) & 15)
-#define ALPHAMODE_ALPHAREF(val) (((val) >> 24) & 0xff)
-
-#define FOGMODE_ENABLE_FOG(val) (((val) >> 0) & 1)
-#define FOGMODE_FOG_ADD(val) (((val) >> 1) & 1)
-#define FOGMODE_FOG_MULT(val) (((val) >> 2) & 1)
-#define FOGMODE_FOG_ZALPHA(val) (((val) >> 3) & 3)
-#define FOGMODE_FOG_CONSTANT(val) (((val) >> 5) & 1)
-#define FOGMODE_FOG_DITHER(val) (((val) >> 6) & 1) /* voodoo 2 only */
-#define FOGMODE_FOG_ZONES(val) (((val) >> 7) & 1) /* voodoo 2 only */
-
-#define FBZMODE_ENABLE_CLIPPING(val) (((val) >> 0) & 1)
-#define FBZMODE_ENABLE_CHROMAKEY(val) (((val) >> 1) & 1)
-#define FBZMODE_ENABLE_STIPPLE(val) (((val) >> 2) & 1)
-#define FBZMODE_WBUFFER_SELECT(val) (((val) >> 3) & 1)
-#define FBZMODE_ENABLE_DEPTHBUF(val) (((val) >> 4) & 1)
-#define FBZMODE_DEPTH_FUNCTION(val) (((val) >> 5) & 7)
-#define FBZMODE_ENABLE_DITHERING(val) (((val) >> 8) & 1)
-#define FBZMODE_RGB_BUFFER_MASK(val) (((val) >> 9) & 1)
-#define FBZMODE_AUX_BUFFER_MASK(val) (((val) >> 10) & 1)
-#define FBZMODE_DITHER_TYPE(val) (((val) >> 11) & 1)
-#define FBZMODE_STIPPLE_PATTERN(val) (((val) >> 12) & 1)
-#define FBZMODE_ENABLE_ALPHA_MASK(val) (((val) >> 13) & 1)
-#define FBZMODE_DRAW_BUFFER(val) (((val) >> 14) & 3)
-#define FBZMODE_ENABLE_DEPTH_BIAS(val) (((val) >> 16) & 1)
-#define FBZMODE_Y_ORIGIN(val) (((val) >> 17) & 1)
-#define FBZMODE_ENABLE_ALPHA_PLANES(val) (((val) >> 18) & 1)
-#define FBZMODE_ALPHA_DITHER_SUBTRACT(val) (((val) >> 19) & 1)
-#define FBZMODE_DEPTH_SOURCE_COMPARE(val) (((val) >> 20) & 1)
-#define FBZMODE_DEPTH_FLOAT_SELECT(val) (((val) >> 21) & 1) /* voodoo 2 only */
-
-#define LFBMODE_WRITE_FORMAT(val) (((val) >> 0) & 0xf)
-#define LFBMODE_WRITE_BUFFER_SELECT(val) (((val) >> 4) & 3)
-#define LFBMODE_READ_BUFFER_SELECT(val) (((val) >> 6) & 3)
-#define LFBMODE_ENABLE_PIXEL_PIPELINE(val) (((val) >> 8) & 1)
-#define LFBMODE_RGBA_LANES(val) (((val) >> 9) & 3)
-#define LFBMODE_WORD_SWAP_WRITES(val) (((val) >> 11) & 1)
-#define LFBMODE_BYTE_SWIZZLE_WRITES(val) (((val) >> 12) & 1)
-#define LFBMODE_Y_ORIGIN(val) (((val) >> 13) & 1)
-#define LFBMODE_WRITE_W_SELECT(val) (((val) >> 14) & 1)
-#define LFBMODE_WORD_SWAP_READS(val) (((val) >> 15) & 1)
-#define LFBMODE_BYTE_SWIZZLE_READS(val) (((val) >> 16) & 1)
-
-#define CHROMARANGE_BLUE_EXCLUSIVE(val) (((val) >> 24) & 1)
-#define CHROMARANGE_GREEN_EXCLUSIVE(val) (((val) >> 25) & 1)
-#define CHROMARANGE_RED_EXCLUSIVE(val) (((val) >> 26) & 1)
-#define CHROMARANGE_UNION_MODE(val) (((val) >> 27) & 1)
-#define CHROMARANGE_ENABLE(val) (((val) >> 28) & 1)
-
-#define FBIINIT0_VGA_PASSTHRU(val) (((val) >> 0) & 1)
-#define FBIINIT0_GRAPHICS_RESET(val) (((val) >> 1) & 1)
-#define FBIINIT0_FIFO_RESET(val) (((val) >> 2) & 1)
-#define FBIINIT0_SWIZZLE_REG_WRITES(val) (((val) >> 3) & 1)
-#define FBIINIT0_STALL_PCIE_FOR_HWM(val) (((val) >> 4) & 1)
-#define FBIINIT0_PCI_FIFO_LWM(val) (((val) >> 6) & 0x1f)
-#define FBIINIT0_LFB_TO_MEMORY_FIFO(val) (((val) >> 11) & 1)
-#define FBIINIT0_TEXMEM_TO_MEMORY_FIFO(val) (((val) >> 12) & 1)
-#define FBIINIT0_ENABLE_MEMORY_FIFO(val) (((val) >> 13) & 1)
-#define FBIINIT0_MEMORY_FIFO_HWM(val) (((val) >> 14) & 0x7ff)
-#define FBIINIT0_MEMORY_FIFO_BURST(val) (((val) >> 25) & 0x3f)
-
-#define FBIINIT1_PCI_DEV_FUNCTION(val) (((val) >> 0) & 1)
-#define FBIINIT1_PCI_WRITE_WAIT_STATES(val) (((val) >> 1) & 1)
-#define FBIINIT1_MULTI_SST1(val) (((val) >> 2) & 1) /* not on voodoo 2 */
-#define FBIINIT1_ENABLE_LFB(val) (((val) >> 3) & 1)
-#define FBIINIT1_X_VIDEO_TILES(val) (((val) >> 4) & 0xf)
-#define FBIINIT1_VIDEO_TIMING_RESET(val) (((val) >> 8) & 1)
-#define FBIINIT1_SOFTWARE_OVERRIDE(val) (((val) >> 9) & 1)
-#define FBIINIT1_SOFTWARE_HSYNC(val) (((val) >> 10) & 1)
-#define FBIINIT1_SOFTWARE_VSYNC(val) (((val) >> 11) & 1)
-#define FBIINIT1_SOFTWARE_BLANK(val) (((val) >> 12) & 1)
-#define FBIINIT1_DRIVE_VIDEO_TIMING(val) (((val) >> 13) & 1)
-#define FBIINIT1_DRIVE_VIDEO_BLANK(val) (((val) >> 14) & 1)
-#define FBIINIT1_DRIVE_VIDEO_SYNC(val) (((val) >> 15) & 1)
-#define FBIINIT1_DRIVE_VIDEO_DCLK(val) (((val) >> 16) & 1)
-#define FBIINIT1_VIDEO_TIMING_VCLK(val) (((val) >> 17) & 1)
-#define FBIINIT1_VIDEO_CLK_2X_DELAY(val) (((val) >> 18) & 3)
-#define FBIINIT1_VIDEO_TIMING_SOURCE(val) (((val) >> 20) & 3)
-#define FBIINIT1_ENABLE_24BPP_OUTPUT(val) (((val) >> 22) & 1)
-#define FBIINIT1_ENABLE_SLI(val) (((val) >> 23) & 1)
-#define FBIINIT1_X_VIDEO_TILES_BIT5(val) (((val) >> 24) & 1) /* voodoo 2 only */
-#define FBIINIT1_ENABLE_EDGE_FILTER(val) (((val) >> 25) & 1)
-#define FBIINIT1_INVERT_VID_CLK_2X(val) (((val) >> 26) & 1)
-#define FBIINIT1_VID_CLK_2X_SEL_DELAY(val) (((val) >> 27) & 3)
-#define FBIINIT1_VID_CLK_DELAY(val) (((val) >> 29) & 3)
-#define FBIINIT1_DISABLE_FAST_READAHEAD(val) (((val) >> 31) & 1)
-
-#define FBIINIT2_DISABLE_DITHER_SUB(val) (((val) >> 0) & 1)
-#define FBIINIT2_DRAM_BANKING(val) (((val) >> 1) & 1)
-#define FBIINIT2_ENABLE_TRIPLE_BUF(val) (((val) >> 4) & 1)
-#define FBIINIT2_ENABLE_FAST_RAS_READ(val) (((val) >> 5) & 1)
-#define FBIINIT2_ENABLE_GEN_DRAM_OE(val) (((val) >> 6) & 1)
-#define FBIINIT2_ENABLE_FAST_READWRITE(val) (((val) >> 7) & 1)
-#define FBIINIT2_ENABLE_PASSTHRU_DITHER(val) (((val) >> 8) & 1)
-#define FBIINIT2_SWAP_BUFFER_ALGORITHM(val) (((val) >> 9) & 3)
-#define FBIINIT2_VIDEO_BUFFER_OFFSET(val) (((val) >> 11) & 0x1ff)
-#define FBIINIT2_ENABLE_DRAM_BANKING(val) (((val) >> 20) & 1)
-#define FBIINIT2_ENABLE_DRAM_READ_FIFO(val) (((val) >> 21) & 1)
-#define FBIINIT2_ENABLE_DRAM_REFRESH(val) (((val) >> 22) & 1)
-#define FBIINIT2_REFRESH_LOAD_VALUE(val) (((val) >> 23) & 0x1ff)
-
-#define FBIINIT3_TRI_REGISTER_REMAP(val) (((val) >> 0) & 1)
-#define FBIINIT3_VIDEO_FIFO_THRESH(val) (((val) >> 1) & 0x1f)
-#define FBIINIT3_DISABLE_TMUS(val) (((val) >> 6) & 1)
-#define FBIINIT3_FBI_MEMORY_TYPE(val) (((val) >> 8) & 7)
-#define FBIINIT3_VGA_PASS_RESET_VAL(val) (((val) >> 11) & 1)
-#define FBIINIT3_HARDCODE_PCI_BASE(val) (((val) >> 12) & 1)
-#define FBIINIT3_FBI2TREX_DELAY(val) (((val) >> 13) & 0xf)
-#define FBIINIT3_TREX2FBI_DELAY(val) (((val) >> 17) & 0x1f)
-#define FBIINIT3_YORIGIN_SUBTRACT(val) (((val) >> 22) & 0x3ff)
-
-#define FBIINIT4_PCI_READ_WAITS(val) (((val) >> 0) & 1)
-#define FBIINIT4_ENABLE_LFB_READAHEAD(val) (((val) >> 1) & 1)
-#define FBIINIT4_MEMORY_FIFO_LWM(val) (((val) >> 2) & 0x3f)
-#define FBIINIT4_MEMORY_FIFO_START_ROW(val) (((val) >> 8) & 0x3ff)
-#define FBIINIT4_MEMORY_FIFO_STOP_ROW(val) (((val) >> 18) & 0x3ff)
-#define FBIINIT4_VIDEO_CLOCKING_DELAY(val) (((val) >> 29) & 7) /* voodoo 2 only */
-
-#define FBIINIT5_DISABLE_PCI_STOP(val) (((val) >> 0) & 1) /* voodoo 2 only */
-#define FBIINIT5_PCI_SLAVE_SPEED(val) (((val) >> 1) & 1) /* voodoo 2 only */
-#define FBIINIT5_DAC_DATA_OUTPUT_WIDTH(val) (((val) >> 2) & 1) /* voodoo 2 only */
-#define FBIINIT5_DAC_DATA_17_OUTPUT(val) (((val) >> 3) & 1) /* voodoo 2 only */
-#define FBIINIT5_DAC_DATA_18_OUTPUT(val) (((val) >> 4) & 1) /* voodoo 2 only */
-#define FBIINIT5_GENERIC_STRAPPING(val) (((val) >> 5) & 0xf) /* voodoo 2 only */
-#define FBIINIT5_BUFFER_ALLOCATION(val) (((val) >> 9) & 3) /* voodoo 2 only */
-#define FBIINIT5_DRIVE_VID_CLK_SLAVE(val) (((val) >> 11) & 1) /* voodoo 2 only */
-#define FBIINIT5_DRIVE_DAC_DATA_16(val) (((val) >> 12) & 1) /* voodoo 2 only */
-#define FBIINIT5_VCLK_INPUT_SELECT(val) (((val) >> 13) & 1) /* voodoo 2 only */
-#define FBIINIT5_MULTI_CVG_DETECT(val) (((val) >> 14) & 1) /* voodoo 2 only */
-#define FBIINIT5_SYNC_RETRACE_READS(val) (((val) >> 15) & 1) /* voodoo 2 only */
-#define FBIINIT5_ENABLE_RHBORDER_COLOR(val) (((val) >> 16) & 1) /* voodoo 2 only */
-#define FBIINIT5_ENABLE_LHBORDER_COLOR(val) (((val) >> 17) & 1) /* voodoo 2 only */
-#define FBIINIT5_ENABLE_BVBORDER_COLOR(val) (((val) >> 18) & 1) /* voodoo 2 only */
-#define FBIINIT5_ENABLE_TVBORDER_COLOR(val) (((val) >> 19) & 1) /* voodoo 2 only */
-#define FBIINIT5_DOUBLE_HORIZ(val) (((val) >> 20) & 1) /* voodoo 2 only */
-#define FBIINIT5_DOUBLE_VERT(val) (((val) >> 21) & 1) /* voodoo 2 only */
-#define FBIINIT5_ENABLE_16BIT_GAMMA(val) (((val) >> 22) & 1) /* voodoo 2 only */
-#define FBIINIT5_INVERT_DAC_HSYNC(val) (((val) >> 23) & 1) /* voodoo 2 only */
-#define FBIINIT5_INVERT_DAC_VSYNC(val) (((val) >> 24) & 1) /* voodoo 2 only */
-#define FBIINIT5_ENABLE_24BIT_DACDATA(val) (((val) >> 25) & 1) /* voodoo 2 only */
-#define FBIINIT5_ENABLE_INTERLACING(val) (((val) >> 26) & 1) /* voodoo 2 only */
-#define FBIINIT5_DAC_DATA_18_CONTROL(val) (((val) >> 27) & 1) /* voodoo 2 only */
-#define FBIINIT5_RASTERIZER_UNIT_MODE(val) (((val) >> 30) & 3) /* voodoo 2 only */
-
-#define FBIINIT6_WINDOW_ACTIVE_COUNTER(val) (((val) >> 0) & 7) /* voodoo 2 only */
-#define FBIINIT6_WINDOW_DRAG_COUNTER(val) (((val) >> 3) & 0x1f) /* voodoo 2 only */
-#define FBIINIT6_SLI_SYNC_MASTER(val) (((val) >> 8) & 1) /* voodoo 2 only */
-#define FBIINIT6_DAC_DATA_22_OUTPUT(val) (((val) >> 9) & 3) /* voodoo 2 only */
-#define FBIINIT6_DAC_DATA_23_OUTPUT(val) (((val) >> 11) & 3) /* voodoo 2 only */
-#define FBIINIT6_SLI_SYNCIN_OUTPUT(val) (((val) >> 13) & 3) /* voodoo 2 only */
-#define FBIINIT6_SLI_SYNCOUT_OUTPUT(val) (((val) >> 15) & 3) /* voodoo 2 only */
-#define FBIINIT6_DAC_RD_OUTPUT(val) (((val) >> 17) & 3) /* voodoo 2 only */
-#define FBIINIT6_DAC_WR_OUTPUT(val) (((val) >> 19) & 3) /* voodoo 2 only */
-#define FBIINIT6_PCI_FIFO_LWM_RDY(val) (((val) >> 21) & 0x7f) /* voodoo 2 only */
-#define FBIINIT6_VGA_PASS_N_OUTPUT(val) (((val) >> 28) & 3) /* voodoo 2 only */
-#define FBIINIT6_X_VIDEO_TILES_BIT0(val) (((val) >> 30) & 1) /* voodoo 2 only */
-
-#define FBIINIT7_GENERIC_STRAPPING(val) (((val) >> 0) & 0xff) /* voodoo 2 only */
-#define FBIINIT7_CMDFIFO_ENABLE(val) (((val) >> 8) & 1) /* voodoo 2 only */
-#define FBIINIT7_CMDFIFO_MEMORY_STORE(val) (((val) >> 9) & 1) /* voodoo 2 only */
-#define FBIINIT7_DISABLE_CMDFIFO_HOLES(val) (((val) >> 10) & 1) /* voodoo 2 only */
-#define FBIINIT7_CMDFIFO_READ_THRESH(val) (((val) >> 11) & 0x1f) /* voodoo 2 only */
-#define FBIINIT7_SYNC_CMDFIFO_WRITES(val) (((val) >> 16) & 1) /* voodoo 2 only */
-#define FBIINIT7_SYNC_CMDFIFO_READS(val) (((val) >> 17) & 1) /* voodoo 2 only */
-#define FBIINIT7_RESET_PCI_PACKER(val) (((val) >> 18) & 1) /* voodoo 2 only */
-#define FBIINIT7_ENABLE_CHROMA_STUFF(val) (((val) >> 19) & 1) /* voodoo 2 only */
-#define FBIINIT7_CMDFIFO_PCI_TIMEOUT(val) (((val) >> 20) & 0x7f) /* voodoo 2 only */
-#define FBIINIT7_ENABLE_TEXTURE_BURST(val) (((val) >> 27) & 1) /* voodoo 2 only */
-
-#define TEXMODE_ENABLE_PERSPECTIVE(val) (((val) >> 0) & 1)
-#define TEXMODE_MINIFICATION_FILTER(val) (((val) >> 1) & 1)
-#define TEXMODE_MAGNIFICATION_FILTER(val) (((val) >> 2) & 1)
-#define TEXMODE_CLAMP_NEG_W(val) (((val) >> 3) & 1)
-#define TEXMODE_ENABLE_LOD_DITHER(val) (((val) >> 4) & 1)
-#define TEXMODE_NCC_TABLE_SELECT(val) (((val) >> 5) & 1)
-#define TEXMODE_CLAMP_S(val) (((val) >> 6) & 1)
-#define TEXMODE_CLAMP_T(val) (((val) >> 7) & 1)
-#define TEXMODE_FORMAT(val) (((val) >> 8) & 0xf)
-#define TEXMODE_TC_ZERO_OTHER(val) (((val) >> 12) & 1)
-#define TEXMODE_TC_SUB_CLOCAL(val) (((val) >> 13) & 1)
-#define TEXMODE_TC_MSELECT(val) (((val) >> 14) & 7)
-#define TEXMODE_TC_REVERSE_BLEND(val) (((val) >> 17) & 1)
-#define TEXMODE_TC_ADD_ACLOCAL(val) (((val) >> 18) & 3)
-#define TEXMODE_TC_INVERT_OUTPUT(val) (((val) >> 20) & 1)
-#define TEXMODE_TCA_ZERO_OTHER(val) (((val) >> 21) & 1)
-#define TEXMODE_TCA_SUB_CLOCAL(val) (((val) >> 22) & 1)
-#define TEXMODE_TCA_MSELECT(val) (((val) >> 23) & 7)
-#define TEXMODE_TCA_REVERSE_BLEND(val) (((val) >> 26) & 1)
-#define TEXMODE_TCA_ADD_ACLOCAL(val) (((val) >> 27) & 3)
-#define TEXMODE_TCA_INVERT_OUTPUT(val) (((val) >> 29) & 1)
-#define TEXMODE_TRILINEAR(val) (((val) >> 30) & 1)
-#define TEXMODE_SEQ_8_DOWNLD(val) (((val) >> 31) & 1)
-
-#define TEXLOD_LODMIN(val) (((val) >> 0) & 0x3f)
-#define TEXLOD_LODMAX(val) (((val) >> 6) & 0x3f)
-#define TEXLOD_LODBIAS(val) (((val) >> 12) & 0x3f)
-#define TEXLOD_LOD_ODD(val) (((val) >> 18) & 1)
-#define TEXLOD_LOD_TSPLIT(val) (((val) >> 19) & 1)
-#define TEXLOD_LOD_S_IS_WIDER(val) (((val) >> 20) & 1)
-#define TEXLOD_LOD_ASPECT(val) (((val) >> 21) & 3)
-#define TEXLOD_LOD_ZEROFRAC(val) (((val) >> 23) & 1)
-#define TEXLOD_TMULTIBASEADDR(val) (((val) >> 24) & 1)
-#define TEXLOD_TDATA_SWIZZLE(val) (((val) >> 25) & 1)
-#define TEXLOD_TDATA_SWAP(val) (((val) >> 26) & 1)
-#define TEXLOD_TDIRECT_WRITE(val) (((val) >> 27) & 1) /* Voodoo 2 only */
-
-#define TEXDETAIL_DETAIL_MAX(val) (((val) >> 0) & 0xff)
-#define TEXDETAIL_DETAIL_BIAS(val) (((val) >> 8) & 0x3f)
-#define TEXDETAIL_DETAIL_SCALE(val) (((val) >> 14) & 7)
-#define TEXDETAIL_RGB_MIN_FILTER(val) (((val) >> 17) & 1) /* Voodoo 2 only */
-#define TEXDETAIL_RGB_MAG_FILTER(val) (((val) >> 18) & 1) /* Voodoo 2 only */
-#define TEXDETAIL_ALPHA_MIN_FILTER(val) (((val) >> 19) & 1) /* Voodoo 2 only */
-#define TEXDETAIL_ALPHA_MAG_FILTER(val) (((val) >> 20) & 1) /* Voodoo 2 only */
-#define TEXDETAIL_SEPARATE_RGBA_FILTER(val) (((val) >> 21) & 1) /* Voodoo 2 only */
-
-#define TREXINIT_SEND_TMU_CONFIG(val) (((val) >> 18) & 1)
-
-
-
-struct voodoo_state;
-struct poly_extra_data;
-class voodoo_device;
-
-struct rgba
-{
-#ifdef LSB_FIRST
- UINT8 b, g, r, a;
-#else
- UINT8 a, r, g, b;
-#endif
-};
-
-
-union voodoo_reg
-{
- INT32 i;
- UINT32 u;
- float f;
- rgba rgb;
-};
-
-
-
-struct voodoo_stats
-{
- UINT8 lastkey; /* last key state */
- UINT8 display; /* display stats? */
- INT32 swaps; /* total swaps */
- INT32 stalls; /* total stalls */
- INT32 total_triangles; /* total triangles */
- INT32 total_pixels_in; /* total pixels in */
- INT32 total_pixels_out; /* total pixels out */
- INT32 total_chroma_fail; /* total chroma fail */
- INT32 total_zfunc_fail; /* total z func fail */
- INT32 total_afunc_fail; /* total a func fail */
- INT32 total_clipped; /* total clipped */
- INT32 total_stippled; /* total stippled */
- INT32 lfb_writes; /* LFB writes */
- INT32 lfb_reads; /* LFB reads */
- INT32 reg_writes; /* register writes */
- INT32 reg_reads; /* register reads */
- INT32 tex_writes; /* texture writes */
- INT32 texture_mode[16]; /* 16 different texture modes */
- UINT8 render_override; /* render override */
- char buffer[1024]; /* string */
-};
-
-
-/* note that this structure is an even 64 bytes long */
-struct stats_block
-{
- INT32 pixels_in; /* pixels in statistic */
- INT32 pixels_out; /* pixels out statistic */
- INT32 chroma_fail; /* chroma test fail statistic */
- INT32 zfunc_fail; /* z function test fail statistic */
- INT32 afunc_fail; /* alpha function test fail statistic */
- INT32 clip_fail; /* clipping fail statistic */
- INT32 stipple_count; /* stipple statistic */
- INT32 filler[64/4 - 7]; /* pad this structure to 64 bytes */
-};
-
-
-struct fifo_state
-{
- UINT32 * base; /* base of the FIFO */
- INT32 size; /* size of the FIFO */
- INT32 in; /* input pointer */
- INT32 out; /* output pointer */
-};
-
-
-struct cmdfifo_info
-{
- UINT8 enable; /* enabled? */
- UINT8 count_holes; /* count holes? */
- UINT32 base; /* base address in framebuffer RAM */
- UINT32 end; /* end address in framebuffer RAM */
- UINT32 rdptr; /* current read pointer */
- UINT32 amin; /* minimum address */
- UINT32 amax; /* maximum address */
- UINT32 depth; /* current depth */
- UINT32 holes; /* number of holes */
-};
-
-
-struct pci_state
-{
- fifo_state fifo; /* PCI FIFO */
- UINT32 init_enable; /* initEnable value */
- UINT8 stall_state; /* state of the system if we're stalled */
- UINT8 op_pending; /* true if an operation is pending */
- attotime op_end_time; /* time when the pending operation ends */
- emu_timer * continue_timer; /* timer to use to continue processing */
- UINT32 fifo_mem[64*2]; /* memory backing the PCI FIFO */
-};
-
-
-struct ncc_table
-{
- UINT8 dirty; /* is the texel lookup dirty? */
- voodoo_reg * reg; /* pointer to our registers */
- INT32 ir[4], ig[4], ib[4]; /* I values for R,G,B */
- INT32 qr[4], qg[4], qb[4]; /* Q values for R,G,B */
- INT32 y[16]; /* Y values */
- rgb_t * palette; /* pointer to associated RGB palette */
- rgb_t * palettea; /* pointer to associated ARGB palette */
- rgb_t texel[256]; /* texel lookup */
-};
-
-
-struct tmu_state
-{
- UINT8 * ram; /* pointer to our RAM */
- UINT32 mask; /* mask to apply to pointers */
- voodoo_reg * reg; /* pointer to our register base */
- UINT32 regdirty; /* true if the LOD/mode/base registers have changed */
-
- UINT32 texaddr_mask; /* mask for texture address */
- UINT8 texaddr_shift; /* shift for texture address */
-
- INT64 starts, startt; /* starting S,T (14.18) */
- INT64 startw; /* starting W (2.30) */
- INT64 dsdx, dtdx; /* delta S,T per X */
- INT64 dwdx; /* delta W per X */
- INT64 dsdy, dtdy; /* delta S,T per Y */
- INT64 dwdy; /* delta W per Y */
-
- INT32 lodmin, lodmax; /* min, max LOD values */
- INT32 lodbias; /* LOD bias */
- UINT32 lodmask; /* mask of available LODs */
- UINT32 lodoffset[9]; /* offset of texture base for each LOD */
- INT32 detailmax; /* detail clamp */
- INT32 detailbias; /* detail bias */
- UINT8 detailscale; /* detail scale */
-
- UINT32 wmask; /* mask for the current texture width */
- UINT32 hmask; /* mask for the current texture height */
-
- UINT32 bilinear_mask; /* mask for bilinear resolution (0xf0 for V1, 0xff for V2) */
-
- ncc_table ncc[2]; /* two NCC tables */
-
- rgb_t * lookup; /* currently selected lookup */
- rgb_t * texel[16]; /* texel lookups for each format */
-
- rgb_t palette[256]; /* palette lookup table */
- rgb_t palettea[256]; /* palette+alpha lookup table */
-};
-
-
-struct tmu_shared_state
-{
- rgb_t rgb332[256]; /* RGB 3-3-2 lookup table */
- rgb_t alpha8[256]; /* alpha 8-bit lookup table */
- rgb_t int8[256]; /* intensity 8-bit lookup table */
- rgb_t ai44[256]; /* alpha, intensity 4-4 lookup table */
-
- rgb_t rgb565[65536]; /* RGB 5-6-5 lookup table */
- rgb_t argb1555[65536]; /* ARGB 1-5-5-5 lookup table */
- rgb_t argb4444[65536]; /* ARGB 4-4-4-4 lookup table */
-};
-
-
-struct setup_vertex
-{
- float x, y; /* X, Y coordinates */
- float a, r, g, b; /* A, R, G, B values */
- float z, wb; /* Z and broadcast W values */
- float w0, s0, t0; /* W, S, T for TMU 0 */
- float w1, s1, t1; /* W, S, T for TMU 1 */
-};
-
-
-struct fbi_state
-{
- UINT8 * ram; /* pointer to frame buffer RAM */
- UINT32 mask; /* mask to apply to pointers */
- UINT32 rgboffs[3]; /* word offset to 3 RGB buffers */
- UINT32 auxoffs; /* word offset to 1 aux buffer */
-
- UINT8 frontbuf; /* front buffer index */
- UINT8 backbuf; /* back buffer index */
- UINT8 swaps_pending; /* number of pending swaps */
- UINT8 video_changed; /* did the frontbuffer video change? */
-
- UINT32 yorigin; /* Y origin subtract value */
- UINT32 lfb_base; /* base of LFB in memory */
- UINT8 lfb_stride; /* stride of LFB accesses in bits */
-
- UINT32 width; /* width of current frame buffer */
- UINT32 height; /* height of current frame buffer */
- UINT32 xoffs; /* horizontal offset (back porch) */
- UINT32 yoffs; /* vertical offset (back porch) */
- UINT32 vsyncscan; /* vertical sync scanline */
- UINT32 rowpixels; /* pixels per row */
- UINT32 tile_width; /* width of video tiles */
- UINT32 tile_height; /* height of video tiles */
- UINT32 x_tiles; /* number of tiles in the X direction */
-
- emu_timer * vblank_timer; /* VBLANK timer */
- UINT8 vblank; /* VBLANK state */
- UINT8 vblank_count; /* number of VBLANKs since last swap */
- UINT8 vblank_swap_pending; /* a swap is pending, waiting for a vblank */
- UINT8 vblank_swap; /* swap when we hit this count */
- UINT8 vblank_dont_swap; /* don't actually swap when we hit this point */
-
- /* triangle setup info */
- UINT8 cheating_allowed; /* allow cheating? */
- INT32 sign; /* triangle sign */
- INT16 ax, ay; /* vertex A x,y (12.4) */
- INT16 bx, by; /* vertex B x,y (12.4) */
- INT16 cx, cy; /* vertex C x,y (12.4) */
- INT32 startr, startg, startb, starta; /* starting R,G,B,A (12.12) */
- INT32 startz; /* starting Z (20.12) */
- INT64 startw; /* starting W (16.32) */
- INT32 drdx, dgdx, dbdx, dadx; /* delta R,G,B,A per X */
- INT32 dzdx; /* delta Z per X */
- INT64 dwdx; /* delta W per X */
- INT32 drdy, dgdy, dbdy, dady; /* delta R,G,B,A per Y */
- INT32 dzdy; /* delta Z per Y */
- INT64 dwdy; /* delta W per Y */
-
- stats_block lfb_stats; /* LFB-access statistics */
-
- UINT8 sverts; /* number of vertices ready */
- setup_vertex svert[3]; /* 3 setup vertices */
-
- fifo_state fifo; /* framebuffer memory fifo */
- cmdfifo_info cmdfifo[2]; /* command FIFOs */
-
- UINT8 fogblend[64]; /* 64-entry fog table */
- UINT8 fogdelta[64]; /* 64-entry fog table */
- UINT8 fogdelta_mask; /* mask for for delta (0xff for V1, 0xfc for V2) */
-
- rgb_t pen[65536]; /* mapping from pixels to pens */
- rgb_t clut[512]; /* clut gamma data */
- UINT8 clut_dirty; /* do we need to recompute? */
-};
-
-
-struct dac_state
-{
- UINT8 reg[8]; /* 8 registers */
- UINT8 read_result; /* pending read result */
-};
-
-
-struct raster_info
-{
- raster_info * next; /* pointer to next entry with the same hash */
- poly_draw_scanline_func callback; /* callback pointer */
- UINT8 is_generic; /* TRUE if this is one of the generic rasterizers */
- UINT8 display; /* display index */
- UINT32 hits; /* how many hits (pixels) we've used this for */
- UINT32 polys; /* how many polys we've used this for */
- UINT32 eff_color_path; /* effective fbzColorPath value */
- UINT32 eff_alpha_mode; /* effective alphaMode value */
- UINT32 eff_fog_mode; /* effective fogMode value */
- UINT32 eff_fbz_mode; /* effective fbzMode value */
- UINT32 eff_tex_mode_0; /* effective textureMode value for TMU #0 */
- UINT32 eff_tex_mode_1; /* effective textureMode value for TMU #1 */
- UINT32 hash;
-};
-
-
-struct poly_extra_data
-{
- voodoo_device * device;
- raster_info * info; /* pointer to rasterizer information */
-
- INT16 ax, ay; /* vertex A x,y (12.4) */
- INT32 startr, startg, startb, starta; /* starting R,G,B,A (12.12) */
- INT32 startz; /* starting Z (20.12) */
- INT64 startw; /* starting W (16.32) */
- INT32 drdx, dgdx, dbdx, dadx; /* delta R,G,B,A per X */
- INT32 dzdx; /* delta Z per X */
- INT64 dwdx; /* delta W per X */
- INT32 drdy, dgdy, dbdy, dady; /* delta R,G,B,A per Y */
- INT32 dzdy; /* delta Z per Y */
- INT64 dwdy; /* delta W per Y */
-
- INT64 starts0, startt0; /* starting S,T (14.18) */
- INT64 startw0; /* starting W (2.30) */
- INT64 ds0dx, dt0dx; /* delta S,T per X */
- INT64 dw0dx; /* delta W per X */
- INT64 ds0dy, dt0dy; /* delta S,T per Y */
- INT64 dw0dy; /* delta W per Y */
- INT32 lodbase0; /* used during rasterization */
-
- INT64 starts1, startt1; /* starting S,T (14.18) */
- INT64 startw1; /* starting W (2.30) */
- INT64 ds1dx, dt1dx; /* delta S,T per X */
- INT64 dw1dx; /* delta W per X */
- INT64 ds1dy, dt1dy; /* delta S,T per Y */
- INT64 dw1dy; /* delta W per Y */
- INT32 lodbase1; /* used during rasterization */
-
- UINT16 dither[16]; /* dither matrix, for fastfill */
-};
-
-
-struct banshee_info
-{
- UINT32 io[0x40]; /* I/O registers */
- UINT32 agp[0x80]; /* AGP registers */
- UINT8 vga[0x20]; /* VGA registers */
- UINT8 crtc[0x27]; /* VGA CRTC registers */
- UINT8 seq[0x05]; /* VGA sequencer registers */
- UINT8 gc[0x05]; /* VGA graphics controller registers */
- UINT8 att[0x15]; /* VGA attribute registers */
- UINT8 attff; /* VGA attribute flip-flop */
-
- UINT32 blt_regs[0x20]; /* 2D Blitter registers */
- UINT32 blt_dst_base;
- UINT32 blt_dst_x;
- UINT32 blt_dst_y;
- UINT32 blt_dst_width;
- UINT32 blt_dst_height;
- UINT32 blt_dst_stride;
- UINT32 blt_dst_bpp;
- UINT32 blt_cmd;
- UINT32 blt_src_base;
- UINT32 blt_src_x;
- UINT32 blt_src_y;
- UINT32 blt_src_width;
- UINT32 blt_src_height;
- UINT32 blt_src_stride;
- UINT32 blt_src_bpp;
-};
-
-
-typedef voodoo_reg rgb_union;
-
-
-
-
/***************************************************************************
CONSTANTS
@@ -1746,7 +61,10 @@ enum
FUNCTION PROTOTYPES
***************************************************************************/
-struct stats_block;
+int voodoo_update(device_t *device, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+int voodoo_get_type(device_t *device);
+int voodoo_is_stalled(device_t *device);
+void voodoo_set_init_enable(device_t *device, UINT32 newval);
/* ----- device interface ----- */
@@ -1768,6 +86,7 @@ public:
DECLARE_WRITE32_MEMBER( voodoo_w );
// access to legacy token
+ struct voodoo_state *token() const { assert(m_token != nullptr); return m_token; }
void common_start_voodoo(UINT8 type);
UINT8 m_fbmem;
@@ -1777,112 +96,15 @@ public:
const char * m_cputag;
devcb_write_line m_vblank;
devcb_write_line m_stall;
-
- TIMER_CALLBACK_MEMBER( vblank_off_callback );
- TIMER_CALLBACK_MEMBER( stall_cpu_callback );
- TIMER_CALLBACK_MEMBER( vblank_callback );
-
- static void voodoo_postload(voodoo_device *vd);
-
- int voodoo_update(bitmap_rgb32 &bitmap, const rectangle &cliprect);
- int voodoo_get_type();
- int voodoo_is_stalled();
- void voodoo_set_init_enable(UINT32 newval);
-
- // not all of these need to be static, review.
-
- static void check_stalled_cpu(voodoo_device* vd, attotime current_time);
- static void flush_fifos( voodoo_device* vd, attotime current_time);
- static void init_fbi(voodoo_device *vd, fbi_state *f, void *memory, int fbmem);
- static INT32 register_w(voodoo_device *vd, offs_t offset, UINT32 data);
- static INT32 swapbuffer(voodoo_device *vd, UINT32 data);
- static void init_tmu(voodoo_device *vd, tmu_state *t, voodoo_reg *reg, void *memory, int tmem);
- static INT32 lfb_w(voodoo_device *vd, offs_t offset, UINT32 data, UINT32 mem_mask);
- static INT32 texture_w(voodoo_device *vd, offs_t offset, UINT32 data);
- static INT32 lfb_direct_w(voodoo_device *vd, offs_t offset, UINT32 data, UINT32 mem_mask);
- static INT32 banshee_2d_w(voodoo_device *vd, offs_t offset, UINT32 data);
- static void stall_cpu(voodoo_device *vd, int state, attotime current_time);
- static void soft_reset(voodoo_device *vd);
- static void recompute_video_memory(voodoo_device *vd);
- static INT32 fastfill(voodoo_device *vd);
- static INT32 triangle(voodoo_device *vd);
- static INT32 begin_triangle(voodoo_device *vd);
- static INT32 draw_triangle(voodoo_device *vd);
- static INT32 setup_and_draw_triangle(voodoo_device *vd);
- static INT32 triangle_create_work_item(voodoo_device* vd,UINT16 *drawbuf, int texcount);
- static raster_info *add_rasterizer(voodoo_device *vd, const raster_info *cinfo);
- static raster_info *find_rasterizer(voodoo_device *vd, int texcount);
- static void dump_rasterizer_stats(voodoo_device *vd);
- static void init_tmu_shared(tmu_shared_state *s);
-
- static void swap_buffers(voodoo_device *vd);
- static UINT32 cmdfifo_execute(voodoo_device *vd, cmdfifo_info *f);
- static INT32 cmdfifo_execute_if_ready(voodoo_device* vd, cmdfifo_info *f);
- static void cmdfifo_w(voodoo_device *vd, cmdfifo_info *f, offs_t offset, UINT32 data);
-
- static void raster_fastfill(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid);
- static void raster_generic_0tmu(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid);
- static void raster_generic_1tmu(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid);
- static void raster_generic_2tmu(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid);
-
-#define RASTERIZER_HEADER(name) \
- static void raster_##name(void *destbase, INT32 y, const poly_extent *extent, const void *extradata, int threadid); \
-
-#define RASTERIZER_ENTRY(fbzcp, alpha, fog, fbz, tex0, tex1) \
- RASTERIZER_HEADER(fbzcp##_##alpha##_##fog##_##fbz##_##tex0##_##tex1) \
-
-#include "voodoo_rast.inc"
-
-#undef RASTERIZER_ENTRY
-
-
protected:
// device-level overrides
virtual void device_config_complete() override;
virtual void device_stop() override;
virtual void device_reset() override;
-public:
- // voodoo_state
- UINT8 index; /* index of board */
- voodoo_device *device; /* pointer to our containing device */
- screen_device *screen; /* the screen we are acting on */
- device_t *cpu; /* the CPU we interact with */
- UINT8 vd_type; /* type of system */
- UINT8 chipmask; /* mask for which chips are available */
- UINT32 freq; /* operating frequency */
- attoseconds_t attoseconds_per_cycle; /* attoseconds per cycle */
- UINT32 extra_cycles; /* extra cycles not yet accounted for */
- int trigger; /* trigger used for stalling */
-
- voodoo_reg reg[0x400]; /* raw registers */
- const UINT8 * regaccess; /* register access array */
- const char *const * regnames; /* register names array */
- UINT8 alt_regmap; /* enable alternate register map? */
-
- pci_state pci; /* PCI state */
- dac_state dac; /* DAC state */
-
- fbi_state fbi; /* FBI states */
- tmu_state tmu[MAX_TMU]; /* TMU states */
- tmu_shared_state tmushare; /* TMU shared state */
- banshee_info banshee; /* Banshee state */
-
- legacy_poly_manager * poly; /* polygon manager */
- stats_block * thread_stats; /* per-thread statistics */
-
- voodoo_stats stats; /* internal statistics */
-
- offs_t last_status_pc; /* PC of last status description (for logging) */
- UINT32 last_status_value; /* value of last status read (for logging) */
-
- int next_rasterizer; /* next rasterizer index */
- raster_info rasterizer[MAX_RASTERIZERS]; /* array of rasterizers */
- raster_info * raster_hash[RASTER_HASH_SIZE]; /* hash table of rasterizers */
-
- bool send_config;
- UINT32 tmu_config;
-
+private:
+ // internal state
+ struct voodoo_state *m_token;
};
class voodoo_1_device : public voodoo_device
diff --git a/src/devices/video/voodoo_pci.cpp b/src/devices/video/voodoo_pci.cpp
index 9d34442f08b..7570a007efb 100644
--- a/src/devices/video/voodoo_pci.cpp
+++ b/src/devices/video/voodoo_pci.cpp
@@ -153,7 +153,7 @@ void voodoo_pci_device::map_extra(UINT64 memory_window_start, UINT64 memory_wind
UINT32 voodoo_pci_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- return m_voodoo->voodoo_update(bitmap, cliprect) ? 0 : UPDATE_HAS_NOT_CHANGED;
+ return voodoo_update(m_voodoo, bitmap, cliprect) ? 0 : UPDATE_HAS_NOT_CHANGED;
}
// PCI bus control
@@ -170,7 +170,7 @@ WRITE32_MEMBER (voodoo_pci_device::pcictrl_w)
switch (offset) {
case 0x0/4: // The address map starts at 0x40
// HW initEnable
- m_voodoo->voodoo_set_init_enable(data);
+ voodoo_set_init_enable(m_voodoo, data);
logerror("%06X:voodoo_pci_device pcictrl_w to offset %02X = %08X & %08X\n", space.device().safe_pc(), offset*4, data, mem_mask);
break;
default:
diff --git a/src/emu/cheat.cpp b/src/emu/cheat.cpp
index c055ba5bdb2..16291063985 100644
--- a/src/emu/cheat.cpp
+++ b/src/emu/cheat.cpp
@@ -1043,9 +1043,6 @@ cheat_manager::cheat_manager(running_machine &machine)
if (!machine.options().cheat())
return;
- m_output.resize(UI_TARGET_FONT_ROWS*2);
- m_justify.resize(UI_TARGET_FONT_ROWS*2);
-
// request a callback
machine.add_notifier(MACHINE_NOTIFY_FRAME, machine_notify_delegate(FUNC(cheat_manager::frame_update), this));
@@ -1212,7 +1209,7 @@ bool cheat_manager::save_all(const char *filename)
void cheat_manager::render_text(render_container &container)
{
// render any text and free it along the way
- for (int linenum = 0; linenum < m_output.size(); linenum++)
+ for (int linenum = 0; linenum < ARRAY_LENGTH(m_output); linenum++)
if (!m_output[linenum].empty())
{
// output the text
@@ -1340,7 +1337,7 @@ void cheat_manager::frame_update()
// set up for accumulating output
m_lastline = 0;
m_numlines = floor(1.0f / machine().ui().get_line_height());
- m_numlines = MIN(m_numlines, m_output.size());
+ m_numlines = MIN(m_numlines, ARRAY_LENGTH(m_output));
for (auto & elem : m_output)
elem.clear();
@@ -1361,14 +1358,7 @@ void cheat_manager::frame_update()
void cheat_manager::load_cheats(const char *filename)
{
xml_data_node *rootnode = nullptr;
- std::string searchstr(machine().options().cheat_path());
- path_iterator path(searchstr.c_str());
- std::string curpath;
- while (path.next(curpath))
- {
- searchstr.append(";").append(curpath).append(PATH_SEPARATOR).append("cheat");
- }
- emu_file cheatfile(searchstr.c_str(), OPEN_FLAG_READ);
+ emu_file cheatfile(machine().options().cheat_path(), OPEN_FLAG_READ);
try
{
// open the file with the proper name
diff --git a/src/emu/cheat.h b/src/emu/cheat.h
index 6badabd14d6..8e49a8888bb 100644
--- a/src/emu/cheat.h
+++ b/src/emu/cheat.h
@@ -321,8 +321,8 @@ private:
running_machine & m_machine; // reference to our machine
simple_list<cheat_entry> m_cheatlist; // cheat list
UINT64 m_framecount; // frame count
- std::vector<std::string> m_output; // array of output strings
- std::vector<UINT8> m_justify; // justification for each string
+ std::string m_output[UI_TARGET_FONT_ROWS * 2]; // array of output strings
+ UINT8 m_justify[UI_TARGET_FONT_ROWS*2]; // justification for each string
UINT8 m_numlines; // number of lines available for output
INT8 m_lastline; // last line used for output
bool m_disabled; // true if the cheat engine is disabled
diff --git a/src/emu/clifront.cpp b/src/emu/clifront.cpp
index 2643fd3e5db..05b0ace6116 100644
--- a/src/emu/clifront.cpp
+++ b/src/emu/clifront.cpp
@@ -27,8 +27,6 @@
#include "osdepend.h"
#include "softlist.h"
-#include "ui/moptions.h"
-
#include <new>
#include <ctype.h>
@@ -99,8 +97,6 @@ int cli_frontend::execute(int argc, char **argv)
{
// wrap the core execution in a try/catch to field all fatal errors
m_result = MAMERR_NONE;
- machine_manager *manager = machine_manager::instance(m_options, m_osd);
-
try
{
// first parse options to be able to get software from it
@@ -108,8 +104,6 @@ int cli_frontend::execute(int argc, char **argv)
m_options.parse_command_line(argc, argv, option_errors);
m_options.parse_standard_inis(option_errors);
-
- manager->start_luaengine();
if (*(m_options.software_name()) != 0)
{
@@ -154,7 +148,7 @@ int cli_frontend::execute(int argc, char **argv)
strprintf(val, "%s:%s:%s", swlistdev->list_name(), m_options.software_name(), swpart->name());
// call this in order to set slot devices according to mounting
- m_options.parse_slot_devices(argc, argv, option_errors, image->instance_name(), val.c_str(), swpart);
+ m_options.parse_slot_devices(argc, argv, option_errors, image->instance_name(), val.c_str());
break;
}
}
@@ -215,7 +209,9 @@ int cli_frontend::execute(int argc, char **argv)
throw emu_fatalerror(MAMERR_NO_SUCH_GAME, "Unknown system '%s'", m_options.system_name());
// otherwise just run the game
+ machine_manager *manager = machine_manager::instance(m_options, m_osd);
m_result = manager->execute();
+ global_free(manager);
}
}
@@ -238,7 +234,7 @@ int cli_frontend::execute(int argc, char **argv)
// print them out
osd_printf_error("\n\"%s\" approximately matches the following\n"
- "supported machines (best match first):\n\n", m_options.system_name());
+ "supported %s (best match first):\n\n", m_options.system_name(),emulator_info::get_gamesnoun());
for (auto & matche : matches)
if (matche != -1)
osd_printf_error("%-18s%s\n", drivlist.driver(matche).name, drivlist.driver(matche).description);
@@ -266,7 +262,6 @@ int cli_frontend::execute(int argc, char **argv)
}
_7z_file_cache_clear();
- global_free(manager);
return m_result;
}
@@ -1591,7 +1586,7 @@ void cli_frontend::execute_commands(const char *exename)
// showusage?
if (strcmp(m_options.command(), CLICOMMAND_SHOWUSAGE) == 0)
{
- osd_printf_info("Usage: %s [machine] [media] [software] [options]",exename);
+ emulator_info::printf_usage(exename, emulator_info::get_gamenoun());
osd_printf_info("\n\nOptions:\n%s", m_options.output_help().c_str());
return;
}
@@ -1623,14 +1618,6 @@ void cli_frontend::execute_commands(const char *exename)
// generate the updated INI
file.puts(m_options.output_ini().c_str());
-
- ui_options ui_opts;
- emu_file file_ui(OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
- if (file_ui.open("ui.ini") != FILERR_NONE)
- throw emu_fatalerror("Unable to create file ui.ini\n");
-
- // generate the updated INI
- file_ui.puts(ui_opts.output_ini().c_str());
return;
}
@@ -1693,10 +1680,8 @@ void cli_frontend::execute_commands(const char *exename)
void cli_frontend::display_help()
{
osd_printf_info("%s v%s\n%s\n\n", emulator_info::get_appname(),build_version,emulator_info::get_copyright_info());
- osd_printf_info("This software reproduces, more or less faithfully, the behaviour of a wide range\n"
- "of machines. But hardware is useless without software, so images of the ROMs and\n"
- "other media which run on that hardware are also required.\n\n");
- osd_printf_info("Usage: %s [machine] [media] [software] [options]",emulator_info::get_appname());
+ osd_printf_info("%s\n", emulator_info::get_disclaimer());
+ emulator_info::printf_usage(emulator_info::get_appname(),emulator_info::get_gamenoun());
osd_printf_info("\n\n"
" %s -showusage for a brief list of options\n"
" %s -showconfig for a list of configuration options\n"
diff --git a/src/emu/debug/debugcmd.cpp b/src/emu/debug/debugcmd.cpp
index 7ad039806ea..4558413b2c3 100644
--- a/src/emu/debug/debugcmd.cpp
+++ b/src/emu/debug/debugcmd.cpp
@@ -2381,12 +2381,11 @@ static void execute_find(running_machine &machine, int ref, int params, const ch
for (int i = 2; i < params; i++)
{
const char *pdata = param[i];
- size_t pdatalen = strlen(pdata) - 1;
/* check for a string */
- if (pdata[0] == '"' && pdata[pdatalen] == '"')
+ if (pdata[0] == '"' && pdata[strlen(pdata) - 1] == '"')
{
- for (j = 1; j < pdatalen; j++)
+ for (j = 1; j < strlen(pdata) - 1; j++)
{
data_to_find[data_count] = pdata[j];
data_size[data_count++] = 1;
diff --git a/src/emu/debug/debugcpu.cpp b/src/emu/debug/debugcpu.cpp
index c4686c5566f..82c175251fe 100644
--- a/src/emu/debug/debugcpu.cpp
+++ b/src/emu/debug/debugcpu.cpp
@@ -19,7 +19,6 @@
#include "uiinput.h"
#include "xmlfile.h"
#include "coreutil.h"
-#include "luaengine.h"
#include <ctype.h>
@@ -487,7 +486,7 @@ UINT16 debug_read_word(address_space &space, offs_t address, int apply_translati
address &= space.logbytemask();
/* if this is misaligned read, or if there are no word readers, just read two bytes */
- if (!WORD_ALIGNED(address))
+ if ((address & 1) != 0)
{
UINT8 byte0 = debug_read_byte(space, address + 0, apply_translation);
UINT8 byte1 = debug_read_byte(space, address + 1, apply_translation);
@@ -541,7 +540,7 @@ UINT32 debug_read_dword(address_space &space, offs_t address, int apply_translat
address &= space.logbytemask();
/* if this is misaligned read, or if there are no dword readers, just read two words */
- if (!DWORD_ALIGNED(address))
+ if ((address & 3) != 0)
{
UINT16 word0 = debug_read_word(space, address + 0, apply_translation);
UINT16 word1 = debug_read_word(space, address + 2, apply_translation);
@@ -595,7 +594,7 @@ UINT64 debug_read_qword(address_space &space, offs_t address, int apply_translat
address &= space.logbytemask();
/* if this is misaligned read, or if there are no qword readers, just read two dwords */
- if (!QWORD_ALIGNED(address))
+ if ((address & 7) != 0)
{
UINT32 dword0 = debug_read_dword(space, address + 0, apply_translation);
UINT32 dword1 = debug_read_dword(space, address + 4, apply_translation);
@@ -700,7 +699,7 @@ void debug_write_word(address_space &space, offs_t address, UINT16 data, int app
address &= space.logbytemask();
/* if this is a misaligned write, or if there are no word writers, just read two bytes */
- if (!WORD_ALIGNED(address))
+ if ((address & 1) != 0)
{
if (space.endianness() == ENDIANNESS_LITTLE)
{
@@ -752,7 +751,7 @@ void debug_write_dword(address_space &space, offs_t address, UINT32 data, int ap
address &= space.logbytemask();
/* if this is a misaligned write, or if there are no dword writers, just read two words */
- if (!DWORD_ALIGNED(address))
+ if ((address & 3) != 0)
{
if (space.endianness() == ENDIANNESS_LITTLE)
{
@@ -804,7 +803,7 @@ void debug_write_qword(address_space &space, offs_t address, UINT64 data, int ap
address &= space.logbytemask();
/* if this is a misaligned write, or if there are no qword writers, just read two dwords */
- if (!QWORD_ALIGNED(address))
+ if ((address & 7) != 0)
{
if (space.endianness() == ENDIANNESS_LITTLE)
{
@@ -967,7 +966,7 @@ UINT64 debug_read_opcode(address_space &space, offs_t address, int size)
case 2:
result = space.direct().read_word(address & ~1, addrxor);
- if (!WORD_ALIGNED(address))
+ if ((address & 1) != 0)
{
result2 = space.direct().read_word((address & ~1) + 2, addrxor);
if (space.endianness() == ENDIANNESS_LITTLE)
@@ -980,7 +979,7 @@ UINT64 debug_read_opcode(address_space &space, offs_t address, int size)
case 4:
result = space.direct().read_dword(address & ~3, addrxor);
- if (!DWORD_ALIGNED(address))
+ if ((address & 3) != 0)
{
result2 = space.direct().read_dword((address & ~3) + 4, addrxor);
if (space.endianness() == ENDIANNESS_LITTLE)
@@ -993,7 +992,7 @@ UINT64 debug_read_opcode(address_space &space, offs_t address, int size)
case 8:
result = space.direct().read_qword(address & ~7, addrxor);
- if (!QWORD_ALIGNED(address))
+ if ((address & 7) != 0)
{
result2 = space.direct().read_qword((address & ~7) + 8, addrxor);
if (space.endianness() == ENDIANNESS_LITTLE)
@@ -1929,8 +1928,6 @@ void device_debug::instruction_hook(offs_t curpc)
// flush any pending updates before waiting again
machine.debug_view().flush_osd_updates();
- machine.manager().lua()->periodic_check();
-
// clear the memory modified flag and wait
global->memory_modified = false;
if (machine.debug_flags & DEBUG_FLAG_OSD_ENABLED)
diff --git a/src/emu/debug/debugvw.cpp b/src/emu/debug/debugvw.cpp
index 641a31b41f0..eea867f3a63 100644
--- a/src/emu/debug/debugvw.cpp
+++ b/src/emu/debug/debugvw.cpp
@@ -33,8 +33,13 @@
debug_view_source::debug_view_source(const char *name, device_t *device)
: m_next(nullptr),
m_name(name),
- m_device(device)
+ m_device(device),
+ m_is_octal(false)
{
+ device_execute_interface *intf;
+ if (device && device->interface(intf))
+ m_is_octal = intf->is_octal();
+
}
@@ -326,7 +331,7 @@ debug_view_manager::~debug_view_manager()
{
debug_view *oldhead = m_viewlist;
m_viewlist = oldhead->m_next;
- global_free(oldhead);
+ auto_free(machine(), oldhead);
}
}
@@ -340,31 +345,31 @@ debug_view *debug_view_manager::alloc_view(debug_view_type type, debug_view_osd_
switch (type)
{
case DVT_CONSOLE:
- return append(global_alloc(debug_view_console(machine(), osdupdate, osdprivate)));
+ return append(auto_alloc(machine(), debug_view_console(machine(), osdupdate, osdprivate)));
case DVT_STATE:
- return append(global_alloc(debug_view_state(machine(), osdupdate, osdprivate)));
+ return append(auto_alloc(machine(), debug_view_state(machine(), osdupdate, osdprivate)));
case DVT_DISASSEMBLY:
- return append(global_alloc(debug_view_disasm(machine(), osdupdate, osdprivate)));
+ return append(auto_alloc(machine(), debug_view_disasm(machine(), osdupdate, osdprivate)));
case DVT_MEMORY:
- return append(global_alloc(debug_view_memory(machine(), osdupdate, osdprivate)));
+ return append(auto_alloc(machine(), debug_view_memory(machine(), osdupdate, osdprivate)));
case DVT_LOG:
- return append(global_alloc(debug_view_log(machine(), osdupdate, osdprivate)));
+ return append(auto_alloc(machine(), debug_view_log(machine(), osdupdate, osdprivate)));
case DVT_TIMERS:
-// return append(global_alloc(debug_view_timers(machine(), osdupdate, osdprivate)));
+// return append(auto_alloc(machine(), debug_view_timers(machine(), osdupdate, osdprivate)));
case DVT_ALLOCS:
-// return append(global_alloc(debug_view_allocs(machine(), osdupdate, osdprivate)));
+// return append(auto_alloc(machine(), debug_view_allocs(machine(), osdupdate, osdprivate)));
case DVT_BREAK_POINTS:
- return append(global_alloc(debug_view_breakpoints(machine(), osdupdate, osdprivate)));
+ return append(auto_alloc(machine(), debug_view_breakpoints(machine(), osdupdate, osdprivate)));
case DVT_WATCH_POINTS:
- return append(global_alloc(debug_view_watchpoints(machine(), osdupdate, osdprivate)));
+ return append(auto_alloc(machine(), debug_view_watchpoints(machine(), osdupdate, osdprivate)));
default:
fatalerror("Attempt to create invalid debug view type %d\n", type);
@@ -384,7 +389,7 @@ void debug_view_manager::free_view(debug_view &view)
if (*viewptr == &view)
{
*viewptr = view.m_next;
- global_free(&view);
+ auto_free(machine(), &view);
break;
}
}
diff --git a/src/emu/debug/debugvw.h b/src/emu/debug/debugvw.h
index ab4c986172e..437e68d68f6 100644
--- a/src/emu/debug/debugvw.h
+++ b/src/emu/debug/debugvw.h
@@ -124,12 +124,14 @@ public:
const char *name() const { return m_name.c_str(); }
debug_view_source *next() const { return m_next; }
device_t *device() const { return m_device; }
+ bool is_octal() const { return m_is_octal; }
private:
// internal state
debug_view_source * m_next; // link to next item
std::string m_name; // name of the source item
device_t * m_device; // associated device (if applicable)
+ bool m_is_octal; // is view in octal or hex
};
diff --git a/src/emu/debug/dvdisasm.cpp b/src/emu/debug/dvdisasm.cpp
index 9b05345b6ff..e8becd1954d 100644
--- a/src/emu/debug/dvdisasm.cpp
+++ b/src/emu/debug/dvdisasm.cpp
@@ -308,16 +308,16 @@ offs_t debug_view_disasm::find_pc_backwards(offs_t targetpc, int numinstrs)
void debug_view_disasm::generate_bytes(offs_t pcbyte, int numbytes, int minbytes, char *string, int maxchars, bool encrypted)
{
const debug_view_disasm_source &source = downcast<const debug_view_disasm_source &>(*m_source);
- int char_num = source.m_space.is_octal() ? 3 : 2;
+ int char_num = source.is_octal() ? 3 : 2;
// output the first value
int offset = 0;
if (maxchars >= char_num * minbytes)
- offset = sprintf(string, "%s", core_i64_format(debug_read_opcode(source.m_decrypted_space, pcbyte, minbytes), minbytes * char_num, source.m_space.is_octal()));
+ offset = sprintf(string, "%s", core_i64_format(debug_read_opcode(source.m_decrypted_space, pcbyte, minbytes), minbytes * char_num, source.is_octal()));
// output subsequent values
int byte;
for (byte = minbytes; byte < numbytes && offset + 1 + char_num * minbytes < maxchars; byte += minbytes)
- offset += sprintf(&string[offset], " %s", core_i64_format(debug_read_opcode(encrypted ? source.m_space : source.m_decrypted_space, pcbyte + byte, minbytes), minbytes * char_num, source.m_space.is_octal()));
+ offset += sprintf(&string[offset], " %s", core_i64_format(debug_read_opcode(encrypted ? source.m_space : source.m_decrypted_space, pcbyte + byte, minbytes), minbytes * char_num, source.is_octal()));
// if we ran out of room, indicate more
string[maxchars - 1] = 0;
@@ -335,7 +335,7 @@ bool debug_view_disasm::recompute(offs_t pc, int startline, int lines)
{
bool changed = false;
const debug_view_disasm_source &source = downcast<const debug_view_disasm_source &>(*m_source);
- int char_num = source.m_space.is_octal() ? 3 : 2;
+ int char_num = source.is_octal() ? 3 : 2;
// determine how many characters we need for an address and set the divider
m_divider1 = 1 + (source.m_space.logaddrchars()/2*char_num) + 1;
@@ -383,7 +383,7 @@ bool debug_view_disasm::recompute(offs_t pc, int startline, int lines)
// convert back and set the address of this instruction
m_byteaddress[instr] = pcbyte;
- sprintf(&destbuf[0], " %s ", core_i64_format(source.m_space.byte_to_address(pcbyte), source.m_space.logaddrchars()/2*char_num, source.m_space.is_octal()));
+ sprintf(&destbuf[0], " %s ", core_i64_format(source.m_space.byte_to_address(pcbyte), source.m_space.logaddrchars()/2*char_num, source.is_octal()));
// make sure we can translate the address, and then disassemble the result
char buffer[100];
diff --git a/src/emu/debug/dvstate.cpp b/src/emu/debug/dvstate.cpp
index d0d741ed21e..578b423725d 100644
--- a/src/emu/debug/dvstate.cpp
+++ b/src/emu/debug/dvstate.cpp
@@ -98,7 +98,7 @@ void debug_view_state::reset()
{
state_item *oldhead = m_state_list;
m_state_list = oldhead->m_next;
- global_free(oldhead);
+ auto_free(machine(), oldhead);
}
}
@@ -117,39 +117,39 @@ void debug_view_state::recompute()
// add a cycles entry: cycles:99999999
state_item **tailptr = &m_state_list;
- *tailptr = global_alloc(state_item(REG_CYCLES, "cycles", 8));
+ *tailptr = auto_alloc(machine(), state_item(REG_CYCLES, "cycles", 8));
tailptr = &(*tailptr)->m_next;
// add a beam entry: beamx:1234
- *tailptr = global_alloc(state_item(REG_BEAMX, "beamx", 4));
+ *tailptr = auto_alloc(machine(), state_item(REG_BEAMX, "beamx", 4));
tailptr = &(*tailptr)->m_next;
// add a beam entry: beamy:5678
- *tailptr = global_alloc(state_item(REG_BEAMY, "beamy", 4));
+ *tailptr = auto_alloc(machine(), state_item(REG_BEAMY, "beamy", 4));
tailptr = &(*tailptr)->m_next;
// add a beam entry: frame:123456
- *tailptr = global_alloc(state_item(REG_FRAME, "frame", 6));
+ *tailptr = auto_alloc(machine(), state_item(REG_FRAME, "frame", 6));
tailptr = &(*tailptr)->m_next;
// add a flags entry: flags:xxxxxxxx
- *tailptr = global_alloc(state_item(STATE_GENFLAGS, "flags", source.m_stateintf->state_string_max_length(STATE_GENFLAGS)));
+ *tailptr = auto_alloc(machine(), state_item(STATE_GENFLAGS, "flags", source.m_stateintf->state_string_max_length(STATE_GENFLAGS)));
tailptr = &(*tailptr)->m_next;
// add a divider entry
- *tailptr = global_alloc(state_item(REG_DIVIDER, "", 0));
+ *tailptr = auto_alloc(machine(), state_item(REG_DIVIDER, "", 0));
tailptr = &(*tailptr)->m_next;
// add all registers into it
for (const device_state_entry *entry = source.m_stateintf->state_first(); entry != nullptr; entry = entry->next())
if (entry->divider())
{
- *tailptr = global_alloc(state_item(REG_DIVIDER, "", 0));
+ *tailptr = auto_alloc(machine(), state_item(REG_DIVIDER, "", 0));
tailptr = &(*tailptr)->m_next;
}
else if (entry->visible())
{
- *tailptr = global_alloc(state_item(entry->index(), entry->symbol(), source.m_stateintf->state_string_max_length(entry->index())));
+ *tailptr = auto_alloc(machine(), state_item(entry->index(), entry->symbol(), source.m_stateintf->state_string_max_length(entry->index())));
tailptr = &(*tailptr)->m_next;
}
diff --git a/src/emu/debug/textbuf.cpp b/src/emu/debug/textbuf.cpp
index 476fe6e1efc..e7daf96571a 100644
--- a/src/emu/debug/textbuf.cpp
+++ b/src/emu/debug/textbuf.cpp
@@ -86,12 +86,12 @@ text_buffer *text_buffer_alloc(UINT32 bytes, UINT32 lines)
text_buffer *text;
/* allocate memory for the text buffer object */
- text = global_alloc_nothrow(text_buffer);
+ text = (text_buffer *)global_alloc(text_buffer);
if (!text)
return nullptr;
/* allocate memory for the buffer itself */
- text->buffer = global_alloc_array_nothrow(char, bytes);
+ text->buffer = (char *)global_alloc_array(char, bytes);
if (!text->buffer)
{
global_free(text);
@@ -99,7 +99,7 @@ text_buffer *text_buffer_alloc(UINT32 bytes, UINT32 lines)
}
/* allocate memory for the lines array */
- text->lineoffs = global_alloc_array_nothrow(INT32, lines);
+ text->lineoffs = (INT32 *)global_alloc_array(INT32, lines);
if (!text->lineoffs)
{
global_free_array(text->buffer);
diff --git a/src/emu/diexec.cpp b/src/emu/diexec.cpp
index ac72ce768d7..7b4b530f75b 100644
--- a/src/emu/diexec.cpp
+++ b/src/emu/diexec.cpp
@@ -46,6 +46,7 @@ device_execute_interface::device_execute_interface(const machine_config &mconfig
m_disabled(false),
m_vblank_interrupt_screen(nullptr),
m_timed_interrupt_period(attotime::zero),
+ m_is_octal(false),
m_nextexec(nullptr),
m_timedint_timer(nullptr),
m_profiler(PROFILER_IDLE),
diff --git a/src/emu/diexec.h b/src/emu/diexec.h
index 3a5cc0405f9..7f9eb41bfcf 100644
--- a/src/emu/diexec.h
+++ b/src/emu/diexec.h
@@ -146,6 +146,7 @@ public:
UINT64 attotime_to_cycles(const attotime &duration) const { return clocks_to_cycles(device().attotime_to_clocks(duration)); }
UINT32 input_lines() const { return execute_input_lines(); }
UINT32 default_irq_vector() const { return execute_default_irq_vector(); }
+ bool is_octal() const { return m_is_octal; }
// static inline configuration helpers
static void static_set_disable(device_t &device);
@@ -259,6 +260,7 @@ protected:
const char * m_vblank_interrupt_screen; // the screen that causes the VBLANK interrupt
device_interrupt_delegate m_timed_interrupt; // for interrupts not tied to VBLANK
attotime m_timed_interrupt_period; // period for periodic interrupts
+ bool m_is_octal; // to determine if messages/debugger will show octal or hex
// execution lists
device_execute_interface *m_nextexec; // pointer to the next device to execute, in order
diff --git a/src/emu/diimage.cpp b/src/emu/diimage.cpp
index 6cc9b0fb41a..392da316dbb 100644
--- a/src/emu/diimage.cpp
+++ b/src/emu/diimage.cpp
@@ -161,27 +161,29 @@ image_error_t device_image_interface::set_image_filename(const char *filename)
zippath_parent(m_working_directory, filename);
m_basename.assign(m_image_name);
- size_t loc1 = m_image_name.find_last_of('\\');
- size_t loc2 = m_image_name.find_last_of('/');
- size_t loc3 = m_image_name.find_last_of(':');
- size_t loc = MAX(loc1,MAX(loc2, loc3));
- if (loc != -1) {
+ int loc1 = m_image_name.find_last_of('\\');
+ int loc2 = m_image_name.find_last_of('/');
+ int loc3 = m_image_name.find_last_of(':');
+ int loc = MAX(loc1,MAX(loc2,loc3));
+ if (loc!=-1) {
if (loc == loc3)
{
// temp workaround for softlists now that m_image_name contains the part name too (e.g. list:gamename:cart)
m_basename = m_basename.substr(0, loc);
- size_t tmploc = m_basename.find_last_of(':');
- m_basename = m_basename.substr(tmploc + 1, loc - tmploc);
+ std::string tmpstr = std::string(m_basename);
+ int tmploc = tmpstr.find_last_of(':');
+ m_basename = m_basename.substr(tmploc + 1,loc-tmploc);
}
else
- m_basename = m_basename.substr(loc + 1);
+ m_basename = m_basename.substr(loc + 1, m_basename.length() - loc);
}
- m_basename_noext = m_basename;
+ m_basename_noext = m_basename.assign(m_basename);
m_filetype = "";
loc = m_basename_noext.find_last_of('.');
- if (loc != -1) {
- m_basename_noext = m_basename_noext.substr(0, loc);
- m_filetype = m_basename.substr(loc + 1);
+ if (loc!=-1) {
+ m_basename_noext = m_basename_noext.substr(0,loc);
+ m_filetype = m_basename.assign(m_basename);
+ m_filetype = m_filetype.substr(loc + 1, m_filetype.length() - loc);
}
return IMAGE_ERROR_SUCCESS;
@@ -1379,7 +1381,7 @@ std::string device_image_interface::software_get_default_slot(const char *defaul
ui_menu *device_image_interface::get_selection_menu(running_machine &machine, render_container *container)
{
- return global_alloc_clear<ui_menu_control_device_image>(machine, container, this);
+ return auto_alloc_clear(machine, <ui_menu_control_device_image>(machine, container, this));
}
/* ----------------------------------------------------------------------- */
diff --git a/src/emu/dimemory.cpp b/src/emu/dimemory.cpp
index dbe3647ec01..b245d51a0b9 100644
--- a/src/emu/dimemory.cpp
+++ b/src/emu/dimemory.cpp
@@ -36,7 +36,6 @@ address_space_config::address_space_config()
m_addrbus_shift(0),
m_logaddr_width(0),
m_page_shift(0),
- m_is_octal(false),
m_internal_map(nullptr),
m_default_map(nullptr)
{
@@ -59,7 +58,6 @@ address_space_config::address_space_config(const char *name, endianness_t endian
m_addrbus_shift(addrshift),
m_logaddr_width(addrwidth),
m_page_shift(0),
- m_is_octal(false),
m_internal_map(internal),
m_default_map(defmap)
{
@@ -73,7 +71,6 @@ address_space_config::address_space_config(const char *name, endianness_t endian
m_addrbus_shift(addrshift),
m_logaddr_width(logwidth),
m_page_shift(pageshift),
- m_is_octal(false),
m_internal_map(internal),
m_default_map(defmap)
{
@@ -87,7 +84,6 @@ address_space_config::address_space_config(const char *name, endianness_t endian
m_addrbus_shift(addrshift),
m_logaddr_width(addrwidth),
m_page_shift(0),
- m_is_octal(false),
m_internal_map(nullptr),
m_default_map(nullptr),
m_internal_map_delegate(std::move(internal)),
@@ -103,7 +99,6 @@ address_space_config::address_space_config(const char *name, endianness_t endian
m_addrbus_shift(addrshift),
m_logaddr_width(logwidth),
m_page_shift(pageshift),
- m_is_octal(false),
m_internal_map(nullptr),
m_default_map(nullptr),
m_internal_map_delegate(std::move(internal)),
diff --git a/src/emu/dimemory.h b/src/emu/dimemory.h
index 0998fd4ae9a..66561b5a5cf 100644
--- a/src/emu/dimemory.h
+++ b/src/emu/dimemory.h
@@ -131,4 +131,22 @@ typedef device_interface_iterator<device_memory_interface> memory_interface_iter
+//**************************************************************************
+// INLINE HELPERS
+//**************************************************************************
+
+//-------------------------------------------------
+// device_get_space_config - return a pointer
+// to sthe given address space's configuration
+//-------------------------------------------------
+
+inline const address_space_config *device_get_space_config(const device_t &device, address_spacenum spacenum = AS_0)
+{
+ const device_memory_interface *intf;
+ if (!device.interface(intf))
+ throw emu_fatalerror("Device '%s' does not have memory interface", device.tag());
+ return intf->space_config(spacenum);
+}
+
+
#endif /* __DIMEMORY_H__ */
diff --git a/src/emu/disound.cpp b/src/emu/disound.cpp
index 7134b588963..c1f4e49f4b6 100644
--- a/src/emu/disound.cpp
+++ b/src/emu/disound.cpp
@@ -443,10 +443,7 @@ void device_mixer_interface::interface_pre_start()
void device_mixer_interface::interface_post_load()
{
- // Beware that there's not going to be a mixer stream if there was
- // no inputs
- if (m_mixer_stream)
- m_mixer_stream->set_sample_rate(device().machine().sample_rate());
+ m_mixer_stream->set_sample_rate(device().machine().sample_rate());
// call our parent
device_sound_interface::interface_post_load();
diff --git a/src/emu/divtlb.cpp b/src/emu/divtlb.cpp
deleted file mode 100644
index 01be30919cb..00000000000
--- a/src/emu/divtlb.cpp
+++ /dev/null
@@ -1,341 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Aaron Giles
-/***************************************************************************
-
- divtlb.c
-
- Device generic virtual TLB interface.
-
-***************************************************************************/
-
-#include "emu.h"
-#include "divtlb.h"
-#include "validity.h"
-
-
-
-//**************************************************************************
-// DEBUGGING
-//**************************************************************************
-
-#define PRINTF_TLB (0)
-
-
-
-//**************************************************************************
-// DEVICE VTLB INTERFACE
-//**************************************************************************
-
-//-------------------------------------------------
-// device_vtlb_interface - constructor
-//-------------------------------------------------
-
-device_vtlb_interface::device_vtlb_interface(const machine_config &mconfig, device_t &device, address_spacenum space)
- : device_interface(device, "vtlb"),
- m_space(space),
- m_dynamic(0),
- m_fixed(0),
- m_dynindex(0),
- m_pageshift(0),
- m_addrwidth(0)
-{
-}
-
-
-//-------------------------------------------------
-// device_vtlb_interface - destructor
-//-------------------------------------------------
-
-device_vtlb_interface::~device_vtlb_interface()
-{
-}
-
-
-//-------------------------------------------------
-// interface_validity_check - validation for a
-// device after the configuration has been
-// constructed
-//-------------------------------------------------
-
-void device_vtlb_interface::interface_validity_check(validity_checker &valid) const
-{
- const device_memory_interface *intf;
- if (!device().interface(intf))
- osd_printf_error("Device does not have memory interface\n");
- else
- {
- // validate CPU information
- const address_space_config *spaceconfig = intf->space_config(m_space);
- if (spaceconfig == nullptr)
- osd_printf_error("No memory address space configuration found for space %d\n", m_space);
- else if ((1 << spaceconfig->m_page_shift) <= VTLB_FLAGS_MASK || spaceconfig->m_logaddr_width <= spaceconfig->m_page_shift)
- osd_printf_error("Invalid page shift %d for VTLB\n", spaceconfig->m_page_shift);
- }
-}
-
-
-//-------------------------------------------------
-// interface_pre_start - work to be done prior to
-// actually starting a device
-//-------------------------------------------------
-
-void device_vtlb_interface::interface_pre_start()
-{
- // fill in CPU information
- const address_space_config *spaceconfig = device().memory().space_config(m_space);
- m_pageshift = spaceconfig->m_page_shift;
- m_addrwidth = spaceconfig->m_logaddr_width;
-
- // allocate the entry array
- m_live.resize(m_fixed + m_dynamic);
- memset(&m_live[0], 0, m_live.size()*sizeof(m_live[0]));
-
- // allocate the lookup table
- m_table.resize((size_t) 1 << (m_addrwidth - m_pageshift));
- memset(&m_table[0], 0, m_table.size()*sizeof(m_table[0]));
-
- // allocate the fixed page count array
- if (m_fixed > 0)
- {
- m_fixedpages.resize(m_fixed);
- memset(&m_fixedpages[0], 0, m_fixed*sizeof(m_fixedpages[0]));
- }
-}
-
-
-//-------------------------------------------------
-// interface_post_start - work to be done after
-// actually starting a device
-//-------------------------------------------------
-
-void device_vtlb_interface::interface_post_start()
-{
- device().save_item(NAME(m_live));
- device().save_item(NAME(m_table));
- if (m_fixed > 0)
- device().save_item(NAME(m_fixedpages));
-}
-
-
-//-------------------------------------------------
-// interface_pre_reset - work to be done prior to
-// actually resetting a device
-//-------------------------------------------------
-
-void device_vtlb_interface::interface_pre_reset()
-{
- vtlb_flush_dynamic();
-}
-
-
-//**************************************************************************
-// FILLING
-//**************************************************************************
-
-//-------------------------------------------------
-// vtlb_fill - called by the CPU core in
-// response to an unmapped access
-//-------------------------------------------------
-
-int device_vtlb_interface::vtlb_fill(offs_t address, int intention)
-{
- offs_t tableindex = address >> m_pageshift;
- vtlb_entry entry = m_table[tableindex];
- offs_t taddress;
-
-#if PRINTF_TLB
- osd_printf_debug("vtlb_fill: %08X(%X) ... ", address, intention);
-#endif
-
- // should not be called here if the entry is in the table already
-// assert((entry & (1 << intention)) == 0);
-
- // if we have no dynamic entries, we always fail
- if (m_dynamic == 0)
- {
-#if PRINTF_TLB
- osd_printf_debug("failed: no dynamic entries\n");
-#endif
- return FALSE;
- }
-
- // ask the CPU core to translate for us
- taddress = address;
- if (!device().memory().translate(m_space, intention, taddress))
- {
-#if PRINTF_TLB
- osd_printf_debug("failed: no translation\n");
-#endif
- return FALSE;
- }
-
- // if this is the first successful translation for this address, allocate a new entry
- if ((entry & VTLB_FLAGS_MASK) == 0)
- {
- int liveindex = m_dynindex++ % m_dynamic;
-
- // if an entry already exists at this index, free it
- if (m_live[liveindex] != 0)
- m_table[m_live[liveindex] - 1] = 0;
-
- // claim this new entry
- m_live[liveindex] = tableindex + 1;
-
- // form a new blank entry
- entry = (taddress >> m_pageshift) << m_pageshift;
- entry |= VTLB_FLAG_VALID;
-
-#if PRINTF_TLB
- osd_printf_debug("success (%08X), new entry\n", taddress);
-#endif
- }
-
- // otherwise, ensure that different intentions do not produce different addresses
- else
- {
- assert((entry >> m_pageshift) == (taddress >> m_pageshift));
- assert(entry & VTLB_FLAG_VALID);
-
-#if PRINTF_TLB
- osd_printf_debug("success (%08X), existing entry\n", taddress);
-#endif
- }
-
- // add the intention to the list of valid intentions and store
- entry |= 1 << (intention & (TRANSLATE_TYPE_MASK | TRANSLATE_USER_MASK));
- m_table[tableindex] = entry;
- return TRUE;
-}
-
-
-//-------------------------------------------------
-// vtlb_load - load a fixed VTLB entry
-//-------------------------------------------------
-
-void device_vtlb_interface::vtlb_load(int entrynum, int numpages, offs_t address, vtlb_entry value)
-{
- offs_t tableindex = address >> m_pageshift;
- int liveindex = m_dynamic + entrynum;
- int pagenum;
-
- // must be in range
- assert(entrynum >= 0 && entrynum < m_fixed);
-
-#if PRINTF_TLB
- osd_printf_debug("vtlb_load %d for %d pages at %08X == %08X\n", entrynum, numpages, address, value);
-#endif
-
- // if an entry already exists at this index, free it
- if (m_live[liveindex] != 0)
- {
- int pagecount = m_fixedpages[entrynum];
- int oldtableindex = m_live[liveindex] - 1;
- for (pagenum = 0; pagenum < pagecount; pagenum++)
- m_table[oldtableindex + pagenum] = 0;
- }
-
- // claim this new entry
- m_live[liveindex] = tableindex + 1;
-
- // store the raw value, making sure the "fixed" flag is set
- value |= VTLB_FLAG_FIXED;
- m_fixedpages[entrynum] = numpages;
- for (pagenum = 0; pagenum < numpages; pagenum++)
- m_table[tableindex + pagenum] = value + (pagenum << m_pageshift);
-}
-
-//-------------------------------------------------
-// vtlb_dynload - load a dynamic VTLB entry
-//-------------------------------------------------
-
-void device_vtlb_interface::vtlb_dynload(UINT32 index, offs_t address, vtlb_entry value)
-{
- vtlb_entry entry = m_table[index];
-
- if (m_dynamic == 0)
- {
-#if PRINTF_TLB
- osd_printf_debug("failed: no dynamic entries\n");
-#endif
- return;
- }
-
- int liveindex = m_dynindex++ % m_dynamic;
- // is entry already live?
- if (!(entry & VTLB_FLAG_VALID))
- {
- // if an entry already exists at this index, free it
- if (m_live[liveindex] != 0)
- m_table[m_live[liveindex] - 1] = 0;
-
- // claim this new entry
- m_live[liveindex] = index + 1;
- }
- // form a new blank entry
- entry = (address >> m_pageshift) << m_pageshift;
- entry |= VTLB_FLAG_VALID | value;
-
-#if PRINTF_TLB
- osd_printf_debug("success (%08X), new entry\n", address);
-#endif
- m_table[index] = entry;
-}
-
-//**************************************************************************
-// FLUSHING
-//**************************************************************************
-
-//-------------------------------------------------
-// vtlb_flush_dynamic - flush all knowledge
-// from the dynamic part of the VTLB
-//-------------------------------------------------
-
-void device_vtlb_interface::vtlb_flush_dynamic()
-{
-#if PRINTF_TLB
- osd_printf_debug("vtlb_flush_dynamic\n");
-#endif
-
- // loop over live entries and release them from the table
- for (int liveindex = 0; liveindex < m_dynamic; liveindex++)
- if (m_live[liveindex] != 0)
- {
- offs_t tableindex = m_live[liveindex] - 1;
- m_table[tableindex] = 0;
- m_live[liveindex] = 0;
- }
-}
-
-
-//-------------------------------------------------
-// vtlb_flush_address - flush knowledge of a
-// particular address from the VTLB
-//-------------------------------------------------
-
-void device_vtlb_interface::vtlb_flush_address(offs_t address)
-{
- offs_t tableindex = address >> m_pageshift;
-
-#if PRINTF_TLB
- osd_printf_debug("vtlb_flush_address %08X\n", address);
-#endif
-
- // free the entry in the table; for speed, we leave the entry in the live array
- m_table[tableindex] = 0;
-}
-
-
-
-//**************************************************************************
-// ACCESSORS
-//**************************************************************************
-
-//-------------------------------------------------
-// vtlb_table - return a pointer to the base of
-// the linear VTLB lookup table
-//-------------------------------------------------
-
-const vtlb_entry *device_vtlb_interface::vtlb_table() const
-{
- return &m_table[0];
-}
diff --git a/src/emu/divtlb.h b/src/emu/divtlb.h
deleted file mode 100644
index eccd2947da3..00000000000
--- a/src/emu/divtlb.h
+++ /dev/null
@@ -1,89 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Aaron Giles
-/***************************************************************************
-
- divtlb.h
-
- Generic virtual TLB implementation.
-
-***************************************************************************/
-
-#pragma once
-
-#ifndef __DIVTLB_H__
-#define __DIVTLB_H__
-
-
-
-/***************************************************************************
- CONSTANTS
-***************************************************************************/
-
-#define VTLB_FLAGS_MASK 0xff
-
-#define VTLB_READ_ALLOWED 0x01 /* (1 << TRANSLATE_READ) */
-#define VTLB_WRITE_ALLOWED 0x02 /* (1 << TRANSLATE_WRITE) */
-#define VTLB_FETCH_ALLOWED 0x04 /* (1 << TRANSLATE_FETCH) */
-#define VTLB_FLAG_VALID 0x08
-#define VTLB_USER_READ_ALLOWED 0x10 /* (1 << TRANSLATE_READ_USER) */
-#define VTLB_USER_WRITE_ALLOWED 0x20 /* (1 << TRANSLATE_WRITE_USER) */
-#define VTLB_USER_FETCH_ALLOWED 0x40 /* (1 << TRANSLATE_FETCH_USER) */
-#define VTLB_FLAG_FIXED 0x80
-
-
-
-/***************************************************************************
- TYPE DEFINITIONS
-***************************************************************************/
-
-/* represents an entry in the VTLB */
-typedef UINT32 vtlb_entry;
-
-
-// ======================> device_vtlb_interface
-
-class device_vtlb_interface : public device_interface
-{
-public:
- // construction/destruction
- device_vtlb_interface(const machine_config &mconfig, device_t &device, address_spacenum space);
- virtual ~device_vtlb_interface();
-
- // configuration helpers
- void set_vtlb_dynamic_entries(int entries) { m_dynamic = entries; }
- void set_vtlb_fixed_entries(int entries) { m_fixed = entries; }
-
- // filling
- int vtlb_fill(offs_t address, int intention);
- void vtlb_load(int entrynum, int numpages, offs_t address, vtlb_entry value);
- void vtlb_dynload(UINT32 index, offs_t address, vtlb_entry value);
-
- // flushing
- void vtlb_flush_dynamic();
- void vtlb_flush_address(offs_t address);
-
- // accessors
- const vtlb_entry *vtlb_table() const;
-
-protected:
- // interface-level overrides
- virtual void interface_validity_check(validity_checker &valid) const override;
- virtual void interface_pre_start() override;
- virtual void interface_post_start() override;
- virtual void interface_pre_reset() override;
-
-private:
- // private state
- address_spacenum m_space; // address space
- int m_dynamic; // number of dynamic entries
- int m_fixed; // number of fixed entries
- int m_dynindex; // index of next dynamic entry
- int m_pageshift; // bits to shift to get page index
- int m_addrwidth; // logical address bus width
- std::vector<offs_t> m_live; // array of live entries by table index
- std::vector<int> m_fixedpages; // number of pages each fixed entry covers
- std::vector<vtlb_entry> m_table; // table of entries by address
-};
-
-
-#endif /* __VTLB_H__ */
diff --git a/src/emu/drivers/empty.cpp b/src/emu/drivers/empty.cpp
index be4f53b24a7..9c48a6c8b26 100644
--- a/src/emu/drivers/empty.cpp
+++ b/src/emu/drivers/empty.cpp
@@ -11,7 +11,6 @@
#include "emu.h"
#include "render.h"
#include "ui/selgame.h"
-#include "ui/simpleselgame.h"
//**************************************************************************
@@ -30,11 +29,7 @@ public:
virtual void machine_start() override
{
// force the UI to show the game select screen
- if (strcmp(machine().options().ui(),"simple")==0) {
- ui_simple_menu_select_game::force_game_select(machine(), &machine().render().ui_container());
- } else {
- ui_menu_select_game::force_game_select(machine(), &machine().render().ui_container());
- }
+ ui_menu_select_game::force_game_select(machine(), &machine().render().ui_container());
}
UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
diff --git a/src/emu/emualloc.cpp b/src/emu/emualloc.cpp
index f424bca39cb..a43faae522c 100644
--- a/src/emu/emualloc.cpp
+++ b/src/emu/emualloc.cpp
@@ -38,6 +38,7 @@ UINT64 resource_pool::s_id = 0;
resource_pool::resource_pool(int hash_size)
: m_hash_size(hash_size),
+ m_listlock(osd_lock_alloc()),
m_hash(hash_size),
m_ordered_head(nullptr),
m_ordered_tail(nullptr)
@@ -55,6 +56,8 @@ resource_pool::resource_pool(int hash_size)
resource_pool::~resource_pool()
{
clear();
+ if (m_listlock != nullptr)
+ osd_lock_free(m_listlock);
}
@@ -64,7 +67,7 @@ resource_pool::~resource_pool()
void resource_pool::add(resource_pool_item &item, size_t size, const char *type)
{
- std::lock_guard<std::mutex> lock(m_listlock);
+ osd_lock_acquire(m_listlock);
// insert into hash table
int hashval = reinterpret_cast<FPTR>(item.m_ptr) % m_hash_size;
@@ -104,6 +107,8 @@ void resource_pool::add(resource_pool_item &item, size_t size, const char *type)
item.m_ordered_prev = nullptr;
m_ordered_head = &item;
}
+
+ osd_lock_release(m_listlock);
}
@@ -119,7 +124,7 @@ void resource_pool::remove(void *ptr)
return;
// search for the item
- std::lock_guard<std::mutex> lock(m_listlock);
+ osd_lock_acquire(m_listlock);
int hashval = reinterpret_cast<FPTR>(ptr) % m_hash_size;
for (resource_pool_item **scanptr = &m_hash[hashval]; *scanptr != nullptr; scanptr = &(*scanptr)->m_next)
@@ -147,6 +152,8 @@ void resource_pool::remove(void *ptr)
global_free(deleteme);
break;
}
+
+ osd_lock_release(m_listlock);
}
@@ -158,7 +165,7 @@ void resource_pool::remove(void *ptr)
resource_pool_item *resource_pool::find(void *ptr)
{
// search for the item
- std::lock_guard<std::mutex> lock(m_listlock);
+ osd_lock_acquire(m_listlock);
int hashval = reinterpret_cast<FPTR>(ptr) % m_hash_size;
resource_pool_item *item;
@@ -166,6 +173,8 @@ resource_pool_item *resource_pool::find(void *ptr)
if (item->m_ptr == ptr)
break;
+ osd_lock_release(m_listlock);
+
return item;
}
@@ -181,7 +190,7 @@ bool resource_pool::contains(void *_ptrstart, void *_ptrend)
UINT8 *ptrend = reinterpret_cast<UINT8 *>(_ptrend);
// search for the item
- std::lock_guard<std::mutex> lock(m_listlock);
+ osd_lock_acquire(m_listlock);
resource_pool_item *item = nullptr;
for (item = m_ordered_head; item != nullptr; item = item->m_ordered_next)
@@ -189,9 +198,13 @@ bool resource_pool::contains(void *_ptrstart, void *_ptrend)
UINT8 *objstart = reinterpret_cast<UINT8 *>(item->m_ptr);
UINT8 *objend = objstart + item->m_size;
if (ptrstart >= objstart && ptrend <= objend)
- return true;
+ goto found;
}
- return false;
+
+found:
+ osd_lock_release(m_listlock);
+
+ return (item != nullptr);
}
@@ -201,8 +214,12 @@ bool resource_pool::contains(void *_ptrstart, void *_ptrend)
void resource_pool::clear()
{
+ osd_lock_acquire(m_listlock);
+
// important: delete from earliest to latest; this allows objects to clean up after
// themselves if they wish
while (m_ordered_head != nullptr)
remove(m_ordered_head->m_ptr);
+
+ osd_lock_release(m_listlock);
}
diff --git a/src/emu/emualloc.h b/src/emu/emualloc.h
index 37b5c63d860..4571762054f 100644
--- a/src/emu/emualloc.h
+++ b/src/emu/emualloc.h
@@ -14,7 +14,6 @@
#define __EMUALLOC_H__
#include <new>
-#include <mutex>
#include "osdcore.h"
#include "coretmpl.h"
@@ -125,7 +124,7 @@ public:
private:
int m_hash_size;
- std::mutex m_listlock;
+ osd_lock * m_listlock;
std::vector<resource_pool_item *> m_hash;
resource_pool_item * m_ordered_head;
resource_pool_item * m_ordered_tail;
diff --git a/src/emu/emuopts.cpp b/src/emu/emuopts.cpp
index 97e107ebb49..aa1b0482edc 100644
--- a/src/emu/emuopts.cpp
+++ b/src/emu/emuopts.cpp
@@ -11,7 +11,6 @@
#include "emu.h"
#include "emuopts.h"
#include "drivenum.h"
-#include "softlist.h"
#include <ctype.h>
@@ -43,7 +42,6 @@ const options_entry emu_options::s_option_entries[] =
{ OPTION_FONTPATH, ".", OPTION_STRING, "path to font files" },
{ OPTION_CHEATPATH, "cheat", OPTION_STRING, "path to cheat files" },
{ OPTION_CROSSHAIRPATH, "crosshair", OPTION_STRING, "path to crosshair files" },
- { OPTION_PLUGINSPATH, "plugins", OPTION_STRING, "path to plugin files" },
// output directory options
{ nullptr, nullptr, OPTION_HEADER, "CORE OUTPUT DIRECTORY OPTIONS" },
@@ -51,7 +49,7 @@ const options_entry emu_options::s_option_entries[] =
{ OPTION_NVRAM_DIRECTORY, "nvram", OPTION_STRING, "directory to save nvram contents" },
{ OPTION_INPUT_DIRECTORY, "inp", OPTION_STRING, "directory to save input device logs" },
{ OPTION_STATE_DIRECTORY, "sta", OPTION_STRING, "directory to save states" },
- { OPTION_SNAPSHOT_DIRECTORY, "snap", OPTION_STRING, "directory to save/load screenshots" },
+ { OPTION_SNAPSHOT_DIRECTORY, "snap", OPTION_STRING, "directory to save screenshots" },
{ OPTION_DIFF_DIRECTORY, "diff", OPTION_STRING, "directory to save hard drive image difference files" },
{ OPTION_COMMENT_DIRECTORY, "comments", OPTION_STRING, "directory to save debugger comments" },
@@ -61,9 +59,6 @@ const options_entry emu_options::s_option_entries[] =
{ OPTION_AUTOSAVE, "0", OPTION_BOOLEAN, "enable automatic restore at startup, and automatic save at exit time" },
{ OPTION_PLAYBACK ";pb", nullptr, OPTION_STRING, "playback an input file" },
{ OPTION_RECORD ";rec", nullptr, OPTION_STRING, "record an input file" },
- { OPTION_RECORD_TIMECODE, "0", OPTION_BOOLEAN, "record an input timecode file (requires -record option)" },
- { OPTION_EXIT_AFTER_PLAYBACK, "0", OPTION_BOOLEAN, "close the program at the end of playback" },
-
{ OPTION_MNGWRITE, nullptr, OPTION_STRING, "optional filename to write a MNG movie of the current session" },
{ OPTION_AVIWRITE, nullptr, OPTION_STRING, "optional filename to write an AVI movie of the current session" },
#ifdef MAME_DEBUG
@@ -182,8 +177,11 @@ const options_entry emu_options::s_option_entries[] =
{ OPTION_DRC_LOG_NATIVE, "0", OPTION_BOOLEAN, "write DRC native disassembly log" },
{ OPTION_BIOS, nullptr, OPTION_STRING, "select the system BIOS to use" },
{ OPTION_CHEAT ";c", "0", OPTION_BOOLEAN, "enable cheat subsystem" },
- { OPTION_UI, "cabinet", OPTION_STRING, "type of UI (simple|cabinet)" },
+ { OPTION_SKIP_GAMEINFO, "0", OPTION_BOOLEAN, "skip displaying the information screen at startup" },
+ { OPTION_UI_FONT, "default", OPTION_STRING, "specify a font to use" },
{ OPTION_RAMSIZE ";ram", nullptr, OPTION_STRING, "size of RAM (if supported by driver)" },
+ { OPTION_CONFIRM_QUIT, "0", OPTION_BOOLEAN, "display confirm quit screen on exit" },
+ { OPTION_UI_MOUSE, "0", OPTION_BOOLEAN, "display ui mouse cursor" },
{ OPTION_AUTOBOOT_COMMAND ";ab", nullptr, OPTION_STRING, "command to execute after machine boot" },
{ OPTION_AUTOBOOT_DELAY, "2", OPTION_INTEGER, "timer delay in sec to trigger command execution on autoboot" },
{ OPTION_AUTOBOOT_SCRIPT ";script", nullptr, OPTION_STRING, "lua script to execute after machine boot" },
@@ -207,8 +205,6 @@ emu_options::emu_options()
, m_joystick_contradictory(false)
, m_sleep(true)
, m_refresh_speed(false)
-, m_slot_options(0)
-, m_device_options(0)
{
add_entries(emu_options::s_option_entries);
}
@@ -219,17 +215,18 @@ emu_options::emu_options()
// options for the configured system
//-------------------------------------------------
-bool emu_options::add_slot_options(const software_part *swpart)
+bool emu_options::add_slot_options(bool isfirstpass)
{
// look up the system configured by name; if no match, do nothing
const game_driver *cursystem = system();
if (cursystem == nullptr)
return false;
-
- // create the configuration
machine_config config(*cursystem, *this);
// iterate through all slot devices
+ bool first = true;
+
+ // create the configuration
int starting_count = options_count();
slot_interface_iterator iter(config.root_device());
for (const device_slot_interface *slot = iter.first(); slot != nullptr; slot = iter.next())
@@ -239,8 +236,9 @@ bool emu_options::add_slot_options(const software_part *swpart)
continue;
// first device? add the header as to be pretty
- if (m_slot_options++ == 0)
+ if (isfirstpass && first)
add_entry(nullptr, "SLOT DEVICES", OPTION_HEADER | OPTION_FLAG_DEVICE);
+ first = false;
// retrieve info about the device instance
const char *name = slot->device().tag() + 1;
@@ -257,15 +255,6 @@ bool emu_options::add_slot_options(const software_part *swpart)
}
add_entry(name, nullptr, flags, defvalue, true);
}
-
- // allow software lists to supply their own defaults
- if (swpart != nullptr)
- {
- std::string featurename = std::string(name).append("_default");
- const char *value = swpart->feature(featurename.c_str());
- if (value != nullptr && (*value == '\0' || slot->option(value) != nullptr))
- set_default_value(name, value);
- }
}
return (options_count() != starting_count);
}
@@ -276,7 +265,7 @@ bool emu_options::add_slot_options(const software_part *swpart)
// depending of image mounted
//-------------------------------------------------
-void emu_options::update_slot_options(const software_part *swpart)
+void emu_options::update_slot_options()
{
// look up the system configured by name; if no match, do nothing
const game_driver *cursystem = system();
@@ -301,8 +290,8 @@ void emu_options::update_slot_options(const software_part *swpart)
}
}
}
- while (add_slot_options(swpart)) { }
- add_device_options();
+ while (add_slot_options(false)) { }
+ add_device_options(false);
}
@@ -311,7 +300,7 @@ void emu_options::update_slot_options(const software_part *swpart)
// options for the configured system
//-------------------------------------------------
-void emu_options::add_device_options()
+void emu_options::add_device_options(bool isfirstpass)
{
// look up the system configured by name; if no match, do nothing
const game_driver *cursystem = system();
@@ -320,12 +309,14 @@ void emu_options::add_device_options()
machine_config config(*cursystem, *this);
// iterate through all image devices
+ bool first = true;
image_interface_iterator iter(config.root_device());
for (const device_image_interface *image = iter.first(); image != nullptr; image = iter.next())
{
// first device? add the header as to be pretty
- if (m_device_options++ == 0)
+ if (first && isfirstpass)
add_entry(nullptr, "IMAGE DEVICES", OPTION_HEADER | OPTION_FLAG_DEVICE);
+ first = false;
// retrieve info about the device instance
std::string option_name;
@@ -357,10 +348,6 @@ void emu_options::remove_device_options()
if ((curentry->flags() & OPTION_FLAG_DEVICE) != 0)
remove_entry(*curentry);
}
-
- // reset counters
- m_slot_options = 0;
- m_device_options = 0;
}
@@ -369,7 +356,7 @@ void emu_options::remove_device_options()
// and update slot and image devices
//-------------------------------------------------
-bool emu_options::parse_slot_devices(int argc, char *argv[], std::string &error_string, const char *name, const char *value, const software_part *swpart)
+bool emu_options::parse_slot_devices(int argc, char *argv[], std::string &error_string, const char *name, const char *value)
{
// an initial parse to capture the initial set of values
bool result;
@@ -377,13 +364,15 @@ bool emu_options::parse_slot_devices(int argc, char *argv[], std::string &error_
core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string);
// keep adding slot options until we stop seeing new stuff
- m_slot_options = 0;
- while (add_slot_options(swpart))
+ bool isfirstpass = true;
+ while (add_slot_options(isfirstpass))
+ {
core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string);
+ isfirstpass = false;
+ }
// add device options and reparse
- m_device_options = 0;
- add_device_options();
+ add_device_options(true);
if (name != nullptr && exists(name))
set_value(name, value, OPTION_PRIORITY_CMDLINE, error_string);
core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string);
@@ -391,7 +380,7 @@ bool emu_options::parse_slot_devices(int argc, char *argv[], std::string &error_
int num;
do {
num = options_count();
- update_slot_options(swpart);
+ update_slot_options();
result = core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string);
} while (num != options_count());
@@ -410,7 +399,7 @@ bool emu_options::parse_command_line(int argc, char *argv[], std::string &error_
{
// parse as normal
core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string);
- bool result = parse_slot_devices(argc, argv, error_string);
+ bool result = parse_slot_devices(argc, argv, error_string, nullptr, nullptr);
update_cached_options();
return result;
}
@@ -534,10 +523,11 @@ void emu_options::set_system_name(const char *name)
// remove any existing device options and then add them afresh
remove_device_options();
- while (add_slot_options()) { }
+ if (add_slot_options(true))
+ while (add_slot_options(false)) { }
// then add the options
- add_device_options();
+ add_device_options(true);
int num;
do {
num = options_count();
diff --git a/src/emu/emuopts.h b/src/emu/emuopts.h
index c8bbc58435a..14597d0e67d 100644
--- a/src/emu/emuopts.h
+++ b/src/emu/emuopts.h
@@ -56,7 +56,6 @@ enum
#define OPTION_FONTPATH "fontpath"
#define OPTION_CHEATPATH "cheatpath"
#define OPTION_CROSSHAIRPATH "crosshairpath"
-#define OPTION_PLUGINSPATH "pluginspath"
// core directory options
#define OPTION_CFG_DIRECTORY "cfg_directory"
@@ -72,8 +71,6 @@ enum
#define OPTION_AUTOSAVE "autosave"
#define OPTION_PLAYBACK "playback"
#define OPTION_RECORD "record"
-#define OPTION_RECORD_TIMECODE "record_timecode"
-#define OPTION_EXIT_AFTER_PLAYBACK "exit_after_playback"
#define OPTION_MNGWRITE "mngwrite"
#define OPTION_AVIWRITE "aviwrite"
#ifdef MAME_DEBUG
@@ -175,7 +172,8 @@ enum
#define OPTION_DRC_LOG_NATIVE "drc_log_native"
#define OPTION_BIOS "bios"
#define OPTION_CHEAT "cheat"
-#define OPTION_UI "ui"
+#define OPTION_SKIP_GAMEINFO "skip_gameinfo"
+#define OPTION_UI_FONT "uifont"
#define OPTION_RAMSIZE "ramsize"
// core comm options
@@ -184,6 +182,9 @@ enum
#define OPTION_COMM_REMOTE_HOST "comm_remotehost"
#define OPTION_COMM_REMOTE_PORT "comm_remoteport"
+#define OPTION_CONFIRM_QUIT "confirm_quit"
+#define OPTION_UI_MOUSE "ui_mouse"
+
#define OPTION_AUTOBOOT_COMMAND "autoboot_command"
#define OPTION_AUTOBOOT_DELAY "autoboot_delay"
#define OPTION_AUTOBOOT_SCRIPT "autoboot_script"
@@ -196,7 +197,6 @@ enum
// forward references
struct game_driver;
-class software_part;
class emu_options : public core_options
@@ -210,7 +210,7 @@ public:
// parsing wrappers
bool parse_command_line(int argc, char *argv[], std::string &error_string);
void parse_standard_inis(std::string &error_string);
- bool parse_slot_devices(int argc, char *argv[], std::string &error_string, const char *name = nullptr, const char *value = nullptr, const software_part *swpart = nullptr);
+ bool parse_slot_devices(int argc, char *argv[], std::string &error_string, const char *name, const char *value);
// core options
const char *system_name() const { return value(OPTION_SYSTEMNAME); }
@@ -232,7 +232,6 @@ public:
const char *font_path() const { return value(OPTION_FONTPATH); }
const char *cheat_path() const { return value(OPTION_CHEATPATH); }
const char *crosshair_path() const { return value(OPTION_CROSSHAIRPATH); }
- const char *plugins_path() const { return value(OPTION_PLUGINSPATH); }
// core directory options
const char *cfg_directory() const { return value(OPTION_CFG_DIRECTORY); }
@@ -248,8 +247,6 @@ public:
bool autosave() const { return bool_value(OPTION_AUTOSAVE); }
const char *playback() const { return value(OPTION_PLAYBACK); }
const char *record() const { return value(OPTION_RECORD); }
- bool record_timecode() const { return bool_value(OPTION_RECORD_TIMECODE); }
- bool exit_after_playback() const { return bool_value(OPTION_EXIT_AFTER_PLAYBACK); }
const char *mng_write() const { return value(OPTION_MNGWRITE); }
const char *avi_write() const { return value(OPTION_AVIWRITE); }
#ifdef MAME_DEBUG
@@ -349,7 +346,8 @@ public:
bool drc_log_native() const { return bool_value(OPTION_DRC_LOG_NATIVE); }
const char *bios() const { return value(OPTION_BIOS); }
bool cheat() const { return bool_value(OPTION_CHEAT); }
- const char *ui() const { return value(OPTION_UI); }
+ bool skip_gameinfo() const { return bool_value(OPTION_SKIP_GAMEINFO); }
+ const char *ui_font() const { return value(OPTION_UI_FONT); }
const char *ram_size() const { return value(OPTION_RAMSIZE); }
// core comm options
@@ -357,7 +355,10 @@ public:
const char *comm_localport() const { return value(OPTION_COMM_LOCAL_PORT); }
const char *comm_remotehost() const { return value(OPTION_COMM_REMOTE_HOST); }
const char *comm_remoteport() const { return value(OPTION_COMM_REMOTE_PORT); }
-
+
+ bool confirm_quit() const { return bool_value(OPTION_CONFIRM_QUIT); }
+ bool ui_mouse() const { return bool_value(OPTION_UI_MOUSE); }
+
const char *autoboot_command() const { return value(OPTION_AUTOBOOT_COMMAND); }
int autoboot_delay() const { return int_value(OPTION_AUTOBOOT_DELAY); }
const char *autoboot_script() const { return value(OPTION_AUTOBOOT_SCRIPT); }
@@ -369,13 +370,12 @@ public:
std::string main_value(const char *option) const;
std::string sub_value(const char *name, const char *subname) const;
- bool add_slot_options(const software_part *swpart = nullptr);
-
+ bool add_slot_options(bool isfirst);
private:
// device-specific option handling
- void add_device_options();
- void update_slot_options(const software_part *swpart = nullptr);
+ void add_device_options(bool isfirst);
+ void update_slot_options();
// INI parsing helper
bool parse_one_ini(const char *basename, int priority, std::string *error_string = nullptr);
@@ -390,8 +390,6 @@ private:
bool m_joystick_contradictory;
bool m_sleep;
bool m_refresh_speed;
- int m_slot_options;
- int m_device_options;
};
diff --git a/src/emu/info.cpp b/src/emu/info.cpp
index 111022ae223..4bae0daf37a 100644
--- a/src/emu/info.cpp
+++ b/src/emu/info.cpp
@@ -19,9 +19,6 @@
#include <ctype.h>
-#define XML_ROOT "mame"
-#define XML_TOP "machine"
-
//**************************************************************************
// GLOBAL VARIABLES
//**************************************************************************
@@ -191,15 +188,15 @@ info_xml_creator::info_xml_creator(driver_enumerator &drivlist)
// for all known games
//-------------------------------------------------
-void info_xml_creator::output(FILE *out, bool nodevices)
+void info_xml_creator::output(FILE *out)
{
m_output = out;
// output the DTD
fprintf(m_output, "<?xml version=\"1.0\"?>\n");
std::string dtd(s_dtd_string);
- strreplace(dtd, "__XML_ROOT__", XML_ROOT);
- strreplace(dtd, "__XML_TOP__", XML_TOP);
+ strreplace(dtd, "__XML_ROOT__", emulator_info::get_xml_root());
+ strreplace(dtd, "__XML_TOP__", emulator_info::get_xml_top());
fprintf(m_output, "%s\n\n", dtd.c_str());
@@ -211,7 +208,7 @@ void info_xml_creator::output(FILE *out, bool nodevices)
"no"
#endif
"\" mameconfig=\"%d\">\n",
- XML_ROOT,
+ emulator_info::get_xml_root(),
xml_normalize_string(build_version),
CONFIG_VERSION
);
@@ -221,11 +218,10 @@ void info_xml_creator::output(FILE *out, bool nodevices)
output_one();
// output devices (both devices with roms and slot devices)
- if (!nodevices)
- output_devices();
+ output_devices();
// close the top level tag
- fprintf(m_output, "</%s>\n",XML_ROOT);
+ fprintf(m_output, "</%s>\n",emulator_info::get_xml_root());
}
@@ -250,7 +246,7 @@ void info_xml_creator::output_one()
portlist.append(*device, errors);
// print the header and the game name
- fprintf(m_output, "\t<%s",XML_TOP);
+ fprintf(m_output, "\t<%s",emulator_info::get_xml_top());
fprintf(m_output, " name=\"%s\"", xml_normalize_string(driver.name));
// strip away any path information from the source_file and output it
@@ -312,7 +308,7 @@ void info_xml_creator::output_one()
output_ramoptions();
// close the topmost tag
- fprintf(m_output, "\t</%s>\n",XML_TOP);
+ fprintf(m_output, "\t</%s>\n",emulator_info::get_xml_top());
}
@@ -344,7 +340,7 @@ void info_xml_creator::output_one_device(device_t &device, const char *devtag)
}
// start to output info
- fprintf(m_output, "\t<%s", XML_TOP);
+ fprintf(m_output, "\t<%s", emulator_info::get_xml_top());
fprintf(m_output, " name=\"%s\"", xml_normalize_string(device.shortname()));
std::string src(device.source());
strreplace(src,"../", "");
@@ -371,7 +367,7 @@ void info_xml_creator::output_one_device(device_t &device, const char *devtag)
output_adjusters(portlist);
output_images(device, devtag);
output_slots(device, devtag);
- fprintf(m_output, "\t</%s>\n", XML_TOP);
+ fprintf(m_output, "\t</%s>\n", emulator_info::get_xml_top());
}
diff --git a/src/emu/info.h b/src/emu/info.h
index 78082ec033b..0607acf9d7e 100644
--- a/src/emu/info.h
+++ b/src/emu/info.h
@@ -28,7 +28,7 @@ public:
info_xml_creator(driver_enumerator &drivlist);
// output
- void output(FILE *out, bool nodevices = false);
+ void output(FILE *out);
private:
// internal helper
diff --git a/src/emu/inpttype.h b/src/emu/inpttype.h
index 4d711e4d676..7a07ea777b6 100644
--- a/src/emu/inpttype.h
+++ b/src/emu/inpttype.h
@@ -716,8 +716,7 @@ void construct_core_types_UI(simple_list<input_type_entry> &typelist)
INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_ON_SCREEN_DISPLAY,"On Screen Display", input_seq(KEYCODE_TILDE) )
INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_DEBUG_BREAK, "Break in Debugger", input_seq(KEYCODE_TILDE) )
INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_CONFIGURE, "Config Menu", input_seq(KEYCODE_TAB) )
- INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_PAUSE, "Pause", input_seq(KEYCODE_P, input_seq::not_code, KEYCODE_LSHIFT, input_seq::not_code, KEYCODE_RSHIFT) )
- INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_PAUSE_SINGLE, "Pause - Single Step", input_seq(KEYCODE_P, KEYCODE_LSHIFT, input_seq::or_code, KEYCODE_P, KEYCODE_RSHIFT) )
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_PAUSE, "Pause", input_seq(KEYCODE_P) )
INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_RESET_MACHINE, "Reset Game", input_seq(KEYCODE_F3, KEYCODE_LSHIFT) )
INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_SOFT_RESET, "Soft Reset", input_seq(KEYCODE_F3, input_seq::not_code, KEYCODE_LSHIFT) )
INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_SHOW_GFX, "Show Gfx", input_seq(KEYCODE_F4) )
@@ -727,14 +726,12 @@ void construct_core_types_UI(simple_list<input_type_entry> &typelist)
INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_FAST_FORWARD, "Fast Forward", input_seq(KEYCODE_INSERT) )
INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_SHOW_FPS, "Show FPS", input_seq(KEYCODE_F11, input_seq::not_code, KEYCODE_LSHIFT) )
INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_SNAPSHOT, "Save Snapshot", input_seq(KEYCODE_F12, input_seq::not_code, KEYCODE_LSHIFT) )
- INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_TIMECODE, "Write current timecode", input_seq(KEYCODE_F12, input_seq::not_code, KEYCODE_LSHIFT) )
INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_RECORD_MOVIE, "Record Movie", input_seq(KEYCODE_F12, KEYCODE_LSHIFT) )
INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_TOGGLE_CHEAT, "Toggle Cheat", input_seq(KEYCODE_F6) )
- INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_TOGGLE_AUTOFIRE, "Toggle Autofire", input_seq() )
INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_UP, "UI Up", input_seq(KEYCODE_UP, input_seq::or_code, JOYCODE_Y_UP_SWITCH_INDEXED(0)) )
INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_DOWN, "UI Down", input_seq(KEYCODE_DOWN, input_seq::or_code, JOYCODE_Y_DOWN_SWITCH_INDEXED(0)) )
INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_LEFT, "UI Left", input_seq(KEYCODE_LEFT, input_seq::or_code, JOYCODE_X_LEFT_SWITCH_INDEXED(0)) )
- INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_RIGHT, "UI Right", input_seq(KEYCODE_RIGHT, input_seq::not_code, KEYCODE_LCONTROL, input_seq::or_code, JOYCODE_X_RIGHT_SWITCH_INDEXED(0), input_seq::not_code, KEYCODE_LCONTROL) )
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_RIGHT, "UI Right", input_seq(KEYCODE_RIGHT, input_seq::or_code, JOYCODE_X_RIGHT_SWITCH_INDEXED(0)) )
INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_HOME, "UI Home", input_seq(KEYCODE_HOME) )
INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_END, "UI End", input_seq(KEYCODE_END) )
INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_PAGE_UP, "UI Page Up", input_seq(KEYCODE_PGUP) )
@@ -756,17 +753,6 @@ void construct_core_types_UI(simple_list<input_type_entry> &typelist)
INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_LOAD_STATE, "Load State", input_seq(KEYCODE_F7, input_seq::not_code, KEYCODE_LSHIFT) )
INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_TAPE_START, "UI (First) Tape Start", input_seq(KEYCODE_F2, input_seq::not_code, KEYCODE_LSHIFT) )
INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_TAPE_STOP, "UI (First) Tape Stop", input_seq(KEYCODE_F2, KEYCODE_LSHIFT) )
- INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_DATS, "UI External DAT View", input_seq(KEYCODE_LALT, KEYCODE_D) )
- INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_FAVORITES, "UI Add/Remove favorites",input_seq(KEYCODE_LALT, KEYCODE_F) )
- INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_UP_FILTER, NULL, input_seq() )
- INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_DOWN_FILTER, NULL, input_seq() )
- INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_LEFT_PANEL, NULL, input_seq() )
- INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_RIGHT_PANEL, "UI Right switch image/info", input_seq(KEYCODE_RIGHT, KEYCODE_LCONTROL) )
- INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_UP_PANEL, NULL, input_seq() )
- INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_DOWN_PANEL, NULL, input_seq() )
- INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_EXPORT, "UI Export list to xml", input_seq(KEYCODE_LALT, KEYCODE_E) )
- INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_AUDIT_FAST, "UI Audit Unavailable", input_seq(KEYCODE_F1, input_seq::not_code, KEYCODE_LSHIFT) )
- INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_AUDIT_ALL, "UI Audit All", input_seq(KEYCODE_F1, KEYCODE_LSHIFT) )
}
void construct_core_types_OSD(simple_list<input_type_entry> &typelist)
diff --git a/src/emu/ioport.cpp b/src/emu/ioport.cpp
index a898a10051b..282cc5c256c 100644
--- a/src/emu/ioport.cpp
+++ b/src/emu/ioport.cpp
@@ -1699,7 +1699,6 @@ void ioport_field::get_user_settings(user_settings &settings)
else
{
settings.toggle = m_live->toggle;
- settings.autofire = m_live->autofire;
}
}
@@ -1738,7 +1737,6 @@ void ioport_field::set_user_settings(const user_settings &settings)
else
{
m_live->toggle = settings.toggle;
- m_live->autofire = settings.autofire;
}
}
@@ -1906,19 +1904,6 @@ void ioport_field::frame_update(ioport_value &result, bool mouse_down)
// if the state changed, look for switch down/switch up
bool curstate = mouse_down || machine().input().seq_pressed(seq()) || m_digital_value;
- if (m_live->autofire && !machine().ioport().get_autofire_toggle())
- {
- if (curstate)
- {
- if (m_live->autopressed > machine().ioport().get_autofire_delay())
- m_live->autopressed = 0;
- else if (m_live->autopressed > machine().ioport().get_autofire_delay() / 2)
- curstate = false;
- m_live->autopressed++;
- }
- else
- m_live->autopressed = 0;
- }
bool changed = false;
if (curstate != m_live->last)
{
@@ -2171,9 +2156,7 @@ ioport_field_live::ioport_field_live(ioport_field &field, analog_field *analog)
impulse(0),
last(0),
toggle(field.toggle()),
- joydir(digital_joystick::JOYDIR_COUNT),
- autofire(false),
- autopressed(0)
+ joydir(digital_joystick::JOYDIR_COUNT)
{
// fill in the basic values
for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; ++seqtype)
@@ -2471,15 +2454,10 @@ ioport_manager::ioport_manager(running_machine &machine)
m_playback_file(machine.options().input_directory(), OPEN_FLAG_READ),
m_playback_accumulated_speed(0),
m_playback_accumulated_frames(0),
- m_timecode_file(machine.options().input_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS),
- m_timecode_count(0),
- m_timecode_last_time(attotime::zero),
m_has_configs(false),
m_has_analog(false),
m_has_dips(false),
- m_has_bioses(false),
- m_autofire_toggle(false),
- m_autofire_delay(3) // 1 seems too fast for a bunch of games
+ m_has_bioses(false)
{
memset(m_type_to_entry, 0, sizeof(m_type_to_entry));
}
@@ -2586,7 +2564,6 @@ time_t ioport_manager::initialize()
// open playback and record files if specified
time_t basetime = playback_init();
record_init();
- timecode_init();
return basetime;
}
@@ -2680,7 +2657,6 @@ void ioport_manager::exit()
// close any playback or recording files
playback_end();
record_end();
- timecode_end();
}
@@ -3424,7 +3400,7 @@ time_t ioport_manager::playback_init()
// verify the header against the current game
if (memcmp(machine().system().name, header + 0x14, strlen(machine().system().name) + 1) != 0)
- osd_printf_info("Input file is for machine '%s', not for current machine '%s'\n", header + 0x14, machine().system().name);
+ osd_printf_info("Input file is for %s '%s', not for current %s '%s'\n", emulator_info::get_gamenoun(), header + 0x14, emulator_info::get_gamenoun(), machine().system().name);
// enable compression
m_playback_file.compress(FCOMPRESS_MEDIUM);
@@ -3452,12 +3428,6 @@ void ioport_manager::playback_end(const char *message)
m_playback_accumulated_speed /= m_playback_accumulated_frames;
osd_printf_info("Total playback frames: %d\n", UINT32(m_playback_accumulated_frames));
osd_printf_info("Average recorded speed: %d%%\n", UINT32((m_playback_accumulated_speed * 200 + 1) >> 21));
-
- // close the program at the end of inp file playback
- if (machine().options().exit_after_playback()) {
- osd_printf_info("Exiting MAME now...\n");
- machine().schedule_exit();
- }
}
}
@@ -3540,29 +3510,6 @@ void ioport_manager::record_write<bool>(bool value)
record_write(byte);
}
-template<typename _Type>
-void ioport_manager::timecode_write(_Type value)
-{
- // protect against NULL handles if previous reads fail
- if (!m_timecode_file.is_open())
- return;
-
- // read the value; if we fail, end playback
- if (m_timecode_file.write(&value, sizeof(value)) != sizeof(value))
- timecode_end("Out of space");
-}
-
-/*template<>
-void ioport_manager::timecode_write<bool>(bool value)
-{
- UINT8 byte = UINT8(value);
- timecode_write(byte);
-}*/
-template<>
-void ioport_manager::timecode_write<std::string>(std::string value) {
- timecode_write(value.c_str());
-}
-
//-------------------------------------------------
// record_init - initialize INP recording
@@ -3607,44 +3554,6 @@ void ioport_manager::record_init()
}
-void ioport_manager::timecode_init() {
- // check if option -record_timecode is enabled
- if (!machine().options().record_timecode()) {
- machine().video().set_timecode_enabled(false);
- return;
- }
- // if no file, nothing to do
- const char *record_filename = machine().options().record();
- if (record_filename[0] == 0) {
- machine().video().set_timecode_enabled(false);
- return;
- }
-
- machine().video().set_timecode_enabled(true);
-
- // open the record file
- std::string filename;
- filename.append(record_filename).append(".timecode");
- osd_printf_info("Record input timecode file: %s\n", record_filename);
-
- file_error filerr = m_timecode_file.open(filename.c_str());
- assert_always(filerr == FILERR_NONE, "Failed to open file for input timecode recording");
-
- m_timecode_file.puts(std::string("# ==========================================\n").c_str());
- m_timecode_file.puts(std::string("# TIMECODE FILE FOR VIDEO PREVIEW GENERATION\n").c_str());
- m_timecode_file.puts(std::string("# ==========================================\n").c_str());
- m_timecode_file.puts(std::string("#\n").c_str());
- m_timecode_file.puts(std::string("# VIDEO_PART: code of video timecode\n").c_str());
- m_timecode_file.puts(std::string("# START: start time (hh:mm:ss.mmm)\n").c_str());
- m_timecode_file.puts(std::string("# ELAPSED: elapsed time (hh:mm:ss.mmm)\n").c_str());
- m_timecode_file.puts(std::string("# MSEC_START: start time (milliseconds)\n").c_str());
- m_timecode_file.puts(std::string("# MSEC_ELAPSED: elapsed time (milliseconds)\n").c_str());
- m_timecode_file.puts(std::string("# FRAME_START: start time (frames)\n").c_str());
- m_timecode_file.puts(std::string("# FRAME_ELAPSED: elapsed time (frames)\n").c_str());
- m_timecode_file.puts(std::string("#\n").c_str());
- m_timecode_file.puts(std::string("# VIDEO_PART======= START======= ELAPSED===== MSEC_START===== MSEC_ELAPSED=== FRAME_START==== FRAME_ELAPSED==\n").c_str());
-}
-
//-------------------------------------------------
// record_end - end INP recording
//-------------------------------------------------
@@ -3664,19 +3573,6 @@ void ioport_manager::record_end(const char *message)
}
-void ioport_manager::timecode_end(const char *message)
-{
- // only applies if we have a live file
- if (m_timecode_file.is_open()) {
- // close the file
- m_timecode_file.close();
-
- // pop a message
- if (message != nullptr)
- machine().popmessage("Recording Timecode Ended\nReason: %s", message);
- }
-}
-
//-------------------------------------------------
// record_frame - start of frame callback for
// recording
@@ -3694,114 +3590,6 @@ void ioport_manager::record_frame(const attotime &curtime)
// then the current speed
record_write(UINT32(machine().video().speed_percent() * double(1 << 20)));
}
-
- if (m_timecode_file.is_open() && machine().video().get_timecode_write()) {
- // Display the timecode
- std::string current_time_str;
- m_timecode_count++;
- strcatprintf(current_time_str, "%02d:%02d:%02d.%03d",
- (int)curtime.seconds() / (60 * 60),
- (curtime.seconds() / 60) % 60,
- curtime.seconds() % 60,
- (int)(curtime.attoseconds()/ATTOSECONDS_PER_MILLISECOND));
-
- // Elapsed from previous timecode
- attotime elapsed_time = curtime - m_timecode_last_time;
- m_timecode_last_time = curtime;
- std::string elapsed_time_str;
- strcatprintf(elapsed_time_str, "%02d:%02d:%02d.%03d",
- elapsed_time.seconds() / (60 * 60),
- (elapsed_time.seconds() / 60) % 60,
- elapsed_time.seconds() % 60,
- int(elapsed_time.attoseconds()/ATTOSECONDS_PER_MILLISECOND));
-
- // Number of ms from beginning of playback
- int mseconds_start = curtime.seconds()*1000 + curtime.attoseconds()/ATTOSECONDS_PER_MILLISECOND;
- std::string mseconds_start_str;
- strcatprintf(mseconds_start_str, "%015d", mseconds_start);
-
- // Number of ms from previous timecode
- int mseconds_elapsed = elapsed_time.seconds()*1000 + elapsed_time.attoseconds()/ATTOSECONDS_PER_MILLISECOND;
- std::string mseconds_elapsed_str;
- strcatprintf(mseconds_elapsed_str, "%015d", mseconds_elapsed);
-
- // Number of frames from beginning of playback
- int frame_start = mseconds_start * 60 / 1000;
- std::string frame_start_str;
- strcatprintf(frame_start_str, "%015d", frame_start);
-
- // Number of frames from previous timecode
- int frame_elapsed = mseconds_elapsed * 60 / 1000;
- std::string frame_elapsed_str;
- strcatprintf(frame_elapsed_str, "%015d", frame_elapsed);
-
- std::string message;
- std::string timecode_text;
- std::string timecode_key;
- bool show_timecode_counter = false;
- if (m_timecode_count==1) {
- message += "TIMECODE: Intro started at " + current_time_str;
- timecode_key = "INTRO_START";
- timecode_text = "INTRO";
- show_timecode_counter = true;
- }
- else if (m_timecode_count==2) {
- message += "TIMECODE: Intro duration " + elapsed_time_str;
- timecode_key = "INTRO_STOP";
- machine().video().add_to_total_time(elapsed_time);
- //timecode_text += "INTRO";
- }
- else if (m_timecode_count==3) {
- message += "TIMECODE: Gameplay started at " + current_time_str;
- timecode_key = "GAMEPLAY_START";
- timecode_text += "GAMEPLAY";
- show_timecode_counter = true;
- }
- else if (m_timecode_count==4) {
- message += "TIMECODE: Gameplay duration " + elapsed_time_str;
- timecode_key = "GAMEPLAY_STOP";
- machine().video().add_to_total_time(elapsed_time);
- //timecode_text += "GAMEPLAY";
- }
- else if (m_timecode_count % 2 == 1) {
- std::string timecode_count_str;
- strcatprintf(timecode_count_str, "%03d", (m_timecode_count-3)/2);
- timecode_key = "EXTRA_START_" + timecode_count_str;
- timecode_count_str.clear();
- strcatprintf(timecode_count_str, "%d", (m_timecode_count-3)/2);
- message += "TIMECODE: Extra " + timecode_count_str + " started at " + current_time_str;
- timecode_text += "EXTRA " + timecode_count_str;
- show_timecode_counter = true;
- }
- else {
- machine().video().add_to_total_time(elapsed_time);
-
- std::string timecode_count_str;
- strcatprintf(timecode_count_str, "%d", (m_timecode_count-4)/2);
- message += "TIMECODE: Extra " + timecode_count_str + " duration " + elapsed_time_str;
-
- timecode_count_str.clear();
- strcatprintf(timecode_count_str, "%03d", (m_timecode_count-4)/2);
- timecode_key = "EXTRA_STOP_" + timecode_count_str;
- }
-
- osd_printf_info("%s \n", message.c_str());
- machine().popmessage("%s \n", message.c_str());
-
- std::string line_to_add;
- line_to_add.append(timecode_key).append(19-timecode_key.length(), ' ');
- line_to_add +=
- " " + current_time_str + " " + elapsed_time_str +
- " " + mseconds_start_str + " " + mseconds_elapsed_str +
- " " + frame_start_str + " " + frame_elapsed_str +
- "\n";
- m_timecode_file.puts(line_to_add.c_str());
-
- machine().video().set_timecode_write(false);
- machine().video().set_timecode_text(timecode_text);
- machine().video().set_timecode_start(m_timecode_last_time);
- machine().ui().set_show_timecode_counter(show_timecode_counter);
- }
}
diff --git a/src/emu/ioport.h b/src/emu/ioport.h
index 6d9d941fa4a..89bd9e6964e 100644
--- a/src/emu/ioport.h
+++ b/src/emu/ioport.h
@@ -333,7 +333,6 @@ enum ioport_type
IPT_UI_ON_SCREEN_DISPLAY,
IPT_UI_DEBUG_BREAK,
IPT_UI_PAUSE,
- IPT_UI_PAUSE_SINGLE,
IPT_UI_RESET_MACHINE,
IPT_UI_SOFT_RESET,
IPT_UI_SHOW_GFX,
@@ -343,7 +342,6 @@ enum ioport_type
IPT_UI_FAST_FORWARD,
IPT_UI_SHOW_FPS,
IPT_UI_SNAPSHOT,
- IPT_UI_TIMECODE,
IPT_UI_RECORD_MOVIE,
IPT_UI_TOGGLE_CHEAT,
IPT_UI_UP,
@@ -371,18 +369,6 @@ enum ioport_type
IPT_UI_LOAD_STATE,
IPT_UI_TAPE_START,
IPT_UI_TAPE_STOP,
- IPT_UI_DATS,
- IPT_UI_FAVORITES,
- IPT_UI_UP_FILTER,
- IPT_UI_DOWN_FILTER,
- IPT_UI_LEFT_PANEL,
- IPT_UI_RIGHT_PANEL,
- IPT_UI_UP_PANEL,
- IPT_UI_DOWN_PANEL,
- IPT_UI_EXPORT,
- IPT_UI_AUDIT_FAST,
- IPT_UI_AUDIT_ALL,
- IPT_UI_TOGGLE_AUTOFIRE,
// additional OSD-specified UI port types (up to 16)
IPT_OSD_1,
@@ -1096,7 +1082,6 @@ public:
struct user_settings
{
ioport_value value; // for DIP switches
- bool autofire; // for autofire settings
input_seq seq[SEQ_TYPE_TOTAL]; // sequences of all types
INT32 sensitivity; // for analog controls
INT32 delta; // for analog controls
@@ -1173,8 +1158,6 @@ struct ioport_field_live
bool last; // were we pressed last time?
bool toggle; // current toggle setting
digital_joystick::direction_t joydir; // digital joystick direction index
- bool autofire; // autofire
- int autopressed; // autofire status
std::string name; // overridden name
};
@@ -1417,12 +1400,6 @@ public:
ioport_type token_to_input_type(const char *string, int &player) const;
std::string input_type_to_token(ioport_type type, int player);
- // autofire
- bool get_autofire_toggle() { return m_autofire_toggle; }
- void set_autofire_toggle(bool toggle) { m_autofire_toggle = toggle; }
- int get_autofire_delay() { return m_autofire_delay; }
- void set_autofire_delay(int delay) { m_autofire_delay = delay; }
-
private:
// internal helpers
void init_port_types();
@@ -1459,10 +1436,6 @@ private:
void record_frame(const attotime &curtime);
void record_port(ioport_port &port);
- template<typename _Type> void timecode_write(_Type value);
- void timecode_init();
- void timecode_end(const char *message = NULL);
-
// internal state
running_machine & m_machine; // reference to owning machine
bool m_safe_to_read; // clear at start; set after state is loaded
@@ -1485,19 +1458,12 @@ private:
emu_file m_playback_file; // playback file (NULL if not recording)
UINT64 m_playback_accumulated_speed; // accumulated speed during playback
UINT32 m_playback_accumulated_frames; // accumulated frames during playback
- emu_file m_timecode_file; // timecode/frames playback file (NULL if not recording)
- int m_timecode_count;
- attotime m_timecode_last_time;
// has...
bool m_has_configs;
bool m_has_analog;
bool m_has_dips;
bool m_has_bioses;
-
- // autofire
- bool m_autofire_toggle; // autofire toggle
- int m_autofire_delay; // autofire delay
};
diff --git a/src/emu/luaengine.cpp b/src/emu/luaengine.cpp
index 990f417eac4..733c99537c7 100644
--- a/src/emu/luaengine.cpp
+++ b/src/emu/luaengine.cpp
@@ -14,12 +14,9 @@
#include "luabridge/Source/LuaBridge/LuaBridge.h"
#include <signal.h>
#include "emu.h"
-#include "cheat.h"
#include "drivenum.h"
#include "ui/ui.h"
#include "luaengine.h"
-#include <mutex>
-#include "libuv/include/uv.h"
//**************************************************************************
// LUA ENGINE
@@ -48,10 +45,6 @@ lua_engine* lua_engine::luaThis = nullptr;
extern "C" {
int luaopen_lsqlite3(lua_State *L);
- int luaopen_zlib(lua_State *L);
- int luaopen_luv(lua_State *L);
- int luaopen_lfs(lua_State *L);
- uv_loop_t* luv_loop(lua_State* L);
}
static void lstop(lua_State *L, lua_Debug *ar)
@@ -375,38 +368,6 @@ void lua_engine::emu_set_hook(lua_State *L)
}
//-------------------------------------------------
-// options_entry - return table of option entries
-// -> manager:options().entries
-// -> manager:machine():options().entries
-// -> manager:machine():ui():options().entries
-//-------------------------------------------------
-
-template <typename T>
-luabridge::LuaRef lua_engine::l_options_get_entries(const T *o)
-{
- T *options = const_cast<T *>(o);
- lua_State *L = luaThis->m_lua_state;
- luabridge::LuaRef entries_table = luabridge::LuaRef::newTable(L);
-
- int unadorned_index = 0;
- for (typename T::entry *curentry = options->first(); curentry != nullptr; curentry = curentry->next())
- {
- const char *name = curentry->name();
- bool is_unadorned = false;
- // check if it's unadorned
- if (name && strlen(name) && !strcmp(name, options->unadorned(unadorned_index)))
- {
- unadorned_index++;
- is_unadorned = true;
- }
- if (!curentry->is_header() && !curentry->is_command() && !curentry->is_internal() && !is_unadorned)
- entries_table[name] = curentry;
- }
-
- return entries_table;
-}
-
-//-------------------------------------------------
// machine_get_screens - return table of available screens userdata
// -> manager:machine().screens[":screen"]
//-------------------------------------------------
@@ -443,103 +404,6 @@ luabridge::LuaRef lua_engine::l_machine_get_devices(const running_machine *r)
return devs_table;
}
-//-------------------------------------------------
-// machine_cheat_entries - return cheat entries
-// -> manager:machine():cheat().entries[0]
-//-------------------------------------------------
-
-luabridge::LuaRef lua_engine::l_cheat_get_entries(const cheat_manager *c)
-{
- cheat_manager *cm = const_cast<cheat_manager *>(c);
- lua_State *L = luaThis->m_lua_state;
- luabridge::LuaRef entry_table = luabridge::LuaRef::newTable(L);
-
- int cheatnum = 0;
- for (cheat_entry *entry = cm->first(); entry != nullptr; entry = entry->next()) {
- entry_table[cheatnum++] = entry;
- }
-
- return entry_table;
-}
-
-//-------------------------------------------------
-// cheat_entry_state - return cheat entry state
-// -> manager:machine():cheat().entries[0]:state()
-//-------------------------------------------------
-
-int lua_engine::lua_cheat_entry::l_get_state(lua_State *L)
-{
- cheat_entry *ce = luabridge::Stack<cheat_entry *>::get(L, 1);
-
- switch (ce->state())
- {
- case SCRIPT_STATE_ON: lua_pushliteral(L, "on"); break;
- case SCRIPT_STATE_RUN: lua_pushliteral(L, "run"); break;
- case SCRIPT_STATE_CHANGE: lua_pushliteral(L, "change"); break;
- case SCRIPT_STATE_COUNT: lua_pushliteral(L, "count"); break;
- default: lua_pushliteral(L, "off"); break;
- }
-
- return 1;
-}
-
-//-------------------------------------------------
-// machine_ioports - return table of ioports
-// -> manager:machine():ioport().ports[':P1']
-//-------------------------------------------------
-
-luabridge::LuaRef lua_engine::l_ioport_get_ports(const ioport_manager *m)
-{
- ioport_manager *im = const_cast<ioport_manager *>(m);
- lua_State *L = luaThis->m_lua_state;
- luabridge::LuaRef port_table = luabridge::LuaRef::newTable(L);
- ioport_port *port;
-
- for (port = im->first_port(); port != nullptr; port = port->next()) {
- port_table[port->tag()] = port;
- }
-
- return port_table;
-}
-
-//-------------------------------------------------
-// ioport_fields - return table of ioport fields
-// -> manager:machine().ioport().ports[':P1'].fields[':']
-//-------------------------------------------------
-
-luabridge::LuaRef lua_engine::l_ioports_port_get_fields(const ioport_port *i)
-{
- ioport_port *p = const_cast<ioport_port *>(i);
- lua_State *L = luaThis->m_lua_state;
- luabridge::LuaRef f_table = luabridge::LuaRef::newTable(L);
- ioport_field *field;
-
- for (field = p->first_field(); field != nullptr; field = field->next()) {
- f_table[field->name()] = field;
- }
-
- return f_table;
-}
-
-//-------------------------------------------------
-// render_get_targets - return table of render targets
-// -> manager:machine():render().targets[0]
-//-------------------------------------------------
-
-luabridge::LuaRef lua_engine::l_render_get_targets(const render_manager *r)
-{
- lua_State *L = luaThis->m_lua_state;
- luabridge::LuaRef target_table = luabridge::LuaRef::newTable(L);
-
- int tc = 0;
- for (render_target *curr_rt = r->first_target(); curr_rt != nullptr; curr_rt = curr_rt->next())
- {
- target_table[tc++] = curr_rt;
- }
-
- return target_table;
-}
-
// private helper for get_devices - DFS visit all devices in a running machine
luabridge::LuaRef lua_engine::devtree_dfs(device_t *root, luabridge::LuaRef devs_table)
{
@@ -641,21 +505,21 @@ int lua_engine::lua_addr_space::l_mem_read(lua_State *L)
mem_content = sp.read_byte(address);
break;
case 16:
- if (WORD_ALIGNED(address)) {
+ if ((address & 1) == 0) {
mem_content = sp.read_word(address);
} else {
mem_content = sp.read_word_unaligned(address);
}
break;
case 32:
- if (DWORD_ALIGNED(address)) {
+ if ((address & 3) == 0) {
mem_content = sp.read_dword(address);
} else {
mem_content = sp.read_dword_unaligned(address);
}
break;
case 64:
- if (QWORD_ALIGNED(address)) {
+ if ((address & 7) == 0) {
mem_content = sp.read_qword(address);
} else {
mem_content = sp.read_qword_unaligned(address);
@@ -694,21 +558,21 @@ int lua_engine::lua_addr_space::l_mem_write(lua_State *L)
sp.write_byte(address, val);
break;
case 16:
- if (WORD_ALIGNED(address)) {
+ if ((address & 1) == 0) {
sp.write_word(address, val);
} else {
sp.read_word_unaligned(address, val);
}
break;
case 32:
- if (DWORD_ALIGNED(address)) {
+ if ((address & 3) == 0) {
sp.write_dword(address, val);
} else {
sp.write_dword_unaligned(address, val);
}
break;
case 64:
- if (QWORD_ALIGNED(address)) {
+ if ((address & 7) == 0) {
sp.write_qword(address, val);
} else {
sp.write_qword_unaligned(address, val);
@@ -721,98 +585,6 @@ int lua_engine::lua_addr_space::l_mem_write(lua_State *L)
return 0;
}
-int lua_engine::lua_options_entry::l_entry_value(lua_State *L)
-{
- core_options::entry *e = luabridge::Stack<core_options::entry *>::get(L, 1);
- if(!e) {
- return 0;
- }
-
- luaL_argcheck(L, !lua_isfunction(L, 2), 2, "optional argument: unsupported value");
-
- if (!lua_isnone(L, 2))
- {
- std::string error;
- // FIXME: not working with ui_options::entry
- // TODO: optional arg for priority
- luaThis->machine().options().set_value(e->name(),
- lua_isboolean(L, 2) ? (lua_toboolean(L, 2) ? "1" : "0") : lua_tostring(L, 2),
- OPTION_PRIORITY_CMDLINE, error);
-
- if (!error.empty())
- {
- luaL_error(L, "%s", error.c_str());
- }
- }
-
- switch (e->type())
- {
- case OPTION_BOOLEAN:
- lua_pushboolean(L, (atoi(e->value()) != 0));
- break;
- case OPTION_INTEGER:
- lua_pushnumber(L, atoi(e->value()));
- break;
- case OPTION_FLOAT:
- lua_pushnumber(L, atof(e->value()));
- break;
- default:
- lua_pushstring(L, e->value());
- break;
- }
-
- return 1;
-}
-
-//-------------------------------------------------
-// begin_recording - start avi
-// -> manager:machine():video():begin_recording()
-//-------------------------------------------------
-
-int lua_engine::lua_video::l_begin_recording(lua_State *L)
-{
- video_manager *vm = luabridge::Stack<video_manager *>::get(L, 1);
- if (!vm) {
- return 0;
- }
-
- luaL_argcheck(L, lua_isstring(L, 2) || lua_isnone(L, 2), 2, "optional argument: filename, string expected");
-
- const char *filename = lua_tostring(L, 2);
- if (!lua_isnone(L, 2)) {
- std::string vidname(filename);
- strreplace(vidname, "/", PATH_SEPARATOR);
- strreplace(vidname, "%g", luaThis->machine().basename());
- filename = vidname.c_str();
- } else {
- filename = nullptr;
- }
- vm->begin_recording(filename, video_manager::MF_AVI);
-
- return 1;
-}
-
-//-------------------------------------------------
-// end_recording - start saving avi
-// -> manager:machine():video():end_recording()
-//-------------------------------------------------
-
-int lua_engine::lua_video::l_end_recording(lua_State *L)
-{
- video_manager *vm = luabridge::Stack<video_manager *>::get(L, 1);
- if (!vm) {
- return 0;
- }
-
- if (!vm->is_recording()) {
- lua_writestringerror("%s", "No active recording to stop");
- return 0;
- }
-
- vm->end_recording(video_manager::MF_AVI);
- return 1;
-}
-
//-------------------------------------------------
// screen_height - return screen visible height
// -> manager:machine().screens[":screen"]:height()
@@ -846,87 +618,6 @@ int lua_engine::lua_screen::l_width(lua_State *L)
}
//-------------------------------------------------
-// screen_refresh - return screen refresh rate
-// -> manager:machine().screens[":screen"]:refresh()
-//-------------------------------------------------
-
-int lua_engine::lua_screen::l_refresh(lua_State *L)
-{
- screen_device *sc = luabridge::Stack<screen_device *>::get(L, 1);
- if(!sc) {
- return 0;
- }
-
- lua_pushnumber(L, ATTOSECONDS_TO_HZ(sc->refresh_attoseconds()));
- return 1;
-}
-
-//-------------------------------------------------
-// screen_snapshot - save png bitmap of screen to snapshots folder
-// -> manager:machine().screens[":screen"]:snapshot("filename.png")
-//-------------------------------------------------
-
-int lua_engine::lua_screen::l_snapshot(lua_State *L)
-{
- screen_device *sc = luabridge::Stack<screen_device *>::get(L, 1);
- if(!sc || !sc->machine().render().is_live(*sc))
- {
- return 0;
- }
-
- luaL_argcheck(L, lua_isstring(L, 2) || lua_isnone(L, 2), 2, "optional argument: filename, string expected");
-
- emu_file file(sc->machine().options().snapshot_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
- file_error filerr;
-
- if (!lua_isnone(L, 2)) {
- const char *filename = lua_tostring(L, 2);
- std::string snapstr(filename);
- strreplace(snapstr, "/", PATH_SEPARATOR);
- strreplace(snapstr, "%g", sc->machine().basename());
- filerr = file.open(snapstr.c_str());
- }
- else
- {
- filerr = sc->machine().video().open_next(file, "png");
- }
-
- if (filerr != FILERR_NONE)
- {
- luaL_error(L, "file_error=%d", filerr);
- return 0;
- }
-
- sc->machine().video().save_snapshot(sc, file);
- lua_writestringerror("saved %s", file.fullpath());
- file.close();
- return 1;
-}
-
-//-------------------------------------------------
-// screen_type - return human readable screen type
-// -> manager:machine().screens[":screen"]:type()
-//-------------------------------------------------
-
-int lua_engine::lua_screen::l_type(lua_State *L)
-{
- screen_device *sc = luabridge::Stack<screen_device *>::get(L, 1);
- if(!sc) {
- return 0;
- }
-
- switch (sc->screen_type())
- {
- case SCREEN_TYPE_RASTER: lua_pushliteral(L, "raster"); break;
- case SCREEN_TYPE_VECTOR: lua_pushliteral(L, "vector"); break;
- case SCREEN_TYPE_LCD: lua_pushliteral(L, "lcd"); break;
- default: lua_pushliteral(L, "unknown"); break;
- }
-
- return 1;
-}
-
-//-------------------------------------------------
// draw_box - draw a box on a screen container
// -> manager:machine().screens[":screen"]:draw_box(x1, y1, x2, y2, bgcolor, linecolor)
//-------------------------------------------------
@@ -1117,7 +808,7 @@ struct msg {
int done;
} msg;
-static std::mutex g_mutex;
+osd_lock *lock;
void lua_engine::serve_lua()
{
@@ -1135,39 +826,37 @@ void lua_engine::serve_lua()
fgets(buff, LUA_MAXINPUT, stdin);
// Create message
- {
- std::lock_guard<std::mutex> lock(g_mutex);
- if (msg.ready == 0) {
- msg.text = oldbuff;
- if (oldbuff.length() != 0) msg.text.append("\n");
- msg.text.append(buff);
- msg.ready = 1;
- msg.done = 0;
- }
+ osd_lock_acquire(lock);
+ if (msg.ready == 0) {
+ msg.text = oldbuff;
+ if (oldbuff.length()!=0) msg.text.append("\n");
+ msg.text.append(buff);
+ msg.ready = 1;
+ msg.done = 0;
}
+ osd_lock_release(lock);
// Wait for response
int done;
do {
osd_sleep(osd_ticks_per_second() / 1000);
- std::lock_guard<std::mutex> lock(g_mutex);
+ osd_lock_acquire(lock);
done = msg.done;
+ osd_lock_release(lock);
} while (done==0);
// Do action on client side
- {
- std::lock_guard<std::mutex> lock(g_mutex);
-
- if (msg.status == -1) {
- b = LUA_PROMPT2;
- oldbuff = msg.response;
- }
- else {
- b = LUA_PROMPT;
- oldbuff = "";
- }
- msg.done = 0;
+ osd_lock_acquire(lock);
+ if (msg.status == -1){
+ b = LUA_PROMPT2;
+ oldbuff = msg.response;
+ }
+ else {
+ b = LUA_PROMPT;
+ oldbuff = "";
}
+ msg.done = 0;
+ osd_lock_release(lock);
} while (1);
}
@@ -1194,30 +883,15 @@ lua_engine::lua_engine()
lua_gc(m_lua_state, LUA_GCSTOP, 0); /* stop collector during initialization */
luaL_openlibs(m_lua_state); /* open libraries */
- // Get package.preload so we can store builtins in it.
- lua_getglobal(m_lua_state, "package");
- lua_getfield(m_lua_state, -1, "preload");
- lua_remove(m_lua_state, -2); // Remove package
-
- // Store uv module definition at preload.uv
- lua_pushcfunction(m_lua_state, luaopen_luv);
- lua_setfield(m_lua_state, -2, "luv");
-
- lua_pushcfunction(m_lua_state, luaopen_zlib);
- lua_setfield(m_lua_state, -2, "zlib");
-
- lua_pushcfunction(m_lua_state, luaopen_lsqlite3);
- lua_setfield(m_lua_state, -2, "lsqlite3");
+ luaopen_lsqlite3(m_lua_state);
- lua_pushcfunction(m_lua_state, luaopen_lfs);
- lua_setfield(m_lua_state, -2, "lfs");
-
luaopen_ioport(m_lua_state);
lua_gc(m_lua_state, LUA_GCRESTART, 0);
msg.ready = 0;
msg.status = 0;
msg.done = 0;
+ lock = osd_lock_alloc();
}
//-------------------------------------------------
@@ -1229,98 +903,6 @@ lua_engine::~lua_engine()
close();
}
-void lua_engine::execute_function(const char *id)
-{
- lua_settop(m_lua_state, 0);
- lua_getfield(m_lua_state, LUA_REGISTRYINDEX, id);
-
- if (lua_istable(m_lua_state, -1))
- {
- lua_pushnil(m_lua_state);
- while (lua_next(m_lua_state, -2) != 0)
- {
- if (lua_isfunction(m_lua_state, -1))
- {
- lua_pcall(m_lua_state, 0, 0, 0);
- }
- else
- {
- lua_pop(m_lua_state, 1);
- }
- }
- }
-}
-
-int lua_engine::register_function(lua_State *L, const char *id)
-{
- if (!lua_isnil(L, 1))
- luaL_checktype(L, 1, LUA_TFUNCTION);
- lua_settop(L, 1);
- lua_getfield(L, LUA_REGISTRYINDEX, id);
- if (lua_isnil(L, -1))
- {
- lua_newtable(L);
- }
- luaL_checktype(L, -1, LUA_TTABLE);
- int len = lua_rawlen(L, -1);
- lua_pushnumber(L, len + 1);
- lua_pushvalue(L, 1);
- lua_rawset(L, -3); /* Stores the pair in the table */
-
- lua_pushvalue(L, -1);
- lua_setfield(L, LUA_REGISTRYINDEX, id);
- return 1;
-}
-
-int lua_engine::l_emu_register_start(lua_State *L)
-{
- return register_function(L, "LUA_ON_START");
-}
-
-int lua_engine::l_emu_register_stop(lua_State *L)
-{
- return register_function(L, "LUA_ON_STOP");
-}
-
-int lua_engine::l_emu_register_pause(lua_State *L)
-{
- return register_function(L, "LUA_ON_PAUSE");
-}
-
-int lua_engine::l_emu_register_resume(lua_State *L)
-{
- return register_function(L, "LUA_ON_RESUME");
-}
-
-int lua_engine::l_emu_register_frame(lua_State *L)
-{
- return register_function(L, "LUA_ON_FRAME");
-}
-
-void lua_engine::on_machine_start()
-{
- execute_function("LUA_ON_START");
-}
-
-void lua_engine::on_machine_stop()
-{
- execute_function("LUA_ON_STOP");
-}
-
-void lua_engine::on_machine_pause()
-{
- execute_function("LUA_ON_PAUSE");
-}
-
-void lua_engine::on_machine_resume()
-{
- execute_function("LUA_ON_RESUME");
-}
-
-void lua_engine::on_machine_frame()
-{
- execute_function("LUA_ON_FRAME");
-}
void lua_engine::update_machine()
{
@@ -1340,16 +922,10 @@ void lua_engine::update_machine()
}
port = port->next();
}
- machine().add_notifier(MACHINE_NOTIFY_RESET, machine_notify_delegate(FUNC(lua_engine::on_machine_start), this));
- machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(lua_engine::on_machine_stop), this));
- machine().add_notifier(MACHINE_NOTIFY_PAUSE, machine_notify_delegate(FUNC(lua_engine::on_machine_pause), this));
- machine().add_notifier(MACHINE_NOTIFY_RESUME, machine_notify_delegate(FUNC(lua_engine::on_machine_resume), this));
- machine().add_notifier(MACHINE_NOTIFY_FRAME, machine_notify_delegate(FUNC(lua_engine::on_machine_frame), this));
}
lua_setglobal(m_lua_state, "ioport");
}
-
//-------------------------------------------------
// initialize - initialize lua hookup to emu engine
//-------------------------------------------------
@@ -1372,11 +948,6 @@ void lua_engine::initialize()
.addCFunction ("start", l_emu_start )
.addCFunction ("pause", l_emu_pause )
.addCFunction ("unpause", l_emu_unpause )
- .addCFunction ("register_start", l_emu_register_start )
- .addCFunction ("register_stop", l_emu_register_stop )
- .addCFunction ("register_pause", l_emu_register_pause )
- .addCFunction ("register_resume",l_emu_register_resume )
- .addCFunction ("register_frame", l_emu_register_frame )
.beginClass <machine_manager> ("manager")
.addFunction ("machine", &machine_manager::machine)
.addFunction ("options", &machine_manager::options)
@@ -1388,25 +959,14 @@ void lua_engine::initialize()
.addFunction ("save", &running_machine::schedule_save)
.addFunction ("load", &running_machine::schedule_load)
.addFunction ("system", &running_machine::system)
- .addFunction ("video", &running_machine::video)
- .addFunction ("ui", &running_machine::ui)
- .addFunction ("render", &running_machine::render)
- .addFunction ("ioport", &running_machine::ioport)
- .addFunction ("parameters", &running_machine::parameters)
- .addFunction ("cheat", &running_machine::cheat)
- .addFunction ("options", &running_machine::options)
.addProperty <luabridge::LuaRef, void> ("devices", &lua_engine::l_machine_get_devices)
.addProperty <luabridge::LuaRef, void> ("screens", &lua_engine::l_machine_get_screens)
.endClass ()
.beginClass <game_driver> ("game_driver")
- .addData ("source_file", &game_driver::source_file)
- .addData ("parent", &game_driver::parent)
.addData ("name", &game_driver::name)
.addData ("description", &game_driver::description)
.addData ("year", &game_driver::year)
.addData ("manufacturer", &game_driver::manufacturer)
- .addData ("compatible_with", &game_driver::compatible_with)
- .addData ("default_layout", &game_driver::default_layout)
.endClass ()
.beginClass <device_t> ("device")
.addFunction ("name", &device_t::name)
@@ -1415,113 +975,6 @@ void lua_engine::initialize()
.addProperty <luabridge::LuaRef, void> ("spaces", &lua_engine::l_dev_get_memspaces)
.addProperty <luabridge::LuaRef, void> ("state", &lua_engine::l_dev_get_states)
.endClass()
- .beginClass <cheat_manager> ("cheat")
- .addProperty <bool, bool> ("enabled", &cheat_manager::enabled, &cheat_manager::set_enable)
- .addFunction ("reload", &cheat_manager::reload)
- .addFunction ("save_all", &cheat_manager::save_all)
- .addProperty <luabridge::LuaRef, void> ("entries", &lua_engine::l_cheat_get_entries)
- .endClass()
- .beginClass <lua_cheat_entry> ("lua_cheat_entry")
- .addCFunction ("state", &lua_cheat_entry::l_get_state)
- .endClass()
- .deriveClass <cheat_entry, lua_cheat_entry> ("cheat_entry")
- .addFunction ("description", &cheat_entry::description)
- .addFunction ("comment", &cheat_entry::comment)
- .addFunction ("has_run_script", &cheat_entry::has_run_script)
- .addFunction ("has_on_script", &cheat_entry::has_on_script)
- .addFunction ("has_off_script", &cheat_entry::has_off_script)
- .addFunction ("has_change_script", &cheat_entry::has_change_script)
- .addFunction ("execute_off_script", &cheat_entry::execute_off_script)
- .addFunction ("execute_on_script", &cheat_entry::execute_on_script)
- .addFunction ("execute_run_script", &cheat_entry::execute_run_script)
- .addFunction ("execute_change_script", &cheat_entry::execute_change_script)
- .addFunction ("is_text_only", &cheat_entry::is_text_only)
- .addFunction ("is_oneshot", &cheat_entry::is_oneshot)
- .addFunction ("is_onoff", &cheat_entry::is_onoff)
- .addFunction ("is_value_parameter", &cheat_entry::is_value_parameter)
- .addFunction ("is_itemlist_parameter", &cheat_entry::is_itemlist_parameter)
- .addFunction ("is_oneshot_parameter", &cheat_entry::is_oneshot_parameter)
- .addFunction ("activate", &cheat_entry::activate)
- .addFunction ("select_default_state", &cheat_entry::select_default_state)
- .addFunction ("select_previous_state", &cheat_entry::select_previous_state)
- .addFunction ("select_next_state", &cheat_entry::select_next_state)
- .endClass()
- .beginClass <ioport_manager> ("ioport")
- .addFunction ("has_configs", &ioport_manager::has_configs)
- .addFunction ("has_analog", &ioport_manager::has_analog)
- .addFunction ("has_dips", &ioport_manager::has_dips)
- .addFunction ("has_bioses", &ioport_manager::has_bioses)
- .addFunction ("has_keyboard", &ioport_manager::has_keyboard)
- .addFunction ("count_players", &ioport_manager::count_players)
- .addProperty <luabridge::LuaRef, void> ("ports", &lua_engine::l_ioport_get_ports)
- .endClass()
- .beginClass <ioport_port> ("ioport_port")
- .addFunction ("tag", &ioport_port::tag)
- .addFunction ("active", &ioport_port::active)
- .addFunction ("live", &ioport_port::live)
- .addProperty <luabridge::LuaRef, void> ("fields", &lua_engine::l_ioports_port_get_fields)
- .endClass()
- .beginClass <ioport_field> ("ioport_field")
- .addFunction ("set_value", &ioport_field::set_value)
- .addProperty ("device", &ioport_field::device)
- .addProperty ("name", &ioport_field::name)
- .addProperty <UINT8, UINT8> ("player", &ioport_field::player, &ioport_field::set_player)
- .addProperty ("mask", &ioport_field::mask)
- .addProperty ("defvalue", &ioport_field::defvalue)
- .addProperty ("sensitivity", &ioport_field::sensitivity)
- .addProperty ("way", &ioport_field::way)
- .addProperty ("is_analog", &ioport_field::is_analog)
- .addProperty ("is_digitial_joystick", &ioport_field::is_digital_joystick)
- .addProperty ("enabled", &ioport_field::enabled)
- .addProperty ("unused", &ioport_field::unused)
- .addProperty ("cocktail", &ioport_field::cocktail)
- .addProperty ("toggle", &ioport_field::toggle)
- .addProperty ("rotated", &ioport_field::rotated)
- .addProperty ("analog_reverse", &ioport_field::analog_reverse)
- .addProperty ("analog_reset", &ioport_field::analog_reset)
- .addProperty ("analog_wraps", &ioport_field::analog_wraps)
- .addProperty ("analog_invert", &ioport_field::analog_invert)
- .addProperty ("impulse", &ioport_field::impulse)
- .addProperty <double, double> ("crosshair_scale", &ioport_field::crosshair_scale, &ioport_field::set_crosshair_scale)
- .addProperty <double, double> ("crosshair_offset", &ioport_field::crosshair_offset, &ioport_field::set_crosshair_offset)
- .endClass()
- .beginClass <core_options> ("core_options")
- .addFunction ("help", &core_options::output_help)
- .addFunction ("command", &core_options::command)
- .addProperty <luabridge::LuaRef, void> ("entries", &lua_engine::l_options_get_entries)
- .endClass()
- .beginClass <lua_options_entry> ("lua_options_entry")
- .addCFunction ("value", &lua_options_entry::l_entry_value)
- .endClass()
- .deriveClass <core_options::entry, lua_options_entry> ("core_options_entry")
- .addFunction ("description", &core_options::entry::description)
- .addFunction ("default_value", &core_options::entry::default_value)
- .addFunction ("minimum", &core_options::entry::minimum)
- .addFunction ("maximum", &core_options::entry::maximum)
- .addFunction ("has_range", &core_options::entry::has_range)
- .endClass()
- .deriveClass <emu_options, core_options> ("emu_options")
- .endClass()
- .deriveClass <ui_options, core_options> ("ui_options")
- .endClass()
- .beginClass <parameters_manager> ("parameters")
- .addFunction ("add", &parameters_manager::add)
- .addFunction ("lookup", &parameters_manager::lookup)
- .endClass()
- .beginClass <lua_video> ("lua_video_manager")
- .addCFunction ("begin_recording", &lua_video::l_begin_recording)
- .addCFunction ("end_recording", &lua_video::l_end_recording)
- .endClass()
- .deriveClass <video_manager, lua_video> ("video")
- .addFunction ("snapshot", &video_manager::save_active_screen_snapshots)
- .addFunction ("is_recording", &video_manager::is_recording)
- .addFunction ("skip_this_frame", &video_manager::skip_this_frame)
- .addFunction ("speed_factor", &video_manager::speed_factor)
- .addFunction ("speed_percent", &video_manager::speed_percent)
- .addProperty <int, int> ("frameskip", &video_manager::frameskip, &video_manager::set_frameskip)
- .addProperty <bool, bool> ("throttled", &video_manager::throttled, &video_manager::set_throttled)
- .addProperty <float, float> ("throttle_rate", &video_manager::throttle_rate, &video_manager::set_throttle_rate)
- .endClass()
.beginClass <lua_addr_space> ("lua_addr_space")
.addCFunction ("read_i8", &lua_addr_space::l_mem_read<INT8>)
.addCFunction ("read_u8", &lua_addr_space::l_mem_read<UINT8>)
@@ -1543,61 +996,18 @@ void lua_engine::initialize()
.deriveClass <address_space, lua_addr_space> ("addr_space")
.addFunction("name", &address_space::name)
.endClass()
- .beginClass <render_target> ("target")
- .addFunction ("width", &render_target::width)
- .addFunction ("height", &render_target::height)
- .addFunction ("pixel_aspect", &render_target::pixel_aspect)
- .addFunction ("hidden", &render_target::hidden)
- .addFunction ("is_ui_target", &render_target::is_ui_target)
- .addFunction ("index", &render_target::index)
- .addProperty <float, float> ("max_update_rate", &render_target::max_update_rate, &render_target::set_max_update_rate)
- .addProperty <int, int> ("view", &render_target::view, &render_target::set_view)
- .addProperty <int, int> ("orientation", &render_target::orientation, &render_target::set_orientation)
- .addProperty <bool, bool> ("backdrops", &render_target::backdrops_enabled, &render_target::set_backdrops_enabled)
- .addProperty <bool, bool> ("overlays", &render_target::overlays_enabled, &render_target::set_overlays_enabled)
- .addProperty <bool, bool> ("bezels", &render_target::bezels_enabled, &render_target::set_bezels_enabled)
- .addProperty <bool, bool> ("marquees", &render_target::marquees_enabled, &render_target::set_marquees_enabled)
- .addProperty <bool, bool> ("screen_overlay", &render_target::screen_overlay_enabled, &render_target::set_screen_overlay_enabled)
- .addProperty <bool, bool> ("zoom", &render_target::zoom_to_screen, &render_target::set_zoom_to_screen)
- .endClass()
- .beginClass <render_container> ("render_container")
- .addFunction ("orientation", &render_container::orientation)
- .addFunction ("xscale", &render_container::xscale)
- .addFunction ("yscale", &render_container::yscale)
- .addFunction ("xoffset", &render_container::xoffset)
- .addFunction ("yoffset", &render_container::yoffset)
- .addFunction ("is_empty", &render_container::is_empty)
- .endClass()
- .beginClass <render_manager> ("render")
- .addFunction ("max_update_rate", &render_manager::max_update_rate)
- .addFunction ("ui_target", &render_manager::ui_target)
- .addFunction ("ui_container", &render_manager::ui_container)
- .addProperty <luabridge::LuaRef, void> ("targets", &lua_engine::l_render_get_targets)
- .endClass()
- .beginClass <ui_manager> ("ui")
- .addFunction ("is_menu_active", &ui_manager::is_menu_active)
- .addFunction ("options", &ui_manager::options)
- .addProperty <bool, bool> ("show_fps", &ui_manager::show_fps, &ui_manager::set_show_fps)
- .addProperty <bool, bool> ("show_profiler", &ui_manager::show_profiler, &ui_manager::set_show_profiler)
- .addProperty <bool, bool> ("single_step", &ui_manager::single_step, &ui_manager::set_single_step)
- .endClass()
.beginClass <lua_screen> ("lua_screen_dev")
.addCFunction ("draw_box", &lua_screen::l_draw_box)
.addCFunction ("draw_line", &lua_screen::l_draw_line)
.addCFunction ("draw_text", &lua_screen::l_draw_text)
.addCFunction ("height", &lua_screen::l_height)
.addCFunction ("width", &lua_screen::l_width)
- .addCFunction ("refresh", &lua_screen::l_refresh)
- .addCFunction ("snapshot", &lua_screen::l_snapshot)
- .addCFunction ("type", &lua_screen::l_type)
.endClass()
.deriveClass <screen_device, lua_screen> ("screen_dev")
.addFunction ("frame_number", &screen_device::frame_number)
.addFunction ("name", &screen_device::name)
.addFunction ("shortname", &screen_device::shortname)
.addFunction ("tag", &screen_device::tag)
- .addFunction ("xscale", &screen_device::xscale)
- .addFunction ("yscale", &screen_device::yscale)
.endClass()
.beginClass <device_state_entry> ("dev_space")
.addFunction ("name", &device_state_entry::symbol)
@@ -1636,39 +1046,36 @@ bool lua_engine::frame_hook()
void lua_engine::periodic_check()
{
- std::lock_guard<std::mutex> lock(g_mutex);
+ osd_lock_acquire(lock);
if (msg.ready == 1) {
- lua_settop(m_lua_state, 0);
- int status = luaL_loadbuffer(m_lua_state, msg.text.c_str(), msg.text.length(), "=stdin");
- if (incomplete(status)==0) /* cannot try to add lines? */
- {
- if (status == LUA_OK) status = docall(0, LUA_MULTRET);
- report(status);
- if (status == LUA_OK && lua_gettop(m_lua_state) > 0) /* any result to print? */
- {
- luaL_checkstack(m_lua_state, LUA_MINSTACK, "too many results to print");
- lua_getglobal(m_lua_state, "print");
- lua_insert(m_lua_state, 1);
- if (lua_pcall(m_lua_state, lua_gettop(m_lua_state) - 1, 0, 0) != LUA_OK)
- lua_writestringerror("%s\n", lua_pushfstring(m_lua_state,
- "error calling " LUA_QL("print") " (%s)",
- lua_tostring(m_lua_state, -1)));
- }
- }
- else
+ lua_settop(m_lua_state, 0);
+ int status = luaL_loadbuffer(m_lua_state, msg.text.c_str(), strlen(msg.text.c_str()), "=stdin");
+ if (incomplete(status)==0) /* cannot try to add lines? */
+ {
+ if (status == LUA_OK) status = docall(0, LUA_MULTRET);
+ report(status);
+ if (status == LUA_OK && lua_gettop(m_lua_state) > 0) /* any result to print? */
{
- status = -1;
+ luaL_checkstack(m_lua_state, LUA_MINSTACK, "too many results to print");
+ lua_getglobal(m_lua_state, "print");
+ lua_insert(m_lua_state, 1);
+ if (lua_pcall(m_lua_state, lua_gettop(m_lua_state) - 1, 0, 0) != LUA_OK)
+ lua_writestringerror("%s\n", lua_pushfstring(m_lua_state,
+ "error calling " LUA_QL("print") " (%s)",
+ lua_tostring(m_lua_state, -1)));
}
- msg.status = status;
- msg.response = msg.text;
- msg.text = "";
- msg.ready = 0;
- msg.done = 1;
}
- auto loop = luv_loop(m_lua_state);
- if (loop!=nullptr)
- uv_run(loop, UV_RUN_NOWAIT);
-
+ else
+ {
+ status = -1;
+ }
+ msg.status = status;
+ msg.response = msg.text;
+ msg.text = "";
+ msg.ready = 0;
+ msg.done = 1;
+ }
+ osd_lock_release(lock);
}
//-------------------------------------------------
diff --git a/src/emu/luaengine.h b/src/emu/luaengine.h
index fca3a564618..9bc6275100e 100644
--- a/src/emu/luaengine.h
+++ b/src/emu/luaengine.h
@@ -24,8 +24,6 @@
#undef None
#endif
-class cheat_manager;
-
struct lua_State;
namespace luabridge
{
@@ -47,7 +45,6 @@ public:
void serve_lua();
void periodic_check();
bool frame_hook();
- void execute_function(const char *id);
void resume(lua_State *L, int nparam = 0, lua_State *root = nullptr);
void set_machine(running_machine *machine) { m_machine = machine; update_machine(); }
@@ -81,13 +78,6 @@ private:
running_machine &machine() const { return *m_machine; }
void update_machine();
-
- void on_machine_start();
- void on_machine_stop();
- void on_machine_pause();
- void on_machine_resume();
- void on_machine_frame();
-
void output_notifier(const char *outname, INT32 value);
static void s_output_notifier(const char *outname, INT32 value, void *param);
@@ -112,18 +102,9 @@ private:
static int l_emu_pause(lua_State *L);
static int l_emu_unpause(lua_State *L);
static int l_emu_set_hook(lua_State *L);
- static int l_emu_register_start(lua_State *L);
- static int l_emu_register_stop(lua_State *L);
- static int l_emu_register_pause(lua_State *L);
- static int l_emu_register_resume(lua_State *L);
- static int l_emu_register_frame(lua_State *L);
- static int register_function(lua_State *L, const char *id);
// "emu.machine" namespace
static luabridge::LuaRef l_machine_get_devices(const running_machine *r);
- static luabridge::LuaRef l_ioport_get_ports(const ioport_manager *i);
- static luabridge::LuaRef l_render_get_targets(const render_manager *r);
- static luabridge::LuaRef l_ioports_port_get_fields(const ioport_port *i);
static luabridge::LuaRef devtree_dfs(device_t *root, luabridge::LuaRef dev_table);
static luabridge::LuaRef l_dev_get_states(const device_t *d);
static UINT64 l_state_get_value(const device_state_entry *d);
@@ -137,29 +118,11 @@ private:
struct lua_screen {
int l_height(lua_State *L);
int l_width(lua_State *L);
- int l_refresh(lua_State *L);
- int l_type(lua_State *L);
- int l_snapshot(lua_State *L);
int l_draw_box(lua_State *L);
int l_draw_line(lua_State *L);
int l_draw_text(lua_State *L);
};
- struct lua_video {
- int l_begin_recording(lua_State *L);
- int l_end_recording(lua_State *L);
- };
-
- static luabridge::LuaRef l_cheat_get_entries(const cheat_manager *c);
- struct lua_cheat_entry {
- int l_get_state(lua_State *L);
- };
-
- template<typename T> static luabridge::LuaRef l_options_get_entries(const T *o);
- struct lua_options_entry {
- int l_entry_value(lua_State *L);
- };
-
void resume(void *L, INT32 param);
void start();
static int luaopen_ioport(lua_State *L);
diff --git a/src/emu/machine.cpp b/src/emu/machine.cpp
index 5119dec397c..a80a9c1aa74 100644
--- a/src/emu/machine.cpp
+++ b/src/emu/machine.cpp
@@ -2,69 +2,69 @@
// copyright-holders:Aaron Giles
/***************************************************************************
- machine.c
+ machine.c
- Controls execution of the core MAME system.
+ Controls execution of the core MAME system.
****************************************************************************
- Since there has been confusion in the past over the order of
- initialization and other such things, here it is, all spelled out
- as of January, 2008:
-
- main()
- - does platform-specific init
- - calls mame_execute() [mame.c]
-
- mame_execute() [mame.c]
- - calls mame_validitychecks() [validity.c] to perform validity checks on all compiled drivers
- - begins resource tracking (level 1)
- - calls create_machine [mame.c] to initialize the running_machine structure
- - calls init_machine() [mame.c]
-
- init_machine() [mame.c]
- - calls fileio_init() [fileio.c] to initialize file I/O info
- - calls config_init() [config.c] to initialize configuration system
- - calls input_init() [input.c] to initialize the input system
- - calls output_init() [output.c] to initialize the output system
- - calls state_init() [state.c] to initialize save state system
- - calls state_save_allow_registration() [state.c] to allow registrations
- - calls palette_init() [palette.c] to initialize palette system
- - calls render_init() [render.c] to initialize the rendering system
- - calls ui_init() [ui.c] to initialize the user interface
- - calls generic_machine_init() [machine/generic.c] to initialize generic machine structures
- - calls timer_init() [timer.c] to reset the timer system
- - calls osd_init() [osdepend.h] to do platform-specific initialization
- - calls input_port_init() [inptport.c] to set up the input ports
- - calls rom_init() [romload.c] to load the game's ROMs
- - calls memory_init() [memory.c] to process the game's memory maps
- - calls the driver's DRIVER_INIT callback
- - calls device_list_start() [devintrf.c] to start any devices
- - calls video_init() [video.c] to start the video system
- - calls tilemap_init() [tilemap.c] to start the tilemap system
- - calls crosshair_init() [crsshair.c] to configure the crosshairs
- - calls sound_init() [sound.c] to start the audio system
- - calls debugger_init() [debugger.c] to set up the debugger
- - calls the driver's MACHINE_START, SOUND_START, and VIDEO_START callbacks
- - calls cheat_init() [cheat.c] to initialize the cheat system
- - calls image_init() [image.c] to initialize the image system
-
- - calls config_load_settings() [config.c] to load the configuration file
- - calls nvram_load [machine/generic.c] to load NVRAM
- - calls ui_display_startup_screens() [ui.c] to display the startup screens
- - begins resource tracking (level 2)
- - calls soft_reset() [mame.c] to reset all systems
-
- -------------------( at this point, we're up and running )----------------------
-
- - calls scheduler->timeslice() [schedule.c] over and over until we exit
- - ends resource tracking (level 2), freeing all auto_mallocs and timers
- - calls the nvram_save() [machine/generic.c] to save NVRAM
- - calls config_save_settings() [config.c] to save the game's configuration
- - calls all registered exit routines [mame.c]
- - ends resource tracking (level 1), freeing all auto_mallocs and timers
-
- - exits the program
+ Since there has been confusion in the past over the order of
+ initialization and other such things, here it is, all spelled out
+ as of January, 2008:
+
+ main()
+ - does platform-specific init
+ - calls mame_execute() [mame.c]
+
+ mame_execute() [mame.c]
+ - calls mame_validitychecks() [validity.c] to perform validity checks on all compiled drivers
+ - begins resource tracking (level 1)
+ - calls create_machine [mame.c] to initialize the running_machine structure
+ - calls init_machine() [mame.c]
+
+ init_machine() [mame.c]
+ - calls fileio_init() [fileio.c] to initialize file I/O info
+ - calls config_init() [config.c] to initialize configuration system
+ - calls input_init() [input.c] to initialize the input system
+ - calls output_init() [output.c] to initialize the output system
+ - calls state_init() [state.c] to initialize save state system
+ - calls state_save_allow_registration() [state.c] to allow registrations
+ - calls palette_init() [palette.c] to initialize palette system
+ - calls render_init() [render.c] to initialize the rendering system
+ - calls ui_init() [ui.c] to initialize the user interface
+ - calls generic_machine_init() [machine/generic.c] to initialize generic machine structures
+ - calls timer_init() [timer.c] to reset the timer system
+ - calls osd_init() [osdepend.h] to do platform-specific initialization
+ - calls input_port_init() [inptport.c] to set up the input ports
+ - calls rom_init() [romload.c] to load the game's ROMs
+ - calls memory_init() [memory.c] to process the game's memory maps
+ - calls the driver's DRIVER_INIT callback
+ - calls device_list_start() [devintrf.c] to start any devices
+ - calls video_init() [video.c] to start the video system
+ - calls tilemap_init() [tilemap.c] to start the tilemap system
+ - calls crosshair_init() [crsshair.c] to configure the crosshairs
+ - calls sound_init() [sound.c] to start the audio system
+ - calls debugger_init() [debugger.c] to set up the debugger
+ - calls the driver's MACHINE_START, SOUND_START, and VIDEO_START callbacks
+ - calls cheat_init() [cheat.c] to initialize the cheat system
+ - calls image_init() [image.c] to initialize the image system
+
+ - calls config_load_settings() [config.c] to load the configuration file
+ - calls nvram_load [machine/generic.c] to load NVRAM
+ - calls ui_display_startup_screens() [ui.c] to display the startup screens
+ - begins resource tracking (level 2)
+ - calls soft_reset() [mame.c] to reset all systems
+
+ -------------------( at this point, we're up and running )----------------------
+
+ - calls scheduler->timeslice() [schedule.c] over and over until we exit
+ - ends resource tracking (level 2), freeing all auto_mallocs and timers
+ - calls the nvram_save() [machine/generic.c] to save NVRAM
+ - calls config_save_settings() [config.c] to save the game's configuration
+ - calls all registered exit routines [mame.c]
+ - ends resource tracking (level 1), freeing all auto_mallocs and timers
+
+ - exits the program
***************************************************************************/
@@ -78,8 +78,6 @@
#include "uiinput.h"
#include "crsshair.h"
#include "unzip.h"
-#include "ui/datfile.h"
-#include "ui/inifile.h"
#include "debug/debugvw.h"
#include "image.h"
#include "luaengine.h"
@@ -188,10 +186,7 @@ const char *running_machine::describe_context()
{
cpu_device *cpu = dynamic_cast<cpu_device *>(&executing->device());
if (cpu != nullptr)
- {
- address_space &prg = cpu->space(AS_PROGRAM);
- strprintf(m_context, "'%s' (%s)", cpu->tag(), core_i64_format(cpu->pc(), prg.logaddrchars(), prg.is_octal()));
- }
+ strprintf(m_context, "'%s' (%s)", cpu->tag(), core_i64_format(cpu->pc(), cpu->space(AS_PROGRAM).logaddrchars(), cpu->is_octal()));
}
else
m_context.assign("(no context)");
@@ -237,10 +232,6 @@ void running_machine::start()
// create the video manager
m_video = std::make_unique<video_manager>(*this);
m_ui = std::make_unique<ui_manager>(*this);
- m_ui->init();
-
- // start the inifile manager
- m_inifile = std::make_unique<inifile_manager>(*this);
// initialize the base time (needed for doing record/playback)
::time(&m_base_time);
@@ -314,12 +305,6 @@ void running_machine::start()
// allocate autoboot timer
m_autoboot_timer = scheduler().timer_alloc(timer_expired_delegate(FUNC(running_machine::autoboot_callback), this));
- // start datfile manager
- m_datfile = std::make_unique<datfile_manager>(*this);
-
- // start favorite manager
- m_favorite = std::make_unique<favorite_manager>(*this);
-
manager().update_machine();
}
@@ -387,10 +372,8 @@ int running_machine::run(bool firstrun)
// execute CPUs if not paused
if (!m_paused)
- {
m_scheduler.timeslice();
- manager().lua()->periodic_check();
- }
+
// otherwise, just pump video updates through
else
m_video->frame_update();
@@ -1326,12 +1309,12 @@ void system_time::full_time::set(struct tm &t)
{
second = t.tm_sec;
minute = t.tm_min;
- hour = t.tm_hour;
- mday = t.tm_mday;
+ hour = t.tm_hour;
+ mday = t.tm_mday;
month = t.tm_mon;
- year = t.tm_year + 1900;
+ year = t.tm_year + 1900;
weekday = t.tm_wday;
- day = t.tm_yday;
+ day = t.tm_yday;
is_dst = t.tm_isdst;
}
diff --git a/src/emu/machine.h b/src/emu/machine.h
index 613e62b505e..24b0840c93d 100644
--- a/src/emu/machine.h
+++ b/src/emu/machine.h
@@ -95,10 +95,8 @@ class image_manager;
class rom_load_manager;
class debugger_manager;
class osd_interface;
-class datfile_manager;
enum class config_type;
-class inifile_manager;
-class favorite_manager;
+
struct debugcpu_private;
@@ -167,9 +165,6 @@ public:
ioport_manager &ioport() { return m_ioport; }
parameters_manager &parameters() { return m_parameters; }
cheat_manager &cheat() const { assert(m_cheat != nullptr); return *m_cheat; }
- datfile_manager &datfile() const { assert(m_datfile != nullptr); return *m_datfile; }
- inifile_manager &inifile() const { assert(m_inifile != nullptr); return *m_inifile; }
- favorite_manager &favorite() const { assert(m_favorite != nullptr); return *m_favorite; }
render_manager &render() const { assert(m_render != nullptr); return *m_render; }
input_manager &input() const { assert(m_input != nullptr); return *m_input; }
sound_manager &sound() const { assert(m_sound != nullptr); return *m_sound; }
@@ -368,10 +363,7 @@ private:
parameters_manager m_parameters; // parameters manager
device_scheduler m_scheduler; // scheduler object
emu_timer *m_autoboot_timer; // autoboot timer
-
- std::unique_ptr<datfile_manager> m_datfile; // internal data from datfile.c
- std::unique_ptr<inifile_manager> m_inifile; // internal data from inifile.c for INIs
- std::unique_ptr<favorite_manager> m_favorite; // internal data from inifile.c for favorites
};
+
#endif /* __MACHINE_H__ */
diff --git a/src/emu/mame.cpp b/src/emu/mame.cpp
index 813455e0b8d..e18e41329ad 100644
--- a/src/emu/mame.cpp
+++ b/src/emu/mame.cpp
@@ -151,20 +151,6 @@ void machine_manager::update_machine()
m_lua->set_machine(m_machine);
}
-
-void machine_manager::start_luaengine()
-{
- m_lua->initialize();
- {
- emu_file file(options().plugins_path(), OPEN_FLAG_READ);
- file_error filerr = file.open("boot.lua");
- if (filerr == FILERR_NONE)
- {
- m_lua->load_script(file.fullpath());
- }
- }
-}
-
/*-------------------------------------------------
execute - run the core emulation
-------------------------------------------------*/
@@ -180,6 +166,7 @@ int machine_manager::execute()
bool exit_pending = false;
int error = MAMERR_NONE;
+ m_lua->initialize();
if (m_options.console()) {
m_lua->start_console();
}
@@ -244,25 +231,6 @@ int machine_manager::execute()
m_options.set_value(OPTION_RAMSIZE, "", OPTION_PRIORITY_CMDLINE, error_string);
}
firstrun = true;
- if (m_options.software_name())
- {
- std::string sw_load(m_options.software_name());
- std::string sw_list, sw_name, sw_part, sw_instance, option_errors, error_string;
- int left = sw_load.find_first_of(':');
- int middle = sw_load.find_first_of(':', left + 1);
- int right = sw_load.find_last_of(':');
-
- sw_list = sw_load.substr(0, left - 1);
- sw_name = sw_load.substr(left + 1, middle - left - 1);
- sw_part = sw_load.substr(middle + 1, right - middle - 1);
- sw_instance = sw_load.substr(right + 1);
- sw_load.assign(sw_load.substr(0, right));
-
- char arg[] = "ume";
- 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());
- }
}
else
{
diff --git a/src/emu/mame.h b/src/emu/mame.h
index bc21d805716..eb2f510c114 100644
--- a/src/emu/mame.h
+++ b/src/emu/mame.h
@@ -55,8 +55,18 @@ public:
static const char * get_appname();
static const char * get_appname_lower();
static const char * get_configname();
+ static const char * get_capgamenoun();
+ static const char * get_capstartgamenoun();
+ static const char * get_gamenoun();
+ static const char * get_gamesnoun();
static const char * get_copyright();
static const char * get_copyright_info();
+ static const char * get_disclaimer();
+ static const char * get_usage();
+ static const char * get_xml_root();
+ static const char * get_xml_top();
+ static const char * get_state_magic_num();
+ static void printf_usage(const char *par1, const char *par2);
};
class lua_engine;
@@ -86,7 +96,6 @@ public:
/* execute as configured by the OPTION_SYSTEMNAME option on the specified options */
int execute();
- void start_luaengine();
void schedule_new_driver(const game_driver &driver);
private:
osd_interface & m_osd; // reference to OSD system
diff --git a/src/emu/memory.cpp b/src/emu/memory.cpp
index aa33faf65cf..598ffab9ac6 100644
--- a/src/emu/memory.cpp
+++ b/src/emu/memory.cpp
@@ -673,10 +673,15 @@ private:
{
if (m_space.log_unmap() && !m_space.debugger_access())
{
+ device_execute_interface *intf;
+ bool is_octal = false;
+ if (m_space.device().interface(intf))
+ is_octal = intf->is_octal();
+
m_space.device().logerror("%s: unmapped %s memory read from %s & %s\n",
m_space.machine().describe_context(), m_space.name(),
- core_i64_format(m_space.byte_to_address(offset * sizeof(_UintType)), m_space.addrchars(),m_space.is_octal()),
- core_i64_format(mask, 2 * sizeof(_UintType),m_space.is_octal()));
+ core_i64_format(m_space.byte_to_address(offset * sizeof(_UintType)), m_space.addrchars(),is_octal),
+ core_i64_format(mask, 2 * sizeof(_UintType),is_octal));
}
return m_space.unmap();
}
@@ -741,11 +746,16 @@ private:
{
if (m_space.log_unmap() && !m_space.debugger_access())
{
+ device_execute_interface *intf;
+ bool is_octal = false;
+ if (m_space.device().interface(intf))
+ is_octal = intf->is_octal();
+
m_space.device().logerror("%s: unmapped %s memory write to %s = %s & %s\n",
m_space.machine().describe_context(), m_space.name(),
- core_i64_format(m_space.byte_to_address(offset * sizeof(_UintType)), m_space.addrchars(),m_space.is_octal()),
- core_i64_format(data, 2 * sizeof(_UintType),m_space.is_octal()),
- core_i64_format(mask, 2 * sizeof(_UintType),m_space.is_octal()));
+ core_i64_format(m_space.byte_to_address(offset * sizeof(_UintType)), m_space.addrchars(),is_octal),
+ core_i64_format(data, 2 * sizeof(_UintType),is_octal),
+ core_i64_format(mask, 2 * sizeof(_UintType),is_octal));
}
}
@@ -886,9 +896,9 @@ public:
printf(" read_byte = "); printf("%02X\n", result8 = read_byte(address)); assert(result8 == expected8);
// validate word accesses (if aligned)
- if (WORD_ALIGNED(address)) { printf(" read_word = "); printf("%04X\n", result16 = read_word(address)); assert(result16 == expected16); }
- if (WORD_ALIGNED(address)) { printf(" read_word (0xff00) = "); printf("%04X\n", result16 = read_word(address, 0xff00)); assert((result16 & 0xff00) == (expected16 & 0xff00)); }
- if (WORD_ALIGNED(address)) { printf(" (0x00ff) = "); printf("%04X\n", result16 = read_word(address, 0x00ff)); assert((result16 & 0x00ff) == (expected16 & 0x00ff)); }
+ if (address % 2 == 0) { printf(" read_word = "); printf("%04X\n", result16 = read_word(address)); assert(result16 == expected16); }
+ if (address % 2 == 0) { printf(" read_word (0xff00) = "); printf("%04X\n", result16 = read_word(address, 0xff00)); assert((result16 & 0xff00) == (expected16 & 0xff00)); }
+ if (address % 2 == 0) { printf(" (0x00ff) = "); printf("%04X\n", result16 = read_word(address, 0x00ff)); assert((result16 & 0x00ff) == (expected16 & 0x00ff)); }
// validate unaligned word accesses
printf(" read_word_unaligned = "); printf("%04X\n", result16 = read_word_unaligned(address)); assert(result16 == expected16);
@@ -896,15 +906,15 @@ public:
printf(" (0x00ff) = "); printf("%04X\n", result16 = read_word_unaligned(address, 0x00ff)); assert((result16 & 0x00ff) == (expected16 & 0x00ff));
// validate dword acceses (if aligned)
- if (DWORD_ALIGNED(address)) { printf(" read_dword = "); printf("%08X\n", result32 = read_dword(address)); assert(result32 == expected32); }
- if (DWORD_ALIGNED(address)) { printf(" read_dword (0xff000000) = "); printf("%08X\n", result32 = read_dword(address, 0xff000000)); assert((result32 & 0xff000000) == (expected32 & 0xff000000)); }
- if (DWORD_ALIGNED(address)) { printf(" (0x00ff0000) = "); printf("%08X\n", result32 = read_dword(address, 0x00ff0000)); assert((result32 & 0x00ff0000) == (expected32 & 0x00ff0000)); }
- if (DWORD_ALIGNED(address)) { printf(" (0x0000ff00) = "); printf("%08X\n", result32 = read_dword(address, 0x0000ff00)); assert((result32 & 0x0000ff00) == (expected32 & 0x0000ff00)); }
- if (DWORD_ALIGNED(address)) { printf(" (0x000000ff) = "); printf("%08X\n", result32 = read_dword(address, 0x000000ff)); assert((result32 & 0x000000ff) == (expected32 & 0x000000ff)); }
- if (DWORD_ALIGNED(address)) { printf(" (0xffff0000) = "); printf("%08X\n", result32 = read_dword(address, 0xffff0000)); assert((result32 & 0xffff0000) == (expected32 & 0xffff0000)); }
- if (DWORD_ALIGNED(address)) { printf(" (0x0000ffff) = "); printf("%08X\n", result32 = read_dword(address, 0x0000ffff)); assert((result32 & 0x0000ffff) == (expected32 & 0x0000ffff)); }
- if (DWORD_ALIGNED(address)) { printf(" (0xffffff00) = "); printf("%08X\n", result32 = read_dword(address, 0xffffff00)); assert((result32 & 0xffffff00) == (expected32 & 0xffffff00)); }
- if (DWORD_ALIGNED(address)) { printf(" (0x00ffffff) = "); printf("%08X\n", result32 = read_dword(address, 0x00ffffff)); assert((result32 & 0x00ffffff) == (expected32 & 0x00ffffff)); }
+ if (address % 4 == 0) { printf(" read_dword = "); printf("%08X\n", result32 = read_dword(address)); assert(result32 == expected32); }
+ if (address % 4 == 0) { printf(" read_dword (0xff000000) = "); printf("%08X\n", result32 = read_dword(address, 0xff000000)); assert((result32 & 0xff000000) == (expected32 & 0xff000000)); }
+ if (address % 4 == 0) { printf(" (0x00ff0000) = "); printf("%08X\n", result32 = read_dword(address, 0x00ff0000)); assert((result32 & 0x00ff0000) == (expected32 & 0x00ff0000)); }
+ if (address % 4 == 0) { printf(" (0x0000ff00) = "); printf("%08X\n", result32 = read_dword(address, 0x0000ff00)); assert((result32 & 0x0000ff00) == (expected32 & 0x0000ff00)); }
+ if (address % 4 == 0) { printf(" (0x000000ff) = "); printf("%08X\n", result32 = read_dword(address, 0x000000ff)); assert((result32 & 0x000000ff) == (expected32 & 0x000000ff)); }
+ if (address % 4 == 0) { printf(" (0xffff0000) = "); printf("%08X\n", result32 = read_dword(address, 0xffff0000)); assert((result32 & 0xffff0000) == (expected32 & 0xffff0000)); }
+ if (address % 4 == 0) { printf(" (0x0000ffff) = "); printf("%08X\n", result32 = read_dword(address, 0x0000ffff)); assert((result32 & 0x0000ffff) == (expected32 & 0x0000ffff)); }
+ if (address % 4 == 0) { printf(" (0xffffff00) = "); printf("%08X\n", result32 = read_dword(address, 0xffffff00)); assert((result32 & 0xffffff00) == (expected32 & 0xffffff00)); }
+ if (address % 4 == 0) { printf(" (0x00ffffff) = "); printf("%08X\n", result32 = read_dword(address, 0x00ffffff)); assert((result32 & 0x00ffffff) == (expected32 & 0x00ffffff)); }
// validate unaligned dword accesses
printf(" read_dword_unaligned = "); printf("%08X\n", result32 = read_dword_unaligned(address)); assert(result32 == expected32);
@@ -918,37 +928,37 @@ public:
printf(" (0x00ffffff) = "); printf("%08X\n", result32 = read_dword_unaligned(address, 0x00ffffff)); assert((result32 & 0x00ffffff) == (expected32 & 0x00ffffff));
// validate qword acceses (if aligned)
- if (QWORD_ALIGNED(address)) { printf(" read_qword = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address), 16)); assert(result64 == expected64); }
- if (QWORD_ALIGNED(address)) { printf(" read_qword (0xff00000000000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0xff00000000000000)), 16)); assert((result64 & U64(0xff00000000000000)) == (expected64 & U64(0xff00000000000000))); }
- if (QWORD_ALIGNED(address)) { printf(" (0x00ff000000000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x00ff000000000000)), 16)); assert((result64 & U64(0x00ff000000000000)) == (expected64 & U64(0x00ff000000000000))); }
- if (QWORD_ALIGNED(address)) { printf(" (0x0000ff0000000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x0000ff0000000000)), 16)); assert((result64 & U64(0x0000ff0000000000)) == (expected64 & U64(0x0000ff0000000000))); }
- if (QWORD_ALIGNED(address)) { printf(" (0x000000ff00000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x000000ff00000000)), 16)); assert((result64 & U64(0x000000ff00000000)) == (expected64 & U64(0x000000ff00000000))); }
- if (QWORD_ALIGNED(address)) { printf(" (0x00000000ff000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x00000000ff000000)), 16)); assert((result64 & U64(0x00000000ff000000)) == (expected64 & U64(0x00000000ff000000))); }
- if (QWORD_ALIGNED(address)) { printf(" (0x0000000000ff0000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x0000000000ff0000)), 16)); assert((result64 & U64(0x0000000000ff0000)) == (expected64 & U64(0x0000000000ff0000))); }
- if (QWORD_ALIGNED(address)) { printf(" (0x000000000000ff00) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x000000000000ff00)), 16)); assert((result64 & U64(0x000000000000ff00)) == (expected64 & U64(0x000000000000ff00))); }
- if (QWORD_ALIGNED(address)) { printf(" (0x00000000000000ff) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x00000000000000ff)), 16)); assert((result64 & U64(0x00000000000000ff)) == (expected64 & U64(0x00000000000000ff))); }
- if (QWORD_ALIGNED(address)) { printf(" (0xffff000000000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0xffff000000000000)), 16)); assert((result64 & U64(0xffff000000000000)) == (expected64 & U64(0xffff000000000000))); }
- if (QWORD_ALIGNED(address)) { printf(" (0x0000ffff00000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x0000ffff00000000)), 16)); assert((result64 & U64(0x0000ffff00000000)) == (expected64 & U64(0x0000ffff00000000))); }
- if (QWORD_ALIGNED(address)) { printf(" (0x00000000ffff0000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x00000000ffff0000)), 16)); assert((result64 & U64(0x00000000ffff0000)) == (expected64 & U64(0x00000000ffff0000))); }
- if (QWORD_ALIGNED(address)) { printf(" (0x000000000000ffff) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x000000000000ffff)), 16)); assert((result64 & U64(0x000000000000ffff)) == (expected64 & U64(0x000000000000ffff))); }
- if (QWORD_ALIGNED(address)) { printf(" (0xffffff0000000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0xffffff0000000000)), 16)); assert((result64 & U64(0xffffff0000000000)) == (expected64 & U64(0xffffff0000000000))); }
- if (QWORD_ALIGNED(address)) { printf(" (0x0000ffffff000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x0000ffffff000000)), 16)); assert((result64 & U64(0x0000ffffff000000)) == (expected64 & U64(0x0000ffffff000000))); }
- if (QWORD_ALIGNED(address)) { printf(" (0x000000ffffff0000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x000000ffffff0000)), 16)); assert((result64 & U64(0x000000ffffff0000)) == (expected64 & U64(0x000000ffffff0000))); }
- if (QWORD_ALIGNED(address)) { printf(" (0x0000000000ffffff) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x0000000000ffffff)), 16)); assert((result64 & U64(0x0000000000ffffff)) == (expected64 & U64(0x0000000000ffffff))); }
- if (QWORD_ALIGNED(address)) { printf(" (0xffffffff00000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0xffffffff00000000)), 16)); assert((result64 & U64(0xffffffff00000000)) == (expected64 & U64(0xffffffff00000000))); }
- if (QWORD_ALIGNED(address)) { printf(" (0x00ffffffff000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x00ffffffff000000)), 16)); assert((result64 & U64(0x00ffffffff000000)) == (expected64 & U64(0x00ffffffff000000))); }
- if (QWORD_ALIGNED(address)) { printf(" (0x0000ffffffff0000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x0000ffffffff0000)), 16)); assert((result64 & U64(0x0000ffffffff0000)) == (expected64 & U64(0x0000ffffffff0000))); }
- if (QWORD_ALIGNED(address)) { printf(" (0x000000ffffffff00) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x000000ffffffff00)), 16)); assert((result64 & U64(0x000000ffffffff00)) == (expected64 & U64(0x000000ffffffff00))); }
- if (QWORD_ALIGNED(address)) { printf(" (0x00000000ffffffff) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x00000000ffffffff)), 16)); assert((result64 & U64(0x00000000ffffffff)) == (expected64 & U64(0x00000000ffffffff))); }
- if (QWORD_ALIGNED(address)) { printf(" (0xffffffffff000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0xffffffffff000000)), 16)); assert((result64 & U64(0xffffffffff000000)) == (expected64 & U64(0xffffffffff000000))); }
- if (QWORD_ALIGNED(address)) { printf(" (0x00ffffffffff0000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x00ffffffffff0000)), 16)); assert((result64 & U64(0x00ffffffffff0000)) == (expected64 & U64(0x00ffffffffff0000))); }
- if (QWORD_ALIGNED(address)) { printf(" (0x0000ffffffffff00) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x0000ffffffffff00)), 16)); assert((result64 & U64(0x0000ffffffffff00)) == (expected64 & U64(0x0000ffffffffff00))); }
- if (QWORD_ALIGNED(address)) { printf(" (0x000000ffffffffff) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x000000ffffffffff)), 16)); assert((result64 & U64(0x000000ffffffffff)) == (expected64 & U64(0x000000ffffffffff))); }
- if (QWORD_ALIGNED(address)) { printf(" (0xffffffffffff0000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0xffffffffffff0000)), 16)); assert((result64 & U64(0xffffffffffff0000)) == (expected64 & U64(0xffffffffffff0000))); }
- if (QWORD_ALIGNED(address)) { printf(" (0x00ffffffffffff00) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x00ffffffffffff00)), 16)); assert((result64 & U64(0x00ffffffffffff00)) == (expected64 & U64(0x00ffffffffffff00))); }
- if (QWORD_ALIGNED(address)) { printf(" (0x0000ffffffffffff) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x0000ffffffffffff)), 16)); assert((result64 & U64(0x0000ffffffffffff)) == (expected64 & U64(0x0000ffffffffffff))); }
- if (QWORD_ALIGNED(address)) { printf(" (0xffffffffffffff00) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0xffffffffffffff00)), 16)); assert((result64 & U64(0xffffffffffffff00)) == (expected64 & U64(0xffffffffffffff00))); }
- if (QWORD_ALIGNED(address)) { printf(" (0x00ffffffffffffff) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x00ffffffffffffff)), 16)); assert((result64 & U64(0x00ffffffffffffff)) == (expected64 & U64(0x00ffffffffffffff))); }
+ if (address % 8 == 0) { printf(" read_qword = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address), 16)); assert(result64 == expected64); }
+ if (address % 8 == 0) { printf(" read_qword (0xff00000000000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0xff00000000000000)), 16)); assert((result64 & U64(0xff00000000000000)) == (expected64 & U64(0xff00000000000000))); }
+ if (address % 8 == 0) { printf(" (0x00ff000000000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x00ff000000000000)), 16)); assert((result64 & U64(0x00ff000000000000)) == (expected64 & U64(0x00ff000000000000))); }
+ if (address % 8 == 0) { printf(" (0x0000ff0000000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x0000ff0000000000)), 16)); assert((result64 & U64(0x0000ff0000000000)) == (expected64 & U64(0x0000ff0000000000))); }
+ if (address % 8 == 0) { printf(" (0x000000ff00000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x000000ff00000000)), 16)); assert((result64 & U64(0x000000ff00000000)) == (expected64 & U64(0x000000ff00000000))); }
+ if (address % 8 == 0) { printf(" (0x00000000ff000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x00000000ff000000)), 16)); assert((result64 & U64(0x00000000ff000000)) == (expected64 & U64(0x00000000ff000000))); }
+ if (address % 8 == 0) { printf(" (0x0000000000ff0000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x0000000000ff0000)), 16)); assert((result64 & U64(0x0000000000ff0000)) == (expected64 & U64(0x0000000000ff0000))); }
+ if (address % 8 == 0) { printf(" (0x000000000000ff00) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x000000000000ff00)), 16)); assert((result64 & U64(0x000000000000ff00)) == (expected64 & U64(0x000000000000ff00))); }
+ if (address % 8 == 0) { printf(" (0x00000000000000ff) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x00000000000000ff)), 16)); assert((result64 & U64(0x00000000000000ff)) == (expected64 & U64(0x00000000000000ff))); }
+ if (address % 8 == 0) { printf(" (0xffff000000000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0xffff000000000000)), 16)); assert((result64 & U64(0xffff000000000000)) == (expected64 & U64(0xffff000000000000))); }
+ if (address % 8 == 0) { printf(" (0x0000ffff00000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x0000ffff00000000)), 16)); assert((result64 & U64(0x0000ffff00000000)) == (expected64 & U64(0x0000ffff00000000))); }
+ if (address % 8 == 0) { printf(" (0x00000000ffff0000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x00000000ffff0000)), 16)); assert((result64 & U64(0x00000000ffff0000)) == (expected64 & U64(0x00000000ffff0000))); }
+ if (address % 8 == 0) { printf(" (0x000000000000ffff) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x000000000000ffff)), 16)); assert((result64 & U64(0x000000000000ffff)) == (expected64 & U64(0x000000000000ffff))); }
+ if (address % 8 == 0) { printf(" (0xffffff0000000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0xffffff0000000000)), 16)); assert((result64 & U64(0xffffff0000000000)) == (expected64 & U64(0xffffff0000000000))); }
+ if (address % 8 == 0) { printf(" (0x0000ffffff000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x0000ffffff000000)), 16)); assert((result64 & U64(0x0000ffffff000000)) == (expected64 & U64(0x0000ffffff000000))); }
+ if (address % 8 == 0) { printf(" (0x000000ffffff0000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x000000ffffff0000)), 16)); assert((result64 & U64(0x000000ffffff0000)) == (expected64 & U64(0x000000ffffff0000))); }
+ if (address % 8 == 0) { printf(" (0x0000000000ffffff) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x0000000000ffffff)), 16)); assert((result64 & U64(0x0000000000ffffff)) == (expected64 & U64(0x0000000000ffffff))); }
+ if (address % 8 == 0) { printf(" (0xffffffff00000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0xffffffff00000000)), 16)); assert((result64 & U64(0xffffffff00000000)) == (expected64 & U64(0xffffffff00000000))); }
+ if (address % 8 == 0) { printf(" (0x00ffffffff000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x00ffffffff000000)), 16)); assert((result64 & U64(0x00ffffffff000000)) == (expected64 & U64(0x00ffffffff000000))); }
+ if (address % 8 == 0) { printf(" (0x0000ffffffff0000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x0000ffffffff0000)), 16)); assert((result64 & U64(0x0000ffffffff0000)) == (expected64 & U64(0x0000ffffffff0000))); }
+ if (address % 8 == 0) { printf(" (0x000000ffffffff00) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x000000ffffffff00)), 16)); assert((result64 & U64(0x000000ffffffff00)) == (expected64 & U64(0x000000ffffffff00))); }
+ if (address % 8 == 0) { printf(" (0x00000000ffffffff) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x00000000ffffffff)), 16)); assert((result64 & U64(0x00000000ffffffff)) == (expected64 & U64(0x00000000ffffffff))); }
+ if (address % 8 == 0) { printf(" (0xffffffffff000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0xffffffffff000000)), 16)); assert((result64 & U64(0xffffffffff000000)) == (expected64 & U64(0xffffffffff000000))); }
+ if (address % 8 == 0) { printf(" (0x00ffffffffff0000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x00ffffffffff0000)), 16)); assert((result64 & U64(0x00ffffffffff0000)) == (expected64 & U64(0x00ffffffffff0000))); }
+ if (address % 8 == 0) { printf(" (0x0000ffffffffff00) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x0000ffffffffff00)), 16)); assert((result64 & U64(0x0000ffffffffff00)) == (expected64 & U64(0x0000ffffffffff00))); }
+ if (address % 8 == 0) { printf(" (0x000000ffffffffff) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x000000ffffffffff)), 16)); assert((result64 & U64(0x000000ffffffffff)) == (expected64 & U64(0x000000ffffffffff))); }
+ if (address % 8 == 0) { printf(" (0xffffffffffff0000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0xffffffffffff0000)), 16)); assert((result64 & U64(0xffffffffffff0000)) == (expected64 & U64(0xffffffffffff0000))); }
+ if (address % 8 == 0) { printf(" (0x00ffffffffffff00) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x00ffffffffffff00)), 16)); assert((result64 & U64(0x00ffffffffffff00)) == (expected64 & U64(0x00ffffffffffff00))); }
+ if (address % 8 == 0) { printf(" (0x0000ffffffffffff) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x0000ffffffffffff)), 16)); assert((result64 & U64(0x0000ffffffffffff)) == (expected64 & U64(0x0000ffffffffffff))); }
+ if (address % 8 == 0) { printf(" (0xffffffffffffff00) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0xffffffffffffff00)), 16)); assert((result64 & U64(0xffffffffffffff00)) == (expected64 & U64(0xffffffffffffff00))); }
+ if (address % 8 == 0) { printf(" (0x00ffffffffffffff) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x00ffffffffffffff)), 16)); assert((result64 & U64(0x00ffffffffffffff)) == (expected64 & U64(0x00ffffffffffffff))); }
// validate unaligned qword accesses
printf(" read_qword_unaligned = "); printf("%s\n", core_i64_hex_format(result64 = read_qword_unaligned(address), 16)); assert(result64 == expected64);
diff --git a/src/emu/memory.h b/src/emu/memory.h
index 0b2b493a27d..3b46ac33449 100644
--- a/src/emu/memory.h
+++ b/src/emu/memory.h
@@ -239,12 +239,10 @@ public:
INT8 m_addrbus_shift;
UINT8 m_logaddr_width;
UINT8 m_page_shift;
- bool m_is_octal; // to determine if messages/debugger will show octal or hex
-
address_map_constructor m_internal_map;
address_map_constructor m_default_map;
- address_map_delegate m_internal_map_delegate;
- address_map_delegate m_default_map_delegate;
+ address_map_delegate m_internal_map_delegate;
+ address_map_delegate m_default_map_delegate;
};
@@ -285,7 +283,6 @@ public:
int addr_width() const { return m_config.addr_width(); }
endianness_t endianness() const { return m_config.endianness(); }
UINT64 unmap() const { return m_unmap; }
- bool is_octal() const { return m_config.m_is_octal; }
offs_t addrmask() const { return m_addrmask; }
offs_t bytemask() const { return m_bytemask; }
@@ -869,12 +866,6 @@ private:
#define DWORD_XOR_LE(a) ((a) ^ NATIVE_ENDIAN_VALUE_LE_BE(0,4))
-// helpers for checking address alignment
-#define WORD_ALIGNED(a) (((a) & 1) == 0)
-#define DWORD_ALIGNED(a) (((a) & 3) == 0)
-#define QWORD_ALIGNED(a) (((a) & 7) == 0)
-
-
//**************************************************************************
// INLINE FUNCTIONS
diff --git a/src/emu/render.cpp b/src/emu/render.cpp
index 3de791eab52..baa5aa8db1b 100644
--- a/src/emu/render.cpp
+++ b/src/emu/render.cpp
@@ -227,6 +227,7 @@ void render_primitive::reset()
//-------------------------------------------------
render_primitive_list::render_primitive_list()
+ : m_lock(osd_lock_alloc())
{
}
@@ -238,6 +239,7 @@ render_primitive_list::render_primitive_list()
render_primitive_list::~render_primitive_list()
{
release_all();
+ osd_lock_free(m_lock);
}
@@ -294,8 +296,10 @@ inline render_primitive *render_primitive_list::alloc(render_primitive::primitiv
void render_primitive_list::release_all()
{
// release all the live items while under the lock
+ acquire_lock();
m_primitive_allocator.reclaim_all(m_primlist);
m_reference_allocator.reclaim_all(m_reflist);
+ release_lock();
}
@@ -442,7 +446,7 @@ void render_texture::hq_scale(bitmap_argb32 &dest, bitmap_argb32 &source, const
// get_scaled - get a scaled bitmap (if we can)
//-------------------------------------------------
-void render_texture::get_scaled(UINT32 dwidth, UINT32 dheight, render_texinfo &texinfo, render_primitive_list &primlist, UINT32 flags)
+void render_texture::get_scaled(UINT32 dwidth, UINT32 dheight, render_texinfo &texinfo, render_primitive_list &primlist)
{
// source width/height come from the source bounds
int swidth = m_sbounds.width();
@@ -677,7 +681,7 @@ void render_container::add_char(float x0, float y0, float height, float aspect,
// add it like a quad
item &newitem = add_generic(CONTAINER_ITEM_QUAD, bounds.x0, bounds.y0, bounds.x1, bounds.y1, argb);
newitem.m_texture = texture;
- newitem.m_flags = PRIMFLAG_TEXORIENT(ROT0) | PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_PACKABLE;
+ newitem.m_flags = PRIMFLAG_TEXORIENT(ROT0) | PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA);
newitem.m_internal = INTERNAL_FLAG_CHAR;
}
@@ -1051,9 +1055,8 @@ int render_target::configured_view(const char *viewname, int targetindex, int nu
if (strcmp(viewname, "auto") != 0)
{
// scan for a matching view name
- size_t viewlen = strlen(viewname);
for (view = view_by_index(viewindex = 0); view != nullptr; view = view_by_index(++viewindex))
- if (core_strnicmp(view->name(), viewname, viewlen) == 0)
+ if (core_strnicmp(view->name(), viewname, strlen(viewname)) == 0)
break;
}
@@ -1751,7 +1754,7 @@ void render_target::add_container_primitives(render_primitive_list &list, const
width = MIN(width, m_maxtexwidth);
height = MIN(height, m_maxtexheight);
- curitem->texture()->get_scaled(width, height, prim->texture, list, curitem->flags());
+ curitem->texture()->get_scaled(width, height, prim->texture, list);
// set the palette
prim->texture.palette = curitem->texture()->get_adjusted_palette(container);
@@ -1854,7 +1857,7 @@ void render_target::add_element_primitives(render_primitive_list &list, const ob
// get the scaled texture and append it
- texture->get_scaled(width, height, prim->texture, list, prim->flags);
+ texture->get_scaled(width, height, prim->texture, list);
// compute the clip rect
render_bounds cliprect;
diff --git a/src/emu/render.h b/src/emu/render.h
index 6d55c75ada9..df8896b712b 100644
--- a/src/emu/render.h
+++ b/src/emu/render.h
@@ -49,7 +49,6 @@
//#include "osdepend.h"
#include <math.h>
-#include <mutex>
//**************************************************************************
@@ -62,9 +61,7 @@ enum
BLENDMODE_NONE = 0, // no blending
BLENDMODE_ALPHA, // standard alpha blend
BLENDMODE_RGB_MULTIPLY, // apply source alpha to source pix, then multiply RGB values
- BLENDMODE_ADD, // apply source alpha to source pix, then add to destination
-
- BLENDMODE_COUNT
+ BLENDMODE_ADD // apply source alpha to source pix, then add to destination
};
@@ -107,9 +104,6 @@ const UINT32 PRIMFLAG_TYPE_MASK = 3 << PRIMFLAG_TYPE_SHIFT;
const UINT32 PRIMFLAG_TYPE_LINE = 0 << PRIMFLAG_TYPE_SHIFT;
const UINT32 PRIMFLAG_TYPE_QUAD = 1 << PRIMFLAG_TYPE_SHIFT;
-const int PRIMFLAG_PACKABLE_SHIFT = 21;
-const UINT32 PRIMFLAG_PACKABLE = 1 << PRIMFLAG_PACKABLE_SHIFT;
-
//**************************************************************************
// MACROS
//**************************************************************************
@@ -328,7 +322,6 @@ public:
// getters
render_primitive *next() const { return m_next; }
- bool packable(const INT32 pack_size) const { return (flags & PRIMFLAG_PACKABLE) && texture.base != nullptr && texture.width <= pack_size && texture.height <= pack_size; }
// reset to prepare for re-use
void reset();
@@ -365,8 +358,8 @@ public:
render_primitive *first() const { return m_primlist.first(); }
// lock management
- void acquire_lock() { m_lock.lock(); }
- void release_lock() { m_lock.unlock(); }
+ void acquire_lock() { osd_lock_acquire(m_lock); }
+ void release_lock() { osd_lock_release(m_lock); }
// reference management
void add_reference(void *refptr);
@@ -395,7 +388,7 @@ private:
fixed_allocator<render_primitive> m_primitive_allocator;// allocator for primitives
fixed_allocator<reference> m_reference_allocator; // allocator for references
- std::recursive_mutex m_lock; // lock to protect list accesses
+ osd_lock * m_lock; // lock to protect list accesses
};
@@ -436,7 +429,7 @@ public:
private:
// internal helpers
- void get_scaled(UINT32 dwidth, UINT32 dheight, render_texinfo &texinfo, render_primitive_list &primlist, UINT32 flags = 0);
+ void get_scaled(UINT32 dwidth, UINT32 dheight, render_texinfo &texinfo, render_primitive_list &primlist);
const rgb_t *get_adjusted_palette(render_container &container);
static const int MAX_TEXTURE_SCALES = 16;
diff --git a/src/emu/rendfont.cpp b/src/emu/rendfont.cpp
index 89c174c31bf..63ff7dc47de 100644
--- a/src/emu/rendfont.cpp
+++ b/src/emu/rendfont.cpp
@@ -16,7 +16,6 @@
#include "osdepend.h"
#include "uismall.fh"
-#include "ui/cmdrender.h"
//**************************************************************************
// INLINE FUNCTIONS
@@ -56,51 +55,12 @@ inline render_font::glyph &render_font::get_char(unicode_char chnum)
if (!m_glyphs[chnum / 256] && m_format == FF_OSD)
m_glyphs[chnum / 256] = new glyph[256];
if (!m_glyphs[chnum / 256])
- {
- //mamep: make table for command glyph
- if (chnum >= COMMAND_UNICODE && chnum < COMMAND_UNICODE + MAX_GLYPH_FONT)
- m_glyphs[chnum / 256] = new glyph[256];
- else
- return dummy_glyph;
- }
+ return dummy_glyph;
// if the character isn't generated yet, do it now
glyph &gl = m_glyphs[chnum / 256][chnum % 256];
if (!gl.bitmap.valid())
- {
- //mamep: command glyph support
- if (m_height_cmd && chnum >= COMMAND_UNICODE && chnum < COMMAND_UNICODE + MAX_GLYPH_FONT)
- {
- glyph &glyph_ch = m_glyphs_cmd[chnum / 256][chnum % 256];
- float scale = (float)m_height / (float)m_height_cmd;
- if (m_format == FF_OSD) scale *= 0.90f;
-
- if (!glyph_ch.bitmap.valid())
- char_expand(chnum, glyph_ch);
-
- //mamep: for color glyph
- gl.color = glyph_ch.color;
-
- gl.width = (int)(glyph_ch.width * scale + 0.5f);
- gl.xoffs = (int)(glyph_ch.xoffs * scale + 0.5f);
- gl.yoffs = (int)(glyph_ch.yoffs * scale + 0.5f);
- gl.bmwidth = (int)(glyph_ch.bmwidth * scale + 0.5f);
- gl.bmheight = (int)(glyph_ch.bmheight * scale + 0.5f);
-
- gl.bitmap.allocate(gl.bmwidth, gl.bmheight);
- rectangle clip;
- clip.min_x = clip.min_y = 0;
- clip.max_x = glyph_ch.bitmap.width() - 1;
- clip.max_y = glyph_ch.bitmap.height() - 1;
- render_texture::hq_scale(gl.bitmap, glyph_ch.bitmap, clip, nullptr);
-
- /* wrap a texture around the bitmap */
- gl.texture = m_manager.texture_alloc(render_texture::hq_scale);
- gl.texture->set_bitmap(gl.bitmap, gl.bitmap.cliprect(), TEXFORMAT_ARGB32);
- }
- else
- char_expand(chnum, gl);
- }
+ char_expand(chnum, gl);
// return the resulting character
return gl;
@@ -123,12 +83,9 @@ render_font::render_font(render_manager &manager, const char *filename)
m_yoffs(0),
m_scale(1.0f),
m_rawsize(0),
- m_osdfont(nullptr),
- m_height_cmd(0),
- m_yoffs_cmd(0)
+ m_osdfont(nullptr)
{
memset(m_glyphs, 0, sizeof(m_glyphs));
- memset(m_glyphs_cmd, 0, sizeof(m_glyphs_cmd));
// if this is an OSD font, we're done
if (filename != nullptr)
@@ -138,13 +95,10 @@ render_font::render_font(render_manager &manager, const char *filename)
{
if (m_osdfont->open(manager.machine().options().font_path(), filename, m_height))
{
- m_scale = 1.0f / (float)m_height;
- m_format = FF_OSD;
-
- //mamep: allocate command glyph font
- render_font_command_glyph();
- return;
- }
+ m_scale = 1.0f / (float)m_height;
+ m_format = FF_OSD;
+ return;
+ }
global_free(m_osdfont);
m_osdfont = nullptr;
}
@@ -156,18 +110,13 @@ render_font::render_font(render_manager &manager, const char *filename)
// attempt to load the cached version of the font first
if (filename != nullptr && load_cached_bdf(filename))
- {
- //mamep: allocate command glyph font
- render_font_command_glyph();
- return;
- }
+ return;
// load the raw data instead
emu_file ramfile(OPEN_FLAG_READ);
file_error filerr = ramfile.open_ram(font_uismall, sizeof(font_uismall));
if (filerr == FILERR_NONE)
load_cached(ramfile, 0);
- render_font_command_glyph();
}
@@ -189,17 +138,6 @@ render_font::~render_font()
delete[] elem;
}
- for (auto & elem : m_glyphs_cmd)
- if (elem)
- {
- for (unsigned int charnum = 0; charnum < 256; charnum++)
- {
- glyph &gl = elem[charnum];
- m_manager.texture_free(gl.texture);
- }
- delete[] elem;
- }
-
// release the OSD font
if (m_osdfont != nullptr)
{
@@ -216,43 +154,8 @@ render_font::~render_font()
void render_font::char_expand(unicode_char chnum, glyph &gl)
{
- rgb_t color = rgb_t(0xff,0xff,0xff,0xff);
- bool is_cmd = (chnum >= COMMAND_UNICODE && chnum < COMMAND_UNICODE + MAX_GLYPH_FONT);
-
- if (gl.color)
- color = gl.color;
-
- if (is_cmd)
- {
- // punt if nothing there
- if (gl.bmwidth == 0 || gl.bmheight == 0 || gl.rawdata == nullptr)
- return;
-
- // allocate a new bitmap of the size we need
- gl.bitmap.allocate(gl.bmwidth, m_height_cmd);
- gl.bitmap.fill(0);
-
- // extract the data
- const char *ptr = gl.rawdata;
- UINT8 accum = 0, accumbit = 7;
- for (int y = 0; y < gl.bmheight; y++)
- {
- int desty = y + m_height_cmd + m_yoffs_cmd - gl.yoffs - gl.bmheight;
- UINT32 *dest = (desty >= 0 && desty < m_height_cmd) ? &gl.bitmap.pix32(desty, 0) : nullptr;
- {
- for (int x = 0; x < gl.bmwidth; x++)
- {
- if (accumbit == 7)
- accum = *ptr++;
- if (dest != nullptr)
- *dest++ = (accum & (1 << accumbit)) ? color : rgb_t(0x00,0xff,0xff,0xff);
- accumbit = (accumbit - 1) & 7;
- }
- }
- }
- }
// if we're an OSD font, query the info
- else if (m_format == FF_OSD)
+ if (m_format == FF_OSD)
{
// we set bmwidth to -1 if we've previously queried and failed
if (gl.bmwidth == -1)
@@ -270,6 +173,7 @@ void render_font::char_expand(unicode_char chnum, glyph &gl)
gl.bmwidth = gl.bitmap.width();
gl.bmheight = gl.bitmap.height();
}
+
// other formats need to parse their data
else
{
@@ -312,10 +216,10 @@ void render_font::char_expand(unicode_char chnum, glyph &gl)
// expand the four bits
if (dest != nullptr)
{
- *dest++ = (bits & 8) ? color : rgb_t(0x00,0xff,0xff,0xff);
- *dest++ = (bits & 4) ? color : rgb_t(0x00,0xff,0xff,0xff);
- *dest++ = (bits & 2) ? color : rgb_t(0x00,0xff,0xff,0xff);
- *dest++ = (bits & 1) ? color : rgb_t(0x00,0xff,0xff,0xff);
+ *dest++ = (bits & 8) ? rgb_t(0xff,0xff,0xff,0xff) : rgb_t(0x00,0xff,0xff,0xff);
+ *dest++ = (bits & 4) ? rgb_t(0xff,0xff,0xff,0xff) : rgb_t(0x00,0xff,0xff,0xff);
+ *dest++ = (bits & 2) ? rgb_t(0xff,0xff,0xff,0xff) : rgb_t(0x00,0xff,0xff,0xff);
+ *dest++ = (bits & 1) ? rgb_t(0xff,0xff,0xff,0xff) : rgb_t(0x00,0xff,0xff,0xff);
}
}
@@ -331,7 +235,7 @@ void render_font::char_expand(unicode_char chnum, glyph &gl)
if (accumbit == 7)
accum = *ptr++;
if (dest != nullptr)
- *dest++ = (accum & (1 << accumbit)) ? color : rgb_t(0x00,0xff,0xff,0xff);
+ *dest++ = (accum & (1 << accumbit)) ? rgb_t(0xff,0xff,0xff,0xff) : rgb_t(0x00,0xff,0xff,0xff);
accumbit = (accumbit - 1) & 7;
}
}
diff --git a/src/emu/rendfont.h b/src/emu/rendfont.h
index 1f05babd789..aced202260d 100644
--- a/src/emu/rendfont.h
+++ b/src/emu/rendfont.h
@@ -65,9 +65,6 @@ private:
const char * rawdata; // pointer to the raw data for this one
render_texture * texture; // pointer to a texture for rendering and sizing
bitmap_argb32 bitmap; // pointer to the bitmap containing the raw data
-
- rgb_t color;
-
};
// internal format
@@ -85,11 +82,8 @@ private:
bool load_cached_bdf(const char *filename);
bool load_bdf();
bool load_cached(emu_file &file, UINT32 hash);
- bool load_cached_cmd(emu_file &file, UINT32 hash);
bool save_cached(const char *filename, UINT32 hash);
- void render_font_command_glyph();
-
// internal state
render_manager & m_manager;
format m_format; // format of font data
@@ -99,12 +93,7 @@ private:
glyph *m_glyphs[256]; // array of glyph subtables
std::vector<char> m_rawdata; // pointer to the raw data for the font
UINT64 m_rawsize; // size of the raw font data
- osd_font *m_osdfont; // handle to the OSD font
-
- int m_height_cmd; // height of the font, from ascent to descent
- int m_yoffs_cmd; // y offset from baseline to descent
- glyph *m_glyphs_cmd[256]; // array of glyph subtables
- std::vector<char> m_rawdata_cmd; // pointer to the raw data for the font
+ osd_font *m_osdfont; // handle to the OSD font
// constants
static const int CACHED_CHAR_SIZE = 12;
@@ -112,6 +101,5 @@ private:
static const int CACHED_BDF_HASH_SIZE = 1024;
};
-void convert_command_glyph(std::string &s);
#endif /* __RENDFONT_H__ */
diff --git a/src/emu/rendutil.cpp b/src/emu/rendutil.cpp
index 6d0bde63adb..1a487536455 100644
--- a/src/emu/rendutil.cpp
+++ b/src/emu/rendutil.cpp
@@ -35,7 +35,7 @@ static bool copy_png_alpha_to_bitmap(bitmap_argb32 &bitmap, const png_info *png)
quality resampling of a texture
-------------------------------------------------*/
-void render_resample_argb_bitmap_hq(bitmap_argb32 &dest, bitmap_argb32 &source, const render_color &color, bool force)
+void render_resample_argb_bitmap_hq(bitmap_argb32 &dest, bitmap_argb32 &source, const render_color &color)
{
if (dest.width() == 0 || dest.height() == 0)
return;
@@ -52,7 +52,7 @@ void render_resample_argb_bitmap_hq(bitmap_argb32 &dest, bitmap_argb32 &source,
UINT32 dy = (sheight << 12) / dheight;
/* if the source is higher res than the target, use full averaging */
- if (dx > 0x1000 || dy > 0x1000 || force)
+ if (dx > 0x1000 || dy > 0x1000)
resample_argb_bitmap_average(&dest.pix(0), dest.rowpixels(), dwidth, dheight, sbase, source.rowpixels(), swidth, sheight, color, dx, dy);
else
resample_argb_bitmap_bilinear(&dest.pix(0), dest.rowpixels(), dwidth, dheight, sbase, source.rowpixels(), swidth, sheight, color, dx, dy);
diff --git a/src/emu/rendutil.h b/src/emu/rendutil.h
index 34a9c2ef75c..d992d35d88c 100644
--- a/src/emu/rendutil.h
+++ b/src/emu/rendutil.h
@@ -21,7 +21,7 @@
/* ----- render utilities ----- */
-void render_resample_argb_bitmap_hq(bitmap_argb32 &dest, bitmap_argb32 &source, const render_color &color, bool force = false);
+void render_resample_argb_bitmap_hq(bitmap_argb32 &dest, bitmap_argb32 &source, const render_color &color);
int render_clip_line(render_bounds *bounds, const render_bounds *clip);
int render_clip_quad(render_bounds *bounds, const render_bounds *clip, render_quad_texuv *texcoords);
void render_line_to_quad(const render_bounds *bounds, float width, render_bounds *bounds0, render_bounds *bounds1);
diff --git a/src/emu/romload.cpp b/src/emu/romload.cpp
index 886093edf13..28cc994402c 100644
--- a/src/emu/romload.cpp
+++ b/src/emu/romload.cpp
@@ -302,8 +302,8 @@ void rom_load_manager::determine_bios_rom(device_t *device, const char *specbios
/* if we got neither an empty string nor 'default' then warn the user */
if (specbios[0] != 0 && strcmp(specbios, "default") != 0)
{
- strcatprintf(m_errorstring, "%s: invalid bios, reverting to default\n", specbios);
- m_warnings++;
+ strcatprintf(m_errorstring, "%s: invalid bios\n", specbios);
+ m_errors++;
}
/* set to default */
@@ -464,7 +464,7 @@ void rom_load_manager::display_loading_rom_message(const char *name, bool from_l
char buffer[200];
if (name != nullptr)
- sprintf(buffer, "%s (%d%%)", from_list ? "Loading Software" : "Loading Machine", (UINT32)(100 * (UINT64)m_romsloadedsize / (UINT64)m_romstotalsize));
+ sprintf(buffer, "Loading %s (%d%%)", from_list ? "Software" : emulator_info::get_capstartgamenoun(), (UINT32)(100 * (UINT64)m_romsloadedsize / (UINT64)m_romstotalsize));
else
sprintf(buffer, "Loading Complete");
@@ -488,13 +488,15 @@ void rom_load_manager::display_rom_load_results(bool from_list)
{
/* create the error message and exit fatally */
osd_printf_error("%s", m_errorstring.c_str());
- fatalerror_exitcode(machine(), MAMERR_MISSING_FILES, "Required files are missing, the machine cannot be run.");
+ fatalerror_exitcode(machine(), MAMERR_MISSING_FILES, "Required files are missing, the %s cannot be run.",emulator_info::get_gamenoun());
}
/* if we had warnings, output them, but continue */
if ((m_warnings) || (m_knownbad))
{
- m_errorstring.append("WARNING: the machine might not run correctly.");
+ m_errorstring.append("WARNING: the ");
+ m_errorstring.append(emulator_info::get_gamenoun());
+ m_errorstring.append(" might not run correctly.");
osd_printf_warning("%s\n", m_errorstring.c_str());
}
}
diff --git a/src/emu/save.cpp b/src/emu/save.cpp
index 89197ab224e..4a5b3ef7ebf 100644
--- a/src/emu/save.cpp
+++ b/src/emu/save.cpp
@@ -49,7 +49,6 @@ enum
SS_MSB_FIRST = 0x02
};
-#define STATE_MAGIC_NUM "MAMESAVE"
//**************************************************************************
// INITIALIZATION
@@ -293,7 +292,7 @@ save_error save_manager::write_file(emu_file &file)
// generate the header
UINT8 header[HEADER_SIZE];
- memcpy(&header[0], STATE_MAGIC_NUM, 8);
+ memcpy(&header[0], emulator_info::get_state_magic_num(), 8);
header[8] = SAVE_VERSION;
header[9] = NATIVE_ENDIAN_VALUE_LE_BE(0, SS_MSB_FIRST);
strncpy((char *)&header[0x0a], machine().system().name, 0x1c - 0x0a);
@@ -366,7 +365,7 @@ save_error save_manager::validate_header(const UINT8 *header, const char *gamena
void (CLIB_DECL *errormsg)(const char *fmt, ...), const char *error_prefix)
{
// check magic number
- if (memcmp(header, STATE_MAGIC_NUM, 8))
+ if (memcmp(header, emulator_info::get_state_magic_num(), 8))
{
if (errormsg != nullptr)
(*errormsg)("%sThis is not a %s save file", error_prefix,emulator_info::get_appname());
diff --git a/src/emu/sound/wavwrite.cpp b/src/emu/sound/wavwrite.cpp
index 173962ea46c..210b1bcc9d5 100644
--- a/src/emu/sound/wavwrite.cpp
+++ b/src/emu/sound/wavwrite.cpp
@@ -18,7 +18,7 @@ wav_file *wav_open(const char *filename, int sample_rate, int channels)
UINT16 align, temp16;
/* allocate memory for the wav struct */
- wav = global_alloc_nothrow(wav_file);
+ wav = (wav_file *) global_alloc(wav_file);
if (!wav)
return nullptr;
diff --git a/src/emu/ui/auditmenu.cpp b/src/emu/ui/auditmenu.cpp
deleted file mode 100644
index 97d84568118..00000000000
--- a/src/emu/ui/auditmenu.cpp
+++ /dev/null
@@ -1,200 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Dankan1890
-/*********************************************************************
-
- ui/auditmenu.cpp
-
- Internal UI user interface.
-
-*********************************************************************/
-
-#include "emu.h"
-#include "ui/ui.h"
-#include "ui/menu.h"
-#include "audit.h"
-#include "ui/auditmenu.h"
-#include <algorithm>
-
-extern const char UI_VERSION_TAG[];
-
-//-------------------------------------------------
-// sort
-//-------------------------------------------------
-
-inline int cs_stricmp(const char *s1, const char *s2)
-{
- for (;;)
- {
- int c1 = tolower((UINT8)*s1++);
- int c2 = tolower((UINT8)*s2++);
- if (c1 == 0 || c1 != c2)
- return c1 - c2;
- }
-}
-
-bool sorted_game_list(const game_driver *x, const game_driver *y)
-{
- bool clonex = strcmp(x->parent, "0");
- bool cloney = strcmp(y->parent, "0");
-
- if (!clonex && !cloney)
- return (cs_stricmp(x->description, y->description) < 0);
-
- int cx = -1, cy = -1;
- if (clonex)
- {
- cx = driver_list::find(x->parent);
- if (cx == -1 || (driver_list::driver(cx).flags & MACHINE_IS_BIOS_ROOT) != 0)
- clonex = false;
- }
-
- if (cloney)
- {
- cy = driver_list::find(y->parent);
- if (cy == -1 || (driver_list::driver(cy).flags & MACHINE_IS_BIOS_ROOT) != 0)
- cloney = false;
- }
-
- if (!clonex && !cloney)
- return (cs_stricmp(x->description, y->description) < 0);
- else if (clonex && cloney)
- {
- if (!cs_stricmp(x->parent, y->parent))
- return (cs_stricmp(x->description, y->description) < 0);
- else
- return (cs_stricmp(driver_list::driver(cx).description, driver_list::driver(cy).description) < 0);
- }
- else if (!clonex && cloney)
- {
- if (!cs_stricmp(x->name, y->parent))
- return true;
- else
- return (cs_stricmp(x->description, driver_list::driver(cy).description) < 0);
- }
- else
- {
- if (!cs_stricmp(x->parent, y->name))
- return false;
- else
- return (cs_stricmp(driver_list::driver(cx).description, y->description) < 0);
- }
-}
-
-//-------------------------------------------------
-// ctor / dtor
-//-------------------------------------------------
-
-ui_menu_audit::ui_menu_audit(running_machine &machine, render_container *container, std::vector<const game_driver *> &availablesorted, std::vector<const game_driver *> &unavailablesorted, int _audit_mode)
- : ui_menu(machine, container), m_availablesorted(availablesorted), m_unavailablesorted(unavailablesorted), m_audit_mode(_audit_mode), m_first(true)
-{
- if (m_audit_mode == 2)
- {
- m_availablesorted.clear();
- m_unavailablesorted.clear();
- }
-}
-
-ui_menu_audit::~ui_menu_audit()
-{
-}
-
-//-------------------------------------------------
-// handle
-//-------------------------------------------------
-
-void ui_menu_audit::handle()
-{
- process(UI_MENU_PROCESS_CUSTOM_ONLY);
-
- if (m_first)
- {
- machine().ui().draw_text_box(container, _("Audit in progress..."), JUSTIFY_CENTER, 0.5f, 0.5f, UI_GREEN_COLOR);
- m_first = false;
- return;
- }
-
- if (m_audit_mode == 1)
- {
- std::vector<const game_driver *>::iterator iter = m_unavailablesorted.begin();
- while (iter != m_unavailablesorted.end())
- {
- driver_enumerator enumerator(machine().options(), (*iter)->name);
- enumerator.next();
- media_auditor auditor(enumerator);
- media_auditor::summary summary = auditor.audit_media(AUDIT_VALIDATE_FAST);
-
- // if everything looks good, include the driver
- if (summary == media_auditor::CORRECT || summary == media_auditor::BEST_AVAILABLE || summary == media_auditor::NONE_NEEDED)
- {
- m_availablesorted.push_back((*iter));
- iter = m_unavailablesorted.erase(iter);
- }
- else
- ++iter;
- }
- }
- else
- {
- driver_enumerator enumerator(machine().options());
- media_auditor auditor(enumerator);
- while (enumerator.next())
- {
- media_auditor::summary summary = auditor.audit_media(AUDIT_VALIDATE_FAST);
-
- // if everything looks good, include the driver
- if (summary == media_auditor::CORRECT || summary == media_auditor::BEST_AVAILABLE || summary == media_auditor::NONE_NEEDED)
- m_availablesorted.push_back(&enumerator.driver());
- else
- m_unavailablesorted.push_back(&enumerator.driver());
- }
- }
-
- // sort
- std::stable_sort(m_availablesorted.begin(), m_availablesorted.end(), sorted_game_list);
- std::stable_sort(m_unavailablesorted.begin(), m_unavailablesorted.end(), sorted_game_list);
- save_available_machines();
- ui_menu::menu_stack->parent->reset(UI_MENU_RESET_SELECT_FIRST);
- ui_menu::stack_pop(machine());
-}
-
-//-------------------------------------------------
-// populate
-//-------------------------------------------------
-
-void ui_menu_audit::populate()
-{
- item_append("Dummy", nullptr, 0, (void *)(FPTR)1);
-}
-
-//-------------------------------------------------
-// save drivers infos to file
-//-------------------------------------------------
-
-void ui_menu_audit::save_available_machines()
-{
- // attempt to open the output file
- emu_file file(machine().ui().options().ui_path(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
- if (file.open(emulator_info::get_configname(), "_avail.ini") == FILERR_NONE)
- {
- // generate header
- std::string buffer = std::string("#\n").append(UI_VERSION_TAG).append(bare_build_version).append("\n#\n\n");
- strcatprintf(buffer, "%d\n", (int)m_availablesorted.size());
- strcatprintf(buffer, "%d\n", (int)m_unavailablesorted.size());
-
- // generate available list
- for (size_t x = 0; x < m_availablesorted.size(); ++x)
- {
- int find = driver_list::find(m_availablesorted[x]->name);
- strcatprintf(buffer, "%d\n", find);
- }
-
- // generate unavailable list
- for (size_t x = 0; x < m_unavailablesorted.size(); ++x)
- {
- int find = driver_list::find(m_unavailablesorted[x]->name);
- strcatprintf(buffer, "%d\n", find);
- }
- file.puts(buffer.c_str());
- file.close();
- }
-}
diff --git a/src/emu/ui/auditmenu.h b/src/emu/ui/auditmenu.h
deleted file mode 100644
index caad05796a6..00000000000
--- a/src/emu/ui/auditmenu.h
+++ /dev/null
@@ -1,37 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Dankan1890
-/***************************************************************************
-
- ui/auditmenu.h
-
- Internal UI user interface.
-
-***************************************************************************/
-
-#pragma once
-
-#ifndef __UI_AUDIT_H__
-#define __UI_AUDIT_H__
-
-//-------------------------------------------------
-// class audit menu
-//-------------------------------------------------
-
-class ui_menu_audit : public ui_menu
-{
-public:
- ui_menu_audit(running_machine &machine, render_container *container, std::vector<const game_driver *> &availablesorted, std::vector<const game_driver *> &unavailablesorted, int audit_mode);
- virtual ~ui_menu_audit();
- virtual void populate() override;
- virtual void handle() override;
-
-private:
- std::vector<const game_driver *> &m_availablesorted;
- std::vector<const game_driver *> &m_unavailablesorted;
-
- int m_audit_mode;
- void save_available_machines();
- bool m_first;
-};
-
-#endif /* __UI_AUDIT_H__ */
diff --git a/src/emu/ui/barcode.cpp b/src/emu/ui/barcode.cpp
index 5b3b15d7ad0..fece584c641 100644
--- a/src/emu/ui/barcode.cpp
+++ b/src/emu/ui/barcode.cpp
@@ -69,11 +69,11 @@ void ui_menu_barcode_reader::populate()
new_barcode = m_barcode_buffer;
}
- item_append(_("New Barcode:"), new_barcode, 0, ITEMREF_NEW_BARCODE);
+ item_append("New Barcode:", new_barcode, 0, ITEMREF_NEW_BARCODE);
// finish up the menu
item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
- item_append(_("Enter Code"), nullptr, 0, ITEMREF_ENTER_BARCODE);
+ item_append("Enter Code", nullptr, 0, ITEMREF_ENTER_BARCODE);
customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
}
@@ -115,7 +115,7 @@ void ui_menu_barcode_reader::handle()
std::string tmp_file(m_barcode_buffer);
//printf("code %s\n", m_barcode_buffer);
if (!current_device()->is_valid(tmp_file.length()))
- machine().ui().popup_time(5, _("Barcode length invalid!"));
+ machine().ui().popup_time(5, "Barcode length invalid!");
else
{
current_device()->write_code(tmp_file.c_str(), tmp_file.length());
diff --git a/src/emu/ui/cheatopt.cpp b/src/emu/ui/cheatopt.cpp
index 1d13f8e8c94..015ccba6908 100644
--- a/src/emu/ui/cheatopt.cpp
+++ b/src/emu/ui/cheatopt.cpp
@@ -24,7 +24,6 @@ void ui_menu_cheat::handle()
/* process the menu */
const ui_menu_event *menu_event = process(UI_MENU_PROCESS_LR_REPEAT);
-
/* handle events */
if (menu_event != nullptr && menu_event->itemref != nullptr)
{
@@ -34,7 +33,7 @@ void ui_menu_cheat::handle()
machine().popmessage(nullptr);
/* handle reset all + reset all cheats for reload all option */
- if (menu_event->itemref < ITEMREF_CHEATS_FIRST_ITEM && menu_event->iptkey == IPT_UI_SELECT)
+ if ((FPTR)menu_event->itemref < 3 && menu_event->iptkey == IPT_UI_SELECT)
{
for (cheat_entry *curcheat = machine().cheat().first(); curcheat != nullptr; curcheat = curcheat->next())
if (curcheat->select_default_state())
@@ -43,7 +42,7 @@ void ui_menu_cheat::handle()
/* handle individual cheats */
- else if (menu_event->itemref > ITEMREF_CHEATS_FIRST_ITEM)
+ else if ((FPTR)menu_event->itemref > 2)
{
cheat_entry *curcheat = reinterpret_cast<cheat_entry *>(menu_event->itemref);
const char *string;
@@ -75,26 +74,20 @@ void ui_menu_cheat::handle()
case IPT_UI_DOWN:
string = curcheat->comment();
if (string != nullptr && string[0] != 0)
- machine().popmessage(_("Cheat Comment:\n%s"), string);
+ machine().popmessage("Cheat Comment:\n%s", string);
break;
}
}
/* handle reload all */
- if (menu_event->itemref == ITEMREF_CHEATS_RELOAD_ALL && menu_event->iptkey == IPT_UI_SELECT)
+ if ((FPTR)menu_event->itemref == 2 && menu_event->iptkey == IPT_UI_SELECT)
{
/* re-init cheat engine and thus reload cheats/cheats have already been turned off by here */
machine().cheat().reload();
/* display the reloaded cheats */
reset(UI_MENU_RESET_REMEMBER_REF);
- machine().popmessage(_("All cheats reloaded"));
- }
-
- /* handle autofire menu */
- if (menu_event->itemref == ITEMREF_CHEATS_AUTOFIRE_SETTINGS && menu_event->iptkey == IPT_UI_SELECT)
- {
- ui_menu::stack_push(global_alloc_clear<ui_menu_autofire>(machine(), container));
+ machine().popmessage("All cheats reloaded");
}
/* if things changed, update */
@@ -117,210 +110,23 @@ void ui_menu_cheat::populate()
/* iterate over cheats */
std::string text;
std::string subtext;
-
- // add the autofire menu
- item_append(_("Autofire Settings"), nullptr, 0, (void *)ITEMREF_CHEATS_AUTOFIRE_SETTINGS);
+ for (cheat_entry *curcheat = machine().cheat().first(); curcheat != nullptr; curcheat = curcheat->next())
+ {
+ UINT32 flags;
+ curcheat->menu_text(text, subtext, flags);
+ item_append(text.c_str(), subtext.c_str(), flags, curcheat);
+ }
/* add a separator */
item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
- // add other cheats
- if (machine().cheat().first() != nullptr) {
- for (cheat_entry *curcheat = machine().cheat().first(); curcheat != nullptr; curcheat = curcheat->next())
- {
- UINT32 flags;
- curcheat->menu_text(text, subtext, flags);
- item_append(text.c_str(), subtext.c_str(), flags, curcheat);
- }
-
- /* add a separator */
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
-
- /* add a reset all option */
- item_append(_("Reset All"), nullptr, 0, (void *)ITEMREF_CHEATS_RESET_ALL);
+ /* add a reset all option */
+ item_append("Reset All", nullptr, 0, (void *)1);
- /* add a reload all cheats option */
- item_append(_("Reload All"), nullptr, 0, (void *)ITEMREF_CHEATS_RELOAD_ALL);
- }
+ /* add a reload all cheats option */
+ item_append("Reload All", nullptr, 0, (void *)2);
}
ui_menu_cheat::~ui_menu_cheat()
{
}
-
-
-
-
-
-/*-------------------------------------------------
- menu_autofire - handle the autofire settings
- menu
--------------------------------------------------*/
-
-ui_menu_autofire::ui_menu_autofire(running_machine &machine, render_container *container) : ui_menu(machine, container)
-{
- screen_device_iterator iter(machine.root_device());
- const screen_device *screen = iter.first();
-
- if (screen == nullptr)
- {
- refresh = 60.0;
- }
- else
- {
- refresh = ATTOSECONDS_TO_HZ(screen->refresh_attoseconds());
- }
-}
-
-ui_menu_autofire::~ui_menu_autofire()
-{
-}
-
-void ui_menu_autofire::handle()
-{
- ioport_field *field;
- bool changed = false;
-
- /* process the menu */
- const ui_menu_event *menu_event = process(0);
-
- /* handle events */
- if (menu_event != nullptr && menu_event->itemref != nullptr)
- {
- // menu item is changed using left/right keys only
- if (menu_event->iptkey == IPT_UI_LEFT || menu_event->iptkey == IPT_UI_RIGHT)
- {
- if (menu_event->itemref == ITEMREF_AUTOFIRE_STATUS)
- {
- // toggle autofire status
- bool autofire_toggle = machine().ioport().get_autofire_toggle(); // (menu_event->iptkey == IPT_UI_LEFT);
- machine().ioport().set_autofire_toggle(!autofire_toggle);
- changed = true;
- }
- else if (menu_event->itemref == ITEMREF_AUTOFIRE_DELAY)
- {
- // change autofire frequency
- int autofire_delay = machine().ioport().get_autofire_delay();
- if (menu_event->iptkey == IPT_UI_LEFT)
- {
- autofire_delay--;
- if (autofire_delay < 1)
- autofire_delay = 1;
- }
- else
- {
- autofire_delay++;
- if (autofire_delay > 30)
- autofire_delay = 30;
- }
- machine().ioport().set_autofire_delay(autofire_delay);
- changed = true;
- }
- else
- {
- // enable autofire on specific button
- field = (ioport_field *)menu_event->itemref;
- ioport_field::user_settings settings;
- field->get_user_settings(settings);
- settings.autofire = (menu_event->iptkey == IPT_UI_RIGHT);
- field->set_user_settings(settings);
- changed = true;
- }
- }
- }
-
- // if toggle settings changed, redraw menu to reflect new options
- if (!changed)
- {
- changed = (last_toggle != machine().ioport().get_autofire_toggle());
- }
-
- /* if something changed, rebuild the menu */
- if (changed)
- {
- reset(UI_MENU_RESET_REMEMBER_REF);
- }
-}
-
-
-/*-------------------------------------------------
- menu_autofire_populate - populate the autofire
- menu
--------------------------------------------------*/
-
-void ui_menu_autofire::populate()
-{
- ioport_field *field;
- ioport_port *port;
- char temp_text[64];
-
- /* add autofire toggle item */
- bool autofire_toggle = machine().ioport().get_autofire_toggle();
- item_append(_("Autofire Status"), (autofire_toggle ? _("Disabled") : _("Enabled")),
- (autofire_toggle ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW), (void *)ITEMREF_AUTOFIRE_STATUS);
-
- /* iterate over the input ports and add autofire toggle items */
- int menu_items = 0;
- for (port = machine().ioport().first_port(); port != nullptr; port = port->next())
- {
- bool is_first_button = true;
- for (field = port->first_field(); field != nullptr; field = field->next())
- {
- if ((field->name()) && ((field->type() >= IPT_BUTTON1 && field->type() <= IPT_BUTTON16))) // IPT_BUTTON1 + 15)))
- {
- menu_items++;
- ioport_field::user_settings settings;
- field->get_user_settings(settings);
-
- if (is_first_button)
- {
- /* add a separator for each player */
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
- is_first_button = false;
- }
- /* add an autofire item */
- if (!autofire_toggle)
- {
- // item is enabled and can be switched to values on/off
- item_append(field->name(), (settings.autofire ? _("On") : _("Off")),
- (settings.autofire ? MENU_FLAG_LEFT_ARROW : MENU_FLAG_RIGHT_ARROW), (void *)field);
- }
- else
- {
- // item is disabled
- item_append(field->name(), (settings.autofire ? _("On") : _("Off")),
- MENU_FLAG_DISABLE | MENU_FLAG_INVERT, nullptr);
- }
- }
- }
- }
-
- /* add text item if no buttons found */
- if (menu_items==0)
- {
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
- item_append(_("No buttons found on this machine!"), nullptr, MENU_FLAG_DISABLE, nullptr);
- }
-
- /* add a separator */
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
-
- /* add autofire delay item */
- int value = machine().ioport().get_autofire_delay();
- snprintf(temp_text, ARRAY_LENGTH(temp_text), "%d = %.2f Hz", value, (float)refresh/value);
- if (!autofire_toggle)
- {
- item_append(_("Autofire Delay"), temp_text, MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW, (void *)ITEMREF_AUTOFIRE_DELAY);
- }
- else
- {
- item_append(_("Autofire Delay"), temp_text, MENU_FLAG_DISABLE | MENU_FLAG_INVERT, nullptr);
- }
-
- /* add a separator */
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
-
- last_toggle = autofire_toggle;
-}
-
-
diff --git a/src/emu/ui/cheatopt.h b/src/emu/ui/cheatopt.h
index a9321df7304..0358af493ab 100644
--- a/src/emu/ui/cheatopt.h
+++ b/src/emu/ui/cheatopt.h
@@ -13,12 +13,6 @@
#ifndef __UI_CHEATOPT_H__
#define __UI_CHEATOPT_H__
-// itemrefs for key menu items
-#define ITEMREF_CHEATS_RESET_ALL ((void *) 0x0001)
-#define ITEMREF_CHEATS_RELOAD_ALL ((void *) 0x0002)
-#define ITEMREF_CHEATS_AUTOFIRE_SETTINGS ((void *) 0x0003)
-#define ITEMREF_CHEATS_FIRST_ITEM ((void *) 0x0004)
-
class ui_menu_cheat : public ui_menu {
public:
ui_menu_cheat(running_machine &machine, render_container *container);
@@ -27,23 +21,4 @@ public:
virtual void handle() override;
};
-
-// itemrefs for key menu items
-#define ITEMREF_AUTOFIRE_STATUS ((void *) 0x0001)
-#define ITEMREF_AUTOFIRE_DELAY ((void *) 0x0002)
-#define ITEMREF_AUTOFIRE_FIRST_BUTTON ((void *) 0x0003)
-
-class ui_menu_autofire : public ui_menu {
-public:
- ui_menu_autofire(running_machine &machine, render_container *container);
- virtual ~ui_menu_autofire();
- virtual void populate() override;
- virtual void handle() override;
-
-private:
- float refresh;
- bool last_toggle;
-};
-
-
#endif /* __UI_CHEATOPT_H__ */
diff --git a/src/emu/ui/cmddata.h b/src/emu/ui/cmddata.h
deleted file mode 100644
index 5fa2658d2cb..00000000000
--- a/src/emu/ui/cmddata.h
+++ /dev/null
@@ -1,404 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Dankan1890
-/*********************************************************************
-
- ui/cmddata.h
-
-*********************************************************************/
-#pragma once
-
-#ifndef __UI_CMDDATA_H__
-#define __UI_CMDDATA_H__
-
-#define BUTTON_COLOR_RED rgb_t(255,64,64)
-#define BUTTON_COLOR_YELLOW rgb_t(255,238,0)
-#define BUTTON_COLOR_GREEN rgb_t(0,255,64)
-#define BUTTON_COLOR_BLUE rgb_t(0,170,255)
-#define BUTTON_COLOR_PURPLE rgb_t(170,0,255)
-#define BUTTON_COLOR_PINK rgb_t(255,0,170)
-#define BUTTON_COLOR_AQUA rgb_t(0,255,204)
-#define BUTTON_COLOR_SILVER rgb_t(255,0,255)
-#define BUTTON_COLOR_NAVY rgb_t(255,160,0)
-#define BUTTON_COLOR_LIME rgb_t(190,190,190)
-
-enum
-{
- B_COLOR_RED,
- B_COLOR_YELLOW,
- B_COLOR_GREEN,
- B_COLOR_BLUE,
- B_COLOR_PURPLE,
- B_COLOR_PINK,
- B_COLOR_AQUA,
- B_COLOR_SILVER,
- B_COLOR_NAVY,
- B_COLOR_LIME,
- MAX_COLORTABLE
-};
-
-// command.dat symbols assigned to Unicode PUA U+E000
-#define COMMAND_UNICODE (0xe000)
-#define MAX_GLYPH_FONT (150)
-
-// Define Game Command Font Converting Conditions
-#define COMMAND_DEFAULT_TEXT '_'
-
-// Define Expanded Game Command ShortCut
-#define COMMAND_EXPAND_TEXT '^'
-
-// Define Simple Game Command ShortCut
-#define COMMAND_CONVERT_TEXT '@'
-
-// Defined Game Command Font Color Array
-static rgb_t color_table[] =
-{
- 0, // dummy
- BUTTON_COLOR_RED, // BTN_A
- BUTTON_COLOR_YELLOW, // BTN_B
- BUTTON_COLOR_GREEN, // BTN_C
- BUTTON_COLOR_BLUE, // BTN_D
- BUTTON_COLOR_PINK, // BTN_E
- BUTTON_COLOR_PURPLE, // BTN_F
- BUTTON_COLOR_AQUA, // BTN_G
- BUTTON_COLOR_SILVER, // BTN_H
- BUTTON_COLOR_NAVY, // BTN_I
- BUTTON_COLOR_LIME, // BTN_J
- BUTTON_COLOR_RED, // BTN_K
- BUTTON_COLOR_YELLOW, // BTN_L
- BUTTON_COLOR_GREEN, // BTN_M
- BUTTON_COLOR_BLUE, // BTN_N
- BUTTON_COLOR_PINK, // BTN_O
- BUTTON_COLOR_PURPLE, // BTN_P
- BUTTON_COLOR_AQUA, // BTN_Q
- BUTTON_COLOR_SILVER, // BTN_R
- BUTTON_COLOR_NAVY, // BTN_S
- BUTTON_COLOR_LIME, // BTN_T
- BUTTON_COLOR_RED, // BTN_U
- BUTTON_COLOR_YELLOW, // BTN_V
- BUTTON_COLOR_GREEN, // BTN_W
- BUTTON_COLOR_BLUE, // BTN_X
- BUTTON_COLOR_PINK, // BTN_Y
- BUTTON_COLOR_PURPLE, // BTN_Z
- BUTTON_COLOR_RED, // BTN_1
- BUTTON_COLOR_YELLOW, // BTN_2
- BUTTON_COLOR_GREEN, // BTN_3
- BUTTON_COLOR_BLUE, // BTN_4
- BUTTON_COLOR_PINK, // BTN_5
- BUTTON_COLOR_PURPLE, // BTN_6
- BUTTON_COLOR_AQUA, // BTN_7
- BUTTON_COLOR_SILVER, // BTN_8
- BUTTON_COLOR_NAVY, // BTN_9
- BUTTON_COLOR_LIME, // BTN_10
- BUTTON_COLOR_BLUE, // BTN_DEC
- BUTTON_COLOR_RED, // BTN_INC
- 0, // BTN_+
- 0, // DIR_...
- 0, // DIR_1
- 0, // DIR_2
- 0, // DIR_3
- 0, // DIR_4
- BUTTON_COLOR_RED, // Joystick Ball
- 0, // DIR_6
- 0, // DIR_7
- 0, // DIR_8
- 0, // DIR_9
- 0, // DIR_N
- BUTTON_COLOR_RED, // BTN_START
- BUTTON_COLOR_YELLOW, // BTN_SELECT
- BUTTON_COLOR_PINK, // BTN_PUNCH
- BUTTON_COLOR_PURPLE, // BTN_KICK
- BUTTON_COLOR_BLUE, // BTN_GUARD
- 0,
- BUTTON_COLOR_YELLOW, // Light Punch
- BUTTON_COLOR_NAVY, // Middle Punch
- BUTTON_COLOR_RED, // Strong Punch
- BUTTON_COLOR_LIME, // Light Kick
- BUTTON_COLOR_AQUA, // Middle Kick
- BUTTON_COLOR_BLUE, // Strong Kick
- BUTTON_COLOR_PURPLE, // 3 Kick
- BUTTON_COLOR_PINK, // 3 Punch
- BUTTON_COLOR_PURPLE, // 2 Kick
- BUTTON_COLOR_PINK, // 2 Punch
- BUTTON_COLOR_RED, // CUSTOM_1
- BUTTON_COLOR_YELLOW, // CUSTOM_2
- BUTTON_COLOR_GREEN, // CUSTOM_3
- BUTTON_COLOR_BLUE, // CUSTOM_4
- BUTTON_COLOR_PINK, // CUSTOM_5
- BUTTON_COLOR_PURPLE, // CUSTOM_6
- BUTTON_COLOR_AQUA, // CUSTOM_7
- BUTTON_COLOR_SILVER, // CUSTOM_8
- BUTTON_COLOR_RED, // (Cursor Up)
- BUTTON_COLOR_YELLOW, // (Cursor Down)
- BUTTON_COLOR_GREEN, // (Cursor Left)
- BUTTON_COLOR_BLUE, // (Cursor Right)
- 0, // Non Player Lever
- BUTTON_COLOR_LIME, // Gray Color Lever
- BUTTON_COLOR_RED, // 1 Player Lever
- BUTTON_COLOR_YELLOW, // 2 Player Lever
- BUTTON_COLOR_GREEN, // 3 Player Lever
- BUTTON_COLOR_BLUE, // 4 Player Lever
- BUTTON_COLOR_PINK, // 5 Player Lever
- BUTTON_COLOR_PURPLE, // 6 Player Lever
- BUTTON_COLOR_AQUA, // 7 Player Lever
- BUTTON_COLOR_SILVER // 8 Player Lever
-};
-
-// for color glyph
-#define COLOR_BUTTONS ARRAY_LENGTH(color_table)
-
-// Follow Varialbe Defined Arraies for Game Command Tag
-struct fix_command_t
-{
- unsigned char glyph_char;
- const int glyph_code;
-};
-
-
-struct fix_strings_t
-{
- const char *glyph_str;
- const int glyph_code;
- int glyph_str_len;
-};
-
-static fix_command_t default_text[] =
-{
- // Alphabetic Buttons (NeoGeo): A~D,H,Z
- { 'A', 1 }, // BTN_A
- { 'B', 2 }, // BTN_B
- { 'C', 3 }, // BTN_C
- { 'D', 4 }, // BTN_D
- { 'H', 8 }, // BTN_H
- { 'Z', 26 }, // BTN_Z
- // Numerical Buttons (Capcom): 1~10
- { 'a', 27 }, // BTN_1
- { 'b', 28 }, // BTN_2
- { 'c', 29 }, // BTN_3
- { 'd', 30 }, // BTN_4
- { 'e', 31 }, // BTN_5
- { 'f', 32 }, // BTN_6
- { 'g', 33 }, // BTN_7
- { 'h', 34 }, // BTN_8
- { 'i', 35 }, // BTN_9
- { 'j', 36 }, // BTN_10
- // Directions of Arrow, Joystick Ball
- { '+', 39 }, // BTN_+
- { '.', 40 }, // DIR_...
- { '1', 41 }, // DIR_1
- { '2', 42 }, // DIR_2
- { '3', 43 }, // DIR_3
- { '4', 44 }, // DIR_4
- { '5', 45 }, // Joystick Ball
- { '6', 46 }, // DIR_6
- { '7', 47 }, // DIR_7
- { '8', 48 }, // DIR_8
- { '9', 49 }, // DIR_9
- { 'N', 50 }, // DIR_N
- // Special Buttons
- { 'S', 51 }, // BTN_START
- { 'P', 53 }, // BTN_PUNCH
- { 'K', 54 }, // BTN_KICK
- { 'G', 55 }, // BTN_GUARD
- // Composition of Arrow Directions
- { '!', 90 }, // Arrow
- { 'k', 100 }, // Half Circle Back
- { 'l', 101 }, // Half Circle Front Up
- { 'm', 102 }, // Half Circle Front
- { 'n', 103 }, // Half Circle Back Up
- { 'o', 104 }, // 1/4 Cir For 2 Down
- { 'p', 105 }, // 1/4 Cir Down 2 Back
- { 'q', 106 }, // 1/4 Cir Back 2 Up
- { 'r', 107 }, // 1/4 Cir Up 2 For
- { 's', 108 }, // 1/4 Cir Back 2 Down
- { 't', 109 }, // 1/4 Cir Down 2 For
- { 'u', 110 }, // 1/4 Cir For 2 Up
- { 'v', 111 }, // 1/4 Cir Up 2 Back
- { 'w', 112 }, // Full Clock Forward
- { 'x', 113 }, // Full Clock Back
- { 'y', 114 }, // Full Count Forward
- { 'z', 115 }, // Full Count Back
- { 'L', 116 }, // 2x Forward
- { 'M', 117 }, // 2x Back
- { 'Q', 118 }, // Dragon Screw Forward
- { 'R', 119 }, // Dragon Screw Back
- // Big letter Text
- { '^', 121 }, // AIR
- { '?', 122 }, // DIR
- { 'X', 124 }, // TAP
- // Condition of Positions
- { '|', 125 }, // Jump
- { 'O', 126 }, // Hold
- { '-', 127 }, // Air
- { '=', 128 }, // Squatting
- { '~', 131 }, // Charge
- // Special Character Text
- { '`', 135 }, // Small Dot
- { '@', 136 }, // Double Ball
- { ')', 137 }, // Single Ball
- { '(', 138 }, // Solid Ball
- { '*', 139 }, // Star
- { '&', 140 }, // Solid star
- { '%', 141 }, // Triangle
- { '$', 142 }, // Solid Triangle
- { '#', 143 }, // Double Square
- { ']', 144 }, // Single Square
- { '[', 145 }, // Solid Square
- { '{', 146 }, // Down Triangle
- { '}', 147 }, // Solid Down Triangle
- { '<', 148 }, // Diamond
- { '>', 149 }, // Solid Diamond
- { 0, 0 } // end of array
-};
-
-static fix_command_t expand_text[] =
-{
- // Alphabetic Buttons (NeoGeo): S (Slash Button)
- { 's', 19 }, // BTN_S
- // Special Buttons
- { 'S', 52 }, // BTN_SELECT
- // Multiple Punches & Kicks
- { 'E', 57 }, // Light Punch
- { 'F', 58 }, // Middle Punch
- { 'G', 59 }, // Strong Punch
- { 'H', 60 }, // Light Kick
- { 'I', 61 }, // Middle Kick
- { 'J', 62 }, // Strong Kick
- { 'T', 63 }, // 3 Kick
- { 'U', 64 }, // 3 Punch
- { 'V', 65 }, // 2 Kick
- { 'W', 66 }, // 2 Pick
- // Composition of Arrow Directions
- { '!', 91 }, // Continue Arrow
- // Charge of Arrow Directions
- { '1', 92 }, // Charge DIR_1
- { '2', 93 }, // Charge DIR_2
- { '3', 94 }, // Charge DIR_3
- { '4', 95 }, // Charge DIR_4
- { '6', 96 }, // Charge DIR_6
- { '7', 97 }, // Charge DIR_7
- { '8', 98 }, // Charge DIR_8
- { '9', 99 }, // Charge DIR_9
- // Big letter Text
- { 'M', 123 }, // MAX
- // Condition of Positions
- { '-', 129 }, // Close
- { '=', 130 }, // Away
- { '*', 132 }, // Serious Tap
- { '?', 133 }, // Any Button
- { 0, 0 } // end of array
-};
-
-static fix_strings_t convert_text[] =
-{
- // Alphabetic Buttons: A~Z
- { "A-button", 1 }, // BTN_A
- { "B-button", 2 }, // BTN_B
- { "C-button", 3 }, // BTN_C
- { "D-button", 4 }, // BTN_D
- { "E-button", 5 }, // BTN_E
- { "F-button", 6 }, // BTN_F
- { "G-button", 7 }, // BTN_G
- { "H-button", 8 }, // BTN_H
- { "I-button", 9 }, // BTN_I
- { "J-button", 10 }, // BTN_J
- { "K-button", 11 }, // BTN_K
- { "L-button", 12 }, // BTN_L
- { "M-button", 13 }, // BTN_M
- { "N-button", 14 }, // BTN_N
- { "O-button", 15 }, // BTN_O
- { "P-button", 16 }, // BTN_P
- { "Q-button", 17 }, // BTN_Q
- { "R-button", 18 }, // BTN_R
- { "S-button", 19 }, // BTN_S
- { "T-button", 20 }, // BTN_T
- { "U-button", 21 }, // BTN_U
- { "V-button", 22 }, // BTN_V
- { "W-button", 23 }, // BTN_W
- { "X-button", 24 }, // BTN_X
- { "Y-button", 25 }, // BTN_Y
- { "Z-button", 26 }, // BTN_Z
- // Special Moves and Buttons
- { "decrease", 37 }, // BTN_DEC
- { "increase", 38 }, // BTN_INC
- { "BALL", 45 }, // Joystick Ball
- { "start", 51 }, // BTN_START
- { "select", 52 }, // BTN_SELECT
- { "punch", 53 }, // BTN_PUNCH
- { "kick", 54 }, // BTN_KICK
- { "guard", 55 }, // BTN_GUARD
- { "L-punch", 57 }, // Light Punch
- { "M-punch", 58 }, // Middle Punch
- { "S-punch", 59 }, // Strong Punch
- { "L-kick", 60 }, // Light Kick
- { "M-kick", 61 }, // Middle Kick
- { "S-kick", 62 }, // Strong Kick
- { "3-kick", 63 }, // 3 Kick
- { "3-punch", 64 }, // 3 Punch
- { "2-kick", 65 }, // 2 Kick
- { "2-punch", 66 }, // 2 Pick
- // Custom Buttons and Cursor Buttons
- { "custom1", 67 }, // CUSTOM_1
- { "custom2", 68 }, // CUSTOM_2
- { "custom3", 69 }, // CUSTOM_3
- { "custom4", 70 }, // CUSTOM_4
- { "custom5", 71 }, // CUSTOM_5
- { "custom6", 72 }, // CUSTOM_6
- { "custom7", 73 }, // CUSTOM_7
- { "custom8", 74 }, // CUSTOM_8
- { "up", 75 }, // (Cursor Up)
- { "down", 76 }, // (Cursor Down)
- { "left", 77 }, // (Cursor Left)
- { "right", 78 }, // (Cursor Right)
- // Player Lever
- { "lever", 79 }, // Non Player Lever
- { "nplayer", 80 }, // Gray Color Lever
- { "1player", 81 }, // 1 Player Lever
- { "2player", 82 }, // 2 Player Lever
- { "3player", 83 }, // 3 Player Lever
- { "4player", 84 }, // 4 Player Lever
- { "5player", 85 }, // 5 Player Lever
- { "6player", 86 }, // 6 Player Lever
- { "7player", 87 }, // 7 Player Lever
- { "8player", 88 }, // 8 Player Lever
- // Composition of Arrow Directions
- { "-->", 90 }, // Arrow
- { "==>", 91 }, // Continue Arrow
- { "hcb", 100 }, // Half Circle Back
- { "huf", 101 }, // Half Circle Front Up
- { "hcf", 102 }, // Half Circle Front
- { "hub", 103 }, // Half Circle Back Up
- { "qfd", 104 }, // 1/4 Cir For 2 Down
- { "qdb", 105 }, // 1/4 Cir Down 2 Back
- { "qbu", 106 }, // 1/4 Cir Back 2 Up
- { "quf", 107 }, // 1/4 Cir Up 2 For
- { "qbd", 108 }, // 1/4 Cir Back 2 Down
- { "qdf", 109 }, // 1/4 Cir Down 2 For
- { "qfu", 110 }, // 1/4 Cir For 2 Up
- { "qub", 111 }, // 1/4 Cir Up 2 Back
- { "fdf", 112 }, // Full Clock Forward
- { "fub", 113 }, // Full Clock Back
- { "fuf", 114 }, // Full Count Forward
- { "fdb", 115 }, // Full Count Back
- { "xff", 116 }, // 2x Forward
- { "xbb", 117 }, // 2x Back
- { "dsf", 118 }, // Dragon Screw Forward
- { "dsb", 119 }, // Dragon Screw Back
- // Big letter Text
- { "AIR", 121 }, // AIR
- { "DIR", 122 }, // DIR
- { "MAX", 123 }, // MAX
- { "TAP", 124 }, // TAP
- // Condition of Positions
- { "jump", 125 }, // Jump
- { "hold", 126 }, // Hold
- { "air", 127 }, // Air
- { "sit", 128 }, // Squatting
- { "close", 129 }, // Close
- { "away", 130 }, // Away
- { "charge", 131 }, // Charge
- { "tap", 132 }, // Serious Tap
- { "button", 133 }, // Any Button
- { 0, 0 } // end of array
-};
-
-#endif /* __UI_CMDDATA_H__ */
diff --git a/src/emu/ui/cmdrender.h b/src/emu/ui/cmdrender.h
deleted file mode 100644
index d9bf466f1e9..00000000000
--- a/src/emu/ui/cmdrender.h
+++ /dev/null
@@ -1,151 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Dankan1890
-/***************************************************************************
-
- ui/cmdrender.h
-
- UI rendfont.
-
-***************************************************************************/
-
-#include "ui/uicmd14.fh"
-#include "ui/cmddata.h"
-
-void convert_command_glyph(std::string &str)
-{
- int j;
- const char *s = str.c_str();
- int len = str.length();
- int buflen = (len + 2) * 2;
- char *d = global_alloc_array(char, buflen);
-
- for (int i = j = 0; i < len;)
- {
- fix_command_t *fixcmd = nullptr;
- unicode_char uchar;
- int ucharcount = uchar_from_utf8(&uchar, s + i, len - i);
- if (ucharcount == -1)
- break;
- else if (ucharcount != 1)
- goto process_next;
- else if (s[i] == '\n')
- uchar = '\n';
- else if (s[i] == COMMAND_CONVERT_TEXT)
- {
- if (s[i] == s[i + 1])
- ++i;
- else
- {
- fix_strings_t *fixtext = convert_text;
- for (; fixtext->glyph_code; ++fixtext)
- {
- if (!fixtext->glyph_str_len)
- fixtext->glyph_str_len = strlen(fixtext->glyph_str);
-
- if (strncmp(fixtext->glyph_str, s + i + 1, fixtext->glyph_str_len) == 0)
- {
- uchar = fixtext->glyph_code + COMMAND_UNICODE;
- i += strlen(fixtext->glyph_str);
- break;
- }
- }
- }
- }
- else if (s[i] == COMMAND_DEFAULT_TEXT)
- fixcmd = default_text;
- else if (s[i] == COMMAND_EXPAND_TEXT)
- fixcmd = expand_text;
-
- if (fixcmd)
- {
- if (s[i] == s[i + 1])
- i++;
- else
- {
- for (; fixcmd->glyph_code; ++fixcmd)
- if (s[i + 1] == fixcmd->glyph_char)
- {
- uchar = fixcmd->glyph_code + COMMAND_UNICODE;
- ++i;
- break;
- }
- }
- }
-process_next:
- i += ucharcount;
- ucharcount = utf8_from_uchar(d + j, buflen - j - 1, uchar);
- if (ucharcount == -1)
- break;
- j += ucharcount;
- }
- d[j] = '\0';
- str = d;
- global_free_array(d);
-}
-
-void render_font::render_font_command_glyph()
-{
- emu_file ramfile(OPEN_FLAG_READ);
-
- if (ramfile.open_ram(font_uicmd14, sizeof(font_uicmd14)) == FILERR_NONE)
- load_cached_cmd(ramfile, 0);
-}
-
-bool render_font::load_cached_cmd(emu_file &file, UINT32 hash)
-{
- UINT64 filesize = file.size();
- UINT8 header[CACHED_HEADER_SIZE];
- UINT32 bytes_read = file.read(header, CACHED_HEADER_SIZE);
-
- if (bytes_read != CACHED_HEADER_SIZE)
- return false;
-
- if (header[0] != 'f' || header[1] != 'o' || header[2] != 'n' || header[3] != 't')
- return false;
- if (header[4] != (UINT8)(hash >> 24) || header[5] != (UINT8)(hash >> 16) || header[6] != (UINT8)(hash >> 8) || header[7] != (UINT8)hash)
- return false;
- m_height_cmd = (header[8] << 8) | header[9];
- m_yoffs_cmd = (INT16)((header[10] << 8) | header[11]);
- UINT32 numchars = (header[12] << 24) | (header[13] << 16) | (header[14] << 8) | header[15];
- if (filesize - CACHED_HEADER_SIZE < numchars * CACHED_CHAR_SIZE)
- return false;
-
- m_rawdata_cmd.resize(filesize - CACHED_HEADER_SIZE);
- bytes_read = file.read(&m_rawdata_cmd[0], filesize - CACHED_HEADER_SIZE);
- if (bytes_read != filesize - CACHED_HEADER_SIZE)
- {
- m_rawdata_cmd.clear();
- return false;
- }
-
- UINT64 offset = numchars * CACHED_CHAR_SIZE;
- for (int chindex = 0; chindex < numchars; chindex++)
- {
- const UINT8 *info = reinterpret_cast<UINT8 *>(&m_rawdata_cmd[chindex * CACHED_CHAR_SIZE]);
- int chnum = (info[0] << 8) | info[1];
-
- if (!m_glyphs_cmd[chnum / 256])
- m_glyphs_cmd[chnum / 256] = new glyph[256];
-
- glyph &gl = m_glyphs_cmd[chnum / 256][chnum % 256];
-
- if (chnum >= COMMAND_UNICODE && chnum < COMMAND_UNICODE + COLOR_BUTTONS)
- gl.color = color_table[chnum - COMMAND_UNICODE];
-
- gl.width = (info[2] << 8) | info[3];
- gl.xoffs = (INT16)((info[4] << 8) | info[5]);
- gl.yoffs = (INT16)((info[6] << 8) | info[7]);
- gl.bmwidth = (info[8] << 8) | info[9];
- gl.bmheight = (info[10] << 8) | info[11];
- gl.rawdata = &m_rawdata_cmd[offset];
-
- offset += (gl.bmwidth * gl.bmheight + 7) / 8;
- if (offset > filesize - CACHED_HEADER_SIZE)
- {
- m_rawdata_cmd.clear();
- return false;
- }
- }
-
- return true;
-}
diff --git a/src/emu/ui/ctrlmenu.cpp b/src/emu/ui/ctrlmenu.cpp
deleted file mode 100644
index 74b35abd8e3..00000000000
--- a/src/emu/ui/ctrlmenu.cpp
+++ /dev/null
@@ -1,149 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Dankan1890
-/*********************************************************************
-
- ui/ctrlmenu.cpp
-
- Internal UI user interface.
-
-*********************************************************************/
-
-#include "emu.h"
-#include "ui/ui.h"
-#include "ui/menu.h"
-#include "ui/ctrlmenu.h"
-
-const char *ui_menu_controller_mapping::m_device_status[] = { "none", "keyboard", "mouse", "lightgun", "joystick" };
-
-ui_menu_controller_mapping::ctrl_option ui_menu_controller_mapping::m_options[] = {
- { 0, nullptr, nullptr },
- { 0, "Lightgun Device Assignment", OPTION_LIGHTGUN_DEVICE },
- { 0, "Trackball Device Assignment", OPTION_TRACKBALL_DEVICE },
- { 0, "Pedal Device Assignment", OPTION_PEDAL_DEVICE },
- { 0, "Adstick Device Assignment", OPTION_ADSTICK_DEVICE },
- { 0, "Paddle Device Assignment", OPTION_PADDLE_DEVICE },
- { 0, "Dial Device Assignment", OPTION_DIAL_DEVICE },
- { 0, "Positional Device Assignment", OPTION_POSITIONAL_DEVICE },
- { 0, "Mouse Device Assignment", OPTION_MOUSE_DEVICE }
-};
-
-//-------------------------------------------------
-// ctor
-//-------------------------------------------------
-
-ui_menu_controller_mapping::ui_menu_controller_mapping(running_machine &machine, render_container *container) : ui_menu(machine, container)
-{
- for (int d = 1; d < ARRAY_LENGTH(m_options); ++d)
- m_options[d].status = check_status(machine.options().value(m_options[d].option), m_options[d].option);
-}
-
-//-------------------------------------------------
-// dtor
-//-------------------------------------------------
-
-ui_menu_controller_mapping::~ui_menu_controller_mapping()
-{
- std::string error_string;
- for (int d = 1; d < ARRAY_LENGTH(m_options); ++d)
- {
- if (strcmp(machine().options().value(m_options[d].option),m_device_status[m_options[d].status])!=0)
- {
- machine().options().set_value(m_options[d].option, m_device_status[m_options[d].status], OPTION_PRIORITY_CMDLINE, error_string);
- machine().options().mark_changed(m_options[d].option);
- }
- }
-}
-
-//-------------------------------------------------
-// handle
-//-------------------------------------------------
-
-void ui_menu_controller_mapping::handle()
-{
- bool changed = false;
-
- // process the menu
- const ui_menu_event *m_event = process(0);
- if (m_event != nullptr && m_event->itemref != nullptr)
- {
- if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT)
- {
- changed = true;
- FPTR value = (FPTR)m_event->itemref;
- (m_event->iptkey == IPT_UI_RIGHT) ? m_options[value].status++ : m_options[value].status--;
- }
- }
-
- if (changed)
- reset(UI_MENU_RESET_REMEMBER_REF);
-}
-
-//-------------------------------------------------
-// populate
-//-------------------------------------------------
-
-void ui_menu_controller_mapping::populate()
-{
- // add options
- for (int d = 1; d < ARRAY_LENGTH(m_options); ++d)
- {
- UINT32 arrow_flags = get_arrow_flags(0, ARRAY_LENGTH(m_device_status) - 1, m_options[d].status);
- item_append(m_options[d].description, m_device_status[m_options[d].status], arrow_flags, (void *)(FPTR)d);
- }
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
- customtop = machine().ui().get_line_height() + (3.0f * UI_BOX_TB_BORDER);
-}
-
-//-------------------------------------------------
-// perform our special rendering
-//-------------------------------------------------
-
-void ui_menu_controller_mapping::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
-{
- float width, maxwidth = origx2 - origx1;
- ui_manager &mui = machine().ui();
-
- mui.draw_text_full(container, _("Device Mapping"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += 2 * UI_BOX_LR_BORDER;
- maxwidth = MAX(maxwidth, width);
-
- // compute our bounds
- float x1 = 0.5f - 0.5f * maxwidth;
- float x2 = x1 + maxwidth;
- float y1 = origy1 - top;
- float y2 = origy1 - UI_BOX_TB_BORDER;
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // draw the text within it
- mui.draw_text_full(container, _("Device Mapping"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
-
-}
-
-//-------------------------------------------------
-// return current value
-//-------------------------------------------------
-
-int ui_menu_controller_mapping::check_status(const char *status, const char *option)
-{
- for (int d = 0; *m_device_status[d]; d++)
- if (!strcmp(m_device_status[d], status))
- return d;
-
- emu_options def_opt;
- const char *def_val = def_opt.value(option);
-
- for (int d = 0; *m_device_status[d]; d++)
- if (!strcmp(m_device_status[d], def_val))
- return d;
-
- return 1;
-}
diff --git a/src/emu/ui/ctrlmenu.h b/src/emu/ui/ctrlmenu.h
deleted file mode 100644
index 4c1325071d6..00000000000
--- a/src/emu/ui/ctrlmenu.h
+++ /dev/null
@@ -1,41 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Dankan1890
-/***************************************************************************
-
- ui/ctrlmenu.h
-
- Internal UI user interface.
-
-***************************************************************************/
-#pragma once
-
-#ifndef __UI_CTRLMENU_H__
-#define __UI_CTRLMENU_H__
-
-//-------------------------------------------------
-// class controller mapping menu
-//-------------------------------------------------
-
-class ui_menu_controller_mapping : public ui_menu
-{
-public:
- ui_menu_controller_mapping(running_machine &machine, render_container *container);
- virtual ~ui_menu_controller_mapping();
- virtual void populate() override;
- virtual void handle() override;
- virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
-
-private:
- struct ctrl_option
- {
- int status;
- const char *description;
- const char *option;
- };
-
- static const char *m_device_status[];
- static ctrl_option m_options[];
- int check_status(const char *status, const char *option);
-};
-
-#endif /* __UI_CTRLMENU_H__ */
diff --git a/src/emu/ui/custmenu.cpp b/src/emu/ui/custmenu.cpp
deleted file mode 100644
index 3a50f4bfc03..00000000000
--- a/src/emu/ui/custmenu.cpp
+++ /dev/null
@@ -1,580 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Dankan1890
-/*********************************************************************
-
- ui/custmenu.cpp
-
- Internal UI user interface.
-
-*********************************************************************/
-
-#include "emu.h"
-#include "ui/ui.h"
-#include "ui/menu.h"
-#include "ui/custmenu.h"
-#include "ui/selector.h"
-#include "ui/inifile.h"
-#include "rendfont.h"
-
-/**************************************************
- MENU CUSTOM FILTER
-**************************************************/
-//-------------------------------------------------
-// ctor / dtor
-//-------------------------------------------------
-ui_menu_custom_filter::ui_menu_custom_filter(running_machine &machine, render_container *container, bool _single_menu) : ui_menu(machine, container)
-{
- m_single_menu = _single_menu;
- m_added = false;
-}
-
-ui_menu_custom_filter::~ui_menu_custom_filter()
-{
- if (m_single_menu)
- ui_menu::menu_stack->reset(UI_MENU_RESET_SELECT_FIRST);
- save_custom_filters();
-}
-
-//-------------------------------------------------
-// handle
-//-------------------------------------------------
-void ui_menu_custom_filter::handle()
-{
- bool changed = false;
- m_added = false;
-
- // process the menu
- const ui_menu_event *m_event = process(UI_MENU_PROCESS_LR_REPEAT);
- if (m_event != nullptr && m_event->itemref != nullptr)
- {
- switch ((FPTR)m_event->itemref)
- {
- case MAIN_FILTER:
- if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT)
- {
- (m_event->iptkey == IPT_UI_RIGHT) ? custfltr::main++ : custfltr::main--;
- changed = true;
- }
- break;
-
- case ADD_FILTER:
- if (m_event->iptkey == IPT_UI_SELECT)
- {
- custfltr::numother++;
- custfltr::other[custfltr::numother] = FILTER_UNAVAILABLE + 1;
- m_added = true;
- }
- break;
-
- case REMOVE_FILTER:
- if (m_event->iptkey == IPT_UI_SELECT)
- {
- custfltr::other[custfltr::numother] = FILTER_UNAVAILABLE + 1;
- custfltr::numother--;
- changed = true;
- }
- break;
- }
-
- if ((FPTR)m_event->itemref >= OTHER_FILTER && (FPTR)m_event->itemref < OTHER_FILTER + MAX_CUST_FILTER)
- {
- int pos = (int)((FPTR)m_event->itemref - OTHER_FILTER);
- if (m_event->iptkey == IPT_UI_LEFT && custfltr::other[pos] > FILTER_UNAVAILABLE + 1)
- {
- custfltr::other[pos]--;
- for ( ; custfltr::other[pos] > FILTER_UNAVAILABLE && (custfltr::other[pos] == FILTER_CATEGORY
- || custfltr::other[pos] == FILTER_FAVORITE); custfltr::other[pos]--) ;
- changed = true;
- }
- else if (m_event->iptkey == IPT_UI_RIGHT && custfltr::other[pos] < FILTER_LAST - 1)
- {
- custfltr::other[pos]++;
- for ( ; custfltr::other[pos] < FILTER_LAST && (custfltr::other[pos] == FILTER_CATEGORY
- || custfltr::other[pos] == FILTER_FAVORITE); custfltr::other[pos]++) ;
- changed = true;
- }
- else if (m_event->iptkey == IPT_UI_SELECT)
- {
- size_t total = main_filters::length;
- std::vector<std::string> s_sel(total);
- for (size_t index = 0; index < total; ++index)
- if (index <= FILTER_UNAVAILABLE || index == FILTER_CATEGORY || index == FILTER_FAVORITE || index == FILTER_CUSTOM)
- s_sel[index] = "_skip_";
- else
- s_sel[index] = main_filters::text[index];
-
- ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, s_sel, custfltr::other[pos]));
- }
- }
- else if ((FPTR)m_event->itemref >= YEAR_FILTER && (FPTR)m_event->itemref < YEAR_FILTER + MAX_CUST_FILTER)
- {
- int pos = (int)((FPTR)m_event->itemref - YEAR_FILTER);
- if (m_event->iptkey == IPT_UI_LEFT && custfltr::year[pos] > 0)
- {
- custfltr::year[pos]--;
- changed = true;
- }
- else if (m_event->iptkey == IPT_UI_RIGHT && custfltr::year[pos] < c_year::ui.size() - 1)
- {
- custfltr::year[pos]++;
- changed = true;
- }
- else if (m_event->iptkey == IPT_UI_SELECT)
- ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, c_year::ui, custfltr::year[pos]));
- }
- else if ((FPTR)m_event->itemref >= MNFCT_FILTER && (FPTR)m_event->itemref < MNFCT_FILTER + MAX_CUST_FILTER)
- {
- int pos = (int)((FPTR)m_event->itemref - MNFCT_FILTER);
- if (m_event->iptkey == IPT_UI_LEFT && custfltr::mnfct[pos] > 0)
- {
- custfltr::mnfct[pos]--;
- changed = true;
- }
- else if (m_event->iptkey == IPT_UI_RIGHT && custfltr::mnfct[pos] < c_mnfct::ui.size() - 1)
- {
- custfltr::mnfct[pos]++;
- changed = true;
- }
- else if (m_event->iptkey == IPT_UI_SELECT)
- ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, c_mnfct::ui, custfltr::mnfct[pos]));
- }
- }
-
- if (changed)
- reset(UI_MENU_RESET_REMEMBER_REF);
- else if (m_added)
- reset(UI_MENU_RESET_SELECT_FIRST);
-}
-
-//-------------------------------------------------
-// populate
-//-------------------------------------------------
-void ui_menu_custom_filter::populate()
-{
- // add main filter
- UINT32 arrow_flags = get_arrow_flags((int)FILTER_ALL, (int)FILTER_UNAVAILABLE, custfltr::main);
- item_append(_("Main filter"), main_filters::text[custfltr::main], arrow_flags, (void *)(FPTR)MAIN_FILTER);
-
- // add other filters
- for (int x = 1; x <= custfltr::numother; x++)
- {
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
-
- // add filter items
- arrow_flags = get_arrow_flags((int)FILTER_UNAVAILABLE + 1, (int)FILTER_LAST - 1, custfltr::other[x]);
- item_append(_("Other filter"), main_filters::text[custfltr::other[x]], arrow_flags, (void *)(FPTR)(OTHER_FILTER + x));
-
- if (m_added)
- selected = item.size() - 2;
-
- // add manufacturer subitem
- if (custfltr::other[x] == FILTER_MANUFACTURER && c_mnfct::ui.size() > 0)
- {
- arrow_flags = get_arrow_flags(0, c_mnfct::ui.size() - 1, custfltr::mnfct[x]);
- std::string fbuff("^!Manufacturer");
- convert_command_glyph(fbuff);
- item_append(fbuff.c_str(), c_mnfct::ui[custfltr::mnfct[x]].c_str(), arrow_flags, (void *)(FPTR)(MNFCT_FILTER + x));
- }
-
- // add year subitem
- else if (custfltr::other[x] == FILTER_YEAR && c_year::ui.size() > 0)
- {
- arrow_flags = get_arrow_flags(0, c_year::ui.size() - 1, custfltr::year[x]);
- std::string fbuff("^!Year");
- convert_command_glyph(fbuff);
- item_append(fbuff.c_str(), c_year::ui[custfltr::year[x]].c_str(), arrow_flags, (void *)(FPTR)(YEAR_FILTER + x));
- }
- }
-
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
-
- if (custfltr::numother > 0)
- item_append(_("Remove last filter"), nullptr, 0, (void *)(FPTR)REMOVE_FILTER);
-
- if (custfltr::numother < MAX_CUST_FILTER - 2)
- item_append(_("Add filter"), nullptr, 0, (void *)(FPTR)ADD_FILTER);
-
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
- customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
-}
-
-//-------------------------------------------------
-// perform our special rendering
-//-------------------------------------------------
-void ui_menu_custom_filter::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
-{
- float width;
- ui_manager &mui = machine().ui();
-
- // get the size of the text
- mui.draw_text_full(container, _("Select custom filters:"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += (2.0f * UI_BOX_LR_BORDER) + 0.01f;
- float maxwidth = MAX(width, origx2 - origx1);
-
- // compute our bounds
- float x1 = 0.5f - 0.5f * maxwidth;
- float x2 = x1 + maxwidth;
- float y1 = origy1 - top;
- float y2 = origy1 - UI_BOX_TB_BORDER;
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // draw the text within it
- mui.draw_text_full(container, _("Select custom filters:"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
-}
-
-//-------------------------------------------------
-// save custom filters info to file
-//-------------------------------------------------
-
-void ui_menu_custom_filter::save_custom_filters()
-{
- // attempt to open the output file
- emu_file file(machine().ui().options().ui_path(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
- if (file.open("custom_", emulator_info::get_configname(), "_filter.ini") == FILERR_NONE)
- {
- // generate custom filters info
- std::string cinfo;
- strprintf(cinfo, "Total filters = %d\n", (custfltr::numother + 1));
- cinfo.append("Main filter = ").append(main_filters::text[custfltr::main]).append("\n");
-
- for (int x = 1; x <= custfltr::numother; x++)
- {
- cinfo.append("Other filter = ").append(main_filters::text[custfltr::other[x]]).append("\n");
- if (custfltr::other[x] == FILTER_MANUFACTURER)
- cinfo.append(" Manufacturer filter = ").append(c_mnfct::ui[custfltr::mnfct[x]]).append("\n");
- else if (custfltr::other[x] == FILTER_YEAR)
- cinfo.append(" Year filter = ").append(c_year::ui[custfltr::year[x]]).append("\n");
- }
- file.puts(cinfo.c_str());
- file.close();
- }
-}
-
-/**************************************************
- MENU CUSTOM SOFTWARE FILTER
-**************************************************/
-//-------------------------------------------------
-// ctor / dtor
-//-------------------------------------------------
-ui_menu_swcustom_filter::ui_menu_swcustom_filter(running_machine &machine, render_container *container, const game_driver *_driver, s_filter &_filter) :
- ui_menu(machine, container), m_added(false), m_filter(_filter), m_driver(_driver)
-{
-}
-
-ui_menu_swcustom_filter::~ui_menu_swcustom_filter()
-{
- ui_menu::menu_stack->reset(UI_MENU_RESET_SELECT_FIRST);
- save_sw_custom_filters();
-}
-
-//-------------------------------------------------
-// handle
-//-------------------------------------------------
-void ui_menu_swcustom_filter::handle()
-{
- bool changed = false;
- m_added = false;
-
- // process the menu
- const ui_menu_event *m_event = process(UI_MENU_PROCESS_LR_REPEAT);
- if (m_event != nullptr && m_event->itemref != nullptr)
- {
- switch ((FPTR)m_event->itemref)
- {
- case MAIN_FILTER:
- if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT)
- {
- (m_event->iptkey == IPT_UI_RIGHT) ? sw_custfltr::main++ : sw_custfltr::main--;
- changed = true;
- }
- break;
-
- case ADD_FILTER:
- if (m_event->iptkey == IPT_UI_SELECT)
- {
- sw_custfltr::numother++;
- sw_custfltr::other[sw_custfltr::numother] = UI_SW_UNAVAILABLE + 1;
- m_added = true;
- }
- break;
-
- case REMOVE_FILTER:
- if (m_event->iptkey == IPT_UI_SELECT)
- {
- sw_custfltr::other[sw_custfltr::numother] = UI_SW_UNAVAILABLE + 1;
- sw_custfltr::numother--;
- changed = true;
- }
- break;
- }
-
- if ((FPTR)m_event->itemref >= OTHER_FILTER && (FPTR)m_event->itemref < OTHER_FILTER + MAX_CUST_FILTER)
- {
- int pos = (int)((FPTR)m_event->itemref - OTHER_FILTER);
- if (m_event->iptkey == IPT_UI_LEFT && sw_custfltr::other[pos] > UI_SW_UNAVAILABLE + 1)
- {
- sw_custfltr::other[pos]--;
- changed = true;
- }
- else if (m_event->iptkey == IPT_UI_RIGHT && sw_custfltr::other[pos] < UI_SW_LAST - 1)
- {
- sw_custfltr::other[pos]++;
- changed = true;
- }
- else if (m_event->iptkey == IPT_UI_SELECT)
- {
- size_t total = sw_filters::length;
- std::vector<std::string> s_sel(total);
- for (size_t index = 0; index < total; ++index)
- if (index <= UI_SW_UNAVAILABLE|| index == UI_SW_CUSTOM)
- s_sel[index] = "_skip_";
- else
- s_sel[index] = sw_filters::text[index];
-
- ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, s_sel, sw_custfltr::other[pos]));
- }
- }
- else if ((FPTR)m_event->itemref >= YEAR_FILTER && (FPTR)m_event->itemref < YEAR_FILTER + MAX_CUST_FILTER)
- {
- int pos = (int)((FPTR)m_event->itemref - YEAR_FILTER);
- if (m_event->iptkey == IPT_UI_LEFT && sw_custfltr::year[pos] > 0)
- {
- sw_custfltr::year[pos]--;
- changed = true;
- }
- else if (m_event->iptkey == IPT_UI_RIGHT && sw_custfltr::year[pos] < m_filter.year.ui.size() - 1)
- {
- sw_custfltr::year[pos]++;
- changed = true;
- }
- else if (m_event->iptkey == IPT_UI_SELECT)
- ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, m_filter.year.ui, sw_custfltr::year[pos]));
- }
- else if ((FPTR)m_event->itemref >= TYPE_FILTER && (FPTR)m_event->itemref < TYPE_FILTER + MAX_CUST_FILTER)
- {
- int pos = (int)((FPTR)m_event->itemref - TYPE_FILTER);
- if (m_event->iptkey == IPT_UI_LEFT && sw_custfltr::type[pos] > 0)
- {
- sw_custfltr::type[pos]--;
- changed = true;
- }
- else if (m_event->iptkey == IPT_UI_RIGHT && sw_custfltr::type[pos] < m_filter.type.ui.size() - 1)
- {
- sw_custfltr::type[pos]++;
- changed = true;
- }
- else if (m_event->iptkey == IPT_UI_SELECT)
- ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, m_filter.type.ui, sw_custfltr::type[pos]));
- }
- else if ((FPTR)m_event->itemref >= MNFCT_FILTER && (FPTR)m_event->itemref < MNFCT_FILTER + MAX_CUST_FILTER)
- {
- int pos = (int)((FPTR)m_event->itemref - MNFCT_FILTER);
- if (m_event->iptkey == IPT_UI_LEFT && sw_custfltr::mnfct[pos] > 0)
- {
- sw_custfltr::mnfct[pos]--;
- changed = true;
- }
- else if (m_event->iptkey == IPT_UI_RIGHT && sw_custfltr::mnfct[pos] < m_filter.publisher.ui.size() - 1)
- {
- sw_custfltr::mnfct[pos]++;
- changed = true;
- }
- else if (m_event->iptkey == IPT_UI_SELECT)
- ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, m_filter.publisher.ui, sw_custfltr::mnfct[pos]));
- }
- else if ((FPTR)m_event->itemref >= REGION_FILTER && (FPTR)m_event->itemref < REGION_FILTER + MAX_CUST_FILTER)
- {
- int pos = (int)((FPTR)m_event->itemref - REGION_FILTER);
- if (m_event->iptkey == IPT_UI_LEFT && sw_custfltr::region[pos] > 0)
- {
- sw_custfltr::region[pos]--;
- changed = true;
- }
- else if (m_event->iptkey == IPT_UI_RIGHT && sw_custfltr::region[pos] < m_filter.region.ui.size() - 1)
- {
- sw_custfltr::region[pos]++;
- changed = true;
- }
- else if (m_event->iptkey == IPT_UI_SELECT)
- ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, m_filter.region.ui, sw_custfltr::region[pos]));
- }
- else if ((FPTR)m_event->itemref >= LIST_FILTER && (FPTR)m_event->itemref < LIST_FILTER + MAX_CUST_FILTER)
- {
- int pos = (int)((FPTR)m_event->itemref - LIST_FILTER);
- if (m_event->iptkey == IPT_UI_LEFT && sw_custfltr::list[pos] > 0)
- {
- sw_custfltr::list[pos]--;
- changed = true;
- }
- else if (m_event->iptkey == IPT_UI_RIGHT && sw_custfltr::list[pos] < m_filter.swlist.name.size() - 1)
- {
- sw_custfltr::list[pos]++;
- changed = true;
- }
- else if (m_event->iptkey == IPT_UI_SELECT)
- ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, m_filter.swlist.description, sw_custfltr::list[pos]));
- }
- }
-
- if (changed)
- reset(UI_MENU_RESET_REMEMBER_REF);
- else if (m_added)
- reset(UI_MENU_RESET_SELECT_FIRST);
-}
-
-//-------------------------------------------------
-// populate
-//-------------------------------------------------
-void ui_menu_swcustom_filter::populate()
-{
- // add main filter
- UINT32 arrow_flags = get_arrow_flags((int)UI_SW_ALL, (int)UI_SW_UNAVAILABLE, sw_custfltr::main);
- item_append(_("Main filter"), sw_filters::text[sw_custfltr::main], arrow_flags, (void *)(FPTR)MAIN_FILTER);
-
- // add other filters
- for (int x = 1; x <= sw_custfltr::numother; x++)
- {
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
-
- // add filter items
- arrow_flags = get_arrow_flags((int)UI_SW_UNAVAILABLE + 1, (int)UI_SW_LAST - 1, sw_custfltr::other[x]);
- item_append(_("Other filter"), sw_filters::text[sw_custfltr::other[x]], arrow_flags, (void *)(FPTR)(OTHER_FILTER + x));
-
- if (m_added)
- selected = item.size() - 2;
-
- // add publisher subitem
- if (sw_custfltr::other[x] == UI_SW_PUBLISHERS && m_filter.publisher.ui.size() > 0)
- {
- arrow_flags = get_arrow_flags(0, m_filter.publisher.ui.size() - 1, sw_custfltr::mnfct[x]);
- std::string fbuff("^!Publisher");
- convert_command_glyph(fbuff);
- item_append(fbuff.c_str(), m_filter.publisher.ui[sw_custfltr::mnfct[x]].c_str(), arrow_flags, (void *)(FPTR)(MNFCT_FILTER + x));
- }
-
- // add year subitem
- else if (sw_custfltr::other[x] == UI_SW_YEARS && m_filter.year.ui.size() > 0)
- {
- arrow_flags = get_arrow_flags(0, m_filter.year.ui.size() - 1, sw_custfltr::year[x]);
- std::string fbuff("^!Year");
- convert_command_glyph(fbuff);
- item_append(fbuff.c_str(), m_filter.year.ui[sw_custfltr::year[x]].c_str(), arrow_flags, (void *)(FPTR)(YEAR_FILTER + x));
- }
-
- // add year subitem
- else if (sw_custfltr::other[x] == UI_SW_LIST && m_filter.swlist.name.size() > 0)
- {
- arrow_flags = get_arrow_flags(0, m_filter.swlist.name.size() - 1, sw_custfltr::list[x]);
- std::string fbuff("^!Software List");
- convert_command_glyph(fbuff);
- item_append(fbuff.c_str(), m_filter.swlist.description[sw_custfltr::list[x]].c_str(), arrow_flags, (void *)(FPTR)(LIST_FILTER + x));
- }
-
- // add device type subitem
- else if (sw_custfltr::other[x] == UI_SW_TYPE && m_filter.type.ui.size() > 0)
- {
- arrow_flags = get_arrow_flags(0, m_filter.type.ui.size() - 1, sw_custfltr::type[x]);
- std::string fbuff("^!Device type");
- convert_command_glyph(fbuff);
- item_append(fbuff.c_str(), m_filter.type.ui[sw_custfltr::type[x]].c_str(), arrow_flags, (void *)(FPTR)(TYPE_FILTER + x));
- }
-
- // add region subitem
- else if (sw_custfltr::other[x] == UI_SW_REGION && m_filter.region.ui.size() > 0)
- {
- arrow_flags = get_arrow_flags(0, m_filter.region.ui.size() - 1, sw_custfltr::region[x]);
- std::string fbuff("^!Region");
- convert_command_glyph(fbuff);
- item_append(fbuff.c_str(), m_filter.region.ui[sw_custfltr::region[x]].c_str(), arrow_flags, (void *)(FPTR)(REGION_FILTER + x));
- }
- }
-
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
-
- if (sw_custfltr::numother > 0)
- item_append(_("Remove last filter"), nullptr, 0, (void *)(FPTR)REMOVE_FILTER);
-
- if (sw_custfltr::numother < MAX_CUST_FILTER - 2)
- item_append(_("Add filter"), nullptr, 0, (void *)(FPTR)ADD_FILTER);
-
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
-
- customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
-}
-
-//-------------------------------------------------
-// perform our special rendering
-//-------------------------------------------------
-void ui_menu_swcustom_filter::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
-{
- float width;
- ui_manager &mui = machine().ui();
-
- // get the size of the text
- mui.draw_text_full(container, _("Select custom filters:"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += (2.0f * UI_BOX_LR_BORDER) + 0.01f;
- float maxwidth = MAX(width, origx2 - origx1);
-
- // compute our bounds
- float x1 = 0.5f - 0.5f * maxwidth;
- float x2 = x1 + maxwidth;
- float y1 = origy1 - top;
- float y2 = origy1 - UI_BOX_TB_BORDER;
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // draw the text within it
- mui.draw_text_full(container, _("Select custom filters:"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
-}
-
-//-------------------------------------------------
-// save custom filters info to file
-//-------------------------------------------------
-
-void ui_menu_swcustom_filter::save_sw_custom_filters()
-{
- // attempt to open the output file
- emu_file file(machine().ui().options().ui_path(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
- if (file.open("custom_", m_driver->name, "_filter.ini") == FILERR_NONE)
- {
- // generate custom filters info
- std::string cinfo;
- strprintf(cinfo, "Total filters = %d\n", (sw_custfltr::numother + 1));
- cinfo.append("Main filter = ").append(sw_filters::text[sw_custfltr::main]).append("\n");
-
- for (int x = 1; x <= sw_custfltr::numother; x++)
- {
- cinfo.append("Other filter = ").append(sw_filters::text[sw_custfltr::other[x]]).append("\n");
- if (sw_custfltr::other[x] == UI_SW_PUBLISHERS)
- cinfo.append(" Manufacturer filter = ").append(m_filter.publisher.ui[sw_custfltr::mnfct[x]]).append("\n");
- else if (sw_custfltr::other[x] == UI_SW_LIST)
- cinfo.append(" Software List filter = ").append(m_filter.swlist.name[sw_custfltr::list[x]]).append("\n");
- else if (sw_custfltr::other[x] == UI_SW_YEARS)
- cinfo.append(" Year filter = ").append(m_filter.year.ui[sw_custfltr::year[x]]).append("\n");
- else if (sw_custfltr::other[x] == UI_SW_TYPE)
- cinfo.append(" Type filter = ").append(m_filter.type.ui[sw_custfltr::type[x]]).append("\n");
- else if (sw_custfltr::other[x] == UI_SW_REGION)
- cinfo.append(" Region filter = ").append(m_filter.region.ui[sw_custfltr::region[x]]).append("\n");
- }
- file.puts(cinfo.c_str());
- file.close();
- }
-}
-
diff --git a/src/emu/ui/custmenu.h b/src/emu/ui/custmenu.h
deleted file mode 100644
index d136e911164..00000000000
--- a/src/emu/ui/custmenu.h
+++ /dev/null
@@ -1,131 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Dankan1890
-/***************************************************************************
-
- ui/custmenu.h
-
- Internal UI user interface.
-
-
-***************************************************************************/
-
-#pragma once
-
-#ifndef __UI_CUSTMENU_H__
-#define __UI_CUSTMENU_H__
-
-#include "ui/utils.h"
-
-// Software region
-struct c_sw_region
-{
- std::vector<std::string> ui;
- UINT16 actual;
- void set(std::string &str);
- std::string getname(std::string &str);
-};
-
-// Software publishers
-struct c_sw_publisher
-{
- std::vector<std::string> ui;
- UINT16 actual;
- void set(std::string &str);
- std::string getname(std::string &str);
-};
-
-// Software device type
-struct c_sw_type
-{
- std::vector<std::string> ui;
- UINT16 actual;
- void set(std::string &str);
-};
-
-// Software list
-struct c_sw_list
-{
- std::vector<std::string> name;
- std::vector<std::string> description;
- UINT16 actual;
-};
-
-// Software years
-struct c_sw_year
-{
- std::vector<std::string> ui;
- UINT16 actual;
- void set(std::string &str);
-};
-
-struct s_filter
-{
- c_sw_region region;
- c_sw_publisher publisher;
- c_sw_year year;
- c_sw_type type;
- c_sw_list swlist;
-};
-
-//-------------------------------------------------
-// custom software filter menu class
-//-------------------------------------------------
-class ui_menu_swcustom_filter : public ui_menu
-{
-public:
- ui_menu_swcustom_filter(running_machine &machine, render_container *container, const game_driver *_driver, s_filter &_filter);
- virtual ~ui_menu_swcustom_filter();
- virtual void populate() override;
- virtual void handle() override;
- virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
-
-private:
- enum
- {
- MAIN_FILTER = 1,
- ADD_FILTER,
- REMOVE_FILTER,
- MNFCT_FILTER,
- YEAR_FILTER = MNFCT_FILTER + MAX_CUST_FILTER + 1,
- REGION_FILTER = YEAR_FILTER + MAX_CUST_FILTER + 1,
- TYPE_FILTER = REGION_FILTER + MAX_CUST_FILTER + 1,
- LIST_FILTER = TYPE_FILTER + MAX_CUST_FILTER + 1,
- OTHER_FILTER = LIST_FILTER + MAX_CUST_FILTER + 1
- };
-
- bool m_added;
- s_filter &m_filter;
- const game_driver *m_driver;
-
- void save_sw_custom_filters();
-};
-
-//-------------------------------------------------
-// custom filter menu class
-//-------------------------------------------------
-class ui_menu_custom_filter : public ui_menu
-{
-public:
- ui_menu_custom_filter(running_machine &machine, render_container *container, bool _single_menu = false);
- virtual ~ui_menu_custom_filter();
- virtual void populate() override;
- virtual void handle() override;
- virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
-
-private:
- enum
- {
- MAIN_FILTER = 1,
- ADD_FILTER,
- REMOVE_FILTER,
- MNFCT_FILTER,
- YEAR_FILTER = MNFCT_FILTER + MAX_CUST_FILTER + 1,
- SCREEN_FILTER = YEAR_FILTER + MAX_CUST_FILTER + 1,
- OTHER_FILTER = SCREEN_FILTER + MAX_CUST_FILTER + 1
- };
-
- bool m_single_menu, m_added;
- void save_custom_filters();
-};
-
-#endif /* __UI_CUSTMENU_H__ */
diff --git a/src/emu/ui/custui.cpp b/src/emu/ui/custui.cpp
deleted file mode 100644
index 355f486918a..00000000000
--- a/src/emu/ui/custui.cpp
+++ /dev/null
@@ -1,1049 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Dankan1890
-/*********************************************************************
-
- ui/custui.cpp
-
- Internal UI user interface.
-
-*********************************************************************/
-
-#include "emu.h"
-#include "ui/ui.h"
-#include "ui/menu.h"
-#include "ui/selector.h"
-#include "ui/custui.h"
-#include "ui/utils.h"
-#include <algorithm>
-
-const char *ui_menu_custom_ui::hide_status[] = { "Show All", "Hide Filters", "Hide Info/Image", "Hide Both" };
-
-//-------------------------------------------------
-// ctor
-//-------------------------------------------------
-
-ui_menu_custom_ui::ui_menu_custom_ui(running_machine &machine, render_container *container) : ui_menu(machine, container)
-{
-}
-
-//-------------------------------------------------
-// dtor
-//-------------------------------------------------
-
-ui_menu_custom_ui::~ui_menu_custom_ui()
-{
- std::string error_string;
- machine().ui().options().set_value(OPTION_HIDE_PANELS, ui_globals::panels_status, OPTION_PRIORITY_CMDLINE, error_string);
- ui_globals::reset = true;
-}
-
-//-------------------------------------------------
-// handle
-//-------------------------------------------------
-
-void ui_menu_custom_ui::handle()
-{
- bool changed = false;
-
- // process the menu
- const ui_menu_event *m_event = process(0);
-
- if (m_event != nullptr && m_event->itemref != nullptr)
- {
- if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT)
- {
- changed = true;
- (m_event->iptkey == IPT_UI_RIGHT) ? ui_globals::panels_status++ : ui_globals::panels_status--;
- }
-
-
- else if (m_event->iptkey == IPT_UI_SELECT)
- {
- switch ((FPTR)m_event->itemref)
- {
- case FONT_MENU:
- ui_menu::stack_push(global_alloc_clear<ui_menu_font_ui>(machine(), container));
- break;
-
- case COLORS_MENU:
- ui_menu::stack_push(global_alloc_clear<ui_menu_colors_ui>(machine(), container));
- break;
- case HIDE_MENU:
- {
- int total = ARRAY_LENGTH(hide_status);
- std::vector<std::string> s_sel(total);
- for (int index = 0; index < total; ++index)
- s_sel[index] = hide_status[index];
-
- ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, s_sel, ui_globals::panels_status));
- }
- }
- }
- }
-
- if (changed)
- reset(UI_MENU_RESET_REMEMBER_REF);
-}
-
-//-------------------------------------------------
-// populate
-//-------------------------------------------------
-
-void ui_menu_custom_ui::populate()
-{
- item_append("Fonts", nullptr, 0, (void *)(FPTR)FONT_MENU);
- item_append("Colors", nullptr, 0, (void *)(FPTR)COLORS_MENU);
-
- UINT32 arrow_flags = get_arrow_flags(0, (int)HIDE_BOTH, ui_globals::panels_status);
- item_append("Filters and Info/Image", hide_status[ui_globals::panels_status], arrow_flags, (void *)(FPTR)HIDE_MENU);
-
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
- customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
-}
-
-//-------------------------------------------------
-// perform our special rendering
-//-------------------------------------------------
-
-void ui_menu_custom_ui::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
-{
- float width;
- ui_manager &mui = machine().ui();
-
- mui.draw_text_full(container, "Custom UI Settings", 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += 2 * UI_BOX_LR_BORDER;
- float maxwidth = MAX(origx2 - origx1, width);
-
- // compute our bounds
- float x1 = 0.5f - 0.5f * maxwidth;
- float x2 = x1 + maxwidth;
- float y1 = origy1 - top;
- float y2 = origy1 - UI_BOX_TB_BORDER;
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // draw the text within it
- mui.draw_text_full(container, "Custom UI Settings", x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
-}
-
-//-------------------------------------------------
-// ctor
-//-------------------------------------------------
-
-ui_menu_font_ui::ui_menu_font_ui(running_machine &machine, render_container *container) : ui_menu(machine, container)
-{
- ui_options &moptions = machine.ui().options();
-#ifdef UI_WINDOWS
-
- std::string name(machine.ui().options().ui_font());
- list();
-
- m_bold = (strreplace(name, "[B]", "") + strreplace(name, "[b]", "") > 0);
- m_italic = (strreplace(name, "[I]", "") + strreplace(name, "[i]", "") > 0);
- m_actual = 0;
-
- for (size_t index = 0; index < m_fonts.size(); index++)
- {
- if (m_fonts[index] == name)
- {
- m_actual = index;
- break;
- }
- }
-#endif
-
- m_info_size = moptions.infos_size();
- m_font_size = moptions.font_rows();
-
- for (ui_options::entry *f_entry = moptions.first(); f_entry != nullptr; f_entry = f_entry->next())
- {
- const char *name = f_entry->name();
- if (name && strlen(name) && !strcmp(OPTION_INFOS_SIZE, f_entry->name()))
- {
- m_info_max = atof(f_entry->maximum());
- m_info_min = atof(f_entry->minimum());
- }
- else if (name && strlen(name) && !strcmp(OPTION_FONT_ROWS, f_entry->name()))
- {
- m_font_max = atof(f_entry->maximum());
- m_font_min = atof(f_entry->minimum());
- }
- }
-
-}
-
-#ifdef UI_WINDOWS
-//-------------------------------------------------
-// fonts enumerator CALLBACK
-//-------------------------------------------------
-
-int CALLBACK ui_menu_font_ui::EnumFontFamiliesExProc(const LOGFONT *lpelfe, const TEXTMETRIC *lpntme, DWORD FontType, LPARAM lParam)
-{
- std::vector<std::string> *lpc = (std::vector<std::string>*)lParam;
- std::string utf((char *)lpelfe->lfFaceName);
- if (utf[0] != '@')
- lpc->push_back(utf);
-
- return 1;
-}
-
-//-------------------------------------------------
-// create fonts list
-//-------------------------------------------------
-
-void ui_menu_font_ui::list()
-{
- // create LOGFONT structure
- LOGFONT lf;
- lf.lfCharSet = ANSI_CHARSET;
- lf.lfFaceName[0] = '\0';
-
- HDC hDC = GetDC( nullptr );
- EnumFontFamiliesEx( hDC, &lf, (FONTENUMPROC)EnumFontFamiliesExProc, (LPARAM)&m_fonts, 0 );
- ReleaseDC( nullptr, hDC );
-
- // sort
- std::stable_sort(m_fonts.begin(), m_fonts.end());
-
- // add default string to the top of array
- m_fonts.insert(m_fonts.begin(), std::string("default"));
-}
-#endif
-
-//-------------------------------------------------
-// dtor
-//-------------------------------------------------
-
-ui_menu_font_ui::~ui_menu_font_ui()
-{
- std::string error_string;
- ui_options &moptions = machine().ui().options();
-
-#ifdef UI_WINDOWS
- std::string name(m_fonts[m_actual]);
- if (m_fonts[m_actual] != "default")
- {
- if (m_italic)
- name.insert(0, "[I]");
- if (m_bold)
- name.insert(0, "[B]");
- }
- moptions.set_value(OPTION_UI_FONT, name.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
-#endif
-
- moptions.set_value(OPTION_INFOS_SIZE, m_info_size, OPTION_PRIORITY_CMDLINE, error_string);
- moptions.set_value(OPTION_FONT_ROWS, m_font_size, OPTION_PRIORITY_CMDLINE, error_string);
-}
-
-//-------------------------------------------------
-// handle
-//-------------------------------------------------
-
-void ui_menu_font_ui::handle()
-{
- bool changed = false;
-
- // process the menu
- const ui_menu_event *m_event = process(UI_MENU_PROCESS_LR_REPEAT);
-
- if (m_event != nullptr && m_event->itemref != nullptr)
- switch ((FPTR)m_event->itemref)
- {
- case INFOS_SIZE:
- if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT)
- {
- (m_event->iptkey == IPT_UI_RIGHT) ? m_info_size += 0.05f : m_info_size -= 0.05f;
- changed = true;
- }
- break;
-
- case FONT_SIZE:
- if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT)
- {
- (m_event->iptkey == IPT_UI_RIGHT) ? m_font_size++ : m_font_size--;
- changed = true;
- }
- break;
-
-#ifdef UI_WINDOWS
-
- case MUI_FNT:
- if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT)
- {
- (m_event->iptkey == IPT_UI_RIGHT) ? m_actual++ : m_actual--;
- changed = true;
- }
- else if (m_event->iptkey == IPT_UI_SELECT)
- {
- ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, m_fonts, m_actual));
- changed = true;
- }
- break;
-
- case MUI_BOLD:
- case MUI_ITALIC:
- if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT || m_event->iptkey == IPT_UI_SELECT)
- {
- ((FPTR)m_event->itemref == MUI_BOLD) ? m_bold = !m_bold : m_italic = !m_italic;
- changed = true;
- }
- break;
-#endif
- }
-
- if (changed)
- reset(UI_MENU_RESET_REMEMBER_REF);
-}
-
-//-------------------------------------------------
-// populate
-//-------------------------------------------------
-
-void ui_menu_font_ui::populate()
-{
- // set filter arrow
- UINT32 arrow_flags;
- std::string tmptxt;
-
-#ifdef UI_WINDOWS
- // add fonts option
- arrow_flags = get_arrow_flags(0, m_fonts.size() - 1, m_actual);
- std::string name(m_fonts[m_actual]);
- item_append("UI Font", name.c_str(), arrow_flags, (void *)(FPTR)MUI_FNT);
-
- if (name != "default")
- {
- item_append("Bold", m_bold ? "On" : "Off", m_bold ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)(FPTR)MUI_BOLD);
- item_append("Italic", m_italic ? "On" : "Off", m_italic ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)(FPTR)MUI_ITALIC);
- }
-#endif
-
- arrow_flags = get_arrow_flags(m_font_min, m_font_max, m_font_size);
- strprintf(tmptxt, "%2d", m_font_size);
- item_append("Lines", tmptxt.c_str(), arrow_flags, (void *)(FPTR)FONT_SIZE);
-
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
-
- // add item
- tmptxt.clear();
- strprintf(tmptxt, "%3.2f", m_info_size);
- arrow_flags = get_arrow_flags(m_info_min, m_info_max, m_info_size);
- item_append("Infos text size", tmptxt.c_str(), arrow_flags, (void *)(FPTR)INFOS_SIZE);
-
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
-
- custombottom = customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
-}
-
-//-------------------------------------------------
-// perform our special rendering
-//-------------------------------------------------
-
-void ui_menu_font_ui::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
-{
- float width;
- ui_manager &mui = machine().ui();
-
- // top text
- std::string topbuf("UI Fonts Settings");
-
- mui.draw_text_full(container, topbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += 2 * UI_BOX_LR_BORDER;
- float maxwidth = MAX(origx2 - origx1, width);
-
- // compute our bounds
- float x1 = 0.5f - 0.5f * maxwidth;
- float x2 = x1 + maxwidth;
- float y1 = origy1 - top;
- float y2 = origy1 - UI_BOX_TB_BORDER;
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // draw the text within it
- mui.draw_text_full(container, topbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
-
- if ((FPTR)selectedref == INFOS_SIZE)
- {
- topbuf = "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit.";
-
- mui.draw_text_full(container, topbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_LEFT, WRAP_NEVER,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr, m_info_size);
- width += 2 * UI_BOX_LR_BORDER;
- maxwidth = MAX(origx2 - origx1, width);
-
- // compute our bounds
- x1 = 0.5f - 0.5f * maxwidth;
- x2 = x1 + maxwidth;
- y1 = origy2 + UI_BOX_TB_BORDER;
- y2 = origy2 + bottom;
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // draw the text within it
- mui.draw_text_full(container, topbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_LEFT, WRAP_NEVER,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, m_info_size);
- }
-}
-
-//-------------------------------------------------
-// ctor
-//-------------------------------------------------
-#define SET_COLOR_UI(var, opt) var[M##opt].color = opt; var[M##opt].option = OPTION_##opt
-
-ui_menu_colors_ui::ui_menu_colors_ui(running_machine &machine, render_container *container) : ui_menu(machine, container)
-{
- SET_COLOR_UI(m_color_table, UI_BACKGROUND_COLOR);
- SET_COLOR_UI(m_color_table, UI_BORDER_COLOR);
- SET_COLOR_UI(m_color_table, UI_CLONE_COLOR);
- SET_COLOR_UI(m_color_table, UI_DIPSW_COLOR);
- SET_COLOR_UI(m_color_table, UI_GFXVIEWER_BG_COLOR);
- SET_COLOR_UI(m_color_table, UI_MOUSEDOWN_BG_COLOR);
- SET_COLOR_UI(m_color_table, UI_MOUSEDOWN_COLOR);
- SET_COLOR_UI(m_color_table, UI_MOUSEOVER_BG_COLOR);
- SET_COLOR_UI(m_color_table, UI_MOUSEOVER_COLOR);
- SET_COLOR_UI(m_color_table, UI_SELECTED_BG_COLOR);
- SET_COLOR_UI(m_color_table, UI_SELECTED_COLOR);
- SET_COLOR_UI(m_color_table, UI_SLIDER_COLOR);
- SET_COLOR_UI(m_color_table, UI_SUBITEM_COLOR);
- SET_COLOR_UI(m_color_table, UI_TEXT_BG_COLOR);
- SET_COLOR_UI(m_color_table, UI_TEXT_COLOR);
- SET_COLOR_UI(m_color_table, UI_UNAVAILABLE_COLOR);
-}
-
-//-------------------------------------------------
-// dtor
-//-------------------------------------------------
-
-ui_menu_colors_ui::~ui_menu_colors_ui()
-{
- std::string error_string, dec_color;
- for (int index = 1; index < MUI_RESTORE; index++)
- {
- strprintf(dec_color, "%x", (UINT32)m_color_table[index].color);
- machine().ui().options().set_value(m_color_table[index].option, dec_color.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
- }
-}
-
-//-------------------------------------------------
-// handle
-//-------------------------------------------------
-
-void ui_menu_colors_ui::handle()
-{
- bool changed = false;
-
- // process the menu
- const ui_menu_event *m_event = process(0);
-
- if (m_event != nullptr && m_event->itemref != nullptr && m_event->iptkey == IPT_UI_SELECT)
- {
- if ((FPTR)m_event->itemref != MUI_RESTORE)
- ui_menu::stack_push(global_alloc_clear<ui_menu_rgb_ui>(machine(), container, &m_color_table[(FPTR)m_event->itemref].color, item[selected].text));
- else
- {
- changed = true;
- restore_colors();
- }
- }
-
- if (changed)
- reset(UI_MENU_RESET_REMEMBER_REF);
-}
-
-//-------------------------------------------------
-// populate
-//-------------------------------------------------
-
-void ui_menu_colors_ui::populate()
-{
- item_append("Normal text", nullptr, 0, (void *)(FPTR)MUI_TEXT_COLOR);
- item_append("Selected color", nullptr, 0, (void *)(FPTR)MUI_SELECTED_COLOR);
- item_append("Normal text background", nullptr, 0, (void *)(FPTR)MUI_TEXT_BG_COLOR);
- item_append("Selected background color", nullptr, 0, (void *)(FPTR)MUI_SELECTED_BG_COLOR);
- item_append("Subitem color", nullptr, 0, (void *)(FPTR)MUI_SUBITEM_COLOR);
- item_append("Clone", nullptr, 0, (void *)(FPTR)MUI_CLONE_COLOR);
- item_append("Border", nullptr, 0, (void *)(FPTR)MUI_BORDER_COLOR);
- item_append("Background", nullptr, 0, (void *)(FPTR)MUI_BACKGROUND_COLOR);
- item_append("Dipswitch", nullptr, 0, (void *)(FPTR)MUI_DIPSW_COLOR);
- item_append("Unavailable color", nullptr, 0, (void *)(FPTR)MUI_UNAVAILABLE_COLOR);
- item_append("Slider color", nullptr, 0, (void *)(FPTR)MUI_SLIDER_COLOR);
- item_append("Gfx viewer background", nullptr, 0, (void *)(FPTR)MUI_GFXVIEWER_BG_COLOR);
- item_append("Mouse over color", nullptr, 0, (void *)(FPTR)MUI_MOUSEOVER_COLOR);
- item_append("Mouse over background color", nullptr, 0, (void *)(FPTR)MUI_MOUSEOVER_BG_COLOR);
- item_append("Mouse down color", nullptr, 0, (void *)(FPTR)MUI_MOUSEDOWN_COLOR);
- item_append("Mouse down background color", nullptr, 0, (void *)(FPTR)MUI_MOUSEDOWN_BG_COLOR);
-
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
- item_append("Restore originals colors", nullptr, 0, (void *)(FPTR)MUI_RESTORE);
-
- custombottom = customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
-}
-
-//-------------------------------------------------
-// perform our special rendering
-//-------------------------------------------------
-
-void ui_menu_colors_ui::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
-{
- float width, maxwidth = origx2 - origx1;
- ui_manager &mui = machine().ui();
- float line_height = mui.get_line_height();
-
- // top text
- std::string topbuf("UI Colors Settings");
-
- mui.draw_text_full(container, topbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += 2 * UI_BOX_LR_BORDER;
- maxwidth = MAX(maxwidth, width);
-
- // compute our bounds
- float x1 = 0.5f - 0.5f * maxwidth;
- float x2 = x1 + maxwidth;
- float y1 = origy1 - top;
- float y2 = origy1 - UI_BOX_TB_BORDER;
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // draw the text within it
- mui.draw_text_full(container, topbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
-
- // bottom text
- // get the text for 'UI Select'
- std::string ui_select_text = machine().input().seq_name(machine().ioport().type_seq(IPT_UI_SELECT, 0, SEQ_TYPE_STANDARD));
- topbuf.assign("Double click or press ").append(ui_select_text.c_str()).append(" to change the color value");
-
- mui.draw_text_full(container, topbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += 2 * UI_BOX_LR_BORDER;
- maxwidth = MAX(maxwidth, width);
-
- // compute our bounds
- x1 = 0.5f - 0.5f * maxwidth;
- x2 = x1 + maxwidth;
- y1 = origy2 + UI_BOX_TB_BORDER;
- y2 = origy2 + bottom;
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_RED_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // draw the text within it
- mui.draw_text_full(container, topbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
-
- // compute maxwidth
- topbuf = "Menu Preview";
-
- mui.draw_text_full(container, topbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- maxwidth = width + 2.0f * UI_BOX_LR_BORDER;
-
- std::string sampletxt[5];
-
- sampletxt[0] = "Normal";
- sampletxt[1] = "Subitem";
- sampletxt[2] = "Selected";
- sampletxt[3] = "Mouse Over";
- sampletxt[4] = "Clone";
-
- for (auto & elem: sampletxt)
- {
- mui.draw_text_full(container, elem.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += 2 * UI_BOX_LR_BORDER;
- maxwidth = MAX(maxwidth, width);
- }
-
- // compute our bounds for header
- x1 = origx2 + 2.0f * UI_BOX_LR_BORDER;
- x2 = x1 + maxwidth;
- y1 = origy1;
- y2 = y1 + bottom - UI_BOX_TB_BORDER;
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
- y2 -= UI_BOX_TB_BORDER;
-
- // draw the text within it
- mui.draw_text_full(container, topbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
-
- // compute our bounds for menu preview
- x1 -= UI_BOX_LR_BORDER;
- x2 += UI_BOX_LR_BORDER;
- y1 = y2 + 2.0f * UI_BOX_TB_BORDER;
- y2 = y1 + 5.0f * line_height + 2.0f * UI_BOX_TB_BORDER;
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, m_color_table[MUI_BACKGROUND_COLOR].color);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // draw normal text
- mui.draw_text_full(container, sampletxt[0].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NORMAL, m_color_table[MUI_TEXT_COLOR].color, m_color_table[MUI_TEXT_BG_COLOR].color, nullptr, nullptr);
- y1 += line_height;
-
- // draw subitem text
- mui.draw_text_full(container, sampletxt[1].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NORMAL, m_color_table[MUI_SUBITEM_COLOR].color, m_color_table[MUI_TEXT_BG_COLOR].color, nullptr, nullptr);
- y1 += line_height;
-
- // draw selected text
- highlight(container, x1, y1, x2, y1 + line_height, m_color_table[MUI_SELECTED_BG_COLOR].color);
- mui.draw_text_full(container, sampletxt[2].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NORMAL, m_color_table[MUI_SELECTED_COLOR].color, m_color_table[MUI_SELECTED_BG_COLOR].color, nullptr, nullptr);
- y1 += line_height;
-
- // draw mouse over text
- highlight(container, x1, y1, x2, y1 + line_height, m_color_table[MUI_MOUSEOVER_BG_COLOR].color);
- mui.draw_text_full(container, sampletxt[3].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NORMAL, m_color_table[MUI_MOUSEOVER_COLOR].color, m_color_table[MUI_MOUSEOVER_BG_COLOR].color, nullptr, nullptr);
- y1 += line_height;
-
- // draw clone text
- mui.draw_text_full(container, sampletxt[4].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NORMAL, m_color_table[MUI_CLONE_COLOR].color, m_color_table[MUI_TEXT_BG_COLOR].color, nullptr, nullptr);
-
-}
-
-//-------------------------------------------------
-// restore original colors
-//-------------------------------------------------
-
-void ui_menu_colors_ui::restore_colors()
-{
- ui_options options;
- for (int index = 1; index < MUI_RESTORE; index++)
- m_color_table[index].color = rgb_t((UINT32)strtoul(options.value(m_color_table[index].option), nullptr, 16));
-}
-
-//-------------------------------------------------
-// ctor
-//-------------------------------------------------
-
-ui_menu_rgb_ui::ui_menu_rgb_ui(running_machine &machine, render_container *container, rgb_t *_color, std::string _title) : ui_menu(machine, container)
-{
- m_color = _color;
- m_key_active = false;
- m_lock_ref = 0;
- m_title = _title;
- m_search[0] = '\0';
-}
-
-//-------------------------------------------------
-// dtor
-//-------------------------------------------------
-
-ui_menu_rgb_ui::~ui_menu_rgb_ui()
-{
-}
-
-//-------------------------------------------------
-// handle
-//-------------------------------------------------
-
-void ui_menu_rgb_ui::handle()
-{
- bool changed = false;
-
- // process the menu
- const ui_menu_event *m_event;
-
- if (!m_key_active)
- m_event = process(UI_MENU_PROCESS_LR_REPEAT);
- else
- m_event = process(UI_MENU_PROCESS_ONLYCHAR);
-
- if (m_event != nullptr && m_event->itemref != nullptr)
- {
- switch ((FPTR)m_event->itemref)
- {
- case RGB_ALPHA:
- if (m_event->iptkey == IPT_UI_LEFT && m_color->a() > 1)
- {
- m_color->set_a(m_color->a() - 1);
- changed = true;
- }
-
- else if (m_event->iptkey == IPT_UI_RIGHT && m_color->a() < 255)
- {
- m_color->set_a(m_color->a() + 1);
- changed = true;
- }
-
- else if (m_event->iptkey == IPT_UI_SELECT || m_event->iptkey == IPT_SPECIAL)
- {
- inkey_special(m_event);
- changed = true;
- }
-
- break;
-
- case RGB_RED:
- if (m_event->iptkey == IPT_UI_LEFT && m_color->r() > 1)
- {
- m_color->set_r(m_color->r() - 1);
- changed = true;
- }
-
- else if (m_event->iptkey == IPT_UI_RIGHT && m_color->r() < 255)
- {
- m_color->set_r(m_color->r() + 1);
- changed = true;
- }
-
- else if (m_event->iptkey == IPT_UI_SELECT || m_event->iptkey == IPT_SPECIAL)
- {
- inkey_special(m_event);
- changed = true;
- }
-
- break;
-
- case RGB_GREEN:
- if (m_event->iptkey == IPT_UI_LEFT && m_color->g() > 1)
- {
- m_color->set_g(m_color->g() - 1);
- changed = true;
- }
-
- else if (m_event->iptkey == IPT_UI_RIGHT && m_color->g() < 255)
- {
- m_color->set_g(m_color->g() + 1);
- changed = true;
- }
-
- else if (m_event->iptkey == IPT_UI_SELECT || m_event->iptkey == IPT_SPECIAL)
- {
- inkey_special(m_event);
- changed = true;
- }
-
- break;
-
- case RGB_BLUE:
- if (m_event->iptkey == IPT_UI_LEFT && m_color->b() > 1)
- {
- m_color->set_b(m_color->b() - 1);
- changed = true;
- }
-
- else if (m_event->iptkey == IPT_UI_RIGHT && m_color->b() < 255)
- {
- m_color->set_b(m_color->b() + 1);
- changed = true;
- }
-
- else if (m_event->iptkey == IPT_UI_SELECT || m_event->iptkey == IPT_SPECIAL)
- {
- inkey_special(m_event);
- changed = true;
- }
-
- break;
-
- case PALETTE_CHOOSE:
- if (m_event->iptkey == IPT_UI_SELECT)
- ui_menu::stack_push(global_alloc_clear<ui_menu_palette_sel>(machine(), container, *m_color));
- break;
- }
- }
-
- if (changed)
- reset(UI_MENU_RESET_REMEMBER_REF);
-}
-
-//-------------------------------------------------
-// populate
-//-------------------------------------------------
-
-void ui_menu_rgb_ui::populate()
-{
- // set filter arrow
- UINT32 arrow_flags = MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW;
- std::string text;
- std::string s_text = std::string(m_search).append("_");
-
- if (m_lock_ref != RGB_ALPHA)
- {
- arrow_flags = get_arrow_flags(0, 255, m_color->a());
- strprintf(text, "%3d", m_color->a());
- item_append("Alpha", text.c_str(), arrow_flags, (void *)(FPTR)RGB_ALPHA);
- }
- else
- item_append("Alpha", s_text.c_str(), 0, (void *)(FPTR)RGB_ALPHA);
-
- if (m_lock_ref != RGB_RED)
- {
- arrow_flags = get_arrow_flags(0, 255, m_color->r());
- strprintf(text, "%3d", m_color->r());
- item_append("Red", text.c_str(), arrow_flags, (void *)(FPTR)RGB_RED);
- }
- else
- item_append("Red", s_text.c_str(), 0, (void *)(FPTR)RGB_RED);
-
- if (m_lock_ref != RGB_GREEN)
- {
- arrow_flags = get_arrow_flags(0, 255, m_color->g());
- strprintf(text, "%3d", m_color->g());
- item_append("Green", text.c_str(), arrow_flags, (void *)(FPTR)RGB_GREEN);
- }
- else
- item_append("Green", s_text.c_str(), 0, (void *)(FPTR)RGB_GREEN);
-
- if (m_lock_ref != RGB_BLUE)
- {
- arrow_flags = get_arrow_flags(0, 255, m_color->b());
- strprintf(text, "%3d", m_color->b());
- item_append("Blue", text.c_str(), arrow_flags, (void *)(FPTR)RGB_BLUE);
- }
- else
- item_append("Blue", s_text.c_str(), 0, (void *)(FPTR)RGB_BLUE);
-
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
- item_append("Choose from palette", nullptr, 0, (void *)(FPTR)PALETTE_CHOOSE);
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
-
- custombottom = customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
-}
-
-//-------------------------------------------------
-// perform our special rendering
-//-------------------------------------------------
-
-void ui_menu_rgb_ui::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
-{
- float width, maxwidth = origx2 - origx1;
- ui_manager &mui = machine().ui();
-
- // top text
- std::string topbuf = std::string(m_title).append(" - ARGB Settings");
- mui.draw_text_full(container, topbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += 2 * UI_BOX_LR_BORDER;
- maxwidth = MAX(maxwidth, width);
-
- // compute our bounds
- float x1 = 0.5f - 0.5f * maxwidth;
- float x2 = x1 + maxwidth;
- float y1 = origy1 - top;
- float y2 = origy1 - UI_BOX_TB_BORDER;
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // draw the text within it
- mui.draw_text_full(container, topbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
-
- std::string sampletxt("Color preview =");
- maxwidth = origx2 - origx1;
- mui.draw_text_full(container, sampletxt.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += 2 * UI_BOX_LR_BORDER;
- maxwidth = MAX(maxwidth, width);
-
- // compute our bounds
- x1 -= UI_BOX_LR_BORDER;
- x2 = x1 + width;
- y1 = origy2 + UI_BOX_TB_BORDER;
- y2 = origy2 + bottom;
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_RED_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // draw the normal text
- mui.draw_text_full(container, sampletxt.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NORMAL, ARGB_WHITE, ARGB_BLACK, nullptr, nullptr);
-
- float t_x2 = x1 - UI_BOX_LR_BORDER + maxwidth;
- x1 = x2 + 2.0f * UI_BOX_LR_BORDER;
- x2 = t_x2;
- y1 -= UI_BOX_TB_BORDER;
-
- mui.draw_outlined_box(container, x1, y1, x2, y2, *m_color);
-
-}
-
-//-------------------------------------------------
-// handle special key event
-//-------------------------------------------------
-
-void ui_menu_rgb_ui::inkey_special(const ui_menu_event *m_event)
-{
- if (m_event->iptkey == IPT_UI_SELECT)
- {
- m_key_active = !m_key_active;
- m_lock_ref = (FPTR)m_event->itemref;
-
- if (!m_key_active)
- {
- int val = atoi(m_search);
- val = m_color->clamp(val);
-
- switch ((FPTR)m_event->itemref)
- {
- case RGB_ALPHA:
- m_color->set_a(val);
- break;
-
- case RGB_RED:
- m_color->set_r(val);
- break;
-
- case RGB_GREEN:
- m_color->set_g(val);
- break;
-
- case RGB_BLUE:
- m_color->set_b(val);
- break;
- }
-
- m_search[0] = 0;
- m_lock_ref = 0;
- return;
- }
- }
-
- if (!m_key_active)
- {
- m_search[0] = 0;
- return;
- }
-
- int buflen = strlen(m_search);
-
- // if it's a backspace and we can handle it, do so
- if (((m_event->unichar == 8 || m_event->unichar == 0x7f) && buflen > 0))
- *(char *)utf8_previous_char(&m_search[buflen]) = 0;
- else if (buflen >= 3)
- return;
- // if it's any other key and we're not maxed out, update
- else if ((m_event->unichar >= '0' && m_event->unichar <= '9'))
- buflen += utf8_from_uchar(&m_search[buflen], ARRAY_LENGTH(m_search) - buflen, m_event->unichar);
-
- m_search[buflen] = 0;
-}
-
-ui_menu_palette_sel::palcolor ui_menu_palette_sel::m_palette[] = {
- { "White", "FFFFFFFF" },
- { "Silver", "FFC0C0C0" },
- { "Gray", "FF808080" },
- { "Black", "FF000000" },
- { "Red", "FFFF0000" },
- { "Orange", "FFFFA500" },
- { "Yellow", "FFFFFF00" },
- { "Green", "FF00FF00" },
- { "Blue", "FF0000FF" },
- { "Violet", "FF8F00FF" }
-};
-
-//-------------------------------------------------
-// ctor
-//-------------------------------------------------
-
-ui_menu_palette_sel::ui_menu_palette_sel(running_machine &machine, render_container *container, rgb_t &_color)
- : ui_menu(machine, container), m_original(_color)
-{
-}
-
-//-------------------------------------------------
-// dtor
-//-------------------------------------------------
-
-ui_menu_palette_sel::~ui_menu_palette_sel()
-{
-}
-
-//-------------------------------------------------
-// handle
-//-------------------------------------------------
-
-void ui_menu_palette_sel::handle()
-{
- // process the menu
- const ui_menu_event *m_event = process(MENU_FLAG_UI_PALETTE);
- if (m_event != nullptr && m_event->itemref != nullptr)
- {
- if (m_event->iptkey == IPT_UI_SELECT)
- {
- m_original = rgb_t((UINT32)strtoul(item[selected].subtext, nullptr, 16));
- ui_menu::menu_stack->parent->reset(UI_MENU_RESET_SELECT_FIRST);
- ui_menu::stack_pop(machine());
- }
- }
-}
-
-//-------------------------------------------------
-// populate
-//-------------------------------------------------
-
-void ui_menu_palette_sel::populate()
-{
- for (int x = 0; x < ARRAY_LENGTH(m_palette); ++x)
- item_append(m_palette[x].name, m_palette[x].argb, MENU_FLAG_UI_PALETTE, (void *)(FPTR)(x + 1));
-
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
-}
-
-//-------------------------------------------------
-// perform our special rendering
-//-------------------------------------------------
-
-void ui_menu_palette_sel::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
-{
-}
diff --git a/src/emu/ui/custui.h b/src/emu/ui/custui.h
deleted file mode 100644
index 79f45cc3a6e..00000000000
--- a/src/emu/ui/custui.h
+++ /dev/null
@@ -1,182 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Dankan1890
-/***************************************************************************
-
- ui/custui.h
-
- Internal UI user interface.
-
-***************************************************************************/
-
-#pragma once
-
-#ifndef __UI_CUSTUI_H__
-#define __UI_CUSTUI_H__
-
-#ifdef UI_WINDOWS
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#endif
-
-//-------------------------------------------------
-// Custom UI menu
-//-------------------------------------------------
-
-class ui_menu_custom_ui : public ui_menu
-{
-public:
- ui_menu_custom_ui(running_machine &machine, render_container *container);
- virtual ~ui_menu_custom_ui();
- virtual void populate() override;
- virtual void handle() override;
- virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
-
-private:
- enum
- {
- FONT_MENU = 1,
- COLORS_MENU,
- HIDE_MENU
- };
- static const char *hide_status[];
-};
-
-//-------------------------------------------------
-// Font UI menu
-//-------------------------------------------------
-
-class ui_menu_font_ui : public ui_menu
-{
-public:
- ui_menu_font_ui(running_machine &machine, render_container *container);
- virtual ~ui_menu_font_ui();
- virtual void populate() override;
- virtual void handle() override;
- virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
-
-private:
- enum
- {
- INFOS_SIZE = 1,
- FONT_SIZE,
- MUI_FNT,
- MUI_BOLD,
- MUI_ITALIC
- };
-
-#ifdef UI_WINDOWS
- UINT16 m_actual;
- std::vector<std::string> m_fonts;
- bool m_bold, m_italic;
-
- void list();
- static int CALLBACK EnumFontFamiliesExProc(const LOGFONT *lpelfe, const TEXTMETRIC *lpntme, DWORD FontType, LPARAM lParam);
-
-#endif
-
- float m_info_min, m_info_max, m_info_size;
- int m_font_min, m_font_max, m_font_size;
-};
-
-//-------------------------------------------------
-// Colors UI menu
-//-------------------------------------------------
-
-class ui_menu_colors_ui : public ui_menu
-{
-public:
- ui_menu_colors_ui(running_machine &machine, render_container *container);
- virtual ~ui_menu_colors_ui();
- virtual void populate() override;
- virtual void handle() override;
- virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
-
-private:
- enum
- {
- MUI_BACKGROUND_COLOR = 1,
- MUI_BORDER_COLOR,
- MUI_CLONE_COLOR,
- MUI_DIPSW_COLOR,
- MUI_GFXVIEWER_BG_COLOR,
- MUI_MOUSEDOWN_BG_COLOR,
- MUI_MOUSEDOWN_COLOR,
- MUI_MOUSEOVER_BG_COLOR,
- MUI_MOUSEOVER_COLOR,
- MUI_SELECTED_BG_COLOR,
- MUI_SELECTED_COLOR,
- MUI_SLIDER_COLOR,
- MUI_SUBITEM_COLOR,
- MUI_TEXT_BG_COLOR,
- MUI_TEXT_COLOR,
- MUI_UNAVAILABLE_COLOR,
- MUI_RESTORE
- };
-
- struct s_color_table
- {
- rgb_t color;
- const char *option;
- };
-
- s_color_table m_color_table[MUI_RESTORE];
- void restore_colors();
-};
-
-//-------------------------------------------------
-// ARGB UI menu
-//-------------------------------------------------
-
-class ui_menu_rgb_ui : public ui_menu
-{
-public:
- ui_menu_rgb_ui(running_machine &machine, render_container *container, rgb_t *_color, std::string _title);
- virtual ~ui_menu_rgb_ui();
- virtual void populate() override;
- virtual void handle() override;
- virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
-
-private:
- rgb_t *m_color;
- char m_search[4];
- bool m_key_active;
- int m_lock_ref;
- std::string m_title;
-
- enum
- {
- RGB_ALPHA = 1,
- RGB_RED,
- RGB_GREEN,
- RGB_BLUE,
- PALETTE_CHOOSE
- };
-
- void inkey_special(const ui_menu_event *menu_event);
-};
-
-//-------------------------------------------------
-// Palette UI menu
-//-------------------------------------------------
-
-class ui_menu_palette_sel : public ui_menu
-{
-public:
- ui_menu_palette_sel(running_machine &machine, render_container *container, rgb_t &_color);
- virtual ~ui_menu_palette_sel();
- virtual void populate() override;
- virtual void handle() override;
- virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
-
-private:
- struct palcolor
- {
- const char *name;
- const char *argb;
- };
-
- static palcolor m_palette[];
- rgb_t &m_original;
-};
-
-#endif /* __UI_CUSTUI_H__ */
diff --git a/src/emu/ui/datfile.cpp b/src/emu/ui/datfile.cpp
deleted file mode 100644
index 9171242d072..00000000000
--- a/src/emu/ui/datfile.cpp
+++ /dev/null
@@ -1,650 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Dankan1890
-/***************************************************************************
-
- ui/datfile.cpp
-
- UI DATs manager.
-
-***************************************************************************/
-
-#include "emu.h"
-#include "drivenum.h"
-#include "ui/ui.h"
-#include "ui/datfile.h"
-#include "ui/utils.h"
-
-//-------------------------------------------------
-// TAGS
-//-------------------------------------------------
-static std::string DATAFILE_TAG("$");
-static std::string TAG_BIO("$bio");
-static std::string TAG_INFO("$info");
-static std::string TAG_MAME("$mame");
-static std::string TAG_COMMAND("$cmd");
-static std::string TAG_END("$end");
-static std::string TAG_DRIVER("$drv");
-static std::string TAG_STORY("$story");
-static std::string TAG_HISTORY_R("## REVISION:");
-static std::string TAG_MAMEINFO_R("# MAMEINFO.DAT");
-static std::string TAG_MESSINFO_R("# MESSINFO.DAT");
-static std::string TAG_SYSINFO_R("# This file was generated on");
-static std::string TAG_STORY_R("# version");
-static std::string TAG_COMMAND_SEPARATOR("-----------------------------------------------");
-
-//-------------------------------------------------
-// Statics
-//-------------------------------------------------
-datfile_manager::dataindex datfile_manager::m_histidx;
-datfile_manager::dataindex datfile_manager::m_mameidx;
-datfile_manager::dataindex datfile_manager::m_messidx;
-datfile_manager::dataindex datfile_manager::m_cmdidx;
-datfile_manager::dataindex datfile_manager::m_sysidx;
-datfile_manager::dataindex datfile_manager::m_storyidx;
-datfile_manager::drvindex datfile_manager::m_drvidx;
-datfile_manager::drvindex datfile_manager::m_messdrvidx;
-datfile_manager::drvindex datfile_manager::m_menuidx;
-datfile_manager::swindex datfile_manager::m_swindex;
-std::string datfile_manager::m_history_rev;
-std::string datfile_manager::m_mame_rev;
-std::string datfile_manager::m_mess_rev;
-std::string datfile_manager::m_sysinfo_rev;
-std::string datfile_manager::m_story_rev;
-bool datfile_manager::first_run = true;
-
-//-------------------------------------------------
-// ctor
-//-------------------------------------------------
-datfile_manager::datfile_manager(running_machine &machine) : m_machine(machine)
-{
- if (machine.ui().options().enabled_dats() && first_run)
- {
- first_run = false;
- if (parseopen("mameinfo.dat"))
- {
- init_mameinfo();
- parseclose();
- }
-
- if (parseopen("command.dat"))
- {
- init_command();
- parseclose();
- }
-
- if (parseopen("story.dat"))
- {
- init_storyinfo();
- parseclose();
- }
-
- if (parseopen("messinfo.dat"))
- {
- init_messinfo();
- parseclose();
- }
-
- if (parseopen("sysinfo.dat"))
- {
- init_sysinfo();
- parseclose();
- }
-
- if (parseopen("history.dat"))
- {
- init_history();
- parseclose();
- }
- }
-}
-
-//-------------------------------------------------
-// initialize sysinfo.dat index
-//-------------------------------------------------
-void datfile_manager::init_sysinfo()
-{
- int swcount = 0;
- int count = index_datafile(m_sysidx, swcount);
- osd_printf_verbose("Sysinfo.dat games found = %i\n", count);
- osd_printf_verbose("Rev = %s\n", m_sysinfo_rev.c_str());
-}
-
-//-------------------------------------------------
-// initialize story.dat index
-//-------------------------------------------------
-void datfile_manager::init_storyinfo()
-{
- int swcount = 0;
- int count = index_datafile(m_storyidx, swcount);
- osd_printf_verbose("Story.dat games found = %i\n", count);
-}
-
-//-------------------------------------------------
-// initialize history.dat index
-//-------------------------------------------------
-void datfile_manager::init_history()
-{
- int swcount = 0;
- int count = index_datafile(m_histidx, swcount);
- osd_printf_verbose("History.dat games found = %i\n", count);
- osd_printf_verbose("History.dat softwares found = %i\n", swcount);
- osd_printf_verbose("Rev = %s\n", m_history_rev.c_str());
-}
-
-//-------------------------------------------------
-// initialize mameinfo.dat index
-//-------------------------------------------------
-void datfile_manager::init_mameinfo()
-{
- int drvcount = 0;
- int count = index_mame_mess_info(m_mameidx, m_drvidx, drvcount);
- osd_printf_verbose("Mameinfo.dat games found = %i\n", count);
- osd_printf_verbose("Mameinfo.dat drivers found = %d\n", drvcount);
- osd_printf_verbose("Rev = %s\n", m_mame_rev.c_str());
-}
-
-//-------------------------------------------------
-// initialize messinfo.dat index
-//-------------------------------------------------
-void datfile_manager::init_messinfo()
-{
- int drvcount = 0;
- int count = index_mame_mess_info(m_messidx, m_messdrvidx, drvcount);
- osd_printf_verbose("Messinfo.dat games found = %i\n", count);
- osd_printf_verbose("Messinfo.dat drivers found = %d\n", drvcount);
- osd_printf_verbose("Rev = %s\n", m_mess_rev.c_str());
-}
-
-//-------------------------------------------------
-// initialize command.dat index
-//-------------------------------------------------
-void datfile_manager::init_command()
-{
- int swcount = 0;
- int count = index_datafile(m_cmdidx, swcount);
- osd_printf_verbose("Command.dat games found = %i\n", count);
-}
-
-bool datfile_manager::has_software(std::string &softlist, std::string &softname, std::string &parentname)
-{
- // Find software in software list index
- if (m_swindex.find(softlist) == m_swindex.end())
- return false;
-
- m_itemsiter = m_swindex[softlist].find(softname);
- if (m_itemsiter == m_swindex[softlist].end() && !parentname.empty())
- m_itemsiter = m_swindex[softlist].find(parentname);
-
- if (m_itemsiter == m_swindex[softlist].end())
- return false;
-
- return true;
-}
-//-------------------------------------------------
-// load software info
-//-------------------------------------------------
-void datfile_manager::load_software_info(std::string &softlist, std::string &buffer, std::string &softname, std::string &parentname)
-{
- // Load history text
- if (!m_swindex.empty() && parseopen("history.dat"))
- {
- // Find software in software list index
- if (!has_software(softlist, softname, parentname))
- return;
-
- long s_offset = (*m_itemsiter).second;
- char rbuf[64 * 1024];
- fseek(fp, s_offset, SEEK_SET);
- std::string readbuf;
- while (fgets(rbuf, 64 * 1024, fp) != nullptr)
- {
- readbuf = chartrimcarriage(rbuf);
-
- // end entry when a end tag is encountered
- if (readbuf == TAG_END)
- break;
-
- // add this string to the buffer
- buffer.append(readbuf).append("\n");
- }
- parseclose();
- }
-}
-
-//-------------------------------------------------
-// load_data_info
-//-------------------------------------------------
-void datfile_manager::load_data_info(const game_driver *drv, std::string &buffer, int type)
-{
- dataindex index_idx;
- drvindex driver_idx;
- std::string tag;
- std::string filename;
-
- switch (type)
- {
- case UI_HISTORY_LOAD:
- filename = "history.dat";
- tag = TAG_BIO;
- index_idx = m_histidx;
- break;
- case UI_MAMEINFO_LOAD:
- filename = "mameinfo.dat";
- tag = TAG_MAME;
- index_idx = m_mameidx;
- driver_idx = m_drvidx;
- break;
- case UI_SYSINFO_LOAD:
- filename = "sysinfo.dat";
- tag = TAG_BIO;
- index_idx = m_sysidx;
- break;
- case UI_MESSINFO_LOAD:
- filename = "messinfo.dat";
- tag = TAG_MAME;
- index_idx = m_messidx;
- driver_idx = m_messdrvidx;
- break;
- case UI_STORY_LOAD:
- filename = "story.dat";
- tag = TAG_STORY;
- index_idx = m_storyidx;
- break;
- }
-
- if (parseopen(filename.c_str()))
- {
- load_data_text(drv, buffer, index_idx, tag);
-
- // load driver info
- if (!driver_idx.empty())
- load_driver_text(drv, buffer, driver_idx, TAG_DRIVER);
-
- // cleanup mameinfo and sysinfo double line spacing
- if (tag == TAG_MAME || type == UI_SYSINFO_LOAD)
- strreplace(buffer, "\n\n", "\n");
-
- parseclose();
- }
-}
-
-//-------------------------------------------------
-// load a game text into the buffer
-//-------------------------------------------------
-void datfile_manager::load_data_text(const game_driver *drv, std::string &buffer, dataindex &idx, std::string &tag)
-{
- dataindex::iterator itemsiter = idx.find(drv);
- if (itemsiter == idx.end())
- {
- int cloneof = driver_list::non_bios_clone(*drv);
- if (cloneof == -1)
- return;
- else
- {
- const game_driver *c_drv = &driver_list::driver(cloneof);
- itemsiter = idx.find(c_drv);
- if (itemsiter == idx.end())
- return;
- }
- }
-
- long s_offset = (*itemsiter).second;
- fseek(fp, s_offset, SEEK_SET);
- char rbuf[64 * 1024];
- std::string readbuf;
- while (fgets(rbuf, 64 * 1024, fp) != nullptr)
- {
- readbuf = chartrimcarriage(rbuf);
-
- // end entry when a end tag is encountered
- if (readbuf == TAG_END)
- break;
-
- // continue if a specific tag is encountered
- if (readbuf == tag)
- continue;
-
- // add this string to the buffer
- buffer.append(readbuf).append("\n");
- }
-}
-
-//-------------------------------------------------
-// load a driver name and offset into an
-// indexed array
-//-------------------------------------------------
-void datfile_manager::load_driver_text(const game_driver *drv, std::string &buffer, drvindex &idx, std::string &tag)
-{
- std::string s(core_filename_extract_base(drv->source_file));
- drvindex::const_iterator index = idx.find(s);
-
- // if driver not found, return
- if (index == idx.end())
- return;
-
- buffer.append("\n--- DRIVER INFO ---\n").append("Driver: ").append(s).append("\n\n");
- long s_offset = (*index).second;
- fseek(fp, s_offset, SEEK_SET);
- char rbuf[64 * 1024];
- std::string readbuf;
- while (fgets(rbuf, 64 * 1024, fp) != nullptr)
- {
- readbuf = chartrimcarriage(rbuf);
-
- // end entry when a end tag is encountered
- if (readbuf == TAG_END)
- break;
-
- // continue if a specific tag is encountered
- if (readbuf == tag)
- continue;
-
- // add this string to the buffer
- buffer.append(readbuf).append("\n");
- }
-}
-
-//-------------------------------------------------
-// load a game name and offset into an
-// indexed array (mameinfo)
-//-------------------------------------------------
-int datfile_manager::index_mame_mess_info(dataindex &index, drvindex &index_drv, int &drvcount)
-{
- std::string name;
- size_t foundtag;
- size_t t_mame = TAG_MAMEINFO_R.size();
- size_t t_mess = TAG_MESSINFO_R.size();
- size_t t_info = TAG_INFO.size();
-
- char rbuf[64 * 1024];
- std::string readbuf, xid;
- while (fgets(rbuf, 64 * 1024, fp) != nullptr)
- {
- readbuf = chartrimcarriage(rbuf);
- if (m_mame_rev.empty() && readbuf.compare(0, t_mame, TAG_MAMEINFO_R) == 0)
- {
- size_t found = readbuf.find(" ", t_mame + 1);
- m_mame_rev = readbuf.substr(t_mame + 1, found - t_mame);
- }
- else if (m_mess_rev.empty() && (foundtag = readbuf.find(TAG_MESSINFO_R)) != std::string::npos)
- {
- size_t found = readbuf.find(" ", foundtag + t_mess + 1);
- m_mess_rev = readbuf.substr(foundtag + t_mess + 1, found - t_mess - foundtag);
- }
- else if (readbuf.compare(0, t_info, TAG_INFO) == 0)
- {
- // TAG_INFO
- fgets(rbuf, 64 * 1024, fp);
- xid = chartrimcarriage(rbuf);
- name = readbuf.substr(t_info + 1);
- if (xid == TAG_MAME)
- {
- // validate driver
- int game_index = driver_list::find(name.c_str());
- if (game_index != -1)
- index.emplace(&driver_list::driver(game_index), ftell(fp));
- }
- else if (xid == TAG_DRIVER)
- {
- index_drv.emplace(name, ftell(fp));
- drvcount++;
- }
- }
- }
- return index.size();
-}
-
-//-------------------------------------------------
-// load a game name and offset into an
-// indexed array
-//-------------------------------------------------
-int datfile_manager::index_datafile(dataindex &index, int &swcount)
-{
- std::string readbuf, name;
- size_t t_hist = TAG_HISTORY_R.size();
- size_t t_story = TAG_STORY_R.size();
- size_t t_sysinfo = TAG_SYSINFO_R.size();
- size_t t_info = TAG_INFO.size();
- size_t t_bio = TAG_BIO.size();
- char rbuf[64 * 1024];
- while (fgets(rbuf, 64 * 1024, fp) != nullptr)
- {
- readbuf = chartrimcarriage(rbuf);
-
- if (m_history_rev.empty() && readbuf.compare(0, t_hist, TAG_HISTORY_R) == 0)
- {
- size_t found = readbuf.find(" ", t_hist + 1);
- m_history_rev = readbuf.substr(t_hist + 1, found - t_hist);
- }
- else if (m_sysinfo_rev.empty() && readbuf.compare(0, t_sysinfo, TAG_SYSINFO_R) == 0)
- {
- size_t found = readbuf.find(".", t_sysinfo + 1);
- m_sysinfo_rev = readbuf.substr(t_sysinfo + 1, found - t_sysinfo);
- }
- else if (m_story_rev.empty() && readbuf.compare(0, t_story, TAG_STORY_R) == 0)
- m_story_rev = readbuf.substr(t_story + 1);
-
- // TAG_INFO identifies the driver
- else if (readbuf.compare(0, t_info, TAG_INFO) == 0)
- {
- int curpoint = t_info + 1;
- int ends = readbuf.size();
- while (curpoint < ends)
- {
- // search for comma
- size_t found = readbuf.find(",", curpoint);
-
- // found it
- if (found != std::string::npos)
- {
- // copy data and validate driver
- name = readbuf.substr(curpoint, found - curpoint);
-
- // validate driver
- int game_index = driver_list::find(name.c_str());
- if (game_index != -1)
- index.emplace(&driver_list::driver(game_index), ftell(fp));
-
- // update current point
- curpoint = ++found;
- }
- // if comma not found, copy data while until reach the end of string
- else if (curpoint < ends)
- {
- name = readbuf.substr(curpoint);
- int game_index = driver_list::find(name.c_str());
- if (game_index != -1)
- index.emplace(&driver_list::driver(game_index), ftell(fp));
-
- // update current point
- curpoint = ends;
- }
- }
- }
- // search for software info
- else if (!readbuf.empty() && readbuf[0] == DATAFILE_TAG[0])
- {
- fgets(rbuf, 64 * 1024, fp);
- std::string readbuf_2(chartrimcarriage(rbuf));
-
- // TAG_BIO identifies software list
- if (readbuf_2.compare(0, t_bio, TAG_BIO) == 0)
- {
- size_t eq_sign = readbuf.find("=");
- std::string s_list(readbuf.substr(1, eq_sign - 1));
- std::string s_roms(readbuf.substr(eq_sign + 1));
- int ends = s_list.size();
- int curpoint = 0;
-
- while (curpoint < ends)
- {
- size_t found = s_list.find(",", curpoint);
-
- // found it
- if (found != std::string::npos)
- {
- name = s_list.substr(curpoint, found - curpoint);
- curpoint = ++found;
- }
- else
- {
- name = s_list;
- curpoint = ends;
- }
-
- // search for a software list in the index, if not found then allocates
- std::string lname(name);
- int cpoint = 0;
- int cends = s_roms.size();
-
- while (cpoint < cends)
- {
- // search for comma
- size_t found = s_roms.find(",", cpoint);
-
- // found it
- if (found != std::string::npos)
- {
- // copy data
- name = s_roms.substr(cpoint, found - cpoint);
-
- // add a SoftwareItem
- m_swindex[lname].emplace(name, ftell(fp));
-
- // update current point
- cpoint = ++found;
- swcount++;
- }
- else
- {
- // if reach the end, bail out
- if (s_roms[cpoint] == '\r' || s_roms[cpoint] == '\n')
- break;
-
- // copy data
- name = s_roms.substr(cpoint);
-
- // add a SoftwareItem
- m_swindex[lname].emplace(name, ftell(fp));
-
- // update current point
- cpoint = cends;
- swcount++;
- }
- }
- }
- }
- }
- }
- return index.size();
-}
-
-//---------------------------------------------------------
-// parseopen - Open up file for reading
-//---------------------------------------------------------
-bool datfile_manager::parseopen(const char *filename)
-{
- // MAME core file parsing functions fail in recognizing UNICODE chars in UTF-8 without BOM,
- // so it's better and faster use standard C fileio functions.
-
- emu_file file(machine().ui().options().history_path(), OPEN_FLAG_READ);
- if (file.open(filename) != FILERR_NONE)
- return false;
-
- m_fullpath = file.fullpath();
- file.close();
- fp = fopen(m_fullpath.c_str(), "rb");
-
- fgetc(fp);
- fseek(fp, 0, SEEK_SET);
- return true;
-}
-
-//-------------------------------------------------
-// create the menu index
-//-------------------------------------------------
-void datfile_manager::index_menuidx(const game_driver *drv, dataindex &idx, drvindex &index)
-{
- dataindex::iterator itemsiter = idx.find(drv);
- if (itemsiter == idx.end())
- {
- int cloneof = driver_list::non_bios_clone(*drv);
- if (cloneof == -1)
- return;
- else
- {
- const game_driver *c_drv = &driver_list::driver(cloneof);
- itemsiter = idx.find(c_drv);
- if (itemsiter == idx.end())
- return;
- }
- }
-
- // seek to correct point in datafile
- long s_offset = (*itemsiter).second;
- fseek(fp, s_offset, SEEK_SET);
- size_t tinfo = TAG_INFO.size();
- char rbuf[64 * 1024];
- std::string readbuf;
- while (fgets(rbuf, 64 * 1024, fp) != nullptr)
- {
- readbuf = chartrimcarriage(rbuf);
-
- if (!core_strnicmp(TAG_INFO.c_str(), readbuf.c_str(), tinfo))
- break;
-
- // TAG_COMMAND identifies the driver
- if (readbuf == TAG_COMMAND)
- {
- fgets(rbuf, 64 * 1024, fp);
- chartrimcarriage(rbuf);
- index.emplace(rbuf, ftell(fp));
- }
- }
-}
-
-//-------------------------------------------------
-// load command text into the buffer
-//-------------------------------------------------
-void datfile_manager::load_command_info(std::string &buffer, std::string &sel)
-{
- if (parseopen("command.dat"))
- {
- // open and seek to correct point in datafile
- long offset = m_menuidx.at(sel);
- fseek(fp, offset, SEEK_SET);
- char rbuf[64 * 1024];
- std::string readbuf;
- while (fgets(rbuf, 64 * 1024, fp) != nullptr)
- {
- readbuf = chartrimcarriage(rbuf);
-
- // skip separator lines
- if (readbuf == TAG_COMMAND_SEPARATOR)
- continue;
-
- // end entry when a tag is encountered
- if (readbuf == TAG_END)
- break;
-
- // add this string to the buffer
- buffer.append(readbuf).append("\n");;
- }
- parseclose();
- }
-}
-
-//-------------------------------------------------
-// load submenu item for command.dat
-//-------------------------------------------------
-void datfile_manager::command_sub_menu(const game_driver *drv, std::vector<std::string> &menuitems)
-{
- if (parseopen("command.dat"))
- {
- m_menuidx.clear();
- index_menuidx(drv, m_cmdidx, m_menuidx);
- for (auto & elem : m_menuidx)
- menuitems.push_back(elem.first);
- parseclose();
- }
-} \ No newline at end of file
diff --git a/src/emu/ui/datfile.h b/src/emu/ui/datfile.h
deleted file mode 100644
index 8002a26daf4..00000000000
--- a/src/emu/ui/datfile.h
+++ /dev/null
@@ -1,92 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Dankan1890
-/***************************************************************************
-
- ui/datfile.h
-
- UI DATs manager.
-
-***************************************************************************/
-
-#pragma once
-
-#ifndef __UI_DATFILE_H__
-#define __UI_DATFILE_H__
-
-//-------------------------------------------------
-// Datafile Manager
-//-------------------------------------------------
-class datfile_manager
-{
-public:
- // construction/destruction
- datfile_manager(running_machine &machine);
-
- // getters
- running_machine &machine() const { return m_machine; }
-
- // actions
- void load_data_info(const game_driver *drv, std::string &buffer, int type);
- void load_command_info(std::string &buffer, std::string &sel);
- void load_software_info(std::string &softlist, std::string &buffer, std::string &softname, std::string &parentname);
- void command_sub_menu(const game_driver *drv, std::vector<std::string> &menuitems);
- void reset_run() { first_run = true; }
- bool has_software(std::string &softlist, std::string &softname, std::string &parentname);
-
- std::string rev_history() const { return m_history_rev; }
- std::string rev_mameinfo() const { return m_mame_rev; }
- std::string rev_messinfo() const { return m_mess_rev; }
- std::string rev_sysinfo() const { return m_sysinfo_rev; }
- std::string rev_storyinfo() const { return m_story_rev; }
-
- bool has_history(const game_driver *driver) { return (m_histidx.find(driver) != m_histidx.end()); }
- bool has_mameinfo(const game_driver *driver) { return (m_mameidx.find(driver) != m_mameidx.end()); }
- bool has_messinfo(const game_driver *driver) { return (m_messidx.find(driver) != m_messidx.end()); }
- bool has_command(const game_driver *driver) { return (m_cmdidx.find(driver) != m_cmdidx.end()); }
- bool has_sysinfo(const game_driver *driver) { return (m_sysidx.find(driver) != m_sysidx.end()); }
- bool has_story(const game_driver *driver) { return (m_storyidx.find(driver) != m_storyidx.end()); }
-
- bool has_data(const game_driver *d)
- {
- return (has_history(d) || has_mameinfo(d) || has_messinfo(d) || has_command(d) || has_sysinfo(d) || has_story(d));
- }
-private:
- using drvindex = std::unordered_map<std::string, long>;
- using dataindex = std::unordered_map<const game_driver *, long>;
- using swindex = std::unordered_map<std::string, drvindex>;
-
- // global index
- static dataindex m_histidx, m_mameidx, m_messidx, m_cmdidx, m_sysidx, m_storyidx;
- static drvindex m_drvidx, m_messdrvidx, m_menuidx;
- static swindex m_swindex;
-
- // internal helpers
- void init_history();
- void init_mameinfo();
- void init_messinfo();
- void init_command();
- void init_sysinfo();
- void init_storyinfo();
-
- // file open/close/seek
- bool parseopen(const char *filename);
- void parseclose() { if (fp != nullptr) fclose(fp); }
-
- int index_mame_mess_info(dataindex &index, drvindex &index_drv, int &drvcount);
- int index_datafile(dataindex &index, int &swcount);
- void index_menuidx(const game_driver *drv, dataindex &idx, drvindex &index);
- drvindex::iterator m_itemsiter;
-
- void load_data_text(const game_driver *drv, std::string &buffer, dataindex &idx, std::string &tag);
- void load_driver_text(const game_driver *drv, std::string &buffer, drvindex &idx, std::string &tag);
-
- // internal state
- running_machine &m_machine; // reference to our machine
- std::string m_fullpath;
- static std::string m_history_rev, m_mame_rev, m_mess_rev, m_sysinfo_rev, m_story_rev;
- FILE *fp = nullptr;
- static bool first_run;
-};
-
-
-#endif /* __UI_DATFILE_H__ */
diff --git a/src/emu/ui/datmenu.cpp b/src/emu/ui/datmenu.cpp
deleted file mode 100644
index 5e2d574edc0..00000000000
--- a/src/emu/ui/datmenu.cpp
+++ /dev/null
@@ -1,303 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Dankan1890
-/*********************************************************************
-
- ui/datmenu.cpp
-
- Internal UI user interface.
-
-*********************************************************************/
-
-#include "emu.h"
-#include "ui/ui.h"
-#include "ui/menu.h"
-#include "drivenum.h"
-#include "rendfont.h"
-#include "ui/datfile.h"
-#include "ui/datmenu.h"
-#include "ui/utils.h"
-#include "softlist.h"
-
-//-------------------------------------------------
-// ctor / dtor
-//-------------------------------------------------
-
-ui_menu_dats_view::ui_menu_dats_view(running_machine &machine, render_container *container, const game_driver *driver) : ui_menu(machine, container)
-{
- image_interface_iterator iter(machine.root_device());
- for (device_image_interface *image = iter.first(); image != nullptr; image = iter.next())
- {
- if (image->filename())
- {
- m_list = strensure(image->software_list_name());
- m_short = strensure(image->software_entry()->shortname());
- m_long = strensure(image->software_entry()->longname());
- m_parent = strensure(image->software_entry()->parentname());
- }
- }
- m_driver = (driver == nullptr) ? &machine.system() : driver;
-
- init_items();
-}
-
-//-------------------------------------------------
-// ctor
-//-------------------------------------------------
-
-ui_menu_dats_view::ui_menu_dats_view(running_machine &machine, render_container *container, ui_software_info *swinfo, const game_driver *driver) : ui_menu(machine, container)
-{
- m_list = swinfo->listname;
- m_short = swinfo->shortname;
- m_long = swinfo->longname;
- m_parent = swinfo->parentname;
- m_driver = (driver == nullptr) ? &machine.system() : driver;
- m_swinfo = swinfo;
-
- issoft = true;
-
- if (machine.datfile().has_software(m_list, m_short, m_parent))
- m_items_list.emplace_back("Software History", UI_HISTORY_LOAD, machine.datfile().rev_history());
- if (swinfo && !swinfo->usage.empty())
- m_items_list.emplace_back("Software Usage", 0, "");
-}
-
-//-------------------------------------------------
-// dtor
-//-------------------------------------------------
-
-ui_menu_dats_view::~ui_menu_dats_view()
-{
-}
-
-//-------------------------------------------------
-// handle
-//-------------------------------------------------
-
-void ui_menu_dats_view::handle()
-{
- const ui_menu_event *m_event = process(MENU_FLAG_UI_DATS);
- if (m_event != nullptr)
- {
- if (m_event->iptkey == IPT_UI_LEFT && actual > 0)
- {
- actual--;
- reset(UI_MENU_RESET_SELECT_FIRST);
- }
-
- if (m_event->iptkey == IPT_UI_RIGHT && actual < m_items_list.size() - 1)
- {
- actual++;
- reset(UI_MENU_RESET_SELECT_FIRST);
- }
- }
-}
-
-//-------------------------------------------------
-// populate
-//-------------------------------------------------
-
-void ui_menu_dats_view::populate()
-{
- machine().pause();
- if (!issoft)
- get_data();
- else
- get_data_sw();
-
- item_append(MENU_SEPARATOR_ITEM, nullptr, (MENU_FLAG_UI_DATS | MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW), nullptr);
- customtop = 2.0f * machine().ui().get_line_height() + 4.0f * UI_BOX_TB_BORDER;
- custombottom = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
- machine().resume();
-}
-
-//-------------------------------------------------
-// perform our special rendering
-//-------------------------------------------------
-
-void ui_menu_dats_view::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
-{
- ui_manager &mui = machine().ui();
- float maxwidth = origx2 - origx1;
- float width;
- std::string driver;
-
- if (issoft)
- driver = m_swinfo->longname;
- else
- driver = m_driver->description;
-
- mui.draw_text_full(container, driver.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += 2 * UI_BOX_LR_BORDER;
- maxwidth = MAX(origx2 - origx1, width);
-
- // compute our bounds
- float x1 = 0.5f - 0.5f * maxwidth;
- float x2 = x1 + maxwidth;
- float y1 = origy1 - top;
- float y2 = origy1 - 2.0f * UI_BOX_TB_BORDER - mui.get_line_height();
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- mui.draw_text_full(container, driver.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
-
-
- // take off the borders
- x1 -= UI_BOX_LR_BORDER;
- x2 += UI_BOX_LR_BORDER;
- y1 -= UI_BOX_TB_BORDER;
-
- maxwidth = 0;
- for (auto & elem : m_items_list)
- {
- mui.draw_text_full(container, elem.label.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- maxwidth += width;
- }
-
- float space = (1.0f - maxwidth) / (m_items_list.size() * 2);
-
- // compute our bounds
- y1 = y2 + UI_BOX_TB_BORDER;
- y2 += mui.get_line_height() + 2.0f * UI_BOX_TB_BORDER;
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR);
-
- // take off the borders
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // draw the text within it
- int x = 0;
- for (auto & elem : m_items_list)
- {
- x1 += space;
- rgb_t fcolor = (actual == x) ? rgb_t(0xff, 0xff, 0xff, 0x00) : UI_TEXT_COLOR;
- rgb_t bcolor = (actual == x) ? rgb_t(0xff, 0xff, 0xff, 0xff) : UI_TEXT_BG_COLOR;
- mui.draw_text_full(container, elem.label.c_str(), x1, y1, 1.0f, JUSTIFY_LEFT, WRAP_NEVER,
- DRAW_NONE, fcolor, bcolor, &width, nullptr);
- if (bcolor != UI_TEXT_BG_COLOR)
- mui.draw_textured_box(container, x1 - (space / 2), y1, x1 + width + (space / 2), y2, bcolor, rgb_t(255, 43, 43, 43),
- hilight_main_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE));
-
- mui.draw_text_full(container, elem.label.c_str(), x1, y1, 1.0f, JUSTIFY_LEFT, WRAP_NEVER,
- DRAW_NORMAL, fcolor, bcolor, &width, nullptr);
- x1 += width + space;
- ++x;
- }
-
- // bottom
- std::string revision;
- revision.assign("Revision: ").append(m_items_list[actual].revision);
- mui.draw_text_full(container, revision.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += 2 * UI_BOX_LR_BORDER;
- maxwidth = MAX(origx2 - origx1, width);
-
- // compute our bounds
- x1 = 0.5f - 0.5f * maxwidth;
- x2 = x1 + maxwidth;
- y1 = origy2 + UI_BOX_TB_BORDER;
- y2 = origy2 + bottom;
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // draw the text within it
- mui.draw_text_full(container, revision.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
-}
-
-//-------------------------------------------------
-// load data from DATs
-//-------------------------------------------------
-
-void ui_menu_dats_view::get_data()
-{
- std::vector<int> xstart;
- std::vector<int> xend;
- std::string buffer;
- std::vector<std::string> m_item;
- if (m_items_list[actual].option == UI_COMMAND_LOAD)
- {
- machine().datfile().command_sub_menu(m_driver, m_item);
- if (!m_item.empty())
- {
- for (size_t x = 0; x < m_item.size(); ++x)
- {
- std::string t_buffer;
- buffer.append(m_item[x]).append("\n");
- machine().datfile().load_command_info(t_buffer, m_item[x]);
- if (!t_buffer.empty())
- buffer.append(t_buffer).append("\n");
- }
- convert_command_glyph(buffer);
- }
- }
- else
- machine().datfile().load_data_info(m_driver, buffer, m_items_list[actual].option);
-
- int totallines = machine().ui().wrap_text(container, buffer.c_str(), 0.0f, 0.0f, 1.0f - (4.0f * UI_BOX_LR_BORDER), xstart, xend);
- for (int x = 0; x < totallines; ++x)
- {
- std::string tempbuf(buffer.substr(xstart[x], xend[x] - xstart[x]));
- item_append(tempbuf.c_str(), nullptr, (MENU_FLAG_UI_DATS | MENU_FLAG_DISABLE), (void *)(FPTR)(x + 1));
-
- }
-}
-
-void ui_menu_dats_view::get_data_sw()
-{
- std::vector<int> xstart;
- std::vector<int> xend;
- std::string buffer;
- std::vector<std::string> m_item;
- if (m_items_list[actual].option == 0)
- buffer = m_swinfo->usage;
- else
- {
- if (m_swinfo->startempty == 1)
- machine().datfile().load_data_info(m_swinfo->driver, buffer, UI_HISTORY_LOAD);
- else
- machine().datfile().load_software_info(m_swinfo->listname, buffer, m_swinfo->shortname, m_swinfo->parentname);
- }
-
- int totallines = machine().ui().wrap_text(container, buffer.c_str(), 0.0f, 0.0f, 1.0f - (4.0f * UI_BOX_LR_BORDER), xstart, xend);
- for (int x = 0; x < totallines; ++x)
- {
- std::string tempbuf(buffer.substr(xstart[x], xend[x] - xstart[x]));
- item_append(tempbuf.c_str(), nullptr, (MENU_FLAG_UI_DATS | MENU_FLAG_DISABLE), (void *)(FPTR)(x + 1));
-
- }
-}
-
-void ui_menu_dats_view::init_items()
-{
- datfile_manager &datfile = machine().datfile();
- if (datfile.has_history(m_driver))
- m_items_list.emplace_back("History", UI_HISTORY_LOAD, datfile.rev_history());
- if (datfile.has_mameinfo(m_driver))
- m_items_list.emplace_back("Mameinfo", UI_MAMEINFO_LOAD, datfile.rev_mameinfo());
- if (datfile.has_messinfo(m_driver))
- m_items_list.emplace_back("Messinfo", UI_MESSINFO_LOAD, datfile.rev_messinfo());
- if (datfile.has_sysinfo(m_driver))
- m_items_list.emplace_back("Sysinfo", UI_SYSINFO_LOAD, datfile.rev_sysinfo());
- if (datfile.has_story(m_driver))
- m_items_list.emplace_back("Mamescore", UI_STORY_LOAD, datfile.rev_storyinfo());
- if (datfile.has_command(m_driver))
- m_items_list.emplace_back("Command", UI_COMMAND_LOAD, "");
-}
-
diff --git a/src/emu/ui/datmenu.h b/src/emu/ui/datmenu.h
deleted file mode 100644
index f799e5fa7d0..00000000000
--- a/src/emu/ui/datmenu.h
+++ /dev/null
@@ -1,52 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Dankan1890
-/***************************************************************************
-
- ui/datmenu.h
-
- Internal UI user interface.
-
-
-***************************************************************************/
-
-#pragma once
-
-#ifndef __UI_DATMENU_H__
-#define __UI_DATMENU_H__
-
-struct ui_software_info;
-
-//-------------------------------------------------
-// class dats menu
-//-------------------------------------------------
-
-class ui_menu_dats_view : public ui_menu
-{
-public:
- ui_menu_dats_view(running_machine &machine, render_container *container, ui_software_info *swinfo, const game_driver *driver = nullptr);
- ui_menu_dats_view(running_machine &machine, render_container *container, const game_driver *driver = nullptr);
- virtual ~ui_menu_dats_view();
- virtual void populate() override;
- virtual void handle() override;
- virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
-
-private:
- int actual;
- const game_driver *m_driver;
- ui_software_info *m_swinfo;
- std::string m_list, m_short, m_long, m_parent;
- void get_data();
- void get_data_sw();
- void init_items();
- bool issoft;
- struct list_items
- {
- list_items(std::string l, int i, std::string rev) { label = l; option = i; revision = rev; }
- std::string label;
- int option;
- std::string revision;
- };
- std::vector<list_items> m_items_list;
-};
-
-#endif /* __UI_DATMENU_H__ */
diff --git a/src/emu/ui/defimg.h b/src/emu/ui/defimg.h
deleted file mode 100644
index 43b334b8f93..00000000000
--- a/src/emu/ui/defimg.h
+++ /dev/null
@@ -1,261 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Dankan1890
-static const UINT32 no_avail_bmp[] =
-{
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x01231f20, 0x04231f20, 0x11231f20, 0x2e231f20, 0x62231f20, 0x8e231f20, 0xb4231f20, 0xd4231f20, 0xe5231f20, 0xf2231f20, 0xfd231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xfd231f20, 0xf2231f20, 0xe5231f20, 0xd4231f20, 0xb4231f20, 0x8e231f20, 0x62231f20, 0x2e231f20, 0x11231f20, 0x04231f20, 0x01231f20, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00231f20, 0x00000000, 0x00000000, 0x06231f20, 0x1c231f20, 0x49231f20, 0x8c231f20, 0xc4231f20, 0xf0231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf0231f20, 0xc4231f20, 0x8c231f20, 0x49231f20, 0x1c231f20, 0x06231f20, 0x00000000, 0x00000000, 0x00231f20, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x04231f20, 0x32231f20, 0x7b231f20, 0xc2231f20, 0xf3231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf3231f20, 0xc2231f20, 0x7b231f20, 0x32231f20, 0x04231f20, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x30231f20, 0x8e231f20, 0xd6231f20, 0xfd231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xfd231f20, 0xd6231f20, 0x8e231f20, 0x30231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x0e231f20, 0x73231f20, 0xd8231f20, 0xfb231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xfb231f20, 0xd8231f20, 0x73231f20, 0x0e231f20, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00231f20, 0x00000000, 0x29231f20, 0xb6231f20, 0xfb231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xfb231f20, 0xb6231f20, 0x29231f20, 0x00000000, 0x00231f20, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x03231f20, 0x4f231f20, 0xdd231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xdd231f20, 0x4f231f20, 0x03231f20, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x0a231f20, 0x72231f20, 0xf4231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf4231f20, 0x72231f20, 0x0a231f20, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x10231f20, 0x84231f20, 0xf5231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1a1b, 0xff1e191a, 0xff1e1a1b, 0xff211c1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf5231f20, 0x84231f20, 0x10231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x0a231f20, 0x84231f20, 0xf5231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff1c1718, 0xff1b1718, 0xff1b1718, 0xff1b1718, 0xff1d191a, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff1b1718, 0xff1b1718, 0xff1c1819, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff393637, 0xff7c7a7a, 0xff827f80, 0xff7d7b7c, 0xff494647, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf5231f20, 0x84231f20, 0x0a231f20, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x03231f20, 0x74231f20, 0xf5231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff3b3839, 0xff585656, 0xff5a5757, 0xff5a5757, 0xff5b5858, 0xff4b4949, 0xff272325, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff464243, 0xff5a5858, 0xff5a5758, 0xff565253, 0xff312d2e, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff575355, 0xffececec, 0xfff7f7f7, 0xffededed, 0xff7a7878, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf5231f20, 0x74231f20, 0x03231f20, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x51231f20, 0xf4231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff807d7e, 0xfff1f1f1, 0xfff6f6f6, 0xfff6f6f6, 0xfff9f9f9, 0xffe1e0e0, 0xff565354, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xffa9a7a7, 0xfff6f6f6, 0xfff6f6f6, 0xffe6e6e6, 0xff575455, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585556, 0xfff5f5f5, 0xffffffff, 0xfff5f5f5, 0xff7d7b7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf4231f20, 0x51231f20, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x2a231f20, 0xde231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff848283, 0xfff7f7f7, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffa6a4a5, 0xff2c2729, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xffafadad, 0xfffdfdfd, 0xffffffff, 0xffedecec, 0xff5a5758, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff595556, 0xfff6f6f6, 0xffffffff, 0xfff6f6f6, 0xff7e7c7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xde231f20, 0x2a231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x0e231f20, 0xb5231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff0f0f0, 0xff585556, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xffafadad, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff524f50, 0xffdbdbdb, 0xffe5e4e5, 0xffdcdbdb, 0xff737071, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xb5231f20, 0x0e231f20, 0x00000000, 0x00231f20, 0x00000000, 0x00000000,
- 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x73231f20, 0xfb231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffb4b3b4, 0xff282425, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xffafadad, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff2e2b2c, 0xff4f4c4d, 0xff524f50, 0xff504d4e, 0xff363334, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xfb231f20, 0x73231f20, 0x00000000, 0x00000000, 0x00231f20, 0x00000000,
- 0x00000000, 0x00231f20, 0x00000000, 0x30231f20, 0xd8231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfffdfdfd, 0xffededed, 0xfffdfdfd, 0xffffffff, 0xfff9fafa, 0xff646162, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xffafadad, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1a1b, 0xff1e1a1b, 0xff1e1a1b, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xd8231f20, 0x30231f20, 0x00000000, 0x00231f20, 0x00000000,
- 0x00231f20, 0x00000000, 0x05231f20, 0x8e231f20, 0xfa231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xffadacac, 0xffdbdbdb, 0xffffffff, 0xffffffff, 0xffc8c7c7, 0xff2b2628, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xffafadad, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff1c1718, 0xff1a1617, 0xff1b1718, 0xff1b1718, 0xff1a1617, 0xff1d191a, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1d191a, 0xff1a1617, 0xff1b1718, 0xff1a1617, 0xff1b1718, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1c1819, 0xff1a1517, 0xff1b1718, 0xff1a1517, 0xff1c1719, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff1c1819, 0xff191516, 0xff1a1617, 0xff1a1617, 0xff191516, 0xff1b1718, 0xff1f1b1c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1c1819, 0xff1a1617, 0xff1b1718, 0xff1a1617, 0xff1a1617, 0xff1f1b1c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff1d191a, 0xff1a1516, 0xff1a1617, 0xff1b1718, 0xff191516, 0xff1b1718, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xfa231f20, 0x8e231f20, 0x05231f20, 0x00000000, 0x00231f20,
- 0x00000000, 0x00000000, 0x32231f20, 0xd8231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff7f7f7, 0xff858384, 0xff949393, 0xfffdfefd, 0xffffffff, 0xfffdfdfd, 0xff767475, 0xff1c1718, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xffafadad, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff252122, 0xff413e3f, 0xff6e6c6c, 0xff8f8d8d, 0xff9c9b9b, 0xff9b9999, 0xff898787, 0xff646061, 0xff383435, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff292526, 0xff393637, 0xff3b3839, 0xff3a3738, 0xff2c292a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231e1f, 0xff2f2b2c, 0xff3a3738, 0xff3b3839, 0xff393536, 0xff282425, 0xff221e1f, 0xff201c1d, 0xff302d2e, 0xff5f5c5d, 0xff8a8788, 0xff9b9a9a, 0xff989797, 0xff7c7a7a, 0xff454243, 0xff231f20, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff373334, 0xff666465, 0xff8e8c8c, 0xff9b999a, 0xff918f8f, 0xff716f6f, 0xff3b3839, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff231f20, 0xff302c2d, 0xff4e4a4b, 0xff706e6f, 0xff8b898a, 0xff999797, 0xff999797, 0xff8e8c8d, 0xff767374, 0xff494646, 0xff2b2728, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201c1d, 0xff332f30, 0xff636061, 0xff8d8b8b, 0xff9c9a9b, 0xff989697, 0xff807f7f, 0xff524f4f, 0xff2a2627, 0xff211d1e, 0xff221e1f, 0xff2e2a2b, 0xff3b3738, 0xff3b3839, 0xff383536, 0xff292526, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff231f20, 0xff393636, 0xff646162, 0xff878485, 0xff989697, 0xff9d9b9b, 0xff908e8e, 0xff716e6e, 0xff423f3f, 0xff252122, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xd8231f20, 0x32231f20, 0x00000000, 0x00000000,
- 0x00000000, 0x06231f20, 0x7c231f20, 0xfc231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xff7b797a, 0xff4a4647, 0xffdedede, 0xffffffff, 0xffffffff, 0xffd1d0d1, 0xff363233, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xffafadad, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff252122, 0xff504e4f, 0xffaaa9a9, 0xffececed, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe1e0e1, 0xff949293, 0xff403c3d, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1718, 0xff555253, 0xffe9e9e9, 0xfff4f4f4, 0xffebebeb, 0xff787676, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff8b898a, 0xffeff0f0, 0xfff3f3f3, 0xffdddddd, 0xff4c4a4a, 0xff242021, 0xff716f6f, 0xffd4d2d3, 0xfffefefe, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff0f0f0, 0xff9c9b9c, 0xff393536, 0xff201c1d, 0xff231f20, 0xff211d1e, 0xff322f30, 0xff848282, 0xffe0dede, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff838182, 0xff2f2b2c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff2b2728, 0xff605d5e, 0xffa2a1a1, 0xffd8d7d7, 0xfff7f7f7, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff6f5f5, 0xffc4c3c3, 0xff6c696a, 0xff2d292a, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff2f2b2c, 0xff7c797a, 0xffd9d8d8, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff8f7f7, 0xffbdbcbc, 0xff5a5757, 0xff1f1a1b, 0xff817e7f, 0xfff2f1f1, 0xfff3f2f2, 0xffdedede, 0xff524e4f, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff242021, 0xff474344, 0xff9a9899, 0xffe3e2e2, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffeeedee, 0xffaaa9a9, 0xff4e4b4b, 0xff231f20, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xfc231f20, 0x7c231f20, 0x06231f20, 0x00000000,
- 0x00000000, 0x1c231f20, 0xc3231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xff7e7c7d, 0xff1d181a, 0xff9a9898, 0xfffbfbfb, 0xffffffff, 0xfff9f9f9, 0xff848182, 0xff1f1b1c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xffafadad, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff272324, 0xff7d7a7b, 0xffe9e9e9, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffcfcfc, 0xfffdfcfc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffd4d3d4, 0xff605d5e, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff595656, 0xfff7f7f7, 0xffffffff, 0xfff7f7f7, 0xff7e7c7d, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff939191, 0xfffbfbfb, 0xffffffff, 0xffeae9e9, 0xff5d5a5b, 0xff8c8a8a, 0xfff8f7f7, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffbab9b9, 0xff3b3738, 0xff1b1718, 0xff3c3939, 0xffb3b2b2, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffefe, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffdfdfd, 0xff959293, 0xff2b2728, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff484445, 0xffe6e6e6, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffdfefe, 0xfffafafa, 0xfffcfbfb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff8f8f8, 0xff9d9b9b, 0xff343031, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff383435, 0xffa7a6a6, 0xfffefdfd, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffdfdfd, 0xfff8f8f8, 0xfffcfcfc, 0xffffffff, 0xffffffff, 0xffe7e7e7, 0xff696767, 0xff8b8989, 0xfffcfcfc, 0xffffffff, 0xffeaeaea, 0xff555253, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff262222, 0xff727071, 0xffdedede, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffcfcfc, 0xfffbfbfb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe5e4e4, 0xff757273, 0xff252122, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xc3231f20, 0x1c231f20, 0x00000000,
- 0x01231f20, 0x49231f20, 0xf4231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xff807d7e, 0xff161213, 0xff474444, 0xffdfdedf, 0xffffffff, 0xffffffff, 0xffd1d0d0, 0xff413d3e, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xffafadad, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff211d1e, 0xff828080, 0xfff4f3f3, 0xffffffff, 0xffffffff, 0xfffcfcfc, 0xffcecdcd, 0xff9c9a9a, 0xff868585, 0xff8a8787, 0xffa6a4a4, 0xffdddcdc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe0dfe0, 0xff5f5c5d, 0xff1f1b1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585556, 0xfff5f5f5, 0xffffffff, 0xfff5f5f5, 0xff7d7b7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff929090, 0xfffafafa, 0xffffffff, 0xffececec, 0xffadabac, 0xfff2f2f2, 0xffffffff, 0xffd3d2d2, 0xffa6a4a5, 0xff908e8f, 0xff929191, 0xffb4b3b3, 0xffeeeeee, 0xffffffff, 0xffffffff, 0xfffdfdfd, 0xff959394, 0xff363333, 0xffb0afb0, 0xffffffff, 0xfffafafa, 0xffc9c8c9, 0xffa09e9f, 0xff8f8c8d, 0xff969494, 0xffbdbcbc, 0xfff6f5f6, 0xffffffff, 0xffffffff, 0xfff7f7f7, 0xff686667, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff4b4949, 0xffefeeef, 0xffffffff, 0xffdddddd, 0xffbab9ba, 0xff9e9c9d, 0xff8b898a, 0xff848182, 0xff868484, 0xff999797, 0xffbebdbe, 0xfff0f0ef, 0xffffffff, 0xffffffff, 0xffffffff, 0xff949293, 0xff262223, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff2e2a2b, 0xff9f9d9e, 0xfffdfdfd, 0xffffffff, 0xffffffff, 0xfff1f1f1, 0xffb7b5b6, 0xff8d8b8c, 0xff7f7c7d, 0xff878586, 0xffaaa8a9, 0xffe2e1e2, 0xffffffff, 0xffdbdbdb, 0xffbcbbbb, 0xfffcfcfc, 0xffffffff, 0xffe9e8e8, 0xff555252, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff221e1f, 0xff807e7e, 0xfff0f0f0, 0xffffffff, 0xffffffff, 0xfff7f7f7, 0xffcac9c9, 0xff9e9c9c, 0xff888686, 0xff858282, 0xff959393, 0xffc0bfbf, 0xfff5f5f5, 0xffffffff, 0xffffffff, 0xffecebeb, 0xff726f70, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf4231f20, 0x49231f20, 0x01231f20,
- 0x04231f20, 0x8c231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xff807d7e, 0xff1b1718, 0xff1e191a, 0xff8f8d8e, 0xffffffff, 0xffffffff, 0xfff9f9f9, 0xff888687, 0xff242021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xffafadad, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d1a1b, 0xff5c5959, 0xffe6e5e5, 0xffffffff, 0xffffffff, 0xfff6f5f6, 0xff979495, 0xff3f3c3c, 0xff272424, 0xff221f20, 0xff221e1f, 0xff2b2728, 0xff4d494a, 0xffb6b5b5, 0xffffffff, 0xffffffff, 0xffffffff, 0xffc9c8c8, 0xff3f3b3c, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585556, 0xfff5f5f5, 0xffffffff, 0xfff5f5f5, 0xff7d7b7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff929090, 0xfffafafa, 0xffffffff, 0xfffcfcfc, 0xfff9f9f9, 0xfff4f4f4, 0xff918e8f, 0xff413e3f, 0xff2b2728, 0xff242021, 0xff242021, 0xff2d2a2a, 0xff6c6a6a, 0xffeae9e9, 0xffffffff, 0xffffffff, 0xffdcdcdc, 0xffb1afb0, 0xfff7f7f7, 0xffececec, 0xff7b797a, 0xff393536, 0xff292526, 0xff231f20, 0xff262223, 0xff343031, 0xff7f7d7d, 0xfff4f4f4, 0xffffffff, 0xffffffff, 0xffc1c0c0, 0xff292526, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff454243, 0xffb1afb0, 0xff7e7b7c, 0xff494647, 0xff332f30, 0xff292526, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff272224, 0xff343031, 0xff656263, 0xffd1d0d0, 0xffffffff, 0xffffffff, 0xfff2f2f2, 0xff545152, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff6c6a6b, 0xfff1f1f1, 0xffffffff, 0xffffffff, 0xffe4e3e4, 0xff6b6869, 0xff302c2d, 0xff241f20, 0xff221e1f, 0xff221e1f, 0xff2c2829, 0xff565253, 0xffc2c2c2, 0xffffffff, 0xfff8f8f8, 0xffffffff, 0xffffffff, 0xffe9e8e8, 0xff555252, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191b, 0xff666264, 0xffe9e8e9, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff7b7879, 0xff3b3738, 0xff282425, 0xff221e1f, 0xff221e1f, 0xff252122, 0xff353132, 0xff777575, 0xffe9e9e9, 0xffffffff, 0xffffffff, 0xffd5d4d4, 0xff4a4647, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0x8c231f20, 0x04231f20,
- 0x11231f20, 0xc4231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xff7f7d7e, 0xff1c1819, 0xff1f1b1c, 0xff383535, 0xffdcdbdb, 0xffffffff, 0xffffffff, 0xffd3d3d3, 0xff434041, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xffafadad, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff2c2829, 0xffb0afaf, 0xfffefefe, 0xffffffff, 0xfffcfcfc, 0xff9e9d9d, 0xff282525, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff383435, 0xffc7c7c7, 0xffffffff, 0xffffffff, 0xfff8f8f8, 0xff848383, 0xff242021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585556, 0xfff5f5f5, 0xffffffff, 0xfff5f5f5, 0xff7d7b7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff929090, 0xfffafafa, 0xffffffff, 0xffffffff, 0xfffaf9f9, 0xff918f8f, 0xff2a2627, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1a1b, 0xff8a8889, 0xffffffff, 0xffffffff, 0xfffdfdfd, 0xfffdfdfd, 0xfff6f7f7, 0xff6b6969, 0xff211d1e, 0xff221d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff2a2727, 0xffa3a1a1, 0xffffffff, 0xffffffff, 0xfff6f6f6, 0xff4d4a4b, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff282425, 0xff302c2d, 0xff242021, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231e1f, 0xff221e1f, 0xff221e1f, 0xff524f4f, 0xffdddddd, 0xffffffff, 0xffffffff, 0xffa5a4a4, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff312d2e, 0xffbfbebe, 0xffffffff, 0xffffffff, 0xfff5f4f5, 0xff625f60, 0xff1f1b1c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff211d1e, 0xff4b4849, 0xffd5d4d4, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe9e8e8, 0xff555252, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff363333, 0xffc1c1c1, 0xffffffff, 0xffffffff, 0xffededed, 0xff666464, 0xff211d1e, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1f1b1c, 0xff706e6e, 0xfff9f9f9, 0xffffffff, 0xfffdfdfd, 0xff908e8f, 0xff272223, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xc4231f20, 0x11231f20,
- 0x2e231f20, 0xf0231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xff7f7d7e, 0xff1c1819, 0xff231f20, 0xff1c1819, 0xff7d7b7b, 0xffffffff, 0xffffffff, 0xffffffff, 0xff8a8788, 0xff252122, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xffafadad, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff535051, 0xffe2e1e1, 0xffffffff, 0xffffffff, 0xffd9d9d9, 0xff393636, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff5b5859, 0xfff5f5f5, 0xffffffff, 0xffffffff, 0xffc4c3c3, 0xff383435, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585556, 0xfff5f5f5, 0xffffffff, 0xfff5f5f5, 0xff7d7b7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff929090, 0xfffafafa, 0xffffffff, 0xffffffff, 0xffcbcacb, 0xff3b3839, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff3f3b3c, 0xffeeedee, 0xffffffff, 0xffffffff, 0xffffffff, 0xffa6a5a5, 0xff242021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221f1f, 0xff615e5e, 0xfff2f2f2, 0xffffffff, 0xffffffff, 0xff797677, 0xff1b1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff262223, 0xff939191, 0xffffffff, 0xffffffff, 0xffdedede, 0xff2f2b2c, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff575354, 0xfff5f5f5, 0xffffffff, 0xffffffff, 0xffa1a09f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201d1e, 0xff817f81, 0xfff5f5f5, 0xffffffff, 0xffffffff, 0xffe9e8e8, 0xff555252, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211c1e, 0xff6c696a, 0xffefefef, 0xffffffff, 0xffffffff, 0xff989797, 0xff1d191a, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff211d1e, 0xffb1b0b0, 0xffffffff, 0xffffffff, 0xffcccbcb, 0xff3b3738, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf0231f20, 0x2e231f20,
- 0x62231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xff7f7d7e, 0xff1c1819, 0xff231f20, 0xff211d1e, 0xff2f2c2d, 0xffcdcdcd, 0xffffffff, 0xffffffff, 0xffdddddd, 0xff423f40, 0xff211d1e, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xffafadad, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff7d7b7b, 0xfff9f9f9, 0xffffffff, 0xffffffff, 0xff8f8e8e, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xffbdbcbd, 0xffffffff, 0xffffffff, 0xffeaeaea, 0xff565353, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585556, 0xfff5f5f5, 0xffffffff, 0xfff5f5f5, 0xff7d7b7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff929090, 0xfffafafa, 0xffffffff, 0xfff9f9f9, 0xff918f90, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff282425, 0xffcdcccc, 0xffffffff, 0xffffffff, 0xfff7f7f7, 0xff5d5b5b, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff474444, 0xffdad9d9, 0xffffffff, 0xffffffff, 0xff999898, 0xff1b1618, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff1f1b1c, 0xff696768, 0xfff0f0ef, 0xffffffff, 0xfff5f5f5, 0xff4c494a, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff8a8989, 0xffffffff, 0xffffffff, 0xfff7f7f7, 0xff565354, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff454242, 0xffdedede, 0xffffffff, 0xffffffff, 0xffe9e8e8, 0xff555252, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff2a2627, 0xffa19fa0, 0xffffffff, 0xffffffff, 0xffeeeded, 0xff444040, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff626060, 0xffffffff, 0xffffffff, 0xffeeeeee, 0xff575354, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0x62231f20,
- 0x8e231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xff7f7d7e, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff6e6b6b, 0xfffbfbfb, 0xffffffff, 0xffffffff, 0xff959394, 0xff211d1e, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xffafadad, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff2a2627, 0xffa09f9f, 0xffffffff, 0xffffffff, 0xfff8f8f8, 0xff535051, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1a1617, 0xff7e7b7c, 0xffffffff, 0xffffffff, 0xfffefefe, 0xff737172, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585556, 0xfff5f5f5, 0xffffffff, 0xfff5f5f5, 0xff7d7b7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff929090, 0xfffafafa, 0xffffffff, 0xfff2f2f1, 0xff686666, 0xff1c1719, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff231f20, 0xffb7b5b5, 0xffffffff, 0xffffffff, 0xffdbdbdb, 0xff423f3f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff3b3738, 0xffcecdcd, 0xffffffff, 0xffffffff, 0xffa7a6a6, 0xff1e1a1b, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff1f1b1c, 0xff2c2729, 0xff3b3839, 0xff4c4849, 0xff575455, 0xff5c595a, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5d5a5b, 0xff8b898a, 0xffefefef, 0xffffffff, 0xfffbfbfb, 0xff646162, 0xff1b1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xffb2b1b2, 0xffffffff, 0xffffffff, 0xffd5d4d4, 0xff373435, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff272324, 0xffbebdbd, 0xfffefefe, 0xffffffff, 0xffe9e8e8, 0xff555252, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff383435, 0xffc7c7c7, 0xffffffff, 0xffffffff, 0xffc3c2c2, 0xff201c1d, 0xff1d191a, 0xff1f1b1c, 0xff1e1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1c1819, 0xff3a3738, 0xffeeeeee, 0xffffffff, 0xffffffff, 0xff706e6e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0x8e231f20,
- 0xb4231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xff7f7d7e, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff312e2e, 0xffbcbbbb, 0xffffffff, 0xffffffff, 0xffebebeb, 0xff4a4748, 0xff1e1a1b, 0xff221e1f, 0xff221e1f, 0xffafadad, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff302d2e, 0xffb9b8b9, 0xffffffff, 0xffffffff, 0xffe6e6e6, 0xff343031, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff565254, 0xfffbfbfb, 0xffffffff, 0xffffffff, 0xff8f8c8d, 0xff252122, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585556, 0xfff5f5f5, 0xffffffff, 0xfff5f5f5, 0xff7d7b7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff929090, 0xfffafafa, 0xffffffff, 0xffededed, 0xff575454, 0xff1b1718, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201d1e, 0xffafadae, 0xffffffff, 0xffffffff, 0xffcac9ca, 0xff373334, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff383535, 0xffc9c8c8, 0xffffffff, 0xffffffff, 0xffafadae, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1a1b, 0xff393536, 0xff777475, 0xffacaaaa, 0xffcccacb, 0xffdddddc, 0xffe5e5e5, 0xffe9e9e9, 0xffebebeb, 0xffebebeb, 0xffebebeb, 0xffebeaeb, 0xfff0f0f0, 0xfffdfdfd, 0xffffffff, 0xffffffff, 0xff706d6e, 0xff191516, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff2c292a, 0xffcccbcc, 0xffffffff, 0xffffffff, 0xffbab9b9, 0xff2b2829, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xffa2a0a0, 0xfffcfcfc, 0xffffffff, 0xffe9e8e8, 0xff555252, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff484445, 0xffdcdcdc, 0xffffffff, 0xffffffff, 0xffc8c7c8, 0xff716f6f, 0xff747172, 0xff747273, 0xff747273, 0xff757273, 0xff757273, 0xff757273, 0xff767373, 0xff757374, 0xff767374, 0xff757273, 0xff828081, 0xffeeedee, 0xffffffff, 0xffffffff, 0xff858283, 0xff242021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xb4231f20,
- 0xd4231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xff7f7d7e, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff686566, 0xfff1f1f1, 0xffffffff, 0xffffffff, 0xffabaaaa, 0xff211c1d, 0xff211d1e, 0xff221e1f, 0xffafadad, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff343031, 0xffc6c5c5, 0xffffffff, 0xffffffff, 0xffd4d4d4, 0xff2a2627, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff413e3f, 0xfff6f6f5, 0xffffffff, 0xffffffff, 0xff9f9e9e, 0xff272223, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585556, 0xfff5f5f5, 0xffffffff, 0xfff5f5f5, 0xff7d7b7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff929090, 0xfffafafa, 0xffffffff, 0xffe9e9e9, 0xff524e4f, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xffadabac, 0xffffffff, 0xffffffff, 0xffc4c3c4, 0xff322f30, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff373435, 0xffc8c7c7, 0xffffffff, 0xffffffff, 0xffb0aeaf, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff5d5a5b, 0xffc8c7c8, 0xfff3f3f3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff777475, 0xff181415, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff322e2f, 0xffdbdada, 0xffffffff, 0xffffffff, 0xffaeacac, 0xff282425, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1d191a, 0xff908e8f, 0xfffbfbfb, 0xffffffff, 0xffe9e8e8, 0xff555252, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff545151, 0xffe9e9e9, 0xffffffff, 0xffffffff, 0xfff9f9f9, 0xfff1f1f1, 0xfff2f1f2, 0xfff2f1f2, 0xfff2f1f2, 0xfff2f2f2, 0xfff2f2f2, 0xfff2f2f2, 0xfff2f2f2, 0xfff2f2f2, 0xfff2f2f2, 0xfff2f2f2, 0xfff3f3f3, 0xfffdfdfd, 0xffffffff, 0xffffffff, 0xff8d8c8c, 0xff242021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xd4231f20,
- 0xe5231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xff7f7d7e, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff322e2f, 0xffb6b5b5, 0xffffffff, 0xffffffff, 0xfff3f3f3, 0xff5a5858, 0xff1a1617, 0xff221f1f, 0xffafadad, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff373434, 0xffcac9c9, 0xffffffff, 0xffffffff, 0xffcbcacb, 0xff282425, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff3b3738, 0xfff2f1f2, 0xffffffff, 0xffffffff, 0xffa5a4a4, 0xff262223, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585556, 0xfff5f5f5, 0xffffffff, 0xfff5f5f5, 0xff7d7b7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff929090, 0xfffafafa, 0xffffffff, 0xffe9e9e9, 0xff514d4f, 0xff1d1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xffadacad, 0xffffffff, 0xffffffff, 0xffc4c3c3, 0xff322e30, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff373435, 0xffc8c7c7, 0xffffffff, 0xffffffff, 0xffb0aeaf, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff565454, 0xffe2e1e1, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff3f3f3, 0xffd1d0d0, 0xffb3b1b1, 0xffa19f9f, 0xff989696, 0xff939191, 0xff929091, 0xff918f90, 0xffafaeaf, 0xfff4f4f4, 0xffffffff, 0xffffffff, 0xff777475, 0xff181415, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff322f30, 0xffdfdede, 0xffffffff, 0xffffffff, 0xffa9a7a8, 0xff282425, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1c1819, 0xff8b8989, 0xfffbfbfb, 0xffffffff, 0xffe9e8e8, 0xff555252, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff595758, 0xfff0efef, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff929091, 0xff242021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xe5231f20,
- 0xf2231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xff7f7d7e, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff676566, 0xffececec, 0xffffffff, 0xffffffff, 0xffb9b8b8, 0xff262223, 0xff201c1c, 0xffafadad, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff353233, 0xffc7c6c7, 0xffffffff, 0xffffffff, 0xffd2d1d1, 0xff2a2627, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff3f3b3c, 0xfff5f5f5, 0xffffffff, 0xffffffff, 0xffa2a0a1, 0xff262223, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585556, 0xfff5f5f5, 0xffffffff, 0xfff5f5f5, 0xff7d7b7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff929090, 0xfffafafa, 0xffffffff, 0xffe9e9e9, 0xff514d4f, 0xff1d1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xffadacad, 0xffffffff, 0xffffffff, 0xffc4c3c3, 0xff322e30, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff373435, 0xffc8c7c7, 0xffffffff, 0xffffffff, 0xffb0aeaf, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff2e2a2b, 0xffc2c1c1, 0xffffffff, 0xffffffff, 0xfff5f4f4, 0xff9b9a9a, 0xff464344, 0xff2a2627, 0xff221e1f, 0xff1d191a, 0xff1c1819, 0xff1c1819, 0xff1c1819, 0xff1a1516, 0xff5c595a, 0xffe9e8e9, 0xffffffff, 0xffffffff, 0xff777475, 0xff181415, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff302c2d, 0xffd7d7d7, 0xffffffff, 0xffffffff, 0xffb1b0b0, 0xff292526, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e191a, 0xff959393, 0xfffcfcfc, 0xffffffff, 0xffe9e8e8, 0xff555252, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff585556, 0xffeeedee, 0xffffffff, 0xffffffff, 0xffc1c0c0, 0xff848282, 0xff898788, 0xff898788, 0xff898788, 0xff898788, 0xff898788, 0xff898788, 0xff898788, 0xff898788, 0xff898788, 0xff898788, 0xff898788, 0xff898788, 0xff898788, 0xff8b898a, 0xff565253, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf2231f20,
- 0xfd231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xff7f7d7e, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff2c2829, 0xffb6b5b5, 0xfffefefe, 0xffffffff, 0xfff1f1f1, 0xff666364, 0xff1c1819, 0xffafadad, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff312e2f, 0xffbdbcbd, 0xffffffff, 0xffffffff, 0xffe1e0e1, 0xff302c2d, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff4f4b4c, 0xfffaf9f9, 0xffffffff, 0xffffffff, 0xff949292, 0xff262223, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585556, 0xfff5f5f5, 0xffffffff, 0xfff5f5f5, 0xff7d7b7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff929090, 0xfffafafa, 0xffffffff, 0xffe9e9e9, 0xff514d4f, 0xff1d1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xffadacad, 0xffffffff, 0xffffffff, 0xffc4c3c3, 0xff322e30, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff373435, 0xffc8c7c7, 0xffffffff, 0xffffffff, 0xffb0aeaf, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff5d5a5b, 0xfffffefe, 0xffffffff, 0xfffefefe, 0xff8c898a, 0xff201c1d, 0xff1d191a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff6a6768, 0xffefefef, 0xffffffff, 0xffffffff, 0xff777475, 0xff181415, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff2a2627, 0xffc6c5c5, 0xffffffff, 0xffffffff, 0xffc1c0c0, 0xff2e2a2b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201c1d, 0xffa9a8a8, 0xfffdfdfd, 0xffffffff, 0xffe9e8e8, 0xff555252, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff4f4c4d, 0xffe4e4e4, 0xffffffff, 0xffffffff, 0xff999797, 0xff100c0d, 0xff181415, 0xff181415, 0xff181415, 0xff181415, 0xff181415, 0xff181415, 0xff181415, 0xff181415, 0xff181415, 0xff181415, 0xff181415, 0xff181415, 0xff181415, 0xff171314, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xfd231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xff7f7d7e, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff5f5d5d, 0xffeeeeee, 0xffffffff, 0xfffefefe, 0xffb9b7b8, 0xff302d2e, 0xffacabab, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff2c2829, 0xffa8a6a6, 0xffffffff, 0xffffffff, 0xfff4f4f4, 0xff494647, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff726f70, 0xffffffff, 0xffffffff, 0xffffffff, 0xff7a7878, 0xff241f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585556, 0xfff5f5f5, 0xffffffff, 0xfff5f5f5, 0xff7d7b7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff929090, 0xfffafafa, 0xffffffff, 0xffe9e9e9, 0xff514d4f, 0xff1d1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xffadacad, 0xffffffff, 0xffffffff, 0xffc4c3c3, 0xff322e30, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff373435, 0xffc8c7c7, 0xffffffff, 0xffffffff, 0xffb0aeaf, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff908e8e, 0xffffffff, 0xffffffff, 0xffdcdbdb, 0xff434041, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff7f7c7d, 0xfff9f9f9, 0xffffffff, 0xffffffff, 0xff777475, 0xff181415, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xffa8a6a7, 0xffffffff, 0xffffffff, 0xffe0dfdf, 0xff3f3b3c, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff2d2a2b, 0xffc8c8c8, 0xfffefefe, 0xffffffff, 0xffe9e8e8, 0xff555252, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff3f3c3d, 0xffd3d2d2, 0xffffffff, 0xffffffff, 0xffc7c5c6, 0xff262223, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xff7f7d7e, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242021, 0xffaeacad, 0xffffffff, 0xffffffff, 0xffeeeeee, 0xff6c6a6a, 0xffadabab, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff242121, 0xff868484, 0xfffcfcfc, 0xffffffff, 0xffffffff, 0xff7e7b7c, 0xff191516, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1a1b, 0xffacaaab, 0xffffffff, 0xffffffff, 0xfff0f0f0, 0xff5d595a, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585556, 0xfff5f5f5, 0xffffffff, 0xfff5f5f5, 0xff7d7b7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff929090, 0xfffafafa, 0xffffffff, 0xffe9e9e9, 0xff514d4f, 0xff1d1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xffadacad, 0xffffffff, 0xffffffff, 0xffc4c3c3, 0xff322e30, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff373435, 0xffc8c7c7, 0xffffffff, 0xffffffff, 0xffb0aeaf, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xffa7a5a6, 0xffffffff, 0xffffffff, 0xffc6c5c5, 0xff343132, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff2b2829, 0xffa9a8a8, 0xffffffff, 0xffffffff, 0xffffffff, 0xff777475, 0xff181415, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff7b7878, 0xffffffff, 0xffffffff, 0xfffefefe, 0xff696667, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff555153, 0xffe6e5e5, 0xffffffff, 0xffffffff, 0xffe9e8e8, 0xff555252, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff2f2b2c, 0xffb2b1b1, 0xffffffff, 0xffffffff, 0xfff1f1f1, 0xff4a4748, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xff7f7d7e, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff4e4a4b, 0xffefeeee, 0xffffffff, 0xffffffff, 0xffbcbbbb, 0xffc1c0c1, 0xfffcfcfc, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff5d5a5b, 0xffe9e8e9, 0xffffffff, 0xffffffff, 0xffc7c6c6, 0xff2b2627, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff464243, 0xffebebeb, 0xffffffff, 0xffffffff, 0xffcfcece, 0xff3e3a3b, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585556, 0xfff5f5f5, 0xffffffff, 0xfff5f5f5, 0xff7d7b7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff929090, 0xfffafafa, 0xffffffff, 0xffe9e9e9, 0xff514d4f, 0xff1d1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xffadacad, 0xffffffff, 0xffffffff, 0xffc4c3c3, 0xff322e30, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff373435, 0xffc8c7c7, 0xffffffff, 0xffffffff, 0xffb0aeaf, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xffa8a6a6, 0xffffffff, 0xffffffff, 0xffcbcaca, 0xff383435, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff4e4b4b, 0xffe3e2e2, 0xffffffff, 0xffffffff, 0xffffffff, 0xff777475, 0xff181415, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff484546, 0xffe8e8e8, 0xffffffff, 0xffffffff, 0xffc3c2c2, 0xff292627, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff262223, 0xff9e9c9c, 0xfffbfbfb, 0xffffffff, 0xffffffff, 0xffe9e8e8, 0xff555252, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff7f7c7d, 0xfff8f7f8, 0xffffffff, 0xffffffff, 0xffa3a1a1, 0xff1e1a1c, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xff7f7d7e, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff9c9a9a, 0xffffffff, 0xffffffff, 0xfff5f5f5, 0xfff0f0f0, 0xfffefefe, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff343031, 0xffbfbebe, 0xffffffff, 0xffffffff, 0xfff8f8f8, 0xff807e7f, 0xff1d191a, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff262223, 0xffafadae, 0xffffffff, 0xffffffff, 0xfffdfdfd, 0xff949293, 0xff272324, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585556, 0xfff5f5f5, 0xffffffff, 0xfff5f5f5, 0xff7d7b7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff929090, 0xfffafafa, 0xffffffff, 0xffe9e9e9, 0xff514d4f, 0xff1d1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xffadacad, 0xffffffff, 0xffffffff, 0xffc4c3c3, 0xff322e30, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff373435, 0xffc8c7c7, 0xffffffff, 0xffffffff, 0xffb0aeaf, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff949192, 0xffffffff, 0xffffffff, 0xffecebec, 0xff565354, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff2c2829, 0xffb1afaf, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff777475, 0xff181415, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff2a2627, 0xffa6a4a5, 0xffffffff, 0xffffffff, 0xffffffff, 0xff939192, 0xff201c1d, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff211d1e, 0xff6c6a6a, 0xffebebeb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe9e8e8, 0xff555252, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff444041, 0xffd5d4d4, 0xffffffff, 0xffffffff, 0xfff0f0f0, 0xff716e6f, 0xff1d191a, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff221e1f, 0xff2d292a, 0xff252122, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xff7f7d7e, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff403d3e, 0xffe4e4e4, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff706d6e, 0xfff0eff0, 0xffffffff, 0xffffffff, 0xffe9e9e9, 0xff706e6f, 0xff282425, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff302c2d, 0xff969494, 0xfffafaf9, 0xffffffff, 0xffffffff, 0xffdad9d9, 0xff4d494a, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585556, 0xfff5f5f5, 0xffffffff, 0xfff5f5f5, 0xff7d7b7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff929090, 0xfffafafa, 0xffffffff, 0xffe9e9e9, 0xff514d4f, 0xff1d1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xffadacad, 0xffffffff, 0xffffffff, 0xffc4c3c3, 0xff322e30, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff373435, 0xffc8c7c7, 0xffffffff, 0xffffffff, 0xffb0aeaf, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xfffdfcfc, 0xffffffff, 0xffffffff, 0xffbbb9b9, 0xff3a3738, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff373334, 0xffa5a3a3, 0xffffffff, 0xfffefefe, 0xfffefefe, 0xffffffff, 0xffffffff, 0xff777475, 0xff181415, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff534f50, 0xffe0dfe0, 0xffffffff, 0xffffffff, 0xfffbfbfb, 0xffa2a0a1, 0xff433f40, 0xff2a2627, 0xff252122, 0xff282425, 0xff3a3738, 0xff807d7e, 0xffeaeaea, 0xfffefefe, 0xffeeeded, 0xfffefefe, 0xffffffff, 0xffe9e8e8, 0xff555252, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201b1c, 0xff7e7b7c, 0xfff3f3f3, 0xffffffff, 0xffffffff, 0xffe9e9e9, 0xff7c7a7a, 0xff302c2d, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff242021, 0xff2e2a2b, 0xff4f4c4d, 0xff9f9e9f, 0xff9c9a9b, 0xff2f2b2c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xff7f7d7e, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff8b898a, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff272425, 0xffa3a1a1, 0xfffafafa, 0xffffffff, 0xffffffff, 0xfff3f2f3, 0xffaaa9a9, 0xff6c6a6a, 0xff585556, 0xff5b5859, 0xff797677, 0xffc2c1c1, 0xfffdfdfd, 0xffffffff, 0xffffffff, 0xffefeeee, 0xff7b7979, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585556, 0xfff5f5f5, 0xffffffff, 0xfff5f5f5, 0xff7d7b7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff929090, 0xfffafafa, 0xffffffff, 0xffe9e9e9, 0xff514d4f, 0xff1d1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xffadacad, 0xffffffff, 0xffffffff, 0xffc4c3c3, 0xff322e30, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff373435, 0xffc8c7c7, 0xffffffff, 0xffffffff, 0xffb0aeaf, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff2e2a2b, 0xffc4c3c3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcccccc, 0xff7b7878, 0xff575354, 0xff524e4f, 0xff5c595a, 0xff848282, 0xffd2d1d1, 0xffffffff, 0xfff5f5f5, 0xffcbcbcb, 0xffeeeeee, 0xffffffff, 0xffffffff, 0xff777475, 0xff181415, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff242021, 0xff7c797a, 0xffedeced, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe9e8e8, 0xffbebdbe, 0xffaeadae, 0xffb8b7b7, 0xffdddcdc, 0xffffffff, 0xffffffff, 0xffbfbebf, 0xffa5a3a4, 0xfffbfbfb, 0xffffffff, 0xffe9e8e8, 0xff545252, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff282325, 0xff9e9d9d, 0xfff7f7f7, 0xffffffff, 0xffffffff, 0xfffcfcfc, 0xffc6c5c5, 0xff888687, 0xff636161, 0xff585556, 0xff575455, 0xff5e5b5c, 0xff726f70, 0xff959293, 0xffc3c2c2, 0xfff4f3f3, 0xffffffff, 0xffb5b4b4, 0xff2f2b2c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff858383, 0xfff8f7f7, 0xffffffff, 0xfff9f9f9, 0xff807d7e, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff3f3c3c, 0xffd5d4d4, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffededed, 0xff5a5758, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff332f30, 0xffa4a3a3, 0xfff6f6f6, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffdfdfd, 0xfff0f1f1, 0xfff3f3f3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffeae9e9, 0xff858383, 0xff252222, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585656, 0xfff6f6f6, 0xffffffff, 0xfff6f6f6, 0xff7e7c7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff939191, 0xfffbfbfb, 0xffffffff, 0xffeaeaea, 0xff524e4f, 0xff1d1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xffaeacad, 0xffffffff, 0xffffffff, 0xffc5c4c4, 0xff322e30, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff383435, 0xffc9c8c9, 0xffffffff, 0xffffffff, 0xffb1afb0, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff585556, 0xffdedddd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff0f0f0, 0xffe9e9e9, 0xfff4f4f4, 0xffffffff, 0xffffffff, 0xfffafafa, 0xffa4a3a3, 0xff706d6e, 0xffe6e6e6, 0xffffffff, 0xffffffff, 0xff787576, 0xff181415, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff272324, 0xff7e7b7d, 0xffdfdede, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffdfdfd, 0xffc2c1c1, 0xff494747, 0xff8a8788, 0xfffbfbfb, 0xffffffff, 0xffe7e6e6, 0xff514e4f, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff2c2829, 0xff918f8f, 0xffe9e9e9, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffafafa, 0xfff0f0f0, 0xffefefef, 0xfff7f7f7, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffadabac, 0xff2e2a2b, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff828181, 0xfff5f5f5, 0xfffcfcfc, 0xfff7f7f7, 0xff7e7b7c, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff252122, 0xff817f7f, 0xfff8f8f8, 0xfffdfefe, 0xfffcfcfc, 0xfffcfdfc, 0xffebeaeb, 0xff595656, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201b1d, 0xff2e2a2b, 0xff787575, 0xffcccbcc, 0xfffbfafb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff4f4f3, 0xffbab9b9, 0xff625e5f, 0xff252122, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585555, 0xfff2f2f2, 0xfffefdfd, 0xfff3f4f4, 0xff7c7a7a, 0xff211c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff908e8f, 0xfff9f8f8, 0xfffcfcfc, 0xffe7e6e6, 0xff504d4e, 0xff1d1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211c1d, 0xffacaaaa, 0xffffffff, 0xffffffff, 0xffc3c2c2, 0xff322e2f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff383435, 0xffc7c5c6, 0xffffffff, 0xffffffff, 0xffafadad, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff232020, 0xff5b5959, 0xffc0bfbf, 0xfffafafa, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffdddcdd, 0xff888686, 0xff302c2d, 0xff5a5657, 0xffe7e7e7, 0xfffefefe, 0xfffffffe, 0xff767475, 0xff191415, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242021, 0xff535051, 0xff9d9b9b, 0xffd2d1d2, 0xffeeeeee, 0xfff9fafa, 0xfff7f7f7, 0xffe7e7e7, 0xffc4c3c4, 0xff858384, 0xff3d3a3b, 0xff1b1819, 0xff989797, 0xfffcfcfc, 0xffffffff, 0xffe1e0e1, 0xff4a4647, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff272324, 0xff5e5b5c, 0xffafadae, 0xffeaeaea, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff5f5f5, 0xffd1d1d1, 0xff9f9d9e, 0xff565454, 0xff262223, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff3b3738, 0xff575455, 0xff585556, 0xff575556, 0xff393637, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff312d2e, 0xff545152, 0xff595657, 0xff585556, 0xff585556, 0xff545152, 0xff302c2d, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff242021, 0xff3a3637, 0xff656263, 0xff949292, 0xffb1b0b0, 0xffbdbcbc, 0xffbcbaba, 0xffacabab, 0xff898787, 0xff595656, 0xff322e2f, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff302c2d, 0xff565353, 0xff595556, 0xff565454, 0xff393536, 0xff221f1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff3e3a3b, 0xff585556, 0xff585556, 0xff535051, 0xff2e2b2b, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff454142, 0xff5a5859, 0xff5a5758, 0xff4a4748, 0xff272324, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff282425, 0xff4b4748, 0xff595657, 0xff5a5758, 0xff454243, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff231f20, 0xff363233, 0xff666464, 0xff9a9798, 0xffb4b3b4, 0xffbdbcbc, 0xffb7b6b6, 0xffa09e9e, 0xff737172, 0xff434041, 0xff262223, 0xff211d1e, 0xff312d2e, 0xff535051, 0xff595656, 0xff595556, 0xff383435, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff211d1e, 0xff292526, 0xff3b3738, 0xff4e4b4c, 0xff565454, 0xff555253, 0xff4a4647, 0xff353132, 0xff252122, 0xff1f1b1c, 0xff231e1f, 0xffb5b4b4, 0xfffefefe, 0xffffffff, 0xffd5d4d4, 0xff3a3738, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff2e2a2b, 0xff4d4a4a, 0xff787676, 0xff9e9c9d, 0xffb5b4b4, 0xffbdbcbd, 0xffbababa, 0xffb1b0b1, 0xff9c9a9b, 0xff7d7b7b, 0xff575455, 0xff3b3838, 0xff292526, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff211d1e, 0xff211d1e, 0xff221f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff211d1e, 0xff252122, 0xff292526, 0xff272425, 0xff231f20, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff211d1e, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211e1f, 0xff211d1e, 0xff221e1f, 0xff221f1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff211d1e, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff211d1e, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221f1f, 0xff221d1f, 0xff221e1f, 0xff252122, 0xff282425, 0xff262223, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff211d1e, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff3c393a, 0xffd5d5d5, 0xffffffff, 0xfffefefe, 0xffbebdbe, 0xff272324, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff211d1e, 0xff211d1e, 0xff262223, 0xff292526, 0xff272425, 0xff242021, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201c1d, 0xff7b7879, 0xfff4f3f3, 0xffffffff, 0xfffbfbfb, 0xff8e8b8c, 0xff1d191a, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff322e2f, 0xff312d2e, 0xff211d1e, 0xff1f1b1c, 0xff201c1d, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff211d1e, 0xff1f1b1c, 0xff221e1f, 0xff555253, 0xffd6d5d5, 0xffffffff, 0xffffffff, 0xffeaeaea, 0xff4c484a, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff727070, 0xffafadae, 0xff777475, 0xff494647, 0xff302c2d, 0xff231f20, 0xff221e1f, 0xff211e1f, 0xff2a2627, 0xff434040, 0xff7b7879, 0xffd5d4d4, 0xffffffff, 0xffffffff, 0xffffffff, 0xff9b9999, 0xff201d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff838181, 0xfffafafa, 0xfff4f3f4, 0xffdbd9da, 0xffc0bfbf, 0xffacabab, 0xffa3a2a2, 0xffa8a6a6, 0xffb8b6b7, 0xffd5d4d4, 0xfff4f4f4, 0xffffffff, 0xffffffff, 0xffffffff, 0xffbcbbbc, 0xff353133, 0xff201b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff828080, 0xfffcfcfc, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffefefe, 0xfffcfcfc, 0xfffdfdfd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffdfefe, 0xffacaaab, 0xff3c3839, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff434041, 0xff939191, 0xffcdcccd, 0xffedecec, 0xfff7f7f7, 0xfffefefe, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff9f9f9, 0xffebebeb, 0xffbcbbbc, 0xff696666, 0xff2a2627, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff1d191a, 0xff272324, 0xff3d3a3b, 0xff5a5758, 0xff6e6c6c, 0xff797677, 0xff7b797a, 0xff737172, 0xff605d5e, 0xff3f3b3b, 0xff231f20, 0xff1d191a, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1e1a1b, 0xff1b1718, 0xff191516, 0xff181415, 0xff181415, 0xff181415, 0xff1b1718, 0xff1f1a1c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff2d292a, 0xff5e5c5d, 0xff696566, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696566, 0xff696666, 0xff514e4f, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201c1d, 0xff787576, 0xffe8e7e7, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f4f4, 0xffd1d1d1, 0xff464344, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff4b4849, 0xffd6d6d6, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffcfcfc, 0xffa2a1a1, 0xff292526, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff2e2a2b, 0xffaaa8a9, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffefdfd, 0xfff7f6f7, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfffafafa, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffeaeaea, 0xff656263, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff242021, 0xff737071, 0xfff7f7f7, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe4e3e4, 0xff686566, 0xff423e3f, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff454142, 0xff464344, 0xffa19f9f, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff383435, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff464344, 0xffdedddd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffdedede, 0xff484546, 0xff1a1617, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1e1a1b, 0xff201c1d, 0xff8d8a8b, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffdfdfd, 0xff828080, 0xff252122, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff2b2829, 0xffb4b2b3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffdfdedf, 0xff4c494a, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff242021, 0xff908d8d, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff4b4748, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff2e2a2b, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464244, 0xff423f40, 0xff2b2728, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1d191a, 0xff868485, 0xfffdfdfd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffdfdedf, 0xff4c494a, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff242021, 0xff8f8d8d, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffb4b3b3, 0xff272425, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff838181, 0xffdadada, 0xffd9d8d8, 0xffd9d8d8, 0xffd9d8d8, 0xffd9d8d8, 0xffd9d8d8, 0xffd9d8d8, 0xffd9d8d8, 0xffd9d8d8, 0xffd9d8d8, 0xffd9d8d8, 0xffd9d8d8, 0xffd9d8d8, 0xffd9d8d8, 0xffd9d8d8, 0xffd9d8d8, 0xffd9d8d8, 0xffd9d8d8, 0xffd9d8d9, 0xffcfcecf, 0xff676464, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1f1a1b, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1e1a1b, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585556, 0xffeaeaea, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffdfdedf, 0xff4c494a, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff242021, 0xff8f8d8d, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffcfcfc, 0xff787677, 0xff1b1718, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff332f30, 0xffd7d5d6, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffa9a7a8, 0xff2b2728, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff2e2b2b, 0xff413d3e, 0xff403d3e, 0xff403d3e, 0xff403d3e, 0xff403d3e, 0xff403d3e, 0xff403d3e, 0xff403d3e, 0xff403d3e, 0xff403d3e, 0xff403d3e, 0xff403d3e, 0xff403d3e, 0xff423e3f, 0xff383535, 0xff242021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff343132, 0xffc5c3c3, 0xfffefefe, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffdfdedf, 0xff4c494a, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff242021, 0xff8f8d8d, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffdfdfdf, 0xff423e3f, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff737072, 0xfff7f7f7, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffdcdbdb, 0xff4a4748, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211e1f, 0xff969394, 0xfffaf9f9, 0xfff2f2f2, 0xfff2f2f2, 0xfff2f2f2, 0xfff2f2f2, 0xfff2f2f2, 0xfff2f2f2, 0xfff2f2f2, 0xfff2f2f2, 0xfff2f2f2, 0xfff2f2f2, 0xfff2f2f2, 0xfff2f2f2, 0xfff8f8f8, 0xffcdcccc, 0xff332f30, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff252021, 0xff908e8e, 0xfff9f8f8, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffdfdedf, 0xff4c484a, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff242021, 0xff8f8d8d, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffefefe, 0xffa8a7a7, 0xff262122, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff2b2728, 0xffbbb9b9, 0xfffefefe, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffdfdfd, 0xff7d7b7b, 0xff242021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff312d2e, 0xffd6d5d5, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff8f7f7, 0xff4c494a, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff5d5a5b, 0xffe5e5e5, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffdfdedf, 0xff4c4849, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff242021, 0xff8f8d8e, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffefeeef, 0xff696667, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff5a5758, 0xffe8e7e8, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffbfbdbe, 0xff302c2d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff5b5858, 0xfffcfcfc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff787676, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff393536, 0xffc0bebf, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffededed, 0xff9b999a, 0xff828080, 0xff848283, 0xff848283, 0xff848283, 0xff848283, 0xff848283, 0xff848283, 0xff848283, 0xff848283, 0xff848283, 0xff848283, 0xff848283, 0xff848283, 0xff848283, 0xff848282, 0xff868383, 0xffc1c0c0, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffc5c3c4, 0xff3c3839, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff262323, 0xff9a9999, 0xfffcfcfc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff3f3f3, 0xff565354, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1d191a, 0xff9c9b9a, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffa8a6a6, 0xff1f1b1c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221f1f, 0xff231f20, 0xff908e8e, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffeffff, 0xfffefefe, 0xfffffefe, 0xfffffefe, 0xfffffefe, 0xfffffefe, 0xfffffefe, 0xfffffefe, 0xfffffefe, 0xfffffefe, 0xfffffefe, 0xfffffefe, 0xfffffefe, 0xfffffefe, 0xfffffefe, 0xfffffefe, 0xfffffefe, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffafafa, 0xff8a8889, 0xff252122, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff444142, 0xffd4d3d4, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff9b999a, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff312d2e, 0xffdfdede, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffdad9da, 0xff2c2829, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff676565, 0xfffafafa, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffebeaea, 0xff585555, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff252122, 0xff807e7e, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffeae9e9, 0xff3d393a, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff332f30, 0xff777575, 0xff7d7b7c, 0xff7c7a7a, 0xff7c7a7a, 0xff7c7a7a, 0xff7c7a7a, 0xff7c7a7a, 0xff7c7a7a, 0xff7c7a7a, 0xff7c7a7a, 0xff7c7a7a, 0xff7c7a7a, 0xff7c7a7a, 0xff7c7a7a, 0xff7c7a7a, 0xff7c7a7a, 0xff7e7b7c, 0xff757273, 0xff2b2728, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff242021, 0xff767374, 0xffa19f9f, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xffa09e9f, 0xff615f60, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff272223, 0xff605d5e, 0xff8a8888, 0xff878686, 0xff878585, 0xff878585, 0xff878585, 0xff878585, 0xff878585, 0xff878585, 0xff878585, 0xff878585, 0xff878585, 0xff878585, 0xff878585, 0xff878585, 0xff878585, 0xff878585, 0xff878585, 0xff878585, 0xff878585, 0xff878585, 0xff878585, 0xff878585, 0xff878585, 0xff878585, 0xff888686, 0xff878485, 0xff3e3a3b, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1b1718, 0xff1b1718, 0xff1b1718, 0xff1b1718, 0xff1b1718, 0xff1b1718, 0xff1b1718, 0xff1b1718, 0xff1b1718, 0xff1b1718, 0xff1b1718, 0xff1b1718, 0xff1b1718, 0xff1b1718, 0xff1b1718, 0xff1b1718, 0xff1b1718, 0xff1c1819, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e191a, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1e1a1b, 0xff221f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1d191a, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff201b1c, 0xff242021, 0xff302c2d, 0xff3e3b3c, 0xff4a4747, 0xff555253, 0xff5e5b5b, 0xff5f5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5f5c5d, 0xff5e5a5b, 0xff555252, 0xff4a4647, 0xff3e3a3b, 0xff2f2b2c, 0xff231f20, 0xff201c1d, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1d191a, 0xff2d2a2b, 0xff575455, 0xff848283, 0xffb4b3b4, 0xffd2d1d2, 0xffdfdede, 0xffeaeaea, 0xfff4f4f4, 0xfff6f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff4f3f4, 0xffeaeaea, 0xffdeddde, 0xffd0d0d0, 0xffb2b1b1, 0xff818080, 0xff555253, 0xff2b2829, 0xff1d191a, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e191a, 0xff242021, 0xff605d5e, 0xffb5b3b3, 0xffe5e5e5, 0xfffaf9fa, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff9f9f9, 0xffe4e3e4, 0xffb0afb0, 0xff5c5959, 0xff231e20, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff3f3b3c, 0xffaaa9a9, 0xffececec, 0xfffefefe, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffdfdfd, 0xffebeaea, 0xffa6a4a6, 0xff3c3839, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff4e4a4b, 0xffcccacb, 0xfffefefe, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffdfdfd, 0xffc8c7c7, 0xff4b4848, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff585556, 0xffdbdadb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffd8d7d8, 0xff555253, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1c1c, 0xff484546, 0xffd7d6d6, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffd4d3d3, 0xff474344, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff383434, 0xffc3c2c2, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff373333, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1a1b, 0xff9c9a9a, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff9a9898, 0xff1e1a1b, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff514e4e, 0xffebebeb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffeaeaea, 0xff504c4d, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff252122, 0xffaaa9aa, 0xfffdfdfd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffdfdfd, 0xffaaa9a9, 0xff252122, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff4a4748, 0xffe0dfe0, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe0dfdf, 0xff4a4747, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff787676, 0xfff4f3f3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff3f3f3, 0xff777575, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff2a2627, 0xffa8a6a6, 0xfffefefe, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffefefe, 0xffa6a5a5, 0xff292526, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff373435, 0xffc5c4c4, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffc3c2c2, 0xff363333, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff3f3c3d, 0xffd2d1d2, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffd2d1d1, 0xff3f3b3c, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff4a4748, 0xffdcdbdb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffdcdbdb, 0xff4a4748, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211c1e, 0xff535052, 0xffe3e2e2, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e2e2, 0xff535051, 0xff211c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff555252, 0xffe4e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff555253, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffcfcfc, 0xfff5f4f5, 0xffececec, 0xffe4e3e4, 0xffdcdbdb, 0xffdbdada, 0xffe3e3e3, 0xffececec, 0xfff5f4f5, 0xfffcfcfd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211c1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff1f1f1, 0xffd2d1d1, 0xffafaeae, 0xff8a8889, 0xff6f6d6e, 0xff646162, 0xff5c595a, 0xff555253, 0xff4e4a4b, 0xff464344, 0xff454343, 0xff4d4a4b, 0xff555252, 0xff5c595a, 0xff646263, 0xff706e6f, 0xff898787, 0xffaeadad, 0xffd1d0d0, 0xfff1f1f1, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e2e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffbfbfb, 0xffd0cfd0, 0xff949293, 0xff696667, 0xff474444, 0xff343031, 0xff272324, 0xff242021, 0xff231f20, 0xff221e1f, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff282324, 0xff343031, 0xff464243, 0xff686566, 0xff929091, 0xffcccbcb, 0xfff9f9f9, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545151, 0xffe2e2e2, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffefefe, 0xfff8f7f7, 0xffdddcdc, 0xffa09f9f, 0xff5a5757, 0xff2b2829, 0xff1d191a, 0xff1e1a1b, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff211d1e, 0xff1e1a1b, 0xff1d191a, 0xff2a2627, 0xff575454, 0xff9d9b9c, 0xffdcdadb, 0xfff7f7f7, 0xfffefdfd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff535051, 0xffe2e2e2, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffefefe, 0xffebebeb, 0xffb6b5b5, 0xff6c696a, 0xff353132, 0xff1d191a, 0xff1c1819, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1d191a, 0xff1c1819, 0xff333030, 0xff6a6767, 0xffb1b0b0, 0xffe9e9e9, 0xfffdfdfd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211c1e, 0xff525050, 0xffe2e2e2, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe7e7e7, 0xffaeacad, 0xff605d5e, 0xff272324, 0xff1a1617, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff1a1617, 0xff252223, 0xff5c595a, 0xffa9a8a8, 0xffe5e5e5, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff524f50, 0xffe2e1e2, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffefeeef, 0xffa7a6a6, 0xff5d5a5a, 0xff2c2829, 0xff1e1a1b, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1e1a1b, 0xff2b2728, 0xff5a5757, 0xffa3a1a2, 0xffecebeb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff524f50, 0xffe2e1e1, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcdcccd, 0xff605d5d, 0xff2b2728, 0xff211d1e, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221d1e, 0xff211d1e, 0xff2a2627, 0xff595657, 0xffc3c3c3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff524f50, 0xffe2e1e1, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff7f7f7, 0xff999797, 0xff343132, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff332f30, 0xff928f90, 0xfff3f2f3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff524f50, 0xffe1e1e1, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffefefe, 0xffd6d5d5, 0xff666464, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff221e1f, 0xff646061, 0xffd3d2d2, 0xfffcfcfc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff524e4f, 0xffe1e1e1, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffaf9fa, 0xffb6b4b5, 0xff423f3f, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1c1718, 0xff3e3a3b, 0xffb2b0b1, 0xfff9f9f9, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff514e4f, 0xffe1e0e1, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff8f7f8, 0xffa2a0a1, 0xff353233, 0xff1c191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff302c2d, 0xff9a9899, 0xfff6f6f6, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff504e4e, 0xffe1e0e0, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff4f3f3, 0xff888687, 0xff2d292a, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff2a2728, 0xff827f7f, 0xffefefef, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff504d4e, 0xffe1e0e0, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffecebec, 0xff716e6f, 0xff272324, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff272425, 0xff6f6d6e, 0xffe7e7e7, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff504d4e, 0xffe0e0e0, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff1f0f1, 0xff726f70, 0xff242021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff716f6f, 0xffeeeeee, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff504d4e, 0xffe0dfe0, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff4f4f4, 0xff8a8888, 0xff262223, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221d1e, 0xff888686, 0xfff4f4f4, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff504d4d, 0xffe0dfdf, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff9f9f9, 0xff9f9d9d, 0xff2b2727, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201c1d, 0xff201c1d, 0xff211d1e, 0xff252222, 0xff2e2a2b, 0xff333031, 0xff363334, 0xff3a3738, 0xff3b3738, 0xff373334, 0xff343031, 0xff2f2b2c, 0xff262223, 0xff211e1f, 0xff1f1b1c, 0xff201b1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff242122, 0xff999797, 0xfffafafa, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff504c4d, 0xffe0dfdf, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffaeacac, 0xff312d2e, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff1d1819, 0xff242021, 0xff3c3839, 0xff5d5b5b, 0xff7b7979, 0xff959393, 0xffafadad, 0xffbebdbd, 0xffc6c5c5, 0xffcdcccc, 0xffcecdcd, 0xffc7c6c6, 0xffbfbebe, 0xffb1afaf, 0xff979595, 0xff7d7a7c, 0xff615d5e, 0xff3e3a3b, 0xff252122, 0xff1d191a, 0xff1f1b1c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff2a2728, 0xffa4a2a2, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff504c4d, 0xffe0dfdf, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcbcaca, 0xff383535, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff1c1819, 0xff343031, 0xff6f6c6d, 0xffa6a5a5, 0xffcecdce, 0xffe8e8e8, 0xfff6f6f6, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff7f7f7, 0xffe9e9e9, 0xffd0d0d0, 0xffa9a8a8, 0xff737070, 0xff363334, 0xff1c1819, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff333031, 0xffbbb9ba, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff4f4c4c, 0xffdfdfdf, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffefefef, 0xff555253, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1b1718, 0xff3b3839, 0xff8b8888, 0xffd2d1d1, 0xfff3f3f3, 0xfffcfcfc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffdfdfd, 0xfff4f4f4, 0xffd6d5d5, 0xff8f8d8e, 0xff403d3d, 0xff1d1819, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221d1e, 0xff4e4b4c, 0xffe2e1e1, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff4f4b4c, 0xffdfdedf, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff868384, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff2f2b2c, 0xff807d7d, 0xffe0e0e0, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffefefe, 0xffe3e3e3, 0xff858384, 0xff322e2f, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff252122, 0xff7f7c7d, 0xfff8f8f8, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff4e4b4c, 0xffdfdede, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffbab9b9, 0xff312d2e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff272324, 0xff5b5858, 0xffc6c5c5, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcbcbcb, 0xff5f5c5d, 0xff282425, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff332f30, 0xffb5b3b4, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe5e4e4, 0xff555252, 0xff211c1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff423e3f, 0xffaaa8a9, 0xffc2c1c1, 0xffc0bebf, 0xffc0bfbf, 0xffc0bfbf, 0xffc0bfbf, 0xffc0bfbf, 0xffc0bfbf, 0xffc0bfbf, 0xffc0bfbf, 0xffc1bfbf, 0xffc1bfbf, 0xffc1bfbf, 0xffc1bfbf, 0xffc1bfbf, 0xffc1bfbf, 0xffc1bfc0, 0xffc1bfc0, 0xffc1c0c0, 0xffc1c0c0, 0xffc1c0c0, 0xffc1c0c0, 0xffc1c0c0, 0xffc1c0c0, 0xffc1c0c0, 0xffc1c0c0, 0xffc1c0c1, 0xffc1c0c1, 0xffc1c0c1, 0xffc1c0c1, 0xffc1c0c1, 0xffc2c1c1, 0xffc2c1c1, 0xffc2c1c1, 0xffc2c1c1, 0xffc2c1c1, 0xffc2c1c1, 0xffc2c1c1, 0xffc2c1c1, 0xffc3c1c2, 0xffc3c1c2, 0xffc3c2c2, 0xffc3c2c2, 0xffc3c2c2, 0xffc3c2c2, 0xffc3c2c2, 0xffc3c2c2, 0xffc3c2c2, 0xffc3c2c2, 0xffc3c2c3, 0xffc3c2c3, 0xffc3c2c3, 0xffc3c2c3, 0xffc3c2c3, 0xffc3c3c3, 0xffc3c3c3, 0xffc3c3c3, 0xffc4c3c3, 0xffc4c3c3, 0xffc4c3c3, 0xffc4c3c3, 0xffc4c3c3, 0xffc4c3c3, 0xffc5c3c4, 0xffc5c3c4, 0xffc5c4c4, 0xffc5c4c4, 0xffc5c4c4, 0xffc5c4c4, 0xffc5c4c4, 0xffc5c4c4, 0xffc5c4c4, 0xffc5c4c4, 0xffc5c4c4, 0xffc5c4c4, 0xffc5c4c4, 0xffc5c4c4, 0xffc5c4c4, 0xffc5c4c4, 0xffc5c4c4, 0xffc7c6c6, 0xffbab9ba, 0xff524f50, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff343031, 0xff888686, 0xffeaeaea, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff0f0f0, 0xff8f8e8e, 0xff383435, 0xff1f1b1c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1a1b, 0xff535051, 0xffc0bfc0, 0xffd2d1d1, 0xffd1d1d1, 0xffd1d1d1, 0xffd1d1d1, 0xffd2d1d1, 0xffd2d1d1, 0xffd2d1d1, 0xffd2d1d1, 0xffd2d1d1, 0xffd3d2d2, 0xffd3d2d2, 0xffd3d2d2, 0xffd3d2d2, 0xffd3d2d3, 0xffd3d2d3, 0xffd3d2d3, 0xffd3d3d3, 0xffd3d3d3, 0xffd3d3d3, 0xffd4d3d3, 0xffd4d3d3, 0xffd3d3d3, 0xffd4d4d4, 0xffd5d4d4, 0xffd5d4d4, 0xffd5d4d4, 0xffd5d4d4, 0xffd5d4d4, 0xffd5d4d4, 0xffd5d4d4, 0xffd5d4d4, 0xffd5d4d5, 0xffd5d5d5, 0xffd5d5d5, 0xffd6d5d5, 0xffd6d5d6, 0xffd6d6d6, 0xffd6d6d6, 0xffd6d6d6, 0xffd7d6d6, 0xffd7d6d6, 0xffd7d6d6, 0xffd7d6d6, 0xffdad9d9, 0xffc3c2c2, 0xff4b4849, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff252122, 0xff2d292a, 0xff2e2b2c, 0xff2f2a2c, 0xff2f2b2c, 0xff2f2b2c, 0xff2f2b2c, 0xff2f2b2c, 0xff2f2b2c, 0xff2f2b2c, 0xff2f2b2c, 0xff2f2c2c, 0xff2f2c2c, 0xff2f2c2c, 0xff2f2c2d, 0xff2f2c2d, 0xff2f2c2d, 0xff2f2c2d, 0xff2f2c2d, 0xff302c2d, 0xff302c2d, 0xff302c2d, 0xff302c2d, 0xff302c2d, 0xff302c2d, 0xff302c2d, 0xff302c2d, 0xff302d2e, 0xff302d2e, 0xff302d2e, 0xff302d2e, 0xff302d2e, 0xff312d2e, 0xff312d2e, 0xff312d2e, 0xff312d2e, 0xff312d2e, 0xff312d2e, 0xff312d2e, 0xff312d2e, 0xff312d2e, 0xff312d2e, 0xff312e2f, 0xff312e2f, 0xff312e2f, 0xff312e2f, 0xff312e2f, 0xff322e2f, 0xff322e2f, 0xff322e2f, 0xff322e2f, 0xff322e2f, 0xff322e2f, 0xff322e2f, 0xff322e2f, 0xff322e2f, 0xff322e2f, 0xff322e2f, 0xff322e2f, 0xff322e2f, 0xff322e2f, 0xff322e2f, 0xff322e2f, 0xff322e2f, 0xff322f2f, 0xff322f30, 0xff322f30, 0xff322f30, 0xff322f30, 0xff322f30, 0xff332f30, 0xff332f30, 0xff332f30, 0xff332f30, 0xff332f30, 0xff332f30, 0xff332f30, 0xff332f30, 0xff333030, 0xff333030, 0xff343030, 0xff343031, 0xff2f2c2d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff413e3f, 0xffb2b1b2, 0xfffcfcfc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffefffe, 0xffbbbaba, 0xff4b4748, 0xff1d191a, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xff373435, 0xff3e3a3b, 0xff3e3a3b, 0xff3e3a3b, 0xff3e3b3b, 0xff3e3b3b, 0xff3f3b3b, 0xff3f3b3c, 0xff3f3b3c, 0xff3f3c3c, 0xff3f3b3c, 0xff3f3b3d, 0xff3f3c3d, 0xff3f3c3d, 0xff403c3d, 0xff403c3d, 0xff403c3d, 0xff403c3d, 0xff403d3d, 0xff403d3e, 0xff403d3e, 0xff403d3e, 0xff403d3e, 0xff413d3e, 0xff413d3e, 0xff413d3e, 0xff413e3f, 0xff413e3f, 0xff413e3f, 0xff413e3f, 0xff413e3f, 0xff413e3f, 0xff423e3f, 0xff423e3f, 0xff423f3f, 0xff423f40, 0xff423f40, 0xff423f40, 0xff423f40, 0xff423f40, 0xff433f40, 0xff433f40, 0xff433f40, 0xff433f40, 0xff434041, 0xff3f3c3d, 0xff2a2627, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211c1e, 0xff211c1d, 0xff211c1d, 0xff211c1d, 0xff211c1d, 0xff211c1d, 0xff211c1d, 0xff211c1d, 0xff211c1d, 0xff211c1d, 0xff211c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff211c1d, 0xff231e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff4f4c4d, 0xffcac8c8, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcfcece, 0xff585556, 0xff1f1b1c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff4f4c4d, 0xffd3d3d3, 0xfffefefe, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffd9d8d8, 0xff555152, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff242021, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff454242, 0xffcacaca, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffd1d1d1, 0xff464343, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff444041, 0xffa3a1a2, 0xffb6b4b5, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb6b4b5, 0xff5b5859, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff373334, 0xffb8b7b7, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffc4c3c4, 0xff373334, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff464243, 0xffadabab, 0xffb0afaf, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb1b0b0, 0xffa2a0a1, 0xff474445, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff575454, 0xffeae9ea, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff1f1f1, 0xff464344, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff262223, 0xff928f90, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffa19fa0, 0xff262223, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff383435, 0xffdedddd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff0efef, 0xff5e5b5c, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211c1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffa6a5a5, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff696667, 0xfff4f4f4, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff8f8f8, 0xff7a7778, 0xff1d191a, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff8d8b8c, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe9e8e8, 0xff5c5959, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff9f9f9, 0xff585556, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454143, 0xffdeddde, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e2e2, 0xff535050, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff504c4d, 0xffe9e8e9, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe9e8e8, 0xff5c5959, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffc5c5c5, 0xff2c2829, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff211d1e, 0xffadabab, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffdfdfd, 0xffb3b1b1, 0xff2a2627, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff2f2b2c, 0xffb5b4b4, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe9e8e8, 0xff5c5859, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff8e8b8c, 0xff211e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff5a5758, 0xfff0f0f0, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffebebeb, 0xff636161, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff242021, 0xff838182, 0xfffdfdfd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe8e8e8, 0xff5b5859, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff7f7f7, 0xff5b5959, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff2a2627, 0xffb2b1b2, 0xfffdfdfd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffb2b0b0, 0xff312d2e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff5c5959, 0xffe9e8e8, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe8e8e8, 0xff5b5859, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffd4d4d4, 0xff3c3839, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff5c5a5b, 0xffe9e9e9, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffecebec, 0xff5d5a5b, 0xff221d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff3d393a, 0xffcccbcb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe8e8e8, 0xff5b5859, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffa9a7a8, 0xff2b2728, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff252122, 0xff989696, 0xfffcfcfc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff979596, 0xff272324, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff282325, 0xffa6a4a4, 0xfffefefe, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe8e8e8, 0xff5b5859, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff828080, 0xff242021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff3d393a, 0xffcccacb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffd3d2d2, 0xff3a3637, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201b1d, 0xff817f80, 0xfff6f6f6, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe8e7e8, 0xff5b5859, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff3f3f3, 0xff6a6767, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff666364, 0xfff1f1f1, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffcfcfc, 0xff666465, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff656263, 0xffeeeded, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe8e7e8, 0xff5b5859, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e2e2, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff272224, 0xff908e8f, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff9b9999, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff4c494a, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe8e7e8, 0xff5a5859, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffd2d2d2, 0xff413d3e, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff2e292a, 0xffb5b4b4, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffc4c2c3, 0xff292526, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff373334, 0xffd1d0d0, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe8e7e8, 0xff5a5859, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffbebdbd, 0xff343031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff3d3a3a, 0xffd7d6d6, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffeae9e9, 0xff3b3838, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff262223, 0xffbdbcbc, 0xfffefefe, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe8e7e7, 0xff5a5758, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffb1afb0, 0xff2d292a, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff514d4e, 0xfff3f3f3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffdfcfc, 0xff5a5758, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff211d1e, 0xffadabac, 0xfffdfdfd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe8e7e7, 0xff5a5758, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffa9a8a8, 0xff292627, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff5f5c5d, 0xfffdfefd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff706e6f, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201b1d, 0xffa2a0a0, 0xfffcfcfc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe8e7e7, 0xff5a5758, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffa1a0a0, 0xff252122, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff6c6a6b, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff7e7c7d, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1a1b, 0xff979595, 0xfffcfcfc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe8e7e7, 0xff5a5758, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffdfdfd, 0xff999798, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff7b7879, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff8d8b8b, 0xff191516, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1d1819, 0xff8c8a8b, 0xfffbfbfb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe8e7e7, 0xff5a5757, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffbfbfb, 0xff929191, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff868384, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff989697, 0xff1b1618, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff848182, 0xfffbfbfb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe7e7e7, 0xff5a5757, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffcfcfc, 0xff969595, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff827f80, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff949292, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff888687, 0xfffbfbfb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe7e7e7, 0xff5a5757, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffefefe, 0xff9e9d9d, 0xff241f21, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff777576, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff8a8788, 0xff191516, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1d191a, 0xff929090, 0xfffbfbfb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe7e7e7, 0xff5a5757, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffa5a3a5, 0xff272324, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff6a6768, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff7c7a7a, 0xff1b1618, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1a1b, 0xff9b9a9a, 0xfffcfcfc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe7e7e7, 0xff5a5757, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffadabab, 0xff2b2728, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545051, 0xfff7f6f6, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffefefe, 0xff615e5e, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201c1d, 0xffa4a3a4, 0xfffdfdfd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe7e7e7, 0xff5a5757, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffb9b8b8, 0xff312e2e, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff444243, 0xffe2e2e2, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff5f5f5, 0xff444142, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff231f20, 0xffb5b4b4, 0xfffefefe, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe7e6e6, 0xff5a5657, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcecdcd, 0xff3d393a, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff353132, 0xffc9c7c8, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffdbdada, 0xff312e2f, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff2f2b2c, 0xffcbcaca, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe7e6e6, 0xff595657, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffdedddd, 0xff4c494a, 0xff211d1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff292526, 0xffa1a0a0, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffadacac, 0xff242021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff423f3f, 0xffdbdada, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe7e6e6, 0xff595657, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffececec, 0xff605d5d, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff767374, 0xfffafafa, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff7a7778, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff565354, 0xffe8e8e8, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe7e6e6, 0xff595657, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffafafa, 0xff767475, 0xff221f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff4e4a4b, 0xffdfdede, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe9e9e9, 0xff4a4748, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e191b, 0xff6f6d6d, 0xfff1f0f0, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe7e6e6, 0xff595657, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff9c9b9b, 0xff282526, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff2e2a2b, 0xffb2b0b1, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffb5b3b4, 0xff2d292a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff231f20, 0xff969495, 0xfffbfbfb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe7e6e6, 0xff595657, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffc6c5c5, 0xff343031, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff797677, 0xfff3f3f3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffafafa, 0xff777575, 0xff242021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff312e2f, 0xffbbbaba, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe7e6e6, 0xff595657, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe9e8e9, 0xff4c4849, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff3c393a, 0xffd0cfcf, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcfcece, 0xff413e3f, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff494646, 0xffdbdada, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe7e6e6, 0xff595657, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff716e6f, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1d1a1b, 0xff878585, 0xfffbfbfb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff9f9f9, 0xff8a8989, 0xff231f20, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff6a6768, 0xfff1f1f1, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe6e6e6, 0xff585656, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffafadae, 0xff252123, 0xff231e20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff373335, 0xffd2d2d2, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffd2d2d2, 0xff423e3f, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff282425, 0xff9c9a9a, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe6e6e6, 0xff585556, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffebebeb, 0xff423f3f, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff686566, 0xfffafbfb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff8f8f8, 0xff797677, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff3e3a3b, 0xffd4d3d3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe6e6e6, 0xff585556, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff838081, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff231f20, 0xffa7a5a6, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffbab9b9, 0xff292525, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff6a6768, 0xfffcfcfc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe6e5e6, 0xff585556, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcbcaca, 0xff292627, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff393536, 0xffcecdce, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffdbdbdb, 0xff434041, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff262223, 0xffaeadad, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe6e5e6, 0xff585556, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffafafa, 0xff656264, 0xff1b1718, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff595657, 0xffe2e2e2, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffececec, 0xff636162, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff4d4a4a, 0xffeeeeee, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe6e5e6, 0xff585556, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff292525, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff242021, 0xff71706f, 0xffebeaea, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff1f0f0, 0xff787576, 0xff221f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201c1d, 0xffa5a4a4, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe6e5e5, 0xff585555, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff2f2f2, 0xff676465, 0xff1c1718, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff262223, 0xff7e7c7c, 0xfff2f2f2, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff4f4f4, 0xff827f80, 0xff282425, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff4d4a4b, 0xfff0f0f0, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe6e5e5, 0xff585555, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffefefe, 0xffb8b7b7, 0xff2b2729, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff242021, 0xff797777, 0xfff2f2f1, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff2f1f2, 0xff807e7f, 0xff282425, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201b1c, 0xffa9a7a7, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe6e5e5, 0xff585555, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffefefef, 0xff6d6b6b, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1a1b, 0xff6c696a, 0xffe7e7e7, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffeae9e9, 0xff777475, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff5c595a, 0xfff0efef, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe6e5e5, 0xff585455, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffc4c3c4, 0xff3b3839, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1c1819, 0xff4f4c4d, 0xffc4c3c3, 0xfffbfafb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffbfbfb, 0xffcccacb, 0xff585656, 0xff1c1819, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff322e2f, 0xffbebdbd, 0xfffefefe, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe6e5e5, 0xff585455, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffbfbfb, 0xff858384, 0xff242021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff373435, 0xff929091, 0xffe1e0e0, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe4e4e4, 0xff999797, 0xff3b3839, 0xff1c1819, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff7d7a7a, 0xfff5f5f5, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe5e5e5, 0xff575455, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe1e0e0, 0xff4e4b4c, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201b1c, 0xff252122, 0xff565354, 0xffa9a7a8, 0xffededed, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff0f0f0, 0xffaeacad, 0xff5a5758, 0xff272324, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff484546, 0xffd4d3d3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe5e5e5, 0xff575455, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffc1c0c0, 0xff302d2e, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff211d1e, 0xff2d292a, 0xff575354, 0xffa5a4a4, 0xffebebeb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffefefef, 0xffadabac, 0xff5b5959, 0xff2e2b2c, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff2e2b2b, 0xffaeacad, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe5e5e5, 0xff575455, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff9d9b9c, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff272324, 0xff444142, 0xff838182, 0xffcac9ca, 0xfff2f2f2, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff3f3f4, 0xffcdcccd, 0xff888686, 0xff474444, 0xff282425, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff838182, 0xfffdfefe, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe5e5e5, 0xff575455, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff9fafa, 0xff747172, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff1e191a, 0xff272425, 0xff454243, 0xff767373, 0xffa3a1a2, 0xffc4c3c3, 0xffdddbdc, 0xffe7e6e6, 0xffebebeb, 0xffefefef, 0xffefefef, 0xffecebeb, 0xffe7e7e7, 0xffdedede, 0xffc5c4c5, 0xffa6a4a5, 0xff7a7777, 0xff494546, 0xff292526, 0xff1e1a1b, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1a1c, 0xff5c595a, 0xfff1f1f1, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe5e4e5, 0xff575455, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe6e5e5, 0xff5f5c5d, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e191a, 0xff1a1517, 0xff1d191a, 0xff242021, 0xff302c2d, 0xff413d3e, 0xff4a4747, 0xff524f50, 0xff535051, 0xff4b4748, 0xff423e3f, 0xff312e2e, 0xff252122, 0xff1e1a1b, 0xff1a1517, 0xff1d191a, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231e20, 0xff1f1b1b, 0xff4e4c4c, 0xffdddcdc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe5e4e5, 0xff575455, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffd7d7d7, 0xff565354, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1f1b1c, 0xff1e1a1b, 0xff1d191a, 0xff1c1819, 0xff1c1819, 0xff1d1819, 0xff1e1a1b, 0xff1f1b1c, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff4b4849, 0xffd0d0d0, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe5e5e5, 0xff575455, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcccccc, 0xff4a4748, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff444041, 0xffc5c4c4, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe5e5e4, 0xff565354, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcccbcb, 0xff484546, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff433f40, 0xffc1c0c0, 0xfffefefe, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe5e5e4, 0xff565354, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffdad9d9, 0xff504d4e, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff454243, 0xffcccacb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe5e4e4, 0xff565354, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff5e5c5c, 0xff211e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221d1e, 0xff504d4e, 0xffd6d6d6, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe5e4e4, 0xff565354, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe9e9ea, 0xff7d7b7b, 0xff2e2a2b, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff2a2627, 0xff726f6f, 0xffe2e2e2, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe5e4e4, 0xff565354, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff6f5f6, 0xffa4a3a4, 0xff423e3f, 0xff1e1a1b, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1d191a, 0xff3c3839, 0xff9b9a9a, 0xfff3f2f2, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe5e4e4, 0xff565354, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffefefe, 0xffcac9ca, 0xff666464, 0xff231e1f, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff211d1e, 0xff5d5b5b, 0xffc3c2c2, 0xfffbfbfb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe4e4e4, 0xff565354, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff0efef, 0xffa9a8a9, 0xff433f40, 0xff1c1718, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1b1718, 0xff393637, 0xff9d9c9c, 0xffececec, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe4e4e4, 0xff565354, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffefefe, 0xffe3e1e1, 0xff7e7b7b, 0xff2f2b2c, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201b1d, 0xff2b2628, 0xff737171, 0xffdcdcdc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe4e4e4, 0xff565354, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcccbcb, 0xff727070, 0xff363233, 0xff241f20, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff332f30, 0xff6b696a, 0xffc5c4c5, 0xfffdfdfd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe4e4e4, 0xff565354, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcac9ca, 0xff7d7a7b, 0xff484445, 0xff2b2728, 0xff201c1d, 0xff1f1b1c, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff1f1b1c, 0xff2a2627, 0xff444142, 0xff767374, 0xffc3c2c2, 0xfffcfbfb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe4e4e4, 0xff565254, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffdfcfd, 0xffdad9d9, 0xffa9a7a8, 0xff716e6f, 0xff413d3e, 0xff252122, 0xff1d191a, 0xff1b1718, 0xff1f1b1c, 0xff221d1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201c1d, 0xff1c1819, 0xff1d1819, 0xff242021, 0xff3d3a3b, 0xff6c6a6b, 0xffa4a2a3, 0xffd6d5d6, 0xfff9fafa, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe4e4e4, 0xff565254, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff1f1f1, 0xffd5d3d3, 0xffb0aeaf, 0xff838182, 0xff575455, 0xff322e30, 0xff221d1f, 0xff1c1819, 0xff191516, 0xff1b1718, 0xff1e1a1b, 0xff1f1b1c, 0xff201c1d, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211c1d, 0xff201c1d, 0xff1f1b1c, 0xff1e1a1b, 0xff1b1718, 0xff191516, 0xff1b1718, 0xff201c1d, 0xff302d2d, 0xff545253, 0xff7f7d7d, 0xffadabab, 0xffd2d1d1, 0xffefefef, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe4e4e4, 0xff565253, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffdfdfd, 0xfff8f8f8, 0xffeeeeee, 0xffd8d7d7, 0xffb7b6b6, 0xff989697, 0xff7a7778, 0xff5d595a, 0xff444041, 0xff363334, 0xff2f2c2d, 0xff2c2829, 0xff2a2526, 0xff292627, 0xff2c2829, 0xff2f2b2c, 0xff363234, 0xff413e3f, 0xff5b5758, 0xff777576, 0xff959494, 0xffb5b4b4, 0xffd5d5d5, 0xffededed, 0xfff8f7f7, 0xfffdfdfd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe4e4e3, 0xff565253, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff9f9f9, 0xfff0f0f0, 0xffececec, 0xffe7e7e7, 0xffdedede, 0xffd4d3d3, 0xffd3d2d2, 0xffdddddc, 0xffe7e6e6, 0xffebebeb, 0xffefefef, 0xfff8f8f8, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe4e4e4, 0xff555253, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe4e3e4, 0xff555253, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe4e3e4, 0xff555253, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211c1d, 0xff555252, 0xffe4e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe4e3e4, 0xff565253, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff524f50, 0xffe2e1e2, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe2e1e2, 0xff524f50, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff484445, 0xffdad9d9, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffdad9d9, 0xff474445, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff3d3a3b, 0xffd0cfd0, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcfcfcf, 0xff3d3a3a, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff363233, 0xffc1bfc0, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffbfbebe, 0xff343132, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff272324, 0xff9e9c9d, 0xfffdfdfd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffcfcfc, 0xff9d9b9b, 0xff272223, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff6d6a6b, 0xfff0f0f0, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff0f0f0, 0xff6c696a, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff403d3e, 0xffd9d8d8, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffd9d8d8, 0xff403c3d, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201c1d, 0xff969495, 0xfffcfcfc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffcfcfc, 0xff959394, 0xff201b1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff3e3a3b, 0xffdedddd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffdddcdd, 0xff3d393a, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff807e7f, 0xfffbfbfb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffbfbfb, 0xff7e7c7c, 0xff1b1718, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff292526, 0xffa5a3a4, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffa2a1a1, 0xff282525, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff363233, 0xffb9b8b8, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffb6b4b5, 0xff343132, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff423e3f, 0xffb8b6b6, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffb3b2b2, 0xff3f3c3c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff353132, 0xffa4a3a4, 0xfffbfbfb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffaf9fa, 0xffa09e9f, 0xff333031, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff292526, 0xff7c7979, 0xffd9d9d9, 0xfffbfbfb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffbfbfb, 0xffd7d5d6, 0xff777474, 0xff272324, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1b1617, 0xff3a3636, 0xff8e8c8d, 0xffd1d0d0, 0xffebebeb, 0xfffbfbfb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffafafa, 0xffeaeaea, 0xffcecdce, 0xff8a8888, 0xff373333, 0xff1a1617, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff1f1a1c, 0xff393536, 0xff625f60, 0xff929090, 0xffb2b0b1, 0xffc2c0c1, 0xffcecece, 0xffd7d6d6, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd7d6d6, 0xffcecdcd, 0xffc0bfc0, 0xffb1afb0, 0xff908e8e, 0xff605c5d, 0xff373334, 0xff1e1a1b, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201c1d, 0xff1e1a1b, 0xff242021, 0xff2e2a2b, 0xff363233, 0xff3d393a, 0xff434041, 0xff454242, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454242, 0xff434041, 0xff3c393a, 0xff363233, 0xff2e2a2b, 0xff231f20, 0xff1e1a1b, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff232021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff232020, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff232020, 0xff232021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff232021, 0xff232021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff252122, 0xff252122, 0xff252122, 0xff262223, 0xff242021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff393536, 0xffa1a0a0, 0xffb3b2b3, 0xffb1b0b0, 0xff726f70, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff4c4849, 0xffa9a7a7, 0xffb3b2b2, 0xffb2b0b0, 0xff5b5859, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff231f20, 0xff787576, 0xffb4b2b2, 0xffb4b2b3, 0xffa09e9f, 0xff312d2e, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff242021, 0xff8c8a8b, 0xffb5b3b3, 0xffb4b2b3, 0xff898788, 0xff2e2a2b, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff322e2f, 0xff807d7e, 0xff8d8b8c, 0xff8d8b8b, 0xff8e8c8d, 0xff625f60, 0xff262323, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff464343, 0xffebebeb, 0xffffffff, 0xffffffff, 0xffa09e9f, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff646162, 0xfff3f3f3, 0xffffffff, 0xffffffff, 0xff7c7a7b, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa9a7a7, 0xffffffff, 0xffffffff, 0xffe8e8e8, 0xff393536, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff252022, 0xffcac9ca, 0xffffffff, 0xffffffff, 0xffc5c4c5, 0xff343132, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff6b6869, 0xfff4f4f4, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcbcaca, 0xff3b3839, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b999a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xffe2e2e2, 0xff383535, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c2c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff262223, 0xffacabab, 0xfffdfdfd, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff6f5f5, 0xff666364, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff464343, 0xffebebea, 0xffffffff, 0xffffffff, 0xffa09e9e, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xffe2e2e2, 0xff383535, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff4a4747, 0xffdddcdc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffa6a4a5, 0xff282425, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff393536, 0xffa4a2a3, 0xffb6b4b5, 0xffb4b2b3, 0xff727071, 0xff211e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xffe2e2e2, 0xff383535, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211e1f, 0xff7e7c7e, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xffd8d7d7, 0xfffdfdfd, 0xffffffff, 0xffe4e3e3, 0xff413d3e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff242021, 0xff242021, 0xff241f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xffe2e2e2, 0xff383535, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff322e2f, 0xffb8b7b7, 0xffffffff, 0xffffffff, 0xffd7d7d7, 0xff656263, 0xfff0f0f0, 0xffffffff, 0xffffffff, 0xff7c797a, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xffe2e2e2, 0xff383535, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff211d1e, 0xff211c1d, 0xff211d1e, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff555353, 0xffe7e7e6, 0xffffffff, 0xffffffff, 0xff939292, 0xff2c2829, 0xffc3c1c2, 0xffffffff, 0xffffffff, 0xffc7c6c6, 0xff292627, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff221e1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff1d191a, 0xff211d1e, 0xff282425, 0xff343031, 0xff3b3738, 0xff3e3a3b, 0xff3a3738, 0xff353132, 0xff282425, 0xff201b1d, 0xff1f1b1c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1e1a1b, 0xff1f1a1b, 0xff242021, 0xff2e2a2b, 0xff383435, 0xff3d393a, 0xff3d393a, 0xff383536, 0xff2f2c2d, 0xff221f20, 0xff1e1a1b, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xffe2e2e2, 0xff383535, 0xff1f1a1c, 0xff1f1b1c, 0xff201c1d, 0xff2c282a, 0xff393637, 0xff3e3a3b, 0xff3c3839, 0xff312d2e, 0xff231f20, 0xff1f1b1c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1e1a1b, 0xff211d1e, 0xff2c292a, 0xff383535, 0xff3d3a3a, 0xff3e3a3b, 0xff373435, 0xff2b2728, 0xff201c1d, 0xff1f1b1c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff252122, 0xff8d8b8c, 0xffffffff, 0xffffffff, 0xfff3f4f4, 0xff4d494b, 0xff201c1d, 0xff868485, 0xfffefefe, 0xffffffff, 0xfff9f8f8, 0xff585556, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff454243, 0xff8a8889, 0xff8b8989, 0xff8b898a, 0xff464344, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff565354, 0xff8d8b8c, 0xff8b8a89, 0xff848283, 0xff363233, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1f, 0xff373334, 0xff5f5c5d, 0xff878586, 0xffa8a7a7, 0xffbebcbd, 0xffcbc9ca, 0xffd0d0d0, 0xffcbcaca, 0xffbfbebe, 0xffa6a4a4, 0xff7b7879, 0xff3f3c3d, 0xff1e1a1b, 0xff221d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211c1d, 0xff332f30, 0xff7d7b7c, 0xff8a8888, 0xff898787, 0xff5b5858, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff282425, 0xff4a4647, 0xff727070, 0xff999797, 0xffb3b1b2, 0xffc5c4c4, 0xffcfcece, 0xffcfcdce, 0xffc6c5c5, 0xffb6b4b5, 0xff939292, 0xff5f5d5d, 0xff2b2728, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xffe2e2e2, 0xff373434, 0xff1a1617, 0xff3c3839, 0xff7d7b7b, 0xffaeadad, 0xffc7c6c7, 0xffd1d0d0, 0xffcccbcb, 0xffb9b8b8, 0xff8f8d8e, 0xff4d494a, 0xff1f1b1c, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff242021, 0xff514d4e, 0xff8a8788, 0xffb0aeaf, 0xffc5c4c4, 0xffcfcece, 0xffd0cfcf, 0xffc5c4c4, 0xffacabab, 0xff807d7e, 0xff423f40, 0xff1d1a1b, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff363233, 0xffcdcccc, 0xffffffff, 0xffffffff, 0xffbdbcbc, 0xff272324, 0xff201c1d, 0xff524f50, 0xffe3e2e3, 0xffffffff, 0xffffffff, 0xffa4a2a2, 0xff1e191a, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff4e4b4b, 0xffe1e0e0, 0xfffcfcfc, 0xfffefefe, 0xff9d9b9c, 0xff1e1a1b, 0xff231e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff282425, 0xffbab9b9, 0xfffefefe, 0xfffefefe, 0xffcccbcb, 0xff363233, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221d1f, 0xff7e7c7d, 0xffcfcece, 0xffeaeaea, 0xfff7f7f8, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffefefe, 0xfff5f5f5, 0xffd7d7d7, 0xff7c7a7b, 0xff221f20, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e191a, 0xff434041, 0xffdfdedf, 0xfff9f8f8, 0xfff5f5f5, 0xff989697, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff413e3e, 0xffabaaaa, 0xffdfdfdf, 0xfff1f1f1, 0xfffcfcfc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffbfbfb, 0xffebebeb, 0xffb4b3b3, 0xff454142, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xffe2e2e2, 0xff363334, 0xff585556, 0xffcac9c9, 0xfff5f4f5, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffafafa, 0xffdfdede, 0xff858283, 0xff252223, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff393536, 0xff9f9d9d, 0xffe3e2e3, 0xfff9f8f9, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff6f5f6, 0xffd7d6d6, 0xff7c7a7a, 0xff252021, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff625f60, 0xfffbfbfb, 0xffffffff, 0xffffffff, 0xff757374, 0xff1f1b1c, 0xff221e1f, 0xff302c2d, 0xffb6b5b5, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff3b3738, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff302c2d, 0xffb4b3b3, 0xffffffff, 0xffffffff, 0xffe2e2e2, 0xff363233, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff4d4a4b, 0xfff5f5f5, 0xffffffff, 0xffffffff, 0xff929090, 0xff252223, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff231f20, 0xffb7b7b7, 0xfffefefe, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff8f8f8, 0xfff3f3f4, 0xfff2f2f2, 0xfff6f6f6, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff8f8f8, 0xff949393, 0xff221d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b9a9a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff585556, 0xffe5e4e4, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffcfcfc, 0xfff5f6f5, 0xfff2f2f3, 0xfff3f3f3, 0xfffbfafb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffd8d7d7, 0xff484445, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xffe2e1e1, 0xff6b6869, 0xffdadada, 0xffffffff, 0xffffffff, 0xfff9faf9, 0xfff1f1f1, 0xfff2f2f2, 0xfffcfcfc, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff5f4f5, 0xff918f90, 0xff262122, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff444142, 0xffcdcccd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff9f9f9, 0xfff3f3f3, 0xfff3f3f3, 0xfffcfcfc, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff4f3f4, 0xff929091, 0xff272324, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xffa9a8a9, 0xffffffff, 0xffffffff, 0xffe0dfdf, 0xff403c3d, 0xff221e1f, 0xff231f20, 0xff201c1d, 0xff7e7c7c, 0xfff5f5f5, 0xffffffff, 0xfffcfcfc, 0xff7b787a, 0xff1b1718, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff797878, 0xfff7f7f7, 0xffffffff, 0xffffffff, 0xff747272, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff949293, 0xffffffff, 0xffffffff, 0xffebeaeb, 0xff585455, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff231f20, 0xffb8b6b7, 0xfff7f7f7, 0xffd5d5d5, 0xff9c9b9b, 0xff6f6d6d, 0xff514e4f, 0xff413e3f, 0xff3e3a3b, 0xff4b4849, 0xff726f70, 0xffb6b5b5, 0xfff2f2f2, 0xffffffff, 0xffffffff, 0xfff5f5f5, 0xff6f6c6d, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b999a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff595656, 0xffe4e4e4, 0xffedecec, 0xffbbbaba, 0xff848282, 0xff5f5d5d, 0xff484445, 0xff3e3a3b, 0xff423e3f, 0xff5a5758, 0xff8e8c8d, 0xffd8d8d8, 0xfffdfdfd, 0xffffffff, 0xffffffff, 0xffc5c4c4, 0xff2e2a2b, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xfff0f0f0, 0xffd7d7d7, 0xffffffff, 0xffeeeded, 0xff9e9c9c, 0xff575354, 0xff3a3738, 0xff3d3a3b, 0xff646061, 0xffb7b5b5, 0xfff7f6f6, 0xffffffff, 0xffffffff, 0xfff0f0f0, 0xff716e6f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff3c3839, 0xffd1d0d1, 0xffffffff, 0xffffffff, 0xfffcfcfc, 0xffd7d6d6, 0xff8d8b8b, 0xff575455, 0xff413e3e, 0xff413e3f, 0xff5d5a5b, 0xffa2a0a0, 0xffedecec, 0xffffffff, 0xffffffff, 0xfff2f2f2, 0xff777575, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff403c3d, 0xffe9e9e9, 0xffffffff, 0xffffffff, 0xffa5a4a4, 0xff292525, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff484546, 0xffdedddd, 0xffffffff, 0xfffefefe, 0xffbfbebe, 0xff2a2627, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff494546, 0xffd9d8d8, 0xffffffff, 0xffffffff, 0xffbcbbbc, 0xff242122, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff322e2f, 0xffd9dad9, 0xffffffff, 0xffffffff, 0xffbdbcbd, 0xff343132, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff262122, 0xff817f7f, 0xff6a6768, 0xff2d292a, 0xff1b1718, 0xff1a1517, 0xff1d191a, 0xff1f1b1c, 0xff1f1b1c, 0xff1e1a1b, 0xff1a1617, 0xff231f20, 0xff767274, 0xffe8e8e8, 0xffffffff, 0xffffffff, 0xffc7c5c6, 0xff332f31, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b999a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff494647, 0xff858383, 0xff484546, 0xff231e20, 0xff191516, 0xff1c1819, 0xff1e1a1b, 0xff1f1b1c, 0xff1f1b1c, 0xff1c1819, 0xff1b1718, 0xff3d393a, 0xffb0afaf, 0xfffbfbfb, 0xffffffff, 0xfffdfdfd, 0xff777576, 0xff1b1718, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe2e1e1, 0xff686666, 0xff1f1b1c, 0xff1c1819, 0xff1f1b1c, 0xff1f1b1c, 0xff1a1617, 0xff242021, 0xff8c8a8b, 0xfff6f6f6, 0xffffffff, 0xffffffff, 0xffcdcccc, 0xff3f3c3d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff282425, 0xffadabab, 0xffffffff, 0xffffffff, 0xfff8f7f8, 0xffa7a6a6, 0xff393637, 0xff1b1618, 0xff1c1819, 0xff1f1b1c, 0xff1f1b1c, 0xff1b1718, 0xff1b1718, 0xff605d5e, 0xffe0dfe0, 0xffffffff, 0xffffffff, 0xffd4d3d3, 0xff434041, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff838181, 0xffffffff, 0xffffffff, 0xfff5f5f5, 0xff686566, 0xff221f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff252223, 0xffaeadae, 0xfffdfdfd, 0xffffffff, 0xffe8e8e8, 0xff575455, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff282526, 0xffa9a8a8, 0xfffdfdfd, 0xffffffff, 0xffededed, 0xff4f4b4c, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff6b696a, 0xfffcfcfc, 0xffffffff, 0xfff9f9f9, 0xff858283, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff242021, 0xff221e1f, 0xff1c1819, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff1b1718, 0xff888687, 0xfffbfbfb, 0xffffffff, 0xffecebeb, 0xff625e60, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b999a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff241f21, 0xff1e1a1b, 0xff1d191a, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff3e3a3b, 0xffcfcece, 0xffffffff, 0xffffffff, 0xffbebdbe, 0xff272324, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xffffffff, 0xfff3f3f3, 0xff7e7b7c, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff221e20, 0xffa5a3a3, 0xffffffff, 0xffffffff, 0xfffcfcfc, 0xff7a7878, 0xff242021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff656262, 0xffeeeeee, 0xffffffff, 0xfffefefe, 0xffb6b4b5, 0xff302d2e, 0xff1d1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1a1516, 0xff686566, 0xfff6f6f6, 0xffffffff, 0xffffffff, 0xff807e7f, 0xff242021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff2a2728, 0xffcecdcd, 0xffffffff, 0xffffffff, 0xffcecdcd, 0xff3e3b3b, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff6d6b6c, 0xfff6f6f6, 0xffffffff, 0xfffafafa, 0xff939292, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff6d6a6b, 0xfff2f2f2, 0xffffffff, 0xfffbfbfb, 0xff918e8f, 0xff1e1a1b, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff221e1f, 0xffb4b2b2, 0xffffffff, 0xffffffff, 0xffe0dfdf, 0xff504c4d, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff3a3637, 0xffe6e5e6, 0xffffffff, 0xfff9f9f9, 0xff898788, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b999a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1c1819, 0xff8f8c8d, 0xfffafafa, 0xffffffff, 0xffe0dfdf, 0xff423f40, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xfffefefe, 0xffc9c8c9, 0xff343031, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff423e3f, 0xffe7e7e7, 0xffffffff, 0xffffffff, 0xffb9b8b8, 0xff2e2a2b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff282526, 0xffa9a7a7, 0xfffdfdfd, 0xffffffff, 0xffededed, 0xff545152, 0xff1b1718, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff252222, 0xffb5b4b3, 0xffffffff, 0xffffffff, 0xffbcbcbc, 0xff2e2a2b, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20,
- 0xfd231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff5f5d5d, 0xfff8f8f8, 0xffffffff, 0xfffefefe, 0xff999798, 0xff272324, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff343132, 0xffdad9d9, 0xffffffff, 0xffffffff, 0xffcac9c9, 0xff3b3738, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff383435, 0xffd4d3d4, 0xffffffff, 0xffffffff, 0xffcac9c9, 0xff353132, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff484545, 0xffe5e5e5, 0xffffffff, 0xfffefefe, 0xffb4b2b2, 0xff2b2727, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1d191a, 0xff191516, 0xff191516, 0xff1b1718, 0xff1c1819, 0xff1d191a, 0xff1d191a, 0xff1b1718, 0xff201b1c, 0xffc9c8c9, 0xffffffff, 0xffffffff, 0xffa4a3a3, 0xff292526, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b999a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff1b1718, 0xff181415, 0xff1a1517, 0xff1c1819, 0xff1d191a, 0xff1d191a, 0xff1d191a, 0xff130f10, 0xff686566, 0xfff6f6f6, 0xffffffff, 0xffededed, 0xff5d5a5a, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xfffbfbfb, 0xff8e8c8d, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xffaba9aa, 0xffffffff, 0xffffffff, 0xffe6e5e5, 0xff413f40, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff413e3f, 0xffd3d2d3, 0xffffffff, 0xffffffff, 0xffbfbebe, 0xff252122, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff757374, 0xffffffff, 0xffffffff, 0xffe4e4e4, 0xff3f3c3d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xfd231f20,
- 0xf2231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201b1c, 0xffa8a7a7, 0xffffffff, 0xffffffff, 0xffeaeaea, 0xff625f60, 0xff201b1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff999898, 0xffffffff, 0xffffffff, 0xffeeeeee, 0xff676466, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1a1b, 0xff999898, 0xfffdfdfd, 0xffffffff, 0xffebebeb, 0xff636161, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1d191b, 0xff858384, 0xfff8f7f7, 0xffffffff, 0xfff5f5f5, 0xff767475, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff2d292a, 0xff504d4e, 0xff767474, 0xff8e8c8d, 0xff989797, 0xffa09e9f, 0xffa1a0a0, 0xffa1a0a0, 0xffa09f9f, 0xffa1a0a0, 0xffe4e4e4, 0xffffffff, 0xffffffff, 0xffb1afb0, 0xff2e2b2c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b999a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201b1c, 0xff221f20, 0xff3c3839, 0xff636061, 0xff838182, 0xff949292, 0xff9d9c9c, 0xffa1a0a0, 0xffa1a0a0, 0xffa1a0a0, 0xff9d9c9c, 0xffbdbcbc, 0xfffbfbfb, 0xffffffff, 0xfff1f1f1, 0xff6a6768, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xfff7f7f7, 0xff636060, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff7b7979, 0xffffffff, 0xffffffff, 0xfffcfcfc, 0xff5a5758, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff5c5959, 0xffe7e7e7, 0xffffffff, 0xffffffff, 0xff908e8f, 0xff171213, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff1e1a1b, 0xff555253, 0xfffbfbfb, 0xffffffff, 0xfffafafa, 0xff514e4f, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf2231f20,
- 0xe5231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff403d3e, 0xffdfdfdf, 0xffffffff, 0xffffffff, 0xffc8c7c7, 0xff353233, 0xff201b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff514f4f, 0xfff5f5f5, 0xffffffff, 0xffffffff, 0xffa19f9f, 0xff2a2627, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff555153, 0xfff2f1f1, 0xffffffff, 0xfffdfdfd, 0xff9d9b9b, 0xff272324, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff302c2d, 0xffc0bfbf, 0xffffffff, 0xffffffff, 0xffdcdcdc, 0xff3d3a3b, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff373334, 0xff888586, 0xffd3d2d2, 0xfff9f8f8, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffbab9b9, 0xff332f30, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b999a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff262223, 0xff5a5757, 0xffb0afaf, 0xffebeaea, 0xfffefefe, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff3f3f3, 0xff747172, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xffebebeb, 0xff494647, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff5a5859, 0xfffdfdfd, 0xffffffff, 0xffffffff, 0xff737171, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff706e6f, 0xfff3f3f3, 0xffffffff, 0xffffffff, 0xffcdcccc, 0xffa6a4a4, 0xffaaa9a9, 0xffaaa8aa, 0xffaaa9a9, 0xffaaa9a9, 0xffaba9a9, 0xffaba9aa, 0xffabaaaa, 0xffababaa, 0xffacabaa, 0xffabaaab, 0xffbdbcbc, 0xfffcfcfc, 0xffffffff, 0xfffefeff, 0xff625e5f, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xe5231f20,
- 0xd4231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff7d7a7b, 0xfff7f7f7, 0xffffffff, 0xfffafafa, 0xff959393, 0xff242021, 0xff282425, 0xff292526, 0xff292526, 0xff292526, 0xff292526, 0xff292526, 0xff272324, 0xff2b2728, 0xffc7c6c6, 0xffffffff, 0xffffffff, 0xffd9d8d8, 0xff433f40, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff252223, 0xffc5c3c4, 0xffffffff, 0xffffffff, 0xffd0d0d0, 0xff403d3e, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff5a5758, 0xffe8e7e7, 0xffffffff, 0xffffffff, 0xffa3a2a2, 0xff1e1a1b, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff565354, 0xffcfcece, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffefefe, 0xfff7f7f7, 0xfff1f1f1, 0xffeeedee, 0xffececec, 0xffecebeb, 0xffecebeb, 0xffecebeb, 0xfffaf9f9, 0xffffffff, 0xffffffff, 0xffbcbbbc, 0xff343031, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b999a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff2f2b2c, 0xff8f8d8d, 0xfff3f2f2, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffbfbfb, 0xfff4f4f4, 0xffefefef, 0xffededed, 0xffecebeb, 0xffecebeb, 0xffebeaeb, 0xfff1f1f1, 0xfffefefe, 0xffffffff, 0xfff4f4f4, 0xff787676, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xffe5e5e5, 0xff3e3b3b, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff4f4c4c, 0xfff8f8f8, 0xffffffff, 0xffffffff, 0xff827f80, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff7c7a7a, 0xfffbfafa, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff686565, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xd4231f20,
- 0xb4231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff2e2a2b, 0xffbab8b9, 0xfffefefe, 0xffffffff, 0xfffafafa, 0xffbbb9ba, 0xff979696, 0xff9b9a9a, 0xff9b9a9a, 0xff9b9a9a, 0xff9b9a9a, 0xff9b9a9a, 0xff9b9a9a, 0xff9c9a9a, 0xff979696, 0xffcfcfcf, 0xffffffff, 0xffffffff, 0xfffefefe, 0xff757273, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1717, 0xff7a7778, 0xffffffff, 0xffffffff, 0xfff4f4f4, 0xff6d6a6b, 0xff231e1f, 0xff231f20, 0xff221e1f, 0xff252122, 0xff918f8f, 0xfffcfbfb, 0xffffffff, 0xfff7f7f7, 0xff5b5859, 0xff1b1718, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff494647, 0xffd3d2d2, 0xffffffff, 0xffffffff, 0xfff9f9f9, 0xffcccccc, 0xffa1a0a0, 0xff848383, 0xff726f70, 0xff676465, 0xff625f60, 0xff605d5e, 0xff5f5c5d, 0xff625e5f, 0xffd3d2d2, 0xffffffff, 0xffffffff, 0xffbcbbbb, 0xff343031, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b999a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff272324, 0xff858383, 0xfff8f8f8, 0xffffffff, 0xffffffff, 0xffe8e7e7, 0xffb6b5b5, 0xff929191, 0xff7b7879, 0xff6c6969, 0xff656263, 0xff615e5f, 0xff615e5e, 0xff5a5758, 0xff908e8e, 0xfff8f8f8, 0xffffffff, 0xfff4f4f4, 0xff777576, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xffe3e3e3, 0xff3b3838, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221d1e, 0xff4d4a4b, 0xfff6f6f6, 0xffffffff, 0xffffffff, 0xff848182, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff807d7e, 0xfffdfdfd, 0xffffffff, 0xffffffff, 0xffe9e8e8, 0xffdfdede, 0xffe0dfdf, 0xffe0dfdf, 0xffe0dfdf, 0xffe0dfdf, 0xffe0dfdf, 0xffe0dfdf, 0xffe0dfdf, 0xffe0dfdf, 0xffe0dfdf, 0xffe0dfdf, 0xffe0dfdf, 0xffe0dfdf, 0xffe1e0e0, 0xffe0e0e0, 0xff5e5b5c, 0xff211c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xb4231f20,
- 0x8e231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff565354, 0xffe4e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffb9b8b8, 0xff2a2627, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff3a3738, 0xffe4e3e4, 0xffffffff, 0xffffffff, 0xffa8a6a7, 0xff2b2728, 0xff231f20, 0xff221e1f, 0xff3a3637, 0xffc7c6c6, 0xffffffff, 0xffffffff, 0xffcbcbcb, 0xff292527, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff272324, 0xff9b9999, 0xfffdfdfd, 0xffffffff, 0xfff9f8f8, 0xff949192, 0xff3d393a, 0xff262223, 0xff201c1d, 0xff1e1a1b, 0xff1e1a1b, 0xff1e191a, 0xff1d191a, 0xff1b1718, 0xff1f1b1c, 0xffc6c5c5, 0xffffffff, 0xffffffff, 0xffbcbbbb, 0xff343031, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b999a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff484445, 0xffdadada, 0xffffffff, 0xffffffff, 0xffd4d2d2, 0xff5c595a, 0xff2f2b2c, 0xff221e1f, 0xff1f1b1c, 0xff1e1a1b, 0xff1e1a1b, 0xff1d191a, 0xff1d191a, 0xff140f10, 0xff656363, 0xfff5f5f5, 0xffffffff, 0xfff4f4f4, 0xff777576, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xffe7e7e7, 0xff423e3f, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff534f50, 0xfffafbfb, 0xffffffff, 0xffffffff, 0xff7c797a, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff7b7879, 0xfffafafa, 0xffffffff, 0xffffffff, 0xff8c8a8a, 0xff484545, 0xff504d4e, 0xff504d4d, 0xff504d4d, 0xff504d4d, 0xff504d4d, 0xff504d4d, 0xff504d4d, 0xff504d4d, 0xff504d4d, 0xff504d4d, 0xff504d4d, 0xff504d4d, 0xff504d4e, 0xff504d4e, 0xff312e2e, 0xff221f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0x8e231f20,
- 0x62231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff252122, 0xff8e8b8b, 0xfffcfbfb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff2f1f2, 0xff4d4a4b, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xffa2a1a1, 0xffffffff, 0xffffffff, 0xffe1e0e0, 0xff434041, 0xff221e1f, 0xff221e1f, 0xff625f5f, 0xfff1f1f1, 0xffffffff, 0xffffffff, 0xff818080, 0xff1b1718, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff3f3b3c, 0xffcfcecf, 0xffffffff, 0xffffffff, 0xffbdbcbc, 0xff292526, 0xff1f1b1c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff292627, 0xffd8d7d7, 0xffffffff, 0xffffffff, 0xffbcbbbb, 0xff343031, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b999a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff232021, 0xff757273, 0xfffdfdfd, 0xffffffff, 0xfffafafa, 0xff5f5d5d, 0xff1e1a1b, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff787676, 0xfff7f7f7, 0xffffffff, 0xfff4f4f4, 0xff777576, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xfff1f1f1, 0xff545152, 0xff1b1718, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff686566, 0xffffffff, 0xffffffff, 0xffffffff, 0xff676566, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff6d6a6b, 0xfff1f1f1, 0xffffffff, 0xffffffff, 0xff858384, 0xff171213, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff231e20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0x62231f20,
- 0x2e231f20, 0xf0231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff393536, 0xffc6c5c5, 0xffffffff, 0xffffffff, 0xfff0f0f0, 0xffa6a4a5, 0xffa2a0a1, 0xffa3a1a1, 0xffa3a1a1, 0xffa3a1a1, 0xffa3a1a1, 0xffa3a1a1, 0xffa3a1a1, 0xffa3a1a1, 0xffa3a1a1, 0xffa3a1a1, 0xffa2a1a2, 0xffb6b4b4, 0xfff7f7f7, 0xffffffff, 0xffffffff, 0xff929192, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff5b5758, 0xfff9fafa, 0xffffffff, 0xffffffff, 0xff7a7878, 0xff211d1e, 0xff272324, 0xff9d9b9c, 0xffffffff, 0xffffffff, 0xffebeaea, 0xff3f3c3d, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff535051, 0xffe2e2e2, 0xffffffff, 0xffffffff, 0xff7f7d7d, 0xff1a1517, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffededed, 0xffffffff, 0xffffffff, 0xffbcbbbb, 0xff343031, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b999a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff252122, 0xff979697, 0xffffffff, 0xffffffff, 0xffd5d5d6, 0xff312d2e, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201b1c, 0xff9c9a9b, 0xfffbfbfb, 0xffffffff, 0xfff4f4f4, 0xff777576, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xfff9f9f9, 0xff747272, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201b1c, 0xff8f8d8e, 0xffffffff, 0xffffffff, 0xfff5f4f4, 0xff4d4a4b, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff555152, 0xffe3e2e2, 0xffffffff, 0xffffffff, 0xffb7b6b6, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf0231f20, 0x2e231f20,
- 0x11231f20, 0xc4231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221f20, 0xff605e5f, 0xfff1f1f1, 0xffffffff, 0xffffffff, 0xffacabab, 0xff1a1718, 0xff1c1819, 0xff1d191a, 0xff1d191a, 0xff1d191a, 0xff1d191a, 0xff1d191a, 0xff1d191a, 0xff1d191a, 0xff1d191a, 0xff1d191a, 0xff1d191a, 0xff353232, 0xffcccccc, 0xffffffff, 0xffffffff, 0xffdad9da, 0xff322e2f, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff312e2f, 0xffc9c8c8, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff292526, 0xff3c3839, 0xffdad9da, 0xffffffff, 0xffffffff, 0xffaba9aa, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff5e5b5c, 0xffeaeaea, 0xffffffff, 0xffffffff, 0xff6d6b6b, 0xff1b1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff7e7c7d, 0xfffefdfe, 0xffffffff, 0xffffffff, 0xffbcbbbb, 0xff343031, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b999a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff252223, 0xffa6a4a5, 0xffffffff, 0xffffffff, 0xffc6c4c4, 0xff2b2829, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff363233, 0xffcacaca, 0xffffffff, 0xffffffff, 0xfff4f4f4, 0xff777576, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xfffdfdfd, 0xffaaa9aa, 0xff231f20, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff2c2829, 0xffc9c7c8, 0xffffffff, 0xffffffff, 0xffd1d1d1, 0xff383435, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff383536, 0xffc6c5c6, 0xffffffff, 0xffffffff, 0xffe7e7e7, 0xff464344, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xc4231f20, 0x11231f20,
- 0x04231f20, 0x8c231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff272324, 0xff9f9d9d, 0xffffffff, 0xffffffff, 0xfffefefe, 0xff646262, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff272324, 0xff959393, 0xffffffff, 0xffffffff, 0xffffffff, 0xff6d6a6b, 0xff1b1718, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff878586, 0xffffffff, 0xffffffff, 0xfff6f6f6, 0xff4d4a4a, 0xff6a6869, 0xffffffff, 0xffffffff, 0xfffbfbfb, 0xff656262, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff595657, 0xffe7e7e6, 0xffffffff, 0xffffffff, 0xff858384, 0xff181416, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff393536, 0xffcdcccc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffbcbbbb, 0xff343031, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b999a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff252122, 0xffa09e9e, 0xffffffff, 0xffffffff, 0xffdad9d9, 0xff332f30, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201c1d, 0xff777575, 0xfff2f2f2, 0xffffffff, 0xffffffff, 0xfff4f4f4, 0xff777576, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xffffffff, 0xffe0e0e0, 0xff4f4c4d, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff686566, 0xfffbfbfb, 0xffffffff, 0xffffffff, 0xff9c9b9b, 0xff272324, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff908f8f, 0xfffafafa, 0xffffffff, 0xfffcfcfc, 0xffa09e9e, 0xff262223, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0x8c231f20, 0x04231f20,
- 0x01231f20, 0x49231f20, 0xf4231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff3d3a3b, 0xffdddddd, 0xffffffff, 0xffffffff, 0xffd8d7d7, 0xff322e2f, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221d1e, 0xff605d5e, 0xffececec, 0xffffffff, 0xffffffff, 0xffb9b7b8, 0xff221e20, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff504c4d, 0xffe6e5e5, 0xffffffff, 0xffffffff, 0xff9c9a9b, 0xffb4b2b2, 0xffffffff, 0xffffffff, 0xffd0cfcf, 0xff373334, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff474344, 0xffd8d7d7, 0xffffffff, 0xffffffff, 0xffcbcaca, 0xff322e2f, 0xff1b1718, 0xff211d1e, 0xff221e1f, 0xff221e1f, 0xff211d1e, 0xff1c1819, 0xff2f2b2c, 0xffa09e9f, 0xfffbfbfb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffbcbbbb, 0xff343031, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b999a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff242021, 0xff828081, 0xffffffff, 0xffffffff, 0xfffdfdfd, 0xff737171, 0xff1b1617, 0xff1f1b1c, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff1f1b1c, 0xff1f1b1c, 0xff575555, 0xffd7d6d6, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff4f4f4, 0xff777576, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xffffffff, 0xfffefefe, 0xffafaeaf, 0xff343132, 0xff1d191a, 0xff211d1e, 0xff221e1f, 0xff221e1f, 0xff201c1d, 0xff1a1617, 0xff474344, 0xffd5d4d4, 0xffffffff, 0xffffffff, 0xffebeaea, 0xff5b5858, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff454343, 0xffd9d8d9, 0xffffffff, 0xffffffff, 0xffefefef, 0xff828081, 0xff2a2627, 0xff1c1819, 0xff201c1d, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff201c1d, 0xff1e191b, 0xff1c1819, 0xff272424, 0xff524f50, 0xff4b4848, 0xff242021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf4231f20, 0x49231f20, 0x01231f20,
- 0x00000000, 0x1c231f20, 0xc3231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff757273, 0xffffffff, 0xffffffff, 0xffffffff, 0xff969495, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff393537, 0xffc7c6c6, 0xffffffff, 0xffffffff, 0xffececec, 0xff4c4949, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff302c2d, 0xffb4b3b3, 0xffffffff, 0xffffffff, 0xffeeedee, 0xfff3f3f3, 0xffffffff, 0xffffffff, 0xff918f90, 0xff262223, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff2d292a, 0xffafadae, 0xffffffff, 0xffffffff, 0xfffbfbfb, 0xffacabab, 0xff434041, 0xff211d1e, 0xff1d191a, 0xff1e1a1b, 0xff262223, 0xff504d4e, 0xffadabab, 0xfff7f7f7, 0xfffbfbfb, 0xfff2f2f2, 0xffffffff, 0xffffffff, 0xffbcbbbb, 0xff343031, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b999a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff555252, 0xffeaeae9, 0xffffffff, 0xffffffff, 0xffe3e2e2, 0xff726f70, 0xff2b2828, 0xff1e1a1b, 0xff1d191a, 0xff201b1c, 0xff332f30, 0xff777475, 0xffd8d7d7, 0xffffffff, 0xfff3f2f2, 0xfffdfdfd, 0xffffffff, 0xfff4f4f4, 0xff777576, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xfffafafa, 0xfff7f8f8, 0xfffbfbfb, 0xffafaeae, 0xff4c494a, 0xff242021, 0xff1d191a, 0xff1e1a1b, 0xff282425, 0xff615e5f, 0xffcbcacb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffa3a1a2, 0xff2c2829, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1a1b, 0xff726f70, 0xfff5f5f5, 0xffffffff, 0xffffffff, 0xfff0efef, 0xffa9a7a7, 0xff5a5757, 0xff2d2a2b, 0xff211c1d, 0xff1e1a1b, 0xff1f1b1c, 0xff211d1e, 0xff2a2627, 0xff434041, 0xff706d6e, 0xffaba9aa, 0xffe1e1e1, 0xff868384, 0xff252122, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xc3231f20, 0x1c231f20, 0x00000000,
- 0x00000000, 0x06231f20, 0x7c231f20, 0xfc231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff262223, 0xffc0bebf, 0xffffffff, 0xffffffff, 0xfff5f4f4, 0xff575455, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff231f20, 0xff949293, 0xfffafafa, 0xffffffff, 0xfffbfbfb, 0xff908e8e, 0xff1c1819, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff7a7879, 0xfff6f5f6, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe9e9e9, 0xff595657, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201b1c, 0xff605e5e, 0xffebeaea, 0xffffffff, 0xffffffff, 0xfffbfbfb, 0xffdfdedf, 0xffb4b3b3, 0xff9b9999, 0xffa1a0a0, 0xffc0bfbf, 0xffe6e6e6, 0xfffdfdfd, 0xffffffff, 0xffa5a2a3, 0xffc8c6c7, 0xffffffff, 0xffffffff, 0xffbcbbbb, 0xff343031, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b999a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff2d292a, 0xffa3a1a1, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff1f1f1, 0xffcbcbcb, 0xffa4a3a3, 0xff9a9999, 0xffadabac, 0xffd4d3d3, 0xfff3f3f3, 0xffffffff, 0xffdfdfdf, 0xff9e9c9d, 0xfff6f6f6, 0xffffffff, 0xfff4f4f4, 0xff777576, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xffe6e5e5, 0xffa09f9e, 0xfffcfcfc, 0xfffdfdfd, 0xffe4e4e4, 0xffbbbaba, 0xff9f9d9d, 0xffa3a0a2, 0xffc5c4c4, 0xffececec, 0xfffefefe, 0xffffffff, 0xffffffff, 0xffcccbcb, 0xff433f40, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c2c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff242021, 0xff807e7e, 0xfff9f8f8, 0xffffffff, 0xffffffff, 0xfffcfcfc, 0xffececec, 0xffd0d0d0, 0xffb2b0b0, 0xffa4a1a2, 0xffa6a3a5, 0xffb5b3b4, 0xffcdcccd, 0xffe2e1e1, 0xfff3f3f3, 0xfffdfdfd, 0xffffffff, 0xff8b8a8a, 0xff242121, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xfc231f20, 0x7c231f20, 0x06231f20, 0x00000000,
- 0x00000000, 0x00000000, 0x32231f20, 0xd8231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e191a, 0xff514e4f, 0xfff7f7f7, 0xffffffff, 0xffffffff, 0xffc5c4c5, 0xff332f30, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff5c5a5a, 0xffebebeb, 0xffffffff, 0xffffffff, 0xffcdcdcd, 0xff343032, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff484546, 0xffdbdada, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffbdbcbd, 0xff343132, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff807e7f, 0xfff2f2f2, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffdfdfd, 0xffabaaaa, 0xff363233, 0xffc1bfc0, 0xffffffff, 0xffffffff, 0xffbcbcbb, 0xff343031, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b9a9a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f60, 0xffededec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff3e3b3c, 0xffc0bebf, 0xfffdfdfe, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe7e6e6, 0xff666364, 0xff656263, 0xfff5f5f5, 0xffffffff, 0xfff4f4f4, 0xff787576, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xffe2e2e2, 0xff464244, 0xff9e9d9d, 0xfffbfbfb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffd1cfcf, 0xff4b4849, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242122, 0xffc5c4c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff343031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff231f20, 0xff696767, 0xffdddddd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff9f9f9, 0xff7d7b7c, 0xff252122, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xd8231f20, 0x32231f20, 0x00000000, 0x00000000,
- 0x00231f20, 0x00000000, 0x05231f20, 0x8e231f20, 0xfa231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff7f7d7d, 0xffe1e0e1, 0xffdbdbdb, 0xffdedede, 0xff7f7d7e, 0xff252122, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff302d2e, 0xffb2b1b1, 0xffdcdbdb, 0xffdbdbdb, 0xffcccccc, 0xff555253, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff282425, 0xff9b9999, 0xffdbdbdb, 0xffdbdbdb, 0xffdbdbdb, 0xffd9d8d9, 0xff7b797a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff656263, 0xffc7c6c7, 0xffeeeeee, 0xfff7f6f6, 0xfff8f8f8, 0xfff8f8f8, 0xfff6f6f6, 0xfff0f0f0, 0xffd4d3d3, 0xff838181, 0xff2b2728, 0xff211d1e, 0xffa7a5a6, 0xffe0dfdf, 0xffdedddd, 0xffa3a2a2, 0xff312d2e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff3f3b3c, 0xffc5c4c4, 0xffdcdcdc, 0xffd9d9d9, 0xff888586, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff575455, 0xffcfcdcf, 0xffdbdbdb, 0xffdbd9da, 0xff6b696a, 0xff1b1718, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff363333, 0xff999797, 0xffe0dfe0, 0xfff5f4f4, 0xfff8f7f7, 0xfff9f8f8, 0xfff8f8f8, 0xfff5f5f5, 0xffe7e6e7, 0xffb6b5b5, 0xff535052, 0xff181415, 0xff595556, 0xffd4d3d3, 0xffdbdbdb, 0xffd4d4d4, 0xff696668, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff231f20, 0xff8f8d8e, 0xffdcdbdb, 0xffdddcdc, 0xffc3c2c2, 0xff322f30, 0xff272425, 0xff828080, 0xffd6d6d6, 0xfff1f1f1, 0xfff7f7f7, 0xfff9f9f9, 0xfff8f8f8, 0xfff5f5f5, 0xffe3e3e3, 0xff9e9d9d, 0xff393536, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242021, 0xffaaa8a9, 0xffdedede, 0xffdddcdc, 0xffa6a4a5, 0xff312d2e, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff3c3839, 0xff918f8f, 0xffd3d2d3, 0xffededed, 0xfff5f5f5, 0xfff8f8f8, 0xfff9f9f9, 0xfff8f8f8, 0xfff7f6f6, 0xfff4f3f3, 0xffe8e8e8, 0xffd0cece, 0xff9e9c9c, 0xff5c5959, 0xff2b2829, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xfa231f20, 0x8e231f20, 0x05231f20, 0x00000000, 0x00231f20,
- 0x00000000, 0x00231f20, 0x00000000, 0x30231f20, 0xd8231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff322e2f, 0xff373435, 0xff363334, 0xff363334, 0xff292526, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff302b2c, 0xff373334, 0xff363334, 0xff363334, 0xff2c2829, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff2c2829, 0xff363334, 0xff363334, 0xff363334, 0xff353233, 0xff282526, 0xff231e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1c1819, 0xff2b2829, 0xff585556, 0xff7b7878, 0xff8a8888, 0xff8b8989, 0xff7b797a, 0xff5e5b5b, 0xff343132, 0xff1d191a, 0xff201c1d, 0xff231f20, 0xff302d2e, 0xff373335, 0xff373334, 0xff312d2e, 0xff242021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff262223, 0xff343132, 0xff373334, 0xff363334, 0xff2d2a2b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff292526, 0xff353132, 0xff363334, 0xff363334, 0xff2a2728, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff1f1a1b, 0xff403d3e, 0xff6b6869, 0xff848283, 0xff8c8a8a, 0xff868384, 0xff6f6d6d, 0xff4b4748, 0xff242122, 0xff1d191a, 0xff221e1f, 0xff292526, 0xff363233, 0xff373334, 0xff363233, 0xff2a2728, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff2e2a2b, 0xff373334, 0xff373334, 0xff343131, 0xff252122, 0xff201c1d, 0xff1d191a, 0xff373334, 0xff625f60, 0xff807e7e, 0xff8c8a8b, 0xff888686, 0xff6f6c6d, 0xff433f40, 0xff1f1b1c, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff312e2f, 0xff373334, 0xff373334, 0xff312d2e, 0xff242021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff1d191a, 0xff322e2f, 0xff565354, 0xff737172, 0xff878485, 0xff8d8b8b, 0xff888687, 0xff7d7b7c, 0xff676464, 0xff4d494a, 0xff2d292a, 0xff1d191a, 0xff1c1819, 0xff221d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xd8231f20, 0x30231f20, 0x00000000, 0x00231f20, 0x00000000,
- 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x73231f20, 0xfb231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff1c1819, 0xff1c1819, 0xff1e1a1b, 0xff1e1a1b, 0xff1d181a, 0xff1b1718, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff1f1b1c, 0xff1f1b1c, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff221d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1a1b, 0xff1b1718, 0xff1d191a, 0xff1e1a1b, 0xff1d191a, 0xff1b1718, 0xff1d191a, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1f1b1c, 0xff1f1b1c, 0xff201b1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff1b1718, 0xff1d191a, 0xff1e1a1b, 0xff1e1a1b, 0xff1c1718, 0xff1d191a, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff1f1b1c, 0xff1f1b1c, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff1c1718, 0xff1c1819, 0xff1e191a, 0xff1f1a1b, 0xff1e1a1b, 0xff1d1819, 0xff1b1718, 0xff1d191a, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xfb231f20, 0x73231f20, 0x00000000, 0x00000000, 0x00231f20, 0x00000000,
- 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x0e231f20, 0xb5231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xb5231f20, 0x0e231f20, 0x00000000, 0x00231f20, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x2a231f20, 0xde231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xde231f20, 0x2a231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x51231f20, 0xf4231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf4231f20, 0x51231f20, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x03231f20, 0x74231f20, 0xf5231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf5231f20, 0x74231f20, 0x03231f20, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x0a231f20, 0x84231f20, 0xf5231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf5231f20, 0x84231f20, 0x0a231f20, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x10231f20, 0x84231f20, 0xf5231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf5231f20, 0x84231f20, 0x10231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x0a231f20, 0x72231f20, 0xf4231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf4231f20, 0x72231f20, 0x0a231f20, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x03231f20, 0x4f231f20, 0xdd231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xdd231f20, 0x4f231f20, 0x03231f20, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00231f20, 0x00000000, 0x29231f20, 0xb6231f20, 0xfb231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xfb231f20, 0xb6231f20, 0x29231f20, 0x00000000, 0x00231f20, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x0e231f20, 0x73231f20, 0xd8231f20, 0xfb231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xfb231f20, 0xd8231f20, 0x73231f20, 0x0e231f20, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x30231f20, 0x8e231f20, 0xd6231f20, 0xfd231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xfd231f20, 0xd6231f20, 0x8e231f20, 0x30231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x04231f20, 0x32231f20, 0x7b231f20, 0xc2231f20, 0xf3231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf3231f20, 0xc2231f20, 0x7b231f20, 0x32231f20, 0x04231f20, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00231f20, 0x00000000, 0x00000000, 0x06231f20, 0x1c231f20, 0x49231f20, 0x8c231f20, 0xc4231f20, 0xf0231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf0231f20, 0xc4231f20, 0x8c231f20, 0x49231f20, 0x1c231f20, 0x06231f20, 0x00000000, 0x00000000, 0x00231f20, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x01231f20, 0x04231f20, 0x11231f20, 0x2e231f20, 0x62231f20, 0x8e231f20, 0xb4231f20, 0xd4231f20, 0xe5231f20, 0xf2231f20, 0xfd231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xfd231f20, 0xf2231f20, 0xe5231f20, 0xd4231f20, 0xb4231f20, 0x8e231f20, 0x62231f20, 0x2e231f20, 0x11231f20, 0x04231f20, 0x01231f20, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
-};
diff --git a/src/emu/ui/dirmenu.cpp b/src/emu/ui/dirmenu.cpp
deleted file mode 100644
index 69c360920dd..00000000000
--- a/src/emu/ui/dirmenu.cpp
+++ /dev/null
@@ -1,691 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Dankan1890
-/*********************************************************************
-
- ui/dirmenu.cpp
-
- Internal UI user interface.
-
-*********************************************************************/
-
-#include "emu.h"
-#include "ui/ui.h"
-#include "ui/menu.h"
-#include "ui/dirmenu.h"
-#include "ui/datfile.h"
-#include "ui/utils.h"
-#include "ui/optsmenu.h"
-
-struct folders_entry
-{
- const char *name;
- const char *option;
-};
-
-static const folders_entry s_folders_entry[] =
-{
- { "ROMs", OPTION_MEDIAPATH },
- { "UI", OPTION_UI_PATH },
- { "Samples", OPTION_SAMPLEPATH },
- { "DATs", OPTION_HISTORY_PATH },
- { "INIs", OPTION_INIPATH },
- { "Extra INIs", OPTION_EXTRAINI_PATH },
- { "Icons", OPTION_ICONS_PATH },
- { "Cheats", OPTION_CHEATPATH },
- { "Snapshots", OPTION_SNAPSHOT_DIRECTORY },
- { "Cabinets", OPTION_CABINETS_PATH },
- { "Flyers", OPTION_FLYERS_PATH },
- { "Titles", OPTION_TITLES_PATH },
- { "Ends", OPTION_ENDS_PATH },
- { "PCBs", OPTION_PCBS_PATH },
- { "Marquees", OPTION_MARQUEES_PATH },
- { "Controls Panels", OPTION_CPANELS_PATH },
- { "Crosshairs", OPTION_CROSSHAIRPATH },
- { "Artworks", OPTION_ARTPATH },
- { "Bosses", OPTION_BOSSES_PATH },
- { "Artworks Preview", OPTION_ARTPREV_PATH },
- { "Select", OPTION_SELECT_PATH },
- { "GameOver", OPTION_GAMEOVER_PATH },
- { "HowTo", OPTION_HOWTO_PATH },
- { "Logos", OPTION_LOGOS_PATH },
- { "Scores", OPTION_SCORES_PATH },
- { "Versus", OPTION_VERSUS_PATH },
- { nullptr }
-};
-
-/**************************************************
- MENU ADD FOLDER
-**************************************************/
-//-------------------------------------------------
-// ctor / dtor
-//-------------------------------------------------
-
-ui_menu_add_change_folder::ui_menu_add_change_folder(running_machine &machine, render_container *container, int ref, bool _change) : ui_menu(machine, container)
-{
- m_ref = ref - 1;
- m_change = _change;
- m_search[0] = '\0';
-
- // configure the starting path
- char *dst = nullptr;
- osd_get_full_path(&dst, ".");
- m_current_path = dst;
- osd_free(dst);
-}
-
-ui_menu_add_change_folder::~ui_menu_add_change_folder()
-{
-}
-
-//-------------------------------------------------
-// handle
-//-------------------------------------------------
-
-void ui_menu_add_change_folder::handle()
-{
- // process the menu
- const ui_menu_event *m_event = process(0);
-
- if (m_event != nullptr && m_event->itemref != nullptr)
- {
- if (m_event->iptkey == IPT_UI_SELECT)
- {
- int index = (FPTR)m_event->itemref - 1;
- const ui_menu_item &pitem = item[index];
-
- // go up to the parent path
- if (!strcmp(pitem.text, ".."))
- {
- size_t first_sep = m_current_path.find_first_of(PATH_SEPARATOR[0]);
- size_t last_sep = m_current_path.find_last_of(PATH_SEPARATOR[0]);
- if (first_sep != last_sep)
- m_current_path.erase(++last_sep);
- }
- else
- {
- // if isn't a drive, appends the directory
- if (strcmp(pitem.subtext, "[DRIVE]") != 0)
- {
- if (m_current_path[m_current_path.length() - 1] == PATH_SEPARATOR[0])
- m_current_path.append(pitem.text);
- else
- m_current_path.append(PATH_SEPARATOR).append(pitem.text);
- }
- else
- m_current_path = pitem.text;
- }
-
- // reset the char buffer also in this case
- if (m_search[0] != 0)
- m_search[0] = '\0';
- reset(UI_MENU_RESET_SELECT_FIRST);
- }
- else if (m_event->iptkey == IPT_SPECIAL)
- {
- int buflen = strlen(m_search);
- bool update_selected = FALSE;
-
- // if it's a backspace and we can handle it, do so
- if ((m_event->unichar == 8 || m_event->unichar == 0x7f) && buflen > 0)
- {
- *(char *)utf8_previous_char(&m_search[buflen]) = 0;
- update_selected = TRUE;
- }
- // if it's any other key and we're not maxed out, update
- else if (m_event->unichar >= ' ' && m_event->unichar < 0x7f)
- {
- buflen += utf8_from_uchar(&m_search[buflen], ARRAY_LENGTH(m_search) - buflen, m_event->unichar);
- m_search[buflen] = 0;
- update_selected = TRUE;
- }
- // Tab key, save current path
- else if (m_event->unichar == 0x09)
- {
- std::string error_string;
- if (m_change)
- {
- if (machine().ui().options().exists(s_folders_entry[m_ref].option))
- {
- machine().ui().options().set_value(s_folders_entry[m_ref].option, m_current_path.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
- }
- else {
- if (strcmp(machine().options().value(s_folders_entry[m_ref].option), m_current_path.c_str()) != 0)
- {
- machine().options().set_value(s_folders_entry[m_ref].option, m_current_path.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
- machine().options().mark_changed(s_folders_entry[m_ref].option);
- }
- }
- machine().datfile().reset_run();
- }
- else
- {
- std::string tmppath;
- if (machine().ui().options().exists(s_folders_entry[m_ref].option)) {
- tmppath.assign(machine().ui().options().value(s_folders_entry[m_ref].option)).append(";").append(m_current_path.c_str());
- }
- else {
- tmppath.assign(machine().options().value(s_folders_entry[m_ref].option)).append(";").append(m_current_path.c_str());
- }
-
- if (machine().ui().options().exists(s_folders_entry[m_ref].option))
- {
- machine().ui().options().set_value(s_folders_entry[m_ref].option, tmppath.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
- }
- else {
- if (strcmp(machine().options().value(s_folders_entry[m_ref].option), tmppath.c_str()) != 0)
- {
- machine().options().set_value(s_folders_entry[m_ref].option, tmppath.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
- machine().options().mark_changed(s_folders_entry[m_ref].option);
- }
- }
- }
-
- ui_menu::menu_stack->parent->reset(UI_MENU_RESET_SELECT_FIRST);
- ui_menu::stack_pop(machine());
- }
-
- // check for entries which matches our search buffer
- if (update_selected)
- {
- const int cur_selected = selected;
- int entry, bestmatch = 0;
-
- // from current item to the end
- for (entry = cur_selected; entry < item.size(); entry++)
- if (item[entry].ref != nullptr && m_search[0] != 0)
- {
- int match = 0;
- for (int i = 0; i < ARRAY_LENGTH(m_search); i++)
- {
- if (core_strnicmp(item[entry].text, m_search, i) == 0)
- match = i;
- }
-
- if (match > bestmatch)
- {
- bestmatch = match;
- selected = entry;
- }
- }
-
- // and from the first item to current one
- for (entry = 0; entry < cur_selected; entry++)
- {
- if (item[entry].ref != nullptr && m_search[0] != 0)
- {
- int match = 0;
- for (int i = 0; i < ARRAY_LENGTH(m_search); i++)
- {
- if (core_strnicmp(item[entry].text, m_search, i) == 0)
- match = i;
- }
-
- if (match > bestmatch)
- {
- bestmatch = match;
- selected = entry;
- }
- }
- }
- top_line = selected - (visible_lines / 2);
- }
- }
- else if (m_event->iptkey == IPT_UI_CANCEL)
- {
- // reset the char buffer also in this case
- if (m_search[0] != 0)
- m_search[0] = '\0';
- }
- }
-}
-
-//-------------------------------------------------
-// populate
-//-------------------------------------------------
-
-void ui_menu_add_change_folder::populate()
-{
- // open a path
- const char *volume_name;
- file_enumerator path(m_current_path.c_str());
- const osd_directory_entry *dirent;
- int folders_count = 0;
-
- // add the drives
- for (int i = 0; (volume_name = osd_get_volume_name(i)) != nullptr; i++)
- item_append(volume_name, "[DRIVE]", 0, (void *)(FPTR)++folders_count);
-
- // add the directories
- while ((dirent = path.next()) != nullptr)
- {
- if (dirent->type == ENTTYPE_DIR && strcmp(dirent->name, ".") != 0)
- item_append(dirent->name, "[DIR]", 0, (void *)(FPTR)++folders_count);
- }
-
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
-
- // configure the custom rendering
- customtop = 2.0f * machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
- custombottom = 1.0f * machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
-}
-
-//-------------------------------------------------
-// perform our special rendering
-//-------------------------------------------------
-
-void ui_menu_add_change_folder::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
-{
- float width, maxwidth = origx2 - origx1;
- ui_manager &mui = machine().ui();
- std::string tempbuf[2];
- tempbuf[0] = (m_change) ? "Change" : "Add";
- tempbuf[0].append(" ").append(s_folders_entry[m_ref].name).append(" Folder - Search: ").append(m_search).append("_");
- tempbuf[1] = m_current_path;
-
- // get the size of the text
- for (auto & elem: tempbuf)
- {
- mui.draw_text_full(container, elem.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += (2.0f * UI_BOX_LR_BORDER) + 0.01f;
- maxwidth = MAX(width, maxwidth);
- }
-
- // compute our bounds
- float x1 = 0.5f - 0.5f * maxwidth;
- float x2 = x1 + maxwidth;
- float y1 = origy1 - top;
- float y2 = origy1 - UI_BOX_TB_BORDER;
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // draw the text within it
- for (auto & elem : tempbuf)
- {
- mui.draw_text_full(container, elem.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
- y1 = y1 + mui.get_line_height();
- }
-
- // bottom text
- tempbuf[0] = "Press TAB to set";
-
- mui.draw_text_full(container, tempbuf[0].c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += 2 * UI_BOX_LR_BORDER;
- maxwidth = MAX(maxwidth, width);
-
- // compute our bounds
- x1 = 0.5f - 0.5f * maxwidth;
- x2 = x1 + maxwidth;
- y1 = origy2 + UI_BOX_TB_BORDER;
- y2 = origy2 + bottom;
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_RED_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // draw the text within it
- mui.draw_text_full(container, tempbuf[0].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
-
-}
-
-/**************************************************
- MENU DIRECTORY
-**************************************************/
-//-------------------------------------------------
-// ctor / dtor
-//-------------------------------------------------
-
-ui_menu_directory::ui_menu_directory(running_machine &machine, render_container *container) : ui_menu(machine, container)
-{
-}
-
-ui_menu_directory::~ui_menu_directory()
-{
- save_ui_options(machine());
- ui_globals::reset = true;
-}
-
-//-------------------------------------------------
-// handle
-//-------------------------------------------------
-
-void ui_menu_directory::handle()
-{
- // process the menu
- const ui_menu_event *m_event = process(0);
-
- if (m_event != nullptr && m_event->itemref != nullptr && m_event->iptkey == IPT_UI_SELECT)
- {
- int ref = (FPTR)m_event->itemref;
- bool change = (ref == HISTORY_FOLDERS || ref == EXTRAINI_FOLDERS || ref == UI_FOLDERS);
- ui_menu::stack_push(global_alloc_clear<ui_menu_display_actual>(machine(), container, ref, change));
- }
-}
-
-//-------------------------------------------------
-// populate
-//-------------------------------------------------
-
-void ui_menu_directory::populate()
-{
- item_append("Roms", nullptr, 0, (void *)(FPTR)ROM_FOLDERS);
- item_append("UI", nullptr, 0, (void *)(FPTR)UI_FOLDERS);
- item_append("Samples", nullptr, 0, (void *)(FPTR)SAMPLE_FOLDERS);
- item_append("INIs", nullptr, 0, (void *)(FPTR)INI_FOLDERS);
- item_append("Artwork", nullptr, 0, (void *)(FPTR)ARTWORK_FOLDERS);
- item_append("DATs (History, Mameinfo, etc...)", nullptr, 0, (void *)(FPTR)HISTORY_FOLDERS);
- item_append("Extra INI (Category, etc...)", nullptr, 0, (void *)(FPTR)EXTRAINI_FOLDERS);
- item_append("Icons", nullptr, 0, (void *)(FPTR)ICON_FOLDERS);
- item_append("Cheats", nullptr, 0, (void *)(FPTR)CHEAT_FOLDERS);
- item_append("Snapshots", nullptr, 0, (void *)(FPTR)SNAPSHOT_FOLDERS);
- item_append("Cabinets", nullptr, 0, (void *)(FPTR)CABINET_FOLDERS);
- item_append("Flyers", nullptr, 0, (void *)(FPTR)FLYER_FOLDERS);
- item_append("Titles", nullptr, 0, (void *)(FPTR)TITLE_FOLDERS);
- item_append("Ends", nullptr, 0, (void *)(FPTR)ENDS_FOLDERS);
- item_append("PCBs", nullptr, 0, (void *)(FPTR)PCB_FOLDERS);
- item_append("Marquees", nullptr, 0, (void *)(FPTR)MARQUEES_FOLDERS);
- item_append("Control Panels", nullptr, 0, (void *)(FPTR)CPANEL_FOLDERS);
- item_append("Bosses", nullptr, 0, (void *)(FPTR)BOSSES_FOLDERS);
- item_append("Versus", nullptr, 0, (void *)(FPTR)VERSUS_FOLDERS);
- item_append("Game Over", nullptr, 0, (void *)(FPTR)GAMEOVER_FOLDERS);
- item_append("How To", nullptr, 0, (void *)(FPTR)HOWTO_FOLDERS);
- item_append("Select", nullptr, 0, (void *)(FPTR)SELECT_FOLDERS);
- item_append("Artwork Preview", nullptr, 0, (void *)(FPTR)ARTPREV_FOLDERS);
- item_append("Scores", nullptr, 0, (void *)(FPTR)SCORES_FOLDERS);
- item_append("Logos", nullptr, 0, (void *)(FPTR)LOGO_FOLDERS);
- item_append("Crosshairs", nullptr, 0, (void *)(FPTR)CROSSHAIR_FOLDERS);
-
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
- customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
-}
-
-//-------------------------------------------------
-// perform our special rendering
-//-------------------------------------------------
-
-void ui_menu_directory::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
-{
- float width;
- ui_manager &mui = machine().ui();
-
- // get the size of the text
- mui.draw_text_full(container, "Folder Setup", 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += (2.0f * UI_BOX_LR_BORDER) + 0.01f;
- float maxwidth = MAX(width, origx2 - origx1);
-
- // compute our bounds
- float x1 = 0.5f - 0.5f * maxwidth;
- float x2 = x1 + maxwidth;
- float y1 = origy1 - top;
- float y2 = origy1 - UI_BOX_TB_BORDER;
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // draw the text within it
- mui.draw_text_full(container, "Folder Setup", x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
-}
-
-/**************************************************
- MENU DISPLAY PATH
-**************************************************/
-//-------------------------------------------------
-// ctor / dtor
-//-------------------------------------------------
-
-ui_menu_display_actual::ui_menu_display_actual(running_machine &machine, render_container *container, int ref, bool _change) : ui_menu(machine, container)
-{
- m_ref = ref;
- m_change = _change;
-}
-
-ui_menu_display_actual::~ui_menu_display_actual()
-{
-}
-
-//-------------------------------------------------
-// handle
-//-------------------------------------------------
-
-void ui_menu_display_actual::handle()
-{
- // process the menu
- const ui_menu_event *m_event = process(0);
- if (m_event != nullptr && m_event->itemref != nullptr && m_event->iptkey == IPT_UI_SELECT)
- switch ((FPTR)m_event->itemref)
- {
- case REMOVE_FOLDER:
- ui_menu::stack_push(global_alloc_clear<ui_menu_remove_folder>(machine(), container, m_ref));
- break;
-
- case ADD_FOLDER:
- case CHANGE_FOLDER:
- ui_menu::stack_push(global_alloc_clear<ui_menu_add_change_folder>(machine(), container, m_ref, m_change));
- break;
- }
-}
-
-//-------------------------------------------------
-// populate
-//-------------------------------------------------
-
-void ui_menu_display_actual::populate()
-{
- m_tempbuf.assign("Current ").append(s_folders_entry[m_ref - 1].name).append(" Folders");
- if (machine().ui().options().exists(s_folders_entry[m_ref - 1].option)) {
- m_searchpath.assign(machine().ui().options().value(s_folders_entry[m_ref - 1].option));
- }
- else {
- m_searchpath.assign(machine().options().value(s_folders_entry[m_ref - 1].option));
- }
- path_iterator path(m_searchpath.c_str());
- std::string curpath;
- m_folders.clear();
- while (path.next(curpath, nullptr))
- m_folders.push_back(curpath);
-
- if (m_change)
- item_append("Change Folder", nullptr, 0, (void *)CHANGE_FOLDER);
- else
- item_append("Add Folder", nullptr, 0, (void *)ADD_FOLDER);
-
- if (m_folders.size() > 1)
- item_append("Remove Folder", nullptr, 0, (void *)REMOVE_FOLDER);
-
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
- customtop = (m_folders.size() + 1) * machine().ui().get_line_height() + 6.0f * UI_BOX_TB_BORDER;
-}
-
-//-------------------------------------------------
-// perform our special rendering
-//-------------------------------------------------
-
-void ui_menu_display_actual::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
-{
- float width, maxwidth = origx2 - origx1;
- ui_manager &mui = machine().ui();
- float lineh = mui.get_line_height();
-
- for (auto & elem : m_folders)
- {
- mui.draw_text_full(container, elem.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_LEFT, WRAP_TRUNCATE, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += (2.0f * UI_BOX_LR_BORDER) + 0.01f;
- maxwidth = MAX(maxwidth, width);
- }
-
- // get the size of the text
- mui.draw_text_full(container, m_tempbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += (2.0f * UI_BOX_LR_BORDER) + 0.01f;
- maxwidth = MAX(width, maxwidth);
-
- // compute our bounds
- float x1 = 0.5f - 0.5f * maxwidth;
- float x2 = x1 + maxwidth;
- float y1 = origy1 - top;
- float y2 = y1 + lineh + 2.0f * UI_BOX_TB_BORDER;
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // draw the text within it
- mui.draw_text_full(container, m_tempbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
-
- // compute our bounds
- x1 = 0.5f - 0.5f * maxwidth;
- x2 = x1 + maxwidth;
- y1 = y2 + 2.0f * UI_BOX_TB_BORDER;
- y2 = origy1 - UI_BOX_TB_BORDER;
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // draw the text within it
- for (auto & elem : m_folders)
- {
- mui.draw_text_full(container, elem.c_str(), x1, y1, x2 - x1, JUSTIFY_LEFT, WRAP_TRUNCATE,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
- y1 += lineh;
- }
-
-}
-
-/**************************************************
- MENU REMOVE FOLDER
-**************************************************/
-//-------------------------------------------------
-// ctor / dtor
-//-------------------------------------------------
-
-ui_menu_remove_folder::ui_menu_remove_folder(running_machine &machine, render_container *container, int ref) : ui_menu(machine, container)
-{
- m_ref = ref - 1;
- if (machine.ui().options().exists(s_folders_entry[m_ref].option)) {
- m_searchpath.assign(machine.ui().options().value(s_folders_entry[m_ref].option));
- }
- else {
- m_searchpath.assign(machine.options().value(s_folders_entry[m_ref].option));
- }
-
-}
-
-ui_menu_remove_folder::~ui_menu_remove_folder()
-{
-}
-
-//-------------------------------------------------
-// handle
-//-------------------------------------------------
-
-void ui_menu_remove_folder::handle()
-{
- // process the menu
- const ui_menu_event *m_event = process(0);
- if (m_event != nullptr && m_event->itemref != nullptr && m_event->iptkey == IPT_UI_SELECT)
- {
- int index = (FPTR)m_event->itemref - 1;
- std::string tmppath;
- for (size_t i = 0; i < item.size() - 2; i++)
- if (i != index)
- tmppath.append(item[i].text).append(";");
-
- tmppath.substr(0, tmppath.size() - 1);
- std::string error_string;
- if (machine().ui().options().exists(s_folders_entry[m_ref].option))
- {
- machine().ui().options().set_value(s_folders_entry[m_ref].option, tmppath.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
- }
- else {
- if (strcmp(machine().options().value(s_folders_entry[m_ref].option),tmppath.c_str())!=0)
- {
- machine().options().set_value(s_folders_entry[m_ref].option, tmppath.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
- machine().options().mark_changed(s_folders_entry[m_ref].option);
- }
- }
-
- ui_menu::menu_stack->parent->reset(UI_MENU_RESET_REMEMBER_REF);
- ui_menu::stack_pop(machine());
- }
-}
-
-//-------------------------------------------------
-// populate menu
-//-------------------------------------------------
-
-void ui_menu_remove_folder::populate()
-{
- path_iterator path(m_searchpath.c_str());
- std::string curpath;
- int folders_count = 0;
-
- while (path.next(curpath, nullptr))
- item_append(curpath.c_str(), nullptr, 0, (void *)(FPTR)++folders_count);
-
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
-
- customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
-}
-
-//-------------------------------------------------
-// perform our special rendering
-//-------------------------------------------------
-
-void ui_menu_remove_folder::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
-{
- float width;
- ui_manager &mui = machine().ui();
- std::string tempbuf = std::string("Remove ").append(s_folders_entry[m_ref].name).append(" Folder");
-
- // 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);
- width += (2.0f * UI_BOX_LR_BORDER) + 0.01f;
- float maxwidth = MAX(width, origx2 - origx1);
-
- // compute our bounds
- float x1 = 0.5f - 0.5f * maxwidth;
- float x2 = x1 + maxwidth;
- float y1 = origy1 - top;
- float y2 = origy1 - UI_BOX_TB_BORDER;
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // draw the text within it
- mui.draw_text_full(container, tempbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, DRAW_NORMAL,
- UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
-}
diff --git a/src/emu/ui/dirmenu.h b/src/emu/ui/dirmenu.h
deleted file mode 100644
index 47734fc6542..00000000000
--- a/src/emu/ui/dirmenu.h
+++ /dev/null
@@ -1,128 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Dankan1890
-/***************************************************************************
-
- ui/dirmenu.h
-
- Internal UI user interface.
-
-***************************************************************************/
-
-#pragma once
-
-#ifndef __UI_DIRMENU_H__
-#define __UI_DIRMENU_H__
-
-//-------------------------------------------------
-// class directory menu
-//-------------------------------------------------
-
-class ui_menu_directory : public ui_menu
-{
-public:
- ui_menu_directory(running_machine &machine, render_container *container);
- virtual ~ui_menu_directory();
- virtual void populate() override;
- virtual void handle() override;
- virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
-
-private:
- enum
- {
- ROM_FOLDERS = 1,
- UI_FOLDERS,
- SAMPLE_FOLDERS,
- HISTORY_FOLDERS,
- INI_FOLDERS,
- EXTRAINI_FOLDERS,
- ICON_FOLDERS,
- CHEAT_FOLDERS,
- SNAPSHOT_FOLDERS,
- CABINET_FOLDERS,
- FLYER_FOLDERS,
- TITLE_FOLDERS,
- ENDS_FOLDERS,
- PCB_FOLDERS,
- MARQUEES_FOLDERS,
- CPANEL_FOLDERS,
- CROSSHAIR_FOLDERS,
- ARTWORK_FOLDERS,
- BOSSES_FOLDERS,
- ARTPREV_FOLDERS,
- SELECT_FOLDERS,
- GAMEOVER_FOLDERS,
- HOWTO_FOLDERS,
- LOGO_FOLDERS,
- SCORES_FOLDERS,
- VERSUS_FOLDERS
- };
-};
-
-//-------------------------------------------------
-// class directory specific menu
-//-------------------------------------------------
-
-class ui_menu_display_actual : public ui_menu
-{
-public:
- ui_menu_display_actual(running_machine &machine, render_container *container, int selectedref, bool _change);
- virtual ~ui_menu_display_actual();
- virtual void populate() override;
- virtual void handle() override;
- virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
-
-private:
- std::string m_tempbuf, m_searchpath;
- std::vector<std::string> m_folders;
- int m_ref;
- bool m_change;
-
- enum
- {
- ADD_FOLDER = 1,
- REMOVE_FOLDER,
- CHANGE_FOLDER
- };
-};
-
-//-------------------------------------------------
-// class remove folder menu
-//-------------------------------------------------
-
-class ui_menu_remove_folder : public ui_menu
-{
-public:
- ui_menu_remove_folder(running_machine &machine, render_container *container, int ref);
- virtual ~ui_menu_remove_folder();
- virtual void populate() override;
- virtual void handle() override;
- virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
-
-private:
- std::string m_searchpath;
- int m_ref;
-};
-
-//-------------------------------------------------
-// class add / change folder menu
-//-------------------------------------------------
-
-class ui_menu_add_change_folder : public ui_menu
-{
-public:
- ui_menu_add_change_folder(running_machine &machine, render_container *container, int ref, bool change);
- virtual ~ui_menu_add_change_folder();
- virtual void populate() override;
- virtual void handle() override;
- virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
-
- virtual bool menu_has_search_active() override { return (m_search[0] != 0); }
-
-private:
- int m_ref;
- std::string m_current_path;
- char m_search[40];
- bool m_change;
-};
-
-#endif /* __UI_DIRMENU_H__ */
diff --git a/src/emu/ui/dsplmenu.cpp b/src/emu/ui/dsplmenu.cpp
deleted file mode 100644
index 01ee9c19578..00000000000
--- a/src/emu/ui/dsplmenu.cpp
+++ /dev/null
@@ -1,227 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Dankan1890
-/*********************************************************************
-
- ui/dsplmenu.cpp
-
- UI video options menu.
-
-*********************************************************************/
-
-#include "emu.h"
-#include "ui/ui.h"
-#include "ui/menu.h"
-#include "ui/dsplmenu.h"
-#include "ui/selector.h"
-#include "ui/utils.h"
-
-#if defined(UI_WINDOWS) && !defined(UI_SDL)
-#include "../osd/windows/winmain.h"
-#else
-#include "../osd/modules/lib/osdobj_common.h"
-#endif
-
-
-ui_menu_display_options::video_modes ui_menu_display_options::m_video = {
- { "auto", "Auto" },
- { "opengl", "OpenGL" },
- { "bgfx", "BGFX" },
- { "d3d", "Direct3D" },
- { "gdi", "GDI" },
- { "ddraw", "DirectDraw" },
- { "soft", "Software" },
- { "accel", "SDL2 Accelerated" }
-};
-
-ui_menu_display_options::dspl_option ui_menu_display_options::m_options[] = {
- { 0, nullptr, nullptr },
- { 0, "Video Mode", OSDOPTION_VIDEO },
-#if defined(UI_WINDOWS) && !defined(UI_SDL)
- { 0, "Hardware Stretch", WINOPTION_HWSTRETCH },
- { 0, "Triple Buffering", WINOPTION_TRIPLEBUFFER },
- { 0, "HLSL", WINOPTION_HLSL_ENABLE },
-#endif
- { 0, "GLSL", OSDOPTION_GL_GLSL },
- { 0, "Bilinear Filtering", OSDOPTION_FILTER },
- { 0, "Bitmap Prescaling", OSDOPTION_PRESCALE },
- { 0, "Multi-Threaded Rendering", OSDOPTION_MULTITHREADING },
- { 0, "Window Mode", OSDOPTION_WINDOW },
- { 0, "Enforce Aspect Ratio", OSDOPTION_KEEPASPECT },
- { 0, "Start Out Maximized", OSDOPTION_MAXIMIZE },
- { 0, "Synchronized Refresh", OSDOPTION_SYNCREFRESH },
- { 0, "Wait Vertical Sync", OSDOPTION_WAITVSYNC }
-};
-
-
-//-------------------------------------------------
-// ctor
-//-------------------------------------------------
-
-ui_menu_display_options::ui_menu_display_options(running_machine &machine, render_container *container) : ui_menu(machine, container)
-{
- osd_options &options = downcast<osd_options &>(machine.options());
-
- for (int d = 2; d < ARRAY_LENGTH(m_options); ++d)
- m_options[d].status = options.int_value(m_options[d].option);
-
- // create video list
- m_list.push_back("auto");
- m_list.push_back("opengl"); // TODO: check USE_OPENGL
-
- std::string descr = options.description(OSDOPTION_VIDEO);
- descr.erase(0, descr.find(":") + 2);
- std::string delim = ", ";
- size_t p1, p2 = 0;
- for (;;)
- {
- p1 = descr.find_first_not_of(delim, p2);
- if (p1 == std::string::npos)
- break;
- p2 = descr.find_first_of(delim, p1 + 1);
- if (p2 != std::string::npos)
- {
- std::string txt(descr.substr(p1, p2 - p1));
- if (txt != "or" && txt != "none")
- m_list.push_back(descr.substr(p1, p2 - p1));
- }
- else
- {
- m_list.push_back(descr.substr(p1));
- break;
- }
- }
-
- m_options[1].status = 0;
- for (int cur = 0; cur < m_list.size(); ++cur)
- if (options.video() == m_list[cur])
- {
- m_options[1].status = cur;
- break;
- }
-}
-
-//-------------------------------------------------
-// dtor
-//-------------------------------------------------
-
-ui_menu_display_options::~ui_menu_display_options()
-{
- std::string error_string;
- for (int d = 2; d < ARRAY_LENGTH(m_options); ++d)
- {
- if (machine().options().int_value(m_options[d].option) != m_options[d].status)
- {
- machine().options().set_value(m_options[d].option, m_options[d].status, OPTION_PRIORITY_CMDLINE, error_string);
- machine().options().mark_changed(m_options[d].option);
- }
- }
- if (machine().options().value(m_options[1].option) != m_list[m_options[1].status])
- {
- machine().options().set_value(m_options[1].option, m_list[m_options[1].status].c_str(), OPTION_PRIORITY_CMDLINE, error_string);
- machine().options().mark_changed(m_options[1].option);
-
- }
- ui_globals::reset = true;
-}
-
-
-//-------------------------------------------------
-// handle
-//-------------------------------------------------
-
-void ui_menu_display_options::handle()
-{
- bool changed = false;
-
- // process the menu
- const ui_menu_event *m_event = process(0);
-
- if (m_event != nullptr && m_event->itemref != nullptr)
- {
- int value = (FPTR)m_event->itemref;
- if (!strcmp(m_options[value].option, OSDOPTION_VIDEO) || !strcmp(m_options[value].option, OSDOPTION_PRESCALE))
- {
- if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT)
- {
- changed = true;
- (m_event->iptkey == IPT_UI_LEFT) ? m_options[value].status-- : m_options[value].status++;
- }
- else if (m_event->iptkey == IPT_UI_SELECT && !strcmp(m_options[value].option, OSDOPTION_VIDEO))
- {
- int total = m_list.size();
- std::vector<std::string> s_sel(total);
- for (int index = 0; index < total; ++index)
- s_sel[index] = m_video[m_list[index]];
-
- ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, s_sel, m_options[value].status));
- }
- }
- else if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT || m_event->iptkey == IPT_UI_SELECT)
- {
- changed = true;
- m_options[value].status = !m_options[value].status;
- }
- }
-
- if (changed)
- reset(UI_MENU_RESET_REMEMBER_REF);
-}
-
-//-------------------------------------------------
-// populate
-//-------------------------------------------------
-
-void ui_menu_display_options::populate()
-{
- // add video mode option
- std::string v_text(m_video[m_list[m_options[1].status]]);
- UINT32 arrow_flags = get_arrow_flags(0, m_list.size() - 1, m_options[1].status);
- item_append(m_options[1].description, v_text.c_str(), arrow_flags, (void *)(FPTR)1);
-
- // add options items
- for (int opt = 2; opt < ARRAY_LENGTH(m_options); ++opt)
- if (strcmp(m_options[opt].option, OSDOPTION_PRESCALE) != 0)
- item_append(m_options[opt].description, m_options[opt].status ? "On" : "Off",
- m_options[opt].status ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)(FPTR)opt);
- else
- {
- strprintf(v_text, "%d", m_options[opt].status);
- arrow_flags = get_arrow_flags(1, 3, m_options[opt].status);
- item_append(m_options[opt].description, v_text.c_str(), arrow_flags, (void *)(FPTR)opt);
- }
-
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
- customtop = machine().ui().get_line_height() + (3.0f * UI_BOX_TB_BORDER);
-}
-
-//-------------------------------------------------
-// perform our special rendering
-//-------------------------------------------------
-
-void ui_menu_display_options::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
-{
- float width;
- ui_manager &mui = machine().ui();
- mui.draw_text_full(container, "Display Options", 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NONE,
- ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += 2 * UI_BOX_LR_BORDER;
- float maxwidth = MAX(origx2 - origx1, width);
-
- // compute our bounds
- float x1 = 0.5f - 0.5f * maxwidth;
- float x2 = x1 + maxwidth;
- float y1 = origy1 - top;
- float y2 = origy1 - UI_BOX_TB_BORDER;
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // draw the text within it
- mui.draw_text_full(container, "Display Options", x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL,
- UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
-}
diff --git a/src/emu/ui/dsplmenu.h b/src/emu/ui/dsplmenu.h
deleted file mode 100644
index 814304ec6bd..00000000000
--- a/src/emu/ui/dsplmenu.h
+++ /dev/null
@@ -1,44 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Dankan1890
-/***************************************************************************
-
- ui/dsplmenu.h
-
- UI video options menu.
-
-***************************************************************************/
-
-#pragma once
-
-#ifndef __UI_DSPLMENU_H__
-#define __UI_DSPLMENU_H__
-
-//-------------------------------------------------
-// class display options menu
-//-------------------------------------------------
-class ui_menu_display_options : public ui_menu
-{
-public:
- ui_menu_display_options(running_machine &machine, render_container *container);
- virtual ~ui_menu_display_options();
- virtual void populate() override;
- virtual void handle() override;
- virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
-
-private:
- struct dspl_option
- {
- UINT16 status;
- const char *description;
- const char *option;
- };
-
- using video_modes = std::unordered_map<std::string, std::string>;
-
- static video_modes m_video;
- static dspl_option m_options[];
-
- std::vector<std::string> m_list;
-};
-
-#endif /* __UI_DSPLMENU_H__ */
diff --git a/src/emu/ui/filemngr.cpp b/src/emu/ui/filemngr.cpp
index cccc92888c4..d277d0bd847 100644
--- a/src/emu/ui/filemngr.cpp
+++ b/src/emu/ui/filemngr.cpp
@@ -195,10 +195,10 @@ void ui_menu_file_manager::force_file_manager(running_machine &machine, render_c
ui_menu::stack_reset(machine);
// add the quit entry followed by the game select entry
- ui_menu *quit = global_alloc_clear<ui_menu_quit_game>(machine, container);
+ ui_menu *quit = auto_alloc_clear(machine, <ui_menu_quit_game>(machine, container));
quit->set_special_main_menu(true);
ui_menu::stack_push(quit);
- ui_menu::stack_push(global_alloc_clear<ui_menu_file_manager>(machine, container, warnings));
+ ui_menu::stack_push(auto_alloc_clear(machine, <ui_menu_file_manager>(machine, container, warnings)));
// force the menus on
machine.ui().show_menu();
diff --git a/src/emu/ui/filesel.cpp b/src/emu/ui/filesel.cpp
index e757f537044..140bfdd492d 100644
--- a/src/emu/ui/filesel.cpp
+++ b/src/emu/ui/filesel.cpp
@@ -749,10 +749,7 @@ void ui_menu_file_selector::handle()
}
if (selected_entry != nullptr && selected_entry != cur_selected)
- {
- set_selection((void *)selected_entry);
- top_line = selected - (visible_lines / 2);
- }
+ set_selection((void *) selected_entry);
}
}
else if (event->iptkey == IPT_UI_CANCEL)
diff --git a/src/emu/ui/icorender.h b/src/emu/ui/icorender.h
deleted file mode 100644
index eec52b7e3ed..00000000000
--- a/src/emu/ui/icorender.h
+++ /dev/null
@@ -1,233 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Dankan1890;Victor Laskin
-/***************************************************************************
-
- ui/icorender.h
-
- ICOns file loader.
-
- Original code by Victor Laskin (victor.laskin@gmail.com)
- http://vitiy.info/Code/ico.cpp
-
-***************************************************************************/
-#pragma once
-
-#ifndef __UI_ICORENDER_H__
-#define __UI_ICORENDER_H__
-
-// These next two structs represent how the icon information is stored
-// in an ICO file.
-typedef struct
-{
- UINT8 bWidth; // Width of the image
- UINT8 bHeight; // Height of the image (times 2)
- UINT8 bColorCount; // Number of colors in image (0 if >=8bpp)
- UINT8 bReserved; // Reserved
- UINT16 wPlanes; // Color Planes
- UINT16 wBitCount; // Bits per pixel
- UINT32 dwBytesInRes; // how many bytes in this resource?
- UINT32 dwImageOffset; // where in the file is this image
-} ICONDIRENTRY, *LPICONDIRENTRY;
-
-typedef struct
-{
- UINT16 idReserved; // Reserved
- UINT16 idType; // resource type (1 for icons)
- UINT16 idCount; // how many images?
- //ICONDIRENTRY idEntries[1]; // the entries for each image
-} ICONDIR, *LPICONDIR;
-
-// size - 40 bytes
-typedef struct {
- UINT32 biSize;
- UINT32 biWidth;
- UINT32 biHeight; // Icon Height (added height of XOR-Bitmap and AND-Bitmap)
- UINT16 biPlanes;
- UINT16 biBitCount;
- UINT32 biCompression;
- INT32 biSizeImage;
- UINT32 biXPelsPerMeter;
- UINT32 biYPelsPerMeter;
- UINT32 biClrUsed;
- UINT32 biClrImportant;
-} s_BITMAPINFOHEADER, *s_PBITMAPINFOHEADER;
-
-// 46 bytes
-typedef struct{
- s_BITMAPINFOHEADER icHeader; // DIB header
- UINT32 icColors[1]; // Color table (short 4 bytes) //RGBQUAD
- UINT8 icXOR[1]; // DIB bits for XOR mask
- UINT8 icAND[1]; // DIB bits for AND mask
-} ICONIMAGE, *LPICONIMAGE;
-
-//-------------------------------------------------
-// load an ICO file into a bitmap
-//-------------------------------------------------
-
-void render_load_ico(bitmap_argb32 &bitmap, emu_file &file, const char *dirname, const char *filename)
-{
- INT32 width = 0;
- INT32 height = 0;
-
- // deallocate previous bitmap
- bitmap.reset();
-
- // define file's full name
- std::string fname;
-
- if (!dirname)
- fname = filename;
- else
- fname.assign(dirname).append(PATH_SEPARATOR).append(filename);
-
- file_error filerr = file.open(fname.c_str());
-
- if (filerr != FILERR_NONE)
- return;
-
- // allocates a buffer for the image
- UINT64 size = file.size();
- UINT8 *buffer = global_alloc_array(UINT8, size + 1);
-
- // read data from the file and set them in the buffer
- file.read(buffer, size);
-
- LPICONDIR icoDir = (LPICONDIR)buffer;
- int iconsCount = icoDir->idCount;
-
- if (icoDir->idReserved != 0 || icoDir->idType != 1 || iconsCount == 0 || iconsCount > 20)
- {
- file.close();
- global_free_array(buffer);
- return;
- }
-
- UINT8* cursor = buffer;
- cursor += 6;
- ICONDIRENTRY* dirEntry = (ICONDIRENTRY*)(cursor);
- int maxSize = 0;
- int offset = 0;
- int maxBitCount = 0;
- for (int i = 0; i < iconsCount; i++, ++dirEntry)
- {
- int w = dirEntry->bWidth;
- int h = dirEntry->bHeight;
- int bitCount = dirEntry->wBitCount;
- if (w * h > maxSize || bitCount > maxBitCount) // we choose icon with max resolution
- {
- width = w;
- height = h;
- offset = dirEntry->dwImageOffset;
- maxSize = w * h;
- }
- }
-
- if (offset == 0) return;
-
- cursor = buffer;
- cursor += offset;
- ICONIMAGE* icon = (ICONIMAGE*)(cursor);
- int realBitsCount = (int)icon->icHeader.biBitCount;
- bool hasAndMask = (realBitsCount < 32) && (height != icon->icHeader.biHeight);
-
- cursor += 40;
- bitmap.allocate(width, height);
-
- // rgba + vertical swap
- if (realBitsCount >= 32)
- {
- for (int x = 0; x < width; ++x)
- for (int y = 0; y < height; ++y)
- {
- int shift2 = 4 * (x + (height - y - 1) * width);
- bitmap.pix32(y, x) = rgb_t(cursor[shift2 + 3], cursor[shift2 + 2], cursor[shift2 + 1], cursor[shift2]);
- }
- }
- else if (realBitsCount == 24)
- for (int x = 0; x < width; ++x)
- for (int y = 0; y < height; ++y)
- {
- int shift2 = 3 * (x + (height - y - 1) * width);
- bitmap.pix32(y, x) = rgb_t(255, cursor[shift2 + 2], cursor[shift2 + 1], cursor[shift2]);
- }
- else if (realBitsCount == 8) // 256 colors
- {
- // 256 color table
- UINT8 *colors = cursor;
- cursor += 256 * 4;
- for (int x = 0; x < width; ++x)
- for (int y = 0; y < height; ++y)
- {
- int shift2 = (x + (height - y - 1) * width);
- int index = 4 * cursor[shift2];
- bitmap.pix32(y, x) = rgb_t(255, colors[index + 2], colors[index + 1], colors[index]);
- }
- }
- else if (realBitsCount == 4) // 16 colors
- {
- // 16 color table
- UINT8 *colors = cursor;
- cursor += 16 * 4;
- for (int x = 0; x < width; ++x)
- for (int y = 0; y < height; ++y)
- {
- int shift2 = (x + (height - y - 1) * width);
- UINT8 index = cursor[shift2 / 2];
- if (shift2 % 2 == 0)
- index = (index >> 4) & 0xF;
- else
- index = index & 0xF;
- index *= 4;
- bitmap.pix32(y, x) = rgb_t(255, colors[index + 2], colors[index + 1], colors[index]);
- }
- }
- else if (realBitsCount == 1) // 2 colors
- {
- // 2 color table
- UINT8 *colors = cursor;
- cursor += 2 * 4;
- int boundary = width; // !!! 32 bit boundary (http://www.daubnet.com/en/file-format-ico)
- while (boundary % 32 != 0) boundary++;
-
- for (int x = 0; x < width; ++x)
- for (int y = 0; y < height; ++y)
- {
- int shift2 = (x + (height - y - 1) * boundary);
- UINT8 index = cursor[shift2 / 8];
-
- // select 1 bit only
- UINT8 bit = 7 - (x % 8);
- index = (index >> bit) & 0x01;
- index *= 4;
- bitmap.pix32(y, x) = rgb_t(255, colors[index + 2], colors[index + 1], colors[index]);
- }
- }
-
- // Read AND mask after base color data - 1 BIT MASK
- if (hasAndMask)
- {
- int boundary = width * realBitsCount; // !!! 32 bit boundary (http://www.daubnet.com/en/file-format-ico)
- while (boundary % 32 != 0) boundary++;
- cursor += boundary * height / 8;
-
- boundary = width;
- while (boundary % 32 != 0) boundary++;
-
- for (int y = 0; y < height; ++y)
- for (int x = 0; x < width; ++x)
- {
- UINT8 bit = 7 - (x % 8);
- int shift2 = (x + (height - y - 1) * boundary) / 8;
- int mask = (0x01 & ((UINT8)cursor[shift2] >> bit));
- rgb_t colors = bitmap.pix32(y, x);
- UINT8 alpha = colors.a();
- alpha *= 1 - mask;
- colors.set_a(alpha);
- bitmap.pix32(y, x) = colors;
- }
- }
- file.close();
- global_free_array(buffer);
-}
-
-#endif /* __UI_ICORENDER_H__ */
diff --git a/src/emu/ui/imgcntrl.cpp b/src/emu/ui/imgcntrl.cpp
index 8f3dbeca75b..3bb77723726 100644
--- a/src/emu/ui/imgcntrl.cpp
+++ b/src/emu/ui/imgcntrl.cpp
@@ -190,20 +190,20 @@ void ui_menu_control_device_image::handle()
zippath_closedir(directory);
}
submenu_result = -1;
- ui_menu::stack_push(global_alloc_clear<ui_menu_file_selector>(machine(), container, image, current_directory, current_file, true, image->image_interface()!=nullptr, can_create, &submenu_result));
+ ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_file_selector>(machine(), container, image, current_directory, current_file, true, image->image_interface()!=nullptr, can_create, &submenu_result)));
state = SELECT_FILE;
break;
}
case START_SOFTLIST:
sld = nullptr;
- ui_menu::stack_push(global_alloc_clear<ui_menu_software>(machine(), container, image->image_interface(), &sld));
+ ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_software>(machine(), container, image->image_interface(), &sld)));
state = SELECT_SOFTLIST;
break;
case START_OTHER_PART: {
submenu_result = -1;
- ui_menu::stack_push(global_alloc_clear<ui_menu_software_parts>(machine(), container, swi, swp->interface(), &swp, true, &submenu_result));
+ ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_software_parts>(machine(), container, swi, swp->interface(), &swp, true, &submenu_result)));
state = SELECT_OTHER_PART;
break;
}
@@ -214,7 +214,7 @@ void ui_menu_control_device_image::handle()
break;
}
software_info_name = "";
- ui_menu::stack_push(global_alloc_clear<ui_menu_software_list>(machine(), container, sld, image->image_interface(), software_info_name));
+ ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_software_list>(machine(), container, sld, image->image_interface(), software_info_name)));
state = SELECT_PARTLIST;
break;
@@ -226,7 +226,7 @@ void ui_menu_control_device_image::handle()
{
submenu_result = -1;
swp = nullptr;
- ui_menu::stack_push(global_alloc_clear<ui_menu_software_parts>(machine(), container, swi, image->image_interface(), &swp, false, &submenu_result));
+ ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_software_parts>(machine(), container, swi, image->image_interface(), &swp, false, &submenu_result)));
state = SELECT_ONE_PART;
}
else
@@ -290,7 +290,7 @@ void ui_menu_control_device_image::handle()
break;
case ui_menu_file_selector::R_CREATE:
- ui_menu::stack_push(global_alloc_clear<ui_menu_file_create>(machine(), container, image, current_directory, current_file, &create_ok));
+ ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_file_create>(machine(), container, image, current_directory, current_file, &create_ok)));
state = CHECK_CREATE;
break;
@@ -310,7 +310,7 @@ void ui_menu_control_device_image::handle()
test_create(can_create, need_confirm);
if(can_create) {
if(need_confirm) {
- ui_menu::stack_push(global_alloc_clear<ui_menu_confirm_save_as>(machine(), container, &create_confirmed));
+ ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_confirm_save_as>(machine(), container, &create_confirmed)));
state = CREATE_CONFIRM;
} else {
state = DO_CREATE;
diff --git a/src/emu/ui/inifile.cpp b/src/emu/ui/inifile.cpp
deleted file mode 100644
index 1c92b43a4d6..00000000000
--- a/src/emu/ui/inifile.cpp
+++ /dev/null
@@ -1,454 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Dankan1890
-/***************************************************************************
-
- ui/inifile.cpp
-
- UI INIs file manager.
-
-***************************************************************************/
-
-#include "emu.h"
-#include "ui/ui.h"
-#include "ui/inifile.h"
-#include "softlist.h"
-#include "drivenum.h"
-#include <algorithm>
-
-//-------------------------------------------------
-// GLOBAL VARIABLES
-//-------------------------------------------------
-UINT16 inifile_manager::current_category = 0;
-UINT16 inifile_manager::current_file = 0;
-
-//-------------------------------------------------
-// ctor
-//-------------------------------------------------
-
-inifile_manager::inifile_manager(running_machine &machine)
- : m_machine(machine)
-{
- ini_index.clear();
- directory_scan();
-}
-
-//-------------------------------------------------
-// scan directories and create index
-//-------------------------------------------------
-
-void inifile_manager::directory_scan()
-{
- // open extra INIs folder
- file_enumerator path(machine().ui().options().extraini_path());
- const osd_directory_entry *dir;
-
- // loop into folder's file
- while ((dir = path.next()) != nullptr)
- {
- int length = strlen(dir->name);
- std::string filename(dir->name);
-
- // skip ui_favorite file
- if (!core_stricmp("ui_favorite.ini", filename.c_str()))
- continue;
-
- // check .ini file ending
- if ((length > 4) && dir->name[length - 4] == '.' && tolower((UINT8)dir->name[length - 3]) == 'i' &&
- tolower((UINT8)dir->name[length - 2]) == 'n' && tolower((UINT8)dir->name[length - 1]) == 'i')
- {
- // try to open file and indexing
- if (parseopen(filename.c_str()))
- {
- init_category(filename);
- parseclose();
- }
- }
- }
-}
-
-//-------------------------------------------------
-// initialize category
-//-------------------------------------------------
-
-void inifile_manager::init_category(std::string &filename)
-{
- categoryindex index;
- char rbuf[MAX_CHAR_INFO];
- std::string readbuf, name;
- while (fgets(rbuf, MAX_CHAR_INFO, fp) != nullptr)
- {
- readbuf = rbuf;
- if (readbuf[0] == '[')
- {
- size_t found = readbuf.find("]");
- name = readbuf.substr(1, found - 1);
- if (name == "FOLDER_SETTINGS" || name == "ROOT_FOLDER")
- continue;
- else
- index.emplace_back(name, ftell(fp));
- }
- }
-
- if (!index.empty())
- ini_index.emplace_back(filename, index);
-}
-
-//-------------------------------------------------
-// load and indexing ini files
-//-------------------------------------------------
-
-void inifile_manager::load_ini_category(std::vector<int> &temp_filter)
-{
- if (ini_index.empty())
- return;
-
- bool search_clones = false;
- std::string filename(ini_index[current_file].name);
- long offset = ini_index[current_file].category[current_category].offset;
-
- if (!core_stricmp(filename.c_str(), "category.ini") || !core_stricmp(filename.c_str(), "alltime.ini"))
- search_clones = true;
-
- if (parseopen(filename.c_str()))
- {
- fseek(fp, offset, SEEK_SET);
- int num_game = driver_list::total();
- char rbuf[MAX_CHAR_INFO];
- std::string readbuf;
- while (fgets(rbuf, MAX_CHAR_INFO, fp) != nullptr)
- {
- readbuf = chartrimcarriage(rbuf);
-
- if (readbuf.empty() || readbuf[0] == '[')
- break;
-
- int dfind = driver_list::find(readbuf.c_str());
- if (dfind != -1 && search_clones)
- {
- temp_filter.push_back(dfind);
- int clone_of = driver_list::non_bios_clone(dfind);
- if (clone_of == -1)
- {
- for (int x = 0; x < num_game; x++)
- if (readbuf == driver_list::driver(x).parent && readbuf != driver_list::driver(x).name)
- temp_filter.push_back(x);
- }
- }
- else if (dfind != -1)
- temp_filter.push_back(dfind);
- }
- parseclose();
- }
-}
-
-//---------------------------------------------------------
-// parseopen - Open up file for reading
-//---------------------------------------------------------
-
-bool inifile_manager::parseopen(const char *filename)
-{
- // MAME core file parsing functions fail in recognizing UNICODE chars in UTF-8 without BOM,
- // so it's better and faster use standard C fileio functions.
-
- emu_file file(machine().ui().options().extraini_path(), OPEN_FLAG_READ);
- if (file.open(filename) != FILERR_NONE)
- return false;
-
- m_fullpath = file.fullpath();
- file.close();
- fp = fopen(m_fullpath.c_str(), "r");
-
- fgetc(fp);
- fseek(fp, 0, SEEK_SET);
- return true;
-}
-
-/**************************************************************************
- FAVORITE MANAGER
-**************************************************************************/
-
-//-------------------------------------------------
-// ctor
-//-------------------------------------------------
-
-favorite_manager::favorite_manager(running_machine &machine)
- : m_machine(machine)
-{
- m_current = -1;
- parse_favorite();
-}
-
-//-------------------------------------------------
-// add a game
-//-------------------------------------------------
-
-void favorite_manager::add_favorite_game(const game_driver *driver)
-{
- m_list.emplace_back(driver->name, driver->description, "", "", "", 0, "", driver, "", "", "", 1, "", "", "", true);
- save_favorite_games();
-}
-
-//-------------------------------------------------
-// add a system
-//-------------------------------------------------
-
-void favorite_manager::add_favorite_game(ui_software_info &swinfo)
-{
- m_list.push_back(swinfo);
- save_favorite_games();
-}
-
-//-------------------------------------------------
-// add a game / system
-//-------------------------------------------------
-
-void favorite_manager::add_favorite_game()
-{
- if ((machine().system().flags & MACHINE_TYPE_ARCADE) != 0)
- {
- add_favorite_game(&machine().system());
- return;
- }
-
- bool software_avail = false;
- image_interface_iterator iter(machine().root_device());
- for (device_image_interface *image = iter.first(); image != nullptr; image = iter.next())
- {
- if (image->exists() && image->software_entry())
- {
- const software_info *swinfo = image->software_entry();
- const software_part *part = image->part_entry();
- ui_software_info tmpmatches;
- tmpmatches.shortname = strensure(swinfo->shortname());
- tmpmatches.longname = strensure(image->longname());
- tmpmatches.parentname = strensure(swinfo->parentname());
- tmpmatches.year = strensure(image->year());
- tmpmatches.publisher = strensure(image->manufacturer());
- tmpmatches.supported = image->supported();
- tmpmatches.part = strensure(part->name());
- tmpmatches.driver = &machine().system();
- tmpmatches.listname = strensure(image->software_list_name());
- tmpmatches.interface = strensure(part->interface());
- tmpmatches.instance = strensure(image->instance_name());
- tmpmatches.startempty = 0;
- tmpmatches.parentlongname.clear();
- if (swinfo->parentname())
- {
- software_list_device *swlist = software_list_device::find_by_name(machine().config(), image->software_list_name());
- for (software_info *c_swinfo = swlist->first_software_info(); c_swinfo != nullptr; c_swinfo = c_swinfo->next())
- {
- std::string c_parent(c_swinfo->parentname());
- if (!c_parent.empty() && c_parent == swinfo->shortname())
- {
- tmpmatches.parentlongname = c_swinfo->longname();
- break;
- }
- }
- }
-
- tmpmatches.usage.clear();
- for (feature_list_item *flist = swinfo->other_info(); flist != nullptr; flist = flist->next())
- if (!strcmp(flist->name(), "usage"))
- tmpmatches.usage = flist->value();
-
- tmpmatches.devicetype = strensure(image->image_type_name());
- tmpmatches.available = true;
- software_avail = true;
- m_list.push_back(tmpmatches);
- save_favorite_games();
- }
- }
-
- if (!software_avail)
- add_favorite_game(&machine().system());
-}
-
-//-------------------------------------------------
-// remove a favorite from list
-//-------------------------------------------------
-
-void favorite_manager::remove_favorite_game(ui_software_info &swinfo)
-{
- m_list.erase(std::remove(m_list.begin(), m_list.end(), swinfo), m_list.end());
- save_favorite_games();
-}
-
-//-------------------------------------------------
-// remove a favorite from list
-//-------------------------------------------------
-
-void favorite_manager::remove_favorite_game()
-{
- m_list.erase(m_list.begin() + m_current);
- save_favorite_games();
-}
-
-//-------------------------------------------------
-// check if game is already in favorite list
-//-------------------------------------------------
-
-bool favorite_manager::isgame_favorite()
-{
- if ((machine().system().flags & MACHINE_TYPE_ARCADE) != 0)
- return isgame_favorite(&machine().system());
-
- image_interface_iterator iter(machine().root_device());
- bool image_loaded = false;
-
- for (device_image_interface *image = iter.first(); image != nullptr; image = iter.next())
- {
- const software_info *swinfo = image->software_entry();
- if (image->exists() && swinfo != nullptr)
- {
- image_loaded = true;
- for (size_t current = 0; current < m_list.size(); current++)
- if (m_list[current].shortname == swinfo->shortname() &&
- m_list[current].listname == image->software_list_name())
- {
- m_current = current;
- return true;
- }
- }
- }
-
- if (!image_loaded)
- return isgame_favorite(&machine().system());
-
- m_current = -1;
- return false;
-}
-
-//-------------------------------------------------
-// check if game is already in favorite list
-//-------------------------------------------------
-
-bool favorite_manager::isgame_favorite(const game_driver *driver)
-{
- for (size_t x = 0; x < m_list.size(); x++)
- if (m_list[x].driver == driver && m_list[x].shortname == driver->name)
- {
- m_current = x;
- return true;
- }
-
- m_current = -1;
- return false;
-}
-
-//-------------------------------------------------
-// check if game is already in favorite list
-//-------------------------------------------------
-
-bool favorite_manager::isgame_favorite(ui_software_info &swinfo)
-{
- for (size_t x = 0; x < m_list.size(); x++)
- if (m_list[x] == swinfo)
- {
- m_current = x;
- return true;
- }
-
- m_current = -1;
- return false;
-}
-
-//-------------------------------------------------
-// parse favorite file
-//-------------------------------------------------
-
-void favorite_manager::parse_favorite()
-{
- emu_file file(machine().ui().options().ui_path(), OPEN_FLAG_READ);
- if (file.open(favorite_filename) == FILERR_NONE)
- {
- char readbuf[1024];
- file.gets(readbuf, 1024);
-
- while (readbuf[0] == '[')
- file.gets(readbuf, 1024);
-
- while (file.gets(readbuf, 1024))
- {
- ui_software_info tmpmatches;
- tmpmatches.shortname = chartrimcarriage(readbuf);
- file.gets(readbuf, 1024);
- tmpmatches.longname = chartrimcarriage(readbuf);
- file.gets(readbuf, 1024);
- tmpmatches.parentname = chartrimcarriage(readbuf);
- file.gets(readbuf, 1024);
- tmpmatches.year = chartrimcarriage(readbuf);
- file.gets(readbuf, 1024);
- tmpmatches.publisher = chartrimcarriage(readbuf);
- file.gets(readbuf, 1024);
- tmpmatches.supported = atoi(readbuf);
- file.gets(readbuf, 1024);
- tmpmatches.part = chartrimcarriage(readbuf);
- file.gets(readbuf, 1024);
- chartrimcarriage(readbuf);
- int dx = driver_list::find(readbuf);
- if (dx == -1) continue;
- tmpmatches.driver = &driver_list::driver(dx);
- file.gets(readbuf, 1024);
- tmpmatches.listname = chartrimcarriage(readbuf);
- file.gets(readbuf, 1024);
- tmpmatches.interface = chartrimcarriage(readbuf);
- file.gets(readbuf, 1024);
- tmpmatches.instance = chartrimcarriage(readbuf);
- file.gets(readbuf, 1024);
- tmpmatches.startempty = atoi(readbuf);
- file.gets(readbuf, 1024);
- tmpmatches.parentlongname = chartrimcarriage(readbuf);
- file.gets(readbuf, 1024);
- tmpmatches.usage = chartrimcarriage(readbuf);
- file.gets(readbuf, 1024);
- tmpmatches.devicetype = chartrimcarriage(readbuf);
- file.gets(readbuf, 1024);
- tmpmatches.available = atoi(readbuf);
- m_list.push_back(tmpmatches);
- }
- file.close();
- }
-}
-
-//-------------------------------------------------
-// save favorite
-//-------------------------------------------------
-
-void favorite_manager::save_favorite_games()
-{
- // attempt to open the output file
- emu_file file(machine().ui().options().ui_path(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
- if (file.open(favorite_filename) == FILERR_NONE)
- {
- if (m_list.empty())
- {
- file.remove_on_close();
- file.close();
- return;
- }
-
- // generate the favorite INI
- std::string text("[ROOT_FOLDER]\n[Favorite]\n\n");
- for (auto & elem : m_list)
- {
- text += elem.shortname + "\n";
- text += elem.longname + "\n";
- text += elem.parentname + "\n";
- text += elem.year + "\n";
- text += elem.publisher + "\n";
- strcatprintf(text, "%d\n", elem.supported);
- text += elem.part + "\n";
- strcatprintf(text, "%s\n", elem.driver->name);
- text += elem.listname + "\n";
- text += elem.interface + "\n";
- text += elem.instance + "\n";
- strcatprintf(text, "%d\n", elem.startempty);
- text += elem.parentlongname + "\n";
- text += elem.usage + "\n";
- text += elem.devicetype + "\n";
- strcatprintf(text, "%d\n", elem.available);
- }
- file.puts(text.c_str());
- file.close();
- }
-}
diff --git a/src/emu/ui/inifile.h b/src/emu/ui/inifile.h
deleted file mode 100644
index 5a90b0d3d83..00000000000
--- a/src/emu/ui/inifile.h
+++ /dev/null
@@ -1,122 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Dankan1890
-/***************************************************************************
-
- ui/inifile.h
-
- UI INIs file manager.
-
-***************************************************************************/
-
-#pragma once
-
-#ifndef __UI_INIFILE_H__
-#define __UI_INIFILE_H__
-
-#include "ui/utils.h"
-
-//-------------------------------------------------
-// INIFILE MANAGER
-//-------------------------------------------------
-
-class inifile_manager
-{
-public:
- // category structure
- struct IniCategoryIndex
- {
- IniCategoryIndex(std::string _name, long _offset) { name = _name; offset = _offset; }
- std::string name;
- long offset;
- };
-
- using categoryindex = std::vector<IniCategoryIndex>;
-
- // ini file structure
- struct IniFileIndex
- {
- IniFileIndex(std::string _name, categoryindex _category) { name = _name; category = _category; }
- std::string name;
- categoryindex category;
- };
-
- // construction/destruction
- inifile_manager(running_machine &machine);
-
- // getters
- running_machine &machine() const { return m_machine; }
-
- // load games from category
- void load_ini_category(std::vector<int> &temp_filter);
-
- // files indices
- std::vector<IniFileIndex> ini_index;
- static UINT16 current_file, current_category;
-
- std::string actual_file() { return ini_index[current_file].name; }
- std::string actual_category() { return ini_index[current_file].category[current_category].name; }
-
-private:
- // init category index
- void init_category(std::string &filename);
-
- // init file index
- void directory_scan();
-
- // file open/close/seek
- bool parseopen(const char *filename);
- void parseclose() { if (fp != nullptr) fclose(fp); }
-
- // internal state
- running_machine &m_machine; // reference to our machine
- std::string m_fullpath;
- FILE *fp = nullptr;
-};
-
-//-------------------------------------------------
-// FAVORITE MANAGER
-//-------------------------------------------------
-
-class favorite_manager
-{
-public:
- // construction/destruction
- favorite_manager(running_machine &machine);
-
- // favorite indices
- std::vector<ui_software_info> m_list;
-
- // getters
- running_machine &machine() const { return m_machine; }
-
- // add
- void add_favorite_game();
- void add_favorite_game(const game_driver *driver);
- void add_favorite_game(ui_software_info &swinfo);
-
- // check
- bool isgame_favorite();
- bool isgame_favorite(const game_driver *driver);
- bool isgame_favorite(ui_software_info &swinfo);
-
- // save
- void save_favorite_games();
-
- // remove
- void remove_favorite_game();
- void remove_favorite_game(ui_software_info &swinfo);
-
-private:
- const char *favorite_filename = "favorites.ini";
-
- // current
- int m_current;
-
- // parse file ui_favorite
- void parse_favorite();
-
- // internal state
- running_machine &m_machine; // reference to our machine
-};
-
-#endif /* __UI_INIFILE_H__ */
diff --git a/src/emu/ui/inputmap.cpp b/src/emu/ui/inputmap.cpp
index f3ffe9b0e59..1fc0d046e1f 100644
--- a/src/emu/ui/inputmap.cpp
+++ b/src/emu/ui/inputmap.cpp
@@ -73,7 +73,7 @@ void ui_menu_input_groups::handle()
/* process the menu */
const ui_menu_event *menu_event = process(0);
if (menu_event != nullptr && menu_event->iptkey == IPT_UI_SELECT)
- ui_menu::stack_push(global_alloc_clear<ui_menu_input_general>(machine(), container, int((long long)(menu_event->itemref)-1)));
+ ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_input_general>(machine(), container, int((long long)(menu_event->itemref)-1))));
}
diff --git a/src/emu/ui/mainmenu.cpp b/src/emu/ui/mainmenu.cpp
index caf531c41ef..415ad118811 100644
--- a/src/emu/ui/mainmenu.cpp
+++ b/src/emu/ui/mainmenu.cpp
@@ -23,16 +23,12 @@
#include "ui/mainmenu.h"
#include "ui/miscmenu.h"
#include "ui/selgame.h"
-#include "ui/simpleselgame.h"
#include "ui/sliders.h"
#include "ui/slotopt.h"
#include "ui/tapectrl.h"
#include "ui/videoopt.h"
#include "imagedev/cassette.h"
#include "machine/bcreader.h"
-#include "ui/datfile.h"
-#include "ui/inifile.h"
-#include "ui/datmenu.h"
/***************************************************************************
@@ -49,106 +45,96 @@ ui_menu_main::ui_menu_main(running_machine &machine, render_container *container
void ui_menu_main::populate()
{
+ std::string menu_text;
+
/* add input menu items */
- item_append(_("Input (general)"), nullptr, 0, (void *)INPUT_GROUPS);
+ item_append("Input (general)", nullptr, 0, (void *)INPUT_GROUPS);
- item_append(_("Input (this Machine)"), nullptr, 0, (void *)INPUT_SPECIFIC);
+ strprintf(menu_text, "Input (this %s)", emulator_info::get_capstartgamenoun());
+ item_append(menu_text.c_str(), nullptr, 0, (void *)INPUT_SPECIFIC);
/* add optional input-related menus */
if (machine().ioport().has_analog())
- item_append(_("Analog Controls"), nullptr, 0, (void *)ANALOG);
+ item_append("Analog Controls", nullptr, 0, (void *)ANALOG);
if (machine().ioport().has_dips())
- item_append(_("Dip Switches"), nullptr, 0, (void *)SETTINGS_DIP_SWITCHES);
+ item_append("Dip Switches", nullptr, 0, (void *)SETTINGS_DIP_SWITCHES);
if (machine().ioport().has_configs())
{
- item_append(_("Machine Configuration"), nullptr, 0, (void *)SETTINGS_DRIVER_CONFIG);
+ strprintf(menu_text, "%s Configuration", emulator_info::get_capstartgamenoun());
+ item_append(menu_text.c_str(), nullptr, 0, (void *)SETTINGS_DRIVER_CONFIG);
}
/* add bookkeeping menu */
- item_append(_("Bookkeeping Info"), nullptr, 0, (void *)BOOKKEEPING);
+ item_append("Bookkeeping Info", nullptr, 0, (void *)BOOKKEEPING);
/* add game info menu */
- item_append(_("Machine Information"), nullptr, 0, (void *)GAME_INFO);
+ strprintf(menu_text, "%s Information", emulator_info::get_capstartgamenoun());
+ item_append(menu_text.c_str(), nullptr, 0, (void *)GAME_INFO);
image_interface_iterator imgiter(machine().root_device());
if (imgiter.first() != nullptr)
{
/* add image info menu */
- item_append(_("Image Information"), nullptr, 0, (void *)IMAGE_MENU_IMAGE_INFO);
+ item_append("Image Information", nullptr, 0, (void *)IMAGE_MENU_IMAGE_INFO);
/* add file manager menu */
- item_append(_("File Manager"), nullptr, 0, (void *)IMAGE_MENU_FILE_MANAGER);
+ item_append("File Manager", nullptr, 0, (void *)IMAGE_MENU_FILE_MANAGER);
/* add tape control menu */
cassette_device_iterator cassiter(machine().root_device());
if (cassiter.first() != nullptr)
- item_append(_("Tape Control"), nullptr, 0, (void *)TAPE_CONTROL);
+ item_append("Tape Control", nullptr, 0, (void *)TAPE_CONTROL);
}
pty_interface_iterator ptyiter(machine().root_device());
if (ptyiter.first() != nullptr) {
- item_append(_("Pseudo terminals"), nullptr, 0, (void *)PTY_INFO);
+ item_append("Pseudo terminals", nullptr, 0, (void *)PTY_INFO);
}
if (machine().ioport().has_bioses())
- item_append(_("Bios Selection"), nullptr, 0, (void *)BIOS_SELECTION);
+ item_append("Bios Selection", nullptr, 0, (void *)BIOS_SELECTION);
slot_interface_iterator slotiter(machine().root_device());
if (slotiter.first() != nullptr)
{
/* add slot info menu */
- item_append(_("Slot Devices"), nullptr, 0, (void *)SLOT_DEVICES);
+ item_append("Slot Devices", nullptr, 0, (void *)SLOT_DEVICES);
}
barcode_reader_device_iterator bcriter(machine().root_device());
if (bcriter.first() != nullptr)
{
/* add slot info menu */
- item_append(_("Barcode Reader"), nullptr, 0, (void *)BARCODE_READ);
+ item_append("Barcode Reader", nullptr, 0, (void *)BARCODE_READ);
}
network_interface_iterator netiter(machine().root_device());
if (netiter.first() != nullptr)
{
/* add image info menu */
- item_append(_("Network Devices"), nullptr, 0, (void*)NETWORK_DEVICES);
+ item_append("Network Devices", nullptr, 0, (void*)NETWORK_DEVICES);
}
/* add keyboard mode menu */
if (machine().ioport().has_keyboard() && machine().ioport().natkeyboard().can_post())
- item_append(_("Keyboard Mode"), nullptr, 0, (void *)KEYBOARD_MODE);
+ item_append("Keyboard Mode", nullptr, 0, (void *)KEYBOARD_MODE);
/* add sliders menu */
- item_append(_("Slider Controls"), nullptr, 0, (void *)SLIDERS);
+ item_append("Slider Controls", nullptr, 0, (void *)SLIDERS);
/* add video options menu */
- item_append(_("Video Options"), nullptr, 0, (machine().render().target_by_index(1) != nullptr) ? (void *)VIDEO_TARGETS : (void *)VIDEO_OPTIONS);
+ item_append("Video Options", nullptr, 0, (machine().render().target_by_index(1) != nullptr) ? (void *)VIDEO_TARGETS : (void *)VIDEO_OPTIONS);
/* add crosshair options menu */
if (machine().crosshair().get_usage())
- item_append(_("Crosshair Options"), nullptr, 0, (void *)CROSSHAIR);
+ item_append("Crosshair Options", nullptr, 0, (void *)CROSSHAIR);
/* add cheat menu */
- if (machine().options().cheat())
- item_append(_("Cheat"), nullptr, 0, (void *)CHEAT);
-
- // add dats menu
- if (machine().ui().options().enabled_dats() && machine().datfile().has_data(&machine().system()))
- item_append(_("External DAT View"), nullptr, 0, (void *)EXTERNAL_DATS);
-
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
-
- /* add favorite menu */
- if (!machine().favorite().isgame_favorite())
- item_append(_("Add To Favorites"), nullptr, 0, (void *)ADD_FAVORITE);
- else
- item_append(_("Remove From Favorites"), nullptr, 0, (void *)REMOVE_FAVORITE);
-
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
-
-// item_append(_("Quit from Machine"), nullptr, 0, (void *)QUIT_GAME);
+ if (machine().options().cheat() && machine().cheat().first() != nullptr)
+ item_append("Cheat", nullptr, 0, (void *)CHEAT);
/* add reset and exit menus */
- item_append(_("Select New Machine"), nullptr, 0, (void *)SELECT_GAME);
+ strprintf(menu_text, "Select New %s", emulator_info::get_capstartgamenoun());
+ item_append(menu_text.c_str(), nullptr, 0, (void *)SELECT_GAME);
}
ui_menu_main::~ui_menu_main()
@@ -166,114 +152,91 @@ void ui_menu_main::handle()
if (menu_event != nullptr && menu_event->iptkey == IPT_UI_SELECT) {
switch((long long)(menu_event->itemref)) {
case INPUT_GROUPS:
- ui_menu::stack_push(global_alloc_clear<ui_menu_input_groups>(machine(), container));
+ ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_input_groups>(machine(), container)));
break;
case INPUT_SPECIFIC:
- ui_menu::stack_push(global_alloc_clear<ui_menu_input_specific>(machine(), container));
+ ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_input_specific>(machine(), container)));
break;
case SETTINGS_DIP_SWITCHES:
- ui_menu::stack_push(global_alloc_clear<ui_menu_settings_dip_switches>(machine(), container));
+ ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_settings_dip_switches>(machine(), container)));
break;
case SETTINGS_DRIVER_CONFIG:
- ui_menu::stack_push(global_alloc_clear<ui_menu_settings_driver_config>(machine(), container));
+ ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_settings_driver_config>(machine(), container)));
break;
case ANALOG:
- ui_menu::stack_push(global_alloc_clear<ui_menu_analog>(machine(), container));
+ ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_analog>(machine(), container)));
break;
case BOOKKEEPING:
- ui_menu::stack_push(global_alloc_clear<ui_menu_bookkeeping>(machine(), container));
+ ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_bookkeeping>(machine(), container)));
break;
case GAME_INFO:
- ui_menu::stack_push(global_alloc_clear<ui_menu_game_info>(machine(), container));
+ ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_game_info>(machine(), container)));
break;
case IMAGE_MENU_IMAGE_INFO:
- ui_menu::stack_push(global_alloc_clear<ui_menu_image_info>(machine(), container));
+ ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_image_info>(machine(), container)));
break;
case IMAGE_MENU_FILE_MANAGER:
- ui_menu::stack_push(global_alloc_clear<ui_menu_file_manager>(machine(), container, nullptr));
+ ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_file_manager>(machine(), container, nullptr)));
break;
case TAPE_CONTROL:
- ui_menu::stack_push(global_alloc_clear<ui_menu_tape_control>(machine(), container, nullptr));
+ ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_tape_control>(machine(), container, nullptr)));
break;
- case PTY_INFO:
- ui_menu::stack_push(global_alloc_clear<ui_menu_pty_info>(machine(), container));
+ case PTY_INFO:
+ ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_pty_info>(machine(), container)));
break;
case SLOT_DEVICES:
- ui_menu::stack_push(global_alloc_clear<ui_menu_slot_devices>(machine(), container));
+ ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_slot_devices>(machine(), container)));
break;
case NETWORK_DEVICES:
- ui_menu::stack_push(global_alloc_clear<ui_menu_network_devices>(machine(), container));
+ ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_network_devices>(machine(), container)));
break;
case KEYBOARD_MODE:
- ui_menu::stack_push(global_alloc_clear<ui_menu_keyboard_mode>(machine(), container));
+ ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_keyboard_mode>(machine(), container)));
break;
case SLIDERS:
- ui_menu::stack_push(global_alloc_clear<ui_menu_sliders>(machine(), container, false));
+ ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_sliders>(machine(), container, false)));
break;
case VIDEO_TARGETS:
- ui_menu::stack_push(global_alloc_clear<ui_menu_video_targets>(machine(), container));
+ ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_video_targets>(machine(), container)));
break;
case VIDEO_OPTIONS:
- ui_menu::stack_push(global_alloc_clear<ui_menu_video_options>(machine(), container, machine().render().first_target()));
+ ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_video_options>(machine(), container, machine().render().first_target())));
break;
case CROSSHAIR:
- ui_menu::stack_push(global_alloc_clear<ui_menu_crosshair>(machine(), container));
+ ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_crosshair>(machine(), container)));
break;
case CHEAT:
- ui_menu::stack_push(global_alloc_clear<ui_menu_cheat>(machine(), container));
+ ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_cheat>(machine(), container)));
break;
case SELECT_GAME:
- if (strcmp(machine().options().ui(),"simple")==0) {
- ui_menu::stack_push(global_alloc_clear<ui_simple_menu_select_game>(machine(), container, nullptr));
- } else {
- ui_menu::stack_push(global_alloc_clear<ui_menu_select_game>(machine(), container, nullptr));
- }
+ ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_select_game>(machine(), container, nullptr)));
break;
case BIOS_SELECTION:
- ui_menu::stack_push(global_alloc_clear<ui_menu_bios_selection>(machine(), container));
+ ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_bios_selection>(machine(), container)));
break;
case BARCODE_READ:
- ui_menu::stack_push(global_alloc_clear<ui_menu_barcode_reader>(machine(), container, nullptr));
- break;
-
- case EXTERNAL_DATS:
- ui_menu::stack_push(global_alloc_clear<ui_menu_dats_view>(machine(), container));
- break;
-
- case ADD_FAVORITE:
- machine().favorite().add_favorite_game();
- reset(UI_MENU_RESET_REMEMBER_POSITION);
- break;
-
- case REMOVE_FAVORITE:
- machine().favorite().remove_favorite_game();
- reset(UI_MENU_RESET_REMEMBER_POSITION);
- break;
-
- case QUIT_GAME:
- ui_menu::stack_pop(machine());
- machine().ui().request_quit();
+ ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_barcode_reader>(machine(), container, nullptr)));
break;
default:
diff --git a/src/emu/ui/mainmenu.h b/src/emu/ui/mainmenu.h
index 0684e230ad8..27a810341c3 100644
--- a/src/emu/ui/mainmenu.h
+++ b/src/emu/ui/mainmenu.h
@@ -45,14 +45,8 @@ private:
SELECT_GAME,
BIOS_SELECTION,
BARCODE_READ,
- PTY_INFO,
- EXTERNAL_DATS,
- ADD_FAVORITE,
- REMOVE_FAVORITE,
- QUIT_GAME
+ PTY_INFO
};
-
- //bool submenu;
};
#endif /* __UI_MAINMENU_H__ */
diff --git a/src/emu/ui/menu.cpp b/src/emu/ui/menu.cpp
index 547030298bb..069b05aa913 100644
--- a/src/emu/ui/menu.cpp
+++ b/src/emu/ui/menu.cpp
@@ -2,9 +2,9 @@
// copyright-holders:Nicola Salmoria, Aaron Giles, Nathan Woods
/*********************************************************************
- ui/menu.c
+ ui/menu.c
- Internal MAME menus for the user interface.
+ Internal MAME menus for the user interface.
*********************************************************************/
@@ -15,60 +15,18 @@
#include "ui/ui.h"
#include "ui/menu.h"
#include "ui/mainmenu.h"
-#include "ui/utils.h"
-#include "ui/defimg.h"
-#include "ui/starimg.h"
-#include "ui/optsmenu.h"
-#include "ui/datfile.h"
-#include "rendfont.h"
-#include "ui/custmenu.h"
-#include "ui/icorender.h"
-#include "ui/toolbar.h"
+
/***************************************************************************
- CONSTANTS
+ CONSTANTS
***************************************************************************/
-#define UI_MENU_POOL_SIZE 65536
-#define MAX_ICONS_RENDER 40
-
-struct ui_arts_info
-{
- const char *title, *path, *addpath;
-};
-
-static const ui_arts_info arts_info[] =
-{
- { "Snapshots", OPTION_SNAPSHOT_DIRECTORY, "snap" },
- { "Cabinets", OPTION_CABINETS_PATH, "cabinets;cabdevs" },
- { "Control Panels", OPTION_CPANELS_PATH, "cpanel" },
- { "PCBs", OPTION_PCBS_PATH, "pcb" },
- { "Flyers", OPTION_FLYERS_PATH, "flyers" },
- { "Titles", OPTION_TITLES_PATH, "titles" },
- { "Ends", OPTION_ENDS_PATH, "ends" },
- { "Artwork Preview", OPTION_ARTPREV_PATH, "artwork preview" },
- { "Bosses", OPTION_BOSSES_PATH, "bosses" },
- { "Logos", OPTION_LOGOS_PATH, "logo" },
- { "Versus", OPTION_VERSUS_PATH, "versus" },
- { "Game Over", OPTION_GAMEOVER_PATH, "gameover" },
- { "HowTo", OPTION_HOWTO_PATH, "howto" },
- { "Scores", OPTION_SCORES_PATH, "scores" },
- { "Select", OPTION_SELECT_PATH, "select" },
- { "Marquees", OPTION_MARQUEES_PATH, "marquees" },
- { nullptr }
-};
-
-static const char *hover_msg[] = {
- "Add or remove favorites",
- "Export displayed list to file",
- "Show DATs view",
- "Setup directories",
- "Configure options"
-};
+#define UI_MENU_POOL_SIZE 65536
+#define UI_MENU_ALLOC_ITEMS 256
/***************************************************************************
- GLOBAL VARIABLES
+ GLOBAL VARIABLES
***************************************************************************/
ui_menu *ui_menu::menu_stack;
@@ -76,24 +34,9 @@ ui_menu *ui_menu::menu_free;
std::unique_ptr<bitmap_rgb32> ui_menu::hilight_bitmap;
render_texture *ui_menu::hilight_texture;
render_texture *ui_menu::arrow_texture;
-render_texture *ui_menu::snapx_texture;
-render_texture *ui_menu::hilight_main_texture;
-render_texture *ui_menu::bgrnd_texture;
-render_texture *ui_menu::star_texture;
-render_texture *ui_menu::toolbar_texture[UI_TOOLBAR_BUTTONS];
-render_texture *ui_menu::sw_toolbar_texture[UI_TOOLBAR_BUTTONS];
-render_texture *ui_menu::icons_texture[MAX_ICONS_RENDER];
-std::unique_ptr<bitmap_argb32> ui_menu::snapx_bitmap;
-std::unique_ptr<bitmap_argb32> ui_menu::no_avail_bitmap;
-std::unique_ptr<bitmap_argb32> ui_menu::star_bitmap;
-std::unique_ptr<bitmap_argb32> ui_menu::bgrnd_bitmap;
-bitmap_argb32 *ui_menu::icons_bitmap[MAX_ICONS_RENDER];
-std::unique_ptr<bitmap_rgb32> ui_menu::hilight_main_bitmap;
-bitmap_argb32 *ui_menu::toolbar_bitmap[UI_TOOLBAR_BUTTONS];
-bitmap_argb32 *ui_menu::sw_toolbar_bitmap[UI_TOOLBAR_BUTTONS];
/***************************************************************************
- INLINE FUNCTIONS
+ INLINE FUNCTIONS
***************************************************************************/
//-------------------------------------------------
@@ -126,7 +69,7 @@ inline bool ui_menu::exclusive_input_pressed(int key, int repeat)
/***************************************************************************
- CORE SYSTEM MANAGEMENT
+ CORE SYSTEM MANAGEMENT
***************************************************************************/
//-------------------------------------------------
@@ -135,12 +78,14 @@ inline bool ui_menu::exclusive_input_pressed(int key, int repeat)
void ui_menu::init(running_machine &machine)
{
+ int x;
+
// initialize the menu stack
ui_menu::stack_reset(machine);
// create a texture for hilighting items
hilight_bitmap = std::make_unique<bitmap_rgb32>(256, 1);
- for (int x = 0; x < 256; x++)
+ for (x = 0; x < 256; x++)
{
int alpha = 0xff;
if (x < 25) alpha = 0xff * x / 25;
@@ -153,9 +98,6 @@ void ui_menu::init(running_machine &machine)
// create a texture for arrow icons
arrow_texture = machine.render().texture_alloc(render_triangle);
- // initialize ui
- init_ui(machine);
-
// add an exit callback to free memory
machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(ui_menu::exit), &machine));
}
@@ -172,28 +114,14 @@ void ui_menu::exit(running_machine &machine)
ui_menu::clear_free_list(machine);
// free textures
- render_manager &mre = machine.render();
- mre.texture_free(hilight_texture);
- mre.texture_free(arrow_texture);
- mre.texture_free(snapx_texture);
- mre.texture_free(hilight_main_texture);
- mre.texture_free(bgrnd_texture);
- mre.texture_free(star_texture);
-
- for (auto & elem : icons_texture)
- mre.texture_free(elem);
-
- for (int i = 0; i < UI_TOOLBAR_BUTTONS; i++)
- {
- mre.texture_free(sw_toolbar_texture[i]);
- mre.texture_free(toolbar_texture[i]);
- }
+ machine.render().texture_free(hilight_texture);
+ machine.render().texture_free(arrow_texture);
}
/***************************************************************************
- CORE MENU MANAGEMENT
+ CORE MENU MANAGEMENT
***************************************************************************/
//-------------------------------------------------
@@ -206,8 +134,6 @@ ui_menu::ui_menu(running_machine &machine, render_container *_container) : m_mac
container = _container;
reset(UI_MENU_RESET_SELECT_FIRST);
-
- top_line = 0;
}
@@ -222,8 +148,12 @@ ui_menu::~ui_menu()
{
ui_menu_pool *ppool = pool;
pool = pool->next;
- global_free(ppool);
+ auto_free(machine(), ppool);
}
+
+ // free the item array
+ if (item)
+ auto_free(machine(), item);
}
@@ -242,14 +172,14 @@ void ui_menu::reset(ui_menu_reset_options options)
else if (options == UI_MENU_RESET_REMEMBER_REF)
resetref = item[selected].ref;
- // reset all the pools and the item.size() back to 0
+ // reset all the pools and the numitems back to 0
for (ui_menu_pool *ppool = pool; ppool != nullptr; ppool = ppool->next)
ppool->top = (UINT8 *)(ppool + 1);
- item.clear();
+ numitems = 0;
visitems = 0;
selected = 0;
std::string backtext;
- strprintf(backtext, "Return to Machine");
+ strprintf(backtext, "Return to %s", emulator_info::get_capstartgamenoun());
// add an item to return
if (parent == nullptr)
@@ -284,42 +214,66 @@ void ui_menu::set_special_main_menu(bool special)
//-------------------------------------------------
+// populated - returns true if the menu
+// has any non-default items in it
+//-------------------------------------------------
+
+bool ui_menu::populated()
+{
+ return numitems > 1;
+}
+
+
+//-------------------------------------------------
// item_append - append a new item to the
// end of the menu
//-------------------------------------------------
void ui_menu::item_append(const char *text, const char *subtext, UINT32 flags, void *ref)
{
+ ui_menu_item *pitem;
+ int index;
+
// only allow multiline as the first item
if ((flags & MENU_FLAG_MULTILINE) != 0)
- assert(item.size() == 1);
+ assert(numitems == 1);
// only allow a single multi-line item
- else if (item.size() >= 2)
+ else if (numitems >= 2)
assert((item[0].flags & MENU_FLAG_MULTILINE) == 0);
- // allocate a new item and populate it
- ui_menu_item pitem;
- pitem.text = (text != nullptr) ? pool_strdup(text) : nullptr;
- pitem.subtext = (subtext != nullptr) ? pool_strdup(subtext) : nullptr;
- pitem.flags = flags;
- pitem.ref = ref;
-
- // append to array
- int index = item.size();
- if (!item.empty())
+ // realloc the item array if necessary
+ if (numitems >= allocitems)
{
- item.insert(item.end() - 1, pitem);
- --index;
+ int olditems = allocitems;
+ allocitems += UI_MENU_ALLOC_ITEMS;
+ ui_menu_item *newitems = auto_alloc_array(machine(), ui_menu_item, allocitems);
+ for (int itemnum = 0; itemnum < olditems; itemnum++)
+ newitems[itemnum] = item[itemnum];
+ auto_free(machine(), item);
+ item = newitems;
}
- else
- item.push_back(pitem);
+ index = numitems++;
+
+ // copy the previous last item to the next one
+ if (index != 0)
+ {
+ index--;
+ item[index + 1] = item[index];
+ }
+
+ // allocate a new item and populate it
+ pitem = &item[index];
+ pitem->text = (text != nullptr) ? pool_strdup(text) : nullptr;
+ pitem->subtext = (subtext != nullptr) ? pool_strdup(subtext) : nullptr;
+ pitem->flags = flags;
+ pitem->ref = ref;
// update the selection if we need to
if (resetpos == index || (resetref != nullptr && resetref == ref))
selected = index;
- if (resetpos == item.size() - 1)
- selected = item.size() - 1;
+ if (resetpos == numitems - 1)
+ selected = numitems - 1;
}
@@ -334,42 +288,27 @@ const ui_menu_event *ui_menu::process(UINT32 flags)
menu_event.iptkey = IPT_INVALID;
// first make sure our selection is valid
-// if (!(flags & UI_MENU_PROCESS_NOINPUT))
- validate_selection(1);
+ validate_selection(1);
// draw the menu
- if (item.size() > 1 && (item[0].flags & MENU_FLAG_MULTILINE) != 0)
+ if (numitems > 1 && (item[0].flags & MENU_FLAG_MULTILINE) != 0)
draw_text_box();
- else if ((item[0].flags & MENU_FLAG_UI ) != 0 || (item[0].flags & MENU_FLAG_UI_SWLIST ) != 0)
- draw_select_game(flags & UI_MENU_PROCESS_NOINPUT);
- else if ((item[0].flags & MENU_FLAG_UI_PALETTE ) != 0)
- draw_palette_menu();
- else if ((item[0].flags & MENU_FLAG_UI_DATS) != 0)
- draw_dats_menu();
else
- draw(flags & UI_MENU_PROCESS_CUSTOM_ONLY, flags & UI_MENU_PROCESS_NOIMAGE, flags & UI_MENU_PROCESS_NOINPUT);
+ draw(flags & UI_MENU_PROCESS_CUSTOM_ONLY);
// process input
- if (!(flags & UI_MENU_PROCESS_NOKEYS) && !(flags & UI_MENU_PROCESS_NOINPUT))
+ if (!(flags & UI_MENU_PROCESS_NOKEYS))
{
// read events
- if ((item[0].flags & MENU_FLAG_UI ) != 0 || (item[0].flags & MENU_FLAG_UI_SWLIST ) != 0)
- handle_main_events(flags);
- else
- handle_events(flags);
+ handle_events();
// handle the keys if we don't already have an menu_event
if (menu_event.iptkey == IPT_INVALID)
- {
- if ((item[0].flags & MENU_FLAG_UI ) != 0 || (item[0].flags & MENU_FLAG_UI_SWLIST ) != 0)
- handle_main_keys(flags);
- else
- handle_keys(flags);
- }
+ handle_keys(flags);
}
// update the selected item in the menu_event
- if (menu_event.iptkey != IPT_INVALID && selected >= 0 && selected < item.size())
+ if (menu_event.iptkey != IPT_INVALID && selected >= 0 && selected < numitems)
{
menu_event.itemref = item[selected].ref;
return &menu_event;
@@ -399,7 +338,7 @@ void *ui_menu::m_pool_alloc(size_t size)
}
// allocate a new pool
- ppool = (ui_menu_pool *)global_alloc_array_clear<UINT8>(sizeof(*ppool) + UI_MENU_POOL_SIZE);
+ ppool = (ui_menu_pool *)auto_alloc_array_clear(machine(), UINT8, sizeof(*ppool) + UI_MENU_POOL_SIZE);
// wire it up
ppool->next = pool;
@@ -428,7 +367,7 @@ const char *ui_menu::pool_strdup(const char *string)
void *ui_menu::get_selection()
{
- return (selected >= 0 && selected < item.size()) ? item[selected].ref : nullptr;
+ return (selected >= 0 && selected < numitems) ? item[selected].ref : nullptr;
}
@@ -439,8 +378,10 @@ void *ui_menu::get_selection()
void ui_menu::set_selection(void *selected_itemref)
{
+ int itemnum;
+
selected = -1;
- for (int itemnum = 0; itemnum < item.size(); itemnum++)
+ for (itemnum = 0; itemnum < numitems; itemnum++)
if (item[itemnum].ref == selected_itemref)
{
selected = itemnum;
@@ -451,39 +392,38 @@ void ui_menu::set_selection(void *selected_itemref)
/***************************************************************************
- INTERNAL MENU PROCESSING
+ INTERNAL MENU PROCESSING
***************************************************************************/
//-------------------------------------------------
// draw - draw a menu
//-------------------------------------------------
-void ui_menu::draw(bool customonly, bool noimage, bool noinput)
+void ui_menu::draw(bool customonly)
{
- // first draw the FPS counter
- if (machine().ui().show_fps_counter())
- {
- machine().ui().draw_text_full(container, machine().video().speed_text().c_str(), 0.0f, 0.0f, 1.0f,
- JUSTIFY_RIGHT, WRAP_WORD, DRAW_OPAQUE, ARGB_WHITE, ARGB_BLACK, nullptr, nullptr);
- }
-
float line_height = machine().ui().get_line_height();
float lr_arrow_width = 0.4f * line_height * machine().render().ui_aspect();
float ud_arrow_width = line_height * machine().render().ui_aspect();
float gutter_width = lr_arrow_width * 1.3f;
-
- bool selected_subitem_too_big = false;
+ float x1, y1, x2, y2;
+
+ float effective_width, effective_left;
+ float visible_width, visible_main_menu_height;
+ float visible_extra_menu_height;
+ float visible_top, visible_left;
+ int selected_subitem_too_big = FALSE;
+ int visible_lines;
+ int top_line;
int itemnum, linenum;
bool mouse_hit, mouse_button;
+ render_target *mouse_target;
+ INT32 mouse_target_x, mouse_target_y;
float mouse_x = -1, mouse_y = -1;
- if (machine().ui().options().use_background_image() && &machine().system() == &GAME_NAME(___empty) && bgrnd_bitmap->valid() && !noimage)
- container->add_quad(0.0f, 0.0f, 1.0f, 1.0f, ARGB_WHITE, bgrnd_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
-
// compute the width and height of the full menu
- float visible_width = 0;
- float visible_main_menu_height = 0;
- for (itemnum = 0; itemnum < item.size(); itemnum++)
+ visible_width = 0;
+ visible_main_menu_height = 0;
+ for (itemnum = 0; itemnum < numitems; itemnum++)
{
const ui_menu_item &pitem = item[itemnum];
float total_width;
@@ -504,7 +444,7 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput)
}
// account for extra space at the top and bottom
- float visible_extra_menu_height = customtop + custombottom;
+ visible_extra_menu_height = customtop + custombottom;
// add a little bit of slop for rounding
visible_width += 0.01f;
@@ -522,46 +462,44 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput)
visible_main_menu_height = (float)visible_lines * line_height;
// compute top/left of inner menu area by centering
- float visible_left = (1.0f - visible_width) * 0.5f;
- float visible_top = (1.0f - (visible_main_menu_height + visible_extra_menu_height)) * 0.5f;
+ visible_left = (1.0f - visible_width) * 0.5f;
+ visible_top = (1.0f - (visible_main_menu_height + visible_extra_menu_height)) * 0.5f;
// if the menu is at the bottom of the extra, adjust
visible_top += customtop;
// first add us a box
- float x1 = visible_left - UI_BOX_LR_BORDER;
- float y1 = visible_top - UI_BOX_TB_BORDER;
- float x2 = visible_left + visible_width + UI_BOX_LR_BORDER;
- float y2 = visible_top + visible_main_menu_height + UI_BOX_TB_BORDER;
+ x1 = visible_left - UI_BOX_LR_BORDER;
+ y1 = visible_top - UI_BOX_TB_BORDER;
+ x2 = visible_left + visible_width + UI_BOX_LR_BORDER;
+ y2 = visible_top + visible_main_menu_height + UI_BOX_TB_BORDER;
if (!customonly)
machine().ui().draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR);
// determine the first visible line based on the current selection
- if (top_line < 0 || selected == 0)
+ top_line = selected - visible_lines / 2;
+ if (top_line < 0)
top_line = 0;
- if (top_line + visible_lines >= item.size())
- top_line = item.size() - visible_lines;
+ if (top_line + visible_lines >= numitems)
+ top_line = numitems - visible_lines;
// determine effective positions taking into account the hilighting arrows
- float effective_width = visible_width - 2.0f * gutter_width;
- float effective_left = visible_left + gutter_width;
+ effective_width = visible_width - 2.0f * gutter_width;
+ effective_left = visible_left + gutter_width;
// locate mouse
mouse_hit = false;
mouse_button = false;
- if (!customonly && !noinput)
+ if (!customonly)
{
- INT32 mouse_target_x, mouse_target_y;
- render_target *mouse_target = machine().ui_input().find_mouse(&mouse_target_x, &mouse_target_y, &mouse_button);
+ mouse_target = machine().ui_input().find_mouse(&mouse_target_x, &mouse_target_y, &mouse_button);
if (mouse_target != nullptr)
if (mouse_target->map_point_container(mouse_target_x, mouse_target_y, *container, mouse_x, mouse_y))
mouse_hit = true;
}
// loop over visible lines
- hover = item.size() + 1;
- float line_x0 = x1 + 0.5f * UI_LINE_WIDTH;
- float line_x1 = x2 - 0.5f * UI_LINE_WIDTH;
+ hover = numitems + 1;
if (!customonly)
for (linenum = 0; linenum < visible_lines; linenum++)
{
@@ -573,7 +511,9 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput)
rgb_t bgcolor = UI_TEXT_BG_COLOR;
rgb_t fgcolor2 = UI_SUBITEM_COLOR;
rgb_t fgcolor3 = UI_CLONE_COLOR;
+ float line_x0 = x1 + 0.5f * UI_LINE_WIDTH;
float line_y0 = line_y;
+ float line_x1 = x2 - 0.5f * UI_LINE_WIDTH;
float line_y1 = line_y + line_height;
// set the hover if this is our item
@@ -590,7 +530,7 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput)
}
// else if the mouse is over this item, draw with a different background
- else if (itemnum == hover && ((linenum == 0 && top_line != 0) || (linenum == visible_lines - 1 && itemnum != item.size() - 1)))
+ else if (itemnum == hover)
{
fgcolor = UI_MOUSEOVER_COLOR;
bgcolor = UI_MOUSEOVER_BG_COLOR;
@@ -605,7 +545,8 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput)
// if we're on the top line, display the up arrow
if (linenum == 0 && top_line != 0)
{
- draw_arrow(container,
+ draw_arrow(
+ container,
0.5f * (x1 + x2) - 0.5f * ud_arrow_width,
line_y + 0.25f * line_height,
0.5f * (x1 + x2) + 0.5f * ud_arrow_width,
@@ -613,13 +554,14 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput)
fgcolor,
ROT0);
if (hover == itemnum)
- hover = HOVER_ARROW_UP;
+ hover = -2;
}
// if we're on the bottom line, display the down arrow
- else if (linenum == visible_lines - 1 && itemnum != item.size() - 1)
+ else if (linenum == visible_lines - 1 && itemnum != numitems - 1)
{
- draw_arrow(container,
+ draw_arrow(
+ container,
0.5f * (x1 + x2) - 0.5f * ud_arrow_width,
line_y + 0.25f * line_height,
0.5f * (x1 + x2) + 0.5f * ud_arrow_width,
@@ -627,7 +569,7 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput)
fgcolor,
ROT0 ^ ORIENTATION_FLIP_Y);
if (hover == itemnum)
- hover = HOVER_ARROW_DOWN;
+ hover = -1;
}
// if we're just a divider, draw a line
@@ -637,7 +579,7 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput)
// if we don't have a subitem, just draw the string centered
else if (pitem.subtext == nullptr)
machine().ui().draw_text_full(container, itemtext, effective_left, line_y, effective_width,
- JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr);
+ JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr);
// otherwise, draw the item on the left and the subitem text on the right
else
@@ -658,19 +600,9 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput)
{
subitem_text = "...";
if (itemnum == selected)
- selected_subitem_too_big = true;
+ selected_subitem_too_big = TRUE;
}
- // customize subitem text color
- if (!core_stricmp(subitem_text, "On"))
- fgcolor2 = rgb_t(0xff,0x00,0xff,0x00);
-
- if (!core_stricmp(subitem_text, "Off"))
- fgcolor2 = rgb_t(0xff,0xff,0x00,0x00);
-
- if (!core_stricmp(subitem_text, "Auto"))
- fgcolor2 = rgb_t(0xff,0xff,0xff,0x00);
-
// draw the subitem right-justified
machine().ui().draw_text_full(container, subitem_text, effective_left + item_width, line_y, effective_width - item_width,
JUSTIFY_RIGHT, WRAP_TRUNCATE, DRAW_NORMAL, subitem_invert ? fgcolor3 : fgcolor2, bgcolor, &subitem_width, nullptr);
@@ -678,7 +610,8 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput)
// apply arrows
if (itemnum == selected && (pitem.flags & MENU_FLAG_LEFT_ARROW))
{
- draw_arrow(container,
+ draw_arrow(
+ container,
effective_left + effective_width - subitem_width - gutter_width,
line_y + 0.1f * line_height,
effective_left + effective_width - subitem_width - gutter_width + lr_arrow_width,
@@ -688,7 +621,8 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput)
}
if (itemnum == selected && (pitem.flags & MENU_FLAG_RIGHT_ARROW))
{
- draw_arrow(container,
+ draw_arrow(
+ container,
effective_left + effective_width + gutter_width - lr_arrow_width,
line_y + 0.1f * line_height,
effective_left + effective_width + gutter_width,
@@ -711,7 +645,7 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput)
// compute the multi-line target width/height
machine().ui().draw_text_full(container, pitem.subtext, 0, 0, visible_width * 0.75f,
- JUSTIFY_RIGHT, WRAP_WORD, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &target_width, &target_height);
+ JUSTIFY_RIGHT, WRAP_WORD, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &target_width, &target_height);
// determine the target location
target_x = visible_left + visible_width - target_width - UI_BOX_LR_BORDER;
@@ -723,19 +657,16 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput)
machine().ui().draw_outlined_box(container, target_x - UI_BOX_LR_BORDER,
target_y - UI_BOX_TB_BORDER,
target_x + target_width + UI_BOX_LR_BORDER,
- target_y + target_height + UI_BOX_TB_BORDER,
- subitem_invert ? UI_SELECTED_BG_COLOR : UI_BACKGROUND_COLOR);
+ target_y + target_height + UI_BOX_TB_BORDER, subitem_invert ? UI_SELECTED_BG_COLOR : UI_BACKGROUND_COLOR);
machine().ui().draw_text_full(container, pitem.subtext, target_x, target_y, target_width,
JUSTIFY_RIGHT, WRAP_WORD, DRAW_NORMAL, UI_SELECTED_COLOR, UI_SELECTED_BG_COLOR, nullptr, nullptr);
}
// if there is something special to add, do it by calling the virtual method
- custom_render((selected >= 0 && selected < item.size()) ? item[selected].ref : nullptr, customtop, custombottom, x1, y1, x2, y2);
+ custom_render((selected >= 0 && selected < numitems) ? item[selected].ref : nullptr, customtop, custombottom, x1, y1, x2, y2);
// return the number of visible lines, minus 1 for top arrow and 1 for bottom arrow
- visitems = visible_lines - (top_line != 0) - (top_line + visible_lines != item.size());
-// if (history_flag && (top_line + visible_lines >= item.size()))
-// selected = item.size() - 1;
+ visitems = visible_lines - (top_line != 0) - (top_line + visible_lines != numitems);
}
void ui_menu::custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2)
@@ -760,7 +691,7 @@ void ui_menu::draw_text_box()
// compute the multi-line target width/height
machine().ui().draw_text_full(container, text, 0, 0, 1.0f - 2.0f * UI_BOX_LR_BORDER - 2.0f * gutter_width,
- JUSTIFY_LEFT, WRAP_WORD, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &target_width, &target_height);
+ JUSTIFY_LEFT, WRAP_WORD, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &target_width, &target_height);
target_height += 2.0f * line_height;
if (target_height > 1.0f - 2.0f * UI_BOX_TB_BORDER)
target_height = floorf((1.0f - 2.0f * UI_BOX_TB_BORDER) / line_height) * line_height;
@@ -785,25 +716,25 @@ void ui_menu::draw_text_box()
// add a box around that
machine().ui().draw_outlined_box(container, target_x - UI_BOX_LR_BORDER - gutter_width,
- target_y - UI_BOX_TB_BORDER,
- target_x + target_width + gutter_width + UI_BOX_LR_BORDER,
- target_y + target_height + UI_BOX_TB_BORDER,
- (item[0].flags & MENU_FLAG_REDTEXT) ? UI_RED_COLOR : UI_BACKGROUND_COLOR);
+ target_y - UI_BOX_TB_BORDER,
+ target_x + target_width + gutter_width + UI_BOX_LR_BORDER,
+ target_y + target_height + UI_BOX_TB_BORDER, (item[0].flags & MENU_FLAG_REDTEXT) ? UI_RED_COLOR : UI_BACKGROUND_COLOR);
machine().ui().draw_text_full(container, text, target_x, target_y, target_width,
JUSTIFY_LEFT, WRAP_WORD, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
// draw the "return to prior menu" text with a hilight behind it
- highlight(container,
- target_x + 0.5f * UI_LINE_WIDTH,
- target_y + target_height - line_height,
- target_x + target_width - 0.5f * UI_LINE_WIDTH,
- target_y + target_height,
- UI_SELECTED_BG_COLOR);
+ highlight(
+ container,
+ target_x + 0.5f * UI_LINE_WIDTH,
+ target_y + target_height - line_height,
+ target_x + target_width - 0.5f * UI_LINE_WIDTH,
+ target_y + target_height,
+ UI_SELECTED_BG_COLOR);
machine().ui().draw_text_full(container, backtext, target_x, target_y + target_height - line_height, target_width,
JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL, UI_SELECTED_COLOR, UI_SELECTED_BG_COLOR, nullptr, nullptr);
// artificially set the hover to the last item so a double-click exits
- hover = item.size() - 1;
+ hover = numitems - 1;
}
@@ -812,9 +743,9 @@ void ui_menu::draw_text_box()
// input events for a menu
//-------------------------------------------------
-void ui_menu::handle_events(UINT32 flags)
+void ui_menu::handle_events()
{
- bool stop = false;
+ int stop = FALSE;
ui_event local_menu_event;
// loop while we have interesting events
@@ -824,82 +755,35 @@ void ui_menu::handle_events(UINT32 flags)
{
// if we are hovering over a valid item, select it with a single click
case UI_EVENT_MOUSE_DOWN:
- if ((flags & UI_MENU_PROCESS_ONLYCHAR) == 0)
+ if (hover >= 0 && hover < numitems)
+ selected = hover;
+ else if (hover == -2)
{
- if (hover >= 0 && hover < item.size())
- selected = hover;
- else if (hover == HOVER_ARROW_UP)
- {
- if ((flags & MENU_FLAG_UI_DATS) != 0)
- {
- top_line -= visitems - (top_line + visible_lines == item.size() - 1);
- return;
- }
- selected -= visitems;
- if (selected < 0)
- selected = 0;
- top_line -= visitems - (top_line + visible_lines == item.size() - 1);
- }
- else if (hover == HOVER_ARROW_DOWN)
- {
- if ((flags & MENU_FLAG_UI_DATS) != 0)
- {
- top_line += visible_lines - 2;
- return;
- }
- selected += visible_lines - 2 + (selected == 0);
- if (selected > item.size() - 1)
- selected = item.size() - 1;
- top_line += visible_lines - 2;
- }
+ selected -= visitems - 1;
+ validate_selection(1);
+ }
+ else if (hover == -1)
+ {
+ selected += visitems - 1;
+ validate_selection(1);
}
break;
// if we are hovering over a valid item, fake a UI_SELECT with a double-click
case UI_EVENT_MOUSE_DOUBLE_CLICK:
- if ((flags & UI_MENU_PROCESS_ONLYCHAR) == 0 && hover >= 0 && hover < item.size())
+ if (hover >= 0 && hover < numitems)
{
selected = hover;
- menu_event.iptkey = IPT_UI_SELECT;
- if (selected == item.size() - 1)
+ if (local_menu_event.event_type == UI_EVENT_MOUSE_DOUBLE_CLICK)
{
- menu_event.iptkey = IPT_UI_CANCEL;
- ui_menu::stack_pop(machine());
- }
- stop = true;
- }
- break;
-
- // caught scroll event
- case UI_EVENT_MOUSE_WHEEL:
- if ((flags & UI_MENU_PROCESS_ONLYCHAR) == 0)
- {
- if (local_menu_event.zdelta > 0)
- {
- if ((flags & MENU_FLAG_UI_DATS) != 0)
+ menu_event.iptkey = IPT_UI_SELECT;
+ if (selected == numitems - 1)
{
- top_line -= local_menu_event.num_lines;
- return;
+ menu_event.iptkey = IPT_UI_CANCEL;
+ ui_menu::stack_pop(machine());
}
- selected -= local_menu_event.num_lines;
- validate_selection(-1);
- if (selected < top_line + (top_line != 0))
- top_line -= local_menu_event.num_lines;
- }
- else
- {
- if ((flags & MENU_FLAG_UI_DATS) != 0)
- {
- top_line += local_menu_event.num_lines;
- return;
- }
- selected += local_menu_event.num_lines;
- validate_selection(1);
- if (selected > item.size() - 1)
- selected = item.size() - 1;
- if (selected >= top_line + visitems + (top_line != 0))
- top_line += local_menu_event.num_lines;
}
+ stop = TRUE;
}
break;
@@ -907,7 +791,7 @@ void ui_menu::handle_events(UINT32 flags)
case UI_EVENT_CHAR:
menu_event.iptkey = IPT_SPECIAL;
menu_event.unichar = local_menu_event.ch;
- stop = true;
+ stop = TRUE;
break;
// ignore everything else
@@ -925,17 +809,19 @@ void ui_menu::handle_events(UINT32 flags)
void ui_menu::handle_keys(UINT32 flags)
{
- bool ignorepause = ui_menu::stack_has_special_main_menu();
+ int ignorepause = ui_menu::stack_has_special_main_menu();
+ int ignoreright;
+ int ignoreleft;
int code;
// bail if no items
- if (item.empty())
+ if (numitems == 0)
return;
// if we hit select, return TRUE or pop the stack, depending on the item
if (exclusive_input_pressed(IPT_UI_SELECT, 0))
{
- if (selected == item.size() - 1)
+ if (selected == numitems - 1)
{
menu_event.iptkey = IPT_UI_CANCEL;
ui_menu::stack_pop(machine());
@@ -943,15 +829,10 @@ void ui_menu::handle_keys(UINT32 flags)
return;
}
- // bail out
- if ((flags & UI_MENU_PROCESS_ONLYCHAR) != 0)
- return;
-
// hitting cancel also pops the stack
if (exclusive_input_pressed(IPT_UI_CANCEL, 0))
{
- if (!menu_has_search_active())
- ui_menu::stack_pop(machine());
+ ui_menu::stack_pop(machine());
return;
}
@@ -959,11 +840,8 @@ void ui_menu::handle_keys(UINT32 flags)
validate_selection(1);
// swallow left/right keys if they are not appropriate
- bool ignoreleft = ((item[selected].flags & MENU_FLAG_LEFT_ARROW) == 0);
- bool ignoreright = ((item[selected].flags & MENU_FLAG_RIGHT_ARROW) == 0);
-
- if ((item[0].flags & MENU_FLAG_UI_DATS) != 0)
- ignoreleft = ignoreright = false;
+ ignoreleft = ((item[selected].flags & MENU_FLAG_LEFT_ARROW) == 0);
+ ignoreright = ((item[selected].flags & MENU_FLAG_RIGHT_ARROW) == 0);
// accept left/right keys as-is with repeat
if (!ignoreleft && exclusive_input_pressed(IPT_UI_LEFT, (flags & UI_MENU_PROCESS_LR_REPEAT) ? 6 : 0))
@@ -974,60 +852,42 @@ void ui_menu::handle_keys(UINT32 flags)
// up backs up by one item
if (exclusive_input_pressed(IPT_UI_UP, 6))
{
- if ((item[0].flags & MENU_FLAG_UI_DATS) != 0)
- {
- top_line--;
- return;
- }
- (selected == 0) ? selected = top_line = item.size() - 1 : --selected;
+ selected = (selected + numitems - 1) % numitems;
validate_selection(-1);
- top_line -= (selected == top_line && top_line != 0);
}
// down advances by one item
if (exclusive_input_pressed(IPT_UI_DOWN, 6))
{
- if ((item[0].flags & MENU_FLAG_UI_DATS) != 0)
- {
- top_line++;
- return;
- }
- (selected == item.size() - 1) ? selected = top_line = 0 : ++selected;
- top_line += (selected == top_line + visitems + (top_line != 0));
+ selected = (selected + 1) % numitems;
+ validate_selection(1);
}
// page up backs up by visitems
if (exclusive_input_pressed(IPT_UI_PAGE_UP, 6))
{
- selected -= visitems;
- top_line -= visitems - (top_line + visible_lines == item.size() - 1);
- if (selected < 0)
- selected = 0;
+ selected -= visitems - 1;
validate_selection(1);
}
// page down advances by visitems
if (exclusive_input_pressed(IPT_UI_PAGE_DOWN, 6))
{
- selected += visible_lines - 2 + (selected == 0);
- top_line += visible_lines - 2;
-
- if (selected > item.size() - 1)
- selected = item.size() - 1;
+ selected += visitems - 1;
validate_selection(-1);
}
// home goes to the start
if (exclusive_input_pressed(IPT_UI_HOME, 0))
{
- selected = top_line = 0;
+ selected = 0;
validate_selection(1);
}
// end goes to the last
if (exclusive_input_pressed(IPT_UI_END, 0))
{
- selected = top_line = item.size() - 1;
+ selected = numitems - 1;
validate_selection(-1);
}
@@ -1067,12 +927,12 @@ void ui_menu::validate_selection(int scandir)
// clamp to be in range
if (selected < 0)
selected = 0;
- else if (selected >= item.size())
- selected = item.size() - 1;
+ else if (selected >= numitems)
+ selected = numitems - 1;
// skip past unselectable items
while (!item[selected].is_selectable())
- selected = (selected + item.size() + scandir) % item.size();
+ selected = (selected + numitems + scandir) % numitems;
}
@@ -1088,14 +948,14 @@ void ui_menu::clear_free_list(running_machine &machine)
{
ui_menu *menu = menu_free;
menu_free = menu->parent;
- global_free(menu);
+ auto_free(machine, menu);
}
}
/***************************************************************************
- MENU STACK MANAGEMENT
+ MENU STACK MANAGEMENT
***************************************************************************/
//-------------------------------------------------
@@ -1158,14 +1018,14 @@ bool ui_menu::stack_has_special_main_menu()
void ui_menu::do_handle()
{
- if(item.size() < 2)
+ if(!populated())
populate();
handle();
}
/***************************************************************************
- UI SYSTEM INTERACTION
+ UI SYSTEM INTERACTION
***************************************************************************/
//-------------------------------------------------
@@ -1177,7 +1037,7 @@ UINT32 ui_menu::ui_handler(running_machine &machine, render_container *container
{
// if we have no menus stacked up, start with the main menu
if (menu_stack == nullptr)
- stack_push(global_alloc_clear<ui_menu_main>(machine, container));
+ stack_push(auto_alloc_clear(machine, <ui_menu_main>(machine, container)));
// update the menu state
if (menu_stack != nullptr)
@@ -1194,7 +1054,7 @@ UINT32 ui_menu::ui_handler(running_machine &machine, render_container *container
}
/***************************************************************************
- MENU HELPERS
+ MENU HELPERS
***************************************************************************/
//-------------------------------------------------
@@ -1258,7 +1118,8 @@ void ui_menu::render_triangle(bitmap_argb32 &dest, bitmap_argb32 &source, const
void ui_menu::highlight(render_container *container, float x0, float y0, float x1, float y1, rgb_t bgcolor)
{
- container->add_quad(x0, y0, x1, y1, bgcolor, hilight_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE) | PRIMFLAG_PACKABLE);
+ container->add_quad(x0, y0, x1, y1, bgcolor, hilight_texture,
+ PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE));
}
@@ -1268,1502 +1129,12 @@ void ui_menu::highlight(render_container *container, float x0, float y0, float x
void ui_menu::draw_arrow(render_container *container, float x0, float y0, float x1, float y1, rgb_t fgcolor, UINT32 orientation)
{
- container->add_quad(x0, y0, x1, y1, fgcolor, arrow_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXORIENT(orientation) | PRIMFLAG_PACKABLE);
-}
-
-//-------------------------------------------------
-// init - initialize the ui menu system
-//-------------------------------------------------
-
-void ui_menu::init_ui(running_machine &machine)
-{
- render_manager &mrender = machine.render();
- // create a texture for hilighting items in main menu
- hilight_main_bitmap = std::make_unique<bitmap_rgb32>(1, 26);
- int r1 = 0, g1 = 169, b1 = 255; //Any start color
- int r2 = 0, g2 = 39, b2 = 130; //Any stop color
- for (int y = 0; y < 26; y++)
- {
- int r = r1 + (y * (r2 - r1) / 26);
- int g = g1 + (y * (g2 - g1) / 26);
- int b = b1 + (y * (b2 - b1) / 26);
- hilight_main_bitmap->pix32(y, 0) = rgb_t(0xff, r, g, b);
- }
-
- hilight_main_texture = mrender.texture_alloc();
- hilight_main_texture->set_bitmap(*hilight_main_bitmap, hilight_main_bitmap->cliprect(), TEXFORMAT_ARGB32);
-
- // create a texture for snapshot
- snapx_bitmap = std::make_unique<bitmap_argb32>(0, 0);
- snapx_texture = mrender.texture_alloc(render_texture::hq_scale);
-
- // allocates and sets the default "no available" image
- no_avail_bitmap = std::make_unique<bitmap_argb32>(256, 256);
- UINT32 *dst = &no_avail_bitmap->pix32(0);
- memcpy(dst, no_avail_bmp, 256 * 256 * sizeof(UINT32));
-
- // allocates and sets the favorites star image
- star_bitmap = std::make_unique<bitmap_argb32>(32, 32);
- dst = &star_bitmap->pix32(0);
- memcpy(dst, favorite_star_bmp, 32 * 32 * sizeof(UINT32));
- star_texture = mrender.texture_alloc();
- star_texture->set_bitmap(*star_bitmap, star_bitmap->cliprect(), TEXFORMAT_ARGB32);
-
- // allocate icons
- for (int i = 0; i < MAX_ICONS_RENDER; i++)
- {
- icons_bitmap[i] = auto_alloc(machine, bitmap_argb32);
- icons_texture[i] = mrender.texture_alloc();
- }
-
- // create a texture for main menu background
- bgrnd_bitmap = std::make_unique<bitmap_argb32>(0, 0);
- bgrnd_texture = mrender.texture_alloc(render_texture::hq_scale);
-
- ui_options &mopt = machine.ui().options();
- if (mopt.use_background_image() && &machine.system() == &GAME_NAME(___empty))
- {
- emu_file backgroundfile(".", OPEN_FLAG_READ);
- render_load_jpeg(*bgrnd_bitmap, backgroundfile, nullptr, "background.jpg");
-
- if (!bgrnd_bitmap->valid())
- render_load_png(*bgrnd_bitmap, backgroundfile, nullptr, "background.png");
-
- if (bgrnd_bitmap->valid())
- bgrnd_texture->set_bitmap(*bgrnd_bitmap, bgrnd_bitmap->cliprect(), TEXFORMAT_ARGB32);
- else
- bgrnd_bitmap->reset();
- }
- else
- bgrnd_bitmap->reset();
-
- // create a texture for toolbar
- for (int x = 0; x < UI_TOOLBAR_BUTTONS; ++x)
- {
- toolbar_bitmap[x] = auto_alloc(machine, bitmap_argb32(32, 32));
- sw_toolbar_bitmap[x] = auto_alloc(machine, bitmap_argb32(32, 32));
- toolbar_texture[x] = mrender.texture_alloc();
- sw_toolbar_texture[x] = mrender.texture_alloc();
- UINT32 *dst = &toolbar_bitmap[x]->pix32(0);
- memcpy(dst, toolbar_bitmap_bmp[x], 32 * 32 * sizeof(UINT32));
- if (toolbar_bitmap[x]->valid())
- toolbar_texture[x]->set_bitmap(*toolbar_bitmap[x], toolbar_bitmap[x]->cliprect(), TEXFORMAT_ARGB32);
- else
- toolbar_bitmap[x]->reset();
-
- if (x == 0 || x == 2)
- {
- dst = &sw_toolbar_bitmap[x]->pix32(0);
- memcpy(dst, toolbar_bitmap_bmp[x], 32 * 32 * sizeof(UINT32));
- if (sw_toolbar_bitmap[x]->valid())
- sw_toolbar_texture[x]->set_bitmap(*sw_toolbar_bitmap[x], sw_toolbar_bitmap[x]->cliprect(), TEXFORMAT_ARGB32);
- else
- sw_toolbar_bitmap[x]->reset();
- }
- else
- sw_toolbar_bitmap[x]->reset();
-
- }
-}
-
-
-//-------------------------------------------------
-// draw main menu
-//-------------------------------------------------
-
-void ui_menu::draw_select_game(bool noinput)
-{
- float line_height = machine().ui().get_line_height();
- float ud_arrow_width = line_height * machine().render().ui_aspect();
- float gutter_width = 0.52f * line_height * machine().render().ui_aspect();
- mouse_x = -1, mouse_y = -1;
- float right_panel_size = (ui_globals::panels_status == HIDE_BOTH || ui_globals::panels_status == HIDE_RIGHT_PANEL) ? 2.0f * UI_BOX_LR_BORDER : 0.3f;
- float visible_width = 1.0f - 4.0f * UI_BOX_LR_BORDER;
- float primary_left = (1.0f - visible_width) * 0.5f;
- float primary_width = visible_width;
- bool is_swlist = ((item[0].flags & MENU_FLAG_UI_SWLIST) != 0);
- bool is_favorites = ((item[0].flags & MENU_FLAG_UI_FAVORITE) != 0);
- ui_manager &mui = machine().ui();
-
- // draw background image if available
- if (machine().ui().options().use_background_image() && bgrnd_bitmap->valid())
- container->add_quad(0.0f, 0.0f, 1.0f, 1.0f, ARGB_WHITE, bgrnd_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
-
- hover = item.size() + 1;
- visible_items = (is_swlist) ? item.size() - 2 : item.size() - 2 - skip_main_items;
- float extra_height = (is_swlist) ? 2.0f * line_height : (2.0f + skip_main_items) * line_height;
- float visible_extra_menu_height = customtop + custombottom + extra_height;
-
- // locate mouse
- mouse_hit = false;
- mouse_button = false;
- if (!noinput)
- {
- mouse_target = machine().ui_input().find_mouse(&mouse_target_x, &mouse_target_y, &mouse_button);
- if (mouse_target != nullptr)
- if (mouse_target->map_point_container(mouse_target_x, mouse_target_y, *container, mouse_x, mouse_y))
- mouse_hit = true;
- }
-
- // account for extra space at the top and bottom
- float visible_main_menu_height = 1.0f - 2.0f * UI_BOX_TB_BORDER - visible_extra_menu_height;
- visible_lines = floor(visible_main_menu_height / line_height);
- visible_main_menu_height = (float)(visible_lines * line_height);
-
- if (!is_swlist)
- ui_globals::visible_main_lines = visible_lines;
- else
- ui_globals::visible_sw_lines = visible_lines;
-
- // compute top/left of inner menu area by centering
- float visible_left = primary_left;
- float visible_top = (1.0f - (visible_main_menu_height + visible_extra_menu_height)) * 0.5f;
-
- // if the menu is at the bottom of the extra, adjust
- visible_top += customtop;
-
- // compute left box size
- float x1 = visible_left - UI_BOX_LR_BORDER;
- float y1 = visible_top - UI_BOX_TB_BORDER;
- float x2 = x1 + 2.0f * UI_BOX_LR_BORDER;
- float y2 = visible_top + visible_main_menu_height + UI_BOX_TB_BORDER + extra_height;
-
- // add left box
- visible_left = draw_left_panel(x1, y1, x2, y2);
- visible_width -= right_panel_size + visible_left - 2.0f * UI_BOX_LR_BORDER;
-
- // compute and add main box
- x1 = visible_left - UI_BOX_LR_BORDER;
- x2 = visible_left + visible_width + UI_BOX_LR_BORDER;
- float line = visible_top + (float)(visible_lines * line_height);
-
- //machine().ui().draw_outlined_box(container, x1, y1, x2, y2, rgb_t(0xEF, 0x12, 0x47, 0x7B));
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR);
-
- if (visible_items < visible_lines)
- visible_lines = visible_items;
- if (top_line < 0 || selected == 0)
- top_line = 0;
- if (selected < visible_items && top_line + visible_lines >= visible_items)
- top_line = visible_items - visible_lines;
-
- // determine effective positions taking into account the hilighting arrows
- float effective_width = visible_width - 2.0f * gutter_width;
- float effective_left = visible_left + gutter_width;
-
- int n_loop = (visible_items >= visible_lines) ? visible_lines : visible_items;
-
- for (int linenum = 0; linenum < n_loop; linenum++)
- {
- float line_y = visible_top + (float)linenum * line_height;
- int itemnum = top_line + linenum;
- const ui_menu_item &pitem = item[itemnum];
- const char *itemtext = pitem.text;
- rgb_t fgcolor = UI_TEXT_COLOR;
- rgb_t bgcolor = UI_TEXT_BG_COLOR;
- rgb_t fgcolor3 = UI_CLONE_COLOR;
- float line_x0 = x1 + 0.5f * UI_LINE_WIDTH;
- float line_y0 = line_y;
- float line_x1 = x2 - 0.5f * UI_LINE_WIDTH;
- float line_y1 = line_y + line_height;
-
- // set the hover if this is our item
- if (mouse_hit && line_x0 <= mouse_x && line_x1 > mouse_x && line_y0 <= mouse_y && line_y1 > mouse_y && pitem.is_selectable())
- hover = itemnum;
-
- // if we're selected, draw with a different background
- if (itemnum == selected)
- {
- fgcolor = rgb_t(0xff, 0xff, 0xff, 0x00);
- bgcolor = rgb_t(0xff, 0xff, 0xff, 0xff);
- fgcolor3 = rgb_t(0xff, 0xcc, 0xcc, 0x00);
- }
- // else if the mouse is over this item, draw with a different background
- else if (itemnum == hover)
- {
- fgcolor = fgcolor3 = UI_MOUSEOVER_COLOR;
- bgcolor = UI_MOUSEOVER_BG_COLOR;
- }
-
- // if we have some background hilighting to do, add a quad behind everything else
- if (bgcolor != UI_TEXT_BG_COLOR)
- mui.draw_textured_box(container, line_x0 + 0.01f, line_y0, line_x1 - 0.01f, line_y1, bgcolor, rgb_t(255, 43, 43, 43),
- hilight_main_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE));
-
- // if we're on the top line, display the up arrow
- if (linenum == 0 && top_line != 0)
- {
- draw_arrow(container, 0.5f * (x1 + x2) - 0.5f * ud_arrow_width, line_y + 0.25f * line_height,
- 0.5f * (x1 + x2) + 0.5f * ud_arrow_width, line_y + 0.75f * line_height, fgcolor, ROT0);
-
- if (hover == itemnum)
- hover = HOVER_ARROW_UP;
- }
- // if we're on the bottom line, display the down arrow
- else if (linenum == visible_lines - 1 && itemnum != visible_items - 1)
- {
- draw_arrow(container, 0.5f * (x1 + x2) - 0.5f * ud_arrow_width, line_y + 0.25f * line_height,
- 0.5f * (x1 + x2) + 0.5f * ud_arrow_width, line_y + 0.75f * line_height, fgcolor, ROT0 ^ ORIENTATION_FLIP_Y);
-
- if (hover == itemnum)
- hover = HOVER_ARROW_DOWN;
- }
- // if we're just a divider, draw a line
- else if (strcmp(itemtext, MENU_SEPARATOR_ITEM) == 0)
- container->add_line(visible_left, line_y + 0.5f * line_height, visible_left + visible_width, line_y + 0.5f * line_height,
- UI_LINE_WIDTH, UI_TEXT_COLOR, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
- // draw the item centered
- else if (pitem.subtext == nullptr)
- {
- int item_invert = pitem.flags & MENU_FLAG_INVERT;
- float space = 0.0f;
-
- if (ui_globals::has_icons && !is_swlist)
- {
- if (is_favorites)
- {
- ui_software_info *soft = (ui_software_info *)item[itemnum].ref;
- if (soft->startempty == 1)
- draw_icon(linenum, (void *)soft->driver, effective_left, line_y);
- }
- else
- draw_icon(linenum, item[itemnum].ref, effective_left, line_y);
-
- space = mui.get_line_height() * container->manager().ui_aspect() * 1.5f;
- }
- mui.draw_text_full(container, itemtext, effective_left + space, line_y, effective_width - space, JUSTIFY_LEFT, WRAP_TRUNCATE,
- DRAW_NORMAL, item_invert ? fgcolor3 : fgcolor, bgcolor, nullptr, nullptr);
- }
- else
- {
- int item_invert = pitem.flags & MENU_FLAG_INVERT;
- const char *subitem_text = pitem.subtext;
- float item_width, subitem_width;
-
- // compute right space for subitem
- mui.draw_text_full(container, subitem_text, effective_left, line_y, machine().ui().get_string_width(pitem.subtext),
- JUSTIFY_RIGHT, WRAP_NEVER, DRAW_NONE, item_invert ? fgcolor3 : fgcolor, bgcolor, &subitem_width, nullptr);
- subitem_width += gutter_width;
-
- // draw the item left-justified
- mui.draw_text_full(container, itemtext, effective_left, line_y, effective_width - subitem_width,
- JUSTIFY_LEFT, WRAP_TRUNCATE, DRAW_NORMAL, item_invert ? fgcolor3 : fgcolor, bgcolor, &item_width, nullptr);
-
- // draw the subitem right-justified
- mui.draw_text_full(container, subitem_text, effective_left + item_width, line_y, effective_width - item_width,
- JUSTIFY_RIGHT, WRAP_NEVER, DRAW_NORMAL, item_invert ? fgcolor3 : fgcolor, bgcolor, nullptr, nullptr);
- }
- }
-
- for (size_t count = visible_items; count < item.size(); count++)
- {
- const ui_menu_item &pitem = item[count];
- const char *itemtext = pitem.text;
- float line_x0 = x1 + 0.5f * UI_LINE_WIDTH;
- float line_y0 = line;
- float line_x1 = x2 - 0.5f * UI_LINE_WIDTH;
- float line_y1 = line + line_height;
- rgb_t fgcolor = UI_TEXT_COLOR;
- rgb_t bgcolor = UI_TEXT_BG_COLOR;
-
- if (mouse_hit && line_x0 <= mouse_x && line_x1 > mouse_x && line_y0 <= mouse_y && line_y1 > mouse_y && pitem.is_selectable())
- hover = count;
-
- // if we're selected, draw with a different background
- if (count == selected)
- {
- fgcolor = rgb_t(0xff, 0xff, 0xff, 0x00);
- bgcolor = rgb_t(0xff, 0xff, 0xff, 0xff);
- }
- // else if the mouse is over this item, draw with a different background
- else if (count == hover)
- {
- fgcolor = UI_MOUSEOVER_COLOR;
- bgcolor = UI_MOUSEOVER_BG_COLOR;
- }
-
- // if we have some background hilighting to do, add a quad behind everything else
- if (bgcolor != UI_TEXT_BG_COLOR)
- mui.draw_textured_box(container, line_x0 + 0.01f, line_y0, line_x1 - 0.01f, line_y1, bgcolor, rgb_t(255, 43, 43, 43),
- hilight_main_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE));
-
- if (strcmp(itemtext, MENU_SEPARATOR_ITEM) == 0)
- container->add_line(visible_left, line + 0.5f * line_height, visible_left + visible_width, line + 0.5f * line_height,
- UI_LINE_WIDTH, UI_TEXT_COLOR, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
- else
- mui.draw_text_full(container, itemtext, effective_left, line, effective_width, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr);
- line += line_height;
- }
-
- x1 = x2;
- x2 += right_panel_size;
-
- draw_right_panel((selected >= 0 && selected < item.size()) ? item[selected].ref : nullptr, x1, y1, x2, y2);
-
- x1 = primary_left - UI_BOX_LR_BORDER;
- x2 = primary_left + primary_width + UI_BOX_LR_BORDER;
-
- // if there is something special to add, do it by calling the virtual method
- custom_render((selected >= 0 && selected < item.size()) ? item[selected].ref : nullptr, customtop, custombottom, x1, y1, x2, y2);
-
- // return the number of visible lines, minus 1 for top arrow and 1 for bottom arrow
- visitems = visible_lines - (top_line != 0) - (top_line + visible_lines != visible_items);
-
- // reset redraw icon stage
- if (!is_swlist)
- ui_globals::redraw_icon = false;
-}
-
-//-------------------------------------------------
-// get title and search path for right panel
-//-------------------------------------------------
-
-void ui_menu::get_title_search(std::string &snaptext, std::string &searchstr)
-{
- // get arts title text
- snaptext.assign(arts_info[ui_globals::curimage_view].title);
-
- // get search path
- if (ui_globals::curimage_view == SNAPSHOT_VIEW)
- searchstr = machine().options().value(arts_info[ui_globals::curimage_view].path);
- else
- searchstr = machine().ui().options().value(arts_info[ui_globals::curimage_view].path);
-
- path_iterator path(searchstr.c_str());
- std::string curpath;
-
- // iterate over path and add path for zipped formats
- while (path.next(curpath))
- {
- path_iterator path_iter(arts_info[ui_globals::curimage_view].addpath);
- std::string c_path;
- while (path_iter.next(c_path))
- searchstr.append(";").append(curpath).append(PATH_SEPARATOR).append(c_path);
- }
-}
-
-//-------------------------------------------------
-// handle keys for main menu
-//-------------------------------------------------
-
-void ui_menu::handle_main_keys(UINT32 flags)
-{
- bool ignorepause = ui_menu::stack_has_special_main_menu();
-
- // bail if no items
- if (item.size() == 0)
- return;
-
- // if we hit select, return TRUE or pop the stack, depending on the item
- if (exclusive_input_pressed(IPT_UI_SELECT, 0))
- {
- if (selected == item.size() - 1)
- {
- menu_event.iptkey = IPT_UI_CANCEL;
- ui_menu::stack_pop(machine());
- }
- return;
- }
-
- // hitting cancel also pops the stack
- if (exclusive_input_pressed(IPT_UI_CANCEL, 0))
- {
- if (!menu_has_search_active())
- ui_menu::stack_pop(machine());
- // else if (!ui_error)
- // ui_menu::stack_pop(machine()); TODO
- return;
- }
-
- // validate the current selection
- validate_selection(1);
-
- // swallow left/right keys if they are not appropriate
- bool ignoreleft = ((item[selected].flags & MENU_FLAG_LEFT_ARROW) == 0 || ui_globals::panels_status == HIDE_BOTH || ui_globals::panels_status == HIDE_RIGHT_PANEL);
- bool ignoreright = ((item[selected].flags & MENU_FLAG_RIGHT_ARROW) == 0 || ui_globals::panels_status == HIDE_BOTH || ui_globals::panels_status == HIDE_RIGHT_PANEL);
- bool ignoreup = (ui_globals::panels_status == HIDE_BOTH || ui_globals::panels_status == HIDE_LEFT_PANEL);
- bool ignoredown = (ui_globals::panels_status == HIDE_BOTH || ui_globals::panels_status == HIDE_LEFT_PANEL);
-
- input_manager &minput = machine().input();
- // accept left/right keys as-is with repeat
- if (!ignoreleft && exclusive_input_pressed(IPT_UI_LEFT, (flags & UI_MENU_PROCESS_LR_REPEAT) ? 6 : 0))
- {
- // Swap the right panel
- if (minput.code_pressed(KEYCODE_LCONTROL) || minput.code_pressed(JOYCODE_BUTTON1))
- menu_event.iptkey = IPT_UI_LEFT_PANEL;
- return;
- }
-
- if (!ignoreright && exclusive_input_pressed(IPT_UI_RIGHT, (flags & UI_MENU_PROCESS_LR_REPEAT) ? 6 : 0))
- return;
-
- // up backs up by one item
- if (exclusive_input_pressed(IPT_UI_UP, 6))
- {
- // Filter
- if (!ignoreup && (minput.code_pressed(KEYCODE_LALT) || minput.code_pressed(JOYCODE_BUTTON2)))
- {
- menu_event.iptkey = IPT_UI_UP_FILTER;
- return;
- }
-
- // Infos
- if (!ignoreleft && (minput.code_pressed(KEYCODE_LCONTROL) || minput.code_pressed(JOYCODE_BUTTON1)))
- {
- menu_event.iptkey = IPT_UI_UP_PANEL;
- topline_datsview--;
- return;
- }
-
- if (selected == visible_items + 1 || selected == 0 || ui_error)
- return;
-
- selected--;
-
- if (selected == top_line && top_line != 0)
- top_line--;
- }
-
- // down advances by one item
- if (exclusive_input_pressed(IPT_UI_DOWN, 6))
- {
- // Filter
- if (!ignoredown && (minput.code_pressed(KEYCODE_LALT) || minput.code_pressed(JOYCODE_BUTTON2)))
- {
- menu_event.iptkey = IPT_UI_DOWN_FILTER;
- return;
- }
-
- // Infos
- if (!ignoreright && (minput.code_pressed(KEYCODE_LCONTROL) || minput.code_pressed(JOYCODE_BUTTON1)))
- {
- menu_event.iptkey = IPT_UI_DOWN_PANEL;
- topline_datsview++;
- return;
- }
-
- if (selected == item.size() - 1 || selected == visible_items - 1 || ui_error)
- return;
-
- selected++;
-
- if (selected == top_line + visitems + (top_line != 0))
- top_line++;
- }
-
- // page up backs up by visitems
- if (exclusive_input_pressed(IPT_UI_PAGE_UP, 6))
- {
- // Infos
- if (!ignoreleft && (minput.code_pressed(KEYCODE_LCONTROL) || minput.code_pressed(JOYCODE_BUTTON1)))
- {
- menu_event.iptkey = IPT_UI_DOWN_PANEL;
- topline_datsview -= right_visible_lines - 1;
- return;
- }
-
- if (selected < visible_items && !ui_error)
- {
- selected -= visitems;
-
- if (selected < 0)
- selected = 0;
-
- top_line -= visitems - (top_line + visible_lines == visible_items);
- }
- }
-
- // page down advances by visitems
- if (exclusive_input_pressed(IPT_UI_PAGE_DOWN, 6))
- {
- // Infos
- if (!ignoreleft && (minput.code_pressed(KEYCODE_LCONTROL) || minput.code_pressed(JOYCODE_BUTTON1)))
- {
- menu_event.iptkey = IPT_UI_DOWN_PANEL;
- topline_datsview += right_visible_lines - 1;
- return;
- }
-
- if (selected < visible_items && !ui_error)
- {
- selected += visible_lines - 2 + (selected == 0);
-
- if (selected >= visible_items)
- selected = visible_items - 1;
-
- top_line += visible_lines - 2;
- }
- }
-
- // home goes to the start
- if (exclusive_input_pressed(IPT_UI_HOME, 0))
- {
- // Infos
- if (!ignoreleft && (minput.code_pressed(KEYCODE_LCONTROL) || minput.code_pressed(JOYCODE_BUTTON1)))
- {
- menu_event.iptkey = IPT_UI_DOWN_PANEL;
- topline_datsview = 0;
- return;
- }
-
- if (selected < visible_items && !ui_error)
- {
- selected = 0;
- top_line = 0;
- }
- }
-
- // end goes to the last
- if (exclusive_input_pressed(IPT_UI_END, 0))
- {
- // Infos
- if (!ignoreleft && (minput.code_pressed(KEYCODE_LCONTROL) || minput.code_pressed(JOYCODE_BUTTON1)))
- {
- menu_event.iptkey = IPT_UI_DOWN_PANEL;
- topline_datsview = totallines;
- return;
- }
-
- if (selected < visible_items && !ui_error)
- selected = top_line = visible_items - 1;
- }
-
- // pause enables/disables pause
- if (!ui_error && !ignorepause && exclusive_input_pressed(IPT_UI_PAUSE, 0))
- {
- if (machine().paused())
- machine().resume();
- else
- machine().pause();
- }
-
- // handle a toggle cheats request
- if (!ui_error && machine().ui_input().pressed_repeat(IPT_UI_TOGGLE_CHEAT, 0))
- machine().cheat().set_enable(!machine().cheat().enabled());
-
- // see if any other UI keys are pressed
- if (menu_event.iptkey == IPT_INVALID)
- for (int code = IPT_UI_FIRST + 1; code < IPT_UI_LAST; code++)
- {
- if (ui_error || code == IPT_UI_CONFIGURE || (code == IPT_UI_LEFT && ignoreleft) || (code == IPT_UI_RIGHT && ignoreright) || (code == IPT_UI_PAUSE && ignorepause))
- continue;
-
- if (exclusive_input_pressed(code, 0))
- break;
- }
-}
-
-//-------------------------------------------------
-// handle input events for main menu
-//-------------------------------------------------
-
-void ui_menu::handle_main_events(UINT32 flags)
-{
- bool stop = false;
- ui_event local_menu_event;
-
- // loop while we have interesting events
- while (!stop && machine().ui_input().pop_event(&local_menu_event))
- {
- switch (local_menu_event.event_type)
- {
- // if we are hovering over a valid item, select it with a single click
- case UI_EVENT_MOUSE_DOWN:
- {
- if (ui_error)
- {
- menu_event.iptkey = IPT_OTHER;
- stop = true;
- }
- else
- {
- if (hover >= 0 && hover < item.size())
- selected = hover;
- else if (hover == HOVER_ARROW_UP)
- {
- selected -= visitems;
- if (selected < 0)
- selected = 0;
- top_line -= visitems - (top_line + visible_lines == visible_items);
- }
- else if (hover == HOVER_ARROW_DOWN)
- {
- selected += visible_lines - 2 + (selected == 0);
- if (selected >= visible_items)
- selected = visible_items - 1;
- top_line += visible_lines - 2;
- }
- else if (hover == HOVER_UI_RIGHT)
- menu_event.iptkey = IPT_UI_RIGHT;
- else if (hover == HOVER_UI_LEFT)
- menu_event.iptkey = IPT_UI_LEFT;
- else if (hover == HOVER_DAT_DOWN)
- topline_datsview += right_visible_lines - 1;
- else if (hover == HOVER_DAT_UP)
- topline_datsview -= right_visible_lines - 1;
- else if (hover == HOVER_LPANEL_ARROW)
- {
- if (ui_globals::panels_status == HIDE_LEFT_PANEL)
- ui_globals::panels_status = SHOW_PANELS;
- else if (ui_globals::panels_status == HIDE_BOTH)
- ui_globals::panels_status = HIDE_RIGHT_PANEL;
- else if (ui_globals::panels_status == SHOW_PANELS)
- ui_globals::panels_status = HIDE_LEFT_PANEL;
- else if (ui_globals::panels_status == HIDE_RIGHT_PANEL)
- ui_globals::panels_status = HIDE_BOTH;
- }
- else if (hover == HOVER_RPANEL_ARROW)
- {
- if (ui_globals::panels_status == HIDE_RIGHT_PANEL)
- ui_globals::panels_status = SHOW_PANELS;
- else if (ui_globals::panels_status == HIDE_BOTH)
- ui_globals::panels_status = HIDE_LEFT_PANEL;
- else if (ui_globals::panels_status == SHOW_PANELS)
- ui_globals::panels_status = HIDE_RIGHT_PANEL;
- else if (ui_globals::panels_status == HIDE_LEFT_PANEL)
- ui_globals::panels_status = HIDE_BOTH;
- }
- else if (hover == HOVER_B_FAV)
- {
- menu_event.iptkey = IPT_UI_FAVORITES;
- stop = true;
- }
- else if (hover == HOVER_B_EXPORT)
- {
- menu_event.iptkey = IPT_UI_EXPORT;
- stop = true;
- }
- else if (hover == HOVER_B_DATS)
- {
- menu_event.iptkey = IPT_UI_DATS;
- stop = true;
- }
- else if (hover == HOVER_B_SETTINGS)
- {
- menu_event.iptkey = IPT_UI_SELECT;
- selected = visible_items + 1;
- stop = true;
- }
- else if (hover == HOVER_B_FOLDERS)
- {
- menu_event.iptkey = IPT_UI_SELECT;
- selected = visible_items + 2;
- stop = true;
- }
- else if (hover >= HOVER_RP_FIRST && hover <= HOVER_RP_LAST)
- {
- ui_globals::rpanel = (HOVER_RP_FIRST - hover) * (-1);
- stop = true;
- }
- else if (hover >= HOVER_SW_FILTER_FIRST && hover <= HOVER_SW_FILTER_LAST)
- {
- l_sw_hover = (HOVER_SW_FILTER_FIRST - hover) * (-1);
- menu_event.iptkey = IPT_OTHER;
- stop = true;
- }
- else if (hover >= HOVER_FILTER_FIRST && hover <= HOVER_FILTER_LAST)
- {
- l_hover = (HOVER_FILTER_FIRST - hover) * (-1);
- menu_event.iptkey = IPT_OTHER;
- stop = true;
- }
- }
- break;
- }
-
- // if we are hovering over a valid item, fake a UI_SELECT with a double-click
- case UI_EVENT_MOUSE_DOUBLE_CLICK:
- if (hover >= 0 && hover < item.size())
- {
- selected = hover;
- menu_event.iptkey = IPT_UI_SELECT;
- }
-
- if (selected == item.size() - 1)
- {
- menu_event.iptkey = IPT_UI_CANCEL;
- ui_menu::stack_pop(machine());
- }
- stop = true;
- break;
-
- // caught scroll event
- case UI_EVENT_MOUSE_WHEEL:
- if (local_menu_event.zdelta > 0)
- {
- if (selected >= visible_items || selected == 0 || ui_error)
- break;
- selected -= local_menu_event.num_lines;
- if (selected < top_line + (top_line != 0))
- top_line -= local_menu_event.num_lines;
- }
- else
- {
- if (selected >= visible_items - 1 || ui_error)
- break;
- selected += local_menu_event.num_lines;
- if (selected > visible_items - 1)
- selected = visible_items - 1;
- if (selected >= top_line + visitems + (top_line != 0))
- top_line += local_menu_event.num_lines;
- }
- break;
-
- // translate CHAR events into specials
- case UI_EVENT_CHAR:
- menu_event.iptkey = IPT_SPECIAL;
- menu_event.unichar = local_menu_event.ch;
- stop = true;
- break;
-
- // ignore everything else
- default:
- break;
- }
- }
-}
-
-//-------------------------------------------------
-// draw right box title
-//-------------------------------------------------
-
-float ui_menu::draw_right_box_title(float x1, float y1, float x2, float y2)
-{
- ui_manager &mui = machine().ui();
- float line_height = mui.get_line_height();
- float midl = (x2 - x1) * 0.5f;
-
- // add outlined box for options
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR);
-
- // add separator line
- container->add_line(x1 + midl, y1, x1 + midl, y1 + line_height, UI_LINE_WIDTH, UI_BORDER_COLOR, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
-
- std::string buffer[RP_LAST + 1];
- buffer[RP_IMAGES].assign("Images");
- buffer[RP_INFOS].assign("Infos");
-
- for (int cells = RP_IMAGES; cells <= RP_INFOS; cells++)
- {
- rgb_t bgcolor = UI_TEXT_BG_COLOR;
- rgb_t fgcolor = UI_TEXT_COLOR;
-
- if (mouse_hit && x1 <= mouse_x && x1 + midl > mouse_x && y1 <= mouse_y && y1 + line_height > mouse_y)
- {
- if (ui_globals::rpanel != cells)
- {
- bgcolor = UI_MOUSEOVER_BG_COLOR;
- fgcolor = UI_MOUSEOVER_COLOR;
- hover = HOVER_RP_FIRST + cells;
- }
- }
-
- if (ui_globals::rpanel != cells)
- {
- container->add_line(x1, y1 + line_height, x1 + midl, y1 + line_height, UI_LINE_WIDTH,
- UI_BORDER_COLOR, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
- if (fgcolor != UI_MOUSEOVER_COLOR)
- fgcolor = UI_CLONE_COLOR;
- }
-
- if (bgcolor != UI_TEXT_BG_COLOR)
- container->add_rect(x1 + UI_LINE_WIDTH, y1 + UI_LINE_WIDTH, x1 + midl - UI_LINE_WIDTH, y1 + line_height,
- bgcolor, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE));
-
- mui.draw_text_full(container, buffer[cells].c_str(), x1 + UI_LINE_WIDTH, y1, midl - UI_LINE_WIDTH,
- JUSTIFY_CENTER, WRAP_NEVER, DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr);
- x1 += midl;
- }
-
- return (y1 + line_height + UI_LINE_WIDTH);
-}
-
-//-------------------------------------------------
-// common function for images render
-//-------------------------------------------------
-
-std::string ui_menu::arts_render_common(float origx1, float origy1, float origx2, float origy2)
-{
- std::string snaptext, searchstr;
- get_title_search(snaptext, searchstr);
-
- // apply title to right panel
- float title_size = 0.0f;
- float txt_lenght = 0.0f;
-
- for (int x = FIRST_VIEW; x < LAST_VIEW; x++)
- {
- machine().ui().draw_text_full(container, arts_info[x].title, origx1, origy1, origx2 - origx1, JUSTIFY_CENTER,
- WRAP_TRUNCATE, DRAW_NONE, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, &txt_lenght, nullptr);
- txt_lenght += 0.01f;
- title_size = MAX(txt_lenght, title_size);
- }
-
- machine().ui().draw_text_full(container, snaptext.c_str(), origx1, origy1, origx2 - origx1, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
-
- draw_common_arrow(origx1, origy1, origx2, origy2, ui_globals::curimage_view, FIRST_VIEW, LAST_VIEW, title_size);
-
- return searchstr;
+ container->add_quad(
+ x0,
+ y0,
+ x1,
+ y1,
+ fgcolor,
+ arrow_texture,
+ PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXORIENT(orientation));
}
-
-//-------------------------------------------------
-// draw favorites star
-//-------------------------------------------------
-
-void ui_menu::draw_star(float x0, float y0)
-{
- float y1 = y0 + machine().ui().get_line_height();
- float x1 = x0 + machine().ui().get_line_height() * container->manager().ui_aspect();
- container->add_quad(x0, y0, x1, y1, ARGB_WHITE, star_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_PACKABLE);
-}
-
-//-------------------------------------------------
-// draw toolbar
-//-------------------------------------------------
-
-void ui_menu::draw_toolbar(float x1, float y1, float x2, float y2, bool software)
-{
- ui_manager &mui = machine().ui();
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, rgb_t(0xEF, 0x12, 0x47, 0x7B));
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
- y2 -= UI_BOX_TB_BORDER;
-
- render_texture **t_texture = (software) ? sw_toolbar_texture : toolbar_texture;
- bitmap_argb32 **t_bitmap = (software) ? sw_toolbar_bitmap : toolbar_bitmap;
-
- int m_valid = 0;
- for (int x = 0; x < UI_TOOLBAR_BUTTONS; ++x)
- if (t_bitmap[x]->valid())
- m_valid++;
-
- float x_pixel = 1.0f / container->manager().ui_target().width();
- int h_len = mui.get_line_height() * container->manager().ui_target().height();
- h_len = (h_len % 2 == 0) ? h_len : h_len - 1;
- x1 = (x1 + x2) * 0.5f - x_pixel * (m_valid * ((h_len / 2) + 2));
-
- for (int z = 0; z < UI_TOOLBAR_BUTTONS; ++z)
- {
- if (t_bitmap[z]->valid())
- {
- x2 = x1 + x_pixel * h_len;
- rgb_t color(0xEFEFEFEF);
- if (mouse_hit && x1 <= mouse_x && x2 > mouse_x && y1 <= mouse_y && y2 > mouse_y)
- {
- hover = HOVER_B_FAV + z;
- color = ARGB_WHITE;
- float ypos = y2 + machine().ui().get_line_height() + 2.0f * UI_BOX_TB_BORDER;
- mui.draw_text_box(container, hover_msg[z], JUSTIFY_CENTER, 0.5f, ypos, UI_BACKGROUND_COLOR);
- }
-
- container->add_quad(x1, y1, x2, y2, color, t_texture[z], PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
- x1 += x_pixel * (h_len + 2);
- }
- }
-}
-
-
-//-------------------------------------------------
-// perform rendering of image
-//-------------------------------------------------
-
-void ui_menu::arts_render_images(bitmap_argb32 *tmp_bitmap, float origx1, float origy1, float origx2, float origy2, bool software)
-{
- bool no_available = false;
- float line_height = machine().ui().get_line_height();
-
- // if it fails, use the default image
- if (!tmp_bitmap->valid())
- {
- tmp_bitmap->allocate(256, 256);
- for (int x = 0; x < 256; x++)
- for (int y = 0; y < 256; y++)
- tmp_bitmap->pix32(y, x) = no_avail_bitmap->pix32(y, x);
- no_available = true;
- }
-
- if (tmp_bitmap->valid())
- {
- float panel_width = origx2 - origx1 - 0.02f;
- float panel_height = origy2 - origy1 - 0.02f - (2.0f * UI_BOX_TB_BORDER) - (2.0f * line_height);
- int screen_width = machine().render().ui_target().width();
- int screen_height = machine().render().ui_target().height();
- int panel_width_pixel = panel_width * screen_width;
- int panel_height_pixel = panel_height * screen_height;
- float ratio = 0.0f;
-
- // Calculate resize ratios for resizing
- float ratioW = (float)panel_width_pixel / tmp_bitmap->width();
- float ratioH = (float)panel_height_pixel / tmp_bitmap->height();
- float ratioI = (float)tmp_bitmap->height() / tmp_bitmap->width();
- int dest_xPixel = tmp_bitmap->width();
- int dest_yPixel = tmp_bitmap->height();
-
- // force 4:3 ratio min
- if (machine().ui().options().forced_4x3_snapshot() && ratioI < 0.75f && ui_globals::curimage_view == SNAPSHOT_VIEW)
- {
- // smaller ratio will ensure that the image fits in the view
- dest_yPixel = tmp_bitmap->width() * 0.75f;
- ratioH = (float)panel_height_pixel / dest_yPixel;
- ratio = MIN(ratioW, ratioH);
- dest_xPixel = tmp_bitmap->width() * ratio;
- dest_yPixel *= ratio;
- }
- // resize the bitmap if necessary
- else if (ratioW < 1 || ratioH < 1 || (machine().ui().options().enlarge_snaps() && !no_available))
- {
- // smaller ratio will ensure that the image fits in the view
- ratio = MIN(ratioW, ratioH);
- dest_xPixel = tmp_bitmap->width() * ratio;
- dest_yPixel = tmp_bitmap->height() * ratio;
- }
-
- bitmap_argb32 *dest_bitmap;
-
- // resample if necessary
- if (dest_xPixel != tmp_bitmap->width() || dest_yPixel != tmp_bitmap->height())
- {
- dest_bitmap = auto_alloc(machine(), bitmap_argb32);
- dest_bitmap->allocate(dest_xPixel, dest_yPixel);
- render_color color = { 1.0f, 1.0f, 1.0f, 1.0f };
- render_resample_argb_bitmap_hq(*dest_bitmap, *tmp_bitmap, color, true);
- }
- else
- dest_bitmap = tmp_bitmap;
-
- snapx_bitmap->allocate(panel_width_pixel, panel_height_pixel);
- int x1 = (0.5f * panel_width_pixel) - (0.5f * dest_xPixel);
- int y1 = (0.5f * panel_height_pixel) - (0.5f * dest_yPixel);
-
- for (int x = 0; x < dest_xPixel; x++)
- for (int y = 0; y < dest_yPixel; y++)
- snapx_bitmap->pix32(y + y1, x + x1) = dest_bitmap->pix32(y, x);
-
- auto_free(machine(), dest_bitmap);
-
- // apply bitmap
- snapx_texture->set_bitmap(*snapx_bitmap, snapx_bitmap->cliprect(), TEXFORMAT_ARGB32);
- }
- else
- snapx_bitmap->reset();
-}
-
-//-------------------------------------------------
-// draw common arrows
-//-------------------------------------------------
-
-void ui_menu::draw_common_arrow(float origx1, float origy1, float origx2, float origy2, int current, int dmin, int dmax, float title_size)
-{
- float line_height = machine().ui().get_line_height();
- float lr_arrow_width = 0.4f * line_height * machine().render().ui_aspect();
- float gutter_width = lr_arrow_width * 1.3f;
-
- // set left-right arrows dimension
- float ar_x0 = 0.5f * (origx2 + origx1) + 0.5f * title_size + gutter_width - lr_arrow_width;
- float ar_y0 = origy1 + 0.1f * line_height;
- float ar_x1 = 0.5f * (origx2 + origx1) + 0.5f * title_size + gutter_width;
- float ar_y1 = origy1 + 0.9f * line_height;
-
- float al_x0 = 0.5f * (origx2 + origx1) - 0.5f * title_size - gutter_width;
- float al_y0 = origy1 + 0.1f * line_height;
- float al_x1 = 0.5f * (origx2 + origx1) - 0.5f * title_size - gutter_width + lr_arrow_width;
- float al_y1 = origy1 + 0.9f * line_height;
-
- rgb_t fgcolor_right, fgcolor_left;
- fgcolor_right = fgcolor_left = UI_TEXT_COLOR;
-
- // set hover
- if (mouse_hit && ar_x0 <= mouse_x && ar_x1 > mouse_x && ar_y0 <= mouse_y && ar_y1 > mouse_y && current != dmax)
- {
- machine().ui().draw_textured_box(container, ar_x0 + 0.01f, ar_y0, ar_x1 - 0.01f, ar_y1, UI_MOUSEOVER_BG_COLOR, rgb_t(255, 43, 43, 43),
- hilight_main_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE));
- hover = HOVER_UI_RIGHT;
- fgcolor_right = UI_MOUSEOVER_COLOR;
- }
- else if (mouse_hit && al_x0 <= mouse_x && al_x1 > mouse_x && al_y0 <= mouse_y && al_y1 > mouse_y && current != dmin)
- {
- machine().ui().draw_textured_box(container, al_x0 + 0.01f, al_y0, al_x1 - 0.01f, al_y1, UI_MOUSEOVER_BG_COLOR, rgb_t(255, 43, 43, 43),
- hilight_main_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE));
- hover = HOVER_UI_LEFT;
- fgcolor_left = UI_MOUSEOVER_COLOR;
- }
-
- // apply arrow
- if (current == dmin)
- container->add_quad(ar_x0, ar_y0, ar_x1, ar_y1, fgcolor_right, arrow_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXORIENT(ROT90) | PRIMFLAG_PACKABLE);
- else if (current == dmax)
- container->add_quad(al_x0, al_y0, al_x1, al_y1, fgcolor_left, arrow_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXORIENT(ROT90 ^ ORIENTATION_FLIP_X) | PRIMFLAG_PACKABLE);
- else
- {
- container->add_quad(ar_x0, ar_y0, ar_x1, ar_y1, fgcolor_right, arrow_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXORIENT(ROT90) | PRIMFLAG_PACKABLE);
- container->add_quad(al_x0, al_y0, al_x1, al_y1, fgcolor_left, arrow_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXORIENT(ROT90 ^ ORIENTATION_FLIP_X) | PRIMFLAG_PACKABLE);
- }
-}
-
-//-------------------------------------------------
-// draw icons
-//-------------------------------------------------
-
-void ui_menu::draw_icon(int linenum, void *selectedref, float x0, float y0)
-{
- static const game_driver *olddriver[MAX_ICONS_RENDER] = { nullptr };
- float x1 = x0 + machine().ui().get_line_height() * container->manager().ui_aspect(container);
- float y1 = y0 + machine().ui().get_line_height();
- const game_driver *driver = (const game_driver *)selectedref;
-
- if (olddriver[linenum] != driver || ui_globals::redraw_icon)
- {
- olddriver[linenum] = driver;
-
- // set clone status
- bool cloneof = strcmp(driver->parent, "0");
- if (cloneof)
- {
- int cx = driver_list::find(driver->parent);
- if (cx != -1 && ((driver_list::driver(cx).flags & MACHINE_IS_BIOS_ROOT) != 0))
- cloneof = false;
- }
-
- // get search path
- path_iterator path(machine().ui().options().icons_directory());
- std::string curpath;
- std::string searchstr(machine().ui().options().icons_directory());
-
- // iterate over path and add path for zipped formats
- while (path.next(curpath))
- searchstr.append(";").append(curpath.c_str()).append(PATH_SEPARATOR).append("icons");
-
- bitmap_argb32 *tmp = auto_alloc(machine(), bitmap_argb32);
- emu_file snapfile(searchstr.c_str(), OPEN_FLAG_READ);
- std::string fullname = std::string(driver->name).append(".ico");
- render_load_ico(*tmp, snapfile, nullptr, fullname.c_str());
-
- if (!tmp->valid() && cloneof)
- {
- fullname.assign(driver->parent).append(".ico");
- render_load_ico(*tmp, snapfile, nullptr, fullname.c_str());
- }
-
- if (tmp->valid())
- {
- float panel_width = x1 - x0;
- float panel_height = y1 - y0;
- int screen_width = machine().render().ui_target().width();
- int screen_height = machine().render().ui_target().height();
- int panel_width_pixel = panel_width * screen_width;
- int panel_height_pixel = panel_height * screen_height;
-
- // Calculate resize ratios for resizing
- float ratioW = (float)panel_width_pixel / tmp->width();
- float ratioH = (float)panel_height_pixel / tmp->height();
- int dest_xPixel = tmp->width();
- int dest_yPixel = tmp->height();
-
- if (ratioW < 1 || ratioH < 1)
- {
- // smaller ratio will ensure that the image fits in the view
- float ratio = MIN(ratioW, ratioH);
- dest_xPixel = tmp->width() * ratio;
- dest_yPixel = tmp->height() * ratio;
- }
-
- bitmap_argb32 *dest_bitmap;
- dest_bitmap = auto_alloc(machine(), bitmap_argb32);
-
- // resample if necessary
- if (dest_xPixel != tmp->width() || dest_yPixel != tmp->height())
- {
- dest_bitmap->allocate(dest_xPixel, dest_yPixel);
- render_color color = { 1.0f, 1.0f, 1.0f, 1.0f };
- render_resample_argb_bitmap_hq(*dest_bitmap, *tmp, color, true);
- }
- else
- dest_bitmap = tmp;
-
- icons_bitmap[linenum]->reset();
- icons_bitmap[linenum]->allocate(panel_width_pixel, panel_height_pixel);
-
- for (int x = 0; x < dest_xPixel; x++)
- for (int y = 0; y < dest_yPixel; y++)
- icons_bitmap[linenum]->pix32(y, x) = dest_bitmap->pix32(y, x);
-
- auto_free(machine(), dest_bitmap);
-
- icons_texture[linenum]->set_bitmap(*icons_bitmap[linenum], icons_bitmap[linenum]->cliprect(), TEXFORMAT_ARGB32);
- }
- else {
- if (icons_bitmap[linenum] != nullptr)
- {
- icons_bitmap[linenum]->reset();
- }
- }
- auto_free(machine(), tmp);
- }
-
- if (icons_bitmap[linenum] != nullptr && icons_bitmap[linenum]->valid())
- container->add_quad(x0, y0, x1, y1, ARGB_WHITE, icons_texture[linenum], PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_PACKABLE);
-}
-
-//-------------------------------------------------
-// draw info arrow
-//-------------------------------------------------
-
-void ui_menu::info_arrow(int ub, float origx1, float origx2, float oy1, float line_height, float text_size, float ud_arrow_width)
-{
- rgb_t fgcolor = UI_TEXT_COLOR;
- UINT32 orientation = (!ub) ? ROT0 : ROT0 ^ ORIENTATION_FLIP_Y;
-
- if (mouse_hit && origx1 <= mouse_x && origx2 > mouse_x && oy1 <= mouse_y && oy1 + (line_height * text_size) > mouse_y)
- {
- machine().ui().draw_textured_box(container, origx1 + 0.01f, oy1, origx2 - 0.01f, oy1 + (line_height * text_size), UI_MOUSEOVER_BG_COLOR,
- rgb_t(255, 43, 43, 43), hilight_main_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE));
- hover = (!ub) ? HOVER_DAT_UP : HOVER_DAT_DOWN;
- fgcolor = UI_MOUSEOVER_COLOR;
- }
-
- draw_arrow(container, 0.5f * (origx1 + origx2) - 0.5f * (ud_arrow_width * text_size), oy1 + 0.25f * (line_height * text_size),
- 0.5f * (origx1 + origx2) + 0.5f * (ud_arrow_width * text_size), oy1 + 0.75f * (line_height * text_size), fgcolor, orientation);
-}
-
-//-------------------------------------------------
-// draw - draw palette menu
-//-------------------------------------------------
-
-void ui_menu::draw_palette_menu()
-{
- ui_manager &mui = machine().ui();
- float line_height = mui.get_line_height();
- float lr_arrow_width = 0.4f * line_height * machine().render().ui_aspect();
- float ud_arrow_width = line_height * machine().render().ui_aspect();
- float gutter_width = lr_arrow_width * 1.3f;
- int itemnum, linenum;
-
- if (machine().ui().options().use_background_image() && machine().options().system() == nullptr && bgrnd_bitmap->valid())
- container->add_quad(0.0f, 0.0f, 1.0f, 1.0f, ARGB_WHITE, bgrnd_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
-
- // compute the width and height of the full menu
- float visible_width = 0;
- float visible_main_menu_height = 0;
- for (itemnum = 0; itemnum < item.size(); itemnum++)
- {
- const ui_menu_item &pitem = item[itemnum];
-
- // compute width of left hand side
- float total_width = gutter_width + mui.get_string_width(pitem.text) + gutter_width;
-
- // add in width of right hand side
- if (pitem.subtext)
- total_width += 2.0f * gutter_width + mui.get_string_width(pitem.subtext);
-
- // track the maximum
- if (total_width > visible_width)
- visible_width = total_width;
-
- // track the height as well
- visible_main_menu_height += line_height;
- }
-
- // account for extra space at the top and bottom
- float visible_extra_menu_height = customtop + custombottom;
-
- // add a little bit of slop for rounding
- visible_width += 0.01f;
- visible_main_menu_height += 0.01f;
-
- // if we are too wide or too tall, clamp it down
- if (visible_width + 2.0f * UI_BOX_LR_BORDER > 1.0f)
- visible_width = 1.0f - 2.0f * UI_BOX_LR_BORDER;
-
- // if the menu and extra menu won't fit, take away part of the regular menu, it will scroll
- if (visible_main_menu_height + visible_extra_menu_height + 2.0f * UI_BOX_TB_BORDER > 1.0f)
- visible_main_menu_height = 1.0f - 2.0f * UI_BOX_TB_BORDER - visible_extra_menu_height;
-
- int visible_lines = floor(visible_main_menu_height / line_height);
- visible_main_menu_height = (float)visible_lines * line_height;
-
- // compute top/left of inner menu area by centering
- float visible_left = (1.0f - visible_width) * 0.5f;
- float visible_top = (1.0f - (visible_main_menu_height + visible_extra_menu_height)) * 0.5f;
-
- // if the menu is at the bottom of the extra, adjust
- visible_top += customtop;
-
- // first add us a box
- float x1 = visible_left - UI_BOX_LR_BORDER;
- float y1 = visible_top - UI_BOX_TB_BORDER;
- float x2 = visible_left + visible_width + UI_BOX_LR_BORDER;
- float y2 = visible_top + visible_main_menu_height + UI_BOX_TB_BORDER;
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR);
-
- // determine the first visible line based on the current selection
- int top_line = selected - visible_lines / 2;
- if (top_line < 0)
- top_line = 0;
- if (top_line + visible_lines >= item.size())
- top_line = item.size() - visible_lines;
-
- // determine effective positions taking into account the hilighting arrows
- float effective_width = visible_width - 2.0f * gutter_width;
- float effective_left = visible_left + gutter_width;
-
- // locate mouse
- mouse_hit = false;
- mouse_button = false;
- mouse_target = machine().ui_input().find_mouse(&mouse_target_x, &mouse_target_y, &mouse_button);
- if (mouse_target != nullptr)
- if (mouse_target->map_point_container(mouse_target_x, mouse_target_y, *container, mouse_x, mouse_y))
- mouse_hit = true;
-
- // loop over visible lines
- hover = item.size() + 1;
- float line_x0 = x1 + 0.5f * UI_LINE_WIDTH;
- float line_x1 = x2 - 0.5f * UI_LINE_WIDTH;
-
- for (linenum = 0; linenum < visible_lines; linenum++)
- {
- float line_y = visible_top + (float)linenum * line_height;
- itemnum = top_line + linenum;
- const ui_menu_item &pitem = item[itemnum];
- const char *itemtext = pitem.text;
- rgb_t fgcolor = UI_TEXT_COLOR;
- rgb_t bgcolor = UI_TEXT_BG_COLOR;
- float line_y0 = line_y;
- float line_y1 = line_y + line_height;
-
- // set the hover if this is our item
- if (mouse_hit && line_x0 <= mouse_x && line_x1 > mouse_x && line_y0 <= mouse_y && line_y1 > mouse_y && pitem.is_selectable())
- hover = itemnum;
-
- // if we're selected, draw with a different background
- if (itemnum == selected)
- {
- fgcolor = UI_SELECTED_COLOR;
- bgcolor = UI_SELECTED_BG_COLOR;
- }
-
- // else if the mouse is over this item, draw with a different background
- else if (itemnum == hover)
- {
- fgcolor = UI_MOUSEOVER_COLOR;
- bgcolor = UI_MOUSEOVER_BG_COLOR;
- }
-
- // if we have some background hilighting to do, add a quad behind everything else
- if (bgcolor != UI_TEXT_BG_COLOR)
- highlight(container, line_x0, line_y0, line_x1, line_y1, bgcolor);
-
- // if we're on the top line, display the up arrow
- if (linenum == 0 && top_line != 0)
- {
- draw_arrow(container,
- 0.5f * (x1 + x2) - 0.5f * ud_arrow_width,
- line_y + 0.25f * line_height,
- 0.5f * (x1 + x2) + 0.5f * ud_arrow_width,
- line_y + 0.75f * line_height,
- fgcolor,
- ROT0);
- if (hover == itemnum)
- hover = HOVER_ARROW_UP;
- }
-
- // if we're on the bottom line, display the down arrow
- else if (linenum == visible_lines - 1 && itemnum != item.size() - 1)
- {
- draw_arrow(container,
- 0.5f * (x1 + x2) - 0.5f * ud_arrow_width,
- line_y + 0.25f * line_height,
- 0.5f * (x1 + x2) + 0.5f * ud_arrow_width,
- line_y + 0.75f * line_height,
- fgcolor,
- ROT0 ^ ORIENTATION_FLIP_Y);
- if (hover == itemnum)
- hover = HOVER_ARROW_DOWN;
- }
-
- // if we're just a divider, draw a line
- else if (strcmp(itemtext, MENU_SEPARATOR_ITEM) == 0)
- container->add_line(visible_left, line_y + 0.5f * line_height, visible_left + visible_width, line_y + 0.5f * line_height, UI_LINE_WIDTH, UI_BORDER_COLOR, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
-
- // if we don't have a subitem, just draw the string centered
- else if (pitem.subtext == nullptr)
- mui.draw_text_full(container, itemtext, effective_left, line_y, effective_width,
- JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr);
-
- // otherwise, draw the item on the left and the subitem text on the right
- else
- {
- const char *subitem_text = pitem.subtext;
- rgb_t color = rgb_t((UINT32)strtoul(subitem_text, nullptr, 16));
-
- // draw the left-side text
- mui.draw_text_full(container, itemtext, effective_left, line_y, effective_width,
- JUSTIFY_LEFT, WRAP_TRUNCATE, DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr);
-
- // give 2 spaces worth of padding
- float subitem_width = mui.get_string_width("FF00FF00");
-
- mui.draw_outlined_box(container, effective_left + effective_width - subitem_width, line_y0,
- effective_left + effective_width, line_y1, color);
- }
- }
-
- // if there is something special to add, do it by calling the virtual method
- custom_render((selected >= 0 && selected < item.size()) ? item[selected].ref : nullptr, customtop, custombottom, x1, y1, x2, y2);
-
- // return the number of visible lines, minus 1 for top arrow and 1 for bottom arrow
- visitems = visible_lines - (top_line != 0) - (top_line + visible_lines != item.size());
-}
-
-//-------------------------------------------------
-// draw - draw dats menu
-//-------------------------------------------------
-
-void ui_menu::draw_dats_menu()
-{
- float line_height = machine().ui().get_line_height();
- float ud_arrow_width = line_height * machine().render().ui_aspect();
- float gutter_width = 0.52f * line_height * machine().render().ui_aspect();
- mouse_x = -1, mouse_y = -1;
- float visible_width = 1.0f - 2.0f * UI_BOX_LR_BORDER;
- float visible_left = (1.0f - visible_width) * 0.5f;
- ui_manager &mui = machine().ui();
-
- // draw background image if available
- if (machine().ui().options().use_background_image() && bgrnd_bitmap->valid())
- container->add_quad(0.0f, 0.0f, 1.0f, 1.0f, ARGB_WHITE, bgrnd_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
-
- hover = item.size() + 1;
- visible_items = item.size() - 2;
- float extra_height = 2.0f * line_height;
- float visible_extra_menu_height = customtop + custombottom + extra_height;
-
- // locate mouse
- mouse_hit = false;
- mouse_button = false;
- mouse_target = machine().ui_input().find_mouse(&mouse_target_x, &mouse_target_y, &mouse_button);
- if (mouse_target != nullptr)
- if (mouse_target->map_point_container(mouse_target_x, mouse_target_y, *container, mouse_x, mouse_y))
- mouse_hit = true;
-
- // account for extra space at the top and bottom
- float visible_main_menu_height = 1.0f - 2.0f * UI_BOX_TB_BORDER - visible_extra_menu_height;
- visible_lines = floor(visible_main_menu_height / line_height);
- visible_main_menu_height = (float)(visible_lines * line_height);
-
- // compute top/left of inner menu area by centering
- float visible_top = (1.0f - (visible_main_menu_height + visible_extra_menu_height)) * 0.5f;
-
- // if the menu is at the bottom of the extra, adjust
- visible_top += customtop;
-
- // compute left box size
- float x1 = visible_left;
- float y1 = visible_top - UI_BOX_TB_BORDER;
- float x2 = x1 + visible_width;
- float y2 = visible_top + visible_main_menu_height + UI_BOX_TB_BORDER + extra_height;
- float line = visible_top + (float)(visible_lines * line_height);
-
- //machine().ui().draw_outlined_box(container, x1, y1, x2, y2, rgb_t(0xEF, 0x12, 0x47, 0x7B));
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR);
-
- if (visible_items < visible_lines)
- visible_lines = visible_items;
- if (top_line < 0)
- top_line = 0;
- if (top_line + visible_lines >= visible_items)
- top_line = visible_items - visible_lines;
-
- // determine effective positions taking into account the hilighting arrows
- float effective_width = visible_width - 2.0f * gutter_width;
- float effective_left = visible_left + gutter_width;
-
- int n_loop = (visible_items >= visible_lines) ? visible_lines : visible_items;
-
- for (int linenum = 0; linenum < n_loop; linenum++)
- {
- float line_y = visible_top + (float)linenum * line_height;
- int itemnum = top_line + linenum;
- const ui_menu_item &pitem = item[itemnum];
- const char *itemtext = pitem.text;
- rgb_t fgcolor = UI_TEXT_COLOR;
- rgb_t bgcolor = UI_TEXT_BG_COLOR;
- float line_x0 = x1 + 0.5f * UI_LINE_WIDTH;
- float line_y0 = line_y;
- float line_x1 = x2 - 0.5f * UI_LINE_WIDTH;
- float line_y1 = line_y + line_height;
-
- // if we're on the top line, display the up arrow
- if (linenum == 0 && top_line != 0)
- {
- draw_arrow(container, 0.5f * (x1 + x2) - 0.5f * ud_arrow_width, line_y + 0.25f * line_height,
- 0.5f * (x1 + x2) + 0.5f * ud_arrow_width, line_y + 0.75f * line_height, fgcolor, ROT0);
-
- if (mouse_hit && line_x0 <= mouse_x && line_x1 > mouse_x && line_y0 <= mouse_y && line_y1 > mouse_y)
- {
- fgcolor = UI_MOUSEOVER_COLOR;
- bgcolor = UI_MOUSEOVER_BG_COLOR;
- highlight(container, line_x0, line_y0, line_x1, line_y1, bgcolor);
- hover = HOVER_ARROW_UP;
- }
- }
- // if we're on the bottom line, display the down arrow
- else if (linenum == visible_lines - 1 && itemnum != visible_items - 1)
- {
- draw_arrow(container, 0.5f * (x1 + x2) - 0.5f * ud_arrow_width, line_y + 0.25f * line_height,
- 0.5f * (x1 + x2) + 0.5f * ud_arrow_width, line_y + 0.75f * line_height, fgcolor, ROT0 ^ ORIENTATION_FLIP_Y);
-
- if (mouse_hit && line_x0 <= mouse_x && line_x1 > mouse_x && line_y0 <= mouse_y && line_y1 > mouse_y)
- {
- fgcolor = UI_MOUSEOVER_COLOR;
- bgcolor = UI_MOUSEOVER_BG_COLOR;
- highlight(container, line_x0, line_y0, line_x1, line_y1, bgcolor);
- hover = HOVER_ARROW_DOWN;
- }
- }
-
- // draw dats text
- else if (pitem.subtext == nullptr)
- {
- mui.draw_text_full(container, itemtext, effective_left, line_y, effective_width, JUSTIFY_LEFT, WRAP_NEVER,
- DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr);
- }
- }
-
- for (size_t count = visible_items; count < item.size(); count++)
- {
- const ui_menu_item &pitem = item[count];
- const char *itemtext = pitem.text;
- float line_x0 = x1 + 0.5f * UI_LINE_WIDTH;
- float line_y0 = line;
- float line_x1 = x2 - 0.5f * UI_LINE_WIDTH;
- float line_y1 = line + line_height;
- rgb_t fgcolor = UI_SELECTED_COLOR;
- rgb_t bgcolor = UI_SELECTED_BG_COLOR;
-
- if (mouse_hit && line_x0 <= mouse_x && line_x1 > mouse_x && line_y0 <= mouse_y && line_y1 > mouse_y && pitem.is_selectable())
- hover = count;
-
- if (strcmp(itemtext, MENU_SEPARATOR_ITEM) == 0)
- container->add_line(visible_left, line + 0.5f * line_height, visible_left + visible_width, line + 0.5f * line_height,
- UI_LINE_WIDTH, UI_TEXT_COLOR, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
- else
- {
- highlight(container, line_x0, line_y0, line_x1, line_y1, bgcolor);
- mui.draw_text_full(container, itemtext, effective_left, line, effective_width, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr);
- }
- line += line_height;
- }
-
- // if there is something special to add, do it by calling the virtual method
- custom_render((selected >= 0 && selected < item.size()) ? item[selected].ref : nullptr, customtop, custombottom, x1, y1, x2, y2);
-
- // return the number of visible lines, minus 1 for top arrow and 1 for bottom arrow
- visitems = visible_lines - (top_line != 0) - (top_line + visible_lines != visible_items);
-} \ No newline at end of file
diff --git a/src/emu/ui/menu.h b/src/emu/ui/menu.h
index d5f5e8a33e6..b52b0f90ff4 100644
--- a/src/emu/ui/menu.h
+++ b/src/emu/ui/menu.h
@@ -2,9 +2,9 @@
// copyright-holders:Nicola Salmoria, Aaron Giles, Nathan Woods
/***************************************************************************
- ui/menu.h
+ ui/menu.h
- Internal MAME menus for the user interface.
+ Internal MAME menus for the user interface.
***************************************************************************/
@@ -17,7 +17,7 @@
/***************************************************************************
- CONSTANTS
+ CONSTANTS
***************************************************************************/
// flags for menu items
@@ -27,11 +27,6 @@
#define MENU_FLAG_MULTILINE (1 << 3)
#define MENU_FLAG_REDTEXT (1 << 4)
#define MENU_FLAG_DISABLE (1 << 5)
-#define MENU_FLAG_UI (1 << 6)
-#define MENU_FLAG_UI_DATS (1 << 7)
-#define MENU_FLAG_UI_SWLIST (1 << 8)
-#define MENU_FLAG_UI_FAVORITE (1 << 9)
-#define MENU_FLAG_UI_PALETTE (1 << 10)
// special menu item for separators
#define MENU_SEPARATOR_ITEM "---"
@@ -40,9 +35,6 @@
#define UI_MENU_PROCESS_NOKEYS 1
#define UI_MENU_PROCESS_LR_REPEAT 2
#define UI_MENU_PROCESS_CUSTOM_ONLY 4
-#define UI_MENU_PROCESS_ONLYCHAR 8
-#define UI_MENU_PROCESS_NOINPUT 16
-#define UI_MENU_PROCESS_NOIMAGE 32
// options for ui_menu_reset
enum ui_menu_reset_options
@@ -55,32 +47,32 @@ enum ui_menu_reset_options
/***************************************************************************
- TYPE DEFINITIONS
+ TYPE DEFINITIONS
***************************************************************************/
// menu-related events
struct ui_menu_event
{
- void *itemref; // reference for the selected item
- int iptkey; // one of the IPT_* values from inptport.h
- unicode_char unichar; // unicode character if iptkey == IPT_SPECIAL
+ void * itemref; // reference for the selected item
+ int iptkey; // one of the IPT_* values from inptport.h
+ unicode_char unichar; // unicode character if iptkey == IPT_SPECIAL
};
struct ui_menu_pool
{
- ui_menu_pool *next; // chain to next one
- UINT8 *top; // top of the pool
- UINT8 *end; // end of the pool
+ ui_menu_pool * next; // chain to next one
+ UINT8 * top; // top of the pool
+ UINT8 * end; // end of the pool
};
class ui_menu_item
{
public:
- const char *text;
- const char *subtext;
- UINT32 flags;
- void *ref;
+ const char * text;
+ const char * subtext;
+ UINT32 flags;
+ void * ref;
inline bool is_selectable() const;
};
@@ -93,22 +85,27 @@ public:
running_machine &machine() const { return m_machine; }
- render_container *container; // render_container we render to
- ui_menu_event menu_event; // the UI menu_event that occurred
- ui_menu *parent; // pointer to parent menu
- int resetpos; // reset position
- void *resetref; // reset reference
- int selected; // which item is selected
- int hover; // which item is being hovered over
- int visitems; // number of visible items
- float customtop; // amount of extra height to add at the top
- float custombottom; // amount of extra height to add at the bottom
- ui_menu_pool *pool; // list of memory pools
- std::vector<ui_menu_item> item; // array of items
+ render_container * container; // render_container we render to
+ ui_menu_event menu_event; // the UI menu_event that occurred
+ ui_menu * parent; // pointer to parent menu
+ int resetpos; // reset position
+ void * resetref; // reset reference
+ int selected; // which item is selected
+ int hover; // which item is being hovered over
+ int visitems; // number of visible items
+ int numitems; // number of items in the menu
+ int allocitems; // allocated size of array
+ ui_menu_item * item; // pointer to array of items
+ float customtop; // amount of extra height to add at the top
+ float custombottom; // amount of extra height to add at the bottom
+ ui_menu_pool * pool; // list of memory pools
// free all items in the menu, and all memory allocated from the memory pool
void reset(ui_menu_reset_options options);
+ // returns true if the menu has any non-default items in it
+ bool populated();
+
// append a new item to the end of the menu
void item_append(const char *text, const char *subtext, UINT32 flags, void *ref);
@@ -171,117 +168,22 @@ public:
// To be reimplemented in the menu subclass
virtual void handle() = 0;
- // test if search is active
- virtual bool menu_has_search_active() { return false; }
-
private:
static ui_menu *menu_free;
static std::unique_ptr<bitmap_rgb32> hilight_bitmap;
static render_texture *hilight_texture, *arrow_texture;
bool m_special_main_menu;
- running_machine &m_machine; // machine we are attached to
+ running_machine & m_machine; // machine we are attached to
- void draw(bool customonly, bool noimage, bool noinput);
+ void draw(bool customonly);
void draw_text_box();
- void handle_events(UINT32 flags);
+ void handle_events();
void handle_keys(UINT32 flags);
inline bool exclusive_input_pressed(int key, int repeat);
static void clear_free_list(running_machine &machine);
static void render_triangle(bitmap_argb32 &dest, bitmap_argb32 &source, const rectangle &sbounds, void *param);
-
-public:
- int visible_items;
- bool ui_error;
-
- // mouse handling
- bool mouse_hit, mouse_button;
- render_target *mouse_target;
- INT32 mouse_target_x, mouse_target_y;
- float mouse_x, mouse_y;
-
- // draw toolbar
- void draw_toolbar(float x1, float y1, float x2, float y2, bool software = false);
-
- // draw left panel
- virtual float draw_left_panel(float x1, float y1, float x2, float y2) { return 0; }
-
- // draw right panel
- virtual void draw_right_panel(void *selectedref, float origx1, float origy1, float origx2, float origy2) { };
-
- // draw star
- void draw_star(float x0, float y0);
-
- // Global initialization
- static void init_ui(running_machine &machine);
-
- // get arrows status
- template <typename _T1, typename _T2, typename _T3>
- UINT32 get_arrow_flags(_T1 min, _T2 max, _T3 actual)
- {
- if (max == 0)
- return 0;
- else
- return ((actual <= min) ? MENU_FLAG_RIGHT_ARROW : (actual >= max ? MENU_FLAG_LEFT_ARROW : (MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW)));
- }
-
-protected:
- int topline_datsview; // right box top line
- int top_line; // main box top line
- int l_sw_hover;
- int l_hover;
- int totallines;
- int skip_main_items;
-
- // draw right box
- float draw_right_box_title(float x1, float y1, float x2, float y2);
-
- // draw arrow
- void draw_common_arrow(float origx1, float origy1, float origx2, float origy2, int current, int dmin, int dmax, float title);
- void info_arrow(int ub, float origx1, float origx2, float oy1, float line_height, float text_size, float ud_arrow_width);
-
- // images render
- std::string arts_render_common(float origx1, float origy1, float origx2, float origy2);
- void arts_render_images(bitmap_argb32 *bitmap, float origx1, float origy1, float origx2, float origy2, bool software);
-
- int visible_lines; // main box visible lines
- int right_visible_lines; // right box lines
-
- static std::unique_ptr<bitmap_argb32> snapx_bitmap;
- static render_texture *snapx_texture;
-
- static std::unique_ptr<bitmap_rgb32> hilight_main_bitmap;
- static render_texture *hilight_main_texture;
-private:
- 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[];
-
- // toolbar
- static bitmap_argb32 *toolbar_bitmap[], *sw_toolbar_bitmap[];
- static render_texture *toolbar_texture[], *sw_toolbar_texture[];
-
- // draw game list
- void draw_select_game(bool noinput);
-
- // draw palette menu
- void draw_palette_menu();
-
- // draw dats menu
- void draw_dats_menu();
-
- void get_title_search(std::string &title, std::string &search);
-
- // handle keys
- void handle_main_keys(UINT32 flags);
-
- // handle mouse
- void handle_main_events(UINT32 flags);
-
- void draw_icon(int linenum, void *selectedref, float x1, float y1);
};
#endif // __UI_MENU_H__
diff --git a/src/emu/ui/miscmenu.cpp b/src/emu/ui/miscmenu.cpp
index 0b41eed95bb..1eaa9fe1366 100644
--- a/src/emu/ui/miscmenu.cpp
+++ b/src/emu/ui/miscmenu.cpp
@@ -1,5 +1,5 @@
// license:BSD-3-Clause
-// copyright-holders:Nicola Salmoria, Aaron Giles, Nathan Woods,Dankan1890
+// copyright-holders:Nicola Salmoria, Aaron Giles, Nathan Woods
/*********************************************************************
miscmenu.c
@@ -15,7 +15,7 @@
#include "ui/ui.h"
#include "ui/menu.h"
#include "ui/miscmenu.h"
-#include "ui/utils.h"
+
/***************************************************************************
MENU HANDLERS
@@ -434,9 +434,9 @@ void ui_menu_crosshair::populate()
file_enumerator path(machine().options().crosshair_path());
const osd_directory_entry *dir;
/* reset search flags */
- bool using_default = false;
- bool finished = false;
- bool found = false;
+ int using_default = false;
+ int finished = false;
+ int found = false;
/* if we are using the default, then we just need to find the first in the list */
if (*(settings.name) == 0)
@@ -556,120 +556,3 @@ void ui_menu_quit_game::handle()
/* reset the menu stack */
ui_menu::stack_reset(machine());
}
-
-ui_menu_misc_options::misc_option ui_menu_misc_options::m_options[] = {
- { 0, nullptr, nullptr },
- { 0, "Re-select last machine played", OPTION_REMEMBER_LAST },
- { 0, "Enlarge images in the right panel", OPTION_ENLARGE_SNAPS },
- { 0, "DATs info", OPTION_DATS_ENABLED },
- { 0, "Cheats", OPTION_CHEAT },
- { 0, "Show mouse pointer", OPTION_UI_MOUSE },
- { 0, "Confirm quit from machines", OPTION_UI_CONFIRM_QUIT },
- { 0, "Skip displaying information's screen at startup", OPTION_UI_SKIP_GAMEINFO },
- { 0, "Force 4:3 appearance for software snapshot", OPTION_FORCED4X3 },
- { 0, "Use image as background", OPTION_USE_BACKGROUND },
- { 0, "Skip bios selection menu", OPTION_SKIP_BIOS_MENU },
- { 0, "Skip software parts selection menu", OPTION_SKIP_PARTS_MENU }
-};
-
-//-------------------------------------------------
-// ctor / dtor
-//-------------------------------------------------
-
-ui_menu_misc_options::ui_menu_misc_options(running_machine &machine, render_container *container) : ui_menu(machine, container)
-{
- for (int d = 1; d < ARRAY_LENGTH(m_options); ++d)
- m_options[d].status = machine.ui().options().bool_value(m_options[d].option);
-}
-
-ui_menu_misc_options::~ui_menu_misc_options()
-{
- std::string error_string;
- for (int d = 1; d < ARRAY_LENGTH(m_options); ++d) {
- if (machine().ui().options().exists(m_options[d].option))
- {
- machine().ui().options().set_value(m_options[d].option, m_options[d].status, OPTION_PRIORITY_CMDLINE, error_string);
- }
- else {
- if (machine().options().bool_value(m_options[d].option) != m_options[d].status)
- {
- machine().options().set_value(m_options[d].option, m_options[d].status, OPTION_PRIORITY_CMDLINE, error_string);
- machine().options().mark_changed(m_options[d].option);
- }
- }
- }
- ui_globals::reset = true;
-}
-
-//-------------------------------------------------
-// handlethe options menu
-//-------------------------------------------------
-
-void ui_menu_misc_options::handle()
-{
- bool changed = false;
-
- // process the menu
- const ui_menu_event *m_event = process(0);
- if (m_event != nullptr && m_event->itemref != nullptr)
- {
- if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT || m_event->iptkey == IPT_UI_SELECT)
- {
- changed = true;
- int value = (FPTR)m_event->itemref;
- if (!strcmp(m_options[value].option, OPTION_ENLARGE_SNAPS))
- ui_globals::switch_image = true;
- m_options[value].status = !m_options[value].status;
- }
- }
-
- if (changed)
- reset(UI_MENU_RESET_REMEMBER_REF);
-}
-
-//-------------------------------------------------
-// populate
-//-------------------------------------------------
-
-void ui_menu_misc_options::populate()
-{
- // add options items
- for (int opt = 1; opt < ARRAY_LENGTH(m_options); ++opt)
- item_append(m_options[opt].description, m_options[opt].status ? "On" : "Off", m_options[opt].status ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)(FPTR)opt);
-
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
- customtop = machine().ui().get_line_height() + (3.0f * UI_BOX_TB_BORDER);
-}
-
-//-------------------------------------------------
-// perform our special rendering
-//-------------------------------------------------
-
-void ui_menu_misc_options::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
-{
- float width;
- ui_manager &mui = machine().ui();
-
- mui.draw_text_full(container, "Miscellaneous Options", 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += 2 * UI_BOX_LR_BORDER;
- float maxwidth = MAX(origx2 - origx1, width);
-
- // compute our bounds
- float x1 = 0.5f - 0.5f * maxwidth;
- float x2 = x1 + maxwidth;
- float y1 = origy1 - top;
- float y2 = origy1 - UI_BOX_TB_BORDER;
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // draw the text within it
- mui.draw_text_full(container, "Miscellaneous Options", x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
-}
diff --git a/src/emu/ui/miscmenu.h b/src/emu/ui/miscmenu.h
index f43c4a6b2ba..ea75897edde 100644
--- a/src/emu/ui/miscmenu.h
+++ b/src/emu/ui/miscmenu.h
@@ -1,5 +1,5 @@
// license:BSD-3-Clause
-// copyright-holders:Nicola Salmoria, Aaron Giles, Nathan Woods,Dankan1890
+// copyright-holders:Nicola Salmoria, Aaron Giles, Nathan Woods
/***************************************************************************
ui/miscmenu.h
@@ -85,27 +85,4 @@ public:
virtual void handle() override;
};
-//-------------------------------------------------
-// class miscellaneous options menu
-//-------------------------------------------------
-class ui_menu_misc_options : public ui_menu
-{
-public:
- ui_menu_misc_options(running_machine &machine, render_container *container);
- virtual ~ui_menu_misc_options();
- virtual void populate() override;
- virtual void handle() override;
- virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
-
-private:
- struct misc_option
- {
- bool status;
- const char *description;
- const char *option;
- };
-
- static misc_option m_options[];
-};
-
#endif /* __UI_MISCMENU_H__ */
diff --git a/src/emu/ui/moptions.cpp b/src/emu/ui/moptions.cpp
deleted file mode 100644
index dd4897749fc..00000000000
--- a/src/emu/ui/moptions.cpp
+++ /dev/null
@@ -1,92 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Dankan1890
-/***************************************************************************
-
- ui/moptions.c
-
- UI main options manager.
-
-***************************************************************************/
-
-#include "emu.h"
-#include "ui/moptions.h"
-
-
-//**************************************************************************
-// UI EXTRA OPTIONS
-//**************************************************************************
-
-const options_entry ui_options::s_option_entries[] =
-{
- // seach path options
- { nullptr, nullptr, OPTION_HEADER, "UI SEARCH PATH OPTIONS" },
- { OPTION_HISTORY_PATH, "history;dats;.", OPTION_STRING, "path to history files" },
- { OPTION_EXTRAINI_PATH, "folders", OPTION_STRING, "path to extra ini files" },
- { OPTION_CABINETS_PATH, "cabinets;cabdevs", OPTION_STRING, "path to cabinets / devices image" },
- { OPTION_CPANELS_PATH, "cpanel", OPTION_STRING, "path to control panel image" },
- { OPTION_PCBS_PATH, "pcb", OPTION_STRING, "path to pcbs image" },
- { OPTION_FLYERS_PATH, "flyers", OPTION_STRING, "path to flyers image" },
- { OPTION_TITLES_PATH, "titles", OPTION_STRING, "path to titles image" },
- { OPTION_ENDS_PATH, "ends", OPTION_STRING, "path to ends image" },
- { OPTION_MARQUEES_PATH, "marquees", OPTION_STRING, "path to marquees image" },
- { OPTION_ARTPREV_PATH, "artwork preview", OPTION_STRING, "path to artwork preview image" },
- { OPTION_BOSSES_PATH, "bosses", OPTION_STRING, "path to bosses image" },
- { OPTION_LOGOS_PATH, "logo", OPTION_STRING, "path to logos image" },
- { OPTION_SCORES_PATH, "scores", OPTION_STRING, "path to scores image" },
- { OPTION_VERSUS_PATH, "versus", OPTION_STRING, "path to versus image" },
- { OPTION_GAMEOVER_PATH, "gameover", OPTION_STRING, "path to gameover image" },
- { OPTION_HOWTO_PATH, "howto", OPTION_STRING, "path to howto image" },
- { OPTION_SELECT_PATH, "select", OPTION_STRING, "path to select image" },
- { OPTION_ICONS_PATH, "icons", OPTION_STRING, "path to ICOns image" },
- { OPTION_UI_PATH, "ui", OPTION_STRING, "path to UI files" },
-
- // misc options
- { nullptr, nullptr, OPTION_HEADER, "UI MISC OPTIONS" },
- { OPTION_DATS_ENABLED, "1", OPTION_BOOLEAN, "enable DATs support" },
- { OPTION_REMEMBER_LAST, "1", OPTION_BOOLEAN, "reselect in main menu last played game" },
- { OPTION_ENLARGE_SNAPS, "1", OPTION_BOOLEAN, "enlarge arts (snapshot, title, etc...) in right panel (keeping aspect ratio)" },
- { OPTION_FORCED4X3, "1", OPTION_BOOLEAN, "force the appearance of the snapshot in the list software to 4:3" },
- { OPTION_USE_BACKGROUND, "1", OPTION_BOOLEAN, "enable background image in main view" },
- { OPTION_SKIP_BIOS_MENU, "0", OPTION_BOOLEAN, "skip bios submenu, start with configured or default" },
- { OPTION_SKIP_PARTS_MENU, "0", OPTION_BOOLEAN, "skip parts submenu, start with first part" },
- { OPTION_LAST_USED_FILTER, "", OPTION_STRING, "latest used filter" },
- { OPTION_LAST_USED_MACHINE, "", OPTION_STRING, "latest used machine" },
- { OPTION_INFO_AUTO_AUDIT, "0", OPTION_BOOLEAN, "enable auto audit in the general info panel" },
- { OPTION_UI_SKIP_GAMEINFO, "0", OPTION_BOOLEAN, "skip displaying the information screen at startup" },
- { OPTION_UI_FONT, "default", OPTION_STRING, "specify a font to use" },
- { OPTION_UI_CONFIRM_QUIT, "0", OPTION_BOOLEAN, "display confirm quit screen on exit" },
- { OPTION_UI_MOUSE, "1", OPTION_BOOLEAN, "display ui mouse cursor" },
-
- // UI options
- { nullptr, nullptr, OPTION_HEADER, "UI OPTIONS" },
- { OPTION_INFOS_SIZE "(0.05-1.00)", "0.75", OPTION_FLOAT, "UI right panel infos text size (0.05 - 1.00)" },
- { OPTION_FONT_ROWS "(25-40)", "30", OPTION_INTEGER, "UI font text size (25 - 40)" },
- { OPTION_HIDE_PANELS "(0-3)", "0", OPTION_INTEGER, "UI hide left/right panel in main view (0 = Show all, 1 = hide left, 2 = hide right, 3 = hide both" },
- { OPTION_UI_BORDER_COLOR, "ffffffff", OPTION_STRING, "UI border color (ARGB)" },
- { OPTION_UI_BACKGROUND_COLOR, "ef101030", OPTION_STRING, "UI background color (ARGB)" },
- { OPTION_UI_CLONE_COLOR, "ff808080", OPTION_STRING, "UI clone color (ARGB)" },
- { OPTION_UI_DIPSW_COLOR, "ffffff00", OPTION_STRING, "UI dipswitch color (ARGB)" },
- { OPTION_UI_GFXVIEWER_BG_COLOR, "ef101030", OPTION_STRING, "UI gfx viewer color (ARGB)" },
- { OPTION_UI_MOUSEDOWN_BG_COLOR, "b0606000", OPTION_STRING, "UI mouse down bg color (ARGB)" },
- { OPTION_UI_MOUSEDOWN_COLOR, "ffffff80", OPTION_STRING, "UI mouse down color (ARGB)" },
- { OPTION_UI_MOUSEOVER_BG_COLOR, "70404000", OPTION_STRING, "UI mouse over bg color (ARGB)" },
- { OPTION_UI_MOUSEOVER_COLOR, "ffffff80", OPTION_STRING, "UI mouse over color (ARGB)" },
- { OPTION_UI_SELECTED_BG_COLOR, "ef808000", OPTION_STRING, "UI selected bg color (ARGB)" },
- { OPTION_UI_SELECTED_COLOR, "ffffff00", OPTION_STRING, "UI selected color (ARGB)" },
- { OPTION_UI_SLIDER_COLOR, "ffffffff", OPTION_STRING, "UI slider color (ARGB)" },
- { OPTION_UI_SUBITEM_COLOR, "ffffffff", OPTION_STRING, "UI subitem color (ARGB)" },
- { OPTION_UI_TEXT_BG_COLOR, "ef000000", OPTION_STRING, "UI text bg color (ARGB)" },
- { OPTION_UI_TEXT_COLOR, "ffffffff", OPTION_STRING, "UI text color (ARGB)" },
- { OPTION_UI_UNAVAILABLE_COLOR, "ff404040", OPTION_STRING, "UI unavailable color (ARGB)" },
- { nullptr }
-};
-
-//-------------------------------------------------
-// ui_options - constructor
-//-------------------------------------------------
-
-ui_options::ui_options()
-: core_options()
-{
- add_entries(ui_options::s_option_entries);
-}
diff --git a/src/emu/ui/moptions.h b/src/emu/ui/moptions.h
deleted file mode 100644
index 3b1ab8948c0..00000000000
--- a/src/emu/ui/moptions.h
+++ /dev/null
@@ -1,148 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Dankan1890
-/***************************************************************************
-
- ui/moptions.h
-
- UI main options manager.
-
-***************************************************************************/
-
-#pragma once
-
-#ifndef __UI_OPTS_H__
-#define __UI_OPTS_H__
-
-#include "options.h"
-
-// core directory options
-#define OPTION_HISTORY_PATH "historypath"
-#define OPTION_EXTRAINI_PATH "extrainipath"
-#define OPTION_CABINETS_PATH "cabinets_directory"
-#define OPTION_CPANELS_PATH "cpanels_directory"
-#define OPTION_PCBS_PATH "pcbs_directory"
-#define OPTION_FLYERS_PATH "flyers_directory"
-#define OPTION_TITLES_PATH "titles_directory"
-#define OPTION_ENDS_PATH "ends_directory"
-#define OPTION_MARQUEES_PATH "marquees_directory"
-#define OPTION_ARTPREV_PATH "artwork_preview_directory"
-#define OPTION_BOSSES_PATH "bosses_directory"
-#define OPTION_LOGOS_PATH "logos_directory"
-#define OPTION_SCORES_PATH "scores_directory"
-#define OPTION_VERSUS_PATH "versus_directory"
-#define OPTION_GAMEOVER_PATH "gameover_directory"
-#define OPTION_HOWTO_PATH "howto_directory"
-#define OPTION_SELECT_PATH "select_directory"
-#define OPTION_ICONS_PATH "icons_directory"
-#define OPTION_UI_PATH "ui_path"
-
-// core misc options
-#define OPTION_DATS_ENABLED "dats_enabled"
-#define OPTION_REMEMBER_LAST "remember_last"
-#define OPTION_ENLARGE_SNAPS "enlarge_snaps"
-#define OPTION_FORCED4X3 "forced4x3"
-#define OPTION_USE_BACKGROUND "use_background"
-#define OPTION_SKIP_BIOS_MENU "skip_biosmenu"
-#define OPTION_SKIP_PARTS_MENU "skip_partsmenu"
-#define OPTION_LAST_USED_FILTER "last_used_filter"
-#define OPTION_LAST_USED_MACHINE "last_used_machine"
-#define OPTION_INFO_AUTO_AUDIT "info_audit_enabled"
-
-// core UI options
-#define OPTION_INFOS_SIZE "infos_text_size"
-#define OPTION_FONT_ROWS "font_rows"
-#define OPTION_HIDE_PANELS "hide_main_panel"
-
-#define OPTION_UI_BORDER_COLOR "ui_border_color"
-#define OPTION_UI_BACKGROUND_COLOR "ui_bg_color"
-#define OPTION_UI_GFXVIEWER_BG_COLOR "ui_gfxviewer_color"
-#define OPTION_UI_UNAVAILABLE_COLOR "ui_unavail_color"
-#define OPTION_UI_TEXT_COLOR "ui_text_color"
-#define OPTION_UI_TEXT_BG_COLOR "ui_text_bg_color"
-#define OPTION_UI_SUBITEM_COLOR "ui_subitem_color"
-#define OPTION_UI_CLONE_COLOR "ui_clone_color"
-#define OPTION_UI_SELECTED_COLOR "ui_selected_color"
-#define OPTION_UI_SELECTED_BG_COLOR "ui_selected_bg_color"
-#define OPTION_UI_MOUSEOVER_COLOR "ui_mouseover_color"
-#define OPTION_UI_MOUSEOVER_BG_COLOR "ui_mouseover_bg_color"
-#define OPTION_UI_MOUSEDOWN_COLOR "ui_mousedown_color"
-#define OPTION_UI_MOUSEDOWN_BG_COLOR "ui_mousedown_bg_color"
-#define OPTION_UI_DIPSW_COLOR "ui_dipsw_color"
-#define OPTION_UI_SLIDER_COLOR "ui_slider_color"
-
-#define OPTION_UI_FONT "uifont"
-#define OPTION_UI_CONFIRM_QUIT "confirm_quit"
-#define OPTION_UI_MOUSE "ui_mouse"
-#define OPTION_UI_SKIP_GAMEINFO "skip_gameinfo"
-
-
-class ui_options : public core_options
-{
-public:
- // construction/destruction
- ui_options();
-
- // Search path options
- const char *history_path() const { return value(OPTION_HISTORY_PATH); }
- const char *extraini_path() const { return value(OPTION_EXTRAINI_PATH); }
- const char *cabinets_directory() const { return value(OPTION_CABINETS_PATH); }
- const char *cpanels_directory() const { return value(OPTION_CPANELS_PATH); }
- const char *pcbs_directory() const { return value(OPTION_PCBS_PATH); }
- const char *flyers_directory() const { return value(OPTION_FLYERS_PATH); }
- const char *titles_directory() const { return value(OPTION_TITLES_PATH); }
- const char *ends_directory() const { return value(OPTION_ENDS_PATH); }
- const char *marquees_directory() const { return value(OPTION_MARQUEES_PATH); }
- const char *artprev_directory() const { return value(OPTION_ARTPREV_PATH); }
- const char *bosses_directory() const { return value(OPTION_BOSSES_PATH); }
- const char *logos_directory() const { return value(OPTION_LOGOS_PATH); }
- const char *scores_directory() const { return value(OPTION_SCORES_PATH); }
- const char *versus_directory() const { return value(OPTION_VERSUS_PATH); }
- const char *gameover_directory() const { return value(OPTION_GAMEOVER_PATH); }
- const char *howto_directory() const { return value(OPTION_HOWTO_PATH); }
- const char *select_directory() const { return value(OPTION_SELECT_PATH); }
- const char *icons_directory() const { return value(OPTION_ICONS_PATH); }
- const char *ui_path() const { return value(OPTION_UI_PATH); }
-
- // Misc options
- bool enabled_dats() const { return bool_value(OPTION_DATS_ENABLED); }
- bool remember_last() const { return bool_value(OPTION_REMEMBER_LAST); }
- bool enlarge_snaps() const { return bool_value(OPTION_ENLARGE_SNAPS); }
- bool forced_4x3_snapshot() const { return bool_value(OPTION_FORCED4X3); }
- bool use_background_image() const { return bool_value(OPTION_USE_BACKGROUND); }
- bool skip_bios_menu() const { return bool_value(OPTION_SKIP_BIOS_MENU); }
- bool skip_parts_menu() const { return bool_value(OPTION_SKIP_PARTS_MENU); }
- const char *last_used_machine() const { return value(OPTION_LAST_USED_MACHINE); }
- const char *last_used_filter() const { return value(OPTION_LAST_USED_FILTER); }
- bool info_audit() const { return bool_value(OPTION_INFO_AUTO_AUDIT); }
-
- // UI options
- float infos_size() const { return float_value(OPTION_INFOS_SIZE); }
- int font_rows() const { return int_value(OPTION_FONT_ROWS); }
- int hide_panels() const { return int_value(OPTION_HIDE_PANELS); }
-
- const char *ui_border_color() const { return value(OPTION_UI_BORDER_COLOR); }
- const char *ui_bg_color() const { return value(OPTION_UI_BACKGROUND_COLOR); }
- const char *ui_gfx_bg_color() const { return value(OPTION_UI_GFXVIEWER_BG_COLOR); }
- const char *ui_unavail_color() const { return value(OPTION_UI_UNAVAILABLE_COLOR); }
- const char *ui_text_color() const { return value(OPTION_UI_TEXT_COLOR); }
- const char *ui_text_bg_color() const { return value(OPTION_UI_TEXT_BG_COLOR); }
- const char *ui_subitem_color() const { return value(OPTION_UI_SUBITEM_COLOR); }
- const char *ui_clone_color() const { return value(OPTION_UI_CLONE_COLOR); }
- const char *ui_selected_color() const { return value(OPTION_UI_SELECTED_COLOR); }
- const char *ui_selected_bg_color() const { return value(OPTION_UI_SELECTED_BG_COLOR); }
- const char *ui_mouseover_color() const { return value(OPTION_UI_MOUSEOVER_COLOR); }
- const char *ui_mouseover_bg_color() const { return value(OPTION_UI_MOUSEOVER_BG_COLOR); }
- const char *ui_mousedown_color() const { return value(OPTION_UI_MOUSEDOWN_COLOR); }
- const char *ui_mousedown_bg_color() const { return value(OPTION_UI_MOUSEDOWN_BG_COLOR); }
- const char *ui_dipsw_color() const { return value(OPTION_UI_DIPSW_COLOR); }
- const char *ui_slider_color() const { return value(OPTION_UI_SLIDER_COLOR); }
-
- bool skip_gameinfo() const { return bool_value(OPTION_UI_SKIP_GAMEINFO); }
- const char *ui_font() const { return value(OPTION_UI_FONT); }
- bool confirm_quit() const { return bool_value(OPTION_UI_CONFIRM_QUIT); }
- bool ui_mouse() const { return bool_value(OPTION_UI_MOUSE); }
-private:
- static const options_entry s_option_entries[];
-};
-
-#endif /* __UI_OPTS_H__ */
diff --git a/src/emu/ui/optsmenu.cpp b/src/emu/ui/optsmenu.cpp
deleted file mode 100644
index 44ed9e11a37..00000000000
--- a/src/emu/ui/optsmenu.cpp
+++ /dev/null
@@ -1,308 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Dankan1890
-/*********************************************************************
-
- ui/optsmenu.cpp
-
- UI main options menu manager.
-
-*********************************************************************/
-
-#include "emu.h"
-#include "ui/ui.h"
-#include "ui/menu.h"
-#include "ui/datfile.h"
-#include "ui/inifile.h"
-#include "ui/selector.h"
-#include "ui/custui.h"
-#include "ui/sndmenu.h"
-#include "ui/ctrlmenu.h"
-#include "ui/dsplmenu.h"
-#include "ui/miscmenu.h"
-#include "ui/optsmenu.h"
-#include "ui/custmenu.h"
-#include "ui/inputmap.h"
-#include "rendfont.h"
-
-//-------------------------------------------------
-// ctor
-//-------------------------------------------------
-
-ui_menu_game_options::ui_menu_game_options(running_machine &machine, render_container *container) : ui_menu(machine, container)
-{
-}
-
-//-------------------------------------------------
-// dtor
-//-------------------------------------------------
-
-ui_menu_game_options::~ui_menu_game_options()
-{
- ui_menu::menu_stack->reset(UI_MENU_RESET_SELECT_FIRST);
- save_ui_options(machine());
- ui_globals::switch_image = true;
-}
-
-//-------------------------------------------------
-// handle
-//-------------------------------------------------
-
-void ui_menu_game_options::handle()
-{
- bool changed = false;
-
- // process the menu
-// ui_menu::menu_stack->parent->process(UI_MENU_PROCESS_NOINPUT);
-// const ui_menu_event *m_event = process(UI_MENU_PROCESS_LR_REPEAT | UI_MENU_PROCESS_NOIMAGE);
- const ui_menu_event *m_event = process(UI_MENU_PROCESS_LR_REPEAT);
-
- if (m_event != nullptr && m_event->itemref != nullptr)
- switch ((FPTR)m_event->itemref)
- {
- case FILTER_MENU:
- {
- if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT)
- {
- (m_event->iptkey == IPT_UI_RIGHT) ? ++main_filters::actual : --main_filters::actual;
- changed = true;
- }
- else if (m_event->iptkey == IPT_UI_SELECT)
- {
- int total = main_filters::length;
- std::vector<std::string> s_sel(total);
- for (int index = 0; index < total; ++index)
- s_sel[index] = main_filters::text[index];
-
- ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, s_sel, main_filters::actual));
- }
- break;
- }
- case FILE_CATEGORY_FILTER:
- {
- if (m_event->iptkey == IPT_UI_LEFT)
- {
- machine().inifile().current_file--;
- machine().inifile().current_category = 0;
- changed = true;
- }
- else if (m_event->iptkey == IPT_UI_RIGHT)
- {
- machine().inifile().current_file++;
- machine().inifile().current_category = 0;
- changed = true;
- }
- else if (m_event->iptkey == IPT_UI_SELECT)
- {
- inifile_manager &ifile = machine().inifile();
- int total = ifile.ini_index.size();
- std::vector<std::string> s_sel(total);
- machine().inifile().current_category = 0;
- for (size_t index = 0; index < total; ++index)
- s_sel[index] = ifile.ini_index[index].name;
-
- ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, s_sel, ifile.current_file, SELECTOR_INIFILE));
- }
- break;
- }
- case CATEGORY_FILTER:
- {
- if (m_event->iptkey == IPT_UI_LEFT)
- {
- machine().inifile().current_category--;
- changed = true;
- }
- else if (m_event->iptkey == IPT_UI_RIGHT)
- {
- machine().inifile().current_category++;
- changed = true;
- }
- else if (m_event->iptkey == IPT_UI_SELECT)
- {
- inifile_manager &ifile = machine().inifile();
- int cfile = ifile.current_file;
- int total = ifile.ini_index[cfile].category.size();
- std::vector<std::string> s_sel(total);
- for (int index = 0; index < total; ++index)
- s_sel[index] = ifile.ini_index[cfile].category[index].name;
-
- ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, s_sel, ifile.current_category, SELECTOR_CATEGORY));
- }
- break;
- }
- case MANUFACT_CAT_FILTER:
- if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT)
- {
- (m_event->iptkey == IPT_UI_RIGHT) ? c_mnfct::actual++ : c_mnfct::actual--;
- changed = true;
- }
- else if (m_event->iptkey == IPT_UI_SELECT)
- ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, c_mnfct::ui, c_mnfct::actual));
-
- break;
- case YEAR_CAT_FILTER:
- if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT)
- {
- (m_event->iptkey == IPT_UI_RIGHT) ? c_year::actual++ : c_year::actual--;
- changed = true;
- }
- else if (m_event->iptkey == IPT_UI_SELECT)
- ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, c_year::ui, c_year::actual));
-
- break;
- case MISC_MENU:
- if (m_event->iptkey == IPT_UI_SELECT)
- ui_menu::stack_push(global_alloc_clear<ui_menu_misc_options>(machine(), container));
- break;
- case SOUND_MENU:
- if (m_event->iptkey == IPT_UI_SELECT)
- ui_menu::stack_push(global_alloc_clear<ui_menu_sound_options>(machine(), container));
- break;
- case DISPLAY_MENU:
- if (m_event->iptkey == IPT_UI_SELECT)
- ui_menu::stack_push(global_alloc_clear<ui_menu_display_options>(machine(), container));
- break;
- case CUSTOM_MENU:
- if (m_event->iptkey == IPT_UI_SELECT)
- ui_menu::stack_push(global_alloc_clear<ui_menu_custom_ui>(machine(), container));
- break;
- case CONTROLLER_MENU:
- if (m_event->iptkey == IPT_UI_SELECT)
- ui_menu::stack_push(global_alloc_clear<ui_menu_controller_mapping>(machine(), container));
- break;
-
- case CGI_MENU:
- if (m_event->iptkey == IPT_UI_SELECT)
- ui_menu::stack_push(global_alloc_clear<ui_menu_input_groups>(machine(), container));
- break;
-
- case CUSTOM_FILTER:
- if (m_event->iptkey == IPT_UI_SELECT)
- ui_menu::stack_push(global_alloc_clear<ui_menu_custom_filter>(machine(), container));
- break;
- }
-
- if (changed)
- reset(UI_MENU_RESET_REMEMBER_REF);
-}
-
-//-------------------------------------------------
-// populate
-//-------------------------------------------------
-
-void ui_menu_game_options::populate()
-{
- if (strcmp(machine().options().ui(),"simple")!=0)
- {
- // set filter arrow
- std::string fbuff;
-
- // add filter item
- UINT32 arrow_flags = get_arrow_flags((int)FILTER_FIRST, (int)FILTER_LAST, main_filters::actual);
- item_append("Filter", main_filters::text[main_filters::actual], arrow_flags, (void *)(FPTR)FILTER_MENU);
-
- // add category subitem
- if (main_filters::actual == FILTER_CATEGORY && !machine().inifile().ini_index.empty())
- {
- inifile_manager &inif = machine().inifile();
- int afile = inif.current_file;
-
- arrow_flags = get_arrow_flags(0, inif.ini_index.size() - 1, afile);
- fbuff = " ^!File";
- convert_command_glyph(fbuff);
- item_append(fbuff.c_str(), inif.actual_file().c_str(), arrow_flags, (void *)(FPTR)FILE_CATEGORY_FILTER);
-
- arrow_flags = get_arrow_flags(0, inif.ini_index[afile].category.size() - 1, inif.current_category);
- fbuff = " ^!Category";
- convert_command_glyph(fbuff);
- 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)
- {
- arrow_flags = get_arrow_flags(0, c_mnfct::ui.size() - 1, c_mnfct::actual);
- fbuff = "^!Manufacturer";
- convert_command_glyph(fbuff);
- 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)
- {
- arrow_flags = get_arrow_flags(0, c_year::ui.size() - 1, c_year::actual);
- fbuff.assign("^!Year");
- convert_command_glyph(fbuff);
- 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)
- {
- fbuff = "^!Setup custom filter";
- convert_command_glyph(fbuff);
- item_append(fbuff.c_str(), nullptr, 0, (void *)(FPTR)CUSTOM_FILTER);
- }
-
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
-
- // add options items
- item_append("Customize UI", nullptr, 0, (void *)(FPTR)CUSTOM_MENU);
- }
- item_append("Display Options", nullptr, 0, (void *)(FPTR)DISPLAY_MENU);
- item_append("Sound Options", nullptr, 0, (void *)(FPTR)SOUND_MENU);
- item_append("Miscellaneous Options", nullptr, 0, (void *)(FPTR)MISC_MENU);
- item_append("Device Mapping", nullptr, 0, (void *)(FPTR)CONTROLLER_MENU);
- item_append("General Inputs", nullptr, 0, (void *)(FPTR)CGI_MENU);
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
-
- custombottom = 2.0f * machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
- customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
-}
-
-//-------------------------------------------------
-// perform our special rendering
-//-------------------------------------------------
-
-void ui_menu_game_options::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
-{
- float width;
- ui_manager &mui = machine().ui();
- mui.draw_text_full(container, "Settings", 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += 2 * UI_BOX_LR_BORDER;
- float maxwidth = MAX(origx2 - origx1, width);
-
- // compute our bounds
- float x1 = 0.5f - 0.5f * maxwidth;
- float x2 = x1 + maxwidth;
- float y1 = origy1 - top;
- float y2 = origy1 - UI_BOX_TB_BORDER;
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // draw the text within it
- mui.draw_text_full(container, "Settings", x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
-}
-
-//-------------------------------------------------
-// save ui options
-//-------------------------------------------------
-
-void save_ui_options(running_machine &machine)
-{
- // attempt to open the output file
- emu_file file(machine.options().ini_path(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
- if (file.open("ui.ini") == FILERR_NONE)
- {
- // generate the updated INI
- std::string initext = machine.ui().options().output_ini();
- file.puts(initext.c_str());
- file.close();
- }
- else
- machine.popmessage("**Error to save ui.ini**", emulator_info::get_configname());
-}
diff --git a/src/emu/ui/optsmenu.h b/src/emu/ui/optsmenu.h
deleted file mode 100644
index 13e857ec7ba..00000000000
--- a/src/emu/ui/optsmenu.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Dankan1890
-/***************************************************************************
-
- ui/optsmenu.h
-
- UI main options menu manager.
-
-***************************************************************************/
-
-#pragma once
-
-#ifndef __UI_OPTSMENU_H__
-#define __UI_OPTSMENU_H__
-
-class ui_menu_game_options : public ui_menu
-{
-public:
- ui_menu_game_options(running_machine &machine, render_container *container);
- virtual ~ui_menu_game_options();
- virtual void populate() override;
- virtual void handle() override;
- virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
-
-private:
- enum
- {
- FILTER_MENU = 1,
- FILE_CATEGORY_FILTER,
- MANUFACT_CAT_FILTER,
- YEAR_CAT_FILTER,
- CATEGORY_FILTER,
- MISC_MENU,
- DISPLAY_MENU,
- CUSTOM_MENU,
- SOUND_MENU,
- CONTROLLER_MENU,
- SAVE_OPTIONS,
- CGI_MENU,
- CUSTOM_FILTER
- };
-};
-
-// save options to file
-void save_ui_options(running_machine &machine);
-
-#endif /* __UI_OPTSMENU_H__ */
diff --git a/src/emu/ui/selector.cpp b/src/emu/ui/selector.cpp
deleted file mode 100644
index c9cc3c7b6c0..00000000000
--- a/src/emu/ui/selector.cpp
+++ /dev/null
@@ -1,244 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Dankan1890
-/*********************************************************************
-
- ui/m_selector.cpp
-
- Internal UI user interface.
-
-*********************************************************************/
-
-#include "emu.h"
-#include "ui/ui.h"
-#include "ui/menu.h"
-#include "ui/selector.h"
-#include "ui/inifile.h"
-
-//-------------------------------------------------
-// ctor / dtor
-//-------------------------------------------------
-
-ui_menu_selector::ui_menu_selector(running_machine &machine, render_container *container, std::vector<std::string> s_sel, UINT16 &s_actual, int category, int _hover)
- : ui_menu(machine, container), m_selector(s_actual)
-{
- m_category = category;
- m_first_pass = true;
- m_hover = _hover;
- m_str_items = s_sel;
- m_search[0] = '\0';
- m_searchlist[0] = nullptr;
-}
-
-ui_menu_selector::~ui_menu_selector()
-{
-}
-
-//-------------------------------------------------
-// handle
-//-------------------------------------------------
-
-void ui_menu_selector::handle()
-{
- // process the menu
- const ui_menu_event *m_event = process(0);
-
- if (m_event != nullptr && m_event->itemref != nullptr)
- {
- if (m_event->iptkey == IPT_UI_SELECT)
- {
- for (size_t idx = 0; idx < m_str_items.size(); ++idx)
- if ((void*)&m_str_items[idx] == m_event->itemref)
- m_selector = idx;
-
- switch (m_category)
- {
- case SELECTOR_INIFILE:
- machine().inifile().current_file = m_selector;
- machine().inifile().current_category = 0;
- ui_menu::menu_stack->parent->reset(UI_MENU_RESET_REMEMBER_REF);
- break;
-
- case SELECTOR_CATEGORY:
- machine().inifile().current_category = m_selector;
- ui_menu::menu_stack->parent->reset(UI_MENU_RESET_REMEMBER_REF);
- break;
-
- case SELECTOR_GAME:
- main_filters::actual = m_hover;
- ui_menu::menu_stack->parent->reset(UI_MENU_RESET_SELECT_FIRST);
- break;
-
- case SELECTOR_SOFTWARE:
- sw_filters::actual = m_hover;
- ui_menu::menu_stack->parent->reset(UI_MENU_RESET_SELECT_FIRST);
- break;
-
- default:
- ui_menu::menu_stack->parent->reset(UI_MENU_RESET_REMEMBER_REF);
- break;
- }
-
- ui_globals::switch_image = true;
- ui_menu::stack_pop(machine());
- }
- else if (m_event->iptkey == IPT_SPECIAL)
- {
- int buflen = strlen(m_search);
-
- // if it's a backspace and we can handle it, do so
- if ((m_event->unichar == 8 || m_event->unichar == 0x7f) && buflen > 0)
- {
- *(char *)utf8_previous_char(&m_search[buflen]) = 0;
- reset(UI_MENU_RESET_SELECT_FIRST);
- }
-
- // if it's any other key and we're not maxed out, update
- else if (m_event->unichar >= ' ' && m_event->unichar < 0x7f)
- {
- buflen += utf8_from_uchar(&m_search[buflen], ARRAY_LENGTH(m_search) - buflen, m_event->unichar);
- m_search[buflen] = 0;
- reset(UI_MENU_RESET_SELECT_FIRST);
- }
- }
-
- // escape pressed with non-empty text clears the text
- else if (m_event->iptkey == IPT_UI_CANCEL && m_search[0] != 0)
- {
- m_search[0] = '\0';
- reset(UI_MENU_RESET_SELECT_FIRST);
- }
- }
-}
-
-//-------------------------------------------------
-// populate
-//-------------------------------------------------
-
-void ui_menu_selector::populate()
-{
- if (m_search[0] != 0)
- {
- find_matches(m_search);
-
- for (int curitem = 0; m_searchlist[curitem]; ++curitem)
- item_append(m_searchlist[curitem]->c_str(), nullptr, 0, (void *)m_searchlist[curitem]);
- }
- else
- {
- for (size_t index = 0, added = 0; index < m_str_items.size(); ++index)
- if (m_str_items[index] != "_skip_")
- {
- if (m_first_pass && m_selector == index)
- selected = added;
-
- added++;
- item_append(m_str_items[index].c_str(), nullptr, 0, (void *)&m_str_items[index]);
- }
- }
-
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
- customtop = custombottom = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
- m_first_pass = false;
-}
-
-//-------------------------------------------------
-// perform our special rendering
-//-------------------------------------------------
-
-void ui_menu_selector::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
-{
- float width;
- ui_manager &mui = machine().ui();
- std::string tempbuf = std::string("Selection List - Search: ").append(m_search).append("_");
-
- // get the size of the text
- mui.draw_text_full(container, tempbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += (2.0f * UI_BOX_LR_BORDER) + 0.01f;
- float maxwidth = MAX(width, origx2 - origx1);
-
- // compute our bounds
- float x1 = 0.5f - 0.5f * maxwidth;
- float x2 = x1 + maxwidth;
- float y1 = origy1 - top;
- float y2 = origy1 - UI_BOX_TB_BORDER;
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // draw the text within it
- mui.draw_text_full(container, tempbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
-
- // bottom text
- // get the text for 'UI Select'
- std::string ui_select_text = machine().input().seq_name(machine().ioport().type_seq(IPT_UI_SELECT, 0, SEQ_TYPE_STANDARD));
- tempbuf.assign("Double click or press ").append(ui_select_text).append(" to select");
-
- 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);
- width += 2 * UI_BOX_LR_BORDER;
- maxwidth = MAX(maxwidth, width);
-
- // compute our bounds
- x1 = 0.5f - 0.5f * maxwidth;
- x2 = x1 + maxwidth;
- y1 = origy2 + UI_BOX_TB_BORDER;
- y2 = origy2 + bottom;
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_RED_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // draw the text within it
- mui.draw_text_full(container, tempbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
-}
-
-//-------------------------------------------------
-// find approximate matches
-//-------------------------------------------------
-
-void ui_menu_selector::find_matches(const char *str)
-{
- // allocate memory to track the penalty value
- std::vector<int> penalty(VISIBLE_GAMES_IN_SEARCH, 9999);
- int index = 0;
-
- for (; index < m_str_items.size(); ++index)
- {
- if (m_str_items[index] == "_skip_")
- continue;
-
- // pick the best match between driver name and description
- int curpenalty = fuzzy_substring(str, m_str_items[index]);
-
- // insert into the sorted table of matches
- for (int matchnum = VISIBLE_GAMES_IN_SEARCH - 1; matchnum >= 0; --matchnum)
- {
- // stop if we're worse than the current entry
- if (curpenalty >= penalty[matchnum])
- break;
-
- // as long as this isn't the last entry, bump this one down
- if (matchnum < VISIBLE_GAMES_IN_SEARCH - 1)
- {
- penalty[matchnum + 1] = penalty[matchnum];
- m_searchlist[matchnum + 1] = m_searchlist[matchnum];
- }
-
- m_searchlist[matchnum] = &m_str_items[index];
- penalty[matchnum] = curpenalty;
- }
- }
- (index < VISIBLE_GAMES_IN_SEARCH) ? m_searchlist[index] = nullptr : m_searchlist[VISIBLE_GAMES_IN_SEARCH] = nullptr;
-}
diff --git a/src/emu/ui/selector.h b/src/emu/ui/selector.h
deleted file mode 100644
index 595ca1f578d..00000000000
--- a/src/emu/ui/selector.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Dankan1890
-/***************************************************************************
-
- ui/selector.h
-
- Internal UI user interface.
-
-***************************************************************************/
-
-#pragma once
-
-#ifndef __UI_SELECTOR_H__
-#define __UI_SELECTOR_H__
-
-enum
-{
- SELECTOR_INIFILE = 1,
- SELECTOR_CATEGORY,
- SELECTOR_GAME,
- SELECTOR_SOFTWARE
-};
-
-//-------------------------------------------------
-// class selector menu
-//-------------------------------------------------
-
-class ui_menu_selector : public ui_menu
-{
-public:
- ui_menu_selector(running_machine &machine, render_container *container, std::vector<std::string> _sel, UINT16 &_actual, int _category = 0, int _hover = 0);
- virtual ~ui_menu_selector();
- virtual void populate() override;
- virtual void handle() override;
- virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
-
- virtual bool menu_has_search_active() override { return (m_search[0] != 0); }
-
-private:
- enum { VISIBLE_GAMES_IN_SEARCH = 200 };
- char m_search[40];
- UINT16 &m_selector;
- int m_category, m_hover;
- bool m_first_pass;
- std::vector<std::string> m_str_items;
- std::string *m_searchlist[VISIBLE_GAMES_IN_SEARCH + 1];
-
- void find_matches(const char *str);
-};
-
-#endif /* __UI_SELECTOR_H__ */
diff --git a/src/emu/ui/selgame.cpp b/src/emu/ui/selgame.cpp
index 9614061c6cf..9a080df6655 100644
--- a/src/emu/ui/selgame.cpp
+++ b/src/emu/ui/selgame.cpp
@@ -1,12 +1,12 @@
// license:BSD-3-Clause
-// copyright-holders:Dankan1890
-/*********************************************************************
+// copyright-holders:Nicola Salmoria, Aaron Giles, Nathan Woods
+/***************************************************************************
- ui/selgame.cpp
+ ui/selgame.c
- Main UI menu.
+ Game selector
-*********************************************************************/
+***************************************************************************/
#include "emu.h"
#include "emuopts.h"
@@ -14,754 +14,294 @@
#include "ui/menu.h"
#include "uiinput.h"
#include "ui/selgame.h"
+#include "ui/inputmap.h"
#include "ui/miscmenu.h"
#include "audit.h"
-#include "ui/datfile.h"
-#include "ui/inifile.h"
-#include "rendfont.h"
-#include "ui/datmenu.h"
-#include "ui/dirmenu.h"
-#include "ui/optsmenu.h"
-#include "ui/selector.h"
-#include "ui/selsoft.h"
-#include "sound/samples.h"
-#include "ui/custmenu.h"
-#include "../info.h"
-#include "ui/auditmenu.h"
-#include "rendutil.h"
-#include "softlist.h"
-#include <algorithm>
-
-extern const char UI_VERSION_TAG[];
-
-static bool first_start = true;
-static const char *dats_info[] = { "General Info", "History", "Mameinfo", "Sysinfo", "Messinfo", "Command", "Mamescore" };
-
-std::vector<const game_driver *> ui_menu_select_game::m_sortedlist;
-int ui_menu_select_game::m_isabios = 0;
+#include <ctype.h>
+
//-------------------------------------------------
-// sort
+// ctor
//-------------------------------------------------
-inline int c_stricmp(const char *s1, const char *s2)
+ui_menu_select_game::ui_menu_select_game(running_machine &machine, render_container *container, const char *gamename) : ui_menu(machine, container), m_driverlist(driver_list::total() + 1)
{
- for (;;)
- {
- int c1 = tolower((UINT8)*s1++);
- int c2 = tolower((UINT8)*s2++);
- if (c1 == 0 || c1 != c2)
- return c1 - c2;
- }
+ build_driver_list();
+ if(gamename)
+ strcpy(m_search, gamename);
+ m_matchlist[0] = -1;
}
-bool sort_game_list(const game_driver *x, const game_driver *y)
-{
- bool clonex = strcmp(x->parent, "0");
- bool cloney = strcmp(y->parent, "0");
-
- if (!clonex && !cloney)
- return (c_stricmp(x->description, y->description) < 0);
-
- int cx = -1, cy = -1;
- if (clonex)
- {
- cx = driver_list::find(x->parent);
- if (cx == -1 || (driver_list::driver(cx).flags & MACHINE_IS_BIOS_ROOT) != 0)
- clonex = false;
- }
-
- if (cloney)
- {
- cy = driver_list::find(y->parent);
- if (cy == -1 || (driver_list::driver(cy).flags & MACHINE_IS_BIOS_ROOT) != 0)
- cloney = false;
- }
-
- if (!clonex && !cloney)
- return (c_stricmp(x->description, y->description) < 0);
-
- else if (clonex && cloney)
- {
- if (!c_stricmp(x->parent, y->parent))
- return (c_stricmp(x->description, y->description) < 0);
- else
- return (c_stricmp(driver_list::driver(cx).description, driver_list::driver(cy).description) < 0);
- }
- else if (!clonex && cloney)
- {
- if (!c_stricmp(x->name, y->parent))
- return true;
- else
- return (c_stricmp(x->description, driver_list::driver(cy).description) < 0);
- }
- else
- {
- if (!c_stricmp(x->parent, y->name))
- return false;
- else
- return (c_stricmp(driver_list::driver(cx).description, y->description) < 0);
- }
-}
//-------------------------------------------------
-// save main option
+// dtor
//-------------------------------------------------
-void save_main_option(running_machine &machine)
+ui_menu_select_game::~ui_menu_select_game()
{
- // parse the file
- std::string error;
- emu_options options(machine.options()); // This way we make sure that all OSD parts are in
- std::string error_string;
-
- // attempt to open the main ini file
- {
- emu_file file(machine.options().ini_path(), OPEN_FLAG_READ);
- if (file.open(emulator_info::get_configname(), ".ini") == FILERR_NONE)
- {
- bool result = options.parse_ini_file((core_file&)file, OPTION_PRIORITY_MAME_INI, OPTION_PRIORITY_DRIVER_INI, error);
- if (!result)
- {
- osd_printf_error("**Error to load %s.ini**", emulator_info::get_configname());
- return;
- }
- }
- }
+}
- for (emu_options::entry *f_entry = machine.options().first(); f_entry != nullptr; f_entry = f_entry->next())
- {
- if (f_entry->is_changed())
- {
- options.set_value(f_entry->name(), f_entry->value(), OPTION_PRIORITY_CMDLINE, error_string);
- }
- }
- // attempt to open the output file
- {
- emu_file file(machine.options().ini_path(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
- if (file.open(emulator_info::get_configname(), ".ini") == FILERR_NONE)
- {
- // generate the updated INI
- std::string initext = options.output_ini();
- file.puts(initext.c_str());
- file.close();
- }
- else {
- machine.popmessage("**Error to save %s.ini**", emulator_info::get_configname());
- return;
- }
- }
- machine.ui().popup_time(3, "\n Configuration saved \n\n");
-}
//-------------------------------------------------
-// ctor
+// build_driver_list - build a list of available
+// drivers
//-------------------------------------------------
-ui_menu_select_game::ui_menu_select_game(running_machine &machine, render_container *container, const char *gamename) : ui_menu(machine, container)
+void ui_menu_select_game::build_driver_list()
{
- std::string error_string, last_filter, sub_filter;
- ui_options &moptions = machine.ui().options();
+ // start with an empty list
+ m_drivlist = std::make_unique<driver_enumerator>(machine().options());
+ m_drivlist->exclude_all();
- // load drivers cache
- init_sorted_list();
-
- // check if there are available icons
- ui_globals::has_icons = false;
- file_enumerator path(moptions.icons_directory());
+ // open a path to the ROMs and find them in the array
+ file_enumerator path(machine().options().media_path());
const osd_directory_entry *dir;
- while ((dir = path.next()) != nullptr)
- {
- std::string src(dir->name);
- if (src.find(".ico") != std::string::npos || src.find("icons") != std::string::npos)
- {
- ui_globals::has_icons = true;
- break;
- }
- }
-
- // build drivers list
- if (!load_available_machines())
- build_available_list();
- // load custom filter
- load_custom_filters();
-
- if (first_start)
+ // iterate while we get new objects
+ while ((dir = path.next()) != nullptr)
{
- reselect_last::driver = moptions.last_used_machine();
- std::string tmp(moptions.last_used_filter());
- std::size_t found = tmp.find_first_of(",");
- if (found == std::string::npos)
- last_filter = tmp;
- else
- {
- last_filter = tmp.substr(0, found);
- sub_filter = tmp.substr(found + 1);
- }
+ char drivername[50];
+ char *dst = drivername;
+ const char *src;
- main_filters::actual = FILTER_ALL;
- for (size_t ind = 0; ind < main_filters::length; ++ind)
- if (last_filter == main_filters::text[ind])
- {
- main_filters::actual = ind;
- break;
- }
+ // build a name for it
+ for (src = dir->name; *src != 0 && *src != '.' && dst < &drivername[ARRAY_LENGTH(drivername) - 1]; src++)
+ *dst++ = tolower((UINT8)*src);
+ *dst = 0;
- if (main_filters::actual == FILTER_CATEGORY)
- main_filters::actual = FILTER_ALL;
- else if (main_filters::actual == FILTER_MANUFACTURER)
- {
- for (size_t id = 0; id < c_mnfct::ui.size(); ++id)
- if (sub_filter == c_mnfct::ui[id])
- c_mnfct::actual = id;
- }
- else if (main_filters::actual == FILTER_YEAR)
- {
- for (size_t id = 0; id < c_year::ui.size(); ++id)
- if (sub_filter == c_year::ui[id])
- c_year::actual = id;
- }
- first_start = false;
+ int drivnum = m_drivlist->find(drivername);
+ if (drivnum != -1)
+ m_drivlist->include(drivnum);
}
- if (!moptions.remember_last())
- reselect_last::reset();
-
- machine.options().set_value(OPTION_SNAPNAME, "%g/%i", OPTION_PRIORITY_CMDLINE, error_string);
- machine.options().set_value(OPTION_SOFTWARENAME, "", OPTION_PRIORITY_CMDLINE, error_string);
+ // now build the final list
+ m_drivlist->reset();
+ int listnum = 0;
+ while (m_drivlist->next())
+ m_driverlist[listnum++] = &m_drivlist->driver();
- ui_globals::curimage_view = FIRST_VIEW;
- ui_globals::curdats_view = UI_FIRST_LOAD;
- ui_globals::switch_image = false;
- ui_globals::default_image = true;
- ui_globals::panels_status = moptions.hide_panels();
+ // NULL-terminate
+ m_driverlist[listnum] = nullptr;
}
-//-------------------------------------------------
-// dtor
-//-------------------------------------------------
-
-ui_menu_select_game::~ui_menu_select_game()
-{
- std::string error_string, last_driver;
- const game_driver *driver = nullptr;
- ui_software_info *swinfo = nullptr;
- ui_options &mopt = machine().ui().options();
- if (isfavorite())
- swinfo = (selected >= 0 && selected < item.size()) ? (ui_software_info *)item[selected].ref : nullptr;
- else
- driver = (selected >= 0 && selected < item.size()) ? (const game_driver *)item[selected].ref : nullptr;
-
- if ((FPTR)driver > 3)
- last_driver = driver->name;
-
- if ((FPTR)swinfo > 3)
- last_driver = swinfo->shortname;
- std::string filter(main_filters::text[main_filters::actual]);
- if (main_filters::actual == FILTER_MANUFACTURER)
- filter.append(",").append(c_mnfct::ui[c_mnfct::actual]);
- else if (main_filters::actual == FILTER_YEAR)
- filter.append(",").append(c_year::ui[c_year::actual]);
-
- mopt.set_value(OPTION_LAST_USED_FILTER, filter.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
- mopt.set_value(OPTION_LAST_USED_MACHINE, last_driver.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
- mopt.set_value(OPTION_HIDE_PANELS, ui_globals::panels_status, OPTION_PRIORITY_CMDLINE, error_string);
- save_ui_options(machine());
-}
//-------------------------------------------------
-// handle
+// handle - handle the game select menu
//-------------------------------------------------
void ui_menu_select_game::handle()
{
- bool check_filter = false;
- bool enabled_dats = machine().ui().options().enabled_dats();
-
- // if i have to load datfile, performe an hard reset
- if (ui_globals::reset)
- {
- ui_globals::reset = false;
- machine().schedule_hard_reset();
- ui_menu::stack_reset(machine());
- return;
- }
-
- // if i have to reselect a software, force software list submenu
- if (reselect_last::get())
- {
- const game_driver *driver = (const game_driver *)item[selected].ref;
- ui_menu::stack_push(global_alloc_clear<ui_menu_select_software>(machine(), container, driver));
- return;
- }
-
// ignore pause keys by swallowing them before we process the menu
machine().ui_input().pressed(IPT_UI_PAUSE);
// process the menu
- const ui_menu_event *m_event = process(UI_MENU_PROCESS_LR_REPEAT);
- if (m_event != nullptr && m_event->itemref != nullptr)
+ const ui_menu_event *menu_event = process(0);
+ if (menu_event != nullptr && menu_event->itemref != nullptr)
{
- // reset the error on any future m_event
- if (ui_error)
- ui_error = false;
+ // reset the error on any future menu_event
+ if (m_error)
+ m_error = false;
// handle selections
- else if (m_event->iptkey == IPT_UI_SELECT)
- {
- if (isfavorite())
- inkey_select_favorite(m_event);
- else
- inkey_select(m_event);
- }
-
- // handle UI_LEFT
- else if (m_event->iptkey == IPT_UI_LEFT)
- {
- // Images
- if (ui_globals::rpanel == RP_IMAGES && ui_globals::curimage_view > FIRST_VIEW)
- {
- ui_globals::curimage_view--;
- ui_globals::switch_image = true;
- ui_globals::default_image = false;
- }
-
- // Infos
- else if (ui_globals::rpanel == RP_INFOS && ui_globals::curdats_view > UI_FIRST_LOAD)
- {
- ui_globals::curdats_view--;
- topline_datsview = 0;
- }
- }
-
- // handle UI_RIGHT
- else if (m_event->iptkey == IPT_UI_RIGHT)
- {
- // Images
- if (ui_globals::rpanel == RP_IMAGES && ui_globals::curimage_view < LAST_VIEW)
- {
- ui_globals::curimage_view++;
- ui_globals::switch_image = true;
- ui_globals::default_image = false;
- }
-
- // Infos
- else if (ui_globals::rpanel == RP_INFOS && ui_globals::curdats_view < UI_LAST_LOAD)
- {
- ui_globals::curdats_view++;
- topline_datsview = 0;
- }
- }
-
- // handle UI_UP_FILTER
- else if (m_event->iptkey == IPT_UI_UP_FILTER && main_filters::actual > FILTER_FIRST)
- {
- l_hover = main_filters::actual - 1;
- check_filter = true;
- }
-
- // handle UI_DOWN_FILTER
- else if (m_event->iptkey == IPT_UI_DOWN_FILTER && main_filters::actual < FILTER_LAST)
- {
- l_hover = main_filters::actual + 1;
- check_filter = true;
- }
-
- // handle UI_LEFT_PANEL
- else if (m_event->iptkey == IPT_UI_LEFT_PANEL)
- ui_globals::rpanel = RP_IMAGES;
-
- // handle UI_RIGHT_PANEL
- else if (m_event->iptkey == IPT_UI_RIGHT_PANEL)
- ui_globals::rpanel = RP_INFOS;
-
- // escape pressed with non-empty text clears the text
- else if (m_event->iptkey == IPT_UI_CANCEL && m_search[0] != 0)
- {
- m_search[0] = '\0';
- reset(UI_MENU_RESET_SELECT_FIRST);
- }
-
- // handle UI_DATS
- else if (m_event->iptkey == IPT_UI_DATS && enabled_dats)
- {
- if (!isfavorite())
- {
- const game_driver *driver = (const game_driver *)m_event->itemref;
- if ((FPTR)driver > 3 && 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 (swinfo->startempty == 1)
- ui_menu::stack_push(global_alloc_clear<ui_menu_dats_view>(machine(), container, swinfo->driver));
- else
- ui_menu::stack_push(global_alloc_clear<ui_menu_dats_view>(machine(), container, swinfo));
- }
- }
- }
-
- // handle UI_FAVORITES
- else if (m_event->iptkey == IPT_UI_FAVORITES)
+ else
{
- if (!isfavorite())
+ switch(menu_event->iptkey)
{
- const game_driver *driver = (const game_driver *)m_event->itemref;
- if ((FPTR)driver > 3)
- {
- if (!machine().favorite().isgame_favorite(driver))
- {
- machine().favorite().add_favorite_game(driver);
- machine().popmessage("%s\n added to favorites list.", driver->description);
- }
-
- else
- {
- machine().favorite().remove_favorite_game();
- machine().popmessage("%s\n removed from favorites list.", driver->description);
- }
- }
- }
- else
- {
- ui_software_info *swinfo = (ui_software_info *)m_event->itemref;
- if ((FPTR)swinfo > 3)
- {
- machine().popmessage("%s\n removed from favorites list.", swinfo->longname.c_str());
- machine().favorite().remove_favorite_game(*swinfo);
- reset(UI_MENU_RESET_SELECT_FIRST);
- }
+ case IPT_UI_SELECT:
+ inkey_select(menu_event);
+ break;
+ case IPT_UI_CANCEL:
+ inkey_cancel(menu_event);
+ break;
+ case IPT_SPECIAL:
+ inkey_special(menu_event);
+ break;
}
}
+ }
- // handle UI_EXPORT
- else if (m_event->iptkey == IPT_UI_EXPORT)
- inkey_export();
+ // if we're in an error state, overlay an error message
+ if (m_error)
+ machine().ui().draw_text_box(container,
+ "The selected game is missing one or more required ROM or CHD images. "
+ "Please select a different game.\n\nPress any key to continue.",
+ JUSTIFY_CENTER, 0.5f, 0.5f, UI_RED_COLOR);
+}
- // handle UI_AUDIT_FAST
- else if (m_event->iptkey == IPT_UI_AUDIT_FAST && !m_unavailsortedlist.empty())
- ui_menu::stack_push(global_alloc_clear<ui_menu_audit>(machine(), container, m_availsortedlist, m_unavailsortedlist, 1));
- // handle UI_AUDIT_ALL
- else if (m_event->iptkey == IPT_UI_AUDIT_ALL)
- ui_menu::stack_push(global_alloc_clear<ui_menu_audit>(machine(), container, m_availsortedlist, m_unavailsortedlist, 2));
+//-------------------------------------------------
+// inkey_select
+//-------------------------------------------------
- // typed characters append to the buffer
- else if (m_event->iptkey == IPT_SPECIAL)
- inkey_special(m_event);
+void ui_menu_select_game::inkey_select(const ui_menu_event *menu_event)
+{
+ const game_driver *driver = (const game_driver *)menu_event->itemref;
- else if (m_event->iptkey == IPT_OTHER)
- check_filter = true;
- }
+ // special case for configure inputs
+ if ((FPTR)driver == 1)
+ ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_input_groups>(machine(), container)));
- if (m_event != nullptr && m_event->itemref == nullptr)
+ // anything else is a driver
+ else
{
- if (m_event->iptkey == IPT_SPECIAL && m_event->unichar == 0x09)
- selected = m_prev_selected;
-
- // handle UI_UP_FILTER
- else if (m_event->iptkey == IPT_UI_UP_FILTER && main_filters::actual > FILTER_FIRST)
- {
- l_hover = main_filters::actual - 1;
- check_filter = true;
- }
+ // audit the game first to see if we're going to work
+ driver_enumerator enumerator(machine().options(), *driver);
+ enumerator.next();
+ media_auditor auditor(enumerator);
+ media_auditor::summary summary = auditor.audit_media(AUDIT_VALIDATE_FAST);
- // handle UI_DOWN_FILTER
- else if (m_event->iptkey == IPT_UI_DOWN_FILTER && main_filters::actual < FILTER_LAST)
+ // if everything looks good, schedule the new driver
+ if (summary == media_auditor::CORRECT || summary == media_auditor::BEST_AVAILABLE || summary == media_auditor::NONE_NEEDED)
{
- l_hover = main_filters::actual + 1;
- check_filter = true;
+ machine().manager().schedule_new_driver(*driver);
+ machine().schedule_hard_reset();
+ ui_menu::stack_reset(machine());
}
- else if (m_event->iptkey == IPT_OTHER)
- check_filter = true;
- }
-
- // if we're in an error state, overlay an error message
- if (ui_error)
- machine().ui().draw_text_box(container, "The selected machine is missing one or more required ROM or CHD images. "
- "Please select a different machine.\n\nPress any key (except ESC) to continue.", JUSTIFY_CENTER, 0.5f, 0.5f, UI_RED_COLOR);
- // handle filters selection from key shortcuts
- if (check_filter)
- {
- m_search[0] = '\0';
- if (l_hover == FILTER_CATEGORY)
- {
- main_filters::actual = l_hover;
- ui_menu::stack_push(global_alloc_clear<ui_menu_game_options>(machine(), container));
- }
- else if (l_hover == FILTER_CUSTOM)
- {
- main_filters::actual = l_hover;
- ui_menu::stack_push(global_alloc_clear<ui_menu_custom_filter>(machine(), container, true));
- }
- else if (l_hover == FILTER_MANUFACTURER)
- ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, c_mnfct::ui, c_mnfct::actual, SELECTOR_GAME, l_hover));
- else if (l_hover == FILTER_YEAR)
- ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, c_year::ui, c_year::actual, SELECTOR_GAME, l_hover));
+ // otherwise, display an error
else
{
- if (l_hover >= FILTER_ALL)
- main_filters::actual = l_hover;
- reset(UI_MENU_RESET_SELECT_FIRST);
+ reset(UI_MENU_RESET_REMEMBER_REF);
+ m_error = true;
}
}
}
+
//-------------------------------------------------
-// populate
+// inkey_cancel
//-------------------------------------------------
-void ui_menu_select_game::populate()
+void ui_menu_select_game::inkey_cancel(const ui_menu_event *menu_event)
{
- ui_globals::redraw_icon = true;
- ui_globals::switch_image = true;
- int old_item_selected = -1;
-
- if (!isfavorite())
+ // escape pressed with non-empty text clears the text
+ if (m_search[0] != 0)
{
- // if search is not empty, find approximate matches
- if (m_search[0] != 0 && !isfavorite())
- populate_search();
- else
- {
- // reset search string
- m_search[0] = '\0';
- m_displaylist.clear();
- m_tmp.clear();
+ // since we have already been popped, we must recreate ourself from scratch
+ ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_select_game>(machine(), container, nullptr)));
+ }
+}
- // if filter is set on category, build category list
- switch (main_filters::actual)
- {
- case FILTER_CATEGORY:
- build_category();
- break;
- case FILTER_MANUFACTURER:
- build_list(m_tmp, c_mnfct::ui[c_mnfct::actual].c_str());
- break;
- case FILTER_YEAR:
- build_list(m_tmp, c_year::ui[c_year::actual].c_str());
- break;
- case FILTER_CUSTOM:
- build_custom();
- break;
- default:
- build_list(m_tmp);
- break;
- }
- // iterate over entries
- for (size_t curitem = 0; curitem < m_displaylist.size(); ++curitem)
- {
- 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)
- old_item_selected = curitem;
-
- bool cloneof = strcmp(m_displaylist[curitem]->parent, "0");
- if (cloneof)
- {
- int cx = driver_list::find(m_displaylist[curitem]->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]);
- }
- }
- }
- // populate favorites list
- else
- {
- m_search[0] = '\0';
- int curitem = 0;
- // iterate over entries
- for (auto & mfavorite : machine().favorite().m_list)
- {
- UINT32 flags_ui = MENU_FLAG_UI | MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW | MENU_FLAG_UI_FAVORITE;
- if (mfavorite.startempty == 1)
- {
- if (old_item_selected == -1 && mfavorite.shortname == reselect_last::driver)
- old_item_selected = curitem;
-
- bool cloneof = strcmp(mfavorite.driver->parent, "0");
- if (cloneof)
- {
- int cx = driver_list::find(mfavorite.driver->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(mfavorite.longname.c_str(), nullptr, flags_ui, (void *)&mfavorite);
- }
- else
- {
- if (old_item_selected == -1 && mfavorite.shortname == reselect_last::driver)
- old_item_selected = curitem;
- item_append(mfavorite.longname.c_str(), mfavorite.devicetype.c_str(),
- mfavorite.parentname.empty() ? flags_ui : (MENU_FLAG_INVERT | flags_ui), (void *)&mfavorite);
- }
- curitem++;
- }
- }
+//-------------------------------------------------
+// inkey_special - typed characters append to the buffer
+//-------------------------------------------------
- item_append(MENU_SEPARATOR_ITEM, nullptr, MENU_FLAG_UI, nullptr);
+void ui_menu_select_game::inkey_special(const ui_menu_event *menu_event)
+{
+ // typed characters append to the buffer
+ int buflen = strlen(m_search);
- // add special items
- if (ui_menu::stack_has_special_main_menu())
+ // if it's a backspace and we can handle it, do so
+ if ((menu_event->unichar == 8 || menu_event->unichar == 0x7f) && buflen > 0)
{
- item_append("Configure Options", nullptr, MENU_FLAG_UI, (void *)(FPTR)1);
- item_append("Configure Directories", nullptr, MENU_FLAG_UI, (void *)(FPTR)2);
- item_append("Save Configuration", nullptr, MENU_FLAG_UI, (void *)(FPTR)3);
- skip_main_items = 3;
+ *(char *)utf8_previous_char(&m_search[buflen]) = 0;
+ m_rerandomize = true;
+ reset(UI_MENU_RESET_SELECT_FIRST);
}
- else
- skip_main_items = 0;
-
- // configure the custom rendering
- customtop = 3.0f * machine().ui().get_line_height() + 5.0f * UI_BOX_TB_BORDER;
- custombottom = 5.0f * machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
- // reselect prior game launched, if any
- if (old_item_selected != -1)
+ // if it's any other key and we're not maxed out, update
+ else if (menu_event->unichar >= ' ' && menu_event->unichar < 0x7f)
{
- selected = old_item_selected;
- if (ui_globals::visible_main_lines == 0)
- top_line = (selected != 0) ? selected - 1 : 0;
- else
- top_line = selected - (ui_globals::visible_main_lines / 2);
-
- if (reselect_last::software.empty())
- reselect_last::reset();
+ buflen += utf8_from_uchar(&m_search[buflen], ARRAY_LENGTH(m_search) - buflen, menu_event->unichar);
+ m_search[buflen] = 0;
+ reset(UI_MENU_RESET_SELECT_FIRST);
}
- else
- reselect_last::reset();
}
+
//-------------------------------------------------
-// build a list of available drivers
+// populate - populate the game select menu
//-------------------------------------------------
-void ui_menu_select_game::build_available_list()
+void ui_menu_select_game::populate()
{
- int m_total = driver_list::total();
- std::vector<bool> m_included(m_total, false);
+ int matchcount;
+ int curitem;
+
+ for (curitem = matchcount = 0; m_driverlist[curitem] != nullptr && matchcount < VISIBLE_GAMES_IN_LIST; curitem++)
+ if (!(m_driverlist[curitem]->flags & MACHINE_NO_STANDALONE))
+ matchcount++;
+
+ // if nothing there, add a single multiline item and return
+ if (matchcount == 0)
+ {
+ std::string txt;
+ strprintf(txt, "No %s found. Please check the rompath specified in the %s.ini file.\n\n"
+ "If this is your first time using %s, please see the config.txt file in "
+ "the docs directory for information on configuring %s.",
+ emulator_info::get_gamesnoun(),
+ emulator_info::get_configname(),
+ emulator_info::get_appname(),emulator_info::get_appname() );
+ item_append(txt.c_str(), nullptr, MENU_FLAG_MULTILINE | MENU_FLAG_REDTEXT, nullptr);
+ return;
+ }
- // open a path to the ROMs and find them in the array
- file_enumerator path(machine().options().media_path());
- const osd_directory_entry *dir;
+ // otherwise, rebuild the match list
+ assert(m_drivlist != nullptr);
+ if (m_search[0] != 0 || m_matchlist[0] == -1 || m_rerandomize)
+ m_drivlist->find_approximate_matches(m_search, matchcount, m_matchlist);
+ m_rerandomize = false;
- // iterate while we get new objects
- while ((dir = path.next()) != nullptr)
+ // iterate over entries
+ for (curitem = 0; curitem < matchcount; curitem++)
{
- char drivername[50];
- char *dst = drivername;
- const char *src;
-
- // build a name for it
- for (src = dir->name; *src != 0 && *src != '.' && dst < &drivername[ARRAY_LENGTH(drivername) - 1]; ++src)
- *dst++ = tolower((UINT8) * src);
-
- *dst = 0;
- int drivnum = driver_list::find(drivername);
- if (drivnum != -1 && !m_included[drivnum])
+ int curmatch = m_matchlist[curitem];
+ if (curmatch != -1)
{
- m_availsortedlist.push_back(&driver_list::driver(drivnum));
- m_included[drivnum] = true;
+ int cloneof = m_drivlist->non_bios_clone(curmatch);
+ item_append(m_drivlist->driver(curmatch).name, m_drivlist->driver(curmatch).description, (cloneof == -1) ? 0 : MENU_FLAG_INVERT, (void *)&m_drivlist->driver(curmatch));
}
}
- // now check and include NONE_NEEDED
- for (int x = 0; x < m_total; ++x)
- if (!m_included[x])
- {
- if (&driver_list::driver(x) == &GAME_NAME(___empty))
- continue;
-
- const rom_entry *rom = driver_list::driver(x).rom;
- if (ROMENTRY_ISREGION(rom) && ROMENTRY_ISEND(++rom))
- {
- m_availsortedlist.push_back(&driver_list::driver(x));
- m_included[x] = true;
- }
- }
-
- // sort
- std::stable_sort(m_availsortedlist.begin(), m_availsortedlist.end(), sort_game_list);
-
- // now build the unavailable list
- for (int x = 0; x < m_total; ++x)
- if (!m_included[x] && &driver_list::driver(x) != &GAME_NAME(___empty))
- m_unavailsortedlist.push_back(&driver_list::driver(x));
+ // if we're forced into this, allow general input configuration as well
+ if (ui_menu::stack_has_special_main_menu())
+ {
+ item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
+ item_append("Configure General Inputs", nullptr, 0, (void *)1);
+ }
- // sort
- std::stable_sort(m_unavailsortedlist.begin(), m_unavailsortedlist.end(), sort_game_list);
+ // configure the custom rendering
+ customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
+ custombottom = 4.0f * machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
}
+
//-------------------------------------------------
-// perform our special rendering
+// custom_render - perform our special rendering
//-------------------------------------------------
void ui_menu_select_game::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
{
- const game_driver *driver = nullptr;
- ui_software_info *swinfo = nullptr;
- float width, maxwidth = origx2 - origx1;
+ const game_driver *driver;
+ float width, maxwidth;
+ float x1, y1, x2, y2;
std::string tempbuf[5];
- rgb_t color = UI_BACKGROUND_COLOR;
- bool isstar = false;
- ui_manager &mui = machine().ui();
- float tbarspace = mui.get_line_height();
-
- strprintf(tempbuf[0], "MAME %s ( %d / %d machines (%d BIOS) )", bare_build_version, visible_items, (driver_list::total() - 1), m_isabios);
- std::string filtered;
-
- if (main_filters::actual == FILTER_CATEGORY && !machine().inifile().ini_index.empty())
- {
- std::string s_file(machine().inifile().actual_file());
- std::string s_category(machine().inifile().actual_category());
- filtered.assign(main_filters::text[main_filters::actual]).append(" (").append(s_file).append(" - ").append(s_category).append(") -");
- }
-
- else if (main_filters::actual == FILTER_MANUFACTURER)
- filtered.assign(main_filters::text[main_filters::actual]).append(" (").append(c_mnfct::ui[c_mnfct::actual]).append(") -");
-
- else if (main_filters::actual == FILTER_YEAR)
- filtered.assign(main_filters::text[main_filters::actual]).append(" (").append(c_year::ui[c_year::actual]).append(") -");
+ rgb_t color;
+ int line;
// display the current typeahead
- if (isfavorite())
- tempbuf[1].clear();
+ if (m_search[0] != 0)
+ strprintf(tempbuf[0], "Type name or select: %s_", m_search);
else
- tempbuf[1].assign(filtered).append(" Search: ").append(m_search).append("_");
+ strprintf(tempbuf[0],"Type name or select: (random)");
// get the size of the text
- for (int line = 0; line < 2; ++line)
- {
- mui.draw_text_full(container, tempbuf[line].c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += 2 * UI_BOX_LR_BORDER;
- maxwidth = MAX(width, maxwidth);
- }
+ machine().ui().draw_text_full(container, tempbuf[0].c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
+ DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
+ width += 2 * UI_BOX_LR_BORDER;
+ maxwidth = MAX(width, origx2 - origx1);
// compute our bounds
- float x1 = 0.5f - 0.5f * maxwidth;
- float x2 = x1 + maxwidth;
- float y1 = origy1 - top;
- float y2 = origy1 - 3.0f * UI_BOX_TB_BORDER - tbarspace;
+ x1 = 0.5f - 0.5f * maxwidth;
+ x2 = x1 + maxwidth;
+ y1 = origy1 - top;
+ y2 = origy1 - UI_BOX_TB_BORDER;
// draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR);
+ machine().ui().draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR);
// take off the borders
x1 += UI_BOX_LR_BORDER;
@@ -769,135 +309,78 @@ void ui_menu_select_game::custom_render(void *selectedref, float top, float bott
y1 += UI_BOX_TB_BORDER;
// draw the text within it
- for (int line = 0; line < 2; ++line)
- {
- mui.draw_text_full(container, tempbuf[line].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
- y1 += mui.get_line_height();
- }
+ machine().ui().draw_text_full(container, tempbuf[0].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
+ DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
// determine the text to render below
- if (!isfavorite())
- driver = ((FPTR)selectedref > skip_main_items) ? (const game_driver *)selectedref : nullptr;
- else
- {
- swinfo = ((FPTR)selectedref > skip_main_items) ? (ui_software_info *)selectedref : nullptr;
- if (swinfo && swinfo->startempty == 1)
- driver = swinfo->driver;
- }
-
- if ((FPTR)driver > 3)
+ driver = ((FPTR)selectedref > 1) ? (const game_driver *)selectedref : nullptr;
+ if ((FPTR)driver > 1)
{
- isstar = machine().favorite().isgame_favorite(driver);
+ const char *gfxstat, *soundstat;
// first line is game name
- strprintf(tempbuf[0], "Romset: %-.100s", driver->name);
+ strprintf(tempbuf[0],"%-.100s", driver->description);
// next line is year, manufacturer
strprintf(tempbuf[1], "%s, %-.100s", driver->year, driver->manufacturer);
- // next line is clone/parent status
- int cloneof = driver_list::non_bios_clone(*driver);
-
- if (cloneof != -1)
- strprintf(tempbuf[2], "Driver is clone of: %-.100s", driver_list::driver(cloneof).description);
- else
- tempbuf[2] = "Driver is parent";
+ // next line source path
+ strprintf(tempbuf[2],"Driver: %-.100s", core_filename_extract_base(driver->source_file).c_str());
// next line is overall driver status
if (driver->flags & MACHINE_NOT_WORKING)
- tempbuf[3] = "Overall: NOT WORKING";
+ tempbuf[3].assign("Overall: NOT WORKING");
else if (driver->flags & MACHINE_UNEMULATED_PROTECTION)
- tempbuf[3] = "Overall: Unemulated Protection";
+ tempbuf[3].assign("Overall: Unemulated Protection");
else
- tempbuf[3] = "Overall: Working";
+ tempbuf[3].assign("Overall: Working");
// next line is graphics, sound status
if (driver->flags & (MACHINE_IMPERFECT_GRAPHICS | MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_COLORS))
- tempbuf[4] = "Graphics: Imperfect, ";
+ gfxstat = "Imperfect";
else
- tempbuf[4] = "Graphics: OK, ";
+ gfxstat = "OK";
if (driver->flags & MACHINE_NO_SOUND)
- tempbuf[4].append("Sound: Unimplemented");
+ soundstat = "Unimplemented";
else if (driver->flags & MACHINE_IMPERFECT_SOUND)
- tempbuf[4].append("Sound: Imperfect");
+ soundstat = "Imperfect";
else
- tempbuf[4].append("Sound: OK");
+ soundstat = "OK";
- color = UI_GREEN_COLOR;
-
- if ((driver->flags & (MACHINE_IMPERFECT_GRAPHICS | MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_COLORS
- | MACHINE_NO_SOUND | MACHINE_IMPERFECT_SOUND)) != 0)
- color = UI_YELLOW_COLOR;
-
- if ((driver->flags & (MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION)) != 0)
- color = UI_RED_COLOR;
+ strprintf(tempbuf[4], "Gfx: %s, Sound: %s", gfxstat, soundstat);
}
-
- else if ((FPTR)swinfo > 3)
+ else
{
- isstar = machine().favorite().isgame_favorite(*swinfo);
-
- // first line is system
- strprintf(tempbuf[0], "System: %-.100s", swinfo->driver->description);
+ const char *s = emulator_info::get_copyright();
+ line = 0;
- // next line is year, publisher
- strprintf(tempbuf[1], "%s, %-.100s", swinfo->year.c_str(), swinfo->publisher.c_str());
+ // first line is version string
+ strprintf(tempbuf[line++], "%s %s", emulator_info::get_appname(), build_version);
- // next line is parent/clone
- if (!swinfo->parentname.empty())
- strprintf(tempbuf[2], "Software is clone of: %-.100s", !swinfo->parentlongname.empty() ? swinfo->parentlongname.c_str() : swinfo->parentname.c_str());
- else
- tempbuf[2] = "Software is parent";
-
- // next line is supported status
- if (swinfo->supported == SOFTWARE_SUPPORTED_NO)
- {
- tempbuf[3] = "Supported: No";
- color = UI_RED_COLOR;
- }
- else if (swinfo->supported == SOFTWARE_SUPPORTED_PARTIAL)
+ // output message
+ while (line < ARRAY_LENGTH(tempbuf))
{
- tempbuf[3] = "Supported: Partial";
- color = UI_YELLOW_COLOR;
- }
- else
- {
- tempbuf[3] = "Supported: Yes";
- color = UI_GREEN_COLOR;
- }
+ if (!(*s == 0 || *s == '\n'))
+ tempbuf[line].push_back(*s);
- // last line is romset name
- strprintf(tempbuf[4], "romset: %-.100s", swinfo->shortname.c_str());
- }
- else
- {
- std::string copyright(emulator_info::get_copyright());
- size_t found = copyright.find("\n");
- tempbuf[0].clear();
- tempbuf[1].assign(emulator_info::get_appname()).append(" ").append(build_version);
- tempbuf[2] = copyright.substr(0, found);
- tempbuf[3] = copyright.substr(found + 1);
- tempbuf[4].clear();
+ if (*s == '\n')
+ {
+ line++;
+ s++;
+ } else if (*s != 0)
+ s++;
+ else
+ line++;
+ }
}
- // compute our bounds
- x1 = 0.5f - 0.5f * maxwidth;
- x2 = x1 + maxwidth;
- y1 = y2;
- y2 = origy1 - UI_BOX_TB_BORDER;
-
- // draw toolbar
- draw_toolbar(x1, y1, x2, y2);
-
// get the size of the text
maxwidth = origx2 - origx1;
-
- for (auto & elem : tempbuf)
+ for (line = 0; line < 4; line++)
{
- mui.draw_text_full(container, elem.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
+ machine().ui().draw_text_full(container, tempbuf[line].c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
+ DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
width += 2 * UI_BOX_LR_BORDER;
maxwidth = MAX(maxwidth, width);
}
@@ -909,41 +392,47 @@ void ui_menu_select_game::custom_render(void *selectedref, float top, float bott
y2 = origy2 + bottom;
// draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, color);
+ color = UI_BACKGROUND_COLOR;
+ if (driver != nullptr)
+ color = UI_GREEN_COLOR;
+ if (driver != nullptr && (driver->flags & (MACHINE_IMPERFECT_GRAPHICS | MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_COLORS | MACHINE_NO_SOUND | MACHINE_IMPERFECT_SOUND)) != 0)
+ color = UI_YELLOW_COLOR;
+ if (driver != nullptr && (driver->flags & (MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION)) != 0)
+ color = UI_RED_COLOR;
+ machine().ui().draw_outlined_box(container, x1, y1, x2, y2, color);
// take off the borders
x1 += UI_BOX_LR_BORDER;
x2 -= UI_BOX_LR_BORDER;
y1 += UI_BOX_TB_BORDER;
- // is favorite? draw the star
- if (isstar)
- draw_star(x1, y1);
-
// draw all lines
- for (auto & elem : tempbuf)
+ for (line = 0; line < 4; line++)
{
- mui.draw_text_full(container, elem.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
- y1 += mui.get_line_height();
+ machine().ui().draw_text_full(container, tempbuf[line].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
+ DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
+ y1 += machine().ui().get_line_height();
}
}
+
//-------------------------------------------------
-// force the game select menu to be visible
-// and inescapable
+// force_game_select - force the game
+// select menu to be visible and inescapable
//-------------------------------------------------
void ui_menu_select_game::force_game_select(running_machine &machine, render_container *container)
{
+ char *gamename = (char *)machine.options().system_name();
+
// reset the menu stack
ui_menu::stack_reset(machine);
// add the quit entry followed by the game select entry
- ui_menu *quit = global_alloc_clear<ui_menu_quit_game>(machine, container);
+ ui_menu *quit = auto_alloc_clear(machine, <ui_menu_quit_game>(machine, container));
quit->set_special_main_menu(true);
ui_menu::stack_push(quit);
- ui_menu::stack_push(global_alloc_clear<ui_menu_select_game>(machine, container, nullptr));
+ ui_menu::stack_push(auto_alloc_clear(machine, <ui_menu_select_game>(machine, container, gamename)));
// force the menus on
machine.ui().show_menu();
@@ -951,1421 +440,3 @@ void ui_menu_select_game::force_game_select(running_machine &machine, render_con
// make sure MAME is paused
machine.pause();
}
-
-//-------------------------------------------------
-// handle select key event
-//-------------------------------------------------
-
-void ui_menu_select_game::inkey_select(const ui_menu_event *m_event)
-{
- const game_driver *driver = (const game_driver *)m_event->itemref;
-
- // special case for configure options
- if ((FPTR)driver == 1)
- ui_menu::stack_push(global_alloc_clear<ui_menu_game_options>(machine(), container));
- // special case for configure directory
- else if ((FPTR)driver == 2)
- ui_menu::stack_push(global_alloc_clear<ui_menu_directory>(machine(), container));
- // anything else is a driver
- else if ((FPTR)driver == 3) {
- save_main_option(machine());
- }
- // anything else is a driver
- else
- {
- // audit the game first to see if we're going to work
- driver_enumerator enumerator(machine().options(), *driver);
- enumerator.next();
- media_auditor auditor(enumerator);
- media_auditor::summary summary = auditor.audit_media(AUDIT_VALIDATE_FAST);
-
- // if everything looks good, schedule the new driver
- if (summary == media_auditor::CORRECT || summary == media_auditor::BEST_AVAILABLE || summary == media_auditor::NONE_NEEDED)
- {
- if ((driver->flags & MACHINE_TYPE_ARCADE) == 0)
- {
- software_list_device_iterator iter(enumerator.config().root_device());
- for (software_list_device *swlistdev = iter.first(); swlistdev != nullptr; swlistdev = iter.next())
- if (swlistdev->first_software_info() != nullptr)
- {
- ui_menu::stack_push(global_alloc_clear<ui_menu_select_software>(machine(), container, driver));
- return;
- }
- }
-
- std::vector<s_bios> biosname;
- if (!machine().ui().options().skip_bios_menu() && has_multiple_bios(driver, biosname))
- ui_menu::stack_push(global_alloc_clear<ui_bios_selection>(machine(), container, biosname, (void *)driver, false, false));
- else
- {
- reselect_last::driver = driver->name;
- reselect_last::software.clear();
- reselect_last::swlist.clear();
- machine().manager().schedule_new_driver(*driver);
- machine().schedule_hard_reset();
- ui_menu::stack_reset(machine());
- }
- }
- // otherwise, display an error
- else
- {
- reset(UI_MENU_RESET_REMEMBER_REF);
- ui_error = true;
- }
- }
-}
-
-//-------------------------------------------------
-// handle select key event for favorites menu
-//-------------------------------------------------
-
-void ui_menu_select_game::inkey_select_favorite(const ui_menu_event *m_event)
-{
- ui_software_info *ui_swinfo = (ui_software_info *)m_event->itemref;
- ui_options &mopt = machine().ui().options();
-
- // special case for configure options
- if ((FPTR)ui_swinfo == 1)
- ui_menu::stack_push(global_alloc_clear<ui_menu_game_options>(machine(), container));
-
- // special case for configure directory
- else if ((FPTR)ui_swinfo == 2)
- ui_menu::stack_push(global_alloc_clear<ui_menu_directory>(machine(), container));
- else if ((FPTR)ui_swinfo == 3)
- {
- save_main_option(machine());
- }
- else if (ui_swinfo->startempty == 1)
- {
- // audit the game first to see if we're going to work
- driver_enumerator enumerator(machine().options(), *ui_swinfo->driver);
- enumerator.next();
- media_auditor auditor(enumerator);
- media_auditor::summary summary = auditor.audit_media(AUDIT_VALIDATE_FAST);
-
- // if everything looks good, schedule the new driver
- if (summary == media_auditor::CORRECT || summary == media_auditor::BEST_AVAILABLE || summary == media_auditor::NONE_NEEDED)
- {
- std::vector<s_bios> biosname;
- if (!mopt.skip_bios_menu() && has_multiple_bios(ui_swinfo->driver, biosname))
- ui_menu::stack_push(global_alloc_clear<ui_bios_selection>(machine(), container, biosname, (void *)ui_swinfo->driver, false, false));
- else
- {
- reselect_last::driver = ui_swinfo->driver->name;
- reselect_last::software.clear();
- reselect_last::swlist.clear();
- reselect_last::set(true);
- machine().manager().schedule_new_driver(*ui_swinfo->driver);
- machine().schedule_hard_reset();
- ui_menu::stack_reset(machine());
- }
- }
-
- // otherwise, display an error
- else
- {
- reset(UI_MENU_RESET_REMEMBER_REF);
- ui_error = true;
- }
- }
- else
- {
- // first validate
- driver_enumerator drv(machine().options(), *ui_swinfo->driver);
- media_auditor auditor(drv);
- drv.next();
- software_list_device *swlist = software_list_device::find_by_name(drv.config(), ui_swinfo->listname.c_str());
- software_info *swinfo = swlist->find(ui_swinfo->shortname.c_str());
- media_auditor::summary summary = auditor.audit_software(swlist->list_name(), swinfo, AUDIT_VALIDATE_FAST);
- if (summary == media_auditor::CORRECT || summary == media_auditor::BEST_AVAILABLE || summary == media_auditor::NONE_NEEDED)
- {
- std::vector<s_bios> biosname;
- if (!mopt.skip_bios_menu() && has_multiple_bios(ui_swinfo->driver, biosname))
- {
- ui_menu::stack_push(global_alloc_clear<ui_bios_selection>(machine(), container, biosname, (void *)ui_swinfo, true, false));
- return;
- }
- else if (!mopt.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())
- {
- if (swpart->matches_interface(ui_swinfo->interface.c_str()))
- {
- std::string menu_part_name(swpart->name());
- if (swpart->feature("part_id") != nullptr)
- menu_part_name.assign("(").append(swpart->feature("part_id")).append(")");
- parts.emplace(swpart->name(), menu_part_name);
- }
- }
- ui_menu::stack_push(global_alloc_clear<ui_software_parts>(machine(), container, parts, ui_swinfo));
- return;
- }
-
- std::string error_string;
- std::string string_list = std::string(ui_swinfo->listname).append(":").append(ui_swinfo->shortname).append(":").append(ui_swinfo->part).append(":").append(ui_swinfo->instance);
- mopt.set_value(OPTION_SOFTWARENAME, string_list.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
- std::string snap_list = std::string(ui_swinfo->listname).append(PATH_SEPARATOR).append(ui_swinfo->shortname);
- mopt.set_value(OPTION_SNAPNAME, snap_list.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
- reselect_last::driver = drv.driver().name;
- reselect_last::software = ui_swinfo->shortname;
- reselect_last::swlist = ui_swinfo->listname;
- machine().manager().schedule_new_driver(drv.driver());
- machine().schedule_hard_reset();
- ui_menu::stack_reset(machine());
- }
- // otherwise, display an error
- else
- {
- reset(UI_MENU_RESET_REMEMBER_POSITION);
- ui_error = true;
- }
- }
-}
-
-//-------------------------------------------------
-// returns if the search can be activated
-//-------------------------------------------------
-
-inline bool ui_menu_select_game::isfavorite()
-{
- return (main_filters::actual == FILTER_FAVORITE);
-}
-
-//-------------------------------------------------
-// handle special key event
-//-------------------------------------------------
-
-void ui_menu_select_game::inkey_special(const ui_menu_event *m_event)
-{
- int buflen = strlen(m_search);
-
- // if it's a backspace and we can handle it, do so
- if (((m_event->unichar == 8 || m_event->unichar == 0x7f) && buflen > 0) && !isfavorite())
- {
- *(char *)utf8_previous_char(&m_search[buflen]) = 0;
- reset(UI_MENU_RESET_SELECT_FIRST);
- }
-
- // if it's any other key and we're not maxed out, update
- else if ((m_event->unichar >= ' ' && m_event->unichar < 0x7f) && !isfavorite())
- {
- buflen += utf8_from_uchar(&m_search[buflen], ARRAY_LENGTH(m_search) - buflen, m_event->unichar);
- m_search[buflen] = 0;
- reset(UI_MENU_RESET_SELECT_FIRST);
- }
-
- // Tab key
- else if (m_event->unichar == 0x09)
- {
- // if the selection is in the main screen, save and go to submenu
- if (selected <= visible_items)
- {
- m_prev_selected = selected;
- selected = visible_items + 1;
- }
-
- // otherwise, retrieve the previous position
- else
- selected = m_prev_selected;
- }
-}
-
-//-------------------------------------------------
-// build list
-//-------------------------------------------------
-
-void ui_menu_select_game::build_list(std::vector<const game_driver *> &s_drivers, const char *filter_text, int filter, bool bioscheck)
-{
- int cx = 0;
- bool cloneof = false;
-
- if (s_drivers.empty())
- {
- filter = main_filters::actual;
- if (filter == FILTER_AVAILABLE)
- s_drivers = m_availsortedlist;
- else if (filter == FILTER_UNAVAILABLE)
- s_drivers = m_unavailsortedlist;
- else
- s_drivers = m_sortedlist;
- }
-
- for (auto & s_driver : s_drivers)
- {
- if (!bioscheck && filter != FILTER_BIOS && (s_driver->flags & MACHINE_IS_BIOS_ROOT) != 0)
- continue;
-
- switch (filter)
- {
- case FILTER_ALL:
- case FILTER_AVAILABLE:
- case FILTER_UNAVAILABLE:
- m_displaylist.push_back(s_driver);
- break;
-
- case FILTER_WORKING:
- if (!(s_driver->flags & MACHINE_NOT_WORKING))
- m_displaylist.push_back(s_driver);
- break;
-
- case FILTER_NOT_MECHANICAL:
- if (!(s_driver->flags & MACHINE_MECHANICAL))
- m_displaylist.push_back(s_driver);
- break;
-
- case FILTER_BIOS:
- if (s_driver->flags & MACHINE_IS_BIOS_ROOT)
- m_displaylist.push_back(s_driver);
- break;
-
- case FILTER_PARENT:
- case FILTER_CLONES:
- cloneof = strcmp(s_driver->parent, "0");
- if (cloneof)
- {
- cx = driver_list::find(s_driver->parent);
- if (cx != -1 && ((driver_list::driver(cx).flags & MACHINE_IS_BIOS_ROOT) != 0))
- cloneof = false;
- }
-
- if (filter == FILTER_CLONES && cloneof)
- m_displaylist.push_back(s_driver);
- else if (filter == FILTER_PARENT && !cloneof)
- m_displaylist.push_back(s_driver);
- break;
-
- case FILTER_NOT_WORKING:
- if (s_driver->flags & MACHINE_NOT_WORKING)
- m_displaylist.push_back(s_driver);
- break;
-
- case FILTER_MECHANICAL:
- if (s_driver->flags & MACHINE_MECHANICAL)
- m_displaylist.push_back(s_driver);
- break;
-
- case FILTER_SAVE:
- if (s_driver->flags & MACHINE_SUPPORTS_SAVE)
- m_displaylist.push_back(s_driver);
- break;
-
- case FILTER_NOSAVE:
- if (!(s_driver->flags & MACHINE_SUPPORTS_SAVE))
- m_displaylist.push_back(s_driver);
- break;
-
- case FILTER_YEAR:
- if (!core_stricmp(filter_text, s_driver->year))
- m_displaylist.push_back(s_driver);
- break;
-
- case FILTER_VERTICAL:
- if (s_driver->flags & ORIENTATION_SWAP_XY)
- m_displaylist.push_back(s_driver);
- break;
-
- case FILTER_HORIZONTAL:
- if (!(s_driver->flags & ORIENTATION_SWAP_XY))
- m_displaylist.push_back(s_driver);
- break;
-
- case FILTER_MANUFACTURER:
- {
- std::string name = c_mnfct::getname(s_driver->manufacturer);
- if (!core_stricmp(filter_text, name.c_str()))
- m_displaylist.push_back(s_driver);
- break;
- }
- case FILTER_CHD:
- for (const rom_entry *rom = s_driver->rom; !ROMENTRY_ISEND(rom); ++rom)
- if (ROMENTRY_ISREGION(rom) && ROMREGION_ISDISKDATA(rom))
- {
- m_displaylist.push_back(s_driver);
- break;
- }
- break;
- case FILTER_NOCHD:
- {
- bool found = false;
- for (const rom_entry *rom = s_driver->rom; !ROMENTRY_ISEND(rom); ++rom)
- if (ROMENTRY_ISREGION(rom) && ROMREGION_ISDISKDATA(rom))
- {
- found = true;
- break;
- }
- if (!found)
- m_displaylist.push_back(s_driver);
- break;
- }
- }
- }
-}
-
-//-------------------------------------------------
-// build custom display list
-//-------------------------------------------------
-
-void ui_menu_select_game::build_custom()
-{
- std::vector<const game_driver *> s_drivers;
- bool bioscheck = false;
-
- if (custfltr::main == FILTER_AVAILABLE)
- s_drivers = m_availsortedlist;
- else if (custfltr::main == FILTER_UNAVAILABLE)
- s_drivers = m_unavailsortedlist;
- else
- s_drivers = m_sortedlist;
-
- for (auto & elem : s_drivers)
- {
- m_displaylist.push_back(elem);
- }
-
- for (int count = 1; count <= custfltr::numother; ++count)
- {
- int filter = custfltr::other[count];
- if (filter == FILTER_BIOS)
- bioscheck = true;
- }
-
- for (int count = 1; count <= custfltr::numother; ++count)
- {
- int filter = custfltr::other[count];
- s_drivers = m_displaylist;
- m_displaylist.clear();
-
- switch (filter)
- {
- case FILTER_YEAR:
- build_list(s_drivers, c_year::ui[custfltr::year[count]].c_str(), filter, bioscheck);
- break;
- case FILTER_MANUFACTURER:
- build_list(s_drivers, c_mnfct::ui[custfltr::mnfct[count]].c_str(), filter, bioscheck);
- break;
- default:
- build_list(s_drivers, nullptr, filter, bioscheck);
- break;
- }
- }
-}
-
-//-------------------------------------------------
-// build category list
-//-------------------------------------------------
-
-void ui_menu_select_game::build_category()
-{
- std::vector<int> temp_filter;
- machine().inifile().load_ini_category(temp_filter);
-
- for (auto actual : temp_filter)
- m_tmp.push_back(&driver_list::driver(actual));
-
- std::stable_sort(m_tmp.begin(), m_tmp.end(), sort_game_list);
- m_displaylist = m_tmp;
-}
-
-//-------------------------------------------------
-// populate search list
-//-------------------------------------------------
-
-void ui_menu_select_game::populate_search()
-{
- // allocate memory to track the penalty value
- std::vector<int> penalty(VISIBLE_GAMES_IN_SEARCH, 9999);
- int index = 0;
- for (; index < m_displaylist.size(); ++index)
- {
- // pick the best match between driver name and description
- int curpenalty = fuzzy_substring(m_search, m_displaylist[index]->description);
- int tmp = fuzzy_substring(m_search, m_displaylist[index]->name);
- curpenalty = MIN(curpenalty, tmp);
-
- // insert into the sorted table of matches
- for (int matchnum = VISIBLE_GAMES_IN_SEARCH - 1; matchnum >= 0; --matchnum)
- {
- // stop if we're worse than the current entry
- if (curpenalty >= penalty[matchnum])
- break;
-
- // as long as this isn't the last entry, bump this one down
- if (matchnum < VISIBLE_GAMES_IN_SEARCH - 1)
- {
- penalty[matchnum + 1] = penalty[matchnum];
- m_searchlist[matchnum + 1] = m_searchlist[matchnum];
- }
-
- m_searchlist[matchnum] = m_displaylist[index];
- penalty[matchnum] = curpenalty;
- }
- }
-
- (index < VISIBLE_GAMES_IN_SEARCH) ? m_searchlist[index] = nullptr : m_searchlist[VISIBLE_GAMES_IN_SEARCH] = nullptr;
- UINT32 flags_ui = MENU_FLAG_UI | MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW;
- for (int curitem = 0; m_searchlist[curitem]; ++curitem)
- {
- bool cloneof = strcmp(m_searchlist[curitem]->parent, "0");
- if (cloneof)
- {
- int cx = driver_list::find(m_searchlist[curitem]->parent);
- if (cx != -1 && ((driver_list::driver(cx).flags & MACHINE_IS_BIOS_ROOT) != 0))
- cloneof = false;
- }
- item_append(m_searchlist[curitem]->description, nullptr, (!cloneof) ? flags_ui : (MENU_FLAG_INVERT | flags_ui),
- (void *)m_searchlist[curitem]);
- }
-}
-
-//-------------------------------------------------
-// generate general info
-//-------------------------------------------------
-
-void ui_menu_select_game::general_info(const game_driver *driver, std::string &buffer)
-{
- strprintf(buffer, "Romset: %-.100s\n", driver->name);
- buffer.append("Year: ").append(driver->year).append("\n");
- strcatprintf(buffer, "Manufacturer: %-.100s\n", driver->manufacturer);
-
- int cloneof = driver_list::non_bios_clone(*driver);
- if (cloneof != -1)
- strcatprintf(buffer, "Driver is Clone of: %-.100s\n", driver_list::driver(cloneof).description);
- else
- buffer.append("Driver is Parent\n");
-
- if (driver->flags & MACHINE_NOT_WORKING)
- buffer.append("Overall: NOT WORKING\n");
- else if (driver->flags & MACHINE_UNEMULATED_PROTECTION)
- buffer.append("Overall: Unemulated Protection\n");
- else
- buffer.append("Overall: Working\n");
-
- if (driver->flags & MACHINE_IMPERFECT_COLORS)
- buffer.append("Graphics: Imperfect Colors\n");
- else if (driver->flags & MACHINE_WRONG_COLORS)
- buffer.append("Graphics: Wrong Colors\n");
- else if (driver->flags & MACHINE_IMPERFECT_GRAPHICS)
- buffer.append("Graphics: Imperfect\n");
- else
- buffer.append("Graphics: OK\n");
-
- if (driver->flags & MACHINE_NO_SOUND)
- buffer.append("Sound: Unimplemented\n");
- else if (driver->flags & MACHINE_IMPERFECT_SOUND)
- buffer.append("Sound: Imperfect\n");
- else
- buffer.append("Sound: OK\n");
-
- strcatprintf(buffer, "Driver is Skeleton: %s\n", ((driver->flags & MACHINE_IS_SKELETON) ? "Yes" : "No"));
- strcatprintf(buffer, "Game is Mechanical: %s\n", ((driver->flags & MACHINE_MECHANICAL) ? "Yes" : "No"));
- strcatprintf(buffer, "Requires Artwork: %s\n", ((driver->flags & MACHINE_REQUIRES_ARTWORK) ? "Yes" : "No"));
- strcatprintf(buffer, "Requires Clickable Artwork: %s\n", ((driver->flags & MACHINE_CLICKABLE_ARTWORK) ? "Yes" : "No"));
- strcatprintf(buffer, "Support Cocktail: %s\n", ((driver->flags & MACHINE_NO_COCKTAIL) ? "Yes" : "No"));
- strcatprintf(buffer, "Driver is Bios: %s\n", ((driver->flags & MACHINE_IS_BIOS_ROOT) ? "Yes" : "No"));
- strcatprintf(buffer, "Support Save: %s\n", ((driver->flags & MACHINE_SUPPORTS_SAVE) ? "Yes" : "No"));
- strcatprintf(buffer, "Screen Orentation: %s\n", ((driver->flags & ORIENTATION_SWAP_XY) ? "Vertical" : "Horizontal"));
- bool found = false;
- for (const rom_entry *rom = driver->rom; !ROMENTRY_ISEND(rom); ++rom)
- if (ROMENTRY_ISREGION(rom) && ROMREGION_ISDISKDATA(rom))
- {
- found = true;
- break;
- }
- strcatprintf(buffer, "Requires CHD: %s\n", (found ? "Yes" : "No"));
-
- // audit the game first to see if we're going to work
- if (machine().ui().options().info_audit())
- {
- driver_enumerator enumerator(machine().options(), *driver);
- enumerator.next();
- media_auditor auditor(enumerator);
- media_auditor::summary summary = auditor.audit_media(AUDIT_VALIDATE_FAST);
- media_auditor::summary summary_samples = auditor.audit_samples();
-
- // if everything looks good, schedule the new driver
- if (summary == media_auditor::CORRECT || summary == media_auditor::BEST_AVAILABLE || summary == media_auditor::NONE_NEEDED)
- buffer.append("Roms Audit Pass: OK\n");
- else
- buffer.append("Roms Audit Pass: BAD\n");
-
- if (summary_samples == media_auditor::NONE_NEEDED)
- buffer.append("Samples Audit Pass: None Needed\n");
- else if (summary_samples == media_auditor::CORRECT || summary_samples == media_auditor::BEST_AVAILABLE)
- buffer.append("Samples Audit Pass: OK\n");
- else
- buffer.append("Samples Audit Pass: BAD\n");
- }
- else
- buffer.append("Roms Audit Pass: Disabled\nSamples Audit Pass: Disabled\n");
-}
-
-void ui_menu_select_game::inkey_export()
-{
- std::string filename("exported");
- emu_file infile(machine().ui().options().ui_path(), OPEN_FLAG_READ);
- if (infile.open(filename.c_str(), ".xml") == FILERR_NONE)
- for (int seq = 0; ; ++seq)
- {
- std::string seqtext;
- strprintf(seqtext, "%s_%04d", filename.c_str(), seq);
- if (infile.open(seqtext.c_str(), ".xml") != FILERR_NONE)
- {
- filename = seqtext;
- break;
- }
- }
-
- // attempt to open the output file
- emu_file file(machine().ui().options().ui_path(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
- if (file.open(filename.c_str(), ".xml") == FILERR_NONE)
- {
- FILE *pfile;
- std::string fullpath(file.fullpath());
- file.close();
- pfile = fopen(fullpath.c_str() , "w");
- driver_enumerator drivlist(machine().options());
- drivlist.exclude_all();
-
- if (m_search[0] != 0)
- {
- for (int curitem = 0; m_searchlist[curitem]; ++curitem)
- {
- int f = driver_list::find(m_searchlist[curitem]->name);
- drivlist.include(f);
- }
- }
- else
- {
- for (auto & elem : m_displaylist)
- {
- int f = driver_list::find(elem->name);
- drivlist.include(f);
- }
- }
-
- // create the XML and save to file
- info_xml_creator creator(drivlist);
- creator.output(pfile, false);
- fclose(pfile);
- machine().popmessage("%s.xml saved under ui folder.", filename.c_str());
- }
-}
-
-//-------------------------------------------------
-// save drivers infos to file
-//-------------------------------------------------
-
-void ui_menu_select_game::init_sorted_list()
-{
- if (!m_sortedlist.empty())
- return;
-
- // generate full list
- for (int x = 0; x < driver_list::total(); ++x)
- {
- const game_driver *driver = &driver_list::driver(x);
- if (driver == &GAME_NAME(___empty))
- continue;
- if (driver->flags & MACHINE_IS_BIOS_ROOT)
- m_isabios++;
-
- m_sortedlist.push_back(driver);
- c_mnfct::set(driver->manufacturer);
- c_year::set(driver->year);
- }
-
- // sort manufacturers - years and driver
- std::stable_sort(c_mnfct::ui.begin(), c_mnfct::ui.end());
- std::stable_sort(c_year::ui.begin(), c_year::ui.end());
- std::stable_sort(m_sortedlist.begin(), m_sortedlist.end(), sort_game_list);
-}
-
-//-------------------------------------------------
-// load drivers infos from file
-//-------------------------------------------------
-
-bool ui_menu_select_game::load_available_machines()
-{
- // try to load available drivers from file
- emu_file file(machine().ui().options().ui_path(), OPEN_FLAG_READ);
- if (file.open(emulator_info::get_configname(), "_avail.ini") != FILERR_NONE)
- return false;
-
- std::string readbuf;
- char rbuf[MAX_CHAR_INFO];
- file.gets(rbuf, MAX_CHAR_INFO);
- file.gets(rbuf, MAX_CHAR_INFO);
- readbuf = chartrimcarriage(rbuf);
- std::string a_rev = std::string(UI_VERSION_TAG).append(bare_build_version);
-
- // version not matching ? exit
- if (a_rev != readbuf)
- {
- file.close();
- return false;
- }
-
- file.gets(rbuf, MAX_CHAR_INFO);
- file.gets(rbuf, MAX_CHAR_INFO);
- int avsize = 0, unavsize = 0;
- file.gets(rbuf, MAX_CHAR_INFO);
- avsize = atoi(rbuf);
- file.gets(rbuf, MAX_CHAR_INFO);
- unavsize = atoi(rbuf);
-
- // load available list
- for (int x = 0; x < avsize; ++x)
- {
- file.gets(rbuf, MAX_CHAR_INFO);
- int find = atoi(rbuf);
- m_availsortedlist.push_back(&driver_list::driver(find));
- }
-
- // load unavailable list
- for (int x = 0; x < unavsize; ++x)
- {
- file.gets(rbuf, MAX_CHAR_INFO);
- int find = atoi(rbuf);
- m_unavailsortedlist.push_back(&driver_list::driver(find));
- }
- file.close();
- return true;
-}
-
-//-------------------------------------------------
-// load custom filters info from file
-//-------------------------------------------------
-
-void ui_menu_select_game::load_custom_filters()
-{
- // attempt to open the output file
- emu_file file(machine().ui().options().ui_path(), OPEN_FLAG_READ);
- if (file.open("custom_", emulator_info::get_configname(), "_filter.ini") == FILERR_NONE)
- {
- char buffer[MAX_CHAR_INFO];
-
- // get number of filters
- file.gets(buffer, MAX_CHAR_INFO);
- char *pb = strchr(buffer, '=');
- custfltr::numother = atoi(++pb) - 1;
-
- // get main filter
- file.gets(buffer, MAX_CHAR_INFO);
- pb = strchr(buffer, '=') + 2;
-
- for (int y = 0; y < main_filters::length; ++y)
- if (!strncmp(pb, main_filters::text[y], strlen(main_filters::text[y])))
- {
- custfltr::main = y;
- break;
- }
-
- for (int x = 1; x <= custfltr::numother; ++x)
- {
- file.gets(buffer, MAX_CHAR_INFO);
- char *cb = strchr(buffer, '=') + 2;
- for (int y = 0; y < main_filters::length; ++y)
- if (!strncmp(cb, main_filters::text[y], strlen(main_filters::text[y])))
- {
- custfltr::other[x] = y;
- if (y == FILTER_MANUFACTURER)
- {
- file.gets(buffer, MAX_CHAR_INFO);
- char *ab = strchr(buffer, '=') + 2;
- for (size_t z = 0; z < c_mnfct::ui.size(); ++z)
- if (!strncmp(ab, c_mnfct::ui[z].c_str(), c_mnfct::ui[z].length()))
- custfltr::mnfct[x] = z;
- }
- else if (y == FILTER_YEAR)
- {
- file.gets(buffer, MAX_CHAR_INFO);
- char *db = strchr(buffer, '=') + 2;
- for (size_t z = 0; z < c_year::ui.size(); ++z)
- if (!strncmp(db, c_year::ui[z].c_str(), c_year::ui[z].length()))
- custfltr::year[x] = z;
- }
- }
- }
- file.close();
- }
-
-}
-
-
-//-------------------------------------------------
-// draw left box
-//-------------------------------------------------
-
-float ui_menu_select_game::draw_left_panel(float x1, float y1, float x2, float y2)
-{
- ui_manager &mui = machine().ui();
- float line_height = mui.get_line_height();
-
- if (ui_globals::panels_status == SHOW_PANELS || ui_globals::panels_status == HIDE_RIGHT_PANEL)
- {
- float origy1 = y1;
- float origy2 = y2;
- float text_size = 0.75f;
- float line_height_max = line_height * text_size;
- float left_width = 0.0f;
- int text_lenght = main_filters::length;
- int afilter = main_filters::actual;
- int phover = HOVER_FILTER_FIRST;
- const char **text = main_filters::text;
- float sc = y2 - y1 - (2.0f * UI_BOX_TB_BORDER);
-
- if ((text_lenght * line_height_max) > sc)
- {
- float lm = sc / (text_lenght);
- text_size = lm / line_height;
- line_height_max = line_height * text_size;
- }
-
- float text_sign = mui.get_string_width_ex("_# ", text_size);
- for (int x = 0; x < text_lenght; ++x)
- {
- float total_width;
-
- // compute width of left hand side
- total_width = mui.get_string_width_ex(text[x], text_size);
- total_width += text_sign;
-
- // track the maximum
- if (total_width > left_width)
- left_width = total_width;
- }
-
- x2 = x1 + left_width + 2.0f * UI_BOX_LR_BORDER;
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
- y2 -= UI_BOX_TB_BORDER;
-
- for (int filter = 0; filter < text_lenght; ++filter)
- {
- std::string str(text[filter]);
- rgb_t bgcolor = UI_TEXT_BG_COLOR;
- rgb_t fgcolor = UI_TEXT_COLOR;
-
- if (mouse_hit && x1 <= mouse_x && x2 > mouse_x && y1 <= mouse_y && y1 + line_height_max > mouse_y)
- {
- bgcolor = UI_MOUSEOVER_BG_COLOR;
- fgcolor = UI_MOUSEOVER_COLOR;
- hover = phover + filter;
- }
-
- if (afilter == filter)
- {
- bgcolor = UI_SELECTED_BG_COLOR;
- fgcolor = UI_SELECTED_COLOR;
- }
-
- if (bgcolor != UI_TEXT_BG_COLOR)
- container->add_rect(x1, y1, x2, y1 + line_height_max, bgcolor, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE));
-
- float x1t = x1 + text_sign;
- if (afilter == FILTER_CUSTOM)
- {
- if (filter == custfltr::main)
- {
- str.assign("@custom1 ").append(text[filter]);
- x1t -= text_sign;
- }
- else
- {
- for (int count = 1; count <= custfltr::numother; ++count)
- {
- int cfilter = custfltr::other[count];
- if (cfilter == filter)
- {
- strprintf(str, "@custom%d %s", count + 1, text[filter]);
- x1t -= text_sign;
- break;
- }
- }
- }
- convert_command_glyph(str);
- }
-
- mui.draw_text_full(container, str.c_str(), x1t, y1, x2 - x1, JUSTIFY_LEFT, WRAP_NEVER,
- DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr, text_size);
- y1 += line_height_max;
- }
-
- x1 = x2 + UI_BOX_LR_BORDER;
- x2 = x1 + 2.0f * UI_BOX_LR_BORDER;
- y1 = origy1;
- y2 = origy2;
- float lr_arrow_width = 0.4f * line_height * machine().render().ui_aspect();
- rgb_t fgcolor = UI_TEXT_COLOR;
-
- // set left-right arrows dimension
- float ar_x0 = 0.5f * (x2 + x1) - 0.5f * lr_arrow_width;
- float ar_y0 = 0.5f * (y2 + y1) + 0.1f * line_height;
- float ar_x1 = ar_x0 + lr_arrow_width;
- float ar_y1 = 0.5f * (y2 + y1) + 0.9f * line_height;
-
- mui.draw_outlined_box(container, x1, y1, x2, y2, rgb_t(0xEF, 0x12, 0x47, 0x7B));
-
- if (mouse_hit && x1 <= mouse_x && x2 > mouse_x && y1 <= mouse_y && y2 > mouse_y)
- {
- fgcolor = UI_MOUSEOVER_COLOR;
- hover = HOVER_LPANEL_ARROW;
- }
-
- draw_arrow(container, ar_x0, ar_y0, ar_x1, ar_y1, fgcolor, ROT90 ^ ORIENTATION_FLIP_X);
- return x2 + UI_BOX_LR_BORDER;
- }
- else
- {
- float lr_arrow_width = 0.4f * line_height * machine().render().ui_aspect();
- rgb_t fgcolor = UI_TEXT_COLOR;
-
- // set left-right arrows dimension
- float ar_x0 = 0.5f * (x2 + x1) - 0.5f * lr_arrow_width;
- float ar_y0 = 0.5f * (y2 + y1) + 0.1f * line_height;
- float ar_x1 = ar_x0 + lr_arrow_width;
- float ar_y1 = 0.5f * (y2 + y1) + 0.9f * line_height;
-
- mui.draw_outlined_box(container, x1, y1, x2, y2, rgb_t(0xEF, 0x12, 0x47, 0x7B));
-
- if (mouse_hit && x1 <= mouse_x && x2 > mouse_x && y1 <= mouse_y && y2 > mouse_y)
- {
- fgcolor = UI_MOUSEOVER_COLOR;
- hover = HOVER_LPANEL_ARROW;
- }
-
- draw_arrow(container, ar_x0, ar_y0, ar_x1, ar_y1, fgcolor, ROT90);
- return x2 + UI_BOX_LR_BORDER;
- }
-}
-
-//-------------------------------------------------
-// draw infos
-//-------------------------------------------------
-
-void ui_menu_select_game::infos_render(void *selectedref, float origx1, float origy1, float origx2, float origy2)
-{
- ui_manager &mui = machine().ui();
- float line_height = mui.get_line_height();
- static std::string buffer;
- std::vector<int> xstart;
- std::vector<int> xend;
- float text_size = machine().ui().options().infos_size();
- const game_driver *driver = nullptr;
- ui_software_info *soft = nullptr;
- bool is_favorites = ((item[0].flags & MENU_FLAG_UI_FAVORITE) != 0);
- static ui_software_info *oldsoft = nullptr;
- static const game_driver *olddriver = nullptr;
- static int oldview = -1;
- static int old_sw_view = -1;
-
- if (is_favorites)
- {
- soft = ((FPTR)selectedref > skip_main_items) ? (ui_software_info *)selectedref : nullptr;
- if (soft && soft->startempty == 1)
- {
- driver = soft->driver;
- oldsoft = nullptr;
- }
- else
- olddriver = nullptr;
- }
- else
- {
- driver = ((FPTR)selectedref > skip_main_items) ? (const game_driver *)selectedref : nullptr;
- oldsoft = nullptr;
- }
-
- if (driver)
- {
- float gutter_width = 0.4f * line_height * machine().render().ui_aspect() * 1.3f;
- float ud_arrow_width = line_height * machine().render().ui_aspect();
- float oy1 = origy1 + line_height;
-
- // MAMESCORE? Full size text
- if (ui_globals::curdats_view == UI_STORY_LOAD)
- text_size = 1.0f;
-
- std::string snaptext(dats_info[ui_globals::curdats_view]);
-
- // apply title to right panel
- float title_size = 0.0f;
- float txt_lenght = 0.0f;
-
- for (int x = UI_FIRST_LOAD; x < UI_LAST_LOAD; ++x)
- {
- mui.draw_text_full(container, dats_info[x], origx1, origy1, origx2 - origx1, JUSTIFY_CENTER,
- WRAP_TRUNCATE, DRAW_NONE, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, &txt_lenght, nullptr);
- txt_lenght += 0.01f;
- title_size = MAX(txt_lenght, title_size);
- }
-
- mui.draw_text_full(container, snaptext.c_str(), origx1, origy1, origx2 - origx1, JUSTIFY_CENTER,
- WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
-
- draw_common_arrow(origx1, origy1, origx2, origy2, ui_globals::curdats_view, UI_FIRST_LOAD, UI_LAST_LOAD, title_size);
-
- if (driver != olddriver || ui_globals::curdats_view != oldview)
- {
- buffer.clear();
- olddriver = driver;
- oldview = ui_globals::curdats_view;
- topline_datsview = 0;
- totallines = 0;
- std::vector<std::string> m_item;
-
- if (ui_globals::curdats_view == UI_GENERAL_LOAD)
- general_info(driver, buffer);
- else if (ui_globals::curdats_view != UI_COMMAND_LOAD)
- machine().datfile().load_data_info(driver, buffer, ui_globals::curdats_view);
- else
- machine().datfile().command_sub_menu(driver, m_item);
-
- if (!m_item.empty() && ui_globals::curdats_view == UI_COMMAND_LOAD)
- {
- for (size_t x = 0; x < m_item.size(); ++x)
- {
- std::string t_buffer;
- buffer.append(m_item[x]).append("\n");
- machine().datfile().load_command_info(t_buffer, m_item[x]);
- if (!t_buffer.empty())
- buffer.append(t_buffer).append("\n");
- }
- convert_command_glyph(buffer);
- }
- }
-
- if (buffer.empty())
- {
- mui.draw_text_full(container, "No Infos Available", origx1, (origy2 + origy1) * 0.5f, origx2 - origx1, JUSTIFY_CENTER,
- WRAP_WORD, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
- return;
- }
- else if (ui_globals::curdats_view != UI_STORY_LOAD && ui_globals::curdats_view != UI_COMMAND_LOAD)
- totallines = mui.wrap_text(container, buffer.c_str(), origx1, origy1, origx2 - origx1 - (2.0f * gutter_width), xstart, xend, text_size);
- else
- totallines = mui.wrap_text(container, buffer.c_str(), 0.0f, 0.0f, 1.0f - (2.0f * gutter_width), xstart, xend, text_size);
-
- int r_visible_lines = floor((origy2 - oy1) / (line_height * text_size));
- if (totallines < r_visible_lines)
- r_visible_lines = totallines;
- if (topline_datsview < 0)
- topline_datsview = 0;
- if (topline_datsview + r_visible_lines >= totallines)
- topline_datsview = totallines - r_visible_lines;
-
- float sc = origx2 - origx1 - (2.0f * UI_BOX_LR_BORDER);
- for (int r = 0; r < r_visible_lines; ++r)
- {
- int itemline = r + topline_datsview;
- std::string tempbuf(buffer.substr(xstart[itemline], xend[itemline] - xstart[itemline]));
-
- // up arrow
- if (r == 0 && topline_datsview != 0)
- info_arrow(0, origx1, origx2, oy1, line_height, text_size, ud_arrow_width);
- // bottom arrow
- else if (r == r_visible_lines - 1 && itemline != totallines - 1)
- info_arrow(1, origx1, origx2, oy1, line_height, text_size, ud_arrow_width);
- // special case for mamescore
- else if (ui_globals::curdats_view == UI_STORY_LOAD)
- {
- // check size
- float textlen = mui.get_string_width_ex(tempbuf.c_str(), text_size);
- float tmp_size = (textlen > sc) ? text_size * (sc / textlen) : text_size;
-
- size_t last_underscore = tempbuf.find_last_of("_");
- if (last_underscore == std::string::npos)
- {
- mui.draw_text_full(container, tempbuf.c_str(), origx1, oy1, origx2 - origx1, JUSTIFY_CENTER,
- WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, tmp_size);
- }
- else
- {
- float effective_width = origx2 - origx1 - gutter_width;
- float effective_left = origx1 + gutter_width;
- std::string last_part(tempbuf.substr(last_underscore + 1));
- std::string first_part(tempbuf.substr(0, tempbuf.find("___")));
- float item_width;
-
- mui.draw_text_full(container, first_part.c_str(), effective_left, oy1, effective_width,
- JUSTIFY_LEFT, WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, &item_width, nullptr, tmp_size);
-
- mui.draw_text_full(container, last_part.c_str(), effective_left + item_width, oy1,
- origx2 - origx1 - 2.0f * gutter_width - item_width, JUSTIFY_RIGHT, WRAP_TRUNCATE,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, tmp_size);
- }
- }
-
- // special case for command
- else if (ui_globals::curdats_view == UI_COMMAND_LOAD || ui_globals::curdats_view == UI_GENERAL_LOAD)
- {
- // check size
- float textlen = mui.get_string_width_ex(tempbuf.c_str(), text_size);
- float tmp_size = (textlen > sc) ? text_size * (sc / textlen) : text_size;
-
- int first_dspace = (ui_globals::curdats_view == UI_COMMAND_LOAD) ? tempbuf.find(" ") : tempbuf.find(":");
- if (first_dspace > 0)
- {
- float effective_width = origx2 - origx1 - gutter_width;
- float effective_left = origx1 + gutter_width;
- std::string first_part(tempbuf.substr(0, first_dspace));
- std::string last_part(tempbuf.substr(first_dspace + 1));
- strtrimspace(last_part);
- mui.draw_text_full(container, first_part.c_str(), effective_left, oy1, effective_width, JUSTIFY_LEFT,
- WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, tmp_size);
-
- mui.draw_text_full(container, last_part.c_str(), effective_left, oy1, origx2 - origx1 - 2.0f * gutter_width,
- JUSTIFY_RIGHT, WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, tmp_size);
- }
- else
- mui.draw_text_full(container, tempbuf.c_str(), origx1 + gutter_width, oy1, origx2 - origx1, JUSTIFY_LEFT,
- WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, tmp_size);
- }
- else
- mui.draw_text_full(container, tempbuf.c_str(), origx1 + gutter_width, oy1, origx2 - origx1, JUSTIFY_LEFT,
- WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, text_size);
-
- oy1 += (line_height * text_size);
- }
-
- // return the number of visible lines, minus 1 for top arrow and 1 for bottom arrow
- right_visible_lines = r_visible_lines - (topline_datsview != 0) - (topline_datsview + r_visible_lines != totallines);
- }
- else if (soft)
- {
- float gutter_width = 0.4f * line_height * machine().render().ui_aspect() * 1.3f;
- float ud_arrow_width = line_height * machine().render().ui_aspect();
- float oy1 = origy1 + line_height;
-
- // apply title to right panel
- if (soft->usage.empty())
- {
- mui.draw_text_full(container, "History", origx1, origy1, origx2 - origx1, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
- ui_globals::cur_sw_dats_view = 0;
- }
- else
- {
- float title_size = 0.0f;
- float txt_lenght = 0.0f;
- std::string t_text[2];
- t_text[0] = "History";
- t_text[1] = "Usage";
-
- for (auto & elem: t_text)
- {
- mui.draw_text_full(container, elem.c_str(), origx1, origy1, origx2 - origx1, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NONE, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, &txt_lenght, nullptr);
- txt_lenght += 0.01f;
- title_size = MAX(txt_lenght, title_size);
- }
-
- mui.draw_text_full(container, t_text[ui_globals::cur_sw_dats_view].c_str(), origx1, origy1, origx2 - origx1,
- JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
-
- draw_common_arrow(origx1, origy1, origx2, origy2, ui_globals::cur_sw_dats_view, 0, 1, title_size);
- }
-
- if (oldsoft != soft || old_sw_view != ui_globals::cur_sw_dats_view)
- {
- buffer.clear();
- old_sw_view = ui_globals::cur_sw_dats_view;
- oldsoft = soft;
- if (ui_globals::cur_sw_dats_view == 0)
- {
- if (soft->startempty == 1)
- machine().datfile().load_data_info(soft->driver, buffer, UI_HISTORY_LOAD);
- else
- machine().datfile().load_software_info(soft->listname, buffer, soft->shortname, soft->parentname);
- }
- else
- buffer = soft->usage;
- }
-
- if (buffer.empty())
- {
- mui.draw_text_full(container, "No Infos Available", origx1, (origy2 + origy1) * 0.5f, origx2 - origx1, JUSTIFY_CENTER,
- WRAP_WORD, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
- return;
- }
- else
- totallines = mui.wrap_text(container, buffer.c_str(), origx1, origy1, origx2 - origx1 - (2.0f * gutter_width), xstart, xend, text_size);
-
- int r_visible_lines = floor((origy2 - oy1) / (line_height * text_size));
- if (totallines < r_visible_lines)
- r_visible_lines = totallines;
- if (topline_datsview < 0)
- topline_datsview = 0;
- if (topline_datsview + r_visible_lines >= totallines)
- topline_datsview = totallines - r_visible_lines;
-
- for (int r = 0; r < r_visible_lines; ++r)
- {
- int itemline = r + topline_datsview;
- std::string tempbuf(buffer.substr(xstart[itemline], xend[itemline] - xstart[itemline]));
-
- // up arrow
- if (r == 0 && topline_datsview != 0)
- info_arrow(0, origx1, origx2, oy1, line_height, text_size, ud_arrow_width);
- // bottom arrow
- else if (r == r_visible_lines - 1 && itemline != totallines - 1)
- info_arrow(1, origx1, origx2, oy1, line_height, text_size, ud_arrow_width);
- else
- mui.draw_text_full(container, tempbuf.c_str(), origx1 + gutter_width, oy1, origx2 - origx1, JUSTIFY_LEFT,
- WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, text_size);
- oy1 += (line_height * text_size);
- }
-
- // return the number of visible lines, minus 1 for top arrow and 1 for bottom arrow
- right_visible_lines = r_visible_lines - (topline_datsview != 0) - (topline_datsview + r_visible_lines != totallines);
- }
-}
-
-//-------------------------------------------------
-// draw right panel
-//-------------------------------------------------
-
-void ui_menu_select_game::draw_right_panel(void *selectedref, float origx1, float origy1, float origx2, float origy2)
-{
- ui_manager &mui = machine().ui();
- float line_height = mui.get_line_height();
- float lr_arrow_width = 0.4f * line_height * machine().render().ui_aspect();
- rgb_t fgcolor = UI_TEXT_COLOR;
- bool hide = (ui_globals::panels_status == HIDE_RIGHT_PANEL || ui_globals::panels_status == HIDE_BOTH);
- float x2 = (hide) ? origx2 : origx1 + 2.0f * UI_BOX_LR_BORDER;
-
- // set left-right arrows dimension
- float ar_x0 = 0.5f * (x2 + origx1) - 0.5f * lr_arrow_width;
- float ar_y0 = 0.5f * (origy2 + origy1) + 0.1f * line_height;
- float ar_x1 = ar_x0 + lr_arrow_width;
- float ar_y1 = 0.5f * (origy2 + origy1) + 0.9f * line_height;
-
- //machine().ui().draw_outlined_box(container, origx1, origy1, origx2, origy2, UI_BACKGROUND_COLOR);
- mui.draw_outlined_box(container, origx1, origy1, origx2, origy2, rgb_t(0xEF, 0x12, 0x47, 0x7B));
-
- if (mouse_hit && origx1 <= mouse_x && x2 > mouse_x && origy1 <= mouse_y && origy2 > mouse_y)
- {
- fgcolor = UI_MOUSEOVER_COLOR;
- hover = HOVER_RPANEL_ARROW;
- }
-
- if (hide)
- {
- draw_arrow(container, ar_x0, ar_y0, ar_x1, ar_y1, fgcolor, ROT90 ^ ORIENTATION_FLIP_X);
- return;
- }
-
- draw_arrow(container, ar_x0, ar_y0, ar_x1, ar_y1, fgcolor, ROT90);
- origx1 = x2;
- origy1 = draw_right_box_title(origx1, origy1, origx2, origy2);
-
- if (ui_globals::rpanel == RP_IMAGES)
- arts_render(selectedref, origx1, origy1, origx2, origy2);
- else
- infos_render(selectedref, origx1, origy1, origx2, origy2);
-}
-
-//-------------------------------------------------
-// perform our special rendering
-//-------------------------------------------------
-
-void ui_menu_select_game::arts_render(void *selectedref, float origx1, float origy1, float origx2, float origy2)
-{
- ui_manager &mui = machine().ui();
- float line_height = mui.get_line_height();
- bool is_favorites = ((item[0].flags & MENU_FLAG_UI_FAVORITE) != 0);
- static ui_software_info *oldsoft = nullptr;
- static const game_driver *olddriver = nullptr;
- const game_driver *driver = nullptr;
- ui_software_info *soft = nullptr;
-
- if (is_favorites)
- {
- soft = ((FPTR)selectedref > skip_main_items) ? (ui_software_info *)selectedref : nullptr;
- if (soft && soft->startempty == 1)
- {
- driver = soft->driver;
- oldsoft = nullptr;
- }
- else
- olddriver = nullptr;
- }
- else
- {
- driver = ((FPTR)selectedref > skip_main_items) ? (const game_driver *)selectedref : nullptr;
- oldsoft = nullptr;
- }
-
- if (driver)
- {
- if (ui_globals::default_image)
- ((driver->flags & MACHINE_TYPE_ARCADE) == 0) ? ui_globals::curimage_view = CABINETS_VIEW : ui_globals::curimage_view = SNAPSHOT_VIEW;
-
- std::string searchstr;
- searchstr = arts_render_common(origx1, origy1, origx2, origy2);
-
- // loads the image if necessary
- if (driver != olddriver || !snapx_bitmap->valid() || ui_globals::switch_image)
- {
- emu_file snapfile(searchstr.c_str(), OPEN_FLAG_READ);
- bitmap_argb32 *tmp_bitmap;
- tmp_bitmap = auto_alloc(machine(), bitmap_argb32);
-
- // try to load snapshot first from saved "0000.png" file
- std::string fullname(driver->name);
- render_load_png(*tmp_bitmap, snapfile, fullname.c_str(), "0000.png");
-
- if (!tmp_bitmap->valid())
- render_load_jpeg(*tmp_bitmap, snapfile, fullname.c_str(), "0000.jpg");
-
- // if fail, attemp to load from standard file
- if (!tmp_bitmap->valid())
- {
- fullname.assign(driver->name).append(".png");
- render_load_png(*tmp_bitmap, snapfile, nullptr, fullname.c_str());
-
- if (!tmp_bitmap->valid())
- {
- fullname.assign(driver->name).append(".jpg");
- render_load_jpeg(*tmp_bitmap, snapfile, nullptr, fullname.c_str());
- }
- }
-
- // if fail again, attemp to load from parent file
- if (!tmp_bitmap->valid())
- {
- // set clone status
- bool cloneof = strcmp(driver->parent, "0");
- if (cloneof)
- {
- int cx = driver_list::find(driver->parent);
- if (cx != -1 && ((driver_list::driver(cx).flags & MACHINE_IS_BIOS_ROOT) != 0))
- cloneof = false;
- }
-
- if (cloneof)
- {
- fullname.assign(driver->parent).append(".png");
- render_load_png(*tmp_bitmap, snapfile, nullptr, fullname.c_str());
-
- if (!tmp_bitmap->valid())
- {
- fullname.assign(driver->parent).append(".jpg");
- render_load_jpeg(*tmp_bitmap, snapfile, nullptr, fullname.c_str());
- }
- }
- }
-
- olddriver = driver;
- ui_globals::switch_image = false;
- arts_render_images(tmp_bitmap, origx1, origy1, origx2, origy2, false);
- auto_free(machine(), tmp_bitmap);
- }
-
- // if the image is available, loaded and valid, display it
- if (snapx_bitmap->valid())
- {
- float x1 = origx1 + 0.01f;
- float x2 = origx2 - 0.01f;
- float y1 = origy1 + UI_BOX_TB_BORDER + line_height;
- float y2 = origy2 - UI_BOX_TB_BORDER - line_height;
-
- // apply texture
- container->add_quad( x1, y1, x2, y2, ARGB_WHITE, snapx_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
- }
- }
- else if (soft)
- {
- std::string fullname, pathname;
-
- if (ui_globals::default_image)
- (soft->startempty == 0) ? ui_globals::curimage_view = SNAPSHOT_VIEW : ui_globals::curimage_view = CABINETS_VIEW;
-
- // arts title and searchpath
- std::string searchstr;
- searchstr = arts_render_common(origx1, origy1, origx2, origy2);
-
- // loads the image if necessary
- if (soft != oldsoft || !snapx_bitmap->valid() || ui_globals::switch_image)
- {
- emu_file snapfile(searchstr.c_str(), OPEN_FLAG_READ);
- bitmap_argb32 *tmp_bitmap;
- tmp_bitmap = auto_alloc(machine(), bitmap_argb32);
-
- if (soft->startempty == 1)
- {
- // Load driver snapshot
- fullname.assign(soft->driver->name).append(".png");
- render_load_png(*tmp_bitmap, snapfile, nullptr, fullname.c_str());
-
- if (!tmp_bitmap->valid())
- {
- fullname.assign(soft->driver->name).append(".jpg");
- render_load_jpeg(*tmp_bitmap, snapfile, nullptr, fullname.c_str());
- }
- }
- else if (ui_globals::curimage_view == TITLES_VIEW)
- {
- // First attempt from name list
- pathname.assign(soft->listname).append("_titles");
- fullname.assign(soft->shortname).append(".png");
- render_load_png(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str());
-
- if (!tmp_bitmap->valid())
- {
- fullname.assign(soft->shortname).append(".jpg");
- render_load_jpeg(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str());
- }
- }
- else
- {
- // First attempt from name list
- pathname = soft->listname;
- fullname.assign(soft->shortname).append(".png");
- render_load_png(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str());
-
- if (!tmp_bitmap->valid())
- {
- fullname.assign(soft->shortname).append(".jpg");
- render_load_jpeg(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str());
- }
-
- if (!tmp_bitmap->valid())
- {
- // Second attempt from driver name + part name
- pathname.assign(soft->driver->name).append(soft->part.c_str());
- fullname.assign(soft->shortname).append(".png");
- render_load_png(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str());
-
- if (!tmp_bitmap->valid())
- {
- fullname.assign(soft->shortname).append(".jpg");
- render_load_jpeg(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str());
- }
- }
- }
-
- oldsoft = soft;
- ui_globals::switch_image = false;
- arts_render_images(tmp_bitmap, origx1, origy1, origx2, origy2, true);
- auto_free(machine(), tmp_bitmap);
- }
-
- // if the image is available, loaded and valid, display it
- if (snapx_bitmap->valid())
- {
- float x1 = origx1 + 0.01f;
- float x2 = origx2 - 0.01f;
- float y1 = origy1 + UI_BOX_TB_BORDER + line_height;
- float y2 = origy2 - UI_BOX_TB_BORDER - line_height;
-
- // apply texture
- container->add_quad(x1, y1, x2, y2, ARGB_WHITE, snapx_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
- }
- }
-}
diff --git a/src/emu/ui/selgame.h b/src/emu/ui/selgame.h
index 4c1cf548d60..b5e6687c4f3 100644
--- a/src/emu/ui/selgame.h
+++ b/src/emu/ui/selgame.h
@@ -1,23 +1,22 @@
// license:BSD-3-Clause
-// copyright-holders:Dankan1890
+// copyright-holders:Nicola Salmoria, Aaron Giles, Nathan Woods
/***************************************************************************
ui/selgame.h
- Main UI menu.
+ Game selector
***************************************************************************/
#pragma once
-#ifndef __UI_MAIN_H__
-#define __UI_MAIN_H__
+#ifndef __UI_SELGAME_H__
+#define __UI_SELGAME_H__
#include "drivenum.h"
-#include "ui/menu.h"
+#include "menu.h"
-class ui_menu_select_game : public ui_menu
-{
+class ui_menu_select_game : public ui_menu {
public:
ui_menu_select_game(running_machine &machine, render_container *container, const char *gamename);
virtual ~ui_menu_select_game();
@@ -28,52 +27,21 @@ public:
// force game select menu
static void force_game_select(running_machine &machine, render_container *container);
- virtual bool menu_has_search_active() override { return (m_search[0] != 0); }
-
- // draw left panel
- virtual float draw_left_panel(float x1, float y1, float x2, float y2) override;
-
- // draw right panel
- virtual void draw_right_panel(void *selectedref, float origx1, float origy1, float origx2, float origy2) override;
-
private:
- enum { VISIBLE_GAMES_IN_SEARCH = 200 };
- char m_search[40];
- int m_prev_selected;
- static int m_isabios;
-
- static std::vector<const game_driver *> m_sortedlist;
- std::vector<const game_driver *> m_availsortedlist;
- std::vector<const game_driver *> m_unavailsortedlist;
- std::vector<const game_driver *> m_displaylist;
- std::vector<const game_driver *> m_tmp;
-
- const game_driver *m_searchlist[VISIBLE_GAMES_IN_SEARCH + 1];
+ // internal state
+ enum { VISIBLE_GAMES_IN_LIST = 15 };
+ UINT8 m_error;
+ UINT8 m_rerandomize;
+ char m_search[40];
+ int m_matchlist[VISIBLE_GAMES_IN_LIST];
+ std::vector<const game_driver *> m_driverlist;
+ std::unique_ptr<driver_enumerator> m_drivlist;
// internal methods
- void build_custom();
- void build_category();
- void build_available_list();
- void build_list(std::vector<const game_driver *> &vec, const char *filter_text = nullptr, int filter = 0, bool bioscheck = false);
-
- bool isfavorite();
- void populate_search();
- void init_sorted_list();
- bool load_available_machines();
- void load_custom_filters();
-
- // General info
- void general_info(const game_driver *driver, std::string &buffer);
-
- void arts_render(void *selectedref, float x1, float y1, float x2, float y2);
- void infos_render(void *selectedref, float x1, float y1, float x2, float y2);
-
- // handlers
+ void build_driver_list();
void inkey_select(const ui_menu_event *menu_event);
- void inkey_select_favorite(const ui_menu_event *menu_event);
+ void inkey_cancel(const ui_menu_event *menu_event);
void inkey_special(const ui_menu_event *menu_event);
- void inkey_export();
};
-
-#endif /* __UI_MAIN_H__ */
+#endif /* __UI_SELGAME_H__ */
diff --git a/src/emu/ui/selsoft.cpp b/src/emu/ui/selsoft.cpp
deleted file mode 100644
index 985a7d31bfc..00000000000
--- a/src/emu/ui/selsoft.cpp
+++ /dev/null
@@ -1,1976 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Dankan1890
-/***************************************************************************
-
- ui/selsoft.cpp
-
- UI softwares menu.
-
-***************************************************************************/
-
-#include "emu.h"
-#include "emuopts.h"
-#include "ui/ui.h"
-#include "ui/menu.h"
-#include "uiinput.h"
-#include "audit.h"
-#include "ui/selsoft.h"
-#include "ui/datmenu.h"
-#include "ui/datfile.h"
-#include "ui/inifile.h"
-#include "ui/selector.h"
-#include "rendfont.h"
-#include "rendutil.h"
-#include "softlist.h"
-#include <algorithm>
-
-std::string reselect_last::driver;
-std::string reselect_last::software;
-std::string reselect_last::swlist;
-bool reselect_last::m_reselect = false;
-static const char *region_lists[] = { "arab", "arg", "asia", "aus", "aut", "bel", "blr", "bra", "can", "chi", "chn", "cze", "den",
- "ecu", "esp", "euro", "fin", "fra", "gbr", "ger", "gre", "hkg", "hun", "irl", "isr",
- "isv", "ita", "jpn", "kaz", "kor", "lat", "lux", "mex", "ned", "nld", "nor", "nzl",
- "pol", "rus", "slo", "spa", "sui", "swe", "tha", "tpe", "tw", "uk", "ukr", "usa" };
-
-//-------------------------------------------------
-// compares two items in the software list and
-// sort them by parent-clone
-//-------------------------------------------------
-
-bool compare_software(ui_software_info a, ui_software_info b)
-{
- ui_software_info *x = &a;
- ui_software_info *y = &b;
-
- bool clonex = (x->parentname[0] != '\0');
- bool cloney = (y->parentname[0] != '\0');
-
- if (!clonex && !cloney)
- return (strmakelower(x->longname) < strmakelower(y->longname));
-
- std::string cx(x->parentlongname), cy(y->parentlongname);
-
- if (clonex && cx[0] == '\0')
- clonex = false;
-
- if (cloney && cy[0] == '\0')
- cloney = false;
-
- if (!clonex && !cloney)
- return (strmakelower(x->longname) < strmakelower(y->longname));
- else if (clonex && cloney)
- {
- if (!core_stricmp(x->parentname.c_str(), y->parentname.c_str()) && !core_stricmp(x->instance.c_str(), y->instance.c_str()))
- return (strmakelower(x->longname) < strmakelower(y->longname));
- else
- return (strmakelower(cx) < strmakelower(cy));
- }
- else if (!clonex && cloney)
- {
- if (!core_stricmp(x->shortname.c_str(), y->parentname.c_str()) && !core_stricmp(x->instance.c_str(), y->instance.c_str()))
- return true;
- else
- return (strmakelower(x->longname) < strmakelower(cy));
- }
- else
- {
- if (!core_stricmp(x->parentname.c_str(), y->shortname.c_str()) && !core_stricmp(x->instance.c_str(), y->instance.c_str()))
- return false;
- else
- return (strmakelower(cx) < strmakelower(y->longname));
- }
-}
-
-//-------------------------------------------------
-// get bios count
-//-------------------------------------------------
-
-bool has_multiple_bios(const game_driver *driver, std::vector<s_bios> &biosname)
-{
- if (driver->rom == nullptr)
- return 0;
-
- std::string default_name;
- for (const rom_entry *rom = driver->rom; !ROMENTRY_ISEND(rom); ++rom)
- if (ROMENTRY_ISDEFAULT_BIOS(rom))
- default_name = ROM_GETNAME(rom);
-
- for (const rom_entry *rom = driver->rom; !ROMENTRY_ISEND(rom); ++rom)
- {
- if (ROMENTRY_ISSYSTEM_BIOS(rom))
- {
- std::string name(ROM_GETHASHDATA(rom));
- std::string bname(ROM_GETNAME(rom));
- int bios_flags = ROM_GETBIOSFLAGS(rom);
-
- if (bname == default_name)
- {
- name.append(" (default)");
- biosname.emplace(biosname.begin(), name, bios_flags - 1);
- }
- else
- biosname.emplace_back(name, bios_flags - 1);
- }
- }
- return (biosname.size() > 1);
-}
-
-//-------------------------------------------------
-// ctor
-//-------------------------------------------------
-
-ui_menu_select_software::ui_menu_select_software(running_machine &machine, render_container *container, const game_driver *driver) : ui_menu(machine, container)
-{
- if (reselect_last::get())
- reselect_last::set(false);
-
- sw_filters::actual = 0;
-
- m_driver = driver;
- build_software_list();
- load_sw_custom_filters();
-
- ui_globals::curimage_view = SNAPSHOT_VIEW;
- ui_globals::switch_image = true;
- ui_globals::cur_sw_dats_view = UI_FIRST_LOAD;
-
- std::string error_string;
- machine.options().set_value(OPTION_SOFTWARENAME, "", OPTION_PRIORITY_CMDLINE, error_string);
-}
-
-//-------------------------------------------------
-// dtor
-//-------------------------------------------------
-
-ui_menu_select_software::~ui_menu_select_software()
-{
- ui_globals::curimage_view = CABINETS_VIEW;
- ui_globals::switch_image = true;
-}
-
-//-------------------------------------------------
-// handle
-//-------------------------------------------------
-
-void ui_menu_select_software::handle()
-{
- bool check_filter = false;
-
- // ignore pause keys by swallowing them before we process the menu
- machine().ui_input().pressed(IPT_UI_PAUSE);
-
- // process the menu
- const ui_menu_event *m_event = process(UI_MENU_PROCESS_LR_REPEAT);
-
- if (m_event != nullptr && m_event->itemref != nullptr)
- {
- // reset the error on any future m_event
- if (ui_error)
- ui_error = false;
-
- // handle selections
- else if (m_event->iptkey == IPT_UI_SELECT)
- inkey_select(m_event);
-
- // handle UI_LEFT
- else if (m_event->iptkey == IPT_UI_LEFT)
- {
- // Images
- if (ui_globals::rpanel == RP_IMAGES && ui_globals::curimage_view > FIRST_VIEW)
- {
- ui_globals::curimage_view--;
- ui_globals::switch_image = true;
- ui_globals::default_image = false;
- }
-
- // Infos
- else if (ui_globals::rpanel == RP_INFOS && ui_globals::cur_sw_dats_view > 0)
- {
- ui_globals::cur_sw_dats_view--;
- topline_datsview = 0;
- }
- }
-
- // handle UI_RIGHT
- else if (m_event->iptkey == IPT_UI_RIGHT)
- {
- // Images
- if (ui_globals::rpanel == RP_IMAGES && ui_globals::curimage_view < LAST_VIEW)
- {
- ui_globals::curimage_view++;
- ui_globals::switch_image = true;
- ui_globals::default_image = false;
- }
-
- // Infos
- else if (ui_globals::rpanel == RP_INFOS && ui_globals::cur_sw_dats_view < 1)
- {
- ui_globals::cur_sw_dats_view++;
- topline_datsview = 0;
- }
- }
-
- // handle UI_DATS
- else if (m_event->iptkey == IPT_UI_DATS && machine().ui().options().enabled_dats())
- {
- ui_software_info *ui_swinfo = (ui_software_info *)m_event->itemref;
-
- if ((FPTR)ui_swinfo > 1 && machine().datfile().has_data(ui_swinfo->driver))
- {
- if (ui_swinfo->startempty == 1)
- ui_menu::stack_push(global_alloc_clear<ui_menu_dats_view>(machine(), container, ui_swinfo->driver));
- else
- ui_menu::stack_push(global_alloc_clear<ui_menu_dats_view>(machine(), container, ui_swinfo));
- }
- }
-
- // handle UI_UP_FILTER
- else if (m_event->iptkey == IPT_UI_UP_FILTER && sw_filters::actual > UI_SW_FIRST)
- {
- l_sw_hover = sw_filters::actual - 1;
- check_filter = true;
- }
-
- // handle UI_DOWN_FILTER
- else if (m_event->iptkey == IPT_UI_DOWN_FILTER && sw_filters::actual < UI_SW_LAST)
- {
- l_sw_hover = sw_filters::actual + 1;
- check_filter = true;
- }
-
- // handle UI_LEFT_PANEL
- else if (m_event->iptkey == IPT_UI_LEFT_PANEL)
- ui_globals::rpanel = RP_IMAGES;
-
- // handle UI_RIGHT_PANEL
- else if (m_event->iptkey == IPT_UI_RIGHT_PANEL)
- ui_globals::rpanel = RP_INFOS;
-
- // escape pressed with non-empty text clears the text
- else if (m_event->iptkey == IPT_UI_CANCEL && m_search[0] != 0)
- {
- m_search[0] = '\0';
- reset(UI_MENU_RESET_SELECT_FIRST);
- }
-
- // handle UI_FAVORITES
- else if (m_event->iptkey == IPT_UI_FAVORITES)
- {
- ui_software_info *swinfo = (ui_software_info *)m_event->itemref;
-
- if ((FPTR)swinfo > 2)
- {
- if (!machine().favorite().isgame_favorite(*swinfo))
- {
- machine().favorite().add_favorite_game(*swinfo);
- machine().popmessage("%s\n added to favorites list.", swinfo->longname.c_str());
- }
-
- else
- {
- machine().popmessage("%s\n removed from favorites list.", swinfo->longname.c_str());
- machine().favorite().remove_favorite_game();
- }
- }
- }
-
- // typed characters append to the buffer
- else if (m_event->iptkey == IPT_SPECIAL)
- inkey_special(m_event);
-
- else if (m_event->iptkey == IPT_OTHER)
- check_filter = true;
- }
-
- if (m_event != nullptr && m_event->itemref == nullptr)
- {
- // reset the error on any future m_event
- if (ui_error)
- ui_error = false;
-
- else if (m_event->iptkey == IPT_OTHER)
- check_filter = true;
-
- // handle UI_UP_FILTER
- else if (m_event->iptkey == IPT_UI_UP_FILTER && sw_filters::actual > UI_SW_FIRST)
- {
- l_sw_hover = sw_filters::actual - 1;
- check_filter = true;
- }
-
- // handle UI_DOWN_FILTER
- else if (m_event->iptkey == IPT_UI_DOWN_FILTER && sw_filters::actual < UI_SW_LAST)
- {
- l_sw_hover = sw_filters::actual + 1;
- check_filter = true;
- }
- }
-
- // if we're in an error state, overlay an error message
- if (ui_error)
- machine().ui().draw_text_box(container,
- "The selected software is missing one or more required files. "
- "Please select a different software.\n\nPress any key (except ESC) to continue.",
- JUSTIFY_CENTER, 0.5f, 0.5f, UI_RED_COLOR);
-
- // handle filters selection from key shortcuts
- if (check_filter)
- {
- m_search[0] = '\0';
-
- switch (l_sw_hover)
- {
- case UI_SW_REGION:
- ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, m_filter.region.ui,
- m_filter.region.actual, SELECTOR_SOFTWARE, l_sw_hover));
- break;
- case UI_SW_YEARS:
- ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, m_filter.year.ui,
- m_filter.year.actual, SELECTOR_SOFTWARE, l_sw_hover));
- break;
- case UI_SW_LIST:
- ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, m_filter.swlist.description,
- m_filter.swlist.actual, SELECTOR_SOFTWARE, l_sw_hover));
- break;
- case UI_SW_TYPE:
- ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, m_filter.type.ui,
- m_filter.type.actual, SELECTOR_SOFTWARE, l_sw_hover));
- break;
- case UI_SW_PUBLISHERS:
- ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, m_filter.publisher.ui,
- m_filter.publisher.actual, SELECTOR_SOFTWARE, l_sw_hover));
- break;
- case UI_SW_CUSTOM:
- sw_filters::actual = l_sw_hover;
- ui_menu::stack_push(global_alloc_clear<ui_menu_swcustom_filter>(machine(), container, m_driver, m_filter));
- break;
- default:
- sw_filters::actual = l_sw_hover;
- reset(UI_MENU_RESET_SELECT_FIRST);
- break;
- }
- }
-}
-
-//-------------------------------------------------
-// populate
-//-------------------------------------------------
-
-void ui_menu_select_software::populate()
-{
- UINT32 flags_ui = MENU_FLAG_UI_SWLIST | MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW;
- m_has_empty_start = true;
- int old_software = -1;
-
- machine_config config(*m_driver, machine().options());
- image_interface_iterator iter(config.root_device());
-
- for (device_image_interface *image = iter.first(); image != nullptr; image = iter.next())
- if (image->filename() == nullptr && image->must_be_loaded())
- {
- m_has_empty_start = false;
- break;
- }
-
- // no active search
- if (m_search[0] == 0)
- {
- // if the device can be loaded empty, add an item
- if (m_has_empty_start)
- item_append("[Start empty]", nullptr, flags_ui, (void *)&m_swinfo[0]);
-
- m_displaylist.clear();
- m_tmp.clear();
-
- switch (sw_filters::actual)
- {
- case UI_SW_PUBLISHERS:
- build_list(m_tmp, m_filter.publisher.ui[m_filter.publisher.actual].c_str());
- break;
-
- case UI_SW_LIST:
- build_list(m_tmp, m_filter.swlist.name[m_filter.swlist.actual].c_str());
- break;
-
- case UI_SW_YEARS:
- build_list(m_tmp, m_filter.year.ui[m_filter.year.actual].c_str());
- break;
-
- case UI_SW_TYPE:
- build_list(m_tmp, m_filter.type.ui[m_filter.type.actual].c_str());
- break;
-
- case UI_SW_REGION:
- build_list(m_tmp, m_filter.region.ui[m_filter.region.actual].c_str());
- break;
-
- case UI_SW_CUSTOM:
- build_custom();
- break;
-
- default:
- build_list(m_tmp);
- break;
- }
-
- // iterate over entries
- for (size_t curitem = 0; curitem < m_displaylist.size(); ++curitem)
- {
- if (reselect_last::software == "[Start empty]" && !reselect_last::driver.empty())
- old_software = 0;
-
- else if (m_displaylist[curitem]->shortname == reselect_last::software && m_displaylist[curitem]->listname == reselect_last::swlist)
- old_software = m_has_empty_start ? curitem + 1 : curitem;
-
- item_append(m_displaylist[curitem]->longname.c_str(), m_displaylist[curitem]->devicetype.c_str(),
- m_displaylist[curitem]->parentname.empty() ? flags_ui : (MENU_FLAG_INVERT | flags_ui), (void *)m_displaylist[curitem]);
- }
- }
-
- else
- {
- find_matches(m_search, VISIBLE_GAMES_IN_SEARCH);
-
- for (int curitem = 0; m_searchlist[curitem] != nullptr; ++curitem)
- item_append(m_searchlist[curitem]->longname.c_str(), m_searchlist[curitem]->devicetype.c_str(),
- m_searchlist[curitem]->parentname.empty() ? flags_ui : (MENU_FLAG_INVERT | flags_ui),
- (void *)m_searchlist[curitem]);
- }
-
- item_append(MENU_SEPARATOR_ITEM, nullptr, flags_ui, nullptr);
-
- // configure the custom rendering
- customtop = 4.0f * machine().ui().get_line_height() + 5.0f * UI_BOX_TB_BORDER;
- custombottom = 5.0f * machine().ui().get_line_height() + 4.0f * UI_BOX_TB_BORDER;
-
- if (old_software != -1)
- {
- selected = old_software;
- top_line = selected - (ui_globals::visible_sw_lines / 2);
- }
-
- reselect_last::reset();
-}
-
-//-------------------------------------------------
-// build a list of softwares
-//-------------------------------------------------
-
-void ui_menu_select_software::build_software_list()
-{
- // add start empty item
- m_swinfo.emplace_back(m_driver->name, m_driver->description, "", "", "", 0, "", m_driver, "", "", "", 1, "", "", "", true);
-
- machine_config config(*m_driver, machine().options());
- software_list_device_iterator deviter(config.root_device());
-
- // iterate thru all software lists
- for (software_list_device *swlist = deviter.first(); swlist != nullptr; swlist = deviter.next())
- {
- m_filter.swlist.name.push_back(swlist->list_name());
- m_filter.swlist.description.push_back(swlist->description());
- for (software_info *swinfo = swlist->first_software_info(); swinfo != nullptr; swinfo = swinfo->next())
- {
- software_part *part = swinfo->first_part();
- if (part->is_compatible(*swlist))
- {
- const char *instance_name = nullptr;
- const char *type_name = nullptr;
- ui_software_info tmpmatches;
- image_interface_iterator imgiter(config.root_device());
- for (device_image_interface *image = imgiter.first(); image != nullptr; image = imgiter.next())
- {
- const char *interface = image->image_interface();
- if (interface != nullptr && part->matches_interface(interface))
- {
- instance_name = image->instance_name();
- if (instance_name != nullptr)
- tmpmatches.instance = image->instance_name();
-
- type_name = image->image_type_name();
- if (type_name != nullptr)
- tmpmatches.devicetype = type_name;
- break;
- }
- }
-
- if (instance_name == nullptr || type_name == nullptr)
- continue;
-
- if (swinfo->shortname()) tmpmatches.shortname = swinfo->shortname();
- if (swinfo->longname()) tmpmatches.longname = swinfo->longname();
- if (swinfo->parentname()) tmpmatches.parentname = swinfo->parentname();
- if (swinfo->year()) tmpmatches.year = swinfo->year();
- if (swinfo->publisher()) tmpmatches.publisher = swinfo->publisher();
- tmpmatches.supported = swinfo->supported();
- if (part->name()) tmpmatches.part = part->name();
- tmpmatches.driver = m_driver;
- if (swlist->list_name()) tmpmatches.listname = swlist->list_name();
- if (part->interface()) tmpmatches.interface = part->interface();
- tmpmatches.startempty = 0;
- tmpmatches.parentlongname.clear();
- tmpmatches.usage.clear();
- tmpmatches.available = false;
-
- for (feature_list_item *flist = swinfo->other_info(); flist != nullptr; flist = flist->next())
- if (!strcmp(flist->name(), "usage"))
- tmpmatches.usage = flist->value();
-
- m_swinfo.push_back(tmpmatches);
- m_filter.region.set(tmpmatches.longname);
- m_filter.publisher.set(tmpmatches.publisher);
- m_filter.year.set(tmpmatches.year);
- m_filter.type.set(tmpmatches.devicetype);
- }
- }
- }
- m_displaylist.resize(m_swinfo.size() + 1);
-
- // retrieve and set the long name of software for parents
- for (size_t y = 1; y < m_swinfo.size(); ++y)
- {
- if (!m_swinfo[y].parentname.empty())
- {
- std::string lparent(m_swinfo[y].parentname);
- bool found = false;
-
- // first scan backward
- for (int x = y; x > 0; --x)
- if (lparent == m_swinfo[x].shortname && m_swinfo[y].listname == m_swinfo[x].listname)
- {
- m_swinfo[y].parentlongname = m_swinfo[x].longname;
- found = true;
- break;
- }
-
- // not found? then scan forward
- for (size_t x = y; !found && x < m_swinfo.size(); ++x)
- if (lparent == m_swinfo[x].shortname && m_swinfo[y].listname == m_swinfo[x].listname)
- {
- m_swinfo[y].parentlongname = m_swinfo[x].longname;
- break;
- }
- }
- }
-
- std::string searchstr, curpath;
- const osd_directory_entry *dir;
- for (auto & elem : m_filter.swlist.name)
- {
- path_iterator path(machine().options().media_path());
- while (path.next(curpath))
- {
- searchstr.assign(curpath).append(PATH_SEPARATOR).append(elem).append(";");
- file_enumerator fpath(searchstr.c_str());
-
- // iterate while we get new objects
- while ((dir = fpath.next()) != nullptr)
- {
- std::string name;
- if (dir->type == ENTTYPE_FILE)
- name = core_filename_extract_base(dir->name, true);
- else if (dir->type == ENTTYPE_DIR && strcmp(dir->name, ".") != 0)
- name = dir->name;
- else
- continue;
-
- strmakelower(name);
- for (auto & yelem : m_swinfo)
- if (yelem.shortname == name && yelem.listname == elem)
- {
- yelem.available = true;
- break;
- }
- }
- }
- }
-
- // sort array
- std::stable_sort(m_swinfo.begin() + 1, m_swinfo.end(), compare_software);
- std::stable_sort(m_filter.region.ui.begin(), m_filter.region.ui.end());
- std::stable_sort(m_filter.year.ui.begin(), m_filter.year.ui.end());
- std::stable_sort(m_filter.type.ui.begin(), m_filter.type.ui.end());
- std::stable_sort(m_filter.publisher.ui.begin(), m_filter.publisher.ui.end());
-
- for (size_t x = 1; x < m_swinfo.size(); ++x)
- m_sortedlist.push_back(&m_swinfo[x]);
-}
-
-//-------------------------------------------------
-// perform our special rendering
-//-------------------------------------------------
-
-void ui_menu_select_software::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
-{
- ui_software_info *swinfo = (ui_software_info *)selectedref;
- const game_driver *driver = nullptr;
- ui_manager &mui = machine().ui();
- float width;
- std::string tempbuf[5], filtered;
- rgb_t color = UI_BACKGROUND_COLOR;
- bool isstar = false;
- float tbarspace = mui.get_line_height();
-
- // determine the text for the header
- int vis_item = (m_search[0] != 0) ? visible_items : (m_has_empty_start ? visible_items - 1 : visible_items);
- strprintf(tempbuf[0], "MAME %s ( %d / %d softwares )", bare_build_version, vis_item, (int)m_swinfo.size() - 1);
- tempbuf[1].assign("Driver: \"").append(m_driver->description).append("\" software list ");
-
- if (sw_filters::actual == UI_SW_REGION && m_filter.region.ui.size() != 0)
- filtered.assign("Region: ").append(m_filter.region.ui[m_filter.region.actual]).append(" - ");
- else if (sw_filters::actual == UI_SW_PUBLISHERS)
- filtered.assign("Publisher: ").append(m_filter.publisher.ui[m_filter.publisher.actual]).append(" - ");
- else if (sw_filters::actual == UI_SW_YEARS)
- filtered.assign("Year: ").append(m_filter.year.ui[m_filter.year.actual]).append(" - ");
- else if (sw_filters::actual == UI_SW_LIST)
- filtered.assign("Software List: ").append(m_filter.swlist.description[m_filter.swlist.actual]).append(" - ");
- else if (sw_filters::actual == UI_SW_TYPE)
- filtered.assign("Device type: ").append(m_filter.type.ui[m_filter.type.actual]).append(" - ");
-
- tempbuf[2].assign(filtered).append("Search: ").append(m_search).append("_");
-
- // get the size of the text
- float maxwidth = origx2 - origx1;
-
- for (int line = 0; line < 3; ++line)
- {
- mui.draw_text_full(container, tempbuf[line].c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += 2 * UI_BOX_LR_BORDER;
- maxwidth = MAX(width, maxwidth);
- }
-
- // compute our bounds
- float x1 = 0.5f - 0.5f * maxwidth;
- float x2 = x1 + maxwidth;
- float y1 = origy1 - top;
- float y2 = origy1 - 3.0f * UI_BOX_TB_BORDER - tbarspace;
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // draw the text within it
- for (int line = 0; line < 3; ++line)
- {
- mui.draw_text_full(container, tempbuf[line].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
- y1 += mui.get_line_height();
- }
-
- // determine the text to render below
- if (swinfo && swinfo->startempty == 1)
- driver = swinfo->driver;
-
- if ((FPTR)driver > 1)
- {
- isstar = machine().favorite().isgame_favorite(driver);
-
- // first line is game description
- strprintf(tempbuf[0], "%-.100s", driver->description);
-
- // next line is year, manufacturer
- strprintf(tempbuf[1], "%s, %-.100s", driver->year, driver->manufacturer);
-
- // next line is clone/parent status
- int cloneof = driver_list::non_bios_clone(*driver);
-
- if (cloneof != -1)
- strprintf(tempbuf[2], "Driver is clone of: %-.100s", driver_list::driver(cloneof).description);
- else
- tempbuf[2] = "Driver is parent";
-
- // next line is overall driver status
- if (driver->flags & MACHINE_NOT_WORKING)
- tempbuf[3] = "Overall: NOT WORKING";
- else if (driver->flags & MACHINE_UNEMULATED_PROTECTION)
- tempbuf[3] = "Overall: Unemulated Protection";
- else
- tempbuf[3] = "Overall: Working";
-
- // next line is graphics, sound status
- if (driver->flags & (MACHINE_IMPERFECT_GRAPHICS | MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_COLORS))
- tempbuf[4] = "Graphics: Imperfect, ";
- else
- tempbuf[4] = "Graphics: OK, ";
-
- if (driver->flags & MACHINE_NO_SOUND)
- tempbuf[4].append("Sound: Unimplemented");
- else if (driver->flags & MACHINE_IMPERFECT_SOUND)
- tempbuf[4].append("Sound: Imperfect");
- else
- tempbuf[4].append("Sound: OK");
-
- color = UI_GREEN_COLOR;
-
- if ((driver->flags & (MACHINE_IMPERFECT_GRAPHICS | MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_COLORS
- | MACHINE_NO_SOUND | MACHINE_IMPERFECT_SOUND)) != 0)
- color = UI_YELLOW_COLOR;
-
- if ((driver->flags & (MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION)) != 0)
- color = UI_RED_COLOR;
-
- }
-
- else if ((FPTR)swinfo > 1)
- {
- isstar = machine().favorite().isgame_favorite(*swinfo);
-
- // first line is long name
- strprintf(tempbuf[0], "%-.100s", swinfo->longname.c_str());
-
- // next line is year, publisher
- strprintf(tempbuf[1], "%s, %-.100s", swinfo->year.c_str(), swinfo->publisher.c_str());
-
- // next line is parent/clone
- if (!swinfo->parentname.empty())
- strprintf(tempbuf[2], "Software is clone of: %-.100s", !swinfo->parentlongname.empty() ? swinfo->parentlongname.c_str() : swinfo->parentname.c_str());
- else
- tempbuf[2] = "Software is parent";
-
- // next line is supported status
- if (swinfo->supported == SOFTWARE_SUPPORTED_NO)
- {
- tempbuf[3] = "Supported: No";
- color = UI_RED_COLOR;
- }
- else if (swinfo->supported == SOFTWARE_SUPPORTED_PARTIAL)
- {
- tempbuf[3] = "Supported: Partial";
- color = UI_YELLOW_COLOR;
- }
- else
- {
- tempbuf[3] = "Supported: Yes";
- color = UI_GREEN_COLOR;
- }
-
- // last line is romset name
- strprintf(tempbuf[4], "romset: %-.100s", swinfo->shortname.c_str());
- }
-
- else
- {
- std::string copyright(emulator_info::get_copyright());
- size_t found = copyright.find("\n");
-
- tempbuf[0].clear();
- tempbuf[1].assign(emulator_info::get_appname()).append(" ").append(build_version);
- tempbuf[2] = copyright.substr(0, found);
- tempbuf[3] = copyright.substr(found + 1);
- tempbuf[4].clear();
- }
-
- // compute our bounds
- x1 = 0.5f - 0.5f * maxwidth;
- x2 = x1 + maxwidth;
- y1 = y2;
- y2 = origy1 - UI_BOX_TB_BORDER;
-
- // draw toolbar
- draw_toolbar(x1, y1, x2, y2, true);
-
- // get the size of the text
- maxwidth = origx2 - origx1;
-
- for (auto & elem : tempbuf)
- {
- mui.draw_text_full(container, elem.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += 2 * UI_BOX_LR_BORDER;
- maxwidth = MAX(maxwidth, width);
- }
-
- // compute our bounds
- x1 = 0.5f - 0.5f * maxwidth;
- x2 = x1 + maxwidth;
- y1 = origy2 + UI_BOX_TB_BORDER;
- y2 = origy2 + bottom;
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, color);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // is favorite? draw the star
- if (isstar)
- draw_star(x1, y1);
-
- // draw all lines
- for (auto & elem : tempbuf)
- {
- mui.draw_text_full(container, elem.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
- y1 += machine().ui().get_line_height();
- }
-}
-
-//-------------------------------------------------
-// handle select key event
-//-------------------------------------------------
-
-void ui_menu_select_software::inkey_select(const ui_menu_event *m_event)
-{
- ui_software_info *ui_swinfo = (ui_software_info *)m_event->itemref;
- ui_options &mopt = machine().ui().options();
-
- if (ui_swinfo->startempty == 1)
- {
- std::vector<s_bios> biosname;
- if (!mopt.skip_bios_menu() && has_multiple_bios(ui_swinfo->driver, biosname))
- ui_menu::stack_push(global_alloc_clear<ui_bios_selection>(machine(), container, biosname, (void *)ui_swinfo->driver, false, true));
- else
- {
- reselect_last::driver = ui_swinfo->driver->name;
- reselect_last::software = "[Start empty]";
- reselect_last::swlist.clear();
- reselect_last::set(true);
- machine().manager().schedule_new_driver(*ui_swinfo->driver);
- machine().schedule_hard_reset();
- ui_menu::stack_reset(machine());
- }
- }
-
- else
- {
- // first validate
- driver_enumerator drivlist(machine().options(), *ui_swinfo->driver);
- media_auditor auditor(drivlist);
- 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());
-
- media_auditor::summary summary = auditor.audit_software(swlist->list_name(), swinfo, AUDIT_VALIDATE_FAST);
-
- if (summary == media_auditor::CORRECT || summary == media_auditor::BEST_AVAILABLE || summary == media_auditor::NONE_NEEDED)
- {
- std::vector<s_bios> biosname;
- if (!mopt.skip_bios_menu() && has_multiple_bios(ui_swinfo->driver, biosname))
- {
- ui_menu::stack_push(global_alloc_clear<ui_bios_selection>(machine(), container, biosname, (void *)ui_swinfo, true, false));
- return;
- }
- else if (!mopt.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())
- {
- if (swpart->matches_interface(ui_swinfo->interface.c_str()))
- {
- std::string menu_part_name(swpart->name());
- if (swpart->feature("part_id") != nullptr)
- menu_part_name.assign("(").append(swpart->feature("part_id")).append(")");
- parts.emplace(swpart->name(), menu_part_name);
- }
- }
- ui_menu::stack_push(global_alloc_clear<ui_software_parts>(machine(), container, parts, ui_swinfo));
- return;
- }
- std::string error_string;
- std::string string_list = std::string(ui_swinfo->listname).append(":").append(ui_swinfo->shortname).append(":").append(ui_swinfo->part).append(":").append(ui_swinfo->instance);
- machine().options().set_value(OPTION_SOFTWARENAME, string_list.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
- std::string snap_list = std::string(ui_swinfo->listname).append(PATH_SEPARATOR).append(ui_swinfo->shortname);
- machine().options().set_value(OPTION_SNAPNAME, snap_list.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
- reselect_last::driver = drivlist.driver().name;
- reselect_last::software = ui_swinfo->shortname;
- reselect_last::swlist = ui_swinfo->listname;
- reselect_last::set(true);
- machine().manager().schedule_new_driver(drivlist.driver());
- machine().schedule_hard_reset();
- ui_menu::stack_reset(machine());
- }
-
- // otherwise, display an error
- else
- {
- reset(UI_MENU_RESET_REMEMBER_POSITION);
- ui_error = true;
- }
- }
-}
-
-//-------------------------------------------------
-// handle special key event
-//-------------------------------------------------
-
-void ui_menu_select_software::inkey_special(const ui_menu_event *m_event)
-{
- int buflen = strlen(m_search);
-
- // if it's a backspace and we can handle it, do so
- if ((m_event->unichar == 8 || m_event->unichar == 0x7f) && buflen > 0)
- {
- *(char *)utf8_previous_char(&m_search[buflen]) = 0;
- reset(UI_MENU_RESET_SELECT_FIRST);
- }
-
- // if it's any other key and we're not maxed out, update
- else if (m_event->unichar >= ' ' && m_event->unichar < 0x7f)
- {
- buflen += utf8_from_uchar(&m_search[buflen], ARRAY_LENGTH(m_search) - buflen, m_event->unichar);
- m_search[buflen] = 0;
- reset(UI_MENU_RESET_SELECT_FIRST);
- }
-}
-
-//-------------------------------------------------
-// load custom filters info from file
-//-------------------------------------------------
-
-void ui_menu_select_software::load_sw_custom_filters()
-{
- // attempt to open the output file
- emu_file file(machine().ui().options().ui_path(), OPEN_FLAG_READ);
- if (file.open("custom_", m_driver->name, "_filter.ini") == FILERR_NONE)
- {
- char buffer[MAX_CHAR_INFO];
-
- // get number of filters
- file.gets(buffer, MAX_CHAR_INFO);
- char *pb = strchr(buffer, '=');
- sw_custfltr::numother = atoi(++pb) - 1;
-
- // get main filter
- file.gets(buffer, MAX_CHAR_INFO);
- pb = strchr(buffer, '=') + 2;
-
- for (int y = 0; y < sw_filters::length; ++y)
- if (!strncmp(pb, sw_filters::text[y], strlen(sw_filters::text[y])))
- {
- sw_custfltr::main = y;
- break;
- }
-
- for (int x = 1; x <= sw_custfltr::numother; ++x)
- {
- file.gets(buffer, MAX_CHAR_INFO);
- char *cb = strchr(buffer, '=') + 2;
- for (int y = 0; y < sw_filters::length; y++)
- {
- if (!strncmp(cb, sw_filters::text[y], strlen(sw_filters::text[y])))
- {
- sw_custfltr::other[x] = y;
- if (y == UI_SW_PUBLISHERS)
- {
- file.gets(buffer, MAX_CHAR_INFO);
- char *ab = strchr(buffer, '=') + 2;
- for (size_t z = 0; z < m_filter.publisher.ui.size(); ++z)
- if (!strncmp(ab, m_filter.publisher.ui[z].c_str(), m_filter.publisher.ui[z].length()))
- sw_custfltr::mnfct[x] = z;
- }
- else if (y == UI_SW_YEARS)
- {
- file.gets(buffer, MAX_CHAR_INFO);
- char *db = strchr(buffer, '=') + 2;
- for (size_t z = 0; z < m_filter.year.ui.size(); ++z)
- if (!strncmp(db, m_filter.year.ui[z].c_str(), m_filter.year.ui[z].length()))
- sw_custfltr::year[x] = z;
- }
- else if (y == UI_SW_LIST)
- {
- file.gets(buffer, MAX_CHAR_INFO);
- char *gb = strchr(buffer, '=') + 2;
- for (size_t z = 0; z < m_filter.swlist.name.size(); ++z)
- if (!strncmp(gb, m_filter.swlist.name[z].c_str(), m_filter.swlist.name[z].length()))
- sw_custfltr::list[x] = z;
- }
- else if (y == UI_SW_TYPE)
- {
- file.gets(buffer, MAX_CHAR_INFO);
- char *fb = strchr(buffer, '=') + 2;
- for (size_t z = 0; z < m_filter.type.ui.size(); ++z)
- if (!strncmp(fb, m_filter.type.ui[z].c_str(), m_filter.type.ui[z].length()))
- sw_custfltr::type[x] = z;
- }
- else if (y == UI_SW_REGION)
- {
- file.gets(buffer, MAX_CHAR_INFO);
- char *eb = strchr(buffer, '=') + 2;
- for (size_t z = 0; z < m_filter.region.ui.size(); ++z)
- if (!strncmp(eb, m_filter.region.ui[z].c_str(), m_filter.region.ui[z].length()))
- sw_custfltr::region[x] = z;
- }
- }
- }
- }
- file.close();
- }
-}
-
-//-------------------------------------------------
-// set software regions
-//-------------------------------------------------
-
-void c_sw_region::set(std::string &str)
-{
- std::string name = getname(str);
- if (std::find(ui.begin(), ui.end(), name) != ui.end())
- return;
-
- ui.push_back(name);
-}
-
-std::string c_sw_region::getname(std::string &str)
-{
- std::string fullname(str);
- strmakelower(fullname);
- size_t found = fullname.find("(");
-
- if (found != std::string::npos)
- {
- size_t ends = fullname.find_first_not_of("abcdefghijklmnopqrstuvwxyz", found + 1);
- std::string temp(fullname.substr(found + 1, ends - found - 1));
-
- for (auto & elem : region_lists)
- if (temp == elem)
- return (str.substr(found + 1, ends - found - 1));
- }
- return std::string("<none>");
-}
-
-//-------------------------------------------------
-// set software device type
-//-------------------------------------------------
-
-void c_sw_type::set(std::string &str)
-{
- if (std::find(ui.begin(), ui.end(), str) != ui.end())
- return;
-
- ui.push_back(str);
-}
-
-//-------------------------------------------------
-// set software years
-//-------------------------------------------------
-
-void c_sw_year::set(std::string &str)
-{
- if (std::find(ui.begin(), ui.end(), str) != ui.end())
- return;
-
- ui.push_back(str);
-}
-
-//-------------------------------------------------
-// set software publishers
-//-------------------------------------------------
-
-void c_sw_publisher::set(std::string &str)
-{
- std::string name = getname(str);
- if (std::find(ui.begin(), ui.end(), name) != ui.end())
- return;
-
- ui.push_back(name);
-}
-
-std::string c_sw_publisher::getname(std::string &str)
-{
- size_t found = str.find("(");
-
- if (found != std::string::npos)
- return (str.substr(0, found - 1));
- else
- return str;
-}
-
-//-------------------------------------------------
-// build display list
-//-------------------------------------------------
-void ui_menu_select_software::build_list(std::vector<ui_software_info *> &s_drivers, const char *filter_text, int filter)
-{
-
- if (s_drivers.empty() && filter == -1)
- {
- filter = sw_filters::actual;
- s_drivers = m_sortedlist;
- }
-
- // iterate over entries
- for (auto & s_driver : s_drivers)
- {
- switch (filter)
- {
- case UI_SW_PARENTS:
- if (s_driver->parentname.empty())
- m_displaylist.push_back(s_driver);
- break;
-
- case UI_SW_CLONES:
- if (!s_driver->parentname.empty())
- m_displaylist.push_back(s_driver);
- break;
-
- case UI_SW_AVAILABLE:
- if (s_driver->available)
- m_displaylist.push_back(s_driver);
- break;
-
- case UI_SW_UNAVAILABLE:
- if (!s_driver->available)
- m_displaylist.push_back(s_driver);
- break;
-
- case UI_SW_SUPPORTED:
- if (s_driver->supported == SOFTWARE_SUPPORTED_YES)
- m_displaylist.push_back(s_driver);
- break;
-
- case UI_SW_PARTIAL_SUPPORTED:
- if (s_driver->supported == SOFTWARE_SUPPORTED_PARTIAL)
- m_displaylist.push_back(s_driver);
- break;
-
- case UI_SW_UNSUPPORTED:
- if (s_driver->supported == SOFTWARE_SUPPORTED_NO)
- m_displaylist.push_back(s_driver);
- break;
-
- case UI_SW_REGION:
- {
- std::string name = m_filter.region.getname(s_driver->longname);
-
- if(!name.empty() && name == filter_text)
- m_displaylist.push_back(s_driver);
- break;
- }
-
- case UI_SW_PUBLISHERS:
- {
- std::string name = m_filter.publisher.getname(s_driver->publisher);
-
- if(!name.empty() && name == filter_text)
- m_displaylist.push_back(s_driver);
- break;
- }
-
- case UI_SW_YEARS:
- if(s_driver->year == filter_text)
- m_displaylist.push_back(s_driver);
- break;
-
- case UI_SW_LIST:
- if(s_driver->listname == filter_text)
- m_displaylist.push_back(s_driver);
- break;
-
- case UI_SW_TYPE:
- if(s_driver->devicetype == filter_text)
- m_displaylist.push_back(s_driver);
- break;
-
- default:
- m_displaylist.push_back(s_driver);
- break;
- }
- }
-}
-
-//-------------------------------------------------
-// find approximate matches
-//-------------------------------------------------
-
-void ui_menu_select_software::find_matches(const char *str, int count)
-{
- // allocate memory to track the penalty value
- std::vector<int> penalty(count, 9999);
- int index = 0;
-
- for (; m_displaylist[index]; ++index)
- {
- // pick the best match between driver name and description
- int curpenalty = fuzzy_substring(str, m_displaylist[index]->longname);
- int tmp = fuzzy_substring(str, m_displaylist[index]->shortname);
- curpenalty = MIN(curpenalty, tmp);
-
- // insert into the sorted table of matches
- for (int matchnum = count - 1; matchnum >= 0; --matchnum)
- {
- // stop if we're worse than the current entry
- if (curpenalty >= penalty[matchnum])
- break;
-
- // as long as this isn't the last entry, bump this one down
- if (matchnum < count - 1)
- {
- penalty[matchnum + 1] = penalty[matchnum];
- m_searchlist[matchnum + 1] = m_searchlist[matchnum];
- }
-
- m_searchlist[matchnum] = m_displaylist[index];
- penalty[matchnum] = curpenalty;
- }
- }
- (index < count) ? m_searchlist[index] = nullptr : m_searchlist[count] = nullptr;
-}
-
-//-------------------------------------------------
-// build custom display list
-//-------------------------------------------------
-
-void ui_menu_select_software::build_custom()
-{
- std::vector<ui_software_info *> s_drivers;
-
- build_list(m_sortedlist, nullptr, sw_custfltr::main);
-
- for (int count = 1; count <= sw_custfltr::numother; ++count)
- {
- int filter = sw_custfltr::other[count];
- s_drivers = m_displaylist;
- m_displaylist.clear();
-
- switch (filter)
- {
- case UI_SW_YEARS:
- build_list(s_drivers, m_filter.year.ui[sw_custfltr::year[count]].c_str(), filter);
- break;
- case UI_SW_LIST:
- build_list(s_drivers, m_filter.swlist.name[sw_custfltr::list[count]].c_str(), filter);
- break;
- case UI_SW_TYPE:
- build_list(s_drivers, m_filter.type.ui[sw_custfltr::type[count]].c_str(), filter);
- break;
- case UI_SW_PUBLISHERS:
- build_list(s_drivers, m_filter.publisher.ui[sw_custfltr::mnfct[count]].c_str(), filter);
- break;
- case UI_SW_REGION:
- build_list(s_drivers, m_filter.region.ui[sw_custfltr::region[count]].c_str(), filter);
- break;
- default:
- build_list(s_drivers, nullptr, filter);
- break;
- }
- }
-}
-
-//-------------------------------------------------
-// draw left box
-//-------------------------------------------------
-
-float ui_menu_select_software::draw_left_panel(float x1, float y1, float x2, float y2)
-{
- ui_manager &mui = machine().ui();
-
- if (ui_globals::panels_status == SHOW_PANELS || ui_globals::panels_status == HIDE_RIGHT_PANEL)
- {
- float origy1 = y1;
- float origy2 = y2;
- float text_size = 0.75f;
- float l_height = mui.get_line_height();
- float line_height = l_height * text_size;
- float left_width = 0.0f;
- int text_lenght = sw_filters::length;
- int afilter = sw_filters::actual;
- int phover = HOVER_SW_FILTER_FIRST;
- const char **text = sw_filters::text;
- float sc = y2 - y1 - (2.0f * UI_BOX_TB_BORDER);
-
- if ((text_lenght * line_height) > sc)
- {
- float lm = sc / (text_lenght);
- text_size = lm / l_height;
- line_height = l_height * text_size;
- }
-
- float text_sign = mui.get_string_width_ex("_# ", text_size);
- for (int x = 0; x < text_lenght; ++x)
- {
- float total_width;
-
- // compute width of left hand side
- total_width = mui.get_string_width_ex(text[x], text_size);
- total_width += text_sign;
-
- // track the maximum
- if (total_width > left_width)
- left_width = total_width;
- }
-
- x2 = x1 + left_width + 2.0f * UI_BOX_LR_BORDER;
- //machine().ui().draw_outlined_box(container, x1, y1, x2, y2, rgb_t(0xEF, 0x12, 0x47, 0x7B));
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
- y2 -= UI_BOX_TB_BORDER;
-
- for (int filter = 0; filter < text_lenght; ++filter)
- {
- std::string str(text[filter]);
- rgb_t bgcolor = UI_TEXT_BG_COLOR;
- rgb_t fgcolor = UI_TEXT_COLOR;
-
- if (mouse_hit && x1 <= mouse_x && x2 > mouse_x && y1 <= mouse_y && y1 + line_height > mouse_y)
- {
- bgcolor = UI_MOUSEOVER_BG_COLOR;
- fgcolor = UI_MOUSEOVER_COLOR;
- hover = phover + filter;
- }
-
- if (afilter == filter)
- {
- bgcolor = UI_SELECTED_BG_COLOR;
- fgcolor = UI_SELECTED_COLOR;
- }
-
- if (bgcolor != UI_TEXT_BG_COLOR)
- container->add_rect(x1, y1, x2, y1 + line_height, bgcolor, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE));
-
- float x1t = x1 + text_sign;
- if (afilter == UI_SW_CUSTOM)
- {
- if (filter == sw_custfltr::main)
- {
- str.assign("@custom1 ").append(text[filter]);
- x1t -= text_sign;
- }
- else
- {
- for (int count = 1; count <= sw_custfltr::numother; ++count)
- {
- int cfilter = sw_custfltr::other[count];
- if (cfilter == filter)
- {
- strprintf(str, "@custom%d %s", count + 1, text[filter]);
- x1t -= text_sign;
- break;
- }
- }
- }
- convert_command_glyph(str);
- }
-
- mui.draw_text_full(container, str.c_str(), x1t, y1, x2 - x1, JUSTIFY_LEFT, WRAP_NEVER,
- DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr, text_size);
- y1 += line_height;
- }
-
- x1 = x2 + UI_BOX_LR_BORDER;
- x2 = x1 + 2.0f * UI_BOX_LR_BORDER;
- y1 = origy1;
- y2 = origy2;
- line_height = mui.get_line_height();
- float lr_arrow_width = 0.4f * line_height * machine().render().ui_aspect();
- rgb_t fgcolor = UI_TEXT_COLOR;
-
- // set left-right arrows dimension
- float ar_x0 = 0.5f * (x2 + x1) - 0.5f * lr_arrow_width;
- float ar_y0 = 0.5f * (y2 + y1) + 0.1f * line_height;
- float ar_x1 = ar_x0 + lr_arrow_width;
- float ar_y1 = 0.5f * (y2 + y1) + 0.9f * line_height;
-
- //machine().ui().draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR);
- mui.draw_outlined_box(container, x1, y1, x2, y2, rgb_t(0xEF, 0x12, 0x47, 0x7B));
-
- if (mouse_hit && x1 <= mouse_x && x2 > mouse_x && y1 <= mouse_y && y2 > mouse_y)
- {
- fgcolor = UI_MOUSEOVER_COLOR;
- hover = HOVER_LPANEL_ARROW;
- }
-
- draw_arrow(container, ar_x0, ar_y0, ar_x1, ar_y1, fgcolor, ROT90 ^ ORIENTATION_FLIP_X);
- return x2 + UI_BOX_LR_BORDER;
- }
- else
- {
- float line_height = mui.get_line_height();
- float lr_arrow_width = 0.4f * line_height * machine().render().ui_aspect();
- rgb_t fgcolor = UI_TEXT_COLOR;
-
- // set left-right arrows dimension
- float ar_x0 = 0.5f * (x2 + x1) - 0.5f * lr_arrow_width;
- float ar_y0 = 0.5f * (y2 + y1) + 0.1f * line_height;
- float ar_x1 = ar_x0 + lr_arrow_width;
- float ar_y1 = 0.5f * (y2 + y1) + 0.9f * line_height;
-
- //machine().ui().draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR);
- mui.draw_outlined_box(container, x1, y1, x2, y2, rgb_t(0xEF, 0x12, 0x47, 0x7B));
-
- if (mouse_hit && x1 <= mouse_x && x2 > mouse_x && y1 <= mouse_y && y2 > mouse_y)
- {
- fgcolor = UI_MOUSEOVER_COLOR;
- hover = HOVER_LPANEL_ARROW;
- }
-
- draw_arrow(container, ar_x0, ar_y0, ar_x1, ar_y1, fgcolor, ROT90);
- return x2 + UI_BOX_LR_BORDER;
- }
-}
-
-//-------------------------------------------------
-// draw infos
-//-------------------------------------------------
-
-void ui_menu_select_software::infos_render(void *selectedref, float origx1, float origy1, float origx2, float origy2)
-{
- ui_manager &mui = machine().ui();
- float line_height = mui.get_line_height();
- static std::string buffer;
- std::vector<int> xstart;
- std::vector<int> xend;
- float text_size = machine().ui().options().infos_size();
- ui_software_info *soft = (ui_software_info *)selectedref;
- static ui_software_info *oldsoft = nullptr;
- static int old_sw_view = -1;
-
- float gutter_width = 0.4f * line_height * machine().render().ui_aspect() * 1.3f;
- float ud_arrow_width = line_height * machine().render().ui_aspect();
- float oy1 = origy1 + line_height;
-
- // apply title to right panel
- if (soft && soft->usage.empty())
- {
- mui.draw_text_full(container, "History", origx1, origy1, origx2 - origx1, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
- ui_globals::cur_sw_dats_view = 0;
- }
- else
- {
- float title_size = 0.0f;
- float txt_lenght = 0.0f;
- std::string t_text[2];
- t_text[0] = "History";
- t_text[1] = "Usage";
-
- for (auto & elem : t_text)
- {
- mui.draw_text_full(container, elem.c_str(), origx1, origy1, origx2 - origx1, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NONE, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, &txt_lenght, nullptr);
- txt_lenght += 0.01f;
- title_size = MAX(txt_lenght, title_size);
- }
-
- mui.draw_text_full(container, t_text[ui_globals::cur_sw_dats_view].c_str(), origx1, origy1, origx2 - origx1,
- JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR,
- nullptr, nullptr);
-
- draw_common_arrow(origx1, origy1, origx2, origy2, ui_globals::cur_sw_dats_view, 0, 1, title_size);
- }
-
- if (oldsoft != soft || old_sw_view != ui_globals::cur_sw_dats_view)
- {
- buffer.clear();
- old_sw_view = ui_globals::cur_sw_dats_view;
- oldsoft = soft;
- if (ui_globals::cur_sw_dats_view == 0)
- {
- if (soft->startempty == 1)
- machine().datfile().load_data_info(soft->driver, buffer, UI_HISTORY_LOAD);
- else
- machine().datfile().load_software_info(soft->listname, buffer, soft->shortname, soft->parentname);
- }
- else
- buffer = soft->usage;
- }
-
- if (buffer.empty())
- {
- mui.draw_text_full(container, "No Infos Available", origx1, (origy2 + origy1) * 0.5f, origx2 - origx1, JUSTIFY_CENTER,
- WRAP_WORD, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
- return;
- }
- else
- totallines = mui.wrap_text(container, buffer.c_str(), origx1, origy1, origx2 - origx1 - (2.0f * gutter_width), xstart, xend, text_size);
-
- int r_visible_lines = floor((origy2 - oy1) / (line_height * text_size));
- if (totallines < r_visible_lines)
- r_visible_lines = totallines;
- if (topline_datsview < 0)
- topline_datsview = 0;
- if (topline_datsview + r_visible_lines >= totallines)
- topline_datsview = totallines - r_visible_lines;
-
- for (int r = 0; r < r_visible_lines; ++r)
- {
- int itemline = r + topline_datsview;
- std::string tempbuf;
- tempbuf.assign(buffer.substr(xstart[itemline], xend[itemline] - xstart[itemline]));
-
- // up arrow
- if (r == 0 && topline_datsview != 0)
- info_arrow(0, origx1, origx2, oy1, line_height, text_size, ud_arrow_width);
- // bottom arrow
- else if (r == r_visible_lines - 1 && itemline != totallines - 1)
- info_arrow(1, origx1, origx2, oy1, line_height, text_size, ud_arrow_width);
- else
- mui.draw_text_full(container, tempbuf.c_str(), origx1 + gutter_width, oy1, origx2 - origx1,
- JUSTIFY_LEFT, WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR,
- nullptr, nullptr, text_size);
- oy1 += (line_height * text_size);
- }
-
- // return the number of visible lines, minus 1 for top arrow and 1 for bottom arrow
- right_visible_lines = r_visible_lines - (topline_datsview != 0) - (topline_datsview + r_visible_lines != totallines);
-}
-
-//-------------------------------------------------
-// perform our special rendering
-//-------------------------------------------------
-
-void ui_menu_select_software::arts_render(void *selectedref, float origx1, float origy1, float origx2, float origy2)
-{
- ui_manager &mui = machine().ui();
- float line_height = mui.get_line_height();
- static ui_software_info *oldsoft = nullptr;
- static const game_driver *olddriver = nullptr;
- const game_driver *driver = nullptr;
- ui_software_info *soft = (ui_software_info *)selectedref;
-
- if (soft && soft->startempty == 1)
- {
- driver = soft->driver;
- oldsoft = nullptr;
- }
- else
- olddriver = nullptr;
-
- if (driver)
- {
- if (ui_globals::default_image)
- ((driver->flags & MACHINE_TYPE_ARCADE) == 0) ? ui_globals::curimage_view = CABINETS_VIEW : ui_globals::curimage_view = SNAPSHOT_VIEW;
-
- std::string searchstr;
- searchstr = arts_render_common(origx1, origy1, origx2, origy2);
-
- // loads the image if necessary
- if (driver != olddriver || !snapx_bitmap->valid() || ui_globals::switch_image)
- {
- emu_file snapfile(searchstr.c_str(), OPEN_FLAG_READ);
- bitmap_argb32 *tmp_bitmap;
- tmp_bitmap = auto_alloc(machine(), bitmap_argb32);
-
- // try to load snapshot first from saved "0000.png" file
- std::string fullname(driver->name);
- render_load_png(*tmp_bitmap, snapfile, fullname.c_str(), "0000.png");
-
- if (!tmp_bitmap->valid())
- render_load_jpeg(*tmp_bitmap, snapfile, fullname.c_str(), "0000.jpg");
-
- // if fail, attemp to load from standard file
- if (!tmp_bitmap->valid())
- {
- fullname.assign(driver->name).append(".png");
- render_load_png(*tmp_bitmap, snapfile, nullptr, fullname.c_str());
-
- if (!tmp_bitmap->valid())
- {
- fullname.assign(driver->name).append(".jpg");
- render_load_jpeg(*tmp_bitmap, snapfile, nullptr, fullname.c_str());
- }
- }
-
- // if fail again, attemp to load from parent file
- if (!tmp_bitmap->valid())
- {
- // set clone status
- bool cloneof = strcmp(driver->parent, "0");
- if (cloneof)
- {
- int cx = driver_list::find(driver->parent);
- if (cx != -1 && ((driver_list::driver(cx).flags & MACHINE_IS_BIOS_ROOT) != 0))
- cloneof = false;
- }
-
- if (cloneof)
- {
- fullname.assign(driver->parent).append(".png");
- render_load_png(*tmp_bitmap, snapfile, nullptr, fullname.c_str());
-
- if (!tmp_bitmap->valid())
- {
- fullname.assign(driver->parent).append(".jpg");
- render_load_jpeg(*tmp_bitmap, snapfile, nullptr, fullname.c_str());
- }
- }
- }
-
- olddriver = driver;
- ui_globals::switch_image = false;
- arts_render_images(tmp_bitmap, origx1, origy1, origx2, origy2, false);
- auto_free(machine(), tmp_bitmap);
- }
-
- // if the image is available, loaded and valid, display it
- if (snapx_bitmap->valid())
- {
- float x1 = origx1 + 0.01f;
- float x2 = origx2 - 0.01f;
- float y1 = origy1 + UI_BOX_TB_BORDER + line_height;
- float y2 = origy2 - UI_BOX_TB_BORDER - line_height;
-
- // apply texture
- container->add_quad( x1, y1, x2, y2, ARGB_WHITE, snapx_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
- }
- }
- else if (soft)
- {
- std::string fullname, pathname;
- if (ui_globals::default_image)
- (soft->startempty == 0) ? ui_globals::curimage_view = SNAPSHOT_VIEW : ui_globals::curimage_view = CABINETS_VIEW;
-
- // arts title and searchpath
- std::string searchstr;
- searchstr = arts_render_common(origx1, origy1, origx2, origy2);
-
- // loads the image if necessary
- if (soft != oldsoft || !snapx_bitmap->valid() || ui_globals::switch_image)
- {
- emu_file snapfile(searchstr.c_str(), OPEN_FLAG_READ);
- bitmap_argb32 *tmp_bitmap;
- tmp_bitmap = auto_alloc(machine(), bitmap_argb32);
-
- if (soft->startempty == 1)
- {
- // Load driver snapshot
- fullname.assign(soft->driver->name).append(".png");
- render_load_png(*tmp_bitmap, snapfile, nullptr, fullname.c_str());
-
- if (!tmp_bitmap->valid())
- {
- fullname.assign(soft->driver->name).append(".jpg");
- render_load_jpeg(*tmp_bitmap, snapfile, nullptr, fullname.c_str());
- }
- }
- else if (ui_globals::curimage_view == TITLES_VIEW)
- {
- // First attempt from name list
- pathname.assign(soft->listname).append("_titles");
- fullname.assign(soft->shortname).append(".png");
- render_load_png(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str());
-
- if (!tmp_bitmap->valid())
- {
- fullname.assign(soft->shortname).append(".jpg");
- render_load_jpeg(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str());
- }
- }
- else
- {
- // First attempt from name list
- pathname = soft->listname;
- fullname.assign(soft->shortname).append(".png");
- render_load_png(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str());
-
- if (!tmp_bitmap->valid())
- {
- fullname.assign(soft->shortname).append(".jpg");
- render_load_jpeg(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str());
- }
-
- if (!tmp_bitmap->valid())
- {
- // Second attempt from driver name + part name
- pathname.assign(soft->driver->name).append(soft->part);
- fullname.assign(soft->shortname).append(".png");
- render_load_png(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str());
-
- if (!tmp_bitmap->valid())
- {
- fullname.assign(soft->shortname).append(".jpg");
- render_load_jpeg(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str());
- }
- }
- }
-
- oldsoft = soft;
- ui_globals::switch_image = false;
- arts_render_images(tmp_bitmap, origx1, origy1, origx2, origy2, true);
- auto_free(machine(), tmp_bitmap);
- }
-
- // if the image is available, loaded and valid, display it
- if (snapx_bitmap->valid())
- {
- float x1 = origx1 + 0.01f;
- float x2 = origx2 - 0.01f;
- float y1 = origy1 + UI_BOX_TB_BORDER + line_height;
- float y2 = origy2 - UI_BOX_TB_BORDER - line_height;
-
- // apply texture
- container->add_quad(x1, y1, x2, y2, ARGB_WHITE, snapx_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
- }
- }
-}
-
-void ui_menu_select_software::draw_right_panel(void *selectedref, float origx1, float origy1, float origx2, float origy2)
-{
- ui_manager &mui = machine().ui();
- float line_height = mui.get_line_height();
- float lr_arrow_width = 0.4f * line_height * machine().render().ui_aspect();
- rgb_t fgcolor = UI_TEXT_COLOR;
- bool hide = (ui_globals::panels_status == HIDE_RIGHT_PANEL || ui_globals::panels_status == HIDE_BOTH);
- float x2 = (hide) ? origx2 : origx1 + 2.0f * UI_BOX_LR_BORDER;
-
- // set left-right arrows dimension
- float ar_x0 = 0.5f * (x2 + origx1) - 0.5f * lr_arrow_width;
- float ar_y0 = 0.5f * (origy2 + origy1) + 0.1f * line_height;
- float ar_x1 = ar_x0 + lr_arrow_width;
- float ar_y1 = 0.5f * (origy2 + origy1) + 0.9f * line_height;
-
- //machine().ui().draw_outlined_box(container, origx1, origy1, origx2, origy2, UI_BACKGROUND_COLOR);
- mui.draw_outlined_box(container, origx1, origy1, origx2, origy2, rgb_t(0xEF, 0x12, 0x47, 0x7B));
-
- if (mouse_hit && origx1 <= mouse_x && x2 > mouse_x && origy1 <= mouse_y && origy2 > mouse_y)
- {
- fgcolor = UI_MOUSEOVER_COLOR;
- hover = HOVER_RPANEL_ARROW;
- }
-
- if (hide)
- {
- draw_arrow(container, ar_x0, ar_y0, ar_x1, ar_y1, fgcolor, ROT90 ^ ORIENTATION_FLIP_X);
- return;
- }
-
- draw_arrow(container, ar_x0, ar_y0, ar_x1, ar_y1, fgcolor, ROT90);
- origx1 = x2;
- origy1 = draw_right_box_title(origx1, origy1, origx2, origy2);
-
- if (ui_globals::rpanel == RP_IMAGES)
- arts_render(selectedref, origx1, origy1, origx2, origy2);
- else
- infos_render(selectedref, origx1, origy1, origx2, origy2);
-}
-
-//-------------------------------------------------
-// ctor
-//-------------------------------------------------
-
-ui_software_parts::ui_software_parts(running_machine &machine, render_container *container, std::unordered_map<std::string, std::string> parts, ui_software_info *ui_info) : ui_menu(machine, container)
-{
- m_parts = parts;
- m_uiinfo = ui_info;
-}
-
-//-------------------------------------------------
-// dtor
-//-------------------------------------------------
-
-ui_software_parts::~ui_software_parts()
-{
-}
-
-//-------------------------------------------------
-// populate
-//-------------------------------------------------
-
-void ui_software_parts::populate()
-{
- for (auto & elem : m_parts)
- item_append(elem.first.c_str(), elem.second.c_str(), 0, (void *)&elem);
-
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
- customtop = machine().ui().get_line_height() + (3.0f * UI_BOX_TB_BORDER);
-}
-
-//-------------------------------------------------
-// handle
-//-------------------------------------------------
-
-void ui_software_parts::handle()
-{
- // process the menu
- const ui_menu_event *event = process(0);
- if (event != nullptr && event->iptkey == IPT_UI_SELECT && event->itemref != nullptr)
- for (auto & elem : m_parts)
- if ((void*)&elem == event->itemref)
- {
- std::string error_string;
- std::string string_list = std::string(m_uiinfo->listname).append(":").append(m_uiinfo->shortname).append(":").append(elem.first).append(":").append(m_uiinfo->instance);
- machine().options().set_value(OPTION_SOFTWARENAME, string_list.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
-
- reselect_last::driver = m_uiinfo->driver->name;
- reselect_last::software = m_uiinfo->shortname;
- reselect_last::swlist = m_uiinfo->listname;
- reselect_last::set(true);
-
- std::string snap_list = std::string(m_uiinfo->listname).append("/").append(m_uiinfo->shortname);
- machine().options().set_value(OPTION_SNAPNAME, snap_list.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
-
- machine().manager().schedule_new_driver(*m_uiinfo->driver);
- machine().schedule_hard_reset();
- ui_menu::stack_reset(machine());
- }
-}
-
-//-------------------------------------------------
-// perform our special rendering
-//-------------------------------------------------
-
-void ui_software_parts::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
-{
- float width;
- ui_manager &mui = machine().ui();
- mui.draw_text_full(container, "Software part selection:", 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += 2 * UI_BOX_LR_BORDER;
- float maxwidth = MAX(origx2 - origx1, width);
-
- // compute our bounds
- float x1 = 0.5f - 0.5f * maxwidth;
- float x2 = x1 + maxwidth;
- float y1 = origy1 - top;
- float y2 = origy1 - UI_BOX_TB_BORDER;
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // draw the text within it
- mui.draw_text_full(container, "Software part selection:", x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
-}
-
-//-------------------------------------------------
-// ctor
-//-------------------------------------------------
-
-ui_bios_selection::ui_bios_selection(running_machine &machine, render_container *container, std::vector<s_bios> biosname, void *_driver, bool _software, bool _inlist) : ui_menu(machine, container)
-{
- m_bios = biosname;
- m_driver = _driver;
- m_software = _software;
- m_inlist = _inlist;
-}
-
-//-------------------------------------------------
-// dtor
-//-------------------------------------------------
-
-ui_bios_selection::~ui_bios_selection()
-{
-}
-
-//-------------------------------------------------
-// populate
-//-------------------------------------------------
-
-void ui_bios_selection::populate()
-{
- for (auto & elem : m_bios)
- item_append(elem.name.c_str(), nullptr, 0, (void *)&elem.name);
-
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
- customtop = machine().ui().get_line_height() + (3.0f * UI_BOX_TB_BORDER);
-}
-
-//-------------------------------------------------
-// handle
-//-------------------------------------------------
-
-void ui_bios_selection::handle()
-{
- // process the menu
- const ui_menu_event *event = process(0);
- ui_options &moptions = machine().ui().options();
- if (event != nullptr && event->iptkey == IPT_UI_SELECT && event->itemref != nullptr)
- for (auto & elem : m_bios)
- if ((void*)&elem.name == event->itemref)
- {
- if (!m_software)
- {
- const game_driver *s_driver = (const game_driver *)m_driver;
- reselect_last::driver = s_driver->name;
- if (m_inlist)
- reselect_last::software = "[Start empty]";
- else
- {
- reselect_last::software.clear();
- reselect_last::swlist.clear();
- reselect_last::set(true);
- }
-
- std::string error;
- moptions.set_value("bios", elem.id, OPTION_PRIORITY_CMDLINE, error);
- machine().manager().schedule_new_driver(*s_driver);
- machine().schedule_hard_reset();
- ui_menu::stack_reset(machine());
- }
- else
- {
- ui_software_info *ui_swinfo = (ui_software_info *)m_driver;
- std::string error;
- machine().options().set_value("bios", elem.id, OPTION_PRIORITY_CMDLINE, error);
- driver_enumerator drivlist(machine().options(), *ui_swinfo->driver);
- 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()))
- {
- std::unordered_map<std::string, std::string> parts;
- for (const software_part *swpart = swinfo->first_part(); swpart != nullptr; swpart = swpart->next())
- {
- if (swpart->matches_interface(ui_swinfo->interface.c_str()))
- {
- std::string menu_part_name(swpart->name());
- if (swpart->feature("part_id") != nullptr)
- menu_part_name.assign("(").append(swpart->feature("part_id")).append(")");
- parts.emplace(swpart->name(), menu_part_name);
- }
- }
- ui_menu::stack_push(global_alloc_clear<ui_software_parts>(machine(), container, parts, ui_swinfo));
- return;
- }
- std::string error_string;
- std::string string_list = std::string(ui_swinfo->listname).append(":").append(ui_swinfo->shortname).append(":").append(ui_swinfo->part).append(":").append(ui_swinfo->instance);
- moptions.set_value(OPTION_SOFTWARENAME, string_list.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
- std::string snap_list = std::string(ui_swinfo->listname).append(PATH_SEPARATOR).append(ui_swinfo->shortname);
- moptions.set_value(OPTION_SNAPNAME, snap_list.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
- reselect_last::driver = drivlist.driver().name;
- reselect_last::software = ui_swinfo->shortname;
- reselect_last::swlist = ui_swinfo->listname;
- reselect_last::set(true);
- machine().manager().schedule_new_driver(drivlist.driver());
- machine().schedule_hard_reset();
- ui_menu::stack_reset(machine());
- }
- }
-}
-
-//-------------------------------------------------
-// perform our special rendering
-//-------------------------------------------------
-
-void ui_bios_selection::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
-{
- float width;
- ui_manager &mui = machine().ui();
- mui.draw_text_full(container, "Bios selection:", 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += 2 * UI_BOX_LR_BORDER;
- float maxwidth = MAX(origx2 - origx1, width);
-
- // compute our bounds
- float x1 = 0.5f - 0.5f * maxwidth;
- float x2 = x1 + maxwidth;
- float y1 = origy1 - top;
- float y2 = origy1 - UI_BOX_TB_BORDER;
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // draw the text within it
- mui.draw_text_full(container, "Bios selection:", x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
-}
diff --git a/src/emu/ui/selsoft.h b/src/emu/ui/selsoft.h
deleted file mode 100644
index 8f7e6d413c8..00000000000
--- a/src/emu/ui/selsoft.h
+++ /dev/null
@@ -1,112 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Dankan1890
-/***************************************************************************
-
- ui/selsoft.h
-
- UI softwares menu.
-
-***************************************************************************/
-#pragma once
-
-#ifndef __UI_SELSOFT_H__
-#define __UI_SELSOFT_H__
-
-#include "ui/custmenu.h"
-
-struct s_bios
-{
- s_bios(std::string _name, int _id) { name = _name; id = _id; }
- std::string name;
- int id;
-};
-
-// Menu Class
-class ui_menu_select_software : public ui_menu
-{
-public:
- ui_menu_select_software(running_machine &machine, render_container *container, const game_driver *driver);
- virtual ~ui_menu_select_software();
- virtual void populate() override;
- virtual void handle() override;
- virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
-
- virtual bool menu_has_search_active() override { return (m_search[0] != 0); }
-
- // draw left panel
- virtual float draw_left_panel(float x1, float y1, float x2, float y2) override;
-
- // draw right panel
- virtual void draw_right_panel(void *selectedref, float origx1, float origy1, float origx2, float origy2) override;
-
-private:
- enum { VISIBLE_GAMES_IN_SEARCH = 200 };
- char m_search[40];
- const game_driver *m_driver;
- bool m_has_empty_start;
- s_filter m_filter;
-
- ui_software_info *m_searchlist[VISIBLE_GAMES_IN_SEARCH + 1];
- std::vector<ui_software_info *> m_displaylist, m_tmp, m_sortedlist;
- std::vector<ui_software_info> m_swinfo;
-
- void build_software_list();
- void build_list(std::vector<ui_software_info *> &vec, const char *filter_text = nullptr, int filter = -1);
- void build_custom();
- void find_matches(const char *str, int count);
- void load_sw_custom_filters();
-
- void arts_render(void *selectedref, float x1, float y1, float x2, float y2);
- void infos_render(void *selectedref, float x1, float y1, float x2, float y2);
-
- // handlers
- void inkey_select(const ui_menu_event *menu_event);
- void inkey_special(const ui_menu_event *menu_event);
-};
-
-class ui_software_parts : public ui_menu
-{
-public:
- ui_software_parts(running_machine &machine, render_container *container, std::unordered_map<std::string, std::string> parts, ui_software_info *ui_info);
- virtual ~ui_software_parts();
- virtual void populate() override;
- virtual void handle() override;
- virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
-
-private:
- ui_software_info *m_uiinfo;
- std::unordered_map<std::string, std::string> m_parts;
-};
-
-class ui_bios_selection : public ui_menu
-{
-public:
- ui_bios_selection(running_machine &machine, render_container *container, std::vector<s_bios> biosname, void *driver, bool software, bool inlist);
- virtual ~ui_bios_selection();
- virtual void populate() override;
- virtual void handle() override;
- virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
-
-private:
-
- void *m_driver;
- bool m_software, m_inlist;
- std::vector<s_bios> m_bios;
-};
-
-struct reselect_last
-{
- static std::string driver, software, swlist;
- static void set(bool value) { m_reselect = value; }
- static bool get() { return m_reselect; }
- static void reset() { driver.clear(); software.clear(); swlist.clear(); set(false); }
-
-private:
- static bool m_reselect;
-};
-
-// Getter
-bool has_multiple_bios(const game_driver *driver, std::vector<s_bios> &biosname);
-
-
-#endif /* __UI_SELSOFT_H__ */
diff --git a/src/emu/ui/simpleselgame.cpp b/src/emu/ui/simpleselgame.cpp
deleted file mode 100644
index a0cf9412f6b..00000000000
--- a/src/emu/ui/simpleselgame.cpp
+++ /dev/null
@@ -1,445 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Nicola Salmoria, Aaron Giles, Nathan Woods
-/***************************************************************************
-
- ui/simpleselgame.c
-
- Game selector
-
-***************************************************************************/
-
-#include "emu.h"
-#include "emuopts.h"
-#include "ui/ui.h"
-#include "ui/menu.h"
-#include "uiinput.h"
-#include "ui/simpleselgame.h"
-#include "ui/inputmap.h"
-#include "ui/miscmenu.h"
-#include "ui/optsmenu.h"
-#include "audit.h"
-#include <ctype.h>
-
-
-//-------------------------------------------------
-// ctor
-//-------------------------------------------------
-
-ui_simple_menu_select_game::ui_simple_menu_select_game(running_machine &machine, render_container *container, const char *gamename) : ui_menu(machine, container), m_driverlist(driver_list::total() + 1)
-{
- build_driver_list();
- if(gamename)
- strcpy(m_search, gamename);
- m_matchlist[0] = -1;
-}
-
-
-//-------------------------------------------------
-// dtor
-//-------------------------------------------------
-
-ui_simple_menu_select_game::~ui_simple_menu_select_game()
-{
-}
-
-
-
-//-------------------------------------------------
-// build_driver_list - build a list of available
-// drivers
-//-------------------------------------------------
-
-void ui_simple_menu_select_game::build_driver_list()
-{
- // start with an empty list
- m_drivlist = std::make_unique<driver_enumerator>(machine().options());
- m_drivlist->exclude_all();
-
- // open a path to the ROMs and find them in the array
- file_enumerator path(machine().options().media_path());
- const osd_directory_entry *dir;
-
- // iterate while we get new objects
- while ((dir = path.next()) != nullptr)
- {
- char drivername[50];
- char *dst = drivername;
- const char *src;
-
- // build a name for it
- for (src = dir->name; *src != 0 && *src != '.' && dst < &drivername[ARRAY_LENGTH(drivername) - 1]; src++)
- *dst++ = tolower((UINT8)*src);
- *dst = 0;
-
- int drivnum = m_drivlist->find(drivername);
- if (drivnum != -1)
- m_drivlist->include(drivnum);
- }
-
- // now build the final list
- m_drivlist->reset();
- int listnum = 0;
- while (m_drivlist->next())
- m_driverlist[listnum++] = &m_drivlist->driver();
-
- // NULL-terminate
- m_driverlist[listnum] = nullptr;
-}
-
-
-
-//-------------------------------------------------
-// handle - handle the game select menu
-//-------------------------------------------------
-
-void ui_simple_menu_select_game::handle()
-{
- // ignore pause keys by swallowing them before we process the menu
- machine().ui_input().pressed(IPT_UI_PAUSE);
-
- // process the menu
- const ui_menu_event *menu_event = process(0);
- if (menu_event != nullptr && menu_event->itemref != nullptr)
- {
- // reset the error on any future menu_event
- if (m_error)
- m_error = false;
-
- // handle selections
- else
- {
- switch(menu_event->iptkey)
- {
- case IPT_UI_SELECT:
- inkey_select(menu_event);
- break;
- case IPT_UI_CANCEL:
- inkey_cancel(menu_event);
- break;
- case IPT_SPECIAL:
- inkey_special(menu_event);
- break;
- }
- }
- }
-
- // if we're in an error state, overlay an error message
- if (m_error)
- machine().ui().draw_text_box(container,
- "The selected game is missing one or more required ROM or CHD images. "
- "Please select a different game.\n\nPress any key to continue.",
- JUSTIFY_CENTER, 0.5f, 0.5f, UI_RED_COLOR);
-}
-
-
-//-------------------------------------------------
-// inkey_select
-//-------------------------------------------------
-extern void save_main_option(running_machine &machine);
-void ui_simple_menu_select_game::inkey_select(const ui_menu_event *menu_event)
-{
- const game_driver *driver = (const game_driver *)menu_event->itemref;
-
- // special case for configure inputs
- if ((FPTR)driver == 1)
- ui_menu::stack_push(global_alloc_clear<ui_menu_game_options>(machine(), container));
- else if ((FPTR)driver == 2)
- save_main_option(machine());
- // anything else is a driver
- else
- {
- // audit the game first to see if we're going to work
- driver_enumerator enumerator(machine().options(), *driver);
- enumerator.next();
- media_auditor auditor(enumerator);
- media_auditor::summary summary = auditor.audit_media(AUDIT_VALIDATE_FAST);
-
- // if everything looks good, schedule the new driver
- if (summary == media_auditor::CORRECT || summary == media_auditor::BEST_AVAILABLE || summary == media_auditor::NONE_NEEDED)
- {
- machine().manager().schedule_new_driver(*driver);
- machine().schedule_hard_reset();
- ui_menu::stack_reset(machine());
- }
-
- // otherwise, display an error
- else
- {
- reset(UI_MENU_RESET_REMEMBER_REF);
- m_error = true;
- }
- }
-}
-
-
-//-------------------------------------------------
-// inkey_cancel
-//-------------------------------------------------
-
-void ui_simple_menu_select_game::inkey_cancel(const ui_menu_event *menu_event)
-{
- // escape pressed with non-empty text clears the text
- if (m_search[0] != 0)
- {
- m_search[0] = '\0';
- reset(UI_MENU_RESET_SELECT_FIRST);
- }
-}
-
-
-//-------------------------------------------------
-// inkey_special - typed characters append to the buffer
-//-------------------------------------------------
-
-void ui_simple_menu_select_game::inkey_special(const ui_menu_event *menu_event)
-{
- // typed characters append to the buffer
- int buflen = strlen(m_search);
-
- // if it's a backspace and we can handle it, do so
- if ((menu_event->unichar == 8 || menu_event->unichar == 0x7f) && buflen > 0)
- {
- *(char *)utf8_previous_char(&m_search[buflen]) = 0;
- m_rerandomize = true;
- reset(UI_MENU_RESET_SELECT_FIRST);
- }
-
- // if it's any other key and we're not maxed out, update
- else if (menu_event->unichar >= ' ' && menu_event->unichar < 0x7f)
- {
- buflen += utf8_from_uchar(&m_search[buflen], ARRAY_LENGTH(m_search) - buflen, menu_event->unichar);
- m_search[buflen] = 0;
- reset(UI_MENU_RESET_SELECT_FIRST);
- }
-}
-
-
-//-------------------------------------------------
-// populate - populate the game select menu
-//-------------------------------------------------
-
-void ui_simple_menu_select_game::populate()
-{
- int matchcount;
- int curitem;
-
- for (curitem = matchcount = 0; m_driverlist[curitem] != nullptr && matchcount < VISIBLE_GAMES_IN_LIST; curitem++)
- if (!(m_driverlist[curitem]->flags & MACHINE_NO_STANDALONE))
- matchcount++;
-
- // if nothing there, add a single multiline item and return
- if (matchcount == 0)
- {
- std::string txt;
- strprintf(txt, "No machines found. Please check the rompath specified in the %s.ini file.\n\n"
- "If this is your first time using %s, please see the config.txt file in "
- "the docs directory for information on configuring %s.",
- emulator_info::get_configname(),
- emulator_info::get_appname(),emulator_info::get_appname() );
- item_append(txt.c_str(), nullptr, MENU_FLAG_MULTILINE | MENU_FLAG_REDTEXT, nullptr);
- return;
- }
-
- // otherwise, rebuild the match list
- assert(m_drivlist != nullptr);
- if (m_search[0] != 0 || m_matchlist[0] == -1 || m_rerandomize)
- m_drivlist->find_approximate_matches(m_search, matchcount, m_matchlist);
- m_rerandomize = false;
-
- // iterate over entries
- for (curitem = 0; curitem < matchcount; curitem++)
- {
- int curmatch = m_matchlist[curitem];
- if (curmatch != -1)
- {
- int cloneof = m_drivlist->non_bios_clone(curmatch);
- item_append(m_drivlist->driver(curmatch).name, m_drivlist->driver(curmatch).description, (cloneof == -1) ? 0 : MENU_FLAG_INVERT, (void *)&m_drivlist->driver(curmatch));
- }
- }
-
- // if we're forced into this, allow general input configuration as well
- if (ui_menu::stack_has_special_main_menu())
- {
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
- item_append("Configure Options", nullptr, 0, (void *)1);
- item_append("Save Configuration", nullptr, 0, (void *)2);
- skip_main_items = 2;
- }
-
- // configure the custom rendering
- customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
- custombottom = 4.0f * machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
-}
-
-
-//-------------------------------------------------
-// custom_render - perform our special rendering
-//-------------------------------------------------
-
-void ui_simple_menu_select_game::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
-{
- const game_driver *driver;
- float width, maxwidth;
- float x1, y1, x2, y2;
- std::string tempbuf[5];
- rgb_t color;
- int line;
-
- // display the current typeahead
- if (m_search[0] != 0)
- strprintf(tempbuf[0], "Type name or select: %s_", m_search);
- else
- strprintf(tempbuf[0],"Type name or select: (random)");
-
- // get the size of the text
- machine().ui().draw_text_full(container, tempbuf[0].c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += 2 * UI_BOX_LR_BORDER;
- maxwidth = MAX(width, origx2 - origx1);
-
- // compute our bounds
- x1 = 0.5f - 0.5f * maxwidth;
- x2 = x1 + maxwidth;
- y1 = origy1 - top;
- y2 = origy1 - UI_BOX_TB_BORDER;
-
- // draw a box
- machine().ui().draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // draw the text within it
- machine().ui().draw_text_full(container, tempbuf[0].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
-
- // determine the text to render below
- driver = ((FPTR)selectedref > skip_main_items) ? (const game_driver *)selectedref : nullptr;
- if (driver != nullptr)
- {
- const char *gfxstat, *soundstat;
-
- // first line is game name
- strprintf(tempbuf[0],"%-.100s", driver->description);
-
- // next line is year, manufacturer
- strprintf(tempbuf[1], "%s, %-.100s", driver->year, driver->manufacturer);
-
- // next line source path
- strprintf(tempbuf[2],"Driver: %-.100s", core_filename_extract_base(driver->source_file).c_str());
-
- // next line is overall driver status
- if (driver->flags & MACHINE_NOT_WORKING)
- tempbuf[3].assign("Overall: NOT WORKING");
- else if (driver->flags & MACHINE_UNEMULATED_PROTECTION)
- tempbuf[3].assign("Overall: Unemulated Protection");
- else
- tempbuf[3].assign("Overall: Working");
-
- // next line is graphics, sound status
- if (driver->flags & (MACHINE_IMPERFECT_GRAPHICS | MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_COLORS))
- gfxstat = "Imperfect";
- else
- gfxstat = "OK";
-
- if (driver->flags & MACHINE_NO_SOUND)
- soundstat = "Unimplemented";
- else if (driver->flags & MACHINE_IMPERFECT_SOUND)
- soundstat = "Imperfect";
- else
- soundstat = "OK";
-
- strprintf(tempbuf[4], "Gfx: %s, Sound: %s", gfxstat, soundstat);
- }
- else
- {
- const char *s = emulator_info::get_copyright();
- line = 0;
-
- // first line is version string
- strprintf(tempbuf[line++], "%s %s", emulator_info::get_appname(), build_version);
-
- // output message
- while (line < ARRAY_LENGTH(tempbuf))
- {
- if (!(*s == 0 || *s == '\n'))
- tempbuf[line].push_back(*s);
-
- if (*s == '\n')
- {
- line++;
- s++;
- } else if (*s != 0)
- s++;
- else
- line++;
- }
- }
-
- // get the size of the text
- maxwidth = origx2 - origx1;
- for (line = 0; line < 4; line++)
- {
- machine().ui().draw_text_full(container, tempbuf[line].c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += 2 * UI_BOX_LR_BORDER;
- maxwidth = MAX(maxwidth, width);
- }
-
- // compute our bounds
- x1 = 0.5f - 0.5f * maxwidth;
- x2 = x1 + maxwidth;
- y1 = origy2 + UI_BOX_TB_BORDER;
- y2 = origy2 + bottom;
-
- // draw a box
- color = UI_BACKGROUND_COLOR;
- if (driver != nullptr)
- color = UI_GREEN_COLOR;
- if (driver != nullptr && (driver->flags & (MACHINE_IMPERFECT_GRAPHICS | MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_COLORS | MACHINE_NO_SOUND | MACHINE_IMPERFECT_SOUND)) != 0)
- color = UI_YELLOW_COLOR;
- if (driver != nullptr && (driver->flags & (MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION)) != 0)
- color = UI_RED_COLOR;
- machine().ui().draw_outlined_box(container, x1, y1, x2, y2, color);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // draw all lines
- for (line = 0; line < 4; line++)
- {
- machine().ui().draw_text_full(container, tempbuf[line].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
- y1 += machine().ui().get_line_height();
- }
-}
-
-
-//-------------------------------------------------
-// force_game_select - force the game
-// select menu to be visible and inescapable
-//-------------------------------------------------
-
-void ui_simple_menu_select_game::force_game_select(running_machine &machine, render_container *container)
-{
- char *gamename = (char *)machine.options().system_name();
-
- // reset the menu stack
- ui_menu::stack_reset(machine);
-
- // add the quit entry followed by the game select entry
- ui_menu *quit = global_alloc_clear<ui_menu_quit_game>(machine, container);
- quit->set_special_main_menu(true);
- ui_menu::stack_push(quit);
- ui_menu::stack_push(global_alloc_clear<ui_simple_menu_select_game>(machine, container, gamename));
-
- // force the menus on
- machine.ui().show_menu();
-
- // make sure MAME is paused
- machine.pause();
-}
diff --git a/src/emu/ui/simpleselgame.h b/src/emu/ui/simpleselgame.h
deleted file mode 100644
index 316e3747b2f..00000000000
--- a/src/emu/ui/simpleselgame.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Nicola Salmoria, Aaron Giles, Nathan Woods
-/***************************************************************************
-
- ui/selgame.h
-
- Game selector
-
-***************************************************************************/
-
-#pragma once
-
-#ifndef __UI_SIMPLESELGAME_H__
-#define __UI_SIMPLESELGAME_H__
-
-#include "drivenum.h"
-#include "menu.h"
-
-class ui_simple_menu_select_game : public ui_menu {
-public:
- ui_simple_menu_select_game(running_machine &machine, render_container *container, const char *gamename);
- virtual ~ui_simple_menu_select_game();
- virtual void populate() override;
- virtual void handle() override;
- virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
-
- // force game select menu
- static void force_game_select(running_machine &machine, render_container *container);
-
- virtual bool menu_has_search_active() override { return (m_search[0] != 0); }
-private:
- // internal state
- enum { VISIBLE_GAMES_IN_LIST = 15 };
- UINT8 m_error;
- bool m_rerandomize;
- char m_search[40];
- int m_matchlist[VISIBLE_GAMES_IN_LIST];
- std::vector<const game_driver *> m_driverlist;
- std::unique_ptr<driver_enumerator> m_drivlist;
-
- // internal methods
- void build_driver_list();
- void inkey_select(const ui_menu_event *menu_event);
- void inkey_cancel(const ui_menu_event *menu_event);
- void inkey_special(const ui_menu_event *menu_event);
-};
-
-#endif /* __UI_SELGAME_H__ */
diff --git a/src/emu/ui/sliders.cpp b/src/emu/ui/sliders.cpp
index e494213aa1b..26da6327202 100644
--- a/src/emu/ui/sliders.cpp
+++ b/src/emu/ui/sliders.cpp
@@ -108,14 +108,14 @@ void ui_menu_sliders::handle()
/* if we got here via up or page up, select the previous item */
if (menu_event->iptkey == IPT_UI_UP || menu_event->iptkey == IPT_UI_PAGE_UP)
{
- selected = (selected + item.size() - 1) % item.size();
+ selected = (selected + numitems - 1) % numitems;
validate_selection(-1);
}
/* otherwise select the next item */
else if (menu_event->iptkey == IPT_UI_DOWN || menu_event->iptkey == IPT_UI_PAGE_DOWN)
{
- selected = (selected + 1) % item.size();
+ selected = (selected + 1) % numitems;
validate_selection(1);
}
}
@@ -242,7 +242,7 @@ UINT32 ui_menu_sliders::ui_handler(running_machine &machine, render_container *c
/* if this is the first call, push the sliders menu */
if (state)
- ui_menu::stack_push(global_alloc_clear<ui_menu_sliders>(machine, container, true));
+ ui_menu::stack_push(auto_alloc_clear(machine, <ui_menu_sliders>(machine, container, true)));
/* handle standard menus */
result = ui_menu::ui_handler(machine, container, state);
diff --git a/src/emu/ui/slotopt.cpp b/src/emu/ui/slotopt.cpp
index 959fef74adc..cce17353532 100644
--- a/src/emu/ui/slotopt.cpp
+++ b/src/emu/ui/slotopt.cpp
@@ -189,7 +189,7 @@ void ui_menu_slot_devices::handle()
{
if ((FPTR)menu_event->itemref == 1 && menu_event->iptkey == IPT_UI_SELECT)
{
- machine().options().add_slot_options();
+ machine().options().add_slot_options(false);
machine().schedule_hard_reset();
}
else if (menu_event->iptkey == IPT_UI_LEFT || menu_event->iptkey == IPT_UI_RIGHT)
@@ -204,7 +204,7 @@ void ui_menu_slot_devices::handle()
device_slot_interface *slot = (device_slot_interface *)menu_event->itemref;
device_slot_option *option = slot_get_current_option(slot);
if (option)
- ui_menu::stack_push(global_alloc_clear<ui_menu_device_config>(machine(), container, slot, option));
+ ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_device_config>(machine(), container, slot, option)));
}
}
}
diff --git a/src/emu/ui/sndmenu.cpp b/src/emu/ui/sndmenu.cpp
deleted file mode 100644
index 06563c661b3..00000000000
--- a/src/emu/ui/sndmenu.cpp
+++ /dev/null
@@ -1,174 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Dankan1890
-/*********************************************************************
-
- ui/sndmenu.cpp
-
- Internal UI user interface.
-
-*********************************************************************/
-
-#include "emu.h"
-#include "ui/ui.h"
-#include "ui/menu.h"
-#include "ui/sndmenu.h"
-#include "ui/selector.h"
-#include "cliopts.h"
-#include "../osd/modules/lib/osdobj_common.h" // TODO: remove
-
-const int ui_menu_sound_options::m_sound_rate[] = { 11025, 22050, 44100, 48000 };
-
-//-------------------------------------------------
-// ctor
-//-------------------------------------------------
-
-ui_menu_sound_options::ui_menu_sound_options(running_machine &machine, render_container *container) : ui_menu(machine, container)
-{
- osd_options &options = downcast<osd_options &>(machine.options());
-
- m_sample_rate = machine.options().sample_rate();
- m_sound = (strcmp(options.sound(), OSDOPTVAL_NONE) && strcmp(options.sound(), "0"));
- m_samples = machine.options().samples();
-
- int total = ARRAY_LENGTH(m_sound_rate);
-
- for (m_cur_rates = 0; m_cur_rates < total; m_cur_rates++)
- if (m_sample_rate == m_sound_rate[m_cur_rates])
- break;
-
- if (m_cur_rates == total)
- m_cur_rates = 2;
-}
-
-//-------------------------------------------------
-// dtor
-//-------------------------------------------------
-
-ui_menu_sound_options::~ui_menu_sound_options()
-{
- std::string error_string;
- emu_options &moptions = machine().options();
-
- if (strcmp(moptions.value(OSDOPTION_SOUND),m_sound ? OSDOPTVAL_AUTO : OSDOPTVAL_NONE)!=0)
- {
- moptions.set_value(OSDOPTION_SOUND, m_sound ? OSDOPTVAL_AUTO : OSDOPTVAL_NONE, OPTION_PRIORITY_CMDLINE, error_string);
- machine().options().mark_changed(OSDOPTION_SOUND);
- }
- if (moptions.int_value(OPTION_SAMPLERATE)!=m_sound_rate[m_cur_rates])
- {
- moptions.set_value(OPTION_SAMPLERATE, m_sound_rate[m_cur_rates], OPTION_PRIORITY_CMDLINE, error_string);
- machine().options().mark_changed(OPTION_SAMPLERATE);
- }
- if (moptions.bool_value(OPTION_SAMPLES)!=m_samples)
- {
- moptions.set_value(OPTION_SAMPLES, m_samples, OPTION_PRIORITY_CMDLINE, error_string);
- machine().options().mark_changed(OPTION_SAMPLES);
- }
-}
-
-//-------------------------------------------------
-// handle
-//-------------------------------------------------
-
-void ui_menu_sound_options::handle()
-{
- bool changed = false;
-
- // process the menu
- const ui_menu_event *m_event = process(0);
-
- if (m_event != nullptr && m_event->itemref != nullptr)
- {
- switch ((FPTR)m_event->itemref)
- {
- case ENABLE_SOUND:
- if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT || m_event->iptkey == IPT_UI_SELECT)
- {
- m_sound = !m_sound;
- changed = true;
- }
- break;
-
- case SAMPLE_RATE:
- if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT)
- {
- (m_event->iptkey == IPT_UI_LEFT) ? m_cur_rates-- : m_cur_rates++;
- changed = true;
- }
- else if (m_event->iptkey == IPT_UI_SELECT)
- {
- int total = ARRAY_LENGTH(m_sound_rate);
- std::vector<std::string> s_sel(total);
- for (int index = 0; index < total; index++)
- s_sel[index] = std::to_string(m_sound_rate[index]);
-
- ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, s_sel, m_cur_rates));
- }
- break;
-
- case ENABLE_SAMPLES:
- if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT || m_event->iptkey == IPT_UI_SELECT)
- {
- m_samples = !m_samples;
- changed = true;
- }
- break;
- }
- }
-
- if (changed)
- reset(UI_MENU_RESET_REMEMBER_REF);
-
-}
-
-//-------------------------------------------------
-// populate
-//-------------------------------------------------
-
-void ui_menu_sound_options::populate()
-{
- UINT32 arrow_flags = get_arrow_flags(0, ARRAY_LENGTH(m_sound_rate) - 1, m_cur_rates);
- m_sample_rate = m_sound_rate[m_cur_rates];
- std::string s_text;
- strprintf(s_text, "%d", m_sample_rate);
-
- // add options items
- item_append("Sound", m_sound ? "On" : "Off", m_sound ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)(FPTR)ENABLE_SOUND);
- item_append("Sample Rate", s_text.c_str(), arrow_flags, (void *)(FPTR)SAMPLE_RATE);
- item_append("Use External Samples", m_samples ? "On" : "Off", m_samples ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)(FPTR)ENABLE_SAMPLES);
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
-
- customtop = machine().ui().get_line_height() + (3.0f * UI_BOX_TB_BORDER);
-}
-
-//-------------------------------------------------
-// perform our special rendering
-//-------------------------------------------------
-
-void ui_menu_sound_options::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
-{
- float width;
- ui_manager &mui = machine().ui();
- mui.draw_text_full(container, "Sound Options", 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += 2 * UI_BOX_LR_BORDER;
- float maxwidth = MAX(origx2 - origx1, width);
-
- // compute our bounds
- float x1 = 0.5f - 0.5f * maxwidth;
- float x2 = x1 + maxwidth;
- float y1 = origy1 - top;
- float y2 = origy1 - UI_BOX_TB_BORDER;
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // draw the text within it
- mui.draw_text_full(container, "Sound Options", x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
-}
diff --git a/src/emu/ui/sndmenu.h b/src/emu/ui/sndmenu.h
deleted file mode 100644
index 8b13b38ea88..00000000000
--- a/src/emu/ui/sndmenu.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Dankan1890
-/***************************************************************************
-
- ui/sndmenu.h
-
- Internal UI user interface.
-
-***************************************************************************/
-
-#pragma once
-
-#ifndef __UI_SNDMENU_H__
-#define __UI_SNDMENU_H__
-
-//-------------------------------------------------
-// class sound options menu
-//-------------------------------------------------
-class ui_menu_sound_options : public ui_menu
-{
-public:
- ui_menu_sound_options(running_machine &machine, render_container *container);
- virtual ~ui_menu_sound_options();
- virtual void populate() override;
- virtual void handle() override;
- virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
-
-private:
- enum
- {
- ENABLE_SOUND = 1,
- SAMPLE_RATE,
- ENABLE_SAMPLES
- };
-
- UINT16 m_cur_rates;
- static const int m_sound_rate[];
- int m_sample_rate;
- bool m_samples, m_sound;
-};
-
-#endif /* __UI_SNDMENU_H__ */
diff --git a/src/emu/ui/starimg.h b/src/emu/ui/starimg.h
deleted file mode 100644
index 2704e486e5b..00000000000
--- a/src/emu/ui/starimg.h
+++ /dev/null
@@ -1,37 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Dankan1890
-static const UINT32 favorite_star_bmp[] =
-{
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02D07A00, 0x15D07A00, 0x0FD07A00, 0x00D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x76D27F04, 0xBFDA9714, 0xB9D78F0E, 0x4DD17B01, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3BD07A00, 0xFFE8B228, 0xFFFDEB50, 0xFFFBE34A, 0xD0E1A11C, 0x13D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0BD07A00, 0xA0D48306, 0xFFFACE42, 0xFFFBCE45, 0xFFFCD146, 0xFFF2BD34, 0x67D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x49D27E03, 0xE9EAAB26, 0xFFFDD044, 0xFFF9C741, 0xFFFAC942, 0xFFFED245, 0xD1DF9716, 0x27D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xA2DB8D0F, 0xFFF6C236, 0xFFFAC740, 0xFFF8C53F, 0xFFF8C53F, 0xFFFDCB41, 0xF7F0B62E, 0x71D68308, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x31D07A00, 0xFFE7A420, 0xFFFDCA3F, 0xFFF8C23D, 0xFFF8C23D, 0xFFF8C23D, 0xFFF8C23D, 0xFFFCC83D, 0xE0E19818, 0x11D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x08D07A00, 0x99D38004, 0xFFF9C237, 0xFFFAC43C, 0xFFF8BF3A, 0xFFF8BF3A, 0xFFF8BF3A, 0xFFF8BF3A, 0xFFFBC53C, 0xFFF1B32B, 0x63D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x01D07A00, 0x15D07A00, 0x24D07A00, 0x39D07A00, 0x4AD07A00, 0x79D48205, 0xE6E9A820, 0xFFFDC539, 0xFFF8BC37, 0xFFF8BC37, 0xFFF8BC37, 0xFFF8BC37, 0xFFF8BC37, 0xFFF9BD37, 0xFFFEC63A, 0xD8DF9613, 0x64D17C01, 0x3FD07A00, 0x2FD07A00, 0x1CD07A00, 0x0AD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x04D07A00, 0x3BD07A00, 0x8BD07A00, 0xA5D17B01, 0xBFDA940F, 0xCEE1A317, 0xE2E7B622, 0xF4EDC229, 0xFFF1C62D, 0xFFFAC735, 0xFFFABC35, 0xFFF8B934, 0xFFF8B934, 0xFFF8B934, 0xFFF8B934, 0xFFF8B934, 0xFFF8B934, 0xFFFCBF36, 0xFFF7C733, 0xFCEFC52C, 0xE9EABB24, 0xD8E4AE1D, 0xC6DD9C13, 0xB4D58608, 0x99D07A00, 0x75D07A00, 0x20D07A00, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x01D07A00, 0xBBD78608, 0xFFE9AE1F, 0xFFF9D133, 0xFFFCD839, 0xFFFCD338, 0xFFFCCC36, 0xFFFCC333, 0xFFFCBB32, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFFAB831, 0xFFFCC033, 0xFFFCC735, 0xFFFCD037, 0xFFFCD739, 0xFFFBD536, 0xFFF5C92F, 0xE8E4A318, 0x55D78507, 0x00000000, 0x00000000,
- 0x00000000, 0x13D07A00, 0xFFDF9212, 0xFFFABC2F, 0xFFF9B72F, 0xFFF8B32E, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B32D, 0xFFF9B52E, 0xFFF9B92F, 0xFFF6B52A, 0xC1DB8B0D, 0x00000000, 0x00000000,
- 0x00000000, 0x07D07A00, 0xE6DC8B0E, 0xFFF4AB27, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFEFA421, 0xAAD9860A, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x5ED58005, 0xE8E39213, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF4A925, 0xE2DC890C, 0x45D27C02, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x41D07A00, 0xE7E18F11, 0xFFF3A420, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFEFA11D, 0xE0DB880A, 0x35D07A00, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x5DD47E03, 0xE6E08D0D, 0xFFF5A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF3A11D, 0xDFDB8609, 0x4FD27C01, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40D07A00, 0xE6E08A0C, 0xFFF29D19, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFEE9917, 0xDDDA8407, 0x30D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x5BD37D02, 0xE6DF880A, 0xFFF59C18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF29A16, 0xDCD98306, 0x49D17B01, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x7BD07A00, 0xFFEF9311, 0xFFF69A15, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF69915, 0xFFE2890A, 0x3BD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x01D07A00, 0xA2D17B00, 0xFFF59612, 0xFFF69713, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF79712, 0xFFE98D0B, 0x4BD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x14D07A00, 0xBED87F03, 0xFFF6940E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF7940E, 0xFFF1900B, 0x7ED07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x27D07A00, 0xD1DE8205, 0xFFF8920C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF6910C, 0xFFF5910C, 0xA5D27B01, 0x03D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40D07A00, 0xEAE48505, 0xFFFA9009, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF78E09, 0xC1D97F02, 0x17D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x57D17B00, 0xFBE88504, 0xFFF78D06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF38B06, 0xFFEC8705, 0xFFF18A06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF88E06, 0xD6DF8102, 0x2CD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x83D67D01, 0xFFED8503, 0xFFF48804, 0xFFF48804, 0xFFF48804, 0xFFF48804, 0xFFF28804, 0xFFEA8503, 0xCDDC7F02, 0x79D17B00, 0xA1D47C01, 0xEFE18102, 0xFFEE8604, 0xFFF38804, 0xFFF48804, 0xFFF48804, 0xFFF48804, 0xFFF88B04, 0xEFE58203, 0x46D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xA0D87D01, 0xFFED8401, 0xFFF48602, 0xFFF48602, 0xFFF48602, 0xFFEF8501, 0xE9DE7F01, 0x8FD67D00, 0x23D07A00, 0x04D07A00, 0x0DD07A00, 0x46D07A00, 0xC3D97D01, 0xFFE28001, 0xFFF38602, 0xFFF48602, 0xFFF48602, 0xFFF58702, 0xFDE88201, 0x59D17A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x5FD47B00, 0xF3E58000, 0xFFF18400, 0xFFED8200, 0xDEE07F01, 0x90D37B00, 0x1FD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x01D07A00, 0x3BD07A00, 0xBDD67C00, 0xF2E48000, 0xFFEF8300, 0xFFF08300, 0xDEDF7E01, 0x34D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x10D07A00, 0x71D57C00, 0xD2DB7D00, 0x9AD87C00, 0x34D07A00, 0x0AD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x13D07A00, 0x52D27B00, 0xBBD97D00, 0xCBDA7D00, 0x5DD27B00, 0x0AD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
-};
diff --git a/src/emu/ui/swlist.cpp b/src/emu/ui/swlist.cpp
index 1a3ce5fe736..64eb5109fae 100644
--- a/src/emu/ui/swlist.cpp
+++ b/src/emu/ui/swlist.cpp
@@ -355,10 +355,7 @@ void ui_menu_software_list::handle()
}
if (selected_entry != nullptr && selected_entry != cur_selected)
- {
- set_selection((void *)selected_entry);
- top_line = selected - (visible_lines / 2);
- }
+ set_selection((void *) selected_entry);
}
}
else if (event->iptkey == IPT_UI_CANCEL)
@@ -451,7 +448,7 @@ void ui_menu_software::handle()
const ui_menu_event *event = process(0);
if (event != nullptr && event->iptkey == IPT_UI_SELECT) {
- // ui_menu::stack_push(global_alloc_clear<ui_menu_software_list>(machine(), container, (software_list_config *)event->itemref, image));
+ // ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_software_list>(machine(), container, (software_list_config *)event->itemref, image)));
*m_result = (software_list_device *)event->itemref;
ui_menu::stack_pop(machine());
}
diff --git a/src/emu/ui/toolbar.h b/src/emu/ui/toolbar.h
deleted file mode 100644
index 095aa0e3cdd..00000000000
--- a/src/emu/ui/toolbar.h
+++ /dev/null
@@ -1,181 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Dankan1890
-static const UINT32 toolbar_bitmap_bmp[][1024] = {
-{
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02D07A00, 0x15D07A00, 0x0FD07A00, 0x00D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x76D27F04, 0xBFDA9714, 0xB9D78F0E, 0x4DD17B01, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3BD07A00, 0xFFE8B228, 0xFFFDEB50, 0xFFFBE34A, 0xD0E1A11C, 0x13D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0BD07A00, 0xA0D48306, 0xFFFACE42, 0xFFFBCE45, 0xFFFCD146, 0xFFF2BD34, 0x67D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x49D27E03, 0xE9EAAB26, 0xFFFDD044, 0xFFF9C741, 0xFFFAC942, 0xFFFED245, 0xD1DF9716, 0x27D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xA2DB8D0F, 0xFFF6C236, 0xFFFAC740, 0xFFF8C53F, 0xFFF8C53F, 0xFFFDCB41, 0xF7F0B62E, 0x71D68308, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x31D07A00, 0xFFE7A420, 0xFFFDCA3F, 0xFFF8C23D, 0xFFF8C23D, 0xFFF8C23D, 0xFFF8C23D, 0xFFFCC83D, 0xE0E19818, 0x11D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x08D07A00, 0x99D38004, 0xFFF9C237, 0xFFFAC43C, 0xFFF8BF3A, 0xFFF8BF3A, 0xFFF8BF3A, 0xFFF8BF3A, 0xFFFBC53C, 0xFFF1B32B, 0x63D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x01D07A00, 0x15D07A00, 0x24D07A00, 0x39D07A00, 0x4AD07A00, 0x79D48205, 0xE6E9A820, 0xFFFDC539, 0xFFF8BC37, 0xFFF8BC37, 0xFFF8BC37, 0xFFF8BC37, 0xFFF8BC37, 0xFFF9BD37, 0xFFFEC63A, 0xD8DF9613, 0x64D17C01, 0x3FD07A00, 0x2FD07A00, 0x1CD07A00, 0x0AD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x04D07A00, 0x3BD07A00, 0x8BD07A00, 0xA5D17B01, 0xBFDA940F, 0xCEE1A317, 0xE2E7B622, 0xF4EDC229, 0xFFF1C62D, 0xFFFAC735, 0xFFFABC35, 0xFFF8B934, 0xFFF8B934, 0xFFF8B934, 0xFFF8B934, 0xFFF8B934, 0xFFF8B934, 0xFFFCBF36, 0xFFF7C733, 0xFCEFC52C, 0xE9EABB24, 0xD8E4AE1D, 0xC6DD9C13, 0xB4D58608, 0x99D07A00, 0x75D07A00, 0x20D07A00, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x01D07A00, 0xBBD78608, 0xFFE9AE1F, 0xFFF9D133, 0xFFFCD839, 0xFFFCD338, 0xFFFCCC36, 0xFFFCC333, 0xFFFCBB32, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFFAB831, 0xFFFCC033, 0xFFFCC735, 0xFFFCD037, 0xFFFCD739, 0xFFFBD536, 0xFFF5C92F, 0xE8E4A318, 0x55D78507, 0x00000000, 0x00000000,
- 0x00000000, 0x13D07A00, 0xFFDF9212, 0xFFFABC2F, 0xFFF9B72F, 0xFFF8B32E, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B32D, 0xFFF9B52E, 0xFFF9B92F, 0xFFF6B52A, 0xC1DB8B0D, 0x00000000, 0x00000000,
- 0x00000000, 0x07D07A00, 0xE6DC8B0E, 0xFFF4AB27, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFEFA421, 0xAAD9860A, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x5ED58005, 0xE8E39213, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF4A925, 0xE2DC890C, 0x45D27C02, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x41D07A00, 0xE7E18F11, 0xFFF3A420, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFEFA11D, 0xE0DB880A, 0x35D07A00, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x5DD47E03, 0xE6E08D0D, 0xFFF5A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF3A11D, 0xDFDB8609, 0x4FD27C01, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40D07A00, 0xE6E08A0C, 0xFFF29D19, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFEE9917, 0xDDDA8407, 0x30D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x5BD37D02, 0xE6DF880A, 0xFFF59C18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF29A16, 0xDCD98306, 0x49D17B01, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x7BD07A00, 0xFFEF9311, 0xFFF69A15, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF69915, 0xFFE2890A, 0x3BD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x01D07A00, 0xA2D17B00, 0xFFF59612, 0xFFF69713, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF79712, 0xFFE98D0B, 0x4BD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x14D07A00, 0xBED87F03, 0xFFF6940E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF7940E, 0xFFF1900B, 0x7ED07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x27D07A00, 0xD1DE8205, 0xFFF8920C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF6910C, 0xFFF5910C, 0xA5D27B01, 0x03D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40D07A00, 0xEAE48505, 0xFFFA9009, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF78E09, 0xC1D97F02, 0x17D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x57D17B00, 0xFBE88504, 0xFFF78D06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF38B06, 0xFFEC8705, 0xFFF18A06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF88E06, 0xD6DF8102, 0x2CD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x83D67D01, 0xFFED8503, 0xFFF48804, 0xFFF48804, 0xFFF48804, 0xFFF48804, 0xFFF28804, 0xFFEA8503, 0xCDDC7F02, 0x79D17B00, 0xA1D47C01, 0xEFE18102, 0xFFEE8604, 0xFFF38804, 0xFFF48804, 0xFFF48804, 0xFFF48804, 0xFFF88B04, 0xEFE58203, 0x46D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xA0D87D01, 0xFFED8401, 0xFFF48602, 0xFFF48602, 0xFFF48602, 0xFFEF8501, 0xE9DE7F01, 0x8FD67D00, 0x23D07A00, 0x04D07A00, 0x0DD07A00, 0x46D07A00, 0xC3D97D01, 0xFFE28001, 0xFFF38602, 0xFFF48602, 0xFFF48602, 0xFFF58702, 0xFDE88201, 0x59D17A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x5FD47B00, 0xF3E58000, 0xFFF18400, 0xFFED8200, 0xDEE07F01, 0x90D37B00, 0x1FD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x01D07A00, 0x3BD07A00, 0xBDD67C00, 0xF2E48000, 0xFFEF8300, 0xFFF08300, 0xDEDF7E01, 0x34D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x10D07A00, 0x71D57C00, 0xD2DB7D00, 0x9AD87C00, 0x34D07A00, 0x0AD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x13D07A00, 0x52D27B00, 0xBBD97D00, 0xCBDA7D00, 0x5DD27B00, 0x0AD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
-},
-
-{
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x41D07A00, 0x8BD07A00, 0xAAD07A00, 0xAAD07A00, 0xAAC48715, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAACA810B, 0xAAD07A00, 0xA4D07A00, 0x7DD07A00, 0x1CD07A00, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x07D07A00, 0x7BD38206, 0xFFE8B82B, 0xFFF9E24B, 0xFFFEEE55, 0xFFFDEE55, 0xFFCBA95F, 0xFFEBEBEB, 0xFFF1F1F1, 0xFFF3F3F3, 0xFFF7F7F7, 0xFFF9F9F9, 0xFFFCFCFC, 0xFFFEFEFE, 0xFFFEFEFE, 0xFFFEFEFE, 0xFFFCFCFC, 0xFFFAFAFA, 0xFFF7F7F7, 0xFFF5F5F5, 0xFFF2F2F2, 0xFFE9E9E9, 0xFFD4AC2F, 0xFFFDEE55, 0xFFFDEC53, 0xFFF6DE47, 0xE4DE9E19, 0x49D38105, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x2DD07A00, 0xD7E39E1C, 0xFFFDDC4A, 0xFFFBD047, 0xFFFACC45, 0xFFF9CB45, 0xFFC4A258, 0xFFD0D0D0, 0xFFD6D6D6, 0xFFDDDDDD, 0xFFE6E6E6, 0xFFEEEEEE, 0xFFF6F6F6, 0xFFFBFBFB, 0xFFF0E5CC, 0xFFD4B167, 0xFFD2B066, 0xFFD0AE64, 0xFFE9E9E9, 0xFFE1E1E1, 0xFFD8D8D8, 0xFFD2D2D2, 0xFFD3A12A, 0xFFF9CB45, 0xFFFACD46, 0xFFFBD348, 0xFFF7CD3E, 0xB2DB9112, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x52D07A00, 0xFCEBAD2C, 0xFFFCCC44, 0xFFF9C943, 0xFFF9C943, 0xFFF9C943, 0xFFC4A258, 0xFFD0D0D0, 0xFFD6D6D6, 0xFFDDDDDD, 0xFFE6E6E6, 0xFFEEEEEE, 0xFFF6F6F6, 0xFFFBFBFB, 0xFFE9D8B3, 0xFFE6B437, 0xFFF9C943, 0xFFD3A02A, 0xFFE9E9E9, 0xFFE1E1E1, 0xFFD8D8D8, 0xFFD2D2D2, 0xFFD3A02A, 0xFFF9C943, 0xFFF9C943, 0xFFF9C943, 0xFFFBCB44, 0xFADD9416, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFEBAD2B, 0xFFF9C741, 0xFFF9C741, 0xFFF9C741, 0xFFF9C741, 0xFFC4A258, 0xFFD0D0D0, 0xFFD6D6D6, 0xFFDDDDDD, 0xFFE6E6E6, 0xFFEEEEEE, 0xFFF6F6F6, 0xFFFBFBFB, 0xFFE9D8B3, 0xFFE6B335, 0xFFF9C741, 0xFFD3A029, 0xFFE9E9E9, 0xFFE1E1E1, 0xFFD8D8D8, 0xFFD2D2D2, 0xFFD3A029, 0xFFF9C741, 0xFFF9C741, 0xFFF9C741, 0xFFF9C741, 0xFFDD9416, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFEAAB2A, 0xFFF8C43F, 0xFFF8C43F, 0xFFF8C43F, 0xFFF8C43F, 0xFFC4A258, 0xFFD0D0D0, 0xFFD6D6D6, 0xFFDDDDDD, 0xFFE6E6E6, 0xFFEEEEEE, 0xFFF6F6F6, 0xFFFBFBFB, 0xFFE9D8B3, 0xFFE5B133, 0xFFF8C43F, 0xFFD29F28, 0xFFE9E9E9, 0xFFE1E1E1, 0xFFD8D8D8, 0xFFD2D2D2, 0xFFD29F28, 0xFFF8C43F, 0xFFF8C43F, 0xFFF8C43F, 0xFFF8C43F, 0xFFDD9315, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFEAAA28, 0xFFF8C23C, 0xFFF8C23C, 0xFFF8C23C, 0xFFF8C23C, 0xFFC4A258, 0xFFD0D0D0, 0xFFD6D6D6, 0xFFDDDDDD, 0xFFE6E6E6, 0xFFEEEEEE, 0xFFF6F6F6, 0xFFFBFBFB, 0xFFE9D8B3, 0xFFE5B032, 0xFFF8C23C, 0xFFD29E27, 0xFFE9E9E9, 0xFFE1E1E1, 0xFFD8D8D8, 0xFFD2D2D2, 0xFFD29E27, 0xFFF8C23C, 0xFFF8C23C, 0xFFF8C23C, 0xFFF8C23C, 0xFFDD9214, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFEAA826, 0xFFF8BF39, 0xFFF8BF39, 0xFFF8BF39, 0xFFF8BF39, 0xFFC9A352, 0xFFCFCDC7, 0xFFD6D6D6, 0xFFDDDDDD, 0xFFE6E6E6, 0xFFEEEEEE, 0xFFF6F6F6, 0xFFFBFBFB, 0xFFE9D8B3, 0xFFD8A329, 0xFFE5AE30, 0xFFCC9723, 0xFFECECEC, 0xFFE1E1E1, 0xFFD8D8D8, 0xFFD0CCC2, 0xFFD8A128, 0xFFF8BF39, 0xFFF8BF39, 0xFFF8BF39, 0xFFF8BF39, 0xFFDD9113, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFEAA624, 0xFFF8BC36, 0xFFF8BC36, 0xFFF8BC36, 0xFFF8BC36, 0xFFD7A63B, 0xFFCCBFA3, 0xFFD6D6D6, 0xFFDDDDDD, 0xFFE6E6E6, 0xFFEEEEEE, 0xFFF6F6F6, 0xFFFBFBFB, 0xFFF8F2E6, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFF5F5F5, 0xFFE1E1E1, 0xFFD8D7D5, 0xFFCBB280, 0xFFE9AF2F, 0xFFF8BC36, 0xFFF8BC36, 0xFFF8BC36, 0xFFF8BC36, 0xFFDD9012, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFEAA422, 0xFFF8B933, 0xFFF8B933, 0xFFF8B933, 0xFFF8B933, 0xFFF1B430, 0xFFD6A02D, 0xFFD0B57B, 0xFFD3C099, 0xFFD9C8A3, 0xFFDFCDA8, 0xFFE4D3AE, 0xFFE7D6B1, 0xFFE9D8B3, 0xFFE8D7B2, 0xFFE5D3AE, 0xFFE1CFAA, 0xFFDBCAA5, 0xFFD5C298, 0xFFD0AB5D, 0xFFDDA42C, 0xFFF8B933, 0xFFF8B933, 0xFFF8B933, 0xFFF8B933, 0xFFF8B933, 0xFFDD8F11, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFEAA120, 0xFFF7B530, 0xFFF7B530, 0xFFF7B530, 0xFFF7B530, 0xFFF7B530, 0xFFF4B32F, 0xFFE9AB2B, 0xFFE5A72A, 0xFFE4A729, 0xFFE4A729, 0xFFE4A729, 0xFFE4A729, 0xFFE4A729, 0xFFE4A729, 0xFFE4A729, 0xFFE4A729, 0xFFE4A729, 0xFFE5A82A, 0xFFEDAE2D, 0xFFF5B430, 0xFFF7B530, 0xFFF7B530, 0xFFF7B530, 0xFFF7B530, 0xFFF7B530, 0xFFDD8E10, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFEA9F1E, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFDD8D0F, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFEA9D1C, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFDD8B0E, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFEA9A19, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF0A725, 0xFFE8A324, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE5A124, 0xFFE9A424, 0xFFF4AA26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFDD8A0D, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFE99917, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFE9A122, 0xFFD7A84A, 0xFFE5CC98, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFE9D6AE, 0xFFE4C78C, 0xFFD89C2A, 0xFFF0A522, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFDD890B, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFE99614, 0xFFF6A41F, 0xFFF6A41F, 0xFFEFA11F, 0xFFD7A94D, 0xFFFBF9F6, 0xFFF7F7F7, 0xFFEFEFEF, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFF2F2F2, 0xFFF8F8F8, 0xFFEEE1C5, 0xFFDBA136, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFDC880A, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFE99413, 0xFFF6A11C, 0xFFF6A11C, 0xFFE79B1C, 0xFFDDC594, 0xFFF3F3F3, 0xFFEDEDED, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFEDEDED, 0xFFF2EFEA, 0xFFD2AA59, 0xFFF6A11C, 0xFFF6A11C, 0xFFF6A11C, 0xFFDC8709, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFE99110, 0xFFF69D18, 0xFFF69D18, 0xFFE49719, 0xFFDCCAA5, 0xFFE9E9E9, 0xFFE2E2E2, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFE6E6E6, 0xFFEAEAEA, 0xFFCEAB61, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFDC8608, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFE88F0E, 0xFFF59A15, 0xFFF59A15, 0xFFE39518, 0xFFDAC9A4, 0xFFE7E7E7, 0xFFE0E0E0, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFE4E4E4, 0xFFE7E7E7, 0xFFCDAA60, 0xFFF59A15, 0xFFF59A15, 0xFFF59A15, 0xFFDC8507, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFE88D0C, 0xFFF59712, 0xFFF59712, 0xFFE39315, 0xFFD8C6A1, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFCCA95F, 0xFFF59712, 0xFFF59712, 0xFFF59712, 0xFFDC8406, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFE88B0A, 0xFFF5930F, 0xFFF5930F, 0xFFE39114, 0xFFD5C49F, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFCBA85E, 0xFFF5930F, 0xFFF5930F, 0xFFF5930F, 0xFFDC8205, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFE88808, 0xFFF5900C, 0xFFF5900C, 0xFFE38E11, 0xFFD3C29D, 0xFFDCDCDC, 0xFFCECECE, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFD6D6D6, 0xFFDDDDDD, 0xFFCAA75D, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFDC8104, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFE88706, 0xFFF58E09, 0xFFF58E09, 0xFFE38D10, 0xFFD1C09B, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFC8A65C, 0xFFF58E09, 0xFFF58E09, 0xFFF58E09, 0xFFDC8103, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFE88504, 0xFFF48B07, 0xFFF48B07, 0xFFE38B0E, 0xFFCEBD98, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFC7A55B, 0xFFF48B07, 0xFFF48B07, 0xFFF48B07, 0xFFDC8002, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x52D07A00, 0xFCE78404, 0xFFF48905, 0xFFF48905, 0xFFE28A0D, 0xFFCDBC97, 0xFFD3D3D3, 0xFFC6C6C6, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFCDCDCD, 0xFFD4D4D4, 0xFFC7A45A, 0xFFF48905, 0xFFF48905, 0xFFF38905, 0xFADC7F02, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x2ED07A00, 0xD8DF7F01, 0xFFF38602, 0xFFF48602, 0xFFE2880B, 0xFFCBBA95, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFC6A359, 0xFFF48602, 0xFFF48602, 0xFFED8402, 0xB2D97D01, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x08D07A00, 0x7BD37B00, 0xFFE27F00, 0xFFF08401, 0xFFE2870A, 0xFFCAB893, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFC5A258, 0xFFF38501, 0xFFEE8301, 0xE4DB7D00, 0x49D27B00, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x43D07A00, 0x8DD07A00, 0xAACD7D05, 0xAAC28919, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC48715, 0xA5D07A00, 0x7FD07A00, 0x1DD07A00, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
-},
-
-{
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0E999999, 0x59999999, 0x9E999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0x8B999999, 0x41999999, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x0F999999, 0xC8AEAEAE, 0xFFDADADA, 0xFFF7F7F7, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFF1F1F1, 0xFFCDCDCD, 0x7BA1A1A1, 0x08999999, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x5B999999, 0xFFDADADA, 0xFFF8F8F8, 0xFFF2F2F2, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFF0F0F0, 0xFFF3F3F3, 0xFFFAFAFA, 0xD8BFBFBF, 0x2E999999, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xA3999999, 0xFFEEEEEE, 0xFFF0F0F0, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFF2F2F2, 0xFCD1D1D1, 0x53999999, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFD1D1D1, 0x55999999, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFEDEDED, 0xFFEDEDED, 0xFFEDEDED, 0xFFB5B5B5, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF9A9A9A, 0xFFD3D3D3, 0xFFEDEDED, 0xFFEDEDED, 0xFFD1D1D1, 0x55999999, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFEDEDED, 0xFFEDEDED, 0xFFEDEDED, 0xFFDADADA, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFE4E4E4, 0xFFEDEDED, 0xFFEDEDED, 0xFFD1D1D1, 0x55999999, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFD0D0D0, 0x55999999, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFCFCFCF, 0x55999999, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFEAEAEA, 0xFFEAEAEA, 0xFFEAEAEA, 0xFFD8D8D8, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFE1E1E1, 0xFFEAEAEA, 0xFFEAEAEA, 0xFFCFCFCF, 0x55999999, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE9E9E9, 0xFFE9E9E9, 0xFFE9E9E9, 0xFFB4B4B4, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF9A9A9A, 0xFFD0D0D0, 0xFFE9E9E9, 0xFFE9E9E9, 0xFFCECECE, 0x55999999, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFCDCDCD, 0x55999999, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFCDCDCD, 0x55999999, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFCCCCCC, 0x55999999, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFCBCBCB, 0x55999999, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFB2B2B2, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF9A9A9A, 0xFFCCCCCC, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFCBCBCB, 0x55999999, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFD2D2D2, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFB0BABD, 0xFFAEB9BC, 0xFFDADBDB, 0xFFABC1C8, 0xFFD9DDDE, 0xFFCACACA, 0x55999999, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFDEE0E0, 0xFFBECFD4, 0xFFC5D1D4, 0xFF6CADC1, 0xFF53B4CE, 0xFF89B6C4, 0xFF35AAC8, 0xFFA8C3CC, 0xFFA6B9BE, 0x59758F96, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFD2D7D9, 0xFF5CABC4, 0xFF4AB6D1, 0xFF35ACD0, 0xFF2ABAE5, 0xFF25B0D9, 0xFF28B6E3, 0xFF49ACC8, 0xFF3AACCB, 0x632385A4, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFDEDFDF, 0xFFA7C0C9, 0xFF79B4C5, 0xFF3CA1C0, 0xFF29B3E0, 0xFF25B0DC, 0xFF5DC2E3, 0xFFB1E2F2, 0xFF59C2E3, 0xFF26B3DE, 0xFF26A8D2, 0xA41C8CAD, 0x661783A4, 0x180E6784,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDFDFDF, 0xFFDFDFDF, 0xFFDFDFDF, 0xFFC0C0C0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFDEDEDE, 0xFF87AEBA, 0xFF24A7D1, 0xFF25ABD5, 0xFF25A8D1, 0xFF1EA4CF, 0xFF9BD7EA, 0xFFFFFFFF, 0xFF91D3E8, 0xFF23A6D0, 0xFF25A9D2, 0xFD26ACD4, 0xD11E94B8, 0x280D647F,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFBFBFBF, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFBFCCD1, 0xFF85B3C2, 0xFF1F96BC, 0xFF229FC7, 0xFF229FC6, 0xFF1B9BC5, 0xFF95D1E4, 0xFFFFFFFF, 0xFF8DCDE2, 0xFF219DC6, 0xFF229FC6, 0xFF22A0C8, 0xBE1986A9, 0x46137696,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFF77A5B4, 0xFF2795B9, 0xFF2099C0, 0xFF2097BD, 0xFF2097BD, 0xFF1A95BC, 0xFF8BC9DD, 0xFFFEFEFF, 0xFF7CC2D8, 0xFF1D96BC, 0xFF2097BD, 0xFF2097BE, 0xFB219BC1, 0xDE1780A1,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFCBD2D3, 0xFF5293A8, 0xFF1D8FB3, 0xFF1C8EB1, 0xFF1C8EB1, 0xFF198CB0, 0xFF77BAD0, 0xFFFCFDFE, 0xFF64B1CA, 0xFF178BAF, 0xFF1C8EB1, 0xFF1C8EB2, 0xF21984A6, 0x5E0F6884,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFF85ABB8, 0xFF2789AA, 0xFF1B87A9, 0xFF1A85A7, 0xFF1A85A7, 0xFF1884A6, 0xFF69AEC5, 0xFFF9FCFD, 0xFF51A2BC, 0xFF1683A5, 0xFF1A85A7, 0xFF1A85A7, 0xFB1B88AB, 0xC0147695,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFAFC0C6, 0xFF5F95A6, 0xFF177998, 0xFF187C9D, 0xFF187C9C, 0xFF177B9C, 0xFF2C87A4, 0xFF75B0C3, 0xFF1E7F9F, 0xFF177B9C, 0xFF187C9C, 0xFF177D9D, 0xD7147190, 0x7C0F6682,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFF94B1B9, 0xFF167695, 0xFF167695, 0xFF157593, 0xFF137492, 0xFF4E97AE, 0xFFA3CAD6, 0xFF4390A9, 0xFF147492, 0xFF157593, 0xFF177796, 0xBD126D8B, 0x190B5B75,
- 0x00000000, 0x00000000, 0x00000000, 0x91999999, 0xFFD2D2D2, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD6D7D8, 0xFF7FA4B0, 0xFF4D899B, 0xFF21718B, 0xFF136D8A, 0xFF0C6986, 0xFF7FB0BF, 0xFFE5EFF2, 0xFF78ABBB, 0xFF116C89, 0xFC136C88, 0xCA106682, 0x990F6580, 0x240B5E78,
- 0x00000000, 0x00000000, 0x00000000, 0x45999999, 0xFFBCBCBC, 0xFFD8D8D8, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD3D6D6, 0xFFBFC9CC, 0xFF3D7E93, 0xFF126681, 0xFF116682, 0xFF22728B, 0xFF44889D, 0xFF1F6F89, 0xF90F6480, 0xFC116681, 0x620D607A, 0x0A0A5A74, 0x020A5B75,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x7B9C9C9C, 0xD7B1B1B1, 0xFAC1C1C1, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFBDBFC0, 0xFF819BA4, 0xFF96A8AD, 0xFF467C8E, 0xF220687F, 0xCB276A7F, 0xE90E607A, 0x520B5D77, 0x5F0B5D77, 0x2B0B5D77, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x07999999, 0x2D999999, 0x50999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x72407283, 0x6626687D, 0x22467584, 0x800B5C76, 0x1A0A5B75, 0x00000000, 0x00000000, 0x00000000, 0x00000000
-},
-
-
-{
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x03B5B5B5, 0x48B6B6B6, 0xC2C9C9C9, 0xF9CDCDCD, 0xFFCDCDCD, 0xFFCDCDCD, 0xFFCDCDCD, 0xFFCDCDCD, 0xFFCDCDCD, 0xFBCDCDCD, 0xAEC5C5C5, 0x3BB7B7B7, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x21B5B5B5, 0xCBCBCBCB, 0xFFF5F5F5, 0xFFF9F9F9, 0xFFF7F7F7, 0xFFF7F7F7, 0xFFF7F7F7, 0xFFF7F7F7, 0xFFF7F7F7, 0xFFF9F9F9, 0xFFECECEC, 0xB4C6C6C6, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x51B5B5B5, 0xFADDDDDD, 0xFFF6F6F6, 0xFFF3F3F3, 0xFFF3F3F3, 0xFFF3F3F3, 0xFFF3F3F3, 0xFFF3F3F3, 0xFFF3F3F3, 0xFFF3F3F3, 0xFFF7F7F7, 0xFFD1D1D1, 0x63B5B5B5, 0x55B5B5B5, 0x55B5B5B5, 0x55B5B5B5, 0x55B5B5B5, 0x55B5B5B5, 0x55B5B5B5, 0x55B5B5B5, 0x55B5B5B5, 0x55B5B5B5, 0x55B5B5B5, 0x55B5B5B5, 0x55B5B5B5, 0x55B5B5B5, 0x52B5B5B5, 0x37B5B5B5, 0x06B5B5B5, 0x00000000, 0x00000000, 0x00000000,
- 0x55B5B5B5, 0xFFDEDEDE, 0xFFF3F3F3, 0xFFF3F3F3, 0xFFF3F3F3, 0xFFF3F3F3, 0xFFF3F3F3, 0xFFF3F3F3, 0xFFF3F3F3, 0xFFF3F3F3, 0xFFF7F7F7, 0xFFF1F1F1, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFCE5E5E5, 0xE1D9D9D9, 0x7EB6B6B6, 0x07B5B5B5, 0x00000000, 0x00000000,
- 0x55B5B5B5, 0xFFDEDEDE, 0xFFF2F2F2, 0xFFF2F2F2, 0xFFF2F2F2, 0xFFF2F2F2, 0xFFF2F2F2, 0xFFF2F2F2, 0xFFF2F2F2, 0xFFF2F2F2, 0xFFF2F2F2, 0xFFF2F2F2, 0xFFF2F2F2, 0xFFF2F2F2, 0xFFF2F2F2, 0xFFF2F2F2, 0xFFF2F2F2, 0xFFF2F2F2, 0xFFF2F2F2, 0xFFF2F2F2, 0xFFF0F0EE, 0xFFEADFCF, 0xFFE4CEB1, 0xFFE3CEB0, 0xFFE3CEB0, 0xFFE3CEB0, 0xFFE5D0B2, 0xFFEAD5B7, 0xE4CEB696, 0x58C0965D, 0x06C4842A, 0x00000000,
- 0x55B5B5B5, 0xFFDDDDDD, 0xFFF1F1F1, 0xFFF1F1F1, 0xFFF1F1F1, 0xFFF1F1F1, 0xFFF1F1F1, 0xFFF1F1F1, 0xFFF1F1F1, 0xFFF1F1F1, 0xFFF1F1F1, 0xFFF1F1F1, 0xFFF1F1F1, 0xFFF1F1F1, 0xFFF1F1F1, 0xFFF1F1F1, 0xFFF1F1F1, 0xFFF1F1F1, 0xFFF1F1F1, 0xFFF1F1F1, 0xFFDEC7A8, 0xFFE7A054, 0xFFC4B778, 0xFFBAB97E, 0xFFBAB97E, 0xFFBAB97E, 0xFFBAB97E, 0xFFBAB97E, 0xFFC4B475, 0xE4E89A43, 0x7EC7842A, 0x07C4842A,
- 0x55B5B5B5, 0xFFDCDCDC, 0xFFF0F0F0, 0xFFF0F0F0, 0xFFF0F0F0, 0xFFF0F0F0, 0xFFF0F0F0, 0xFFF0F0F0, 0xFFF0F0F0, 0xFFF0F0F0, 0xFFF0F0F0, 0xFFF0F0F0, 0xFFF0F0F0, 0xFFF0F0F0, 0xFFF0F0F0, 0xFFF0F0F0, 0xFFF0F0F0, 0xFFF0F0F0, 0xFFF0F0F0, 0xFFEDEDEC, 0xFFE3A34E, 0xFFFBC160, 0xFFFFBE5A, 0xFFFFBA57, 0xFFFFBA57, 0xFFFFBA57, 0xFFFFBA57, 0xFFFFBA57, 0xFFFFBE5B, 0xFFFAC668, 0xE2F09F37, 0x38C4842A,
- 0x55B5B5B5, 0xFFDBDBDB, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFE5E3DF, 0xFFE99B32, 0xFFFFBA55, 0xFFFFB853, 0xFFFFB853, 0xFFFFB853, 0xFFFFB853, 0xFFFFB853, 0xFFFFB853, 0xFFFFB853, 0xFFFFBA56, 0xFDECA644, 0x53C4842A,
- 0x55B5B5B5, 0xFFDBDBDB, 0xFFEEEEEE, 0xFFECECEB, 0xFFE5D7C4, 0xFFE2CCAF, 0xFFE0CBAD, 0xFFE0CBAD, 0xFFE0CBAD, 0xFFE0CBAD, 0xFFE0CBAD, 0xFFE0CBAD, 0xFFE0CBAD, 0xFFE0CBAD, 0xFFE0CBAD, 0xFFE0CBAD, 0xFFE0CBAD, 0xFFE0CBAD, 0xFFE0CBAD, 0xFFD9C2A0, 0xFFEC9C30, 0xFFFFB751, 0xFFFFB64F, 0xFFFFB64F, 0xFFFFB64F, 0xFFFFB64F, 0xFFFFB64F, 0xFFFFB64F, 0xFFFFB64F, 0xFFFFB64F, 0xFFEBA543, 0x55C4842A,
- 0x55B5B5B5, 0xFFDADADA, 0xFFEAEAE9, 0xFFD7B98F, 0xFFF0A750, 0xFFDDB262, 0xFFD5B56A, 0xFFD5B56A, 0xFFD5B56A, 0xFFD5B56A, 0xFFD5B56A, 0xFFD5B56A, 0xFFD5B56A, 0xFFD5B56A, 0xFFD5B56A, 0xFFD5B56A, 0xFFD5B56A, 0xFFD5B56A, 0xFFD5B56A, 0xFFD8B367, 0xFFFAB952, 0xFFFFB64F, 0xFFFFB24B, 0xFFFFB24B, 0xFFFFB24B, 0xFFFFB24B, 0xFFFFB24B, 0xFFFFB24B, 0xFFFFB24B, 0xFFFFB24B, 0xFFEBA340, 0x55C4842A,
- 0x55B5B5B5, 0xFFDADADA, 0xFFE3D5C1, 0xFFF0A544, 0xFFFFB753, 0xFFFFB048, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFEBA03B, 0x55C4842A,
- 0x55B5B5B5, 0xFFD9D9D9, 0xFFDFC9AC, 0xFFEC9F38, 0xFFFFAE42, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFEB9E39, 0x55C4842A,
- 0x55B5B5B5, 0xFFD9D9D9, 0xFFDEC8AA, 0xFFEB9C34, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFEB9C34, 0x55C4842A,
- 0x55B5B5B5, 0xFFD8D8D8, 0xFFDDC8AA, 0xFFEB9A30, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFEB9A30, 0x55C4842A,
- 0x55B5B5B5, 0xFFD7D7D7, 0xFFDCC7A9, 0xFFEB972B, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFEB972B, 0x55C4842A,
- 0x55B5B5B5, 0xFFD7D7D7, 0xFFDCC6A8, 0xFFEB9627, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFEB9627, 0x55C4842A,
- 0x55B5B5B5, 0xFFD7D7D7, 0xFFDCC6A8, 0xFFEB9423, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFEB9423, 0x55C4842A,
- 0x55B5B5B5, 0xFFD5D5D5, 0xFFDAC5A7, 0xFFEA9320, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFEA9320, 0x55C4842A,
- 0x55B5B5B5, 0xFFD5D5D5, 0xFFDAC5A7, 0xFFE38F21, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFE38F21, 0x55C4842A,
- 0x55B5B5B5, 0xFFD4D4D4, 0xFFD9C4A6, 0xFFDE8D22, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFDE8D22, 0x55C4842A,
- 0x55B5B5B5, 0xFFD4D4D4, 0xFFD9C4A6, 0xFFD88A24, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFD88A24, 0x55C4842A,
- 0x51B5B5B5, 0xFAD3D3D3, 0xFFD8C3A5, 0xFFD38926, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFD38926, 0x55C4842A,
- 0x21B5B5B5, 0xCBC3C3C3, 0xFFD6C4AC, 0xFFCE8B34, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xEDCC8628, 0x43C4842A,
- 0x03B5B5B5, 0x4CB6B6B6, 0xC8BFB9B1, 0xFAC3924D, 0xFFCA8629, 0xFFCD8829, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8829, 0xFFCA8629, 0xC1C6852A, 0x17C4842A,
- 0x00000000, 0x00000000, 0x00000000, 0x10C4842A, 0x72C4842A, 0xA5C4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xA5C4842A, 0x72C4842A, 0x10C4842A, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
-},
-
-{
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x27999999, 0x8E999999, 0xAA999999, 0xAA999999, 0x8E999999, 0x27999999, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x10999999, 0xBAAAAAAA, 0xFFF2F2F2, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFF2F2F2, 0xBAA9A9A9, 0x10999999, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x37999999, 0xE1C4C4C4, 0xFFF6F6F6, 0xFFF0F0F0, 0xFFF0F0F0, 0xFFF5F5F5, 0xDAC0C0C0, 0x30999999, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x49A1A1A1, 0x99B0B0B0, 0x69A7A7A7, 0x23999999, 0x00000000, 0x00000000, 0x659D9D9D, 0xF8D4D4D4, 0xFFF1F1F1, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFF3F3F3, 0xF4D3D3D3, 0x619D9D9D, 0x00000000, 0x00000000, 0x23999999, 0x69A7A7A7, 0x99B0B0B0, 0x49A1A1A1, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x43999999, 0xE8C7C7C7, 0xFFEAEAEA, 0xF6DEDEDE, 0xCDAFAFAF, 0x58999999, 0x80999999, 0xDDC0C0C0, 0xFFF0F0F0, 0xFFEFEFEF, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEFEFEF, 0xFFF1F1F1, 0xDDC0C0C0, 0x7E999999, 0x56999999, 0xCDAFAFAF, 0xF6DEDEDE, 0xFFEAEAEA, 0xE8C7C7C7, 0x43999999, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x4CA3A3A3, 0xE8C7C7C7, 0xFFFBFBFB, 0xFFF0F0F0, 0xFFF4F4F4, 0xFFF9F9F9, 0xFFDADADA, 0xFFECECEC, 0xFFFAFAFA, 0xFFF3F3F3, 0xFFEDEDED, 0xFFEDEDED, 0xFFEDEDED, 0xFFEDEDED, 0xFFF3F3F3, 0xFFFAFAFA, 0xFFEBEBEB, 0xFFD9D9D9, 0xFFF9F9F9, 0xFFF4F4F4, 0xFFF0F0F0, 0xFFFBFBFB, 0xE8C7C7C7, 0x4CA3A3A3, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x9DADADAD, 0xFFE1E1E1, 0xFFF0F0F0, 0xFFEDEDED, 0xFFEDEDED, 0xFFF0F0F0, 0xFFF3F3F3, 0xFFF2F2F2, 0xFFEEEEEE, 0xFFEDEDED, 0xFFEDEDED, 0xFFEDEDED, 0xFFEDEDED, 0xFFEDEDED, 0xFFEDEDED, 0xFFEEEEEE, 0xFFF2F2F2, 0xFFF3F3F3, 0xFFF0F0F0, 0xFFEDEDED, 0xFFEDEDED, 0xFFF0F0F0, 0xFFE1E1E1, 0x9DADADAD, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x7AA7A7A7, 0xFAD5D5D5, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFE6E6E6, 0xFFDEDEDE, 0xFFDADADA, 0xFFDADADA, 0xFFDEDEDE, 0xFFE6E6E6, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xF8D4D4D4, 0x79A7A7A7, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x2E999999, 0xD8B0B0B0, 0xFFE8E8E8, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEAEAEA, 0xFFD4D4D4, 0xFFC2C2C2, 0xFFB9B9B9, 0xFFB6B6B6, 0xFFB6B6B6, 0xFFB9B9B9, 0xFFC2C2C2, 0xFFD4D4D4, 0xFFEAEAEA, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFE8E8E8, 0xD3AFAFAF, 0x29999999, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x60999999, 0xFFD3D3D3, 0xFFEBEBEB, 0xFFEAEAEA, 0xFFEAEAEA, 0xFFE2E2E2, 0xFFC5C5C5, 0xFFB5B5B5, 0xFFB5B5B5, 0xFFB5B5B5, 0xFFB5B5B5, 0xFFB5B5B5, 0xFFB5B5B5, 0xFFB5B5B5, 0xFFB5B5B5, 0xFFC5C5C5, 0xFFE2E2E2, 0xFFEAEAEA, 0xFFEAEAEA, 0xFFEBEBEB, 0xFFD3D3D3, 0x60999999, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x8A999999, 0xFFE6E6E6, 0xFFECECEC, 0xFFE9E9E9, 0xFFE8E8E8, 0xFFC6C6C6, 0xFFB8B8B8, 0xFFB7B7B7, 0xFFB7B7B7, 0xFFB7B7B7, 0xFFB7B7B7, 0xFFB7B7B7, 0xFFB7B7B7, 0xFFB7B7B7, 0xFFB7B7B7, 0xFFB8B8B8, 0xFFC6C6C6, 0xFFE8E8E8, 0xFFE9E9E9, 0xFFECECEC, 0xFFE2E2E2, 0x83999999, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x0E999999, 0x2E999999, 0x619D9D9D, 0xDDC1C1C1, 0xFFF0F0F0, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFD4D4D4, 0xFFB9B9B9, 0xFFB9B9B9, 0xFFB9B9B9, 0xFFBABABA, 0xD8B9B9B9, 0xB9B9B9B9, 0xB9B9B9B9, 0xD8B9B9B9, 0xFFBABABA, 0xFFB9B9B9, 0xFFB9B9B9, 0xFFB9B9B9, 0xFFD4D4D4, 0xFFE8E8E8, 0xFFE9E9E9, 0xFFF2F2F2, 0xDDBFBFBF, 0x619D9D9D, 0x2E999999, 0x0E999999, 0x00000000, 0x00000000,
- 0x00000000, 0x27999999, 0xB8A8A8A8, 0xD8C4C4C4, 0xF4D9D9D9, 0xFFEFEFEF, 0xFFECECEC, 0xFFE7E7E7, 0xFFE3E3E3, 0xFFC7C7C7, 0xFFBCBCBC, 0xFFBCBCBC, 0xFFBCBCBC, 0xC6BCBCBC, 0x2EBBBBBB, 0x0FBBBBBB, 0x0FBBBBBB, 0x2EBBBBBB, 0xC6BCBCBC, 0xFFBCBCBC, 0xFFBCBCBC, 0xFFBCBCBC, 0xFFC7C7C7, 0xFFE3E3E3, 0xFFE7E7E7, 0xFFECECEC, 0xFFEFEFEF, 0xF4D9D9D9, 0xD8C4C4C4, 0xB8A8A8A8, 0x27999999, 0x00000000,
- 0x04999999, 0x919D9D9D, 0xFFECECEC, 0xFFF6F6F6, 0xFFEBEBEB, 0xFFE6E6E6, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFDCDCDC, 0xFFC2C2C2, 0xFFBEBEBE, 0xFFBEBEBE, 0xD8BEBEBE, 0x2EBEBEBE, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x2EBEBEBE, 0xD8BEBEBE, 0xFFBEBEBE, 0xFFBEBEBE, 0xFFC2C2C2, 0xFFDBDBDB, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE6E6E6, 0xFFEBEBEB, 0xFFF6F6F6, 0xFFEBEBEB, 0x8E999999, 0x00000000,
- 0x12999999, 0xBCA8A8A8, 0xFFE6E6E6, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFDADADA, 0xFFC2C2C2, 0xFFC1C1C1, 0xFFC1C1C1, 0xB9C1C1C1, 0x0FC1C1C1, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0FC1C1C1, 0xB9C1C1C1, 0xFFC1C1C1, 0xFFC1C1C1, 0xFFC1C1C1, 0xFFD9D9D9, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xAA999999, 0x00000000,
- 0x14999999, 0xBEA8A8A8, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFDCDCDC, 0xFFC4C4C4, 0xFFC3C3C3, 0xFFC3C3C3, 0xB9C4C4C4, 0x0FC4C4C4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0FC4C4C4, 0xB9C4C4C4, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC4C4C4, 0xFFDDDDDD, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFE3E3E3, 0xAA999999, 0x00000000,
- 0x05999999, 0x9A9E9E9E, 0xFFDCDCDC, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFDEDEDE, 0xFFC8C8C8, 0xFFC5C5C5, 0xFFC5C5C5, 0xD8C6C6C6, 0x2EC6C6C6, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x2EC6C6C6, 0xD8C6C6C6, 0xFFC5C5C5, 0xFFC5C5C5, 0xFFC8C8C8, 0xFFDDDDDD, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFDCDCDC, 0x95999999, 0x00000000,
- 0x00000000, 0x2D999999, 0xC3A8A8A8, 0xE5BEBEBE, 0xFCCACACA, 0xFFDADADA, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE2E2E2, 0xFFD2D2D2, 0xFFC8C8C8, 0xFFC8C8C8, 0xFFC8C8C8, 0xC6C9C9C9, 0x2ECACACA, 0x0FCACACA, 0x0FCACACA, 0x2ECACACA, 0xC6C9C9C9, 0xFFC8C8C8, 0xFFC8C8C8, 0xFFC8C8C8, 0xFFD1D1D1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFD9D9D9, 0xFCCACACA, 0xE5BEBEBE, 0xC3A8A8A8, 0x2D999999, 0x00000000,
- 0x00000000, 0x00000000, 0x19999999, 0x3B999999, 0x709D9D9D, 0xE4B9B9B9, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE2E2E2, 0xFFDDDDDD, 0xFFCBCBCB, 0xFFCBCBCB, 0xFFCBCBCB, 0xFFCBCBCB, 0xD8CCCCCC, 0xB9CCCCCC, 0xB9CCCCCC, 0xD8CCCCCC, 0xFFCBCBCB, 0xFFCBCBCB, 0xFFCBCBCB, 0xFFCBCBCB, 0xFFDDDDDD, 0xFFE2E2E2, 0xFFE0E0E0, 0xFFE0E0E0, 0xE1B8B8B8, 0x6C9D9D9D, 0x3B999999, 0x19999999, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x04999999, 0x959C9C9C, 0xFFD7D7D7, 0xFFDFDFDF, 0xFFDFDFDF, 0xFFE4E4E4, 0xFFD8D8D8, 0xFFCECECE, 0xFFCECECE, 0xFFCECECE, 0xFFCECECE, 0xFFCECECE, 0xFFCECECE, 0xFFCECECE, 0xFFCECECE, 0xFFCECECE, 0xFFCECECE, 0xFFD8D8D8, 0xFFE4E4E4, 0xFFDFDFDF, 0xFFDFDFDF, 0xFFD7D7D7, 0x8A999999, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x60999999, 0xFFCBCBCB, 0xFFDFDFDF, 0xFFDEDEDE, 0xFFDFDFDF, 0xFFE3E3E3, 0xFFDADADA, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFDADADA, 0xFFE3E3E3, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDFDFDF, 0xFFC9C9C9, 0x5C999999, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x23999999, 0xCDACACAC, 0xFFE8E8E8, 0xFFDFDFDF, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDEDEDE, 0xFFE3E3E3, 0xFFE1E1E1, 0xFFDADADA, 0xFFD5D5D5, 0xFFD2D2D2, 0xFFD2D2D2, 0xFFD5D5D5, 0xFFD9D9D9, 0xFFE1E1E1, 0xFFE3E3E3, 0xFFDEDEDE, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFE0E0E0, 0xFFE9E9E9, 0xCDACACAC, 0x23999999, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x69A3A3A3, 0xF6CECECE, 0xFFE4E4E4, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDFDFDF, 0xFFE1E1E1, 0xFFDFDFDF, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFDFDFDF, 0xFFE1E1E1, 0xFFDFDFDF, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFE4E4E4, 0xF6CECECE, 0x69A3A3A3, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x9DA8A8A8, 0xFFCFCFCF, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFCFCFCF, 0x9DA8A8A8, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x4E9F9F9F, 0xEABFBFBF, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFD9D9D9, 0xFFC7C7C7, 0xFFD2D2D2, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFD2D2D2, 0xFFC7C7C7, 0xFFD9D9D9, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xE8B7B7B7, 0x4C9F9F9F, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0C999999, 0x5F999999, 0xEABFBFBF, 0xFFCECECE, 0xFAC8C8C8, 0xD8ABABAB, 0x60999999, 0x959C9C9C, 0xE4B5B5B5, 0xFFD3D3D3, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFD2D2D2, 0xE1B4B4B4, 0x959C9C9C, 0x60999999, 0xD8ADADAD, 0xFAC8C8C8, 0xFFCECECE, 0xE8B7B7B7, 0x43999999, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0C999999, 0x52A0A0A0, 0xA0A8A8A8, 0x7AA4A4A4, 0x2E999999, 0x00000000, 0x04999999, 0x709C9C9C, 0xFCC4C4C4, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xF4C1C1C1, 0x659B9B9B, 0x04999999, 0x00000000, 0x2E999999, 0x7AA4A4A4, 0xA0A8A8A8, 0x50A0A0A0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x39999999, 0xE3B9B9B9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xDAB5B5B5, 0x30999999, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x14999999, 0xBEA5A5A5, 0xFFD3D3D3, 0xFFD8D8D8, 0xFFD8D8D8, 0xFFD3D3D3, 0xBAA4A4A4, 0x10999999, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x2D999999, 0x9C9F9F9F, 0xC0A7A7A7, 0xBEA6A6A6, 0x9A9E9E9E, 0x2D999999, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x07999999, 0x16999999, 0x14999999, 0x05999999, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
-}
-};
-
-#define UI_TOOLBAR_BUTTONS ARRAY_LENGTH(toolbar_bitmap_bmp)
diff --git a/src/emu/ui/ui.cpp b/src/emu/ui/ui.cpp
index b002560382c..3f2d252c107 100644
--- a/src/emu/ui/ui.cpp
+++ b/src/emu/ui/ui.cpp
@@ -37,8 +37,6 @@ enum
LOADSAVE_SAVE
};
-#define MAX_SAVED_STATE_JOYSTICK 4
-
/***************************************************************************
LOCAL VARIABLES
@@ -88,25 +86,6 @@ static const input_item_id non_char_keys[] =
ITEM_ID_CANCEL
};
-static const char *s_color_list[] = {
- OPTION_UI_BORDER_COLOR,
- OPTION_UI_BACKGROUND_COLOR,
- OPTION_UI_GFXVIEWER_BG_COLOR,
- OPTION_UI_UNAVAILABLE_COLOR,
- OPTION_UI_TEXT_COLOR,
- OPTION_UI_TEXT_BG_COLOR,
- OPTION_UI_SUBITEM_COLOR,
- OPTION_UI_CLONE_COLOR,
- OPTION_UI_SELECTED_COLOR,
- OPTION_UI_SELECTED_BG_COLOR,
- OPTION_UI_MOUSEOVER_COLOR,
- OPTION_UI_MOUSEOVER_BG_COLOR,
- OPTION_UI_MOUSEDOWN_COLOR,
- OPTION_UI_MOUSEDOWN_BG_COLOR,
- OPTION_UI_DIPSW_COLOR,
- OPTION_UI_SLIDER_COLOR
-};
-
/***************************************************************************
GLOBAL VARIABLES
***************************************************************************/
@@ -160,24 +139,6 @@ static INT32 slider_crossoffset(running_machine &machine, void *arg, std::string
***************************************************************************/
//-------------------------------------------------
-// load ui options
-//-------------------------------------------------
-
-static void load_ui_options(running_machine &machine)
-{
- // parse the file
- std::string error;
- // attempt to open the output file
- emu_file file(machine.options().ini_path(), OPEN_FLAG_READ);
- if (file.open("ui.ini") == FILERR_NONE)
- {
- bool result = machine.ui().options().parse_ini_file((core_file&)file, OPTION_PRIORITY_MAME_INI, OPTION_PRIORITY_DRIVER_INI, error);
- if (!result)
- osd_printf_error("**Error to load ui.ini**");
- }
-}
-
-//-------------------------------------------------
// is_breakable_char - is a given unicode
// character a possible line break?
//-------------------------------------------------
@@ -222,8 +183,7 @@ static inline int is_breakable_char(unicode_char ch)
CORE IMPLEMENTATION
***************************************************************************/
-static const UINT32 mouse_bitmap[32*32] =
-{
+static const UINT32 mouse_bitmap[] = {
0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,
0x09a46f30,0x81ac7c43,0x24af8049,0x00ad7d45,0x00a8753a,0x00a46f30,0x009f6725,0x009b611c,0x00985b14,0x0095560d,0x00935308,0x00915004,0x00904e02,0x008f4e01,0x008f4d00,0x008f4d00,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,
0x00a16a29,0xa2aa783d,0xffbb864a,0xc0b0824c,0x5aaf7f48,0x09ac7b42,0x00a9773c,0x00a67134,0x00a26b2b,0x009e6522,0x009a5e19,0x00965911,0x0094550b,0x00925207,0x00915004,0x008f4e01,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,
@@ -266,14 +226,9 @@ static const UINT32 mouse_bitmap[32*32] =
ui_manager::ui_manager(running_machine &machine)
: m_machine(machine)
{
-}
-
-void ui_manager::init()
-{
- load_ui_options(machine());
// initialize the other UI bits
- ui_menu::init(machine());
- ui_gfx_init(machine());
+ ui_menu::init(machine);
+ ui_gfx_init(machine);
// reset instance variables
m_font = nullptr;
@@ -281,32 +236,26 @@ void ui_manager::init()
m_handler_param = 0;
m_single_step = false;
m_showfps = false;
- m_showfps_end = 0;
+ m_showfps_end = false;
m_show_profiler = false;
m_popup_text_end = 0;
m_use_natural_keyboard = false;
m_mouse_arrow_texture = nullptr;
- m_show_timecode_counter = false;
- m_show_timecode_total = false;
- m_load_save_hold = false;
-
- get_font_rows(&machine());
- decode_ui_color(0, &machine());
// more initialization
set_handler(handler_messagebox, 0);
m_non_char_keys_down = std::make_unique<UINT8[]>((ARRAY_LENGTH(non_char_keys) + 7) / 8);
- m_mouse_show = machine().system().flags & MACHINE_CLICKABLE_ARTWORK ? true : false;
+ m_mouse_show = machine.system().flags & MACHINE_CLICKABLE_ARTWORK ? true : false;
// request a callback upon exiting
- machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(ui_manager::exit), this));
+ machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(ui_manager::exit), this));
// retrieve options
- m_use_natural_keyboard = machine().options().natural_keyboard();
- bitmap_argb32 *ui_mouse_bitmap = auto_alloc(machine(), bitmap_argb32(32, 32));
+ m_use_natural_keyboard = machine.options().natural_keyboard();
+ bitmap_argb32 *ui_mouse_bitmap = auto_alloc(machine, bitmap_argb32(32, 32));
UINT32 *dst = &ui_mouse_bitmap->pix32(0);
memcpy(dst,mouse_bitmap,32*32*sizeof(UINT32));
- m_mouse_arrow_texture = machine().render().texture_alloc();
+ m_mouse_arrow_texture = machine.render().texture_alloc();
m_mouse_arrow_texture->set_bitmap(*ui_mouse_bitmap, ui_mouse_bitmap->cliprect(), TEXFORMAT_ARGB32);
}
@@ -363,7 +312,7 @@ void ui_manager::display_startup_screens(bool first_time, bool show_disclaimer)
{
const int maxstate = 4;
int str = machine().options().seconds_to_run();
- bool show_gameinfo = !machine().ui().options().skip_gameinfo();
+ bool show_gameinfo = !machine().options().skip_gameinfo();
bool show_warnings = true, show_mandatory_fileman = true;
int state;
@@ -498,8 +447,7 @@ void ui_manager::update_and_render(render_container *container)
else
m_popup_text_end = 0;
- // display the internal mouse cursor
- if (m_mouse_show || (is_menu_active() && machine().ui().options().ui_mouse()))
+ if (m_mouse_show || (is_menu_active() && machine().options().ui_mouse()))
{
INT32 mouse_target_x, mouse_target_y;
bool mouse_button;
@@ -508,10 +456,8 @@ void ui_manager::update_and_render(render_container *container)
if (mouse_target != nullptr)
{
float mouse_y=-1,mouse_x=-1;
- if (mouse_target->map_point_container(mouse_target_x, mouse_target_y, *container, mouse_x, mouse_y))
- {
- const float cursor_size = 0.6 * machine().ui().get_line_height();
- container->add_quad(mouse_x, mouse_y, mouse_x + cursor_size*container->manager().ui_aspect(container), mouse_y + cursor_size, UI_TEXT_COLOR, m_mouse_arrow_texture, PRIMFLAG_ANTIALIAS(1) | PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
+ if (mouse_target->map_point_container(mouse_target_x, mouse_target_y, *container, mouse_x, mouse_y)) {
+ container->add_quad(mouse_x,mouse_y,mouse_x + 0.05f*container->manager().ui_aspect(container),mouse_y + 0.05f,UI_TEXT_COLOR,m_mouse_arrow_texture,PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
}
}
}
@@ -530,7 +476,7 @@ render_font *ui_manager::get_font()
{
// allocate the font and messagebox string
if (m_font == nullptr)
- m_font = machine().render().font_alloc(machine().ui().options().ui_font());
+ m_font = machine().render().font_alloc(machine().options().ui_font());
return m_font;
}
@@ -646,9 +592,9 @@ void ui_manager::draw_text(render_container *container, const char *buf, float x
// and full size computation
//-------------------------------------------------
-void ui_manager::draw_text_full(render_container *container, const char *origs, float x, float y, float origwrapwidth, int justify, int wrap, int draw, rgb_t fgcolor, rgb_t bgcolor, float *totalwidth, float *totalheight, float text_size)
+void ui_manager::draw_text_full(render_container *container, const char *origs, float x, float y, float origwrapwidth, int justify, int wrap, int draw, rgb_t fgcolor, rgb_t bgcolor, float *totalwidth, float *totalheight)
{
- float lineheight = get_line_height() * text_size;
+ float lineheight = get_line_height();
const char *ends = origs + strlen(origs);
float wrapwidth = origwrapwidth;
const char *s = origs;
@@ -1037,16 +983,6 @@ bool ui_manager::is_menu_active(void)
}
-bool ui_manager::show_timecode_counter()
-{
- return m_show_timecode_counter;
-}
-bool ui_manager::show_timecode_total()
-{
- return m_show_timecode_total;
-}
-
-
/***************************************************************************
TEXT GENERATORS
@@ -1096,7 +1032,11 @@ std::string &ui_manager::warnings_string(std::string &str)
// add a warning if any ROMs were loaded with warnings
if (machine().rom_load().warnings() > 0)
{
- str.append("One or more ROMs/CHDs for this machine are incorrect. The machine may not run correctly.\n");
+ str.append("One or more ROMs/CHDs for this ");
+ str.append(emulator_info::get_gamenoun());
+ str.append(" are incorrect. The ");
+ str.append(emulator_info::get_gamenoun());
+ str.append(" may not run correctly.\n");
if (machine().system().flags & WARNING_FLAGS)
str.append("\n");
}
@@ -1109,11 +1049,15 @@ std::string &ui_manager::warnings_string(std::string &str)
// if we have at least one warning flag, print the general header
if ((machine().system().flags & WARNING_FLAGS) || machine().rom_load().knownbad() > 0)
{
- str.append("There are known problems with this machine\n\n");
+ str.append("There are known problems with this ");
+ str.append(emulator_info::get_gamenoun());
+ str.append("\n\n");
// add a warning if any ROMs are flagged BAD_DUMP/NO_DUMP
if (machine().rom_load().knownbad() > 0) {
- str.append("One or more ROMs/CHDs for this machine have not been correctly dumped.\n");
+ str.append("One or more ROMs/CHDs for this ");
+ str.append(emulator_info::get_gamenoun());
+ str.append(" have not been correctly dumped.\n");
}
// add one line per warning flag
if (machine().system().flags & MACHINE_IMPERFECT_KEYBOARD)
@@ -1127,24 +1071,32 @@ std::string &ui_manager::warnings_string(std::string &str)
if (machine().system().flags & MACHINE_IMPERFECT_SOUND)
str.append("The sound emulation isn't 100% accurate.\n");
if (machine().system().flags & MACHINE_NO_SOUND) {
- str.append("The machine lacks sound.\n");
+ str.append("The ");
+ str.append(emulator_info::get_gamenoun());
+ str.append(" lacks sound.\n");
}
if (machine().system().flags & MACHINE_NO_COCKTAIL)
str.append("Screen flipping in cocktail mode is not supported.\n");
// check if external artwork is present before displaying this warning?
if (machine().system().flags & MACHINE_REQUIRES_ARTWORK) {
- str.append("The machine requires external artwork files\n");
+ str.append("The ");
+ str.append(emulator_info::get_gamenoun());
+ str.append(" requires external artwork files\n");
}
if (machine().system().flags & MACHINE_IS_INCOMPLETE )
{
- str.append("This machine was never completed. It may exhibit strange behavior or missing elements that are not bugs in the emulation.\n");
+ str.append("This ");
+ str.append(emulator_info::get_gamenoun());
+ str.append(" was never completed. It may exhibit strange behavior or missing elements that are not bugs in the emulation.\n");
}
if (machine().system().flags & MACHINE_NO_SOUND_HW )
{
- str.append("This machine has no sound hardware, MAME will produce no sounds, this is expected behaviour.\n");
+ str.append("This ");
+ str.append(emulator_info::get_gamenoun());
+ str.append(" has no sound hardware, MAME will produce no sounds, this is expected behaviour.\n");
}
// if there's a NOT WORKING, UNEMULATED PROTECTION or GAME MECHANICAL warning, make it stronger
@@ -1152,15 +1104,25 @@ std::string &ui_manager::warnings_string(std::string &str)
{
// add the strings for these warnings
if (machine().system().flags & MACHINE_UNEMULATED_PROTECTION) {
- str.append("The machine has protection which isn't fully emulated.\n");
+ str.append("The ");
+ str.append(emulator_info::get_gamenoun());
+ str.append(" has protection which isn't fully emulated.\n");
}
if (machine().system().flags & MACHINE_NOT_WORKING) {
- str.append("\nTHIS MACHINE DOESN'T WORK. The emulation for this machine is not yet complete. "
+ str.append("\nTHIS ");
+ str.append(emulator_info::get_capgamenoun());
+ str.append(" DOESN'T WORK. The emulation for this ");
+ str.append(emulator_info::get_gamenoun());
+ str.append(" is not yet complete. "
"There is nothing you can do to fix this problem except wait for the developers to improve the emulation.\n");
}
if (machine().system().flags & MACHINE_MECHANICAL) {
- str.append("\nCertain elements of this machine cannot be emulated as it requires actual physical interaction or consists of mechanical devices. "
- "It is not possible to fully play this machine.\n");
+ str.append("\nCertain elements of this ");
+ str.append(emulator_info::get_gamenoun());
+ str.append(" cannot be emulated as it requires actual physical interaction or consists of mechanical devices. "
+ "It is not possible to fully play this ");
+ str.append(emulator_info::get_gamenoun());
+ str.append(".\n");
}
// find the parent of this driver
@@ -1178,7 +1140,9 @@ std::string &ui_manager::warnings_string(std::string &str)
{
// this one works, add a header and display the name of the clone
if (!foundworking) {
- str.append("\n\nThere are working clones of this machine: ");
+ str.append("\n\nThere are working clones of this ");
+ str.append(emulator_info::get_gamenoun());
+ str.append(": ");
}
else
str.append(", ");
@@ -1539,24 +1503,11 @@ UINT32 ui_manager::handler_ingame(running_machine &machine, render_container *co
// first draw the FPS counter
if (machine.ui().show_fps_counter())
{
+ std::string tempstring;
machine.ui().draw_text_full(container, machine.video().speed_text().c_str(), 0.0f, 0.0f, 1.0f,
JUSTIFY_RIGHT, WRAP_WORD, DRAW_OPAQUE, ARGB_WHITE, ARGB_BLACK, nullptr, nullptr);
}
- // Show the duration of current part (intro or gameplay or extra)
- if (machine.ui().show_timecode_counter()) {
- std::string tempstring;
- machine.ui().draw_text_full(container, machine.video().timecode_text(tempstring).c_str(), 0.0f, 0.0f, 1.0f,
- JUSTIFY_RIGHT, WRAP_WORD, DRAW_OPAQUE, rgb_t(0xf0,0xf0,0x10,0x10), ARGB_BLACK, NULL, NULL);
- }
- // Show the total time elapsed for the video preview (all parts intro, gameplay, extras)
- if (machine.ui().show_timecode_total()) {
- std::string tempstring;
- machine.ui().draw_text_full(container, machine.video().timecode_total_text(tempstring).c_str(), 0.0f, 0.0f, 1.0f,
- JUSTIFY_LEFT, WRAP_WORD, DRAW_OPAQUE, rgb_t(0xf0,0x10,0xf0,0x10), ARGB_BLACK, NULL, NULL);
- }
-
-
// draw the profiler if visible
if (machine.ui().show_profiler())
{
@@ -1620,10 +1571,6 @@ UINT32 ui_manager::handler_ingame(running_machine &machine, render_container *co
machine.ui().image_handler_ingame();
- // handle a save input timecode request
- if (machine.ui_input().pressed(IPT_UI_TIMECODE))
- machine.video().save_input_timecode();
-
if (ui_disabled) return ui_disabled;
if (machine.ui_input().pressed(IPT_UI_CANCEL))
@@ -1678,7 +1625,6 @@ UINT32 ui_manager::handler_ingame(running_machine &machine, render_container *co
if (machine.ui_input().pressed(IPT_UI_SAVE_STATE))
{
machine.pause();
- machine.ui().m_load_save_hold = true;
return machine.ui().set_handler(handler_load_save, LOADSAVE_SAVE);
}
@@ -1686,7 +1632,6 @@ UINT32 ui_manager::handler_ingame(running_machine &machine, render_container *co
if (machine.ui_input().pressed(IPT_UI_LOAD_STATE))
{
machine.pause();
- machine.ui().m_load_save_hold = true;
return machine.ui().set_handler(handler_load_save, LOADSAVE_LOAD);
}
@@ -1698,21 +1643,15 @@ UINT32 ui_manager::handler_ingame(running_machine &machine, render_container *co
if (machine.ui_input().pressed(IPT_UI_PAUSE))
{
// with a shift key, it is single step
-// if (is_paused && (machine.input().code_pressed(KEYCODE_LSHIFT) || machine.input().code_pressed(KEYCODE_RSHIFT)))
-// {
-// machine.ui().set_single_step(true);
-// machine.resume();
-// }
-// else
+ if (is_paused && (machine.input().code_pressed(KEYCODE_LSHIFT) || machine.input().code_pressed(KEYCODE_RSHIFT)))
+ {
+ machine.ui().set_single_step(true);
+ machine.resume();
+ }
+ else
machine.toggle_pause();
}
- if (machine.ui_input().pressed(IPT_UI_PAUSE_SINGLE))
- {
- machine.ui().set_single_step(true);
- machine.resume();
- }
-
// handle a toggle cheats request
if (machine.ui_input().pressed(IPT_UI_TOGGLE_CHEAT))
machine.cheat().set_enable(!machine.cheat().enabled());
@@ -1741,21 +1680,6 @@ UINT32 ui_manager::handler_ingame(running_machine &machine, render_container *co
if (machine.ui_input().pressed(IPT_UI_THROTTLE))
machine.video().toggle_throttle();
- // toggle autofire
- if (machine.ui_input().pressed(IPT_UI_TOGGLE_AUTOFIRE))
- {
- if (!machine.options().cheat())
- {
- machine.popmessage("Autofire can't be enabled");
- }
- else
- {
- bool autofire_toggle = machine.ioport().get_autofire_toggle();
- machine.ioport().set_autofire_toggle(!autofire_toggle);
- machine.popmessage("Autofire %s", autofire_toggle ? "Enabled" : "Disabled");
- }
- }
-
// check for fast forward
if (machine.ioport().type_pressed(IPT_UI_FAST_FORWARD))
{
@@ -1789,23 +1713,6 @@ UINT32 ui_manager::handler_load_save(running_machine &machine, render_container
else
machine.ui().draw_message_window(container, "Select position to load from");
- // if load/save state sequence is still being pressed, do not read the filename yet
- if (machine.ui().m_load_save_hold) {
- bool seq_in_progress = false;
- const input_seq &load_save_seq = state == LOADSAVE_SAVE ?
- machine.ioport().type_seq(IPT_UI_SAVE_STATE) :
- machine.ioport().type_seq(IPT_UI_LOAD_STATE);
-
- for (int i = 0; i < load_save_seq.length(); i++)
- if (machine.input().code_pressed_once(load_save_seq[i]))
- seq_in_progress = true;
-
- if (seq_in_progress)
- return state;
- else
- machine.ui().m_load_save_hold = false;
- }
-
// check for cancel key
if (machine.ui_input().pressed(IPT_UI_CANCEL))
{
@@ -1833,41 +1740,21 @@ UINT32 ui_manager::handler_load_save(running_machine &machine, render_container
if (machine.input().code_pressed_once(input_code(DEVICE_CLASS_KEYBOARD, 0, ITEM_CLASS_SWITCH, ITEM_MODIFIER_NONE, id)))
file = id - ITEM_ID_0_PAD + '0';
if (file == 0)
- {
- bool found = false;
-
- for (int joy_index = 0; joy_index <= MAX_SAVED_STATE_JOYSTICK; joy_index++)
- for (input_item_id id = ITEM_ID_BUTTON1; id <= ITEM_ID_BUTTON32; ++id)
- if (machine.input().code_pressed_once(input_code(DEVICE_CLASS_JOYSTICK, joy_index, ITEM_CLASS_SWITCH, ITEM_MODIFIER_NONE, id)))
- {
- snprintf(filename, sizeof(filename), "joy%i-%i", joy_index, id - ITEM_ID_BUTTON1 + 1);
- found = true;
- break;
- }
-
- if (!found)
- return state;
- }
- else
- {
- sprintf(filename, "%c", file);
- }
+ return state;
// display a popup indicating that the save will proceed
+ sprintf(filename, "%c", file);
if (state == LOADSAVE_SAVE)
{
- machine.popmessage("Save to position %s", filename);
+ machine.popmessage("Save to position %c", file);
machine.schedule_save(filename);
}
else
{
- machine.popmessage("Load from position %s", filename);
+ machine.popmessage("Load from position %c", file);
machine.schedule_load(filename);
}
- // avoid handling the name of the save state slot as a seperate input
- machine.ui_input().mark_all_as_pressed();
-
// remove the pause and reset the state
machine.resume();
return UI_HANDLER_CANCEL;
@@ -1880,7 +1767,7 @@ UINT32 ui_manager::handler_load_save(running_machine &machine, render_container
void ui_manager::request_quit()
{
- if (!machine().ui().options().confirm_quit())
+ if (!machine().options().confirm_quit())
machine().schedule_exit();
else
set_handler(handler_confirm_quit, 0);
@@ -2603,194 +2490,3 @@ void ui_manager::set_use_natural_keyboard(bool use_natural_keyboard)
machine().options().set_value(OPTION_NATURAL_KEYBOARD, use_natural_keyboard, OPTION_PRIORITY_CMDLINE, error);
assert(error.empty());
}
-
-//-------------------------------------------------
-// wrap_text
-//-------------------------------------------------
-
-int ui_manager::wrap_text(render_container *container, const char *origs, float x, float y, float origwrapwidth, std::vector<int> &xstart, std::vector<int> &xend, float text_size)
-{
- float lineheight = get_line_height() * text_size;
- const char *ends = origs + strlen(origs);
- float wrapwidth = origwrapwidth;
- const char *s = origs;
- const char *linestart;
- float maxwidth = 0;
- float aspect = machine().render().ui_aspect(container);
- int count = 0;
-
- // loop over lines
- while (*s != 0)
- {
- const char *lastbreak = nullptr;
- unicode_char schar;
- int scharcount;
- float lastbreak_width = 0;
- float curwidth = 0;
-
- // get the current character
- scharcount = uchar_from_utf8(&schar, s, ends - s);
- if (scharcount == -1)
- break;
-
- // remember the starting position of the line
- linestart = s;
-
- // loop while we have characters and are less than the wrapwidth
- while (*s != 0 && curwidth <= wrapwidth)
- {
- float chwidth;
-
- // get the current chcaracter
- scharcount = uchar_from_utf8(&schar, s, ends - s);
- if (scharcount == -1)
- break;
-
- // if we hit a newline, stop immediately
- if (schar == '\n')
- break;
-
- // get the width of this character
- chwidth = get_font()->char_width(lineheight, aspect, schar);
-
- // if we hit a space, remember the location and width *without* the space
- if (schar == ' ')
- {
- lastbreak = s;
- lastbreak_width = curwidth;
- }
-
- // add the width of this character and advance
- curwidth += chwidth;
- s += scharcount;
-
- // if we hit any non-space breakable character, remember the location and width
- // *with* the breakable character
- if (schar != ' ' && is_breakable_char(schar) && curwidth <= wrapwidth)
- {
- lastbreak = s;
- lastbreak_width = curwidth;
- }
- }
-
- // if we accumulated too much for the current width, we need to back off
- if (curwidth > wrapwidth)
- {
- // if we hit a break, back up to there with the appropriate width
- if (lastbreak != nullptr)
- {
- s = lastbreak;
- curwidth = lastbreak_width;
- }
-
- // if we didn't hit a break, back up one character
- else if (s > linestart)
- {
- // get the previous character
- s = (const char *)utf8_previous_char(s);
- scharcount = uchar_from_utf8(&schar, s, ends - s);
- if (scharcount == -1)
- break;
-
- curwidth -= get_font()->char_width(lineheight, aspect, schar);
- }
- }
-
- // track the maximum width of any given line
- if (curwidth > maxwidth)
- maxwidth = curwidth;
-
- xstart.push_back(linestart - origs);
- xend.push_back(s - origs);
-
- // loop from the line start and add the characters
- while (linestart < s)
- {
- // get the current character
- unicode_char linechar;
- int linecharcount = uchar_from_utf8(&linechar, linestart, ends - linestart);
- if (linecharcount == -1)
- break;
- linestart += linecharcount;
- }
-
- // advance by a row
- count++;
-
- // skip past any spaces at the beginning of the next line
- scharcount = uchar_from_utf8(&schar, s, ends - s);
- if (scharcount == -1)
- break;
-
- if (schar == '\n')
- s += scharcount;
- else
- while (*s && isspace(schar))
- {
- s += scharcount;
- scharcount = uchar_from_utf8(&schar, s, ends - s);
- if (scharcount == -1)
- break;
- }
- }
- return count;
-}
-
-//-------------------------------------------------
-// draw_textured_box - add primitives to
-// draw an outlined box with the given
-// textured background and line color
-//-------------------------------------------------
-
-void ui_manager::draw_textured_box(render_container *container, float x0, float y0, float x1, float y1, rgb_t backcolor, rgb_t linecolor, render_texture *texture, UINT32 flags)
-{
- container->add_quad(x0, y0, x1, y1, backcolor, texture, flags);
- container->add_line(x0, y0, x1, y0, UI_LINE_WIDTH, linecolor, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
- container->add_line(x1, y0, x1, y1, UI_LINE_WIDTH, linecolor, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
- container->add_line(x1, y1, x0, y1, UI_LINE_WIDTH, linecolor, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
- container->add_line(x0, y1, x0, y0, UI_LINE_WIDTH, linecolor, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
-}
-
-//-------------------------------------------------
-// get_string_width_ex - return the width of a
-// character string with given text size
-//-------------------------------------------------
-
-float ui_manager::get_string_width_ex(const char *s, float text_size)
-{
- return get_font()->utf8string_width(get_line_height() * text_size, machine().render().ui_aspect(), s);
-}
-
-//-------------------------------------------------
-// decode UI color options
-//-------------------------------------------------
-
-rgb_t decode_ui_color(int id, running_machine *machine)
-{
- static rgb_t color[ARRAY_LENGTH(s_color_list)];
-
- if (machine != nullptr) {
- ui_options option;
- for (int x = 0; x < ARRAY_LENGTH(s_color_list); x++) {
- const char *o_default = option.value(s_color_list[x]);
- const char *s_option = machine->ui().options().value(s_color_list[x]);
- int len = strlen(s_option);
- if (len != 8)
- color[x] = rgb_t((UINT32)strtoul(o_default, nullptr, 16));
- else
- color[x] = rgb_t((UINT32)strtoul(s_option, nullptr, 16));
- }
- }
- return color[id];
-}
-
-//-------------------------------------------------
-// get font rows from options
-//-------------------------------------------------
-
-int get_font_rows(running_machine *machine)
-{
- static int value;
-
- return ((machine != nullptr) ? value = machine->ui().options().font_rows() : value);
-}
diff --git a/src/emu/ui/ui.h b/src/emu/ui/ui.h
index 31f52b46134..ac68a2fb773 100644
--- a/src/emu/ui/ui.h
+++ b/src/emu/ui/ui.h
@@ -14,15 +14,14 @@
#define __USRINTRF_H__
#include "render.h"
-#include "moptions.h"
+
/***************************************************************************
CONSTANTS
***************************************************************************/
/* preferred font height; use ui_get_line_height() to get actual height */
-#define UI_TARGET_FONT_ROWS get_font_rows()
-
+#define UI_TARGET_FONT_ROWS (25)
#define UI_TARGET_FONT_HEIGHT (1.0f / (float)UI_TARGET_FONT_ROWS)
#define UI_MAX_FONT_HEIGHT (1.0f / 15.0f)
@@ -36,25 +35,25 @@
/* handy colors */
#define ARGB_WHITE rgb_t(0xff,0xff,0xff,0xff)
#define ARGB_BLACK rgb_t(0xff,0x00,0x00,0x00)
+#define UI_BORDER_COLOR rgb_t(0xff,0xff,0xff,0xff)
+#define UI_BACKGROUND_COLOR rgb_t(0xef,0x10,0x10,0x30)
+#define UI_GFXVIEWER_BG_COLOR rgb_t(0xef,0x10,0x10,0x30)
#define UI_GREEN_COLOR rgb_t(0xef,0x10,0x60,0x10)
#define UI_YELLOW_COLOR rgb_t(0xef,0x60,0x60,0x10)
#define UI_RED_COLOR rgb_t(0xf0,0x60,0x10,0x10)
-#define UI_BORDER_COLOR decode_ui_color(0)
-#define UI_BACKGROUND_COLOR decode_ui_color(1)
-#define UI_GFXVIEWER_BG_COLOR decode_ui_color(2)
-#define UI_UNAVAILABLE_COLOR decode_ui_color(3)
-#define UI_TEXT_COLOR decode_ui_color(4)
-#define UI_TEXT_BG_COLOR decode_ui_color(5)
-#define UI_SUBITEM_COLOR decode_ui_color(6)
-#define UI_CLONE_COLOR decode_ui_color(7)
-#define UI_SELECTED_COLOR decode_ui_color(8)
-#define UI_SELECTED_BG_COLOR decode_ui_color(9)
-#define UI_MOUSEOVER_COLOR decode_ui_color(10)
-#define UI_MOUSEOVER_BG_COLOR decode_ui_color(11)
-#define UI_MOUSEDOWN_COLOR decode_ui_color(12)
-#define UI_MOUSEDOWN_BG_COLOR decode_ui_color(13)
-#define UI_DIPSW_COLOR decode_ui_color(14)
-#define UI_SLIDER_COLOR decode_ui_color(15)
+#define UI_UNAVAILABLE_COLOR rgb_t(0xff,0x40,0x40,0x40)
+#define UI_TEXT_COLOR rgb_t(0xff,0xff,0xff,0xff)
+#define UI_TEXT_BG_COLOR rgb_t(0xef,0x00,0x00,0x00)
+#define UI_SUBITEM_COLOR rgb_t(0xff,0xff,0xff,0xff)
+#define UI_CLONE_COLOR rgb_t(0xff,0x80,0x80,0x80)
+#define UI_SELECTED_COLOR rgb_t(0xff,0xff,0xff,0x00)
+#define UI_SELECTED_BG_COLOR rgb_t(0xef,0x80,0x80,0x00)
+#define UI_MOUSEOVER_COLOR rgb_t(0xff,0xff,0xff,0x80)
+#define UI_MOUSEOVER_BG_COLOR rgb_t(0x70,0x40,0x40,0x00)
+#define UI_MOUSEDOWN_COLOR rgb_t(0xff,0xff,0xff,0x80)
+#define UI_MOUSEDOWN_BG_COLOR rgb_t(0xb0,0x60,0x60,0x00)
+#define UI_DIPSW_COLOR rgb_t(0xff,0xff,0xff,0x00)
+#define UI_SLIDER_COLOR rgb_t(0xff,0xff,0xff,0xff)
/* cancel return value for a UI handler */
#define UI_HANDLER_CANCEL ((UINT32)~0)
@@ -85,10 +84,7 @@ enum
#define SLIDER_NOCHANGE 0x12345678
-/***************************************************************************
- FOR FUTURE LOCALIZATION
-***************************************************************************/
-#define _(param) param
+
/***************************************************************************
TYPE DEFINITIONS
@@ -116,117 +112,96 @@ struct slider_state
class ui_manager
{
public:
- // construction/destruction
- ui_manager(running_machine &machine);
-
- void init();
-
- // getters
- running_machine &machine() const { return m_machine; }
- bool single_step() const { return m_single_step; }
- ui_options &options() { return m_ui_options; }
-
- // setters
- void set_single_step(bool single_step) { m_single_step = single_step; }
-
- // methods
- void initialize(running_machine &machine);
- UINT32 set_handler(ui_callback callback, UINT32 param);
- void display_startup_screens(bool first_time, bool show_disclaimer);
- void set_startup_text(const char *text, bool force);
- void update_and_render(render_container *container);
- render_font *get_font();
- float get_line_height();
- float get_char_width(unicode_char ch);
- float get_string_width(const char *s);
- void draw_outlined_box(render_container *container, float x0, float y0, float x1, float y1, rgb_t backcolor);
- void draw_outlined_box(render_container *container, float x0, float y0, float x1, float y1, rgb_t fgcolor, rgb_t bgcolor);
- void draw_text(render_container *container, const char *buf, float x, float y);
- void draw_text_full(render_container *container, const char *origs, float x, float y, float origwrapwidth, int justify, int wrap, int draw, rgb_t fgcolor, rgb_t bgcolor, float *totalwidth = nullptr, float *totalheight = nullptr, float text_size = 1.0f);
+ // construction/destruction
+ ui_manager(running_machine &machine);
+
+ // getters
+ running_machine &machine() const { return m_machine; }
+ bool single_step() const { return m_single_step; }
+
+ // setters
+ void set_single_step(bool single_step) { m_single_step = single_step; }
+
+ // methods
+ void initialize(running_machine &machine);
+ UINT32 set_handler(ui_callback callback, UINT32 param);
+ void display_startup_screens(bool first_time, bool show_disclaimer);
+ void set_startup_text(const char *text, bool force);
+ void update_and_render(render_container *container);
+ render_font *get_font();
+ float get_line_height();
+ float get_char_width(unicode_char ch);
+ float get_string_width(const char *s);
+ void draw_outlined_box(render_container *container, float x0, float y0, float x1, float y1, rgb_t backcolor);
+ void draw_outlined_box(render_container *container, float x0, float y0, float x1, float y1, rgb_t fgcolor, rgb_t bgcolor);
+ void draw_text(render_container *container, const char *buf, float x, float y);
+ void draw_text_full(render_container *container, const char *origs, float x, float y, float origwrapwidth, int justify, int wrap, int draw, rgb_t fgcolor, rgb_t bgcolor, float *totalwidth = nullptr, float *totalheight = nullptr);
void draw_text_box(render_container *container, const char *text, int justify, float xpos, float ypos, rgb_t backcolor);
- void draw_message_window(render_container *container, const char *text);
-
- void CLIB_DECL popup_time(int seconds, const char *text, ...) ATTR_PRINTF(3,4);
- void show_fps_temp(double seconds);
- void set_show_fps(bool show);
- bool show_fps() const;
- bool show_fps_counter();
- void set_show_profiler(bool show);
- bool show_profiler() const;
- void show_menu();
- void show_mouse(bool status);
- bool is_menu_active();
- bool can_paste();
- void paste();
- bool use_natural_keyboard() const;
- void set_use_natural_keyboard(bool use_natural_keyboard);
- void image_handler_ingame();
- void increase_frameskip();
- void decrease_frameskip();
- void request_quit();
-
- // print the game info string into a buffer
- std::string &game_info_astring(std::string &str);
-
- // slider controls
- const slider_state *get_slider_list(void);
-
- // other
- void process_natural_keyboard();
-
- void set_show_timecode_counter(bool value) { m_show_timecode_counter = value; m_show_timecode_total = true; }
- bool show_timecode_counter();
- bool show_timecode_total();
-
- // word wrap
- int wrap_text(render_container *container, const char *origs, float x, float y, float origwrapwidth, std::vector<int> &xstart, std::vector<int> &xend, float text_size = 1.0f);
-
- // draw an outlined box with given line color and filled with a texture
- void draw_textured_box(render_container *container, float x0, float y0, float x1, float y1, rgb_t backcolor, rgb_t linecolor, render_texture *texture = nullptr, UINT32 flags = PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
-
- // return text string width with given text size
- float get_string_width_ex(const char *s, float text_size);
+ void draw_message_window(render_container *container, const char *text);
+
+ void CLIB_DECL popup_time(int seconds, const char *text, ...) ATTR_PRINTF(3,4);
+ void show_fps_temp(double seconds);
+ void set_show_fps(bool show);
+ bool show_fps() const;
+ bool show_fps_counter();
+ void set_show_profiler(bool show);
+ bool show_profiler() const;
+ void show_menu();
+ void show_mouse(bool status);
+ bool is_menu_active();
+ bool can_paste();
+ void paste();
+ bool use_natural_keyboard() const;
+ void set_use_natural_keyboard(bool use_natural_keyboard);
+ void image_handler_ingame();
+ void increase_frameskip();
+ void decrease_frameskip();
+ void request_quit();
+
+ // print the game info string into a buffer
+ std::string &game_info_astring(std::string &str);
+
+ // slider controls
+ const slider_state *get_slider_list(void);
+
+ // other
+ void process_natural_keyboard();
private:
- // instance variables
- running_machine & m_machine;
- render_font * m_font;
- ui_callback m_handler_callback;
- UINT32 m_handler_param;
- bool m_single_step;
- bool m_showfps;
- osd_ticks_t m_showfps_end;
- bool m_show_profiler;
- osd_ticks_t m_popup_text_end;
- bool m_use_natural_keyboard;
+ // instance variables
+ running_machine & m_machine;
+ render_font * m_font;
+ ui_callback m_handler_callback;
+ UINT32 m_handler_param;
+ bool m_single_step;
+ bool m_showfps;
+ osd_ticks_t m_showfps_end;
+ bool m_show_profiler;
+ osd_ticks_t m_popup_text_end;
+ bool m_use_natural_keyboard;
std::unique_ptr<UINT8[]> m_non_char_keys_down;
- render_texture * m_mouse_arrow_texture;
- bool m_mouse_show;
- bool m_show_timecode_counter;
- bool m_show_timecode_total;
- bool m_load_save_hold;
- ui_options m_ui_options;
-
- // text generators
- std::string &disclaimer_string(std::string &buffer);
- std::string &warnings_string(std::string &buffer);
-
- // UI handlers
- static UINT32 handler_messagebox(running_machine &machine, render_container *container, UINT32 state);
- static UINT32 handler_messagebox_ok(running_machine &machine, render_container *container, UINT32 state);
- static UINT32 handler_messagebox_anykey(running_machine &machine, render_container *container, UINT32 state);
- static UINT32 handler_ingame(running_machine &machine, render_container *container, UINT32 state);
- static UINT32 handler_load_save(running_machine &machine, render_container *container, UINT32 state);
- static UINT32 handler_confirm_quit(running_machine &machine, render_container *container, UINT32 state);
-
- // private methods
- void exit();
+ render_texture * m_mouse_arrow_texture;
+ bool m_mouse_show;
+
+ // text generators
+ std::string &disclaimer_string(std::string &buffer);
+ std::string &warnings_string(std::string &buffer);
+
+ // UI handlers
+ static UINT32 handler_messagebox(running_machine &machine, render_container *container, UINT32 state);
+ static UINT32 handler_messagebox_ok(running_machine &machine, render_container *container, UINT32 state);
+ static UINT32 handler_messagebox_anykey(running_machine &machine, render_container *container, UINT32 state);
+ static UINT32 handler_ingame(running_machine &machine, render_container *container, UINT32 state);
+ static UINT32 handler_load_save(running_machine &machine, render_container *container, UINT32 state);
+ static UINT32 handler_confirm_quit(running_machine &machine, render_container *container, UINT32 state);
+
+ // private methods
+ void exit();
};
/***************************************************************************
FUNCTION PROTOTYPES
***************************************************************************/
-rgb_t decode_ui_color(int id, running_machine *machine = nullptr);
-int get_font_rows(running_machine *machine = NULL);
+
#endif /* __USRINTRF_H__ */
diff --git a/src/emu/ui/uicmd14.png b/src/emu/ui/uicmd14.png
deleted file mode 100644
index d3cae952cac..00000000000
--- a/src/emu/ui/uicmd14.png
+++ /dev/null
Binary files differ
diff --git a/src/emu/ui/utils.cpp b/src/emu/ui/utils.cpp
deleted file mode 100644
index 7ac94d5e050..00000000000
--- a/src/emu/ui/utils.cpp
+++ /dev/null
@@ -1,173 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Dankan1890
-/***************************************************************************
-
- ui/utils.cpp
-
- Internal UI user interface.
-
-***************************************************************************/
-
-#include "emu.h"
-#include "ui/utils.h"
-#include <algorithm>
-
-extern const char UI_VERSION_TAG[];
-const char UI_VERSION_TAG[] = "# UI INFO ";
-
-// Years index
-UINT16 c_year::actual = 0;
-std::vector<std::string> c_year::ui;
-
-// Manufacturers index
-UINT16 c_mnfct::actual = 0;
-std::vector<std::string> c_mnfct::ui;
-
-// Main filters
-UINT16 main_filters::actual = 0;
-const char *main_filters::text[] = { "All", "Available", "Unavailable", "Working", "Not Working", "Mechanical", "Not Mechanical",
- "Category", "Favorites", "BIOS", "Originals", "Clones", "Manufacturers", "Years", "Support Save",
- "Not Support Save", "CHD", "No CHD", "Vertical", "Horizontal", "Custom" };
-size_t main_filters::length = ARRAY_LENGTH(main_filters::text);
-
-// Software filters
-UINT16 sw_filters::actual = 0;
-const char *sw_filters::text[] = { "All", "Available", "Unavailable", "Originals", "Clones", "Years", "Publishers", "Supported",
- "Partial Supported", "Unsupported", "Region", "Device Type", "Software List", "Custom" };
-size_t sw_filters::length = ARRAY_LENGTH(sw_filters::text);
-
-// Globals
-UINT8 ui_globals::rpanel = 0;
-UINT8 ui_globals::curimage_view = 0;
-UINT8 ui_globals::curdats_view = 0;
-UINT8 ui_globals::cur_sw_dats_view = 0;
-bool ui_globals::switch_image = false;
-bool ui_globals::default_image = true;
-bool ui_globals::reset = false;
-bool ui_globals::redraw_icon = false;
-int ui_globals::visible_main_lines = 0;
-int ui_globals::visible_sw_lines = 0;
-UINT16 ui_globals::panels_status = 0;
-bool ui_globals::has_icons = false;
-
-// Custom filter
-UINT16 custfltr::main = 0;
-UINT16 custfltr::numother = 0;
-UINT16 custfltr::other[MAX_CUST_FILTER];
-UINT16 custfltr::mnfct[MAX_CUST_FILTER];
-UINT16 custfltr::year[MAX_CUST_FILTER];
-UINT16 custfltr::screen[MAX_CUST_FILTER];
-
-// Custom filter
-UINT16 sw_custfltr::main = 0;
-UINT16 sw_custfltr::numother = 0;
-UINT16 sw_custfltr::other[MAX_CUST_FILTER];
-UINT16 sw_custfltr::mnfct[MAX_CUST_FILTER];
-UINT16 sw_custfltr::year[MAX_CUST_FILTER];
-UINT16 sw_custfltr::region[MAX_CUST_FILTER];
-UINT16 sw_custfltr::type[MAX_CUST_FILTER];
-UINT16 sw_custfltr::list[MAX_CUST_FILTER];
-
-char* chartrimcarriage(char str[])
-{
- char *pstr = strrchr(str, '\n');
- if (pstr)
- str[pstr - str] = '\0';
- pstr = strrchr(str, '\r');
- if (pstr)
- str[pstr - str] = '\0';
- return str;
-}
-
-const char* strensure(const char* s)
-{
- return s == nullptr ? "" : s;
-}
-
-//-------------------------------------------------
-// search a substring with even partial matching
-//-------------------------------------------------
-
-int fuzzy_substring(std::string s_needle, std::string s_haystack)
-{
- if (s_needle.empty())
- return s_haystack.size();
- if (s_haystack.empty())
- return s_needle.size();
-
- strmakelower(s_needle);
- strmakelower(s_haystack);
-
- if (s_needle == s_haystack)
- return 0;
- if (s_haystack.find(s_needle) != std::string::npos)
- return 0;
-
- auto *row1 = global_alloc_array_clear<int>(s_haystack.size() + 2);
- auto *row2 = global_alloc_array_clear<int>(s_haystack.size() + 2);
-
- for (int i = 0; i < s_needle.size(); ++i)
- {
- row2[0] = i + 1;
- for (int j = 0; j < s_haystack.size(); ++j)
- {
- int cost = (s_needle[i] == s_haystack[j]) ? 0 : 1;
- row2[j + 1] = MIN(row1[j + 1] + 1, MIN(row2[j] + 1, row1[j] + cost));
- }
-
- int *tmp = row1;
- row1 = row2;
- row2 = tmp;
- }
-
- int *first, *smallest;
- first = smallest = row1;
- int *last = row1 + s_haystack.size();
-
- while (++first != last)
- if (*first < *smallest)
- smallest = first;
-
- int rv = *smallest;
- global_free_array(row1);
- global_free_array(row2);
-
- return rv;
-}
-
-//-------------------------------------------------
-// set manufacturers
-//-------------------------------------------------
-
-void c_mnfct::set(const char *str)
-{
- std::string name = getname(str);
- if (std::find(ui.begin(), ui.end(), name) != ui.end())
- return;
-
- ui.push_back(name);
-}
-
-std::string c_mnfct::getname(const char *str)
-{
- std::string name(str);
- size_t found = name.find("(");
-
- if (found != std::string::npos)
- return (name.substr(0, found - 1));
- else
- return name;
-}
-
-//-------------------------------------------------
-// set years
-//-------------------------------------------------
-
-void c_year::set(const char *str)
-{
- std::string name(str);
- if (std::find(ui.begin(), ui.end(), name) != ui.end())
- return;
-
- ui.push_back(name);
-}
diff --git a/src/emu/ui/utils.h b/src/emu/ui/utils.h
deleted file mode 100644
index 3c8da8ab16e..00000000000
--- a/src/emu/ui/utils.h
+++ /dev/null
@@ -1,345 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Dankan1890
-/***************************************************************************
-
- ui/utils.h
-
- Internal UI user interface.
-
-***************************************************************************/
-
-#pragma once
-
-#ifndef __UI_UTILS_H__
-#define __UI_UTILS_H__
-
-#include "osdepend.h"
-#include "render.h"
-#include "libjpeg/jpeglib.h"
-
-#define MAX_CHAR_INFO 256
-#define MAX_CUST_FILTER 8
-
-// GLOBAL ENUMERATORS
-enum
-{
- FILTER_FIRST = 0,
- FILTER_ALL = FILTER_FIRST,
- FILTER_AVAILABLE,
- FILTER_UNAVAILABLE,
- FILTER_WORKING,
- FILTER_NOT_WORKING,
- FILTER_MECHANICAL,
- FILTER_NOT_MECHANICAL,
- FILTER_CATEGORY,
- FILTER_FAVORITE,
- FILTER_BIOS,
- FILTER_PARENT,
- FILTER_CLONES,
- FILTER_MANUFACTURER,
- FILTER_YEAR,
- FILTER_SAVE,
- FILTER_NOSAVE,
- FILTER_CHD,
- FILTER_NOCHD,
- FILTER_VERTICAL,
- FILTER_HORIZONTAL,
- FILTER_CUSTOM,
- FILTER_LAST = FILTER_CUSTOM
-};
-
-enum
-{
- FIRST_VIEW = 0,
- SNAPSHOT_VIEW = FIRST_VIEW,
- CABINETS_VIEW,
- CPANELS_VIEW,
- PCBS_VIEW,
- FLYERS_VIEW,
- TITLES_VIEW,
- ENDS_VIEW,
- ARTPREV_VIEW,
- BOSSES_VIEW,
- LOGOS_VIEW,
- VERSUS_VIEW,
- GAMEOVER_VIEW,
- HOWTO_VIEW,
- SCORES_VIEW,
- SELECT_VIEW,
- MARQUEES_VIEW,
- LAST_VIEW = MARQUEES_VIEW
-};
-
-enum
-{
- RP_FIRST = 0,
- RP_IMAGES = RP_FIRST,
- RP_INFOS,
- RP_LAST = RP_INFOS
-};
-
-enum
-{
- SHOW_PANELS = 0,
- HIDE_LEFT_PANEL,
- HIDE_RIGHT_PANEL,
- HIDE_BOTH
-};
-
-enum
-{
- UI_FIRST_LOAD = 0,
- UI_GENERAL_LOAD = UI_FIRST_LOAD,
- UI_HISTORY_LOAD,
- UI_MAMEINFO_LOAD,
- UI_SYSINFO_LOAD,
- UI_MESSINFO_LOAD,
- UI_COMMAND_LOAD,
- UI_STORY_LOAD,
- UI_LAST_LOAD = UI_STORY_LOAD
-};
-
-enum
-{
- UI_SW_FIRST = 0,
- UI_SW_ALL = UI_SW_FIRST,
- UI_SW_AVAILABLE,
- UI_SW_UNAVAILABLE,
- UI_SW_PARENTS,
- UI_SW_CLONES,
- UI_SW_YEARS,
- UI_SW_PUBLISHERS,
- UI_SW_SUPPORTED,
- UI_SW_PARTIAL_SUPPORTED,
- UI_SW_UNSUPPORTED,
- UI_SW_REGION,
- UI_SW_TYPE,
- UI_SW_LIST,
- UI_SW_CUSTOM,
- UI_SW_LAST = UI_SW_CUSTOM
-};
-
-enum
-{
- HOVER_DAT_UP = -1000,
- HOVER_DAT_DOWN,
- HOVER_UI_LEFT,
- HOVER_UI_RIGHT,
- HOVER_ARROW_UP,
- HOVER_ARROW_DOWN,
- HOVER_B_FAV,
- HOVER_B_EXPORT,
- HOVER_B_DATS,
- HOVER_B_FOLDERS,
- HOVER_B_SETTINGS,
- HOVER_RPANEL_ARROW,
- HOVER_LPANEL_ARROW,
- HOVER_FILTER_FIRST,
- HOVER_FILTER_LAST = (HOVER_FILTER_FIRST) + 1 + FILTER_LAST,
- HOVER_SW_FILTER_FIRST,
- HOVER_SW_FILTER_LAST = (HOVER_SW_FILTER_FIRST) + 1 + UI_SW_LAST,
- HOVER_RP_FIRST,
- HOVER_RP_LAST = (HOVER_RP_FIRST) + 1 + RP_LAST
-};
-
-// GLOBAL STRUCTURES
-struct ui_software_info
-{
- ui_software_info() {}
- ui_software_info(std::string sname, std::string lname, std::string pname, std::string y, std::string pub,
- UINT8 s, std::string pa, const game_driver *d, std::string li, std::string i, std::string is, UINT8 em,
- std::string plong, std::string u, std::string de, bool av)
- {
- shortname = sname; longname = lname; parentname = pname; year = y; publisher = pub;
- supported = s; part = pa; driver = d; listname = li; interface = i; instance = is; startempty = em;
- parentlongname = plong; usage = u; devicetype = de; available = av;
- }
- std::string shortname;
- std::string longname;
- std::string parentname;
- std::string year;
- std::string publisher;
- UINT8 supported = 0;
- std::string part;
- const game_driver *driver;
- std::string listname;
- std::string interface;
- std::string instance;
- UINT8 startempty = 0;
- std::string parentlongname;
- std::string usage;
- std::string devicetype;
- bool available = false;
-
- bool operator==(const ui_software_info& r)
- {
- if (shortname == r.shortname && longname == r.longname && parentname == r.parentname
- && year == r.year && publisher == r.publisher && supported == r.supported
- && part == r.part && driver == r.driver && listname == r.listname
- && interface == r.interface && instance == r.instance && startempty == r.startempty
- && parentlongname == r.parentlongname && usage == r.usage && devicetype == r.devicetype)
- return true;
-
- return false;
- }
-};
-
-// Manufacturers
-struct c_mnfct
-{
- static void set(const char *str);
- static std::string getname(const char *str);
- static std::vector<std::string> ui;
- static UINT16 actual;
-};
-
-// Years
-struct c_year
-{
- static void set(const char *str);
- static std::vector<std::string> ui;
- static UINT16 actual;
-};
-
-// GLOBAL CLASS
-struct ui_globals
-{
- static UINT8 curimage_view, curdats_view, cur_sw_dats_view, rpanel;
- static bool switch_image, redraw_icon, default_image, reset;
- static int visible_main_lines, visible_sw_lines;
- static UINT16 panels_status;
- static bool has_icons;
-};
-
-#define main_struct(name) \
-struct name##_filters \
-{ \
- static UINT16 actual; \
- static const char *text[]; \
- static size_t length; \
-};
-
-main_struct(main);
-main_struct(sw);
-
-// Custom filter
-struct custfltr
-{
- static UINT16 main;
- static UINT16 numother;
- static UINT16 other[MAX_CUST_FILTER];
- static UINT16 mnfct[MAX_CUST_FILTER];
- static UINT16 screen[MAX_CUST_FILTER];
- static UINT16 year[MAX_CUST_FILTER];
-};
-
-// Software custom filter
-struct sw_custfltr
-{
- static UINT16 main;
- static UINT16 numother;
- static UINT16 other[MAX_CUST_FILTER];
- static UINT16 mnfct[MAX_CUST_FILTER];
- static UINT16 year[MAX_CUST_FILTER];
- static UINT16 region[MAX_CUST_FILTER];
- static UINT16 type[MAX_CUST_FILTER];
- static UINT16 list[MAX_CUST_FILTER];
-};
-
-// GLOBAL FUNCTIONS
-
-// advanced search function
-int fuzzy_substring(std::string needle, std::string haystack);
-
-// trim carriage return
-char* chartrimcarriage(char str[]);
-
-const char* strensure(const char* s);
-
-// jpeg loader
-template <typename _T>
-void render_load_jpeg(_T &bitmap, emu_file &file, const char *dirname, const char *filename)
-{
- // deallocate previous bitmap
- bitmap.reset();
-
- bitmap_format format = bitmap.format();
-
- // define file's full name
- std::string fname;
-
- if (dirname == nullptr)
- fname = filename;
- else
- fname.assign(dirname).append(PATH_SEPARATOR).append(filename);
-
- file_error filerr = file.open(fname.c_str());
-
- if (filerr != FILERR_NONE)
- return;
-
- // define standard JPEG structures
- jpeg_decompress_struct cinfo;
- jpeg_error_mgr jerr;
- cinfo.err = jpeg_std_error(&jerr);
- jpeg_create_decompress(&cinfo);
-
- // allocates a buffer for the image
- UINT64 jpg_size = file.size();
- unsigned char *jpg_buffer = global_alloc_array(unsigned char, jpg_size + 100);
-
- // read data from the file and set them in the buffer
- file.read(jpg_buffer, jpg_size);
- jpeg_mem_src(&cinfo, jpg_buffer, jpg_size);
-
- // read JPEG header and start decompression
- jpeg_read_header(&cinfo, TRUE);
- jpeg_start_decompress(&cinfo);
-
- // allocates the destination bitmap
- int w = cinfo.output_width;
- int h = cinfo.output_height;
- int s = cinfo.output_components;
- bitmap.allocate(w, h);
-
- // allocates a buffer to receive the information and copy them into the bitmap
- int row_stride = cinfo.output_width * cinfo.output_components;
- JSAMPARRAY buffer = (JSAMPARRAY)malloc(sizeof(JSAMPROW));
- buffer[0] = (JSAMPROW)malloc(sizeof(JSAMPLE) * row_stride);
-
- while ( cinfo.output_scanline < cinfo.output_height )
- {
- int j = cinfo.output_scanline;
- jpeg_read_scanlines(&cinfo, buffer, 1);
-
- if (s == 1)
- for (int i = 0; i < w; ++i)
- if (format == BITMAP_FORMAT_ARGB32)
- bitmap.pix32(j, i) = rgb_t(0xFF, buffer[0][i], buffer[0][i], buffer[0][i]);
- else
- bitmap.pix32(j, i) = rgb_t(buffer[0][i], buffer[0][i], buffer[0][i]);
-
- else if (s == 3)
- for (int i = 0; i < w; ++i)
- if (format == BITMAP_FORMAT_ARGB32)
- bitmap.pix32(j, i) = rgb_t(0xFF, buffer[0][i * s], buffer[0][i * s + 1], buffer[0][i * s + 2]);
- else
- bitmap.pix32(j, i) = rgb_t(buffer[0][i * s], buffer[0][i * s + 1], buffer[0][i * s + 2]);
-
- else
- {
- osd_printf_info("Error! Cannot read JPEG data from %s file.\n", fname.c_str());
- break;
- }
- }
-
- // finish decompression and frees the memory
- jpeg_finish_decompress(&cinfo);
- jpeg_destroy_decompress(&cinfo);
- file.close();
- free(buffer[0]);
- free(buffer);
- global_free_array(jpg_buffer);
-}
-
-#endif /* __UI_UTILS_H__ */
diff --git a/src/emu/ui/videoopt.cpp b/src/emu/ui/videoopt.cpp
index aa3bc21dd5f..e76c27305c8 100644
--- a/src/emu/ui/videoopt.cpp
+++ b/src/emu/ui/videoopt.cpp
@@ -24,7 +24,7 @@ void ui_menu_video_targets::handle()
/* process the menu */
const ui_menu_event *menu_event = process(0);
if (menu_event != nullptr && menu_event->iptkey == IPT_UI_SELECT)
- ui_menu::stack_push(global_alloc_clear<ui_menu_video_options>(machine(), container, static_cast<render_target *>(menu_event->itemref)));
+ ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_video_options>(machine(), container, static_cast<render_target *>(menu_event->itemref))));
}
diff --git a/src/emu/uiinput.cpp b/src/emu/uiinput.cpp
index c55038d3065..6b26bb323b5 100644
--- a/src/emu/uiinput.cpp
+++ b/src/emu/uiinput.cpp
@@ -324,30 +324,3 @@ void ui_input_manager::push_char_event(render_target* target, unicode_char ch)
event.ch = ch;
push_event(event);
}
-
-/*-------------------------------------------------
- push_mouse_wheel_event - pushes a mouse
- wheel event to the specified render_target
--------------------------------------------------*/
-
-void ui_input_manager::push_mouse_wheel_event(render_target *target, INT32 x, INT32 y, short delta, int ucNumLines)
-{
- ui_event event = { UI_EVENT_NONE };
- event.event_type = UI_EVENT_MOUSE_WHEEL;
- event.target = target;
- event.mouse_x = x;
- event.mouse_y = y;
- event.zdelta = delta;
- event.num_lines = ucNumLines;
- push_event(event);
-}
-
-/*-------------------------------------------------
- mark_all_as_pressed - marks all buttons
- as if they were already pressed once
--------------------------------------------------*/
-void ui_input_manager::mark_all_as_pressed()
-{
- for (int code = IPT_UI_FIRST + 1; code < IPT_UI_LAST; code++)
- m_next_repeat[code] = osd_ticks();
-} \ No newline at end of file
diff --git a/src/emu/uiinput.h b/src/emu/uiinput.h
index fecc61c0c1a..2e89a0c413a 100644
--- a/src/emu/uiinput.h
+++ b/src/emu/uiinput.h
@@ -33,7 +33,6 @@ enum ui_event_type
UI_EVENT_MOUSE_DOWN,
UI_EVENT_MOUSE_UP,
UI_EVENT_MOUSE_DOUBLE_CLICK,
- UI_EVENT_MOUSE_WHEEL,
UI_EVENT_CHAR
};
@@ -45,8 +44,6 @@ struct ui_event
INT32 mouse_y;
input_item_id key;
unicode_char ch;
- short zdelta;
- int num_lines;
};
// ======================> ui_input_manager
@@ -88,9 +85,6 @@ public:
void push_mouse_up_event(render_target* target, INT32 x, INT32 y);
void push_mouse_double_click_event(render_target* target, INT32 x, INT32 y);
void push_char_event(render_target* target, unicode_char ch);
- void push_mouse_wheel_event(render_target *target, INT32 x, INT32 y, short delta, int ucNumLines);
-
- void mark_all_as_pressed();
private:
diff --git a/src/emu/video.cpp b/src/emu/video.cpp
index 7dc9470d54a..41fb5e1726e 100644
--- a/src/emu/video.cpp
+++ b/src/emu/video.cpp
@@ -108,13 +108,7 @@ video_manager::video_manager(running_machine &machine)
m_avi_frame_period(attotime::zero),
m_avi_next_frame_time(attotime::zero),
m_avi_frame(0),
- m_dummy_recording(false),
- m_timecode_enabled(false),
- m_timecode_write(false),
- m_timecode_text(""),
- m_timecode_start(attotime::zero),
- m_timecode_total(attotime::zero)
-
+ m_dummy_recording(false)
{
// request a callback upon exiting
machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(video_manager::exit), this));
@@ -368,63 +362,6 @@ void video_manager::save_active_screen_snapshots()
//-------------------------------------------------
-// save_input_timecode - add a line of current
-// timestamp to inp.timecode file
-//-------------------------------------------------
-
-void video_manager::save_input_timecode()
-{
- // if record timecode input is not active, do nothing
- if (!m_timecode_enabled) {
- return;
- }
- m_timecode_write = true;
-}
-
-std::string &video_manager::timecode_text(std::string &str) {
- str.clear();
- str += " ";
-
- if (!m_timecode_text.empty()) {
- str += m_timecode_text + " ";
- }
-
- attotime elapsed_time = machine().time() - m_timecode_start;
- std::string elapsed_time_str;
- strcatprintf(elapsed_time_str, "%02d:%02d",
- (elapsed_time.m_seconds / 60) % 60,
- elapsed_time.m_seconds % 60);
- str += elapsed_time_str;
-
- bool paused = machine().paused();
- if (paused) {
- str.append(" [paused]");
- }
-
- str += " ";
-
- return str;
-}
-
-std::string &video_manager::timecode_total_text(std::string &str) {
- str.clear();
- str += " TOTAL ";
-
- attotime elapsed_time = m_timecode_total;
- if (machine().ui().show_timecode_counter()) {
- elapsed_time += machine().time() - m_timecode_start;
- }
- std::string elapsed_time_str;
- strcatprintf(elapsed_time_str, "%02d:%02d",
- (elapsed_time.m_seconds / 60) % 60,
- elapsed_time.m_seconds % 60);
- str += elapsed_time_str + " ";
- return str;
-}
-
-
-
-//-------------------------------------------------
// begin_recording - begin recording of a movie
//-------------------------------------------------
@@ -647,7 +584,7 @@ void video_manager::postload()
// forward
//-------------------------------------------------
-inline bool video_manager::effective_autoframeskip() const
+inline int video_manager::effective_autoframeskip() const
{
// if we're fast forwarding or paused, autoframeskip is disabled
if (m_fastforward || machine().paused())
@@ -684,7 +621,7 @@ inline int video_manager::effective_frameskip() const
inline bool video_manager::effective_throttle() const
{
// if we're paused, or if the UI is active, we always throttle
- if (machine().paused()) //|| machine().ui().is_menu_active())
+ if (machine().paused() || machine().ui().is_menu_active())
return true;
// if we're fast forwarding, we don't throttle
diff --git a/src/emu/video.h b/src/emu/video.h
index 7a1808ad095..4938cf67f34 100644
--- a/src/emu/video.h
+++ b/src/emu/video.h
@@ -76,7 +76,6 @@ public:
// misc
void toggle_throttle();
void toggle_record_movie();
- file_error open_next(emu_file &file, const char *extension);
// render a frame
void frame_update(bool debug = false);
@@ -88,23 +87,11 @@ public:
// snapshots
void save_snapshot(screen_device *screen, emu_file &file);
void save_active_screen_snapshots();
- void save_input_timecode();
// movies
void begin_recording(const char *name, movie_format format);
void end_recording(movie_format format);
void add_sound_to_recording(const INT16 *sound, int numsamples);
-
- void set_timecode_enabled(bool value) { m_timecode_enabled = value; }
- bool get_timecode_enabled() { return m_timecode_enabled; }
- bool get_timecode_write() { return m_timecode_write; }
- void set_timecode_write(bool value) { m_timecode_write = value; }
- void set_timecode_text(std::string &str) { m_timecode_text = str; }
- void set_timecode_start(attotime time) { m_timecode_start = time; }
- void add_to_total_time(attotime time) { m_timecode_total += time; }
- std::string &timecode_text(std::string &str);
- std::string &timecode_total_text(std::string &str);
-
private:
// internal helpers
@@ -113,7 +100,7 @@ private:
void postload();
// effective value helpers
- bool effective_autoframeskip() const;
+ int effective_autoframeskip() const;
int effective_frameskip() const;
bool effective_throttle() const;
@@ -128,6 +115,7 @@ private:
// snapshot/movie helpers
void create_snapshot_bitmap(screen_device *screen);
+ file_error open_next(emu_file &file, const char *extension);
void record_frame();
// internal state
@@ -196,13 +184,6 @@ private:
static const attoseconds_t ATTOSECONDS_PER_SPEED_UPDATE = ATTOSECONDS_PER_SECOND / 4;
static const int PAUSED_REFRESH_RATE = 30;
-
- bool m_timecode_enabled; // inp.timecode record enabled
- bool m_timecode_write; // Show/hide timer at right (partial time)
- std::string m_timecode_text; // Message for that video part (intro, gameplay, extra)
- attotime m_timecode_start; // Starting timer for that video part (intro, gameplay, extra)
- attotime m_timecode_total; // Show/hide timer at left (total elapsed on resulting video preview)
-
};
#endif /* __VIDEO_H__ */
diff --git a/src/ldplayer/ldplayer.cpp b/src/ldplayer/ldplayer.cpp
index 4f16ba130b8..bbd309dd0b9 100644
--- a/src/ldplayer/ldplayer.cpp
+++ b/src/ldplayer/ldplayer.cpp
@@ -22,14 +22,40 @@
#define APPNAME "MAME"
#define APPNAME_LOWER "mame"
#define CONFIGNAME "mame"
+#define CAPGAMENOUN "GAME"
+#define CAPSTARTGAMENOUN "Game"
+#define GAMENOUN "game"
+#define GAMESNOUN "games"
#define COPYRIGHT "Copyright Nicola Salmoria\nand the MAME team\nhttp://mamedev.org"
#define COPYRIGHT_INFO "Copyright Nicola Salmoria and the MAME team"
+#define DISCLAIMER "MAME is an emulator: it reproduces, more or less faithfully, the behaviour of\n" \
+ "several arcade machines. But hardware is useless without software, so an image\n" \
+ "of the ROMs which run on that hardware is required. Such ROMs, like any other\n" \
+ "commercial software, are copyrighted material and it is therefore illegal to\n" \
+ "use them if you don't own the original arcade machine. Needless to say, ROMs\n" \
+ "are not distributed together with MAME. Distribution of MAME together with ROM\n" \
+ "images is a violation of copyright law and should be promptly reported to the\n" \
+ "authors so that appropriate legal action can be taken.\n"
+#define USAGE "Usage: %s [%s] [options]"
+#define XML_ROOT "mame"
+#define XML_TOP "game"
+#define STATE_MAGIC_NUM "MAMESAVE"
const char * emulator_info::get_appname() { return APPNAME;}
const char * emulator_info::get_appname_lower() { return APPNAME_LOWER;}
const char * emulator_info::get_configname() { return CONFIGNAME;}
+const char * emulator_info::get_capgamenoun() { return CAPGAMENOUN;}
+const char * emulator_info::get_capstartgamenoun() { return CAPSTARTGAMENOUN;}
+const char * emulator_info::get_gamenoun() { return GAMENOUN;}
+const char * emulator_info::get_gamesnoun() { return GAMESNOUN;}
const char * emulator_info::get_copyright() { return COPYRIGHT;}
const char * emulator_info::get_copyright_info() { return COPYRIGHT_INFO;}
+const char * emulator_info::get_disclaimer() { return DISCLAIMER;}
+const char * emulator_info::get_usage() { return USAGE;}
+const char * emulator_info::get_xml_root() { return XML_ROOT;}
+const char * emulator_info::get_xml_top() { return XML_TOP;}
+const char * emulator_info::get_state_magic_num() { return STATE_MAGIC_NUM;}
+void emulator_info::printf_usage(const char *par1, const char *par2) { osd_printf_info(USAGE, par1, par2); }
/*************************************
*
diff --git a/src/lib/netlist/devices/net_lib.cpp b/src/lib/netlist/devices/net_lib.cpp
index 4df6811dddc..3b8edc8ac84 100644
--- a/src/lib/netlist/devices/net_lib.cpp
+++ b/src/lib/netlist/devices/net_lib.cpp
@@ -41,9 +41,8 @@ NETLIST_START(bjt_models)
NET_MODEL("2N5190 NPN(IS=9.198E-14 NF=1.003 ISE=4.468E-16 NE=1.65 BF=338.8 IKF=0.4913 VAF=107.9 NR=1.002 ISC=5.109E-15 NC=1.071 BR=29.48 IKR=0.193 VAR=25 RB=1 IRB=1000 RBM=1 RE=0.2126 RC=0.143 XTB=0 EG=1.11 XTI=3 CJE=3.825E-11 VJE=0.7004 MJE=0.364 TF=5.229E-10 XTF=219.7 VTF=3.502 ITF=7.257 PTF=0 CJC=1.27E-11 VJC=0.4431 MJC=0.3983 XCJC=0.4555 TR=7E-11 CJS=0 VJS=0.75 MJS=0.333 FC=0.905 Vceo=45 Icrating=500m mfg=Philips)")
NET_MODEL("2SC945 NPN(IS=3.577E-14 BF=2.382E+02 NF=1.01 VAF=1.206E+02 IKF=3.332E-01 ISE=3.038E-16 NE=1.205 BR=1.289E+01 NR=1.015 VAR=1.533E+01 IKR=2.037E-01 ISC=3.972E-14 NC=1.115 RB=3.680E+01 IRB=1.004E-04 RBM=1 RE=8.338E-01 RC=1.557E+00 CJE=1.877E-11 VJE=7.211E-01 MJE=3.486E-01 TF=4.149E-10 XTF=1.000E+02 VTF=9.956 ITF=5.118E-01 PTF=0 CJC=6.876p VJC=3.645E-01 MJC=3.074E-01 TR=5.145E-08 XTB=1.5 EG=1.11 XTI=3 FC=0.5 Vceo=50 Icrating=100m MFG=NEC)")
- NET_MODEL("BC237B NPN(IS=1.8E-14 ISE=5.0E-14 ISC=1.72E-13 XTI=3 BF=400 BR=35.5 IKF=0.14 IKR=0.03 XTB=1.5 VAF=80 VAR=12.5 VJE=0.58 VJC=0.54 RE=0.6 RC=0.25 RB=0.56 CJE=13E-12 CJC=4E-12 XCJC=0.75 FC=0.5 NF=0.9955 NR=1.005 NE=1.46 NC=1.27 MJE=0.33 MJC=0.33 TF=0.64E-9 TR=50.72E-9 EG=1.11 KF=0 AF=1 VCEO=45 ICRATING=100M MFG=ZETEX)")
+ NET_MODEL("BC237B NPN(IS=1.8E-14 ISE=5.0E-14 ISC=1.72E-13 XTI=3 BF=400 BR=35.5 IKF=0.14 IKR=0.03 XTB=1.5 VAF=80 VAR=12.5 VJE=0.58 VJC=0.54 RE=0.6 RC=0.25 RB=0.56 CJE=13E-12 CJC=4E-12 XCJC=0.75 FC=0.5 NF=0.9955 NR=1.005 NE=1.46 NC=1.27 MJE=0.33 MJC=0.33 TF=0.64E-9 TR=50.72E-9 EG=1.11 KF=0 AF=1 VCEO=45V ICRATING=100M MFG=ZETEX)")
NET_MODEL("BC556B PNP(IS=3.83E-14 NF=1.008 ISE=1.22E-14 NE=1.528 BF=344.4 IKF=0.08039 VAF=21.11 NR=1.005 ISC=2.85E-13 NC=1.28 BR=14.84 IKR=0.047 VAR=32.02 RB=1 IRB=1.00E-06 RBM=1 RE=0.6202 RC=0.5713 XTB=0 EG=1.11 XTI=3 CJE=1.23E-11 VJE=0.6106 MJE=0.378 TF=5.60E-10 XTF=3.414 VTF=5.23 ITF=0.1483 PTF=0 CJC=1.08E-11 VJC=0.1022 MJC=0.3563 XCJC=0.6288 TR=1.00E-32 CJS=0 VJS=0.75 MJS=0.333 FC=0.8027 Vceo=65 Icrating=100m mfg=Philips)")
- NET_MODEL("BC548C NPN(IS=1.95E-14 ISE=1.31E-15 ISC=1.0E-13 XTI=3 BF=466 BR=2.42 IKF=0.18 IKR=1 XTB=1.5 VAF=91.7 VAR=24.7 VJE=0.632 VJC=0.339 RE=1 RC=1.73 RB=26.5 RBM=10 IRB=10 CJE=1.33E-11 CJC=5.17E-12 XCJC=1 FC=0.9 NF=0.993 NR=1.2 NE=1.32 NC=2.00 MJE=0.326 MJC=0.319 TF=6.52E-10 TR=0 PTF=0 ITF=1.03 VTF=1.65 XTF=100 EG=1.11 KF=1E-9 AF=1 VCEO=40 ICrating=800M MFG=Siemens)")
NET_MODEL("BC817-25 NPN(IS=9.198E-14 NF=1.003 ISE=4.468E-16 NE=1.65 BF=338.8 IKF=0.4913 VAF=107.9 NR=1.002 ISC=5.109E-15 NC=1.071 BR=29.48 IKR=0.193 VAR=25 RB=1 IRB=1000 RBM=1 RE=0.2126 RC=0.143 XTB=0 EG=1.11 XTI=3 CJE=3.825E-11 VJE=0.7004 MJE=0.364 TF=5.229E-10 XTF=219.7 VTF=3.502 ITF=7.257 PTF=0 CJC=1.27E-11 VJC=0.4431 MJC=0.3983 XCJC=0.4555 TR=7E-11 CJS=0 VJS=0.75 MJS=0.333 FC=0.905 Vceo=45 Icrating=500m mfg=Philips)")
NETLIST_END()
diff --git a/src/lib/util/aviio.cpp b/src/lib/util/aviio.cpp
index a448128070b..90918c06673 100644
--- a/src/lib/util/aviio.cpp
+++ b/src/lib/util/aviio.cpp
@@ -1297,7 +1297,7 @@ avi_error avi_read_sound_samples(avi_file *file, int channel, UINT32 firstsample
UINT32 bytes_per_sample;
file_error filerr;
avi_stream *stream;
- int offset = 0;
+ int offset;
/* get the audio stream */
stream = get_audio_stream(file, channel, &offset);
diff --git a/src/lib/util/corealloc.h b/src/lib/util/corealloc.h
index 2c1df6dd46c..4f0b961eb59 100644
--- a/src/lib/util/corealloc.h
+++ b/src/lib/util/corealloc.h
@@ -27,9 +27,7 @@
// global allocation helpers -- use these instead of new and delete
#define global_alloc(_type) new _type
-#define global_alloc_nothrow(_type) new (std::nothrow) _type
#define global_alloc_array(_type, _num) new _type[_num]
-#define global_alloc_array_nothrow(_type, _num) new (std::nothrow) _type[_num]
#define global_free(_ptr) do { delete _ptr; } while (0)
#define global_free_array(_ptr) do { delete[] _ptr; } while (0)
diff --git a/src/lib/util/options.cpp b/src/lib/util/options.cpp
index 830721127ac..d7ab454d063 100644
--- a/src/lib/util/options.cpp
+++ b/src/lib/util/options.cpp
@@ -58,8 +58,7 @@ core_options::entry::entry(const char *name, const char *description, UINT32 fla
m_seqid(0),
m_error_reported(false),
m_priority(OPTION_PRIORITY_DEFAULT),
- m_description(description),
- m_changed(false)
+ m_description(description)
{
// copy in the name(s) as appropriate
if (name != nullptr)
@@ -616,16 +615,6 @@ bool core_options::exists(const char *name) const
}
//-------------------------------------------------
-// is_changed - return if option have been marked
-// changed
-//-------------------------------------------------
-
-bool core_options::is_changed(const char *name) const
-{
- auto curentry = m_entrymap.find(name);
- return (curentry != m_entrymap.end()) ? curentry->second->is_changed() : false;
-}
-//-------------------------------------------------
// set_value - set the raw option value
//-------------------------------------------------
@@ -667,16 +656,6 @@ void core_options::set_flag(const char *name, UINT32 mask, UINT32 flag)
curentry->second->set_flag(mask, flag);
}
-void core_options::mark_changed(const char* name)
-{
- // find the entry first
- auto curentry = m_entrymap.find(name);
- if (curentry == m_entrymap.end())
- {
- return;
- }
- curentry->second->mark_changed();
-}
//-------------------------------------------------
// reset - reset the options state, removing
diff --git a/src/lib/util/options.h b/src/lib/util/options.h
index 5edf64a9fcd..1df89bed6c7 100644
--- a/src/lib/util/options.h
+++ b/src/lib/util/options.h
@@ -89,14 +89,12 @@ public:
bool is_internal() const { return m_flags & OPTION_FLAG_INTERNAL; }
bool has_range() const { return (!m_minimum.empty() && !m_maximum.empty()); }
int priority() const { return m_priority; }
- bool is_changed() const { return m_changed; }
// setters
void set_value(const char *newvalue, int priority);
void set_default_value(const char *defvalue);
void set_description(const char *description);
void set_flag(UINT32 mask, UINT32 flag);
- void mark_changed() { m_changed = true; }
void revert(int priority);
private:
@@ -112,7 +110,6 @@ public:
std::string m_defdata; // default data for this item
std::string m_minimum; // minimum value
std::string m_maximum; // maximum value
- bool m_changed; // changed flag
};
// construction/destruction
@@ -160,7 +157,6 @@ public:
float float_value(const char *name) const { return atof(value(name)); }
UINT32 seqid(const char *name) const;
bool exists(const char *name) const;
- bool is_changed(const char *name) const;
// setting
void set_command(const char *command);
@@ -168,7 +164,6 @@ public:
bool set_value(const char *name, int value, int priority, std::string &error_string);
bool set_value(const char *name, float value, int priority, std::string &error_string);
void set_flag(const char *name, UINT32 mask, UINT32 flags);
- void mark_changed(const char *name);
// misc
static const char *unadorned(int x = 0) { return s_option_unadorned[MIN(x, MAX_UNADORNED_OPTIONS)]; }
diff --git a/src/mame/arcade.lst b/src/mame/arcade.lst
index 76a780960b3..90ab4bd4d2d 100644
--- a/src/mame/arcade.lst
+++ b/src/mame/arcade.lst
@@ -382,7 +382,6 @@ hustlerb4 // bootleg
frogger // GX392 (c) 1981 Konami
froggers1 // (c) 1981 Sega
froggers2 // 834-0068 (c) 1981 Sega
-froggers3 //
froggermc // 800-3110 (c) 1981 Sega
amidar // GX337 (c) 1982 Konami
amidar1 // GX337 (c) 1981 Konami
@@ -1107,7 +1106,6 @@ tekken4
tekken4a
tekken4b
tekken4c
-wanganmr
prdgp03
timecrs3
timecrs3e
@@ -2108,7 +2106,6 @@ sboblbobl // bootleg
sboblbobla // bootleg
sboblboblb // bootleg
sboblboblc // bootleg
-sboblbobld // bootleg
bublboblb // bootleg
bub68705 // bootleg
dland // bootleg
@@ -3093,7 +3090,6 @@ supduck // (c) Comad
1943j // 6/1987 (c) 1987 (Japan) Rev B
1943ja // 6/1987 (c) 1987 (Japan)
1943b // bootleg
-1943bj // bootleg
blktiger // 8/1987 (c) 1987 (US)
blktigera // 8/1987 (c) 1987 (US)
blktigerb1 // bootleg
@@ -4134,23 +4130,17 @@ p911 // 2001
p911uc // 2001
p911kc // 2001
p911e // 2001
-p911ea // 2001
p911j // 2001
p9112 // 2001
popn9 // 2003
sscopex // 2001
sogeki // 2001
-sscopefh // 2002
thrild2 // 2001
thrild2a // 2001
-thrild2ab // 2001
-thrild2ac // 2001
thrild2c // 2001
tsurugi // 2001
-tsurugie // 2001
tsurugij // 2001
wcombat // 2002
-wcombatb // 2002
wcombatk // 2002
wcombatj // 2002
wcombatu // 2002
@@ -4186,10 +4176,9 @@ marukin // 17/10/1990 (c) 1990 Yuga (Japan)
qtono1 // 25/12/1990 (QUIZ 3) (c) 1991 Capcom (Japan)
// 4/1991 Ashita Tenki ni Naare (golf)
qsangoku // 07/06/1991 (QUIZ 4) (c) 1991 Capcom (Japan)
-block // 19/12/1991 (c) 1991 Capcom (World) (Joystick version)
-blockr1 // 06/11/1991 (c) 1991 Capcom (World) (Joystick version)
-blockr2 // 10/09/1991 (c) 1991 Capcom (World)
+block // 10/09/1991 (c) 1991 Capcom (World)
blockj // 10/09/1991 (c) 1991 Capcom (Japan)
+blockjoy // 06/11/1991 (c) 1991 Capcom (World) (Joystick version, bad dump?)
blockbl // bootleg
// Incredible Technologies games
@@ -5154,27 +5143,15 @@ shienryu // 1997.02 Shienryu (Warashi)
vmahjong // 1997.02 Virtual Mahjong (Micronet)
pclub2kc // 1997.02 Print Club Kome Kome Club
pclub2fc // 1997.04 Print Club 2 Felix The Cat
-pclub2pe //
-pclub2wb //
-pclub2pf //
-pclub26w //
-pclub27s //
-pclubyo2 //
groovef // 1997.05 Groove on Fight (Atlus)
nclubv3 // 1997.07 Name Club Ver. 3
-nclubv2 //
-nameclub //
pclb2elk // 1997.07 Print Club Custom
pclub2 // 1997.09 Print Club 2
thunt // 1997.09 Puzzle & Action Treasure Hunt (Sega (Deniam License))
thuntk
winterht // 1997.10 Winter Heat (Data East)
-prc297wi // 1997.10 Print Club 2 '97 Winter Ver
-prc297wia //
-prc298sp // 1997.10 Print Club 2 '98 Spring Ver
-prc298su //
-pclove //
-pclove2 //
+pclb297w // 1997.10 Print Club 2 '97 Winter Ver
+pclub298 // 1997.10 Print Club 2 '98 Spring Ver
cotton2 // 1997.11 Cotton 2 (Success)
hanagumi // 1997.11 Sakura Taisen Hanagumi Taisen Columns
findlove // 1997.12 Find Love (Daiki / FCF)
@@ -5191,7 +5168,7 @@ astrass // 1998.06 Astra Super Stars (Sunsoft)
myfairld // 1998.07 My Fair Lady (Micronet)
othellos // 1998.07 Othello Shiyouyo (Success)
pclubol // 1998.07 Print Club Olive
-prc298au // 1998.08 Print Club 2 '98 Autumn Ver
+pclb298a // 1998.08 Print Club 2 '98 Autumn Ver
cottonbm // 1998.09 Cotton Boomerang (Success)
stress // 1998.10 Stress Busters
elandore // 1998.11 Touryuu Densetsu Elandore (Sai-Mate)
@@ -5685,7 +5662,7 @@ shootpl // 2003.?? Shootout Pool The Medal / Shootout Pool Prize (Rev A)
cfield // 2004.06 Chaos Field
tetkiwam // 2004.06 Tetris Kiwamemichi (Arcade TV Game List - P.88, Right, 11 from bottom)
trizeal // 2004.09 Trizeal
-dragntr2 // 2004.?? Dragon Treasure 2 (Rev A)
+ // 2004.?? Dragon Treasure 2
kick4csh // 2004.?? Kick '4' Cash
shootplm // 2004.?? Shootout Pool The Medal Ver. B / Shootout Pool Prize Ver. B
// 2004.?? The Quiz Show
@@ -5926,8 +5903,8 @@ mj2c // 2004.12 Sega Network Taisen Mahjong MJ 2 (Rev C)
// 2004.12 Sega Network Taisen Mahjong MJ 2 (Rev D)
ghostsqu // 2004.12.09 Ghost Squad (Rev A)
// 2005.02 Sega Network Taisen Mahjong MJ 2 (Rev E)
-mj2f // 2005.02 Sega Network Taisen Mahjong MJ 2 (Rev F)
-mj2 // 2005.02.02 Sega Network Taisen Mahjong MJ 2 (Rev G)
+mj2 // 2005.02 Sega Network Taisen Mahjong MJ 2 (Rev F)
+mj2g // 2005.02.02 Sega Network Taisen Mahjong MJ 2 (Rev G)
// 2005.03 Sangokushi Taisen
gundamos // 2005.03 Gundam Battle Operating Simulator
// 2005.04 Quest of D Ver.1.20
@@ -6378,7 +6355,6 @@ charlien // MBR (c) 1994 Mitchell
// MBV ??
// MBW ??
wcvol95 // MBX (c) 1993 Data East
-wcvol95x // ?
// MBY ??
backfire // MBZ (c) 1995
backfirea // MBZ (c) 1995
@@ -7228,7 +7204,6 @@ asteroid // 035127-035145 (c) 1979
asteroid2 // 035127-035145 (c) 1979
asteroid1 // 035127-035145 no copyright notice
asteroidb // (bootleg)
-spcrocks // J.Estevez (c) 1981
aerolitos // Rodmar Elec. bootleg
asterock // Sidam bootleg (c) 1979
asterockv // Videotron bootleg(c) 1979
@@ -7706,7 +7681,6 @@ tnk3j // A5001 (c) 1985
athena // 'UP' (c) 1986
fitegolf // 'GU' (c) 1988
fitegolfu // 'GU' (c) 1988
-fitegolf2 //
countryc // A7004 'CC' (c) 1988
ikari // A5004 'IW' (c) 1986
ikaria // A5004 'IW' (c) 1986
@@ -8437,7 +8411,6 @@ mk2chal // hack
jdreddp // (c) 1993 Midway
nbajam // (c) 1993 Midway
nbajamr2 // (c) 1993 Midway
-nbajamr1 // (c) 1993 Midway
nbajamte // (c) 1994 Midway
nbajamte1 // (c) 1994 Midway
nbajamte2 // (c) 1994 Midway
@@ -8822,7 +8795,6 @@ rdft2a // (c) 1997 Seibu Kaihatsu (Metrotainment license)
rdft2aa // (c) 1997 Seibu Kaihatsu (Dream Island license)
rdft2j // (c) 1997 Seibu Kaihatsu
rdft2ja // (c) 1997 Seibu Kaihatsu
-rdft2it // (c) 1997 Seibu Kaihatsu
rdft2t // (c) 1997 Seibu Kaihatsu
rdft2u // (c) 1997 Seibu Kaihatsu (Fabtek license)
rdft2us // (c) 1997 Seibu Kaihatsu (Fabtek license)
@@ -8971,7 +8943,6 @@ edfu // (c) 1991 (North America)
edfbl // (c) 1991
64street // (c) 1991
64streetj // (c) 1991 (Japan)
-64streetja // (c) 1991 (Japan)
soldam // (c) 1992
soldamj // (c) 1992 (Japan)
bigstrik // (c) 1992
@@ -9190,8 +9161,7 @@ thoop // (c) 1992 - Ref 922804/1
squash // (c) 1992 - Ref 922804/2
wrally // (c) 1993 - Ref 930705
wrallya // (c) 1993 - Ref 930705
-wrallyb // (c) 1993 - Ref 930217
-wrallyat // (c) 1993 - Ref 930217
+wrallyb // (c) 1993 - Ref 930217
glass // (c) 1993 - Ref 931021
glass10 // (c) 1993 - Ref 931021
glass10a // (c) 1993 - Ref 931021 shows "Break Edition" on a real PCB
@@ -9300,8 +9270,6 @@ oedfight // (c) 1994 Kaneko
bonkadv // (c) 1994 Kaneko
gtmr // (c) 1994 Kaneko
gtmra // (c) 1994 Kaneko
-gtmrb // (c) 1994 Kaneko
-gtmro // (c) 1994 Kaneko
gtmre // (c) 1994 Kaneko
gtmrusa // (c) 1994 Kaneko (US)
gtmr2 // (c) 1995 Kaneko
@@ -9883,9 +9851,8 @@ spec2kh // (c) 2000 Yonatech
// ESD games
// http://www.esdgame.co.kr/english/
-multchmp // (c) 1999 (World)
+multchmp // (c) 1998 (World)
multchmpk // (c) 1998 (Korea)
-multchmpa // (c) 1998 (World)
mchampdx // (c) 1999 ESD
mchampdxa // (c) 1999 ESD
mchampdxb // (c) 1999 ESD
@@ -10080,12 +10047,8 @@ haekaka // (c) 2001 Sammy
goldstar // (c) 198? IGS
goldstbl // (c) 198? IGS
moonlght // bootleg
-moonlghta // bootleg
-moonlghtb // bootleg
-moonlghtc // bootleg
chry10 // bootleg
chrygld // bootleg
-chryglda // bootleg
goldfrui // bootleg
wcherry // bootleg
super9 // (c) 2001 Playmark
@@ -10564,7 +10527,6 @@ fastdraw_130 // (c) 1995
aplatoon // (c) 199? Nova?
zortonbr // (c) 1993 Web Picmatic
-crospuzl //
// Crystal System
crysbios
crysking // 2001 Brezzasoft. Crystal of the kings
@@ -10767,7 +10729,6 @@ coolpool // (c) 1992 Catalina Games
9ballsht3 // (c) 1993 E-Scape EnterMedia + "marketed by Bundra Games"
9ballshtc // (c) 1993 E-Scape EnterMedia + "marketed by Bundra Games"
megaphx // (c) 1991 Dinamic / Inder
-flagrall // ?
gumbo // (c) 1994 Min Corp.
mspuzzleg // (c) 1994 Min Corp.
mspuzzle // (c) 1994 Min Corp.
@@ -10897,7 +10858,6 @@ strvmstr // (c) 1986 Enerdyne Technologies Inc
dorachan // (c) 1980 Craul Denshi
ladyfrog // (c) 1990 Mondial Games
toucheme
-touchemea
rabbit // (c) 1997 Electronic Arts
tmmjprd // (c) 1997 Media / Sonnet
tmpdoki // (c) 1998 Media Syouji
@@ -10939,7 +10899,7 @@ stuntair // (c) 1983 Nuova Videotron
// Success
tonton // (c) 199? Success / Taiyo Jidoki.
-kurukuru // (c) 1990 Success / Taiyo Jidoki.
+kurukuru // (c) 199? Success / Taiyo Jidoki.
ppj // (c) 199? Success / Taiyo Jidoki.
othello // (c) 1984 Success.
sothello // (c) 1986 Success / Fujiwara.
@@ -10997,8 +10957,7 @@ phrcrazea // (c) 1986 Merit
phrcrazeb // (c) 1986 Merit
phrcrazec // (c) 1986 Merit
phrcrazev // (c) 1986 Merit
-bigappg // (c) 1986 Merit / Big Apple Games
-misdraw // (c) 1986 Merit / Big Apple Games
+bigappg // (c) 1986 Merit
riviera // (c) 1987 Merit
rivieraa // (c) 1986 Merit
rivierab // (c) 1986 Merit
@@ -11994,7 +11953,6 @@ pexmp030 // (c) 1997 IGT - International Game Technology
pexmp030a // (c) 1997 IGT - International Game Technology
// IGT Game King
-ms72c
gkigt4
gkigt4ms
gkigt43
@@ -12290,8 +12248,6 @@ cmasterbv // (c) 1991 Dyna Electronics / Gerald Duhamel?
cmasterd // (c) 1991 Dyna Electronics
cmastere // (c) 1991 Dyna Electronics
cmasterf // (c) 1991 Dyna Electronics
-cmasterg // (c) 1991 Dyna Electronics
-cmasterh // (c) 1991 Dyna Electronics
cmast91 // (c) 1991 Dyna Electronics
cmast92 // (c) 1992 Dyna Electronics
cmast97 // (c) 1996 Dyna Electronics
@@ -12432,12 +12388,10 @@ excitbj // (c) 1992 Wing Co. Ltd
carb2002 // bootleg
carb2003 // bootleg
nfm // bootleg
-scmaster // 1994, unknown
unkch1 // bootleg
unkch2 // bootleg
unkch3 // bootleg
unkch4 // bootleg
-cherry96 // bootleg
ns8lines // unknown
ns8linew // unknown
ladylinr // (c) 198? TAB Austria
@@ -12457,7 +12411,6 @@ schery97a // (c) 1998 Amcoe
roypok96 // (c) 1996 Amcoe
roypok96a // (c) 1996 Amcoe
roypok96b // (c) 1996 Amcoe
-roypok96c // (c) 1996 Amcoe
pokonl97 // (c) 1997 Amcoe
nc96 // (c) 1996 Amcoe
nc96a // (c) 1996 Amcoe
@@ -32727,6 +32680,3 @@ clowndwn // Elwood Clown Roll Down
fi6845
fi8275
-
-l9nibble // unknown Nibble game.
- \ No newline at end of file
diff --git a/src/mame/audio/laserbat.cpp b/src/mame/audio/laserbat.cpp
index 963f3aa7f76..5e8ee062b45 100644
--- a/src/mame/audio/laserbat.cpp
+++ b/src/mame/audio/laserbat.cpp
@@ -230,9 +230,7 @@ WRITE8_MEMBER(laserbat_state::csound2_w)
The Cat and Mouse sound board has a 6802 processor with three ROMs,
a 6821 PIA, two AY-3-8910 PSGs, and some other logic and analog
circuitry. Unfortunately we lack a schematic, so all knowledge of
- this board is based on tracing the sound program, examining PCB
- photos and cross-referencing with the schematic for the 1B11142
- schematic.
+ this board is based on tracing the sound program.
The 6821 PIA is mapped at addresses $005C..$005F. The known PIA
signal assignments are as follows:
@@ -284,7 +282,7 @@ WRITE8_MEMBER(laserbat_state::csound2_w)
| 6 | SOUND 5 | PIA CA1 |
| 7 | | |
| 8 | | |
- | 9 | | 14L A11 |
+ | 9 | | |
| 10 | | |
| 11 | | |
| 12 | | |
@@ -294,10 +292,6 @@ WRITE8_MEMBER(laserbat_state::csound2_w)
| 16 | RESET | Unknown |
+-----+----------+-------------+
- Bit 9 is used to select the sprite ROM bank. There's a wire visible
- on the component side of the PCB connecting it to the high address
- bit (A11) of the sprite ROM at 14L.
-
There could well be other connections on the sound board - these are
just what can be deduced by tracing the sound program.
@@ -308,18 +302,87 @@ WRITE8_MEMBER(laserbat_state::csound2_w)
WRITE8_MEMBER(catnmous_state::csound1_w)
{
- m_audiopcb->sound_w(space, offset, data);
-
+ m_pia->ca1_w((data & 0x20) ? 1 : 0);
m_csound1 = data;
}
WRITE8_MEMBER(catnmous_state::csound2_w)
{
- // the bottom bit is used for sprite banking, of all things
- m_gfx2 = memregion("gfx2")->base() + ((data & 0x01) ? 0x0800 : 0x0000);
+ // the top bit is called RESET on the wiring diagram - assume it resets the sound CPU
+ m_audiocpu->set_input_line(INPUT_LINE_RESET, (data & 0x80) ? ASSERT_LINE : CLEAR_LINE);
+ m_csound2 = data;
+}
+
+READ8_MEMBER(catnmous_state::pia_porta_r)
+{
+ UINT8 const control = m_pia->b_output();
+ UINT8 data = 0xff;
- // the top bit is called RESET on the wiring diagram
- m_audiopcb->reset_w((data & 0x80) ? 1 : 0);
+ if (0x01 == (control & 0x03))
+ data &= m_psg1->data_r(space, 0);
- m_csound2 = data;
+ if (0x04 == (control & 0x0c))
+ data &= m_psg2->data_r(space, 0);
+
+ return data;
+}
+
+WRITE8_MEMBER(catnmous_state::pia_porta_w)
+{
+ UINT8 const control = m_pia->b_output();
+
+ if (control & 0x02)
+ m_psg1->data_address_w(space, (control >> 0) & 0x01, data);
+
+ if (control & 0x08)
+ m_psg2->data_address_w(space, (control >> 2) & 0x01, data);
+}
+
+WRITE8_MEMBER(catnmous_state::pia_portb_w)
+{
+ if (data & 0x02)
+ m_psg1->data_address_w(space, (data >> 0) & 0x01, m_pia->a_output());
+
+ if (data & 0x08)
+ m_psg2->data_address_w(space, (data >> 2) & 0x01, m_pia->a_output());
+}
+
+WRITE_LINE_MEMBER(catnmous_state::pia_irqa)
+{
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, state ? ASSERT_LINE : CLEAR_LINE);
+}
+
+WRITE_LINE_MEMBER(catnmous_state::pia_irqb)
+{
+ m_audiocpu->set_input_line(INPUT_LINE_IRQ0, state ? ASSERT_LINE : CLEAR_LINE);
+}
+
+WRITE8_MEMBER(catnmous_state::psg1_porta_w)
+{
+ // similar to zaccaria.c since we have no clue how this board really works
+ // this code could be completely wrong/inappropriate for this game for all we know
+ static double const table[8] = {
+ RES_K(8.2),
+ RES_R(820),
+ RES_K(3.3),
+ RES_R(150),
+ RES_K(5.6),
+ RES_R(390),
+ RES_K(1.5),
+ RES_R(47) };
+ RES_VOLTAGE_DIVIDER(RES_K(4.7), table[data & 0x07]);
+ m_psg2->set_volume(1, 150 * RES_VOLTAGE_DIVIDER(RES_K(4.7), table[data & 0x07]));
+}
+
+READ8_MEMBER(catnmous_state::psg1_portb_r)
+{
+ // the sound program masks out the three most significant bits
+ // assume they're not connected and read high from the internal pull-ups
+ return m_csound1 | 0xe0;
+}
+
+INTERRUPT_GEN_MEMBER(catnmous_state::cb1_toggle)
+{
+ m_cb1 = !m_cb1;
+ m_pia->cb1_w(m_cb1 ? 1 : 0);
}
diff --git a/src/mame/audio/zaccaria.cpp b/src/mame/audio/zaccaria.cpp
deleted file mode 100644
index 0df34d1d626..00000000000
--- a/src/mame/audio/zaccaria.cpp
+++ /dev/null
@@ -1,466 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Vas Crabb
-#include "emu.h"
-#include "audio/zaccaria.h"
-
-#include "cpu/m6800/m6800.h"
-#include "machine/clock.h"
-#include "machine/rescap.h"
-#include "sound/dac.h"
-
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-device_type const ZACCARIA_1B11107 = &device_creator<zac1b11107_audio_device>;
-device_type const ZACCARIA_1B11142 = &device_creator<zac1b11142_audio_device>;
-
-
-
-//**************************************************************************
-// MEMORY MAPS
-//**************************************************************************
-
-/*
- base melody/SFX generator CPU map
- 1B11107 and 1B11142 both have a 6802 with internal RAM and a PIA accessed at 0x500c
-*/
-static ADDRESS_MAP_START(zac1b111xx_melody_base_map, AS_PROGRAM, 8, zac1b111xx_melody_base)
- ADDRESS_MAP_UNMAP_HIGH
- AM_RANGE(0x0000, 0x007f) AM_RAM // 6802 internal RAM
- AM_RANGE(0x400c, 0x400f) AM_MIRROR(0x1ff0) AM_DEVREADWRITE("melodypia", pia6821_device, read, write)
-ADDRESS_MAP_END
-
-
-/*
- 1B11107 sound CPU, produces music and sound effects
- mapping (from tracing sound program and cross-referencing 1B1142 schematic):
- A15 A14 A13 A12 A11 A10 A09 A08 A07 A06 A05 A04 A03 A02 A01 A00
- 0 0 0 0 0 0 0 0 0 * * * * * * * RW 6802 internal ram
- 0 0 0 x x x x x x x x x x x x x Open bus (for area that doesn't overlap RAM)
- 0 0 1 x x x x x x x x x x x x x Open bus
- 0 1 0 x x x x x x x x x 0 0 x x Open bus
- 0 1 0 x x x x x x x x x 0 1 x x Open bus
- 0 1 0 x x x x x x x x x 1 0 x x Open bus
- 0 1 0 x x x x x x x x x 1 1 * * RW 6821 PIA @ 1G
- 0 1 1 x x x x x x x x x x x x x Open bus
- 1 0 x x x x x x x x x x x x x x Open bus
- 1 1 0 0 * * * * * * * * * * * * R Enable ROM @ 1F
- 1 1 0 1 * * * * * * * * * * * * Open bus
- 1 1 1 0 * * * * * * * * * * * * R Enable ROM @ 1D
- 1 1 1 1 * * * * * * * * * * * * R Enable ROM @ 1E
-
- 6821 PIA:
- * CA1 comes from the SOUND 5 line on the input (which may also be connected to an input on the AY chip at 1H)
- * CB1 comes from the 6802's clock divided by 4096*2 (about 437Hz)
- * PA0-7 connect to the data busses of the AY-3-8910 chips
- * PB0 and PB1 connect to the BC1 and BDIR pins of the AY chip at 1H
- * PB2 and PB3 connect to the BC1 and BDIR pins of the AY chip at 1I
-*/
-static ADDRESS_MAP_START(zac1b11107_melody_map, AS_PROGRAM, 8, zac1b11107_audio_device)
- AM_IMPORT_FROM(zac1b111xx_melody_base_map)
- AM_RANGE(0xc000, 0xcfff) AM_ROM // ROM @ 1F
- AM_RANGE(0xe000, 0xffff) AM_ROM // ROM @ 1D, 1E
-ADDRESS_MAP_END
-
-
-/*
- 1B11142 slave sound CPU, produces music and sound effects
- mapping:
- A15 A14 A13 A12 A11 A10 A09 A08 A07 A06 A05 A04 A03 A02 A01 A00
- 0 0 0 0 0 0 0 0 0 * * * * * * * RW 6802 internal ram
- 0 0 0 x x x x x x x x x x x x x Open bus (for area that doesn't overlap RAM)
- 0 0 1 x x x x x x x x x x x x x Open bus
- 0 1 0 x x x x x x x x x 0 0 x x Open bus
- 0 1 0 x x x x x x x x x 0 1 x x Open bus
- 0 1 0 x x x x x x x x x 1 0 x x Open bus
- 0 1 0 x x x x x x x x x 1 1 * * RW 6821 PIA @ 4I
- 0 1 1 x x x x x x x x x x x x x Open bus
- 1 0 % % * * * * * * * * * * * * R /CS4A: Enable ROM 13
- 1 1 % % * * * * * * * * * * * * R /CS5A: Enable ROM 9
- note that the % bits go to pins 2 (6802 A12) and 26 (6802 A13) of the roms
- monymony and jackrabt both use 2764 roms, which use pin 2 as A12 and pin 26 as N/C don't care
- hence for actual chips used, the mem map is:
- 1 0 x * * * * * * * * * * * * * R /CS4A: Enable ROM 13
- 1 1 x * * * * * * * * * * * * * R /CS5A: Enable ROM 9
-
- 6821 PIA:
- * CA1 comes from the master sound cpu's latch bit 7 (which is also connected to the AY chip at 4G's IOB1)
- * CB1 comes from the 6802's clock divided by 4096*2 (about 437Hz)
- * CA2 and CB2 are not connected
- * PA0-7 connect to the data busses of the AY-3-8910 chips
- * PB0 and PB1 connect to the BC1 and BDIR pins of the AY chip at 4G
- * PB2 and PB3 connect to the BC1 and BDIR pins of the AY chip at 4H
-*/
-static ADDRESS_MAP_START(zac1b11142_melody_map, AS_PROGRAM, 8, zac1b11142_audio_device)
- AM_IMPORT_FROM(zac1b111xx_melody_base_map)
- AM_RANGE(0x8000, 0x9fff) AM_MIRROR(0x2000) AM_ROM // ROM 13
- AM_RANGE(0xc000, 0xdfff) AM_MIRROR(0x2000) AM_ROM // ROM 9
-ADDRESS_MAP_END
-
-
-/*
- 1B11142 master sound CPU, controls DAC and speech directly
- mapping:
- A15 A14 A13 A12 A11 A10 A09 A08 A07 A06 A05 A04 A03 A02 A01 A00
- 0 0 0 0 0 0 0 0 0 * * * * * * * RW 6802 internal ram
- x 0 0 0 x x x x 1 x x 0 x x * * Open bus (test mode writes as if there was another PIA here)
- x 0 0 0 x x x x 1 x x 1 x x * * RW 6821 PIA @ 1I
- x 0 0 1 0 0 x x x x x x x x x x W MC1408 DAC
- x x 0 1 0 1 x x x x x x x x x x W Command to slave melody cpu
- x x 0 1 1 0 x x x x x x x x x x R Command read latch from z80
- x x 0 1 1 1 x x x x x x x x x x Open bus
- % % 1 0 * * * * * * * * * * * * R /CS1A: Enable ROM 8
- % % 1 1 * * * * * * * * * * * * R /CS0A: Enable ROM 7
- note that the % bits go to pins 2 (6802 A14) and 26 (6802 A15) of the roms
- monymony and jackrabt both use 2764 roms, which use pin 2 as A12 and pin 26 as N/C don't care
- hence for actual chips used, the mem map is:
- x * 1 0 * * * * * * * * * * * * R /CS1A: Enable ROM 8
- x * 1 1 * * * * * * * * * * * * R /CS0A: Enable ROM 7
-
- 6821 PIA:
- PA0-7, PB0-1, CA2 and CB1 connect to the TMS5200
- CA1 and CB2 are not connected, though the test mode assumes there's something connected to CB2 (possibly another LED like the one connected to PB4)
- PB3 connects to 'ACS' which goes to the Z80
-*/
-static ADDRESS_MAP_START(zac1b11142_audio_map, AS_PROGRAM, 8, zac1b11142_audio_device)
- ADDRESS_MAP_UNMAP_HIGH
- AM_RANGE(0x0000, 0x007f) AM_RAM // 6802 internal RAM
- AM_RANGE(0x0090, 0x0093) AM_MIRROR(0x8f6c) AM_DEVREADWRITE("pia_1i", pia6821_device, read, write)
- AM_RANGE(0x1000, 0x1000) AM_MIRROR(0x83ff) AM_DEVWRITE("dac_1f", dac_device, write_unsigned8) // MC1408
- AM_RANGE(0x1400, 0x1400) AM_MIRROR(0xc3ff) AM_WRITE(melody_command_w)
- AM_RANGE(0x1800, 0x1800) AM_MIRROR(0xc3ff) AM_READ(host_command_r)
- AM_RANGE(0x2000, 0x2fff) AM_MIRROR(0x8000) AM_ROM // ROM 8 with A12 low
- AM_RANGE(0x3000, 0x3fff) AM_MIRROR(0x8000) AM_ROM // ROM 7 with A12 low
- AM_RANGE(0x6000, 0x6fff) AM_MIRROR(0x8000) AM_ROM // ROM 8 with A12 high
- AM_RANGE(0x7000, 0x7fff) AM_MIRROR(0x8000) AM_ROM // ROM 7 with A12 high
-ADDRESS_MAP_END
-
-
-
-//**************************************************************************
-// MACHINE FRAGMENTS
-//**************************************************************************
-
-MACHINE_CONFIG_FRAGMENT(zac1b111xx_base_config)
- MCFG_CPU_ADD("melodycpu", M6802, XTAL_3_579545MHz) // verified on pcb
- MCFG_CPU_PROGRAM_MAP(zac1b111xx_melody_base_map)
-
- MCFG_DEVICE_ADD("timebase", CLOCK, XTAL_3_579545MHz/4096/2) // CPU clock divided using 4040 and half of 74LS74
- MCFG_CLOCK_SIGNAL_HANDLER(DEVWRITELINE("melodypia", pia6821_device, cb1_w))
-
- MCFG_DEVICE_ADD("melodypia", PIA6821, 0)
- MCFG_PIA_READPA_HANDLER(READ8(zac1b111xx_melody_base, melodypia_porta_r))
- MCFG_PIA_WRITEPA_HANDLER(WRITE8(zac1b111xx_melody_base, melodypia_porta_w))
- MCFG_PIA_WRITEPB_HANDLER(WRITE8(zac1b111xx_melody_base, melodypia_portb_w))
- MCFG_PIA_IRQA_HANDLER(DEVWRITELINE("melodycpu", m6802_cpu_device, nmi_line))
- MCFG_PIA_IRQB_HANDLER(DEVWRITELINE("melodycpu", m6802_cpu_device, irq_line))
-
- MCFG_SOUND_ADD("melodypsg1", AY8910, XTAL_3_579545MHz/2) // CPU clock divided using 4040
- MCFG_AY8910_PORT_B_READ_CB(READ8(zac1b111xx_melody_base, melodypsg1_portb_r))
-
- MCFG_SOUND_ADD("melodypsg2", AY8910, XTAL_3_579545MHz/2) // CPU clock divided using 4040
-MACHINE_CONFIG_END
-
-
-MACHINE_CONFIG_DERIVED(zac1b11107_config, zac1b111xx_base_config)
- MCFG_CPU_MODIFY("melodycpu")
- MCFG_CPU_PROGRAM_MAP(zac1b11107_melody_map)
-
- MCFG_DEVICE_MODIFY("melodypsg1")
- MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(zac1b11107_audio_device, melodypsg1_porta_w))
- MCFG_MIXER_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.5, 0)
-
- MCFG_DEVICE_MODIFY("melodypsg2")
- MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(zac1b11107_audio_device, melodypsg2_porta_w))
- MCFG_MIXER_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.5, 0)
-MACHINE_CONFIG_END
-
-
-MACHINE_CONFIG_DERIVED(zac1b11142_config, zac1b111xx_base_config)
- MCFG_CPU_MODIFY("melodycpu")
- MCFG_CPU_PROGRAM_MAP(zac1b11142_melody_map)
-
- MCFG_DEVICE_MODIFY("melodypsg1")
- MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(zac1b11142_audio_device, ay_4g_porta_w))
- MCFG_MIXER_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.15, 0)
-
- MCFG_DEVICE_MODIFY("melodypsg2")
- MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(zac1b11142_audio_device, ay_4h_porta_w))
- MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(zac1b11142_audio_device, ay_4h_portb_w))
- MCFG_MIXER_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.15, 0)
-
- MCFG_CPU_ADD("audiocpu", M6802, XTAL_3_579545MHz) // verified on pcb
- MCFG_CPU_PROGRAM_MAP(zac1b11142_audio_map)
- MCFG_CPU_PERIODIC_INT_DRIVER(zac1b11142_audio_device, input_poll, 60)
-
- MCFG_DEVICE_ADD("pia_1i", PIA6821, 0)
- MCFG_PIA_READPA_HANDLER(DEVREAD8("speech", tms5220_device, status_r))
- MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("speech", tms5220_device, data_w))
- MCFG_PIA_WRITEPB_HANDLER(WRITE8(zac1b11142_audio_device, pia_1i_portb_w))
-
- MCFG_DAC_ADD("dac_1f")
- MCFG_MIXER_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.80, 0)
-
- // There is no xtal, the clock is obtained from a RC oscillator as shown in the TMS5220 datasheet (R=100kOhm C=22pF)
- // 162kHz measured on pin 3 20 minutes after power on, clock would then be 162.3*4=649.2kHz
- MCFG_SOUND_ADD("speech", TMS5200, 649200) // ROMCLK pin measured at 162.3Khz, OSC is exactly *4 of that)
- MCFG_TMS52XX_IRQ_HANDLER(DEVWRITELINE("pia_1i", pia6821_device, cb1_w))
- MCFG_TMS52XX_READYQ_HANDLER(DEVWRITELINE("pia_1i", pia6821_device, ca2_w))
- MCFG_MIXER_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.80, 0)
-MACHINE_CONFIG_END
-
-
-
-//**************************************************************************
-// I/O PORT DEFINITIONS
-//**************************************************************************
-
-INPUT_PORTS_START(zac1b11142_ioports)
- PORT_START("1B11142")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("P1") // test button? generates NMI on master CPU
-INPUT_PORTS_END
-
-
-
-//**************************************************************************
-// BASE MELODY GENERATOR DEVICE CLASS
-//**************************************************************************
-
-zac1b111xx_melody_base::zac1b111xx_melody_base(
- machine_config const &mconfig,
- device_type devtype,
- char const *name,
- char const *tag,
- device_t *owner,
- UINT32 clock,
- char const *shortname,
- char const *source)
- : device_t(mconfig, devtype, name, tag, owner, clock, shortname, source)
- , device_mixer_interface(mconfig, *this, 1)
- , m_melodycpu(*this, "melodycpu")
- , m_melodypia(*this, "melodypia")
- , m_melodypsg1(*this, "melodypsg1")
- , m_melodypsg2(*this, "melodypsg2")
- , m_melody_command(0)
-{
-}
-
-READ8_MEMBER(zac1b111xx_melody_base::melodypia_porta_r)
-{
- UINT8 const control = m_melodypia->b_output();
- UINT8 data = 0xff;
-
- if (0x01 == (control & 0x03))
- data &= m_melodypsg1->data_r(space, 0);
-
- if (0x04 == (control & 0x0c))
- data &= m_melodypsg2->data_r(space, 0);
-
- return data;
-}
-
-WRITE8_MEMBER(zac1b111xx_melody_base::melodypia_porta_w)
-{
- UINT8 const control = m_melodypia->b_output();
-
- if (control & 0x02)
- m_melodypsg1->data_address_w(space, (control >> 0) & 0x01, data);
-
- if (control & 0x08)
- m_melodypsg2->data_address_w(space, (control >> 2) & 0x01, data);
-}
-
-WRITE8_MEMBER(zac1b111xx_melody_base::melodypia_portb_w)
-{
- if (data & 0x02)
- m_melodypsg1->data_address_w(space, (data >> 0) & 0x01, m_melodypia->a_output());
-
- if (data & 0x08)
- m_melodypsg2->data_address_w(space, (data >> 2) & 0x01, m_melodypia->a_output());
-}
-
-READ8_MEMBER(zac1b111xx_melody_base::melodypsg1_portb_r)
-{
- return m_melody_command;
-}
-
-void zac1b111xx_melody_base::device_start()
-{
- save_item(NAME(m_melody_command));
-}
-
-void zac1b111xx_melody_base::device_reset()
-{
- m_melody_command = 0;
-}
-
-
-
-//**************************************************************************
-// 1B11107-SPECIFIC IMPLEMENTATION
-//**************************************************************************
-
-zac1b11107_audio_device::zac1b11107_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, UINT32 clock)
- : zac1b111xx_melody_base(mconfig, ZACCARIA_1B11107, "Zaccaria 1B11107 Sound Board", tag, owner, clock, "zac1b11107", __FILE__)
-{
-}
-
-WRITE8_MEMBER(zac1b11107_audio_device::sound_w)
-{
- // the sound program masks out the three most significant bits
- // assume the top two bits are not connected and read high from the internal pull-ups
- m_melodypia->ca1_w((data >> 5) & 0x01);
- m_melody_command = data | 0xc0;
-}
-
-WRITE_LINE_MEMBER(zac1b11107_audio_device::reset_w)
-{
- // TODO: there is a pulse-stretching network attached that should be simulated
- m_melodycpu->set_input_line(INPUT_LINE_RESET, state);
- // TODO: holds the reset line of m_melodypia - can't implement this in MAME at this time
- // TODO: holds the reset line of m_melodypsg1 - can't implement this in MAME at this time
- // TODO: holds the reset line of m_melodypsg2 - can't implement this in MAME at this time
-}
-
-WRITE8_MEMBER(zac1b11107_audio_device::melodypsg1_porta_w)
-{
- // similar to 1B11142
- // TODO: move this to netlist audio where it belongs, along with the rest of the filtering
- static double const table[8] = {
- RES_K(8.2),
- RES_R(820),
- RES_K(3.3),
- RES_R(150),
- RES_K(5.6),
- RES_R(390),
- RES_K(1.5),
- RES_R(47) };
- m_melodypsg2->set_volume(1, 150 * RES_VOLTAGE_DIVIDER(RES_K(4.7), table[data & 0x07]));
-}
-
-WRITE8_MEMBER(zac1b11107_audio_device::melodypsg2_porta_w)
-{
- // TODO: assume LEVELT is controlled here as is the case for 1B11142?
-}
-
-machine_config_constructor zac1b11107_audio_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME(zac1b11107_config);
-}
-
-
-
-//**************************************************************************
-// 1B11142-SPECIFIC IMPLEMENTATION
-//**************************************************************************
-
-zac1b11142_audio_device::zac1b11142_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, UINT32 clock)
- : zac1b111xx_melody_base(mconfig, ZACCARIA_1B11142, "Zaccaria 1B11142 Sound Board", tag, owner, clock, "zac1b11142", __FILE__)
- , m_acs_cb(*this)
- , m_audiocpu(*this, "audiocpu")
- , m_pia_1i(*this, "pia_1i")
- , m_speech(*this, "speech")
- , m_inputs(*this, "1B11142")
- , m_host_command(0)
-{
-}
-
-WRITE8_MEMBER(zac1b11142_audio_device::hs_w)
-{
- m_host_command = data;
- m_audiocpu->set_input_line(INPUT_LINE_IRQ0, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE);
-}
-
-READ_LINE_MEMBER(zac1b11142_audio_device::acs_r)
-{
- return (~m_pia_1i->b_output() >> 3) & 0x01;
-}
-
-WRITE_LINE_MEMBER(zac1b11142_audio_device::ressound_w)
-{
- // TODO: there is a pulse-stretching network attached that should be simulated
- m_melodycpu->set_input_line(INPUT_LINE_RESET, state);
- // TODO: holds the reset line of m_melodypia - can't implement this in MAME at this time
- // TODO: holds the reset line of m_melodypsg1 - can't implement this in MAME at this time
- // TODO: holds the reset line of m_melodypsg2 - can't implement this in MAME at this time
- m_audiocpu->set_input_line(INPUT_LINE_RESET, state);
- // TODO: holds the reset line of m_pia_1i - can't implement this in MAME at this time
- // TODO: does some funky stuff with the VDD and VSS lines on the speech chip
-}
-
-WRITE8_MEMBER(zac1b11142_audio_device::ay_4g_porta_w)
-{
- // TODO: (data & 0x07) controls tromba mix volume
- // TODO: (data & 0x08) controls cassa gate
- // TODO: (data & 0x10) controls rullante gate
-}
-
-WRITE8_MEMBER(zac1b11142_audio_device::ay_4h_porta_w)
-{
- // TODO: data & 0x01 controls LEVEL
- // TODO: data & 0x02 controls LEVELT
-}
-
-WRITE8_MEMBER(zac1b11142_audio_device::ay_4h_portb_w)
-{
- // TODO: data & 0x01 controls ANAL3 filter
-}
-
-READ8_MEMBER(zac1b11142_audio_device::host_command_r)
-{
- return m_host_command;
-}
-
-WRITE8_MEMBER(zac1b11142_audio_device::melody_command_w)
-{
- m_melodypia->ca1_w((data >> 7) & 0x01);
- m_melody_command = data;
-}
-
-WRITE8_MEMBER(zac1b11142_audio_device::pia_1i_portb_w)
-{
- m_speech->rsq_w((data >> 0) & 0x01);
- m_speech->wsq_w((data >> 1) & 0x01);
- m_acs_cb((~data >> 3) & 0x01);
- // TODO: a LED output().set_led_value(0, (data >> 4) & 0x01);
-}
-
-INTERRUPT_GEN_MEMBER(zac1b11142_audio_device::input_poll)
-{
- m_audiocpu->set_input_line(INPUT_LINE_NMI, (m_inputs->read() & 0x80) ? CLEAR_LINE : ASSERT_LINE);
-}
-
-machine_config_constructor zac1b11142_audio_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME(zac1b11142_config);
-}
-
-ioport_constructor zac1b11142_audio_device::device_input_ports() const
-{
- return INPUT_PORTS_NAME(zac1b11142_ioports);
-}
-
-void zac1b11142_audio_device::device_start()
-{
- zac1b111xx_melody_base::device_start();
-
- m_acs_cb.resolve_safe();
-
- save_item(NAME(m_host_command));
-}
-
-void zac1b11142_audio_device::device_reset()
-{
- zac1b111xx_melody_base::device_reset();
-
- m_host_command = 0;
-}
diff --git a/src/mame/audio/zaccaria.h b/src/mame/audio/zaccaria.h
deleted file mode 100644
index 1414b9d2959..00000000000
--- a/src/mame/audio/zaccaria.h
+++ /dev/null
@@ -1,135 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Vas Crabb
-#pragma once
-
-#ifndef __AUDIO_ZACCARIA_H__
-#define __AUDIO_ZACCARIA_H__
-
-#include "emu.h"
-#include "machine/6821pia.h"
-#include "machine/netlist.h"
-#include "sound/ay8910.h"
-#include "sound/tms5220.h"
-
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-extern device_type const ZACCARIA_1B11107;
-extern device_type const ZACCARIA_1B11142;
-
-
-
-//**************************************************************************
-// DEVICE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_ZACCARIA_1B11107(_tag) \
- MCFG_DEVICE_ADD(_tag, ZACCARIA_1B11107, 0)
-
-#define MCFG_ZACCARIA_1B11142(_tag) \
- MCFG_DEVICE_ADD(_tag, ZACCARIA_1B11142, 0)
-
-#define MCFG_ZACCARIA_1B11142_SET_ACS_CALLBACK(_devcb) \
- devcb = &zac1b11142_audio_device::static_set_acs_cb(*device, DEVCB_##_devcb);
-
-
-
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
-
-class zac1b111xx_melody_base : public device_t, public device_mixer_interface
-{
-public:
- zac1b111xx_melody_base(
- machine_config const &mconfig,
- device_type devtype,
- char const *name,
- char const *tag,
- device_t *owner,
- UINT32 clock,
- char const *shortname,
- char const *source);
-
- DECLARE_READ8_MEMBER(melodypia_porta_r);
- DECLARE_WRITE8_MEMBER(melodypia_porta_w);
- DECLARE_WRITE8_MEMBER(melodypia_portb_w);
- DECLARE_READ8_MEMBER(melodypsg1_portb_r);
-
-protected:
- virtual void device_start() override;
- virtual void device_reset() override;
-
- required_device<cpu_device> m_melodycpu;
- required_device<pia6821_device> m_melodypia;
- required_device<ay8910_device> m_melodypsg1;
- required_device<ay8910_device> m_melodypsg2;
-
- UINT8 m_melody_command;
-};
-
-
-class zac1b11107_audio_device : public zac1b111xx_melody_base
-{
-public:
- zac1b11107_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, UINT32 clock);
-
- // host interface
- DECLARE_WRITE8_MEMBER(sound_w);
- DECLARE_WRITE_LINE_MEMBER(reset_w);
-
- // PSG output handlers
- DECLARE_WRITE8_MEMBER(melodypsg1_porta_w);
- DECLARE_WRITE8_MEMBER(melodypsg2_porta_w);
-
-protected:
- virtual machine_config_constructor device_mconfig_additions() const override;
-};
-
-
-class zac1b11142_audio_device : public zac1b111xx_melody_base
-{
-public:
- template<class _Object> static devcb_base &static_set_acs_cb(device_t &device, _Object object)
- { return downcast<zac1b11142_audio_device &>(device).m_acs_cb.set_callback(object); }
-
- zac1b11142_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, UINT32 clock);
-
- // host interface
- DECLARE_WRITE8_MEMBER(hs_w);
- DECLARE_READ_LINE_MEMBER(acs_r);
- DECLARE_WRITE_LINE_MEMBER(ressound_w);
-
- // melody section handlers
- DECLARE_WRITE8_MEMBER(ay_4g_porta_w);
- DECLARE_WRITE8_MEMBER(ay_4h_porta_w);
- DECLARE_WRITE8_MEMBER(ay_4h_portb_w);
-
- // master audio section handlers
- DECLARE_READ8_MEMBER(host_command_r);
- DECLARE_WRITE8_MEMBER(melody_command_w);
- DECLARE_WRITE8_MEMBER(pia_1i_portb_w);
-
- // input ports don't push
- INTERRUPT_GEN_MEMBER(input_poll);
-
-protected:
- virtual machine_config_constructor device_mconfig_additions() const override;
- virtual ioport_constructor device_input_ports() const override;
- virtual void device_start() override;
- virtual void device_reset() override;
-
- devcb_write_line m_acs_cb;
-
- required_device<cpu_device> m_audiocpu;
- required_device<pia6821_device> m_pia_1i;
- required_device<tms5220_device> m_speech;
-
- required_ioport m_inputs;
-
- UINT8 m_host_command;
-};
-
-#endif // __AUDIO_ZACCARIA_H__ \ No newline at end of file
diff --git a/src/mame/drivers/1943.cpp b/src/mame/drivers/1943.cpp
index 4b64f9dae53..c91260a9b63 100644
--- a/src/mame/drivers/1943.cpp
+++ b/src/mame/drivers/1943.cpp
@@ -694,6 +694,7 @@ ROM_START( 1943kai )
ROM_LOAD( "bm6.4b", 0x0b00, 0x0100, CRC(0eaf5158) SHA1(bafd4108708f66cd7b280e47152b108f3e254fc9) ) /* video timing (not used) */
ROM_END
+
ROM_START( 1943b )
ROM_REGION( 0x30000, "maincpu", 0 ) /* 64k for code + 128k for the banked ROMs images */
ROM_LOAD( "1.12d", 0x00000, 0x08000, CRC(9a2d70ab) SHA1(6f84e906656f132ffcb63022f6d067580d261431) ) // protection patched out, disclaimer patched out
@@ -745,64 +746,6 @@ ROM_START( 1943b )
ROM_LOAD( "bm6.4b", 0x0b00, 0x0100, CRC(0eaf5158) SHA1(bafd4108708f66cd7b280e47152b108f3e254fc9) ) /* video timing (not used) */
ROM_END
-ROM_START( 1943bj )
- ROM_REGION( 0x30000, "maincpu", 0 ) /* 64k for code + 128k for the banked ROMs images */
- ROM_LOAD( "mkb03.12d", 0x00000, 0x08000, CRC(b3b7c7cd) SHA1(6197023f4384fd2ac72b686c26a6ff2877345b61) ) // protection patched out
- ROM_LOAD( "bm02.13d", 0x10000, 0x10000, CRC(af971575) SHA1(af1d8ce73e8671b7b41248ce6486c9b5aaf6a233) )
- ROM_LOAD( "bm03.14d", 0x20000, 0x10000, CRC(300ec713) SHA1(f66d2356b413a418c887b4085a5315475c7a8bba) )
-
- ROM_REGION( 0x10000, "audiocpu", 0 )
- ROM_LOAD( "bm04.5h", 0x00000, 0x8000, CRC(ee2bd2d7) SHA1(4d2d019a9f8452fbbb247e893280568a2e86073e) )
-
- ROM_REGION( 0x8000, "gfx1", 0 )
- ROM_LOAD( "bm05.4k", 0x00000, 0x8000, CRC(46cb9d3d) SHA1(96fd0e714b91fe13a2ca0d185ada9e4b4baa0c0b) ) /* characters */
-
- ROM_REGION( 0x40000, "gfx2", 0 )
- /* double size roms - same gfx different layout */
- ROM_LOAD( "mkb12.12f", 0x00000, 0x8000, CRC(075e9a7f) SHA1(2b826d6d202d37cff1aeb58f225e70be7ba9a206) ) /* bg tiles */
- ROM_CONTINUE( 0x10000, 0x08000 )
- ROM_LOAD( "mkb11.14f", 0x08000, 0x8000, CRC(05aca09a) SHA1(21cc251e61343be27e969885b013fa6e8b5aa210) )
- ROM_CONTINUE( 0x18000, 0x08000 )
- ROM_LOAD( "mkb09.12j", 0x20000, 0x8000, CRC(0f4b7e0e) SHA1(1dd2a4a78ab45bb122895e5a0961e527f77713d1) )
- ROM_CONTINUE( 0x30000, 0x08000 )
- ROM_LOAD( "mkb10.14j", 0x28000, 0x8000, CRC(61a90c0a) SHA1(8aae483e51d645d9e4d2604dbca432c13a3e8d0d) )
- ROM_CONTINUE( 0x38000, 0x08000 )
-
- ROM_REGION( 0x10000, "gfx3", 0 )
- ROM_LOAD( "mkb08.14k", 0x00000, 0x8000, CRC(798215e3) SHA1(1c732b60cd430aa0acd1698b4fe1984385223b28) ) /* fg tiles */
- ROM_LOAD( "bm25.14l", 0x08000, 0x8000, CRC(092cf9c1) SHA1(19fe3c714b1d52cbb21dea25cdee5af841f525db) )
-
- ROM_REGION( 0x40000, "gfx4", 0 )
- ROM_LOAD( "bm06.10a", 0x00000, 0x8000, CRC(97acc8af) SHA1(c9fa07cb61f6905408b355edabfe453fb652ff0d) ) /* sprites */
- ROM_LOAD( "bm07.11a", 0x08000, 0x8000, CRC(d78f7197) SHA1(6367c7e80e80d4a0d33d7840b5c843c63c80123e) )
- ROM_LOAD( "bm08.12a", 0x10000, 0x8000, CRC(1a626608) SHA1(755c27a07728fd686168e9d9e4dee3d8f274892a) )
- ROM_LOAD( "bm09.14a", 0x18000, 0x8000, CRC(92408400) SHA1(3ab299bad1ba115efead53ebd92254abe7a092ba) )
- ROM_LOAD( "bm10.10c", 0x20000, 0x8000, CRC(8438a44a) SHA1(873629b00cf3f6d8976a7fdafe63cd16e47b7491) )
- ROM_LOAD( "bm11.11c", 0x28000, 0x8000, CRC(6c69351d) SHA1(c213d5c3e76a5749bc32539604716dcef6dcb694) )
- ROM_LOAD( "bm12.12c", 0x30000, 0x8000, CRC(5e7efdb7) SHA1(fef271a38dc1a9e45a0c6e27e28e713c77c8f8c9) )
- ROM_LOAD( "bm13.14c", 0x38000, 0x8000, CRC(1143829a) SHA1(2b3a65e354a205c05a87f783e9938b64bc62396f) )
-
- ROM_REGION( 0x10000, "gfx5", 0 ) /* tilemaps */
- /* front background */
- ROM_LOAD( "bm14.5f", 0x0000, 0x8000, CRC(4d3c6401) SHA1(ce4f6dbf8fa030ad45cbb5afd58df27fed2d4618) )
- /* back background probably same gfx different layout */
- ROM_LOAD( "mkb07.8k", 0xc000, 0x4000, CRC(ae1b317f) SHA1(d311c198d77ec932d776427e2ebfffe90e5330c3) )
- ROM_CONTINUE( 0x8000, 0x4000 )
-
- ROM_REGION( 0x0c00, "proms", 0 )
- ROM_LOAD( "bm1.12a", 0x0000, 0x0100, CRC(74421f18) SHA1(5b8b59f6f4e5ad358611de50608f47f41a5b0e51) ) /* red component */
- ROM_LOAD( "bm2.13a", 0x0100, 0x0100, CRC(ac27541f) SHA1(1796c4c9041dfe28e6319576f21df1dbcb8d12bf) ) /* green component */
- ROM_LOAD( "bm3.14a", 0x0200, 0x0100, CRC(251fb6ff) SHA1(d1118159b3d429d841e4efa938728ebedadd7ec5) ) /* blue component */
- ROM_LOAD( "bm5.7f", 0x0300, 0x0100, CRC(206713d0) SHA1(fa609f6d675af18c379838583505724d28bcff0e) ) /* char lookup table */
- ROM_LOAD( "bm10.7l", 0x0400, 0x0100, CRC(33c2491c) SHA1(13da924e4b182759c4aae49034f3a7cbe556ea65) ) /* foreground lookup table */
- ROM_LOAD( "bm9.6l", 0x0500, 0x0100, CRC(aeea4af7) SHA1(98f4570ee061e9aa58d8ed2d2f8ae59ce2ec5795) ) /* foreground palette bank */
- ROM_LOAD( "bm12.12m", 0x0600, 0x0100, CRC(c18aa136) SHA1(684f04d9a5b94ae1db5fb95763e65271f4cf8e01) ) /* background lookup table */
- ROM_LOAD( "bm11.12l", 0x0700, 0x0100, CRC(405aae37) SHA1(94a06f81b775c4e49d57d42fc064d3072a253bbd) ) /* background palette bank */
- ROM_LOAD( "bm8.8c", 0x0800, 0x0100, CRC(c2010a9e) SHA1(be9852500209066e2f0ff2770e0c217d1636a0b5) ) /* sprite lookup table */
- ROM_LOAD( "bm7.7c", 0x0900, 0x0100, CRC(b56f30c3) SHA1(9f5e6db464d21457a33ec8bdfdff069632b791db) ) /* sprite palette bank */
- ROM_LOAD( "bm4.12c", 0x0a00, 0x0100, CRC(91a8a2e1) SHA1(9583c87eff876f04bc2ccf7218cd8081f1bcdb94) ) /* priority encoder / palette selector (not used) */
- ROM_LOAD( "bm6.4b", 0x0b00, 0x0100, CRC(0eaf5158) SHA1(bafd4108708f66cd7b280e47152b108f3e254fc9) ) /* video timing (not used) */
-ROM_END
DRIVER_INIT_MEMBER(_1943_state,1943)
{
@@ -824,5 +767,4 @@ GAME( 1987, 1943ua, 1943, 1943, 1943, _1943_state, 1943, ROT270, "Capcom"
GAME( 1987, 1943j, 1943, 1943, 1943, _1943_state, 1943, ROT270, "Capcom", "1943: Midway Kaisen (Japan, Rev B)", MACHINE_SUPPORTS_SAVE )
GAME( 1987, 1943ja, 1943, 1943, 1943, _1943_state, 1943, ROT270, "Capcom", "1943: Midway Kaisen (Japan)", MACHINE_SUPPORTS_SAVE )
GAME( 1987, 1943b, 1943, 1943, 1943, _1943_state, 1943b,ROT270, "bootleg", "1943: Battle of Midway (bootleg, hack of Japan set)", MACHINE_SUPPORTS_SAVE )
-GAME( 1987, 1943bj, 1943, 1943, 1943, _1943_state, 1943b,ROT270, "bootleg", "1943: Midway Kaisen (bootleg)", MACHINE_SUPPORTS_SAVE )
GAME( 1987, 1943kai, 0, 1943, 1943, _1943_state, 1943, ROT270, "Capcom", "1943 Kai: Midway Kaisen (Japan)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/1945kiii.cpp b/src/mame/drivers/1945kiii.cpp
index 93b649814e9..55b4b8c6ee3 100644
--- a/src/mame/drivers/1945kiii.cpp
+++ b/src/mame/drivers/1945kiii.cpp
@@ -2,8 +2,6 @@
// copyright-holders:David Haywood
/*
-what is this HW cloned from? I doubt it's an original design
-
1945 K-3 driver
---------------
@@ -56,8 +54,8 @@ class k3_state : public driver_device
public:
k3_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
- m_oki2(*this, "oki2"),
- m_oki1(*this, "oki1") ,
+ m_oki1(*this, "oki1"),
+ m_oki2(*this, "oki2") ,
m_spriteram_1(*this, "spritera1"),
m_spriteram_2(*this, "spritera2"),
m_bgram(*this, "bgram"),
@@ -66,8 +64,8 @@ public:
m_palette(*this, "palette") { }
/* devices */
- optional_device<okim6295_device> m_oki2;
required_device<okim6295_device> m_oki1;
+ required_device<okim6295_device> m_oki2;
/* memory pointers */
required_shared_ptr<UINT16> m_spriteram_1;
required_shared_ptr<UINT16> m_spriteram_2;
@@ -80,7 +78,6 @@ public:
DECLARE_WRITE16_MEMBER(k3_scrollx_w);
DECLARE_WRITE16_MEMBER(k3_scrolly_w);
DECLARE_WRITE16_MEMBER(k3_soundbanks_w);
- DECLARE_WRITE16_MEMBER(flagrall_soundbanks_w);
TILE_GET_INFO_MEMBER(get_k3_bg_tile_info);
virtual void machine_start() override;
virtual void video_start() override;
@@ -106,7 +103,7 @@ TILE_GET_INFO_MEMBER(k3_state::get_k3_bg_tile_info)
void k3_state::video_start()
{
- m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k3_state::get_k3_bg_tile_info),this), TILEMAP_SCAN_ROWS, 16, 16, 32, 32);
+ m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k3_state::get_k3_bg_tile_info),this), TILEMAP_SCAN_ROWS, 16, 16, 32, 64);
}
void k3_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect)
@@ -154,71 +151,31 @@ WRITE16_MEMBER(k3_state::k3_scrolly_w)
WRITE16_MEMBER(k3_state::k3_soundbanks_w)
{
- m_oki2->set_bank_base((data & 4) ? 0x40000 : 0);
- m_oki1->set_bank_base((data & 2) ? 0x40000 : 0);
+ m_oki1->set_bank_base((data & 4) ? 0x40000 : 0);
+ m_oki2->set_bank_base((data & 2) ? 0x40000 : 0);
}
-WRITE16_MEMBER(k3_state::flagrall_soundbanks_w)
-{
-
- data &= mem_mask;
-
- // 0x0200 on startup
- // 0x0100 on startup
-
- // 0x80 - ?
- // 0x40 - ?
- // 0x20 - toggles, might trigger vram -> buffer transfer?
- // 0x10 - unknown, always on?
- // 0x08 - ?
- // 0x06 - oki bank
- // 0x01 - ?
-
- if (data & 0xfcc9)
- popmessage("unk control %04x", data & 0xfcc9);
-
- m_oki1->set_bank_base(0x40000 * ((data & 0x6)>>1) );
-
-}
-
-
-static ADDRESS_MAP_START( k3_base_map, AS_PROGRAM, 16, k3_state )
- AM_RANGE(0x0009ce, 0x0009cf) AM_WRITENOP // k3 - bug in code? (clean up log)
- AM_RANGE(0x0009d2, 0x0009d3) AM_WRITENOP // l3 - bug in code? (clean up log)
+static ADDRESS_MAP_START( k3_map, AS_PROGRAM, 16, k3_state )
+ AM_RANGE(0x0009ce, 0x0009cf) AM_WRITENOP // bug in code? (clean up log)
+ AM_RANGE(0x0009d2, 0x0009d3) AM_WRITENOP // bug in code? (clean up log)
AM_RANGE(0x000000, 0x0fffff) AM_ROM // ROM
AM_RANGE(0x100000, 0x10ffff) AM_RAM // Main Ram
AM_RANGE(0x200000, 0x200fff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette")
AM_RANGE(0x240000, 0x240fff) AM_RAM AM_SHARE("spritera1")
AM_RANGE(0x280000, 0x280fff) AM_RAM AM_SHARE("spritera2")
- AM_RANGE(0x2c0000, 0x2c07ff) AM_RAM_WRITE(k3_bgram_w) AM_SHARE("bgram")
- AM_RANGE(0x2c0800, 0x2c0fff) AM_RAM // or does k3 have a bigger tilemap? (flagrall is definitely 32x32 tiles)
+ AM_RANGE(0x2c0000, 0x2c0fff) AM_RAM_WRITE(k3_bgram_w) AM_SHARE("bgram")
AM_RANGE(0x340000, 0x340001) AM_WRITE(k3_scrollx_w)
AM_RANGE(0x380000, 0x380001) AM_WRITE(k3_scrolly_w)
+ AM_RANGE(0x3c0000, 0x3c0001) AM_WRITE(k3_soundbanks_w)
AM_RANGE(0x400000, 0x400001) AM_READ_PORT("INPUTS")
AM_RANGE(0x440000, 0x440001) AM_READ_PORT("SYSTEM")
AM_RANGE(0x480000, 0x480001) AM_READ_PORT("DSW")
+ AM_RANGE(0x4c0000, 0x4c0001) AM_DEVREADWRITE8("oki2", okim6295_device, read, write, 0xff00)
+ AM_RANGE(0x500000, 0x500001) AM_DEVREADWRITE8("oki1", okim6295_device, read, write, 0xff00)
+ AM_RANGE(0x8c0000, 0x8cffff) AM_RAM // not used?
ADDRESS_MAP_END
-static ADDRESS_MAP_START( k3_map, AS_PROGRAM, 16, k3_state )
- AM_IMPORT_FROM( k3_base_map )
-
- AM_RANGE(0x3c0000, 0x3c0001) AM_WRITE(k3_soundbanks_w)
-
- AM_RANGE(0x4c0000, 0x4c0001) AM_DEVREADWRITE8("oki1", okim6295_device, read, write, 0xff00)
- AM_RANGE(0x500000, 0x500001) AM_DEVREADWRITE8("oki2", okim6295_device, read, write, 0xff00)
- AM_RANGE(0x8c0000, 0x8cffff) AM_RAM // not used? (bug in code?)
-ADDRESS_MAP_END
-
-
-static ADDRESS_MAP_START( flagrall_map, AS_PROGRAM, 16, k3_state )
- AM_IMPORT_FROM( k3_base_map )
-
- AM_RANGE(0x3c0000, 0x3c0001) AM_WRITE(flagrall_soundbanks_w)
- AM_RANGE(0x4c0000, 0x4c0001) AM_DEVREADWRITE8("oki1", okim6295_device, read, write, 0x00ff)
-ADDRESS_MAP_END
-
-
static INPUT_PORTS_START( k3 )
PORT_START("INPUTS")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
@@ -281,81 +238,18 @@ static INPUT_PORTS_START( k3 )
INPUT_PORTS_END
-static INPUT_PORTS_START( flagrall )
- PORT_START("INPUTS")
- PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
- PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
- PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
- PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
- PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
- PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
- PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
-
- PORT_START("SYSTEM")
- PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
-
- PORT_START("DSW")
- PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:1,2")
- PORT_DIPSETTING( 0x0000, DEF_STR( 3C_1C ) )
- PORT_DIPSETTING( 0x0001, DEF_STR( 2C_1C ) )
- PORT_DIPSETTING( 0x0003, DEF_STR( 1C_1C ) )
- PORT_DIPSETTING( 0x0002, DEF_STR( 1C_2C ) )
- PORT_DIPUNUSED_DIPLOC( 0x0004, IP_ACTIVE_LOW, "SW1:3" )
- PORT_DIPUNUSED_DIPLOC( 0x0008, IP_ACTIVE_LOW, "SW1:4" )
- PORT_DIPNAME( 0x0010, 0x0000, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:5")
- PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0020, 0x0020, "Dip Control" ) PORT_DIPLOCATION("SW1:6")
- PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPUNUSED_DIPLOC( 0x0040, IP_ACTIVE_LOW, "SW1:7" )
- PORT_DIPNAME( 0x0080, 0x0080, "Picture Test" ) PORT_DIPLOCATION("SW1:8")
- PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
-
- PORT_DIPNAME( 0x0300, 0x0300, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1,2")
- PORT_DIPSETTING( 0x0200, "1" )
- PORT_DIPSETTING( 0x0100, "2" )
- PORT_DIPSETTING( 0x0300, "3" )
- PORT_DIPSETTING( 0x0000, "5" )
- PORT_DIPNAME( 0x0400, 0x0400, "Bonus Type" ) PORT_DIPLOCATION("SW2:3")
- PORT_DIPSETTING ( 0x0400, "0" )
- PORT_DIPSETTING( 0x0000, "1" )
- PORT_DIPUNUSED_DIPLOC( 0x0800, IP_ACTIVE_LOW, "SW2:4" )
- PORT_DIPNAME( 0x3000, 0x3000, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:5,6")
- PORT_DIPSETTING( 0x0000, DEF_STR( Very_Hard ) )
- PORT_DIPSETTING( 0x1000, DEF_STR( Hard ) )
- PORT_DIPSETTING( 0x2000, DEF_STR( Easy ) )
- PORT_DIPSETTING( 0x3000, DEF_STR( Normal ) )
- PORT_DIPUNUSED_DIPLOC( 0x4000, IP_ACTIVE_LOW, "SW2:7" )
- PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW2:8")
- PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
-INPUT_PORTS_END
-
-
static const gfx_layout k3_layout =
{
16,16,
RGN_FRAC(1,1),
8,
{ 0,1,2,3,4,5,6,7 },
- { 0*8,1*8,2*8,3*8,4*8,5*8,6*8,7*8,8*8,9*8,10*8,11*8,12*8,13*8,14*8,15*8 },
- { 0*128, 1*128, 2*128, 3*128, 4*128, 5*128, 6*128, 7*128, 8*128, 9*128, 10*128, 11*128, 12*128, 13*128, 14*128, 15*128 },
- 16*128,
+ { 0,8,16,24,32,40,48,56, 64, 72, 80, 88, 96, 104, 112, 120 },
+ { 0*128, 1*128, 2*128, 3*128, 4*128, 5*128, 6*128, 7*128,
+ 8*128, 9*128,10*128,11*128,12*128,13*128,14*128,15*128 },
+ 16*128
};
-
static GFXDECODE_START( 1945kiii )
GFXDECODE_ENTRY( "gfx1", 0, k3_layout, 0x0, 2 ) /* bg tiles */
GFXDECODE_ENTRY( "gfx2", 0, k3_layout, 0x0, 2 ) /* bg tiles */
@@ -366,19 +260,20 @@ void k3_state::machine_start()
{
}
-static MACHINE_CONFIG_START( flagrall, k3_state )
+static MACHINE_CONFIG_START( k3, k3_state )
- MCFG_CPU_ADD("maincpu", M68000, MASTER_CLOCK ) // ?
- MCFG_CPU_PROGRAM_MAP(flagrall_map)
+ MCFG_CPU_ADD("maincpu", M68000, MASTER_CLOCK)
+ MCFG_CPU_PROGRAM_MAP(k3_map)
MCFG_CPU_VBLANK_INT_DRIVER("screen", k3_state, irq4_line_hold)
+
MCFG_GFXDECODE_ADD("gfxdecode", "palette", 1945kiii)
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60)
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(64*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 30*8-1)
+ MCFG_SCREEN_SIZE(64*8, 64*8)
+ MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 28*8-1)
MCFG_SCREEN_UPDATE_DRIVER(k3_state, screen_update_k3)
MCFG_SCREEN_PALETTE("palette")
@@ -389,19 +284,9 @@ static MACHINE_CONFIG_START( flagrall, k3_state )
MCFG_OKIM6295_ADD("oki1", MASTER_CLOCK/16, OKIM6295_PIN7_HIGH) /* dividers? */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
-
-
-static MACHINE_CONFIG_DERIVED( k3, flagrall )
-
- MCFG_CPU_MODIFY("maincpu")
- MCFG_CPU_PROGRAM_MAP(k3_map)
MCFG_OKIM6295_ADD("oki2", MASTER_CLOCK/16, OKIM6295_PIN7_HIGH) /* dividers? */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 28*8-1)
MACHINE_CONFIG_END
@@ -411,10 +296,10 @@ ROM_START( 1945kiii )
ROM_LOAD16_BYTE( "prg-1.u51", 0x00001, 0x80000, CRC(6b345f27) SHA1(60867fa0e2ea7ebdd4b8046315ee0c83e5cf0d74) )
ROM_LOAD16_BYTE( "prg-2.u52", 0x00000, 0x80000, CRC(ce09b98c) SHA1(a06bb712b9cf2249cc535de4055b14a21c68e0c5) )
- ROM_REGION( 0x080000, "oki2", 0 ) /* Samples */
+ ROM_REGION( 0x080000, "oki1", 0 ) /* Samples */
ROM_LOAD( "snd-2.su4", 0x00000, 0x80000, CRC(47e3952e) SHA1(d56524621a3f11981e4434e02f5fdb7e89fff0b4) )
- ROM_REGION( 0x080000, "oki1", 0 ) /* Samples */
+ ROM_REGION( 0x080000, "oki2", 0 ) /* Samples */
ROM_LOAD( "snd-1.su7", 0x00000, 0x80000, CRC(bbb7f0ff) SHA1(458cf3a0c2d42110bc2427db675226c6b8d30999) )
ROM_REGION( 0x400000, "gfx1", 0 ) // sprites
@@ -425,32 +310,4 @@ ROM_START( 1945kiii )
ROM_LOAD( "m16m-3.u61", 0x00000, 0x200000, CRC(32fc80dd) SHA1(bee32493a250e9f21997114bba26b9535b1b636c) )
ROM_END
-ROM_START( flagrall )
- ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 Code */
- ROM_LOAD16_BYTE( "11_u34.bin", 0x00001, 0x40000, CRC(24dd439d) SHA1(88857ad5ed69f29de86702dcc746d35b69b3b93d) )
- ROM_LOAD16_BYTE( "12_u35.bin", 0x00000, 0x40000, CRC(373b71a5) SHA1(be9ab93129e2ffd9bfe296c341dbdf47f1949ac7) )
-
- ROM_REGION( 0x100000, "oki1", 0 ) /* Samples */
- // 3x banks
- ROM_LOAD( "13_su4.bin", 0x00000, 0x80000, CRC(7b0630b3) SHA1(c615e6630ffd12c122762751c25c249393bf7abd) )
- ROM_LOAD( "14_su6.bin", 0x80000, 0x40000, CRC(593b038f) SHA1(b00dcf321fe541ee52c34b79e69c44f3d7a9cd7c) )
-
- ROM_REGION( 0x300000, "gfx1", 0 )
- ROM_LOAD32_BYTE( "1_u5.bin", 0x000000, 0x080000, CRC(9377704b) SHA1(ac516a8ba6d1a70086469504c2a46d47a1f4560b) )
- ROM_LOAD32_BYTE( "5_u6.bin", 0x000001, 0x080000, CRC(1ac0bd0c) SHA1(ab71bb84e61f5c7168601695f332a8d4a30d9948) )
- ROM_LOAD32_BYTE( "2_u7.bin", 0x000002, 0x080000, CRC(5f6db2b3) SHA1(84caa019d3b75be30a14d19ccc2f28e5e94028bd) )
- ROM_LOAD32_BYTE( "6_u8.bin", 0x000003, 0x080000, CRC(79e4643c) SHA1(274f2741f39c63e32f49c6a1a72ded1263bdcdaa) )
-
- ROM_LOAD32_BYTE( "3_u58.bin", 0x200000, 0x040000, CRC(c913df7d) SHA1(96e89ecb9e5f4d596d71d7ba35af7b2af4670342) )
- ROM_LOAD32_BYTE( "4_u59.bin", 0x200001, 0x040000, CRC(cb192384) SHA1(329b4c1a4dc388d9f4ce063f9a54cbf3b967682a) )
- ROM_LOAD32_BYTE( "7_u60.bin", 0x200002, 0x040000, CRC(f187a7bf) SHA1(f4ce9ac9fe376250fe426de6ee404fc7841ef08a) )
- ROM_LOAD32_BYTE( "8_u61.bin", 0x200003, 0x040000, CRC(b73fa441) SHA1(a5a3533563070c870276ead5e2f9cb9aaba303cc))
-
- ROM_REGION( 0x100000, "gfx2", 0 )
- ROM_LOAD( "10_u102.bin", 0x00000, 0x80000, CRC(b1fd3279) SHA1(4a75581e13d43bef441ce81eae518c2f6bc1d5f8) )
- ROM_LOAD( "9_u103.bin", 0x80000, 0x80000, CRC(01e6d654) SHA1(821d61a5b16f5cb76e2a805c8504db1ef38c3a48) )
-ROM_END
-
-
-GAME( 2000, 1945kiii, 0, k3, k3, driver_device, 0, ROT270, "Oriental Soft", "1945k III", MACHINE_SUPPORTS_SAVE )
-GAME( 1996?,flagrall, 0, flagrall, flagrall, driver_device, 0, ROT0, "<unknown>", "'96 Flag Rally", MACHINE_SUPPORTS_SAVE )
+GAME( 2000, 1945kiii, 0, k3, k3, driver_device, 0, ROT270, "Oriental Soft", "1945k III", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/8080bw.cpp b/src/mame/drivers/8080bw.cpp
index 4df457ce129..4dfeab5b92c 100644
--- a/src/mame/drivers/8080bw.cpp
+++ b/src/mame/drivers/8080bw.cpp
@@ -4793,7 +4793,7 @@ GAME( 1979, moonbasea, invadpt2, invadpt2, invadpt2, driver_device, 0, ROT270
GAME( 1980, spclaser, 0, invadpt2, spclaser, driver_device, 0, ROT270, "Taito", "Space Laser", MACHINE_WRONG_COLORS | MACHINE_SUPPORTS_SAVE )
GAME( 1980, intruder, spclaser, invadpt2, spclaser, driver_device, 0, ROT270, "Taito (Game Plan license)", "Intruder", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND )
-GAME( 1980, laser, spclaser, invadpt2, spclaser, driver_device, 0, ROT270, "bootleg (Leisure Time Electronics)", "Astro Laser (bootleg of Space Laser)", MACHINE_WRONG_COLORS | MACHINE_SUPPORTS_SAVE )
+GAME( 1980, laser, spclaser, invadpt2, spclaser, driver_device, 0, ROT270, "bootleg (Leisure Time Electronics Inc.)", "Astro Laser (bootleg of Space Laser)", MACHINE_WRONG_COLORS | MACHINE_SUPPORTS_SAVE )
GAME( 1979, spcewarl, spclaser, invadpt2, spclaser, driver_device, 0, ROT270, "Leijac Corporation", "Space War (Leijac Corporation)", MACHINE_WRONG_COLORS | MACHINE_SUPPORTS_SAVE ) // Taito's version is actually a spin-off of this?
GAME( 1979, lrescue, 0, lrescue, lrescue, driver_device, 0, ROT270, "Taito", "Lunar Rescue", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND )
diff --git a/src/mame/drivers/adam.cpp b/src/mame/drivers/adam.cpp
index 4369295343b..a52eb37e567 100644
--- a/src/mame/drivers/adam.cpp
+++ b/src/mame/drivers/adam.cpp
@@ -1067,7 +1067,7 @@ static MACHINE_CONFIG_START( adam, adam_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD(SN76489A_TAG, SN76489A, XTAL_7_15909MHz/2)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
- MCFG_SN76496_READY_HANDLER(INPUTLINE(Z80_TAG, Z80_INPUT_LINE_BOGUSWAIT))
+ MCFG_SN76496_READY_HANDLER(INPUTLINE(Z80_TAG, Z80_INPUT_LINE_WAIT))
// devices
MCFG_ADAMNET_BUS_ADD()
diff --git a/src/mame/drivers/aerofgt.cpp b/src/mame/drivers/aerofgt.cpp
index af333697ce9..8cfd233520d 100644
--- a/src/mame/drivers/aerofgt.cpp
+++ b/src/mame/drivers/aerofgt.cpp
@@ -1521,8 +1521,8 @@ static MACHINE_CONFIG_START( karatblzbl, aerofgt_state )
MCFG_CPU_ADD("audiocpu",Z80,8000000/2) /* 4 MHz ??? */
MCFG_CPU_PROGRAM_MAP(karatblzbl_sound_map)
- MCFG_MACHINE_START_OVERRIDE(aerofgt_state,common)
- MCFG_MACHINE_RESET_OVERRIDE(aerofgt_state,common)
+// MCFG_MACHINE_START_OVERRIDE(aerofgt_state,aerofgt)
+// MCFG_MACHINE_RESET_OVERRIDE(aerofgt_state,aerofgt)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1552,7 +1552,7 @@ static MACHINE_CONFIG_START( karatblzbl, aerofgt_state )
MCFG_VIDEO_START_OVERRIDE(aerofgt_state,karatblz)
/* sound hardware */
- //MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") // breaks savestate
+ MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
// NEC D7759c + YM????
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/amazonlf.cpp b/src/mame/drivers/amazonlf.cpp
deleted file mode 100644
index 129af7c3631..00000000000
--- a/src/mame/drivers/amazonlf.cpp
+++ /dev/null
@@ -1,91 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:David Haywood
-/*
-
- uses ADC 'Amazon-LF' SoC, EISC CPU core - similar to crystal system?
-
-*/
-
-#include "emu.h"
-#include "cpu/se3208/se3208.h"
-
-
-class amazonlf_state : public driver_device
-{
-public:
- amazonlf_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_screen(*this, "screen")
- { }
-
- /* devices */
- required_device<cpu_device> m_maincpu;
- required_device<screen_device> m_screen;
-
-
- virtual void machine_start() override;
- virtual void machine_reset() override;
- UINT32 screen_update_amazonlf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- void screen_eof_amazonlf(screen_device &screen, bool state);
-};
-
-static ADDRESS_MAP_START( amazonlf_mem, AS_PROGRAM, 32, amazonlf_state )
- AM_RANGE(0x00000000, 0x0007ffff) AM_ROM
-ADDRESS_MAP_END
-
-void amazonlf_state::machine_start()
-{
-}
-
-void amazonlf_state::machine_reset()
-{
-}
-
-UINT32 amazonlf_state::screen_update_amazonlf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
-{
- return 0;
-}
-
-void amazonlf_state::screen_eof_amazonlf(screen_device &screen, bool state)
-{
-}
-
-
-static INPUT_PORTS_START(amazonlf)
-
-INPUT_PORTS_END
-
-
-
-
-
-static MACHINE_CONFIG_START( amazonlf, amazonlf_state )
-
- MCFG_CPU_ADD("maincpu", SE3208, 25175000) // ?
- MCFG_CPU_PROGRAM_MAP(amazonlf_mem)
-
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(640, 480)
- MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 479)
- MCFG_SCREEN_UPDATE_DRIVER(amazonlf_state, screen_update_amazonlf)
- MCFG_SCREEN_VBLANK_DRIVER(amazonlf_state, screen_eof_amazonlf)
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_PALETTE_ADD_RRRRRGGGGGGBBBBB("palette")
-MACHINE_CONFIG_END
-
-
-ROM_START( crospuzl )
- ROM_REGION( 0x80010, "maincpu", 0 )
- ROM_LOAD("en29lv040a.u5", 0x000000, 0x80010, CRC(d50e8500) SHA1(d681cd18cd0e48854c24291d417d2d6d28fe35c1) )
-
- ROM_REGION32_LE( 0x8400010, "user1", ROMREGION_ERASEFF ) // Flash
- // mostly empty, but still looks good
- ROM_LOAD("k9f1g08u0a.riser", 0x000000, 0x8400010, CRC(7f3c88c3) SHA1(db3169a7b4caab754e9d911998a2ece13c65ce5b) )
-ROM_END
-
-
-GAME( 200?, crospuzl, 0, amazonlf, amazonlf, driver_device, 0, ROT0, "<unknown>", "Cross Puzzle", MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
diff --git a/src/mame/drivers/amiga.cpp b/src/mame/drivers/amiga.cpp
index f89e0536569..edca3b6b9b9 100644
--- a/src/mame/drivers/amiga.cpp
+++ b/src/mame/drivers/amiga.cpp
@@ -103,9 +103,6 @@ public:
DECLARE_DRIVER_INIT( pal );
DECLARE_DRIVER_INIT( ntsc );
- DECLARE_WRITE_LINE_MEMBER( side_int2_w );
- DECLARE_WRITE_LINE_MEMBER( side_int6_w );
-
protected:
virtual void machine_reset() override;
@@ -619,18 +616,6 @@ void a500_state::machine_reset()
m_side->reset();
}
-WRITE_LINE_MEMBER( a500_state::side_int2_w )
-{
- m_side_int2 = state;
- update_int2();
-}
-
-WRITE_LINE_MEMBER( a500_state::side_int6_w )
-{
- m_side_int6 = state;
- update_int6();
-}
-
bool a500_state::int2_pending()
{
return m_cia_0_irq || m_side_int2;
@@ -1472,8 +1457,6 @@ static MACHINE_CONFIG_DERIVED_CLASS( a500, amiga_base, a500_state )
// cpu slot
MCFG_EXPANSION_SLOT_ADD("maincpu", a500_expansion_cards, nullptr)
- MCFG_EXPANSION_SLOT_INT2_HANDLER(WRITELINE(a500_state, side_int2_w))
- MCFG_EXPANSION_SLOT_INT6_HANDLER(WRITELINE(a500_state, side_int6_w))
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED_CLASS( a500n, a500, a500_state )
diff --git a/src/mame/drivers/apple1.cpp b/src/mame/drivers/apple1.cpp
index 881209946ff..a99810887bc 100644
--- a/src/mame/drivers/apple1.cpp
+++ b/src/mame/drivers/apple1.cpp
@@ -1,78 +1,135 @@
-// license:BSD-3-Clause
-// copyright-holders:R. Belmont
-/***************************************************************************
-
- apple1.cpp - Apple I
-
- Next generation driver written in February 2016 by R. Belmont.
- Thanks to the original crew.
-
- Apple I has:
- 6502 @ 1.023 MHz (~0.960 MHz with RAM refresh)
- 4 or 8 KB RAM on-board
- 256 byte Monitor ROM
- No IRQs, no sound, dumb terminal video
- 6820 PIA for keyboard / terminal interface
-
- -------------------------------------------------------------------
-
- How to use cassettes:
- The system has no error checking or checksums, and the cassette
- has no header.
- Therefore, you must know the details, and pass these to the
- interface yourself.
-
- BASIC has no cassette handling. You must enter the monitor
- with: CALL -151
- then when finished, re-enter BASIC with: E2B3R
-
- Examples:
-
- A machine-language program will typically be like this:
- C100R (enter the interface)
- 0300.0FFFR (enter the load and end addresses, then load the tape)
- You start the tape.
- When the prompt returns you stop the tape.
- 0300R (run your program)
-
-
- To Load Tape Basic:
- C100R
- E000.EFFFR
- You start the tape.
- When the prompt returns you stop the tape.
- E000R (It must say 4C - if not, your tape is no good).
- The BASIC prompt will appear
- >@
-
-
- A BASIC program is split into two areas, one for the scratch pad,
- and one for the program proper.
- In BASIC you may have to adjust the allowed memory area, such as
- LOMEM = 768
- Then, go to the monitor: CALL -151
- C100R (enter the interface)
- 00A4.00FFR 0300.0FFFR (load the 2 parts)
- You start the tape.
- When the prompt returns you stop the tape.
- E2B3R (back to BASIC)
- You can LIST or RUN now.
-
-
- Saving is almost the same, when you specify the address range, enter
- W instead of R. The difficulty is finding out how long your program is.
-
- Insert a blank tape
- C100R
- 0300.0FFFW
- Quickly press Record.
- When the prompt returns, press Stop.
+// license:???
+// copyright-holders:Paul Daniels, Colin Howell, R. Belmont
+/**********************************************************************
+
+Apple I
+
+CPU: 6502 @ 1.023 MHz
+ (Effective speed with RAM refresh waits is 0.960 MHz.)
+
+RAM: 4-8 KB on main board (4 KB standard)
+
+ Additional memory could be added via the expansion
+ connector, but the user was responsible for making sure
+ the extra memory was properly interfaced.
+
+ Some users replaced the onboard 4-kilobit RAM chips with
+ 16-kilobit RAM chips, increasing on-board memory to 32 KB,
+ but this required modifying the RAM interface circuitry.
+
+ROM: 256 bytes for Monitor program
+
+ Optional cassette interface included 256 bytes for
+ cassette routines.
+
+Interrupts: None.
+ (The system board had jumpers to allow interrupts, but
+ these were not connected in a standard system.)
+
+Video: Dumb terminal, based on 7 1K-bit shift registers
+
+Sound: None
+
+Hardware: Motorola 6820 PIA for keyboard and display interface
+
+Memory map:
+
+$0000-$1FFF: RAM address space
+ $0000-$00FF: 6502 zero page
+ $0024-$002B: Zero page locations used by the Monitor
+ $0100-$01FF: 6502 processor stack
+ $0200-$027F: Keyboard input buffer storage used by the Monitor
+ $0280-$0FFF: RAM space available for a program in a 4 KB system
+ $1000-$1FFF: Extra RAM space available for a program in an 8 KB system
+ not using cassette BASIC
+
+$2000-$BFFF: Unused address space, available for RAM in systems larger
+ than 8 KB.
+
+$C000-$CFFF: Address space for optional cassette interface
+ $C000-$C0FF: Cassette interface I/O range
+ $C100-$C1FF: Cassette interface ROM
+
+$D000-$DFFF: I/O address space
+ $D010-$D013: Motorola 6820 PIA registers.
+ $D010: Keyboard input port
+ $D011: Control register for keyboard input port, with
+ key-available flag.
+ $D012: Display output port (bit 7 is a status input)
+ $D013: Control register for display output port
+ (PIA registers also mirrored at $D014-$D017, $D018-$D01B, $D01C-$D01F,
+ $D030-$D03F, $D050-$D05F, ... , $DFD0-$DFDF, $DFF0-$DFFF.)
+
+$E000-$EFFF: Extra RAM space available for a program in an 8 KB system
+ modified to use cassette BASIC
+ (The system simulated here always includes this RAM.)
+
+If you wanted to load the BASIC as rom, here are the details:
+ROM_LOAD("basic.bin", 0xE000, 0x1000, CRC(d5e86efc) SHA1(04269c1c66e7d5b4aa5035462c6e612bf2ae9b91) )
+
+
+$F000-$FFFF: ROM address space
+ $FF00-$FFFF: Apple Monitor ROM
+
+
+How to use cassettes:
+The system has no error checking or checksums, and the cassette
+has no header.
+Therefore, you must know the details, and pass these to the
+interface yourself.
+BASIC has no cassette handling. You must enter the monitor
+with: CALL -151
+then when finished, re-enter BASIC with: E2B3R
+
+
+Examples:
+
+A machine-language program will typically be like this:
+C100R (enter the interface)
+0300.0FFFR (enter the load and end addresses, then load the tape)
+You start the tape.
+When the prompt returns you stop the tape.
+0300R (run your program)
+
+
+To Load Tape Basic:
+C100R
+E000.EFFFR
+You start the tape.
+When the prompt returns you stop the tape.
+E000R (It must say 4C - if not, your tape is no good).
+The BASIC prompt will appear
+>@
+
+
+A BASIC program is split into two areas, one for the scratch pad,
+and one for the program proper.
+In BASIC you may have to adjust the allowed memory area, such as
+LOMEM = 768
+Then, go to the monitor: CALL -151
+C100R (enter the interface)
+00A4.00FFR 0300.0FFFR (load the 2 parts)
+You start the tape.
+When the prompt returns you stop the tape.
+E2B3R (back to BASIC)
+You can LIST or RUN now.
+
+
+Saving is almost the same, when you specify the address range, enter
+W instead of R. The difficulty is finding out how long your program is.
+
+Insert a blank tape
+C100R
+0300.0FFFW
+Quickly press Record.
+When the prompt returns, press Stop.
**********************************************************************/
#include "emu.h"
#include "cpu/m6502/m6502.h"
#include "machine/6821pia.h"
+#include "includes/apple1.h"
#include "imagedev/snapquik.h"
#include "machine/ram.h"
@@ -82,437 +139,59 @@
#include "softlist.h"
-#define A1_CPU_TAG "maincpu"
-#define A1_PIA_TAG "pia6821"
-#define A1_BUS_TAG "a1bus"
-#define A1_BASICRAM_TAG "basicram"
+/* port i/o functions */
-class apple1_state : public driver_device
-{
-public:
- apple1_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this, A1_CPU_TAG),
- m_pia(*this, A1_PIA_TAG),
- m_ram(*this, RAM_TAG),
- m_basicram(*this, A1_BASICRAM_TAG),
- m_kb0(*this, "KEY0"),
- m_kb1(*this, "KEY1"),
- m_kb2(*this, "KEY2"),
- m_kb3(*this, "KEY3"),
- m_kbspecial(*this, "KBSPECIAL")
- { }
-
- required_device<cpu_device> m_maincpu;
- required_device<pia6821_device> m_pia;
- required_device<ram_device> m_ram;
- required_shared_ptr<UINT8> m_basicram;
- required_ioport m_kb0, m_kb1, m_kb2, m_kb3, m_kbspecial;
-
- virtual void machine_start() override;
- virtual void machine_reset() override;
-
- DECLARE_PALETTE_INIT(apple2);
- UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
-
- DECLARE_READ8_MEMBER(ram_r);
- DECLARE_WRITE8_MEMBER(ram_w);
- DECLARE_READ8_MEMBER(pia_keyboard_r);
- DECLARE_WRITE8_MEMBER(pia_display_w);
- DECLARE_WRITE_LINE_MEMBER(pia_display_gate_w);
- DECLARE_SNAPSHOT_LOAD_MEMBER( apple1 );
- TIMER_CALLBACK_MEMBER(ready_start_cb);
- TIMER_CALLBACK_MEMBER(ready_end_cb);
- TIMER_CALLBACK_MEMBER(keyboard_strobe_cb);
-
-private:
- UINT8 *m_ram_ptr, *m_char_ptr;
- int m_ram_size, m_char_size;
-
- UINT8 m_vram[40*24];
- int m_cursx, m_cursy;
-
- bool m_reset_down;
- bool m_clear_down;
-
- UINT8 m_transchar;
- UINT16 m_lastports[4];
-
- void plot_text_character(bitmap_ind16 &bitmap, int xpos, int ypos, int xscale, UINT32 code, const UINT8 *textgfx_data, UINT32 textgfx_datalen);
- void poll_keyboard();
-
- emu_timer *m_ready_start_timer, *m_ready_end_timer, *m_kbd_strobe_timer;
-};
-
-static const UINT8 apple1_keymap[] =
-{
- '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', '=', '[', ']', ';', '\'', // KEY0
- ',', '.', '/', '\\', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', // KEY1
- 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '\r', '_', // KEY2
- ' ', '\x1b', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // KEY3
-
- ')', '!', '@', '#', '$', '%', '^', '&', '*', '(', '_', '+', '[', ']', ':', '"', // KEY0 + shift
- '<', '>', '?', '\\', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', // KEY1 + shift
- 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '\r', '_', // KEY2 + shift
- ' ', '\x1b', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // KEY3 + shift
-
- '0', '1', '\x00', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f', '8', '9', '\x1f', '=', '\x1b', '\x1d', ';', '\'', // KEY0 + CTRL
- ',', '.', '/', '\x1c', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07', '\x08', '\x09', '\x0a', '\x0b', '\x0c', // KEY1 + CTRL
- '\x0d', '\x0e', '\x0f', '\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17', '\x18', '\x19', '\x1a', '\r', '_', // KEY2 + CTRL
- ' ', '\x1b', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // KEY3 + CTRL
-
-};
-
-// header is "LOAD:abcdDATA:" where abcd is the starting address
-SNAPSHOT_LOAD_MEMBER( apple1_state, apple1 )
-{
- UINT64 snapsize;
- UINT8 *data;
- UINT16 start, end;
- static const char hd1[6] = "LOAD:";
- static const char hd2[6] = "DATA:";
-
- // get the snapshot's size
- snapsize = image.length();
-
- if (snapsize < 12)
- {
- logerror("Snapshot is too short\n");
- return IMAGE_INIT_FAIL;
- }
-
- if ((snapsize - 12) > 65535)
- {
- logerror("Snapshot is too long\n");
- return IMAGE_INIT_FAIL;
- }
-
- data = (UINT8 *)image.ptr();
- if (!data)
- {
- logerror("Internal error loading snapshot\n");
- return IMAGE_INIT_FAIL;
- }
-
- if ((memcmp(hd1, data, 5)) || (memcmp(hd2, &data[7], 5)))
- {
- logerror("Snapshot is invalid\n");
- return IMAGE_INIT_FAIL;
- }
-
- start = (data[5]<<8) | data[6];
- end = (snapsize - 12) + start;
-
- // check if this fits in RAM; load below 0xe000 must fit in RAMSIZE,
- // load at 0xe000 must fit in 4K
- if (((start < 0xe000) && (end > (m_ram_size - 1))) || (end > 0xefff))
- {
- logerror("Snapshot can't fit in RAM\n");
- return IMAGE_INIT_FAIL;
- }
-
- if (start < 0xe000)
- {
- memcpy(m_ram_ptr + start, &data[12], snapsize - 12);
- }
- else if ((start >= 0xe000) && (start <= 0xefff))
- {
- memcpy(m_basicram + (start - 0xe000), &data[12], snapsize - 12);
- }
- else
- {
- logerror("Snapshot has invalid load address %04x\n", start);
- return IMAGE_INIT_FAIL;
- }
-
- return IMAGE_INIT_PASS;
-}
-
-void apple1_state::poll_keyboard()
-{
- UINT8 special = m_kbspecial->read();
- UINT16 ports[4];
- int rawkey = 0;
- bool bKeypress = false;
-
- // handle special keys first:
- if (special & 0x10) // RESET
- {
- m_reset_down = true;
- m_maincpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
- m_pia->reset();
- }
- else if (m_reset_down)
- {
- m_reset_down = false;
- m_maincpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
- }
-
- if (special & 0x20) // CLEAR SCREEN
- {
- m_clear_down = true;
- memset(m_vram, 0, sizeof(m_vram));
- m_cursx = m_cursy = 0;
- }
- else
- {
- m_clear_down = false;
- }
-
- // lower the keyboard strobe
- m_pia->ca1_w(0);
-
- // cache all the rows
- ports[0] = m_kb0->read();
- ports[1] = m_kb1->read();
- ports[2] = m_kb2->read();
- ports[3] = m_kb3->read();
-
- for (int port = 0; port < 4; port++)
- {
- UINT16 ptread = ports[port] ^ m_lastports[port];
-
- for (int bit = 0; bit < 16; bit++)
- {
- // key changed?
- if (ptread & (1 << bit))
- {
- // key down?
- if (ports[port] & (1 << bit))
- {
- rawkey = (port * 16) + bit;
- m_lastports[port] |= (1 << bit);
- port = 4; // force outer for loop to quit too
- bKeypress = true;
- }
- else // key up
- {
- m_lastports[port] &= ~(1 << bit);
- }
- break;
- }
- }
- }
-
- if (bKeypress)
- {
- if ((special & 0xc) != 0)
- {
- m_transchar = apple1_keymap[rawkey + (8*16)];
- }
- else if ((special & 0x3) != 0)
- {
- m_transchar = apple1_keymap[rawkey + (4*16)];
- }
- else
- {
- m_transchar = apple1_keymap[rawkey];
- }
- // pulse the strobe line
- m_pia->ca1_w(1);
- }
-}
-
-void apple1_state::plot_text_character(bitmap_ind16 &bitmap, int xpos, int ypos, int xscale, UINT32 code,
- const UINT8 *textgfx_data, UINT32 textgfx_datalen)
-{
- int x, y, i;
- const UINT8 *chardata;
- UINT16 color;
- int fg = 1, bg = 0;
- int charcode = (code & 0x1f) | (((code ^ 0x40) & 0x40) >> 1);
-
- /* look up the character data */
- chardata = &textgfx_data[(charcode * 8)];
-
- for (y = 0; y < 8; y++)
- {
- for (x = 0; x < 7; x++)
- {
- color = (chardata[y] & (1 << (6-x))) ? fg : bg;
-
- for (i = 0; i < xscale; i++)
- {
- bitmap.pix16(ypos + y, xpos + (x * xscale) + i) = color;
- }
- }
- }
-}
-
-UINT32 apple1_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
-{
- int vramad;
- int cursor_blink = 0;
- UINT8 curs_save = 0;
-
- poll_keyboard();
-
- // the cursor 555 timer counts 0.52 of a second; the cursor is ON for
- // 2 of those counts and OFF for the last one.
- if (((int)(machine().time().as_double() / (0.52 / 3.0)) % 3) < 2)
- {
- curs_save = m_vram[(m_cursy * 40) + m_cursx];
- m_vram[(m_cursy * 40) + m_cursx] = 0x40;
- cursor_blink = 1;
- }
-
- for (int row = 0; row < cliprect.max_y; row += 8)
- {
- for (int col = 0; col < 40; col++)
- {
- vramad = ((row/8) * 40) + col;
-
- plot_text_character(bitmap, col * 14, row, 2, m_vram[vramad],
- m_char_ptr, m_char_size);
- }
- }
-
- if (cursor_blink)
- {
- m_vram[(m_cursy * 40) + m_cursx] = curs_save;
- }
-
- return 0;
-}
-
-void apple1_state::machine_start()
-{
- m_ram_ptr = m_ram->pointer();
- m_ram_size = m_ram->size();
- m_char_ptr = memregion("gfx1")->base();
- m_char_size = memregion("gfx1")->bytes();
-
- m_reset_down = m_clear_down = false;
-
- m_ready_start_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(apple1_state::ready_start_cb), this));
- m_ready_end_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(apple1_state::ready_end_cb), this));
- m_kbd_strobe_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(apple1_state::keyboard_strobe_cb), this));
-
- // setup save states
- save_item(NAME(m_vram));
- save_item(NAME(m_cursx));
- save_item(NAME(m_cursy));
- save_item(NAME(m_reset_down));
- save_item(NAME(m_clear_down));
- save_item(NAME(m_transchar));
- save_item(NAME(m_lastports));
-}
-
-void apple1_state::machine_reset()
-{
- memset(m_vram, 0, sizeof(m_vram));
- m_transchar = 0;
- m_cursx = m_cursy = 0;
- m_lastports[0] = m_lastports[1] = m_lastports[2] = m_lastports[3] = 0;
-}
-
-READ8_MEMBER(apple1_state::ram_r)
-{
- if (offset < m_ram_size)
- {
- return m_ram_ptr[offset];
- }
-
- return 0xff;
-}
-
-WRITE8_MEMBER(apple1_state::ram_w)
-{
- if (offset < m_ram_size)
- {
- m_ram_ptr[offset] = data;
- }
-}
+/* memory w/r functions */
static ADDRESS_MAP_START( apple1_map, AS_PROGRAM, 8, apple1_state )
- AM_RANGE(0x0000, 0xbfff) AM_READWRITE(ram_r, ram_w)
- AM_RANGE(0xd010, 0xd013) AM_MIRROR(0x0fec) AM_DEVREADWRITE(A1_PIA_TAG, pia6821_device, read, write)
- AM_RANGE(0xe000, 0xefff) AM_RAM AM_SHARE(A1_BASICRAM_TAG)
- AM_RANGE(0xff00, 0xffff) AM_ROM AM_REGION(A1_CPU_TAG, 0)
-ADDRESS_MAP_END
+ /* In $D000-$DFFF, PIA is selected by address bit 4 being high,
+ and PIA registers are addressed with address bits 0-1. All
+ other address bits are ignored. Thus $D010-$D013 is mirrored
+ at all $Dxxx addresses with bit 4 high. */
+ AM_RANGE(0xd010, 0xd013) AM_MIRROR(0x0fec) AM_DEVREADWRITE("pia",pia6821_device, read, write)
-READ8_MEMBER(apple1_state::pia_keyboard_r)
-{
- return m_transchar | 0x80; // bit 7 is wired high, similar-ish to the Apple II
-}
+ /* We always include the remapped RAM for cassette BASIC, both for
+ simplicity and to allow the running of BASIC programs. */
+ AM_RANGE(0xe000, 0xefff) AM_RAM
-WRITE8_MEMBER(apple1_state::pia_display_w)
-{
- data &= 0x7f; // D7 is ignored by the video h/w
-
- // ignore characters if CLEAR is down
- if (m_clear_down)
- {
- return;
- }
-
- // video h/w rejects control characters except CR
- if ((data < 32) && (data != '\r'))
- {
- return;
- }
-
- if (data == '\r')
- {
- m_cursx = 0;
- m_cursy++;
- }
- else
- {
- m_vram[(m_cursy * 40) + m_cursx] = data;
-
- m_cursx++;
- if (m_cursx > 39)
- {
- m_cursx = 0;
- m_cursy++;
- }
- }
-
- // scroll the screen if we're at the bottom
- if (m_cursy > 23)
- {
- for (int sy = 0; sy < 23; sy++)
- {
- memcpy(&m_vram[sy * 40], &m_vram[(sy + 1) * 40], 40);
- }
- memset(&m_vram[23*40], 0, 40);
- m_cursy = 23;
- }
-}
-
-// CB2 here is connected two places: Port B bit 7 for CPU readback,
-// and to the display hardware
-WRITE_LINE_MEMBER(apple1_state::pia_display_gate_w)
-{
- m_pia->portb_w((state << 7) ^ 0x80);
+ AM_RANGE(0xf000, 0xfeff) AM_NOP
- // falling edge means start the display timer
- if (state == CLEAR_LINE)
- {
- m_ready_start_timer->adjust(machine().first_screen()->time_until_pos(m_cursy, m_cursx));
- }
-}
+ /* Monitor ROM: */
+ AM_RANGE(0xff00, 0xffff) AM_ROM AM_REGION("maincpu", 0)
+ADDRESS_MAP_END
-TIMER_CALLBACK_MEMBER(apple1_state::ready_start_cb)
-{
- // we're ready, pulse CB1 for 3500 nanoseconds
- m_pia->cb1_w(0);
- m_ready_end_timer->adjust(attotime::from_nsec(3500));
-}
+/* graphics output */
-TIMER_CALLBACK_MEMBER(apple1_state::ready_end_cb)
+const gfx_layout apple1_charlayout =
{
- m_pia->cb1_w(1);
-}
+ 7, 8, /* character cell is 7 pixels wide by 8 pixels high */
+ 64, /* 64 characters in 2513 character generator ROM */
+ 1, /* 1 bitplane */
+ { 0 },
+ /* 5 visible pixels per row, starting at bit 3, with MSB being 0: */
+ { 3, 4, 5, 6, 7 },
+ /* pixel rows stored from top to bottom: */
+ { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
+ 8 * 8 /* 8 8-bit pixel rows per character */
+};
-TIMER_CALLBACK_MEMBER(apple1_state::keyboard_strobe_cb)
-{
- m_pia->ca1_w(0);
-}
+static GFXDECODE_START( apple1 )
+ GFXDECODE_ENTRY( "gfx1", 0x0000, apple1_charlayout, 0, 1 )
+GFXDECODE_END
+
+/* keyboard input */
+/*
+ It's very likely that the keyboard assgnments are totally wrong: the code in machine/apple1.c
+ makes arbitrary assumptions about the mapping of the keys. The schematics that are available
+ on the web can help revealing the real layout.
+ The large picture of Woz's Apple I at http://home.earthlink.net/~judgementcall/apple1.jpg
+ show probably how the real keyboard was meant to be: note how the shifted symbols on the digits
+ and on some letters are different from the ones produced by current emulation and the presence
+ of the gray keys.
+*/
static INPUT_PORTS_START( apple1 )
- PORT_START("KEY0")
+ PORT_START("KEY0") /* first sixteen keys */
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')')
PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!')
PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('@')
@@ -530,7 +209,7 @@ static INPUT_PORTS_START( apple1 )
PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':')
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'') PORT_CHAR('"')
- PORT_START("KEY1")
+ PORT_START("KEY1") /* second sixteen keys */
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<')
PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>')
PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?')
@@ -548,7 +227,7 @@ static INPUT_PORTS_START( apple1 )
PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('K')
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('L')
- PORT_START("KEY2")
+ PORT_START("KEY2") /* third sixteen keys */
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('M')
PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('N')
PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('O')
@@ -564,19 +243,21 @@ static INPUT_PORTS_START( apple1 )
PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y')
PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z')
PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
- PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Backspace") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR('_')
+ PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Backarrow") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR('_')
- PORT_START("KEY3")
+ PORT_START("KEY3") /* fourth sixteen keys */
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Escape") PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC))
- PORT_START("KBSPECIAL")
- PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Left Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
- PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Right Shift") PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
- PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Left Control") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2)
- PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Right Control") PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR(UCHAR_SHIFT_2)
- PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Reset") PORT_CODE(KEYCODE_F12) PORT_CHAR(UCHAR_MAMEKEY(F1))
- PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Clear") PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2))
+ PORT_START("KEY4") /* shift keys */
+ PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Shift (Left)") PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
+ PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Shift (Right)") PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
+ PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Control (Left)") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2)
+ PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Control (Right)") PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR(UCHAR_SHIFT_2)
+
+ PORT_START("KEY5") /* RESET and CLEAR SCREEN pushbutton switches */
+ PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Reset") PORT_CODE(KEYCODE_F12) PORT_CHAR(UCHAR_MAMEKEY(F1))
+ PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Clear") PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2))
INPUT_PORTS_END
static SLOT_INTERFACE_START(apple1_cards)
@@ -584,44 +265,69 @@ static SLOT_INTERFACE_START(apple1_cards)
SLOT_INTERFACE("cffa", A1BUS_CFFA)
SLOT_INTERFACE_END
+/* machine definition */
static MACHINE_CONFIG_START( apple1, apple1_state )
- MCFG_CPU_ADD(A1_CPU_TAG, M6502, 960000) // effective CPU speed
+ /* basic machine hardware */
+ /* Actual CPU speed is 1.023 MHz, but RAM refresh effectively
+ slows it to 960 kHz. */
+ MCFG_CPU_ADD("maincpu", M6502, 960000) /* 1.023 MHz */
MCFG_CPU_PROGRAM_MAP(apple1_map)
- // video timings are identical to the Apple II, unsurprisingly
+ MCFG_QUANTUM_TIME(attotime::from_hz(60))
+
MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(XTAL_14_31818MHz, (65*7)*2, 0, (40*7)*2, 262, 0, 192)
- MCFG_SCREEN_UPDATE_DRIVER(apple1_state, screen_update)
+ MCFG_SCREEN_REFRESH_RATE(60)
+ /* Video is blanked for 70 out of 262 scanlines per refresh cycle.
+ Each scanline is composed of 65 character times, 40 of which
+ are visible, and each character time is 7 dot times; a dot time
+ is 2 cycles of the fundamental 14.31818 MHz oscillator. The
+ total blanking time is about 4450 microseconds. */
+ MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC((int) (70 * 65 * 7 * 2 / 14.31818)))
+ /* It would be nice if we could implement some sort of display
+ overscan here. */
+ MCFG_SCREEN_SIZE(40 * 7, 24 * 8)
+ MCFG_SCREEN_VISIBLE_AREA(0, 40 * 7 - 1, 0, 24 * 8 - 1)
+ MCFG_SCREEN_UPDATE_DRIVER(apple1_state, screen_update_apple1)
MCFG_SCREEN_PALETTE("palette")
+ MCFG_GFXDECODE_ADD("gfxdecode", "palette", apple1)
+
MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette")
- MCFG_DEVICE_ADD( A1_PIA_TAG, PIA6821, 0)
- MCFG_PIA_READPA_HANDLER(READ8(apple1_state, pia_keyboard_r))
- MCFG_PIA_WRITEPB_HANDLER(WRITE8(apple1_state, pia_display_w))
- MCFG_PIA_CB2_HANDLER(WRITELINE(apple1_state, pia_display_gate_w))
+ MCFG_DEVICE_ADD( "pia", PIA6821, 0)
+ MCFG_PIA_READPA_HANDLER(READ8(apple1_state,apple1_pia0_kbdin))
+ MCFG_PIA_WRITEPB_HANDLER(WRITE8(apple1_state,apple1_pia0_dspout))
+ MCFG_PIA_CB2_HANDLER(WRITELINE(apple1_state,apple1_pia0_dsp_write_signal))
- MCFG_DEVICE_ADD(A1_BUS_TAG, A1BUS, 0)
+ MCFG_DEVICE_ADD("a1bus", A1BUS, 0)
MCFG_A1BUS_CPU("maincpu")
- MCFG_A1BUS_SLOT_ADD(A1_BUS_TAG, "exp", apple1_cards, "cassette")
+ MCFG_A1BUS_SLOT_ADD("a1bus", "exp", apple1_cards, "cassette")
+ /* snapshot */
MCFG_SNAPSHOT_ADD("snapshot", apple1_state, apple1, "snp", 0)
- MCFG_SOFTWARE_LIST_ADD("cass_list", "apple1")
+ MCFG_SOFTWARE_LIST_ADD("cass_list","apple1")
+ /* Note that because we always include 4K of RAM at $E000-$EFFF,
+ the RAM amounts listed here will be 4K below the actual RAM
+ total. */
+ /* internal ram */
MCFG_RAM_ADD(RAM_TAG)
MCFG_RAM_DEFAULT_SIZE("48K")
MCFG_RAM_EXTRA_OPTIONS("4K,8K,12K,16K,20K,24K,28K,32K,36K,40K,44K")
+
MACHINE_CONFIG_END
ROM_START(apple1)
- ROM_REGION(0x100, A1_CPU_TAG, 0)
- ROM_LOAD_NIB_HIGH("apple-a2.a2", 0x0000, 0x0100, CRC(254bfb95) SHA1(b6468b72295b7d8ac288d104d252f24de1f1d611) )
- ROM_LOAD_NIB_LOW("apple-a1.a1", 0x0000, 0x0100, CRC(434f8ce6) SHA1(9deee2d39903209b20c3fc6b58e16372f8efece1) )
+ ROM_REGION(0x100, "maincpu",0)
+ /* 256-byte main monitor ROM, in two 82s129 or mmi6301 256x4 proms at A1 and A2 called APPLE-A1(bits D3-D0) and APPLE-A2(bits D7-D4) */
+ ROM_LOAD_NIB_HIGH( "apple-a2.a2", 0x0000, 0x0100, CRC(254bfb95) SHA1(b6468b72295b7d8ac288d104d252f24de1f1d611) )
+ ROM_LOAD_NIB_LOW( "apple-a1.a1", 0x0000, 0x0100, CRC(434f8ce6) SHA1(9deee2d39903209b20c3fc6b58e16372f8efece1) )
+ /* 512-byte Signetics 2513 character generator ROM at location D2-D3 */
ROM_REGION(0x0200, "gfx1",0)
ROM_LOAD("s2513.d2", 0x0000, 0x0200, CRC(a7e567fc) SHA1(b18aae0a2d4f92f5a7e22640719bbc4652f3f4ee)) // apple1.vid
ROM_END
-/* YEAR NAME PARENT COMPAT MACHINE INPUT STATE INIT COMPANY FULLNAME */
-COMP( 1976, apple1, 0, 0, apple1, apple1, driver_device, 0, "Apple Computer", "Apple I", MACHINE_NO_SOUND_HW | MACHINE_SUPPORTS_SAVE )
+/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */
+COMP( 1976, apple1, 0, 0, apple1, apple1, apple1_state, apple1, "Apple Computer", "Apple I" , MACHINE_NO_SOUND )
diff --git a/src/mame/drivers/apple2e.cpp b/src/mame/drivers/apple2e.cpp
index 8cf7052f829..99bc10dc341 100644
--- a/src/mame/drivers/apple2e.cpp
+++ b/src/mame/drivers/apple2e.cpp
@@ -2901,128 +2901,6 @@ static INPUT_PORTS_START( apple2euk )
PORT_INCLUDE(apple2_sysconfig)
INPUT_PORTS_END
-static INPUT_PORTS_START( apple2ees )
- PORT_START("X0")
- PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Esc") PORT_CODE(KEYCODE_ESC) PORT_CHAR(27)
- PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!')
- PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('\"')
- PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR(0xa3) // a3 is Unicode for the pound sign
- PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$')
- PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&')
- PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%')
- PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('/')
- PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(')
- PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')')
-
- PORT_START("X1")
- PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Tab") PORT_CODE(KEYCODE_TAB) PORT_CHAR(9)
- PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') PORT_CHAR('q')
- PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('W') PORT_CHAR('w')
- PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('E') PORT_CHAR('e')
- PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('R') PORT_CHAR('r')
- PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y') PORT_CHAR('y')
- PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('T') PORT_CHAR('t')
- PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('U') PORT_CHAR('u')
- PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('I') PORT_CHAR('i')
- PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('O') PORT_CHAR('o')
-
- PORT_START("X2")
- PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('A') PORT_CHAR('a')
- PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('D') PORT_CHAR('d')
- PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('S') PORT_CHAR('s')
- PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('H') PORT_CHAR('h')
- PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('F') PORT_CHAR('f')
- PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('G') PORT_CHAR('g')
- PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('J') PORT_CHAR('j')
- PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('K') PORT_CHAR('k')
- PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(0xf1) PORT_CHAR(0xf1)
- PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('L') PORT_CHAR('l')
-
- PORT_START("X3")
- PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z') PORT_CHAR('z')
- PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('X') PORT_CHAR('x')
- PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('C') PORT_CHAR('c')
- PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('V') PORT_CHAR('v')
- PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('B') PORT_CHAR('b')
- PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('N') PORT_CHAR('n')
- PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('M') PORT_CHAR('m')
- PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR(';')
- PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR(':')
- PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('-') PORT_CHAR('_')
-
- PORT_START("X4")
- PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_UNUSED)
- PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_UNUSED)
- PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_UNUSED)
- PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_UNUSED)
- PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_UNUSED)
- PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_UNUSED)
- PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') PORT_CHAR('|')
- PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('`') PORT_CHAR(0xbf) // inverted question mark
- PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR('=')
- PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('\'') PORT_CHAR('?')
-
- PORT_START("X5")
- PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_UNUSED)
- PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_UNUSED)
- PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_UNUSED)
- PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_UNUSED)
- PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_UNUSED)
- PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_UNUSED)
- PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_TILDE) PORT_CHAR('<') PORT_CHAR('>')
- PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('P') PORT_CHAR('p')
- PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('~') PORT_CHAR('^')
- PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('+') PORT_CHAR('*')
-
- PORT_START("X6")
- PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_UNUSED)
- PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_UNUSED)
- PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_UNUSED)
- PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_UNUSED)
- PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_UNUSED)
- PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_UNUSED)
- PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Return") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
- PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(UTF8_UP) PORT_CODE(KEYCODE_UP)
- PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
- PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(0xc7) PORT_CHAR(0xa1) // c with cedilla / inverted exclamation point
-
- PORT_START("X7")
- PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_UNUSED)
- PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_UNUSED)
- PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_UNUSED)
- PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_UNUSED)
- PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_UNUSED)
- PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_UNUSED)
- PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Delete") PORT_CODE(KEYCODE_BACKSPACE)PORT_CHAR(8)
- PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(UTF8_DOWN) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(10)
- PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(UTF8_LEFT) PORT_CODE(KEYCODE_LEFT)
- PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(UTF8_RIGHT) PORT_CODE(KEYCODE_RIGHT)
-
- PORT_START("X8")
- PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_UNUSED)
- PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_UNUSED)
- PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_UNUSED)
- PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_UNUSED)
- PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_UNUSED)
- PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_UNUSED)
- PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_UNUSED)
- PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_UNUSED)
- PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_UNUSED)
- PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_UNUSED)
-
- PORT_START("keyb_special")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Caps Lock") PORT_CODE(KEYCODE_CAPSLOCK) PORT_TOGGLE
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Left Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Right Shift") PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Control") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2)
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Open Apple") PORT_CODE(KEYCODE_LALT)
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Solid Apple") PORT_CODE(KEYCODE_RALT)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RESET") PORT_CODE(KEYCODE_F12)
-
- PORT_INCLUDE( apple2_gameport )
- PORT_INCLUDE(apple2_sysconfig)
-INPUT_PORTS_END
-
INPUT_PORTS_START( apple2ep )
PORT_START("X0")
PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Esc") PORT_CODE(KEYCODE_ESC) PORT_CHAR(27)
@@ -3555,18 +3433,6 @@ ROM_START(apple2euk)
ROM_LOAD( "341-0150-a.e12", 0x000, 0x800, CRC(66ffacd7) SHA1(47bb9608be38ff75429a989b930a93b47099648e) )
ROM_END
-ROM_START(apple2ees)
- ROM_REGION(0x2000,"gfx1",0)
- ROM_LOAD( "341-0212-a.e9", 0x000000, 0x002000, CRC(bc5575ef) SHA1(aa20c257255ef552295d32a3f56ccbb52b8716c3) )
-
- ROM_REGION(0x8000,"maincpu",0)
- ROM_LOAD ( "342-0135-b.64", 0x0000, 0x2000, CRC(e248835e) SHA1(523838c19c79f481fa02df56856da1ec3816d16e))
- ROM_LOAD ( "342-0134-a.64", 0x2000, 0x2000, CRC(fc3d59d8) SHA1(8895a4b703f2184b673078f411f4089889b61c54))
-
- ROM_REGION( 0x800, "keyboard", ROMREGION_ERASE00 )
- ROM_LOAD( "341-0211-a.f12", 0x000000, 0x000800, CRC(fac15d54) SHA1(abe019de22641b0647e829a1d4745759bdffe86a) )
-ROM_END
-
ROM_START(mprof3)
ROM_REGION(0x2000,"gfx1",0)
ROM_LOAD ( "mpf3.chr", 0x0000, 0x1000,CRC(2597bc19) SHA1(e114dcbb512ec24fb457248c1b53cbd78039ed20))
@@ -3747,7 +3613,6 @@ ROM_END
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */
COMP( 1983, apple2e, 0, apple2, apple2e, apple2e, driver_device, 0, "Apple Computer", "Apple //e", MACHINE_SUPPORTS_SAVE )
COMP( 1983, apple2euk,apple2e, 0, apple2e, apple2euk,driver_device, 0, "Apple Computer", "Apple //e (UK)", MACHINE_SUPPORTS_SAVE )
-COMP( 1983, apple2ees,apple2e, 0, apple2e, apple2ees,driver_device, 0, "Apple Computer", "Apple //e (Spain)", MACHINE_SUPPORTS_SAVE )
COMP( 1983, mprof3, apple2e, 0, mprof3, apple2e, driver_device, 0, "Multitech", "Microprofessor III", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
COMP( 1985, apple2ee, apple2e, 0, apple2ee, apple2e, driver_device, 0, "Apple Computer", "Apple //e (enhanced)", MACHINE_SUPPORTS_SAVE )
COMP( 1985, apple2eeuk,apple2e, 0, apple2ee, apple2euk, driver_device,0, "Apple Computer", "Apple //e (enhanced, UK)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/arcadecl.cpp b/src/mame/drivers/arcadecl.cpp
index 1e821db2466..dd261cac975 100644
--- a/src/mame/drivers/arcadecl.cpp
+++ b/src/mame/drivers/arcadecl.cpp
@@ -131,7 +131,7 @@ WRITE16_MEMBER(arcadecl_state::latch_w)
if (ACCESSING_BITS_0_7)
{
m_oki->set_bank_base((data & 0x80) ? 0x40000 : 0x00000);
- m_oki->set_output_gain(ALL_OUTPUTS, (data & 0x001f) / 31.0f);
+ set_oki6295_volume((data & 0x001f) * 100 / 0x1f);
}
}
diff --git a/src/mame/drivers/argox.cpp b/src/mame/drivers/argox.cpp
deleted file mode 100644
index 737afea4be2..00000000000
--- a/src/mame/drivers/argox.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-// license:GPL2+
-// copyright-holders:Felipe Sanches
-/***************************************************************************
-
- Argox Rabbit Printer
- model: 0S-214
-
- Skeleton driver by Felipe Correa da Silva Sanches <juca@members.fsf.org>
-
- OVERALL HARDWARE DESCRIPTION:
-
- There's a sticker labeled "V4.21"
- The board is labeled "ARGOX INFORMATION 48.20401.002 DATE:2003/03/20 REV:4.2"
-
- There's a soldered IC at U10 which is labeled "A511 093060006 55-20401-003 E" and "OK"
- I guess it may be another flash ROM
-
- External interfaces:
- * RS232 serial interface
- * Centronics port
-
- Connectors:
- * 4-pin labeled "PEELER" (unused)
- * 4-pin labeled "RIBBON"
- * 4-pin labeled "MEDIA"
- * 4-pin labeled "MOTOR"
- * 6-pin labeled "MOTOR" (unpopulated)
- * 4-pin labeled "CUTTER" (unused)
- * 18-pin unlabeled JP18 (with 4 unused pins) Connects to the printing subassembly
- * 9-pin labeled "KEYPAD" (unpopulated)
- * 6-pin labeled "LED/KEY" (connects to FEED button, POWER LED and READY LED)
-
- Jumpers:
- * set of 2 jumpers (JP1 and JP2) with a jumper inserted at JP2
- * set of 6 unlabelled with jumpers inserted at position #0 and #3
-
- DIP sockets:
- * u8 and u9 hold the FLASH ROM chips
- * U19 is an unpopulated DIP16 socket
-
-***************************************************************************/
-
-#include "emu.h"
-#include "cpu/h8/h83002.h"
-
-class os214_state : public driver_device
-{
-public:
- os214_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu")
- { }
-
- DECLARE_DRIVER_INIT(os214);
- required_device<cpu_device> m_maincpu;
-};
-
-static ADDRESS_MAP_START( os214_prg_map, AS_PROGRAM, 16, os214_state )
- AM_RANGE(0x000000, 0x07ffff) AM_ROM
-ADDRESS_MAP_END
-
-static ADDRESS_MAP_START( os214_io_map, AS_IO, 8, os214_state )
-// ADDRESS_MAP_GLOBAL_MASK(0xff)
-ADDRESS_MAP_END
-
-static MACHINE_CONFIG_START( os214, os214_state )
- /* basic machine hardware */
- MCFG_CPU_ADD("maincpu", H83002, XTAL_16MHz) /* X1 xtal value is correct,
- but there can be some clock divider perhaps ? */
- MCFG_CPU_PROGRAM_MAP(os214_prg_map)
- MCFG_CPU_IO_MAP(os214_io_map)
-MACHINE_CONFIG_END
-
-DRIVER_INIT_MEMBER( os214_state, os214 )
-{
-}
-
-ROM_START( os214 )
- ROM_REGION( 0x080000, "maincpu", 0 )
- ROM_LOAD16_BYTE( "u9_s2a2-4.03_argox_am.u9", 0x000000, 0x040000, CRC(3bd8b2b1) SHA1(546f9fd8d7e1f589f6e594a332a3429041b49eea) )
- ROM_LOAD16_BYTE( "u8_s2a2-4.03_argox_am.u8", 0x000001, 0x040000, CRC(d49f52af) SHA1(0ca5a70c6c3995f275226af26db965f6ba7ed123) )
-ROM_END
-
-/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */
-COMP( 1996, os214, 0, 0, os214, 0, os214_state, os214, "Argox", "Rabbit Printer (model OS-214)", MACHINE_IS_SKELETON)
diff --git a/src/mame/drivers/arkanoid.cpp b/src/mame/drivers/arkanoid.cpp
index c93fd804064..03dedcd5c4d 100644
--- a/src/mame/drivers/arkanoid.cpp
+++ b/src/mame/drivers/arkanoid.cpp
@@ -1245,10 +1245,6 @@ GFXDECODE_END
void arkanoid_state::machine_start()
{
- // allocate the MCU timer, even if we have no MCU, and set it to fire NEVER.
- m_68705_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(arkanoid_state::timer_68705_increment),this));
- m_68705_timer->adjust(attotime::never);
-
save_item(NAME(m_gfxbank));
save_item(NAME(m_palettebank));
@@ -1287,8 +1283,8 @@ void arkanoid_state::machine_reset()
// the following 3 are all part of the 74ls74 at ic26 and are cleared on reset
m_z80HasWritten = 0;
m_68705HasWritten = 0;
- if (m_mcu.found()) m_mcu->set_input_line(M68705_IRQ_LINE, CLEAR_LINE);
- if (m_mcu.found()) m_68705_timer->adjust(attotime::from_hz(((XTAL_12MHz/4)/4)/(1<<7)));
+ //if (m_bootleg_id == 0) m_mcu->set_input_line(M68705_IRQ_LINE, CLEAR_LINE); // arkatayt will crash if this line is uncommented, but without this line present, arkanoid will watchdog-reset itself as soon as a level starts after pressing f3/soft reset.
+ // TODO: this can be better dealt with by having a separate machine_reset function for the mculess vs mcu sets.
m_port_a_in = 0;
m_port_a_out = 0;
@@ -1434,8 +1430,8 @@ MACHINE_CONFIG_END
/* ROMs */
/* rom numbering, with guesses for version numbers and missing roms:
A75 01 = Z80 code 1/2 v1.0 Japan (NOT DUMPED)
- A75 01-1 = Z80 code 1/2 v1.1 Japan and USA/Romstar and World
- A75 02 = Z80 code 2/2 v1.0 Japan (has 'Notice: This game is for use in Japan only' screen)
+ A75 01-1 = Z80 code 1/2 v1.1 Japan and USA/Romstar
+ A75 02 = Z80 code 2/2 v1.0 Japan
A75 03 = GFX 1/3
A75 04 = GFX 2/3
A75 05 = GFX 3/3
@@ -1443,8 +1439,8 @@ MACHINE_CONFIG_END
A75 07 = PROM red
A75 08 = PROM green
A75 09 = PROM blue
- A75 10 = Z80 code 2/2 v1.0 USA/Romstar (has 'Licensed to Romstar for U.S.A' notice on title)
- A75 11 = Z80 code 2/2 v1.0 World
+ A75 10 = Z80 code 2/2 v1.1 USA/Romstar
+ A75 11 = Z80 code 2/2 v1.2 Japan(World?) (paired with 01-1 v1.1 Japan)
(A75 12 through 17 are unknown, could be another two sets of z80 code plus mc68705p5)
A75 18 = Z80 code v2.0 2/2 USA/Romstar
A75 19 = Z80 code v2.0 1/2 USA/Romstar
@@ -1468,7 +1464,7 @@ MACHINE_CONFIG_END
A75 37 = Z80 code 2/2 (Tournament v2.0?) (NOT DUMPED)
*/
-ROM_START( arkanoid ) // v1.0 World
+ROM_START( arkanoid ) // v1.2 Japan(world?)
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "a75-01-1.ic17", 0x0000, 0x8000, CRC(5bcda3b0) SHA1(52cadd38b5f8e8856f007a9c602d6b508f30be65) )
ROM_LOAD( "a75-11.ic16", 0x8000, 0x8000, CRC(eafd7191) SHA1(d2f8843b716718b1de209e97a874e8ce600f3f87) )
@@ -1486,11 +1482,12 @@ ROM_START( arkanoid ) // v1.0 World
ROM_LOAD( "a75-08.ic23", 0x0200, 0x0200, CRC(abb002fb) SHA1(c14f56b8ef103600862e7930709d293b0aa97a73) ) /* green component */
ROM_LOAD( "a75-09.ic22", 0x0400, 0x0200, CRC(a7c6c277) SHA1(adaa003dcd981576ea1cc5f697d709b2d6b2ea29) ) /* blue component */
+ // these were decapped, sort them!
// All of these MCUs work in place of A75 06, see comments for each.
ROM_REGION( 0x1800, "alt_mcus", 0 ) /* 2k for the microcontroller */
- ROM_LOAD( "arkanoid_mcu.ic14", 0x0000, 0x0800, CRC(4e44b50a) SHA1(c61e7d158dc8e2b003c8158053ec139b904599af) ) // Decapped: This matches the legitimate Taito rom, with a "Programmed By Yasu 1986" string in it, but has a 0x00 fill after the end of the code instead of 0xFF. This matches the legit rom otherwise and may itself be legit, perhaps an artifact of a 68705 programmer at Taito using a sparse s-record/ihex file and not clearing the ram in the chip programmer to 0xFF (or 0x00?) before programming the MCU.
- ROM_LOAD( "a75-06__bootleg_68705.ic14", 0x0800, 0x0800, CRC(515d77b6) SHA1(a302937683d11f663abd56a2fd7c174374e4d7fb) ) // NOT decapped: This came from an unprotected bootleg, and used to be used by the main set. It is definitely a bootleg mcu with no timer or int selftest, and compltely different code altogether, probably implemented by pirates by blackbox-reverse engineering the real MCU.
- ROM_LOAD( "arkanoid1_68705p3.ic14", 0x1000, 0x0800, CRC(1b68e2d8) SHA1(f642a7cb624ee14fb0e410de5ae1fc799d2fa1c2) ) // Decapped: This is the same as the bootleg 515d77b6 rom above except the bootrom (0x785-0x7f7) is intact. No other difference.
+ ROM_LOAD( "arkanoid_mcu.ic14", 0x0800, 0x0800, CRC(4e44b50a) SHA1(c61e7d158dc8e2b003c8158053ec139b904599af) ) // This matches the legitimate Taito rom, with a "Programmed By Yasu 1986" string in it, but has a 0x00 fill after the end of the code instead of 0xFF. This matches the legit rom otherwise and may itself be legit, perhaps an artifact of a 68705 programmer at Taito using a sparse s-record/ihex file and not clearing the ram in the chip programmer to 0xFF (or 0x00?) before programming the MCU.
+ ROM_LOAD( "a75-06__bootleg_68705.ic14", 0x1000, 0x0800, CRC(515d77b6) SHA1(a302937683d11f663abd56a2fd7c174374e4d7fb) ) // This was NOT decapped, it came from an unprotected bootleg, and used to be used by the main set. It is definitely a bootleg mcu with no timer or int selftest, and compltely different code altogether, probably implemented by pirates by blackbox-reverse engineering the real MCU.
+ ROM_LOAD( "arkanoid1_68705p3.ic14", 0x0000, 0x0800, CRC(1b68e2d8) SHA1(f642a7cb624ee14fb0e410de5ae1fc799d2fa1c2) ) // This is the same as the 515d77b6 rom above except the bootrom (0x785-0x7f7) is intact. No other difference.
ROM_END
ROM_START( arkanoidu ) // V2.0 US/Romstar
@@ -1513,7 +1510,7 @@ ROM_START( arkanoidu ) // V2.0 US/Romstar
ROM_END
/* Observed on a real TAITO J1100075A pcb (with K1100181A sticker), pcb is white painted, and has a "ROMSTAR(C) // All Rights Reserved // Serial No. // No 14128" sticker */
-ROM_START( arkanoiduo ) // V1.0 USA/Romstar
+ROM_START( arkanoiduo ) // V1.1 USA/Romstar
ROM_REGION( 0x10000, "maincpu", 0 ) /* Silkscreen: "IC17 27256" and "IC16 27256" */
ROM_LOAD( "a75__01-1.ic17", 0x0000, 0x8000, CRC(5bcda3b0) SHA1(52cadd38b5f8e8856f007a9c602d6b508f30be65) )
ROM_LOAD( "a75__10.ic16", 0x8000, 0x8000, CRC(a1769e15) SHA1(fbb45731246a098b29eb08de5d63074b496aaaba) )
@@ -1532,7 +1529,7 @@ ROM_START( arkanoiduo ) // V1.0 USA/Romstar
ROM_LOAD( "a75-09.ic22", 0x0400, 0x0200, CRC(a7c6c277) SHA1(adaa003dcd981576ea1cc5f697d709b2d6b2ea29) ) /* Chip Silkscreen: "A75-09"; blue component */
ROM_REGION( 0x8000, "altgfx", 0 )
- ROM_LOAD( "a75__03(alternate).ic64", 0x00000, 0x8000, CRC(983d4485) SHA1(603a8798d1f531a70a527a5c6122f0ffd6adcfb6) ) // this was found on a legit v1.0 Romstar USA pcb with serial number 29342; the only difference seems to be the first 32 tiles are all 0xFF instead of 0x00. Those tiles don't seem to be used by the game at all. This is likely another incidence of "Taito forgot to clear programmer ram before burning a rom from a sparse s-record/ihex file"
+ ROM_LOAD( "a75__03(alternate).ic64", 0x00000, 0x8000, CRC(983d4485) SHA1(603a8798d1f531a70a527a5c6122f0ffd6adcfb6) ) // this was found on a legit v1.1 Romstar USA pcb with serial number 29342; the only difference seems to be the first 32 tiles are all 0xFF instead of 0x00. Those tiles don't seem to be used by the game at all. This is likely another incidence of "Taito forgot to clear programmer ram before burning a rom from a sparse s-record/ihex file"
ROM_END
ROM_START( arkanoidj ) // V2.1 Japan
@@ -1615,7 +1612,7 @@ ROM_END
// Everything from here on is bootlegs
-ROM_START( arkanoidjbl ) // bootleg with MCU copied from real Taito code, but notice screen hacked up.
+ROM_START( arkanoidjbl )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "e1.6d", 0x0000, 0x8000, CRC(dd4f2b72) SHA1(399a8636030a702dafc1da926f115df6f045bef1) ) /* Hacked up Notice warning text */
ROM_LOAD( "e2.6f", 0x8000, 0x8000, CRC(bbc33ceb) SHA1(e9b6fef98d0d20e77c7a1c25eff8e9a8c668a258) ) /* == A75-02.IC16 */
@@ -1635,7 +1632,7 @@ ROM_START( arkanoidjbl ) // bootleg with MCU copied from real Taito code, but no
ROM_END
-ROM_START( arkanoidjbl2 ) // Bootleg with ??? MCU, probably the a75-06__bootleg_68705.ic14 515d77b6 one
+ROM_START( arkanoidjbl2 )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "1.ic81", 0x0000, 0x8000, CRC(9ff93dc2) SHA1(eee0975b799a8e6717f646dd40716dc454476106) )
ROM_LOAD( "2.ic82", 0x8000, 0x8000, CRC(bbc33ceb) SHA1(e9b6fef98d0d20e77c7a1c25eff8e9a8c668a258) ) /* == A75-02.IC16 */
@@ -1651,10 +1648,10 @@ ROM_START( arkanoidjbl2 ) // Bootleg with ??? MCU, probably the a75-06__bootleg_
ROM_REGION( 0x0600, "proms", 0 ) /* BPROMs are silkscreened as 7621, actual BPROMs used are MMI 6306-1N */
ROM_LOAD( "a75-07.ic24", 0x0000, 0x0200, CRC(0af8b289) SHA1(6bc589e8a609b4cf450aebedc8ce02d5d45c970f) ) /* red component */
ROM_LOAD( "a75-08.ic23", 0x0200, 0x0200, CRC(abb002fb) SHA1(c14f56b8ef103600862e7930709d293b0aa97a73) ) /* green component */
- ROM_LOAD( "a75-09.ic22", 0x0400, 0x0200, CRC(a7c6c277) SHA1(adaa003dcd981576ea1cc5f697d709b2d6b2ea29) ) /* blue component */
+ ROM_LOAD( "a75-09.ic23", 0x0400, 0x0200, CRC(a7c6c277) SHA1(adaa003dcd981576ea1cc5f697d709b2d6b2ea29) ) /* blue component */
ROM_END
-ROM_START( ark1ball ) /* This set requires a MCU. No MCU rom was supplied so we use the a75-06__bootleg_68705.ic14 515d77b6 one for now */
+ROM_START( ark1ball ) /* This set requires a MCU. No MCU rom was supplied so we use current A75-06.IC14 for now */
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "a-1.7d", 0x0000, 0x8000, CRC(dd4f2b72) SHA1(399a8636030a702dafc1da926f115df6f045bef1) )
ROM_LOAD( "2palline.7f", 0x8000, 0x8000, CRC(ed6b62ab) SHA1(4d4991b422756bd304fc5ef236aac1422fe1f999) )
@@ -1674,7 +1671,7 @@ ROM_START( ark1ball ) /* This set requires a MCU. No MCU rom was supplied so we
ROM_LOAD( "a75-09.bpr", 0x0400, 0x0200, CRC(a7c6c277) SHA1(adaa003dcd981576ea1cc5f697d709b2d6b2ea29) ) /* blue component */
ROM_END
-ROM_START( arkangc ) // Game Corporation set with no mcu, d008 read after reading paddle at d018 patched out or not present
+ROM_START( arkangc )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "arkgc.1", 0x0000, 0x8000, CRC(c54232e6) SHA1(beb759cee68009a06824b755d2aa26d7d436b5b0) )
ROM_LOAD( "arkgc.2", 0x8000, 0x8000, CRC(9f0d4754) SHA1(731c9224616a338084edd6944c754d68eabba7f2) )
@@ -1690,7 +1687,7 @@ ROM_START( arkangc ) // Game Corporation set with no mcu, d008 read after readin
ROM_LOAD( "a75-09.bpr", 0x0400, 0x0200, CRC(a7c6c277) SHA1(adaa003dcd981576ea1cc5f697d709b2d6b2ea29) ) /* blue component */
ROM_END
-ROM_START( arkangc2 ) // Game Corporation set with no mcu, has d008 read after reading paddle at d018, and bit 1 must be set
+ROM_START( arkangc2 )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "1.81", 0x0000, 0x8000, CRC(bd6eb996) SHA1(a048ff01156166595dca0b6bee46344f7db548a8) )
ROM_LOAD( "2.82", 0x8000, 0x8000, CRC(29dbe452) SHA1(b99cb98549bddf1e673e2e715c80664001581f9f) )
@@ -1706,7 +1703,6 @@ ROM_START( arkangc2 ) // Game Corporation set with no mcu, has d008 read after r
ROM_LOAD( "a75-09.bpr", 0x0400, 0x0200, CRC(a7c6c277) SHA1(adaa003dcd981576ea1cc5f697d709b2d6b2ea29) ) /* blue component */
ROM_END
-// This set (block2) and the next one (arkblock3) have the same 'space invader' scrambled block gfx, and an unknown (sound?) rom. No mention of what device(s) the extra rom is connected to.
ROM_START( block2 )
ROM_REGION( 0x18000, "maincpu", 0 )
ROM_LOAD( "1.bin", 0x00000, 0x8000, CRC(2b026cae) SHA1(73d1d5d3e6d65fbe378ce85ff501610573ae5e95) )
@@ -1727,7 +1723,8 @@ ROM_START( block2 )
ROM_LOAD( "a75-09.bpr", 0x0400, 0x0200, CRC(a7c6c277) SHA1(adaa003dcd981576ea1cc5f697d709b2d6b2ea29) ) /* blue component */
ROM_END
-// see comment for 'block2' set
+// this set has the same 'space invader' scrambled block gfx, and unknown (sound?) rom as the one above
+// sadly no mention of what chip it might be for in the readme.
ROM_START( arkbloc3 )
ROM_REGION( 0x18000, "maincpu", 0 )
ROM_LOAD( "blockbl.001", 0x00000, 0x8000, CRC(bf7197a0) SHA1(4fbc0cbc09d292ab0f2e4a35b30505b2f7e4dc0d) )
@@ -1748,7 +1745,7 @@ ROM_START( arkbloc3 )
ROM_LOAD( "a75-09.bpr", 0x0400, 0x0200, CRC(a7c6c277) SHA1(adaa003dcd981576ea1cc5f697d709b2d6b2ea29) ) /* blue component */
ROM_END
-ROM_START( arkblock ) // no mcu, no d008/d018/f000/f002 protection, just leftover writes
+ROM_START( arkblock )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "ark-6.bin", 0x0000, 0x8000, CRC(0be015de) SHA1(f4209085b59d2c96a62ac9657c7bf097da55362b) )
ROM_LOAD( "arkgc.2", 0x8000, 0x8000, CRC(9f0d4754) SHA1(731c9224616a338084edd6944c754d68eabba7f2) )
@@ -1764,7 +1761,7 @@ ROM_START( arkblock ) // no mcu, no d008/d018/f000/f002 protection, just leftove
ROM_LOAD( "a75-09.bpr", 0x0400, 0x0200, CRC(a7c6c277) SHA1(adaa003dcd981576ea1cc5f697d709b2d6b2ea29) ) /* blue component */
ROM_END
-ROM_START( arkbloc2 ) // no mcu, no d008/d018/f000/f002 protection, just leftover writes
+ROM_START( arkbloc2 )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "block01.bin", 0x0000, 0x8000, CRC(5be667e1) SHA1(fbc5c97d836c404a2e6c007c3836e36b52ae75a1) )
ROM_LOAD( "block02.bin", 0x8000, 0x8000, CRC(4f883ef1) SHA1(cb090a57fc75f17a3e2ba637f0e3ec93c1d02cea) )
@@ -1799,38 +1796,38 @@ Note:
1x 8 switches dip
Dumped 19/03/2006 */
-ROM_START( arkgcbl ) // similar to arkangc, but has added d008/d018/f000/f002 protection, likely using the PAL16R8
+ROM_START( arkgcbl )
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "electric__16.6e", 0x0000, 0x8000, CRC(b0f73900) SHA1(2c9a36cc1d2a3f33ec81d63c1c325554b818d2d3) )
- ROM_LOAD( "electric__17.6f", 0x8000, 0x8000, CRC(9827f297) SHA1(697874e73e045eb5a7bf333d7310934b239c0adf) )
+ ROM_LOAD( "16.6e", 0x0000, 0x8000, CRC(b0f73900) SHA1(2c9a36cc1d2a3f33ec81d63c1c325554b818d2d3) )
+ ROM_LOAD( "17.6f", 0x8000, 0x8000, CRC(9827f297) SHA1(697874e73e045eb5a7bf333d7310934b239c0adf) )
ROM_REGION( 0x18000, "gfx1", 0 )
- ROM_LOAD( "electric__18.3a", 0x00000, 0x8000, CRC(038b74ba) SHA1(ac053cc4908b4075f918748b89570e07a0ba5116) ) // = a75-03.ic64
- ROM_LOAD( "electric__19.3c", 0x08000, 0x8000, CRC(71fae199) SHA1(5d253c46ccf4cd2976a5fb8b8713f0f345443d06) ) // = a75-04.ic63
- ROM_LOAD( "electric__20.3d", 0x10000, 0x8000, CRC(c76374e2) SHA1(7520dd48de20db60a2038f134dcaa454988e7874) ) // = a75-05.ic62
+ ROM_LOAD( "a75-03.rom", 0x00000, 0x8000, CRC(038b74ba) SHA1(ac053cc4908b4075f918748b89570e07a0ba5116) )
+ ROM_LOAD( "a75-04.rom", 0x08000, 0x8000, CRC(71fae199) SHA1(5d253c46ccf4cd2976a5fb8b8713f0f345443d06) )
+ ROM_LOAD( "a75-05.rom", 0x10000, 0x8000, CRC(c76374e2) SHA1(7520dd48de20db60a2038f134dcaa454988e7874) )
ROM_REGION( 0x0600, "proms", 0 )
ROM_LOAD( "82s129.5k", 0x0000, 0x0100, CRC(fa70b64d) SHA1(273669d05f793cf1ee0741b175be281307fa9b5e) ) /* red component + */
- ROM_LOAD( "82s129.5jk", 0x0100, 0x0100, CRC(cca69884) SHA1(fdcd66110c8eb901a401f8618821c7980946a511) ) /* red component = a75-07.ic24*/
+ ROM_LOAD( "82s129.5jk", 0x0100, 0x0100, CRC(cca69884) SHA1(fdcd66110c8eb901a401f8618821c7980946a511) ) /* red component = a75-07.bpr*/
ROM_LOAD( "82s129.5l", 0x0200, 0x0100, CRC(3e4d2bf5) SHA1(c475887302dd137d6965769070b7d55f488c1b25) ) /* green component + */
- ROM_LOAD( "82s129.5kl", 0x0300, 0x0100, CRC(085d625a) SHA1(26c96a1c1b7562fed84c31dd92fdf7829e96a9c7) ) /* green component = a75-08.ic23*/
+ ROM_LOAD( "82s129.5kl", 0x0300, 0x0100, CRC(085d625a) SHA1(26c96a1c1b7562fed84c31dd92fdf7829e96a9c7) ) /* green component = a75-08.bpr*/
ROM_LOAD( "82s129.5mn", 0x0400, 0x0100, CRC(0fe0b108) SHA1(fcf27619208922345a1e42b3a219b4274f66968d) ) /* blue component + */
- ROM_LOAD( "63s141.5m", 0x0500, 0x0100, CRC(5553f675) SHA1(c50255af8d99664b92e0bb34a527fd42ebf7e759) ) /* blue component = a75-09.ic22*/
+ ROM_LOAD( "63s141.5m", 0x0500, 0x0100, CRC(5553f675) SHA1(c50255af8d99664b92e0bb34a527fd42ebf7e759) ) /* blue component = a75-09.bpr*/
ROM_REGION( 0x0200, "pal", 0 )
- ROM_LOAD( "pal16r8.5f", 0x0000, 0x0104, CRC(36471917) SHA1(d0f295a94d480b44416e66be4b480b299aad5c3c) ) /* likely used for the d008/d018/f000/f002 protection */
+ ROM_LOAD( "pal16r8.5f", 0x0000, 0x0104, CRC(36471917) SHA1(d0f295a94d480b44416e66be4b480b299aad5c3c) )
ROM_END
/* this one still has the original copyright intact */
-ROM_START( arkgcbla ) // similar to arkangc, but has added d008/d018/f000/f002 protection, likely using the PAL16R8
+ROM_START( arkgcbla )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "k101.e7", 0x0000, 0x8000, CRC(892a556e) SHA1(10d1a92f8ab1b8184b05182a2de070b163a603e2) )
ROM_LOAD( "k102.f7", 0x8000, 0x8000, CRC(d208d05c) SHA1(0aa99a0cb8211e7b90d681c91cc77aa7078a0ccc) )
ROM_REGION( 0x18000, "gfx1", 0 )
- ROM_LOAD( "a75-03.rom", 0x00000, 0x8000, CRC(038b74ba) SHA1(ac053cc4908b4075f918748b89570e07a0ba5116) ) // = a75-03.ic64
- ROM_LOAD( "a75-04.rom", 0x08000, 0x8000, CRC(71fae199) SHA1(5d253c46ccf4cd2976a5fb8b8713f0f345443d06) ) // = a75-04.ic63
- ROM_LOAD( "a75-05.rom", 0x10000, 0x8000, CRC(c76374e2) SHA1(7520dd48de20db60a2038f134dcaa454988e7874) ) // = a75-05.ic62
+ ROM_LOAD( "a75-03.rom", 0x00000, 0x8000, CRC(038b74ba) SHA1(ac053cc4908b4075f918748b89570e07a0ba5116) )
+ ROM_LOAD( "a75-04.rom", 0x08000, 0x8000, CRC(71fae199) SHA1(5d253c46ccf4cd2976a5fb8b8713f0f345443d06) )
+ ROM_LOAD( "a75-05.rom", 0x10000, 0x8000, CRC(c76374e2) SHA1(7520dd48de20db60a2038f134dcaa454988e7874) )
ROM_REGION( 0x0600, "proms", 0 )
ROM_LOAD( "82s129.5k", 0x0000, 0x0100, CRC(fa70b64d) SHA1(273669d05f793cf1ee0741b175be281307fa9b5e) ) /* red component + */
@@ -1841,7 +1838,7 @@ ROM_START( arkgcbla ) // similar to arkangc, but has added d008/d018/f000/f002 p
ROM_LOAD( "63s141.5m", 0x0500, 0x0100, CRC(5553f675) SHA1(c50255af8d99664b92e0bb34a527fd42ebf7e759) ) /* blue component = a75-09.bpr*/
ROM_REGION( 0x0200, "pal", 0 )
- ROM_LOAD( "pal16r8.5f", 0x0000, 0x0104, CRC(36471917) SHA1(d0f295a94d480b44416e66be4b480b299aad5c3c) ) /* likely used for the d008/d018/f000/f002 protection */
+ ROM_LOAD( "pal16r8.5f", 0x0000, 0x0104, CRC(36471917) SHA1(d0f295a94d480b44416e66be4b480b299aad5c3c) )
ROM_END
@@ -2142,7 +2139,7 @@ GAME( 1986, arkangc, arkanoid, bootleg, arkangc, arkanoid_state, arkangc,
GAME( 1986, arkangc2, arkanoid, bootleg, arkangc2, arkanoid_state, arkangc2, ROT90, "bootleg (Game Corporation)", "Arkanoid (Game Corporation bootleg, set 2)", MACHINE_SUPPORTS_SAVE )
GAME( 1986, arkblock, arkanoid, bootleg, arkangc, arkanoid_state, arkblock, ROT90, "bootleg (Game Corporation)", "Block (Game Corporation bootleg, set 1)", MACHINE_SUPPORTS_SAVE )
GAME( 1986, arkbloc2, arkanoid, bootleg, arkangc, arkanoid_state, arkbloc2, ROT90, "bootleg (Game Corporation)", "Block (Game Corporation bootleg, set 2)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, arkbloc3, arkanoid, bootleg, block2, arkanoid_state, block2, ROT90, "bootleg (Game Corporation)", "Block (Game Corporation bootleg, set 3)", MACHINE_SUPPORTS_SAVE ) // Both these sets (arkblock3, block2) have an extra unknown rom
+GAME( 1986, arkbloc3, arkanoid, bootleg, block2, arkanoid_state, block2, ROT90, "bootleg (Game Corporation)", "Block (Game Corporation bootleg, set 3)", MACHINE_SUPPORTS_SAVE ) // Both these sets have an extra unknown rom
GAME( 1986, block2, arkanoid, bootleg, block2, arkanoid_state, block2, ROT90, "bootleg (S.P.A. Co.)", "Block 2 (S.P.A. Co. bootleg)", MACHINE_SUPPORTS_SAVE ) // and scrambled gfx roms with 'space invader' themed gfx
GAME( 1986, arkgcbl, arkanoid, bootleg, arkgcbl, arkanoid_state, arkgcbl, ROT90, "bootleg", "Arkanoid (bootleg on Block hardware, set 1)", MACHINE_SUPPORTS_SAVE )
GAME( 1986, arkgcbla, arkanoid, bootleg, arkgcbl, arkanoid_state, arkgcbl, ROT90, "bootleg", "Arkanoid (bootleg on Block hardware, set 2)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/asteroid.cpp b/src/mame/drivers/asteroid.cpp
index fbaf3ba8be5..fc1d88c7169 100644
--- a/src/mame/drivers/asteroid.cpp
+++ b/src/mame/drivers/asteroid.cpp
@@ -772,23 +772,6 @@ ROM_START( asteroidb )
ROM_LOAD( "034602-01.c8", 0x0000, 0x0100, CRC(97953db8) SHA1(8cbded64d1dd35b18c4d5cece00f77e7b2cab2ad) )
ROM_END
-/* Space Rocks (J.Estevez, Barcelona).
- Seems to be a legit spanish set, since there are documented cabs
- registered in Spain.
-*/
-ROM_START( spcrocks )
- ROM_REGION( 0x8000, "maincpu", 0 )
- ROM_LOAD( "1.bin", 0x6800, 0x0800, CRC(0cc75459) SHA1(2af85c9689b878155004da47fedbde5853a18723) )
- ROM_LOAD( "2.bin", 0x7000, 0x0800, CRC(096ed35c) SHA1(064d680ded7f30c543f93ae5ca85f90d550f73e5) )
- ROM_LOAD( "3.bin", 0x7800, 0x0800, CRC(b912754d) SHA1(d4ada3e162ff454a48468f6309947276df0c5331) )
- /* Vector ROM */
- ROM_LOAD( "e.bin", 0x5000, 0x0800, CRC(148ef465) SHA1(4b1158112364bc55b8aab4127949f9238c36b238) )
-
- /* DVG PROM */
- ROM_REGION( 0x100, "user1", 0 )
- ROM_LOAD( "034602-01.c8", 0x0000, 0x0100, CRC(97953db8) SHA1(8cbded64d1dd35b18c4d5cece00f77e7b2cab2ad) )
-ROM_END
-
ROM_START( aerolitos )
ROM_REGION( 0x8000, "maincpu", 0 )
ROM_LOAD( "2516_1e.bin", 0x6800, 0x0800, CRC(0cc75459) SHA1(2af85c9689b878155004da47fedbde5853a18723) )
@@ -1040,7 +1023,6 @@ GAME( 1979, asteroid, 0, asteroid, asteroid, driver_device, 0,
GAME( 1979, asteroid2, asteroid, asteroid, asteroid, driver_device, 0, ROT0, "Atari", "Asteroids (rev 2)", MACHINE_SUPPORTS_SAVE )
GAME( 1979, asteroid1, asteroid, asteroid, asteroid, driver_device, 0, ROT0, "Atari", "Asteroids (rev 1)", MACHINE_SUPPORTS_SAVE )
GAME( 1979, asteroidb, asteroid, asteroid, asteroidb, asteroid_state, asteroidb, ROT0, "bootleg", "Asteroids (bootleg on Lunar Lander hardware)", MACHINE_SUPPORTS_SAVE )
-GAME( 1981, spcrocks, asteroid, asteroid, aerolitos, driver_device, 0, ROT0, "J.Estevez (Barcelona)", "Space Rocks (Spanish clone of Asteroids)", MACHINE_SUPPORTS_SAVE ) // Space Rocks seems to be a legit set. Cabinet registered to 'J.Estevez (Barcelona).
GAME( 1980, aerolitos, asteroid, asteroid, aerolitos, driver_device, 0, ROT0, "bootleg (Rodmar Elec.)","Aerolitos (Spanish bootleg of Asteroids)", MACHINE_SUPPORTS_SAVE ) // 'Aerolitos' appears on the cabinet, this was distributed in Spain, the Spanish text is different to that contained in the original version (corrected)
GAME( 1979, asterock, asteroid, asterock, asterock, asteroid_state, asterock, ROT0, "bootleg (Sidam)", "Asterock (Sidam bootleg of Asteroids)", MACHINE_SUPPORTS_SAVE )
GAME( 1979, asterockv, asteroid, asterock, asterock, asteroid_state, asterock, ROT0, "bootleg (Videotron)", "Asterock (Videotron bootleg of Asteroids)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/at.cpp b/src/mame/drivers/at.cpp
index d1fe3f3307d..f8a2519700e 100644
--- a/src/mame/drivers/at.cpp
+++ b/src/mame/drivers/at.cpp
@@ -17,7 +17,6 @@
#include "softlist.h"
static ADDRESS_MAP_START( at16_map, AS_PROGRAM, 16, at_state )
- ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(0x000000, 0x09ffff) AM_RAMBANK("bank10")
AM_RANGE(0x0c0000, 0x0c7fff) AM_ROM
AM_RANGE(0x0c8000, 0x0cffff) AM_ROM
@@ -27,7 +26,7 @@ static ADDRESS_MAP_START( at16_map, AS_PROGRAM, 16, at_state )
ADDRESS_MAP_END
static ADDRESS_MAP_START( ps2m30286_map, AS_PROGRAM, 16, at_state)
- AM_RANGE(0x000000, 0x09ffff) AM_RAMBANK("bank10")
+ AM_RANGE(0x000000, 0x09ffff) AM_RAMBANK("bank10")
AM_RANGE(0x0c0000, 0x0c7fff) AM_ROM
AM_RANGE(0x0c8000, 0x0cffff) AM_ROM
AM_RANGE(0x0d0000, 0x0dffff) AM_RAM
@@ -43,7 +42,6 @@ static ADDRESS_MAP_START( ps1_286_map, AS_PROGRAM, 16, at_state )
ADDRESS_MAP_END
static ADDRESS_MAP_START( at386_map, AS_PROGRAM, 32, at_state )
- ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(0x00000000, 0x0009ffff) AM_RAMBANK("bank10")
AM_RANGE(0x000a0000, 0x000bffff) AM_NOP
AM_RANGE(0x000c0000, 0x000c7fff) AM_ROM
diff --git a/src/mame/drivers/atarig1.cpp b/src/mame/drivers/atarig1.cpp
index b060c183f77..a3ad029f96b 100644
--- a/src/mame/drivers/atarig1.cpp
+++ b/src/mame/drivers/atarig1.cpp
@@ -428,6 +428,8 @@ static MACHINE_CONFIG_START( atarig1, atarig1_state )
MCFG_CPU_PROGRAM_MAP(main_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", atarigen_state, video_int_gen)
+ MCFG_SLAPSTIC_ADD("slapstic")
+
MCFG_MACHINE_START_OVERRIDE(atarig1_state,atarig1)
MCFG_MACHINE_RESET_OVERRIDE(atarig1_state,atarig1)
@@ -459,44 +461,12 @@ static MACHINE_CONFIG_START( atarig1, atarig1_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
-
static MACHINE_CONFIG_DERIVED( hydra, atarig1 )
MCFG_ATARIRLE_ADD("rle", modesc_hydra)
- MCFG_SLAPSTIC_ADD("slapstic", 116)
-MACHINE_CONFIG_END
-
-
-static MACHINE_CONFIG_DERIVED( hydrap, hydra )
- MCFG_DEVICE_REMOVE("slapstic")
MACHINE_CONFIG_END
-
-static MACHINE_CONFIG_DERIVED( pitfight9, atarig1 )
- MCFG_ATARIRLE_ADD("rle", modesc_pitfight)
- MCFG_SLAPSTIC_ADD("slapstic", 114)
-MACHINE_CONFIG_END
-
-
-static MACHINE_CONFIG_DERIVED( pitfight7, atarig1 )
- MCFG_ATARIRLE_ADD("rle", modesc_pitfight)
- MCFG_SLAPSTIC_ADD("slapstic", 112)
-MACHINE_CONFIG_END
-
-
static MACHINE_CONFIG_DERIVED( pitfight, atarig1 )
MCFG_ATARIRLE_ADD("rle", modesc_pitfight)
- MCFG_SLAPSTIC_ADD("slapstic", 111)
-MACHINE_CONFIG_END
-
-
-static MACHINE_CONFIG_DERIVED( pitfightj, atarig1 )
- MCFG_ATARIRLE_ADD("rle", modesc_pitfight)
- MCFG_SLAPSTIC_ADD("slapstic", 113)
-MACHINE_CONFIG_END
-
-
-static MACHINE_CONFIG_DERIVED( pitfightb, atarig1 )
- MCFG_ATARIRLE_ADD("rle", modesc_pitfight)
MACHINE_CONFIG_END
@@ -1228,30 +1198,28 @@ ROM_END
*
*************************************/
-DRIVER_INIT_MEMBER(atarig1_state,hydra)
+void atarig1_state::init_common(offs_t slapstic_base, int slapstic, bool is_pitfight)
{
- slapstic_configure(*m_maincpu, 0x078000, 0);
- m_is_pitfight = 0;
-}
+ if (slapstic == -1)
+ {
+ pitfightb_cheap_slapstic_init();
+ save_item(NAME(m_bslapstic_bank));
+ save_item(NAME(m_bslapstic_primed));
+ }
+ else if (slapstic != 0)
+ slapstic_configure(*m_maincpu, slapstic_base, 0, slapstic);
-DRIVER_INIT_MEMBER(atarig1_state,hydrap)
-{
- m_is_pitfight = 0;
+ m_is_pitfight = is_pitfight;
}
-DRIVER_INIT_MEMBER(atarig1_state,pitfight)
-{
- slapstic_configure(*m_maincpu, 0x038000, 0);
- m_is_pitfight = 1;
-}
+DRIVER_INIT_MEMBER(atarig1_state,hydra) { init_common(0x078000, 116, 0); }
+DRIVER_INIT_MEMBER(atarig1_state,hydrap) { init_common(0x000000, 0, 0); }
-DRIVER_INIT_MEMBER(atarig1_state,pitfightb)
-{
- pitfightb_cheap_slapstic_init();
- save_item(NAME(m_bslapstic_bank));
- save_item(NAME(m_bslapstic_primed));
- m_is_pitfight = 1;
-}
+DRIVER_INIT_MEMBER(atarig1_state,pitfight9) { init_common(0x038000, 114, 1); }
+DRIVER_INIT_MEMBER(atarig1_state,pitfight7) { init_common(0x038000, 112, 1); }
+DRIVER_INIT_MEMBER(atarig1_state,pitfight) { init_common(0x038000, 111, 1); }
+DRIVER_INIT_MEMBER(atarig1_state,pitfightj) { init_common(0x038000, 113, 1); }
+DRIVER_INIT_MEMBER(atarig1_state,pitfightb) { init_common(0x038000, -1, 1); }
/*************************************
@@ -1260,15 +1228,15 @@ DRIVER_INIT_MEMBER(atarig1_state,pitfightb)
*
*************************************/
-GAME( 1990, hydra, 0, hydra, hydra, atarig1_state, hydra, ROT0, "Atari Games", "Hydra", MACHINE_SUPPORTS_SAVE )
-GAME( 1990, hydrap, hydra, hydrap, hydra, atarig1_state, hydrap, ROT0, "Atari Games", "Hydra (prototype 5/14/90)", MACHINE_SUPPORTS_SAVE )
-GAME( 1990, hydrap2, hydra, hydrap, hydra, atarig1_state, hydrap, ROT0, "Atari Games", "Hydra (prototype 5/25/90)", MACHINE_SUPPORTS_SAVE )
-
-GAME( 1990, pitfight, 0, pitfight9, pitfight, atarig1_state, pitfight, ROT0, "Atari Games", "Pit Fighter (rev 9)", MACHINE_SUPPORTS_SAVE )
-GAME( 1990, pitfight7, pitfight, pitfight7, pitfight, atarig1_state, pitfight, ROT0, "Atari Games", "Pit Fighter (rev 7)", MACHINE_SUPPORTS_SAVE )
-GAME( 1990, pitfight6, pitfight, pitfightj, pitfight, atarig1_state, pitfight, ROT0, "Atari Games", "Pit Fighter (rev 6)", MACHINE_SUPPORTS_SAVE )
-GAME( 1990, pitfight5, pitfight, pitfight7, pitfight, atarig1_state, pitfight, ROT0, "Atari Games", "Pit Fighter (rev 5)", MACHINE_SUPPORTS_SAVE )
-GAME( 1990, pitfight4, pitfight, pitfight, pitfight, atarig1_state, pitfight, ROT0, "Atari Games", "Pit Fighter (rev 4)", MACHINE_SUPPORTS_SAVE )
-GAME( 1990, pitfight3, pitfight, pitfight, pitfight, atarig1_state, pitfight, ROT0, "Atari Games", "Pit Fighter (rev 3)", MACHINE_SUPPORTS_SAVE )
-GAME( 1990, pitfightj, pitfight, pitfightj, pitfightj, atarig1_state,pitfight, ROT0, "Atari Games", "Pit Fighter (Japan, 2 players)", MACHINE_SUPPORTS_SAVE )
-GAME( 1990, pitfightb, pitfight, pitfightb, pitfight, atarig1_state, pitfightb, ROT0, "bootleg", "Pit Fighter (bootleg)", MACHINE_SUPPORTS_SAVE )
+GAME( 1990, hydra, 0, hydra, hydra, atarig1_state, hydra, ROT0, "Atari Games", "Hydra", MACHINE_SUPPORTS_SAVE )
+GAME( 1990, hydrap, hydra, hydra, hydra, atarig1_state, hydrap, ROT0, "Atari Games", "Hydra (prototype 5/14/90)", MACHINE_SUPPORTS_SAVE )
+GAME( 1990, hydrap2, hydra, hydra, hydra, atarig1_state, hydrap, ROT0, "Atari Games", "Hydra (prototype 5/25/90)", MACHINE_SUPPORTS_SAVE )
+
+GAME( 1990, pitfight, 0, pitfight, pitfight, atarig1_state, pitfight9, ROT0, "Atari Games", "Pit Fighter (rev 9)", MACHINE_SUPPORTS_SAVE )
+GAME( 1990, pitfight7, pitfight, pitfight, pitfight, atarig1_state, pitfight7, ROT0, "Atari Games", "Pit Fighter (rev 7)", MACHINE_SUPPORTS_SAVE )
+GAME( 1990, pitfight6, pitfight, pitfight, pitfight, atarig1_state, pitfightj, ROT0, "Atari Games", "Pit Fighter (rev 6)", MACHINE_SUPPORTS_SAVE )
+GAME( 1990, pitfight5, pitfight, pitfight, pitfight, atarig1_state, pitfight7, ROT0, "Atari Games", "Pit Fighter (rev 5)", MACHINE_SUPPORTS_SAVE )
+GAME( 1990, pitfight4, pitfight, pitfight, pitfight, atarig1_state, pitfight, ROT0, "Atari Games", "Pit Fighter (rev 4)", MACHINE_SUPPORTS_SAVE )
+GAME( 1990, pitfight3, pitfight, pitfight, pitfight, atarig1_state, pitfight, ROT0, "Atari Games", "Pit Fighter (rev 3)", MACHINE_SUPPORTS_SAVE )
+GAME( 1990, pitfightj, pitfight, pitfight, pitfightj, atarig1_state,pitfightj, ROT0, "Atari Games", "Pit Fighter (Japan, 2 players)", MACHINE_SUPPORTS_SAVE )
+GAME( 1990, pitfightb, pitfight, pitfight, pitfight, atarig1_state, pitfightb, ROT0, "bootleg", "Pit Fighter (bootleg)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/atarisy1.cpp b/src/mame/drivers/atarisy1.cpp
index faf9e1d9562..bc643691371 100644
--- a/src/mame/drivers/atarisy1.cpp
+++ b/src/mame/drivers/atarisy1.cpp
@@ -713,6 +713,8 @@ static MACHINE_CONFIG_START( atarisy1, atarisy1_state )
MCFG_CPU_PROGRAM_MAP(main_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", atarigen_state, video_int_gen)
+ MCFG_SLAPSTIC_ADD("slapstic")
+
MCFG_CPU_ADD("audiocpu", M6502, ATARI_CLOCK_14MHz/8)
MCFG_CPU_PROGRAM_MAP(sound_map)
@@ -773,30 +775,6 @@ static MACHINE_CONFIG_START( atarisy1, atarisy1_state )
MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(atarisy1_state, via_pb_w))
MACHINE_CONFIG_END
-static MACHINE_CONFIG_DERIVED( marble, atarisy1 )
- MCFG_SLAPSTIC_ADD("slapstic", 103)
-MACHINE_CONFIG_END
-
-static MACHINE_CONFIG_DERIVED( peterpak, atarisy1 )
- MCFG_SLAPSTIC_ADD("slapstic", 107)
-MACHINE_CONFIG_END
-
-static MACHINE_CONFIG_DERIVED( indytemp, atarisy1 )
- MCFG_SLAPSTIC_ADD("slapstic", 105)
-MACHINE_CONFIG_END
-
-static MACHINE_CONFIG_DERIVED( roadrunn, atarisy1 )
- MCFG_SLAPSTIC_ADD("slapstic", 108)
-MACHINE_CONFIG_END
-
-static MACHINE_CONFIG_DERIVED( roadb109, atarisy1 )
- MCFG_SLAPSTIC_ADD("slapstic", 109)
-MACHINE_CONFIG_END
-
-static MACHINE_CONFIG_DERIVED( roadb110, atarisy1 )
- MCFG_SLAPSTIC_ADD("slapstic", 110)
-MACHINE_CONFIG_END
-
/*************************************
@@ -2427,7 +2405,7 @@ ROM_END
DRIVER_INIT_MEMBER(atarisy1_state,marble)
{
- slapstic_configure(*m_maincpu, 0x080000, 0);
+ slapstic_configure(*m_maincpu, 0x080000, 0, 103);
m_joystick_type = 0; /* none */
m_trackball_type = 1; /* rotated */
@@ -2436,7 +2414,7 @@ DRIVER_INIT_MEMBER(atarisy1_state,marble)
DRIVER_INIT_MEMBER(atarisy1_state,peterpak)
{
- slapstic_configure(*m_maincpu, 0x080000, 0);
+ slapstic_configure(*m_maincpu, 0x080000, 0, 107);
m_joystick_type = 1; /* digital */
m_trackball_type = 0; /* none */
@@ -2445,7 +2423,7 @@ DRIVER_INIT_MEMBER(atarisy1_state,peterpak)
DRIVER_INIT_MEMBER(atarisy1_state,indytemp)
{
- slapstic_configure(*m_maincpu, 0x080000, 0);
+ slapstic_configure(*m_maincpu, 0x080000, 0, 105);
m_joystick_type = 1; /* digital */
m_trackball_type = 0; /* none */
@@ -2454,16 +2432,25 @@ DRIVER_INIT_MEMBER(atarisy1_state,indytemp)
DRIVER_INIT_MEMBER(atarisy1_state,roadrunn)
{
- slapstic_configure(*m_maincpu, 0x080000, 0);
+ slapstic_configure(*m_maincpu, 0x080000, 0, 108);
m_joystick_type = 2; /* analog */
m_trackball_type = 0; /* none */
}
-DRIVER_INIT_MEMBER(atarisy1_state,roadblst)
+DRIVER_INIT_MEMBER(atarisy1_state,roadb109)
+{
+ slapstic_configure(*m_maincpu, 0x080000, 0, 109);
+
+ m_joystick_type = 3; /* pedal */
+ m_trackball_type = 2; /* steering wheel */
+}
+
+
+DRIVER_INIT_MEMBER(atarisy1_state,roadb110)
{
- slapstic_configure(*m_maincpu, 0x080000, 0);
+ slapstic_configure(*m_maincpu, 0x080000, 0, 110);
m_joystick_type = 3; /* pedal */
m_trackball_type = 2; /* steering wheel */
@@ -2477,35 +2464,35 @@ DRIVER_INIT_MEMBER(atarisy1_state,roadblst)
*
*************************************/
-GAME( 1984, atarisy1, 0, peterpak, peterpak, atarisy1_state, peterpak, ROT0, "Atari Games", "Atari System 1 BIOS", MACHINE_IS_BIOS_ROOT )
-
-GAME( 1984, marble, atarisy1, marble, marble, atarisy1_state, marble, ROT0, "Atari Games", "Marble Madness (set 1)", 0 )
-GAME( 1984, marble2, marble, marble, marble, atarisy1_state, marble, ROT0, "Atari Games", "Marble Madness (set 2)", 0 )
-GAME( 1984, marble3, marble, marble, marble, atarisy1_state, marble, ROT0, "Atari Games", "Marble Madness (set 3)", 0 )
-GAME( 1984, marble4, marble, marble, marble, atarisy1_state, marble, ROT0, "Atari Games", "Marble Madness (set 4)", 0 )
-GAME( 1984, marble5, marble, marble, marble, atarisy1_state, marble, ROT0, "Atari Games", "Marble Madness (set 5 - LSI Cartridge)", 0 )
-
-GAME( 1984, peterpak, atarisy1, peterpak, peterpak, atarisy1_state, peterpak, ROT0, "Atari Games", "Peter Pack-Rat", 0 )
-
-GAME( 1985, indytemp, atarisy1, indytemp, indytemp, atarisy1_state, indytemp, ROT0, "Atari Games", "Indiana Jones and the Temple of Doom (set 1)", 0 )
-GAME( 1985, indytemp2,indytemp, indytemp, indytemp, atarisy1_state, indytemp, ROT0, "Atari Games", "Indiana Jones and the Temple of Doom (set 2)", 0 )
-GAME( 1985, indytemp3,indytemp, indytemp, indytemp, atarisy1_state, indytemp, ROT0, "Atari Games", "Indiana Jones and the Temple of Doom (set 3)", 0 )
-GAME( 1985, indytemp4,indytemp, indytemp, indytemp, atarisy1_state, indytemp, ROT0, "Atari Games", "Indiana Jones and the Temple of Doom (set 4)", 0 )
-GAME( 1985, indytempd,indytemp, indytemp, indytemp, atarisy1_state, indytemp, ROT0, "Atari Games", "Indiana Jones and the Temple of Doom (German)", 0 )
-GAME( 1985, indytempc,indytemp, indytemp, indytemc, atarisy1_state, indytemp, ROT0, "Atari Games", "Indiana Jones and the Temple of Doom (Cocktail)", MACHINE_IMPERFECT_GRAPHICS )
-
-GAME( 1985, roadrunn, atarisy1, roadrunn, roadrunn, atarisy1_state, roadrunn, ROT0, "Atari Games", "Road Runner (rev 2)", 0 )
-GAME( 1985, roadrunn2,roadrunn, roadrunn, roadrunn, atarisy1_state, roadrunn, ROT0, "Atari Games", "Road Runner (rev 1+)", 0 )
-GAME( 1985, roadrunn1,roadrunn, roadrunn, roadrunn, atarisy1_state, roadrunn, ROT0, "Atari Games", "Road Runner (rev 1)", 0 )
-
-GAME( 1987, roadblst, atarisy1, roadb110, roadblst, atarisy1_state, roadblst, ROT0, "Atari Games", "Road Blasters (upright, rev 4)", 0 )
-GAME( 1987, roadblstg, roadblst, roadb109, roadblst, atarisy1_state, roadblst, ROT0, "Atari Games", "Road Blasters (upright, German, rev 3)", 0 )
-GAME( 1987, roadblst3, roadblst, roadb109, roadblst, atarisy1_state, roadblst, ROT0, "Atari Games", "Road Blasters (upright, rev 3)", 0 )
-GAME( 1987, roadblstg2, roadblst, roadb110, roadblst, atarisy1_state, roadblst, ROT0, "Atari Games", "Road Blasters (upright, German, rev 2)", 0 )
-GAME( 1987, roadblst2, roadblst, roadb110, roadblst, atarisy1_state, roadblst, ROT0, "Atari Games", "Road Blasters (upright, rev 2)", 0 )
-GAME( 1987, roadblstg1, roadblst, roadb109, roadblst, atarisy1_state, roadblst, ROT0, "Atari Games", "Road Blasters (upright, German, rev 1)", 0 )
-GAME( 1987, roadblst1, roadblst, roadb109, roadblst, atarisy1_state, roadblst, ROT0, "Atari Games", "Road Blasters (upright, rev 1)", 0 )
-GAME( 1987, roadblstc, roadblst, roadb110, roadblst, atarisy1_state, roadblst, ROT0, "Atari Games", "Road Blasters (cockpit, rev 2)", 0 )
-GAME( 1987, roadblstcg, roadblst, roadb109, roadblst, atarisy1_state, roadblst, ROT0, "Atari Games", "Road Blasters (cockpit, German, rev 1)", MACHINE_IMPERFECT_GRAPHICS )
-GAME( 1987, roadblstc1, roadblst, roadb109, roadblst, atarisy1_state, roadblst, ROT0, "Atari Games", "Road Blasters (cockpit, rev 1)", MACHINE_IMPERFECT_GRAPHICS )
-GAME( 1987, roadblstgu, roadblst, roadb109, roadblst, atarisy1_state, roadblst, ROT0, "Atari Games", "Road Blasters (upright, German, rev ?)", 0 )
+GAME( 1984, atarisy1, 0, atarisy1, peterpak, atarisy1_state, peterpak, ROT0, "Atari Games", "Atari System 1 BIOS", MACHINE_IS_BIOS_ROOT )
+
+GAME( 1984, marble, atarisy1, atarisy1, marble, atarisy1_state, marble, ROT0, "Atari Games", "Marble Madness (set 1)", 0 )
+GAME( 1984, marble2, marble, atarisy1, marble, atarisy1_state, marble, ROT0, "Atari Games", "Marble Madness (set 2)", 0 )
+GAME( 1984, marble3, marble, atarisy1, marble, atarisy1_state, marble, ROT0, "Atari Games", "Marble Madness (set 3)", 0 )
+GAME( 1984, marble4, marble, atarisy1, marble, atarisy1_state, marble, ROT0, "Atari Games", "Marble Madness (set 4)", 0 )
+GAME( 1984, marble5, marble, atarisy1, marble, atarisy1_state, marble, ROT0, "Atari Games", "Marble Madness (set 5 - LSI Cartridge)", 0 )
+
+GAME( 1984, peterpak, atarisy1, atarisy1, peterpak, atarisy1_state, peterpak, ROT0, "Atari Games", "Peter Pack-Rat", 0 )
+
+GAME( 1985, indytemp, atarisy1, atarisy1, indytemp, atarisy1_state, indytemp, ROT0, "Atari Games", "Indiana Jones and the Temple of Doom (set 1)", 0 )
+GAME( 1985, indytemp2,indytemp, atarisy1, indytemp, atarisy1_state, indytemp, ROT0, "Atari Games", "Indiana Jones and the Temple of Doom (set 2)", 0 )
+GAME( 1985, indytemp3,indytemp, atarisy1, indytemp, atarisy1_state, indytemp, ROT0, "Atari Games", "Indiana Jones and the Temple of Doom (set 3)", 0 )
+GAME( 1985, indytemp4,indytemp, atarisy1, indytemp, atarisy1_state, indytemp, ROT0, "Atari Games", "Indiana Jones and the Temple of Doom (set 4)", 0 )
+GAME( 1985, indytempd,indytemp, atarisy1, indytemp, atarisy1_state, indytemp, ROT0, "Atari Games", "Indiana Jones and the Temple of Doom (German)", 0 )
+GAME( 1985, indytempc,indytemp, atarisy1, indytemc, atarisy1_state, indytemp, ROT0, "Atari Games", "Indiana Jones and the Temple of Doom (Cocktail)", MACHINE_IMPERFECT_GRAPHICS )
+
+GAME( 1985, roadrunn, atarisy1, atarisy1, roadrunn, atarisy1_state, roadrunn, ROT0, "Atari Games", "Road Runner (rev 2)", 0 )
+GAME( 1985, roadrunn2,roadrunn, atarisy1, roadrunn, atarisy1_state, roadrunn, ROT0, "Atari Games", "Road Runner (rev 1+)", 0 )
+GAME( 1985, roadrunn1,roadrunn, atarisy1, roadrunn, atarisy1_state, roadrunn, ROT0, "Atari Games", "Road Runner (rev 1)", 0 )
+
+GAME( 1987, roadblst, atarisy1, atarisy1, roadblst, atarisy1_state, roadb110, ROT0, "Atari Games", "Road Blasters (upright, rev 4)", 0 )
+GAME( 1987, roadblstg, roadblst, atarisy1, roadblst, atarisy1_state, roadb109, ROT0, "Atari Games", "Road Blasters (upright, German, rev 3)", 0 )
+GAME( 1987, roadblst3, roadblst, atarisy1, roadblst, atarisy1_state, roadb109, ROT0, "Atari Games", "Road Blasters (upright, rev 3)", 0 )
+GAME( 1987, roadblstg2, roadblst, atarisy1, roadblst, atarisy1_state, roadb110, ROT0, "Atari Games", "Road Blasters (upright, German, rev 2)", 0 )
+GAME( 1987, roadblst2, roadblst, atarisy1, roadblst, atarisy1_state, roadb110, ROT0, "Atari Games", "Road Blasters (upright, rev 2)", 0 )
+GAME( 1987, roadblstg1, roadblst, atarisy1, roadblst, atarisy1_state, roadb109, ROT0, "Atari Games", "Road Blasters (upright, German, rev 1)", 0 )
+GAME( 1987, roadblst1, roadblst, atarisy1, roadblst, atarisy1_state, roadb109, ROT0, "Atari Games", "Road Blasters (upright, rev 1)", 0 )
+GAME( 1987, roadblstc, roadblst, atarisy1, roadblst, atarisy1_state, roadb110, ROT0, "Atari Games", "Road Blasters (cockpit, rev 2)", 0 )
+GAME( 1987, roadblstcg, roadblst, atarisy1, roadblst, atarisy1_state, roadb109, ROT0, "Atari Games", "Road Blasters (cockpit, German, rev 1)", MACHINE_IMPERFECT_GRAPHICS )
+GAME( 1987, roadblstc1, roadblst, atarisy1, roadblst, atarisy1_state, roadb109, ROT0, "Atari Games", "Road Blasters (cockpit, rev 1)", MACHINE_IMPERFECT_GRAPHICS )
+GAME( 1987, roadblstgu, roadblst, atarisy1, roadblst, atarisy1_state, roadb109, ROT0, "Atari Games", "Road Blasters (upright, German, rev ?)", 0 )
diff --git a/src/mame/drivers/atarisy2.cpp b/src/mame/drivers/atarisy2.cpp
index 72161c4ca03..539e86f5a05 100644
--- a/src/mame/drivers/atarisy2.cpp
+++ b/src/mame/drivers/atarisy2.cpp
@@ -127,6 +127,9 @@
#include "emu.h"
#include "includes/atarisy2.h"
+#include "sound/tms5220.h"
+#include "sound/2151intf.h"
+#include "sound/pokey.h"
#define MASTER_CLOCK XTAL_20MHz
@@ -325,7 +328,7 @@ READ8_MEMBER(atarisy2_state::switch_6502_r)
{
int result = ioport("1840")->read();
- if (m_tms5220.found() && (m_tms5220->readyq_r() == 0))
+ if ((m_has_tms5220) && (machine().device<tms5220_device>("tms")->readyq_r() == 0))
result &= ~0x04;
if (!(ioport("1801")->read() & 0x80)) result |= 0x10;
@@ -337,10 +340,10 @@ WRITE8_MEMBER(atarisy2_state::switch_6502_w)
{
output().set_led_value(0, data & 0x04);
output().set_led_value(1, data & 0x08);
- if (m_tms5220.found())
+ if (m_has_tms5220)
{
data = 12 | ((data >> 5) & 1);
- m_tms5220->set_frequency(MASTER_CLOCK/4 / (16 - data) / 2);
+ machine().device<tms5220_device>("tms")->set_frequency(MASTER_CLOCK/4 / (16 - data) / 2);
}
}
@@ -626,7 +629,7 @@ WRITE8_MEMBER(atarisy2_state::mixer_w)
if (!(data & 0x02)) rbott += 1.0/47;
if (!(data & 0x04)) rbott += 1.0/22;
gain = (rbott == 0) ? 1.0 : ((1.0/rbott) / (rtop + (1.0/rbott)));
- m_ym2151->set_output_gain(ALL_OUTPUTS, gain);
+ set_ym2151_volume(gain * 100);
/* bits 3-4 control the volume of the POKEYs, using 47k and 100k resistors */
rtop = 1.0/(1.0/100 + 1.0/100);
@@ -634,20 +637,16 @@ WRITE8_MEMBER(atarisy2_state::mixer_w)
if (!(data & 0x08)) rbott += 1.0/47;
if (!(data & 0x10)) rbott += 1.0/22;
gain = (rbott == 0) ? 1.0 : ((1.0/rbott) / (rtop + (1.0/rbott)));
- m_pokey1->set_output_gain(ALL_OUTPUTS, gain);
- m_pokey2->set_output_gain(ALL_OUTPUTS, gain);
+ set_pokey_volume(gain * 100);
/* bits 5-7 control the volume of the TMS5220, using 22k, 47k, and 100k resistors */
- if (m_tms5220.found())
- {
- rtop = 1.0/(1.0/100 + 1.0/100);
- rbott = 0;
- if (!(data & 0x20)) rbott += 1.0/100;
- if (!(data & 0x40)) rbott += 1.0/47;
- if (!(data & 0x80)) rbott += 1.0/22;
- gain = (rbott == 0) ? 1.0 : ((1.0/rbott) / (rtop + (1.0/rbott)));
- m_tms5220->set_output_gain(ALL_OUTPUTS, gain);
- }
+ rtop = 1.0/(1.0/100 + 1.0/100);
+ rbott = 0;
+ if (!(data & 0x20)) rbott += 1.0/100;
+ if (!(data & 0x40)) rbott += 1.0/47;
+ if (!(data & 0x80)) rbott += 1.0/22;
+ gain = (rbott == 0) ? 1.0 : ((1.0/rbott) / (rtop + (1.0/rbott)));
+ set_tms5220_volume(gain * 100);
}
@@ -665,9 +664,9 @@ WRITE8_MEMBER(atarisy2_state::sound_reset_w)
/* a large number of signals are reset when this happens */
m_soundcomm->reset();
machine().device("ymsnd")->reset();
- if (m_tms5220.found())
+ if (m_has_tms5220)
{
- m_tms5220->reset(); // technically what happens is the tms5220 gets a long stream of 0xFF written to it when sound_reset_state is 0 which halts the chip after a few frames, but this works just as well, even if it isn't exactly true to hardware... The hardware may not have worked either, the resistors to pull input to 0xFF are fighting against the ls263 gate holding the latched value to be sent to the chip.
+ machine().device("tms")->reset(); // technically what happens is the tms5220 gets a long stream of 0xFF written to it when sound_reset_state is 0 which halts the chip after a few frames, but this works just as well, even if it isn't exactly true to hardware... The hardware may not have worked either, the resistors to pull input to 0xFF are fighting against the ls263 gate holding the latched value to be sent to the chip.
}
mixer_w(space, 0, 0);
}
@@ -715,17 +714,17 @@ READ8_MEMBER(atarisy2_state::sound_6502_r)
WRITE8_MEMBER(atarisy2_state::tms5220_w)
{
- if (m_tms5220.found())
+ if (m_has_tms5220)
{
- m_tms5220->data_w(space, 0, data);
+ machine().device<tms5220_device>("tms")->data_w(space, 0, data);
}
}
WRITE8_MEMBER(atarisy2_state::tms5220_strobe_w)
{
- if (m_tms5220.found())
+ if (m_has_tms5220)
{
- m_tms5220->wsq_w(1-(offset & 1));
+ machine().device<tms5220_device>("tms")->wsq_w(1-(offset & 1));
}
}
@@ -1194,6 +1193,8 @@ static MACHINE_CONFIG_START( atarisy2, atarisy2_state )
MCFG_CPU_PROGRAM_MAP(sound_map)
MCFG_DEVICE_PERIODIC_INT_DEVICE("soundcomm", atari_sound_comm_device, sound_irq_gen, (double)MASTER_CLOCK/2/16/16/16/10)
+ MCFG_SLAPSTIC_ADD("slapstic")
+
MCFG_MACHINE_START_OVERRIDE(atarisy2_state,atarisy2)
MCFG_MACHINE_RESET_OVERRIDE(atarisy2_state,atarisy2)
@@ -1239,42 +1240,15 @@ static MACHINE_CONFIG_START( atarisy2, atarisy2_state )
MACHINE_CONFIG_END
-static MACHINE_CONFIG_DERIVED( paperboy, atarisy2 )
- MCFG_SLAPSTIC_ADD("slapstic", 105)
-MACHINE_CONFIG_END
-
-
-static MACHINE_CONFIG_DERIVED( 720, atarisy2 )
- /* without the default EEPROM, 720 hangs at startup due to communication
- issues with the sound CPU; temporarily increasing the sound CPU frequency
- to ~2.2MHz "fixes" the problem */
-
- MCFG_SLAPSTIC_ADD("slapstic", 107)
-MACHINE_CONFIG_END
-
+static MACHINE_CONFIG_DERIVED( sprint, atarisy2 )
-static MACHINE_CONFIG_DERIVED( ssprint, atarisy2 )
- MCFG_SLAPSTIC_ADD("slapstic", 108)
-
- /* sound hardware */
- MCFG_DEVICE_REMOVE("tms")
-MACHINE_CONFIG_END
-
-
-static MACHINE_CONFIG_DERIVED( csprint, atarisy2 )
- MCFG_SLAPSTIC_ADD("slapstic", 109)
+ /* basic machine hardware */
/* sound hardware */
MCFG_DEVICE_REMOVE("tms")
MACHINE_CONFIG_END
-static MACHINE_CONFIG_DERIVED( apb, atarisy2 )
- MCFG_SLAPSTIC_ADD("slapstic", 110)
-MACHINE_CONFIG_END
-
-
-
/*************************************
*
@@ -3157,7 +3131,7 @@ DRIVER_INIT_MEMBER(atarisy2_state,paperboy)
int i;
UINT8 *cpu1 = memregion("maincpu")->base();
- m_slapstic->slapstic_init();
+ m_slapstic->slapstic_init(machine(), 105);
/* expand the 16k program ROMs into full 64k chunks */
for (i = 0x10000; i < 0x90000; i += 0x20000)
@@ -3168,16 +3142,21 @@ DRIVER_INIT_MEMBER(atarisy2_state,paperboy)
}
m_pedal_count = 0;
- m_tms5220->rsq_w(1); // /RS is tied high on sys2 hw
+ m_has_tms5220 = 1;
+ machine().device<tms5220_device>("tms")->rsq_w(1); // /RS is tied high on sys2 hw
}
DRIVER_INIT_MEMBER(atarisy2_state,720)
{
- m_slapstic->slapstic_init();
+ /* without the default EEPROM, 720 hangs at startup due to communication
+ issues with the sound CPU; temporarily increasing the sound CPU frequency
+ to ~2.2MHz "fixes" the problem */
+ m_slapstic->slapstic_init(machine(), 107);
m_pedal_count = -1;
- m_tms5220->rsq_w(1); // /RS is tied high on sys2 hw
+ m_has_tms5220 = 1;
+ machine().device<tms5220_device>("tms")->rsq_w(1); // /RS is tied high on sys2 hw
}
@@ -3186,13 +3165,14 @@ DRIVER_INIT_MEMBER(atarisy2_state,ssprint)
int i;
UINT8 *cpu1 = memregion("maincpu")->base();
- m_slapstic->slapstic_init();
+ m_slapstic->slapstic_init(machine(), 108);
/* expand the 32k program ROMs into full 64k chunks */
for (i = 0x10000; i < 0x90000; i += 0x20000)
memcpy(&cpu1[i + 0x10000], &cpu1[i], 0x10000);
m_pedal_count = 3;
+ m_has_tms5220 = 0;
}
@@ -3201,22 +3181,24 @@ DRIVER_INIT_MEMBER(atarisy2_state,csprint)
int i;
UINT8 *cpu1 = memregion("maincpu")->base();
- m_slapstic->slapstic_init();
+ m_slapstic->slapstic_init(machine(), 109);
/* expand the 32k program ROMs into full 64k chunks */
for (i = 0x10000; i < 0x90000; i += 0x20000)
memcpy(&cpu1[i + 0x10000], &cpu1[i], 0x10000);
m_pedal_count = 2;
+ m_has_tms5220 = 0;
}
DRIVER_INIT_MEMBER(atarisy2_state,apb)
{
- m_slapstic->slapstic_init();
+ m_slapstic->slapstic_init(machine(), 110);
m_pedal_count = 2;
- m_tms5220->rsq_w(1); // /RS is tied high on sys2 hw
+ m_has_tms5220 = 1;
+ machine().device<tms5220_device>("tms")->rsq_w(1); // /RS is tied high on sys2 hw
}
@@ -3227,40 +3209,40 @@ DRIVER_INIT_MEMBER(atarisy2_state,apb)
*
*************************************/
-GAME( 1984, paperboy, 0, paperboy, paperboy, atarisy2_state, paperboy, ROT0, "Atari Games", "Paperboy (rev 3)", MACHINE_SUPPORTS_SAVE )
-GAME( 1984, paperboyr2,paperboy, paperboy, paperboy, atarisy2_state, paperboy, ROT0, "Atari Games", "Paperboy (rev 2)", MACHINE_SUPPORTS_SAVE )
-GAME( 1984, paperboyr1,paperboy, paperboy, paperboy, atarisy2_state, paperboy, ROT0, "Atari Games", "Paperboy (rev 1)", MACHINE_SUPPORTS_SAVE )
-
-GAME( 1986, 720, 0, 720, 720, atarisy2_state, 720, ROT0, "Atari Games", "720 Degrees (rev 4)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, 720r3, 720, 720, 720, atarisy2_state, 720, ROT0, "Atari Games", "720 Degrees (rev 3)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, 720r2, 720, 720, 720, atarisy2_state, 720, ROT0, "Atari Games", "720 Degrees (rev 2)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, 720r1, 720, 720, 720, atarisy2_state, 720, ROT0, "Atari Games", "720 Degrees (rev 1)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, 720g, 720, 720, 720, atarisy2_state, 720, ROT0, "Atari Games", "720 Degrees (German, rev 2)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, 720gr1, 720, 720, 720, atarisy2_state, 720, ROT0, "Atari Games", "720 Degrees (German, rev 1)", MACHINE_SUPPORTS_SAVE )
-
-GAME( 1986, ssprint, 0, ssprint, ssprint, atarisy2_state, ssprint, ROT0, "Atari Games", "Super Sprint (rev 4)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, ssprint3, ssprint, ssprint, ssprint, atarisy2_state, ssprint, ROT0, "Atari Games", "Super Sprint (rev 3)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, ssprint1, ssprint, ssprint, ssprint, atarisy2_state, ssprint, ROT0, "Atari Games", "Super Sprint (rev 1)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, ssprintg, ssprint, ssprint, ssprint, atarisy2_state, ssprint, ROT0, "Atari Games", "Super Sprint (German, rev 2)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, ssprintg1,ssprint, ssprint, ssprint, atarisy2_state, ssprint, ROT0, "Atari Games", "Super Sprint (German, rev 1)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, ssprintf, ssprint, ssprint, ssprint, atarisy2_state, ssprint, ROT0, "Atari Games", "Super Sprint (French)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, ssprints, ssprint, ssprint, ssprint, atarisy2_state, ssprint, ROT0, "Atari Games", "Super Sprint (Spanish)", MACHINE_SUPPORTS_SAVE )
-
-GAME( 1986, csprint, 0, csprint, csprint, atarisy2_state, csprint, ROT0, "Atari Games", "Championship Sprint (rev 3)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, csprint2, csprint, csprint, csprint, atarisy2_state, csprint, ROT0, "Atari Games", "Championship Sprint (rev 2)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, csprint1, csprint, csprint, csprint, atarisy2_state, csprint, ROT0, "Atari Games", "Championship Sprint (rev 1)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, csprintg, csprint, csprint, csprint, atarisy2_state, csprint, ROT0, "Atari Games", "Championship Sprint (German, rev 2)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, csprintg1,csprint, csprint, csprint, atarisy2_state, csprint, ROT0, "Atari Games", "Championship Sprint (German, rev 1)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, csprintf, csprint, csprint, csprint, atarisy2_state, csprint, ROT0, "Atari Games", "Championship Sprint (French)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, csprints, csprint, csprint, csprint, atarisy2_state, csprint, ROT0, "Atari Games", "Championship Sprint (Spanish, rev 2)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, csprints1,csprint, csprint, csprint, atarisy2_state, csprint, ROT0, "Atari Games", "Championship Sprint (Spanish, rev 1)", MACHINE_SUPPORTS_SAVE )
-
-GAME( 1987, apb, 0, apb, apb, atarisy2_state, apb, ROT270, "Atari Games", "APB - All Points Bulletin (rev 7)", MACHINE_SUPPORTS_SAVE )
-GAME( 1987, apb6, apb, apb, apb, atarisy2_state, apb, ROT270, "Atari Games", "APB - All Points Bulletin (rev 6)", MACHINE_SUPPORTS_SAVE )
-GAME( 1987, apb5, apb, apb, apb, atarisy2_state, apb, ROT270, "Atari Games", "APB - All Points Bulletin (rev 5)", MACHINE_SUPPORTS_SAVE )
-GAME( 1987, apb4, apb, apb, apb, atarisy2_state, apb, ROT270, "Atari Games", "APB - All Points Bulletin (rev 4)", MACHINE_SUPPORTS_SAVE )
-GAME( 1987, apb3, apb, apb, apb, atarisy2_state, apb, ROT270, "Atari Games", "APB - All Points Bulletin (rev 3)", MACHINE_SUPPORTS_SAVE )
-GAME( 1987, apb2, apb, apb, apb, atarisy2_state, apb, ROT270, "Atari Games", "APB - All Points Bulletin (rev 2)", MACHINE_SUPPORTS_SAVE )
-GAME( 1987, apb1, apb, apb, apb, atarisy2_state, apb, ROT270, "Atari Games", "APB - All Points Bulletin (rev 1)", MACHINE_SUPPORTS_SAVE )
-GAME( 1987, apbg, apb, apb, apb, atarisy2_state, apb, ROT270, "Atari Games", "APB - All Points Bulletin (German)", MACHINE_SUPPORTS_SAVE )
-GAME( 1987, apbf, apb, apb, apb, atarisy2_state, apb, ROT270, "Atari Games", "APB - All Points Bulletin (French)", MACHINE_SUPPORTS_SAVE )
+GAME( 1984, paperboy, 0, atarisy2, paperboy, atarisy2_state, paperboy, ROT0, "Atari Games", "Paperboy (rev 3)", MACHINE_SUPPORTS_SAVE )
+GAME( 1984, paperboyr2,paperboy, atarisy2, paperboy, atarisy2_state, paperboy, ROT0, "Atari Games", "Paperboy (rev 2)", MACHINE_SUPPORTS_SAVE )
+GAME( 1984, paperboyr1,paperboy, atarisy2, paperboy, atarisy2_state, paperboy, ROT0, "Atari Games", "Paperboy (rev 1)", MACHINE_SUPPORTS_SAVE )
+
+GAME( 1986, 720, 0, atarisy2, 720, atarisy2_state, 720, ROT0, "Atari Games", "720 Degrees (rev 4)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, 720r3, 720, atarisy2, 720, atarisy2_state, 720, ROT0, "Atari Games", "720 Degrees (rev 3)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, 720r2, 720, atarisy2, 720, atarisy2_state, 720, ROT0, "Atari Games", "720 Degrees (rev 2)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, 720r1, 720, atarisy2, 720, atarisy2_state, 720, ROT0, "Atari Games", "720 Degrees (rev 1)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, 720g, 720, atarisy2, 720, atarisy2_state, 720, ROT0, "Atari Games", "720 Degrees (German, rev 2)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, 720gr1, 720, atarisy2, 720, atarisy2_state, 720, ROT0, "Atari Games", "720 Degrees (German, rev 1)", MACHINE_SUPPORTS_SAVE )
+
+GAME( 1986, ssprint, 0, sprint, ssprint, atarisy2_state, ssprint, ROT0, "Atari Games", "Super Sprint (rev 4)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, ssprint3, ssprint, sprint, ssprint, atarisy2_state, ssprint, ROT0, "Atari Games", "Super Sprint (rev 3)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, ssprint1, ssprint, sprint, ssprint, atarisy2_state, ssprint, ROT0, "Atari Games", "Super Sprint (rev 1)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, ssprintg, ssprint, sprint, ssprint, atarisy2_state, ssprint, ROT0, "Atari Games", "Super Sprint (German, rev 2)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, ssprintg1,ssprint, sprint, ssprint, atarisy2_state, ssprint, ROT0, "Atari Games", "Super Sprint (German, rev 1)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, ssprintf, ssprint, sprint, ssprint, atarisy2_state, ssprint, ROT0, "Atari Games", "Super Sprint (French)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, ssprints, ssprint, sprint, ssprint, atarisy2_state, ssprint, ROT0, "Atari Games", "Super Sprint (Spanish)", MACHINE_SUPPORTS_SAVE )
+
+GAME( 1986, csprint, 0, sprint, csprint, atarisy2_state, csprint, ROT0, "Atari Games", "Championship Sprint (rev 3)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, csprint2, csprint, sprint, csprint, atarisy2_state, csprint, ROT0, "Atari Games", "Championship Sprint (rev 2)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, csprint1, csprint, sprint, csprint, atarisy2_state, csprint, ROT0, "Atari Games", "Championship Sprint (rev 1)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, csprintg, csprint, sprint, csprint, atarisy2_state, csprint, ROT0, "Atari Games", "Championship Sprint (German, rev 2)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, csprintg1,csprint, sprint, csprint, atarisy2_state, csprint, ROT0, "Atari Games", "Championship Sprint (German, rev 1)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, csprintf, csprint, sprint, csprint, atarisy2_state, csprint, ROT0, "Atari Games", "Championship Sprint (French)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, csprints, csprint, sprint, csprint, atarisy2_state, csprint, ROT0, "Atari Games", "Championship Sprint (Spanish, rev 2)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, csprints1,csprint, sprint, csprint, atarisy2_state, csprint, ROT0, "Atari Games", "Championship Sprint (Spanish, rev 1)", MACHINE_SUPPORTS_SAVE )
+
+GAME( 1987, apb, 0, atarisy2, apb, atarisy2_state, apb, ROT270, "Atari Games", "APB - All Points Bulletin (rev 7)", MACHINE_SUPPORTS_SAVE )
+GAME( 1987, apb6, apb, atarisy2, apb, atarisy2_state, apb, ROT270, "Atari Games", "APB - All Points Bulletin (rev 6)", MACHINE_SUPPORTS_SAVE )
+GAME( 1987, apb5, apb, atarisy2, apb, atarisy2_state, apb, ROT270, "Atari Games", "APB - All Points Bulletin (rev 5)", MACHINE_SUPPORTS_SAVE )
+GAME( 1987, apb4, apb, atarisy2, apb, atarisy2_state, apb, ROT270, "Atari Games", "APB - All Points Bulletin (rev 4)", MACHINE_SUPPORTS_SAVE )
+GAME( 1987, apb3, apb, atarisy2, apb, atarisy2_state, apb, ROT270, "Atari Games", "APB - All Points Bulletin (rev 3)", MACHINE_SUPPORTS_SAVE )
+GAME( 1987, apb2, apb, atarisy2, apb, atarisy2_state, apb, ROT270, "Atari Games", "APB - All Points Bulletin (rev 2)", MACHINE_SUPPORTS_SAVE )
+GAME( 1987, apb1, apb, atarisy2, apb, atarisy2_state, apb, ROT270, "Atari Games", "APB - All Points Bulletin (rev 1)", MACHINE_SUPPORTS_SAVE )
+GAME( 1987, apbg, apb, atarisy2, apb, atarisy2_state, apb, ROT270, "Atari Games", "APB - All Points Bulletin (German)", MACHINE_SUPPORTS_SAVE )
+GAME( 1987, apbf, apb, atarisy2, apb, atarisy2_state, apb, ROT270, "Atari Games", "APB - All Points Bulletin (French)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/atetris.cpp b/src/mame/drivers/atetris.cpp
index a4f0365d896..61892668c33 100644
--- a/src/mame/drivers/atetris.cpp
+++ b/src/mame/drivers/atetris.cpp
@@ -330,7 +330,7 @@ static MACHINE_CONFIG_START( atetris, atetris_state )
MCFG_CPU_ADD("maincpu", M6502,MASTER_CLOCK/8)
MCFG_CPU_PROGRAM_MAP(main_map)
- MCFG_SLAPSTIC_ADD("slapstic", 101)
+ MCFG_SLAPSTIC_ADD("slapstic")
MCFG_NVRAM_ADD_1FILL("nvram")
@@ -367,7 +367,7 @@ static MACHINE_CONFIG_START( atetrisb2, atetris_state )
MCFG_CPU_ADD("maincpu", M6502,BOOTLEG_CLOCK/8)
MCFG_CPU_PROGRAM_MAP(atetrisb2_map)
- MCFG_SLAPSTIC_ADD("slapstic", 101)
+ MCFG_SLAPSTIC_ADD("slapstic")
MCFG_NVRAM_ADD_1FILL("nvram")
@@ -544,7 +544,7 @@ DRIVER_INIT_MEMBER(atetris_state,atetris)
{
UINT8 *rgn = memregion("maincpu")->base();
- m_slapstic_device->slapstic_init();
+ m_slapstic_device->slapstic_init(machine(), 101);
m_slapstic_source = &rgn[0x10000];
m_slapstic_base = &rgn[0x04000];
}
diff --git a/src/mame/drivers/atom.cpp b/src/mame/drivers/atom.cpp
index 6e8cb6e473f..6952735fb9e 100644
--- a/src/mame/drivers/atom.cpp
+++ b/src/mame/drivers/atom.cpp
@@ -602,14 +602,8 @@ WRITE_LINE_MEMBER( atom_state::atom_8271_interrupt_callback )
WRITE_LINE_MEMBER( atom_state::motor_w )
{
- for (int i=0; i != 2; i++) {
- char devname[1];
- sprintf(devname, "%d", i);
- floppy_connector *con = m_fdc->subdevice<floppy_connector>(devname);
- if (con) {
- con->get_device()->mon_w(!state);
- }
- }
+ m_fdc->subdevice<floppy_connector>("0")->get_device()->mon_w(!state);
+ m_fdc->subdevice<floppy_connector>("1")->get_device()->mon_w(!state);
}
TIMER_DEVICE_CALLBACK_MEMBER(atom_state::cassette_output_tick)
diff --git a/src/mame/drivers/blmbycar.cpp b/src/mame/drivers/blmbycar.cpp
index b3bef4ec1c6..9c04c73df6f 100644
--- a/src/mame/drivers/blmbycar.cpp
+++ b/src/mame/drivers/blmbycar.cpp
@@ -41,11 +41,12 @@ Check game speed, it depends on a bit we toggle..
/* The top 64k of samples are banked (16 banks total) */
-WRITE16_MEMBER(blmbycar_state::okibank_w)
+WRITE16_MEMBER(blmbycar_state::blmbycar_okibank_w)
{
if (ACCESSING_BITS_0_7)
{
- membank("okibank")->set_entry(data & 0x0f);
+ UINT8 *RAM = memregion("oki")->base();
+ memcpy(&RAM[0x30000], &RAM[0x40000 + 0x10000 * (data & 0xf)], 0x10000);
}
}
@@ -97,12 +98,12 @@ READ16_MEMBER(blmbycar_state::blmbycar_opt_wheel_r)
***************************************************************************/
-static ADDRESS_MAP_START( common_map, AS_PROGRAM, 16, blmbycar_state )
+static ADDRESS_MAP_START( blmbycar_map, AS_PROGRAM, 16, blmbycar_state )
AM_RANGE(0x000000, 0x0fffff) AM_ROM
AM_RANGE(0xfec000, 0xfeffff) AM_RAM
AM_RANGE(0x100000, 0x103fff) AM_WRITEONLY // ???
- AM_RANGE(0x104000, 0x105fff) AM_RAM_WRITE(vram_1_w) AM_SHARE("vram_1") // Layer 1
- AM_RANGE(0x106000, 0x107fff) AM_RAM_WRITE(vram_0_w) AM_SHARE("vram_0") // Layer 0
+ AM_RANGE(0x104000, 0x105fff) AM_RAM_WRITE(blmbycar_vram_1_w) AM_SHARE("vram_1") // Layer 1
+ AM_RANGE(0x106000, 0x107fff) AM_RAM_WRITE(blmbycar_vram_0_w) AM_SHARE("vram_0") // Layer 0
AM_RANGE(0x108000, 0x10bfff) AM_WRITEONLY // ???
AM_RANGE(0x10c000, 0x10c003) AM_WRITEONLY AM_SHARE("scroll_1") // Scroll 1
AM_RANGE(0x10c004, 0x10c007) AM_WRITEONLY AM_SHARE("scroll_0") // Scroll 0
@@ -112,17 +113,12 @@ static ADDRESS_MAP_START( common_map, AS_PROGRAM, 16, blmbycar_state )
AM_RANGE(0x444000, 0x445fff) AM_WRITEONLY AM_SHARE("spriteram")// Sprites (size?)
AM_RANGE(0x700000, 0x700001) AM_READ_PORT("DSW")
AM_RANGE(0x700002, 0x700003) AM_READ_PORT("P1_P2")
- AM_RANGE(0x70000c, 0x70000d) AM_WRITE(okibank_w) // Sound
- AM_RANGE(0x70000e, 0x70000f) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff) // Sound
-ADDRESS_MAP_END
-
-static ADDRESS_MAP_START( blmbycar_map, AS_PROGRAM, 16, blmbycar_state )
- AM_IMPORT_FROM(common_map)
-
AM_RANGE(0x700004, 0x700005) AM_READ(blmbycar_opt_wheel_r) // Wheel (optical)
AM_RANGE(0x700006, 0x700007) AM_READ_PORT("UNK")
AM_RANGE(0x700008, 0x700009) AM_READ(blmbycar_pot_wheel_r) // Wheel (potentiometer)
AM_RANGE(0x70000a, 0x70000b) AM_WRITENOP // ? Wheel
+ AM_RANGE(0x70000c, 0x70000d) AM_WRITE(blmbycar_okibank_w) // Sound
+ AM_RANGE(0x70000e, 0x70000f) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff) // Sound
AM_RANGE(0x70006a, 0x70006b) AM_WRITE(blmbycar_pot_wheel_reset_w) // Wheel (potentiometer)
AM_RANGE(0x70007a, 0x70007b) AM_WRITE(blmbycar_pot_wheel_shift_w) //
ADDRESS_MAP_END
@@ -134,16 +130,25 @@ READ16_MEMBER(blmbycar_state::waterball_unk_r)
}
static ADDRESS_MAP_START( watrball_map, AS_PROGRAM, 16, blmbycar_state )
- AM_IMPORT_FROM(common_map)
-
+ AM_RANGE(0x000000, 0x0fffff) AM_ROM
+ AM_RANGE(0xfec000, 0xfeffff) AM_RAM
+ AM_RANGE(0x100000, 0x103fff) AM_WRITEONLY // ???
+ AM_RANGE(0x104000, 0x105fff) AM_RAM_WRITE(blmbycar_vram_1_w) AM_SHARE("vram_1") // Layer 1
+ AM_RANGE(0x106000, 0x107fff) AM_RAM_WRITE(blmbycar_vram_0_w) AM_SHARE("vram_0") // Layer 0
+ AM_RANGE(0x108000, 0x10bfff) AM_WRITEONLY // ???
+ AM_RANGE(0x10c000, 0x10c003) AM_WRITEONLY AM_SHARE("scroll_1") // Scroll 1
+ AM_RANGE(0x10c004, 0x10c007) AM_WRITEONLY AM_SHARE("scroll_0") // Scroll 0
+ AM_RANGE(0x200000, 0x2005ff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") AM_MIRROR(0x4000) // Palette
+ AM_RANGE(0x200600, 0x203fff) AM_RAM AM_MIRROR(0x4000)
+ AM_RANGE(0x440000, 0x441fff) AM_RAM
+ AM_RANGE(0x444000, 0x445fff) AM_WRITEONLY AM_SHARE("spriteram")// Sprites (size?)
+ AM_RANGE(0x700000, 0x700001) AM_READ_PORT("DSW")
+ AM_RANGE(0x700002, 0x700003) AM_READ_PORT("P1_P2")
AM_RANGE(0x700006, 0x700007) AM_READNOP // read
AM_RANGE(0x700008, 0x700009) AM_READ(waterball_unk_r) // 0x0008 must toggle
AM_RANGE(0x70000a, 0x70000b) AM_WRITEONLY // ?? busy
-ADDRESS_MAP_END
-
-static ADDRESS_MAP_START( blmbycar_oki_map, AS_0, 8, blmbycar_state )
- AM_RANGE(0x00000, 0x2ffff) AM_ROM
- AM_RANGE(0x30000, 0x3ffff) AM_ROMBANK("okibank")
+ AM_RANGE(0x70000c, 0x70000d) AM_WRITE(blmbycar_okibank_w) // Sound
+ AM_RANGE(0x70000e, 0x70000f) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff) //
ADDRESS_MAP_END
/***************************************************************************
@@ -329,8 +334,6 @@ MACHINE_START_MEMBER(blmbycar_state,blmbycar)
{
save_item(NAME(m_pot_wheel));
save_item(NAME(m_old_val));
-
- membank("okibank")->configure_entries(0, 16, memregion("oki")->base(), 0x10000);
}
MACHINE_RESET_MEMBER(blmbycar_state,blmbycar)
@@ -356,7 +359,7 @@ static MACHINE_CONFIG_START( blmbycar, blmbycar_state )
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
MCFG_SCREEN_SIZE(0x180, 0x100)
MCFG_SCREEN_VISIBLE_AREA(0, 0x180-1, 0, 0x100-1)
- MCFG_SCREEN_UPDATE_DRIVER(blmbycar_state, screen_update)
+ MCFG_SCREEN_UPDATE_DRIVER(blmbycar_state, screen_update_blmbycar)
MCFG_SCREEN_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", blmbycar)
@@ -368,7 +371,6 @@ static MACHINE_CONFIG_START( blmbycar, blmbycar_state )
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
MCFG_OKIM6295_ADD("oki", XTAL_1MHz, OKIM6295_PIN7_HIGH) // clock frequency & pin 7 not verified
- MCFG_DEVICE_ADDRESS_MAP(AS_0, blmbycar_oki_map)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
MACHINE_CONFIG_END
@@ -377,8 +379,6 @@ MACHINE_CONFIG_END
MACHINE_START_MEMBER(blmbycar_state,watrball)
{
save_item(NAME(m_retvalue));
-
- membank("okibank")->configure_entries(0, 16, memregion("oki")->base(), 0x10000);
}
MACHINE_RESET_MEMBER(blmbycar_state,watrball)
@@ -386,19 +386,35 @@ MACHINE_RESET_MEMBER(blmbycar_state,watrball)
m_retvalue = 0;
}
-static MACHINE_CONFIG_DERIVED( watrball, blmbycar )
+static MACHINE_CONFIG_START( watrball, blmbycar_state )
/* basic machine hardware */
- MCFG_CPU_MODIFY("maincpu")
+ MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/2) /* 12MHz */
MCFG_CPU_PROGRAM_MAP(watrball_map)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", blmbycar_state, irq1_line_hold)
MCFG_MACHINE_START_OVERRIDE(blmbycar_state,watrball)
MCFG_MACHINE_RESET_OVERRIDE(blmbycar_state,watrball)
/* video hardware */
- MCFG_SCREEN_MODIFY("screen")
+ MCFG_SCREEN_ADD("screen", RASTER)
+ MCFG_SCREEN_REFRESH_RATE(60)
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
+ MCFG_SCREEN_SIZE(0x180, 0x100)
MCFG_SCREEN_VISIBLE_AREA(0, 0x180-1, 16, 0x100-1)
+ MCFG_SCREEN_UPDATE_DRIVER(blmbycar_state, screen_update_blmbycar)
+ MCFG_SCREEN_PALETTE("palette")
+
+ MCFG_GFXDECODE_ADD("gfxdecode", "palette", blmbycar)
+ MCFG_PALETTE_ADD("palette", 0x300)
+ MCFG_PALETTE_FORMAT(xxxxBBBBRRRRGGGG)
+
+ /* sound hardware */
+ MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
+
+ MCFG_OKIM6295_ADD("oki", XTAL_1MHz, OKIM6295_PIN7_HIGH) // clock frequency & pin 7 not verified
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
MACHINE_CONFIG_END
@@ -434,9 +450,10 @@ ROM_START( blmbycar )
ROM_LOAD( "bc_rom9", 0x100000, 0x080000, CRC(0337ab3d) SHA1(18c72cd640c7b599390dffaeb670f5832202bf06) )
ROM_LOAD( "bc_rom10", 0x180000, 0x080000, CRC(5458917e) SHA1(c8dd5a391cc20a573e27a140b185893a8c04859e) )
- ROM_REGION( 0x100000, "oki", 0 ) /* 8 bit adpcm (banked) */
- ROM_LOAD( "bc_rom1", 0x000000, 0x080000, CRC(ac6f8ba1) SHA1(69d2d47cdd331bde5a8973d29659b3f8520452e7) )
- ROM_LOAD( "bc_rom2", 0x080000, 0x080000, CRC(a4bc31bf) SHA1(f3d60141a91449a73f6cec9f4bc5d95ca7911e19) )
+ ROM_REGION( 0x140000, "oki", 0 ) /* 8 bit adpcm (banked) */
+ ROM_LOAD( "bc_rom1", 0x040000, 0x080000, CRC(ac6f8ba1) SHA1(69d2d47cdd331bde5a8973d29659b3f8520452e7) )
+ ROM_LOAD( "bc_rom2", 0x0c0000, 0x080000, CRC(a4bc31bf) SHA1(f3d60141a91449a73f6cec9f4bc5d95ca7911e19) )
+ ROM_COPY( "oki", 0x040000, 0x000000, 0x040000 )
ROM_END
ROM_START( blmbycaru )
@@ -450,9 +467,10 @@ ROM_START( blmbycaru )
ROM_LOAD( "bc_rom9", 0x100000, 0x080000, CRC(0337ab3d) SHA1(18c72cd640c7b599390dffaeb670f5832202bf06) )
ROM_LOAD( "bc_rom10", 0x180000, 0x080000, CRC(5458917e) SHA1(c8dd5a391cc20a573e27a140b185893a8c04859e) )
- ROM_REGION( 0x100000, "oki", 0 ) /* 8 bit adpcm (banked) */
- ROM_LOAD( "bc_rom1", 0x000000, 0x080000, CRC(ac6f8ba1) SHA1(69d2d47cdd331bde5a8973d29659b3f8520452e7) )
- ROM_LOAD( "bc_rom2", 0x080000, 0x080000, CRC(a4bc31bf) SHA1(f3d60141a91449a73f6cec9f4bc5d95ca7911e19) )
+ ROM_REGION( 0x140000, "oki", 0 ) /* 8 bit adpcm (banked) */
+ ROM_LOAD( "bc_rom1", 0x040000, 0x080000, CRC(ac6f8ba1) SHA1(69d2d47cdd331bde5a8973d29659b3f8520452e7) )
+ ROM_LOAD( "bc_rom2", 0x0c0000, 0x080000, CRC(a4bc31bf) SHA1(f3d60141a91449a73f6cec9f4bc5d95ca7911e19) )
+ ROM_COPY( "oki", 0x040000, 0x000000, 0x040000 )
ROM_END
/*
@@ -460,7 +478,7 @@ ROM_END
Waterball by ABM (sticker on the pcb 12-3-96)
The pcb has some empty sockets, maybe it was used for other games since it has no markings.
-The game has fonts identical to World Rally and obviously Blomby Car ;)
+The game has fonts identical to World rally and obiviously Blomby car ;)
1x 68k
1x oki 6295
@@ -482,9 +500,10 @@ ROM_START( watrball )
ROM_LOAD( "rom9.bin", 0x100000, 0x080000, CRC(122cc0ad) SHA1(27cdb19fa082089e47c5cdb44742cfd93aa23a00) )
ROM_LOAD( "rom10.bin", 0x180000, 0x080000, CRC(22a2a706) SHA1(c7350a94a857e0007d7fc0076b44a3d62693cb6c) )
- ROM_REGION( 0x100000, "oki", 0 ) /* 8 bit adpcm (banked) */
- ROM_LOAD( "rom1.bin", 0x000000, 0x080000, CRC(7f88dee7) SHA1(d493b961fa4631185a33faee7f61786430707209))
-// ROM_LOAD( "rom2.bin", 0x080000, 0x080000, /* not populated for this game */ )
+ ROM_REGION( 0x140000, "oki", 0 ) /* 8 bit adpcm (banked) */
+ ROM_LOAD( "rom1.bin", 0x040000, 0x080000, CRC(7f88dee7) SHA1(d493b961fa4631185a33faee7f61786430707209))
+// ROM_LOAD( "rom2.bin", 0x0c0000, 0x080000, /* not populated for this game */ )
+ ROM_COPY( "oki", 0x040000, 0x000000, 0x040000 )
ROM_END
diff --git a/src/mame/drivers/bublbobl.cpp b/src/mame/drivers/bublbobl.cpp
index f79a6e7c61a..f2fba272e1d 100644
--- a/src/mame/drivers/bublbobl.cpp
+++ b/src/mame/drivers/bublbobl.cpp
@@ -1550,42 +1550,6 @@ ROM_START( sboblboblc )
ROM_END
-
-ROM_START( sboblbobld )
- ROM_REGION( 0x30000, "maincpu", 0 )
- ROM_LOAD( "3.bin", 0x00000, 0x08000, CRC(524cdc4f) SHA1(f778e53f664e911a5b992a4f85bcad1097eaa36f) )
- /* ROMs banked at 8000-bfff */
- ROM_LOAD( "5.bin", 0x10000, 0x08000, CRC(13118eb1) SHA1(5a5da40c2cc82420f70bc58ffa32de1088c6c82f) )
- ROM_LOAD( "4.bin", 0x18000, 0x08000, CRC(13fe9baa) SHA1(ca1ca240d755621e533d9bbbdd8d953154670499) )
- /* 20000-2ffff empty */
-
- ROM_REGION( 0x10000, "slave", 0 ) /* 64k for the second CPU */
- ROM_LOAD( "1.bin", 0x0000, 0x08000, CRC(ae11a07b) SHA1(af7a335c8da637103103cc274e077f123908ebb7) )
-
- ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for the third CPU */
- ROM_LOAD( "2.bin", 0x0000, 0x08000, CRC(4f9a26e8) SHA1(3105b34b88a7134493c2b3f584729f8b0407a011) )
-
- ROM_REGION( 0x80000, "gfx1", ROMREGION_INVERT )
- ROM_LOAD( "12", 0x00000, 0x8000, CRC(20358c22) SHA1(2297af6c53d5807bf90a8e081075b8c72a994fc5) ) /* 1st plane */
- ROM_LOAD( "13", 0x08000, 0x8000, CRC(930168a9) SHA1(fd358c3c3b424bca285f67a1589eb98a345ff670) )
- ROM_LOAD( "14", 0x10000, 0x8000, CRC(9773e512) SHA1(33c1687ee575d66bf0e98add45d06da827813765) )
- ROM_LOAD( "15", 0x18000, 0x8000, CRC(d045549b) SHA1(0c12077d3ddc2ce6aa45a0224ad5540f3f218446) )
- ROM_LOAD( "16", 0x20000, 0x8000, CRC(d0af35c5) SHA1(c5a89f4d73acc0db86654540b3abfd77b3757db5) )
- ROM_LOAD( "17", 0x28000, 0x8000, CRC(7b5369a8) SHA1(1307b26d80e6f36ebe6c442bebec41d20066eaf9) )
- /* 0x30000-0x3ffff empty */
- ROM_LOAD( "6", 0x40000, 0x8000, CRC(6b61a413) SHA1(44eddf12fb46fceca2addbe6da929aaea7636b13) ) /* 2nd plane */
- ROM_LOAD( "7", 0x48000, 0x8000, CRC(b5492d97) SHA1(d5b045e3ebaa44809757a4220cefb3c6815470da) )
- ROM_LOAD( "8", 0x50000, 0x8000, CRC(d69762d5) SHA1(3326fef4e0bd86681a3047dc11886bb171ecb609) )
- ROM_LOAD( "9", 0x58000, 0x8000, CRC(9f243b68) SHA1(32dce8d311a4be003693182a999e4053baa6bb0a) )
- ROM_LOAD( "10", 0x60000, 0x8000, CRC(66e9438c) SHA1(b94e62b6fbe7f4e08086d0365afc5cff6e0ccafd) )
- ROM_LOAD( "11", 0x68000, 0x8000, CRC(9ef863ad) SHA1(29f91b5a3765e4d6e6c3382db1d8d8297b6e56c8) )
- /* 0x70000-0x7ffff empty */
-
- ROM_REGION( 0x0100, "proms", 0 )
- ROM_LOAD( "a71-25.41", 0x0000, 0x0100, CRC(2d0f8545) SHA1(089c31e2f614145ef2743164f7b52ae35bc06808) ) /* video timing */
-
-ROM_END
-
ROM_START( bub68705 )
ROM_REGION( 0x30000, "maincpu", 0 ) /* Program roms match Bubble Bobble (older) */
ROM_LOAD( "2.bin", 0x00000, 0x08000, CRC(32c8305b) SHA1(6bf69b3edfbefd33cd670a762b4bf0b39629a220) )
@@ -1897,7 +1861,6 @@ GAME( 1986, boblbobl, bublbobl, boblbobl, boblbobl, bublbobl_state, bublbobl
GAME( 1986, sboblbobl, bublbobl, boblbobl, sboblbobl, bublbobl_state, bublbobl, ROT0, "bootleg (Datsu)", "Super Bobble Bobble (bootleg, set 1)", MACHINE_SUPPORTS_SAVE )
GAME( 1986, sboblbobla, bublbobl, boblbobl, boblbobl, bublbobl_state, bublbobl, ROT0, "bootleg", "Super Bobble Bobble (bootleg, set 2)", MACHINE_SUPPORTS_SAVE )
GAME( 1986, sboblboblb, bublbobl, boblbobl, sboblboblb, bublbobl_state, bublbobl, ROT0, "bootleg", "Super Bobble Bobble (bootleg, set 3)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, sboblbobld, bublbobl, boblbobl, sboblboblb, bublbobl_state, bublbobl, ROT0, "bootleg", "Super Bobble Bobble (bootleg, set 4)", MACHINE_SUPPORTS_SAVE )
GAME( 1986, sboblboblc, bublbobl, boblbobl, sboblboblb, bublbobl_state, bublbobl, ROT0, "bootleg", "Super Bubble Bobble (bootleg)", MACHINE_SUPPORTS_SAVE ) // the title screen on this one isn't hacked
GAME( 1986, bub68705, bublbobl, bub68705, bublbobl, bublbobl_state, bublbobl, ROT0, "bootleg", "Bubble Bobble (bootleg with 68705)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/bw12.cpp b/src/mame/drivers/bw12.cpp
index e0b9a4584de..fb9e1ce66c2 100644
--- a/src/mame/drivers/bw12.cpp
+++ b/src/mame/drivers/bw12.cpp
@@ -574,8 +574,8 @@ static MACHINE_CONFIG_START( common, bw12_state )
MCFG_PIA_WRITEPB_HANDLER(DEVWRITE8("cent_data_out", output_latch_device, write))
MCFG_PIA_CA2_HANDLER(DEVWRITELINE(CENTRONICS_TAG, centronics_device, write_strobe))
MCFG_PIA_CB2_HANDLER(WRITELINE(bw12_state, pia_cb2_w))
- MCFG_PIA_IRQA_HANDLER(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0))
- MCFG_PIA_IRQB_HANDLER(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0))
+ MCFG_PIA_IRQA_HANDLER(DEVWRITELINE(Z80_TAG, z80_device, irq_line))
+ MCFG_PIA_IRQB_HANDLER(DEVWRITELINE(Z80_TAG, z80_device, irq_line))
MCFG_Z80SIO0_ADD(Z80SIO_TAG, XTAL_16MHz/4, 0, 0, 0, 0)
MCFG_Z80DART_OUT_TXDA_CB(DEVWRITELINE(RS232_A_TAG, rs232_port_device, write_txd))
diff --git a/src/mame/drivers/camplynx.cpp b/src/mame/drivers/camplynx.cpp
index d5647dfbcde..96cc919dfb9 100644
--- a/src/mame/drivers/camplynx.cpp
+++ b/src/mame/drivers/camplynx.cpp
@@ -831,7 +831,7 @@ static MACHINE_CONFIG_START( lynx48k, camplynx_state )
MCFG_MC6845_SHOW_BORDER_AREA(false)
MCFG_MC6845_CHAR_WIDTH(8)
MCFG_MC6845_UPDATE_ROW_CB(camplynx_state, lynx48k_update_row)
- MCFG_MC6845_OUT_VSYNC_CB(INPUTLINE("maincpu", INPUT_LINE_IRQ0))
+ MCFG_MC6845_OUT_VSYNC_CB(DEVWRITELINE("maincpu", z80_device, irq_line))
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( lynx96k, lynx48k )
@@ -871,7 +871,7 @@ static MACHINE_CONFIG_START( lynx128k, camplynx_state )
MCFG_MC6845_SHOW_BORDER_AREA(false)
MCFG_MC6845_CHAR_WIDTH(8)
MCFG_MC6845_UPDATE_ROW_CB(camplynx_state, lynx128k_update_row)
- MCFG_MC6845_OUT_VSYNC_CB(INPUTLINE("maincpu", INPUT_LINE_IRQ0))
+ MCFG_MC6845_OUT_VSYNC_CB(DEVWRITELINE("maincpu", z80_device, irq_line))
MCFG_FRAGMENT_ADD(lynx_disk)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/chihiro.cpp b/src/mame/drivers/chihiro.cpp
index 0b81164dd90..366ef73c704 100644
--- a/src/mame/drivers/chihiro.cpp
+++ b/src/mame/drivers/chihiro.cpp
@@ -1015,7 +1015,7 @@ ROM_START( mj2c )
ROM_LOAD( "317-0374-jpn.pic", 0x000000, 0x004000, CRC(004f77a1) SHA1(bc5c6950293f3bff60bf7913d20a2046aa19ea69) )
ROM_END
-ROM_START( mj2f )
+ROM_START( mj2 )
CHIHIRO_BIOS
DISK_REGION( "gdrom" )
@@ -1041,11 +1041,12 @@ track01.bin 150 599 1058400
track02.raw 750 2101 3179904
track03.bin 45150 549299 1185760800
*/
-ROM_START( mj2 )
+ROM_START( mj2g )
CHIHIRO_BIOS
DISK_REGION( "gdrom" )
- DISK_IMAGE_READONLY( "gdx-0006g", 0, SHA1(b8c8b440d4cd2488be78e3a002058ea5b176a1f2) )
+ // this is not CHDv4, but a really bad dump, only ~1/3 of disk content is dumped
+ DISK_IMAGE_READONLY( "gdx-0006g", 0, BAD_DUMP SHA1(e306837d5c093fdf1e9ff02239a8563535b1c181) )
ROM_REGION( 0x4000, "pic", ROMREGION_ERASEFF)
ROM_LOAD( "317-0374-jpn.pic", 0x000000, 0x004000, CRC(004f77a1) SHA1(bc5c6950293f3bff60bf7913d20a2046aa19ea69) )
@@ -1236,8 +1237,8 @@ ROM_END
/* 0006C */ GAME( 2004, mj2c, mj2, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "Sega Network Taisen Mahjong MJ 2 (Rev C) (GDX-0006C)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING )
// 0006D GAME( 2004, mj2d, mj2, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "Sega Network Taisen Mahjong MJ 2 (Rev D) (GDX-0006D)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING )
// 0006E GAME( 2004, mj2e, mj2, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "Sega Network Taisen Mahjong MJ 2 (Rev E) (GDX-0006E)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING )
-/* 0006F */ GAME( 2004, mj2f, mj2, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "Sega Network Taisen Mahjong MJ 2 (Rev F) (GDX-0006F)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING )
-/* 0006G */ GAME( 2004, mj2, chihiro, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "Sega Network Taisen Mahjong MJ 2 (Rev G) (GDX-0006G)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING )
+/* 0006F */ GAME( 2004, mj2, chihiro, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "Sega Network Taisen Mahjong MJ 2 (Rev F) (GDX-0006F)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING )
+/* 0006G */ GAME( 2004, mj2g, mj2, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "Sega Network Taisen Mahjong MJ 2 (Rev G) (GDX-0006G)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING )
/* 0007 */ GAME( 2004, ollie, chihiro, chihirogd, chihiro, driver_device, 0, ROT0, "Sega / Amusement Vision", "Ollie King (GDX-0007)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING )
// 0008 GAME( 2004, wangmdjo, wangmidj, chihirogd, chihiro, driver_device, 0, ROT0, "Namco", "Wangan Midnight Maximum Tune (Japan) (GDX-0008)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING )
// 0008A GAME( 2004, wangmdja, wangmidj, chihirogd, chihiro, driver_device, 0, ROT0, "Namco", "Wangan Midnight Maximum Tune (Japan) (Rev A) (GDX-0008A)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/cobra.cpp b/src/mame/drivers/cobra.cpp
index 8062af06612..c7b749278e5 100644
--- a/src/mame/drivers/cobra.cpp
+++ b/src/mame/drivers/cobra.cpp
@@ -155,8 +155,7 @@
0x000a4: Viewport height / 2?
0x000ac: Viewport center Y
- 0x00114: xxxxxxxx xxxxxxxx -------- -------- Framebuffer pixel read line count
- -------- -------- xxxxxxxx xxxxxxxx Framebuffer pixel read pixel count
+ 0x00114: High word: framebuffer pitch? Low word: framebuffer pixel size?
0x00118: xxxxxxxx xxxxxxxx -------- -------- Framebuffer pixel read X pos
-------- -------- xxxxxxxx xxxxxxxx Framebuffer pixel read Y pos
@@ -1632,10 +1631,6 @@ WRITE64_MEMBER(cobra_state::main_fifo_w)
gfx_ram[(0x38632c^4) / 4] = 0x38600000; // skip check_one_scene()
}
- // racjamdx
- else if (strcmp(space.machine().system().name, "racjamdx") == 0)
- {
- }
}
m_main_debug_state = 0;
@@ -2128,7 +2123,7 @@ void cobra_renderer::gfx_reset()
UINT32 cobra_renderer::gfx_read_gram(UINT32 address)
{
- if (!DWORD_ALIGNED(address))
+ if (address & 3)
{
printf("gfx_read_gram: %08X, not dword aligned!\n", address);
return 0;
@@ -2186,7 +2181,7 @@ void cobra_renderer::gfx_write_gram(UINT32 address, UINT32 mask, UINT32 data)
}
}
- if (!DWORD_ALIGNED(address))
+ if (address & 3)
{
printf("gfx_write_gram: %08X, %08X, not dword aligned!\n", address, data);
return;
@@ -2644,43 +2639,34 @@ void cobra_renderer::gfx_fifo_exec()
{
// Read a specified pixel position from a pixelbuffer
-// printf("GFX: FB read X: %d, Y: %d, %08X\n", (UINT16)(m_gfx_gram[0x118/4] >> 16), (UINT16)(m_gfx_gram[0x118/4]), m_gfx_gram[0x114/4]);
+// printf("GFX: FB read X: %d, Y: %d\n", (UINT16)(m_gfx_gram[0x118/4] >> 16), (UINT16)(m_gfx_gram[0x118/4]));
int x = (m_gfx_gram[0x118/4] >> 16) & 0xffff;
int y = m_gfx_gram[0x118/4] & 0xffff;
- int pix_count = m_gfx_gram[0x114/4] & 0xffff;
- int line_count = (m_gfx_gram[0x114/4] >> 16) & 0xffff;
-
- // flush fifo_out so we have fresh data at top
- fifo_out->flush();
-
- if (pix_count != 4)
- fatalerror("GFX: fb read line count %d, pix count %d\n", line_count, pix_count);
-
- for (int i=0; i < line_count; i++)
+ UINT32 *buffer;
+ switch (m_gfx_gram[0x80104/4])
{
- UINT32 *buffer;
- switch (m_gfx_gram[0x80104/4])
+ case 0x800000: buffer = &m_framebuffer->pix32(y); break;
+ case 0x200000: buffer = &m_backbuffer->pix32(y); break;
+ case 0x0e0000: buffer = &m_overlay->pix32(y); break;
+ case 0x000800: buffer = &m_zbuffer->pix32(y); break;
+ case 0x000200: buffer = &m_stencil->pix32(y); break;
+
+ default:
{
- case 0x800000: buffer = &m_framebuffer->pix32(y+i); break;
- case 0x200000: buffer = &m_backbuffer->pix32(y+i); break;
- case 0x0e0000: buffer = &m_overlay->pix32(y+i); break;
- case 0x000800: buffer = &m_zbuffer->pix32(y+i); break;
- case 0x000200: buffer = &m_stencil->pix32(y+i); break;
-
- default:
- {
- fatalerror("gfxfifo_exec: fb read from buffer %08X!\n", m_gfx_gram[0x80100/4]);
- }
+ fatalerror("gfxfifo_exec: fb read from buffer %08X!\n", m_gfx_gram[0x80100/4]);
}
-
- fifo_out->push(nullptr, buffer[x+0]);
- fifo_out->push(nullptr, buffer[x+1]);
- fifo_out->push(nullptr, buffer[x+2]);
- fifo_out->push(nullptr, buffer[x+3]);
}
+ // flush fifo_out so we have fresh data at top
+ fifo_out->flush();
+
+ fifo_out->push(nullptr, buffer[x+0]);
+ fifo_out->push(nullptr, buffer[x+1]);
+ fifo_out->push(nullptr, buffer[x+2]);
+ fifo_out->push(nullptr, buffer[x+3]);
+
cobra->m_gfx_re_status = RE_STATUS_IDLE;
break;
}
@@ -3036,7 +3022,7 @@ WRITE64_MEMBER(cobra_state::gfx_buf_w)
// teximage_load() / mbuslib_prc_read(): 0x00A00001 0x10520800
-// printf("prc_read %08X%08X at %08X\n", (UINT32)(data >> 32), (UINT32)(data), space.device().safe_pc());
+// printf("prc_read %08X%08X at %08X\n", (UINT32)(data >> 32), (UINT32)(data), activecpu_get_pc());
m_renderer->gfx_fifo_exec();
diff --git a/src/mame/drivers/cyberbal.cpp b/src/mame/drivers/cyberbal.cpp
index f7d8d0a0466..0a1a01a4ebc 100644
--- a/src/mame/drivers/cyberbal.cpp
+++ b/src/mame/drivers/cyberbal.cpp
@@ -389,6 +389,8 @@ static MACHINE_CONFIG_START( cyberbal, cyberbal_state )
MCFG_CPU_ADD("maincpu", M68000, ATARI_CLOCK_14MHz/2)
MCFG_CPU_PROGRAM_MAP(main_map)
+ MCFG_SLAPSTIC_ADD("slapstic")
+
MCFG_CPU_ADD("audiocpu", M6502, ATARI_CLOCK_14MHz/8)
MCFG_CPU_PROGRAM_MAP(sound_map)
MCFG_DEVICE_PERIODIC_INT_DEVICE("soundcomm", atari_sound_comm_device, sound_irq_gen, (double)ATARI_CLOCK_14MHz/4/4/16/16/14)
@@ -464,8 +466,6 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( cyberbalt, cyberbal )
MCFG_DEVICE_REMOVE("eeprom")
MCFG_ATARI_EEPROM_2816_ADD("eeprom")
-
- MCFG_SLAPSTIC_ADD("slapstic", 116)
MACHINE_CONFIG_END
@@ -997,9 +997,20 @@ ROM_END
*
*************************************/
+DRIVER_INIT_MEMBER(cyberbal_state,cyberbal)
+{
+ slapstic_configure(*m_maincpu, 0x018000, 0, 0);
+}
+
+
DRIVER_INIT_MEMBER(cyberbal_state,cyberbalt)
{
- slapstic_configure(*m_maincpu, 0x018000, 0);
+ slapstic_configure(*m_maincpu, 0x018000, 0, 116);
+}
+
+
+DRIVER_INIT_MEMBER(cyberbal_state,cyberbal2p)
+{
}
@@ -1010,14 +1021,14 @@ DRIVER_INIT_MEMBER(cyberbal_state,cyberbalt)
*
*************************************/
-GAMEL(1988, cyberbal, 0, cyberbal, cyberbal, driver_device, 0, ROT0, "Atari Games", "Cyberball (rev 4)", 0, layout_dualhsxs )
-GAMEL(1988, cyberbal2, cyberbal, cyberbal, cyberbal, driver_device, 0, ROT0, "Atari Games", "Cyberball (rev 2)", 0, layout_dualhsxs )
-GAMEL(1988, cyberbalp, cyberbal, cyberbal, cyberbal, driver_device, 0, ROT0, "Atari Games", "Cyberball (prototype)", 0, layout_dualhsxs )
+GAMEL(1988, cyberbal, 0, cyberbal, cyberbal, cyberbal_state, cyberbal, ROT0, "Atari Games", "Cyberball (rev 4)", 0, layout_dualhsxs )
+GAMEL(1988, cyberbal2, cyberbal, cyberbal, cyberbal, cyberbal_state, cyberbal, ROT0, "Atari Games", "Cyberball (rev 2)", 0, layout_dualhsxs )
+GAMEL(1988, cyberbalp, cyberbal, cyberbal, cyberbal, cyberbal_state, cyberbal, ROT0, "Atari Games", "Cyberball (prototype)", 0, layout_dualhsxs )
-GAME( 1989, cyberbal2p, cyberbal, cyberbal2p, cyberbal2p, driver_device, 0, ROT0, "Atari Games", "Cyberball 2072 (2 player, rev 4)", 0 )
-GAME( 1989, cyberbal2p3, cyberbal, cyberbal2p, cyberbal2p, driver_device, 0, ROT0, "Atari Games", "Cyberball 2072 (2 player, rev 3)", 0 )
-GAME( 1989, cyberbal2p2, cyberbal, cyberbal2p, cyberbal2p, driver_device, 0, ROT0, "Atari Games", "Cyberball 2072 (2 player, rev 2)", 0 )
-GAME( 1989, cyberbal2p1, cyberbal, cyberbal2p, cyberbal2p, driver_device, 0, ROT0, "Atari Games", "Cyberball 2072 (2 player, rev 1)", 0 )
+GAME( 1989, cyberbal2p, cyberbal, cyberbal2p, cyberbal2p, cyberbal_state, cyberbal2p, ROT0, "Atari Games", "Cyberball 2072 (2 player, rev 4)", 0 )
+GAME( 1989, cyberbal2p3, cyberbal, cyberbal2p, cyberbal2p, cyberbal_state, cyberbal2p, ROT0, "Atari Games", "Cyberball 2072 (2 player, rev 3)", 0 )
+GAME( 1989, cyberbal2p2, cyberbal, cyberbal2p, cyberbal2p, cyberbal_state, cyberbal2p, ROT0, "Atari Games", "Cyberball 2072 (2 player, rev 2)", 0 )
+GAME( 1989, cyberbal2p1, cyberbal, cyberbal2p, cyberbal2p, cyberbal_state, cyberbal2p, ROT0, "Atari Games", "Cyberball 2072 (2 player, rev 1)", 0 )
GAMEL(1989, cyberbalt, cyberbal, cyberbalt, cyberbal, cyberbal_state, cyberbalt, ROT0, "Atari Games", "Tournament Cyberball 2072 (rev 2)", 0, layout_dualhsxs )
GAMEL(1989, cyberbalt1, cyberbal, cyberbalt, cyberbal, cyberbal_state, cyberbalt, ROT0, "Atari Games", "Tournament Cyberball 2072 (rev 1)", 0, layout_dualhsxs )
diff --git a/src/mame/drivers/deco156.cpp b/src/mame/drivers/deco156.cpp
index b8ab102bee1..faa0f3bb6a5 100644
--- a/src/mame/drivers/deco156.cpp
+++ b/src/mame/drivers/deco156.cpp
@@ -8,6 +8,9 @@
See also deco32.c, deco_mlc.c, backfire.c
+ Todo:
+ complete co-processor emulation for wcvol95
+
Emulation by Bryan McPhail, mish@tendril.co.uk
*/
@@ -625,36 +628,8 @@ ROM_START( wcvol95 )
// ROM_REGION( 0x80, "user1", 0 ) /* eeprom */
// ROM_LOAD( "93c46.3k", 0x00, 0x80, CRC(88f8e270) SHA1(cb82203ad38e0c12ea998562b7b785979726afe5) )
-
- ROM_REGION( 0x200, "gals", 0 )
- ROM_LOAD( "GAL16V8B.10J.bin", 0x000, 0x117, CRC(06bbcbd5) SHA1(f7adb4bca13bb799bc42411eb178edfdc11a76c7) )
- ROM_LOAD( "GAL16V8B.5D.bin", 0x000, 0x117, CRC(117784f0) SHA1(daf3720740621fc3af49333c96795718b693f4d2))
ROM_END
-
-
-ROM_START( wcvol95x )
- ROM_REGION( 0x100000, "maincpu", 0 ) /* DE156 code (encrypted) */
- // no label markings were present
- ROM_LOAD32_WORD( "2f.bin", 0x000002, 0x080000, CRC(ac06633d) SHA1(5d37ca3050f35d5fc06f70e91b1522e325471585) )
- ROM_LOAD32_WORD( "4f.bin", 0x000000, 0x080000, CRC(e211f67a) SHA1(d008c2b809482f17ada608134357fa1205d767d4) )
-
- ROM_REGION( 0x080000, "gfx1", 0 )
- ROM_LOAD( "mbx-00.9a", 0x000000, 0x080000, CRC(a0b24204) SHA1(cec8089c6c635f23b3a4aeeef2c43f519568ad70) )
-
- ROM_REGION( 0x200000, "gfx2", 0 )
- ROM_LOAD16_BYTE( "mbx-01.12a", 0x000000, 0x100000, CRC(73deb3f1) SHA1(c0cabecfd88695afe0f27c5bb115b4973907207d) )
- ROM_LOAD16_BYTE( "mbx-02.13a", 0x000001, 0x100000, CRC(3204d324) SHA1(44102f71bae44bf3a9bd2de7e5791d959a2c9bdd) )
-
- ROM_REGION( 0x200000, "ymz", 0 ) /* YMZ280B-F samples */
- ROM_LOAD( "mbx-03.13j", 0x00000, 0x200000, CRC(061632bc) SHA1(7900ac56e59f4a4e5768ce72f4a4b7c5875f5ae8) )
-
- ROM_REGION( 0x200, "gals", 0 )
- ROM_LOAD( "GAL16V8B.10J.bin", 0x000, 0x117, CRC(06bbcbd5) SHA1(f7adb4bca13bb799bc42411eb178edfdc11a76c7) )
- ROM_LOAD( "GAL16V8B.5D.bin", 0x000, 0x117, CRC(117784f0) SHA1(daf3720740621fc3af49333c96795718b693f4d2))
-ROM_END
-
-
/**********************************************************************************/
void deco156_state::descramble_sound( const char *tag )
@@ -702,4 +677,3 @@ GAME( 1993, hvysmsh, 0, hvysmsh, hvysmsh, deco156_state, hvysmsh, ROT0,
GAME( 1993, hvysmsha, hvysmsh, hvysmsh, hvysmsh, deco156_state, hvysmsh, ROT0, "Data East Corporation", "Heavy Smash (Asia version -4)", MACHINE_SUPPORTS_SAVE )
GAME( 1993, hvysmshj, hvysmsh, hvysmsh, hvysmsh, deco156_state, hvysmsh, ROT0, "Data East Corporation", "Heavy Smash (Japan version -2)", MACHINE_SUPPORTS_SAVE )
GAME( 1995, wcvol95, 0, wcvol95, wcvol95, deco156_state, wcvol95, ROT0, "Data East Corporation", "World Cup Volley '95 (Japan v1.0)", MACHINE_SUPPORTS_SAVE )
-GAME( 1995, wcvol95x, wcvol95, wcvol95, wcvol95, deco156_state, wcvol95, ROT0, "Data East Corporation", "World Cup Volley '95 Extra Version (Asia v2.0B)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/deshoros.cpp b/src/mame/drivers/deshoros.cpp
index dac7f3a989d..b1884ab9265 100644
--- a/src/mame/drivers/deshoros.cpp
+++ b/src/mame/drivers/deshoros.cpp
@@ -12,7 +12,7 @@ It is not Y2K compliant.
Rough cpanel sketch:
- [LED-array display] 1 2 3 M
+ [LED-array dispay] 1 2 3 M
4 5 6 F
7 8 9 0
CLEAR ENTER
diff --git a/src/mame/drivers/elecbowl.cpp b/src/mame/drivers/elecbowl.cpp
index 297288fcbde..65a2070bc5c 100644
--- a/src/mame/drivers/elecbowl.cpp
+++ b/src/mame/drivers/elecbowl.cpp
@@ -6,7 +6,7 @@
Marx Series 300 Electronic Bowling Game
Main board:
- * TMS1100NLL MP3403 DBS 7836 SINGAPORE (no decap)
+ * TMS1100NLL MP3403 DBS 7836 SINGAPORE
* 4*SN75492 quad segment driver, 2*SN74259 8-line demultiplexer,
2*CD4043 quad r/s input latch
* 5 7seg LEDs, 15 lamps(10 lamps projected to bowling pins reflection),
@@ -161,7 +161,7 @@ INPUT_PORTS_END
***************************************************************************/
-// output PLA is not decapped
+// output PLA is not dumped
static const UINT16 elecbowl_output_pla[0x20] =
{
lA+lB+lC+lD+lE+lF, // 0
@@ -183,7 +183,7 @@ static const UINT16 elecbowl_output_pla[0x20] =
static MACHINE_CONFIG_START( elecbowl, elecbowl_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", TMS1100, 350000) // approximation - RC osc. R=33K, C=100pf
+ MCFG_CPU_ADD("maincpu", TMS1100, 350000) // RC osc. R=33K, C=100pf -> ~350kHz
MCFG_TMS1XXX_OUTPUT_PLA(elecbowl_output_pla)
MCFG_TMS1XXX_READ_K_CB(READ8(elecbowl_state, read_k))
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(elecbowl_state, write_r))
@@ -211,7 +211,7 @@ ROM_START( elecbowl )
ROM_LOAD( "mp3403.u9", 0x0000, 0x0800, CRC(9eabaa7d) SHA1(b1f54587ed7f2bbf3a5d49075c807296384c2b06) )
ROM_REGION( 867, "maincpu:mpla", 0 )
- ROM_LOAD( "tms1100_common3_micro.pla", 0, 867, BAD_DUMP CRC(03574895) SHA1(04407cabfb3adee2ee5e4218612cb06c12c540f4) ) // not verified
+ ROM_LOAD( "tms1100_common1_micro.pla", 0, 867, BAD_DUMP CRC(62445fc9) SHA1(d6297f2a4bc7a870b76cc498d19dbb0ce7d69fec) ) // not verified
ROM_REGION( 365, "maincpu:opla", 0 )
ROM_LOAD( "tms1100_elecbowl_output.pla", 0, 365, NO_DUMP )
ROM_END
diff --git a/src/mame/drivers/electron.cpp b/src/mame/drivers/electron.cpp
index 106fc034a03..dc1e2142212 100644
--- a/src/mame/drivers/electron.cpp
+++ b/src/mame/drivers/electron.cpp
@@ -64,6 +64,7 @@ Incomplete:
Missing:
- Support for floppy disks
- Other peripherals
+ - Keyboard is missing the 'Break' key
******************************************************************************/
#include "emu.h"
@@ -92,39 +93,34 @@ PALETTE_INIT_MEMBER(electron_state, electron)
}
static ADDRESS_MAP_START(electron_mem, AS_PROGRAM, 8, electron_state )
- AM_RANGE(0x0000, 0x7fff) AM_RAM AM_REGION("maincpu", 0x00000) /* 32KB of RAM */
- AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank2") /* Banked ROM pages */
- AM_RANGE(0xc000, 0xfbff) AM_ROM AM_REGION("user1", 0x40000) /* OS ROM */
- AM_RANGE(0xfc00, 0xfcff) AM_READWRITE(electron_fred_r, electron_fred_w ) /* FRED */
- AM_RANGE(0xfd00, 0xfdff) AM_READWRITE(electron_jim_r, electron_jim_w ) /* JIM */
- AM_RANGE(0xfe00, 0xfeff) AM_READWRITE(electron_sheila_r, electron_sheila_w ) /* SHEILA */
- AM_RANGE(0xff00, 0xffff) AM_ROM AM_REGION("user1", 0x43f00) /* OS ROM continued */
+ AM_RANGE(0x0000, 0x7fff) AM_RAM AM_REGION("maincpu", 0x00000) /* 32KB of RAM */
+ AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank2") /* Banked ROM pages */
+ AM_RANGE(0xc000, 0xfbff) AM_ROM AM_REGION("user1", 0x40000) /* OS ROM */
+ AM_RANGE(0xfc00, 0xfcff) AM_READWRITE(electron_jim_r, electron_jim_w ) /* JIM pages */
+ AM_RANGE(0xfd00, 0xfdff) AM_READWRITE(electron_1mhz_r, electron_1mhz_w ) /* 1 MHz bus */
+ AM_RANGE(0xfe00, 0xfeff) AM_READWRITE(electron_ula_r, electron_ula_w ) /* Electron ULA */
+ AM_RANGE(0xff00, 0xffff) AM_ROM AM_REGION("user1", 0x43f00) /* OS ROM continued */
ADDRESS_MAP_END
-INPUT_CHANGED_MEMBER(electron_state::trigger_reset)
-{
- m_maincpu->set_input_line(INPUT_LINE_RESET, PULSE_LINE);
-}
-
static INPUT_PORTS_START( electron )
PORT_START("LINE.0")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("\xE2\x86\x92 | \\") PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) PORT_CHAR('|') PORT_CHAR('\\') // on the real keyboard, this would be on the 1st row, the 3rd key after 0
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("COPY") PORT_CODE(KEYCODE_END) PORT_CHAR(UCHAR_MAMEKEY(F1)) PORT_CHAR('[') PORT_CHAR(']')
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_UNUSED)
+ /* PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("<NONE>") PORT_CODE(KEYCODE_) */
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
PORT_START("LINE.1")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("\xE2\x86\x90 ^ ~") PORT_CODE(KEYCODE_EQUALS) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) PORT_CHAR('^') PORT_CHAR('~')
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("\xE2\x86\x93 _ }") PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) PORT_CHAR('_') PORT_CHAR('}')
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RETURN") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("DELETE") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8)
PORT_START("LINE.2")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('=')
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("\xE2\x86\x91 \xC2\xA3 {") PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR(UCHAR_MAMEKEY(UP)) PORT_CHAR('\xA3') PORT_CHAR('{')
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(':') PORT_CHAR('*')
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_UNUSED)
+ /* PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("<NONE>") PORT_CODE(KEYCODE_) */
PORT_START("LINE.3")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR('@')
@@ -192,12 +188,10 @@ static INPUT_PORTS_START( electron )
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR(UCHAR_SHIFT_2)
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_RSHIFT) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
- PORT_START("BRK") /* BREAK */
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("BREAK") PORT_CODE(KEYCODE_F12) PORT_CHAR(UCHAR_MAMEKEY(F12)) PORT_CHANGED_MEMBER(DEVICE_SELF, electron_state, trigger_reset, 0)
INPUT_PORTS_END
static MACHINE_CONFIG_START( electron, electron_state )
- MCFG_CPU_ADD( "maincpu", M6502, XTAL_16MHz/8 )
+ MCFG_CPU_ADD( "maincpu", M6502, 2000000 )
MCFG_CPU_PROGRAM_MAP( electron_mem)
MCFG_SCREEN_ADD("screen", RASTER)
@@ -218,13 +212,11 @@ static MACHINE_CONFIG_START( electron, electron_state )
MCFG_CASSETTE_ADD( "cassette" )
MCFG_CASSETTE_FORMATS(uef_cassette_formats)
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY)
- MCFG_CASSETTE_INTERFACE("electron_cass")
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "electron_cart")
MCFG_GENERIC_LOAD(electron_state, electron_cart)
/* software lists */
- MCFG_SOFTWARE_LIST_ADD("cass_list","electron_cass")
MCFG_SOFTWARE_LIST_ADD("cart_list","electron_cart")
MACHINE_CONFIG_END
@@ -254,6 +246,5 @@ ROM_START(electron)
/* 3c000 15 available for cartridges with a language ROM */
ROM_END
-/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME */
-COMP ( 1983, electron, 0, 0, electron, electron, driver_device, 0, "Acorn", "Acorn Electron", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
-//COMP ( 1985, btm2501, electron, 0, electron, electron, driver_device, 0, "British Telecom Business Systems", "Merlin M2501", MACHINE_NOT_WORKING )
+/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */
+COMP ( 1983, electron, 0, 0, electron, electron, driver_device, 0, "Acorn", "Acorn Electron", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
diff --git a/src/mame/drivers/ep64.cpp b/src/mame/drivers/ep64.cpp
index 84a529841f9..eb537de944b 100644
--- a/src/mame/drivers/ep64.cpp
+++ b/src/mame/drivers/ep64.cpp
@@ -516,7 +516,7 @@ static MACHINE_CONFIG_START( ep64, ep64_state )
MCFG_EP64_EXPANSION_BUS_SLOT_DAVE(DAVE_TAG)
MCFG_EP64_EXPANSION_BUS_SLOT_IRQ_CALLBACK(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0))
MCFG_EP64_EXPANSION_BUS_SLOT_NMI_CALLBACK(INPUTLINE(Z80_TAG, INPUT_LINE_NMI))
- MCFG_EP64_EXPANSION_BUS_SLOT_WAIT_CALLBACK(INPUTLINE(Z80_TAG, Z80_INPUT_LINE_BOGUSWAIT))
+ MCFG_EP64_EXPANSION_BUS_SLOT_WAIT_CALLBACK(INPUTLINE(Z80_TAG, Z80_INPUT_LINE_WAIT))
MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_devices, "printer")
MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(ep64_state, write_centronics_busy))
diff --git a/src/mame/drivers/esd16.cpp b/src/mame/drivers/esd16.cpp
index 01f12b0de2b..8ba0616585e 100644
--- a/src/mame/drivers/esd16.cpp
+++ b/src/mame/drivers/esd16.cpp
@@ -826,37 +826,6 @@ ROM_START( multchmpk )
ROM_LOAD( "esd4.su10", 0x00000, 0x20000, CRC(6e741fcd) SHA1(742e0952916c00f67dd9f8d01e721a9a538d2fc4) )
ROM_END
-ROM_START( multchmpa )
- ROM_REGION( 0x080000, "maincpu", 0 ) /* 68000 Code */
- ROM_LOAD16_BYTE( "esd2.cu02", 0x000000, 0x040000, CRC(bfd39198) SHA1(11c0cb7a865daa1be9301ddfa5f5d2014e8f9908) )
- ROM_LOAD16_BYTE( "esd1.cu03", 0x000001, 0x040000, CRC(cd769077) SHA1(741cca679393dab031691834874c96fee791241e) )
-
- ROM_REGION( 0x40000, "audiocpu", 0 ) /* Z80 Code */
- ROM_LOAD( "esd3.su01", 0x00000, 0x20000, CRC(7c178bd7) SHA1(8754d3c70d9b2bf369a5ce0cce4cc0696ed22750) )
-
- ROM_REGION( 0x180000, "spr", 0 ) /* Sprites, 16x16x5 */
- ROM_LOAD16_BYTE( "esd17.ju06", 0x000000, 0x040000, CRC(51f01067) SHA1(d5ebbc7d358b63724d2f24da8b2ce4a202be37a5) )
- ROM_LOAD16_BYTE( "esd16.ju05", 0x000001, 0x040000, CRC(88e252e8) SHA1(07d898379798c6be42b636762b0af61b9111a480) )
- ROM_LOAD16_BYTE( "esd15.ju04", 0x080000, 0x040000, CRC(b1ae7f08) SHA1(37dd9d4cef8b9e1d09d7b46a9794fb2b777c9a01) )
- ROM_LOAD16_BYTE( "esd14.ju03", 0x080001, 0x040000, CRC(d8f06fa8) SHA1(f76912f93f99578529612a7f01d82ac7229a8e41) )
- ROM_LOAD16_BYTE( "esd13.ju07", 0x100000, 0x040000, CRC(9d1590a6) SHA1(35f634dbf0df06ec62359c7bae43c7f5d14b0ab2) )
-
- ROM_REGION( 0x400000, "bgs", 0 ) /* Layers, 16x16x8 */
- ROM_LOAD32_BYTE( "esd9.fu28", 0x000000, 0x080000, CRC(a3cfe895) SHA1(a8dc0d5d9e64d4c5112177b8f20b5bdb86ca73af) )
- ROM_LOAD32_BYTE( "esd11.fu29", 0x000001, 0x080000, CRC(d3c1855e) SHA1(bb547d4a45a745e9ae4a6727087cdf325105de90) )
- ROM_LOAD32_BYTE( "esd7.fu26", 0x000002, 0x080000, CRC(042d59ff) SHA1(8e45a4757e07d8aaf50b151d8849c1a27424e64b) )
- ROM_LOAD32_BYTE( "esd5.fu27", 0x000003, 0x080000, CRC(ed5b4e58) SHA1(82c3ee9e2525c0b370a29d5560c21ec6380d1a43) )
- ROM_LOAD32_BYTE( "esd10.fu31", 0x200000, 0x080000, CRC(396d77b6) SHA1(f22449a7f9f50e172e36db4f399c14e527409884) )
- ROM_LOAD32_BYTE( "esd12.fu33", 0x200001, 0x080000, CRC(a68848a8) SHA1(915239a961d76af6a1a567eb89b1569f158e714e) )
- ROM_LOAD32_BYTE( "esd8.fu30", 0x200002, 0x080000, CRC(fa8cd2d3) SHA1(ddc1b98867e6d2eee458bf35a933e7cdc59f4c7e) )
- ROM_LOAD32_BYTE( "esd6.fu32", 0x200003, 0x080000, CRC(97fde7b1) SHA1(b3610f6fcc1367ff079dc01121c86bc1e1f4c7a2) )
-
- ROM_REGION( 0x40000, "oki", 0 ) /* Samples */
- ROM_LOAD( "esd4.su08", 0x00000, 0x20000, CRC(6e741fcd) SHA1(742e0952916c00f67dd9f8d01e721a9a538d2fc4) )
-ROM_END
-
-
-
/*
Multi Champ Deluxe
@@ -1561,9 +1530,7 @@ ROM_END
/* ESD 11-09-98 */
GAME( 1999, multchmp, 0, esd16, multchmp, driver_device, 0, ROT0, "ESD", "Multi Champ (World, ver. 2.5)", MACHINE_SUPPORTS_SAVE )
-GAME( 1998, multchmpk,multchmp, esd16, multchmp, driver_device, 0, ROT0, "ESD", "Multi Champ (Korea, older)", MACHINE_SUPPORTS_SAVE )
-GAME( 1998, multchmpa,multchmp, esd16, multchmp, driver_device, 0, ROT0, "ESD", "Multi Champ (World, older)", MACHINE_SUPPORTS_SAVE )
-
+GAME( 1998, multchmpk,multchmp, esd16, multchmp, driver_device, 0, ROT0, "ESD", "Multi Champ (Korea)", MACHINE_SUPPORTS_SAVE )
GAME( 2001, jumppop, 0, jumppop, jumppop, driver_device, 0, ROT0, "ESD", "Jumping Pop (set 1)", MACHINE_SUPPORTS_SAVE ) /* Redesigned(?) ESD 11-09-98 with no ID# */
GAME( 2001, jumppope, jumppop, jumppop, jumppop, driver_device, 0, ROT0, "Emag Soft", "Jumping Pop (set 2)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/fantland.cpp b/src/mame/drivers/fantland.cpp
index af10ddd4bd1..4abd445eb35 100644
--- a/src/mame/drivers/fantland.cpp
+++ b/src/mame/drivers/fantland.cpp
@@ -1047,7 +1047,7 @@ static MACHINE_CONFIG_START( wheelrun, fantland_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("ymsnd", YM3526, XTAL_14MHz/4)
- MCFG_YM3526_IRQ_HANDLER(INPUTLINE("audiocpu", INPUT_LINE_IRQ0))
+ MCFG_YM3526_IRQ_HANDLER(DEVWRITELINE("audiocpu", z80_device, irq_line))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/fidel6502.cpp b/src/mame/drivers/fidel6502.cpp
index 43bdd8337c8..2a17baa6590 100644
--- a/src/mame/drivers/fidel6502.cpp
+++ b/src/mame/drivers/fidel6502.cpp
@@ -3,260 +3,10 @@
/******************************************************************************
Fidelity Electronics 6502 based board driver
-
-******************************************************************************
-
-Champion Sensory Chess Challenger (CSC)
----------------------------------------
-
-Memory map:
------------
-0000-07FF: 2K of RAM
-0800-0FFF: 1K of RAM (note: mirrored twice)
-1000-17FF: PIA 0 (display, TSI speech chip)
-1800-1FFF: PIA 1 (keypad, LEDs)
-2000-3FFF: 101-64019 ROM (also used on the regular sensory chess challenger)
-4000-7FFF: mirror of 0000-3FFF
-8000-9FFF: not used
-A000-BFFF: 101-1025A03 ROM
-C000-DFFF: 101-1025A02 ROM
-E000-FDFF: 101-1025A01 ROM
-FE00-FFFF: 512 byte 74S474 PROM
-
-CPU is a 6502 running at 1.95MHz (3.9MHz resonator, divided by 2)
-
-NMI is not used.
-IRQ is connected to a 600Hz oscillator (38.4KHz divided by 64).
-Reset is connected to a power-on reset circuit.
-
-PIA 0:
-------
-PA0 - 7seg segments E, TSI A0
-PA1 - 7seg segments D, TSI A1
-PA2 - 7seg segments C, TSI A2
-PA3 - 7seg segments H, TSI A3
-PA4 - 7seg segments G, TSI A4
-PA5 - 7seg segments F, TSI A5
-PA6 - 7seg segments B
-PA7 - 7seg segments A
-
-PB0 - A12 on speech ROM (if used... not used on this model, ROM is 4K)
-PB1 - START line on TSI
-PB2 - white wire
-PB3 - BUSY line from TSI
-PB4 - hi/lo TSI speaker volume
-PB5 - button row 9
-PB6 - selection jumper (resistor to 5V)
-PB7 - selection jumper (resistor to ground)
-
-CA1 - NC
-CA2 - violet wire
-
-CB1 - NC
-CB2 - NC (connects to pin 14 of soldered connector)
-
-PIA 1:
-------
-PA0 - button row 1
-PA1 - button row 2
-PA2 - button row 3
-PA3 - button row 4
-PA4 - button row 5
-PA5 - button row 6
-PA6 - 7442 selector bit 0
-PA7 - 7442 selector bit 1
-
-PB0 - LED row 1
-PB1 - LED row 2
-PB2 - LED row 3
-PB3 - LED row 4
-PB4 - LED row 5
-PB5 - LED row 6
-PB6 - LED row 7
-PB7 - LED row 8
-
-CA1 - button row 7
-CA2 - selector bit 3
-
-CB1 - button row 8
-CB2 - selector bit 2
-
-Selector: (attached to PIA 1, outputs 1 of 10 pins low. 7442)
----------
-output # (selected turns this column on, and all others off)
-0 - LED column A, button column A, 7seg digit 1
-1 - LED column B, button column B, 7seg digit 2
-2 - LED column C, button column C, 7seg digit 3
-3 - LED column D, button column D, 7seg digit 4
-4 - LED column E, button column E
-5 - LED column F, button column F
-6 - LED column G, button column G
-7 - LED column H, button column H
-8 - button column I
-9 - Tone line (toggle to make a tone in the buzzer)
-
-The rows/columns are indicated on the game board:
-
- ABCDEFGH I
---------------
-| | 8
-| | 7
-| | 6
-| | 5
-| | 4
-| | 3
-| | 2
-| | 1
---------------
-
-The "lone LED" is above the control column.
-column I is the "control column" on the right for starting a new game, etc.
-
-The upper 6 buttons are connected as such:
-
-column A - speak
-column B - RV
-column C - TM
-column D - LV
-column E - DM
-column F - ST
-
-these 6 buttons use row 9 (connects to PIA 0)
-
-LED display:
-------------
-43 21 (digit number)
------
-88:88
-
-The LED display is four 7 segment digits. normal ABCDEFG lettering is used for segments.
-
-The upper dot is connected to digit 3 common
-The lower dot is connected to digit 4 common
-The lone LED is connected to digit 1 common
-
-All three of the above are called "segment H".
-
-
-******************************************************************************
-
-Sensory Chess Challenger (SC12-B, 6086)
-4 versions are known to exist: A,B,C, and X, with increasing CPU speed.
----------------------------------
-RE information from netlist by Berger
-
-8*(8+1) buttons, 8+8+2 red LEDs
-DIN 41524C printer port
-36-pin edge connector
-CPU is a R65C02P4, running at 4MHz
-
-NE556 dual-timer IC:
-- timer#1, one-shot at power-on, to CPU _RESET
-- timer#2: R1=82K, R2=1K, C=22nf, to CPU _IRQ: ~780Hz, active low=15.25us
-
-Memory map:
------------
-6000-0FFF: 4K RAM (2016 * 2)
-2000-5FFF: cartridge
-6000-7FFF: control(W)
-8000-9FFF: 8K ROM SSS SCM23C65E4
-A000-BFFF: keypad(R)
-C000-DFFF: 4K ROM TI TMS2732AJL-45
-E000-FFFF: 8K ROM Toshiba TMM2764D-2
-
-control: (74LS377)
---------
-Q0-Q3: 7442 A0-A3
-Q4: enable printer port pin 1 input
-Q5: printer port pin 5 output
-Q6,Q7: LEDs common anode
-
-7442 0-8: input mux and LEDs cathode
-7442 9: buzzer
-
-The keypad is read through a 74HC251, where S0,1,2 is from CPU A0,1,2, Y is connected to CPU D7.
-If control Q4 is set, printer data can be read from I0.
-
-
-******************************************************************************
-
-Voice Excellence (model 6092)
-----------------
-PCB 1: 510.1117A02, appears to be identical to other "Excellence" boards
-CPU: GTE G65SC102P-3, 32 KB PRG ROM: AMI 101-1080A01(IC5), 8192x8 SRAM SRM2264C10(IC6)
-2 rows of LEDs on the side: 1*8 green, 1*8 red
-
-PCB 2: 510.1117A01
-Speech: TSI S14001A, 32 KB ROM: AMI 101-1081A01(IC2)
-Dip Switches set ROM A13 and ROM A14, on the side of the board
-
-ROM A12 is tied to S14001A's A11 (yuck)
-ROM A11 is however tied to the CPU's XYZ
-
-0000_07FF - Spanish 1/4
-0800_0FFF - Spanish 3/4
-1000_17FF - Spanish 2/4
-1800_1FFF - Spanish 4/4
-
-2000_27FF - French 1/4
-2800_2FFF - French 3/4
-3000_3FFF - French 2/4
-3800_3FFF - French 4/4
-
-4000_47FF - German 1/4
-4800_4FFF - German 3/4
-5000_57FF - German 2/4
-5800_5FFF - German 4/4
+ See drivers/fidelz80.cpp for hardware description
-6000_67FF - English 1/2
-6800_6FFF - Bridge Challenger 1/2
-7000_77FF - English 2/2
-7800_7FFF - Bridge Challenger 2/2
-
-------------------
-RE info by hap, based on PCB photos
-
-Memory map:
------------
-0000-3FFF: 8K RAM (SRM2264)
-4000-7FFF: control (R/W)
-8000-FFFF: 32K ROM (M27256 compatible)
-
-control (W):
-------------
-Z80 A0-A2 to 3*74259, Z80 Dx to D (_C unused)
-
-Z80 D0:
-- Q4,Q5: led commons
-- Q6,Q7,Q2,Q1: 7seg panel digit select
-- Q0-Q3: 7442 A0-A3
- + 0-7: led data
- + 0-8: keypad mux
- + 9: buzzer out
-
-Z80 D1: (model 6093)
-- Q0-Q7: 7seg data
-
-Z80 D2: (model 6092)
-- Q0-Q5: TSI C0-C5
-- Q6: TSI START pin
-- Q7: TSI ROM A11
-
-A11 from TSI is tied to TSI ROM A12(!)
-TSI ROM A13,A14 are hardwired to the 2 language switches.
-Sound comes from the Audio out pin, digital out pins are N/C.
-
-control (R):
-------------
-Z80 A0-A2 to 2*74251, Z80 Dx to output
-
-Z80 D7 to Y:
-- D0-D7: keypad row data
-
-Z80 D6 to W: (model 6092, tied to VCC otherwise)
-- D0,D1: language switches
-- D2-D6: VCC
-- D7: TSI BUSY
+ TODO:
+ - x
******************************************************************************/
@@ -265,13 +15,15 @@ Z80 D6 to W: (model 6092, tied to VCC otherwise)
#include "cpu/m6502/r65c02.h"
#include "cpu/m6502/m65sc02.h"
#include "machine/6821pia.h"
+#include "sound/speaker.h"
#include "includes/fidelz80.h"
// internal artwork
-#include "fidel_csc.lh" // clickable
-#include "fidel_fev.lh" // clickable
-#include "fidel_sc12.lh" // clickable
+#include "fidel_sc12.lh"
+#include "fidel_fev.lh"
+
+extern const char layout_fidel_vsc[]; // same layout as fidelz80/vsc
class fidel6502_state : public fidelz80base_state
@@ -280,17 +32,16 @@ public:
fidel6502_state(const machine_config &mconfig, device_type type, const char *tag)
: fidelz80base_state(mconfig, type, tag),
m_6821pia(*this, "6821pia"),
- m_cart(*this, "cartslot")
+ m_speaker(*this, "speaker"),
+ m_irq_off(*this, "irq_off")
{ }
// devices/pointers
optional_device<pia6821_device> m_6821pia;
- optional_device<generic_slot_device> m_cart;
-
- TIMER_DEVICE_CALLBACK_MEMBER(irq_on) { m_maincpu->set_input_line(M6502_IRQ_LINE, ASSERT_LINE); }
- TIMER_DEVICE_CALLBACK_MEMBER(irq_off) { m_maincpu->set_input_line(M6502_IRQ_LINE, CLEAR_LINE); }
+ optional_device<speaker_sound_device> m_speaker;
+ optional_device<timer_device> m_irq_off;
- // CSC
+ // model CSC
void csc_prepare_display();
DECLARE_READ8_MEMBER(csc_speech_r);
DECLARE_WRITE8_MEMBER(csc_pia0_pa_w);
@@ -305,16 +56,11 @@ public:
DECLARE_READ_LINE_MEMBER(csc_pia1_ca1_r);
DECLARE_READ_LINE_MEMBER(csc_pia1_cb1_r);
- // SC12/6086
+ // model SC12
+ TIMER_DEVICE_CALLBACK_MEMBER(irq_off);
+ TIMER_DEVICE_CALLBACK_MEMBER(sc12_irq);
DECLARE_WRITE8_MEMBER(sc12_control_w);
DECLARE_READ8_MEMBER(sc12_input_r);
- DECLARE_READ8_MEMBER(sc12_cart_r);
-
- // 6080/6092/6093 (Excellence)
- DECLARE_INPUT_CHANGED_MEMBER(fexcelv_bankswitch);
- DECLARE_READ8_MEMBER(fexcelv_speech_r);
- DECLARE_WRITE8_MEMBER(fexcel_ttl_w);
- DECLARE_READ8_MEMBER(fexcel_ttl_r);
};
@@ -329,22 +75,21 @@ public:
void fidel6502_state::csc_prepare_display()
{
- // 7442 0-8: led select, input mux
- m_inp_mux = 1 << m_led_select & 0x3ff;
-
- // 7442 9: speaker out
- m_speaker->level_w(m_inp_mux >> 9 & 1);
+ // 7442 output, also update input mux (9 is unused)
+ m_inp_mux = (1 << m_led_select) & 0x1ff;
// 4 7seg leds + H
for (int i = 0; i < 4; i++)
+ {
+ m_display_segmask[i] = 0x7f;
m_display_state[i] = (m_inp_mux >> i & 1) ? m_7seg_data : 0;
+ }
// 8*8 chessboard leds
for (int i = 0; i < 8; i++)
m_display_state[i+4] = (m_inp_mux >> i & 1) ? m_led_data : 0;
- set_display_size(8, 4+8);
- set_display_segmask(0xf, 0x7f);
+ set_display_size(8, 12);
display_update();
}
@@ -374,9 +119,9 @@ WRITE8_MEMBER(fidel6502_state::csc_pia0_pb_w)
// d1: TSI START line
m_speech->start_w(data >> 1 & 1);
-
- // d4: lower TSI volume
- m_speech->set_output_gain(0, (data & 0x10) ? 0.5 : 1.0);
+
+ // d4: tone line
+ m_speaker->level_w(data >> 4 & 1);
}
READ8_MEMBER(fidel6502_state::csc_pia0_pb_r)
@@ -389,9 +134,12 @@ READ8_MEMBER(fidel6502_state::csc_pia0_pb_r)
data |= 0x08;
// d5: button row 8 (active low)
+ if (!(read_inputs(9) & 0x100))
+ data |= 0x20;
+
// d6,d7: language switches
- data |= (~read_inputs(9) >> 3 & 0x20) | (~m_inp_matrix[9]->read() << 6 & 0xc0);
-
+ data|=0xc0;
+
return data;
}
@@ -452,12 +200,24 @@ WRITE_LINE_MEMBER(fidel6502_state::csc_pia1_ca2_w)
/******************************************************************************
- SC12/6086
+ SC12
******************************************************************************/
+// interrupt handling
+TIMER_DEVICE_CALLBACK_MEMBER(fidel6502_state::irq_off)
+{
+ m_maincpu->set_input_line(M6502_IRQ_LINE, CLEAR_LINE);
+}
+
+TIMER_DEVICE_CALLBACK_MEMBER(fidel6502_state::sc12_irq)
+{
+ m_maincpu->set_input_line(M6502_IRQ_LINE, ASSERT_LINE);
+ m_irq_off->adjust(attotime::from_nsec(15250)); // active low for 15.25us
+}
-// TTL/generic
+
+// TTL
WRITE8_MEMBER(fidel6502_state::sc12_control_w)
{
@@ -479,96 +239,7 @@ WRITE8_MEMBER(fidel6502_state::sc12_control_w)
READ8_MEMBER(fidel6502_state::sc12_input_r)
{
// a0-a2,d7: multiplexed inputs (active low)
- return (read_inputs(9) >> offset & 1) ? 0 : 0x80;
-}
-
-READ8_MEMBER(fidel6502_state::sc12_cart_r)
-{
- if (m_cart->exists())
- return m_cart->read_rom(space, offset);
- else
- return 0;
-}
-
-
-
-/******************************************************************************
- 6080/6092/6093 (Excellence)
-******************************************************************************/
-
-// misc handlers
-
-INPUT_CHANGED_MEMBER(fidel6502_state::fexcelv_bankswitch)
-{
- // tied to speech ROM highest bits
- m_speech->force_update();
- m_speech_bank = (m_speech_bank & 1) | newval << 1;
-}
-
-READ8_MEMBER(fidel6502_state::fexcelv_speech_r)
-{
- // TSI A11 is A12, program controls A11, user controls A13,A14(language switches)
- offset = (offset & 0x7ff) | (offset << 1 & 0x1000);
- return m_speech_rom[offset | (m_speech_bank << 11 & 0x800) | (~m_speech_bank << 12 & 0x6000)];
-}
-
-
-// TTL
-
-WRITE8_MEMBER(fidel6502_state::fexcel_ttl_w)
-{
- // a0-a2,d0: 74259(1)
- UINT8 mask = 1 << offset;
- m_led_select = (m_led_select & ~mask) | ((data & 1) ? mask : 0);
-
- // 74259 Q0-Q3: 7442 a0-a3
- // 7442 0-8: led data, input mux
- UINT16 sel = 1 << (m_led_select & 0xf) & 0x3ff;
- UINT8 led_data = sel & 0xff;
- m_inp_mux = sel & 0x1ff;
-
- // 7442 9: speaker out (optional?)
- m_speaker->level_w(sel >> 9 & 1);
-
- // 74259 Q4-Q7,Q2,Q1: digit/led select (active low)
- UINT8 led_sel = ~BITSWAP8(m_led_select,0,3,1,2,7,6,5,4) & 0x3f;
-
- // a0-a2,d1: digit segment data (model 6093)
- m_7seg_data = (m_7seg_data & ~mask) | ((data & 2) ? mask : 0);
- UINT8 seg_data = BITSWAP8(m_7seg_data,0,1,3,2,7,5,6,4);
-
- // update display: 4 7seg leds, 2*8 chessboard leds
- for (int i = 0; i < 6; i++)
- m_display_state[i] = (led_sel >> i & 1) ? ((i < 2) ? led_data : seg_data) : 0;
-
- set_display_size(8, 2+4);
- set_display_segmask(0x3c, 0x7f);
- display_update();
-
- // speech (model 6092)
- if (m_speech != nullptr)
- {
- // a0-a2,d2: 74259(2) to speech board
- m_speech_data = (m_speech_data & ~mask) | ((data & 4) ? mask : 0);
-
- // 74259 Q6: TSI ROM A11
- m_speech->force_update(); // update stream to now
- m_speech_bank = (m_speech_bank & ~1) | (m_speech_data >> 6 & 1);
-
- // Q0-Q5: TSI C0-C5
- // Q7: TSI START line
- m_speech->data_w(space, 0, m_speech_data & 0x3f);
- m_speech->start_w(m_speech_data >> 7 & 1);
- }
-}
-
-READ8_MEMBER(fidel6502_state::fexcel_ttl_r)
-{
- // a0-a2,d6: from speech board: language switches and TSI BUSY line, otherwise tied to VCC
- UINT8 d6 = (read_safe(m_inp_matrix[9], 0xff) >> offset & 1) ? 0x40 : 0;
-
- // a0-a2,d7: multiplexed inputs (active low)
- return d6 | ((read_inputs(9) >> offset & 1) ? 0 : 0x80);
+ return (read_inputs(9) << (offset^7) & 0x80) ^ 0xff;
}
@@ -590,12 +261,11 @@ static ADDRESS_MAP_START( csc_map, AS_PROGRAM, 8, fidel6502_state )
ADDRESS_MAP_END
-// SC12/6086
+// SC12
static ADDRESS_MAP_START( sc12_map, AS_PROGRAM, 8, fidel6502_state )
ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(0x0000, 0x0fff) AM_RAM
- AM_RANGE(0x2000, 0x5fff) AM_READ(sc12_cart_r)
AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x1fff) AM_WRITE(sc12_control_w)
AM_RANGE(0x8000, 0x9fff) AM_ROM
AM_RANGE(0xa000, 0xa007) AM_MIRROR(0x1ff8) AM_READ(sc12_input_r)
@@ -604,11 +274,11 @@ static ADDRESS_MAP_START( sc12_map, AS_PROGRAM, 8, fidel6502_state )
ADDRESS_MAP_END
-// 6080/6092/6093 (Excellence)
+// FEV
-static ADDRESS_MAP_START( fexcel_map, AS_PROGRAM, 8, fidel6502_state )
- AM_RANGE(0x0000, 0x1fff) AM_MIRROR(0x2000) AM_RAM
- AM_RANGE(0x4000, 0x4007) AM_MIRROR(0x3ff8) AM_READWRITE(fexcel_ttl_r, fexcel_ttl_w)
+static ADDRESS_MAP_START( fev_map, AS_PROGRAM, 8, fidel6502_state )
+ ADDRESS_MAP_UNMAP_HIGH
+ AM_RANGE(0x0000, 0x1fff) AM_RAM
AM_RANGE(0x8000, 0xffff) AM_ROM
ADDRESS_MAP_END
@@ -618,171 +288,197 @@ ADDRESS_MAP_END
Input Ports
******************************************************************************/
-static INPUT_PORTS_START( sc12 )
+static INPUT_PORTS_START( csc )
PORT_START("IN.0")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a1")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a2")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a3")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a4")
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a5")
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a6")
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a7")
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a8")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x100,IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Speak") PORT_CODE(KEYCODE_SPACE)
PORT_START("IN.1")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b1")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b2")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b3")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b4")
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b5")
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b6")
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b7")
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b8")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x100,IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RV") PORT_CODE(KEYCODE_V)
PORT_START("IN.2")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c1")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c2")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c3")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c4")
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c5")
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c6")
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c7")
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c8")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x100,IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("TM") PORT_CODE(KEYCODE_T)
PORT_START("IN.3")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d1")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d2")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d3")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d4")
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d5")
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d6")
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d7")
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d8")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x100,IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("LV") PORT_CODE(KEYCODE_L) // level
PORT_START("IN.4")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e1")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e2")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e3")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e4")
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e5")
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e6")
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e7")
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e8")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x100,IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("DM") PORT_CODE(KEYCODE_M)
PORT_START("IN.5")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f1")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f2")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f3")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f4")
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f5")
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f6")
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f7")
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f8")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x100,IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("ST") PORT_CODE(KEYCODE_S)
PORT_START("IN.6")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g1")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g2")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g3")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g4")
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g5")
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g6")
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g7")
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g8")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x100,IP_ACTIVE_HIGH, IPT_UNUSED)
PORT_START("IN.7")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h1")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h2")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h3")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h4")
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h5")
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h6")
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h7")
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h8")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x100,IP_ACTIVE_HIGH, IPT_UNUSED)
PORT_START("IN.8")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("RV/Pawn")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("DM/Knight")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("TB/Bishop")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("LV/Rook")
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("PV/Queen")
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("PB/King")
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_DEL) PORT_NAME("CL")
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_NAME("RE")
-INPUT_PORTS_END
-
-static INPUT_PORTS_START( fexcel )
- PORT_INCLUDE( sc12 )
-
- PORT_MODIFY("IN.8")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_DEL) PORT_NAME("Clear")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("Move/Pawn")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Hint/Knight")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Take Back/Bishop")
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("Level/Rook")
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("Options/Queen")
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("Verify/King")
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_CODE(KEYCODE_N) PORT_NAME("New Game")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Pawn") PORT_CODE(KEYCODE_1)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Rook") PORT_CODE(KEYCODE_2)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Knight") PORT_CODE(KEYCODE_3)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Bishop") PORT_CODE(KEYCODE_4)
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Queen") PORT_CODE(KEYCODE_5)
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("King") PORT_CODE(KEYCODE_6)
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CL") PORT_CODE(KEYCODE_DEL) // clear
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RE") PORT_CODE(KEYCODE_R) // reset
+ PORT_BIT(0x100,IP_ACTIVE_HIGH, IPT_UNUSED) PORT_UNUSED
INPUT_PORTS_END
-static INPUT_PORTS_START( fexcelv )
- PORT_INCLUDE( fexcel )
-
- PORT_START("IN.9")
- PORT_CONFNAME( 0x03, 0x00, "Language" ) PORT_CHANGED_MEMBER(DEVICE_SELF, fidel6502_state, fexcelv_bankswitch, 0)
- PORT_CONFSETTING( 0x00, "English" )
- PORT_CONFSETTING( 0x01, "German" )
- PORT_CONFSETTING( 0x02, "French" )
- PORT_CONFSETTING( 0x03, "Spanish" )
- PORT_BIT(0x7c, IP_ACTIVE_HIGH, IPT_UNUSED)
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_SPECIAL) PORT_READ_LINE_DEVICE_MEMBER("speech", s14001a_device, busy_r)
-INPUT_PORTS_END
-
-
-static INPUT_PORTS_START( csc )
- PORT_INCLUDE( sc12 )
-
- PORT_MODIFY("IN.0")
- PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_SPACE) PORT_NAME("Speaker")
-
- PORT_MODIFY("IN.1")
- PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_V) PORT_NAME("RV")
+static INPUT_PORTS_START( sc12 )
+ PORT_START("IN.0")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD)
- PORT_MODIFY("IN.2")
- PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_NAME("TM")
+ PORT_START("IN.1")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD)
- PORT_MODIFY("IN.3")
- PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_L) PORT_NAME("LV")
+ PORT_START("IN.2")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD)
- PORT_MODIFY("IN.4")
- PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_M) PORT_NAME("DM")
+ PORT_START("IN.3")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD)
- PORT_MODIFY("IN.5")
- PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_S) PORT_NAME("ST")
+ PORT_START("IN.4")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD)
- PORT_MODIFY("IN.8")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("Pawn")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Rook")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Knight")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("Bishop")
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("Queen")
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("King")
+ PORT_START("IN.5")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD)
- PORT_START("IN.9") // hardwired
- PORT_CONFNAME( 0x01, 0x00, "Language" )
- PORT_CONFSETTING( 0x00, "English" )
- PORT_CONFSETTING( 0x01, "Other" )
- PORT_CONFNAME( 0x02, 0x00, DEF_STR( Unknown ) )
- PORT_CONFSETTING( 0x00, DEF_STR( Off ) )
- PORT_CONFSETTING( 0x02, DEF_STR( On ) )
-INPUT_PORTS_END
+ PORT_START("IN.6")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD)
-static INPUT_PORTS_START( cscg )
- PORT_INCLUDE( csc )
+ PORT_START("IN.7")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD)
- PORT_MODIFY("IN.9")
- PORT_CONFNAME( 0x01, 0x01, "Language" )
- PORT_CONFSETTING( 0x00, "English" )
- PORT_CONFSETTING( 0x01, "Other" )
+ PORT_START("IN.8")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RV / Pawn") PORT_CODE(KEYCODE_1)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("DM / Knight") PORT_CODE(KEYCODE_2)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("TB / Bishop") PORT_CODE(KEYCODE_3)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("LV / Rook") PORT_CODE(KEYCODE_4)
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("PV / Queen") PORT_CODE(KEYCODE_5)
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("PB / King") PORT_CODE(KEYCODE_6)
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CL") PORT_CODE(KEYCODE_DEL) // clear
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RE") PORT_CODE(KEYCODE_R) // reset
INPUT_PORTS_END
@@ -814,7 +510,7 @@ static MACHINE_CONFIG_START( csc, fidel6502_state )
MCFG_PIA_CB2_HANDLER(WRITELINE(fidel6502_state, csc_pia1_cb2_w))
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", fidelz80base_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_fidel_csc)
+ MCFG_DEFAULT_LAYOUT(layout_fidel_vsc)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -831,9 +527,8 @@ static MACHINE_CONFIG_START( sc12, fidel6502_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", R65C02, XTAL_4MHz)
MCFG_CPU_PROGRAM_MAP(sc12_map)
- MCFG_TIMER_DRIVER_ADD_PERIODIC("irq_on", fidel6502_state, irq_on, attotime::from_hz(780)) // from 556 timer
- MCFG_TIMER_START_DELAY(attotime::from_hz(780) - attotime::from_nsec(15250)) // active for 15.25us
- MCFG_TIMER_DRIVER_ADD_PERIODIC("irq_off", fidel6502_state, irq_off, attotime::from_hz(780))
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("sc12_irq", fidel6502_state, sc12_irq, attotime::from_hz(780)) // from 556 timer
+ MCFG_TIMER_DRIVER_ADD("irq_off", fidel6502_state, irq_off)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", fidelz80base_state, display_decay_tick, attotime::from_msec(1))
MCFG_DEFAULT_LAYOUT(layout_fidel_sc12)
@@ -842,37 +537,21 @@ static MACHINE_CONFIG_START( sc12, fidel6502_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
-
- /* cartridge */
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "fidel_scc")
- MCFG_GENERIC_EXTENSIONS("bin,dat")
- MCFG_GENERIC_LOAD(fidelz80base_state, scc_cartridge)
- MCFG_SOFTWARE_LIST_ADD("cart_list", "fidel_scc")
MACHINE_CONFIG_END
-static MACHINE_CONFIG_START( fexcel, fidel6502_state )
+static MACHINE_CONFIG_START( fev, fidel6502_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", M65SC02, XTAL_12MHz/4) // G65SC102P-3, 12.0M ceramic resonator
- MCFG_CPU_PROGRAM_MAP(fexcel_map)
- MCFG_TIMER_DRIVER_ADD_PERIODIC("irq_on", fidel6502_state, irq_on, attotime::from_hz(780)) // from 556 timer, PCB photo suggests it's same as sc12
- MCFG_TIMER_START_DELAY(attotime::from_hz(780) - attotime::from_nsec(15250)) // active for 15.25us
- MCFG_TIMER_DRIVER_ADD_PERIODIC("irq_off", fidel6502_state, irq_off, attotime::from_hz(780))
+ MCFG_CPU_ADD("maincpu", M65SC02, XTAL_3MHz) // M65SC102 (CMD)
+ MCFG_CPU_PROGRAM_MAP(fev_map)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", fidelz80base_state, display_decay_tick, attotime::from_msec(1))
MCFG_DEFAULT_LAYOUT(layout_fidel_fev)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
-MACHINE_CONFIG_END
-
-static MACHINE_CONFIG_DERIVED( fexcelv, fexcel )
-
- /* sound hardware */
MCFG_SOUND_ADD("speech", S14001A, 25000) // R/C circuit, around 25khz
- MCFG_S14001A_EXT_READ_HANDLER(READ8(fidel6502_state, fexcelv_speech_r))
+ MCFG_S14001A_EXT_READ_HANDLER(READ8(fidel6502_state, csc_speech_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
MACHINE_CONFIG_END
@@ -895,43 +574,6 @@ ROM_START( csc )
ROM_RELOAD( 0x1000, 0x1000)
ROM_END
-ROM_START( cscsp )
- ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD("101-64109.bin", 0x2000, 0x2000, CRC(08a3577c) SHA1(69fe379d21a9d4b57c84c3832d7b3e7431eec341) )
- ROM_LOAD("1025a03.bin", 0xa000, 0x2000, CRC(63982c07) SHA1(5ed4356323d5c80df216da55994abe94ba4aa94c) )
- ROM_LOAD("1025a02.bin", 0xc000, 0x2000, CRC(9e6e7c69) SHA1(4f1ed9141b6596f4d2b1217d7a4ba48229f3f1b0) )
- ROM_LOAD("1025a01.bin", 0xe000, 0x2000, CRC(57f068c3) SHA1(7d2ac4b9a2fba19556782863bdd89e2d2d94e97b) )
- ROM_LOAD("74s474.bin", 0xfe00, 0x0200, CRC(4511ba31) SHA1(e275b1739f8c3aa445cccb6a2b597475f507e456) )
-
- ROM_REGION( 0x2000, "speech", 0 )
- ROM_LOAD("vcc-spanish.bin", 0x0000, 0x2000, BAD_DUMP CRC(8766e128) SHA1(78c7413bf240159720b131ab70bfbdf4e86eb1e9) ) // taken from vcc/fexcelv, assume correct
-ROM_END
-
-ROM_START( cscg )
- ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD("101-64109.bin", 0x2000, 0x2000, CRC(08a3577c) SHA1(69fe379d21a9d4b57c84c3832d7b3e7431eec341) )
- ROM_LOAD("1025a03.bin", 0xa000, 0x2000, CRC(63982c07) SHA1(5ed4356323d5c80df216da55994abe94ba4aa94c) )
- ROM_LOAD("1025a02.bin", 0xc000, 0x2000, CRC(9e6e7c69) SHA1(4f1ed9141b6596f4d2b1217d7a4ba48229f3f1b0) )
- ROM_LOAD("1025a01.bin", 0xe000, 0x2000, CRC(57f068c3) SHA1(7d2ac4b9a2fba19556782863bdd89e2d2d94e97b) )
- ROM_LOAD("74s474.bin", 0xfe00, 0x0200, CRC(4511ba31) SHA1(e275b1739f8c3aa445cccb6a2b597475f507e456) )
-
- ROM_REGION( 0x2000, "speech", 0 )
- ROM_LOAD("vcc-german.bin", 0x0000, 0x2000, BAD_DUMP CRC(6c85e310) SHA1(20d1d6543c1e6a1f04184a2df2a468f33faec3ff) ) // taken from fexcelv, assume correct
-ROM_END
-
-ROM_START( cscfr )
- ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD("101-64109.bin", 0x2000, 0x2000, CRC(08a3577c) SHA1(69fe379d21a9d4b57c84c3832d7b3e7431eec341) )
- ROM_LOAD("1025a03.bin", 0xa000, 0x2000, CRC(63982c07) SHA1(5ed4356323d5c80df216da55994abe94ba4aa94c) )
- ROM_LOAD("1025a02.bin", 0xc000, 0x2000, CRC(9e6e7c69) SHA1(4f1ed9141b6596f4d2b1217d7a4ba48229f3f1b0) )
- ROM_LOAD("1025a01.bin", 0xe000, 0x2000, CRC(57f068c3) SHA1(7d2ac4b9a2fba19556782863bdd89e2d2d94e97b) )
- ROM_LOAD("74s474.bin", 0xfe00, 0x0200, CRC(4511ba31) SHA1(e275b1739f8c3aa445cccb6a2b597475f507e456) )
-
- ROM_REGION( 0x2000, "speech", 0 )
- ROM_LOAD("vcc-french.bin", 0x0000, 0x2000, BAD_DUMP CRC(fe8c5c18) SHA1(2b64279ab3747ee81c86963c13e78321c6cfa3a3) ) // taken from fexcelv, assume correct
-ROM_END
-
-
ROM_START( fscc12 )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD("101-1068a01", 0x8000, 0x2000, CRC(63c76cdd) SHA1(e0771c98d4483a6b1620791cb99a7e46b0db95c4) ) // SSS SCM23C65E4
@@ -939,33 +581,21 @@ ROM_START( fscc12 )
ROM_LOAD("tmm2764d-2", 0xe000, 0x2000, CRC(183d3edc) SHA1(3296a4c3bce5209587d4a1694fce153558544e63) ) // Toshiba TMM2764D-2
ROM_END
-
-ROM_START( fexcel )
- ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD("101-1080a01.ic5", 0x8000, 0x8000, CRC(846f8e40) SHA1(4e1d5b08d5ff3422192b54fa82cb3f505a69a971) ) // same as fexcelv
-ROM_END
-
ROM_START( fexcelv )
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD("101-1080a01.ic5", 0x8000, 0x8000, CRC(846f8e40) SHA1(4e1d5b08d5ff3422192b54fa82cb3f505a69a971) ) // PCB1, M27256
+ ROM_LOAD("101-1080a01.ic5", 0x8000, 0x8000, CRC(846f8e40) SHA1(4e1d5b08d5ff3422192b54fa82cb3f505a69a971) )
ROM_REGION( 0x8000, "speech", 0 )
- ROM_LOAD("101-1081a01.ic2", 0x0000, 0x8000, CRC(c8ae1607) SHA1(6491ce6be60ed77f3dd931c0ca17616f13af943e) ) // PCB2, M27256
+ ROM_LOAD("101-1081a01.ic2", 0x0000, 0x8000, CRC(c8ae1607) SHA1(6491ce6be60ed77f3dd931c0ca17616f13af943e) )
ROM_END
-
-
/******************************************************************************
Drivers
******************************************************************************/
-/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */
-COMP( 1981, csc, 0, 0, csc, csc, driver_device, 0, "Fidelity Electronics", "Champion Sensory Chess Challenger (English)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
-COMP( 1981, cscsp, csc, 0, csc, cscg, driver_device, 0, "Fidelity Electronics", "Champion Sensory Chess Challenger (Spanish)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
-COMP( 1981, cscg, csc, 0, csc, cscg, driver_device, 0, "Fidelity Electronics", "Champion Sensory Chess Challenger (German)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
-COMP( 1981, cscfr, csc, 0, csc, cscg, driver_device, 0, "Fidelity Electronics", "Champion Sensory Chess Challenger (French)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
+/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */
+COMP( 1981, csc, 0, 0, csc, csc, driver_device, 0, "Fidelity Electronics", "Champion Sensory Chess Challenger", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
-COMP( 1984, fscc12, 0, 0, sc12, sc12, driver_device, 0, "Fidelity Electronics", "Sensory Chess Challenger 12-B", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
+COMP( 1984, fscc12, 0, 0, sc12, sc12, driver_device, 0, "Fidelity Electronics", "Sensory Chess Challenger 12-B", MACHINE_NOT_WORKING )
-COMP( 1987, fexcel, 0, 0, fexcel, fexcel, driver_device, 0, "Fidelity Electronics", "Excellence (model 6080/6093)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
-COMP( 1987, fexcelv, 0, 0, fexcelv, fexcelv, driver_device, 0, "Fidelity Electronics", "Voice Excellence", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
+COMP( 1987, fexcelv, 0, 0, fev, csc, driver_device, 0, "Fidelity Electronics", "Voice Excellence", MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/fidel68k.cpp b/src/mame/drivers/fidel68k.cpp
deleted file mode 100644
index 56cd651bb90..00000000000
--- a/src/mame/drivers/fidel68k.cpp
+++ /dev/null
@@ -1,473 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:hap
-/******************************************************************************
-
- Fidelity Electronics 68000 based board driver
-
- TODO:
- - how does dual-CPU work?
- - IRQ level/timing is unknown
- - USART is not emulated
- - V11 CPU should be M68EC060, not yet emulated
-
-******************************************************************************
-
-Elite Avant Garde (EAG, model 6114)
------------------------------------
-
-There are 5 versions of model 6114(V1 to V5). The one emulated here came from a V2,
-but is practically emulated as a V4.
-
-V1: 128KB DRAM, no EEPROM
-V2: 128KB DRAM
-V3: 512KB DRAM
-V4: 1MB DRAM
-V5: 128KB+64KB DRAM, dual-CPU! (2*68K @ 16MHz)
-
-V6-V11 are on model 6117. Older 1986 model 6081 uses a 6502 CPU.
-
-Hardware info:
---------------
-- MC68HC000P12F 16MHz CPU, 16MHz XTAL
-- MB1422A DRAM Controller, 25MHz XTAL near, 4 DRAM slots(V2: slot 1 and 2 64KB)
-- 2*27C512 64KB EPROM, 2*KM6264AL-10 8KB SRAM, 2*AT28C64X 8KB EEPROM
-- OKI M82C51A-2 USART, 4.9152MHz XTAL
-- other special: magnet sensors, external module slot, serial port
-
-IRQ source is unknown. Several possibilities:
-- NE555 timer IC
-- MM/SN74HC4060 binary counter IC (near the M82C51A)
-- one of the XTALs, plus divider of course
-
-The module slot pinout is different from SCC series. The data on those appears
-to be compatible with EAG though and will load fine with an adapter.
-
-The USART allows for a serial connection between the chess computer and another
-device, for example a PC. Fidelity released a DOS tool called EAGLINK which
-featured PC printer support, complete I/O control, detailed information while
-the program is 'thinking', etc.
-
-Memory map: (of what is known)
------------
-000000-01FFFF: 128KB ROM
-104000-107FFF: 16KB SRAM
-200000-2FFFFF: hashtable DRAM (max. 1MB)
-300000-30000F W hi d0: NE591: 7seg data
-300000-30000F W lo d0: NE591: LED data
-300000-30000F R lo d7: 74259: keypad rows 0-7
-400000-400001 W lo d0-d3: 74145/7442: led/keypad mux, buzzer out
-400000-4????? R hi: external module slot
-700002-700003 R lo d7: 74251: keypad row 8
-604000-607FFF: 16KB EEPROM
-
-
-******************************************************************************
-
-Elite Avant Garde (EAG, model 6117)
------------------------------------
-
-There are 6 versions of model 6114(V6 to V11). From a programmer's point of view,
-the hardware is very similar to model 6114.
-
-V6: 68020, 512KB hashtable RAM
-V7: 68020, 1MB h.RAM
-V8: 2*68020, 512KB+128KB h.RAM
-V9: 68030, 1MB h.RAM
-V10: 68040, 1MB h.RAM
-V11: 68060, 2MB h.RAM, high speed
-
-V7 Hardware info:
------------------
-- MC68020RC25E CPU, 25MHz XTAL
-- 4*AS7C164-20PC 8KB SRAM, 2*KM684000ALG-7L 512KB CMOS SRAM
-- 2*27C512? 64KB EPROM, 2*HM6264LP-15 8KB SRAM, 2*AT28C64B 8KB EEPROM, 2*GAL16V8C
-- same as 6114: M82C51A, NE555, SN74HC4060, module slot, chessboard, ..
-
-V7 Memory map:
---------------
-000000-01FFFF: 128KB ROM
-104000-107FFF: 16KB SRAM (unused?)
-200000-2FFFFF: hashtable SRAM
-300000-30000x: see model 6114
-400000-40000x: see model 6114
-700000-70000x: see model 6114
-604000-607FFF: 16KB EEPROM
-800000-807FFF: 32KB SRAM
-
-V10 Hardware info:
-------------------
-- 68040 CPU, 25MHz
-- other: assume same or very similar to V11(see below)
-
-The ROM dump came from the V11(see below). Built-in factory test proves
-that this program is a V10. Hold TB button immediately after power-on and
-press it for a sequence of tests:
-1) all LEDs on
-2) F40C: V10 program version
-3) 38b9: V10 ROM checksum
-4) xxxx: external module ROM checksum (0000 if no module present)
-5) xxxx: user settings (stored in EEPROM)
-6) xxxx: "
-7) 1024: hashtable RAM size
-8) return to game
-
-V11 Hardware info:
-------------------
-- MC68EC060RC75 CPU, 36MHz XTAL(36MHz bus, 72MHz CPU), CPU cooler required
-- 4*CXK5863AP-20 8KB SRAM, 4*K6X4008C1F-DF55 512KB CMOS SRAM
-- 4*M27C256B 32KB EPROM, 2*AT28C64 8KB EEPROM, 5*GAL16V8D
-- NEC D71051C USART, assume 8MHz, on quick glance it's same as the OKI USART
-- same as 6114: NE555, SN74HC4060, module slot, chessboard, ..
-
-This is a custom overclocked V10, manufactured by Wilfried Bucke. PCB is marked:
-"CHESS HW DESIGN COPYRIGHT 22-10-2002: REVA03 510.1136A01/510.1144B01 COMPONENT SIDE"
-There are two versions of this, one with a 66MHz CPU, one with a 72MHz CPU.
-Maybe other differences too?
-
-V1x Memory map:
----------------
-000000-01FFFF: 128KB ROM
-200000-3FFFFF: hashtable SRAM (less on V10?)
-B0000x-xxxxxx: see V7, -800000
-
-******************************************************************************/
-
-#include "emu.h"
-#include "cpu/m68000/m68000.h"
-#include "machine/nvram.h"
-
-#include "includes/fidelz80.h"
-
-// internal artwork
-#include "fidel_eag.lh" // clickable
-
-
-class fidel68k_state : public fidelz80base_state
-{
-public:
- fidel68k_state(const machine_config &mconfig, device_type type, const char *tag)
- : fidelz80base_state(mconfig, type, tag)
- { }
-
- // devices/pointers
-
- // EAG(6114/6117)
- void eag_prepare_display();
- DECLARE_READ8_MEMBER(eag_input1_r);
- DECLARE_WRITE8_MEMBER(eag_leds_w);
- DECLARE_WRITE8_MEMBER(eag_7seg_w);
- DECLARE_WRITE8_MEMBER(eag_mux_w);
- DECLARE_READ8_MEMBER(eag_input2_r);
- DECLARE_READ8_MEMBER(eag_cart_r);
-};
-
-
-
-// Devices, I/O
-
-/******************************************************************************
- EAG
-******************************************************************************/
-
-// misc handlers
-
-void fidel68k_state::eag_prepare_display()
-{
- // 8*7seg leds, (8+1)*8 chessboard leds
- UINT8 seg_data = BITSWAP8(m_7seg_data,0,1,3,2,7,5,6,4);
- set_display_segmask(0x1ef, 0x7f);
- display_matrix(16, 9, m_led_data << 8 | seg_data, m_inp_mux);
-}
-
-
-// TTL/generic
-
-READ8_MEMBER(fidel68k_state::eag_input1_r)
-{
- // a1-a3,d7: multiplexed inputs (active low)
- return (read_inputs(9) >> offset & 1) ? 0 : 0x80;
-}
-
-READ8_MEMBER(fidel68k_state::eag_input2_r)
-{
- // d7: multiplexed inputs highest bit
- return (read_inputs(9) & 0x100) ? 0x80 : 0;
-}
-
-WRITE8_MEMBER(fidel68k_state::eag_leds_w)
-{
- // a1-a3,d0: led data
- m_led_data = (m_led_data & ~(1 << offset)) | ((data & 1) << offset);
- eag_prepare_display();
-}
-
-WRITE8_MEMBER(fidel68k_state::eag_7seg_w)
-{
- // a1-a3,d0(d8): digit segment data
- m_7seg_data = (m_7seg_data & ~(1 << offset)) | ((data & 1) << offset);
- eag_prepare_display();
-}
-
-WRITE8_MEMBER(fidel68k_state::eag_mux_w)
-{
- // d0-d3: 74145 A-D
- // 74145 0-8: input mux, digit/led select
- // 74145 9: speaker out
- UINT16 sel = 1 << (data & 0xf);
- m_speaker->level_w(sel >> 9 & 1);
- m_inp_mux = sel & 0x1ff;
- eag_prepare_display();
-}
-
-READ8_MEMBER(fidel68k_state::eag_cart_r)
-{
- if (m_cart->exists())
- return m_cart->read_rom(space, offset);
- else
- return 0;
-}
-
-
-
-/******************************************************************************
- Address Maps
-******************************************************************************/
-
-// EAG
-
-static ADDRESS_MAP_START( eag_map, AS_PROGRAM, 16, fidel68k_state )
- AM_RANGE(0x000000, 0x01ffff) AM_ROM
- AM_RANGE(0x104000, 0x107fff) AM_RAM
- AM_RANGE(0x200000, 0x2fffff) AM_RAM // DRAM slots
- AM_RANGE(0x300000, 0x30000f) AM_MIRROR(0x000010) AM_READWRITE8(eag_input1_r, eag_leds_w, 0x00ff)
- AM_RANGE(0x300000, 0x30000f) AM_MIRROR(0x000010) AM_WRITE8(eag_7seg_w, 0xff00) AM_READNOP
- AM_RANGE(0x400000, 0x407fff) AM_READ8(eag_cart_r, 0xff00)
- AM_RANGE(0x400000, 0x400001) AM_WRITE8(eag_mux_w, 0x00ff)
- AM_RANGE(0x400002, 0x400007) AM_WRITENOP // ?
- AM_RANGE(0x604000, 0x607fff) AM_RAM AM_SHARE("nvram")
- AM_RANGE(0x700002, 0x700003) AM_READ8(eag_input2_r, 0x00ff)
-ADDRESS_MAP_END
-
-static ADDRESS_MAP_START( eagv7_map, AS_PROGRAM, 32, fidel68k_state )
- AM_RANGE(0x000000, 0x01ffff) AM_ROM
- AM_RANGE(0x104000, 0x107fff) AM_RAM
- AM_RANGE(0x200000, 0x2fffff) AM_RAM
- AM_RANGE(0x300000, 0x30000f) AM_MIRROR(0x000010) AM_READWRITE8(eag_input1_r, eag_leds_w, 0x00ff00ff)
- AM_RANGE(0x300000, 0x30000f) AM_MIRROR(0x000010) AM_WRITE8(eag_7seg_w, 0xff00ff00) AM_READNOP
- AM_RANGE(0x400000, 0x407fff) AM_READ8(eag_cart_r, 0xff00ff00)
- AM_RANGE(0x400000, 0x400003) AM_WRITE8(eag_mux_w, 0x00ff0000)
- AM_RANGE(0x400004, 0x400007) AM_WRITENOP // ?
- AM_RANGE(0x604000, 0x607fff) AM_RAM AM_SHARE("nvram")
- AM_RANGE(0x700000, 0x700003) AM_READ8(eag_input2_r, 0x000000ff)
- AM_RANGE(0x800000, 0x807fff) AM_RAM
-ADDRESS_MAP_END
-
-static ADDRESS_MAP_START( eagv11_map, AS_PROGRAM, 32, fidel68k_state )
- AM_RANGE(0x00000000, 0x0001ffff) AM_ROM
- AM_RANGE(0x00200000, 0x003fffff) AM_RAM
- AM_RANGE(0x00b00000, 0x00b0000f) AM_MIRROR(0x00000010) AM_READWRITE8(eag_input1_r, eag_leds_w, 0x00ff00ff)
- AM_RANGE(0x00b00000, 0x00b0000f) AM_MIRROR(0x00000010) AM_WRITE8(eag_7seg_w, 0xff00ff00) AM_READNOP
- AM_RANGE(0x00c00000, 0x00c07fff) AM_READ8(eag_cart_r, 0xff00ff00)
- AM_RANGE(0x00c00000, 0x00c00003) AM_WRITE8(eag_mux_w, 0x00ff0000)
- AM_RANGE(0x00c00004, 0x00c00007) AM_WRITENOP // ?
- AM_RANGE(0x00e04000, 0x00e07fff) AM_RAM AM_SHARE("nvram")
- AM_RANGE(0x00f00000, 0x00f00003) AM_READ8(eag_input2_r, 0x000000ff)
- AM_RANGE(0x01000000, 0x0101ffff) AM_RAM
-ADDRESS_MAP_END
-
-
-
-/******************************************************************************
- Input Ports
-******************************************************************************/
-
-static INPUT_PORTS_START( eag )
- PORT_START("IN.0")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square h1")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square g1")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square f1")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square e1")
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square d1")
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square c1")
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square b1")
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square a1")
- PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_DEL) PORT_NAME("CL")
-
- PORT_START("IN.1")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square h2")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square g2")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square f2")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square e2")
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square d2")
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square c2")
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square b2")
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square a2")
- PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_M) PORT_NAME("DM")
-
- PORT_START("IN.2")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square h3")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square g3")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square f3")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square e3")
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square d3")
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square c3")
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square b3")
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square a3")
- PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_CODE(KEYCODE_N) PORT_NAME("New Game")
-
- PORT_START("IN.3")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square h4")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square g4")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square f4")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square e4")
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square d4")
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square c4")
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square b4")
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square a4")
-
- PORT_START("IN.4")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square h5")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square g5")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square f5")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square e5")
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square d5")
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square c5")
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square b5")
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square a5")
-
- PORT_START("IN.5")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square h6")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square g6")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square f6")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square e6")
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square d6")
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square c6")
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square b6")
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square a6")
-
- PORT_START("IN.6")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square h7")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square g7")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square f7")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square e7")
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square d7")
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square c7")
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square b7")
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square a7")
-
- PORT_START("IN.7")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square h8")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square g8")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square f8")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square e8")
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square d8")
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square c8")
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square b8")
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square a8")
-
- PORT_START("IN.8")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("PB/King")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("PV/Queen")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("TM/Rook")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("ST/Bishop")
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("TB/Knight")
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("LV/Pawn")
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_O) PORT_NAME("Option")
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_V) PORT_NAME("RV")
-INPUT_PORTS_END
-
-
-
-/******************************************************************************
- Machine Drivers
-******************************************************************************/
-
-static MACHINE_CONFIG_START( eag, fidel68k_state )
-
- /* basic machine hardware */
- MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz)
- MCFG_CPU_PROGRAM_MAP(eag_map)
- MCFG_CPU_PERIODIC_INT_DRIVER(fidel68k_state, irq2_line_hold, 600) // complete guess
-
- MCFG_NVRAM_ADD_1FILL("nvram")
-
- MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", fidelz80base_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_fidel_eag)
-
- /* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
-
- /* cartridge */
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "fidel_scc")
- MCFG_GENERIC_EXTENSIONS("bin,dat")
- MCFG_GENERIC_LOAD(fidelz80base_state, scc_cartridge)
- MCFG_SOFTWARE_LIST_ADD("cart_list", "fidel_scc")
-MACHINE_CONFIG_END
-
-static MACHINE_CONFIG_DERIVED( eagv7, eag )
-
- /* basic machine hardware */
- MCFG_CPU_REPLACE("maincpu", M68020, XTAL_25MHz)
- MCFG_CPU_PROGRAM_MAP(eagv7_map)
- MCFG_CPU_PERIODIC_INT_DRIVER(fidel68k_state, irq2_line_hold, 600) // complete guess
-MACHINE_CONFIG_END
-
-static MACHINE_CONFIG_DERIVED( eagv10, eag )
-
- /* basic machine hardware */
- MCFG_CPU_REPLACE("maincpu", M68040, XTAL_25MHz)
- MCFG_CPU_PROGRAM_MAP(eagv11_map)
- MCFG_CPU_PERIODIC_INT_DRIVER(fidel68k_state, irq2_line_hold, 600) // complete guess
-MACHINE_CONFIG_END
-
-static MACHINE_CONFIG_DERIVED( eagv11, eag )
-
- /* basic machine hardware */
- MCFG_CPU_REPLACE("maincpu", M68EC040, XTAL_36MHz*2) // wrong! should be M68EC060
- MCFG_CPU_PROGRAM_MAP(eagv11_map)
- MCFG_CPU_PERIODIC_INT_DRIVER(fidel68k_state, irq2_line_hold, 600) // complete guess
-MACHINE_CONFIG_END
-
-
-
-/******************************************************************************
- ROM Definitions
-******************************************************************************/
-
-ROM_START( feagv2 )
- ROM_REGION16_BE( 0x20000, "maincpu", 0 )
- ROM_LOAD16_BYTE("6114_e5.u18", 0x00000, 0x10000, CRC(f9c7bada) SHA1(60e545f829121b9a4f1100d9e85ac83797715e80) ) // 27c512
- ROM_LOAD16_BYTE("6114_o5.u19", 0x00001, 0x10000, CRC(04f97b22) SHA1(8b2845dd115498f7b385e8948eca6a5893c223d1) ) // "
-ROM_END
-
-
-ROM_START( feagv7 )
- ROM_REGION( 0x20000, "maincpu", 0 )
- ROM_LOAD16_BYTE("eag-v7b", 0x00000, 0x10000, CRC(f2f68b63) SHA1(621e5073e9c5083ac9a9b467f3ef8aa29beac5ac) )
- ROM_LOAD16_BYTE("eag-v7a", 0x00001, 0x10000, CRC(506b688f) SHA1(0a091c35d0f01166b57f964b111cde51c5720d58) )
-ROM_END
-
-
-ROM_START( feagv11 )
- ROM_REGION( 0x20000, "maincpu", 0 )
- ROM_LOAD32_BYTE("16", 0x00000, 0x08000, CRC(8375d61f) SHA1(e042f6f01480c59ee09a458cf34f135664479824) ) // 27c256
- ROM_LOAD32_BYTE("18", 0x00002, 0x08000, CRC(9341dcaf) SHA1(686bd4799e89ffaf11a813d4cf5a2aedd4c2d97a) ) // "
- ROM_LOAD32_BYTE("19", 0x00003, 0x08000, CRC(a70c5468) SHA1(7f6b4f46577d5cfdaa84d387c7ce35d941e5bbc7) ) // "
- ROM_LOAD32_BYTE("17", 0x00001, 0x08000, CRC(bfd14916) SHA1(115af6dfd29ddd8ad6d2ce390f8ecc4d60de6fce) ) // "
-ROM_END
-
-#define rom_feagv10 rom_feagv11
-
-
-
-/******************************************************************************
- Drivers
-******************************************************************************/
-
-/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */
-COMP( 1989, feagv2, 0, 0, eag, eag, driver_device, 0, "Fidelity Electronics", "Elite Avant Garde (model 6114-2/3/4)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
-COMP( 1990, feagv7, 0, 0, eagv7, eag, driver_device, 0, "Fidelity Electronics", "Elite Avant Garde (model 6117-7)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
-COMP( 1990, feagv10, 0, 0, eagv10, eag, driver_device, 0, "Fidelity Electronics", "Elite Avant Garde (model 6117-10)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
-COMP( 2002, feagv11, feagv10, 0, eagv11, eag, driver_device, 0, "hack (Wilfried Bucke)", "Elite Avant Garde (model 6117-11)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
diff --git a/src/mame/drivers/fidelz80.cpp b/src/mame/drivers/fidelz80.cpp
index fd14411bfef..6e3e5cb725e 100644
--- a/src/mame/drivers/fidelz80.cpp
+++ b/src/mame/drivers/fidelz80.cpp
@@ -4,46 +4,18 @@
Fidelity Electronics Z80 based board driver
for 6502 based boards, see drivers/fidel6502.cpp
- for 68000 based boards, see drivers/fidel68k.cpp
+
+ Detailed RE work done by Kevin 'kevtris' Horton, except where noted
TODO:
- Figure out why it says the first speech line twice; it shouldn't?
It sometimes does this on Voice Sensory Chess Challenger real hardware.
It can also be heard on Advanced Voice Chess Challenger real hardware, but not the whole line:
"I I am Fidelity's chess challenger", instead.
- - VBRC card scanner
-
- Chess pieces are required, but theoretically blindfold chess is possible.
- Chessboard artwork is provided for boards with pressure/magnet sensors.
- Read the official manual(s) on how to play.
-
- Keypad legend:
- - RE: Reset
- - CL: Clear
- - EN: Enter
- - PB: Problem Mode
- - PV: Position Verification
- - LV: Playing Levels
- - TB: Take Back
- - DM: Display Move/Double Move
- - RV: Reverse
- - ST: Set/Stop
- - TM: Time
-
- Peripherals, compatible with various boards:
- - Fidelity Challenger Printer - thermal printer, MCU=?
-
- Program/data cartridges, for various boards, some cross-compatible:
- - CG6: Greatest Chess Games 1
- - CAC: Challenger Advanced Chess - 8KB 101-1038A01
- - CB9: Challenger Book Openings 1 - 8KB?
- - CB16: Challenger Book Openings 2 - 8+8KB 101-1042A01,02
- - others are alt. titles of these?
-
- Board hardware descriptions below.
- Detailed RE work done by Kevin 'kevtris' Horton, except where noted
+ - Get rom locations from pcb (done for UVC, VCC is probably similar)
+ - correctly hook up VBRC speech so that the z80 is halted while words are being spoken
-******************************************************************************
+***********************************************************************
Voice Chess Challenger (VCC) (version A and B?)
Advanced Voice Chess Challenger (UVC)
@@ -52,6 +24,7 @@ Decorator Challenger (FCC)
(which share the same hardware)
----------------------
+
The CPU is a Z80 running at 4MHz. The TSI chip runs at around 25KHz, using a
470K / 100pf RC network. This system is very very basic, and is composed of just
the Z80, 4 ROMs, the TSI chip, and an 8255.
@@ -79,12 +52,14 @@ Memory map (UVC):
4000-5FFF: 1K RAM (2114 SRAM x2)
6000-FFFF: empty
-Port map:
----------
+I/O map:
+--------
00-03: 8255 port chip, mirrored over the 00-FF range; program accesses F4-F7
+
8255 connections:
-----------------
+
PA.0 - segment G, TSI A0 (W)
PA.1 - segment F, TSI A1 (W)
PA.2 - segment E, TSI A2 (W)
@@ -113,15 +88,19 @@ PC.5 - button column B (W)
PC.6 - button column C (W)
PC.7 - button column D (W)
+
language switches:
------------------
+
When PB.6 is pulled low, the language switches can be read. There are four.
They connect to the button rows. When enabled, the row(s) will read low if
the jumper is present. English only VCC's do not have the 367 or any pads stuffed.
The jumpers are labelled: French, German, Spanish, and special.
+
language latch:
---------------
+
There's an unstuffed 7474 on the board that connects to PA.6 and PA.7. It allows
one to latch the state of A12 to the speech ROM. The English version has the chip
missing, and a jumper pulling "A12" to ground. This line is really a negative
@@ -137,10 +116,11 @@ automatically select the correct ROM(s). I have to test whether it will do auto
determination and give you a language option on power up or something.
-******************************************************************************
+***********************************************************************
-Chess Challenger 10 (CC10)
+Chess Challenger 10
-------------------
+
4 versions are known to exist: A,B,C,D. Strangely, version C has an 8080
instead of Z80. Chess Challenger 1,3 and 7 also run on very similar hardware.
@@ -151,6 +131,7 @@ the connections to ports A and B on the PPI:
8255 connections:
-----------------
+
PA.0 - segment G (W)
PA.1 - segment F (W)
PA.2 - segment E (W)
@@ -185,38 +166,6 @@ PC.7 - button column D (W)
******************************************************************************
-Chess Challenger 7 (BCC)
-------------------------
-RE information from netlist by Berger
-
-Zilog Z80A, 3.579MHz from XTAL
-Z80 IRQ/NMI unused, no timer IC.
-This is a cost-reduced design from CC10, no special I/O chips.
-
-Memory map:
------------
-0000-0FFF: 4K 2332 ROM CN19103N BCC-REVB.
-2000-2FFF: ROM/RAM bus conflict!
-3000-3FFF: 256 bytes RAM (2111 SRAM x2)
-4000-FFFF: Z80 A14/A15 not connected
-
-Port map (Write):
----------
-D0-D3: digit select and keypad mux
-D4: LOSE led
-D5: CHECK led
-A0-A2: NE591 A0-A2
-D7: NE591 D (_C not used)
-NE591 Q0-Q6: digit segments A-G
-NE591 Q7: buzzer
-
-Port map (Read):
----------
-D0-D3: keypad row
-
-
-******************************************************************************
-
Voice Bridge Challenger (Model VBRC, later reissued as Model 7002)
and Bridge Challenger 3 (Model 7014)
(which both share the same* hardware)
@@ -240,6 +189,7 @@ The 8041 runs at 5MHz.
Memory Map:
-----------
+
0000-1FFF: 8K 101-64108 ROM
2000-3FFF: 8K 101-64109 ROM
4000-5FFF: 8K 101-64110 ROM
@@ -253,12 +203,15 @@ when the word is done being spoken. This is because D0-D5 run to the TSI chip d
The TSI chip's ROM is 4K, and is marked 101-32118. The clock is the same as the Chess
Challengers- 470K/100pf which gives a frequency around 25KHz or so.
-Port Map:
----------
+I/O Map:
+--------
+
00-FF: 8041 I/O ports (A0 selects between the two)
+
8041 pinout:
------------
+
(note: columns are pulled up with 10K resistors)
P10 - column H, RD LED, VFD grid 0
@@ -284,8 +237,10 @@ PROG - I/O expander
T0 - optical card sensor (high = bright/reflective, low = dark/non reflective)
T1 - connects to inverter, then nothing?
+
D8243C I/O expander:
--------------------
+
P4.0 - segment M
P4.1 - segment L
P4.2 - segment N
@@ -306,8 +261,10 @@ P7.1 - goes through inverter, to pads that are not used
P7.2 - segment C
P7.3 - segment H
+
button matrix:
--------------
+
the matrix is composed of 8 columns by 4 rows.
A B C D E F G H
@@ -348,14 +305,159 @@ A detailed description of the hardware can be found also in the patent 4,373,719
******************************************************************************
+Champion Sensory Chess Challenger (CSC) (6502 based -> fidel6502.cpp driver)
+---------------------------------------
+
+Memory map:
+-----------
+
+0000-07FF: 2K of RAM
+0800-0FFF: 1K of RAM (note: mirrored twice)
+1000-17FF: PIA 0 (display, TSI speech chip)
+1800-1FFF: PIA 1 (keypad, LEDs)
+2000-3FFF: 101-64019 ROM (also used on the regular sensory chess challenger)
+4000-7FFF: mirror of 0000-3FFF
+8000-9FFF: not used
+A000-BFFF: 101-1025A03 ROM
+C000-DFFF: 101-1025A02 ROM
+E000-FDFF: 101-1025A01 ROM
+FE00-FFFF: 512 byte 74S474 PROM
+
+CPU is a 6502 running at 1.95MHz (3.9MHz resonator, divided by 2)
+
+NMI is not used.
+IRQ is connected to a 600Hz oscillator (38.4KHz divided by 64).
+Reset is connected to a power-on reset circuit.
+
+
+PIA 0:
+------
+
+PA0 - 7seg segments E, TSI A0
+PA1 - 7seg segments D, TSI A1
+PA2 - 7seg segments C, TSI A2
+PA3 - 7seg segments H, TSI A3
+PA4 - 7seg segments G, TSI A4
+PA5 - 7seg segments F, TSI A5
+PA6 - 7seg segments B
+PA7 - 7seg segments A
+
+PB0 - A12 on speech ROM (if used... not used on this model, ROM is 4K)
+PB1 - START line on S14001A
+PB2 - white wire
+PB3 - BUSY line from S14001A
+PB4 - Tone line (toggle to make a tone in the speaker)
+PB5 - button row 9
+PB6 - selection jumper (resistor to 5V)
+PB7 - selection jumper (resistor to ground)
+
+CA1 - NC
+CA2 - violet wire
+
+CB1 - NC
+CB2 - NC (connects to pin 14 of soldered connector)
+
+
+PIA 1:
+------
+
+PA0 - button row 1
+PA1 - button row 2
+PA2 - button row 3
+PA3 - button row 4
+PA4 - button row 5
+PA5 - button row 6
+PA6 - 7442 selector bit 0
+PA7 - 7442 selector bit 1
+
+PB0 - LED row 1
+PB1 - LED row 2
+PB2 - LED row 3
+PB3 - LED row 4
+PB4 - LED row 5
+PB5 - LED row 6
+PB6 - LED row 7
+PB7 - LED row 8
+
+CA1 - button row 7
+CA2 - selector bit 3
+
+CB1 - button row 8
+CB2 - selector bit 2
+
+
+Selector: (attached to PIA 1, outputs 1 of 10 pins low. 7442)
+---------
+
+output # (selected turns this column on, and all others off)
+0 - LED column A, button column A, 7seg digit 1
+1 - LED column B, button column B, 7seg digit 2
+2 - LED column C, button column C, 7seg digit 3
+3 - LED column D, button column D, 7seg digit 4
+4 - LED column E, button column E
+5 - LED column F, button column F
+6 - LED column G, button column G
+7 - LED column H, button column H
+8 - button column I
+9 -
+
+The rows/columns are indicated on the game board:
+
+ ABCDEFGH I
+--------------
+| | 8
+| | 7
+| | 6
+| | 5
+| | 4
+| | 3
+| | 2
+| | 1
+--------------
+
+The "lone LED" is above the control column.
+column I is the "control column" on the right for starting a new game, etc.
+
+The upper 6 buttons are connected as such:
+
+column A - speak
+column B - RV
+column C - TM
+column D - LV
+column E - DM
+column F - ST
+
+these 6 buttons use row 9 (connects to PIA 0)
+
+
+LED display:
+------------
+
+43 21 (digit number)
+-----
+88:88
+
+The LED display is four 7 segment digits. normal ABCDEFG lettering is used for segments.
+
+The upper dot is connected to digit 3 common
+The lower dot is connected to digit 4 common
+The lone LED is connected to digit 1 common
+
+All three of the above are called "segment H".
+
+
+***********************************************************************
+
Voice Sensory Chess Challenger (VSC)
------------------------------------
+
The display/button/LED/speech technology is identical to the above product.
Only the CPU board was changed. As such, it works the same but is interfaced
to different port chips this time.
Hardware:
---------
+
On the board are 13 chips.
The CPU is a Z80A running at 3.9MHz, with 20K of ROM and 1K of RAM mapped.
@@ -379,15 +481,17 @@ RST connects to a power-on reset circuit
Memory map:
-----------
+
0000-1FFF: 8K ROM 101-64018
2000-3FFF: 8K ROM 101-64019 (also used on the sensory champ. chess challenger)
4000-5FFF: 4K ROM 101-32024
6000-7FFF: 1K of RAM (2114 * 2)
8000-FFFF: not used, maps to open bus
-Port map:
----------
-There's only two chips in the portmap, an 8255 triple port chip, and a Z80A PIO
+I/O map:
+--------
+
+There's only two chips in the I/O map, an 8255 triple port chip, and a Z80A PIO
parallel input/output device.
Decoding isn't performed using a selector, but instead address lines are used.
@@ -417,11 +521,13 @@ This sequence repeats every 16 addresses. So to recap:
10-FF: mirrors of 00-0F.
-Refer to the Sensory Champ. Chess Chall. for explanations of the below
+Refer to the Sensory Champ. Chess Chall. above for explanations of the below
I/O names and labels. It's the same.
+
8255:
-----
+
PA.0 - segment D, TSI A0
PA.1 - segment E, TSI A1
PA.2 - segment F, TSI A2
@@ -449,8 +555,10 @@ PC.5 - LED column F, button column F
PC.6 - LED column G, button column G
PC.7 - LED column H, button column H
+
Z80A PIO:
---------
+
PA.0 - button row 1
PA.1 - button row 2
PA.2 - button row 3
@@ -462,15 +570,17 @@ PA.7 - button row 8
PB.0 - button column I
PB.1 - button column J
-PB.2 - hi/lo TSI speaker volume
+PB.2 - Tone line (toggle to make tone in the speaker)
PB.3 - violet wire
PB.4 - white wire (and TSI BUSY line)
PB.5 - selection jumper input (see below)
PB.6 - TSI start line
-PB.7 - TSI ROM A12 line
+PB.7 - TSI ROM D0 line
+
selection jumpers:
------------------
+
These act like another row of buttons. It is composed of two diode locations,
so there's up to 4 possible configurations. My board does not have either diode
stuffed, so this most likely is "English". I suspect it selects which language to use
@@ -481,6 +591,86 @@ Anyways, the two jumpers are connected to button columns A and B and the common
connects to Z80A PIO PB.5, which basically makes a 10th button row. I would
expect that the software reads these once on startup only.
+
+******************************************************************************
+
+Sensory Chess Challenger (SC12-B) (6502 based -> fidel6502.cpp driver)
+---------------------------------
+
+RE information by Berger
+
+8*(8+1) buttons, 8+8+2 red LEDs
+DIN 41524C printer port
+36-pin edge connector
+CPU is a R65C02P4, running at 4MHz
+
+NE556 dual-timer IC:
+- timer#1, one-shot at power-on, to CPU _RESET
+- timer#2: R1=82K, R2=1K, C=22nf, to CPU _IRQ: ~780Hz, active low=15.25us
+
+
+Memory map:
+-----------
+
+6000-0FFF: 4K of RAM (2016 * 2)
+2000-5FFF: cartridge
+6000-7FFF: control(W)
+8000-9FFF: 8K ROM SSS SCM23C65E4
+A000-BFFF: keypad(R)
+C000-DFFF: 4K ROM TI TMS2732AJL-45
+E000-FFFF: 8K ROM Toshiba TMM2764D-2
+
+control: (74LS377)
+--------
+
+Q0-Q3: 7442 A0-A3
+Q4: enable printer port pin 1 input
+Q5: printer port pin 5 output
+Q6,Q7: LEDs common anode
+
+7442 0-8: input mux and LEDs cathode
+7442 9: buzzer
+
+The keypad is read through a 74HC251, where S0,1,2 is from CPU A0,1,2, Y is connected to CPU D7.
+If control Q4 is set, printer data can be read from I0.
+
+
+******************************************************************************
+
+Voice Excellence (FEV, model 6092) (6502 based -> fidel6502.cpp driver)
+----------------------------------
+
+PCB 1: 510.1117A02, appears to be identical to other "Excellence" boards
+CPU: GTE G65SC102P-3, 32 KB PRG ROM: AMI 101-1080A01(IC5), 8192x8 SRAM SRM2264C10(IC6)
+2 rows of LEDs on the side: 1*8 green, 1*8 red
+
+PCB 2: 510.1117A01
+Speech: TSI S14001A, 32 KB ROM: AMI 101-1081A01(IC2)
+Dip Switches set ROM A13 and ROM A14, on the side of the tablet
+
+ROM A12 is tied to S14001A's A11 (yuck)
+ROM A11 is however tied to the CPU's XYZ
+
+0000_07FF - Spanish 1/4
+0800_0FFF - Spanish 3/4
+1000_17FF - Spanish 2/4
+1800_1FFF - Spanish 4/4
+
+2000_27FF - French 1/4
+2800_2FFF - French 3/4
+3000_3FFF - French 2/4
+3800_3FFF - French 4/4
+
+4000_47FF - German 1/4
+4800_4FFF - German 3/4
+5000_57FF - German 2/4
+5800_5FFF - German 4/4
+
+6000_67FF - English 1/2
+6800_6FFF - Bridge Challenger 1/2
+7000_77FF - English 2/2
+7800_7FFF - Bridge Challenger 2/2
+
******************************************************************************/
#include "emu.h"
@@ -489,16 +679,16 @@ expect that the software reads these once on startup only.
#include "machine/i8255.h"
#include "machine/i8243.h"
#include "machine/z80pio.h"
+#include "sound/speaker.h"
#include "sound/beep.h"
#include "includes/fidelz80.h"
// internal artwork
#include "fidel_cc.lh"
-#include "fidel_bcc.lh"
#include "fidel_vcc.lh"
+#include "fidel_vsc.lh"
#include "fidel_vbrc.lh"
-#include "fidel_vsc.lh" // clickable
class fidelz80_state : public fidelz80base_state
@@ -510,6 +700,7 @@ public:
m_z80pio(*this, "z80pio"),
m_ppi8255(*this, "ppi8255"),
m_i8243(*this, "i8243"),
+ m_speaker(*this, "speaker"),
m_beeper_off(*this, "beeper_off"),
m_beeper(*this, "beeper")
{ }
@@ -519,12 +710,13 @@ public:
optional_device<z80pio_device> m_z80pio;
optional_device<i8255_device> m_ppi8255;
optional_device<i8243_device> m_i8243;
+ optional_device<speaker_sound_device> m_speaker;
optional_device<timer_device> m_beeper_off;
optional_device<beep_device> m_beeper;
DECLARE_INPUT_CHANGED_MEMBER(reset_button);
- // CC10 and VCC/UVC
+ // model VCC/UVC/CC10
void vcc_prepare_display();
DECLARE_READ8_MEMBER(vcc_speech_r);
DECLARE_WRITE8_MEMBER(vcc_ppi_porta_w);
@@ -534,12 +726,8 @@ public:
DECLARE_WRITE8_MEMBER(vcc_ppi_portc_w);
DECLARE_WRITE8_MEMBER(cc10_ppi_porta_w);
TIMER_DEVICE_CALLBACK_MEMBER(beeper_off_callback);
-
- // BCC
- DECLARE_READ8_MEMBER(bcc_input_r);
- DECLARE_WRITE8_MEMBER(bcc_control_w);
- // VSC
+ // model VSC
void vsc_prepare_display();
DECLARE_READ8_MEMBER(vsc_io_trampoline_r);
DECLARE_WRITE8_MEMBER(vsc_io_trampoline_w);
@@ -550,7 +738,7 @@ public:
DECLARE_READ8_MEMBER(vsc_pio_portb_r);
DECLARE_WRITE8_MEMBER(vsc_pio_portb_w);
- // VBRC/7014
+ // model 7014 and VBC
void vbrc_prepare_display();
DECLARE_WRITE8_MEMBER(vbrc_speech_w);
DECLARE_WRITE8_MEMBER(vbrc_mcu_p1_w);
@@ -574,7 +762,6 @@ void fidelz80base_state::machine_start()
m_led_select = 0;
m_led_data = 0;
m_7seg_data = 0;
- m_speech_data = 0;
m_speech_bank = 0;
// register for savestates
@@ -591,7 +778,6 @@ void fidelz80base_state::machine_start()
save_item(NAME(m_led_select));
save_item(NAME(m_led_data));
save_item(NAME(m_7seg_data));
- save_item(NAME(m_speech_data));
save_item(NAME(m_speech_bank));
}
@@ -680,18 +866,7 @@ void fidelz80base_state::set_display_size(int maxx, int maxy)
m_display_maxy = maxy;
}
-void fidelz80base_state::set_display_segmask(UINT32 digits, UINT32 mask)
-{
- // set a segment mask per selected digit, but leave unselected ones alone
- for (int i = 0; i < 0x20; i++)
- {
- if (digits & 1)
- m_display_segmask[i] = mask;
- digits >>= 1;
- }
-}
-
-void fidelz80base_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety, bool update)
+void fidelz80base_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety)
{
set_display_size(maxx, maxy);
@@ -700,8 +875,7 @@ void fidelz80base_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32
for (int y = 0; y < maxy; y++)
m_display_state[y] = (sety >> y & 1) ? ((setx & mask) | (1 << maxx)) : 0;
- if (update)
- display_update();
+ display_update();
}
@@ -729,26 +903,6 @@ INPUT_CHANGED_MEMBER(fidelz80_state::reset_button)
}
-// cartridge
-
-DEVICE_IMAGE_LOAD_MEMBER(fidelz80base_state, scc_cartridge)
-{
- UINT32 size = m_cart->common_get_size("rom");
-
- // max size is 16KB?
- if (size > 0x4000)
- {
- image.seterror(IMAGE_ERROR_UNSPECIFIED, "Invalid file size");
- 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");
-
- return IMAGE_INIT_PASS;
-}
-
-
// Devices, I/O
@@ -760,9 +914,12 @@ DEVICE_IMAGE_LOAD_MEMBER(fidelz80base_state, scc_cartridge)
void fidelz80_state::vcc_prepare_display()
{
- // 4 7seg leds (note: sel d0 for extra leds)
+ // 4 7seg leds
+ for (int i = 0; i < 4; i++)
+ m_display_segmask[i] = 0x7f;
+
+ // note: sel d0 for extra leds
UINT8 outdata = (m_7seg_data & 0x7f) | (m_led_select << 7 & 0x80);
- set_display_segmask(0xf, 0x7f);
display_matrix(8, 4, outdata, m_led_select >> 2 & 0xf);
}
@@ -846,34 +1003,6 @@ WRITE8_MEMBER(fidelz80_state::cc10_ppi_porta_w)
/******************************************************************************
- BCC
-******************************************************************************/
-
-// TTL
-
-WRITE8_MEMBER(fidelz80_state::bcc_control_w)
-{
- // a0-a2,d7: digit segment data via NE591, Q7 is speaker out
- UINT8 mask = 1 << (offset & 7);
- m_7seg_data = (m_7seg_data & ~mask) | ((data & 0x80) ? mask : 0);
- m_speaker->level_w(m_7seg_data >> 7 & 1);
-
- // d0-d3: led select, input mux
- // d4,d5: check,lose leds(direct)
- set_display_segmask(0xf, 0x7f);
- display_matrix(7, 6, m_7seg_data & 0x7f, data & 0x3f);
- m_inp_mux = data & 0xf;
-}
-
-READ8_MEMBER(fidelz80_state::bcc_input_r)
-{
- // d0-d3: multiplexed inputs
- return read_inputs(4);
-}
-
-
-
-/******************************************************************************
VSC
******************************************************************************/
@@ -883,14 +1012,16 @@ void fidelz80_state::vsc_prepare_display()
{
// 4 7seg leds + H
for (int i = 0; i < 4; i++)
+ {
+ m_display_segmask[i] = 0x7f;
m_display_state[i] = (m_led_select >> i & 1) ? m_7seg_data : 0;
+ }
// 8*8 chessboard leds
for (int i = 0; i < 8; i++)
m_display_state[i+4] = (m_led_select >> i & 1) ? m_led_data : 0;
set_display_size(8, 12);
- set_display_segmask(0xf, 0x7f);
display_update();
}
@@ -918,7 +1049,7 @@ WRITE8_MEMBER(fidelz80_state::vsc_ppi_portc_w)
{
// d0-d3: select digits
// d0-d7: select leds, input mux low bits
- m_inp_mux = (m_inp_mux & ~0xff) | data;
+ m_inp_mux = (m_inp_mux & 0x300) | data;
m_led_select = data;
vsc_prepare_display();
}
@@ -929,40 +1060,35 @@ WRITE8_MEMBER(fidelz80_state::vsc_ppi_portc_w)
READ8_MEMBER(fidelz80_state::vsc_pio_porta_r)
{
// d0-d7: multiplexed inputs
- return read_inputs(11);
+ return read_inputs(10);
}
READ8_MEMBER(fidelz80_state::vsc_pio_portb_r)
{
- UINT8 data = 0;
+ UINT8 ret = 0;
// d4: TSI BUSY line
- data |= (m_speech->busy_r()) ? 0 : 0x10;
-
- return data;
+ ret |= (m_speech->busy_r()) ? 0 : 0x10;
+
+ return ret;
}
WRITE8_MEMBER(fidelz80_state::vsc_pio_portb_w)
{
// d0,d1: input mux highest bits
- // d5: enable language switch
- m_inp_mux = (m_inp_mux & 0xff) | (data << 8 & 0x300) | (data << 5 & 0x400);
-
- // d7: TSI ROM A12
- m_speech->force_update(); // update stream to now
- m_speech_bank = data >> 7 & 1;
-
+ m_inp_mux = (m_inp_mux & 0xff) | (data << 8 & 0x300);
+
+ // d2: tone line
+ m_speaker->level_w(data >> 2 & 1);
+
// d6: TSI START line
m_speech->start_w(data >> 6 & 1);
-
- // d2: lower TSI volume
- m_speech->set_output_gain(0, (data & 4) ? 0.5 : 1.0);
}
/******************************************************************************
- VBRC/7014
+ VBRC
******************************************************************************/
// misc handlers
@@ -971,7 +1097,9 @@ void fidelz80_state::vbrc_prepare_display()
{
// 14seg led segments, d15 is extra led, d14 is unused (tone on prototype?)
UINT16 outdata = BITSWAP16(m_7seg_data,12,13,1,6,5,2,0,7,15,11,10,14,4,3,9,8);
- set_display_segmask(0xff, 0x3fff);
+ for (int i = 0; i < 8; i++)
+ m_display_segmask[i] = 0x3fff;
+
display_matrix(16, 8, outdata, m_led_select);
}
@@ -1023,9 +1151,8 @@ READ8_MEMBER(fidelz80_state::vbrc_mcu_t_r)
static ADDRESS_MAP_START( cc10_map, AS_PROGRAM, 8, fidelz80_state )
ADDRESS_MAP_UNMAP_HIGH
- ADDRESS_MAP_GLOBAL_MASK(0x3fff)
AM_RANGE(0x0000, 0x0fff) AM_ROM
- AM_RANGE(0x3000, 0x31ff) AM_MIRROR(0x0e00) AM_RAM
+ AM_RANGE(0x3000, 0x31ff) AM_RAM
ADDRESS_MAP_END
static ADDRESS_MAP_START( vcc_map, AS_PROGRAM, 8, fidelz80_state )
@@ -1040,21 +1167,6 @@ static ADDRESS_MAP_START( vcc_io, AS_IO, 8, fidelz80_state )
ADDRESS_MAP_END
-// BCC
-
-static ADDRESS_MAP_START( bcc_map, AS_PROGRAM, 8, fidelz80_state )
- ADDRESS_MAP_UNMAP_HIGH
- ADDRESS_MAP_GLOBAL_MASK(0x3fff)
- AM_RANGE(0x0000, 0x0fff) AM_ROM
- AM_RANGE(0x3000, 0x30ff) AM_MIRROR(0x0f00) AM_RAM
-ADDRESS_MAP_END
-
-static ADDRESS_MAP_START( bcc_io, AS_IO, 8, fidelz80_state )
- ADDRESS_MAP_GLOBAL_MASK(0x07)
- AM_RANGE(0x00, 0x07) AM_READWRITE(bcc_input_r, bcc_control_w)
-ADDRESS_MAP_END
-
-
// VSC
static ADDRESS_MAP_START( vsc_map, AS_PROGRAM, 8, fidelz80_state )
@@ -1067,13 +1179,13 @@ ADDRESS_MAP_END
// VSC io: A2 is 8255 _CE, A3 is Z80 PIO _CE - in theory, both chips can be accessed simultaneously
READ8_MEMBER(fidelz80_state::vsc_io_trampoline_r)
{
- UINT8 data = 0xff; // open bus
+ UINT8 ret = 0xff; // open bus
if (~offset & 4)
- data &= m_ppi8255->read(space, offset & 3);
+ ret &= m_ppi8255->read(space, offset & 3);
if (~offset & 8)
- data &= m_z80pio->read(space, offset & 3);
+ ret &= m_z80pio->read(space, offset & 3);
- return data;
+ return ret;
}
WRITE8_MEMBER(fidelz80_state::vsc_io_trampoline_w)
@@ -1090,20 +1202,25 @@ static ADDRESS_MAP_START( vsc_io, AS_IO, 8, fidelz80_state )
ADDRESS_MAP_END
-// VBRC/7014
+// VBRC
WRITE8_MEMBER(fidelz80_state::vbrc_speech_w)
{
+ //printf("%X ",data);
+
+ // todo: HALT THE z80 here, and set up a callback to poll the s14001a BUSY line to resume z80
m_speech->data_w(space, 0, data & 0x3f);
m_speech->start_w(1);
m_speech->start_w(0);
+
+ //m_speech->start_w(BIT(data, 7));
}
static ADDRESS_MAP_START( vbrc_main_map, AS_PROGRAM, 8, fidelz80_state )
ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(0x0000, 0x5fff) AM_ROM
AM_RANGE(0x6000, 0x63ff) AM_MIRROR(0x1c00) AM_RAM
- AM_RANGE(0xe000, 0xe000) AM_MIRROR(0x1fff) AM_WRITE(vbrc_speech_w)
+ AM_RANGE(0xe000, 0xffff) AM_MIRROR(0x1fff) AM_WRITE(vbrc_speech_w)
ADDRESS_MAP_END
static ADDRESS_MAP_START( vbrc_main_io, AS_IO, 8, fidelz80_state )
@@ -1125,290 +1242,200 @@ ADDRESS_MAP_END
Input Ports
******************************************************************************/
-static INPUT_PORTS_START( vcc_base )
+static INPUT_PORTS_START( fidelz80 )
PORT_START("IN.0")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_UNUSED)
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("LV") PORT_CODE(KEYCODE_L)
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("A1") PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_CODE(KEYCODE_A)
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("E5") PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_CODE(KEYCODE_E)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("A1") PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_A)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("E5") PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_E)
PORT_START("IN.1")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Speaker") PORT_CODE(KEYCODE_SPACE)
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CB") PORT_CODE(KEYCODE_Z)
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("DM") PORT_CODE(KEYCODE_M)
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("B2") PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_CODE(KEYCODE_B)
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("F6") PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_CODE(KEYCODE_F)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("B2") PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_B)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("F6") PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_F)
PORT_START("IN.2")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CL") PORT_CODE(KEYCODE_DEL)
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("PB") PORT_CODE(KEYCODE_P)
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("C3") PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_CODE(KEYCODE_C)
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("G7") PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_CODE(KEYCODE_G)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("C3") PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_C)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("G7") PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_G)
PORT_START("IN.3")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("EN") PORT_CODE(KEYCODE_ENTER)
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("PV") PORT_CODE(KEYCODE_O)
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("D4") PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_CODE(KEYCODE_D)
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("H8") PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_CODE(KEYCODE_H)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("D4") PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_D)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("H8") PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_H)
+
+ PORT_START("IN.4") // TODO: hardcode this
+ PORT_CONFNAME( 0x0f, 0x00, "Language" )
+ PORT_CONFSETTING( 0x00, "English" )
+ PORT_CONFSETTING( 0x01, "French" )
+ PORT_CONFSETTING( 0x02, "Spanish" )
+ PORT_CONFSETTING( 0x04, "German" )
+ PORT_CONFSETTING( 0x08, "Special" )
PORT_START("RESET") // is not on matrix IN.0 d0
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RE") PORT_CODE(KEYCODE_R) PORT_CHANGED_MEMBER(DEVICE_SELF, fidelz80_state, reset_button, 0)
-INPUT_PORTS_END
-
-static INPUT_PORTS_START( cc10 )
- PORT_INCLUDE( vcc_base )
-
- PORT_START("IN.4")
- PORT_BIT(0x0f, IP_ACTIVE_HIGH, IPT_UNUSED)
-
- PORT_START("LEVEL") // hardwired (VCC/GND?)
- PORT_CONFNAME( 0x80, 0x00, "Maximum Levels" )
- PORT_CONFSETTING( 0x00, "10" ) // factory setting
- PORT_CONFSETTING( 0x80, "3" )
-INPUT_PORTS_END
-
-static INPUT_PORTS_START( vcc )
- PORT_INCLUDE( vcc_base )
-
- PORT_START("IN.4") // PCB jumpers, not consumer accessible
- PORT_CONFNAME( 0x01, 0x00, "Language: German" )
- PORT_CONFSETTING( 0x00, DEF_STR( Off ) )
- PORT_CONFSETTING( 0x01, DEF_STR( On ) )
- PORT_CONFNAME( 0x02, 0x00, "Language: French" )
- PORT_CONFSETTING( 0x00, DEF_STR( Off ) )
- PORT_CONFSETTING( 0x02, DEF_STR( On ) )
- PORT_CONFNAME( 0x04, 0x00, "Language: Spanish" )
- PORT_CONFSETTING( 0x00, DEF_STR( Off ) )
- PORT_CONFSETTING( 0x04, DEF_STR( On ) )
- PORT_CONFNAME( 0x08, 0x00, "Language: Special" )
- PORT_CONFSETTING( 0x00, DEF_STR( Off ) )
- PORT_CONFSETTING( 0x08, DEF_STR( On ) )
-INPUT_PORTS_END
-
-static INPUT_PORTS_START( vccfr )
- PORT_INCLUDE( vcc )
-
- PORT_MODIFY("IN.4")
- PORT_CONFNAME( 0x02, 0x02, "Language: French" )
- PORT_CONFSETTING( 0x00, DEF_STR( Off ) )
- PORT_CONFSETTING( 0x02, DEF_STR( On ) )
-INPUT_PORTS_END
-
-static INPUT_PORTS_START( vccsp )
- PORT_INCLUDE( vcc )
-
- PORT_MODIFY("IN.4")
- PORT_CONFNAME( 0x04, 0x04, "Language: Spanish" )
- PORT_CONFSETTING( 0x00, DEF_STR( Off ) )
- PORT_CONFSETTING( 0x04, DEF_STR( On ) )
-INPUT_PORTS_END
-static INPUT_PORTS_START( vccg )
- PORT_INCLUDE( vcc )
-
- PORT_MODIFY("IN.4")
- PORT_CONFNAME( 0x01, 0x01, "Language: German" )
- PORT_CONFSETTING( 0x00, DEF_STR( Off ) )
- PORT_CONFSETTING( 0x01, DEF_STR( On ) )
-INPUT_PORTS_END
-
-
-static INPUT_PORTS_START( bcc )
- PORT_START("IN.0")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("EN") PORT_CODE(KEYCODE_ENTER)
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("PV") PORT_CODE(KEYCODE_O)
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("d4") PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_CODE(KEYCODE_D)
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("H8") PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_CODE(KEYCODE_H)
-
- PORT_START("IN.1")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CL") PORT_CODE(KEYCODE_DEL)
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("PB") PORT_CODE(KEYCODE_P)
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("C3") PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_CODE(KEYCODE_C)
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("g7") PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_CODE(KEYCODE_G)
-
- PORT_START("IN.2")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CB") PORT_CODE(KEYCODE_SPACE)
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("DM") PORT_CODE(KEYCODE_M)
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("b2") PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_CODE(KEYCODE_B)
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("F6") PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_CODE(KEYCODE_F)
-
- PORT_START("IN.3")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RE") PORT_CODE(KEYCODE_R)
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("LV") PORT_CODE(KEYCODE_L)
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("A1") PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_CODE(KEYCODE_A)
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("E5") PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_CODE(KEYCODE_E)
+ PORT_START("LEVEL") // cc10 only, TODO: hardcode this
+ PORT_CONFNAME( 0x80, 0x00, "Number of levels" )
+ PORT_CONFSETTING( 0x00, "10" )
+ PORT_CONFSETTING( 0x80, "3" )
INPUT_PORTS_END
-
static INPUT_PORTS_START( vsc )
PORT_START("IN.0")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a1")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a2")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a3")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a4")
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a5")
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a6")
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a7")
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a8")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD)
PORT_START("IN.1")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b1")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b2")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b3")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b4")
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b5")
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b6")
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b7")
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b8")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD)
PORT_START("IN.2")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c1")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c2")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c3")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c4")
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c5")
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c6")
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c7")
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c8")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD)
PORT_START("IN.3")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d1")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d2")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d3")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d4")
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d5")
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d6")
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d7")
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d8")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD)
PORT_START("IN.4")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e1")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e2")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e3")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e4")
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e5")
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e6")
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e7")
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e8")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD)
PORT_START("IN.5")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f1")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f2")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f3")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f4")
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f5")
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f6")
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f7")
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f8")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD)
PORT_START("IN.6")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g1")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g2")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g3")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g4")
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g5")
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g6")
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g7")
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g8")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD)
PORT_START("IN.7")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h1")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h2")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h3")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h4")
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h5")
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h6")
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h7")
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h8")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD)
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD)
PORT_START("IN.8") // buttons on the right
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("Pawn")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Rook")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Knight")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("Bishop")
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("Queen")
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("King")
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_DEL) PORT_NAME("CL")
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_NAME("RE")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Pawn") PORT_CODE(KEYCODE_1)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Rook") PORT_CODE(KEYCODE_2)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Knight") PORT_CODE(KEYCODE_3)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Bishop") PORT_CODE(KEYCODE_4)
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Queen") PORT_CODE(KEYCODE_5)
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("King") PORT_CODE(KEYCODE_6)
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CL") PORT_CODE(KEYCODE_DEL)
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RE") PORT_CODE(KEYCODE_R)
PORT_START("IN.9") // buttons beside the display
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_NAME("TM")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_V) PORT_NAME("RV")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_SPACE) PORT_NAME("Speaker")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_L) PORT_NAME("LV")
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_M) PORT_NAME("DM")
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_S) PORT_NAME("ST")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("TM") PORT_CODE(KEYCODE_T)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RV") PORT_CODE(KEYCODE_V)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Speak") PORT_CODE(KEYCODE_SPACE)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("LV") PORT_CODE(KEYCODE_L)
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("DM") PORT_CODE(KEYCODE_M)
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("ST") PORT_CODE(KEYCODE_S)
PORT_BIT(0xc0, IP_ACTIVE_HIGH, IPT_UNUSED)
-
- PORT_START("IN.10") // hardwired (2 diodes)
- PORT_CONFNAME( 0x01, 0x00, "Language" )
- PORT_CONFSETTING( 0x00, "English" )
- PORT_CONFSETTING( 0x01, "Other" )
- PORT_CONFNAME( 0x02, 0x00, DEF_STR( Unknown ) )
- PORT_CONFSETTING( 0x00, DEF_STR( Off ) )
- PORT_CONFSETTING( 0x02, DEF_STR( On ) )
-INPUT_PORTS_END
-
-static INPUT_PORTS_START( vscg )
- PORT_INCLUDE( vsc )
-
- PORT_MODIFY("IN.10")
- PORT_CONFNAME( 0x01, 0x01, "Language" )
- PORT_CONFSETTING( 0x00, "English" )
- PORT_CONFSETTING( 0x01, "Other" )
INPUT_PORTS_END
-
static INPUT_PORTS_START( vbrc )
PORT_START("IN.0")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A) PORT_NAME("A")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_0) PORT_NAME("10")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_NAME("6")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_NAME("2")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("A") PORT_CODE(KEYCODE_A)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("10") PORT_CODE(KEYCODE_0)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("6") PORT_CODE(KEYCODE_6)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("2") PORT_CODE(KEYCODE_2)
PORT_START("IN.1")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_K) PORT_NAME("K")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_9) PORT_NAME("9")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_NAME("5")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_NAME("1")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("K") PORT_CODE(KEYCODE_K)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("9") PORT_CODE(KEYCODE_9)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("5") PORT_CODE(KEYCODE_5)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("1") PORT_CODE(KEYCODE_1)
PORT_START("IN.2")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) PORT_NAME("Q")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8) PORT_NAME("8")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_NAME("4")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Z) PORT_NAME("P")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("8") PORT_CODE(KEYCODE_8)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("4") PORT_CODE(KEYCODE_4)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("P") PORT_CODE(KEYCODE_Z)
PORT_START("IN.3")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_J) PORT_NAME("J")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_7) PORT_NAME("7")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_NAME("3")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_N) PORT_NAME("NT")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("J") PORT_CODE(KEYCODE_J)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("7") PORT_CODE(KEYCODE_7)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("3") PORT_CODE(KEYCODE_3)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("NT") PORT_CODE(KEYCODE_N)
PORT_START("IN.4")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_NAME("EN")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_S) PORT_NAME("SC")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_X) PORT_NAME("PL")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("Spades")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("EN") PORT_CODE(KEYCODE_E)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("SC") PORT_CODE(KEYCODE_S)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("PL") PORT_CODE(KEYCODE_X)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Spades") PORT_CODE(KEYCODE_1_PAD)
PORT_START("IN.5")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_C) PORT_NAME("CL")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_D) PORT_NAME("DB")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_V) PORT_NAME("VL")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Hearts")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CL") PORT_CODE(KEYCODE_C)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("DB") PORT_CODE(KEYCODE_D)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("VL") PORT_CODE(KEYCODE_V)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Hearts") PORT_CODE(KEYCODE_2_PAD)
PORT_START("IN.6")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_SPACE) PORT_NAME("Speaker")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_B) PORT_NAME("PB")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_G) PORT_NAME("CV")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Diamonds")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Beep on/off") PORT_CODE(KEYCODE_SPACE)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("PB") PORT_CODE(KEYCODE_B)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CV") PORT_CODE(KEYCODE_G)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Diamonds") PORT_CODE(KEYCODE_3_PAD)
PORT_START("IN.7")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_UNUSED)
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_NAME("BR")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_L) PORT_NAME("DL")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("Clubs")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("BR") PORT_CODE(KEYCODE_T)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("DL") PORT_CODE(KEYCODE_L)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Clubs") PORT_CODE(KEYCODE_4_PAD)
PORT_START("RESET") // is not on matrix IN.7 d0
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_CHANGED_MEMBER(DEVICE_SELF, fidelz80_state, reset_button, 0) PORT_NAME("RE")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RE") PORT_CODE(KEYCODE_R) PORT_CHANGED_MEMBER(DEVICE_SELF, fidelz80_state, reset_button, 0)
INPUT_PORTS_END
@@ -1417,22 +1444,6 @@ INPUT_PORTS_END
Machine Drivers
******************************************************************************/
-static MACHINE_CONFIG_START( bcc, fidelz80_state )
-
- /* basic machine hardware */
- MCFG_CPU_ADD("maincpu", Z80, XTAL_3_579545MHz)
- MCFG_CPU_PROGRAM_MAP(bcc_map)
- MCFG_CPU_IO_MAP(bcc_io)
-
- MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", fidelz80base_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_fidel_bcc)
-
- /* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
-MACHINE_CONFIG_END
-
static MACHINE_CONFIG_START( cc10, fidelz80_state )
/* basic machine hardware */
@@ -1505,8 +1516,10 @@ static MACHINE_CONFIG_START( vsc, fidelz80_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("speech", S14001A, 25000) // R/C circuit, around 25khz
- MCFG_S14001A_EXT_READ_HANDLER(READ8(fidelz80_state, vcc_speech_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
+
+ MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( vbrc, fidelz80_state )
@@ -1528,7 +1541,6 @@ static MACHINE_CONFIG_START( vbrc, fidelz80_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("speech", S14001A, 25000) // R/C circuit, around 25khz
- MCFG_S14001A_BSY_HANDLER(INPUTLINE("maincpu", Z80_INPUT_LINE_WAIT))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
MACHINE_CONFIG_END
@@ -1543,11 +1555,6 @@ ROM_START( cc10 )
ROM_LOAD( "cc10b", 0x0000, 0x1000, CRC(afd3ca99) SHA1(870d09b2b52ccb8572d69642c59b5215d5fb26ab) ) // 2332
ROM_END
-ROM_START( cc7 )
- ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "cn19103n_bcc-revb", 0x0000, 0x1000, CRC(a397d471) SHA1(9b12bc442fccee40f4d8500c792bc9d886c5e1a5) ) // 2332
-ROM_END
-
ROM_START( vcc )
ROM_REGION( 0x10000, "maincpu", 0 )
@@ -1560,34 +1567,34 @@ ROM_START( vcc )
ROM_RELOAD( 0x1000, 0x1000)
ROM_END
-ROM_START( vccsp )
+ROM_START( vccg )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD("101-32103.bin", 0x0000, 0x1000, CRC(257bb5ab) SHA1(f7589225bb8e5f3eac55f23e2bd526be780b38b5) )
ROM_LOAD("vcc2.bin", 0x1000, 0x1000, CRC(f33095e7) SHA1(692fcab1b88c910b74d04fe4d0660367aee3f4f0) )
ROM_LOAD("vcc3.bin", 0x2000, 0x1000, CRC(624f0cd5) SHA1(7c1a4f4497fe5882904de1d6fecf510c07ee6fc6) )
ROM_REGION( 0x2000, "speech", 0 )
- ROM_LOAD("vcc-spanish.bin", 0x0000, 0x2000, CRC(8766e128) SHA1(78c7413bf240159720b131ab70bfbdf4e86eb1e9) ) // dumped from Spanish VCC, is same as data in fexcelv
+ ROM_LOAD("vcc-german.bin", 0x0000, 0x2000, BAD_DUMP CRC(6c85e310) SHA1(20d1d6543c1e6a1f04184a2df2a468f33faec3ff) ) // taken from fexcelv
ROM_END
-ROM_START( vccg )
+ROM_START( vccfr )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD("101-32103.bin", 0x0000, 0x1000, CRC(257bb5ab) SHA1(f7589225bb8e5f3eac55f23e2bd526be780b38b5) )
ROM_LOAD("vcc2.bin", 0x1000, 0x1000, CRC(f33095e7) SHA1(692fcab1b88c910b74d04fe4d0660367aee3f4f0) )
ROM_LOAD("vcc3.bin", 0x2000, 0x1000, CRC(624f0cd5) SHA1(7c1a4f4497fe5882904de1d6fecf510c07ee6fc6) )
ROM_REGION( 0x2000, "speech", 0 )
- ROM_LOAD("vcc-german.bin", 0x0000, 0x2000, BAD_DUMP CRC(6c85e310) SHA1(20d1d6543c1e6a1f04184a2df2a468f33faec3ff) ) // taken from fexcelv, assume correct
+ ROM_LOAD("vcc-french.bin", 0x0000, 0x2000, BAD_DUMP CRC(fe8c5c18) SHA1(2b64279ab3747ee81c86963c13e78321c6cfa3a3) ) // taken from fexcelv
ROM_END
-ROM_START( vccfr )
+ROM_START( vccsp )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD("101-32103.bin", 0x0000, 0x1000, CRC(257bb5ab) SHA1(f7589225bb8e5f3eac55f23e2bd526be780b38b5) )
ROM_LOAD("vcc2.bin", 0x1000, 0x1000, CRC(f33095e7) SHA1(692fcab1b88c910b74d04fe4d0660367aee3f4f0) )
ROM_LOAD("vcc3.bin", 0x2000, 0x1000, CRC(624f0cd5) SHA1(7c1a4f4497fe5882904de1d6fecf510c07ee6fc6) )
ROM_REGION( 0x2000, "speech", 0 )
- ROM_LOAD("vcc-french.bin", 0x0000, 0x2000, BAD_DUMP CRC(fe8c5c18) SHA1(2b64279ab3747ee81c86963c13e78321c6cfa3a3) ) // taken from fexcelv, assume correct
+ ROM_LOAD("vcc-spanish.bin", 0x0000, 0x2000, CRC(8766e128) SHA1(78c7413bf240159720b131ab70bfbdf4e86eb1e9) )
ROM_END
@@ -1596,36 +1603,8 @@ ROM_START( uvc )
ROM_LOAD("101-64017.b3", 0x0000, 0x2000, CRC(f1133abf) SHA1(09dd85051c4e7d364d43507c1cfea5c2d08d37f4) ) // "MOS // 101-64017 // 3880"
ROM_LOAD("101-32010.a1", 0x2000, 0x1000, CRC(624f0cd5) SHA1(7c1a4f4497fe5882904de1d6fecf510c07ee6fc6) ) // "NEC P9Z021 // D2332C 228 // 101-32010", == vcc3.bin on vcc
- ROM_REGION( 0x2000, "speech", 0 )
+ ROM_REGION( 0x1000, "speech", 0 )
ROM_LOAD("101-32107.c4", 0x0000, 0x1000, CRC(f35784f9) SHA1(348e54a7fa1e8091f89ac656b4da22f28ca2e44d) ) // "NEC P9Y019 // D2332C 229 // 101-32107", == vcc-engl.bin on vcc
- ROM_RELOAD( 0x1000, 0x1000)
-ROM_END
-
-ROM_START( uvcsp )
- ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD("101-64017.b3", 0x0000, 0x2000, CRC(f1133abf) SHA1(09dd85051c4e7d364d43507c1cfea5c2d08d37f4) )
- ROM_LOAD("101-32010.a1", 0x2000, 0x1000, CRC(624f0cd5) SHA1(7c1a4f4497fe5882904de1d6fecf510c07ee6fc6) )
-
- ROM_REGION( 0x2000, "speech", 0 )
- ROM_LOAD("vcc-spanish.bin", 0x0000, 0x2000, CRC(8766e128) SHA1(78c7413bf240159720b131ab70bfbdf4e86eb1e9) )
-ROM_END
-
-ROM_START( uvcg )
- ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD("101-64017.b3", 0x0000, 0x2000, CRC(f1133abf) SHA1(09dd85051c4e7d364d43507c1cfea5c2d08d37f4) )
- ROM_LOAD("101-32010.a1", 0x2000, 0x1000, CRC(624f0cd5) SHA1(7c1a4f4497fe5882904de1d6fecf510c07ee6fc6) )
-
- ROM_REGION( 0x2000, "speech", 0 )
- ROM_LOAD("vcc-german.bin", 0x0000, 0x2000, BAD_DUMP CRC(6c85e310) SHA1(20d1d6543c1e6a1f04184a2df2a468f33faec3ff) ) // taken from fexcelv, assume correct
-ROM_END
-
-ROM_START( uvcfr )
- ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD("101-64017.b3", 0x0000, 0x2000, CRC(f1133abf) SHA1(09dd85051c4e7d364d43507c1cfea5c2d08d37f4) )
- ROM_LOAD("101-32010.a1", 0x2000, 0x1000, CRC(624f0cd5) SHA1(7c1a4f4497fe5882904de1d6fecf510c07ee6fc6) )
-
- ROM_REGION( 0x2000, "speech", 0 )
- ROM_LOAD("vcc-french.bin", 0x0000, 0x2000, BAD_DUMP CRC(fe8c5c18) SHA1(2b64279ab3747ee81c86963c13e78321c6cfa3a3) ) // taken from fexcelv, assume correct
ROM_END
@@ -1635,39 +1614,8 @@ ROM_START( vsc )
ROM_LOAD("101-64109.bin", 0x2000, 0x2000, CRC(08a3577c) SHA1(69fe379d21a9d4b57c84c3832d7b3e7431eec341) )
ROM_LOAD("101-32024.bin", 0x4000, 0x1000, CRC(2a078676) SHA1(db2f0aba7e8ac0f84a17bae7155210cdf0813afb) )
- ROM_REGION( 0x2000, "speech", 0 )
+ ROM_REGION( 0x1000, "speech", 0 )
ROM_LOAD("101-32107.bin", 0x0000, 0x1000, CRC(f35784f9) SHA1(348e54a7fa1e8091f89ac656b4da22f28ca2e44d) )
- ROM_RELOAD( 0x1000, 0x1000)
-ROM_END
-
-ROM_START( vscsp )
- ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD("101-64108.bin", 0x0000, 0x2000, CRC(c9c98490) SHA1(e6db883df088d60463e75db51433a4b01a3e7626) )
- ROM_LOAD("101-64109.bin", 0x2000, 0x2000, CRC(08a3577c) SHA1(69fe379d21a9d4b57c84c3832d7b3e7431eec341) )
- ROM_LOAD("101-32024.bin", 0x4000, 0x1000, CRC(2a078676) SHA1(db2f0aba7e8ac0f84a17bae7155210cdf0813afb) )
-
- ROM_REGION( 0x2000, "speech", 0 )
- ROM_LOAD("vcc-spanish.bin", 0x0000, 0x2000, BAD_DUMP CRC(8766e128) SHA1(78c7413bf240159720b131ab70bfbdf4e86eb1e9) ) // taken from vcc/fexcelv, assume correct
-ROM_END
-
-ROM_START( vscg )
- ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD("101-64108.bin", 0x0000, 0x2000, CRC(c9c98490) SHA1(e6db883df088d60463e75db51433a4b01a3e7626) )
- ROM_LOAD("101-64109.bin", 0x2000, 0x2000, CRC(08a3577c) SHA1(69fe379d21a9d4b57c84c3832d7b3e7431eec341) )
- ROM_LOAD("101-32024.bin", 0x4000, 0x1000, CRC(2a078676) SHA1(db2f0aba7e8ac0f84a17bae7155210cdf0813afb) )
-
- ROM_REGION( 0x2000, "speech", 0 )
- ROM_LOAD("vcc-german.bin", 0x0000, 0x2000, BAD_DUMP CRC(6c85e310) SHA1(20d1d6543c1e6a1f04184a2df2a468f33faec3ff) ) // taken from fexcelv, assume correct
-ROM_END
-
-ROM_START( vscfr )
- ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD("101-64108.bin", 0x0000, 0x2000, CRC(c9c98490) SHA1(e6db883df088d60463e75db51433a4b01a3e7626) )
- ROM_LOAD("101-64109.bin", 0x2000, 0x2000, CRC(08a3577c) SHA1(69fe379d21a9d4b57c84c3832d7b3e7431eec341) )
- ROM_LOAD("101-32024.bin", 0x4000, 0x1000, CRC(2a078676) SHA1(db2f0aba7e8ac0f84a17bae7155210cdf0813afb) )
-
- ROM_REGION( 0x2000, "speech", 0 )
- ROM_LOAD("vcc-french.bin", 0x0000, 0x2000, BAD_DUMP CRC(fe8c5c18) SHA1(2b64279ab3747ee81c86963c13e78321c6cfa3a3) ) // taken from fexcelv, assume correct
ROM_END
@@ -1705,24 +1653,15 @@ ROM_END
Drivers
******************************************************************************/
-/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */
-COMP( 1978, cc10, 0, 0, cc10, cc10, driver_device, 0, "Fidelity Electronics", "Chess Challenger 10 (rev. B)", MACHINE_SUPPORTS_SAVE )
-COMP( 1979, cc7, 0, 0, bcc, bcc, driver_device, 0, "Fidelity Electronics", "Chess Challenger 7 (rev. B)", MACHINE_SUPPORTS_SAVE )
-
-COMP( 1979, vcc, 0, 0, vcc, vcc, driver_device, 0, "Fidelity Electronics", "Voice Chess Challenger (English)", MACHINE_SUPPORTS_SAVE )
-COMP( 1979, vccsp, vcc, 0, vcc, vccsp, driver_device, 0, "Fidelity Electronics", "Voice Chess Challenger (Spanish)", MACHINE_SUPPORTS_SAVE )
-COMP( 1979, vccg, vcc, 0, vcc, vccg, driver_device, 0, "Fidelity Electronics", "Voice Chess Challenger (German)", MACHINE_SUPPORTS_SAVE )
-COMP( 1979, vccfr, vcc, 0, vcc, vccfr, driver_device, 0, "Fidelity Electronics", "Voice Chess Challenger (French)", MACHINE_SUPPORTS_SAVE )
-
-COMP( 1980, uvc, vcc, 0, vcc, vcc, driver_device, 0, "Fidelity Electronics", "Advanced Voice Chess Challenger (English)", MACHINE_SUPPORTS_SAVE )
-COMP( 1980, uvcsp, vcc, 0, vcc, vccsp, driver_device, 0, "Fidelity Electronics", "Advanced Voice Chess Challenger (Spanish)", MACHINE_SUPPORTS_SAVE )
-COMP( 1980, uvcg, vcc, 0, vcc, vccg, driver_device, 0, "Fidelity Electronics", "Advanced Voice Chess Challenger (German)", MACHINE_SUPPORTS_SAVE )
-COMP( 1980, uvcfr, vcc, 0, vcc, vccfr, driver_device, 0, "Fidelity Electronics", "Advanced Voice Chess Challenger (French)", MACHINE_SUPPORTS_SAVE )
+/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */
+COMP( 1978, cc10, 0, 0, cc10, fidelz80, driver_device, 0, "Fidelity Electronics", "Chess Challenger 10 (version B)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
+COMP( 1979, vcc, 0, 0, vcc, fidelz80, driver_device, 0, "Fidelity Electronics", "Voice Chess Challenger (English)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
+COMP( 1979, vccg, vcc, 0, vcc, fidelz80, driver_device, 0, "Fidelity Electronics", "Voice Chess Challenger (German)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
+COMP( 1979, vccfr, vcc, 0, vcc, fidelz80, driver_device, 0, "Fidelity Electronics", "Voice Chess Challenger (French)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
+COMP( 1979, vccsp, vcc, 0, vcc, fidelz80, driver_device, 0, "Fidelity Electronics", "Voice Chess Challenger (Spanish)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
+COMP( 1980, uvc, vcc, 0, vcc, fidelz80, driver_device, 0, "Fidelity Electronics", "Advanced Voice Chess Challenger", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
-COMP( 1980, vsc, 0, 0, vsc, vsc, driver_device, 0, "Fidelity Electronics", "Voice Sensory Chess Challenger (English)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
-COMP( 1980, vscsp, vsc, 0, vsc, vscg, driver_device, 0, "Fidelity Electronics", "Voice Sensory Chess Challenger (Spanish)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
-COMP( 1980, vscg, vsc, 0, vsc, vscg, driver_device, 0, "Fidelity Electronics", "Voice Sensory Chess Challenger (German)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
-COMP( 1980, vscfr, vsc, 0, vsc, vscg, driver_device, 0, "Fidelity Electronics", "Voice Sensory Chess Challenger (French)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
+COMP( 1980, vsc, 0, 0, vsc, vsc, driver_device, 0, "Fidelity Electronics", "Voice Sensory Chess Challenger", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK )
-COMP( 1979, vbrc, 0, 0, vbrc, vbrc, driver_device, 0, "Fidelity Electronics", "Voice Bridge Challenger", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
-COMP( 1980, bridgec3, vbrc, 0, vbrc, vbrc, driver_device, 0, "Fidelity Electronics", "Voice Bridge Challenger III", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
+COMP( 1979, vbrc, 0, 0, vbrc, vbrc, driver_device, 0, "Fidelity Electronics", "Voice Bridge Challenger", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
+COMP( 1980, bridgec3, vbrc, 0, vbrc, vbrc, driver_device, 0, "Fidelity Electronics", "Voice Bridge Challenger III", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/funkball.cpp b/src/mame/drivers/funkball.cpp
index 6eaf7c496ef..caa650705fe 100644
--- a/src/mame/drivers/funkball.cpp
+++ b/src/mame/drivers/funkball.cpp
@@ -142,7 +142,7 @@ void funkball_state::video_start()
UINT32 funkball_state::screen_update( screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect )
{
- return m_voodoo->voodoo_update(bitmap, cliprect) ? 0 : UPDATE_HAS_NOT_CHANGED;
+ return voodoo_update(m_voodoo, bitmap, cliprect) ? 0 : UPDATE_HAS_NOT_CHANGED;
}
static UINT32 voodoo_0_pci_r(device_t *busdevice, device_t *device, int function, int reg, UINT32 mem_mask)
@@ -186,7 +186,7 @@ static void voodoo_0_pci_w(device_t *busdevice, device_t *device, int function,
break;
case 0x40:
state->m_voodoo_pci_regs.init_enable = data;
- state->m_voodoo->voodoo_set_init_enable(data);
+ voodoo_set_init_enable(state->m_voodoo, data);
break;
}
}
diff --git a/src/mame/drivers/gaelco2.cpp b/src/mame/drivers/gaelco2.cpp
index 44739b59053..06a068e372c 100644
--- a/src/mame/drivers/gaelco2.cpp
+++ b/src/mame/drivers/gaelco2.cpp
@@ -1046,6 +1046,9 @@ ROM_START( snowboara )
ROM_LOAD( "sb44", 0x0000000, 0x0400000, CRC(1bbe88bc) SHA1(15bce9ada2b742ba4d537fa8efc0f29f661bff00) ) /* GFX only */
ROM_LOAD( "sb45", 0x0400000, 0x0400000, CRC(373983d9) SHA1(05e35a8b27cab469885f0ec2a5df200a366b50a1) ) /* Sound only */
ROM_LOAD( "sb46", 0x0800000, 0x0400000, CRC(22e7c648) SHA1(baddb9bc13accd83bea61533d7286cf61cd89279) ) /* GFX only */
+
+ DISK_REGION( "decrypt" )
+ DISK_IMAGE( "snowboar", 0, SHA1(fecf611bd9289d24a0b1cabaaf030e2cee322cfa) )
ROM_END
ROM_START( snowboar )
@@ -1083,6 +1086,9 @@ ROM_START( snowboar )
ROM_LOAD( "sb.e2", 0x1100000, 0x0080000, CRC(f5948c6c) SHA1(91bba817ced194b02885ce84b7a8132ef5ca631a) ) /* GFX only */
ROM_LOAD( "sb.e3", 0x1180000, 0x0080000, CRC(4baa678f) SHA1(a7fbbd687e2d8d7e96207c8ace0799a3cc9c3272) ) /* GFX only */
ROM_FILL( 0x1200000, 0x0200000, 0x00 ) /* Empty */
+
+ DISK_REGION( "decrypt" )
+ DISK_IMAGE( "snowboar", 0, SHA1(fecf611bd9289d24a0b1cabaaf030e2cee322cfa) )
ROM_END
diff --git a/src/mame/drivers/galaxi.cpp b/src/mame/drivers/galaxi.cpp
index de2e1e47512..679bd63b40d 100644
--- a/src/mame/drivers/galaxi.cpp
+++ b/src/mame/drivers/galaxi.cpp
@@ -1,40 +1,45 @@
// license:BSD-3-Clause
-// copyright-holders:Luca Elia,Roberto Fresca
+// copyright-holders:Luca Elia
/***************************************************************************
- Galaxi (C)2000 B.R.L.
+Galaxi (C)2000 B.R.L.
- Driver by Luca Elia.
- Additional work by Roberto Fresca.
+driver by Luca Elia
+Hardware info (29/07/2008 f205v):
- Hardware info (29/07/2008 f205v):
-
- Chips:
+Chips:
1x missing main CPU (u1)(from the socket I would say it's a 68000)
1x A40MX04-PL84 (u29)
1x AD-65 (equivalent to M6295) (u9)(sound)
1x MC1458P (u10)(sound)
1x TDA2003 (u8)(sound)
1x oscillator 10.000MHz (QZ1)
- 1x oscillator 16.000000 (QZ2)
- ROMs:
+ 1x oscillator 16.000000 (QZ2)
+ROMs:
1x AT27C020 (1)
2x M27C4001 (2,3)
2x AT49F010 (4,5)
2x DS1230Y (non volatile SRAM)
- Notes:
+Notes:
1x 28x2 edge connector
1x trimmer (volume)
- - This hardware is almost identical to that in magic10.c
+- This hardware is almost identical to that in magic10.c
- CPU is a MC68000P10, from the other games boards...
-***************************************************************************/
+[31/08/2008] (Roberto Fresca)
+
+- Added Magic Joker.
+- Fixed the 3rd background offset to Galaxi.
+- Remapped inputs to match the standard poker games.
+
+[12/09/2008] (Roberto Fresca)
-#define CPU_CLOCK (XTAL_10MHz)
-#define SND_CLOCK (XTAL_16MHz)/16
+- Added lamps support to magjoker & galaxi.
+
+
+***************************************************************************/
#include "emu.h"
#include "cpu/m68000/m68000.h"
@@ -224,7 +229,7 @@ UINT32 galaxi_state::screen_update_galaxi(screen_device &screen, bitmap_ind16 &b
}
/***************************************************************************
- Handlers
+ Memory Maps
***************************************************************************/
void galaxi_state::show_out( )
@@ -290,10 +295,6 @@ CUSTOM_INPUT_MEMBER(galaxi_state::hopper_r)
}
-/***************************************************************************
- Memory Maps
-***************************************************************************/
-
static ADDRESS_MAP_START( galaxi_map, AS_PROGRAM, 16, galaxi_state )
AM_RANGE(0x000000, 0x03ffff) AM_ROM
@@ -342,7 +343,6 @@ static ADDRESS_MAP_START( lastfour_map, AS_PROGRAM, 16, galaxi_state )
AM_RANGE(0x600000, 0x607fff) AM_RAM AM_SHARE("nvram") // 2x DS1230Y (non volatile SRAM)
ADDRESS_MAP_END
-
/***************************************************************************
Input Ports
***************************************************************************/
@@ -389,7 +389,7 @@ INPUT_PORTS_END
/***************************************************************************
- Graphics Layout & Graphics Decode
+ Graphics Layout
***************************************************************************/
static const gfx_layout layout_8x8x4 =
@@ -421,7 +421,7 @@ GFXDECODE_END
/***************************************************************************
- Machine Start & Reset
+ Machine Drivers
***************************************************************************/
void galaxi_state::machine_start()
@@ -438,14 +438,10 @@ void galaxi_state::machine_reset()
m_out = 0;
}
-/***************************************************************************
- Machine Drivers
-***************************************************************************/
-
static MACHINE_CONFIG_START( galaxi, galaxi_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", M68000, CPU_CLOCK)
+ MCFG_CPU_ADD("maincpu", M68000, XTAL_10MHz) // ?
MCFG_CPU_PROGRAM_MAP(galaxi_map)
MCFG_CPU_VBLANK_INT_DRIVER("screen", galaxi_state, irq4_line_hold)
@@ -464,16 +460,19 @@ static MACHINE_CONFIG_START( galaxi, galaxi_state )
MCFG_PALETTE_ADD("palette", 0x400)
MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB)
+
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_OKIM6295_ADD("oki", SND_CLOCK, OKIM6295_PIN7_LOW) // ?
+ MCFG_OKIM6295_ADD("oki", XTAL_16MHz/16, OKIM6295_PIN7_LOW) // ?
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( magjoker, galaxi )
+ /* basic machine hardware */
+
/* sound hardware */
MCFG_SOUND_MODIFY("oki")
@@ -482,15 +481,11 @@ static MACHINE_CONFIG_DERIVED( magjoker, galaxi )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 4.0)
MACHINE_CONFIG_END
-
static MACHINE_CONFIG_DERIVED( lastfour, galaxi )
-
- /* basic machine hardware */
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(lastfour_map)
MACHINE_CONFIG_END
-
/***************************************************************************
ROMs Loading
***************************************************************************/
@@ -538,7 +533,7 @@ ROM_END
Game Drivers
***************************************************************************/
-/* YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS LAYOUT */
-GAMEL( 2000, galaxi, 0, galaxi, galaxi, driver_device, 0, ROT0, "B.R.L.", "Galaxi (v2.0)", MACHINE_SUPPORTS_SAVE, layout_galaxi )
-GAMEL( 2000, magjoker, 0, magjoker, magjoker, driver_device, 0, ROT0, "B.R.L.", "Magic Joker (v1.25.10.2000)", MACHINE_SUPPORTS_SAVE, layout_galaxi )
-GAMEL( 2001, lastfour, 0, lastfour, magjoker, driver_device, 0, ROT0, "B.R.L.", "Last Four (09:12 16/01/2001)", MACHINE_SUPPORTS_SAVE, layout_galaxi )
+/* YEAR NAME PARENT MACHINE INPUT INIT ROT COMPANY FULLNAME FLAGS LAYOUT */
+GAMEL( 2000, galaxi, 0, galaxi, galaxi, driver_device, 0, ROT0, "B.R.L.", "Galaxi (v2.0)", MACHINE_SUPPORTS_SAVE, layout_galaxi )
+GAMEL( 2000, magjoker, 0, magjoker, magjoker, driver_device, 0, ROT0, "B.R.L.", "Magic Joker (v1.25.10.2000)", MACHINE_SUPPORTS_SAVE, layout_galaxi )
+GAMEL( 2001, lastfour, 0, lastfour, magjoker, driver_device, 0, ROT0, "B.R.L.", "Last Four (09:12 16/01/2001)",MACHINE_SUPPORTS_SAVE, layout_galaxi )
diff --git a/src/mame/drivers/galaxian.cpp b/src/mame/drivers/galaxian.cpp
index 09b615701cf..9fb23df9be1 100644
--- a/src/mame/drivers/galaxian.cpp
+++ b/src/mame/drivers/galaxian.cpp
@@ -9750,7 +9750,6 @@ ROM_START( frogger )
ROM_LOAD( "pr-91.6l", 0x0000, 0x0020, CRC(413703bf) SHA1(66648b2b28d3dcbda5bdb2605d1977428939dd3c) )
ROM_END
-
ROM_START( froggers1 )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "frogger.26", 0x0000, 0x1000, CRC(597696d6) SHA1(e7e021776cad00f095a1ebbef407b7c0a8f5d835) ) /* We need the correct Sega "EPR" labels for these 3 */
@@ -9790,26 +9789,6 @@ ROM_START( froggers2 )
ROM_LOAD( "pr-91.6l", 0x0000, 0x0020, CRC(413703bf) SHA1(66648b2b28d3dcbda5bdb2605d1977428939dd3c) )
ROM_END
-ROM_START( froggers3 )
- ROM_REGION( 0x10000, "maincpu", 0 ) // different code revision, but didn't have Sega labels (other roms on PCB did) so might be unofficial mod
- ROM_LOAD( "29", 0x0000, 0x1000, CRC(a58e43a7) SHA1(f4d4646cf295ae351279eec87347d4ef980bea26) )
- ROM_LOAD( "30", 0x1000, 0x1000, CRC(119bbedb) SHA1(6a8ef356cbef39c68002e1bb9d2ac0ac8805ac2d) )
- ROM_LOAD( "31", 0x2000, 0x1000, CRC(405595e9) SHA1(1cbcae7159d716b801a5dde8009503d6fcc790c0) )
-
- ROM_REGION( 0x10000, "audiocpu", 0 )
- ROM_LOAD( "epr-608.ic32", 0x0000, 0x0800, CRC(e8ab0256) SHA1(f090afcfacf5f13cdfa0dfda8e3feb868c6ce8bc) )
- ROM_LOAD( "epr-609.ic33", 0x0800, 0x0800, CRC(7380a48f) SHA1(75582a94b696062cbdb66a4c5cf0bc0bb94f81ee) )
- ROM_LOAD( "epr-610.ic34", 0x1000, 0x0800, CRC(31d7eb27) SHA1(2e1d34ae4da385fd7cac94707d25eeddf4604e1a) )
-
- ROM_REGION( 0x1000, "gfx1", 0 )
- ROM_LOAD( "epr-607.ic101", 0x0000, 0x0800, CRC(05f7d883) SHA1(78831fd287da18928651a8adb7e578d291493eff) )
- ROM_LOAD( "epr-606.ic102", 0x0800, 0x0800, CRC(f524ee30) SHA1(dd768967add61467baa08d5929001f157d6cd911) )
-
- ROM_REGION( 0x0020, "proms", 0 )
- ROM_LOAD( "pr-91.6l", 0x0000, 0x0020, CRC(413703bf) SHA1(66648b2b28d3dcbda5bdb2605d1977428939dd3c) )
-ROM_END
-
-
ROM_START( froggermc )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "epr-1031.15", 0x0000, 0x1000, CRC(4b7c8d11) SHA1(9200b33cac0ef5a6647c95ebd25237fa62fcdf30) )
@@ -11412,7 +11391,6 @@ GAME( 1980, kingballj, kingball, kingball, kingball, galaxian_state, kingb
GAME( 1981, frogger, 0, frogger, frogger, galaxian_state, frogger, ROT90, "Konami", "Frogger", MACHINE_SUPPORTS_SAVE )
GAME( 1981, froggers1, frogger, frogger, frogger, galaxian_state, frogger, ROT90, "Konami (Sega license)", "Frogger (Sega set 1)", MACHINE_SUPPORTS_SAVE )
GAME( 1981, froggers2, frogger, frogger, frogger, galaxian_state, frogger, ROT90, "Konami (Sega license)", "Frogger (Sega set 2)", MACHINE_SUPPORTS_SAVE )
-GAME( 1981, froggers3, frogger, frogger, frogger, galaxian_state, frogger, ROT90, "Konami (Sega license)", "Frogger (Sega set 3)", MACHINE_SUPPORTS_SAVE )
GAME( 1981, froggermc, frogger, froggermc, froggermc, galaxian_state, froggermc, ROT90, "Konami (Sega license)", "Frogger (Moon Cresta hardware)", MACHINE_SUPPORTS_SAVE )
GAME( 1981, froggers, frogger, froggers, frogger, galaxian_state, froggers, ROT90, "bootleg", "Frog", MACHINE_SUPPORTS_SAVE )
GAME( 1981, frogf, frogger, frogf, frogger, galaxian_state, froggers, ROT90, "bootleg (Falcon)", "Frog (Falcon bootleg)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/galaxy.cpp b/src/mame/drivers/galaxy.cpp
index 7104b6f3bf9..886e9716df5 100644
--- a/src/mame/drivers/galaxy.cpp
+++ b/src/mame/drivers/galaxy.cpp
@@ -255,7 +255,7 @@ MACHINE_CONFIG_END
ROM_START (galaxy)
ROM_REGION (0x10000, "maincpu", ROMREGION_ERASEFF)
- ROM_LOAD ("galrom1.bin", 0x0000, 0x1000, CRC(dc970a32) SHA1(dfc92163654a756b70f5a446daf49d7534f4c739))
+ ROM_LOAD ("galrom1.bin", 0x0000, 0x1000, CRC(365f3e24) SHA1(ffc6bf2ec09eabdad76604a63f5dd697c30c4358))
ROM_LOAD_OPTIONAL ("galrom2.bin", 0x1000, 0x1000, CRC(5dc5a100) SHA1(5d5ab4313a2d0effe7572bb129193b64cab002c1))
ROM_REGION(0x0800, "gfx1",0)
ROM_LOAD ("galchr.bin", 0x0000, 0x0800, CRC(5c3b5bb5) SHA1(19429a61dc5e55ddec3242a8f695e06dd7961f88))
@@ -263,7 +263,7 @@ ROM_END
ROM_START (galaxyp)
ROM_REGION (0x10000, "maincpu", ROMREGION_ERASEFF)
- ROM_LOAD ("galrom1.bin", 0x0000, 0x1000, CRC(dc970a32) SHA1(dfc92163654a756b70f5a446daf49d7534f4c739))
+ ROM_LOAD ("galrom1.bin", 0x0000, 0x1000, CRC(365f3e24) SHA1(ffc6bf2ec09eabdad76604a63f5dd697c30c4358))
ROM_LOAD ("galrom2.bin", 0x1000, 0x1000, CRC(5dc5a100) SHA1(5d5ab4313a2d0effe7572bb129193b64cab002c1))
ROM_LOAD ("galplus.bin", 0xe000, 0x1000, CRC(d4cfab14) SHA1(b507b9026844eeb757547679907394aa42055eee))
ROM_REGION(0x0800, "gfx1",0)
@@ -271,5 +271,5 @@ ROM_START (galaxyp)
ROM_END
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */
-COMP(1983, galaxy, 0, 0, galaxy, galaxy, galaxy_state, galaxy, "Voja Antonic / Elektronika inzenjering", "Galaksija", 0)
-COMP(1985, galaxyp, galaxy, 0, galaxyp,galaxyp, galaxy_state,galaxyp,"Nenad Dunjic", "Galaksija plus", 0)
+COMP(1983, galaxy, 0, 0, galaxy, galaxy, galaxy_state, galaxy, "Elektronika inzenjering", "Galaksija", 0)
+COMP(1985, galaxyp, galaxy, 0, galaxyp,galaxyp, galaxy_state,galaxyp,"Elektronika inzenjering", "Galaksija plus", 0)
diff --git a/src/mame/drivers/galpanic.cpp b/src/mame/drivers/galpanic.cpp
index 1f9c349de33..b47226747c1 100644
--- a/src/mame/drivers/galpanic.cpp
+++ b/src/mame/drivers/galpanic.cpp
@@ -74,12 +74,7 @@ Stephh's additional notes :
#include "includes/galpanic.h"
#include "includes/galpnipt.h"
-void galpanic_state::machine_start()
-{
- membank("okibank")->configure_entries(0, 16, memregion("oki")->base(), 0x10000);
-}
-
-void galpanic_state::screen_eof(screen_device &screen, bool state)
+void galpanic_state::screen_eof_galpanic(screen_device &screen, bool state)
{
// rising edge
if (state)
@@ -88,7 +83,7 @@ void galpanic_state::screen_eof(screen_device &screen, bool state)
}
}
-TIMER_DEVICE_CALLBACK_MEMBER(galpanic_state::scanline)
+TIMER_DEVICE_CALLBACK_MEMBER(galpanic_state::galpanic_scanline)
{
int scanline = param;
@@ -103,11 +98,13 @@ TIMER_DEVICE_CALLBACK_MEMBER(galpanic_state::scanline)
-WRITE16_MEMBER(galpanic_state::m6295_bankswitch_w)
+WRITE16_MEMBER(galpanic_state::galpanic_6295_bankswitch_w)
{
if (ACCESSING_BITS_8_15)
{
- membank("okibank")->set_entry((data >> 8) & 0x0f);
+ UINT8 *rom = memregion("oki")->base();
+
+ memcpy(&rom[0x30000],&rom[0x40000 + ((data >> 8) & 0x0f) * 0x10000],0x10000);
// used before title screen
m_pandora->set_clear_bitmap((data & 0x8000)>>15);
@@ -116,7 +113,7 @@ WRITE16_MEMBER(galpanic_state::m6295_bankswitch_w)
-WRITE16_MEMBER(galpanic_state::coin_w)
+WRITE16_MEMBER(galpanic_state::galpanic_coin_w)
{
if (ACCESSING_BITS_8_15)
{
@@ -134,15 +131,15 @@ static ADDRESS_MAP_START( galpanic_map, AS_PROGRAM, 16, galpanic_state )
AM_RANGE(0x000000, 0x3fffff) AM_ROM
AM_RANGE(0x400000, 0x400001) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff)
AM_RANGE(0x500000, 0x51ffff) AM_RAM AM_SHARE("fgvideoram")
- AM_RANGE(0x520000, 0x53ffff) AM_RAM_WRITE(bgvideoram_w) AM_SHARE("bgvideoram") /* + work RAM */
+ AM_RANGE(0x520000, 0x53ffff) AM_RAM_WRITE(galpanic_bgvideoram_w) AM_SHARE("bgvideoram") /* + work RAM */
AM_RANGE(0x600000, 0x6007ff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") /* 1024 colors, but only 512 seem to be used */
AM_RANGE(0x700000, 0x701fff) AM_DEVREADWRITE("pandora", kaneko_pandora_device, spriteram_LSB_r, spriteram_LSB_w)
AM_RANGE(0x702000, 0x704fff) AM_RAM
AM_RANGE(0x800000, 0x800001) AM_READ_PORT("DSW1")
AM_RANGE(0x800002, 0x800003) AM_READ_PORT("DSW2")
AM_RANGE(0x800004, 0x800005) AM_READ_PORT("SYSTEM")
- AM_RANGE(0x900000, 0x900001) AM_WRITE(m6295_bankswitch_w)
- AM_RANGE(0xa00000, 0xa00001) AM_WRITE(coin_w) /* coin counters */
+ AM_RANGE(0x900000, 0x900001) AM_WRITE(galpanic_6295_bankswitch_w)
+ AM_RANGE(0xa00000, 0xa00001) AM_WRITE(galpanic_coin_w) /* coin counters */
AM_RANGE(0xb00000, 0xb00001) AM_WRITENOP /* ??? */
AM_RANGE(0xc00000, 0xc00001) AM_WRITENOP /* ??? */
AM_RANGE(0xd00000, 0xd00001) AM_WRITENOP /* ??? */
@@ -150,10 +147,6 @@ static ADDRESS_MAP_START( galpanic_map, AS_PROGRAM, 16, galpanic_state )
ADDRESS_MAP_END
-static ADDRESS_MAP_START( galpanic_oki_map, AS_0, 8, galpanic_state )
- AM_RANGE(0x00000, 0x2ffff) AM_ROM
- AM_RANGE(0x30000, 0x3ffff) AM_ROMBANK("okibank")
-ADDRESS_MAP_END
static INPUT_PORTS_START( galpanic )
@@ -228,7 +221,7 @@ static MACHINE_CONFIG_START( galpanic, galpanic_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", M68000, XTAL_12MHz) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(galpanic_map)
- MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", galpanic_state, scanline, "screen", 0, 1)
+ MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", galpanic_state, galpanic_scanline, "screen", 0, 1)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -236,8 +229,8 @@ static MACHINE_CONFIG_START( galpanic, galpanic_state )
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0) /* frames per second, vblank duration */)
MCFG_SCREEN_SIZE(256, 256)
MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 0, 224-1)
- MCFG_SCREEN_UPDATE_DRIVER(galpanic_state, screen_update)
- MCFG_SCREEN_VBLANK_DRIVER(galpanic_state, screen_eof)
+ MCFG_SCREEN_UPDATE_DRIVER(galpanic_state, screen_update_galpanic)
+ MCFG_SCREEN_VBLANK_DRIVER(galpanic_state, screen_eof_galpanic)
MCFG_SCREEN_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", galpanic)
@@ -253,11 +246,12 @@ static MACHINE_CONFIG_START( galpanic, galpanic_state )
MCFG_DEVICE_ADD("calc1_mcu", KANEKO_HIT, 0)
kaneko_hit_device::set_type(*device, 0);
+ MCFG_VIDEO_START_OVERRIDE(galpanic_state,galpanic)
+
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_OKIM6295_ADD("oki", XTAL_12MHz/6, OKIM6295_PIN7_LOW) /* verified on pcb */
- MCFG_DEVICE_ADDRESS_MAP(AS_0, galpanic_oki_map)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
@@ -293,10 +287,11 @@ ROM_START( galpanic ) /* PAMERA-04 PCB with the PAMERA-SUB daughter card and unp
ROM_REGION( 0x100000, "gfx1", 0 ) /* sprites */
ROM_LOAD( "pm006e.67", 0x000000, 0x100000, CRC(57aec037) SHA1(e6ba095b6892d4dcd76ba3343a97dd98ae29dc24) )
- ROM_REGION( 0x100000, "oki", 0 ) /* OKIM6295 samples */
+ ROM_REGION( 0x140000, "oki", 0 ) /* OKIM6295 samples */
/* 00000-2ffff is fixed, 30000-3ffff is bank switched from all the ROMs */
ROM_LOAD( "pm008e.l", 0x00000, 0x80000, CRC(d9379ba8) SHA1(5ae7c743319b1a12f2b101a9f0f8fe0728ed1476) )
- ROM_LOAD( "pm007e.u", 0x80000, 0x80000, CRC(c7ed7950) SHA1(133258b058d3c562208d0d00b9fac71202647c32) )
+ ROM_RELOAD( 0x40000, 0x80000 )
+ ROM_LOAD( "pm007e.u", 0xc0000, 0x80000, CRC(c7ed7950) SHA1(133258b058d3c562208d0d00b9fac71202647c32) )
ROM_END
ROM_START( galpanica ) /* PAMERA-04 PCB with the CALC1 MCU used */
@@ -313,11 +308,12 @@ ROM_START( galpanica ) /* PAMERA-04 PCB with the CALC1 MCU used */
ROM_REGION( 0x100000, "gfx1", 0 ) /* sprites */
ROM_LOAD( "pm006e.67", 0x000000, 0x100000, CRC(57aec037) SHA1(e6ba095b6892d4dcd76ba3343a97dd98ae29dc24) )
- ROM_REGION( 0x100000, "oki", 0 ) /* OKIM6295 samples */
+ ROM_REGION( 0x140000, "oki", 0 ) /* OKIM6295 samples */
/* 00000-2ffff is fixed, 30000-3ffff is bank switched from all the ROMs */
ROM_LOAD( "pm008e.l", 0x00000, 0x80000, CRC(d9379ba8) SHA1(5ae7c743319b1a12f2b101a9f0f8fe0728ed1476) )
- ROM_LOAD( "pm007e.u", 0x80000, 0x80000, CRC(c7ed7950) SHA1(133258b058d3c562208d0d00b9fac71202647c32) )
+ ROM_RELOAD( 0x40000, 0x80000 )
+ ROM_LOAD( "pm007e.u", 0xc0000, 0x80000, CRC(c7ed7950) SHA1(133258b058d3c562208d0d00b9fac71202647c32) )
ROM_END
-GAME( 1990, galpanic, 0, galpanic, galpanic, driver_device, 0, ROT90, "Kaneko", "Gals Panic (Unprotected)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
-GAME( 1990, galpanica,galpanic, galpanica,galpanica, driver_device, 0, ROT90, "Kaneko", "Gals Panic (MCU Protected)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
+GAME( 1990, galpanic, 0, galpanic, galpanic, driver_device, 0, ROT90, "Kaneko", "Gals Panic (Unprotected)", MACHINE_NO_COCKTAIL )
+GAME( 1990, galpanica,galpanic, galpanica,galpanica, driver_device, 0, ROT90, "Kaneko", "Gals Panic (MCU Protected)", MACHINE_NO_COCKTAIL )
diff --git a/src/mame/drivers/gauntlet.cpp b/src/mame/drivers/gauntlet.cpp
index f10375d51fe..3bf38312812 100644
--- a/src/mame/drivers/gauntlet.cpp
+++ b/src/mame/drivers/gauntlet.cpp
@@ -191,12 +191,13 @@ WRITE16_MEMBER(gauntlet_state::sound_reset_w)
m_soundcomm->sound_cpu_reset();
if (m_sound_reset_val & 1)
{
- m_ym2151->reset();
- m_tms5220->reset();
- m_tms5220->set_frequency(ATARI_CLOCK_14MHz/2 / 11);
- m_ym2151->set_output_gain(ALL_OUTPUTS, 0.0f);
- m_pokey->set_output_gain(ALL_OUTPUTS, 0.0f);
- m_tms5220->set_output_gain(ALL_OUTPUTS, 0.0f);
+ machine().device("ymsnd")->reset();
+ tms5220_device *tms5220 = machine().device<tms5220_device>("tms");
+ tms5220->reset();
+ tms5220->set_frequency(ATARI_CLOCK_14MHz/2 / 11);
+ set_ym2151_volume(0);
+ set_pokey_volume(0);
+ set_tms5220_volume(0);
}
}
}
@@ -212,11 +213,12 @@ WRITE16_MEMBER(gauntlet_state::sound_reset_w)
READ8_MEMBER(gauntlet_state::switch_6502_r)
{
+ tms5220_device *tms5220 = machine().device<tms5220_device>("tms");
int temp = 0x30;
if (m_soundcomm->main_to_sound_ready()) temp ^= 0x80;
if (m_soundcomm->sound_to_main_ready()) temp ^= 0x40;
- if (!m_tms5220->readyq_r()) temp ^= 0x20;
+ if (!tms5220->readyq_r()) temp ^= 0x20;
if (!(ioport("803008")->read() & 0x0008)) temp ^= 0x10;
return temp;
@@ -231,23 +233,24 @@ READ8_MEMBER(gauntlet_state::switch_6502_r)
WRITE8_MEMBER(gauntlet_state::sound_ctl_w)
{
+ tms5220_device *tms5220 = machine().device<tms5220_device>("tms");
switch (offset & 7)
{
case 0: /* music reset, bit D7, low reset */
- if (((data>>7)&1) == 0) m_ym2151->reset();
+ if (((data>>7)&1) == 0) machine().device("ymsnd")->reset();
break;
case 1: /* speech write, bit D7, active low */
- m_tms5220->wsq_w(data >> 7);
+ tms5220->wsq_w(data >> 7);
break;
case 2: /* speech reset, bit D7, active low */
- m_tms5220->rsq_w(data >> 7);
+ tms5220->rsq_w(data >> 7);
break;
case 3: /* speech squeak, bit D7 */
data = 5 | ((data >> 6) & 2);
- m_tms5220->set_frequency(ATARI_CLOCK_14MHz/2 / (16 - data));
+ tms5220->set_frequency(ATARI_CLOCK_14MHz/2 / (16 - data));
break;
}
}
@@ -262,9 +265,9 @@ WRITE8_MEMBER(gauntlet_state::sound_ctl_w)
WRITE8_MEMBER(gauntlet_state::mixer_w)
{
- m_ym2151->set_output_gain(ALL_OUTPUTS, (data & 7) / 7.0f);
- m_pokey->set_output_gain(ALL_OUTPUTS, ((data >> 3) & 3) / 3.0f);
- m_tms5220->set_output_gain(ALL_OUTPUTS, ((data >> 5) & 7) / 7.0f);
+ set_ym2151_volume((data & 7) * 100 / 7);
+ set_pokey_volume(((data >> 3) & 3) * 100 / 3);
+ set_tms5220_volume(((data >> 5) & 7) * 100 / 7);
}
@@ -489,13 +492,15 @@ GFXDECODE_END
*
*************************************/
-static MACHINE_CONFIG_START( gauntlet_base, gauntlet_state )
+static MACHINE_CONFIG_START( gauntlet, gauntlet_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", M68010, ATARI_CLOCK_14MHz/2)
MCFG_CPU_PROGRAM_MAP(main_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", atarigen_state, video_int_gen)
+ MCFG_SLAPSTIC_ADD("slapstic")
+
MCFG_CPU_ADD("audiocpu", M6502, ATARI_CLOCK_14MHz/8)
MCFG_CPU_PROGRAM_MAP(sound_map)
@@ -543,27 +548,6 @@ static MACHINE_CONFIG_START( gauntlet_base, gauntlet_state )
MACHINE_CONFIG_END
-static MACHINE_CONFIG_DERIVED( gauntlet, gauntlet_base )
- MCFG_SLAPSTIC_ADD("slapstic", 104)
-MACHINE_CONFIG_END
-
-
-static MACHINE_CONFIG_DERIVED( gaunt2p, gauntlet_base )
- MCFG_SLAPSTIC_ADD("slapstic", 107)
-MACHINE_CONFIG_END
-
-
-static MACHINE_CONFIG_DERIVED( gauntlet2, gauntlet_base )
- MCFG_SLAPSTIC_ADD("slapstic", 106)
-MACHINE_CONFIG_END
-
-
-static MACHINE_CONFIG_DERIVED( vindctr2, gauntlet_base )
- MCFG_SLAPSTIC_ADD("slapstic", 118)
-MACHINE_CONFIG_END
-
-
-
/*************************************
*
@@ -1643,10 +1627,10 @@ void gauntlet_state::swap_memory(void *ptr1, void *ptr2, int bytes)
}
}
-void gauntlet_state::common_init(int vindctr2)
+void gauntlet_state::common_init(int slapstic, int vindctr2)
{
UINT8 *rom = memregion("maincpu")->base();
- slapstic_configure(*m_maincpu, 0x038000, 0);
+ slapstic_configure(*m_maincpu, 0x038000, 0, slapstic);
/* swap the top and bottom halves of the main CPU ROM images */
swap_memory(rom + 0x000000, rom + 0x008000, 0x8000);
@@ -1662,7 +1646,19 @@ void gauntlet_state::common_init(int vindctr2)
DRIVER_INIT_MEMBER(gauntlet_state,gauntlet)
{
- common_init(0);
+ common_init(104, 0);
+}
+
+
+DRIVER_INIT_MEMBER(gauntlet_state,gaunt2p)
+{
+ common_init(107, 0);
+}
+
+
+DRIVER_INIT_MEMBER(gauntlet_state,gauntlet2)
+{
+ common_init(106, 0);
}
@@ -1672,7 +1668,7 @@ DRIVER_INIT_MEMBER(gauntlet_state,vindctr2)
dynamic_buffer data(0x8000);
int i;
- common_init(1);
+ common_init(118, 1);
/* highly strange -- the address bits on the chip at 2J (and only that
chip) are scrambled -- this is verified on the schematics! */
@@ -1708,20 +1704,20 @@ GAME( 1985, gauntletgr3, gauntlet, gauntlet, gauntlet, gauntlet_state, gauntlet,
GAME( 1985, gauntletr2, gauntlet, gauntlet, gauntlet, gauntlet_state, gauntlet, ROT0, "Atari Games", "Gauntlet (rev 2)", 0 )
GAME( 1985, gauntletr1, gauntlet, gauntlet, gauntlet, gauntlet_state, gauntlet, ROT0, "Atari Games", "Gauntlet (rev 1)", 0 )
-GAME( 1985, gauntlet2p, gauntlet, gaunt2p, gauntlet, gauntlet_state, gauntlet, ROT0, "Atari Games", "Gauntlet (2 Players, rev 6)", 0 )
-GAME( 1985, gauntlet2pj, gauntlet, gaunt2p, gauntlet, gauntlet_state, gauntlet, ROT0, "Atari Games", "Gauntlet (2 Players, Japanese, rev 5)", 0 )
-GAME( 1985, gauntlet2pg, gauntlet, gaunt2p, gauntlet, gauntlet_state, gauntlet, ROT0, "Atari Games", "Gauntlet (2 Players, German, rev 4)", 0 )
-GAME( 1985, gauntlet2pr3, gauntlet, gaunt2p, gauntlet, gauntlet_state, gauntlet, ROT0, "Atari Games", "Gauntlet (2 Players, rev 3)", 0 )
-GAME( 1985, gauntlet2pj2, gauntlet, gaunt2p, gauntlet, gauntlet_state, gauntlet, ROT0, "Atari Games", "Gauntlet (2 Players, Japanese, rev 2)", 0 )
-GAME( 1985, gauntlet2pg1, gauntlet, gaunt2p, gauntlet, gauntlet_state, gauntlet, ROT0, "Atari Games", "Gauntlet (2 Players, German, rev 1)", 0 )
+GAME( 1985, gauntlet2p, gauntlet, gauntlet, gauntlet, gauntlet_state, gaunt2p, ROT0, "Atari Games", "Gauntlet (2 Players, rev 6)", 0 )
+GAME( 1985, gauntlet2pj, gauntlet, gauntlet, gauntlet, gauntlet_state, gaunt2p, ROT0, "Atari Games", "Gauntlet (2 Players, Japanese, rev 5)", 0 )
+GAME( 1985, gauntlet2pg, gauntlet, gauntlet, gauntlet, gauntlet_state, gaunt2p, ROT0, "Atari Games", "Gauntlet (2 Players, German, rev 4)", 0 )
+GAME( 1985, gauntlet2pr3, gauntlet, gauntlet, gauntlet, gauntlet_state, gaunt2p, ROT0, "Atari Games", "Gauntlet (2 Players, rev 3)", 0 )
+GAME( 1985, gauntlet2pj2, gauntlet, gauntlet, gauntlet, gauntlet_state, gaunt2p, ROT0, "Atari Games", "Gauntlet (2 Players, Japanese, rev 2)", 0 )
+GAME( 1985, gauntlet2pg1, gauntlet, gauntlet, gauntlet, gauntlet_state, gaunt2p, ROT0, "Atari Games", "Gauntlet (2 Players, German, rev 1)", 0 )
-GAME( 1986, gaunt2, 0, gauntlet2, gauntlet, gauntlet_state, gauntlet, ROT0, "Atari Games", "Gauntlet II", 0 )
-GAME( 1986, gaunt2g, gaunt2, gauntlet2, gauntlet, gauntlet_state, gauntlet, ROT0, "Atari Games", "Gauntlet II (German)", 0 )
+GAME( 1986, gaunt2, 0, gauntlet, gauntlet, gauntlet_state, gauntlet2, ROT0, "Atari Games", "Gauntlet II", 0 )
+GAME( 1986, gaunt2g, gaunt2, gauntlet, gauntlet, gauntlet_state, gauntlet2, ROT0, "Atari Games", "Gauntlet II (German)", 0 )
-GAME( 1986, gaunt22p, gaunt2, gauntlet2, gauntlet, gauntlet_state, gauntlet, ROT0, "Atari Games", "Gauntlet II (2 Players, rev 2)", 0 )
-GAME( 1986, gaunt22p1, gaunt2, gauntlet2, gauntlet, gauntlet_state, gauntlet, ROT0, "Atari Games", "Gauntlet II (2 Players, rev 1)", 0 )
-GAME( 1986, gaunt22pg, gaunt2, gauntlet2, gauntlet, gauntlet_state, gauntlet, ROT0, "Atari Games", "Gauntlet II (2 Players, German)", 0 )
+GAME( 1986, gaunt22p, gaunt2, gauntlet, gauntlet, gauntlet_state, gauntlet2, ROT0, "Atari Games", "Gauntlet II (2 Players, rev 2)", 0 )
+GAME( 1986, gaunt22p1, gaunt2, gauntlet, gauntlet, gauntlet_state, gauntlet2, ROT0, "Atari Games", "Gauntlet II (2 Players, rev 1)", 0 )
+GAME( 1986, gaunt22pg, gaunt2, gauntlet, gauntlet, gauntlet_state, gauntlet2, ROT0, "Atari Games", "Gauntlet II (2 Players, German)", 0 )
-GAME( 1988, vindctr2, 0, vindctr2, vindctr2, gauntlet_state, vindctr2, ROT0, "Atari Games", "Vindicators Part II (rev 3)", 0 )
-GAME( 1988, vindctr2r2, vindctr2, vindctr2, vindctr2, gauntlet_state, vindctr2, ROT0, "Atari Games", "Vindicators Part II (rev 2)", 0 )
-GAME( 1988, vindctr2r1, vindctr2, vindctr2, vindctr2, gauntlet_state, vindctr2, ROT0, "Atari Games", "Vindicators Part II (rev 1)", 0 )
+GAME( 1988, vindctr2, 0, gauntlet, vindctr2, gauntlet_state, vindctr2, ROT0, "Atari Games", "Vindicators Part II (rev 3)", 0 )
+GAME( 1988, vindctr2r2, vindctr2, gauntlet, vindctr2, gauntlet_state, vindctr2, ROT0, "Atari Games", "Vindicators Part II (rev 2)", 0 )
+GAME( 1988, vindctr2r1, vindctr2, gauntlet, vindctr2, gauntlet_state, vindctr2, ROT0, "Atari Games", "Vindicators Part II (rev 1)", 0 )
diff --git a/src/mame/drivers/gkigt.cpp b/src/mame/drivers/gkigt.cpp
index 867514520b8..07bd4c982ea 100644
--- a/src/mame/drivers/gkigt.cpp
+++ b/src/mame/drivers/gkigt.cpp
@@ -172,7 +172,7 @@ GFXDECODE_END
static MACHINE_CONFIG_START( igt_gameking, igt_gameking_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", I960, XTAL_24MHz)
+ MCFG_CPU_ADD("maincpu", I960, 20000000) // ?? Mhz
MCFG_CPU_PROGRAM_MAP(igt_gameking_mem)
@@ -185,7 +185,6 @@ static MACHINE_CONFIG_START( igt_gameking, igt_gameking_state )
MCFG_SCREEN_VISIBLE_AREA(8*8, 48*8-1, 2*8, 30*8-1)
MCFG_SCREEN_UPDATE_DRIVER(igt_gameking_state, screen_update_igt_gameking)
MCFG_SCREEN_PALETTE("palette")
- // Xilinx used as video chip XTAL_26_66666MHz on board
MCFG_PALETTE_ADD("palette", 0x200)
MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB)
@@ -199,26 +198,6 @@ static MACHINE_CONFIG_START( igt_gameking, igt_gameking_state )
MACHINE_CONFIG_END
-ROM_START( ms72c )
- ROM_REGION( 0x80000, "maincpu", 0 )
- ROM_LOAD( "3B5019FA MULTISTAR 7 2c CONFIG.u8", 0x00000, 0x80000, CRC(6c326a31) SHA1(cd8ecc814ef4f379946ab3654dddd508c24ae56c) )
-
- ROM_REGION32_LE( 0x200000, "game", 0 )
- ROM_LOAD16_BYTE( "DA5001FA Gamebase GME1.u21", 0x000000, 0x100000, CRC(4cd63b5f) SHA1(440302a6ac844b453573e358b29c64f2e8ece80e) )
- ROM_LOAD16_BYTE( "DA5001FA Gamebase GME2.u5", 0x000001, 0x100000, CRC(663df2fe) SHA1(d2ac3129a346450168a9f76431b0fa8b78db3b37) )
-
- ROM_REGION( 0x100000, "cg", 0 )
- ROM_LOAD16_BYTE( "1G5019FA Multistar 7 PUB.u48", 0x000000, 0x80000, CRC(ac50a155) SHA1(50d07ba5ca176c97adde169fda6e6385c8ec8299) )
- ROM_LOAD16_BYTE( "1G5019FA Multistar 7 PUB.u47", 0x000001, 0x80000, CRC(5fee078b) SHA1(a41591d14fbc12c68d773fbd1ac340d9427d68e9) )
-
- ROM_REGION( 0x200000, "plx", 0 )
- ROM_LOAD16_BYTE( "1G5019FA Multistar 7 PUB.u20", 0x000000, 0x100000, CRC(806ec7d4) SHA1(b9263f942b3d7101797bf87ad18cfddac9582791) )
- ROM_LOAD16_BYTE( "1G5019FA Multistar 7 PUB.u4", 0x000001, 0x100000, CRC(2e1e9c8a) SHA1(b6992f013f43debf43f4704396fc71e88449e365) )
-
- ROM_REGION( 0x200000, "snd", 0 )
- ROM_LOAD( "1H5008FA Multistar 7.u6", 0x000000, 0x100000, CRC(69656637) SHA1(28c2cf48856ee4f820146fdbd0f3c7e307892dc6) )
-ROM_END
-
ROM_START( gkigt4 )
ROM_REGION( 0x80000, "maincpu", 0 )
@@ -390,7 +369,6 @@ ROM_START( gkkey )
ROM_END
-GAME( 1994, ms72c, 0, igt_gameking, igt_gameking, driver_device, 0, ROT0, "IGT", "Multistar 7 2c", MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
GAME( 2003, gkigt4, 0, igt_gameking, igt_gameking, driver_device, 0, ROT0, "IGT", "Game King (v4.x)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
GAME( 2003, gkigt4ms, gkigt4, igt_gameking, igt_gameking, driver_device, 0, ROT0, "IGT", "Game King (v4.x, MS)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
GAME( 2003, gkigt43, gkigt4, igt_gameking, igt_gameking, driver_device, 0, ROT0, "IGT", "Game King (v4.3)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
diff --git a/src/mame/drivers/glass.cpp b/src/mame/drivers/glass.cpp
index 5711341018f..54304712b71 100644
--- a/src/mame/drivers/glass.cpp
+++ b/src/mame/drivers/glass.cpp
@@ -6,8 +6,7 @@ Glass (c) 1993 Gaelco (Developed by OMK. Produced by Gaelco)
Driver by Manuel Abadia <emumanu+mame@gmail.com>
-The DS5002FP has up to 128KB undumped gameplay code making the game unplayable,
-except for the Promat licensed Korean version which is unprotected.
+The DS5002FP has up to 128KB undumped gameplay code making the game unplayable :_(
***************************************************************************/
@@ -21,7 +20,7 @@ WRITE16_MEMBER(glass_state::clr_int_w)
m_cause_interrupt = 1;
}
-INTERRUPT_GEN_MEMBER(glass_state::interrupt)
+INTERRUPT_GEN_MEMBER(glass_state::glass_interrupt)
{
if (m_cause_interrupt)
{
@@ -55,11 +54,13 @@ GFXDECODE_END
WRITE16_MEMBER(glass_state::OKIM6295_bankswitch_w)
{
+ UINT8 *RAM = memregion("oki")->base();
+
if (ACCESSING_BITS_0_7)
- membank("okibank")->set_entry(data & 0x0f);
+ memcpy(&RAM[0x30000], &RAM[0x40000 + (data & 0x0f) * 0x10000], 0x10000);
}
-WRITE16_MEMBER(glass_state::coin_w)
+WRITE16_MEMBER(glass_state::glass_coin_w)
{
switch (offset >> 3)
{
@@ -78,7 +79,7 @@ WRITE16_MEMBER(glass_state::coin_w)
static ADDRESS_MAP_START( glass_map, AS_PROGRAM, 16, glass_state )
AM_RANGE(0x000000, 0x0fffff) AM_ROM /* ROM */
- AM_RANGE(0x100000, 0x101fff) AM_RAM_WRITE(vram_w) AM_SHARE("videoram") /* Video RAM */
+ AM_RANGE(0x100000, 0x101fff) AM_RAM_WRITE(glass_vram_w) AM_SHARE("videoram") /* Video RAM */
AM_RANGE(0x102000, 0x102fff) AM_RAM /* Extra Video RAM */
AM_RANGE(0x108000, 0x108007) AM_WRITEONLY AM_SHARE("vregs") /* Video Registers */
AM_RANGE(0x108008, 0x108009) AM_WRITE(clr_int_w) /* CLR INT Video */
@@ -88,20 +89,14 @@ static ADDRESS_MAP_START( glass_map, AS_PROGRAM, 16, glass_state )
AM_RANGE(0x700002, 0x700003) AM_READ_PORT("DSW1")
AM_RANGE(0x700004, 0x700005) AM_READ_PORT("P1")
AM_RANGE(0x700006, 0x700007) AM_READ_PORT("P2")
- AM_RANGE(0x700008, 0x700009) AM_WRITE(blitter_w) /* serial blitter */
+ AM_RANGE(0x700008, 0x700009) AM_WRITE(glass_blitter_w) /* serial blitter */
AM_RANGE(0x70000c, 0x70000d) AM_WRITE(OKIM6295_bankswitch_w) /* OKI6295 bankswitch */
AM_RANGE(0x70000e, 0x70000f) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff) /* OKI6295 status register */
- AM_RANGE(0x70000a, 0x70004b) AM_WRITE(coin_w) /* Coin Counters/Lockout */
+ AM_RANGE(0x70000a, 0x70004b) AM_WRITE(glass_coin_w) /* Coin Counters/Lockout */
AM_RANGE(0xfec000, 0xfeffff) AM_RAM AM_SHARE("mainram") /* Work RAM (partially shared with DS5002FP) */
ADDRESS_MAP_END
-static ADDRESS_MAP_START( oki_map, AS_0, 8, glass_state )
- AM_RANGE(0x00000, 0x2ffff) AM_ROM
- AM_RANGE(0x30000, 0x3ffff) AM_ROMBANK("okibank")
-ADDRESS_MAP_END
-
-
static INPUT_PORTS_START( glass )
PORT_START("DSW1")
PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:6,7,8")
@@ -177,8 +172,6 @@ INPUT_PORTS_END
void glass_state::machine_start()
{
- membank("okibank")->configure_entries(0, 16, memregion("oki")->base(), 0x10000);
-
save_item(NAME(m_cause_interrupt));
save_item(NAME(m_current_bit));
save_item(NAME(m_current_command));
@@ -187,11 +180,13 @@ void glass_state::machine_start()
void glass_state::machine_reset()
{
+ int i;
+
m_cause_interrupt = 1;
m_current_bit = 0;
m_current_command = 0;
- for (int i = 0; i < 5; i++)
+ for (i = 0; i < 5; i++)
m_blitter_serial_buffer[i] = 0;
}
@@ -200,7 +195,7 @@ static MACHINE_CONFIG_START( glass, glass_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/2) /* 12 MHz verified on PCB */
MCFG_CPU_PROGRAM_MAP(glass_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", glass_state, interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", glass_state, glass_interrupt)
/* video hardware */
@@ -209,7 +204,7 @@ static MACHINE_CONFIG_START( glass, glass_state )
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
MCFG_SCREEN_SIZE(32*16, 32*16)
MCFG_SCREEN_VISIBLE_AREA(0, 368-1, 16, 256-1)
- MCFG_SCREEN_UPDATE_DRIVER(glass_state, screen_update)
+ MCFG_SCREEN_UPDATE_DRIVER(glass_state, screen_update_glass)
MCFG_SCREEN_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", glass)
@@ -220,7 +215,6 @@ static MACHINE_CONFIG_START( glass, glass_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_OKIM6295_ADD("oki", XTAL_1MHz, OKIM6295_PIN7_HIGH) /* 1MHz Resonator & pin 7 high verified on PCB */
- MCFG_DEVICE_ADDRESS_MAP(AS_0, oki_map)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
@@ -242,9 +236,10 @@ ROM_START( glass ) /* Version 1.1 */
ROM_REGION( 0x100000, "gfx3", 0 ) /* 16 bitmaps (320x200, indexed colors) */
ROM_LOAD( "h9.bin", 0x000000, 0x100000, CRC(b9492557) SHA1(3f5c0d696d65e1cd492763dfa749c813dd56a9bf) )
- ROM_REGION( 0x100000, "oki", 0 ) /* ADPCM samples - sound chip is OKIM6295 */
+ ROM_REGION( 0x140000, "oki", 0 ) /* ADPCM samples - sound chip is OKIM6295 */
ROM_LOAD( "c1.bin", 0x000000, 0x100000, CRC(d9f075a2) SHA1(31a7a677861f39d512e9d1f51925c689e481159a) )
/* 0x00000-0x2ffff is fixed, 0x30000-0x3ffff is bank switched from all the ROMs */
+ ROM_RELOAD( 0x040000, 0x100000 )
ROM_END
ROM_START( glass10 ) /* Version 1.0 */
@@ -265,9 +260,10 @@ ROM_START( glass10 ) /* Version 1.0 */
ROM_REGION( 0x100000, "gfx3", 0 ) /* 16 bitmaps (320x200, indexed colors) */
ROM_LOAD( "h9.bin", 0x000000, 0x100000, CRC(b9492557) SHA1(3f5c0d696d65e1cd492763dfa749c813dd56a9bf) )
- ROM_REGION( 0x100000, "oki", 0 ) /* ADPCM samples - sound chip is OKIM6295 */
+ ROM_REGION( 0x140000, "oki", 0 ) /* ADPCM samples - sound chip is OKIM6295 */
ROM_LOAD( "c1.bin", 0x000000, 0x100000, CRC(d9f075a2) SHA1(31a7a677861f39d512e9d1f51925c689e481159a) )
/* 0x00000-0x2ffff is fixed, 0x30000-0x3ffff is bank switched from all the ROMs */
+ ROM_RELOAD( 0x040000, 0x100000 )
ROM_END
ROM_START( glass10a ) /* Title screen shows "GLASS" and under that "Break Edition" on a real PCB */
@@ -288,9 +284,10 @@ ROM_START( glass10a ) /* Title screen shows "GLASS" and under that "Break Editio
ROM_REGION( 0x100000, "gfx3", 0 ) /* 16 bitmaps (320x200, indexed colors) */
ROM_LOAD( "h9.bin", 0x000000, 0x100000, CRC(b9492557) SHA1(3f5c0d696d65e1cd492763dfa749c813dd56a9bf) )
- ROM_REGION( 0x100000, "oki", 0 ) /* ADPCM samples - sound chip is OKIM6295 */
+ ROM_REGION( 0x140000, "oki", 0 ) /* ADPCM samples - sound chip is OKIM6295 */
ROM_LOAD( "c1.bin", 0x000000, 0x100000, CRC(d9f075a2) SHA1(31a7a677861f39d512e9d1f51925c689e481159a) )
/* 0x00000-0x2ffff is fixed, 0x30000-0x3ffff is bank switched from all the ROMs */
+ ROM_RELOAD( 0x040000, 0x100000 )
ROM_END
ROM_START( glasskr )
@@ -308,9 +305,10 @@ ROM_START( glasskr )
ROM_REGION( 0x100000, "gfx3", 0 ) /* 16 bitmaps (320x200, indexed colors) */
ROM_LOAD( "glassk.h9", 0x000000, 0x100000, CRC(d499be4c) SHA1(204f754813be687e8dc00bfe7b5dbc4857ac8738) )
- ROM_REGION( 0x100000, "oki", 0 ) /* ADPCM samples - sound chip is OKIM6295 */
+ ROM_REGION( 0x140000, "oki", 0 ) /* ADPCM samples - sound chip is OKIM6295 */
ROM_LOAD( "c1.bin", 0x000000, 0x100000, CRC(d9f075a2) SHA1(31a7a677861f39d512e9d1f51925c689e481159a) )
/* 0x00000-0x2ffff is fixed, 0x30000-0x3ffff is bank switched from all the ROMs */
+ ROM_RELOAD( 0x040000, 0x100000 )
ROM_END
/***************************************************************************
@@ -319,7 +317,7 @@ ROM_END
***************************************************************************/
-void glass_state::ROM16_split_gfx( const char *src_reg, const char *dst_reg, int start, int length, int dest1, int dest2 )
+void glass_state::glass_ROM16_split_gfx( const char *src_reg, const char *dst_reg, int start, int length, int dest1, int dest2 )
{
int i;
@@ -344,14 +342,14 @@ void glass_state::ROM16_split_gfx( const char *src_reg, const char *dst_reg, int
*/
-READ16_MEMBER( glass_state::mainram_r )
+READ16_MEMBER( glass_state::glass_mainram_r )
{
UINT16 ret = m_mainram[offset];
int pc = space.device().safe_pc();
if (offset == (0xfede96 - 0xfec000)>>1)
{
- // this address seems important, the game will abort with 'power failure' depending on some reads, presumably referring to the power to the battery
+ // this address seems important, the game will abort with 'power failure' depending on some reads, presumably refering to the power to the battery
// there are also various code segments like the one below
/*
@@ -378,7 +376,7 @@ READ16_MEMBER( glass_state::mainram_r )
return ret;
}
-WRITE16_MEMBER( glass_state::mainram_w )
+WRITE16_MEMBER( glass_state::glass_mainram_w )
{
int pc = space.device().safe_pc();
@@ -438,10 +436,10 @@ DRIVER_INIT_MEMBER(glass_state, glass)
*/
/* split ROM H13 */
- ROM16_split_gfx("gfx2", "gfx1", 0x0000000, 0x0200000, 0x0000000, 0x0100000);
+ glass_ROM16_split_gfx("gfx2", "gfx1", 0x0000000, 0x0200000, 0x0000000, 0x0100000);
/* split ROM H11 */
- ROM16_split_gfx("gfx2", "gfx1", 0x0200000, 0x0200000, 0x0200000, 0x0300000);
+ glass_ROM16_split_gfx("gfx2", "gfx1", 0x0200000, 0x0200000, 0x0200000, 0x0300000);
}
@@ -451,7 +449,7 @@ DRIVER_INIT_MEMBER(glass_state,glassp)
DRIVER_INIT_CALL(glass);
/* install custom handler over RAM for protection */
- m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xfec000, 0xfeffff, read16_delegate(FUNC(glass_state::mainram_r), this), write16_delegate(FUNC(glass_state::mainram_w),this));
+ m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xfec000, 0xfeffff, read16_delegate(FUNC(glass_state::glass_mainram_r), this), write16_delegate(FUNC(glass_state::glass_mainram_w),this));
}
diff --git a/src/mame/drivers/goldstar.cpp b/src/mame/drivers/goldstar.cpp
index 8a4c83f039a..e4a1485a892 100644
--- a/src/mame/drivers/goldstar.cpp
+++ b/src/mame/drivers/goldstar.cpp
@@ -1668,7 +1668,6 @@ static INPUT_PORTS_START( cmasterb )
/* Test Mode For Disp. Of Doll not checked */
INPUT_PORTS_END
-
static INPUT_PORTS_START( cmezspin )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -1739,7 +1738,6 @@ static INPUT_PORTS_START( cmezspin )
/* Test Mode For Disp. Of Doll not checked */
INPUT_PORTS_END
-
static INPUT_PORTS_START( cmasterc )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -1798,66 +1796,6 @@ static INPUT_PORTS_START( cmasterc )
/* Test Mode For Disp. Of Doll not checked */
INPUT_PORTS_END
-
-static INPUT_PORTS_START( cmasterg )
- PORT_START("IN0")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Big / Stop All")
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_BET )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small / Info")
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start")
-
- PORT_INCLUDE( cmv4_coins )
-
- PORT_INCLUDE( cmv4_service )
-
- PORT_INCLUDE( cmv4_dsw1 )
- PORT_MODIFY("DSW1")
- PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) ) PORT_DIPLOCATION("DSW1:1")
- PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- /* Hopper Out Switch not checked */
- /* Payout Mode not checked */
- /* '7' In Double Up Game OK */
- PORT_DIPNAME( 0x10, 0x00, "Double Up Game Pay Rate" ) PORT_DIPLOCATION("DSW1:5") /* OK */
- PORT_DIPSETTING( 0x00, "60%" )
- PORT_DIPSETTING( 0x10, "70%" )
- /* Double Up Game OK */
- /* Bet Max OK */
-
- PORT_INCLUDE( cmv4_dsw2 )
- PORT_MODIFY("DSW2")
- PORT_DIPNAME( 0x07, 0x00, "Main Game Pay Rate" ) PORT_DIPLOCATION("DSW2:1,2,3") /* OK */
- PORT_DIPSETTING( 0x07, "45%" )
- PORT_DIPSETTING( 0x06, "50%" )
- PORT_DIPSETTING( 0x05, "55%" )
- PORT_DIPSETTING( 0x04, "60%" )
- PORT_DIPSETTING( 0x03, "65%" )
- PORT_DIPSETTING( 0x02, "70%" )
- PORT_DIPSETTING( 0x01, "75%" )
- PORT_DIPSETTING( 0x00, "80%" )
- /* Hopper Limit OK */
- /* 100+ Odds Sound not checked */
- /* Key In Type OK */
- /* Center Super 7 Bet Limit related with Min. Bet For Bonus Play (DSW4-6) */
-
- PORT_INCLUDE( cmv4_dsw3 ) /* all OK */
-
- PORT_INCLUDE( cmv4_dsw4 ) /* all OK */
-
- PORT_INCLUDE( cmv4_dsw5 )
- /* Display of Doll On Demo only affects payout table screen */
- /* Coin In Limit OK */
- /* Condition For 3 Kind Of Bonus not checked */
- /* Display Of Doll At All Fr. Bonus not checked */
- /* DSW5-7 listed as unused */
- /* Test Mode For Disp. Of Doll not checked */
-INPUT_PORTS_END
-
-
static INPUT_PORTS_START( cmast91 )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -6752,31 +6690,6 @@ static const gfx_layout sangho_tilelayout =
128*8 /* every char takes 128 consecutive bytes */
};
-static const gfx_layout super9_charlayout =
-{
- 8,8, /* 8*8 characters */
- 4096, /* 4096 characters */
- 3, /* 3 bits per pixel */
- { 2, 4, 6 }, /* the bitplanes are packed in one byte */
- { 0*8+0, 0*8+1, 1*8+0, 1*8+1, 2*8+0, 2*8+1, 3*8+0, 3*8+1 },
- { 0*32, 4*32, 2*32, 6*32, 1*32, 5*32, 3*32, 7*32 },
- 32*8 /* every char takes 32 consecutive bytes */
-};
-
-static const gfx_layout super9_tilelayout = // Green is OK. Red needs normal goldstar order...
-{
- 8,32, /* 8*32 characters */
- 256, /* 256 tiles */
- 4, /* 4 bits per pixel */
- { 0, 2, 4, 6 },
- { 1, 0, 1*8+1, 1*8+0, 2*8+1, 2*8+0, 3*8+1, 3*8+0 },
- { 0*8, 4*8, 8*8, 12*8, 16*8, 20*8, 24*8, 28*8,
- 32*8, 36*8, 40*8, 44*8, 48*8, 52*8, 56*8, 60*8,
- 64*8, 68*8, 72*8, 76*8, 80*8, 84*8, 88*8, 92*8,
- 96*8, 100*8, 104*8, 108*8, 112*8, 116*8, 120*8, 124*8 },
- 128*8 /* every char takes 128 consecutive bytes */
-};
-
static GFXDECODE_START( goldstar )
@@ -6877,11 +6790,6 @@ static GFXDECODE_START( sangho )
*/
GFXDECODE_END
-static GFXDECODE_START( super9 )
- GFXDECODE_ENTRY( "gfx1", 0, super9_charlayout, 0, 16 )
- GFXDECODE_ENTRY( "gfx2", 0, super9_tilelayout, 128, 8 )
-GFXDECODE_END
-
static const gfx_layout tiles8x32_4bpp_layout =
{
@@ -7183,12 +7091,12 @@ static MACHINE_CONFIG_START( super9, goldstar_state )
MCFG_SCREEN_UPDATE_DRIVER(goldstar_state, screen_update_goldstar)
MCFG_SCREEN_PALETTE("palette")
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", super9)
+ MCFG_GFXDECODE_ADD("gfxdecode", "palette", goldstar)
MCFG_PALETTE_ADD("palette", 256)
MCFG_PALETTE_FORMAT(BBGGGRRR)
MCFG_NVRAM_ADD_1FILL("nvram")
- MCFG_VIDEO_START_OVERRIDE(goldstar_state, goldstar)
+ MCFG_VIDEO_START_OVERRIDE(goldstar_state,goldstar)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -8303,32 +8211,9 @@ ROM_START( chrygld )
ROM_END
-/* Moon Light (V.0629)
- Rip off / clone of Gold Star.
-
- The program ROM is double size and stores two different programs.
- Whilst we have not idea about the real addressing, we can support
- both sets separately.
-
-*/
ROM_START( moonlght )
- ROM_REGION( 0x20000, "maincpu", 0 ) // using only the first half of the program ROM.
- ROM_LOAD( "4.bin", 0x0000, 0x20000, CRC(ecb06cfb) SHA1(e32613cac5583a0fecf04fca98796b91698e530c) ) // low program, normal gfx
-
- ROM_REGION( 0x20000, "gfx1", 0 )
- ROM_LOAD( "28.bin", 0x00000, 0x20000, CRC(76915c0f) SHA1(3f6d1c0dd3d9bf29538181a0e930291b822dad8c) )
-
- ROM_REGION( 0x20000, "gfx2", 0 )
- ROM_LOAD( "29.bin", 0x00000, 0x20000, CRC(8a5f274d) SHA1(0f2ad61b00e220fc509c01c11c1a8f4e47b54f2a) )
-
- ROM_REGION( 0x40000, "oki", 0 ) /* Audio ADPCM */
- ROM_LOAD( "gs1-snd.bin", 0x0000, 0x20000, CRC(9d58960f) SHA1(c68edf95743e146398aabf6b9617d18e1f9bf25b) )
-ROM_END
-
-ROM_START( moonlghta )
- ROM_REGION( 0x20000, "maincpu", 0 ) // using only the second half of the program ROM.
- ROM_LOAD( "4.bin", 0x10000, 0x10000, CRC(ecb06cfb) SHA1(e32613cac5583a0fecf04fca98796b91698e530c) ) // high program, normal gfx
- ROM_CONTINUE( 0x00000, 0x10000)
+ ROM_REGION( 0x20000, "maincpu", 0 )
+ ROM_LOAD( "4.bin", 0x0000, 0x20000, CRC(ecb06cfb) SHA1(e32613cac5583a0fecf04fca98796b91698e530c) )
ROM_REGION( 0x20000, "gfx1", 0 )
ROM_LOAD( "28.bin", 0x00000, 0x20000, CRC(76915c0f) SHA1(3f6d1c0dd3d9bf29538181a0e930291b822dad8c) )
@@ -8340,74 +8225,6 @@ ROM_START( moonlghta )
ROM_LOAD( "gs1-snd.bin", 0x0000, 0x20000, CRC(9d58960f) SHA1(c68edf95743e146398aabf6b9617d18e1f9bf25b) )
ROM_END
-/* Moon Light (V.02L0A)
- Rip off / clone of Gold Star.
-
- The program ROM is double size and stores two different programs.
- Whilst we have not idea about the real addressing, we can support
- both sets separately.
-
- GFX devices are 4 times bigger and contains 4 times the same data.
- Maybe the manufacturers run out of proper devices...
-
- The background is not set properly due to a palette error. The program ROM stores
- the palette at offset 0xC700 onwards... The value stored at 0xC780 (color 0x80) should
- be black to mask the reels tilemaps and turn them 'invisible'. This program has a value
- of 0x40 instead, turning the tilemaps blue and therefore visible. The results is an odd
- effect that shouldn't be there. Maybe is product of a bad dump. Need to be checked with
- the real board.
-
- The hardware currently uses only the second half of the program ROM (high program), that
- replaces the double-up's cards graphics with 'drakkars' (scandinavian / viking ships).
-
-----------------------------------------------------------------------------------------
-28.bin FIXED BITS (00xxxxxx)
-29.bin 00xxxxxxxxxxxxxxx = 0xFF
- moon-gfx1.bin BADADDR --xxxxxxxxxxxxxxxxx
- moon-gfx2.bin FIXED BITS (00xxxxxx)
- moon-gfx2.bin BADADDR --xxxxxxxxxxxxxxxxx
-29.bin moon-gfx1.bin [1/4] IDENTICAL
-29.bin moon-gfx1.bin [2/4] IDENTICAL
-29.bin moon-gfx1.bin [3/4] IDENTICAL
-29.bin moon-gfx1.bin [4/4] IDENTICAL
-4.bin [1/4] moon-main.bin [1/4] 99.615479%
-4.bin [3/4] moon-main.bin [3/4] 99.426270%
-4.bin [2/4] moon-main.bin [2/4] 97.201538%
-4.bin [4/4] moon-main.bin [4/4] 95.953369%
-28.bin moon-gfx2.bin [1/4] 94.188690%
-28.bin moon-gfx2.bin [2/4] 94.188690%
-28.bin moon-gfx2.bin [3/4] 94.188690%
-28.bin moon-gfx2.bin [4/4] 94.188690%
-*/
-ROM_START( moonlghtb )
- ROM_REGION( 0x20000, "maincpu", 0 ) // using only the first half of the program ROM.
- ROM_LOAD( "moon-main.bin", 0x00000, 0x20000, CRC(0a4b5dd0) SHA1(825801e9b72c10fed8e07f42b3b475688bdbd878) ) // low program, normal gfx
-
- ROM_REGION( 0x20000, "gfx1", 0 )
- ROM_LOAD( "28.bin", 0x00000, 0x20000, CRC(76915c0f) SHA1(3f6d1c0dd3d9bf29538181a0e930291b822dad8c) ) // Normal GFX, from the other PCB
-
- ROM_REGION( 0x20000, "gfx2", 0 )
- ROM_LOAD( "29.bin", 0x00000, 0x20000, CRC(8a5f274d) SHA1(0f2ad61b00e220fc509c01c11c1a8f4e47b54f2a) ) // Normal GFX, from the other PCB
-
- ROM_REGION( 0x40000, "oki", 0 ) /* Audio ADPCM */
- ROM_LOAD( "moon-sound.bin", 0x0000, 0x20000, CRC(9d58960f) SHA1(c68edf95743e146398aabf6b9617d18e1f9bf25b) )
-ROM_END
-
-ROM_START( moonlghtc )
- ROM_REGION( 0x20000, "maincpu", 0 ) // using only the second half of the program ROM.
- ROM_LOAD( "moon-main.bin", 0x10000, 0x10000, CRC(0a4b5dd0) SHA1(825801e9b72c10fed8e07f42b3b475688bdbd878) ) // high program, alt gfx
- ROM_CONTINUE( 0x00000, 0x10000)
-
- ROM_REGION( 0x80000, "gfx1", 0 )
- ROM_LOAD( "moon-gfx2.bin", 0x00000, 0x80000, CRC(2ce5b722) SHA1(feb87fbf3b8d875842df80cd1edfef5071ed60c7) ) // Alt GFX set. Ships instead of cards
-
- ROM_REGION( 0x80000, "gfx2", 0 )
- ROM_LOAD( "moon-gfx1.bin", 0x00000, 0x80000, CRC(ea7d4234) SHA1(4016227aabf176c6e0fd822ebc59cade811f4ce8) ) // Alt GFX set. Ships instead of cards
-
- ROM_REGION( 0x40000, "oki", 0 ) /* Audio ADPCM */
- ROM_LOAD( "moon-sound.bin", 0x0000, 0x20000, CRC(9d58960f) SHA1(c68edf95743e146398aabf6b9617d18e1f9bf25b) )
-ROM_END
-
/* Gold Fruit
@@ -8630,58 +8447,6 @@ ROM_START( cb3e )
ROM_END
-/* Cherry Gold I (bootleg)
- It runs in CB3e similar hardware...
-
-1x TMPZ84C00AP-6 u15 8-bit Microprocessor
-3x D71055C u30, u39, u40 Programmable Peripheral Interface
-1x WF19054 u27 Programmable Sound Generator
-1x SN76489AN u28 Digital Complex Sound Generator
-1x oscillator unmarked Y1
-
-ROMs
-1x D27256 1.u3
-1x AM27512 3.u22
-1x D27C010 2u6
-1x N82S147AF u1
-
-RAMs
-4x HM6116LP-4 u9, u10, u11, u12
-1x D4016C-1 u23
-
-PLDs
-1x unknowun Cl-001 (QFP144) CY144A read protected
-4x GAL20V8A-15LNC pl1, pl4, pl5, pl6 read protected
-2x PALCE20V8H-25PC/4 u2,u? read protected
-1x PALCE22V10H-25PC/4 u? read protected
-
-Others
-1x 36x2 edge connector
-1x 10x2 edge connector
-1x pushbutton (TS)
-2x trimmer (volume)(VR1,VR2)
-5x 8x2 switches DIP(SW1-5)
-1x battery 5,5V
-
-Notes
-PCB is marked "REV.3"
-*/
-ROM_START( chryglda )
- ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "3.u22", 0x00000, 0x10000, CRC(059857c5) SHA1(f4becfda1e25ab347f55f35dc9f5818ef9344e2c) )
-
- ROM_REGION( 0x20000, "gfx1", 0 )
- ROM_LOAD( "2.u6", 0x00000, 0x20000, CRC(1359dfac) SHA1(78eb934055cda9e10d8e939c79bfa62262ecad7d) )
-
- ROM_REGION( 0x08000, "gfx2", 0 )
- ROM_LOAD( "1.u3", 0x00000, 0x08000, CRC(919bd692) SHA1(1aeb66f1e4555b731858833445000593e613f74d) )
-
- ROM_REGION( 0x0200, "proms", 0 )
- ROM_LOAD( "n82s147af.u1", 0x00000, 0x0100, CRC(d4eaa276) SHA1(b6598ee64ac3d41ca979c8667de8576cfb304451) )
- ROM_CONTINUE( 0x00000, 0x0100) // 2nd half has the data.
-ROM_END
-
-
ROM_START( cmv801 )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "prg512", 0x0000, 0x10000, CRC(2f6e3fe9) SHA1(c5ffa51478a0dc2d8ff6a0f286cfb461011bb55d) )
@@ -9271,115 +9036,6 @@ ROM_START( cmasterf )
ROM_END
-/* Cherry Master I (CM1-1.01)
- Sticker with "Cherry Master V4 -B-" on the PCB.
- Similar to cmasterb. Different program.
-
-1x TMPZ84C00AP-6 u80 8-bit Microprocessor
-1x D8255AC-5 u36 Programmable Peripheral Interface
-1x D71055C u54 Parallel Interface Unit
-1x YM2149F u13 Programmable Sound Generator
-1x oscillator 12.000MHz Y1
-
-ROMs
-4x 2764 1,2,3,4
-4x 27256 5,6,7,9
-1x 27512 8
-3x N82S129AN u46, u79, u84
-
-RAMs
-1x LC3517AL-10 u82
-4x D4016CX-15-10 u22, u26, u28, u38
-
-PLDs
-4x PALCE16V8H-25pc/4 u51, u66, u73, u74
-
-Others
-1x 36x2 edge connector
-1x 10x2 edge connector
-1x pushbutton (SW6)
-1x trimmer (volume)(VR1)
-5x 8x2 switches DIP(SW1-SW5)
-1x battery 5.5V(BT1)
-*/
-ROM_START( cmasterg )
- ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "9.u81", 0x0000, 0x1000, CRC(10979629) SHA1(a7342e37c75c85aef8a86ab5366a9e27f2c4bab8) )
- ROM_CONTINUE(0x4000,0x1000)
- ROM_CONTINUE(0x3000,0x1000)
- ROM_CONTINUE(0x7000,0x1000)
- ROM_CONTINUE(0x1000,0x1000)
- ROM_CONTINUE(0x6000,0x1000)
- ROM_CONTINUE(0x2000,0x1000)
- ROM_CONTINUE(0x5000,0x1000)
-
- ROM_REGION( 0x18000, "gfx1", 0 )
- ROM_LOAD( "7.u16", 0x00000, 0x8000, CRC(19cc1d67) SHA1(47487f9362bfb36a32100ed772960628844462bf) )
- ROM_LOAD( "6.u11", 0x08000, 0x8000, CRC(63b3df4e) SHA1(9bacd23da598805ec18ec5ad15cab95d71eb9262) )
- ROM_LOAD( "5.u4", 0x10000, 0x8000, CRC(e39fff9c) SHA1(22fdc517fa478441622c6245cecb5728c5595757) )
-
- ROM_REGION( 0x8000, "gfx2", 0 )
- ROM_LOAD( "4.u15", 0x0000, 0x2000, CRC(8607ffd9) SHA1(9bc94715554aa2473ae2ed249a47f29c7886b3dc) )
- ROM_LOAD( "3.u10", 0x2000, 0x2000, CRC(c32367be) SHA1(ff217021b9c58e23b2226f8b0a7f5da966225715) )
- ROM_LOAD( "2.u14", 0x4000, 0x2000, CRC(6dfcb188) SHA1(22430429c798954d9d979e62699b58feae7fdbf4) )
- ROM_LOAD( "1.u9", 0x6000, 0x2000, CRC(9678ead2) SHA1(e80aefa98b2363fe9e6b2415762695ace272e4d3) )
-
- ROM_REGION( 0x10000, "user1", 0 )
- ROM_LOAD( "8.u53", 0x0000, 0x10000, CRC(e92443d3) SHA1(4b6ca4521841610054165f085ae05510e77af191) )
-
- ROM_REGION( 0x200, "proms", 0 )
- ROM_LOAD( "n82s129an.u84", 0x0000, 0x0100, CRC(0489b760) SHA1(78f8632b17a76335183c5c204cdec856988368b0) )
- ROM_LOAD( "n82s129an.u79", 0x0100, 0x0100, CRC(21eb5b19) SHA1(9b8425bdb97f11f4855c998c7792c3291fd07470) )
-
- ROM_REGION( 0x100, "proms2", 0 )
- ROM_LOAD( "n82s129an.u46", 0x0000, 0x0100, CRC(50ec383b) SHA1(ae95b92bd3946b40134bcdc22708d5c6b0f4c23e) )
-ROM_END
-
-
-/* Cherry Master I (V1.10)
- Original Dyna upgrade for Cherry Master boards.
- The game runs in an original Dyna D9001 PCB.
- It laks of STOP ALL button.
-
- From the owner (sic):
- - The reels cannot be stop, not exist all stop button or cannot be stop from small, big, double-up button.
- - The odds still be "high" (on the version 4.x be "low" odds).
- - Not hold a pair option to, and the min bet to start is fixed x1.
- */
-ROM_START( cmasterh )
- ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "cm_v1.10_dyna.bin", 0x0000, 0x1000, CRC(872f2ef0) SHA1(ec68a03a1e8ab793d4a5eae1ce25f91608351c55) )
- ROM_CONTINUE(0x4000,0x1000)
- ROM_CONTINUE(0x3000,0x1000)
- ROM_CONTINUE(0x7000,0x1000)
- ROM_CONTINUE(0x1000,0x1000)
- ROM_CONTINUE(0x6000,0x1000)
- ROM_CONTINUE(0x2000,0x1000)
- ROM_CONTINUE(0x5000,0x1000)
-
- ROM_REGION( 0x18000, "gfx1", 0 )
- ROM_LOAD( "7.u16", 0x00000, 0x8000, CRC(19cc1d67) SHA1(47487f9362bfb36a32100ed772960628844462bf) )
- ROM_LOAD( "6.u11", 0x08000, 0x8000, CRC(63b3df4e) SHA1(9bacd23da598805ec18ec5ad15cab95d71eb9262) )
- ROM_LOAD( "5.u4", 0x10000, 0x8000, CRC(e39fff9c) SHA1(22fdc517fa478441622c6245cecb5728c5595757) )
-
- ROM_REGION( 0x8000, "gfx2", 0 )
- ROM_LOAD( "4.u15", 0x0000, 0x2000, CRC(8607ffd9) SHA1(9bc94715554aa2473ae2ed249a47f29c7886b3dc) )
- ROM_LOAD( "3.u10", 0x2000, 0x2000, CRC(c32367be) SHA1(ff217021b9c58e23b2226f8b0a7f5da966225715) )
- ROM_LOAD( "2.u14", 0x4000, 0x2000, CRC(6dfcb188) SHA1(22430429c798954d9d979e62699b58feae7fdbf4) )
- ROM_LOAD( "1.u9", 0x6000, 0x2000, CRC(9678ead2) SHA1(e80aefa98b2363fe9e6b2415762695ace272e4d3) )
-
- ROM_REGION( 0x10000, "user1", 0 )
- ROM_LOAD( "8.u53", 0x0000, 0x10000, CRC(e92443d3) SHA1(4b6ca4521841610054165f085ae05510e77af191) )
-
- ROM_REGION( 0x200, "proms", 0 )
- ROM_LOAD( "n82s129an.u84", 0x0000, 0x0100, CRC(0489b760) SHA1(78f8632b17a76335183c5c204cdec856988368b0) )
- ROM_LOAD( "n82s129an.u79", 0x0100, 0x0100, CRC(21eb5b19) SHA1(9b8425bdb97f11f4855c998c7792c3291fd07470) )
-
- ROM_REGION( 0x100, "proms2", 0 )
- ROM_LOAD( "n82s129an.u46", 0x0000, 0x0100, CRC(50ec383b) SHA1(ae95b92bd3946b40134bcdc22708d5c6b0f4c23e) )
-ROM_END
-
-
ROM_START( cmast99 )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "cm99-041-8.u81", 0x0000, 0x1000, CRC(e0872d9f) SHA1(6d8f5e09e5c9daf834d5c74434eae86e5dd7e194) )
@@ -10999,47 +10655,6 @@ ROM_START( roypok96b )
ROM_END
-ROM_START( roypok96c )
- ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "subboard.bin", 0x0000, 0x1000, CRC(5ce4bed1) SHA1(bd888fec4531157668d4b14a9439a3051e52b3ec) )
- ROM_CONTINUE(0x4000,0x1000)
- ROM_CONTINUE(0x3000,0x1000)
- ROM_CONTINUE(0x7000,0x1000)
- ROM_CONTINUE(0x1000,0x1000)
- ROM_CONTINUE(0x6000,0x1000)
- ROM_CONTINUE(0x2000,0x1000)
- ROM_CONTINUE(0x5000,0x1000)
- ROM_CONTINUE(0x8000,0x8000)
-
- ROM_REGION( 0x20000, "graphics", 0 )
- ROM_LOAD( "rp35h.bin", 0x00000, 0x10000, CRC(664649ea) SHA1(7915ab31afd2a1bbb8f817f961e0e522d76f5c05) )
- ROM_LOAD( "rp35l.bin", 0x10000, 0x10000, CRC(ef416c4e) SHA1(5aac157ba15c66f79a7a68935095bef9a2636f7b) )
-
- ROM_REGION( 0x10000, "user1", ROMREGION_ERASEFF )
-
- ROM_REGION( 0x18000, "gfx1", 0 )
- ROM_COPY( "graphics", 0x18000, 0x00000, 0x4000 ) // 1
- ROM_COPY( "graphics", 0x08000, 0x08000, 0x4000 ) // 1
- ROM_COPY( "graphics", 0x04000, 0x10000, 0x4000 ) // 1
- ROM_COPY( "graphics", 0x1c000, 0x04000, 0x4000 ) // 2
- ROM_COPY( "graphics", 0x0c000, 0x0c000, 0x4000 ) // 2
- ROM_COPY( "graphics", 0x14000, 0x14000, 0x4000 ) // 2
-
- ROM_REGION( 0x8000, "gfx2", 0 )
- ROM_COPY( "graphics", 0x02000, 0x00000, 0x2000 )
- ROM_COPY( "graphics", 0x12000, 0x02000, 0x2000 )
- ROM_COPY( "graphics", 0x00000, 0x04000, 0x2000 )
- ROM_COPY( "graphics", 0x10000, 0x06000, 0x2000 )
-
- ROM_REGION( 0x200, "proms", 0 ) // palette
- ROM_LOAD( "rpu19.bin", 0x0000, 0x0100, CRC(deb9ae3c) SHA1(056ce4947244ade1ff70f167a998140745b5cffa) )
- ROM_LOAD( "rpu20.bin", 0x0100, 0x0100, CRC(b3e0a328) SHA1(f8990fcd1e90d3e9205ee81f1d7dd105dbdcfcd6) )
-
- ROM_REGION( 0x100, "proms2", 0 ) // colours again?
- ROM_LOAD( "rpu1920.bin", 0x0000, 0x0100, CRC(e204e8f3) SHA1(9005fe9c72055af690701cd239f4b3665b2fae21) )
-ROM_END
-
-
ROM_START( pokonl97 )
ROM_REGION( 0x20000, "maincpu", 0 )
ROM_LOAD( "po33.bin", 0x00000, 0x1000, CRC(55bdd5cf) SHA1(7fd9e5c63ab2439db33710d7684f5df5e7324325) )
@@ -12059,27 +11674,9 @@ ROM_START( nfm )
ROM_END
-/* Super Cherry Master.
- Lacks of Dyna copyright. Maybe bootleg.
-
- Not reels stop options.
- Tried any input on the real hardware without luck.
-*/
-ROM_START( scmaster ) // all roms unique
- ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "27c512.u6", 0x00000, 0x10000, CRC(4eef290a) SHA1(27cca383de49d5f0072ecdda11591b78727469c6) )
-
- ROM_REGION( 0x20000, "gfx1", 0 )
- ROM_LOAD( "27c010.u29", 0x00000, 0x20000, CRC(98bd34b6) SHA1(e3ff6536eb421ed2e2f5d4354099078ba4ae5671) )
-
- ROM_REGION( 0x40000, "gfx2", 0 )
- ROM_LOAD( "27c020.u41", 0x00000, 0x40000, CRC(ece34be2) SHA1(fdfaaffb12a7f6de6bf21b46ad50e845abc00734) )
-ROM_END
-
-
ROM_START( unkch1 )
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "u6.bin", 0x00000, 0x10000, CRC(30309996) SHA1(290f35f587fdf78dcb4f09403c510deec533c9c2) )
+ ROM_LOAD( "u6.bin", 0x0000, 0x10000, CRC(30309996) SHA1(290f35f587fdf78dcb4f09403c510deec533c9c2) )
ROM_REGION( 0x20000, "gfx1", 0 )
ROM_LOAD( "u29.bin", 0x00000, 0x20000, CRC(6db245a1) SHA1(e9f85ba29b0af483eae6f999f49f1e431d9d2e27) )
@@ -12091,7 +11688,7 @@ ROM_END
ROM_START( unkch2 ) // only gfx2 differs from unkch1
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "u6.bin", 0x00000, 0x10000, CRC(30309996) SHA1(290f35f587fdf78dcb4f09403c510deec533c9c2) )
+ ROM_LOAD( "u6.bin", 0x0000, 0x10000, CRC(30309996) SHA1(290f35f587fdf78dcb4f09403c510deec533c9c2) )
ROM_REGION( 0x20000, "gfx1", 0 )
ROM_LOAD( "u29.bin", 0x00000, 0x20000, CRC(6db245a1) SHA1(e9f85ba29b0af483eae6f999f49f1e431d9d2e27) )
@@ -12103,7 +11700,7 @@ ROM_END
ROM_START( unkch3 ) // gfx2 is the same as unkch1, others differ
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "u6.3", 0x00000, 0x10000, CRC(902f9e42) SHA1(ac5843089748d457f70ea52d15285a0ccda705ad) )
+ ROM_LOAD( "u6.3", 0x0000, 0x10000, CRC(902f9e42) SHA1(ac5843089748d457f70ea52d15285a0ccda705ad) )
ROM_REGION( 0x20000, "gfx1", 0 )
ROM_LOAD( "u29.3", 0x00000, 0x20000, CRC(546929e6) SHA1(f97fe5687f8776f0abe68962a0246c9bbeb6acd1) )
@@ -12115,7 +11712,7 @@ ROM_END
ROM_START( unkch4 ) // all roms unique
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "u6.4", 0x00000, 0x10000, CRC(eb191efa) SHA1(3004f26f9af7633df572f609647716cc4ac75990) )
+ ROM_LOAD( "u6.4", 0x0000, 0x10000, CRC(eb191efa) SHA1(3004f26f9af7633df572f609647716cc4ac75990) )
ROM_REGION( 0x20000, "gfx1", 0 )
ROM_LOAD( "u29.4", 0x00000, 0x20000, CRC(eaec0034) SHA1(6b2d3922873979eafcd4c71c52017263482b82ab) )
@@ -12125,18 +11722,6 @@ ROM_START( unkch4 ) // all roms unique
ROM_END
-ROM_START( cherry96 ) // all roms unique
- ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "new_96-16-3.u6", 0x00000, 0x10000, CRC(84d5f2fc) SHA1(e3ed0670350920c661c5a40581966671b8a8c7df) )
-
- ROM_REGION( 0x20000, "gfx1", 0 )
- ROM_LOAD( "new_96-16-2.u29", 0x00000, 0x20000, CRC(dd8f7450) SHA1(c897e5151809d4e0a0b1e46609f07bb0156b489a) )
-
- ROM_REGION( 0x40000, "gfx2", 0 )
- ROM_LOAD( "new_96-16-1.u41", 0x00000, 0x20000, CRC(9ab19bdc) SHA1(2f34789729b5d12f6fa098a29253d5a80aef5b39) )
-ROM_END
-
-
/*
Cherry Master '97
@@ -12259,7 +11844,7 @@ ROM_END
and Eagle & Fun World stickers (serial numbers).
- For custom IC's 06B49P, and 06B53P, see the reverse-engineering notes in lucky74.cpp.
+ For custom IC's 06B49P, and 06B53P, see the reverse-engineering notes in lucky74.c.
------------------------
@@ -13689,11 +13274,8 @@ DRIVER_INIT_MEMBER(goldstar_state, wcherry)
YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS LAYOUT */
GAMEL( 199?, goldstar, 0, goldstar, goldstar, goldstar_state, goldstar, ROT0, "IGS", "Golden Star", 0, layout_goldstar )
GAMEL( 199?, goldstbl, goldstar, goldstbl, goldstar, driver_device, 0, ROT0, "IGS", "Golden Star (Blue version)", 0, layout_goldstar )
-GAME( 199?, moonlght, goldstar, moonlght, goldstar, driver_device, 0, ROT0, "bootleg", "Moon Light (v.0629, low program)", 0 )
-GAME( 199?, moonlghta, goldstar, moonlght, goldstar, driver_device, 0, ROT0, "bootleg", "Moon Light (v.0629, high program)", 0 )
-GAME( 199?, moonlghtb, goldstar, moonlght, goldstar, driver_device, 0, ROT0, "bootleg", "Moon Light (v.02L0A, low program)", MACHINE_IMPERFECT_COLORS ) // need to check the odd palette value at 0xc780. should be black.
-GAME( 199?, moonlghtc, goldstar, moonlght, goldstar, driver_device, 0, ROT0, "bootleg", "Moon Light (v.02L0A, high program, alt gfx)", MACHINE_IMPERFECT_COLORS ) // need to check the odd palette value at 0xc780. should be black.
-GAMEL( 199?, chrygld, 0, chrygld, chrygld, cb3_state, chrygld, ROT0, "bootleg", "Cherry Gold I (set 1)", 0, layout_chrygld )
+GAME( 199?, moonlght, goldstar, moonlght, goldstar, driver_device, 0, ROT0, "bootleg", "Moon Light (bootleg of Golden Star)", 0 )
+GAMEL( 199?, chrygld, 0, chrygld, chrygld, cb3_state, chrygld, ROT0, "bootleg", "Cherry Gold I", 0, layout_chrygld )
GAMEL( 199?, chry10, 0, chrygld, chry10, cb3_state, chry10, ROT0, "bootleg", "Cherry 10 (bootleg with PIC16F84)", 0, layout_chrygld )
GAME( 199?, goldfrui, goldstar, goldfrui, goldstar, driver_device, 0, ROT0, "bootleg", "Gold Fruit", 0 ) // maybe fullname should be 'Gold Fruit (main 40%)'
GAME( 2001, super9, goldstar, super9, goldstar, goldstar_state, super9, ROT0, "Playmark", "Super Nove (Playmark)", MACHINE_NOT_WORKING ) // need to decode gfx and see the program loops/reset...
@@ -13709,7 +13291,6 @@ GAMEL( 199?, cb3b, ncb3, cherrys, ncb3, cb3_state, cherrys,
GAME( 199?, cb3c, ncb3, cb3c, chrygld, cb3_state, cb3, ROT0, "bootleg", "Cherry Bonus III (alt, set 2)", MACHINE_NOT_WORKING)
GAMEL( 199?, cb3d, ncb3, ncb3, ncb3, driver_device, 0, ROT0, "bootleg", "Cherry Bonus III (set 3)", 0, layout_cherryb3 )
GAMEL( 199?, cb3e, ncb3, cb3e, chrygld, cb3_state, cb3e, ROT0, "bootleg", "Cherry Bonus III (set 4, encrypted bootleg)", 0, layout_chrygld )
-GAMEL( 199?, chryglda, ncb3, cb3e, chrygld, cb3_state, cb3e, ROT0, "bootleg", "Cherry Gold I (set 2, encrypted bootleg)", 0, layout_chrygld ) // Runs in CB3e hardware.
GAME( 1996, cmast97, ncb3, cm97, chrygld, driver_device, 0, ROT0, "Dyna", "Cherry Master '97", MACHINE_NOT_WORKING) // fix prom decode
@@ -13722,6 +13303,7 @@ GAMEL( 198?, cmv801, 0, cm, cmv801, cmaster_state, cm,
+
// most of these are almost certainly bootlegs, with added features, hacked payouts etc. identifying which are
// the original, unmodified dyna versions is almost impossible due to lack of documentation from back in the day,
// even original boards almost always run modified sets
@@ -13737,8 +13319,6 @@ GAMEL( 1991, cmasterbv, cmaster, cm, cmasterb, cmaster_state, cmv4,
GAMEL( 1991, cmasterd, cmaster, cm, cmasterb, cmaster_state, cmv4, ROT0, "Dyna", "Cherry Master I (ver.1.01, set 5)", 0, layout_cmasterb )
GAMEL( 1991, cmastere, cmaster, cm, cmasterb, cmaster_state, cmv4, ROT0, "Dyna", "Cherry Master I (ver.1.01, set 6)", 0, layout_cmasterb )
GAMEL( 1991, cmasterf, cmaster, cm, cmasterb, cmaster_state, cmv4, ROT0, "Dyna", "Cherry Master I (ver.1.01, set 7)", 0, layout_cmasterb )
-GAMEL( 1991, cmasterg, cmaster, cm, cmasterg, cmaster_state, cmv4, ROT0, "Dyna", "Cherry Master I (ver.1.01, set 8, V4-B-)", 0, layout_cmasterb )
-GAMEL( 1991, cmasterh, cmaster, cm, cmasterb, cmaster_state, cmv4, ROT0, "Dyna", "Cherry Master I (ver.1.10)", 0, layout_cmasterb )
GAME( 199?, cmast99, 0, cm, cmv4, cmaster_state, cmv4, ROT0, "????", "Cherry Master '99", MACHINE_NOT_WORKING )
@@ -13813,7 +13393,6 @@ GAME( 2009, fb2010, 0, amcoe2, nfb96tx, cmaster_state, fb2010,
GAMEL( 1996, roypok96, 0, amcoe2, roypok96, cmaster_state, rp35, ROT0, "Amcoe", "Royal Poker '96 (set 1, v97-3.5)", 0, layout_roypok96 )
GAMEL( 1996, roypok96a, roypok96, amcoe2, roypok96a, cmaster_state, rp36, ROT0, "Amcoe", "Royal Poker '96 (set 2, v98-3.6)", 0, layout_roypok96 )
GAMEL( 1996, roypok96b, roypok96, amcoe2, roypok96a, cmaster_state, rp36c3, ROT0, "Amcoe", "Royal Poker '96 (set 3, v98-3.6?)", 0, layout_roypok96 )
-GAME( 1996, roypok96c, roypok96, amcoe2, roypok96a, driver_device, 0, ROT0, "Amcoe", "Royal Poker '96 (set 4, C3 board)", MACHINE_NOT_WORKING )
/* these all appear to be graphic hacks of 'New Fruit Bonus '96', they can run with the same program rom
@@ -13828,17 +13407,11 @@ GAME( 2003, carb2003, nfb96, amcoe2, nfb96bl, driver_device, 0,
GAME( 2003, nfm, 0, nfm, nfm, driver_device, 0, ROT0, "Ming-Yang Electronic", "New Fruit Machine (Ming-Yang Electronic)", MACHINE_NOT_WORKING ) // vFB02-07A "Copyright By Ms. Liu Orchis 2003/03/06"
-
-// super cherry master sets...
-GAMEL(1994, scmaster, 0, unkch, unkch4, unkch_state, unkch4, ROT0, "bootleg", "Super Cherry Master (v1.0)", 0, layout_unkch )
-
-// these have 'cherry 1994' in the program roms, but also "Super Cherry / New Cherry Gold '99". probably hacks of a 1994 version of Super Cherry Master.
-GAMEL(1999, unkch1, scmaster, unkch, unkch, unkch_state, unkch1, ROT0, "bootleg", "New Cherry Gold '99 (bootleg of Super Cherry Master) (set 1)", 0, layout_unkch )
-GAMEL(1999, unkch2, scmaster, unkch, unkch, unkch_state, unkch1, ROT0, "bootleg", "Super Cherry Gold (bootleg of Super Cherry Master)", 0, layout_unkch )
-GAMEL(1999, unkch3, scmaster, unkch, unkch3, unkch_state, unkch3, ROT0, "bootleg", "New Cherry Gold '99 (bootleg of Super Cherry Master) (set 2)", 0, layout_unkch ) // cards have been hacked to look like barrels, girl removed?
-GAMEL(1999, unkch4, scmaster, unkch, unkch4, unkch_state, unkch4, ROT0, "bootleg", "Grand Cherry Master (bootleg of Super Cherry Master)", 0, layout_unkch ) // by 'Toy System' Hungary
-
-GAME( 1996, cherry96, scmaster, unkch, unkch4, unkch_state, unkch4, ROT0, "bootleg", "New Cherry '96 (bootleg of New Fruit Bonus?)", MACHINE_NOT_WORKING ) // need to be moved to another machine...
+// these have 'cherry 1994' in the program roms, but also "Super Cherry / New Cherry Gold '99" probably hacks of a 1994 version of Cherry Bonus / Cherry Master (Super Cherry Master?)
+GAMEL(1999, unkch1, 0, unkch, unkch, unkch_state, unkch1, ROT0, "bootleg", "New Cherry Gold '99 (bootleg of Super Cherry Master) (set 1)", 0, layout_unkch )
+GAMEL(1999, unkch2, unkch1, unkch, unkch, unkch_state, unkch1, ROT0, "bootleg", "Super Cherry Gold (bootleg of Super Cherry Master)", 0, layout_unkch )
+GAMEL(1999, unkch3, unkch1, unkch, unkch3, unkch_state, unkch3, ROT0, "bootleg", "New Cherry Gold '99 (bootleg of Super Cherry Master) (set 2)", 0, layout_unkch ) // cards have been hacked to look like barrels, girl removed?
+GAMEL(1999, unkch4, unkch1, unkch, unkch4, unkch_state, unkch4, ROT0, "bootleg", "Grand Cherry Master (bootleg of Super Cherry Master)", 0, layout_unkch ) // by 'Toy System' Hungary
/* Stealth sets.
@@ -13849,7 +13422,7 @@ GAMEL( 198?, cmpacman, 0, cm, cmpacman, cmaster_state, cm, RO
GAMEL( 198?, cmtetris, 0, cm, cmtetris, cmaster_state, cm, ROT0, "<unknown>", "Tetris + Cherry Master (Corsica, v8.01, set 1)", 0, layout_cmpacman ) // need to press K/L to switch between games...
GAMEL( 198?, cmtetrsa, 0, cm, cmtetris, cmaster_state, cm, ROT0, "<unknown>", "Tetris + Cherry Master (Corsica, v8.01, set 2)", MACHINE_NOT_WORKING, layout_cmpacman ) // seems banked...
GAMEL( 198?, cmtetrsb, 0, cm, cmtetris, cmaster_state, cm, ROT0, "<unknown>", "Tetris + Cherry Master (+K, Canada Version, encrypted)", MACHINE_NOT_WORKING, layout_cmpacman ) // different Tetris game. press insert to throttle and see the attract running.
-GAMEL( 1997, crazybon, 0, pkrmast, crazybon, driver_device, 0, ROT0, "bootleg (Crazy Co.)", "Crazy Bonus 2002", MACHINE_IMPERFECT_COLORS, layout_crazybon ) // Windows ME desktop... but not found the way to switch it.
+GAMEL( 1997, crazybon, 0, pkrmast, crazybon, driver_device, 0, ROT0, "bootleg (Crazy Co.)", "Crazy Bonus 2002", MACHINE_IMPERFECT_COLORS, layout_crazybon )
/* other possible stealth sets:
- cmv4a ---> see the 1fxx zone. put a bp in 1f9f to see the loop.
diff --git a/src/mame/drivers/goupil.cpp b/src/mame/drivers/goupil.cpp
deleted file mode 100644
index d1bdabb186d..00000000000
--- a/src/mame/drivers/goupil.cpp
+++ /dev/null
@@ -1,511 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Jean-François DEL NERO
-/***************************************************************************
-
- SMT Goupil G1 driver
-
- Current state :
-
- -> CPU / ROM / RAM working
- -> Video output working
- -> Keyboard support working (need to be polished... )
- -> Floppy FDC not fully implemented.
- -> Sound support missing.
-
- Software :
- -> The Monitor is working
- -> The internal Basic is working (-> 6800 0xC3 illegal opcode emulation needed).
-
- 02/04/2016
- Jean-François DEL NERO
-
-****************************************************************************/
-
-#include "emu.h"
-#include "cpu/m6800/m6800.h"
-#include "machine/6522via.h"
-#include "machine/i8279.h"
-#include "video/ef9364.h"
-#include "video/mc6845.h"
-#include "machine/6850acia.h"
-#include "machine/wd_fdc.h"
-
-#include "softlist.h"
-
-#define MAIN_CLOCK XTAL_4MHz
-#define VIDEO_CLOCK MAIN_CLOCK / 8 /* 1.75 Mhz */
-#define CPU_CLOCK MAIN_CLOCK / 4 /* 1 Mhz */
-
-class goupil_g1_state : public driver_device
-{
-public:
- goupil_g1_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag)
- , m_acia(*this, "ef6850")
- , m_ef9364(*this, "ef9364")
- , m_maincpu(*this, "maincpu")
- , m_via_video(*this, "m_via_video")
- , m_via_keyb(*this, "m_via_keyb")
- , m_via_modem(*this, "m_via_modem")
- , m_fdc(*this, "fd1791")
- , m_floppy0(*this, "fd1791:0")
- , m_floppy1(*this, "fd1791:1")
- , m_floppy(NULL)
- { }
-
- DECLARE_WRITE8_MEMBER(via_video_pba_w);
- DECLARE_WRITE8_MEMBER(via_video_pbb_w);
- DECLARE_WRITE_LINE_MEMBER(via_video_ca2_w);
-
- DECLARE_READ8_MEMBER(kbd1_r);
- DECLARE_READ8_MEMBER(kbd2_r);
- DECLARE_READ8_MEMBER(shift_kb1_r);
- DECLARE_READ8_MEMBER(shift_kb2_r);
- DECLARE_READ8_MEMBER(ctrl_kb1_r);
- DECLARE_READ8_MEMBER(ctrl_kb2_r);
-
- DECLARE_WRITE8_MEMBER(scanlines_kbd1_w);
- DECLARE_WRITE8_MEMBER(scanlines_kbd2_w);
-
- DECLARE_READ_LINE_MEMBER(via_keyb_ca2_r);
-
- virtual void machine_start() override;
- virtual void machine_reset() override;
-
- UINT8 m_row_kbd1;
- UINT8 m_row_kbd2;
- int old_state_ca2;
- UINT8 via_video_pbb_data;
- UINT8 cnttim;
- UINT8 valkeyb;
- TIMER_DEVICE_CALLBACK_MEMBER(goupil_scanline);
-
-private:
- required_device<acia6850_device> m_acia;
- required_device<ef9364_device> m_ef9364;
- required_device<cpu_device> m_maincpu;
- required_device<via6522_device> m_via_video;
- required_device<via6522_device> m_via_keyb;
- required_device<via6522_device> m_via_modem;
- required_device<fd1791_t> m_fdc;
- required_device<floppy_connector> m_floppy0;
- required_device<floppy_connector> m_floppy1;
- floppy_image_device *m_floppy;
-};
-
-/**********************************
-* Floppy controller I/O Handlers *
-***********************************/
-// TODO
-
-/**********************************
-* Keyboard I/O Handlers *
-***********************************/
-
-TIMER_DEVICE_CALLBACK_MEMBER( goupil_g1_state::goupil_scanline )
-{
- m_ef9364->update_scanline((UINT16)param);
-}
-
-static ADDRESS_MAP_START(goupil_mem, AS_PROGRAM, 8, goupil_g1_state)
- ADDRESS_MAP_UNMAP_HIGH
- AM_RANGE(0x0000,0x3fff) AM_RAM
- AM_RANGE(0x4000,0x7fff) AM_RAM
- AM_RANGE(0xC000,0xE3FF) AM_ROM AM_REGION("maincpu", 0x1000) // Basic ROM (BASIC 1 up to BASIC 9).
-
- AM_RANGE(0xe400,0xe7ff) AM_RAM
- AM_RANGE(0xE800,0xE80F) AM_DEVREADWRITE("ef6850", acia6850_device, data_r, data_w)
- AM_RANGE(0xE810,0xE81F) AM_DEVREADWRITE("m_via_video", via6522_device, read, write)
-
- AM_RANGE(0xE820,0xE820) AM_DEVREADWRITE("i8279_kb1", i8279_device, data_r, data_w )
- AM_RANGE(0xE821,0xE821) AM_DEVREADWRITE("i8279_kb1", i8279_device, status_r, cmd_w )
-
- AM_RANGE(0xE830,0xE830) AM_DEVREADWRITE("i8279_kb2", i8279_device, data_r, data_w )
- AM_RANGE(0xE831,0xE831) AM_DEVREADWRITE("i8279_kb2", i8279_device, status_r, cmd_w )
-
- AM_RANGE(0xE840,0xE84F) AM_DEVREADWRITE("m_via_keyb", via6522_device, read, write)
-
- AM_RANGE(0xE860,0xE86F) AM_DEVREADWRITE("m_via_modem", via6522_device, read, write)
-
- AM_RANGE(0xe8f0,0xe8ff) AM_DEVREADWRITE("fd1791", fd1791_t, read, write)
- //AM_RANGE(0xf08a,0xf08a) AM_READWRITE( fdc_sel0_r, fdc_sel0_w )
- //AM_RANGE(0xf08b,0xf08b) AM_READWRITE( fdc_sel1_r, fdc_sel1_w )
-
- AM_RANGE(0xf400,0xf7ff) AM_ROM AM_REGION("maincpu", 0x0800) // Modem (MOD 3)
- AM_RANGE(0xf800,0xffff) AM_ROM AM_REGION("maincpu", 0x0000) // Monitor (MON 1 + MON 2)
-ADDRESS_MAP_END
-
-static ADDRESS_MAP_START( goupil_io, AS_IO, 8, goupil_g1_state)
- ADDRESS_MAP_UNMAP_HIGH
-ADDRESS_MAP_END
-
-WRITE8_MEMBER( goupil_g1_state::scanlines_kbd1_w )
-{
- m_row_kbd1 = data;
-}
-
-READ8_MEMBER( goupil_g1_state::ctrl_kb1_r )
-{
- char kbdrow[6];
- unsigned char data;
-
- kbdrow[0] = 'C';
- kbdrow[1] = 'T';
- kbdrow[2] = 'R';
- kbdrow[3] = '0';
- kbdrow[4] = 0;
-
- data = ioport(kbdrow)->read();
- if( data & 0x02 )
- return 1;
- else
- return 0;
-}
-
-READ8_MEMBER( goupil_g1_state::ctrl_kb2_r )
-{
- return 1;
-}
-
-READ8_MEMBER( goupil_g1_state::shift_kb1_r )
-{
- char kbdrow[6];
- unsigned char data;
-
- kbdrow[0] = 'C';
- kbdrow[1] = 'T';
- kbdrow[2] = 'R';
- kbdrow[3] = '0';
- kbdrow[4] = 0;
-
- data = ioport(kbdrow)->read();
- if( data & 0x01 )
- return 1;
- else
- return 0;
-}
-
-READ8_MEMBER( goupil_g1_state::shift_kb2_r )
-{
- return 1;
-}
-
-READ8_MEMBER( goupil_g1_state::kbd1_r )
-{
- char kbdrow[6];
- UINT8 data = 0xff;
-
- kbdrow[0] = 'A';
- kbdrow[1] = 'X';
- kbdrow[2] = '0' + ( m_row_kbd1 & 7 ) ;
- kbdrow[3] = 0;
-
- data = ioport(kbdrow)->read();
-
- return data;
-}
-
-WRITE8_MEMBER( goupil_g1_state::scanlines_kbd2_w )
-{
- m_row_kbd2 = data & 7;
-}
-
-READ_LINE_MEMBER( goupil_g1_state::via_keyb_ca2_r )
-{
- return 0;
-}
-
-READ8_MEMBER( goupil_g1_state::kbd2_r )
-{
- char kbdrow[6];
- UINT8 data = 0xff;
-
- kbdrow[0] = 'B';
- kbdrow[1] = 'X';
- kbdrow[2] = '0' + ( m_row_kbd2 & 7 ) ;
- kbdrow[3] = 0;
-
- data = ioport(kbdrow)->read();
-
- return data;
-}
-
-/* Input ports */
-static INPUT_PORTS_START( goupil_g1 )
- PORT_START("AX0")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z')
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D')
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E')
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S')
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C')
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X')
- PORT_START("AX1")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R')
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G')
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T')
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F')
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B')
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V')
- PORT_START("AX2")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y')
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J')
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U')
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H')
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('?')
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N')
- PORT_START("AX3")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q')
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A')
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W')
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F2)
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F3)
- PORT_START("AX4")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I')
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L')
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O')
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K')
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR(':') PORT_CHAR('/')
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR('.')
- PORT_START("AX5")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TAB") PORT_CODE(KEYCODE_TAB) PORT_CHAR(UCHAR_MAMEKEY(TAB))
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Return") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("BS") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('_')
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
- PORT_START("AX6")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P')
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(0x00F9) PORT_CHAR('%')
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M')
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('+')
- PORT_START("AX7")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F1)
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
-
- PORT_START("CTR0")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT)
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2)
-
- PORT_START("BX0")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_START("BX1")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_START("BX2")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_START("BX3")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1')
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4')
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0')
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7')
- PORT_START("BX4")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_START("BX5")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_START("BX6")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3')
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6')
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9')
- PORT_START("BX7")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2')
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5')
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8')
-INPUT_PORTS_END
-
-static SLOT_INTERFACE_START( goupil_floppies )
- SLOT_INTERFACE( "525qd", FLOPPY_525_QD )
-SLOT_INTERFACE_END
-
-void goupil_g1_state::machine_start()
-{
- std::string region_tag;
-
- m_floppy = NULL;
- valkeyb = 0xFF;
-}
-
-void goupil_g1_state::machine_reset()
-{
-}
-
-WRITE8_MEMBER(goupil_g1_state::via_video_pba_w)
-{
- #ifdef DBGMODE
- printf("%s: write via_video_pba_w reg : 0x%X\n",machine().describe_context(),data);
- #endif
- m_ef9364->char_latch_w(data);
-}
-
-WRITE8_MEMBER(goupil_g1_state::via_video_pbb_w)
-{
- #ifdef DBGMODE
- printf("%s: write via_video_pbb_w reg : 0x%X\n",machine().describe_context(),data);
- #endif
- via_video_pbb_data = data;
-}
-
-WRITE_LINE_MEMBER( goupil_g1_state::via_video_ca2_w )
-{
- if(old_state_ca2==0 && state==1)
- {
- m_ef9364->command_w(via_video_pbb_data&0xF);
- }
- old_state_ca2 = state;
-}
-
-static MACHINE_CONFIG_START( goupil_g1, goupil_g1_state )
- /* basic machine hardware */
- MCFG_CPU_ADD("maincpu",M6808, CPU_CLOCK)
- MCFG_CPU_PROGRAM_MAP(goupil_mem)
- MCFG_CPU_IO_MAP(goupil_io)
-
- /* sound hardware */
- // TODO !
-
- MCFG_DEVICE_ADD ("ef6850", ACIA6850, 0)
-
- /* screen */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_UPDATE_DEVICE("ef9364", ef9364_device, screen_update)
-
- MCFG_SCREEN_SIZE((64*8), (16*(8+4)))
- MCFG_SCREEN_VISIBLE_AREA(0, (64*8)-1, 0, (16*(8+4))-1)
- MCFG_PALETTE_ADD("palette", 16)
-
- MCFG_DEVICE_ADD("ef9364", EF9364, VIDEO_CLOCK)
- MCFG_EF9364_PALETTE("palette")
- MCFG_EF9364_PAGES_CNT(1);
- MCFG_TIMER_DRIVER_ADD_SCANLINE("goupil_sl", goupil_g1_state, goupil_scanline, "screen", 0, 10)
-
- MCFG_DEVICE_ADD("m_via_video", VIA6522, 0)
- MCFG_VIA6522_WRITEPA_HANDLER(WRITE8(goupil_g1_state, via_video_pba_w))
- MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(goupil_g1_state, via_video_pbb_w))
- MCFG_VIA6522_CA2_HANDLER(WRITELINE(goupil_g1_state, via_video_ca2_w))
-
- MCFG_DEVICE_ADD("m_via_keyb", VIA6522, 0)
- MCFG_VIA6522_IRQ_HANDLER(DEVWRITELINE("maincpu", m6808_cpu_device, irq_line))
-
- MCFG_DEVICE_ADD("m_via_modem", VIA6522, 0)
- MCFG_VIA6522_IRQ_HANDLER(DEVWRITELINE("maincpu", m6808_cpu_device, irq_line))
-
- /* Floppy */
- MCFG_FD1791_ADD("fd1791", XTAL_8MHz )
- MCFG_FLOPPY_DRIVE_ADD("fd1791:0", goupil_floppies, "525qd", floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD("fd1791:1", goupil_floppies, "525qd", floppy_image_device::default_floppy_formats)
-
- MCFG_DEVICE_ADD("i8279_kb1", I8279, CPU_CLOCK)
- MCFG_I8279_OUT_SL_CB(WRITE8(goupil_g1_state, scanlines_kbd1_w)) // scan SL lines
- MCFG_I8279_IN_RL_CB(READ8(goupil_g1_state, kbd1_r)) // kbd RL lines
- MCFG_I8279_IN_SHIFT_CB(READ8(goupil_g1_state, shift_kb1_r))
- MCFG_I8279_IN_CTRL_CB(READ8(goupil_g1_state, ctrl_kb1_r))
- MCFG_I8279_OUT_IRQ_CB(DEVWRITELINE("m_via_keyb", via6522_device, write_ca1))
-
- MCFG_DEVICE_ADD("i8279_kb2", I8279, CPU_CLOCK)
- MCFG_I8279_OUT_SL_CB(WRITE8(goupil_g1_state, scanlines_kbd2_w)) // scan SL lines
- MCFG_I8279_IN_RL_CB(READ8(goupil_g1_state, kbd2_r)) // kbd RL lines
- MCFG_I8279_IN_SHIFT_CB(READ8(goupil_g1_state, shift_kb2_r))
- MCFG_I8279_IN_CTRL_CB(READ8(goupil_g1_state, ctrl_kb2_r))
-
-MACHINE_CONFIG_END
-
-/* ROM definition */
-ROM_START( goupilg1 )
- ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_DEFAULT_BIOS("v1_0")
-
- ROM_SYSTEM_BIOS(0, "v1_0", "Version 1.0")
- ROMX_LOAD( "SMT_Goupil_G1_MON_1.bin", 0x0000, 0x0400, CRC(98B7BE69) SHA1(69E83FE78A43FCF2B08FB0BCEFB0D217A57B1ECB), ROM_BIOS(1) )
- ROM_LOAD ( "SMT_Goupil_G1_MON_2.bin", 0x0400, 0x0400, CRC(19386B81) SHA1(E52F63FD29D374319781E9677DE6D3FD61A3684C) )
-
- ROM_LOAD( "SMT_Goupil_G1_MOD_3.bin", 0x0800, 0x0400, CRC(E662F152) SHA1(11B91C5737E7572A2C18472B66BBD16B485132D5) )
-
- ROMX_LOAD( "SMT_Goupil_G1_Basic_1.bin", 0x1000, 0x0400, CRC(AD105B12) SHA1(631CD4B997F76B57BF2509E4BFF30B1595C8BD13), ROM_BIOS(1) )
- ROMX_LOAD( "SMT_Goupil_G1_Basic_2.bin", 0x1400, 0x0400, CRC(0C5C309C) SHA1(F1CAB4B0F9191E53113790A95F1AB7108F9406A1), ROM_BIOS(1) )
- ROMX_LOAD( "SMT_Goupil_G1_Basic_3.bin", 0x1800, 0x0400, CRC(1F1EB127) SHA1(DBBB880C79D515ACBFCB2BE9A4C96962F3E4EDEA), ROM_BIOS(1) )
- ROMX_LOAD( "SMT_Goupil_G1_Basic_4.bin", 0x1C00, 0x0400, CRC(09BE48E4) SHA1(86CAE0D159583C1D572A5754F3BB6B4A2E479359), ROM_BIOS(1) )
- ROMX_LOAD( "SMT_Goupil_G1_Basic_5.bin", 0x2000, 0x0400, CRC(BDEB395C) SHA1(32A50468F1CA772EE45A1F5C61C66F3ECC774074), ROM_BIOS(1) )
- ROMX_LOAD( "SMT_Goupil_G1_Basic_6.bin", 0x2400, 0x0400, CRC(850A4000) SHA1(720F0BB3E45877835219B7E1D943EF4F19B9977D), ROM_BIOS(1) )
- ROMX_LOAD( "SMT_Goupil_G1_Basic_7.bin", 0x2800, 0x0400, CRC(586C7670) SHA1(13E2E96B9F1A53555CE0D55F657CF3C6B96F10A0), ROM_BIOS(1) )
- ROMX_LOAD( "SMT_Goupil_G1_Basic_8.bin", 0x2C00, 0x0400, CRC(33281300) SHA1(CE631FA8157A3F8869C5FEFE24B7F40E06696DF9), ROM_BIOS(1) )
- ROMX_LOAD( "SMT_Goupil_G1_Basic_9.bin", 0x3000, 0x0400, CRC(A3911201) SHA1(8623A0A2D83EB3A27A795030643C5C05A4350A9F), ROM_BIOS(1) )
-
- ROM_REGION( 0x400, "ef9364", 0 )
- ROM_LOAD( "SMT_Goupil_G1_Charset.bin", 0x0000, 0x0400, CRC(8B6DA54B) SHA1(AC2204600F45C6DD0DF1E759B62ED25928F02A12) )
-ROM_END
-
-/* Driver */
-
-/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */
-COMP( 1979, goupilg1, 0, 0, goupil_g1, goupil_g1,driver_device, 0, "SMT", "Goupil G1", MACHINE_IS_SKELETON )
diff --git a/src/mame/drivers/gticlub.cpp b/src/mame/drivers/gticlub.cpp
index e9cbb5e37a5..b751e7fc029 100644
--- a/src/mame/drivers/gticlub.cpp
+++ b/src/mame/drivers/gticlub.cpp
@@ -910,21 +910,21 @@ UINT32 gticlub_state::screen_update_hangplt(screen_device &screen, bitmap_rgb32
if (strcmp(screen.tag(), ":lscreen") == 0)
{
- voodoo_device *voodoo = (voodoo_device*)machine().device("voodoo0");
+ device_t *voodoo = machine().device("voodoo0");
// m_k001604_1->draw_back_layer(bitmap, cliprect);
- voodoo->voodoo_update(bitmap, cliprect);
+ voodoo_update(voodoo, bitmap, cliprect);
m_k001604_1->draw_front_layer(screen, bitmap, cliprect);
}
else if (strcmp(screen.tag(), ":rscreen") == 0)
{
- voodoo_device *voodoo = (voodoo_device*)machine().device("voodoo1");
+ device_t *voodoo = machine().device("voodoo1");
// m_k001604_2->draw_back_layer(bitmap, cliprect);
- voodoo->voodoo_update(bitmap, cliprect);
+ voodoo_update(voodoo, bitmap, cliprect);
m_k001604_2->draw_front_layer(screen, bitmap, cliprect);
}
diff --git a/src/mame/drivers/harddriv.cpp b/src/mame/drivers/harddriv.cpp
index e5eb4267425..e6b881a60f4 100644
--- a/src/mame/drivers/harddriv.cpp
+++ b/src/mame/drivers/harddriv.cpp
@@ -1425,7 +1425,7 @@ static MACHINE_CONFIG_FRAGMENT( driver_nomsp )
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", harddriv_state, video_int_gen)
MCFG_CPU_PERIODIC_INT_DRIVER(harddriv_state, hd68k_irq_gen, (double)HARDDRIV_MASTER_CLOCK/16/16/16/16/2)
- MCFG_SLAPSTIC_ADD("slapstic", 117)
+ MCFG_SLAPSTIC_ADD("slapstic")
MCFG_SLAPSTIC_68K_ACCESS(1)
MCFG_CPU_ADD("gsp", TMS34010, HARDDRIV_GSP_CLOCK)
@@ -1472,7 +1472,6 @@ static MACHINE_CONFIG_FRAGMENT( driver_msp )
MCFG_TMS340X0_OUTPUT_INT_CB(WRITELINE(harddriv_state, hdmsp_irq_gen))
MCFG_VIDEO_SET_SCREEN("screen")
- MCFG_DEVICE_REMOVE("slapstic")
MACHINE_CONFIG_END
@@ -1511,7 +1510,6 @@ static MACHINE_CONFIG_FRAGMENT( multisync_msp )
MCFG_TMS340X0_OUTPUT_INT_CB(WRITELINE(harddriv_state, hdmsp_irq_gen))
MCFG_VIDEO_SET_SCREEN("screen")
- MCFG_DEVICE_REMOVE("slapstic")
MACHINE_CONFIG_END
@@ -1526,8 +1524,6 @@ static MACHINE_CONFIG_FRAGMENT( multisync2 )
MCFG_CPU_MODIFY("gsp")
MCFG_CPU_PROGRAM_MAP(multisync2_gsp_map)
-
- MCFG_DEVICE_REMOVE("slapstic")
MACHINE_CONFIG_END
@@ -1686,7 +1682,6 @@ static MACHINE_CONFIG_FRAGMENT( stunrun )
MCFG_CPU_MODIFY("gsp")
MCFG_TMS340X0_PIXEL_CLOCK(5000000) /* pixel clock */
MCFG_FRAGMENT_ADD( adsp ) /* ADSP board */
- MCFG_DEVICE_REMOVE("slapstic")
/* video hardware */
MCFG_SCREEN_MODIFY("screen")
@@ -2023,10 +2018,6 @@ static MACHINE_CONFIG_START( racedriv_panorama_machine, harddriv_new_state )
MCFG_DEVICE_MODIFY("mainpcb:duartn68681")
MCFG_MC68681_A_TX_CALLBACK(DEVWRITELINE(DEVICE_SELF_OWNER, harddriv_new_state,tx_a))
- // boots with 'PROGRAM OK' when using standard Hard Drivin' board type (needs 137412-115 slapstic)
- MCFG_DEVICE_MODIFY("mainpcb:slapstic")
- MCFG_SLAPSTIC_NUM(115)
-
MCFG_TIMER_DRIVER_ADD_PERIODIC("hack_timer", harddriv_new_state, hack_timer, attotime::from_hz(60))
// MCFG_QUANTUM_TIME(attotime::from_hz(60000))
MACHINE_CONFIG_END
@@ -4079,6 +4070,7 @@ Filename Location Label Board
ROM_START( racedrivpan )
ROM_REGION( 0x200000, "mainpcb:maincpu", 0 ) /* 2MB for 68000 code */
// Multisync PBB A045988 - Central Monitor
+ // boots with 'PROGRAM OK' when using standard Hard Drivin' board type (needs 137412-115 slapstic)
ROM_LOAD16_BYTE( "088-1002.bin", 0x000000, 0x010000, CRC(49a97391) SHA1(dbe4086cd87669a02d2a2133d0d9e2895946b383) )
ROM_LOAD16_BYTE( "088-1001.bin", 0x000001, 0x010000, CRC(4473accc) SHA1(099bda6cfe31d4e53cbe74046679ddf8b874982d) )
ROM_LOAD16_BYTE( "088-1004.bin", 0x020000, 0x010000, CRC(33b84ca6) SHA1(9e3cafadfb23bfc4a44e503043cc05db27d939a9) )
@@ -4660,7 +4652,7 @@ void harddriv_state::init_multisync(int compact_inputs)
m_gsp_multisync = TRUE;
// if we have a JSA board, install the read/write handlers
- if (m_jsa.found())
+ if (m_jsa != nullptr)
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x600000, 0x603fff, read8_delegate(FUNC(atari_jsa_base_device::main_response_r),m_jsa.target()), write8_delegate(FUNC(atari_jsa_base_device::main_command_w),m_jsa.target()), 0xff00);
/* install handlers for the compact driving games' inputs */
@@ -4944,7 +4936,7 @@ void harddriv_state::init_racedriv(void)
init_driver_sound();
/* set up the slapstic */
- m_slapstic_device->slapstic_init();
+ m_slapstic_device->slapstic_init(machine(), 117);
m_m68k_slapstic_base = m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xe0000, 0xfffff, read16_delegate(FUNC(harddriv_state::rd68k_slapstic_r), this), write16_delegate(FUNC(harddriv_state::rd68k_slapstic_w), this));
/* synchronization */
@@ -4965,7 +4957,7 @@ void harddriv_state::racedrivc_init_common(offs_t gsp_protection)
init_driver_sound();
/* set up the slapstic */
- m_slapstic_device->slapstic_init();
+ m_slapstic_device->slapstic_init(machine(), 117);
m_m68k_slapstic_base = m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xe0000, 0xfffff, read16_delegate(FUNC(harddriv_state::rd68k_slapstic_r), this), write16_delegate(FUNC(harddriv_state::rd68k_slapstic_w), this));
/* synchronization */
@@ -4995,7 +4987,7 @@ void harddriv_state::init_racedrivc_panorama_side()
init_adsp();
/* set up the slapstic */
- m_slapstic_device->slapstic_init();
+ m_slapstic_device->slapstic_init(machine(), 117);
m_m68k_slapstic_base = m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xe0000, 0xfffff, read16_delegate(FUNC(harddriv_state::rd68k_slapstic_r), this), write16_delegate(FUNC(harddriv_state::rd68k_slapstic_w), this));
/* set up protection hacks */
@@ -5087,7 +5079,7 @@ void harddriv_state::init_strtdriv(void)
init_dsk();
/* set up the slapstic */
- m_slapstic_device->slapstic_init();
+ m_slapstic_device->slapstic_init(machine(), 117);
m_m68k_slapstic_base = m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xe0000, 0xfffff, read16_delegate(FUNC(harddriv_state::rd68k_slapstic_r), this), write16_delegate(FUNC(harddriv_state::rd68k_slapstic_w), this));
m_maincpu->space(AS_PROGRAM).install_read_handler(0xa80000, 0xafffff, read16_delegate(FUNC(harddriv_state::hda68k_port1_r), this));
diff --git a/src/mame/drivers/hh_cop400.cpp b/src/mame/drivers/hh_cop400.cpp
index 4b5046bde85..486f6882b28 100644
--- a/src/mame/drivers/hh_cop400.cpp
+++ b/src/mame/drivers/hh_cop400.cpp
@@ -66,7 +66,7 @@ public:
TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick);
void display_update();
void set_display_size(int maxx, int maxy);
- void display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety, bool update = true);
+ void display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety);
protected:
virtual void machine_start() override;
@@ -194,7 +194,7 @@ void hh_cop400_state::set_display_size(int maxx, int maxy)
m_display_maxy = maxy;
}
-void hh_cop400_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety, bool update)
+void hh_cop400_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety)
{
set_display_size(maxx, maxy);
@@ -203,13 +203,10 @@ void hh_cop400_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 set
for (int y = 0; y < maxy; y++)
m_display_state[y] = (sety >> y & 1) ? ((setx & mask) | (1 << maxx)) : 0;
- if (update)
- display_update();
+ display_update();
}
-// generic input handlers
-
UINT8 hh_cop400_state::read_inputs(int columns)
{
// active low
@@ -235,7 +232,7 @@ UINT8 hh_cop400_state::read_inputs(int columns)
Castle Toy Einstein
* COP421 MCU labeled ~/927 COP421-NEZ/N
- * 4 lamps, 1-bit sound
+ * 4 lamps, 1bit sound
***************************************************************************/
@@ -280,7 +277,7 @@ MACHINE_CONFIG_END
Entex Space Invader
* COP444L MCU labeled /B138 COPL444-HRZ/N INV II (die labeled HRZ COP 444L/A)
- * 3 7seg LEDs, LED matrix and overlay mask, 1-bit sound
+ * 3 7seg LEDs, LED matrix and overlay mask, 1bit sound
The first version was on TMS1100 (see hh_tms1k.c), this is the reprogrammed
second release with a gray case instead of black.
@@ -396,7 +393,7 @@ MACHINE_CONFIG_END
Mattel Funtronics Jacks
* COP410L MCU bonded directly to PCB (die labeled COP410L/B NGS)
- * 8 LEDs, 1-bit sound
+ * 8 LEDs, 1bit sound
***************************************************************************/
@@ -503,7 +500,7 @@ MACHINE_CONFIG_END
Mattel Funtronics Red Light Green Light
* COP410L MCU bonded directly to PCB (die labeled COP410L/B NHZ)
- * 14 LEDs, 1-bit sound
+ * 14 LEDs, 1bit sound
known releases:
- USA: Funtronics Red Light Green Light
@@ -598,7 +595,7 @@ MACHINE_CONFIG_END
Milton Bradley Plus One
* COP410L MCU in 8-pin DIP, labeled ~/029 MM 57405 (die labeled COP410L/B NNE)
- * 4 sensors(1 on each die side), 1-bit sound
+ * 4 sensors(1 on each die side), 1bit sound
***************************************************************************/
@@ -642,7 +639,7 @@ MACHINE_CONFIG_END
Milton Bradley (Electronic) Lightfight
* COP421L MCU labeled /B119 COP421L-HLA/N
- * LED matrix, 1-bit sound
+ * LED matrix, 1bit sound
Xbox-shaped electronic game for 2 or more players, with long diagonal buttons
next to each outer LED. The main object of the game is to pinpoint a light
@@ -827,4 +824,4 @@ CONS( 1979, funjacks, 0, 0, funjacks, funjacks, driver_device, 0, "Mat
CONS( 1979, funrlgl, 0, 0, funrlgl, funrlgl, driver_device, 0, "Mattel", "Funtronics Red Light Green Light", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
CONS( 1980, plus1, 0, 0, plus1, plus1, driver_device, 0, "Milton Bradley", "Plus One", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
-CONS( 1981, lightfgt, 0, 0, lightfgt, lightfgt, driver_device, 0, "Milton Bradley", "Lightfight", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
+CONS( 1981, lightfgt, 0, 0, lightfgt, lightfgt, driver_device, 0, "Milton Bradley", "Lightfight", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/hh_hmcs40.cpp b/src/mame/drivers/hh_hmcs40.cpp
index 36bfd7a52ab..b511780824a 100644
--- a/src/mame/drivers/hh_hmcs40.cpp
+++ b/src/mame/drivers/hh_hmcs40.cpp
@@ -138,7 +138,7 @@ public:
TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick);
void display_update();
void set_display_size(int maxx, int maxy);
- void display_matrix(int maxx, int maxy, UINT64 setx, UINT32 sety, bool update = true);
+ void display_matrix(int maxx, int maxy, UINT64 setx, UINT32 sety);
protected:
virtual void machine_start() override;
@@ -267,7 +267,7 @@ void hh_hmcs40_state::set_display_size(int maxx, int maxy)
m_display_maxy = maxy;
}
-void hh_hmcs40_state::display_matrix(int maxx, int maxy, UINT64 setx, UINT32 sety, bool update)
+void hh_hmcs40_state::display_matrix(int maxx, int maxy, UINT64 setx, UINT32 sety)
{
set_display_size(maxx, maxy);
@@ -276,13 +276,10 @@ void hh_hmcs40_state::display_matrix(int maxx, int maxy, UINT64 setx, UINT32 set
for (int y = 0; y < maxy; y++)
m_display_state[y] = (sety >> y & 1) ? ((setx & mask) | (U64(1) << maxx)) : 0;
- if (update)
- display_update();
+ display_update();
}
-// generic input handlers
-
UINT16 hh_hmcs40_state::read_inputs(int columns)
{
UINT16 ret = 0;
diff --git a/src/mame/drivers/hh_melps4.cpp b/src/mame/drivers/hh_melps4.cpp
index c16715427be..541352078d7 100644
--- a/src/mame/drivers/hh_melps4.cpp
+++ b/src/mame/drivers/hh_melps4.cpp
@@ -54,7 +54,7 @@ public:
TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick);
void display_update();
void set_display_size(int maxx, int maxy);
- void display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety, bool update = true);
+ void display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety);
protected:
virtual void machine_start() override;
@@ -176,7 +176,7 @@ void hh_melps4_state::set_display_size(int maxx, int maxy)
m_display_maxy = maxy;
}
-void hh_melps4_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety, bool update)
+void hh_melps4_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety)
{
set_display_size(maxx, maxy);
@@ -185,8 +185,7 @@ void hh_melps4_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 set
for (int y = 0; y < maxy; y++)
m_display_state[y] = (sety >> y & 1) ? ((setx & mask) | (1 << maxx)) : 0;
- if (update)
- display_update();
+ display_update();
}
diff --git a/src/mame/drivers/hh_pic16.cpp b/src/mame/drivers/hh_pic16.cpp
index 50bcd9c9e91..bb65a69265e 100644
--- a/src/mame/drivers/hh_pic16.cpp
+++ b/src/mame/drivers/hh_pic16.cpp
@@ -66,7 +66,7 @@ public:
TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick);
void display_update();
void set_display_size(int maxx, int maxy);
- void display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety, bool update = true);
+ void display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety);
protected:
virtual void machine_start() override;
@@ -186,7 +186,7 @@ void hh_pic16_state::set_display_size(int maxx, int maxy)
m_display_maxy = maxy;
}
-void hh_pic16_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety, bool update)
+void hh_pic16_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety)
{
set_display_size(maxx, maxy);
@@ -195,8 +195,7 @@ void hh_pic16_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety
for (int y = 0; y < maxy; y++)
m_display_state[y] = (sety >> y & 1) ? ((setx & mask) | (1 << maxx)) : 0;
- if (update)
- display_update();
+ display_update();
}
diff --git a/src/mame/drivers/hh_tms1k.cpp b/src/mame/drivers/hh_tms1k.cpp
index 87c4e51a772..9670ab8be9f 100644
--- a/src/mame/drivers/hh_tms1k.cpp
+++ b/src/mame/drivers/hh_tms1k.cpp
@@ -14,19 +14,15 @@
@CP0904A TMS0970 1977, Milton Bradley Comp IV
@MP0905B TMS0970 1977, Parker Brothers Codename Sector
*MP0057 TMS1000 1978, APH Student Speech+ (same ROM contents as TSI Speech+?)
- *MP0158 TMS1000 1979, Entex Soccer
*MP0168 TMS1000? 1979, Conic Basketball
- *MP0170 TMS1000? 1979, E.R.S. Football
@MP0914 TMS1000 1979, Entex Baseball 1
@MP0923 TMS1000 1979, Entex Baseball 2
@MP1030 TMS1100 1980, APF Mathemagician
@MP1133 TMS1470 1979, Kosmos Astro
@MP1180 TMS1100 1980, Tomy Power House Pinball
- @MP1181 TMS1100 1979, Conic Football 2
@MP1204 TMS1100 1980, Entex Baseball 3 (6007)
@MP1211 TMS1100 1980, Entex Space Invader
@MP1218 TMS1100 1980, Entex Basketball 2 (6010)
- *MP1219 TMS1100 1980, U.S. Games Super Sports 4
@MP1221 TMS1100 1980, Entex Raise The Devil
*MP1296 TMS1100? 1982, Entex Black Knight
*MP1312 TMS1100 198?, Tandy/RadioShack Science Fair Microcomputer Trainer
@@ -47,8 +43,7 @@
MP3403 TMS1100 1978, Marx Electronic Bowling -> elecbowl.cpp
@MP3404 TMS1100 1978, Parker Brothers Merlin
@MP3405 TMS1100 1979, Coleco Amaze-A-Tron
- @MP3415 TMS1100 1978, Coleco Electronic Quarterback
- @MP3435 TMS1100 1979, Coleco Zodiac
+ *MP3415 TMS1100 1978, Coleco Electronic Quarterback
@MP3438A TMS1100 1979, Kenner Star Wars Electronic Battle Command
MP3450A TMS1100 1979, MicroVision cartridge: Blockbuster
MP3454 TMS1100 1979, MicroVision cartridge: Star Trek Phaser Strike
@@ -64,9 +59,7 @@
MP3496 TMS1100 1980, MicroVision cartridge: Sea Duel
M34009 TMS1100 1981, MicroVision cartridge: Alien Raiders (note: MP3498, MP3499, M3400x..)
@M34012 TMS1100 1980, Mattel Dungeons & Dragons - Computer Labyrinth Game
- *M34014 TMS1100 1981, Coleco Bowlatronic
M34017 TMS1100 1981, MicroVision cartridge: Cosmic Hunter
- @M34038 TMS1100 1982, Parker Brothers Lost Treasure
M34047 TMS1100 1982, MicroVision cartridge: Super Blockbuster
*M34078A TMS1100 1983, Milton Bradley Arcade Mania
@MP6100A TMS0980 1979, Ideal Electronic Detective
@@ -75,7 +68,7 @@
*MP7303 TMS1400? 19??, Tiger 7-in-1 Sports Stadium
@MP7313 TMS1400 1980, Parker Brothers Bank Shot
@MP7314 TMS1400 1980, Parker Brothers Split Second
- MP7324 TMS1400 1985, Tiger K28/Coleco Talking Teacher -> tispeak.cpp
+ *MP7324 TMS1400? 1985, Coleco Talking Teacher
MP7332 TMS1400 1981, Milton Bradley Dark Tower -> mbdtower.cpp
@MP7334 TMS1400 1981, Coleco Total Control 4
@MP7351 TMS1400CR 1982, Parker Brothers Master Merlin
@@ -114,10 +107,8 @@
#include "astro.lh"
#include "bankshot.lh"
#include "bigtrak.lh"
-#include "cnfball2.lh"
#include "cnsector.lh"
#include "comp4.lh"
-#include "cqback.lh"
#include "ebball.lh"
#include "ebball2.lh"
#include "ebball3.lh"
@@ -129,7 +120,6 @@
#include "gpoker.lh"
#include "h2hbaseb.lh"
#include "h2hfootb.lh"
-#include "lostreas.lh"
#include "mathmagi.lh"
#include "merlin.lh" // clickable
#include "mmerlin.lh" // clickable
@@ -141,7 +131,6 @@
#include "tandy12.lh" // clickable
#include "tbreakup.lh"
#include "tc4.lh"
-#include "zodiac.lh"
#include "hh_tms1k_test.lh" // common test-layout - use external artwork
@@ -276,18 +265,7 @@ void hh_tms1k_state::set_display_size(int maxx, int maxy)
m_display_maxy = maxy;
}
-void hh_tms1k_state::set_display_segmask(UINT32 digits, UINT32 mask)
-{
- // set a segment mask per selected digit, but leave unselected ones alone
- for (int i = 0; i < 0x20; i++)
- {
- if (digits & 1)
- m_display_segmask[i] = mask;
- digits >>= 1;
- }
-}
-
-void hh_tms1k_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety, bool update)
+void hh_tms1k_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety)
{
set_display_size(maxx, maxy);
@@ -296,12 +274,18 @@ void hh_tms1k_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety
for (int y = 0; y < maxy; y++)
m_display_state[y] = (sety >> y & 1) ? ((setx & mask) | (1 << maxx)) : 0;
- if (update)
- display_update();
+ display_update();
}
+void hh_tms1k_state::display_matrix_seg(int maxx, int maxy, UINT32 setx, UINT32 sety, UINT16 segmask)
+{
+ // expects m_display_segmask to be not-0
+ for (int y = 0; y < maxy; y++)
+ m_display_segmask[y] &= segmask;
+
+ display_matrix(maxx, maxy, setx, sety);
+}
-// generic input handlers
UINT8 hh_tms1k_state::read_inputs(int columns)
{
@@ -315,19 +299,6 @@ UINT8 hh_tms1k_state::read_inputs(int columns)
return ret;
}
-UINT8 hh_tms1k_state::read_rotated_inputs(int columns, UINT8 rowmask)
-{
- UINT8 ret = 0;
- UINT16 colmask = (1 << columns) - 1;
-
- // read selected input columns
- for (int i = 0; i < 8; i++)
- if (1 << i & rowmask && m_inp_matrix[i]->read() & m_inp_mux & colmask)
- ret |= 1 << i;
-
- return ret;
-}
-
// devices with a TMS0980 can auto power-off
@@ -357,7 +328,7 @@ INPUT_CHANGED_MEMBER(hh_tms1k_state::power_button)
/***************************************************************************
APF Mathemagician
- * TMS1100 MCU, labeled MP1030 (no decap)
+ * TMS1100 MCU, labeled MP1030
* 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
@@ -394,8 +365,21 @@ public:
void mathmagi_state::prepare_display()
{
- set_display_segmask(0xff, 0x7f);
- display_matrix(7, 11, m_o, m_r);
+ // R0-R7: 7seg leds
+ for (int y = 0; y < 8; y++)
+ {
+ m_display_segmask[y] = 0x7f;
+ m_display_state[y] = (m_r >> y & 1) ? (m_o >> 1) : 0;
+ }
+
+ // R8: custom math symbols digit
+ // R9: custom equals digit
+ // R10: misc lamps
+ for (int y = 8; y < 11; y++)
+ m_display_state[y] = (m_r >> y & 1) ? m_o : 0;
+
+ set_display_size(8, 11);
+ display_update();
}
WRITE16_MEMBER(mathmagi_state::write_r)
@@ -403,20 +387,17 @@ WRITE16_MEMBER(mathmagi_state::write_r)
// R3,R5-R7,R9,R10: input mux
m_inp_mux = (data >> 3 & 1) | (data >> 4 & 0xe) | (data >> 5 & 0x30);
- // R0-R7: 7seg leds
- // R8: custom math symbols digit
- // R9: custom equals digit
- // R10: misc lamps
+ // +others:
m_r = data;
prepare_display();
}
WRITE16_MEMBER(mathmagi_state::write_o)
{
- // O1-O7: led/digit segment data
+ // O1-O7: digit segments A-G
// O0: N/C
+ data = (data << 1 & 0xfe) | (data >> 7 & 1); // because opla is unknown
m_o = data;
- prepare_display();
}
READ8_MEMBER(mathmagi_state::read_k)
@@ -476,7 +457,7 @@ static INPUT_PORTS_START( mathmagi )
INPUT_PORTS_END
-// output PLA is not decapped
+// output PLA is not dumped
static const UINT16 mathmagi_output_pla[0x20] =
{
lA+lB+lC+lD+lE+lF, // 0
@@ -516,7 +497,7 @@ static const UINT16 mathmagi_output_pla[0x20] =
static MACHINE_CONFIG_START( mathmagi, mathmagi_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", TMS1100, 175000) // approximation - RC osc. R=68K, C=82pf
+ MCFG_CPU_ADD("maincpu", TMS1100, 175000) // RC osc. R=68K, C=82pf -> ~175kHz
MCFG_TMS1XXX_OUTPUT_PLA(mathmagi_output_pla)
MCFG_TMS1XXX_READ_K_CB(READ8(mathmagi_state, read_k))
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(mathmagi_state, write_r))
@@ -536,7 +517,7 @@ MACHINE_CONFIG_END
Coleco Amaze-A-Tron, by Ralph Baer
* TMS1100 MCU, labeled MP3405(die label too)
- * 2-digit 7seg LED display + 2 LEDs(one red, one green), 1-bit sound
+ * 2-digit 7seg LED display + 2 LEDs(one red, one green), 1bit sound
* 5x5 pressure-sensitive playing board
This is an electronic board game with a selection of 8 maze games,
@@ -655,7 +636,7 @@ INPUT_PORTS_END
static MACHINE_CONFIG_START( amaztron, amaztron_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", TMS1100, 350000) // approximation - RC osc. R=33K?, C=100pf
+ MCFG_CPU_ADD("maincpu", TMS1100, 350000) // RC osc. R=33K?, C=100pf -> ~350kHz
MCFG_TMS1XXX_READ_K_CB(READ8(amaztron_state, read_k))
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(amaztron_state, write_r))
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(amaztron_state, write_o))
@@ -675,19 +656,21 @@ MACHINE_CONFIG_END
/***************************************************************************
- Coleco Zodiac - The Astrology Computer
- * TMS1100 MP3435 (no decap)
- * 8-digit 7seg display, 12 other LEDs, 1-bit sound
-
- As the name suggests, this is an astrologic calculator. Refer to the
- (very extensive) manual on how to use it.
+ Coleco Head to Head Baseball
+ * PCB labels Coleco rev C 73891/2
+ * TMS1170NLN MP1525-N2 (die labeled MP1525)
+ * 9-digit cyan VFD display, and other LEDs behind bezel, 1bit sound
+
+ known releases:
+ - USA: Head to Head Baseball
+ - Japan: Computer Baseball, published by Tsukuda
***************************************************************************/
-class zodiac_state : public hh_tms1k_state
+class h2hbaseb_state : public hh_tms1k_state
{
public:
- zodiac_state(const machine_config &mconfig, device_type type, const char *tag)
+ h2hbaseb_state(const machine_config &mconfig, device_type type, const char *tag)
: hh_tms1k_state(mconfig, type, tag)
{ }
@@ -695,245 +678,111 @@ public:
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
+
+ void set_clock();
+ DECLARE_INPUT_CHANGED_MEMBER(skill_switch);
+
+protected:
+ virtual void machine_reset() override;
};
// handlers
-void zodiac_state::prepare_display()
+void h2hbaseb_state::prepare_display()
{
- set_display_segmask(0xff, 0x7f);
- display_matrix(8, 10, m_o, m_r);
+ memset(m_display_segmask, ~0, sizeof(m_display_segmask));
+ display_matrix_seg(9, 9, (m_r & 0x100) | m_o, (m_r & 0xff) | (m_r >> 1 & 0x100), 0x7f);
}
-WRITE16_MEMBER(zodiac_state::write_r)
+WRITE16_MEMBER(h2hbaseb_state::write_r)
{
// R10: speaker out
m_speaker->level_w(data >> 10 & 1);
- // R0-R4,R8: input mux
- m_inp_mux = (data & 0x1f) | (data >> 3 & 0x20);
+ // R4-R7: input mux
+ m_inp_mux = data >> 4 & 0xf;
- // R0-R7: digit select
- // R8,R9: led select
- m_r = data & 0x3ff;
+ // R0-R7,R9: select vfd digit/led
+ // R8: led state
+ m_r = data;
prepare_display();
}
-WRITE16_MEMBER(zodiac_state::write_o)
+WRITE16_MEMBER(h2hbaseb_state::write_o)
{
- // O0-O7: digit segment/led data
+ // O0-O6: digit segments A-G
+ // O7: N/C
m_o = data;
prepare_display();
}
-READ8_MEMBER(zodiac_state::read_k)
+READ8_MEMBER(h2hbaseb_state::read_k)
{
- // K: multiplexed inputs
- return read_inputs(6);
+ // K: multiplexed inputs (note: K8(Vss row) is always on)
+ return m_inp_matrix[4]->read() | read_inputs(4);
}
// config
-static INPUT_PORTS_START( zodiac )
- PORT_START("IN.0") // R0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("3")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("2")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("1")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("0")
-
- PORT_START("IN.1") // R1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("7")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("6")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("5")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("4")
-
- PORT_START("IN.2") // R2
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_D) PORT_NAME("D")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_A) PORT_NAME("A")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("9")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("8")
-
- PORT_START("IN.3") // R3
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_P) PORT_NAME("P")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_L) PORT_NAME("L")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_J) PORT_NAME("J")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_E) PORT_NAME("E")
+static INPUT_PORTS_START( h2hbaseb )
+ PORT_START("IN.0") // R4
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("N")
+ PORT_BIT( 0x0b, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_START("IN.4") // R4
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("Enter")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_DEL) PORT_NAME("Clear")
+ PORT_START("IN.1") // R5
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("B")
+ PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_START("IN.5") // R8
- PORT_CONFNAME( 0x03, 0x01, "Mode")
- PORT_CONFSETTING( 0x01, "H" ) // Horoscope
- PORT_CONFSETTING( 0x02, "P" ) // Preview
- PORT_CONFSETTING( 0x00, "A" ) // Answer
+ PORT_START("IN.2") // R6
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("S")
PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED )
-INPUT_PORTS_END
+ PORT_START("IN.3") // R7
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_NAME("Curve") // these two buttons appear twice on the board
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("Fast Pitch")
+ PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED )
-// output PLA is not decapped
-static const UINT16 zodiac_output_pla[0x20] =
-{
- 0x80, // empty/led 1/7
- lC, // i/led 2/8
- lE+lG, // r/led 3/9
- lC+lE+lG, // n
- lF, // seg F/led 4/10
- 0, // ?
- 0, // ?
- lC+lE+lF+lG, // h
- lB, // seg B/led 5/11
- lD, // seg D/led 6/12
- 0, // ?
- 0, // ?
- 0, // ?
- 0, // ?
- lA+lB+lE+lF+lG, // P
- 0, // ?
- lA+lB+lC+lD+lE+lF, // 0
- lB+lC, // 1
- lA+lB+lD+lE+lG, // 2
- lA+lB+lC+lD+lG, // 3
- lB+lC+lF+lG, // 4
- lA+lC+lD+lF+lG, // 5
- lA+lC+lD+lE+lF+lG, // 6
- lA+lB+lC, // 7
- lA+lB+lC+lD+lE+lF+lG, // 8
- lA+lB+lC+lD+lF+lG, // 9
- lA+lB+lC+lE+lF+lG, // A
- lB+lC+lD+lE+lG, // d
- lA+lD+lE+lF+lG, // E
- lB+lC+lD+lE, // J
- lD+lE+lF, // L
- lB+lC+lD+lE+lF // U
-};
-
-static MACHINE_CONFIG_START( zodiac, zodiac_state )
-
- /* basic machine hardware */
- MCFG_CPU_ADD("maincpu", TMS1100, 500000) // approximation - RC osc. R=18K, C=100pf
- MCFG_TMS1XXX_OUTPUT_PLA(zodiac_output_pla)
- MCFG_TMS1XXX_READ_K_CB(READ8(zodiac_state, read_k))
- MCFG_TMS1XXX_WRITE_R_CB(WRITE16(zodiac_state, write_r))
- MCFG_TMS1XXX_WRITE_O_CB(WRITE16(zodiac_state, write_o))
-
- MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_zodiac)
-
- /* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
-MACHINE_CONFIG_END
-
-
-
-
-
-/***************************************************************************
-
- Coleco Electronic Quarterback
- * TMS1100NLL MP3415 (die labeled MP3415)
- * 9-digit LED grid, 1-bit sound
-
- known releases:
- - USA(1): Electronic Quarterback
- - USA(2): Electronic Touchdown, distributed by Sears
-
-***************************************************************************/
-
-class cqback_state : public hh_tms1k_state
-{
-public:
- cqback_state(const machine_config &mconfig, device_type type, const char *tag)
- : hh_tms1k_state(mconfig, type, tag)
- { }
-
- void prepare_display();
- DECLARE_WRITE16_MEMBER(write_r);
- DECLARE_WRITE16_MEMBER(write_o);
- DECLARE_READ8_MEMBER(read_k);
-};
+ PORT_START("IN.4") // Vss!
+ PORT_BIT( 0x07, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Swing")
-// handlers
+ PORT_START("IN.5") // fake
+ PORT_CONFNAME( 0x01, 0x00, "Skill Level" ) PORT_CHANGED_MEMBER(DEVICE_SELF, h2hbaseb_state, skill_switch, NULL)
+ PORT_CONFSETTING( 0x00, "1" )
+ PORT_CONFSETTING( 0x01, "2" )
+INPUT_PORTS_END
-void cqback_state::prepare_display()
+INPUT_CHANGED_MEMBER(h2hbaseb_state::skill_switch)
{
- // R9 selects between segments B/C or A'/D'
- UINT16 seg = m_o;
- if (m_r & 0x200)
- seg = (m_o << 7 & 0x300) | (m_o & 0xf9);
-
- set_display_segmask(0x1ff, 0xff);
- display_matrix(11, 9, seg, m_r & 0x1ff);
+ set_clock();
}
-WRITE16_MEMBER(cqback_state::write_r)
-{
- // R10: speaker out
- m_speaker->level_w(data >> 10 & 1);
- // R0-R4: input mux
- m_inp_mux = data & 0x1f;
-
- // R0-R9: select digit/segment
- m_r = data;
- prepare_display();
-}
-
-WRITE16_MEMBER(cqback_state::write_o)
+void h2hbaseb_state::set_clock()
{
- // O0-O7: digit segments
- m_o = data;
- prepare_display();
+ // MCU clock is from an RC circuit with C=47pf, and R value is depending on
+ // skill switch: R=51K(1) or 43K(2)
+ m_maincpu->set_unscaled_clock((m_inp_matrix[5]->read() & 1) ? 400000 : 350000);
}
-READ8_MEMBER(cqback_state::read_k)
+void h2hbaseb_state::machine_reset()
{
- // K: multiplexed inputs, rotated matrix
- return read_rotated_inputs(5);
+ hh_tms1k_state::machine_reset();
+ set_clock();
}
-
-// config
-
-static INPUT_PORTS_START( cqback )
- PORT_START("IN.0") // K1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY PORT_NAME("P1 Left/Right")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Kick/Pass")
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START ) PORT_NAME("Display")
-
- PORT_START("IN.1") // K2
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_TOGGLE PORT_NAME("Play Selector") // pass
- PORT_BIT( 0x02, 0x02, IPT_SPECIAL ) PORT_CONDITION("IN.1", 0x01, EQUALS, 0x00) // run/kick
-
- PORT_START("IN.2") // K4
- PORT_CONFNAME( 0x03, 0x02, "Skill Level" )
- PORT_CONFSETTING( 0x02, "1" )
- PORT_CONFSETTING( 0x01, "2" )
-
- PORT_START("IN.3") // K8
- PORT_CONFNAME( 0x01, 0x00, "Factory Test" )
- PORT_CONFSETTING( 0x00, DEF_STR( Off ) )
- PORT_CONFSETTING( 0x01, DEF_STR( On ) ) // TP1-TP2
-INPUT_PORTS_END
-
-static MACHINE_CONFIG_START( cqback, cqback_state )
+static MACHINE_CONFIG_START( h2hbaseb, h2hbaseb_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", TMS1100, 310000) // approximation - RC osc. R=33K, C=100pf
- MCFG_TMS1XXX_READ_K_CB(READ8(cqback_state, read_k))
- MCFG_TMS1XXX_WRITE_R_CB(WRITE16(cqback_state, write_r))
- MCFG_TMS1XXX_WRITE_O_CB(WRITE16(cqback_state, write_o))
+ MCFG_CPU_ADD("maincpu", TMS1170, 350000) // see set_clock
+ MCFG_TMS1XXX_READ_K_CB(READ8(h2hbaseb_state, read_k))
+ MCFG_TMS1XXX_WRITE_R_CB(WRITE16(h2hbaseb_state, write_r))
+ MCFG_TMS1XXX_WRITE_O_CB(WRITE16(h2hbaseb_state, write_o))
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_cqback)
+ MCFG_DEFAULT_LAYOUT(layout_h2hbaseb)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -949,14 +798,10 @@ MACHINE_CONFIG_END
Coleco Head to Head Football
* TMS1100NLLE (rev. E!) MP3460 (die labeled MP3460)
- * 2*SN75492N LED display drivers, 9-digit LED grid, 1-bit sound
-
- known releases:
- - USA(1): Head to Head Football
- - USA(2): Team Play Football, distributed by Sears
+ * 2*SN75492N LED display drivers, 9-digit LED grid, 1bit sound
LED electronic football game. To distinguish between offense and defense,
- offense blips (should) appear brighter. The hardware is similar to cqback.
+ offense blips (should) appear brighter.
***************************************************************************/
@@ -977,8 +822,8 @@ public:
void h2hfootb_state::prepare_display()
{
- set_display_segmask(0x1ff, 0x7f);
- display_matrix(9, 9, m_o | (m_r >> 1 & 0x100), m_r & 0x1ff);
+ memset(m_display_segmask, ~0, sizeof(m_display_segmask));
+ display_matrix_seg(9, 9, m_o | (m_r >> 1 & 0x100), (m_r & 0x1ff), 0x7f);
}
WRITE16_MEMBER(h2hfootb_state::write_r)
@@ -1004,8 +849,15 @@ WRITE16_MEMBER(h2hfootb_state::write_o)
READ8_MEMBER(h2hfootb_state::read_k)
{
- // K: multiplexed inputs, rotated matrix
- return read_rotated_inputs(9);
+ // K: multiplexed inputs
+ UINT8 k = 0;
+
+ // compared to the usual setup, the button matrix is rotated
+ for (int i = 0; i < 4; i++)
+ if (m_inp_matrix[i]->read() & m_inp_mux)
+ k |= 1 << i;
+
+ return k;
}
@@ -1041,7 +893,7 @@ INPUT_PORTS_END
static MACHINE_CONFIG_START( h2hfootb, h2hfootb_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", TMS1100, 310000) // approximation - RC osc. R=39K, C=100pf
+ MCFG_CPU_ADD("maincpu", TMS1100, 325000) // approximation - RC osc. R=39K, C=100pf, but unknown RC curve
MCFG_TMS1XXX_READ_K_CB(READ8(h2hfootb_state, read_k))
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(h2hfootb_state, write_r))
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(h2hfootb_state, write_o))
@@ -1061,149 +913,9 @@ MACHINE_CONFIG_END
/***************************************************************************
- Coleco Head to Head Baseball
- * PCB labels Coleco rev C 73891/2
- * TMS1170NLN MP1525-N2 (die labeled MP1525)
- * 9-digit cyan VFD display, and other LEDs behind bezel, 1-bit sound
-
- known releases:
- - USA: Head to Head Baseball
- - Japan: Computer Baseball, published by Tsukuda
-
-***************************************************************************/
-
-class h2hbaseb_state : public hh_tms1k_state
-{
-public:
- h2hbaseb_state(const machine_config &mconfig, device_type type, const char *tag)
- : hh_tms1k_state(mconfig, type, tag)
- { }
-
- void prepare_display();
- DECLARE_WRITE16_MEMBER(write_r);
- DECLARE_WRITE16_MEMBER(write_o);
- DECLARE_READ8_MEMBER(read_k);
-
- void set_clock();
- DECLARE_INPUT_CHANGED_MEMBER(skill_switch);
-
-protected:
- virtual void machine_reset() override;
-};
-
-// handlers
-
-void h2hbaseb_state::prepare_display()
-{
- set_display_segmask(0x1ff, 0x7f);
- display_matrix(9, 9, (m_r & 0x100) | m_o, (m_r & 0xff) | (m_r >> 1 & 0x100));
-}
-
-WRITE16_MEMBER(h2hbaseb_state::write_r)
-{
- // R10: speaker out
- m_speaker->level_w(data >> 10 & 1);
-
- // R4-R7: input mux
- m_inp_mux = data >> 4 & 0xf;
-
- // R0-R7,R9: select vfd digit/led
- // R8: led state
- m_r = data;
- prepare_display();
-}
-
-WRITE16_MEMBER(h2hbaseb_state::write_o)
-{
- // O0-O6: digit segments A-G
- // O7: N/C
- m_o = data;
- prepare_display();
-}
-
-READ8_MEMBER(h2hbaseb_state::read_k)
-{
- // K: multiplexed inputs (note: K8(Vss row) is always on)
- return m_inp_matrix[4]->read() | read_inputs(4);
-}
-
-
-// config
-
-static INPUT_PORTS_START( h2hbaseb )
- PORT_START("IN.0") // R4
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("N")
- PORT_BIT( 0x0b, IP_ACTIVE_HIGH, IPT_UNUSED )
-
- PORT_START("IN.1") // R5
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("B")
- PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_UNUSED )
-
- PORT_START("IN.2") // R6
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("S")
- PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED )
-
- PORT_START("IN.3") // R7
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_NAME("Curve") // these two buttons appear twice on the board
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("Fast Pitch") // "
- PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED )
-
- PORT_START("IN.4") // Vss!
- PORT_BIT( 0x07, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Swing")
-
- PORT_START("IN.5") // fake
- PORT_CONFNAME( 0x01, 0x00, "Skill Level" ) PORT_CHANGED_MEMBER(DEVICE_SELF, h2hbaseb_state, skill_switch, NULL)
- PORT_CONFSETTING( 0x00, "1" )
- PORT_CONFSETTING( 0x01, "2" )
-INPUT_PORTS_END
-
-INPUT_CHANGED_MEMBER(h2hbaseb_state::skill_switch)
-{
- set_clock();
-}
-
-
-void h2hbaseb_state::set_clock()
-{
- // MCU clock is from an RC circuit with C=47pf, and R value is depending on
- // skill switch: R=51K(1) or 43K(2)
- m_maincpu->set_unscaled_clock((m_inp_matrix[5]->read() & 1) ? 400000 : 350000);
-}
-
-void h2hbaseb_state::machine_reset()
-{
- hh_tms1k_state::machine_reset();
- set_clock();
-}
-
-static MACHINE_CONFIG_START( h2hbaseb, h2hbaseb_state )
-
- /* basic machine hardware */
- MCFG_CPU_ADD("maincpu", TMS1170, 350000) // see set_clock
- MCFG_TMS1XXX_READ_K_CB(READ8(h2hbaseb_state, read_k))
- MCFG_TMS1XXX_WRITE_R_CB(WRITE16(h2hbaseb_state, write_r))
- MCFG_TMS1XXX_WRITE_O_CB(WRITE16(h2hbaseb_state, write_o))
-
- MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_h2hbaseb)
-
- /* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
-MACHINE_CONFIG_END
-
-
-
-
-
-/***************************************************************************
-
Coleco Total Control 4
* TMS1400NLL MP7334-N2 (die labeled MP7334)
- * 2x2-digit 7seg LED display + 4 LEDs, LED grid display, 1-bit sound
+ * 2x2-digit 7seg LED display + 4 LEDs, LED grid display, 1bit sound
This is a head to head electronic tabletop LED-display sports console.
One cartridge(Football) was included with the console, the other three were
@@ -1337,7 +1049,7 @@ INPUT_PORTS_END
static MACHINE_CONFIG_START( tc4, tc4_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", TMS1400, 450000) // approximation - RC osc. R=27.3K, C=100pf
+ MCFG_CPU_ADD("maincpu", TMS1400, 450000) // approximation - RC osc. R=27.3K, C=100pf, but unknown RC curve
MCFG_TMS1XXX_READ_K_CB(READ8(tc4_state, read_k))
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(tc4_state, write_r))
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(tc4_state, write_o))
@@ -1357,133 +1069,9 @@ MACHINE_CONFIG_END
/***************************************************************************
- Conic Electronic Football II
- * TMS1100 MP1181 (no decap)
- * 9-digit LED grid, 1-bit sound
-
- This is a clone of Coleco's Quarterback, similar at hardware-level too.
- It was also sold by Tandy under the same title.
-
-***************************************************************************/
-
-class cnfball2_state : public hh_tms1k_state
-{
-public:
- cnfball2_state(const machine_config &mconfig, device_type type, const char *tag)
- : hh_tms1k_state(mconfig, type, tag)
- { }
-
- void prepare_display();
- DECLARE_WRITE16_MEMBER(write_r);
- DECLARE_WRITE16_MEMBER(write_o);
- DECLARE_READ8_MEMBER(read_k);
-};
-
-// handlers
-
-void cnfball2_state::prepare_display()
-{
- // R1 selects between segments B/C or A'/D'
- UINT16 seg = m_o;
- if (~m_r & 2)
- seg = (m_o << 7 & 0x300) | (m_o & 0xf9);
-
- set_display_segmask(0x1ff, 0xff);
- display_matrix(11, 9, seg, m_r >> 1 & 0x1ff);
-}
-
-WRITE16_MEMBER(cnfball2_state::write_r)
-{
- // R0: speaker out
- m_speaker->level_w(data & 1);
-
- // R8-R10: input mux
- m_inp_mux = data >> 8 & 7;
-
- // R1-R10: select digit/segment
- m_r = data;
- prepare_display();
-}
-
-WRITE16_MEMBER(cnfball2_state::write_o)
-{
- // O0-O7: digit segments
- m_o = data;
- prepare_display();
-}
-
-READ8_MEMBER(cnfball2_state::read_k)
-{
- // K: multiplexed inputs
- return read_inputs(3);
-}
-
-
-// config
-
-static INPUT_PORTS_START( cnfball2 )
- PORT_START("IN.0") // R8
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_CONFNAME( 0x02, 0x00, "Factory Test" )
- PORT_CONFSETTING( 0x00, DEF_STR( Off ) )
- PORT_CONFSETTING( 0x02, DEF_STR( On ) )
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_TOGGLE PORT_NAME("Play Selector") // pass/run
- PORT_CONFNAME( 0x08, 0x00, "Skill Level" )
- PORT_CONFSETTING( 0x00, "1" ) // college
- PORT_CONFSETTING( 0x08, "2" ) // professional
-
- PORT_START("IN.1") // R9
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY
-
- PORT_START("IN.2") // R10
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Kick/Pass")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) PORT_NAME("Score")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) PORT_NAME("Status")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
-INPUT_PORTS_END
-
-
-// output PLA is not decapped
-static const UINT16 cnfball2_output_pla[0x20] =
-{
- // first half was dumped electronically
- 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f, 0x40, 0x01, 0x08, 0x02, 0x04, 0x00,
-
- // rest is unknown
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0
-};
-
-static MACHINE_CONFIG_START( cnfball2, cnfball2_state )
-
- /* basic machine hardware */
- MCFG_CPU_ADD("maincpu", TMS1100, 375000) // approximation - RC osc. R=47K, C=47pf
- MCFG_TMS1XXX_OUTPUT_PLA(cnfball2_output_pla)
- MCFG_TMS1XXX_READ_K_CB(READ8(cnfball2_state, read_k))
- MCFG_TMS1XXX_WRITE_R_CB(WRITE16(cnfball2_state, write_r))
- MCFG_TMS1XXX_WRITE_O_CB(WRITE16(cnfball2_state, write_o))
-
- MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_cnfball2)
-
- /* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
-MACHINE_CONFIG_END
-
-
-
-
-
-/***************************************************************************
-
Entex (Electronic) Baseball (1)
* TMS1000NLP MP0914 (die labeled MP0914A)
- * 1 7seg LED, and other LEDs behind bezel, 1-bit sound
+ * 1 7seg LED, and other LEDs behind bezel, 1bit sound
This is a handheld LED baseball game. One player controls the batter, the CPU
or other player controls the pitcher. Pitcher throw buttons are on a 'joypad'
@@ -1596,7 +1184,7 @@ INPUT_PORTS_END
static MACHINE_CONFIG_START( ebball, ebball_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", TMS1000, 375000) // approximation - RC osc. R=43K, C=47pf
+ MCFG_CPU_ADD("maincpu", TMS1000, 375000) // RC osc. R=43K, C=47pf -> ~375kHz
MCFG_TMS1XXX_READ_K_CB(READ8(ebball_state, read_k))
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(ebball_state, write_r))
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(ebball_state, write_o))
@@ -1619,7 +1207,7 @@ MACHINE_CONFIG_END
Entex (Electronic) Baseball 2
* PCBs are labeled: ZENY
* TMS1000 MCU, MP0923 (die labeled MP0923)
- * 3 7seg LEDs, and other LEDs behind bezel, 1-bit sound
+ * 3 7seg LEDs, and other LEDs behind bezel, 1bit sound
The Japanese version was published by Gakken, black casing instead of white.
@@ -1721,7 +1309,7 @@ INPUT_PORTS_END
static MACHINE_CONFIG_START( ebball2, ebball2_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", TMS1000, 350000) // approximation - RC osc. R=47K, C=47pf
+ MCFG_CPU_ADD("maincpu", TMS1000, 350000) // RC osc. R=47K, C=47pf -> ~350kHz
MCFG_TMS1XXX_READ_K_CB(READ8(ebball2_state, read_k))
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(ebball2_state, write_r))
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(ebball2_state, write_o))
@@ -1745,7 +1333,7 @@ MACHINE_CONFIG_END
* PCBs are labeled: ZENY
* TMS1100NLL 6007 MP1204 (rev. E!) (die labeled MP1204)
* 2*SN75492N LED display driver
- * 4 7seg LEDs, and other LEDs behind bezel, 1-bit sound
+ * 4 7seg LEDs, and other LEDs behind bezel, 1bit sound
This is another improvement over Entex Baseball, where gameplay is a bit more
varied. Like the others, the pitcher controls are on a separate joypad.
@@ -1924,7 +1512,7 @@ MACHINE_CONFIG_END
Entex Space Invader
* TMS1100 MP1211 (die labeled MP1211)
- * 3 7seg LEDs, LED matrix and overlay mask, 1-bit sound
+ * 3 7seg LEDs, LED matrix and overlay mask, 1bit sound
There are two versions of this game: the first release(this one) is on
TMS1100, the second more widespread release runs on a COP400. There are
@@ -2038,7 +1626,7 @@ MACHINE_CONFIG_END
Entex Color Football 4
* TMS1670 6009 MP7551 (die also labeled MP7551)
- * 9-digit cyan VFD display, 60 red and green LEDs behind bezel, 1-bit sound
+ * 9-digit cyan VFD display, 60 red and green LEDs behind bezel, 1bit sound
***************************************************************************/
@@ -2133,7 +1721,7 @@ INPUT_PORTS_END
static MACHINE_CONFIG_START( efootb4, efootb4_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", TMS1670, 475000) // approximation - RC osc. R=42K, C=47pf
+ MCFG_CPU_ADD("maincpu", TMS1670, 475000) // approximation - RC osc. R=42K, C=47pf, but unknown RC curve
MCFG_TMS1XXX_READ_K_CB(READ8(efootb4_state, read_k))
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(efootb4_state, write_r))
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(efootb4_state, write_o))
@@ -2155,7 +1743,7 @@ MACHINE_CONFIG_END
Entex (Electronic) Basketball 2
* TMS1100 6010 MP1218 (die also labeled MP1218)
- * 4 7seg LEDs, and other LEDs behind bezel, 1-bit sound
+ * 4 7seg LEDs, and other LEDs behind bezel, 1bit sound
lamp translation table: led zz from game PCB = MAME lampyx:
@@ -2256,7 +1844,7 @@ INPUT_PORTS_END
static MACHINE_CONFIG_START( ebaskb2, ebaskb2_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", TMS1100, 360000) // approximation - RC osc. R=33K, C=82pf
+ MCFG_CPU_ADD("maincpu", TMS1100, 360000) // RC osc. R=33K, C=82pf -> ~360kHz
MCFG_TMS1XXX_READ_K_CB(READ8(ebaskb2_state, read_k))
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(ebaskb2_state, write_r))
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(ebaskb2_state, write_o))
@@ -2278,7 +1866,7 @@ MACHINE_CONFIG_END
Entex Raise The Devil
* TMS1100 MP1221 (die labeled MP1221)
- * 4 7seg LEDs(rightmost one unused), and other LEDs behind bezel, 1-bit sound
+ * 4 7seg LEDs(rightmost one unused), and other LEDs behind bezel, 1bit sound
lamp translation table: led zz from game PCB = MAME lampyx:
@@ -2452,8 +2040,8 @@ protected:
void gpoker_state::prepare_display()
{
- set_display_segmask(0x7ff, 0x7f);
- display_matrix(12, 11, m_o | (m_r >> 3 & 0xf00), m_r & 0x7ff);
+ memset(m_display_segmask, ~0, sizeof(m_display_segmask));
+ display_matrix_seg(12, 11, m_o | (m_r >> 3 & 0xf00), m_r & 0x7ff, 0x7f);
}
WRITE16_MEMBER(gpoker_state::write_r)
@@ -2543,7 +2131,7 @@ void gpoker_state::machine_reset()
static MACHINE_CONFIG_START( gpoker, gpoker_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", TMS1370, 350000) // approximation - RC osc. R=47K, C=47pf
+ MCFG_CPU_ADD("maincpu", TMS1370, 350000) // RC osc. R=47K, C=47pf -> ~350kHz
MCFG_TMS1XXX_READ_K_CB(READ8(gpoker_state, read_k))
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(gpoker_state, write_r))
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(gpoker_state, write_o))
@@ -2656,7 +2244,7 @@ INPUT_PORTS_END
static MACHINE_CONFIG_START( gjackpot, gjackpot_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", TMS1670, 450000) // approximation - RC osc. R=47K, C=47pf
+ MCFG_CPU_ADD("maincpu", TMS1670, 450000) // approximation - RC osc. R=47K, C=47pf, but unknown RC curve
MCFG_TMS1XXX_READ_K_CB(READ8(gpoker_state, read_k))
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(gjackpot_state, write_r))
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(gpoker_state, write_o))
@@ -2678,9 +2266,9 @@ MACHINE_CONFIG_END
Ideal Electronic Detective
* TMS0980NLL MP6100A (die labeled 0980B-00)
- * 10-digit 7seg LED display, 2-level sound
+ * 10-digit 7seg LED display, 1bit sound
- hardware (and concept) is very similar to Parker Brothers Stop Thief
+ hardware (and concept) is very similar to Parker Bros Stop Thief
This is an electronic board game. It requires game cards with suspect info,
and good old pen and paper to record game progress. To start the game, enter
@@ -2705,12 +2293,12 @@ public:
WRITE16_MEMBER(elecdet_state::write_r)
{
- // R7,R8: speaker out
- m_speaker->level_w((m_o & 0x80) ? (data >> 7 & 3) : 0);
+ // R7,R8: speaker on
+ m_speaker->level_w((data & 0x180 && m_o & 0x80) ? 1 : 0);
// R0-R6: select digit
- set_display_segmask(0x7f, 0x7f);
- display_matrix(7, 7, BITSWAP8(m_o,7,5,2,1,4,0,6,3), data);
+ memset(m_display_segmask, ~0, sizeof(m_display_segmask));
+ display_matrix_seg(7, 7, BITSWAP8(m_o,7,5,2,1,4,0,6,3), data, 0x7f);
}
WRITE16_MEMBER(elecdet_state::write_o)
@@ -2719,7 +2307,7 @@ WRITE16_MEMBER(elecdet_state::write_o)
m_inp_mux = (data & 3) | (data >> 2 & 4) | (data >> 3 & 8);
// O0-O6: digit segments A-G
- // O7: speaker on -> write_r
+ // O7: speaker out -> write_r
m_o = data;
}
@@ -2779,9 +2367,6 @@ static INPUT_PORTS_START( elecdet )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("Off") PORT_CHANGED_MEMBER(DEVICE_SELF, hh_tms1k_state, power_button, (void *)false)
INPUT_PORTS_END
-
-static const INT16 elecdet_speaker_levels[4] = { 0, 0x3fff, 0x3fff, 0x7fff };
-
static MACHINE_CONFIG_START( elecdet, elecdet_state )
/* basic machine hardware */
@@ -2797,7 +2382,6 @@ static MACHINE_CONFIG_START( elecdet, elecdet_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
- MCFG_SPEAKER_LEVELS(4, elecdet_speaker_levels)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
@@ -2809,7 +2393,7 @@ MACHINE_CONFIG_END
Kenner Star Wars - Electronic Battle Command
* TMS1100 MCU, labeled MP3438A
- * 4x4 LED grid display + 2 separate LEDs and 2-digit 7segs, 1-bit sound
+ * 4x4 LED grid display + 2 separate LEDs and 2-digit 7segs, 1bit sound
This is a small tabletop space-dogfighting game. To start the game,
press BASIC/INTER/ADV and enter P#(number of players), then
@@ -2913,7 +2497,7 @@ INPUT_PORTS_END
static MACHINE_CONFIG_START( starwbc, starwbc_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", TMS1100, 325000) // approximation - RC osc. R=51K, C=47pf
+ MCFG_CPU_ADD("maincpu", TMS1100, 325000) // RC osc. R=51K, C=47pf -> ~325kHz
MCFG_TMS1XXX_READ_K_CB(READ8(starwbc_state, read_k))
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(starwbc_state, write_r))
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(starwbc_state, write_o))
@@ -2959,8 +2543,8 @@ public:
void astro_state::prepare_display()
{
- set_display_segmask(0x3ff, 0xff);
- display_matrix(8, 10, m_o, m_r);
+ memset(m_display_segmask, ~0, sizeof(m_display_segmask));
+ display_matrix_seg(8, 10, m_o, m_r, 0xff);
}
WRITE16_MEMBER(astro_state::write_r)
@@ -3040,7 +2624,7 @@ INPUT_PORTS_END
static MACHINE_CONFIG_START( astro, astro_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", TMS1470, 450000) // approximation - RC osc. R=4.7K, C=33pf
+ MCFG_CPU_ADD("maincpu", TMS1470, 450000) // approximation - RC osc. R=4.7K, C=33pf, but unknown RC curve
MCFG_TMS1XXX_READ_K_CB(READ8(astro_state, read_k))
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(astro_state, write_r))
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(astro_state, write_o))
@@ -3059,7 +2643,7 @@ MACHINE_CONFIG_END
Mattel Dungeons & Dragons - Computer Labyrinth Game
* TMS1100 M34012-N2LL (die labeled M34012)
- * 72 buttons, no LEDs, 1-bit sound
+ * 72 buttons, no LEDs, 1bit sound
This is an electronic board game. It requires markers and wall pieces to play.
Refer to the official manual for more information.
@@ -3228,7 +2812,7 @@ INPUT_PORTS_END
static MACHINE_CONFIG_START( mdndclab, mdndclab_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", TMS1100, 500000) // approximation - RC osc. R=27K, C=100pf
+ MCFG_CPU_ADD("maincpu", TMS1100, 500000) // approximation - RC osc. R=27K, C=100pf, but unknown RC curve
MCFG_TMS1XXX_READ_K_CB(READ8(mdndclab_state, read_k))
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(mdndclab_state, write_r))
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(mdndclab_state, write_o))
@@ -3353,7 +2937,7 @@ MACHINE_CONFIG_END
Revision A hardware:
* TMS1000 (die labeled MP3226)
- * DS75494 Hex digit LED driver, 4 big lamps, 1-bit sound
+ * DS75494 Hex digit LED driver, 4 big lamps, 1bit sound
Newer revisions (also Pocket Simon) have a smaller 16-pin MB4850 chip
instead of the TMS1000. This one has been decapped too, but we couldn't
@@ -3433,7 +3017,7 @@ INPUT_PORTS_END
static MACHINE_CONFIG_START( simon, simon_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", TMS1000, 350000) // approximation - RC osc. R=33K, C=100pf
+ MCFG_CPU_ADD("maincpu", TMS1000, 350000) // RC osc. R=33K, C=100pf -> ~350kHz
MCFG_TMS1XXX_READ_K_CB(READ8(simon_state, read_k))
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(simon_state, write_r))
@@ -3454,7 +3038,7 @@ MACHINE_CONFIG_END
Milton Bradley Super Simon
* TMS1100 MP3476NLL (die labeled MP3476)
- * 8 big lamps(2 turn on at same time), 1-bit sound
+ * 8 big lamps(2 turn on at same time), 1bit sound
The semi-squel to Simon, not as popular. It includes more game variations
and a 2-player head-to-head mode.
@@ -3751,12 +3335,12 @@ void bigtrak_state::machine_start()
save_item(NAME(m_gearbox_pos));
}
-static const INT16 bigtrak_speaker_levels[8] = { 0, 0x7fff/3, 0x7fff/3, 0x7fff/3*2, 0x7fff/3, 0x7fff/3*2, 0x7fff/3*2, 0x7fff };
+static const INT16 bigtrak_speaker_levels[] = { 0, 32767/3, 32767/3, 32767/3*2, 32767/3, 32767/3*2, 32767/3*2, 32767 };
static MACHINE_CONFIG_START( bigtrak, bigtrak_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", TMS1000, 200000) // approximation - RC osc. R=83K, C=100pf
+ MCFG_CPU_ADD("maincpu", TMS1000, 200000) // approximation - RC osc. R=83K, C=100pf, but unknown RC curve
MCFG_TMS1XXX_READ_K_CB(READ8(bigtrak_state, read_k))
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(bigtrak_state, write_r))
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(bigtrak_state, write_o))
@@ -3804,10 +3388,18 @@ public:
WRITE16_MEMBER(cnsector_state::write_r)
{
- // R0-R5: select digit
- // R6-R9: direction leds
- set_display_segmask(0x3f, 0xff);
- display_matrix(8, 10, m_o, data);
+ // R0-R5: select digit (right-to-left)
+ for (int y = 0; y < 6; y++)
+ {
+ m_display_segmask[y] = 0xff;
+ m_display_state[y] = (data >> y & 1) ? m_o : 0;
+ }
+
+ // R6-R9: direction leds (-> lamp60-63)
+ m_display_state[6] = data >> 6 & 0xf;
+
+ set_display_size(8, 7);
+ display_update();
}
WRITE16_MEMBER(cnsector_state::write_o)
@@ -3893,7 +3485,7 @@ MACHINE_CONFIG_END
/***************************************************************************
- Parker Brothers Merlin handheld game, by Bob Doyle
+ Parker Bros Merlin handheld game, by Bob Doyle
* TMS1100NLL MP3404A-N2
* 11 LEDs behind buttons, 3-level sound
@@ -3986,12 +3578,12 @@ static INPUT_PORTS_START( merlin )
INPUT_PORTS_END
-static const INT16 merlin_speaker_levels[8] = { 0, 0x7fff/3, 0x7fff/3, 0x7fff/3*2, 0x7fff/3, 0x7fff/3*2, 0x7fff/3*2, 0x7fff };
+static const INT16 merlin_speaker_levels[] = { 0, 32767/3, 32767/3, 32767/3*2, 32767/3, 32767/3*2, 32767/3*2, 32767 };
static MACHINE_CONFIG_START( merlin, merlin_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", TMS1100, 350000) // approximation - RC osc. R=33K, C=100pf
+ MCFG_CPU_ADD("maincpu", TMS1100, 350000) // RC osc. R=33K, C=100pf -> ~350kHz
MCFG_TMS1XXX_READ_K_CB(READ8(merlin_state, read_k))
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(merlin_state, write_r))
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(merlin_state, write_o))
@@ -4055,7 +3647,7 @@ INPUT_PORTS_END
static MACHINE_CONFIG_START( mmerlin, mmerlin_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", TMS1400, 425000) // approximation - RC osc. R=30K, C=100pf
+ MCFG_CPU_ADD("maincpu", TMS1400, 425000) // approximation - RC osc. R=30K, C=100pf, but unknown RC curve
MCFG_TMS1XXX_READ_K_CB(READ8(mmerlin_state, read_k))
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(mmerlin_state, write_r))
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(mmerlin_state, write_o))
@@ -4078,7 +3670,7 @@ MACHINE_CONFIG_END
Parker Brothers Stop Thief, by Bob Doyle
* TMS0980NLL MP6101B (die labeled 0980B-01A)
- * 3-digit 7seg LED display, 6-level sound
+ * 3-digit 7seg LED display, 1bit sound
Stop Thief is actually a board game, the electronic device emulated here
(called Electronic Crime Scanner) is an accessory. To start a game, press
@@ -4103,14 +3695,18 @@ public:
WRITE16_MEMBER(stopthief_state::write_r)
{
// R0-R2: select digit
- set_display_segmask(7, 0x7f);
- display_matrix(7, 3, BITSWAP8(m_o,3,5,2,1,4,0,6,7) & 0x7f, data & 7);
+ UINT8 o = BITSWAP8(m_o,3,5,2,1,4,0,6,7) & 0x7f;
+ for (int y = 0; y < 3; y++)
+ {
+ m_display_segmask[y] = 0x7f;
+ m_display_state[y] = (data >> y & 1) ? o : 0;
+ }
+
+ set_display_size(7, 3);
+ display_update();
- // R3-R8(tied together): speaker out
- int level = 0;
- for (int i = 0; m_o & 8 && i < 6; i++)
- level += (data >> (i+3) & 1);
- m_speaker->level_w(level);
+ // R3-R8: speaker on
+ m_speaker->level_w((data & 0x1f8 && m_o & 8) ? 1 : 0);
}
WRITE16_MEMBER(stopthief_state::write_o)
@@ -4118,7 +3714,7 @@ WRITE16_MEMBER(stopthief_state::write_o)
// O0,O6: input mux
m_inp_mux = (data & 1) | (data >> 5 & 2);
- // O3: speaker on
+ // O3: speaker out
// O0-O2,O4-O7: led segments A-G
m_o = data;
}
@@ -4165,9 +3761,6 @@ static INPUT_PORTS_START( stopthief )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("Off") PORT_CHANGED_MEMBER(DEVICE_SELF, hh_tms1k_state, power_button, (void *)false)
INPUT_PORTS_END
-
-static const INT16 stopthief_speaker_levels[7] = { 0, 0x7fff/6, 0x7fff/5, 0x7fff/4, 0x7fff/3, 0x7fff/2, 0x7fff };
-
static MACHINE_CONFIG_START( stopthief, stopthief_state )
/* basic machine hardware */
@@ -4183,7 +3776,6 @@ static MACHINE_CONFIG_START( stopthief, stopthief_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
- MCFG_SPEAKER_LEVELS(7, stopthief_speaker_levels)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
@@ -4195,7 +3787,7 @@ MACHINE_CONFIG_END
Parker Brothers Bank Shot (known as Cue Ball in the UK), by Garry Kitchen
* TMS1400NLL MP7313-N2 (die labeled MP7313)
- * LED grid display, 1-bit sound
+ * LED grid display, 1bit sound
Bank Shot is an electronic pool game. To select a game, repeatedly press
the [SELECT] button, then press [CUE UP] to start. Refer to the official
@@ -4280,7 +3872,7 @@ INPUT_PORTS_END
static MACHINE_CONFIG_START( bankshot, bankshot_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", TMS1400, 475000) // approximation - RC osc. R=24K, C=100pf
+ MCFG_CPU_ADD("maincpu", TMS1400, 475000) // approximation - RC osc. R=24K, C=100pf, but unknown RC curve
MCFG_TMS1XXX_READ_K_CB(READ8(bankshot_state, read_k))
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(bankshot_state, write_r))
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(bankshot_state, write_o))
@@ -4302,7 +3894,7 @@ MACHINE_CONFIG_END
Parker Brothers Split Second
* TMS1400NLL MP7314-N2 (die labeled MP7314)
- * LED grid display(default round LEDs, and rectangular shape ones), 1-bit sound
+ * LED grid display(default round LEDs, and rectangular shape ones), 1bit sound
This is an electronic handheld reflex gaming device, it's straightforward
to use. The included mini-games are:
@@ -4391,7 +3983,7 @@ INPUT_PORTS_END
static MACHINE_CONFIG_START( splitsec, splitsec_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", TMS1400, 475000) // approximation - RC osc. R=24K, C=100pf
+ MCFG_CPU_ADD("maincpu", TMS1400, 475000) // approximation - RC osc. R=24K, C=100pf, but unknown RC curve
MCFG_TMS1XXX_READ_K_CB(READ8(splitsec_state, read_k))
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(splitsec_state, write_r))
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(splitsec_state, write_o))
@@ -4411,125 +4003,9 @@ 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)
- * 11 LEDs, 4-bit sound
-
- This is a board game. The electronic accessory is the emulated part here.
-
-***************************************************************************/
-
-class lostreas_state : public hh_tms1k_state
-{
-public:
- lostreas_state(const machine_config &mconfig, device_type type, const char *tag)
- : hh_tms1k_state(mconfig, type, tag)
- { }
-
- DECLARE_WRITE16_MEMBER(write_r);
- DECLARE_WRITE16_MEMBER(write_o);
- DECLARE_READ8_MEMBER(read_k);
-};
-
-// handlers
-
-WRITE16_MEMBER(lostreas_state::write_r)
-{
- // R0-R10: leds
- display_matrix(11, 1, data, 1);
-}
-
-WRITE16_MEMBER(lostreas_state::write_o)
-{
- // O0-O3: input mux
- m_inp_mux = data & 0xf;
-
- // O4: 330 ohm resistor - speaker out
- // O5: 220 ohm resistor - speaker out
- // O6: 180 ohm resistor - speaker out
- // O7: 68 ohm resistor - speaker out
- m_speaker->level_w(data >> 4 & 0xf);
-}
-
-READ8_MEMBER(lostreas_state::read_k)
-{
- // K: multiplexed inputs
- return read_inputs(4);
-}
-
-
-// config
-
-/* physical button layout and labels is like this:
- (note: Canadian version differs slightly to accomodoate dual-language)
-
- [N-S(gold)] [1] [2] [3] [AIR]
- [E-W(gold)] [4] [5] [6] [UP]
- [N-S(silv)] [7] [8] [9] [$ VALUE]
- [E-W(silv)] [CLEAR]
-*/
-
-static INPUT_PORTS_START( lostreas )
- PORT_START("IN.0") // O0
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("1")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("2")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("3")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("4")
-
- PORT_START("IN.1") // O1
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("5")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("6")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("7")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("8")
-
- PORT_START("IN.2") // O2
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("9")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_DEL) PORT_NAME("Clear")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A) PORT_CODE(KEYCODE_U) PORT_NAME("Air/Up")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_V) PORT_NAME("$ Value")
-
- PORT_START("IN.3") // O3
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_NAME("E-W (silver)")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_NAME("N-S (silver)")
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) PORT_NAME("E-W (gold)")
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) PORT_NAME("N-S (gold)")
-INPUT_PORTS_END
-
-
-static const INT16 lostreas_speaker_levels[16] =
-{
- 0, 0x7fff/15, 0x7fff/14, 0x7fff/13, 0x7fff/12, 0x7fff/11, 0x7fff/10, 0x7fff/9,
- 0x7fff/8, 0x7fff/7, 0x7fff/6, 0x7fff/5, 0x7fff/4, 0x7fff/3, 0x7fff/2, 0x7fff/1
-};
-
-static MACHINE_CONFIG_START( lostreas, lostreas_state )
-
- /* basic machine hardware */
- MCFG_CPU_ADD("maincpu", TMS1100, 425000) // approximation - RC osc. R=39K, C=47pf
- MCFG_TMS1XXX_READ_K_CB(READ8(lostreas_state, read_k))
- MCFG_TMS1XXX_WRITE_R_CB(WRITE16(lostreas_state, write_r))
- MCFG_TMS1XXX_WRITE_O_CB(WRITE16(lostreas_state, write_o))
-
- MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_lostreas)
-
- /* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
- MCFG_SPEAKER_LEVELS(16, lostreas_speaker_levels)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
-MACHINE_CONFIG_END
-
-
-
-
-
-/***************************************************************************
-
Tandy Radio Shack Computerized Arcade (1981, 1982, 1995)
* TMS1100 MCU, labeled CD7282SL
- * 12 lamps behind buttons, 1-bit sound
+ * 12 lamps behind buttons, 1bit sound
This handheld contains 12 minigames. It looks and plays like "Fabulous Fred"
by the Japanese company Mego Corp. in 1980, which in turn is a mix of Merlin
@@ -4650,7 +4126,6 @@ static INPUT_PORTS_START( tandy12 )
INPUT_PORTS_END
-// output PLA is not decapped
static const UINT16 tandy12_output_pla[0x20] =
{
// these are certain
@@ -4666,7 +4141,7 @@ static const UINT16 tandy12_output_pla[0x20] =
static MACHINE_CONFIG_START( tandy12, tandy12_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", TMS1100, 400000) // approximation - RC osc. R=39K, C=47pf
+ MCFG_CPU_ADD("maincpu", TMS1100, 400000) // RC osc. R=39K, C=47pf -> ~400kHz
MCFG_TMS1XXX_OUTPUT_PLA(tandy12_output_pla)
MCFG_TMS1XXX_READ_K_CB(READ8(tandy12_state, read_k))
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(tandy12_state, write_r))
@@ -4691,7 +4166,7 @@ MACHINE_CONFIG_END
* PCB label TOMY B.O.
* TMS1040 MP2726 TOMY WIPE (die labeled MP2726A)
* TMS1025N2LL I/O expander
- * 2-digit 7seg display, 46 other leds, 1-bit sound
+ * 2-digit 7seg display, 46 other leds, 1bit sound
known releases:
- USA: Break Up
@@ -4892,7 +4367,7 @@ MACHINE_CONFIG_END
Tomy Power House Pinball
* PCB label TOMY P-B
* TMS1100 MP1180 TOMY PINB (die labeled MP1180)
- * 3 7seg LEDs, and other LEDs behind bezel, 1-bit sound
+ * 3 7seg LEDs, and other LEDs behind bezel, 1bit sound
known releases:
- USA: Power House Pinball
@@ -4935,7 +4410,10 @@ public:
void phpball_state::prepare_display()
{
- set_display_segmask(7, 0x7f);
+ // R0-R2 are 7segs
+ for (int y = 0; y < 3; y++)
+ m_display_segmask[y] = 0x7f;
+
display_matrix(7, 9, m_o, m_r);
}
@@ -4947,7 +4425,6 @@ WRITE16_MEMBER(phpball_state::write_r)
// R9: input mux
m_inp_mux = data >> 9 & 1;
- // R0-R2: digit select
// R0-R8: led select
m_r = data;
prepare_display();
@@ -4955,7 +4432,7 @@ WRITE16_MEMBER(phpball_state::write_r)
WRITE16_MEMBER(phpball_state::write_o)
{
- // O0-O6: digit segment/led data
+ // O0-O6: led state
// O7: N/C
m_o = data & 0x7f;
prepare_display();
@@ -4992,7 +4469,7 @@ INPUT_CHANGED_MEMBER(phpball_state::flipper_button)
static MACHINE_CONFIG_START( phpball, phpball_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", TMS1100, 375000) // approximation - RC osc. R=47K, C=47pf
+ MCFG_CPU_ADD("maincpu", TMS1100, 375000) // RC osc. R=47K, C=47pf -> ~375kHz
MCFG_TMS1XXX_READ_K_CB(READ8(phpball_state, read_k))
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(phpball_state, write_r))
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(phpball_state, write_o))
@@ -5021,7 +4498,7 @@ ROM_START( mathmagi )
ROM_LOAD( "mp1030", 0x0000, 0x0800, CRC(a81d7ccb) SHA1(4756ce42f1ea28ce5fe6498312f8306f10370969) )
ROM_REGION( 867, "maincpu:mpla", 0 )
- ROM_LOAD( "tms1100_common2_micro.pla", 0, 867, BAD_DUMP CRC(7cc90264) SHA1(c6e1cf1ffb178061da9e31858514f7cd94e86990) ) // not verified
+ ROM_LOAD( "tms1100_common1_micro.pla", 0, 867, BAD_DUMP CRC(62445fc9) SHA1(d6297f2a4bc7a870b76cc498d19dbb0ce7d69fec) ) // not verified
ROM_REGION( 365, "maincpu:opla", 0 )
ROM_LOAD( "tms1100_mathmagi_output.pla", 0, 365, NO_DUMP )
ROM_END
@@ -5038,25 +4515,14 @@ ROM_START( amaztron )
ROM_END
-ROM_START( zodiac )
- ROM_REGION( 0x0800, "maincpu", 0 )
- ROM_LOAD( "mp3435", 0x0000, 0x0800, CRC(ecdc3160) SHA1(a7e82d66314a039fcffeddf99919d9f9ad42d61d) )
-
- ROM_REGION( 867, "maincpu:mpla", 0 )
- ROM_LOAD( "tms1100_common3_micro.pla", 0, 867, BAD_DUMP CRC(03574895) SHA1(04407cabfb3adee2ee5e4218612cb06c12c540f4) ) // not verified
- ROM_REGION( 365, "maincpu:opla", 0 )
- ROM_LOAD( "tms1100_zodiac_output.pla", 0, 365, NO_DUMP )
-ROM_END
-
-
-ROM_START( cqback )
+ROM_START( h2hbaseb )
ROM_REGION( 0x0800, "maincpu", 0 )
- ROM_LOAD( "mp3415.u4", 0x0000, 0x0800, CRC(65ebdabf) SHA1(9b5cf5adaf9132ced87f611ae8c3148b9b62ba89) )
+ ROM_LOAD( "mp1525", 0x0000, 0x0800, CRC(b5d6bf9b) SHA1(2cc9f35f077c1209c46d16ec853af87e4725c2fd) )
ROM_REGION( 867, "maincpu:mpla", 0 )
- ROM_LOAD( "tms1100_common3_micro.pla", 0, 867, CRC(03574895) SHA1(04407cabfb3adee2ee5e4218612cb06c12c540f4) )
+ ROM_LOAD( "tms1100_common1_micro.pla", 0, 867, CRC(62445fc9) SHA1(d6297f2a4bc7a870b76cc498d19dbb0ce7d69fec) )
ROM_REGION( 365, "maincpu:opla", 0 )
- ROM_LOAD( "tms1100_cqback_output.pla", 0, 365, CRC(c6dcbfd0) SHA1(593b6b7de981a28d1b4a33336b39df92d02ed4f4) )
+ ROM_LOAD( "tms1100_h2hbaseb_output.pla", 0, 365, CRC(cb3d7e38) SHA1(6ab4a7c52e6010b7c7158463cb499973e52ff556) )
ROM_END
@@ -5071,17 +4537,6 @@ ROM_START( h2hfootb )
ROM_END
-ROM_START( h2hbaseb )
- ROM_REGION( 0x0800, "maincpu", 0 )
- ROM_LOAD( "mp1525", 0x0000, 0x0800, CRC(b5d6bf9b) SHA1(2cc9f35f077c1209c46d16ec853af87e4725c2fd) )
-
- ROM_REGION( 867, "maincpu:mpla", 0 )
- ROM_LOAD( "tms1100_common1_micro.pla", 0, 867, CRC(62445fc9) SHA1(d6297f2a4bc7a870b76cc498d19dbb0ce7d69fec) )
- ROM_REGION( 365, "maincpu:opla", 0 )
- ROM_LOAD( "tms1100_h2hbaseb_output.pla", 0, 365, CRC(cb3d7e38) SHA1(6ab4a7c52e6010b7c7158463cb499973e52ff556) )
-ROM_END
-
-
ROM_START( tc4 )
ROM_REGION( 0x1000, "maincpu", 0 )
ROM_LOAD( "mp7334", 0x0000, 0x1000, CRC(923f3821) SHA1(a9ae342d7ff8dae1dedcd1e4984bcfae68586581) )
@@ -5093,17 +4548,6 @@ ROM_START( tc4 )
ROM_END
-ROM_START( cnfball2 )
- ROM_REGION( 0x0800, "maincpu", 0 )
- ROM_LOAD( "mp1181", 0x0000, 0x0800, CRC(4553a840) SHA1(2e1132c9bc51641f77ba7f2430b5a3b2766b3a3d) )
-
- ROM_REGION( 867, "maincpu:mpla", 0 )
- ROM_LOAD( "tms1100_common2_micro.pla", 0, 867, BAD_DUMP CRC(7cc90264) SHA1(c6e1cf1ffb178061da9e31858514f7cd94e86990) ) // not verified
- ROM_REGION( 365, "maincpu:opla", 0 )
- ROM_LOAD( "tms1100_cnfball2_output.pla", 0, 365, NO_DUMP )
-ROM_END
-
-
ROM_START( ebball )
ROM_REGION( 0x0400, "maincpu", 0 )
ROM_LOAD( "mp0914", 0x0000, 0x0400, CRC(3c6fb05b) SHA1(b2fe4b3ca72d6b4c9bfa84d67f64afdc215e7178) )
@@ -5397,17 +4841,6 @@ ROM_START( splitsec )
ROM_END
-ROM_START( lostreas )
- ROM_REGION( 0x0800, "maincpu", 0 )
- ROM_LOAD( "m34038", 0x0000, 0x0800, CRC(4c996f63) SHA1(ebbaa8b2f909f4300887aa2dbdb7185eedc75d3f) )
-
- ROM_REGION( 867, "maincpu:mpla", 0 )
- ROM_LOAD( "tms1100_common1_micro.pla", 0, 867, CRC(62445fc9) SHA1(d6297f2a4bc7a870b76cc498d19dbb0ce7d69fec) )
- ROM_REGION( 365, "maincpu:opla", 0 )
- ROM_LOAD( "tms1100_lostreas_output.pla", 0, 365, CRC(c62d850f) SHA1(d25974e6901eb10c52cdda12e6d4a13e26745e6f) )
-ROM_END
-
-
ROM_START( tandy12 )
ROM_REGION( 0x0800, "maincpu", 0 )
ROM_LOAD( "cd7282sl", 0x0000, 0x0800, CRC(a10013dd) SHA1(42ebd3de3449f371b99937f9df39c240d15ac686) )
@@ -5446,14 +4879,10 @@ ROM_END
COMP( 1980, mathmagi, 0, 0, mathmagi, mathmagi, driver_device, 0, "APF Electronics Inc.", "Mathemagician", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW )
CONS( 1979, amaztron, 0, 0, amaztron, amaztron, driver_device, 0, "Coleco", "Amaze-A-Tron", MACHINE_SUPPORTS_SAVE )
-COMP( 1979, zodiac, 0, 0, zodiac, zodiac, driver_device, 0, "Coleco", "Zodiac - The Astrology Computer", MACHINE_SUPPORTS_SAVE )
-CONS( 1978, cqback, 0, 0, cqback, cqback, driver_device, 0, "Coleco", "Electronic Quarterback", MACHINE_SUPPORTS_SAVE )
-CONS( 1980, h2hfootb, 0, 0, h2hfootb, h2hfootb, driver_device, 0, "Coleco", "Head to Head Football", MACHINE_SUPPORTS_SAVE )
CONS( 1980, h2hbaseb, 0, 0, h2hbaseb, h2hbaseb, driver_device, 0, "Coleco", "Head to Head Baseball", MACHINE_SUPPORTS_SAVE )
+CONS( 1980, h2hfootb, 0, 0, h2hfootb, h2hfootb, driver_device, 0, "Coleco", "Head to Head Football", MACHINE_SUPPORTS_SAVE )
CONS( 1981, tc4, 0, 0, tc4, tc4, driver_device, 0, "Coleco", "Total Control 4", MACHINE_SUPPORTS_SAVE )
-CONS( 1979, cnfball2, 0, 0, cnfball2, cnfball2, driver_device, 0, "Conic", "Electronic Football II (Conic)", MACHINE_SUPPORTS_SAVE )
-
CONS( 1979, ebball, 0, 0, ebball, ebball, driver_device, 0, "Entex", "Electronic Baseball (Entex)", MACHINE_SUPPORTS_SAVE )
CONS( 1979, ebball2, 0, 0, ebball2, ebball2, driver_device, 0, "Entex", "Electronic Baseball 2 (Entex)", MACHINE_SUPPORTS_SAVE )
CONS( 1980, ebball3, 0, 0, ebball3, ebball3, driver_device, 0, "Entex", "Electronic Baseball 3 (Entex)", MACHINE_SUPPORTS_SAVE )
@@ -5475,20 +4904,19 @@ COMP( 1979, astro, 0, 0, astro, astro, driver_device, 0, "Kos
CONS( 1980, mdndclab, 0, 0, mdndclab, mdndclab, driver_device, 0, "Mattel", "Dungeons & Dragons - Computer Labyrinth Game", MACHINE_SUPPORTS_SAVE ) // ***
CONS( 1977, comp4, 0, 0, comp4, comp4, driver_device, 0, "Milton Bradley", "Comp IV", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW )
-CONS( 1978, simon, 0, 0, simon, simon, driver_device, 0, "Milton Bradley", "Simon (Rev. A)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
-CONS( 1979, ssimon, 0, 0, ssimon, ssimon, driver_device, 0, "Milton Bradley", "Super Simon", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
+CONS( 1978, simon, 0, 0, simon, simon, driver_device, 0, "Milton Bradley", "Simon (Rev. A)", MACHINE_SUPPORTS_SAVE )
+CONS( 1979, ssimon, 0, 0, ssimon, ssimon, driver_device, 0, "Milton Bradley", "Super Simon", MACHINE_SUPPORTS_SAVE )
CONS( 1979, bigtrak, 0, 0, bigtrak, bigtrak, driver_device, 0, "Milton Bradley", "Big Trak", MACHINE_SUPPORTS_SAVE | MACHINE_MECHANICAL ) // ***
CONS( 1977, cnsector, 0, 0, cnsector, cnsector, driver_device, 0, "Parker Brothers", "Code Name: Sector", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) // ***
-CONS( 1978, merlin, 0, 0, merlin, merlin, driver_device, 0, "Parker Brothers", "Merlin - The Electronic Wizard", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
+CONS( 1978, merlin, 0, 0, merlin, merlin, driver_device, 0, "Parker Brothers", "Merlin - The Electronic Wizard", MACHINE_SUPPORTS_SAVE )
CONS( 1979, stopthie, 0, 0, stopthief, stopthief, driver_device, 0, "Parker Brothers", "Stop Thief (Electronic Crime Scanner)", MACHINE_SUPPORTS_SAVE ) // ***
CONS( 1979, stopthiep, stopthie, 0, stopthief, stopthief, driver_device, 0, "Parker Brothers", "Stop Thief (Electronic Crime Scanner) (patent)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
CONS( 1980, bankshot, 0, 0, bankshot, bankshot, driver_device, 0, "Parker Brothers", "Bank Shot - Electronic Pool", MACHINE_SUPPORTS_SAVE )
CONS( 1980, splitsec, 0, 0, splitsec, splitsec, driver_device, 0, "Parker Brothers", "Split Second", MACHINE_SUPPORTS_SAVE )
-CONS( 1982, mmerlin, 0, 0, mmerlin, mmerlin, driver_device, 0, "Parker Brothers", "Master Merlin", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
-CONS( 1982, lostreas, 0, 0, lostreas, lostreas, driver_device, 0, "Parker Brothers", "Lost Treasure - The Electronic Deep-Sea Diving Game (Electronic Dive-Control Center)", MACHINE_SUPPORTS_SAVE ) // ***
+CONS( 1982, mmerlin, 0, 0, mmerlin, mmerlin, driver_device, 0, "Parker Brothers", "Master Merlin", MACHINE_SUPPORTS_SAVE )
-CONS( 1981, tandy12, 0, 0, tandy12, tandy12, driver_device, 0, "Tandy Radio Shack", "Tandy-12: Computerized Arcade", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) // some of the minigames: ***
+CONS( 1981, tandy12, 0, 0, tandy12, tandy12, driver_device, 0, "Tandy Radio Shack", "Tandy-12: Computerized Arcade", MACHINE_SUPPORTS_SAVE ) // some of the minigames: ***
CONS( 1979, tbreakup, 0, 0, tbreakup, tbreakup, driver_device, 0, "Tomy", "Break Up (Tomy)", MACHINE_SUPPORTS_SAVE )
CONS( 1980, phpball, 0, 0, phpball, phpball, driver_device, 0, "Tomy", "Power House Pinball", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
diff --git a/src/mame/drivers/hh_ucom4.cpp b/src/mame/drivers/hh_ucom4.cpp
index 9eaf283d33f..b78b15a40d3 100644
--- a/src/mame/drivers/hh_ucom4.cpp
+++ b/src/mame/drivers/hh_ucom4.cpp
@@ -46,7 +46,7 @@
@512 uPD557LC 1980, Castle Toy Tactix
- @060 uPD650C 1979, Mattel Computer Gin
+ *060 uPD650C 1979, Mattel Computer Gin
*085 uPD650C 1980, Roland TR-808
*127 uPD650C 198?, Sony OA-S1100 Typecorder (subcpu, have dump)
128 uPD650C 1981, Roland TR-606 -> tr606.cpp
@@ -65,7 +65,6 @@ TODO:
// internal artwork
#include "efball.lh"
-#include "mcompgin.lh"
#include "mvbfree.lh"
#include "tactix.lh" // clickable
@@ -188,7 +187,7 @@ void hh_ucom4_state::set_display_size(int maxx, int maxy)
m_display_maxy = maxy;
}
-void hh_ucom4_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety, bool update)
+void hh_ucom4_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety)
{
set_display_size(maxx, maxy);
@@ -197,13 +196,10 @@ void hh_ucom4_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety
for (int y = 0; y < maxy; y++)
m_display_state[y] = (sety >> y & 1) ? ((setx & mask) | (1 << maxx)) : 0;
- if (update)
- display_update();
+ display_update();
}
-// generic input handlers
-
UINT8 hh_ucom4_state::read_inputs(int columns)
{
UINT8 ret = 0;
@@ -1584,79 +1580,6 @@ MACHINE_CONFIG_END
/***************************************************************************
- Mattel Computer Gin
- * NEC uCOM-43 MCU, labeled D650C 060
-
-***************************************************************************/
-
-class mcompgin_state : public hh_ucom4_state
-{
-public:
- mcompgin_state(const machine_config &mconfig, device_type type, const char *tag)
- : hh_ucom4_state(mconfig, type, tag)
- { }
-
- void prepare_display();
- DECLARE_WRITE8_MEMBER(unk_w);
-};
-
-// handlers
-
-void mcompgin_state::prepare_display()
-{
-}
-
-WRITE8_MEMBER(mcompgin_state::unk_w)
-{
- // E=lcd
-}
-
-
-// config
-
-static INPUT_PORTS_START( mcompgin )
- PORT_START("IN.0") // port A
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) // 21 select
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) // 23 deal
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) // 22 discard
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 ) // 20 draw
-
- PORT_START("IN.1") // port B
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON5 ) // 24 comp
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON6 ) // 25 score
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON7 )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON8 )
-INPUT_PORTS_END
-
-static MACHINE_CONFIG_START( mcompgin, mcompgin_state )
-
- /* basic machine hardware */
- MCFG_CPU_ADD("maincpu", NEC_D650, 400000) // approximation
- MCFG_UCOM4_READ_A_CB(IOPORT("IN.0"))
- MCFG_UCOM4_READ_B_CB(IOPORT("IN.1"))
- MCFG_UCOM4_WRITE_C_CB(WRITE8(mcompgin_state, unk_w))
- MCFG_UCOM4_WRITE_D_CB(WRITE8(mcompgin_state, unk_w))
- MCFG_UCOM4_WRITE_E_CB(WRITE8(mcompgin_state, unk_w))
- MCFG_UCOM4_WRITE_F_CB(WRITE8(mcompgin_state, unk_w))
- MCFG_UCOM4_WRITE_G_CB(WRITE8(mcompgin_state, unk_w))
- MCFG_UCOM4_WRITE_H_CB(WRITE8(mcompgin_state, unk_w))
- MCFG_UCOM4_WRITE_I_CB(WRITE8(mcompgin_state, unk_w))
-
- MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_mcompgin)
-
- /* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
-MACHINE_CONFIG_END
-
-
-
-
-
-/***************************************************************************
-
Mego Mini-Vid Break Free (manufactured in Japan)
* PCB label Mego 79 rev F
* NEC uCOM-43 MCU, labeled D553C 049
@@ -2521,12 +2444,6 @@ ROM_START( edracula )
ROM_END
-ROM_START( mcompgin )
- ROM_REGION( 0x0800, "maincpu", 0 )
- ROM_LOAD( "d650c-060", 0x0000, 0x0800, BAD_DUMP CRC(92a4d8be) SHA1(d67f14a2eb53b79a7d9eb08103325299bc643781) ) // d5 stuck: xx1x xxxx
-ROM_END
-
-
ROM_START( mvbfree )
ROM_REGION( 0x0800, "maincpu", 0 )
ROM_LOAD( "d553c-049", 0x0000, 0x0800, CRC(d64a8399) SHA1(97887e486fa29b1fc4a5a40cacf3c960f67aacbf) )
@@ -2579,7 +2496,7 @@ CONS( 1980, splasfgt, 0, 0, splasfgt, splasfgt, driver_device, 0, "Bambin
CONS( 1982, bcclimbr, 0, 0, bcclimbr, bcclimbr, driver_device, 0, "Bandai", "Crazy Climber (Bandai)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
-CONS( 1980, tactix, 0, 0, tactix, tactix, driver_device, 0, "Castle Toy", "Tactix (Castle Toy)", MACHINE_SUPPORTS_SAVE )
+CONS( 1980, tactix, 0, 0, tactix, tactix, driver_device, 0, "Castle Toy", "Tactix", MACHINE_SUPPORTS_SAVE )
CONS( 1980, invspace, 0, 0, invspace, invspace, driver_device, 0, "Epoch", "Invader From Space", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
CONS( 1980, efball, 0, 0, efball, efball, driver_device, 0, "Epoch", "Electronic Football (Epoch)", MACHINE_SUPPORTS_SAVE )
@@ -2587,8 +2504,6 @@ CONS( 1981, galaxy2, 0, 0, galaxy2, galaxy2, driver_device, 0, "Epoch"
CONS( 1982, astrocmd, 0, 0, astrocmd, astrocmd, driver_device, 0, "Epoch", "Astro Command", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
CONS( 1982, edracula, 0, 0, edracula, edracula, driver_device, 0, "Epoch", "Dracula (Epoch)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
-CONS( 1979, mcompgin, 0, 0, mcompgin, mcompgin, driver_device, 0, "Mattel", "Computer Gin", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
-
CONS( 1979, mvbfree, 0, 0, mvbfree, mvbfree, driver_device, 0, "Mego", "Mini-Vid Break Free", MACHINE_SUPPORTS_SAVE )
CONS( 1980, tccombat, 0, 0, tccombat, tccombat, driver_device, 0, "Tomy", "Cosmic Combat", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
diff --git a/src/mame/drivers/horizon.cpp b/src/mame/drivers/horizon.cpp
index 8a0badd1c4b..11076e517f2 100644
--- a/src/mame/drivers/horizon.cpp
+++ b/src/mame/drivers/horizon.cpp
@@ -168,7 +168,7 @@ static MACHINE_CONFIG_START( horizon, horizon_state )
// S-100
MCFG_S100_BUS_ADD()
- MCFG_S100_RDY_CALLBACK(INPUTLINE(Z80_TAG, Z80_INPUT_LINE_BOGUSWAIT))
+ MCFG_S100_RDY_CALLBACK(INPUTLINE(Z80_TAG, Z80_INPUT_LINE_WAIT))
//MCFG_S100_SLOT_ADD("s100_1", horizon_s100_cards, NULL, NULL) // CPU
MCFG_S100_SLOT_ADD("s100_2", horizon_s100_cards, nullptr) // RAM
MCFG_S100_SLOT_ADD("s100_3", horizon_s100_cards, "mdsad") // MDS
diff --git a/src/mame/drivers/hornet.cpp b/src/mame/drivers/hornet.cpp
index b1df15c8419..49200920f36 100644
--- a/src/mame/drivers/hornet.cpp
+++ b/src/mame/drivers/hornet.cpp
@@ -478,9 +478,9 @@ WRITE_LINE_MEMBER(hornet_state::voodoo_vblank_1)
UINT32 hornet_state::screen_update_hornet(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- voodoo_device* voodoo = (voodoo_device*)machine().device("voodoo0");
+ device_t *voodoo = machine().device("voodoo0");
- voodoo->voodoo_update(bitmap, cliprect);
+ voodoo_update(voodoo, bitmap, cliprect);
m_k037122_1->tile_draw(screen, bitmap, cliprect);
@@ -493,16 +493,16 @@ UINT32 hornet_state::screen_update_hornet_2board(screen_device &screen, bitmap_r
{
if (strcmp(screen.tag(), ":lscreen") == 0)
{
- voodoo_device *voodoo = (voodoo_device*)machine().device("voodoo0");
- voodoo->voodoo_update(bitmap, cliprect);
+ device_t *voodoo = machine().device("voodoo0");
+ voodoo_update(voodoo, bitmap, cliprect);
/* TODO: tilemaps per screen */
m_k037122_1->tile_draw(screen, bitmap, cliprect);
}
else if (strcmp(screen.tag(), ":rscreen") == 0)
{
- voodoo_device *voodoo = (voodoo_device*)machine().device("voodoo1");
- voodoo->voodoo_update(bitmap, cliprect);
+ device_t *voodoo = machine().device("voodoo1");
+ voodoo_update(voodoo, bitmap, cliprect);
/* TODO: tilemaps per screen */
m_k037122_2->tile_draw(screen, bitmap, cliprect);
diff --git a/src/mame/drivers/hp9845.cpp b/src/mame/drivers/hp9845.cpp
index 7f83f001fe3..2936cae3228 100644
--- a/src/mame/drivers/hp9845.cpp
+++ b/src/mame/drivers/hp9845.cpp
@@ -16,12 +16,12 @@
// - LPU & PPU ROMs
// - LPU & PPU RAMs
// - Text mode screen
-// - Keyboard
-// - T15 tape drive
+// - Keyboard (most of keys)
// What's not yet in:
// - Beeper
+// - Rest of keyboard
// - Graphic screen
-// - Better naming of tape drive image (it's now "magt", should be "t15")
+// - Tape drive (this needs some heavy RE of the TACO chip)
// - Better documentation of this file
// - Software list to load optional ROMs
// What's wrong:
@@ -33,7 +33,6 @@
#include "cpu/z80/z80.h"
#include "softlist.h"
#include "cpu/hphybrid/hphybrid.h"
-#include "machine/hp_taco.h"
#define BIT_MASK(n) (1U << (n))
@@ -78,8 +77,7 @@ public:
m_io_key0(*this , "KEY0"),
m_io_key1(*this , "KEY1"),
m_io_key2(*this , "KEY2"),
- m_io_key3(*this , "KEY3"),
- m_t15(*this , "t15")
+ m_io_key3(*this , "KEY3")
{ }
UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
@@ -92,7 +90,7 @@ public:
void vblank_w(screen_device &screen, bool state);
IRQ_CALLBACK_MEMBER(irq_callback);
- void update_irq(void);
+ void update_irl(void);
TIMER_DEVICE_CALLBACK_MEMBER(kb_scan);
DECLARE_READ16_MEMBER(kb_scancode_r);
@@ -101,10 +99,6 @@ public:
DECLARE_WRITE8_MEMBER(pa_w);
- DECLARE_WRITE_LINE_MEMBER(t15_irq_w);
- DECLARE_WRITE_LINE_MEMBER(t15_flg_w);
- DECLARE_WRITE_LINE_MEMBER(t15_sts_w);
-
private:
required_device<hp_5061_3001_cpu_device> m_lpu;
required_device<hp_5061_3001_cpu_device> m_ppu;
@@ -113,7 +107,6 @@ private:
required_ioport m_io_key1;
required_ioport m_io_key2;
required_ioport m_io_key3;
- required_device<hp_taco_device> m_t15;
void set_video_mar(UINT16 mar);
void video_fill_buff(bool buff_idx);
@@ -143,15 +136,12 @@ private:
// Interrupt handling
UINT8 m_irl_pending;
- UINT8 m_irh_pending;
// State of keyboard
ioport_value m_kb_state[ 4 ];
UINT8 m_kb_scancode;
UINT16 m_kb_status;
- // State of PPU I/O
- UINT8 m_ppu_pa;
};
static INPUT_PORTS_START(hp9845b)
@@ -332,13 +322,10 @@ void hp9845b_state::machine_reset()
m_video_frame = 0;
m_irl_pending = 0;
- m_irh_pending = 0;
memset(&m_kb_state[ 0 ] , 0 , sizeof(m_kb_state));
m_kb_scancode = 0x7f;
m_kb_status = 0;
-
- m_ppu_pa = 0;
}
void hp9845b_state::set_video_mar(UINT16 mar)
@@ -492,14 +479,13 @@ IRQ_CALLBACK_MEMBER(hp9845b_state::irq_callback)
if (irqline == HPHYBRID_IRL) {
return m_irl_pending;
} else {
- return m_irh_pending;
+ return 0;
}
}
-void hp9845b_state::update_irq(void)
+void hp9845b_state::update_irl(void)
{
m_ppu->set_input_line(HPHYBRID_IRL , m_irl_pending != 0);
- m_ppu->set_input_line(HPHYBRID_IRH , m_irh_pending != 0);
}
TIMER_DEVICE_CALLBACK_MEMBER(hp9845b_state::kb_scan)
@@ -560,7 +546,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(hp9845b_state::kb_scan)
m_kb_scancode = i;
BIT_SET(m_irl_pending , 0);
BIT_SET(m_kb_status, 0);
- update_irq();
+ update_irl();
// Special case: pressing stop key sets LPU "status" flag
if (i == 0x47) {
@@ -586,50 +572,24 @@ WRITE16_MEMBER(hp9845b_state::kb_irq_clear_w)
{
BIT_CLR(m_irl_pending , 0);
BIT_CLR(m_kb_status, 0);
- update_irq();
+ update_irl();
m_lpu->status_w(0);
// TODO: beeper start
}
WRITE8_MEMBER(hp9845b_state::pa_w)
{
- m_ppu_pa = data;
-
// TODO: handle sts & flg
- if (data == 15) {
- // RHS tape drive (T15)
- m_ppu->status_w(m_t15->sts_r());
- m_ppu->flag_w(m_t15->flg_r());
+ if (data == 0xf) {
+ // RHS tape drive (T15)
+ m_ppu->status_w(1);
+ m_ppu->flag_w(1);
} else {
m_ppu->status_w(0);
m_ppu->flag_w(0);
}
}
-WRITE_LINE_MEMBER(hp9845b_state::t15_irq_w)
-{
- if (state) {
- BIT_SET(m_irh_pending , 7);
- } else {
- BIT_CLR(m_irh_pending , 7);
- }
- update_irq();
-}
-
-WRITE_LINE_MEMBER(hp9845b_state::t15_flg_w)
-{
- if (m_ppu_pa == 15) {
- m_ppu->flag_w(state);
- }
-}
-
-WRITE_LINE_MEMBER(hp9845b_state::t15_sts_w)
-{
- if (m_ppu_pa == 15) {
- m_ppu->status_w(state);
- }
-}
-
static MACHINE_CONFIG_START( hp9845a, hp9845_state )
//MCFG_CPU_ADD("lpu", HP_5061_3010, XTAL_11_4MHz)
//MCFG_CPU_ADD("ppu", HP_5061_3011, XTAL_11_4MHz)
@@ -678,9 +638,6 @@ static ADDRESS_MAP_START(ppu_io_map , AS_IO , 16 , hp9845b_state)
// PA = 0, IC = 3
// Keyboard status input & keyboard interrupt clear
AM_RANGE(HP_MAKE_IOADDR(0 , 3) , HP_MAKE_IOADDR(0 , 3)) AM_READWRITE(kb_status_r , kb_irq_clear_w)
- // PA = 15, IC = 0..3
- // Right-hand side tape drive (T15)
- AM_RANGE(HP_MAKE_IOADDR(15 , 0) , HP_MAKE_IOADDR(15 , 3)) AM_DEVREADWRITE("t15" , hp_taco_device , reg_r , reg_w)
ADDRESS_MAP_END
static MACHINE_CONFIG_START( hp9845b, hp9845b_state )
@@ -706,12 +663,6 @@ static MACHINE_CONFIG_START( hp9845b, hp9845b_state )
// Actual keyboard refresh rate should be KEY_SCAN_OSCILLATOR / 128 (2560 Hz)
MCFG_TIMER_DRIVER_ADD_PERIODIC("kb_timer" , hp9845b_state , kb_scan , attotime::from_hz(100))
- // Tape controller
- MCFG_DEVICE_ADD("t15" , HP_TACO , 4000000)
- MCFG_TACO_IRQ_HANDLER(WRITELINE(hp9845b_state , t15_irq_w))
- MCFG_TACO_FLG_HANDLER(WRITELINE(hp9845b_state , t15_flg_w))
- MCFG_TACO_STS_HANDLER(WRITELINE(hp9845b_state , t15_sts_w))
-
MCFG_SOFTWARE_LIST_ADD("optrom_list", "hp9845b_rom")
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/iteagle.cpp b/src/mame/drivers/iteagle.cpp
index ff6b387bc45..2ff0a30f1bb 100644
--- a/src/mame/drivers/iteagle.cpp
+++ b/src/mame/drivers/iteagle.cpp
@@ -179,7 +179,7 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( gtfore01, iteagle )
MCFG_DEVICE_MODIFY(PCI_ID_FPGA)
- MCFG_ITEAGLE_FPGA_INIT(0x00000401, 0x0b0b0b)
+ MCFG_ITEAGLE_FPGA_INIT(0x01000401, 0x0b0b0b)
MCFG_DEVICE_MODIFY(PCI_ID_EEPROM)
MCFG_ITEAGLE_EEPROM_INIT(0x0401, 0x7)
MACHINE_CONFIG_END
@@ -187,7 +187,7 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( gtfore02, iteagle )
MCFG_DEVICE_MODIFY(PCI_ID_FPGA)
MCFG_ITEAGLE_FPGA_INIT(0x01000402, 0x020201)
- MCFG_DEVICE_MODIFY(PCI_ID_EEPROM)
+ MCFG_DEVICE_MODIFY(":pci:0a.0")
MCFG_ITEAGLE_EEPROM_INIT(0x0402, 0x7)
MACHINE_CONFIG_END
@@ -215,28 +215,28 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( gtfore06, iteagle )
MCFG_DEVICE_MODIFY(PCI_ID_FPGA)
MCFG_ITEAGLE_FPGA_INIT(0x01000406, 0x0c0b0d)
- MCFG_DEVICE_MODIFY(PCI_ID_EEPROM)
+ MCFG_DEVICE_MODIFY(":pci:0a.0")
MCFG_ITEAGLE_EEPROM_INIT(0x0406, 0x9);
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( carnking, iteagle )
MCFG_DEVICE_MODIFY(PCI_ID_FPGA)
- MCFG_ITEAGLE_FPGA_INIT(0x01000a01, 0x0e0a0a)
+ MCFG_ITEAGLE_FPGA_INIT(0x01000603, 0x0c0b0d)
MCFG_DEVICE_MODIFY(PCI_ID_EEPROM)
- MCFG_ITEAGLE_EEPROM_INIT(0x0a01, 0x9)
+ MCFG_ITEAGLE_EEPROM_INIT(0x0603, 0x9)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( bbhsc, iteagle )
MCFG_DEVICE_MODIFY(PCI_ID_FPGA)
- MCFG_ITEAGLE_FPGA_INIT(0x02000600, 0x0c0a0a)
+ MCFG_ITEAGLE_FPGA_INIT(0x01000600, 0x0c0a0a)
MCFG_DEVICE_MODIFY(PCI_ID_EEPROM)
- MCFG_ITEAGLE_EEPROM_INIT(0x0000, 0x7)
+ MCFG_ITEAGLE_EEPROM_INIT(0x0600, 0x9)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( bbhcotw, iteagle )
MCFG_DEVICE_MODIFY(PCI_ID_FPGA)
MCFG_ITEAGLE_FPGA_INIT(0x02000603, 0x080704)
- MCFG_DEVICE_MODIFY(PCI_ID_EEPROM)
+ MCFG_DEVICE_MODIFY(":pci:0a.0")
MCFG_ITEAGLE_EEPROM_INIT(0x0603, 0x9)
MACHINE_CONFIG_END
@@ -331,7 +331,7 @@ static INPUT_PORTS_START( virtpool )
INPUT_PORTS_END
-static INPUT_PORTS_START( bbh )
+static INPUT_PORTS_START( bbhcotw )
PORT_INCLUDE( iteagle )
PORT_MODIFY("IN1")
@@ -557,7 +557,7 @@ ROM_END
GAME( 2000, iteagle, 0, iteagle, iteagle, driver_device, 0, ROT0, "Incredible Technologies", "Eagle BIOS", MACHINE_IS_BIOS_ROOT )
GAME( 1998, virtpool, iteagle, virtpool, virtpool, driver_device, 0, ROT0, "Incredible Technologies", "Virtual Pool", MACHINE_NOT_WORKING ) // random lockups on loading screens
-GAME( 2002, carnking, iteagle, carnking, bbh, driver_device, 0, ROT0, "Incredible Technologies", "Carnival King (v1.00.11)", 0 )
+GAME( 2002, carnking, iteagle, carnking, iteagle, driver_device, 0, ROT0, "Incredible Technologies", "Carnival King (v1.00.11)", MACHINE_NOT_WORKING )
GAME( 2000, gtfore01, iteagle, gtfore01, iteagle, driver_device, 0, ROT0, "Incredible Technologies", "Golden Tee Fore! (v1.00.25)", 0 )
GAME( 2001, gtfore02, iteagle, gtfore02, iteagle, driver_device, 0, ROT0, "Incredible Technologies", "Golden Tee Fore! 2002 (v2.01.06)", 0 )
GAME( 2002, gtfore03, iteagle, gtfore03, iteagle, driver_device, 0, ROT0, "Incredible Technologies", "Golden Tee Fore! 2003 (v3.00.10)", 0 )
@@ -569,5 +569,5 @@ GAME( 2004, gtfore05a, gtfore05, gtfore05, iteagle, driver_device, 0, ROT0, "I
GAME( 2004, gtfore05b, gtfore05, gtfore05, iteagle, driver_device, 0, ROT0, "Incredible Technologies", "Golden Tee Fore! 2005 Extra (v5.01.00)", 0 )
GAME( 2004, gtfore05c, gtfore05, gtfore05, iteagle, driver_device, 0, ROT0, "Incredible Technologies", "Golden Tee Fore! 2005 Extra (v5.00.00)", 0 )
GAME( 2005, gtfore06, iteagle, gtfore06, iteagle, driver_device, 0, ROT0, "Incredible Technologies", "Golden Tee Fore! 2006 Complete (v6.00.01)", 0 )
-GAME( 2002, bbhsc, iteagle, bbhsc, bbh, driver_device, 0, ROT0, "Incredible Technologies", "Big Buck Hunter - Shooter's Challenge (v1.50.07)", MACHINE_NOT_WORKING ) // doesn't boot
-GAME( 2006, bbhcotw, iteagle, bbhcotw, bbh, driver_device, 0, ROT0, "Incredible Technologies", "Big Buck Hunter Call of the Wild (v3.02.5)", MACHINE_NOT_WORKING ) // random lockups
+GAME( 2002, bbhsc, iteagle, bbhsc, iteagle, driver_device, 0, ROT0, "Incredible Technologies", "Big Buck Hunter - Shooter's Challenge (v1.50.07)", MACHINE_NOT_WORKING ) // doesn't boot
+GAME( 2006, bbhcotw, iteagle, bbhcotw, bbhcotw, driver_device, 0, ROT0, "Incredible Technologies", "Big Buck Hunter Call of the Wild (v3.02.5)", MACHINE_NOT_WORKING ) // random lockups
diff --git a/src/mame/drivers/itgamble.cpp b/src/mame/drivers/itgamble.cpp
index c4caaa27b74..8c9cf972924 100644
--- a/src/mame/drivers/itgamble.cpp
+++ b/src/mame/drivers/itgamble.cpp
@@ -713,4 +713,4 @@ GAME( 200?, abacus, 0, itgamble, itgamble, driver_device, 0, ROT0, "<u
GAME( 200?, bookthr, 0, itgamble, itgamble, driver_device, 0, ROT0, "<unknown>", "Book Theatre (Ver 1.2)", MACHINE_IS_SKELETON )
/* different hardware */
-GAME( 2000, mnumber, 0, mnumber, itgamble, driver_device, 0, ROT0, "MM / BRL Bologna", "Mystery Number", MACHINE_IS_SKELETON )
+GAME( 200?, mnumber, 0, mnumber, itgamble, driver_device, 0, ROT0, "M.M. - B.R.L.", "Mystery Number", MACHINE_IS_SKELETON )
diff --git a/src/mame/drivers/jangou.cpp b/src/mame/drivers/jangou.cpp
index d8dd8401ba7..a72c7c1a9b6 100644
--- a/src/mame/drivers/jangou.cpp
+++ b/src/mame/drivers/jangou.cpp
@@ -32,9 +32,9 @@ $c088-$c095 player tiles
#include "sound/hc55516.h"
#include "sound/msm5205.h"
#include "video/resnet.h"
-#include "video/jangou_blitter.h"
#include "machine/nvram.h"
+
#define MASTER_CLOCK XTAL_19_968MHz
class jangou_state : public driver_device
@@ -47,8 +47,7 @@ public:
m_nsc(*this, "nsc"),
m_msm(*this, "msm"),
m_cvsd(*this, "cvsd"),
- m_palette(*this, "palette"),
- m_blitter(*this, "blitter") { }
+ m_palette(*this, "palette") { }
/* sound-related */
// Jangou CVSD Sound
@@ -71,9 +70,13 @@ public:
optional_device<msm5205_device> m_msm;
optional_device<hc55516_device> m_cvsd;
required_device<palette_device> m_palette;
- required_device<jangou_blitter_device> m_blitter;
/* video-related */
+ UINT8 m_pen_data[0x10];
+ UINT8 m_blit_data[6];
+ UINT8 m_blit_buffer[256 * 256];
+ DECLARE_WRITE8_MEMBER(blitter_process_w);
+ DECLARE_WRITE8_MEMBER(blit_vregs_w);
DECLARE_WRITE8_MEMBER(mux_w);
DECLARE_WRITE8_MEMBER(output_w);
DECLARE_WRITE8_MEMBER(sound_latch_w);
@@ -99,9 +102,9 @@ public:
DECLARE_MACHINE_RESET(common);
UINT32 screen_update_jangou(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
TIMER_CALLBACK_MEMBER(cvsd_bit_timer_callback);
+ UINT8 jangou_gfx_nibble( UINT16 niboffset );
+ void plot_jangou_gfx_pixel( UINT8 pix, int x, int y );
DECLARE_WRITE_LINE_MEMBER(jngolady_vclk_cb);
-
- std::unique_ptr<bitmap_ind16> m_tmp_bitmap;
};
@@ -154,7 +157,7 @@ PALETTE_INIT_MEMBER(jangou_state, jangou)
void jangou_state::video_start()
{
- m_tmp_bitmap = std::make_unique<bitmap_ind16>(256, 256);
+ save_item(NAME(m_blit_buffer));
}
UINT32 jangou_state::screen_update_jangou(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
@@ -163,8 +166,8 @@ UINT32 jangou_state::screen_update_jangou(screen_device &screen, bitmap_ind16 &b
for (y = cliprect.min_y; y <= cliprect.max_y; ++y)
{
- UINT8 *src = &m_blitter->m_blit_buffer[y * 256 + cliprect.min_x];
- UINT16 *dst = &m_tmp_bitmap->pix16(y, cliprect.min_x);
+ UINT8 *src = &m_blit_buffer[y * 512 / 2 + cliprect.min_x];
+ UINT16 *dst = &bitmap.pix16(y, cliprect.min_x);
for (x = cliprect.min_x; x <= cliprect.max_x; x += 2)
{
@@ -173,13 +176,101 @@ UINT32 jangou_state::screen_update_jangou(screen_device &screen, bitmap_ind16 &b
*dst++ = m_palette->pen((srcpix >> 4) & 0xf);
}
}
- //void copybitmap(bitmap_rgb32 &dest, const bitmap_rgb32 &src, int flipx, int flipy, INT32 destx, INT32 desty, const rectangle &cliprect)
-
- copybitmap(bitmap, *m_tmp_bitmap, flip_screen(), flip_screen(),0,0, cliprect);
return 0;
}
+/*
+Blitter Memory Map:
+
+src lo word[$12]
+src hi word[$13]
+x [$14]
+y [$15]
+h [$16]
+w [$17]
+*/
+
+UINT8 jangou_state::jangou_gfx_nibble( UINT16 niboffset )
+{
+ const UINT8 *const blit_rom = memregion("gfx")->base();
+
+ if (niboffset & 1)
+ return (blit_rom[(niboffset >> 1) & 0xffff] & 0xf0) >> 4;
+ else
+ return (blit_rom[(niboffset >> 1) & 0xffff] & 0x0f);
+}
+
+void jangou_state::plot_jangou_gfx_pixel( UINT8 pix, int x, int y )
+{
+ if (y < 0 || y >= 512)
+ return;
+ if (x < 0 || x >= 512)
+ return;
+
+ if (x & 1)
+ m_blit_buffer[(y * 256) + (x >> 1)] = (m_blit_buffer[(y * 256) + (x >> 1)] & 0x0f) | ((pix << 4) & 0xf0);
+ else
+ m_blit_buffer[(y * 256) + (x >> 1)] = (m_blit_buffer[(y * 256) + (x >> 1)] & 0xf0) | (pix & 0x0f);
+}
+
+WRITE8_MEMBER(jangou_state::blitter_process_w)
+{
+ int src, x, y, h, w, flipx;
+ m_blit_data[offset] = data;
+
+ if (offset == 5)
+ {
+ int count = 0;
+ int xcount, ycount;
+
+ /* printf("%02x %02x %02x %02x %02x %02x\n", m_blit_data[0], m_blit_data[1], m_blit_data[2],
+ m_blit_data[3], m_blit_data[4], m_blit_data[5]); */
+ w = (m_blit_data[4] & 0xff) + 1;
+ h = (m_blit_data[5] & 0xff) + 1;
+ src = ((m_blit_data[1] << 8)|(m_blit_data[0] << 0));
+ x = (m_blit_data[2] & 0xff);
+ y = (m_blit_data[3] & 0xff);
+
+ // lowest bit of src controls flipping / draw direction?
+ flipx = (m_blit_data[0] & 1);
+
+ if (!flipx)
+ src += (w * h) - 1;
+ else
+ src -= (w * h) - 1;
+
+ for (ycount = 0; ycount < h; ycount++)
+ {
+ for(xcount = 0; xcount < w; xcount++)
+ {
+ int drawx = (x + xcount) & 0xff;
+ int drawy = (y + ycount) & 0xff;
+ UINT8 dat = jangou_gfx_nibble(src + count);
+ UINT8 cur_pen_hi = m_pen_data[(dat & 0xf0) >> 4];
+ UINT8 cur_pen_lo = m_pen_data[(dat & 0x0f) >> 0];
+
+ dat = cur_pen_lo | (cur_pen_hi << 4);
+
+ if ((dat & 0xff) != 0)
+ plot_jangou_gfx_pixel(dat, drawx, drawy);
+
+ if (!flipx)
+ count--;
+ else
+ count++;
+ }
+ }
+ }
+}
+
+/* What is the bit 5 (0x20) for?*/
+WRITE8_MEMBER(jangou_state::blit_vregs_w)
+{
+ // printf("%02x %02x\n", offset, data);
+ m_pen_data[offset] = data & 0xf;
+}
+
/*************************************
*
* I/O
@@ -194,13 +285,13 @@ WRITE8_MEMBER(jangou_state::mux_w)
WRITE8_MEMBER(jangou_state::output_w)
{
/*
- --x- ---- ? (polls between high and low in irq routine, most likely irq mask)
+ --x- ---- ? (polls between high and low in irq routine,probably signals the vblank routine)
---- -x-- flip screen
---- ---x coin counter
*/
// printf("%02x\n", data);
machine().bookkeeping().coin_counter_w(0, data & 0x01);
- flip_screen_set(data & 0x04);
+// flip_screen_set(data & 0x04);
// machine().bookkeeping().coin_lockout_w(0, ~data & 0x20);
}
@@ -324,10 +415,11 @@ static ADDRESS_MAP_START( cpu0_io, AS_IO, 8, jangou_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
AM_RANGE(0x01,0x01) AM_DEVREAD("aysnd", ay8910_device, data_r)
AM_RANGE(0x02,0x03) AM_DEVWRITE("aysnd", ay8910_device, data_address_w)
- AM_RANGE(0x10,0x10) AM_READ_PORT("DSW") AM_WRITE(output_w) //dsw + blitter busy flag
+ AM_RANGE(0x10,0x10) AM_READ_PORT("DSW") //dsw + blitter busy flag
+ AM_RANGE(0x10,0x10) AM_WRITE(output_w)
AM_RANGE(0x11,0x11) AM_WRITE(mux_w)
- AM_RANGE(0x12,0x17) AM_DEVWRITE("blitter",jangou_blitter_device, process_w)
- AM_RANGE(0x20,0x2f) AM_DEVWRITE("blitter",jangou_blitter_device, vregs_w)
+ AM_RANGE(0x12,0x17) AM_WRITE(blitter_process_w)
+ AM_RANGE(0x20,0x2f) AM_WRITE(blit_vregs_w)
AM_RANGE(0x30,0x30) AM_WRITENOP //? polls 0x03 continuously
AM_RANGE(0x31,0x31) AM_WRITE(sound_latch_w)
ADDRESS_MAP_END
@@ -397,8 +489,8 @@ static ADDRESS_MAP_START( cntrygrl_cpu0_io, AS_IO, 8, jangou_state )
AM_RANGE(0x10,0x10) AM_READ_PORT("DSW") //dsw + blitter busy flag
AM_RANGE(0x10,0x10) AM_WRITE(output_w)
AM_RANGE(0x11,0x11) AM_WRITE(mux_w)
- AM_RANGE(0x12,0x17) AM_DEVWRITE("blitter",jangou_blitter_device, process_w)
- AM_RANGE(0x20,0x2f) AM_DEVWRITE("blitter",jangou_blitter_device, vregs_w)
+ AM_RANGE(0x12,0x17) AM_WRITE(blitter_process_w)
+ AM_RANGE(0x20,0x2f) AM_WRITE(blit_vregs_w )
AM_RANGE(0x30,0x30) AM_WRITENOP //? polls 0x03 continuously
// AM_RANGE(0x31,0x31) AM_WRITE(sound_latch_w)
ADDRESS_MAP_END
@@ -422,8 +514,8 @@ static ADDRESS_MAP_START( roylcrdn_cpu0_io, AS_IO, 8, jangou_state )
AM_RANGE(0x10,0x10) AM_WRITENOP /* Writes continuosly 0's in attract mode, and 1's in game */
AM_RANGE(0x11,0x11) AM_WRITE(mux_w)
AM_RANGE(0x13,0x13) AM_READNOP /* Often reads bit7 with unknown purposes */
- AM_RANGE(0x12,0x17) AM_DEVWRITE("blitter",jangou_blitter_device, process_w)
- AM_RANGE(0x20,0x2f) AM_DEVWRITE("blitter",jangou_blitter_device, vregs_w)
+ AM_RANGE(0x12,0x17) AM_WRITE(blitter_process_w)
+ AM_RANGE(0x20,0x2f) AM_WRITE(blit_vregs_w)
AM_RANGE(0x30,0x30) AM_WRITENOP /* Seems to write 0x10 on each sound event */
ADDRESS_MAP_END
@@ -522,7 +614,7 @@ static INPUT_PORTS_START( jangou )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") // guess
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("blitter", jangou_blitter_device, status_r)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) // blitter busy flag
INPUT_PORTS_END
static INPUT_PORTS_START( macha )
@@ -583,7 +675,7 @@ static INPUT_PORTS_START( macha )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") // guess
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("blitter", jangou_blitter_device, status_r)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) // blitter busy flag
INPUT_PORTS_END
@@ -668,7 +760,7 @@ static INPUT_PORTS_START( cntrygrl )
PORT_DIPNAME( 0x40, 0x40, "Coin B setting" ) PORT_DIPLOCATION("SW1:7")
PORT_DIPSETTING( 0x40, DEF_STR( 1C_5C ) )
PORT_DIPSETTING( 0x00, "1 Coin / 10 Credits" )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("blitter", jangou_blitter_device, status_r)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) // blitter busy flag
PORT_START("IN_NOMUX")
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -709,7 +801,7 @@ static INPUT_PORTS_START( jngolady )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("blitter", jangou_blitter_device, status_r)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) //blitter busy flag
INPUT_PORTS_END
static INPUT_PORTS_START( roylcrdn )
@@ -767,9 +859,29 @@ static INPUT_PORTS_START( roylcrdn )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Credit Clear") /* Credit Clear */
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) /* Spare 1 */
- PORT_START("DSW")
- PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("blitter", jangou_blitter_device, status_r)
+ PORT_START("DSW") /* Not a real DSW on PCB */
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
+ PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* blitter busy flag */
PORT_START("IN_NOMUX")
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -784,6 +896,8 @@ INPUT_PORTS_END
MACHINE_START_MEMBER(jangou_state,common)
{
+ save_item(NAME(m_pen_data));
+ save_item(NAME(m_blit_data));
save_item(NAME(m_mux_data));
}
@@ -811,7 +925,15 @@ MACHINE_START_MEMBER(jangou_state,jngolady)
MACHINE_RESET_MEMBER(jangou_state,common)
{
+ int i;
+
m_mux_data = 0;
+
+ for (i = 0; i < 6; i++)
+ m_blit_data[i] = 0;
+
+ for (i = 0; i < 16; i++)
+ m_pen_data[i] = 0;
}
void jangou_state::machine_reset()
@@ -845,11 +967,14 @@ static MACHINE_CONFIG_START( jangou, jangou_state )
MCFG_CPU_PROGRAM_MAP(cpu1_map)
MCFG_CPU_IO_MAP(cpu1_io)
- MCFG_JANGOU_BLITTER_ADD("blitter", MASTER_CLOCK/4)
-
+
/* video hardware */
+
MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK/4,320,0,256,264,16,240) // assume same as nightgal.cpp
+ MCFG_SCREEN_REFRESH_RATE(60)
+ MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) //not accurate
+ MCFG_SCREEN_SIZE(256, 256)
+ MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 16, 240-1)
MCFG_SCREEN_UPDATE_DRIVER(jangou_state, screen_update_jangou)
MCFG_SCREEN_PALETTE("palette")
@@ -1165,7 +1290,7 @@ ROM_START( roylcrdn )
ROM_LOAD( "prg.p2", 0x1000, 0x1000, CRC(7e10259d) SHA1(d1279922a8c2475c3c73d9960b0a728c0ef851fb) )
ROM_LOAD( "prg.p3", 0x2000, 0x1000, CRC(06ef7073) SHA1(d3f990d710629b23daec76cd7ad6ccc7e066e710) )
- ROM_REGION( 0x10000, "gfx", 0 )
+ ROM_REGION( 0x20000, "gfx", 0 )
ROM_LOAD( "chrgen.cr1", 0x0000, 0x1000, CRC(935d0e1c) SHA1(0d5b067f6931585c8138b211cf73e5f585af8101) )
ROM_LOAD( "chrgen.cr2", 0x1000, 0x1000, CRC(4429362e) SHA1(0bbb6dedf919e0453be2db6343827c5787d139f3) )
ROM_LOAD( "chrgen.cr3", 0x2000, 0x1000, CRC(dc059cc9) SHA1(3041e83b9a265adfe4e1da889ae6a18593de0894) )
@@ -1181,7 +1306,7 @@ ROM_START( luckygrl )
ROM_LOAD( "7.9f", 0x01000, 0x01000, CRC(14a44d23) SHA1(4f84a8f986a8fd9d5ac0636be1bb036c3b2746c2) )
ROM_LOAD( "6.9e", 0x02000, 0x01000, CRC(06850aa8) SHA1(c23cb6b7b26d5586b1a095dee88228d1613ae7d0) )
- ROM_REGION( 0x10000, "gfx", 0 )
+ ROM_REGION( 0x80000, "gfx", 0 )
ROM_LOAD( "1.5r", 0x00000, 0x2000, CRC(fb429678) SHA1(00e37e90550d9190d06977a5f5ed75b691750cc1) )
ROM_LOAD( "piggy2.5r", 0x02000, 0x2000, CRC(a3919845) SHA1(45fffe34b7a29ecf8c8feb4152b5c7330ea3ad83) )
ROM_LOAD( "3.5n", 0x04000, 0x2000, CRC(130cfb89) SHA1(86b2a2142675cbd69d7cccab9b00f4c8863cdcbc) )
@@ -1258,13 +1383,13 @@ DRIVER_INIT_MEMBER(jangou_state,luckygrl)
*
*************************************/
-GAME( 1983, jangou, 0, jangou, jangou, driver_device, 0, ROT0, "Nichibutsu", "Jangou [BET] (Japan)", MACHINE_SUPPORTS_SAVE )
-GAME( 1983, macha, 0, jangou, macha, driver_device, 0, ROT0, "Logitec", "Monoshiri Quiz Osyaberi Macha (Japan)", MACHINE_SUPPORTS_SAVE )
-GAME( 1984, jngolady, 0, jngolady, jngolady, jangou_state, jngolady, ROT0, "Nichibutsu", "Jangou Lady (Japan)", MACHINE_SUPPORTS_SAVE )
-GAME( 1984, cntrygrl, 0, cntrygrl, cntrygrl, driver_device, 0, ROT0, "Royal Denshi", "Country Girl (Japan set 1)", MACHINE_SUPPORTS_SAVE )
-GAME( 1984, cntrygrla, cntrygrl, cntrygrl, cntrygrl, driver_device, 0, ROT0, "Nichibutsu", "Country Girl (Japan set 2)", MACHINE_SUPPORTS_SAVE )
-GAME( 1984, fruitbun, cntrygrl, cntrygrl, cntrygrl, driver_device, 0, ROT0, "Nichibutsu", "Fruits & Bunny (World?)", MACHINE_SUPPORTS_SAVE )
-GAME( 1985, roylcrdn, 0, roylcrdn, roylcrdn, driver_device, 0, ROT0, "Nichibutsu", "Royal Card (Nichibutsu)", MACHINE_SUPPORTS_SAVE )
+GAME( 1983, jangou, 0, jangou, jangou, driver_device, 0, ROT0, "Nichibutsu", "Jangou [BET] (Japan)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
+GAME( 1983, macha, 0, jangou, macha, driver_device, 0, ROT0, "Logitec", "Monoshiri Quiz Osyaberi Macha (Japan)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
+GAME( 1984, jngolady, 0, jngolady, jngolady, jangou_state, jngolady, ROT0, "Nichibutsu", "Jangou Lady (Japan)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
+GAME( 1984, cntrygrl, 0, cntrygrl, cntrygrl, driver_device, 0, ROT0, "Royal Denshi", "Country Girl (Japan set 1)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
+GAME( 1984, cntrygrla, cntrygrl, cntrygrl, cntrygrl, driver_device, 0, ROT0, "Nichibutsu", "Country Girl (Japan set 2)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
+GAME( 1984, fruitbun, cntrygrl, cntrygrl, cntrygrl, driver_device, 0, ROT0, "Nichibutsu", "Fruits & Bunny (World?)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
+GAME( 1985, roylcrdn, 0, roylcrdn, roylcrdn, driver_device, 0, ROT0, "Nichibutsu", "Royal Card (Nichibutsu)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
/* The following might not run there... */
GAME( 1984?, luckygrl, 0, cntrygrl, cntrygrl, jangou_state, luckygrl, ROT0, "Wing Co., Ltd.", "Lucky Girl? (Wing)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/k28.cpp b/src/mame/drivers/k28.cpp
deleted file mode 100644
index 0dddfd432c8..00000000000
--- a/src/mame/drivers/k28.cpp
+++ /dev/null
@@ -1,518 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:hap, Kevin Horton
-/***************************************************************************
-
- Tiger Electronics K28: Talking Learning Computer (model 7-230/7-231)
- * PCB marked PB-123 WIZARD, TIGER
- * Intel P8021 MCU with 1KB internal ROM
- * MM5445N VFD driver, 9-digit alphanumeric display same as snmath
- * 2*TMS6100 (32KB VSM)
- * SC-01-A speech chip
-
- 3 models exist:
- - 7-230: darkblue case, toy-ish looks
- - 7-231: gray case, hardware is the same
- - 7-232: this one is completely different hw --> driver tispeak.cpp
-
- TODO:
- - external module support (no dumps yet)
- - SC-01 frog speech is why this driver is marked NOT_WORKING
-
-***************************************************************************/
-
-#include "emu.h"
-#include "cpu/mcs48/mcs48.h"
-#include "machine/tms6100.h"
-#include "sound/votrax.h"
-
-#include "k28.lh"
-
-
-class k28_state : public driver_device
-{
-public:
- k28_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_tms6100(*this, "tms6100"),
- m_speech(*this, "speech"),
- m_onbutton_timer(*this, "on_button"),
- m_inp_matrix(*this, "IN"),
- m_display_wait(33),
- m_display_maxy(1),
- m_display_maxx(0)
- { }
-
- // devices
- required_device<cpu_device> m_maincpu;
- required_device<tms6100_device> m_tms6100;
- required_device<votrax_sc01_device> m_speech;
- required_device<timer_device> m_onbutton_timer;
- required_ioport_array<7> m_inp_matrix;
-
- // display common
- int m_display_wait; // led/lamp off-delay in microseconds (default 33ms)
- int m_display_maxy; // display matrix number of rows
- int m_display_maxx; // display matrix number of columns (max 31 for now)
-
- UINT32 m_display_state[0x20]; // display matrix rows data (last bit is used for always-on)
- UINT16 m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments
- UINT32 m_display_cache[0x20]; // (internal use)
- UINT8 m_display_decay[0x20][0x20]; // (internal use)
-
- TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick);
- void display_update();
- void set_display_size(int maxx, int maxy);
- void set_display_segmask(UINT32 digits, UINT32 mask);
- void display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety);
-
- bool m_power_on;
- UINT8 m_inp_mux;
- UINT8 m_phoneme;
- int m_speech_strobe;
- int m_vfd_data_enable;
- int m_vfd_data_in;
- int m_vfd_clock;
- UINT64 m_vfd_shiftreg;
- UINT64 m_vfd_shiftreg_out;
- int m_vfd_shiftcount;
-
- DECLARE_WRITE8_MEMBER(mcu_p0_w);
- DECLARE_READ8_MEMBER(mcu_p1_r);
- DECLARE_READ8_MEMBER(mcu_p2_r);
- DECLARE_WRITE8_MEMBER(mcu_p2_w);
- DECLARE_WRITE8_MEMBER(mcu_prog_w);
- DECLARE_READ8_MEMBER(mcu_t1_r);
-
- DECLARE_INPUT_CHANGED_MEMBER(power_on);
- void power_off();
-
-protected:
- virtual void machine_start() override;
- virtual void machine_reset() override;
-};
-
-
-// machine start/reset/power
-
-void k28_state::machine_start()
-{
- // zerofill
- memset(m_display_state, 0, sizeof(m_display_state));
- memset(m_display_cache, ~0, sizeof(m_display_cache));
- memset(m_display_decay, 0, sizeof(m_display_decay));
- memset(m_display_segmask, 0, sizeof(m_display_segmask));
-
- m_power_on = false;
- m_inp_mux = 0;
- m_phoneme = 0x3f;
- m_speech_strobe = 0;
- m_vfd_data_enable = 0;
- m_vfd_data_in = 0;
- m_vfd_clock = 0;
- m_vfd_shiftreg = 0;
- m_vfd_shiftreg_out = 0;
- m_vfd_shiftcount = 0;
-
- // register for savestates
- save_item(NAME(m_display_maxy));
- save_item(NAME(m_display_maxx));
- save_item(NAME(m_display_wait));
-
- save_item(NAME(m_display_state));
- /* save_item(NAME(m_display_cache)); */ // don't save!
- save_item(NAME(m_display_decay));
- save_item(NAME(m_display_segmask));
-
- save_item(NAME(m_power_on));
- save_item(NAME(m_inp_mux));
- save_item(NAME(m_phoneme));
- save_item(NAME(m_speech_strobe));
- save_item(NAME(m_vfd_data_enable));
- save_item(NAME(m_vfd_data_in));
- save_item(NAME(m_vfd_clock));
- save_item(NAME(m_vfd_shiftreg));
- save_item(NAME(m_vfd_shiftreg_out));
- save_item(NAME(m_vfd_shiftcount));
-}
-
-void k28_state::machine_reset()
-{
- m_power_on = true;
- m_maincpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
-
- // the game relies on reading the on-button as pressed when it's turned on
- m_onbutton_timer->adjust(attotime::from_msec(250));
-}
-
-INPUT_CHANGED_MEMBER(k28_state::power_on)
-{
- if (newval && !m_power_on)
- machine_reset();
-}
-
-void k28_state::power_off()
-{
- m_power_on = false;
- m_maincpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
-}
-
-
-/***************************************************************************
-
- Helper Functions
-
-***************************************************************************/
-
-// The device may strobe the outputs very fast, it is unnoticeable to the user.
-// To prevent flickering here, we need to simulate a decay.
-
-void k28_state::display_update()
-{
- UINT32 active_state[0x20];
-
- for (int y = 0; y < m_display_maxy; y++)
- {
- active_state[y] = 0;
-
- for (int x = 0; x <= m_display_maxx; x++)
- {
- // turn on powered segments
- if (m_power_on && m_display_state[y] >> x & 1)
- m_display_decay[y][x] = m_display_wait;
-
- // determine active state
- UINT32 ds = (m_display_decay[y][x] != 0) ? 1 : 0;
- active_state[y] |= (ds << x);
- }
- }
-
- // on difference, send to output
- for (int y = 0; y < m_display_maxy; y++)
- if (m_display_cache[y] != active_state[y])
- {
- if (m_display_segmask[y] != 0)
- output().set_digit_value(y, active_state[y] & m_display_segmask[y]);
-
- const int mul = (m_display_maxx <= 10) ? 10 : 100;
- for (int x = 0; x <= m_display_maxx; x++)
- {
- int state = active_state[y] >> x & 1;
- char buf1[0x10]; // lampyx
- char buf2[0x10]; // y.x
-
- if (x == m_display_maxx)
- {
- // always-on if selected
- sprintf(buf1, "lamp%da", y);
- sprintf(buf2, "%d.a", y);
- }
- else
- {
- sprintf(buf1, "lamp%d", y * mul + x);
- sprintf(buf2, "%d.%d", y, x);
- }
- output().set_value(buf1, state);
- output().set_value(buf2, state);
- }
- }
-
- memcpy(m_display_cache, active_state, sizeof(m_display_cache));
-}
-
-TIMER_DEVICE_CALLBACK_MEMBER(k28_state::display_decay_tick)
-{
- // slowly turn off unpowered segments
- for (int y = 0; y < m_display_maxy; y++)
- for (int x = 0; x <= m_display_maxx; x++)
- if (m_display_decay[y][x] != 0)
- m_display_decay[y][x]--;
-
- display_update();
-}
-
-void k28_state::set_display_size(int maxx, int maxy)
-{
- m_display_maxx = maxx;
- m_display_maxy = maxy;
-}
-
-void k28_state::set_display_segmask(UINT32 digits, UINT32 mask)
-{
- // set a segment mask per selected digit, but leave unselected ones alone
- for (int i = 0; i < 0x20; i++)
- {
- if (digits & 1)
- m_display_segmask[i] = mask;
- digits >>= 1;
- }
-}
-
-void k28_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety)
-{
- set_display_size(maxx, maxy);
-
- // update current state
- UINT32 mask = (1 << maxx) - 1;
- for (int y = 0; y < maxy; y++)
- m_display_state[y] = (sety >> y & 1) ? ((setx & mask) | (1 << maxx)) : 0;
-
- display_update();
-}
-
-
-
-/***************************************************************************
-
- I/O, Address Map(s)
-
-***************************************************************************/
-
-WRITE8_MEMBER(k28_state::mcu_p0_w)
-{
- // d0,d1: phoneme high bits
- // d0-d2: input mux high bits
- m_inp_mux = (m_inp_mux & 0xf) | (~data << 4 & 0x70);
- m_phoneme = (m_phoneme & 0xf) | (data << 4 & 0x30);
-
- // d3: SC-01 strobe, latch phoneme on rising edge
- int strobe = data >> 3 & 1;
- if (!strobe && m_speech_strobe)
- m_speech->write(space, 0, m_phoneme);
- m_speech_strobe = strobe;
-
- // d5: VFD driver data enable
- m_vfd_data_enable = ~data >> 5 & 1;
- if (m_vfd_data_enable)
- m_vfd_shiftreg = (m_vfd_shiftreg & U64(~1)) | m_vfd_data_in;
-
- // d4: VSM chip enable
- // d6: VSM M0
- // d7: VSM M1
- m_tms6100->cs_w(~data >> 4 & 1);
- m_tms6100->m0_w(data >> 6 & 1);
- m_tms6100->m1_w(data >> 7 & 1);
- m_tms6100->clk_w(1);
- m_tms6100->clk_w(0);
-}
-
-READ8_MEMBER(k28_state::mcu_p1_r)
-{
- UINT8 data = 0;
-
- // multiplexed inputs (active low)
- for (int i = 0; i < 7; i++)
- if (m_inp_mux >> i & 1)
- {
- data |= m_inp_matrix[i]->read();
-
- // force press on-button at boot
- if (i == 5 && m_onbutton_timer->enabled())
- data |= 1;
- }
-
- return data ^ 0xff;
-}
-
-READ8_MEMBER(k28_state::mcu_p2_r)
-{
- // d3: VSM data
- return (m_tms6100->data_line_r()) ? 8 : 0;
-}
-
-WRITE8_MEMBER(k28_state::mcu_p2_w)
-{
- // d0: VFD driver serial data
- m_vfd_data_in = data & 1;
- if (m_vfd_data_enable)
- m_vfd_shiftreg = (m_vfd_shiftreg & U64(~1)) | m_vfd_data_in;
-
- // d0-d3: VSM data, input mux and SC-01 phoneme lower nibble
- m_tms6100->add_w(space, 0, data);
- m_inp_mux = (m_inp_mux & ~0xf) | (~data & 0xf);
- m_phoneme = (m_phoneme & ~0xf) | (data & 0xf);
-}
-
-WRITE8_MEMBER(k28_state::mcu_prog_w)
-{
- // 8021 PROG: clock VFD driver
- int state = (data) ? 1 : 0;
- bool rise = state == 1 && !m_vfd_clock;
- m_vfd_clock = state;
-
- // on rising edge
- if (rise)
- {
- // leading 1 triggers shift start
- if (m_vfd_shiftcount == 0 && ~m_vfd_shiftreg & 1)
- return;
-
- // output shiftreg on 35th clock
- if (m_vfd_shiftcount == 35)
- {
- m_vfd_shiftcount = 0;
-
- // output 0-15: digit segment data
- UINT16 seg_data = (UINT16)(m_vfd_shiftreg >> 19);
- seg_data = BITSWAP16(seg_data,0,1,13,9,10,12,14,8,3,4,5,2,15,11,6,7);
-
- // output 16-24: digit select
- UINT16 digit_sel = (UINT16)(m_vfd_shiftreg >> 10) & 0x1ff;
- set_display_segmask(0x1ff, 0x3fff);
- display_matrix(16, 9, seg_data, digit_sel);
-
- // output 25: power-off request on falling edge
- if (~m_vfd_shiftreg & m_vfd_shiftreg_out & 0x200)
- power_off();
- m_vfd_shiftreg_out = m_vfd_shiftreg;
- }
- else
- {
- m_vfd_shiftreg <<= 1;
- m_vfd_shiftcount++;
- }
- }
-}
-
-READ8_MEMBER(k28_state::mcu_t1_r)
-{
- // 8021 T1: SC-01 A/R pin
- return m_speech->request();
-}
-
-
-static ADDRESS_MAP_START( k28_mcu_map, AS_IO, 8, k28_state )
- AM_RANGE(0x00, 0x00) AM_MIRROR(0xff) AM_WRITE(mcu_p0_w)
- AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_READ(mcu_p1_r)
- AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_READWRITE(mcu_p2_r, mcu_p2_w)
- AM_RANGE(MCS48_PORT_PROG, MCS48_PORT_PROG) AM_WRITE(mcu_prog_w)
- AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_READ(mcu_t1_r)
-ADDRESS_MAP_END
-
-
-
-/***************************************************************************
-
- Inputs
-
-***************************************************************************/
-
-static INPUT_PORTS_START( k28 )
- PORT_START("IN.0")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_NAME("Yes/True")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('G')
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q')
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'')
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_NAME("No/False")
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('H')
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_CHAR('R')
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SPACE) PORT_NAME("Select")
-
- PORT_START("IN.1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_END) PORT_NAME("Scroll")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_CHAR('F')
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CHAR('P')
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z')
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_NAME("<")
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_CHAR('I')
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('S')
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("Erase/Clear")
-
- PORT_START("IN.2")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_HOME) PORT_NAME("Menu")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_CHAR('E')
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('O')
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y')
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_NAME(">")
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('J')
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) PORT_CHAR('T')
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_NAME("Enter/Start")
-
- PORT_START("IN.3")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH) PORT_NAME("Prompt")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('D')
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('N')
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_CHAR('X')
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("7")
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("4")
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("1")
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("0")
-
- PORT_START("IN.4")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_NAME("Say It Again(Repeat)")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_CHAR('C')
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_CHAR('M')
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('W')
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("8")
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("5")
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("2")
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DEL_PAD) PORT_NAME(".")
-
- PORT_START("IN.5")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGUP) PORT_NAME("On") PORT_CHANGED_MEMBER(DEVICE_SELF, k28_state, power_on, nullptr)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_CHAR('B')
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('L')
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_CHAR('V')
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("9")
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("6")
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("3")
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER_PAD) PORT_CODE(KEYCODE_EQUALS) PORT_NAME("=")
-
- PORT_START("IN.6")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("Off") // -> auto_power_off
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('A')
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CHAR('K')
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_CHAR('U')
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH_PAD) PORT_NAME(UTF8_DIVIDE)
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ASTERISK) PORT_NAME(UTF8_MULTIPLY)
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS_PAD) PORT_NAME("-")
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PLUS_PAD) PORT_NAME("+")
-INPUT_PORTS_END
-
-
-
-/***************************************************************************
-
- Machine Config
-
-***************************************************************************/
-
-static MACHINE_CONFIG_START( k28, k28_state )
-
- /* basic machine hardware */
- MCFG_CPU_ADD("maincpu", I8021, XTAL_3_579545MHz)
- MCFG_CPU_IO_MAP(k28_mcu_map)
-
- MCFG_DEVICE_ADD("tms6100", TMS6100, XTAL_3_579545MHz) // CLK tied to 8021 ALE pin
-
- MCFG_TIMER_ADD_NONE("on_button")
-
- MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", k28_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_k28)
-
- /* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DEVICE_ADD("speech", VOTRAX_SC01, 760000) // measured 760kHz on its RC pin
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
-MACHINE_CONFIG_END
-
-
-
-/***************************************************************************
-
- ROM Defs, Game driver(s)
-
-***************************************************************************/
-
-ROM_START( k28 )
- ROM_REGION( 0x1000, "maincpu", 0 )
- ROM_LOAD( "p8021", 0x0000, 0x0400, CRC(15536d20) SHA1(fac98ce652340ffb2d00952697c3a9ce75393fa4) )
-
- ROM_REGION( 0x10000, "tms6100", ROMREGION_ERASEFF ) // 8000-bfff? = space reserved for cartridge
- ROM_LOAD( "cm62050.vsm", 0x0000, 0x4000, CRC(6afb8645) SHA1(e22435568ed11c6516a3b4008131f99cd4e47aa9) )
- ROM_LOAD( "cm62051.vsm", 0x4000, 0x4000, CRC(0fa61baa) SHA1(831be669423ba60c7f85a896b4b09a1295478bd9) )
-ROM_END
-
-
-
-COMP( 1981, k28, 0, 0, k28, k28, driver_device, 0, "Tiger Electronics", "K28: Talking Learning Computer (model 7-230)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/kaneko16.cpp b/src/mame/drivers/kaneko16.cpp
index b9c25759145..494b5db608e 100644
--- a/src/mame/drivers/kaneko16.cpp
+++ b/src/mame/drivers/kaneko16.cpp
@@ -3342,69 +3342,6 @@ ROM_START( gtmra )
/* Not present on this board */
ROM_END
-ROM_START( gtmrb )
- ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 Code */
- ROM_LOAD16_BYTE( "mmp0x1.u514", 0x000000, 0x080000, CRC(6c163f12) SHA1(7f33d1475dcb754c83f68b5fb686fb236ba81256) )
- ROM_LOAD16_BYTE( "mmp1x1.u513", 0x000001, 0x080000, CRC(424dc7e1) SHA1(a9cb8d1fd0549c8c77462552c649c180c30eef89) )
-
- ROM_REGION( 0x020000, "mcudata", 0 ) /* MCU Code */
- ROM_LOAD16_WORD_SWAP( "mmd0x1.u124", 0x000000, 0x020000, CRC(3d7cb329) SHA1(053106acde642a414fde0b01105fe6762b6a10f6) ) // == mmd0x2
-
- ROM_REGION( 0x840000, "gfx1", 0 ) /* Sprites */
- ROM_LOAD( "mm-200-402-s0.bin", 0x000000, 0x200000, CRC(c0ab3efc) SHA1(e6cd15480977b036234d91e6f3a6e21b7f0a3c3e) )
- ROM_LOAD( "mm-201-403-s1.bin", 0x200000, 0x200000, CRC(cf6b23dc) SHA1(ccfd0b17507e091e55c169361cd6a6b19641b717) )
- ROM_LOAD( "mm-202-404-s2.bin", 0x400000, 0x200000, CRC(8f27f5d3) SHA1(219a86446ce2556682009d8aff837480f040a01e) )
- ROM_LOAD( "mm-203-405-s3.bin", 0x600000, 0x080000, CRC(e9747c8c) SHA1(2507102ec34755c6f110eadb3444e6d3a3474051) )
- ROM_LOAD16_BYTE( "mms1x1.u30", 0x800001, 0x020000, CRC(9463825c) SHA1(696bbfc816b564b3cff1487e1b848d375951f923) )
- ROM_LOAD16_BYTE( "mms0x1.u29", 0x800000, 0x020000, CRC(bd22b7d2) SHA1(ef82d00d72439590c71aed33ecfabc6ee71a6ff9) ) // == mms0x2
-
- ROM_REGION( 0x200000, "gfx2", 0 ) /* Tiles (scrambled) */
- ROM_LOAD( "mm-300-406-a0.bin", 0x000000, 0x200000, CRC(b15f6b7f) SHA1(5e84919d788add53fc87f4d85f437df413b1dbc5) )
-
- ROM_REGION( 0x200000, "gfx3", 0 ) /* Tiles (scrambled) */
- ROM_COPY("gfx2",0x000000,0,0x200000) // it isn't on the board twice.
-
- ROM_REGION( 0x400000, "oki1", 0 ) /* Samples, plus room for expansion */
- ROM_LOAD( "mm-100-401-e0.bin", 0x000000, 0x100000, CRC(b9cbfbee) SHA1(051d48a68477ef9c29bd5cc0bb7955d513a0ab94) ) // 16 x $10000
-
- ROM_REGION( 0x100000, "oki2", ROMREGION_ERASE00 ) /* Samples */
- /* Not present on this board */
-ROM_END
-
-
-ROM_START( gtmro )
- ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 Code */
- ROM_LOAD16_BYTE( "u514.bin", 0x000000, 0x080000, CRC(2e857685) SHA1(43b6d88df51a3b4fb0cb910f63a5ec26b06e216a) )
- ROM_LOAD16_BYTE( "u513.bin", 0x000001, 0x080000, CRC(d5003870) SHA1(6a4353fa8f94a119c23f232861d790f50be26ea8) )
-
- ROM_REGION( 0x020000, "mcudata", 0 ) /* MCU Code */
- ROM_LOAD16_WORD_SWAP( "mmd0x0.u124", 0x000000, 0x020000, CRC(e1f6159e) SHA1(e4af85036756482d6fa27494842699e2647809c7) )
-
- ROM_REGION( 0x800000, "gfx1", 0 ) /* Sprites */
- ROM_LOAD16_BYTE( "mm200-e.bin", 0x000000, 0x100000, CRC(eb104408) SHA1(a7805597161dc5acd2804d607dd0acac0c40111d) )
- ROM_LOAD16_BYTE( "mm200-o.bin", 0x000001, 0x100000, CRC(b6d04e7c) SHA1(1fa9d6b967724ed0c9e6ae3eda7089a081120d54) )
- ROM_LOAD16_BYTE( "mm201-e.bin", 0x200000, 0x100000, CRC(b8c64e14) SHA1(8e2b19f0ba715dfdf0d423a41989e715145adbeb) )
- ROM_LOAD16_BYTE( "mm201-o.bin", 0x200001, 0x100000, CRC(3ecd6c0a) SHA1(cb48564e2bd3014eeaad9cfa589bdef3f828c282) )
- ROM_LOAD16_BYTE( "mm202-e.bin", 0x400000, 0x100000, CRC(f0fd5688) SHA1(a3f5edfef253c81b27434519b0b9527f6c9a6e82) )
- ROM_LOAD16_BYTE( "mm202-o.bin", 0x400001, 0x100000, CRC(e0fe1b2b) SHA1(e66bd09eed6dfea524d8610a3c7e1792a1ff6286) )
- ROM_LOAD16_BYTE( "mm203-e.bin", 0x600000, 0x100000, CRC(b9001f28) SHA1(b112c17b960a535a543565ca2e22734c7c510f18) )
- ROM_LOAD16_BYTE( "mm203-o.bin", 0x600001, 0x100000, CRC(2ed6227d) SHA1(d9abbb739ef15437194c90cd01d5d82dbd4b7859) )
-
- ROM_REGION( 0x200000, "gfx2", 0 ) /* Tiles (scrambled) */
- ROM_LOAD16_BYTE( "mm300-e.u53", 0x000000, 0x100000, CRC(f9ee708d) SHA1(4c11a9574ea815a87d7e4af04db4368b14bf7530) )
- ROM_LOAD16_BYTE( "mm300-o.u54", 0x000001, 0x100000, CRC(76299353) SHA1(01997905ba019d770ac1998633f4ebf6f91a3945) )
-
- ROM_REGION( 0x200000, "gfx3", 0 ) /* Tiles (scrambled) */
- ROM_COPY("gfx2",0x000000,0,0x200000) // it isn't on the board twice.
-
- ROM_REGION( 0x400000, "oki1", 0 ) /* Samples, plus room for expansion */
- ROM_LOAD( "mm-100-401-e0.bin", 0x000000, 0x100000, CRC(b9cbfbee) SHA1(051d48a68477ef9c29bd5cc0bb7955d513a0ab94) ) // 16 x $10000
-
- ROM_REGION( 0x100000, "oki2", ROMREGION_ERASE00 ) /* Samples */
- /* Not present on this board */
-ROM_END
-
-
/* The evolution and USA versions seem to be more like GTMR 1.5, they have some fairly significant changes */
/* This version displays:
@@ -4409,10 +4346,8 @@ GAME( 1993, wingforc, 0, wingforc, wingforc, kaneko16_state, kan
GAME( 1994, bonkadv, 0, bonkadv , bonkadv, kaneko16_gtmr_state, gtmr, ROT0, "Kaneko", "B.C. Kid / Bonk's Adventure / Kyukyoku!! PC Genjin", MACHINE_SUPPORTS_SAVE )
GAME( 1994, bloodwar, 0, bloodwar, bloodwar, kaneko16_gtmr_state, gtmr, ROT0, "Kaneko", "Blood Warrior", MACHINE_SUPPORTS_SAVE )
GAME( 1994, oedfight, bloodwar, bloodwar, bloodwar, kaneko16_gtmr_state, gtmr, ROT0, "Kaneko", "Oedo Fight (Japan Bloodshed Ver.)", MACHINE_SUPPORTS_SAVE )
-GAME( 1994, gtmr, 0, gtmr, gtmr, kaneko16_gtmr_state, gtmr, ROT0, "Kaneko", "1000 Miglia: Great 1000 Miles Rally (94/07/18)", MACHINE_SUPPORTS_SAVE ) // this set shows 'PCB by Jinwei Co Ltd. ROC'
+GAME( 1994, gtmr, 0, gtmr, gtmr, kaneko16_gtmr_state, gtmr, ROT0, "Kaneko", "1000 Miglia: Great 1000 Miles Rally (94/07/18)", MACHINE_SUPPORTS_SAVE )
GAME( 1994, gtmra, gtmr, gtmr, gtmr, kaneko16_gtmr_state, gtmr, ROT0, "Kaneko", "1000 Miglia: Great 1000 Miles Rally (94/06/13)", MACHINE_SUPPORTS_SAVE )
-GAME( 1994, gtmrb, gtmr, gtmr, gtmr, kaneko16_gtmr_state, gtmr, ROT0, "Kaneko", "1000 Miglia: Great 1000 Miles Rally (94/05/26)", MACHINE_SUPPORTS_SAVE )
-GAME( 1994, gtmro, gtmr, gtmr, gtmr, kaneko16_gtmr_state, gtmr, ROT0, "Kaneko", "1000 Miglia: Great 1000 Miles Rally (94/05/10)", MACHINE_SUPPORTS_SAVE ) // possible prototype
GAME( 1994, gtmre, gtmr, gtmre, gtmr, kaneko16_gtmr_state, gtmr, ROT0, "Kaneko", "Great 1000 Miles Rally: Evolution Model!!! (94/09/06)", MACHINE_SUPPORTS_SAVE )
GAME( 1994, gtmrusa, gtmr, gtmre, gtmr, kaneko16_gtmr_state, gtmr, ROT0, "Kaneko", "Great 1000 Miles Rally: U.S.A Version! (94/09/06)", MACHINE_SUPPORTS_SAVE ) // U.S.A version seems part of the title, rather than region
GAME( 1995, gtmr2, 0, gtmr2, gtmr2, kaneko16_gtmr_state, gtmr, ROT0, "Kaneko", "Mille Miglia 2: Great 1000 Miles Rally (95/05/24)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/kchamp.cpp b/src/mame/drivers/kchamp.cpp
index 913b14a16f7..49b65cf2f19 100644
--- a/src/mame/drivers/kchamp.cpp
+++ b/src/mame/drivers/kchamp.cpp
@@ -481,10 +481,10 @@ static MACHINE_CONFIG_START( kchamp, kchamp_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("ay1", AY8910, XTAL_12MHz/12) /* Guess based on actual pcb recordings of karatedo */
+ MCFG_SOUND_ADD("ay1", AY8910, XTAL_12MHz/8)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
- MCFG_SOUND_ADD("ay2", AY8910, XTAL_12MHz/12) /* Guess based on actual pcb recordings of karatedo */
+ MCFG_SOUND_ADD("ay2", AY8910, XTAL_12MHz/8)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MCFG_DAC_ADD("dac")
diff --git a/src/mame/drivers/kurukuru.cpp b/src/mame/drivers/kurukuru.cpp
index 1bbce2e5bb4..a9354ecea56 100644
--- a/src/mame/drivers/kurukuru.cpp
+++ b/src/mame/drivers/kurukuru.cpp
@@ -1,9 +1,10 @@
// license:BSD-3-Clause
// copyright-holders:Roberto Fresca, hap
-/***********************************************************************************
+/******************************************************************************
KURU KURU PYON PYON
- Success / Taiyo Jidoki
+ Taiyo Jidoki / Success
+
Driver by Roberto Fresca & hap.
@@ -15,7 +16,7 @@
ports, descriptions and a lot of things... :)
-************************************************************************************
+*******************************************************************************
Technical Notes....
@@ -113,16 +114,12 @@
AB = NEC C1663C 8926B.
-************************************************************************************
+*******************************************************************************
General Notes....
- There are at least 4 games in the Pyon Pyon series...
-
- 1) Pyon Pyon (a marathon game with froggy characters).
- 2) Kuru Kuru Pyon Pyon (a kind of slots game with the same froggy characters).
- 3) Pyon Pyon Jyanpu (a contents where the same characters try to cross the river jumping on pads).
- 4) Sui Sui Pyon Pyon (a swimming competition where the same characters swim with different styles, even walking).
+ The game name could be translated as "Croak Croak Hop Hop"
+ Kuru is the frog sound, and Pyon is the sound of jumps.
Coin 1 (key 5) could be set either as Coin 1 or as Payout button, through
a DIP switch.
@@ -132,19 +129,12 @@
will be cleared).
-************************************************************************************
+*******************************************************************************
- Games Notes:
- ------------
+ * How to play...
- * Kuru Kuru Pyon Pyon:
+ Insert tokens (medals)...
- The game name could be translated as "Croak Croak Hop Hop"
- Kuru is the frog sound, and Pyon is the sound of jumps.
-
- How to play...
-
- Insert tokens (medals).
You can bet to any (or all) of the following 5 characters: Bote, Oume, Pyoko,
Kunio, and Pyon Pyon. Press start, and the reels start to roll. You'll win if
you can get 3 of the choosen character(s) in a row, column or diagonal.
@@ -156,7 +146,8 @@
Red tadpoles are a bonus. Once you get one, it will go to the right panel,
revealing a number. This number represents the extra credits you won.
- Bookkeeping...
+
+ * Bookkeeping...
Pressing Bookkeeping key (key 9), you enter the Bookkeeping Mode. There are
2 screens with all the game information like DIP switches and statistics...
@@ -177,73 +168,30 @@
Pressing the Bookkeeping key once more, you exit the mode and go back to the game.
- ----------------------------------------------------------------------------------
-
- * Pyon Pyon Jyanpu:
-
- The game name could be translated as "Hop Hop Jump"
- Pyon is the sound of jumps. Jyanpu means jump.
-
- How to play...
-
- Insert tokens (medals).
- You can bet to any (or all) of the following 5 characters: Boketa, Kunio, Pyon-Pyon,
- Pyokorin and Botechin. Press start, and the river's pads start to roll. You'll win
- if your character gets the three pads to jump to the other side of the river.
-
- There is also a bonus game with a black tadpole rounding some pads with extra credits.
- you'll get the extra credits marked in the pad where the tadpole stopped.
-
- Bookkeeping...
-
- Pressing Bookkeeping key (key 9), you enter the Bookkeeping Mode. There are
- 2 screens with all the game information like DIP switches and statistics...
-
- 1st screen...
-
- - [Left panel]: All the DIP switches parameters.
-
- - [Right panel]: Bet and Win totals, 100Y/10Y/medal IN/OUT, total of games,
- won, loss, won by paid range, and 'omake' (extra/bonus).
-
- 2nd screen (press Bookkeeping key again)...
-
- - Win distribution by character
- (Boketa, Kunio, Pyon-Pyon, Pyokorin and Botechin).
-
- - Bet distribution (1, 2, 3, 4, 5~10)
-
- - Omake (bonus) distribution (games total, win games, loss games)
-
- Pressing the Bookkeeping key once more, you exit the mode and go back to the game.
-
-************************************************************************************
+*******************************************************************************
ADPCM Samples....
- There are 14 samples in Kuru Kuru Pyon Pyon.
+ There are 14 samples in the system.
- 00: "Botechin"
+ 00: "Boterin"
01:
- 02: "Hakase" (professor)
+ 02: "Hakase" ("professor")
03: "Pyokorin"
04: "Kunio"
- 05: "Pyon-Pyon"
- 06: "Boketa"
+ 05: "Pyon Pyon"
+ 06:
07:
08: "Oume"
- 09: "Haipaa" (hyper)
- 10: "Ichi ni tsuite" (on your marks)
- 11: "Youi" (get ready)
- 12: "Bang" (sound for the tadpoles landing in the right panel).
+ 09: "Haipaa" ("hyper")
+ 10: "Ichi ni tsuite" ("on your marks")
+ 11: "Youi" ("get ready")
+ 12: Bang sound for the tadpoles landing in the right panel.
13: Sound effect for reels when running.
- The fact that there are samples for "on your marks", "get ready", and "bang",
- make me think that these sounds could be shared with the other unemulated marathon
- game of the series called just "Pyon Pyon".
-***********************************************************************************/
+******************************************************************************/
#include "emu.h"
#include "cpu/z80/z80.h"
@@ -415,44 +363,6 @@ static ADDRESS_MAP_START( kurukuru_io, AS_IO, 8, kurukuru_state )
AM_RANGE(0xd0, 0xd0) AM_MIRROR(0x0f) AM_DEVWRITE("ym2149", ay8910_device, data_w)
ADDRESS_MAP_END
-static ADDRESS_MAP_START( ppj_map, AS_PROGRAM, 8, kurukuru_state )
- AM_RANGE(0x0000, 0x5fff) AM_ROM
- AM_RANGE(0x6000, 0xdfff) AM_ROMBANK("bank1")
- AM_RANGE(0xe000, 0xffff) AM_RAM AM_SHARE("nvram")
-ADDRESS_MAP_END
-
-static ADDRESS_MAP_START( ppj_io, AS_IO, 8, kurukuru_state )
- ADDRESS_MAP_GLOBAL_MASK(0xff)
- AM_RANGE(0x00, 0x00) AM_MIRROR(0x0f) AM_WRITE(kurukuru_bankswitch_w)
- AM_RANGE(0x10, 0x13) AM_MIRROR(0x0c) AM_DEVREADWRITE( "v9938", v9938_device, read, write )
- AM_RANGE(0x30, 0x30) AM_MIRROR(0x0f) AM_WRITE(kurukuru_soundlatch_w)
- AM_RANGE(0x40, 0x40) AM_MIRROR(0x0f) AM_READ_PORT("DSW1")
- AM_RANGE(0x50, 0x50) AM_MIRROR(0x0f) AM_WRITE(kurukuru_out_latch_w)
- AM_RANGE(0x60, 0x60) AM_MIRROR(0x0f) AM_READ_PORT("IN1")
- AM_RANGE(0x70, 0x70) AM_MIRROR(0x0f) AM_READ_PORT("IN0")
- AM_RANGE(0xc0, 0xc0) AM_MIRROR(0x0f) AM_DEVWRITE("ym2149", ay8910_device, address_w)
- AM_RANGE(0xc8, 0xc8) AM_MIRROR(0x0f) AM_DEVREAD("ym2149", ay8910_device, data_r)
- AM_RANGE(0xd0, 0xd0) AM_MIRROR(0x0f) AM_DEVWRITE("ym2149", ay8910_device, data_w)
-ADDRESS_MAP_END
-/*
-
- 00h W --> bankswitching reg...
-
- 10h W --> 00's \
- 11h W --> 02 8f 20 91... > V9938 OK
- 13h W --> /
-
- 30h W --> soundlatch...
- 40h R --> (very begining) seems DSW1
- 50h W --> Output port (counters)
- 60h R --> Input port
- 70h R --> Input port
-
- C0h W --> YM2149 address W
- C8h R --> YM2149 data R --> DSW2
- D0h W --> YM2149 data W
-
-*/
// Audio CPU
@@ -491,12 +401,12 @@ READ8_MEMBER(kurukuru_state::kurukuru_adpcm_timer_irqack_r)
}
-static ADDRESS_MAP_START( kurukuru_audio_map, AS_PROGRAM, 8, kurukuru_state )
+static ADDRESS_MAP_START( audio_map, AS_PROGRAM, 8, kurukuru_state )
AM_RANGE(0x0000, 0xf7ff) AM_ROM
AM_RANGE(0xf800, 0xffff) AM_RAM
ADDRESS_MAP_END
-static ADDRESS_MAP_START( kurukuru_audio_io, AS_IO, 8, kurukuru_state )
+static ADDRESS_MAP_START( audio_io, AS_IO, 8, kurukuru_state )
ADDRESS_MAP_GLOBAL_MASK(0x7f)
AM_RANGE(0x40, 0x40) AM_MIRROR(0x0f) AM_WRITE(kurukuru_adpcm_data_w)
AM_RANGE(0x50, 0x50) AM_MIRROR(0x0f) AM_WRITE(kurukuru_adpcm_reset_w)
@@ -504,23 +414,6 @@ static ADDRESS_MAP_START( kurukuru_audio_io, AS_IO, 8, kurukuru_state )
AM_RANGE(0x70, 0x70) AM_MIRROR(0x0f) AM_READ(kurukuru_adpcm_timer_irqack_r)
ADDRESS_MAP_END
-static ADDRESS_MAP_START( ppj_audio_map, AS_PROGRAM, 8, kurukuru_state )
- AM_RANGE(0x0000, 0xf7ff) AM_ROM
- AM_RANGE(0xf800, 0xffff) AM_RAM
-ADDRESS_MAP_END
-
-static ADDRESS_MAP_START( ppj_audio_io, AS_IO, 8, kurukuru_state )
- ADDRESS_MAP_GLOBAL_MASK(0x7f)
- AM_RANGE(0x20, 0x20) AM_MIRROR(0x0f) AM_WRITE(kurukuru_adpcm_data_w)
- AM_RANGE(0x30, 0x30) AM_MIRROR(0x0f) AM_WRITE(kurukuru_adpcm_reset_w)
- AM_RANGE(0x40, 0x40) AM_MIRROR(0x0f) AM_READ(kurukuru_soundlatch_r)
- AM_RANGE(0x50, 0x50) AM_MIRROR(0x0f) AM_READ(kurukuru_adpcm_timer_irqack_r)
-ADDRESS_MAP_END
-/*
- 30h -W --> 0x0b
- 40h R- --> soundlatch...
- 50h R- --> adpcm irq ack
-*/
/* YM2149 ports */
WRITE8_MEMBER(kurukuru_state::ym2149_aout_w)
@@ -543,13 +436,13 @@ static INPUT_PORTS_START( kurukuru )
/* bits d0-d3 are JAMMA top side pins 20,21,22,23, bits d4-d7 are JAMMA bottom side pins 20,21,22,23
so that's player 1 left/right/button1/button2 then player 2 left/right/button1/button2
*/
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_Z) PORT_NAME("1st (Bote/Botechin)")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_Z) PORT_NAME("1st (Bote)")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CODE(KEYCODE_X) PORT_NAME("2nd (Oume)")
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CODE(KEYCODE_C) PORT_NAME("3rd (Pyoko/Pyokorin)")
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CODE(KEYCODE_C) PORT_NAME("3rd (Pyoko)")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_CODE(KEYCODE_V) PORT_NAME("4th (Kunio)")
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_CODE(KEYCODE_B) PORT_NAME("5th (Pyon-Pyon)")
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_N) PORT_NAME("Unknown A0h - bit5")
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_M) PORT_NAME("Unknown A0h - bit6")
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_CODE(KEYCODE_B) PORT_NAME("5th (Pyon Pyon)")
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_CODE(KEYCODE_N) PORT_NAME("Unknown A0h - bit5")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_CODE(KEYCODE_M) PORT_NAME("Unknown A0h - bit6")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
PORT_START("IN1")
@@ -618,81 +511,6 @@ static INPUT_PORTS_START( kurukuru )
INPUT_PORTS_END
-static INPUT_PORTS_START( ppj )
- PORT_START("IN0")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_Z) PORT_NAME("1st (Boketa)")
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CODE(KEYCODE_X) PORT_NAME("2nd (Kunio)")
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CODE(KEYCODE_C) PORT_NAME("3rd (Pyon-Pyon)")
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_CODE(KEYCODE_V) PORT_NAME("4th (Pyokorin)")
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_CODE(KEYCODE_B) PORT_NAME("5th (Botechin)")
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_S) PORT_NAME("Unknown 70h - bit5")
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_D) PORT_NAME("Unknown 70h - bit6")
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
-
- PORT_START("IN1")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_9) PORT_NAME("Bookkeeping")
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_NAME("Medal In")
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_0) PORT_NAME("Reset Button")
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_A) PORT_NAME("Unknown 60h - bit4")
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE (2)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("hopper", ticket_dispenser_device, line_r) // hopper feedback
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
-
- PORT_START("DSW1") // found in the PCB: 00000000 (arranged for sale since they are uncommon settings)
- PORT_DIPNAME( 0x07, 0x03, "Coinage A (100 Y)" ) PORT_DIPLOCATION("DSW1:1,2,3")
- PORT_DIPSETTING( 0x00, "1 Coin / 1 Medal" )
- PORT_DIPSETTING( 0x04, "1 Coin / 2 Medal" )
- PORT_DIPSETTING( 0x02, "1 Coin / 3 Medal" )
- PORT_DIPSETTING( 0x06, "1 Coin / 4 Medal" )
- PORT_DIPSETTING( 0x01, "1 Coin / 5 Medal" )
- PORT_DIPSETTING( 0x05, "1 Coin / 6 Medal" )
- PORT_DIPSETTING( 0x03, "1 Coin / 10 Medal" )
- PORT_DIPSETTING( 0x07, "1 Coin / 11 Medal" )
- PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:4")
- PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x00, "Unknown (related to coin1/payout)") PORT_DIPLOCATION("DSW1:5")
- PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x00, "Coinage Config" ) PORT_DIPLOCATION("DSW1:6")
- PORT_DIPSETTING( 0x00, "Coin 1 = Normal" )
- PORT_DIPSETTING( 0x20, "Coin 1 = Payout" )
- PORT_DIPNAME( 0x40, 0x00, "Payout Mode" ) PORT_DIPLOCATION("DSW1:7")
- PORT_DIPSETTING( 0x40, "Manual" )
- PORT_DIPSETTING( 0x00, "Automatic" )
- PORT_DIPNAME( 0x80, 0x00, "Repeat Last Bet") PORT_DIPLOCATION("DSW1:8")
- PORT_DIPSETTING( 0x80, DEF_STR( No ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
-
- PORT_START("DSW2") // found in the PCB: 00000000 (arranged for sale since they are uncommon settings)
- PORT_DIPNAME( 0x07, 0x01, "Percentage" ) PORT_DIPLOCATION("DSW2:1,2,3")
- PORT_DIPSETTING( 0x07, "50%" )
- PORT_DIPSETTING( 0x03, "60%" )
- PORT_DIPSETTING( 0x05, "70%" )
- PORT_DIPSETTING( 0x01, "75%" )
- PORT_DIPSETTING( 0x06, "80%" )
- PORT_DIPSETTING( 0x02, "85%" )
- PORT_DIPSETTING( 0x04, "90%" )
- PORT_DIPSETTING( 0x00, "95%" )
- PORT_DIPNAME( 0x08, 0x00, "Winwave" ) PORT_DIPLOCATION("DSW2:4")
- PORT_DIPSETTING( 0x08, "Small" )
- PORT_DIPSETTING( 0x00, "Big" )
- PORT_DIPNAME( 0x10, 0x00, "M.Medal" ) PORT_DIPLOCATION("DSW2:5")
- PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x60, 0x60, "HG" ) PORT_DIPLOCATION("DSW2:6,7")
- PORT_DIPSETTING( 0x60, "20-1" )
- PORT_DIPSETTING( 0x20, "50-1" )
- PORT_DIPSETTING( 0x40, "100-1" )
- PORT_DIPSETTING( 0x00, "200-1" )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:8")
- PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
-
-INPUT_PORTS_END
-
-
/*************************************************
* Machine Start & Reset Routines *
*************************************************/
@@ -719,8 +537,8 @@ static MACHINE_CONFIG_START( kurukuru, kurukuru_state )
MCFG_CPU_IO_MAP(kurukuru_io)
MCFG_CPU_ADD("audiocpu", Z80, CPU_CLOCK)
- MCFG_CPU_PROGRAM_MAP(kurukuru_audio_map)
- MCFG_CPU_IO_MAP(kurukuru_audio_io)
+ MCFG_CPU_PROGRAM_MAP(audio_map)
+ MCFG_CPU_IO_MAP(audio_io)
MCFG_NVRAM_ADD_0FILL("nvram")
@@ -746,48 +564,12 @@ static MACHINE_CONFIG_START( kurukuru, kurukuru_state )
MACHINE_CONFIG_END
-static MACHINE_CONFIG_START( ppj, kurukuru_state )
-
- /* basic machine hardware */
- MCFG_CPU_ADD("maincpu",Z80, CPU_CLOCK)
- MCFG_CPU_PROGRAM_MAP(ppj_map)
- MCFG_CPU_IO_MAP(ppj_io)
-
- MCFG_CPU_ADD("audiocpu", Z80, CPU_CLOCK)
- MCFG_CPU_PROGRAM_MAP(ppj_audio_map)
- MCFG_CPU_IO_MAP(ppj_audio_io)
-
- MCFG_NVRAM_ADD_0FILL("nvram")
-
- /* video hardware */
- MCFG_V9938_ADD("v9938", "screen", VDP_MEM, MAIN_CLOCK)
- MCFG_V99X8_INTERRUPT_CALLBACK(WRITELINE(kurukuru_state,kurukuru_vdp_interrupt))
- MCFG_V99X8_SCREEN_ADD_NTSC("screen", "v9938", MAIN_CLOCK)
-
- MCFG_TICKET_DISPENSER_ADD("hopper", attotime::from_msec(HOPPER_PULSE), TICKET_MOTOR_ACTIVE_LOW, TICKET_STATUS_ACTIVE_LOW )
-
- /* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("ym2149", YM2149, YM2149_CLOCK)
- MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW2"))
- MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(kurukuru_state, ym2149_aout_w))
- MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(kurukuru_state, ym2149_bout_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
-
- MCFG_SOUND_ADD("adpcm", MSM5205, M5205_CLOCK)
- MCFG_MSM5205_VCLK_CB(WRITELINE(kurukuru_state, kurukuru_msm5205_vck))
- MCFG_MSM5205_PRESCALER_SELECTOR(MSM5205_S48_4B) /* changed on the fly */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
-MACHINE_CONFIG_END
+/***************************************************************************
+ Game driver(s)
-/*************************************************
-* ROMs Loading *
-*************************************************/
+***************************************************************************/
-/* Kuru Kuru Pyon Pyon.
- 1990, Success / Taiyo Jidoki.
-*/
ROM_START( kurukuru )
ROM_REGION( 0x08000, "maincpu", 0 )
ROM_LOAD( "kp_17l.ic17", 0x00000, 0x08000, CRC(9b552ebc) SHA1(07d0e62b7fdad381963a345376b72ad31eb7b96d) ) // program code
@@ -808,10 +590,6 @@ ROM_START( kurukuru )
ROM_LOAD( "7908b-4.ic32", 0x0600, 0x0034, CRC(bddf925e) SHA1(861cf5966444d0c0392241e5cfa08db475fb439a) )
ROM_END
-/* Pyon Pyon Jyanpu.
- Ver 1.40.
- 199?, Success / Taiyo Jidoki.
-*/
ROM_START( ppj )
ROM_REGION( 0x08000, "maincpu", 0 )
ROM_LOAD( "ppj17.ic17", 0x00000, 0x08000, CRC(5d9c9ceb) SHA1(0f52c8a0aaaf978afeb07e56493399133b4ce781) ) // program code
@@ -833,15 +611,6 @@ ROM_START( ppj )
ROM_END
-/***************************************************************************
-* Game Drivers *
-***************************************************************************/
-
-/* YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS */
-GAME( 1990, kurukuru, 0, kurukuru, kurukuru, driver_device, 0, ROT0, "Success / Taiyo Jidoki", "Kuru Kuru Pyon Pyon (Japan)", 0 )
-GAME( 199?, ppj, 0, ppj, ppj, driver_device, 0, ROT0, "Success / Taiyo Jidoki", "Pyon Pyon Jyanpu (V1.40, Japan)", 0 )
-
-// unemulated....
-
-// 199?, Success / Taiyo Jidoki, Pyon Pyon
-// 1990, Success / Taiyo Jidoki, Sui Sui Pyon Pyon
+/* YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS */
+GAME( 199?, kurukuru, 0, kurukuru, kurukuru, driver_device, 0, ROT0, "Success / Taiyo Jidoki", "Kuru Kuru Pyon Pyon (Japan)", 0 )
+GAME( 199?, ppj, 0, kurukuru, kurukuru, driver_device, 0, ROT0, "Success / Taiyo Jidoki", "Pyon Pyon Jump (Japan)", MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/ladyfrog.cpp b/src/mame/drivers/ladyfrog.cpp
index cf99c2192eb..9a4782366d9 100644
--- a/src/mame/drivers/ladyfrog.cpp
+++ b/src/mame/drivers/ladyfrog.cpp
@@ -365,24 +365,7 @@ ROM_START( toucheme )
ROM_LOAD( "8.ic10", 0x20000, 0x10000, CRC(fc6808bf) SHA1(f1f1b75a79dfdb500012f9b52c6364f0a13dce2d) )
ROM_END
-ROM_START( touchemea )
- ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "2.ic107", 0x0000, 0x10000, CRC(4e72312d) SHA1(a7d178608f05c87a53c650298b903bcf34b3b755) ) // sldh
-
- ROM_REGION( 0x10000, "audiocpu", 0 )
- ROM_LOAD( "1.ic115", 0x0000, 0x8000, CRC(902589aa) SHA1(d60088fc31a67fec91f908f671af77bb87a5e59c) )
-
- ROM_REGION( 0x60000, "gfx1", ROMREGION_INVERT )
- ROM_LOAD( "3.ic32", 0x30000, 0x10000, CRC(223b4435) SHA1(fb5a4096012093bae5fda213a5de317e63a88ec3) )
- ROM_LOAD( "4.ic33", 0x40000, 0x10000, CRC(96dcc2f3) SHA1(9c61f8161771e40ca41b6e102bc04583dc97cd0d) )
- ROM_LOAD( "5.ic34", 0x50000, 0x10000, CRC(b8667a6b) SHA1(288a5cbd8fc01b24822e89fbc1e6d7f45c181483) )
- ROM_LOAD( "6.ic8", 0x00000, 0x10000, CRC(d257382f) SHA1(9c459b90c9ddfe90de4a252f29a7bee809412b46) )
- ROM_LOAD( "7.ic9", 0x10000, 0x10000, CRC(feb1b974) SHA1(ffd4527472cdf655fbebebf4d3abb61962e54457) )
- ROM_LOAD( "8.ic10", 0x20000, 0x10000, CRC(fc6808bf) SHA1(f1f1b75a79dfdb500012f9b52c6364f0a13dce2d) )
-ROM_END
-
GAME( 1990, ladyfrog, 0, ladyfrog, ladyfrog, driver_device, 0, ORIENTATION_SWAP_XY, "Mondial Games", "Lady Frog", MACHINE_SUPPORTS_SAVE )
// toucheme art style is similar to ladyfrog, so it's probably the same manufacturer
-GAME( 19??, toucheme, 0, toucheme, toucheme, driver_device, 0, ORIENTATION_SWAP_XY, "<unknown>", "Touche Me (set 1)", MACHINE_SUPPORTS_SAVE )
-GAME( 19??, touchemea,toucheme, toucheme, toucheme, driver_device, 0, ORIENTATION_SWAP_XY, "<unknown>", "Touche Me (set 2, harder)", MACHINE_SUPPORTS_SAVE )
+GAME( 19??, toucheme, 0, toucheme, toucheme, driver_device, 0, ORIENTATION_SWAP_XY, "<unknown>", "Touche Me", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/laserbat.cpp b/src/mame/drivers/laserbat.cpp
index 3f3342c3ed0..2d9ea56a2e4 100644
--- a/src/mame/drivers/laserbat.cpp
+++ b/src/mame/drivers/laserbat.cpp
@@ -62,17 +62,23 @@
* Service coin 1 input grants two credits the first time it's
pushed, but remembers this and won't grant credits again unless
unless you trigger the tilt input
- * The sprite ROM is twice the size as Laser Battle with the bank
- selected using bit 9 of the 16-bit sound interface (there's a wire
- making this connection visible on the component side of the PCB)
- * If demo sounds are enabled (using DIP switches), background music
- is played every sixth time through the attract loop
+ * Flyer suggests there should be an "old lady" sprite, which is not
+ present in our ROM dump
+ * Sprite ROM is likely double size, banking could be controlled by
+ one of the many unused CSOUND bits, the NEG2 bit, or even H128
+ * Judging by the PLA program, the colour weight resistors are likely
+ different to what Laser Battle/Lazarian uses - we need a detailed
+ colour photo of the game board or a schematic to confirm values
* Sound board emulation is based on tracing the program and guessing
what's connected where - we really need someone to trace out the
1b11107 sound board if we want to get this right
TODO:
- work out where all the magic layer offsets come from
+ - catnmous sprite ROM appears to be underdumped
+ - need to confirm colour weight resistors on catnmous (detailed photo required):
+ R58, R59, R60, R61, R62, R65, R66, R67, R68, R69, R72, R73, R74, R75
+ (network connected between 11M, 12M, Q5, Q7, Q8)
- sound in laserbat (with schematics) and in catnmous
*/
@@ -83,8 +89,6 @@
#include "cpu/m6800/m6800.h"
#include "cpu/s2650/s2650.h"
-#include "machine/clock.h"
-
WRITE8_MEMBER(laserbat_state_base::ct_io_w)
{
@@ -197,6 +201,14 @@ static ADDRESS_MAP_START( laserbat_io_map, AS_IO, 8, laserbat_state_base )
ADDRESS_MAP_END
+static ADDRESS_MAP_START( catnmous_sound_map, AS_PROGRAM, 8, catnmous_state )
+ AM_RANGE(0x0000, 0x007f) AM_RAM
+ AM_RANGE(0x500c, 0x500f) AM_DEVREADWRITE("pia", pia6821_device, read, write)
+ AM_RANGE(0xc000, 0xcfff) AM_ROM
+ AM_RANGE(0xe000, 0xffff) AM_ROM
+ADDRESS_MAP_END
+
+
static INPUT_PORTS_START( laserbat_base )
PORT_START("ROW0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
@@ -453,6 +465,13 @@ void laserbat_state::machine_start()
save_item(NAME(m_keys));
}
+void catnmous_state::machine_start()
+{
+ laserbat_state_base::machine_start();
+
+ save_item(NAME(m_cb1));
+}
+
void laserbat_state_base::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
{
switch (id)
@@ -480,6 +499,9 @@ static MACHINE_CONFIG_START( laserbat_base, laserbat_state_base )
MCFG_SCREEN_UPDATE_DRIVER(laserbat_state_base, screen_update_laserbat)
MCFG_SCREEN_PALETTE("palette")
+ MCFG_PALETTE_ADD("palette", 256)
+ MCFG_PALETTE_INIT_OWNER(laserbat_state_base, laserbat)
+
MCFG_PLS100_ADD("gfxmix")
MCFG_DEVICE_ADD("pvi1", S2636, XTAL_14_31818MHz/3)
@@ -500,10 +522,6 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED_CLASS( laserbat, laserbat_base, laserbat_state )
- // video hardware
- MCFG_PALETTE_ADD("palette", 256)
- MCFG_PALETTE_INIT_OWNER(laserbat_state, laserbat)
-
// sound board devices
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -522,24 +540,36 @@ static MACHINE_CONFIG_DERIVED_CLASS( laserbat, laserbat_base, laserbat_state )
MCFG_SN76477_ENVELOPE_PARAMS(0, 1) // GND, Vreg
MCFG_SN76477_ENABLE(0) // AB SOUND
- MCFG_TMS3615_ADD("synth_low", XTAL_4MHz/16/2) // from the other one's /2 clock output
+ MCFG_TMS3615_ADD("synth_high", XTAL_4MHz/16/2) // from the other one's /2 clock output
MCFG_SOUND_ROUTE(TMS3615_FOOTAGE_8, "mono", 1.0)
- MCFG_TMS3615_ADD("synth_high", XTAL_4MHz/16) // 4MHz divided down with a 74LS161
+ MCFG_TMS3615_ADD("synth_low", XTAL_4MHz/16) // 4MHz divided down with a 74LS161
MCFG_SOUND_ROUTE(TMS3615_FOOTAGE_8, "mono", 1.0)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED_CLASS( catnmous, laserbat_base, catnmous_state )
- // video hardware
- MCFG_PALETTE_ADD("palette", 256)
- MCFG_PALETTE_INIT_OWNER(catnmous_state, catnmous)
-
// sound board devices
+ MCFG_CPU_ADD("audiocpu", M6802, 3580000) // ?
+ MCFG_CPU_PROGRAM_MAP(catnmous_sound_map)
+ MCFG_CPU_PERIODIC_INT_DRIVER(catnmous_state, cb1_toggle, (double)3580000/4096)
+
+ MCFG_DEVICE_ADD("pia", PIA6821, 0)
+ MCFG_PIA_READPA_HANDLER(READ8(catnmous_state, pia_porta_r))
+ MCFG_PIA_WRITEPA_HANDLER(WRITE8(catnmous_state, pia_porta_w))
+ MCFG_PIA_WRITEPB_HANDLER(WRITE8(catnmous_state, pia_portb_w))
+ MCFG_PIA_IRQA_HANDLER(WRITELINE(catnmous_state, pia_irqa))
+ MCFG_PIA_IRQB_HANDLER(WRITELINE(catnmous_state, pia_irqb))
+
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_ZACCARIA_1B11107("audiopcb")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+
+ MCFG_SOUND_ADD("psg1", AY8910, 3580000/2) // ?
+ MCFG_AY8910_PORT_B_READ_CB(READ8(catnmous_state, psg1_portb_r))
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+
+ MCFG_SOUND_ADD("psg2", AY8910, 3580000/2) // ?
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
@@ -673,13 +703,17 @@ ROM_START( catnmous )
ROM_LOAD( "type01.10g", 0x0800, 0x0800, CRC(e5259f9b) SHA1(396753291ab36c3ed72208d619665fc0f33d1e17) )
ROM_LOAD( "type01.11g", 0x1000, 0x0800, CRC(2999f378) SHA1(929082383b2b0006de171587adb932ce57316963) )
- ROM_REGION( 0x1000, "gfx2", 0 )
- ROM_LOAD( "cat'n_mouse-type01-mem_n.14l.14l", 0x0000, 0x1000, CRC(83502383) SHA1(9561f87e1a6425bb9544e71340336db8d43c1fd9) )
+ ROM_REGION( 0x0800, "gfx2", 0 )
+ // This needs double checking, might be a case of the wrong ROM type being marked on the PCB like with the final program rom.
+ // Flyers indicate there should be an 'old lady' character, and even show a graphic for one approaching from the right.
+ // This graphic is not present in our ROM and instead we get incorrect looking sprites, so the rom could be half size with
+ // an additional sprite bank bit coming from somewhere?
+ ROM_LOAD( "type01.14l", 0x0000, 0x0800, BAD_DUMP CRC(af79179a) SHA1(de61af7d02c93be326a33ee51572e3da7a25dab0) )
ROM_REGION( 0x0100, "gfxmix", 0 )
ROM_LOAD( "82s100.13m", 0x0000, 0x00f5, CRC(6b724cdb) SHA1(8a0ca3b171b103661a3b2fffbca3d7162089e243) )
- ROM_REGION( 0x10000, "audiopcb:melodycpu", 0 )
+ ROM_REGION( 0x10000, "audiocpu", 0 )
ROM_LOAD( "sound01.1f", 0xc000, 0x1000, CRC(473c44de) SHA1(ff08b02d45a2c23cabb5db716aa203225a931424) )
ROM_LOAD( "sound01.1d", 0xe000, 0x1000, CRC(f65cb9d0) SHA1(a2fe7563c6da055bf6aa20797b2d9fa184f0133c) )
ROM_LOAD( "sound01.1e", 0xf000, 0x1000, CRC(1bd90c93) SHA1(20fd2b765a42e25cf7f716e6631b8c567785a866) )
@@ -714,14 +748,15 @@ ROM_START( catnmousa )
ROM_LOAD( "catnmous.10g", 0x0800, 0x0800, CRC(e5259f9b) SHA1(396753291ab36c3ed72208d619665fc0f33d1e17) )
ROM_LOAD( "catnmous.11g", 0x1000, 0x0800, CRC(2999f378) SHA1(929082383b2b0006de171587adb932ce57316963) )
- ROM_REGION( 0x1000, "gfx2", 0 )
- ROM_LOAD( "cat'n_mouse-type01-mem_n.14l.14l", 0x0000, 0x1000, CRC(83502383) SHA1(9561f87e1a6425bb9544e71340336db8d43c1fd9) )
+ ROM_REGION( 0x0800, "gfx2", 0 )
+ // see comment in parent set
+ ROM_LOAD( "catnmous.14l", 0x0000, 0x0800, BAD_DUMP CRC(af79179a) SHA1(de61af7d02c93be326a33ee51572e3da7a25dab0) )
ROM_REGION( 0x0100, "gfxmix", 0 )
// copied from parent set to give working graphics, need dump to confirm
ROM_LOAD( "catnmousa_82s100.13m", 0x0000, 0x00f5, CRC(6b724cdb) SHA1(8a0ca3b171b103661a3b2fffbca3d7162089e243) BAD_DUMP )
- ROM_REGION( 0x10000, "audiopcb:melodycpu", 0 )
+ ROM_REGION( 0x10000, "audiocpu", 0 )
ROM_LOAD( "snd.1f", 0xc000, 0x1000, CRC(473c44de) SHA1(ff08b02d45a2c23cabb5db716aa203225a931424) )
ROM_LOAD( "snd.1d", 0xe000, 0x1000, CRC(f65cb9d0) SHA1(a2fe7563c6da055bf6aa20797b2d9fa184f0133c) )
ROM_LOAD( "snd.1e", 0xf000, 0x1000, CRC(1bd90c93) SHA1(20fd2b765a42e25cf7f716e6631b8c567785a866) )
@@ -730,5 +765,5 @@ ROM_END
GAME( 1981, laserbat, 0, laserbat, laserbat, laserbat_state_base, laserbat, ROT0, "Zaccaria", "Laser Battle", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
GAME( 1981, lazarian, laserbat, laserbat, lazarian, laserbat_state_base, laserbat, ROT0, "Zaccaria (Bally Midway license)", "Lazarian", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1982, catnmous, 0, catnmous, catnmous, laserbat_state_base, laserbat, ROT90, "Zaccaria", "Cat and Mouse (set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1982, catnmousa, catnmous, catnmous, catnmous, laserbat_state_base, laserbat, ROT90, "Zaccaria", "Cat and Mouse (set 2)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1982, catnmous, 0, catnmous, catnmous, laserbat_state_base, laserbat, ROT90, "Zaccaria", "Cat and Mouse (set 1)", MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1982, catnmousa, catnmous, catnmous, catnmous, laserbat_state_base, laserbat, ROT90, "Zaccaria", "Cat and Mouse (set 2)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/m5.cpp b/src/mame/drivers/m5.cpp
index 6c48e8786d0..91b05cf42b5 100644
--- a/src/mame/drivers/m5.cpp
+++ b/src/mame/drivers/m5.cpp
@@ -1,266 +1,25 @@
// license:BSD-3-Clause
-// copyright-holders:Curt Coder, Ales Dlabac
+// copyright-holders:Curt Coder
/***************************************************************************
Sord m.5
http://www.retropc.net/mm/m5/
- http://www.museo8bits.es/wiki/index.php/Sord_M5 not working
- http://k5.web.klfree.net/content/view/10/11/ not working
- http://k5.web.klfree.net/images/stories/sord/m5heap.htm not working
- http://k5.klfree.net/index.php?option=com_content&task=view&id=5&Itemid=3
- http://k5.klfree.net/index.php?option=com_content&task=view&id=10&Itemid=11
- http://k5.klfree.net/index.php?option=com_content&task=view&id=14&Itemid=3
- http://www.dlabi.cz/?s=sord
- https://www.facebook.com/groups/59667560188/
- http://www.oldcomp.cz/viewtopic.php?f=103&t=1164
+ http://www.museo8bits.es/wiki/index.php/Sord_M5
+ http://k5.web.klfree.net/content/view/10/11/
+ http://k5.web.klfree.net/images/stories/sord/m5heap.htm
****************************************************************************/
-/***************************************************************************
+/*
TODO:
- - fd5 floppy
+ - floppy
- SI-5 serial interface (8251, ROM)
- - ramdisk for KRX Memory expansion
- - add to brno mod support for lzr floppy disc format
- - move dipswitch declaration to sofwarelist file?
- - in brno mod include basic-i
- - 64krx: get windows ROM version with cpm & ramdisk support (Stuchlik S.E.I. version)
-
-
-
- CHANGELOG:
-
-5.2.2016
- - added BRNO modification - 1024kB Ramdisk + CP/M support
- - 32/64KB RAM expansions EM-5, 64KBI, 64KBF, 64KRX
- - since now own version of rom and slot handlers
- - 2 slots for carts
-
-
-******************************************************************************
-
-
-Controlling (paging) of homebrew 64KB RAM carts
-================================================
-
-Used ports:
-EM-64, 64KBI: OUT 6CH,00H - enables ROM
- OUT 6CH,01H - enables RAM
-64KBF: OUT 30H,00000xxxB - enables RAM or ROM, see bellow
-64KRD, 64KRX: OUT 7FH,00000000B - enables RAM
- OUT 7FH,11111111B - enables ROM
- OUT 7FH,xxxxxxxxB - enables RAM and ROM, see bellow
-
-===========================================================================================================================
-
-RAM/ROM modes of EM-64/64KBI cart
-------------------------------------------
-mode 0: 0x0000-0x6fff ROM 0x7000-0xffff RAM (it is possible to limit actual ROM size by DIP switch only to 32kb)
-mode 1: 0x0000-0xffff RAM
-
-===========================================================================================================================
-
-RAM/ROM modes of 64KBF version 2C cart
-------------------------------------------
-Memory paging is done by using "OUT &30,mod".
-
-MODE READ WRITE
-----------------------------------------------------------------------
- 00 8 KB MON + 20 KB BF + 36 KB RAM 28 KB DIS + 36 KB RAM
- 01 64 KB RAM 64 KB RAM
- 02 8 KB MON + 56 KB RAM 64 KB RAM
- 03 64 KB RAM 28 KB DIS + 36 KB RAM
- 04 64 KB RAM 16 KB DIS + 48 KB RAM
- 05 8 KB MON + 20 KB BF + 36 KB RAM 64 KB RAM
- 06 8 KB MON + 20 KB DIS + 36 KB RAM 64 KB RAM
- 07 64 KB DIS 64 KB DIS
-
-Version LZR ( 2C )
-================
-
-+------------+
-|////////////| READ ONLY AREA
-+------------+
-|\\\\\\\\\\\\| WRITE ONLY AREA
-+------------+
-|XXXXXXXXXXXX| R&W AREA
-+------------+
-| | DISABLED R&W
-+------------+
-
- 0 0 0 1 1 2 2 2 3 3 4 4 4 5 5 6 6
-kB 0 4 8 2 6 0 4 8 2 6 0 4 8 2 6 0 4
- +-------+-------------------+
-ROM |MONITOR| BASIC-F |
- +-------+-------+-------+---+---+-------+-------+-------+-------+
-RAM | | | | | | | | |
- +-------+-------+-------+-------+-------+-------+-------+-------+
-CART | | | | | | | | |
- +-------+-------+-------+-------+-------+-------+-------+-------+
-
-
-Mode
- +-------+-------------------+
- |///////|///////////////////|
- +-------+-------+-------+---+---+-------+-------+-------+-------+
-M0 | | | | |XXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|
- +-------+-------+-------+-------+-------+-------+-------+-------+
-
- +-------+-------------------+
- | | |
- +-------+-------+-------+---+---+-------+-------+-------+-------+
-M1 |XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|
- +-------+-------+-------+-------+-------+-------+-------+-------+
-
- +-------+-------------------+
- |///////| |
- +-------+-------+-------+---+---+-------+-------+-------+-------+
-M2 |\\\\\\\|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|
- +-------+-------+-------+-------+-------+-------+-------+-------+
-
- +-------+-------------------+
- | | |
- +-------+-------+-------+---+---+-------+-------+-------+-------+
-M3 |///////|///////|///////|///|XXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|
- +-------+-------+-------+-------+-------+-------+-------+-------+
-
- +-------+-------------------+
- | | |
- +-------+-------+-------+---+---+-------+-------+-------+-------+
-M4 |///////|///////|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|
- +-------+-------+-------+-------+-------+-------+-------+-------+
-
- +-------+-------------------+
- |///////|///////////////////|
- +-------+-------+-------+---+---+-------+-------+-------+-------+
-M5 |\\\\\\\|\\\\\\\|\\\\\\\|\\\|XXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|
- +-------+-------+-------+-------+-------+-------+-------+-------+
-
- +-------+-------------------+
- |///////| |
- +-------+-------+-------+---+---+-------+-------+-------+-------+
-M6 |\\\\\\\|\\\\\\\|\\\\\\\|\\\|XXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|
- +-------+-------+-------+---+---+-------+-------+-------+-------+
- |///////|///////|///|
- +-------+-------+---+
-
- +-------+-------------------+
- | | |
- +-------+-------+-------+---+---+-------+-------+-------+-------+
-M7 | | | | | | | | |
- +-------+-------+-------+-------+-------+-------+-------+-------+
- |XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|
- +---------------------------------------------------------------+
-
-===========================================================================================================
-
-Memory map of ROM and RAM in configuration SORD M5 + 64 KRX memory cart
------------------------------------------------------------------------
-
- cart inside Sord inside Sord cart cart
-FFFF +----------+ +----------+ +----------+ +----------+ +----------+
- | | | | | |
- | | | EPROM 16K| | EPROM 16K|
- | | | 5 | | 7 |
-C000 | DRAM | +----------+ +----------+
- | | | | | |
- | | | EPROM 16K| | EPROM 16K|
- | | | 4 | | 6 |
-7FFF +----------+ +----------+ +----------+ +----------+
- | SRAM |
-7000 +----------+ +----------+
- | |
-6000 | | +----------+
- | | | |
-5000 | | | EPROM 8K |
- | | | 3 |
-4000 | | +----------+ +----------+
- | | | |
-3000 | DRAM | | EPROM 8K |
- | | | 2 |
-2000 | | +----------+
- | | | |
-1000 | | | EPROM 8K |
- | | | 1 |
-0000 +----------+ +----------+ +----------+ +----------+ +----------+
-
-1 - MONITOR ROM
-2 - WINDOWS + BASIC-F 3rd part
-3 - BASIC-I
-4 - 2nd part of BASIC-F + 1st part of BASIC-F
-5 - 1st part of BASIC-G + 2nd part of BASIC-G
-6 - 1st part of MSX 1.C
-7 - 2nd part of MSX 1.C
-
-Note: position 3 could be replaced with SRAM 8KB with battery power backup!
-
-Upon powering up either SRAM + 1,2,3,4,5 or SRAM + 1,2,3,6,7 are selected.
-Switching between 4,5 and 6,7 is provided by hw switch, selecting ROM/RAM mode happens
-using OUT (7FH),A, where each bit of A means 8KB memory chunk ( state: 0=RAM,
-1=ROM, bit: 0=1, 1=2, 2=3, 3=always SRAM, 4=4, 5=5, 6=6, 7=7 ).
-
-
-*/
-
-/*
-*************************************************************
-* BRNO MOD *
-*************************************************************
-HW and SW was originaly created by Pavel Brychta with help of Jiri Kubin and L. Novak
-This driver mod was implemented by Ales Dlabac with great help of Pavel Brychta. Without him this would never happen
-This mod exists in two versions. First one is "windows"(brno_rom12.rom) version and was created by Ladislav Novak.
-Second version vesion is "pure text" and was created by Pavel Brychta and Jiri Kubin
-
-Function:
-Whole Sord's address area (0000-FFFF) is divided to 16 4kB banks. To this 16 banks
-you can map any of possible 256 ramdisc blocks what allows user to have 1024kB large ramdisc.
-Ofcourse to be able to realise this is necessary page out all roms
-
-As pagination port MMU(page select) is used.
-For RAM write protection port CASEN is used. 0=access to ramdisk enabled, 0xff=ramdisk access disabled(data protection), &80=ROM2+48k RAM, &81=ROM2+4k RAM(this is not implemented)
-For ROM detaching port RAMEN is used. 0=rom enable; 0xff=rom+sord ram disabled (ramdisk visible)
-
-SORD M5 RAM memory map in address area 7000H-7FFFH
-7000H 7300H 7800H 7E00H 7FFFH
- +---------+-----------------------+----------------------------+---------+
- | a. | | c. | d. |
-
-a. SORD system variables and stack
-c. Area where the first sector of 1st track is loaded, simultaneously is reserved for Hook program
-d. Reserved for memory tests and ramdisk mapping(pagination). After boot is used as buffer for cursor position,
- type of floppy and so on. Area consists of:
-
-7FFFH .... bootloader version
-7FFEH .... identification byte of floppy - is transfered from EPROM, it might be changed by SETUP
-7FFDH .... namber of last Ramdisk segment of RAM
-7FFBH .... address of cursor in VRAM in 40 columns CRT. For 80 columns CRT both bytes are zero
-7FF9H .... X,Y cursor actual position for 40 columns CRTs. In case of 80 columns CRT both bytes are zero
-
-System floppy disk header on track 00 of 1st sector
- byte 0-1 ... system disk identification SY
- byte 2 ... # of physical sectors for BIOS or DOS plus # of segments for DIR
- byte 3-4 ... Start address for loading of BIOS or DOS
- byte 5 ... # of bytes for possible HOOK program
- byte 6- ... HOOK program, or either BIOS or DOS
-
-In case of HOOK, bytes 8 and 9 contains characters 'H' and 'O' for HOOK testing
-
-Few other notes:
- Ramdisc warm boot is provided by pressing Ctrl+C
- Against real HW/SW is possible to store ramdisc dump to file by pressing Ctrl+S which could be loaded back in as snapshot
-
-
- Floppy formats as follows:
-
- A: Ramdisk 1024kB, 8 sectors,
- B: Floppy format "Heat Magnolia" SingleSide SingleDensity , 40 tracks, 9 sectors, 512 sec. length, 128 dirs, offset 3, 166kB
- C: Floppy format "Robotron aka PC1715", DS DD, 80 tracks, 5 sectors, 1024 sec. length, 128 dirs, offset 2, 780kB
-
-**********************************************************************************************************************************/
+ - 64KB RAM expansions
+*/
#include "emu.h"
@@ -272,17 +31,14 @@ Few other notes:
#include "bus/centronics/ctronics.h"
#include "machine/i8255.h"
#include "machine/ram.h"
-#include "machine/wd_fdc.h" //brno mod
#include "machine/upd765.h"
#include "machine/z80ctc.h"
#include "sound/sn76496.h"
#include "video/tms9928a.h"
-#include "bus/m5/slot.h"
-#include "bus/m5/rom.h"
-#include "softlist.h"
+#include "bus/generic/slot.h"
+#include "bus/generic/carts.h"
#include "includes/m5.h"
-
-
+#include "softlist.h"
//**************************************************************************
@@ -476,211 +232,6 @@ WRITE8_MEMBER( m5_state::fd5_tc_w )
m_fdc->tc_w(false);
}
-//**************************************************************************
-// 64KBI support for oldest memory module
-//**************************************************************************
-
-READ8_MEMBER( m5_state::mem64KBI_r ) //in 0x6c
-{
- return BIT(m_ram_mode, 0);
-}
-
-WRITE8_MEMBER( m5_state::mem64KBI_w ) //out 0x6c
-{
-
- if (m_ram_type != MEM64KBI) return;
-
- address_space &program = m_maincpu->space(AS_PROGRAM);
- std::string region_tag;
- m_cart_rom = memregion(region_tag.assign(m_cart_ram->tag()).append(M5SLOT_ROM_REGION_TAG).c_str());
- memory_region *ram_region=memregion(region_tag.assign(m_cart_ram->tag()).append(":ram").c_str());
-
- if (m_ram_mode == BIT(data, 0))
- return;
-
- m_ram_mode = BIT(data, 0);
-
- //if 32kb only mode don't map top ram
- if (m_ram_mode && (m_DIPS->read() & 4) != 4)
- {
- program.install_ram(0x0000, 0x6fff, ram_region->base());
- }
- else
- {
- program.install_rom(0x0000, 0x1fff, memregion(Z80_TAG)->base());
- program.unmap_write(0x0000, 0x1fff);
-
- //if AUTOSTART is on don't load any ROM cart
- if (m_cart && (m_DIPS->read() & 2) != 2)
- {
- program.install_read_handler(0x2000, 0x6fff, read8_delegate(FUNC(m5_cart_slot_device::read_rom), (m5_cart_slot_device*)m_cart)); //m_cart pointer to rom cart
- program.unmap_write(0x2000, 0x3fff);
- }
- else
- program.unmap_readwrite(0x2000, 0x3fff);
- }
-
- logerror("64KBI: ROM %s", m_ram_mode == 0 ? "enabled\n" : "disabled\n");
-}
-
-//**************************************************************************
-// 64KBF paging
-//**************************************************************************
-
-WRITE8_MEMBER( m5_state::mem64KBF_w ) //out 0x30
-{
- if (m_ram_type != MEM64KBF) return;
-
- address_space &program = m_maincpu->space(AS_PROGRAM);
- std::string region_tag;
- m_cart_rom = memregion(region_tag.assign(m_cart_ram->tag()).append(M5SLOT_ROM_REGION_TAG).c_str()); //ROM region of the cart
- memory_region *ram_region=memregion(region_tag.assign(m_cart_ram->tag()).append(":ram").c_str()); //RAM region of the cart
- memory_region *rom_region=memregion(region_tag.assign(m_cart->tag()).append(M5SLOT_ROM_REGION_TAG).c_str()); //region where clasic ROM cartridge resides
-
- if (m_ram_mode == data)
- return;
-
- m_ram_mode = data;
-
- switch(m_ram_mode)
- {
- case 0:
- program.unmap_write(0x0000, 0x6fff);
- membank("bank1r")->set_base(memregion(Z80_TAG)->base());
- membank("bank2r")->set_base(m_cart_rom->base());
- membank("bank3r")->set_base(m_cart_rom->base()+0x2000);
- membank("bank4r")->set_base(m_cart_rom->base()+0x4000);
- membank("bank5r")->set_base(ram_region->base()+0x8000); membank("bank5w")->set_base(ram_region->base()+0x8000);
- membank("bank6r")->set_base(ram_region->base()+0xc000); membank("bank6w")->set_base(ram_region->base()+0xc000);
- break;
- case 1:
- program.install_write_bank(0x0000,0x1fff,"bank1w");
- program.install_write_bank(0x2000,0x3fff,"bank2w");
- program.install_write_bank(0x4000,0x5fff,"bank3w");
- program.install_write_bank(0x6000,0x6fff,"bank4w");
- membank("bank1r")->set_base(ram_region->base()+0x0000); membank("bank1w")->set_base(ram_region->base()+0x0000);
- membank("bank2r")->set_base(ram_region->base()+0x2000); membank("bank2w")->set_base(ram_region->base()+0x2000);
- membank("bank3r")->set_base(ram_region->base()+0x4000); membank("bank3w")->set_base(ram_region->base()+0x4000);
- membank("bank4r")->set_base(ram_region->base()+0x6000); membank("bank4w")->set_base(ram_region->base()+0x6000);
- membank("bank5r")->set_base(ram_region->base()+0x8000); membank("bank5w")->set_base(ram_region->base()+0x8000);
- membank("bank6r")->set_base(ram_region->base()+0xc000); membank("bank6w")->set_base(ram_region->base()+0xc000);
- break;
- case 2:
- program.install_write_bank(0x0000,0x1fff,"bank1w");
- program.install_write_bank(0x2000,0x3fff,"bank2w");
- program.install_write_bank(0x4000,0x5fff,"bank3w");
- program.install_write_bank(0x6000,0x6fff,"bank4w");
- membank("bank1r")->set_base(memregion(Z80_TAG)->base()); membank("bank1w")->set_base(ram_region->base()+0x0000);
- membank("bank2r")->set_base(ram_region->base()+0x2000); membank("bank2w")->set_base(ram_region->base()+0x2000);
- membank("bank3r")->set_base(ram_region->base()+0x4000); membank("bank3w")->set_base(ram_region->base()+0x4000);
- membank("bank4r")->set_base(ram_region->base()+0x6000); membank("bank4w")->set_base(ram_region->base()+0x6000);
- membank("bank5r")->set_base(ram_region->base()+0x8000); membank("bank5w")->set_base(ram_region->base()+0x8000);
- membank("bank6r")->set_base(ram_region->base()+0xc000); membank("bank6w")->set_base(ram_region->base()+0xc000);
- break;
- case 3:
- program.unmap_write(0x0000, 0x6fff);
- membank("bank1r")->set_base(ram_region->base()+0x0000);
- membank("bank2r")->set_base(ram_region->base()+0x2000);
- membank("bank3r")->set_base(ram_region->base()+0x4000);
- membank("bank4r")->set_base(ram_region->base()+0x6000);
- membank("bank5r")->set_base(ram_region->base()+0x8000); membank("bank5w")->set_base(ram_region->base()+0x8000);
- membank("bank6r")->set_base(ram_region->base()+0xc000); membank("bank6w")->set_base(ram_region->base()+0xc000);
- break;
- case 4:
- program.unmap_write(0x0000, 0x3fff);
- program.install_write_bank(0x4000,0x5fff,"bank3w");
- program.install_write_bank(0x6000,0x6fff,"bank4w");
- membank("bank1r")->set_base(ram_region->base()+0x0000);
- membank("bank2r")->set_base(ram_region->base()+0x2000);
- membank("bank3r")->set_base(ram_region->base()+0x4000); membank("bank3w")->set_base(ram_region->base()+0x4000);
- membank("bank4r")->set_base(ram_region->base()+0x6000); membank("bank4w")->set_base(ram_region->base()+0x6000);
- membank("bank5r")->set_base(ram_region->base()+0x8000); membank("bank5w")->set_base(ram_region->base()+0x8000);
- membank("bank6r")->set_base(ram_region->base()+0xc000); membank("bank6w")->set_base(ram_region->base()+0xc000);
- break;
- case 5:
- program.install_write_bank(0x0000,0x1fff,"bank1w");
- program.install_write_bank(0x2000,0x3fff,"bank2w");
- program.install_write_bank(0x4000,0x5fff,"bank3w");
- program.install_write_bank(0x6000,0x6fff,"bank4w");
- membank("bank1r")->set_base(memregion(Z80_TAG)->base()); membank("bank1w")->set_base(ram_region->base()+0x0000);
- membank("bank2r")->set_base(m_cart_rom->base()); membank("bank2w")->set_base(ram_region->base()+0x2000);
- membank("bank3r")->set_base(m_cart_rom->base()+0x2000); membank("bank3w")->set_base(ram_region->base()+0x4000);
- membank("bank4r")->set_base(m_cart_rom->base()+0x4000); membank("bank4w")->set_base(ram_region->base()+0x6000);
- membank("bank5r")->set_base(ram_region->base()+0x8000); membank("bank5w")->set_base(ram_region->base()+0x8000);
- membank("bank6r")->set_base(ram_region->base()+0xc000); membank("bank6w")->set_base(ram_region->base()+0xc000);
- break;
- case 6:
- program.install_write_bank(0x0000,0x1fff,"bank1w");
- program.install_write_bank(0x2000,0x3fff,"bank2w");
- program.install_write_bank(0x4000,0x5fff,"bank3w");
- program.install_write_bank(0x6000,0x6fff,"bank4w");
- membank("bank1r")->set_base(memregion(Z80_TAG)->base()); membank("bank1w")->set_base(ram_region->base()+0x0000);
- membank("bank2r")->set_base(rom_region->base()+0x0000); membank("bank2w")->set_base(ram_region->base()+0x2000);
- membank("bank3r")->set_base(rom_region->base()+0x2000); membank("bank3w")->set_base(ram_region->base()+0x4000);
- membank("bank4r")->set_base(rom_region->base()+0x4000); membank("bank4w")->set_base(ram_region->base()+0x6000);
- membank("bank5r")->set_base(ram_region->base()+0x8000); membank("bank5w")->set_base(ram_region->base()+0x8000);
- membank("bank6r")->set_base(ram_region->base()+0xc000); membank("bank6w")->set_base(ram_region->base()+0xc000);
- break;
- case 7: //probably this won't work - it should redirect rw to another ram module
- program.install_write_bank(0x0000,0x1fff,"bank1w");
- program.install_write_bank(0x2000,0x3fff,"bank2w");
- program.install_write_bank(0x4000,0x5fff,"bank3w");
- program.install_write_bank(0x6000,0x6fff,"bank4w");
- program.install_readwrite_bank(0x7000,0x7fff,"sram");
- membank("bank1r")->set_base(rom_region->base()+0x0000); membank("bank1w")->set_base(rom_region->base()+0x0000);
- membank("bank2r")->set_base(rom_region->base()+0x2000); membank("bank2w")->set_base(rom_region->base()+0x2000);
- membank("bank3r")->set_base(rom_region->base()+0x4000); membank("bank3w")->set_base(rom_region->base()+0x4000);
- membank("bank4r")->set_base(rom_region->base()+0x6000); membank("bank4w")->set_base(rom_region->base()+0x6000);
- membank("sram")->set_base(rom_region->base()+0x7000);
- membank("bank5r")->set_base(rom_region->base()+0x8000); membank("bank5w")->set_base(rom_region->base()+0x8000);
- membank("bank6r")->set_base(rom_region->base()+0xc000); membank("bank6w")->set_base(rom_region->base()+0xc000);
- break;
- }
-
- logerror("64KBF RAM mode set to %d\n", m_ram_mode);
-}
-
-//**************************************************************************
-// 64KRX paging
-//**************************************************************************
-
-WRITE8_MEMBER( m5_state::mem64KRX_w ) //out 0x7f
-{
-
- if (m_ram_type != MEM64KRX) return;
- if (m_ram_mode == data) return;
-
- address_space &program = m_maincpu->space(AS_PROGRAM);
- std::string region_tag;
- m_cart_rom = memregion(region_tag.assign(m_cart_ram->tag()).append(M5SLOT_ROM_REGION_TAG).c_str());
- memory_region *ram_region=memregion(region_tag.assign(m_cart_ram->tag()).append(":ram").c_str());
-
- m_ram_mode = data;
-
- BIT(m_ram_mode, 0) ? membank("bank1r")->set_base(memregion(Z80_TAG)->base()) : membank("bank1r")->set_base(ram_region->base());
- BIT(m_ram_mode, 1) ? membank("bank2r")->set_base(m_cart_rom->base()) : membank("bank2r")->set_base(ram_region->base()+0x2000);
- BIT(m_ram_mode, 2) ? membank("bank3r")->set_base(m_cart_rom->base()+0x2000) : membank("bank3r")->set_base(ram_region->base()+0x4000);
-
- if ((m_DIPS->read() & 0x01))
- {
- BIT(m_ram_mode, 4) ? membank("bank5r")->set_base(m_cart_rom->base()+0x6000) : membank("bank5r")->set_base(ram_region->base()+0x8000);
- BIT(m_ram_mode, 5) ? membank("bank6r")->set_base(m_cart_rom->base()+0xa000) : membank("bank6r")->set_base(ram_region->base()+0xc000);
- }
- else
- {
- BIT(m_ram_mode, 6) ? membank("bank5r")->set_base(m_cart_rom->base()+0xe000) : membank("bank5r")->set_base(ram_region->base()+0x8000);
- BIT(m_ram_mode, 7) ? membank("bank6r")->set_base(m_cart_rom->base()+0x12000): membank("bank6r")->set_base(ram_region->base()+0xc000);
- }
-
- //if KRX ROM is paged out page in cart ROM if any
- if (m_cart && BIT(m_ram_mode, 1) == 0 )
- {
- program.install_read_handler(0x2000, 0x6fff, read8_delegate(FUNC(m5_cart_slot_device::read_rom),(m5_cart_slot_device*)m_cart));
- program.unmap_write(0x2000, 0x6fff);
- }
-
- logerror("64KRX RAM mode set to %02x\n", m_ram_mode);
-}
//**************************************************************************
@@ -693,13 +244,10 @@ WRITE8_MEMBER( m5_state::mem64KRX_w ) //out 0x7f
static ADDRESS_MAP_START( m5_mem, AS_PROGRAM, 8, m5_state )
ADDRESS_MAP_UNMAP_HIGH
- AM_RANGE(0x0000, 0x1fff) AM_READ_BANK("bank1r") AM_WRITE_BANK("bank1w") //monitor rom(bios)
- AM_RANGE(0x2000, 0x3fff) AM_READ_BANK("bank2r") AM_WRITE_BANK("bank2w")
- AM_RANGE(0x4000, 0x5fff) AM_READ_BANK("bank3r") AM_WRITE_BANK("bank3w")
- AM_RANGE(0x6000, 0x6fff) AM_READ_BANK("bank4r") AM_WRITE_BANK("bank4w")
- AM_RANGE(0x7000, 0x7fff) AM_RAM //4kb internal RAM
- AM_RANGE(0x8000, 0xbfff) AM_READ_BANK("bank5r") AM_WRITE_BANK("bank5w")
- AM_RANGE(0xc000, 0xffff) AM_READ_BANK("bank6r") AM_WRITE_BANK("bank6w")
+ AM_RANGE(0x0000, 0x1fff) AM_ROM
+ //AM_RANGE(0x2000, 0x6fff) // mapped by the cartslot
+ AM_RANGE(0x7000, 0x7fff) AM_RAM
+ AM_RANGE(0x8000, 0xffff) AM_RAM
ADDRESS_MAP_END
@@ -714,7 +262,7 @@ static ADDRESS_MAP_START( m5_io, AS_IO, 8, m5_state )
AM_RANGE(0x10, 0x10) AM_MIRROR(0x0e) AM_DEVREADWRITE("tms9928a", tms9928a_device, vram_read, vram_write)
AM_RANGE(0x11, 0x11) AM_MIRROR(0x0e) AM_DEVREADWRITE("tms9928a", tms9928a_device, register_read, register_write)
AM_RANGE(0x20, 0x20) AM_MIRROR(0x0f) AM_DEVWRITE(SN76489AN_TAG, sn76489a_device, write)
- AM_RANGE(0x30, 0x30) AM_MIRROR(0x08) AM_READ_PORT("Y0") AM_WRITE( mem64KBF_w) // 64KBF paging
+ AM_RANGE(0x30, 0x30) AM_MIRROR(0x08) AM_READ_PORT("Y0") // 64KBF bank select
AM_RANGE(0x31, 0x31) AM_MIRROR(0x08) AM_READ_PORT("Y1")
AM_RANGE(0x32, 0x32) AM_MIRROR(0x08) AM_READ_PORT("Y2")
AM_RANGE(0x33, 0x33) AM_MIRROR(0x08) AM_READ_PORT("Y3")
@@ -725,9 +273,9 @@ static ADDRESS_MAP_START( m5_io, AS_IO, 8, m5_state )
AM_RANGE(0x40, 0x40) AM_MIRROR(0x0f) AM_DEVWRITE("cent_data_out", output_latch_device, write)
AM_RANGE(0x50, 0x50) AM_MIRROR(0x0f) AM_READWRITE(sts_r, com_w)
// AM_RANGE(0x60, 0x63) SIO
- AM_RANGE(0x6c, 0x6c) AM_READWRITE(mem64KBI_r, mem64KBI_w) //EM-64/64KBI paging
- AM_RANGE(0x70, 0x73) /*AM_MIRROR(0x0c) don't know if necessary mirror this*/ AM_DEVREADWRITE(I8255A_TAG, i8255_device, read, write)
- AM_RANGE(0x7f, 0x7f) AM_WRITE( mem64KRX_w) //64KRD/64KRX paging
+// AM_RANGE(0x6c, 0x6c) EM-64/64KBI bank select
+ AM_RANGE(0x70, 0x73) AM_MIRROR(0x0c) AM_DEVREADWRITE(I8255A_TAG, i8255_device, read, write)
+// AM_RANGE(0x7f, 0x7f) 64KRD/64KRX bank select
ADDRESS_MAP_END
@@ -848,17 +396,6 @@ static INPUT_PORTS_START( m5 )
PORT_START("RESET")
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Reset") PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC)) /* 1st line, 1st key from right! */
-
- PORT_START("DIPS")
- PORT_DIPNAME(0x01, 0x01, "KRX: BASIC[on]/MSX[off]") //switching between BASIC and MSX ROMs which share same address area
- PORT_DIPSETTING( 0x00, DEF_STR( Off ))
- PORT_DIPSETTING( 0x01, DEF_STR( On ))
- PORT_DIPNAME(0x02, 0x00, "KBI: AUTOSTART") //pages out cart and starts loading from tape
- PORT_DIPSETTING( 0x00, DEF_STR( Off ))
- PORT_DIPSETTING( 0x02, DEF_STR( On ))
- PORT_DIPNAME(0x04, 0x00, "KBI: 32kb only") //compatible with em-5
- PORT_DIPSETTING( 0x00, DEF_STR( Off ))
- PORT_DIPSETTING( 0x04, DEF_STR( On ))
INPUT_PORTS_END
//-------------------------------------------------
@@ -884,7 +421,7 @@ READ8_MEMBER( m5_state::ppi_pa_r )
return m_fd5_data;
}
-READ8_MEMBER(m5_state::ppi_pc_r )
+READ8_MEMBER( m5_state::ppi_pc_r )
{
/*
@@ -974,11 +511,6 @@ static SLOT_INTERFACE_START( m5_floppies )
SLOT_INTERFACE( "525dd", FLOPPY_525_DD )
SLOT_INTERFACE_END
-static SLOT_INTERFACE_START(m5_cart)
- SLOT_INTERFACE_INTERNAL("std", M5_ROM_STD)
- SLOT_INTERFACE_INTERNAL("ram", M5_ROM_RAM)
-SLOT_INTERFACE_END
-
//-------------------------------------------------
// z80_daisy_config m5_daisy_chain
//-------------------------------------------------
@@ -986,422 +518,54 @@ SLOT_INTERFACE_END
static const z80_daisy_config m5_daisy_chain[] =
{
{ Z80CTC_TAG },
- { NULL }
+ { nullptr }
};
-//-------------------------------------------------
-// BRNO mod code below
-//-------------------------------------------------
-
-
-//-------------------------------------------------
-// ADDRESS_MAP( m5_mem_brno )
-//-------------------------------------------------
-
-static ADDRESS_MAP_START( m5_mem_brno, AS_PROGRAM, 8, brno_state )
- ADDRESS_MAP_UNMAP_HIGH
- AM_RANGE(0x0000, 0x0fff) AM_READWRITE_BANK("bank1")
- AM_RANGE(0x1000, 0x1fff) AM_READWRITE_BANK("bank2")
- AM_RANGE(0x2000, 0x2fff) AM_READWRITE_BANK("bank3")
- AM_RANGE(0x3000, 0x3fff) AM_READWRITE_BANK("bank4")
- AM_RANGE(0x4000, 0x4fff) AM_READWRITE_BANK("bank5")
- AM_RANGE(0x5000, 0x5fff) AM_READWRITE_BANK("bank6")
- AM_RANGE(0x6000, 0x6fff) AM_READWRITE_BANK("bank7")
- AM_RANGE(0x7000, 0x7fff) AM_READWRITE_BANK("bank8")
- AM_RANGE(0x8000, 0x8fff) AM_READWRITE_BANK("bank9")
- AM_RANGE(0x9000, 0x9fff) AM_READWRITE_BANK("bank10")
- AM_RANGE(0xa000, 0xafff) AM_READWRITE_BANK("bank11")
- AM_RANGE(0xb000, 0xbfff) AM_READWRITE_BANK("bank12")
- AM_RANGE(0xc000, 0xcfff) AM_READWRITE_BANK("bank13")
- AM_RANGE(0xd000, 0xdfff) AM_READWRITE_BANK("bank14")
- AM_RANGE(0xe000, 0xefff) AM_READWRITE_BANK("bank15")
- AM_RANGE(0xf000, 0xffff) AM_READWRITE_BANK("bank16")
-ADDRESS_MAP_END
+//**************************************************************************
+// MACHINE INITIALIZATION
+//**************************************************************************
//-------------------------------------------------
-// ADDRESS_MAP( brno_io )
+// MACHINE_START( m5 )
//-------------------------------------------------
-static ADDRESS_MAP_START( brno_io, AS_IO, 8, brno_state )
- ADDRESS_MAP_UNMAP_HIGH
- ADDRESS_MAP_GLOBAL_MASK(0xff)
- AM_RANGE(0x00, 0x03) AM_MIRROR(0x0c) AM_DEVREADWRITE(Z80CTC_TAG, z80ctc_device, read, write)
- AM_RANGE(0x10, 0x10) AM_MIRROR(0x0e) AM_DEVREADWRITE("tms9928a", tms9928a_device, vram_read, vram_write)
- AM_RANGE(0x11, 0x11) AM_MIRROR(0x0e) AM_DEVREADWRITE("tms9928a", tms9928a_device, register_read, register_write)
- AM_RANGE(0x20, 0x20) AM_MIRROR(0x0f) AM_DEVWRITE(SN76489AN_TAG, sn76489a_device, write)
- AM_RANGE(0x30, 0x30) AM_READ_PORT("Y0")
- AM_RANGE(0x31, 0x31) AM_READ_PORT("Y1")
- AM_RANGE(0x32, 0x32) AM_READ_PORT("Y2")
- AM_RANGE(0x33, 0x33) AM_READ_PORT("Y3")
- AM_RANGE(0x34, 0x34) AM_READ_PORT("Y4")
- AM_RANGE(0x35, 0x35) AM_READ_PORT("Y5")
- AM_RANGE(0x36, 0x36) AM_READ_PORT("Y6")
- AM_RANGE(0x37, 0x37) AM_READ_PORT("JOY")
- AM_RANGE(0x40, 0x40) AM_MIRROR(0x0f) AM_DEVWRITE("cent_data_out", output_latch_device, write)
- AM_RANGE(0x50, 0x50) AM_MIRROR(0x0f) AM_READWRITE(sts_r, com_w)
-// AM_RANGE(0x60, 0x63) // SIO
- AM_RANGE(0x64, 0x67) AM_READWRITE(mmu_r, mmu_w) // MMU - page select (ramdisk memory paging)
- AM_RANGE(0x68, 0x6b) AM_READWRITE(ramsel_r, ramsel_w) // CASEN 0=access to ramdisk enabled, 0xff=ramdisk access disabled(data protection), &80=ROM2+48k RAM, &81=ROM2+4k RAM
- AM_RANGE(0x6c, 0x6f) AM_READWRITE(romsel_r, romsel_w) // RAMEN 0=rom enable; 0xff=rom+sord ram disabled (ramdisk visible)
-// AM_RANGE(0x70, 0x73) AM_MIRROR(0x04) AM_DEVREADWRITE(I8255A_TAG, i8255_device, read, write) // PIO
- AM_RANGE(0x78, 0x7b) AM_DEVREADWRITE(WD2797_TAG, wd_fdc_t, read, write) // WD2797 registers -> 78 - status/cmd, 79 - track #, 7a - sector #, 7b - data
- AM_RANGE(0x7c, 0x7c) AM_READWRITE(fd_r, fd_w) // drive select
-ADDRESS_MAP_END
-
-
-READ8_MEMBER( brno_state::mmu_r )
-{
- return 0;
-}
-
-
-WRITE8_MEMBER( brno_state::mmu_w )
-{
-
- m_ramcpu = m_maincpu->state_int(Z80_B);
- m_rambank = ~data; //m_maincpu->state_int(Z80_A);
- m_rammap[m_ramcpu >> 4]=m_rambank;
-
-
- switch (m_ramcpu>>4)
- {
- case 0: membank("bank1")->set_base(memregion(RAMDISK)->base()+(m_rambank << 12));break;
- case 1: membank("bank2")->set_base(memregion(RAMDISK)->base()+(m_rambank << 12));break;
- case 2: membank("bank3")->set_base(memregion(RAMDISK)->base()+(m_rambank << 12));break;
- case 3: membank("bank4")->set_base(memregion(RAMDISK)->base()+(m_rambank << 12));break;
- case 4: membank("bank5")->set_base(memregion(RAMDISK)->base()+(m_rambank << 12));break;
- case 5: membank("bank6")->set_base(memregion(RAMDISK)->base()+(m_rambank << 12));break;
- case 6: membank("bank7")->set_base(memregion(RAMDISK)->base()+(m_rambank << 12));break;
- case 7: if (!m_romen) membank("bank8")->set_base(memregion(RAMDISK)->base()+(m_rambank << 12));break;
- case 8: membank("bank9")->set_base(memregion(RAMDISK)->base()+(m_rambank << 12));break;
- case 9: membank("bank10")->set_base(memregion(RAMDISK)->base()+(m_rambank << 12));break;
- case 10: membank("bank11")->set_base(memregion(RAMDISK)->base()+(m_rambank << 12));break;
- case 11: membank("bank12")->set_base(memregion(RAMDISK)->base()+(m_rambank << 12));break;
- case 12: membank("bank13")->set_base(memregion(RAMDISK)->base()+(m_rambank << 12));break;
- case 13: membank("bank14")->set_base(memregion(RAMDISK)->base()+(m_rambank << 12));break;
- case 14: membank("bank15")->set_base(memregion(RAMDISK)->base()+(m_rambank << 12));break;
- case 15: membank("bank16")->set_base(memregion(RAMDISK)->base()+(m_rambank << 12));break;
- }
-
- //logerror("RAMdisk page change(CPURAM<=BANK): &%02X00<=%02X at address &%04X\n",m_ramcpu,m_rambank,m_maincpu->state_int(Z80_PC)-2);
-
-
-}
-
-READ8_MEMBER( brno_state::ramsel_r )
-{
- return m_ramen;
-}
-
-WRITE8_MEMBER( brno_state::ramsel_w ) //out 6b
-{
- //address_space &program = m_maincpu->space(AS_PROGRAM);
-
- if (!data)
- m_ramen=true;
- else
- m_ramen=false;
-
- logerror("CASEN change: out (&6b),%x\n",data);
-}
-
-READ8_MEMBER( brno_state::romsel_r )
-{
- return m_romen;
-}
-
-WRITE8_MEMBER( brno_state::romsel_w ) //out 6c
+void m5_state::machine_start()
{
address_space &program = m_maincpu->space(AS_PROGRAM);
- if (!data)
+ // configure RAM
+ switch (m_ram->size())
{
- program.install_rom(0x0000, 0x6fff, memregion(Z80_TAG)->base());
- program.unmap_write(0x0000, 0x6fff);
- m_romen=true;
- }
+ case 4*1024:
+ program.unmap_readwrite(0x8000, 0xffff);
+ break;
- else
- {
- program.install_readwrite_bank(0x0000, 0x0fff, "bank1");
- program.install_readwrite_bank(0x1000, 0x1fff, "bank2");
- program.install_readwrite_bank(0x2000, 0x2fff, "bank3");
- program.install_readwrite_bank(0x3000, 0x3fff, "bank4");
- program.install_readwrite_bank(0x4000, 0x4fff, "bank5");
- program.install_readwrite_bank(0x5000, 0x5fff, "bank6");
- program.install_readwrite_bank(0x6000, 0x6fff, "bank7");
-
- m_romen=false;
- }
-
- logerror("RAMEN change: out (&6c),%x\n",data);
-}
-
-
-//-------------------------------------------------
-// FD port 7c - Floppy select
-//-------------------------------------------------
-
-READ8_MEMBER( brno_state::fd_r )
-{
- return 0;
-}
-
-
-WRITE8_MEMBER( brno_state::fd_w )
-{
- floppy_image_device *floppy;
- m_floppy = NULL;
- int disk = 0;
-
-
- floppy = m_floppy0->get_device();
- if (floppy)
- {
- if(BIT(data,0))
- {
- m_floppy= floppy;
- disk=1;
- }
- else
- {
- floppy->mon_w(1);
- }
- }
- floppy = m_floppy1->get_device();
- if (floppy)
- {
- if(BIT(data,1))
- {
- m_floppy= floppy;
- disk=2;
- }
- else
- {
- floppy->mon_w(1);
- }
- }
-
- m_fdc->set_floppy(m_floppy);
- if (m_floppy)
- {
- m_floppy->set_rpm(300);
- m_floppy->mon_w(0);
- logerror("Select floppy %d\n", disk);
- }
-
-}
-
-
-
-FLOPPY_FORMATS_MEMBER( brno_state::floppy_formats )
- FLOPPY_DSK_FORMAT
-FLOPPY_FORMATS_END
-
-static SLOT_INTERFACE_START( brno_floppies )
- SLOT_INTERFACE("35hd", FLOPPY_35_DD)
-SLOT_INTERFACE_END
-
-
-//-------------------------------------------------
-// SNAPSHOT LOADER - BRNO
-//-------------------------------------------------
-
-SNAPSHOT_LOAD_MEMBER( brno_state, brno )
-{
-
-
- UINT8* rmd = memregion(RAMDISK)->base();
-
-
- popmessage("Loading file %s\r\n", image.filename());
- //image.message(" aaaaa:%s",image.basename_noext());
-
-
-
- if (strcmp(image.basename_noext(), "ramdump") == 0)
- {
- logerror("Dumping ramdisk to file.\r\n");
- }
+ case 36*1024:
+ break;
- if (strcmp(image.filetype(), "rmd") == 0)
- {
-
-
- image.fread( rmd+0x10000, snapshot_size-0x10000);
-
-
- // image.seterror(IMAGE_ERROR_INVALIDIMAGE, "Not a Z1013 image");
- // image.message(" Not a Z1013 image");
+ case 68*1024:
+ break;
}
- else
- return IMAGE_INIT_FAIL;
-
+ if (m_cart->exists())
+ program.install_read_handler(0x2000, 0x6fff, read8_delegate(FUNC(generic_slot_device::read_rom),(generic_slot_device*)m_cart));
- return IMAGE_INIT_PASS;
-}
-
-//**************************************************************************
-// MACHINE INITIALIZATION
-//**************************************************************************
-
-//-------------------------------------------------
-// MACHINE_START( m5 )
-//-------------------------------------------------
-void m5_state::machine_start()
-{
// register for state saving
save_item(NAME(m_fd5_data));
save_item(NAME(m_fd5_com));
save_item(NAME(m_intra));
save_item(NAME(m_ibfa));
save_item(NAME(m_obfa));
-
-}
-
-void m5_state::machine_reset()
-{
- address_space &program = m_maincpu->space(AS_PROGRAM);
- std::string region_tag;
-
- //is ram/rom cart plugged in?
- if (m_cart1->exists())
- {
- if (m_cart1->get_type() > 0)
- m_cart_ram=m_cart1;
- else
- m_cart=m_cart1;
- }
- if (m_cart2->exists())
- {
- if (m_cart2->get_type() > 0)
- m_cart_ram=m_cart2;
- else
- m_cart=m_cart2;
- }
- // no cart inserted - there is nothing to do - not allowed in original Sord m5
- if (m_cart_ram == NULL && m_cart == NULL)
- {
- membank("bank1r")->set_base(memregion(Z80_TAG)->base());
- program.unmap_write(0x0000, 0x1fff);
- // program.unmap_readwrite(0x2000, 0x6fff); //if you uncomment this line Sord starts cassete loading but it is not correct on real hw
- program.unmap_readwrite(0x8000, 0xffff);
- return;
- }
-
- //cart is ram module
- if (m_cart_ram->exists())
- {
- m_ram_type=m_cart_ram->get_type();
-
- m_cart_rom = memregion(region_tag.assign(m_cart_ram->tag()).append(M5SLOT_ROM_REGION_TAG).c_str());
- memory_region *ram_region=memregion(region_tag.assign(m_cart_ram->tag()).append(":ram").c_str());
-
- switch (m_ram_type)
- {
- case EM_5:
- program.install_readwrite_handler(0x8000, 0xffff, read8_delegate(FUNC(m5_cart_slot_device::read_ram),(m5_cart_slot_device*)m_cart_ram), write8_delegate(FUNC(m5_cart_slot_device::write_ram),(m5_cart_slot_device*)m_cart_ram));
- if (m_cart)
- {
- program.install_read_handler(0x2000, 0x6fff, read8_delegate(FUNC(m5_cart_slot_device::read_rom),(m5_cart_slot_device*)m_cart));
- program.unmap_write(0x2000, 0x6fff);
- }
- break;
- case MEM64KBI:
- program.install_rom(0x0000, 0x1fff, memregion(Z80_TAG)->base());
- program.unmap_write(0x0000, 0x1fff);
- program.install_ram(0x8000, 0xffff, ram_region->base()+0x8000);
-
- //if AUTOSTART is on then page out cart and start tape loading
- if (m_cart && ((m_DIPS->read() & 2) != 2))
- {
- program.install_read_handler(0x2000, 0x3fff, read8_delegate(FUNC(m5_cart_slot_device::read_rom),(m5_cart_slot_device*)m_cart));
- program.unmap_write(0x2000, 0x3fff);
- }
- else
- program.unmap_readwrite(0x2000, 0x6fff); //monitor rom is testing this area for 0xFFs otherwise thinks there is some ROM cart plugged in
-
- break;
- case MEM64KBF:
- program.unmap_write(0x0000, 0x6fff);
- membank("bank1r")->set_base(memregion(Z80_TAG)->base());
- membank("bank2r")->set_base(m_cart_rom->base());
- membank("bank3r")->set_base(m_cart_rom->base()+0x2000);
- membank("bank4r")->set_base(m_cart_rom->base()+0x4000);
- membank("bank5r")->set_base(ram_region->base()+0x8000); membank("bank5w")->set_base(ram_region->base()+0x8000);
- membank("bank6r")->set_base(ram_region->base()+0xc000); membank("bank6w")->set_base(ram_region->base()+0xc000);
- break;
- case MEM64KRX:
- membank("bank1r")->set_base(memregion(Z80_TAG)->base()); membank("bank1w")->set_base(ram_region->base());
- membank("bank2r")->set_base(m_cart_rom->base()); membank("bank2w")->set_base(ram_region->base()+0x2000);
- membank("bank3r")->set_base(m_cart_rom->base()+0x2000); membank("bank3w")->set_base(ram_region->base()+0x4000);
- membank("bank4r")->set_base(ram_region->base()+0x6000); membank("bank4w")->set_base(ram_region->base()+0x6000);
-
- //page in BASIC or MSX
- if ((m_DIPS->read() & 0x01))
- {
- membank("bank5r")->set_base(m_cart_rom->base()+0x6000); membank("bank5w")->set_base(ram_region->base()+0x8000);
- membank("bank6r")->set_base(m_cart_rom->base()+0xa000); membank("bank6w")->set_base(ram_region->base()+0xc000);
- }
- else
- {
- membank("bank5r")->set_base(m_cart_rom->base()+0xe000); membank("bank5w")->set_base(ram_region->base()+0x8000);
- membank("bank6r")->set_base(m_cart_rom->base()+0x12000); membank("bank6w")->set_base(ram_region->base()+0xc000);
- }
- break;
- default:
- program.unmap_readwrite(0x8000, 0xffff);
- }
- //I don't have idea what to do with savestates, please someone take care of it
- //m_cart_ram->save_ram();
- }
-
- m_ram_mode=0;
}
-
-void brno_state::machine_start()
+void m5_state::machine_reset()
{
}
-void brno_state::machine_reset()
-{
- /* enable ROM1+ROM2 */
- address_space &program = m_maincpu->space(AS_PROGRAM);
-
- program.install_rom(0x0000, 0x5fff, memregion(Z80_TAG)->base());
- program.unmap_write(0x0000, 0x5fff);
-
- //is ram/rom cart plugged in?
- if (m_cart1->exists())
- {
- if (m_cart1->get_type() > 0)
- m_cart_ram=m_cart1;
- else
- m_cart=m_cart1;
- }
- if (m_cart2->exists())
- {
- if (m_cart2->get_type() > 0)
- m_cart_ram=m_cart2;
- else
- m_cart=m_cart2;
- }
-
- if (m_cart)
- {
- program.install_read_handler(0x2000, 0x5fff, read8_delegate(FUNC(m5_cart_slot_device::read_rom),(m5_cart_slot_device*)m_cart));
- program.unmap_write(0x2000, 0x5fff);
- }
-
- m_romen=true;
- m_ramen=false;
-}
//**************************************************************************
// MACHINE CONFIGURATION
@@ -1455,18 +619,18 @@ static MACHINE_CONFIG_START( m5, m5_state )
MCFG_FLOPPY_DRIVE_ADD(UPD765_TAG ":0", m5_floppies, "525dd", m5_state::floppy_formats)
// cartridge
- MCFG_M5_CARTRIDGE_ADD("cartslot1", m5_cart, NULL)
- MCFG_M5_CARTRIDGE_ADD("cartslot2", m5_cart, NULL)
+ MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "m5_cart")
+ MCFG_GENERIC_EXTENSIONS("bin,rom")
+ //MCFG_GENERIC_MANDATORY
// software lists
MCFG_SOFTWARE_LIST_ADD("cart_list", "m5_cart")
MCFG_SOFTWARE_LIST_ADD("cass_list", "m5_cass")
- //MCFG_SOFTWARE_LIST_ADD("flop_list", "m5_flop")
// internal ram
MCFG_RAM_ADD(RAM_TAG)
MCFG_RAM_DEFAULT_SIZE("4K")
- MCFG_RAM_EXTRA_OPTIONS("36K,64K") //68K is not possible, 'cos internal ram always overlays any expansion memory in that area
+ MCFG_RAM_EXTRA_OPTIONS("36K,68K")
MACHINE_CONFIG_END
@@ -1497,48 +661,6 @@ static MACHINE_CONFIG_DERIVED( pal, m5 )
MCFG_SCREEN_UPDATE_DEVICE( "tms9928a", tms9928a_device, screen_update )
MACHINE_CONFIG_END
-//-------------------------------------------------
-// MACHINE_CONFIG( m5p_brno )
-//-------------------------------------------------
-
-
-static MACHINE_CONFIG_DERIVED_CLASS( brno, m5, brno_state )
-
- // basic machine hardware
- MCFG_CPU_MODIFY(Z80_TAG)
- MCFG_CPU_PROGRAM_MAP(m5_mem_brno)
- MCFG_CPU_IO_MAP(brno_io)
-// MCFG_CPU_CONFIG(m5_daisy_chain)
-
-
- //remove devices used for fd5 floppy
- MCFG_DEVICE_REMOVE(Z80_FD5_TAG)
- MCFG_DEVICE_REMOVE(I8255A_TAG)
- MCFG_DEVICE_REMOVE(UPD765_TAG)
-
- // video hardware
- MCFG_DEVICE_ADD( "tms9928a", TMS9929A, XTAL_10_738635MHz / 2 )
- MCFG_TMS9928A_VRAM_SIZE(0x4000)
- MCFG_TMS9928A_OUT_INT_LINE_CB(WRITELINE(m5_state, sordm5_video_interrupt_callback))
- MCFG_TMS9928A_SCREEN_ADD_PAL( "screen" )
- MCFG_SCREEN_UPDATE_DEVICE( "tms9928a", tms9928a_device, screen_update )
-
-
- // floppy
- MCFG_WD2797_ADD(WD2797_TAG, XTAL_1MHz)
- MCFG_FLOPPY_DRIVE_ADD(WD2797_TAG":0", brno_floppies, "35hd", brno_state::floppy_formats)
- MCFG_FLOPPY_DRIVE_SOUND(true)
- MCFG_FLOPPY_DRIVE_ADD(WD2797_TAG":1", brno_floppies, "35hd", brno_state::floppy_formats)
- MCFG_FLOPPY_DRIVE_SOUND(true)
- // only one floppy drive
- //MCFG_DEVICE_REMOVE(WD2797_TAG":1")
-
- MCFG_SNAPSHOT_ADD("snapshot", brno_state, brno, "rmd", 0)
-
- // software list
- MCFG_SOFTWARE_LIST_ADD("flop_list","m5_flop")
-
-MACHINE_CONFIG_END
//**************************************************************************
@@ -1570,21 +692,7 @@ ROM_START( m5p )
ROM_LOAD( "sordfd5.rom", 0x0000, 0x4000, CRC(7263bbc5) SHA1(b729500d3d2b2e807d384d44b76ea5ad23996f4a))
ROM_END
-//-------------------------------------------------
-// ROM( brno )
-//-------------------------------------------------
-
-ROM_START( m5p_brno )
- ROM_REGION( 0x10000, Z80_TAG, ROMREGION_ERASEFF )
- ROM_LOAD( "sordint.ic21", 0x0000, 0x2000, CRC(78848d39) SHA1(ac042c4ae8272ad6abe09ae83492ef9a0026d0b2)) // monitor rom
- //ROM_LOAD( "brno_rom1.rom", 0x2000, 0x2000, CRC(f4cfb2ee) SHA1(23f41d2d9ac915545409dd0163f3dc298f04eea2)) //windows
- //ROM_LOAD( "brno_rom12.rom", 0x2000, 0x4000, CRC(cac52406) SHA1(91f6ba97e85a2b3a317689635d425ee97413bbe3)) //windows+BI
- ROM_LOAD( "brno_boot.rom", 0x2000, 0xd80, CRC(60008729) SHA1(FB26E2AE9F74B0AE0D723B417A038A8EF3D72782))
- //Ramdisc area (maximum is 1024kB 256x 4kB banks)
- ROM_REGION(1024*1024,RAMDISK,0)
- ROM_FILL(0,1024*1024,0xff)
-ROM_END
//**************************************************************************
// DRIVER INITIALIZATION
@@ -1607,14 +715,6 @@ DRIVER_INIT_MEMBER(m5_state,pal)
{
}
-//-------------------------------------------------
-// ROM( BRNO )
-//-------------------------------------------------
-
-DRIVER_INIT_MEMBER(brno_state,brno)
-{
-// logerror("Driver init entered\n" );
-}
//**************************************************************************
@@ -1624,4 +724,3 @@ DRIVER_INIT_MEMBER(brno_state,brno)
// YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS
COMP( 1983, m5, 0, 0, ntsc, m5, m5_state, ntsc, "Sord", "m.5 (Japan)", 0 )
COMP( 1983, m5p, m5, 0, pal, m5, m5_state, pal, "Sord", "m.5 (Europe)", 0 )
-COMP( 1983, m5p_brno, m5, 0, brno, m5, brno_state, brno, "Sord", "m.5 (Europe) BRNO mod", 0 )
diff --git a/src/mame/drivers/magictg.cpp b/src/mame/drivers/magictg.cpp
index 901c8070390..63b0df20394 100644
--- a/src/mame/drivers/magictg.cpp
+++ b/src/mame/drivers/magictg.cpp
@@ -180,7 +180,7 @@ public:
/* 3Dfx Voodoo */
- voodoo_device* m_voodoo[2];
+ device_t* m_voodoo[2];
struct
{
@@ -241,8 +241,8 @@ public:
void magictg_state::machine_start()
{
- m_voodoo[0] = (voodoo_device*)machine().device("voodoo_0");
- m_voodoo[1] = (voodoo_device*)machine().device("voodoo_1");
+ m_voodoo[0] = machine().device("voodoo_0");
+ m_voodoo[1] = machine().device("voodoo_1");
}
@@ -278,7 +278,7 @@ void magictg_state::video_start()
UINT32 magictg_state::screen_update_magictg(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- return m_voodoo[0]->voodoo_update(bitmap, cliprect) ? 0 : UPDATE_HAS_NOT_CHANGED;
+ return voodoo_update(m_voodoo[0], bitmap, cliprect) ? 0 : UPDATE_HAS_NOT_CHANGED;
}
@@ -338,7 +338,7 @@ static void voodoo_0_pci_w(device_t *busdevice, device_t *device, int function,
break;
case 0x40:
state->m_voodoo_pci_regs[0].init_enable = data;
- state->m_voodoo[0]->voodoo_set_init_enable(data);
+ voodoo_set_init_enable(state->m_voodoo[0], data);
break;
default:
diff --git a/src/mame/drivers/maygay1b.cpp b/src/mame/drivers/maygay1b.cpp
index 220854829ee..8d129794d27 100644
--- a/src/mame/drivers/maygay1b.cpp
+++ b/src/mame/drivers/maygay1b.cpp
@@ -709,7 +709,9 @@ DRIVER_INIT_MEMBER(maygay1b_state,m1)
//AM_RANGE(0x2420, 0x2421) AM_WRITE(latch_ch2_w ) // oki
// if there is no OKI region disable writes here, the rom might be missing, so alert user
- if (m_oki_region == nullptr) {
+ UINT8 *okirom = memregion( "msm6376" )->base();
+
+ if (!okirom) {
m_maincpu->space(AS_PROGRAM).install_write_handler(0x2420, 0x2421, write8_delegate(FUNC(maygay1b_state::m1ab_no_oki_w), this));
}
}
diff --git a/src/mame/drivers/mbdtower.cpp b/src/mame/drivers/mbdtower.cpp
index d5a1d589604..f20f805fb5f 100644
--- a/src/mame/drivers/mbdtower.cpp
+++ b/src/mame/drivers/mbdtower.cpp
@@ -62,7 +62,7 @@ void mbdtower_state::prepare_display()
{
// declare display matrix size and the 2 7segs
set_display_size(7, 3);
- set_display_segmask(6, 0x7f);
+ m_display_segmask[1] = m_display_segmask[2] = 0x7f;
// update current state
if (~m_r & 0x10)
@@ -246,7 +246,7 @@ void mbdtower_state::machine_start()
static MACHINE_CONFIG_START( mbdtower, mbdtower_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", TMS1400, 425000) // approximation - RC osc. R=43K, C=56pf
+ MCFG_CPU_ADD("maincpu", TMS1400, 425000) // approximation - RC osc. R=43K, C=56pf, but unknown RC curve
MCFG_TMS1XXX_READ_K_CB(READ8(mbdtower_state, read_k))
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(mbdtower_state, write_r))
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(mbdtower_state, write_o))
diff --git a/src/mame/drivers/mc1000.cpp b/src/mame/drivers/mc1000.cpp
index c98f66b601e..06c1b177c15 100644
--- a/src/mame/drivers/mc1000.cpp
+++ b/src/mame/drivers/mc1000.cpp
@@ -453,7 +453,6 @@ static MACHINE_CONFIG_START( mc1000, mc1000_state )
/* devices */
MCFG_CASSETTE_ADD("cassette")
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
- MCFG_CASSETTE_INTERFACE("mc1000_cass")
MCFG_SOFTWARE_LIST_ADD("cass_list", "mc1000_cass")
diff --git a/src/mame/drivers/megasys1.cpp b/src/mame/drivers/megasys1.cpp
index bed3ec42e7d..ad32ebb1961 100644
--- a/src/mame/drivers/megasys1.cpp
+++ b/src/mame/drivers/megasys1.cpp
@@ -43,7 +43,7 @@ Year + Game System Protection
Peek-a-Boo! D Inputs
---------------------------------------------------------------------
-NOTE: Chimera Beast PROM has not been dumped, but looks like it should match 64street based on game analysis.
+NOTE: Chimera Beast is the only game missing a dump of its priority PROM
Hardware Main CPU Sound CPU Sound Chips
@@ -94,6 +94,10 @@ RAM RW 0f0000-0f3fff 0e0000-0effff? <
Issues / To Do
--------------
+- There is a 512 byte PROM in the video section (differs by game) that
+ controls the priorities. This prom is currently missing for one game,
+ so we have to use fake data for it (Chimera Beast).
+
- Making the M6295 status register return 0 fixes the music tempo in
avspirit, 64street, astyanax etc. but makes most of the effects in
hachoo disappear! Define SOUND_HACK to 0 to turn this hack off
@@ -101,9 +105,15 @@ RAM RW 0f0000-0f3fff 0e0000-0effff? <
bootleg version of rodlandj has one instruction patched out to do exactly
the same thing that we are doing (ignoring the 6295 status).
-- Understand properly how irqs truly works, kazan / iganinju solution seems hacky
+- Understand properly how irqs truly works, kazan / iganinju is (again) broken.
+
+- 64street: player characters in attract mode doesn't move at all, protection?
+ they move on the real PCB
-- P47 intro effect is imperfect ( https://www.youtube.com/watch?v=eozZGcVspVw )
+- tshingen: unemulated mosaic effect when killing enemies with the flashing sword.
+ See https://youtu.be/m4ZH0v8UqWs
+ The effect can be tested in e.g. stdragon and p47 test mode:
+ See https://youtu.be/zo3FTCqkNBc and https://youtu.be/dEqH017YBzw
- Understand a handful of unknown bits in video regs
@@ -134,16 +144,16 @@ RAM RW 0f0000-0f3fff 0e0000-0effff? <
MACHINE_RESET_MEMBER(megasys1_state,megasys1)
{
-
- m_ignore_oki_status = 1; /* ignore oki status due 'protection' */
- m_ip_latched = 0x0006; /* reset protection - some games expect this initial read without sending anything */
+ m_ignore_oki_status = 1; /* ignore oki status due 'protection' */
+ m_ip_select = 0; /* reset protection */
m_mcu_hs = 0;
}
MACHINE_RESET_MEMBER(megasys1_state,megasys1_hachoo)
{
- MACHINE_RESET_CALL_MEMBER(megasys1);
m_ignore_oki_status = 0; /* strangely hachoo need real oki status */
+ m_ip_select = 0; /* reset protection */
+ m_mcu_hs = 0;
}
@@ -244,14 +254,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(megasys1_state::megasys1B_scanline)
in that order. */
-READ16_MEMBER(megasys1_state::ip_select_r) // FROM MCU
-{
- return m_ip_latched;
-}
-
-
-
-WRITE16_MEMBER(megasys1_state::ip_select_w) // TO MCU
+READ16_MEMBER(megasys1_state::ip_select_r)
{
int i;
@@ -263,24 +266,26 @@ WRITE16_MEMBER(megasys1_state::ip_select_w) // TO MCU
// 20 21 22 23 24 < edf
// 51 52 53 54 55 < hayaosi1
+
/* f(x) = ((x*x)>>4)&0xFF ; f(f($D)) == 6 */
+ if ((m_ip_select & 0xF0) == 0xF0) return 0x000D;
- for (i = 0; i < 7; i++) if ((data & 0x00ff) == m_ip_select_values[i]) break;
+ for (i = 0; i < 5; i++) if (m_ip_select == m_ip_select_values[i]) break;
switch (i)
{
- case 0 : m_ip_latched = m_io_system->read(); break;
- case 1 : m_ip_latched = m_io_p1->read(); break;
- case 2 : m_ip_latched = m_io_p2->read(); break;
- case 3 : m_ip_latched = m_io_dsw1->read(); break;
- case 4 : m_ip_latched = m_io_dsw2->read(); break;
- case 5 : m_ip_latched = 0x0d; break; // startup check?
- case 6 : m_ip_latched = 0x06; break; // sent before each other command
- default: return; // get out if it wasn't a valid request
+ case 0 : return m_io_system->read();
+ case 1 : return m_io_p1->read();
+ case 2 : return m_io_p2->read();
+ case 3 : return m_io_dsw1->read();
+ case 4 : return m_io_dsw2->read();
+ default : return 0x0006;
}
+}
-
- // if the command is valid, generate an IRQ from the MCU
+WRITE16_MEMBER(megasys1_state::ip_select_w)
+{
+ COMBINE_DATA(&m_ip_select);
m_maincpu->set_input_line(2, HOLD_LINE);
}
@@ -1807,40 +1812,6 @@ ROM_START( 64street )
ROM_LOAD( "pr91009.12", 0x0000, 0x0200, CRC(c69423d6) SHA1(ba9644a9899df2d73a5a16bf7ceef1954c2e25f3) ) // same as pr-91044 on hayaosi1
ROM_END
-ROM_START( 64streetja )
- ROM_REGION( 0x80000, "maincpu", 0 ) /* Main CPU Code */
- ROM_LOAD16_BYTE( "ic53.bin", 0x000000, 0x040000, CRC(c978d086) SHA1(b091faf570841f098d4d70bf3ca4f26d6cda890a) )
- ROM_LOAD16_BYTE( "ic52.bin", 0x000001, 0x040000, CRC(af475852) SHA1(5e0a375dd904a4176ca6fdccdb67a907e270e9be) )
-
- ROM_REGION( 0x20000, "audiocpu", 0 ) /* Sound CPU Code */
- ROM_LOAD16_BYTE( "64th_08.rom", 0x000000, 0x010000, CRC(632be0c1) SHA1(626073037249d96ac70b2d11b2dd72b22bac49c7) )
- ROM_LOAD16_BYTE( "64th_07.rom", 0x000001, 0x010000, CRC(13595d01) SHA1(e730a530ca232aab883217fa12804075cb2aa640) )
-
- ROM_REGION( 0x1000, "mcu", 0 ) /* MCU Internal Code, M50747? */
- ROM_LOAD( "64street.mcu", 0x000000, 0x1000, NO_DUMP )
-
- ROM_REGION( 0x80000, "gfx1", 0 ) /* Scroll 0 */
- ROM_LOAD( "64th_01.rom", 0x000000, 0x080000, CRC(06222f90) SHA1(52b6cb88b9d2209c16d1633c83c0224b6ebf29dc) )
-
- ROM_REGION( 0x80000, "gfx2", 0 ) /* Scroll 1 */
- ROM_LOAD( "64th_06.rom", 0x000000, 0x080000, CRC(2bfcdc75) SHA1(f49f92f1ff58dccf72e05ecf80761c7b65a25ba3) )
-
- ROM_REGION( 0x20000, "gfx3", 0 ) /* Scroll 2 */
- ROM_LOAD( "64th_09.rom", 0x000000, 0x020000, CRC(a4a97db4) SHA1(1179457a6f33b3b44fac6056f6245f3aaae6afd5) )
-
- ROM_REGION( 0x100000, "gfx4", 0 ) /* Sprites */
- ROM_LOAD( "64th_05.rom", 0x000000, 0x080000, CRC(a89a7020) SHA1(be36e58e9314688ee39249944c5a6c201e0249ee) )
- ROM_LOAD( "64th_04.rom", 0x080000, 0x080000, CRC(98f83ef6) SHA1(e9b72487695ac7cdc4fbf595389c4b8781ed207e) )
-
- ROM_REGION( 0x40000, "oki1", 0 ) /* Samples */
- ROM_LOAD( "64th_11.rom", 0x000000, 0x020000, CRC(b0b8a65c) SHA1(b7e42d9083d0bbfe160fc73a7317d696e90d83d6) )
-
- ROM_REGION( 0x40000, "oki2", 0 ) /* Samples */
- ROM_LOAD( "64th_10.rom", 0x000000, 0x040000, CRC(a3390561) SHA1(f86d5c61e3e80d30408535c2203940ca1e95ac18) )
-
- ROM_REGION( 0x0200, "proms", 0 ) /* Priority PROM */
- ROM_LOAD( "pr91009.12", 0x0000, 0x0200, CRC(c69423d6) SHA1(ba9644a9899df2d73a5a16bf7ceef1954c2e25f3) ) // same as pr-91044 on hayaosi1
-ROM_END
ROM_START( 64streetj )
ROM_REGION( 0x80000, "maincpu", 0 ) /* Main CPU Code */
@@ -2280,7 +2251,7 @@ ROM_START( chimerab )
ROM_LOAD( "voi10.bin", 0x000000, 0x040000, CRC(67498914) SHA1(8d89fa90f38fd102b15f26f71491ea833ec32cb2) )
ROM_REGION( 0x0200, "proms", 0 ) /* Priority PROM */
- ROM_LOAD( "pr-91044", 0x0000, 0x0200, BAD_DUMP CRC(c69423d6) SHA1(ba9644a9899df2d73a5a16bf7ceef1954c2e25f3) ) // guess, but 99% sure it's meant to be the same as 64street/hayaosi1 based on analysis of game and previous handcrafted data
+ ROM_LOAD( "prom", 0x0000, 0x0200, NO_DUMP )
ROM_END
@@ -4017,10 +3988,6 @@ DRIVER_INIT_MEMBER(megasys1_state,64street)
m_ip_select_values[2] = 0x54;
m_ip_select_values[3] = 0x55;
m_ip_select_values[4] = 0x56;
-
- m_ip_select_values[5] = 0xfa;
- m_ip_select_values[6] = 0x06;
-
}
READ16_MEMBER(megasys1_state::megasys1A_mcu_hs_r)
@@ -4074,10 +4041,6 @@ DRIVER_INIT_MEMBER(megasys1_state,avspirit)
m_ip_select_values[3] = 0x33;
m_ip_select_values[4] = 0x34;
- m_ip_select_values[5] = 0xff;
- m_ip_select_values[6] = 0x06;
-
-
// has twice less RAM
m_maincpu->space(AS_PROGRAM).unmap_readwrite(0x060000, 0x06ffff);
m_maincpu->space(AS_PROGRAM).install_ram(0x070000, 0x07ffff, m_ram);
@@ -4090,10 +4053,6 @@ DRIVER_INIT_MEMBER(megasys1_state,bigstrik)
m_ip_select_values[2] = 0x55;
m_ip_select_values[3] = 0x56;
m_ip_select_values[4] = 0x57;
-
- m_ip_select_values[5] = 0xfb;
- m_ip_select_values[6] = 0x06;
-
}
DRIVER_INIT_MEMBER(megasys1_state,chimerab)
@@ -4104,10 +4063,6 @@ DRIVER_INIT_MEMBER(megasys1_state,chimerab)
m_ip_select_values[2] = 0x53;
m_ip_select_values[3] = 0x54;
m_ip_select_values[4] = 0x55;
-
- m_ip_select_values[5] = 0xf2;
- m_ip_select_values[6] = 0x06;
-
}
DRIVER_INIT_MEMBER(megasys1_state,cybattlr)
@@ -4117,9 +4072,6 @@ DRIVER_INIT_MEMBER(megasys1_state,cybattlr)
m_ip_select_values[2] = 0x53;
m_ip_select_values[3] = 0x54;
m_ip_select_values[4] = 0x55;
-
- m_ip_select_values[5] = 0xf2;
- m_ip_select_values[6] = 0x06;
}
DRIVER_INIT_MEMBER(megasys1_state,edf)
@@ -4129,10 +4081,6 @@ DRIVER_INIT_MEMBER(megasys1_state,edf)
m_ip_select_values[2] = 0x22;
m_ip_select_values[3] = 0x23;
m_ip_select_values[4] = 0x24;
-
- m_ip_select_values[5] = 0xf0;
- m_ip_select_values[6] = 0x06;
-
}
READ16_MEMBER(megasys1_state::edfbl_input_r)
@@ -4167,10 +4115,6 @@ DRIVER_INIT_MEMBER(megasys1_state,hayaosi1)
m_ip_select_values[2] = 0x53;
m_ip_select_values[3] = 0x54;
m_ip_select_values[4] = 0x55;
-
- m_ip_select_values[5] = 0xfc;
- m_ip_select_values[6] = 0x06;
-
}
READ16_MEMBER(megasys1_state::iganinju_mcu_hs_r)
@@ -4446,8 +4390,7 @@ GAME( 1993, hayaosi1, 0, system_B_hayaosi1, hayaosi1, megasys1_state, hay
// Type C
GAME( 1991, 64street, 0, system_C, 64street, megasys1_state, 64street, ROT0, "Jaleco", "64th. Street - A Detective Story (World)", 0 )
-GAME( 1991, 64streetj,64street, system_C, 64street, megasys1_state, 64street, ROT0, "Jaleco", "64th. Street - A Detective Story (Japan, set 1)", 0 )
-GAME( 1991, 64streetja,64street,system_C, 64street, megasys1_state, 64street, ROT0, "Jaleco", "64th. Street - A Detective Story (Japan, set 2)", 0 )
+GAME( 1991, 64streetj,64street, system_C, 64street, megasys1_state, 64street, ROT0, "Jaleco", "64th. Street - A Detective Story (Japan)", 0 )
GAME( 1992, bigstrik, 0, system_C, bigstrik, megasys1_state, bigstrik, ROT0, "Jaleco", "Big Striker", 0 )
GAME( 1993, chimerab, 0, system_C, chimerab, megasys1_state, chimerab, ROT0, "Jaleco", "Chimera Beast (Japan, prototype)", 0 )
GAME( 1993, cybattlr, 0, system_C, cybattlr, megasys1_state, cybattlr, ROT90, "Jaleco", "Cybattler", 0 )
diff --git a/src/mame/drivers/merit.cpp b/src/mame/drivers/merit.cpp
index f438e37dea9..9f5ac8f6190 100644
--- a/src/mame/drivers/merit.cpp
+++ b/src/mame/drivers/merit.cpp
@@ -59,7 +59,7 @@ Merit Riviera Notes - There are several known versions:
Riviera Super Star (not dumped)
Riviera Montana Version (with journal printer, not dumped)
Riviera Tennessee Draw (not dumped)
- Michigan Super Draw Poker (Is there a "Superstar" version?)
+ Michigan Superstar Draw Poker (not dumped)
Americana
There are several law suites over the Riviera games. Riviera Distributors Inc. bought earlier versions
@@ -422,19 +422,6 @@ static ADDRESS_MAP_START( bigappg_map, AS_PROGRAM, 8, merit_state )
AM_RANGE(0xf800, 0xfbff) AM_READWRITE(palette_r, palette_w)
ADDRESS_MAP_END
-static ADDRESS_MAP_START( misdraw_map, AS_PROGRAM, 8, merit_state )
- AM_RANGE(0x0000, 0x7fff) AM_ROM
- AM_RANGE(0xb000, 0xb7ff) AM_RAM AM_SHARE("cpunvram") // overlays other NVRAM? or is it banked?
- AM_RANGE(0xa000, 0xbfff) AM_RAM AM_SHARE("nvram")
- AM_RANGE(0xc004, 0xc007) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write) // swapped compared to other set?
- AM_RANGE(0xc008, 0xc00b) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write)
- AM_RANGE(0xe000, 0xe000) AM_DEVWRITE("crtc", mc6845_device, address_w)
- AM_RANGE(0xe001, 0xe001) AM_DEVWRITE("crtc", mc6845_device, register_w)
- AM_RANGE(0xe800, 0xefff) AM_RAM AM_SHARE("raattr")
- AM_RANGE(0xf000, 0xf7ff) AM_RAM AM_SHARE("ravideo")
- AM_RANGE(0xf800, 0xfbff) AM_READWRITE(palette_r, palette_w)
-ADDRESS_MAP_END
-
static ADDRESS_MAP_START( dodge_map, AS_PROGRAM, 8, merit_state )
AM_RANGE(0x0000, 0x7fff) AM_ROM
AM_RANGE(0xa000, 0xbfff) AM_RAM AM_SHARE("nvram")
@@ -603,8 +590,6 @@ static INPUT_PORTS_START( meritpoker )
PORT_DIPUNKNOWN_DIPLOC( 0x80, IP_ACTIVE_LOW, "SW1:8" )
INPUT_PORTS_END
-
-
static INPUT_PORTS_START( bigappg )
PORT_INCLUDE( meritpoker )
@@ -1275,14 +1260,6 @@ static MACHINE_CONFIG_DERIVED( bigappg, pitboss )
MCFG_NVRAM_ADD_0FILL("nvram")
MACHINE_CONFIG_END
-static MACHINE_CONFIG_DERIVED( misdraw, bigappg )
-
- MCFG_CPU_MODIFY("maincpu")
- MCFG_CPU_PROGRAM_MAP(misdraw_map)
-
- MCFG_NVRAM_ADD_0FILL("cpunvram")
-MACHINE_CONFIG_END
-
static MACHINE_CONFIG_DERIVED( dodge, pitboss )
MCFG_CPU_MODIFY("maincpu")
@@ -1502,23 +1479,6 @@ ROM_START( bigappg )
ROM_LOAD( "haip_u40.u40", 0x0000, 0x2000, CRC(ac4983b8) SHA1(a552a15f813c331de67eaae2ed42cc037b26c5bd) )
ROM_END
-ROM_START( misdraw )
- ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "2131-16_u5-2.u5", 0x0000, 0x8000, CRC(fc756320) SHA1(6b810c57ed1be844a04a6081d727e182509604b4) ) /* 2131-16 U5-2 081889 */
-
- ROM_REGION( 0x6000, "gfx1", 0 )
- ROM_LOAD( "u39.u39", 0x0000, 0x2000, CRC(0f09d19b) SHA1(1f98559d5bad7c84d92ecea5a6df9429914a47f0) )
- ROM_LOAD( "u38.u38", 0x2000, 0x2000, CRC(8210a48d) SHA1(9af3e8ac8dcf1e548c4ba3ca8096e48dbb3b4700) )
- ROM_LOAD( "u37.u37", 0x4000, 0x2000, CRC(34ca07d5) SHA1(3656b3eb78dd6ea06cf323a08fc3f949a01b76a3) )
-
- ROM_REGION( 0x2000, "gfx2", 0 )
- ROM_LOAD( "haip_u40.u40", 0x0000, 0x2000, CRC(ac4983b8) SHA1(a552a15f813c331de67eaae2ed42cc037b26c5bd) )
-
- ROM_REGION( 0x0800, "cpunvram", ROMREGION_ERASEFF )
- // this contains CODE, the game jumps there on startup
- ROM_LOAD( "crt-209_2131-16", 0x0000, 0x0800, CRC(34729437) SHA1(f097a1a97d8078d7d6a6af85be416b1d1d09c7f2) ) /* 2816 EEPROM in Z80 epoxy CPU module */
-ROM_END
-
ROM_START( dodgectya )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "2131-82_u5-0d.u5", 0x0000, 0x8000, CRC(ef71b268) SHA1(c85f2c8e7e9cd89b4720699814d8fcfbecf4dc1b) ) /* 2131-82 U5-0D 884111 2131 820*/
@@ -2225,7 +2185,6 @@ GAME( 1986, rivieraa, riviera, dodge, riviera, driver_device, 0, ROT0, "
GAME( 1986, rivierab, riviera, dodge, rivierab, driver_device, 0, ROT0, "Merit", "Riviera Hi-Score (2131-08, U5-2D)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS )
GAME( 1986, bigappg, 0, bigappg, bigappg, driver_device, 0, ROT0, "Big Apple Games / Merit", "The Big Apple (2131-13, U5-0)", MACHINE_SUPPORTS_SAVE )
-GAME( 1986, misdraw, 0, misdraw, bigappg, driver_device, 0, ROT0, "Big Apple Games / Merit", "Michigan Super Draw (2131-16, U5-2)", MACHINE_SUPPORTS_SAVE )
GAME( 1986, dodgectya,dodgecty,dodge, dodge, driver_device, 0, ROT0, "Merit", "Dodge City (2131-82, U5-0D)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING )
GAME( 1986, dodgectyb,dodgecty,dodge, dodge, driver_device, 0, ROT0, "Merit", "Dodge City (2131-82, U5-50)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/midtunit.cpp b/src/mame/drivers/midtunit.cpp
index 15e50184a56..996086bfe05 100644
--- a/src/mame/drivers/midtunit.cpp
+++ b/src/mame/drivers/midtunit.cpp
@@ -1186,289 +1186,253 @@ ROM_END
ROM_START( nbajam )
ROM_REGION( 0x50000, "adpcm:cpu", 0 ) /* sound CPU */
- ROM_LOAD( "l2_nba_jam_u3_sound_rom.u3", 0x010000, 0x20000, CRC(3a3ea480) SHA1(d12a45cba5c35f046b176661d7877fa4fd0e6c13) )
+ ROM_LOAD( "nbau3.bin", 0x010000, 0x20000, CRC(3a3ea480) SHA1(d12a45cba5c35f046b176661d7877fa4fd0e6c13) )
ROM_RELOAD( 0x030000, 0x20000 )
ROM_REGION( 0x100000, "adpcm:oki", 0 ) /* ADPCM */
- ROM_LOAD( "nbau12.u12", 0x000000, 0x80000, CRC(b94847f1) SHA1(e7efa0a379bfa91fe4ffb75f07a5dfbfde9a96b4) )
- ROM_LOAD( "nbau13.u13", 0x080000, 0x80000, CRC(b6fe24bd) SHA1(f70f75b5570a2b368ebc74d2a7d264c618940430) )
+ ROM_LOAD( "nbau12.bin", 0x000000, 0x80000, CRC(b94847f1) SHA1(e7efa0a379bfa91fe4ffb75f07a5dfbfde9a96b4) )
+ ROM_LOAD( "nbau13.bin", 0x080000, 0x80000, CRC(b6fe24bd) SHA1(f70f75b5570a2b368ebc74d2a7d264c618940430) )
ROM_REGION16_LE( 0x100000, "maincpu", 0 ) /* 34010 code */
- ROM_LOAD16_BYTE( "l3_nba_jam_game_rom_uj12.uj12", 0x00000, 0x80000, CRC(b93e271c) SHA1(b0e9f055376a4a4cd1115a81f71c933903c251b1) )
- ROM_LOAD16_BYTE( "l3_nba_jam_game_rom_ug12.ug12", 0x00001, 0x80000, CRC(407d3390) SHA1(a319bc890d94310e44fe2ec98bfc95665a662701) )
+ ROM_LOAD16_BYTE( "nbauj12.bin", 0x00000, 0x80000, CRC(b93e271c) SHA1(b0e9f055376a4a4cd1115a81f71c933903c251b1) )
+ ROM_LOAD16_BYTE( "nbaug12.bin", 0x00001, 0x80000, CRC(407d3390) SHA1(a319bc890d94310e44fe2ec98bfc95665a662701) )
ROM_REGION( 0xc00000, "gfxrom", 0 )
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug14.ug14", 0x000000, 0x80000, CRC(04bb9f64) SHA1(9e1a8c37e14cb6fe67f4aa3caa9022f356f1ca64) )
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj14.uj14", 0x000001, 0x80000, CRC(b34b7af3) SHA1(0abb74d2f414bc9da0380a81beb134f3a87c1a0a) )
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug19.ug19", 0x000002, 0x80000, CRC(a8f22fbb) SHA1(514208a9d6d0c8c2d7847cc02d4387eac90be659) )
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj19.uj19", 0x000003, 0x80000, CRC(8130a8a2) SHA1(f23f124024285d07d8cf822817b62e42c38b82db) )
-
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug16.ug16", 0x200000, 0x80000, CRC(8591c572) SHA1(237bab2e93abf438a84be3603505db5de59922af) )
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj16.uj16", 0x200001, 0x80000, CRC(d2e554f1) SHA1(139aa39bd48b8605058ece188f9f5e6793561fcb) )
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug20.ug20", 0x200002, 0x80000, CRC(44fd6221) SHA1(1d6754bf2c24950080523f66b77407931babba29) )
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj20.uj20", 0x200003, 0x80000, CRC(f9cebbb6) SHA1(6202e490bc5658bd0741422f841540fcd037cfee) )
-
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug17.ug17", 0x400000, 0x80000, CRC(6f921886) SHA1(72542249ca6602dc4816952765c1810f064ff394) )
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj17.uj17", 0x400001, 0x80000, CRC(b2e14981) SHA1(5cec9b7fcaa6d0ce5bff689541fc98db435c5b5f) )
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug22.ug22", 0x400002, 0x80000, CRC(ab05ed89) SHA1(4153d098fbaeac963d93f26dcd9d8bc33a48a734) )
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj22.uj22", 0x400003, 0x80000, CRC(59a95878) SHA1(b95165987853f164842ab2b5895ea95484a1d78b) )
-
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug18.ug18", 0x600000, 0x80000, CRC(5162d3d6) SHA1(14d377977510b7793e4006a7a5089dbfd785d7d1) )
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj18.uj18", 0x600001, 0x80000, CRC(fdee0037) SHA1(3bcc740f4bdb3236822cd6e7ed06241804351cca) )
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug23.ug23", 0x600002, 0x80000, CRC(7b934c7a) SHA1(a6992fb3c50429ac4fa15bd91612ae0c0b8f961d) )
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj23.uj23", 0x600003, 0x80000, CRC(427d2eee) SHA1(4985e3dd9c9e1bedd5a900958bf549656debd494) )
+ ROM_LOAD32_BYTE( "nbaug14.bin", 0x000000, 0x80000, CRC(04bb9f64) SHA1(9e1a8c37e14cb6fe67f4aa3caa9022f356f1ca64) )
+ ROM_LOAD32_BYTE( "nbauj14.bin", 0x000001, 0x80000, CRC(b34b7af3) SHA1(0abb74d2f414bc9da0380a81beb134f3a87c1a0a) )
+ ROM_LOAD32_BYTE( "nbaug19.bin", 0x000002, 0x80000, CRC(a8f22fbb) SHA1(514208a9d6d0c8c2d7847cc02d4387eac90be659) )
+ ROM_LOAD32_BYTE( "nbauj19.bin", 0x000003, 0x80000, CRC(8130a8a2) SHA1(f23f124024285d07d8cf822817b62e42c38b82db) )
+
+ ROM_LOAD32_BYTE( "nbaug16.bin", 0x200000, 0x80000, CRC(8591c572) SHA1(237bab2e93abf438a84be3603505db5de59922af) )
+ ROM_LOAD32_BYTE( "nbauj16.bin", 0x200001, 0x80000, CRC(d2e554f1) SHA1(139aa39bd48b8605058ece188f9f5e6793561fcb) )
+ ROM_LOAD32_BYTE( "nbaug20.bin", 0x200002, 0x80000, CRC(44fd6221) SHA1(1d6754bf2c24950080523f66b77407931babba29) )
+ ROM_LOAD32_BYTE( "nbauj20.bin", 0x200003, 0x80000, CRC(f9cebbb6) SHA1(6202e490bc5658bd0741422f841540fcd037cfee) )
+
+ ROM_LOAD32_BYTE( "nbaug17.bin", 0x400000, 0x80000, CRC(6f921886) SHA1(72542249ca6602dc4816952765c1810f064ff394) )
+ ROM_LOAD32_BYTE( "nbauj17.bin", 0x400001, 0x80000, CRC(b2e14981) SHA1(5cec9b7fcaa6d0ce5bff689541fc98db435c5b5f) )
+ ROM_LOAD32_BYTE( "nbaug22.bin", 0x400002, 0x80000, CRC(ab05ed89) SHA1(4153d098fbaeac963d93f26dcd9d8bc33a48a734) )
+ ROM_LOAD32_BYTE( "nbauj22.bin", 0x400003, 0x80000, CRC(59a95878) SHA1(b95165987853f164842ab2b5895ea95484a1d78b) )
+
+ ROM_LOAD32_BYTE( "nbaug18.bin", 0x600000, 0x80000, CRC(5162d3d6) SHA1(14d377977510b7793e4006a7a5089dbfd785d7d1) )
+ ROM_LOAD32_BYTE( "nbauj18.bin", 0x600001, 0x80000, CRC(fdee0037) SHA1(3bcc740f4bdb3236822cd6e7ed06241804351cca) )
+ ROM_LOAD32_BYTE( "nbaug23.bin", 0x600002, 0x80000, CRC(7b934c7a) SHA1(a6992fb3c50429ac4fa15bd91612ae0c0b8f961d) )
+ ROM_LOAD32_BYTE( "nbauj23.bin", 0x600003, 0x80000, CRC(427d2eee) SHA1(4985e3dd9c9e1bedd5a900958bf549656debd494) )
ROM_END
ROM_START( nbajamr2 )
ROM_REGION( 0x50000, "adpcm:cpu", 0 ) /* sound CPU */
- ROM_LOAD( "l2_nba_jam_u3_sound_rom.u3", 0x010000, 0x20000, CRC(3a3ea480) SHA1(d12a45cba5c35f046b176661d7877fa4fd0e6c13) )
+ ROM_LOAD( "nbau3.bin", 0x010000, 0x20000, CRC(3a3ea480) SHA1(d12a45cba5c35f046b176661d7877fa4fd0e6c13) )
ROM_RELOAD( 0x030000, 0x20000 )
ROM_REGION( 0x100000, "adpcm:oki", 0 ) /* ADPCM */
- ROM_LOAD( "nbau12.u12", 0x000000, 0x80000, CRC(b94847f1) SHA1(e7efa0a379bfa91fe4ffb75f07a5dfbfde9a96b4) )
- ROM_LOAD( "nbau13.u13", 0x080000, 0x80000, CRC(b6fe24bd) SHA1(f70f75b5570a2b368ebc74d2a7d264c618940430) )
+ ROM_LOAD( "nbau12.bin", 0x000000, 0x80000, CRC(b94847f1) SHA1(e7efa0a379bfa91fe4ffb75f07a5dfbfde9a96b4) )
+ ROM_LOAD( "nbau13.bin", 0x080000, 0x80000, CRC(b6fe24bd) SHA1(f70f75b5570a2b368ebc74d2a7d264c618940430) )
ROM_REGION16_LE( 0x100000, "maincpu", 0 ) /* 34010 code */
- ROM_LOAD16_BYTE( "l2_nba_jam_game_rom_uj12.uj12", 0x00000, 0x80000, CRC(0fe80b36) SHA1(fe6b21dc9b393b25c511b2914b568fa92301d749) )
- ROM_LOAD16_BYTE( "l2_nba_jam_game_rom_ug12.ug12", 0x00001, 0x80000, CRC(5d106315) SHA1(e2cddd9ed6771e77711e3a4f25fe2d07712d954e) )
+ ROM_LOAD16_BYTE( "jam2uj12.bin", 0x00000, 0x80000, CRC(0fe80b36) SHA1(fe6b21dc9b393b25c511b2914b568fa92301d749) )
+ ROM_LOAD16_BYTE( "jam2ug12.bin", 0x00001, 0x80000, CRC(5d106315) SHA1(e2cddd9ed6771e77711e3a4f25fe2d07712d954e) )
ROM_REGION( 0xc00000, "gfxrom", 0 )
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug14.ug14", 0x000000, 0x80000, CRC(04bb9f64) SHA1(9e1a8c37e14cb6fe67f4aa3caa9022f356f1ca64) )
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj14.uj14", 0x000001, 0x80000, CRC(b34b7af3) SHA1(0abb74d2f414bc9da0380a81beb134f3a87c1a0a) )
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug19.ug19", 0x000002, 0x80000, CRC(a8f22fbb) SHA1(514208a9d6d0c8c2d7847cc02d4387eac90be659) )
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj19.uj19", 0x000003, 0x80000, CRC(8130a8a2) SHA1(f23f124024285d07d8cf822817b62e42c38b82db) )
-
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug16.ug16", 0x200000, 0x80000, CRC(8591c572) SHA1(237bab2e93abf438a84be3603505db5de59922af) )
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj16.uj16", 0x200001, 0x80000, CRC(d2e554f1) SHA1(139aa39bd48b8605058ece188f9f5e6793561fcb) )
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug20.ug20", 0x200002, 0x80000, CRC(44fd6221) SHA1(1d6754bf2c24950080523f66b77407931babba29) )
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj20.uj20", 0x200003, 0x80000, CRC(f9cebbb6) SHA1(6202e490bc5658bd0741422f841540fcd037cfee) )
-
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug17.ug17", 0x400000, 0x80000, CRC(6f921886) SHA1(72542249ca6602dc4816952765c1810f064ff394) )
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj17.uj17", 0x400001, 0x80000, CRC(b2e14981) SHA1(5cec9b7fcaa6d0ce5bff689541fc98db435c5b5f) )
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug22.ug22", 0x400002, 0x80000, CRC(ab05ed89) SHA1(4153d098fbaeac963d93f26dcd9d8bc33a48a734) )
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj22.uj22", 0x400003, 0x80000, CRC(59a95878) SHA1(b95165987853f164842ab2b5895ea95484a1d78b) )
-
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug18.ug18", 0x600000, 0x80000, CRC(5162d3d6) SHA1(14d377977510b7793e4006a7a5089dbfd785d7d1) )
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj18.uj18", 0x600001, 0x80000, CRC(fdee0037) SHA1(3bcc740f4bdb3236822cd6e7ed06241804351cca) )
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug23.ug23", 0x600002, 0x80000, CRC(7b934c7a) SHA1(a6992fb3c50429ac4fa15bd91612ae0c0b8f961d) )
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj23.uj23", 0x600003, 0x80000, CRC(427d2eee) SHA1(4985e3dd9c9e1bedd5a900958bf549656debd494) )
-ROM_END
-
-
-ROM_START( nbajamr1 )
- ROM_REGION( 0x50000, "adpcm:cpu", 0 ) /* sound CPU */
- ROM_LOAD( "l2_nba_jam_u3_sound_rom.u3", 0x010000, 0x20000, CRC(3a3ea480) SHA1(d12a45cba5c35f046b176661d7877fa4fd0e6c13) )
- ROM_RELOAD( 0x030000, 0x20000 )
-
- ROM_REGION( 0x100000, "adpcm:oki", 0 ) /* ADPCM */
- ROM_LOAD( "nbau12.u12", 0x000000, 0x80000, CRC(b94847f1) SHA1(e7efa0a379bfa91fe4ffb75f07a5dfbfde9a96b4) )
- ROM_LOAD( "nbau13.u13", 0x080000, 0x80000, CRC(b6fe24bd) SHA1(f70f75b5570a2b368ebc74d2a7d264c618940430) )
-
- ROM_REGION16_LE( 0x100000, "maincpu", 0 ) /* 34010 code */
- ROM_LOAD16_BYTE( "l1_nba_jam_game_rom_uj12.uj12", 0x00000, 0x80000, CRC(4db672ec) SHA1(bb329c552473179f617d3bd038f47fb69d060b55) )
- ROM_LOAD16_BYTE( "l1_nba_jam_game_rom_ug12.ug12", 0x00001, 0x80000, CRC(ed1df3f7) SHA1(36b0c47758a205719dbef169f0af3e761f557b99) )
-
- ROM_REGION( 0xc00000, "gfxrom", 0 )
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug14.ug14", 0x000000, 0x80000, CRC(04bb9f64) SHA1(9e1a8c37e14cb6fe67f4aa3caa9022f356f1ca64) )
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj14.uj14", 0x000001, 0x80000, CRC(b34b7af3) SHA1(0abb74d2f414bc9da0380a81beb134f3a87c1a0a) )
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug19.ug19", 0x000002, 0x80000, CRC(a8f22fbb) SHA1(514208a9d6d0c8c2d7847cc02d4387eac90be659) )
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj19.uj19", 0x000003, 0x80000, CRC(8130a8a2) SHA1(f23f124024285d07d8cf822817b62e42c38b82db) )
-
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug16.ug16", 0x200000, 0x80000, CRC(8591c572) SHA1(237bab2e93abf438a84be3603505db5de59922af) )
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj16.uj16", 0x200001, 0x80000, CRC(d2e554f1) SHA1(139aa39bd48b8605058ece188f9f5e6793561fcb) )
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug20.ug20", 0x200002, 0x80000, CRC(44fd6221) SHA1(1d6754bf2c24950080523f66b77407931babba29) )
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj20.uj20", 0x200003, 0x80000, CRC(f9cebbb6) SHA1(6202e490bc5658bd0741422f841540fcd037cfee) )
-
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug17.ug17", 0x400000, 0x80000, CRC(6f921886) SHA1(72542249ca6602dc4816952765c1810f064ff394) )
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj17.uj17", 0x400001, 0x80000, CRC(b2e14981) SHA1(5cec9b7fcaa6d0ce5bff689541fc98db435c5b5f) )
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug22.ug22", 0x400002, 0x80000, CRC(ab05ed89) SHA1(4153d098fbaeac963d93f26dcd9d8bc33a48a734) )
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj22.uj22", 0x400003, 0x80000, CRC(59a95878) SHA1(b95165987853f164842ab2b5895ea95484a1d78b) )
-
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug18.ug18", 0x600000, 0x80000, CRC(5162d3d6) SHA1(14d377977510b7793e4006a7a5089dbfd785d7d1) )
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj18.uj18", 0x600001, 0x80000, CRC(fdee0037) SHA1(3bcc740f4bdb3236822cd6e7ed06241804351cca) )
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug23.ug23", 0x600002, 0x80000, CRC(7b934c7a) SHA1(a6992fb3c50429ac4fa15bd91612ae0c0b8f961d) )
- ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj23.uj23", 0x600003, 0x80000, CRC(427d2eee) SHA1(4985e3dd9c9e1bedd5a900958bf549656debd494) )
+ ROM_LOAD32_BYTE( "nbaug14.bin", 0x000000, 0x80000, CRC(04bb9f64) SHA1(9e1a8c37e14cb6fe67f4aa3caa9022f356f1ca64) )
+ ROM_LOAD32_BYTE( "nbauj14.bin", 0x000001, 0x80000, CRC(b34b7af3) SHA1(0abb74d2f414bc9da0380a81beb134f3a87c1a0a) )
+ ROM_LOAD32_BYTE( "nbaug19.bin", 0x000002, 0x80000, CRC(a8f22fbb) SHA1(514208a9d6d0c8c2d7847cc02d4387eac90be659) )
+ ROM_LOAD32_BYTE( "nbauj19.bin", 0x000003, 0x80000, CRC(8130a8a2) SHA1(f23f124024285d07d8cf822817b62e42c38b82db) )
+
+ ROM_LOAD32_BYTE( "nbaug16.bin", 0x200000, 0x80000, CRC(8591c572) SHA1(237bab2e93abf438a84be3603505db5de59922af) )
+ ROM_LOAD32_BYTE( "nbauj16.bin", 0x200001, 0x80000, CRC(d2e554f1) SHA1(139aa39bd48b8605058ece188f9f5e6793561fcb) )
+ ROM_LOAD32_BYTE( "nbaug20.bin", 0x200002, 0x80000, CRC(44fd6221) SHA1(1d6754bf2c24950080523f66b77407931babba29) )
+ ROM_LOAD32_BYTE( "nbauj20.bin", 0x200003, 0x80000, CRC(f9cebbb6) SHA1(6202e490bc5658bd0741422f841540fcd037cfee) )
+
+ ROM_LOAD32_BYTE( "nbaug17.bin", 0x400000, 0x80000, CRC(6f921886) SHA1(72542249ca6602dc4816952765c1810f064ff394) )
+ ROM_LOAD32_BYTE( "nbauj17.bin", 0x400001, 0x80000, CRC(b2e14981) SHA1(5cec9b7fcaa6d0ce5bff689541fc98db435c5b5f) )
+ ROM_LOAD32_BYTE( "nbaug22.bin", 0x400002, 0x80000, CRC(ab05ed89) SHA1(4153d098fbaeac963d93f26dcd9d8bc33a48a734) )
+ ROM_LOAD32_BYTE( "nbauj22.bin", 0x400003, 0x80000, CRC(59a95878) SHA1(b95165987853f164842ab2b5895ea95484a1d78b) )
+
+ ROM_LOAD32_BYTE( "nbaug18.bin", 0x600000, 0x80000, CRC(5162d3d6) SHA1(14d377977510b7793e4006a7a5089dbfd785d7d1) )
+ ROM_LOAD32_BYTE( "nbauj18.bin", 0x600001, 0x80000, CRC(fdee0037) SHA1(3bcc740f4bdb3236822cd6e7ed06241804351cca) )
+ ROM_LOAD32_BYTE( "nbaug23.bin", 0x600002, 0x80000, CRC(7b934c7a) SHA1(a6992fb3c50429ac4fa15bd91612ae0c0b8f961d) )
+ ROM_LOAD32_BYTE( "nbauj23.bin", 0x600003, 0x80000, CRC(427d2eee) SHA1(4985e3dd9c9e1bedd5a900958bf549656debd494) )
ROM_END
ROM_START( nbajamte )
ROM_REGION( 0x50000, "adpcm:cpu", 0 ) /* sound CPU */
- ROM_LOAD( "l1_nba_jam_tournament_u3_sound_rom.u3", 0x010000, 0x20000, CRC(d4551195) SHA1(e8908fbe4339fb8c93f7e74113dfd25dda1667ea) )
+ ROM_LOAD( "te-u3.bin", 0x010000, 0x20000, CRC(d4551195) SHA1(e8908fbe4339fb8c93f7e74113dfd25dda1667ea) )
ROM_RELOAD( 0x030000, 0x20000 )
ROM_REGION( 0x100000, "adpcm:oki", 0 ) /* ADPCM */
- ROM_LOAD( "l1_nba_jam_tournament_u12_sound_rom.u12", 0x000000, 0x80000, CRC(4fac97bc) SHA1(bd88d8c3edab0e35ad9f9350bcbaa17cda61d87a) )
- ROM_LOAD( "l1_nba_jam_tournament_u13_sound_rom.u13", 0x080000, 0x80000, CRC(6f27b202) SHA1(c1f0db15624d1e7102ce9fd1db49ccf86e8611d6) )
+ ROM_LOAD( "te-u12.bin", 0x000000, 0x80000, CRC(4fac97bc) SHA1(bd88d8c3edab0e35ad9f9350bcbaa17cda61d87a) )
+ ROM_LOAD( "te-u13.bin", 0x080000, 0x80000, CRC(6f27b202) SHA1(c1f0db15624d1e7102ce9fd1db49ccf86e8611d6) )
ROM_REGION16_LE( 0x100000, "maincpu", 0 ) /* 34010 code */
- ROM_LOAD16_BYTE( "l4_nba_jam_tournament_game_rom_uj12.uj12", 0x00000, 0x80000, CRC(d7c21bc4) SHA1(e05f0299b955500df6a08b1c0b24b932a9cdfa6a) )
- ROM_LOAD16_BYTE( "l4_nba_jam_tournament_game_rom_ug12.ug12", 0x00001, 0x80000, CRC(7ad49229) SHA1(e9ceedb0e620809d8a4d42087d806aa296a4cd59) )
+ ROM_LOAD16_BYTE( "te-uj12.l4", 0x00000, 0x80000, CRC(d7c21bc4) SHA1(e05f0299b955500df6a08b1c0b24b932a9cdfa6a) )
+ ROM_LOAD16_BYTE( "te-ug12.l4", 0x00001, 0x80000, CRC(7ad49229) SHA1(e9ceedb0e620809d8a4d42087d806aa296a4cd59) )
ROM_REGION( 0xc00000, "gfxrom", 0 )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug14.ug14", 0x000000, 0x80000, CRC(04bb9f64) SHA1(9e1a8c37e14cb6fe67f4aa3caa9022f356f1ca64) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj14.uj14", 0x000001, 0x80000, CRC(b34b7af3) SHA1(0abb74d2f414bc9da0380a81beb134f3a87c1a0a) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug19.ug19", 0x000002, 0x80000, CRC(a8f22fbb) SHA1(514208a9d6d0c8c2d7847cc02d4387eac90be659) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj19.uj19", 0x000003, 0x80000, CRC(8130a8a2) SHA1(f23f124024285d07d8cf822817b62e42c38b82db) )
-
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug16.ug16", 0x200000, 0x80000, CRC(c7ce74d0) SHA1(93861cd909e0f28ed112096d6f9fc57d0d31c57c) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj16.uj16", 0x200001, 0x80000, CRC(905ad88b) SHA1(24c336ccc0e2ac0ee96a34ad6fe4aa7464de0009) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug20.ug20", 0x200002, 0x80000, CRC(8a48728c) SHA1(3684099b4934b027336c319c77d9e0710b8c22dc) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj20.uj20", 0x200003, 0x80000, CRC(bf263d61) SHA1(b5b59e8df55f8030eff068c1d8b07dad8521bf5d) )
-
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug17.ug17", 0x400000, 0x80000, CRC(9401be62) SHA1(597413a8a1eb66a7ad89af2f548fa3062e5e8efb) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj17.uj17", 0x400001, 0x80000, CRC(8a852b9e) SHA1(604c7f4305887e9505320630027765ea76607c58) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug22.ug22", 0x400002, 0x80000, CRC(3b05133b) SHA1(f6067abb92b8751afe7352a4f1b1a22c9528002b) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj22.uj22", 0x400003, 0x80000, CRC(39791051) SHA1(7aa02500ddacd31fca04044a22a38f36452ca300) )
-
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug18.ug18", 0x600000, 0x80000, CRC(6fd08f57) SHA1(5b7031dffc88374c5bfdf3021aa01ec4e28d0631) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj18.uj18", 0x600001, 0x80000, CRC(4eb73c26) SHA1(693bf45f777da8e55b7bcd8699ea5bd711964941) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug23.ug23", 0x600002, 0x80000, CRC(854f73bc) SHA1(242cc8ce28711f6f0787524a1070eb4b0956e6ae) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj23.uj23", 0x600003, 0x80000, CRC(f8c30998) SHA1(33e2f982d74e9f3686b1f4a8172c49fb8b604cf5) )
+ ROM_LOAD32_BYTE( "nbaug14.bin", 0x000000, 0x80000, CRC(04bb9f64) SHA1(9e1a8c37e14cb6fe67f4aa3caa9022f356f1ca64) )
+ ROM_LOAD32_BYTE( "nbauj14.bin", 0x000001, 0x80000, CRC(b34b7af3) SHA1(0abb74d2f414bc9da0380a81beb134f3a87c1a0a) )
+ ROM_LOAD32_BYTE( "nbaug19.bin", 0x000002, 0x80000, CRC(a8f22fbb) SHA1(514208a9d6d0c8c2d7847cc02d4387eac90be659) )
+ ROM_LOAD32_BYTE( "nbauj19.bin", 0x000003, 0x80000, CRC(8130a8a2) SHA1(f23f124024285d07d8cf822817b62e42c38b82db) )
+
+ ROM_LOAD32_BYTE( "te-ug16.bin", 0x200000, 0x80000, CRC(c7ce74d0) SHA1(93861cd909e0f28ed112096d6f9fc57d0d31c57c) )
+ ROM_LOAD32_BYTE( "te-uj16.bin", 0x200001, 0x80000, CRC(905ad88b) SHA1(24c336ccc0e2ac0ee96a34ad6fe4aa7464de0009) )
+ ROM_LOAD32_BYTE( "te-ug20.bin", 0x200002, 0x80000, CRC(8a48728c) SHA1(3684099b4934b027336c319c77d9e0710b8c22dc) )
+ ROM_LOAD32_BYTE( "te-uj20.bin", 0x200003, 0x80000, CRC(bf263d61) SHA1(b5b59e8df55f8030eff068c1d8b07dad8521bf5d) )
+
+ ROM_LOAD32_BYTE( "te-ug17.bin", 0x400000, 0x80000, CRC(9401be62) SHA1(597413a8a1eb66a7ad89af2f548fa3062e5e8efb) )
+ ROM_LOAD32_BYTE( "te-uj17.bin", 0x400001, 0x80000, CRC(8a852b9e) SHA1(604c7f4305887e9505320630027765ea76607c58) )
+ ROM_LOAD32_BYTE( "te-ug22.bin", 0x400002, 0x80000, CRC(3b05133b) SHA1(f6067abb92b8751afe7352a4f1b1a22c9528002b) )
+ ROM_LOAD32_BYTE( "te-uj22.bin", 0x400003, 0x80000, CRC(39791051) SHA1(7aa02500ddacd31fca04044a22a38f36452ca300) )
+
+ ROM_LOAD32_BYTE( "te-ug18.bin", 0x600000, 0x80000, CRC(6fd08f57) SHA1(5b7031dffc88374c5bfdf3021aa01ec4e28d0631) )
+ ROM_LOAD32_BYTE( "te-uj18.bin", 0x600001, 0x80000, CRC(4eb73c26) SHA1(693bf45f777da8e55b7bcd8699ea5bd711964941) )
+ ROM_LOAD32_BYTE( "te-ug23.bin", 0x600002, 0x80000, CRC(854f73bc) SHA1(242cc8ce28711f6f0787524a1070eb4b0956e6ae) )
+ ROM_LOAD32_BYTE( "te-uj23.bin", 0x600003, 0x80000, CRC(f8c30998) SHA1(33e2f982d74e9f3686b1f4a8172c49fb8b604cf5) )
ROM_END
-ROM_START( nbajamte3 )
+ROM_START( nbajamte1 )
ROM_REGION( 0x50000, "adpcm:cpu", 0 ) /* sound CPU */
- ROM_LOAD( "l1_nba_jam_tournament_u3_sound_rom.u3", 0x010000, 0x20000, CRC(d4551195) SHA1(e8908fbe4339fb8c93f7e74113dfd25dda1667ea) )
+ ROM_LOAD( "te-u3.bin", 0x010000, 0x20000, CRC(d4551195) SHA1(e8908fbe4339fb8c93f7e74113dfd25dda1667ea) )
ROM_RELOAD( 0x030000, 0x20000 )
ROM_REGION( 0x100000, "adpcm:oki", 0 ) /* ADPCM */
- ROM_LOAD( "l1_nba_jam_tournament_u12_sound_rom.u12", 0x000000, 0x80000, CRC(4fac97bc) SHA1(bd88d8c3edab0e35ad9f9350bcbaa17cda61d87a) )
- ROM_LOAD( "l1_nba_jam_tournament_u13_sound_rom.u13", 0x080000, 0x80000, CRC(6f27b202) SHA1(c1f0db15624d1e7102ce9fd1db49ccf86e8611d6) )
+ ROM_LOAD( "te-u12.bin", 0x000000, 0x80000, CRC(4fac97bc) SHA1(bd88d8c3edab0e35ad9f9350bcbaa17cda61d87a) )
+ ROM_LOAD( "te-u13.bin", 0x080000, 0x80000, CRC(6f27b202) SHA1(c1f0db15624d1e7102ce9fd1db49ccf86e8611d6) )
ROM_REGION16_LE( 0x100000, "maincpu", 0 ) /* 34010 code */
- ROM_LOAD16_BYTE( "l3_nba_jam_tournament_game_rom_uj12.uj12", 0x00000, 0x80000, CRC(8fdf77b4) SHA1(1a8a178b19d0b8e7a5fd2ddf373a4279321440d0) )
- ROM_LOAD16_BYTE( "l3_nba_jam_tournament_game_rom_ug12.ug12", 0x00001, 0x80000, CRC(656579ed) SHA1(b038fdc814ebc8d203724fdb2f7501d40f1dc21f) )
+ ROM_LOAD16_BYTE( "te-uj12.l1", 0x00000, 0x80000, CRC(a9f555ad) SHA1(34f5fc1b003ef8acbb2b38fbacd58d018d20ab1b) )
+ ROM_LOAD16_BYTE( "te-ug12.l1", 0x00001, 0x80000, CRC(bd4579b5) SHA1(c893cff931f1e60a1d0d29d2719f514d92fb3490) )
ROM_REGION( 0xc00000, "gfxrom", 0 )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug14.ug14", 0x000000, 0x80000, CRC(04bb9f64) SHA1(9e1a8c37e14cb6fe67f4aa3caa9022f356f1ca64) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj14.uj14", 0x000001, 0x80000, CRC(b34b7af3) SHA1(0abb74d2f414bc9da0380a81beb134f3a87c1a0a) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug19.ug19", 0x000002, 0x80000, CRC(a8f22fbb) SHA1(514208a9d6d0c8c2d7847cc02d4387eac90be659) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj19.uj19", 0x000003, 0x80000, CRC(8130a8a2) SHA1(f23f124024285d07d8cf822817b62e42c38b82db) )
-
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug16.ug16", 0x200000, 0x80000, CRC(c7ce74d0) SHA1(93861cd909e0f28ed112096d6f9fc57d0d31c57c) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj16.uj16", 0x200001, 0x80000, CRC(905ad88b) SHA1(24c336ccc0e2ac0ee96a34ad6fe4aa7464de0009) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug20.ug20", 0x200002, 0x80000, CRC(8a48728c) SHA1(3684099b4934b027336c319c77d9e0710b8c22dc) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj20.uj20", 0x200003, 0x80000, CRC(bf263d61) SHA1(b5b59e8df55f8030eff068c1d8b07dad8521bf5d) )
-
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug17.ug17", 0x400000, 0x80000, CRC(9401be62) SHA1(597413a8a1eb66a7ad89af2f548fa3062e5e8efb) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj17.uj17", 0x400001, 0x80000, CRC(8a852b9e) SHA1(604c7f4305887e9505320630027765ea76607c58) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug22.ug22", 0x400002, 0x80000, CRC(3b05133b) SHA1(f6067abb92b8751afe7352a4f1b1a22c9528002b) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj22.uj22", 0x400003, 0x80000, CRC(39791051) SHA1(7aa02500ddacd31fca04044a22a38f36452ca300) )
-
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug18.ug18", 0x600000, 0x80000, CRC(6fd08f57) SHA1(5b7031dffc88374c5bfdf3021aa01ec4e28d0631) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj18.uj18", 0x600001, 0x80000, CRC(4eb73c26) SHA1(693bf45f777da8e55b7bcd8699ea5bd711964941) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug23.ug23", 0x600002, 0x80000, CRC(854f73bc) SHA1(242cc8ce28711f6f0787524a1070eb4b0956e6ae) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj23.uj23", 0x600003, 0x80000, CRC(f8c30998) SHA1(33e2f982d74e9f3686b1f4a8172c49fb8b604cf5) )
+ ROM_LOAD32_BYTE( "nbaug14.bin", 0x000000, 0x80000, CRC(04bb9f64) SHA1(9e1a8c37e14cb6fe67f4aa3caa9022f356f1ca64) )
+ ROM_LOAD32_BYTE( "nbauj14.bin", 0x000001, 0x80000, CRC(b34b7af3) SHA1(0abb74d2f414bc9da0380a81beb134f3a87c1a0a) )
+ ROM_LOAD32_BYTE( "nbaug19.bin", 0x000002, 0x80000, CRC(a8f22fbb) SHA1(514208a9d6d0c8c2d7847cc02d4387eac90be659) )
+ ROM_LOAD32_BYTE( "nbauj19.bin", 0x000003, 0x80000, CRC(8130a8a2) SHA1(f23f124024285d07d8cf822817b62e42c38b82db) )
+
+ ROM_LOAD32_BYTE( "te-ug16.bin", 0x200000, 0x80000, CRC(c7ce74d0) SHA1(93861cd909e0f28ed112096d6f9fc57d0d31c57c) )
+ ROM_LOAD32_BYTE( "te-uj16.bin", 0x200001, 0x80000, CRC(905ad88b) SHA1(24c336ccc0e2ac0ee96a34ad6fe4aa7464de0009) )
+ ROM_LOAD32_BYTE( "te-ug20.bin", 0x200002, 0x80000, CRC(8a48728c) SHA1(3684099b4934b027336c319c77d9e0710b8c22dc) )
+ ROM_LOAD32_BYTE( "te-uj20.bin", 0x200003, 0x80000, CRC(bf263d61) SHA1(b5b59e8df55f8030eff068c1d8b07dad8521bf5d) )
+
+ ROM_LOAD32_BYTE( "te-ug17.bin", 0x400000, 0x80000, CRC(9401be62) SHA1(597413a8a1eb66a7ad89af2f548fa3062e5e8efb) )
+ ROM_LOAD32_BYTE( "te-uj17.bin", 0x400001, 0x80000, CRC(8a852b9e) SHA1(604c7f4305887e9505320630027765ea76607c58) )
+ ROM_LOAD32_BYTE( "te-ug22.bin", 0x400002, 0x80000, CRC(3b05133b) SHA1(f6067abb92b8751afe7352a4f1b1a22c9528002b) )
+ ROM_LOAD32_BYTE( "te-uj22.bin", 0x400003, 0x80000, CRC(39791051) SHA1(7aa02500ddacd31fca04044a22a38f36452ca300) )
+
+ ROM_LOAD32_BYTE( "te-ug18.bin", 0x600000, 0x80000, CRC(6fd08f57) SHA1(5b7031dffc88374c5bfdf3021aa01ec4e28d0631) )
+ ROM_LOAD32_BYTE( "te-uj18.bin", 0x600001, 0x80000, CRC(4eb73c26) SHA1(693bf45f777da8e55b7bcd8699ea5bd711964941) )
+ ROM_LOAD32_BYTE( "te-ug23.bin", 0x600002, 0x80000, CRC(854f73bc) SHA1(242cc8ce28711f6f0787524a1070eb4b0956e6ae) )
+ ROM_LOAD32_BYTE( "te-uj23.bin", 0x600003, 0x80000, CRC(f8c30998) SHA1(33e2f982d74e9f3686b1f4a8172c49fb8b604cf5) )
ROM_END
ROM_START( nbajamte2 )
ROM_REGION( 0x50000, "adpcm:cpu", 0 ) /* sound CPU */
- ROM_LOAD( "l1_nba_jam_tournament_u3_sound_rom.u3", 0x010000, 0x20000, CRC(d4551195) SHA1(e8908fbe4339fb8c93f7e74113dfd25dda1667ea) )
+ ROM_LOAD( "te-u3.bin", 0x010000, 0x20000, CRC(d4551195) SHA1(e8908fbe4339fb8c93f7e74113dfd25dda1667ea) )
ROM_RELOAD( 0x030000, 0x20000 )
ROM_REGION( 0x100000, "adpcm:oki", 0 ) /* ADPCM */
- ROM_LOAD( "l1_nba_jam_tournament_u12_sound_rom.u12", 0x000000, 0x80000, CRC(4fac97bc) SHA1(bd88d8c3edab0e35ad9f9350bcbaa17cda61d87a) )
- ROM_LOAD( "l1_nba_jam_tournament_u13_sound_rom.u13", 0x080000, 0x80000, CRC(6f27b202) SHA1(c1f0db15624d1e7102ce9fd1db49ccf86e8611d6) )
+ ROM_LOAD( "te-u12.bin", 0x000000, 0x80000, CRC(4fac97bc) SHA1(bd88d8c3edab0e35ad9f9350bcbaa17cda61d87a) )
+ ROM_LOAD( "te-u13.bin", 0x080000, 0x80000, CRC(6f27b202) SHA1(c1f0db15624d1e7102ce9fd1db49ccf86e8611d6) )
ROM_REGION16_LE( 0x100000, "maincpu", 0 ) /* 34010 code */
- ROM_LOAD16_BYTE( "l2_nba_jam_tournament_game_rom_uj12.uj12", 0x00000, 0x80000, CRC(eaa6fb32) SHA1(8c8c0c6ace2b98679d7fe90e1f9284bdf0e14eaf) )
- ROM_LOAD16_BYTE( "l2_nba_jam_tournament_game_rom_ug12.ug12", 0x00001, 0x80000, CRC(5a694d9a) SHA1(fb74e4242d9adba03f24a81451ea06e8d9b4af96) )
+ ROM_LOAD16_BYTE( "te-uj12.l2", 0x00000, 0x80000, CRC(eaa6fb32) SHA1(8c8c0c6ace2b98679d7fe90e1f9284bdf0e14eaf) )
+ ROM_LOAD16_BYTE( "te-ug12.l2", 0x00001, 0x80000, CRC(5a694d9a) SHA1(fb74e4242d9adba03f24a81451ea06e8d9b4af96) )
ROM_REGION( 0xc00000, "gfxrom", 0 )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug14.ug14", 0x000000, 0x80000, CRC(04bb9f64) SHA1(9e1a8c37e14cb6fe67f4aa3caa9022f356f1ca64) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj14.uj14", 0x000001, 0x80000, CRC(b34b7af3) SHA1(0abb74d2f414bc9da0380a81beb134f3a87c1a0a) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug19.ug19", 0x000002, 0x80000, CRC(a8f22fbb) SHA1(514208a9d6d0c8c2d7847cc02d4387eac90be659) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj19.uj19", 0x000003, 0x80000, CRC(8130a8a2) SHA1(f23f124024285d07d8cf822817b62e42c38b82db) )
-
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug16.ug16", 0x200000, 0x80000, CRC(c7ce74d0) SHA1(93861cd909e0f28ed112096d6f9fc57d0d31c57c) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj16.uj16", 0x200001, 0x80000, CRC(905ad88b) SHA1(24c336ccc0e2ac0ee96a34ad6fe4aa7464de0009) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug20.ug20", 0x200002, 0x80000, CRC(8a48728c) SHA1(3684099b4934b027336c319c77d9e0710b8c22dc) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj20.uj20", 0x200003, 0x80000, CRC(bf263d61) SHA1(b5b59e8df55f8030eff068c1d8b07dad8521bf5d) )
-
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug17.ug17", 0x400000, 0x80000, CRC(9401be62) SHA1(597413a8a1eb66a7ad89af2f548fa3062e5e8efb) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj17.uj17", 0x400001, 0x80000, CRC(8a852b9e) SHA1(604c7f4305887e9505320630027765ea76607c58) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug22.ug22", 0x400002, 0x80000, CRC(3b05133b) SHA1(f6067abb92b8751afe7352a4f1b1a22c9528002b) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj22.uj22", 0x400003, 0x80000, CRC(39791051) SHA1(7aa02500ddacd31fca04044a22a38f36452ca300) )
-
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug18.ug18", 0x600000, 0x80000, CRC(6fd08f57) SHA1(5b7031dffc88374c5bfdf3021aa01ec4e28d0631) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj18.uj18", 0x600001, 0x80000, CRC(4eb73c26) SHA1(693bf45f777da8e55b7bcd8699ea5bd711964941) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug23.ug23", 0x600002, 0x80000, CRC(854f73bc) SHA1(242cc8ce28711f6f0787524a1070eb4b0956e6ae) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj23.uj23", 0x600003, 0x80000, CRC(f8c30998) SHA1(33e2f982d74e9f3686b1f4a8172c49fb8b604cf5) )
+ ROM_LOAD32_BYTE( "nbaug14.bin", 0x000000, 0x80000, CRC(04bb9f64) SHA1(9e1a8c37e14cb6fe67f4aa3caa9022f356f1ca64) )
+ ROM_LOAD32_BYTE( "nbauj14.bin", 0x000001, 0x80000, CRC(b34b7af3) SHA1(0abb74d2f414bc9da0380a81beb134f3a87c1a0a) )
+ ROM_LOAD32_BYTE( "nbaug19.bin", 0x000002, 0x80000, CRC(a8f22fbb) SHA1(514208a9d6d0c8c2d7847cc02d4387eac90be659) )
+ ROM_LOAD32_BYTE( "nbauj19.bin", 0x000003, 0x80000, CRC(8130a8a2) SHA1(f23f124024285d07d8cf822817b62e42c38b82db) )
+
+ ROM_LOAD32_BYTE( "te-ug16.bin", 0x200000, 0x80000, CRC(c7ce74d0) SHA1(93861cd909e0f28ed112096d6f9fc57d0d31c57c) )
+ ROM_LOAD32_BYTE( "te-uj16.bin", 0x200001, 0x80000, CRC(905ad88b) SHA1(24c336ccc0e2ac0ee96a34ad6fe4aa7464de0009) )
+ ROM_LOAD32_BYTE( "te-ug20.bin", 0x200002, 0x80000, CRC(8a48728c) SHA1(3684099b4934b027336c319c77d9e0710b8c22dc) )
+ ROM_LOAD32_BYTE( "te-uj20.bin", 0x200003, 0x80000, CRC(bf263d61) SHA1(b5b59e8df55f8030eff068c1d8b07dad8521bf5d) )
+
+ ROM_LOAD32_BYTE( "te-ug17.bin", 0x400000, 0x80000, CRC(9401be62) SHA1(597413a8a1eb66a7ad89af2f548fa3062e5e8efb) )
+ ROM_LOAD32_BYTE( "te-uj17.bin", 0x400001, 0x80000, CRC(8a852b9e) SHA1(604c7f4305887e9505320630027765ea76607c58) )
+ ROM_LOAD32_BYTE( "te-ug22.bin", 0x400002, 0x80000, CRC(3b05133b) SHA1(f6067abb92b8751afe7352a4f1b1a22c9528002b) )
+ ROM_LOAD32_BYTE( "te-uj22.bin", 0x400003, 0x80000, CRC(39791051) SHA1(7aa02500ddacd31fca04044a22a38f36452ca300) )
+
+ ROM_LOAD32_BYTE( "te-ug18.bin", 0x600000, 0x80000, CRC(6fd08f57) SHA1(5b7031dffc88374c5bfdf3021aa01ec4e28d0631) )
+ ROM_LOAD32_BYTE( "te-uj18.bin", 0x600001, 0x80000, CRC(4eb73c26) SHA1(693bf45f777da8e55b7bcd8699ea5bd711964941) )
+ ROM_LOAD32_BYTE( "te-ug23.bin", 0x600002, 0x80000, CRC(854f73bc) SHA1(242cc8ce28711f6f0787524a1070eb4b0956e6ae) )
+ ROM_LOAD32_BYTE( "te-uj23.bin", 0x600003, 0x80000, CRC(f8c30998) SHA1(33e2f982d74e9f3686b1f4a8172c49fb8b604cf5) )
ROM_END
-ROM_START( nbajamte1 )
+ROM_START( nbajamte3 )
ROM_REGION( 0x50000, "adpcm:cpu", 0 ) /* sound CPU */
- ROM_LOAD( "l1_nba_jam_tournament_u3_sound_rom.u3", 0x010000, 0x20000, CRC(d4551195) SHA1(e8908fbe4339fb8c93f7e74113dfd25dda1667ea) )
+ ROM_LOAD( "te-u3.bin", 0x010000, 0x20000, CRC(d4551195) SHA1(e8908fbe4339fb8c93f7e74113dfd25dda1667ea) )
ROM_RELOAD( 0x030000, 0x20000 )
ROM_REGION( 0x100000, "adpcm:oki", 0 ) /* ADPCM */
- ROM_LOAD( "l1_nba_jam_tournament_u12_sound_rom.u12", 0x000000, 0x80000, CRC(4fac97bc) SHA1(bd88d8c3edab0e35ad9f9350bcbaa17cda61d87a) )
- ROM_LOAD( "l1_nba_jam_tournament_u13_sound_rom.u13", 0x080000, 0x80000, CRC(6f27b202) SHA1(c1f0db15624d1e7102ce9fd1db49ccf86e8611d6) )
+ ROM_LOAD( "te-u12.bin", 0x000000, 0x80000, CRC(4fac97bc) SHA1(bd88d8c3edab0e35ad9f9350bcbaa17cda61d87a) )
+ ROM_LOAD( "te-u13.bin", 0x080000, 0x80000, CRC(6f27b202) SHA1(c1f0db15624d1e7102ce9fd1db49ccf86e8611d6) )
ROM_REGION16_LE( 0x100000, "maincpu", 0 ) /* 34010 code */
- ROM_LOAD16_BYTE( "l1_nba_jam_tournament_game_rom_uj12.uj12", 0x00000, 0x80000, CRC(a9f555ad) SHA1(34f5fc1b003ef8acbb2b38fbacd58d018d20ab1b) )
- ROM_LOAD16_BYTE( "l1_nba_jam_tournament_game_rom_ug12.ug12", 0x00001, 0x80000, CRC(bd4579b5) SHA1(c893cff931f1e60a1d0d29d2719f514d92fb3490) )
+ ROM_LOAD16_BYTE( "te-uj12.l3", 0x00000, 0x80000, CRC(8fdf77b4) SHA1(1a8a178b19d0b8e7a5fd2ddf373a4279321440d0) )
+ ROM_LOAD16_BYTE( "te-ug12.l3", 0x00001, 0x80000, CRC(656579ed) SHA1(b038fdc814ebc8d203724fdb2f7501d40f1dc21f) )
ROM_REGION( 0xc00000, "gfxrom", 0 )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug14.ug14", 0x000000, 0x80000, CRC(04bb9f64) SHA1(9e1a8c37e14cb6fe67f4aa3caa9022f356f1ca64) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj14.uj14", 0x000001, 0x80000, CRC(b34b7af3) SHA1(0abb74d2f414bc9da0380a81beb134f3a87c1a0a) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug19.ug19", 0x000002, 0x80000, CRC(a8f22fbb) SHA1(514208a9d6d0c8c2d7847cc02d4387eac90be659) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj19.uj19", 0x000003, 0x80000, CRC(8130a8a2) SHA1(f23f124024285d07d8cf822817b62e42c38b82db) )
-
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug16.ug16", 0x200000, 0x80000, CRC(c7ce74d0) SHA1(93861cd909e0f28ed112096d6f9fc57d0d31c57c) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj16.uj16", 0x200001, 0x80000, CRC(905ad88b) SHA1(24c336ccc0e2ac0ee96a34ad6fe4aa7464de0009) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug20.ug20", 0x200002, 0x80000, CRC(8a48728c) SHA1(3684099b4934b027336c319c77d9e0710b8c22dc) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj20.uj20", 0x200003, 0x80000, CRC(bf263d61) SHA1(b5b59e8df55f8030eff068c1d8b07dad8521bf5d) )
-
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug17.ug17", 0x400000, 0x80000, CRC(9401be62) SHA1(597413a8a1eb66a7ad89af2f548fa3062e5e8efb) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj17.uj17", 0x400001, 0x80000, CRC(8a852b9e) SHA1(604c7f4305887e9505320630027765ea76607c58) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug22.ug22", 0x400002, 0x80000, CRC(3b05133b) SHA1(f6067abb92b8751afe7352a4f1b1a22c9528002b) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj22.uj22", 0x400003, 0x80000, CRC(39791051) SHA1(7aa02500ddacd31fca04044a22a38f36452ca300) )
-
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug18.ug18", 0x600000, 0x80000, CRC(6fd08f57) SHA1(5b7031dffc88374c5bfdf3021aa01ec4e28d0631) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj18.uj18", 0x600001, 0x80000, CRC(4eb73c26) SHA1(693bf45f777da8e55b7bcd8699ea5bd711964941) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug23.ug23", 0x600002, 0x80000, CRC(854f73bc) SHA1(242cc8ce28711f6f0787524a1070eb4b0956e6ae) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj23.uj23", 0x600003, 0x80000, CRC(f8c30998) SHA1(33e2f982d74e9f3686b1f4a8172c49fb8b604cf5) )
+ ROM_LOAD32_BYTE( "nbaug14.bin", 0x000000, 0x80000, CRC(04bb9f64) SHA1(9e1a8c37e14cb6fe67f4aa3caa9022f356f1ca64) )
+ ROM_LOAD32_BYTE( "nbauj14.bin", 0x000001, 0x80000, CRC(b34b7af3) SHA1(0abb74d2f414bc9da0380a81beb134f3a87c1a0a) )
+ ROM_LOAD32_BYTE( "nbaug19.bin", 0x000002, 0x80000, CRC(a8f22fbb) SHA1(514208a9d6d0c8c2d7847cc02d4387eac90be659) )
+ ROM_LOAD32_BYTE( "nbauj19.bin", 0x000003, 0x80000, CRC(8130a8a2) SHA1(f23f124024285d07d8cf822817b62e42c38b82db) )
+
+ ROM_LOAD32_BYTE( "te-ug16.bin", 0x200000, 0x80000, CRC(c7ce74d0) SHA1(93861cd909e0f28ed112096d6f9fc57d0d31c57c) )
+ ROM_LOAD32_BYTE( "te-uj16.bin", 0x200001, 0x80000, CRC(905ad88b) SHA1(24c336ccc0e2ac0ee96a34ad6fe4aa7464de0009) )
+ ROM_LOAD32_BYTE( "te-ug20.bin", 0x200002, 0x80000, CRC(8a48728c) SHA1(3684099b4934b027336c319c77d9e0710b8c22dc) )
+ ROM_LOAD32_BYTE( "te-uj20.bin", 0x200003, 0x80000, CRC(bf263d61) SHA1(b5b59e8df55f8030eff068c1d8b07dad8521bf5d) )
+
+ ROM_LOAD32_BYTE( "te-ug17.bin", 0x400000, 0x80000, CRC(9401be62) SHA1(597413a8a1eb66a7ad89af2f548fa3062e5e8efb) )
+ ROM_LOAD32_BYTE( "te-uj17.bin", 0x400001, 0x80000, CRC(8a852b9e) SHA1(604c7f4305887e9505320630027765ea76607c58) )
+ ROM_LOAD32_BYTE( "te-ug22.bin", 0x400002, 0x80000, CRC(3b05133b) SHA1(f6067abb92b8751afe7352a4f1b1a22c9528002b) )
+ ROM_LOAD32_BYTE( "te-uj22.bin", 0x400003, 0x80000, CRC(39791051) SHA1(7aa02500ddacd31fca04044a22a38f36452ca300) )
+
+ ROM_LOAD32_BYTE( "te-ug18.bin", 0x600000, 0x80000, CRC(6fd08f57) SHA1(5b7031dffc88374c5bfdf3021aa01ec4e28d0631) )
+ ROM_LOAD32_BYTE( "te-uj18.bin", 0x600001, 0x80000, CRC(4eb73c26) SHA1(693bf45f777da8e55b7bcd8699ea5bd711964941) )
+ ROM_LOAD32_BYTE( "te-ug23.bin", 0x600002, 0x80000, CRC(854f73bc) SHA1(242cc8ce28711f6f0787524a1070eb4b0956e6ae) )
+ ROM_LOAD32_BYTE( "te-uj23.bin", 0x600003, 0x80000, CRC(f8c30998) SHA1(33e2f982d74e9f3686b1f4a8172c49fb8b604cf5) )
ROM_END
ROM_START( nbajamten )
ROM_REGION( 0x50000, "adpcm:cpu", 0 ) /* sound CPU */
- ROM_LOAD( "l1_nba_jam_tournament_u3_sound_rom.u3", 0x010000, 0x20000, CRC(d4551195) SHA1(e8908fbe4339fb8c93f7e74113dfd25dda1667ea) )
+ ROM_LOAD( "te-u3.bin", 0x010000, 0x20000, CRC(d4551195) SHA1(e8908fbe4339fb8c93f7e74113dfd25dda1667ea) )
ROM_RELOAD( 0x030000, 0x20000 )
ROM_REGION( 0x100000, "adpcm:oki", 0 ) /* ADPCM */
- ROM_LOAD( "l1_nba_jam_tournament_u12_sound_rom.u12", 0x000000, 0x80000, CRC(4fac97bc) SHA1(bd88d8c3edab0e35ad9f9350bcbaa17cda61d87a) )
- ROM_LOAD( "l1_nba_jam_tournament_u13_sound_rom.u13", 0x080000, 0x80000, CRC(6f27b202) SHA1(c1f0db15624d1e7102ce9fd1db49ccf86e8611d6) )
+ ROM_LOAD( "te-u12.bin", 0x000000, 0x80000, CRC(4fac97bc) SHA1(bd88d8c3edab0e35ad9f9350bcbaa17cda61d87a) )
+ ROM_LOAD( "te-u13.bin", 0x080000, 0x80000, CRC(6f27b202) SHA1(c1f0db15624d1e7102ce9fd1db49ccf86e8611d6) )
ROM_REGION16_LE( 0x100000, "maincpu", 0 ) /* 34010 code */
ROM_LOAD16_BYTE( "nani-uj12.bin", 0x00000, 0x80000, CRC(a2662e74) SHA1(7a6c18464446baf3d279013eb95bf862b5b3be70) )
ROM_LOAD16_BYTE( "nani-ug12.bin", 0x00001, 0x80000, CRC(40cda5b1) SHA1(2ff51f830aa86f6456c626666e221be1f7bfbfa2) )
ROM_REGION( 0xc00000, "gfxrom", 0 )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug14.ug14", 0x000000, 0x80000, CRC(04bb9f64) SHA1(9e1a8c37e14cb6fe67f4aa3caa9022f356f1ca64) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj14.uj14", 0x000001, 0x80000, CRC(b34b7af3) SHA1(0abb74d2f414bc9da0380a81beb134f3a87c1a0a) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug19.ug19", 0x000002, 0x80000, CRC(a8f22fbb) SHA1(514208a9d6d0c8c2d7847cc02d4387eac90be659) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj19.uj19", 0x000003, 0x80000, CRC(8130a8a2) SHA1(f23f124024285d07d8cf822817b62e42c38b82db) )
-
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug16.ug16", 0x200000, 0x80000, CRC(c7ce74d0) SHA1(93861cd909e0f28ed112096d6f9fc57d0d31c57c) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj16.uj16", 0x200001, 0x80000, CRC(905ad88b) SHA1(24c336ccc0e2ac0ee96a34ad6fe4aa7464de0009) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug20.ug20", 0x200002, 0x80000, CRC(8a48728c) SHA1(3684099b4934b027336c319c77d9e0710b8c22dc) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj20.uj20", 0x200003, 0x80000, CRC(bf263d61) SHA1(b5b59e8df55f8030eff068c1d8b07dad8521bf5d) )
-
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug17.ug17", 0x400000, 0x80000, CRC(9401be62) SHA1(597413a8a1eb66a7ad89af2f548fa3062e5e8efb) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj17.uj17", 0x400001, 0x80000, CRC(8a852b9e) SHA1(604c7f4305887e9505320630027765ea76607c58) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug22.ug22", 0x400002, 0x80000, CRC(3b05133b) SHA1(f6067abb92b8751afe7352a4f1b1a22c9528002b) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj22.uj22", 0x400003, 0x80000, CRC(39791051) SHA1(7aa02500ddacd31fca04044a22a38f36452ca300) )
-
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug18.ug18", 0x600000, 0x80000, CRC(6fd08f57) SHA1(5b7031dffc88374c5bfdf3021aa01ec4e28d0631) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj18.uj18", 0x600001, 0x80000, CRC(4eb73c26) SHA1(693bf45f777da8e55b7bcd8699ea5bd711964941) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug23.ug23", 0x600002, 0x80000, CRC(854f73bc) SHA1(242cc8ce28711f6f0787524a1070eb4b0956e6ae) )
- ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj23.uj23", 0x600003, 0x80000, CRC(f8c30998) SHA1(33e2f982d74e9f3686b1f4a8172c49fb8b604cf5) )
+ ROM_LOAD32_BYTE( "nbaug14.bin", 0x000000, 0x80000, CRC(04bb9f64) SHA1(9e1a8c37e14cb6fe67f4aa3caa9022f356f1ca64) )
+ ROM_LOAD32_BYTE( "nbauj14.bin", 0x000001, 0x80000, CRC(b34b7af3) SHA1(0abb74d2f414bc9da0380a81beb134f3a87c1a0a) )
+ ROM_LOAD32_BYTE( "nbaug19.bin", 0x000002, 0x80000, CRC(a8f22fbb) SHA1(514208a9d6d0c8c2d7847cc02d4387eac90be659) )
+ ROM_LOAD32_BYTE( "nbauj19.bin", 0x000003, 0x80000, CRC(8130a8a2) SHA1(f23f124024285d07d8cf822817b62e42c38b82db) )
+
+ ROM_LOAD32_BYTE( "te-ug16.bin", 0x200000, 0x80000, CRC(c7ce74d0) SHA1(93861cd909e0f28ed112096d6f9fc57d0d31c57c) )
+ ROM_LOAD32_BYTE( "te-uj16.bin", 0x200001, 0x80000, CRC(905ad88b) SHA1(24c336ccc0e2ac0ee96a34ad6fe4aa7464de0009) )
+ ROM_LOAD32_BYTE( "te-ug20.bin", 0x200002, 0x80000, CRC(8a48728c) SHA1(3684099b4934b027336c319c77d9e0710b8c22dc) )
+ ROM_LOAD32_BYTE( "te-uj20.bin", 0x200003, 0x80000, CRC(bf263d61) SHA1(b5b59e8df55f8030eff068c1d8b07dad8521bf5d) )
+
+ ROM_LOAD32_BYTE( "te-ug17.bin", 0x400000, 0x80000, CRC(9401be62) SHA1(597413a8a1eb66a7ad89af2f548fa3062e5e8efb) )
+ ROM_LOAD32_BYTE( "te-uj17.bin", 0x400001, 0x80000, CRC(8a852b9e) SHA1(604c7f4305887e9505320630027765ea76607c58) )
+ ROM_LOAD32_BYTE( "te-ug22.bin", 0x400002, 0x80000, CRC(3b05133b) SHA1(f6067abb92b8751afe7352a4f1b1a22c9528002b) )
+ ROM_LOAD32_BYTE( "te-uj22.bin", 0x400003, 0x80000, CRC(39791051) SHA1(7aa02500ddacd31fca04044a22a38f36452ca300) )
+
+ ROM_LOAD32_BYTE( "te-ug18.bin", 0x600000, 0x80000, CRC(6fd08f57) SHA1(5b7031dffc88374c5bfdf3021aa01ec4e28d0631) )
+ ROM_LOAD32_BYTE( "te-uj18.bin", 0x600001, 0x80000, CRC(4eb73c26) SHA1(693bf45f777da8e55b7bcd8699ea5bd711964941) )
+ ROM_LOAD32_BYTE( "te-ug23.bin", 0x600002, 0x80000, CRC(854f73bc) SHA1(242cc8ce28711f6f0787524a1070eb4b0956e6ae) )
+ ROM_LOAD32_BYTE( "te-uj23.bin", 0x600003, 0x80000, CRC(f8c30998) SHA1(33e2f982d74e9f3686b1f4a8172c49fb8b604cf5) )
ROM_END
@@ -1535,10 +1499,9 @@ GAME( 1993, jdreddp, 0, tunit_adpcm, jdreddp, midtunit_state, jdreddp,
GAME( 1993, nbajam, 0, tunit_adpcm, nbajam, midtunit_state, nbajam, ROT0, "Midway", "NBA Jam (rev 3.01 04/07/93)", MACHINE_SUPPORTS_SAVE )
GAME( 1993, nbajamr2, nbajam, tunit_adpcm, nbajam, midtunit_state, nbajam, ROT0, "Midway", "NBA Jam (rev 2.00 02/10/93)", MACHINE_SUPPORTS_SAVE )
-GAME( 1993, nbajamr1, nbajam, tunit_adpcm, nbajam, midtunit_state, nbajam, ROT0, "Midway", "NBA Jam (rev 1.00 02/1/93)", MACHINE_SUPPORTS_SAVE )
GAME( 1994, nbajamte, 0, tunit_adpcm, nbajamte, midtunit_state, nbajamte, ROT0, "Midway", "NBA Jam TE (rev 4.0 03/23/94)", MACHINE_SUPPORTS_SAVE )
-GAME( 1994, nbajamte3,nbajamte, tunit_adpcm, nbajamte, midtunit_state, nbajamte, ROT0, "Midway", "NBA Jam TE (rev 3.0 03/04/94)", MACHINE_SUPPORTS_SAVE )
-GAME( 1994, nbajamte2,nbajamte, tunit_adpcm, nbajamte, midtunit_state, nbajamte, ROT0, "Midway", "NBA Jam TE (rev 2.0 01/28/94)", MACHINE_SUPPORTS_SAVE )
GAME( 1994, nbajamte1,nbajamte, tunit_adpcm, nbajamte, midtunit_state, nbajamte, ROT0, "Midway", "NBA Jam TE (rev 1.0 01/17/94)", MACHINE_SUPPORTS_SAVE )
+GAME( 1994, nbajamte2,nbajamte, tunit_adpcm, nbajamte, midtunit_state, nbajamte, ROT0, "Midway", "NBA Jam TE (rev 2.0 01/28/94)", MACHINE_SUPPORTS_SAVE )
+GAME( 1994, nbajamte3,nbajamte, tunit_adpcm, nbajamte, midtunit_state, nbajamte, ROT0, "Midway", "NBA Jam TE (rev 3.0 03/04/94)", MACHINE_SUPPORTS_SAVE )
GAME( 1995, nbajamten,nbajamte, tunit_adpcm, nbajamte, midtunit_state, nbajamte, ROT0, "Midway", "NBA Jam T.E. Nani Edition (rev 5.2 8/11/95, prototype)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/mitchell.cpp b/src/mame/drivers/mitchell.cpp
index d564c6e9ead..f075e7b1957 100644
--- a/src/mame/drivers/mitchell.cpp
+++ b/src/mame/drivers/mitchell.cpp
@@ -2045,91 +2045,73 @@ ROM_END
ROM_START( block )
ROM_REGION( 0x50000, "maincpu", 0 )
- ROM_LOAD( "ble_05b.14f", 0x00000, 0x08000, CRC(fcdb7885) SHA1(500ee4b8344181e9ad348bd22344a1a942fe9fdc) )
- ROM_LOAD( "ble_06b.15f", 0x10000, 0x20000, CRC(e114ebde) SHA1(12362e809443644b43fbc72e7eead5f376fe11d3) )
- ROM_LOAD( "ble_07b.16f", 0x30000, 0x20000, CRC(61bef077) SHA1(92792f26305df1e5e66607bed391b84b4964ba3e) )
+ ROM_LOAD( "ble_05.rom", 0x00000, 0x08000, CRC(c12e7f4c) SHA1(335f4eab2323b942d5feeb3bab6f7286fabfffb4) )
+ ROM_LOAD( "ble_06.rom", 0x10000, 0x20000, CRC(cdb13d55) SHA1(2e4489d12a603b4c7dfb90d246ebff9176e88a0b) )
+ ROM_LOAD( "ble_07.rom", 0x30000, 0x20000, CRC(1d114f13) SHA1(ee3588e1752b3432fd611e2d7d4fb43f942de580) )
ROM_REGION( 0x100000, "gfx1", ROMREGION_ERASEFF )
- ROM_LOAD( "bl_08.8h", 0x000000, 0x20000, CRC(aa0f4ff1) SHA1(58f3c468f89d834caaf66d3c084ab87addbb75c0) ) /* chars */
- ROM_LOAD( "bl_09.9h", 0x020000, 0x20000, CRC(6fa8c186) SHA1(d4dd26d666f2accce871f70e7882e140d924dd07) )
+ ROM_LOAD( "bl_08.rom", 0x000000, 0x20000, CRC(aa0f4ff1) SHA1(58f3c468f89d834caaf66d3c084ab87addbb75c0) ) /* chars */
+ ROM_LOAD( "bl_09.rom", 0x020000, 0x20000, CRC(6fa8c186) SHA1(d4dd26d666f2accce871f70e7882e140d924dd07) )
/* 40000-7ffff empty */
- ROM_LOAD( "bl_18.8j", 0x080000, 0x20000, CRC(c0acafaf) SHA1(7c44b2605da6a324d0c145202cb8bac7af7a9c68) )
- ROM_LOAD( "bl_19.9j", 0x0a0000, 0x20000, CRC(1ae942f5) SHA1(e9322790db0bf2a9e862b14e166ee3f36f9ea5ad) )
+ ROM_LOAD( "bl_18.rom", 0x080000, 0x20000, CRC(c0acafaf) SHA1(7c44b2605da6a324d0c145202cb8bac7af7a9c68) )
+ ROM_LOAD( "bl_19.rom", 0x0a0000, 0x20000, CRC(1ae942f5) SHA1(e9322790db0bf2a9e862b14e166ee3f36f9ea5ad) )
/* c0000-fffff empty */
ROM_REGION( 0x040000, "gfx2", 0 )
- ROM_LOAD( "bl_16.2j", 0x000000, 0x20000, CRC(fadcaff7) SHA1(f4bd8e375fe6b1e6a07b4ec4e58f5807dbd738f8) ) /* sprites */
- ROM_LOAD( "bl_17.3j", 0x020000, 0x20000, CRC(5f8cab42) SHA1(3a4c682a7938479e0be80c0494c2c8fc7303b663) )
+ ROM_LOAD( "bl_16.rom", 0x000000, 0x20000, CRC(fadcaff7) SHA1(f4bd8e375fe6b1e6a07b4ec4e58f5807dbd738f8) ) /* sprites */
+ ROM_LOAD( "bl_17.rom", 0x020000, 0x20000, CRC(5f8cab42) SHA1(3a4c682a7938479e0be80c0494c2c8fc7303b663) )
ROM_REGION( 0x80000, "oki", 0 ) /* OKIM */
- ROM_LOAD( "bl_01.2d", 0x00000, 0x20000, CRC(c2ec2abb) SHA1(89981f2a887ace4c4580e2828cbdc962f89c215e) )
+ ROM_LOAD( "bl_01.rom", 0x00000, 0x20000, CRC(c2ec2abb) SHA1(89981f2a887ace4c4580e2828cbdc962f89c215e) )
ROM_END
-ROM_START( blockr1 )
+ROM_START( blockj )
ROM_REGION( 0x50000, "maincpu", 0 )
- ROM_LOAD( "ble_05a.14f", 0x00000, 0x08000, CRC(fa2a4536) SHA1(8f584745116bd0ced4d66719cd80c0372b797134) )
- ROM_LOAD( "ble_06a.15f", 0x10000, 0x20000, CRC(e114ebde) SHA1(12362e809443644b43fbc72e7eead5f376fe11d3) )
- ROM_LOAD( "ble_07.16f", 0x30000, 0x20000, CRC(1d114f13) SHA1(ee3588e1752b3432fd611e2d7d4fb43f942de580) )
+ ROM_LOAD( "blj_05.rom", 0x00000, 0x08000, CRC(3b55969a) SHA1(86de2f1f5878de380a8b1e3935cffa146863f07f) )
+ ROM_LOAD( "ble_06.rom", 0x10000, 0x20000, CRC(cdb13d55) SHA1(2e4489d12a603b4c7dfb90d246ebff9176e88a0b) )
+ ROM_LOAD( "blj_07.rom", 0x30000, 0x20000, CRC(1723883c) SHA1(e6b7575a55c045b90fb41290a60306713121acfb) )
- /* the highscore table specifies an unused tile number, so we need ROMREGION_ERASEFF to ensure it is blank */
ROM_REGION( 0x100000, "gfx1", ROMREGION_ERASEFF )
- ROM_LOAD( "bl_08.8h", 0x000000, 0x20000, CRC(aa0f4ff1) SHA1(58f3c468f89d834caaf66d3c084ab87addbb75c0) ) /* chars */
- ROM_LOAD( "bl_09.9h", 0x020000, 0x20000, CRC(6fa8c186) SHA1(d4dd26d666f2accce871f70e7882e140d924dd07) )
+ ROM_LOAD( "bl_08.rom", 0x000000, 0x20000, CRC(aa0f4ff1) SHA1(58f3c468f89d834caaf66d3c084ab87addbb75c0) ) /* chars */
+ ROM_LOAD( "bl_09.rom", 0x020000, 0x20000, CRC(6fa8c186) SHA1(d4dd26d666f2accce871f70e7882e140d924dd07) )
/* 40000-7ffff empty */
- ROM_LOAD( "bl_18.8j", 0x080000, 0x20000, CRC(c0acafaf) SHA1(7c44b2605da6a324d0c145202cb8bac7af7a9c68) )
- ROM_LOAD( "bl_19.9j", 0x0a0000, 0x20000, CRC(1ae942f5) SHA1(e9322790db0bf2a9e862b14e166ee3f36f9ea5ad) )
+ ROM_LOAD( "bl_18.rom", 0x080000, 0x20000, CRC(c0acafaf) SHA1(7c44b2605da6a324d0c145202cb8bac7af7a9c68) )
+ ROM_LOAD( "bl_19.rom", 0x0a0000, 0x20000, CRC(1ae942f5) SHA1(e9322790db0bf2a9e862b14e166ee3f36f9ea5ad) )
/* c0000-fffff empty */
ROM_REGION( 0x040000, "gfx2", 0 )
- ROM_LOAD( "bl_16.2j", 0x000000, 0x20000, CRC(fadcaff7) SHA1(f4bd8e375fe6b1e6a07b4ec4e58f5807dbd738f8) ) /* sprites */
- ROM_LOAD( "bl_17.3j", 0x020000, 0x20000, CRC(5f8cab42) SHA1(3a4c682a7938479e0be80c0494c2c8fc7303b663) )
+ ROM_LOAD( "bl_16.rom", 0x000000, 0x20000, CRC(fadcaff7) SHA1(f4bd8e375fe6b1e6a07b4ec4e58f5807dbd738f8) ) /* sprites */
+ ROM_LOAD( "bl_17.rom", 0x020000, 0x20000, CRC(5f8cab42) SHA1(3a4c682a7938479e0be80c0494c2c8fc7303b663) )
ROM_REGION( 0x80000, "oki", 0 ) /* OKIM */
- ROM_LOAD( "bl_01.2d", 0x00000, 0x20000, CRC(c2ec2abb) SHA1(89981f2a887ace4c4580e2828cbdc962f89c215e) )
+ ROM_LOAD( "bl_01.rom", 0x00000, 0x20000, CRC(c2ec2abb) SHA1(89981f2a887ace4c4580e2828cbdc962f89c215e) )
ROM_END
-ROM_START( blockr2 )
+ROM_START( blockjoy )
ROM_REGION( 0x50000, "maincpu", 0 )
- ROM_LOAD( "ble_05.14f", 0x00000, 0x08000, CRC(c12e7f4c) SHA1(335f4eab2323b942d5feeb3bab6f7286fabfffb4) )
- ROM_LOAD( "ble_06.15f", 0x10000, 0x20000, CRC(cdb13d55) SHA1(2e4489d12a603b4c7dfb90d246ebff9176e88a0b) )
- ROM_LOAD( "ble_07.16f", 0x30000, 0x20000, CRC(1d114f13) SHA1(ee3588e1752b3432fd611e2d7d4fb43f942de580) )
+ ROM_LOAD( "ble_05.bin", 0x00000, 0x08000, CRC(fa2a4536) SHA1(8f584745116bd0ced4d66719cd80c0372b797134) )
+ ROM_LOAD( "blf_06.bin", 0x10000, 0x20000, CRC(e114ebde) SHA1(12362e809443644b43fbc72e7eead5f376fe11d3) )
+// this seems to be a bad version of the above rom, although the rom code is different it is 99% the same, and level 6
+// is impossible to finish due to a missing block. Probably bitrot
+// ROM_LOAD( "ble_06.bin", 0x10000, 0x20000, BAD_DUMP CRC(58a77402) SHA1(cb24b1edd53a0965c3a9a34fe764b5c1f8dd9733) )
- ROM_REGION( 0x100000, "gfx1", ROMREGION_ERASEFF )
- ROM_LOAD( "bl_08.8h", 0x000000, 0x20000, CRC(aa0f4ff1) SHA1(58f3c468f89d834caaf66d3c084ab87addbb75c0) ) /* chars */
- ROM_LOAD( "bl_09.9h", 0x020000, 0x20000, CRC(6fa8c186) SHA1(d4dd26d666f2accce871f70e7882e140d924dd07) )
- /* 40000-7ffff empty */
- ROM_LOAD( "bl_18.8j", 0x080000, 0x20000, CRC(c0acafaf) SHA1(7c44b2605da6a324d0c145202cb8bac7af7a9c68) )
- ROM_LOAD( "bl_19.9j", 0x0a0000, 0x20000, CRC(1ae942f5) SHA1(e9322790db0bf2a9e862b14e166ee3f36f9ea5ad) )
- /* c0000-fffff empty */
-
- ROM_REGION( 0x040000, "gfx2", 0 )
- ROM_LOAD( "bl_16.2j", 0x000000, 0x20000, CRC(fadcaff7) SHA1(f4bd8e375fe6b1e6a07b4ec4e58f5807dbd738f8) ) /* sprites */
- ROM_LOAD( "bl_17.3j", 0x020000, 0x20000, CRC(5f8cab42) SHA1(3a4c682a7938479e0be80c0494c2c8fc7303b663) )
-
- ROM_REGION( 0x80000, "oki", 0 ) /* OKIM */
- ROM_LOAD( "bl_01.2d", 0x00000, 0x20000, CRC(c2ec2abb) SHA1(89981f2a887ace4c4580e2828cbdc962f89c215e) )
-ROM_END
-
-ROM_START( blockj )
- ROM_REGION( 0x50000, "maincpu", 0 )
- ROM_LOAD( "blj_05.14f", 0x00000, 0x08000, CRC(3b55969a) SHA1(86de2f1f5878de380a8b1e3935cffa146863f07f) )
- ROM_LOAD( "ble_06.15f", 0x10000, 0x20000, CRC(cdb13d55) SHA1(2e4489d12a603b4c7dfb90d246ebff9176e88a0b) )
- ROM_LOAD( "blj_07.16f", 0x30000, 0x20000, CRC(1723883c) SHA1(e6b7575a55c045b90fb41290a60306713121acfb) )
+ ROM_LOAD( "ble_07.rom", 0x30000, 0x20000, CRC(1d114f13) SHA1(ee3588e1752b3432fd611e2d7d4fb43f942de580) )
+ /* the highscore table specifies an unused tile number, so we need ROMREGION_ERASEFF to ensure it is blank */
ROM_REGION( 0x100000, "gfx1", ROMREGION_ERASEFF )
- ROM_LOAD( "bl_08.8h", 0x000000, 0x20000, CRC(aa0f4ff1) SHA1(58f3c468f89d834caaf66d3c084ab87addbb75c0) ) /* chars */
- ROM_LOAD( "bl_09.9h", 0x020000, 0x20000, CRC(6fa8c186) SHA1(d4dd26d666f2accce871f70e7882e140d924dd07) )
+ ROM_LOAD( "bl_08.rom", 0x000000, 0x20000, CRC(aa0f4ff1) SHA1(58f3c468f89d834caaf66d3c084ab87addbb75c0) ) /* chars */
+ ROM_LOAD( "bl_09.rom", 0x020000, 0x20000, CRC(6fa8c186) SHA1(d4dd26d666f2accce871f70e7882e140d924dd07) )
/* 40000-7ffff empty */
- ROM_LOAD( "bl_18.8j", 0x080000, 0x20000, CRC(c0acafaf) SHA1(7c44b2605da6a324d0c145202cb8bac7af7a9c68) )
- ROM_LOAD( "bl_19.9j", 0x0a0000, 0x20000, CRC(1ae942f5) SHA1(e9322790db0bf2a9e862b14e166ee3f36f9ea5ad) )
+ ROM_LOAD( "bl_18.rom", 0x080000, 0x20000, CRC(c0acafaf) SHA1(7c44b2605da6a324d0c145202cb8bac7af7a9c68) )
+ ROM_LOAD( "bl_19.rom", 0x0a0000, 0x20000, CRC(1ae942f5) SHA1(e9322790db0bf2a9e862b14e166ee3f36f9ea5ad) )
/* c0000-fffff empty */
ROM_REGION( 0x040000, "gfx2", 0 )
- ROM_LOAD( "bl_16.2j", 0x000000, 0x20000, CRC(fadcaff7) SHA1(f4bd8e375fe6b1e6a07b4ec4e58f5807dbd738f8) ) /* sprites */
- ROM_LOAD( "bl_17.3j", 0x020000, 0x20000, CRC(5f8cab42) SHA1(3a4c682a7938479e0be80c0494c2c8fc7303b663) )
+ ROM_LOAD( "bl_16.rom", 0x000000, 0x20000, CRC(fadcaff7) SHA1(f4bd8e375fe6b1e6a07b4ec4e58f5807dbd738f8) ) /* sprites */
+ ROM_LOAD( "bl_17.rom", 0x020000, 0x20000, CRC(5f8cab42) SHA1(3a4c682a7938479e0be80c0494c2c8fc7303b663) )
ROM_REGION( 0x80000, "oki", 0 ) /* OKIM */
- ROM_LOAD( "bl_01.2d", 0x00000, 0x20000, CRC(c2ec2abb) SHA1(89981f2a887ace4c4580e2828cbdc962f89c215e) )
+ ROM_LOAD( "bl_01.rom", 0x00000, 0x20000, CRC(c2ec2abb) SHA1(89981f2a887ace4c4580e2828cbdc962f89c215e) )
ROM_END
ROM_START( blockbl )
@@ -2341,33 +2323,32 @@ DRIVER_INIT_MEMBER(mitchell_state,mstworld)
*
*************************************/
-GAME( 1988, mgakuen, 0, mgakuen, mgakuen, mitchell_state, mgakuen, ROT0, "Yuga", "Mahjong Gakuen", MACHINE_SUPPORTS_SAVE )
-GAME( 1988, 7toitsu, mgakuen, mgakuen, mgakuen, mitchell_state, mgakuen, ROT0, "Yuga", "Chi-Toitsu", MACHINE_SUPPORTS_SAVE )
-GAME( 1989, mgakuen2, 0, marukin, marukin, mitchell_state, mgakuen2, ROT0, "Face", "Mahjong Gakuen 2 Gakuen-chou no Fukushuu", MACHINE_SUPPORTS_SAVE )
-GAME( 1989, pkladies, 0, marukin, pkladies, mitchell_state, pkladies, ROT0, "Mitchell", "Poker Ladies", MACHINE_SUPPORTS_SAVE )
-GAME( 1989, pkladiesl, pkladies, marukin, pkladies, mitchell_state, pkladies, ROT0, "Leprechaun", "Poker Ladies (Leprechaun ver. 510)", MACHINE_SUPPORTS_SAVE )
-GAME( 1989, pkladiesla,pkladies, marukin, pkladies, mitchell_state, pkladies, ROT0, "Leprechaun", "Poker Ladies (Leprechaun ver. 401)", MACHINE_SUPPORTS_SAVE )
-GAME( 1989, pkladiesbl,pkladies, pkladiesbl,pkladies, mitchell_state, pkladiesbl,ROT0, "bootleg", "Poker Ladies (Censored bootleg)", MACHINE_NOT_WORKING ) // by Playmark? need to figure out CPU 'decryption' / ordering
-GAME( 1989, dokaben, 0, pang, pang, mitchell_state, dokaben, ROT0, "Capcom", "Dokaben (Japan)", MACHINE_SUPPORTS_SAVE )
-GAME( 1989, pang, 0, pang, pang, mitchell_state, pang, ROT0, "Mitchell", "Pang (World)", MACHINE_SUPPORTS_SAVE )
-GAME( 1989, bbros, pang, pang, pang, mitchell_state, pang, ROT0, "Mitchell (Capcom license)", "Buster Bros. (USA)", MACHINE_SUPPORTS_SAVE )
-GAME( 1989, pompingw, pang, pang, pang, mitchell_state, pang, ROT0, "Mitchell", "Pomping World (Japan)", MACHINE_SUPPORTS_SAVE )
-GAME( 1989, pangb, pang, pang, pang, mitchell_state, pangb, ROT0, "bootleg", "Pang (bootleg, set 1)", MACHINE_SUPPORTS_SAVE )
-GAME( 1989, pangbold, pang, pang, pang, mitchell_state, pangb, ROT0, "bootleg", "Pang (bootleg, set 2)", MACHINE_SUPPORTS_SAVE )
-GAME( 1989, pangba, pang, spangbl, pang, mitchell_state, pangb, ROT0, "bootleg", "Pang (bootleg, set 3)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1989, pangb2, pang, pang, pang, mitchell_state, pangb, ROT0, "bootleg", "Pang (bootleg, set 4)", MACHINE_SUPPORTS_SAVE )
-GAME( 1989, cworld, 0, pang, qtono1, mitchell_state, cworld, ROT0, "Capcom", "Capcom World (Japan)", MACHINE_SUPPORTS_SAVE )
-GAME( 1990, hatena, 0, pang, qtono1, mitchell_state, hatena, ROT0, "Capcom", "Adventure Quiz 2 - Hatena? no Daibouken (Japan 900228)", MACHINE_SUPPORTS_SAVE )
-GAME( 1990, spang, 0, pangnv, pang, mitchell_state, spang, ROT0, "Mitchell", "Super Pang (World 900914)", MACHINE_SUPPORTS_SAVE )
-GAME( 1990, sbbros, spang, pangnv, pang, mitchell_state, sbbros, ROT0, "Mitchell (Capcom license)", "Super Buster Bros. (USA 901001)", MACHINE_SUPPORTS_SAVE )
-GAME( 1990, spangj, spang, pangnv, pang, mitchell_state, spangj, ROT0, "Mitchell", "Super Pang (Japan 901023)", MACHINE_SUPPORTS_SAVE )
-GAME( 1990, spangbl, spang, spangbl, spangbl, mitchell_state, spangbl, ROT0, "bootleg", "Super Pang (World 900914, bootleg)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE ) // different sound hardware
-GAME( 1994, mstworld, 0, mstworld, mstworld, mitchell_state, mstworld, ROT0, "bootleg (TCH)", "Monsters World (bootleg of Super Pang)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
-GAME( 1990, marukin, 0, marukin, marukin, mitchell_state, marukin, ROT0, "Yuga", "Super Marukin-Ban (Japan 901017)", MACHINE_SUPPORTS_SAVE )
-GAME( 1991, qtono1, 0, pang, qtono1, mitchell_state, qtono1, ROT0, "Capcom", "Quiz Tonosama no Yabou (Japan)", MACHINE_SUPPORTS_SAVE )
-GAME( 1991, qsangoku, 0, pang, qtono1, mitchell_state, qsangoku, ROT0, "Capcom", "Quiz Sangokushi (Japan)", MACHINE_SUPPORTS_SAVE )
-GAME( 1991, block, 0, pangnv, blockjoy, mitchell_state, block, ROT270, "Capcom", "Block Block (World 911219 Joystick)", MACHINE_SUPPORTS_SAVE )
-GAME( 1991, blockr1, block, pangnv, blockjoy, mitchell_state, block, ROT270, "Capcom", "Block Block (World 911106 Joystick)", MACHINE_SUPPORTS_SAVE )
-GAME( 1991, blockr2, block, pangnv, block, mitchell_state, block, ROT270, "Capcom", "Block Block (World 910910)", MACHINE_SUPPORTS_SAVE )
-GAME( 1991, blockj, block, pangnv, block, mitchell_state, block, ROT270, "Capcom", "Block Block (Japan 910910)", MACHINE_SUPPORTS_SAVE )
-GAME( 1991, blockbl, block, pangnv, block, mitchell_state, blockbl, ROT270, "bootleg", "Block Block (bootleg)", MACHINE_SUPPORTS_SAVE )
+GAME( 1988, mgakuen, 0, mgakuen, mgakuen, mitchell_state, mgakuen, ROT0, "Yuga", "Mahjong Gakuen", MACHINE_SUPPORTS_SAVE )
+GAME( 1988, 7toitsu, mgakuen, mgakuen, mgakuen, mitchell_state, mgakuen, ROT0, "Yuga", "Chi-Toitsu", MACHINE_SUPPORTS_SAVE )
+GAME( 1989, mgakuen2, 0, marukin, marukin, mitchell_state, mgakuen2, ROT0, "Face", "Mahjong Gakuen 2 Gakuen-chou no Fukushuu", MACHINE_SUPPORTS_SAVE )
+GAME( 1989, pkladies, 0, marukin, pkladies, mitchell_state, pkladies, ROT0, "Mitchell", "Poker Ladies", MACHINE_SUPPORTS_SAVE )
+GAME( 1989, pkladiesl, pkladies, marukin, pkladies, mitchell_state, pkladies, ROT0, "Leprechaun", "Poker Ladies (Leprechaun ver. 510)", MACHINE_SUPPORTS_SAVE )
+GAME( 1989, pkladiesla,pkladies, marukin, pkladies, mitchell_state, pkladies, ROT0, "Leprechaun", "Poker Ladies (Leprechaun ver. 401)", MACHINE_SUPPORTS_SAVE )
+GAME( 1989, pkladiesbl,pkladies, pkladiesbl,pkladies, mitchell_state,pkladiesbl,ROT0, "bootleg", "Poker Ladies (Censored bootleg)", MACHINE_NOT_WORKING ) // by Playmark? need to figure out CPU 'decryption' / ordering
+GAME( 1989, dokaben, 0, pang, pang, mitchell_state, dokaben, ROT0, "Capcom", "Dokaben (Japan)", MACHINE_SUPPORTS_SAVE )
+GAME( 1989, pang, 0, pang, pang, mitchell_state, pang, ROT0, "Mitchell", "Pang (World)", MACHINE_SUPPORTS_SAVE )
+GAME( 1989, bbros, pang, pang, pang, mitchell_state, pang, ROT0, "Mitchell (Capcom license)", "Buster Bros. (USA)", MACHINE_SUPPORTS_SAVE )
+GAME( 1989, pompingw, pang, pang, pang, mitchell_state, pang, ROT0, "Mitchell", "Pomping World (Japan)", MACHINE_SUPPORTS_SAVE )
+GAME( 1989, pangb, pang, pang, pang, mitchell_state, pangb, ROT0, "bootleg", "Pang (bootleg, set 1)", MACHINE_SUPPORTS_SAVE )
+GAME( 1989, pangbold, pang, pang, pang, mitchell_state, pangb, ROT0, "bootleg", "Pang (bootleg, set 2)", MACHINE_SUPPORTS_SAVE )
+GAME( 1989, pangba, pang, spangbl, pang, mitchell_state, pangb, ROT0, "bootleg", "Pang (bootleg, set 3)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1989, pangb2, pang, pang, pang, mitchell_state, pangb, ROT0, "bootleg", "Pang (bootleg, set 4)", MACHINE_SUPPORTS_SAVE )
+GAME( 1989, cworld, 0, pang, qtono1, mitchell_state, cworld, ROT0, "Capcom", "Capcom World (Japan)", MACHINE_SUPPORTS_SAVE )
+GAME( 1990, hatena, 0, pang, qtono1, mitchell_state, hatena, ROT0, "Capcom", "Adventure Quiz 2 - Hatena? no Daibouken (Japan 900228)", MACHINE_SUPPORTS_SAVE )
+GAME( 1990, spang, 0, pangnv, pang, mitchell_state, spang, ROT0, "Mitchell", "Super Pang (World 900914)", MACHINE_SUPPORTS_SAVE )
+GAME( 1990, sbbros, spang, pangnv, pang, mitchell_state, sbbros, ROT0, "Mitchell (Capcom license)", "Super Buster Bros. (USA 901001)", MACHINE_SUPPORTS_SAVE )
+GAME( 1990, spangj, spang, pangnv, pang, mitchell_state, spangj, ROT0, "Mitchell", "Super Pang (Japan 901023)", MACHINE_SUPPORTS_SAVE )
+GAME( 1990, spangbl, spang, spangbl, spangbl, mitchell_state, spangbl, ROT0, "bootleg", "Super Pang (World 900914, bootleg)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE ) // different sound hardware
+GAME( 1994, mstworld, 0, mstworld,mstworld, mitchell_state, mstworld, ROT0, "bootleg (TCH)", "Monsters World (bootleg of Super Pang)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
+GAME( 1990, marukin, 0, marukin, marukin, mitchell_state, marukin, ROT0, "Yuga", "Super Marukin-Ban (Japan 901017)", MACHINE_SUPPORTS_SAVE )
+GAME( 1991, qtono1, 0, pang, qtono1, mitchell_state, qtono1, ROT0, "Capcom", "Quiz Tonosama no Yabou (Japan)", MACHINE_SUPPORTS_SAVE )
+GAME( 1991, qsangoku, 0, pang, qtono1, mitchell_state, qsangoku, ROT0, "Capcom", "Quiz Sangokushi (Japan)", MACHINE_SUPPORTS_SAVE )
+GAME( 1991, block, 0, pangnv, block, mitchell_state, block, ROT270, "Capcom", "Block Block (World 910910)", MACHINE_SUPPORTS_SAVE )
+GAME( 1991, blockj, block, pangnv, block, mitchell_state, block, ROT270, "Capcom", "Block Block (Japan 910910)", MACHINE_SUPPORTS_SAVE )
+GAME( 1991, blockjoy, block, pangnv, blockjoy, mitchell_state, block, ROT270, "Capcom", "Block Block (World 911106 Joystick)", MACHINE_SUPPORTS_SAVE )
+GAME( 1991, blockbl, block, pangnv, block, mitchell_state, blockbl, ROT270, "bootleg", "Block Block (bootleg)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/mmodular.cpp b/src/mame/drivers/mmodular.cpp
index 09e83e6dcf6..aa1b5b6a236 100644
--- a/src/mame/drivers/mmodular.cpp
+++ b/src/mame/drivers/mmodular.cpp
@@ -15,6 +15,7 @@
Vancouver 68020 12Mhz
Genius 68030 V4.00 33.333 Mhz
Genius 68030 V4.01 33.333 Mhz
+ Genius 68030 V4.01 33.333x2 Mhz (custom MESS overclocked version for higher ELO)
Berlin Pro 68020 24.576 Mhz (not modular board, but otherwise close to milano)
Berlin Pro (London) 68020 24.576 Mhz (not modular board, but otherwise close to milano)
London 68030 V5.00k 33.333 Mhz (probably the Genius 3/4 update ROM)
@@ -997,12 +998,16 @@ TIMER_DEVICE_CALLBACK_MEMBER(polgar_state::timer_update_irq_academy)
MACHINE_START_MEMBER(polgar_state,van32)
{
// patch LCD delay loop on the 68030 machines until waitstates and/or opcode timings are fixed in MAME core
-// patches gen32 gen32_41 lond030
+// patches gen32 gen32_41 gen32_oc lond030
UINT8 *rom = memregion("maincpu")->base();
if(rom[0x870] == 0x0c && rom[0x871] == 0x78) {
- rom[0x870] = 0x38;
+ if (!strcmp(machine().system().name,"gen32_oc")) {
+ rom[0x870] = 0x6c;
+ } else {
+ rom[0x870] = 0x38;
+ }
}
}
@@ -1689,6 +1694,15 @@ static MACHINE_CONFIG_START( gen32, polgar_state )
MACHINE_CONFIG_END
+static MACHINE_CONFIG_DERIVED( gen32_oc, gen32 )
+ MCFG_CPU_MODIFY("maincpu")
+ MCFG_CPU_CLOCK( XTAL_33_333MHz * 2 )
+ MCFG_DEVICE_REMOVE("int_timer")
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("int_timer", polgar_state, timer_update_irq6, attotime::from_hz(500))
+
+
+MACHINE_CONFIG_END
+
static MACHINE_CONFIG_START( bpl32, polgar_state )
MCFG_CPU_ADD("maincpu", M68020, XTAL_24_576MHz)
MCFG_CPU_PROGRAM_MAP(bpl32_mem)
@@ -1837,6 +1851,11 @@ ROM_START( gen32_41 )
ROM_LOAD("gen32_41.bin", 0x00000, 0x40000,CRC(ea9938c0) SHA1(645cf0b5b831b48104ad6cec8d78c63dbb6a588c))
ROM_END
+ROM_START( gen32_oc )
+ ROM_REGION32_BE( 0x40000, "maincpu", 0 )
+ ROM_LOAD("gen32_41.bin", 0x00000, 0x40000,CRC(ea9938c0) SHA1(645cf0b5b831b48104ad6cec8d78c63dbb6a588c))
+ROM_END
+
ROM_START( berlinp )
ROM_REGION32_BE( 0x40000, "maincpu", 0 )
ROM_LOAD("berlinp.bin", 0x00000, 0x40000,CRC(82FBAF6E) SHA1(729B7CEF3DFAECC4594A6178FC4BA6015AFA6202))
@@ -1885,6 +1904,7 @@ DRIVER_INIT_MEMBER(polgar_state,polgar)
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( 1993, gen32_oc, van16, 0, gen32_oc, gen32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Genius030 V4.01OC", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK|MACHINE_UNOFFICIAL | 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 )
diff --git a/src/mame/drivers/model3.cpp b/src/mame/drivers/model3.cpp
index 8f640ac1b9f..aca17b6ecfc 100644
--- a/src/mame/drivers/model3.cpp
+++ b/src/mame/drivers/model3.cpp
@@ -92,11 +92,11 @@ Tilemap entry formats (16-bit wide):
are the palette select bits for 8bpp and PHI-T5 for 4bpp.
===================================================================================
-Guru-Readme
-Model 3 Hardware Overview
+
+Model 3 Hardware Overview.
Sega, 1996-1998
-This document covers all games running on the original Model 3 hardware with
+This document covers all games running on the original Model 3 hardware and is produced with
reference to a Scud Race PCB and Virtua Fighter 3TB PCB. ALL PCB numbers are identical.
Scud Race runs on the original Sega Model 3 hardware. It's the same PCB as Virtua Fighter 3, there
is no mention of 'Step 1.5' or even 'Step 1.0' on any of the PCBs and there is no 50MHz or
@@ -136,6 +136,8 @@ Virtua Striker 2
Virtua Striker 2 Version '98
+[There is an external MPEG PCB used on some games but it was not available for documenting]
+
COMM Board
----------
171-7053B
@@ -194,30 +196,6 @@ Notes:
if different, it's likely only for the games that use 64MBit MASKROMs.
ROMs - Not all sockets are populated. See MAME src for exact ROM usage.
-(For dumping reference)
-Jumpers centre pin joins
--------------------------------------------------------
-JP3: 2-3 pin2 of ic 1 to ic 16 and pin 39 of ic 17 to ic 20
-JP4: 2-3 pin2 of ic 1 to ic 16 and pin 39 of ic 17 to ic 20
-JP5: 2-3 pin2 of ic 1 to ic 16 and pin 39 of ic 17 to ic 20
-JP6: 2-3 pin2 of ic 1 to ic 16 and pin 39 of ic 17 to ic 20
-JP7: 2-3 pin2 of ic 22 to ic 25 and pin 39 ic ic21
-JP8: 2-3 pin32 of ic 22 to ic 25
-JP9: 2-3 pin32 of ic 22 to ic 25
-Jumper pos. 1 is +5V
-
-JP1: 1-2 gnd
-JP2: 2-3 +5v
-Jumper pos. 1 is GND
-Jumper pos. 3 is +5V
-
- pin1 joins
--------------------------------
-JP10: 1-2 pin32 of ic 26 to ic 41
-
-All CROM ROMs are 32M MASK
-ALL VROM ROMs are 16M MASK
-
CPU Board
---------
@@ -339,69 +317,12 @@ Notes:
Other than the revision of the listed chips, the PCBs are identical.
-External MPEG Audio Board
--------------------------
-This is the first version of the Model 3 Digital Audio Board used
-on Scud Race and is usually just mounted bare onto the outside of
-the main board metal box.
-
-837-10084 DIGITAL AUDIO BD SEGA 1993
-171-6614B PC BD
-Sticker: 837-12941
-|-------------------------------------------------|
-| CN3 CN4 CN1 R RCA-1 CN2 RCA-2 |
-| MB84256 PC910 4040 7805 TL062 TL062 D6376 |
-| D71051 SM5840|
-| EPROM.IC2 |------| |
-| Z80 16MHz |NEC | |
-| |D65654| |
-| |--------| |------| |
-| |SEGA | KM68257 |
-| |315-5762| KM68257 |
-| | | KM68257 MB84256 |
-| 20MHz|--------| |
-| |
-| MB3771 JP1 JP2 MROM.IC57|
-| 12.288MHz |
-| MROM.IC58|
-| |
-| MROM.IC59|
-| |
-|DSW(4) G G G G MROM.IC60|
-|-------------------------------------------------|
-Notes:
- Z80 - Clock 4.000MHz [16/4]
-EPROM.IC2 - 27C1001/27C010 EPROM (DIP32)
- - Scud Race : EPR-19612.IC2
- MROM* - 8M/16M Mask ROM (DIP42)
- - Scud Race : MPR-19603/04/05/06
- MB84256 - Fujitsu MB84256 32kx8 SRAM (DIP28)
- KM68257 - Samsung KM68257 32kx8 SRAM (DIP28). On this PCB pin 1 (A14) is grounded with a jumper wire on all 3 chips making it 16k
- PC910 - Sharp PC910 Optocoupler (DIP8)
- 4040 - 74HC4040 logic chip
- 7805 - 12V to 5V Voltage Regulator
- MB3771 - Fujitsu MB3771 Master Reset IC (DIP8)
- TL062 - Texas Instruments TL062 Low Power JFET-Input Operational Amplifier (DIP8)
- D71051 - NEC uPD71051 Serial Control Unit USART, functionally equivalent to uPD8251 (SOP28)
- D65654 - NEC uPD65654 CMOS Gate Array (QFP100)
- SM5840 - Nippon Precision Circuits SM5840 Digital Audio Multi-Function Digital Filter (DIP18)
- D6376 - NEC uPD6376GS Audio 2-Channel 16-bit D/A converter (DIP16)
- 315-5762 - Sega custom chip, probably a NEC or Texas Instruments DSP or MCU, clock input 20MHz (PLCC68)
- R - Red LED
- G - Green LED
- DSW - 4 position DIP switch, all OFF
- JP1 - 1-2 (Select 16M ROM on bank 1 - IC57 & IC58). alt is select 8M
- JP2 - 1-2 (Select 16M ROM on bank 2 - IC59 & IC60). alt is select 8M
- CN1 - 10-pin power input connector
- CN2 - 5-pin connector for Left+/Left-/Right+/Right- Stereo Audio Output
- CN3 - 6-pin connector for MIDI TX+/TX-/RX+/RX- communication
- CN4 - 4-pin connector (not used)
- RCA* - Left/Right RCA Audio Output Jacks (not used)
-
-
-Sega Model 3 Step2 hardware
----------------------------
-This covers most, if not all of the later MODEL 3 games on Step 2 & 2.1 hardware.
+
+Harley Davidson (Rev.A)
+Sega, 1997
+
+This game runs on Sega Model3 Step2 hardware.
+
ROM Board
---------
@@ -431,8 +352,6 @@ ROM Board
| |
|---------------------------------------------------------------------------------------------------|
-Notes: (ROMs documented are for Harley Davidson)
-
VROM00.27 mpr-20378 \
VROM01.26 mpr-20377 |
VROM02.29 mpr-20380 |
@@ -572,7 +491,7 @@ CPU Board
| CN25 |
| RTC72423 (Connector for ) |
| KM4132G271AQ-10 (Protection PCB) |
-| |
+| ( not used ) |
| 32MHz BATT_3V |
| NEC D71051-10 |
| |
@@ -654,68 +573,76 @@ Security Board
315-6050 Lattice ispLSI 2032
315-5881 TQFP100 stamped 317-0247-COM for Spikeout FE
-
-External MPEG Audio Board
--------------------------
-This is the second version of the Model 3 Digital Audio Board used on
-Sega Rally 2, Daytona USA 2 and others and is mounted inside a metal box.
-
-837-12273 DIGITAL SOUND BD 2 SEGA 1995
-171-7165D PC BD
-Sticker: 837-12273-92
-Sticker: 837-13376
-|-------------------------------------------------|
-| CN1 CN2 R CN5 CN6 LMC6484 CN7 |
-|315-5932 D71051 PQ30RV21 7805 D63210 D63210 |
-|PC910 R 12.288MHz |
-| JP8 |
-|68EC000 315-6028A |
-| 33MHz |
-|KM62256 * |
-|KM62256 MCM6206 |
-| MCM6206 JP4/5/6/7 |
-| JP1/2/3 315-5934|
-|3771 JP10 |
-| JP9 |
-| EPROM.IC2 |
-| RGRG MROM.IC18 MROM.IC20 MROM.IC22 MROM.IC24 |
-|DSW(4) MROM.IC19 MROM.IC21 MROM.IC23 MROM.IC25|
-|-------------------------------------------------|
-Notes:
- 68000 - Motorola 68EC000FN12 CPU, clock 11.000MHz [33/3] (PLCC68)
-EPROM.IC2 - 27C1024 EPROM (DIP40)
- - Sega Rally 2 : EPR-20641.IC2
- - Daytona 2 : EPR-20886.IC2
- MROM* - Mask ROM (DIP42)
- - Sega Rally 2 : MPR-20637/38/39/40
- - Daytona 2 : MPR-20887/88/89/90
- KM62256 - Samsung KM62256 32kx8 SRAM (SOP28)
- MCM6206 - Motorola MCM6206 32kx8 SRAM (SOP28)
- PC910 - Sharp PC910 Optocoupler (DIP8)
- 7805 - 12V to 5V Voltage Regulator
- PQ30RV21 - Sharp PQ30RV21 3.3V Voltage Regulator
- MB3771 - Fujitsu MB3771 Master Reset IC (SOIC8)
- 315-5934 - GAL16V8 (PLCC20)
- 315-5932 - GAL16V8 (PLCC20)
- LMC6484 - Texas Instruments LMC6484IM CMOS Quad Rail-to-Rail Input and Output Operational Amplifier (SOIC14)
- D71051 - NEC uPD71051 Serial Control Unit USART, functionally equivalent to uPD8251 (SOP28)
- D63210 - NEC uPD63210 16-bit D/A Converter with built-in Digital Filter for Audio (SOP28)
-315-6028A - Sega custom chip, probably a NEC DSP, clock input 12.228MHz (QFP100)
- * - Unpopulated position on bottom side of PCB for a NEC uPD77016 DSP. The Sega chip above may be similar to this
- R - Red LED
- G - Green LED
- DSW - 4 position DIP switch, all OFF
- JP1/2/3 - Jumpers to configure ROMs
-JP4/5/6/7 - Jumpers to configure ROMs
- JP8 - Jumper tied to pin 26 (IPL1) of MC68EC000
- JP9/10 - Jumpers to configure ROMs, tied to GAL16V8 315-5934
- CN1 - 6-pin connector for MIDI TX+/TX-/RX+/RX- communication
- CN2 - 4-pin connector (not used)
- CN5 - 10-pin power input connector
- CN6 - 5-pin connector for Left+/Left-/Right+/Right- Stereo Audio Output
- CN7 - 5-pin connector (not used)
===================================================================================
+Scud Race
+Sega, 1996
+
+Tis game runs on Sega Model 3 Step 1.5 hardware
+
+
+Sound Board (bolted to outside of the metal box)
+-----------
+
+PCB Layout
+----------
+
+PCB Number: 837-10084 DIGITAL AUDIO BD (C) SEGA 1993
+---------------------------------------------------------------
+84256 D71051GU-10 D6376 SM5840
+epr-19612
+Z80 16MHz SEGA D65654GF102
+ 315-5762 (QFP100)
+ (PLCC68)
+ 20MHz KM68257
+ KM68257 84256
+ KM68257
+ 12.288MHz mpr-19603
+ mpr-19604
+ mpr-19605
+DSW1 mpr-19606
+----------------------------------------------------------------
+
+
+Jumpers
+JP1: 1-2 (Select 16M ROM on bank 1 - ic57 & ic58)
+JP2: 1-2 (Select 16M ROM on bank 2 - ic59 & ic60)
+
+
+
+ROM Board
+---------
+
+PCB Number: 837-11860 MODEL3 ROM BOARD (C) SEGA 1995
+
+(For dumping reference)
+
+Jumpers centre pin joins
+-------------------------------------------------------
+JP3: 2-3 pin2 of ic 1 to 16 and pin 39 of ic 17 to 20
+JP4: 2-3 pin2 of ic 1 to 16 and pin 39 of ic 17 to 20
+JP5: 2-3 pin2 of ic 1 to 16 and pin 39 of ic 17 to 20
+JP6: 2-3 pin2 of ic 1 to 16 and pin 39 of ic 17 to 20
+JP7: 2-3 pin2 of ic 22 to 25 and pin 39 ic ic21
+JP8: 2-3 pin32 of ic 22 to 25
+JP9: 2-3 pin32 of ic 22 to 25
+Jumper pos. 1 is +5V
+
+JP1: 1-2 gnd
+JP2: 2-3 +5v
+Jumper pos. 1 is GND
+Jumper pos. 3 is +5V
+
+ pin1 joins
+-------------------------------
+JP10: 1-2 pin32 of ic 26 to 41
+
+All CROM ROMs are 32M MASK
+ALL VROM ROMs are 16M MASK
+
+*/
+
+/*
magtruck locations of interest
000006ee (word) - incremented each vblank, used by mainline to busywait.
diff --git a/src/mame/drivers/mpz80.cpp b/src/mame/drivers/mpz80.cpp
index e5e05a051a4..0c42707b541 100644
--- a/src/mame/drivers/mpz80.cpp
+++ b/src/mame/drivers/mpz80.cpp
@@ -716,7 +716,7 @@ static MACHINE_CONFIG_START( mpz80, mpz80_state )
MCFG_S100_BUS_ADD()
MCFG_S100_IRQ_CALLBACK(WRITELINE(mpz80_state, s100_pint_w))
MCFG_S100_NMI_CALLBACK(WRITELINE(mpz80_state, s100_nmi_w))
- MCFG_S100_RDY_CALLBACK(INPUTLINE(Z80_TAG, Z80_INPUT_LINE_BOGUSWAIT))
+ MCFG_S100_RDY_CALLBACK(INPUTLINE(Z80_TAG, Z80_INPUT_LINE_WAIT))
MCFG_S100_SLOT_ADD("s100_1", mpz80_s100_cards, "mm65k16s")
MCFG_S100_SLOT_ADD("s100_2", mpz80_s100_cards, "wunderbus")
MCFG_S100_SLOT_ADD("s100_3", mpz80_s100_cards, "dj2db")
diff --git a/src/mame/drivers/mrgame.cpp b/src/mame/drivers/mrgame.cpp
index bcb1e89957a..beb0a9e0bca 100644
--- a/src/mame/drivers/mrgame.cpp
+++ b/src/mame/drivers/mrgame.cpp
@@ -492,7 +492,7 @@ static MACHINE_CONFIG_START( mrgame, mrgame_state )
MCFG_DAC_ADD("dacr")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50)
MCFG_SOUND_ADD("tms", TMS5220, 672000) // uses a RC combination. 672k copied from jedi.h
- MCFG_TMS52XX_READYQ_HANDLER(INPUTLINE("audiocpu2", Z80_INPUT_LINE_BOGUSWAIT))
+ MCFG_TMS52XX_READYQ_HANDLER(INPUTLINE("audiocpu2", Z80_INPUT_LINE_WAIT))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
diff --git a/src/mame/drivers/namcops2.cpp b/src/mame/drivers/namcops2.cpp
index d53c83c3085..a0eec46f766 100644
--- a/src/mame/drivers/namcops2.cpp
+++ b/src/mame/drivers/namcops2.cpp
@@ -1461,18 +1461,6 @@ ROM_START( wanganmd )
DISK_IMAGE_READONLY( "wmn1-a", 0, SHA1(4254e987e71d0d4038a87f11dc1a304396b3dffc) )
ROM_END
-ROM_START( wanganmr )
- ROM_REGION(0x200000, "bios", 0)
- SYSTEM246_BIOS
-
- ROM_REGION(0x840000, "key", ROMREGION_ERASE00)
- ROM_LOAD( "wmr1vera.ic002", 0x000000, 0x800000, CRC(b431936b) SHA1(e2c543936cb5689a432662a69d0042c6179a3728) )
- ROM_LOAD( "wmr1vera_spr.ic002", 0x800000, 0x040000, CRC(b8b7539c) SHA1(f415bdc8e3ebf3b0c3d0d7607b894440e89b0fe7) )
-
- DISK_REGION("dvd") // actually single-track CD-ROM
- DISK_IMAGE_READONLY( "wmr1-a", 0, SHA1(02feab4380dcc2dd95c85b209192f858bafc721e) )
-ROM_END
-
ROM_START( vnight )
ROM_REGION(0x200000, "bios", 0)
SYSTEM246_BIOS
@@ -1597,7 +1585,6 @@ GAME(2002, tekken4, sys246, system246, system246, driver_device, 0, ROT0, "Na
GAME(2002, tekken4a, tekken4, system246, system246, driver_device, 0, ROT0, "Namco", "Tekken 4 (TEF2 Ver. A)", MACHINE_IS_SKELETON)
GAME(2002, tekken4b, tekken4, system246, system246, driver_device, 0, ROT0, "Namco", "Tekken 4 (TEF1 Ver. A)", MACHINE_IS_SKELETON)
GAME(2002, tekken4c, tekken4, system246, system246, driver_device, 0, ROT0, "Namco", "Tekken 4 (TEF1 Ver. C)", MACHINE_IS_SKELETON)
-GAME(2002, wanganmr, sys246, system246, system246, driver_device, 0, ROT0, "Namco", "Wangan Midnight R (WMR1 Ver. A)", MACHINE_IS_SKELETON)
GAME(2003, prdgp03, sys246, system246, system246, driver_device, 0, ROT0, "Namco", "Pride GP 2003 (PR21 Ver. A)", MACHINE_IS_SKELETON)
GAME(2003, timecrs3, sys246, system246, system246, driver_device, 0, ROT0, "Namco", "Time Crisis 3 (TST1)", MACHINE_IS_SKELETON)
GAME(2003, timecrs3e,timecrs3, system246, system246, driver_device, 0, ROT0, "Namco", "Time Crisis 3 (TST2 Ver. A)", MACHINE_IS_SKELETON)
diff --git a/src/mame/drivers/naomi.cpp b/src/mame/drivers/naomi.cpp
index 96dc89ca2c4..de906fba250 100644
--- a/src/mame/drivers/naomi.cpp
+++ b/src/mame/drivers/naomi.cpp
@@ -377,7 +377,7 @@ Airline Pilots (Rev A) 840-0005C 21739A 11 (64Mb)
Cosmic Smash 840-0044C 23428 8 (64Mb) ? 315-6213 317-0289-COM joystick + 2 buttons
Cosmic Smash (Rev A) 840-0044C 23428A 8 (64Mb) ? 315-6213 317-0289-COM joystick + 2 buttons
Crazy Taxi 840-0002C 21684 13 (64Mb)* present 315-6213 317-0248-COM * ic8 and ic9 are not present
-Dead Or Alive 2 (Rev A) 841-0003C 22121A 21 (64Mb) present 315-6213 317-5048-COM joystick + 3 buttons
+Dead Or Alive 2 841-0003C 22121 21 (64Mb) present 315-6213 317-5048-COM joystick + 3 buttons
Dead Or Alive 2 Millennium 841-0003C DOA2 M 21 (64Mb) present 315-6213 317-5048-COM joystick + 3 buttons
Death Crimson OX 841-0016C 23524 10 (64Mb) present 315-6213 317-5066-COM
Dengen Tenshi Taisen Janshi Shangri-La 841-0004C 22060 12 (64Mb) ? 315-6213 317-5050-JPN
@@ -1862,9 +1862,7 @@ READ64_MEMBER(naomi_state::aw_modem_r )
{
/*
0x00600280 r 0000dcba
- a/b - 1P/2P coin inputs (JAMMA), active low
- c/d - 3P/4P coin inputs (EX. IO board), active low
-
+ a/b/c/d - coin inputs 1-4, active low
(ab == 0) -> BIOS skip RAM test
*/
return U64(0xffffffff00000000) | (ioport("COINS")->read() & 0x0F);
@@ -1898,8 +1896,8 @@ WRITE64_MEMBER(naomi_state::aw_modem_w )
TODO: hook this then MAME have such devices emulated
0x00600288 rw 0000dcba
- a - 1P coin counter
- b - 2P coin counter
+ a - 1P coin couner
+ b - 2P coin couner
c - 1P coin lockout
d - 2P coin lockout
@@ -2967,20 +2965,9 @@ Probably at some stage of development NAOMI was planned as non-JVS system as wel
ROM_SYSTEM_BIOS( 20, "bios20", "Naomi Dev BIOS" ) \
ROM_LOAD16_WORD_SWAP_BIOS( 20, "dcnaodev.bios", 0x000000, 0x080000, CRC(7a50fab9) SHA1(ef79f448e0bf735d1264ad4f051d24178822110f) ) \
ROM_SYSTEM_BIOS( 21, "bios21", "Naomi Dev BIOS v1.10" ) \
- ROM_LOAD16_WORD_SWAP_BIOS( 21, "develop110.ic27", 0x000000, 0x200000, CRC(de7cfdb0) SHA1(da16800edc4d49f70481c124d487f544c2fa8ce7) ) \
- ROM_SYSTEM_BIOS( 22, "bios22", "Naomi Unknown Dev board" ) \
- ROM_LOAD16_WORD_SWAP_BIOS( 22, "zukinver0930.ipl", 0x000000, 0x200000, CRC(58e17c23) SHA1(19330f906accf1b859f56bbcedc2edff73747599) )
+ ROM_LOAD16_WORD_SWAP_BIOS( 21, "develop110.ic27", 0x000000, 0x200000, CRC(de7cfdb0) SHA1(da16800edc4d49f70481c124d487f544c2fa8ce7) )
/* dcnaodev.bios comes from a dev / beta board. The eprom was a 27C4096 */
-/*
- zukinver0930.ipl comes from 837-13502-01 / 837-13663 PCB which contains:
- 22 empty sockets ROM0 - ROM21
- 315-6187 Altera EPM7064LC68-10
- PC16550DV UART
- Fujitsu MB???? SCSI controller
- IPL BOOT ROM with printed label "Zukin Ver.0930 / 99/5/24 / SUM:DB9C"
-*/
-
// bios for House of the Dead 2
#define HOTD2_BIOS \
ROM_REGION( 0x200000, "maincpu", 0) \
@@ -3424,7 +3411,7 @@ ROM_START( doa2 )
NAOMI_DEFAULT_EEPROM_NO_BD
ROM_REGION( 0xb000000, "rom_board", ROMREGION_ERASEFF)
- ROM_LOAD("epr-22121a.ic22", 0x0000000, 0x0400000, CRC(30f93b5e) SHA1(0e33383e7ab9a721dab4708b063598f2e9c9f2e7) ) // partially encrypted
+ ROM_LOAD("epr-22121.ic22", 0x0000000, 0x0400000, CRC(30f93b5e) SHA1(0e33383e7ab9a721dab4708b063598f2e9c9f2e7) ) // partially encrypted
ROM_LOAD("mpr-22100.ic1", 0x0800000, 0x0800000, CRC(92a53e5e) SHA1(87fcdeee9c4e65a3eb6eb345eed85d4f2df26c3c) )
ROM_LOAD("mpr-22101.ic2", 0x1000000, 0x0800000, CRC(14cd7dce) SHA1(5df14a5dad14bc922b4f88881dc2e9c8e74d6170) )
@@ -7976,26 +7963,6 @@ ROM_START( puyofev )
ROM_LOAD("317-0375-com.pic", 0x00, 0x4000, CRC(52b56b52) SHA1(221590efbb09824621714cb163bda51a921d7d54) )
ROM_END
-/*
- note:
- both Dragon Treasure game binaries have only first 16MB encrypted using DES key from security PIC provided with GD-ROMs.
- the rest of data encrypted using some other key, same in both game versions.
- presumably this data uploaded via network to satellite units and decrypted using DES key from their own security PICs.
-*/
-
-// requires 837-14381 "G2 EXPANSION BD" I/O board
-ROM_START( dragntr2 )
- NAOMIGD_BIOS
- NAOMI_DEFAULT_EEPROM
-
- DISK_REGION( "gdrom" )
- DISK_IMAGE_READONLY( "gds-0037a", 0, SHA1(ce65fe84cabaa1ac3f40bff9535a42c2055b5f1c) )
-
- ROM_REGION( 0x4000, "pic", ROMREGION_ERASEFF)
- //PIC is missing
- ROM_LOAD("317-xxxx-xxx.pic", 0x00, 0x4000, NO_DUMP )
-ROM_END
-
// requires 837-14381 "G2 EXPANSION BD" I/O board
ROM_START( dragntr3 )
NAOMIGD_BIOS
@@ -9041,9 +9008,6 @@ ROM_START( ngbc )
ROM_LOAD( "ax3301f01.bin", 0, 4, CRC(9afe949b) SHA1(4f7b039f3287da61a53a2d012993bfb57e1459bd) )
ROM_END
-// note: it looks there no regional differences in KOF NW EN and JP cartridge dumps, possible JP is just newer revision
-
-// Build: Jul 2004
ROM_START( kofnw )
AW_BIOS
@@ -9060,7 +9024,6 @@ ROM_START( kofnw )
ROM_LOAD( "ax2201f01.bin", 0, 4, CRC(b1fff0c8) SHA1(d83177e3672378a2bbc08653b4b73704333ca30a) )
ROM_END
-// Build: Sep 2004
ROM_START( kofnwj )
AW_BIOS
@@ -9179,7 +9142,6 @@ ROM_START( ftspeed )
ROM_LOAD( "ax1701f01.bin", 0, 4, CRC(f3f03c35) SHA1(2a8329a29cdcc0219e9360cc573c0f3ad44d0175) )
ROM_END
-// contents of cartridges labeled as JP and EN is the same
ROM_START( kofxi )
AW_BIOS
@@ -9494,8 +9456,8 @@ GAME( 2003, puyofevp, naomi, naomim1, naomi, naomi_state, naomi, ROT0, "Sega", "
/* 841-xxxxx ("Licensed by Sega" Naomi cart games)*/
/* 0001 */ GAME( 1999, pstone, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Capcom", "Power Stone (JPN, USA, EUR, ASI, AUS)", GAME_FLAGS )
/* 0002 */ GAME( 1999, suchie3, naomi, naomim2, suchie3, naomi_state,naomi_mp,ROT0, "Jaleco", "Idol Janshi Suchie-Pai 3 (JPN)", GAME_FLAGS )
-/* 0003 */ GAME( 1999, doa2, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Tecmo", "Dead or Alive 2 (Rev A)", GAME_FLAGS )
-/* 0003 */ GAME( 2000, doa2m, doa2, naomim2, naomi, naomi_state, naomi, ROT0, "Tecmo", "Dead or Alive 2 Millennium", GAME_FLAGS )
+/* 0003 */ GAME( 1999, doa2, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Tecmo", "Dead or Alive 2 (JPN, USA, EXP, KOR, AUS)", GAME_FLAGS )
+/* 0003 */ GAME( 2000, doa2m, doa2, naomim2, naomi, naomi_state, naomi, ROT0, "Tecmo", "Dead or Alive 2 Millennium (JPN, USA, EXP, KOR, AUS)", GAME_FLAGS )
/* 0004 */ GAME( 1999, shangril, naomi, naomim2, naomi_mp,naomi_state,naomi_mp,ROT0, "Marvelous Ent.", "Dengen Tenshi Taisen Janshi Shangri-la (JPN, USA, EXP, KOR, AUS)", GAME_FLAGS )
/* 0005 */ GAME( 1999, spawn, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Todd Mc Farlane / Capcom","Spawn In the Demon's Hand (JPN, USA, EUR, ASI, AUS) (Rev B)", GAME_FLAGS )
/* 0006 */ GAME( 1999, puyoda, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Compile", "Puyo Puyo Da!", GAME_FLAGS )
@@ -9604,7 +9566,7 @@ GAME( 2003, puyofevp, naomi, naomim1, naomi, naomi_state, naomi, ROT0, "Sega", "
// 0036E Virtua Fighter 4 Final Tuned (GDS-0036E)
/* 0036F */ GAME( 2004, vf4tuned, naomi2, naomi2gd, naomi, naomi_state, naomi2, ROT0, "Sega", "Virtua Fighter 4 Final Tuned (Rev F) (GDS-0036F)", GAME_FLAGS )
// 0037 Dragon Treasure 2 (GDS-0037)
-/* 0037A */ GAME( 2004, dragntr2, naomigd, naomigd, naomi, naomi_state, naomigd, ROT0, "Sega", "Dragon Treasure 2 (Rev A) (GDS-0037A)", GAME_FLAGS )
+// 0037A Dragon Treasure 2 (Rev A) (GDS-0037A)
// 0038
// 0039 Initial D Arcade Stage Ver. 3 Cycraft Edition (GDS-0039)
/* 0039A */ GAME( 2006, inidv3ca, inidv3cy,naomigd, naomi, naomi_state, naomi2, ROT0, "Sega", "Initial D Arcade Stage Ver. 3 Cycraft Edition (Rev A) (GDS-0039A)", GAME_FLAGS )
diff --git a/src/mame/drivers/nibble.cpp b/src/mame/drivers/nibble.cpp
deleted file mode 100644
index f89a14f0f38..00000000000
--- a/src/mame/drivers/nibble.cpp
+++ /dev/null
@@ -1,362 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Roberto Fresca
-/*************************************************************************
-
- Lucky 9, Nibble.
-
- Driver by Roberto Fresca.
-
- Seems some sort of gambling game with playing cards (no poker)
- and girls graphics...
-
-
-**************************************************************************
-
- Specs:
-
- 1x UM6845 (U67).
- 1x AY38910A/p (U75).
-
- 3x HY6264P-12 (U153, U154, U25).
- 2x IMSG171P-50G (U32, U104).
-
- 2 Chips with no markings!
-
- 8x 64K Graphics ROMs (U139, U141, U149, U147, U137, U143, U145, U152).
- 1x 64K Program ROM (U123).
- 1x 128K unknown ROM (U138).
-
- 1x TI LF347N (U158) Operational Amplifier.
- 1x LM380N (U82) 2.5W Audio Power Amplifier.
-
- 2x XTAL - 11.98135 KDS9C
- 2x 8 DIP switches banks.
- 1x 3.6V lithium battery.
- 1x Reset push button.
-
-
-**************************************************************************
-
- Tech notes...
-
- About the unknown ICs:
- DIP64 (U101) CPU with Xtal tied to pins 30 % 31. --> TMS9900? (ROM 9)
- DIP40 (U64) CPU or sound IC driving 128k (ROM 10) data? (pin 20 tied to GND)
-
-
-*************************************************************************/
-
-
-#define MASTER_CLOCK XTAL_12MHz
-
-#include "emu.h"
-#include "cpu/tms9900/tms9980a.h"
-//#include "cpu/tms9900/tms9900.h"
-#include "sound/ay8910.h"
-#include "video/mc6845.h"
-
-
-class nibble_state : public driver_device
-{
-public:
- nibble_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_videoram(*this, "videoram"),
- m_maincpu(*this, "maincpu"),
- m_gfxdecode(*this, "gfxdecode") { }
-
- required_shared_ptr<UINT8> m_videoram;
- tilemap_t *m_bg_tilemap;
- DECLARE_WRITE8_MEMBER(nibble_videoram_w);
- TILE_GET_INFO_MEMBER(get_bg_tile_info);
-
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
- DECLARE_PALETTE_INIT(nibble);
- UINT32 screen_update_nibble(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- INTERRUPT_GEN_MEMBER(nibble_interrupt);
- required_device<cpu_device> m_maincpu;
- required_device<gfxdecode_device> m_gfxdecode;
-};
-
-
-/*************************
-* Video Hardware *
-*************************/
-
-WRITE8_MEMBER(nibble_state::nibble_videoram_w)
-{
- m_videoram[offset] = data;
- m_bg_tilemap->mark_tile_dirty(offset);
-}
-
-
-TILE_GET_INFO_MEMBER(nibble_state::get_bg_tile_info)
-{
-/* - bits -
- 7654 3210
- ---- ---- bank select.
- ---- ---- color code.
- ---- ---- seems unused.
-*/
- int code = m_videoram[tile_index];
-
- SET_TILE_INFO_MEMBER(0 /* bank */, code, 0 /* color */, 0);
-}
-
-void nibble_state::video_start()
-{
- m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(nibble_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
-}
-
-UINT32 nibble_state::screen_update_nibble(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
-{
- m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
- return 0;
-}
-
-PALETTE_INIT_MEMBER(nibble_state, nibble)
-{
-}
-
-
-/**************************
-* Read / Write Handlers *
-**************************/
-
-INTERRUPT_GEN_MEMBER(nibble_state::nibble_interrupt)
-{
-}
-
-
-/************************
-* Start & Reset *
-************************/
-
-void nibble_state::machine_start()
-{
-}
-
-void nibble_state::machine_reset()
-{
-}
-
-
-/*************************
-* Memory Map Information *
-*************************/
-
-static ADDRESS_MAP_START( nibble_map, AS_PROGRAM, 8, nibble_state )
-// ADDRESS_MAP_GLOBAL_MASK(0x3fff)
- AM_RANGE(0x0000, 0xbfff) AM_ROM
- AM_RANGE(0xc000, 0xc3ff) AM_WRITE(nibble_videoram_w) AM_SHARE("videoram") // placeholder
-// AM_RANGE(0xff00, 0xff01) AM_DEVWRITE("crtc", mc6845_device, address_w)
-// AM_RANGE(0xff02, 0xff03) AM_DEVREADWRITE("crtc", mc6845_device, register_r, register_w)
-ADDRESS_MAP_END
-
-
-static ADDRESS_MAP_START( nibble_cru_map, AS_IO, 8, nibble_state )
-ADDRESS_MAP_END
-
-
-/*************************
-* Input Ports *
-*************************/
-
-static INPUT_PORTS_START( nibble )
- PORT_START("IN0")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_1) PORT_NAME("IN0-1")
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_2) PORT_NAME("IN0-2")
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_3) PORT_NAME("IN0-3")
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_4) PORT_NAME("IN0-4")
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_5) PORT_NAME("IN0-5")
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_6) PORT_NAME("IN0-6")
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_7) PORT_NAME("IN0-7")
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_8) PORT_NAME("IN0-8")
-
- PORT_START("IN1")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Q) PORT_NAME("IN1-1")
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_W) PORT_NAME("IN1-2")
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_E) PORT_NAME("IN1-3")
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_R) PORT_NAME("IN1-4")
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_T) PORT_NAME("IN1-5")
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Y) PORT_NAME("IN1-6")
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_U) PORT_NAME("IN1-7")
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_I) PORT_NAME("IN1-8")
-
- PORT_START("IN2")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_A) PORT_NAME("IN2-1")
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_S) PORT_NAME("IN2-2")
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_D) PORT_NAME("IN2-3")
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_F) PORT_NAME("IN2-4")
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_G) PORT_NAME("IN2-5")
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_H) PORT_NAME("IN2-6")
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_J) PORT_NAME("IN2-7")
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_K) PORT_NAME("IN2-8")
-
- PORT_START("IN3")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Z) PORT_NAME("IN3-1")
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_X) PORT_NAME("IN3-2")
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_C) PORT_NAME("IN3-3")
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_V) PORT_NAME("IN3-4")
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_B) PORT_NAME("IN3-5")
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_N) PORT_NAME("IN3-6")
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_M) PORT_NAME("IN3-7")
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_L) PORT_NAME("IN3-8")
-
- PORT_START("IN4")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("IN4-1")
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("IN4-2")
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("IN4-3")
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("IN4-4")
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("IN4-5")
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("IN4-6")
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("IN4-7")
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("IN4-8")
-
- PORT_START("DSW1")
- PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
-
- PORT_START("DSW2")
- PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
-
-INPUT_PORTS_END
-
-
-/*************************
-* Graphics Layouts *
-*************************/
-
-static const gfx_layout charlayout =
-{
- 8,8,
- RGN_FRAC(1,8),
- 8,
- { RGN_FRAC(0,8), RGN_FRAC(1,8), RGN_FRAC(2,8), RGN_FRAC(3,8), RGN_FRAC(4,8), RGN_FRAC(5,8), RGN_FRAC(6,8), RGN_FRAC(7,8) },
- { 0, 1, 2, 3, 4, 5, 6, 7 },
- { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
- 8*8
-};
-
-
-/******************************
-* Graphics Decode Information *
-******************************/
-
-static GFXDECODE_START( nibble )
- GFXDECODE_ENTRY( "gfx", 0, charlayout, 0, 16 )
-GFXDECODE_END
-
-
-/*************************
-* Machine Drivers *
-*************************/
-
-static MACHINE_CONFIG_START( nibble, nibble_state )
-
- // CPU should be switched to TMS9900
- MCFG_TMS99xx_ADD("maincpu", TMS9980A, MASTER_CLOCK/4, nibble_map, nibble_cru_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", nibble_state, nibble_interrupt)
-
- /* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(nibble_state, screen_update_nibble)
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", nibble)
-
- MCFG_PALETTE_ADD("palette", 256)
- MCFG_PALETTE_INIT_OWNER(nibble_state, nibble)
-
- MCFG_MC6845_ADD("crtc", MC6845, "screen", MASTER_CLOCK/8) /* guess */
- MCFG_MC6845_SHOW_BORDER_AREA(false)
- MCFG_MC6845_CHAR_WIDTH(8)
-
-MACHINE_CONFIG_END
-
-
-/*************************
-* Rom Load *
-*************************/
-
-ROM_START( l9nibble )
- ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "09.U123", 0x00000, 0x10000, CRC(dfef685d) SHA1(0aeb4257e408e8549df629a0cdb5f2b6790e32de) ) // tms9900 code?
-
- ROM_REGION( 0x80000, "gfx", 0 )
- ROM_LOAD( "01.u139", 0x00000, 0x10000, CRC(aba06e58) SHA1(5841beec122613eed2ba9f48cb1d51bfa0ff450c) )
- ROM_LOAD( "02.u141", 0x10000, 0x10000, CRC(a1e5d6d1) SHA1(8ec85b0544dd75bcb13600bae503ad2b20978281) )
- ROM_LOAD( "03.u149", 0x20000, 0x10000, CRC(ae66f77c) SHA1(6c9e98cc00b72252cb238f14686c0faef47134df) )
- ROM_LOAD( "04.u147", 0x30000, 0x10000, CRC(f1864094) SHA1(b439f9e8c2cc4575f9edbda45b9e724257015a73) )
- ROM_LOAD( "05.u137", 0x40000, 0x10000, CRC(2e8ae9de) SHA1(5f2831f71b351e34df82af37041c9aa815eb372c) )
- ROM_LOAD( "06.u143", 0x50000, 0x10000, CRC(8a56f324) SHA1(68790a12ca57c999bd7b7f26adc206aab3c06976) )
- ROM_LOAD( "07.u145", 0x60000, 0x10000, CRC(4f757912) SHA1(63e5fc2672552463060680b7a5a94df45f3d4b68) )
- ROM_LOAD( "08.u152", 0x70000, 0x10000, CRC(4f878ee4) SHA1(215f3ead0c358cc09c21515981cbb0a1e58c2ca6) )
-
- ROM_REGION( 0x20000, "user", 0 )
- ROM_LOAD( "10.u138", 0x00000, 0x20000, CRC(ed831d2a) SHA1(ce5c3b24979d220215d7f0e8d50f45550aec15bd) ) // unknown data...
-
- ROM_REGION( 0x0400, "plds", 0 )
- ROM_LOAD( "pal16l8acn.u23", 0x0000, 0x0104, NO_DUMP )
- ROM_LOAD( "pal16l8acn.uxx", 0x0200, 0x0104, NO_DUMP )
-
-ROM_END
-
-
-/*************************
-* Game Drivers *
-*************************/
-
-/* YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS... */
-GAME( 19??, l9nibble, 0, nibble, nibble, driver_device, 0, ROT0, "Nibble", "Lucky 9", MACHINE_NO_SOUND | MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/nightgal.cpp b/src/mame/drivers/nightgal.cpp
index 38a3a3953f9..2720f071051 100644
--- a/src/mame/drivers/nightgal.cpp
+++ b/src/mame/drivers/nightgal.cpp
@@ -6,15 +6,18 @@ Night Gal (c) 1984 Nichibutsu
a.k.a. same Jangou blitter but with NCS CPU for displaying graphics as protection.
-driver by David Haywood & Angelo Salese
+preliminary driver by David Haywood & Angelo Salese
many thanks to Charles MacDonald for the schematics / documentation of this HW.
TODO:
- - extra protection for Night Gal Summer (ports 0x6000-3 for z80);
- - Fix Sweet Gal/Sexy Gal layer clearances;
- - NMI origin for Sexy Gal / Night Gal Summer
- - unemulated WAIT pin for Z80, MCU asserts it when accessing communication RAM
-
+-Night Gal Summer trips illegal opcodes on the NCS side, presumably a CPU bug;
+-Fix Sweet Gal/Sexy Gal gfxs if necessary (i.e. if the bugs aren't all caused by irq/nmi
+ wrong firing);
+-Proper Z80<->MCU comms,many video problems because of that;
+-Abstract the video chip to a proper video file and get the name of that chip;
+-Minor graphic glitches in Royal Queen (cross hatch test, some little glitches during gameplay),
+ presumably due of the unemulated wait states on the comms.
+
*******************************************************************************************/
#include "emu.h"
@@ -22,7 +25,6 @@ TODO:
#include "sound/2203intf.h"
#include "cpu/z80/z80.h"
#include "cpu/m6800/m6800.h"
-#include "video/jangou_blitter.h"
#include "video/resnet.h"
#define MASTER_CLOCK XTAL_19_968MHz
@@ -35,6 +37,7 @@ public:
m_comms_ram(*this, "comms_ram"),
m_maincpu(*this, "maincpu"),
m_subcpu(*this, "sub"),
+ m_gfxrom(*this, "gfx1"),
m_io_cr_clear(*this, "CR_CLEAR"),
m_io_coins(*this, "COINS"),
m_io_pl1_1(*this, "PL1_1"),
@@ -54,11 +57,13 @@ public:
m_io_dswa(*this, "DSWA"),
m_io_dswb(*this, "DSWB"),
m_io_dswc(*this, "DSWC"),
- m_palette(*this, "palette"),
- m_blitter(*this, "blitter") { }
+ m_palette(*this, "palette") { }
/* video-related */
UINT8 m_blit_raw_data[3];
+ UINT8 m_true_blit[7];
+ UINT8 m_pen_data[0x10];
+ UINT8 m_pen_raw_data[0x10];
/* misc */
UINT8 m_nsc_latch;
@@ -72,20 +77,22 @@ public:
required_device<cpu_device> m_subcpu;
/* memory */
- //DECLARE_WRITE8_MEMBER(sexygal_nsc_true_blitter_w);
+ UINT8 m_blit_buffer[256*256];
+ DECLARE_READ8_MEMBER(blitter_status_r);
+ DECLARE_WRITE8_MEMBER(nsc_true_blitter_w);
+ DECLARE_WRITE8_MEMBER(sexygal_nsc_true_blitter_w);
DECLARE_WRITE8_MEMBER(royalqn_blitter_0_w);
DECLARE_WRITE8_MEMBER(royalqn_blitter_1_w);
DECLARE_WRITE8_MEMBER(royalqn_blitter_2_w);
DECLARE_READ8_MEMBER(royalqn_nsc_blit_r);
DECLARE_READ8_MEMBER(royalqn_comm_r);
DECLARE_WRITE8_MEMBER(royalqn_comm_w);
+ DECLARE_WRITE8_MEMBER(blit_true_vregs_w);
DECLARE_WRITE8_MEMBER(mux_w);
DECLARE_READ8_MEMBER(input_1p_r);
DECLARE_READ8_MEMBER(input_2p_r);
- DECLARE_WRITE8_MEMBER(output_w);
DECLARE_DRIVER_INIT(ngalsumr);
DECLARE_DRIVER_INIT(royalqn);
- DECLARE_WRITE8_MEMBER(ngalsumr_unk_w);
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
@@ -93,6 +100,7 @@ public:
UINT32 screen_update_nightgal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
protected:
+ required_region_ptr<UINT8> m_gfxrom;
required_ioport m_io_cr_clear;
required_ioport m_io_coins;
required_ioport m_io_pl1_1;
@@ -113,16 +121,21 @@ protected:
required_ioport m_io_dswb;
required_ioport m_io_dswc;
required_device<palette_device> m_palette;
- required_device<jangou_blitter_device> m_blitter;
- void z80_wait_assert_cb();
- TIMER_CALLBACK_MEMBER( z80_wait_ack_cb );
- std::unique_ptr<bitmap_ind16> m_tmp_bitmap;
+ UINT8 nightgal_gfx_nibble( int niboffset );
+ void plot_nightgal_gfx_pixel( UINT8 pix, int x, int y );
};
+
+
+READ8_MEMBER(nightgal_state::blitter_status_r)
+{
+ return 0x80;
+}
+
void nightgal_state::video_start()
{
- m_tmp_bitmap = std::make_unique<bitmap_ind16>(256, 256);
+ save_item(NAME(m_blit_buffer));
}
UINT32 nightgal_state::screen_update_nightgal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
@@ -131,8 +144,8 @@ UINT32 nightgal_state::screen_update_nightgal(screen_device &screen, bitmap_ind1
for (y = cliprect.min_y; y <= cliprect.max_y; ++y)
{
- UINT8 *src = &m_blitter->m_blit_buffer[y * 256 + cliprect.min_x];
- UINT16 *dst = &m_tmp_bitmap->pix16(y, cliprect.min_x);
+ UINT8 *src = &m_blit_buffer[y * 512 / 2 + cliprect.min_x];
+ UINT16 *dst = &bitmap.pix16(y, cliprect.min_x);
for (x = cliprect.min_x; x <= cliprect.max_x; x += 2)
{
@@ -142,11 +155,144 @@ UINT32 nightgal_state::screen_update_nightgal(screen_device &screen, bitmap_ind1
}
}
- copybitmap(bitmap, *m_tmp_bitmap, flip_screen(), flip_screen(),0,0, cliprect);
return 0;
}
+UINT8 nightgal_state::nightgal_gfx_nibble( int niboffset )
+{
+ if (niboffset & 1)
+ {
+ return (m_gfxrom[(niboffset >> 1) & 0x1ffff] & 0xf0) >> 4;
+ }
+ else
+ {
+ return (m_gfxrom[(niboffset >> 1) & 0x1ffff] & 0x0f);
+ }
+}
+
+void nightgal_state::plot_nightgal_gfx_pixel( UINT8 pix, int x, int y )
+{
+ if (y >= 512) return;
+ if (x >= 512) return;
+ if (y < 0) return;
+ if (x < 0) return;
+
+ if (x & 1)
+ m_blit_buffer[(y * 256) + (x >> 1)] = (m_blit_buffer[(y * 256) + (x >> 1)] & 0x0f) | ((pix << 4) & 0xf0);
+ else
+ m_blit_buffer[(y * 256) + (x >> 1)] = (m_blit_buffer[(y * 256) + (x >> 1)] & 0xf0) | (pix & 0x0f);
+}
+
+WRITE8_MEMBER(nightgal_state::nsc_true_blitter_w)
+{
+ int src, x, y, h, w, flipx;
+ m_true_blit[offset] = data;
+
+ /*trigger blitter write to ram,might not be correct...*/
+ if (offset == 5)
+ {
+ //printf("%02x %02x %02x %02x %02x %02x %02x\n", m_true_blit[0], m_true_blit[1], m_true_blit[2], m_true_blit[3], m_true_blit[4], m_true_blit[5], m_true_blit[6]);
+ w = (m_true_blit[4] & 0xff) + 1;
+ h = (m_true_blit[5] & 0xff) + 1;
+ src = ((m_true_blit[1] << 8) | (m_true_blit[0] << 0));
+ src |= (m_true_blit[6] & 3) << 16;
+
+ x = (m_true_blit[2] & 0xff);
+ y = (m_true_blit[3] & 0xff);
+
+ // lowest bit of src controls flipping / draw direction?
+ flipx = (m_true_blit[0] & 1);
+
+ if (!flipx)
+ src += (w * h) - 1;
+ else
+ src -= (w * h) - 1;
+
+ {
+ int count = 0;
+ int xcount, ycount;
+ for (ycount = 0; ycount < h; ycount++)
+ {
+ for (xcount = 0; xcount < w; xcount++)
+ {
+ int drawx = (x + xcount) & 0xff;
+ int drawy = (y + ycount) & 0xff;
+ UINT8 dat = nightgal_gfx_nibble(src + count);
+ UINT8 cur_pen_hi = m_pen_data[(dat & 0xf0) >> 4];
+ UINT8 cur_pen_lo = m_pen_data[(dat & 0x0f) >> 0];
+
+ dat = cur_pen_lo | (cur_pen_hi << 4);
+
+ if ((dat & 0xff) != 0)
+ plot_nightgal_gfx_pixel(dat, drawx, drawy);
+
+ if (!flipx)
+ count--;
+ else
+ count++;
+ }
+ }
+ }
+ }
+}
+
+/* different register writes (probably a PAL line swapping).*/
+WRITE8_MEMBER(nightgal_state::sexygal_nsc_true_blitter_w)
+{
+ int src, x, y, h, w, flipx;
+ m_true_blit[offset] = data;
+
+ /*trigger blitter write to ram,might not be correct...*/
+ if (offset == 6)
+ {
+ //printf("%02x %02x %02x %02x %02x %02x %02x\n", m_true_blit[0], m_true_blit[1], m_true_blit[2], m_true_blit[3], m_true_blit[4], m_true_blit[5], m_true_blit[6]);
+ w = (m_true_blit[5] & 0xff) + 1;
+ h = (m_true_blit[6] & 0xff) + 1;
+ src = ((m_true_blit[1] << 8) | (m_true_blit[0] << 0));
+ src |= (m_true_blit[2] & 3) << 16;
+
+
+ x = (m_true_blit[3] & 0xff);
+ y = (m_true_blit[4] & 0xff);
+
+ // lowest bit of src controls flipping / draw direction?
+ flipx = (m_true_blit[0] & 1);
+
+ if (!flipx)
+ src += (w * h) - 1;
+ else
+ src -= (w * h) - 1;
+
+ {
+ int count = 0;
+ int xcount, ycount;
+ for (ycount = 0; ycount < h; ycount++)
+ {
+ for (xcount = 0; xcount < w; xcount++)
+ {
+ int drawx = (x + xcount) & 0xff;
+ int drawy = (y + ycount) & 0xff;
+ UINT8 dat = nightgal_gfx_nibble(src + count);
+ UINT8 cur_pen_hi = m_pen_data[(dat & 0xf0) >> 4];
+ UINT8 cur_pen_lo = m_pen_data[(dat & 0x0f) >> 0];
+
+ dat = cur_pen_lo | cur_pen_hi << 4;
+
+ if ((dat & 0xff) != 0)
+ plot_nightgal_gfx_pixel(dat, drawx, drawy);
+
+ if (!flipx)
+ count--;
+ else
+ count++;
+ }
+ }
+ //m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE );
+ }
+ }
+}
+
/* guess: use the same resistor values as Crazy Climber (needs checking on the real HW) */
PALETTE_INIT_MEMBER(nightgal_state, nightgal)
{
@@ -195,9 +341,62 @@ PALETTE_INIT_MEMBER(nightgal_state, nightgal)
********************************************/
/*
- There are three unidirectional latches that also sends an irq from z80 to MCU.
- */
-// TODO: simplify this (error in the document)
+(note:when I say "0x80" I just mean a negative result)
+master-slave algorithm
+-z80 writes the data for the mcu;
+-z80 writes 0 to c200;
+-it waits with the bit 0x80 on c100 clears (i.e. the z80 halts),when this happens the z80 continues his logic algorithm (so stop it until we are done!!!)
+
+-nsc takes an irq
+-puts ff to [1100]
+-it waits that the bit 0x80 on [1100] clears
+-(puts default clut data,only the first time around)
+-reads params from z80 and puts them on the blitter chip
+-expects that bit [80] is equal to 0x80;
+-clears [1100] and expects that [1100] is 0
+-executes a wai (i.e. halt) opcode then expects to receive another irq...
+*/
+
+#define MAIN_Z80_RUN if(offset == 2) m_z80_latch = 0x00
+#define MAIN_Z80_HALT if(offset == 2) m_z80_latch = 0x80
+//#define SUB_NCS_RUN m_ncs_latch = 0x00
+//#define SUB_NCS_HALT m_ncs_latch = 0x80
+#ifdef UNUSED_CODE
+WRITE8_MEMBER(nightgal_state::nsc_latch_w)
+{
+ m_subcpu->set_input_line(0, HOLD_LINE );
+}
+
+READ8_MEMBER(nightgal_state::nsc_latch_r)
+{
+ return m_z80_latch;
+}
+
+WRITE8_MEMBER(nightgal_state::z80_latch_w)
+{
+ m_nsc_latch = data;
+}
+
+READ8_MEMBER(nightgal_state::z80_latch_r)
+{
+ return m_nsc_latch;
+}
+
+/*z80 -> MCU video params*/
+WRITE8_MEMBER(nightgal_state::blitter_w)
+{
+ m_blit_raw_data[offset] = data;
+ MAIN_Z80_HALT;
+}
+
+READ8_MEMBER(nightgal_state::nsc_blit_r)
+{
+ MAIN_Z80_RUN;
+ return m_blit_raw_data[offset];
+}
+#endif
+/* TODO: simplify this (error in the document) */
+
WRITE8_MEMBER(nightgal_state::royalqn_blitter_0_w)
{
m_blit_raw_data[0] = data;
@@ -218,36 +417,35 @@ READ8_MEMBER(nightgal_state::royalqn_nsc_blit_r)
{
if(offset == 2)
m_subcpu->set_input_line(0, CLEAR_LINE );
-
+
return m_blit_raw_data[offset];
}
-TIMER_CALLBACK_MEMBER(nightgal_state::z80_wait_ack_cb)
+READ8_MEMBER(nightgal_state::royalqn_comm_r)
{
- m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, CLEAR_LINE);
+ return (m_comms_ram[offset] & 0x80) | (0x7f); //bits 6-0 are undefined, presumably open bus
}
-void nightgal_state::z80_wait_assert_cb()
+WRITE8_MEMBER(nightgal_state::royalqn_comm_w)
{
- m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, ASSERT_LINE);
-
- // Note: cycles_to_attotime requires z80 context to work, calling for example m_subcpu as context gives a x4 cycle boost in z80 terms (reads execute_cycles_to_clocks() from NCS?) even if they runs at same speed basically.
- // TODO: needs a getter that tells a given CPU how many cycles requires an executing opcode for the r/w operation, which stacks with wait state penalty for accessing this specific area.
- machine().scheduler().timer_set(m_maincpu->cycles_to_attotime(4), timer_expired_delegate(FUNC(nightgal_state::z80_wait_ack_cb),this));
+ m_comms_ram[offset] = data & 0x80;
}
-READ8_MEMBER(nightgal_state::royalqn_comm_r)
+#ifdef UNUSED_CODE
+WRITE8_MEMBER(nightgal_state::blit_vregs_w)
{
- z80_wait_assert_cb();
- return (m_comms_ram[offset] & 0x80) | (0x7f); //bits 6-0 are undefined, presumably open bus
+ m_pen_raw_data[offset] = data;
}
-WRITE8_MEMBER(nightgal_state::royalqn_comm_w)
+READ8_MEMBER(nightgal_state::blit_vregs_r)
{
- z80_wait_assert_cb();
- m_comms_ram[offset] = data & 0x80;
+ return m_pen_raw_data[offset];
+}
+#endif
+WRITE8_MEMBER(nightgal_state::blit_true_vregs_w)
+{
+ m_pen_data[offset] = data;
}
-
/********************************************
*
@@ -299,18 +497,6 @@ READ8_MEMBER(nightgal_state::input_2p_r)
m_io_pl2_4->read() & m_io_pl2_5->read() & m_io_pl2_6->read()) | coin_port;
}
-WRITE8_MEMBER(nightgal_state::output_w)
-{
- /*
- Doesn't match Charles notes?
- --x- ---- unknown, set by Royal Queen on gameplay
- ---- -x-- flip screen
- ---- ---x out counter
- */
- machine().bookkeeping().coin_counter_w(0, data & 0x02);
- flip_screen_set((data & 0x04) == 0);
-}
-
/********************************************
*
* Memory Maps
@@ -318,6 +504,47 @@ WRITE8_MEMBER(nightgal_state::output_w)
********************************************/
/********************************
+* Night Gal
+********************************/
+#ifdef UNUSED_CODE
+static ADDRESS_MAP_START( nightgal_map, AS_PROGRAM, 8, nightgal_state )
+ AM_RANGE(0x0000, 0x7fff) AM_ROM
+ AM_RANGE(0xc100, 0xc100) AM_READ(nsc_latch_r)
+ AM_RANGE(0xc200, 0xc200) AM_WRITE(nsc_latch_w)
+ AM_RANGE(0xc300, 0xc30f) AM_WRITE(blit_vregs_w)
+ AM_RANGE(0xf000, 0xffff) AM_RAM
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START( nightgal_io, AS_IO, 8, nightgal_state )
+ ADDRESS_MAP_GLOBAL_MASK(0xff)
+ AM_RANGE(0x01,0x01) AM_DEVREAD("aysnd", ay8910_device, data_r)
+ AM_RANGE(0x02,0x03) AM_DEVWRITE("aysnd", ay8910_device, data_address_w)
+// AM_RANGE(0x10,0x10) AM_WRITE(output_w)
+ AM_RANGE(0x10,0x10) AM_READ_PORT("DSWC")
+ AM_RANGE(0x11,0x11) AM_READ_PORT("SYSA")
+ AM_RANGE(0x12,0x12) AM_READ_PORT("DSWA")
+ AM_RANGE(0x13,0x13) AM_READ_PORT("DSWB")
+ AM_RANGE(0x11,0x11) AM_WRITE(mux_w)
+ AM_RANGE(0x12,0x14) AM_WRITE(blitter_w) //data for the nsc to be processed
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START( nsc_map, AS_PROGRAM, 8, nightgal_state )
+ AM_RANGE(0x0000, 0x007f) AM_RAM
+ AM_RANGE(0x0080, 0x0080) AM_READ(blitter_status_r)
+ AM_RANGE(0x0081, 0x0083) AM_READ(nsc_blit_r)
+ AM_RANGE(0x0080, 0x0086) AM_WRITE(nsc_true_blitter_w)
+
+ AM_RANGE(0x00a0, 0x00af) AM_WRITE(blit_true_vregs_w)
+
+ AM_RANGE(0x1100, 0x1100) AM_READWRITE(z80_latch_r,z80_latch_w) //irq control?
+ AM_RANGE(0x1200, 0x1200) AM_READNOP //flip screen set bit
+ AM_RANGE(0x1300, 0x130f) AM_READ(blit_vregs_r)
+// AM_RANGE(0x1000, 0xdfff) AM_ROM AM_REGION("gfx1", 0 )
+ AM_RANGE(0xe000, 0xffff) AM_ROM AM_WRITENOP
+ADDRESS_MAP_END
+#endif
+
+/********************************
* Sexy Gal
********************************/
@@ -331,7 +558,8 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( sexygal_io, AS_IO, 8, nightgal_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
AM_RANGE(0x00,0x01) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
- AM_RANGE(0x10,0x10) AM_READ_PORT("DSWC") AM_WRITE(output_w)
+// AM_RANGE(0x10,0x10) AM_WRITE(output_w)
+ AM_RANGE(0x10,0x10) AM_READ_PORT("DSWC")
AM_RANGE(0x11,0x11) AM_READ_PORT("SYSA") AM_WRITE(mux_w)
AM_RANGE(0x12,0x12) AM_MIRROR(0xe8) AM_READ_PORT("DSWA") AM_WRITE(royalqn_blitter_0_w)
AM_RANGE(0x13,0x13) AM_MIRROR(0xe8) AM_READ_PORT("DSWB") AM_WRITE(royalqn_blitter_1_w)
@@ -340,21 +568,21 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( sexygal_nsc_map, AS_PROGRAM, 8, nightgal_state )
AM_RANGE(0x0000, 0x007f) AM_RAM
- AM_RANGE(0x0080, 0x0080) AM_READ_PORT("BLIT_PORT")
+ AM_RANGE(0x0080, 0x0080) AM_READ(blitter_status_r)
AM_RANGE(0x0081, 0x0083) AM_READ(royalqn_nsc_blit_r)
- AM_RANGE(0x0080, 0x0086) AM_DEVWRITE("blitter", jangou_blitter_device, alt_process_w)
- AM_RANGE(0x00a0, 0x00af) AM_DEVWRITE("blitter", jangou_blitter_device, vregs_w)
- AM_RANGE(0x00b0, 0x00b0) AM_DEVWRITE("blitter", jangou_blitter_device, bltflip_w)
+ AM_RANGE(0x0080, 0x0086) AM_WRITE(sexygal_nsc_true_blitter_w)
+
+ AM_RANGE(0x00a0, 0x00af) AM_WRITE(blit_true_vregs_w)
+ AM_RANGE(0x00b0, 0x00b0) AM_WRITENOP // bltflip register
AM_RANGE(0x1000, 0x13ff) AM_MIRROR(0x2c00) AM_READWRITE(royalqn_comm_r, royalqn_comm_w) AM_SHARE("comms_ram")
- AM_RANGE(0xc000, 0xdfff) AM_MIRROR(0x2000) AM_ROM AM_REGION("subrom", 0)
+ AM_RANGE(0xc000, 0xffff) AM_ROM AM_WRITENOP
ADDRESS_MAP_END
/********************************
* Royal Queen
********************************/
-
static ADDRESS_MAP_START( royalqn_map, AS_PROGRAM, 8, nightgal_state )
AM_RANGE(0x0000, 0x7fff) AM_ROM
AM_RANGE(0x8000, 0xbfff) AM_NOP
@@ -366,7 +594,7 @@ static ADDRESS_MAP_START( royalqn_io, AS_IO, 8, nightgal_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
AM_RANGE(0x01,0x01) AM_MIRROR(0xec) AM_DEVREAD("aysnd", ay8910_device, data_r)
AM_RANGE(0x02,0x03) AM_MIRROR(0xec) AM_DEVWRITE("aysnd", ay8910_device, data_address_w)
- AM_RANGE(0x10,0x10) AM_MIRROR(0xe8) AM_READ_PORT("DSWC") AM_WRITE(output_w)
+ AM_RANGE(0x10,0x10) AM_MIRROR(0xe8) AM_READ_PORT("DSWC") AM_WRITENOP //AM_WRITE(output_w)
AM_RANGE(0x11,0x11) AM_MIRROR(0xe8) AM_READ_PORT("SYSA") AM_WRITE(mux_w)
AM_RANGE(0x12,0x12) AM_MIRROR(0xe8) AM_READ_PORT("DSWA") AM_WRITE(royalqn_blitter_0_w)
AM_RANGE(0x13,0x13) AM_MIRROR(0xe8) AM_READ_PORT("DSWB") AM_WRITE(royalqn_blitter_1_w)
@@ -378,16 +606,17 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( royalqn_nsc_map, AS_PROGRAM, 8, nightgal_state )
AM_RANGE(0x0000, 0x007f) AM_RAM
- AM_RANGE(0x0080, 0x0080) AM_READ_PORT("BLIT_PORT")
+ AM_RANGE(0x0080, 0x0080) AM_READ(blitter_status_r)
AM_RANGE(0x0081, 0x0083) AM_READ(royalqn_nsc_blit_r)
- AM_RANGE(0x0080, 0x0086) AM_DEVWRITE("blitter", jangou_blitter_device, process_w)
- AM_RANGE(0x00a0, 0x00af) AM_DEVWRITE("blitter", jangou_blitter_device, vregs_w)
- AM_RANGE(0x00b0, 0x00b0) AM_DEVWRITE("blitter", jangou_blitter_device, bltflip_w)
+ AM_RANGE(0x0080, 0x0086) AM_WRITE(nsc_true_blitter_w)
+
+ AM_RANGE(0x00a0, 0x00af) AM_WRITE(blit_true_vregs_w)
+ AM_RANGE(0x00b0, 0x00b0) AM_WRITENOP // bltflip register
AM_RANGE(0x1000, 0x13ff) AM_MIRROR(0x2c00) AM_READWRITE(royalqn_comm_r,royalqn_comm_w)
AM_RANGE(0x4000, 0x4000) AM_NOP
AM_RANGE(0x8000, 0x8000) AM_NOP //open bus or protection check
- AM_RANGE(0xc000, 0xdfff) AM_MIRROR(0x2000) AM_ROM AM_REGION("subrom", 0)
+ AM_RANGE(0xc000, 0xdfff) AM_MIRROR(0x2000) AM_ROM
ADDRESS_MAP_END
/********************************************
@@ -626,31 +855,6 @@ static INPUT_PORTS_START( sexygal )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
-
- PORT_START("BLIT_PORT")
- PORT_DIPNAME( 0x01, 0x01, "BLIT_PORT" )
- PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("blitter", jangou_blitter_device, status_r)
-
INPUT_PORTS_END
void nightgal_state::machine_start()
@@ -660,6 +864,9 @@ void nightgal_state::machine_start()
save_item(NAME(m_mux_data));
save_item(NAME(m_blit_raw_data));
+ save_item(NAME(m_true_blit));
+ save_item(NAME(m_pen_data));
+ save_item(NAME(m_pen_raw_data));
}
void nightgal_state::machine_reset()
@@ -669,6 +876,9 @@ void nightgal_state::machine_reset()
m_mux_data = 0;
memset(m_blit_raw_data, 0, ARRAY_LENGTH(m_blit_raw_data));
+ memset(m_true_blit, 0, ARRAY_LENGTH(m_true_blit));
+ memset(m_pen_data, 0, ARRAY_LENGTH(m_pen_data));
+ memset(m_pen_raw_data, 0, ARRAY_LENGTH(m_pen_raw_data));
}
static MACHINE_CONFIG_START( royalqn, nightgal_state )
@@ -684,11 +894,14 @@ static MACHINE_CONFIG_START( royalqn, nightgal_state )
MCFG_QUANTUM_PERFECT_CPU("maincpu")
- MCFG_JANGOU_BLITTER_ADD("blitter", MASTER_CLOCK/4)
/* video hardware */
+ /* TODO: blitter clock is MASTER_CLOCK / 4, 320 x 264 pixels, 256 x 224 of visible area */
MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK/4,320,0,256,264,16,240)
+ MCFG_SCREEN_REFRESH_RATE(60)
+ MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
+ MCFG_SCREEN_SIZE(256, 256)
+ MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 0, 256-1)
MCFG_SCREEN_UPDATE_DRIVER(nightgal_state, screen_update_nightgal)
MCFG_SCREEN_PALETTE("palette")
@@ -710,7 +923,7 @@ static MACHINE_CONFIG_DERIVED( sexygal, royalqn )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(sexygal_map)
MCFG_CPU_IO_MAP(sexygal_io)
- MCFG_CPU_PERIODIC_INT_DRIVER(nightgal_state, nmi_line_pulse, 60)//???
+ MCFG_CPU_PERIODIC_INT_DRIVER(nightgal_state, nmi_line_pulse, 244)//???
MCFG_CPU_MODIFY("sub")
MCFG_CPU_PROGRAM_MAP(sexygal_nsc_map)
@@ -728,7 +941,7 @@ static MACHINE_CONFIG_DERIVED( ngalsumr, royalqn )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(royalqn_map)
MCFG_CPU_IO_MAP(royalqn_io)
- MCFG_CPU_PERIODIC_INT_DRIVER(nightgal_state, nmi_line_pulse, 60)//???
+ MCFG_CPU_PERIODIC_INT_DRIVER(nightgal_state, nmi_line_pulse, 244)//???
MACHINE_CONFIG_END
/*
@@ -765,10 +978,10 @@ ROM_START( nightgal )
ROM_LOAD( "ngal_11.bin", 0x02000, 0x02000, CRC(c52f7942) SHA1(e23b9e4936f9b3111ea14c0250190ee6de1ed4ab) )
ROM_LOAD( "ngal_12.bin", 0x04000, 0x02000, CRC(515e69a7) SHA1(234247c829c2b082360d7d44c1488fc5fcf45cd2) )
- ROM_REGION( 0x2000, "subrom", 0 )
- ROM_LOAD( "ngal_09.bin", 0x0000, 0x02000, CRC(da3dcc08) SHA1(6f5319c1777dabf7041286698ac8f25eca1545a1) )
+ ROM_REGION( 0x10000, "sub", 0 )
+ ROM_LOAD( "ngal_09.bin", 0x0c000, 0x02000, CRC(da3dcc08) SHA1(6f5319c1777dabf7041286698ac8f25eca1545a1) )
- ROM_REGION( 0x20000, "gfx", 0 )
+ ROM_REGION( 0x20000, "gfx1", 0 )
ROM_LOAD( "ngal_01.bin", 0x00000, 0x02000, CRC(8e4c92ad) SHA1(13cebe765ebabe6be79c9c9ac3f778550e450380) )
ROM_LOAD( "ngal_02.bin", 0x02000, 0x02000, CRC(c60f7dc1) SHA1(273fd05c62e1efe26538efd2d4f0973c5eba65e4) )
ROM_LOAD( "ngal_03.bin", 0x04000, 0x02000, CRC(824b7d9e) SHA1(04d3340cbb954add0d70c093df4ccb669e5ed12b) )
@@ -815,10 +1028,10 @@ ROM_START( ngtbunny )
ROM_LOAD( "7.3p", 0x02000, 0x02000, CRC(34024380) SHA1(ba535e2b198f55e68a45ad7030b12c9aa1389aea) )
ROM_LOAD( "8.3s", 0x04000, 0x02000, CRC(9bf96168) SHA1(f0e9302bc9577fe779b56cb72035672368c94481) )
- ROM_REGION( 0x2000, "subrom", 0 )
- ROM_LOAD( "5.3m", 0x0000, 0x02000, CRC(b8a82966) SHA1(9f86b3208fb48f9735cfc4f8e62680f0cb4a92f0) )
+ ROM_REGION( 0x10000, "sub", 0 )
+ ROM_LOAD( "5.3m", 0x0c000, 0x02000, CRC(b8a82966) SHA1(9f86b3208fb48f9735cfc4f8e62680f0cb4a92f0) )
- ROM_REGION( 0x20000, "gfx", 0 )
+ ROM_REGION( 0x20000, "gfx1", 0 )
ROM_LOAD( "1.3a", 0x00000, 0x02000, CRC(16776c5f) SHA1(a2925eaed938ae3985ea796658b62d6fafb6412b) )
ROM_LOAD( "2.3c", 0x02000, 0x02000, CRC(dffd2cc6) SHA1(34f45b20596f69c44dc01c7aef765ab3ddaa076b) )
ROM_LOAD( "3.3d", 0x04000, 0x02000, CRC(c532ca49) SHA1(b01b08e99e24649c45ce1833f830775d6f532f6b) )
@@ -834,10 +1047,10 @@ ROM_START( royalngt )
ROM_LOAD( "rn7.3p", 0x02000, 0x02000, CRC(ae9c082b) SHA1(ee3effea653f972fd732453e9ab72f48e75410f8) )
ROM_LOAD( "rn8.3s", 0x04000, 0x02000, CRC(1371a83a) SHA1(c7107b62534837dd51bb4a93ba9a690f91393930) )
- ROM_REGION( 0x2000, "subrom", 0 )
- ROM_LOAD( "rn5.3l", 0x00000, 0x02000, CRC(b8a82966) SHA1(9f86b3208fb48f9735cfc4f8e62680f0cb4a92f0) )
+ ROM_REGION( 0x10000, "sub", 0 )
+ ROM_LOAD( "rn5.3l", 0x0c000, 0x02000, CRC(b8a82966) SHA1(9f86b3208fb48f9735cfc4f8e62680f0cb4a92f0) )
- ROM_REGION( 0x20000, "gfx", 0 )
+ ROM_REGION( 0x20000, "gfx1", 0 )
ROM_LOAD( "rn1.3a", 0x00000, 0x02000, CRC(16776c5f) SHA1(a2925eaed938ae3985ea796658b62d6fafb6412b) )
ROM_LOAD( "rn2.3c", 0x02000, 0x02000, CRC(dffd2cc6) SHA1(34f45b20596f69c44dc01c7aef765ab3ddaa076b) )
ROM_LOAD( "rn3.3d", 0x04000, 0x02000, CRC(31fb1d47) SHA1(41441bc2613c95dc810cad569cbaa0c023c819ba) )
@@ -853,12 +1066,12 @@ ROM_START( royalqn )
ROM_LOAD( "a11.3t", 0x02000, 0x02000, CRC(e7c5395b) SHA1(5131ab9b0fbf1b7b4d410aa2a57eceaf47f8ec3a) )
ROM_LOAD( "a12.3v", 0x04000, 0x02000, CRC(4e8efda4) SHA1(1959491fd899a4d85fd067d7674592ec25188a75) )
- ROM_REGION( 0x2000, "subrom", 0 )
- ROM_LOAD( "rq9.3p", 0x0000, 0x02000, CRC(34b4cf82) SHA1(01f49ca11a695d41c181e92217e228bc1656ee57) )
+ ROM_REGION( 0x10000, "sub", 0 )
+ ROM_LOAD( "rq9.3p", 0x0c000, 0x02000, CRC(34b4cf82) SHA1(01f49ca11a695d41c181e92217e228bc1656ee57) )
ROM_REGION( 0xc000, "samples", ROMREGION_ERASE00 )
- ROM_REGION( 0x20000, "gfx", 0 )
+ ROM_REGION( 0x20000, "gfx1", 0 )
ROM_LOAD( "rq1.3a", 0x00000, 0x02000, CRC(066449dc) SHA1(34838f5e3569b313306ce465e481b934e938c837) )
ROM_LOAD( "rq2.3c", 0x02000, 0x02000, CRC(c467adb5) SHA1(755ebde6229bbf0c7d9293e0becb7506d9aa9d49) )
ROM_LOAD( "rq3.3d", 0x04000, 0x02000, CRC(7e5a7a2d) SHA1(5770cd832de59ff4f61ac40eca8c2238ff7b582d) )
@@ -919,14 +1132,14 @@ ROM_START( sexygal )
ROM_LOAD( "11.3pr", 0x04000, 0x04000, CRC(a3138b42) SHA1(1bf7f6e2c4020251379cc72fa731c17795f35e2e) )
ROM_LOAD( "12.s8b", 0x08000, 0x04000, CRC(7ac4a984) SHA1(7b41c522387938fe7625c9a6c62a385d6635cc5e) )
- ROM_REGION( 0x4000, "subrom", 0 )
- ROM_LOAD( "1.3a", 0x00000, 0x04000, CRC(f814cf27) SHA1(ceba1f14a202d926380039d7cb4669eb8be58539) ) // has a big (16 byte wide) ASCII 'Y.M' art, written in YMs (!)
+ ROM_REGION( 0x10000, "sub", 0 )
+ ROM_LOAD( "1.3a", 0x0c000, 0x04000, CRC(f814cf27) SHA1(ceba1f14a202d926380039d7cb4669eb8be58539) ) // has a big (16 byte wide) ASCII 'Y.M' art, written in YMs (!)
ROM_REGION( 0xc000, "samples", 0 )
ROM_LOAD( "13.s7b", 0x04000, 0x04000, CRC(5eb75f56) SHA1(b7d81d786d1ac8d65a6a122140954eb89d76e8b4) )
ROM_LOAD( "14.s6b", 0x08000, 0x04000, CRC(b4a2497b) SHA1(7231f57b4548899c886625e883b9972c0f30e9f2) )
- ROM_REGION( 0x20000, "gfx", 0 )
+ ROM_REGION( 0x20000, "gfx1", 0 )
ROM_LOAD( "2.3c", 0x00000, 0x04000, CRC(f719e09d) SHA1(c78411b4f974b3dd261d51e522e086fc30a96fcb) )
ROM_LOAD( "3.3d", 0x04000, 0x04000, CRC(a84d9a89) SHA1(91d5978e35ba4acf9353a13ec22c22aeb8a35f12) )
ROM_LOAD( "4.3e", 0x08000, 0x04000, CRC(f1cdbedb) SHA1(caacf2887a3a05e498d57d570a1e9873f95a5d5f) )
@@ -945,15 +1158,15 @@ ROM_START( sweetgal )
ROM_LOAD( "10.3n", 0x00000, 0x04000, CRC(0f6c4bf0) SHA1(50e5c6f08e124641f5df8938ccfcdebde18f6a0f) ) // sldh
ROM_LOAD( "11.3p", 0x04000, 0x04000, CRC(7388e9b3) SHA1(e318d2d3888679bbd43a0aab68252fd359b7969d) )
- ROM_REGION( 0x2000, "subrom", 0 )
- ROM_LOAD( "1.3a", 0x0000, 0x2000, CRC(5342c757) SHA1(b4ff84c45bd2c6a6a468f1d0daaf5b19c4dbf8fe) ) // sldh
+ ROM_REGION( 0x10000, "sub", 0 )
+ ROM_LOAD( "1.3a", 0x0e000, 0x2000, CRC(5342c757) SHA1(b4ff84c45bd2c6a6a468f1d0daaf5b19c4dbf8fe) ) // sldh
ROM_REGION( 0xc000, "samples", 0 ) // sound samples
ROM_LOAD( "v2_12.bin", 0x00000, 0x04000, CRC(66a35be2) SHA1(4f0d73d753387acacc5ccc90e91d848a5ecce55e) )
ROM_LOAD( "v2_13.bin", 0x04000, 0x04000, CRC(60785a0d) SHA1(71eaec3512c0b18b93c083c1808eec51cfd4f520) )
ROM_LOAD( "v2_14.bin", 0x08000, 0x04000, CRC(149e84c1) SHA1(5c4e18637bef2f31bc3578cae6525fb6280fbc06) )
- ROM_REGION( 0x20000, "gfx", 0 )
+ ROM_REGION( 0x20000, "gfx1", 0 )
ROM_LOAD( "2.3c", 0x00000, 0x04000, CRC(3a3d78f7) SHA1(71e35529f30c43ee8ec2363f85fe17042f1d304e) ) // sldh
ROM_LOAD( "3.3d", 0x04000, 0x04000, CRC(c6f9b884) SHA1(32d6fe1906a3f1f528f30dbd3f89971b2ea1925b) ) // sldh
// all roms below match sexygal
@@ -1012,21 +1225,21 @@ ROM_START( ngalsumr )
ROM_LOAD( "9.3t", 0x02000, 0x02000, CRC(879fc493) SHA1(ec7c6928b5d4e46dcc99271466e7eb801f601a70) )
ROM_LOAD( "10.3v", 0x04000, 0x02000, CRC(31211088) SHA1(960b781c420602be3de66565a030cf5ebdcc2ffb) )
- ROM_REGION( 0x2000, "subrom", 0 )
- ROM_LOAD( "7.3p", 0x0000, 0x02000, CRC(20c55a25) SHA1(9dc88cb6c016b594264f7272d4fd5f30567e7c5d) )
+ ROM_REGION( 0x10000, "sub", 0 )
+ ROM_LOAD( "7.3p", 0x0c000, 0x02000, CRC(20c55a25) SHA1(9dc88cb6c016b594264f7272d4fd5f30567e7c5d) )
ROM_REGION( 0xc000, "samples", 0 )
ROM_LOAD( "1s.ic7", 0x00000, 0x04000, CRC(47ad8a0f) SHA1(e3b1e13f0a5c613bd205338683bef8d005b54830) )
ROM_LOAD( "2s.ic6", 0x04000, 0x04000, CRC(ca2a735f) SHA1(5980525a67fb0ffbfa04b82d805eee2463236ce3) )
ROM_LOAD( "3s.ic5", 0x08000, 0x04000, CRC(5cf15267) SHA1(72e4b2aa59a50af6b1b25d5279b3b125bfe06d86) )
- ROM_REGION( 0x20000, "gfx", ROMREGION_ERASEFF )
+ ROM_REGION( 0x20000, "gfx1", 0 )
ROM_LOAD( "1.3a", 0x00000, 0x04000, CRC(9626f812) SHA1(ca7162811a0ba05dfaa2aa8cc93a2e898b326e9e) )
- ROM_LOAD( "3.3d", 0x04000, 0x04000, CRC(2fb2ec0b) SHA1(2f1735e33906783b8c0b283455a2a079431e6f11) )
- ROM_LOAD( "5.3h", 0x08000, 0x04000, CRC(feaca6a3) SHA1(6658c01ac5769e8317a1c7eec6802e7c96885710) )
- ROM_LOAD( "2.3c", 0x10000, 0x04000, CRC(0d59cf7a) SHA1(600bc70d29853fb936f8adaef048d925cbae0ce9) )
- ROM_LOAD( "4.3f", 0x14000, 0x04000, CRC(c7b85199) SHA1(1c4ed2faf82f45d8a23c168793b02969f1201df6) )
- ROM_LOAD( "6.3l", 0x18000, 0x04000, CRC(de9e05f8) SHA1(724468eade222b513b7f39f0a24515f343428130) )
+ ROM_LOAD( "2.3c", 0x04000, 0x04000, CRC(0d59cf7a) SHA1(600bc70d29853fb936f8adaef048d925cbae0ce9) )
+ ROM_LOAD( "3.3d", 0x08000, 0x04000, CRC(2fb2ec0b) SHA1(2f1735e33906783b8c0b283455a2a079431e6f11) )
+ ROM_LOAD( "4.3f", 0x0c000, 0x04000, CRC(c7b85199) SHA1(1c4ed2faf82f45d8a23c168793b02969f1201df6) )
+ ROM_LOAD( "5.3h", 0x10000, 0x04000, CRC(feaca6a3) SHA1(6658c01ac5769e8317a1c7eec6802e7c96885710) )
+ ROM_LOAD( "6.3l", 0x14000, 0x04000, CRC(de9e05f8) SHA1(724468eade222b513b7f39f0a24515f343428130) )
ROM_REGION( 0x20, "proms", 0 )
ROM_LOAD( "ng2.6u", 0x00, 0x20, CRC(0162a24a) SHA1(f7e1623c5bca3725f2e59ae2096b9bc42e0363bf) )
@@ -1034,31 +1247,29 @@ ROM_END
DRIVER_INIT_MEMBER(nightgal_state,royalqn)
{
- UINT8 *ROM = memregion("subrom")->base();
+ UINT8 *ROM = memregion("sub")->base();
/* patch open bus / protection */
- ROM[0x027e] = 0x02;
- ROM[0x027f] = 0x02;
-}
-
-WRITE8_MEMBER(nightgal_state::ngalsumr_unk_w)
-{
- //m_z80_latch = data;
+ ROM[0xc27e] = 0x02;
+ ROM[0xc27f] = 0x02;
}
DRIVER_INIT_MEMBER(nightgal_state,ngalsumr)
{
- m_maincpu->space(AS_PROGRAM).install_write_handler(0x6000, 0x6000, write8_delegate(FUNC(nightgal_state::ngalsumr_unk_w), this) );
- // 0x6003 some kind of f/f state
+ UINT8 *ROM = memregion("sub")->base();
+
+ /* patch protection */
+ ROM[0xd6ce] = 0x02;
+ ROM[0xd6cf] = 0x02;
}
/* Type 1 HW */
GAME( 1984, nightgal, 0, royalqn, sexygal, driver_device, 0, ROT0, "Nichibutsu", "Night Gal (Japan 840920 AG 1-00)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
GAME( 1984, ngtbunny, 0, royalqn, sexygal, driver_device, 0, ROT0, "Nichibutsu", "Night Bunny (Japan 840601 MRN 2-10)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
GAME( 1984, royalngt, ngtbunny, royalqn, sexygal, driver_device, 0, ROT0, "Royal Denshi", "Royal Night [BET] (Japan 840220 RN 2-00)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
-GAME( 1984, royalqn, 0, royalqn, sexygal, nightgal_state, royalqn, ROT0, "Royal Denshi", "Royal Queen [BET] (Japan 841010 RQ 0-07)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
+GAME( 1984, royalqn, 0, royalqn, sexygal, nightgal_state, royalqn, ROT0, "Royal Denshi", "Royal Queen [BET] (Japan 841010 RQ 0-07)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
/* Type 2 HW */
-GAME( 1985, sexygal, 0, sexygal, sexygal, driver_device, 0, ROT0, "Nichibutsu", "Sexy Gal (Japan 850501 SXG 1-00)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
-GAME( 1985, sweetgal, sexygal, sexygal, sexygal, driver_device, 0, ROT0, "Nichibutsu", "Sweet Gal (Japan 850510 SWG 1-02)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
+GAME( 1985, sexygal, 0, sexygal, sexygal, driver_device, 0, ROT0, "Nichibutsu", "Sexy Gal (Japan 850501 SXG 1-00)", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE )
+GAME( 1985, sweetgal, sexygal, sexygal, sexygal, driver_device, 0, ROT0, "Nichibutsu", "Sweet Gal (Japan 850510 SWG 1-02)", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE )
/* Type 3 HW */
-GAME( 1985, ngalsumr, 0, ngalsumr,sexygal, nightgal_state, ngalsumr,ROT0, "Nichibutsu", "Night Gal Summer (Japan 850702 NGS 0-01)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
+GAME( 1985, ngalsumr, 0, ngalsumr,sexygal, nightgal_state, ngalsumr,ROT0, "Nichibutsu", "Night Gal Summer", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/notetaker.cpp b/src/mame/drivers/notetaker.cpp
deleted file mode 100644
index ca36c069361..00000000000
--- a/src/mame/drivers/notetaker.cpp
+++ /dev/null
@@ -1,311 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Jonathan Gevaryahu
-/* Xerox NoteTaker, 1978
- * Driver by Jonathan Gevaryahu
-
- * Notetaker Team At Xerox PARC 1976-1980:
- Alan Kay - Team Lead
- Bruce Horn - BIOS code and more
- Ted Kaehler - SmallTalk-76 code porting[2] and more ( http://tedkaehler.weather-dimensions.com/us/ted/index.html )
- Dan Ingalls - BitBlt engine and SmallTalk kernel and more[3]
- Doug Fairbairn - NoteTaker Hardware/Electronics Design ( http://www.computerhistory.org/atchm/author/dfairbairn/ )
- James Leung - NoteTaker Hardware/Electronics Design
- Ron Freeman - NoteTaker Hardware/Electronics Design
- <there are probably others I've missed>
-
- * History of the machine can be found at http://freudenbergs.de/bert/publications/Ingalls-2014-Smalltalk78.pdf
-
- * Prototypes only, 10 units[2] manufactured 1978-1980
- Known surviving units:
- * One at CHM (missing? mouse, no media)
- * One at Xerox Museum at PARC (with mouse and 2 floppies, floppies were not imaged to the best of my knowledge)
-
- * The NoteTaker used the BitBlt graphical operation (from SmallTalk-76) to do most graphical functions, in order to fit the SmallTalk code and programs within 256K of RAM[2]. The actual BitBlt code lives in ROM[3].
-
- * As far as I am aware, no media (world disks/boot disks) for the NoteTaker have survived (except maybe the two disks at Xerox Museum at PARC), but an incomplete dump of the Smalltalk-76 'world' which was used to bootstrap Smalltalk-78 originally did survive on the Alto disks at CHM
-
- * see http://bitsavers.informatik.uni-stuttgart.de/pdf/xerox/notetaker for additional information
- * see http://xeroxalto.computerhistory.org/Filene/Smalltalk-76/ for the smalltalk-76 dump
- * see http://xeroxalto.computerhistory.org/Indigo/BasicDisks/Smalltalk14.bfs!1_/ for more notetaker/smalltalk related files, including SmallTalk-80 files based on the notetaker smalltalk-78
-
- References:
- * [1] http://freudenbergs.de/bert/publications/Ingalls-2014-Smalltalk78.pdf
- * [2] "Smalltalk and Object Orientation: An Introduction" By John Hunt, pages 45-46 [ISBN 978-3-540-76115-0]
- * [3] http://bitsavers.trailing-edge.com/pdf/xerox/notetaker/memos/19790620_Z-IOP_1.5_ls.pdf
- * [4] http://xeroxalto.computerhistory.org/Filene/Smalltalk-76/
- * [5] http://bitsavers.trailing-edge.com/pdf/xerox/notetaker/memos/19790118_NoteTaker_System_Manual.pdf
- * MISSING DUMP for 8741? Keyboard MCU which does row-column scanning and mouse-related stuff
-
-TODO: everything below.
-* figure out the correct memory maps for the 256kB of shared ram, and what part of ram constitutes the framebuffer
-* figure out how the emulation-cpu boots and where its 4k of local ram maps to
-* Get smalltalk-78 loaded as a rom and forced into ram on startup, since no boot disks have survived (or if any survived, they are not dumped)
-* floppy controller wd1791
- According to [3] and [5] the format is double density/MFM, 128 bytes per sector, 16 sectors per track, 1 or 2 sided, for 170K or 340K per disk.
- According to the schematics, we're missing an 82s147 DISKSEP.PROM used as a data separator
-* crt5027 video controller; we're missing a PROM used to handle memory arbitration between the crtc and the rest of the system, but the equations are on the schematic
-* Harris 6402 serial/EIA UART
-* Harris 6402 keyboard UART
-* HLE for the missing i8748[5] MCU in the keyboard which reads the mouse quadratures and buttons and talks serially to the Keyboard UART
-
-WIP:
-* pic8259 interrupt controller - this is attached as a device, but the interrupts are not hooked to it yet.
-* i/o cpu i/o area needs the memory map worked out per the schematics - mostly done
-*/
-
-#include "cpu/i86/i86.h"
-#include "machine/pic8259.h"
-//#include "video/tms9927.h"
-
-class notetaker_state : public driver_device
-{
-public:
- notetaker_state(const machine_config &mconfig, device_type type, const char *tag) :
- driver_device(mconfig, type, tag) ,
- m_maincpu(*this, "maincpu"),
- m_pic(*this, "pic8259")//,
- //m_vtac(*this, "crt5027")
- {
- }
-// devices
- required_device<cpu_device> m_maincpu;
- required_device<pic8259_device> m_pic;
- //required_device<crt5027_device> m_vtac;
-
-//declarations
- DECLARE_WRITE16_MEMBER(IPConReg_w);
- DECLARE_READ16_MEMBER(maincpu_r);
- DECLARE_WRITE16_MEMBER(maincpu_w);
- DECLARE_DRIVER_INIT(notetakr);
-
-//variables
- UINT8 m_BootSeqDone;
- UINT8 m_DisableROM;
-
-// overrides
- virtual void machine_reset() override;
-};
-
-WRITE16_MEMBER(notetaker_state::IPConReg_w)
-{
- m_BootSeqDone = (data&0x80)?1:0;
- //m_ProcLock = (data&0x40)?1:0; // processor lock
- //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; // also LedInd5
- //m_LedInd6 = (data&0x04)?1:0;
- //m_LedInd7 = (data&0x02)?1:0;
- //m_LedInd8 = (data&0x01)?1:0;
- popmessage("LEDS: CR1: %d, CR2: %d, CR3: %d, CR4: %d", (data&0x04)>>2, (data&0x08)>>3, (data&0x02)>>1, (data&0x01)); // cr1 and 2 are in the reverse order as expected, according to the schematic
-}
-
-READ16_MEMBER(notetaker_state::maincpu_r)
-{
- UINT16 *rom = (UINT16 *)(memregion("maincpu")->base());
- rom += 0x7f800;
- UINT16 *ram = (UINT16 *)(memregion("ram")->base());
- if ( (m_BootSeqDone == 0) || ((m_DisableROM == 0) && ((offset&0x7F800) == 0)) )
- {
- rom += (offset&0x7FF);
- return *rom;
- }
- else
- {
- ram += (offset);
- return *ram;
- }
-}
-
-WRITE16_MEMBER(notetaker_state::maincpu_w)
-{
- UINT16 *ram = (UINT16 *)(memregion("ram")->base());
- ram += offset;
- *ram = data;
-}
-
-/* Address map comes from http://bitsavers.informatik.uni-stuttgart.de/pdf/xerox/notetaker/schematics/19790423_Notetaker_IO_Processor.pdf
-a19 a18 a17 a16 a15 a14 a13 a12 a11 a10 a9 a8 a7 a6 a5 a4 a3 a2 a1 a0 BootSeqDone DisableROM
-x x x x x x x x * * * * * * * * * * * * 0 x R ROM
-0 0 0 0 0 0 0 0 * * * * * * * * * * * * 1 0 R ROM
-< anything not all zeroes > * * * * * * * * * * * * 1 0 RW RAM
-x x x x ? ? * * * * * * * * * * * * * * x x W RAM
-x x x x ? ? * * * * * * * * * * * * * * 1 1 RW RAM
-
-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 to RAM.
-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 goes to RAM.
-BootSeqDone is 1, DisableROM is 1, mem map is entirely RAM or open bus for both reading and writing.
-*/
-static ADDRESS_MAP_START(notetaker_mem, AS_PROGRAM, 16, notetaker_state)
- /*
- AM_RANGE(0x00000, 0x00fff) AM_ROM AM_REGION("maincpu", 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("sharedram") // 256k of ram (less 8k), shared between both processors
- // 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(0x00000, 0xfffff) AM_READWRITE(maincpu_r, maincpu_w) // bypass MAME's memory map system as we need finer grained control
-ADDRESS_MAP_END
-
-/* io memory map comes from http://bitsavers.informatik.uni-stuttgart.de/pdf/xerox/notetaker/memos/19790605_Definition_of_8086_Ports.pdf
- and from the schematic at http://bitsavers.informatik.uni-stuttgart.de/pdf/xerox/notetaker/schematics/19790423_Notetaker_IO_Processor.pdf
-a19 a18 a17 a16 a15 a14 a13 a12 a11 a10 a9 a8 a7 a6 a5 a4 a3 a2 a1 a0
-x x x x 0 x x x x x x 0 0 0 0 x x x * . RW IntCon (PIC8259)
-x x x x 0 x x x x x x 0 0 0 1 x x x x . W IPConReg
-x x x x 0 x x x x x x 0 0 1 0 x 0 0 0 . . KbdInt:Open Bus
-x x x x 0 x x x x x x 0 0 1 0 x 0 0 1 . R KbdInt:ReadKeyData
-x x x x 0 x x x x x x 0 0 1 0 x 0 1 0 . R KbdInt:ReadOPStatus
-x x x x 0 x x x x x x 0 0 1 0 x 0 1 1 . . KbdInt:Open Bus
-x x x x 0 x x x x x x 0 0 1 0 x 1 0 0 . W KbdInt:LoadKeyCtlReg
-x x x x 0 x x x x x x 0 0 1 0 x 1 0 1 . W KbdInt:LoadKeyData
-x x x x 0 x x x x x x 0 0 1 0 x 1 1 0 . W KbdInt:KeyDataReset
-x x x x 0 x x x x x x 0 0 1 0 x 1 1 1 . W KbdInt:KeyChipReset
-x x x x 0 x x x x x x 0 0 1 1 x x x x . W FIFOReg
-x x x x 0 x x x x x x 0 1 0 0 x x x x . . Open Bus
-x x x x 0 x x x x x x 0 1 0 1 x x x x . . Open Bus
-x x x x 0 x x x x x x 0 1 1 0 x x x x . W FIFOBus
-x x x x 0 x x x x x x 0 1 1 1 x x x x . . Open Bus
-x x x x 0 x x x x x x 1 0 0 0 x x x x . RW SelDiskReg
-x x x x 0 x x x x x x 1 0 0 1 x x * * . RW SelDiskInt
-x x x x 0 x x x x x x 1 0 1 0 * * * * . W SelCrtInt
-x x x x 0 x x x x x x 1 0 1 1 x x x x . W LoadDispAddr
-x x x x 0 x x x x x x 1 1 0 0 x x x x . . Open Bus
-x x x x 0 x x x x x x 0 1 0 1 x 0 0 0 . R SelEIA:ReadEIAStatus
-x x x x 0 x x x x x x 0 1 0 1 x 0 0 1 . R SelEIA:ReadEIAData
-x x x x 0 x x x x x x 0 1 0 1 x 0 1 0 . . SelEIA:Open Bus
-x x x x 0 x x x x x x 0 1 0 1 x 0 1 1 . . SelEIA:Open Bus
-x x x x 0 x x x x x x 0 1 0 1 x 1 0 0 . W SelEIA:LoadEIACtlReg
-x x x x 0 x x x x x x 0 1 0 1 x 1 0 1 . W SelEIA:LoadEIAData
-x x x x 0 x x x x x x 0 1 0 1 x 1 1 0 . W SelEIA:EIADataReset
-x x x x 0 x x x x x x 0 1 0 1 x 1 1 1 . W SelEIA:EIAChipReset
-x x x x 0 x x x x x x 1 1 1 0 x x x x . R SelADCHi
-x x x x 0 x x x x x x 1 1 1 1 x x x x . W CRTSwitch
-*/
-static ADDRESS_MAP_START(notetaker_io, AS_IO, 16, notetaker_state)
- ADDRESS_MAP_UNMAP_HIGH
- AM_RANGE(0x00, 0x03) AM_MIRROR(0x7E1C) AM_DEVREADWRITE8("pic8259", pic8259_device, read, write, 0x00ff)
- AM_RANGE(0x20, 0x21) AM_MIRROR(0x7E1E) AM_WRITE(IPConReg_w) // processor (rom mapping, etc) control register
- //AM_RANGE(0x42, 0x43) AM_MIRROR(0x7E10) AM_READ(ReadKeyData_r) // read keyboard data (high byte only) [from mcu?]
- //AM_RANGE(0x44, 0x45) AM_MIRROR(0x7E10) AM_READ(ReadOPStatus_r) // read keyboard fifo state (high byte only) [from mcu?]
- //AM_RANGE(0x48, 0x49) AM_MIRROR(0x7E10) AM_WRITE(LoadKeyCtlReg_w) // kbd uart control register
- //AM_RANGE(0x4a, 0x4b) AM_MIRROR(0x7E10) AM_WRITE(LoadKeyData_w) // kbd uart data register
- //AM_RANGE(0x4c, 0x4d) AM_MIRROR(0x7E10) AM_WRITE(KeyDataReset_w) // kbd uart ddr switch (data reset)
- //AM_RANGE(0x4e, 0x4f) AM_MIRROR(0x7E10) AM_WRITE(KeyChipReset_w) // kbd uart reset
- //AM_RANGE(0x60, 0x61) AM_MIRROR(0x7E1E) AM_WRITE(FIFOReg_w) // DAC sample and hold and frequency setup
- //AM_RANGE(0x100, 0x101) AM_WRITE I/O register (adc speed, crtc pixel clock enable, etc)
- //AM_RANGE(0x140, 0x15f) AM_DEVREADWRITE("crt5027", crt5027_device, read, write)
-ADDRESS_MAP_END
-
-/* writes during boot:
-0x88 to port 0x020 (PCR; boot sequence done(1), processor not locked(0), battery charger off(0), rom not disabled(0) correction off&cr4 off(1), cr3 on(0), cr2 on(0), cr1 on (0);)
-0x02 to port 0x100 (IOR write: enable 5v only relay control for powering up 4116 dram enabled)
-0x03 to port 0x100 (IOR write: in addition to above, enable 12v relay control for powering up 4116 dram enabled)
-<dram memory 0x00000-0x3ffff is zeroed here>
-0x13 to port 0x000 PIC (?????)
-0x08 to port 0x002 PIC (UART int enabled)
-0x0D to port 0x002 PIC (UART, wd1791, and parity error int enabled)
-0xff to port 0x002 PIC (all ints enabled)
-0x0000 to port 0x04e (reset keyboard fifo/controller)
-0x0000 to port 0x1ae (reset UART)
-0x0016 to port 0x048 (kbd control reg write)
-0x0005 to port 0x1a8 (UART control reg write)
-0x5f to port 0x140 \
-0xf2 to port 0x142 \
-0x7d to port 0x144 \
-0x1d to port 0x146 \_ set up CRTC
-0x04 to port 0x148 /
-0x10 to port 0x14a /
-0x00 to port 0x154 /
-0x1e to port 0x15a /
-0x0a03 to port 0x100 (IOR write: set bit clock to 12Mhz)
-0x2a03 to port 0x100 (IOR write: enable crtc clock chain)
-0x00 to port 0x15c (fire off crtc timing chain)
-read from 0x0002 (byte wide) (check interrupts) <looking for vblank int or odd/even frame int here, most likely>
-0xaf to port 0x002 PIC (mask out kb int and 30hz display int)
-0x0400 to 0x060 (select DAC fifo frequency 2)
-read from 0x44 (byte wide) in a loop forever (read keyboard fifo status)
-*/
-
-/* Machine Reset */
-void notetaker_state::machine_reset()
-{
- m_BootSeqDone = 0;
- m_DisableROM = 0;
-}
-
-/* Input ports */
-static INPUT_PORTS_START( notetakr )
-INPUT_PORTS_END
-
-static MACHINE_CONFIG_START( notetakr, notetaker_state )
- /* basic machine hardware */
- MCFG_CPU_ADD("maincpu", I8086, XTAL_24MHz/3) /* iD8086-2 @ E4A; 24Mhz crystal divided down to 8Mhz by i8284 clock generator */
- MCFG_CPU_PROGRAM_MAP(notetaker_mem)
- MCFG_CPU_IO_MAP(notetaker_io)
- MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("pic8259", pic8259_device, inta_cb)
- MCFG_PIC8259_ADD("pic8259", INPUTLINE("maincpu", 0), VCC, NULL) // iP8259A-2 @ E6
-
- //Note there is a second i8086 cpu on the 'emulator board', which is probably loaded with code once smalltalk-78 loads
-
- /* video hardware */
- /*MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(250))
- MCFG_SCREEN_UPDATE_DRIVER(notetaker_state, screen_update)
- MCFG_SCREEN_SIZE(64*6, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0, 64*6-1, 0, 32*8-1)
-
- MCFG_PALETTE_ADD_3BIT_RGB("palette")
-
- MCFG_DEVICE_ADD("crt5027", CRT5027, XTAL_17_9712MHz/2)
- //MCFG_TMS9927_CHAR_WIDTH(6)
- //MCFG_TMS9927_VSYN_CALLBACK(DEVWRITELINE(TMS5501_TAG, tms5501_device, sens_w))
- MCFG_VIDEO_SET_SCREEN("screen")*/
- /* Devices */
-
-MACHINE_CONFIG_END
-
-DRIVER_INIT_MEMBER(notetaker_state,notetakr)
-{
- // descramble the rom; the whole thing is a gigantic scrambled mess either to ease
- // interfacing with older xerox technologies which used A0 and D0 as the MSB bits
- // or maybe because someone screwed up somewhere along the line. we may never know.
- // see http://bitsavers.informatik.uni-stuttgart.de/pdf/xerox/notetaker/schematics/19790423_Notetaker_IO_Processor.pdf pages 12 and onward
- UINT16 *romsrc = (UINT16 *)(memregion("maincpuload")->base());
- UINT16 *romdst = (UINT16 *)(memregion("maincpu")->base());
- UINT16 *temppointer;
- UINT16 wordtemp;
- UINT16 addrtemp;
- // leave the src pointer alone, since we've only used a 0x1000 long address space
- romdst += 0x7f800; // set the dest pointer to 0xff000 (>>1 because 16 bits data)
- for (int i = 0; i < 0x800; i++)
- {
- wordtemp = BITSWAP16(*romsrc, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15); // data bus is completely reversed
- addrtemp = BITSWAP16(i, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10); // address bus is completely reversed; 11-15 should always be zero
- temppointer = romdst+(addrtemp&0x7FF);
- *temppointer = wordtemp;
- romsrc++;
- }
-}
-
-/* ROM definition */
-ROM_START( notetakr )
- ROM_REGION( 0x1000, "maincpuload", ROMREGION_ERASEFF ) // load roms here before descrambling
- ROM_SYSTEM_BIOS( 0, "v2.00", "IO Monitor v2.00" ) // dumped from Notetaker
- ROMX_LOAD( "biop__2.00_hi.b2716.h1", 0x0000, 0x0800, CRC(1119691d) SHA1(4c20b595b554e6f5489ab2c3fb364b4a052f05e3), ROM_SKIP(1) | ROM_BIOS(1))
- ROMX_LOAD( "biop__2.00_lo.b2716.g1", 0x0001, 0x0800, CRC(b72aa4c7) SHA1(85dab2399f906c7695dc92e7c18f32e2303c5892), ROM_SKIP(1) | ROM_BIOS(1))
- ROM_SYSTEM_BIOS( 1, "v1.50", "IO Monitor v1.50" ) // typed from the source listing at http://bitsavers.trailing-edge.com/pdf/xerox/notetaker/memos/19790620_Z-IOP_1.5_ls.pdf and scrambled
- ROMX_LOAD( "z-iop_1.50_hi.h1", 0x0000, 0x0800, CRC(2994656e) SHA1(ca2bb38eb9075c5c2f3cc5439b209e7e216084da), ROM_SKIP(1) | ROM_BIOS(2))
- ROMX_LOAD( "z-iop_1.50_lo.g1", 0x0001, 0x0800, CRC(2cb79a67) SHA1(692aafd2aeea27533f6288dbb1cb8678ea08fade), ROM_SKIP(1) | ROM_BIOS(2))
- ROM_REGION( 0x100000, "maincpu", ROMREGION_ERASEFF ) // area for descrambled roms
- ROM_REGION( 0x100000, "ram", ROMREGION_ERASEFF ) // ram cards
- ROM_REGION( 0x1000, "proms", ROMREGION_ERASEFF )
- ROM_LOAD( "disksep.prom.82s147.a4", 0x000, 0x200, NO_DUMP ) // disk data separator prom from the disk/display module board
- ROM_LOAD( "setmemrq.prom.82s126.d9", 0x200, 0x100, NO_DUMP ) // SETMEMRQ memory timing prom from the disk/display module board; The equations for this one are actually listed on the schematic, so it should be pretty easy to recreate.
-ROM_END
-
-/* Driver */
-
-/* YEAR NAME PARENT COMPAT MACHINE INPUT STATE INIT COMPANY FULLNAME FLAGS */
-COMP( 1978, notetakr, 0, 0, notetakr, notetakr, notetaker_state, notetakr, "Xerox", "Notetaker", MACHINE_IS_SKELETON)
-//COMP( 1978, notetakr, 0, 0, notetakr, notetakr, driver_device, notetakr, "Xerox", "Notetaker", MACHINE_IS_SKELETON)
diff --git a/src/mame/drivers/nwk-tr.cpp b/src/mame/drivers/nwk-tr.cpp
index a64c10fd96a..3d4719b95f1 100644
--- a/src/mame/drivers/nwk-tr.cpp
+++ b/src/mame/drivers/nwk-tr.cpp
@@ -304,7 +304,6 @@ public:
int m_fpga_uploaded;
int m_lanc2_ram_r;
int m_lanc2_ram_w;
- UINT8 m_lanc2_reg[3];
std::unique_ptr<UINT8[]> m_lanc2_ram;
std::unique_ptr<UINT32[]> m_sharc_dataram;
DECLARE_WRITE32_MEMBER(paletteram32_w);
@@ -347,11 +346,11 @@ WRITE_LINE_MEMBER(nwktr_state::voodoo_vblank_0)
UINT32 nwktr_state::screen_update_nwktr(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- voodoo_device *voodoo = (voodoo_device*)machine().device("voodoo0");
+ device_t *voodoo = machine().device("voodoo0");
bitmap.fill(m_palette->pen(0), cliprect);
- voodoo->voodoo_update(bitmap, cliprect);
+ voodoo_update(voodoo, bitmap, cliprect);
const rectangle &visarea = screen.visible_area();
const rectangle tilemap_rect(visarea.min_x, visarea.max_x, visarea.min_y+16, visarea.max_y);
@@ -522,7 +521,6 @@ WRITE32_MEMBER(nwktr_state::lanc2_w)
((value << 7) & 0x80);
m_fpga_uploaded = 1;
- m_lanc2_reg[0] = (UINT8)(data >> 24);
//printf("lanc2_fpga_w: %02X at %08X\n", value, space.device().safe_pc());
}
@@ -530,16 +528,11 @@ WRITE32_MEMBER(nwktr_state::lanc2_w)
{
m_lanc2_ram_r = 0;
m_lanc2_ram_w = 0;
- m_lanc2_reg[1] = (UINT8)(data >> 8);
}
else if (ACCESSING_BITS_16_23)
{
- if (m_lanc2_reg[0] != 0)
- {
- m_lanc2_ram[2] = (data >> 20) & 0xf;
- m_lanc2_ram[3] = 0;
- }
- m_lanc2_reg[2] = (UINT8)(data >> 16);
+ m_lanc2_ram[2] = (data >> 20) & 0xf;
+ m_lanc2_ram[3] = 0;
}
else if (ACCESSING_BITS_0_7)
{
diff --git a/src/mame/drivers/overdriv.cpp b/src/mame/drivers/overdriv.cpp
index 233da503224..c611c2b32eb 100644
--- a/src/mame/drivers/overdriv.cpp
+++ b/src/mame/drivers/overdriv.cpp
@@ -70,32 +70,23 @@ WRITE16_MEMBER(overdriv_state::eeprom_w)
TIMER_DEVICE_CALLBACK_MEMBER(overdriv_state::overdriv_cpuA_scanline)
{
- const int timer_threshold = 168; // fwiw matches 0 on mask ROM check, so IF it's a timer irq then should be close ...
int scanline = param;
-
- m_fake_timer ++;
-
- // TODO: irqs routines are TOO slow right now, it ends up firing spurious irqs for whatever reason (shared ram fighting?)
- // this is a temporary solution to get rid of deprecat lib and the crashes, but also makes the game timer to be too slow.
- // Update: gameplay is actually too fast compared to timer, first attract mode shouldn't even surpass first blue car on right.
- if(scanline == 256) // vblank-out irq
- {
- // m_screen->frame_number() & 1
+
+ /* TODO: irqs routines are TOO slow right now, it ends up firing spurious irqs for whatever reason (shared ram fighting?) */
+ /* this is a temporary solution to get rid of deprecat lib and the crashes, but also makes the game timer to be too slow */
+ if(scanline == 256 && m_screen->frame_number() & 1) // vblank-out irq
m_maincpu->set_input_line(4, HOLD_LINE);
- }
- else if(m_fake_timer >= timer_threshold) // timer irq
- {
- m_fake_timer -= timer_threshold;
+ else if((scanline % 128) == 0) // timer irq
m_maincpu->set_input_line(5, HOLD_LINE);
- }
}
-#ifdef UNUSED_FUNCTION
INTERRUPT_GEN_MEMBER(overdriv_state::cpuB_interrupt)
{
// this doesn't get turned on until the irq has happened? wrong irq?
+// if (m_k053246->k053246_is_irq_enabled())
+ m_subcpu->set_input_line(4, HOLD_LINE); // likely wrong
}
-#endif
+
WRITE16_MEMBER(overdriv_state::cpuA_ctrl_w)
{
@@ -136,22 +127,17 @@ WRITE16_MEMBER(overdriv_state::cpuB_ctrl_w)
WRITE16_MEMBER(overdriv_state::overdriv_soundirq_w)
{
- m_audiocpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE);
+ m_audiocpu->set_input_line(M6809_IRQ_LINE, HOLD_LINE);
}
-
-
-
-WRITE16_MEMBER(overdriv_state::slave_irq4_assert_w)
+WRITE16_MEMBER(overdriv_state::overdriv_cpuB_irq_x_w)
{
- // used in-game
- m_subcpu->set_input_line(4, HOLD_LINE);
+ m_subcpu->set_input_line(5, HOLD_LINE); // likely wrong
}
-WRITE16_MEMBER(overdriv_state::slave_irq5_assert_w)
+WRITE16_MEMBER(overdriv_state::overdriv_cpuB_irq_y_w)
{
- // tests GFX ROMs with this irq (indeed enabled only in test mode)
- m_subcpu->set_input_line(5, HOLD_LINE);
+ m_subcpu->set_input_line(6, HOLD_LINE); // likely wrong
}
static ADDRESS_MAP_START( overdriv_master_map, AS_PROGRAM, 16, overdriv_state )
@@ -177,11 +163,11 @@ static ADDRESS_MAP_START( overdriv_master_map, AS_PROGRAM, 16, overdriv_state )
AM_RANGE(0x218000, 0x218fff) AM_DEVREADWRITE8("k051316_2", k051316_device, read, write, 0xff00)
AM_RANGE(0x220000, 0x220fff) AM_DEVREAD8("k051316_1", k051316_device, rom_r, 0xff00)
AM_RANGE(0x228000, 0x228fff) AM_DEVREAD8("k051316_2", k051316_device, rom_r, 0xff00)
- AM_RANGE(0x230000, 0x230001) AM_WRITE(slave_irq4_assert_w)
- AM_RANGE(0x238000, 0x238001) AM_WRITE(slave_irq5_assert_w)
+ AM_RANGE(0x230000, 0x230001) AM_WRITE(overdriv_cpuB_irq_y_w)
+ AM_RANGE(0x238000, 0x238001) AM_WRITE(overdriv_cpuB_irq_x_w)
ADDRESS_MAP_END
-#ifdef UNUSED_FUNCTION
+// HACK ALERT
WRITE16_MEMBER( overdriv_state::overdriv_k053246_word_w )
{
m_k053246->k053246_word_w(space,offset,data,mem_mask);
@@ -204,20 +190,6 @@ WRITE16_MEMBER( overdriv_state::overdriv_k053246_word_w )
//printf("%02x %04x %04x\n", offset, data, mem_mask);
}
-#endif
-
-TIMER_CALLBACK_MEMBER(overdriv_state::objdma_end_cb )
-{
- m_subcpu->set_input_line(6, HOLD_LINE);
-}
-
-WRITE16_MEMBER(overdriv_state::objdma_w)
-{
- if(data & 0x10)
- machine().scheduler().timer_set(attotime::from_usec(100), timer_expired_delegate(FUNC(overdriv_state::objdma_end_cb), this));
-
- m_k053246->k053246_w(space,5,data,mem_mask);
-}
static ADDRESS_MAP_START( overdriv_slave_map, AS_PROGRAM, 16, overdriv_state )
AM_RANGE(0x000000, 0x03ffff) AM_ROM
@@ -225,27 +197,17 @@ static ADDRESS_MAP_START( overdriv_slave_map, AS_PROGRAM, 16, overdriv_state )
AM_RANGE(0x0c0000, 0x0c1fff) AM_RAM //AM_DEVREADWRITE("k053250_1", k053250_device, ram_r, ram_w)
AM_RANGE(0x100000, 0x10000f) AM_DEVREADWRITE("k053250_1", k053250_device, reg_r, reg_w)
AM_RANGE(0x108000, 0x10800f) AM_DEVREADWRITE("k053250_2", k053250_device, reg_r, reg_w)
- AM_RANGE(0x118000, 0x118fff) AM_DEVREADWRITE("k053246", k053247_device, k053247_word_r, k053247_word_w) // data gets copied to sprite chip with DMA..
+ AM_RANGE(0x118000, 0x118fff) AM_RAM AM_SHARE("sprram") //AM_DEVREADWRITE("k053246", k053247_device, k053247_word_r, k053247_word_w) // data gets copied to sprite chip with DMA..
AM_RANGE(0x120000, 0x120001) AM_DEVREAD("k053246", k053247_device, k053246_word_r)
AM_RANGE(0x128000, 0x128001) AM_READWRITE(cpuB_ctrl_r, cpuB_ctrl_w) /* enable K053247 ROM reading, plus something else */
- AM_RANGE(0x130004, 0x130005) AM_WRITE(objdma_w)
- AM_RANGE(0x130000, 0x130007) AM_DEVREADWRITE8("k053246", k053247_device, k053246_r,k053246_w,0xffff)
- //AM_RANGE(0x140000, 0x140001) used in later stages, set after writes at 0x208000-0x20bfff range
+ AM_RANGE(0x130000, 0x130007) AM_WRITE(overdriv_k053246_word_w) // AM_DEVWRITE("k053246", k053247_device, k053246_word_w)
AM_RANGE(0x200000, 0x203fff) AM_RAM AM_SHARE("share1")
- AM_RANGE(0x208000, 0x20bfff) AM_RAM // sprite indirect table?
+ AM_RANGE(0x208000, 0x20bfff) AM_RAM
AM_RANGE(0x218000, 0x219fff) AM_DEVREAD("k053250_1", k053250_device, rom_r)
AM_RANGE(0x220000, 0x221fff) AM_DEVREAD("k053250_2", k053250_device, rom_r)
ADDRESS_MAP_END
-WRITE8_MEMBER(overdriv_state::sound_ack_w)
-{
- m_audiocpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE);
-}
-
static ADDRESS_MAP_START( overdriv_sound_map, AS_PROGRAM, 8, overdriv_state )
- AM_RANGE(0x0000, 0x0000) AM_WRITE(sound_ack_w)
- // 0x012 read during explosions
- // 0x180
AM_RANGE(0x0200, 0x0201) AM_DEVREADWRITE("ymsnd", ym2151_device,read,write)
AM_RANGE(0x0400, 0x042f) AM_DEVREADWRITE("k053260_1", k053260_device, read, write)
AM_RANGE(0x0600, 0x062f) AM_DEVREADWRITE("k053260_2", k053260_device, read, write)
@@ -260,7 +222,7 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( overdriv )
PORT_START("INPUTS")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_TOGGLE
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_TOGGLE
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -320,9 +282,8 @@ static MACHINE_CONFIG_START( overdriv, overdriv_state )
MCFG_CPU_ADD("sub", M68000, XTAL_24MHz/2) /* 12 MHz */
MCFG_CPU_PROGRAM_MAP(overdriv_slave_map)
- //MCFG_CPU_VBLANK_INT_DRIVER("screen", overdriv_state, cpuB_interrupt)
- /* IRQ 5 and 6 are generated by the main CPU. */
- /* IRQ 5 is used only in test mode, to request the checksums of the gfx ROMs. */
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", overdriv_state, cpuB_interrupt) /* IRQ 5 and 6 are generated by the main CPU. */
+ /* IRQ 5 is used only in test mode, to request the checksums of the gfx ROMs. */
MCFG_CPU_ADD("audiocpu", M6809, XTAL_3_579545MHz) /* 1.789 MHz?? This might be the right speed, but ROM testing */
MCFG_CPU_PROGRAM_MAP(overdriv_sound_map) /* takes a little too much (the counter wraps from 0000 to 9999). */
@@ -336,7 +297,10 @@ static MACHINE_CONFIG_START( overdriv, overdriv_state )
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(XTAL_24MHz/4,384,0,305,264,0,224)
+ MCFG_SCREEN_REFRESH_RATE(59)
+ MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
+ MCFG_SCREEN_SIZE(64*8, 40*8)
+ MCFG_SCREEN_VISIBLE_AREA(13*8, (64-13)*8-1, 0*8, 32*8-1 )
MCFG_SCREEN_UPDATE_DRIVER(overdriv_state, screen_update_overdriv)
MCFG_SCREEN_PALETTE("palette")
@@ -511,6 +475,6 @@ ROM_START( overdrivb )
ROM_LOAD( "789e02.f1", 0x100000, 0x100000, CRC(bdd3b5c6) SHA1(412332d64052c0a3714f4002c944b0e7d32980a4) )
ROM_END
-GAMEL( 1990, overdriv, 0, overdriv, overdriv, driver_device, 0, ROT90, "Konami", "Over Drive (set 1)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE, layout_overdriv ) // US version
-GAMEL( 1990, overdriva, overdriv, overdriv, overdriv, driver_device, 0, ROT90, "Konami", "Over Drive (set 2)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE, layout_overdriv ) // Overseas?
-GAMEL( 1990, overdrivb, overdriv, overdriv, overdriv, driver_device, 0, ROT90, "Konami", "Over Drive (set 3)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE, layout_overdriv ) // Overseas?
+GAMEL( 1990, overdriv, 0, overdriv, overdriv, driver_device, 0, ROT90, "Konami", "Over Drive (set 1)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE, layout_overdriv )
+GAMEL( 1990, overdriva, overdriv, overdriv, overdriv, driver_device, 0, ROT90, "Konami", "Over Drive (set 2)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE, layout_overdriv )
+GAMEL( 1990, overdrivb, overdriv, overdriv, overdriv, driver_device, 0, ROT90, "Konami", "Over Drive (set 3)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE, layout_overdriv )
diff --git a/src/mame/drivers/pc2000.cpp b/src/mame/drivers/pc2000.cpp
index b207dd72fec..152ee648b28 100644
--- a/src/mame/drivers/pc2000.cpp
+++ b/src/mame/drivers/pc2000.cpp
@@ -935,7 +935,6 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( pc1000, misterx )
MCFG_SOFTWARE_LIST_REMOVE("cart_list")
- MCFG_SOFTWARE_LIST_REMOVE("pc1000_cart")
MCFG_SOFTWARE_LIST_ADD("cart_list", "pc1000")
MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("misterx_cart", "misterx")
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/pc9801.cpp b/src/mame/drivers/pc9801.cpp
index f2f305ec97c..433e8346858 100644
--- a/src/mame/drivers/pc9801.cpp
+++ b/src/mame/drivers/pc9801.cpp
@@ -425,7 +425,6 @@ Keyboard TX commands:
#include "machine/pc9801_118.h"
#include "machine/pc9801_cbus.h"
#include "machine/pc9801_kbd.h"
-#include "machine/pc9801_cd.h"
#include "machine/idectrl.h"
#include "machine/idehd.h"
@@ -513,7 +512,6 @@ public:
UINT8 *m_kanji_rom;
UINT8 m_dma_offset[4];
- UINT8 m_dma_autoinc[4];
int m_dack;
UINT8 m_video_ff[8],m_gfx_ff;
@@ -571,9 +569,7 @@ public:
UINT8 m_sys_type;
DECLARE_WRITE_LINE_MEMBER( write_uart_clock );
- DECLARE_WRITE8_MEMBER(rtc_w);
- DECLARE_WRITE8_MEMBER(dmapg4_w);
- DECLARE_WRITE8_MEMBER(dmapg8_w);
+ DECLARE_WRITE8_MEMBER(rtc_dmapg_w);
DECLARE_WRITE8_MEMBER(nmi_ctrl_w);
DECLARE_WRITE8_MEMBER(vrtc_clear_w);
DECLARE_WRITE8_MEMBER(pc9801_video_ff_w);
@@ -737,7 +733,6 @@ public:
UINT8 freq_index;
}m_mouse;
TIMER_DEVICE_CALLBACK_MEMBER( mouse_irq_cb );
- DECLARE_READ8_MEMBER(unk_r);
DECLARE_DRIVER_INIT(pc9801_kanji);
inline void set_dma_channel(int channel, int state);
@@ -978,29 +973,29 @@ UPD7220_DRAW_TEXT_LINE_MEMBER( pc9801_state::hgdc_draw_text )
}
-WRITE8_MEMBER(pc9801_state::rtc_w)
+WRITE8_MEMBER(pc9801_state::rtc_dmapg_w)
{
- m_rtc->c0_w((data & 0x01) >> 0);
- m_rtc->c1_w((data & 0x02) >> 1);
- m_rtc->c2_w((data & 0x04) >> 2);
- m_rtc->stb_w((data & 0x08) >> 3);
- m_rtc->clk_w((data & 0x10) >> 4);
- m_rtc->data_in_w(((data & 0x20) >> 5));
- if(data & 0xc0)
- logerror("RTC write to undefined bits %02x\n",data & 0xc0);
-}
-
-WRITE8_MEMBER(pc9801_state::dmapg4_w)
-{
- m_dma_offset[(offset+1) & 3] = data & 0x0f;
-}
-
-WRITE8_MEMBER(pc9801_state::dmapg8_w)
-{
- if(offset == 4)
- m_dma_autoinc[data & 3] = (data >> 2) & 3;
- else if(offset < 4)
- m_dma_offset[(offset+1) & 3] = data;
+ if((offset & 1) == 0)
+ {
+ if(offset == 0)
+ {
+ m_rtc->c0_w((data & 0x01) >> 0);
+ m_rtc->c1_w((data & 0x02) >> 1);
+ m_rtc->c2_w((data & 0x04) >> 2);
+ m_rtc->stb_w((data & 0x08) >> 3);
+ m_rtc->clk_w((data & 0x10) >> 4);
+ m_rtc->data_in_w(((data & 0x20) >> 5));
+ if(data & 0xc0)
+ logerror("RTC write to undefined bits %02x\n",data & 0xc0);
+ }
+ else
+ logerror("Write to undefined port [%02x] <- %02x\n",offset+0x20,data);
+ }
+ else // odd
+ {
+// logerror("Write to DMA bank register %d %02x\n",((offset >> 1)+1) & 3,data);
+ m_dma_offset[((offset >> 1)+1) & 3] = data & 0x0f;
+ }
}
WRITE8_MEMBER(pc9801_state::nmi_ctrl_w)
@@ -1430,20 +1425,7 @@ void pc9801_state::egc_blit_w(UINT32 offset, UINT16 data, UINT16 mem_mask)
}
// mask off the bits past the end of the blit
- if((m_egc.count < 8) && (mem_mask != 0xffff))
- {
- UINT16 end_mask = dir ? ((1 << m_egc.count) - 1) : ~((1 << (8 - m_egc.count)) - 1);
- // if the blit is less than 8 bits, adjust the masks
- if(m_egc.first)
- {
- if(dir)
- end_mask <<= dst_off & 7;
- else
- end_mask >>= dst_off & 7;
- }
- mask &= end_mask;
- }
- else if((m_egc.count < 16) && (mem_mask == 0xffff))
+ if(m_egc.count < 16)
{
UINT16 end_mask = dir ? ((1 << m_egc.count) - 1) : ~((1 << (16 - m_egc.count)) - 1);
// if the blit is less than 16 bits, adjust the masks
@@ -1474,6 +1456,11 @@ void pc9801_state::egc_blit_w(UINT32 offset, UINT16 data, UINT16 mem_mask)
out = data;
break;
case 1:
+ if(mem_mask == 0x00ff)
+ src = src | src << 8;
+ else if(mem_mask == 0xff00)
+ src = src | src >> 8;
+
out = egc_do_partial_op(i, src, pat, m_video_ram_2[offset + (((i + 1) & 3) * 0x4000)]);
break;
case 2:
@@ -1786,8 +1773,7 @@ static ADDRESS_MAP_START( pc9801_io, AS_IO, 16, pc9801_state )
ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(0x0000, 0x001f) AM_DEVREADWRITE8("i8237", am9517a_device, read, write, 0xff00)
AM_RANGE(0x0000, 0x000f) AM_READWRITE8(pic_r, pic_w, 0x00ff) // i8259 PIC (bit 3 ON slave / master) / i8237 DMA
- AM_RANGE(0x0020, 0x0021) AM_WRITE8(rtc_w,0x00ff)
- AM_RANGE(0x0020, 0x0027) AM_WRITE8(dmapg4_w,0xff00)
+ AM_RANGE(0x0020, 0x0027) AM_WRITE8(rtc_dmapg_w,0xffff) // RTC / DMA registers (LS244)
AM_RANGE(0x0030, 0x0037) AM_DEVREADWRITE8("ppi8255_sys", i8255_device, read, write, 0xff00) //i8251 RS232c / i8255 system port
AM_RANGE(0x0040, 0x0047) AM_DEVREADWRITE8("ppi8255_prn", i8255_device, read, write, 0x00ff)
AM_RANGE(0x0040, 0x0043) AM_DEVREADWRITE8("keyb", pc9801_kbd_device, rx_r, tx_w, 0xff00) //i8255 printer port / i8251 keyboard
@@ -2245,7 +2231,6 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( pc9801ux_io, AS_IO, 16, pc9801_state )
ADDRESS_MAP_UNMAP_HIGH
- AM_RANGE(0x0020, 0x002f) AM_WRITE8(dmapg8_w,0xff00)
AM_RANGE(0x0050, 0x0057) AM_NOP // 2dd ppi?
AM_RANGE(0x005c, 0x005f) AM_READ(pc9821_timestamp_r) AM_WRITENOP // artic
AM_RANGE(0x0068, 0x006b) AM_WRITE8(pc9801rs_video_ff_w,0x00ff) //mode FF / <undefined>
@@ -2277,7 +2262,7 @@ static ADDRESS_MAP_START( pc9801rs_io, AS_IO, 16, pc9801_state )
AM_RANGE(0x0430, 0x0433) AM_READWRITE8(ide_ctrl_r, ide_ctrl_w, 0x00ff)
AM_RANGE(0x0640, 0x064f) AM_READWRITE(ide_cs0_r, ide_cs0_w)
AM_RANGE(0x0740, 0x074f) AM_READWRITE(ide_cs1_r, ide_cs1_w)
- AM_RANGE(0x1e8c, 0x1e8f) AM_NOP // temp
+ AM_RANGE(0x1e80, 0x1e8f) AM_NOP // temp
AM_RANGE(0xbfd8, 0xbfdf) AM_WRITE8(pc9801rs_mouse_freq_w, 0xffff)
AM_RANGE(0xe0d0, 0xe0d3) AM_READ8(pc9801rs_midi_r, 0xffff)
AM_IMPORT_FROM(pc9801ux_io)
@@ -2293,8 +2278,6 @@ WRITE8_MEMBER(pc9801_state::pc9821_video_ff_w)
{
if(offset == 1)
{
- if(((data & 0xfe) == 4) && !m_ex_video_ff[3]) // TODO: many other settings are protected
- return;
m_ex_video_ff[(data & 0xfe) >> 1] = data & 1;
//if((data & 0xfe) == 0x20)
@@ -2486,15 +2469,13 @@ static ADDRESS_MAP_START( pc9821_io, AS_IO, 32, pc9801_state )
// ADDRESS_MAP_UNMAP_HIGH // TODO: a read to somewhere makes this to fail at POST
AM_RANGE(0x0000, 0x001f) AM_DEVREADWRITE8("i8237", am9517a_device, read, write, 0xff00ff00)
AM_RANGE(0x0000, 0x000f) AM_READWRITE8(pic_r, pic_w, 0x00ff00ff) // i8259 PIC (bit 3 ON slave / master) / i8237 DMA
- AM_RANGE(0x0020, 0x0023) AM_WRITE8(rtc_w,0x000000ff)
- AM_RANGE(0x0020, 0x002f) AM_WRITE8(dmapg8_w,0xff00ff00)
+ AM_RANGE(0x0020, 0x0027) AM_WRITE8(rtc_dmapg_w, 0xffffffff) // RTC / DMA registers (LS244)
AM_RANGE(0x0030, 0x0037) AM_DEVREADWRITE8("ppi8255_sys", i8255_device, read, write, 0xff00ff00) //i8251 RS232c / i8255 system port
AM_RANGE(0x0040, 0x0047) AM_DEVREADWRITE8("ppi8255_prn", i8255_device, read, write, 0x00ff00ff)
AM_RANGE(0x0040, 0x0043) AM_DEVREADWRITE8("keyb", pc9801_kbd_device, rx_r, tx_w, 0xff00ff00) //i8255 printer port / i8251 keyboard
AM_RANGE(0x0050, 0x0053) AM_WRITE8(pc9801rs_nmi_w, 0xffffffff)
AM_RANGE(0x005c, 0x005f) AM_READ16(pc9821_timestamp_r,0xffffffff) AM_WRITENOP // artic
AM_RANGE(0x0060, 0x0063) AM_DEVREADWRITE8("upd7220_chr", upd7220_device, read, write, 0x00ff00ff) //upd7220 character ports / <undefined>
- AM_RANGE(0x0060, 0x0063) AM_READ8(unk_r, 0xff00ff00) // mouse related (unmapped checking for AT keyb controller\PS/2 mouse?)
AM_RANGE(0x0064, 0x0067) AM_WRITE8(vrtc_clear_w, 0x000000ff)
AM_RANGE(0x0068, 0x006b) AM_WRITE8(pc9821_video_ff_w, 0x00ff00ff) //mode FF / <undefined>
AM_RANGE(0x0070, 0x007f) AM_DEVREADWRITE8("pit8253", pit8253_device, read, write, 0xff00ff00)
@@ -2530,7 +2511,6 @@ static ADDRESS_MAP_START( pc9821_io, AS_IO, 32, pc9801_state )
// AM_RANGE(0x0c2d, 0x0c2d) cs4231 PCM board hi byte control
// AM_RANGE(0x0cc0, 0x0cc7) SCSI interface / <undefined>
// AM_RANGE(0x0cfc, 0x0cff) PCI bus
- AM_RANGE(0x1e8c, 0x1e8f) AM_NOP // IDE RAM switch
AM_RANGE(0x3fd8, 0x3fdf) AM_DEVREADWRITE8("pit8253", pit8253_device, read, write, 0xff00ff00) // <undefined> / pit mirror ports
AM_RANGE(0x7fd8, 0x7fdf) AM_DEVREADWRITE8("ppi8255_mouse", i8255_device, read, write, 0xff00ff00)
AM_RANGE(0x841c, 0x841f) AM_READWRITE8(sdip_0_r,sdip_0_w,0xffffffff)
@@ -2891,21 +2871,6 @@ READ8_MEMBER(pc9801_state::dma_read_byte)
{
address_space &program = m_maincpu->space(AS_PROGRAM);
offs_t addr = (m_dma_offset[m_dack] << 16) | offset;
- if(offset == 0xffff)
- {
- switch(m_dma_autoinc[m_dack])
- {
- case 1:
- {
- UINT8 page = m_dma_offset[m_dack];
- m_dma_offset[m_dack] = ((page + 1) & 0xf) | (page & 0xf0);
- break;
- }
- case 3:
- m_dma_offset[m_dack]++;
- break;
- }
- }
// logerror("%08x\n",addr);
@@ -2917,21 +2882,7 @@ WRITE8_MEMBER(pc9801_state::dma_write_byte)
{
address_space &program = m_maincpu->space(AS_PROGRAM);
offs_t addr = (m_dma_offset[m_dack] << 16) | offset;
- if(offset == 0xffff)
- {
- switch(m_dma_autoinc[m_dack])
- {
- case 1:
- {
- UINT8 page = m_dma_offset[m_dack];
- m_dma_offset[m_dack] = ((page + 1) & 0xf) | (page & 0xf0);
- break;
- }
- case 3:
- m_dma_offset[m_dack]++;
- break;
- }
- }
+
// logerror("%08x %02x\n",addr,data);
program.write_byte(addr, data);
@@ -3008,11 +2959,6 @@ WRITE8_MEMBER(pc9801_state::ppi_mouse_portc_w)
m_mouse.control = data;
}
-READ8_MEMBER(pc9801_state::unk_r)
-{
- return 0xff;
-}
-
/****************************************
*
* UPD765 interface
@@ -3176,7 +3122,6 @@ MACHINE_RESET_MEMBER(pc9801_state,pc9801_common)
m_mouse.control = 0xff;
m_mouse.freq_reg = 0;
m_mouse.freq_index = 0;
- m_dma_autoinc[0] = m_dma_autoinc[1] = m_dma_autoinc[2] = m_dma_autoinc[3] = 0;
memset(&m_egc, 0, sizeof(m_egc));
}
@@ -3273,10 +3218,6 @@ TIMER_DEVICE_CALLBACK_MEMBER( pc9801_state::mouse_irq_cb )
}
}
-SLOT_INTERFACE_START(pc9801_atapi_devices)
- SLOT_INTERFACE("pc9801_cd", PC9801_CD)
-SLOT_INTERFACE_END
-
static MACHINE_CONFIG_FRAGMENT( pc9801_keyboard )
MCFG_DEVICE_ADD("keyb", PC9801_KBD, 53)
MCFG_PC9801_KBD_IRQ_CALLBACK(DEVWRITELINE("pic8259_master", pic8259_device, ir1_w))
@@ -3325,7 +3266,7 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_FRAGMENT( pc9801_ide )
MCFG_ATA_INTERFACE_ADD("ide1", ata_devices, "hdd", nullptr, false)
MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(pc9801_state, ide1_irq_w))
- MCFG_ATA_INTERFACE_ADD("ide2", pc9801_atapi_devices, "pc9801_cd", nullptr, false)
+ MCFG_ATA_INTERFACE_ADD("ide2", ata_devices, "cdrom", nullptr, false)
MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(pc9801_state, ide2_irq_w))
MACHINE_CONFIG_END
@@ -3468,7 +3409,7 @@ static MACHINE_CONFIG_START( pc9801rs, pc9801_state )
MCFG_RAM_ADD(RAM_TAG)
MCFG_RAM_DEFAULT_SIZE("1664K")
- MCFG_RAM_EXTRA_OPTIONS("640K,3712K,7808K,14M")
+ MCFG_RAM_EXTRA_OPTIONS("640K,3712K,7808K")
MCFG_DEVICE_MODIFY("upd7220_btm")
MCFG_DEVICE_ADDRESS_MAP(AS_0, upd7220_grcg_2_map)
@@ -3727,10 +3668,6 @@ ROM_START( pc9821 )
ROM_REGION( 0x60000, "ipl", ROMREGION_ERASEFF )
ROM_LOAD( "itf.rom", 0x18000, 0x08000, CRC(dd4c7bb8) SHA1(cf3aa193df2722899066246bccbed03f2e79a74a) )
ROM_LOAD( "bios.rom", 0x28000, 0x18000, BAD_DUMP CRC(34a19a59) SHA1(2e92346727b0355bc1ec9a7ded1b444a4917f2b9) )
- ROM_FILL(0x34c40, 4, 0) // hide the _32_ marker until we have a 32-bit clean IDE bios otherwise windows tries to
- // make a 32-bit call into 16-bit code
- ROM_FILL(0x37ffe, 1, 0x92)
- ROM_FILL(0x37fff, 1, 0xd7)
ROM_REGION( 0x10000, "sound_bios", 0 )
ROM_LOAD( "sound.rom", 0x0000, 0x4000, CRC(a21ef796) SHA1(34137c287c39c44300b04ee97c1e6459bb826b60) )
diff --git a/src/mame/drivers/playch10.cpp b/src/mame/drivers/playch10.cpp
index 3de354d2a38..1a044e7e2ec 100644
--- a/src/mame/drivers/playch10.cpp
+++ b/src/mame/drivers/playch10.cpp
@@ -1726,7 +1726,7 @@ GAME( 1988, pc_pinbt, playch10, playch10_hboard, playch10, playch10_state, pchbo
/* i-Board Games */
GAME( 1989, pc_cshwk, playch10, playch10, playch10, playch10_state, pciboard, ROT0, "Rare (Nintendo of America license)", "Captain Sky Hawk (PlayChoice-10)", 0 )
-GAME( 1990, pc_sjetm, playch10, playch10, playch10, playch10_state, pciboard, ROT0, "Rare", "Solar Jetman (PlayChoice-10)", MACHINE_IMPERFECT_GRAPHICS )
+GAME( 1990, pc_sjetm, playch10, playch10, playch10, playch10_state, pciboard, ROT0, "Rare", "Solar Jetman (PlayChoice-10)", 0 )
/* K-Board Games */
GAME( 1991, pc_moglf, playch10, playch10, playch10, playch10_state, pckboard, ROT0, "Nintendo", "Mario's Open Golf (PlayChoice-10)", 0 )
diff --git a/src/mame/drivers/prestige.cpp b/src/mame/drivers/prestige.cpp
index 4b7131f82d4..e8c0c1200fb 100644
--- a/src/mame/drivers/prestige.cpp
+++ b/src/mame/drivers/prestige.cpp
@@ -775,7 +775,6 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( snotec, glcolor )
MCFG_SOFTWARE_LIST_REMOVE("cart_list")
- MCFG_SOFTWARE_LIST_REMOVE("snotec_cart")
MCFG_SOFTWARE_LIST_ADD("cart_list", "snotec")
MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("glcolor_cart", "glcolor")
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/pulsar.cpp b/src/mame/drivers/pulsar.cpp
index eda3535ee2d..48030adce83 100644
--- a/src/mame/drivers/pulsar.cpp
+++ b/src/mame/drivers/pulsar.cpp
@@ -254,10 +254,7 @@ MACHINE_CONFIG_END
/* ROM definition */
ROM_START( pulsarlb )
ROM_REGION( 0x10800, "maincpu", ROMREGION_ERASEFF )
- ROM_SYSTEM_BIOS(0, "mon7", "MP7A")
- ROMX_LOAD( "mp7a.bin", 0x10000, 0x800, CRC(726b8a19) SHA1(43b2af84d5622c1f67584c501b730acf002a6113), ROM_BIOS(1))
- ROM_SYSTEM_BIOS(1, "mon6", "LBOOT6") // Blank screen until floppy boots
- ROMX_LOAD( "lboot6.rom", 0x10000, 0x800, CRC(3bca9096) SHA1(ff99288e51a9e832785ce8e3ab5a9452b1064231), ROM_BIOS(2))
+ ROM_LOAD( "mp7a.bin", 0x10000, 0x800, CRC(726b8a19) SHA1(43b2af84d5622c1f67584c501b730acf002a6113) )
ROM_END
/* Driver */
diff --git a/src/mame/drivers/punchout.cpp b/src/mame/drivers/punchout.cpp
index 9355d7f7726..d7d54a6a2c4 100644
--- a/src/mame/drivers/punchout.cpp
+++ b/src/mame/drivers/punchout.cpp
@@ -12,6 +12,7 @@ the bottom screen.
driver by Nicola Salmoria
TODO:
+- finish spunchout protection, currently using a hacky workaround
- add useless driver config to choose between pink and white color proms
- video raw params - pixel clock is derived from 20.16mhz xtal
- money bag placement might not be 100% correct in Arm Wrestling
@@ -147,7 +148,10 @@ WRITE8_MEMBER(punchout_state::punchout_speech_vcu_w)
WRITE8_MEMBER(punchout_state::punchout_2a03_reset_w)
{
- m_audiocpu->set_input_line(INPUT_LINE_RESET, (data & 1) ? ASSERT_LINE : CLEAR_LINE);
+ if (data & 1)
+ m_audiocpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
+ else
+ m_audiocpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
}
WRITE8_MEMBER(punchout_state::nmi_mask_w)
@@ -188,19 +192,20 @@ static ADDRESS_MAP_START( punchout_io_map, AS_IO, 8, punchout_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0")
AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1")
- AM_RANGE(0x00, 0x01) AM_WRITENOP // the 2A03 #1 is not present
+ AM_RANGE(0x00, 0x01) AM_WRITENOP /* the 2A03 #1 is not present */
AM_RANGE(0x02, 0x02) AM_READ_PORT("DSW2") AM_WRITE(soundlatch_byte_w)
AM_RANGE(0x03, 0x03) AM_READ_PORT("DSW1") AM_WRITE(soundlatch2_byte_w)
- AM_RANGE(0x04, 0x04) AM_DEVWRITE("vlm", vlm5030_device, data_w)
- AM_RANGE(0x05, 0x07) AM_WRITENOP // spunchout protection
+ AM_RANGE(0x04, 0x04) AM_DEVWRITE("vlm", vlm5030_device, data_w) /* VLM5030 */
+// AM_RANGE(0x05, 0x05) AM_WRITENOP /* unused */
+// AM_RANGE(0x06, 0x06) AM_WRITENOP
AM_RANGE(0x08, 0x08) AM_WRITE(nmi_mask_w)
- AM_RANGE(0x09, 0x09) AM_WRITENOP // watchdog reset, seldom used because 08 clears the watchdog as well
- AM_RANGE(0x0a, 0x0a) AM_WRITENOP // ?
+ AM_RANGE(0x09, 0x09) AM_WRITENOP /* watchdog reset, seldom used because 08 clears the watchdog as well */
+ AM_RANGE(0x0a, 0x0a) AM_WRITENOP /* ?? */
AM_RANGE(0x0b, 0x0b) AM_WRITE(punchout_2a03_reset_w)
- AM_RANGE(0x0c, 0x0c) AM_WRITE(punchout_speech_reset_w)
- AM_RANGE(0x0d, 0x0d) AM_WRITE(punchout_speech_st_w)
- AM_RANGE(0x0e, 0x0e) AM_WRITE(punchout_speech_vcu_w)
- AM_RANGE(0x0f, 0x0f) AM_WRITENOP // enable NVRAM?
+ AM_RANGE(0x0c, 0x0c) AM_WRITE(punchout_speech_reset_w) /* VLM5030 */
+ AM_RANGE(0x0d, 0x0d) AM_WRITE(punchout_speech_st_w) /* VLM5030 */
+ AM_RANGE(0x0e, 0x0e) AM_WRITE(punchout_speech_vcu_w) /* VLM5030 */
+ AM_RANGE(0x0f, 0x0f) AM_WRITENOP /* enable NVRAM ? */
ADDRESS_MAP_END
@@ -224,6 +229,15 @@ READ8_MEMBER(punchout_state::spunchout_exp_r)
ret |= m_rp5h01->counter_r() ? 0x00 : 0x40;
ret |= m_rp5h01->data_r() ? 0x00 : 0x80;
+ // FIXME - hack d6/d7 state until we figure out why the game resets
+ /* PC = 0x0313 */
+ /* (ret or 0x10) -> (D7DF),(D7A0) - (D7DF),(D7A0) = 0d0h(ret nc) */
+ ret &= 0x3f;
+ if (space.device().safe_pcbase() == 0x0313)
+ {
+ ret |= 0xc0;
+ }
+
return ret;
}
@@ -231,30 +245,22 @@ WRITE8_MEMBER(punchout_state::spunchout_exp_w)
{
// d0-d3: D0-D3 to RP5C01
m_rtc->write(space, offset >> 4 & 0xf, data & 0xf);
-}
-WRITE8_MEMBER(punchout_state::spunchout_rp5h01_reset_w)
-{
- // d0: 74LS74 2D
+ // d0: 74LS74 1D + 74LS74 2D
+ // 74LS74 1Q -> RP5H01 DATA CLOCK + TEST
// 74LS74 2Q -> RP5H01 RESET
// 74LS74 _2Q -> 74LS74 _1 RESET
- m_rp5h01->reset_w(data & 1);
- if (data & 1)
- spunchout_rp5h01_clock_w(space, 0, 0);
-}
-
-WRITE8_MEMBER(punchout_state::spunchout_rp5h01_clock_w)
-{
- // d0: 74LS74 1D
- // 74LS74 1Q -> RP5H01 DATA CLOCK + TEST
m_rp5h01->clock_w(data & 1);
m_rp5h01->test_w(data & 1);
+ m_rp5h01->reset_w(data & 1);
+ m_rp5h01->clock_w(0);
+ m_rp5h01->test_w(0);
+
+ // d4-d7: unused?
}
static ADDRESS_MAP_START( spnchout_io_map, AS_IO, 8, punchout_state )
- AM_RANGE(0x05, 0x05) AM_MIRROR(0xf0) AM_WRITE(spunchout_rp5h01_reset_w)
- AM_RANGE(0x06, 0x06) AM_MIRROR(0xf0) AM_WRITE(spunchout_rp5h01_clock_w)
- AM_RANGE(0x07, 0x07) AM_MIRROR(0xf0) AM_MASK(0xf0) AM_READWRITE(spunchout_exp_r, spunchout_exp_w) // protection ports
+ AM_RANGE(0x07, 0x07) AM_MIRROR(0xf0) AM_MASK(0xf0) AM_READWRITE(spunchout_exp_r, spunchout_exp_w) /* protection ports */
AM_IMPORT_FROM( punchout_io_map )
ADDRESS_MAP_END
diff --git a/src/mame/drivers/r9751.cpp b/src/mame/drivers/r9751.cpp
index fd93f310e2e..5ca1d8d153a 100644
--- a/src/mame/drivers/r9751.cpp
+++ b/src/mame/drivers/r9751.cpp
@@ -67,8 +67,6 @@ public:
DECLARE_READ32_MEMBER(r9751_mmio_5ff_r);
DECLARE_WRITE32_MEMBER(r9751_mmio_5ff_w);
- DECLARE_READ32_MEMBER(r9751_mmio_ff01_r);
- DECLARE_WRITE32_MEMBER(r9751_mmio_ff01_w);
DECLARE_READ32_MEMBER(r9751_mmio_ff05_r);
DECLARE_WRITE32_MEMBER(r9751_mmio_ff05_w);
DECLARE_READ32_MEMBER(r9751_mmio_fff8_r);
@@ -92,8 +90,6 @@ private:
UINT32 fdd_dest_address; // 5FF080B0
UINT32 fdd_cmd_complete;
UINT32 smioc_out_addr;
- UINT32 smioc_dma_bank;
- UINT32 fdd_dma_bank;
attotime timer_32khz_last;
// End registers
@@ -114,16 +110,12 @@ UINT32 r9751_state::swap_uint32( UINT32 val )
READ8_MEMBER(r9751_state::pdc_dma_r)
{
- /* This callback function takes the value written to 0xFF01000C as the bank offset */
- UINT32 address = (fdd_dma_bank & 0x7FFFF800) + (offset&0xFFFF);
- return m_maincpu->space(AS_PROGRAM).read_byte(address);
+ return m_maincpu->space(AS_PROGRAM).read_byte(offset);
}
WRITE8_MEMBER(r9751_state::pdc_dma_w)
{
- /* This callback function takes the value written to 0xFF01000C as the bank offset */
- UINT32 address = (fdd_dma_bank & 0x7FFFF800) + (data&0xFFFF);
- m_maincpu->space(AS_PROGRAM).write_byte(m_pdc->fdd_68k_dma_address,address);
+ m_maincpu->space(AS_PROGRAM).write_byte(m_pdc->fdd_68k_dma_address,data);
}
DRIVER_INIT_MEMBER(r9751_state,r9751)
@@ -131,10 +123,9 @@ DRIVER_INIT_MEMBER(r9751_state,r9751)
reg_ff050004 = 0;
reg_fff80040 = 0;
fdd_dest_address = 0;
+// fdd_scsi_command = 0;
fdd_cmd_complete = 0;
- fdd_dma_bank = 0;
smioc_out_addr = 0;
- smioc_dma_bank = 0;
m_mem = &m_maincpu->space(AS_PROGRAM);
}
@@ -156,31 +147,32 @@ void r9751_state::machine_reset()
READ32_MEMBER( r9751_state::r9751_mmio_5ff_r )
{
UINT32 data;
+ UINT32 address = offset * 4 + 0x5FF00000;
- switch(offset << 2)
+ switch(address)
{
/* PDC HDD region (0x24, device 9) */
- case 0x0824: /* HDD Command result code */
+ case 0x5FF00824: /* HDD Command result code */
return 0x10;
- case 0x3024: /* HDD SCSI command completed successfully */
+ case 0x5FF03024: /* HDD SCSI command completed successfully */
data = 0x1;
- if(TRACE_HDC) logerror("SCSI HDD command completion status - Read: %08X, From: %08X, Register: %08X\n", data, space.machine().firstcpu->pc(), offset << 2 | 0x5FF00000);
+ if(TRACE_HDC) logerror("SCSI HDD command completion status - Read: %08X, From: %08X, Register: %08X\n", data, space.machine().firstcpu->pc(), address);
return data;
/* SMIOC region (0x98, device 26) */
- case 0x0898: /* Serial status or DMA status */
+ case 0x5FF00898: /* Serial status or DMA status */
return 0x40;
/* PDC FDD region (0xB0, device 44 */
- case 0x08B0: /* FDD Command result code */
+ case 0x5FF008B0: /* FDD Command result code */
return 0x10;
- case 0x10B0: /* Clear 5FF030B0 ?? */
+ case 0x5FF010B0: /* Clear 5FF030B0 ?? */
if(TRACE_FDC) logerror("--- FDD 0x5FF010B0 READ (0)\n");
return 0;
- case 0x30B0: /* FDD command completion status */
+ case 0x5FF030B0: /* FDD command completion status */
data = (m_pdc->reg_p5 << 8) + m_pdc->reg_p4;
- if(TRACE_FDC) logerror("--- SCSI FDD command completion status - Read: %08X, From: %08X, Register: %08X\n", data, space.machine().firstcpu->pc(), offset << 2 | 0x5FF00000);
+ if(TRACE_FDC) logerror("--- SCSI FDD command completion status - Read: %08X, From: %08X, Register: %08X\n", data, space.machine().firstcpu->pc(), address);
return data;
default:
- if(TRACE_FDC || TRACE_HDC || TRACE_SMIOC) logerror("Instruction: %08x READ MMIO(%08x): %08x & %08x\n", space.machine().firstcpu->pc(), offset << 2 | 0x5FF00000, 0, mem_mask);
+ if(TRACE_FDC || TRACE_HDC || TRACE_SMIOC) logerror("Instruction: %08x READ MMIO(%08x): %08x & %08x\n", space.machine().firstcpu->pc(), address, 0, mem_mask);
return 0;
}
}
@@ -188,57 +180,49 @@ READ32_MEMBER( r9751_state::r9751_mmio_5ff_r )
WRITE32_MEMBER( r9751_state::r9751_mmio_5ff_w )
{
UINT8 data_b0, data_b1;
- /* Unknown mask */
- if (mem_mask != 0xFFFFFFFF)
- logerror("Mask found: %08X Register: %08X PC: %08X\n", mem_mask, offset << 2 | 0x5FF00000, space.machine().firstcpu->pc());
+ UINT32 address = offset * 4 + 0x5FF00000;
- switch(offset << 2)
+ switch(address)
{
/* PDC HDD region (0x24, device 9 */
- case 0x0224: /* HDD SCSI read command */
- if(TRACE_HDC) logerror("@@@ HDD Command: %08X, From: %08X, Register: %08X\n", data, space.machine().firstcpu->pc(), offset << 2 | 0x5FF00000);
+ case 0x5FF00224: /* HDD SCSI read command */
+ if(TRACE_HDC) logerror("@@@ HDD Command: %08X, From: %08X, Register: %08X\n", data, space.machine().firstcpu->pc(), address);
break;
- case 0x8024: /* HDD SCSI read command */
- if(TRACE_HDC) logerror("@@@ HDD Command: %08X, From: %08X, Register: %08X\n", data, space.machine().firstcpu->pc(), offset << 2 | 0x5FF00000);
+ case 0x5FF08024: /* HDD SCSI read command */
+ if(TRACE_HDC) logerror("@@@ HDD Command: %08X, From: %08X, Register: %08X\n", data, space.machine().firstcpu->pc(), address);
break;
- case 0xC024: /* HDD SCSI read command */
- if(TRACE_HDC) logerror("@@@ HDD Command: %08X, From: %08X, Register: %08X\n", data, space.machine().firstcpu->pc(), offset << 2 | 0x5FF00000);
+ case 0x5FF0C024: /* HDD SCSI read command */
+ if(TRACE_HDC) logerror("@@@ HDD Command: %08X, From: %08X, Register: %08X\n", data, space.machine().firstcpu->pc(), address);
break;
/* SMIOC region (0x98, device 26) */
- case 0x4098: /* Serial DMA Command */
+ case 0x5FF04098: /* Serial DMA Command */
switch(data)
{
case 0x4100: /* Send byte to serial */
- if(TRACE_SMIOC) logerror("Serial byte: %02X PC: %08X\n", m_mem->read_dword(smioc_out_addr), space.machine().firstcpu->pc());
+ if(TRACE_SMIOC) logerror("Serial byte: %02X\n", m_mem->read_dword(smioc_out_addr));
m_terminal->write(space,0,m_mem->read_dword(smioc_out_addr));
break;
default:
if(TRACE_SMIOC) logerror("Uknown serial DMA command: %X\n", data);
}
break;
- case 0xC098: /* Serial DMA output address */
- //smioc_out_addr = data * 2;
- smioc_out_addr = (smioc_dma_bank & 0x7FFFF800) | ((data&0x3FF)<<1);
- if(TRACE_SMIOC) logerror("Serial output address: %08X PC: %08X\n", smioc_out_addr, space.machine().firstcpu->pc());
+ case 0x5FF0C098: /* Serial DMA output address */
+ smioc_out_addr = data * 2;
break;
/* PDC FDD region (0xB0, device 44 */
- case 0x01B0: /* FDD SCSI read command */
- if(TRACE_FDC) logerror("--- FDD Command: %08X, From: %08X, Register: %08X\n", data, space.machine().firstcpu->pc(), offset << 2 | 0x5FF00000);
+ case 0x5FF001B0: /* FDD SCSI read command */
+ if(TRACE_FDC) logerror("--- FDD Command: %08X, From: %08X, Register: %08X\n", data, space.machine().firstcpu->pc(), address);
break;
- case 0x02B0: /* FDD SCSI read command */
- if(TRACE_FDC) logerror("--- FDD Command: %08X, From: %08X, Register: %08X\n", data, space.machine().firstcpu->pc(), offset << 2 | 0x5FF00000);
+ case 0x5FF002B0: /* FDD SCSI read command */
+ if(TRACE_FDC) logerror("--- FDD Command: %08X, From: %08X, Register: %08X\n", data, space.machine().firstcpu->pc(), address);
break;
- case 0x04B0: /* FDD RESET PDC */
- if(TRACE_FDC) logerror("PDC RESET, PC: %08X\n", space.machine().firstcpu->pc());
- m_pdc->reset();
+ case 0x5FF008B0: /* FDD SCSI read command */
+ if(TRACE_FDC) logerror("--- FDD Command: %08X, From: %08X, Register: %08X\n", data, space.machine().firstcpu->pc(), address);
break;
- case 0x08B0: /* FDD SCSI read command */
- if(TRACE_FDC) logerror("--- FDD Command: %08X, From: %08X, Register: %08X\n", data, space.machine().firstcpu->pc(), offset << 2 | 0x5FF00000);
- break;
- case 0x41B0: /* Unknown - Probably old style commands */
- if(TRACE_FDC) logerror("--- FDD Command: %08X, From: %08X, Register: %08X\n", data, space.machine().firstcpu->pc(), offset << 2 | 0x5FF00000);
+ case 0x5FF041B0: /* Unknown - Probably old style commands */
+ if(TRACE_FDC) logerror("--- FDD Command: %08X, From: %08X, Register: %08X\n", data, space.machine().firstcpu->pc(), address);
- /* Clear FDD Command completion status 0x5FF030B0 (PDC 0x4, 0x5) */
+ /* Clear FDD Command completion status 0x5FF030B0 (PDC 0x4, 0x5)*/
m_pdc->reg_p4 = 0;
m_pdc->reg_p5 = 0;
@@ -249,7 +233,7 @@ WRITE32_MEMBER( r9751_state::r9751_mmio_5ff_w )
m_pdc->reg_p38 |= 0x2; /* Set bit 1 on port 38 register, PDC polls this port looking for a command */
if(TRACE_FDC) logerror("--- FDD Old Command: %02X and %02X\n", data_b0, data_b1);
break;
- case 0x80B0: /* fdd_dest_address register */
+ case 0x5FF080B0: /* fdd_dest_address register */
fdd_dest_address = data << 1;
if(TRACE_FDC) logerror("--- FDD destination address: %08X\n", fdd_dest_address);
data_b0 = data & 0xFF;
@@ -257,14 +241,14 @@ WRITE32_MEMBER( r9751_state::r9751_mmio_5ff_w )
m_pdc->reg_p6 = data_b0;
m_pdc->reg_p7 = data_b1;
break;
- case 0xC0B0:
- case 0xC1B0: /* FDD command address register */
+ case 0x5FF0C0B0:
+ case 0x5FF0C1B0: /* FDD command address register */
UINT32 fdd_scsi_command;
UINT32 fdd_scsi_command2;
unsigned char c_fdd_scsi_command[8]; // Array for SCSI command
int scsi_lba; // FDD LBA location here, extracted from command
- /* Clear FDD Command completion status 0x5FF030B0 (PDC 0x4, 0x5) */
+ /* Clear FDD Command completion status 0x5FF030B0 (PDC 0x4, 0x5)*/
m_pdc->reg_p4 = 0;
m_pdc->reg_p5 = 0;
@@ -297,119 +281,86 @@ WRITE32_MEMBER( r9751_state::r9751_mmio_5ff_w )
break;
default:
- if(TRACE_FDC || TRACE_HDC || TRACE_SMIOC) logerror("Instruction: %08x WRITE MMIO(%08x): %08x & %08x\n", space.machine().firstcpu->pc(), offset << 2 | 0x5FF00000, data, mem_mask);
+ if(TRACE_FDC || TRACE_HDC || TRACE_SMIOC) logerror("Instruction: %08x WRITE MMIO(%08x): %08x & %08x\n", space.machine().firstcpu->pc(), address, data, mem_mask);
}
}
/******************************************************************************
- CPU board registers [0xFF010000 - 0xFF06FFFF]
+ CPU board registers [0xFF050000 - 0xFF06FFFF]
******************************************************************************/
-READ32_MEMBER( r9751_state::r9751_mmio_ff01_r )
-{
- //UINT32 data;
-
- switch(offset << 2)
- {
- default:
- //return data;
- return 0;
- }
-}
-
-WRITE32_MEMBER( r9751_state::r9751_mmio_ff01_w )
-{
- /* Unknown mask */
- if (mem_mask != 0xFFFFFFFF)
- logerror("Mask found: %08X Register: %08X PC: %08X\n", mem_mask, offset << 2 | 0xFF010000, space.machine().firstcpu->pc());
-
- switch(offset << 2)
- {
- case 0x000C: /* FDD DMA Offset */
- fdd_dma_bank = data;
- return;
- case 0x0010: /* SMIOC DMA Offset */
- smioc_dma_bank = data;
- return;
- default:
- return;
- }
-}
-
READ32_MEMBER( r9751_state::r9751_mmio_ff05_r )
{
UINT32 data;
+ UINT32 address = offset * 4 + 0xFF050000;
- switch(offset << 2)
+ switch(address)
{
- case 0x0004:
+ case 0xFF050004:
return reg_ff050004;
- case 0x0300:
+ case 0xFF050300:
return 0x1B | (1<<0x14);
- case 0x0320: /* Some type of counter */
+ case 0xFF050320: /* Some type of counter */
return (machine().time() - timer_32khz_last).as_ticks(32768) & 0xFFFF;
- case 0x0584:
+ case 0xFF050584:
return 0;
- case 0x0610:
+ case 0xFF050610:
return 0xabacabac;
- case 0x0014:
+ case 0xFF060014:
return 0x80;
default:
data = 0;
- if(TRACE_CPU_REG) logerror("Instruction: %08x READ MMIO(%08x): %08x & %08x\n", space.machine().firstcpu->pc(), offset << 2 | 0xFF050000, data, mem_mask);
+ if(TRACE_CPU_REG) logerror("Instruction: %08x READ MMIO(%08x): %08x & %08x\n", space.machine().firstcpu->pc(), address, data, mem_mask);
return data;
}
}
WRITE32_MEMBER( r9751_state::r9751_mmio_ff05_w )
{
- /* Unknown mask */
- if (mem_mask != 0xFFFFFFFF)
- logerror("Mask found: %08X Register: %08X PC: %08X\n", mem_mask, offset << 2 | 0xFF050000, space.machine().firstcpu->pc());
+ UINT32 address = offset * 4 + 0xFF050000;
- switch(offset << 2)
+ switch(address)
{
- case 0x0004:
+ case 0xFF050004:
reg_ff050004 = data;
return;
- case 0x000C: /* CPU LED hex display indicator */
+ case 0xFF05000C: /* CPU LED hex display indicator */
if(TRACE_LED) logerror("\n*** LED: %02x, Instruction: %08x ***\n\n", data, space.machine().firstcpu->pc());
return;
- case 0x0320:
+ case 0xFF050320:
timer_32khz_last = machine().time();
default:
- if(TRACE_CPU_REG) logerror("Instruction: %08x WRITE MMIO(%08x): %08x & %08x\n", space.machine().firstcpu->pc(), offset << 2 | 0xFF050000, data, mem_mask);
+ if(TRACE_CPU_REG) logerror("Instruction: %08x WRITE MMIO(%08x): %08x & %08x\n", space.machine().firstcpu->pc(), address, data, mem_mask);
return;
}
}
READ32_MEMBER( r9751_state::r9751_mmio_fff8_r )
{
- UINT32 data;
+ UINT32 data;
+ UINT32 address = offset * 4 + 0xFFF80000;
- switch(offset << 2)
+ switch(address)
{
- case 0x0040:
+ case 0xFFF80040:
return reg_fff80040;
default:
data = 0;
- if(TRACE_CPU_REG) logerror("Instruction: %08x READ MMIO(%08x): %08x & %08x\n", space.machine().firstcpu->pc(), offset << 2 | 0xFFF80000, data, mem_mask);
+ if(TRACE_CPU_REG) logerror("Instruction: %08x READ MMIO(%08x): %08x & %08x\n", space.machine().firstcpu->pc(), address, data, mem_mask);
return data;
}
}
WRITE32_MEMBER( r9751_state::r9751_mmio_fff8_w )
{
- /* Unknown mask */
- if (mem_mask != 0xFFFFFFFF)
- logerror("Mask found: %08X Register: %08X PC: %08X\n", mem_mask, offset << 2 | 0xFFF80000, space.machine().firstcpu->pc());
+ UINT32 address = offset * 4 + 0xFFF80000;
- switch(offset << 2)
+ switch(address)
{
- case 0x0040:
+ case 0xFFF80040:
reg_fff80040 = data;
return;
default:
- if(TRACE_CPU_REG) logerror("Instruction: %08x WRITE MMIO(%08x): %08x & %08x\n", space.machine().firstcpu->pc(), offset << 2 | 0xFFF80000, data, mem_mask);
+ if(TRACE_CPU_REG) logerror("Instruction: %08x WRITE MMIO(%08x): %08x & %08x\n", space.machine().firstcpu->pc(), address, data, mem_mask);
}
}
@@ -422,7 +373,6 @@ static ADDRESS_MAP_START(r9751_mem, AS_PROGRAM, 32, r9751_state)
AM_RANGE(0x00000000,0x00ffffff) AM_RAM AM_SHARE("main_ram") // 16MB
AM_RANGE(0x08000000,0x0800ffff) AM_ROM AM_REGION("prom", 0)
AM_RANGE(0x5FF00000,0x5FFFFFFF) AM_READWRITE(r9751_mmio_5ff_r, r9751_mmio_5ff_w)
- AM_RANGE(0xFF010000,0xFF01FFFF) AM_READWRITE(r9751_mmio_ff01_r, r9751_mmio_ff01_w)
AM_RANGE(0xFF050000,0xFF06FFFF) AM_READWRITE(r9751_mmio_ff05_r, r9751_mmio_ff05_w)
AM_RANGE(0xFFF80000,0xFFF8FFFF) AM_READWRITE(r9751_mmio_fff8_r, r9751_mmio_fff8_w)
//AM_RANGE(0xffffff00,0xffffffff) AM_RAM // Unknown area
diff --git a/src/mame/drivers/rampart.cpp b/src/mame/drivers/rampart.cpp
index 9c0827a39bc..523650d5915 100644
--- a/src/mame/drivers/rampart.cpp
+++ b/src/mame/drivers/rampart.cpp
@@ -105,12 +105,12 @@ WRITE16_MEMBER(rampart_state::latch_w)
/* lower byte being modified? */
if (ACCESSING_BITS_0_7)
{
- m_oki->set_output_gain(ALL_OUTPUTS, (data & 0x0020) ? 1.0f : 0.0f);
+ set_oki6295_volume((data & 0x0020) ? 100 : 0);
if (!(data & 0x0010))
m_oki->reset();
- m_ym2413->set_output_gain(ALL_OUTPUTS, ((data >> 1) & 7) / 7.0f);
+ set_ym2413_volume(((data >> 1) & 7) * 100 / 7);
if (!(data & 0x0001))
- m_ym2413->reset();
+ machine().device("ymsnd")->reset();
}
}
@@ -339,7 +339,7 @@ static MACHINE_CONFIG_START( rampart, rampart_state )
MCFG_CPU_PROGRAM_MAP(main_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", atarigen_state, video_int_gen)
- MCFG_SLAPSTIC_ADD("slapstic", 118)
+ MCFG_SLAPSTIC_ADD("slapstic")
MCFG_MACHINE_RESET_OVERRIDE(rampart_state,rampart)
@@ -481,7 +481,7 @@ DRIVER_INIT_MEMBER(rampart_state,rampart)
UINT8 *rom = memregion("maincpu")->base();
memcpy(&rom[0x140000], &rom[0x40000], 0x8000);
- slapstic_configure(*m_maincpu, 0x140000, 0x438000);
+ slapstic_configure(*m_maincpu, 0x140000, 0x438000, 118);
}
diff --git a/src/mame/drivers/relief.cpp b/src/mame/drivers/relief.cpp
index 82915064d71..b1ba6031cc9 100644
--- a/src/mame/drivers/relief.cpp
+++ b/src/mame/drivers/relief.cpp
@@ -84,7 +84,7 @@ WRITE16_MEMBER(relief_state::audio_control_w)
if (ACCESSING_BITS_0_7)
{
m_ym2413_volume = (data >> 1) & 15;
- m_ym2413->set_output_gain(ALL_OUTPUTS, (m_ym2413_volume * m_overall_volume) / (127.0f * 15.0f));
+ set_ym2413_volume((m_ym2413_volume * m_overall_volume * 100) / (127 * 15));
m_adpcm_bank = ((data >> 6) & 3) | (m_adpcm_bank & 4);
}
if (ACCESSING_BITS_8_15)
@@ -99,8 +99,8 @@ WRITE16_MEMBER(relief_state::audio_volume_w)
if (ACCESSING_BITS_0_7)
{
m_overall_volume = data & 127;
- m_ym2413->set_output_gain(ALL_OUTPUTS, (m_ym2413_volume * m_overall_volume) / (127.0f * 15.0f));
- m_oki->set_output_gain(ALL_OUTPUTS, m_overall_volume / 127.0f);
+ set_ym2413_volume((m_ym2413_volume * m_overall_volume * 100) / (127 * 15));
+ set_oki6295_volume(m_overall_volume * 100 / 127);
}
}
diff --git a/src/mame/drivers/savquest.cpp b/src/mame/drivers/savquest.cpp
index 77cb34fcc37..784278096fa 100644
--- a/src/mame/drivers/savquest.cpp
+++ b/src/mame/drivers/savquest.cpp
@@ -336,7 +336,7 @@ void savquest_state::vid_3dfx_init()
m_pci_3dfx_regs[0x08 / 4] = 2; // revision ID
m_pci_3dfx_regs[0x10 / 4] = 0xff000000;
m_pci_3dfx_regs[0x40 / 4] = 0x4000; //INITEN_SECONDARY_REV_ID
- m_voodoo->voodoo_set_init_enable(0x4000); //INITEN_SECONDARY_REV_ID
+ voodoo_set_init_enable(m_voodoo, 0x4000); //INITEN_SECONDARY_REV_ID
}
static UINT32 pci_3dfx_r(device_t *busdevice, device_t *device, int function, int reg, UINT32 mem_mask)
@@ -358,7 +358,7 @@ osd_printf_warning("PCI write: %x %x\n", reg, data);
}
else if (reg == 0x40)
{
- state->m_voodoo->voodoo_set_init_enable(data);
+ voodoo_set_init_enable(state->m_voodoo, data);
}
else if (reg == 0x54)
{
diff --git a/src/mame/drivers/sdk86.cpp b/src/mame/drivers/sdk86.cpp
index c655c0cd23e..dd341654595 100644
--- a/src/mame/drivers/sdk86.cpp
+++ b/src/mame/drivers/sdk86.cpp
@@ -208,5 +208,5 @@ ROM_END
/* Driver */
-/* YEAR NAME PARENT COMPAT MACHINE INPUT STATE INIT COMPANY FULLNAME FLAGS */
-COMP( 1979, sdk86, 0, 0, sdk86, sdk86, driver_device, 0, "Intel", "SDK-86", MACHINE_NO_SOUND_HW)
+/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */
+COMP( 1979, sdk86, 0, 0, sdk86, sdk86, driver_device, 0, "Intel", "SDK-86", MACHINE_NO_SOUND_HW)
diff --git a/src/mame/drivers/seattle.cpp b/src/mame/drivers/seattle.cpp
index 79b56322995..57295aec2ac 100644
--- a/src/mame/drivers/seattle.cpp
+++ b/src/mame/drivers/seattle.cpp
@@ -540,7 +540,7 @@ public:
UINT32 seattle_state::screen_update_seattle(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- return m_voodoo->voodoo_update(bitmap, cliprect) ? 0 : UPDATE_HAS_NOT_CHANGED;
+ return voodoo_update(m_voodoo, bitmap, cliprect) ? 0 : UPDATE_HAS_NOT_CHANGED;
}
@@ -876,7 +876,7 @@ void seattle_state::pci_3dfx_w(address_space &space, UINT8 reg, UINT8 type, UINT
break;
case 0x10: /* initEnable register */
- m_voodoo->voodoo_set_init_enable(data);
+ voodoo_set_init_enable(m_voodoo, data);
break;
}
if (LOG_PCI)
diff --git a/src/mame/drivers/segac2.cpp b/src/mame/drivers/segac2.cpp
index 86eb16efe5f..4c83e1fb618 100644
--- a/src/mame/drivers/segac2.cpp
+++ b/src/mame/drivers/segac2.cpp
@@ -1962,8 +1962,8 @@ ROM_END
ROM_START( potopoto ) /* Poto Poto (c)1994 Sega */
ROM_REGION( 0x200000, "maincpu", 0 )
- ROM_LOAD16_BYTE( "epr-16662a.ic32", 0x000000, 0x040000, CRC(bbd305d6) SHA1(1a4f4869fefac188c69bc67df0b625e43a0c3f1f) )
- ROM_LOAD16_BYTE( "epr-16661a.ic31", 0x000001, 0x040000, CRC(5a7d14f4) SHA1(a615b5f481256366db7b1c6302a8dcb69708102b) )
+ ROM_LOAD16_BYTE( "epr-16662.ic32", 0x000000, 0x040000, CRC(bbd305d6) SHA1(1a4f4869fefac188c69bc67df0b625e43a0c3f1f) )
+ ROM_LOAD16_BYTE( "epr-16661.ic31", 0x000001, 0x040000, CRC(5a7d14f4) SHA1(a615b5f481256366db7b1c6302a8dcb69708102b) )
ROM_REGION( 0x040000, "upd", 0 )
ROM_LOAD( "epr-16660.ic4", 0x000000, 0x040000, CRC(8251c61c) SHA1(03eef3aa0bdde2c1d93128648f54fd69278d85dd) )
@@ -2506,7 +2506,7 @@ GAME( 1992, wwmarine, 0, segac2, wwmarine, segac2_state, bloxeedc, ROT0,
// not really sure how this should hook up, things like the 'sold out' flags could be mechanical sensors, or from another MCU / CPU board in the actual popcorn part of the machine?
GAME( 1993, sonicpop, 0, segac2, sonicpop, segac2_state, bloxeedc, ROT0, "Sega", "SegaSonic Popcorn Shop (Rev B)", MACHINE_MECHANICAL ) // region DSW for USA / Export / Japan, still speaks Japanese tho. 'Mechanical' part isn't emulated
-GAME( 1994, potopoto, 0, segac2, potopoto, segac2_state, potopoto, ROT0, "Sega", "Poto Poto (Japan, Rev A)", 0 )
+GAME( 1994, potopoto, 0, segac2, potopoto, segac2_state, potopoto, ROT0, "Sega", "Poto Poto (Japan)", 0 )
GAME( 1994, stkclmns, 0, segac2, stkclmns, segac2_state, stkclmns, ROT0, "Sega", "Stack Columns (World)", 0 )
GAME( 1994, stkclmnsj, stkclmns, segac2, stkclmns, segac2_state, stkclmnj, ROT0, "Sega", "Stack Columns (Japan)", 0 )
diff --git a/src/mame/drivers/segas16b.cpp b/src/mame/drivers/segas16b.cpp
index dfb04f270a3..aa15bad1857 100644
--- a/src/mame/drivers/segas16b.cpp
+++ b/src/mame/drivers/segas16b.cpp
@@ -7143,7 +7143,6 @@ ROM_END
// Sonic Boom, Sega System 16B
// CPU: FD1094 (317-0053)
// ROM Board type: 171-5358
-// Sega ID# for ROM board: 834-6532-01
//
// Pos. Silk Type Part Pos. Silk Type Part
//
diff --git a/src/mame/drivers/seibuspi.cpp b/src/mame/drivers/seibuspi.cpp
index 3543985a418..161d87ae25f 100644
--- a/src/mame/drivers/seibuspi.cpp
+++ b/src/mame/drivers/seibuspi.cpp
@@ -3277,44 +3277,6 @@ ROM_START( rdft2ja ) /* SPI Cart, Japan */
ROM_LOAD("flash0_blank_region01.u1053", 0x000000, 0x100000, CRC(7ae7ab76) SHA1(a2b196f470bf64af94002fc4e2640fadad00418f) )
ROM_END
-
-ROM_START( rdft2it ) /* SPI Cart, Italy */
- ROM_REGION32_LE( 0x200000, "maincpu", 0 ) /* i386 program */
- ROM_LOAD32_BYTE("seibu1.bin",0x000000, 0x80000, CRC(501b92a9) SHA1(3e1c5cc63906ec7b97a3478557ec2638c515d726) )
- ROM_LOAD32_BYTE("seibu2.bin",0x000001, 0x80000, CRC(ec73a767) SHA1(83f3905afe49401793c0ea0193cb31d3ba1e1739) )
- ROM_LOAD32_BYTE("seibu3.bin",0x000002, 0x80000, CRC(e66243b2) SHA1(54e67af37a4586fd1afc79085ed433d599e1bb87) )
- ROM_LOAD32_BYTE("seibu4.bin",0x000003, 0x80000, CRC(92b7b73e) SHA1(128649b2a6a0616113bd0f9846fb6cf814ae326d) )
-
- ROM_REGION( 0x40000, "audiocpu", ROMREGION_ERASE00 ) /* 256K RAM, ROM from Z80 point-of-view */
-
- ROM_REGION( 0x30000, "gfx1", ROMREGION_ERASEFF ) /* text layer roms */
- ROM_LOAD24_BYTE("seibu5.bin", 0x000001, 0x10000, CRC(377cac2f) SHA1(f7c9323d79b77f6c8c02ba2c6cdca127d6e5cb5c) )
- ROM_LOAD24_BYTE("seibu6.bin", 0x000000, 0x10000, CRC(42bd5372) SHA1(c38df85b25070db9640eac541f71c0511bab0c98) )
- ROM_LOAD24_BYTE("seibu7.bin", 0x000002, 0x10000, CRC(1efaac7e) SHA1(8252af56dcb7a6306dc3422070176778e3c511c2) )
-
- ROM_REGION( 0xc00000, "gfx2", ROMREGION_ERASEFF ) /* background layer roms */
- ROM_LOAD24_WORD("bg-1d.u0535", 0x000000, 0x400000, CRC(6143f576) SHA1(c034923d0663d9ef24357a03098b8cb81dbab9f8) )
- ROM_LOAD24_BYTE("bg-1p.u0537", 0x000002, 0x200000, CRC(55e64ef7) SHA1(aae991268948d07342ee8ba1b3761bd180aab8ec) )
- ROM_LOAD24_WORD("bg-2d.u0536", 0x600000, 0x400000, CRC(c607a444) SHA1(dc1aa96a42e9394ca6036359670a4ec6f830c96d) )
- ROM_LOAD24_BYTE("bg-2p.u0538", 0x600002, 0x200000, CRC(f0830248) SHA1(6075df96b49e70d2243fef691e096119e7a4d044) )
-
- ROM_REGION( 0x1200000, "gfx3", 0 ) /* sprites */
- ROM_LOAD("obj3.u0434", 0x0000000, 0x400000, CRC(e08f42dc) SHA1(5188d71d4355eaf43ea8893b4cfc4fe80cc24f41) )
- ROM_LOAD("obj3b.u0433", 0x0400000, 0x200000, CRC(1b6a523c) SHA1(99a420dbc8e22e7832ccda7cec9fa661a2a2687a) )
- ROM_LOAD("obj2.u0431", 0x0600000, 0x400000, CRC(7aeadd8e) SHA1(47103c0579240c5b1add4d0b164eaf76f5fa97f0) )
- ROM_LOAD("obj2b.u0432", 0x0a00000, 0x200000, CRC(5d790a5d) SHA1(1ed5d4ad4c9a7e505ce35dcc90d184c26ce891dc) )
- ROM_LOAD("obj1.u0429", 0x0c00000, 0x400000, CRC(c2c50f02) SHA1(b81397b5800c6d49f58b7ac7ff6eac56da3c5257) )
- ROM_LOAD("obj1b.u0430", 0x1000000, 0x200000, CRC(5259321f) SHA1(3c70c1147e49f81371d0f60f7108d9718d56faf4) )
-
- ROM_REGION32_LE( 0xa00000, "sound01", ROMREGION_ERASE00 ) /* sound roms */
- ROM_LOAD32_WORD("pcm.u0217", 0x000000, 0x100000, CRC(2edc30b5) SHA1(c25d690d633657fc3687636b9070f36bd305ae06) )
- ROM_CONTINUE( 0x400000, 0x100000 )
- ROM_LOAD32_BYTE("seibu8.bin", 0x800000, 0x080000, CRC(b7bd3703) SHA1(6427a7e6de10d6743d6e64b984a1d1c647f5643a) )
-
- ROM_REGION( 0x100000, "soundflash1", 0 ) /* on SPI motherboard */
- ROM_LOAD("flash0_blank_region92.u1053", 0x000000, 0x100000, CRC(204d82d0) SHA1(444f4aefa27d8f5d1a2f7f08f826ea84b0ccbd02) )
-ROM_END
-
ROM_START( rdft2a ) /* SPI Cart, Asia (Metrotainment license); SPI PCB is marked "(C)1997 SXX2C ROM SUB8" */
// The SUB8 board is also capable of having two 23C8100 roms at U0223 and U0219 for PRG instead of the four roms below.
ROM_REGION32_LE( 0x200000, "maincpu", 0 ) /* i386 program, all are 27C040 */
@@ -3886,20 +3848,13 @@ GAME( 1996, rdftauge, rdft, spi, spi_3button, seibuspi_state, rdft,
GAME( 1996, rdftit, rdft, spi, spi_3button, seibuspi_state, rdft, ROT270, "Seibu Kaihatsu", "Raiden Fighters (Italy)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
GAME( 1996, rdfta, rdft, spi, spi_3button, seibuspi_state, rdft, ROT270, "Seibu Kaihatsu", "Raiden Fighters (Austria)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
-// this is one revision
GAME( 1997, rdft2, 0, spi, spi_2button, seibuspi_state, rdft2, ROT270, "Seibu Kaihatsu (Tuning license)", "Raiden Fighters 2 - Operation Hell Dive (Germany)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
+GAME( 1997, rdft2u, rdft2, spi, spi_2button, seibuspi_state, rdft2, ROT270, "Seibu Kaihatsu (Fabtek license)", "Raiden Fighters 2 - Operation Hell Dive (US)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
GAME( 1997, rdft2j, rdft2, spi, spi_2button, seibuspi_state, rdft2, ROT270, "Seibu Kaihatsu", "Raiden Fighters 2 - Operation Hell Dive (Japan set 1)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
-GAME( 1997, rdft2a, rdft2, spi, spi_2button, seibuspi_state, rdft2, ROT270, "Seibu Kaihatsu (Metrotainment license)", "Raiden Fighters 2 - Operation Hell Dive (Hong Kong)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
-// this is another
GAME( 1997, rdft2ja, rdft2, spi, spi_2button, seibuspi_state, rdft2, ROT270, "Seibu Kaihatsu", "Raiden Fighters 2 - Operation Hell Dive (Japan set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
+GAME( 1997, rdft2a, rdft2, spi, spi_2button, seibuspi_state, rdft2, ROT270, "Seibu Kaihatsu (Metrotainment license)", "Raiden Fighters 2 - Operation Hell Dive (Hong Kong)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
GAME( 1997, rdft2aa, rdft2, spi, spi_2button, seibuspi_state, rdft2, ROT270, "Seibu Kaihatsu (Dream Island license)", "Raiden Fighters 2 - Operation Hell Dive (Korea)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
-GAME( 1997, rdft2it, rdft2, spi, spi_2button, seibuspi_state, rdft2, ROT270, "Seibu Kaihatsu", "Raiden Fighters 2 - Operation Hell Dive (Italy)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
-// these 2 are both unique
GAME( 1997, rdft2t, rdft2, spi, spi_2button, seibuspi_state, rdft2, ROT270, "Seibu Kaihatsu", "Raiden Fighters 2 - Operation Hell Dive (Taiwan)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
-GAME( 1997, rdft2u, rdft2, spi, spi_2button, seibuspi_state, rdft2, ROT270, "Seibu Kaihatsu (Fabtek license)", "Raiden Fighters 2 - Operation Hell Dive (US)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
-
-
-
GAME( 1998, rfjet, 0, spi, spi_2button, seibuspi_state, rfjet, ROT270, "Seibu Kaihatsu (Tuning license)", "Raiden Fighters Jet (Germany)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
GAME( 1998, rfjetu, rfjet, spi, spi_2button, seibuspi_state, rfjet, ROT270, "Seibu Kaihatsu (Fabtek license)", "Raiden Fighters Jet (US)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
diff --git a/src/mame/drivers/sigmab52.cpp b/src/mame/drivers/sigmab52.cpp
index 38b535774ea..75299bfd274 100644
--- a/src/mame/drivers/sigmab52.cpp
+++ b/src/mame/drivers/sigmab52.cpp
@@ -10,10 +10,9 @@
Games running on this hardware:
- * Joker's Wild (B52 system, BP55114-V1104, Ver.054NMV), 199?, Sigma.
- * Joker's Wild (B52 system, BP55114-V1104, Ver.054NMV, Harrah's GFX), 199?, Sigma.
- * Joker's Wild (B52 system, WP02001-054, Ver.031WM), 199?, Sigma.
- * Super 8 Ways FC (DB98103-011, Fruit combination), 1989, Sigma.
+ * Joker's Wild (B52 system, set 1), 199?, Sigma.
+ * Joker's Wild (B52 system, set 2), 199?, Sigma.
+ * Joker's Wild (B52 system, Harrah's GFX), 199?, Sigma.
The HD63484 ACRTC support is a bit hacky and incomplete,
@@ -619,12 +618,8 @@ MACHINE_CONFIG_END
* Rom Load *
*************************/
-/* Joker's Wild
- BP55114-V1104, Ver.054NMV
- Modern cards set. Normal cardsback.
-*/
ROM_START( jwildb52 )
- ROM_REGION( 0x10000, "maincpu", 0 ) // BP55114-V1104, Ver.054NMV
+ ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "poker.ic95", 0x00000, 0x10000, CRC(07eb9007) SHA1(ee814c40c6d8c9ea9e5246cae0cfa2c30f2976ed) )
ROM_REGION16_BE( 0x40000, "gfx1", 0 )
@@ -641,32 +636,6 @@ ROM_START( jwildb52 )
ROM_END
-/* Joker's Wild
- BP55114-V1104, Ver.054NMV
- Modern cards set. Harrah's cardsback.
-*/
-ROM_START( jwildb52h )
- ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "jokers_wild_ver_xxx.ic95", 0x00000, 0x10000, CRC(07eb9007) SHA1(ee814c40c6d8c9ea9e5246cae0cfa2c30f2976ed) )
-
- ROM_REGION16_BE( 0x40000, "gfx1", 0 )
- ROM_LOAD32_BYTE( "2006-1_harrahs.ic45", 0x00003, 0x10000, CRC(6e6871dc) SHA1(5dfc99c808c06ec34838324181988d4550c1ed1a) )
- ROM_LOAD32_BYTE( "2006-2_harrahs.ic46", 0x00001, 0x10000, CRC(1039c62d) SHA1(11f0dbcbbff5f6e9028a0305f7e16a0654be40d4) )
- ROM_LOAD32_BYTE( "2006-3_harrahs.ic47", 0x00000, 0x10000, CRC(d66af95a) SHA1(70bba1aeea9221541b82642045ce8ecf26e1d08c) )
- ROM_LOAD32_BYTE( "2006-4_harrahs.ic48", 0x00002, 0x10000, CRC(2bf196cb) SHA1(686ca0dd84c48f51efee5349ea3db65531dd4a52) )
-
- ROM_REGION( 0x8000, "audiocpu", 0 )
- ROM_LOAD( "poker-01-00.43", 0x0000, 0x8000, CRC(2712d44c) SHA1(295526b27676cd97cbf111d47305d63c2b3ea50d) )
-
- ROM_REGION( 0x0100, "proms", 0 )
- ROM_LOAD( "mb7118.41", 0x0000, 0x0100, CRC(b362f9e2) SHA1(3963b40389ed6584e4cd96ab48849552857d99af) )
-ROM_END
-
-
-/* Joker's Wild
- WP02001-054, Ver.031WM
- Classic cards set. Normal cardsback.
-*/
ROM_START( jwildb52a )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "sigm_wrk.bin", 0x00000, 0x10000, CRC(15c83c6c) SHA1(7a05bd94ea8b1ad051fbe6580a6550d4bb47dd15) )
@@ -687,10 +656,24 @@ ROM_START( jwildb52a )
ROM_END
-/* Super 8 Ways FC
- Fruit combination.
- DB98103-011.
-*/
+ROM_START( jwildb52h )
+ ROM_REGION( 0x10000, "maincpu", 0 )
+ ROM_LOAD( "jokers_wild_ver_xxx.ic95", 0x00000, 0x10000, CRC(07eb9007) SHA1(ee814c40c6d8c9ea9e5246cae0cfa2c30f2976ed) )
+
+ ROM_REGION16_BE( 0x40000, "gfx1", 0 )
+ ROM_LOAD32_BYTE( "2006-1_harrahs.ic45", 0x00003, 0x10000, CRC(6e6871dc) SHA1(5dfc99c808c06ec34838324181988d4550c1ed1a) )
+ ROM_LOAD32_BYTE( "2006-2_harrahs.ic46", 0x00001, 0x10000, CRC(1039c62d) SHA1(11f0dbcbbff5f6e9028a0305f7e16a0654be40d4) )
+ ROM_LOAD32_BYTE( "2006-3_harrahs.ic47", 0x00000, 0x10000, CRC(d66af95a) SHA1(70bba1aeea9221541b82642045ce8ecf26e1d08c) )
+ ROM_LOAD32_BYTE( "2006-4_harrahs.ic48", 0x00002, 0x10000, CRC(2bf196cb) SHA1(686ca0dd84c48f51efee5349ea3db65531dd4a52) )
+
+ ROM_REGION( 0x8000, "audiocpu", 0 )
+ ROM_LOAD( "poker-01-00.43", 0x0000, 0x8000, CRC(2712d44c) SHA1(295526b27676cd97cbf111d47305d63c2b3ea50d) )
+
+ ROM_REGION( 0x0100, "proms", 0 )
+ ROM_LOAD( "mb7118.41", 0x0000, 0x0100, CRC(b362f9e2) SHA1(3963b40389ed6584e4cd96ab48849552857d99af) )
+ROM_END
+
+
ROM_START( s8waysfc )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "dv98103.011", 0x00000, 0x10000, CRC(416190a1) SHA1(e2738644efc6c2adcea2470b482f3f818ed9af8d) )
@@ -715,7 +698,7 @@ ROM_END
* Driver Init *
*************************/
-DRIVER_INIT_MEMBER(sigmab52_state, jwildb52)
+DRIVER_INIT_MEMBER(sigmab52_state,jwildb52)
{
}
@@ -724,8 +707,8 @@ DRIVER_INIT_MEMBER(sigmab52_state, jwildb52)
* Game Drivers *
*************************/
-/* YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS */
-GAMEL( 199?, jwildb52, 0, jwildb52, jwildb52, sigmab52_state, jwildb52, ROT0, "Sigma", "Joker's Wild (B52 system, BP55114-V1104, Ver.054NMV)", MACHINE_NOT_WORKING, layout_sigmab52 )
-GAMEL( 199?, jwildb52h, jwildb52, jwildb52, jwildb52, sigmab52_state, jwildb52, ROT0, "Sigma", "Joker's Wild (B52 system, BP55114-V1104, Ver.054NMV, Harrah's GFX)", MACHINE_NOT_WORKING, layout_sigmab52 )
-GAMEL( 199?, jwildb52a, jwildb52, jwildb52, jwildb52, sigmab52_state, jwildb52, ROT0, "Sigma", "Joker's Wild (B52 system, WP02001-054, Ver.031WM)", MACHINE_NOT_WORKING, layout_sigmab52 )
-GAME ( 1989, s8waysfc, 0, jwildb52, s8waysfc, sigmab52_state, jwildb52, ROT0, "Sigma", "Super 8 Ways FC (DB98103-011, Fruit combination)", MACHINE_NOT_WORKING )
+/* YEAR NAME PARENT MACHINE INPUT INIT ROT COMPANY FULLNAME FLAGS */
+GAMEL( 199?, jwildb52, 0, jwildb52, jwildb52, sigmab52_state, jwildb52, ROT0, "Sigma", "Joker's Wild (B52 system, set 1)", MACHINE_NOT_WORKING, layout_sigmab52 )
+GAMEL( 199?, jwildb52a, jwildb52, jwildb52, jwildb52, sigmab52_state, jwildb52, ROT0, "Sigma", "Joker's Wild (B52 system, set 2)", MACHINE_NOT_WORKING, layout_sigmab52 )
+GAMEL( 199?, jwildb52h, jwildb52, jwildb52, jwildb52, sigmab52_state, jwildb52, ROT0, "Sigma", "Joker's Wild (B52 system, Harrah's GFX)", MACHINE_NOT_WORKING, layout_sigmab52 )
+GAME ( 199?, s8waysfc, 0, jwildb52, s8waysfc, sigmab52_state, jwildb52, ROT0, "Sigma", "Super 8 Ways FC (Fruit combination)", MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/slapfght.cpp b/src/mame/drivers/slapfght.cpp
index 413cf8651b2..98f7578ac71 100644
--- a/src/mame/drivers/slapfght.cpp
+++ b/src/mame/drivers/slapfght.cpp
@@ -1832,166 +1832,72 @@ ROM_START( slapfighb3 )
ROM_LOAD( "sf_col19.bin", 0x0200, 0x0100, CRC(5cbf9fbf) SHA1(abfa58fa4e44ebc56f2e0fac9bcc36164c845fa3) )
ROM_END
-/*
-
-Guardian
-1986 Taito Corporation
-
-The Guardian PCB is exactly the same PCB as Tiger Heli, including the
-edge connector pinout.
-
-PCB Layout
-----------
-
-Top Board
-
-Sticker - M6100151B 860010898
-GX-006-A MADE IN JAPAN
-|--------------------------------------------------|
-|VOL ROM21.12Q 2148 |
-|MB3712 2148 |
-| ROM19.12P 2148 |
-| 2148 |
-| ROM20.12M 6264 |
-| |
-| 6264 |
-| |
-|2 A68_13.8J A68_12.6J 6264 |
-|2 YM2149F |
-|W A68_11.8H A68_10.6H 6264 |
-|A DSW1 DSW2 |
-|Y 2148 |
-| YM2149F |
-| ROM16.1E|
-| |
-| A68_03.12D ROM17.1C|
-| |
-| ROM18.2B |
-| Z80A 6116 |
-| |
-|-----|----------|--------------|----------|-------|
- |----------| |----------|
-Notes:
- YM2149F - Clock 1.500MHz (36/24)
- Z80A - Clock 3.000MHz (36/12)
- 6116 - 2kx8 SRAM
- 6264 - 8kx8 SRAM
- MB3712 - Audio Power AMP
- 2148 - 1kx4 SRAM
- DSW1/2 - 8-position DIP-switch
- VSync - 56.91313Hz
- HSync - 14.97090kHz
- A68_03 - 2764 EPROM
- A68_10 to 13 - 27256 EPROM
- ROM18 - 82S123 PROM
-ROM16/17/19/20/21 - 82S129 PROM
-
-
-Bottom Board
-
-GX-006-B MADE IN JAPAN
-|--------------------------------------------------|
-| A68_14.6A |
-| |
-| ROM14.2C ROM15.8B |
-| |
-| |
-| 6116 A68_05.6F |
-| 36MHz |
-| 6116 A68_04.6G |
-| |
-| |
-| |
-| |
-| 6116 |
-| A68_02.8K |
-| |
-| A68_09.4M A47_08.6M X |
-| 6116 |
-| 6116 A68_07.6N A68_01.8N |
-| |
-| 6116 A68_06.6P A68_00.8P |
-| Z80B |
-|-----|----------|--------------|----------|-------|
- |----------| |----------|
-Notes:
- Z80B - Clock 6.000MHz (36/6)
- 6116 - 2kx8 SRAM
- ROM14/15 - 82S129 PROM
- A68_00/01 - 27128 EPROM
-A68_02 & 06 to 09 - 27256 EPROM
- A68_04/05 - 2764 EPROM
- A68_14 - Motorola MC68705P5 Micro-Controller (protected). Clock 3.000MHz [36/12]
- X - Unpopulated socket
-
-*/
-
ROM_START( grdian )
ROM_REGION( 0x18000, "maincpu", 0 ) /* Region 0 - main cpu code */
- ROM_LOAD( "a68_00-1.8p", 0x00000, 0x4000, CRC(6a8bdc6c) SHA1(c923bca539bd2eb9a34cb9c7a67a199e28bc081a) )
- ROM_LOAD( "a68_01-1.8n", 0x04000, 0x4000, CRC(ebe8db3c) SHA1(9046d6e63c33fc9cbd48b90dcbcc0badf1d3b9ba) )
- ROM_LOAD( "a68_02-1.8k", 0x10000, 0x8000, CRC(343e8415) SHA1(00b98055277a0ddfb7d0bda6537df10a4049533e) )
+ ROM_LOAD( "a68_00-1", 0x00000, 0x4000, CRC(6a8bdc6c) SHA1(c923bca539bd2eb9a34cb9c7a67a199e28bc081a) )
+ ROM_LOAD( "a68_01-1", 0x04000, 0x4000, CRC(ebe8db3c) SHA1(9046d6e63c33fc9cbd48b90dcbcc0badf1d3b9ba) )
+ ROM_LOAD( "a68_02-1", 0x10000, 0x8000, CRC(343e8415) SHA1(00b98055277a0ddfb7d0bda6537df10a4049533e) )
ROM_REGION( 0x10000, "audiocpu", 0 ) /* Region 3 - sound cpu code */
- ROM_LOAD( "a68-03.12d", 0x0000, 0x2000, CRC(18daa44c) SHA1(1a3d22a186c591321d1b836ee30d89fba4771122) )
+ ROM_LOAD( "a68-03", 0x0000, 0x2000, CRC(18daa44c) SHA1(1a3d22a186c591321d1b836ee30d89fba4771122) )
ROM_REGION( 0x0800, "mcu", 0 ) /* 2k for the microcontroller */
- ROM_LOAD( "a68_14.6a", 0x0000, 0x0800, NO_DUMP )
+ ROM_LOAD( "a68_14", 0x0000, 0x0800, NO_DUMP )
ROM_REGION( 0x04000, "gfx1", 0 ) /* Region 1 - temporary for gfx */
- ROM_LOAD( "a68_05-1.6f", 0x00000, 0x2000, CRC(06f60107) SHA1(c5dcf0c7a5863ea960ee747d2d7ec7ac8bb7d3af) ) /* Chars */
- ROM_LOAD( "a68_04-1.6g", 0x02000, 0x2000, CRC(1fc8f277) SHA1(59dc1a0fad23b1e98abca3d0b1685b9d2939b059) )
+ ROM_LOAD( "a68_05-1", 0x00000, 0x2000, CRC(06f60107) SHA1(c5dcf0c7a5863ea960ee747d2d7ec7ac8bb7d3af) ) /* Chars */
+ ROM_LOAD( "a68_04-1", 0x02000, 0x2000, CRC(1fc8f277) SHA1(59dc1a0fad23b1e98abca3d0b1685b9d2939b059) )
ROM_REGION( 0x20000, "gfx2", 0 ) /* Region 1 - temporary for gfx */
- ROM_LOAD( "a68_09.4m", 0x00000, 0x8000, CRC(a293cc2e) SHA1(a2c2598e92982d13b51cbb6efb4b963142233433) ) /* Tiles */
- ROM_LOAD( "a68_08.6m", 0x08000, 0x8000, CRC(37662375) SHA1(46ba8a3f0b553d476ecf431d0d20556896b4ca43) )
- ROM_LOAD( "a68_07.6n", 0x10000, 0x8000, CRC(cf1a964c) SHA1(e9223c8d4f3bdafed193a1ded63e377f16f45e17) )
- ROM_LOAD( "a68_06.6p", 0x18000, 0x8000, CRC(05f9eb9a) SHA1(a71640a63b259799086d361ef293aa26cec46a0c) )
+ ROM_LOAD( "a68_09", 0x00000, 0x8000, CRC(a293cc2e) SHA1(a2c2598e92982d13b51cbb6efb4b963142233433) ) /* Tiles */
+ ROM_LOAD( "a68_08", 0x08000, 0x8000, CRC(37662375) SHA1(46ba8a3f0b553d476ecf431d0d20556896b4ca43) )
+ ROM_LOAD( "a68_07", 0x10000, 0x8000, CRC(cf1a964c) SHA1(e9223c8d4f3bdafed193a1ded63e377f16f45e17) )
+ ROM_LOAD( "a68_06", 0x18000, 0x8000, CRC(05f9eb9a) SHA1(a71640a63b259799086d361ef293aa26cec46a0c) )
ROM_REGION( 0x20000, "gfx3", 0 ) /* Region 1 - temporary for gfx */
- ROM_LOAD( "a68-13.8j", 0x00000, 0x8000, CRC(643fb282) SHA1(d904d3c27c2b56341929c5eed4ea97e948c53c34) ) /* Sprites */
- ROM_LOAD( "a68-12.6j", 0x08000, 0x8000, CRC(11f74e32) SHA1(02d8b4cc679f45a02c4989f2b62cde91b7418235) )
- ROM_LOAD( "a68-11.8h", 0x10000, 0x8000, CRC(f24158cf) SHA1(db4c6b68a488b0798ea5f793ac8ced283a8ecab2) )
- ROM_LOAD( "a68-10.6h", 0x18000, 0x8000, CRC(83161ed0) SHA1(a6aa28f22f487dc3a2ec07935e6d42bcdd1eff81) )
+ ROM_LOAD( "a68-13", 0x00000, 0x8000, CRC(643fb282) SHA1(d904d3c27c2b56341929c5eed4ea97e948c53c34) ) /* Sprites */
+ ROM_LOAD( "a68-12", 0x08000, 0x8000, CRC(11f74e32) SHA1(02d8b4cc679f45a02c4989f2b62cde91b7418235) )
+ ROM_LOAD( "a68-11", 0x10000, 0x8000, CRC(f24158cf) SHA1(db4c6b68a488b0798ea5f793ac8ced283a8ecab2) )
+ ROM_LOAD( "a68-10", 0x18000, 0x8000, CRC(83161ed0) SHA1(a6aa28f22f487dc3a2ec07935e6d42bcdd1eff81) )
ROM_REGION( 0x0300, "proms", 0 )
- ROM_LOAD( "rom21.12q", 0x0000, 0x0100, CRC(d6360b4d) SHA1(3e64548c82a3378fc091e104cdc2b0c7e592fc44) )
- ROM_LOAD( "rom20.12m", 0x0100, 0x0100, CRC(4ca01887) SHA1(2892c89d5e60f1d10593adffff55c1a9654e8209) )
- ROM_LOAD( "rom19.12p", 0x0200, 0x0100, CRC(513224f0) SHA1(15b34612206138f6fc5f7478925b1fff2ed56aa8) )
+ ROM_LOAD( "rom21", 0x0000, 0x0100, CRC(d6360b4d) SHA1(3e64548c82a3378fc091e104cdc2b0c7e592fc44) )
+ ROM_LOAD( "rom20", 0x0100, 0x0100, CRC(4ca01887) SHA1(2892c89d5e60f1d10593adffff55c1a9654e8209) )
+ ROM_LOAD( "rom19", 0x0200, 0x0100, CRC(513224f0) SHA1(15b34612206138f6fc5f7478925b1fff2ed56aa8) )
ROM_END
ROM_START( getstarj )
ROM_REGION( 0x18000, "maincpu", 0 ) /* Region 0 - main cpu code */
- ROM_LOAD( "a68_00.8p", 0x00000, 0x4000, CRC(ad1a0143) SHA1(0d9adeb12bd4d5ad11e5bada0cd7498bc565c1db) )
- ROM_LOAD( "a68_01.8n", 0x04000, 0x4000, CRC(3426eb7c) SHA1(e91db45a650a1bfefd7c12c7553b647bc916c7c8) )
- ROM_LOAD( "a68_02.8k", 0x10000, 0x8000, CRC(3567da17) SHA1(29d698606d0bd30abfc3171d79bfad95b0de89fc) )
+ ROM_LOAD( "a68_00.bin", 0x00000, 0x4000, CRC(ad1a0143) SHA1(0d9adeb12bd4d5ad11e5bada0cd7498bc565c1db) )
+ ROM_LOAD( "a68_01.bin", 0x04000, 0x4000, CRC(3426eb7c) SHA1(e91db45a650a1bfefd7c12c7553b647bc916c7c8) )
+ ROM_LOAD( "a68_02.bin", 0x10000, 0x8000, CRC(3567da17) SHA1(29d698606d0bd30abfc3171d79bfad95b0de89fc) )
ROM_REGION( 0x10000, "audiocpu", 0 ) /* Region 3 - sound cpu code */
- ROM_LOAD( "a68-03.12d", 0x00000, 0x2000, CRC(18daa44c) SHA1(1a3d22a186c591321d1b836ee30d89fba4771122) )
+ ROM_LOAD( "a68-03", 0x00000, 0x2000, CRC(18daa44c) SHA1(1a3d22a186c591321d1b836ee30d89fba4771122) )
ROM_REGION( 0x0800, "mcu", 0 ) /* 2k for the microcontroller */
- ROM_LOAD( "68705.6a", 0x0000, 0x0800, NO_DUMP )
+ ROM_LOAD( "68705.bin", 0x0000, 0x0800, NO_DUMP )
ROM_REGION( 0x04000, "gfx1", 0 ) /* Region 1 - temporary for gfx */
- ROM_LOAD( "a68_05.6f", 0x00000, 0x2000, CRC(e3d409e7) SHA1(0b6be4767f110729f4dd1a472ef8d9a0c718b684) ) /* Chars */
- ROM_LOAD( "a68_04.6g", 0x02000, 0x2000, CRC(6e5ac9d4) SHA1(74f90b7a1ceb3b1c2fd92dff100d92dea0155530) )
+ ROM_LOAD( "a68_05.bin", 0x00000, 0x2000, CRC(e3d409e7) SHA1(0b6be4767f110729f4dd1a472ef8d9a0c718b684) ) /* Chars */
+ ROM_LOAD( "a68_04.bin", 0x02000, 0x2000, CRC(6e5ac9d4) SHA1(74f90b7a1ceb3b1c2fd92dff100d92dea0155530) )
ROM_REGION( 0x20000, "gfx2", 0 ) /* Region 1 - temporary for gfx */
- ROM_LOAD( "a68_09.4m", 0x00000, 0x8000, CRC(a293cc2e) SHA1(a2c2598e92982d13b51cbb6efb4b963142233433) ) /* Tiles */
- ROM_LOAD( "a68_08.6m", 0x08000, 0x8000, CRC(37662375) SHA1(46ba8a3f0b553d476ecf431d0d20556896b4ca43) )
- ROM_LOAD( "a68_07.6n", 0x10000, 0x8000, CRC(cf1a964c) SHA1(e9223c8d4f3bdafed193a1ded63e377f16f45e17) )
- ROM_LOAD( "a68_06.6p", 0x18000, 0x8000, CRC(05f9eb9a) SHA1(a71640a63b259799086d361ef293aa26cec46a0c) )
+ ROM_LOAD( "a68_09", 0x00000, 0x8000, CRC(a293cc2e) SHA1(a2c2598e92982d13b51cbb6efb4b963142233433) ) /* Tiles */
+ ROM_LOAD( "a68_08", 0x08000, 0x8000, CRC(37662375) SHA1(46ba8a3f0b553d476ecf431d0d20556896b4ca43) )
+ ROM_LOAD( "a68_07", 0x10000, 0x8000, CRC(cf1a964c) SHA1(e9223c8d4f3bdafed193a1ded63e377f16f45e17) )
+ ROM_LOAD( "a68_06", 0x18000, 0x8000, CRC(05f9eb9a) SHA1(a71640a63b259799086d361ef293aa26cec46a0c) )
ROM_REGION( 0x20000, "gfx3", 0 ) /* Region 1 - temporary for gfx */
- ROM_LOAD( "a68-13.8j", 0x00000, 0x8000, CRC(643fb282) SHA1(d904d3c27c2b56341929c5eed4ea97e948c53c34) ) /* Sprites */
- ROM_LOAD( "a68-12.6j", 0x08000, 0x8000, CRC(11f74e32) SHA1(02d8b4cc679f45a02c4989f2b62cde91b7418235) )
- ROM_LOAD( "a68-11.8h", 0x10000, 0x8000, CRC(f24158cf) SHA1(db4c6b68a488b0798ea5f793ac8ced283a8ecab2) )
- ROM_LOAD( "a68-10.6h", 0x18000, 0x8000, CRC(83161ed0) SHA1(a6aa28f22f487dc3a2ec07935e6d42bcdd1eff81) )
+ ROM_LOAD( "a68-13", 0x00000, 0x8000, CRC(643fb282) SHA1(d904d3c27c2b56341929c5eed4ea97e948c53c34) ) /* Sprites */
+ ROM_LOAD( "a68-12", 0x08000, 0x8000, CRC(11f74e32) SHA1(02d8b4cc679f45a02c4989f2b62cde91b7418235) )
+ ROM_LOAD( "a68-11", 0x10000, 0x8000, CRC(f24158cf) SHA1(db4c6b68a488b0798ea5f793ac8ced283a8ecab2) )
+ ROM_LOAD( "a68-10", 0x18000, 0x8000, CRC(83161ed0) SHA1(a6aa28f22f487dc3a2ec07935e6d42bcdd1eff81) )
ROM_REGION( 0x0300, "proms", 0 )
- ROM_LOAD( "rom21.12q", 0x0000, 0x0100, CRC(d6360b4d) SHA1(3e64548c82a3378fc091e104cdc2b0c7e592fc44) )
- ROM_LOAD( "rom20.12m", 0x0100, 0x0100, CRC(4ca01887) SHA1(2892c89d5e60f1d10593adffff55c1a9654e8209) )
- ROM_LOAD( "rom19.12p", 0x0200, 0x0100, CRC(513224f0) SHA1(15b34612206138f6fc5f7478925b1fff2ed56aa8) )
+ ROM_LOAD( "rom21", 0x0000, 0x0100, CRC(d6360b4d) SHA1(3e64548c82a3378fc091e104cdc2b0c7e592fc44) )
+ ROM_LOAD( "rom20", 0x0100, 0x0100, CRC(4ca01887) SHA1(2892c89d5e60f1d10593adffff55c1a9654e8209) )
+ ROM_LOAD( "rom19", 0x0200, 0x0100, CRC(513224f0) SHA1(15b34612206138f6fc5f7478925b1fff2ed56aa8) )
ROM_END
ROM_START( getstarb1 )
diff --git a/src/mame/drivers/snk.cpp b/src/mame/drivers/snk.cpp
index 0e35f023e59..0ebc52b1d0a 100644
--- a/src/mame/drivers/snk.cpp
+++ b/src/mame/drivers/snk.cpp
@@ -3841,11 +3841,6 @@ static MACHINE_CONFIG_DERIVED( fitegolf, tnk3 )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 2.0)
MACHINE_CONFIG_END
-static MACHINE_CONFIG_DERIVED( fitegolf2, fitegolf )
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(snk_state, screen_update_fitegolf2)
-MACHINE_CONFIG_END
-
static MACHINE_CONFIG_START( ikari, snk_state )
@@ -4648,47 +4643,6 @@ ROM_START( fitegolfu ) /* Later US version containing enhancements to make the
ROM_LOAD( "pal20l8a.6r", 0x0400, 0x0144, CRC(0f011673) SHA1(383e6f6e78daec9c874d5b48378111ca60f5ed64) )
ROM_END
-
-
-
-ROM_START( fitegolf2 )
- ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "fg_ver2_6.4e", 0x0000, 0x4000, CRC(4cc9ef0c) SHA1(0ac6071725db3ec85659b170eecec91d22e76abd) )
- ROM_LOAD( "fg_ver2_7.g4", 0x4000, 0x4000, CRC(144b0beb) SHA1(5b5e58ee93cabbdd560487b16d0cc7217d9cea7f) )
- ROM_LOAD( "fg_ver2_8.4h", 0x8000, 0x4000, CRC(057888c9) SHA1(bd412bbd9939358fedf6cc7635b46f737a288e64) )
-
- ROM_REGION( 0x10000, "sub", 0 )
- ROM_LOAD( "fg_ver2_3.2e", 0x0000, 0x4000, CRC(cf8c29d7) SHA1(2153ed43ddd1967e3aea7b40415b6cd70fc6ff34) )
- ROM_LOAD( "fg_ver2_4.2g", 0x4000, 0x4000, CRC(90c1fb09) SHA1(13dcb6e9ffb3ed1588225df195c9f6af8a868970) )
- ROM_LOAD( "fg_ver2_5.2h", 0x8000, 0x4000, CRC(0ffbdbb8) SHA1(09e58551a8caf06ba420b6b44f16003b50b2ebc4) )
-
- ROM_REGION( 0x10000, "audiocpu", 0 )
- ROM_LOAD( "fg_2.3e", 0x0000, 0x4000, CRC(811b87d7) SHA1(fb387f42085d6e0e5a88729ca0e50656411ce037) )
- ROM_LOAD( "fg_1.2e", 0x4000, 0x8000, CRC(2d998e2b) SHA1(a471cfbb4dabc90fcc29c562620b9965eaff6861) )
-
- ROM_REGION( 0x0c00, "proms", 0 )
- ROM_LOAD( "gl1.5f", 0x00000, 0x00400, CRC(6e4c7836) SHA1(3ab3c498939fac992e2bf1c33983ee821a9b6a18) )
- ROM_LOAD( "gl2.5g", 0x00400, 0x00400, CRC(29e7986f) SHA1(85ba8d3443458c27728f633745857a1315dd183f) )
- ROM_LOAD( "gl3.5h", 0x00800, 0x00400, CRC(27ba9ff9) SHA1(f021d10460f40de4447560df5ac47fa53bb57ff9) )
-
- ROM_REGION( 0x4000, "tx_tiles", 0 )
- ROM_LOAD( "fg_12.1e", 0x0000, 0x4000, CRC(f1628dcf) SHA1(efea343d3a9dd45ef74947c297e166e34afbb680) )
-
- ROM_REGION( 0x8000, "bg_tiles", 0 )
- ROM_LOAD( "fg_14.3d", 0x0000, 0x4000, CRC(29393a19) SHA1(bae5a61c16832dc217c6fd0bd9d54db86cb9692f) )
- ROM_LOAD( "fg_ver2_13.3c", 0x4000, 0x4000, CRC(5cd57c93) SHA1(7f5fb0d9e40b4894f3940373ad09fa4e984b108e) )
-
- ROM_REGION( 0x18000, "sp16_tiles", 0 )
- ROM_LOAD( "fg_ver2_11.7h", 0x00000, 0x8000, CRC(d4957ec5) SHA1(8ead7866ba5ac66ead6b707aa868bcae30c486e1) )
- ROM_LOAD( "fg_ver2_10.7g", 0x08000, 0x8000, CRC(b3acdac2) SHA1(7377480d5e1b5ab2c49f5fee2927623ce8240e19) )
- ROM_LOAD( "fg_ver2_9.7e", 0x10000, 0x8000, CRC(b99cf73b) SHA1(23989fc3914e77d364807a9eb96a4ddf75ad7cf1) )
-
- ROM_REGION( 0x0600, "plds", 0 )
- ROM_LOAD( "pal16r6a.6c", 0x0000, 0x0104, CRC(de291f4e) SHA1(b50294d30cb8eacc7a9bb8b46695a7463ef45ff1) )
- ROM_LOAD( "pal16l8a.3f", 0x0200, 0x0104, CRC(c5f1c1da) SHA1(e17293be0f77d302c59c1095fe1ec65e45557627) )
- ROM_LOAD( "pal20l8a.6r", 0x0400, 0x0144, CRC(0f011673) SHA1(383e6f6e78daec9c874d5b48378111ca60f5ed64) )
-ROM_END
-
/***********************************************************************/
/*
@@ -6363,7 +6317,6 @@ GAME( 1985, tnk3j, tnk3, tnk3, tnk3, driver_device, 0, ROT
GAME( 1986, athena, 0, athena, athena, driver_device, 0, ROT0, "SNK", "Athena", 0 )
GAME( 1988, fitegolf, 0, fitegolf, fitegolf, driver_device, 0, ROT0, "SNK", "Fighting Golf (World?)", 0 )
GAME( 1988, fitegolfu,fitegolf, fitegolf, fitegolfu, driver_device,0, ROT0, "SNK", "Fighting Golf (US)", 0 )
-GAME( 1988, fitegolf2,fitegolf, fitegolf2,fitegolfu, driver_device,0, ROT0, "SNK", "Fighting Golf (US, Ver 2)", 0 )
GAME( 1988, countryc, 0, fitegolf, countryc, snk_state, countryc, ROT0, "SNK", "Country Club", 0 )
GAME( 1986, ikari, 0, ikari, ikari, driver_device, 0, ROT270, "SNK", "Ikari Warriors (US JAMMA)", 0 ) // distributed by Tradewest(?)
diff --git a/src/mame/drivers/starwars.cpp b/src/mame/drivers/starwars.cpp
index 986d1c6d671..9fdc3c45be0 100644
--- a/src/mame/drivers/starwars.cpp
+++ b/src/mame/drivers/starwars.cpp
@@ -333,6 +333,8 @@ static MACHINE_CONFIG_START( starwars, starwars_state )
MCFG_CPU_PERIODIC_INT_DRIVER(starwars_state, irq0_line_assert, CLOCK_3KHZ / 12)
MCFG_WATCHDOG_TIME_INIT(attotime::from_hz(CLOCK_3KHZ / 128))
+ MCFG_SLAPSTIC_ADD("slapstic")
+
MCFG_CPU_ADD("audiocpu", M6809, MASTER_CLOCK / 8)
MCFG_CPU_PROGRAM_MAP(sound_map)
@@ -376,11 +378,6 @@ static MACHINE_CONFIG_START( starwars, starwars_state )
MACHINE_CONFIG_END
-static MACHINE_CONFIG_DERIVED( esb, starwars )
- MCFG_SLAPSTIC_ADD("slapstic", 101)
-MACHINE_CONFIG_END
-
-
/*************************************
*
@@ -561,7 +558,7 @@ DRIVER_INIT_MEMBER(starwars_state,esb)
UINT8 *rom = memregion("maincpu")->base();
/* init the slapstic */
- m_slapstic_device->slapstic_init();
+ m_slapstic_device->slapstic_init(machine(), 101);
m_slapstic_source = &rom[0x14000];
m_slapstic_base = &rom[0x08000];
@@ -606,4 +603,4 @@ GAME( 1983, starwarso,starwars, starwars, starwars, starwars_state, starwars, RO
GAME( 1983, tomcatsw, tomcat, starwars, starwars, starwars_state, starwars, ROT0, "Atari", "TomCat (Star Wars hardware, prototype)", MACHINE_NO_SOUND )
-GAME( 1985, esb, 0, esb, esb, starwars_state, esb, ROT0, "Atari Games", "The Empire Strikes Back", 0 )
+GAME( 1985, esb, 0, starwars, esb, starwars_state, esb, ROT0, "Atari Games", "The Empire Strikes Back", 0 )
diff --git a/src/mame/drivers/stv.cpp b/src/mame/drivers/stv.cpp
index 1a823eabcc1..c75d566f39d 100644
--- a/src/mame/drivers/stv.cpp
+++ b/src/mame/drivers/stv.cpp
@@ -2901,192 +2901,61 @@ ROM_START( pclub2fc ) // set to 1p
ROM_END
-ROM_START( pclub2pf ) // set to 1p
+ROM_START( pclb297w ) // set to 1p
STV_BIOS
ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
- ROM_LOAD16_WORD_SWAP( "pclb2puf.IC22", 0x0200000, 0x0200000, CRC(a14282f2) SHA1(b96e70693d8e71b090e20efdd3aa6228e7289fa4) ) // OK
- ROM_LOAD16_WORD_SWAP( "pclb2puf.IC24", 0x0400000, 0x0200000, CRC(4fb4dc74) SHA1(1f174512c9cd5420d7f935cbc6b5875836f6e825) ) // OK
- ROM_LOAD16_WORD_SWAP( "pclb2puf.IC26", 0x0600000, 0x0200000, CRC(d20bbfb5) SHA1(5f2768e0e306bd0e3ed9b4e1d234aac8fd7155e6) ) // OK
- ROM_LOAD16_WORD_SWAP( "pclb2puf.IC28", 0x0800000, 0x0200000, CRC(da658ae9) SHA1(24293c2b23b3009956fc05df5177a27415754301) ) // OK
- ROM_LOAD16_WORD_SWAP( "pclb2puf.IC30", 0x0a00000, 0x0200000, CRC(cafc0e6b) SHA1(fa2ac54260336d5dd1ced7ccaf87115511ece1f8) ) // OK
-
- ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to 1 player
- ROM_LOAD( "pclub2pf.nv", 0x0000, 0x0080, CRC(447bb3bd) SHA1(9fefec09849bfa0c14b49e73ff13e2a538dff511) )
-ROM_END
-
-ROM_START( prc297wi ) // set to 1p
- STV_BIOS
-
- ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
-
- ROM_LOAD16_WORD_SWAP( "prc297wi_ic22", 0x0200000, 0x0200000, CRC(589f6705) SHA1(d10897ab26c3ecdd518087562207de131133646c) ) // OK - IC7
- ROM_LOAD16_WORD_SWAP( "prc297wi_ic24", 0x0400000, 0x0200000, CRC(4bd706d1) SHA1(e3c52c63bb93d9fa836c300865423a226bf74586) ) // OK - IC2
- ROM_LOAD16_WORD_SWAP( "prc297wi_ic26", 0x0600000, 0x0200000, CRC(417e182a) SHA1(4df04a390523e52e48efcc48891bc54452f351c9) ) // OK - IC2
- ROM_LOAD16_WORD_SWAP( "prc297wi_ic28", 0x0800000, 0x0200000, CRC(73da594e) SHA1(936b0af4a32d5b93847bbf2ecfc8d334290059c0) ) // OK - IC3
- ROM_LOAD16_WORD_SWAP( "prc297wi_ic30", 0x0a00000, 0x0200000, CRC(03b9eacf) SHA1(d69c10f7613d9f52042dd6cce64e74e2b1ecc2d8) ) // OK - IC3
- ROM_LOAD16_WORD_SWAP( "prc297wi_ic32", 0x0c00000, 0x0200000, CRC(20437e93) SHA1(dfd2026bec6b2f418cd1cbfa7266717211d013b6) ) // OK - IC4
- ROM_LOAD16_WORD_SWAP( "prc297wi_ic34", 0x0e00000, 0x0200000, CRC(9639b003) SHA1(8f95b024ad19151e1e642d58aa785d14ae3a0661) ) // OK - IC4
- ROM_LOAD16_WORD_SWAP( "prc297wi_ic36", 0x1000000, 0x0200000, CRC(dd1b57b6) SHA1(8450355ec6cdc9718f8579f8702f3900f686c3f8) ) // OK - IC5
- ROM_LOAD16_WORD_SWAP( "prc297wi_ic23", 0x1200000, 0x0200000, CRC(e3d9d12b) SHA1(28ec3727774ef8a6a241238ad134a5adab8327fd) ) // OK - IC5
- ROM_LOAD16_WORD_SWAP( "prc297wi_ic25", 0x1400000, 0x0200000, CRC(71238374) SHA1(0dc534628a98aba508bdef58f8b812908414ae48) ) // OK - IC6
- ROM_LOAD16_WORD_SWAP( "prc297wi_ic27", 0x1600000, 0x0200000, CRC(7485a9a2) SHA1(17999a5192f185a27c08c2f05e19c65977b8f84e) ) // OK - IC6
-
- ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to 1 player
- ROM_LOAD( "eeprom", 0x0000, 0x0080, CRC(9ba58358) SHA1(555ac21321b3051f7083cd72176ddc0fef2d4155) )
-ROM_END
-
-ROM_START( prc297wia ) // set to 1p
- STV_BIOS
-
- ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
-
- ROM_LOAD16_WORD_SWAP( "pclb297w_ic22_ALT", 0x0200000, 0x0200000, CRC(1feb3bfe) SHA1(cb79908a13e32c3c00e5892d988088a902d6f874) ) // OK - IC7
- ROM_LOAD16_WORD_SWAP( "prc297wi_ic24", 0x0400000, 0x0200000, CRC(4bd706d1) SHA1(e3c52c63bb93d9fa836c300865423a226bf74586) ) // OK - IC2
- ROM_LOAD16_WORD_SWAP( "prc297wi_ic26", 0x0600000, 0x0200000, CRC(417e182a) SHA1(4df04a390523e52e48efcc48891bc54452f351c9) ) // OK - IC2
- ROM_LOAD16_WORD_SWAP( "prc297wi_ic28", 0x0800000, 0x0200000, CRC(73da594e) SHA1(936b0af4a32d5b93847bbf2ecfc8d334290059c0) ) // OK - IC3
- ROM_LOAD16_WORD_SWAP( "prc297wi_ic30", 0x0a00000, 0x0200000, CRC(03b9eacf) SHA1(d69c10f7613d9f52042dd6cce64e74e2b1ecc2d8) ) // OK - IC3
- ROM_LOAD16_WORD_SWAP( "prc297wi_ic32", 0x0c00000, 0x0200000, CRC(20437e93) SHA1(dfd2026bec6b2f418cd1cbfa7266717211d013b6) ) // OK - IC4
- ROM_LOAD16_WORD_SWAP( "prc297wi_ic34", 0x0e00000, 0x0200000, CRC(9639b003) SHA1(8f95b024ad19151e1e642d58aa785d14ae3a0661) ) // OK - IC4
- ROM_LOAD16_WORD_SWAP( "prc297wi_ic36", 0x1000000, 0x0200000, CRC(dd1b57b6) SHA1(8450355ec6cdc9718f8579f8702f3900f686c3f8) ) // OK - IC5
- ROM_LOAD16_WORD_SWAP( "prc297wi_ic23", 0x1200000, 0x0200000, CRC(e3d9d12b) SHA1(28ec3727774ef8a6a241238ad134a5adab8327fd) ) // OK - IC5
- ROM_LOAD16_WORD_SWAP( "prc297wi_ic25", 0x1400000, 0x0200000, CRC(71238374) SHA1(0dc534628a98aba508bdef58f8b812908414ae48) ) // OK - IC6
- ROM_LOAD16_WORD_SWAP( "prc297wi_ic27", 0x1600000, 0x0200000, CRC(7485a9a2) SHA1(17999a5192f185a27c08c2f05e19c65977b8f84e) ) // OK - IC6
+ ROM_LOAD16_WORD_SWAP( "pclb297w_ic22", 0x0200000, 0x0200000, CRC(589f6705) SHA1(d10897ab26c3ecdd518087562207de131133646c) ) // OK - IC7?
+ ROM_LOAD16_WORD_SWAP( "pclb297w_ic24", 0x0400000, 0x0200000, CRC(4bd706d1) SHA1(e3c52c63bb93d9fa836c300865423a226bf74586) ) // OK - IC2?
+ ROM_LOAD16_WORD_SWAP( "pclb297w_ic26", 0x0600000, 0x0200000, CRC(417e182a) SHA1(4df04a390523e52e48efcc48891bc54452f351c9) ) // OK - IC2?
+ ROM_LOAD16_WORD_SWAP( "pclb297w_ic28", 0x0800000, 0x0200000, CRC(73da594e) SHA1(936b0af4a32d5b93847bbf2ecfc8d334290059c0) ) // OK - IC3?
+ ROM_LOAD16_WORD_SWAP( "pclb297w_ic30", 0x0a00000, 0x0200000, CRC(03b9eacf) SHA1(d69c10f7613d9f52042dd6cce64e74e2b1ecc2d8) ) // OK - IC3?
+ ROM_LOAD16_WORD_SWAP( "pclb297w_ic32", 0x0c00000, 0x0200000, CRC(20437e93) SHA1(dfd2026bec6b2f418cd1cbfa7266717211d013b6) ) // OK - IC4?
+ ROM_LOAD16_WORD_SWAP( "pclb297w_ic34", 0x0e00000, 0x0200000, CRC(9639b003) SHA1(8f95b024ad19151e1e642d58aa785d14ae3a0661) ) // OK - IC4?
+ ROM_LOAD16_WORD_SWAP( "pclb297w_ic36", 0x1000000, 0x0200000, CRC(dd1b57b6) SHA1(8450355ec6cdc9718f8579f8702f3900f686c3f8) ) // BAD? - IC5 ?? (will need rom below to pass)
+ ROM_LOAD16_WORD_SWAP( "pclb297w_ic23", 0x1200000, 0x0200000, NO_DUMP) // IC5 ??
+ ROM_LOAD16_WORD_SWAP( "pclb297w_ic25", 0x1400000, 0x0200000, NO_DUMP) // IC6 ??
+ ROM_LOAD16_WORD_SWAP( "pclb297w_ic27", 0x1600000, 0x0200000, NO_DUMP) // IC6 ??
ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to 1 player
ROM_LOAD( "eeprom", 0x0000, 0x0080, CRC(9ba58358) SHA1(555ac21321b3051f7083cd72176ddc0fef2d4155) )
ROM_END
-
-ROM_START( prc298sp ) // set to 1p
- STV_BIOS
-
- ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
-
- ROM_LOAD16_WORD_SWAP( "prc298sp_ic22", 0x0200000, 0x0200000, CRC(cb0ec98a) SHA1(efef536cb3bc71207936b26b87f04641baded10b) ) // OK? - tested as IC7?
- ROM_LOAD16_WORD_SWAP( "prc298sp_ic24", 0x0400000, 0x0200000, CRC(645e7e24) SHA1(7362b0c4b500639c20ec27002f543a0b4390eaa8) ) // OK - tested as IC2
- ROM_LOAD16_WORD_SWAP( "prc298sp_ic26", 0x0600000, 0x0200000, CRC(9d3ad85d) SHA1(71fe330594ab58be331aa5311472855be07cb44c) ) // OK - tested as IC2
- ROM_LOAD16_WORD_SWAP( "prc298sp_ic28", 0x0800000, 0x0200000, CRC(877e73cc) SHA1(dd9928a3fe0ed759611e1b7be8ea10b45084e392) ) // OK - tested as IC3
- ROM_LOAD16_WORD_SWAP( "prc298sp_ic30", 0x0a00000, 0x0200000, CRC(03b9eacf) SHA1(d69c10f7613d9f52042dd6cce64e74e2b1ecc2d8) ) // OK - tested as IC3
- ROM_LOAD16_WORD_SWAP( "prc298sp_ic32", 0x0c00000, 0x0200000, CRC(62c10626) SHA1(58cb0ca0330fa7a62b277ab0ff84bff65b81bb23) ) // OK - tested as IC4
- ROM_LOAD16_WORD_SWAP( "prc298sp_ic34", 0x0e00000, 0x0200000, CRC(8d89877e) SHA1(7d76d48d64d7ac5411d714a4bb83f37e3e5b8df6) ) // 00 fill. OK - tested as IC4
- ROM_LOAD16_WORD_SWAP( "prc298sp_ic36", 0x1000000, 0x0200000, CRC(8d89877e) SHA1(7d76d48d64d7ac5411d714a4bb83f37e3e5b8df6) ) // 00 fill, OK - tested as IC5
-
- ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to 1 player
- ROM_LOAD( "prc298sp.nv", 0x0000, 0x0080, CRC(a23dd0f2) SHA1(457282b5d40a17477b95330bba91e05c603f951e) )
-ROM_END
-
-ROM_START( prc298su ) // set to 1p
- STV_BIOS
-
- ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
-
- ROM_LOAD16_WORD_SWAP( "pclb298s_ic22", 0x0200000, 0x0200000, CRC(9720fe7a) SHA1(5b17eee0bd4574c0b2eb5bb64928d37bd87da23f) ) // OK - tested as IC7
- ROM_LOAD16_WORD_SWAP( "pclb298s_ic24", 0x0400000, 0x0200000, CRC(380496dc) SHA1(60a000cd71553cd23009ffd41b0208153b18d858) ) // OK - tested as IC2
- ROM_LOAD16_WORD_SWAP( "pclb298s_ic26", 0x0600000, 0x0200000, CRC(42622126) SHA1(cc312b1be51e919013ce55d4c1242a90676157e0) ) // OK - tested as IC2
- ROM_LOAD16_WORD_SWAP( "pclb298s_ic28", 0x0800000, 0x0200000, CRC(c03e861a) SHA1(e39e1d040651577d088ce88d354c74e96971efaa) ) // OK - tested as IC3
- ROM_LOAD16_WORD_SWAP( "pclb298s_ic30", 0x0a00000, 0x0200000, CRC(01844b12) SHA1(92d23e54cdfba8c0bdf3d87c52313334e2f903fa) ) // OK - tested as IC3
-
- ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to 1 player
- ROM_LOAD( "prc298su.nv", 0x0000, 0x0080, CRC(6b81636a) SHA1(c84de7c374c46f92985186834ab023986e2abbd8) )
-ROM_END
-
-
-ROM_START( pclub26w ) // set to 1p
- STV_BIOS
-
- ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
-
- ROM_LOAD16_WORD_SWAP( "pclbvol6w_IC22", 0x0200000, 0x0200000, CRC(72aa320c) SHA1(09bc30e8cb00a5a4014c44e468cc64f6c3425d92) )
- ROM_LOAD16_WORD_SWAP( "pclbvol6w_IC24", 0x0400000, 0x0200000, CRC(d98371e2) SHA1(813ac5f3c5b57d07cc319c73560bc0719ddcfe6b) )
- ROM_LOAD16_WORD_SWAP( "pclbvol6w_IC26", 0x0600000, 0x0200000, CRC(e6bbe3a5) SHA1(b2f642b8ca0779ad66cfbbadece40f4e3dc41fd1) )
- ROM_LOAD16_WORD_SWAP( "pclbvol6w_IC28", 0x0800000, 0x0200000, CRC(3c330c9b) SHA1(92f8e8d4f43db7c4ce431d17501492a7f8d8a867) )
- ROM_LOAD16_WORD_SWAP( "pclbvol6w_IC30", 0x0a00000, 0x0200000, CRC(67646090) SHA1(ed6402a22acafa0203c587b871edc547f0ec5277) )
-
- ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to 1 player
- ROM_LOAD( "pclub26w.nv", 0x0000, 0x0080, CRC(448f770d) SHA1(5f966c511c4c8e9d5b2d257c41c2c88a453b4944) )
-ROM_END
-
-ROM_START( pclub27s ) // set to 1p
- STV_BIOS
-
- ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
-
- ROM_LOAD16_WORD_SWAP( "pclub2v7.IC22", 0x0200000, 0x0200000, CRC(44c8ab27) SHA1(65e2705b2918da32ea40375707df4e148b311159) )
- ROM_LOAD16_WORD_SWAP( "pclub2v7.IC24", 0x0400000, 0x0200000, CRC(24818437) SHA1(5293d45b53680301abaf0b32a62596aaaa2552d6) )
- ROM_LOAD16_WORD_SWAP( "pclub2v7.IC26", 0x0600000, 0x0200000, CRC(076c1d44) SHA1(d597ed4524bb03eb0ef8ada08d49f3dc0fc8136d) )
- ROM_LOAD16_WORD_SWAP( "pclub2v7.IC28", 0x0800000, 0x0200000, CRC(ff9643ca) SHA1(3309f970f87324b06cc48add386019f769abcd89) )
- ROM_LOAD16_WORD_SWAP( "pclub2v7.IC30", 0x0a00000, 0x0200000, CRC(03b9eacf) SHA1(d69c10f7613d9f52042dd6cce64e74e2b1ecc2d8) )
-
- ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to 1 player
- ROM_LOAD( "pclub27s.nv", 0x0000, 0x0080, CRC(e58c7167) SHA1(d88b1648c5d86a90615a8c6a1bf87bc9e75dc320) )
-ROM_END
-
-ROM_START( pclub2pe ) // set to 1p
+ROM_START( pclub298 ) // set to 1p
STV_BIOS
ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
- ROM_LOAD16_WORD_SWAP( "pclb2psi_IC22", 0x0200000, 0x0200000, CRC(caadc660) SHA1(f2e84bee96266bb03d8f9009249c17c27935f82e) )
- ROM_LOAD16_WORD_SWAP( "pclb2psi_IC24", 0x0400000, 0x0200000, CRC(ece82698) SHA1(b17b1ea8adc13c3722067c9854d1b7fdf3917090) )
- ROM_LOAD16_WORD_SWAP( "pclb2psi_IC26", 0x0600000, 0x0200000, CRC(c8a1e335) SHA1(a95ddfc41fdd9f720c11208f45ef5db4bee6cb97) )
- ROM_LOAD16_WORD_SWAP( "pclb2psi_IC28", 0x0800000, 0x0200000, CRC(52f09627) SHA1(e2ffc321bb0f2a650d0c0b39c3ec68226e1ca7f4) )
- ROM_LOAD16_WORD_SWAP( "pclb2psi_IC30", 0x0a00000, 0x0200000, CRC(03b9eacf) SHA1(d69c10f7613d9f52042dd6cce64e74e2b1ecc2d8) )
+ ROM_LOAD16_WORD_SWAP( "pclub298_ic22", 0x0200000, 0x0200000, CRC(cb0ec98a) SHA1(efef536cb3bc71207936b26b87f04641baded10b) ) // OK? - tested as IC7?
+ ROM_LOAD16_WORD_SWAP( "pclub298_ic24", 0x0400000, 0x0200000, CRC(645e7e24) SHA1(7362b0c4b500639c20ec27002f543a0b4390eaa8) ) // OK - tested as IC2
+ ROM_LOAD16_WORD_SWAP( "pclub298_ic26", 0x0600000, 0x0200000, CRC(9d3ad85d) SHA1(71fe330594ab58be331aa5311472855be07cb44c) ) // OK - tested as IC2
+ ROM_LOAD16_WORD_SWAP( "pclub298_ic28", 0x0800000, 0x0200000, CRC(877e73cc) SHA1(dd9928a3fe0ed759611e1b7be8ea10b45084e392) ) // OK - tested as IC3
+ ROM_LOAD16_WORD_SWAP( "pclub298_ic30", 0x0a00000, 0x0200000, CRC(03b9eacf) SHA1(d69c10f7613d9f52042dd6cce64e74e2b1ecc2d8) ) // OK - tested as IC3
+ ROM_LOAD16_WORD_SWAP( "pclub298_ic32", 0x0c00000, 0x0200000, CRC(62c10626) SHA1(58cb0ca0330fa7a62b277ab0ff84bff65b81bb23) ) // OK - tested as IC4
+ ROM_LOAD16_WORD_SWAP( "pclub298_ic34", 0x0e00000, 0x0200000, CRC(8d89877e) SHA1(7d76d48d64d7ac5411d714a4bb83f37e3e5b8df6) ) // 00 fill. OK - tested as IC4
+ ROM_LOAD16_WORD_SWAP( "pclub298_ic36", 0x1000000, 0x0200000, CRC(8d89877e) SHA1(7d76d48d64d7ac5411d714a4bb83f37e3e5b8df6) ) // 00 fill, OK - tested as IC5
ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to 1 player
- ROM_LOAD( "pclub2pe.nv", 0x0000, 0x0080, CRC(447bb3bd) SHA1(9fefec09849bfa0c14b49e73ff13e2a538dff511))
+ ROM_LOAD( "pclub298.nv", 0x0000, 0x0080, CRC(a23dd0f2) SHA1(457282b5d40a17477b95330bba91e05c603f951e) )
ROM_END
-ROM_START( pclub2wb ) // set to 1p
+ROM_START( pclb298a ) // set to 1p
STV_BIOS
ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
- ROM_LOAD16_WORD_SWAP( "pclb2wb_IC22", 0x0200000, 0x0200000, CRC(12245be7) SHA1(4d6c2c9ca7fe73a9ec490157cdb01a6228dee7f8) )
- ROM_LOAD16_WORD_SWAP( "pclb2wb_IC24", 0x0400000, 0x0200000, CRC(e5d6e11e) SHA1(4af3c646747f76d99482c985f960df2519a85c23) )
- ROM_LOAD16_WORD_SWAP( "pclb2wb_IC26", 0x0600000, 0x0200000, CRC(7ee066f0) SHA1(a7c725ce8e621ed299474dd215174699e097db3f) )
- ROM_LOAD16_WORD_SWAP( "pclb2wb_IC28", 0x0800000, 0x0200000, CRC(9ed59513) SHA1(c8f5ed13be2a91f83c35a7929aaa5751d7843e6e) )
- ROM_LOAD16_WORD_SWAP( "pclb2wb_IC30", 0x0a00000, 0x0200000, CRC(00a0c702) SHA1(f2c4a7a51559f0ade96b8e6337cd1a1d61472de7) )
+ ROM_LOAD16_WORD_SWAP( "pclb298a_ic22", 0x0200000, 0x0200000, CRC(21a995ce) SHA1(6ee1250becd76bef3aa8044a42e10c3830a609bd) ) // OK
+ ROM_LOAD16_WORD_SWAP( "pclb298a_ic24", 0x0400000, 0x0200000, CRC(94540f39) SHA1(cee9fff48d177e7502802d366339ed922c212871) ) // OK
+ ROM_LOAD16_WORD_SWAP( "pclb298a_ic26", 0x0600000, 0x0200000, CRC(8b22c41f) SHA1(371f8b35ed45f695f5ec0c8db2c4b62007bf4782) ) // OK
+ ROM_LOAD16_WORD_SWAP( "pclb298a_ic28", 0x0800000, 0x0200000, CRC(bf68cec0) SHA1(550138f5110661d69eaff44c0596914a2621c3df) ) // OK
+ ROM_LOAD16_WORD_SWAP( "pclb298a_ic30", 0x0a00000, 0x0200000, CRC(ae276c06) SHA1(98358860ae9bf7c405ba4f763c7a4bf309ce85e3) ) // OK
+ ROM_LOAD16_WORD_SWAP( "pclb298a_ic32", 0x0c00000, 0x0200000, CRC(a3fb81f5) SHA1(6c78c97635dd486d2a7c09bc0511267eae6082c4) ) // OK
+ ROM_LOAD16_WORD_SWAP( "pclb298a_ic34", 0x0e00000, 0x0200000, CRC(04200dc9) SHA1(e40b01d12ccf71e50da7fd0f3000158626e5a98d) ) // OK
+ ROM_LOAD16_WORD_SWAP( "pclb298a_ic36", 0x1000000, 0x0200000, CRC(9a4109e5) SHA1(ba59caac5f5a80fc52c507d8a47f322a380aa9a1) ) // (blank! - not tested)
ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to 1 player
- ROM_LOAD( "pclub2wb.nv", 0x0000, 0x0080, CRC(0d442eec) SHA1(54dd544e1496e3999d8111eb06abf805b610d77d) )
-ROM_END
-
-
-
-ROM_START( pclubyo2 ) // set to 1p
- STV_BIOS
-
- ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
-
- ROM_LOAD16_WORD_SWAP( "pclbyov2.IC22", 0x0200000, 0x0200000, CRC(719a4d27) SHA1(328dfb8debea02e8660e636e953982d381529945) )
- ROM_LOAD16_WORD_SWAP( "pclbyov2.IC24", 0x0400000, 0x0200000, CRC(790dc7b5) SHA1(829ead39930779617a9bef41d8615362ca86c4c7) )
- ROM_LOAD16_WORD_SWAP( "pclbyov2.IC26", 0x0600000, 0x0200000, CRC(12ae1606) SHA1(9534fb2dbf6fd2c258ba2716783cc5bab8bd8dc0) )
- ROM_LOAD16_WORD_SWAP( "pclbyov2.IC28", 0x0800000, 0x0200000, CRC(ff9643ca) SHA1(3309f970f87324b06cc48add386019f769abcd89) )
- ROM_LOAD16_WORD_SWAP( "pclbyov2.IC30", 0x0a00000, 0x0200000, CRC(03b9eacf) SHA1(d69c10f7613d9f52042dd6cce64e74e2b1ecc2d8) )
-
- ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to 1 player
- ROM_LOAD( "pclubyo2.nv", 0x0000, 0x0080, CRC(2b26a8f7) SHA1(32f34096cac05a37c492ee389ed8e4c02694c268) )
-ROM_END
-
-
-ROM_START( prc298au ) // set to 1p
- STV_BIOS
-
- ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
-
- ROM_LOAD16_WORD_SWAP( "prc298au_ic22", 0x0200000, 0x0200000, CRC(21a995ce) SHA1(6ee1250becd76bef3aa8044a42e10c3830a609bd) ) // OK
- ROM_LOAD16_WORD_SWAP( "prc298au_ic24", 0x0400000, 0x0200000, CRC(94540f39) SHA1(cee9fff48d177e7502802d366339ed922c212871) ) // OK
- ROM_LOAD16_WORD_SWAP( "prc298au_ic26", 0x0600000, 0x0200000, CRC(8b22c41f) SHA1(371f8b35ed45f695f5ec0c8db2c4b62007bf4782) ) // OK
- ROM_LOAD16_WORD_SWAP( "prc298au_ic28", 0x0800000, 0x0200000, CRC(bf68cec0) SHA1(550138f5110661d69eaff44c0596914a2621c3df) ) // OK
- ROM_LOAD16_WORD_SWAP( "prc298au_ic30", 0x0a00000, 0x0200000, CRC(ae276c06) SHA1(98358860ae9bf7c405ba4f763c7a4bf309ce85e3) ) // OK
- ROM_LOAD16_WORD_SWAP( "prc298au_ic32", 0x0c00000, 0x0200000, CRC(a3fb81f5) SHA1(6c78c97635dd486d2a7c09bc0511267eae6082c4) ) // OK
- ROM_LOAD16_WORD_SWAP( "prc298au_ic34", 0x0e00000, 0x0200000, CRC(04200dc9) SHA1(e40b01d12ccf71e50da7fd0f3000158626e5a98d) ) // OK
- ROM_LOAD16_WORD_SWAP( "prc298au_ic36", 0x1000000, 0x0200000, CRC(9a4109e5) SHA1(ba59caac5f5a80fc52c507d8a47f322a380aa9a1) ) // (blank! - not tested)
-
- ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to 1 player
- ROM_LOAD( "prc298au.nv", 0x0000, 0x0080, CRC(b4440ff0) SHA1(bd3c83221ede11c68163df4b52a85856c83f865f) )
+ ROM_LOAD( "pclub298a.nv", 0x0000, 0x0080, CRC(b4440ff0) SHA1(bd3c83221ede11c68163df4b52a85856c83f865f) )
ROM_END
@@ -3189,82 +3058,6 @@ ROM_START( pclb2elk ) // set to 1p
ROM_LOAD( "pclb2elk.nv", 0x0000, 0x0080, CRC(54c7564f) SHA1(574dcc5e8fe4aac091fee1476347485ed660eddd) )
ROM_END
-ROM_START( pclove )
- STV_BIOS
-
- ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
- // note, 'IC2' in service mode (the test of IC24/IC26) fails once you map the protection device because it occupies the same memory address as the rom at IC26
- // there must be a way to enable / disable it.
- ROM_LOAD16_WORD_SWAP( "pclbLove.ic22", 0x0200000, 0x0200000, CRC(8cd25a0f) SHA1(c938d5f4f800db019abc2e17cce1e780e93f3d02) ) // OK (tested as IC7)
- ROM_LOAD16_WORD_SWAP( "pclbLove.ic24", 0x0400000, 0x0200000, CRC(85583e2c) SHA1(7f407d1bce40317fc10433dafcd82ee41be05839) ) // OK (tested as IC2)
- ROM_LOAD16_WORD_SWAP( "pclbLove.ic26", 0x0600000, 0x0200000, CRC(7efcabcc) SHA1(b99a67ab2053c3be5ce37530b65f9693c2a4eef8) ) // OK (tested as IC2)
- ROM_LOAD16_WORD_SWAP( "pclbLove.ic28", 0x0800000, 0x0200000, CRC(a1336da7) SHA1(ba26810067a13968a54a8867025b8d8e96384ae7) ) // OK (tested as IC3)
- ROM_LOAD16_WORD_SWAP( "pclbLove.ic30", 0x0a00000, 0x0200000, CRC(ec5b5e28) SHA1(89bcddb52c176c86ad4bdb9f4f052be5b75bcd1b) ) // OK (tested as IC3)
- ROM_LOAD16_WORD_SWAP( "pclbLove.ic32", 0x0c00000, 0x0200000, CRC(9a4109e5) SHA1(ba59caac5f5a80fc52c507d8a47f322a380aa9a1) ) // FF fill? (not tested either)
-
- // protection device used to decrypt some startup code
-
- ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to 1 player
- ROM_LOAD( "pclove.nv", 0x0000, 0x0080, CRC(3c78e3bd) SHA1(6d5fe8545f434b4cc1e8229549adb0a49ac45bd1) )
-ROM_END
-
-ROM_START( pclove2 )
- STV_BIOS
-
- ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
- // note, 'IC2' in service mode (the test of IC24/IC26) fails once you map the protection device because it occupies the same memory address as the rom at IC26
- // there must be a way to enable / disable it.
- ROM_LOAD16_WORD_SWAP( "ic22", 0x0200000, 0x0200000, CRC(d7d968d6) SHA1(59916a453ba8a53af2138272e359c6d6ce11ea8c) ) // OK (tested as IC7)
- ROM_LOAD16_WORD_SWAP( "ic24", 0x0400000, 0x0200000, CRC(9c9b7e57) SHA1(ae834a3648126ec2456d2cc5544f81b6dc2f5825) ) // OK (tested as IC2)
- ROM_LOAD16_WORD_SWAP( "ic26", 0x0600000, 0x0200000, CRC(55eb859f) SHA1(4f25536787142f965d688d1758a45885b52ae52e) ) // OK (tested as IC2)
- ROM_LOAD16_WORD_SWAP( "ic28", 0x0800000, 0x0200000, CRC(463604a6) SHA1(d8eb41676c750e01870241361ef04c8f22a0c4b4) ) // OK (tested as IC3)
- ROM_LOAD16_WORD_SWAP( "ic30", 0x0a00000, 0x0200000, CRC(ec5b5e28) SHA1(89bcddb52c176c86ad4bdb9f4f052be5b75bcd1b) ) // OK (tested as IC3)
- ROM_LOAD16_WORD_SWAP( "ic32", 0x0c00000, 0x0200000, CRC(9a4109e5) SHA1(ba59caac5f5a80fc52c507d8a47f322a380aa9a1) ) // FF fill? (not tested either)
-
- // protection device used to decrypt some startup code
-
- ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to 1 player
- ROM_LOAD( "pclove2.nv", 0x0000, 0x0080, CRC(93b30600) SHA1(eadba12ec322911823a6873a343e4d9b4089ed93) )
-ROM_END
-
-
-// Name Club / Name Club vol.2
-// have an unusual rom mapping compared to other games, the cartridge is a little different too, with a large PALCE16V8H-10 marked 315-6026
-// For Name Club vol. 2, the protection device (317-0229 on both) is checked in the 'each game test' menu as 'RCDD2'
-// For the service mode test the game just passes a large block of compressed data and checksums the result, it doesn't even look like it's
-// passing 100% valid data, just an entire section of ROM, checking the result against a pre-calculated checksum.
-
-// The device is accessed by the game when you choose to print, it looks like it's decompressing the full-size graphics for the printer rather
-// than anything you see onscreen. It makes quite extensive use of the device, with lots of different dictionaries, unlike Decathlete where
-// there are only 2 that cover all the data.
-
-ROM_START( nameclub )
- STV_BIOS
-
- ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASEFF ) /* SH2 code */
- ROM_LOAD16_WORD_SWAP( "ic22", 0x0200000, 0x0200000, CRC(ac23c648) SHA1(4dd099a92ff162082eb24a61a277ca907b3f9892) ) // OK
- ROM_LOAD16_WORD_SWAP( "ic24", 0x0600000, 0x0200000, CRC(a16902e3) SHA1(85c582cb0d02ef028a8ae32688c20a5b5aeeaae8) ) // OK
- ROM_LOAD16_WORD_SWAP( "ic26", 0x0a00000, 0x0200000, CRC(a5eab3f3) SHA1(1b7263639bb8f4aa644cc46133988ef4d2b6c9de) ) // OK
- ROM_LOAD16_WORD_SWAP( "ic28", 0x0e00000, 0x0200000, CRC(34ed677a) SHA1(ff2c4dd8fae33ac618f6e3e28ba71c4ecb4ca88f) ) // OK
-
- ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to 1 player
- ROM_LOAD( "nameclub.nv", 0x0000, 0x0080, CRC(680a64bc) SHA1(45194bbe4a7e67f0e44f858589881967884f63a6) )
-ROM_END
-
-ROM_START( nclubv2 )
- STV_BIOS
-
- ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASEFF ) /* SH2 code */
- ROM_LOAD16_WORD_SWAP( "nclubv2.ic22", 0x0200000, 0x0200000, CRC(7e81676d) SHA1(fc0f0dcdb4aaf71218d7c1dd0e4ddc5381e8b13b) ) // OK
- ROM_LOAD16_WORD_SWAP( "nclubv2.ic24", 0x0600000, 0x0200000, CRC(1b7637de) SHA1(43c3094f60a6582298a45bad923fef57e98c5b2b) ) // OK
- ROM_LOAD16_WORD_SWAP( "nclubv2.ic26", 0x0a00000, 0x0200000, CRC(630be99d) SHA1(ac7fbaae98b126fad5228b0ebffa91a0f0a94516) ) // OK
- ROM_LOAD16_WORD_SWAP( "nclubv2.ic28", 0x0e00000, 0x0200000, CRC(1a3ca5e2) SHA1(4d3aed51d29c54e71175d828f648c9feb813ac04) ) // OK
-
- ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to 1 player
- ROM_LOAD( "nclubv2.nv", 0x0000, 0x0080, CRC(96d55fa9) SHA1(b3c821d6cd4ed52d0e20565e12a06d8f81a08dbc) )
-ROM_END
-
-
GAME( 1996, stvbios, 0, stv_slot, stv, stv_state, stv, ROT0, "Sega", "ST-V Bios", MACHINE_IS_BIOS_ROOT )
@@ -3310,6 +3103,7 @@ GAME( 1998, sss, stvbios, stv_5881, stv, stv_state, sss, ROT
GAME( 1995, sandor, stvbios, stv, stv, stv_state, sandor, ROT0, "Sega", "Puzzle & Action: Sando-R (J 951114 V1.000)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
GAME( 1997, thunt, sandor, stv, stv, stv_state, thunt, ROT0, "Sega", "Puzzle & Action: Treasure Hunt (JUET 970901 V2.00E)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
GAME( 1997, thuntk, sandor, stv, stv, stv_state, sandor, ROT0, "Sega / Deniam", "Puzzle & Action: BoMulEul Chajara (JUET 970125 V2.00K)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
+GAME( 1998, twcup98, stvbios, stv_5881, stv, stv_state, twcup98, ROT0, "Tecmo", "Tecmo World Cup '98 (JUET 980410 V1.000)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
GAME( 1995, smleague, stvbios, stv, stv, stv_state, smleague, ROT0, "Sega", "Super Major League (U 960108 V1.000)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
GAME( 1995, finlarch, smleague,stv, stv, stv_state, finlarch, ROT0, "Sega", "Final Arch (J 950714 V1.001)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
GAME( 1996, sokyugrt, stvbios, stv, stv, stv_state, sokyugrt, ROT0, "Raizing / Eighting", "Soukyugurentai / Terra Diver (JUET 960821 V1.000)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
@@ -3320,48 +3114,26 @@ GAME( 1997, winterht, stvbios, stv, stv, stv_state, winterht, ROT
GAME( 1997, znpwfv, stvbios, stv, stv, stv_state, znpwfv, ROT0, "Sega", "Zen Nippon Pro-Wrestling Featuring Virtua (J 971123 V1.000)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
/* Unemulated printer / camera devices */
-// USA sets
-GAME( 1997, pclub2, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 (U 970921 V1.000)", MACHINE_NOT_WORKING )
-GAME( 1999, pclub2v3, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 Vol. 3 (U 990310 V1.000)", MACHINE_NOT_WORKING ) // Hello Kitty themed
-GAME( 1999, pclubpok, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club Pokemon B (U 991126 V1.000)", MACHINE_NOT_WORKING )
-// Japan sets
-GAME( 1999, pclub2fc, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 Felix The Cat (Rev. A) (J 970415 V1.100)", MACHINE_NOT_WORKING )
-GAME( 1998, pclub2pf, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 Puffy (Japan)", MACHINE_NOT_WORKING ) // version info is blank
-GAME( 1997, pclb2elk, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 Earth Limited Kobe (Print Club Custom) (J 970808 V1.000)", MACHINE_NOT_WORKING )
-GAME( 1997, pclub2pe, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 Pepsiman (J 970618 V1.100)", MACHINE_NOT_WORKING )
-GAME( 1997, pclub2wb, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 Warner Bros (J 970228 V1.000)", MACHINE_NOT_WORKING )
-
-GAME( 1997, pclub26w, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 Vol. 6 Winter (J 961210 V1.000)", MACHINE_NOT_WORKING ) // internal string is 'PURIKURA2 97FUYU' (but in reality it seems to be an end of 96 Winter version)
-GAME( 1997, pclub27s, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 Vol. 7 Spring (J 970313 V1.100)", MACHINE_NOT_WORKING )
-// Summer 97?
-// Autumn 97?
-GAME( 1997, prc297wi, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 '97 Winter Ver (J 971017 V1.100, set 1)", MACHINE_NOT_WORKING ) // internal string is '97WINTER'
-GAME( 1997, prc297wia, prc297wi,stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 '97 Winter Ver (J 971017 V1.100, set 2)", MACHINE_NOT_WORKING ) // different program revision, same date code, clearly didn't get updated properly
-GAME( 1998, prc298sp, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 '98 Spring Ver (J 971017 V1.100)", MACHINE_NOT_WORKING ) // again, dat doesn't appear to have bene updated, this should be early 98
-GAME( 1998, prc298su, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 '98 Summer Ver (J 980603 V1.100)", MACHINE_NOT_WORKING ) // again, dat doesn't appear to have bene updated, this should be early 98
-GAME( 1998, prc298au, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 '98 Autumn Ver (J 980827 V1.000)", MACHINE_NOT_WORKING )
-
+GAME( 1998, stress, stvbios, stv, stv, stv_state, stv, ROT0, "Sega", "Stress Busters (J 981020 V1.000)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
+GAME( 1997, nclubv3, stvbios, stv, stv, stv_state, nameclv3, ROT0, "Sega", "Name Club Ver.3 (J 970723 V1.000)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING )
+GAME( 1997, pclub2, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 (U 970921 V1.000)", MACHINE_NOT_WORKING )
+GAME( 1999, pclub2fc, pclub2, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 Felix The Cat (Rev. A) (J 970415 V1.100)", MACHINE_NOT_WORKING )
+GAME( 1997, pclb297w, pclub2, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 '97 Winter Ver (J 971017 V1.100)", MACHINE_NOT_WORKING )
+GAME( 1997, pclub298, pclub2, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 '98 Spring Ver (J 971017 V1.100)", MACHINE_NOT_WORKING )
+GAME( 1998, pclb298a, pclub2, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 '98 Autumn Ver (J 980827 V1.000)", MACHINE_NOT_WORKING )
GAME( 1999, pclubor, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club Goukakenran (J 991104 V1.000)", MACHINE_NOT_WORKING )
GAME( 1999, pclubol, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club Olive (J 980717 V1.000)", MACHINE_NOT_WORKING )
+GAME( 1999, pclub2v3, pclub2, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 Vol. 3 (U 990310 V1.000)", MACHINE_NOT_WORKING )
+GAME( 1999, pclubpok, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club Pokemon B (U 991126 V1.000)", MACHINE_NOT_WORKING )
GAME( 1997, pclub2kc, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club Kome Kome Club (J 970203 V1.000)", MACHINE_NOT_WORKING )
-GAME( 1997, pclubyo2, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club Yoshimoto V2 (J 970422 V1.100)", MACHINE_NOT_WORKING )
-
-GAME( 1997, pclove, stvbios, stv_5838, stv, stv_state, decathlt, ROT0, "Atlus", "Print Club LoveLove (J 970421 V1.000)", MACHINE_NOT_WORKING ) // uses the same type of protection as decathlete!!
-GAME( 1997, pclove2, stvbios, stv_5838, stv, stv_state, decathlt, ROT0, "Atlus", "Print Club LoveLove Ver 2 (J 970825 V1.000)", MACHINE_NOT_WORKING ) // ^
-
-GAME( 1998, stress, stvbios, stv, stv, stv_state, stv, ROT0, "Sega", "Stress Busters (J 981020 V1.000)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
-
-GAME( 1996, nameclub, stvbios, stv_5838, stv, stv_state, decathlt, ROT0, "Sega", "Name Club (J 960315 V1.000)", MACHINE_NOT_WORKING ) // uses the same type of protection as decathlete!!
-GAME( 1996, nclubv2, stvbios, stv_5838, stv, stv_state, decathlt, ROT0, "Sega", "Name Club Ver.2 (J 960315 V1.000)", MACHINE_NOT_WORKING ) // ^ (has the same datecode as nameclub, probably incorrect unless both were released today)
-GAME( 1997, nclubv3, stvbios, stv, stv, stv_state, nameclv3, ROT0, "Sega", "Name Club Ver.3 (J 970723 V1.000)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING ) // no protection
-
+GAME( 1997, pclb2elk, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 Earth Limited Kobe (Print Club Custom) (J 970808 V1.000)", MACHINE_NOT_WORKING )
/* Doing something.. but not enough yet */
GAME( 1995, vfremix, stvbios, stv, stv, stv_state, vfremix, ROT0, "Sega", "Virtua Fighter Remix (JUETBKAL 950428 V1.000)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING )
GAME( 1996, decathlt, stvbios, stv_5838, stv, stv_state, decathlt, ROT0, "Sega", "Decathlete (JUET 960709 V1.001)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION )
GAME( 1996, decathlto, decathlt,stv_5838, stv, stv_state, decathlt, ROT0, "Sega", "Decathlete (JUET 960424 V1.000)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION )
-GAME( 1998, twcup98, stvbios, stv_5881, stv, stv_state, twcup98, ROT0, "Tecmo", "Tecmo World Cup '98 (JUET 980410 V1.000)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // some situations with the GK result in the game stalling, maybe CPU core bug??
+
/* Gives I/O errors */
GAME( 1996, magzun, stvbios, stv, stv, stv_state, magzun, ROT0, "Sega", "Magical Zunou Power (J 961031 V1.000)", MACHINE_NOT_WORKING )
GAME( 1997, techbowl, stvbios, stv, stv, stv_state, stv, ROT0, "Sega", "Technical Bowling (J 971212 V1.000)", MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/suna16.cpp b/src/mame/drivers/suna16.cpp
index f33d0142f62..e2d375bc148 100644
--- a/src/mame/drivers/suna16.cpp
+++ b/src/mame/drivers/suna16.cpp
@@ -1021,7 +1021,7 @@ static MACHINE_CONFIG_START( bestbest, suna16_state )
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
MCFG_SOUND_ADD("ymsnd", YM3526, XTAL_24MHz/8) /* 3MHz */
- MCFG_YM3526_IRQ_HANDLER(INPUTLINE("audiocpu", INPUT_LINE_IRQ0))
+ MCFG_YM3526_IRQ_HANDLER(DEVWRITELINE("audiocpu", z80_device, irq_line))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
diff --git a/src/mame/drivers/super6.cpp b/src/mame/drivers/super6.cpp
index 838db3e3b20..599aadbcdf5 100644
--- a/src/mame/drivers/super6.cpp
+++ b/src/mame/drivers/super6.cpp
@@ -193,7 +193,7 @@ READ8_MEMBER( super6_state::fdc_r )
// don't crash please... but it's true, WAIT does nothing in our Z80
//fatalerror("Z80 WAIT not supported by MAME core\n");
- m_maincpu->set_input_line(Z80_INPUT_LINE_BOGUSWAIT, ASSERT_LINE);
+ m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, ASSERT_LINE);
return !m_fdc->intrq_r() << 7;
}
@@ -409,14 +409,14 @@ SLOT_INTERFACE_END
WRITE_LINE_MEMBER( super6_state::fdc_intrq_w )
{
- if (state) m_maincpu->set_input_line(Z80_INPUT_LINE_BOGUSWAIT, CLEAR_LINE);
+ if (state) m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, CLEAR_LINE);
m_ctc->trg3(!state);
}
WRITE_LINE_MEMBER( super6_state::fdc_drq_w )
{
- if (state) m_maincpu->set_input_line(Z80_INPUT_LINE_BOGUSWAIT, CLEAR_LINE);
+ if (state) m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, CLEAR_LINE);
m_dma->rdy_w(state);
}
diff --git a/src/mame/drivers/taito_f3.cpp b/src/mame/drivers/taito_f3.cpp
index 17d62e4f18e..1d33d59194a 100644
--- a/src/mame/drivers/taito_f3.cpp
+++ b/src/mame/drivers/taito_f3.cpp
@@ -678,15 +678,15 @@ ROM_START( arabianm )
ROM_LOAD16_BYTE("d29-02.ic18", 0x600000, 0x100000, CRC(ed894fe1) SHA1(5bf2fb6abdcf25bc525a2c3b29dbf7aca0b18fea) ) // -std-
ROM_REGION( 0x1200, "plds", 0 )
- ROM_LOAD( "D29-11.IC15.bin", 0x0000, 0x0157, CRC(5dd5c8f9) SHA1(5e6153d9e08985b2326dfd6d73f7b90136a7a4b1) ) // palce20v8h.1
- ROM_LOAD( "pal20l8b.2", 0x0200, 0x0144, CRC(c91437e2) SHA1(5bd6fb57fd7e0ff957a6ef9509b8f2e35a8ca29a) ) /* D29-12 */
- ROM_LOAD( "D29-13.IC14.bin", 0x0400, 0x0157, CRC(74d61d36) SHA1(c34d8b2d227f69c167d1516dea53e4bcb76491d1) ) // palce20v8h.3
- ROM_LOAD( "palce16v8h.11", 0x0600, 0x0117, CRC(51088324) SHA1(b985835b92c9d1e1dae6ae7cba9fa83c4db58bbb) ) /* D29-16 */
- ROM_LOAD( "pal16l8b.22", 0x0800, 0x0104, CRC(3e01e854) SHA1(72f48982673ac8337dac3358b7a79e45c60b9601) ) /* D29-09 */
- ROM_LOAD( "palce16v8h.31", 0x0a00, 0x0117, CRC(e0789727) SHA1(74add02cd194741de5ca6e36a99f9dd3e756fbdf) ) /* D29-17 */
- ROM_LOAD( "pal16l8b.62", 0x0c00, 0x0104, CRC(7093e2f3) SHA1(62bb0085ed93cc8a5fb3a1b08ce9c8071ebda657) ) /* D29-10 */
- ROM_LOAD( "D29-14.IC28.bin", 0x0e00, 0x0157, CRC(25d205d5) SHA1(8859fd498e4d84a55424899d23db470be217eaba) ) // palce20v8h.69
- ROM_LOAD( "pal20l8b.70", 0x1000, 0x0144, CRC(92b5b97c) SHA1(653ab0467f71d93eceb8143b124cdedaf1ede750) ) /* D29-15 */
+ ROM_LOAD( "palce20v8h.1", 0x0000, 0x0157, CRC(5dd5c8f9) SHA1(5e6153d9e08985b2326dfd6d73f7b90136a7a4b1) ) /* D29-11 */
+ ROM_LOAD( "pal20l8b.2", 0x0200, 0x0144, CRC(c91437e2) SHA1(5bd6fb57fd7e0ff957a6ef9509b8f2e35a8ca29a) ) /* D29-12 */
+ ROM_LOAD( "palce20v8h.3", 0x0400, 0x0157, CRC(74d61d36) SHA1(c34d8b2d227f69c167d1516dea53e4bcb76491d1) ) /* D29-13 */
+ ROM_LOAD( "palce16v8h.11", 0x0600, 0x0117, CRC(51088324) SHA1(b985835b92c9d1e1dae6ae7cba9fa83c4db58bbb) ) /* D29-16 */
+ ROM_LOAD( "pal16l8b.22", 0x0800, 0x0104, CRC(3e01e854) SHA1(72f48982673ac8337dac3358b7a79e45c60b9601) ) /* D29-09 */
+ ROM_LOAD( "palce16v8h.31", 0x0a00, 0x0117, CRC(e0789727) SHA1(74add02cd194741de5ca6e36a99f9dd3e756fbdf) ) /* D29-17 */
+ ROM_LOAD( "pal16l8b.62", 0x0c00, 0x0104, CRC(7093e2f3) SHA1(62bb0085ed93cc8a5fb3a1b08ce9c8071ebda657) ) /* D29-10 */
+ ROM_LOAD( "palce20v8h.69", 0x0e00, 0x0157, CRC(25d205d5) SHA1(8859fd498e4d84a55424899d23db470be217eaba) ) /* D29-14 */
+ ROM_LOAD( "pal20l8b.70", 0x1000, 0x0144, CRC(92b5b97c) SHA1(653ab0467f71d93eceb8143b124cdedaf1ede750) ) /* D29-15 */
ROM_END
ROM_START( arabianmj )
@@ -718,15 +718,15 @@ ROM_START( arabianmj )
ROM_LOAD16_BYTE("d29-02.ic18", 0x600000, 0x100000, CRC(ed894fe1) SHA1(5bf2fb6abdcf25bc525a2c3b29dbf7aca0b18fea) ) // -std-
ROM_REGION( 0x1200, "plds", 0 )
- ROM_LOAD( "D29-11.IC15.bin", 0x0000, 0x0157, CRC(5dd5c8f9) SHA1(5e6153d9e08985b2326dfd6d73f7b90136a7a4b1) ) // palce20v8h.1
- ROM_LOAD( "pal20l8b.2", 0x0200, 0x0144, CRC(c91437e2) SHA1(5bd6fb57fd7e0ff957a6ef9509b8f2e35a8ca29a) ) /* D29-12 */
- ROM_LOAD( "D29-13.IC14.bin", 0x0400, 0x0157, CRC(74d61d36) SHA1(c34d8b2d227f69c167d1516dea53e4bcb76491d1) ) // palce20v8h.3
- ROM_LOAD( "palce16v8h.11", 0x0600, 0x0117, CRC(51088324) SHA1(b985835b92c9d1e1dae6ae7cba9fa83c4db58bbb) ) /* D29-16 */
- ROM_LOAD( "pal16l8b.22", 0x0800, 0x0104, CRC(3e01e854) SHA1(72f48982673ac8337dac3358b7a79e45c60b9601) ) /* D29-09 */
- ROM_LOAD( "palce16v8h.31", 0x0a00, 0x0117, CRC(e0789727) SHA1(74add02cd194741de5ca6e36a99f9dd3e756fbdf) ) /* D29-17 */
- ROM_LOAD( "pal16l8b.62", 0x0c00, 0x0104, CRC(7093e2f3) SHA1(62bb0085ed93cc8a5fb3a1b08ce9c8071ebda657) ) /* D29-10 */
- ROM_LOAD( "D29-14.IC28.bin", 0x0e00, 0x0157, CRC(25d205d5) SHA1(8859fd498e4d84a55424899d23db470be217eaba) ) // palce20v8h.69
- ROM_LOAD( "pal20l8b.70", 0x1000, 0x0144, CRC(92b5b97c) SHA1(653ab0467f71d93eceb8143b124cdedaf1ede750) ) /* D29-15 */
+ ROM_LOAD( "palce20v8h.1", 0x0000, 0x0157, CRC(5dd5c8f9) SHA1(5e6153d9e08985b2326dfd6d73f7b90136a7a4b1) ) /* D29-11 */
+ ROM_LOAD( "pal20l8b.2", 0x0200, 0x0144, CRC(c91437e2) SHA1(5bd6fb57fd7e0ff957a6ef9509b8f2e35a8ca29a) ) /* D29-12 */
+ ROM_LOAD( "palce20v8h.3", 0x0400, 0x0157, CRC(74d61d36) SHA1(c34d8b2d227f69c167d1516dea53e4bcb76491d1) ) /* D29-13 */
+ ROM_LOAD( "palce16v8h.11", 0x0600, 0x0117, CRC(51088324) SHA1(b985835b92c9d1e1dae6ae7cba9fa83c4db58bbb) ) /* D29-16 */
+ ROM_LOAD( "pal16l8b.22", 0x0800, 0x0104, CRC(3e01e854) SHA1(72f48982673ac8337dac3358b7a79e45c60b9601) ) /* D29-09 */
+ ROM_LOAD( "palce16v8h.31", 0x0a00, 0x0117, CRC(e0789727) SHA1(74add02cd194741de5ca6e36a99f9dd3e756fbdf) ) /* D29-17 */
+ ROM_LOAD( "pal16l8b.62", 0x0c00, 0x0104, CRC(7093e2f3) SHA1(62bb0085ed93cc8a5fb3a1b08ce9c8071ebda657) ) /* D29-10 */
+ ROM_LOAD( "palce20v8h.69", 0x0e00, 0x0157, CRC(25d205d5) SHA1(8859fd498e4d84a55424899d23db470be217eaba) ) /* D29-14 */
+ ROM_LOAD( "pal20l8b.70", 0x1000, 0x0144, CRC(92b5b97c) SHA1(653ab0467f71d93eceb8143b124cdedaf1ede750) ) /* D29-15 */
ROM_END
ROM_START( arabianmu )
@@ -758,15 +758,15 @@ ROM_START( arabianmu )
ROM_LOAD16_BYTE("d29-02.ic18", 0x600000, 0x100000, CRC(ed894fe1) SHA1(5bf2fb6abdcf25bc525a2c3b29dbf7aca0b18fea) ) // -std-
ROM_REGION( 0x1200, "plds", 0 )
- ROM_LOAD( "D29-11.IC15.bin", 0x0000, 0x0157, CRC(5dd5c8f9) SHA1(5e6153d9e08985b2326dfd6d73f7b90136a7a4b1) ) // palce20v8h.1
- ROM_LOAD( "pal20l8b.2", 0x0200, 0x0144, CRC(c91437e2) SHA1(5bd6fb57fd7e0ff957a6ef9509b8f2e35a8ca29a) ) /* D29-12 */
- ROM_LOAD( "D29-13.IC14.bin", 0x0400, 0x0157, CRC(74d61d36) SHA1(c34d8b2d227f69c167d1516dea53e4bcb76491d1) ) // palce20v8h.3
- ROM_LOAD( "palce16v8h.11", 0x0600, 0x0117, CRC(51088324) SHA1(b985835b92c9d1e1dae6ae7cba9fa83c4db58bbb) ) /* D29-16 */
- ROM_LOAD( "pal16l8b.22", 0x0800, 0x0104, CRC(3e01e854) SHA1(72f48982673ac8337dac3358b7a79e45c60b9601) ) /* D29-09 */
- ROM_LOAD( "palce16v8h.31", 0x0a00, 0x0117, CRC(e0789727) SHA1(74add02cd194741de5ca6e36a99f9dd3e756fbdf) ) /* D29-17 */
- ROM_LOAD( "pal16l8b.62", 0x0c00, 0x0104, CRC(7093e2f3) SHA1(62bb0085ed93cc8a5fb3a1b08ce9c8071ebda657) ) /* D29-10 */
- ROM_LOAD( "D29-14.IC28.bin", 0x0e00, 0x0157, CRC(25d205d5) SHA1(8859fd498e4d84a55424899d23db470be217eaba) ) // palce20v8h.69
- ROM_LOAD( "pal20l8b.70", 0x1000, 0x0144, CRC(92b5b97c) SHA1(653ab0467f71d93eceb8143b124cdedaf1ede750) ) /* D29-15 */
+ ROM_LOAD( "palce20v8h.1", 0x0000, 0x0157, CRC(5dd5c8f9) SHA1(5e6153d9e08985b2326dfd6d73f7b90136a7a4b1) ) /* D29-11 */
+ ROM_LOAD( "pal20l8b.2", 0x0200, 0x0144, CRC(c91437e2) SHA1(5bd6fb57fd7e0ff957a6ef9509b8f2e35a8ca29a) ) /* D29-12 */
+ ROM_LOAD( "palce20v8h.3", 0x0400, 0x0157, CRC(74d61d36) SHA1(c34d8b2d227f69c167d1516dea53e4bcb76491d1) ) /* D29-13 */
+ ROM_LOAD( "palce16v8h.11", 0x0600, 0x0117, CRC(51088324) SHA1(b985835b92c9d1e1dae6ae7cba9fa83c4db58bbb) ) /* D29-16 */
+ ROM_LOAD( "pal16l8b.22", 0x0800, 0x0104, CRC(3e01e854) SHA1(72f48982673ac8337dac3358b7a79e45c60b9601) ) /* D29-09 */
+ ROM_LOAD( "palce16v8h.31", 0x0a00, 0x0117, CRC(e0789727) SHA1(74add02cd194741de5ca6e36a99f9dd3e756fbdf) ) /* D29-17 */
+ ROM_LOAD( "pal16l8b.62", 0x0c00, 0x0104, CRC(7093e2f3) SHA1(62bb0085ed93cc8a5fb3a1b08ce9c8071ebda657) ) /* D29-10 */
+ ROM_LOAD( "palce20v8h.69", 0x0e00, 0x0157, CRC(25d205d5) SHA1(8859fd498e4d84a55424899d23db470be217eaba) ) /* D29-14 */
+ ROM_LOAD( "pal20l8b.70", 0x1000, 0x0144, CRC(92b5b97c) SHA1(653ab0467f71d93eceb8143b124cdedaf1ede750) ) /* D29-15 */
ROM_END
ROM_START( ridingf )
@@ -1068,24 +1068,8 @@ ROM_START( hthero93u )
ROM_LOAD16_BYTE("d49-04.38", 0x000000, 0x200000, CRC(44b365a9) SHA1(14c4a6b193a0069360406c74c500ba24f2a55b62) ) // C8 C9 CA CB
// half empty
ROM_LOAD16_BYTE("d49-05.41", 0x600000, 0x100000, CRC(ed894fe1) SHA1(5bf2fb6abdcf25bc525a2c3b29dbf7aca0b18fea) ) // -std-
-
- ROM_REGION(0x800000, "palsgame" , ROMREGION_ERASE00 ) // all unprotected / unlocked (dumped from single PCB version of game)
- ROM_LOAD ("D49-12.IC60.bin", 0x000, 0x104, CRC(aa4cff37) SHA1(58e67e3807a32c403b1ef145d4bc5f91e1537554) )
- ROM_LOAD ("D49-21.IC17.bin", 0x000, 0x104, CRC(821775d4) SHA1(f066cf6ee2118dd57c904fcff3bb287d57e16367) )
-
- ROM_REGION(0x800000, "palsbase" , ROMREGION_ERASE00 ) // all unprotected / unlocked (dumped from single PCB version of game)
- // these should be the same on this and Arabian Magic, but the dumps don't match in all cases, maybe the AM ones were protected?
- ROM_LOAD ("D29-11.IC15.bin", 0x000000, 0x157, CRC(5dd5c8f9) SHA1(5e6153d9e08985b2326dfd6d73f7b90136a7a4b1) )
- ROM_LOAD ("D29-12.IC12.bin", 0x000000, 0x144, CRC(c872f1fd) SHA1(6bcf766f76d83c18fa1c095716a1298581aa06c2) )
- ROM_LOAD ("D29-13.IC14.bin", 0x000000, 0x157, CRC(74d61d36) SHA1(c34d8b2d227f69c167d1516dea53e4bcb76491d1) )
- ROM_LOAD ("D29-14.IC28.bin", 0x000000, 0x157, CRC(25d205d5) SHA1(8859fd498e4d84a55424899d23db470be217eaba) )
- ROM_LOAD ("D29-15.IC29.bin", 0x000000, 0x157, CRC(692eb582) SHA1(db40eb294cecc65d4a0d65e75b6daef75dcc2fb7) )
- ROM_LOAD ("D29-16.IC7.bin", 0x000000, 0x117, CRC(11875f52) SHA1(2c3a7a15b3184421ca1bc88383eeccf49ee0d22c) )
- ROM_LOAD ("D29-17.IC16.bin", 0x000000, 0x117, CRC(a0f74b51) SHA1(9d19e9099be965152a3cfbc5593e6abedb7c9d71) )
-
ROM_END
-
ROM_START( trstar )
ROM_REGION(0x200000, "maincpu", 0) /* 68020 code */
ROM_LOAD32_BYTE("d53-15-1.24", 0x000000, 0x40000, CRC(098bba94) SHA1(b77990213ac790d15bdc0dc1e8f7adf04fe5e952) )
diff --git a/src/mame/drivers/tb303.cpp b/src/mame/drivers/tb303.cpp
index 41b5f648a02..e0f4e4798c9 100644
--- a/src/mame/drivers/tb303.cpp
+++ b/src/mame/drivers/tb303.cpp
@@ -23,9 +23,12 @@ class tb303_state : public hh_ucom4_state
{
public:
tb303_state(const machine_config &mconfig, device_type type, const char *tag)
- : hh_ucom4_state(mconfig, type, tag)
+ : hh_ucom4_state(mconfig, type, tag),
+ m_tp3_off_timer(*this, "tp3_off")
{ }
+ required_device<timer_device> m_tp3_off_timer;
+
UINT8 m_ram[0xc00];
UINT16 m_ram_address;
bool m_ram_ce;
@@ -40,18 +43,37 @@ public:
DECLARE_READ8_MEMBER(input_r);
void update_leds();
- TIMER_DEVICE_CALLBACK_MEMBER(tp3_clock) { m_maincpu->set_input_line(0, ASSERT_LINE); }
- TIMER_DEVICE_CALLBACK_MEMBER(tp3_clear) { m_maincpu->set_input_line(0, CLEAR_LINE); }
+ TIMER_DEVICE_CALLBACK_MEMBER(tp3_clock);
+ TIMER_DEVICE_CALLBACK_MEMBER(tp3_off);
virtual void machine_start() override;
};
+
+/***************************************************************************
+
+ Timer/Interrupt
+
+***************************************************************************/
+
// TP2 to MCU CLK: LC circuit(TI S74230), stable sine wave, 2.2us interval
-#define TP2_HZ 454545
+#define TP2_CLOCK_HZ 454545 /* in hz */
// TP3 to MCU _INT: square wave, 1.8ms interval, short duty cycle
-#define TP3_PERIOD attotime::from_usec(1800)
-#define TP3_LOW (TP3_PERIOD / 8)
+#define TP3_CLOCK attotime::from_usec(1800)
+#define TP3_OFF (TP3_CLOCK / 8)
+
+TIMER_DEVICE_CALLBACK_MEMBER(tb303_state::tp3_off)
+{
+ m_maincpu->set_input_line(0, CLEAR_LINE);
+}
+
+TIMER_DEVICE_CALLBACK_MEMBER(tb303_state::tp3_clock)
+{
+ m_maincpu->set_input_line(0, ASSERT_LINE);
+ m_tp3_off_timer->adjust(TP3_OFF);
+}
+
/***************************************************************************
@@ -248,7 +270,7 @@ void tb303_state::machine_start()
static MACHINE_CONFIG_START( tb303, tb303_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", NEC_D650, TP2_HZ)
+ MCFG_CPU_ADD("maincpu", NEC_D650, TP2_CLOCK_HZ)
MCFG_UCOM4_READ_A_CB(READ8(tb303_state, input_r))
MCFG_UCOM4_READ_B_CB(READ8(tb303_state, input_r))
MCFG_UCOM4_READ_C_CB(READ8(tb303_state, ram_r))
@@ -260,9 +282,9 @@ static MACHINE_CONFIG_START( tb303, tb303_state )
MCFG_UCOM4_WRITE_H_CB(WRITE8(tb303_state, switch_w))
MCFG_UCOM4_WRITE_I_CB(WRITE8(tb303_state, strobe_w))
- MCFG_TIMER_DRIVER_ADD_PERIODIC("tp3_clock", tb303_state, tp3_clock, TP3_PERIOD)
- MCFG_TIMER_START_DELAY(TP3_PERIOD - TP3_LOW)
- MCFG_TIMER_DRIVER_ADD_PERIODIC("tp3_clear", tb303_state, tp3_clear, TP3_PERIOD)
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("tp3_clock", tb303_state, tp3_clock, TP3_CLOCK)
+ MCFG_TIMER_START_DELAY(TP3_CLOCK)
+ MCFG_TIMER_DRIVER_ADD("tp3_off", tb303_state, tp3_off)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1))
MCFG_DEFAULT_LAYOUT(layout_tb303)
diff --git a/src/mame/drivers/ticalc1x.cpp b/src/mame/drivers/ticalc1x.cpp
index 74d97ffeffb..dcdea37827c 100644
--- a/src/mame/drivers/ticalc1x.cpp
+++ b/src/mame/drivers/ticalc1x.cpp
@@ -35,9 +35,19 @@ public:
ticalc1x_state(const machine_config &mconfig, device_type type, const char *tag)
: hh_tms1k_state(mconfig, type, tag)
{ }
+
+protected:
+ virtual void machine_start() override;
};
+void ticalc1x_state::machine_start()
+{
+ hh_tms1k_state::machine_start();
+ memset(m_display_segmask, ~0, sizeof(m_display_segmask)); // !
+}
+
+
/***************************************************************************
@@ -75,18 +85,21 @@ public:
void tisr16_state::prepare_display()
{
// update leds state
- set_display_segmask(0xfff, 0xff);
- display_matrix(8, 12, m_o, m_r, false);
+ for (int y = 0; y < 11; y++)
+ m_display_state[y] = (m_r >> y & 1) ? m_o : 0;
// exponent sign is from R10 O1, and R10 itself only uses segment G
m_display_state[11] = m_display_state[10] << 5 & 0x40;
m_display_state[10] &= 0x40;
+
+ set_display_size(8, 12);
display_update();
}
WRITE16_MEMBER(tisr16_state::write_r)
{
- // R0-R10: input mux, select digit
+ // R0-R10: input mux
+ // R0-R10: select digit (right-to-left)
m_r = m_inp_mux = data;
prepare_display();
}
@@ -246,7 +259,7 @@ INPUT_PORTS_END
static MACHINE_CONFIG_START( tisr16, tisr16_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", TMS1000, 300000) // approximation - RC osc. R=43K, C=68pf (note: tisr16ii MCU RC osc. is different: R=30K, C=100pf, same freq)
+ MCFG_CPU_ADD("maincpu", TMS1000, 300000) // RC osc. R=43K, C=68pf -> ~300kHz (note: tisr16ii MCU RC osc. is different: R=30K, C=100pf -> also ~300kHz)
MCFG_TMS1XXX_READ_K_CB(READ8(tisr16_state, read_k))
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(tisr16_state, write_o))
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(tisr16_state, write_r))
@@ -302,10 +315,11 @@ public:
WRITE16_MEMBER(ti1250_state::write_r)
{
- // R0-R8: select digit
- set_display_segmask(0xff, 0xff);
- set_display_segmask(0x100, 0x40); // R8 only has segment G connected
- display_matrix(8, 9, m_o, data);
+ // R8 only has segment G connected
+ m_display_segmask[8] = 0x40;
+
+ // R0-R7(,R8): select digit (right-to-left)
+ display_matrix_seg(8, 9, m_o, data, 0xff);
}
WRITE16_MEMBER(ti1250_state::write_o)
@@ -384,7 +398,7 @@ INPUT_PORTS_END
static MACHINE_CONFIG_START( ti1250, ti1250_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", TMS0950, 200000) // approximation - RC osc. R=68K, C=68pf
+ MCFG_CPU_ADD("maincpu", TMS0950, 200000) // RC osc. R=68K, C=68pf -> ~200kHz
MCFG_TMS1XXX_READ_K_CB(READ8(ti1250_state, read_k))
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(ti1250_state, write_o))
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(ti1250_state, write_r))
@@ -437,9 +451,9 @@ public:
WRITE16_MEMBER(ti1000_state::write_r)
{
- // R0-R7: select digit
- set_display_segmask(0xff, 0xff);
- display_matrix(8, 8, m_o, data);
+ // R0-R7: select digit (right-to-left)
+ UINT8 o = BITSWAP8(m_o,7,4,3,2,1,0,6,5);
+ display_matrix_seg(8, 8, o, data, 0xff);
}
WRITE16_MEMBER(ti1000_state::write_o)
@@ -447,7 +461,7 @@ WRITE16_MEMBER(ti1000_state::write_o)
// O0-O3,O5(?): input mux
// O0-O7: digit segments
m_inp_mux = (data & 0xf) | (data >> 1 & 0x10);
- m_o = BITSWAP8(data,7,4,3,2,1,0,6,5);
+ m_o = data;
}
READ8_MEMBER(ti1000_state::read_k)
@@ -541,11 +555,10 @@ WRITE16_MEMBER(wizatron_state::write_r)
// 3rd digit only has A and G for =, though some newer hardware revisions
// (goes for both wizatron and lilprof) use a custom equals-sign digit here
- set_display_segmask(8, 0x41);
+ m_display_segmask[3] = 0x41;
- // R0-R8: select digit
- set_display_segmask(0x1ff^8, 0x7f);
- display_matrix(7, 9, m_o, data);
+ // R0-R8: select digit (right-to-left)
+ display_matrix_seg(7, 9, m_o, data, 0x7f);
}
WRITE16_MEMBER(wizatron_state::write_o)
@@ -712,16 +725,19 @@ public:
WRITE16_MEMBER(lilprof78_state::write_r)
{
// update leds state
- UINT8 seg = BITSWAP8(m_o,7,4,3,2,1,0,6,5) & 0x7f;
+ UINT8 o = BITSWAP8(m_o,7,4,3,2,1,0,6,5) & 0x7f;
UINT16 r = (data & 7) | (data << 1 & 0x1f0);
- set_display_segmask(0x1ff, 0x7f);
- display_matrix(7, 9, seg, r, false);
-
+
+ for (int y = 0; y < 9; y++)
+ m_display_state[y] = (r >> y & 1) ? o : 0;
+
// 3rd digit A/G(equals sign) is from O7
- m_display_state[3] = (r != 0 && m_o & 0x80) ? 0x41 : 0;
+ m_display_state[3] = (r && m_o & 0x80) ? 0x41 : 0;
// 6th digit is a custom 7seg for math symbols (see wizatron_state write_r)
m_display_state[6] = BITSWAP8(m_display_state[6],7,6,1,4,2,3,5,0);
+
+ set_display_size(7, 9);
display_update();
}
@@ -820,8 +836,7 @@ public:
void dataman_state::prepare_display()
{
// note the extra segment on R9
- set_display_segmask(0x1ff, 0x7f);
- display_matrix(8, 9, m_o | (m_r >> 2 & 0x80), m_r & 0x1ff);
+ display_matrix_seg(8, 9, m_o | (m_r >> 2 & 0x80), m_r & 0x1ff, 0x7f);
}
WRITE16_MEMBER(dataman_state::write_r)
@@ -944,10 +959,12 @@ public:
WRITE16_MEMBER(ti30_state::write_r)
{
+ // 1st digit only has segments B,F,G,DP
+ m_display_segmask[0] = 0xe2;
+
// R0-R8: select digit
- set_display_segmask(0x1fe, 0xff);
- set_display_segmask(0x001, 0xe2); // 1st digit only has segments B,F,G,DP
- display_matrix(8, 9, m_o, data);
+ UINT8 o = BITSWAP8(m_o,7,5,2,1,4,0,6,3);
+ display_matrix_seg(8, 9, o, data, 0xff);
}
WRITE16_MEMBER(ti30_state::write_o)
@@ -955,7 +972,7 @@ WRITE16_MEMBER(ti30_state::write_o)
// O0-O2,O4-O7: input mux
// O0-O7: digit segments
m_inp_mux = (data & 7) | (data >> 1 & 0x78);
- m_o = BITSWAP8(data,7,5,2,1,4,0,6,3);
+ m_o = data;
}
READ8_MEMBER(ti30_state::read_k)
@@ -1367,6 +1384,6 @@ COMP( 1978, lilprof78, lilprof, 0, lilprof78, lilprof78, driver_device, 0, "Tex
COMP( 1977, dataman, 0, 0, dataman, dataman, driver_device, 0, "Texas Instruments", "DataMan", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW )
-COMP( 1976, ti30, 0, 0, ti30, ti30, driver_device, 0, "Texas Instruments", "TI-30", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW )
-COMP( 1976, tibusan, 0, 0, ti30, tibusan, driver_device, 0, "Texas Instruments", "TI Business Analyst", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW )
-COMP( 1977, tiprog, 0, 0, ti30, tiprog, driver_device, 0, "Texas Instruments", "TI Programmer", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW )
+COMP( 1976, ti30, 0, 0, ti30, ti30, driver_device, 0, "Texas Instruments", "TI-30", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW )
+COMP( 1976, tibusan, 0, 0, ti30, tibusan, driver_device, 0, "Texas Instruments", "TI Business Analyst", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW )
+COMP( 1977, tiprog, 0, 0, ti30, tiprog, driver_device, 0, "Texas Instruments", "TI Programmer", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW )
diff --git a/src/mame/drivers/tispeak.cpp b/src/mame/drivers/tispeak.cpp
index cafc46a7cbc..205574b0a5e 100644
--- a/src/mame/drivers/tispeak.cpp
+++ b/src/mame/drivers/tispeak.cpp
@@ -80,7 +80,7 @@ above expectations. TI continued to manufacture many products for this line.
- notes: this one has a dedicated voice actor
Speak & Spell (France) "La Dictee Magique", 1980
- - MCU: CD2702, labeled CD2702AN2L (die labeled TMC0270F 2702A)
+ - MCU: CD2702*
- TMS51xx: CD2801
- VSM: 16KB CD2352
@@ -143,7 +143,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*
- TMS51xx: CD2801
- VSM(1/2): 16KB CD2392
- VSM(2/2): 16KB CD2393
@@ -170,7 +170,7 @@ Speak & Math:
Speak & Read:
Speak & Read (US), 1980
- - MCU: CD2705, labeled CD2705B-N2L (die labeled TMC0270E 2705B) - 2nd revision?(late-1981)
+ - MCU: CD2705, labeled CD2705B-N2L (die labeled TMC0270E 2705B) - 2nd revision?
- TMS51xx: CD2801
- VSM(1/2): 16KB CD2394(rev.A)
- VSM(2/2): 16KB CD2395(rev.A)
@@ -351,40 +351,10 @@ Language Tutor modules:
- English(4/4): VSM: 16KB CD3529
-Other manufacturers:
-
-Tiger Electronics K28 (model 7-232) Sold in Hong Kong, distributed in US as:
-- Coleco: Talking Teacher
-- Sears: Talkatron - Learning Computer
-
-1981 K28 models 7-230 and 7-231 are on different hardware, showing a different
-keyboard, VFD display, and use the SC-01 speech chip. --> driver k28.cpp
-
- K28 model 7-232 (HK), 1985
- - MCU: TMS1400 MP7324
- - TMS51xx: TMS5110A
- - VSM: 16KB CM62084
- - LCD: unknown 8*16-seg
-
-K28 modules:
-
- - Spelling I: VSM: 16KB CM62086
- - Spelling II: VSM: 16KB CM62085?
- - Spelling III: VSM: 16KB CM62087
- - Expansion Module 1: VSM: 16KB CM62214? - assumed same VSM as CM62086
- - Expansion Module 2: VSM: 16KB CM62216 - assumed same VSM as the one in Spelling II
- - Expansion Module 3: VSM: 16KB CM62215 - same VSM as CM62087
- - Expansion Module 4: VSM: 16KB CM62217
- - Expansion Module 5: VSM: 16KB CM62218*
- - Expansion Module 6: VSM: 16KB CM62219
-
- note: these won't work on the 1981 version(s)
-
----------------------------------------------------------------------------
TODO:
- why doesn't lantutor work?
- - identify and emulate k28 LCD
- emulate other known devices
@@ -398,7 +368,6 @@ K28 modules:
#include "softlist.h"
// internal artwork
-#include "k28m2.lh"
#include "lantutor.lh"
#include "snmath.lh"
#include "snspell.lh"
@@ -443,11 +412,6 @@ public:
DECLARE_WRITE16_MEMBER(snspellc_write_r);
DECLARE_READ8_MEMBER(tntell_read_k);
- void k28_prepare_display(UINT8 old, UINT8 data);
- DECLARE_READ8_MEMBER(k28_read_k);
- DECLARE_WRITE16_MEMBER(k28_write_o);
- DECLARE_WRITE16_MEMBER(k28_write_r);
-
// cartridge
UINT32 m_cart_max_size;
UINT8* m_cart_base;
@@ -468,6 +432,7 @@ protected:
void tispeak_state::machine_start()
{
hh_tms1k_state::machine_start();
+ memset(m_display_segmask, ~0, sizeof(m_display_segmask)); // !
init_cartridge();
}
@@ -540,9 +505,8 @@ DRIVER_INIT_MEMBER(tispeak_state, lantutor)
void tispeak_state::prepare_display()
{
- UINT16 gridmask = (m_display_decay[15][16] != 0) ? 0xffff : 0x8000; // vfd filament on/off
- set_display_segmask(0x21ff, 0x3fff);
- display_matrix(16+1, 16, m_plate | 1<<16, m_grid & gridmask);
+ UINT16 gridmask = (m_display_decay[15][16] != 0) ? 0xffff : 0x8000;
+ display_matrix_seg(16+1, 16, m_plate | 0x10000, m_grid & gridmask, 0x3fff);
}
WRITE16_MEMBER(tispeak_state::snspell_write_r)
@@ -667,46 +631,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(tispeak_state::tntell_get_overlay)
}
-// k28 specific
-
-void tispeak_state::k28_prepare_display(UINT8 old, UINT8 data)
-{
- // ?
-}
-
-WRITE16_MEMBER(tispeak_state::k28_write_r)
-{
- // R1234: TMS5100 CTL8421
- m_tms5100->ctl_w(space, 0, BITSWAP8(data,0,0,0,0,1,2,3,4) & 0xf);
-
- // R0: TMS5100 PDC pin
- m_tms5100->pdc_w(data & 1);
-
- // R5: input mux high bit
- m_inp_mux = (m_inp_mux & 0xff) | (data << 3 & 0x100);
-
- // R6: power-off request, on falling edge
- if ((m_r >> 6 & 1) && !(data >> 6 & 1))
- power_off();
-
- // R7-R10: LCD data
- k28_prepare_display(m_r >> 7 & 0xf, data >> 7 & 0xf);
- m_r = data;
-}
-
-WRITE16_MEMBER(tispeak_state::k28_write_o)
-{
- // O0-O7: input mux low
- m_inp_mux = (m_inp_mux & ~0xff) | data;
-}
-
-READ8_MEMBER(tispeak_state::k28_read_k)
-{
- // K: TMS5100 CTL, multiplexed inputs
- return m_tms5100->ctl_r(space, 0) | read_inputs(9);
-}
-
-
/***************************************************************************
@@ -875,7 +799,7 @@ static INPUT_PORTS_START( snmath )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_PLUS_PAD) PORT_NAME("+")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_MINUS_PAD) PORT_NAME("-")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_ASTERISK) PORT_NAME(UTF8_MULTIPLY)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_SLASH_PAD) PORT_NAME(UTF8_DIVIDE)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_SLASH_PAD) PORT_NAME(UTF8_DIVIDE) // /
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_E) PORT_NAME("Mix It")
PORT_START("IN.6") // R6
@@ -1107,63 +1031,6 @@ static INPUT_PORTS_START( tntell )
INPUT_PORTS_END
-static INPUT_PORTS_START( k28m2 )
- PORT_START("IN.0") // O0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("Off") // -> auto_power_off
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_CHAR('A') PORT_NAME("A/1")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_CHAR('J') PORT_NAME("J/0")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('S')
-
- PORT_START("IN.1") // O1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGUP) PORT_NAME("On") PORT_CHANGED_MEMBER(DEVICE_SELF, tispeak_state, power_button, (void *)true)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_CHAR('B') PORT_NAME("B/2")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CODE(KEYCODE_PLUS_PAD) PORT_CHAR('K') PORT_NAME("K/+")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) PORT_CHAR('T')
-
- PORT_START("IN.2") // O2
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_NAME("Repeat")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_CHAR('C') PORT_NAME("C/3")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CODE(KEYCODE_MINUS_PAD) PORT_CHAR('L') PORT_NAME("L/-")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_CHAR('U')
-
- PORT_START("IN.3") // O3
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH) PORT_NAME("Prompt")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_CHAR('D') PORT_NAME("D/4")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_CODE(KEYCODE_ASTERISK) PORT_CHAR('M') PORT_NAME("M/" UTF8_MULTIPLY)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_CHAR('V')
-
- PORT_START("IN.4") // O4
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_HOME) PORT_NAME("Menu")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_CHAR('E') PORT_NAME("E/5")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CODE(KEYCODE_SLASH_PAD) PORT_CHAR('N') PORT_NAME("N/" UTF8_DIVIDE)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('W')
-
- PORT_START("IN.5") // O5
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_END) PORT_NAME("Module")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_CHAR('F') PORT_NAME("F/6")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('O')
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_CHAR('X')
-
- PORT_START("IN.6") // O6
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SPACE) PORT_NAME("Select")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_CHAR('G') PORT_NAME("G/7")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CHAR('P')
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y')
-
- PORT_START("IN.7") // O7
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("Clear")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_CHAR('H') PORT_NAME("H/8")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q')
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z')
-
- PORT_START("IN.8") // R5
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'')
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_CHAR('I') PORT_NAME("I/9")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_CHAR('R')
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("Enter")
-INPUT_PORTS_END
-
-
/***************************************************************************
@@ -1343,33 +1210,6 @@ static MACHINE_CONFIG_DERIVED( tntell, vocaid )
MACHINE_CONFIG_END
-static MACHINE_CONFIG_START( k28m2, tispeak_state )
-
- /* basic machine hardware */
- MCFG_CPU_ADD("maincpu", TMS1400, MASTER_CLOCK/2)
- MCFG_TMS1XXX_READ_K_CB(READ8(tispeak_state, k28_read_k))
- MCFG_TMS1XXX_WRITE_O_CB(WRITE16(tispeak_state, k28_write_o))
- MCFG_TMS1XXX_WRITE_R_CB(WRITE16(tispeak_state, k28_write_r))
-
- MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_k28m2)
-
- /* sound hardware */
- MCFG_DEVICE_ADD("tms6100", TMS6100, MASTER_CLOCK/4)
-
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("tms5100", TMS5110A, MASTER_CLOCK)
- MCFG_FRAGMENT_ADD(tms5110_route)
-
- /* cartridge */
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "k28m2")
- MCFG_GENERIC_EXTENSIONS("vsm")
- MCFG_GENERIC_LOAD(tispeak_state, tispeak_cartridge)
-
- MCFG_SOFTWARE_LIST_ADD("cart_list", "k28m2")
-MACHINE_CONFIG_END
-
-
/***************************************************************************
@@ -1402,10 +1242,10 @@ ROM_START( snspellp )
ROM_REGION( 2127, "maincpu:mpla", 0 )
ROM_LOAD( "tms0270_common2_micro.pla", 0, 2127, CRC(86737ac1) SHA1(4aa0444f3ddf88738ea74aec404c684bf54eddba) )
ROM_REGION( 1246, "maincpu:opla", 0 )
- ROM_LOAD( "tms0270_tmc0271_output.pla", 0, 1246, CRC(9ebe12ab) SHA1(acb4e07ba26f2daca5f1c234885ac0371c7ce87f) ) // using the one from 1st version
+ ROM_LOAD( "tms0270_tmc0271_output.pla", 0, 1246, CRC(9ebe12ab) SHA1(acb4e07ba26f2daca5f1c234885ac0371c7ce87f) ) // using the one from 1978 version
ROM_REGION( 0x10000, "tms6100", ROMREGION_ERASEFF ) // 8000-bfff = space reserved for cartridge
- ROM_LOAD( "tmc0351nl.vsm", 0x0000, 0x4000, CRC(beea3373) SHA1(8b0f7586d2f12c3d4a885fdb528cf23feffa1a3b) ) // using the one from 1st version
+ ROM_LOAD( "tmc0351nl.vsm", 0x0000, 0x4000, CRC(beea3373) SHA1(8b0f7586d2f12c3d4a885fdb528cf23feffa1a3b) ) // using the one from 1978 version
ROM_LOAD( "tmc0352nl.vsm", 0x4000, 0x4000, CRC(d51f0587) SHA1(ddaa484be1bba5fef46b481cafae517e4acaa8ed) ) // "
ROM_END
@@ -1416,7 +1256,7 @@ ROM_START( snspellua )
ROM_REGION( 1246, "maincpu:ipla", 0 )
ROM_LOAD( "tms0980_common1_instr.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) )
ROM_REGION( 2127, "maincpu:mpla", 0 )
- ROM_LOAD( "tms0270_common2_micro.pla", 0, 2127, CRC(86737ac1) SHA1(4aa0444f3ddf88738ea74aec404c684bf54eddba) )
+ ROM_LOAD( "tms0270_common2_micro.pla", 0, 2127, BAD_DUMP CRC(86737ac1) SHA1(4aa0444f3ddf88738ea74aec404c684bf54eddba) ) // not verified
ROM_REGION( 1246, "maincpu:opla", 0 )
ROM_LOAD( "tms0270_tmc0271_output.pla", 0, 1246, CRC(9ebe12ab) SHA1(acb4e07ba26f2daca5f1c234885ac0371c7ce87f) )
@@ -1447,7 +1287,7 @@ ROM_START( snspelluk )
ROM_REGION( 1246, "maincpu:ipla", 0 )
ROM_LOAD( "tms0980_common1_instr.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) )
ROM_REGION( 2127, "maincpu:mpla", 0 )
- ROM_LOAD( "tms0270_common2_micro.pla", 0, 2127, CRC(86737ac1) SHA1(4aa0444f3ddf88738ea74aec404c684bf54eddba) )
+ ROM_LOAD( "tms0270_common2_micro.pla", 0, 2127, BAD_DUMP CRC(86737ac1) SHA1(4aa0444f3ddf88738ea74aec404c684bf54eddba) ) // not verified
ROM_REGION( 1246, "maincpu:opla", 0 )
ROM_LOAD( "tms0270_tmc0271_output.pla", 0, 1246, CRC(9ebe12ab) SHA1(acb4e07ba26f2daca5f1c234885ac0371c7ce87f) )
@@ -1489,14 +1329,14 @@ ROM_END
ROM_START( snspellfr )
ROM_REGION( 0x1000, "maincpu", 0 )
- ROM_LOAD( "cd2702an2l", 0x0000, 0x1000, CRC(895d6a4e) SHA1(a8bc118c83a84260033734191dcaa71a93dfa52b) )
+ ROM_LOAD( "tmc0271h-n2l", 0x0000, 0x1000, BAD_DUMP CRC(f83b5d2d) SHA1(10155b0b7f7f1583c7def8a693553cd35944ea6f) ) // placeholder, use the one we have
ROM_REGION( 1246, "maincpu:ipla", 0 )
ROM_LOAD( "tms0980_common1_instr.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) )
ROM_REGION( 2127, "maincpu:mpla", 0 )
- ROM_LOAD( "tms0270_common1_micro.pla", 0, 2127, CRC(504b96bb) SHA1(67b691e7c0b97239410587e50e5182bf46475b43) )
+ ROM_LOAD( "tms0270_common2_micro.pla", 0, 2127, BAD_DUMP CRC(86737ac1) SHA1(4aa0444f3ddf88738ea74aec404c684bf54eddba) ) // not verified
ROM_REGION( 1246, "maincpu:opla", 0 )
- ROM_LOAD( "tms0270_cd2702_output.pla", 0, 1246, CRC(2478c595) SHA1(9a8ac690902731e1e01533279a1c9223011e1537) )
+ ROM_LOAD( "tms0270_tmc0271h_output.pla", 0, 1246, BAD_DUMP CRC(2478c595) SHA1(9a8ac690902731e1e01533279a1c9223011e1537) ) // placeholder, use the one we have
ROM_REGION( 0x10000, "tms6100", ROMREGION_ERASEFF ) // uses only 1 rom, 8000-bfff = space reserved for cartridge
ROM_LOAD( "cd2352.vsm", 0x0000, 0x4000, CRC(181a239e) SHA1(e16043766c385e152b7005c1c010be4c5fccdd9b) )
@@ -1504,14 +1344,14 @@ ROM_END
ROM_START( snspellit )
ROM_REGION( 0x1000, "maincpu", 0 )
- ROM_LOAD( "cd2702an2l", 0x0000, 0x1000, CRC(895d6a4e) SHA1(a8bc118c83a84260033734191dcaa71a93dfa52b) )
+ ROM_LOAD( "tmc0271h-n2l", 0x0000, 0x1000, BAD_DUMP CRC(f83b5d2d) SHA1(10155b0b7f7f1583c7def8a693553cd35944ea6f) ) // placeholder, use the one we have
ROM_REGION( 1246, "maincpu:ipla", 0 )
ROM_LOAD( "tms0980_common1_instr.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) )
ROM_REGION( 2127, "maincpu:mpla", 0 )
- ROM_LOAD( "tms0270_common1_micro.pla", 0, 2127, CRC(504b96bb) SHA1(67b691e7c0b97239410587e50e5182bf46475b43) )
+ ROM_LOAD( "tms0270_common2_micro.pla", 0, 2127, BAD_DUMP CRC(86737ac1) SHA1(4aa0444f3ddf88738ea74aec404c684bf54eddba) ) // not verified
ROM_REGION( 1246, "maincpu:opla", 0 )
- ROM_LOAD( "tms0270_cd2702_output.pla", 0, 1246, CRC(2478c595) SHA1(9a8ac690902731e1e01533279a1c9223011e1537) )
+ ROM_LOAD( "tms0270_tmc0271h_output.pla", 0, 1246, BAD_DUMP CRC(2478c595) SHA1(9a8ac690902731e1e01533279a1c9223011e1537) ) // placeholder, use the one we have
ROM_REGION( 0x10000, "tms6100", ROMREGION_ERASEFF ) // uses only 1 rom, 8000-bfff = space reserved for cartridge
ROM_LOAD( "cd62190.vsm", 0x0000, 0x4000, CRC(63832002) SHA1(ea8124b2bf0f5908c5f1a56d60063f2468a10143) )
@@ -1560,23 +1400,7 @@ ROM_END
ROM_START( snmath )
ROM_REGION( 0x1000, "maincpu", 0 )
- ROM_LOAD( "cd2704b-n2l", 0x0000, 0x1000, CRC(7e06c7c5) SHA1(d60a35a8163ab593c31afc840a0d8a9b3a762f29) )
-
- ROM_REGION( 1246, "maincpu:ipla", 0 )
- ROM_LOAD( "tms0980_common1_instr.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) )
- ROM_REGION( 2127, "maincpu:mpla", 0 )
- ROM_LOAD( "tms0270_common1_micro.pla", 0, 2127, CRC(504b96bb) SHA1(67b691e7c0b97239410587e50e5182bf46475b43) )
- ROM_REGION( 1246, "maincpu:opla", 0 )
- ROM_LOAD( "tms0270_cd2704_output.pla", 0, 1246, CRC(5a2eb949) SHA1(8bb161d4884f229af65f8d155e59b9d8966fe3d1) )
-
- ROM_REGION( 0x8000, "tms6100", ROMREGION_ERASEFF )
- ROM_LOAD( "cd2392.vsm", 0x0000, 0x4000, CRC(4ed2e920) SHA1(8896f29e25126c1e4d9a47c9a325b35dddecc61f) )
- ROM_LOAD( "cd2393.vsm", 0x4000, 0x4000, CRC(571d5b5a) SHA1(83284755d9b77267d320b5b87fdc39f352433715) )
-ROM_END
-
-ROM_START( snmatha )
- ROM_REGION( 0x1000, "maincpu", 0 )
- ROM_LOAD( "cd2708-n2l", 0x0000, 0x1000, CRC(35937360) SHA1(69c362c75bb459056c09c7fab37c91040485474b) )
+ ROM_LOAD( "cd2708n2l", 0x0000, 0x1000, CRC(35937360) SHA1(69c362c75bb459056c09c7fab37c91040485474b) )
ROM_REGION( 1246, "maincpu:ipla", 0 )
ROM_LOAD( "tms0980_common1_instr.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) )
@@ -1602,13 +1426,13 @@ ROM_START( snmathp )
ROM_REGION( 1246, "maincpu:ipla", 0 )
ROM_LOAD( "tms0980_common1_instr.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) )
ROM_REGION( 2127, "maincpu:mpla", 0 )
- ROM_LOAD( "tms0270_common1_micro.pla", 0, 2127, CRC(504b96bb) SHA1(67b691e7c0b97239410587e50e5182bf46475b43) )
+ ROM_LOAD( "tms0270_common1_micro.pla", 0, 2127, BAD_DUMP CRC(504b96bb) SHA1(67b691e7c0b97239410587e50e5182bf46475b43) ) // not verified
ROM_REGION( 1246, "maincpu:opla", 0 )
- ROM_LOAD( "tms0270_cd2704_output.pla", 0, 1246, CRC(5a2eb949) SHA1(8bb161d4884f229af65f8d155e59b9d8966fe3d1) ) // using the one from 1st version
+ ROM_LOAD( "tms0270_cd2708_output.pla", 0, 1246, BAD_DUMP CRC(1abad753) SHA1(53d20b519ed73ce248368047a056836afbe3cd46) ) // taken from cd2708, need to verify if it's same as cd2704
ROM_REGION( 0x8000, "tms6100", ROMREGION_ERASEFF )
- ROM_LOAD( "cd2392.vsm", 0x0000, 0x4000, CRC(4ed2e920) SHA1(8896f29e25126c1e4d9a47c9a325b35dddecc61f) ) // using the one from 1st version
- ROM_LOAD( "cd2393.vsm", 0x4000, 0x4000, CRC(571d5b5a) SHA1(83284755d9b77267d320b5b87fdc39f352433715) ) // "
+ ROM_LOAD( "cd2392.vsm", 0x0000, 0x4000, CRC(4ed2e920) SHA1(8896f29e25126c1e4d9a47c9a325b35dddecc61f) )
+ ROM_LOAD( "cd2393.vsm", 0x4000, 0x4000, CRC(571d5b5a) SHA1(83284755d9b77267d320b5b87fdc39f352433715) )
ROM_END
@@ -1711,49 +1535,32 @@ ROM_START( vocaid )
ROM_END
-ROM_START( k28m2 )
- ROM_REGION( 0x1000, "maincpu", 0 )
- ROM_LOAD( "mp7324", 0x0000, 0x1000, CRC(08d15ab6) SHA1(5b0f6c53e6732a362c4bb25d966d4072fdd33db8) )
-
- ROM_REGION( 867, "maincpu:mpla", 0 )
- ROM_LOAD( "tms1100_common1_micro.pla", 0, 867, CRC(62445fc9) SHA1(d6297f2a4bc7a870b76cc498d19dbb0ce7d69fec) )
- ROM_REGION( 557, "maincpu:opla", 0 )
- ROM_LOAD( "tms1400_k28m2_output.pla", 0, 557, CRC(3a5c7005) SHA1(3fe5819c138a90e7fc12817415f2622ca81b40b2) )
-
- ROM_REGION( 0x10000, "tms6100", ROMREGION_ERASEFF ) // 8000-bfff? = space reserved for cartridge
- ROM_LOAD( "cm62084.vsm", 0x0000, 0x4000, CRC(cd1376f7) SHA1(96fa484c392c451599bc083b8376cad9c998df7d) )
-ROM_END
-
-
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */
-COMP( 1979, snspell, 0, 0, sns_tmc0281, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (US, 1979 version)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND )
+COMP( 1978, snspell, 0, 0, sns_tmc0281, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (US, 1979 version)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND )
COMP( 1978, snspellp, snspell, 0, sns_tmc0281, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (US, patent)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND )
COMP( 1980, snspellub, snspell, 0, sns_tmc0281d, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (US, 1980 version)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND )
-COMP( 1978, snspellua, snspell, 0, sns_tmc0281, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (US, 1978 version)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) // incomplete dump, using 1979 MCU ROM instead
-COMP( 1978, snspelluk, snspell, 0, sns_tmc0281, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (UK, 1978 version)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) // "
+COMP( 1979, snspellua, snspell, 0, sns_tmc0281, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (US, 1978 version)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) // incomplete dump, using 1979 MCU ROM instead
+COMP( 1978, snspelluk, snspell, 0, sns_tmc0281, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (UK, 1978 version)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) // "
COMP( 1981, snspelluka, snspell, 0, sns_cd2801, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (UK, 1981 version)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND )
COMP( 1979, snspelljp, snspell, 0, sns_tmc0281, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (Japan)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND )
-COMP( 1980, snspellfr, snspell, 0, sns_cd2801, snspellfr, tispeak_state, snspell, "Texas Instruments", "La Dictee Magique (France)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND )
-COMP( 1982, snspellit, snspell, 0, sns_cd2801_m, snspellit, tispeak_state, snspell, "Texas Instruments", "Grillo Parlante (Italy)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND )
+COMP( 1980, snspellfr, snspell, 0, sns_cd2801, snspellfr, tispeak_state, snspell, "Texas Instruments", "La Dictee Magique (France)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) // doesn't work due to missing CD2702 MCU dump, German/Italian version has CD2702 too
+COMP( 1982, snspellit, snspell, 0, sns_cd2801_m, snspellit, tispeak_state, snspell, "Texas Instruments", "Grillo Parlante (Italy)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) // "
COMP( 1981, snspellc, 0, 0, snspellc, snspellc, tispeak_state, snspell, "Texas Instruments", "Speak & Spell Compact (US, 1981 version)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND )
COMP( 1982, snspellca, snspellc, 0, snspellc, snspellc, tispeak_state, snspell, "Texas Instruments", "Speak & Spell Compact (US, 1982 version)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND )
COMP( 1982, snspellcuk, snspellc, 0, snspellcuk, snspellcuk, tispeak_state, snspell, "Texas Instruments", "Speak & Write (UK)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND )
-COMP( 1980, snmath, 0, 0, snmath, snmath, driver_device, 0, "Texas Instruments", "Speak & Math (US, 1980 version)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND )
-COMP( 1986, snmatha, snmath, 0, snmath, snmath, driver_device, 0, "Texas Instruments", "Speak & Math (US, 1986 version)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND )
-COMP( 1980, snmathp, snmath, 0, snmath, snmath, driver_device, 0, "Texas Instruments", "Speak & Math (US, patent)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_IS_INCOMPLETE )
+COMP( 1986, snmath, 0, 0, snmath, snmath, driver_device, 0, "Texas Instruments", "Speak & Math (US, 1986 version)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND )
+COMP( 1980, snmathp, snmath, 0, snmath, snmath, driver_device, 0, "Texas Instruments", "Speak & Math (US, 1980 version/patent)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
COMP( 1980, snread, 0, 0, snread, snread, tispeak_state, snspell, "Texas Instruments", "Speak & Read (US)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND )
COMP( 1979, lantutor, 0, 0, lantutor, lantutor, tispeak_state, lantutor, "Texas Instruments", "Language Tutor (patent)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
-COMP( 1981, tntell, 0, 0, tntell, tntell, tispeak_state, tntell, "Texas Instruments", "Touch & Tell (US)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_CLICKABLE_ARTWORK | MACHINE_REQUIRES_ARTWORK )
-COMP( 1980, tntellp, tntell, 0, tntell, tntell, tispeak_state, tntell, "Texas Instruments", "Touch & Tell (US, patent)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_CLICKABLE_ARTWORK | MACHINE_REQUIRES_ARTWORK | MACHINE_NOT_WORKING )
-COMP( 1981, tntelluk, tntell, 0, tntell, tntell, tispeak_state, tntell, "Texas Instruments", "Touch & Tell (UK)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_CLICKABLE_ARTWORK | MACHINE_REQUIRES_ARTWORK )
-COMP( 1981, tntellfr, tntell, 0, tntell, tntell, tispeak_state, tntell, "Texas Instruments", "Le Livre Magique (France)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_CLICKABLE_ARTWORK | MACHINE_REQUIRES_ARTWORK )
+COMP( 1981, tntell, 0, 0, tntell, tntell, tispeak_state, tntell, "Texas Instruments", "Touch & Tell (US, 1981 version)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_REQUIRES_ARTWORK ) // assume there is an older version too, with CD8010 MCU
+COMP( 1980, tntellp, tntell, 0, tntell, tntell, tispeak_state, tntell, "Texas Instruments", "Touch & Tell (patent)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_REQUIRES_ARTWORK | MACHINE_NOT_WORKING )
+COMP( 1981, tntelluk, tntell, 0, tntell, tntell, tispeak_state, tntell, "Texas Instruments", "Touch & Tell (UK)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_REQUIRES_ARTWORK )
+COMP( 1981, tntellfr, tntell, 0, tntell, tntell, tispeak_state, tntell, "Texas Instruments", "Le Livre Magique (France)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_REQUIRES_ARTWORK )
COMP( 1982, vocaid, 0, 0, vocaid, tntell, driver_device, 0, "Texas Instruments", "Vocaid", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_REQUIRES_ARTWORK )
-
-COMP( 1985, k28m2, 0, 0, k28m2, k28m2, tispeak_state, snspell, "Tiger Electronics", "K28: Talking Learning Computer (model 7-232)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/tispellb.cpp b/src/mame/drivers/tispellb.cpp
index fcb7b072260..0afe81d0a49 100644
--- a/src/mame/drivers/tispellb.cpp
+++ b/src/mame/drivers/tispellb.cpp
@@ -26,7 +26,6 @@
- TMC0355 4KB VSM ROM CD2602*
- 8-digit cyan VFD display
- 1-bit sound (indicated by a music note symbol on the top-right of the casing)
- - note: much rarer than the 1978 version, not much luck finding one on eBay
Spelling ABC (UK), 1979: exact same hardware as US version
@@ -105,6 +104,7 @@ protected:
void tispellb_state::machine_start()
{
hh_tms1k_state::machine_start();
+ memset(m_display_segmask, ~0, sizeof(m_display_segmask)); // !
// zerofill
m_rev1_ctl = 0;
@@ -138,10 +138,9 @@ void tispellb_state::power_off()
void tispellb_state::prepare_display()
{
- // almost same as snspell
- UINT16 gridmask = (m_display_decay[15][16] != 0) ? 0xffff : 0x8000; // vfd filament on/off
- set_display_segmask(0xff, 0x3fff);
- display_matrix(16+1, 16, m_plate | 1<<16, m_grid & gridmask);
+ // same as snspell
+ UINT16 gridmask = (m_display_decay[15][16] != 0) ? 0xffff : 0x8000;
+ display_matrix_seg(16+1, 16, m_plate | 0x10000, m_grid & gridmask, 0x3fff);
}
WRITE16_MEMBER(tispellb_state::main_write_o)
diff --git a/src/mame/drivers/tr606.cpp b/src/mame/drivers/tr606.cpp
index 4fd0e50141e..3842cb0f875 100644
--- a/src/mame/drivers/tr606.cpp
+++ b/src/mame/drivers/tr606.cpp
@@ -23,22 +23,43 @@ class tr606_state : public hh_ucom4_state
{
public:
tr606_state(const machine_config &mconfig, device_type type, const char *tag)
- : hh_ucom4_state(mconfig, type, tag)
+ : hh_ucom4_state(mconfig, type, tag),
+ m_tp3_off_timer(*this, "tp3_off")
{ }
- TIMER_DEVICE_CALLBACK_MEMBER(tp3_clock) { m_maincpu->set_input_line(0, ASSERT_LINE); }
- TIMER_DEVICE_CALLBACK_MEMBER(tp3_clear) { m_maincpu->set_input_line(0, CLEAR_LINE); }
+ required_device<timer_device> m_tp3_off_timer;
+
+ TIMER_DEVICE_CALLBACK_MEMBER(tp3_clock);
+ TIMER_DEVICE_CALLBACK_MEMBER(tp3_off);
virtual void machine_start() override;
};
+
+/***************************************************************************
+
+ Timer/Interrupt
+
+***************************************************************************/
+
// TP2 to MCU CLK: LC circuit(TI S74230), stable sine wave, 2.2us interval
-#define TP2_HZ 454545
+#define TP2_CLOCK_HZ 454545 /* in hz */
-// MCU interrupt timing is same as in TB303
// TP3 to MCU _INT: square wave, 1.8ms interval, short duty cycle
-#define TP3_PERIOD attotime::from_usec(1800)
-#define TP3_LOW (TP3_PERIOD / 8)
+#define TP3_CLOCK attotime::from_usec(1800)
+#define TP3_OFF (TP3_CLOCK / 8)
+
+TIMER_DEVICE_CALLBACK_MEMBER(tr606_state::tp3_off)
+{
+ m_maincpu->set_input_line(0, CLEAR_LINE);
+}
+
+TIMER_DEVICE_CALLBACK_MEMBER(tr606_state::tp3_clock)
+{
+ m_maincpu->set_input_line(0, ASSERT_LINE);
+ m_tp3_off_timer->adjust(TP3_OFF);
+}
+
/***************************************************************************
@@ -79,11 +100,11 @@ void tr606_state::machine_start()
static MACHINE_CONFIG_START( tr606, tr606_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", NEC_D650, TP2_HZ)
+ MCFG_CPU_ADD("maincpu", NEC_D650, TP2_CLOCK_HZ)
- MCFG_TIMER_DRIVER_ADD_PERIODIC("tp3_clock", tr606_state, tp3_clock, TP3_PERIOD)
- MCFG_TIMER_START_DELAY(TP3_PERIOD - TP3_LOW)
- MCFG_TIMER_DRIVER_ADD_PERIODIC("tp3_clear", tr606_state, tp3_clear, TP3_PERIOD)
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("tp3_clock", tr606_state, tp3_clock, TP3_CLOCK)
+ MCFG_TIMER_START_DELAY(TP3_CLOCK)
+ MCFG_TIMER_DRIVER_ADD("tp3_off", tr606_state, tp3_off)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1))
MCFG_DEFAULT_LAYOUT(layout_tr606)
diff --git a/src/mame/drivers/tsispch.cpp b/src/mame/drivers/tsispch.cpp
index 7617c1fb7ef..52bc57fa118 100644
--- a/src/mame/drivers/tsispch.cpp
+++ b/src/mame/drivers/tsispch.cpp
@@ -245,7 +245,6 @@ WRITE_LINE_MEMBER( tsispch_state::dsp_to_8086_p1_w )
void tsispch_state::machine_reset()
{
fprintf(stderr,"machine reset\n");
- m_dsp->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); // starts in reset
}
DRIVER_INIT_MEMBER(tsispch_state,prose2k)
@@ -292,6 +291,7 @@ DRIVER_INIT_MEMBER(tsispch_state,prose2k)
dspprg++;
}
m_paramReg = 0x00; // on power up, all leds on, reset to upd7720 is high
+ m_dsp->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); // starts in reset
}
/******************************************************************************
@@ -543,6 +543,6 @@ ROM_START( prose2ko )
Drivers
******************************************************************************/
-/* YEAR NAME PARENT COMPAT MACHINE INPUT STATE INIT COMPANY FULLNAME FLAGS */
-COMP( 1987, prose2k, 0, 0, prose2k, prose2k, tsispch_state, prose2k, "Telesensory Systems Inc/Speech Plus", "Prose 2000/2020 v3.4.1", MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
-COMP( 1982, prose2ko, prose2k, 0, prose2k, prose2k, tsispch_state, prose2k, "Telesensory Systems Inc/Speech Plus", "Prose 2000/2020 v1.1", MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
+/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */
+COMP( 1987, prose2k, 0, 0, prose2k, prose2k, tsispch_state, prose2k, "Telesensory Systems Inc/Speech Plus", "Prose 2000/2020 v3.4.1", MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
+COMP( 1982, prose2ko, prose2k, 0, prose2k, prose2k, tsispch_state, prose2k, "Telesensory Systems Inc/Speech Plus", "Prose 2000/2020 v1.1", MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
diff --git a/src/mame/drivers/vc4000.cpp b/src/mame/drivers/vc4000.cpp
index 11362de1e92..2dcc44e54e7 100644
--- a/src/mame/drivers/vc4000.cpp
+++ b/src/mame/drivers/vc4000.cpp
@@ -722,5 +722,5 @@ CONS(1979, telngtcs, rwtrntcs, 0, rwtrntcs, vc4000, driver_device,
CONS(1979, krvnjvtv, 0, vc4000, vc4000, vc4000, driver_device, 0, "SOE", "OC Jeu Video TV Karvan", MACHINE_IMPERFECT_GRAPHICS ) /* France */
CONS(1979, oc2000, krvnjvtv, 0, vc4000, vc4000, driver_device, 0, "SOE", "OC-2000", MACHINE_IMPERFECT_GRAPHICS ) /* France */
CONS(1980, mpt05, 0, vc4000, vc4000, vc4000, driver_device, 0, "ITMC", "MPT-05", MACHINE_IMPERFECT_GRAPHICS ) /* France */
-CONS(1982, h21, 0, vc4000, h21, vc4000, driver_device, 0, "TRQ", "Video Computer H-21", MACHINE_IMPERFECT_GRAPHICS) // Spain
+CONS(1982, h21, 0, 0, h21, vc4000, driver_device, 0, "TRQ", "Video Computer H-21", MACHINE_IMPERFECT_GRAPHICS) // Spain
CONS(1979, elektor, 0, 0, elektor, elektor, driver_device, 0, "Elektor", "Elektor TV Games Computer", MACHINE_IMPERFECT_GRAPHICS )
diff --git a/src/mame/drivers/vegas.cpp b/src/mame/drivers/vegas.cpp
index c65e6885d9a..c71cff65f1a 100644
--- a/src/mame/drivers/vegas.cpp
+++ b/src/mame/drivers/vegas.cpp
@@ -493,7 +493,7 @@ public:
UINT8 m_sio_led_state;
UINT8 m_pending_analog_read;
UINT8 m_cmos_unlocked;
- voodoo_device *m_voodoo;
+ device_t *m_voodoo;
UINT8 m_dcs_idma_cs;
int m_count;
int m_dynamic_count;
@@ -567,7 +567,7 @@ public:
UINT32 vegas_state::screen_update_vegas(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- return m_voodoo->voodoo_update(bitmap, cliprect) ? 0 : UPDATE_HAS_NOT_CHANGED;
+ return voodoo_update(m_voodoo, bitmap, cliprect) ? 0 : UPDATE_HAS_NOT_CHANGED;
}
@@ -579,7 +579,7 @@ UINT32 vegas_state::screen_update_vegas(screen_device &screen, bitmap_rgb32 &bit
void vegas_state::machine_start()
{
- m_voodoo = (voodoo_device*)machine().device("voodoo");
+ m_voodoo = machine().device("voodoo");
/* allocate timers for the NILE */
m_timer[0] = machine().scheduler().timer_alloc(FUNC_NULL);
@@ -797,7 +797,7 @@ WRITE32_MEMBER( vegas_state::pci_ide_w )
READ32_MEMBER( vegas_state::pci_3dfx_r )
{
- int voodoo_type = m_voodoo->voodoo_get_type();
+ int voodoo_type = voodoo_get_type(m_voodoo);
UINT32 result = m_pci_3dfx_regs[offset];
switch (offset)
@@ -830,7 +830,7 @@ READ32_MEMBER( vegas_state::pci_3dfx_r )
WRITE32_MEMBER( vegas_state::pci_3dfx_w )
{
- int voodoo_type = m_voodoo->voodoo_get_type();
+ int voodoo_type = voodoo_get_type(m_voodoo);
m_pci_3dfx_regs[offset] = data;
@@ -869,7 +869,7 @@ WRITE32_MEMBER( vegas_state::pci_3dfx_w )
break;
case 0x10: /* initEnable register */
- m_voodoo->voodoo_set_init_enable(data);
+ voodoo_set_init_enable(m_voodoo, data);
break;
}
@@ -1555,7 +1555,7 @@ inline void vegas_state::_add_dynamic_address(offs_t start, offs_t end, read32_d
void vegas_state::remap_dynamic_addresses()
{
dynamic_address *dynamic = m_dynamic;
- int voodoo_type = m_voodoo->voodoo_get_type();
+ int voodoo_type = voodoo_get_type(m_voodoo);
offs_t base;
int addr;
diff --git a/src/mame/drivers/vigilant.cpp b/src/mame/drivers/vigilant.cpp
index 239a7c85a53..12f0dc881bd 100644
--- a/src/mame/drivers/vigilant.cpp
+++ b/src/mame/drivers/vigilant.cpp
@@ -650,9 +650,6 @@ ROM_START( vigilant ) // World Rev E
ROM_LOAD( "VG_B-8R.ic90", 0x0000, 0x0117, CRC(df368a7a) SHA1(597d85d1f90b7ee0188f2d849792ee02ff2ea48b) )
ROM_LOAD( "VG_B-4M.ic38", 0x0200, 0x0117, CRC(dbca4204) SHA1(d8e190f2dc4d6285f22be331d01ed402520d2017) )
ROM_LOAD( "VG_B-1B.ic1", 0x0400, 0x0117, CRC(922e5167) SHA1(08efdfdfeb35f3f73b6fd3d5c0c2a386dea5f617) )
-
- ROM_REGION( 0x0100, "proms", 0 )
- ROM_LOAD( "tbp24s10_7a.ic52", 0x0000, 0x0100, CRC(c324835e) SHA1(cf6ffe38523badfda211d341410e93e647de87a9) ) // tbp24s10, 82s129-equivalent - video timing
ROM_END
ROM_START( vigilantg ) // US Rev G
@@ -690,9 +687,6 @@ ROM_START( vigilantg ) // US Rev G
ROM_LOAD( "VG_B-8R.ic90", 0x0000, 0x0117, CRC(df368a7a) SHA1(597d85d1f90b7ee0188f2d849792ee02ff2ea48b) )
ROM_LOAD( "VG_B-4M.ic38", 0x0200, 0x0117, CRC(dbca4204) SHA1(d8e190f2dc4d6285f22be331d01ed402520d2017) )
ROM_LOAD( "VG_B-1B.ic1", 0x0400, 0x0117, CRC(922e5167) SHA1(08efdfdfeb35f3f73b6fd3d5c0c2a386dea5f617) )
-
- ROM_REGION( 0x0100, "proms", 0 )
- ROM_LOAD( "tbp24s10_7a.ic52", 0x0000, 0x0100, CRC(c324835e) SHA1(cf6ffe38523badfda211d341410e93e647de87a9) ) // tbp24s10, 82s129-equivalent - video timing
ROM_END
ROM_START( vigilanto ) // US (earliest base version)
@@ -732,9 +726,6 @@ ROM_START( vigilanto ) // US (earliest base version)
ROM_LOAD( "VG_B-8R.ic90", 0x0000, 0x0117, CRC(df368a7a) SHA1(597d85d1f90b7ee0188f2d849792ee02ff2ea48b) )
ROM_LOAD( "VG_B-4M.ic38", 0x0200, 0x0117, CRC(dbca4204) SHA1(d8e190f2dc4d6285f22be331d01ed402520d2017) )
ROM_LOAD( "VG_B-1B.ic1", 0x0400, 0x0117, CRC(922e5167) SHA1(08efdfdfeb35f3f73b6fd3d5c0c2a386dea5f617) )
-
- ROM_REGION( 0x0100, "proms", 0 )
- ROM_LOAD( "tbp24s10_7a.ic52", 0x0000, 0x0100, CRC(c324835e) SHA1(cf6ffe38523badfda211d341410e93e647de87a9) ) // tbp24s10, 82s129-equivalent - video timing
ROM_END
ROM_START( vigilanta ) // World Rev A
@@ -774,9 +765,6 @@ ROM_START( vigilanta ) // World Rev A
ROM_LOAD( "VG_B-8R.ic90", 0x0000, 0x0117, CRC(df368a7a) SHA1(597d85d1f90b7ee0188f2d849792ee02ff2ea48b) )
ROM_LOAD( "VG_B-4M.ic38", 0x0200, 0x0117, CRC(dbca4204) SHA1(d8e190f2dc4d6285f22be331d01ed402520d2017) )
ROM_LOAD( "VG_B-1B.ic1", 0x0400, 0x0117, CRC(922e5167) SHA1(08efdfdfeb35f3f73b6fd3d5c0c2a386dea5f617) )
-
- ROM_REGION( 0x0100, "proms", 0 )
- ROM_LOAD( "tbp24s10_7a.ic52", 0x0000, 0x0100, CRC(c324835e) SHA1(cf6ffe38523badfda211d341410e93e647de87a9) ) // tbp24s10, 82s129-equivalent - video timing
ROM_END
ROM_START( vigilantb ) // US Rev B
@@ -816,9 +804,6 @@ ROM_START( vigilantb ) // US Rev B
ROM_LOAD( "VG_B-8R.ic90", 0x0000, 0x0117, CRC(df368a7a) SHA1(597d85d1f90b7ee0188f2d849792ee02ff2ea48b) )
ROM_LOAD( "VG_B-4M.ic38", 0x0200, 0x0117, CRC(dbca4204) SHA1(d8e190f2dc4d6285f22be331d01ed402520d2017) )
ROM_LOAD( "VG_B-1B.ic1", 0x0400, 0x0117, CRC(922e5167) SHA1(08efdfdfeb35f3f73b6fd3d5c0c2a386dea5f617) )
-
- ROM_REGION( 0x0100, "proms", 0 )
- ROM_LOAD( "tbp24s10_7a.ic52", 0x0000, 0x0100, CRC(c324835e) SHA1(cf6ffe38523badfda211d341410e93e647de87a9) ) // tbp24s10, 82s129-equivalent - video timing
ROM_END
ROM_START( vigilantc ) // World Rev C
@@ -858,9 +843,6 @@ ROM_START( vigilantc ) // World Rev C
ROM_LOAD( "VG_B-8R.ic90", 0x0000, 0x0117, CRC(df368a7a) SHA1(597d85d1f90b7ee0188f2d849792ee02ff2ea48b) )
ROM_LOAD( "VG_B-4M.ic38", 0x0200, 0x0117, CRC(dbca4204) SHA1(d8e190f2dc4d6285f22be331d01ed402520d2017) )
ROM_LOAD( "VG_B-1B.ic1", 0x0400, 0x0117, CRC(922e5167) SHA1(08efdfdfeb35f3f73b6fd3d5c0c2a386dea5f617) )
-
- ROM_REGION( 0x0100, "proms", 0 )
- ROM_LOAD( "tbp24s10_7a.ic52", 0x0000, 0x0100, CRC(c324835e) SHA1(cf6ffe38523badfda211d341410e93e647de87a9) ) // tbp24s10, 82s129-equivalent - video timing
ROM_END
ROM_START( vigilantd ) // Japan Rev D
@@ -900,9 +882,6 @@ ROM_START( vigilantd ) // Japan Rev D
ROM_LOAD( "VG_B-8R.ic90", 0x0000, 0x0117, CRC(df368a7a) SHA1(597d85d1f90b7ee0188f2d849792ee02ff2ea48b) )
ROM_LOAD( "VG_B-4M.ic38", 0x0200, 0x0117, CRC(dbca4204) SHA1(d8e190f2dc4d6285f22be331d01ed402520d2017) )
ROM_LOAD( "VG_B-1B.ic1", 0x0400, 0x0117, CRC(922e5167) SHA1(08efdfdfeb35f3f73b6fd3d5c0c2a386dea5f617) )
-
- ROM_REGION( 0x0100, "proms", 0 )
- ROM_LOAD( "tbp24s10_7a.ic52", 0x0000, 0x0100, CRC(c324835e) SHA1(cf6ffe38523badfda211d341410e93e647de87a9) ) // tbp24s10, 82s129-equivalent - video timing
ROM_END
ROM_START( vigilantbl ) /* Bootleg */
@@ -1031,7 +1010,7 @@ ROM_START( buccanrs )
ROM_LOAD( "2.u74", 0x00000, 0x10000, CRC(36ee1dac) SHA1(6dfd2a885c0b1c9347abc4b204ade66551c4b404) )
ROM_REGION( 0x400, "proms", 0 )
- ROM_LOAD( "prom1.u54", 0x0000, 0x0100, CRC(c324835e) SHA1(cf6ffe38523badfda211d341410e93e647de87a9) ) // == ic52 video timing prom from vigilante
+ ROM_LOAD( "prom1.u54", 0x0000, 0x0100, CRC(c324835e) SHA1(cf6ffe38523badfda211d341410e93e647de87a9) )
ROM_LOAD( "prom4.u79", 0x0100, 0x0100, CRC(e6506ef4) SHA1(079841da7640b14d94aaaeb572bf018932b58293) )
ROM_LOAD( "prom3.u88", 0x0200, 0x0100, CRC(b43d094f) SHA1(2bed4892d8a91d7faac5a07bf858d9294eb30606) )
ROM_LOAD( "prom2.u99", 0x0300, 0x0100, CRC(e0aa8869) SHA1(ac8bdfeba69420ba56ec561bf3d0f1229d02cea2) )
@@ -1070,7 +1049,7 @@ ROM_START( buccanrsa )
ROM_LOAD( "2.u74", 0x00000, 0x10000, CRC(36ee1dac) SHA1(6dfd2a885c0b1c9347abc4b204ade66551c4b404) )
ROM_REGION( 0x400, "proms", 0 )
- ROM_LOAD( "prom1.u54", 0x0000, 0x0100, CRC(c324835e) SHA1(cf6ffe38523badfda211d341410e93e647de87a9) ) // == ic52 video timing prom from vigilante
+ ROM_LOAD( "prom1.u54", 0x0000, 0x0100, CRC(c324835e) SHA1(cf6ffe38523badfda211d341410e93e647de87a9) )
ROM_LOAD( "prom4.u79", 0x0100, 0x0100, CRC(e6506ef4) SHA1(079841da7640b14d94aaaeb572bf018932b58293) )
ROM_LOAD( "prom3.u88", 0x0200, 0x0100, CRC(b43d094f) SHA1(2bed4892d8a91d7faac5a07bf858d9294eb30606) )
ROM_LOAD( "prom2.u99", 0x0300, 0x0100, CRC(e0aa8869) SHA1(ac8bdfeba69420ba56ec561bf3d0f1229d02cea2) )
diff --git a/src/mame/drivers/viper.cpp b/src/mame/drivers/viper.cpp
index e71413b1f1d..c10c28e55d0 100644
--- a/src/mame/drivers/viper.cpp
+++ b/src/mame/drivers/viper.cpp
@@ -327,21 +327,21 @@ some other components. It will be documented at a later date.
Game status:
ppp2nd POST: "DIP SWITCH ERROR", "NO SECURITY ERROR"
boxingm Goes to attract mode when ran with memory card check. Coins up.
- code1d,b RTC self check bad
- gticlub2 Attract mode works. Coins up. Hangs in car selection.
+ code1d,b Inf loop on blue screen (writes to I2C before)
+ gticlub2 Inf loop on blue screen (writes to I2C before)
gticlub2ea Doesn't boot: bad CHD?
jpark3 POST?: Shows "Now loading..." then black screen (sets global timer 1 on EPIC...)
- mocapglf Security code error
- mocapb,j Crash after self checks
- p911,e,j,uc,kc "Distribution error"
- p9112 RTC self check bad
+ mocapglf Inf loop on blue screen (writes to I2C before)
+ mocapb,j POST: U13 bad
+ p911,e,j,uc,kc POST: U13 bad
+ p9112 POST: U13 bad
popn9 Doesn't boot: bad CHD?
- sscopex/sogeki Security code error
+ sscopex/sogeki Inf loop on blue screen
thrild2,a Attract mode with partial graphics. Coins up. Hangs in car selection screen.
thrild2c Inf loop on blue screen
tsurugi Goes to attract mode when ran with memory card check. Coins up.
tsurugij No NVRAM
- wcombat Stuck on network check
+ wcombat Hangs on blue screen
xtrial Attract mode. Hangs.
mfightc,c Passes POST. Waits for network connection from main unit? Spams writes to 0xffe08000 (8-bit)
*/
@@ -355,7 +355,7 @@ some other components. It will be documented at a later date.
#include "video/voodoo.h"
#define VIPER_DEBUG_LOG
-#define VIPER_DEBUG_EPIC_INTS 0
+#define VIPER_DEBUG_EPIC_INTS 1
#define VIPER_DEBUG_EPIC_TIMERS 0
#define VIPER_DEBUG_EPIC_REGS 0
#define VIPER_DEBUG_EPIC_I2C 0
@@ -363,6 +363,7 @@ some other components. It will be documented at a later date.
#define SDRAM_CLOCK 166666666 // Main SDRAMs run at 166MHz
+static UINT32 *workram;
static emu_timer *ds2430_timer;
@@ -376,8 +377,7 @@ public:
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_ata(*this, "ata"),
- m_voodoo(*this, "voodoo"),
- m_workram(*this, "workram")
+ m_voodoo(*this, "voodoo")
{
}
@@ -385,11 +385,6 @@ public:
int m_cf_card_ide;
int m_unk1_bit;
UINT32 m_voodoo3_pci_reg[0x100];
- int m_unk_serial_bit_w;
- UINT16 m_unk_serial_cmd;
- UINT16 m_unk_serial_data;
- UINT16 m_unk_serial_data_r;
- UINT8 m_unk_serial_regs[0x80];
DECLARE_READ32_MEMBER(epic_r);
DECLARE_WRITE32_MEMBER(epic_w);
@@ -418,21 +413,15 @@ public:
DECLARE_WRITE64_MEMBER(cf_card_w);
DECLARE_READ64_MEMBER(ata_r);
DECLARE_WRITE64_MEMBER(ata_w);
- DECLARE_READ64_MEMBER(unk_serial_r);
- DECLARE_WRITE64_MEMBER(unk_serial_w);
DECLARE_WRITE_LINE_MEMBER(voodoo_vblank);
DECLARE_DRIVER_INIT(viper);
DECLARE_DRIVER_INIT(vipercf);
- DECLARE_DRIVER_INIT(viperhd);
virtual void machine_start() override;
virtual void machine_reset() override;
UINT32 screen_update_viper(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(viper_vblank);
TIMER_CALLBACK_MEMBER(epic_global_timer_callback);
TIMER_CALLBACK_MEMBER(ds2430_timer_callback);
-#if VIPER_DEBUG_EPIC_REGS
- const char* epic_get_register_name(UINT32 reg);
-#endif
void epic_update_interrupts();
void mpc8240_interrupt(int irq);
void mpc8240_epic_init();
@@ -442,13 +431,12 @@ public:
required_device<ppc_device> m_maincpu;
required_device<ata_interface_device> m_ata;
required_device<voodoo_3_device> m_voodoo;
- required_shared_ptr<UINT64> m_workram;
};
UINT32 viper_state::screen_update_viper(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- voodoo_device *voodoo = (voodoo_device*)machine().device("voodoo");
- return voodoo->voodoo_update(bitmap, cliprect) ? 0 : UPDATE_HAS_NOT_CHANGED;
+ device_t *device = machine().device("voodoo");
+ return voodoo_update(device, bitmap, cliprect) ? 0 : UPDATE_HAS_NOT_CHANGED;
}
UINT32 m_mpc8240_regs[256/4];
@@ -628,7 +616,7 @@ struct MPC8240_EPIC
static MPC8240_EPIC epic;
#if VIPER_DEBUG_EPIC_REGS
-const char* viper_state::epic_get_register_name(UINT32 reg)
+const viper_state::char* epic_get_register_name(UINT32 reg)
{
switch (reg >> 16)
{
@@ -870,9 +858,7 @@ READ32_MEMBER(viper_state::epic_r)
{
if (epic.i2c_state == I2C_STATE_ADDRESS_CYCLE)
{
-#if VIPER_DEBUG_EPIC_I2C
printf("I2C address cycle read\n");
-#endif
epic.i2c_state = I2C_STATE_DATA_TRANSFER;
@@ -882,9 +868,7 @@ READ32_MEMBER(viper_state::epic_r)
// generate interrupt if interrupt are enabled
if (epic.i2c_cr & 0x40)
{
-#if VIPER_DEBUG_EPIC_I2C
printf("I2C interrupt\n");
-#endif
mpc8240_interrupt(MPC8240_I2C_IRQ);
// set interrupt flag in status register
@@ -893,9 +877,7 @@ READ32_MEMBER(viper_state::epic_r)
}
else if (epic.i2c_state == I2C_STATE_DATA_TRANSFER)
{
-#if VIPER_DEBUG_EPIC_I2C
printf("I2C data read\n");
-#endif
epic.i2c_state = I2C_STATE_ADDRESS_CYCLE;
@@ -977,7 +959,7 @@ READ32_MEMBER(viper_state::epic_r)
ret |= epic.irq[MPC8240_I2C_IRQ].priority << 16;
ret |= epic.irq[MPC8240_I2C_IRQ].vector;
ret |= epic.irq[MPC8240_I2C_IRQ].active ? 0x40000000 : 0;
- break;
+ return ret;
}
}
break;
@@ -1766,7 +1748,7 @@ READ64_MEMBER(viper_state::unk1_r)
reg |= (unk1_bit << 5);
reg |= 0x40; // if this bit is 0, loads a disk copier instead
//r |= 0x04; // screen flip
- reg |= 0x08; // memory card check (1 = enable)
+ //reg |= 0x08; // memory card check (1 = enable)
r |= reg << 40;
@@ -1862,8 +1844,8 @@ void viper_state::DS2430_w(int bit)
case DS2430_STATE_READ_MEM:
{
- unk1_bit = (ds2430_rom[(ds2430_data_count/8)] >> (ds2430_data_count%8)) & 1;
ds2430_data_count++;
+ unk1_bit = rand () & 1;
printf("DS2430_w: read mem %d, bit = %d\n", ds2430_data_count, unk1_bit);
if (ds2430_data_count >= 256)
@@ -1988,74 +1970,12 @@ READ64_MEMBER(viper_state::e00000_r)
return r;
}
-READ64_MEMBER(viper_state::unk_serial_r)
-{
- UINT64 r = 0;
- if (ACCESSING_BITS_16_31)
- {
- int bit = m_unk_serial_data_r & 0x1;
- m_unk_serial_data_r >>= 1;
- r |= bit << 17;
- }
- return r;
-}
-
-WRITE64_MEMBER(viper_state::unk_serial_w)
-{
- if (ACCESSING_BITS_16_31)
- {
- if (data & 0x10000)
- {
- int bit = (data & 0x20000) ? 1 : 0;
- if (m_unk_serial_bit_w < 8)
- {
- if (m_unk_serial_bit_w > 0)
- m_unk_serial_cmd <<= 1;
- m_unk_serial_cmd |= bit;
- }
- else
- {
- if (m_unk_serial_bit_w > 8)
- m_unk_serial_data <<= 1;
- m_unk_serial_data |= bit;
- }
- m_unk_serial_bit_w++;
-
- if (m_unk_serial_bit_w == 8)
- {
- if ((m_unk_serial_cmd & 0x80) == 0) // register read
- {
- int reg = m_unk_serial_cmd & 0x7f;
- UINT8 data = m_unk_serial_regs[reg];
-
- m_unk_serial_data_r = ((data & 0x1) << 7) | ((data & 0x2) << 5) | ((data & 0x4) << 3) | ((data & 0x8) << 1) | ((data & 0x10) >> 1) | ((data & 0x20) >> 3) | ((data & 0x40) >> 5) | ((data & 0x80) >> 7);
-
- printf("unk_serial read reg %02X: %04X\n", reg, data);
- }
- }
- if (m_unk_serial_bit_w == 16)
- {
- if (m_unk_serial_cmd & 0x80) // register write
- {
- int reg = m_unk_serial_cmd & 0x7f;
- m_unk_serial_regs[reg] = m_unk_serial_data;
- printf("unk_serial write reg %02X: %04X\n", reg, m_unk_serial_data);
- }
-
- m_unk_serial_bit_w = 0;
- m_unk_serial_cmd = 0;
- m_unk_serial_data = 0;
- }
- }
- }
-}
-
/*****************************************************************************/
static ADDRESS_MAP_START(viper_map, AS_PROGRAM, 64, viper_state )
- AM_RANGE(0x00000000, 0x00ffffff) AM_MIRROR(0x1000000) AM_RAM AM_SHARE("workram")
+ AM_RANGE(0x00000000, 0x00ffffff) AM_MIRROR(0x1000000) AM_RAM
AM_RANGE(0x80000000, 0x800fffff) AM_READWRITE32(epic_r, epic_w,U64(0xffffffffffffffff))
AM_RANGE(0x82000000, 0x83ffffff) AM_READWRITE(voodoo3_r, voodoo3_w)
AM_RANGE(0x84000000, 0x85ffffff) AM_READWRITE(voodoo3_lfb_r, voodoo3_lfb_w)
@@ -2064,7 +1984,7 @@ static ADDRESS_MAP_START(viper_map, AS_PROGRAM, 64, viper_state )
AM_RANGE(0xfee00000, 0xfeefffff) AM_READWRITE(pci_config_data_r, pci_config_data_w)
// 0xff000000, 0xff000fff - cf_card_data_r/w (installed in DRIVER_INIT(vipercf))
// 0xff200000, 0xff200fff - cf_card_r/w (installed in DRIVER_INIT(vipercf))
- // 0xff300000, 0xff300fff - ata_r/w (installed in DRIVER_INIT(viperhd))
+ AM_RANGE(0xff300000, 0xff300fff) AM_READWRITE(ata_r, ata_w)
AM_RANGE(0xffe00000, 0xffe00007) AM_READ(e00000_r)
AM_RANGE(0xffe00008, 0xffe0000f) AM_READWRITE(e00008_r, e00008_w)
AM_RANGE(0xffe10000, 0xffe10007) AM_READ(unk1_r)
@@ -2154,7 +2074,7 @@ void viper_state::machine_start()
m_maincpu->ppcdrc_set_options(PPCDRC_COMPATIBLE_OPTIONS);
/* configure fast RAM regions for DRC */
- m_maincpu->ppcdrc_add_fastram(0x00000000, 0x00ffffff, FALSE, m_workram);
+ m_maincpu->ppcdrc_add_fastram(0x00000000, 0x00ffffff, FALSE, workram);
ds2430_rom = (UINT8*)memregion("ds2430")->base();
}
@@ -2215,21 +2135,12 @@ DRIVER_INIT_MEMBER(viper_state,viper)
// m_maincpu->space(AS_PROGRAM).install_legacy_readwrite_handler( *ide, 0xff200000, 0xff207fff, FUNC(hdd_r), FUNC(hdd_w) ); //TODO
}
-DRIVER_INIT_MEMBER(viper_state,viperhd)
-{
- DRIVER_INIT_CALL(viper);
-
- m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xff300000, 0xff300fff, read64_delegate(FUNC(viper_state::ata_r), this), write64_delegate(FUNC(viper_state::ata_w), this));
-}
-
DRIVER_INIT_MEMBER(viper_state,vipercf)
{
DRIVER_INIT_CALL(viper);
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xff000000, 0xff000fff, read64_delegate(FUNC(viper_state::cf_card_data_r), this), write64_delegate(FUNC(viper_state::cf_card_data_w), this) );
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xff200000, 0xff200fff, read64_delegate(FUNC(viper_state::cf_card_r), this), write64_delegate(FUNC(viper_state::cf_card_w), this) );
-
- m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xff300000, 0xff300fff, read64_delegate(FUNC(viper_state::unk_serial_r), this), write64_delegate(FUNC(viper_state::unk_serial_w), this) );
}
@@ -2439,19 +2350,6 @@ ROM_START(p911e) //*
DISK_IMAGE( "a00eaa02", 0, SHA1(81565a2dce2e2b0a7927078a784354948af1f87c) )
ROM_END
-ROM_START(p911ea)
- VIPER_BIOS
-
- ROM_REGION(0x28, "ds2430", ROMREGION_ERASE00) /* DS2430 */
- ROM_LOAD("ds2430.u3", 0x00, 0x28, CRC(f1511505) SHA1(ed7cd9b2763b3e377df9663943160f9871f65105))
-
- ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */
- ROM_LOAD("a00eaa_nvram.u39", 0x000000, 0x2000, CRC(4f3497b6) SHA1(3045c54f98dff92cdf3a1fc0cd4c76ba82d632d7) )
-
- DISK_REGION( "ata:0:hdd:image" )
- DISK_IMAGE( "a00eaa02", 0, SHA1(fa057bf17f4c0fb9b9a09b820ff7a101e44fab7d) )
-ROM_END
-
ROM_START(p911j) //*
VIPER_BIOS
@@ -2519,17 +2417,6 @@ ROM_START(sogeki) //*
DISK_IMAGE( "a13b02", 0, SHA1(c25a61b76d365794c2da4a9e7de88a5519e944ec) )
ROM_END
-ROM_START(sscopefh)
- VIPER_BIOS
-
- ROM_REGION(0x28, "ds2430", ROMREGION_ERASE00) /* DS2430 */
-
- ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */
-
- DISK_REGION( "ata:0:hdd:image" )
- DISK_IMAGE( "ccca02", 0, SHA1(ec0d9a1520f17c73750de71dba8b31bc8c9d0409) )
-ROM_END
-
ROM_START(thrild2) //*
VIPER_BIOS
@@ -2557,32 +2444,6 @@ ROM_START(thrild2a) //*
DISK_IMAGE( "a41a02", 0, SHA1(bbb71e23bddfa07dfa30b6565a35befd82b055b8) )
ROM_END
-ROM_START(thrild2ab)
- VIPER_BIOS
-
- ROM_REGION(0x28, "ds2430", ROMREGION_ERASE00) /* DS2430 */
- ROM_LOAD("ds2430.u3", 0x00, 0x28, CRC(f1511505) SHA1(ed7cd9b2763b3e377df9663943160f9871f65105))
-
- ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */
- ROM_LOAD("a41aaa_nvram.u39", 0x00000, 0x2000, CRC(d5de9b8e) SHA1(768bcd46a6ad20948f60f5e0ecd2f7b9c2901061))
-
- DISK_REGION( "ata:0:hdd:image" )
- DISK_IMAGE( "a41a02_alt", 0, SHA1(7a9cfdab7000765ffdd9198b209f7a74741248f2) )
-ROM_END
-
-ROM_START(thrild2ac)
- VIPER_BIOS
-
- ROM_REGION(0x28, "ds2430", ROMREGION_ERASE00) /* DS2430 */
- ROM_LOAD("ds2430.u3", 0x00, 0x28, CRC(f1511505) SHA1(ed7cd9b2763b3e377df9663943160f9871f65105))
-
- ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */
- ROM_LOAD("a41aaa_nvram.u39", 0x00000, 0x2000, CRC(d5de9b8e) SHA1(768bcd46a6ad20948f60f5e0ecd2f7b9c2901061))
-
- DISK_REGION( "ata:0:hdd:image" )
- DISK_IMAGE( "a41a02_alt2", 0, SHA1(c8bfbac4f5a1a2241df7417ad2f9eba7d9e9a9df) )
-ROM_END
-
/* This CF card has sticker 941EAA02 */
ROM_START(thrild2c) //*
VIPER_BIOS
@@ -2623,17 +2484,6 @@ ROM_START(tsurugij) //*
DISK_IMAGE( "a30c02", 0, SHA1(533b5669b00884a800df9ba29651777a76559862) )
ROM_END
-ROM_START(tsurugie)
- VIPER_BIOS
-
- ROM_REGION(0x28, "ds2430", ROMREGION_ERASE00) /* DS2430 */
-
- ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */
-
- DISK_REGION( "ata:0:hdd:image" )
- DISK_IMAGE( "a30eab02", 0, SHA1(fcc5b69f89e246f26ca4b8546cc409d3488bbdd9) )
-ROM_END
-
/* This CF card has sticker C22D02 */
ROM_START(wcombat) //*
VIPER_BIOS
@@ -2648,19 +2498,6 @@ ROM_START(wcombat) //*
DISK_IMAGE( "c22d02", 0, SHA1(69a24c9e36b073021d55bec27d89fcc0254a60cc) ) // chs 978,8,32
ROM_END
-ROM_START(wcombatb) //*
- VIPER_BIOS
-
- ROM_REGION(0x28, "ds2430", ROMREGION_ERASE00) /* DS2430 */
- ROM_LOAD("ds2430.u3", 0x00, 0x28, CRC(f1511505) SHA1(ed7cd9b2763b3e377df9663943160f9871f65105))
-
- ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */
- ROM_LOAD("wcombat_nvram.u39", 0x00000, 0x2000, CRC(4f8b5858) SHA1(68066241c6f9db7f45e55b3c5da101987f4ce53c))
-
- DISK_REGION( "ata:0:hdd:image" )
- DISK_IMAGE( "c22d02_alt", 0, SHA1(772e3fe7910f5115ec8f2235bb48ba9fcac6950d) ) // chs 978,8,32
-ROM_END
-
ROM_START(wcombatk) //*
VIPER_BIOS
@@ -2794,7 +2631,7 @@ ROM_END
/* Viper BIOS */
GAME(1999, kviper, 0, viper, viper, viper_state, viper, ROT0, "Konami", "Konami Viper BIOS", MACHINE_IS_BIOS_ROOT)
-GAME(2001, ppp2nd, kviper, viper, viper, viper_state, viperhd, ROT0, "Konami", "ParaParaParadise 2nd Mix", MACHINE_NOT_WORKING|MACHINE_NO_SOUND)
+GAME(2001, ppp2nd, kviper, viper, viper, viper_state, viper, ROT0, "Konami", "ParaParaParadise 2nd Mix", MACHINE_NOT_WORKING|MACHINE_NO_SOUND)
GAME(2001, boxingm, kviper, viper, viper, viper_state, vipercf, ROT0, "Konami", "Boxing Mania (ver JAA)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND)
GAME(2000, code1d, kviper, viper, viper, viper_state, vipercf, ROT0, "Konami", "Code One Dispatch (ver D)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND)
@@ -2809,23 +2646,17 @@ GAME(2001, p911, kviper, viper, viper, viper_state, vipercf, ROT90, "K
GAME(2001, p911uc, p911, viper, viper, viper_state, vipercf, ROT90, "Konami", "Police 911 (ver UAC)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND)
GAME(2001, p911kc, p911, viper, viper, viper_state, vipercf, ROT90, "Konami", "Police 911 (ver KAC)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND)
GAME(2001, p911e, p911, viper, viper, viper_state, vipercf, ROT90, "Konami", "Police 24/7 (ver EAA)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND)
-GAME(2001, p911ea, p911, viper, viper, viper_state, vipercf, ROT90, "Konami", "Police 24/7 (ver EAA, alt)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND)
GAME(2001, p911j, p911, viper, viper, viper_state, vipercf, ROT90, "Konami", "Keisatsukan Shinjuku 24ji (ver JAC)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND)
GAME(2001, p9112, kviper, viper, viper, viper_state, vipercf, ROT90, "Konami", "Police 911 2 (VER. UAA:B)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND)
GAME(2003, popn9, kviper, viper, viper, viper_state, vipercf, ROT0, "Konami", "Pop'n Music 9 (ver JAB)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND)
GAME(2001, sscopex, kviper, viper, viper, viper_state, vipercf, ROT0, "Konami", "Silent Scope EX (ver UAA)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND)
GAME(2001, sogeki, sscopex, viper, viper, viper_state, vipercf, ROT0, "Konami", "Sogeki (ver JAA)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND)
-GAME(2002, sscopefh, kviper, viper, viper, viper_state, vipercf, ROT0, "Konami", "Silent Scope Fortune Hunter", MACHINE_NOT_WORKING|MACHINE_NO_SOUND)
GAME(2001, thrild2, kviper, viper, viper, viper_state, vipercf, ROT0, "Konami", "Thrill Drive 2 (ver EBB)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND)
GAME(2001, thrild2a, thrild2, viper, viper, viper_state, vipercf, ROT0, "Konami", "Thrill Drive 2 (ver AAA)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND)
-GAME(2001, thrild2ab, thrild2, viper, viper, viper_state, vipercf, ROT0, "Konami", "Thrill Drive 2 (ver AAA, alt)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND)
-GAME(2001, thrild2ac, thrild2, viper, viper, viper_state, vipercf, ROT0, "Konami", "Thrill Drive 2 (ver AAA, alt 2)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND)
GAME(2001, thrild2c, thrild2, viper, viper, viper_state, vipercf, ROT0, "Konami", "Thrill Drive 2 (ver EAA)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND)
GAME(2002, tsurugi, kviper, viper, viper, viper_state, vipercf, ROT0, "Konami", "Tsurugi (ver EAB)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND)
-GAME(2002, tsurugie, tsurugi, viper, viper, viper_state, vipercf, ROT0, "Konami", "Tsurugi (ver EAB, alt)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND)
GAME(2002, tsurugij, tsurugi, viper, viper, viper_state, vipercf, ROT0, "Konami", "Tsurugi (ver JAC)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND)
GAME(2002, wcombat, kviper, viper, viper, viper_state, vipercf, ROT0, "Konami", "World Combat (ver AAD:B)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND)
-GAME(2002, wcombatb, wcombat, viper, viper, viper_state, vipercf, ROT0, "Konami", "World Combat (ver AAD:B, alt)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND)
GAME(2002, wcombatk, wcombat, viper, viper, viper_state, vipercf, ROT0, "Konami", "World Combat (ver KBC:B)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND)
GAME(2002, wcombatu, wcombat, viper, viper, viper_state, vipercf, ROT0, "Konami", "World Combat / Warzaid (ver UCD:B)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND)
GAME(2002, wcombatj, wcombat, viper, viper, viper_state, vipercf, ROT0, "Konami", "World Combat (ver JAA)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND)
diff --git a/src/mame/drivers/wrally.cpp b/src/mame/drivers/wrally.cpp
index c6af288a8eb..db729a6b7ac 100644
--- a/src/mame/drivers/wrally.cpp
+++ b/src/mame/drivers/wrally.cpp
@@ -66,7 +66,6 @@ CPUs related:
Sound related:
==============
* 1xOKIM6295 @ C6
-* 1xOSC1MHz @ C7
* 2xM27C4001 @ C1 & C3 (OKI ADPCM samples)
* 1xPAL16R4 @ E2 (handles OKI ROM banking)
@@ -95,12 +94,6 @@ to pin #2 (CLK) at ICs A16 and A17 and it is a clock for the 74LS169 ICs; this c
frequency is proportional to the movements of the steering wheel: fast movements
produces a high clock frequency, slow movements a low freq.
-PCB: REF.930217
-
-The PCB has a layout that can either use the 4 rom set of I7, I9, I11 & I 13 or larger
- roms at H8 & H12 for graphics as well as the ability to use different size sound sample
- roms at C1 & C3
-
***************************************************************************/
#include "emu.h"
@@ -336,31 +329,7 @@ ROM_START( wrallya )
ROM_LOAD( "pal16r8-b15.bin", 0x0000, 0x0104, CRC(b50337a6) SHA1(1f922753cb9982cad9a3c9246894ecd38273236e) )
ROM_END
-ROM_START( wrallyb )
- ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 code */
- ROM_LOAD16_BYTE( "rally_c23.c23", 0x000000, 0x080000, CRC(ddd6f833) SHA1(f12f82c412fa93f46020d50c2620974ae2fb502b) )
- ROM_LOAD16_BYTE( "rally_c22.c22", 0x000001, 0x080000, CRC(59a0d35c) SHA1(7c6f376a53c1e6d793cbfb16861ee3298ee013a1) )
-
- ROM_REGION( 0x10000, "mcu", 0 ) /* DS5002FP code */
- ROM_LOAD( "wrdallas.bin", 0x00000, 0x8000, CRC(547d1768) SHA1(c58d1edd072d796be0663fb265f4739ec006b688) )
-
- ROM_REGION( 0x200000, "gfx1", 0 )
- ROM_LOAD( "rally h-12.h12", 0x000000, 0x100000, CRC(3353dc00) SHA1(db3b1686751dcaa231d66c08b5be81fcfe299ad9) ) /* Same data, different layout */
- ROM_LOAD( "rally h-8.h8", 0x100000, 0x100000, CRC(58dcd024) SHA1(384ff296d3c7c8e0c4469231d1940de3cea89fc2) )
-
- ROM_REGION( 0x140000, "oki", 0 ) /* ADPCM samples - sound chip is OKIM6295 */
- ROM_LOAD( "sound c-1.c1", 0x000000, 0x100000, CRC(2d69c9b8) SHA1(328cb3c928dc6921c0c3f0277f59bca6c747c504) ) /* Same data in a single rom */
- ROM_RELOAD( 0x040000, 0x100000 )
-
- ROM_REGION( 0x0514, "plds", 0 ) /* PAL's and GAL's */
- ROM_LOAD( "tibpal20l8-25cnt.b23", 0x0000, 0x0104, NO_DUMP )
- ROM_LOAD( "gal16v8-25lnc.h21", 0x0000, 0x0104, NO_DUMP )
- ROM_LOAD( "tibpal20l8-25cnt.h15", 0x0000, 0x0104, NO_DUMP )
- ROM_LOAD( "pal16r4-e2.bin", 0x0000, 0x0104, CRC(15fee75c) SHA1(b9ee5121dd41f2535d9abd78ff5fcfeaa1ac6b62) )
- ROM_LOAD( "pal16r8-b15.bin", 0x0000, 0x0104, CRC(b50337a6) SHA1(1f922753cb9982cad9a3c9246894ecd38273236e) )
-ROM_END
-
-ROM_START( wrallyat ) /* Board Marked 930217, Atari License */
+ROM_START( wrallyb ) /* Board Marked 930217, Atari License */
ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 code */
ROM_LOAD16_BYTE( "rally.c23", 0x000000, 0x080000, CRC(366595ad) SHA1(e16341ed9eacf9b729c28184268150ea9b62f185) ) /* North & South America only... */
ROM_LOAD16_BYTE( "rally.c22", 0x000001, 0x080000, CRC(0ad4ec6f) SHA1(991557cf25fe960b1c586e990e6019befe5a11d0) )
@@ -385,7 +354,6 @@ ROM_START( wrallyat ) /* Board Marked 930217, Atari License */
ROM_END
-GAME( 1993, wrally, 0, wrally, wrally, driver_device, 0, ROT0, "Gaelco", "World Rally (Version 1.0, Checksum 0E56)", MACHINE_SUPPORTS_SAVE ) /* Dallas DS5002FP power failure shows as: "Tension baja " */
-GAME( 1993, wrallya, wrally, wrally, wrally, driver_device, 0, ROT0, "Gaelco", "World Rally (Version 1.0, Checksum 3873)", MACHINE_SUPPORTS_SAVE ) /* Dallas DS5002FP power failure shows as: "Power Failure" */
-GAME( 1993, wrallyb, wrally, wrally, wrally, driver_device, 0, ROT0, "Gaelco", "World Rally (Version 1.0, Checksum 8AA2)", MACHINE_SUPPORTS_SAVE )
-GAME( 1993, wrallyat, wrally, wrally, wrally, driver_device, 0, ROT0, "Gaelco (Atari license)", "World Rally (US, 930217)", MACHINE_SUPPORTS_SAVE )
+GAME( 1993, wrally, 0, wrally, wrally, driver_device, 0, ROT0, "Gaelco", "World Rally (set 1)", MACHINE_SUPPORTS_SAVE ) /* Dallas DS5002FP power failure shows as: "Tension baja " */
+GAME( 1993, wrallya, wrally, wrally, wrally, driver_device, 0, ROT0, "Gaelco", "World Rally (set 2)", MACHINE_SUPPORTS_SAVE ) /* Dallas DS5002FP power failure shows as: "Power Failure" */
+GAME( 1993, wrallyb, wrally, wrally, wrally, driver_device, 0, ROT0, "Gaelco (Atari license)", "World Rally (US, 930217)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/xor100.cpp b/src/mame/drivers/xor100.cpp
index 05b81f316ac..3d85c372c7d 100644
--- a/src/mame/drivers/xor100.cpp
+++ b/src/mame/drivers/xor100.cpp
@@ -189,7 +189,7 @@ READ8_MEMBER( xor100_state::fdc_wait_r )
if (!m_fdc_irq && !m_fdc_drq)
{
fatalerror("Z80 WAIT not supported by MAME core\n");
- m_maincpu->set_input_line(Z80_INPUT_LINE_BOGUSWAIT, ASSERT_LINE);
+ m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, ASSERT_LINE);
}
}
@@ -442,7 +442,7 @@ void xor100_state::fdc_intrq_w(bool state)
if (state)
{
fatalerror("Z80 WAIT not supported by MAME core\n");
- m_maincpu->set_input_line(Z80_INPUT_LINE_BOGUSWAIT, ASSERT_LINE);
+ m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, ASSERT_LINE);
}
}
@@ -453,7 +453,7 @@ void xor100_state::fdc_drq_w(bool state)
if (state)
{
fatalerror("Z80 WAIT not supported by MAME core\n");
- m_maincpu->set_input_line(Z80_INPUT_LINE_BOGUSWAIT, ASSERT_LINE);
+ m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, ASSERT_LINE);
}
}
@@ -568,7 +568,7 @@ static MACHINE_CONFIG_START( xor100, xor100_state )
// S-100
MCFG_S100_BUS_ADD()
- MCFG_S100_RDY_CALLBACK(INPUTLINE(Z80_TAG, Z80_INPUT_LINE_BOGUSWAIT))
+ MCFG_S100_RDY_CALLBACK(INPUTLINE(Z80_TAG, Z80_INPUT_LINE_WAIT))
MCFG_S100_SLOT_ADD("s100_1", xor100_s100_cards, nullptr)
MCFG_S100_SLOT_ADD("s100_2", xor100_s100_cards, nullptr)
MCFG_S100_SLOT_ADD("s100_3", xor100_s100_cards, nullptr)
diff --git a/src/mame/drivers/xybots.cpp b/src/mame/drivers/xybots.cpp
index 9cb32712bd2..948e7aa33ae 100644
--- a/src/mame/drivers/xybots.cpp
+++ b/src/mame/drivers/xybots.cpp
@@ -184,7 +184,7 @@ static MACHINE_CONFIG_START( xybots, xybots_state )
MCFG_CPU_PROGRAM_MAP(main_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", atarigen_state, video_int_gen)
- MCFG_SLAPSTIC_ADD("slapstic", 107)
+ MCFG_SLAPSTIC_ADD("slapstic")
MCFG_MACHINE_RESET_OVERRIDE(xybots_state,xybots)
@@ -395,7 +395,7 @@ ROM_END
DRIVER_INIT_MEMBER(xybots_state,xybots)
{
m_h256 = 0x0400;
- slapstic_configure(*m_maincpu, 0x008000, 0);
+ slapstic_configure(*m_maincpu, 0x008000, 0, 107);
}
diff --git a/src/mame/drivers/zaccaria.cpp b/src/mame/drivers/zaccaria.cpp
index 328c9614af7..a002b46b6d0 100644
--- a/src/mame/drivers/zaccaria.cpp
+++ b/src/mame/drivers/zaccaria.cpp
@@ -41,19 +41,31 @@ Notes:
#include "emu.h"
#include "cpu/z80/z80.h"
+#include "cpu/m6800/m6800.h"
#include "machine/i8255.h"
+#include "sound/dac.h"
#include "includes/zaccaria.h"
void zaccaria_state::machine_start()
{
save_item(NAME(m_dsw_sel));
+ save_item(NAME(m_active_8910));
+ save_item(NAME(m_port0a));
+ save_item(NAME(m_acs));
+ save_item(NAME(m_last_port0b));
+ save_item(NAME(m_toggle));
save_item(NAME(m_nmi_mask));
}
void zaccaria_state::machine_reset()
{
m_dsw_sel = 0;
+ m_active_8910 = 0;
+ m_port0a = 0;
+ m_acs = 0;
+ m_last_port0b = 0;
+ m_toggle = 0;
m_nmi_mask = 0;
}
@@ -61,21 +73,21 @@ WRITE8_MEMBER(zaccaria_state::dsw_sel_w)
{
switch (data & 0xf0)
{
- case 0xe0:
- m_dsw_sel = 0;
- break;
+ case 0xe0:
+ m_dsw_sel = 0;
+ break;
- case 0xd0:
- m_dsw_sel = 1;
- break;
+ case 0xd0:
+ m_dsw_sel = 1;
+ break;
- case 0xb0:
- m_dsw_sel = 2;
- break;
+ case 0xb0:
+ m_dsw_sel = 2;
+ break;
- default:
- logerror("%s: portsel = %02x\n", machine().describe_context(), data);
- break;
+ default:
+ logerror("%s: portsel = %02x\n", machine().describe_context(), data);
+ break;
}
}
@@ -85,6 +97,100 @@ READ8_MEMBER(zaccaria_state::dsw_r)
}
+WRITE8_MEMBER(zaccaria_state::ay8910_port0a_w)
+{
+ /* bits 0-2 go to a 74LS156 with open collector outputs
+ * one out of 8 Resitors is than used to form a resistor
+ * divider with Analog input 5 (tromba)
+ */
+
+ // bits 3-4 control the analog drum emulation on 8910 #0 ch. A
+
+ static const int table[8] = { 8200, 5600, 3300, 1500, 820, 390, 150, 47 };
+ int b0, b1, b2, ba, v;
+ b0 = data & 0x01;
+ b1 = (data & 0x02) >> 1;
+ b2 = (data & 0x04) >> 2;
+ ba = (b0<<2) | (b1<<1) | b2;
+ /* 150 below to scale to volume 100 */
+ v = (150 * table[ba]) / (4700 + table[ba]);
+ //printf("dac1w %02d %04d\n", ba, v);
+ m_ay2->set_volume(1, v);
+}
+
+READ8_MEMBER(zaccaria_state::port0a_r)
+{
+ return (m_active_8910 == 0) ? m_ay1->data_r(space, 0) : m_ay2->data_r(space, 0);
+}
+
+WRITE8_MEMBER(zaccaria_state::port0a_w)
+{
+ m_port0a = data;
+}
+
+WRITE8_MEMBER(zaccaria_state::port0b_w)
+{
+ /* bit 1 goes to 8910 #0 BDIR pin */
+ if ((m_last_port0b & 0x02) == 0x02 && (data & 0x02) == 0x00)
+ {
+ /* bit 0 goes to the 8910 #0 BC1 pin */
+ m_ay1->data_address_w(space, m_last_port0b, m_port0a);
+ }
+ else if ((m_last_port0b & 0x02) == 0x00 && (data & 0x02) == 0x02)
+ {
+ /* bit 0 goes to the 8910 #0 BC1 pin */
+ if (m_last_port0b & 0x01)
+ m_active_8910 = 0;
+ }
+ /* bit 3 goes to 8910 #1 BDIR pin */
+ if ((m_last_port0b & 0x08) == 0x08 && (data & 0x08) == 0x00)
+ {
+ /* bit 2 goes to the 8910 #1 BC1 pin */
+ m_ay2->data_address_w(space, m_last_port0b >> 2, m_port0a);
+ }
+ else if ((m_last_port0b & 0x08) == 0x00 && (data & 0x08) == 0x08)
+ {
+ /* bit 2 goes to the 8910 #1 BC1 pin */
+ if (m_last_port0b & 0x04)
+ m_active_8910 = 1;
+ }
+
+ m_last_port0b = data;
+}
+
+INTERRUPT_GEN_MEMBER(zaccaria_state::cb1_toggle)
+{
+ m_pia0->cb1_w(m_toggle & 1);
+ m_toggle ^= 1;
+}
+
+WRITE8_MEMBER(zaccaria_state::port1b_w)
+{
+ // bit 0 = /RS
+ m_tms->rsq_w((data >> 0) & 0x01);
+ // bit 1 = /WS
+ m_tms->wsq_w((data >> 1) & 0x01);
+
+ // bit 3 = "ACS" (goes, inverted, to input port 6 bit 3)
+ m_acs = ~data & 0x08;
+
+ // bit 4 = led (for testing?)
+ output().set_led_value(0,~data & 0x10);
+}
+
+
+WRITE8_MEMBER(zaccaria_state::sound_command_w)
+{
+ soundlatch_byte_w(space, 0, data);
+ m_audio2->set_input_line(0, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE);
+}
+
+WRITE8_MEMBER(zaccaria_state::sound1_command_w)
+{
+ m_pia0->ca1_w(data & 0x80);
+ soundlatch2_byte_w(space, 0, data);
+}
+
GAME_EXTERN(monymony);
READ8_MEMBER(zaccaria_state::prot1_r)
@@ -147,23 +253,83 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, zaccaria_state )
AM_RANGE(0x6800, 0x683f) AM_WRITE(attributes_w) AM_SHARE("attributesram")
AM_RANGE(0x6840, 0x685f) AM_RAM AM_SHARE("spriteram")
AM_RANGE(0x6881, 0x68c0) AM_RAM AM_SHARE("spriteram2")
- AM_RANGE(0x6c00, 0x6c00) AM_MIRROR(0x81f8) AM_WRITE(flip_screen_x_w)
- AM_RANGE(0x6c01, 0x6c01) AM_MIRROR(0x81f8) AM_WRITE(flip_screen_y_w)
- AM_RANGE(0x6c02, 0x6c02) AM_MIRROR(0x81f8) AM_WRITE(ressound_w)
- AM_RANGE(0x6c06, 0x6c06) AM_MIRROR(0x81f8) AM_WRITE(coin_w)
- AM_RANGE(0x6c07, 0x6c07) AM_MIRROR(0x81f8) AM_WRITE(nmi_mask_w)
- AM_RANGE(0x6c00, 0x6c07) AM_MIRROR(0x81f8) AM_READ(prot2_r)
- AM_RANGE(0x6e00, 0x6e00) AM_MIRROR(0x81f8) AM_READ(dsw_r) AM_DEVWRITE("audiopcb", zac1b11142_audio_device, hs_w)
+ AM_RANGE(0x6c00, 0x6c00) AM_WRITE(flip_screen_x_w)
+ AM_RANGE(0x6c01, 0x6c01) AM_WRITE(flip_screen_y_w)
+ AM_RANGE(0x6c02, 0x6c02) AM_WRITENOP /* sound reset */
+ AM_RANGE(0x6c06, 0x6c06) AM_WRITE(coin_w)
+ AM_RANGE(0x6c07, 0x6c07) AM_WRITE(nmi_mask_w)
+ AM_RANGE(0x6c00, 0x6c07) AM_READ(prot2_r)
+ AM_RANGE(0x6e00, 0x6e00) AM_READWRITE(dsw_r, sound_command_w)
AM_RANGE(0x7000, 0x77ff) AM_RAM
AM_RANGE(0x7800, 0x7803) AM_DEVREADWRITE("ppi8255", i8255_device, read, write)
AM_RANGE(0x7c00, 0x7c00) AM_READ(watchdog_reset_r)
AM_RANGE(0x8000, 0xdfff) AM_ROM
ADDRESS_MAP_END
+/* slave sound cpu, produces music and sound effects */
+/* mapping:
+ A15 A14 A13 A12 A11 A10 A09 A08 A07 A06 A05 A04 A03 A02 A01 A00
+ 0 0 0 0 0 0 0 0 0 * * * * * * * RW 6802 internal ram
+ 0 0 0 x x x x x x x x x x x x x Open bus (for area that doesn't overlap ram)
+ 0 0 1 x x x x x x x x x x x x x Open bus
+ 0 1 0 x x x x x x x x x 0 0 x x Open bus
+ 0 1 0 x x x x x x x x x 0 1 x x Open bus
+ 0 1 0 x x x x x x x x x 1 0 x x Open bus
+ 0 1 0 x x x x x x x x x 1 1 * * RW 6821 PIA @ 4I
+ 0 1 1 x x x x x x x x x x x x x Open bus
+ 1 0 % % * * * * * * * * * * * * R /CS4A: Enable Rom 13
+ 1 1 % % * * * * * * * * * * * * R /CS5A: Enable Rom 9
+ note that the % bits go to pins 2 (6802 A12) and 26 (6802 A13) of the roms
+ monymony and jackrabt both use 2764 roms, which use pin 2 as A12 and pin 26 as N/C don't care
+ hence for actual chips used, the mem map is:
+ 1 0 x * * * * * * * * * * * * * R /CS4A: Enable Rom 13
+ 1 1 x * * * * * * * * * * * * * R /CS5A: Enable Rom 9
+
+ 6821 PIA: CA1 comes from the master sound cpu's latch bit 7 (which is also connected to the AY chip at 4G's IOB1); CB1 comes from a periodic counter clocked by the 6802's clock, divided by 4096. CA2 and CB2 are disconnected. PA0-7 connect to the data busses of the AY-3-8910 chips; PB0 and PB1 connect to the BC1 and BDIR pins of the AY chip at 4G; PB2 and PB3 connect to the BC1 and BDIR pins of the AY chip at 4H.
+*/
+static ADDRESS_MAP_START( sound_map_1, AS_PROGRAM, 8, zaccaria_state )
+ AM_RANGE(0x0000, 0x007f) AM_RAM
+ AM_RANGE(0x500c, 0x500f) AM_DEVREADWRITE("pia0", pia6821_device, read, write) AM_MIRROR(0x1ff0)
+ AM_RANGE(0x8000, 0x9fff) AM_ROM AM_MIRROR(0x2000) // rom 13
+ AM_RANGE(0xc000, 0xdfff) AM_ROM AM_MIRROR(0x2000) // rom 9
+ADDRESS_MAP_END
-WRITE8_MEMBER(zaccaria_state::ressound_w)
+/* master sound cpu, controls speech directly */
+/* mapping:
+ A15 A14 A13 A12 A11 A10 A09 A08 A07 A06 A05 A04 A03 A02 A01 A00
+ 0 0 0 0 0 0 0 0 0 * * * * * * * RW 6802 internal ram
+**** x 0 0 0 x x x x 1 x x 0 x x * * Open bus (test mode writes as if there was another PIA here)
+ x 0 0 0 x x x x 1 x x 1 x x * * RW 6821 PIA @ 1I
+ x 0 0 1 0 0 x x x x x x x x x x W MC1408 DAC
+ x x 0 1 0 1 x x x x x x x x x x W Command to slave sound1 cpu
+ x x 0 1 1 0 x x x x x x x x x x R Command read latch from z80
+ x x 0 1 1 1 x x x x x x x x x x Open bus
+ % % 1 0 * * * * * * * * * * * * R /CS1A: Enable Rom 8
+ % % 1 1 * * * * * * * * * * * * R /CS0A: Enable Rom 7
+ note that the % bits go to pins 2 (6802 A14) and 26 (6802 A15) of the roms
+ monymony and jackrabt both use 2764 roms, which use pin 2 as A12 and pin 26 as N/C don't care
+ hence for actual chips used, the mem map is:
+ x * 1 0 * * * * * * * * * * * * R /CS1A: Enable Rom 8
+ x * 1 1 * * * * * * * * * * * * R /CS0A: Enable Rom 7
+
+ 6821 PIA: PA0-7, CA2 and CB1 connect to the TMS5200; CA1 and CB2 are disconnected, though the test mode assumes there's something connected to CB2 (possibly another LED like the one connected to PB4); PB3 connects to 'ACS' which goes to the z80.
+*/
+static ADDRESS_MAP_START( sound_map_2, AS_PROGRAM, 8, zaccaria_state )
+ AM_RANGE(0x0000, 0x007f) AM_RAM /* 6802 internal ram */
+ AM_RANGE(0x0090, 0x0093) AM_DEVREADWRITE("pia1", pia6821_device, read, write) AM_MIRROR(0x8F6C)
+ AM_RANGE(0x1000, 0x1000) AM_DEVWRITE("mc1408", dac_device, write_unsigned8) AM_MIRROR(0x83FF) /* MC1408 */
+ AM_RANGE(0x1400, 0x1400) AM_WRITE(sound1_command_w) AM_MIRROR(0xC3FF)
+ AM_RANGE(0x1800, 0x1800) AM_READ(soundlatch_byte_r) AM_MIRROR(0xC3FF)
+ AM_RANGE(0x2000, 0x2fff) AM_ROM AM_MIRROR(0x8000) // rom 8 with A12 low
+ AM_RANGE(0x3000, 0x3fff) AM_ROM AM_MIRROR(0x8000) // rom 7 with A12 low
+ AM_RANGE(0x6000, 0x6fff) AM_ROM AM_MIRROR(0x8000) // rom 8 with A12 high
+ AM_RANGE(0x7000, 0x7fff) AM_ROM AM_MIRROR(0x8000) // rom 7 with A12 high
+ADDRESS_MAP_END
+
+
+CUSTOM_INPUT_MEMBER(zaccaria_state::acs_r)
{
- m_audiopcb->ressound_w(data & 0x01);
+ return (m_acs & 0x08) ? 1 : 0;
}
static INPUT_PORTS_START( monymony )
@@ -271,7 +437,7 @@ static INPUT_PORTS_START( monymony )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("audiopcb", zac1b11142_audio_device, acs_r)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, zaccaria_state,acs_r, NULL) /* "ACS" - from pin 13 of a PIA on the sound board */
/* other bits come from a protection device */
INPUT_PORTS_END
@@ -342,12 +508,33 @@ static MACHINE_CONFIG_START( zaccaria, zaccaria_state )
MCFG_CPU_VBLANK_INT_DRIVER("screen", zaccaria_state, vblank_irq)
// MCFG_QUANTUM_TIME(attotime::from_hz(1000000))
+ MCFG_CPU_ADD("audiocpu", M6802,XTAL_3_579545MHz) /* verified on pcb */
+ MCFG_CPU_PROGRAM_MAP(sound_map_1)
+ MCFG_CPU_PERIODIC_INT_DRIVER(zaccaria_state, cb1_toggle, (double)XTAL_3_579545MHz/4096)
+// MCFG_QUANTUM_TIME(attotime::from_hz(1000000))
+
+ MCFG_CPU_ADD("audio2", M6802,XTAL_3_579545MHz) /* verified on pcb */
+ MCFG_CPU_PROGRAM_MAP(sound_map_2)
+// MCFG_QUANTUM_TIME(attotime::from_hz(1000000))
+
MCFG_DEVICE_ADD("ppi8255", I8255A, 0)
MCFG_I8255_IN_PORTA_CB(IOPORT("P1"))
MCFG_I8255_IN_PORTB_CB(IOPORT("P2"))
MCFG_I8255_IN_PORTC_CB(IOPORT("SYSTEM"))
MCFG_I8255_OUT_PORTC_CB(WRITE8(zaccaria_state, dsw_sel_w))
+ MCFG_DEVICE_ADD( "pia0", PIA6821, 0)
+ MCFG_PIA_READPA_HANDLER(READ8(zaccaria_state, port0a_r))
+ MCFG_PIA_WRITEPA_HANDLER(WRITE8(zaccaria_state, port0a_w))
+ MCFG_PIA_WRITEPB_HANDLER(WRITE8(zaccaria_state, port0b_w))
+ MCFG_PIA_IRQA_HANDLER(DEVWRITELINE("audiocpu", m6802_cpu_device, nmi_line))
+ MCFG_PIA_IRQB_HANDLER(DEVWRITELINE("audiocpu", m6802_cpu_device, irq_line))
+
+ MCFG_DEVICE_ADD( "pia1", PIA6821, 0)
+ MCFG_PIA_READPA_HANDLER(DEVREAD8("tms", tms5220_device, status_r))
+ MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("tms", tms5220_device, data_w))
+ MCFG_PIA_WRITEPB_HANDLER(WRITE8(zaccaria_state,port1b_w))
+
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60.57) /* verified on pcb */
@@ -364,8 +551,24 @@ static MACHINE_CONFIG_START( zaccaria, zaccaria_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_ZACCARIA_1B11142("audiopcb")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+
+ MCFG_SOUND_ADD("ay1", AY8910, XTAL_3_579545MHz/2) /* verified on pcb */
+ MCFG_AY8910_PORT_B_READ_CB(READ8(driver_device, soundlatch2_byte_r))
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(zaccaria_state, ay8910_port0a_w))
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
+
+ MCFG_SOUND_ADD("ay2", AY8910, XTAL_3_579545MHz/2) /* verified on pcb */
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
+
+ MCFG_DAC_ADD("mc1408")
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
+
+ /* There is no xtal, the clock is obtained from a RC oscillator as shown in the TMS5220 datasheet (R=100kOhm C=22pF) */
+ /* 162kHz measured on pin 3 20 minutesa fter power on. Clock would then be 162*4=648kHz. */
+ MCFG_SOUND_ADD("tms", TMS5200, 649200) /* ROMCLK pin measured at 162.3Khz, OSC is exactly *4 of that) */
+ MCFG_TMS52XX_IRQ_HANDLER(DEVWRITELINE("pia1", pia6821_device, cb1_w))
+ MCFG_TMS52XX_READYQ_HANDLER(DEVWRITELINE("pia1", pia6821_device, ca2_w))
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
MACHINE_CONFIG_END
@@ -391,11 +594,11 @@ ROM_START( monymony )
ROM_LOAD( "cpu6.2c", 0x5000, 0x1000, CRC(31da62b1) SHA1(486f07087244f8537510afacb64ddd59eb512a4d) )
ROM_CONTINUE( 0xd000, 0x1000 )
- ROM_REGION( 0x10000, "audiopcb:melodycpu", 0 ) /* 64k for first 6802 */
+ ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for first 6802 */
ROM_LOAD( "snd13.2g", 0x8000, 0x2000, CRC(78b01b98) SHA1(2aabed56cdae9463deb513c0c5021f6c8dfd271e) )
ROM_LOAD( "snd9.1i", 0xc000, 0x2000, CRC(94e3858b) SHA1(04961f67b95798b530bd83355dec612389f22255) )
- ROM_REGION( 0x10000, "audiopcb:audiocpu", 0 ) /* 64k for second 6802 */
+ ROM_REGION( 0x10000, "audio2", 0 ) /* 64k for second 6802 */
ROM_LOAD( "snd8.1h", 0x2000, 0x1000, CRC(aad76193) SHA1(e08fc184efced392ee902c4cc9daaaf3310cdfe2) )
ROM_CONTINUE( 0x6000, 0x1000 )
ROM_LOAD( "snd7.1g", 0x3000, 0x1000, CRC(1e8ffe3e) SHA1(858ee7abe88d5801237e519cae2b50ae4bf33a58) )
@@ -426,11 +629,11 @@ ROM_START( jackrabt )
ROM_LOAD( "cpu-01.5h", 0xc000, 0x1000, CRC(785e1a01) SHA1(a748d300be9455cad4f912e01c2279bb8465edfe) )
ROM_LOAD( "cpu-01.6h", 0xd000, 0x1000, CRC(dd5979cf) SHA1(e9afe7002b2258a1c3132bdd951c6e20d473fb6a) )
- ROM_REGION( 0x10000, "audiopcb:melodycpu", 0 ) /* 64k for first 6802 */
+ ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for first 6802 */
ROM_LOAD( "13snd.2g", 0x8000, 0x2000, CRC(fc05654e) SHA1(ed9c66672fe89c41e320e1d27b53f5efa92dce9c) )
ROM_LOAD( "9snd.1i", 0xc000, 0x2000, CRC(3dab977f) SHA1(3e79c06d2e70b050f01b7ac58be5127ba87904b0) )
- ROM_REGION( 0x10000, "audiopcb:audiocpu", 0 ) /* 64k for second 6802 */
+ ROM_REGION( 0x10000, "audio2", 0 ) /* 64k for second 6802 */
ROM_LOAD( "8snd.1h", 0x2000, 0x1000, CRC(f4507111) SHA1(0513f0831b94aeda84aa4f3b4a7c60dfc5113b2d) )
ROM_CONTINUE( 0x6000, 0x1000 )
ROM_LOAD( "7snd.1g", 0x3000, 0x1000, CRC(c722eff8) SHA1(d8d1c091ab80ea2d6616e4dc030adc9905c0a496) )
@@ -465,11 +668,11 @@ ROM_START( jackrabt2 )
ROM_LOAD( "6cpu2.2c", 0x5000, 0x1000, CRC(404496eb) SHA1(44381e27e540fe9d8cacab4c3b1fe9a4f20d26a8) )
ROM_CONTINUE( 0xd000, 0x1000 )
- ROM_REGION( 0x10000, "audiopcb:melodycpu", 0 ) /* 64k for first 6802 */
+ ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for first 6802 */
ROM_LOAD( "13snd.2g", 0x8000, 0x2000, CRC(fc05654e) SHA1(ed9c66672fe89c41e320e1d27b53f5efa92dce9c) )
ROM_LOAD( "9snd.1i", 0xc000, 0x2000, CRC(3dab977f) SHA1(3e79c06d2e70b050f01b7ac58be5127ba87904b0) )
- ROM_REGION( 0x10000, "audiopcb:audiocpu", 0 ) /* 64k for second 6802 */
+ ROM_REGION( 0x10000, "audio2", 0 ) /* 64k for second 6802 */
ROM_LOAD( "8snd.1h", 0x2000, 0x1000, CRC(f4507111) SHA1(0513f0831b94aeda84aa4f3b4a7c60dfc5113b2d) )
ROM_CONTINUE( 0x6000, 0x1000 )
ROM_LOAD( "7snd.1g", 0x3000, 0x1000, CRC(c722eff8) SHA1(d8d1c091ab80ea2d6616e4dc030adc9905c0a496) )
@@ -506,11 +709,11 @@ ROM_START( jackrabts )
ROM_LOAD( "6cpu.2c", 0x5000, 0x1000, CRC(f53d6356) SHA1(9b167edca59cf81a2468368a372bab132f15e2ea) )
ROM_CONTINUE( 0xd000, 0x1000 )
- ROM_REGION( 0x10000, "audiopcb:melodycpu", 0 ) /* 64k for first 6802 */
+ ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for first 6802 */
ROM_LOAD( "13snd.2g", 0x8000, 0x2000, CRC(fc05654e) SHA1(ed9c66672fe89c41e320e1d27b53f5efa92dce9c) )
ROM_LOAD( "9snd.1i", 0xc000, 0x2000, CRC(3dab977f) SHA1(3e79c06d2e70b050f01b7ac58be5127ba87904b0) )
- ROM_REGION( 0x10000, "audiopcb:audiocpu", 0 ) /* 64k for second 6802 */
+ ROM_REGION( 0x10000, "audio2", 0 ) /* 64k for second 6802 */
ROM_LOAD( "8snd.1h", 0x2000, 0x1000, CRC(f4507111) SHA1(0513f0831b94aeda84aa4f3b4a7c60dfc5113b2d) )
ROM_CONTINUE( 0x6000, 0x1000 )
ROM_LOAD( "7snd.1g", 0x3000, 0x1000, CRC(c722eff8) SHA1(d8d1c091ab80ea2d6616e4dc030adc9905c0a496) )
diff --git a/src/mame/includes/apple1.h b/src/mame/includes/apple1.h
new file mode 100644
index 00000000000..35215b9e9a3
--- /dev/null
+++ b/src/mame/includes/apple1.h
@@ -0,0 +1,92 @@
+// license:???
+// copyright-holders:Paul Daniels, Colin Howell, R. Belmont
+/*****************************************************************************
+ *
+ * includes/apple1.h
+ *
+ ****************************************************************************/
+
+#ifndef APPLE1_H_
+#define APPLE1_H_
+
+#include "imagedev/snapquik.h"
+#include "machine/ram.h"
+
+typedef short termchar_t;
+
+struct terminal_t
+{
+ tilemap_t *tm;
+ int gfx;
+ int blank_char;
+ int char_bits;
+ int num_cols;
+ int num_rows;
+ int (*getcursorcode)(int original_code);
+ int cur_offset;
+ int cur_hidden;
+ termchar_t mem[1];
+};
+
+
+class apple1_state : public driver_device
+{
+public:
+ apple1_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag),
+ m_maincpu(*this, "maincpu"),
+ m_ram(*this, RAM_TAG),
+ m_gfxdecode(*this, "gfxdecode"),
+ m_screen(*this, "screen") { }
+
+ int m_vh_clrscrn_pressed;
+ int m_kbd_data;
+ UINT32 m_kbd_last_scan[4];
+ int m_reset_flag;
+ terminal_t *m_current_terminal;
+ terminal_t *m_terminal;
+ int m_blink_on;
+ DECLARE_DRIVER_INIT(apple1);
+ TILE_GET_INFO_MEMBER(terminal_gettileinfo);
+ virtual void machine_reset() override;
+ virtual void video_start() override;
+ UINT32 screen_update_apple1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ TIMER_CALLBACK_MEMBER(apple1_kbd_poll);
+ TIMER_CALLBACK_MEMBER(apple1_kbd_strobe_end);
+ TIMER_CALLBACK_MEMBER(apple1_dsp_ready_start);
+ TIMER_CALLBACK_MEMBER(apple1_dsp_ready_end);
+ DECLARE_READ8_MEMBER(apple1_pia0_kbdin);
+ DECLARE_WRITE8_MEMBER(apple1_pia0_dspout);
+ DECLARE_WRITE_LINE_MEMBER(apple1_pia0_dsp_write_signal);
+ required_device<cpu_device> m_maincpu;
+ void terminal_draw(screen_device &screen, bitmap_ind16 &dest, const rectangle &cliprect, terminal_t *terminal);
+ void verify_coords(terminal_t *terminal, int x, int y);
+ void terminal_putchar(terminal_t *terminal, int x, int y, int ch);
+ int terminal_getchar(terminal_t *terminal, int x, int y);
+ void terminal_putblank(terminal_t *terminal, int x, int y);
+ void terminal_dirtycursor(terminal_t *terminal);
+ void terminal_setcursor(terminal_t *terminal, int x, int y);
+ void terminal_hidecursor(terminal_t *terminal);
+ void terminal_showcursor(terminal_t *terminal);
+ void terminal_getcursor(terminal_t *terminal, int *x, int *y);
+ void terminal_fill(terminal_t *terminal, int val);
+ void terminal_clear(terminal_t *terminal);
+ void apple1_vh_dsp_w (int data);
+ void apple1_vh_dsp_clr ();
+ void apple1_vh_cursor_blink ();
+ int apple1_verify_header (UINT8 *data);
+ terminal_t *terminal_create(int gfx, int blank_char, int char_bits,int (*getcursorcode)(int original_code),int num_cols, int num_rows);
+ attotime apple1_vh_dsp_time_to_ready();
+ DECLARE_SNAPSHOT_LOAD_MEMBER( apple1 );
+ required_device<ram_device> m_ram;
+ required_device<gfxdecode_device> m_gfxdecode;
+ required_device<screen_device> m_screen;
+};
+
+
+/*----------- defined in drivers/apple1.c -----------*/
+
+extern const gfx_layout apple1_charlayout;
+
+
+#endif /* APPLE1_H_ */
diff --git a/src/mame/includes/arcadecl.h b/src/mame/includes/arcadecl.h
index 056875df906..7a580d012c1 100644
--- a/src/mame/includes/arcadecl.h
+++ b/src/mame/includes/arcadecl.h
@@ -8,18 +8,15 @@
#include "machine/atarigen.h"
#include "video/atarimo.h"
-#include "sound/okim6295.h"
class arcadecl_state : public atarigen_state
{
public:
arcadecl_state(const machine_config &mconfig, device_type type, const char *tag)
: atarigen_state(mconfig, type, tag),
- m_oki(*this, "oki"),
m_mob(*this, "mob"),
m_bitmap(*this, "bitmap") { }
- required_device<okim6295_device> m_oki;
optional_device<atari_motion_objects_device> m_mob;
required_shared_ptr<UINT16> m_bitmap;
diff --git a/src/mame/includes/arkanoid.h b/src/mame/includes/arkanoid.h
index 3bae2fd73bf..483975bd45f 100644
--- a/src/mame/includes/arkanoid.h
+++ b/src/mame/includes/arkanoid.h
@@ -62,7 +62,7 @@ public:
UINT8 m_ddr_c;
UINT8 m_tdr;
UINT8 m_tcr;
- emu_timer *m_68705_timer;
+
/* hexaa */
UINT8 m_hexaa_from_main;
diff --git a/src/mame/includes/atarig1.h b/src/mame/includes/atarig1.h
index 01e9b3e9e82..3cef67afe31 100644
--- a/src/mame/includes/atarig1.h
+++ b/src/mame/includes/atarig1.h
@@ -55,6 +55,9 @@ public:
void update_bank(int bank);
DECLARE_DRIVER_INIT(hydrap);
DECLARE_DRIVER_INIT(hydra);
+ DECLARE_DRIVER_INIT(pitfight9);
+ DECLARE_DRIVER_INIT(pitfight7);
+ DECLARE_DRIVER_INIT(pitfightj);
DECLARE_DRIVER_INIT(pitfight);
DECLARE_DRIVER_INIT(pitfightb);
TILE_GET_INFO_MEMBER(get_alpha_tile_info);
@@ -64,5 +67,6 @@ public:
DECLARE_VIDEO_START(atarig1);
UINT32 screen_update_atarig1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
private:
+ void init_common(offs_t slapstic_base, int slapstic, bool is_pitfight);
void pitfightb_cheap_slapstic_init();
};
diff --git a/src/mame/includes/atarisy1.h b/src/mame/includes/atarisy1.h
index 3c0c0d5e4ec..a2e27c24704 100644
--- a/src/mame/includes/atarisy1.h
+++ b/src/mame/includes/atarisy1.h
@@ -15,8 +15,6 @@ class atarisy1_state : public atarigen_state
public:
atarisy1_state(const machine_config &mconfig, device_type type, const char *tag)
: atarigen_state(mconfig, type, tag),
- m_audiocpu(*this, "audiocpu"),
- m_soundcomm(*this, "soundcomm"),
m_bankselect(*this, "bankselect"),
m_mob(*this, "mob"),
m_joystick_timer(*this, "joystick_timer"),
@@ -27,9 +25,6 @@ public:
m_int3off_timer(*this, "int3off_timer"),
m_tms(*this, "tms") { }
- required_device<cpu_device> m_audiocpu;
- required_device<atari_sound_comm_device> m_soundcomm;
-
required_shared_ptr<UINT16> m_bankselect;
required_device<atari_motion_objects_device> m_mob;
@@ -72,7 +67,8 @@ public:
DECLARE_READ8_MEMBER(via_pa_r);
DECLARE_WRITE8_MEMBER(via_pb_w);
DECLARE_READ8_MEMBER(via_pb_r);
- DECLARE_DRIVER_INIT(roadblst);
+ DECLARE_DRIVER_INIT(roadb110);
+ DECLARE_DRIVER_INIT(roadb109);
DECLARE_DRIVER_INIT(peterpak);
DECLARE_DRIVER_INIT(marble);
DECLARE_DRIVER_INIT(roadrunn);
diff --git a/src/mame/includes/atarisy2.h b/src/mame/includes/atarisy2.h
index 3fefb6a7130..21be1d85549 100644
--- a/src/mame/includes/atarisy2.h
+++ b/src/mame/includes/atarisy2.h
@@ -10,9 +10,6 @@
#include "video/atarimo.h"
#include "cpu/m6502/m6502.h"
#include "cpu/t11/t11.h"
-#include "sound/2151intf.h"
-#include "sound/pokey.h"
-#include "sound/tms5220.h"
#include "slapstic.h"
class atarisy2_state : public atarigen_state
@@ -26,11 +23,6 @@ public:
m_slapstic_base(*this, "slapstic_base"),
m_playfield_tilemap(*this, "playfield"),
m_alpha_tilemap(*this, "alpha"),
- m_soundcomm(*this, "soundcomm"),
- m_ym2151(*this, "ymsnd"),
- m_pokey1(*this, "pokey1"),
- m_pokey2(*this, "pokey2"),
- m_tms5220(*this, "tms"),
m_rombank1(*this, "rombank1"),
m_rombank2(*this, "rombank2"),
m_slapstic(*this, "slapstic")
@@ -48,11 +40,7 @@ public:
INT8 m_pedal_count;
- required_device<atari_sound_comm_device> m_soundcomm;
- required_device<ym2151_device> m_ym2151;
- required_device<pokey_device> m_pokey1;
- required_device<pokey_device> m_pokey2;
- optional_device<tms5220_device> m_tms5220;
+ UINT8 m_has_tms5220;
UINT8 m_which_adc;
diff --git a/src/mame/includes/badlands.h b/src/mame/includes/badlands.h
index a23ec09a2c3..dca560b4466 100644
--- a/src/mame/includes/badlands.h
+++ b/src/mame/includes/badlands.h
@@ -14,14 +14,9 @@ class badlands_state : public atarigen_state
public:
badlands_state(const machine_config &mconfig, device_type type, const char *tag)
: atarigen_state(mconfig, type, tag),
- m_audiocpu(*this, "audiocpu"),
- m_soundcomm(*this, "soundcomm"),
m_playfield_tilemap(*this, "playfield"),
m_mob(*this, "mob") { }
- optional_device<cpu_device> m_audiocpu;
- optional_device<atari_sound_comm_device> m_soundcomm;
-
required_device<tilemap_device> m_playfield_tilemap;
required_device<atari_motion_objects_device> m_mob;
diff --git a/src/mame/includes/blmbycar.h b/src/mame/includes/blmbycar.h
index af7b6f120f4..2fbc5390e01 100644
--- a/src/mame/includes/blmbycar.h
+++ b/src/mame/includes/blmbycar.h
@@ -11,19 +11,14 @@ class blmbycar_state : public driver_device
public:
blmbycar_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette"),
m_vram_1(*this, "vram_1"),
m_vram_0(*this, "vram_0"),
m_scroll_1(*this, "scroll_1"),
m_scroll_0(*this, "scroll_0"),
- m_spriteram(*this, "spriteram") { }
-
- /* devices */
- required_device<cpu_device> m_maincpu;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
+ m_spriteram(*this, "spriteram"),
+ m_maincpu(*this, "maincpu"),
+ m_gfxdecode(*this, "gfxdecode"),
+ m_palette(*this, "palette") { }
/* memory pointers */
required_shared_ptr<UINT16> m_vram_1;
@@ -40,31 +35,25 @@ public:
UINT8 m_pot_wheel; // blmbycar
int m_old_val; // blmbycar
int m_retvalue; // waterball
-
- // common
- DECLARE_WRITE16_MEMBER(okibank_w);
- DECLARE_WRITE16_MEMBER(vram_0_w);
- DECLARE_WRITE16_MEMBER(vram_1_w);
-
- // blmbycar
+ DECLARE_WRITE16_MEMBER(blmbycar_okibank_w);
DECLARE_WRITE16_MEMBER(blmbycar_pot_wheel_reset_w);
DECLARE_WRITE16_MEMBER(blmbycar_pot_wheel_shift_w);
DECLARE_READ16_MEMBER(blmbycar_pot_wheel_r);
DECLARE_READ16_MEMBER(blmbycar_opt_wheel_r);
-
- // waterball
DECLARE_READ16_MEMBER(waterball_unk_r);
-
+ DECLARE_WRITE16_MEMBER(blmbycar_vram_0_w);
+ DECLARE_WRITE16_MEMBER(blmbycar_vram_1_w);
+ DECLARE_DRIVER_INIT(blmbycar);
TILE_GET_INFO_MEMBER(get_tile_info_0);
TILE_GET_INFO_MEMBER(get_tile_info_1);
-
- DECLARE_DRIVER_INIT(blmbycar);
virtual void video_start() override;
DECLARE_MACHINE_START(blmbycar);
DECLARE_MACHINE_RESET(blmbycar);
DECLARE_MACHINE_START(watrball);
DECLARE_MACHINE_RESET(watrball);
-
- UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ UINT32 screen_update_blmbycar(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void draw_sprites( 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;
};
diff --git a/src/mame/includes/chihiro.h b/src/mame/includes/chihiro.h
index 0a1915157c6..a9efcc711e3 100644
--- a/src/mame/includes/chihiro.h
+++ b/src/mame/includes/chihiro.h
@@ -3,8 +3,6 @@
/*
* geforce 3d (NV2A) vertex program disassembler
*/
-#include <mutex>
-
class vertex_program_disassembler {
static const char *srctypes[];
static const char *scaops[];
@@ -346,15 +344,6 @@ public:
B8 = 9,
G8B8 = 10
};
- enum class NV2A_GL_FRONT_FACE {
- CW = 0x0900,
- CCW = 0x0901
- };
- enum class NV2A_GL_CULL_FACE {
- FRONT = 0x0404,
- BACK = 0x0405,
- FRONT_AND_BACK = 0x0408
- };
nv2a_renderer(running_machine &machine) : poly_manager<float, nvidia_object_data, 13, 8192>(machine)
{
@@ -368,13 +357,11 @@ public:
objectdata = &(object_data_alloc());
objectdata->data = this;
combiner.used = 0;
+ combiner.lock = osd_lock_alloc();
enabled_vertex_attributes = 0;
indexesleft_count = 0;
vertex_pipeline = 4;
color_mask = 0xffffffff;
- backface_culling_enabled = false;
- backface_culling_winding = NV2A_GL_FRONT_FACE::CCW;
- backface_culling_culled = NV2A_GL_CULL_FACE::BACK;
alpha_test_enabled = false;
alpha_reference = 0;
alpha_func = NV2A_COMPARISON_OP::ALWAYS;
@@ -476,7 +463,6 @@ public:
int read_vertices_0x1810(address_space & space, vertex_nv *destination, int offset, int limit);
int read_vertices_0x1818(address_space & space, vertex_nv *destination, UINT32 address, int limit);
void convert_vertices_poly(vertex_nv *source, vertex_t *destination, int count);
- UINT32 render_triangle_culling(const rectangle &cliprect, render_delegate callback, int paramcount, const vertex_t &_v1, const vertex_t &_v2, const vertex_t &_v3);
void clear_render_target(int what, UINT32 value);
void clear_depth_buffer(int what, UINT32 value);
inline UINT8 *direct_access_ptr(offs_t address);
@@ -640,12 +626,9 @@ public:
} final;
int stages;
int used;
- std::mutex lock;
+ osd_lock *lock;
} combiner;
UINT32 color_mask;
- bool backface_culling_enabled;
- NV2A_GL_FRONT_FACE backface_culling_winding;
- NV2A_GL_CULL_FACE backface_culling_culled;
bool alpha_test_enabled;
NV2A_COMPARISON_OP alpha_func;
int alpha_reference;
diff --git a/src/mame/includes/cyberbal.h b/src/mame/includes/cyberbal.h
index aca6711a0ae..0bc65bccb57 100644
--- a/src/mame/includes/cyberbal.h
+++ b/src/mame/includes/cyberbal.h
@@ -24,7 +24,6 @@ public:
m_daccpu(*this, "dac"),
m_dac1(*this, "dac1"),
m_dac2(*this, "dac2"),
- m_soundcomm(*this, "soundcomm"),
m_jsa(*this, "jsa"),
m_playfield_tilemap(*this, "playfield"),
m_alpha_tilemap(*this, "alpha"),
@@ -41,7 +40,6 @@ public:
optional_device<cpu_device> m_daccpu;
optional_device<dac_device> m_dac1;
optional_device<dac_device> m_dac2;
- optional_device<atari_sound_comm_device> m_soundcomm;
optional_device<atari_jsa_ii_device> m_jsa;
required_device<tilemap_device> m_playfield_tilemap;
required_device<tilemap_device> m_alpha_tilemap;
@@ -78,6 +76,8 @@ public:
DECLARE_WRITE16_MEMBER(sound_68k_w);
DECLARE_WRITE16_MEMBER(sound_68k_dac_w);
DECLARE_DRIVER_INIT(cyberbalt);
+ DECLARE_DRIVER_INIT(cyberbal2p);
+ DECLARE_DRIVER_INIT(cyberbal);
TILE_GET_INFO_MEMBER(get_alpha_tile_info);
TILE_GET_INFO_MEMBER(get_playfield_tile_info);
DECLARE_MACHINE_START(cyberbal);
diff --git a/src/mame/includes/electron.h b/src/mame/includes/electron.h
index bfa6de0f5a7..81d6b9ca171 100644
--- a/src/mame/includes/electron.h
+++ b/src/mame/includes/electron.h
@@ -23,10 +23,10 @@
#define INT_HIGH_TONE 0x40
#define INT_TRANSMIT_EMPTY 0x20
#define INT_RECEIVE_FULL 0x10
-#define INT_RTC 0x08
+#define INT_RTC 0x08
#define INT_DISPLAY_END 0x04
-#define INT_SET 0x100
-#define INT_CLEAR 0x200
+#define INT_SET 0x100
+#define INT_CLEAR 0x200
/* ULA context */
@@ -83,12 +83,12 @@ public:
int m_map16[256];
emu_timer *m_scanline_timer;
DECLARE_READ8_MEMBER(electron_read_keyboard);
- DECLARE_READ8_MEMBER(electron_fred_r);
- DECLARE_WRITE8_MEMBER(electron_fred_w);
DECLARE_READ8_MEMBER(electron_jim_r);
DECLARE_WRITE8_MEMBER(electron_jim_w);
- DECLARE_READ8_MEMBER(electron_sheila_r);
- DECLARE_WRITE8_MEMBER(electron_sheila_w);
+ DECLARE_READ8_MEMBER(electron_1mhz_r);
+ DECLARE_WRITE8_MEMBER(electron_1mhz_w);
+ DECLARE_READ8_MEMBER(electron_ula_r);
+ DECLARE_WRITE8_MEMBER(electron_ula_w);
void electron_tape_start();
void electron_tape_stop();
virtual void machine_start() override;
@@ -108,7 +108,6 @@ public:
inline void electron_plot_pixel(bitmap_ind16 &bitmap, int x, int y, UINT32 color);
void electron_interrupt_handler(int mode, int interrupt);
DECLARE_DEVICE_IMAGE_LOAD_MEMBER( electron_cart );
- DECLARE_INPUT_CHANGED_MEMBER( trigger_reset );
protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
diff --git a/src/mame/includes/fidelz80.h b/src/mame/includes/fidelz80.h
index 3f57cc38ec6..c9aea6bafc4 100644
--- a/src/mame/includes/fidelz80.h
+++ b/src/mame/includes/fidelz80.h
@@ -7,11 +7,7 @@
******************************************************************************/
#include "emu.h"
-#include "sound/speaker.h"
#include "sound/s14001a.h"
-#include "bus/generic/slot.h"
-#include "bus/generic/carts.h"
-#include "softlist.h"
class fidelz80base_state : public driver_device
{
@@ -22,8 +18,6 @@ public:
m_inp_matrix(*this, "IN"),
m_speech(*this, "speech"),
m_speech_rom(*this, "speech"),
- m_speaker(*this, "speaker"),
- m_cart(*this, "cartslot"),
m_display_wait(33),
m_display_maxy(1),
m_display_maxx(0)
@@ -31,22 +25,18 @@ public:
// devices/pointers
required_device<cpu_device> m_maincpu;
- optional_ioport_array<11> m_inp_matrix; // max 11
+ optional_ioport_array<10> m_inp_matrix; // max 10
optional_device<s14001a_device> m_speech;
optional_region_ptr<UINT8> m_speech_rom;
- optional_device<speaker_sound_device> m_speaker;
- optional_device<generic_slot_device> m_cart;
// misc common
UINT16 m_inp_mux; // multiplexed keypad/leds mask
- UINT16 m_led_select;
- UINT16 m_7seg_data; // data for seg leds
+ UINT16 m_led_select; // 5 bit selects for 7 seg leds and for common other leds, bits are (7seg leds are 0 1 2 3, common other leds are C) 0bxx3210xc
+ UINT16 m_7seg_data; // data for seg leds
UINT16 m_led_data;
- UINT8 m_speech_data;
- UINT8 m_speech_bank; // speech rom higher address bits
+ UINT8 m_speech_bank;
UINT16 read_inputs(int columns);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(scc_cartridge);
// display common
int m_display_wait; // led/lamp off-delay in microseconds (default 33ms)
@@ -61,8 +51,7 @@ public:
TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick);
void display_update();
void set_display_size(int maxx, int maxy);
- void set_display_segmask(UINT32 digits, UINT32 mask);
- void display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety, bool update = true);
+ void display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety);
protected:
virtual void machine_start() override;
diff --git a/src/mame/includes/galpanic.h b/src/mame/includes/galpanic.h
index 0ab503e6742..788ca087540 100644
--- a/src/mame/includes/galpanic.h
+++ b/src/mame/includes/galpanic.h
@@ -10,6 +10,7 @@ public:
m_maincpu(*this, "maincpu"),
m_bgvideoram(*this, "bgvideoram"),
m_fgvideoram(*this, "fgvideoram"),
+ m_spriteram(*this, "spriteram"),
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
m_palette(*this, "palette"),
@@ -19,23 +20,23 @@ public:
required_device<cpu_device> m_maincpu;
required_shared_ptr<UINT16> m_bgvideoram;
required_shared_ptr<UINT16> m_fgvideoram;
+ bitmap_ind16 m_bitmap;
+ bitmap_ind16 m_sprites_bitmap;
+ optional_shared_ptr<UINT16> m_spriteram;
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
required_device<kaneko_pandora_device> m_pandora;
- bitmap_ind16 m_bitmap;
-
- DECLARE_WRITE16_MEMBER(m6295_bankswitch_w);
- DECLARE_WRITE16_MEMBER(coin_w);
- DECLARE_WRITE16_MEMBER(bgvideoram_w);
+ DECLARE_WRITE16_MEMBER(galpanic_6295_bankswitch_w);
+ DECLARE_WRITE16_MEMBER(galpanic_coin_w);
- virtual void machine_start() override;
- virtual void video_start() override;
+ DECLARE_VIDEO_START(galpanic);
DECLARE_PALETTE_INIT(galpanic);
-
- UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- void screen_eof(screen_device &screen, bool state);
- TIMER_DEVICE_CALLBACK_MEMBER(scanline);
+ UINT32 screen_update_galpanic(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ void screen_eof_galpanic(screen_device &screen, bool state);
+ TIMER_DEVICE_CALLBACK_MEMBER(galpanic_scanline);
void draw_fgbitmap(bitmap_ind16 &bitmap, const rectangle &cliprect);
+ /*----------- defined in video/galpanic.c -----------*/
+ DECLARE_WRITE16_MEMBER( galpanic_bgvideoram_w );
};
diff --git a/src/mame/includes/gauntlet.h b/src/mame/includes/gauntlet.h
index e14e72776a2..685021ebaa8 100644
--- a/src/mame/includes/gauntlet.h
+++ b/src/mame/includes/gauntlet.h
@@ -8,30 +8,16 @@
#include "machine/atarigen.h"
#include "video/atarimo.h"
-#include "sound/2151intf.h"
-#include "sound/pokey.h"
-#include "sound/tms5220.h"
class gauntlet_state : public atarigen_state
{
public:
gauntlet_state(const machine_config &mconfig, device_type type, const char *tag)
: atarigen_state(mconfig, type, tag),
- m_audiocpu(*this, "audiocpu"),
- m_soundcomm(*this, "soundcomm"),
- m_ym2151(*this, "ymsnd"),
- m_pokey(*this, "pokey"),
- m_tms5220(*this, "tms"),
m_playfield_tilemap(*this, "playfield"),
m_alpha_tilemap(*this, "alpha"),
m_mob(*this, "mob") { }
- required_device<cpu_device> m_audiocpu;
- required_device<atari_sound_comm_device> m_soundcomm;
- required_device<ym2151_device> m_ym2151;
- required_device<pokey_device> m_pokey;
- required_device<tms5220_device> m_tms5220;
-
required_device<tilemap_device> m_playfield_tilemap;
required_device<tilemap_device> m_alpha_tilemap;
required_device<atari_motion_objects_device> m_mob;
@@ -47,7 +33,9 @@ public:
DECLARE_WRITE8_MEMBER(sound_ctl_w);
DECLARE_WRITE8_MEMBER(mixer_w);
void swap_memory(void *ptr1, void *ptr2, int bytes);
- void common_init(int vindctr2);
+ void common_init(int slapstic, int vindctr2);
+ DECLARE_DRIVER_INIT(gauntlet2);
+ DECLARE_DRIVER_INIT(gaunt2p);
DECLARE_DRIVER_INIT(gauntlet);
DECLARE_DRIVER_INIT(vindctr2);
TILE_GET_INFO_MEMBER(get_alpha_tile_info);
diff --git a/src/mame/includes/glass.h b/src/mame/includes/glass.h
index a3ae64203f5..4fc0cbe59ee 100644
--- a/src/mame/includes/glass.h
+++ b/src/mame/includes/glass.h
@@ -11,19 +11,13 @@ class glass_state : public driver_device
public:
glass_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette"),
m_videoram(*this, "videoram"),
m_vregs(*this, "vregs"),
m_spriteram(*this, "spriteram"),
- m_mainram(*this, "mainram") { }
-
-
- /* devices */
- required_device<cpu_device> m_maincpu;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
+ m_mainram(*this, "mainram"),
+ m_maincpu(*this, "maincpu"),
+ m_gfxdecode(*this, "gfxdecode"),
+ m_palette(*this, "palette") { }
/* memory pointers */
required_shared_ptr<UINT16> m_videoram;
@@ -40,25 +34,27 @@ public:
int m_current_command;
int m_cause_interrupt;
int m_blitter_serial_buffer[5];
-
DECLARE_WRITE16_MEMBER(clr_int_w);
DECLARE_WRITE16_MEMBER(OKIM6295_bankswitch_w);
- DECLARE_WRITE16_MEMBER(coin_w);
- DECLARE_WRITE16_MEMBER(blitter_w);
- DECLARE_WRITE16_MEMBER(vram_w);
- DECLARE_READ16_MEMBER(mainram_r);
- DECLARE_WRITE16_MEMBER(mainram_w);
+ DECLARE_WRITE16_MEMBER(glass_coin_w);
+ DECLARE_WRITE16_MEMBER(glass_blitter_w);
+ DECLARE_WRITE16_MEMBER(glass_vram_w);
+
+ DECLARE_READ16_MEMBER( glass_mainram_r );
+ DECLARE_WRITE16_MEMBER( glass_mainram_w );
DECLARE_DRIVER_INIT(glass);
DECLARE_DRIVER_INIT(glassp);
+ TILE_GET_INFO_MEMBER(get_tile_info_glass_screen0);
+ TILE_GET_INFO_MEMBER(get_tile_info_glass_screen1);
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
-
- TILE_GET_INFO_MEMBER(get_tile_info_screen0);
- TILE_GET_INFO_MEMBER(get_tile_info_screen1);
- UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- INTERRUPT_GEN_MEMBER(interrupt);
+ UINT32 screen_update_glass(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(glass_interrupt);
void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
- void ROM16_split_gfx( const char *src_reg, const char *dst_reg, int start, int length, int dest1, int dest2 );
+ void glass_ROM16_split_gfx( const char *src_reg, const char *dst_reg, int start, int length, int dest1, int dest2 );
+ required_device<cpu_device> m_maincpu;
+ required_device<gfxdecode_device> m_gfxdecode;
+ required_device<palette_device> m_palette;
};
diff --git a/src/mame/includes/hh_tms1k.h b/src/mame/includes/hh_tms1k.h
index fc05dc3baf9..4a7ccb99467 100644
--- a/src/mame/includes/hh_tms1k.h
+++ b/src/mame/includes/hh_tms1k.h
@@ -41,7 +41,6 @@ public:
bool m_power_led;
UINT8 read_inputs(int columns);
- UINT8 read_rotated_inputs(int columns, UINT8 rowmask = 0xf);
virtual DECLARE_INPUT_CHANGED_MEMBER(power_button);
virtual DECLARE_WRITE_LINE_MEMBER(auto_power_off);
@@ -61,8 +60,8 @@ public:
TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick);
void display_update();
void set_display_size(int maxx, int maxy);
- void set_display_segmask(UINT32 digits, UINT32 mask);
- void display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety, bool update = true);
+ void display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety);
+ void display_matrix_seg(int maxx, int maxy, UINT32 setx, UINT32 sety, UINT16 segmask);
protected:
virtual void machine_start() override;
diff --git a/src/mame/includes/hh_ucom4.h b/src/mame/includes/hh_ucom4.h
index 36a525254b6..76b3a5d7a02 100644
--- a/src/mame/includes/hh_ucom4.h
+++ b/src/mame/includes/hh_ucom4.h
@@ -55,7 +55,7 @@ public:
TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick);
void display_update();
void set_display_size(int maxx, int maxy);
- void display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety, bool update = true);
+ void display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety);
protected:
virtual void machine_start() override;
diff --git a/src/mame/includes/laserbat.h b/src/mame/includes/laserbat.h
index e3b130a109d..f50cd4e1bd9 100644
--- a/src/mame/includes/laserbat.h
+++ b/src/mame/includes/laserbat.h
@@ -6,8 +6,6 @@
*************************************************************************/
-#include "audio/zaccaria.h"
-
#include "machine/6821pia.h"
#include "machine/pla.h"
#include "machine/s2636.h"
@@ -67,6 +65,9 @@ public:
DECLARE_DRIVER_INIT(laserbat);
INTERRUPT_GEN_MEMBER(laserbat_interrupt);
+ // video initialisation
+ DECLARE_PALETTE_INIT(laserbat);
+
// video memory and control ports
DECLARE_WRITE8_MEMBER(videoram_w);
DECLARE_WRITE8_MEMBER(wcoh_w);
@@ -161,9 +162,6 @@ public:
{
}
- // video initialisation
- DECLARE_PALETTE_INIT(laserbat);
-
// sound control ports
virtual DECLARE_WRITE8_MEMBER(csound2_w) override;
@@ -187,17 +185,43 @@ class catnmous_state : public laserbat_state_base
public:
catnmous_state(const machine_config &mconfig, device_type type, const char *tag)
: laserbat_state_base(mconfig, type, tag)
- , m_audiopcb(*this, "audiopcb")
+ , m_audiocpu(*this, "audiocpu")
+ , m_pia(*this, "pia")
+ , m_psg1(*this, "psg1")
+ , m_psg2(*this, "psg2")
+ , m_cb1(false)
{
}
- // video initialisation
- DECLARE_PALETTE_INIT(catnmous);
-
// sound control ports
virtual DECLARE_WRITE8_MEMBER(csound1_w) override;
virtual DECLARE_WRITE8_MEMBER(csound2_w) override;
+ // PIA handlers
+ DECLARE_READ8_MEMBER(pia_porta_r);
+ DECLARE_WRITE8_MEMBER(pia_porta_w);
+ DECLARE_WRITE8_MEMBER(pia_portb_w);
+ DECLARE_WRITE_LINE_MEMBER(pia_irqa);
+ DECLARE_WRITE_LINE_MEMBER(pia_irqb);
+
+ // PSG handlers
+ DECLARE_WRITE8_MEMBER(psg1_porta_w);
+ DECLARE_READ8_MEMBER(psg1_portb_r);
+
+ // periodic signal generators
+ INTERRUPT_GEN_MEMBER(cb1_toggle);
+
protected:
- required_device<zac1b11107_audio_device> m_audiopcb;
+
+ // initialisation/startup
+ virtual void machine_start() override;
+
+ // sound board devices
+ required_device<cpu_device> m_audiocpu;
+ required_device<pia6821_device> m_pia;
+ required_device<ay8910_device> m_psg1;
+ required_device<ay8910_device> m_psg2;
+
+ // control line states
+ bool m_cb1;
};
diff --git a/src/mame/includes/m5.h b/src/mame/includes/m5.h
index 9b5d82b0c00..7ba55be8172 100644
--- a/src/mame/includes/m5.h
+++ b/src/mame/includes/m5.h
@@ -1,12 +1,9 @@
// license:BSD-3-Clause
-// copyright-holders:Curt Coder, Ales Dlabac
+// copyright-holders:Curt Coder
#ifndef __M5__
#define __M5__
-
#include "machine/z80ctc.h"
-#include "imagedev/snapquik.h"
-
#define Z80_TAG "ic17"
#define Z80CTC_TAG "ic19"
@@ -18,10 +15,6 @@
#define UPD765_TAG "upd765"
#define CENTRONICS_TAG "centronics"
#define SCREEN_TAG "screen"
-//brno mod
-#define WD2797_TAG "5f"
-#define RAMDISK "ramdisk"
-
class m5_state : public driver_device
{
@@ -29,40 +22,36 @@ public:
m5_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, Z80_TAG),
- m_ctc(*this, Z80CTC_TAG),
m_fd5cpu(*this, Z80_FD5_TAG),
+ m_ctc(*this, Z80CTC_TAG),
m_ppi(*this, I8255A_TAG),
m_fdc(*this, UPD765_TAG),
- m_floppy0(*this, UPD765_TAG ":0:525dd"),
m_cassette(*this, "cassette"),
- m_cart1(*this, "cartslot1"),
- m_cart2(*this, "cartslot2"),
+ m_cart(*this, "cartslot"),
m_centronics(*this, CENTRONICS_TAG),
m_ram(*this, RAM_TAG),
- m_reset(*this, "RESET"),
- m_DIPS(*this, "DIPS")
+ m_floppy0(*this, UPD765_TAG ":0:525dd"),
+ m_reset(*this, "RESET")
{ }
required_device<cpu_device> m_maincpu;
+ required_device<cpu_device> m_fd5cpu;
required_device<z80ctc_device> m_ctc;
- //I've changed following devices to optional since we have to remove them in BRNO mod (I don't know better solution)
- optional_device<cpu_device> m_fd5cpu;
- optional_device<i8255_device> m_ppi;
- optional_device<upd765a_device> m_fdc;
- optional_device<floppy_image_device> m_floppy0;
+ required_device<i8255_device> m_ppi;
+ required_device<upd765a_device> m_fdc;
required_device<cassette_image_device> m_cassette;
- optional_device<m5_cart_slot_device> m_cart1;
- optional_device<m5_cart_slot_device> m_cart2;
+ required_device<generic_slot_device> m_cart;
required_device<centronics_device> m_centronics;
required_device<ram_device> m_ram;
+ required_device<floppy_image_device> m_floppy0;
required_ioport m_reset;
- optional_ioport m_DIPS;
virtual void machine_start() override;
virtual void machine_reset() override;
DECLARE_READ8_MEMBER( sts_r );
DECLARE_WRITE8_MEMBER( com_w );
+
DECLARE_READ8_MEMBER( ppi_pa_r );
DECLARE_WRITE8_MEMBER( ppi_pa_w );
DECLARE_WRITE8_MEMBER( ppi_pb_w );
@@ -76,90 +65,23 @@ public:
DECLARE_WRITE8_MEMBER( fd5_ctrl_w );
DECLARE_WRITE8_MEMBER( fd5_tc_w );
- DECLARE_FLOPPY_FORMATS( floppy_formats );
-
// video state
// const TMS9928a_interface *m_vdp_intf;
int m_centronics_busy;
DECLARE_WRITE_LINE_MEMBER(write_centronics_busy);
- DECLARE_DRIVER_INIT(pal);
- DECLARE_DRIVER_INIT(ntsc);
- DECLARE_WRITE_LINE_MEMBER(sordm5_video_interrupt_callback);
-
- // memory
- DECLARE_READ8_MEMBER( mem64KBI_r );
- DECLARE_WRITE8_MEMBER( mem64KBI_w );
- DECLARE_WRITE8_MEMBER( mem64KBF_w );
- DECLARE_WRITE8_MEMBER( mem64KRX_w );
- UINT8 m_ram_mode;
- UINT8 m_ram_type;
- memory_region *m_cart_rom;
- m5_cart_slot_device *m_cart_ram, *m_cart;
-
- // floppy state for fd5
+ // floppy state
UINT8 m_fd5_data;
UINT8 m_fd5_com;
int m_intra;
int m_ibfa;
int m_obfa;
+ DECLARE_DRIVER_INIT(pal);
+ DECLARE_DRIVER_INIT(ntsc);
+ DECLARE_WRITE_LINE_MEMBER(sordm5_video_interrupt_callback);
-};
-
-
-class brno_state : public m5_state
-{
-public:
- brno_state(const machine_config &mconfig, device_type type, const char *tag)
- : m5_state(mconfig, type, tag),
-
- m_fdc(*this, WD2797_TAG),
- m_floppy0(*this, WD2797_TAG":0"),
- m_floppy1(*this, WD2797_TAG":1")
- // m_ramdisk(*this, RAMDISK)
- { }
-
-
- required_device<wd2797_t> m_fdc;
- required_device<floppy_connector> m_floppy0;
- optional_device<floppy_connector> m_floppy1;
- floppy_image_device *m_floppy;
-
-
-
- DECLARE_READ8_MEMBER( mmu_r );
- DECLARE_WRITE8_MEMBER( mmu_w );
- DECLARE_READ8_MEMBER( ramsel_r );
- DECLARE_WRITE8_MEMBER(ramsel_w );
- DECLARE_READ8_MEMBER( romsel_r );
- DECLARE_WRITE8_MEMBER(romsel_w );
-
- DECLARE_READ8_MEMBER( fd_r );
- DECLARE_WRITE8_MEMBER( fd_w );
DECLARE_FLOPPY_FORMATS( floppy_formats );
-
-
-// DECLARE_WRITE_LINE_MEMBER( wd2797_intrq_w );
-// DECLARE_WRITE_LINE_MEMBER( wd2797_drq_w );
-// DECLARE_WRITE_LINE_MEMBER( wd2797_index_callback);
-
- //required_device<ram_device> m_ramdisk;
- DECLARE_DRIVER_INIT(brno);
- DECLARE_SNAPSHOT_LOAD_MEMBER( brno );
-// DECLARE_DEVICE_IMAGE_LOAD_MEMBER(m5_cart);
-
-
- virtual void machine_start() override;
- virtual void machine_reset() override;
-
- UINT8 m_rambank; // bank #
- UINT8 m_ramcpu; //where Ramdisk bank is mapped
- bool m_romen;
- bool m_ramen;
-
-
- UINT8 m_rammap[16]; // memory map
};
#endif
diff --git a/src/mame/includes/maygay1b.h b/src/mame/includes/maygay1b.h
index 142c71ae407..b76f3192a33 100644
--- a/src/mame/includes/maygay1b.h
+++ b/src/mame/includes/maygay1b.h
@@ -53,8 +53,7 @@ public:
m_reel3(*this, "reel3"),
m_reel4(*this, "reel4"),
m_reel5(*this, "reel5"),
- m_meters(*this, "meters"),
- m_oki_region(*this, "msm6376")
+ m_meters(*this, "meters")
{}
required_device<cpu_device> m_maincpu;
@@ -80,7 +79,6 @@ public:
required_device<stepper_device> m_reel4;
required_device<stepper_device> m_reel5;
required_device<meters_device> m_meters;
- optional_region_ptr<UINT8> m_oki_region;
UINT8 m_lamppos;
int m_lamp_strobe;
diff --git a/src/mame/includes/megasys1.h b/src/mame/includes/megasys1.h
index 65694249f8f..414b670cc36 100644
--- a/src/mame/includes/megasys1.h
+++ b/src/mame/includes/megasys1.h
@@ -65,8 +65,8 @@ public:
bitmap_ind16 m_sprite_buffer_bitmap;
UINT16 *m_spriteram;
- UINT16 m_ip_select_values[7];
- UINT16 m_ip_latched;
+ UINT16 m_ip_select;
+ UINT16 m_ip_select_values[5];
UINT8 m_ignore_oki_status;
UINT16 m_protection_val;
int m_scrollx[3];
diff --git a/src/mame/includes/overdriv.h b/src/mame/includes/overdriv.h
index 9b5cc1b2cd2..ad0cceba7a7 100644
--- a/src/mame/includes/overdriv.h
+++ b/src/mame/includes/overdriv.h
@@ -24,6 +24,7 @@ public:
m_k053246(*this, "k053246"),
m_k053251(*this, "k053251"),
m_k053252(*this, "k053252"),
+ m_sprram(*this, "sprram"),
m_screen(*this, "screen")
{ }
@@ -44,25 +45,22 @@ public:
required_device<k053247_device> m_k053246;
required_device<k053251_device> m_k053251;
required_device<k053252_device> m_k053252;
+ required_shared_ptr<UINT16> m_sprram;
required_device<screen_device> m_screen;
DECLARE_WRITE16_MEMBER(eeprom_w);
DECLARE_WRITE16_MEMBER(cpuA_ctrl_w);
DECLARE_READ16_MEMBER(cpuB_ctrl_r);
DECLARE_WRITE16_MEMBER(cpuB_ctrl_w);
DECLARE_WRITE16_MEMBER(overdriv_soundirq_w);
- DECLARE_WRITE8_MEMBER(sound_ack_w);
- DECLARE_WRITE16_MEMBER(slave_irq4_assert_w);
- DECLARE_WRITE16_MEMBER(slave_irq5_assert_w);
- DECLARE_WRITE16_MEMBER(objdma_w);
- TIMER_CALLBACK_MEMBER(objdma_end_cb);
-
+ DECLARE_WRITE16_MEMBER(overdriv_cpuB_irq_x_w);
+ DECLARE_WRITE16_MEMBER(overdriv_cpuB_irq_y_w);
virtual void machine_start() override;
virtual void machine_reset() override;
UINT32 screen_update_overdriv(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- //INTERRUPT_GEN_MEMBER(cpuB_interrupt);
+ INTERRUPT_GEN_MEMBER(cpuB_interrupt);
TIMER_DEVICE_CALLBACK_MEMBER(overdriv_cpuA_scanline);
- int m_fake_timer;
-
+
+ DECLARE_WRITE16_MEMBER( overdriv_k053246_word_w );
K051316_CB_MEMBER(zoom_callback_1);
K051316_CB_MEMBER(zoom_callback_2);
K053246_CB_MEMBER(sprite_callback);
diff --git a/src/mame/includes/punchout.h b/src/mame/includes/punchout.h
index 874b31678d1..b8e3bf4cd43 100644
--- a/src/mame/includes/punchout.h
+++ b/src/mame/includes/punchout.h
@@ -60,8 +60,6 @@ public:
DECLARE_WRITE8_MEMBER(punchout_2a03_reset_w);
DECLARE_READ8_MEMBER(spunchout_exp_r);
DECLARE_WRITE8_MEMBER(spunchout_exp_w);
- DECLARE_WRITE8_MEMBER(spunchout_rp5h01_reset_w);
- DECLARE_WRITE8_MEMBER(spunchout_rp5h01_clock_w);
DECLARE_WRITE8_MEMBER(nmi_mask_w);
DECLARE_WRITE8_MEMBER(punchout_bg_top_videoram_w);
DECLARE_WRITE8_MEMBER(punchout_bg_bot_videoram_w);
diff --git a/src/mame/includes/rampart.h b/src/mame/includes/rampart.h
index 964befa8056..d7e62bc9b39 100644
--- a/src/mame/includes/rampart.h
+++ b/src/mame/includes/rampart.h
@@ -8,7 +8,6 @@
#include "machine/atarigen.h"
#include "sound/okim6295.h"
-#include "sound/2413intf.h"
#include "video/atarimo.h"
class rampart_state : public atarigen_state
@@ -18,12 +17,10 @@ public:
: atarigen_state(mconfig, type, tag),
m_mob(*this, "mob"),
m_oki(*this, "oki"),
- m_ym2413(*this, "ymsnd"),
m_bitmap(*this, "bitmap") { }
required_device<atari_motion_objects_device> m_mob;
required_device<okim6295_device> m_oki;
- required_device<ym2413_device> m_ym2413;
required_shared_ptr<UINT16> m_bitmap;
diff --git a/src/mame/includes/relief.h b/src/mame/includes/relief.h
index 7d80ef07569..cae4ad37e3d 100644
--- a/src/mame/includes/relief.h
+++ b/src/mame/includes/relief.h
@@ -8,8 +8,6 @@
#include "machine/atarigen.h"
#include "video/atarimo.h"
-#include "sound/okim6295.h"
-#include "sound/2413intf.h"
class relief_state : public atarigen_state
{
@@ -17,14 +15,10 @@ public:
relief_state(const machine_config &mconfig, device_type type, const char *tag)
: atarigen_state(mconfig, type, tag),
m_vad(*this, "vad"),
- m_oki(*this, "oki"),
- m_ym2413(*this, "ymsnd"),
m_okibank(*this, "okibank")
{ }
required_device<atari_vad_device> m_vad;
- required_device<okim6295_device> m_oki;
- required_device<ym2413_device> m_ym2413;
required_memory_bank m_okibank;
UINT8 m_ym2413_volume;
diff --git a/src/mame/includes/slapstic.h b/src/mame/includes/slapstic.h
index 27328fc4c04..cfcfcce890e 100644
--- a/src/mame/includes/slapstic.h
+++ b/src/mame/includes/slapstic.h
@@ -23,9 +23,8 @@
extern const device_type SLAPSTIC;
-#define MCFG_SLAPSTIC_ADD(_tag, _chip) \
- MCFG_DEVICE_ADD(_tag, SLAPSTIC, 0) \
- MCFG_SLAPSTIC_NUM(_chip)
+#define MCFG_SLAPSTIC_ADD(_tag) \
+ MCFG_DEVICE_ADD(_tag, SLAPSTIC, 0)
/*************************************
@@ -124,9 +123,6 @@ enum
};
-#define MCFG_SLAPSTIC_NUM(_chipnum) \
- atari_slapstic_device::static_set_chipnum(*device, _chipnum);
-
#define MCFG_SLAPSTIC_68K_ACCESS(_type) \
atari_slapstic_device::static_set_access68k(*device, _type);
@@ -138,10 +134,10 @@ public:
// construction/destruction
atari_slapstic_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- void slapstic_init();
- void slapstic_reset();
+ void slapstic_init(running_machine &machine, int chip);
+ void slapstic_reset(void);
- int slapstic_bank();
+ int slapstic_bank(void);
int slapstic_tweak(address_space &space, offs_t offset);
int alt2_kludge(address_space &space, offs_t offset);
@@ -152,13 +148,6 @@ public:
dev.access_68k = type;
}
- static void static_set_chipnum(device_t &device, int chipnum)
- {
- atari_slapstic_device &dev = downcast<atari_slapstic_device &>(device);
- dev.m_chipnum = chipnum;
- }
-
- int m_chipnum;
UINT8 state;
UINT8 current_bank;
@@ -179,7 +168,6 @@ public:
protected:
virtual void device_start() override;
virtual void device_reset() override;
- virtual void device_validity_check(validity_checker &valid) const override;
private:
diff --git a/src/mame/includes/snk.h b/src/mame/includes/snk.h
index 81744602a36..7e6469d6f3b 100644
--- a/src/mame/includes/snk.h
+++ b/src/mame/includes/snk.h
@@ -185,7 +185,6 @@ public:
UINT32 screen_update_ikari(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_gwar(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_tdfever(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- UINT32 screen_update_fitegolf2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
TIMER_CALLBACK_MEMBER(sgladiat_sndirq_update_callback);
TIMER_CALLBACK_MEMBER(sndirq_update_callback);
DECLARE_WRITE_LINE_MEMBER(ymirq_callback_2);
diff --git a/src/mame/includes/xbox.h b/src/mame/includes/xbox.h
index 8094ac33100..ea4db5c7db4 100644
--- a/src/mame/includes/xbox.h
+++ b/src/mame/includes/xbox.h
@@ -111,7 +111,7 @@ struct USBSetupPacket {
UINT16 wLength;
};
-struct USBStandardDeviceDescriptor {
+struct USBStandardDeviceDscriptor {
UINT8 bLength;
UINT8 bDescriptorType;
UINT16 bcdUSB;
@@ -188,52 +188,20 @@ enum USBDescriptorType {
ENDPOINT=5
};
-enum USBRequestType
-{
- StandardType=0,
- ClassType,
- VendorType,
- ReservedType
-};
-
-enum USBRequestRecipient
-{
- DeviceRecipient=0,
- InterfaceRecipient,
- EndpointRecipient,
- OtherRecipient
-};
-
-enum USBDeviceState
-{
- DefaultState,
- AddressState,
- ConfiguredState
-};
-
class ohci_function_device {
public:
- ohci_function_device(running_machine &machine);
+ ohci_function_device();
void execute_reset();
int execute_transfer(int address, int endpoint, int pid, UINT8 *buffer, int size);
private:
- void add_device_descriptor(USBStandardDeviceDescriptor &descriptor);
- void add_configuration_descriptor(USBStandardConfigurationDescriptor &descriptor);
- void add_interface_descriptor(USBStandardInterfaceDescriptor &descriptor);
- void add_endpoint_descriptor(USBStandardEndpointDescriptor &descriptor);
- int handle_nonstandard_request(USBSetupPacket *setup);
- int state;
int address;
int newaddress;
int controldirection;
int controltype;
int controlrecipient;
- int configurationvalue;
bool settingaddress;
int remain;
UINT8 *position;
- UINT8 *descriptors;
- int descriptors_pos;
};
class xbox_base_state : public driver_device
diff --git a/src/mame/includes/zaccaria.h b/src/mame/includes/zaccaria.h
index 6bcfa72798d..8371e6b6fb0 100644
--- a/src/mame/includes/zaccaria.h
+++ b/src/mame/includes/zaccaria.h
@@ -1,25 +1,60 @@
// license:BSD-3-Clause
// copyright-holders:Nicola Salmoria
-#include "emu.h"
-#include "audio/zaccaria.h"
+#include "machine/6821pia.h"
+#include "sound/ay8910.h"
+#include "sound/tms5220.h"
class zaccaria_state : public driver_device
{
public:
zaccaria_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag)
- , m_maincpu(*this, "maincpu")
- , m_gfxdecode(*this, "gfxdecode")
- , m_palette(*this, "palette")
- , m_audiopcb(*this, "audiopcb")
- , m_videoram(*this, "videoram")
- , m_attributesram(*this, "attributesram")
- , m_spriteram(*this, "spriteram")
- , m_spriteram2(*this, "spriteram2")
- , m_dsw_port(*this, "DSW")
- { }
+ : driver_device(mconfig, type, tag),
+ m_maincpu(*this, "maincpu"),
+ m_audio2(*this, "audio2"),
+ m_pia0(*this, "pia0"),
+ m_ay1(*this, "ay1"),
+ m_ay2(*this, "ay2"),
+ m_tms(*this, "tms"),
+ m_gfxdecode(*this, "gfxdecode"),
+ m_palette(*this, "palette"),
+ m_videoram(*this, "videoram"),
+ m_attributesram(*this, "attributesram"),
+ m_spriteram(*this, "spriteram"),
+ m_spriteram2(*this, "spriteram2"),
+ m_dsw_port(*this, "DSW") { }
+
+
+
+ /* devices */
+ required_device<cpu_device> m_maincpu;
+ required_device<cpu_device> m_audio2;
+ required_device<pia6821_device> m_pia0;
+ required_device<ay8910_device> m_ay1;
+ required_device<ay8910_device> m_ay2;
+ required_device<tms5220_device> m_tms;
+ required_device<gfxdecode_device> m_gfxdecode;
+ required_device<palette_device> m_palette;
+
+ /* memory pointers */
+ required_shared_ptr<UINT8> m_videoram;
+ required_shared_ptr<UINT8> m_attributesram;
+ required_shared_ptr<UINT8> m_spriteram;
+ required_shared_ptr<UINT8> m_spriteram2;
+
+ required_ioport_array<3> m_dsw_port;
+
+ int m_dsw_sel;
+ int m_active_8910;
+ int m_port0a;
+ int m_acs;
+ int m_last_port0b;
+ int m_toggle;
+ tilemap_t *m_bg_tilemap;
+ UINT8 m_nmi_mask;
DECLARE_READ8_MEMBER(dsw_r);
+ DECLARE_WRITE8_MEMBER(sound_command_w);
+ DECLARE_WRITE8_MEMBER(sound1_command_w);
DECLARE_READ8_MEMBER(prot1_r);
DECLARE_READ8_MEMBER(prot2_r);
DECLARE_WRITE8_MEMBER(coin_w);
@@ -28,31 +63,20 @@ public:
DECLARE_WRITE8_MEMBER(attributes_w);
DECLARE_WRITE8_MEMBER(flip_screen_x_w);
DECLARE_WRITE8_MEMBER(flip_screen_y_w);
- DECLARE_WRITE8_MEMBER(ressound_w);
+ DECLARE_CUSTOM_INPUT_MEMBER(acs_r);
DECLARE_WRITE8_MEMBER(dsw_sel_w);
+ DECLARE_WRITE8_MEMBER(ay8910_port0a_w);
+ DECLARE_READ8_MEMBER(port0a_r);
+ DECLARE_WRITE8_MEMBER(port0a_w);
+ DECLARE_WRITE8_MEMBER(port0b_w);
+ DECLARE_WRITE8_MEMBER(port1b_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(zaccaria);
UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(cb1_toggle);
INTERRUPT_GEN_MEMBER(vblank_irq);
void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect,UINT8 *spriteram,int color,int section);
-
-protected:
- required_device<cpu_device> m_maincpu;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
- required_device<zac1b11142_audio_device> m_audiopcb;
-
- required_shared_ptr<UINT8> m_videoram;
- required_shared_ptr<UINT8> m_attributesram;
- required_shared_ptr<UINT8> m_spriteram;
- required_shared_ptr<UINT8> m_spriteram2;
-
- required_ioport_array<3> m_dsw_port;
-
- int m_dsw_sel;
- tilemap_t *m_bg_tilemap;
- UINT8 m_nmi_mask;
};
diff --git a/src/mame/layout/cnfball2.lay b/src/mame/layout/cnfball2.lay
deleted file mode 100644
index 6f643de070b..00000000000
--- a/src/mame/layout/cnfball2.lay
+++ /dev/null
@@ -1,185 +0,0 @@
-<?xml version="1.0"?>
-<mamelayout version="2">
-
-<!-- define elements -->
-
- <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
- <element name="static_white"><rect><color red="0.8" green="0.8" blue="0.8" /></rect></element>
- <element name="static_green"><rect><color red="0.1" green="0.5" blue="0.2" /></rect></element>
-
- <element name="text_down">
- <rect><color red="0.1" green="0.5" blue="0.2" /></rect>
- <text string="DOWN"><color red="0.8" green="0.8" blue="0.8" /></text>
- </element>
- <element name="text_home">
- <rect><color red="0.1" green="0.5" blue="0.2" /></rect>
- <text string="HOME"><color red="0.8" green="0.8" blue="0.8" /></text>
- </element>
- <element name="text_yards">
- <rect><color red="0.1" green="0.5" blue="0.2" /></rect>
- <text string="YARDS TO GO"><color red="0.8" green="0.8" blue="0.8" /></text>
- </element>
- <element name="text_time">
- <rect><color red="0.1" green="0.5" blue="0.2" /></rect>
- <text string="TIME REMAINING"><color red="0.8" green="0.8" blue="0.8" /></text>
- </element>
- <element name="text_field">
- <rect><color red="0.1" green="0.5" blue="0.2" /></rect>
- <text string="FIELD POSITION"><color red="0.8" green="0.8" blue="0.8" /></text>
- </element>
- <element name="text_visitor">
- <rect><color red="0.1" green="0.5" blue="0.2" /></rect>
- <text string="VISITOR"><color red="0.8" green="0.8" blue="0.8" /></text>
- </element>
-
- <element name="text_p1">
- <rect><color red="0.06" green="0.3" blue="0.12" /></rect>
- <text string="PL SEL:">
- <bounds x="0.0" y="0.17" width="1.0" height="0.6" />
- <color red="0.7" green="0.7" blue="0.8" />
- </text>
- </element>
- <element name="text_p2" defstate="0">
- <rect><color red="0.06" green="0.3" blue="0.12" /></rect>
- <text state="0" string="RUN">
- <bounds x="0.0" y="0.17" width="1.0" height="0.6" />
- <color red="0.82" green="0.82" blue="0.82" />
- </text>
- <text state="1" string="PASS">
- <bounds x="0.0" y="0.17" width="1.0" height="0.6" />
- <color red="0.82" green="0.82" blue="0.82" />
- </text>
- </element>
-
- <element name="digit" defstate="0">
- <led7seg><color red="1.0" green="0.25" blue="0.26" /></led7seg>
- </element>
- <element name="seg" defstate="0">
- <rect state="0"><color red="0.13" green="0.0325" blue="0.0338" /></rect>
- <rect state="1"><color red="1.0" green="0.25" blue="0.26" /></rect>
- </element>
-
-
-<!-- build screen -->
-
- <view name="Internal Layout">
- <bounds left="-9" right="393" top="-104" bottom="186" />
- <bezel element="static_black">
- <bounds left="-9" right="393" top="-104" bottom="186" />
- </bezel>
-
- <!-- bezel -->
-
- <bezel element="static_green"><bounds left="-9" right="393" top="-110" bottom="-60" /></bezel>
- <bezel element="static_green"><bounds left="-9" right="393" top="111" bottom="200" /></bezel>
-
- <bezel element="static_white"><bounds x="-10" y="-84" width="404" height="3" /></bezel>
- <bezel element="text_down"><bounds x="5" y="-92" width="66" height="19" /></bezel>
- <bezel element="text_field"><bounds x="122" y="-92" width="140" height="19" /></bezel>
- <bezel element="text_yards"><bounds x="286" y="-92" width="111" height="19" /></bezel>
-
- <bezel element="static_white"><bounds x="-10" y="141" width="404" height="3" /></bezel>
- <bezel element="text_home"><bounds x="5" y="133" width="66" height="19" /></bezel>
- <bezel element="text_time"><bounds x="122" y="133" width="140" height="19" /></bezel>
- <bezel element="text_visitor"><bounds x="306" y="133" width="80" height="19" /></bezel>
-
- <bezel element="text_p1"><bounds x="316" y="161" width="40" height="16" /></bezel>
- <bezel element="text_p2" inputtag="IN.0" inputmask="0x04">
- <bounds x="354" y="161" width="35" height="16" />
- </bezel>
-
- <bezel element="static_white"><bounds left="-9" right="393" top="-61" bottom="-51" /></bezel>
- <bezel element="static_white"><bounds left="-9" right="393" top="110" bottom="120" /></bezel>
-
- <bezel element="static_white"><bounds x="-9" y="-52" width="4" height="163" /></bezel>
- <bezel element="static_white"><bounds x="37" y="-52" width="2" height="163" /></bezel>
- <bezel element="static_white"><bounds x="81" y="-52" width="2" height="163" /></bezel>
- <bezel element="static_white"><bounds x="125" y="-52" width="2" height="163" /></bezel>
- <bezel element="static_white"><bounds x="169" y="-52" width="2" height="163" /></bezel>
- <bezel element="static_white"><bounds x="213" y="-52" width="2" height="163" /></bezel>
- <bezel element="static_white"><bounds x="257" y="-52" width="2" height="163" /></bezel>
- <bezel element="static_white"><bounds x="301" y="-52" width="2" height="163" /></bezel>
- <bezel element="static_white"><bounds x="345" y="-52" width="2" height="163" /></bezel>
- <bezel element="static_white"><bounds x="389" y="-52" width="4" height="163" /></bezel>
-
- <bezel element="static_white"><bounds x="-8" y="2" width="4" height="1" /></bezel>
- <bezel element="static_white"><bounds x="-8" y="29" width="4" height="1" /></bezel>
- <bezel element="static_white"><bounds x="-8" y="56" width="4" height="1" /></bezel>
-
- <bezel element="static_white"><bounds x="36" y="2" width="4" height="1" /></bezel>
- <bezel element="static_white"><bounds x="36" y="29" width="4" height="1" /></bezel>
- <bezel element="static_white"><bounds x="36" y="56" width="4" height="1" /></bezel>
-
- <bezel element="static_white"><bounds x="80" y="2" width="4" height="1" /></bezel>
- <bezel element="static_white"><bounds x="80" y="29" width="4" height="1" /></bezel>
- <bezel element="static_white"><bounds x="80" y="56" width="4" height="1" /></bezel>
-
- <bezel element="static_white"><bounds x="124" y="2" width="4" height="1" /></bezel>
- <bezel element="static_white"><bounds x="124" y="29" width="4" height="1" /></bezel>
- <bezel element="static_white"><bounds x="124" y="56" width="4" height="1" /></bezel>
-
- <bezel element="static_white"><bounds x="168" y="2" width="4" height="1" /></bezel>
- <bezel element="static_white"><bounds x="168" y="29" width="4" height="1" /></bezel>
- <bezel element="static_white"><bounds x="168" y="56" width="4" height="1" /></bezel>
-
- <bezel element="static_white"><bounds x="212" y="2" width="4" height="1" /></bezel>
- <bezel element="static_white"><bounds x="212" y="29" width="4" height="1" /></bezel>
- <bezel element="static_white"><bounds x="212" y="56" width="4" height="1" /></bezel>
-
- <bezel element="static_white"><bounds x="256" y="2" width="4" height="1" /></bezel>
- <bezel element="static_white"><bounds x="256" y="29" width="4" height="1" /></bezel>
- <bezel element="static_white"><bounds x="256" y="56" width="4" height="1" /></bezel>
-
- <bezel element="static_white"><bounds x="300" y="2" width="4" height="1" /></bezel>
- <bezel element="static_white"><bounds x="300" y="29" width="4" height="1" /></bezel>
- <bezel element="static_white"><bounds x="300" y="56" width="4" height="1" /></bezel>
-
- <bezel element="static_white"><bounds x="344" y="2" width="4" height="1" /></bezel>
- <bezel element="static_white"><bounds x="344" y="29" width="4" height="1" /></bezel>
- <bezel element="static_white"><bounds x="344" y="56" width="4" height="1" /></bezel>
-
- <bezel element="static_white"><bounds x="388" y="2" width="4" height="1" /></bezel>
- <bezel element="static_white"><bounds x="388" y="29" width="4" height="1" /></bezel>
- <bezel element="static_white"><bounds x="388" y="56" width="4" height="1" /></bezel>
-
- <!-- leds -->
-
- <bezel name="digit8" element="digit"><bounds x="3" y="-15.5" width="24" height="32" /></bezel>
- <bezel name="8.8" element="seg"><bounds x="7" y="42.5" width="15" height="3" /></bezel>
- <bezel name="8.9" element="seg"><bounds x="7" y="71.5" width="15" height="3" /></bezel>
-
- <bezel name="digit7" element="digit"><bounds x="47" y="-15.5" width="24" height="32" /></bezel>
- <bezel name="7.8" element="seg"><bounds x="51" y="42.5" width="15" height="3" /></bezel>
- <bezel name="7.9" element="seg"><bounds x="51" y="71.5" width="15" height="3" /></bezel>
-
- <bezel name="digit6" element="digit"><bounds x="91" y="-15.5" width="24" height="32" /></bezel>
- <bezel name="6.8" element="seg"><bounds x="95" y="42.5" width="15" height="3" /></bezel>
- <bezel name="6.9" element="seg"><bounds x="95" y="71.5" width="15" height="3" /></bezel>
-
- <bezel name="digit5" element="digit"><bounds x="135" y="-15.5" width="24" height="32" /></bezel>
- <bezel name="5.8" element="seg"><bounds x="139" y="42.5" width="15" height="3" /></bezel>
- <bezel name="5.9" element="seg"><bounds x="139" y="71.5" width="15" height="3" /></bezel>
-
- <bezel name="digit4" element="digit"><bounds x="179" y="-15.5" width="24" height="32" /></bezel>
- <bezel name="4.8" element="seg"><bounds x="183" y="42.5" width="15" height="3" /></bezel>
- <bezel name="4.9" element="seg"><bounds x="183" y="71.5" width="15" height="3" /></bezel>
-
- <bezel name="digit3" element="digit"><bounds x="223" y="-15.5" width="24" height="32" /></bezel>
- <bezel name="3.8" element="seg"><bounds x="227" y="42.5" width="15" height="3" /></bezel>
- <bezel name="3.9" element="seg"><bounds x="227" y="71.5" width="15" height="3" /></bezel>
-
- <bezel name="digit2" element="digit"><bounds x="267" y="-15.5" width="24" height="32" /></bezel>
- <bezel name="2.8" element="seg"><bounds x="271" y="42.5" width="15" height="3" /></bezel>
- <bezel name="2.9" element="seg"><bounds x="271" y="71.5" width="15" height="3" /></bezel>
-
- <bezel name="digit1" element="digit"><bounds x="311" y="-15.5" width="24" height="32" /></bezel>
- <bezel name="1.8" element="seg"><bounds x="315" y="42.5" width="15" height="3" /></bezel>
- <bezel name="1.9" element="seg"><bounds x="315" y="71.5" width="15" height="3" /></bezel>
-
- <bezel name="digit0" element="digit"><bounds x="355" y="-15.5" width="24" height="32" /></bezel>
- <bezel name="0.8" element="seg"><bounds x="359" y="42.5" width="15" height="3" /></bezel>
- <bezel name="0.9" element="seg"><bounds x="359" y="71.5" width="15" height="3" /></bezel>
-
-
- </view>
-</mamelayout>
diff --git a/src/mame/layout/cnsector.lay b/src/mame/layout/cnsector.lay
index 730e02c3d06..5bd9aaa0d48 100644
--- a/src/mame/layout/cnsector.lay
+++ b/src/mame/layout/cnsector.lay
@@ -12,7 +12,7 @@
<led7seg><color red="1.0" green="0.25" blue="0.20" /></led7seg>
</element>
- <element name="led" defstate="0">
+ <element name="lamp" defstate="0">
<disk state="1"><color red="1.0" green="0.25" blue="0.20" /></disk>
<disk state="0"><color red="0.2" green="0.0" blue="0.0" /></disk>
</element>
@@ -56,6 +56,7 @@
</element>
+
<!-- build screen -->
<view name="Internal Layout">
@@ -86,6 +87,7 @@
<bezel element="text_depth"><bounds x="21" y="37" width="20" height="7" /></bezel>
<bezel element="text_range"><bounds x="57" y="37" width="20" height="7" /></bezel>
+
<bezel name="digit5" element="digit">
<bounds x="5" y="17" width="10" height="15" />
</bezel>
@@ -107,26 +109,35 @@
<bounds x="77" y="17" width="10" height="15" />
</bezel>
+
<!-- compass -->
<bezel element="static_gray"><bounds x="0" y="50" width="100" height="100" /></bezel>
<bezel element="static_red"><bounds x="0" y="55" width="100" height="86" /></bezel>
- <bezel name="6.a" element="led"><bounds x="42" y="62" width="8" height="8" /></bezel>
- <bezel name="7.a" element="led"><bounds x="42" y="126" width="8" height="8" /></bezel>
- <bezel name="8.a" element="led"><bounds x="74" y="94" width="8" height="8" /></bezel>
- <bezel name="9.a" element="led"><bounds x="10" y="94" width="8" height="8" /></bezel>
+ <bezel name="lamp60" element="lamp">
+ <bounds x="42" y="62" width="8" height="8" />
+ </bezel>
+ <bezel name="lamp61" element="lamp">
+ <bounds x="42" y="126" width="8" height="8" />
+ </bezel>
+ <bezel name="lamp62" element="lamp">
+ <bounds x="74" y="94" width="8" height="8" />
+ </bezel>
+ <bezel name="lamp63" element="lamp">
+ <bounds x="10" y="94" width="8" height="8" />
+ </bezel>
<bezel element="text_n"><bounds x="41" y="72" width="10" height="10" /></bezel>
<bezel element="text_s"><bounds x="41" y="114" width="10" height="10" /></bezel>
<bezel element="text_e"><bounds x="63" y="93" width="10" height="10" /></bezel>
<bezel element="text_w"><bounds x="21" y="93" width="10" height="10" /></bezel>
+
<!-- crop borders -->
<bezel element="static_black"><bounds x="92" y="0" width="10" height="160" /></bezel>
<bezel element="static_black"><bounds x="0" y="146" width="100" height="10" /></bezel>
-
</view>
</mamelayout>
diff --git a/src/mame/layout/cqback.lay b/src/mame/layout/cqback.lay
deleted file mode 100644
index ebdfa1feaf8..00000000000
--- a/src/mame/layout/cqback.lay
+++ /dev/null
@@ -1,178 +0,0 @@
-<?xml version="1.0"?>
-<mamelayout version="2">
-
-<!-- define elements -->
-
- <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
- <element name="static_white"><rect><color red="0.8" green="0.8" blue="0.8" /></rect></element>
- <element name="static_green"><rect><color red="0.1" green="0.5" blue="0.2" /></rect></element>
- <element name="static_orange"><rect><color red="0.8" green="0.25" blue="0.1" /></rect></element>
-
- <element name="text_down">
- <rect><color red="0.8" green="0.8" blue="0.8" /></rect>
- <text string="DOWN"><color red="0.8" green="0.25" blue="0.1" /></text>
- </element>
- <element name="text_home">
- <rect><color red="0.8" green="0.8" blue="0.8" /></rect>
- <text string="HOME"><color red="0.8" green="0.25" blue="0.1" /></text>
- </element>
- <element name="text_yards">
- <rect><color red="0.8" green="0.8" blue="0.8" /></rect>
- <text string="YARDS TO GO"><color red="0.8" green="0.25" blue="0.1" /></text>
- </element>
- <element name="text_time">
- <rect><color red="0.8" green="0.8" blue="0.8" /></rect>
- <text string="TIME REMAINING"><color red="0.8" green="0.25" blue="0.1" /></text>
- </element>
- <element name="text_field">
- <rect><color red="0.8" green="0.8" blue="0.8" /></rect>
- <text string="FIELD POS."><color red="0.8" green="0.25" blue="0.1" /></text>
- </element>
- <element name="text_visitor">
- <rect><color red="0.8" green="0.8" blue="0.8" /></rect>
- <text string="VISITOR"><color red="0.8" green="0.25" blue="0.1" /></text>
- </element>
-
- <element name="text_p1">
- <rect><color red="0.06" green="0.3" blue="0.12" /></rect>
- <text string="PL SEL:">
- <bounds x="0.0" y="0.17" width="1.0" height="0.6" />
- <color red="0.7" green="0.7" blue="0.8" />
- </text>
- </element>
- <element name="text_p2" defstate="0">
- <rect><color red="0.06" green="0.3" blue="0.12" /></rect>
- <text state="0" string="RUN/KICK">
- <bounds x="0.0" y="0.17" width="1.0" height="0.6" />
- <color red="0.82" green="0.82" blue="0.82" />
- </text>
- <text state="1" string="PASS">
- <bounds x="0.0" y="0.17" width="1.0" height="0.6" />
- <color red="0.82" green="0.82" blue="0.82" />
- </text>
- </element>
-
- <element name="digit" defstate="0">
- <led7seg><color red="1.0" green="0.25" blue="0.26" /></led7seg>
- </element>
- <element name="seg" defstate="0">
- <rect state="0"><color red="0.13" green="0.0325" blue="0.0338" /></rect>
- <rect state="1"><color red="1.0" green="0.25" blue="0.26" /></rect>
- </element>
-
-
-<!-- build screen -->
-
- <view name="Internal Layout">
- <bounds left="-9" right="393" top="-130" bottom="156" />
- <bezel element="static_black">
- <bounds left="-9" right="393" top="-130" bottom="156" />
- </bezel>
-
- <!-- bezel -->
-
- <bezel element="static_white"><bounds left="-9" right="393" top="-130" bottom="-60" /></bezel>
- <bezel element="static_green"><bounds left="-9" right="393" top="111" bottom="156" /></bezel>
-
- <bezel element="text_down"><bounds x="-5" y="-126" width="86" height="19" /></bezel>
- <bezel element="text_yards"><bounds x="107" y="-126" width="170" height="19" /></bezel>
- <bezel element="text_field"><bounds x="301" y="-126" width="90" height="19" /></bezel>
-
- <bezel element="text_home"><bounds x="-5" y="-92" width="86" height="19" /></bezel>
- <bezel element="text_time"><bounds x="107" y="-92" width="170" height="19" /></bezel>
- <bezel element="text_visitor"><bounds x="301" y="-92" width="90" height="19" /></bezel>
-
- <bezel element="text_p1"><bounds x="301" y="130" width="40" height="16" /></bezel>
- <bezel element="text_p2" inputtag="IN.1" inputmask="0x01">
- <bounds x="339" y="130" width="50" height="16" />
- </bezel>
-
- <bezel element="static_orange"><bounds left="-9" right="393" top="-102" bottom="-96" /></bezel>
- <bezel element="static_white"><bounds left="-9" right="393" top="-61" bottom="-51" /></bezel>
- <bezel element="static_green"><bounds left="-9" right="393" top="-67" bottom="-61" /></bezel>
- <bezel element="static_white"><bounds left="-9" right="393" top="110" bottom="120" /></bezel>
-
- <bezel element="static_white"><bounds x="-9" y="-52" width="4" height="163" /></bezel>
- <bezel element="static_white"><bounds x="37" y="-52" width="2" height="163" /></bezel>
- <bezel element="static_white"><bounds x="81" y="-52" width="2" height="163" /></bezel>
- <bezel element="static_white"><bounds x="125" y="-52" width="2" height="163" /></bezel>
- <bezel element="static_white"><bounds x="169" y="-52" width="2" height="163" /></bezel>
- <bezel element="static_white"><bounds x="213" y="-52" width="2" height="163" /></bezel>
- <bezel element="static_white"><bounds x="257" y="-52" width="2" height="163" /></bezel>
- <bezel element="static_white"><bounds x="301" y="-52" width="2" height="163" /></bezel>
- <bezel element="static_white"><bounds x="345" y="-52" width="2" height="163" /></bezel>
- <bezel element="static_white"><bounds x="389" y="-52" width="4" height="163" /></bezel>
-
- <bezel element="static_white"><bounds x="36" y="2" width="4" height="1" /></bezel>
- <bezel element="static_white"><bounds x="36" y="29" width="4" height="1" /></bezel>
- <bezel element="static_white"><bounds x="36" y="56" width="4" height="1" /></bezel>
-
- <bezel element="static_white"><bounds x="80" y="2" width="4" height="1" /></bezel>
- <bezel element="static_white"><bounds x="80" y="29" width="4" height="1" /></bezel>
- <bezel element="static_white"><bounds x="80" y="56" width="4" height="1" /></bezel>
-
- <bezel element="static_white"><bounds x="124" y="2" width="4" height="1" /></bezel>
- <bezel element="static_white"><bounds x="124" y="29" width="4" height="1" /></bezel>
- <bezel element="static_white"><bounds x="124" y="56" width="4" height="1" /></bezel>
-
- <bezel element="static_white"><bounds x="168" y="2" width="4" height="1" /></bezel>
- <bezel element="static_white"><bounds x="168" y="29" width="4" height="1" /></bezel>
- <bezel element="static_white"><bounds x="168" y="56" width="4" height="1" /></bezel>
-
- <bezel element="static_white"><bounds x="212" y="2" width="4" height="1" /></bezel>
- <bezel element="static_white"><bounds x="212" y="29" width="4" height="1" /></bezel>
- <bezel element="static_white"><bounds x="212" y="56" width="4" height="1" /></bezel>
-
- <bezel element="static_white"><bounds x="256" y="2" width="4" height="1" /></bezel>
- <bezel element="static_white"><bounds x="256" y="29" width="4" height="1" /></bezel>
- <bezel element="static_white"><bounds x="256" y="56" width="4" height="1" /></bezel>
-
- <bezel element="static_white"><bounds x="300" y="2" width="4" height="1" /></bezel>
- <bezel element="static_white"><bounds x="300" y="29" width="4" height="1" /></bezel>
- <bezel element="static_white"><bounds x="300" y="56" width="4" height="1" /></bezel>
-
- <bezel element="static_white"><bounds x="344" y="2" width="4" height="1" /></bezel>
- <bezel element="static_white"><bounds x="344" y="29" width="4" height="1" /></bezel>
- <bezel element="static_white"><bounds x="344" y="56" width="4" height="1" /></bezel>
-
- <!-- leds -->
-
- <bezel name="digit0" element="digit"><bounds x="3" y="-15.5" width="24" height="32" /></bezel>
- <bezel name="0.8" element="seg"><bounds x="7" y="42.5" width="15" height="3" /></bezel>
- <bezel name="0.9" element="seg"><bounds x="7" y="71.5" width="15" height="3" /></bezel>
-
- <bezel name="digit1" element="digit"><bounds x="47" y="-15.5" width="24" height="32" /></bezel>
- <bezel name="1.8" element="seg"><bounds x="51" y="42.5" width="15" height="3" /></bezel>
- <bezel name="1.9" element="seg"><bounds x="51" y="71.5" width="15" height="3" /></bezel>
-
- <bezel name="digit2" element="digit"><bounds x="91" y="-15.5" width="24" height="32" /></bezel>
- <bezel name="2.8" element="seg"><bounds x="95" y="42.5" width="15" height="3" /></bezel>
- <bezel name="2.9" element="seg"><bounds x="95" y="71.5" width="15" height="3" /></bezel>
-
- <bezel name="digit3" element="digit"><bounds x="135" y="-15.5" width="24" height="32" /></bezel>
- <bezel name="3.8" element="seg"><bounds x="139" y="42.5" width="15" height="3" /></bezel>
- <bezel name="3.9" element="seg"><bounds x="139" y="71.5" width="15" height="3" /></bezel>
-
- <bezel name="digit4" element="digit"><bounds x="179" y="-15.5" width="24" height="32" /></bezel>
- <bezel name="4.8" element="seg"><bounds x="183" y="42.5" width="15" height="3" /></bezel>
- <bezel name="4.9" element="seg"><bounds x="183" y="71.5" width="15" height="3" /></bezel>
-
- <bezel name="digit5" element="digit"><bounds x="223" y="-15.5" width="24" height="32" /></bezel>
- <bezel name="5.8" element="seg"><bounds x="227" y="42.5" width="15" height="3" /></bezel>
- <bezel name="5.9" element="seg"><bounds x="227" y="71.5" width="15" height="3" /></bezel>
-
- <bezel name="digit6" element="digit"><bounds x="267" y="-15.5" width="24" height="32" /></bezel>
- <bezel name="6.8" element="seg"><bounds x="271" y="42.5" width="15" height="3" /></bezel>
- <bezel name="6.9" element="seg"><bounds x="271" y="71.5" width="15" height="3" /></bezel>
-
- <bezel name="digit7" element="digit"><bounds x="311" y="-15.5" width="24" height="32" /></bezel>
- <bezel name="7.8" element="seg"><bounds x="315" y="42.5" width="15" height="3" /></bezel>
- <bezel name="7.9" element="seg"><bounds x="315" y="71.5" width="15" height="3" /></bezel>
-
- <bezel name="digit8" element="digit"><bounds x="355" y="-15.5" width="24" height="32" /></bezel>
- <bezel name="8.8" element="seg"><bounds x="359" y="42.5" width="15" height="3" /></bezel>
- <bezel name="8.9" element="seg"><bounds x="359" y="71.5" width="15" height="3" /></bezel>
-
-
- </view>
-</mamelayout>
diff --git a/src/mame/layout/fidel_bcc.lay b/src/mame/layout/fidel_bcc.lay
deleted file mode 100644
index d9bf4712953..00000000000
--- a/src/mame/layout/fidel_bcc.lay
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version="1.0"?>
-<mamelayout version="2">
-
-<!-- define elements -->
-
- <element name="digit" defstate="0">
- <led7seg><color red="1.0" green="0.1" blue="0.15" /></led7seg>
- </element>
-
- <element name="led" defstate="0">
- <disk state="1"><color red="1.0" green="0.1" blue="0.15" /></disk>
- <disk state="0"><color red="0.1" green="0.01" blue="0.015" /></disk>
- </element>
-
- <element name="txt_check">
- <text string="CHECK"><color red="0.6" green="0.6" blue="0.6" /></text>
- </element>
- <element name="txt_lose">
- <text string="I LOSE"><color red="0.6" green="0.6" blue="0.6" /></text>
- </element>
-
- <element name="txt_from">
- <text string="FROM"><color red="0.6" green="0.6" blue="0.6" /></text>
- </element>
- <element name="txt_to">
- <text string="TO"><color red="0.6" green="0.6" blue="0.6" /></text>
- </element>
-
-
-<!-- build screen -->
-
- <view name="Internal Layout">
- <bounds left="0" right="47" top="0" bottom="25" />
-
- <bezel element="txt_check">
- <bounds x="1" y="1" width="20" height="3" />
- </bezel>
- <bezel element="txt_lose">
- <bounds x="26" y="1" width="20" height="3" />
- </bezel>
- <bezel name="4.a" element="led">
- <bounds x="2" y="1" width="3" height="3" />
- </bezel>
- <bezel name="5.a" element="led">
- <bounds x="27" y="1" width="3" height="3" />
- </bezel>
-
- <bezel element="txt_from">
- <bounds x="1" y="21" width="20" height="3" />
- </bezel>
- <bezel element="txt_to">
- <bounds x="26" y="21" width="20" height="3" />
- </bezel>
-
- <bezel name="digit0" element="digit">
- <bounds x="1" y="5" width="10" height="15" />
- </bezel>
- <bezel name="digit1" element="digit">
- <bounds x="11" y="5" width="10" height="15" />
- </bezel>
- <bezel name="digit2" element="digit">
- <bounds x="26" y="5" width="10" height="15" />
- </bezel>
- <bezel name="digit3" element="digit">
- <bounds x="36" y="5" width="10" height="15" />
- </bezel>
-
- </view>
-</mamelayout>
diff --git a/src/mame/layout/fidel_csc.lay b/src/mame/layout/fidel_csc.lay
deleted file mode 100644
index 22aed7ef11c..00000000000
--- a/src/mame/layout/fidel_csc.lay
+++ /dev/null
@@ -1,493 +0,0 @@
-<?xml version="1.0"?>
-<mamelayout version="2">
-
-<!-- other than panel button mappings, layout is identical to vsc -->
-
-<!-- define elements -->
-
- <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
-
- <element name="digit" defstate="0">
- <led7seg><color red="1.0" green="0.1" blue="0.15" /></led7seg>
- </element>
-
- <element name="led" defstate="0">
- <disk state="1"><color red="1.0" green="0.1" blue="0.15" /></disk>
- <disk state="0"><color red="0.1" green="0.01" blue="0.015" /></disk>
- </element>
-
- <element name="hl" defstate="0">
- <text string=" ">
- <bounds x="0.0" y="0.0" width="1.0" height="1.0" />
- <color red="0.0" green="0.0" blue="0.0" />
- </text>
- <disk state="1">
- <bounds x="0.12" y="0.12" width="0.76" height="0.76" />
- <color red="1.0" green="1.0" blue="1.0" />
- </disk>
- </element>
- <element name="hlb" defstate="0">
- <text string=" ">
- <bounds x="0.0" y="0.0" width="1.0" height="1.0" />
- <color red="0.0" green="0.0" blue="0.0" />
- </text>
- <disk state="1">
- <bounds x="0.0" y="0.0" width="1.0" height="1.0" />
- <color red="1.0" green="1.0" blue="1.0" />
- </disk>
- </element>
- <element name="hlp" defstate="0">
- <text string=" ">
- <bounds x="0.0" y="0.0" width="1.0" height="1.0" />
- <color red="0.0" green="0.0" blue="0.0" />
- </text>
- <rect state="1">
- <bounds x="0.0" y="0.0" width="1.0" height="1.0" />
- <color red="1.0" green="1.0" blue="1.0" />
- </rect>
- </element>
-
- <element name="black"><rect><color red="0.17" green="0.15" blue="0.15" /></rect></element>
- <element name="white"><rect><color red="0.81" green="0.8" blue="0.79" /></rect></element>
- <element name="disk_black"><disk><color red="0.17" green="0.15" blue="0.15" /></disk></element>
- <element name="disk_white"><disk><color red="0.81" green="0.8" blue="0.79" /></disk></element>
-
- <element name="text_1">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="1"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_2">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="2"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_3">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="3"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_4">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="4"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_5">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="5"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_6">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="6"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_7">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="7"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_8">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="8"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
-
- <element name="text_a">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="A"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_b">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="B"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_c">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="C"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_d">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="D"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_e">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="E"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_f">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="F"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_g">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="G"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_h">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="H"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
-
- <element name="text_re">
- <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
- <text string="RE"><color red="0.17" green="0.15" blue="0.15" /></text>
- </element>
- <element name="text_cl">
- <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
- <text string="CL"><color red="0.17" green="0.15" blue="0.15" /></text>
- </element>
- <element name="text_king">
- <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
- <text string="K"><color red="0.17" green="0.15" blue="0.15" /></text>
- </element>
- <element name="text_queen">
- <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
- <text string="Q"><color red="0.17" green="0.15" blue="0.15" /></text>
- </element>
- <element name="text_rook">
- <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
- <text string="R"><color red="0.17" green="0.15" blue="0.15" /></text>
- </element>
- <element name="text_bishop">
- <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
- <text string="B"><color red="0.17" green="0.15" blue="0.15" /></text>
- </element>
- <element name="text_knight">
- <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
- <text string="N"><color red="0.17" green="0.15" blue="0.15" /></text>
- </element>
- <element name="text_pion">
- <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
- <text string="P"><color red="0.17" green="0.15" blue="0.15" /></text>
- </element>
-
- <element name="text_tm">
- <rect><color red="0.17" green="0.15" blue="0.15" /></rect>
- <text string="TM"><color red="0.81" green="0.8" blue="0.79" /></text>
- </element>
- <element name="text_rv">
- <rect><color red="0.17" green="0.15" blue="0.15" /></rect>
- <text string="RV"><color red="0.81" green="0.8" blue="0.79" /></text>
- </element>
- <element name="text_speak">
- <rect><color red="0.17" green="0.15" blue="0.15" /></rect>
- <text string="spk"><color red="0.81" green="0.8" blue="0.79" /></text>
- </element>
- <element name="text_st">
- <rect><color red="0.17" green="0.15" blue="0.15" /></rect>
- <text string="ST"><color red="0.81" green="0.8" blue="0.79" /></text>
- </element>
- <element name="text_dm">
- <rect><color red="0.17" green="0.15" blue="0.15" /></rect>
- <text string="DM"><color red="0.81" green="0.8" blue="0.79" /></text>
- </element>
- <element name="text_lv">
- <rect><color red="0.17" green="0.15" blue="0.15" /></rect>
- <text string="LV"><color red="0.81" green="0.8" blue="0.79" /></text>
- </element>
-
-
-<!-- build screen -->
-
- <view name="Internal Layout">
- <bounds left="-2" right="98" top="-18" bottom="88" />
- <bezel element="static_black">
- <bounds left="-2" right="98" top="-18" bottom="88" />
- </bezel>
-
- <bezel element="white"><bounds x="-2.5" y="-2" width="101" height="90.5" /></bezel>
-
- <!-- chessboard coords -->
-
- <bezel element="text_8"><bounds x="-0.8" y="7" width="2" height="2" /></bezel>
- <bezel element="text_7"><bounds x="-0.8" y="17" width="2" height="2" /></bezel>
- <bezel element="text_6"><bounds x="-0.8" y="27" width="2" height="2" /></bezel>
- <bezel element="text_5"><bounds x="-0.8" y="37" width="2" height="2" /></bezel>
- <bezel element="text_4"><bounds x="-0.8" y="47" width="2" height="2" /></bezel>
- <bezel element="text_3"><bounds x="-0.8" y="57" width="2" height="2" /></bezel>
- <bezel element="text_2"><bounds x="-0.8" y="67" width="2" height="2" /></bezel>
- <bezel element="text_1"><bounds x="-0.8" y="77" width="2" height="2" /></bezel>
-
- <bezel element="text_a"><bounds x="7" y="85" width="2" height="2" /></bezel>
- <bezel element="text_b"><bounds x="17" y="85" width="2" height="2" /></bezel>
- <bezel element="text_c"><bounds x="27" y="85" width="2" height="2" /></bezel>
- <bezel element="text_d"><bounds x="37" y="85" width="2" height="2" /></bezel>
- <bezel element="text_e"><bounds x="47" y="85" width="2" height="2" /></bezel>
- <bezel element="text_f"><bounds x="57" y="85" width="2" height="2" /></bezel>
- <bezel element="text_g"><bounds x="67" y="85" width="2" height="2" /></bezel>
- <bezel element="text_h"><bounds x="77" y="85" width="2" height="2" /></bezel>
-
- <!-- chessboard bezel -->
-
- <bezel element="black"><bounds x="2" y="2" width="82" height="82" /></bezel>
- <bezel element="white"><bounds x="3" y="3" width="80" height="80" /></bezel>
-
- <bezel element="black"><bounds x="13" y="2.5" width="10" height="10.5" /></bezel>
- <bezel element="black"><bounds x="33" y="2.5" width="10" height="10.5" /></bezel>
- <bezel element="black"><bounds x="53" y="2.5" width="10" height="10.5" /></bezel>
- <bezel element="black"><bounds x="73" y="2.5" width="10.5" height="10.5" /></bezel>
-
- <bezel element="black"><bounds x="2.5" y="13" width="10.5" height="10" /></bezel>
- <bezel element="black"><bounds x="23" y="13" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="43" y="13" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="63" y="13" width="10" height="10" /></bezel>
-
- <bezel element="black"><bounds x="13" y="23" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="33" y="23" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="53" y="23" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="73" y="23" width="10.5" height="10" /></bezel>
-
- <bezel element="black"><bounds x="2.5" y="33" width="10.5" height="10" /></bezel>
- <bezel element="black"><bounds x="23" y="33" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="43" y="33" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="63" y="33" width="10" height="10" /></bezel>
-
- <bezel element="black"><bounds x="13" y="43" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="33" y="43" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="53" y="43" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="73" y="43" width="10.5" height="10" /></bezel>
-
- <bezel element="black"><bounds x="2.5" y="53" width="10.5" height="10" /></bezel>
- <bezel element="black"><bounds x="23" y="53" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="43" y="53" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="63" y="53" width="10" height="10" /></bezel>
-
- <bezel element="black"><bounds x="13" y="63" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="33" y="63" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="53" y="63" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="73" y="63" width="10.5" height="10" /></bezel>
-
- <bezel element="black"><bounds x="2.5" y="73" width="10.5" height="10.5" /></bezel>
- <bezel element="black"><bounds x="23" y="73" width="10" height="10.5" /></bezel>
- <bezel element="black"><bounds x="43" y="73" width="10" height="10.5" /></bezel>
- <bezel element="black"><bounds x="63" y="73" width="10" height="10.5" /></bezel>
-
- <!-- chessboard leds -->
-
- <bezel name="4.7" element="led"><bounds x="3.2" y="11.3" width="1.5" height="1.5" /></bezel>
- <bezel name="5.7" element="led"><bounds x="13.2" y="11.3" width="1.5" height="1.5" /></bezel>
- <bezel name="6.7" element="led"><bounds x="23.2" y="11.3" width="1.5" height="1.5" /></bezel>
- <bezel name="7.7" element="led"><bounds x="33.2" y="11.3" width="1.5" height="1.5" /></bezel>
- <bezel name="8.7" element="led"><bounds x="43.2" y="11.3" width="1.5" height="1.5" /></bezel>
- <bezel name="9.7" element="led"><bounds x="53.2" y="11.3" width="1.5" height="1.5" /></bezel>
- <bezel name="10.7" element="led"><bounds x="63.2" y="11.3" width="1.5" height="1.5" /></bezel>
- <bezel name="11.7" element="led"><bounds x="73.2" y="11.3" width="1.5" height="1.5" /></bezel>
-
- <bezel name="4.6" element="led"><bounds x="3.2" y="21.3" width="1.5" height="1.5" /></bezel>
- <bezel name="5.6" element="led"><bounds x="13.2" y="21.3" width="1.5" height="1.5" /></bezel>
- <bezel name="6.6" element="led"><bounds x="23.2" y="21.3" width="1.5" height="1.5" /></bezel>
- <bezel name="7.6" element="led"><bounds x="33.2" y="21.3" width="1.5" height="1.5" /></bezel>
- <bezel name="8.6" element="led"><bounds x="43.2" y="21.3" width="1.5" height="1.5" /></bezel>
- <bezel name="9.6" element="led"><bounds x="53.2" y="21.3" width="1.5" height="1.5" /></bezel>
- <bezel name="10.6" element="led"><bounds x="63.2" y="21.3" width="1.5" height="1.5" /></bezel>
- <bezel name="11.6" element="led"><bounds x="73.2" y="21.3" width="1.5" height="1.5" /></bezel>
-
- <bezel name="4.5" element="led"><bounds x="3.2" y="31.3" width="1.5" height="1.5" /></bezel>
- <bezel name="5.5" element="led"><bounds x="13.2" y="31.3" width="1.5" height="1.5" /></bezel>
- <bezel name="6.5" element="led"><bounds x="23.2" y="31.3" width="1.5" height="1.5" /></bezel>
- <bezel name="7.5" element="led"><bounds x="33.2" y="31.3" width="1.5" height="1.5" /></bezel>
- <bezel name="8.5" element="led"><bounds x="43.2" y="31.3" width="1.5" height="1.5" /></bezel>
- <bezel name="9.5" element="led"><bounds x="53.2" y="31.3" width="1.5" height="1.5" /></bezel>
- <bezel name="10.5" element="led"><bounds x="63.2" y="31.3" width="1.5" height="1.5" /></bezel>
- <bezel name="11.5" element="led"><bounds x="73.2" y="31.3" width="1.5" height="1.5" /></bezel>
-
- <bezel name="4.4" element="led"><bounds x="3.2" y="41.3" width="1.5" height="1.5" /></bezel>
- <bezel name="5.4" element="led"><bounds x="13.2" y="41.3" width="1.5" height="1.5" /></bezel>
- <bezel name="6.4" element="led"><bounds x="23.2" y="41.3" width="1.5" height="1.5" /></bezel>
- <bezel name="7.4" element="led"><bounds x="33.2" y="41.3" width="1.5" height="1.5" /></bezel>
- <bezel name="8.4" element="led"><bounds x="43.2" y="41.3" width="1.5" height="1.5" /></bezel>
- <bezel name="9.4" element="led"><bounds x="53.2" y="41.3" width="1.5" height="1.5" /></bezel>
- <bezel name="10.4" element="led"><bounds x="63.2" y="41.3" width="1.5" height="1.5" /></bezel>
- <bezel name="11.4" element="led"><bounds x="73.2" y="41.3" width="1.5" height="1.5" /></bezel>
-
- <bezel name="4.3" element="led"><bounds x="3.2" y="51.3" width="1.5" height="1.5" /></bezel>
- <bezel name="5.3" element="led"><bounds x="13.2" y="51.3" width="1.5" height="1.5" /></bezel>
- <bezel name="6.3" element="led"><bounds x="23.2" y="51.3" width="1.5" height="1.5" /></bezel>
- <bezel name="7.3" element="led"><bounds x="33.2" y="51.3" width="1.5" height="1.5" /></bezel>
- <bezel name="8.3" element="led"><bounds x="43.2" y="51.3" width="1.5" height="1.5" /></bezel>
- <bezel name="9.3" element="led"><bounds x="53.2" y="51.3" width="1.5" height="1.5" /></bezel>
- <bezel name="10.3" element="led"><bounds x="63.2" y="51.3" width="1.5" height="1.5" /></bezel>
- <bezel name="11.3" element="led"><bounds x="73.2" y="51.3" width="1.5" height="1.5" /></bezel>
-
- <bezel name="4.2" element="led"><bounds x="3.2" y="61.3" width="1.5" height="1.5" /></bezel>
- <bezel name="5.2" element="led"><bounds x="13.2" y="61.3" width="1.5" height="1.5" /></bezel>
- <bezel name="6.2" element="led"><bounds x="23.2" y="61.3" width="1.5" height="1.5" /></bezel>
- <bezel name="7.2" element="led"><bounds x="33.2" y="61.3" width="1.5" height="1.5" /></bezel>
- <bezel name="8.2" element="led"><bounds x="43.2" y="61.3" width="1.5" height="1.5" /></bezel>
- <bezel name="9.2" element="led"><bounds x="53.2" y="61.3" width="1.5" height="1.5" /></bezel>
- <bezel name="10.2" element="led"><bounds x="63.2" y="61.3" width="1.5" height="1.5" /></bezel>
- <bezel name="11.2" element="led"><bounds x="73.2" y="61.3" width="1.5" height="1.5" /></bezel>
-
- <bezel name="4.1" element="led"><bounds x="3.2" y="71.3" width="1.5" height="1.5" /></bezel>
- <bezel name="5.1" element="led"><bounds x="13.2" y="71.3" width="1.5" height="1.5" /></bezel>
- <bezel name="6.1" element="led"><bounds x="23.2" y="71.3" width="1.5" height="1.5" /></bezel>
- <bezel name="7.1" element="led"><bounds x="33.2" y="71.3" width="1.5" height="1.5" /></bezel>
- <bezel name="8.1" element="led"><bounds x="43.2" y="71.3" width="1.5" height="1.5" /></bezel>
- <bezel name="9.1" element="led"><bounds x="53.2" y="71.3" width="1.5" height="1.5" /></bezel>
- <bezel name="10.1" element="led"><bounds x="63.2" y="71.3" width="1.5" height="1.5" /></bezel>
- <bezel name="11.1" element="led"><bounds x="73.2" y="71.3" width="1.5" height="1.5" /></bezel>
-
- <bezel name="4.0" element="led"><bounds x="3.2" y="81.3" width="1.5" height="1.5" /></bezel>
- <bezel name="5.0" element="led"><bounds x="13.2" y="81.3" width="1.5" height="1.5" /></bezel>
- <bezel name="6.0" element="led"><bounds x="23.2" y="81.3" width="1.5" height="1.5" /></bezel>
- <bezel name="7.0" element="led"><bounds x="33.2" y="81.3" width="1.5" height="1.5" /></bezel>
- <bezel name="8.0" element="led"><bounds x="43.2" y="81.3" width="1.5" height="1.5" /></bezel>
- <bezel name="9.0" element="led"><bounds x="53.2" y="81.3" width="1.5" height="1.5" /></bezel>
- <bezel name="10.0" element="led"><bounds x="63.2" y="81.3" width="1.5" height="1.5" /></bezel>
- <bezel name="11.0" element="led"><bounds x="73.2" y="81.3" width="1.5" height="1.5" /></bezel>
-
- <!-- chessboard sensors -->
-
- <bezel element="hl" inputtag="IN.0" inputmask="0x80"><bounds x="3" y="3" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x80"><bounds x="13" y="3" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x80"><bounds x="23" y="3" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x80"><bounds x="33" y="3" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.4" inputmask="0x80"><bounds x="43" y="3" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.5" inputmask="0x80"><bounds x="53" y="3" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.6" inputmask="0x80"><bounds x="63" y="3" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.7" inputmask="0x80"><bounds x="73" y="3" width="10" height="10" /><color alpha="0.2" /></bezel>
-
- <bezel element="hl" inputtag="IN.0" inputmask="0x40"><bounds x="3" y="13" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x40"><bounds x="13" y="13" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x40"><bounds x="23" y="13" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x40"><bounds x="33" y="13" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.4" inputmask="0x40"><bounds x="43" y="13" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.5" inputmask="0x40"><bounds x="53" y="13" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.6" inputmask="0x40"><bounds x="63" y="13" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.7" inputmask="0x40"><bounds x="73" y="13" width="10" height="10" /><color alpha="0.4" /></bezel>
-
- <bezel element="hl" inputtag="IN.0" inputmask="0x20"><bounds x="3" y="23" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x20"><bounds x="13" y="23" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x20"><bounds x="23" y="23" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x20"><bounds x="33" y="23" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.4" inputmask="0x20"><bounds x="43" y="23" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.5" inputmask="0x20"><bounds x="53" y="23" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.6" inputmask="0x20"><bounds x="63" y="23" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.7" inputmask="0x20"><bounds x="73" y="23" width="10" height="10" /><color alpha="0.2" /></bezel>
-
- <bezel element="hl" inputtag="IN.0" inputmask="0x10"><bounds x="3" y="33" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x10"><bounds x="13" y="33" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x10"><bounds x="23" y="33" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x10"><bounds x="33" y="33" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.4" inputmask="0x10"><bounds x="43" y="33" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.5" inputmask="0x10"><bounds x="53" y="33" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.6" inputmask="0x10"><bounds x="63" y="33" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.7" inputmask="0x10"><bounds x="73" y="33" width="10" height="10" /><color alpha="0.4" /></bezel>
-
- <bezel element="hl" inputtag="IN.0" inputmask="0x08"><bounds x="3" y="43" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x08"><bounds x="13" y="43" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x08"><bounds x="23" y="43" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x08"><bounds x="33" y="43" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.4" inputmask="0x08"><bounds x="43" y="43" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.5" inputmask="0x08"><bounds x="53" y="43" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.6" inputmask="0x08"><bounds x="63" y="43" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.7" inputmask="0x08"><bounds x="73" y="43" width="10" height="10" /><color alpha="0.2" /></bezel>
-
- <bezel element="hl" inputtag="IN.0" inputmask="0x04"><bounds x="3" y="53" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x04"><bounds x="13" y="53" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x04"><bounds x="23" y="53" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x04"><bounds x="33" y="53" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.4" inputmask="0x04"><bounds x="43" y="53" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.5" inputmask="0x04"><bounds x="53" y="53" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.6" inputmask="0x04"><bounds x="63" y="53" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.7" inputmask="0x04"><bounds x="73" y="53" width="10" height="10" /><color alpha="0.4" /></bezel>
-
- <bezel element="hl" inputtag="IN.0" inputmask="0x02"><bounds x="3" y="63" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x02"><bounds x="13" y="63" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x02"><bounds x="23" y="63" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x02"><bounds x="33" y="63" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.4" inputmask="0x02"><bounds x="43" y="63" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.5" inputmask="0x02"><bounds x="53" y="63" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.6" inputmask="0x02"><bounds x="63" y="63" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.7" inputmask="0x02"><bounds x="73" y="63" width="10" height="10" /><color alpha="0.2" /></bezel>
-
- <bezel element="hl" inputtag="IN.0" inputmask="0x01"><bounds x="3" y="73" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x01"><bounds x="13" y="73" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x01"><bounds x="23" y="73" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x01"><bounds x="33" y="73" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.4" inputmask="0x01"><bounds x="43" y="73" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.5" inputmask="0x01"><bounds x="53" y="73" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.6" inputmask="0x01"><bounds x="63" y="73" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.7" inputmask="0x01"><bounds x="73" y="73" width="10" height="10" /><color alpha="0.4" /></bezel>
-
- <!-- right side -->
-
- <bezel name="0.7" element="led"><bounds x="89.95" y="7.25" width="1.5" height="1.5" /></bezel>
-
- <bezel element="disk_black"><bounds x="87" y="13" width="7.4" height="7.4" /></bezel>
- <bezel element="disk_black"><bounds x="87" y="21.8" width="7.4" height="7.4" /></bezel>
- <bezel element="disk_black"><bounds x="87" y="30.6" width="7.4" height="7.4" /></bezel>
- <bezel element="disk_black"><bounds x="87" y="39.4" width="7.4" height="7.4" /></bezel>
- <bezel element="disk_black"><bounds x="87" y="48.2" width="7.4" height="7.4" /></bezel>
- <bezel element="disk_black"><bounds x="87" y="57" width="7.4" height="7.4" /></bezel>
- <bezel element="disk_black"><bounds x="87" y="65.8" width="7.4" height="7.4" /></bezel>
- <bezel element="disk_black"><bounds x="87" y="74.6" width="7.4" height="7.4" /></bezel>
-
- <bezel element="disk_white"><bounds x="88.2" y="14.2" width="5" height="5" /></bezel>
- <bezel element="disk_white"><bounds x="88.2" y="23" width="5" height="5" /></bezel>
- <bezel element="disk_white"><bounds x="88.2" y="31.8" width="5" height="5" /></bezel>
- <bezel element="disk_white"><bounds x="88.2" y="40.6" width="5" height="5" /></bezel>
- <bezel element="disk_white"><bounds x="88.2" y="49.4" width="5" height="5" /></bezel>
- <bezel element="disk_white"><bounds x="88.2" y="58.2" width="5" height="5" /></bezel>
- <bezel element="disk_white"><bounds x="88.2" y="67" width="5" height="5" /></bezel>
- <bezel element="disk_white"><bounds x="88.2" y="75.8" width="5" height="5" /></bezel>
-
- <bezel element="text_re"><bounds x="88.2" y="15.2" width="5" height="3" /></bezel>
- <bezel element="text_cl"><bounds x="88.2" y="24" width="5" height="3" /></bezel>
- <bezel element="text_king"><bounds x="88.2" y="32.8" width="5" height="3" /></bezel>
- <bezel element="text_queen"><bounds x="88.2" y="41.6" width="5" height="3" /></bezel>
- <bezel element="text_bishop"><bounds x="88.2" y="50.4" width="5" height="3" /></bezel>
- <bezel element="text_knight"><bounds x="88.2" y="59.2" width="5" height="3" /></bezel>
- <bezel element="text_rook"><bounds x="88.2" y="68" width="5" height="3" /></bezel>
- <bezel element="text_pion"><bounds x="88.2" y="76.8" width="5" height="3" /></bezel>
-
- <bezel element="hlb" inputtag="IN.8" inputmask="0x80"><bounds x="87" y="13" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
- <bezel element="hlb" inputtag="IN.8" inputmask="0x40"><bounds x="87" y="21.8" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
- <bezel element="hlb" inputtag="IN.8" inputmask="0x20"><bounds x="87" y="30.6" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
- <bezel element="hlb" inputtag="IN.8" inputmask="0x10"><bounds x="87" y="39.4" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
- <bezel element="hlb" inputtag="IN.8" inputmask="0x08"><bounds x="87" y="48.2" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
- <bezel element="hlb" inputtag="IN.8" inputmask="0x04"><bounds x="87" y="57" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
- <bezel element="hlb" inputtag="IN.8" inputmask="0x02"><bounds x="87" y="65.8" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
- <bezel element="hlb" inputtag="IN.8" inputmask="0x01"><bounds x="87" y="74.6" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
-
- <!-- panel 7seg leds -->
-
- <bezel name="digit3" element="digit">
- <bounds x="33" y="-14.5" width="5.66" height="8.5" />
- </bezel>
- <bezel name="digit2" element="digit">
- <bounds x="38.66" y="-14.5" width="5.66" height="8.5" />
- </bezel>
- <bezel name="digit1" element="digit">
- <bounds x="47.16" y="-14.5" width="5.66" height="8.5" />
- </bezel>
- <bezel name="digit0" element="digit">
- <bounds x="52.82" y="-14.5" width="5.66" height="8.5" />
- </bezel>
-
- <bezel name="2.7" element="led">
- <bounds x="45.58" y="-13" width="0.85" height="0.85" />
- </bezel>
- <bezel name="3.7" element="led">
- <bounds x="45.13" y="-8.35" width="0.85" height="0.85" />
- </bezel>
-
- <!-- panel buttons -->
-
- <bezel element="black"><bounds x="73" y="-14.5" width="5" height="3" /></bezel>
- <bezel element="text_tm"><bounds x="73.05" y="-14.45" width="4.9" height="2.9" /></bezel>
- <bezel element="hlp" inputtag="IN.2" inputmask="0x100"><bounds x="73" y="-14.5" width="5" height="3" /><color alpha="0.25" /></bezel>
-
- <bezel element="black"><bounds x="79.2" y="-14.5" width="5" height="3" /></bezel>
- <bezel element="text_rv"><bounds x="79.25" y="-14.45" width="4.9" height="2.9" /></bezel>
- <bezel element="hlp" inputtag="IN.1" inputmask="0x100"><bounds x="79.2" y="-14.5" width="5" height="3" /><color alpha="0.25" /></bezel>
-
- <bezel element="black"><bounds x="85.4" y="-14.5" width="5" height="3" /></bezel>
- <bezel element="text_speak"><bounds x="85.45" y="-14.45" width="4.9" height="2.9" /></bezel>
- <bezel element="hlp" inputtag="IN.0" inputmask="0x100"><bounds x="85.4" y="-14.5" width="5" height="3" /><color alpha="0.25" /></bezel>
-
- <bezel element="black"><bounds x="73" y="-9" width="5" height="3" /></bezel>
- <bezel element="text_st"><bounds x="73.05" y="-8.95" width="4.9" height="2.9" /></bezel>
- <bezel element="hlp" inputtag="IN.5" inputmask="0x100"><bounds x="73" y="-9" width="5" height="3" /><color alpha="0.25" /></bezel>
-
- <bezel element="black"><bounds x="79.2" y="-9" width="5" height="3" /></bezel>
- <bezel element="text_dm"><bounds x="79.25" y="-8.95" width="4.9" height="2.9" /></bezel>
- <bezel element="hlp" inputtag="IN.4" inputmask="0x100"><bounds x="79.2" y="-9" width="5" height="3" /><color alpha="0.25" /></bezel>
-
- <bezel element="black"><bounds x="85.4" y="-9" width="5" height="3" /></bezel>
- <bezel element="text_lv"><bounds x="85.45" y="-8.95" width="4.9" height="2.9" /></bezel>
- <bezel element="hlp" inputtag="IN.3" inputmask="0x100"><bounds x="85.4" y="-9" width="5" height="3" /><color alpha="0.25" /></bezel>
-
-
- </view>
-</mamelayout>
diff --git a/src/mame/layout/fidel_eag.lay b/src/mame/layout/fidel_eag.lay
deleted file mode 100644
index f321527a168..00000000000
--- a/src/mame/layout/fidel_eag.lay
+++ /dev/null
@@ -1,432 +0,0 @@
-<?xml version="1.0"?>
-<mamelayout version="2">
-
-<!-- define elements -->
-
- <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
-
- <element name="digit" defstate="0">
- <led7seg><color red="1.0" green="0.1" blue="0.15" /></led7seg>
- </element>
-
- <element name="led" defstate="0">
- <disk state="1"><color red="1.0" green="0.1" blue="0.15" /></disk>
- <disk state="0"><color red="0.1" green="0.01" blue="0.015" /></disk>
- </element>
-
- <element name="led2" defstate="0">
- <disk state="1"><color red="1.0" green="0.1" blue="0.15" /></disk>
- <disk state="0"><color red="0.14" green="0.014" blue="0.02" /></disk>
- </element>
- <element name="led2g" defstate="0">
- <disk state="1"><color red="0.1" green="1.0" blue="0.15" /></disk>
- <disk state="0"><color red="0.014" green="0.14" blue="0.02" /></disk>
- </element>
- <element name="led2y" defstate="0">
- <disk state="1"><color red="1.0" green="0.85" blue="0.15" /></disk>
- <disk state="0"><color red="0.18" green="0.14" blue="0.02" /></disk>
- </element>
-
- <element name="bt" defstate="0">
- <disk state="0"><color red="0.17" green="0.15" blue="0.15" /></disk>
- <disk state="1"><color red="0.4" green="0.41" blue="0.45" /></disk>
- </element>
-
- <element name="hl" defstate="0">
- <text string=" ">
- <bounds x="0.0" y="0.0" width="1.0" height="1.0" />
- <color red="0.0" green="0.0" blue="0.0" />
- </text>
- <disk state="1">
- <bounds x="0.12" y="0.12" width="0.76" height="0.76" />
- <color red="1.0" green="1.0" blue="1.0" />
- </disk>
- </element>
-
- <element name="black"><rect><color red="0.17" green="0.15" blue="0.15" /></rect></element>
- <element name="white"><rect><color red="0.81" green="0.8" blue="0.79" /></rect></element>
- <element name="disk_black"><disk><color red="0.17" green="0.15" blue="0.15" /></disk></element>
-
- <element name="text_1">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="1"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_2">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="2"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_3">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="3"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_4">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="4"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_5">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="5"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_6">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="6"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_7">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="7"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_8">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="8"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
-
- <element name="text_a">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="A"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_b">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="B"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_c">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="C"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_d">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="D"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_e">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="E"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_f">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="F"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_g">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="G"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_h">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="H"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
-
- <element name="text_r11"><text string="K"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_r21"><text string="Q"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_r31"><text string="R"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_r41"><text string="B"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_r51"><text string="N"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_r61"><text string="P"><color red="0.81" green="0.8" blue="0.79" /></text></element>
-
- <element name="text_r12"><text string="PB" align="1"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_r22"><text string="PV" align="1"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_r32"><text string="TM" align="1"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_r42"><text string="ST" align="1"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_r52"><text string="TB" align="1"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_r62"><text string="LV" align="1"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_r72"><text string="OPTION" align="1"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_r82"><text string="RV" align="1"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_r92"><text string="NEW" align="1"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_r93"><text string="GAME" align="1"><color red="0.81" green="0.8" blue="0.79" /></text></element>
-
- <element name="text_rx1"><text string="YOUR MOVE"><color red="0.61" green="0.6" blue="0.59" /></text></element>
- <element name="text_ry1"><text string="CHECK"><color red="0.61" green="0.6" blue="0.59" /></text></element>
- <element name="text_rx2"><text string="CL" align="1"><color red="0.81" green="0.8" blue="0.79" /></text></element>
- <element name="text_ry2"><text string="DM" align="1"><color red="0.81" green="0.8" blue="0.79" /></text></element>
-
-
-<!-- build screen -->
-
- <view name="Internal Layout">
- <bounds left="-2" right="102" top="-2" bottom="88" />
- <bezel element="static_black">
- <bounds left="-2" right="102" top="-2" bottom="88" />
- </bezel>
-
- <bezel element="white"><bounds x="-2.5" y="-2.5" width="90.5" height="91" /></bezel>
-
- <!-- chessboard coords -->
-
- <bezel element="text_8"><bounds x="-0.8" y="7" width="2" height="2" /></bezel>
- <bezel element="text_7"><bounds x="-0.8" y="17" width="2" height="2" /></bezel>
- <bezel element="text_6"><bounds x="-0.8" y="27" width="2" height="2" /></bezel>
- <bezel element="text_5"><bounds x="-0.8" y="37" width="2" height="2" /></bezel>
- <bezel element="text_4"><bounds x="-0.8" y="47" width="2" height="2" /></bezel>
- <bezel element="text_3"><bounds x="-0.8" y="57" width="2" height="2" /></bezel>
- <bezel element="text_2"><bounds x="-0.8" y="67" width="2" height="2" /></bezel>
- <bezel element="text_1"><bounds x="-0.8" y="77" width="2" height="2" /></bezel>
-
- <bezel element="text_a"><bounds x="7" y="85" width="2" height="2" /></bezel>
- <bezel element="text_b"><bounds x="17" y="85" width="2" height="2" /></bezel>
- <bezel element="text_c"><bounds x="27" y="85" width="2" height="2" /></bezel>
- <bezel element="text_d"><bounds x="37" y="85" width="2" height="2" /></bezel>
- <bezel element="text_e"><bounds x="47" y="85" width="2" height="2" /></bezel>
- <bezel element="text_f"><bounds x="57" y="85" width="2" height="2" /></bezel>
- <bezel element="text_g"><bounds x="67" y="85" width="2" height="2" /></bezel>
- <bezel element="text_h"><bounds x="77" y="85" width="2" height="2" /></bezel>
-
- <!-- chessboard bezel -->
-
- <bezel element="black"><bounds x="2" y="2" width="82" height="82" /></bezel>
- <bezel element="white"><bounds x="3" y="3" width="80" height="80" /></bezel>
-
- <bezel element="black"><bounds x="13" y="2.5" width="10" height="10.5" /></bezel>
- <bezel element="black"><bounds x="33" y="2.5" width="10" height="10.5" /></bezel>
- <bezel element="black"><bounds x="53" y="2.5" width="10" height="10.5" /></bezel>
- <bezel element="black"><bounds x="73" y="2.5" width="10.5" height="10.5" /></bezel>
-
- <bezel element="black"><bounds x="2.5" y="13" width="10.5" height="10" /></bezel>
- <bezel element="black"><bounds x="23" y="13" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="43" y="13" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="63" y="13" width="10" height="10" /></bezel>
-
- <bezel element="black"><bounds x="13" y="23" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="33" y="23" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="53" y="23" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="73" y="23" width="10.5" height="10" /></bezel>
-
- <bezel element="black"><bounds x="2.5" y="33" width="10.5" height="10" /></bezel>
- <bezel element="black"><bounds x="23" y="33" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="43" y="33" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="63" y="33" width="10" height="10" /></bezel>
-
- <bezel element="black"><bounds x="13" y="43" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="33" y="43" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="53" y="43" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="73" y="43" width="10.5" height="10" /></bezel>
-
- <bezel element="black"><bounds x="2.5" y="53" width="10.5" height="10" /></bezel>
- <bezel element="black"><bounds x="23" y="53" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="43" y="53" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="63" y="53" width="10" height="10" /></bezel>
-
- <bezel element="black"><bounds x="13" y="63" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="33" y="63" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="53" y="63" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="73" y="63" width="10.5" height="10" /></bezel>
-
- <bezel element="black"><bounds x="2.5" y="73" width="10.5" height="10.5" /></bezel>
- <bezel element="black"><bounds x="23" y="73" width="10" height="10.5" /></bezel>
- <bezel element="black"><bounds x="43" y="73" width="10" height="10.5" /></bezel>
- <bezel element="black"><bounds x="63" y="73" width="10" height="10.5" /></bezel>
-
- <!-- chessboard leds -->
-
- <bezel name="7.15" element="led"><bounds x="11.3" y="11.3" width="1.5" height="1.5" /></bezel>
- <bezel name="7.14" element="led"><bounds x="21.3" y="11.3" width="1.5" height="1.5" /></bezel>
- <bezel name="7.13" element="led"><bounds x="31.3" y="11.3" width="1.5" height="1.5" /></bezel>
- <bezel name="7.12" element="led"><bounds x="41.3" y="11.3" width="1.5" height="1.5" /></bezel>
- <bezel name="7.11" element="led"><bounds x="51.3" y="11.3" width="1.5" height="1.5" /></bezel>
- <bezel name="7.10" element="led"><bounds x="61.3" y="11.3" width="1.5" height="1.5" /></bezel>
- <bezel name="7.9" element="led"><bounds x="71.3" y="11.3" width="1.5" height="1.5" /></bezel>
- <bezel name="7.8" element="led"><bounds x="81.3" y="11.3" width="1.5" height="1.5" /></bezel>
-
- <bezel name="6.15" element="led"><bounds x="11.3" y="21.3" width="1.5" height="1.5" /></bezel>
- <bezel name="6.14" element="led"><bounds x="21.3" y="21.3" width="1.5" height="1.5" /></bezel>
- <bezel name="6.13" element="led"><bounds x="31.3" y="21.3" width="1.5" height="1.5" /></bezel>
- <bezel name="6.12" element="led"><bounds x="41.3" y="21.3" width="1.5" height="1.5" /></bezel>
- <bezel name="6.11" element="led"><bounds x="51.3" y="21.3" width="1.5" height="1.5" /></bezel>
- <bezel name="6.10" element="led"><bounds x="61.3" y="21.3" width="1.5" height="1.5" /></bezel>
- <bezel name="6.9" element="led"><bounds x="71.3" y="21.3" width="1.5" height="1.5" /></bezel>
- <bezel name="6.8" element="led"><bounds x="81.3" y="21.3" width="1.5" height="1.5" /></bezel>
-
- <bezel name="5.15" element="led"><bounds x="11.3" y="31.3" width="1.5" height="1.5" /></bezel>
- <bezel name="5.14" element="led"><bounds x="21.3" y="31.3" width="1.5" height="1.5" /></bezel>
- <bezel name="5.13" element="led"><bounds x="31.3" y="31.3" width="1.5" height="1.5" /></bezel>
- <bezel name="5.12" element="led"><bounds x="41.3" y="31.3" width="1.5" height="1.5" /></bezel>
- <bezel name="5.11" element="led"><bounds x="51.3" y="31.3" width="1.5" height="1.5" /></bezel>
- <bezel name="5.10" element="led"><bounds x="61.3" y="31.3" width="1.5" height="1.5" /></bezel>
- <bezel name="5.9" element="led"><bounds x="71.3" y="31.3" width="1.5" height="1.5" /></bezel>
- <bezel name="5.8" element="led"><bounds x="81.3" y="31.3" width="1.5" height="1.5" /></bezel>
-
- <bezel name="4.15" element="led"><bounds x="11.3" y="41.3" width="1.5" height="1.5" /></bezel>
- <bezel name="4.14" element="led"><bounds x="21.3" y="41.3" width="1.5" height="1.5" /></bezel>
- <bezel name="4.13" element="led"><bounds x="31.3" y="41.3" width="1.5" height="1.5" /></bezel>
- <bezel name="4.12" element="led"><bounds x="41.3" y="41.3" width="1.5" height="1.5" /></bezel>
- <bezel name="4.11" element="led"><bounds x="51.3" y="41.3" width="1.5" height="1.5" /></bezel>
- <bezel name="4.10" element="led"><bounds x="61.3" y="41.3" width="1.5" height="1.5" /></bezel>
- <bezel name="4.9" element="led"><bounds x="71.3" y="41.3" width="1.5" height="1.5" /></bezel>
- <bezel name="4.8" element="led"><bounds x="81.3" y="41.3" width="1.5" height="1.5" /></bezel>
-
- <bezel name="3.15" element="led"><bounds x="11.3" y="51.3" width="1.5" height="1.5" /></bezel>
- <bezel name="3.14" element="led"><bounds x="21.3" y="51.3" width="1.5" height="1.5" /></bezel>
- <bezel name="3.13" element="led"><bounds x="31.3" y="51.3" width="1.5" height="1.5" /></bezel>
- <bezel name="3.12" element="led"><bounds x="41.3" y="51.3" width="1.5" height="1.5" /></bezel>
- <bezel name="3.11" element="led"><bounds x="51.3" y="51.3" width="1.5" height="1.5" /></bezel>
- <bezel name="3.10" element="led"><bounds x="61.3" y="51.3" width="1.5" height="1.5" /></bezel>
- <bezel name="3.9" element="led"><bounds x="71.3" y="51.3" width="1.5" height="1.5" /></bezel>
- <bezel name="3.8" element="led"><bounds x="81.3" y="51.3" width="1.5" height="1.5" /></bezel>
-
- <bezel name="2.15" element="led"><bounds x="11.3" y="61.3" width="1.5" height="1.5" /></bezel>
- <bezel name="2.14" element="led"><bounds x="21.3" y="61.3" width="1.5" height="1.5" /></bezel>
- <bezel name="2.13" element="led"><bounds x="31.3" y="61.3" width="1.5" height="1.5" /></bezel>
- <bezel name="2.12" element="led"><bounds x="41.3" y="61.3" width="1.5" height="1.5" /></bezel>
- <bezel name="2.11" element="led"><bounds x="51.3" y="61.3" width="1.5" height="1.5" /></bezel>
- <bezel name="2.10" element="led"><bounds x="61.3" y="61.3" width="1.5" height="1.5" /></bezel>
- <bezel name="2.9" element="led"><bounds x="71.3" y="61.3" width="1.5" height="1.5" /></bezel>
- <bezel name="2.8" element="led"><bounds x="81.3" y="61.3" width="1.5" height="1.5" /></bezel>
-
- <bezel name="1.15" element="led"><bounds x="11.3" y="71.3" width="1.5" height="1.5" /></bezel>
- <bezel name="1.14" element="led"><bounds x="21.3" y="71.3" width="1.5" height="1.5" /></bezel>
- <bezel name="1.13" element="led"><bounds x="31.3" y="71.3" width="1.5" height="1.5" /></bezel>
- <bezel name="1.12" element="led"><bounds x="41.3" y="71.3" width="1.5" height="1.5" /></bezel>
- <bezel name="1.11" element="led"><bounds x="51.3" y="71.3" width="1.5" height="1.5" /></bezel>
- <bezel name="1.10" element="led"><bounds x="61.3" y="71.3" width="1.5" height="1.5" /></bezel>
- <bezel name="1.9" element="led"><bounds x="71.3" y="71.3" width="1.5" height="1.5" /></bezel>
- <bezel name="1.8" element="led"><bounds x="81.3" y="71.3" width="1.5" height="1.5" /></bezel>
-
- <bezel name="0.15" element="led"><bounds x="11.3" y="81.3" width="1.5" height="1.5" /></bezel>
- <bezel name="0.14" element="led"><bounds x="21.3" y="81.3" width="1.5" height="1.5" /></bezel>
- <bezel name="0.13" element="led"><bounds x="31.3" y="81.3" width="1.5" height="1.5" /></bezel>
- <bezel name="0.12" element="led"><bounds x="41.3" y="81.3" width="1.5" height="1.5" /></bezel>
- <bezel name="0.11" element="led"><bounds x="51.3" y="81.3" width="1.5" height="1.5" /></bezel>
- <bezel name="0.10" element="led"><bounds x="61.3" y="81.3" width="1.5" height="1.5" /></bezel>
- <bezel name="0.9" element="led"><bounds x="71.3" y="81.3" width="1.5" height="1.5" /></bezel>
- <bezel name="0.8" element="led"><bounds x="81.3" y="81.3" width="1.5" height="1.5" /></bezel>
-
- <!-- chessboard sensors -->
-
- <bezel element="hl" inputtag="IN.7" inputmask="0x80"><bounds x="3" y="3" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.7" inputmask="0x40"><bounds x="13" y="3" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.7" inputmask="0x20"><bounds x="23" y="3" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.7" inputmask="0x10"><bounds x="33" y="3" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.7" inputmask="0x08"><bounds x="43" y="3" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.7" inputmask="0x04"><bounds x="53" y="3" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.7" inputmask="0x02"><bounds x="63" y="3" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.7" inputmask="0x01"><bounds x="73" y="3" width="10" height="10" /><color alpha="0.2" /></bezel>
-
- <bezel element="hl" inputtag="IN.6" inputmask="0x80"><bounds x="3" y="13" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.6" inputmask="0x40"><bounds x="13" y="13" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.6" inputmask="0x20"><bounds x="23" y="13" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.6" inputmask="0x10"><bounds x="33" y="13" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.6" inputmask="0x08"><bounds x="43" y="13" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.6" inputmask="0x04"><bounds x="53" y="13" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.6" inputmask="0x02"><bounds x="63" y="13" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.6" inputmask="0x01"><bounds x="73" y="13" width="10" height="10" /><color alpha="0.4" /></bezel>
-
- <bezel element="hl" inputtag="IN.5" inputmask="0x80"><bounds x="3" y="23" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.5" inputmask="0x40"><bounds x="13" y="23" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.5" inputmask="0x20"><bounds x="23" y="23" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.5" inputmask="0x10"><bounds x="33" y="23" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.5" inputmask="0x08"><bounds x="43" y="23" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.5" inputmask="0x04"><bounds x="53" y="23" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.5" inputmask="0x02"><bounds x="63" y="23" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.5" inputmask="0x01"><bounds x="73" y="23" width="10" height="10" /><color alpha="0.2" /></bezel>
-
- <bezel element="hl" inputtag="IN.4" inputmask="0x80"><bounds x="3" y="33" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.4" inputmask="0x40"><bounds x="13" y="33" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.4" inputmask="0x20"><bounds x="23" y="33" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.4" inputmask="0x10"><bounds x="33" y="33" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.4" inputmask="0x08"><bounds x="43" y="33" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.4" inputmask="0x04"><bounds x="53" y="33" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.4" inputmask="0x02"><bounds x="63" y="33" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.4" inputmask="0x01"><bounds x="73" y="33" width="10" height="10" /><color alpha="0.4" /></bezel>
-
- <bezel element="hl" inputtag="IN.3" inputmask="0x80"><bounds x="3" y="43" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x40"><bounds x="13" y="43" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x20"><bounds x="23" y="43" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x10"><bounds x="33" y="43" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x08"><bounds x="43" y="43" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x04"><bounds x="53" y="43" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x02"><bounds x="63" y="43" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x01"><bounds x="73" y="43" width="10" height="10" /><color alpha="0.2" /></bezel>
-
- <bezel element="hl" inputtag="IN.2" inputmask="0x80"><bounds x="3" y="53" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x40"><bounds x="13" y="53" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x20"><bounds x="23" y="53" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x10"><bounds x="33" y="53" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x08"><bounds x="43" y="53" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x04"><bounds x="53" y="53" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x02"><bounds x="63" y="53" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x01"><bounds x="73" y="53" width="10" height="10" /><color alpha="0.4" /></bezel>
-
- <bezel element="hl" inputtag="IN.1" inputmask="0x80"><bounds x="3" y="63" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x40"><bounds x="13" y="63" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x20"><bounds x="23" y="63" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x10"><bounds x="33" y="63" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x08"><bounds x="43" y="63" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x04"><bounds x="53" y="63" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x02"><bounds x="63" y="63" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x01"><bounds x="73" y="63" width="10" height="10" /><color alpha="0.2" /></bezel>
-
- <bezel element="hl" inputtag="IN.0" inputmask="0x80"><bounds x="3" y="73" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.0" inputmask="0x40"><bounds x="13" y="73" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.0" inputmask="0x20"><bounds x="23" y="73" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.0" inputmask="0x10"><bounds x="33" y="73" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.0" inputmask="0x08"><bounds x="43" y="73" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.0" inputmask="0x04"><bounds x="53" y="73" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.0" inputmask="0x02"><bounds x="63" y="73" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.0" inputmask="0x01"><bounds x="73" y="73" width="10" height="10" /><color alpha="0.4" /></bezel>
-
- <!-- panel 7seg leds -->
-
- <bezel name="digit6" element="digit"><bounds x="90" y="3" width="8.5" height="5.66" /><orientation rotate="90" /></bezel>
- <bezel name="digit5" element="digit"><bounds x="90" y="8.66" width="8.5" height="5.66" /><orientation rotate="90" /></bezel>
- <bezel name="digit7" element="digit"><bounds x="90" y="17.16" width="8.5" height="5.66" /><orientation rotate="90" /></bezel>
- <bezel name="digit8" element="digit"><bounds x="90" y="22.82" width="8.5" height="5.66" /><orientation rotate="90" /></bezel>
-
- <bezel name="5.7" element="led"><bounds x="96.15" y="15.58" width="0.85" height="0.85" /></bezel>
- <bezel name="6.7" element="led"><bounds x="91.5" y="15.13" width="0.85" height="0.85" /></bezel>
-
- <bezel name="digit1" element="digit"><bounds x="90" y="53" width="8.5" height="5.66" /><orientation rotate="90" /></bezel>
- <bezel name="digit0" element="digit"><bounds x="90" y="58.66" width="8.5" height="5.66" /><orientation rotate="90" /></bezel>
- <bezel name="digit2" element="digit"><bounds x="90" y="67.16" width="8.5" height="5.66" /><orientation rotate="90" /></bezel>
- <bezel name="digit3" element="digit"><bounds x="90" y="72.82" width="8.5" height="5.66" /><orientation rotate="90" /></bezel>
-
- <bezel name="0.7" element="led"><bounds x="96.15" y="65.58" width="0.85" height="0.85" /></bezel>
- <bezel name="1.7" element="led"><bounds x="91.5" y="65.13" width="0.85" height="0.85" /></bezel>
-
- <!-- right side -->
-
- <bezel element="text_r11"><bounds x="91.5" y="29.75" width="2.5" height="1.5" /></bezel>
- <bezel element="text_r21"><bounds x="91.5" y="32.25" width="2.5" height="1.5" /></bezel>
- <bezel element="text_r31"><bounds x="91.5" y="34.75" width="2.5" height="1.5" /></bezel>
- <bezel element="text_r41"><bounds x="91.5" y="37.25" width="2.5" height="1.5" /></bezel>
- <bezel element="text_r51"><bounds x="91.5" y="39.75" width="2.5" height="1.5" /></bezel>
- <bezel element="text_r61"><bounds x="91.5" y="42.25" width="2.5" height="1.5" /></bezel>
-
- <bezel element="text_r12"><bounds x="96.8" y="29.75" width="10" height="1.5" /></bezel>
- <bezel element="text_r22"><bounds x="96.8" y="32.25" width="10" height="1.5" /></bezel>
- <bezel element="text_r32"><bounds x="96.8" y="34.75" width="10" height="1.5" /></bezel>
- <bezel element="text_r42"><bounds x="96.8" y="37.25" width="10" height="1.5" /></bezel>
- <bezel element="text_r52"><bounds x="96.8" y="39.75" width="10" height="1.5" /></bezel>
- <bezel element="text_r62"><bounds x="96.8" y="42.25" width="10" height="1.5" /></bezel>
- <bezel element="text_r72"><bounds x="96.8" y="44.75" width="10" height="1.5" /></bezel>
- <bezel element="text_r82"><bounds x="96.8" y="47.25" width="10" height="1.5" /></bezel>
-
- <bezel element="text_r92"><bounds x="96.8" y="49.5" width="10" height="1.5" /></bezel>
- <bezel element="text_r93"><bounds x="96.8" y="51" width="10" height="1.5" /></bezel>
-
- <bezel name="8.10" element="led2"><bounds x="90" y="29.75" width="1.5" height="1.5" /></bezel>
- <bezel name="8.11" element="led2"><bounds x="90" y="32.25" width="1.5" height="1.5" /></bezel>
- <bezel name="8.12" element="led2"><bounds x="90" y="34.75" width="1.5" height="1.5" /></bezel>
- <bezel name="8.13" element="led2"><bounds x="90" y="37.25" width="1.5" height="1.5" /></bezel>
- <bezel name="8.14" element="led2"><bounds x="90" y="39.75" width="1.5" height="1.5" /></bezel>
- <bezel name="8.15" element="led2"><bounds x="90" y="42.25" width="1.5" height="1.5" /></bezel>
-
- <bezel element="bt" inputtag="IN.8" inputmask="0x01"><bounds x="94" y="29.5" width="2" height="2" /></bezel>
- <bezel element="bt" inputtag="IN.8" inputmask="0x02"><bounds x="94" y="32" width="2" height="2" /></bezel>
- <bezel element="bt" inputtag="IN.8" inputmask="0x04"><bounds x="94" y="34.5" width="2" height="2" /></bezel>
- <bezel element="bt" inputtag="IN.8" inputmask="0x08"><bounds x="94" y="37" width="2" height="2" /></bezel>
- <bezel element="bt" inputtag="IN.8" inputmask="0x10"><bounds x="94" y="39.5" width="2" height="2" /></bezel>
- <bezel element="bt" inputtag="IN.8" inputmask="0x20"><bounds x="94" y="42" width="2" height="2" /></bezel>
- <bezel element="bt" inputtag="IN.8" inputmask="0x40"><bounds x="94" y="44.5" width="2" height="2" /></bezel>
- <bezel element="bt" inputtag="IN.8" inputmask="0x80"><bounds x="94" y="47" width="2" height="2" /></bezel>
- <bezel element="bt" inputtag="IN.2" inputmask="0x100"><bounds x="94" y="49.5" width="2" height="2" /></bezel>
-
- <bezel element="text_rx2"><bounds x="96.8" y="79.75" width="10" height="1.5" /></bezel>
- <bezel element="text_ry2"><bounds x="96.8" y="82.25" width="10" height="1.5" /></bezel>
- <bezel element="text_rx1"><bounds x="88" y="78.75" width="6" height="1" /></bezel>
- <bezel element="text_ry1"><bounds x="88" y="81.25" width="5.5" height="1" /></bezel>
-
- <bezel name="8.9" element="led2y"><bounds x="90" y="79.75" width="1.5" height="1.5" /></bezel>
- <bezel name="8.8" element="led2g"><bounds x="90" y="82.25" width="1.5" height="1.5" /></bezel>
-
- <bezel element="bt" inputtag="IN.0" inputmask="0x100"><bounds x="94" y="79.5" width="2" height="2" /></bezel>
- <bezel element="bt" inputtag="IN.1" inputmask="0x100"><bounds x="94" y="82" width="2" height="2" /></bezel>
-
-
- </view>
-</mamelayout>
diff --git a/src/mame/layout/fidel_fev.lay b/src/mame/layout/fidel_fev.lay
index 93d4abaf163..8c4637ab6ce 100644
--- a/src/mame/layout/fidel_fev.lay
+++ b/src/mame/layout/fidel_fev.lay
@@ -3,482 +3,38 @@
<!-- define elements -->
- <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
-
- <element name="digit" defstate="0">
- <led7seg><color red="1.0" green="0.1" blue="0.15" /></led7seg>
- </element>
-
- <element name="led" defstate="0">
- <disk state="1"><color red="1.0" green="0.1" blue="0.15" /></disk>
- <disk state="0"><color red="0.1" green="0.01" blue="0.015" /></disk>
+ <element name="ledr" defstate="0">
+ <disk state="0"><color red="0.2" green="0.04" blue="0.046" /></disk>
+ <disk state="1"><color red="1.0" green="0.2" blue="0.23" /></disk>
</element>
<element name="ledg" defstate="0">
- <disk state="1"><color red="0.1" green="1.0" blue="0.15" /></disk>
- <disk state="0"><color red="0.01" green="0.1" blue="0.015" /></disk>
- </element>
-
- <element name="hl" defstate="0">
- <text string=" ">
- <bounds x="0.0" y="0.0" width="1.0" height="1.0" />
- <color red="0.0" green="0.0" blue="0.0" />
- </text>
- <disk state="1">
- <bounds x="0.12" y="0.12" width="0.76" height="0.76" />
- <color red="1.0" green="1.0" blue="1.0" />
- </disk>
- </element>
- <element name="hlb" defstate="0">
- <text string=" ">
- <bounds x="0.0" y="0.0" width="1.0" height="1.0" />
- <color red="0.0" green="0.0" blue="0.0" />
- </text>
- <rect state="1">
- <bounds x="0.0" y="0.0" width="1.0" height="1.0" />
- <color red="1.0" green="1.0" blue="1.0" />
- </rect>
- </element>
-
- <element name="black"><rect><color red="0.17" green="0.15" blue="0.15" /></rect></element>
- <element name="white"><rect><color red="0.81" green="0.8" blue="0.79" /></rect></element>
- <element name="redb"><rect><color red="0.81" green="0.3" blue="0.29" /></rect></element>
-
- <element name="text_1">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="1" align="2"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_2">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="2" align="2"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_3">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="3" align="2"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_4">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="4" align="2"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_5">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="5" align="2"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_6">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="6" align="2"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_7">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="7" align="2"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_8">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="8" align="2"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
-
- <element name="text_9">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="9" align="2"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_10">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="10" align="2"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_11">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="11" align="2"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_12">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="12" align="2"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
-
- <element name="text_a">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="A"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_b">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="B"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_c">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="C"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_d">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="D"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_e">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="E"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_f">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="F"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_g">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="G"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_h">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="H"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
-
- <element name="text_lb">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="CHECK"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_lc">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="MATE"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_ld">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="WHITE"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_le">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="BLACK"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_lf">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="STALEMATE"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_lg">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="DRAW"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_lh">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="I LOSE"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
-
- <element name="text_t81">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="NEW"><color red="0.17" green="0.15" blue="0.15" /></text>
- </element>
- <element name="text_t82">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="GAME"><color red="0.17" green="0.15" blue="0.15" /></text>
- </element>
- <element name="text_t7">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="VERIFY"><color red="0.17" green="0.15" blue="0.15" /></text>
- </element>
- <element name="text_t6">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="OPTIONS"><color red="0.17" green="0.15" blue="0.15" /></text>
- </element>
- <element name="text_t5">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="LEVEL"><color red="0.17" green="0.15" blue="0.15" /></text>
- </element>
- <element name="text_t41">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="TAKE"><color red="0.17" green="0.15" blue="0.15" /></text>
- </element>
- <element name="text_t42">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="BACK"><color red="0.17" green="0.15" blue="0.15" /></text>
- </element>
- <element name="text_t3">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="HINT"><color red="0.17" green="0.15" blue="0.15" /></text>
- </element>
- <element name="text_t2">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="MOVE"><color red="0.17" green="0.15" blue="0.15" /></text>
- </element>
- <element name="text_t1">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="CLEAR"><color red="0.17" green="0.15" blue="0.15" /></text>
- </element>
-
- <element name="text_tl7">
- <rect><color red="0.17" green="0.15" blue="0.15" /></rect>
- <text string="king"><color red="0.65" green="0.15" blue="0.14" /></text>
- </element>
- <element name="text_tl6">
- <rect><color red="0.17" green="0.15" blue="0.15" /></rect>
- <text string="queen"><color red="0.65" green="0.15" blue="0.14" /></text>
- </element>
- <element name="text_tl5">
- <rect><color red="0.17" green="0.15" blue="0.15" /></rect>
- <text string="rook"><color red="0.65" green="0.15" blue="0.14" /></text>
- </element>
- <element name="text_tl4">
- <rect><color red="0.17" green="0.15" blue="0.15" /></rect>
- <text string="bishop"><color red="0.65" green="0.15" blue="0.14" /></text>
- </element>
- <element name="text_tl3">
- <rect><color red="0.17" green="0.15" blue="0.15" /></rect>
- <text string="knight"><color red="0.65" green="0.15" blue="0.14" /></text>
- </element>
- <element name="text_tl2">
- <rect><color red="0.17" green="0.15" blue="0.15" /></rect>
- <text string="pion"><color red="0.65" green="0.15" blue="0.14" /></text>
+ <disk state="0"><color red="0.04" green="0.2" blue="0.046" /></disk>
+ <disk state="1"><color red="0.2" green="1.0" blue="0.23" /></disk>
</element>
<!-- build screen -->
<view name="Internal Layout">
- <bounds left="-2" right="98" top="-14.5" bottom="89" />
- <bezel element="static_black">
- <bounds left="-2" right="98" top="-14.5" bottom="89" />
- </bezel>
-
- <bezel element="white"><bounds x="-2.5" y="-2" width="101" height="91.5" /></bezel>
-
- <!-- chessboard coords -->
-
- <bezel element="text_8"><bounds x="-0.3" y="9" width="2" height="2" /></bezel>
- <bezel element="text_7"><bounds x="-0.3" y="19" width="2" height="2" /></bezel>
- <bezel element="text_6"><bounds x="-0.3" y="29" width="2" height="2" /></bezel>
- <bezel element="text_5"><bounds x="-0.3" y="39" width="2" height="2" /></bezel>
- <bezel element="text_4"><bounds x="-0.3" y="49" width="2" height="2" /></bezel>
- <bezel element="text_3"><bounds x="-0.3" y="59" width="2" height="2" /></bezel>
- <bezel element="text_2"><bounds x="-0.3" y="69" width="2" height="2" /></bezel>
- <bezel element="text_1"><bounds x="-0.3" y="79" width="2" height="2" /></bezel>
-
- <bezel element="text_a"><bounds x="5" y="84.2" width="2" height="2" /></bezel>
- <bezel element="text_b"><bounds x="15" y="84.2" width="2" height="2" /></bezel>
- <bezel element="text_c"><bounds x="25" y="84.2" width="2" height="2" /></bezel>
- <bezel element="text_d"><bounds x="35" y="84.2" width="2" height="2" /></bezel>
- <bezel element="text_e"><bounds x="45" y="84.2" width="2" height="2" /></bezel>
- <bezel element="text_f"><bounds x="55" y="84.2" width="2" height="2" /></bezel>
- <bezel element="text_g"><bounds x="65" y="84.2" width="2" height="2" /></bezel>
- <bezel element="text_h"><bounds x="75" y="84.2" width="2" height="2" /></bezel>
-
- <!-- left side labels -->
-
- <bezel element="text_9"><bounds x="-4.3" y="12" width="5" height="2" /></bezel>
- <bezel element="text_10"><bounds x="-4.3" y="22" width="5" height="2" /></bezel>
- <bezel element="text_11"><bounds x="-4.3" y="32" width="5" height="2" /></bezel>
- <bezel element="text_12"><bounds x="-4.3" y="42" width="5" height="2" /></bezel>
-
- <!-- bottom side labels -->
-
- <bezel element="text_lb"><bounds x="13" y="86.3" width="10" height="2" /></bezel>
- <bezel element="text_lc"><bounds x="23" y="86.3" width="10" height="2" /></bezel>
- <bezel element="text_ld"><bounds x="33" y="86.3" width="10" height="2" /></bezel>
- <bezel element="text_le"><bounds x="43" y="86.3" width="10" height="2" /></bezel>
- <bezel element="text_lf"><bounds x="53" y="86.3" width="10" height="2" /></bezel>
- <bezel element="text_lh"><bounds x="73" y="86.3" width="10" height="2" /></bezel>
- <bezel element="text_lg"><bounds x="62" y="86.3" width="12" height="2" /></bezel>
-
- <!-- chessboard bezel -->
-
- <bezel element="black"><bounds x="2" y="2" width="82" height="82" /></bezel>
- <bezel element="white"><bounds x="3" y="3" width="80" height="80" /></bezel>
-
- <bezel element="black"><bounds x="13" y="2.5" width="10" height="10.5" /></bezel>
- <bezel element="black"><bounds x="33" y="2.5" width="10" height="10.5" /></bezel>
- <bezel element="black"><bounds x="53" y="2.5" width="10" height="10.5" /></bezel>
- <bezel element="black"><bounds x="73" y="2.5" width="10.5" height="10.5" /></bezel>
-
- <bezel element="black"><bounds x="2.5" y="13" width="10.5" height="10" /></bezel>
- <bezel element="black"><bounds x="23" y="13" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="43" y="13" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="63" y="13" width="10" height="10" /></bezel>
-
- <bezel element="black"><bounds x="13" y="23" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="33" y="23" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="53" y="23" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="73" y="23" width="10.5" height="10" /></bezel>
-
- <bezel element="black"><bounds x="2.5" y="33" width="10.5" height="10" /></bezel>
- <bezel element="black"><bounds x="23" y="33" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="43" y="33" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="63" y="33" width="10" height="10" /></bezel>
-
- <bezel element="black"><bounds x="13" y="43" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="33" y="43" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="53" y="43" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="73" y="43" width="10.5" height="10" /></bezel>
-
- <bezel element="black"><bounds x="2.5" y="53" width="10.5" height="10" /></bezel>
- <bezel element="black"><bounds x="23" y="53" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="43" y="53" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="63" y="53" width="10" height="10" /></bezel>
-
- <bezel element="black"><bounds x="13" y="63" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="33" y="63" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="53" y="63" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="73" y="63" width="10.5" height="10" /></bezel>
-
- <bezel element="black"><bounds x="2.5" y="73" width="10.5" height="10.5" /></bezel>
- <bezel element="black"><bounds x="23" y="73" width="10" height="10.5" /></bezel>
- <bezel element="black"><bounds x="43" y="73" width="10" height="10.5" /></bezel>
- <bezel element="black"><bounds x="63" y="73" width="10" height="10.5" /></bezel>
-
- <!-- chessboard sensors -->
-
- <bezel element="hl" inputtag="IN.0" inputmask="0x80"><bounds x="3" y="3" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x80"><bounds x="13" y="3" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x80"><bounds x="23" y="3" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x80"><bounds x="33" y="3" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.4" inputmask="0x80"><bounds x="43" y="3" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.5" inputmask="0x80"><bounds x="53" y="3" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.6" inputmask="0x80"><bounds x="63" y="3" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.7" inputmask="0x80"><bounds x="73" y="3" width="10" height="10" /><color alpha="0.2" /></bezel>
-
- <bezel element="hl" inputtag="IN.0" inputmask="0x40"><bounds x="3" y="13" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x40"><bounds x="13" y="13" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x40"><bounds x="23" y="13" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x40"><bounds x="33" y="13" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.4" inputmask="0x40"><bounds x="43" y="13" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.5" inputmask="0x40"><bounds x="53" y="13" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.6" inputmask="0x40"><bounds x="63" y="13" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.7" inputmask="0x40"><bounds x="73" y="13" width="10" height="10" /><color alpha="0.4" /></bezel>
-
- <bezel element="hl" inputtag="IN.0" inputmask="0x20"><bounds x="3" y="23" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x20"><bounds x="13" y="23" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x20"><bounds x="23" y="23" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x20"><bounds x="33" y="23" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.4" inputmask="0x20"><bounds x="43" y="23" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.5" inputmask="0x20"><bounds x="53" y="23" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.6" inputmask="0x20"><bounds x="63" y="23" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.7" inputmask="0x20"><bounds x="73" y="23" width="10" height="10" /><color alpha="0.2" /></bezel>
-
- <bezel element="hl" inputtag="IN.0" inputmask="0x10"><bounds x="3" y="33" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x10"><bounds x="13" y="33" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x10"><bounds x="23" y="33" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x10"><bounds x="33" y="33" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.4" inputmask="0x10"><bounds x="43" y="33" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.5" inputmask="0x10"><bounds x="53" y="33" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.6" inputmask="0x10"><bounds x="63" y="33" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.7" inputmask="0x10"><bounds x="73" y="33" width="10" height="10" /><color alpha="0.4" /></bezel>
-
- <bezel element="hl" inputtag="IN.0" inputmask="0x08"><bounds x="3" y="43" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x08"><bounds x="13" y="43" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x08"><bounds x="23" y="43" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x08"><bounds x="33" y="43" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.4" inputmask="0x08"><bounds x="43" y="43" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.5" inputmask="0x08"><bounds x="53" y="43" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.6" inputmask="0x08"><bounds x="63" y="43" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.7" inputmask="0x08"><bounds x="73" y="43" width="10" height="10" /><color alpha="0.2" /></bezel>
-
- <bezel element="hl" inputtag="IN.0" inputmask="0x04"><bounds x="3" y="53" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x04"><bounds x="13" y="53" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x04"><bounds x="23" y="53" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x04"><bounds x="33" y="53" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.4" inputmask="0x04"><bounds x="43" y="53" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.5" inputmask="0x04"><bounds x="53" y="53" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.6" inputmask="0x04"><bounds x="63" y="53" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.7" inputmask="0x04"><bounds x="73" y="53" width="10" height="10" /><color alpha="0.4" /></bezel>
-
- <bezel element="hl" inputtag="IN.0" inputmask="0x02"><bounds x="3" y="63" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x02"><bounds x="13" y="63" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x02"><bounds x="23" y="63" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x02"><bounds x="33" y="63" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.4" inputmask="0x02"><bounds x="43" y="63" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.5" inputmask="0x02"><bounds x="53" y="63" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.6" inputmask="0x02"><bounds x="63" y="63" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.7" inputmask="0x02"><bounds x="73" y="63" width="10" height="10" /><color alpha="0.2" /></bezel>
-
- <bezel element="hl" inputtag="IN.0" inputmask="0x01"><bounds x="3" y="73" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x01"><bounds x="13" y="73" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x01"><bounds x="23" y="73" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x01"><bounds x="33" y="73" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.4" inputmask="0x01"><bounds x="43" y="73" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.5" inputmask="0x01"><bounds x="53" y="73" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.6" inputmask="0x01"><bounds x="63" y="73" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.7" inputmask="0x01"><bounds x="73" y="73" width="10" height="10" /><color alpha="0.4" /></bezel>
-
- <!-- chessboard leds -->
-
- <bezel name="0.7" element="led"><bounds x="1.5" y="7.25" width="1.5" height="1.5" /></bezel>
- <bezel name="0.6" element="led"><bounds x="1.5" y="17.25" width="1.5" height="1.5" /></bezel>
- <bezel name="0.5" element="led"><bounds x="1.5" y="27.25" width="1.5" height="1.5" /></bezel>
- <bezel name="0.4" element="led"><bounds x="1.5" y="37.25" width="1.5" height="1.5" /></bezel>
- <bezel name="0.3" element="led"><bounds x="1.5" y="47.25" width="1.5" height="1.5" /></bezel>
- <bezel name="0.2" element="led"><bounds x="1.5" y="57.25" width="1.5" height="1.5" /></bezel>
- <bezel name="0.1" element="led"><bounds x="1.5" y="67.25" width="1.5" height="1.5" /></bezel>
- <bezel name="0.0" element="led"><bounds x="1.5" y="77.25" width="1.5" height="1.5" /></bezel>
-
- <bezel name="1.0" element="ledg"><bounds x="7.25" y="83" width="1.5" height="1.5" /></bezel>
- <bezel name="1.1" element="ledg"><bounds x="17.25" y="83" width="1.5" height="1.5" /></bezel>
- <bezel name="1.2" element="ledg"><bounds x="27.25" y="83" width="1.5" height="1.5" /></bezel>
- <bezel name="1.3" element="ledg"><bounds x="37.25" y="83" width="1.5" height="1.5" /></bezel>
- <bezel name="1.4" element="ledg"><bounds x="47.25" y="83" width="1.5" height="1.5" /></bezel>
- <bezel name="1.5" element="ledg"><bounds x="57.25" y="83" width="1.5" height="1.5" /></bezel>
- <bezel name="1.6" element="ledg"><bounds x="67.25" y="83" width="1.5" height="1.5" /></bezel>
- <bezel name="1.7" element="ledg"><bounds x="77.25" y="83" width="1.5" height="1.5" /></bezel>
-
- <!-- 7seg leds -->
-
- <bezel name="digit2" element="digit">
- <bounds x="64.18" y="-12.5" width="5.66" height="8.5" />
- </bezel>
- <bezel name="digit3" element="digit">
- <bounds x="69.84" y="-12.5" width="5.66" height="8.5" />
- </bezel>
- <bezel name="digit4" element="digit">
- <bounds x="78.34" y="-12.5" width="5.66" height="8.5" />
- </bezel>
- <bezel name="digit5" element="digit">
- <bounds x="84" y="-12.5" width="5.66" height="8.5" />
- </bezel>
-
- <bezel name="3.7" element="led">
- <bounds x="76.76" y="-11" width="0.85" height="0.85" />
- </bezel>
- <bezel name="2.7" element="led">
- <bounds x="76.31" y="-6.35" width="0.85" height="0.85" />
- </bezel>
-
- <!-- right side -->
-
- <bezel element="black"><bounds x="86" y="2" width="10" height="82" /></bezel>
-
- <bezel element="text_tl7"><bounds x="87" y="17" width="8" height="1.7" /></bezel>
- <bezel element="text_tl6"><bounds x="87" y="26" width="8" height="1.7" /></bezel>
- <bezel element="text_tl5"><bounds x="87" y="35" width="8" height="1.7" /></bezel>
- <bezel element="text_tl4"><bounds x="87" y="44" width="8" height="1.7" /></bezel>
- <bezel element="text_tl3"><bounds x="87" y="53" width="8" height="1.7" /></bezel>
- <bezel element="text_tl2"><bounds x="87" y="62" width="8" height="1.7" /></bezel>
-
- <bezel element="redb"><bounds x="87" y="9" width="8" height="4" /></bezel>
- <bezel element="redb"><bounds x="87" y="19" width="8" height="4" /></bezel>
- <bezel element="redb"><bounds x="87" y="28" width="8" height="4" /></bezel>
- <bezel element="redb"><bounds x="87" y="37" width="8" height="4" /></bezel>
- <bezel element="redb"><bounds x="87" y="46" width="8" height="4" /></bezel>
- <bezel element="redb"><bounds x="87" y="55" width="8" height="4" /></bezel>
- <bezel element="redb"><bounds x="87" y="64" width="8" height="4" /></bezel>
- <bezel element="redb"><bounds x="87" y="73" width="8" height="4" /></bezel>
-
- <bezel element="white"><bounds x="87.3" y="9.3" width="7.4" height="3.4" /></bezel>
- <bezel element="white"><bounds x="87.3" y="19.3" width="7.4" height="3.4" /></bezel>
- <bezel element="white"><bounds x="87.3" y="28.3" width="7.4" height="3.4" /></bezel>
- <bezel element="white"><bounds x="87.3" y="37.3" width="7.4" height="3.4" /></bezel>
- <bezel element="white"><bounds x="87.3" y="46.3" width="7.4" height="3.4" /></bezel>
- <bezel element="white"><bounds x="87.3" y="55.3" width="7.4" height="3.4" /></bezel>
- <bezel element="white"><bounds x="87.3" y="64.3" width="7.4" height="3.4" /></bezel>
- <bezel element="white"><bounds x="87.3" y="73.3" width="7.4" height="3.4" /></bezel>
-
- <bezel element="text_t81"><bounds x="87.35" y="9.5" width="7.3" height="1.5" /></bezel>
- <bezel element="text_t82"><bounds x="87.35" y="11" width="7.3" height="1.5" /></bezel>
- <bezel element="text_t7"><bounds x="87.35" y="20.25" width="7.3" height="1.5" /></bezel>
- <bezel element="text_t6"><bounds x="87.35" y="29.25" width="7.3" height="1.5" /></bezel>
- <bezel element="text_t5"><bounds x="87.35" y="38.25" width="7.3" height="1.5" /></bezel>
- <bezel element="text_t41"><bounds x="87.35" y="46.5" width="7.3" height="1.5" /></bezel>
- <bezel element="text_t42"><bounds x="87.35" y="48" width="7.3" height="1.5" /></bezel>
- <bezel element="text_t3"><bounds x="87.35" y="56.25" width="7.3" height="1.5" /></bezel>
- <bezel element="text_t2"><bounds x="87.35" y="65.25" width="7.3" height="1.5" /></bezel>
- <bezel element="text_t1"><bounds x="87.35" y="74.25" width="7.3" height="1.5" /></bezel>
-
- <bezel element="hlb" inputtag="IN.8" inputmask="0x80"><bounds x="87" y="9" width="8" height="4" /><color alpha="0.4" /></bezel>
- <bezel element="hlb" inputtag="IN.8" inputmask="0x40"><bounds x="87" y="19" width="8" height="4" /><color alpha="0.4" /></bezel>
- <bezel element="hlb" inputtag="IN.8" inputmask="0x20"><bounds x="87" y="28" width="8" height="4" /><color alpha="0.4" /></bezel>
- <bezel element="hlb" inputtag="IN.8" inputmask="0x10"><bounds x="87" y="37" width="8" height="4" /><color alpha="0.4" /></bezel>
- <bezel element="hlb" inputtag="IN.8" inputmask="0x08"><bounds x="87" y="46" width="8" height="4" /><color alpha="0.4" /></bezel>
- <bezel element="hlb" inputtag="IN.8" inputmask="0x04"><bounds x="87" y="55" width="8" height="4" /><color alpha="0.4" /></bezel>
- <bezel element="hlb" inputtag="IN.8" inputmask="0x02"><bounds x="87" y="64" width="8" height="4" /><color alpha="0.4" /></bezel>
- <bezel element="hlb" inputtag="IN.8" inputmask="0x01"><bounds x="87" y="73" width="8" height="4" /><color alpha="0.4" /></bezel>
-
+ <bounds left="0" right="20" top="0" bottom="20" />
+
+ <bezel name="0.0" element="ledr"><bounds x="1" y="1" width="1" height="1" /></bezel>
+ <bezel name="0.1" element="ledr"><bounds x="1" y="2" width="1" height="1" /></bezel>
+ <bezel name="0.2" element="ledr"><bounds x="1" y="3" width="1" height="1" /></bezel>
+ <bezel name="0.3" element="ledr"><bounds x="1" y="4" width="1" height="1" /></bezel>
+ <bezel name="0.4" element="ledr"><bounds x="1" y="5" width="1" height="1" /></bezel>
+ <bezel name="0.5" element="ledr"><bounds x="1" y="6" width="1" height="1" /></bezel>
+ <bezel name="0.6" element="ledr"><bounds x="1" y="7" width="1" height="1" /></bezel>
+ <bezel name="0.7" element="ledr"><bounds x="1" y="8" width="1" height="1" /></bezel>
+
+ <bezel name="1.0" element="ledg"><bounds x="2" y="9" width="1" height="1" /></bezel>
+ <bezel name="1.1" element="ledg"><bounds x="3" y="9" width="1" height="1" /></bezel>
+ <bezel name="1.2" element="ledg"><bounds x="4" y="9" width="1" height="1" /></bezel>
+ <bezel name="1.3" element="ledg"><bounds x="5" y="9" width="1" height="1" /></bezel>
+ <bezel name="1.4" element="ledg"><bounds x="6" y="9" width="1" height="1" /></bezel>
+ <bezel name="1.5" element="ledg"><bounds x="7" y="9" width="1" height="1" /></bezel>
+ <bezel name="1.6" element="ledg"><bounds x="8" y="9" width="1" height="1" /></bezel>
+ <bezel name="1.7" element="ledg"><bounds x="9" y="9" width="1" height="1" /></bezel>
</view>
</mamelayout>
diff --git a/src/mame/layout/fidel_sc12.lay b/src/mame/layout/fidel_sc12.lay
index 3d087368edf..b765ef5ddd1 100644
--- a/src/mame/layout/fidel_sc12.lay
+++ b/src/mame/layout/fidel_sc12.lay
@@ -3,498 +3,37 @@
<!-- define elements -->
- <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
- <element name="blackl"><rect><color red="0.01" green="0.01" blue="0.01" /></rect></element>
-
<element name="led" defstate="0">
- <disk state="1"><color red="1.0" green="0.1" blue="0.15" /></disk>
- <disk state="0"><color red="0.1" green="0.01" blue="0.015" /></disk>
- </element>
-
- <element name="hl" defstate="0">
- <text string=" ">
- <bounds x="0.0" y="0.0" width="1.0" height="1.0" />
- <color red="0.0" green="0.0" blue="0.0" />
- </text>
- <disk state="1">
- <bounds x="0.12" y="0.12" width="0.76" height="0.76" />
- <color red="1.0" green="1.0" blue="1.0" />
- </disk>
- </element>
- <element name="hlb" defstate="0">
- <text string=" ">
- <bounds x="0.0" y="0.0" width="1.0" height="1.0" />
- <color red="0.0" green="0.0" blue="0.0" />
- </text>
- <disk state="1">
- <bounds x="0.0" y="0.0" width="1.0" height="1.0" />
- <color red="1.0" green="1.0" blue="1.0" />
- </disk>
- </element>
-
- <element name="black"><rect><color red="0.17" green="0.15" blue="0.15" /></rect></element>
- <element name="white"><rect><color red="0.81" green="0.8" blue="0.79" /></rect></element>
- <element name="disk_black"><disk><color red="0.17" green="0.15" blue="0.15" /></disk></element>
- <element name="disk_white"><disk><color red="0.81" green="0.8" blue="0.79" /></disk></element>
-
- <element name="text_1">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="1"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_2">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="2"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_3">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="3"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_4">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="4"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_5">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="5"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_6">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="6"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_7">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="7"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_8">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="8"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
-
- <element name="text_l1">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="9" align="2"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_l2">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="10" align="2"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_l3">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="11" align="2"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_l4">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="12" align="2"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
-
- <element name="text_l5">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="NO MATE"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_l61">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="DRAW"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_l62">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="ACCEPTED"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_l71">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="DRAW"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_l72">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="DECLINED"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
-
- <element name="text_a">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="A"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_b">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="B"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_c">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="C"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_d">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="D"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_e">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="E"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_f">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="F"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_g">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="G"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_h">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="H"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
-
- <element name="text_b1">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="WHITE" align="2"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_b9">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="BLACK" align="1"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
-
- <element name="text_b2">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="STALEMATE"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_b31">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="3 TIME"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_b32">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="REPEAT"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_b41">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="50 MOVE"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_b42">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="RULE"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_b5">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="YOUR MOVE"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_b61">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="DRAW"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_b62">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="OFFER"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_b7">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="I LOSE"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_b8">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="MATE"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
-
- <element name="text_illegal">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="ILLEGAL"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_check">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="CHECK"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
-
- <element name="text_re">
- <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
- <text string="RE"><color red="0.17" green="0.15" blue="0.15" /></text>
- </element>
- <element name="text_cl">
- <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
- <text string="CL"><color red="0.17" green="0.15" blue="0.15" /></text>
- </element>
- <element name="text_king">
- <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
- <text string="PB/K"><color red="0.17" green="0.15" blue="0.15" /></text>
- </element>
- <element name="text_queen">
- <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
- <text string="PV/Q"><color red="0.17" green="0.15" blue="0.15" /></text>
- </element>
- <element name="text_rook">
- <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
- <text string="LV/R"><color red="0.17" green="0.15" blue="0.15" /></text>
- </element>
- <element name="text_bishop">
- <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
- <text string="TB/B"><color red="0.17" green="0.15" blue="0.15" /></text>
- </element>
- <element name="text_knight">
- <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
- <text string="DM/N"><color red="0.17" green="0.15" blue="0.15" /></text>
- </element>
- <element name="text_pion">
- <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
- <text string="RV/P"><color red="0.17" green="0.15" blue="0.15" /></text>
+ <disk state="0"><color red="0.2" green="0.04" blue="0.046" /></disk>
+ <disk state="1"><color red="1.0" green="0.2" blue="0.23" /></disk>
</element>
<!-- build screen -->
<view name="Internal Layout">
- <bounds left="-7" right="98" top="-2" bottom="93" />
- <bezel element="static_black">
- <bounds left="-7" right="98" top="-2" bottom="93" />
- </bezel>
-
- <bezel element="white"><bounds x="-7.5" y="-2.5" width="106" height="96" /></bezel>
-
- <!-- chessboard coords -->
-
- <bezel element="text_8"><bounds x="-0.8" y="9" width="2" height="2" /></bezel>
- <bezel element="text_7"><bounds x="-0.8" y="19" width="2" height="2" /></bezel>
- <bezel element="text_6"><bounds x="-0.8" y="29" width="2" height="2" /></bezel>
- <bezel element="text_5"><bounds x="-0.8" y="39" width="2" height="2" /></bezel>
- <bezel element="text_4"><bounds x="-0.8" y="49" width="2" height="2" /></bezel>
- <bezel element="text_3"><bounds x="-0.8" y="59" width="2" height="2" /></bezel>
- <bezel element="text_2"><bounds x="-0.8" y="69" width="2" height="2" /></bezel>
- <bezel element="text_1"><bounds x="-0.8" y="79" width="2" height="2" /></bezel>
-
- <bezel element="text_a"><bounds x="5" y="85" width="2" height="2" /></bezel>
- <bezel element="text_b"><bounds x="15" y="85" width="2" height="2" /></bezel>
- <bezel element="text_c"><bounds x="25" y="85" width="2" height="2" /></bezel>
- <bezel element="text_d"><bounds x="35" y="85" width="2" height="2" /></bezel>
- <bezel element="text_e"><bounds x="45" y="85" width="2" height="2" /></bezel>
- <bezel element="text_f"><bounds x="55" y="85" width="2" height="2" /></bezel>
- <bezel element="text_g"><bounds x="65" y="85" width="2" height="2" /></bezel>
- <bezel element="text_h"><bounds x="75" y="85" width="2" height="2" /></bezel>
-
- <!-- left side labels -->
-
- <bezel element="text_l1"><bounds x="-6.8" y="12" width="5" height="2" /></bezel>
- <bezel element="text_l2"><bounds x="-6.8" y="22" width="5" height="2" /></bezel>
- <bezel element="text_l3"><bounds x="-6.8" y="32" width="5" height="2" /></bezel>
- <bezel element="text_l4"><bounds x="-6.8" y="42" width="5" height="2" /></bezel>
-
- <bezel element="text_l5"><bounds x="-3.8" y="47.25" width="2" height="11.5" /><orientation rotate="90" /></bezel>
- <bezel element="text_l61"><bounds x="-3.8" y="58.75" width="2" height="8.5" /><orientation rotate="90" /></bezel>
- <bezel element="text_l62"><bounds x="-5.81" y="58.0" width="2" height="10" /><orientation rotate="90" /></bezel>
- <bezel element="text_l71"><bounds x="-3.8" y="68.75" width="2" height="8.5" /><orientation rotate="90" /></bezel>
- <bezel element="text_l72"><bounds x="-5.81" y="68.0" width="2" height="10" /><orientation rotate="90" /></bezel>
-
- <bezel element="blackl"><bounds x="-1.3" y="8.75" width="0.3" height="8.5" /></bezel>
- <bezel element="blackl"><bounds x="-1.3" y="18.75" width="0.3" height="8.5" /></bezel>
- <bezel element="blackl"><bounds x="-1.3" y="28.75" width="0.3" height="8.5" /></bezel>
- <bezel element="blackl"><bounds x="-1.3" y="38.75" width="0.3" height="8.5" /></bezel>
- <bezel element="blackl"><bounds x="-1.3" y="48.75" width="0.3" height="8.5" /></bezel>
- <bezel element="blackl"><bounds x="-1.3" y="58.75" width="0.3" height="8.5" /></bezel>
- <bezel element="blackl"><bounds x="-1.3" y="68.75" width="0.3" height="8.5" /></bezel>
-
- <!-- bottom side labels -->
-
- <bezel element="text_b1"><bounds x="0" y="87.5" width="7.25" height="2" /></bezel>
- <bezel element="text_b9"><bounds x="78.75" y="87.5" width="7.25" height="2" /></bezel>
-
- <bezel element="blackl"><bounds x="3" y="87" width="4.25" height="0.3" /></bezel>
- <bezel element="blackl"><bounds x="78.75" y="87" width="4.25" height="0.3" /></bezel>
-
- <bezel element="text_b2"><bounds x="7.35" y="87.5" width="11.3" height="2" /></bezel>
- <bezel element="text_b31"><bounds x="18.75" y="87.5" width="8.5" height="2" /></bezel>
- <bezel element="text_b32"><bounds x="18.75" y="89.51" width="8.5" height="2" /></bezel>
- <bezel element="text_b41"><bounds x="28.75" y="87.5" width="8.5" height="2" /></bezel>
- <bezel element="text_b42"><bounds x="28.75" y="89.51" width="8.5" height="2" /></bezel>
- <bezel element="text_b61"><bounds x="48.75" y="87.5" width="8.5" height="2" /></bezel>
- <bezel element="text_b62"><bounds x="48.75" y="89.51" width="8.5" height="2" /></bezel>
- <bezel element="text_b5"><bounds x="37.25" y="87.5" width="12" height="2" /></bezel>
- <bezel element="text_b7"><bounds x="58.75" y="87.5" width="8.5" height="2" /></bezel>
- <bezel element="text_b8"><bounds x="68.75" y="87.5" width="8.5" height="2" /></bezel>
-
- <bezel element="blackl"><bounds x="8.75" y="87" width="8.5" height="0.3" /></bezel>
- <bezel element="blackl"><bounds x="18.75" y="87" width="8.5" height="0.3" /></bezel>
- <bezel element="blackl"><bounds x="28.75" y="87" width="8.5" height="0.3" /></bezel>
- <bezel element="blackl"><bounds x="38.75" y="87" width="8.5" height="0.3" /></bezel>
- <bezel element="blackl"><bounds x="48.75" y="87" width="8.5" height="0.3" /></bezel>
- <bezel element="blackl"><bounds x="58.75" y="87" width="8.5" height="0.3" /></bezel>
- <bezel element="blackl"><bounds x="68.75" y="87" width="8.5" height="0.3" /></bezel>
-
- <!-- chessboard leds -->
-
- <bezel name="1.0" element="led"><bounds x="-1" y="7.25" width="1.5" height="1.5" /></bezel>
- <bezel name="1.1" element="led"><bounds x="-1" y="17.25" width="1.5" height="1.5" /></bezel>
- <bezel name="1.2" element="led"><bounds x="-1" y="27.25" width="1.5" height="1.5" /></bezel>
- <bezel name="1.3" element="led"><bounds x="-1" y="37.25" width="1.5" height="1.5" /></bezel>
- <bezel name="1.4" element="led"><bounds x="-1" y="47.25" width="1.5" height="1.5" /></bezel>
- <bezel name="1.5" element="led"><bounds x="-1" y="57.25" width="1.5" height="1.5" /></bezel>
- <bezel name="1.6" element="led"><bounds x="-1" y="67.25" width="1.5" height="1.5" /></bezel>
- <bezel name="1.7" element="led"><bounds x="-1" y="77.25" width="1.5" height="1.5" /></bezel>
-
- <bezel name="0.0" element="led"><bounds x="7.25" y="85.5" width="1.5" height="1.5" /></bezel>
- <bezel name="0.1" element="led"><bounds x="17.25" y="85.5" width="1.5" height="1.5" /></bezel>
- <bezel name="0.2" element="led"><bounds x="27.25" y="85.5" width="1.5" height="1.5" /></bezel>
- <bezel name="0.3" element="led"><bounds x="37.25" y="85.5" width="1.5" height="1.5" /></bezel>
- <bezel name="0.4" element="led"><bounds x="47.25" y="85.5" width="1.5" height="1.5" /></bezel>
- <bezel name="0.5" element="led"><bounds x="57.25" y="85.5" width="1.5" height="1.5" /></bezel>
- <bezel name="0.6" element="led"><bounds x="67.25" y="85.5" width="1.5" height="1.5" /></bezel>
- <bezel name="0.7" element="led"><bounds x="77.25" y="85.5" width="1.5" height="1.5" /></bezel>
-
- <bezel element="text_illegal"><bounds x="85" y="79.5" width="11.4" height="2" /></bezel>
- <bezel element="text_check"><bounds x="85" y="83.5" width="11.4" height="2" /></bezel>
-
- <bezel name="1.8" element="led"><bounds x="89.95" y="81.5" width="1.5" height="1.5" /></bezel>
- <bezel name="0.8" element="led"><bounds x="89.95" y="85.5" width="1.5" height="1.5" /></bezel>
-
- <!-- chessboard bezel -->
-
- <bezel element="black"><bounds x="2" y="2" width="82" height="82" /></bezel>
- <bezel element="white"><bounds x="3" y="3" width="80" height="80" /></bezel>
-
- <bezel element="black"><bounds x="13" y="2.5" width="10" height="10.5" /></bezel>
- <bezel element="black"><bounds x="33" y="2.5" width="10" height="10.5" /></bezel>
- <bezel element="black"><bounds x="53" y="2.5" width="10" height="10.5" /></bezel>
- <bezel element="black"><bounds x="73" y="2.5" width="10.5" height="10.5" /></bezel>
-
- <bezel element="black"><bounds x="2.5" y="13" width="10.5" height="10" /></bezel>
- <bezel element="black"><bounds x="23" y="13" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="43" y="13" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="63" y="13" width="10" height="10" /></bezel>
-
- <bezel element="black"><bounds x="13" y="23" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="33" y="23" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="53" y="23" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="73" y="23" width="10.5" height="10" /></bezel>
-
- <bezel element="black"><bounds x="2.5" y="33" width="10.5" height="10" /></bezel>
- <bezel element="black"><bounds x="23" y="33" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="43" y="33" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="63" y="33" width="10" height="10" /></bezel>
-
- <bezel element="black"><bounds x="13" y="43" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="33" y="43" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="53" y="43" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="73" y="43" width="10.5" height="10" /></bezel>
-
- <bezel element="black"><bounds x="2.5" y="53" width="10.5" height="10" /></bezel>
- <bezel element="black"><bounds x="23" y="53" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="43" y="53" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="63" y="53" width="10" height="10" /></bezel>
-
- <bezel element="black"><bounds x="13" y="63" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="33" y="63" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="53" y="63" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="73" y="63" width="10.5" height="10" /></bezel>
-
- <bezel element="black"><bounds x="2.5" y="73" width="10.5" height="10.5" /></bezel>
- <bezel element="black"><bounds x="23" y="73" width="10" height="10.5" /></bezel>
- <bezel element="black"><bounds x="43" y="73" width="10" height="10.5" /></bezel>
- <bezel element="black"><bounds x="63" y="73" width="10" height="10.5" /></bezel>
-
- <!-- chessboard sensors -->
-
- <bezel element="hl" inputtag="IN.0" inputmask="0x80"><bounds x="3" y="3" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x80"><bounds x="13" y="3" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x80"><bounds x="23" y="3" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x80"><bounds x="33" y="3" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.4" inputmask="0x80"><bounds x="43" y="3" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.5" inputmask="0x80"><bounds x="53" y="3" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.6" inputmask="0x80"><bounds x="63" y="3" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.7" inputmask="0x80"><bounds x="73" y="3" width="10" height="10" /><color alpha="0.2" /></bezel>
-
- <bezel element="hl" inputtag="IN.0" inputmask="0x40"><bounds x="3" y="13" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x40"><bounds x="13" y="13" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x40"><bounds x="23" y="13" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x40"><bounds x="33" y="13" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.4" inputmask="0x40"><bounds x="43" y="13" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.5" inputmask="0x40"><bounds x="53" y="13" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.6" inputmask="0x40"><bounds x="63" y="13" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.7" inputmask="0x40"><bounds x="73" y="13" width="10" height="10" /><color alpha="0.4" /></bezel>
-
- <bezel element="hl" inputtag="IN.0" inputmask="0x20"><bounds x="3" y="23" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x20"><bounds x="13" y="23" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x20"><bounds x="23" y="23" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x20"><bounds x="33" y="23" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.4" inputmask="0x20"><bounds x="43" y="23" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.5" inputmask="0x20"><bounds x="53" y="23" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.6" inputmask="0x20"><bounds x="63" y="23" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.7" inputmask="0x20"><bounds x="73" y="23" width="10" height="10" /><color alpha="0.2" /></bezel>
-
- <bezel element="hl" inputtag="IN.0" inputmask="0x10"><bounds x="3" y="33" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x10"><bounds x="13" y="33" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x10"><bounds x="23" y="33" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x10"><bounds x="33" y="33" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.4" inputmask="0x10"><bounds x="43" y="33" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.5" inputmask="0x10"><bounds x="53" y="33" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.6" inputmask="0x10"><bounds x="63" y="33" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.7" inputmask="0x10"><bounds x="73" y="33" width="10" height="10" /><color alpha="0.4" /></bezel>
-
- <bezel element="hl" inputtag="IN.0" inputmask="0x08"><bounds x="3" y="43" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x08"><bounds x="13" y="43" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x08"><bounds x="23" y="43" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x08"><bounds x="33" y="43" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.4" inputmask="0x08"><bounds x="43" y="43" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.5" inputmask="0x08"><bounds x="53" y="43" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.6" inputmask="0x08"><bounds x="63" y="43" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.7" inputmask="0x08"><bounds x="73" y="43" width="10" height="10" /><color alpha="0.2" /></bezel>
-
- <bezel element="hl" inputtag="IN.0" inputmask="0x04"><bounds x="3" y="53" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x04"><bounds x="13" y="53" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x04"><bounds x="23" y="53" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x04"><bounds x="33" y="53" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.4" inputmask="0x04"><bounds x="43" y="53" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.5" inputmask="0x04"><bounds x="53" y="53" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.6" inputmask="0x04"><bounds x="63" y="53" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.7" inputmask="0x04"><bounds x="73" y="53" width="10" height="10" /><color alpha="0.4" /></bezel>
-
- <bezel element="hl" inputtag="IN.0" inputmask="0x02"><bounds x="3" y="63" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x02"><bounds x="13" y="63" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x02"><bounds x="23" y="63" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x02"><bounds x="33" y="63" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.4" inputmask="0x02"><bounds x="43" y="63" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.5" inputmask="0x02"><bounds x="53" y="63" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.6" inputmask="0x02"><bounds x="63" y="63" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.7" inputmask="0x02"><bounds x="73" y="63" width="10" height="10" /><color alpha="0.2" /></bezel>
-
- <bezel element="hl" inputtag="IN.0" inputmask="0x01"><bounds x="3" y="73" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x01"><bounds x="13" y="73" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x01"><bounds x="23" y="73" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x01"><bounds x="33" y="73" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.4" inputmask="0x01"><bounds x="43" y="73" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.5" inputmask="0x01"><bounds x="53" y="73" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.6" inputmask="0x01"><bounds x="63" y="73" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.7" inputmask="0x01"><bounds x="73" y="73" width="10" height="10" /><color alpha="0.4" /></bezel>
-
- <!-- right side -->
-
- <bezel element="disk_black"><bounds x="87" y="3.1" width="7.4" height="7.4" /></bezel>
- <bezel element="disk_black"><bounds x="87" y="12.4" width="7.4" height="7.4" /></bezel>
- <bezel element="disk_black"><bounds x="87" y="24.3" width="7.4" height="7.4" /></bezel>
- <bezel element="disk_black"><bounds x="87" y="33.6" width="7.4" height="7.4" /></bezel>
- <bezel element="disk_black"><bounds x="87" y="42.9" width="7.4" height="7.4" /></bezel>
- <bezel element="disk_black"><bounds x="87" y="52.2" width="7.4" height="7.4" /></bezel>
- <bezel element="disk_black"><bounds x="87" y="61.5" width="7.4" height="7.4" /></bezel>
- <bezel element="disk_black"><bounds x="87" y="70.8" width="7.4" height="7.4" /></bezel>
-
- <bezel element="disk_white"><bounds x="87.8" y="3.9" width="5.8" height="5.8" /></bezel>
- <bezel element="disk_white"><bounds x="87.8" y="13.2" width="5.8" height="5.8" /></bezel>
- <bezel element="disk_white"><bounds x="87.8" y="25.1" width="5.8" height="5.8" /></bezel>
- <bezel element="disk_white"><bounds x="87.8" y="34.4" width="5.8" height="5.8" /></bezel>
- <bezel element="disk_white"><bounds x="87.8" y="43.7" width="5.8" height="5.8" /></bezel>
- <bezel element="disk_white"><bounds x="87.8" y="53 " width="5.8" height="5.8" /></bezel>
- <bezel element="disk_white"><bounds x="87.8" y="62.3" width="5.8" height="5.8" /></bezel>
- <bezel element="disk_white"><bounds x="87.8" y="71.6" width="5.8" height="5.8" /></bezel>
-
- <bezel element="text_re"><bounds x="87.8" y="5.6" width="5.8" height="2.4" /></bezel>
- <bezel element="text_cl"><bounds x="87.8" y="14.9" width="5.8" height="2.4" /></bezel>
- <bezel element="text_king"><bounds x="87.8" y="26.8" width="5.8" height="2.4" /></bezel>
- <bezel element="text_queen"><bounds x="87.8" y="36.1" width="5.8" height="2.4" /></bezel>
- <bezel element="text_rook"><bounds x="87.8" y="45.4" width="5.8" height="2.4" /></bezel>
- <bezel element="text_bishop"><bounds x="87.8" y="54.7" width="5.8" height="2.4" /></bezel>
- <bezel element="text_knight"><bounds x="87.8" y="64 " width="5.8" height="2.4" /></bezel>
- <bezel element="text_pion"><bounds x="87.8" y="73.3" width="5.8" height="2.4" /></bezel>
-
- <bezel element="hlb" inputtag="IN.8" inputmask="0x80"><bounds x="87" y="3.1" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
- <bezel element="hlb" inputtag="IN.8" inputmask="0x40"><bounds x="87" y="12.4" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
- <bezel element="hlb" inputtag="IN.8" inputmask="0x20"><bounds x="87" y="24.3" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
- <bezel element="hlb" inputtag="IN.8" inputmask="0x10"><bounds x="87" y="33.6" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
- <bezel element="hlb" inputtag="IN.8" inputmask="0x08"><bounds x="87" y="42.9" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
- <bezel element="hlb" inputtag="IN.8" inputmask="0x04"><bounds x="87" y="52.2" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
- <bezel element="hlb" inputtag="IN.8" inputmask="0x02"><bounds x="87" y="61.5" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
- <bezel element="hlb" inputtag="IN.8" inputmask="0x01"><bounds x="87" y="70.8" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
-
+ <bounds left="0" right="20" top="0" bottom="20" />
+
+ <bezel name="1.0" element="led"><bounds x="1" y="1" width="1" height="1" /></bezel>
+ <bezel name="1.1" element="led"><bounds x="1" y="2" width="1" height="1" /></bezel>
+ <bezel name="1.2" element="led"><bounds x="1" y="3" width="1" height="1" /></bezel>
+ <bezel name="1.3" element="led"><bounds x="1" y="4" width="1" height="1" /></bezel>
+ <bezel name="1.4" element="led"><bounds x="1" y="5" width="1" height="1" /></bezel>
+ <bezel name="1.5" element="led"><bounds x="1" y="6" width="1" height="1" /></bezel>
+ <bezel name="1.6" element="led"><bounds x="1" y="7" width="1" height="1" /></bezel>
+ <bezel name="1.7" element="led"><bounds x="1" y="8" width="1" height="1" /></bezel>
+
+ <bezel name="0.0" element="led"><bounds x="2" y="9" width="1" height="1" /></bezel>
+ <bezel name="0.1" element="led"><bounds x="3" y="9" width="1" height="1" /></bezel>
+ <bezel name="0.2" element="led"><bounds x="4" y="9" width="1" height="1" /></bezel>
+ <bezel name="0.3" element="led"><bounds x="5" y="9" width="1" height="1" /></bezel>
+ <bezel name="0.4" element="led"><bounds x="6" y="9" width="1" height="1" /></bezel>
+ <bezel name="0.5" element="led"><bounds x="7" y="9" width="1" height="1" /></bezel>
+ <bezel name="0.6" element="led"><bounds x="8" y="9" width="1" height="1" /></bezel>
+ <bezel name="0.7" element="led"><bounds x="9" y="9" width="1" height="1" /></bezel>
+
+ <bezel name="1.8" element="led"><bounds x="11" y="7" width="1" height="1" /></bezel>
+ <bezel name="0.8" element="led"><bounds x="11" y="8" width="1" height="1" /></bezel>
</view>
</mamelayout>
diff --git a/src/mame/layout/fidel_vsc.lay b/src/mame/layout/fidel_vsc.lay
index f9c2c742620..c56ae1b11db 100644
--- a/src/mame/layout/fidel_vsc.lay
+++ b/src/mame/layout/fidel_vsc.lay
@@ -1,491 +1,262 @@
<?xml version="1.0"?>
<mamelayout version="2">
-
-<!-- define elements -->
-
- <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
-
<element name="digit" defstate="0">
- <led7seg><color red="1.0" green="0.1" blue="0.15" /></led7seg>
+ <led7seg>
+ <color red="0.75" green="0.0" blue="0.0" />
+ </led7seg>
</element>
-
<element name="led" defstate="0">
- <disk state="1"><color red="1.0" green="0.1" blue="0.15" /></disk>
- <disk state="0"><color red="0.1" green="0.01" blue="0.015" /></disk>
- </element>
-
- <element name="hl" defstate="0">
- <text string=" ">
- <bounds x="0.0" y="0.0" width="1.0" height="1.0" />
- <color red="0.0" green="0.0" blue="0.0" />
- </text>
<disk state="1">
- <bounds x="0.12" y="0.12" width="0.76" height="0.76" />
- <color red="1.0" green="1.0" blue="1.0" />
+ <color red="0.75" green="0.0" blue="0.0" />
</disk>
- </element>
- <element name="hlb" defstate="0">
- <text string=" ">
- <bounds x="0.0" y="0.0" width="1.0" height="1.0" />
- <color red="0.0" green="0.0" blue="0.0" />
- </text>
- <disk state="1">
- <bounds x="0.0" y="0.0" width="1.0" height="1.0" />
- <color red="1.0" green="1.0" blue="1.0" />
+ <disk state="0">
+ <color red="0.20" green="0.0" blue="0.0" />
</disk>
</element>
- <element name="hlp" defstate="0">
- <text string=" ">
- <bounds x="0.0" y="0.0" width="1.0" height="1.0" />
+ <element name="background">
+ <rect>
+ <bounds left="0" top="0" right="1" bottom="1" />
<color red="0.0" green="0.0" blue="0.0" />
- </text>
- <rect state="1">
- <bounds x="0.0" y="0.0" width="1.0" height="1.0" />
- <color red="1.0" green="1.0" blue="1.0" />
</rect>
</element>
- <element name="black"><rect><color red="0.17" green="0.15" blue="0.15" /></rect></element>
- <element name="white"><rect><color red="0.81" green="0.8" blue="0.79" /></rect></element>
- <element name="disk_black"><disk><color red="0.17" green="0.15" blue="0.15" /></disk></element>
- <element name="disk_white"><disk><color red="0.81" green="0.8" blue="0.79" /></disk></element>
-
- <element name="text_1">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="1"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_2">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="2"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_3">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="3"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_4">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="4"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_5">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="5"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_6">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="6"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_7">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="7"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_8">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="8"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
-
- <element name="text_a">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="A"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_b">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="B"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_c">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="C"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_d">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="D"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_e">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="E"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_f">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="F"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_g">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="G"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
- <element name="text_h">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="H"><color red="0.01" green="0.01" blue="0.01" /></text>
- </element>
-
- <element name="text_re">
- <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
- <text string="RE"><color red="0.17" green="0.15" blue="0.15" /></text>
- </element>
- <element name="text_cl">
- <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
- <text string="CL"><color red="0.17" green="0.15" blue="0.15" /></text>
- </element>
- <element name="text_king">
- <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
- <text string="K"><color red="0.17" green="0.15" blue="0.15" /></text>
- </element>
- <element name="text_queen">
- <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
- <text string="Q"><color red="0.17" green="0.15" blue="0.15" /></text>
- </element>
- <element name="text_rook">
- <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
- <text string="R"><color red="0.17" green="0.15" blue="0.15" /></text>
- </element>
- <element name="text_bishop">
- <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
- <text string="B"><color red="0.17" green="0.15" blue="0.15" /></text>
- </element>
- <element name="text_knight">
- <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
- <text string="N"><color red="0.17" green="0.15" blue="0.15" /></text>
- </element>
- <element name="text_pion">
- <disk><color red="0.81" green="0.8" blue="0.79" /></disk>
- <text string="P"><color red="0.17" green="0.15" blue="0.15" /></text>
- </element>
-
- <element name="text_tm">
- <rect><color red="0.17" green="0.15" blue="0.15" /></rect>
- <text string="TM"><color red="0.81" green="0.8" blue="0.79" /></text>
- </element>
- <element name="text_rv">
- <rect><color red="0.17" green="0.15" blue="0.15" /></rect>
- <text string="RV"><color red="0.81" green="0.8" blue="0.79" /></text>
- </element>
- <element name="text_speak">
- <rect><color red="0.17" green="0.15" blue="0.15" /></rect>
- <text string="spk"><color red="0.81" green="0.8" blue="0.79" /></text>
- </element>
- <element name="text_st">
- <rect><color red="0.17" green="0.15" blue="0.15" /></rect>
- <text string="ST"><color red="0.81" green="0.8" blue="0.79" /></text>
- </element>
- <element name="text_dm">
- <rect><color red="0.17" green="0.15" blue="0.15" /></rect>
- <text string="DM"><color red="0.81" green="0.8" blue="0.79" /></text>
- </element>
- <element name="text_lv">
- <rect><color red="0.17" green="0.15" blue="0.15" /></rect>
- <text string="LV"><color red="0.81" green="0.8" blue="0.79" /></text>
- </element>
-
-
-<!-- build screen -->
-
<view name="Internal Layout">
- <bounds left="-2" right="98" top="-18" bottom="88" />
- <bezel element="static_black">
- <bounds left="-2" right="98" top="-18" bottom="88" />
+ <!-- background -->
+ <bezel element="background">
+ <bounds left="00" top="00" right="82" bottom="90" />
</bezel>
- <bezel element="white"><bounds x="-2.5" y="-2" width="101" height="90.5" /></bezel>
-
- <!-- chessboard coords -->
-
- <bezel element="text_8"><bounds x="-0.8" y="7" width="2" height="2" /></bezel>
- <bezel element="text_7"><bounds x="-0.8" y="17" width="2" height="2" /></bezel>
- <bezel element="text_6"><bounds x="-0.8" y="27" width="2" height="2" /></bezel>
- <bezel element="text_5"><bounds x="-0.8" y="37" width="2" height="2" /></bezel>
- <bezel element="text_4"><bounds x="-0.8" y="47" width="2" height="2" /></bezel>
- <bezel element="text_3"><bounds x="-0.8" y="57" width="2" height="2" /></bezel>
- <bezel element="text_2"><bounds x="-0.8" y="67" width="2" height="2" /></bezel>
- <bezel element="text_1"><bounds x="-0.8" y="77" width="2" height="2" /></bezel>
-
- <bezel element="text_a"><bounds x="7" y="85" width="2" height="2" /></bezel>
- <bezel element="text_b"><bounds x="17" y="85" width="2" height="2" /></bezel>
- <bezel element="text_c"><bounds x="27" y="85" width="2" height="2" /></bezel>
- <bezel element="text_d"><bounds x="37" y="85" width="2" height="2" /></bezel>
- <bezel element="text_e"><bounds x="47" y="85" width="2" height="2" /></bezel>
- <bezel element="text_f"><bounds x="57" y="85" width="2" height="2" /></bezel>
- <bezel element="text_g"><bounds x="67" y="85" width="2" height="2" /></bezel>
- <bezel element="text_h"><bounds x="77" y="85" width="2" height="2" /></bezel>
-
- <!-- chessboard bezel -->
-
- <bezel element="black"><bounds x="2" y="2" width="82" height="82" /></bezel>
- <bezel element="white"><bounds x="3" y="3" width="80" height="80" /></bezel>
-
- <bezel element="black"><bounds x="13" y="2.5" width="10" height="10.5" /></bezel>
- <bezel element="black"><bounds x="33" y="2.5" width="10" height="10.5" /></bezel>
- <bezel element="black"><bounds x="53" y="2.5" width="10" height="10.5" /></bezel>
- <bezel element="black"><bounds x="73" y="2.5" width="10.5" height="10.5" /></bezel>
-
- <bezel element="black"><bounds x="2.5" y="13" width="10.5" height="10" /></bezel>
- <bezel element="black"><bounds x="23" y="13" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="43" y="13" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="63" y="13" width="10" height="10" /></bezel>
-
- <bezel element="black"><bounds x="13" y="23" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="33" y="23" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="53" y="23" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="73" y="23" width="10.5" height="10" /></bezel>
-
- <bezel element="black"><bounds x="2.5" y="33" width="10.5" height="10" /></bezel>
- <bezel element="black"><bounds x="23" y="33" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="43" y="33" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="63" y="33" width="10" height="10" /></bezel>
-
- <bezel element="black"><bounds x="13" y="43" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="33" y="43" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="53" y="43" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="73" y="43" width="10.5" height="10" /></bezel>
-
- <bezel element="black"><bounds x="2.5" y="53" width="10.5" height="10" /></bezel>
- <bezel element="black"><bounds x="23" y="53" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="43" y="53" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="63" y="53" width="10" height="10" /></bezel>
-
- <bezel element="black"><bounds x="13" y="63" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="33" y="63" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="53" y="63" width="10" height="10" /></bezel>
- <bezel element="black"><bounds x="73" y="63" width="10.5" height="10" /></bezel>
-
- <bezel element="black"><bounds x="2.5" y="73" width="10.5" height="10.5" /></bezel>
- <bezel element="black"><bounds x="23" y="73" width="10" height="10.5" /></bezel>
- <bezel element="black"><bounds x="43" y="73" width="10" height="10.5" /></bezel>
- <bezel element="black"><bounds x="63" y="73" width="10" height="10.5" /></bezel>
-
- <!-- chessboard leds -->
-
- <bezel name="4.7" element="led"><bounds x="3.2" y="11.3" width="1.5" height="1.5" /></bezel>
- <bezel name="5.7" element="led"><bounds x="13.2" y="11.3" width="1.5" height="1.5" /></bezel>
- <bezel name="6.7" element="led"><bounds x="23.2" y="11.3" width="1.5" height="1.5" /></bezel>
- <bezel name="7.7" element="led"><bounds x="33.2" y="11.3" width="1.5" height="1.5" /></bezel>
- <bezel name="8.7" element="led"><bounds x="43.2" y="11.3" width="1.5" height="1.5" /></bezel>
- <bezel name="9.7" element="led"><bounds x="53.2" y="11.3" width="1.5" height="1.5" /></bezel>
- <bezel name="10.7" element="led"><bounds x="63.2" y="11.3" width="1.5" height="1.5" /></bezel>
- <bezel name="11.7" element="led"><bounds x="73.2" y="11.3" width="1.5" height="1.5" /></bezel>
-
- <bezel name="4.6" element="led"><bounds x="3.2" y="21.3" width="1.5" height="1.5" /></bezel>
- <bezel name="5.6" element="led"><bounds x="13.2" y="21.3" width="1.5" height="1.5" /></bezel>
- <bezel name="6.6" element="led"><bounds x="23.2" y="21.3" width="1.5" height="1.5" /></bezel>
- <bezel name="7.6" element="led"><bounds x="33.2" y="21.3" width="1.5" height="1.5" /></bezel>
- <bezel name="8.6" element="led"><bounds x="43.2" y="21.3" width="1.5" height="1.5" /></bezel>
- <bezel name="9.6" element="led"><bounds x="53.2" y="21.3" width="1.5" height="1.5" /></bezel>
- <bezel name="10.6" element="led"><bounds x="63.2" y="21.3" width="1.5" height="1.5" /></bezel>
- <bezel name="11.6" element="led"><bounds x="73.2" y="21.3" width="1.5" height="1.5" /></bezel>
-
- <bezel name="4.5" element="led"><bounds x="3.2" y="31.3" width="1.5" height="1.5" /></bezel>
- <bezel name="5.5" element="led"><bounds x="13.2" y="31.3" width="1.5" height="1.5" /></bezel>
- <bezel name="6.5" element="led"><bounds x="23.2" y="31.3" width="1.5" height="1.5" /></bezel>
- <bezel name="7.5" element="led"><bounds x="33.2" y="31.3" width="1.5" height="1.5" /></bezel>
- <bezel name="8.5" element="led"><bounds x="43.2" y="31.3" width="1.5" height="1.5" /></bezel>
- <bezel name="9.5" element="led"><bounds x="53.2" y="31.3" width="1.5" height="1.5" /></bezel>
- <bezel name="10.5" element="led"><bounds x="63.2" y="31.3" width="1.5" height="1.5" /></bezel>
- <bezel name="11.5" element="led"><bounds x="73.2" y="31.3" width="1.5" height="1.5" /></bezel>
-
- <bezel name="4.4" element="led"><bounds x="3.2" y="41.3" width="1.5" height="1.5" /></bezel>
- <bezel name="5.4" element="led"><bounds x="13.2" y="41.3" width="1.5" height="1.5" /></bezel>
- <bezel name="6.4" element="led"><bounds x="23.2" y="41.3" width="1.5" height="1.5" /></bezel>
- <bezel name="7.4" element="led"><bounds x="33.2" y="41.3" width="1.5" height="1.5" /></bezel>
- <bezel name="8.4" element="led"><bounds x="43.2" y="41.3" width="1.5" height="1.5" /></bezel>
- <bezel name="9.4" element="led"><bounds x="53.2" y="41.3" width="1.5" height="1.5" /></bezel>
- <bezel name="10.4" element="led"><bounds x="63.2" y="41.3" width="1.5" height="1.5" /></bezel>
- <bezel name="11.4" element="led"><bounds x="73.2" y="41.3" width="1.5" height="1.5" /></bezel>
-
- <bezel name="4.3" element="led"><bounds x="3.2" y="51.3" width="1.5" height="1.5" /></bezel>
- <bezel name="5.3" element="led"><bounds x="13.2" y="51.3" width="1.5" height="1.5" /></bezel>
- <bezel name="6.3" element="led"><bounds x="23.2" y="51.3" width="1.5" height="1.5" /></bezel>
- <bezel name="7.3" element="led"><bounds x="33.2" y="51.3" width="1.5" height="1.5" /></bezel>
- <bezel name="8.3" element="led"><bounds x="43.2" y="51.3" width="1.5" height="1.5" /></bezel>
- <bezel name="9.3" element="led"><bounds x="53.2" y="51.3" width="1.5" height="1.5" /></bezel>
- <bezel name="10.3" element="led"><bounds x="63.2" y="51.3" width="1.5" height="1.5" /></bezel>
- <bezel name="11.3" element="led"><bounds x="73.2" y="51.3" width="1.5" height="1.5" /></bezel>
-
- <bezel name="4.2" element="led"><bounds x="3.2" y="61.3" width="1.5" height="1.5" /></bezel>
- <bezel name="5.2" element="led"><bounds x="13.2" y="61.3" width="1.5" height="1.5" /></bezel>
- <bezel name="6.2" element="led"><bounds x="23.2" y="61.3" width="1.5" height="1.5" /></bezel>
- <bezel name="7.2" element="led"><bounds x="33.2" y="61.3" width="1.5" height="1.5" /></bezel>
- <bezel name="8.2" element="led"><bounds x="43.2" y="61.3" width="1.5" height="1.5" /></bezel>
- <bezel name="9.2" element="led"><bounds x="53.2" y="61.3" width="1.5" height="1.5" /></bezel>
- <bezel name="10.2" element="led"><bounds x="63.2" y="61.3" width="1.5" height="1.5" /></bezel>
- <bezel name="11.2" element="led"><bounds x="73.2" y="61.3" width="1.5" height="1.5" /></bezel>
-
- <bezel name="4.1" element="led"><bounds x="3.2" y="71.3" width="1.5" height="1.5" /></bezel>
- <bezel name="5.1" element="led"><bounds x="13.2" y="71.3" width="1.5" height="1.5" /></bezel>
- <bezel name="6.1" element="led"><bounds x="23.2" y="71.3" width="1.5" height="1.5" /></bezel>
- <bezel name="7.1" element="led"><bounds x="33.2" y="71.3" width="1.5" height="1.5" /></bezel>
- <bezel name="8.1" element="led"><bounds x="43.2" y="71.3" width="1.5" height="1.5" /></bezel>
- <bezel name="9.1" element="led"><bounds x="53.2" y="71.3" width="1.5" height="1.5" /></bezel>
- <bezel name="10.1" element="led"><bounds x="63.2" y="71.3" width="1.5" height="1.5" /></bezel>
- <bezel name="11.1" element="led"><bounds x="73.2" y="71.3" width="1.5" height="1.5" /></bezel>
-
- <bezel name="4.0" element="led"><bounds x="3.2" y="81.3" width="1.5" height="1.5" /></bezel>
- <bezel name="5.0" element="led"><bounds x="13.2" y="81.3" width="1.5" height="1.5" /></bezel>
- <bezel name="6.0" element="led"><bounds x="23.2" y="81.3" width="1.5" height="1.5" /></bezel>
- <bezel name="7.0" element="led"><bounds x="33.2" y="81.3" width="1.5" height="1.5" /></bezel>
- <bezel name="8.0" element="led"><bounds x="43.2" y="81.3" width="1.5" height="1.5" /></bezel>
- <bezel name="9.0" element="led"><bounds x="53.2" y="81.3" width="1.5" height="1.5" /></bezel>
- <bezel name="10.0" element="led"><bounds x="63.2" y="81.3" width="1.5" height="1.5" /></bezel>
- <bezel name="11.0" element="led"><bounds x="73.2" y="81.3" width="1.5" height="1.5" /></bezel>
-
- <!-- chessboard sensors -->
-
- <bezel element="hl" inputtag="IN.0" inputmask="0x80"><bounds x="3" y="3" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x80"><bounds x="13" y="3" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x80"><bounds x="23" y="3" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x80"><bounds x="33" y="3" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.4" inputmask="0x80"><bounds x="43" y="3" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.5" inputmask="0x80"><bounds x="53" y="3" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.6" inputmask="0x80"><bounds x="63" y="3" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.7" inputmask="0x80"><bounds x="73" y="3" width="10" height="10" /><color alpha="0.2" /></bezel>
-
- <bezel element="hl" inputtag="IN.0" inputmask="0x40"><bounds x="3" y="13" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x40"><bounds x="13" y="13" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x40"><bounds x="23" y="13" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x40"><bounds x="33" y="13" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.4" inputmask="0x40"><bounds x="43" y="13" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.5" inputmask="0x40"><bounds x="53" y="13" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.6" inputmask="0x40"><bounds x="63" y="13" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.7" inputmask="0x40"><bounds x="73" y="13" width="10" height="10" /><color alpha="0.4" /></bezel>
-
- <bezel element="hl" inputtag="IN.0" inputmask="0x20"><bounds x="3" y="23" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x20"><bounds x="13" y="23" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x20"><bounds x="23" y="23" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x20"><bounds x="33" y="23" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.4" inputmask="0x20"><bounds x="43" y="23" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.5" inputmask="0x20"><bounds x="53" y="23" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.6" inputmask="0x20"><bounds x="63" y="23" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.7" inputmask="0x20"><bounds x="73" y="23" width="10" height="10" /><color alpha="0.2" /></bezel>
-
- <bezel element="hl" inputtag="IN.0" inputmask="0x10"><bounds x="3" y="33" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x10"><bounds x="13" y="33" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x10"><bounds x="23" y="33" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x10"><bounds x="33" y="33" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.4" inputmask="0x10"><bounds x="43" y="33" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.5" inputmask="0x10"><bounds x="53" y="33" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.6" inputmask="0x10"><bounds x="63" y="33" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.7" inputmask="0x10"><bounds x="73" y="33" width="10" height="10" /><color alpha="0.4" /></bezel>
-
- <bezel element="hl" inputtag="IN.0" inputmask="0x08"><bounds x="3" y="43" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x08"><bounds x="13" y="43" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x08"><bounds x="23" y="43" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x08"><bounds x="33" y="43" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.4" inputmask="0x08"><bounds x="43" y="43" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.5" inputmask="0x08"><bounds x="53" y="43" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.6" inputmask="0x08"><bounds x="63" y="43" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.7" inputmask="0x08"><bounds x="73" y="43" width="10" height="10" /><color alpha="0.2" /></bezel>
-
- <bezel element="hl" inputtag="IN.0" inputmask="0x04"><bounds x="3" y="53" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x04"><bounds x="13" y="53" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x04"><bounds x="23" y="53" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x04"><bounds x="33" y="53" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.4" inputmask="0x04"><bounds x="43" y="53" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.5" inputmask="0x04"><bounds x="53" y="53" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.6" inputmask="0x04"><bounds x="63" y="53" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.7" inputmask="0x04"><bounds x="73" y="53" width="10" height="10" /><color alpha="0.4" /></bezel>
-
- <bezel element="hl" inputtag="IN.0" inputmask="0x02"><bounds x="3" y="63" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x02"><bounds x="13" y="63" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x02"><bounds x="23" y="63" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x02"><bounds x="33" y="63" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.4" inputmask="0x02"><bounds x="43" y="63" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.5" inputmask="0x02"><bounds x="53" y="63" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.6" inputmask="0x02"><bounds x="63" y="63" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.7" inputmask="0x02"><bounds x="73" y="63" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <!-- Column A -->
+ <bezel name="4.7" element="led" inputtag="IN.0" inputmask="0x80">
+ <bounds x="5" y="15" width="2" height="2" />
+ </bezel>
+ <bezel name="4.6" element="led" inputtag="IN.0" inputmask="0x40">
+ <bounds x="5" y="25" width="2" height="2" />
+ </bezel>
+ <bezel name="4.5" element="led" inputtag="IN.0" inputmask="0x20">
+ <bounds x="5" y="35" width="2" height="2" />
+ </bezel>
+ <bezel name="4.4" element="led" inputtag="IN.0" inputmask="0x10">
+ <bounds x="5" y="45" width="2" height="2" />
+ </bezel>
+ <bezel name="4.3" element="led" inputtag="IN.0" inputmask="0x08">
+ <bounds x="5" y="55" width="2" height="2" />
+ </bezel>
+ <bezel name="4.2" element="led" inputtag="IN.0" inputmask="0x04">
+ <bounds x="5" y="65" width="2" height="2" />
+ </bezel>
+ <bezel name="4.1" element="led" inputtag="IN.0" inputmask="0x02">
+ <bounds x="5" y="75" width="2" height="2" />
+ </bezel>
+ <bezel name="4.0" element="led" inputtag="IN.0" inputmask="0x01">
+ <bounds x="5" y="85" width="2" height="2" />
+ </bezel>
- <bezel element="hl" inputtag="IN.0" inputmask="0x01"><bounds x="3" y="73" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x01"><bounds x="13" y="73" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x01"><bounds x="23" y="73" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x01"><bounds x="33" y="73" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.4" inputmask="0x01"><bounds x="43" y="73" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.5" inputmask="0x01"><bounds x="53" y="73" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.6" inputmask="0x01"><bounds x="63" y="73" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.7" inputmask="0x01"><bounds x="73" y="73" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <!-- Column B -->
+ <bezel name="5.7" element="led" inputtag="IN.1" inputmask="0x80">
+ <bounds x="15" y="15" width="2" height="2" />
+ </bezel>
+ <bezel name="5.6" element="led" inputtag="IN.1" inputmask="0x40">
+ <bounds x="15" y="25" width="2" height="2" />
+ </bezel>
+ <bezel name="5.5" element="led" inputtag="IN.1" inputmask="0x20">
+ <bounds x="15" y="35" width="2" height="2" />
+ </bezel>
+ <bezel name="5.4" element="led" inputtag="IN.1" inputmask="0x10">
+ <bounds x="15" y="45" width="2" height="2" />
+ </bezel>
+ <bezel name="5.3" element="led" inputtag="IN.1" inputmask="0x08">
+ <bounds x="15" y="55" width="2" height="2" />
+ </bezel>
+ <bezel name="5.2" element="led" inputtag="IN.1" inputmask="0x04">
+ <bounds x="15" y="65" width="2" height="2" />
+ </bezel>
+ <bezel name="5.1" element="led" inputtag="IN.1" inputmask="0x02">
+ <bounds x="15" y="75" width="2" height="2" />
+ </bezel>
+ <bezel name="5.0" element="led" inputtag="IN.1" inputmask="0x01">
+ <bounds x="15" y="85" width="2" height="2" />
+ </bezel>
- <!-- right side -->
+ <!-- Column C -->
+ <bezel name="6.7" element="led" inputtag="IN.2" inputmask="0x80">
+ <bounds x="25" y="15" width="2" height="2" />
+ </bezel>
+ <bezel name="6.6" element="led" inputtag="IN.2" inputmask="0x40">
+ <bounds x="25" y="25" width="2" height="2" />
+ </bezel>
+ <bezel name="6.5" element="led" inputtag="IN.2" inputmask="0x20">
+ <bounds x="25" y="35" width="2" height="2" />
+ </bezel>
+ <bezel name="6.4" element="led" inputtag="IN.2" inputmask="0x10">
+ <bounds x="25" y="45" width="2" height="2" />
+ </bezel>
+ <bezel name="6.3" element="led" inputtag="IN.2" inputmask="0x08">
+ <bounds x="25" y="55" width="2" height="2" />
+ </bezel>
+ <bezel name="6.2" element="led" inputtag="IN.2" inputmask="0x04">
+ <bounds x="25" y="65" width="2" height="2" />
+ </bezel>
+ <bezel name="6.1" element="led" inputtag="IN.2" inputmask="0x02">
+ <bounds x="25" y="75" width="2" height="2" />
+ </bezel>
+ <bezel name="6.0" element="led" inputtag="IN.2" inputmask="0x01">
+ <bounds x="25" y="85" width="2" height="2" />
+ </bezel>
- <bezel name="0.7" element="led"><bounds x="89.95" y="7.25" width="1.5" height="1.5" /></bezel>
+ <!-- Column D -->
+ <bezel name="7.7" element="led" inputtag="IN.3" inputmask="0x80">
+ <bounds x="35" y="15" width="2" height="2" />
+ </bezel>
+ <bezel name="7.6" element="led" inputtag="IN.3" inputmask="0x40">
+ <bounds x="35" y="25" width="2" height="2" />
+ </bezel>
+ <bezel name="7.5" element="led" inputtag="IN.3" inputmask="0x20">
+ <bounds x="35" y="35" width="2" height="2" />
+ </bezel>
+ <bezel name="7.4" element="led" inputtag="IN.3" inputmask="0x10">
+ <bounds x="35" y="45" width="2" height="2" />
+ </bezel>
+ <bezel name="7.3" element="led" inputtag="IN.3" inputmask="0x08">
+ <bounds x="35" y="55" width="2" height="2" />
+ </bezel>
+ <bezel name="7.2" element="led" inputtag="IN.3" inputmask="0x04">
+ <bounds x="35" y="65" width="2" height="2" />
+ </bezel>
+ <bezel name="7.1" element="led" inputtag="IN.3" inputmask="0x02">
+ <bounds x="35" y="75" width="2" height="2" />
+ </bezel>
+ <bezel name="7.0" element="led" inputtag="IN.3" inputmask="0x01">
+ <bounds x="35" y="85" width="2" height="2" />
+ </bezel>
- <bezel element="disk_black"><bounds x="87" y="13" width="7.4" height="7.4" /></bezel>
- <bezel element="disk_black"><bounds x="87" y="21.8" width="7.4" height="7.4" /></bezel>
- <bezel element="disk_black"><bounds x="87" y="30.6" width="7.4" height="7.4" /></bezel>
- <bezel element="disk_black"><bounds x="87" y="39.4" width="7.4" height="7.4" /></bezel>
- <bezel element="disk_black"><bounds x="87" y="48.2" width="7.4" height="7.4" /></bezel>
- <bezel element="disk_black"><bounds x="87" y="57" width="7.4" height="7.4" /></bezel>
- <bezel element="disk_black"><bounds x="87" y="65.8" width="7.4" height="7.4" /></bezel>
- <bezel element="disk_black"><bounds x="87" y="74.6" width="7.4" height="7.4" /></bezel>
+ <!-- Column E -->
+ <bezel name="8.7" element="led" inputtag="IN.4" inputmask="0x80">
+ <bounds x="45" y="15" width="2" height="2" />
+ </bezel>
+ <bezel name="8.6" element="led" inputtag="IN.4" inputmask="0x40">
+ <bounds x="45" y="25" width="2" height="2" />
+ </bezel>
+ <bezel name="8.5" element="led" inputtag="IN.4" inputmask="0x20">
+ <bounds x="45" y="35" width="2" height="2" />
+ </bezel>
+ <bezel name="8.4" element="led" inputtag="IN.4" inputmask="0x10">
+ <bounds x="45" y="45" width="2" height="2" />
+ </bezel>
+ <bezel name="8.3" element="led" inputtag="IN.4" inputmask="0x08">
+ <bounds x="45" y="55" width="2" height="2" />
+ </bezel>
+ <bezel name="8.2" element="led" inputtag="IN.4" inputmask="0x04">
+ <bounds x="45" y="65" width="2" height="2" />
+ </bezel>
+ <bezel name="8.1" element="led" inputtag="IN.4" inputmask="0x02">
+ <bounds x="45" y="75" width="2" height="2" />
+ </bezel>
+ <bezel name="8.0" element="led" inputtag="IN.4" inputmask="0x01">
+ <bounds x="45" y="85" width="2" height="2" />
+ </bezel>
- <bezel element="disk_white"><bounds x="88.2" y="14.2" width="5" height="5" /></bezel>
- <bezel element="disk_white"><bounds x="88.2" y="23" width="5" height="5" /></bezel>
- <bezel element="disk_white"><bounds x="88.2" y="31.8" width="5" height="5" /></bezel>
- <bezel element="disk_white"><bounds x="88.2" y="40.6" width="5" height="5" /></bezel>
- <bezel element="disk_white"><bounds x="88.2" y="49.4" width="5" height="5" /></bezel>
- <bezel element="disk_white"><bounds x="88.2" y="58.2" width="5" height="5" /></bezel>
- <bezel element="disk_white"><bounds x="88.2" y="67" width="5" height="5" /></bezel>
- <bezel element="disk_white"><bounds x="88.2" y="75.8" width="5" height="5" /></bezel>
+ <!-- Column F -->
+ <bezel name="9.7" element="led" inputtag="IN.5" inputmask="0x80">
+ <bounds x="55" y="15" width="2" height="2" />
+ </bezel>
+ <bezel name="9.6" element="led" inputtag="IN.5" inputmask="0x40">
+ <bounds x="55" y="25" width="2" height="2" />
+ </bezel>
+ <bezel name="9.5" element="led" inputtag="IN.5" inputmask="0x20">
+ <bounds x="55" y="35" width="2" height="2" />
+ </bezel>
+ <bezel name="9.4" element="led" inputtag="IN.5" inputmask="0x10">
+ <bounds x="55" y="45" width="2" height="2" />
+ </bezel>
+ <bezel name="9.3" element="led" inputtag="IN.5" inputmask="0x08">
+ <bounds x="55" y="55" width="2" height="2" />
+ </bezel>
+ <bezel name="9.2" element="led" inputtag="IN.5" inputmask="0x04">
+ <bounds x="55" y="65" width="2" height="2" />
+ </bezel>
+ <bezel name="9.1" element="led" inputtag="IN.5" inputmask="0x02">
+ <bounds x="55" y="75" width="2" height="2" />
+ </bezel>
+ <bezel name="9.0" element="led" inputtag="IN.5" inputmask="0x01">
+ <bounds x="55" y="85" width="2" height="2" />
+ </bezel>
- <bezel element="text_re"><bounds x="88.2" y="15.2" width="5" height="3" /></bezel>
- <bezel element="text_cl"><bounds x="88.2" y="24" width="5" height="3" /></bezel>
- <bezel element="text_king"><bounds x="88.2" y="32.8" width="5" height="3" /></bezel>
- <bezel element="text_queen"><bounds x="88.2" y="41.6" width="5" height="3" /></bezel>
- <bezel element="text_bishop"><bounds x="88.2" y="50.4" width="5" height="3" /></bezel>
- <bezel element="text_knight"><bounds x="88.2" y="59.2" width="5" height="3" /></bezel>
- <bezel element="text_rook"><bounds x="88.2" y="68" width="5" height="3" /></bezel>
- <bezel element="text_pion"><bounds x="88.2" y="76.8" width="5" height="3" /></bezel>
+ <!-- Column G -->
+ <bezel name="10.7" element="led" inputtag="IN.6" inputmask="0x80">
+ <bounds x="65" y="15" width="2" height="2" />
+ </bezel>
+ <bezel name="10.6" element="led" inputtag="IN.6" inputmask="0x40">
+ <bounds x="65" y="25" width="2" height="2" />
+ </bezel>
+ <bezel name="10.5" element="led" inputtag="IN.6" inputmask="0x20">
+ <bounds x="65" y="35" width="2" height="2" />
+ </bezel>
+ <bezel name="10.4" element="led" inputtag="IN.6" inputmask="0x10">
+ <bounds x="65" y="45" width="2" height="2" />
+ </bezel>
+ <bezel name="10.3" element="led" inputtag="IN.6" inputmask="0x08">
+ <bounds x="65" y="55" width="2" height="2" />
+ </bezel>
+ <bezel name="10.2" element="led" inputtag="IN.6" inputmask="0x04">
+ <bounds x="65" y="65" width="2" height="2" />
+ </bezel>
+ <bezel name="10.1" element="led" inputtag="IN.6" inputmask="0x02">
+ <bounds x="65" y="75" width="2" height="2" />
+ </bezel>
+ <bezel name="10.0" element="led" inputtag="IN.6" inputmask="0x01">
+ <bounds x="65" y="85" width="2" height="2" />
+ </bezel>
- <bezel element="hlb" inputtag="IN.8" inputmask="0x80"><bounds x="87" y="13" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
- <bezel element="hlb" inputtag="IN.8" inputmask="0x40"><bounds x="87" y="21.8" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
- <bezel element="hlb" inputtag="IN.8" inputmask="0x20"><bounds x="87" y="30.6" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
- <bezel element="hlb" inputtag="IN.8" inputmask="0x10"><bounds x="87" y="39.4" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
- <bezel element="hlb" inputtag="IN.8" inputmask="0x08"><bounds x="87" y="48.2" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
- <bezel element="hlb" inputtag="IN.8" inputmask="0x04"><bounds x="87" y="57" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
- <bezel element="hlb" inputtag="IN.8" inputmask="0x02"><bounds x="87" y="65.8" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
- <bezel element="hlb" inputtag="IN.8" inputmask="0x01"><bounds x="87" y="74.6" width="7.4" height="7.4" /><color alpha="0.3" /></bezel>
+ <!-- Column H -->
+ <bezel name="11.7" element="led" inputtag="IN.7" inputmask="0x80">
+ <bounds x="75" y="15" width="2" height="2" />
+ </bezel>
+ <bezel name="11.6" element="led" inputtag="IN.7" inputmask="0x40">
+ <bounds x="75" y="25" width="2" height="2" />
+ </bezel>
+ <bezel name="11.5" element="led" inputtag="IN.7" inputmask="0x20">
+ <bounds x="75" y="35" width="2" height="2" />
+ </bezel>
+ <bezel name="11.4" element="led" inputtag="IN.7" inputmask="0x10">
+ <bounds x="75" y="45" width="2" height="2" />
+ </bezel>
+ <bezel name="11.3" element="led" inputtag="IN.7" inputmask="0x08">
+ <bounds x="75" y="55" width="2" height="2" />
+ </bezel>
+ <bezel name="11.2" element="led" inputtag="IN.7" inputmask="0x04">
+ <bounds x="75" y="65" width="2" height="2" />
+ </bezel>
+ <bezel name="11.1" element="led" inputtag="IN.7" inputmask="0x02">
+ <bounds x="75" y="75" width="2" height="2" />
+ </bezel>
+ <bezel name="11.0" element="led" inputtag="IN.7" inputmask="0x01">
+ <bounds x="75" y="85" width="2" height="2" />
+ </bezel>
- <!-- panel 7seg leds -->
+ <!-- Problem mode LED -->
+ <bezel name="0.7" element="led">
+ <bounds x="69" y="5" width="2" height="2" />
+ </bezel>
+ <!-- Display -->
<bezel name="digit3" element="digit">
- <bounds x="33" y="-14.5" width="5.66" height="8.5" />
+ <bounds x="31" y="2" width="4" height="8" />
</bezel>
<bezel name="digit2" element="digit">
- <bounds x="38.66" y="-14.5" width="5.66" height="8.5" />
- </bezel>
- <bezel name="digit1" element="digit">
- <bounds x="47.16" y="-14.5" width="5.66" height="8.5" />
- </bezel>
- <bezel name="digit0" element="digit">
- <bounds x="52.82" y="-14.5" width="5.66" height="8.5" />
+ <bounds x="36" y="2" width="4" height="8" />
</bezel>
-
<bezel name="2.7" element="led">
- <bounds x="45.58" y="-13" width="0.85" height="0.85" />
+ <bounds x="42" y="3" width="1" height="1" />
</bezel>
<bezel name="3.7" element="led">
- <bounds x="45.13" y="-8.35" width="0.85" height="0.85" />
+ <bounds x="42" y="8" width="1" height="1" />
+ </bezel>
+ <bezel name="digit1" element="digit">
+ <bounds x="45" y="2" width="4" height="8" />
+ </bezel>
+ <bezel name="digit0" element="digit">
+ <bounds x="50" y="2" width="4" height="8" />
</bezel>
-
- <!-- panel buttons -->
-
- <bezel element="black"><bounds x="73" y="-14.5" width="5" height="3" /></bezel>
- <bezel element="text_tm"><bounds x="73.05" y="-14.45" width="4.9" height="2.9" /></bezel>
- <bezel element="hlp" inputtag="IN.9" inputmask="0x01"><bounds x="73" y="-14.5" width="5" height="3" /><color alpha="0.25" /></bezel>
-
- <bezel element="black"><bounds x="79.2" y="-14.5" width="5" height="3" /></bezel>
- <bezel element="text_rv"><bounds x="79.25" y="-14.45" width="4.9" height="2.9" /></bezel>
- <bezel element="hlp" inputtag="IN.9" inputmask="0x02"><bounds x="79.2" y="-14.5" width="5" height="3" /><color alpha="0.25" /></bezel>
-
- <bezel element="black"><bounds x="85.4" y="-14.5" width="5" height="3" /></bezel>
- <bezel element="text_speak"><bounds x="85.45" y="-14.45" width="4.9" height="2.9" /></bezel>
- <bezel element="hlp" inputtag="IN.9" inputmask="0x04"><bounds x="85.4" y="-14.5" width="5" height="3" /><color alpha="0.25" /></bezel>
-
- <bezel element="black"><bounds x="73" y="-9" width="5" height="3" /></bezel>
- <bezel element="text_st"><bounds x="73.05" y="-8.95" width="4.9" height="2.9" /></bezel>
- <bezel element="hlp" inputtag="IN.9" inputmask="0x20"><bounds x="73" y="-9" width="5" height="3" /><color alpha="0.25" /></bezel>
-
- <bezel element="black"><bounds x="79.2" y="-9" width="5" height="3" /></bezel>
- <bezel element="text_dm"><bounds x="79.25" y="-8.95" width="4.9" height="2.9" /></bezel>
- <bezel element="hlp" inputtag="IN.9" inputmask="0x10"><bounds x="79.2" y="-9" width="5" height="3" /><color alpha="0.25" /></bezel>
-
- <bezel element="black"><bounds x="85.4" y="-9" width="5" height="3" /></bezel>
- <bezel element="text_lv"><bounds x="85.45" y="-8.95" width="4.9" height="2.9" /></bezel>
- <bezel element="hlp" inputtag="IN.9" inputmask="0x08"><bounds x="85.4" y="-9" width="5" height="3" /><color alpha="0.25" /></bezel>
-
-
</view>
</mamelayout>
diff --git a/src/mame/layout/h2hfootb.lay b/src/mame/layout/h2hfootb.lay
index 9a31d4f72bb..1bf59a074c9 100644
--- a/src/mame/layout/h2hfootb.lay
+++ b/src/mame/layout/h2hfootb.lay
@@ -34,7 +34,7 @@
<element name="text_p1">
<rect><color red="0.24" green="0.4" blue="0.24" /></rect>
- <text string="PL SEL:">
+ <text string="P1 SEL:">
<bounds x="0.0" y="0.17" width="1.0" height="0.6" />
<color red="0.7" green="0.7" blue="0.8" />
</text>
@@ -139,6 +139,7 @@
<bezel element="static_white"><bounds x="344" y="29" width="4" height="1" /></bezel>
<bezel element="static_white"><bounds x="344" y="56" width="4" height="1" /></bezel>
+
<!-- leds -->
<bezel name="0.5" element="seg"><bounds x="0" y="0" width="5" height="20" /></bezel>
diff --git a/src/mame/layout/k28.lay b/src/mame/layout/k28.lay
deleted file mode 100644
index 70e4c1e0577..00000000000
--- a/src/mame/layout/k28.lay
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0"?>
-<mamelayout version="2">
-
-<!-- define elements -->
-
- <element name="digit" defstate="0">
- <led14seg><color red="0.2" green="1.0" blue="0.85" /></led14seg>
- </element>
-
-<!-- add our own for DP(display point) and the CT(comma tail) segments -->
-<!-- MAME led16segsc won't do, since this one has them on the left side -->
-
- <element name="lamp_dp" defstate="0">
- <disk state="0"><color red="0.0235" green="0.1255" blue="0.1059" /></disk>
- <disk state="1"><color red="0.2" green="1.0" blue="0.85" /></disk>
- </element>
- <element name="lamp_ct" defstate="0">
- <rect state="0"><color red="0.0235" green="0.1255" blue="0.1059" /></rect>
- <rect state="1"><color red="0.2" green="1.0" blue="0.85" /></rect>
- </element>
-
-
-
-<!-- build screen -->
-
- <view name="Internal Layout">
- <bounds left="-1.5" right="99" top="0" bottom="15" />
-
- <!-- 9 digits -->
-
- <bezel name="digit8" element="digit"><bounds x="0" y="0" width="10" height="15" /></bezel>
- <bezel name="lamp814" element="lamp_dp"><bounds x="-1.5" y="11" width="1.5" height="1.5" /></bezel>
- <bezel name="lamp815" element="lamp_ct"><bounds x="-0.8" y="13.5" width="0.75" height="1.5" /></bezel>
-
- <bezel name="digit7" element="digit"><bounds x="11" y="0" width="10" height="15" /></bezel>
- <bezel name="lamp714" element="lamp_dp"><bounds x="9.5" y="11" width="1.5" height="1.5" /></bezel>
- <bezel name="lamp715" element="lamp_ct"><bounds x="10.2" y="13.5" width="0.75" height="1.5" /></bezel>
-
- <bezel name="digit6" element="digit"><bounds x="22" y="0" width="10" height="15" /></bezel>
- <bezel name="lamp614" element="lamp_dp"><bounds x="20.5" y="11" width="1.5" height="1.5" /></bezel>
- <bezel name="lamp615" element="lamp_ct"><bounds x="21.2" y="13.5" width="0.75" height="1.5" /></bezel>
-
- <bezel name="digit5" element="digit"><bounds x="33" y="0" width="10" height="15" /></bezel>
- <bezel name="lamp514" element="lamp_dp"><bounds x="31.5" y="11" width="1.5" height="1.5" /></bezel>
- <bezel name="lamp515" element="lamp_ct"><bounds x="32.2" y="13.5" width="0.75" height="1.5" /></bezel>
-
- <bezel name="digit4" element="digit"><bounds x="44" y="0" width="10" height="15" /></bezel>
- <bezel name="lamp414" element="lamp_dp"><bounds x="42.5" y="11" width="1.5" height="1.5" /></bezel>
- <bezel name="lamp415" element="lamp_ct"><bounds x="43.2" y="13.5" width="0.75" height="1.5" /></bezel>
-
- <bezel name="digit3" element="digit"><bounds x="55" y="0" width="10" height="15" /></bezel>
- <bezel name="lamp314" element="lamp_dp"><bounds x="53.5" y="11" width="1.5" height="1.5" /></bezel>
- <bezel name="lamp315" element="lamp_ct"><bounds x="54.2" y="13.5" width="0.75" height="1.5" /></bezel>
-
- <bezel name="digit2" element="digit"><bounds x="66" y="0" width="10" height="15" /></bezel>
- <bezel name="lamp214" element="lamp_dp"><bounds x="64.5" y="11" width="1.5" height="1.5" /></bezel>
- <bezel name="lamp215" element="lamp_ct"><bounds x="65.2" y="13.5" width="0.75" height="1.5" /></bezel>
-
- <bezel name="digit1" element="digit"><bounds x="77" y="0" width="10" height="15" /></bezel>
- <bezel name="lamp114" element="lamp_dp"><bounds x="75.5" y="11" width="1.5" height="1.5" /></bezel>
- <bezel name="lamp115" element="lamp_ct"><bounds x="76.2" y="13.5" width="0.75" height="1.5" /></bezel>
-
- <bezel name="digit0" element="digit"><bounds x="88" y="0" width="10" height="15" /></bezel>
- <bezel name="lamp14" element="lamp_dp"><bounds x="86.5" y="11" width="1.5" height="1.5" /></bezel>
- <bezel name="lamp15" element="lamp_ct"><bounds x="87.2" y="13.5" width="0.75" height="1.5" /></bezel>
-
- </view>
-</mamelayout>
diff --git a/src/mame/layout/k28m2.lay b/src/mame/layout/k28m2.lay
deleted file mode 100644
index dde1a20e295..00000000000
--- a/src/mame/layout/k28m2.lay
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0"?>
-<mamelayout version="2">
-
-<!-- define elements -->
-
- <element name="digit" defstate="0">
- <led16seg><color red="0.5" green="0.5" blue="0.5" /></led16seg>
- </element>
-
-
-<!-- build screen -->
-
- <view name="Internal Layout">
- <bounds left="0" right="80" top="0" bottom="15" />
-
- <bezel name="digit0" element="digit"><bounds x="0" y="0" width="10" height="15" /></bezel>
- <bezel name="digit1" element="digit"><bounds x="10" y="0" width="10" height="15" /></bezel>
- <bezel name="digit2" element="digit"><bounds x="20" y="0" width="10" height="15" /></bezel>
- <bezel name="digit3" element="digit"><bounds x="30" y="0" width="10" height="15" /></bezel>
- <bezel name="digit4" element="digit"><bounds x="40" y="0" width="10" height="15" /></bezel>
- <bezel name="digit5" element="digit"><bounds x="50" y="0" width="10" height="15" /></bezel>
- <bezel name="digit6" element="digit"><bounds x="60" y="0" width="10" height="15" /></bezel>
- <bezel name="digit7" element="digit"><bounds x="70" y="0" width="10" height="15" /></bezel>
-
- </view>
-</mamelayout>
diff --git a/src/mame/layout/lostreas.lay b/src/mame/layout/lostreas.lay
deleted file mode 100644
index ac967ce00f2..00000000000
--- a/src/mame/layout/lostreas.lay
+++ /dev/null
@@ -1,181 +0,0 @@
-<?xml version="1.0"?>
-<mamelayout version="2">
-
-<!-- define elements -->
-
- <element name="static_blue"><rect><color red="0.1" green="0.25" blue="0.5" /></rect></element>
- <element name="static_blue2"><rect><color red="0.04" green="0.1" blue="0.2" /></rect></element>
- <element name="disk_cyan"><disk><color red="0.0" green="0.75" blue="1.0" /></disk></element>
- <element name="disk_white"><disk><color red="0.8" green="0.9" blue="1.0" /></disk></element>
-
- <element name="led" defstate="0">
- <disk state="0"><color red="0.2" green="0.04" blue="0.046" /></disk>
- <disk state="1"><color red="1.0" green="0.2" blue="0.23" /></disk>
- </element>
-
- <element name="text_1">
- <rect><color red="0.1" green="0.25" blue="0.5" /></rect>
- <text string="1"><color red="0.04" green="0.1" blue="0.2" /></text>
- </element>
- <element name="text_2">
- <rect><color red="0.1" green="0.25" blue="0.5" /></rect>
- <text string="2"><color red="0.04" green="0.1" blue="0.2" /></text>
- </element>
- <element name="text_3">
- <rect><color red="0.1" green="0.25" blue="0.5" /></rect>
- <text string="3"><color red="0.04" green="0.1" blue="0.2" /></text>
- </element>
- <element name="text_4">
- <rect><color red="0.1" green="0.25" blue="0.5" /></rect>
- <text string="4"><color red="0.04" green="0.1" blue="0.2" /></text>
- </element>
- <element name="text_5">
- <rect><color red="0.1" green="0.25" blue="0.5" /></rect>
- <text string="5"><color red="0.04" green="0.1" blue="0.2" /></text>
- </element>
- <element name="text_6">
- <rect><color red="0.1" green="0.25" blue="0.5" /></rect>
- <text string="6"><color red="0.04" green="0.1" blue="0.2" /></text>
- </element>
- <element name="text_7">
- <rect><color red="0.1" green="0.25" blue="0.5" /></rect>
- <text string="7"><color red="0.04" green="0.1" blue="0.2" /></text>
- </element>
- <element name="text_8">
- <rect><color red="0.1" green="0.25" blue="0.5" /></rect>
- <text string="8"><color red="0.04" green="0.1" blue="0.2" /></text>
- </element>
- <element name="text_9">
- <rect><color red="0.1" green="0.25" blue="0.5" /></rect>
- <text string="9"><color red="0.04" green="0.1" blue="0.2" /></text>
- </element>
- <element name="text_10">
- <rect><color red="0.1" green="0.25" blue="0.5" /></rect>
- <text string="10"><color red="0.04" green="0.1" blue="0.2" /></text>
- </element>
- <element name="text_11">
- <rect><color red="0.1" green="0.25" blue="0.5" /></rect>
- <text string="11"><color red="0.04" green="0.1" blue="0.2" /></text>
- </element>
- <element name="text_12">
- <rect><color red="0.1" green="0.25" blue="0.5" /></rect>
- <text string="12"><color red="0.04" green="0.1" blue="0.2" /></text>
- </element>
-
- <element name="text_100">
- <rect><color red="0.1" green="0.25" blue="0.5" /></rect>
- <text string="100"><color red="0.04" green="0.1" blue="0.2" /></text>
- </element>
- <element name="text_150">
- <rect><color red="0.1" green="0.25" blue="0.5" /></rect>
- <text string="150"><color red="0.04" green="0.1" blue="0.2" /></text>
- </element>
- <element name="text_200">
- <rect><color red="0.1" green="0.25" blue="0.5" /></rect>
- <text string="200"><color red="0.04" green="0.1" blue="0.2" /></text>
- </element>
- <element name="text_250">
- <rect><color red="0.1" green="0.25" blue="0.5" /></rect>
- <text string="250"><color red="0.04" green="0.1" blue="0.2" /></text>
- </element>
- <element name="text_300">
- <rect><color red="0.1" green="0.25" blue="0.5" /></rect>
- <text string="300"><color red="0.04" green="0.1" blue="0.2" /></text>
- </element>
- <element name="text_350">
- <rect><color red="0.1" green="0.25" blue="0.5" /></rect>
- <text string="350"><color red="0.04" green="0.1" blue="0.2" /></text>
- </element>
-
- <element name="text_air">
- <rect><color red="0.1" green="0.25" blue="0.5" /></rect>
- <text string="AIR"><color red="0.04" green="0.1" blue="0.2" /></text>
- </element>
- <element name="text_ss">
- <rect><color red="0.1" green="0.25" blue="0.5" /></rect>
- <text string="$$"><color red="0.04" green="0.1" blue="0.2" /></text>
- </element>
-
- <element name="text_n">
- <rect><color red="0.0" green="0.75" blue="1.0" /></rect>
- <text string="N"><color red="1" green="1" blue="1" /></text>
- </element>
- <element name="text_s">
- <rect><color red="0.0" green="0.75" blue="1.0" /></rect>
- <text string="S"><color red="1" green="1" blue="1" /></text>
- </element>
- <element name="text_w">
- <rect><color red="0.0" green="0.75" blue="1.0" /></rect>
- <text string="W"><color red="1" green="1" blue="1" /></text>
- </element>
- <element name="text_e">
- <rect><color red="0.0" green="0.75" blue="1.0" /></rect>
- <text string="E"><color red="1" green="1" blue="1" /></text>
- </element>
-
-
-<!-- build screen -->
-
- <view name="Internal Layout">
- <bounds left="2.2" right="18.5" top="1" bottom="17.3" />
- <bezel element="static_blue">
- <bounds left="0" right="20" top="0" bottom="20" />
- </bezel>
-
- <!-- left side -->
-
- <bezel element="text_12"><bounds x="2.5" y="4" width="2" height="0.5" /></bezel>
- <bezel element="text_11"><bounds x="2.5" y="4.7" width="2" height="0.5" /></bezel>
- <bezel element="text_10"><bounds x="2.5" y="6" width="2" height="0.5" /></bezel>
- <bezel element="text_9"><bounds x="2.5" y="6.7" width="2" height="0.5" /></bezel>
- <bezel element="text_8"><bounds x="2.5" y="8" width="2" height="0.5" /></bezel>
- <bezel element="text_7"><bounds x="2.5" y="8.7" width="2" height="0.5" /></bezel>
- <bezel element="text_6"><bounds x="2.5" y="10" width="2" height="0.5" /></bezel>
- <bezel element="text_5"><bounds x="2.5" y="10.7" width="2" height="0.5" /></bezel>
- <bezel element="text_4"><bounds x="2.5" y="12" width="2" height="0.5" /></bezel>
- <bezel element="text_3"><bounds x="2.5" y="12.7" width="2" height="0.5" /></bezel>
- <bezel element="text_2"><bounds x="2.5" y="14" width="2" height="0.5" /></bezel>
- <bezel element="text_1"><bounds x="2.5" y="14.7" width="2" height="0.5" /></bezel>
- <bezel element="text_air"><bounds x="1.5" y="15.7" width="4" height="0.5" /></bezel>
-
- <bezel element="text_350"><bounds x="4.4" y="4.35" width="3" height="0.5" /></bezel>
- <bezel element="text_300"><bounds x="4.4" y="6.35" width="3" height="0.5" /></bezel>
- <bezel element="text_250"><bounds x="4.4" y="8.35" width="3" height="0.5" /></bezel>
- <bezel element="text_200"><bounds x="4.4" y="10.35" width="3" height="0.5" /></bezel>
- <bezel element="text_150"><bounds x="4.4" y="12.35" width="3" height="0.5" /></bezel>
- <bezel element="text_100"><bounds x="4.4" y="14.35" width="3" height="0.5" /></bezel>
- <bezel element="text_ss"><bounds x="4.4" y="15.7" width="3" height="0.5" /></bezel>
-
- <bezel element="static_blue2"><bounds x="3.1" y="4.57" width="0.77" height="0.06" /></bezel>
- <bezel element="static_blue2"><bounds x="3.1" y="6.57" width="0.77" height="0.06" /></bezel>
- <bezel element="static_blue2"><bounds x="3.1" y="8.57" width="0.77" height="0.06" /></bezel>
- <bezel element="static_blue2"><bounds x="3.1" y="10.57" width="0.77" height="0.06" /></bezel>
- <bezel element="static_blue2"><bounds x="3.1" y="12.57" width="0.77" height="0.06" /></bezel>
- <bezel element="static_blue2"><bounds x="3.1" y="14.57" width="0.77" height="0.06" /></bezel>
- <bezel element="static_blue2"><bounds x="7" y="0" width="0.3" height="20" /></bezel>
-
- <bezel name="0.5" element="led"><bounds x="4" y="4" width="1.2" height="1.2" /></bezel>
- <bezel name="0.4" element="led"><bounds x="4" y="6" width="1.2" height="1.2" /></bezel>
- <bezel name="0.3" element="led"><bounds x="4" y="8" width="1.2" height="1.2" /></bezel>
- <bezel name="0.2" element="led"><bounds x="4" y="10" width="1.2" height="1.2" /></bezel>
- <bezel name="0.1" element="led"><bounds x="4" y="12" width="1.2" height="1.2" /></bezel>
- <bezel name="0.0" element="led"><bounds x="4" y="14" width="1.2" height="1.2" /></bezel>
-
- <!-- compass -->
-
- <bezel element="disk_white"><bounds x="8.1" y="2.1" width="9" height="9" /></bezel>
- <bezel element="disk_cyan"><bounds x="8.5" y="2.5" width="8.2" height="8.2" /></bezel>
-
- <bezel element="text_n"><bounds x="12" y="2.7" width="1.2" height="1.2" /></bezel>
- <bezel element="text_s"><bounds x="12" y="9.3" width="1.2" height="1.2" /></bezel>
- <bezel element="text_w"><bounds x="8.8" y="6" width="1.2" height="1.2" /></bezel>
- <bezel element="text_e"><bounds x="15.2" y="6" width="1.2" height="1.2" /></bezel>
-
- <bezel name="0.6" element="led"><bounds x="12" y="4" width="1.2" height="1.2" /></bezel>
- <bezel name="0.7" element="led"><bounds x="12" y="8" width="1.2" height="1.2" /></bezel>
- <bezel name="0.8" element="led"><bounds x="10" y="6" width="1.2" height="1.2" /></bezel>
- <bezel name="0.9" element="led"><bounds x="14" y="6" width="1.2" height="1.2" /></bezel>
- <bezel name="0.10" element="led"><bounds x="12" y="6" width="1.2" height="1.2" /></bezel>
-
- </view>
-</mamelayout>
diff --git a/src/mame/layout/mathmagi.lay b/src/mame/layout/mathmagi.lay
index b75ac74e178..eb4e745c77b 100644
--- a/src/mame/layout/mathmagi.lay
+++ b/src/mame/layout/mathmagi.lay
@@ -27,6 +27,7 @@
</element>
+
<!-- build screen -->
<view name="Internal Layout">
@@ -61,28 +62,28 @@
<!-- math symbols custom digit -->
- <bezel name="8.6" element="lamp_dash"><bounds x="21.5" y="17.25" width="7" height="0.5" /></bezel>
+ <bezel name="lamp87" element="lamp_dash"><bounds x="21.5" y="17.25" width="7" height="0.5" /></bezel>
- <bezel name="8.1" element="lamp_slash"><bounds x="24" y="9.5" width="5" height="7.5" /></bezel>
- <bezel name="8.1" element="lamp_slash"><bounds x="21" y="17" width="5" height="7.5" /></bezel>
+ <bezel name="lamp82" element="lamp_slash"><bounds x="24" y="9.5" width="5" height="7.5" /></bezel>
+ <bezel name="lamp82" element="lamp_slash"><bounds x="21" y="17" width="5" height="7.5" /></bezel>
- <bezel name="8.2" element="lamp_backslash"><bounds x="21" y="9.5" width="5" height="7.5" /></bezel>
- <bezel name="8.2" element="lamp_backslash"><bounds x="24" y="17" width="5" height="7.5" /></bezel>
+ <bezel name="lamp83" element="lamp_backslash"><bounds x="21" y="9.5" width="5" height="7.5" /></bezel>
+ <bezel name="lamp83" element="lamp_backslash"><bounds x="24" y="17" width="5" height="7.5" /></bezel>
- <bezel name="8.0" element="lamp_dot"><bounds x="24.25" y="12.25" width="1.5" height="1.5" /></bezel>
- <bezel name="8.0" element="lamp_dot"><bounds x="24.25" y="21.75" width="1.5" height="1.5" /></bezel>
+ <bezel name="lamp81" element="lamp_dot"><bounds x="24.25" y="12.25" width="1.5" height="1.5" /></bezel>
+ <bezel name="lamp81" element="lamp_dot"><bounds x="24.25" y="21.75" width="1.5" height="1.5" /></bezel>
<!-- equals sign custom digit -->
- <bezel name="9.0" element="lamp_dash"><bounds x="51.5" y="14.5" width="7" height="0.5" /></bezel>
- <bezel name="9.3" element="lamp_dash"><bounds x="51.5" y="20.0" width="7" height="0.5" /></bezel>
+ <bezel name="lamp91" element="lamp_dash"><bounds x="51.5" y="14.5" width="7" height="0.5" /></bezel>
+ <bezel name="lamp94" element="lamp_dash"><bounds x="51.5" y="20.0" width="7" height="0.5" /></bezel>
<!-- other lamps -->
- <bezel name="10.0" element="lamp_dot"><bounds x="1" y="1" width="4" height="4" /></bezel>
- <bezel name="10.1" element="lamp_dot"><bounds x="26" y="1" width="4" height="4" /></bezel>
- <bezel name="10.3" element="lamp_dot"><bounds x="51" y="1" width="4" height="4" /></bezel>
- <bezel name="10.6" element="lamp_dot"><bounds x="76" y="1" width="4" height="4" /></bezel>
+ <bezel name="lamp101" element="lamp_dot"><bounds x="1" y="1" width="4" height="4" /></bezel>
+ <bezel name="lamp102" element="lamp_dot"><bounds x="26" y="1" width="4" height="4" /></bezel>
+ <bezel name="lamp104" element="lamp_dot"><bounds x="51" y="1" width="4" height="4" /></bezel>
+ <bezel name="lamp107" element="lamp_dot"><bounds x="76" y="1" width="4" height="4" /></bezel>
</view>
diff --git a/src/mame/layout/mcompgin.lay b/src/mame/layout/mcompgin.lay
deleted file mode 100644
index 9d3e4d2766a..00000000000
--- a/src/mame/layout/mcompgin.lay
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0"?>
-<mamelayout version="2">
-
-<!-- define elements -->
-
- <element name="led" defstate="0">
- <disk state="0"><color red="0.2" green="0.04" blue="0.046" /></disk>
- <disk state="1"><color red="1.0" green="0.2" blue="0.23" /></disk>
- </element>
-
-
-<!-- build screen -->
-
- <view name="Internal Layout">
- <bounds left="0" right="100" top="0" bottom="100" />
-
- <bezel name="0.0" element="led"><bounds x="1" y="1" width="1" height="1" /></bezel>
-
- </view>
-</mamelayout>
diff --git a/src/mame/layout/snmath.lay b/src/mame/layout/snmath.lay
index 14f53a0704d..ca1eb371aea 100644
--- a/src/mame/layout/snmath.lay
+++ b/src/mame/layout/snmath.lay
@@ -8,7 +8,7 @@
</element>
<!-- add our own for DP(display point) and the CT(comma tail) segments -->
-<!-- MAME led16segsc won't do, since this one has them on the left side -->
+<!-- MAME led16segsc won't do, since Speak & Math has them on the left side -->
<element name="lamp_dp" defstate="0">
<disk state="0"><color red="0.0235" green="0.1255" blue="0.1059" /></disk>
diff --git a/src/mame/layout/zodiac.lay b/src/mame/layout/zodiac.lay
deleted file mode 100644
index 0101e8b6c7f..00000000000
--- a/src/mame/layout/zodiac.lay
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version="1.0"?>
-<mamelayout version="2">
-
-<!-- define elements -->
-
- <element name="static_black"><rect><color red="0" green="0" blue="0" /></rect></element>
- <element name="disk_black"><disk><color red="0" green="0" blue="0" /></disk></element>
- <element name="disk_red"><disk><color red="0.25" green="0.05" blue="0.02" /></disk></element>
-
- <element name="led" defstate="0">
- <disk state="0"><color red="0.2" green="0.04" blue="0.046" /></disk>
- <disk state="1"><color red="1.0" green="0.2" blue="0.23" /></disk>
- </element>
-
- <element name="digit" defstate="0">
- <led7seg><color red="1.0" green="0.15" blue="0.08" /></led7seg>
- </element>
-
- <element name="text_1"><text string="1"><color red="0.7" green="0.7" blue="0.7" /></text></element>
- <element name="text_2"><text string="2"><color red="0.7" green="0.7" blue="0.7" /></text></element>
- <element name="text_3"><text string="3"><color red="0.7" green="0.7" blue="0.7" /></text></element>
- <element name="text_4"><text string="4"><color red="0.7" green="0.7" blue="0.7" /></text></element>
- <element name="text_5"><text string="5"><color red="0.7" green="0.7" blue="0.7" /></text></element>
- <element name="text_6"><text string="6"><color red="0.7" green="0.7" blue="0.7" /></text></element>
- <element name="text_7"><text string="7"><color red="0.7" green="0.7" blue="0.7" /></text></element>
- <element name="text_8"><text string="8"><color red="0.7" green="0.7" blue="0.7" /></text></element>
- <element name="text_9"><text string="9"><color red="0.7" green="0.7" blue="0.7" /></text></element>
- <element name="text_10"><text string="10"><color red="0.7" green="0.7" blue="0.7" /></text></element>
- <element name="text_11"><text string="11"><color red="0.7" green="0.7" blue="0.7" /></text></element>
- <element name="text_12"><text string="12"><color red="0.7" green="0.7" blue="0.7" /></text></element>
-
-
-<!-- build screen -->
-
- <view name="Internal Layout">
- <bounds left="-35" right="158" top="5" bottom="198" />
- <bezel element="static_black">
- <bounds left="-35" right="158" top="5" bottom="198" />
- </bezel>
-
- <bezel element="disk_red"><bounds x="-40" y="0" width="203" height="203" /></bezel>
- <bezel element="disk_black"><bounds x="-15" y="25" width="153" height="153" /></bezel>
-
- <bezel name="digit7" element="digit"><bounds x="20" y="70" width="10" height="15" /></bezel>
- <bezel name="digit6" element="digit"><bounds x="30" y="70" width="10" height="15" /></bezel>
- <bezel name="digit5" element="digit"><bounds x="40" y="70" width="10" height="15" /></bezel>
- <bezel name="digit4" element="digit"><bounds x="50" y="70" width="10" height="15" /></bezel>
- <bezel name="digit3" element="digit"><bounds x="60" y="70" width="10" height="15" /></bezel>
- <bezel name="digit2" element="digit"><bounds x="70" y="70" width="10" height="15" /></bezel>
- <bezel name="digit1" element="digit"><bounds x="80" y="70" width="10" height="15" /></bezel>
- <bezel name="digit0" element="digit"><bounds x="90" y="70" width="10" height="15" /></bezel>
-
- <bezel name="9.7" element="led"><bounds x="15" y="145" width="3" height="3" /></bezel>
- <bezel name="9.2" element="led"><bounds x="40" y="160" width="3" height="3" /></bezel>
- <bezel name="9.4" element="led"><bounds x="80" y="160" width="3" height="3" /></bezel>
- <bezel name="9.5" element="led"><bounds x="105" y="145" width="3" height="3" /></bezel>
- <bezel name="9.1" element="led"><bounds x="120" y="120" width="3" height="3" /></bezel>
- <bezel name="9.3" element="led"><bounds x="120" y="80" width="3" height="3" /></bezel>
-
- <bezel name="8.7" element="led"><bounds x="105" y="55" width="3" height="3" /></bezel>
- <bezel name="8.2" element="led"><bounds x="80" y="40" width="3" height="3" /></bezel>
- <bezel name="8.4" element="led"><bounds x="40" y="40" width="3" height="3" /></bezel>
- <bezel name="8.5" element="led"><bounds x="15" y="55" width="3" height="3" /></bezel>
- <bezel name="8.1" element="led"><bounds x="0" y="80" width="3" height="3" /></bezel>
- <bezel name="8.3" element="led"><bounds x="0" y="120" width="3" height="3" /></bezel>
-
- <bezel element="text_1"><bounds x="17" y="143" width="12" height="7" /></bezel>
- <bezel element="text_2"><bounds x="42" y="158" width="12" height="7" /></bezel>
- <bezel element="text_3"><bounds x="82" y="158" width="12" height="7" /></bezel>
- <bezel element="text_4"><bounds x="107" y="143" width="12" height="7" /></bezel>
- <bezel element="text_5"><bounds x="122" y="118" width="12" height="7" /></bezel>
- <bezel element="text_6"><bounds x="122" y="78" width="12" height="7" /></bezel>
-
- <bezel element="text_7"><bounds x="107" y="53" width="12" height="7" /></bezel>
- <bezel element="text_8"><bounds x="82" y="38" width="12" height="7" /></bezel>
- <bezel element="text_9"><bounds x="42" y="38" width="12" height="7" /></bezel>
- <bezel element="text_10"><bounds x="17" y="53" width="12" height="7" /></bezel>
- <bezel element="text_11"><bounds x="2" y="78" width="12" height="7" /></bezel>
- <bezel element="text_12"><bounds x="2" y="118" width="12" height="7" /></bezel>
-
-
- </view>
-</mamelayout>
diff --git a/src/mame/machine/315-5838_317-0229_comp.cpp b/src/mame/machine/315-5838_317-0229_comp.cpp
index f4c0b69129b..cfd38aa7c88 100644
--- a/src/mame/machine/315-5838_317-0229_comp.cpp
+++ b/src/mame/machine/315-5838_317-0229_comp.cpp
@@ -4,32 +4,21 @@
315-5838 - Decathlete (ST-V)
317-0229 - Dead or Alive (Model 2A)
- 317-0229 - Name Club / Name Club Ver 2 (ST-V) (tested as RCDD2 in the service menu!)
- 317-0231 - Print Club Love Love / Print Club Love Love Ver 2 (ST-V)
-
- Several Print Club (ST-V) carts have
- an unpopulated space marked '317-0229' on the PCB
Package Type: TQFP100
- Decathlete accesses the chip at 2 different addresses, however, I don't think there
- are 2 channels / sets of registers, instead the 2nd set of addresses are just a
- mirror that allows access to a different set of source roms; the tables etc. are
- re-uploaded before every transfer.
+ This appears to be a dual channel compression chip, used in 1996, predating the 5881.
+ Decathlete uses it to compress ALL the game graphics, Dead or Alive uses it for a
+ dumb security check, decompressing a single string.
+
+ Each channel appears to be connected to a different set of ROMs, however there is
+ defintiely only a single 315-5838 chip. (could the different channels actually just
+ be mirror addresses, with part of the address determining the ROMs to use?)
- Dead of Alive has the source data in RAM, not ROM.
+ Dead of Alive only uses a single channel, and has the source data in RAM, not ROM.
This is similar to how some 5881 games were set up, with the ST-V versions decrypting
data directly from ROM and the Model 2 ones using a RAM source buffer.
- Decathlete decompresses all graphic data with the chip.
-
- The Name Club games use the chip for decompressing data for the printer (full size
- versions of the graphics?)
-
- Print Club Love Love decrypts some start up code/data required for booting.
-
- Dead or Alive decrypts a string that is checked on startup, nothing else.
-
Looking at the values read I don't think there is any address based encryption, for
example many blocks where you'd expect a zero fill start with repeating patterns
of 8f708f70 (different lengths) channel would appear to relate to compressed 0x00 data
@@ -60,12 +49,11 @@ sega_315_5838_comp_device::sega_315_5838_comp_device(const machine_config &mconf
void sega_315_5838_comp_device::device_start()
{
- m_decathlt_lastcount = 0;
- m_decathlt_prot_uploadmode = 0;
- m_decathlt_prot_uploadoffset = 0;
-
for (auto & elem : m_channel)
{
+ elem.m_decathlt_lastcount = 0;
+ elem.m_decathlt_prot_uploadmode = 0;
+ elem.m_decathlt_prot_uploadoffset = 0;
elem.m_read_ch.bind_relative_to(*owner());
}
@@ -73,10 +61,14 @@ void sega_315_5838_comp_device::device_start()
void sega_315_5838_comp_device::device_reset()
{
- m_srcoffset = 0;
- m_decathlt_lastcount = 0;
- m_decathlt_prot_uploadmode = 0;
- m_decathlt_prot_uploadoffset = 0;
+ for (auto & elem : m_channel)
+ {
+ elem.m_srcoffset = 0;
+ elem.m_decathlt_lastcount = 0;
+ elem.m_decathlt_prot_uploadmode = 0;
+ elem.m_decathlt_prot_uploadoffset = 0;
+ }
+
m_protstate = 0;
}
@@ -108,46 +100,46 @@ UINT32 sega_315_5838_comp_device::genericdecathlt_prot_r(UINT32 mem_mask, int ch
// UINT32 *fake0 = (UINT32*)memregion( ":fake0" )->base();
// UINT32 retvalue = 0xffff;
- switch (m_srcoffset)
+ switch (m_channel[channel].m_srcoffset)
{
default:
- m_decathlt_lastcount++;
+ m_channel[channel].m_decathlt_lastcount++;
UINT32 tempdata = 0;
- tempdata |= m_channel[channel].m_read_ch(m_srcoffset) << 0;
- m_srcoffset++;
- tempdata |= m_channel[channel].m_read_ch(m_srcoffset) << 16;
- m_srcoffset++;
+ tempdata |= m_channel[channel].m_read_ch(m_channel[channel].m_srcoffset) << 0;
+ m_channel[channel].m_srcoffset++;
+ tempdata |= m_channel[channel].m_read_ch(m_channel[channel].m_srcoffset) << 16;
+ m_channel[channel].m_srcoffset++;
#ifdef DEBUG_DATA_DUMP
- //printf("read addr %08x, blah_r %08x - read count count %08x\n", m_srcoffset*2, tempdata, m_decathlt_lastcount*4);
+ //printf("read addr %08x, blah_r %08x - read count count %08x\n", m_channel[channel].m_srcoffset*2, tempdata, m_channel[channel].m_decathlt_lastcount*4);
fwrite(&tempdata, 1, 4, tempfile);
#else
- logerror("read addr %08x, blah_r %08x - read count count %08x\n", m_srcoffset*2, tempdata, m_decathlt_lastcount*4);
+ logerror("read addr %08x, blah_r %08x - read count count %08x\n", m_channel[channel].m_srcoffset*2, tempdata, m_channel[channel].m_decathlt_lastcount*4);
#endif
return tempdata;
#if 0
case 0x03228e4:
- if (fake0) retvalue = fake0[(((0x20080/4)+m_decathlt_lastcount))];
- m_decathlt_lastcount++;
+ if (fake0) retvalue = fake0[(((0x20080/4)+m_channel[channel].m_decathlt_lastcount))];
+ m_channel[channel].m_decathlt_lastcount++;
return retvalue;
case 0x00a9f3a:
- if (fake0) retvalue = fake0[(((0x00000/4)+m_decathlt_lastcount))];
- m_decathlt_lastcount++;
+ if (fake0) retvalue = fake0[(((0x00000/4)+m_channel[channel].m_decathlt_lastcount))];
+ m_channel[channel].m_decathlt_lastcount++;
return retvalue;
case 0x0213ab4:
- if (fake0) retvalue = fake0[(((0x40000/4)+m_decathlt_lastcount))];
- m_decathlt_lastcount++;
+ if (fake0) retvalue = fake0[(((0x40000/4)+m_channel[channel].m_decathlt_lastcount))];
+ m_channel[channel].m_decathlt_lastcount++;
return retvalue;
case 0x01efaf0:
- if (fake0) retvalue = fake0[(((0x60000/4)+m_decathlt_lastcount))];
- m_decathlt_lastcount++;
+ if (fake0) retvalue = fake0[(((0x60000/4)+m_channel[channel].m_decathlt_lastcount))];
+ m_channel[channel].m_decathlt_lastcount++;
return retvalue;
case 0x033f16c:
@@ -188,14 +180,14 @@ UINT32 sega_315_5838_comp_device::genericdecathlt_prot_r(UINT32 mem_mask, int ch
void sega_315_5838_comp_device::set_prot_addr(UINT32 data, UINT32 mem_mask, int channel)
{
// printf("set_prot_addr\n");
- COMBINE_DATA(&m_srcoffset);
+ COMBINE_DATA(&m_channel[channel].m_srcoffset);
- //if (m_decathlt_part==0) logerror("%d, last read count was %06x\n",channel, m_decathlt_lastcount*4);
- m_decathlt_lastcount = 0;
+ //if (m_decathlt_part==0) logerror("%d, last read count was %06x\n",channel, m_channel[channel].m_decathlt_lastcount*4);
+ m_channel[channel].m_decathlt_lastcount = 0;
if (mem_mask == 0x0000ffff)
{
- printf("set source address to %08x (channel %d)\n", m_srcoffset, channel);
+ printf("set source address to %08x (channel %d)\n", m_channel[channel].m_srcoffset, channel);
}
@@ -206,24 +198,24 @@ void sega_315_5838_comp_device::set_prot_addr(UINT32 data, UINT32 mem_mask, int
fclose(tempfile);
char filename[256];
- sprintf(filename, "%d_compressed_%08x", channel, m_srcoffset * 2);
+ sprintf(filename, "%d_compressed_%08x", channel, m_channel[channel].m_srcoffset * 2);
tempfile = fopen(filename, "w+b");
// the table and dictionary are uploaded repeatedly, usually before groups of data transfers but
// it's always the same tables (one pair for each channel)
{
FILE* fp;
- sprintf(filename, "%d_compressed_table1_%08x", channel, m_srcoffset * 2);
+ sprintf(filename, "%d_compressed_table1", channel);
fp = fopen(filename, "w+b");
- fwrite(&m_decathlt_prottable1, 24, 2, fp);
+ fwrite(&m_channel[channel].m_decathlt_prottable1, 24, 2, fp);
fclose(fp);
}
{
FILE* fp;
- sprintf(filename, "%d_compressed_dictionary_%08x", channel, m_srcoffset * 2);
+ sprintf(filename, "%d_compressed_dictionary", channel);
fp = fopen(filename, "w+b");
- fwrite(&m_decathlt_dictionaryy, 128, 2, fp);
+ fwrite(&m_channel[channel].m_decathlt_dictionary, 128, 2, fp);
fclose(fp);
}
}
@@ -236,13 +228,13 @@ void sega_315_5838_comp_device::set_upload_mode(UINT16 data, int channel)
if ((data == 0x8000) || (data == 0x0000))
{
// logerror("changed to upload mode 1\n");
- m_decathlt_prot_uploadmode = 1;
- m_decathlt_prot_uploadoffset = 0;
+ m_channel[channel].m_decathlt_prot_uploadmode = 1;
+ m_channel[channel].m_decathlt_prot_uploadoffset = 0;
}
else if ((data == 0x8080) || (data == 0x0080))
{
- m_decathlt_prot_uploadmode = 2;
- m_decathlt_prot_uploadoffset = 0;
+ m_channel[channel].m_decathlt_prot_uploadmode = 2;
+ m_channel[channel].m_decathlt_prot_uploadoffset = 0;
}
else
{
@@ -252,30 +244,30 @@ void sega_315_5838_comp_device::set_upload_mode(UINT16 data, int channel)
void sega_315_5838_comp_device::upload_table_data(UINT16 data, int channel)
{
- if (m_decathlt_prot_uploadmode == 1)
+ if (m_channel[channel].m_decathlt_prot_uploadmode == 1)
{
- if (m_decathlt_prot_uploadoffset >= 24)
+ if (m_channel[channel].m_decathlt_prot_uploadoffset >= 24)
{
fatalerror("upload mode 1 error, too big\n");
return;
}
- //logerror("uploading table 1 %04x %04x\n",m_decathlt_prot_uploadoffset, data&0xffff);
- m_decathlt_prottable1[m_decathlt_prot_uploadoffset] = data & 0xffff;
- m_decathlt_prot_uploadoffset++;
+ //logerror("uploading table 1 %04x %04x\n",m_channel[channel].m_decathlt_prot_uploadoffset, data&0xffff);
+ m_channel[channel].m_decathlt_prottable1[m_channel[channel].m_decathlt_prot_uploadoffset] = data & 0xffff;
+ m_channel[channel].m_decathlt_prot_uploadoffset++;
printf("unk table 1 %04x (channel %d)\n", data & 0xffff, channel);
}
- else if (m_decathlt_prot_uploadmode == 2)
+ else if (m_channel[channel].m_decathlt_prot_uploadmode == 2)
{
- if (m_decathlt_prot_uploadoffset >= 128)
+ if (m_channel[channel].m_decathlt_prot_uploadoffset >= 128)
{
fatalerror("upload mode 2 error, too big\n");
return;
}
- //logerror("uploading table 2 %04x %04x\n",m_decathlt_prot_uploadoffset, data&0xffff);
- m_decathlt_dictionaryy[m_decathlt_prot_uploadoffset] = data & 0xffff;
- m_decathlt_prot_uploadoffset++;
+ //logerror("uploading table 2 %04x %04x\n",m_channel[channel].m_decathlt_prot_uploadoffset, data&0xffff);
+ m_channel[channel].m_decathlt_dictionary[m_channel[channel].m_decathlt_prot_uploadoffset] = data & 0xffff;
+ m_channel[channel].m_decathlt_prot_uploadoffset++;
printf("dictionary %04x (channel %d)\n", data & 0xffff, channel);
}
}
diff --git a/src/mame/machine/315-5838_317-0229_comp.h b/src/mame/machine/315-5838_317-0229_comp.h
index 4ad6070ab84..2fd0904450e 100644
--- a/src/mame/machine/315-5838_317-0229_comp.h
+++ b/src/mame/machine/315-5838_317-0229_comp.h
@@ -65,19 +65,17 @@ protected:
virtual void device_reset() override;
private:
- UINT16 m_decathlt_prottable1[24];
- UINT16 m_decathlt_dictionaryy[128];
-
- UINT32 m_srcoffset;
-
- UINT32 m_decathlt_lastcount;
- UINT32 m_decathlt_prot_uploadmode;
- UINT32 m_decathlt_prot_uploadoffset;
-
// Decathlete specific variables and functions (see machine/decathlt.c)
struct channel_type
{
+ UINT32 m_srcoffset;
+ UINT16 m_decathlt_prottable1[24];
+ UINT16 m_decathlt_dictionary[128];
+
+ UINT32 m_decathlt_lastcount;
+ UINT32 m_decathlt_prot_uploadmode;
+ UINT32 m_decathlt_prot_uploadoffset;
sega_dec_read_delegate m_read_ch;
};
diff --git a/src/mame/machine/apple1.cpp b/src/mame/machine/apple1.cpp
new file mode 100644
index 00000000000..59b360aea7e
--- /dev/null
+++ b/src/mame/machine/apple1.cpp
@@ -0,0 +1,404 @@
+// license:???
+// copyright-holders:Paul Daniels, Colin Howell, R. Belmont
+/***************************************************************************
+
+ machine.c
+
+ Functions to emulate general aspects of the machine (RAM, ROM, interrupts,
+ I/O ports)
+
+ The Apple I used a Motorola 6820 PIA for its keyboard and display
+ I/O. The keyboard was mapped to PIA port A, and the display to port
+ B.
+
+ Port A, the keyboard, was an input port connected to a standard
+ ASCII-encoded keyboard. The high bit of the port was tied to +5V.
+ The keyboard strobe signal was connected to the PIA's CA1 control
+ input so that the keyboard could signal each keypress to the PIA.
+ The processor could check for a keypress by testing the IRQA1 flag
+ in the Port A Control Register and then reading the character value
+ from Port A.
+
+ The keyboard connector also had two special lines, RESET and CLEAR
+ SCREEN, which were meant to be connected to pushbutton switches on
+ the keyboard. RESET was tied to the reset inputs for the CPU and
+ PIA; it allowed the user to stop a program and return control to the
+ Monitor. CLEAR SCREEN was directly tied to the video hardware and
+ would clear the display.
+
+ Port B, the display, was an output port which accepted 7-bit ASCII
+ characters from the PIA and wrote them on the display. The details
+ of this are described in video/apple1.c. Control line CB2 served
+ as an output signal to inform the display of a new character. (CB2
+ was also connected to line 7 of port B, which was configured as an
+ input, so that the CPU could more easily check the status of the
+ write.) The CB1 control input signaled the PIA when the display had
+ finished writing the character and could accept a new one.
+
+ MAME models the 6821 instead of the earlier 6820 used in the Apple
+ I, but there is no difference in functionality between the two
+ chips; the 6821 simply has a better ability to drive electrical
+ loads.
+
+ The Apple I had an optional cassette interface which plugged into
+ the expansion connector. This is described below in the "Cassette
+ interface I/O" section.
+
+***************************************************************************/
+
+#include "emu.h"
+#include "includes/apple1.h"
+#include "machine/6821pia.h"
+#include "cpu/m6502/m6502.h"
+#include "imagedev/cassette.h"
+#include "machine/ram.h"
+
+/*****************************************************************************
+** Structures
+*****************************************************************************/
+
+/* Use the same keyboard mapping as on a modern keyboard. This is not
+ the same as the keyboard mapping of the actual teletype-style
+ keyboards used with the Apple I, but it's less likely to cause
+ confusion for people who haven't memorized that layout.
+
+ The Backspace key is mapped to the '_' (underscore) character
+ because the Apple I ROM Monitor used "back-arrow" to erase
+ characters, rather than backspace, and back-arrow is an earlier
+ form of the underscore. */
+
+#define ESCAPE '\x1b'
+
+static const UINT8 apple1_unshifted_keymap[] =
+{
+ '0', '1', '2', '3', '4', '5', '6', '7',
+ '8', '9', '-', '=', '[', ']', ';', '\'',
+ ',', '.', '/', '\\', 'A', 'B', 'C', 'D',
+ 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L',
+ 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',
+ 'U', 'V', 'W', 'X', 'Y', 'Z', '\r', '_',
+ ' ', ESCAPE
+};
+
+static const UINT8 apple1_shifted_keymap[] =
+{
+ ')', '!', '@', '#', '$', '%', '^', '&',
+ '*', '(', '_', '+', '[', ']', ':', '"',
+ '<', '>', '?', '\\', 'A', 'B', 'C', 'D',
+ 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L',
+ 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',
+ 'U', 'V', 'W', 'X', 'Y', 'Z', '\r', '_',
+ ' ', ESCAPE
+};
+
+/* Control key mappings, like the other mappings, conform to a modern
+ keyboard where possible. Note that the Apple I ROM Monitor ignores
+ most control characters. */
+
+static const UINT8 apple1_control_keymap[] =
+{
+ '0', '1', '\x00', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f',
+ '8', '9', '\x1f', '=', '\x1b', '\x1d', ';', '\'',
+ ',', '.', '/', '\x1c', '\x01', '\x02', '\x03', '\x04',
+ '\x05', '\x06', '\x07', '\x08', '\x09', '\x0a', '\x0b', '\x0c',
+ '\x0d', '\x0e', '\x0f', '\x10', '\x11', '\x12', '\x13', '\x14',
+ '\x15', '\x16', '\x17', '\x18', '\x19', '\x1a', '\r', '_',
+ '\x00', ESCAPE
+};
+
+
+
+/*****************************************************************************
+** DRIVER_INIT: driver-specific setup, executed once at MESS startup.
+*****************************************************************************/
+
+DRIVER_INIT_MEMBER(apple1_state,apple1)
+{
+ address_space& space = m_maincpu->space(AS_PROGRAM);
+ /* Set up the handlers for MESS's dynamically-sized RAM. */
+ space.install_readwrite_bank(0x0000, m_ram->size() - 1, "bank1");
+ membank("bank1")->set_base(m_ram->pointer());
+
+ /* Poll the keyboard input ports periodically. These include both
+ ordinary keys and the RESET and CLEAR SCREEN pushbutton
+ switches. We can't handle these switches in a VBLANK_INT or
+ PERIODIC_INT because both switches need to be monitored even
+ while the CPU is suspended during RESET; VBLANK_INT and
+ PERIODIC_INT callbacks aren't run while the CPU is in this
+ state.
+
+ A 120-Hz poll rate seems to be fast enough to ensure no
+ keystrokes are missed. */
+ machine().scheduler().timer_pulse(attotime::from_hz(120), timer_expired_delegate(FUNC(apple1_state::apple1_kbd_poll),this));
+}
+
+
+void apple1_state::machine_reset()
+{
+ /* Reset the display hardware. */
+ apple1_vh_dsp_clr();
+}
+
+
+/*****************************************************************************
+** apple1_verify_header
+*****************************************************************************/
+int apple1_state::apple1_verify_header (UINT8 *data)
+{
+ /* Verify the format for the snapshot */
+ if ((data[0] == 'L') &&
+ (data[1] == 'O') &&
+ (data[2] == 'A') &&
+ (data[3] == 'D') &&
+ (data[4] == ':') &&
+ (data[7] == 'D') &&
+ (data[8] == 'A') &&
+ (data[9] == 'T') &&
+ (data[10]== 'A') &&
+ (data[11]== ':'))
+ {
+ return(IMAGE_VERIFY_PASS);
+ }
+ else
+ {
+ return(IMAGE_VERIFY_FAIL);
+ }
+}
+
+#define SNAP_HEADER_LEN 12
+
+/*****************************************************************************
+** snapshot_load_apple1
+**
+** Format of the binary snapshot image is:
+**
+** [ LOAD:xxyyDATA:zzzzzz...]
+**
+** where xxyy is the binary starting address (in big-endian byte
+** order) to load the binary data zzzzzz to.
+**
+** The image can be of arbitrary length, but it must fit in available
+** memory.
+*****************************************************************************/
+SNAPSHOT_LOAD_MEMBER( apple1_state,apple1)
+{
+ UINT64 filesize, datasize;
+ UINT8 *snapbuf, *snapptr;
+ UINT16 start_addr, end_addr, addr;
+
+ filesize = image.length();
+
+ /* Read the snapshot data into a temporary array */
+ if (filesize < SNAP_HEADER_LEN)
+ return IMAGE_INIT_FAIL;
+ snapbuf = (UINT8*)image.ptr();
+ if (!snapbuf)
+ return IMAGE_INIT_FAIL;
+
+ /* Verify the snapshot header */
+ if (apple1_verify_header(snapbuf) == IMAGE_VERIFY_FAIL)
+ {
+ logerror("apple1 - Snapshot Header is in incorrect format - needs to be LOAD:xxyyDATA:\n");
+ return IMAGE_INIT_FAIL;
+ }
+
+ datasize = filesize - SNAP_HEADER_LEN;
+
+ /* Extract the starting address to load the snapshot to. */
+ start_addr = (snapbuf[5] << 8) | (snapbuf[6]);
+ logerror("apple1 - LoadAddress is 0x%04x\n", start_addr);
+
+ end_addr = start_addr + datasize - 1;
+
+ if ((start_addr < 0xE000 && end_addr > m_ram->size() - 1)
+ || end_addr > 0xEFFF)
+ {
+ logerror("apple1 - Snapshot won't fit in this memory configuration;\n"
+ "needs memory from $%04X to $%04X.\n", start_addr, end_addr);
+ return IMAGE_INIT_FAIL;
+ }
+
+ /* Copy the data into memory space. */
+ for (addr = start_addr, snapptr = snapbuf + SNAP_HEADER_LEN;
+ addr <= end_addr;
+ addr++, snapptr++)
+ m_maincpu->space(AS_PROGRAM).write_byte(addr, *snapptr);
+
+
+ return IMAGE_INIT_PASS;
+}
+
+
+/*****************************************************************************
+** apple1_kbd_poll
+**
+** Keyboard polling handles both ordinary keys and the special RESET
+** and CLEAR SCREEN switches.
+**
+** For ordinary keys, this implements 2-key rollover to reduce the
+** chance of missed keypresses. If we press a key and then press a
+** second key while the first hasn't been completely released, as
+** might happen during rapid typing, only the second key is
+** registered; the first key is ignored.
+**
+** If multiple newly-pressed keys are found, the one closest to the
+** end of the input ports list is counted; the others are ignored.
+*****************************************************************************/
+TIMER_CALLBACK_MEMBER(apple1_state::apple1_kbd_poll)
+{
+ int port, bit;
+ int key_pressed;
+ UINT32 shiftkeys, ctrlkeys;
+ pia6821_device *pia = machine().device<pia6821_device>("pia");
+ static const char *const keynames[] = { "KEY0", "KEY1", "KEY2", "KEY3" };
+
+ /* This holds the values of all the input ports for ordinary keys
+ seen during the last scan. */
+
+ /* First we check the RESET and CLEAR SCREEN pushbutton switches. */
+
+ /* The RESET switch resets the CPU and the 6820 PIA. */
+ if (ioport("KEY5")->read() & 0x0001)
+ {
+ if (!m_reset_flag) {
+ m_reset_flag = 1;
+ /* using PULSE_LINE does not allow us to press and hold key */
+ m_maincpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
+ pia->reset();
+ }
+ }
+ else if (m_reset_flag) {
+ /* RESET released--allow the processor to continue. */
+ m_reset_flag = 0;
+ m_maincpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
+ }
+
+ /* The CLEAR SCREEN switch clears the video hardware. */
+ if (ioport("KEY5")->read() & 0x0002)
+ {
+ if (!m_vh_clrscrn_pressed)
+ {
+ /* Ignore further video writes, and clear the screen. */
+ m_vh_clrscrn_pressed = 1;
+ apple1_vh_dsp_clr();
+ }
+ }
+ else if (m_vh_clrscrn_pressed)
+ {
+ /* CLEAR SCREEN released--pay attention to video writes again. */
+ m_vh_clrscrn_pressed = 0;
+ }
+
+ /* Now we scan all the input ports for ordinary keys, recording
+ new keypresses while ignoring keys that were already pressed in
+ the last scan. */
+
+ m_kbd_data = 0;
+ key_pressed = 0;
+
+ /* The keyboard strobe line should always be low when a scan starts. */
+ pia->ca1_w(0);
+
+ shiftkeys = ioport("KEY4")->read() & 0x0003;
+ ctrlkeys = ioport("KEY4")->read() & 0x000c;
+
+ for (port = 0; port < 4; port++)
+ {
+ UINT32 portval, newkeys;
+
+ portval = ioport(keynames[port])->read();
+ newkeys = portval & ~(m_kbd_last_scan[port]);
+
+ if (newkeys)
+ {
+ key_pressed = 1;
+ for (bit = 0; bit < 16; bit++) {
+ if (newkeys & 1)
+ {
+ m_kbd_data = (ctrlkeys)
+ ? apple1_control_keymap[port*16 + bit]
+ : (shiftkeys)
+ ? apple1_shifted_keymap[port*16 + bit]
+ : apple1_unshifted_keymap[port*16 + bit];
+ }
+ newkeys >>= 1;
+ }
+ }
+ m_kbd_last_scan[port] = portval;
+ }
+
+ if (key_pressed)
+ {
+ /* The keyboard will pulse its strobe line when a key is
+ pressed. A 10-usec pulse is typical. */
+ pia->ca1_w(1);
+ machine().scheduler().timer_set(attotime::from_usec(10), timer_expired_delegate(FUNC(apple1_state::apple1_kbd_strobe_end),this));
+ }
+}
+
+TIMER_CALLBACK_MEMBER(apple1_state::apple1_kbd_strobe_end)
+{
+ pia6821_device *pia = machine().device<pia6821_device>("pia");
+
+ /* End of the keyboard strobe pulse. */
+ pia->ca1_w(0);
+}
+
+
+/*****************************************************************************
+** READ/WRITE HANDLERS
+*****************************************************************************/
+READ8_MEMBER(apple1_state::apple1_pia0_kbdin)
+{
+ /* Bit 7 of the keyboard input is permanently wired high. This is
+ what the ROM Monitor software expects. */
+ return m_kbd_data | 0x80;
+}
+
+WRITE8_MEMBER(apple1_state::apple1_pia0_dspout)
+{
+ /* Send an ASCII character to the video hardware. */
+ apple1_vh_dsp_w(data);
+}
+
+WRITE_LINE_MEMBER(apple1_state::apple1_pia0_dsp_write_signal)
+{
+ device_t *device = machine().device("pia");
+ /* PIA output CB2 is inverted to become the DA signal, used to
+ signal a display write to the video hardware. */
+
+ /* DA is directly connected to PIA input PB7, so the processor can
+ read bit 7 of port B to test whether the display has completed
+ a write. */
+ pia6821_device *pia = downcast<pia6821_device *>(device);
+ pia->portb_w((!state) << 7);
+
+ /* Once DA is asserted, the display will wait until it can perform
+ the write, when the cursor position is about to be refreshed.
+ Only then will it assert \RDA to signal readiness for another
+ write. Thus the write delay depends on the cursor position and
+ where the display is in the refresh cycle. */
+ if (!state)
+ machine().scheduler().timer_set(apple1_vh_dsp_time_to_ready(), timer_expired_delegate(FUNC(apple1_state::apple1_dsp_ready_start),this));
+}
+
+TIMER_CALLBACK_MEMBER(apple1_state::apple1_dsp_ready_start)
+{
+ pia6821_device *pia = machine().device<pia6821_device>("pia");
+
+ /* When the display asserts \RDA to signal it is ready, it
+ triggers a 74123 one-shot to send a 3.5-usec low pulse to PIA
+ input CB1. The end of this pulse will tell the PIA that the
+ display is ready for another write. */
+ pia->cb1_w(0);
+ machine().scheduler().timer_set(attotime::from_nsec(3500), timer_expired_delegate(FUNC(apple1_state::apple1_dsp_ready_end),this));
+}
+
+TIMER_CALLBACK_MEMBER(apple1_state::apple1_dsp_ready_end)
+{
+ pia6821_device *pia = machine().device<pia6821_device>("pia");
+
+ /* The one-shot pulse has ended; return CB1 to high, so we can do
+ another display write. */
+ pia->cb1_w(1);
+}
diff --git a/src/mame/machine/arkanoid.cpp b/src/mame/machine/arkanoid.cpp
index 02bb306a1b6..11b352e63df 100644
--- a/src/mame/machine/arkanoid.cpp
+++ b/src/mame/machine/arkanoid.cpp
@@ -82,14 +82,14 @@ WRITE8_MEMBER(arkanoid_state::arkanoid_68705_tcr_w)
if ((m_tcr^data)&0x20)// check if TIN state changed
{
/* logerror("timer enable state changed!\n"); */
- if (data&0x20) m_68705_timer->adjust(attotime::never, TIMER_68705_PRESCALER_EXPIRED);
- else m_68705_timer->adjust(attotime::from_hz(((XTAL_12MHz/4)/4)/(1<<(data&0x7))), TIMER_68705_PRESCALER_EXPIRED);
+ if (data&0x20) timer_set(attotime::never, TIMER_68705_PRESCALER_EXPIRED);
+ else timer_set(attotime::from_hz(((XTAL_12MHz/4)/4)/(1<<(data&0x7))), TIMER_68705_PRESCALER_EXPIRED);
}
// prescaler check: if timer prescaler has changed, or the PSC bit is set, adjust the timer length for the prescaler expired timer, but only if the timer would be running
if ( (((m_tcr&0x07)!=(data&0x07))||(data&0x08)) && ((data&0x20)==0) )
{
/* logerror("timer reset due to PSC or prescaler change!\n"); */
- m_68705_timer->adjust(attotime::from_hz(((XTAL_12MHz/4)/4)/(1<<(data&0x7))), TIMER_68705_PRESCALER_EXPIRED);
+ timer_set(attotime::from_hz(((XTAL_12MHz/4)/4)/(1<<(data&0x7))), TIMER_68705_PRESCALER_EXPIRED);
}
m_tcr = data;
// if int state is set, and TIM is unmasked, assert an interrupt. otherwise clear it.
@@ -120,7 +120,7 @@ TIMER_CALLBACK_MEMBER(arkanoid_state::timer_68705_increment)
m_mcu->set_input_line(M68705_INT_TIMER, ASSERT_LINE);
else
m_mcu->set_input_line(M68705_INT_TIMER, CLEAR_LINE);
- m_68705_timer->adjust(attotime::from_hz(((XTAL_12MHz/4)/4)/(1<<(m_tcr&0x7))), TIMER_68705_PRESCALER_EXPIRED);
+ timer_set(attotime::from_hz(((XTAL_12MHz/4)/4)/(1<<(m_tcr&0x7))), TIMER_68705_PRESCALER_EXPIRED);
}
READ8_MEMBER(arkanoid_state::arkanoid_68705_port_c_r)
diff --git a/src/mame/machine/atarigen.cpp b/src/mame/machine/atarigen.cpp
index 2d55560cee8..287342585f6 100644
--- a/src/mame/machine/atarigen.cpp
+++ b/src/mame/machine/atarigen.cpp
@@ -10,6 +10,11 @@
#include "emu.h"
#include "cpu/m6502/m6502.h"
+#include "sound/2151intf.h"
+#include "sound/2413intf.h"
+#include "sound/tms5220.h"
+#include "sound/okim6295.h"
+#include "sound/pokey.h"
#include "video/atarimo.h"
#include "atarigen.h"
@@ -960,6 +965,9 @@ atarigen_state::atarigen_state(const machine_config &mconfig, device_type type,
m_slapstic_mirror(0),
m_scanlines_per_callback(0),
m_maincpu(*this, "maincpu"),
+ m_audiocpu(*this, "audiocpu"),
+ m_oki(*this, "oki"),
+ m_soundcomm(*this, "soundcomm"),
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
m_palette(*this, "palette"),
@@ -1004,7 +1012,7 @@ void atarigen_state::machine_reset()
// reset the slapstic
if (m_slapstic_num != 0)
{
- if (!m_slapstic_device.found())
+ if (!m_slapstic_device)
fatalerror("Slapstic device is missing?\n");
m_slapstic_device->slapstic_reset();
@@ -1179,8 +1187,8 @@ void atarigen_state::device_post_load()
{
if (m_slapstic_num != 0)
{
- if (!m_slapstic_device.found())
- fatalerror("Slapstic device is missing?\n");
+ if (!m_slapstic_device)
+ fatalerror("Slapstic device is missing?\n");
slapstic_update_bank(m_slapstic_device->slapstic_bank());
}
@@ -1214,30 +1222,37 @@ DIRECT_UPDATE_MEMBER(atarigen_state::slapstic_setdirect)
// slapstic and sets the chip number.
//-------------------------------------------------
-void atarigen_state::slapstic_configure(cpu_device &device, offs_t base, offs_t mirror)
+void atarigen_state::slapstic_configure(cpu_device &device, offs_t base, offs_t mirror, int chipnum)
{
- if (!m_slapstic_device.found())
- fatalerror("Slapstic device is missing\n");
+ // reset in case we have no state
+ m_slapstic_num = chipnum;
+ m_slapstic = nullptr;
- // initialize the slapstic
- m_slapstic_num = m_slapstic_device->m_chipnum;
- m_slapstic_device->slapstic_init();
+ // if we have a chip, install it
+ if (chipnum != 0)
+ {
+ if (!m_slapstic_device)
+ fatalerror("Slapstic device is missing\n");
- // install the memory handlers
- address_space &program = device.space(AS_PROGRAM);
- m_slapstic = program.install_readwrite_handler(base, base + 0x7fff, 0, mirror, read16_delegate(FUNC(atarigen_state::slapstic_r), this), write16_delegate(FUNC(atarigen_state::slapstic_w), this));
- program.set_direct_update_handler(direct_update_delegate(FUNC(atarigen_state::slapstic_setdirect), this));
+ // initialize the slapstic
+ m_slapstic_device->slapstic_init(machine(), chipnum);
- // allocate memory for a copy of bank 0
- m_slapstic_bank0.resize(0x2000);
- memcpy(&m_slapstic_bank0[0], m_slapstic, 0x2000);
+ // install the memory handlers
+ address_space &program = device.space(AS_PROGRAM);
+ m_slapstic = program.install_readwrite_handler(base, base + 0x7fff, 0, mirror, read16_delegate(FUNC(atarigen_state::slapstic_r), this), write16_delegate(FUNC(atarigen_state::slapstic_w), this));
+ program.set_direct_update_handler(direct_update_delegate(FUNC(atarigen_state::slapstic_setdirect), this));
- // ensure we recopy memory for the bank
- m_slapstic_bank = 0xff;
+ // allocate memory for a copy of bank 0
+ m_slapstic_bank0.resize(0x2000);
+ memcpy(&m_slapstic_bank0[0], m_slapstic, 0x2000);
- // install an opcode base handler if we are a 68000 or variant
- m_slapstic_base = base;
- m_slapstic_mirror = mirror;
+ // ensure we recopy memory for the bank
+ m_slapstic_bank = 0xff;
+
+ // install an opcode base handler if we are a 68000 or variant
+ m_slapstic_base = base;
+ m_slapstic_mirror = mirror;
+ }
}
@@ -1249,7 +1264,7 @@ void atarigen_state::slapstic_configure(cpu_device &device, offs_t base, offs_t
WRITE16_MEMBER(atarigen_state::slapstic_w)
{
- if (!m_slapstic_device.found())
+ if (!m_slapstic_device)
fatalerror("Slapstic device is missing?\n");
slapstic_update_bank(m_slapstic_device->slapstic_tweak(space, offset));
@@ -1263,7 +1278,7 @@ WRITE16_MEMBER(atarigen_state::slapstic_w)
READ16_MEMBER(atarigen_state::slapstic_r)
{
- if (!m_slapstic_device.found())
+ if (!m_slapstic_device)
fatalerror("Slapstic device is missing?\n");
// fetch the result from the current bank first
@@ -1277,6 +1292,57 @@ READ16_MEMBER(atarigen_state::slapstic_r)
/***************************************************************************
+ SOUND HELPERS
+***************************************************************************/
+
+//-------------------------------------------------
+// set_volume_by_type: Scans for a particular
+// sound chip and changes the volume on all
+// channels associated with it.
+//-------------------------------------------------
+
+void atarigen_state::set_volume_by_type(int volume, device_type type)
+{
+ sound_interface_iterator iter(*this);
+ for (device_sound_interface *sound = iter.first(); sound != nullptr; sound = iter.next())
+ if (sound->device().type() == type)
+ sound->set_output_gain(ALL_OUTPUTS, volume / 100.0);
+}
+
+
+//-------------------------------------------------
+// set_XXXXX_volume: Sets the volume for a given
+// type of chip.
+//-------------------------------------------------
+
+void atarigen_state::set_ym2151_volume(int volume)
+{
+ set_volume_by_type(volume, YM2151);
+}
+
+void atarigen_state::set_ym2413_volume(int volume)
+{
+ set_volume_by_type(volume, YM2413);
+}
+
+void atarigen_state::set_pokey_volume(int volume)
+{
+ set_volume_by_type(volume, POKEY);
+}
+
+void atarigen_state::set_tms5220_volume(int volume)
+{
+ set_volume_by_type(volume, TMS5220);
+}
+
+void atarigen_state::set_oki6295_volume(int volume)
+{
+ set_volume_by_type(volume, OKIM6295);
+}
+
+
+
+/***************************************************************************
SCANLINE TIMING
***************************************************************************/
diff --git a/src/mame/machine/atarigen.h b/src/mame/machine/atarigen.h
index 0266d2bd458..0adeb414a0b 100644
--- a/src/mame/machine/atarigen.h
+++ b/src/mame/machine/atarigen.h
@@ -14,6 +14,7 @@
#include "machine/eeprompar.h"
#include "video/atarimo.h"
#include "cpu/m6502/m6502.h"
+#include "sound/okim6295.h"
#include "includes/slapstic.h"
@@ -355,12 +356,20 @@ public:
DECLARE_WRITE16_MEMBER(video_int_ack_w);
// slapstic helpers
- void slapstic_configure(cpu_device &device, offs_t base, offs_t mirror);
+ void slapstic_configure(cpu_device &device, offs_t base, offs_t mirror, int chipnum);
void slapstic_update_bank(int bank);
DECLARE_DIRECT_UPDATE_MEMBER(slapstic_setdirect);
DECLARE_WRITE16_MEMBER(slapstic_w);
DECLARE_READ16_MEMBER(slapstic_r);
+ // sound helpers
+ void set_volume_by_type(int volume, device_type type);
+ void set_ym2151_volume(int volume);
+ void set_ym2413_volume(int volume);
+ void set_pokey_volume(int volume);
+ void set_tms5220_volume(int volume);
+ void set_oki6295_volume(int volume);
+
// scanline timing
void scanline_timer_reset(screen_device &screen, int frequency);
void scanline_timer(emu_timer &timer, screen_device &screen, int scanline);
@@ -403,7 +412,10 @@ public:
atarigen_screen_timer m_screen_timer[2];
required_device<cpu_device> m_maincpu;
+ optional_device<cpu_device> m_audiocpu;
+ optional_device<okim6295_device> m_oki;
+ optional_device<atari_sound_comm_device> m_soundcomm;
optional_device<gfxdecode_device> m_gfxdecode;
optional_device<screen_device> m_screen;
optional_device<palette_device> m_palette;
diff --git a/src/mame/machine/awboard.cpp b/src/mame/machine/awboard.cpp
index 7ec0c5b6c3a..e931fa221eb 100644
--- a/src/mame/machine/awboard.cpp
+++ b/src/mame/machine/awboard.cpp
@@ -97,9 +97,8 @@ ROM board internal layouts:
Type 2:
00000000 - 00800000 FMEM1 flash ROM
- 00800000 - 01000000 mirror of above
- 01000000 - 01800000 FMEM2 flash ROM
- 01800000 - 02000000 mirror of above
+ 00800000 - 01000000 FMEM2 flash ROM
+ 01000000 - 02000000 unk, probably mirror of above
02000000 - 04000000 MROM1 MROM4 MROM7 MROM10 \
04000000 - 06000000 MROM2 MROM5 MROM8 MROM11 banked mask ROMs
06000000 - 08000000 MROM3 MROM6 MROM9 MROM12 /
diff --git a/src/mame/machine/bbc.cpp b/src/mame/machine/bbc.cpp
index 9d25639924b..d82f4fdd827 100644
--- a/src/mame/machine/bbc.cpp
+++ b/src/mame/machine/bbc.cpp
@@ -1426,26 +1426,14 @@ WRITE_LINE_MEMBER(bbc_state::write_acia_clock)
WRITE_LINE_MEMBER(bbc_state::motor_w)
{
- for (int i=0; i != 2; i++) {
- char devname[1];
- sprintf(devname, "%d", i);
- floppy_connector *con = m_i8271->subdevice<floppy_connector>(devname);
- if (con) {
- con->get_device()->mon_w(!state);
- }
- }
+ m_i8271->subdevice<floppy_connector>("0")->get_device()->mon_w(!state);
+ m_i8271->subdevice<floppy_connector>("1")->get_device()->mon_w(!state);
}
WRITE_LINE_MEMBER(bbc_state::side_w)
{
- for (int i=0; i != 2; i++) {
- char devname[1];
- sprintf(devname, "%d", i);
- floppy_connector *con = m_i8271->subdevice<floppy_connector>(devname);
- if (con) {
- con->get_device()->ss_w(state);
- }
- }
+ m_i8271->subdevice<floppy_connector>("0")->get_device()->ss_w(state);
+ m_i8271->subdevice<floppy_connector>("1")->get_device()->ss_w(state);
}
diff --git a/src/mame/machine/beta.cpp b/src/mame/machine/beta.cpp
index 4c1afc59f64..ef9ec771805 100644
--- a/src/mame/machine/beta.cpp
+++ b/src/mame/machine/beta.cpp
@@ -184,13 +184,9 @@ SLOT_INTERFACE_END
static MACHINE_CONFIG_FRAGMENT( beta_disk )
MCFG_KR1818VG93_ADD("wd179x", XTAL_8MHz / 8)
MCFG_FLOPPY_DRIVE_ADD("wd179x:0", beta_disk_floppies, "drive0", beta_disk_device::floppy_formats)
- MCFG_FLOPPY_DRIVE_SOUND(true)
MCFG_FLOPPY_DRIVE_ADD("wd179x:1", beta_disk_floppies, "drive1", beta_disk_device::floppy_formats)
- MCFG_FLOPPY_DRIVE_SOUND(true)
MCFG_FLOPPY_DRIVE_ADD("wd179x:2", beta_disk_floppies, "drive2", beta_disk_device::floppy_formats)
- MCFG_FLOPPY_DRIVE_SOUND(true)
MCFG_FLOPPY_DRIVE_ADD("wd179x:3", beta_disk_floppies, "drive3", beta_disk_device::floppy_formats)
- MCFG_FLOPPY_DRIVE_SOUND(true)
MACHINE_CONFIG_END
ROM_START( beta_disk )
diff --git a/src/mame/machine/electron.cpp b/src/mame/machine/electron.cpp
index a8df99e819f..cbeb410bc23 100644
--- a/src/mame/machine/electron.cpp
+++ b/src/mame/machine/electron.cpp
@@ -145,25 +145,25 @@ READ8_MEMBER(electron_state::electron_read_keyboard)
return data;
}
-READ8_MEMBER(electron_state::electron_fred_r)
+READ8_MEMBER(electron_state::electron_jim_r)
{
return 0xff;
}
-WRITE8_MEMBER(electron_state::electron_fred_w)
+WRITE8_MEMBER(electron_state::electron_jim_w)
{
}
-READ8_MEMBER(electron_state::electron_jim_r)
+READ8_MEMBER(electron_state::electron_1mhz_r)
{
return 0xff;
}
-WRITE8_MEMBER(electron_state::electron_jim_w)
+WRITE8_MEMBER(electron_state::electron_1mhz_w)
{
}
-READ8_MEMBER(electron_state::electron_sheila_r)
+READ8_MEMBER(electron_state::electron_ula_r)
{
UINT8 data = ((UINT8 *)memregion("user1")->base())[0x43E00 + offset];
switch ( offset & 0x0f )
@@ -186,7 +186,7 @@ READ8_MEMBER(electron_state::electron_sheila_r)
static const int electron_palette_offset[4] = { 0, 4, 5, 1 };
static const UINT16 electron_screen_base[8] = { 0x3000, 0x3000, 0x3000, 0x4000, 0x5800, 0x5800, 0x6000, 0x5800 };
-WRITE8_MEMBER(electron_state::electron_sheila_w)
+WRITE8_MEMBER(electron_state::electron_ula_w)
{
int i = electron_palette_offset[(( offset >> 1 ) & 0x03)];
logerror( "ULA: write offset %02x <- %02x\n", offset & 0x0f, data );
diff --git a/src/mame/machine/gaelco2.cpp b/src/mame/machine/gaelco2.cpp
index 0ac284242d7..6d39cdd0962 100644
--- a/src/mame/machine/gaelco2.cpp
+++ b/src/mame/machine/gaelco2.cpp
@@ -287,75 +287,19 @@ WRITE16_MEMBER(gaelco2_state::gaelco2_eeprom_data_w)
***************************************************************************/
-static UINT32 rol(UINT32 x, unsigned int c)
-{
- return (x << c) | (x >> (32 - c));
-}
-
-static UINT16 get_lo(UINT32 x)
-{
- return ((x & 0x00000010) << 1) |
- ((x & 0x00000800) << 3) |
- ((x & 0x40000000) >> 27) |
- ((x & 0x00000005) << 6) |
- ((x & 0x00000008) << 8) |
- rol(x & 0x00800040, 9) |
- ((x & 0x04000000) >> 16) |
- ((x & 0x00008000) >> 14) |
- ((x & 0x00002000) >> 11) |
- ((x & 0x00020000) >> 10) |
- ((x & 0x00100000) >> 8) |
- ((x & 0x00044000) >> 5) |
- ((x & 0x00000020) >> 1);
-}
-
-static UINT16 get_hi(UINT32 x)
-{
- return ((x & 0x00001400) >> 0) |
- ((x & 0x10000000) >> 26) |
- ((x & 0x02000000) >> 24) |
- ((x & 0x08000000) >> 21) |
- ((x & 0x00000002) << 12) |
- ((x & 0x01000000) >> 19) |
- ((x & 0x20000000) >> 18) |
- ((x & 0x80000000) >> 16) |
- ((x & 0x00200000) >> 13) |
- ((x & 0x00010000) >> 12) |
- ((x & 0x00080000) >> 10) |
- ((x & 0x00000200) >> 9) |
- ((x & 0x00400000) >> 8) |
- ((x & 0x00000080) >> 4) |
- ((x & 0x00000100) >> 1);
-}
-
-static UINT16 get_out(UINT16 x)
-{
- return ((x & 0xc840) << 0) |
- ((x & 0x0080) << 2) |
- ((x & 0x0004) << 3) |
- ((x & 0x0008) << 5) |
- ((x & 0x0010) << 8) |
- ((x & 0x0002) << 9) |
- ((x & 0x0001) << 13) |
- ((x & 0x0200) >> 9) |
- ((x & 0x1400) >> 8) |
- ((x & 0x0100) >> 7) |
- ((x & 0x2000) >> 6) |
- ((x & 0x0020) >> 2);
-}
-
-UINT16 mangle(UINT32 x)
-{
- UINT16 a = get_lo(x);
- UINT16 b = get_hi(x);
- return get_out(((a ^ 0x0010) - (b ^ 0x0024)) ^ 0x5496);
-}
-
READ16_MEMBER(gaelco2_state::snowboar_protection_r)
{
- UINT16 ret = mangle(snowboard_latch);
- ret = ((ret & 0xff00) >> 8) | ((ret & 0x00ff) << 8);
- return ret;
+ chd_file * table = machine().rom_load().get_disk_handle(":decrypt");
+ UINT8 temp[1024];
+ table->read_hunk(snowboard_latch>>9, &temp[0]);
+ UINT16 data = (temp[(snowboard_latch & 0x1ff)*2]<<8) | temp[((snowboard_latch & 0x1ff)*2)+1];
+
+ // TODO: replace above lookup (8GB table) with emulation of device
+
+ logerror("%06x: protection read (input %08x output %04x)\n", space.device().safe_pc(), snowboard_latch, data);
+
+
+ return data;
}
diff --git a/src/mame/machine/harddriv.cpp b/src/mame/machine/harddriv.cpp
index a9653cf34ea..9dc14a34438 100644
--- a/src/mame/machine/harddriv.cpp
+++ b/src/mame/machine/harddriv.cpp
@@ -54,11 +54,11 @@ void harddriv_state::device_reset()
{
/* generic reset */
//atarigen_state::machine_reset();
- if (m_slapstic_device.found()) m_slapstic_device->slapstic_reset();
+ m_slapstic_device->slapstic_reset();
/* halt several of the DSPs to start */
- if (m_adsp.found()) m_adsp->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
- if (m_dsp32.found()) m_dsp32->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
+ if (m_adsp != nullptr) m_adsp->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
+ if (m_dsp32 != nullptr) m_dsp32->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
m_last_gsp_shiftreg = 0;
@@ -72,14 +72,14 @@ void harddriv_state::device_reset()
m_adsp_br = 0;
m_adsp_xflag = 0;
- if (m_ds3sdsp.found())
+ if (m_ds3sdsp != nullptr)
{
m_ds3sdsp->load_boot_data(m_ds3sdsp->region()->base(), m_ds3sdsp_pgm_memory);
m_ds3sdsp_timer_en = 0;
m_ds3sdsp_internal_timer->adjust(attotime::never);
}
- if (m_ds3xdsp.found())
+ if (m_ds3xdsp != nullptr)
{
m_ds3xdsp->load_boot_data(m_ds3xdsp->region()->base(), m_ds3xdsp_pgm_memory);
m_ds3xdsp_timer_en = 0;
@@ -173,7 +173,7 @@ READ16_MEMBER( harddriv_state::hd68k_msp_io_r )
UINT16 result;
offset = (offset / 2) ^ 1;
m_hd34010_host_access = TRUE;
- result = m_msp.found() ? m_msp->host_r(space, offset, 0xffff) : 0xffff;
+ result = (m_msp != nullptr) ? m_msp->host_r(space, offset, 0xffff) : 0xffff;
m_hd34010_host_access = FALSE;
return result;
}
@@ -182,7 +182,7 @@ READ16_MEMBER( harddriv_state::hd68k_msp_io_r )
WRITE16_MEMBER( harddriv_state::hd68k_msp_io_w )
{
offset = (offset / 2) ^ 1;
- if (m_msp.found())
+ if (m_msp != nullptr)
{
m_hd34010_host_access = TRUE;
m_msp->host_w(space, offset, data, 0xffff);
@@ -302,7 +302,7 @@ READ16_MEMBER( harddriv_state::hd68k_adc12_r )
READ16_MEMBER( harddriv_state::hd68k_sound_reset_r )
{
- if (m_jsa.found())
+ if (m_jsa != nullptr)
m_jsa->reset();
return ~0;
}
@@ -404,12 +404,12 @@ WRITE16_MEMBER( harddriv_state::hd68k_nwr_w )
break;
case 6: /* /GSPRES */
logerror("Write to /GSPRES(%d)\n", data);
- if (m_gsp.found())
+ if (m_gsp != nullptr)
m_gsp->set_input_line(INPUT_LINE_RESET, data ? CLEAR_LINE : ASSERT_LINE);
break;
case 7: /* /MSPRES */
logerror("Write to /MSPRES(%d)\n", data);
- if (m_msp.found())
+ if (m_msp != nullptr)
m_msp->set_input_line(INPUT_LINE_RESET, data ? CLEAR_LINE : ASSERT_LINE);
break;
}
@@ -859,7 +859,7 @@ WRITE16_MEMBER( harddriv_state::hd68k_ds3_control_w )
{
case 0:
/* SRES - reset sound CPU */
- if (m_ds3sdsp.found())
+ if (m_ds3sdsp)
{
m_ds3sdsp->set_input_line(INPUT_LINE_RESET, val ? CLEAR_LINE : ASSERT_LINE);
m_ds3sdsp->load_boot_data(m_ds3sdsp->region()->base(), m_ds3sdsp_pgm_memory);
@@ -879,7 +879,7 @@ WRITE16_MEMBER( harddriv_state::hd68k_ds3_control_w )
case 1:
/* XRES - reset sound helper CPU */
- if (m_ds3xdsp.found())
+ if (m_ds3xdsp)
{
m_ds3xdsp->set_input_line(INPUT_LINE_RESET, val ? CLEAR_LINE : ASSERT_LINE);
m_ds3xdsp->load_boot_data(m_ds3xdsp->region()->base(), m_ds3xdsp_pgm_memory);
@@ -1510,11 +1510,11 @@ WRITE16_MEMBER( harddriv_state::hd68k_dsk_control_w )
switch (offset & 7)
{
case 0: /* DSPRESTN */
- if (m_dsp32.found()) m_dsp32->set_input_line(INPUT_LINE_RESET, val ? CLEAR_LINE : ASSERT_LINE);
+ if (m_dsp32) m_dsp32->set_input_line(INPUT_LINE_RESET, val ? CLEAR_LINE : ASSERT_LINE);
break;
case 1: /* DSPZN */
- if (m_dsp32.found()) m_dsp32->set_input_line(INPUT_LINE_HALT, val ? CLEAR_LINE : ASSERT_LINE);
+ if (m_dsp32) m_dsp32->set_input_line(INPUT_LINE_HALT, val ? CLEAR_LINE : ASSERT_LINE);
break;
case 2: /* ZW1 */
@@ -1578,7 +1578,7 @@ READ16_MEMBER( harddriv_state::hd68k_dsk_rom_r )
WRITE16_MEMBER( harddriv_state::hd68k_dsk_dsp32_w )
{
m_dsk_pio_access = TRUE;
- if (m_dsp32.found()) m_dsp32->pio_w(offset, data);
+ if (m_dsp32) m_dsp32->pio_w(offset, data);
m_dsk_pio_access = FALSE;
}
@@ -1587,7 +1587,7 @@ READ16_MEMBER( harddriv_state::hd68k_dsk_dsp32_r )
{
UINT16 result;
m_dsk_pio_access = TRUE;
- if (m_dsp32.found()) result = m_dsp32->pio_r(offset);
+ if (m_dsp32) result = m_dsp32->pio_r(offset);
else result = 0x00;
m_dsk_pio_access = FALSE;
diff --git a/src/mame/machine/iteagle_fpga.cpp b/src/mame/machine/iteagle_fpga.cpp
index 40e1a9bb19e..9fa7cef6da8 100644
--- a/src/mame/machine/iteagle_fpga.cpp
+++ b/src/mame/machine/iteagle_fpga.cpp
@@ -4,7 +4,6 @@
#include "coreutil.h"
#define LOG_FPGA (0)
-#define LOG_SERIAL (0)
#define LOG_RTC (0)
#define LOG_RAM (0)
#define LOG_EEPROM (0)
@@ -81,14 +80,14 @@ void iteagle_fpga_device::device_reset()
m_serial_str.clear();
m_serial_idx = 0;
m_serial_data = false;
- memset(m_serial_com0, 0, sizeof(m_serial_com0));
memset(m_serial_com1, 0, sizeof(m_serial_com1));
memset(m_serial_com2, 0, sizeof(m_serial_com2));
memset(m_serial_com3, 0, sizeof(m_serial_com3));
- m_serial_com0[0] = 0x2c;
+ memset(m_serial_com4, 0, sizeof(m_serial_com4));
m_serial_com1[0] = 0x2c;
m_serial_com2[0] = 0x2c;
m_serial_com3[0] = 0x2c;
+ m_serial_com4[0] = 0x2c;
}
void iteagle_fpga_device::update_sequence(UINT32 data)
@@ -131,10 +130,12 @@ void iteagle_fpga_device::update_sequence_eg1(UINT32 data)
val1 = ((m_seq & 0x2)<<6) | ((m_seq & 0x4)<<4) | ((m_seq & 0x8)<<2) | ((m_seq & 0x10)<<0)
| ((m_seq & 0x20)>>2) | ((m_seq & 0x40)>>4) | ((m_seq & 0x80)>>6) | ((m_seq & 0x100)>>8);
m_seq = (m_seq>>8) | ((feed&0xff)<<16);
+ //m_fpga_regs[offset] = (m_fpga_regs[offset]&0xFFFFFF00) | ((val1 + m_seq_rem1)&0xFF);
m_fpga_regs[offset] = (m_fpga_regs[offset]&0xFFFFFF00) | ((val1 + m_seq_rem1 + m_seq_rem2)&0xFF);
} else if (data & 0x2) {
val1 = ((m_seq & 0x2)<<1) | ((m_seq & 0x4)>>1) | ((m_seq & 0x8)>>3);
m_seq_rem1 = ((m_seq & 0x10)) | ((m_seq & 0x20)>>2) | ((m_seq & 0x40)>>4);
+ //m_seq_rem2 = ((m_seq & 0x80)>>1) | ((m_seq & 0x100)>>3) | ((m_seq & 0x200)>>5);
m_seq = (m_seq>>6) | ((feed&0x3f)<<18);
m_fpga_regs[offset] = (m_fpga_regs[offset]&0xFFFFFF00) | ((val1 + m_seq_rem1 + m_seq_rem2)&0xFF);
} else {
@@ -196,16 +197,16 @@ READ32_MEMBER( iteagle_fpga_device::fpga_r )
logerror("%s:fpga_r offset %04X = %08X & %08X\n", machine().describe_context(), offset*4, result, mem_mask);
break;
case 0x0c/4: // 1d = modem byte
- result = (result & 0xFFFF0000) | ((m_serial_com1[m_serial_idx]&0xff)<<8) | (m_serial_com0[m_serial_idx]&0xff);
+ result = (result & 0xFFFF0000) | ((m_serial_com2[m_serial_idx]&0xff)<<8) | (m_serial_com1[m_serial_idx]&0xff);
if (ACCESSING_BITS_0_15) {
m_serial_data = false;
m_serial_idx = 0;
}
- if (0 && LOG_FPGA)
+ if (LOG_FPGA)
logerror("%s:fpga_r offset %04X = %08X & %08X\n", machine().describe_context(), offset*4, result, mem_mask);
break;
case 0x1c/4: // 1d = modem byte
- result = (result & 0xFFFF0000) | ((m_serial_com3[m_serial_idx]&0xff)<<8) | (m_serial_com2[m_serial_idx]&0xff);
+ result = (result & 0xFFFF0000) | ((m_serial_com4[m_serial_idx]&0xff)<<8) | (m_serial_com3[m_serial_idx]&0xff);
if (ACCESSING_BITS_0_15) {
m_serial_data = false;
m_serial_idx = 0;
@@ -232,8 +233,8 @@ WRITE32_MEMBER( iteagle_fpga_device::fpga_w )
if ((m_version & 0xff00) == 0x0200)
update_sequence_eg1(data & 0xff);
else
- // ATMEL Chip access. Returns version id's when bit 7 is set.
- update_sequence(data & 0xff);
+ // ATMEL Chip access. Returns version id's when bit 7 is set.
+ update_sequence(data & 0xff);
if (0 && LOG_FPGA)
logerror("%s:fpga_w offset %04X = %08X & %08X\n", machine().describe_context(), offset*4, data, mem_mask);
}
@@ -241,7 +242,7 @@ WRITE32_MEMBER( iteagle_fpga_device::fpga_w )
if (ACCESSING_BITS_24_31 && (data & 0x01000000)) {
m_cpu->set_input_line(m_irq_num, CLEAR_LINE);
// Not sure what value to use here, needed for lightgun
- m_timer->adjust(attotime::from_hz(59));
+ m_timer->adjust(attotime::from_hz(25));
if (LOG_FPGA)
logerror("%s:fpga_w offset %04X = %08X & %08X Clearing interrupt(%i)\n", machine().describe_context(), offset*4, data, mem_mask, m_irq_num);
} else {
@@ -268,7 +269,7 @@ WRITE32_MEMBER( iteagle_fpga_device::fpga_w )
if (!m_serial_data) {
m_serial_idx = data&0xf;
} else {
- m_serial_com0[m_serial_idx] = data&0xff;
+ m_serial_com1[m_serial_idx] = data&0xff;
m_serial_idx = 0;
}
m_serial_data = !m_serial_data;
@@ -277,31 +278,29 @@ WRITE32_MEMBER( iteagle_fpga_device::fpga_w )
if (!m_serial_data) {
m_serial_idx = (data&0x0f00)>>8;
} else {
- m_serial_com1[m_serial_idx] = (data&0xff00)>>8;
+ m_serial_com2[m_serial_idx] = (data&0xff00)>>8;
}
m_serial_data = !m_serial_data;
}
if (ACCESSING_BITS_16_23) {
if (m_serial_str.size()==0)
- m_serial_str = "com0: ";
+ m_serial_str = "com1: ";
m_serial_str += (data>>16)&0xff;
if (((data>>16)&0xff)==0xd) {
- if (LOG_SERIAL) logerror("%s\n", m_serial_str.c_str());
osd_printf_debug("%s\n", m_serial_str.c_str());
m_serial_str.clear();
}
}
if (ACCESSING_BITS_24_31) {
if (m_serial_str.size()==0)
- m_serial_str = "com1: ";
+ m_serial_str = "com2: ";
m_serial_str += (data>>24)&0xff;
if (1 || ((data>>24)&0xff)==0xd) {
- if (LOG_SERIAL) logerror("%s\n", m_serial_str.c_str());
osd_printf_debug("%s\n", m_serial_str.c_str());
m_serial_str.clear();
}
}
- if (0 && LOG_FPGA)
+ if (LOG_FPGA)
logerror("%s:fpga_w offset %04X = %08X & %08X\n", machine().describe_context(), offset*4, data, mem_mask);
break;
case 0x1c/4:
@@ -309,7 +308,7 @@ WRITE32_MEMBER( iteagle_fpga_device::fpga_w )
if (!m_serial_data) {
m_serial_idx = data&0xf;
} else {
- m_serial_com2[m_serial_idx] = data&0xff;
+ m_serial_com3[m_serial_idx] = data&0xff;
m_serial_idx = 0;
}
m_serial_data = !m_serial_data;
@@ -318,26 +317,24 @@ WRITE32_MEMBER( iteagle_fpga_device::fpga_w )
if (!m_serial_data) {
m_serial_idx = (data&0x0f00)>>8;
} else {
- m_serial_com3[m_serial_idx] = (data&0xff00)>>8;
+ m_serial_com4[m_serial_idx] = (data&0xff00)>>8;
}
m_serial_data = !m_serial_data;
}
if (ACCESSING_BITS_16_23) {
if (m_serial_str.size()==0)
- m_serial_str = "com2: ";
+ m_serial_str = "com3: ";
m_serial_str += (data>>16)&0xff;
if (1 || ((data>>16)&0xff)==0xd) {
- if (LOG_SERIAL) logerror("%s\n", m_serial_str.c_str());
osd_printf_debug("%s\n", m_serial_str.c_str());
m_serial_str.clear();
}
}
if (ACCESSING_BITS_24_31) {
if (m_serial_str.size()==0)
- m_serial_str = "com3: ";
+ m_serial_str = "com4: ";
m_serial_str += (data>>24)&0xff;
if (((data>>24)&0xff)==0xd) {
- if (LOG_SERIAL) logerror("%s\n", m_serial_str.c_str());
osd_printf_debug("%s\n", m_serial_str.c_str());
m_serial_str.clear();
}
@@ -652,7 +649,7 @@ void iteagle_ide_device::device_reset()
{
pci_device::device_reset();
memset(m_ctrl_regs, 0, sizeof(m_ctrl_regs));
- m_ctrl_regs[0x10/4] = 0x00070000; // 0x6=No SIMM, 0x2, 0x1, 0x0 = SIMM . Top 16 bits are compared to 0x3. Bit 0 might be lan chip present.
+ m_ctrl_regs[0x10/4] = 0x00000000; // 0x6=No SIMM, 0x2, 0x1, 0x0 = SIMM . Top 16 bits are compared to 0x3.
memset(m_rtc_regs, 0, sizeof(m_rtc_regs));
m_rtc_regs[0xa] = 0x20; // 32.768 MHz
m_rtc_regs[0xb] = 0x02; // 24-hour format
diff --git a/src/mame/machine/iteagle_fpga.h b/src/mame/machine/iteagle_fpga.h
index fe5f9a76687..5d150e66116 100644
--- a/src/mame/machine/iteagle_fpga.h
+++ b/src/mame/machine/iteagle_fpga.h
@@ -63,10 +63,10 @@ private:
std::string m_serial_str;
UINT8 m_serial_idx;
bool m_serial_data;
- UINT8 m_serial_com0[0x10];
UINT8 m_serial_com1[0x10];
UINT8 m_serial_com2[0x10];
UINT8 m_serial_com3[0x10];
+ UINT8 m_serial_com4[0x10];
UINT32 m_version;
UINT32 m_seq_init;
diff --git a/src/mame/machine/n64.cpp b/src/mame/machine/n64.cpp
index 5f0d8a6b4d2..a3e256a080c 100644
--- a/src/mame/machine/n64.cpp
+++ b/src/mame/machine/n64.cpp
@@ -2089,7 +2089,7 @@ void n64_periphs::si_dma_tick()
void n64_periphs::pif_dma(int direction)
{
- if (!DWORD_ALIGNED(si_dram_addr))
+ if (si_dram_addr & 0x3)
{
fatalerror("pif_dma: si_dram_addr unaligned: %08X\n", si_dram_addr);
}
diff --git a/src/mame/machine/pc9801_cd.cpp b/src/mame/machine/pc9801_cd.cpp
deleted file mode 100644
index 2a4dffdc98e..00000000000
--- a/src/mame/machine/pc9801_cd.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:smf
-#include "pc9801_cd.h"
-
-// device type definition
-const device_type PC9801_CD = &device_creator<pc9801_cd_device>;
-
-pc9801_cd_device::pc9801_cd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
- atapi_cdrom_device(mconfig, PC9801_CD, "PC9801 CD-ROM Drive", tag, owner, clock, "pc9801_cd", __FILE__)
-{
-}
-
-void pc9801_cd_device::fill_buffer()
-{
- atapi_hle_device::fill_buffer();
- m_status |= IDE_STATUS_DRDY | IDE_STATUS_SERV;
-}
-
-void pc9801_cd_device::process_buffer()
-{
- atapi_hle_device::process_buffer();
- m_status |= IDE_STATUS_DRDY | IDE_STATUS_SERV;
-}
-
-void pc9801_cd_device::process_command()
-{
- atapi_hle_device::process_command();
- switch(m_command)
- {
- case IDE_COMMAND_CHECK_POWER_MODE:
- m_status = IDE_STATUS_DRDY | IDE_STATUS_SERV;
- break;
- }
-}
diff --git a/src/mame/machine/pc9801_cd.h b/src/mame/machine/pc9801_cd.h
deleted file mode 100644
index 35a2d223bd8..00000000000
--- a/src/mame/machine/pc9801_cd.h
+++ /dev/null
@@ -1,23 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:smf
-
-#ifndef __PC9801_CD_H__
-#define __PC9801_CD_H__
-
-#include "machine/atapicdr.h"
-
-class pc9801_cd_device : public atapi_cdrom_device
-{
-public:
- pc9801_cd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
-protected:
- virtual void fill_buffer() override;
- virtual void process_command() override;
- virtual void process_buffer() override;
-};
-
-// device type definition
-extern const device_type PC9801_CD;
-
-#endif
diff --git a/src/mame/machine/pc9801_kbd.cpp b/src/mame/machine/pc9801_kbd.cpp
index 3e4cd4373f8..260bd9f6b3d 100644
--- a/src/mame/machine/pc9801_kbd.cpp
+++ b/src/mame/machine/pc9801_kbd.cpp
@@ -257,7 +257,6 @@ void pc9801_kbd_device::device_reset()
m_keyb_tx = 0xff;
m_keyb_rx = 0;
- m_key_avail = false;
}
//-------------------------------------------------
@@ -277,7 +276,6 @@ void pc9801_kbd_device::device_timer(emu_timer &timer, device_timer_id id, int p
{
m_keyb_tx = i | 0x80;
m_write_irq(ASSERT_LINE);
- m_key_avail = true;
m_rx_buf[i] = 0;
return;
}
@@ -290,7 +288,6 @@ void pc9801_kbd_device::device_timer(emu_timer &timer, device_timer_id id, int p
{
m_keyb_tx = i;
m_write_irq(ASSERT_LINE);
- m_key_avail = true;
m_rx_buf[i] = 0;
return;
}
@@ -306,11 +303,8 @@ READ8_MEMBER( pc9801_kbd_device::rx_r )
{
m_write_irq(CLEAR_LINE);
if(!offset)
- {
- m_key_avail = false;
return m_keyb_tx;
- }
- return 1 | 4 | (m_key_avail ? 2 : 0);
+ return 1 | 4 | 2;
}
WRITE8_MEMBER( pc9801_kbd_device::tx_w )
diff --git a/src/mame/machine/pc9801_kbd.h b/src/mame/machine/pc9801_kbd.h
index e776e2b238e..c33d554ab3e 100644
--- a/src/mame/machine/pc9801_kbd.h
+++ b/src/mame/machine/pc9801_kbd.h
@@ -55,7 +55,6 @@ protected:
UINT8 m_rx_buf[0x80];
UINT8 m_keyb_tx;
UINT8 m_keyb_rx;
- bool m_key_avail;
};
diff --git a/src/mame/machine/slapstic.cpp b/src/mame/machine/slapstic.cpp
index 2d1e83aae67..4ff2fe4a2e3 100644
--- a/src/mame/machine/slapstic.cpp
+++ b/src/mame/machine/slapstic.cpp
@@ -182,7 +182,6 @@
#include "includes/slapstic.h"
-#include "validity.h"
extern const device_type SLAPSTIC = &device_creator<atari_slapstic_device>;
@@ -737,12 +736,6 @@ static const struct slapstic_data *const slapstic_table[] =
};
-void atari_slapstic_device::device_validity_check(validity_checker &valid) const
-{
- // only a small number of chips are known to exist
- if (m_chipnum < 101 || m_chipnum > 118 || !slapstic_table[m_chipnum - 101])
- osd_printf_error("Unknown slapstic number: %d\n", m_chipnum);
-}
/*************************************
@@ -751,17 +744,23 @@ void atari_slapstic_device::device_validity_check(validity_checker &valid) const
*
*************************************/
-void atari_slapstic_device::slapstic_init()
+void atari_slapstic_device::slapstic_init(running_machine &machine, int chip)
{
if (access_68k == -1)
{
/* see if we're 68k or 6502/6809 based */
- device_type cputype = machine().device(":maincpu")->type();
+ device_type cputype = machine.device(":maincpu")->type();
access_68k = (cputype == M68000 || cputype == M68010);
}
+ /* only a small number of chips are known to exist */
+ if (chip < 101 || chip > 118)
+ return;
+
/* set up the parameters */
- slapstic = *slapstic_table[m_chipnum - 101];
+ if (!slapstic_table[chip - 101])
+ return;
+ slapstic = *slapstic_table[chip - 101];
/* reset the chip */
slapstic_reset();
diff --git a/src/mame/machine/xbox.cpp b/src/mame/machine/xbox.cpp
index 69e07a8c374..d341d9804d5 100644
--- a/src/mame/machine/xbox.cpp
+++ b/src/mame/machine/xbox.cpp
@@ -633,8 +633,7 @@ TIMER_CALLBACK_MEMBER(xbox_base_state::usb_ohci_timer)
int changed = 0;
int list = 1;
bool cont = false;
- bool retire = false;
- int pid, remain, mps, done;
+ int pid, remain, mps;
hcca = ohcist.hc_regs[HcHCCA];
if (ohcist.state == UsbOperational) {
@@ -710,20 +709,21 @@ TIMER_CALLBACK_MEMBER(xbox_base_state::usb_ohci_timer)
if ((ohcist.transfer_descriptor.be ^ ohcist.transfer_descriptor.cbp) & 0xfffff000)
a |= 0x1000;
remain = a - b + 1;
- mps = ohcist.endpoint_descriptor.mps;
- if ((pid == InPid) || (pid == OutPid)) {
+ if (pid == InPid) {
+ mps = ohcist.endpoint_descriptor.mps;
if (remain < mps)
mps = remain;
}
- if (ohcist.transfer_descriptor.cbp == 0) {
- remain = 0;
- mps = 0;
+ else {
+ mps = ohcist.endpoint_descriptor.mps;
}
+ if (ohcist.transfer_descriptor.cbp == 0)
+ mps = 0;
b = ohcist.transfer_descriptor.cbp;
// if sending ...
if (pid != InPid) {
// ... get mps bytes
- for (int c = 0; c < remain; c++) {
+ for (int c = 0; c < mps; c++) {
ohcist.buffer[c] = ohcist.space->read_byte(b);
b++;
if ((b & 0xfff) == 0)
@@ -732,11 +732,11 @@ TIMER_CALLBACK_MEMBER(xbox_base_state::usb_ohci_timer)
}
// should check for time available
// execute transaction
- done=ohcist.ports[1].function->execute_transfer(ohcist.endpoint_descriptor.fa, ohcist.endpoint_descriptor.en, pid, ohcist.buffer, mps);
+ mps=ohcist.ports[1].function->execute_transfer(ohcist.endpoint_descriptor.fa, ohcist.endpoint_descriptor.en, pid, ohcist.buffer, mps);
// if receiving ...
if (pid == InPid) {
- // ... store done bytes
- for (int c = 0; c < done; c++) {
+ // ... store mps bytes
+ for (int c = 0; c < mps; c++) {
ohcist.space->write_byte(b,ohcist.buffer[c]);
b++;
if ((b & 0xfff) == 0)
@@ -746,20 +746,9 @@ TIMER_CALLBACK_MEMBER(xbox_base_state::usb_ohci_timer)
// status writeback (CompletionCode field, DataToggleControl field, CurrentBufferPointer field, ErrorCount field)
ohcist.transfer_descriptor.cc = NoError;
ohcist.transfer_descriptor.t = (ohcist.transfer_descriptor.t ^ 1) | 2;
- // if all data is transferred (or there was no data to transfer) cbp must be 0 ?
- if ((done == remain) || (pid == SetupPid))
- b = 0;
ohcist.transfer_descriptor.cbp = b;
ohcist.transfer_descriptor.ec = 0;
- retire = false;
- if ((done == mps) && (done == remain)) {
- retire = true;
- }
- if ((done != mps) && (done <= remain))
- retire = true;
- if (done == 0)
- retire = true;
- if (retire == true) {
+ if ((remain == mps) || (mps == 0)) {
// retire transfer descriptor
a = ohcist.endpoint_descriptor.headp;
ohcist.endpoint_descriptor.headp = ohcist.transfer_descriptor.nexttd;
@@ -833,55 +822,16 @@ void xbox_base_state::usb_ohci_plug(int port, ohci_function_device *function)
}
}
-static USBStandardDeviceDescriptor devdesc = {18,1,0x110,0x00,0x00,0x00,64,0x45e,0x202,0x100,0,0,0,1};
-static USBStandardConfigurationDescriptor condesc = {9,2,0x20,1,1,0,0x80,50};
-static USBStandardInterfaceDescriptor intdesc = {9,4,0,0,2,0x58,0x42,0,0};
-static USBStandardEndpointDescriptor enddesc82 = {7,5,0x82,3,0x20,4};
-static USBStandardEndpointDescriptor enddesc02 = {7,5,0x02,3,0x20,4};
+static USBStandardDeviceDscriptor devdesc = {18,1,0x201,0xff,0x34,0x56,64,0x100,0x101,0x301,0,0,0,1};
-ohci_function_device::ohci_function_device(running_machine &machine)
+ohci_function_device::ohci_function_device()
{
- state = DefaultState;
- descriptors = auto_alloc_array(machine, UINT8, 1024);
- descriptors_pos = 0;
address = 0;
newaddress = 0;
controldirection = 0;
- controltype = 0;
- controlrecipient = 0;
- configurationvalue = 0;
remain = 0;
position = nullptr;
settingaddress = false;
- add_device_descriptor(devdesc);
- add_configuration_descriptor(condesc);
- add_interface_descriptor(intdesc);
- add_endpoint_descriptor(enddesc82);
- add_endpoint_descriptor(enddesc02);
-}
-
-void ohci_function_device::add_device_descriptor(USBStandardDeviceDescriptor &descriptor)
-{
- memcpy(descriptors + descriptors_pos, &descriptor, sizeof(descriptor));
- descriptors_pos += descriptor.bLength;
-}
-
-void ohci_function_device::add_configuration_descriptor(USBStandardConfigurationDescriptor &descriptor)
-{
- memcpy(descriptors + descriptors_pos, &descriptor, sizeof(descriptor));
- descriptors_pos += descriptor.bLength;
-}
-
-void ohci_function_device::add_interface_descriptor(USBStandardInterfaceDescriptor &descriptor)
-{
- memcpy(descriptors + descriptors_pos, &descriptor, sizeof(descriptor));
- descriptors_pos += descriptor.bLength;
-}
-
-void ohci_function_device::add_endpoint_descriptor(USBStandardEndpointDescriptor &descriptor)
-{
- memcpy(descriptors + descriptors_pos, &descriptor, sizeof(descriptor));
- descriptors_pos += descriptor.bLength;
}
void ohci_function_device::execute_reset()
@@ -892,11 +842,9 @@ void ohci_function_device::execute_reset()
int ohci_function_device::execute_transfer(int address, int endpoint, int pid, UINT8 *buffer, int size)
{
- int descriptortype;// descriptorindex;
-
if (endpoint == 0) {
if (pid == SetupPid) {
- USBSetupPacket *p=(struct USBSetupPacket *)buffer;
+ struct USBSetupPacket *p=(struct USBSetupPacket *)buffer;
// define direction 0:host->device 1:device->host
controldirection = (p->bmRequestType & 128) >> 7;
// case ==1, IN data stage and OUT status stage
@@ -905,10 +853,9 @@ int ohci_function_device::execute_transfer(int address, int endpoint, int pid, U
controltype = (p->bmRequestType & 0x60) >> 5;
controlrecipient = p->bmRequestType & 0x1f;
position = nullptr;
- // number of byte to transfer in data stage (0 no data stage)
remain = p->wLength;
- // if standard device request
- if ((controltype == StandardType) && (controlrecipient == DeviceRecipient)) {
+ // if standard
+ if (controltype == 0) {
switch (p->bRequest) {
case GET_STATUS:
case CLEAR_FEATURE:
@@ -919,39 +866,20 @@ int ohci_function_device::execute_transfer(int address, int endpoint, int pid, U
settingaddress = true;
break;
case GET_DESCRIPTOR:
- descriptortype = p->wValue >> 8;
- //descriptorindex = p->wValue & 255;
- if (descriptortype == DEVICE) { // device descriptor
- position = descriptors;
- remain = descriptors[0];
- }
- else if (descriptortype == CONFIGURATION) { // configuration descriptor
- position = descriptors + 18;
- remain = descriptors[18+2];
- }
- else if (descriptortype == INTERFACE) { // interface descriptor
- position = descriptors + 18 + 9;
- remain = descriptors[18 + 9];
+ if ((p->wValue >> 8) == DEVICE) { // device descriptor
+ //p->wValue & 255;
+ position = (UINT8 *)&devdesc;
+ remain = sizeof(devdesc);
}
- else if (descriptortype == ENDPOINT) { // endpoint descriptor
- position = descriptors + 18 + 9 + 9;
- remain = descriptors[18 + 9 + 9];
- }
- else
+ else if ((p->wValue >> 8) == CONFIGURATION) { // configuration descriptor
remain = 0;
+ }
if (remain > p->wLength)
remain = p->wLength;
break;
- case SET_CONFIGURATION:
- if (p->wValue == 0)
- state = AddressState;
- else {
- configurationvalue = p->wValue;
- state = ConfiguredState;
- }
- break;
case SET_DESCRIPTOR:
case GET_CONFIGURATION:
+ case SET_CONFIGURATION:
case GET_INTERFACE:
case SET_INTERFACE:
case SYNCH_FRAME:
@@ -959,21 +887,17 @@ int ohci_function_device::execute_transfer(int address, int endpoint, int pid, U
break;
}
}
- else
- return handle_nonstandard_request(p);
- size = 0;
}
else if (pid == InPid) {
// if no data has been transferred (except for the setup stage)
// and the lenght of this IN transaction is 0
// assume this is the status stage
- if ((size == 0) && (remain == 0)) {
+ if (size == 0) {
if (settingaddress == true)
{
// set of address is active at end of status stage
address = newaddress;
settingaddress = false;
- state = AddressState;
}
return 0;
}
@@ -1005,27 +929,9 @@ int ohci_function_device::execute_transfer(int address, int endpoint, int pid, U
}
}
}
- else
- return -1;
return size;
}
-int ohci_function_device::handle_nonstandard_request(USBSetupPacket *setup)
-{
- if ((controltype == VendorType) && (controlrecipient == InterfaceRecipient))
- {
- if (setup->bRequest == GET_DESCRIPTOR)
- {
- if (setup->wValue == 0x4200)
- {
- position = nullptr;
- remain = 0;
- }
- }
- }
- return 0;
-}
-
void xbox_base_state::usb_ohci_interrupts()
{
if (((ohcist.hc_regs[HcInterruptStatus] & ohcist.hc_regs[HcInterruptEnable]) != 0) && ((ohcist.hc_regs[HcInterruptEnable] & MasterInterruptEnable) != 0))
@@ -1425,7 +1331,11 @@ READ8_MEMBER(xbox_base_state::get_slave_ack)
IRQ_CALLBACK_MEMBER(xbox_base_state::irq_callback)
{
int r = 0;
- r = xbox_base_devs.pic8259_1->acknowledge();
+ r = xbox_base_devs.pic8259_2->acknowledge();
+ if (r == 0)
+ {
+ r = xbox_base_devs.pic8259_1->acknowledge();
+ }
if (debug_irq_active)
debug_generate_irq(debug_irq_number, false);
return r;
@@ -1678,10 +1588,6 @@ ADDRESS_MAP_END
void xbox_base_state::machine_start()
{
-#ifdef USB_ENABLED
- ohci_function_device *usb_device;
-#endif
-
nvidia_nv2a = std::make_unique<nv2a_renderer>(machine());
memset(pic16lc_buffer, 0, sizeof(pic16lc_buffer));
pic16lc_buffer[0] = 'B';
@@ -1720,8 +1626,7 @@ void xbox_base_state::machine_start()
ohcist.space = &m_maincpu->space();
ohcist.timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(xbox_base_state::usb_ohci_timer), this), (void *)"USB OHCI Timer");
ohcist.timer->enable(false);
- usb_device = new ohci_function_device(machine());
- usb_ohci_plug(1, usb_device); // test connect
+ usb_ohci_plug(1, new ohci_function_device()); // test connect
#endif
memset(&superiost, 0, sizeof(superiost));
superiost.configuration_mode = false;
diff --git a/src/mame/mame.cpp b/src/mame/mame.cpp
index 9dc8d96c382..1acc02060ab 100644
--- a/src/mame/mame.cpp
+++ b/src/mame/mame.cpp
@@ -13,11 +13,32 @@
#define APPNAME "MAME"
#define APPNAME_LOWER "mame"
#define CONFIGNAME "mame"
+#define CAPGAMENOUN "MACHINE"
+#define CAPSTARTGAMENOUN "Machine"
+#define GAMENOUN "machine"
+#define GAMESNOUN "machines"
#define COPYRIGHT "Copyright Nicola Salmoria\nand the MAME team\nhttp://mamedev.org"
#define COPYRIGHT_INFO "Copyright Nicola Salmoria and the MAME team"
+#define DISCLAIMER "This software reproduces, more or less faithfully, the behaviour of a wide range\n" \
+ "of machines. But hardware is useless without software, so images of the ROMs and\n" \
+ "other media which run on that hardware are also required.\n"
+#define USAGE "Usage: %s [%s] [media] [software] [options]"
+#define XML_ROOT "mame"
+#define XML_TOP "machine"
+#define STATE_MAGIC_NUM "MAMESAVE"
const char * emulator_info::get_appname() { return APPNAME;}
const char * emulator_info::get_appname_lower() { return APPNAME_LOWER;}
const char * emulator_info::get_configname() { return CONFIGNAME;}
+const char * emulator_info::get_capgamenoun() { return CAPGAMENOUN;}
+const char * emulator_info::get_capstartgamenoun() { return CAPSTARTGAMENOUN;}
+const char * emulator_info::get_gamenoun() { return GAMENOUN;}
+const char * emulator_info::get_gamesnoun() { return GAMESNOUN;}
const char * emulator_info::get_copyright() { return COPYRIGHT;}
const char * emulator_info::get_copyright_info() { return COPYRIGHT_INFO;}
+const char * emulator_info::get_disclaimer() { return DISCLAIMER;}
+const char * emulator_info::get_usage() { return USAGE;}
+const char * emulator_info::get_xml_root() { return XML_ROOT;}
+const char * emulator_info::get_xml_top() { return XML_TOP;}
+const char * emulator_info::get_state_magic_num() { return STATE_MAGIC_NUM;}
+void emulator_info::printf_usage(const char *par1, const char *par2) { osd_printf_info(USAGE, par1, par2); }
diff --git a/src/mame/mame.lst b/src/mame/mame.lst
index edf48cd75d1..b4737de8fa8 100644
--- a/src/mame/mame.lst
+++ b/src/mame/mame.lst
@@ -2,7 +2,7 @@
// copyright-holders:Aaron Giles
/******************************************************************************
- mame.lst
+ ume.lst
List of all enabled drivers in the system. This file is parsed by
makelist.exe, sorted, and output as C code describing the drivers.
diff --git a/src/mame/mess.cpp b/src/mame/mess.cpp
index 209ff7651d6..985aeaa19e7 100644
--- a/src/mame/mess.cpp
+++ b/src/mame/mess.cpp
@@ -13,9 +13,32 @@
#define APPNAME "MESS"
#define APPNAME_LOWER "mess"
#define CONFIGNAME "mess"
+#define CAPGAMENOUN "MACHINE"
+#define CAPSTARTGAMENOUN "Machine"
+#define GAMENOUN "machine"
+#define GAMESNOUN "machines"
#define COPYRIGHT "Copyright Nicola Salmoria\nand the MAME team\nhttp://mamedev.org"
#define COPYRIGHT_INFO "Copyright Nicola Salmoria and the MAME team"
+#define DISCLAIMER "This software reproduces, more or less faithfully, the behaviour of a wide range\n" \
+ "of machines. But hardware is useless without software, so images of the ROMs and\n" \
+ "other media which run on that hardware are also required.\n"
+#define USAGE "Usage: %s [%s] [media] [software] [options]"
+#define XML_ROOT "mame"
+#define XML_TOP "machine"
+#define STATE_MAGIC_NUM "MAMESAVE"
const char * emulator_info::get_appname() { return APPNAME;}
const char * emulator_info::get_appname_lower() { return APPNAME_LOWER;}
const char * emulator_info::get_configname() { return CONFIGNAME;}
+const char * emulator_info::get_capgamenoun() { return CAPGAMENOUN;}
+const char * emulator_info::get_capstartgamenoun() { return CAPSTARTGAMENOUN;}
+const char * emulator_info::get_gamenoun() { return GAMENOUN;}
+const char * emulator_info::get_gamesnoun() { return GAMESNOUN;}
+const char * emulator_info::get_copyright() { return COPYRIGHT;}
+const char * emulator_info::get_copyright_info() { return COPYRIGHT_INFO;}
+const char * emulator_info::get_disclaimer() { return DISCLAIMER;}
+const char * emulator_info::get_usage() { return USAGE;}
+const char * emulator_info::get_xml_root() { return XML_ROOT;}
+const char * emulator_info::get_xml_top() { return XML_TOP;}
+const char * emulator_info::get_state_magic_num() { return STATE_MAGIC_NUM;}
+void emulator_info::printf_usage(const char *par1, const char *par2) { osd_printf_info(USAGE, par1, par2); }
diff --git a/src/mame/mess.lst b/src/mame/mess.lst
index 850a407603f..a8ae22b6af3 100644
--- a/src/mame/mess.lst
+++ b/src/mame/mess.lst
@@ -1153,7 +1153,6 @@ jupace // Jupiter Ace
// Sord
m5
m5p
-m5p_brno
// APF Electronics Inc.
apfm1000
@@ -2143,35 +2142,18 @@ diablo68 // 1991 Novag Diablo 68000 Chess Computer
// Fidelity
cc10
-cc7
-vcc // VCC: Voice Chess Challenger (English)
-vccg // * Spanish
-vccfr // * German
-vccsp // * French
-uvc // UVC: Advanced Voice Chess Challenger (English)
-uvcsp // * Spanish
-uvcg // * German
-uvcfr // * French
-vsc // VSC: Voice Sensory Chess Challenger (English)
-vscsp // * Spanish
-vscg // * German
-vscfr // * French
-vbrc
+vcc
+vccg
+vccfr
+vccsp
+uvc
bridgec3
-
-csc // CSC: Champion Sensory Chess Challenger (English)
-cscsp // * Spanish
-cscg // * German
-cscfr // * French
+vbrc
+vsc
+csc
fscc12
-fexcel
fexcelv
-feagv2
-feagv7
-feagv10
-feagv11
-
// Hegener & Glaser Munich
//mephisto // Mephisto 1 - roms needed - not in driver
mm2 // Mephisto 2
@@ -2202,6 +2184,7 @@ van16 // 1991 Mephisto Vancouver 68000
van32 // 1991 Mephisto Vancouver 68020
gen32 // 1993 Mephisto Genius030 V4.00
gen32_41 // 1993 Mephisto Genius030 V4.01
+gen32_oc // 1993 Mephisto Genius030 V4.01OC
berlinp // 1994 Mephisto Berlin Pro 68020
bpl32 // 1996 Mephisto Berlin Pro London Upgrade V5.00
lond020 // 1996 Mephisto London 68020 32 Bit
@@ -2267,6 +2250,7 @@ gckong // Gakken
gdigdug // Gakken
mwcbaseb // Mattel
pbqbert // Parker Brothers
+mvbfree // Mego
kingman // Tomy
tmtron // Tomy
vinvader // VTech
@@ -2286,12 +2270,9 @@ gnwmndon // Nintendo
// hh_tms1k
mathmagi // APF
amaztron // Coleco
-zodiac // Coleco
-cqback // Coleco
h2hbaseb // Coleco
h2hfootb // Coleco
tc4 // Coleco
-cnfball2 // Conic
ebball // Entex
ebball2 // Entex
ebball3 // Entex
@@ -2317,7 +2298,6 @@ stopthiep // Parker Bros (patent)
bankshot // Parker Bros
splitsec // Parker Bros
mmerlin // Parker Bros
-lostreas // Parker Bros
tandy12 // Tandy Radio Shack
tbreakup // Tomy
phpball // Tomy
@@ -2341,10 +2321,6 @@ lilprof
lilprof78
dataman
-// hh_tms1k tispellb.cpp
-spellb
-mrchalgr
-
// hh_tms1k tispeak.cpp
snspell
snspellp
@@ -2359,7 +2335,6 @@ snspellc
snspellca
snspellcuk
snmath
-snmatha
snmathp
snread
lantutor
@@ -2368,7 +2343,10 @@ tntelluk
tntellfr
tntellp
vocaid
-k28m2 // Tiger Electronics
+
+// hh_tms1k tispellb.cpp
+spellb
+mrchalgr
// hh_ucom4
ufombs // Bambino
@@ -2383,8 +2361,6 @@ efball // Epoch
galaxy2 // Epoch
astrocmd // Epoch
edracula // Epoch
-mcompgin // Mattel
-mvbfree // Mego
tccombat // Tomy
tmpacman // Tomy
tmtennis // Tomy
@@ -2403,7 +2379,6 @@ microvsn // Milton Bradley
monty // Ritam
mmonty // Ritam
wildfire // Parker Bros
-k28 // Tiger Electronics
//********** Misc **********************************************************
@@ -2452,7 +2427,6 @@ hec2mdhrx
hec2mx80
hec2mx40
hector1
-os214
victor
poly880
sc1
@@ -2466,7 +2440,6 @@ vcs80
v1050
x820
x820ii
-notetakr
x168
xor100
iq151
@@ -2845,7 +2818,6 @@ hp_ipc
lggp40
mt735
squale
-goupilg1
micral
rd100
proteus3
diff --git a/src/mame/video/apollo.cpp b/src/mame/video/apollo.cpp
index 9735f0e334a..7d6cc7099ef 100644
--- a/src/mame/video/apollo.cpp
+++ b/src/mame/video/apollo.cpp
@@ -1711,7 +1711,7 @@ MACHINE_CONFIG_FRAGMENT( apollo_graphics )
MCFG_SCREEN_ADD(VIDEO_SCREEN_TAG, RASTER)
MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK)
MCFG_SCREEN_REFRESH_RATE(76)
- MCFG_SCREEN_RAW_PARAMS(68000000, 1343, 0, 1024, 841, 0, 800)
+ MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(657))
MCFG_SCREEN_SIZE(1024, 800)
MCFG_SCREEN_VISIBLE_AREA(0, 1023, 0, 799)
MCFG_SCREEN_UPDATE_DEVICE(APOLLO_SCREEN_TAG, apollo_graphics_15i, screen_update)
@@ -1895,7 +1895,7 @@ MACHINE_CONFIG_FRAGMENT( apollo_mono19i )
MCFG_SCREEN_ADD(VIDEO_SCREEN_TAG, RASTER)
MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK)
MCFG_SCREEN_REFRESH_RATE(64)
- MCFG_SCREEN_RAW_PARAMS(120000000, 1728, 0, 1280, 1066, 0, 1024)
+ MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(616))
MCFG_SCREEN_SIZE(1280, 1024)
MCFG_SCREEN_VISIBLE_AREA(0, 1279, 0, 1023)
MCFG_SCREEN_UPDATE_DEVICE(APOLLO_SCREEN_TAG, apollo_graphics_19i, screen_update)
diff --git a/src/mame/video/apple1.cpp b/src/mame/video/apple1.cpp
new file mode 100644
index 00000000000..2dc880127b5
--- /dev/null
+++ b/src/mame/video/apple1.cpp
@@ -0,0 +1,392 @@
+// license:???
+// copyright-holders:Paul Daniels, Colin Howell, R. Belmont
+/***************************************************************************
+
+ apple1.c
+
+ Functions to emulate the video hardware of the Apple I.
+
+ The Apple I video hardware was basically a dumb video terminal; in
+ fact it was based on Steve Wozniak's own design for a simple video
+ terminal. It had 40 columns by 24 lines of uppercase-only text.
+ Text could only be output at 60 characters per second, one character
+ per video frame. The cursor (a blinking @) could only be advanced
+ using spaces or carriage returns. Carriage returns were the only
+ control characters recognized. Previously written text could not be
+ altered, only scrolled off the top of the screen.
+
+ The video memory used seven 1k-bit dynamic shift registers. Six of
+ these held the 6-bit visible character codes, and one stored the
+ cursor location as a simple bitmap--the bit for the cursor position
+ was set to 0, and all the other bits were 1.
+
+ These shift registers were continuously recirculated, completing one
+ cycle per video frame. As a new line of characters was about to be
+ scanned by the video beam, that character line would be recirculated
+ into the shift registers and would simultaneously be stored into a
+ 6x40-bit line buffer (also a shift register). At this point, if the
+ cursor location was in this line, a new character could be written
+ into that location in the shift registers and the cursor could be
+ advanced. (Carriage returns were not written into the shift
+ registers; they only advanced the cursor.)
+
+ The characters in the line buffer were recirculated 7 times to
+ display the 8 scan lines of the characters, before being replaced by
+ a new line of characters from the main shift registers.
+
+ Cursor blinking was performed by a Signetics 555 timer IC whose
+ output was gated into the character code signals as they passed into
+ the line buffer.
+
+ Character images were provided by a Signetics 2513 character
+ generator ROM, a chip also used in computer terminals such as the
+ ADM-3A. This ROM had 9 address lines and 5 data lines; it contained
+ 64 character images, each 5 pixels wide by 8 pixels high, with one
+ line of pixels being blank for vertical separation. The video
+ circuitry added the 2 pixels of horizontal separation for each
+ character.
+
+ A special CLEAR SCREEN switch on the keyboard, directly connected to
+ the video hardware, could be used to clear the video memory and
+ return the cursor to the home position. This was completely
+ independent of the processor.
+
+ A schematic of the Apple I video hardware can be found in the
+ Apple-1 Operation Manual; look for the schematic titled "Terminal
+ Section". Most of the functionality modeled here was determined by
+ reading this schematic. Many of the chips used were standard 74xx
+ TTL chips, but the shift registers used for the video memory and
+ line buffer were Signetics 25xx PMOS ICs. These were already
+ becoming obsolete when the Apple I was built, and detailed
+ information on them is very hard to find today.
+
+***************************************************************************/
+
+#include "emu.h"
+#include "includes/apple1.h"
+
+
+/***************************************************************************
+
+ Terminal code
+
+***************************************************************************/
+
+TILE_GET_INFO_MEMBER(apple1_state::terminal_gettileinfo)
+{
+ int ch, gfxfont, code, color;
+
+ ch = m_current_terminal->mem[tile_index];
+ code = ch & ((1 << m_current_terminal->char_bits) - 1);
+ color = ch >> m_current_terminal->char_bits;
+ gfxfont = m_current_terminal->gfx;
+
+ if ((tile_index == m_current_terminal->cur_offset) && !m_current_terminal->cur_hidden && m_current_terminal->getcursorcode)
+ code = m_current_terminal->getcursorcode(code);
+
+ SET_TILE_INFO_MEMBER(gfxfont, /* gfx */
+ code, /* character */
+ color, /* color */
+ 0); /* flags */
+}
+
+void apple1_state::terminal_draw(screen_device &screen, bitmap_ind16 &dest, const rectangle &cliprect, terminal_t *terminal)
+{
+ m_current_terminal = terminal;
+ terminal->tm->draw(screen, dest, cliprect, 0, 0);
+ m_current_terminal = nullptr;
+}
+
+void apple1_state::verify_coords(terminal_t *terminal, int x, int y)
+{
+ assert(x >= 0);
+ assert(y >= 0);
+ assert(x < terminal->num_cols);
+ assert(y < terminal->num_rows);
+}
+
+void apple1_state::terminal_putchar(terminal_t *terminal, int x, int y, int ch)
+{
+ int offs;
+
+ verify_coords(terminal, x, y);
+
+ offs = y * terminal->num_cols + x;
+ if (terminal->mem[offs] != ch)
+ {
+ terminal->mem[offs] = ch;
+ terminal->tm->mark_tile_dirty(offs);
+ }
+}
+
+int apple1_state::terminal_getchar(terminal_t *terminal, int x, int y)
+{
+ int offs;
+
+ verify_coords(terminal, x, y);
+ offs = y * terminal->num_cols + x;
+ return terminal->mem[offs];
+}
+
+void apple1_state::terminal_putblank(terminal_t *terminal, int x, int y)
+{
+ terminal_putchar(terminal, x, y, terminal->blank_char);
+}
+
+void apple1_state::terminal_dirtycursor(terminal_t *terminal)
+{
+ if (terminal->cur_offset >= 0)
+ terminal->tm->mark_tile_dirty(terminal->cur_offset);
+}
+
+void apple1_state::terminal_setcursor(terminal_t *terminal, int x, int y)
+{
+ terminal_dirtycursor(terminal);
+ terminal->cur_offset = y * terminal->num_cols + x;
+ terminal_dirtycursor(terminal);
+}
+
+void apple1_state::terminal_hidecursor(terminal_t *terminal)
+{
+ terminal->cur_hidden = 1;
+ terminal_dirtycursor(terminal);
+}
+
+void apple1_state::terminal_showcursor(terminal_t *terminal)
+{
+ terminal->cur_hidden = 0;
+ terminal_dirtycursor(terminal);
+}
+
+void apple1_state::terminal_getcursor(terminal_t *terminal, int *x, int *y)
+{
+ *x = terminal->cur_offset % terminal->num_cols;
+ *y = terminal->cur_offset / terminal->num_cols;
+}
+
+void apple1_state::terminal_fill(terminal_t *terminal, int val)
+{
+ int i;
+ for (i = 0; i < terminal->num_cols * terminal->num_rows; i++)
+ terminal->mem[i] = val;
+ terminal->tm->mark_all_dirty();
+}
+
+void apple1_state::terminal_clear(terminal_t *terminal)
+{
+ terminal_fill(terminal, terminal->blank_char);
+}
+
+terminal_t *apple1_state::terminal_create(
+ int gfx, int blank_char, int char_bits,
+ int (*getcursorcode)(int original_code),
+ int num_cols, int num_rows)
+{
+ terminal_t *term;
+ int char_width, char_height;
+
+ char_width = m_gfxdecode->gfx(gfx)->width();
+ char_height = m_gfxdecode->gfx(gfx)->height();
+
+ term = (terminal_t *) auto_alloc_array(machine(), char, sizeof(terminal_t) - sizeof(term->mem)
+ + (num_cols * num_rows * sizeof(termchar_t)));
+
+ term->tm = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(apple1_state::terminal_gettileinfo),this), TILEMAP_SCAN_ROWS,
+ char_width, char_height, num_cols, num_rows);
+
+ term->gfx = gfx;
+ term->blank_char = blank_char;
+ term->char_bits = char_bits;
+ term->num_cols = num_cols;
+ term->num_rows = num_rows;
+ term->getcursorcode = getcursorcode;
+ term->cur_offset = -1;
+ term->cur_hidden = 0;
+ terminal_clear(term);
+ return term;
+}
+
+
+/**************************************************************************/
+
+
+
+/* The cursor blinking is generated by a free-running timer with a
+ 0.52-second period. It is on for 2/3 of this period and off for
+ 1/3. */
+#define CURSOR_OFF_LENGTH (0.52/3)
+
+/**************************************************************************/
+
+static int apple1_getcursorcode(int original_code)
+{
+ /* Cursor uses symbol 0 (an @ sign) in the character generator ROM. */
+ return 0;
+}
+
+/**************************************************************************/
+
+void apple1_state::video_start()
+{
+ m_blink_on = 1; /* cursor is visible initially */
+ m_terminal = terminal_create(
+ 0, /* graphics font 0 (the only one we have) */
+ 32, /* Blank character is symbol 32 in the ROM */
+ 8, /* use 8 bits for the character code */
+ apple1_getcursorcode,
+ 40, 24); /* 40 columns, 24 rows */
+
+ terminal_setcursor(m_terminal, 0, 0);
+}
+
+/* This function handles all writes to the video display. */
+void apple1_state::apple1_vh_dsp_w (int data)
+{
+ int x, y;
+ int cursor_x, cursor_y;
+
+ /* While CLEAR SCREEN is being held down, the hardware is forced
+ to clear the video memory, so video writes have no effect. */
+ if (m_vh_clrscrn_pressed)
+ return;
+
+ /* The video display port only accepts the 7 lowest bits of the char. */
+ data &= 0x7f;
+
+ terminal_getcursor(m_terminal, &cursor_x, &cursor_y);
+
+ if (data == '\r') {
+ /* Carriage-return moves the cursor to the start of the next
+ line. */
+ cursor_x = 0;
+ cursor_y++;
+ }
+ else if (data < ' ') {
+ /* Except for carriage-return, the video hardware completely
+ ignores all control characters. */
+ return;
+ }
+ else {
+ /* For visible characters, only 6 bits of the ASCII code are
+ used, because the 2513 character generator ROM only
+ contains 64 symbols. The low 5 bits of the ASCII code are
+ used directly. Bit 6 is ignored, since it is the same for
+ all the available characters in the ROM. Bit 7 is inverted
+ before being used as the high bit of the 6-bit ROM symbol
+ index, because the block of 32 ASCII symbols containing the
+ uppercase letters comes first in the ROM. */
+
+ int romindx = (data & 0x1f) | (((data ^ 0x40) & 0x40) >> 1);
+
+ terminal_putchar(m_terminal, cursor_x, cursor_y, romindx);
+ if (cursor_x < 39)
+ {
+ cursor_x++;
+ }
+ else
+ {
+ cursor_x = 0;
+ cursor_y++;
+ }
+ }
+
+ /* If the cursor went past the bottom line, scroll the text up one line. */
+ if (cursor_y == 24)
+ {
+ for (y = 1; y < 24; y++)
+ for (x = 0; x < 40; x++)
+ terminal_putchar(m_terminal, x, y-1,
+ terminal_getchar(m_terminal, x, y));
+
+ for (x = 0; x < 40; x++)
+ terminal_putblank(m_terminal, x, 23);
+
+ cursor_y--;
+ }
+
+ terminal_setcursor(m_terminal, cursor_x, cursor_y);
+}
+
+/* This function handles clearing the video display on cold-boot or in
+ response to a press of the CLEAR SCREEN switch. */
+void apple1_state::apple1_vh_dsp_clr ()
+{
+ terminal_setcursor(m_terminal, 0, 0);
+ terminal_clear(m_terminal);
+}
+
+/* Calculate how long it will take for the display to assert the RDA
+ signal in response to a video display write. This signal indicates
+ the display has completed the write and is ready to accept another
+ write. */
+attotime apple1_state::apple1_vh_dsp_time_to_ready ()
+{
+ int cursor_x, cursor_y;
+ int cursor_scanline;
+ double scanline_period = m_screen->scan_period().as_double();
+ double cursor_hfrac;
+
+ /* The video hardware refreshes the screen by reading the
+ character codes from its circulating shift-register memory.
+ Because of the way this memory works, a new character can only
+ be written into the cursor location at the moment this location
+ is about to be read. This happens during the first scanline of
+ the cursor's character line, when the beam reaches the cursor's
+ horizontal position. */
+
+ terminal_getcursor(m_terminal, &cursor_x, &cursor_y);
+ cursor_scanline = cursor_y * apple1_charlayout.height;
+
+ /* Each scanline is composed of 455 pixel times. The first 175 of
+ these are the horizontal blanking period; the remaining 280 are
+ for the visible part of the scanline. */
+ cursor_hfrac = (175 + cursor_x * apple1_charlayout.width) / 455;
+
+ if (m_screen->vpos() == cursor_scanline) {
+ /* video_screen_get_hpos() doesn't account for the horizontal
+ blanking interval; it acts as if the scanline period is
+ entirely composed of visible pixel times. However, we can
+ still use it to find what fraction of the current scanline
+ period has elapsed. */
+ double current_hfrac = m_screen->hpos() /
+ m_screen->width();
+ if (current_hfrac < cursor_hfrac)
+ return attotime::from_double(scanline_period * (cursor_hfrac - current_hfrac));
+ }
+
+ return attotime::from_double(
+ m_screen->time_until_pos(cursor_scanline, 0).as_double() +
+ scanline_period * cursor_hfrac);
+}
+
+/* Blink the cursor on or off, as appropriate. */
+void apple1_state::apple1_vh_cursor_blink ()
+{
+ int new_blink_on;
+
+ /* The cursor is on for 2/3 of its blink period and off for 1/3.
+ This is most easily handled by dividing the total elapsed time
+ by the length of the off-portion of the cycle, giving us the
+ number of one-third-cycles elapsed, then checking the result
+ modulo 3. */
+
+ if (((int) (machine().time().as_double() / CURSOR_OFF_LENGTH)) % 3 < 2)
+ new_blink_on = 1;
+ else
+ new_blink_on = 0;
+
+ if (new_blink_on != m_blink_on) { /* have we changed state? */
+ if (new_blink_on)
+ terminal_showcursor(m_terminal);
+ else
+ terminal_hidecursor(m_terminal);
+ m_blink_on = new_blink_on;
+ }
+}
+
+UINT32 apple1_state::screen_update_apple1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+{
+ apple1_vh_cursor_blink();
+ terminal_draw(screen, bitmap, cliprect, m_terminal);
+ return 0;
+}
diff --git a/src/mame/video/blmbycar.cpp b/src/mame/video/blmbycar.cpp
index 6086cd9e9b6..b438f01eafa 100644
--- a/src/mame/video/blmbycar.cpp
+++ b/src/mame/video/blmbycar.cpp
@@ -78,13 +78,13 @@ TILE_GET_INFO_MEMBER(blmbycar_state::get_tile_info_1)
}
-WRITE16_MEMBER(blmbycar_state::vram_0_w)
+WRITE16_MEMBER(blmbycar_state::blmbycar_vram_0_w)
{
COMBINE_DATA(&m_vram_0[offset]);
m_tilemap_0->mark_tile_dirty(offset / 2);
}
-WRITE16_MEMBER(blmbycar_state::vram_1_w)
+WRITE16_MEMBER(blmbycar_state::blmbycar_vram_1_w)
{
COMBINE_DATA(&m_vram_1[offset]);
m_tilemap_1->mark_tile_dirty(offset / 2);
@@ -192,7 +192,7 @@ void blmbycar_state::draw_sprites( screen_device &screen, bitmap_ind16 &bitmap,
***************************************************************************/
-UINT32 blmbycar_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+UINT32 blmbycar_state::screen_update_blmbycar(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
int i, layers_ctrl = -1;
diff --git a/src/mame/video/chihiro.cpp b/src/mame/video/chihiro.cpp
index f5d413e814e..9f803c45651 100644
--- a/src/mame/video/chihiro.cpp
+++ b/src/mame/video/chihiro.cpp
@@ -1953,7 +1953,7 @@ void nv2a_renderer::render_register_combiners(INT32 scanline, const extent_t &ex
if ((extent.startx < 0) || (extent.stopx > 640))
return;
- std::lock_guard<std::mutex> lock(combiner.lock); // needed since multithreading is not supported yet
+ osd_lock_acquire(combiner.lock); // needed since multithreading is not supported yet
x = extent.stopx - extent.startx - 1; // number of pixels to draw
while (x >= 0) {
xp = extent.startx + x;
@@ -1998,6 +1998,7 @@ void nv2a_renderer::render_register_combiners(INT32 scanline, const extent_t &ex
write_pixel(xp, scanline, a8r8g8b8, z);
x--;
}
+ osd_lock_release(combiner.lock);
}
#if 0
@@ -2549,38 +2550,6 @@ void nv2a_renderer::clear_depth_buffer(int what, UINT32 value)
}
}
-UINT32 nv2a_renderer::render_triangle_culling(const rectangle &cliprect, render_delegate callback, int paramcount, const vertex_t &_v1, const vertex_t &_v2, const vertex_t &_v3)
-{
- float areax2;
- NV2A_GL_CULL_FACE face = NV2A_GL_CULL_FACE::FRONT;
-
- if (backface_culling_enabled == false)
- return render_triangle(cliprect, callback, paramcount, _v1, _v2, _v3);
- if (backface_culling_culled == NV2A_GL_CULL_FACE::FRONT_AND_BACK)
- return 0;
- areax2 = _v1.x*(_v2.y - _v3.y) + _v2.x*(_v3.y - _v1.y) + _v3.x*(_v1.y - _v2.y);
- if (backface_culling_winding == NV2A_GL_FRONT_FACE::CCW)
- {
- if (-areax2 <= 0)
- face = NV2A_GL_CULL_FACE::BACK;
- else
- face = NV2A_GL_CULL_FACE::FRONT;
- } else
- {
- if (areax2 <= 0)
- face = NV2A_GL_CULL_FACE::BACK;
- else
- face = NV2A_GL_CULL_FACE::FRONT;
- }
- if (face == NV2A_GL_CULL_FACE::FRONT)
- if (backface_culling_culled == NV2A_GL_CULL_FACE::BACK)
- return render_triangle(cliprect, callback, paramcount, _v1, _v2, _v3);
- if (face == NV2A_GL_CULL_FACE::BACK)
- if (backface_culling_culled == NV2A_GL_CULL_FACE::FRONT)
- return render_triangle(cliprect, callback, paramcount, _v1, _v2, _v3);
- return 0;
-}
-
int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UINT32 subchannel, UINT32 method, UINT32 address, int &countlen)
{
UINT32 maddress;
@@ -2593,16 +2562,6 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN
printf("A:%08X MTHD:%08X D:%08X\n\r",address,maddress,data);
#endif
if (maddress == 0x17fc) {
-#if 0 // useful while debugging to see what coordinates have been used
- static int debugvc = 0;
- if (debugvc)
- if (data == 0)
- {
- printf("%d %d\n\r", (int)primitive_type, vertex_first);
- for (int n = 0; n < vertex_first; n++)
- printf("%d X:%f Y:%f Z:%f W:%f x:%f y:%f\n\r", n, vertex_software[n].attribute[0].fv[0], vertex_software[n].attribute[0].fv[1], vertex_software[n].attribute[0].fv[2], vertex_software[n].attribute[0].fv[3], vertex_xy[n].x, vertex_xy[n].y);
- }
-#endif
vertex_count = 0;
vertex_first = 0;
indexesleft_count = 0;
@@ -2634,9 +2593,7 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN
for (n = 0; n <= count; n += 4) {
read_vertices_0x1810(space, vertex_software + vertex_first, n + offset, 4);
convert_vertices_poly(vertex_software + vertex_first, vertex_xy + vertex_first, 4);
- //render_polygon<4>(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy + vertex_first); // 4 rgba, 4 texture units 2 uv
- render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[vertex_first], vertex_xy[vertex_first + 1], vertex_xy[vertex_first + 2]);
- render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[vertex_first], vertex_xy[vertex_first + 2], vertex_xy[vertex_first + 3]);
+ render_polygon<4>(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy + vertex_first); // 4 rgba, 4 texture units 2 uv
vertex_first = (vertex_first + 4) & 1023;
vertex_count = vertex_count + 4;
wait();
@@ -2646,7 +2603,7 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN
for (n = 0; n <= count; n += 3) {
read_vertices_0x1810(space, vertex_software + vertex_first, n + offset, 3);
convert_vertices_poly(vertex_software + vertex_first, vertex_xy + vertex_first, 3);
- render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[vertex_first], vertex_xy[(vertex_first + 1) & 1023], vertex_xy[(vertex_first + 2) & 1023]); // 4 rgba, 4 texture units 2 uv
+ render_triangle(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[vertex_first], vertex_xy[(vertex_first + 1) & 1023], vertex_xy[(vertex_first + 2) & 1023]); // 4 rgba, 4 texture units 2 uv
vertex_first = (vertex_first + 3) & 1023;
vertex_count = vertex_count + 3;
wait();
@@ -2668,7 +2625,7 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN
for (n = 0; n <= count; n++) {
read_vertices_0x1810(space, vertex_software + vertex_first, offset + n, 1);
convert_vertices_poly(vertex_software + vertex_first, vertex_xy + vertex_first, 1);
- render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[1024], vertex_xy[(vertex_first - 1) & 1023], vertex_xy[vertex_first]);
+ render_triangle(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[1024], vertex_xy[(vertex_first - 1) & 1023], vertex_xy[vertex_first]);
vertex_first = (vertex_first + 1) & 1023;
vertex_count = vertex_count + 1;
wait();
@@ -2689,9 +2646,9 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN
read_vertices_0x1810(space, vertex_software + vertex_first, offset + n, 1);
convert_vertices_poly(vertex_software + vertex_first, vertex_xy + vertex_first, 1);
if ((vertex_count & 1) == 0)
- render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[(vertex_first - 2) & 1023], vertex_xy[(vertex_first - 1) & 1023], vertex_xy[vertex_first]);
+ render_triangle(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[(vertex_first - 2) & 1023], vertex_xy[(vertex_first - 1) & 1023], vertex_xy[vertex_first]);
else
- render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[(vertex_first - 2) & 1023], vertex_xy[vertex_first], vertex_xy[(vertex_first - 1) & 1023]);
+ render_triangle(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[(vertex_first - 2) & 1023], vertex_xy[vertex_first], vertex_xy[(vertex_first - 1) & 1023]);
vertex_first = (vertex_first + 1) & 1023;
vertex_count = vertex_count + 1;
wait();
@@ -2735,9 +2692,7 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN
address = address + c * 4;
countlen = countlen - c;
convert_vertices_poly(vertex_software + vertex_first, vertex_xy + vertex_first, 4);
- //render_polygon<4>(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy + vertex_first); // 4 rgba, 4 texture units 2 uv
- render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[vertex_first], vertex_xy[vertex_first + 1], vertex_xy[vertex_first + 2]);
- render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[vertex_first], vertex_xy[vertex_first + 2], vertex_xy[vertex_first + 3]);
+ render_polygon<4>(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy + vertex_first); // 4 rgba, 4 texture units 2 uv
vertex_first = (vertex_first + 4) & 1023;
vertex_count = vertex_count + 4;
wait();
@@ -2779,7 +2734,7 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN
convert_vertices_poly(vertex_software + vertex_first, vertex_xy + vertex_first, 1);
address = address + c * 4;
countlen = countlen - c;
- render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[1024], vertex_xy[(vertex_first - 1) & 1023], vertex_xy[vertex_first]);
+ render_triangle(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[1024], vertex_xy[(vertex_first - 1) & 1023], vertex_xy[vertex_first]);
vertex_first = (vertex_first + 1) & 1023;
vertex_count = vertex_count + 1;
wait();
@@ -2799,7 +2754,7 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN
address = address + c * 4;
countlen = countlen - c;
convert_vertices_poly(vertex_software + vertex_first, vertex_xy + vertex_first, 3);
- render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[vertex_first], vertex_xy[(vertex_first + 1) & 1023], vertex_xy[(vertex_first + 2) & 1023]); // 4 rgba, 4 texture units 2 uv
+ render_triangle(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[vertex_first], vertex_xy[(vertex_first + 1) & 1023], vertex_xy[(vertex_first + 2) & 1023]); // 4 rgba, 4 texture units 2 uv
vertex_first = (vertex_first + 3) & 1023;
vertex_count = vertex_count + 3;
wait();
@@ -2835,9 +2790,9 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN
countlen = countlen - c;
convert_vertices_poly(vertex_software + vertex_first, vertex_xy + vertex_first, 1);
if ((vertex_count & 1) == 0)
- render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[(vertex_first - 2) & 1023], vertex_xy[(vertex_first - 1) & 1023], vertex_xy[vertex_first]);
+ render_triangle(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[(vertex_first - 2) & 1023], vertex_xy[(vertex_first - 1) & 1023], vertex_xy[vertex_first]);
else
- render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[(vertex_first - 2) & 1023], vertex_xy[vertex_first], vertex_xy[(vertex_first - 1) & 1023]);
+ render_triangle(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[(vertex_first - 2) & 1023], vertex_xy[vertex_first], vertex_xy[(vertex_first - 1) & 1023]);
vertex_first = (vertex_first + 1) & 1023;
vertex_count = vertex_count + 1;
wait();
@@ -2895,9 +2850,7 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN
break;
}
address = address + c * 4;
- //render_polygon<4>(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy); // 4 rgba, 4 texture units 2 uv
- render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[vertex_first], vertex_xy[vertex_first + 1], vertex_xy[vertex_first + 2]);
- render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[vertex_first], vertex_xy[vertex_first + 2], vertex_xy[vertex_first + 3]);
+ render_polygon<4>(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy); // 4 rgba, 4 texture units 2 uv
vertex_first = (vertex_first + 4) & 1023;
vertex_count = vertex_count + 4;
wait();
@@ -2925,8 +2878,8 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN
return 0;
}
address = address + c * 4;
- render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[n & 3], vertex_xy[(n + 1) & 3], vertex_xy[(n + 2) & 3]);
- render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[(n + 2) & 3], vertex_xy[(n + 1) & 3], vertex_xy[(n + 3) & 3]);
+ render_triangle(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[n & 3], vertex_xy[(n + 1) & 3], vertex_xy[(n + 2) & 3]);
+ render_triangle(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[(n + 2) & 3], vertex_xy[(n + 1) & 3], vertex_xy[(n + 3) & 3]);
wait();
}
}
@@ -2962,7 +2915,7 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN
}
address = address + c * 4;
convert_vertices_poly(vertex_software + vertex_first, vertex_xy + vertex_first, 1);
- render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[1024], vertex_xy[(vertex_first - 1) & 1023], vertex_xy[vertex_first]);
+ render_triangle(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[1024], vertex_xy[(vertex_first - 1) & 1023], vertex_xy[vertex_first]);
vertex_first = (vertex_first + 1) & 1023;
vertex_count = vertex_count + 1;
wait();
@@ -2981,7 +2934,7 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN
break;
}
address = address + c * 4;
- render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[vertex_first], vertex_xy[(vertex_first + 1) & 1023], vertex_xy[(vertex_first + 2) & 1023]); // 4 rgba, 4 texture units 2 uv
+ render_triangle(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[vertex_first], vertex_xy[(vertex_first + 1) & 1023], vertex_xy[(vertex_first + 2) & 1023]); // 4 rgba, 4 texture units 2 uv
vertex_first = (vertex_first + 3) & 1023;
vertex_count = vertex_count + 3;
wait();
@@ -3016,9 +2969,9 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN
}
address = address + c * 4;
if ((vertex_count & 1) == 0)
- render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[(vertex_first - 2) & 1023], vertex_xy[(vertex_first - 1) & 1023], vertex_xy[vertex_first]);
+ render_triangle(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[(vertex_first - 2) & 1023], vertex_xy[(vertex_first - 1) & 1023], vertex_xy[vertex_first]);
else
- render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[(vertex_first - 2) & 1023], vertex_xy[vertex_first], vertex_xy[(vertex_first - 1) & 1023]);
+ render_triangle(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[(vertex_first - 2) & 1023], vertex_xy[vertex_first], vertex_xy[(vertex_first - 1) & 1023]);
vertex_first = (vertex_first + 1) & 1023;
vertex_count = vertex_count + 1;
wait();
@@ -3076,15 +3029,6 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN
}
if ((maddress == 0x1d6c) || (maddress == 0x1d70) || (maddress == 0x1a4))
countlen--;
- if (maddress == 0x0308) {
- backface_culling_enabled = data != 0 ? true : false;
- }
- if (maddress == 0x03a0) {
- backface_culling_winding = (NV2A_GL_FRONT_FACE)data;
- }
- if (maddress == 0x039c) {
- backface_culling_culled = (NV2A_GL_CULL_FACE)data;
- }
if (maddress == 0x019c) {
geforce_read_dma_object(data, dma_offset[0], dma_size[0]);
}
diff --git a/src/mame/video/galpanic.cpp b/src/mame/video/galpanic.cpp
index cf33cb88bdd..487a22aeefb 100644
--- a/src/mame/video/galpanic.cpp
+++ b/src/mame/video/galpanic.cpp
@@ -5,45 +5,52 @@
#include "includes/galpanic.h"
-void galpanic_state::video_start()
+VIDEO_START_MEMBER(galpanic_state,galpanic)
{
m_screen->register_screen_bitmap(m_bitmap);
-
- save_item(NAME(m_bitmap));
}
PALETTE_INIT_MEMBER(galpanic_state,galpanic)
{
+ int i;
+
/* first 1024 colors are dynamic */
/* initialize 555 RGB lookup */
- for (int i = 0;i < 32768;i++)
+ for (i = 0;i < 32768;i++)
palette.set_pen_color(i+1024,pal5bit(i >> 5),pal5bit(i >> 10),pal5bit(i >> 0));
}
-WRITE16_MEMBER(galpanic_state::bgvideoram_w)
+WRITE16_MEMBER(galpanic_state::galpanic_bgvideoram_w)
{
+ int sx,sy;
+
+
data = COMBINE_DATA(&m_bgvideoram[offset]);
- int sy = offset / 256;
- int sx = offset % 256;
+ sy = offset / 256;
+ sx = offset % 256;
m_bitmap.pix16(sy, sx) = 1024 + (data >> 1);
}
void galpanic_state::draw_fgbitmap(bitmap_ind16 &bitmap, const rectangle &cliprect)
{
- for (int offs = 0;offs < m_fgvideoram.bytes()/2;offs++)
+ int offs;
+
+ for (offs = 0;offs < m_fgvideoram.bytes()/2;offs++)
{
- int sx = offs % 256;
- int sy = offs / 256;
- int color = m_fgvideoram[offs];
+ int sx,sy,color;
+
+ sx = offs % 256;
+ sy = offs / 256;
+ color = m_fgvideoram[offs];
if (color)
bitmap.pix16(sy, sx) = color;
}
}
-UINT32 galpanic_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+UINT32 galpanic_state::screen_update_galpanic(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
/* copy the temporary bitmap to the screen */
copybitmap(bitmap,m_bitmap,0,0,0,0,cliprect);
diff --git a/src/mame/video/glass.cpp b/src/mame/video/glass.cpp
index c301a1527f1..a661ce578a2 100644
--- a/src/mame/video/glass.cpp
+++ b/src/mame/video/glass.cpp
@@ -33,7 +33,7 @@
1 | xxxxxxxx -------- | not used
*/
-TILE_GET_INFO_MEMBER(glass_state::get_tile_info_screen0)
+TILE_GET_INFO_MEMBER(glass_state::get_tile_info_glass_screen0)
{
int data = m_videoram[tile_index << 1];
int data2 = m_videoram[(tile_index << 1) + 1];
@@ -43,7 +43,7 @@ TILE_GET_INFO_MEMBER(glass_state::get_tile_info_screen0)
}
-TILE_GET_INFO_MEMBER(glass_state::get_tile_info_screen1)
+TILE_GET_INFO_MEMBER(glass_state::get_tile_info_glass_screen1)
{
int data = m_videoram[(0x1000 / 2) + (tile_index << 1)];
int data2 = m_videoram[(0x1000 / 2) + (tile_index << 1) + 1];
@@ -67,7 +67,7 @@ TILE_GET_INFO_MEMBER(glass_state::get_tile_info_screen1)
B2B1B0 selects the picture (there are 8 pictures in each half of the ROM)
*/
-WRITE16_MEMBER(glass_state::blitter_w)
+WRITE16_MEMBER(glass_state::glass_blitter_w)
{
m_blitter_serial_buffer[m_current_bit] = data & 0x01;
m_current_bit++;
@@ -112,7 +112,7 @@ WRITE16_MEMBER(glass_state::blitter_w)
***************************************************************************/
-WRITE16_MEMBER(glass_state::vram_w)
+WRITE16_MEMBER(glass_state::glass_vram_w)
{
COMBINE_DATA(&m_videoram[offset]);
m_pant[offset >> 11]->mark_tile_dirty(((offset << 1) & 0x0fff) >> 2);
@@ -127,8 +127,8 @@ WRITE16_MEMBER(glass_state::vram_w)
void glass_state::video_start()
{
- m_pant[0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(glass_state::get_tile_info_screen0),this), TILEMAP_SCAN_ROWS, 16, 16, 32, 32);
- m_pant[1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(glass_state::get_tile_info_screen1),this), TILEMAP_SCAN_ROWS, 16, 16, 32, 32);
+ m_pant[0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(glass_state::get_tile_info_glass_screen0),this), TILEMAP_SCAN_ROWS, 16, 16, 32, 32);
+ m_pant[1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(glass_state::get_tile_info_glass_screen1),this), TILEMAP_SCAN_ROWS, 16, 16, 32, 32);
m_screen_bitmap = std::make_unique<bitmap_ind16>(320, 200);
save_item(NAME(*m_screen_bitmap));
@@ -191,7 +191,7 @@ void glass_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect
****************************************************************************/
-UINT32 glass_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+UINT32 glass_state::screen_update_glass(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
/* set scroll registers */
m_pant[0]->set_scrolly(0, m_vregs[0]);
diff --git a/src/mame/video/laserbat.cpp b/src/mame/video/laserbat.cpp
index 2431304816f..fca20043f37 100644
--- a/src/mame/video/laserbat.cpp
+++ b/src/mame/video/laserbat.cpp
@@ -82,6 +82,58 @@
#include "includes/laserbat.h"
+PALETTE_INIT_MEMBER(laserbat_state_base, laserbat)
+{
+ /*
+ Uses GRBGRBGR pixel format. The two topmost bist are the LSBs
+ for red and green. LSB for blue is always effectively 1. The
+ middle group is the MSB. Yet another crazy thing they did.
+
+ Each colour channel has an emitter follower buffer amlpifier
+ biased with a 1k resistor to +5V and a 3k3 resistor to ground.
+ Output is adjusted by connecting additional resistors across the
+ leg to ground using an open collector buffer - 270R, 820R and
+ 1k0 for unset MSB to LSB, respectively (blue has no LSB so it
+ has no 1k0 resistor).
+
+ Assuming 0.7V drop across the emitter follower and no drop
+ across the open collector buffer, these are the approximate
+ output voltages:
+
+ 0.0000, 0.1031, 0.1324, 0.2987 , 0.7194, 1.2821, 1.4711, 3.1372
+
+ The game never sets the colour to any value above 4, effectively
+ treating it as 5-level red and green, and 3-level blue, for a
+ total of 75 usable colours.
+
+ From the fact that there's no DC offset on red and green, and
+ the highest value used is just over 0.7V, I'm guessing the game
+ expects to drive a standard 0.7V RGB monitor, and higher colour
+ values would simply saturate the input. To make it not look
+ like the inside of a coal mine, I've applied gamma decoding at
+ 2.2
+
+ However there's that nasty DC offset on the blue caused by the
+ fact that it has no LSB, but it's eliminated at the AC-coupling
+ of the input and output of the buffer amplifier on the monitor
+ interface board. I'm treating it as though it has the same gain
+ as the other channels. After gamma adjustment, medium red and
+ medium blue as used by the game have almost the same intensity.
+ */
+
+ int const weights[] = { 0, 107, 120, 173, 255, 255, 255, 255 };
+ int const blue_weights[] = { 0, 0, 60, 121, 241, 255, 255, 255, 255 };
+ for (int entry = 0; palette.entries() > entry; entry++)
+ {
+ UINT8 const bits(entry & 0xff);
+ UINT8 const r(((bits & 0x01) << 1) | ((bits & 0x08) >> 1) | ((bits & 0x40) >> 6));
+ UINT8 const g(((bits & 0x02) >> 0) | ((bits & 0x10) >> 2) | ((bits & 0x80) >> 7));
+ UINT8 const b(((bits & 0x04) >> 1) | ((bits & 0x20) >> 3) | 0x01);
+ palette.set_pen_color(entry, rgb_t(weights[r], weights[g], blue_weights[b]));
+ }
+}
+
+
WRITE8_MEMBER(laserbat_state_base::videoram_w)
{
if (!m_mpx_bkeff)
@@ -323,106 +375,3 @@ TIMER_CALLBACK_MEMBER(laserbat_state_base::video_line)
}
}
}
-
-
-PALETTE_INIT_MEMBER(laserbat_state, laserbat)
-{
- /*
- Uses GRBGRBGR pixel format. The two topmost bist are the LSBs
- for red and green. LSB for blue is always effectively 1. The
- middle group is the MSB. Yet another crazy thing they did.
-
- Each colour channel has an emitter follower buffer amlpifier
- biased with a 1k resistor to +5V and a 3k3 resistor to ground.
- Output is adjusted by connecting additional resistors across the
- leg to ground using an open collector buffer - 270R, 820R and
- 1k0 for unset MSB to LSB, respectively (blue has no LSB so it
- has no 1k0 resistor).
-
- Assuming 0.7V drop across the emitter follower and no drop
- across the open collector buffer, these are the approximate
- output voltages:
-
- 0.0000, 0.1031, 0.1324, 0.2987, 0.7194, 1.2821, 1.4711, 3.1372
-
- The game never sets the colour to any value above 4, effectively
- treating it as 5-level red and green, and 3-level blue, for a
- total of 75 usable colours.
-
- From the fact that there's no DC offset on red and green, and
- the highest value used is just over 0.7V, I'm guessing the game
- expects to drive a standard 0.7V RGB monitor, and higher colour
- values would simply saturate the input. To make it not look
- like the inside of a coal mine, I've applied gamma decoding at
- 2.2
-
- However there's that nasty DC offset on the blue caused by the
- fact that it has no LSB, but it's eliminated at the AC-coupling
- of the input and output of the buffer amplifier on the monitor
- interface board. I'm treating it as though it has the same gain
- as the other channels. After gamma adjustment, medium red and
- medium blue as used by the game have almost the same intensity.
- */
-
- int const weights[] = { 0, 107, 120, 173, 255, 255, 255, 255 };
- int const blue_weights[] = { 0, 0, 60, 121, 241, 255, 255, 255 };
- for (int entry = 0; palette.entries() > entry; entry++)
- {
- UINT8 const bits(entry & 0xff);
- UINT8 const r(((bits & 0x01) << 1) | ((bits & 0x08) >> 1) | ((bits & 0x40) >> 6));
- UINT8 const g(((bits & 0x02) >> 0) | ((bits & 0x10) >> 2) | ((bits & 0x80) >> 7));
- UINT8 const b(((bits & 0x04) >> 1) | ((bits & 0x20) >> 3) | 0x01);
- palette.set_pen_color(entry, rgb_t(weights[r], weights[g], blue_weights[b]));
- }
-}
-
-
-PALETTE_INIT_MEMBER(catnmous_state, catnmous)
-{
- /*
- Uses GRBGRBGR pixel format. The two topmost bist are the LSBs
- for red and green. The middle group is the MSB. Yet another
- crazy thing they did.
-
- Each colour channel has an emitter follower buffer amlpifier
- biased with a 1k resistor to +5V and a 3k3 resistor to ground.
- Output is adjusted by connecting additional resistors across the
- leg to ground using an open collector buffer. Red and green use
- 560R, 820R and 1k0 for unset MSB to LSB, respectively. Blue
- uses 47R and 820R on the PCB we have a photo of, although the
- 47R resistor looks like it could be a bad repair (opposite
- orientation and burn marks on PCB).
-
- Assuming 0.7V drop across the emitter follower and no drop
- across the open collector buffer, these are the approximate
- output voltages for red and green:
-
- 0.2419, 0.4606, 0.5229, 0.7194, 0.9188, 1.2821, 1.4711, 3.1372
-
- The game uses all colour values except 4. The DC offset will be
- eliminated by the AC coupling on the monitor interface board.
- The differences steps aren't very linear, they vary from 0.06V
- to 0.36V with no particular order. The input would be expected
- to saturate somewhere inside the big jump to the highest level.
-
- Let's assume the 47R resistor is a bad repair and it's supposed
- to be 470R. That gives us these output voltages for blue:
-
- 0.3752, 0.7574, 1.2821, 3.1372
-
- To make life easier, I'll assume the monitor is expected to have
- half the gain of a standard monitor and no gamma decoding is
- necessary.
- */
-
- int const weights[] = { 0, 40, 51, 87, 123, 189, 224, 255 };
- int const blue_weights[] = { 0, 70, 165, 255 };
- for (int entry = 0; palette.entries() > entry; entry++)
- {
- UINT8 const bits(entry & 0xff);
- UINT8 const r(((bits & 0x01) << 1) | ((bits & 0x08) >> 1) | ((bits & 0x40) >> 6));
- UINT8 const g(((bits & 0x02) >> 0) | ((bits & 0x10) >> 2) | ((bits & 0x80) >> 7));
- UINT8 const b(((bits & 0x04) >> 2) | ((bits & 0x20) >> 4));
- palette.set_pen_color(entry, rgb_t(weights[r], weights[g], blue_weights[b]));
- }
-}
diff --git a/src/mame/video/megasys1.cpp b/src/mame/video/megasys1.cpp
index 7e04cec112d..1770c490218 100644
--- a/src/mame/video/megasys1.cpp
+++ b/src/mame/video/megasys1.cpp
@@ -844,6 +844,14 @@ struct priority
*/
+static const struct priority priorities[] =
+{
+ { "chimerab",
+ { 0x14032,0x04132,0x14032,0x04132,0xfffff,0xfffff,0xfffff,0xfffff,
+ 0xfffff,0xfffff,0x01324,0xfffff,0xfffff,0xfffff,0xfffff,0xfffff }
+ },
+ { nullptr } // end of list: use the prom's data
+};
/*
@@ -893,8 +901,27 @@ void megasys1_state::megasys1_priority_create()
{
const UINT8 *color_prom = memregion("proms")->base();
int pri_code, offset, i, order;
-
- /* convert PROM to something we can use */
+
+ /* First check if we have an hand-crafted priority scheme
+ available (this should happen only if no good dump
+ of the prom is known) */
+
+ i = 0;
+ while ( priorities[i].driver &&
+ strcmp(priorities[i].driver, machine().system().name) != 0 &&
+ strcmp(priorities[i].driver, machine().system().parent) != 0)
+ i++;
+
+ if (priorities[i].driver)
+ {
+ memcpy (m_layers_order, priorities[i].priorities, 16 * sizeof(int));
+
+ logerror("WARNING: using an hand-crafted priorities scheme\n");
+
+ return;
+ }
+
+ /* Otherwise, perform the conversion from the prom itself */
for (pri_code = 0; pri_code < 0x10 ; pri_code++) // 16 priority codes
{
diff --git a/src/mame/video/seibuspi.cpp b/src/mame/video/seibuspi.cpp
index 42e683c70b2..cb267167789 100644
--- a/src/mame/video/seibuspi.cpp
+++ b/src/mame/video/seibuspi.cpp
@@ -111,7 +111,7 @@ WRITE32_MEMBER(seibuspi_state::tilemap_dma_start_w)
int dma_length_real = (m_video_dma_length + 1) * 2; // ideally we should be using this, let's check if we have to:
if (m_video_dma_length != 0 && dma_length_user != dma_length_real)
popmessage("Tile LEN %X %X, contact MAMEdev", dma_length_user, dma_length_real); // shouldn't happen
- else if (!DWORD_ALIGNED(m_video_dma_address) || (m_video_dma_length & 3) != 3 || (m_video_dma_address + dma_length_user) > 0x40000)
+ else if ((m_video_dma_address & 3) != 0 || (m_video_dma_length & 3) != 3 || (m_video_dma_address + dma_length_user) > 0x40000)
popmessage("Tile DMA %X %X, contact MAMEdev", m_video_dma_address, m_video_dma_length); // shouldn't happen
if (m_video_dma_address < 0x800)
logerror("tilemap_dma_start_w in I/O area: %X\n", m_video_dma_address);
@@ -198,7 +198,7 @@ WRITE32_MEMBER(seibuspi_state::palette_dma_start_w)
int dma_length = (m_video_dma_length + 1) * 2;
// safety check
- if (!DWORD_ALIGNED(m_video_dma_address) || (m_video_dma_length & 3) != 3 || dma_length > m_palette_ram_size || (m_video_dma_address + dma_length) > 0x40000)
+ if ((m_video_dma_address & 3) != 0 || (m_video_dma_length & 3) != 3 || dma_length > m_palette_ram_size || (m_video_dma_address + dma_length) > 0x40000)
popmessage("Pal DMA %X %X, contact MAMEdev", m_video_dma_address, m_video_dma_length); // shouldn't happen
if (m_video_dma_address < 0x800)
logerror("palette_dma_start_w in I/O area: %X\n", m_video_dma_address);
@@ -219,7 +219,7 @@ WRITE32_MEMBER(seibuspi_state::palette_dma_start_w)
WRITE16_MEMBER(seibuspi_state::sprite_dma_start_w)
{
// safety check
- if (!DWORD_ALIGNED(m_video_dma_address) || (m_video_dma_address + m_sprite_ram_size) > 0x40000)
+ if ((m_video_dma_address & 3) != 0 || (m_video_dma_address + m_sprite_ram_size) > 0x40000)
popmessage("Sprite DMA %X, contact MAMEdev", m_video_dma_address); // shouldn't happen
if (m_video_dma_address < 0x800)
logerror("sprite_dma_start_w in I/O area: %X\n", m_video_dma_address);
diff --git a/src/mame/video/snk.cpp b/src/mame/video/snk.cpp
index 3749233adcb..19bcf967fda 100644
--- a/src/mame/video/snk.cpp
+++ b/src/mame/video/snk.cpp
@@ -930,19 +930,6 @@ UINT32 snk_state::screen_update_tnk3(screen_device &screen, bitmap_ind16 &bitmap
return 0;
}
-UINT32 snk_state::screen_update_fitegolf2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
-{
- m_bg_tilemap->set_scrollx(0, m_bg_scrollx);
- m_bg_tilemap->set_scrolly(0, m_bg_scrolly);
-
- m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
- tnk3_draw_sprites(bitmap, cliprect, m_sp16_scrollx+1, m_sp16_scrolly); // needs an extra offset?? neither this or fitegolf actually write to sprite offset registers tho?
- m_tx_tilemap->draw(screen, bitmap, cliprect, 0, 0);
-
- return 0;
-}
-
-
UINT32 snk_state::screen_update_ikari(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
diff --git a/src/mame/video/timeplt.cpp b/src/mame/video/timeplt.cpp
index b418ab7c4fc..afd493a8b92 100644
--- a/src/mame/video/timeplt.cpp
+++ b/src/mame/video/timeplt.cpp
@@ -139,9 +139,6 @@ VIDEO_START_MEMBER(timeplt_state,psurge)
VIDEO_START_MEMBER(timeplt_state,chkun)
{
m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(timeplt_state::get_chkun_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
- m_video_enable = 0;
-
- save_item(NAME(m_video_enable));
}
diff --git a/src/mame/video/x68k.cpp b/src/mame/video/x68k.cpp
index 7a11c89175b..13f6288b642 100644
--- a/src/mame/video/x68k.cpp
+++ b/src/mame/video/x68k.cpp
@@ -867,7 +867,7 @@ bool x68k_state::x68k_draw_gfx_scanline( bitmap_ind16 &bitmap, rectangle cliprec
else
bitmap.pix16(scanline, pixel) = (pal[colour] & 0xfffe) + blend;
}
- else if(((m_video.reg[2] & 0x1800) == 0x1000) && (colour & 1))
+ if(((m_video.reg[2] & 0x1800) == 0x1000) && (colour & 1))
m_special.pix16(scanline, pixel) = colour;
else
bitmap.pix16(scanline, pixel) = colour;
diff --git a/src/osd/modules/font/font_sdl.cpp b/src/osd/modules/font/font_sdl.cpp
index ad5d1699e3b..1474bd61ec4 100644
--- a/src/osd/modules/font/font_sdl.cpp
+++ b/src/osd/modules/font/font_sdl.cpp
@@ -10,7 +10,11 @@
#if defined(SDLMAME_UNIX) && (!defined(SDLMAME_MACOSX)) && (!defined(SDLMAME_SOLARIS)) && (!defined(SDLMAME_HAIKU)) && (!defined(SDLMAME_EMSCRIPTEN))
+#if (SDLMAME_SDL2)
#include <SDL2/SDL_ttf.h>
+#else
+#include <SDL/SDL_ttf.h>
+#endif
#ifndef SDLMAME_HAIKU
#include <fontconfig/fontconfig.h>
#endif
diff --git a/src/osd/modules/opengl/SDL1211_opengl.h b/src/osd/modules/opengl/SDL1211_opengl.h
new file mode 100644
index 00000000000..2a5db6f3199
--- /dev/null
+++ b/src/osd/modules/opengl/SDL1211_opengl.h
@@ -0,0 +1,6553 @@
+// license:LGPL-2.1+
+// copyright-holders:Sam Lantinga
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2006 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+/* This is a simple file to encapsulate the OpenGL API headers */
+
+//#include <SDL/SDL_config.h>
+
+#ifdef __WIN32__
+#define WIN32_LEAN_AND_MEAN
+#ifndef NOMINMAX
+#define NOMINMAX /* Don't defined min() and max() */
+#endif
+#include <windows.h>
+#endif
+#ifndef NO_SDL_GLEXT
+#define __glext_h_ /* Don't let gl.h include glext.h */
+#endif
+#if defined(__MACOSX__)
+#include <OpenGL/gl.h> /* Header File For The OpenGL Library */
+#include <OpenGL/glu.h> /* Header File For The GLU Library */
+#elif defined(__MACOS__)
+#include <gl.h> /* Header File For The OpenGL Library */
+#include <glu.h> /* Header File For The GLU Library */
+#else
+#include <GL/gl.h> /* Header File For The OpenGL Library */
+#include <GL/glu.h> /* Header File For The GLU Library */
+#endif
+#ifndef NO_SDL_GLEXT
+#undef __glext_h_
+#endif
+
+/* This file taken from "GLext.h" from the Jeff Molofee OpenGL tutorials.
+ It is included here because glext.h is not available on some systems.
+ If you don't want this version included, simply define "NO_SDL_GLEXT"
+ */
+#ifndef NO_SDL_GLEXT
+#if !defined(__glext_h_) && !defined(GL_GLEXT_LEGACY)
+#define __glext_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** License Applicability. Except to the extent portions of this file are
+** made subject to an alternative license as permitted in the SGI Free
+** Software License B, Version 1.1 (the "License"), the contents of this
+** file are subject only to the provisions of the License. You may not use
+** this file except in compliance with the License. You may obtain a copy
+** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
+** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
+**
+** http://oss.sgi.com/projects/FreeB
+**
+** Note that, as provided in the License, the Software is distributed on an
+** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
+** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
+** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
+** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
+**
+** Original Code. The Original Code is: OpenGL Sample Implementation,
+** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
+** Inc. The Original Code is Copyright (c) 1991-2004 Silicon Graphics, Inc.
+** Copyright in any portions created by third parties is as indicated
+** elsewhere herein. All Rights Reserved.
+**
+** Additional Notice Provisions: This software was created using the
+** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
+** not been independently verified as being compliant with the OpenGL(R)
+** version 1.2.1 Specification.
+*/
+
+#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
+#define WIN32_LEAN_AND_MEAN 1
+#include <windows.h>
+#endif
+
+#ifndef APIENTRY
+#define APIENTRY
+#endif
+#ifndef APIENTRYP
+#define APIENTRYP APIENTRY *
+#endif
+#ifndef GLAPI
+#define GLAPI extern
+#endif
+
+/*************************************************************/
+
+/* Header file version number, required by OpenGL ABI for Linux */
+/* glext.h last updated 2005/06/20 */
+/* Current version at http://oss.sgi.com/projects/ogl-sample/registry/ */
+#define GL_GLEXT_VERSION 29
+
+#ifndef GL_VERSION_1_2
+#define GL_UNSIGNED_BYTE_3_3_2 0x8032
+#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
+#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
+#define GL_UNSIGNED_INT_8_8_8_8 0x8035
+#define GL_UNSIGNED_INT_10_10_10_2 0x8036
+#define GL_RESCALE_NORMAL 0x803A
+#define GL_TEXTURE_BINDING_3D 0x806A
+#define GL_PACK_SKIP_IMAGES 0x806B
+#define GL_PACK_IMAGE_HEIGHT 0x806C
+#define GL_UNPACK_SKIP_IMAGES 0x806D
+#define GL_UNPACK_IMAGE_HEIGHT 0x806E
+#define GL_TEXTURE_3D 0x806F
+#define GL_PROXY_TEXTURE_3D 0x8070
+#define GL_TEXTURE_DEPTH 0x8071
+#define GL_TEXTURE_WRAP_R 0x8072
+#define GL_MAX_3D_TEXTURE_SIZE 0x8073
+#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
+#define GL_UNSIGNED_SHORT_5_6_5 0x8363
+#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
+#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
+#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
+#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
+#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
+#define GL_BGR 0x80E0
+#define GL_BGRA 0x80E1
+#define GL_MAX_ELEMENTS_VERTICES 0x80E8
+#define GL_MAX_ELEMENTS_INDICES 0x80E9
+#define GL_CLAMP_TO_EDGE 0x812F
+#define GL_TEXTURE_MIN_LOD 0x813A
+#define GL_TEXTURE_MAX_LOD 0x813B
+#define GL_TEXTURE_BASE_LEVEL 0x813C
+#define GL_TEXTURE_MAX_LEVEL 0x813D
+#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
+#define GL_SINGLE_COLOR 0x81F9
+#define GL_SEPARATE_SPECULAR_COLOR 0x81FA
+#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
+#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
+#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
+#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
+#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
+#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
+#endif
+
+#ifndef GL_ARB_imaging
+#define GL_CONSTANT_COLOR 0x8001
+#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
+#define GL_CONSTANT_ALPHA 0x8003
+#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
+#define GL_BLEND_COLOR 0x8005
+#define GL_FUNC_ADD 0x8006
+#define GL_MIN 0x8007
+#define GL_MAX 0x8008
+#define GL_BLEND_EQUATION 0x8009
+#define GL_FUNC_SUBTRACT 0x800A
+#define GL_FUNC_REVERSE_SUBTRACT 0x800B
+#define GL_CONVOLUTION_1D 0x8010
+#define GL_CONVOLUTION_2D 0x8011
+#define GL_SEPARABLE_2D 0x8012
+#define GL_CONVOLUTION_BORDER_MODE 0x8013
+#define GL_CONVOLUTION_FILTER_SCALE 0x8014
+#define GL_CONVOLUTION_FILTER_BIAS 0x8015
+#define GL_REDUCE 0x8016
+#define GL_CONVOLUTION_FORMAT 0x8017
+#define GL_CONVOLUTION_WIDTH 0x8018
+#define GL_CONVOLUTION_HEIGHT 0x8019
+#define GL_MAX_CONVOLUTION_WIDTH 0x801A
+#define GL_MAX_CONVOLUTION_HEIGHT 0x801B
+#define GL_POST_CONVOLUTION_RED_SCALE 0x801C
+#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
+#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
+#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
+#define GL_POST_CONVOLUTION_RED_BIAS 0x8020
+#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
+#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
+#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
+#define GL_HISTOGRAM 0x8024
+#define GL_PROXY_HISTOGRAM 0x8025
+#define GL_HISTOGRAM_WIDTH 0x8026
+#define GL_HISTOGRAM_FORMAT 0x8027
+#define GL_HISTOGRAM_RED_SIZE 0x8028
+#define GL_HISTOGRAM_GREEN_SIZE 0x8029
+#define GL_HISTOGRAM_BLUE_SIZE 0x802A
+#define GL_HISTOGRAM_ALPHA_SIZE 0x802B
+#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
+#define GL_HISTOGRAM_SINK 0x802D
+#define GL_MINMAX 0x802E
+#define GL_MINMAX_FORMAT 0x802F
+#define GL_MINMAX_SINK 0x8030
+#define GL_TABLE_TOO_LARGE 0x8031
+#define GL_COLOR_MATRIX 0x80B1
+#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
+#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
+#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
+#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
+#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
+#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
+#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
+#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
+#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
+#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
+#define GL_COLOR_TABLE 0x80D0
+#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
+#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
+#define GL_PROXY_COLOR_TABLE 0x80D3
+#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
+#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
+#define GL_COLOR_TABLE_SCALE 0x80D6
+#define GL_COLOR_TABLE_BIAS 0x80D7
+#define GL_COLOR_TABLE_FORMAT 0x80D8
+#define GL_COLOR_TABLE_WIDTH 0x80D9
+#define GL_COLOR_TABLE_RED_SIZE 0x80DA
+#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB
+#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC
+#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
+#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
+#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
+#define GL_CONSTANT_BORDER 0x8151
+#define GL_REPLICATE_BORDER 0x8153
+#define GL_CONVOLUTION_BORDER_COLOR 0x8154
+#endif
+
+#ifndef GL_VERSION_1_3
+#define GL_TEXTURE0 0x84C0
+#define GL_TEXTURE1 0x84C1
+#define GL_TEXTURE2 0x84C2
+#define GL_TEXTURE3 0x84C3
+#define GL_TEXTURE4 0x84C4
+#define GL_TEXTURE5 0x84C5
+#define GL_TEXTURE6 0x84C6
+#define GL_TEXTURE7 0x84C7
+#define GL_TEXTURE8 0x84C8
+#define GL_TEXTURE9 0x84C9
+#define GL_TEXTURE10 0x84CA
+#define GL_TEXTURE11 0x84CB
+#define GL_TEXTURE12 0x84CC
+#define GL_TEXTURE13 0x84CD
+#define GL_TEXTURE14 0x84CE
+#define GL_TEXTURE15 0x84CF
+#define GL_TEXTURE16 0x84D0
+#define GL_TEXTURE17 0x84D1
+#define GL_TEXTURE18 0x84D2
+#define GL_TEXTURE19 0x84D3
+#define GL_TEXTURE20 0x84D4
+#define GL_TEXTURE21 0x84D5
+#define GL_TEXTURE22 0x84D6
+#define GL_TEXTURE23 0x84D7
+#define GL_TEXTURE24 0x84D8
+#define GL_TEXTURE25 0x84D9
+#define GL_TEXTURE26 0x84DA
+#define GL_TEXTURE27 0x84DB
+#define GL_TEXTURE28 0x84DC
+#define GL_TEXTURE29 0x84DD
+#define GL_TEXTURE30 0x84DE
+#define GL_TEXTURE31 0x84DF
+#define GL_ACTIVE_TEXTURE 0x84E0
+#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
+#define GL_MAX_TEXTURE_UNITS 0x84E2
+#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
+#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
+#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
+#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
+#define GL_MULTISAMPLE 0x809D
+#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
+#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
+#define GL_SAMPLE_COVERAGE 0x80A0
+#define GL_SAMPLE_BUFFERS 0x80A8
+#define GL_SAMPLES 0x80A9
+#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
+#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
+#define GL_MULTISAMPLE_BIT 0x20000000
+#define GL_NORMAL_MAP 0x8511
+#define GL_REFLECTION_MAP 0x8512
+#define GL_TEXTURE_CUBE_MAP 0x8513
+#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
+#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
+#define GL_COMPRESSED_ALPHA 0x84E9
+#define GL_COMPRESSED_LUMINANCE 0x84EA
+#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
+#define GL_COMPRESSED_INTENSITY 0x84EC
+#define GL_COMPRESSED_RGB 0x84ED
+#define GL_COMPRESSED_RGBA 0x84EE
+#define GL_TEXTURE_COMPRESSION_HINT 0x84EF
+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
+#define GL_TEXTURE_COMPRESSED 0x86A1
+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
+#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
+#define GL_CLAMP_TO_BORDER 0x812D
+#define GL_COMBINE 0x8570
+#define GL_COMBINE_RGB 0x8571
+#define GL_COMBINE_ALPHA 0x8572
+#define GL_SOURCE0_RGB 0x8580
+#define GL_SOURCE1_RGB 0x8581
+#define GL_SOURCE2_RGB 0x8582
+#define GL_SOURCE0_ALPHA 0x8588
+#define GL_SOURCE1_ALPHA 0x8589
+#define GL_SOURCE2_ALPHA 0x858A
+#define GL_OPERAND0_RGB 0x8590
+#define GL_OPERAND1_RGB 0x8591
+#define GL_OPERAND2_RGB 0x8592
+#define GL_OPERAND0_ALPHA 0x8598
+#define GL_OPERAND1_ALPHA 0x8599
+#define GL_OPERAND2_ALPHA 0x859A
+#define GL_RGB_SCALE 0x8573
+#define GL_ADD_SIGNED 0x8574
+#define GL_INTERPOLATE 0x8575
+#define GL_SUBTRACT 0x84E7
+#define GL_CONSTANT 0x8576
+#define GL_PRIMARY_COLOR 0x8577
+#define GL_PREVIOUS 0x8578
+#define GL_DOT3_RGB 0x86AE
+#define GL_DOT3_RGBA 0x86AF
+#endif
+
+#ifndef GL_VERSION_1_4
+#define GL_BLEND_DST_RGB 0x80C8
+#define GL_BLEND_SRC_RGB 0x80C9
+#define GL_BLEND_DST_ALPHA 0x80CA
+#define GL_BLEND_SRC_ALPHA 0x80CB
+#define GL_POINT_SIZE_MIN 0x8126
+#define GL_POINT_SIZE_MAX 0x8127
+#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128
+#define GL_POINT_DISTANCE_ATTENUATION 0x8129
+#define GL_GENERATE_MIPMAP 0x8191
+#define GL_GENERATE_MIPMAP_HINT 0x8192
+#define GL_DEPTH_COMPONENT16 0x81A5
+#define GL_DEPTH_COMPONENT24 0x81A6
+#define GL_DEPTH_COMPONENT32 0x81A7
+#define GL_MIRRORED_REPEAT 0x8370
+#define GL_FOG_COORDINATE_SOURCE 0x8450
+#define GL_FOG_COORDINATE 0x8451
+#define GL_FRAGMENT_DEPTH 0x8452
+#define GL_CURRENT_FOG_COORDINATE 0x8453
+#define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454
+#define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455
+#define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456
+#define GL_FOG_COORDINATE_ARRAY 0x8457
+#define GL_COLOR_SUM 0x8458
+#define GL_CURRENT_SECONDARY_COLOR 0x8459
+#define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A
+#define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B
+#define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C
+#define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D
+#define GL_SECONDARY_COLOR_ARRAY 0x845E
+#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD
+#define GL_TEXTURE_FILTER_CONTROL 0x8500
+#define GL_TEXTURE_LOD_BIAS 0x8501
+#define GL_INCR_WRAP 0x8507
+#define GL_DECR_WRAP 0x8508
+#define GL_TEXTURE_DEPTH_SIZE 0x884A
+#define GL_DEPTH_TEXTURE_MODE 0x884B
+#define GL_TEXTURE_COMPARE_MODE 0x884C
+#define GL_TEXTURE_COMPARE_FUNC 0x884D
+#define GL_COMPARE_R_TO_TEXTURE 0x884E
+#endif
+
+#ifndef GL_VERSION_1_5
+#define GL_BUFFER_SIZE 0x8764
+#define GL_BUFFER_USAGE 0x8765
+#define GL_QUERY_COUNTER_BITS 0x8864
+#define GL_CURRENT_QUERY 0x8865
+#define GL_QUERY_RESULT 0x8866
+#define GL_QUERY_RESULT_AVAILABLE 0x8867
+#define GL_ARRAY_BUFFER 0x8892
+#define GL_ELEMENT_ARRAY_BUFFER 0x8893
+#define GL_ARRAY_BUFFER_BINDING 0x8894
+#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
+#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896
+#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897
+#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898
+#define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899
+#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A
+#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B
+#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C
+#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D
+#define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E
+#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
+#define GL_READ_ONLY 0x88B8
+#define GL_WRITE_ONLY 0x88B9
+#define GL_READ_WRITE 0x88BA
+#define GL_BUFFER_ACCESS 0x88BB
+#define GL_BUFFER_MAPPED 0x88BC
+#define GL_BUFFER_MAP_POINTER 0x88BD
+#define GL_STREAM_DRAW 0x88E0
+#define GL_STREAM_READ 0x88E1
+#define GL_STREAM_COPY 0x88E2
+#define GL_STATIC_DRAW 0x88E4
+#define GL_STATIC_READ 0x88E5
+#define GL_STATIC_COPY 0x88E6
+#define GL_DYNAMIC_DRAW 0x88E8
+#define GL_DYNAMIC_READ 0x88E9
+#define GL_DYNAMIC_COPY 0x88EA
+#define GL_SAMPLES_PASSED 0x8914
+#define GL_FOG_COORD_SRC GL_FOG_COORDINATE_SOURCE
+#define GL_FOG_COORD GL_FOG_COORDINATE
+#define GL_CURRENT_FOG_COORD GL_CURRENT_FOG_COORDINATE
+#define GL_FOG_COORD_ARRAY_TYPE GL_FOG_COORDINATE_ARRAY_TYPE
+#define GL_FOG_COORD_ARRAY_STRIDE GL_FOG_COORDINATE_ARRAY_STRIDE
+#define GL_FOG_COORD_ARRAY_POINTER GL_FOG_COORDINATE_ARRAY_POINTER
+#define GL_FOG_COORD_ARRAY GL_FOG_COORDINATE_ARRAY
+#define GL_FOG_COORD_ARRAY_BUFFER_BINDING GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING
+#define GL_SRC0_RGB GL_SOURCE0_RGB
+#define GL_SRC1_RGB GL_SOURCE1_RGB
+#define GL_SRC2_RGB GL_SOURCE2_RGB
+#define GL_SRC0_ALPHA GL_SOURCE0_ALPHA
+#define GL_SRC1_ALPHA GL_SOURCE1_ALPHA
+#define GL_SRC2_ALPHA GL_SOURCE2_ALPHA
+#endif
+
+#ifndef GL_VERSION_2_0
+#define GL_BLEND_EQUATION_RGB GL_BLEND_EQUATION
+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
+#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
+#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
+#define GL_CURRENT_VERTEX_ATTRIB 0x8626
+#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642
+#define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643
+#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
+#define GL_STENCIL_BACK_FUNC 0x8800
+#define GL_STENCIL_BACK_FAIL 0x8801
+#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
+#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
+#define GL_MAX_DRAW_BUFFERS 0x8824
+#define GL_DRAW_BUFFER0 0x8825
+#define GL_DRAW_BUFFER1 0x8826
+#define GL_DRAW_BUFFER2 0x8827
+#define GL_DRAW_BUFFER3 0x8828
+#define GL_DRAW_BUFFER4 0x8829
+#define GL_DRAW_BUFFER5 0x882A
+#define GL_DRAW_BUFFER6 0x882B
+#define GL_DRAW_BUFFER7 0x882C
+#define GL_DRAW_BUFFER8 0x882D
+#define GL_DRAW_BUFFER9 0x882E
+#define GL_DRAW_BUFFER10 0x882F
+#define GL_DRAW_BUFFER11 0x8830
+#define GL_DRAW_BUFFER12 0x8831
+#define GL_DRAW_BUFFER13 0x8832
+#define GL_DRAW_BUFFER14 0x8833
+#define GL_DRAW_BUFFER15 0x8834
+#define GL_BLEND_EQUATION_ALPHA 0x883D
+#define GL_POINT_SPRITE 0x8861
+#define GL_COORD_REPLACE 0x8862
+#define GL_MAX_VERTEX_ATTRIBS 0x8869
+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
+#define GL_MAX_TEXTURE_COORDS 0x8871
+#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
+#define GL_FRAGMENT_SHADER 0x8B30
+#define GL_VERTEX_SHADER 0x8B31
+#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
+#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A
+#define GL_MAX_VARYING_FLOATS 0x8B4B
+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
+#define GL_SHADER_TYPE 0x8B4F
+#define GL_FLOAT_VEC2 0x8B50
+#define GL_FLOAT_VEC3 0x8B51
+#define GL_FLOAT_VEC4 0x8B52
+#define GL_INT_VEC2 0x8B53
+#define GL_INT_VEC3 0x8B54
+#define GL_INT_VEC4 0x8B55
+#define GL_BOOL 0x8B56
+#define GL_BOOL_VEC2 0x8B57
+#define GL_BOOL_VEC3 0x8B58
+#define GL_BOOL_VEC4 0x8B59
+#define GL_FLOAT_MAT2 0x8B5A
+#define GL_FLOAT_MAT3 0x8B5B
+#define GL_FLOAT_MAT4 0x8B5C
+#define GL_SAMPLER_1D 0x8B5D
+#define GL_SAMPLER_2D 0x8B5E
+#define GL_SAMPLER_3D 0x8B5F
+#define GL_SAMPLER_CUBE 0x8B60
+#define GL_SAMPLER_1D_SHADOW 0x8B61
+#define GL_SAMPLER_2D_SHADOW 0x8B62
+#define GL_DELETE_STATUS 0x8B80
+#define GL_COMPILE_STATUS 0x8B81
+#define GL_LINK_STATUS 0x8B82
+#define GL_VALIDATE_STATUS 0x8B83
+#define GL_INFO_LOG_LENGTH 0x8B84
+#define GL_ATTACHED_SHADERS 0x8B85
+#define GL_ACTIVE_UNIFORMS 0x8B86
+#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
+#define GL_SHADER_SOURCE_LENGTH 0x8B88
+#define GL_ACTIVE_ATTRIBUTES 0x8B89
+#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
+#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
+#define GL_CURRENT_PROGRAM 0x8B8D
+#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0
+#define GL_LOWER_LEFT 0x8CA1
+#define GL_UPPER_LEFT 0x8CA2
+#define GL_STENCIL_BACK_REF 0x8CA3
+#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
+#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
+#endif
+
+#ifndef GL_ARB_multitexture
+#define GL_TEXTURE0_ARB 0x84C0
+#define GL_TEXTURE1_ARB 0x84C1
+#define GL_TEXTURE2_ARB 0x84C2
+#define GL_TEXTURE3_ARB 0x84C3
+#define GL_TEXTURE4_ARB 0x84C4
+#define GL_TEXTURE5_ARB 0x84C5
+#define GL_TEXTURE6_ARB 0x84C6
+#define GL_TEXTURE7_ARB 0x84C7
+#define GL_TEXTURE8_ARB 0x84C8
+#define GL_TEXTURE9_ARB 0x84C9
+#define GL_TEXTURE10_ARB 0x84CA
+#define GL_TEXTURE11_ARB 0x84CB
+#define GL_TEXTURE12_ARB 0x84CC
+#define GL_TEXTURE13_ARB 0x84CD
+#define GL_TEXTURE14_ARB 0x84CE
+#define GL_TEXTURE15_ARB 0x84CF
+#define GL_TEXTURE16_ARB 0x84D0
+#define GL_TEXTURE17_ARB 0x84D1
+#define GL_TEXTURE18_ARB 0x84D2
+#define GL_TEXTURE19_ARB 0x84D3
+#define GL_TEXTURE20_ARB 0x84D4
+#define GL_TEXTURE21_ARB 0x84D5
+#define GL_TEXTURE22_ARB 0x84D6
+#define GL_TEXTURE23_ARB 0x84D7
+#define GL_TEXTURE24_ARB 0x84D8
+#define GL_TEXTURE25_ARB 0x84D9
+#define GL_TEXTURE26_ARB 0x84DA
+#define GL_TEXTURE27_ARB 0x84DB
+#define GL_TEXTURE28_ARB 0x84DC
+#define GL_TEXTURE29_ARB 0x84DD
+#define GL_TEXTURE30_ARB 0x84DE
+#define GL_TEXTURE31_ARB 0x84DF
+#define GL_ACTIVE_TEXTURE_ARB 0x84E0
+#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
+#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
+#endif
+
+#ifndef GL_ARB_transpose_matrix
+#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3
+#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4
+#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5
+#define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6
+#endif
+
+#ifndef GL_ARB_multisample
+#define GL_MULTISAMPLE_ARB 0x809D
+#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E
+#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F
+#define GL_SAMPLE_COVERAGE_ARB 0x80A0
+#define GL_SAMPLE_BUFFERS_ARB 0x80A8
+#define GL_SAMPLES_ARB 0x80A9
+#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA
+#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB
+#define GL_MULTISAMPLE_BIT_ARB 0x20000000
+#endif
+
+#ifndef GL_ARB_texture_env_add
+#endif
+
+#ifndef GL_ARB_texture_cube_map
+#define GL_NORMAL_MAP_ARB 0x8511
+#define GL_REFLECTION_MAP_ARB 0x8512
+#define GL_TEXTURE_CUBE_MAP_ARB 0x8513
+#define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A
+#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B
+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C
+#endif
+
+#ifndef GL_ARB_texture_compression
+#define GL_COMPRESSED_ALPHA_ARB 0x84E9
+#define GL_COMPRESSED_LUMINANCE_ARB 0x84EA
+#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB
+#define GL_COMPRESSED_INTENSITY_ARB 0x84EC
+#define GL_COMPRESSED_RGB_ARB 0x84ED
+#define GL_COMPRESSED_RGBA_ARB 0x84EE
+#define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF
+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0
+#define GL_TEXTURE_COMPRESSED_ARB 0x86A1
+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2
+#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3
+#endif
+
+#ifndef GL_ARB_texture_border_clamp
+#define GL_CLAMP_TO_BORDER_ARB 0x812D
+#endif
+
+#ifndef GL_ARB_point_parameters
+#define GL_POINT_SIZE_MIN_ARB 0x8126
+#define GL_POINT_SIZE_MAX_ARB 0x8127
+#define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128
+#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129
+#endif
+
+#ifndef GL_ARB_vertex_blend
+#define GL_MAX_VERTEX_UNITS_ARB 0x86A4
+#define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5
+#define GL_WEIGHT_SUM_UNITY_ARB 0x86A6
+#define GL_VERTEX_BLEND_ARB 0x86A7
+#define GL_CURRENT_WEIGHT_ARB 0x86A8
+#define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9
+#define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA
+#define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB
+#define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC
+#define GL_WEIGHT_ARRAY_ARB 0x86AD
+#define GL_MODELVIEW0_ARB 0x1700
+#define GL_MODELVIEW1_ARB 0x850A
+#define GL_MODELVIEW2_ARB 0x8722
+#define GL_MODELVIEW3_ARB 0x8723
+#define GL_MODELVIEW4_ARB 0x8724
+#define GL_MODELVIEW5_ARB 0x8725
+#define GL_MODELVIEW6_ARB 0x8726
+#define GL_MODELVIEW7_ARB 0x8727
+#define GL_MODELVIEW8_ARB 0x8728
+#define GL_MODELVIEW9_ARB 0x8729
+#define GL_MODELVIEW10_ARB 0x872A
+#define GL_MODELVIEW11_ARB 0x872B
+#define GL_MODELVIEW12_ARB 0x872C
+#define GL_MODELVIEW13_ARB 0x872D
+#define GL_MODELVIEW14_ARB 0x872E
+#define GL_MODELVIEW15_ARB 0x872F
+#define GL_MODELVIEW16_ARB 0x8730
+#define GL_MODELVIEW17_ARB 0x8731
+#define GL_MODELVIEW18_ARB 0x8732
+#define GL_MODELVIEW19_ARB 0x8733
+#define GL_MODELVIEW20_ARB 0x8734
+#define GL_MODELVIEW21_ARB 0x8735
+#define GL_MODELVIEW22_ARB 0x8736
+#define GL_MODELVIEW23_ARB 0x8737
+#define GL_MODELVIEW24_ARB 0x8738
+#define GL_MODELVIEW25_ARB 0x8739
+#define GL_MODELVIEW26_ARB 0x873A
+#define GL_MODELVIEW27_ARB 0x873B
+#define GL_MODELVIEW28_ARB 0x873C
+#define GL_MODELVIEW29_ARB 0x873D
+#define GL_MODELVIEW30_ARB 0x873E
+#define GL_MODELVIEW31_ARB 0x873F
+#endif
+
+#ifndef GL_ARB_matrix_palette
+#define GL_MATRIX_PALETTE_ARB 0x8840
+#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841
+#define GL_MAX_PALETTE_MATRICES_ARB 0x8842
+#define GL_CURRENT_PALETTE_MATRIX_ARB 0x8843
+#define GL_MATRIX_INDEX_ARRAY_ARB 0x8844
+#define GL_CURRENT_MATRIX_INDEX_ARB 0x8845
+#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846
+#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847
+#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848
+#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849
+#endif
+
+#ifndef GL_ARB_texture_env_combine
+#define GL_COMBINE_ARB 0x8570
+#define GL_COMBINE_RGB_ARB 0x8571
+#define GL_COMBINE_ALPHA_ARB 0x8572
+#define GL_SOURCE0_RGB_ARB 0x8580
+#define GL_SOURCE1_RGB_ARB 0x8581
+#define GL_SOURCE2_RGB_ARB 0x8582
+#define GL_SOURCE0_ALPHA_ARB 0x8588
+#define GL_SOURCE1_ALPHA_ARB 0x8589
+#define GL_SOURCE2_ALPHA_ARB 0x858A
+#define GL_OPERAND0_RGB_ARB 0x8590
+#define GL_OPERAND1_RGB_ARB 0x8591
+#define GL_OPERAND2_RGB_ARB 0x8592
+#define GL_OPERAND0_ALPHA_ARB 0x8598
+#define GL_OPERAND1_ALPHA_ARB 0x8599
+#define GL_OPERAND2_ALPHA_ARB 0x859A
+#define GL_RGB_SCALE_ARB 0x8573
+#define GL_ADD_SIGNED_ARB 0x8574
+#define GL_INTERPOLATE_ARB 0x8575
+#define GL_SUBTRACT_ARB 0x84E7
+#define GL_CONSTANT_ARB 0x8576
+#define GL_PRIMARY_COLOR_ARB 0x8577
+#define GL_PREVIOUS_ARB 0x8578
+#endif
+
+#ifndef GL_ARB_texture_env_crossbar
+#endif
+
+#ifndef GL_ARB_texture_env_dot3
+#define GL_DOT3_RGB_ARB 0x86AE
+#define GL_DOT3_RGBA_ARB 0x86AF
+#endif
+
+#ifndef GL_ARB_texture_mirrored_repeat
+#define GL_MIRRORED_REPEAT_ARB 0x8370
+#endif
+
+#ifndef GL_ARB_depth_texture
+#define GL_DEPTH_COMPONENT16_ARB 0x81A5
+#define GL_DEPTH_COMPONENT24_ARB 0x81A6
+#define GL_DEPTH_COMPONENT32_ARB 0x81A7
+#define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A
+#define GL_DEPTH_TEXTURE_MODE_ARB 0x884B
+#endif
+
+#ifndef GL_ARB_shadow
+#define GL_TEXTURE_COMPARE_MODE_ARB 0x884C
+#define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D
+#define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E
+#endif
+
+#ifndef GL_ARB_shadow_ambient
+#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF
+#endif
+
+#ifndef GL_ARB_window_pos
+#endif
+
+#ifndef GL_ARB_vertex_program
+#define GL_COLOR_SUM_ARB 0x8458
+#define GL_VERTEX_PROGRAM_ARB 0x8620
+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622
+#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623
+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624
+#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625
+#define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626
+#define GL_PROGRAM_LENGTH_ARB 0x8627
+#define GL_PROGRAM_STRING_ARB 0x8628
+#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E
+#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F
+#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640
+#define GL_CURRENT_MATRIX_ARB 0x8641
+#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642
+#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643
+#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645
+#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B
+#define GL_PROGRAM_BINDING_ARB 0x8677
+#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869
+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A
+#define GL_PROGRAM_ERROR_STRING_ARB 0x8874
+#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875
+#define GL_PROGRAM_FORMAT_ARB 0x8876
+#define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0
+#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1
+#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2
+#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3
+#define GL_PROGRAM_TEMPORARIES_ARB 0x88A4
+#define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5
+#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6
+#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7
+#define GL_PROGRAM_PARAMETERS_ARB 0x88A8
+#define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9
+#define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA
+#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB
+#define GL_PROGRAM_ATTRIBS_ARB 0x88AC
+#define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD
+#define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE
+#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF
+#define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0
+#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1
+#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2
+#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3
+#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4
+#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5
+#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6
+#define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7
+#define GL_MATRIX0_ARB 0x88C0
+#define GL_MATRIX1_ARB 0x88C1
+#define GL_MATRIX2_ARB 0x88C2
+#define GL_MATRIX3_ARB 0x88C3
+#define GL_MATRIX4_ARB 0x88C4
+#define GL_MATRIX5_ARB 0x88C5
+#define GL_MATRIX6_ARB 0x88C6
+#define GL_MATRIX7_ARB 0x88C7
+#define GL_MATRIX8_ARB 0x88C8
+#define GL_MATRIX9_ARB 0x88C9
+#define GL_MATRIX10_ARB 0x88CA
+#define GL_MATRIX11_ARB 0x88CB
+#define GL_MATRIX12_ARB 0x88CC
+#define GL_MATRIX13_ARB 0x88CD
+#define GL_MATRIX14_ARB 0x88CE
+#define GL_MATRIX15_ARB 0x88CF
+#define GL_MATRIX16_ARB 0x88D0
+#define GL_MATRIX17_ARB 0x88D1
+#define GL_MATRIX18_ARB 0x88D2
+#define GL_MATRIX19_ARB 0x88D3
+#define GL_MATRIX20_ARB 0x88D4
+#define GL_MATRIX21_ARB 0x88D5
+#define GL_MATRIX22_ARB 0x88D6
+#define GL_MATRIX23_ARB 0x88D7
+#define GL_MATRIX24_ARB 0x88D8
+#define GL_MATRIX25_ARB 0x88D9
+#define GL_MATRIX26_ARB 0x88DA
+#define GL_MATRIX27_ARB 0x88DB
+#define GL_MATRIX28_ARB 0x88DC
+#define GL_MATRIX29_ARB 0x88DD
+#define GL_MATRIX30_ARB 0x88DE
+#define GL_MATRIX31_ARB 0x88DF
+#endif
+
+#ifndef GL_ARB_fragment_program
+#define GL_FRAGMENT_PROGRAM_ARB 0x8804
+#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805
+#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806
+#define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807
+#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808
+#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809
+#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A
+#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B
+#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C
+#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D
+#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E
+#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F
+#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810
+#define GL_MAX_TEXTURE_COORDS_ARB 0x8871
+#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872
+#endif
+
+#ifndef GL_ARB_vertex_buffer_object
+#define GL_BUFFER_SIZE_ARB 0x8764
+#define GL_BUFFER_USAGE_ARB 0x8765
+#define GL_ARRAY_BUFFER_ARB 0x8892
+#define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893
+#define GL_ARRAY_BUFFER_BINDING_ARB 0x8894
+#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895
+#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896
+#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897
+#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898
+#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899
+#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A
+#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B
+#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C
+#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D
+#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E
+#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F
+#define GL_READ_ONLY_ARB 0x88B8
+#define GL_WRITE_ONLY_ARB 0x88B9
+#define GL_READ_WRITE_ARB 0x88BA
+#define GL_BUFFER_ACCESS_ARB 0x88BB
+#define GL_BUFFER_MAPPED_ARB 0x88BC
+#define GL_BUFFER_MAP_POINTER_ARB 0x88BD
+#define GL_STREAM_DRAW_ARB 0x88E0
+#define GL_STREAM_READ_ARB 0x88E1
+#define GL_STREAM_COPY_ARB 0x88E2
+#define GL_STATIC_DRAW_ARB 0x88E4
+#define GL_STATIC_READ_ARB 0x88E5
+#define GL_STATIC_COPY_ARB 0x88E6
+#define GL_DYNAMIC_DRAW_ARB 0x88E8
+#define GL_DYNAMIC_READ_ARB 0x88E9
+#define GL_DYNAMIC_COPY_ARB 0x88EA
+#endif
+
+#ifndef GL_ARB_occlusion_query
+#define GL_QUERY_COUNTER_BITS_ARB 0x8864
+#define GL_CURRENT_QUERY_ARB 0x8865
+#define GL_QUERY_RESULT_ARB 0x8866
+#define GL_QUERY_RESULT_AVAILABLE_ARB 0x8867
+#define GL_SAMPLES_PASSED_ARB 0x8914
+#endif
+
+#ifndef GL_ARB_shader_objects
+#define GL_PROGRAM_OBJECT_ARB 0x8B40
+#define GL_SHADER_OBJECT_ARB 0x8B48
+#define GL_OBJECT_TYPE_ARB 0x8B4E
+#define GL_OBJECT_SUBTYPE_ARB 0x8B4F
+#define GL_FLOAT_VEC2_ARB 0x8B50
+#define GL_FLOAT_VEC3_ARB 0x8B51
+#define GL_FLOAT_VEC4_ARB 0x8B52
+#define GL_INT_VEC2_ARB 0x8B53
+#define GL_INT_VEC3_ARB 0x8B54
+#define GL_INT_VEC4_ARB 0x8B55
+#define GL_BOOL_ARB 0x8B56
+#define GL_BOOL_VEC2_ARB 0x8B57
+#define GL_BOOL_VEC3_ARB 0x8B58
+#define GL_BOOL_VEC4_ARB 0x8B59
+#define GL_FLOAT_MAT2_ARB 0x8B5A
+#define GL_FLOAT_MAT3_ARB 0x8B5B
+#define GL_FLOAT_MAT4_ARB 0x8B5C
+#define GL_SAMPLER_1D_ARB 0x8B5D
+#define GL_SAMPLER_2D_ARB 0x8B5E
+#define GL_SAMPLER_3D_ARB 0x8B5F
+#define GL_SAMPLER_CUBE_ARB 0x8B60
+#define GL_SAMPLER_1D_SHADOW_ARB 0x8B61
+#define GL_SAMPLER_2D_SHADOW_ARB 0x8B62
+#define GL_SAMPLER_2D_RECT_ARB 0x8B63
+#define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64
+#define GL_OBJECT_DELETE_STATUS_ARB 0x8B80
+#define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81
+#define GL_OBJECT_LINK_STATUS_ARB 0x8B82
+#define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83
+#define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84
+#define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85
+#define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86
+#define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87
+#define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88
+#endif
+
+#ifndef GL_ARB_vertex_shader
+#define GL_VERTEX_SHADER_ARB 0x8B31
+#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A
+#define GL_MAX_VARYING_FLOATS_ARB 0x8B4B
+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C
+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D
+#define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89
+#define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A
+#endif
+
+#ifndef GL_ARB_fragment_shader
+#define GL_FRAGMENT_SHADER_ARB 0x8B30
+#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49
+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B
+#endif
+
+#ifndef GL_ARB_shading_language_100
+#define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C
+#endif
+
+#ifndef GL_ARB_texture_non_power_of_two
+#endif
+
+#ifndef GL_ARB_point_sprite
+#define GL_POINT_SPRITE_ARB 0x8861
+#define GL_COORD_REPLACE_ARB 0x8862
+#endif
+
+#ifndef GL_ARB_fragment_program_shadow
+#endif
+
+#ifndef GL_ARB_draw_buffers
+#define GL_MAX_DRAW_BUFFERS_ARB 0x8824
+#define GL_DRAW_BUFFER0_ARB 0x8825
+#define GL_DRAW_BUFFER1_ARB 0x8826
+#define GL_DRAW_BUFFER2_ARB 0x8827
+#define GL_DRAW_BUFFER3_ARB 0x8828
+#define GL_DRAW_BUFFER4_ARB 0x8829
+#define GL_DRAW_BUFFER5_ARB 0x882A
+#define GL_DRAW_BUFFER6_ARB 0x882B
+#define GL_DRAW_BUFFER7_ARB 0x882C
+#define GL_DRAW_BUFFER8_ARB 0x882D
+#define GL_DRAW_BUFFER9_ARB 0x882E
+#define GL_DRAW_BUFFER10_ARB 0x882F
+#define GL_DRAW_BUFFER11_ARB 0x8830
+#define GL_DRAW_BUFFER12_ARB 0x8831
+#define GL_DRAW_BUFFER13_ARB 0x8832
+#define GL_DRAW_BUFFER14_ARB 0x8833
+#define GL_DRAW_BUFFER15_ARB 0x8834
+#endif
+
+#ifndef GL_ARB_texture_rectangle
+#define GL_TEXTURE_RECTANGLE_ARB 0x84F5
+#define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6
+#define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7
+#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8
+#endif
+
+#ifndef GL_ARB_color_buffer_float
+#define GL_RGBA_FLOAT_MODE_ARB 0x8820
+#define GL_CLAMP_VERTEX_COLOR_ARB 0x891A
+#define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B
+#define GL_CLAMP_READ_COLOR_ARB 0x891C
+#define GL_FIXED_ONLY_ARB 0x891D
+#endif
+
+#ifndef GL_ARB_half_float_pixel
+#define GL_HALF_FLOAT_ARB 0x140B
+#endif
+
+#ifndef GL_ARB_texture_float
+#define GL_TEXTURE_RED_TYPE_ARB 0x8C10
+#define GL_TEXTURE_GREEN_TYPE_ARB 0x8C11
+#define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12
+#define GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13
+#define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14
+#define GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15
+#define GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16
+#define GL_UNSIGNED_NORMALIZED_ARB 0x8C17
+#define GL_RGBA32F_ARB 0x8814
+#define GL_RGB32F_ARB 0x8815
+#define GL_ALPHA32F_ARB 0x8816
+#define GL_INTENSITY32F_ARB 0x8817
+#define GL_LUMINANCE32F_ARB 0x8818
+#define GL_LUMINANCE_ALPHA32F_ARB 0x8819
+#define GL_RGBA16F_ARB 0x881A
+#define GL_RGB16F_ARB 0x881B
+#define GL_ALPHA16F_ARB 0x881C
+#define GL_INTENSITY16F_ARB 0x881D
+#define GL_LUMINANCE16F_ARB 0x881E
+#define GL_LUMINANCE_ALPHA16F_ARB 0x881F
+#endif
+
+#ifndef GL_ARB_pixel_buffer_object
+#define GL_PIXEL_PACK_BUFFER_ARB 0x88EB
+#define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC
+#define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED
+#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF
+#endif
+
+#ifndef GL_EXT_abgr
+#define GL_ABGR_EXT 0x8000
+#endif
+
+#ifndef GL_EXT_blend_color
+#define GL_CONSTANT_COLOR_EXT 0x8001
+#define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002
+#define GL_CONSTANT_ALPHA_EXT 0x8003
+#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004
+#define GL_BLEND_COLOR_EXT 0x8005
+#endif
+
+#ifndef GL_EXT_polygon_offset
+#define GL_POLYGON_OFFSET_EXT 0x8037
+#define GL_POLYGON_OFFSET_FACTOR_EXT 0x8038
+#define GL_POLYGON_OFFSET_BIAS_EXT 0x8039
+#endif
+
+#ifndef GL_EXT_texture
+#define GL_ALPHA4_EXT 0x803B
+#define GL_ALPHA8_EXT 0x803C
+#define GL_ALPHA12_EXT 0x803D
+#define GL_ALPHA16_EXT 0x803E
+#define GL_LUMINANCE4_EXT 0x803F
+#define GL_LUMINANCE8_EXT 0x8040
+#define GL_LUMINANCE12_EXT 0x8041
+#define GL_LUMINANCE16_EXT 0x8042
+#define GL_LUMINANCE4_ALPHA4_EXT 0x8043
+#define GL_LUMINANCE6_ALPHA2_EXT 0x8044
+#define GL_LUMINANCE8_ALPHA8_EXT 0x8045
+#define GL_LUMINANCE12_ALPHA4_EXT 0x8046
+#define GL_LUMINANCE12_ALPHA12_EXT 0x8047
+#define GL_LUMINANCE16_ALPHA16_EXT 0x8048
+#define GL_INTENSITY_EXT 0x8049
+#define GL_INTENSITY4_EXT 0x804A
+#define GL_INTENSITY8_EXT 0x804B
+#define GL_INTENSITY12_EXT 0x804C
+#define GL_INTENSITY16_EXT 0x804D
+#define GL_RGB2_EXT 0x804E
+#define GL_RGB4_EXT 0x804F
+#define GL_RGB5_EXT 0x8050
+#define GL_RGB8_EXT 0x8051
+#define GL_RGB10_EXT 0x8052
+#define GL_RGB12_EXT 0x8053
+#define GL_RGB16_EXT 0x8054
+#define GL_RGBA2_EXT 0x8055
+#define GL_RGBA4_EXT 0x8056
+#define GL_RGB5_A1_EXT 0x8057
+#define GL_RGBA8_EXT 0x8058
+#define GL_RGB10_A2_EXT 0x8059
+#define GL_RGBA12_EXT 0x805A
+#define GL_RGBA16_EXT 0x805B
+#define GL_TEXTURE_RED_SIZE_EXT 0x805C
+#define GL_TEXTURE_GREEN_SIZE_EXT 0x805D
+#define GL_TEXTURE_BLUE_SIZE_EXT 0x805E
+#define GL_TEXTURE_ALPHA_SIZE_EXT 0x805F
+#define GL_TEXTURE_LUMINANCE_SIZE_EXT 0x8060
+#define GL_TEXTURE_INTENSITY_SIZE_EXT 0x8061
+#define GL_REPLACE_EXT 0x8062
+#define GL_PROXY_TEXTURE_1D_EXT 0x8063
+#define GL_PROXY_TEXTURE_2D_EXT 0x8064
+#define GL_TEXTURE_TOO_LARGE_EXT 0x8065
+#endif
+
+#ifndef GL_EXT_texture3D
+#define GL_PACK_SKIP_IMAGES_EXT 0x806B
+#define GL_PACK_IMAGE_HEIGHT_EXT 0x806C
+#define GL_UNPACK_SKIP_IMAGES_EXT 0x806D
+#define GL_UNPACK_IMAGE_HEIGHT_EXT 0x806E
+#define GL_TEXTURE_3D_EXT 0x806F
+#define GL_PROXY_TEXTURE_3D_EXT 0x8070
+#define GL_TEXTURE_DEPTH_EXT 0x8071
+#define GL_TEXTURE_WRAP_R_EXT 0x8072
+#define GL_MAX_3D_TEXTURE_SIZE_EXT 0x8073
+#endif
+
+#ifndef GL_SGIS_texture_filter4
+#define GL_FILTER4_SGIS 0x8146
+#define GL_TEXTURE_FILTER4_SIZE_SGIS 0x8147
+#endif
+
+#ifndef GL_EXT_subtexture
+#endif
+
+#ifndef GL_EXT_copy_texture
+#endif
+
+#ifndef GL_EXT_histogram
+#define GL_HISTOGRAM_EXT 0x8024
+#define GL_PROXY_HISTOGRAM_EXT 0x8025
+#define GL_HISTOGRAM_WIDTH_EXT 0x8026
+#define GL_HISTOGRAM_FORMAT_EXT 0x8027
+#define GL_HISTOGRAM_RED_SIZE_EXT 0x8028
+#define GL_HISTOGRAM_GREEN_SIZE_EXT 0x8029
+#define GL_HISTOGRAM_BLUE_SIZE_EXT 0x802A
+#define GL_HISTOGRAM_ALPHA_SIZE_EXT 0x802B
+#define GL_HISTOGRAM_LUMINANCE_SIZE_EXT 0x802C
+#define GL_HISTOGRAM_SINK_EXT 0x802D
+#define GL_MINMAX_EXT 0x802E
+#define GL_MINMAX_FORMAT_EXT 0x802F
+#define GL_MINMAX_SINK_EXT 0x8030
+#define GL_TABLE_TOO_LARGE_EXT 0x8031
+#endif
+
+#ifndef GL_EXT_convolution
+#define GL_CONVOLUTION_1D_EXT 0x8010
+#define GL_CONVOLUTION_2D_EXT 0x8011
+#define GL_SEPARABLE_2D_EXT 0x8012
+#define GL_CONVOLUTION_BORDER_MODE_EXT 0x8013
+#define GL_CONVOLUTION_FILTER_SCALE_EXT 0x8014
+#define GL_CONVOLUTION_FILTER_BIAS_EXT 0x8015
+#define GL_REDUCE_EXT 0x8016
+#define GL_CONVOLUTION_FORMAT_EXT 0x8017
+#define GL_CONVOLUTION_WIDTH_EXT 0x8018
+#define GL_CONVOLUTION_HEIGHT_EXT 0x8019
+#define GL_MAX_CONVOLUTION_WIDTH_EXT 0x801A
+#define GL_MAX_CONVOLUTION_HEIGHT_EXT 0x801B
+#define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C
+#define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D
+#define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E
+#define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F
+#define GL_POST_CONVOLUTION_RED_BIAS_EXT 0x8020
+#define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021
+#define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022
+#define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023
+#endif
+
+#ifndef GL_SGI_color_matrix
+#define GL_COLOR_MATRIX_SGI 0x80B1
+#define GL_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B2
+#define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3
+#define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4
+#define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5
+#define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6
+#define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7
+#define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8
+#define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9
+#define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA
+#define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB
+#endif
+
+#ifndef GL_SGI_color_table
+#define GL_COLOR_TABLE_SGI 0x80D0
+#define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1
+#define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2
+#define GL_PROXY_COLOR_TABLE_SGI 0x80D3
+#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4
+#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5
+#define GL_COLOR_TABLE_SCALE_SGI 0x80D6
+#define GL_COLOR_TABLE_BIAS_SGI 0x80D7
+#define GL_COLOR_TABLE_FORMAT_SGI 0x80D8
+#define GL_COLOR_TABLE_WIDTH_SGI 0x80D9
+#define GL_COLOR_TABLE_RED_SIZE_SGI 0x80DA
+#define GL_COLOR_TABLE_GREEN_SIZE_SGI 0x80DB
+#define GL_COLOR_TABLE_BLUE_SIZE_SGI 0x80DC
+#define GL_COLOR_TABLE_ALPHA_SIZE_SGI 0x80DD
+#define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE
+#define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF
+#endif
+
+#ifndef GL_SGIS_pixel_texture
+#define GL_PIXEL_TEXTURE_SGIS 0x8353
+#define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354
+#define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355
+#define GL_PIXEL_GROUP_COLOR_SGIS 0x8356
+#endif
+
+#ifndef GL_SGIX_pixel_texture
+#define GL_PIXEL_TEX_GEN_SGIX 0x8139
+#define GL_PIXEL_TEX_GEN_MODE_SGIX 0x832B
+#endif
+
+#ifndef GL_SGIS_texture4D
+#define GL_PACK_SKIP_VOLUMES_SGIS 0x8130
+#define GL_PACK_IMAGE_DEPTH_SGIS 0x8131
+#define GL_UNPACK_SKIP_VOLUMES_SGIS 0x8132
+#define GL_UNPACK_IMAGE_DEPTH_SGIS 0x8133
+#define GL_TEXTURE_4D_SGIS 0x8134
+#define GL_PROXY_TEXTURE_4D_SGIS 0x8135
+#define GL_TEXTURE_4DSIZE_SGIS 0x8136
+#define GL_TEXTURE_WRAP_Q_SGIS 0x8137
+#define GL_MAX_4D_TEXTURE_SIZE_SGIS 0x8138
+#define GL_TEXTURE_4D_BINDING_SGIS 0x814F
+#endif
+
+#ifndef GL_SGI_texture_color_table
+#define GL_TEXTURE_COLOR_TABLE_SGI 0x80BC
+#define GL_PROXY_TEXTURE_COLOR_TABLE_SGI 0x80BD
+#endif
+
+#ifndef GL_EXT_cmyka
+#define GL_CMYK_EXT 0x800C
+#define GL_CMYKA_EXT 0x800D
+#define GL_PACK_CMYK_HINT_EXT 0x800E
+#define GL_UNPACK_CMYK_HINT_EXT 0x800F
+#endif
+
+#ifndef GL_EXT_texture_object
+#define GL_TEXTURE_PRIORITY_EXT 0x8066
+#define GL_TEXTURE_RESIDENT_EXT 0x8067
+#define GL_TEXTURE_1D_BINDING_EXT 0x8068
+#define GL_TEXTURE_2D_BINDING_EXT 0x8069
+#define GL_TEXTURE_3D_BINDING_EXT 0x806A
+#endif
+
+#ifndef GL_SGIS_detail_texture
+#define GL_DETAIL_TEXTURE_2D_SGIS 0x8095
+#define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096
+#define GL_LINEAR_DETAIL_SGIS 0x8097
+#define GL_LINEAR_DETAIL_ALPHA_SGIS 0x8098
+#define GL_LINEAR_DETAIL_COLOR_SGIS 0x8099
+#define GL_DETAIL_TEXTURE_LEVEL_SGIS 0x809A
+#define GL_DETAIL_TEXTURE_MODE_SGIS 0x809B
+#define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C
+#endif
+
+#ifndef GL_SGIS_sharpen_texture
+#define GL_LINEAR_SHARPEN_SGIS 0x80AD
+#define GL_LINEAR_SHARPEN_ALPHA_SGIS 0x80AE
+#define GL_LINEAR_SHARPEN_COLOR_SGIS 0x80AF
+#define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0
+#endif
+
+#ifndef GL_EXT_packed_pixels
+#define GL_UNSIGNED_BYTE_3_3_2_EXT 0x8032
+#define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033
+#define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034
+#define GL_UNSIGNED_INT_8_8_8_8_EXT 0x8035
+#define GL_UNSIGNED_INT_10_10_10_2_EXT 0x8036
+#endif
+
+#ifndef GL_SGIS_texture_lod
+#define GL_TEXTURE_MIN_LOD_SGIS 0x813A
+#define GL_TEXTURE_MAX_LOD_SGIS 0x813B
+#define GL_TEXTURE_BASE_LEVEL_SGIS 0x813C
+#define GL_TEXTURE_MAX_LEVEL_SGIS 0x813D
+#endif
+
+#ifndef GL_SGIS_multisample
+#define GL_MULTISAMPLE_SGIS 0x809D
+#define GL_SAMPLE_ALPHA_TO_MASK_SGIS 0x809E
+#define GL_SAMPLE_ALPHA_TO_ONE_SGIS 0x809F
+#define GL_SAMPLE_MASK_SGIS 0x80A0
+#define GL_1PASS_SGIS 0x80A1
+#define GL_2PASS_0_SGIS 0x80A2
+#define GL_2PASS_1_SGIS 0x80A3
+#define GL_4PASS_0_SGIS 0x80A4
+#define GL_4PASS_1_SGIS 0x80A5
+#define GL_4PASS_2_SGIS 0x80A6
+#define GL_4PASS_3_SGIS 0x80A7
+#define GL_SAMPLE_BUFFERS_SGIS 0x80A8
+#define GL_SAMPLES_SGIS 0x80A9
+#define GL_SAMPLE_MASK_VALUE_SGIS 0x80AA
+#define GL_SAMPLE_MASK_INVERT_SGIS 0x80AB
+#define GL_SAMPLE_PATTERN_SGIS 0x80AC
+#endif
+
+#ifndef GL_EXT_rescale_normal
+#define GL_RESCALE_NORMAL_EXT 0x803A
+#endif
+
+#ifndef GL_EXT_vertex_array
+#define GL_VERTEX_ARRAY_EXT 0x8074
+#define GL_NORMAL_ARRAY_EXT 0x8075
+#define GL_COLOR_ARRAY_EXT 0x8076
+#define GL_INDEX_ARRAY_EXT 0x8077
+#define GL_TEXTURE_COORD_ARRAY_EXT 0x8078
+#define GL_EDGE_FLAG_ARRAY_EXT 0x8079
+#define GL_VERTEX_ARRAY_SIZE_EXT 0x807A
+#define GL_VERTEX_ARRAY_TYPE_EXT 0x807B
+#define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C
+#define GL_VERTEX_ARRAY_COUNT_EXT 0x807D
+#define GL_NORMAL_ARRAY_TYPE_EXT 0x807E
+#define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F
+#define GL_NORMAL_ARRAY_COUNT_EXT 0x8080
+#define GL_COLOR_ARRAY_SIZE_EXT 0x8081
+#define GL_COLOR_ARRAY_TYPE_EXT 0x8082
+#define GL_COLOR_ARRAY_STRIDE_EXT 0x8083
+#define GL_COLOR_ARRAY_COUNT_EXT 0x8084
+#define GL_INDEX_ARRAY_TYPE_EXT 0x8085
+#define GL_INDEX_ARRAY_STRIDE_EXT 0x8086
+#define GL_INDEX_ARRAY_COUNT_EXT 0x8087
+#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088
+#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089
+#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A
+#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B
+#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C
+#define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D
+#define GL_VERTEX_ARRAY_POINTER_EXT 0x808E
+#define GL_NORMAL_ARRAY_POINTER_EXT 0x808F
+#define GL_COLOR_ARRAY_POINTER_EXT 0x8090
+#define GL_INDEX_ARRAY_POINTER_EXT 0x8091
+#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092
+#define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093
+#endif
+
+#ifndef GL_EXT_misc_attribute
+#endif
+
+#ifndef GL_SGIS_generate_mipmap
+#define GL_GENERATE_MIPMAP_SGIS 0x8191
+#define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192
+#endif
+
+#ifndef GL_SGIX_clipmap
+#define GL_LINEAR_CLIPMAP_LINEAR_SGIX 0x8170
+#define GL_TEXTURE_CLIPMAP_CENTER_SGIX 0x8171
+#define GL_TEXTURE_CLIPMAP_FRAME_SGIX 0x8172
+#define GL_TEXTURE_CLIPMAP_OFFSET_SGIX 0x8173
+#define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174
+#define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175
+#define GL_TEXTURE_CLIPMAP_DEPTH_SGIX 0x8176
+#define GL_MAX_CLIPMAP_DEPTH_SGIX 0x8177
+#define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178
+#define GL_NEAREST_CLIPMAP_NEAREST_SGIX 0x844D
+#define GL_NEAREST_CLIPMAP_LINEAR_SGIX 0x844E
+#define GL_LINEAR_CLIPMAP_NEAREST_SGIX 0x844F
+#endif
+
+#ifndef GL_SGIX_shadow
+#define GL_TEXTURE_COMPARE_SGIX 0x819A
+#define GL_TEXTURE_COMPARE_OPERATOR_SGIX 0x819B
+#define GL_TEXTURE_LEQUAL_R_SGIX 0x819C
+#define GL_TEXTURE_GEQUAL_R_SGIX 0x819D
+#endif
+
+#ifndef GL_SGIS_texture_edge_clamp
+#define GL_CLAMP_TO_EDGE_SGIS 0x812F
+#endif
+
+#ifndef GL_SGIS_texture_border_clamp
+#define GL_CLAMP_TO_BORDER_SGIS 0x812D
+#endif
+
+#ifndef GL_EXT_blend_minmax
+#define GL_FUNC_ADD_EXT 0x8006
+#define GL_MIN_EXT 0x8007
+#define GL_MAX_EXT 0x8008
+#define GL_BLEND_EQUATION_EXT 0x8009
+#endif
+
+#ifndef GL_EXT_blend_subtract
+#define GL_FUNC_SUBTRACT_EXT 0x800A
+#define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B
+#endif
+
+#ifndef GL_EXT_blend_logic_op
+#endif
+
+#ifndef GL_SGIX_interlace
+#define GL_INTERLACE_SGIX 0x8094
+#endif
+
+#ifndef GL_SGIX_pixel_tiles
+#define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E
+#define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F
+#define GL_PIXEL_TILE_WIDTH_SGIX 0x8140
+#define GL_PIXEL_TILE_HEIGHT_SGIX 0x8141
+#define GL_PIXEL_TILE_GRID_WIDTH_SGIX 0x8142
+#define GL_PIXEL_TILE_GRID_HEIGHT_SGIX 0x8143
+#define GL_PIXEL_TILE_GRID_DEPTH_SGIX 0x8144
+#define GL_PIXEL_TILE_CACHE_SIZE_SGIX 0x8145
+#endif
+
+#ifndef GL_SGIS_texture_select
+#define GL_DUAL_ALPHA4_SGIS 0x8110
+#define GL_DUAL_ALPHA8_SGIS 0x8111
+#define GL_DUAL_ALPHA12_SGIS 0x8112
+#define GL_DUAL_ALPHA16_SGIS 0x8113
+#define GL_DUAL_LUMINANCE4_SGIS 0x8114
+#define GL_DUAL_LUMINANCE8_SGIS 0x8115
+#define GL_DUAL_LUMINANCE12_SGIS 0x8116
+#define GL_DUAL_LUMINANCE16_SGIS 0x8117
+#define GL_DUAL_INTENSITY4_SGIS 0x8118
+#define GL_DUAL_INTENSITY8_SGIS 0x8119
+#define GL_DUAL_INTENSITY12_SGIS 0x811A
+#define GL_DUAL_INTENSITY16_SGIS 0x811B
+#define GL_DUAL_LUMINANCE_ALPHA4_SGIS 0x811C
+#define GL_DUAL_LUMINANCE_ALPHA8_SGIS 0x811D
+#define GL_QUAD_ALPHA4_SGIS 0x811E
+#define GL_QUAD_ALPHA8_SGIS 0x811F
+#define GL_QUAD_LUMINANCE4_SGIS 0x8120
+#define GL_QUAD_LUMINANCE8_SGIS 0x8121
+#define GL_QUAD_INTENSITY4_SGIS 0x8122
+#define GL_QUAD_INTENSITY8_SGIS 0x8123
+#define GL_DUAL_TEXTURE_SELECT_SGIS 0x8124
+#define GL_QUAD_TEXTURE_SELECT_SGIS 0x8125
+#endif
+
+#ifndef GL_SGIX_sprite
+#define GL_SPRITE_SGIX 0x8148
+#define GL_SPRITE_MODE_SGIX 0x8149
+#define GL_SPRITE_AXIS_SGIX 0x814A
+#define GL_SPRITE_TRANSLATION_SGIX 0x814B
+#define GL_SPRITE_AXIAL_SGIX 0x814C
+#define GL_SPRITE_OBJECT_ALIGNED_SGIX 0x814D
+#define GL_SPRITE_EYE_ALIGNED_SGIX 0x814E
+#endif
+
+#ifndef GL_SGIX_texture_multi_buffer
+#define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E
+#endif
+
+#ifndef GL_EXT_point_parameters
+#define GL_POINT_SIZE_MIN_EXT 0x8126
+#define GL_POINT_SIZE_MAX_EXT 0x8127
+#define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128
+#define GL_DISTANCE_ATTENUATION_EXT 0x8129
+#endif
+
+#ifndef GL_SGIS_point_parameters
+#define GL_POINT_SIZE_MIN_SGIS 0x8126
+#define GL_POINT_SIZE_MAX_SGIS 0x8127
+#define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128
+#define GL_DISTANCE_ATTENUATION_SGIS 0x8129
+#endif
+
+#ifndef GL_SGIX_instruments
+#define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180
+#define GL_INSTRUMENT_MEASUREMENTS_SGIX 0x8181
+#endif
+
+#ifndef GL_SGIX_texture_scale_bias
+#define GL_POST_TEXTURE_FILTER_BIAS_SGIX 0x8179
+#define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A
+#define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B
+#define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C
+#endif
+
+#ifndef GL_SGIX_framezoom
+#define GL_FRAMEZOOM_SGIX 0x818B
+#define GL_FRAMEZOOM_FACTOR_SGIX 0x818C
+#define GL_MAX_FRAMEZOOM_FACTOR_SGIX 0x818D
+#endif
+
+#ifndef GL_SGIX_tag_sample_buffer
+#endif
+
+#ifndef GL_FfdMaskSGIX
+#define GL_TEXTURE_DEFORMATION_BIT_SGIX 0x00000001
+#define GL_GEOMETRY_DEFORMATION_BIT_SGIX 0x00000002
+#endif
+
+#ifndef GL_SGIX_polynomial_ffd
+#define GL_GEOMETRY_DEFORMATION_SGIX 0x8194
+#define GL_TEXTURE_DEFORMATION_SGIX 0x8195
+#define GL_DEFORMATIONS_MASK_SGIX 0x8196
+#define GL_MAX_DEFORMATION_ORDER_SGIX 0x8197
+#endif
+
+#ifndef GL_SGIX_reference_plane
+#define GL_REFERENCE_PLANE_SGIX 0x817D
+#define GL_REFERENCE_PLANE_EQUATION_SGIX 0x817E
+#endif
+
+#ifndef GL_SGIX_flush_raster
+#endif
+
+#ifndef GL_SGIX_depth_texture
+#define GL_DEPTH_COMPONENT16_SGIX 0x81A5
+#define GL_DEPTH_COMPONENT24_SGIX 0x81A6
+#define GL_DEPTH_COMPONENT32_SGIX 0x81A7
+#endif
+
+#ifndef GL_SGIS_fog_function
+#define GL_FOG_FUNC_SGIS 0x812A
+#define GL_FOG_FUNC_POINTS_SGIS 0x812B
+#define GL_MAX_FOG_FUNC_POINTS_SGIS 0x812C
+#endif
+
+#ifndef GL_SGIX_fog_offset
+#define GL_FOG_OFFSET_SGIX 0x8198
+#define GL_FOG_OFFSET_VALUE_SGIX 0x8199
+#endif
+
+#ifndef GL_HP_image_transform
+#define GL_IMAGE_SCALE_X_HP 0x8155
+#define GL_IMAGE_SCALE_Y_HP 0x8156
+#define GL_IMAGE_TRANSLATE_X_HP 0x8157
+#define GL_IMAGE_TRANSLATE_Y_HP 0x8158
+#define GL_IMAGE_ROTATE_ANGLE_HP 0x8159
+#define GL_IMAGE_ROTATE_ORIGIN_X_HP 0x815A
+#define GL_IMAGE_ROTATE_ORIGIN_Y_HP 0x815B
+#define GL_IMAGE_MAG_FILTER_HP 0x815C
+#define GL_IMAGE_MIN_FILTER_HP 0x815D
+#define GL_IMAGE_CUBIC_WEIGHT_HP 0x815E
+#define GL_CUBIC_HP 0x815F
+#define GL_AVERAGE_HP 0x8160
+#define GL_IMAGE_TRANSFORM_2D_HP 0x8161
+#define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162
+#define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163
+#endif
+
+#ifndef GL_HP_convolution_border_modes
+#define GL_IGNORE_BORDER_HP 0x8150
+#define GL_CONSTANT_BORDER_HP 0x8151
+#define GL_REPLICATE_BORDER_HP 0x8153
+#define GL_CONVOLUTION_BORDER_COLOR_HP 0x8154
+#endif
+
+#ifndef GL_INGR_palette_buffer
+#endif
+
+#ifndef GL_SGIX_texture_add_env
+#define GL_TEXTURE_ENV_BIAS_SGIX 0x80BE
+#endif
+
+#ifndef GL_EXT_color_subtable
+#endif
+
+#ifndef GL_PGI_vertex_hints
+#define GL_VERTEX_DATA_HINT_PGI 0x1A22A
+#define GL_VERTEX_CONSISTENT_HINT_PGI 0x1A22B
+#define GL_MATERIAL_SIDE_HINT_PGI 0x1A22C
+#define GL_MAX_VERTEX_HINT_PGI 0x1A22D
+#define GL_COLOR3_BIT_PGI 0x00010000
+#define GL_COLOR4_BIT_PGI 0x00020000
+#define GL_EDGEFLAG_BIT_PGI 0x00040000
+#define GL_INDEX_BIT_PGI 0x00080000
+#define GL_MAT_AMBIENT_BIT_PGI 0x00100000
+#define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000
+#define GL_MAT_DIFFUSE_BIT_PGI 0x00400000
+#define GL_MAT_EMISSION_BIT_PGI 0x00800000
+#define GL_MAT_COLOR_INDEXES_BIT_PGI 0x01000000
+#define GL_MAT_SHININESS_BIT_PGI 0x02000000
+#define GL_MAT_SPECULAR_BIT_PGI 0x04000000
+#define GL_NORMAL_BIT_PGI 0x08000000
+#define GL_TEXCOORD1_BIT_PGI 0x10000000
+#define GL_TEXCOORD2_BIT_PGI 0x20000000
+#define GL_TEXCOORD3_BIT_PGI 0x40000000
+#define GL_TEXCOORD4_BIT_PGI 0x80000000
+#define GL_VERTEX23_BIT_PGI 0x00000004
+#define GL_VERTEX4_BIT_PGI 0x00000008
+#endif
+
+#ifndef GL_PGI_misc_hints
+#define GL_PREFER_DOUBLEBUFFER_HINT_PGI 0x1A1F8
+#define GL_CONSERVE_MEMORY_HINT_PGI 0x1A1FD
+#define GL_RECLAIM_MEMORY_HINT_PGI 0x1A1FE
+#define GL_NATIVE_GRAPHICS_HANDLE_PGI 0x1A202
+#define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203
+#define GL_NATIVE_GRAPHICS_END_HINT_PGI 0x1A204
+#define GL_ALWAYS_FAST_HINT_PGI 0x1A20C
+#define GL_ALWAYS_SOFT_HINT_PGI 0x1A20D
+#define GL_ALLOW_DRAW_OBJ_HINT_PGI 0x1A20E
+#define GL_ALLOW_DRAW_WIN_HINT_PGI 0x1A20F
+#define GL_ALLOW_DRAW_FRG_HINT_PGI 0x1A210
+#define GL_ALLOW_DRAW_MEM_HINT_PGI 0x1A211
+#define GL_STRICT_DEPTHFUNC_HINT_PGI 0x1A216
+#define GL_STRICT_LIGHTING_HINT_PGI 0x1A217
+#define GL_STRICT_SCISSOR_HINT_PGI 0x1A218
+#define GL_FULL_STIPPLE_HINT_PGI 0x1A219
+#define GL_CLIP_NEAR_HINT_PGI 0x1A220
+#define GL_CLIP_FAR_HINT_PGI 0x1A221
+#define GL_WIDE_LINE_HINT_PGI 0x1A222
+#define GL_BACK_NORMALS_HINT_PGI 0x1A223
+#endif
+
+#ifndef GL_EXT_paletted_texture
+#define GL_COLOR_INDEX1_EXT 0x80E2
+#define GL_COLOR_INDEX2_EXT 0x80E3
+#define GL_COLOR_INDEX4_EXT 0x80E4
+#define GL_COLOR_INDEX8_EXT 0x80E5
+#define GL_COLOR_INDEX12_EXT 0x80E6
+#define GL_COLOR_INDEX16_EXT 0x80E7
+#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED
+#endif
+
+#ifndef GL_EXT_clip_volume_hint
+#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0
+#endif
+
+#ifndef GL_SGIX_list_priority
+#define GL_LIST_PRIORITY_SGIX 0x8182
+#endif
+
+#ifndef GL_SGIX_ir_instrument1
+#define GL_IR_INSTRUMENT1_SGIX 0x817F
+#endif
+
+#ifndef GL_SGIX_calligraphic_fragment
+#define GL_CALLIGRAPHIC_FRAGMENT_SGIX 0x8183
+#endif
+
+#ifndef GL_SGIX_texture_lod_bias
+#define GL_TEXTURE_LOD_BIAS_S_SGIX 0x818E
+#define GL_TEXTURE_LOD_BIAS_T_SGIX 0x818F
+#define GL_TEXTURE_LOD_BIAS_R_SGIX 0x8190
+#endif
+
+#ifndef GL_SGIX_shadow_ambient
+#define GL_SHADOW_AMBIENT_SGIX 0x80BF
+#endif
+
+#ifndef GL_EXT_index_texture
+#endif
+
+#ifndef GL_EXT_index_material
+#define GL_INDEX_MATERIAL_EXT 0x81B8
+#define GL_INDEX_MATERIAL_PARAMETER_EXT 0x81B9
+#define GL_INDEX_MATERIAL_FACE_EXT 0x81BA
+#endif
+
+#ifndef GL_EXT_index_func
+#define GL_INDEX_TEST_EXT 0x81B5
+#define GL_INDEX_TEST_FUNC_EXT 0x81B6
+#define GL_INDEX_TEST_REF_EXT 0x81B7
+#endif
+
+#ifndef GL_EXT_index_array_formats
+#define GL_IUI_V2F_EXT 0x81AD
+#define GL_IUI_V3F_EXT 0x81AE
+#define GL_IUI_N3F_V2F_EXT 0x81AF
+#define GL_IUI_N3F_V3F_EXT 0x81B0
+#define GL_T2F_IUI_V2F_EXT 0x81B1
+#define GL_T2F_IUI_V3F_EXT 0x81B2
+#define GL_T2F_IUI_N3F_V2F_EXT 0x81B3
+#define GL_T2F_IUI_N3F_V3F_EXT 0x81B4
+#endif
+
+#ifndef GL_EXT_compiled_vertex_array
+#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT 0x81A8
+#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT 0x81A9
+#endif
+
+#ifndef GL_EXT_cull_vertex
+#define GL_CULL_VERTEX_EXT 0x81AA
+#define GL_CULL_VERTEX_EYE_POSITION_EXT 0x81AB
+#define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC
+#endif
+
+#ifndef GL_SGIX_ycrcb
+#define GL_YCRCB_422_SGIX 0x81BB
+#define GL_YCRCB_444_SGIX 0x81BC
+#endif
+
+#ifndef GL_SGIX_fragment_lighting
+#define GL_FRAGMENT_LIGHTING_SGIX 0x8400
+#define GL_FRAGMENT_COLOR_MATERIAL_SGIX 0x8401
+#define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402
+#define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403
+#define GL_MAX_FRAGMENT_LIGHTS_SGIX 0x8404
+#define GL_MAX_ACTIVE_LIGHTS_SGIX 0x8405
+#define GL_CURRENT_RASTER_NORMAL_SGIX 0x8406
+#define GL_LIGHT_ENV_MODE_SGIX 0x8407
+#define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408
+#define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409
+#define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A
+#define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B
+#define GL_FRAGMENT_LIGHT0_SGIX 0x840C
+#define GL_FRAGMENT_LIGHT1_SGIX 0x840D
+#define GL_FRAGMENT_LIGHT2_SGIX 0x840E
+#define GL_FRAGMENT_LIGHT3_SGIX 0x840F
+#define GL_FRAGMENT_LIGHT4_SGIX 0x8410
+#define GL_FRAGMENT_LIGHT5_SGIX 0x8411
+#define GL_FRAGMENT_LIGHT6_SGIX 0x8412
+#define GL_FRAGMENT_LIGHT7_SGIX 0x8413
+#endif
+
+#ifndef GL_IBM_rasterpos_clip
+#define GL_RASTER_POSITION_UNCLIPPED_IBM 0x19262
+#endif
+
+#ifndef GL_HP_texture_lighting
+#define GL_TEXTURE_LIGHTING_MODE_HP 0x8167
+#define GL_TEXTURE_POST_SPECULAR_HP 0x8168
+#define GL_TEXTURE_PRE_SPECULAR_HP 0x8169
+#endif
+
+#ifndef GL_EXT_draw_range_elements
+#define GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8
+#define GL_MAX_ELEMENTS_INDICES_EXT 0x80E9
+#endif
+
+#ifndef GL_WIN_phong_shading
+#define GL_PHONG_WIN 0x80EA
+#define GL_PHONG_HINT_WIN 0x80EB
+#endif
+
+#ifndef GL_WIN_specular_fog
+#define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC
+#endif
+
+#ifndef GL_EXT_light_texture
+#define GL_FRAGMENT_MATERIAL_EXT 0x8349
+#define GL_FRAGMENT_NORMAL_EXT 0x834A
+#define GL_FRAGMENT_COLOR_EXT 0x834C
+#define GL_ATTENUATION_EXT 0x834D
+#define GL_SHADOW_ATTENUATION_EXT 0x834E
+#define GL_TEXTURE_APPLICATION_MODE_EXT 0x834F
+#define GL_TEXTURE_LIGHT_EXT 0x8350
+#define GL_TEXTURE_MATERIAL_FACE_EXT 0x8351
+#define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352
+/* reuse GL_FRAGMENT_DEPTH_EXT */
+#endif
+
+#ifndef GL_SGIX_blend_alpha_minmax
+#define GL_ALPHA_MIN_SGIX 0x8320
+#define GL_ALPHA_MAX_SGIX 0x8321
+#endif
+
+#ifndef GL_SGIX_impact_pixel_texture
+#define GL_PIXEL_TEX_GEN_Q_CEILING_SGIX 0x8184
+#define GL_PIXEL_TEX_GEN_Q_ROUND_SGIX 0x8185
+#define GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX 0x8186
+#define GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX 0x8187
+#define GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX 0x8188
+#define GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX 0x8189
+#define GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX 0x818A
+#endif
+
+#ifndef GL_EXT_bgra
+#define GL_BGR_EXT 0x80E0
+#define GL_BGRA_EXT 0x80E1
+#endif
+
+#ifndef GL_SGIX_async
+#define GL_ASYNC_MARKER_SGIX 0x8329
+#endif
+
+#ifndef GL_SGIX_async_pixel
+#define GL_ASYNC_TEX_IMAGE_SGIX 0x835C
+#define GL_ASYNC_DRAW_PIXELS_SGIX 0x835D
+#define GL_ASYNC_READ_PIXELS_SGIX 0x835E
+#define GL_MAX_ASYNC_TEX_IMAGE_SGIX 0x835F
+#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX 0x8360
+#define GL_MAX_ASYNC_READ_PIXELS_SGIX 0x8361
+#endif
+
+#ifndef GL_SGIX_async_histogram
+#define GL_ASYNC_HISTOGRAM_SGIX 0x832C
+#define GL_MAX_ASYNC_HISTOGRAM_SGIX 0x832D
+#endif
+
+#ifndef GL_INTEL_texture_scissor
+#endif
+
+#ifndef GL_INTEL_parallel_arrays
+#define GL_PARALLEL_ARRAYS_INTEL 0x83F4
+#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5
+#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6
+#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7
+#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8
+#endif
+
+#ifndef GL_HP_occlusion_test
+#define GL_OCCLUSION_TEST_HP 0x8165
+#define GL_OCCLUSION_TEST_RESULT_HP 0x8166
+#endif
+
+#ifndef GL_EXT_pixel_transform
+#define GL_PIXEL_TRANSFORM_2D_EXT 0x8330
+#define GL_PIXEL_MAG_FILTER_EXT 0x8331
+#define GL_PIXEL_MIN_FILTER_EXT 0x8332
+#define GL_PIXEL_CUBIC_WEIGHT_EXT 0x8333
+#define GL_CUBIC_EXT 0x8334
+#define GL_AVERAGE_EXT 0x8335
+#define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336
+#define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337
+#define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT 0x8338
+#endif
+
+#ifndef GL_EXT_pixel_transform_color_table
+#endif
+
+#ifndef GL_EXT_shared_texture_palette
+#define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB
+#endif
+
+#ifndef GL_EXT_separate_specular_color
+#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8
+#define GL_SINGLE_COLOR_EXT 0x81F9
+#define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA
+#endif
+
+#ifndef GL_EXT_secondary_color
+#define GL_COLOR_SUM_EXT 0x8458
+#define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459
+#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A
+#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B
+#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C
+#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D
+#define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E
+#endif
+
+#ifndef GL_EXT_texture_perturb_normal
+#define GL_PERTURB_EXT 0x85AE
+#define GL_TEXTURE_NORMAL_EXT 0x85AF
+#endif
+
+#ifndef GL_EXT_multi_draw_arrays
+#endif
+
+#ifndef GL_EXT_fog_coord
+#define GL_FOG_COORDINATE_SOURCE_EXT 0x8450
+#define GL_FOG_COORDINATE_EXT 0x8451
+#define GL_FRAGMENT_DEPTH_EXT 0x8452
+#define GL_CURRENT_FOG_COORDINATE_EXT 0x8453
+#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454
+#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455
+#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456
+#define GL_FOG_COORDINATE_ARRAY_EXT 0x8457
+#endif
+
+#ifndef GL_REND_screen_coordinates
+#define GL_SCREEN_COORDINATES_REND 0x8490
+#define GL_INVERTED_SCREEN_W_REND 0x8491
+#endif
+
+#ifndef GL_EXT_coordinate_frame
+#define GL_TANGENT_ARRAY_EXT 0x8439
+#define GL_BINORMAL_ARRAY_EXT 0x843A
+#define GL_CURRENT_TANGENT_EXT 0x843B
+#define GL_CURRENT_BINORMAL_EXT 0x843C
+#define GL_TANGENT_ARRAY_TYPE_EXT 0x843E
+#define GL_TANGENT_ARRAY_STRIDE_EXT 0x843F
+#define GL_BINORMAL_ARRAY_TYPE_EXT 0x8440
+#define GL_BINORMAL_ARRAY_STRIDE_EXT 0x8441
+#define GL_TANGENT_ARRAY_POINTER_EXT 0x8442
+#define GL_BINORMAL_ARRAY_POINTER_EXT 0x8443
+#define GL_MAP1_TANGENT_EXT 0x8444
+#define GL_MAP2_TANGENT_EXT 0x8445
+#define GL_MAP1_BINORMAL_EXT 0x8446
+#define GL_MAP2_BINORMAL_EXT 0x8447
+#endif
+
+#ifndef GL_EXT_texture_env_combine
+#define GL_COMBINE_EXT 0x8570
+#define GL_COMBINE_RGB_EXT 0x8571
+#define GL_COMBINE_ALPHA_EXT 0x8572
+#define GL_RGB_SCALE_EXT 0x8573
+#define GL_ADD_SIGNED_EXT 0x8574
+#define GL_INTERPOLATE_EXT 0x8575
+#define GL_CONSTANT_EXT 0x8576
+#define GL_PRIMARY_COLOR_EXT 0x8577
+#define GL_PREVIOUS_EXT 0x8578
+#define GL_SOURCE0_RGB_EXT 0x8580
+#define GL_SOURCE1_RGB_EXT 0x8581
+#define GL_SOURCE2_RGB_EXT 0x8582
+#define GL_SOURCE0_ALPHA_EXT 0x8588
+#define GL_SOURCE1_ALPHA_EXT 0x8589
+#define GL_SOURCE2_ALPHA_EXT 0x858A
+#define GL_OPERAND0_RGB_EXT 0x8590
+#define GL_OPERAND1_RGB_EXT 0x8591
+#define GL_OPERAND2_RGB_EXT 0x8592
+#define GL_OPERAND0_ALPHA_EXT 0x8598
+#define GL_OPERAND1_ALPHA_EXT 0x8599
+#define GL_OPERAND2_ALPHA_EXT 0x859A
+#endif
+
+#ifndef GL_APPLE_specular_vector
+#define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0
+#endif
+
+#ifndef GL_APPLE_transform_hint
+#define GL_TRANSFORM_HINT_APPLE 0x85B1
+#endif
+
+#ifndef GL_SGIX_fog_scale
+#define GL_FOG_SCALE_SGIX 0x81FC
+#define GL_FOG_SCALE_VALUE_SGIX 0x81FD
+#endif
+
+#ifndef GL_SUNX_constant_data
+#define GL_UNPACK_CONSTANT_DATA_SUNX 0x81D5
+#define GL_TEXTURE_CONSTANT_DATA_SUNX 0x81D6
+#endif
+
+#ifndef GL_SUN_global_alpha
+#define GL_GLOBAL_ALPHA_SUN 0x81D9
+#define GL_GLOBAL_ALPHA_FACTOR_SUN 0x81DA
+#endif
+
+#ifndef GL_SUN_triangle_list
+#define GL_RESTART_SUN 0x0001
+#define GL_REPLACE_MIDDLE_SUN 0x0002
+#define GL_REPLACE_OLDEST_SUN 0x0003
+#define GL_TRIANGLE_LIST_SUN 0x81D7
+#define GL_REPLACEMENT_CODE_SUN 0x81D8
+#define GL_REPLACEMENT_CODE_ARRAY_SUN 0x85C0
+#define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1
+#define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2
+#define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3
+#define GL_R1UI_V3F_SUN 0x85C4
+#define GL_R1UI_C4UB_V3F_SUN 0x85C5
+#define GL_R1UI_C3F_V3F_SUN 0x85C6
+#define GL_R1UI_N3F_V3F_SUN 0x85C7
+#define GL_R1UI_C4F_N3F_V3F_SUN 0x85C8
+#define GL_R1UI_T2F_V3F_SUN 0x85C9
+#define GL_R1UI_T2F_N3F_V3F_SUN 0x85CA
+#define GL_R1UI_T2F_C4F_N3F_V3F_SUN 0x85CB
+#endif
+
+#ifndef GL_SUN_vertex
+#endif
+
+#ifndef GL_EXT_blend_func_separate
+#define GL_BLEND_DST_RGB_EXT 0x80C8
+#define GL_BLEND_SRC_RGB_EXT 0x80C9
+#define GL_BLEND_DST_ALPHA_EXT 0x80CA
+#define GL_BLEND_SRC_ALPHA_EXT 0x80CB
+#endif
+
+#ifndef GL_INGR_color_clamp
+#define GL_RED_MIN_CLAMP_INGR 0x8560
+#define GL_GREEN_MIN_CLAMP_INGR 0x8561
+#define GL_BLUE_MIN_CLAMP_INGR 0x8562
+#define GL_ALPHA_MIN_CLAMP_INGR 0x8563
+#define GL_RED_MAX_CLAMP_INGR 0x8564
+#define GL_GREEN_MAX_CLAMP_INGR 0x8565
+#define GL_BLUE_MAX_CLAMP_INGR 0x8566
+#define GL_ALPHA_MAX_CLAMP_INGR 0x8567
+#endif
+
+#ifndef GL_INGR_interlace_read
+#define GL_INTERLACE_READ_INGR 0x8568
+#endif
+
+#ifndef GL_EXT_stencil_wrap
+#define GL_INCR_WRAP_EXT 0x8507
+#define GL_DECR_WRAP_EXT 0x8508
+#endif
+
+#ifndef GL_EXT_422_pixels
+#define GL_422_EXT 0x80CC
+#define GL_422_REV_EXT 0x80CD
+#define GL_422_AVERAGE_EXT 0x80CE
+#define GL_422_REV_AVERAGE_EXT 0x80CF
+#endif
+
+#ifndef GL_NV_texgen_reflection
+#define GL_NORMAL_MAP_NV 0x8511
+#define GL_REFLECTION_MAP_NV 0x8512
+#endif
+
+#ifndef GL_EXT_texture_cube_map
+#define GL_NORMAL_MAP_EXT 0x8511
+#define GL_REFLECTION_MAP_EXT 0x8512
+#define GL_TEXTURE_CUBE_MAP_EXT 0x8513
+#define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A
+#define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B
+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C
+#endif
+
+#ifndef GL_SUN_convolution_border_modes
+#define GL_WRAP_BORDER_SUN 0x81D4
+#endif
+
+#ifndef GL_EXT_texture_env_add
+#endif
+
+#ifndef GL_EXT_texture_lod_bias
+#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD
+#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500
+#define GL_TEXTURE_LOD_BIAS_EXT 0x8501
+#endif
+
+#ifndef GL_EXT_texture_filter_anisotropic
+#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
+#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
+#endif
+
+#ifndef GL_EXT_vertex_weighting
+#define GL_MODELVIEW0_STACK_DEPTH_EXT GL_MODELVIEW_STACK_DEPTH
+#define GL_MODELVIEW1_STACK_DEPTH_EXT 0x8502
+#define GL_MODELVIEW0_MATRIX_EXT GL_MODELVIEW_MATRIX
+#define GL_MODELVIEW1_MATRIX_EXT 0x8506
+#define GL_VERTEX_WEIGHTING_EXT 0x8509
+#define GL_MODELVIEW0_EXT GL_MODELVIEW
+#define GL_MODELVIEW1_EXT 0x850A
+#define GL_CURRENT_VERTEX_WEIGHT_EXT 0x850B
+#define GL_VERTEX_WEIGHT_ARRAY_EXT 0x850C
+#define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT 0x850D
+#define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT 0x850E
+#define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F
+#define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510
+#endif
+
+#ifndef GL_NV_light_max_exponent
+#define GL_MAX_SHININESS_NV 0x8504
+#define GL_MAX_SPOT_EXPONENT_NV 0x8505
+#endif
+
+#ifndef GL_NV_vertex_array_range
+#define GL_VERTEX_ARRAY_RANGE_NV 0x851D
+#define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E
+#define GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F
+#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520
+#define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521
+#endif
+
+#ifndef GL_NV_register_combiners
+#define GL_REGISTER_COMBINERS_NV 0x8522
+#define GL_VARIABLE_A_NV 0x8523
+#define GL_VARIABLE_B_NV 0x8524
+#define GL_VARIABLE_C_NV 0x8525
+#define GL_VARIABLE_D_NV 0x8526
+#define GL_VARIABLE_E_NV 0x8527
+#define GL_VARIABLE_F_NV 0x8528
+#define GL_VARIABLE_G_NV 0x8529
+#define GL_CONSTANT_COLOR0_NV 0x852A
+#define GL_CONSTANT_COLOR1_NV 0x852B
+#define GL_PRIMARY_COLOR_NV 0x852C
+#define GL_SECONDARY_COLOR_NV 0x852D
+#define GL_SPARE0_NV 0x852E
+#define GL_SPARE1_NV 0x852F
+#define GL_DISCARD_NV 0x8530
+#define GL_E_TIMES_F_NV 0x8531
+#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532
+#define GL_UNSIGNED_IDENTITY_NV 0x8536
+#define GL_UNSIGNED_INVERT_NV 0x8537
+#define GL_EXPAND_NORMAL_NV 0x8538
+#define GL_EXPAND_NEGATE_NV 0x8539
+#define GL_HALF_BIAS_NORMAL_NV 0x853A
+#define GL_HALF_BIAS_NEGATE_NV 0x853B
+#define GL_SIGNED_IDENTITY_NV 0x853C
+#define GL_SIGNED_NEGATE_NV 0x853D
+#define GL_SCALE_BY_TWO_NV 0x853E
+#define GL_SCALE_BY_FOUR_NV 0x853F
+#define GL_SCALE_BY_ONE_HALF_NV 0x8540
+#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541
+#define GL_COMBINER_INPUT_NV 0x8542
+#define GL_COMBINER_MAPPING_NV 0x8543
+#define GL_COMBINER_COMPONENT_USAGE_NV 0x8544
+#define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545
+#define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546
+#define GL_COMBINER_MUX_SUM_NV 0x8547
+#define GL_COMBINER_SCALE_NV 0x8548
+#define GL_COMBINER_BIAS_NV 0x8549
+#define GL_COMBINER_AB_OUTPUT_NV 0x854A
+#define GL_COMBINER_CD_OUTPUT_NV 0x854B
+#define GL_COMBINER_SUM_OUTPUT_NV 0x854C
+#define GL_MAX_GENERAL_COMBINERS_NV 0x854D
+#define GL_NUM_GENERAL_COMBINERS_NV 0x854E
+#define GL_COLOR_SUM_CLAMP_NV 0x854F
+#define GL_COMBINER0_NV 0x8550
+#define GL_COMBINER1_NV 0x8551
+#define GL_COMBINER2_NV 0x8552
+#define GL_COMBINER3_NV 0x8553
+#define GL_COMBINER4_NV 0x8554
+#define GL_COMBINER5_NV 0x8555
+#define GL_COMBINER6_NV 0x8556
+#define GL_COMBINER7_NV 0x8557
+/* reuse GL_TEXTURE0_ARB */
+/* reuse GL_TEXTURE1_ARB */
+/* reuse GL_ZERO */
+/* reuse GL_NONE */
+/* reuse GL_FOG */
+#endif
+
+#ifndef GL_NV_fog_distance
+#define GL_FOG_DISTANCE_MODE_NV 0x855A
+#define GL_EYE_RADIAL_NV 0x855B
+#define GL_EYE_PLANE_ABSOLUTE_NV 0x855C
+/* reuse GL_EYE_PLANE */
+#endif
+
+#ifndef GL_NV_texgen_emboss
+#define GL_EMBOSS_LIGHT_NV 0x855D
+#define GL_EMBOSS_CONSTANT_NV 0x855E
+#define GL_EMBOSS_MAP_NV 0x855F
+#endif
+
+#ifndef GL_NV_blend_square
+#endif
+
+#ifndef GL_NV_texture_env_combine4
+#define GL_COMBINE4_NV 0x8503
+#define GL_SOURCE3_RGB_NV 0x8583
+#define GL_SOURCE3_ALPHA_NV 0x858B
+#define GL_OPERAND3_RGB_NV 0x8593
+#define GL_OPERAND3_ALPHA_NV 0x859B
+#endif
+
+#ifndef GL_MESA_resize_buffers
+#endif
+
+#ifndef GL_MESA_window_pos
+#endif
+
+#ifndef GL_EXT_texture_compression_s3tc
+#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
+#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
+#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
+#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
+#endif
+
+#ifndef GL_IBM_cull_vertex
+#define GL_CULL_VERTEX_IBM 103050
+#endif
+
+#ifndef GL_IBM_multimode_draw_arrays
+#endif
+
+#ifndef GL_IBM_vertex_array_lists
+#define GL_VERTEX_ARRAY_LIST_IBM 103070
+#define GL_NORMAL_ARRAY_LIST_IBM 103071
+#define GL_COLOR_ARRAY_LIST_IBM 103072
+#define GL_INDEX_ARRAY_LIST_IBM 103073
+#define GL_TEXTURE_COORD_ARRAY_LIST_IBM 103074
+#define GL_EDGE_FLAG_ARRAY_LIST_IBM 103075
+#define GL_FOG_COORDINATE_ARRAY_LIST_IBM 103076
+#define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077
+#define GL_VERTEX_ARRAY_LIST_STRIDE_IBM 103080
+#define GL_NORMAL_ARRAY_LIST_STRIDE_IBM 103081
+#define GL_COLOR_ARRAY_LIST_STRIDE_IBM 103082
+#define GL_INDEX_ARRAY_LIST_STRIDE_IBM 103083
+#define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084
+#define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085
+#define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086
+#define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087
+#endif
+
+#ifndef GL_SGIX_subsample
+#define GL_PACK_SUBSAMPLE_RATE_SGIX 0x85A0
+#define GL_UNPACK_SUBSAMPLE_RATE_SGIX 0x85A1
+#define GL_PIXEL_SUBSAMPLE_4444_SGIX 0x85A2
+#define GL_PIXEL_SUBSAMPLE_2424_SGIX 0x85A3
+#define GL_PIXEL_SUBSAMPLE_4242_SGIX 0x85A4
+#endif
+
+#ifndef GL_SGIX_ycrcb_subsample
+#endif
+
+#ifndef GL_SGIX_ycrcba
+#define GL_YCRCB_SGIX 0x8318
+#define GL_YCRCBA_SGIX 0x8319
+#endif
+
+#ifndef GL_SGI_depth_pass_instrument
+#define GL_DEPTH_PASS_INSTRUMENT_SGIX 0x8310
+#define GL_DEPTH_PASS_INSTRUMENT_COUNTERS_SGIX 0x8311
+#define GL_DEPTH_PASS_INSTRUMENT_MAX_SGIX 0x8312
+#endif
+
+#ifndef GL_3DFX_texture_compression_FXT1
+#define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0
+#define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1
+#endif
+
+#ifndef GL_3DFX_multisample
+#define GL_MULTISAMPLE_3DFX 0x86B2
+#define GL_SAMPLE_BUFFERS_3DFX 0x86B3
+#define GL_SAMPLES_3DFX 0x86B4
+#define GL_MULTISAMPLE_BIT_3DFX 0x20000000
+#endif
+
+#ifndef GL_3DFX_tbuffer
+#endif
+
+#ifndef GL_EXT_multisample
+#define GL_MULTISAMPLE_EXT 0x809D
+#define GL_SAMPLE_ALPHA_TO_MASK_EXT 0x809E
+#define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F
+#define GL_SAMPLE_MASK_EXT 0x80A0
+#define GL_1PASS_EXT 0x80A1
+#define GL_2PASS_0_EXT 0x80A2
+#define GL_2PASS_1_EXT 0x80A3
+#define GL_4PASS_0_EXT 0x80A4
+#define GL_4PASS_1_EXT 0x80A5
+#define GL_4PASS_2_EXT 0x80A6
+#define GL_4PASS_3_EXT 0x80A7
+#define GL_SAMPLE_BUFFERS_EXT 0x80A8
+#define GL_SAMPLES_EXT 0x80A9
+#define GL_SAMPLE_MASK_VALUE_EXT 0x80AA
+#define GL_SAMPLE_MASK_INVERT_EXT 0x80AB
+#define GL_SAMPLE_PATTERN_EXT 0x80AC
+#define GL_MULTISAMPLE_BIT_EXT 0x20000000
+#endif
+
+#ifndef GL_SGIX_vertex_preclip
+#define GL_VERTEX_PRECLIP_SGIX 0x83EE
+#define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF
+#endif
+
+#ifndef GL_SGIX_convolution_accuracy
+#define GL_CONVOLUTION_HINT_SGIX 0x8316
+#endif
+
+#ifndef GL_SGIX_resample
+#define GL_PACK_RESAMPLE_SGIX 0x842C
+#define GL_UNPACK_RESAMPLE_SGIX 0x842D
+#define GL_RESAMPLE_REPLICATE_SGIX 0x842E
+#define GL_RESAMPLE_ZERO_FILL_SGIX 0x842F
+#define GL_RESAMPLE_DECIMATE_SGIX 0x8430
+#endif
+
+#ifndef GL_SGIS_point_line_texgen
+#define GL_EYE_DISTANCE_TO_POINT_SGIS 0x81F0
+#define GL_OBJECT_DISTANCE_TO_POINT_SGIS 0x81F1
+#define GL_EYE_DISTANCE_TO_LINE_SGIS 0x81F2
+#define GL_OBJECT_DISTANCE_TO_LINE_SGIS 0x81F3
+#define GL_EYE_POINT_SGIS 0x81F4
+#define GL_OBJECT_POINT_SGIS 0x81F5
+#define GL_EYE_LINE_SGIS 0x81F6
+#define GL_OBJECT_LINE_SGIS 0x81F7
+#endif
+
+#ifndef GL_SGIS_texture_color_mask
+#define GL_TEXTURE_COLOR_WRITEMASK_SGIS 0x81EF
+#endif
+
+#ifndef GL_EXT_texture_env_dot3
+#define GL_DOT3_RGB_EXT 0x8740
+#define GL_DOT3_RGBA_EXT 0x8741
+#endif
+
+#ifndef GL_ATI_texture_mirror_once
+#define GL_MIRROR_CLAMP_ATI 0x8742
+#define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743
+#endif
+
+#ifndef GL_NV_fence
+#define GL_ALL_COMPLETED_NV 0x84F2
+#define GL_FENCE_STATUS_NV 0x84F3
+#define GL_FENCE_CONDITION_NV 0x84F4
+#endif
+
+#ifndef GL_IBM_texture_mirrored_repeat
+#define GL_MIRRORED_REPEAT_IBM 0x8370
+#endif
+
+#ifndef GL_NV_evaluators
+#define GL_EVAL_2D_NV 0x86C0
+#define GL_EVAL_TRIANGULAR_2D_NV 0x86C1
+#define GL_MAP_TESSELLATION_NV 0x86C2
+#define GL_MAP_ATTRIB_U_ORDER_NV 0x86C3
+#define GL_MAP_ATTRIB_V_ORDER_NV 0x86C4
+#define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5
+#define GL_EVAL_VERTEX_ATTRIB0_NV 0x86C6
+#define GL_EVAL_VERTEX_ATTRIB1_NV 0x86C7
+#define GL_EVAL_VERTEX_ATTRIB2_NV 0x86C8
+#define GL_EVAL_VERTEX_ATTRIB3_NV 0x86C9
+#define GL_EVAL_VERTEX_ATTRIB4_NV 0x86CA
+#define GL_EVAL_VERTEX_ATTRIB5_NV 0x86CB
+#define GL_EVAL_VERTEX_ATTRIB6_NV 0x86CC
+#define GL_EVAL_VERTEX_ATTRIB7_NV 0x86CD
+#define GL_EVAL_VERTEX_ATTRIB8_NV 0x86CE
+#define GL_EVAL_VERTEX_ATTRIB9_NV 0x86CF
+#define GL_EVAL_VERTEX_ATTRIB10_NV 0x86D0
+#define GL_EVAL_VERTEX_ATTRIB11_NV 0x86D1
+#define GL_EVAL_VERTEX_ATTRIB12_NV 0x86D2
+#define GL_EVAL_VERTEX_ATTRIB13_NV 0x86D3
+#define GL_EVAL_VERTEX_ATTRIB14_NV 0x86D4
+#define GL_EVAL_VERTEX_ATTRIB15_NV 0x86D5
+#define GL_MAX_MAP_TESSELLATION_NV 0x86D6
+#define GL_MAX_RATIONAL_EVAL_ORDER_NV 0x86D7
+#endif
+
+#ifndef GL_NV_packed_depth_stencil
+#define GL_DEPTH_STENCIL_NV 0x84F9
+#define GL_UNSIGNED_INT_24_8_NV 0x84FA
+#endif
+
+#ifndef GL_NV_register_combiners2
+#define GL_PER_STAGE_CONSTANTS_NV 0x8535
+#endif
+
+#ifndef GL_NV_texture_compression_vtc
+#endif
+
+#ifndef GL_NV_texture_rectangle
+#define GL_TEXTURE_RECTANGLE_NV 0x84F5
+#define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6
+#define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7
+#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8
+#endif
+
+#ifndef GL_NV_texture_shader
+#define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C
+#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D
+#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E
+#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9
+#define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA
+#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB
+#define GL_DSDT_MAG_INTENSITY_NV 0x86DC
+#define GL_SHADER_CONSISTENT_NV 0x86DD
+#define GL_TEXTURE_SHADER_NV 0x86DE
+#define GL_SHADER_OPERATION_NV 0x86DF
+#define GL_CULL_MODES_NV 0x86E0
+#define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1
+#define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2
+#define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3
+#define GL_OFFSET_TEXTURE_2D_MATRIX_NV GL_OFFSET_TEXTURE_MATRIX_NV
+#define GL_OFFSET_TEXTURE_2D_SCALE_NV GL_OFFSET_TEXTURE_SCALE_NV
+#define GL_OFFSET_TEXTURE_2D_BIAS_NV GL_OFFSET_TEXTURE_BIAS_NV
+#define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4
+#define GL_CONST_EYE_NV 0x86E5
+#define GL_PASS_THROUGH_NV 0x86E6
+#define GL_CULL_FRAGMENT_NV 0x86E7
+#define GL_OFFSET_TEXTURE_2D_NV 0x86E8
+#define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9
+#define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA
+#define GL_DOT_PRODUCT_NV 0x86EC
+#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED
+#define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE
+#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0
+#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1
+#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2
+#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3
+#define GL_HILO_NV 0x86F4
+#define GL_DSDT_NV 0x86F5
+#define GL_DSDT_MAG_NV 0x86F6
+#define GL_DSDT_MAG_VIB_NV 0x86F7
+#define GL_HILO16_NV 0x86F8
+#define GL_SIGNED_HILO_NV 0x86F9
+#define GL_SIGNED_HILO16_NV 0x86FA
+#define GL_SIGNED_RGBA_NV 0x86FB
+#define GL_SIGNED_RGBA8_NV 0x86FC
+#define GL_SIGNED_RGB_NV 0x86FE
+#define GL_SIGNED_RGB8_NV 0x86FF
+#define GL_SIGNED_LUMINANCE_NV 0x8701
+#define GL_SIGNED_LUMINANCE8_NV 0x8702
+#define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703
+#define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704
+#define GL_SIGNED_ALPHA_NV 0x8705
+#define GL_SIGNED_ALPHA8_NV 0x8706
+#define GL_SIGNED_INTENSITY_NV 0x8707
+#define GL_SIGNED_INTENSITY8_NV 0x8708
+#define GL_DSDT8_NV 0x8709
+#define GL_DSDT8_MAG8_NV 0x870A
+#define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B
+#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C
+#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D
+#define GL_HI_SCALE_NV 0x870E
+#define GL_LO_SCALE_NV 0x870F
+#define GL_DS_SCALE_NV 0x8710
+#define GL_DT_SCALE_NV 0x8711
+#define GL_MAGNITUDE_SCALE_NV 0x8712
+#define GL_VIBRANCE_SCALE_NV 0x8713
+#define GL_HI_BIAS_NV 0x8714
+#define GL_LO_BIAS_NV 0x8715
+#define GL_DS_BIAS_NV 0x8716
+#define GL_DT_BIAS_NV 0x8717
+#define GL_MAGNITUDE_BIAS_NV 0x8718
+#define GL_VIBRANCE_BIAS_NV 0x8719
+#define GL_TEXTURE_BORDER_VALUES_NV 0x871A
+#define GL_TEXTURE_HI_SIZE_NV 0x871B
+#define GL_TEXTURE_LO_SIZE_NV 0x871C
+#define GL_TEXTURE_DS_SIZE_NV 0x871D
+#define GL_TEXTURE_DT_SIZE_NV 0x871E
+#define GL_TEXTURE_MAG_SIZE_NV 0x871F
+#endif
+
+#ifndef GL_NV_texture_shader2
+#define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF
+#endif
+
+#ifndef GL_NV_vertex_array_range2
+#define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533
+#endif
+
+#ifndef GL_NV_vertex_program
+#define GL_VERTEX_PROGRAM_NV 0x8620
+#define GL_VERTEX_STATE_PROGRAM_NV 0x8621
+#define GL_ATTRIB_ARRAY_SIZE_NV 0x8623
+#define GL_ATTRIB_ARRAY_STRIDE_NV 0x8624
+#define GL_ATTRIB_ARRAY_TYPE_NV 0x8625
+#define GL_CURRENT_ATTRIB_NV 0x8626
+#define GL_PROGRAM_LENGTH_NV 0x8627
+#define GL_PROGRAM_STRING_NV 0x8628
+#define GL_MODELVIEW_PROJECTION_NV 0x8629
+#define GL_IDENTITY_NV 0x862A
+#define GL_INVERSE_NV 0x862B
+#define GL_TRANSPOSE_NV 0x862C
+#define GL_INVERSE_TRANSPOSE_NV 0x862D
+#define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E
+#define GL_MAX_TRACK_MATRICES_NV 0x862F
+#define GL_MATRIX0_NV 0x8630
+#define GL_MATRIX1_NV 0x8631
+#define GL_MATRIX2_NV 0x8632
+#define GL_MATRIX3_NV 0x8633
+#define GL_MATRIX4_NV 0x8634
+#define GL_MATRIX5_NV 0x8635
+#define GL_MATRIX6_NV 0x8636
+#define GL_MATRIX7_NV 0x8637
+#define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640
+#define GL_CURRENT_MATRIX_NV 0x8641
+#define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642
+#define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643
+#define GL_PROGRAM_PARAMETER_NV 0x8644
+#define GL_ATTRIB_ARRAY_POINTER_NV 0x8645
+#define GL_PROGRAM_TARGET_NV 0x8646
+#define GL_PROGRAM_RESIDENT_NV 0x8647
+#define GL_TRACK_MATRIX_NV 0x8648
+#define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649
+#define GL_VERTEX_PROGRAM_BINDING_NV 0x864A
+#define GL_PROGRAM_ERROR_POSITION_NV 0x864B
+#define GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650
+#define GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651
+#define GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652
+#define GL_VERTEX_ATTRIB_ARRAY3_NV 0x8653
+#define GL_VERTEX_ATTRIB_ARRAY4_NV 0x8654
+#define GL_VERTEX_ATTRIB_ARRAY5_NV 0x8655
+#define GL_VERTEX_ATTRIB_ARRAY6_NV 0x8656
+#define GL_VERTEX_ATTRIB_ARRAY7_NV 0x8657
+#define GL_VERTEX_ATTRIB_ARRAY8_NV 0x8658
+#define GL_VERTEX_ATTRIB_ARRAY9_NV 0x8659
+#define GL_VERTEX_ATTRIB_ARRAY10_NV 0x865A
+#define GL_VERTEX_ATTRIB_ARRAY11_NV 0x865B
+#define GL_VERTEX_ATTRIB_ARRAY12_NV 0x865C
+#define GL_VERTEX_ATTRIB_ARRAY13_NV 0x865D
+#define GL_VERTEX_ATTRIB_ARRAY14_NV 0x865E
+#define GL_VERTEX_ATTRIB_ARRAY15_NV 0x865F
+#define GL_MAP1_VERTEX_ATTRIB0_4_NV 0x8660
+#define GL_MAP1_VERTEX_ATTRIB1_4_NV 0x8661
+#define GL_MAP1_VERTEX_ATTRIB2_4_NV 0x8662
+#define GL_MAP1_VERTEX_ATTRIB3_4_NV 0x8663
+#define GL_MAP1_VERTEX_ATTRIB4_4_NV 0x8664
+#define GL_MAP1_VERTEX_ATTRIB5_4_NV 0x8665
+#define GL_MAP1_VERTEX_ATTRIB6_4_NV 0x8666
+#define GL_MAP1_VERTEX_ATTRIB7_4_NV 0x8667
+#define GL_MAP1_VERTEX_ATTRIB8_4_NV 0x8668
+#define GL_MAP1_VERTEX_ATTRIB9_4_NV 0x8669
+#define GL_MAP1_VERTEX_ATTRIB10_4_NV 0x866A
+#define GL_MAP1_VERTEX_ATTRIB11_4_NV 0x866B
+#define GL_MAP1_VERTEX_ATTRIB12_4_NV 0x866C
+#define GL_MAP1_VERTEX_ATTRIB13_4_NV 0x866D
+#define GL_MAP1_VERTEX_ATTRIB14_4_NV 0x866E
+#define GL_MAP1_VERTEX_ATTRIB15_4_NV 0x866F
+#define GL_MAP2_VERTEX_ATTRIB0_4_NV 0x8670
+#define GL_MAP2_VERTEX_ATTRIB1_4_NV 0x8671
+#define GL_MAP2_VERTEX_ATTRIB2_4_NV 0x8672
+#define GL_MAP2_VERTEX_ATTRIB3_4_NV 0x8673
+#define GL_MAP2_VERTEX_ATTRIB4_4_NV 0x8674
+#define GL_MAP2_VERTEX_ATTRIB5_4_NV 0x8675
+#define GL_MAP2_VERTEX_ATTRIB6_4_NV 0x8676
+#define GL_MAP2_VERTEX_ATTRIB7_4_NV 0x8677
+#define GL_MAP2_VERTEX_ATTRIB8_4_NV 0x8678
+#define GL_MAP2_VERTEX_ATTRIB9_4_NV 0x8679
+#define GL_MAP2_VERTEX_ATTRIB10_4_NV 0x867A
+#define GL_MAP2_VERTEX_ATTRIB11_4_NV 0x867B
+#define GL_MAP2_VERTEX_ATTRIB12_4_NV 0x867C
+#define GL_MAP2_VERTEX_ATTRIB13_4_NV 0x867D
+#define GL_MAP2_VERTEX_ATTRIB14_4_NV 0x867E
+#define GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F
+#endif
+
+#ifndef GL_SGIX_texture_coordinate_clamp
+#define GL_TEXTURE_MAX_CLAMP_S_SGIX 0x8369
+#define GL_TEXTURE_MAX_CLAMP_T_SGIX 0x836A
+#define GL_TEXTURE_MAX_CLAMP_R_SGIX 0x836B
+#endif
+
+#ifndef GL_SGIX_scalebias_hint
+#define GL_SCALEBIAS_HINT_SGIX 0x8322
+#endif
+
+#ifndef GL_OML_interlace
+#define GL_INTERLACE_OML 0x8980
+#define GL_INTERLACE_READ_OML 0x8981
+#endif
+
+#ifndef GL_OML_subsample
+#define GL_FORMAT_SUBSAMPLE_24_24_OML 0x8982
+#define GL_FORMAT_SUBSAMPLE_244_244_OML 0x8983
+#endif
+
+#ifndef GL_OML_resample
+#define GL_PACK_RESAMPLE_OML 0x8984
+#define GL_UNPACK_RESAMPLE_OML 0x8985
+#define GL_RESAMPLE_REPLICATE_OML 0x8986
+#define GL_RESAMPLE_ZERO_FILL_OML 0x8987
+#define GL_RESAMPLE_AVERAGE_OML 0x8988
+#define GL_RESAMPLE_DECIMATE_OML 0x8989
+#endif
+
+#ifndef GL_NV_copy_depth_to_color
+#define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E
+#define GL_DEPTH_STENCIL_TO_BGRA_NV 0x886F
+#endif
+
+#ifndef GL_ATI_envmap_bumpmap
+#define GL_BUMP_ROT_MATRIX_ATI 0x8775
+#define GL_BUMP_ROT_MATRIX_SIZE_ATI 0x8776
+#define GL_BUMP_NUM_TEX_UNITS_ATI 0x8777
+#define GL_BUMP_TEX_UNITS_ATI 0x8778
+#define GL_DUDV_ATI 0x8779
+#define GL_DU8DV8_ATI 0x877A
+#define GL_BUMP_ENVMAP_ATI 0x877B
+#define GL_BUMP_TARGET_ATI 0x877C
+#endif
+
+#ifndef GL_ATI_fragment_shader
+#define GL_FRAGMENT_SHADER_ATI 0x8920
+#define GL_REG_0_ATI 0x8921
+#define GL_REG_1_ATI 0x8922
+#define GL_REG_2_ATI 0x8923
+#define GL_REG_3_ATI 0x8924
+#define GL_REG_4_ATI 0x8925
+#define GL_REG_5_ATI 0x8926
+#define GL_REG_6_ATI 0x8927
+#define GL_REG_7_ATI 0x8928
+#define GL_REG_8_ATI 0x8929
+#define GL_REG_9_ATI 0x892A
+#define GL_REG_10_ATI 0x892B
+#define GL_REG_11_ATI 0x892C
+#define GL_REG_12_ATI 0x892D
+#define GL_REG_13_ATI 0x892E
+#define GL_REG_14_ATI 0x892F
+#define GL_REG_15_ATI 0x8930
+#define GL_REG_16_ATI 0x8931
+#define GL_REG_17_ATI 0x8932
+#define GL_REG_18_ATI 0x8933
+#define GL_REG_19_ATI 0x8934
+#define GL_REG_20_ATI 0x8935
+#define GL_REG_21_ATI 0x8936
+#define GL_REG_22_ATI 0x8937
+#define GL_REG_23_ATI 0x8938
+#define GL_REG_24_ATI 0x8939
+#define GL_REG_25_ATI 0x893A
+#define GL_REG_26_ATI 0x893B
+#define GL_REG_27_ATI 0x893C
+#define GL_REG_28_ATI 0x893D
+#define GL_REG_29_ATI 0x893E
+#define GL_REG_30_ATI 0x893F
+#define GL_REG_31_ATI 0x8940
+#define GL_CON_0_ATI 0x8941
+#define GL_CON_1_ATI 0x8942
+#define GL_CON_2_ATI 0x8943
+#define GL_CON_3_ATI 0x8944
+#define GL_CON_4_ATI 0x8945
+#define GL_CON_5_ATI 0x8946
+#define GL_CON_6_ATI 0x8947
+#define GL_CON_7_ATI 0x8948
+#define GL_CON_8_ATI 0x8949
+#define GL_CON_9_ATI 0x894A
+#define GL_CON_10_ATI 0x894B
+#define GL_CON_11_ATI 0x894C
+#define GL_CON_12_ATI 0x894D
+#define GL_CON_13_ATI 0x894E
+#define GL_CON_14_ATI 0x894F
+#define GL_CON_15_ATI 0x8950
+#define GL_CON_16_ATI 0x8951
+#define GL_CON_17_ATI 0x8952
+#define GL_CON_18_ATI 0x8953
+#define GL_CON_19_ATI 0x8954
+#define GL_CON_20_ATI 0x8955
+#define GL_CON_21_ATI 0x8956
+#define GL_CON_22_ATI 0x8957
+#define GL_CON_23_ATI 0x8958
+#define GL_CON_24_ATI 0x8959
+#define GL_CON_25_ATI 0x895A
+#define GL_CON_26_ATI 0x895B
+#define GL_CON_27_ATI 0x895C
+#define GL_CON_28_ATI 0x895D
+#define GL_CON_29_ATI 0x895E
+#define GL_CON_30_ATI 0x895F
+#define GL_CON_31_ATI 0x8960
+#define GL_MOV_ATI 0x8961
+#define GL_ADD_ATI 0x8963
+#define GL_MUL_ATI 0x8964
+#define GL_SUB_ATI 0x8965
+#define GL_DOT3_ATI 0x8966
+#define GL_DOT4_ATI 0x8967
+#define GL_MAD_ATI 0x8968
+#define GL_LERP_ATI 0x8969
+#define GL_CND_ATI 0x896A
+#define GL_CND0_ATI 0x896B
+#define GL_DOT2_ADD_ATI 0x896C
+#define GL_SECONDARY_INTERPOLATOR_ATI 0x896D
+#define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E
+#define GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F
+#define GL_NUM_PASSES_ATI 0x8970
+#define GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971
+#define GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972
+#define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973
+#define GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974
+#define GL_COLOR_ALPHA_PAIRING_ATI 0x8975
+#define GL_SWIZZLE_STR_ATI 0x8976
+#define GL_SWIZZLE_STQ_ATI 0x8977
+#define GL_SWIZZLE_STR_DR_ATI 0x8978
+#define GL_SWIZZLE_STQ_DQ_ATI 0x8979
+#define GL_SWIZZLE_STRQ_ATI 0x897A
+#define GL_SWIZZLE_STRQ_DQ_ATI 0x897B
+#define GL_RED_BIT_ATI 0x00000001
+#define GL_GREEN_BIT_ATI 0x00000002
+#define GL_BLUE_BIT_ATI 0x00000004
+#define GL_2X_BIT_ATI 0x00000001
+#define GL_4X_BIT_ATI 0x00000002
+#define GL_8X_BIT_ATI 0x00000004
+#define GL_HALF_BIT_ATI 0x00000008
+#define GL_QUARTER_BIT_ATI 0x00000010
+#define GL_EIGHTH_BIT_ATI 0x00000020
+#define GL_SATURATE_BIT_ATI 0x00000040
+#define GL_COMP_BIT_ATI 0x00000002
+#define GL_NEGATE_BIT_ATI 0x00000004
+#define GL_BIAS_BIT_ATI 0x00000008
+#endif
+
+#ifndef GL_ATI_pn_triangles
+#define GL_PN_TRIANGLES_ATI 0x87F0
+#define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1
+#define GL_PN_TRIANGLES_POINT_MODE_ATI 0x87F2
+#define GL_PN_TRIANGLES_NORMAL_MODE_ATI 0x87F3
+#define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4
+#define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5
+#define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6
+#define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7
+#define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8
+#endif
+
+#ifndef GL_ATI_vertex_array_object
+#define GL_STATIC_ATI 0x8760
+#define GL_DYNAMIC_ATI 0x8761
+#define GL_PRESERVE_ATI 0x8762
+#define GL_DISCARD_ATI 0x8763
+#define GL_OBJECT_BUFFER_SIZE_ATI 0x8764
+#define GL_OBJECT_BUFFER_USAGE_ATI 0x8765
+#define GL_ARRAY_OBJECT_BUFFER_ATI 0x8766
+#define GL_ARRAY_OBJECT_OFFSET_ATI 0x8767
+#endif
+
+#ifndef GL_EXT_vertex_shader
+#define GL_VERTEX_SHADER_EXT 0x8780
+#define GL_VERTEX_SHADER_BINDING_EXT 0x8781
+#define GL_OP_INDEX_EXT 0x8782
+#define GL_OP_NEGATE_EXT 0x8783
+#define GL_OP_DOT3_EXT 0x8784
+#define GL_OP_DOT4_EXT 0x8785
+#define GL_OP_MUL_EXT 0x8786
+#define GL_OP_ADD_EXT 0x8787
+#define GL_OP_MADD_EXT 0x8788
+#define GL_OP_FRAC_EXT 0x8789
+#define GL_OP_MAX_EXT 0x878A
+#define GL_OP_MIN_EXT 0x878B
+#define GL_OP_SET_GE_EXT 0x878C
+#define GL_OP_SET_LT_EXT 0x878D
+#define GL_OP_CLAMP_EXT 0x878E
+#define GL_OP_FLOOR_EXT 0x878F
+#define GL_OP_ROUND_EXT 0x8790
+#define GL_OP_EXP_BASE_2_EXT 0x8791
+#define GL_OP_LOG_BASE_2_EXT 0x8792
+#define GL_OP_POWER_EXT 0x8793
+#define GL_OP_RECIP_EXT 0x8794
+#define GL_OP_RECIP_SQRT_EXT 0x8795
+#define GL_OP_SUB_EXT 0x8796
+#define GL_OP_CROSS_PRODUCT_EXT 0x8797
+#define GL_OP_MULTIPLY_MATRIX_EXT 0x8798
+#define GL_OP_MOV_EXT 0x8799
+#define GL_OUTPUT_VERTEX_EXT 0x879A
+#define GL_OUTPUT_COLOR0_EXT 0x879B
+#define GL_OUTPUT_COLOR1_EXT 0x879C
+#define GL_OUTPUT_TEXTURE_COORD0_EXT 0x879D
+#define GL_OUTPUT_TEXTURE_COORD1_EXT 0x879E
+#define GL_OUTPUT_TEXTURE_COORD2_EXT 0x879F
+#define GL_OUTPUT_TEXTURE_COORD3_EXT 0x87A0
+#define GL_OUTPUT_TEXTURE_COORD4_EXT 0x87A1
+#define GL_OUTPUT_TEXTURE_COORD5_EXT 0x87A2
+#define GL_OUTPUT_TEXTURE_COORD6_EXT 0x87A3
+#define GL_OUTPUT_TEXTURE_COORD7_EXT 0x87A4
+#define GL_OUTPUT_TEXTURE_COORD8_EXT 0x87A5
+#define GL_OUTPUT_TEXTURE_COORD9_EXT 0x87A6
+#define GL_OUTPUT_TEXTURE_COORD10_EXT 0x87A7
+#define GL_OUTPUT_TEXTURE_COORD11_EXT 0x87A8
+#define GL_OUTPUT_TEXTURE_COORD12_EXT 0x87A9
+#define GL_OUTPUT_TEXTURE_COORD13_EXT 0x87AA
+#define GL_OUTPUT_TEXTURE_COORD14_EXT 0x87AB
+#define GL_OUTPUT_TEXTURE_COORD15_EXT 0x87AC
+#define GL_OUTPUT_TEXTURE_COORD16_EXT 0x87AD
+#define GL_OUTPUT_TEXTURE_COORD17_EXT 0x87AE
+#define GL_OUTPUT_TEXTURE_COORD18_EXT 0x87AF
+#define GL_OUTPUT_TEXTURE_COORD19_EXT 0x87B0
+#define GL_OUTPUT_TEXTURE_COORD20_EXT 0x87B1
+#define GL_OUTPUT_TEXTURE_COORD21_EXT 0x87B2
+#define GL_OUTPUT_TEXTURE_COORD22_EXT 0x87B3
+#define GL_OUTPUT_TEXTURE_COORD23_EXT 0x87B4
+#define GL_OUTPUT_TEXTURE_COORD24_EXT 0x87B5
+#define GL_OUTPUT_TEXTURE_COORD25_EXT 0x87B6
+#define GL_OUTPUT_TEXTURE_COORD26_EXT 0x87B7
+#define GL_OUTPUT_TEXTURE_COORD27_EXT 0x87B8
+#define GL_OUTPUT_TEXTURE_COORD28_EXT 0x87B9
+#define GL_OUTPUT_TEXTURE_COORD29_EXT 0x87BA
+#define GL_OUTPUT_TEXTURE_COORD30_EXT 0x87BB
+#define GL_OUTPUT_TEXTURE_COORD31_EXT 0x87BC
+#define GL_OUTPUT_FOG_EXT 0x87BD
+#define GL_SCALAR_EXT 0x87BE
+#define GL_VECTOR_EXT 0x87BF
+#define GL_MATRIX_EXT 0x87C0
+#define GL_VARIANT_EXT 0x87C1
+#define GL_INVARIANT_EXT 0x87C2
+#define GL_LOCAL_CONSTANT_EXT 0x87C3
+#define GL_LOCAL_EXT 0x87C4
+#define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5
+#define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6
+#define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7
+#define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8
+#define GL_MAX_VERTEX_SHADER_LOCALS_EXT 0x87C9
+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA
+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB
+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC
+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CD
+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE
+#define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF
+#define GL_VERTEX_SHADER_VARIANTS_EXT 0x87D0
+#define GL_VERTEX_SHADER_INVARIANTS_EXT 0x87D1
+#define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2
+#define GL_VERTEX_SHADER_LOCALS_EXT 0x87D3
+#define GL_VERTEX_SHADER_OPTIMIZED_EXT 0x87D4
+#define GL_X_EXT 0x87D5
+#define GL_Y_EXT 0x87D6
+#define GL_Z_EXT 0x87D7
+#define GL_W_EXT 0x87D8
+#define GL_NEGATIVE_X_EXT 0x87D9
+#define GL_NEGATIVE_Y_EXT 0x87DA
+#define GL_NEGATIVE_Z_EXT 0x87DB
+#define GL_NEGATIVE_W_EXT 0x87DC
+#define GL_ZERO_EXT 0x87DD
+#define GL_ONE_EXT 0x87DE
+#define GL_NEGATIVE_ONE_EXT 0x87DF
+#define GL_NORMALIZED_RANGE_EXT 0x87E0
+#define GL_FULL_RANGE_EXT 0x87E1
+#define GL_CURRENT_VERTEX_EXT 0x87E2
+#define GL_MVP_MATRIX_EXT 0x87E3
+#define GL_VARIANT_VALUE_EXT 0x87E4
+#define GL_VARIANT_DATATYPE_EXT 0x87E5
+#define GL_VARIANT_ARRAY_STRIDE_EXT 0x87E6
+#define GL_VARIANT_ARRAY_TYPE_EXT 0x87E7
+#define GL_VARIANT_ARRAY_EXT 0x87E8
+#define GL_VARIANT_ARRAY_POINTER_EXT 0x87E9
+#define GL_INVARIANT_VALUE_EXT 0x87EA
+#define GL_INVARIANT_DATATYPE_EXT 0x87EB
+#define GL_LOCAL_CONSTANT_VALUE_EXT 0x87EC
+#define GL_LOCAL_CONSTANT_DATATYPE_EXT 0x87ED
+#endif
+
+#ifndef GL_ATI_vertex_streams
+#define GL_MAX_VERTEX_STREAMS_ATI 0x876B
+#define GL_VERTEX_STREAM0_ATI 0x876C
+#define GL_VERTEX_STREAM1_ATI 0x876D
+#define GL_VERTEX_STREAM2_ATI 0x876E
+#define GL_VERTEX_STREAM3_ATI 0x876F
+#define GL_VERTEX_STREAM4_ATI 0x8770
+#define GL_VERTEX_STREAM5_ATI 0x8771
+#define GL_VERTEX_STREAM6_ATI 0x8772
+#define GL_VERTEX_STREAM7_ATI 0x8773
+#define GL_VERTEX_SOURCE_ATI 0x8774
+#endif
+
+#ifndef GL_ATI_element_array
+#define GL_ELEMENT_ARRAY_ATI 0x8768
+#define GL_ELEMENT_ARRAY_TYPE_ATI 0x8769
+#define GL_ELEMENT_ARRAY_POINTER_ATI 0x876A
+#endif
+
+#ifndef GL_SUN_mesh_array
+#define GL_QUAD_MESH_SUN 0x8614
+#define GL_TRIANGLE_MESH_SUN 0x8615
+#endif
+
+#ifndef GL_SUN_slice_accum
+#define GL_SLICE_ACCUM_SUN 0x85CC
+#endif
+
+#ifndef GL_NV_multisample_filter_hint
+#define GL_MULTISAMPLE_FILTER_HINT_NV 0x8534
+#endif
+
+#ifndef GL_NV_depth_clamp
+#define GL_DEPTH_CLAMP_NV 0x864F
+#endif
+
+#ifndef GL_NV_occlusion_query
+#define GL_PIXEL_COUNTER_BITS_NV 0x8864
+#define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865
+#define GL_PIXEL_COUNT_NV 0x8866
+#define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867
+#endif
+
+#ifndef GL_NV_point_sprite
+#define GL_POINT_SPRITE_NV 0x8861
+#define GL_COORD_REPLACE_NV 0x8862
+#define GL_POINT_SPRITE_R_MODE_NV 0x8863
+#endif
+
+#ifndef GL_NV_texture_shader3
+#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850
+#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851
+#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852
+#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853
+#define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854
+#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855
+#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856
+#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857
+#define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858
+#define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859
+#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A
+#define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B
+#define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C
+#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D
+#define GL_HILO8_NV 0x885E
+#define GL_SIGNED_HILO8_NV 0x885F
+#define GL_FORCE_BLUE_TO_ONE_NV 0x8860
+#endif
+
+#ifndef GL_NV_vertex_program1_1
+#endif
+
+#ifndef GL_EXT_shadow_funcs
+#endif
+
+#ifndef GL_EXT_stencil_two_side
+#define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910
+#define GL_ACTIVE_STENCIL_FACE_EXT 0x8911
+#endif
+
+#ifndef GL_ATI_text_fragment_shader
+#define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200
+#endif
+
+#ifndef GL_APPLE_client_storage
+#define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2
+#endif
+
+#ifndef GL_APPLE_element_array
+#define GL_ELEMENT_ARRAY_APPLE 0x8768
+#define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8769
+#define GL_ELEMENT_ARRAY_POINTER_APPLE 0x876A
+#endif
+
+#ifndef GL_APPLE_fence
+#define GL_DRAW_PIXELS_APPLE 0x8A0A
+#define GL_FENCE_APPLE 0x8A0B
+#endif
+
+#ifndef GL_APPLE_vertex_array_object
+#define GL_VERTEX_ARRAY_BINDING_APPLE 0x85B5
+#endif
+
+#ifndef GL_APPLE_vertex_array_range
+#define GL_VERTEX_ARRAY_RANGE_APPLE 0x851D
+#define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E
+#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F
+#define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521
+#define GL_STORAGE_CACHED_APPLE 0x85BE
+#define GL_STORAGE_SHARED_APPLE 0x85BF
+#endif
+
+#ifndef GL_APPLE_ycbcr_422
+#define GL_YCBCR_422_APPLE 0x85B9
+#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA
+#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB
+#endif
+
+#ifndef GL_S3_s3tc
+#define GL_RGB_S3TC 0x83A0
+#define GL_RGB4_S3TC 0x83A1
+#define GL_RGBA_S3TC 0x83A2
+#define GL_RGBA4_S3TC 0x83A3
+#endif
+
+#ifndef GL_ATI_draw_buffers
+#define GL_MAX_DRAW_BUFFERS_ATI 0x8824
+#define GL_DRAW_BUFFER0_ATI 0x8825
+#define GL_DRAW_BUFFER1_ATI 0x8826
+#define GL_DRAW_BUFFER2_ATI 0x8827
+#define GL_DRAW_BUFFER3_ATI 0x8828
+#define GL_DRAW_BUFFER4_ATI 0x8829
+#define GL_DRAW_BUFFER5_ATI 0x882A
+#define GL_DRAW_BUFFER6_ATI 0x882B
+#define GL_DRAW_BUFFER7_ATI 0x882C
+#define GL_DRAW_BUFFER8_ATI 0x882D
+#define GL_DRAW_BUFFER9_ATI 0x882E
+#define GL_DRAW_BUFFER10_ATI 0x882F
+#define GL_DRAW_BUFFER11_ATI 0x8830
+#define GL_DRAW_BUFFER12_ATI 0x8831
+#define GL_DRAW_BUFFER13_ATI 0x8832
+#define GL_DRAW_BUFFER14_ATI 0x8833
+#define GL_DRAW_BUFFER15_ATI 0x8834
+#endif
+
+#ifndef GL_ATI_pixel_format_float
+#define GL_TYPE_RGBA_FLOAT_ATI 0x8820
+#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835
+#endif
+
+#ifndef GL_ATI_texture_env_combine3
+#define GL_MODULATE_ADD_ATI 0x8744
+#define GL_MODULATE_SIGNED_ADD_ATI 0x8745
+#define GL_MODULATE_SUBTRACT_ATI 0x8746
+#endif
+
+#ifndef GL_ATI_texture_float
+#define GL_RGBA_FLOAT32_ATI 0x8814
+#define GL_RGB_FLOAT32_ATI 0x8815
+#define GL_ALPHA_FLOAT32_ATI 0x8816
+#define GL_INTENSITY_FLOAT32_ATI 0x8817
+#define GL_LUMINANCE_FLOAT32_ATI 0x8818
+#define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819
+#define GL_RGBA_FLOAT16_ATI 0x881A
+#define GL_RGB_FLOAT16_ATI 0x881B
+#define GL_ALPHA_FLOAT16_ATI 0x881C
+#define GL_INTENSITY_FLOAT16_ATI 0x881D
+#define GL_LUMINANCE_FLOAT16_ATI 0x881E
+#define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F
+#endif
+
+#ifndef GL_NV_float_buffer
+#define GL_FLOAT_R_NV 0x8880
+#define GL_FLOAT_RG_NV 0x8881
+#define GL_FLOAT_RGB_NV 0x8882
+#define GL_FLOAT_RGBA_NV 0x8883
+#define GL_FLOAT_R16_NV 0x8884
+#define GL_FLOAT_R32_NV 0x8885
+#define GL_FLOAT_RG16_NV 0x8886
+#define GL_FLOAT_RG32_NV 0x8887
+#define GL_FLOAT_RGB16_NV 0x8888
+#define GL_FLOAT_RGB32_NV 0x8889
+#define GL_FLOAT_RGBA16_NV 0x888A
+#define GL_FLOAT_RGBA32_NV 0x888B
+#define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C
+#define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D
+#define GL_FLOAT_RGBA_MODE_NV 0x888E
+#endif
+
+#ifndef GL_NV_fragment_program
+#define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868
+#define GL_FRAGMENT_PROGRAM_NV 0x8870
+#define GL_MAX_TEXTURE_COORDS_NV 0x8871
+#define GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872
+#define GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873
+#define GL_PROGRAM_ERROR_STRING_NV 0x8874
+#endif
+
+#ifndef GL_NV_half_float
+#define GL_HALF_FLOAT_NV 0x140B
+#endif
+
+#ifndef GL_NV_pixel_data_range
+#define GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878
+#define GL_READ_PIXEL_DATA_RANGE_NV 0x8879
+#define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A
+#define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B
+#define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C
+#define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D
+#endif
+
+#ifndef GL_NV_primitive_restart
+#define GL_PRIMITIVE_RESTART_NV 0x8558
+#define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559
+#endif
+
+#ifndef GL_NV_texture_expand_normal
+#define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F
+#endif
+
+#ifndef GL_NV_vertex_program2
+#endif
+
+#ifndef GL_ATI_map_object_buffer
+#endif
+
+#ifndef GL_ATI_separate_stencil
+#define GL_STENCIL_BACK_FUNC_ATI 0x8800
+#define GL_STENCIL_BACK_FAIL_ATI 0x8801
+#define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802
+#define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803
+#endif
+
+#ifndef GL_ATI_vertex_attrib_array_object
+#endif
+
+#ifndef GL_OES_read_format
+#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A
+#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
+#endif
+
+#ifndef GL_EXT_depth_bounds_test
+#define GL_DEPTH_BOUNDS_TEST_EXT 0x8890
+#define GL_DEPTH_BOUNDS_EXT 0x8891
+#endif
+
+#ifndef GL_EXT_texture_mirror_clamp
+#define GL_MIRROR_CLAMP_EXT 0x8742
+#define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743
+#define GL_MIRROR_CLAMP_TO_BORDER_EXT 0x8912
+#endif
+
+#ifndef GL_EXT_blend_equation_separate
+#define GL_BLEND_EQUATION_RGB_EXT GL_BLEND_EQUATION
+#define GL_BLEND_EQUATION_ALPHA_EXT 0x883D
+#endif
+
+#ifndef GL_MESA_pack_invert
+#define GL_PACK_INVERT_MESA 0x8758
+#endif
+
+#ifndef GL_MESA_ycbcr_texture
+#define GL_UNSIGNED_SHORT_8_8_MESA 0x85BA
+#define GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB
+#define GL_YCBCR_MESA 0x8757
+#endif
+
+#ifndef GL_EXT_pixel_buffer_object
+#define GL_PIXEL_PACK_BUFFER_EXT 0x88EB
+#define GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC
+#define GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED
+#define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF
+#endif
+
+#ifndef GL_NV_fragment_program_option
+#endif
+
+#ifndef GL_NV_fragment_program2
+#define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4
+#define GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5
+#define GL_MAX_PROGRAM_IF_DEPTH_NV 0x88F6
+#define GL_MAX_PROGRAM_LOOP_DEPTH_NV 0x88F7
+#define GL_MAX_PROGRAM_LOOP_COUNT_NV 0x88F8
+#endif
+
+#ifndef GL_NV_vertex_program2_option
+/* reuse GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
+/* reuse GL_MAX_PROGRAM_CALL_DEPTH_NV */
+#endif
+
+#ifndef GL_NV_vertex_program3
+/* reuse GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
+#endif
+
+#ifndef GL_EXT_framebuffer_object
+#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506
+#define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8
+#define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6
+#define GL_RENDERBUFFER_BINDING_EXT 0x8CA7
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4
+#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5
+#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6
+#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7
+#define GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT 0x8CD8
+#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9
+#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA
+#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB
+#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC
+#define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD
+#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF
+#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0
+#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1
+#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2
+#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3
+#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4
+#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5
+#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6
+#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7
+#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8
+#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9
+#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA
+#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB
+#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC
+#define GL_COLOR_ATTACHMENT13_EXT 0x8CED
+#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE
+#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF
+#define GL_DEPTH_ATTACHMENT_EXT 0x8D00
+#define GL_STENCIL_ATTACHMENT_EXT 0x8D20
+#define GL_FRAMEBUFFER_EXT 0x8D40
+#define GL_RENDERBUFFER_EXT 0x8D41
+#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42
+#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43
+#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44
+#define GL_STENCIL_INDEX1_EXT 0x8D46
+#define GL_STENCIL_INDEX4_EXT 0x8D47
+#define GL_STENCIL_INDEX8_EXT 0x8D48
+#define GL_STENCIL_INDEX16_EXT 0x8D49
+#define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50
+#define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51
+#define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52
+#define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53
+#define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54
+#define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55
+#endif
+
+#ifndef GL_GREMEDY_string_marker
+#endif
+
+
+/*************************************************************/
+
+#include <stddef.h>
+#ifndef GL_VERSION_2_0
+/* GL type for program/shader text */
+typedef char GLchar; /* native character */
+#endif
+
+#ifndef GL_VERSION_1_5
+/* GL types for handling large vertex buffer objects */
+typedef ptrdiff_t GLintptr;
+typedef ptrdiff_t GLsizeiptr;
+#endif
+
+#ifndef GL_ARB_vertex_buffer_object
+/* GL types for handling large vertex buffer objects */
+typedef ptrdiff_t GLintptrARB;
+typedef ptrdiff_t GLsizeiptrARB;
+#endif
+
+#ifndef GL_ARB_shader_objects
+/* GL types for handling shader object handles and program/shader text */
+typedef char GLcharARB; /* native character */
+typedef unsigned int GLhandleARB; /* shader object handle */
+#endif
+
+/* GL types for "half" precision (s10e5) float data in host memory */
+#ifndef GL_ARB_half_float_pixel
+typedef unsigned short GLhalfARB;
+#endif
+
+#ifndef GL_NV_half_float
+typedef unsigned short GLhalfNV;
+#endif
+
+#ifndef GL_VERSION_1_2
+#define GL_VERSION_1_2 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBlendColor (GLclampf, GLclampf, GLclampf, GLclampf);
+GLAPI void APIENTRY glBlendEquation (GLenum);
+GLAPI void APIENTRY glDrawRangeElements (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *);
+GLAPI void APIENTRY glColorTable (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
+GLAPI void APIENTRY glColorTableParameterfv (GLenum, GLenum, const GLfloat *);
+GLAPI void APIENTRY glColorTableParameteriv (GLenum, GLenum, const GLint *);
+GLAPI void APIENTRY glCopyColorTable (GLenum, GLenum, GLint, GLint, GLsizei);
+GLAPI void APIENTRY glGetColorTable (GLenum, GLenum, GLenum, GLvoid *);
+GLAPI void APIENTRY glGetColorTableParameterfv (GLenum, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetColorTableParameteriv (GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glColorSubTable (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
+GLAPI void APIENTRY glCopyColorSubTable (GLenum, GLsizei, GLint, GLint, GLsizei);
+GLAPI void APIENTRY glConvolutionFilter1D (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
+GLAPI void APIENTRY glConvolutionFilter2D (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
+GLAPI void APIENTRY glConvolutionParameterf (GLenum, GLenum, GLfloat);
+GLAPI void APIENTRY glConvolutionParameterfv (GLenum, GLenum, const GLfloat *);
+GLAPI void APIENTRY glConvolutionParameteri (GLenum, GLenum, GLint);
+GLAPI void APIENTRY glConvolutionParameteriv (GLenum, GLenum, const GLint *);
+GLAPI void APIENTRY glCopyConvolutionFilter1D (GLenum, GLenum, GLint, GLint, GLsizei);
+GLAPI void APIENTRY glCopyConvolutionFilter2D (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei);
+GLAPI void APIENTRY glGetConvolutionFilter (GLenum, GLenum, GLenum, GLvoid *);
+GLAPI void APIENTRY glGetConvolutionParameterfv (GLenum, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetConvolutionParameteriv (GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glGetSeparableFilter (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *);
+GLAPI void APIENTRY glSeparableFilter2D (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *);
+GLAPI void APIENTRY glGetHistogram (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
+GLAPI void APIENTRY glGetHistogramParameterfv (GLenum, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetHistogramParameteriv (GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glGetMinmax (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
+GLAPI void APIENTRY glGetMinmaxParameterfv (GLenum, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetMinmaxParameteriv (GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glHistogram (GLenum, GLsizei, GLenum, GLboolean);
+GLAPI void APIENTRY glMinmax (GLenum, GLenum, GLboolean);
+GLAPI void APIENTRY glResetHistogram (GLenum);
+GLAPI void APIENTRY glResetMinmax (GLenum);
+GLAPI void APIENTRY glTexImage3D (GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
+GLAPI void APIENTRY glTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
+GLAPI void APIENTRY glCopyTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
+typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params);
+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params);
+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
+typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
+typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
+typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink);
+typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target);
+typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target);
+typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+#endif
+
+#ifndef GL_VERSION_1_3
+#define GL_VERSION_1_3 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glActiveTexture (GLenum);
+GLAPI void APIENTRY glClientActiveTexture (GLenum);
+GLAPI void APIENTRY glMultiTexCoord1d (GLenum, GLdouble);
+GLAPI void APIENTRY glMultiTexCoord1dv (GLenum, const GLdouble *);
+GLAPI void APIENTRY glMultiTexCoord1f (GLenum, GLfloat);
+GLAPI void APIENTRY glMultiTexCoord1fv (GLenum, const GLfloat *);
+GLAPI void APIENTRY glMultiTexCoord1i (GLenum, GLint);
+GLAPI void APIENTRY glMultiTexCoord1iv (GLenum, const GLint *);
+GLAPI void APIENTRY glMultiTexCoord1s (GLenum, GLshort);
+GLAPI void APIENTRY glMultiTexCoord1sv (GLenum, const GLshort *);
+GLAPI void APIENTRY glMultiTexCoord2d (GLenum, GLdouble, GLdouble);
+GLAPI void APIENTRY glMultiTexCoord2dv (GLenum, const GLdouble *);
+GLAPI void APIENTRY glMultiTexCoord2f (GLenum, GLfloat, GLfloat);
+GLAPI void APIENTRY glMultiTexCoord2fv (GLenum, const GLfloat *);
+GLAPI void APIENTRY glMultiTexCoord2i (GLenum, GLint, GLint);
+GLAPI void APIENTRY glMultiTexCoord2iv (GLenum, const GLint *);
+GLAPI void APIENTRY glMultiTexCoord2s (GLenum, GLshort, GLshort);
+GLAPI void APIENTRY glMultiTexCoord2sv (GLenum, const GLshort *);
+GLAPI void APIENTRY glMultiTexCoord3d (GLenum, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glMultiTexCoord3dv (GLenum, const GLdouble *);
+GLAPI void APIENTRY glMultiTexCoord3f (GLenum, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glMultiTexCoord3fv (GLenum, const GLfloat *);
+GLAPI void APIENTRY glMultiTexCoord3i (GLenum, GLint, GLint, GLint);
+GLAPI void APIENTRY glMultiTexCoord3iv (GLenum, const GLint *);
+GLAPI void APIENTRY glMultiTexCoord3s (GLenum, GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glMultiTexCoord3sv (GLenum, const GLshort *);
+GLAPI void APIENTRY glMultiTexCoord4d (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glMultiTexCoord4dv (GLenum, const GLdouble *);
+GLAPI void APIENTRY glMultiTexCoord4f (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glMultiTexCoord4fv (GLenum, const GLfloat *);
+GLAPI void APIENTRY glMultiTexCoord4i (GLenum, GLint, GLint, GLint, GLint);
+GLAPI void APIENTRY glMultiTexCoord4iv (GLenum, const GLint *);
+GLAPI void APIENTRY glMultiTexCoord4s (GLenum, GLshort, GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glMultiTexCoord4sv (GLenum, const GLshort *);
+GLAPI void APIENTRY glLoadTransposeMatrixf (const GLfloat *);
+GLAPI void APIENTRY glLoadTransposeMatrixd (const GLdouble *);
+GLAPI void APIENTRY glMultTransposeMatrixf (const GLfloat *);
+GLAPI void APIENTRY glMultTransposeMatrixd (const GLdouble *);
+GLAPI void APIENTRY glSampleCoverage (GLclampf, GLboolean);
+GLAPI void APIENTRY glCompressedTexImage3D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glCompressedTexImage2D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glCompressedTexImage1D (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glCompressedTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glCompressedTexSubImage1D (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glGetCompressedTexImage (GLenum, GLint, GLvoid *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m);
+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m);
+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m);
+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m);
+typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img);
+#endif
+
+#ifndef GL_VERSION_1_4
+#define GL_VERSION_1_4 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBlendFuncSeparate (GLenum, GLenum, GLenum, GLenum);
+GLAPI void APIENTRY glFogCoordf (GLfloat);
+GLAPI void APIENTRY glFogCoordfv (const GLfloat *);
+GLAPI void APIENTRY glFogCoordd (GLdouble);
+GLAPI void APIENTRY glFogCoorddv (const GLdouble *);
+GLAPI void APIENTRY glFogCoordPointer (GLenum, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glMultiDrawArrays (GLenum, GLint *, GLsizei *, GLsizei);
+GLAPI void APIENTRY glMultiDrawElements (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
+GLAPI void APIENTRY glPointParameterf (GLenum, GLfloat);
+GLAPI void APIENTRY glPointParameterfv (GLenum, const GLfloat *);
+GLAPI void APIENTRY glPointParameteri (GLenum, GLint);
+GLAPI void APIENTRY glPointParameteriv (GLenum, const GLint *);
+GLAPI void APIENTRY glSecondaryColor3b (GLbyte, GLbyte, GLbyte);
+GLAPI void APIENTRY glSecondaryColor3bv (const GLbyte *);
+GLAPI void APIENTRY glSecondaryColor3d (GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glSecondaryColor3dv (const GLdouble *);
+GLAPI void APIENTRY glSecondaryColor3f (GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glSecondaryColor3fv (const GLfloat *);
+GLAPI void APIENTRY glSecondaryColor3i (GLint, GLint, GLint);
+GLAPI void APIENTRY glSecondaryColor3iv (const GLint *);
+GLAPI void APIENTRY glSecondaryColor3s (GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glSecondaryColor3sv (const GLshort *);
+GLAPI void APIENTRY glSecondaryColor3ub (GLubyte, GLubyte, GLubyte);
+GLAPI void APIENTRY glSecondaryColor3ubv (const GLubyte *);
+GLAPI void APIENTRY glSecondaryColor3ui (GLuint, GLuint, GLuint);
+GLAPI void APIENTRY glSecondaryColor3uiv (const GLuint *);
+GLAPI void APIENTRY glSecondaryColor3us (GLushort, GLushort, GLushort);
+GLAPI void APIENTRY glSecondaryColor3usv (const GLushort *);
+GLAPI void APIENTRY glSecondaryColorPointer (GLint, GLenum, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glWindowPos2d (GLdouble, GLdouble);
+GLAPI void APIENTRY glWindowPos2dv (const GLdouble *);
+GLAPI void APIENTRY glWindowPos2f (GLfloat, GLfloat);
+GLAPI void APIENTRY glWindowPos2fv (const GLfloat *);
+GLAPI void APIENTRY glWindowPos2i (GLint, GLint);
+GLAPI void APIENTRY glWindowPos2iv (const GLint *);
+GLAPI void APIENTRY glWindowPos2s (GLshort, GLshort);
+GLAPI void APIENTRY glWindowPos2sv (const GLshort *);
+GLAPI void APIENTRY glWindowPos3d (GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glWindowPos3dv (const GLdouble *);
+GLAPI void APIENTRY glWindowPos3f (GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glWindowPos3fv (const GLfloat *);
+GLAPI void APIENTRY glWindowPos3i (GLint, GLint, GLint);
+GLAPI void APIENTRY glWindowPos3iv (const GLint *);
+GLAPI void APIENTRY glWindowPos3s (GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glWindowPos3sv (const GLshort *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+typedef void (APIENTRYP PFNGLFOGCOORDFPROC) (GLfloat coord);
+typedef void (APIENTRYP PFNGLFOGCOORDFVPROC) (const GLfloat *coord);
+typedef void (APIENTRYP PFNGLFOGCOORDDPROC) (GLdouble coord);
+typedef void (APIENTRYP PFNGLFOGCOORDDVPROC) (const GLdouble *coord);
+typedef void (APIENTRYP PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
+typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y);
+typedef void (APIENTRYP PFNGLWINDOWPOS2DVPROC) (const GLdouble *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y);
+typedef void (APIENTRYP PFNGLWINDOWPOS2FVPROC) (const GLfloat *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS2IPROC) (GLint x, GLint y);
+typedef void (APIENTRYP PFNGLWINDOWPOS2IVPROC) (const GLint *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y);
+typedef void (APIENTRYP PFNGLWINDOWPOS2SVPROC) (const GLshort *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z);
+typedef void (APIENTRYP PFNGLWINDOWPOS3DVPROC) (const GLdouble *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLWINDOWPOS3FVPROC) (const GLfloat *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z);
+typedef void (APIENTRYP PFNGLWINDOWPOS3IVPROC) (const GLint *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z);
+typedef void (APIENTRYP PFNGLWINDOWPOS3SVPROC) (const GLshort *v);
+#endif
+
+#ifndef GL_VERSION_1_5
+#define GL_VERSION_1_5 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glGenQueries (GLsizei, GLuint *);
+GLAPI void APIENTRY glDeleteQueries (GLsizei, const GLuint *);
+GLAPI GLboolean APIENTRY glIsQuery (GLuint);
+GLAPI void APIENTRY glBeginQuery (GLenum, GLuint);
+GLAPI void APIENTRY glEndQuery (GLenum);
+GLAPI void APIENTRY glGetQueryiv (GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glGetQueryObjectiv (GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glGetQueryObjectuiv (GLuint, GLenum, GLuint *);
+GLAPI void APIENTRY glBindBuffer (GLenum, GLuint);
+GLAPI void APIENTRY glDeleteBuffers (GLsizei, const GLuint *);
+GLAPI void APIENTRY glGenBuffers (GLsizei, GLuint *);
+GLAPI GLboolean APIENTRY glIsBuffer (GLuint);
+GLAPI void APIENTRY glBufferData (GLenum, GLsizeiptr, const GLvoid *, GLenum);
+GLAPI void APIENTRY glBufferSubData (GLenum, GLintptr, GLsizeiptr, const GLvoid *);
+GLAPI void APIENTRY glGetBufferSubData (GLenum, GLintptr, GLsizeiptr, GLvoid *);
+GLAPI GLvoid* APIENTRY glMapBuffer (GLenum, GLenum);
+GLAPI GLboolean APIENTRY glUnmapBuffer (GLenum);
+GLAPI void APIENTRY glGetBufferParameteriv (GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glGetBufferPointerv (GLenum, GLenum, GLvoid* *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids);
+typedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids);
+typedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id);
+typedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id);
+typedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target);
+typedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params);
+typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
+typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers);
+typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);
+typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer);
+typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage);
+typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data);
+typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data);
+typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access);
+typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target);
+typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, GLvoid* *params);
+#endif
+
+#ifndef GL_VERSION_2_0
+#define GL_VERSION_2_0 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBlendEquationSeparate (GLenum, GLenum);
+GLAPI void APIENTRY glDrawBuffers (GLsizei, const GLenum *);
+GLAPI void APIENTRY glStencilOpSeparate (GLenum, GLenum, GLenum, GLenum);
+GLAPI void APIENTRY glStencilFuncSeparate (GLenum, GLenum, GLint, GLuint);
+GLAPI void APIENTRY glStencilMaskSeparate (GLenum, GLuint);
+GLAPI void APIENTRY glAttachShader (GLuint, GLuint);
+GLAPI void APIENTRY glBindAttribLocation (GLuint, GLuint, const GLchar *);
+GLAPI void APIENTRY glCompileShader (GLuint);
+GLAPI GLuint APIENTRY glCreateProgram (void);
+GLAPI GLuint APIENTRY glCreateShader (GLenum);
+GLAPI void APIENTRY glDeleteProgram (GLuint);
+GLAPI void APIENTRY glDeleteShader (GLuint);
+GLAPI void APIENTRY glDetachShader (GLuint, GLuint);
+GLAPI void APIENTRY glDisableVertexAttribArray (GLuint);
+GLAPI void APIENTRY glEnableVertexAttribArray (GLuint);
+GLAPI void APIENTRY glGetActiveAttrib (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *);
+GLAPI void APIENTRY glGetActiveUniform (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *);
+GLAPI void APIENTRY glGetAttachedShaders (GLuint, GLsizei, GLsizei *, GLuint *);
+GLAPI GLint APIENTRY glGetAttribLocation (GLuint, const GLchar *);
+GLAPI void APIENTRY glGetProgramiv (GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glGetProgramInfoLog (GLuint, GLsizei, GLsizei *, GLchar *);
+GLAPI void APIENTRY glGetShaderiv (GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glGetShaderInfoLog (GLuint, GLsizei, GLsizei *, GLchar *);
+GLAPI void APIENTRY glGetShaderSource (GLuint, GLsizei, GLsizei *, GLchar *);
+GLAPI GLint APIENTRY glGetUniformLocation (GLuint, const GLchar *);
+GLAPI void APIENTRY glGetUniformfv (GLuint, GLint, GLfloat *);
+GLAPI void APIENTRY glGetUniformiv (GLuint, GLint, GLint *);
+GLAPI void APIENTRY glGetVertexAttribdv (GLuint, GLenum, GLdouble *);
+GLAPI void APIENTRY glGetVertexAttribfv (GLuint, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetVertexAttribiv (GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint, GLenum, GLvoid* *);
+GLAPI GLboolean APIENTRY glIsProgram (GLuint);
+GLAPI GLboolean APIENTRY glIsShader (GLuint);
+GLAPI void APIENTRY glLinkProgram (GLuint);
+GLAPI void APIENTRY glShaderSource (GLuint, GLsizei, const GLchar* *, const GLint *);
+GLAPI void APIENTRY glUseProgram (GLuint);
+GLAPI void APIENTRY glUniform1f (GLint, GLfloat);
+GLAPI void APIENTRY glUniform2f (GLint, GLfloat, GLfloat);
+GLAPI void APIENTRY glUniform3f (GLint, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glUniform4f (GLint, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glUniform1i (GLint, GLint);
+GLAPI void APIENTRY glUniform2i (GLint, GLint, GLint);
+GLAPI void APIENTRY glUniform3i (GLint, GLint, GLint, GLint);
+GLAPI void APIENTRY glUniform4i (GLint, GLint, GLint, GLint, GLint);
+GLAPI void APIENTRY glUniform1fv (GLint, GLsizei, const GLfloat *);
+GLAPI void APIENTRY glUniform2fv (GLint, GLsizei, const GLfloat *);
+GLAPI void APIENTRY glUniform3fv (GLint, GLsizei, const GLfloat *);
+GLAPI void APIENTRY glUniform4fv (GLint, GLsizei, const GLfloat *);
+GLAPI void APIENTRY glUniform1iv (GLint, GLsizei, const GLint *);
+GLAPI void APIENTRY glUniform2iv (GLint, GLsizei, const GLint *);
+GLAPI void APIENTRY glUniform3iv (GLint, GLsizei, const GLint *);
+GLAPI void APIENTRY glUniform4iv (GLint, GLsizei, const GLint *);
+GLAPI void APIENTRY glUniformMatrix2fv (GLint, GLsizei, GLboolean, const GLfloat *);
+GLAPI void APIENTRY glUniformMatrix3fv (GLint, GLsizei, GLboolean, const GLfloat *);
+GLAPI void APIENTRY glUniformMatrix4fv (GLint, GLsizei, GLboolean, const GLfloat *);
+GLAPI void APIENTRY glValidateProgram (GLuint);
+GLAPI void APIENTRY glVertexAttrib1d (GLuint, GLdouble);
+GLAPI void APIENTRY glVertexAttrib1dv (GLuint, const GLdouble *);
+GLAPI void APIENTRY glVertexAttrib1f (GLuint, GLfloat);
+GLAPI void APIENTRY glVertexAttrib1fv (GLuint, const GLfloat *);
+GLAPI void APIENTRY glVertexAttrib1s (GLuint, GLshort);
+GLAPI void APIENTRY glVertexAttrib1sv (GLuint, const GLshort *);
+GLAPI void APIENTRY glVertexAttrib2d (GLuint, GLdouble, GLdouble);
+GLAPI void APIENTRY glVertexAttrib2dv (GLuint, const GLdouble *);
+GLAPI void APIENTRY glVertexAttrib2f (GLuint, GLfloat, GLfloat);
+GLAPI void APIENTRY glVertexAttrib2fv (GLuint, const GLfloat *);
+GLAPI void APIENTRY glVertexAttrib2s (GLuint, GLshort, GLshort);
+GLAPI void APIENTRY glVertexAttrib2sv (GLuint, const GLshort *);
+GLAPI void APIENTRY glVertexAttrib3d (GLuint, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glVertexAttrib3dv (GLuint, const GLdouble *);
+GLAPI void APIENTRY glVertexAttrib3f (GLuint, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glVertexAttrib3fv (GLuint, const GLfloat *);
+GLAPI void APIENTRY glVertexAttrib3s (GLuint, GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glVertexAttrib3sv (GLuint, const GLshort *);
+GLAPI void APIENTRY glVertexAttrib4Nbv (GLuint, const GLbyte *);
+GLAPI void APIENTRY glVertexAttrib4Niv (GLuint, const GLint *);
+GLAPI void APIENTRY glVertexAttrib4Nsv (GLuint, const GLshort *);
+GLAPI void APIENTRY glVertexAttrib4Nub (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
+GLAPI void APIENTRY glVertexAttrib4Nubv (GLuint, const GLubyte *);
+GLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint, const GLuint *);
+GLAPI void APIENTRY glVertexAttrib4Nusv (GLuint, const GLushort *);
+GLAPI void APIENTRY glVertexAttrib4bv (GLuint, const GLbyte *);
+GLAPI void APIENTRY glVertexAttrib4d (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glVertexAttrib4dv (GLuint, const GLdouble *);
+GLAPI void APIENTRY glVertexAttrib4f (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glVertexAttrib4fv (GLuint, const GLfloat *);
+GLAPI void APIENTRY glVertexAttrib4iv (GLuint, const GLint *);
+GLAPI void APIENTRY glVertexAttrib4s (GLuint, GLshort, GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glVertexAttrib4sv (GLuint, const GLshort *);
+GLAPI void APIENTRY glVertexAttrib4ubv (GLuint, const GLubyte *);
+GLAPI void APIENTRY glVertexAttrib4uiv (GLuint, const GLuint *);
+GLAPI void APIENTRY glVertexAttrib4usv (GLuint, const GLushort *);
+GLAPI void APIENTRY glVertexAttribPointer (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha);
+typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs);
+typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
+typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
+typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask);
+typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);
+typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name);
+typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader);
+typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void);
+typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type);
+typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program);
+typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader);
+typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader);
+typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index);
+typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
+typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj);
+typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name);
+typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
+typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name);
+typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
+typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program);
+typedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader);
+typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program);
+typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar* *string, const GLint *length);
+typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program);
+typedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0);
+typedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1);
+typedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+typedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0);
+typedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1);
+typedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2);
+typedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+typedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
+#endif
+
+#ifndef GL_ARB_multitexture
+#define GL_ARB_multitexture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glActiveTextureARB (GLenum);
+GLAPI void APIENTRY glClientActiveTextureARB (GLenum);
+GLAPI void APIENTRY glMultiTexCoord1dARB (GLenum, GLdouble);
+GLAPI void APIENTRY glMultiTexCoord1dvARB (GLenum, const GLdouble *);
+GLAPI void APIENTRY glMultiTexCoord1fARB (GLenum, GLfloat);
+GLAPI void APIENTRY glMultiTexCoord1fvARB (GLenum, const GLfloat *);
+GLAPI void APIENTRY glMultiTexCoord1iARB (GLenum, GLint);
+GLAPI void APIENTRY glMultiTexCoord1ivARB (GLenum, const GLint *);
+GLAPI void APIENTRY glMultiTexCoord1sARB (GLenum, GLshort);
+GLAPI void APIENTRY glMultiTexCoord1svARB (GLenum, const GLshort *);
+GLAPI void APIENTRY glMultiTexCoord2dARB (GLenum, GLdouble, GLdouble);
+GLAPI void APIENTRY glMultiTexCoord2dvARB (GLenum, const GLdouble *);
+GLAPI void APIENTRY glMultiTexCoord2fARB (GLenum, GLfloat, GLfloat);
+GLAPI void APIENTRY glMultiTexCoord2fvARB (GLenum, const GLfloat *);
+GLAPI void APIENTRY glMultiTexCoord2iARB (GLenum, GLint, GLint);
+GLAPI void APIENTRY glMultiTexCoord2ivARB (GLenum, const GLint *);
+GLAPI void APIENTRY glMultiTexCoord2sARB (GLenum, GLshort, GLshort);
+GLAPI void APIENTRY glMultiTexCoord2svARB (GLenum, const GLshort *);
+GLAPI void APIENTRY glMultiTexCoord3dARB (GLenum, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glMultiTexCoord3dvARB (GLenum, const GLdouble *);
+GLAPI void APIENTRY glMultiTexCoord3fARB (GLenum, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glMultiTexCoord3fvARB (GLenum, const GLfloat *);
+GLAPI void APIENTRY glMultiTexCoord3iARB (GLenum, GLint, GLint, GLint);
+GLAPI void APIENTRY glMultiTexCoord3ivARB (GLenum, const GLint *);
+GLAPI void APIENTRY glMultiTexCoord3sARB (GLenum, GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glMultiTexCoord3svARB (GLenum, const GLshort *);
+GLAPI void APIENTRY glMultiTexCoord4dARB (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glMultiTexCoord4dvARB (GLenum, const GLdouble *);
+GLAPI void APIENTRY glMultiTexCoord4fARB (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glMultiTexCoord4fvARB (GLenum, const GLfloat *);
+GLAPI void APIENTRY glMultiTexCoord4iARB (GLenum, GLint, GLint, GLint, GLint);
+GLAPI void APIENTRY glMultiTexCoord4ivARB (GLenum, const GLint *);
+GLAPI void APIENTRY glMultiTexCoord4sARB (GLenum, GLshort, GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glMultiTexCoord4svARB (GLenum, const GLshort *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
+#endif
+
+#ifndef GL_ARB_transpose_matrix
+#define GL_ARB_transpose_matrix 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glLoadTransposeMatrixfARB (const GLfloat *);
+GLAPI void APIENTRY glLoadTransposeMatrixdARB (const GLdouble *);
+GLAPI void APIENTRY glMultTransposeMatrixfARB (const GLfloat *);
+GLAPI void APIENTRY glMultTransposeMatrixdARB (const GLdouble *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
+#endif
+
+#ifndef GL_ARB_multisample
+#define GL_ARB_multisample 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glSampleCoverageARB (GLclampf, GLboolean);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean invert);
+#endif
+
+#ifndef GL_ARB_texture_env_add
+#define GL_ARB_texture_env_add 1
+#endif
+
+#ifndef GL_ARB_texture_cube_map
+#define GL_ARB_texture_cube_map 1
+#endif
+
+#ifndef GL_ARB_texture_compression
+#define GL_ARB_texture_compression 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glCompressedTexImage3DARB (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glCompressedTexImage2DARB (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glCompressedTexImage1DARB (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glCompressedTexSubImage3DARB (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glCompressedTexSubImage2DARB (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glCompressedTexSubImage1DARB (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glGetCompressedTexImageARB (GLenum, GLint, GLvoid *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, GLvoid *img);
+#endif
+
+#ifndef GL_ARB_texture_border_clamp
+#define GL_ARB_texture_border_clamp 1
+#endif
+
+#ifndef GL_ARB_point_parameters
+#define GL_ARB_point_parameters 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glPointParameterfARB (GLenum, GLfloat);
+GLAPI void APIENTRY glPointParameterfvARB (GLenum, const GLfloat *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params);
+#endif
+
+#ifndef GL_ARB_vertex_blend
+#define GL_ARB_vertex_blend 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glWeightbvARB (GLint, const GLbyte *);
+GLAPI void APIENTRY glWeightsvARB (GLint, const GLshort *);
+GLAPI void APIENTRY glWeightivARB (GLint, const GLint *);
+GLAPI void APIENTRY glWeightfvARB (GLint, const GLfloat *);
+GLAPI void APIENTRY glWeightdvARB (GLint, const GLdouble *);
+GLAPI void APIENTRY glWeightubvARB (GLint, const GLubyte *);
+GLAPI void APIENTRY glWeightusvARB (GLint, const GLushort *);
+GLAPI void APIENTRY glWeightuivARB (GLint, const GLuint *);
+GLAPI void APIENTRY glWeightPointerARB (GLint, GLenum, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glVertexBlendARB (GLint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights);
+typedef void (APIENTRYP PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights);
+typedef void (APIENTRYP PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights);
+typedef void (APIENTRYP PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights);
+typedef void (APIENTRYP PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights);
+typedef void (APIENTRYP PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights);
+typedef void (APIENTRYP PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights);
+typedef void (APIENTRYP PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights);
+typedef void (APIENTRYP PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLVERTEXBLENDARBPROC) (GLint count);
+#endif
+
+#ifndef GL_ARB_matrix_palette
+#define GL_ARB_matrix_palette 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glCurrentPaletteMatrixARB (GLint);
+GLAPI void APIENTRY glMatrixIndexubvARB (GLint, const GLubyte *);
+GLAPI void APIENTRY glMatrixIndexusvARB (GLint, const GLushort *);
+GLAPI void APIENTRY glMatrixIndexuivARB (GLint, const GLuint *);
+GLAPI void APIENTRY glMatrixIndexPointerARB (GLint, GLenum, GLsizei, const GLvoid *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index);
+typedef void (APIENTRYP PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices);
+typedef void (APIENTRYP PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices);
+typedef void (APIENTRYP PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices);
+typedef void (APIENTRYP PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+#endif
+
+#ifndef GL_ARB_texture_env_combine
+#define GL_ARB_texture_env_combine 1
+#endif
+
+#ifndef GL_ARB_texture_env_crossbar
+#define GL_ARB_texture_env_crossbar 1
+#endif
+
+#ifndef GL_ARB_texture_env_dot3
+#define GL_ARB_texture_env_dot3 1
+#endif
+
+#ifndef GL_ARB_texture_mirrored_repeat
+#define GL_ARB_texture_mirrored_repeat 1
+#endif
+
+#ifndef GL_ARB_depth_texture
+#define GL_ARB_depth_texture 1
+#endif
+
+#ifndef GL_ARB_shadow
+#define GL_ARB_shadow 1
+#endif
+
+#ifndef GL_ARB_shadow_ambient
+#define GL_ARB_shadow_ambient 1
+#endif
+
+#ifndef GL_ARB_window_pos
+#define GL_ARB_window_pos 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glWindowPos2dARB (GLdouble, GLdouble);
+GLAPI void APIENTRY glWindowPos2dvARB (const GLdouble *);
+GLAPI void APIENTRY glWindowPos2fARB (GLfloat, GLfloat);
+GLAPI void APIENTRY glWindowPos2fvARB (const GLfloat *);
+GLAPI void APIENTRY glWindowPos2iARB (GLint, GLint);
+GLAPI void APIENTRY glWindowPos2ivARB (const GLint *);
+GLAPI void APIENTRY glWindowPos2sARB (GLshort, GLshort);
+GLAPI void APIENTRY glWindowPos2svARB (const GLshort *);
+GLAPI void APIENTRY glWindowPos3dARB (GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glWindowPos3dvARB (const GLdouble *);
+GLAPI void APIENTRY glWindowPos3fARB (GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glWindowPos3fvARB (const GLfloat *);
+GLAPI void APIENTRY glWindowPos3iARB (GLint, GLint, GLint);
+GLAPI void APIENTRY glWindowPos3ivARB (const GLint *);
+GLAPI void APIENTRY glWindowPos3sARB (GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glWindowPos3svARB (const GLshort *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y);
+typedef void (APIENTRYP PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y);
+typedef void (APIENTRYP PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y);
+typedef void (APIENTRYP PFNGLWINDOWPOS2IVARBPROC) (const GLint *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y);
+typedef void (APIENTRYP PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z);
+typedef void (APIENTRYP PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z);
+typedef void (APIENTRYP PFNGLWINDOWPOS3IVARBPROC) (const GLint *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z);
+typedef void (APIENTRYP PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v);
+#endif
+
+#ifndef GL_ARB_vertex_program
+#define GL_ARB_vertex_program 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glVertexAttrib1dARB (GLuint, GLdouble);
+GLAPI void APIENTRY glVertexAttrib1dvARB (GLuint, const GLdouble *);
+GLAPI void APIENTRY glVertexAttrib1fARB (GLuint, GLfloat);
+GLAPI void APIENTRY glVertexAttrib1fvARB (GLuint, const GLfloat *);
+GLAPI void APIENTRY glVertexAttrib1sARB (GLuint, GLshort);
+GLAPI void APIENTRY glVertexAttrib1svARB (GLuint, const GLshort *);
+GLAPI void APIENTRY glVertexAttrib2dARB (GLuint, GLdouble, GLdouble);
+GLAPI void APIENTRY glVertexAttrib2dvARB (GLuint, const GLdouble *);
+GLAPI void APIENTRY glVertexAttrib2fARB (GLuint, GLfloat, GLfloat);
+GLAPI void APIENTRY glVertexAttrib2fvARB (GLuint, const GLfloat *);
+GLAPI void APIENTRY glVertexAttrib2sARB (GLuint, GLshort, GLshort);
+GLAPI void APIENTRY glVertexAttrib2svARB (GLuint, const GLshort *);
+GLAPI void APIENTRY glVertexAttrib3dARB (GLuint, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glVertexAttrib3dvARB (GLuint, const GLdouble *);
+GLAPI void APIENTRY glVertexAttrib3fARB (GLuint, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glVertexAttrib3fvARB (GLuint, const GLfloat *);
+GLAPI void APIENTRY glVertexAttrib3sARB (GLuint, GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glVertexAttrib3svARB (GLuint, const GLshort *);
+GLAPI void APIENTRY glVertexAttrib4NbvARB (GLuint, const GLbyte *);
+GLAPI void APIENTRY glVertexAttrib4NivARB (GLuint, const GLint *);
+GLAPI void APIENTRY glVertexAttrib4NsvARB (GLuint, const GLshort *);
+GLAPI void APIENTRY glVertexAttrib4NubARB (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
+GLAPI void APIENTRY glVertexAttrib4NubvARB (GLuint, const GLubyte *);
+GLAPI void APIENTRY glVertexAttrib4NuivARB (GLuint, const GLuint *);
+GLAPI void APIENTRY glVertexAttrib4NusvARB (GLuint, const GLushort *);
+GLAPI void APIENTRY glVertexAttrib4bvARB (GLuint, const GLbyte *);
+GLAPI void APIENTRY glVertexAttrib4dARB (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glVertexAttrib4dvARB (GLuint, const GLdouble *);
+GLAPI void APIENTRY glVertexAttrib4fARB (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glVertexAttrib4fvARB (GLuint, const GLfloat *);
+GLAPI void APIENTRY glVertexAttrib4ivARB (GLuint, const GLint *);
+GLAPI void APIENTRY glVertexAttrib4sARB (GLuint, GLshort, GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glVertexAttrib4svARB (GLuint, const GLshort *);
+GLAPI void APIENTRY glVertexAttrib4ubvARB (GLuint, const GLubyte *);
+GLAPI void APIENTRY glVertexAttrib4uivARB (GLuint, const GLuint *);
+GLAPI void APIENTRY glVertexAttrib4usvARB (GLuint, const GLushort *);
+GLAPI void APIENTRY glVertexAttribPointerARB (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glEnableVertexAttribArrayARB (GLuint);
+GLAPI void APIENTRY glDisableVertexAttribArrayARB (GLuint);
+GLAPI void APIENTRY glProgramStringARB (GLenum, GLenum, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glBindProgramARB (GLenum, GLuint);
+GLAPI void APIENTRY glDeleteProgramsARB (GLsizei, const GLuint *);
+GLAPI void APIENTRY glGenProgramsARB (GLsizei, GLuint *);
+GLAPI void APIENTRY glProgramEnvParameter4dARB (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glProgramEnvParameter4dvARB (GLenum, GLuint, const GLdouble *);
+GLAPI void APIENTRY glProgramEnvParameter4fARB (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glProgramEnvParameter4fvARB (GLenum, GLuint, const GLfloat *);
+GLAPI void APIENTRY glProgramLocalParameter4dARB (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glProgramLocalParameter4dvARB (GLenum, GLuint, const GLdouble *);
+GLAPI void APIENTRY glProgramLocalParameter4fARB (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glProgramLocalParameter4fvARB (GLenum, GLuint, const GLfloat *);
+GLAPI void APIENTRY glGetProgramEnvParameterdvARB (GLenum, GLuint, GLdouble *);
+GLAPI void APIENTRY glGetProgramEnvParameterfvARB (GLenum, GLuint, GLfloat *);
+GLAPI void APIENTRY glGetProgramLocalParameterdvARB (GLenum, GLuint, GLdouble *);
+GLAPI void APIENTRY glGetProgramLocalParameterfvARB (GLenum, GLuint, GLfloat *);
+GLAPI void APIENTRY glGetProgramivARB (GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glGetProgramStringARB (GLenum, GLenum, GLvoid *);
+GLAPI void APIENTRY glGetVertexAttribdvARB (GLuint, GLenum, GLdouble *);
+GLAPI void APIENTRY glGetVertexAttribfvARB (GLuint, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetVertexAttribivARB (GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glGetVertexAttribPointervARB (GLuint, GLenum, GLvoid* *);
+GLAPI GLboolean APIENTRY glIsProgramARB (GLuint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
+typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
+typedef void (APIENTRYP PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const GLvoid *string);
+typedef void (APIENTRYP PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program);
+typedef void (APIENTRYP PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs);
+typedef void (APIENTRYP PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs);
+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, GLvoid *string);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
+typedef GLboolean (APIENTRYP PFNGLISPROGRAMARBPROC) (GLuint program);
+#endif
+
+#ifndef GL_ARB_fragment_program
+#define GL_ARB_fragment_program 1
+/* All ARB_fragment_program entry points are shared with ARB_vertex_program. */
+#endif
+
+#ifndef GL_ARB_vertex_buffer_object
+#define GL_ARB_vertex_buffer_object 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBindBufferARB (GLenum, GLuint);
+GLAPI void APIENTRY glDeleteBuffersARB (GLsizei, const GLuint *);
+GLAPI void APIENTRY glGenBuffersARB (GLsizei, GLuint *);
+GLAPI GLboolean APIENTRY glIsBufferARB (GLuint);
+GLAPI void APIENTRY glBufferDataARB (GLenum, GLsizeiptrARB, const GLvoid *, GLenum);
+GLAPI void APIENTRY glBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid *);
+GLAPI void APIENTRY glGetBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, GLvoid *);
+GLAPI GLvoid* APIENTRY glMapBufferARB (GLenum, GLenum);
+GLAPI GLboolean APIENTRY glUnmapBufferARB (GLenum);
+GLAPI void APIENTRY glGetBufferParameterivARB (GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glGetBufferPointervARB (GLenum, GLenum, GLvoid* *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer);
+typedef void (APIENTRYP PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers);
+typedef void (APIENTRYP PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers);
+typedef GLboolean (APIENTRYP PFNGLISBUFFERARBPROC) (GLuint buffer);
+typedef void (APIENTRYP PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage);
+typedef void (APIENTRYP PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data);
+typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data);
+typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access);
+typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERARBPROC) (GLenum target);
+typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, GLvoid* *params);
+#endif
+
+#ifndef GL_ARB_occlusion_query
+#define GL_ARB_occlusion_query 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glGenQueriesARB (GLsizei, GLuint *);
+GLAPI void APIENTRY glDeleteQueriesARB (GLsizei, const GLuint *);
+GLAPI GLboolean APIENTRY glIsQueryARB (GLuint);
+GLAPI void APIENTRY glBeginQueryARB (GLenum, GLuint);
+GLAPI void APIENTRY glEndQueryARB (GLenum);
+GLAPI void APIENTRY glGetQueryivARB (GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glGetQueryObjectivARB (GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glGetQueryObjectuivARB (GLuint, GLenum, GLuint *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint *ids);
+typedef void (APIENTRYP PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint *ids);
+typedef GLboolean (APIENTRYP PFNGLISQUERYARBPROC) (GLuint id);
+typedef void (APIENTRYP PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id);
+typedef void (APIENTRYP PFNGLENDQUERYARBPROC) (GLenum target);
+typedef void (APIENTRYP PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint *params);
+#endif
+
+#ifndef GL_ARB_shader_objects
+#define GL_ARB_shader_objects 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDeleteObjectARB (GLhandleARB);
+GLAPI GLhandleARB APIENTRY glGetHandleARB (GLenum);
+GLAPI void APIENTRY glDetachObjectARB (GLhandleARB, GLhandleARB);
+GLAPI GLhandleARB APIENTRY glCreateShaderObjectARB (GLenum);
+GLAPI void APIENTRY glShaderSourceARB (GLhandleARB, GLsizei, const GLcharARB* *, const GLint *);
+GLAPI void APIENTRY glCompileShaderARB (GLhandleARB);
+GLAPI GLhandleARB APIENTRY glCreateProgramObjectARB (void);
+GLAPI void APIENTRY glAttachObjectARB (GLhandleARB, GLhandleARB);
+GLAPI void APIENTRY glLinkProgramARB (GLhandleARB);
+GLAPI void APIENTRY glUseProgramObjectARB (GLhandleARB);
+GLAPI void APIENTRY glValidateProgramARB (GLhandleARB);
+GLAPI void APIENTRY glUniform1fARB (GLint, GLfloat);
+GLAPI void APIENTRY glUniform2fARB (GLint, GLfloat, GLfloat);
+GLAPI void APIENTRY glUniform3fARB (GLint, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glUniform4fARB (GLint, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glUniform1iARB (GLint, GLint);
+GLAPI void APIENTRY glUniform2iARB (GLint, GLint, GLint);
+GLAPI void APIENTRY glUniform3iARB (GLint, GLint, GLint, GLint);
+GLAPI void APIENTRY glUniform4iARB (GLint, GLint, GLint, GLint, GLint);
+GLAPI void APIENTRY glUniform1fvARB (GLint, GLsizei, const GLfloat *);
+GLAPI void APIENTRY glUniform2fvARB (GLint, GLsizei, const GLfloat *);
+GLAPI void APIENTRY glUniform3fvARB (GLint, GLsizei, const GLfloat *);
+GLAPI void APIENTRY glUniform4fvARB (GLint, GLsizei, const GLfloat *);
+GLAPI void APIENTRY glUniform1ivARB (GLint, GLsizei, const GLint *);
+GLAPI void APIENTRY glUniform2ivARB (GLint, GLsizei, const GLint *);
+GLAPI void APIENTRY glUniform3ivARB (GLint, GLsizei, const GLint *);
+GLAPI void APIENTRY glUniform4ivARB (GLint, GLsizei, const GLint *);
+GLAPI void APIENTRY glUniformMatrix2fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
+GLAPI void APIENTRY glUniformMatrix3fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
+GLAPI void APIENTRY glUniformMatrix4fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
+GLAPI void APIENTRY glGetObjectParameterfvARB (GLhandleARB, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetObjectParameterivARB (GLhandleARB, GLenum, GLint *);
+GLAPI void APIENTRY glGetInfoLogARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
+GLAPI void APIENTRY glGetAttachedObjectsARB (GLhandleARB, GLsizei, GLsizei *, GLhandleARB *);
+GLAPI GLint APIENTRY glGetUniformLocationARB (GLhandleARB, const GLcharARB *);
+GLAPI void APIENTRY glGetActiveUniformARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *);
+GLAPI void APIENTRY glGetUniformfvARB (GLhandleARB, GLint, GLfloat *);
+GLAPI void APIENTRY glGetUniformivARB (GLhandleARB, GLint, GLint *);
+GLAPI void APIENTRY glGetShaderSourceARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj);
+typedef GLhandleARB (APIENTRYP PFNGLGETHANDLEARBPROC) (GLenum pname);
+typedef void (APIENTRYP PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj);
+typedef GLhandleARB (APIENTRYP PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType);
+typedef void (APIENTRYP PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length);
+typedef void (APIENTRYP PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj);
+typedef GLhandleARB (APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC) (void);
+typedef void (APIENTRYP PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj);
+typedef void (APIENTRYP PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj);
+typedef void (APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj);
+typedef void (APIENTRYP PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj);
+typedef void (APIENTRYP PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0);
+typedef void (APIENTRYP PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1);
+typedef void (APIENTRYP PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+typedef void (APIENTRYP PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+typedef void (APIENTRYP PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0);
+typedef void (APIENTRYP PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1);
+typedef void (APIENTRYP PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2);
+typedef void (APIENTRYP PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+typedef void (APIENTRYP PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);
+typedef void (APIENTRYP PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj);
+typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
+typedef void (APIENTRYP PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params);
+typedef void (APIENTRYP PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source);
+#endif
+
+#ifndef GL_ARB_vertex_shader
+#define GL_ARB_vertex_shader 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBindAttribLocationARB (GLhandleARB, GLuint, const GLcharARB *);
+GLAPI void APIENTRY glGetActiveAttribARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *);
+GLAPI GLint APIENTRY glGetAttribLocationARB (GLhandleARB, const GLcharARB *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name);
+typedef void (APIENTRYP PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
+typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
+#endif
+
+#ifndef GL_ARB_fragment_shader
+#define GL_ARB_fragment_shader 1
+#endif
+
+#ifndef GL_ARB_shading_language_100
+#define GL_ARB_shading_language_100 1
+#endif
+
+#ifndef GL_ARB_texture_non_power_of_two
+#define GL_ARB_texture_non_power_of_two 1
+#endif
+
+#ifndef GL_ARB_point_sprite
+#define GL_ARB_point_sprite 1
+#endif
+
+#ifndef GL_ARB_fragment_program_shadow
+#define GL_ARB_fragment_program_shadow 1
+#endif
+
+#ifndef GL_ARB_draw_buffers
+#define GL_ARB_draw_buffers 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDrawBuffersARB (GLsizei, const GLenum *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs);
+#endif
+
+#ifndef GL_ARB_texture_rectangle
+#define GL_ARB_texture_rectangle 1
+#endif
+
+#ifndef GL_ARB_color_buffer_float
+#define GL_ARB_color_buffer_float 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glClampColorARB (GLenum, GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp);
+#endif
+
+#ifndef GL_ARB_half_float_pixel
+#define GL_ARB_half_float_pixel 1
+#endif
+
+#ifndef GL_ARB_texture_float
+#define GL_ARB_texture_float 1
+#endif
+
+#ifndef GL_ARB_pixel_buffer_object
+#define GL_ARB_pixel_buffer_object 1
+#endif
+
+#ifndef GL_EXT_abgr
+#define GL_EXT_abgr 1
+#endif
+
+#ifndef GL_EXT_blend_color
+#define GL_EXT_blend_color 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBlendColorEXT (GLclampf, GLclampf, GLclampf, GLclampf);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBLENDCOLOREXTPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+#endif
+
+#ifndef GL_EXT_polygon_offset
+#define GL_EXT_polygon_offset 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glPolygonOffsetEXT (GLfloat, GLfloat);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias);
+#endif
+
+#ifndef GL_EXT_texture
+#define GL_EXT_texture 1
+#endif
+
+#ifndef GL_EXT_texture3D
+#define GL_EXT_texture3D 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glTexImage3DEXT (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
+GLAPI void APIENTRY glTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
+#endif
+
+#ifndef GL_SGIS_texture_filter4
+#define GL_SGIS_texture_filter4 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glGetTexFilterFuncSGIS (GLenum, GLenum, GLfloat *);
+GLAPI void APIENTRY glTexFilterFuncSGIS (GLenum, GLenum, GLsizei, const GLfloat *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights);
+typedef void (APIENTRYP PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights);
+#endif
+
+#ifndef GL_EXT_subtexture
+#define GL_EXT_subtexture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glTexSubImage1DEXT (GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *);
+GLAPI void APIENTRY glTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
+typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
+#endif
+
+#ifndef GL_EXT_copy_texture
+#define GL_EXT_copy_texture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glCopyTexImage1DEXT (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint);
+GLAPI void APIENTRY glCopyTexImage2DEXT (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint);
+GLAPI void APIENTRY glCopyTexSubImage1DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei);
+GLAPI void APIENTRY glCopyTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
+GLAPI void APIENTRY glCopyTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
+typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+#endif
+
+#ifndef GL_EXT_histogram
+#define GL_EXT_histogram 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glGetHistogramEXT (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
+GLAPI void APIENTRY glGetHistogramParameterfvEXT (GLenum, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetHistogramParameterivEXT (GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glGetMinmaxEXT (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
+GLAPI void APIENTRY glGetMinmaxParameterfvEXT (GLenum, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetMinmaxParameterivEXT (GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glHistogramEXT (GLenum, GLsizei, GLenum, GLboolean);
+GLAPI void APIENTRY glMinmaxEXT (GLenum, GLenum, GLboolean);
+GLAPI void APIENTRY glResetHistogramEXT (GLenum);
+GLAPI void APIENTRY glResetMinmaxEXT (GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
+typedef void (APIENTRYP PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink);
+typedef void (APIENTRYP PFNGLRESETHISTOGRAMEXTPROC) (GLenum target);
+typedef void (APIENTRYP PFNGLRESETMINMAXEXTPROC) (GLenum target);
+#endif
+
+#ifndef GL_EXT_convolution
+#define GL_EXT_convolution 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glConvolutionFilter1DEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
+GLAPI void APIENTRY glConvolutionFilter2DEXT (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
+GLAPI void APIENTRY glConvolutionParameterfEXT (GLenum, GLenum, GLfloat);
+GLAPI void APIENTRY glConvolutionParameterfvEXT (GLenum, GLenum, const GLfloat *);
+GLAPI void APIENTRY glConvolutionParameteriEXT (GLenum, GLenum, GLint);
+GLAPI void APIENTRY glConvolutionParameterivEXT (GLenum, GLenum, const GLint *);
+GLAPI void APIENTRY glCopyConvolutionFilter1DEXT (GLenum, GLenum, GLint, GLint, GLsizei);
+GLAPI void APIENTRY glCopyConvolutionFilter2DEXT (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei);
+GLAPI void APIENTRY glGetConvolutionFilterEXT (GLenum, GLenum, GLenum, GLvoid *);
+GLAPI void APIENTRY glGetConvolutionParameterfvEXT (GLenum, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetConvolutionParameterivEXT (GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glGetSeparableFilterEXT (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *);
+GLAPI void APIENTRY glSeparableFilter2DEXT (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params);
+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params);
+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
+typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
+#endif
+
+#ifndef GL_EXT_color_matrix
+#define GL_EXT_color_matrix 1
+#endif
+
+#ifndef GL_SGI_color_table
+#define GL_SGI_color_table 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glColorTableSGI (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
+GLAPI void APIENTRY glColorTableParameterfvSGI (GLenum, GLenum, const GLfloat *);
+GLAPI void APIENTRY glColorTableParameterivSGI (GLenum, GLenum, const GLint *);
+GLAPI void APIENTRY glCopyColorTableSGI (GLenum, GLenum, GLint, GLint, GLsizei);
+GLAPI void APIENTRY glGetColorTableSGI (GLenum, GLenum, GLenum, GLvoid *);
+GLAPI void APIENTRY glGetColorTableParameterfvSGI (GLenum, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetColorTableParameterivSGI (GLenum, GLenum, GLint *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+typedef void (APIENTRYP PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params);
+#endif
+
+#ifndef GL_SGIX_pixel_texture
+#define GL_SGIX_pixel_texture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glPixelTexGenSGIX (GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPIXELTEXGENSGIXPROC) (GLenum mode);
+#endif
+
+#ifndef GL_SGIS_pixel_texture
+#define GL_SGIS_pixel_texture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glPixelTexGenParameteriSGIS (GLenum, GLint);
+GLAPI void APIENTRY glPixelTexGenParameterivSGIS (GLenum, const GLint *);
+GLAPI void APIENTRY glPixelTexGenParameterfSGIS (GLenum, GLfloat);
+GLAPI void APIENTRY glPixelTexGenParameterfvSGIS (GLenum, const GLfloat *);
+GLAPI void APIENTRY glGetPixelTexGenParameterivSGIS (GLenum, GLint *);
+GLAPI void APIENTRY glGetPixelTexGenParameterfvSGIS (GLenum, GLfloat *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params);
+#endif
+
+#ifndef GL_SGIS_texture4D
+#define GL_SGIS_texture4D 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glTexImage4DSGIS (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
+GLAPI void APIENTRY glTexSubImage4DSGIS (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+typedef void (APIENTRYP PFNGLTEXSUBIMAGE4DSGISPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid *pixels);
+#endif
+
+#ifndef GL_SGI_texture_color_table
+#define GL_SGI_texture_color_table 1
+#endif
+
+#ifndef GL_EXT_cmyka
+#define GL_EXT_cmyka 1
+#endif
+
+#ifndef GL_EXT_texture_object
+#define GL_EXT_texture_object 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI GLboolean APIENTRY glAreTexturesResidentEXT (GLsizei, const GLuint *, GLboolean *);
+GLAPI void APIENTRY glBindTextureEXT (GLenum, GLuint);
+GLAPI void APIENTRY glDeleteTexturesEXT (GLsizei, const GLuint *);
+GLAPI void APIENTRY glGenTexturesEXT (GLsizei, GLuint *);
+GLAPI GLboolean APIENTRY glIsTextureEXT (GLuint);
+GLAPI void APIENTRY glPrioritizeTexturesEXT (GLsizei, const GLuint *, const GLclampf *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef GLboolean (APIENTRYP PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences);
+typedef void (APIENTRYP PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture);
+typedef void (APIENTRYP PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures);
+typedef void (APIENTRYP PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures);
+typedef GLboolean (APIENTRYP PFNGLISTEXTUREEXTPROC) (GLuint texture);
+typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities);
+#endif
+
+#ifndef GL_SGIS_detail_texture
+#define GL_SGIS_detail_texture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDetailTexFuncSGIS (GLenum, GLsizei, const GLfloat *);
+GLAPI void APIENTRY glGetDetailTexFuncSGIS (GLenum, GLfloat *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
+typedef void (APIENTRYP PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
+#endif
+
+#ifndef GL_SGIS_sharpen_texture
+#define GL_SGIS_sharpen_texture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glSharpenTexFuncSGIS (GLenum, GLsizei, const GLfloat *);
+GLAPI void APIENTRY glGetSharpenTexFuncSGIS (GLenum, GLfloat *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
+typedef void (APIENTRYP PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
+#endif
+
+#ifndef GL_EXT_packed_pixels
+#define GL_EXT_packed_pixels 1
+#endif
+
+#ifndef GL_SGIS_texture_lod
+#define GL_SGIS_texture_lod 1
+#endif
+
+#ifndef GL_SGIS_multisample
+#define GL_SGIS_multisample 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glSampleMaskSGIS (GLclampf, GLboolean);
+GLAPI void APIENTRY glSamplePatternSGIS (GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert);
+typedef void (APIENTRYP PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern);
+#endif
+
+#ifndef GL_EXT_rescale_normal
+#define GL_EXT_rescale_normal 1
+#endif
+
+#ifndef GL_EXT_vertex_array
+#define GL_EXT_vertex_array 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glArrayElementEXT (GLint);
+GLAPI void APIENTRY glColorPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glDrawArraysEXT (GLenum, GLint, GLsizei);
+GLAPI void APIENTRY glEdgeFlagPointerEXT (GLsizei, GLsizei, const GLboolean *);
+GLAPI void APIENTRY glGetPointervEXT (GLenum, GLvoid* *);
+GLAPI void APIENTRY glIndexPointerEXT (GLenum, GLsizei, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glNormalPointerEXT (GLenum, GLsizei, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glTexCoordPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glVertexPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLARRAYELEMENTEXTPROC) (GLint i);
+typedef void (APIENTRYP PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count);
+typedef void (APIENTRYP PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer);
+typedef void (APIENTRYP PFNGLGETPOINTERVEXTPROC) (GLenum pname, GLvoid* *params);
+typedef void (APIENTRYP PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+#endif
+
+#ifndef GL_EXT_misc_attribute
+#define GL_EXT_misc_attribute 1
+#endif
+
+#ifndef GL_SGIS_generate_mipmap
+#define GL_SGIS_generate_mipmap 1
+#endif
+
+#ifndef GL_SGIX_clipmap
+#define GL_SGIX_clipmap 1
+#endif
+
+#ifndef GL_SGIX_shadow
+#define GL_SGIX_shadow 1
+#endif
+
+#ifndef GL_SGIS_texture_edge_clamp
+#define GL_SGIS_texture_edge_clamp 1
+#endif
+
+#ifndef GL_SGIS_texture_border_clamp
+#define GL_SGIS_texture_border_clamp 1
+#endif
+
+#ifndef GL_EXT_blend_minmax
+#define GL_EXT_blend_minmax 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBlendEquationEXT (GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBLENDEQUATIONEXTPROC) (GLenum mode);
+#endif
+
+#ifndef GL_EXT_blend_subtract
+#define GL_EXT_blend_subtract 1
+#endif
+
+#ifndef GL_EXT_blend_logic_op
+#define GL_EXT_blend_logic_op 1
+#endif
+
+#ifndef GL_SGIX_interlace
+#define GL_SGIX_interlace 1
+#endif
+
+#ifndef GL_SGIX_pixel_tiles
+#define GL_SGIX_pixel_tiles 1
+#endif
+
+#ifndef GL_SGIX_texture_select
+#define GL_SGIX_texture_select 1
+#endif
+
+#ifndef GL_SGIX_sprite
+#define GL_SGIX_sprite 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glSpriteParameterfSGIX (GLenum, GLfloat);
+GLAPI void APIENTRY glSpriteParameterfvSGIX (GLenum, const GLfloat *);
+GLAPI void APIENTRY glSpriteParameteriSGIX (GLenum, GLint);
+GLAPI void APIENTRY glSpriteParameterivSGIX (GLenum, const GLint *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params);
+#endif
+
+#ifndef GL_SGIX_texture_multi_buffer
+#define GL_SGIX_texture_multi_buffer 1
+#endif
+
+#ifndef GL_EXT_point_parameters
+#define GL_EXT_point_parameters 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glPointParameterfEXT (GLenum, GLfloat);
+GLAPI void APIENTRY glPointParameterfvEXT (GLenum, const GLfloat *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params);
+#endif
+
+#ifndef GL_SGIS_point_parameters
+#define GL_SGIS_point_parameters 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glPointParameterfSGIS (GLenum, GLfloat);
+GLAPI void APIENTRY glPointParameterfvSGIS (GLenum, const GLfloat *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
+#endif
+
+#ifndef GL_SGIX_instruments
+#define GL_SGIX_instruments 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI GLint APIENTRY glGetInstrumentsSGIX (void);
+GLAPI void APIENTRY glInstrumentsBufferSGIX (GLsizei, GLint *);
+GLAPI GLint APIENTRY glPollInstrumentsSGIX (GLint *);
+GLAPI void APIENTRY glReadInstrumentsSGIX (GLint);
+GLAPI void APIENTRY glStartInstrumentsSGIX (void);
+GLAPI void APIENTRY glStopInstrumentsSGIX (GLint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef GLint (APIENTRYP PFNGLGETINSTRUMENTSSGIXPROC) (void);
+typedef void (APIENTRYP PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer);
+typedef GLint (APIENTRYP PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p);
+typedef void (APIENTRYP PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker);
+typedef void (APIENTRYP PFNGLSTARTINSTRUMENTSSGIXPROC) (void);
+typedef void (APIENTRYP PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker);
+#endif
+
+#ifndef GL_SGIX_texture_scale_bias
+#define GL_SGIX_texture_scale_bias 1
+#endif
+
+#ifndef GL_SGIX_framezoom
+#define GL_SGIX_framezoom 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glFrameZoomSGIX (GLint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLFRAMEZOOMSGIXPROC) (GLint factor);
+#endif
+
+#ifndef GL_SGIX_tag_sample_buffer
+#define GL_SGIX_tag_sample_buffer 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glTagSampleBufferSGIX (void);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTAGSAMPLEBUFFERSGIXPROC) (void);
+#endif
+
+#ifndef GL_SGIX_polynomial_ffd
+#define GL_SGIX_polynomial_ffd 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDeformationMap3dSGIX (GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, const GLdouble *);
+GLAPI void APIENTRY glDeformationMap3fSGIX (GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, const GLfloat *);
+GLAPI void APIENTRY glDeformSGIX (GLbitfield);
+GLAPI void APIENTRY glLoadIdentityDeformationMapSGIX (GLbitfield);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDEFORMATIONMAP3DSGIXPROC) (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points);
+typedef void (APIENTRYP PFNGLDEFORMATIONMAP3FSGIXPROC) (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points);
+typedef void (APIENTRYP PFNGLDEFORMSGIXPROC) (GLbitfield mask);
+typedef void (APIENTRYP PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask);
+#endif
+
+#ifndef GL_SGIX_reference_plane
+#define GL_SGIX_reference_plane 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation);
+#endif
+
+#ifndef GL_SGIX_flush_raster
+#define GL_SGIX_flush_raster 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glFlushRasterSGIX (void);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLFLUSHRASTERSGIXPROC) (void);
+#endif
+
+#ifndef GL_SGIX_depth_texture
+#define GL_SGIX_depth_texture 1
+#endif
+
+#ifndef GL_SGIS_fog_function
+#define GL_SGIS_fog_function 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glFogFuncSGIS (GLsizei, const GLfloat *);
+GLAPI void APIENTRY glGetFogFuncSGIS (GLfloat *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points);
+typedef void (APIENTRYP PFNGLGETFOGFUNCSGISPROC) (GLfloat *points);
+#endif
+
+#ifndef GL_SGIX_fog_offset
+#define GL_SGIX_fog_offset 1
+#endif
+
+#ifndef GL_HP_image_transform
+#define GL_HP_image_transform 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glImageTransformParameteriHP (GLenum, GLenum, GLint);
+GLAPI void APIENTRY glImageTransformParameterfHP (GLenum, GLenum, GLfloat);
+GLAPI void APIENTRY glImageTransformParameterivHP (GLenum, GLenum, const GLint *);
+GLAPI void APIENTRY glImageTransformParameterfvHP (GLenum, GLenum, const GLfloat *);
+GLAPI void APIENTRY glGetImageTransformParameterivHP (GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glGetImageTransformParameterfvHP (GLenum, GLenum, GLfloat *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params);
+#endif
+
+#ifndef GL_HP_convolution_border_modes
+#define GL_HP_convolution_border_modes 1
+#endif
+
+#ifndef GL_SGIX_texture_add_env
+#define GL_SGIX_texture_add_env 1
+#endif
+
+#ifndef GL_EXT_color_subtable
+#define GL_EXT_color_subtable 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glColorSubTableEXT (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
+GLAPI void APIENTRY glCopyColorSubTableEXT (GLenum, GLsizei, GLint, GLint, GLsizei);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
+#endif
+
+#ifndef GL_PGI_vertex_hints
+#define GL_PGI_vertex_hints 1
+#endif
+
+#ifndef GL_PGI_misc_hints
+#define GL_PGI_misc_hints 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glHintPGI (GLenum, GLint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLHINTPGIPROC) (GLenum target, GLint mode);
+#endif
+
+#ifndef GL_EXT_paletted_texture
+#define GL_EXT_paletted_texture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glColorTableEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
+GLAPI void APIENTRY glGetColorTableEXT (GLenum, GLenum, GLenum, GLvoid *);
+GLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glGetColorTableParameterfvEXT (GLenum, GLenum, GLfloat *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
+typedef void (APIENTRYP PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *data);
+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
+#endif
+
+#ifndef GL_EXT_clip_volume_hint
+#define GL_EXT_clip_volume_hint 1
+#endif
+
+#ifndef GL_SGIX_list_priority
+#define GL_SGIX_list_priority 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glGetListParameterfvSGIX (GLuint, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetListParameterivSGIX (GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glListParameterfSGIX (GLuint, GLenum, GLfloat);
+GLAPI void APIENTRY glListParameterfvSGIX (GLuint, GLenum, const GLfloat *);
+GLAPI void APIENTRY glListParameteriSGIX (GLuint, GLenum, GLint);
+GLAPI void APIENTRY glListParameterivSGIX (GLuint, GLenum, const GLint *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params);
+#endif
+
+#ifndef GL_SGIX_ir_instrument1
+#define GL_SGIX_ir_instrument1 1
+#endif
+
+#ifndef GL_SGIX_calligraphic_fragment
+#define GL_SGIX_calligraphic_fragment 1
+#endif
+
+#ifndef GL_SGIX_texture_lod_bias
+#define GL_SGIX_texture_lod_bias 1
+#endif
+
+#ifndef GL_SGIX_shadow_ambient
+#define GL_SGIX_shadow_ambient 1
+#endif
+
+#ifndef GL_EXT_index_texture
+#define GL_EXT_index_texture 1
+#endif
+
+#ifndef GL_EXT_index_material
+#define GL_EXT_index_material 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glIndexMaterialEXT (GLenum, GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode);
+#endif
+
+#ifndef GL_EXT_index_func
+#define GL_EXT_index_func 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glIndexFuncEXT (GLenum, GLclampf);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref);
+#endif
+
+#ifndef GL_EXT_index_array_formats
+#define GL_EXT_index_array_formats 1
+#endif
+
+#ifndef GL_EXT_compiled_vertex_array
+#define GL_EXT_compiled_vertex_array 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glLockArraysEXT (GLint, GLsizei);
+GLAPI void APIENTRY glUnlockArraysEXT (void);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count);
+typedef void (APIENTRYP PFNGLUNLOCKARRAYSEXTPROC) (void);
+#endif
+
+#ifndef GL_EXT_cull_vertex
+#define GL_EXT_cull_vertex 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glCullParameterdvEXT (GLenum, GLdouble *);
+GLAPI void APIENTRY glCullParameterfvEXT (GLenum, GLfloat *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params);
+typedef void (APIENTRYP PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params);
+#endif
+
+#ifndef GL_SGIX_ycrcb
+#define GL_SGIX_ycrcb 1
+#endif
+
+#ifndef GL_SGIX_fragment_lighting
+#define GL_SGIX_fragment_lighting 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glFragmentColorMaterialSGIX (GLenum, GLenum);
+GLAPI void APIENTRY glFragmentLightfSGIX (GLenum, GLenum, GLfloat);
+GLAPI void APIENTRY glFragmentLightfvSGIX (GLenum, GLenum, const GLfloat *);
+GLAPI void APIENTRY glFragmentLightiSGIX (GLenum, GLenum, GLint);
+GLAPI void APIENTRY glFragmentLightivSGIX (GLenum, GLenum, const GLint *);
+GLAPI void APIENTRY glFragmentLightModelfSGIX (GLenum, GLfloat);
+GLAPI void APIENTRY glFragmentLightModelfvSGIX (GLenum, const GLfloat *);
+GLAPI void APIENTRY glFragmentLightModeliSGIX (GLenum, GLint);
+GLAPI void APIENTRY glFragmentLightModelivSGIX (GLenum, const GLint *);
+GLAPI void APIENTRY glFragmentMaterialfSGIX (GLenum, GLenum, GLfloat);
+GLAPI void APIENTRY glFragmentMaterialfvSGIX (GLenum, GLenum, const GLfloat *);
+GLAPI void APIENTRY glFragmentMaterialiSGIX (GLenum, GLenum, GLint);
+GLAPI void APIENTRY glFragmentMaterialivSGIX (GLenum, GLenum, const GLint *);
+GLAPI void APIENTRY glGetFragmentLightfvSGIX (GLenum, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetFragmentLightivSGIX (GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glGetFragmentMaterialfvSGIX (GLenum, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetFragmentMaterialivSGIX (GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glLightEnviSGIX (GLenum, GLint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode);
+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param);
+#endif
+
+#ifndef GL_IBM_rasterpos_clip
+#define GL_IBM_rasterpos_clip 1
+#endif
+
+#ifndef GL_HP_texture_lighting
+#define GL_HP_texture_lighting 1
+#endif
+
+#ifndef GL_EXT_draw_range_elements
+#define GL_EXT_draw_range_elements 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDrawRangeElementsEXT (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
+#endif
+
+#ifndef GL_WIN_phong_shading
+#define GL_WIN_phong_shading 1
+#endif
+
+#ifndef GL_WIN_specular_fog
+#define GL_WIN_specular_fog 1
+#endif
+
+#ifndef GL_EXT_light_texture
+#define GL_EXT_light_texture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glApplyTextureEXT (GLenum);
+GLAPI void APIENTRY glTextureLightEXT (GLenum);
+GLAPI void APIENTRY glTextureMaterialEXT (GLenum, GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode);
+typedef void (APIENTRYP PFNGLTEXTURELIGHTEXTPROC) (GLenum pname);
+typedef void (APIENTRYP PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode);
+#endif
+
+#ifndef GL_SGIX_blend_alpha_minmax
+#define GL_SGIX_blend_alpha_minmax 1
+#endif
+
+#ifndef GL_EXT_bgra
+#define GL_EXT_bgra 1
+#endif
+
+#ifndef GL_SGIX_async
+#define GL_SGIX_async 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glAsyncMarkerSGIX (GLuint);
+GLAPI GLint APIENTRY glFinishAsyncSGIX (GLuint *);
+GLAPI GLint APIENTRY glPollAsyncSGIX (GLuint *);
+GLAPI GLuint APIENTRY glGenAsyncMarkersSGIX (GLsizei);
+GLAPI void APIENTRY glDeleteAsyncMarkersSGIX (GLuint, GLsizei);
+GLAPI GLboolean APIENTRY glIsAsyncMarkerSGIX (GLuint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLASYNCMARKERSGIXPROC) (GLuint marker);
+typedef GLint (APIENTRYP PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp);
+typedef GLint (APIENTRYP PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp);
+typedef GLuint (APIENTRYP PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range);
+typedef void (APIENTRYP PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range);
+typedef GLboolean (APIENTRYP PFNGLISASYNCMARKERSGIXPROC) (GLuint marker);
+#endif
+
+#ifndef GL_SGIX_async_pixel
+#define GL_SGIX_async_pixel 1
+#endif
+
+#ifndef GL_SGIX_async_histogram
+#define GL_SGIX_async_histogram 1
+#endif
+
+#ifndef GL_INTEL_parallel_arrays
+#define GL_INTEL_parallel_arrays 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glVertexPointervINTEL (GLint, GLenum, const GLvoid* *);
+GLAPI void APIENTRY glNormalPointervINTEL (GLenum, const GLvoid* *);
+GLAPI void APIENTRY glColorPointervINTEL (GLint, GLenum, const GLvoid* *);
+GLAPI void APIENTRY glTexCoordPointervINTEL (GLint, GLenum, const GLvoid* *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
+typedef void (APIENTRYP PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const GLvoid* *pointer);
+typedef void (APIENTRYP PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
+typedef void (APIENTRYP PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
+#endif
+
+#ifndef GL_HP_occlusion_test
+#define GL_HP_occlusion_test 1
+#endif
+
+#ifndef GL_EXT_pixel_transform
+#define GL_EXT_pixel_transform 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glPixelTransformParameteriEXT (GLenum, GLenum, GLint);
+GLAPI void APIENTRY glPixelTransformParameterfEXT (GLenum, GLenum, GLfloat);
+GLAPI void APIENTRY glPixelTransformParameterivEXT (GLenum, GLenum, const GLint *);
+GLAPI void APIENTRY glPixelTransformParameterfvEXT (GLenum, GLenum, const GLfloat *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
+#endif
+
+#ifndef GL_EXT_pixel_transform_color_table
+#define GL_EXT_pixel_transform_color_table 1
+#endif
+
+#ifndef GL_EXT_shared_texture_palette
+#define GL_EXT_shared_texture_palette 1
+#endif
+
+#ifndef GL_EXT_separate_specular_color
+#define GL_EXT_separate_specular_color 1
+#endif
+
+#ifndef GL_EXT_secondary_color
+#define GL_EXT_secondary_color 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glSecondaryColor3bEXT (GLbyte, GLbyte, GLbyte);
+GLAPI void APIENTRY glSecondaryColor3bvEXT (const GLbyte *);
+GLAPI void APIENTRY glSecondaryColor3dEXT (GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glSecondaryColor3dvEXT (const GLdouble *);
+GLAPI void APIENTRY glSecondaryColor3fEXT (GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glSecondaryColor3fvEXT (const GLfloat *);
+GLAPI void APIENTRY glSecondaryColor3iEXT (GLint, GLint, GLint);
+GLAPI void APIENTRY glSecondaryColor3ivEXT (const GLint *);
+GLAPI void APIENTRY glSecondaryColor3sEXT (GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glSecondaryColor3svEXT (const GLshort *);
+GLAPI void APIENTRY glSecondaryColor3ubEXT (GLubyte, GLubyte, GLubyte);
+GLAPI void APIENTRY glSecondaryColor3ubvEXT (const GLubyte *);
+GLAPI void APIENTRY glSecondaryColor3uiEXT (GLuint, GLuint, GLuint);
+GLAPI void APIENTRY glSecondaryColor3uivEXT (const GLuint *);
+GLAPI void APIENTRY glSecondaryColor3usEXT (GLushort, GLushort, GLushort);
+GLAPI void APIENTRY glSecondaryColor3usvEXT (const GLushort *);
+GLAPI void APIENTRY glSecondaryColorPointerEXT (GLint, GLenum, GLsizei, const GLvoid *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+#endif
+
+#ifndef GL_EXT_texture_perturb_normal
+#define GL_EXT_texture_perturb_normal 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glTextureNormalEXT (GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTEXTURENORMALEXTPROC) (GLenum mode);
+#endif
+
+#ifndef GL_EXT_multi_draw_arrays
+#define GL_EXT_multi_draw_arrays 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei);
+GLAPI void APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
+#endif
+
+#ifndef GL_EXT_fog_coord
+#define GL_EXT_fog_coord 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glFogCoordfEXT (GLfloat);
+GLAPI void APIENTRY glFogCoordfvEXT (const GLfloat *);
+GLAPI void APIENTRY glFogCoorddEXT (GLdouble);
+GLAPI void APIENTRY glFogCoorddvEXT (const GLdouble *);
+GLAPI void APIENTRY glFogCoordPointerEXT (GLenum, GLsizei, const GLvoid *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLFOGCOORDFEXTPROC) (GLfloat coord);
+typedef void (APIENTRYP PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord);
+typedef void (APIENTRYP PFNGLFOGCOORDDEXTPROC) (GLdouble coord);
+typedef void (APIENTRYP PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord);
+typedef void (APIENTRYP PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
+#endif
+
+#ifndef GL_REND_screen_coordinates
+#define GL_REND_screen_coordinates 1
+#endif
+
+#ifndef GL_EXT_coordinate_frame
+#define GL_EXT_coordinate_frame 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glTangent3bEXT (GLbyte, GLbyte, GLbyte);
+GLAPI void APIENTRY glTangent3bvEXT (const GLbyte *);
+GLAPI void APIENTRY glTangent3dEXT (GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glTangent3dvEXT (const GLdouble *);
+GLAPI void APIENTRY glTangent3fEXT (GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glTangent3fvEXT (const GLfloat *);
+GLAPI void APIENTRY glTangent3iEXT (GLint, GLint, GLint);
+GLAPI void APIENTRY glTangent3ivEXT (const GLint *);
+GLAPI void APIENTRY glTangent3sEXT (GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glTangent3svEXT (const GLshort *);
+GLAPI void APIENTRY glBinormal3bEXT (GLbyte, GLbyte, GLbyte);
+GLAPI void APIENTRY glBinormal3bvEXT (const GLbyte *);
+GLAPI void APIENTRY glBinormal3dEXT (GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glBinormal3dvEXT (const GLdouble *);
+GLAPI void APIENTRY glBinormal3fEXT (GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glBinormal3fvEXT (const GLfloat *);
+GLAPI void APIENTRY glBinormal3iEXT (GLint, GLint, GLint);
+GLAPI void APIENTRY glBinormal3ivEXT (const GLint *);
+GLAPI void APIENTRY glBinormal3sEXT (GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glBinormal3svEXT (const GLshort *);
+GLAPI void APIENTRY glTangentPointerEXT (GLenum, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glBinormalPointerEXT (GLenum, GLsizei, const GLvoid *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz);
+typedef void (APIENTRYP PFNGLTANGENT3BVEXTPROC) (const GLbyte *v);
+typedef void (APIENTRYP PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz);
+typedef void (APIENTRYP PFNGLTANGENT3DVEXTPROC) (const GLdouble *v);
+typedef void (APIENTRYP PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz);
+typedef void (APIENTRYP PFNGLTANGENT3FVEXTPROC) (const GLfloat *v);
+typedef void (APIENTRYP PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz);
+typedef void (APIENTRYP PFNGLTANGENT3IVEXTPROC) (const GLint *v);
+typedef void (APIENTRYP PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz);
+typedef void (APIENTRYP PFNGLTANGENT3SVEXTPROC) (const GLshort *v);
+typedef void (APIENTRYP PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz);
+typedef void (APIENTRYP PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v);
+typedef void (APIENTRYP PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz);
+typedef void (APIENTRYP PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v);
+typedef void (APIENTRYP PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz);
+typedef void (APIENTRYP PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v);
+typedef void (APIENTRYP PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz);
+typedef void (APIENTRYP PFNGLBINORMAL3IVEXTPROC) (const GLint *v);
+typedef void (APIENTRYP PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz);
+typedef void (APIENTRYP PFNGLBINORMAL3SVEXTPROC) (const GLshort *v);
+typedef void (APIENTRYP PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
+#endif
+
+#ifndef GL_EXT_texture_env_combine
+#define GL_EXT_texture_env_combine 1
+#endif
+
+#ifndef GL_APPLE_specular_vector
+#define GL_APPLE_specular_vector 1
+#endif
+
+#ifndef GL_APPLE_transform_hint
+#define GL_APPLE_transform_hint 1
+#endif
+
+#ifndef GL_SGIX_fog_scale
+#define GL_SGIX_fog_scale 1
+#endif
+
+#ifndef GL_SUNX_constant_data
+#define GL_SUNX_constant_data 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glFinishTextureSUNX (void);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLFINISHTEXTURESUNXPROC) (void);
+#endif
+
+#ifndef GL_SUN_global_alpha
+#define GL_SUN_global_alpha 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glGlobalAlphaFactorbSUN (GLbyte);
+GLAPI void APIENTRY glGlobalAlphaFactorsSUN (GLshort);
+GLAPI void APIENTRY glGlobalAlphaFactoriSUN (GLint);
+GLAPI void APIENTRY glGlobalAlphaFactorfSUN (GLfloat);
+GLAPI void APIENTRY glGlobalAlphaFactordSUN (GLdouble);
+GLAPI void APIENTRY glGlobalAlphaFactorubSUN (GLubyte);
+GLAPI void APIENTRY glGlobalAlphaFactorusSUN (GLushort);
+GLAPI void APIENTRY glGlobalAlphaFactoruiSUN (GLuint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor);
+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor);
+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor);
+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor);
+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor);
+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor);
+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor);
+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor);
+#endif
+
+#ifndef GL_SUN_triangle_list
+#define GL_SUN_triangle_list 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glReplacementCodeuiSUN (GLuint);
+GLAPI void APIENTRY glReplacementCodeusSUN (GLushort);
+GLAPI void APIENTRY glReplacementCodeubSUN (GLubyte);
+GLAPI void APIENTRY glReplacementCodeuivSUN (const GLuint *);
+GLAPI void APIENTRY glReplacementCodeusvSUN (const GLushort *);
+GLAPI void APIENTRY glReplacementCodeubvSUN (const GLubyte *);
+GLAPI void APIENTRY glReplacementCodePointerSUN (GLenum, GLsizei, const GLvoid* *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const GLvoid* *pointer);
+#endif
+
+#ifndef GL_SUN_vertex
+#define GL_SUN_vertex 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glColor4ubVertex2fSUN (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat);
+GLAPI void APIENTRY glColor4ubVertex2fvSUN (const GLubyte *, const GLfloat *);
+GLAPI void APIENTRY glColor4ubVertex3fSUN (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glColor4ubVertex3fvSUN (const GLubyte *, const GLfloat *);
+GLAPI void APIENTRY glColor3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glColor3fVertex3fvSUN (const GLfloat *, const GLfloat *);
+GLAPI void APIENTRY glNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *);
+GLAPI void APIENTRY glColor4fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glColor4fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
+GLAPI void APIENTRY glTexCoord2fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glTexCoord2fVertex3fvSUN (const GLfloat *, const GLfloat *);
+GLAPI void APIENTRY glTexCoord4fVertex4fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glTexCoord4fVertex4fvSUN (const GLfloat *, const GLfloat *);
+GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fSUN (GLfloat, GLfloat, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fvSUN (const GLfloat *, const GLubyte *, const GLfloat *);
+GLAPI void APIENTRY glTexCoord2fColor3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glTexCoord2fColor3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
+GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
+GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
+GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fvSUN (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
+GLAPI void APIENTRY glReplacementCodeuiVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glReplacementCodeuiVertex3fvSUN (const GLuint *, const GLfloat *);
+GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fSUN (GLuint, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fvSUN (const GLuint *, const GLubyte *, const GLfloat *);
+GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *);
+GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *);
+GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *);
+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *);
+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *);
+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y);
+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v);
+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v);
+typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v);
+typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v);
+typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v);
+typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
+typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v);
+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v);
+typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v);
+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
+typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
+#endif
+
+#ifndef GL_EXT_blend_func_separate
+#define GL_EXT_blend_func_separate 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBlendFuncSeparateEXT (GLenum, GLenum, GLenum, GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+#endif
+
+#ifndef GL_INGR_blend_func_separate
+#define GL_INGR_blend_func_separate 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum, GLenum, GLenum, GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+#endif
+
+#ifndef GL_INGR_color_clamp
+#define GL_INGR_color_clamp 1
+#endif
+
+#ifndef GL_INGR_interlace_read
+#define GL_INGR_interlace_read 1
+#endif
+
+#ifndef GL_EXT_stencil_wrap
+#define GL_EXT_stencil_wrap 1
+#endif
+
+#ifndef GL_EXT_422_pixels
+#define GL_EXT_422_pixels 1
+#endif
+
+#ifndef GL_NV_texgen_reflection
+#define GL_NV_texgen_reflection 1
+#endif
+
+#ifndef GL_SUN_convolution_border_modes
+#define GL_SUN_convolution_border_modes 1
+#endif
+
+#ifndef GL_EXT_texture_env_add
+#define GL_EXT_texture_env_add 1
+#endif
+
+#ifndef GL_EXT_texture_lod_bias
+#define GL_EXT_texture_lod_bias 1
+#endif
+
+#ifndef GL_EXT_texture_filter_anisotropic
+#define GL_EXT_texture_filter_anisotropic 1
+#endif
+
+#ifndef GL_EXT_vertex_weighting
+#define GL_EXT_vertex_weighting 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glVertexWeightfEXT (GLfloat);
+GLAPI void APIENTRY glVertexWeightfvEXT (const GLfloat *);
+GLAPI void APIENTRY glVertexWeightPointerEXT (GLsizei, GLenum, GLsizei, const GLvoid *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight);
+typedef void (APIENTRYP PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight);
+typedef void (APIENTRYP PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer);
+#endif
+
+#ifndef GL_NV_light_max_exponent
+#define GL_NV_light_max_exponent 1
+#endif
+
+#ifndef GL_NV_vertex_array_range
+#define GL_NV_vertex_array_range 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glFlushVertexArrayRangeNV (void);
+GLAPI void APIENTRY glVertexArrayRangeNV (GLsizei, const GLvoid *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void);
+typedef void (APIENTRYP PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const GLvoid *pointer);
+#endif
+
+#ifndef GL_NV_register_combiners
+#define GL_NV_register_combiners 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glCombinerParameterfvNV (GLenum, const GLfloat *);
+GLAPI void APIENTRY glCombinerParameterfNV (GLenum, GLfloat);
+GLAPI void APIENTRY glCombinerParameterivNV (GLenum, const GLint *);
+GLAPI void APIENTRY glCombinerParameteriNV (GLenum, GLint);
+GLAPI void APIENTRY glCombinerInputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum);
+GLAPI void APIENTRY glCombinerOutputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean);
+GLAPI void APIENTRY glFinalCombinerInputNV (GLenum, GLenum, GLenum, GLenum);
+GLAPI void APIENTRY glGetCombinerInputParameterfvNV (GLenum, GLenum, GLenum, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetCombinerInputParameterivNV (GLenum, GLenum, GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glGetCombinerOutputParameterfvNV (GLenum, GLenum, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetCombinerOutputParameterivNV (GLenum, GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetFinalCombinerInputParameterivNV (GLenum, GLenum, GLint *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
+typedef void (APIENTRYP PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);
+typedef void (APIENTRYP PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
+typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params);
+#endif
+
+#ifndef GL_NV_fog_distance
+#define GL_NV_fog_distance 1
+#endif
+
+#ifndef GL_NV_texgen_emboss
+#define GL_NV_texgen_emboss 1
+#endif
+
+#ifndef GL_NV_blend_square
+#define GL_NV_blend_square 1
+#endif
+
+#ifndef GL_NV_texture_env_combine4
+#define GL_NV_texture_env_combine4 1
+#endif
+
+#ifndef GL_MESA_resize_buffers
+#define GL_MESA_resize_buffers 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glResizeBuffersMESA (void);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLRESIZEBUFFERSMESAPROC) (void);
+#endif
+
+#ifndef GL_MESA_window_pos
+#define GL_MESA_window_pos 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glWindowPos2dMESA (GLdouble, GLdouble);
+GLAPI void APIENTRY glWindowPos2dvMESA (const GLdouble *);
+GLAPI void APIENTRY glWindowPos2fMESA (GLfloat, GLfloat);
+GLAPI void APIENTRY glWindowPos2fvMESA (const GLfloat *);
+GLAPI void APIENTRY glWindowPos2iMESA (GLint, GLint);
+GLAPI void APIENTRY glWindowPos2ivMESA (const GLint *);
+GLAPI void APIENTRY glWindowPos2sMESA (GLshort, GLshort);
+GLAPI void APIENTRY glWindowPos2svMESA (const GLshort *);
+GLAPI void APIENTRY glWindowPos3dMESA (GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glWindowPos3dvMESA (const GLdouble *);
+GLAPI void APIENTRY glWindowPos3fMESA (GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glWindowPos3fvMESA (const GLfloat *);
+GLAPI void APIENTRY glWindowPos3iMESA (GLint, GLint, GLint);
+GLAPI void APIENTRY glWindowPos3ivMESA (const GLint *);
+GLAPI void APIENTRY glWindowPos3sMESA (GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glWindowPos3svMESA (const GLshort *);
+GLAPI void APIENTRY glWindowPos4dMESA (GLdouble, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glWindowPos4dvMESA (const GLdouble *);
+GLAPI void APIENTRY glWindowPos4fMESA (GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glWindowPos4fvMESA (const GLfloat *);
+GLAPI void APIENTRY glWindowPos4iMESA (GLint, GLint, GLint, GLint);
+GLAPI void APIENTRY glWindowPos4ivMESA (const GLint *);
+GLAPI void APIENTRY glWindowPos4sMESA (GLshort, GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glWindowPos4svMESA (const GLshort *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y);
+typedef void (APIENTRYP PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y);
+typedef void (APIENTRYP PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y);
+typedef void (APIENTRYP PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y);
+typedef void (APIENTRYP PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z);
+typedef void (APIENTRYP PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z);
+typedef void (APIENTRYP PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z);
+typedef void (APIENTRYP PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (APIENTRYP PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (APIENTRYP PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w);
+typedef void (APIENTRYP PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w);
+typedef void (APIENTRYP PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v);
+#endif
+
+#ifndef GL_IBM_cull_vertex
+#define GL_IBM_cull_vertex 1
+#endif
+
+#ifndef GL_IBM_multimode_draw_arrays
+#define GL_IBM_multimode_draw_arrays 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glMultiModeDrawArraysIBM (const GLenum *, const GLint *, const GLsizei *, GLsizei, GLint);
+GLAPI void APIENTRY glMultiModeDrawElementsIBM (const GLenum *, const GLsizei *, GLenum, const GLvoid* const *, GLsizei, GLint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);
+typedef void (APIENTRYP PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, GLint modestride);
+#endif
+
+#ifndef GL_IBM_vertex_array_lists
+#define GL_IBM_vertex_array_lists 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glColorPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
+GLAPI void APIENTRY glSecondaryColorPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
+GLAPI void APIENTRY glEdgeFlagPointerListIBM (GLint, const GLboolean* *, GLint);
+GLAPI void APIENTRY glFogCoordPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
+GLAPI void APIENTRY glIndexPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
+GLAPI void APIENTRY glNormalPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
+GLAPI void APIENTRY glTexCoordPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
+GLAPI void APIENTRY glVertexPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
+typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
+typedef void (APIENTRYP PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean* *pointer, GLint ptrstride);
+typedef void (APIENTRYP PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
+typedef void (APIENTRYP PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
+typedef void (APIENTRYP PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
+typedef void (APIENTRYP PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
+typedef void (APIENTRYP PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
+#endif
+
+#ifndef GL_SGIX_subsample
+#define GL_SGIX_subsample 1
+#endif
+
+#ifndef GL_SGIX_ycrcba
+#define GL_SGIX_ycrcba 1
+#endif
+
+#ifndef GL_SGIX_ycrcb_subsample
+#define GL_SGIX_ycrcb_subsample 1
+#endif
+
+#ifndef GL_SGIX_depth_pass_instrument
+#define GL_SGIX_depth_pass_instrument 1
+#endif
+
+#ifndef GL_3DFX_texture_compression_FXT1
+#define GL_3DFX_texture_compression_FXT1 1
+#endif
+
+#ifndef GL_3DFX_multisample
+#define GL_3DFX_multisample 1
+#endif
+
+#ifndef GL_3DFX_tbuffer
+#define GL_3DFX_tbuffer 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glTbufferMask3DFX (GLuint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTBUFFERMASK3DFXPROC) (GLuint mask);
+#endif
+
+#ifndef GL_EXT_multisample
+#define GL_EXT_multisample 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glSampleMaskEXT (GLclampf, GLboolean);
+GLAPI void APIENTRY glSamplePatternEXT (GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert);
+typedef void (APIENTRYP PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern);
+#endif
+
+#ifndef GL_SGIX_vertex_preclip
+#define GL_SGIX_vertex_preclip 1
+#endif
+
+#ifndef GL_SGIX_convolution_accuracy
+#define GL_SGIX_convolution_accuracy 1
+#endif
+
+#ifndef GL_SGIX_resample
+#define GL_SGIX_resample 1
+#endif
+
+#ifndef GL_SGIS_point_line_texgen
+#define GL_SGIS_point_line_texgen 1
+#endif
+
+#ifndef GL_SGIS_texture_color_mask
+#define GL_SGIS_texture_color_mask 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glTextureColorMaskSGIS (GLboolean, GLboolean, GLboolean, GLboolean);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
+#endif
+
+#ifndef GL_SGIX_igloo_interface
+#define GL_SGIX_igloo_interface 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glIglooInterfaceSGIX (GLenum, const GLvoid *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const GLvoid *params);
+#endif
+
+#ifndef GL_EXT_texture_env_dot3
+#define GL_EXT_texture_env_dot3 1
+#endif
+
+#ifndef GL_ATI_texture_mirror_once
+#define GL_ATI_texture_mirror_once 1
+#endif
+
+#ifndef GL_NV_fence
+#define GL_NV_fence 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDeleteFencesNV (GLsizei, const GLuint *);
+GLAPI void APIENTRY glGenFencesNV (GLsizei, GLuint *);
+GLAPI GLboolean APIENTRY glIsFenceNV (GLuint);
+GLAPI GLboolean APIENTRY glTestFenceNV (GLuint);
+GLAPI void APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glFinishFenceNV (GLuint);
+GLAPI void APIENTRY glSetFenceNV (GLuint, GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
+typedef void (APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
+typedef GLboolean (APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
+typedef GLboolean (APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
+typedef void (APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
+typedef void (APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
+#endif
+
+#ifndef GL_NV_evaluators
+#define GL_NV_evaluators 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glMapControlPointsNV (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLint, GLint, GLboolean, const GLvoid *);
+GLAPI void APIENTRY glMapParameterivNV (GLenum, GLenum, const GLint *);
+GLAPI void APIENTRY glMapParameterfvNV (GLenum, GLenum, const GLfloat *);
+GLAPI void APIENTRY glGetMapControlPointsNV (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLboolean, GLvoid *);
+GLAPI void APIENTRY glGetMapParameterivNV (GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glGetMapParameterfvNV (GLenum, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetMapAttribParameterivNV (GLenum, GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glGetMapAttribParameterfvNV (GLenum, GLuint, GLenum, GLfloat *);
+GLAPI void APIENTRY glEvalMapsNV (GLenum, GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points);
+typedef void (APIENTRYP PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points);
+typedef void (APIENTRYP PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode);
+#endif
+
+#ifndef GL_NV_packed_depth_stencil
+#define GL_NV_packed_depth_stencil 1
+#endif
+
+#ifndef GL_NV_register_combiners2
+#define GL_NV_register_combiners2 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glCombinerStageParameterfvNV (GLenum, GLenum, const GLfloat *);
+GLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum, GLenum, GLfloat *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params);
+#endif
+
+#ifndef GL_NV_texture_compression_vtc
+#define GL_NV_texture_compression_vtc 1
+#endif
+
+#ifndef GL_NV_texture_rectangle
+#define GL_NV_texture_rectangle 1
+#endif
+
+#ifndef GL_NV_texture_shader
+#define GL_NV_texture_shader 1
+#endif
+
+#ifndef GL_NV_texture_shader2
+#define GL_NV_texture_shader2 1
+#endif
+
+#ifndef GL_NV_vertex_array_range2
+#define GL_NV_vertex_array_range2 1
+#endif
+
+#ifndef GL_NV_vertex_program
+#define GL_NV_vertex_program 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI GLboolean APIENTRY glAreProgramsResidentNV (GLsizei, const GLuint *, GLboolean *);
+GLAPI void APIENTRY glBindProgramNV (GLenum, GLuint);
+GLAPI void APIENTRY glDeleteProgramsNV (GLsizei, const GLuint *);
+GLAPI void APIENTRY glExecuteProgramNV (GLenum, GLuint, const GLfloat *);
+GLAPI void APIENTRY glGenProgramsNV (GLsizei, GLuint *);
+GLAPI void APIENTRY glGetProgramParameterdvNV (GLenum, GLuint, GLenum, GLdouble *);
+GLAPI void APIENTRY glGetProgramParameterfvNV (GLenum, GLuint, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetProgramivNV (GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glGetProgramStringNV (GLuint, GLenum, GLubyte *);
+GLAPI void APIENTRY glGetTrackMatrixivNV (GLenum, GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glGetVertexAttribdvNV (GLuint, GLenum, GLdouble *);
+GLAPI void APIENTRY glGetVertexAttribfvNV (GLuint, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetVertexAttribivNV (GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glGetVertexAttribPointervNV (GLuint, GLenum, GLvoid* *);
+GLAPI GLboolean APIENTRY glIsProgramNV (GLuint);
+GLAPI void APIENTRY glLoadProgramNV (GLenum, GLuint, GLsizei, const GLubyte *);
+GLAPI void APIENTRY glProgramParameter4dNV (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glProgramParameter4dvNV (GLenum, GLuint, const GLdouble *);
+GLAPI void APIENTRY glProgramParameter4fNV (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glProgramParameter4fvNV (GLenum, GLuint, const GLfloat *);
+GLAPI void APIENTRY glProgramParameters4dvNV (GLenum, GLuint, GLuint, const GLdouble *);
+GLAPI void APIENTRY glProgramParameters4fvNV (GLenum, GLuint, GLuint, const GLfloat *);
+GLAPI void APIENTRY glRequestResidentProgramsNV (GLsizei, const GLuint *);
+GLAPI void APIENTRY glTrackMatrixNV (GLenum, GLuint, GLenum, GLenum);
+GLAPI void APIENTRY glVertexAttribPointerNV (GLuint, GLint, GLenum, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glVertexAttrib1dNV (GLuint, GLdouble);
+GLAPI void APIENTRY glVertexAttrib1dvNV (GLuint, const GLdouble *);
+GLAPI void APIENTRY glVertexAttrib1fNV (GLuint, GLfloat);
+GLAPI void APIENTRY glVertexAttrib1fvNV (GLuint, const GLfloat *);
+GLAPI void APIENTRY glVertexAttrib1sNV (GLuint, GLshort);
+GLAPI void APIENTRY glVertexAttrib1svNV (GLuint, const GLshort *);
+GLAPI void APIENTRY glVertexAttrib2dNV (GLuint, GLdouble, GLdouble);
+GLAPI void APIENTRY glVertexAttrib2dvNV (GLuint, const GLdouble *);
+GLAPI void APIENTRY glVertexAttrib2fNV (GLuint, GLfloat, GLfloat);
+GLAPI void APIENTRY glVertexAttrib2fvNV (GLuint, const GLfloat *);
+GLAPI void APIENTRY glVertexAttrib2sNV (GLuint, GLshort, GLshort);
+GLAPI void APIENTRY glVertexAttrib2svNV (GLuint, const GLshort *);
+GLAPI void APIENTRY glVertexAttrib3dNV (GLuint, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glVertexAttrib3dvNV (GLuint, const GLdouble *);
+GLAPI void APIENTRY glVertexAttrib3fNV (GLuint, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glVertexAttrib3fvNV (GLuint, const GLfloat *);
+GLAPI void APIENTRY glVertexAttrib3sNV (GLuint, GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glVertexAttrib3svNV (GLuint, const GLshort *);
+GLAPI void APIENTRY glVertexAttrib4dNV (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glVertexAttrib4dvNV (GLuint, const GLdouble *);
+GLAPI void APIENTRY glVertexAttrib4fNV (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glVertexAttrib4fvNV (GLuint, const GLfloat *);
+GLAPI void APIENTRY glVertexAttrib4sNV (GLuint, GLshort, GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glVertexAttrib4svNV (GLuint, const GLshort *);
+GLAPI void APIENTRY glVertexAttrib4ubNV (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
+GLAPI void APIENTRY glVertexAttrib4ubvNV (GLuint, const GLubyte *);
+GLAPI void APIENTRY glVertexAttribs1dvNV (GLuint, GLsizei, const GLdouble *);
+GLAPI void APIENTRY glVertexAttribs1fvNV (GLuint, GLsizei, const GLfloat *);
+GLAPI void APIENTRY glVertexAttribs1svNV (GLuint, GLsizei, const GLshort *);
+GLAPI void APIENTRY glVertexAttribs2dvNV (GLuint, GLsizei, const GLdouble *);
+GLAPI void APIENTRY glVertexAttribs2fvNV (GLuint, GLsizei, const GLfloat *);
+GLAPI void APIENTRY glVertexAttribs2svNV (GLuint, GLsizei, const GLshort *);
+GLAPI void APIENTRY glVertexAttribs3dvNV (GLuint, GLsizei, const GLdouble *);
+GLAPI void APIENTRY glVertexAttribs3fvNV (GLuint, GLsizei, const GLfloat *);
+GLAPI void APIENTRY glVertexAttribs3svNV (GLuint, GLsizei, const GLshort *);
+GLAPI void APIENTRY glVertexAttribs4dvNV (GLuint, GLsizei, const GLdouble *);
+GLAPI void APIENTRY glVertexAttribs4fvNV (GLuint, GLsizei, const GLfloat *);
+GLAPI void APIENTRY glVertexAttribs4svNV (GLuint, GLsizei, const GLshort *);
+GLAPI void APIENTRY glVertexAttribs4ubvNV (GLuint, GLsizei, const GLubyte *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef GLboolean (APIENTRYP PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences);
+typedef void (APIENTRYP PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id);
+typedef void (APIENTRYP PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
+typedef void (APIENTRYP PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params);
+typedef void (APIENTRYP PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs);
+typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program);
+typedef void (APIENTRYP PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
+typedef GLboolean (APIENTRYP PFNGLISPROGRAMNVPROC) (GLuint id);
+typedef void (APIENTRYP PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program);
+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLuint count, const GLdouble *v);
+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLuint count, const GLfloat *v);
+typedef void (APIENTRYP PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
+typedef void (APIENTRYP PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v);
+#endif
+
+#ifndef GL_SGIX_texture_coordinate_clamp
+#define GL_SGIX_texture_coordinate_clamp 1
+#endif
+
+#ifndef GL_SGIX_scalebias_hint
+#define GL_SGIX_scalebias_hint 1
+#endif
+
+#ifndef GL_OML_interlace
+#define GL_OML_interlace 1
+#endif
+
+#ifndef GL_OML_subsample
+#define GL_OML_subsample 1
+#endif
+
+#ifndef GL_OML_resample
+#define GL_OML_resample 1
+#endif
+
+#ifndef GL_NV_copy_depth_to_color
+#define GL_NV_copy_depth_to_color 1
+#endif
+
+#ifndef GL_ATI_envmap_bumpmap
+#define GL_ATI_envmap_bumpmap 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glTexBumpParameterivATI (GLenum, const GLint *);
+GLAPI void APIENTRY glTexBumpParameterfvATI (GLenum, const GLfloat *);
+GLAPI void APIENTRY glGetTexBumpParameterivATI (GLenum, GLint *);
+GLAPI void APIENTRY glGetTexBumpParameterfvATI (GLenum, GLfloat *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param);
+typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param);
+typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param);
+typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param);
+#endif
+
+#ifndef GL_ATI_fragment_shader
+#define GL_ATI_fragment_shader 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI GLuint APIENTRY glGenFragmentShadersATI (GLuint);
+GLAPI void APIENTRY glBindFragmentShaderATI (GLuint);
+GLAPI void APIENTRY glDeleteFragmentShaderATI (GLuint);
+GLAPI void APIENTRY glBeginFragmentShaderATI (void);
+GLAPI void APIENTRY glEndFragmentShaderATI (void);
+GLAPI void APIENTRY glPassTexCoordATI (GLuint, GLuint, GLenum);
+GLAPI void APIENTRY glSampleMapATI (GLuint, GLuint, GLenum);
+GLAPI void APIENTRY glColorFragmentOp1ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
+GLAPI void APIENTRY glColorFragmentOp2ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
+GLAPI void APIENTRY glColorFragmentOp3ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
+GLAPI void APIENTRY glAlphaFragmentOp1ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
+GLAPI void APIENTRY glAlphaFragmentOp2ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
+GLAPI void APIENTRY glAlphaFragmentOp3ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
+GLAPI void APIENTRY glSetFragmentShaderConstantATI (GLuint, const GLfloat *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef GLuint (APIENTRYP PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range);
+typedef void (APIENTRYP PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id);
+typedef void (APIENTRYP PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id);
+typedef void (APIENTRYP PFNGLBEGINFRAGMENTSHADERATIPROC) (void);
+typedef void (APIENTRYP PFNGLENDFRAGMENTSHADERATIPROC) (void);
+typedef void (APIENTRYP PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle);
+typedef void (APIENTRYP PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle);
+typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
+typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
+typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
+typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
+typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
+typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
+typedef void (APIENTRYP PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value);
+#endif
+
+#ifndef GL_ATI_pn_triangles
+#define GL_ATI_pn_triangles 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glPNTrianglesiATI (GLenum, GLint);
+GLAPI void APIENTRY glPNTrianglesfATI (GLenum, GLfloat);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param);
+#endif
+
+#ifndef GL_ATI_vertex_array_object
+#define GL_ATI_vertex_array_object 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI GLuint APIENTRY glNewObjectBufferATI (GLsizei, const GLvoid *, GLenum);
+GLAPI GLboolean APIENTRY glIsObjectBufferATI (GLuint);
+GLAPI void APIENTRY glUpdateObjectBufferATI (GLuint, GLuint, GLsizei, const GLvoid *, GLenum);
+GLAPI void APIENTRY glGetObjectBufferfvATI (GLuint, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetObjectBufferivATI (GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glFreeObjectBufferATI (GLuint);
+GLAPI void APIENTRY glArrayObjectATI (GLenum, GLint, GLenum, GLsizei, GLuint, GLuint);
+GLAPI void APIENTRY glGetArrayObjectfvATI (GLenum, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetArrayObjectivATI (GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glVariantArrayObjectATI (GLuint, GLenum, GLsizei, GLuint, GLuint);
+GLAPI void APIENTRY glGetVariantArrayObjectfvATI (GLuint, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetVariantArrayObjectivATI (GLuint, GLenum, GLint *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef GLuint (APIENTRYP PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const GLvoid *pointer, GLenum usage);
+typedef GLboolean (APIENTRYP PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer);
+typedef void (APIENTRYP PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve);
+typedef void (APIENTRYP PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer);
+typedef void (APIENTRYP PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
+typedef void (APIENTRYP PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
+typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params);
+#endif
+
+#ifndef GL_EXT_vertex_shader
+#define GL_EXT_vertex_shader 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBeginVertexShaderEXT (void);
+GLAPI void APIENTRY glEndVertexShaderEXT (void);
+GLAPI void APIENTRY glBindVertexShaderEXT (GLuint);
+GLAPI GLuint APIENTRY glGenVertexShadersEXT (GLuint);
+GLAPI void APIENTRY glDeleteVertexShaderEXT (GLuint);
+GLAPI void APIENTRY glShaderOp1EXT (GLenum, GLuint, GLuint);
+GLAPI void APIENTRY glShaderOp2EXT (GLenum, GLuint, GLuint, GLuint);
+GLAPI void APIENTRY glShaderOp3EXT (GLenum, GLuint, GLuint, GLuint, GLuint);
+GLAPI void APIENTRY glSwizzleEXT (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum);
+GLAPI void APIENTRY glWriteMaskEXT (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum);
+GLAPI void APIENTRY glInsertComponentEXT (GLuint, GLuint, GLuint);
+GLAPI void APIENTRY glExtractComponentEXT (GLuint, GLuint, GLuint);
+GLAPI GLuint APIENTRY glGenSymbolsEXT (GLenum, GLenum, GLenum, GLuint);
+GLAPI void APIENTRY glSetInvariantEXT (GLuint, GLenum, const GLvoid *);
+GLAPI void APIENTRY glSetLocalConstantEXT (GLuint, GLenum, const GLvoid *);
+GLAPI void APIENTRY glVariantbvEXT (GLuint, const GLbyte *);
+GLAPI void APIENTRY glVariantsvEXT (GLuint, const GLshort *);
+GLAPI void APIENTRY glVariantivEXT (GLuint, const GLint *);
+GLAPI void APIENTRY glVariantfvEXT (GLuint, const GLfloat *);
+GLAPI void APIENTRY glVariantdvEXT (GLuint, const GLdouble *);
+GLAPI void APIENTRY glVariantubvEXT (GLuint, const GLubyte *);
+GLAPI void APIENTRY glVariantusvEXT (GLuint, const GLushort *);
+GLAPI void APIENTRY glVariantuivEXT (GLuint, const GLuint *);
+GLAPI void APIENTRY glVariantPointerEXT (GLuint, GLenum, GLuint, const GLvoid *);
+GLAPI void APIENTRY glEnableVariantClientStateEXT (GLuint);
+GLAPI void APIENTRY glDisableVariantClientStateEXT (GLuint);
+GLAPI GLuint APIENTRY glBindLightParameterEXT (GLenum, GLenum);
+GLAPI GLuint APIENTRY glBindMaterialParameterEXT (GLenum, GLenum);
+GLAPI GLuint APIENTRY glBindTexGenParameterEXT (GLenum, GLenum, GLenum);
+GLAPI GLuint APIENTRY glBindTextureUnitParameterEXT (GLenum, GLenum);
+GLAPI GLuint APIENTRY glBindParameterEXT (GLenum);
+GLAPI GLboolean APIENTRY glIsVariantEnabledEXT (GLuint, GLenum);
+GLAPI void APIENTRY glGetVariantBooleanvEXT (GLuint, GLenum, GLboolean *);
+GLAPI void APIENTRY glGetVariantIntegervEXT (GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glGetVariantFloatvEXT (GLuint, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetVariantPointervEXT (GLuint, GLenum, GLvoid* *);
+GLAPI void APIENTRY glGetInvariantBooleanvEXT (GLuint, GLenum, GLboolean *);
+GLAPI void APIENTRY glGetInvariantIntegervEXT (GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glGetInvariantFloatvEXT (GLuint, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetLocalConstantBooleanvEXT (GLuint, GLenum, GLboolean *);
+GLAPI void APIENTRY glGetLocalConstantIntegervEXT (GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glGetLocalConstantFloatvEXT (GLuint, GLenum, GLfloat *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBEGINVERTEXSHADEREXTPROC) (void);
+typedef void (APIENTRYP PFNGLENDVERTEXSHADEREXTPROC) (void);
+typedef void (APIENTRYP PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id);
+typedef GLuint (APIENTRYP PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range);
+typedef void (APIENTRYP PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id);
+typedef void (APIENTRYP PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1);
+typedef void (APIENTRYP PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2);
+typedef void (APIENTRYP PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3);
+typedef void (APIENTRYP PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
+typedef void (APIENTRYP PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
+typedef void (APIENTRYP PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
+typedef void (APIENTRYP PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
+typedef GLuint (APIENTRYP PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components);
+typedef void (APIENTRYP PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr);
+typedef void (APIENTRYP PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr);
+typedef void (APIENTRYP PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr);
+typedef void (APIENTRYP PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr);
+typedef void (APIENTRYP PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr);
+typedef void (APIENTRYP PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr);
+typedef void (APIENTRYP PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr);
+typedef void (APIENTRYP PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr);
+typedef void (APIENTRYP PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr);
+typedef void (APIENTRYP PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr);
+typedef void (APIENTRYP PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const GLvoid *addr);
+typedef void (APIENTRYP PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
+typedef void (APIENTRYP PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
+typedef GLuint (APIENTRYP PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value);
+typedef GLuint (APIENTRYP PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value);
+typedef GLuint (APIENTRYP PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value);
+typedef GLuint (APIENTRYP PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value);
+typedef GLuint (APIENTRYP PFNGLBINDPARAMETEREXTPROC) (GLenum value);
+typedef GLboolean (APIENTRYP PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap);
+typedef void (APIENTRYP PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
+typedef void (APIENTRYP PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
+typedef void (APIENTRYP PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
+typedef void (APIENTRYP PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, GLvoid* *data);
+typedef void (APIENTRYP PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
+typedef void (APIENTRYP PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
+typedef void (APIENTRYP PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
+typedef void (APIENTRYP PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
+typedef void (APIENTRYP PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
+typedef void (APIENTRYP PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
+#endif
+
+#ifndef GL_ATI_vertex_streams
+#define GL_ATI_vertex_streams 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glVertexStream1sATI (GLenum, GLshort);
+GLAPI void APIENTRY glVertexStream1svATI (GLenum, const GLshort *);
+GLAPI void APIENTRY glVertexStream1iATI (GLenum, GLint);
+GLAPI void APIENTRY glVertexStream1ivATI (GLenum, const GLint *);
+GLAPI void APIENTRY glVertexStream1fATI (GLenum, GLfloat);
+GLAPI void APIENTRY glVertexStream1fvATI (GLenum, const GLfloat *);
+GLAPI void APIENTRY glVertexStream1dATI (GLenum, GLdouble);
+GLAPI void APIENTRY glVertexStream1dvATI (GLenum, const GLdouble *);
+GLAPI void APIENTRY glVertexStream2sATI (GLenum, GLshort, GLshort);
+GLAPI void APIENTRY glVertexStream2svATI (GLenum, const GLshort *);
+GLAPI void APIENTRY glVertexStream2iATI (GLenum, GLint, GLint);
+GLAPI void APIENTRY glVertexStream2ivATI (GLenum, const GLint *);
+GLAPI void APIENTRY glVertexStream2fATI (GLenum, GLfloat, GLfloat);
+GLAPI void APIENTRY glVertexStream2fvATI (GLenum, const GLfloat *);
+GLAPI void APIENTRY glVertexStream2dATI (GLenum, GLdouble, GLdouble);
+GLAPI void APIENTRY glVertexStream2dvATI (GLenum, const GLdouble *);
+GLAPI void APIENTRY glVertexStream3sATI (GLenum, GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glVertexStream3svATI (GLenum, const GLshort *);
+GLAPI void APIENTRY glVertexStream3iATI (GLenum, GLint, GLint, GLint);
+GLAPI void APIENTRY glVertexStream3ivATI (GLenum, const GLint *);
+GLAPI void APIENTRY glVertexStream3fATI (GLenum, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glVertexStream3fvATI (GLenum, const GLfloat *);
+GLAPI void APIENTRY glVertexStream3dATI (GLenum, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glVertexStream3dvATI (GLenum, const GLdouble *);
+GLAPI void APIENTRY glVertexStream4sATI (GLenum, GLshort, GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glVertexStream4svATI (GLenum, const GLshort *);
+GLAPI void APIENTRY glVertexStream4iATI (GLenum, GLint, GLint, GLint, GLint);
+GLAPI void APIENTRY glVertexStream4ivATI (GLenum, const GLint *);
+GLAPI void APIENTRY glVertexStream4fATI (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glVertexStream4fvATI (GLenum, const GLfloat *);
+GLAPI void APIENTRY glVertexStream4dATI (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glVertexStream4dvATI (GLenum, const GLdouble *);
+GLAPI void APIENTRY glNormalStream3bATI (GLenum, GLbyte, GLbyte, GLbyte);
+GLAPI void APIENTRY glNormalStream3bvATI (GLenum, const GLbyte *);
+GLAPI void APIENTRY glNormalStream3sATI (GLenum, GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glNormalStream3svATI (GLenum, const GLshort *);
+GLAPI void APIENTRY glNormalStream3iATI (GLenum, GLint, GLint, GLint);
+GLAPI void APIENTRY glNormalStream3ivATI (GLenum, const GLint *);
+GLAPI void APIENTRY glNormalStream3fATI (GLenum, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glNormalStream3fvATI (GLenum, const GLfloat *);
+GLAPI void APIENTRY glNormalStream3dATI (GLenum, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glNormalStream3dvATI (GLenum, const GLdouble *);
+GLAPI void APIENTRY glClientActiveVertexStreamATI (GLenum);
+GLAPI void APIENTRY glVertexBlendEnviATI (GLenum, GLint);
+GLAPI void APIENTRY glVertexBlendEnvfATI (GLenum, GLfloat);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords);
+typedef void (APIENTRYP PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz);
+typedef void (APIENTRYP PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords);
+typedef void (APIENTRYP PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz);
+typedef void (APIENTRYP PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
+typedef void (APIENTRYP PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz);
+typedef void (APIENTRYP PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
+typedef void (APIENTRYP PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz);
+typedef void (APIENTRYP PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
+typedef void (APIENTRYP PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz);
+typedef void (APIENTRYP PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
+typedef void (APIENTRYP PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream);
+typedef void (APIENTRYP PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param);
+#endif
+
+#ifndef GL_ATI_element_array
+#define GL_ATI_element_array 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glElementPointerATI (GLenum, const GLvoid *);
+GLAPI void APIENTRY glDrawElementArrayATI (GLenum, GLsizei);
+GLAPI void APIENTRY glDrawRangeElementArrayATI (GLenum, GLuint, GLuint, GLsizei);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLELEMENTPOINTERATIPROC) (GLenum type, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count);
+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count);
+#endif
+
+#ifndef GL_SUN_mesh_array
+#define GL_SUN_mesh_array 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDrawMeshArraysSUN (GLenum, GLint, GLsizei, GLsizei);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width);
+#endif
+
+#ifndef GL_SUN_slice_accum
+#define GL_SUN_slice_accum 1
+#endif
+
+#ifndef GL_NV_multisample_filter_hint
+#define GL_NV_multisample_filter_hint 1
+#endif
+
+#ifndef GL_NV_depth_clamp
+#define GL_NV_depth_clamp 1
+#endif
+
+#ifndef GL_NV_occlusion_query
+#define GL_NV_occlusion_query 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glGenOcclusionQueriesNV (GLsizei, GLuint *);
+GLAPI void APIENTRY glDeleteOcclusionQueriesNV (GLsizei, const GLuint *);
+GLAPI GLboolean APIENTRY glIsOcclusionQueryNV (GLuint);
+GLAPI void APIENTRY glBeginOcclusionQueryNV (GLuint);
+GLAPI void APIENTRY glEndOcclusionQueryNV (void);
+GLAPI void APIENTRY glGetOcclusionQueryivNV (GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glGetOcclusionQueryuivNV (GLuint, GLenum, GLuint *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids);
+typedef void (APIENTRYP PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids);
+typedef GLboolean (APIENTRYP PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id);
+typedef void (APIENTRYP PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id);
+typedef void (APIENTRYP PFNGLENDOCCLUSIONQUERYNVPROC) (void);
+typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params);
+#endif
+
+#ifndef GL_NV_point_sprite
+#define GL_NV_point_sprite 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glPointParameteriNV (GLenum, GLint);
+GLAPI void APIENTRY glPointParameterivNV (GLenum, const GLint *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
+#endif
+
+#ifndef GL_NV_texture_shader3
+#define GL_NV_texture_shader3 1
+#endif
+
+#ifndef GL_NV_vertex_program1_1
+#define GL_NV_vertex_program1_1 1
+#endif
+
+#ifndef GL_EXT_shadow_funcs
+#define GL_EXT_shadow_funcs 1
+#endif
+
+#ifndef GL_EXT_stencil_two_side
+#define GL_EXT_stencil_two_side 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glActiveStencilFaceEXT (GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face);
+#endif
+
+#ifndef GL_ATI_text_fragment_shader
+#define GL_ATI_text_fragment_shader 1
+#endif
+
+#ifndef GL_APPLE_client_storage
+#define GL_APPLE_client_storage 1
+#endif
+
+#ifndef GL_APPLE_element_array
+#define GL_APPLE_element_array 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glElementPointerAPPLE (GLenum, const GLvoid *);
+GLAPI void APIENTRY glDrawElementArrayAPPLE (GLenum, GLint, GLsizei);
+GLAPI void APIENTRY glDrawRangeElementArrayAPPLE (GLenum, GLuint, GLuint, GLint, GLsizei);
+GLAPI void APIENTRY glMultiDrawElementArrayAPPLE (GLenum, const GLint *, const GLsizei *, GLsizei);
+GLAPI void APIENTRY glMultiDrawRangeElementArrayAPPLE (GLenum, GLuint, GLuint, const GLint *, const GLsizei *, GLsizei);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count);
+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count);
+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
+typedef void (APIENTRYP PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount);
+#endif
+
+#ifndef GL_APPLE_fence
+#define GL_APPLE_fence 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glGenFencesAPPLE (GLsizei, GLuint *);
+GLAPI void APIENTRY glDeleteFencesAPPLE (GLsizei, const GLuint *);
+GLAPI void APIENTRY glSetFenceAPPLE (GLuint);
+GLAPI GLboolean APIENTRY glIsFenceAPPLE (GLuint);
+GLAPI GLboolean APIENTRY glTestFenceAPPLE (GLuint);
+GLAPI void APIENTRY glFinishFenceAPPLE (GLuint);
+GLAPI GLboolean APIENTRY glTestObjectAPPLE (GLenum, GLuint);
+GLAPI void APIENTRY glFinishObjectAPPLE (GLenum, GLint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint *fences);
+typedef void (APIENTRYP PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint *fences);
+typedef void (APIENTRYP PFNGLSETFENCEAPPLEPROC) (GLuint fence);
+typedef GLboolean (APIENTRYP PFNGLISFENCEAPPLEPROC) (GLuint fence);
+typedef GLboolean (APIENTRYP PFNGLTESTFENCEAPPLEPROC) (GLuint fence);
+typedef void (APIENTRYP PFNGLFINISHFENCEAPPLEPROC) (GLuint fence);
+typedef GLboolean (APIENTRYP PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name);
+typedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name);
+#endif
+
+#ifndef GL_APPLE_vertex_array_object
+#define GL_APPLE_vertex_array_object 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint);
+GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei, const GLuint *);
+GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei, const GLuint *);
+GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array);
+typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);
+typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);
+typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array);
+#endif
+
+#ifndef GL_APPLE_vertex_array_range
+#define GL_APPLE_vertex_array_range 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glVertexArrayRangeAPPLE (GLsizei, GLvoid *);
+GLAPI void APIENTRY glFlushVertexArrayRangeAPPLE (GLsizei, GLvoid *);
+GLAPI void APIENTRY glVertexArrayParameteriAPPLE (GLenum, GLint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer);
+typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer);
+typedef void (APIENTRYP PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param);
+#endif
+
+#ifndef GL_APPLE_ycbcr_422
+#define GL_APPLE_ycbcr_422 1
+#endif
+
+#ifndef GL_S3_s3tc
+#define GL_S3_s3tc 1
+#endif
+
+#ifndef GL_ATI_draw_buffers
+#define GL_ATI_draw_buffers 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDrawBuffersATI (GLsizei, const GLenum *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs);
+#endif
+
+#ifndef GL_ATI_pixel_format_float
+#define GL_ATI_pixel_format_float 1
+/* This is really a WGL extension, but defines some associated GL enums.
+ * ATI does not export "GL_ATI_pixel_format_float" in the GL_EXTENSIONS string.
+ */
+#endif
+
+#ifndef GL_ATI_texture_env_combine3
+#define GL_ATI_texture_env_combine3 1
+#endif
+
+#ifndef GL_ATI_texture_float
+#define GL_ATI_texture_float 1
+#endif
+
+#ifndef GL_NV_float_buffer
+#define GL_NV_float_buffer 1
+#endif
+
+#ifndef GL_NV_fragment_program
+#define GL_NV_fragment_program 1
+/* Some NV_fragment_program entry points are shared with ARB_vertex_program. */
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glProgramNamedParameter4fNV (GLuint, GLsizei, const GLubyte *, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glProgramNamedParameter4dNV (GLuint, GLsizei, const GLubyte *, GLdouble, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glProgramNamedParameter4fvNV (GLuint, GLsizei, const GLubyte *, const GLfloat *);
+GLAPI void APIENTRY glProgramNamedParameter4dvNV (GLuint, GLsizei, const GLubyte *, const GLdouble *);
+GLAPI void APIENTRY glGetProgramNamedParameterfvNV (GLuint, GLsizei, const GLubyte *, GLfloat *);
+GLAPI void APIENTRY glGetProgramNamedParameterdvNV (GLuint, GLsizei, const GLubyte *, GLdouble *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v);
+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v);
+typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params);
+#endif
+
+#ifndef GL_NV_half_float
+#define GL_NV_half_float 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glVertex2hNV (GLhalfNV, GLhalfNV);
+GLAPI void APIENTRY glVertex2hvNV (const GLhalfNV *);
+GLAPI void APIENTRY glVertex3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
+GLAPI void APIENTRY glVertex3hvNV (const GLhalfNV *);
+GLAPI void APIENTRY glVertex4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
+GLAPI void APIENTRY glVertex4hvNV (const GLhalfNV *);
+GLAPI void APIENTRY glNormal3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
+GLAPI void APIENTRY glNormal3hvNV (const GLhalfNV *);
+GLAPI void APIENTRY glColor3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
+GLAPI void APIENTRY glColor3hvNV (const GLhalfNV *);
+GLAPI void APIENTRY glColor4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
+GLAPI void APIENTRY glColor4hvNV (const GLhalfNV *);
+GLAPI void APIENTRY glTexCoord1hNV (GLhalfNV);
+GLAPI void APIENTRY glTexCoord1hvNV (const GLhalfNV *);
+GLAPI void APIENTRY glTexCoord2hNV (GLhalfNV, GLhalfNV);
+GLAPI void APIENTRY glTexCoord2hvNV (const GLhalfNV *);
+GLAPI void APIENTRY glTexCoord3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
+GLAPI void APIENTRY glTexCoord3hvNV (const GLhalfNV *);
+GLAPI void APIENTRY glTexCoord4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
+GLAPI void APIENTRY glTexCoord4hvNV (const GLhalfNV *);
+GLAPI void APIENTRY glMultiTexCoord1hNV (GLenum, GLhalfNV);
+GLAPI void APIENTRY glMultiTexCoord1hvNV (GLenum, const GLhalfNV *);
+GLAPI void APIENTRY glMultiTexCoord2hNV (GLenum, GLhalfNV, GLhalfNV);
+GLAPI void APIENTRY glMultiTexCoord2hvNV (GLenum, const GLhalfNV *);
+GLAPI void APIENTRY glMultiTexCoord3hNV (GLenum, GLhalfNV, GLhalfNV, GLhalfNV);
+GLAPI void APIENTRY glMultiTexCoord3hvNV (GLenum, const GLhalfNV *);
+GLAPI void APIENTRY glMultiTexCoord4hNV (GLenum, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
+GLAPI void APIENTRY glMultiTexCoord4hvNV (GLenum, const GLhalfNV *);
+GLAPI void APIENTRY glFogCoordhNV (GLhalfNV);
+GLAPI void APIENTRY glFogCoordhvNV (const GLhalfNV *);
+GLAPI void APIENTRY glSecondaryColor3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
+GLAPI void APIENTRY glSecondaryColor3hvNV (const GLhalfNV *);
+GLAPI void APIENTRY glVertexWeighthNV (GLhalfNV);
+GLAPI void APIENTRY glVertexWeighthvNV (const GLhalfNV *);
+GLAPI void APIENTRY glVertexAttrib1hNV (GLuint, GLhalfNV);
+GLAPI void APIENTRY glVertexAttrib1hvNV (GLuint, const GLhalfNV *);
+GLAPI void APIENTRY glVertexAttrib2hNV (GLuint, GLhalfNV, GLhalfNV);
+GLAPI void APIENTRY glVertexAttrib2hvNV (GLuint, const GLhalfNV *);
+GLAPI void APIENTRY glVertexAttrib3hNV (GLuint, GLhalfNV, GLhalfNV, GLhalfNV);
+GLAPI void APIENTRY glVertexAttrib3hvNV (GLuint, const GLhalfNV *);
+GLAPI void APIENTRY glVertexAttrib4hNV (GLuint, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
+GLAPI void APIENTRY glVertexAttrib4hvNV (GLuint, const GLhalfNV *);
+GLAPI void APIENTRY glVertexAttribs1hvNV (GLuint, GLsizei, const GLhalfNV *);
+GLAPI void APIENTRY glVertexAttribs2hvNV (GLuint, GLsizei, const GLhalfNV *);
+GLAPI void APIENTRY glVertexAttribs3hvNV (GLuint, GLsizei, const GLhalfNV *);
+GLAPI void APIENTRY glVertexAttribs4hvNV (GLuint, GLsizei, const GLhalfNV *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y);
+typedef void (APIENTRYP PFNGLVERTEX2HVNVPROC) (const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z);
+typedef void (APIENTRYP PFNGLVERTEX3HVNVPROC) (const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
+typedef void (APIENTRYP PFNGLVERTEX4HVNVPROC) (const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz);
+typedef void (APIENTRYP PFNGLNORMAL3HVNVPROC) (const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
+typedef void (APIENTRYP PFNGLCOLOR3HVNVPROC) (const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha);
+typedef void (APIENTRYP PFNGLCOLOR4HVNVPROC) (const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLTEXCOORD1HNVPROC) (GLhalfNV s);
+typedef void (APIENTRYP PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t);
+typedef void (APIENTRYP PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r);
+typedef void (APIENTRYP PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
+typedef void (APIENTRYP PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLFOGCOORDHNVPROC) (GLhalfNV fog);
+typedef void (APIENTRYP PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight);
+typedef void (APIENTRYP PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
+#endif
+
+#ifndef GL_NV_pixel_data_range
+#define GL_NV_pixel_data_range 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glPixelDataRangeNV (GLenum, GLsizei, GLvoid *);
+GLAPI void APIENTRY glFlushPixelDataRangeNV (GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, GLvoid *pointer);
+typedef void (APIENTRYP PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target);
+#endif
+
+#ifndef GL_NV_primitive_restart
+#define GL_NV_primitive_restart 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glPrimitiveRestartNV (void);
+GLAPI void APIENTRY glPrimitiveRestartIndexNV (GLuint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPRIMITIVERESTARTNVPROC) (void);
+typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index);
+#endif
+
+#ifndef GL_NV_texture_expand_normal
+#define GL_NV_texture_expand_normal 1
+#endif
+
+#ifndef GL_NV_vertex_program2
+#define GL_NV_vertex_program2 1
+#endif
+
+#ifndef GL_ATI_map_object_buffer
+#define GL_ATI_map_object_buffer 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI GLvoid* APIENTRY glMapObjectBufferATI (GLuint);
+GLAPI void APIENTRY glUnmapObjectBufferATI (GLuint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef GLvoid* (APIENTRYP PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer);
+typedef void (APIENTRYP PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer);
+#endif
+
+#ifndef GL_ATI_separate_stencil
+#define GL_ATI_separate_stencil 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glStencilOpSeparateATI (GLenum, GLenum, GLenum, GLenum);
+GLAPI void APIENTRY glStencilFuncSeparateATI (GLenum, GLenum, GLint, GLuint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
+typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
+#endif
+
+#ifndef GL_ATI_vertex_attrib_array_object
+#define GL_ATI_vertex_attrib_array_object 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glVertexAttribArrayObjectATI (GLuint, GLint, GLenum, GLboolean, GLsizei, GLuint, GLuint);
+GLAPI void APIENTRY glGetVertexAttribArrayObjectfvATI (GLuint, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetVertexAttribArrayObjectivATI (GLuint, GLenum, GLint *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params);
+#endif
+
+#ifndef GL_OES_read_format
+#define GL_OES_read_format 1
+#endif
+
+#ifndef GL_EXT_depth_bounds_test
+#define GL_EXT_depth_bounds_test 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDepthBoundsEXT (GLclampd, GLclampd);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax);
+#endif
+
+#ifndef GL_EXT_texture_mirror_clamp
+#define GL_EXT_texture_mirror_clamp 1
+#endif
+
+#ifndef GL_EXT_blend_equation_separate
+#define GL_EXT_blend_equation_separate 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBlendEquationSeparateEXT (GLenum, GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha);
+#endif
+
+#ifndef GL_MESA_pack_invert
+#define GL_MESA_pack_invert 1
+#endif
+
+#ifndef GL_MESA_ycbcr_texture
+#define GL_MESA_ycbcr_texture 1
+#endif
+
+#ifndef GL_EXT_pixel_buffer_object
+#define GL_EXT_pixel_buffer_object 1
+#endif
+
+#ifndef GL_NV_fragment_program_option
+#define GL_NV_fragment_program_option 1
+#endif
+
+#ifndef GL_NV_fragment_program2
+#define GL_NV_fragment_program2 1
+#endif
+
+#ifndef GL_NV_vertex_program2_option
+#define GL_NV_vertex_program2_option 1
+#endif
+
+#ifndef GL_NV_vertex_program3
+#define GL_NV_vertex_program3 1
+#endif
+
+#ifndef GL_EXT_framebuffer_object
+#define GL_EXT_framebuffer_object 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI GLboolean APIENTRY glIsRenderbufferEXT (GLuint);
+GLAPI void APIENTRY glBindRenderbufferEXT (GLenum, GLuint);
+GLAPI void APIENTRY glDeleteRenderbuffersEXT (GLsizei, const GLuint *);
+GLAPI void APIENTRY glGenRenderbuffersEXT (GLsizei, GLuint *);
+GLAPI void APIENTRY glRenderbufferStorageEXT (GLenum, GLenum, GLsizei, GLsizei);
+GLAPI void APIENTRY glGetRenderbufferParameterivEXT (GLenum, GLenum, GLint *);
+GLAPI GLboolean APIENTRY glIsFramebufferEXT (GLuint);
+GLAPI void APIENTRY glBindFramebufferEXT (GLenum, GLuint);
+GLAPI void APIENTRY glDeleteFramebuffersEXT (GLsizei, const GLuint *);
+GLAPI void APIENTRY glGenFramebuffersEXT (GLsizei, GLuint *);
+GLAPI GLenum APIENTRY glCheckFramebufferStatusEXT (GLenum);
+GLAPI void APIENTRY glFramebufferTexture1DEXT (GLenum, GLenum, GLenum, GLuint, GLint);
+GLAPI void APIENTRY glFramebufferTexture2DEXT (GLenum, GLenum, GLenum, GLuint, GLint);
+GLAPI void APIENTRY glFramebufferTexture3DEXT (GLenum, GLenum, GLenum, GLuint, GLint, GLint);
+GLAPI void APIENTRY glFramebufferRenderbufferEXT (GLenum, GLenum, GLenum, GLuint);
+GLAPI void APIENTRY glGetFramebufferAttachmentParameterivEXT (GLenum, GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glGenerateMipmapEXT (GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer);
+typedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer);
+typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers);
+typedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers);
+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
+typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer);
+typedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer);
+typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers);
+typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers);
+typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target);
+#endif
+
+#ifndef GL_GREMEDY_string_marker
+#define GL_GREMEDY_string_marker 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei, const GLvoid *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const GLvoid *string);
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+#endif /* NO_SDL_GLEXT */
diff --git a/src/osd/modules/opengl/osd_opengl.h b/src/osd/modules/opengl/osd_opengl.h
index 26f577f343e..5e843543f46 100644
--- a/src/osd/modules/opengl/osd_opengl.h
+++ b/src/osd/modules/opengl/osd_opengl.h
@@ -20,11 +20,7 @@
#ifdef OSD_WINDOWS
#ifdef _MSC_VER
#include <windows.h>
- #include "GL/GL.h"
- #include "bgfx/3rdparty/khronos/gl/glext.h "
- #ifndef USE_DISPATCH_GL
- #include "bgfx/3rdparty/khronos/wgl/wglext.h"
- #endif
+ #include "SDL1211_opengl.h"
#else
#include "GL/gl.h"
#include "GL/glext.h"
@@ -33,14 +29,28 @@
#endif
#endif
#else
+ #if (SDLMAME_SDL2)
#include <SDL2/SDL_version.h>
+ #else
+ #include <SDL/SDL_version.h>
+ #endif
#if (SDL_VERSION_ATLEAST(1,2,10))
#if defined(SDLMAME_WIN32)
// Avoid that winnt.h (included via sdl_opengl.h, windows.h, windef.h includes intrin.h
#define __INTRIN_H_
#endif
+ #if (SDLMAME_SDL2)
#include <SDL2/SDL_opengl.h>
+ #else
+ #include <SDL/SDL_opengl.h>
+ #endif
+ #else
+ /*
+ * SDL 1.2.9 does not provide everything we need
+ * We therefore distribute it ourselves
+ */
+ #include "SDL1211_opengl.h"
#endif
#endif
diff --git a/src/osd/modules/osdwindow.h b/src/osd/modules/osdwindow.h
index d4c2a4101cc..be4f016f0f9 100644
--- a/src/osd/modules/osdwindow.h
+++ b/src/osd/modules/osdwindow.h
@@ -37,9 +37,7 @@ public:
#else
m_hwnd(0), m_dc(0), m_focus_hwnd(0), m_resize_state(0),
#endif
- m_primlist(nullptr),
- m_index(0),
- m_main(nullptr),
+ m_primlist(NULL),
m_prescale(1)
{}
virtual ~osd_window() { }
@@ -57,8 +55,12 @@ public:
#ifdef OSD_SDL
virtual osd_dim blit_surface_size() = 0;
virtual osd_monitor_info *monitor() const = 0;
+#if (SDLMAME_SDL2)
virtual SDL_Window *sdl_window() = 0;
#else
+ virtual SDL_Surface *sdl_surface() = 0;
+#endif
+#else
virtual osd_monitor_info *monitor() const = 0;
virtual bool win_has_menu() = 0;
// FIXME: cann we replace winwindow_video_window_monitor(NULL) with monitor() ?
@@ -76,8 +78,6 @@ public:
render_primitive_list *m_primlist;
osd_window_config m_win_config;
- int m_index;
- osd_window *m_main;
protected:
int m_prescale;
};
diff --git a/src/osd/modules/render/bgfx/fs_line.sc b/src/osd/modules/render/bgfx/fs_line.sc
deleted file mode 100644
index 1fcd3b27284..00000000000
--- a/src/osd/modules/render/bgfx/fs_line.sc
+++ /dev/null
@@ -1,11 +0,0 @@
-$input v_color0
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "../../../../../3rdparty/bgfx/examples/common/common.sh"
-
-void main()
-{
- gl_FragColor = v_color0;
-}
diff --git a/src/osd/modules/render/bgfx/fs_quad.sc b/src/osd/modules/render/bgfx/fs_quad.sc
deleted file mode 100644
index 1fcd3b27284..00000000000
--- a/src/osd/modules/render/bgfx/fs_quad.sc
+++ /dev/null
@@ -1,11 +0,0 @@
-$input v_color0
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "../../../../../3rdparty/bgfx/examples/common/common.sh"
-
-void main()
-{
- gl_FragColor = v_color0;
-}
diff --git a/src/osd/modules/render/bgfx/fs_quad_texture.sc b/src/osd/modules/render/bgfx/fs_quad_texture.sc
deleted file mode 100644
index 5a45a056171..00000000000
--- a/src/osd/modules/render/bgfx/fs_quad_texture.sc
+++ /dev/null
@@ -1,14 +0,0 @@
-$input v_color0, v_texcoord0
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "../../../../../3rdparty/bgfx/examples/common/common.sh"
-
-SAMPLER2D(s_tex, 0);
-
-void main()
-{
- vec4 texel = texture2D(s_tex, v_texcoord0);
- gl_FragColor = texel * v_color0;
-}
diff --git a/src/osd/modules/render/bgfx/makefile b/src/osd/modules/render/bgfx/makefile
deleted file mode 100644
index 86735a61c38..00000000000
--- a/src/osd/modules/render/bgfx/makefile
+++ /dev/null
@@ -1,13 +0,0 @@
-BGFX_DIR=../../../../../3rdparty/bgfx
-RUNTIME_DIR=../../../../..
-BUILD_DIR=../../../../../build
-
-include $(BGFX_DIR)/scripts/shader.mk
-
-rebuild:
- @make -s --no-print-directory TARGET=0 clean all
- @make -s --no-print-directory TARGET=1 clean all
- @make -s --no-print-directory TARGET=2 clean all
- @make -s --no-print-directory TARGET=3 clean all
- @make -s --no-print-directory TARGET=4 clean all
- @make -s --no-print-directory TARGET=5 clean all
diff --git a/src/osd/modules/render/bgfx/varying.def.sc b/src/osd/modules/render/bgfx/varying.def.sc
deleted file mode 100644
index 4745725e015..00000000000
--- a/src/osd/modules/render/bgfx/varying.def.sc
+++ /dev/null
@@ -1,7 +0,0 @@
-vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0);
-vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0);
-vec3 v_pos : TEXCOORD1 = vec3(0.0, 0.0, 0.0);
-
-vec3 a_position : POSITION;
-vec4 a_color0 : COLOR0;
-vec2 a_texcoord0 : TEXCOORD0;
diff --git a/src/osd/modules/render/bgfx/vs_line.sc b/src/osd/modules/render/bgfx/vs_line.sc
deleted file mode 100644
index 874ffcf46ac..00000000000
--- a/src/osd/modules/render/bgfx/vs_line.sc
+++ /dev/null
@@ -1,13 +0,0 @@
-$input a_position, a_color0
-$output v_color0
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "../../../../../3rdparty/bgfx/examples/common/common.sh"
-
-void main()
-{
- gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
- v_color0 = a_color0;
-}
diff --git a/src/osd/modules/render/bgfx/vs_quad.sc b/src/osd/modules/render/bgfx/vs_quad.sc
deleted file mode 100644
index 84e23c5a09b..00000000000
--- a/src/osd/modules/render/bgfx/vs_quad.sc
+++ /dev/null
@@ -1,13 +0,0 @@
-$input a_position, a_color0
-$output v_color0
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "../../../../../3rdparty/bgfx/examples/common/common.sh"
-
-void main()
-{
- gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
- v_color0 = a_color0;
-}
diff --git a/src/osd/modules/render/bgfx/vs_quad_texture.sc b/src/osd/modules/render/bgfx/vs_quad_texture.sc
deleted file mode 100644
index c3699f6fbd9..00000000000
--- a/src/osd/modules/render/bgfx/vs_quad_texture.sc
+++ /dev/null
@@ -1,14 +0,0 @@
-$input a_position, a_texcoord0, a_color0
-$output v_texcoord0, v_color0
-
-// license:BSD-3-Clause
-// copyright-holders:Dario Manesku
-
-#include "../../../../../3rdparty/bgfx/examples/common/common.sh"
-
-void main()
-{
- gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
- v_texcoord0 = a_texcoord0;
- v_color0 = a_color0;
-}
diff --git a/src/osd/modules/render/binpacker.cpp b/src/osd/modules/render/binpacker.cpp
deleted file mode 100644
index 2054dfa54cf..00000000000
--- a/src/osd/modules/render/binpacker.cpp
+++ /dev/null
@@ -1,195 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Ryan Holtz
-//============================================================
-//
-// binpacker.cpp - Simple texture packer for dynamic atlasing
-//
-//============================================================
-
-#include "binpacker.h"
-#include <algorithm>
-
-bool rectangle_packer::pack(const std::vector<packable_rectangle>& rects, std::vector<std::vector<packed_rectangle>>& packs, int pack_size)
-{
- clear();
-
- m_pack_size = pack_size;
-
- // Add rects to member array, and check to make sure none is too big
- for (size_t rect = 0; rect < rects.size(); rect++)
- {
- m_rects.push_back(rectangle(0, 0, rects[rect].width(), rects[rect].height(), rects[rect].hash(), rects[rect].format(), rects[rect].rowpixels(), rects[rect].palette(), rects[rect].base()));
- }
-
- // Sort from greatest to least area
- std::sort(m_rects.rbegin(), m_rects.rend());
-
- // Pack
- while (m_num_packed < (int)m_rects.size())
- {
- int i = m_packs.size();
- m_packs.push_back(rectangle(m_pack_size));
- m_roots.push_back(i);
- if (!fill(i))
- {
- return false;
- }
- }
-
- // Write out
- packs.resize(m_roots.size());
- for (size_t i = 0; i < m_roots.size(); ++i)
- {
- packs[i].clear();
- add_pack_to_array(m_roots[i], packs[i]);
- }
-
- return true;
-}
-
-void rectangle_packer::clear()
-{
- m_pack_size = 0;
- m_num_packed = 0;
- m_rects.clear();
- m_packs.clear();
- m_roots.clear();
-}
-
-bool rectangle_packer::fill(int pack)
-{
- // For each rect
- for (size_t rect = 0; rect < m_rects.size(); ++rect)
- {
- // If it's not already packed
- if (!m_rects[rect].packed)
- {
- // If it fits in the current working area
- if (fits(m_rects[rect], m_packs[pack]))
- {
- // Store in lower-left of working area, split, and recurse
- m_num_packed++;
- split(pack, rect);
- fill(m_packs[pack].children[0]);
- fill(m_packs[pack].children[1]);
- return true;
- }
- }
- }
- return false;
-}
-
-void rectangle_packer::split(int pack, int rect)
-{
- // Split the working area either horizontally or vertically with respect
- // to the rect we're storing, such that we get the largest possible child
- // area.
-
- rectangle left = m_packs[pack];
- rectangle right = m_packs[pack];
- rectangle bottom = m_packs[pack];
- rectangle top = m_packs[pack];
-
- left.y += m_rects[rect].h;
- left.w = m_rects[rect].w;
- left.h -= m_rects[rect].h;
-
- right.x += m_rects[rect].w;
- right.w -= m_rects[rect].w;
-
- bottom.x += m_rects[rect].w;
- bottom.h = m_rects[rect].h;
- bottom.w -= m_rects[rect].w;
-
- top.y += m_rects[rect].h;
- top.h -= m_rects[rect].h;
-
- int max_lr_area = left.get_area();
- if (right.get_area() > max_lr_area)
- {
- max_lr_area = right.get_area();
- }
-
- int max_bt_area = bottom.get_area();
- if (top.get_area() > max_bt_area)
- {
- max_bt_area = top.get_area();
- }
-
- if (max_lr_area > max_bt_area)
- {
- if (left.get_area() > right.get_area())
- {
- m_packs.push_back(left);
- m_packs.push_back(right);
- }
- else
- {
- m_packs.push_back(right);
- m_packs.push_back(left);
- }
- }
- else
- {
- if (bottom.get_area() > top.get_area())
- {
- m_packs.push_back(bottom);
- m_packs.push_back(top);
- }
- else
- {
- m_packs.push_back(top);
- m_packs.push_back(bottom);
- }
- }
-
- // This pack area now represents the rect we've just stored, so save the
- // relevant info to it, and assign children.
- m_packs[pack].w = m_rects[rect].w;
- m_packs[pack].h = m_rects[rect].h;
- m_packs[pack].hash = m_rects[rect].hash;
- m_packs[pack].format = m_rects[rect].format;
- m_packs[pack].rowpixels = m_rects[rect].rowpixels;
- m_packs[pack].palette = m_rects[rect].palette;
- m_packs[pack].base = m_rects[rect].base;
- m_packs[pack].children[0] = m_packs.size() - 2;
- m_packs[pack].children[1] = m_packs.size() - 1;
-
- // Done with the rect
- m_rects[rect].packed = true;
-
-}
-
-bool rectangle_packer::fits(rectangle& rect1, const rectangle& rect2)
-{
- // Check to see if rect1 fits in rect2
-
- if (rect1.w <= rect2.w && rect1.h <= rect2.h)
- {
- return true;
- }
- else
- {
- return false;
- }
-}
-
-void rectangle_packer::add_pack_to_array(int pack, std::vector<packed_rectangle>& array) const
-{
- if (m_packs[pack].hash != 0)
- {
- array.push_back(packed_rectangle(m_packs[pack].hash, m_packs[pack].format,
- m_packs[pack].w, m_packs[pack].h, m_packs[pack].x, m_packs[pack].y,
- m_packs[pack].rowpixels, m_packs[pack].palette, m_packs[pack].base));
-
- if (m_packs[pack].children[0] != -1)
- {
- add_pack_to_array(m_packs[pack].children[0], array);
- }
-
- if (m_packs[pack].children[1] != -1)
- {
- add_pack_to_array(m_packs[pack].children[1], array);
- }
- }
-}
diff --git a/src/osd/modules/render/binpacker.h b/src/osd/modules/render/binpacker.h
deleted file mode 100644
index 677083b5c09..00000000000
--- a/src/osd/modules/render/binpacker.h
+++ /dev/null
@@ -1,183 +0,0 @@
-#pragma once
-
-#ifndef __RECTPACKER_H__
-#define __RECTPACKER_H__
-
-#include "emu.h"
-
-#include <vector>
-
-class rectangle_packer
-{
-public:
- // The input and output are in terms of vectors of ints to avoid
- // dependencies (although I suppose a public member struct could have been
- // used). The parameters are:
-
- // packs : After packing, the outer array contains the packs (therefore
- // the number of packs is packs.size()). Each inner array contains a
- // sequence of sets of 3 ints. Each set represents a rectangle in the
- // pack. The elements in the set are 1) the rect ID, 2) the x position
- // of the rect with respect to the pack, and 3) the y position of the rect
- // with respect to the pack. The widths and heights of the rects are not
- // included, as it's assumed they are stored on the caller's side (they
- // were after all the input to the function).
-
- class packable_rectangle
- {
- public:
- packable_rectangle() : m_hash(0), m_width(-1), m_height(-1) { }
- packable_rectangle(UINT32 hash, UINT32 format, int width, int height, int rowpixels, const rgb_t *palette, void *base)
- : m_hash(hash)
- , m_format(format)
- , m_width(width)
- , m_height(height)
- , m_rowpixels(rowpixels)
- , m_palette(palette)
- , m_base(base)
- {
- }
-
- UINT32 hash() const { return m_hash; }
- UINT32 format() const { return m_format; }
- int width() const { return m_width; }
- int height() const { return m_height; }
- int rowpixels() const { return m_rowpixels; }
- const rgb_t* palette() const { return m_palette; }
- void* base() const { return m_base; }
-
- private:
- UINT32 m_hash;
- UINT32 m_format;
- int m_width;
- int m_height;
- int m_rowpixels;
- const rgb_t* m_palette;
- void* m_base;
- };
-
- class packed_rectangle
- {
- public:
- packed_rectangle() : m_hash(0), m_format(0), m_width(-1), m_height(-1), m_x(-1), m_y(-1), m_rowpixels(0), m_palette(nullptr), m_base(nullptr) { }
- packed_rectangle(const packed_rectangle& rect)
- : m_hash(rect.m_hash)
- , m_format(rect.m_format)
- , m_width(rect.m_width)
- , m_height(rect.m_height)
- , m_x(rect.m_x)
- , m_y(rect.m_y)
- , m_rowpixels(rect.m_rowpixels)
- , m_palette(rect.m_palette)
- , m_base(rect.m_base)
- {
- }
- packed_rectangle(UINT32 hash, UINT32 format, int width, int height, int x, int y, int rowpixels, const rgb_t *palette, void *base)
- : m_hash(hash)
- , m_format(format)
- , m_width(width)
- , m_height(height)
- , m_x(x)
- , m_y(y)
- , m_rowpixels(rowpixels)
- , m_palette(palette)
- , m_base(base)
- {
- }
-
- UINT32 hash() const { return m_hash; }
- UINT32 format() const { return m_format; }
- int width() const { return m_width; }
- int height() const { return m_height; }
- int x() const { return m_x; }
- int y() const { return m_y; }
- int rowpixels() const { return m_rowpixels; }
- const rgb_t* palette() const { return m_palette; }
- void* base() const { return m_base; }
-
- private:
- UINT32 m_hash;
- UINT32 m_format;
- int m_width;
- int m_height;
- int m_x;
- int m_y;
- int m_rowpixels;
- const rgb_t* m_palette;
- void* m_base;
- };
-
- bool pack(const std::vector<packable_rectangle>& rects, std::vector<std::vector<packed_rectangle>>& packs, int pack_size);
-
-private:
- struct rectangle
- {
- rectangle(int size)
- : x(0)
- , y(0)
- , w(size)
- , h(size)
- , hash(-1)
- , format(0)
- , rowpixels(0)
- , palette(nullptr)
- , base(nullptr)
- , packed(false)
- {
- children[0] = -1;
- children[1] = -1;
- }
-
- rectangle(int x, int y, int w, int h, int hash, UINT32 format, int rowpixels, const rgb_t *palette, void *base)
- : x(x)
- , y(y)
- , w(w)
- , h(h)
- , hash(hash)
- , format(format)
- , rowpixels(rowpixels)
- , palette(palette)
- , base(base)
- , packed(false)
- {
- children[0] = -1;
- children[1] = -1;
- }
-
- int get_area() const
- {
- return w * h;
- }
-
- bool operator<(const rectangle& rect) const
- {
- return get_area() < rect.get_area();
- }
-
- int x;
- int y;
- int w;
- int h;
- int hash;
- UINT32 format;
- int rowpixels;
- const rgb_t* palette;
- void* base;
- int children[2];
- bool packed;
- };
-
- void clear();
- bool fill(int pack);
- void split(int pack, int rect);
- bool fits(rectangle& rect1, const rectangle& rect2);
- void add_pack_to_array(int pack, std::vector<packed_rectangle>& array) const;
-
- int m_pack_size;
- int m_num_packed;
- std::vector<rectangle> m_rects;
- std::vector<rectangle> m_packs;
- std::vector<int> m_roots;
-};
-
-#endif // __RECTPACKER_H__ \ No newline at end of file
diff --git a/src/osd/modules/render/d3d/d3dcomm.h b/src/osd/modules/render/d3d/d3dcomm.h
index 58a51eaf1cf..5f5a3f6794c 100644
--- a/src/osd/modules/render/d3d/d3dcomm.h
+++ b/src/osd/modules/render/d3d/d3dcomm.h
@@ -78,6 +78,8 @@ public:
DWORD get_max_texture_width() { return m_texture_max_width; }
DWORD get_max_texture_height() { return m_texture_max_height; }
+ void compute_texture_size(int texwidth, int texheight, int* p_width, int* p_height);
+
texture_info * get_default_texture() { return m_default_texture; }
texture_info * get_vector_texture() { return m_vector_texture; }
@@ -149,7 +151,6 @@ public:
private:
void prescale();
void compute_size(int texwidth, int texheight);
- void compute_size_subroutine(int texwidth, int texheight, int* p_width, int* p_height);
texture_manager * m_texture_manager; // texture manager pointer
diff --git a/src/osd/modules/render/d3d/d3dhlsl.cpp b/src/osd/modules/render/d3d/d3dhlsl.cpp
index 4cc53f2e41d..7284eaabaa6 100644
--- a/src/osd/modules/render/d3d/d3dhlsl.cpp
+++ b/src/osd/modules/render/d3d/d3dhlsl.cpp
@@ -72,7 +72,7 @@ static direct3dx9_loadeffect_ptr g_load_effect = NULL;
//============================================================
shaders::shaders() :
- d3dintf(NULL), machine(NULL), d3d(NULL), num_screens(0), curr_screen(0), curr_frame(0), write_ini(false), read_ini(false), hlsl_prescale_x(0), hlsl_prescale_y(0), bloom_count(0),
+ d3dintf(NULL), machine(NULL), d3d(NULL), num_screens(0), curr_screen(0), curr_frame(0), bloom_count(0),
vecbuf_type(), vecbuf_index(0), vecbuf_count(0), avi_output_file(NULL), avi_frame(0), avi_copy_surface(NULL), avi_copy_texture(NULL), avi_final_target(NULL), avi_final_texture(NULL),
black_surface(NULL), black_texture(NULL), render_snap(false), snap_rendered(false), snap_copy_target(NULL), snap_copy_texture(NULL), snap_target(NULL), snap_texture(NULL),
snap_width(0), snap_height(0), lines_pending(false), backbuffer(NULL), curr_effect(NULL), default_effect(NULL), prescale_effect(NULL), post_effect(NULL), distortion_effect(NULL),
@@ -81,9 +81,6 @@ shaders::shaders() :
{
master_enable = false;
vector_enable = true;
- hlsl_prescale_x = 1;
- hlsl_prescale_x = 1;
- preset = -1;
shadow_texture = NULL;
options = NULL;
paused = true;
@@ -675,8 +672,6 @@ void shaders::init(base *d3dintf, running_machine *machine, d3d::renderer *rende
windows_options &winoptions = downcast<windows_options &>(machine->options());
master_enable = winoptions.d3d_hlsl_enable();
- hlsl_prescale_x = winoptions.d3d_hlsl_prescale_x();
- hlsl_prescale_y = winoptions.d3d_hlsl_prescale_y();
snap_width = winoptions.d3d_snap_width();
snap_height = winoptions.d3d_snap_height();
@@ -964,6 +959,7 @@ int shaders::create_resources(bool reset)
effects[i]->add_uniform("ScreenDims", uniform::UT_VEC2, uniform::CU_SCREEN_DIMS);
effects[i]->add_uniform("QuadDims", uniform::UT_VEC2, uniform::CU_QUAD_DIMS);
effects[i]->add_uniform("SwapXY", uniform::UT_BOOL, uniform::CU_SWAP_XY);
+ effects[i]->add_uniform("VectorScreen", uniform::UT_BOOL, uniform::CU_VECTOR_SCREEN);
}
ntsc_effect->add_uniform("CCValue", uniform::UT_FLOAT, uniform::CU_NTSC_CCFREQ);
@@ -1243,9 +1239,9 @@ int shaders::ntsc_pass(render_target *rt, int source_index, poly_info *poly, int
curr_effect->set_float("SignalOffset", signal_offset);
next_index = rt->next_index(next_index);
- blit(rt->native_target[next_index], true, D3DPT_TRIANGLELIST, 0, 2);
+ blit(rt->source_surface[next_index], true, D3DPT_TRIANGLELIST, 0, 2);
- color_effect->set_texture("Diffuse", rt->native_texture[next_index]);
+ color_effect->set_texture("Diffuse", rt->source_texture[next_index]);
return next_index;
}
@@ -1300,7 +1296,7 @@ int shaders::color_convolution_pass(render_target *rt, int source_index, poly_in
// initial "Diffuse" texture is set in shaders::set_texture() or the result of shaders::ntsc_pass()
next_index = rt->next_index(next_index);
- blit(rt->native_target[next_index], true, D3DPT_TRIANGLELIST, 0, 2);
+ blit(rt->source_surface[next_index], true, D3DPT_TRIANGLELIST, 0, 2);
return next_index;
}
@@ -1311,10 +1307,11 @@ int shaders::prescale_pass(render_target *rt, int source_index, poly_info *poly,
curr_effect = prescale_effect;
curr_effect->update_uniforms();
- curr_effect->set_texture("Diffuse", rt->native_texture[next_index]);
+ curr_effect->set_texture("Diffuse", rt->source_texture[next_index]);
next_index = rt->next_index(next_index);
- blit(rt->prescale_target[next_index], true, D3DPT_TRIANGLELIST, 0, 2);
+ // blit(rt->target_surface[next_index], true, D3DPT_TRIANGLELIST, 0, 2);
+ blit(rt->target_surface[next_index], true, poly->get_type(), vertnum, poly->get_count());
return next_index;
}
@@ -1334,10 +1331,11 @@ int shaders::deconverge_pass(render_target *rt, int source_index, poly_info *pol
curr_effect = deconverge_effect;
curr_effect->update_uniforms();
- curr_effect->set_texture("Diffuse", rt->prescale_texture[next_index]);
+ curr_effect->set_texture("Diffuse", rt->target_texture[next_index]);
next_index = rt->next_index(next_index);
- blit(rt->prescale_target[next_index], true, D3DPT_TRIANGLELIST, 0, 2);
+ // blit(rt->target_surface[next_index], true, D3DPT_TRIANGLELIST, 0, 2);
+ blit(rt->target_surface[next_index], true, poly->get_type(), vertnum, poly->get_count());
return next_index;
}
@@ -1354,10 +1352,11 @@ int shaders::defocus_pass(render_target *rt, int source_index, poly_info *poly,
curr_effect = focus_effect;
curr_effect->update_uniforms();
- curr_effect->set_texture("Diffuse", rt->prescale_texture[next_index]);
+ curr_effect->set_texture("Diffuse", rt->target_texture[next_index]);
next_index = rt->next_index(next_index);
- blit(rt->prescale_target[next_index], true, D3DPT_TRIANGLELIST, 0, 2);
+ // blit(rt->target_surface[next_index], true, D3DPT_TRIANGLELIST, 0, 2);
+ blit(rt->target_surface[next_index], true, poly->get_type(), vertnum, poly->get_count());
return next_index;
}
@@ -1374,21 +1373,23 @@ int shaders::phosphor_pass(render_target *rt, cache_target *ct, int source_index
curr_effect = phosphor_effect;
curr_effect->update_uniforms();
- curr_effect->set_texture("Diffuse", rt->prescale_texture[next_index]);
+ curr_effect->set_texture("Diffuse", rt->target_texture[next_index]);
curr_effect->set_texture("LastPass", ct->last_texture);
curr_effect->set_bool("Passthrough", false);
next_index = rt->next_index(next_index);
- blit(rt->prescale_target[next_index], true, D3DPT_TRIANGLELIST, 0, 2);
+ // blit(rt->target_surface[next_index], true, D3DPT_TRIANGLELIST, 0, 2);
+ blit(rt->target_surface[next_index], true, poly->get_type(), vertnum, poly->get_count());
// Pass along our phosphor'd screen
curr_effect->update_uniforms();
- curr_effect->set_texture("Diffuse", rt->prescale_texture[next_index]);
- curr_effect->set_texture("LastPass", rt->prescale_texture[next_index]);
+ curr_effect->set_texture("Diffuse", rt->target_texture[next_index]);
+ curr_effect->set_texture("LastPass", rt->target_texture[next_index]);
curr_effect->set_bool("Passthrough", true);
// Avoid changing targets due to page flipping
- blit(ct->last_target, true, D3DPT_TRIANGLELIST, 0, 2);
+ // blit(ct->last_target, true, D3DPT_TRIANGLELIST, 0, 2);
+ blit(ct->last_target, true, poly->get_type(), vertnum, poly->get_count());
return next_index;
}
@@ -1397,9 +1398,6 @@ int shaders::post_pass(render_target *rt, int source_index, poly_info *poly, int
{
int next_index = source_index;
- bool prepare_vector =
- machine->first_screen()->screen_type() == SCREEN_TYPE_VECTOR;
-
screen_device_iterator screen_iterator(machine->root_device());
screen_device *screen = screen_iterator.first();
for (int i = 0; i < curr_screen; i++)
@@ -1416,15 +1414,20 @@ int shaders::post_pass(render_target *rt, int source_index, poly_info *poly, int
float screen_scale[2] = { xscale, yscale };
float screen_offset[2] = { xoffset, yoffset };
- rgb_t back_color_rgb = !machine->first_screen()->has_palette() ? rgb_t(0, 0, 0) : machine->first_screen()->palette().palette()->entry_color(0);
+ rgb_t back_color_rgb = !machine->first_screen()->has_palette()
+ ? rgb_t(0, 0, 0)
+ : machine->first_screen()->palette().palette()->entry_color(0);
back_color_rgb = apply_color_convolution(back_color_rgb);
- float back_color[3] = { static_cast<float>(back_color_rgb.r()) / 255.0f, static_cast<float>(back_color_rgb.g()) / 255.0f, static_cast<float>(back_color_rgb.b()) / 255.0f };
+ float back_color[3] = {
+ static_cast<float>(back_color_rgb.r()) / 255.0f,
+ static_cast<float>(back_color_rgb.g()) / 255.0f,
+ static_cast<float>(back_color_rgb.b()) / 255.0f };
curr_effect = post_effect;
curr_effect->update_uniforms();
curr_effect->set_texture("ShadowTexture", shadow_texture == NULL ? NULL : shadow_texture->get_finaltex());
curr_effect->set_int("ShadowTileMode", options->shadow_mask_tile_mode);
- curr_effect->set_texture("DiffuseTexture", rt->prescale_texture[next_index]);
+ curr_effect->set_texture("DiffuseTexture", rt->target_texture[next_index]);
curr_effect->set_vector("BackColor", 3, back_color);
curr_effect->set_vector("ScreenScale", 2, screen_scale);
curr_effect->set_vector("ScreenOffset", 2, screen_offset);
@@ -1432,10 +1435,10 @@ int shaders::post_pass(render_target *rt, int source_index, poly_info *poly, int
curr_effect->set_float("TimeMilliseconds", (float)machine->time().as_double() * 1000.0f);
curr_effect->set_float("HumBarAlpha", options->hum_bar_alpha);
curr_effect->set_bool("PrepareBloom", prepare_bloom);
- curr_effect->set_bool("PrepareVector", prepare_vector);
next_index = rt->next_index(next_index);
- blit(prepare_bloom ? rt->native_target[next_index] : rt->prescale_target[next_index], true, poly->get_type(), vertnum, poly->get_count());
+ // blit(prepare_bloom ? rt->source_surface[next_index] : rt->target_surface[next_index], true, D3DPT_TRIANGLELIST, 0, 2);
+ blit(prepare_bloom ? rt->source_surface[next_index] : rt->target_surface[next_index], true, poly->get_type(), vertnum, poly->get_count());
return next_index;
}
@@ -1450,17 +1453,13 @@ int shaders::downsample_pass(render_target *rt, int source_index, poly_info *pol
return next_index;
}
- bool prepare_vector =
- machine->first_screen()->screen_type() == SCREEN_TYPE_VECTOR;
-
curr_effect = downsample_effect;
curr_effect->update_uniforms();
- curr_effect->set_bool("PrepareVector", prepare_vector);
int bloom_index = 0;
- float bloom_width = prepare_vector ? rt->target_width : rt->target_width / hlsl_prescale_x;
- float bloom_height = prepare_vector ? rt->target_height : rt->target_height / hlsl_prescale_y;
- float bloom_size = (bloom_width < bloom_height) ? bloom_width : bloom_height;
+ float bloom_size = (d3d->get_width() < d3d->get_height()) ? d3d->get_width() : d3d->get_height();
+ float bloom_width = d3d->get_width();
+ float bloom_height = d3d->get_height();
for (; bloom_size >= 2.0f && bloom_index < 11; bloom_size *= 0.5f)
{
bloom_dims[bloom_index][0] = (float)(int)bloom_width;
@@ -1469,9 +1468,10 @@ int shaders::downsample_pass(render_target *rt, int source_index, poly_info *pol
curr_effect->set_vector("TargetDims", 2, bloom_dims[bloom_index]);
curr_effect->set_texture("DiffuseTexture",
bloom_index == 0
- ? rt->native_texture[next_index]
+ ? rt->source_texture[next_index]
: rt->bloom_texture[bloom_index - 1]);
+ // blit(rt->bloom_target[bloom_index], true, D3DPT_TRIANGLELIST, 0, 2);
blit(rt->bloom_target[bloom_index], true, poly->get_type(), vertnum, poly->get_count());
bloom_width *= 0.5f;
@@ -1537,7 +1537,7 @@ int shaders::bloom_pass(render_target *rt, int source_index, poly_info *poly, in
curr_effect->set_float("BloomScale", options->bloom_scale);
curr_effect->set_vector("BloomOverdrive", 3, options->bloom_overdrive);
- curr_effect->set_texture("DiffuseA", rt->prescale_texture[next_index]);
+ curr_effect->set_texture("DiffuseA", rt->target_texture[next_index]);
char name[9] = "Diffuse*";
for (int index = 1; index < bloom_count; index++)
@@ -1552,7 +1552,8 @@ int shaders::bloom_pass(render_target *rt, int source_index, poly_info *poly, in
}
next_index = rt->next_index(next_index);
- blit(rt->prescale_target[next_index], true, poly->get_type(), vertnum, poly->get_count());
+ // blit(rt->target_surface[next_index], true, D3DPT_TRIANGLELIST, 0, 2);
+ blit(rt->target_surface[next_index], true, poly->get_type(), vertnum, poly->get_count());
return next_index;
}
@@ -1573,7 +1574,7 @@ int shaders::distortion_pass(render_target *rt, int source_index, poly_info *pol
int screen_count = d3d->window().target()->current_view()->screens().count();
- // only one screen is supported
+ // todo: only one screen is supported
if (screen_count > 1)
{
return next_index;
@@ -1581,22 +1582,26 @@ int shaders::distortion_pass(render_target *rt, int source_index, poly_info *pol
render_bounds bounds = d3d->window().target()->current_view()->bounds();
render_bounds screen_bounds = d3d->window().target()->current_view()->screen_bounds();
-
- // artworks are not supported
- if (bounds.x0 != screen_bounds.x0 ||
+ bool screen_bounds_zoomed = d3d->window().target()->zoom_to_screen();
+ bool screen_bounds_differ =
+ bounds.x0 != screen_bounds.x0 ||
bounds.y0 != screen_bounds.y0 ||
bounds.x1 != screen_bounds.x1 ||
- bounds.y1 != screen_bounds.y1)
+ bounds.y1 != screen_bounds.y1;
+
+ // todo: full artworks are not supported
+ if (screen_bounds_differ && !screen_bounds_zoomed)
{
return next_index;
}
curr_effect = distortion_effect;
curr_effect->update_uniforms();
- curr_effect->set_texture("DiffuseTexture", rt->prescale_texture[next_index]);
+ curr_effect->set_texture("DiffuseTexture", rt->target_texture[next_index]);
next_index = rt->next_index(next_index);
- blit(rt->prescale_target[next_index], true, poly->get_type(), vertnum, poly->get_count());
+ // blit(rt->target_surface[next_index], true, D3DPT_TRIANGLELIST, 0, 2);
+ blit(rt->target_surface[next_index], true, poly->get_type(), vertnum, poly->get_count());
return next_index;
}
@@ -1613,7 +1618,8 @@ int shaders::vector_pass(render_target *rt, int source_index, poly_info *poly, i
curr_effect->set_vector("TimeParams", 2, time_params);
curr_effect->set_vector("LengthParams", 3, length_params);
- blit(rt->prescale_target[next_index], true, poly->get_type(), vertnum, poly->get_count());
+ // blit(rt->target_surface[next_index], true, D3DPT_TRIANGLELIST, 0, 2);
+ blit(rt->target_surface[next_index], true, poly->get_type(), vertnum, poly->get_count());
return next_index;
}
@@ -1625,12 +1631,12 @@ int shaders::vector_buffer_pass(render_target *rt, int source_index, poly_info *
curr_effect = default_effect;
curr_effect->update_uniforms();
- curr_effect->set_texture("Diffuse", rt->prescale_texture[next_index]);
+ curr_effect->set_texture("Diffuse", rt->target_texture[next_index]);
curr_effect->set_bool("PostPass", true);
- curr_effect->set_float("Brighten", 1.0f);
next_index = rt->next_index(next_index);
- blit(rt->prescale_target[next_index], true, poly->get_type(), vertnum, poly->get_count());
+ // blit(rt->target_surface[next_index], true, D3DPT_TRIANGLELIST, 0, 2);
+ blit(rt->target_surface[next_index], true, poly->get_type(), vertnum, poly->get_count());
return next_index;
}
@@ -1639,15 +1645,11 @@ int shaders::screen_pass(render_target *rt, int source_index, poly_info *poly, i
{
int next_index = source_index;
- bool prepare_vector =
- machine->first_screen()->screen_type() == SCREEN_TYPE_VECTOR;
-
curr_effect = default_effect;
curr_effect->update_uniforms();
- curr_effect->set_texture("Diffuse", rt->prescale_texture[next_index]);
+ curr_effect->set_texture("Diffuse", rt->target_texture[next_index]);
curr_effect->set_bool("PostPass", true);
- curr_effect->set_float("Brighten", prepare_vector ? 1.0f : 0.0f);
// we do not clear the backbuffe here because multiple screens might rendered into
blit(backbuffer, false, poly->get_type(), vertnum, poly->get_count());
@@ -1672,7 +1674,6 @@ void shaders::menu_pass(poly_info *poly, int vertnum)
curr_effect = default_effect;
curr_effect->update_uniforms();
curr_effect->set_bool("PostPass", false);
- curr_effect->set_float("Brighten", 0.0f);
blit(NULL, false, poly->get_type(), vertnum, poly->get_count());
}
@@ -1701,6 +1702,7 @@ void shaders::render_quad(poly_info *poly, int vertnum)
render_target *rt = curr_render_target;
if (rt == NULL)
{
+ osd_printf_verbose("Direct3D: No raster render target\n");
return;
}
@@ -1747,6 +1749,7 @@ void shaders::render_quad(poly_info *poly, int vertnum)
render_target *rt = curr_render_target;
if (rt == NULL)
{
+ osd_printf_verbose("Direct3D: No vector render target\n");
return;
}
@@ -1769,6 +1772,7 @@ void shaders::render_quad(poly_info *poly, int vertnum)
render_target *rt = curr_render_target;
if (rt == NULL)
{
+ osd_printf_verbose("Direct3D: No vector buffer render target\n");
return;
}
@@ -1832,23 +1836,13 @@ void shaders::end_draw()
//============================================================
-// shaders::register_prescaled_texture
-//============================================================
-
-bool shaders::register_prescaled_texture(texture_info *texture)
-{
- return register_texture(texture);
-}
-
-
-//============================================================
// shaders::add_cache_target - register a cache target
//============================================================
-bool shaders::add_cache_target(renderer* d3d, texture_info* info, int width, int height, int xprescale, int yprescale, int screen_index)
+bool shaders::add_cache_target(renderer* d3d, texture_info* info, int width, int height, int screen_index)
{
cache_target* target = (cache_target*)global_alloc_clear<cache_target>();
- if (!target->init(d3d, d3dintf, width, height, xprescale, yprescale))
+ if (!target->init(d3d, d3dintf, width, height))
{
global_free(target);
return false;
@@ -1891,7 +1885,10 @@ render_target* shaders::get_vector_target()
void shaders::create_vector_target(render_primitive *prim)
{
- if (!add_render_target(d3d, NULL, d3d->get_width(), d3d->get_height(), 1, 1))
+ int width = d3d->get_width();
+ int height = d3d->get_height();
+
+ if (!add_render_target(d3d, NULL, width, height, width, height))
{
vector_enable = false;
}
@@ -1902,7 +1899,7 @@ void shaders::create_vector_target(render_primitive *prim)
// shaders::add_render_target - register a render target
//============================================================
-bool shaders::add_render_target(renderer* d3d, texture_info* info, int width, int height, int xprescale, int yprescale)
+bool shaders::add_render_target(renderer* d3d, texture_info* info, int width, int height, int target_width, int target_height)
{
UINT32 screen_index = 0;
UINT32 page_index = 0;
@@ -1929,7 +1926,7 @@ bool shaders::add_render_target(renderer* d3d, texture_info* info, int width, in
render_target* target = (render_target*)global_alloc_clear<render_target>();
- if (!target->init(d3d, d3dintf, width, height, xprescale, yprescale))
+ if (!target->init(d3d, d3dintf, width, height, target_width, target_height))
{
global_free(target);
return false;
@@ -1946,7 +1943,7 @@ bool shaders::add_render_target(renderer* d3d, texture_info* info, int width, in
target->height = d3d->get_height();
}
- HRESULT result = (*d3dintf->device.set_render_target)(d3d->get_device(), 0, target->prescale_target[0]);
+ HRESULT result = (*d3dintf->device.set_render_target)(d3d->get_device(), 0, target->target_surface[0]);
if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result);
result = (*d3dintf->device.clear)(d3d->get_device(), 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_ARGB(0,0,0,0), 0, 0);
if (result != D3D_OK) osd_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result);
@@ -1959,7 +1956,7 @@ bool shaders::add_render_target(renderer* d3d, texture_info* info, int width, in
cache_target* cache = find_cache_target(target->screen_index, target->width, target->height);
if (cache == NULL)
{
- if (!add_cache_target(d3d, info, width, height, xprescale, yprescale, target->screen_index))
+ if (!add_cache_target(d3d, info, target_width, target_height, target->screen_index))
{
global_free(target);
return false;
@@ -1995,11 +1992,6 @@ void shaders::enumerate_screens()
bool shaders::register_texture(texture_info *texture)
{
- int width = texture->get_width();
- int height = texture->get_height();
- int xscale = texture->get_xscale();
- int yscale = texture->get_yscale();
-
if (!master_enable || !d3dintf->post_fx_available)
{
return false;
@@ -2007,31 +1999,7 @@ bool shaders::register_texture(texture_info *texture)
enumerate_screens();
- // Find the nearest prescale factor that is over our screen size
- if (hlsl_prescale_x == 0)
- {
- hlsl_prescale_x = 1;
- while (width * xscale * hlsl_prescale_x <= d3d->get_width())
- {
- hlsl_prescale_x++;
- }
- hlsl_prescale_x--;
- }
-
- if (hlsl_prescale_y == 0)
- {
- hlsl_prescale_y = 1;
- while (height * yscale * hlsl_prescale_y <= d3d->get_height())
- {
- hlsl_prescale_y++;
- }
- hlsl_prescale_y--;
- }
-
- hlsl_prescale_x = ((hlsl_prescale_x == 0) ? 1 : hlsl_prescale_x);
- hlsl_prescale_y = ((hlsl_prescale_y == 0) ? 1 : hlsl_prescale_y);
-
- if (!add_render_target(d3d, texture, width, height, xscale * hlsl_prescale_x, yscale * hlsl_prescale_y))
+ if (!add_render_target(d3d, texture, texture->get_width(), texture->get_height(), d3d->get_width(), d3d->get_height()))
{
return false;
}
@@ -2370,25 +2338,25 @@ static INT32 slider_scanline_alpha(running_machine &machine, void *arg, std::str
static INT32 slider_scanline_scale(running_machine &machine, void *arg, std::string *str, INT32 newval)
{
((hlsl_options*)arg)->params_dirty = true;
- return slider_set(&(((hlsl_options*)arg)->scanline_scale), 0.05f, "%2.2f", str, newval);
+ return slider_set(&(((hlsl_options*)arg)->scanline_scale), 0.01f, "%2.2f", str, newval);
}
static INT32 slider_scanline_height(running_machine &machine, void *arg, std::string *str, INT32 newval)
{
((hlsl_options*)arg)->params_dirty = true;
- return slider_set(&(((hlsl_options*)arg)->scanline_height), 0.05f, "%2.2f", str, newval);
+ return slider_set(&(((hlsl_options*)arg)->scanline_height), 0.01f, "%2.2f", str, newval);
}
static INT32 slider_scanline_bright_scale(running_machine &machine, void *arg, std::string *str, INT32 newval)
{
((hlsl_options*)arg)->params_dirty = true;
- return slider_set(&(((hlsl_options*)arg)->scanline_bright_scale), 0.05f, "%2.2f", str, newval);
+ return slider_set(&(((hlsl_options*)arg)->scanline_bright_scale), 0.01f, "%2.2f", str, newval);
}
static INT32 slider_scanline_bright_offset(running_machine &machine, void *arg, std::string *str, INT32 newval)
{
((hlsl_options*)arg)->params_dirty = true;
- return slider_set(&(((hlsl_options*)arg)->scanline_bright_offset), 0.05f, "%2.2f", str, newval);
+ return slider_set(&(((hlsl_options*)arg)->scanline_bright_offset), 0.01f, "%2.2f", str, newval);
}
static INT32 slider_scanline_jitter(running_machine &machine, void *arg, std::string *str, INT32 newval)
@@ -2874,10 +2842,10 @@ shaders::slider_desc shaders::s_sliders[] =
{ "Screen Reflection", 0, 0, 100, 1, 7, slider_reflection },
{ "Image Vignetting", 0, 0, 100, 1, 7, slider_vignetting },
{ "Scanline Darkness", 0, 0, 100, 1, 5, slider_scanline_alpha },
- { "Scanline Screen Height", 1, 20, 80, 1, 5, slider_scanline_scale },
- { "Scanline Indiv. Height", 1, 20, 80, 1, 5, slider_scanline_height },
- { "Scanline Brightness", 0, 20, 40, 1, 5, slider_scanline_bright_scale },
- { "Scanline Brightness Overdrive", 0, 0, 20, 1, 5, slider_scanline_bright_offset },
+ { "Scanline Screen Scale", 0, 100, 400, 5, 5, slider_scanline_scale },
+ { "Scanline Heigth", 0, 100, 400, 5, 5, slider_scanline_height },
+ { "Scanline Brightness", 0, 100, 200, 1, 5, slider_scanline_bright_scale },
+ { "Scanline Brightness Overdrive", 0, 0, 100, 1, 5, slider_scanline_bright_offset },
{ "Scanline Jitter", 0, 0, 100, 1, 5, slider_scanline_jitter },
{ "Hum Bar Darkness", 0, 0, 100, 1, 5, slider_hum_bar_alpha },
{ "Defocus X", 0, 0, 100, 1, 7, slider_defocus_x },
@@ -3057,28 +3025,25 @@ void uniform::update()
vec2f sourcedims = shadersys->curr_texture->get_rawdims();
m_shader->set_vector("SourceDims", 2, &sourcedims.c.x);
}
-
+ else
+ {
+ vec2f sourcedims = d3d->get_dims();
+ m_shader->set_vector("SourceDims", 2, &sourcedims.c.x);
+ }
break;
}
case CU_SOURCE_RECT:
{
- bool prepare_vector =
- d3d->window().machine().first_screen()->screen_type() == SCREEN_TYPE_VECTOR;
-
- if (prepare_vector)
- {
- float delta[2] = { 1.0f, 1.0f };
- m_shader->set_vector("SourceRect", 2, delta);
- break;
- }
-
if (shadersys->curr_texture != NULL)
{
vec2f delta = shadersys->curr_texture->get_uvstop() - shadersys->curr_texture->get_uvstart();
m_shader->set_vector("SourceRect", 2, &delta.c.x);
- break;
}
-
+ else
+ {
+ float delta[2] = { 1.0f, 1.0f };
+ m_shader->set_vector("SourceRect", 2, delta);
+ }
break;
}
case CU_TARGET_DIMS:
@@ -3112,12 +3077,14 @@ void uniform::update()
(d3d->window().target()->orientation() & ROT90) == ROT90 ||
(d3d->window().target()->orientation() & ROT270) == ROT270;
m_shader->set_bool("SwapXY", orientation_swap_xy ^ rotation_swap_xy);
+ break;
}
case CU_ORIENTATION_SWAP:
{
bool orientation_swap_xy =
(d3d->window().machine().system().flags & ORIENTATION_SWAP_XY) == ORIENTATION_SWAP_XY;
m_shader->set_bool("OrientationSwapXY", orientation_swap_xy);
+ break;
}
case CU_ROTATION_SWAP:
@@ -3126,6 +3093,7 @@ void uniform::update()
(d3d->window().target()->orientation() & ROT90) == ROT90 ||
(d3d->window().target()->orientation() & ROT270) == ROT270;
m_shader->set_bool("RotationSwapXY", rotation_swap_xy);
+ break;
}
case CU_ROTATION_TYPE:
{
@@ -3138,6 +3106,14 @@ void uniform::update()
? 3
: 0;
m_shader->set_int("RotationType", rotation_type);
+ break;
+ }
+ case CU_VECTOR_SCREEN:
+ {
+ bool vector_screen =
+ d3d->window().machine().first_screen()->screen_type() == SCREEN_TYPE_VECTOR;
+ m_shader->set_bool("VectorScreen", vector_screen);
+ break;
}
case CU_NTSC_CCFREQ:
diff --git a/src/osd/modules/render/d3d/d3dhlsl.h b/src/osd/modules/render/d3d/d3dhlsl.h
index d949c1417c8..b0e502a761f 100644
--- a/src/osd/modules/render/d3d/d3dhlsl.h
+++ b/src/osd/modules/render/d3d/d3dhlsl.h
@@ -54,6 +54,7 @@ public:
CU_ORIENTATION_SWAP,
CU_ROTATION_SWAP,
CU_ROTATION_TYPE,
+ CU_VECTOR_SCREEN,
CU_NTSC_CCFREQ,
CU_NTSC_A,
@@ -292,9 +293,8 @@ public:
void render_quad(poly_info *poly, int vertnum);
bool register_texture(texture_info *texture);
- bool register_prescaled_texture(texture_info *texture);
- bool add_render_target(renderer* d3d, texture_info* info, int width, int height, int xprescale, int yprescale);
- bool add_cache_target(renderer* d3d, texture_info* info, int width, int height, int xprescale, int yprescale, int screen_index);
+ bool add_render_target(renderer* d3d, texture_info* info, int width, int height, int target_width, int target_height);
+ bool add_cache_target(renderer* d3d, texture_info* info, int width, int height, int screen_index);
void window_save();
void window_record();
@@ -379,13 +379,8 @@ private:
int curr_screen; // current screen for render target operations
int curr_frame; // current frame (0/1) of a screen for render target operations
int lastidx; // index of the last-encountered target
- bool write_ini; // enable external ini saving
- bool read_ini; // enable external ini loading
- int hlsl_prescale_x; // hlsl prescale x
- int hlsl_prescale_y; // hlsl prescale y
float bloom_dims[11][2]; // bloom texture dimensions
int bloom_count; // count of used bloom textures
- int preset; // preset, if relevant
bitmap_argb32 shadow_bitmap; // shadow mask bitmap for post-processing shader
texture_info * shadow_texture; // shadow mask texture for post-processing shader
hlsl_options * options; // current options
diff --git a/src/osd/modules/render/draw13.cpp b/src/osd/modules/render/draw13.cpp
index 320cc9f3a62..f357d567e71 100644
--- a/src/osd/modules/render/draw13.cpp
+++ b/src/osd/modules/render/draw13.cpp
@@ -203,6 +203,12 @@ private:
INT32 m_blittimer;
+#if (SDLMAME_SDL2)
+ //SDL_GLContext m_gl_context_id;
+#else
+ // SDL surface
+ SDL_Surface *m_sdlsurf;
+#endif
simple_list<texture_info> m_texlist; // list of active textures
@@ -595,6 +601,32 @@ static void drawsdl2_exit(void)
//============================================================
// sdl_info::create
+// a
+// a
+// a
+// a
+// a
+// a
+// a
+// a
+// a
+// a
+// a
+// a
+// a
+// a
+// a
+// a
+// a
+// a
+// a
+// a
+// a
+// a
+// a
+// a
+// a
+// a
//============================================================
static void drawsdl_show_info(struct SDL_RendererInfo *render_info)
@@ -629,6 +661,7 @@ static void drawsdl_show_info(struct SDL_RendererInfo *render_info)
int sdl_info13::create()
{
+#if (SDLMAME_SDL2)
// create renderer
/* Enable bilinear filtering in case it is supported.
@@ -666,6 +699,9 @@ int sdl_info13::create()
SDL_GetRendererInfo(m_sdl_renderer, &render_info);
drawsdl_show_info(&render_info);
+#else
+
+#endif
return 0;
}
diff --git a/src/osd/modules/render/drawbgfx.cpp b/src/osd/modules/render/drawbgfx.cpp
index 9d751c9f816..ee808bfc197 100644
--- a/src/osd/modules/render/drawbgfx.cpp
+++ b/src/osd/modules/render/drawbgfx.cpp
@@ -1,8 +1,8 @@
// license:BSD-3-Clause
-// copyright-holders:Miodrag Milanovic,Ryan Holtz,Dario Manesku,Branimir Karadzic,Aaron Giles
+// copyright-holders:Miodrag Milanovic
//============================================================
//
-// drawbgfx.cpp - BGFX renderer
+// drawbgfx.c - BGFX drawer
//
//============================================================
#define __STDC_LIMIT_MACROS
@@ -14,7 +14,11 @@
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#if defined(SDLMAME_WIN32)
+#if (SDLMAME_SDL2)
#include <SDL2/SDL_syswm.h>
+#else
+#include <SDL/SDL_syswm.h>
+#endif
#endif
#else
#include "sdlinc.h"
@@ -26,11 +30,6 @@
#include <bgfx/bgfxplatform.h>
#include <bgfx/bgfx.h>
-#include <bx/fpumath.h>
-#include <bx/readerwriter.h>
-#include <algorithm>
-
-#include "drawbgfx.h"
//============================================================
// DEBUGGING
@@ -44,8 +43,6 @@
// MACROS
//============================================================
-#define GIBBERISH (0)
-
//============================================================
// INLINES
//============================================================
@@ -56,6 +53,67 @@
//============================================================
+/* sdl_info is the information about SDL for the current screen */
+class renderer_bgfx : public osd_renderer
+{
+public:
+ renderer_bgfx(osd_window *w)
+ : osd_renderer(w, FLAG_NONE), m_blittimer(0),
+ m_blit_dim(0, 0),
+ m_last_hofs(0), m_last_vofs(0),
+ m_last_blit_time(0), m_last_blit_pixels(0)
+ {}
+
+ virtual int create() override;
+ virtual int draw(const int update) override;
+#ifdef OSD_SDL
+ virtual int xy_to_render_target(const int x, const int y, int *xt, int *yt) override;
+#else
+ virtual void save() override { }
+ virtual void record() override { }
+ virtual void toggle_fsfx() override { }
+#endif
+ virtual void destroy() override;
+ virtual render_primitive_list *get_primitives() override
+ {
+#ifdef OSD_WINDOWS
+ RECT client;
+ GetClientRect(window().m_hwnd, &client);
+ window().target()->set_bounds(rect_width(&client), rect_height(&client), window().aspect());
+ return &window().target()->get_primitives();
+#else
+ osd_dim nd = window().blit_surface_size();
+ if (nd != m_blit_dim)
+ {
+ m_blit_dim = nd;
+ notify_changed();
+ }
+ window().target()->set_bounds(m_blit_dim.width(), m_blit_dim.height(), window().aspect());
+ return &window().target()->get_primitives();
+#endif
+ }
+
+ // void render_quad(texture_info *texture, const render_primitive *prim, const int x, const int y);
+
+ //texture_info *texture_find(const render_primitive &prim, const quad_setup_data &setup);
+ //texture_info *texture_update(const render_primitive &prim);
+
+ INT32 m_blittimer;
+
+ //simple_list<texture_info> m_texlist; // list of active textures
+
+ osd_dim m_blit_dim;
+ float m_last_hofs;
+ float m_last_vofs;
+
+ // Stats
+ INT64 m_last_blit_time;
+ INT64 m_last_blit_pixels;
+
+ // Original display_mode
+};
+
+
//============================================================
// PROTOTYPES
//============================================================
@@ -92,85 +150,36 @@ int drawbgfx_init(running_machine &machine, osd_draw_callbacks *callbacks)
static void drawbgfx_exit(void)
{
- // Shutdown bgfx.
- bgfx::shutdown();
}
//============================================================
// renderer_bgfx::create
//============================================================
-bgfx::ProgramHandle loadProgram(const char* _vsName, const char* _fsName);
-
-
-#ifdef OSD_SDL
-static void* sdlNativeWindowHandle(SDL_Window* _window)
-{
- SDL_SysWMinfo wmi;
- SDL_VERSION(&wmi.version);
- if (!SDL_GetWindowWMInfo(_window, &wmi))
- {
- return nullptr;
- }
-
-# if BX_PLATFORM_LINUX || BX_PLATFORM_BSD
- return (void*)wmi.info.x11.window;
-# elif BX_PLATFORM_OSX
- return wmi.info.cocoa.window;
-# elif BX_PLATFORM_WINDOWS
- return wmi.info.win.window;
-# elif BX_PLATFORM_STEAMLINK
- return wmi.info.vivante.window;
-# elif BX_PLATFORM_EMSCRIPTEN
- return nullptr;
-# endif // BX_PLATFORM_
-}
-#endif
int renderer_bgfx::create()
{
// create renderer
- osd_dim wdim = window().get_size();
- if (window().m_index == 0)
- {
#ifdef OSD_WINDOWS
- bgfx::winSetHwnd(window().m_hwnd);
-#else
- bgfx::sdlSetWindow(window().sdl_window());
-#endif
- bgfx::init();
- bgfx::reset(wdim.width(), wdim.height(), video_config.waitvsync ? BGFX_RESET_VSYNC : BGFX_RESET_NONE);
- // Enable debug text.
- bgfx::setDebug(BGFX_DEBUG_TEXT); //BGFX_DEBUG_STATS
- m_dimensions = osd_dim(wdim.width(), wdim.height());
- }
- else
- {
-#ifdef OSD_WINDOWS
- fbh = bgfx::createFrameBuffer(window().m_hwnd, wdim.width(), wdim.height());
-#else
- fbh = bgfx::createFrameBuffer(sdlNativeWindowHandle(window().sdl_window()), wdim.width(), wdim.height());
-#endif
- bgfx::touch(window().m_index);
- }
-
- ScreenVertex::init();
+ RECT client;
+ GetClientRect(window().m_hwnd, &client);
- // Create program from shaders.
- m_progQuad = loadProgram("vs_quad", "fs_quad");
- m_progQuadTexture = loadProgram("vs_quad_texture", "fs_quad_texture");
- m_s_texColor = bgfx::createUniform("s_texColor", bgfx::UniformType::Int1);
-
- uint32_t flags = BGFX_TEXTURE_U_CLAMP | BGFX_TEXTURE_V_CLAMP | BGFX_TEXTURE_MIN_POINT | BGFX_TEXTURE_MAG_POINT | BGFX_TEXTURE_MIP_POINT;
- m_texture_cache = bgfx::createTexture2D(CACHE_SIZE, CACHE_SIZE, 1, bgfx::TextureFormat::RGBA8, flags);
+ bgfx::winSetHwnd(window().m_hwnd);
+ bgfx::init();
+ bgfx::reset(rect_width(&client), rect_height(&client), BGFX_RESET_VSYNC);
+#else
+ osd_dim d = window().get_size();
+ m_blittimer = 3;
- const bgfx::Memory* memory = bgfx::alloc(sizeof(uint32_t) * CACHE_SIZE * CACHE_SIZE);
- memset(memory->data, 0, sizeof(uint32_t) * CACHE_SIZE * CACHE_SIZE);
- bgfx::updateTexture2D(m_texture_cache, 0, 0, 0, CACHE_SIZE, CACHE_SIZE, memory, CACHE_SIZE * sizeof(uint32_t));
+ bgfx::sdlSetWindow(window().sdl_window());
+ bgfx::init();
+ bgfx::reset(d.width(), d.height(), BGFX_RESET_VSYNC);
+#endif
- memset(m_white, 0xff, sizeof(uint32_t) * 16 * 16);
- m_texinfo.push_back(rectangle_packer::packable_rectangle(WHITE_HASH, PRIMFLAG_TEXFORMAT(TEXFORMAT_ARGB32), 16, 16, 16, nullptr, m_white));
+ // Enable debug text.
+ bgfx::setDebug(BGFX_DEBUG_STATS);// BGFX_DEBUG_TEXT);
+ osd_printf_verbose("Leave drawsdl2_window_create\n");
return 0;
}
@@ -180,14 +189,12 @@ int renderer_bgfx::create()
void renderer_bgfx::destroy()
{
- if (window().m_index > 0)
- {
- bgfx::destroyFrameBuffer(fbh);
- }
- bgfx::destroyUniform(m_s_texColor);
- // Cleanup.
- bgfx::destroyProgram(m_progQuad);
- bgfx::destroyProgram(m_progQuadTexture);
+ // free the memory in the window
+
+ // destroy_all_textures();
+
+ // Shutdown bgfx.
+ bgfx::shutdown();
}
@@ -198,973 +205,133 @@ void renderer_bgfx::destroy()
#ifdef OSD_SDL
int renderer_bgfx::xy_to_render_target(int x, int y, int *xt, int *yt)
{
- *xt = x;
- *yt = y;
- if (*xt<0 || *xt >= m_dimensions.width())
+ *xt = x - m_last_hofs;
+ *yt = y - m_last_vofs;
+ if (*xt<0 || *xt >= m_blit_dim.width())
return 0;
- if (*yt<0 || *yt >= m_dimensions.height())
+ if (*yt<0 || *yt >= m_blit_dim.height())
return 0;
return 1;
}
#endif
-static const bgfx::Memory* loadMem(bx::FileReaderI* _reader, const char* _filePath)
-{
- if (bx::open(_reader, _filePath))
- {
- uint32_t size = (uint32_t)bx::getSize(_reader);
- const bgfx::Memory* mem = bgfx::alloc(size + 1);
- bx::read(_reader, mem->data, size);
- bx::close(_reader);
- mem->data[mem->size - 1] = '\0';
- return mem;
- }
-
- return nullptr;
-}
-static bgfx::ShaderHandle loadShader(bx::FileReaderI* _reader, const char* _name)
-{
- char filePath[512];
-
- const char* shaderPath = "shaders/dx9/";
-
- switch (bgfx::getRendererType())
- {
- case bgfx::RendererType::Direct3D11:
- case bgfx::RendererType::Direct3D12:
- shaderPath = "shaders/dx11/";
- break;
-
- case bgfx::RendererType::OpenGL:
- shaderPath = "shaders/glsl/";
- break;
-
- case bgfx::RendererType::Metal:
- shaderPath = "shaders/metal/";
- break;
-
- case bgfx::RendererType::OpenGLES:
- shaderPath = "shaders/gles/";
- break;
-
- default:
- break;
- }
-
- strcpy(filePath, shaderPath);
- strcat(filePath, _name);
- strcat(filePath, ".bin");
-
- return bgfx::createShader(loadMem(_reader, filePath));
-}
-
-bgfx::ProgramHandle renderer_bgfx::loadProgram(bx::FileReaderI* _reader, const char* _vsName, const char* _fsName)
-{
- bgfx::ShaderHandle vsh = loadShader(_reader, _vsName);
- bgfx::ShaderHandle fsh = BGFX_INVALID_HANDLE;
- if (nullptr != _fsName)
- {
- fsh = loadShader(_reader, _fsName);
- }
-
- return bgfx::createProgram(vsh, fsh, true /* destroy shaders when program is destroyed */);
-}
-static auto s_fileReader = new bx::CrtFileReader;
-
-bgfx::ProgramHandle renderer_bgfx::loadProgram(const char* _vsName, const char* _fsName)
-{
- return loadProgram(s_fileReader, _vsName, _fsName);
-}
-
//============================================================
// drawbgfx_window_draw
//============================================================
-bgfx::VertexDecl renderer_bgfx::ScreenVertex::ms_decl;
-
-void renderer_bgfx::put_packed_quad(render_primitive *prim, UINT32 hash, ScreenVertex* vertex)
-{
- rectangle_packer::packed_rectangle& rect = m_hash_to_entry[hash];
- float u0 = float(rect.x()) / float(CACHE_SIZE);
- float v0 = float(rect.y()) / float(CACHE_SIZE);
- float u1 = u0 + float(rect.width()) / float(CACHE_SIZE);
- float v1 = v0 + float(rect.height()) / float(CACHE_SIZE);
- u1 -= 0.5f / float(CACHE_SIZE);
- v1 -= 0.5f / float(CACHE_SIZE);
- u0 += 0.5f / float(CACHE_SIZE);
- v0 += 0.5f / float(CACHE_SIZE);
- UINT32 rgba = u32Color(prim->color.r * 255, prim->color.g * 255, prim->color.b * 255, prim->color.a * 255);
-
- float x[4] = { prim->bounds.x0, prim->bounds.x1, prim->bounds.x0, prim->bounds.x1 };
- float y[4] = { prim->bounds.y0, prim->bounds.y0, prim->bounds.y1, prim->bounds.y1 };
- float u[4] = { u0, u1, u0, u1 };
- float v[4] = { v0, v0, v1, v1 };
-
- if (PRIMFLAG_GET_TEXORIENT(prim->flags) & ORIENTATION_SWAP_XY)
- {
- std::swap(u[1], u[2]);
- std::swap(v[1], v[2]);
- }
-
- if (PRIMFLAG_GET_TEXORIENT(prim->flags) & ORIENTATION_FLIP_X)
- {
- std::swap(u[0], u[1]);
- std::swap(v[0], v[1]);
- std::swap(u[2], u[3]);
- std::swap(v[2], v[3]);
- }
-
- if (PRIMFLAG_GET_TEXORIENT(prim->flags) & ORIENTATION_FLIP_Y)
- {
- std::swap(u[0], u[2]);
- std::swap(v[0], v[2]);
- std::swap(u[1], u[3]);
- std::swap(v[1], v[3]);
- }
-
- vertex[0].m_x = x[0]; // 0
- vertex[0].m_y = y[0];
- vertex[0].m_z = 0;
- vertex[0].m_rgba = rgba;
- vertex[0].m_u = u[0];
- vertex[0].m_v = v[0];
-
- vertex[1].m_x = x[1]; // 1
- vertex[1].m_y = y[1];
- vertex[1].m_z = 0;
- vertex[1].m_rgba = rgba;
- vertex[1].m_u = u[1];
- vertex[1].m_v = v[1];
-
- vertex[2].m_x = x[3]; // 3
- vertex[2].m_y = y[3];
- vertex[2].m_z = 0;
- vertex[2].m_rgba = rgba;
- vertex[2].m_u = u[3];
- vertex[2].m_v = v[3];
-
- vertex[3].m_x = x[3]; // 3
- vertex[3].m_y = y[3];
- vertex[3].m_z = 0;
- vertex[3].m_rgba = rgba;
- vertex[3].m_u = u[3];
- vertex[3].m_v = v[3];
-
- vertex[4].m_x = x[2]; // 2
- vertex[4].m_y = y[2];
- vertex[4].m_z = 0;
- vertex[4].m_rgba = rgba;
- vertex[4].m_u = u[2];
- vertex[4].m_v = v[2];
-
- vertex[5].m_x = x[0]; // 0
- vertex[5].m_y = y[0];
- vertex[5].m_z = 0;
- vertex[5].m_rgba = rgba;
- vertex[5].m_u = u[0];
- vertex[5].m_v = v[0];
-}
-
-void renderer_bgfx::render_textured_quad(int view, render_primitive* prim, bgfx::TransientVertexBuffer* buffer)
-{
- ScreenVertex* vertex = (ScreenVertex*)buffer->data;
-
- UINT32 rgba = u32Color(prim->color.r * 255, prim->color.g * 255, prim->color.b * 255, prim->color.a * 255);
-
- vertex[0].m_x = prim->bounds.x0;
- vertex[0].m_y = prim->bounds.y0;
- vertex[0].m_z = 0;
- vertex[0].m_rgba = rgba;
- vertex[0].m_u = prim->texcoords.tl.u;
- vertex[0].m_v = prim->texcoords.tl.v;
-
- vertex[1].m_x = prim->bounds.x1;
- vertex[1].m_y = prim->bounds.y0;
- vertex[1].m_z = 0;
- vertex[1].m_rgba = rgba;
- vertex[1].m_u = prim->texcoords.tr.u;
- vertex[1].m_v = prim->texcoords.tr.v;
-
- vertex[2].m_x = prim->bounds.x1;
- vertex[2].m_y = prim->bounds.y1;
- vertex[2].m_z = 0;
- vertex[2].m_rgba = rgba;
- vertex[2].m_u = prim->texcoords.br.u;
- vertex[2].m_v = prim->texcoords.br.v;
-
- vertex[3].m_x = prim->bounds.x1;
- vertex[3].m_y = prim->bounds.y1;
- vertex[3].m_z = 0;
- vertex[3].m_rgba = rgba;
- vertex[3].m_u = prim->texcoords.br.u;
- vertex[3].m_v = prim->texcoords.br.v;
-
- vertex[4].m_x = prim->bounds.x0;
- vertex[4].m_y = prim->bounds.y1;
- vertex[4].m_z = 0;
- vertex[4].m_rgba = rgba;
- vertex[4].m_u = prim->texcoords.bl.u;
- vertex[4].m_v = prim->texcoords.bl.v;
-
- vertex[5].m_x = prim->bounds.x0;
- vertex[5].m_y = prim->bounds.y0;
- vertex[5].m_z = 0;
- vertex[5].m_rgba = rgba;
- vertex[5].m_u = prim->texcoords.tl.u;
- vertex[5].m_v = prim->texcoords.tl.v;
- bgfx::setVertexBuffer(buffer);
-
- uint32_t texture_flags = BGFX_TEXTURE_U_CLAMP | BGFX_TEXTURE_V_CLAMP;
- if (video_config.filter == 0)
- {
- texture_flags |= BGFX_TEXTURE_MIN_POINT | BGFX_TEXTURE_MAG_POINT | BGFX_TEXTURE_MIP_POINT;
- }
-
- const bgfx::Memory* mem = mame_texture_data_to_bgfx_texture_data(prim->flags & PRIMFLAG_TEXFORMAT_MASK,
- prim->texture.width, prim->texture.height, prim->texture.rowpixels, prim->texture.palette, prim->texture.base);
-
- bgfx::TextureHandle texture = bgfx::createTexture2D((uint16_t)prim->texture.width, (uint16_t)prim->texture.height, 1, bgfx::TextureFormat::RGBA8, texture_flags, mem);
-
- bgfx::setTexture(0, m_s_texColor, texture);
-
- set_bgfx_state(PRIMFLAG_GET_BLENDMODE(prim->flags));
- bgfx::submit(view, m_progQuadTexture);
-
- bgfx::destroyTexture(texture);
-}
-
-#define MAX_TEMP_COORDS 100
-
-void renderer_bgfx::put_polygon(const float* coords, UINT32 num_coords, float r, UINT32 rgba, ScreenVertex* vertex)
-{
- float tempCoords[MAX_TEMP_COORDS * 3];
- float tempNormals[MAX_TEMP_COORDS * 2];
-
- rectangle_packer::packed_rectangle& rect = m_hash_to_entry[WHITE_HASH];
- float u0 = float(rect.x()) / float(CACHE_SIZE);
- float v0 = float(rect.y()) / float(CACHE_SIZE);
-
- num_coords = num_coords < MAX_TEMP_COORDS ? num_coords : MAX_TEMP_COORDS;
-
- for (uint32_t ii = 0, jj = num_coords - 1; ii < num_coords; jj = ii++)
- {
- const float* v0 = &coords[jj * 3];
- const float* v1 = &coords[ii * 3];
- float dx = v1[0] - v0[0];
- float dy = v1[1] - v0[1];
- float d = sqrtf(dx * dx + dy * dy);
- if (d > 0)
- {
- d = 1.0f / d;
- dx *= d;
- dy *= d;
- }
-
- tempNormals[jj * 2 + 0] = dy;
- tempNormals[jj * 2 + 1] = -dx;
- }
-
- for (uint32_t ii = 0, jj = num_coords - 1; ii < num_coords; jj = ii++)
- {
- float dlx0 = tempNormals[jj * 2 + 0];
- float dly0 = tempNormals[jj * 2 + 1];
- float dlx1 = tempNormals[ii * 2 + 0];
- float dly1 = tempNormals[ii * 2 + 1];
- float dmx = (dlx0 + dlx1) * 0.5f;
- float dmy = (dly0 + dly1) * 0.5f;
- float dmr2 = dmx * dmx + dmy * dmy;
- if (dmr2 > 0.000001f)
- {
- float scale = 1.0f / dmr2;
- if (scale > 10.0f)
- {
- scale = 10.0f;
- }
-
- dmx *= scale;
- dmy *= scale;
- }
-
- tempCoords[ii * 3 + 0] = coords[ii * 3 + 0] + dmx * r;
- tempCoords[ii * 3 + 1] = coords[ii * 3 + 1] + dmy * r;
- tempCoords[ii * 3 + 2] = coords[ii * 3 + 2];
- }
-
- int vertIndex = 0;
- UINT32 trans = rgba & 0x00ffffff;
- for (uint32_t ii = 0, jj = num_coords - 1; ii < num_coords; jj = ii++)
- {
- vertex[vertIndex].m_x = coords[ii * 3 + 0];
- vertex[vertIndex].m_y = coords[ii * 3 + 1];
- vertex[vertIndex].m_z = coords[ii * 3 + 2];
- vertex[vertIndex].m_rgba = rgba;
- vertex[vertIndex].m_u = u0;
- vertex[vertIndex].m_v = v0;
- vertIndex++;
-
- vertex[vertIndex].m_x = coords[jj * 3 + 0];
- vertex[vertIndex].m_y = coords[jj * 3 + 1];
- vertex[vertIndex].m_z = coords[jj * 3 + 2];
- vertex[vertIndex].m_rgba = rgba;
- vertex[vertIndex].m_u = u0;
- vertex[vertIndex].m_v = v0;
- vertIndex++;
-
- vertex[vertIndex].m_x = tempCoords[jj * 3 + 0];
- vertex[vertIndex].m_y = tempCoords[jj * 3 + 1];
- vertex[vertIndex].m_z = tempCoords[jj * 3 + 2];
- vertex[vertIndex].m_rgba = trans;
- vertex[vertIndex].m_u = u0;
- vertex[vertIndex].m_v = v0;
- vertIndex++;
-
- vertex[vertIndex].m_x = tempCoords[jj * 3 + 0];
- vertex[vertIndex].m_y = tempCoords[jj * 3 + 1];
- vertex[vertIndex].m_z = tempCoords[jj * 3 + 2];
- vertex[vertIndex].m_rgba = trans;
- vertex[vertIndex].m_u = u0;
- vertex[vertIndex].m_v = v0;
- vertIndex++;
-
- vertex[vertIndex].m_x = tempCoords[ii * 3 + 0];
- vertex[vertIndex].m_y = tempCoords[ii * 3 + 1];
- vertex[vertIndex].m_z = tempCoords[ii * 3 + 2];
- vertex[vertIndex].m_rgba = trans;
- vertex[vertIndex].m_u = u0;
- vertex[vertIndex].m_v = v0;
- vertIndex++;
-
- vertex[vertIndex].m_x = coords[ii * 3 + 0];
- vertex[vertIndex].m_y = coords[ii * 3 + 1];
- vertex[vertIndex].m_z = coords[ii * 3 + 2];
- vertex[vertIndex].m_rgba = rgba;
- vertex[vertIndex].m_u = u0;
- vertex[vertIndex].m_v = v0;
- vertIndex++;
- }
-
- for (uint32_t ii = 2; ii < num_coords; ++ii)
- {
- vertex[vertIndex].m_x = coords[0];
- vertex[vertIndex].m_y = coords[1];
- vertex[vertIndex].m_z = coords[2];
- vertex[vertIndex].m_rgba = rgba;
- vertex[vertIndex].m_u = u0;
- vertex[vertIndex].m_v = v0;
- vertIndex++;
-
- vertex[vertIndex].m_x = coords[(ii - 1) * 3 + 0];
- vertex[vertIndex].m_y = coords[(ii - 1) * 3 + 1];
- vertex[vertIndex].m_z = coords[(ii - 1) * 3 + 2];
- vertex[vertIndex].m_rgba = rgba;
- vertex[vertIndex].m_u = u0;
- vertex[vertIndex].m_v = v0;
- vertIndex++;
-
- vertex[vertIndex].m_x = coords[ii * 3 + 0];
- vertex[vertIndex].m_y = coords[ii * 3 + 1];
- vertex[vertIndex].m_z = coords[ii * 3 + 2];
- vertex[vertIndex].m_rgba = rgba;
- vertex[vertIndex].m_u = u0;
- vertex[vertIndex].m_v = v0;
- vertIndex++;
- }
-}
-
-void renderer_bgfx::put_line(float x0, float y0, float x1, float y1, float r, UINT32 rgba, ScreenVertex* vertex, float fth)
-{
- float dx = x1 - x0;
- float dy = y1 - y0;
- float d = sqrtf(dx * dx + dy * dy);
- if (d > 0.0001f)
- {
- d = 1.0f / d;
- dx *= d;
- dy *= d;
- }
-
- float nx = dy;
- float ny = -dx;
- float verts[4 * 3];
- r -= fth;
- r *= 0.5f;
- if (r < 0.01f)
- {
- r = 0.01f;
- }
-
- dx *= r;
- dy *= r;
- nx *= r;
- ny *= r;
-
- verts[0] = x0 - dx - nx;
- verts[1] = y0 - dy - ny;
- verts[2] = 0;
-
- verts[3] = x0 - dx + nx;
- verts[4] = y0 - dy + ny;
- verts[5] = 0;
-
- verts[6] = x1 + dx + nx;
- verts[7] = y1 + dy + ny;
- verts[8] = 0;
-
- verts[9] = x1 + dx - nx;
- verts[10] = y1 + dy - ny;
- verts[11] = 0;
-
- put_polygon(verts, 4, fth, rgba, vertex);
-}
-
-uint32_t renderer_bgfx::u32Color(uint32_t r, uint32_t g, uint32_t b, uint32_t a = 255)
-{
- return (a << 24) | (b << 16) | (g << 8) | r;
-}
-
-//============================================================
-// copyline_palette16
-//============================================================
-
-static inline void copyline_palette16(UINT32 *dst, const UINT16 *src, int width, const rgb_t *palette)
-{
- for (int x = 0; x < width; x++)
- {
- rgb_t srcpixel = palette[*src++];
- *dst++ = 0xff000000 | (srcpixel.b() << 16) | (srcpixel.g() << 8) | srcpixel.r();
- }
-}
-
-
-//============================================================
-// copyline_palettea16
-//============================================================
-
-static inline void copyline_palettea16(UINT32 *dst, const UINT16 *src, int width, const rgb_t *palette)
-{
- for (int x = 0; x < width; x++)
- {
- rgb_t srcpixel = palette[*src++];
- *dst++ = (srcpixel.a() << 24) | (srcpixel.b() << 16) | (srcpixel.g() << 8) | srcpixel.r();
- }
-}
-
-
-//============================================================
-// copyline_rgb32
-//============================================================
-
-static inline void copyline_rgb32(UINT32 *dst, const UINT32 *src, int width, const rgb_t *palette)
-{
- int x;
-
- // palette (really RGB map) case
- if (palette != nullptr)
- {
- for (x = 0; x < width; x++)
- {
- rgb_t srcpix = *src++;
- *dst++ = 0xff000000 | palette[0x200 + srcpix.b()] | palette[0x100 + srcpix.g()] | palette[srcpix.r()];
- }
- }
-
- // direct case
- else
- {
- for (x = 0; x < width; x++)
- {
- rgb_t srcpix = *src++;
- *dst++ = 0xff000000 | (srcpix.b() << 16) | (srcpix.g() << 8) | srcpix.r();
- }
- }
-}
-
-
-//============================================================
-// copyline_argb32
-//============================================================
-
-static inline void copyline_argb32(UINT32 *dst, const UINT32 *src, int width, const rgb_t *palette)
-{
- int x;
- // palette (really RGB map) case
- if (palette != nullptr)
- {
- for (x = 0; x < width; x++)
- {
- rgb_t srcpix = *src++;
- *dst++ = (srcpix & 0xff000000) | palette[0x200 + srcpix.b()] | palette[0x100 + srcpix.g()] | palette[srcpix.r()];
- }
- }
-
- // direct case
- else
- {
- for (x = 0; x < width; x++)
- {
- rgb_t srcpix = *src++;
- *dst++ = (srcpix.a() << 24) | (srcpix.b() << 16) | (srcpix.g() << 8) | srcpix.r();
- }
- }
-}
-
-static inline UINT32 ycc_to_rgb(UINT8 y, UINT8 cb, UINT8 cr)
-{
- /* original equations:
-
- C = Y - 16
- D = Cb - 128
- E = Cr - 128
-
- R = clip(( 298 * C + 409 * E + 128) >> 8)
- G = clip(( 298 * C - 100 * D - 208 * E + 128) >> 8)
- B = clip(( 298 * C + 516 * D + 128) >> 8)
-
- R = clip(( 298 * (Y - 16) + 409 * (Cr - 128) + 128) >> 8)
- G = clip(( 298 * (Y - 16) - 100 * (Cb - 128) - 208 * (Cr - 128) + 128) >> 8)
- B = clip(( 298 * (Y - 16) + 516 * (Cb - 128) + 128) >> 8)
-
- R = clip(( 298 * Y - 298 * 16 + 409 * Cr - 409 * 128 + 128) >> 8)
- G = clip(( 298 * Y - 298 * 16 - 100 * Cb + 100 * 128 - 208 * Cr + 208 * 128 + 128) >> 8)
- B = clip(( 298 * Y - 298 * 16 + 516 * Cb - 516 * 128 + 128) >> 8)
-
- R = clip(( 298 * Y - 298 * 16 + 409 * Cr - 409 * 128 + 128) >> 8)
- G = clip(( 298 * Y - 298 * 16 - 100 * Cb + 100 * 128 - 208 * Cr + 208 * 128 + 128) >> 8)
- B = clip(( 298 * Y - 298 * 16 + 516 * Cb - 516 * 128 + 128) >> 8)
- */
- int r, g, b, common;
-
- common = 298 * y - 298 * 16;
- r = (common + 409 * cr - 409 * 128 + 128) >> 8;
- g = (common - 100 * cb + 100 * 128 - 208 * cr + 208 * 128 + 128) >> 8;
- b = (common + 516 * cb - 516 * 128 + 128) >> 8;
-
- if (r < 0) r = 0;
- else if (r > 255) r = 255;
- if (g < 0) g = 0;
- else if (g > 255) g = 255;
- if (b < 0) b = 0;
- else if (b > 255) b = 255;
-
- return 0xff000000 | (b << 16) | (g << 8) | r;
-}
-
-//============================================================
-// copyline_yuy16_to_argb
-//============================================================
-
-static inline void copyline_yuy16_to_argb(UINT32 *dst, const UINT16 *src, int width, const rgb_t *palette, int xprescale)
-{
- int x;
-
- assert(width % 2 == 0);
-
- // palette (really RGB map) case
- if (palette != nullptr)
- {
- for (x = 0; x < width / 2; x++)
- {
- UINT16 srcpix0 = *src++;
- UINT16 srcpix1 = *src++;
- UINT8 cb = srcpix0 & 0xff;
- UINT8 cr = srcpix1 & 0xff;
- for (int x2 = 0; x2 < xprescale; x2++)
- *dst++ = ycc_to_rgb(palette[0x000 + (srcpix0 >> 8)], cb, cr);
- for (int x2 = 0; x2 < xprescale; x2++)
- *dst++ = ycc_to_rgb(palette[0x000 + (srcpix1 >> 8)], cb, cr);
- }
- }
-
- // direct case
- else
- {
- for (x = 0; x < width; x += 2)
- {
- UINT16 srcpix0 = *src++;
- UINT16 srcpix1 = *src++;
- UINT8 cb = srcpix0 & 0xff;
- UINT8 cr = srcpix1 & 0xff;
- for (int x2 = 0; x2 < xprescale; x2++)
- *dst++ = ycc_to_rgb(srcpix0 >> 8, cb, cr);
- for (int x2 = 0; x2 < xprescale; x2++)
- *dst++ = ycc_to_rgb(srcpix1 >> 8, cb, cr);
- }
- }
-}
-
-const bgfx::Memory* renderer_bgfx::mame_texture_data_to_bgfx_texture_data(UINT32 format, int width, int height, int rowpixels, const rgb_t *palette, void *base)
-{
- const bgfx::Memory* mem = bgfx::alloc(width * height * 4);
- for (int y = 0; y < height; y++)
- {
- switch (format)
- {
- case PRIMFLAG_TEXFORMAT(TEXFORMAT_PALETTE16):
- copyline_palette16((UINT32*)mem->data + y * width, (UINT16*)base + y * rowpixels, width, palette);
- break;
- case PRIMFLAG_TEXFORMAT(TEXFORMAT_PALETTEA16):
- copyline_palettea16((UINT32*)mem->data + y * width, (UINT16*)base + y * rowpixels, width, palette);
- break;
- case PRIMFLAG_TEXFORMAT(TEXFORMAT_YUY16):
- copyline_yuy16_to_argb((UINT32*)mem->data + y * width, (UINT16*)base + y * rowpixels, width, palette, 1);
- break;
- case PRIMFLAG_TEXFORMAT(TEXFORMAT_ARGB32):
- copyline_argb32((UINT32*)mem->data + y * width, (UINT32*)base + y * rowpixels, width, palette);
- break;
- case PRIMFLAG_TEXFORMAT(TEXFORMAT_RGB32):
- copyline_rgb32((UINT32*)mem->data + y * width, (UINT32*)base + y * rowpixels, width, palette);
- break;
- default:
- break;
- }
- }
- return mem;
-}
-
int renderer_bgfx::draw(int update)
{
- int index = window().m_index;
- // Set view 0 default viewport.
- osd_dim wdim = window().get_size();
- int width = wdim.width();
- int height = wdim.height();
- if (index == 0)
- {
- if ((m_dimensions != osd_dim(width, height))) {
- bgfx::reset(width, height, video_config.waitvsync ? BGFX_RESET_VSYNC : BGFX_RESET_NONE);
- m_dimensions = osd_dim(width, height);
- }
- }
- else {
- if ((m_dimensions != osd_dim(width, height))) {
- bgfx::reset(window().m_main->get_size().width(), window().m_main->get_size().height(), video_config.waitvsync ? BGFX_RESET_VSYNC : BGFX_RESET_NONE);
- if (bgfx::isValid(fbh))
- {
- bgfx::destroyFrameBuffer(fbh);
- }
-#ifdef OSD_WINDOWS
- fbh = bgfx::createFrameBuffer(window().m_hwnd, width, height);
-#else
- fbh = bgfx::createFrameBuffer(sdlNativeWindowHandle(window().sdl_window()), width, height);
-#endif
- bgfx::setViewFrameBuffer(index, fbh);
- m_dimensions = osd_dim(width, height);
- bgfx::setViewClear(index
- , BGFX_CLEAR_COLOR | BGFX_CLEAR_DEPTH
- , 0x000000ff
- , 1.0f
- , 0
- );
- bgfx::touch(index);
- bgfx::frame();
- return 0;
- }
- }
- if (index != 0) bgfx::setViewFrameBuffer(index, fbh);
- bgfx::setViewSeq(index, true);
- bgfx::setViewRect(index, 0, 0, width, height);
-
- // Setup view transform.
- {
- float view[16];
- bx::mtxIdentity(view);
+ //if (has_flags(FI_CHANGED) || (window().width() != m_last_width) || (window().height() != m_last_height))
+ // do something
+ //clear_flags(FI_CHANGED);
- float left = 0.0f;
- float top = 0.0f;
- float right = width;
- float bottom = height;
- float proj[16];
- bx::mtxOrtho(proj, left, right, bottom, top, 0.0f, 100.0f);
- bgfx::setViewTransform(index, view, proj);
- }
- bgfx::setViewClear(index
- , BGFX_CLEAR_COLOR | BGFX_CLEAR_DEPTH
+ bgfx::setViewClear(0
+ , BGFX_CLEAR_COLOR|BGFX_CLEAR_DEPTH
, 0x000000ff
, 1.0f
, 0
);
-
+ // Set view 0 default viewport.
+#ifdef OSD_WINDOWS
+ RECT client;
+ GetClientRect(window().m_hwnd, &client);
+ bgfx::setViewRect(0, 0, 0, rect_width(&client), rect_height(&client));
+#else
+ bgfx::setViewRect(0, 0, 0, m_blit_dim.width(), m_blit_dim.height());
+#endif
// This dummy draw call is here to make sure that view 0 is cleared
// if no other draw calls are submitted to view 0.
- bgfx::touch(index);
+ bgfx::touch(0);
window().m_primlist->acquire_lock();
- // Mark our texture atlas as dirty if we need to do so
- bool atlas_valid = update_atlas();
-
- render_primitive *prim = window().m_primlist->first();
- while (prim != nullptr)
+ // now draw
+ for (render_primitive *prim = window().m_primlist->first(); prim != NULL; prim = prim->next())
{
- UINT32 blend = PRIMFLAG_GET_BLENDMODE(prim->flags);
-
- bgfx::TransientVertexBuffer buffer;
- allocate_buffer(prim, blend, &buffer);
-
- buffer_status status = buffer_primitives(index, atlas_valid, &prim, &buffer);
-
- if (status != BUFFER_EMPTY)
- {
- set_bgfx_state(blend);
- bgfx::setVertexBuffer(&buffer);
- bgfx::setTexture(0, m_s_texColor, m_texture_cache);
- bgfx::submit(index, m_progQuadTexture);
- }
-
- if (status != BUFFER_DONE && status != BUFFER_PRE_FLUSH)
- {
- prim = prim->next();
- }
- }
-
- window().m_primlist->release_lock();
- // Advance to next frame. Rendering thread will be kicked to
- // process submitted rendering primitives.
- if (index==0) bgfx::frame();
-
- return 0;
-}
-
-renderer_bgfx::buffer_status renderer_bgfx::buffer_primitives(int view, bool atlas_valid, render_primitive** prim, bgfx::TransientVertexBuffer* buffer)
-{
- int vertices = 0;
-
- UINT32 blend = PRIMFLAG_GET_BLENDMODE((*prim)->flags);
- while (*prim != nullptr)
- {
- switch ((*prim)->type)
+ switch (prim->type)
{
+ /**
+ * Try to stay in one Begin/End block as long as possible,
+ * since entering and leaving one is most expensive..
+ */
case render_primitive::LINE:
- put_line((*prim)->bounds.x0, (*prim)->bounds.y0, (*prim)->bounds.x1, (*prim)->bounds.y1, 1.0f, u32Color((*prim)->color.r * 255, (*prim)->color.g * 255, (*prim)->color.b * 255, (*prim)->color.a * 255), (ScreenVertex*)buffer->data + vertices, 1.0f);
- vertices += 30;
+ // check if it's really a point
+/*
+ if (((prim->bounds.x1 - prim->bounds.x0) == 0) && ((prim->bounds.y1 - prim->bounds.y0) == 0))
+ {
+ curPrimitive=GL_POINTS;
+ } else {
+ curPrimitive=GL_LINES;
+ }
+
+ if(pendingPrimitive!=GL_NO_PRIMITIVE && pendingPrimitive!=curPrimitive)
+ {
+ glEnd();
+ pendingPrimitive=GL_NO_PRIMITIVE;
+ }
+
+ if ( pendingPrimitive==GL_NO_PRIMITIVE )
+ {
+ set_blendmode(sdl, PRIMFLAG_GET_BLENDMODE(prim->flags));
+ }
+
+ glColor4f(prim->color.r, prim->color.g, prim->color.b, prim->color.a);
+
+ if(pendingPrimitive!=curPrimitive)
+ {
+ glBegin(curPrimitive);
+ pendingPrimitive=curPrimitive;
+ }
+
+ // check if it's really a point
+ if (curPrimitive==GL_POINTS)
+ {
+ glVertex2f(prim->bounds.x0+hofs, prim->bounds.y0+vofs);
+ }
+ else
+ {
+ glVertex2f(prim->bounds.x0+hofs, prim->bounds.y0+vofs);
+ glVertex2f(prim->bounds.x1+hofs, prim->bounds.y1+vofs);
+ }*/
break;
case render_primitive::QUAD:
- if ((*prim)->texture.base == nullptr)
- {
- put_packed_quad(*prim, WHITE_HASH, (ScreenVertex*)buffer->data + vertices);
- vertices += 6;
- }
- else
- {
- const UINT32 hash = get_texture_hash(*prim);
- if (atlas_valid && (*prim)->packable(PACKABLE_SIZE) && hash != 0 && m_hash_to_entry[hash].hash())
- {
- put_packed_quad(*prim, hash, (ScreenVertex*)buffer->data + vertices);
- vertices += 6;
- }
- else
- {
- if (vertices > 0)
- {
- return BUFFER_PRE_FLUSH;
- }
- render_textured_quad(view, *prim, buffer);
- return BUFFER_EMPTY;
- }
- }
- break;
-
- default:
- // Unhandled
- break;
- }
-
- if ((*prim)->next() != nullptr && PRIMFLAG_GET_BLENDMODE((*prim)->next()->flags) != blend)
- {
- break;
- }
-
- *prim = (*prim)->next();
- }
-
- if (*prim == nullptr)
- {
- return BUFFER_DONE;
- }
- if (vertices == 0)
- {
- return BUFFER_EMPTY;
- }
- return BUFFER_FLUSH;
-}
-
-void renderer_bgfx::set_bgfx_state(UINT32 blend)
-{
- uint64_t flags = BGFX_STATE_RGB_WRITE | BGFX_STATE_ALPHA_WRITE | BGFX_STATE_DEPTH_TEST_ALWAYS;
-
- switch (blend)
- {
- case BLENDMODE_NONE:
- bgfx::setState(flags);
- break;
- case BLENDMODE_ALPHA:
- bgfx::setState(flags | BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_SRC_ALPHA, BGFX_STATE_BLEND_INV_SRC_ALPHA));
- break;
- case BLENDMODE_RGB_MULTIPLY:
- bgfx::setState(flags | BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_DST_COLOR, BGFX_STATE_BLEND_ZERO));
- break;
- case BLENDMODE_ADD:
- bgfx::setState(flags | BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_SRC_ALPHA, BGFX_STATE_BLEND_ONE));
- break;
- }
-}
+/*
+ if(pendingPrimitive!=GL_NO_PRIMITIVE)
+ {
+ glEnd();
+ pendingPrimitive=GL_NO_PRIMITIVE;
+ }
-bool renderer_bgfx::update_atlas()
-{
- bool atlas_dirty = check_for_dirty_atlas();
-
- if (atlas_dirty)
- {
- m_hash_to_entry.clear();
+ glColor4f(prim->color.r, prim->color.g, prim->color.b, prim->color.a);
- std::vector<std::vector<rectangle_packer::packed_rectangle>> packed;
- if (m_packer.pack(m_texinfo, packed, CACHE_SIZE))
- {
- process_atlas_packs(packed);
- }
- else
- {
- packed.clear();
+ set_blendmode(sdl, PRIMFLAG_GET_BLENDMODE(prim->flags));
- m_texinfo.clear();
- m_texinfo.push_back(rectangle_packer::packable_rectangle(WHITE_HASH, PRIMFLAG_TEXFORMAT(TEXFORMAT_ARGB32), 16, 16, 16, nullptr, m_white));
+ texture = texture_update(window, prim, 0);
- m_packer.pack(m_texinfo, packed, CACHE_SIZE);
- process_atlas_packs(packed);
- return false;
- }
- }
- return true;
-}
+ sdl->texVerticex[0]=prim->bounds.x0 + hofs;
+ sdl->texVerticex[1]=prim->bounds.y0 + vofs;
+ sdl->texVerticex[2]=prim->bounds.x1 + hofs;
+ sdl->texVerticex[3]=prim->bounds.y0 + vofs;
+ sdl->texVerticex[4]=prim->bounds.x1 + hofs;
+ sdl->texVerticex[5]=prim->bounds.y1 + vofs;
+ sdl->texVerticex[6]=prim->bounds.x0 + hofs;
+ sdl->texVerticex[7]=prim->bounds.y1 + vofs;
-void renderer_bgfx::process_atlas_packs(std::vector<std::vector<rectangle_packer::packed_rectangle>>& packed)
-{
- for (std::vector<rectangle_packer::packed_rectangle> pack : packed)
- {
- for (rectangle_packer::packed_rectangle rect : pack)
- {
- if (rect.hash() == 0xffffffff)
- {
- continue;
- }
- m_hash_to_entry[rect.hash()] = rect;
- const bgfx::Memory* mem = mame_texture_data_to_bgfx_texture_data(rect.format(), rect.width(), rect.height(), rect.rowpixels(), rect.palette(), rect.base());
- bgfx::updateTexture2D(m_texture_cache, 0, rect.x(), rect.y(), rect.width(), rect.height(), mem);
- }
- }
-}
-
-UINT32 renderer_bgfx::get_texture_hash(render_primitive *prim)
-{
-#if GIBBERISH
- UINT32 xor_value = 0x87;
- UINT32 hash = 0xdabeefed;
-
- int bpp = 2;
- UINT32 format = PRIMFLAG_GET_TEXFORMAT(prim->flags);
- if (format == TEXFORMAT_ARGB32 || format == TEXFORMAT_RGB32)
- {
- bpp = 4;
- }
-
- for (int y = 0; y < prim->texture.height; y++)
- {
- UINT8 *base = reinterpret_cast<UINT8*>(prim->texture.base) + prim->texture.rowpixels * y;
- for (int x = 0; x < prim->texture.width * bpp; x++)
- {
- hash += base[x] ^ xor_value;
- }
- }
- return hash;
-#else
- return (reinterpret_cast<size_t>(prim->texture.base)) & 0xffffffff;
-#endif
-}
-
-bool renderer_bgfx::check_for_dirty_atlas()
-{
- bool atlas_dirty = false;
-
- std::map<UINT32, rectangle_packer::packable_rectangle> acquired_infos;
- for (render_primitive *prim = window().m_primlist->first(); prim != nullptr; prim = prim->next())
- {
- bool pack = prim->packable(PACKABLE_SIZE);
- if (prim->type == render_primitive::QUAD && prim->texture.base != nullptr && pack)
- {
- const UINT32 hash = get_texture_hash(prim);
- // If this texture is packable and not currently in the atlas, prepare the texture for putting in the atlas
- if ((hash != 0 && m_hash_to_entry[hash].hash() == 0 && acquired_infos[hash].hash() == 0)
- || (hash != 0 && m_hash_to_entry[hash].hash() != hash && acquired_infos[hash].hash() == 0))
- { // Create create the texture and mark the atlas dirty
- atlas_dirty = true;
-
- m_texinfo.push_back(rectangle_packer::packable_rectangle(hash, prim->flags & PRIMFLAG_TEXFORMAT_MASK,
- prim->texture.width, prim->texture.height,
- prim->texture.rowpixels, prim->texture.palette, prim->texture.base));
- acquired_infos[hash] = m_texinfo[m_texinfo.size() - 1];
- }
- }
- }
-
- if (m_texinfo.size() == 1)
- {
- atlas_dirty = true;
- }
-
- return atlas_dirty;
-}
-
-void renderer_bgfx::allocate_buffer(render_primitive *prim, UINT32 blend, bgfx::TransientVertexBuffer *buffer)
-{
- int vertices = 0;
-
- bool mode_switched = false;
- while (prim != nullptr && !mode_switched)
- {
- switch (prim->type)
- {
- case render_primitive::LINE:
- vertices += 30;
+ glDrawArrays(GL_QUADS, 0, 4);
+*/
break;
- case render_primitive::QUAD:
- if (!prim->packable(PACKABLE_SIZE))
- {
- if (prim->texture.base == nullptr)
- {
- vertices += 6;
- }
- else
- {
- mode_switched = true;
- if (vertices == 0)
- {
- vertices += 6;
- }
- }
- }
- else
- {
- vertices += 6;
- }
- break;
default:
- // Do nothing
- break;
- }
-
- prim = prim->next();
-
- if (prim != nullptr && PRIMFLAG_GET_BLENDMODE(prim->flags) != blend)
- {
- mode_switched = true;
+ throw emu_fatalerror("Unexpected render_primitive type");
}
}
- if (vertices > 0 && bgfx::checkAvailTransientVertexBuffer(vertices, ScreenVertex::ms_decl))
- {
- bgfx::allocTransientVertexBuffer(buffer, vertices, ScreenVertex::ms_decl);
- }
+ window().m_primlist->release_lock();
+ // Advance to next frame. Rendering thread will be kicked to
+ // process submitted rendering primitives.
+ bgfx::frame();
+
+ return 0;
}
diff --git a/src/osd/modules/render/drawbgfx.h b/src/osd/modules/render/drawbgfx.h
deleted file mode 100644
index 86619eab718..00000000000
--- a/src/osd/modules/render/drawbgfx.h
+++ /dev/null
@@ -1,108 +0,0 @@
-#pragma once
-
-#ifndef __RENDER_BGFX__
-#define __RENDER_BGFX__
-
-#include <map>
-#include <vector>
-
-#include "binpacker.h"
-
-/* sdl_info is the information about SDL for the current screen */
-class renderer_bgfx : public osd_renderer
-{
-public:
- renderer_bgfx(osd_window *w)
- : osd_renderer(w, FLAG_NONE)
- , m_dimensions(0, 0)
- {
- }
-
- virtual int create() override;
- virtual int draw(const int update) override;
-#ifdef OSD_SDL
- virtual int xy_to_render_target(const int x, const int y, int *xt, int *yt) override;
-#else
- virtual void save() override { }
- virtual void record() override { }
- virtual void toggle_fsfx() override { }
-#endif
- virtual void destroy() override;
- virtual render_primitive_list *get_primitives() override
- {
- osd_dim wdim = window().get_size();
- window().target()->set_bounds(wdim.width(), wdim.height(), window().aspect());
- return &window().target()->get_primitives();
- }
-
-private:
- struct ScreenVertex
- {
- float m_x;
- float m_y;
- float m_z;
- UINT32 m_rgba;
- float m_u;
- float m_v;
-
- static void init()
- {
- ms_decl.begin()
- .add(bgfx::Attrib::Position, 3, bgfx::AttribType::Float)
- .add(bgfx::Attrib::Color0, 4, bgfx::AttribType::Uint8, true)
- .add(bgfx::Attrib::TexCoord0, 2, bgfx::AttribType::Float)
- .end();
- }
-
- static bgfx::VertexDecl ms_decl;
- };
-
- void allocate_buffer(render_primitive *prim, UINT32 blend, bgfx::TransientVertexBuffer *buffer);
- enum buffer_status
- {
- BUFFER_PRE_FLUSH,
- BUFFER_FLUSH,
- BUFFER_EMPTY,
- BUFFER_DONE
- };
- buffer_status buffer_primitives(int view, bool atlas_valid, render_primitive** prim, bgfx::TransientVertexBuffer* buffer);
-
- void render_textured_quad(int view, render_primitive* prim, bgfx::TransientVertexBuffer* buffer);
-
- void put_packed_quad(render_primitive *prim, UINT32 hash, ScreenVertex* vertex);
- void put_polygon(const float* coords, UINT32 num_coords, float r, UINT32 rgba, ScreenVertex* vertex);
- void put_line(float x0, float y0, float x1, float y1, float r, UINT32 rgba, ScreenVertex* vertex, float fth = 1.0f);
-
- void set_bgfx_state(UINT32 blend);
-
- uint32_t u32Color(uint32_t r, uint32_t g, uint32_t b, uint32_t a);
-
- bool check_for_dirty_atlas();
- bool update_atlas();
- void process_atlas_packs(std::vector<std::vector<rectangle_packer::packed_rectangle>>& packed);
- const bgfx::Memory* mame_texture_data_to_bgfx_texture_data(UINT32 format, int width, int height, int rowpixels, const rgb_t *palette, void *base);
- UINT32 get_texture_hash(render_primitive *prim);
-
- bgfx::ProgramHandle loadProgram(bx::FileReaderI* _reader, const char* _vsName, const char* _fsName);
- bgfx::ProgramHandle loadProgram(const char* _vsName, const char* _fsName);
-
- bgfx::ProgramHandle m_progQuad;
- bgfx::ProgramHandle m_progQuadTexture;
- bgfx::UniformHandle m_s_texColor;
- bgfx::FrameBufferHandle fbh;
- bgfx::TextureHandle m_texture_cache;
-
- // Original display_mode
- osd_dim m_dimensions;
-
- std::map<UINT32, rectangle_packer::packed_rectangle> m_hash_to_entry;
- std::vector<rectangle_packer::packable_rectangle> m_texinfo;
- rectangle_packer m_packer;
-
- uint32_t m_white[16*16];
- enum : uint16_t { CACHE_SIZE = 1024 };
- enum : uint32_t { PACKABLE_SIZE = 128 };
- enum : UINT32 { WHITE_HASH = 0x87654321 };
-};
-
-#endif
diff --git a/src/osd/modules/render/drawd3d.cpp b/src/osd/modules/render/drawd3d.cpp
index b8730696a54..c4ceb30fef4 100644
--- a/src/osd/modules/render/drawd3d.cpp
+++ b/src/osd/modules/render/drawd3d.cpp
@@ -247,6 +247,7 @@ render_primitive_list *d3d::renderer::get_primitives()
}
if (m_shaders != NULL)
{
+ // do not transform primitives (scale, offset) if shaders are enabled, the shaders will handle the transformation
window().target()->set_transform_primitives(!m_shaders->enabled());
}
return &window().target()->get_primitives();
@@ -470,6 +471,63 @@ texture_manager::~texture_manager()
{
}
+
+//============================================================
+// texture_manager::compute_texture_size
+//============================================================
+
+void texture_manager::compute_texture_size(int texwidth, int texheight, int* p_width, int* p_height)
+{
+ int finalheight = texheight;
+ int finalwidth = texwidth;
+
+ // round width/height up to nearest power of 2 if we need to
+ if (!(get_texture_caps() & D3DPTEXTURECAPS_NONPOW2CONDITIONAL))
+ {
+ // first the width
+ if (finalwidth & (finalwidth - 1))
+ {
+ finalwidth |= finalwidth >> 1;
+ finalwidth |= finalwidth >> 2;
+ finalwidth |= finalwidth >> 4;
+ finalwidth |= finalwidth >> 8;
+ finalwidth++;
+ }
+
+ // then the height
+ if (finalheight & (finalheight - 1))
+ {
+ finalheight |= finalheight >> 1;
+ finalheight |= finalheight >> 2;
+ finalheight |= finalheight >> 4;
+ finalheight |= finalheight >> 8;
+ finalheight++;
+ }
+ }
+
+ // round up to square if we need to
+ if (get_texture_caps() & D3DPTEXTURECAPS_SQUAREONLY)
+ {
+ if (finalwidth < finalheight)
+ finalwidth = finalheight;
+ else
+ finalheight = finalwidth;
+ }
+
+ // adjust the aspect ratio if we need to
+ while (finalwidth < finalheight && finalheight / finalwidth > get_max_texture_aspect())
+ {
+ finalwidth *= 2;
+ }
+ while (finalheight < finalwidth && finalwidth / finalheight > get_max_texture_aspect())
+ {
+ finalheight *= 2;
+ }
+
+ *p_width = finalwidth;
+ *p_height = finalheight;
+}
+
void texture_manager::create_resources()
{
// experimental: load a PNG to use for vector rendering; it is treated
@@ -1925,18 +1983,20 @@ texture_info::texture_info(texture_manager *manager, const render_texinfo* texso
m_d3dsurface = NULL;
m_d3dfinaltex = NULL;
- // compute the size
- compute_size(texsource->width, texsource->height);
-
// non-screen textures are easy
if (!PRIMFLAG_GET_SCREENTEX(flags))
{
+ // required to compute the size
+ m_type = TEXTURE_TYPE_PLAIN;
+
+ // compute the size
+ compute_size(texsource->width, texsource->height);
+
assert(PRIMFLAG_TEXFORMAT(flags) != TEXFORMAT_YUY16);
result = (*d3dintf->device.create_texture)(m_renderer->get_device(), m_rawdims.c.x, m_rawdims.c.y, 1, 0, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, &m_d3dtex);
if (result != D3D_OK)
goto error;
m_d3dfinaltex = m_d3dtex;
- m_type = TEXTURE_TYPE_PLAIN;
}
// screen textures are allocated differently
@@ -1994,14 +2054,19 @@ texture_info::texture_info(texture_manager *manager, const render_texinfo* texso
m_xprescale = m_yprescale = 1;
}
- // screen textures with no prescaling are pretty easy
- if (m_xprescale == 1 && m_yprescale == 1)
+ // screen textures with no prescaling are pretty easy and shaders handle prescale itself
+ if ((m_xprescale == 1 && m_yprescale == 1) || m_renderer->get_shaders()->enabled())
{
+ // required to compute the size
+ m_type = m_texture_manager->is_dynamic_supported() ? TEXTURE_TYPE_DYNAMIC : TEXTURE_TYPE_PLAIN;
+
+ // compute the size
+ compute_size(texsource->width, texsource->height);
+
result = (*d3dintf->device.create_texture)(m_renderer->get_device(), m_rawdims.c.x, m_rawdims.c.y, 1, usage, format, pool, &m_d3dtex);
if (result == D3D_OK)
{
m_d3dfinaltex = m_d3dtex;
- m_type = m_texture_manager->is_dynamic_supported() ? TEXTURE_TYPE_DYNAMIC : TEXTURE_TYPE_PLAIN;
if (m_renderer->get_shaders()->enabled() && !m_renderer->get_shaders()->register_texture(this))
{
goto error;
@@ -2010,7 +2075,6 @@ texture_info::texture_info(texture_manager *manager, const render_texinfo* texso
break;
}
}
-
// screen textures with prescaling require two allocations
else
{
@@ -2018,23 +2082,32 @@ texture_info::texture_info(texture_manager *manager, const render_texinfo* texso
// (won't work for YUY textures)
if (m_texture_manager->is_stretch_supported() && PRIMFLAG_GET_TEXFORMAT(flags) != TEXFORMAT_YUY16)
{
+ // required to compute the size
+ m_type = TEXTURE_TYPE_SURFACE;
+
+ // compute the size
+ compute_size(texsource->width, texsource->height);
+
result = (*d3dintf->device.create_offscreen_plain_surface)(m_renderer->get_device(), m_rawdims.c.x, m_rawdims.c.y, format, D3DPOOL_DEFAULT, &m_d3dsurface);
if (result != D3D_OK)
{
continue;
}
- m_type = TEXTURE_TYPE_SURFACE;
}
-
// otherwise, we allocate a dynamic texture for the source
else
{
+ // required to compute the size
+ m_type = m_texture_manager->is_dynamic_supported() ? TEXTURE_TYPE_DYNAMIC : TEXTURE_TYPE_PLAIN;
+
+ // compute the size
+ compute_size(texsource->width, texsource->height);
+
result = (*d3dintf->device.create_texture)(m_renderer->get_device(), m_rawdims.c.x, m_rawdims.c.y, 1, usage, format, pool, &m_d3dtex);
if (result != D3D_OK)
{
continue;
}
- m_type = m_texture_manager->is_dynamic_supported() ? TEXTURE_TYPE_DYNAMIC : TEXTURE_TYPE_PLAIN;
}
// for the target surface, we allocate a render target texture
@@ -2043,15 +2116,13 @@ texture_info::texture_info(texture_manager *manager, const render_texinfo* texso
// target surfaces typically cannot be YCbCr, so we always pick RGB in that case
D3DFORMAT finalfmt = (format != m_texture_manager->get_yuv_format()) ? format : D3DFMT_A8R8G8B8;
+
result = (*d3dintf->device.create_texture)(m_renderer->get_device(), scwidth, scheight, 1, D3DUSAGE_RENDERTARGET, finalfmt, D3DPOOL_DEFAULT, &m_d3dfinaltex);
if (result == D3D_OK)
{
- if (m_renderer->get_shaders()->enabled() && !m_renderer->get_shaders()->register_prescaled_texture(this))
- {
- goto error;
- }
break;
}
+
(*d3dintf->texture.release)(m_d3dtex);
m_d3dtex = NULL;
}
@@ -2061,7 +2132,6 @@ texture_info::texture_info(texture_manager *manager, const render_texinfo* texso
// copy the data to the texture
set_data(texsource, flags);
- //texsource->osdhandle = (void*)this;
// add us to the texture list
if(m_texture_manager->get_texlist() != NULL)
m_texture_manager->get_texlist()->m_prev = this;
@@ -2081,63 +2151,6 @@ error:
//============================================================
-// texture_info::compute_size_subroutine
-//============================================================
-
-void texture_info::compute_size_subroutine(int texwidth, int texheight, int* p_width, int* p_height)
-{
- int finalheight = texheight;
- int finalwidth = texwidth;
-
- // round width/height up to nearest power of 2 if we need to
- if (!(m_texture_manager->get_texture_caps() & D3DPTEXTURECAPS_NONPOW2CONDITIONAL))
- {
- // first the width
- if (finalwidth & (finalwidth - 1))
- {
- finalwidth |= finalwidth >> 1;
- finalwidth |= finalwidth >> 2;
- finalwidth |= finalwidth >> 4;
- finalwidth |= finalwidth >> 8;
- finalwidth++;
- }
-
- // then the height
- if (finalheight & (finalheight - 1))
- {
- finalheight |= finalheight >> 1;
- finalheight |= finalheight >> 2;
- finalheight |= finalheight >> 4;
- finalheight |= finalheight >> 8;
- finalheight++;
- }
- }
-
- // round up to square if we need to
- if (m_texture_manager->get_texture_caps() & D3DPTEXTURECAPS_SQUAREONLY)
- {
- if (finalwidth < finalheight)
- finalwidth = finalheight;
- else
- finalheight = finalwidth;
- }
-
- // adjust the aspect ratio if we need to
- while (finalwidth < finalheight && finalheight / finalwidth > m_texture_manager->get_max_texture_aspect())
- {
- finalwidth *= 2;
- }
- while (finalheight < finalwidth && finalwidth / finalheight > m_texture_manager->get_max_texture_aspect())
- {
- finalheight *= 2;
- }
-
- *p_width = finalwidth;
- *p_height = finalheight;
-}
-
-
-//============================================================
// texture_info::compute_size
//============================================================
@@ -2149,30 +2162,42 @@ void texture_info::compute_size(int texwidth, int texheight)
m_xborderpix = 0;
m_yborderpix = 0;
- // if we're not wrapping, add a 1-2 pixel border on all sides
- if (ENABLE_BORDER_PIX && !(m_flags & PRIMFLAG_TEXWRAP_MASK))
+ bool shaders_enabled = m_renderer->get_shaders()->enabled();
+ bool wrap_texture = (m_flags & PRIMFLAG_TEXWRAP_MASK) == PRIMFLAG_TEXWRAP_MASK;
+ bool border_texture = ENABLE_BORDER_PIX && !wrap_texture;
+ bool surface_texture = m_type == TEXTURE_TYPE_SURFACE;
+
+ // skip border when shaders are enabled and we're not creating a surface (UI) texture
+ if (!shaders_enabled || surface_texture)
{
- // note we need 2 pixels in X for YUY textures
- m_xborderpix = (PRIMFLAG_GET_TEXFORMAT(m_flags) == TEXFORMAT_YUY16) ? 2 : 1;
- m_yborderpix = 1;
+ // if we're not wrapping, add a 1-2 pixel border on all sides
+ if (border_texture)
+ {
+ // note we need 2 pixels in X for YUY textures
+ m_xborderpix = (PRIMFLAG_GET_TEXFORMAT(m_flags) == TEXFORMAT_YUY16) ? 2 : 1;
+ m_yborderpix = 1;
+ }
}
- // compute final texture size
finalwidth += 2 * m_xborderpix;
finalheight += 2 * m_yborderpix;
- compute_size_subroutine(finalwidth, finalheight, &finalwidth, &finalheight);
-
- // if we added pixels for the border, and that just barely pushed us over, take it back
- if (finalwidth > m_texture_manager->get_max_texture_width() || finalheight > m_texture_manager->get_max_texture_height())
+ // take texture size as given when shaders are enabled and we're not creating a surface (UI) texture, still update wrapped textures
+ if (!shaders_enabled || surface_texture || wrap_texture)
{
- finalheight = texheight;
- finalwidth = texwidth;
+ m_texture_manager->compute_texture_size(finalwidth, finalheight, &finalwidth, &finalheight);
- m_xborderpix = 0;
- m_yborderpix = 0;
+ // if we added pixels for the border, and that just barely pushed us over, take it back
+ if (finalwidth > m_texture_manager->get_max_texture_width() || finalheight > m_texture_manager->get_max_texture_height())
+ {
+ finalheight = texheight;
+ finalwidth = texwidth;
- compute_size_subroutine(finalwidth, finalheight, &finalwidth, &finalheight);
+ m_xborderpix = 0;
+ m_yborderpix = 0;
+
+ m_texture_manager->compute_texture_size(finalwidth, finalheight, &finalwidth, &finalheight);
+ }
}
// if we're above the max width/height, do what?
@@ -2751,18 +2776,20 @@ cache_target::~cache_target()
// cache_target::init - initializes a target cache
//============================================================
-bool cache_target::init(renderer *d3d, base *d3dintf, int width, int height, int prescale_x, int prescale_y)
+bool cache_target::init(renderer *d3d, base *d3dintf, int target_width, int target_height)
{
- HRESULT result = (*d3dintf->device.create_texture)(d3d->get_device(), width * prescale_x, height * prescale_y, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &last_texture);
+ // d3d->get_texture_manager()->compute_texture_size(target_width, target_height, &target_width, &target_height);
+
+ this->target_width = target_width;
+ this->target_height = target_height;
+
+ HRESULT result = (*d3dintf->device.create_texture)(d3d->get_device(), target_width, target_height, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &last_texture);
if (result != D3D_OK)
{
return false;
}
(*d3dintf->texture.get_surface_level)(last_texture, 0, &last_target);
- target_width = width * prescale_x;
- target_height = height * prescale_y;
-
return true;
}
@@ -2789,25 +2816,25 @@ render_target::~render_target()
for (int index = 0; index < 2; index++)
{
- if (native_texture[index] != NULL)
+ if (source_texture[index] != NULL)
{
- (*d3dintf->texture.release)(native_texture[index]);
- native_texture[index] = NULL;
+ (*d3dintf->texture.release)(source_texture[index]);
+ source_texture[index] = NULL;
}
- if (native_target[index] != NULL)
+ if (source_surface[index] != NULL)
{
- (*d3dintf->surface.release)(native_target[index]);
- native_target[index] = NULL;
+ (*d3dintf->surface.release)(source_surface[index]);
+ source_surface[index] = NULL;
}
- if (prescale_texture[index] != NULL)
+ if (target_texture[index] != NULL)
{
- (*d3dintf->texture.release)(prescale_texture[index]);
- prescale_texture[index] = NULL;
+ (*d3dintf->texture.release)(target_texture[index]);
+ target_texture[index] = NULL;
}
- if (prescale_target[index] != NULL)
+ if (target_surface[index] != NULL)
{
- (*d3dintf->surface.release)(prescale_target[index]);
- prescale_target[index] = NULL;
+ (*d3dintf->surface.release)(target_surface[index]);
+ target_surface[index] = NULL;
}
}
}
@@ -2817,31 +2844,39 @@ render_target::~render_target()
// render_target::init - initializes a render target
//============================================================
-bool render_target::init(renderer *d3d, base *d3dintf, int width, int height, int prescale_x, int prescale_y)
+bool render_target::init(renderer *d3d, base *d3dintf, int width, int height, int target_width, int target_height)
{
HRESULT result;
+ // d3d->get_texture_manager()->compute_texture_size(target_width, target_height, &target_width, &target_height);
+
+ this->width = width;
+ this->height = height;
+
+ this->target_width = target_width;
+ this->target_height = target_height;
+
for (int index = 0; index < 2; index++)
{
- result = (*d3dintf->device.create_texture)(d3d->get_device(), width, height, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &native_texture[index]);
+ result = (*d3dintf->device.create_texture)(d3d->get_device(), width, height, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &source_texture[index]);
if (result != D3D_OK)
{
return false;
}
- (*d3dintf->texture.get_surface_level)(native_texture[index], 0, &native_target[index]);
+ (*d3dintf->texture.get_surface_level)(source_texture[index], 0, &source_surface[index]);
- result = (*d3dintf->device.create_texture)(d3d->get_device(), width * prescale_x, height * prescale_y, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &prescale_texture[index]);
+ result = (*d3dintf->device.create_texture)(d3d->get_device(), target_width, target_height, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &target_texture[index]);
if (result != D3D_OK)
{
return false;
}
- (*d3dintf->texture.get_surface_level)(prescale_texture[index], 0, &prescale_target[index]);
+ (*d3dintf->texture.get_surface_level)(target_texture[index], 0, &target_surface[index]);
}
int bloom_index = 0;
- float bloom_size = (d3d->get_width() < d3d->get_height()) ? d3d->get_width() : d3d->get_height();
- float bloom_width = d3d->get_width();
- float bloom_height = d3d->get_height();
+ float bloom_width = target_width;
+ float bloom_height = target_height;
+ float bloom_size = bloom_width < bloom_height ? bloom_width : bloom_height;
for (; bloom_size >= 2.0f && bloom_index < 11; bloom_size *= 0.5f)
{
bloom_width *= 0.5f;
@@ -2857,12 +2892,6 @@ bool render_target::init(renderer *d3d, base *d3dintf, int width, int height, in
bloom_index++;
}
- this->width = width;
- this->height = height;
-
- target_width = width * prescale_x;
- target_height = height * prescale_y;
-
return true;
}
diff --git a/src/osd/modules/render/drawd3d.h b/src/osd/modules/render/drawd3d.h
index 906bd7711b8..9c2014ead39 100644
--- a/src/osd/modules/render/drawd3d.h
+++ b/src/osd/modules/render/drawd3d.h
@@ -38,14 +38,16 @@ public:
cache_target() { }
~cache_target();
- bool init(renderer *d3d, base *d3dintf, int width, int height, int prescale_x, int prescale_y);
+ bool init(renderer *d3d, base *d3dintf, int target_width, int target_height);
surface *last_target;
texture *last_texture;
+ // real target dimension
int target_width;
int target_height;
+ // only used to identify/find the render target
int width;
int height;
@@ -63,25 +65,24 @@ public:
render_target() { }
~render_target();
- bool init(renderer *d3d, base *d3dintf, int width, int height, int prescale_x, int prescale_y);
+ bool init(renderer *d3d, base *d3dintf, int width, int height, int target_width, int target_height);
int next_index(int index) { return ++index > 1 ? 0 : index; }
+ // real target dimension
int target_width;
int target_height;
- int prescale_x;
- int prescale_y;
-
+ // only used to identify/find the render target
int width;
int height;
int screen_index;
int page_index;
- surface *prescale_target[2];
- texture *prescale_texture[2];
- surface *native_target[2];
- texture *native_texture[2];
+ surface *target_surface[2];
+ texture *target_texture[2];
+ surface *source_surface[2];
+ texture *source_texture[2];
render_target *next;
render_target *prev;
diff --git a/src/osd/modules/render/drawdd.cpp b/src/osd/modules/render/drawdd.cpp
new file mode 100644
index 00000000000..fb82dff3c1f
--- /dev/null
+++ b/src/osd/modules/render/drawdd.cpp
@@ -0,0 +1,1317 @@
+// license:BSD-3-Clause
+// copyright-holders:Aaron Giles
+//============================================================
+//
+// drawdd.c - Win32 DirectDraw implementation
+//
+//============================================================
+
+// standard windows headers
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#include <mmsystem.h>
+#include <ddraw.h>
+#undef interface
+
+// MAME headers
+#include "emu.h"
+#include "render.h"
+#include "rendutil.h"
+#include "rendersw.inc"
+
+// MAMEOS headers
+#include "winmain.h"
+#include "window.h"
+
+
+
+//============================================================
+// TYPE DEFINITIONS
+//============================================================
+
+typedef HRESULT (WINAPI *directdrawcreateex_ptr)(GUID FAR *lpGuid, LPVOID *lplpDD, REFIID iid, IUnknown FAR *pUnkOuter);
+typedef HRESULT (WINAPI *directdrawenumerateex_ptr)(LPDDENUMCALLBACKEXA lpCallback, LPVOID lpContext, DWORD dwFlags);
+
+
+/* dd_info is the information about DirectDraw for the current screen */
+class renderer_dd : public osd_renderer
+{
+public:
+ renderer_dd(osd_window *window)
+ : osd_renderer(window, FLAG_NONE),
+ width(0),
+ height(0),
+ refresh(0),
+ //adapter(0),
+ adapter_ptr(NULL),
+ clearouter(0),
+ blitwidth(0), blitheight(0),
+ //lastdest
+ ddraw(NULL),
+ primary(NULL),
+ back(NULL),
+ blit(NULL),
+ clipper(NULL),
+ gamma(NULL),
+ //DDSURFACEDESC2 primarydesc;
+ //DDSURFACEDESC2 blitdesc;
+ //DDSURFACEDESC2 origmode;
+ //ddcaps(0),
+ //helcaps(0),
+ membuffer(NULL),
+ membuffersize(0)
+ { }
+
+ virtual ~renderer_dd() { }
+
+ virtual int create() override;
+ virtual render_primitive_list *get_primitives() override;
+ virtual int draw(const int update) override;
+ virtual void save() override {};
+ virtual void record() override {};
+ virtual void toggle_fsfx() override {};
+ virtual void destroy() override;
+
+ int width, height; // current width, height
+ int refresh; // current refresh rate
+
+private:
+
+ inline void update_outer_rects();
+
+ // surface management
+ int ddraw_create();
+ int ddraw_create_surfaces();
+ void ddraw_delete();
+ void ddraw_delete_surfaces();
+ int ddraw_verify_caps();
+ int ddraw_test_cooperative();
+ HRESULT create_surface(DDSURFACEDESC2 *desc, IDirectDrawSurface7 **surface, const char *type);
+ int create_clipper();
+
+ // drawing helpers
+ void compute_blit_surface_size();
+ void blit_to_primary(int srcwidth, int srcheight);
+
+ // video modes
+ int config_adapter_mode();
+ void get_adapter_for_monitor(osd_monitor_info *monitor);
+ void pick_best_mode();
+
+ // various
+ void calc_fullscreen_margins(DWORD desc_width, DWORD desc_height, RECT *margins);
+
+
+ GUID adapter; // current display adapter
+ GUID * adapter_ptr; // pointer to current display adapter
+ int clearouter; // clear the outer areas?
+
+ INT32 blitwidth, blitheight; // current blit width/height values
+ RECT lastdest; // last destination rectangle
+
+ IDirectDraw7 * ddraw; // pointer to the DirectDraw object
+ IDirectDrawSurface7 * primary; // pointer to the primary surface object
+ IDirectDrawSurface7 * back; // pointer to the back buffer surface object
+ IDirectDrawSurface7 * blit; // pointer to the blit surface object
+ IDirectDrawClipper * clipper; // pointer to the clipper object
+ IDirectDrawGammaControl *gamma; // pointer to the gamma control object
+
+ DDSURFACEDESC2 primarydesc; // description of the primary surface
+ DDSURFACEDESC2 blitdesc; // description of the blitting surface
+ DDSURFACEDESC2 origmode; // original video mode
+
+ DDCAPS ddcaps; // capabilities of the device
+ DDCAPS helcaps; // capabilities of the hardware
+
+ UINT8 * membuffer; // memory buffer for complex rendering
+ UINT32 membuffersize; // current size of the memory buffer
+};
+
+
+/* monitor_enum_info holds information during a monitor enumeration */
+struct monitor_enum_info
+{
+ osd_monitor_info * monitor; // pointer to monitor we want
+ GUID guid; // GUID of the one we found
+ GUID * guid_ptr; // pointer to our GUID
+ int foundit; // TRUE if we found what we wanted
+};
+
+
+/* mode_enum_info holds information during a display mode enumeration */
+struct mode_enum_info
+{
+ renderer_dd * renderer;
+ osd_window * window;
+ INT32 minimum_width, minimum_height;
+ INT32 target_width, target_height;
+ double target_refresh;
+ float best_score;
+};
+
+
+
+//============================================================
+// GLOBALS
+//============================================================
+
+static HINSTANCE dllhandle;
+static directdrawcreateex_ptr directdrawcreateex;
+static directdrawenumerateex_ptr directdrawenumerateex;
+
+
+
+//============================================================
+// INLINES
+//============================================================
+
+inline void renderer_dd::update_outer_rects()
+{
+ clearouter = (back != NULL) ? 3 : 1;
+}
+
+
+static inline int better_mode(int width0, int height0, int width1, int height1, float desired_aspect)
+{
+ float aspect0 = (float)width0 / (float)height0;
+ float aspect1 = (float)width1 / (float)height1;
+ return (fabs(desired_aspect - aspect0) < fabs(desired_aspect - aspect1)) ? 0 : 1;
+}
+
+
+
+//============================================================
+// PROTOTYPES
+//============================================================
+
+// core functions
+static void drawdd_exit(void);
+
+
+
+//============================================================
+// drawnone_create
+//============================================================
+
+static osd_renderer *drawdd_create(osd_window *window)
+{
+ return global_alloc(renderer_dd(window));
+}
+
+
+//============================================================
+// drawdd_init
+//============================================================
+
+int drawdd_init(running_machine &machine, osd_draw_callbacks *callbacks)
+{
+ // dynamically grab the create function from ddraw.dll
+ dllhandle = LoadLibrary(TEXT("ddraw.dll"));
+ if (dllhandle == NULL)
+ {
+ osd_printf_verbose("DirectDraw: Unable to access ddraw.dll\n");
+ return 1;
+ }
+
+ // import the create function
+ directdrawcreateex = (directdrawcreateex_ptr)GetProcAddress(dllhandle, "DirectDrawCreateEx");
+ if (directdrawcreateex == NULL)
+ {
+ osd_printf_verbose("DirectDraw: Unable to find DirectDrawCreateEx\n");
+ FreeLibrary(dllhandle);
+ dllhandle = NULL;
+ return 1;
+ }
+
+ // import the enumerate function
+ directdrawenumerateex = (directdrawenumerateex_ptr)GetProcAddress(dllhandle, "DirectDrawEnumerateExA");
+ if (directdrawenumerateex == NULL)
+ {
+ osd_printf_verbose("DirectDraw: Unable to find DirectDrawEnumerateExA\n");
+ FreeLibrary(dllhandle);
+ dllhandle = NULL;
+ return 1;
+ }
+
+ // fill in the callbacks
+ memset(callbacks, 0, sizeof(*callbacks));
+ callbacks->exit = drawdd_exit;
+ callbacks->create = drawdd_create;
+
+ osd_printf_verbose("DirectDraw: Using DirectDraw 7\n");
+ return 0;
+}
+
+
+
+//============================================================
+// drawdd_exit
+//============================================================
+
+static void drawdd_exit(void)
+{
+ if (dllhandle != NULL)
+ FreeLibrary(dllhandle);
+}
+
+
+
+//============================================================
+// drawdd_window_init
+//============================================================
+
+int renderer_dd::create()
+{
+ // configure the adapter for the mode we want
+ if (config_adapter_mode())
+ {
+ osd_printf_error("Unable to configure adapter.\n");
+ goto error;
+ }
+
+ // create the ddraw object
+ if (ddraw_create())
+ {
+ osd_printf_error("Unable to create ddraw object.\n");
+ goto error;
+ }
+
+ return 0;
+
+error:
+ destroy();
+ osd_printf_error("Unable to initialize DirectDraw.\n");
+ return 1;
+}
+
+
+
+//============================================================
+// drawdd_window_destroy
+//============================================================
+
+void renderer_dd::destroy()
+{
+ // delete the ddraw object
+ ddraw_delete();
+}
+
+
+
+//============================================================
+// drawdd_window_get_primitives
+//============================================================
+
+render_primitive_list *renderer_dd::get_primitives()
+{
+ compute_blit_surface_size();
+ window().target()->set_bounds(blitwidth, blitheight, 0);
+ window().target()->set_max_update_rate((refresh == 0) ? origmode.dwRefreshRate : refresh);
+
+ return &window().target()->get_primitives();
+}
+
+
+
+//============================================================
+// drawdd_window_draw
+//============================================================
+
+int renderer_dd::draw(const int update)
+{
+ render_primitive *prim;
+ int usemembuffer = FALSE;
+ HRESULT result;
+
+ // if we're updating, remember to erase the outer stuff
+ if (update)
+ update_outer_rects();
+
+ // if we have a ddraw object, check the cooperative level
+ if (ddraw_test_cooperative())
+ return 1;
+
+ // get the size; if we're too small, delete the existing surfaces
+ if (blitwidth > blitdesc.dwWidth || blitheight > blitdesc.dwHeight)
+ ddraw_delete_surfaces();
+
+ // if we need to create surfaces, do it now
+ if (blit == NULL && ddraw_create_surfaces() != 0)
+ return 1;
+
+ // select our surface and lock it
+ result = IDirectDrawSurface7_Lock(blit, NULL, &blitdesc, DDLOCK_WAIT, NULL);
+ if (result == DDERR_SURFACELOST)
+ {
+ osd_printf_verbose("DirectDraw: Lost surfaces; deleting and retrying next frame\n");
+ ddraw_delete_surfaces();
+ return 1;
+ }
+ if (result != DD_OK)
+ {
+ osd_printf_verbose("DirectDraw: Error %08X locking blit surface\n", (int)result);
+ return 1;
+ }
+
+ // render to it
+ window().m_primlist->acquire_lock();
+
+ // scan the list of primitives for tricky stuff
+ for (prim = window().m_primlist->first(); prim != NULL; prim = prim->next())
+ if (PRIMFLAG_GET_BLENDMODE(prim->flags) != BLENDMODE_NONE ||
+ (prim->texture.base != NULL && PRIMFLAG_GET_TEXFORMAT(prim->flags) == TEXFORMAT_ARGB32))
+ {
+ usemembuffer = TRUE;
+ break;
+ }
+
+ // if we're using the memory buffer, draw offscreen first and then copy
+ if (usemembuffer)
+ {
+ int x, y;
+
+ // based on the target format, use one of our standard renderers
+ switch (blitdesc.ddpfPixelFormat.dwRBitMask)
+ {
+ case 0x00ff0000: software_renderer<UINT32, 0,0,0, 16,8,0>::draw_primitives(*window().m_primlist, membuffer, blitwidth, blitheight, blitwidth); break;
+ case 0x000000ff: software_renderer<UINT32, 0,0,0, 0,8,16>::draw_primitives(*window().m_primlist, membuffer, blitwidth, blitheight, blitwidth); break;
+ case 0xf800: software_renderer<UINT16, 3,2,3, 11,5,0>::draw_primitives(*window().m_primlist, membuffer, blitwidth, blitheight, blitwidth); break;
+ case 0x7c00: software_renderer<UINT16, 3,3,3, 10,5,0>::draw_primitives(*window().m_primlist, membuffer, blitwidth, blitheight, blitwidth); break;
+ default:
+ osd_printf_verbose("DirectDraw: Unknown target mode: R=%08X G=%08X B=%08X\n", (int)blitdesc.ddpfPixelFormat.dwRBitMask, (int)blitdesc.ddpfPixelFormat.dwGBitMask, (int)blitdesc.ddpfPixelFormat.dwBBitMask);
+ break;
+ }
+
+ // handle copying to both 16bpp and 32bpp destinations
+ for (y = 0; y < blitheight; y++)
+ {
+ if (blitdesc.ddpfPixelFormat.dwRGBBitCount == 32)
+ {
+ UINT32 *src = (UINT32 *)membuffer + y * blitwidth;
+ UINT32 *dst = (UINT32 *)((UINT8 *)blitdesc.lpSurface + y * blitdesc.lPitch);
+ for (x = 0; x < blitwidth; x++)
+ *dst++ = *src++;
+ }
+ else if (blitdesc.ddpfPixelFormat.dwRGBBitCount == 16)
+ {
+ UINT16 *src = (UINT16 *)membuffer + y * blitwidth;
+ UINT16 *dst = (UINT16 *)((UINT8 *)blitdesc.lpSurface + y * blitdesc.lPitch);
+ for (x = 0; x < blitwidth; x++)
+ *dst++ = *src++;
+ }
+ }
+
+ }
+
+ // otherwise, draw directly
+ else
+ {
+ // based on the target format, use one of our standard renderers
+ switch (blitdesc.ddpfPixelFormat.dwRBitMask)
+ {
+ case 0x00ff0000: software_renderer<UINT32, 0,0,0, 16,8,0, true>::draw_primitives(*window().m_primlist, blitdesc.lpSurface, blitwidth, blitheight, blitdesc.lPitch / 4); break;
+ case 0x000000ff: software_renderer<UINT32, 0,0,0, 0,8,16, true>::draw_primitives(*window().m_primlist, blitdesc.lpSurface, blitwidth, blitheight, blitdesc.lPitch / 4); break;
+ case 0xf800: software_renderer<UINT16, 3,2,3, 11,5,0, true>::draw_primitives(*window().m_primlist, blitdesc.lpSurface, blitwidth, blitheight, blitdesc.lPitch / 2); break;
+ case 0x7c00: software_renderer<UINT16, 3,3,3, 10,5,0, true>::draw_primitives(*window().m_primlist, blitdesc.lpSurface, blitwidth, blitheight, blitdesc.lPitch / 2); break;
+ default:
+ osd_printf_verbose("DirectDraw: Unknown target mode: R=%08X G=%08X B=%08X\n", (int)blitdesc.ddpfPixelFormat.dwRBitMask, (int)blitdesc.ddpfPixelFormat.dwGBitMask, (int)blitdesc.ddpfPixelFormat.dwBBitMask);
+ break;
+ }
+ }
+ window().m_primlist->release_lock();
+
+ // unlock and blit
+ result = IDirectDrawSurface7_Unlock(blit, NULL);
+ if (result != DD_OK) osd_printf_verbose("DirectDraw: Error %08X unlocking blit surface\n", (int)result);
+
+ // sync to VBLANK
+ if ((video_config.waitvsync || video_config.syncrefresh) && window().machine().video().throttled() && (!window().fullscreen() || back == NULL))
+ {
+ result = IDirectDraw7_WaitForVerticalBlank(ddraw, DDWAITVB_BLOCKBEGIN, NULL);
+ if (result != DD_OK) osd_printf_verbose("DirectDraw: Error %08X waiting for VBLANK\n", (int)result);
+ }
+
+ // complete the blitting
+ blit_to_primary(blitwidth, blitheight);
+ return 0;
+}
+
+
+
+//============================================================
+// ddraw_create
+//============================================================
+
+int renderer_dd::ddraw_create()
+{
+ HRESULT result;
+ int verify;
+
+ // if a device exists, free it
+ if (ddraw != NULL)
+ ddraw_delete();
+
+ // create the DirectDraw object
+ result = (*directdrawcreateex)(adapter_ptr, (LPVOID *)&ddraw, WRAP_REFIID(IID_IDirectDraw7), NULL);
+ if (result != DD_OK)
+ {
+ osd_printf_verbose("DirectDraw: Error %08X during DirectDrawCreateEx call\n", (int)result);
+ goto error;
+ }
+
+ // verify the caps
+ verify = ddraw_verify_caps();
+ if (verify == 2)
+ {
+ osd_printf_error("DirectDraw: Error - Device does not meet minimum requirements for DirectDraw rendering\n");
+ goto error;
+ }
+ if (verify == 1)
+ osd_printf_verbose("DirectDraw: Warning - Device may not perform well for DirectDraw rendering\n");
+
+ // set the cooperative level
+ // for non-window modes, we will use full screen here
+ result = IDirectDraw7_SetCooperativeLevel(ddraw, win_window_list->m_hwnd, DDSCL_SETFOCUSWINDOW);
+ if (result != DD_OK)
+ {
+ osd_printf_verbose("DirectDraw: Error %08X during IDirectDraw7_SetCooperativeLevel(FOCUSWINDOW) call\n", (int)result);
+ goto error;
+ }
+ result = IDirectDraw7_SetCooperativeLevel(ddraw, window().m_hwnd, DDSCL_SETDEVICEWINDOW | (window().fullscreen() ? DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE : DDSCL_NORMAL));
+ if (result != DD_OK)
+ {
+ osd_printf_verbose("DirectDraw: Error %08X during IDirectDraw7_SetCooperativeLevel(DEVICEWINDOW) call\n", (int)result);
+ goto error;
+ }
+
+ // full screen mode: set the resolution
+ if (window().fullscreen() && video_config.switchres)
+ {
+ result = IDirectDraw7_SetDisplayMode(ddraw, width, height, 32, refresh, 0);
+ if (result != DD_OK)
+ {
+ osd_printf_verbose("DirectDraw: Error %08X attempting to set video mode %dx%d@%d call\n", (int)result, width, height, refresh);
+ goto error;
+ }
+ }
+
+ return ddraw_create_surfaces();
+
+error:
+ ddraw_delete();
+ return 1;
+}
+
+
+
+//============================================================
+// ddraw_create_surfaces
+//============================================================
+
+int renderer_dd::ddraw_create_surfaces()
+{
+ HRESULT result;
+
+ // make a description of the primary surface
+ memset(&primarydesc, 0, sizeof(primarydesc));
+ primarydesc.dwSize = sizeof(primarydesc);
+ primarydesc.dwFlags = DDSD_CAPS;
+ primarydesc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
+
+ // for triple-buffered full screen mode, allocate flipping surfaces
+ if (window().fullscreen() && video_config.triplebuf)
+ {
+ primarydesc.dwFlags |= DDSD_BACKBUFFERCOUNT;
+ primarydesc.ddsCaps.dwCaps |= DDSCAPS_FLIP | DDSCAPS_COMPLEX;
+ primarydesc.dwBackBufferCount = 2;
+ }
+
+ // create the primary surface and report errors
+ result = create_surface(&primarydesc, &primary, "primary");
+ if (result != DD_OK) goto error;
+
+ // full screen mode: get the back surface
+ back = NULL;
+ if (window().fullscreen() && video_config.triplebuf)
+ {
+ DDSCAPS2 caps = { DDSCAPS_BACKBUFFER };
+ result = IDirectDrawSurface7_GetAttachedSurface(primary, &caps, &back);
+ if (result != DD_OK)
+ {
+ osd_printf_verbose("DirectDraw: Error %08X getting attached back surface\n", (int)result);
+ goto error;
+ }
+ }
+
+ // now make a description of our blit surface, based on the primary surface
+ if (blitwidth == 0 || blitheight == 0)
+ compute_blit_surface_size();
+ blitdesc = primarydesc;
+ blitdesc.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT | DDSD_CAPS;
+ blitdesc.dwWidth = blitwidth;
+ blitdesc.dwHeight = blitheight;
+ blitdesc.ddsCaps.dwCaps = DDSCAPS_VIDEOMEMORY;
+
+ // then create the blit surface, fall back to system memory if video mem doesn't work
+ result = create_surface(&blitdesc, &blit, "blit");
+ if (result != DD_OK)
+ {
+ blitdesc.ddsCaps.dwCaps = DDSCAPS_SYSTEMMEMORY;
+ result = create_surface(&blitdesc, &blit, "blit");
+ }
+ if (result != DD_OK) goto error;
+
+ // create a memory buffer for offscreen drawing
+ if (membuffersize < blitwidth * blitheight * 4)
+ {
+ membuffersize = blitwidth * blitheight * 4;
+ global_free_array(membuffer);
+ membuffer = global_alloc_array(UINT8, membuffersize);
+ }
+ if (membuffer == NULL)
+ goto error;
+
+ // create a clipper for windowed mode
+ if (!window().fullscreen() && create_clipper())
+ goto error;
+
+ // full screen mode: set the gamma
+ if (window().fullscreen())
+ {
+ // only set the gamma if it's not 1.0f
+ windows_options &options = downcast<windows_options &>(window().machine().options());
+ float brightness = options.full_screen_brightness();
+ float contrast = options.full_screen_contrast();
+ float fgamma = options.full_screen_gamma();
+ if (brightness != 1.0f || contrast != 1.0f || fgamma != 1.0f)
+ {
+ // see if we can get a GammaControl object
+ result = IDirectDrawSurface_QueryInterface(primary, WRAP_REFIID(IID_IDirectDrawGammaControl), (void **)&gamma);
+ if (result != DD_OK)
+ {
+ osd_printf_warning("DirectDraw: Warning - device does not support full screen gamma correction.\n");
+ this->gamma = NULL;
+ }
+
+ // proceed if we can
+ if (this->gamma != NULL)
+ {
+ DDGAMMARAMP ramp;
+ int i;
+
+ // create a standard ramp and set it
+ for (i = 0; i < 256; i++)
+ ramp.red[i] = ramp.green[i] = ramp.blue[i] = apply_brightness_contrast_gamma(i, brightness, contrast, fgamma) << 8;
+
+ // attempt to set it
+ result = IDirectDrawGammaControl_SetGammaRamp(this->gamma, 0, &ramp);
+ if (result != DD_OK)
+ osd_printf_verbose("DirectDraw: Error %08X attempting to set gamma correction.\n", (int)result);
+ }
+ }
+ }
+
+ // force some updates
+ update_outer_rects();
+ return 0;
+
+error:
+ ddraw_delete_surfaces();
+ return 1;
+}
+
+
+
+//============================================================
+// ddraw_delete
+//============================================================
+
+void renderer_dd::ddraw_delete()
+{
+ // free surfaces
+ ddraw_delete_surfaces();
+
+ // restore resolutions
+ if (ddraw != NULL)
+ IDirectDraw7_RestoreDisplayMode(ddraw);
+
+ // reset cooperative level
+ if (ddraw != NULL && window().m_hwnd != NULL)
+ IDirectDraw7_SetCooperativeLevel(ddraw, window().m_hwnd, DDSCL_NORMAL);
+
+ // release the DirectDraw object itself
+ if (ddraw != NULL)
+ IDirectDraw7_Release(ddraw);
+ ddraw = NULL;
+}
+
+
+
+//============================================================
+// ddraw_delete_surfaces
+//============================================================
+
+void renderer_dd::ddraw_delete_surfaces()
+{
+ // release the gamma control
+ if (gamma != NULL)
+ IDirectDrawGammaControl_Release(gamma);
+ gamma = NULL;
+
+ // release the clipper
+ if (clipper != NULL)
+ IDirectDrawClipper_Release(clipper);
+ clipper = NULL;
+
+ // free the memory buffer
+ global_free_array(membuffer);
+ membuffer = NULL;
+ membuffersize = 0;
+
+ // release the blit surface
+ if (blit != NULL)
+ IDirectDrawSurface7_Release(blit);
+ blit = NULL;
+
+ // release the back surface
+ if (back != NULL)
+ IDirectDrawSurface7_Release(back);
+ back = NULL;
+
+ // release the primary surface
+ if (primary != NULL)
+ IDirectDrawSurface7_Release(primary);
+ primary = NULL;
+}
+
+
+
+//============================================================
+// ddraw_verify_caps
+//============================================================
+
+int renderer_dd::ddraw_verify_caps()
+{
+ int retval = 0;
+ HRESULT result;
+
+ // get the capabilities
+ ddcaps.dwSize = sizeof(ddcaps);
+ helcaps.dwSize = sizeof(helcaps);
+ result = IDirectDraw7_GetCaps(ddraw, &ddcaps, &helcaps);
+ if (result != DD_OK)
+ {
+ osd_printf_verbose("DirectDraw: Error %08X during IDirectDraw7_GetCaps call\n", (int)result);
+ return 1;
+ }
+
+ // determine if hardware stretching is available
+ if ((ddcaps.dwCaps & DDCAPS_BLTSTRETCH) == 0)
+ {
+ osd_printf_verbose("DirectDraw: Warning - Device does not support hardware stretching\n");
+ retval = 1;
+ }
+
+ return retval;
+}
+
+
+
+//============================================================
+// ddraw_test_cooperative
+//============================================================
+
+int renderer_dd::ddraw_test_cooperative()
+{
+ HRESULT result;
+
+ // check our current status; if we lost the device, punt to GDI
+ result = IDirectDraw7_TestCooperativeLevel(ddraw);
+ switch (result)
+ {
+ // punt to GDI if someone else has exclusive mode
+ case DDERR_NOEXCLUSIVEMODE:
+ case DDERR_EXCLUSIVEMODEALREADYSET:
+ ddraw_delete_surfaces();
+ return 1;
+
+ // if we're ok, but we don't have a primary surface, create one
+ default:
+ case DD_OK:
+ if (primary == NULL)
+ return ddraw_create_surfaces();
+ return 0;
+ }
+}
+
+
+
+//============================================================
+// create_surface
+//============================================================
+
+HRESULT renderer_dd::create_surface(DDSURFACEDESC2 *desc, IDirectDrawSurface7 **surface, const char *type)
+{
+ HRESULT result;
+
+ // create the surface as requested
+ result = IDirectDraw7_CreateSurface(ddraw, desc, surface, NULL);
+ if (result != DD_OK)
+ {
+ osd_printf_verbose("DirectDraw: Error %08X creating %s surface\n", (int)result, type);
+ return result;
+ }
+
+ // get a description of the primary surface
+ result = IDirectDrawSurface7_GetSurfaceDesc(*surface, desc);
+ if (result != DD_OK)
+ {
+ osd_printf_verbose("DirectDraw: Error %08X getting %s surface desciption\n", (int)result, type);
+ IDirectDrawSurface7_Release(*surface);
+ *surface = NULL;
+ return result;
+ }
+
+ // print out the good stuff
+ osd_printf_verbose("DirectDraw: %s surface created: %dx%dx%d (R=%08X G=%08X B=%08X)\n",
+ type,
+ (int)desc->dwWidth,
+ (int)desc->dwHeight,
+ (int)desc->ddpfPixelFormat.dwRGBBitCount,
+ (UINT32)desc->ddpfPixelFormat.dwRBitMask,
+ (UINT32)desc->ddpfPixelFormat.dwGBitMask,
+ (UINT32)desc->ddpfPixelFormat.dwBBitMask);
+ return result;
+}
+
+
+
+//============================================================
+// create_clipper
+//============================================================
+
+int renderer_dd::create_clipper()
+{
+ HRESULT result;
+
+ // create a clipper for the primary surface
+ result = IDirectDraw7_CreateClipper(ddraw, 0, &clipper, NULL);
+ if (result != DD_OK)
+ {
+ osd_printf_verbose("DirectDraw: Error %08X creating clipper\n", (int)result);
+ return 1;
+ }
+
+ // set the clipper's hwnd
+ result = IDirectDrawClipper_SetHWnd(clipper, 0, window().m_hwnd);
+ if (result != DD_OK)
+ {
+ osd_printf_verbose("DirectDraw: Error %08X setting clipper hwnd\n", (int)result);
+ return 1;
+ }
+
+ // set the clipper on the primary surface
+ result = IDirectDrawSurface7_SetClipper(primary, clipper);
+ if (result != DD_OK)
+ {
+ osd_printf_verbose("DirectDraw: Error %08X setting clipper on primary surface\n", (int)result);
+ return 1;
+ }
+ return 0;
+}
+
+
+
+//============================================================
+// compute_blit_surface_size
+//============================================================
+
+void renderer_dd::compute_blit_surface_size()
+{
+ INT32 newwidth, newheight;
+ int xscale, yscale;
+ RECT client;
+
+ // start with the minimum size
+ window().target()->compute_minimum_size(newwidth, newheight);
+
+ // get the window's client rectangle
+ GetClientRect(window().m_hwnd, &client);
+
+ // hardware stretch case: apply prescale
+ if (video_config.hwstretch)
+ {
+ int prescale = (window().prescale() < 1) ? 1 : window().prescale();
+
+ // clamp the prescale to something smaller than the target bounds
+ xscale = prescale;
+ while (xscale > 1 && newwidth * xscale > rect_width(&client))
+ xscale--;
+ yscale = prescale;
+ while (yscale > 1 && newheight * yscale > rect_height(&client))
+ yscale--;
+ }
+
+ // non stretch case
+ else
+ {
+ INT32 target_width = rect_width(&client);
+ INT32 target_height = rect_height(&client);
+ float desired_aspect = 1.0f;
+
+ // compute the appropriate visible area if we're trying to keepaspect
+ if (video_config.keepaspect)
+ {
+ osd_monitor_info *monitor = window().winwindow_video_window_monitor(NULL);
+ window().target()->compute_visible_area(target_width, target_height, monitor->aspect(), window().target()->orientation(), target_width, target_height);
+ desired_aspect = (float)target_width / (float)target_height;
+ }
+
+ // compute maximum integral scaling to fit the window
+ xscale = (target_width + 2) / newwidth;
+ yscale = (target_height + 2) / newheight;
+
+ // try a little harder to keep the aspect ratio if desired
+ if (video_config.keepaspect)
+ {
+ // if we could stretch more in the X direction, and that makes a better fit, bump the xscale
+ while (newwidth * (xscale + 1) <= rect_width(&client) &&
+ better_mode(newwidth * xscale, newheight * yscale, newwidth * (xscale + 1), newheight * yscale, desired_aspect))
+ xscale++;
+
+ // if we could stretch more in the Y direction, and that makes a better fit, bump the yscale
+ while (newheight * (yscale + 1) <= rect_height(&client) &&
+ better_mode(newwidth * xscale, newheight * yscale, newwidth * xscale, newheight * (yscale + 1), desired_aspect))
+ yscale++;
+
+ // now that we've maxed out, see if backing off the maximally stretched one makes a better fit
+ if (rect_width(&client) - newwidth * xscale < rect_height(&client) - newheight * yscale)
+ {
+ while (xscale > 1 && better_mode(newwidth * xscale, newheight * yscale, newwidth * (xscale - 1), newheight * yscale, desired_aspect))
+ xscale--;
+ }
+ else
+ {
+ while (yscale > 1 && better_mode(newwidth * xscale, newheight * yscale, newwidth * xscale, newheight * (yscale - 1), desired_aspect))
+ yscale--;
+ }
+ }
+ }
+
+ // ensure at least a scale factor of 1
+ if (xscale == 0) xscale = 1;
+ if (yscale == 0) yscale = 1;
+
+ // apply the final scale
+ newwidth *= xscale;
+ newheight *= yscale;
+ if (newwidth != blitwidth || newheight != blitheight)
+ {
+ // force some updates
+ update_outer_rects();
+ osd_printf_verbose("DirectDraw: New blit size = %dx%d\n", newwidth, newheight);
+ }
+ blitwidth = newwidth;
+ blitheight = newheight;
+}
+
+
+
+//============================================================
+// calc_fullscreen_margins
+//============================================================
+
+void renderer_dd::calc_fullscreen_margins(DWORD desc_width, DWORD desc_height, RECT *margins)
+{
+ margins->left = 0;
+ margins->top = 0;
+ margins->right = desc_width;
+ margins->bottom = desc_height;
+
+ if (window().win_has_menu())
+ {
+ static int height_with_menubar = 0;
+ if (height_with_menubar == 0)
+ {
+ RECT with_menu = { 100, 100, 200, 200 };
+ RECT without_menu = { 100, 100, 200, 200 };
+ AdjustWindowRect(&with_menu, WS_OVERLAPPED, TRUE);
+ AdjustWindowRect(&without_menu, WS_OVERLAPPED, FALSE);
+ height_with_menubar = (with_menu.bottom - with_menu.top) - (without_menu.bottom - without_menu.top);
+ }
+ margins->top = height_with_menubar;
+ }
+}
+
+
+
+//============================================================
+// blit_to_primary
+//============================================================
+
+void renderer_dd::blit_to_primary(int srcwidth, int srcheight)
+{
+ IDirectDrawSurface7 *target = (back != NULL) ? back : primary;
+ osd_monitor_info *monitor = window().winwindow_video_window_monitor(NULL);
+ DDBLTFX blitfx = { sizeof(DDBLTFX) };
+ RECT clear, outer, dest, source;
+ INT32 dstwidth, dstheight;
+ HRESULT result;
+
+ // compute source rect
+ source.left = source.top = 0;
+ source.right = srcwidth;
+ source.bottom = srcheight;
+
+ // compute outer rect -- windowed version
+ if (!window().fullscreen())
+ {
+ GetClientRect(window().m_hwnd, &outer);
+ ClientToScreen(window().m_hwnd, &((LPPOINT)&outer)[0]);
+ ClientToScreen(window().m_hwnd, &((LPPOINT)&outer)[1]);
+
+ // adjust to be relative to the monitor
+ osd_rect pos = monitor->position_size();
+ outer.left -= pos.left();
+ outer.right -= pos.left();
+ outer.top -= pos.top();
+ outer.bottom -= pos.top();
+ }
+
+ // compute outer rect -- full screen version
+ else
+ {
+ calc_fullscreen_margins(primarydesc.dwWidth, primarydesc.dwHeight, &outer);
+ }
+
+ // if we're respecting the aspect ratio, we need to adjust to fit
+ dstwidth = rect_width(&outer);
+ dstheight = rect_height(&outer);
+ if (!video_config.hwstretch)
+ {
+ // trim the source if necessary
+ if (rect_width(&outer) < srcwidth)
+ {
+ source.left += (srcwidth - rect_width(&outer)) / 2;
+ source.right = source.left + rect_width(&outer);
+ }
+ if (rect_height(&outer) < srcheight)
+ {
+ source.top += (srcheight - rect_height(&outer)) / 2;
+ source.bottom = source.top + rect_height(&outer);
+ }
+
+ // match the destination and source sizes
+ dstwidth = srcwidth = source.right - source.left;
+ dstheight = srcheight = source.bottom - source.top;
+ }
+ else if (video_config.keepaspect)
+ {
+ // compute the appropriate visible area
+ window().target()->compute_visible_area(rect_width(&outer), rect_height(&outer), monitor->aspect(), window().target()->orientation(), dstwidth, dstheight);
+ }
+
+ // center within
+ dest.left = outer.left + (rect_width(&outer) - dstwidth) / 2;
+ dest.right = dest.left + dstwidth;
+ dest.top = outer.top + (rect_height(&outer) - dstheight) / 2;
+ dest.bottom = dest.top + dstheight;
+
+ // compare against last destination; if different, force a redraw
+ if (dest.left != lastdest.left || dest.right != lastdest.right || dest.top != lastdest.top || dest.bottom != lastdest.bottom)
+ {
+ lastdest = dest;
+ update_outer_rects();
+ }
+
+ // clear outer rects if we need to
+ if (clearouter != 0)
+ {
+ clearouter--;
+
+ // clear the left edge
+ if (dest.left > outer.left)
+ {
+ clear = outer;
+ clear.right = dest.left;
+ result = IDirectDrawSurface_Blt(target, &clear, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &blitfx);
+ if (result != DD_OK) osd_printf_verbose("DirectDraw: Error %08X clearing the screen\n", (int)result);
+ }
+
+ // clear the right edge
+ if (dest.right < outer.right)
+ {
+ clear = outer;
+ clear.left = dest.right;
+ result = IDirectDrawSurface_Blt(target, &clear, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &blitfx);
+ if (result != DD_OK) osd_printf_verbose("DirectDraw: Error %08X clearing the screen\n", (int)result);
+ }
+
+ // clear the top edge
+ if (dest.top > outer.top)
+ {
+ clear = outer;
+ clear.bottom = dest.top;
+ result = IDirectDrawSurface_Blt(target, &clear, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &blitfx);
+ if (result != DD_OK) osd_printf_verbose("DirectDraw: Error %08X clearing the screen\n", (int)result);
+ }
+
+ // clear the bottom edge
+ if (dest.bottom < outer.bottom)
+ {
+ clear = outer;
+ clear.top = dest.bottom;
+ result = IDirectDrawSurface_Blt(target, &clear, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &blitfx);
+ if (result != DD_OK) osd_printf_verbose("DirectDraw: Error %08X clearing the screen\n", (int)result);
+ }
+ }
+
+ // do the blit
+ result = IDirectDrawSurface7_Blt(target, &dest, blit, &source, DDBLT_WAIT, NULL);
+ if (result != DD_OK) osd_printf_verbose("DirectDraw: Error %08X blitting to the screen\n", (int)result);
+
+ // page flip if triple buffered
+ if (window().fullscreen() && back != NULL)
+ {
+ result = IDirectDrawSurface7_Flip(primary, NULL, DDFLIP_WAIT);
+ if (result != DD_OK) osd_printf_verbose("DirectDraw: Error %08X waiting for VBLANK\n", (int)result);
+ }
+}
+
+
+
+//============================================================
+// config_adapter_mode
+//============================================================
+
+int renderer_dd::config_adapter_mode()
+{
+ DDDEVICEIDENTIFIER2 identifier;
+ HRESULT result;
+
+ // choose the monitor number
+ get_adapter_for_monitor(window().monitor());
+
+ // create a temporary DirectDraw object
+ result = (*directdrawcreateex)(adapter_ptr, (LPVOID *)&ddraw, WRAP_REFIID(IID_IDirectDraw7), NULL);
+ if (result != DD_OK)
+ {
+ osd_printf_verbose("DirectDraw: Error %08X during DirectDrawCreateEx call\n", (int)result);
+ return 1;
+ }
+
+ // get the identifier
+ result = IDirectDraw7_GetDeviceIdentifier(ddraw, &identifier, 0);
+ if (result != DD_OK)
+ {
+ osd_printf_error("Error getting identifier for device\n");
+ return 1;
+ }
+ osd_printf_verbose("DirectDraw: Configuring device %s\n", identifier.szDescription);
+
+ // get the current display mode
+ memset(&origmode, 0, sizeof(origmode));
+ origmode.dwSize = sizeof(origmode);
+ result = IDirectDraw7_GetDisplayMode(ddraw, &origmode);
+ if (result != DD_OK)
+ {
+ osd_printf_verbose("DirectDraw: Error %08X getting current display mode\n", (int)result);
+ IDirectDraw7_Release(ddraw);
+ return 1;
+ }
+
+ // choose a resolution: full screen mode case
+ if (window().fullscreen())
+ {
+ // default to the current mode exactly
+ width = origmode.dwWidth;
+ height = origmode.dwHeight;
+ refresh = origmode.dwRefreshRate;
+
+ // if we're allowed to switch resolutions, override with something better
+ if (video_config.switchres)
+ pick_best_mode();
+ }
+
+ // release the DirectDraw object
+ IDirectDraw7_Release(ddraw);
+ ddraw = NULL;
+
+ // if we're not changing resolutions, make sure we have a resolution we can handle
+ if (!window().fullscreen() || !video_config.switchres)
+ {
+ switch (origmode.ddpfPixelFormat.dwRBitMask)
+ {
+ case 0x00ff0000:
+ case 0x000000ff:
+ case 0xf800:
+ case 0x7c00:
+ break;
+
+ default:
+ osd_printf_verbose("DirectDraw: Unknown target mode: R=%08X G=%08X B=%08X\n", (int)origmode.ddpfPixelFormat.dwRBitMask, (int)origmode.ddpfPixelFormat.dwGBitMask, (int)origmode.ddpfPixelFormat.dwBBitMask);
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
+
+
+//============================================================
+// monitor_enum_callback
+//============================================================
+
+static BOOL WINAPI monitor_enum_callback(GUID FAR *guid, LPSTR description, LPSTR name, LPVOID context, HMONITOR hmonitor)
+{
+ monitor_enum_info *einfo = (monitor_enum_info *)context;
+
+ // do we match the desired monitor?
+ if (hmonitor == *((HMONITOR *)einfo->monitor->oshandle()) || (hmonitor == NULL && einfo->monitor->is_primary()))
+ {
+ einfo->guid_ptr = (guid != NULL) ? &einfo->guid : NULL;
+ if (guid != NULL)
+ einfo->guid = *guid;
+ einfo->foundit = TRUE;
+ }
+ return 1;
+}
+
+
+
+//============================================================
+// get_adapter_for_monitor
+//============================================================
+
+void renderer_dd::get_adapter_for_monitor(osd_monitor_info *monitor)
+{
+ monitor_enum_info einfo;
+ HRESULT result;
+
+ // try to find our monitor
+ memset(&einfo, 0, sizeof(einfo));
+ einfo.monitor = monitor;
+ result = (*directdrawenumerateex)(monitor_enum_callback, &einfo, DDENUM_ATTACHEDSECONDARYDEVICES);
+ if (result != DD_OK) osd_printf_verbose("DirectDraw: Error %08X during DirectDrawEnumerateEx call\n", (int)result);
+
+ // set up the adapter
+ if (einfo.foundit && einfo.guid_ptr != NULL)
+ {
+ adapter = einfo.guid;
+ adapter_ptr = &adapter;
+ }
+ else
+ adapter_ptr = NULL;
+}
+
+
+
+//============================================================
+// enum_modes_callback
+//============================================================
+
+static HRESULT WINAPI enum_modes_callback(LPDDSURFACEDESC2 desc, LPVOID context)
+{
+ float size_score, refresh_score, final_score;
+ mode_enum_info *einfo = (mode_enum_info *)context;
+ renderer_dd *dd = einfo->renderer;
+
+ // skip non-32 bit modes
+ if (desc->ddpfPixelFormat.dwRGBBitCount != 32)
+ return DDENUMRET_OK;
+
+ // compute initial score based on difference between target and current
+ size_score = 1.0f / (1.0f + fabs((float)((INT32)desc->dwWidth - einfo->target_width)) + fabs((float)((INT32)desc->dwHeight - einfo->target_height)));
+
+ // if the mode is too small, give a big penalty
+ if (desc->dwWidth < einfo->minimum_width || desc->dwHeight < einfo->minimum_height)
+ size_score *= 0.01f;
+
+ // if mode is smaller than we'd like, it only scores up to 0.1
+ if (desc->dwWidth < einfo->target_width || desc->dwHeight < einfo->target_height)
+ size_score *= 0.1f;
+
+ // if we're looking for a particular mode, that's a winner
+ if (desc->dwWidth == einfo->window->m_win_config.width && desc->dwHeight == einfo->window->m_win_config.height)
+ size_score = 2.0f;
+
+ // compute refresh score
+ refresh_score = 1.0f / (1.0f + fabs((double)desc->dwRefreshRate - einfo->target_refresh));
+
+ // if refresh is smaller than we'd like, it only scores up to 0.1
+ if ((double)desc->dwRefreshRate < einfo->target_refresh)
+ refresh_score *= 0.1f;
+
+ // if we're looking for a particular refresh, make sure it matches
+ if (desc->dwRefreshRate == einfo->window->m_win_config.refresh)
+ refresh_score = 2.0f;
+
+ // weight size and refresh equally
+ final_score = size_score + refresh_score;
+
+ // best so far?
+ osd_printf_verbose(" %4dx%4d@%3dHz -> %f\n", (int)desc->dwWidth, (int)desc->dwHeight, (int)desc->dwRefreshRate, final_score * 1000.0f);
+ if (final_score > einfo->best_score)
+ {
+ einfo->best_score = final_score;
+ dd->width = desc->dwWidth;
+ dd->height = desc->dwHeight;
+ dd->refresh = desc->dwRefreshRate;
+ }
+ return DDENUMRET_OK;
+}
+
+
+
+//============================================================
+// pick_best_mode
+//============================================================
+
+void renderer_dd::pick_best_mode()
+{
+ mode_enum_info einfo;
+ HRESULT result;
+
+ // determine the minimum width/height for the selected target
+ // note: technically we should not be calling this from an alternate window
+ // thread; however, it is only done during init time, and the init code on
+ // the main thread is waiting for us to finish, so it is safe to do so here
+ window().target()->compute_minimum_size(einfo.minimum_width, einfo.minimum_height);
+
+ // use those as the target for now
+ einfo.target_width = einfo.minimum_width * MAX(1, window().prescale());
+ einfo.target_height = einfo.minimum_height * MAX(1, window().prescale());
+
+ // determine the refresh rate of the primary screen
+ einfo.target_refresh = 60.0;
+ const screen_device *primary_screen = window().machine().config().first_screen();
+ if (primary_screen != NULL)
+ einfo.target_refresh = ATTOSECONDS_TO_HZ(primary_screen->refresh_attoseconds());
+ printf("Target refresh = %f\n", einfo.target_refresh);
+
+ // if we're not stretching, allow some slop on the minimum since we can handle it
+ if (!video_config.hwstretch)
+ {
+ einfo.minimum_width -= 4;
+ einfo.minimum_height -= 4;
+ }
+
+ // if we are stretching, aim for a mode approximately 2x the game's resolution
+ else if (window().prescale() <= 1)
+ {
+ einfo.target_width *= 2;
+ einfo.target_height *= 2;
+ }
+
+ // fill in the rest of the data
+ einfo.window = &window();
+ einfo.renderer = this;
+ einfo.best_score = 0.0f;
+
+ // enumerate the modes
+ osd_printf_verbose("DirectDraw: Selecting video mode...\n");
+ result = IDirectDraw7_EnumDisplayModes(ddraw, DDEDM_REFRESHRATES, NULL, &einfo, enum_modes_callback);
+ if (result != DD_OK) osd_printf_verbose("DirectDraw: Error %08X during EnumDisplayModes call\n", (int)result);
+ osd_printf_verbose("DirectDraw: Mode selected = %4dx%4d@%3dHz\n", width, height, refresh);
+}
diff --git a/src/osd/modules/render/drawogl.cpp b/src/osd/modules/render/drawogl.cpp
index 728b0810290..4a2744e4068 100644
--- a/src/osd/modules/render/drawogl.cpp
+++ b/src/osd/modules/render/drawogl.cpp
@@ -30,6 +30,10 @@
#include "modules/lib/osdlib.h"
#include "modules/lib/osdobj_common.h"
+#if defined(OSD_WINDOWS) && !defined(SDLMAME_SDL2)
+#define SDLMAME_SDL2 0
+#endif
+
// OpenGL headers
#include "modules/opengl/osd_opengl.h"
@@ -340,7 +344,7 @@ private:
HMODULE win_gl_context::m_module;
-#else
+#elif SDLMAME_SDL2
class sdl_gl_context : public osd_gl_context
{
@@ -391,6 +395,51 @@ private:
char m_error[256];
};
+#else
+// SDL 1.2
+class sdl12_gl_context : public osd_gl_context
+{
+public:
+ sdl12_gl_context(SDL_Surface *window) : osd_gl_context(), m_window(window)
+ {
+ m_error[0] = 0;
+ }
+ virtual ~sdl12_gl_context()
+ {
+ }
+ virtual void MakeCurrent()
+ {
+ }
+
+ virtual int SetSwapInterval(const int swap)
+ {
+ // Not supported on 1.2
+ return 0;
+ }
+
+ virtual const char *LastErrorMsg()
+ {
+ if (m_error[0] == 0)
+ return NULL;
+ else
+ return m_error;
+ }
+
+ virtual void *getProcAddress(const char *proc)
+ {
+ return SDL_GL_GetProcAddress(proc);
+ }
+
+ virtual void SwapBuffer()
+ {
+ SDL_GL_SwapBuffers();
+ }
+
+private:
+ SDL_Surface *m_window;
+ char m_error[256];
+};
+
#endif
//============================================================
@@ -717,8 +766,10 @@ int drawogl_init(running_machine &machine, osd_draw_callbacks *callbacks)
load_gl_lib(machine);
#if defined(OSD_WINDOWS)
osd_printf_verbose("Using Windows OpenGL driver\n");
-#else
+#elif SDLMAME_SDL2
osd_printf_verbose("Using SDL multi-window OpenGL driver (SDL 2.0+)\n");
+#else
+ osd_printf_verbose("Using SDL single-window OpenGL driver (SDL 1.2)\n");
#endif
return 0;
@@ -984,8 +1035,10 @@ int sdl_info_ogl::create()
// create renderer
#if defined(OSD_WINDOWS)
m_gl_context = global_alloc(win_gl_context(window().m_hwnd));
-#else
+#elif SDLMAME_SDL2
m_gl_context = global_alloc(sdl_gl_context(window().sdl_window()));
+#else
+ m_gl_context = global_alloc(sdl12_gl_context(window().sdl_surface()));
#endif
if (m_gl_context->LastErrorMsg() != NULL)
{
@@ -1477,9 +1530,11 @@ int sdl_info_ogl::draw(const int update)
if (m_init_context)
{
// do some one-time OpenGL setup
+#if SDLMAME_SDL2
// FIXME: SRGB conversion is working on SDL2, may be of use
// when we eventually target gamma and monitor profiles.
//glEnable(GL_FRAMEBUFFER_SRGB);
+#endif
glShadeModel(GL_SMOOTH);
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
glClearDepth(1.0f);
@@ -1505,6 +1560,11 @@ int sdl_info_ogl::draw(const int update)
loadGLExtensions();
}
+#if !defined(OSD_WINDOWS) && !SDLMAME_SDL2
+ // force all textures to be regenerated
+ destroy_all_textures();
+#endif
+
m_surf_w = m_width;
m_surf_h = m_height;
diff --git a/src/osd/modules/render/drawsdl.cpp b/src/osd/modules/render/drawsdl.cpp
index b9a40038082..221ac79ef4d 100644
--- a/src/osd/modules/render/drawsdl.cpp
+++ b/src/osd/modules/render/drawsdl.cpp
@@ -40,9 +40,11 @@
struct sdl_scale_mode;
+#if (SDLMAME_SDL2)
#define DRAW2_SCALEMODE_NEAREST "0"
#define DRAW2_SCALEMODE_LINEAR "1"
#define DRAW2_SCALEMODE_BEST "2"
+#endif
/* sdl_info is the information about SDL for the current screen */
class sdl_info : public osd_renderer
@@ -51,8 +53,12 @@ public:
sdl_info(osd_window *w, int extra_flags)
: osd_renderer(w, extra_flags),
+ #if (SDLMAME_SDL2)
m_sdl_renderer(NULL),
m_texture_id(NULL),
+ #else
+ m_yuvsurf(NULL),
+ #endif
m_yuv_lookup(NULL),
m_yuv_bitmap(NULL),
//m_hw_scale_width(0),
@@ -82,14 +88,24 @@ public:
private:
void destroy_all_textures();
void yuv_init();
+#if (SDLMAME_SDL2)
void setup_texture(const osd_dim &size);
+#endif
void yuv_lookup_set(unsigned int pen, unsigned char red,
unsigned char green, unsigned char blue);
+#if (!SDLMAME_SDL2)
+ void yuv_overlay_init();
+#endif
+
INT32 m_blittimer;
+#if (SDLMAME_SDL2)
SDL_Renderer *m_sdl_renderer;
SDL_Texture *m_texture_id;
+#else
+ SDL_Overlay *m_yuvsurf;
+#endif
// YUV overlay
UINT32 *m_yuv_lookup;
@@ -111,7 +127,11 @@ struct sdl_scale_mode
int is_yuv; /* Yuv mode? */
int mult_w; /* Width multiplier */
int mult_h; /* Height multiplier */
+#if (!SDLMAME_SDL2)
+ int m_extra_flags; /* Texture/surface flags */
+#else
const char *sdl_scale_mode_hint; /* what to use as a hint ? */
+#endif
int pixel_format; /* Pixel/Overlay format */
void (*yuv_blit)(const UINT16 *bitmap, UINT8 *ptr, const int pitch, const UINT32 *lookup, const int width, const int height);
};
@@ -140,6 +160,20 @@ static void yuv_RGB_to_YUY2X2(const UINT16 *bitmap, UINT8 *ptr, const int pitch,
// Static declarations
+#if (!SDLMAME_SDL2)
+static int shown_video_info = 0;
+
+static const sdl_scale_mode scale_modes[] =
+{
+ { "none", 0, 0, 1, 1, osd_renderer::FLAG_NEEDS_DOUBLEBUF, 0, 0 },
+ { "async", 0, 0, 1, 1, osd_renderer::FLAG_NEEDS_DOUBLEBUF | osd_renderer::FLAG_NEEDS_ASYNCBLIT, 0, 0 },
+ { "yv12", 1, 1, 1, 1, 0, SDL_YV12_OVERLAY, yuv_RGB_to_YV12 },
+ { "yv12x2", 1, 1, 2, 2, 0, SDL_YV12_OVERLAY, yuv_RGB_to_YV12X2 },
+ { "yuy2", 1, 1, 1, 1, 0, SDL_YUY2_OVERLAY, yuv_RGB_to_YUY2 },
+ { "yuy2x2", 1, 1, 2, 1, 0, SDL_YUY2_OVERLAY, yuv_RGB_to_YUY2X2 },
+ { NULL }
+};
+#else
static const sdl_scale_mode scale_modes[] =
{
{ "none", 0, 0, 1, 1, DRAW2_SCALEMODE_NEAREST, 0, 0 },
@@ -152,6 +186,7 @@ static const sdl_scale_mode scale_modes[] =
{ "yuy2x2", 1, 1, 2, 1, DRAW2_SCALEMODE_BEST, SDL_PIXELFORMAT_YUY2, yuv_RGB_to_YUY2X2 },
{ NULL }
};
+#endif
//============================================================
// drawsdl_scale_mode
@@ -191,7 +226,12 @@ int drawsdl_scale_mode(const char *s)
static osd_renderer *drawsdl_create(osd_window *window)
{
// FIXME: QUALITY HINTS
+#if (SDLMAME_SDL2)
return global_alloc(sdl_info(window, osd_renderer::FLAG_NONE));
+#else
+ const sdl_scale_mode *sm = &scale_modes[video_config.scale_mode];
+ return global_alloc(sdl_info(window, sm->m_extra_flags));
+#endif
}
//============================================================
@@ -204,7 +244,11 @@ int drawsdl_init(osd_draw_callbacks *callbacks)
callbacks->create = drawsdl_create;
callbacks->exit = drawsdl_exit;
- osd_printf_verbose("Using SDL multi-window soft driver (SDL 2.0+)\n");
+ if (SDLMAME_SDL2)
+ osd_printf_verbose("Using SDL multi-window soft driver (SDL 2.0+)\n");
+ else
+ osd_printf_verbose("Using SDL single-window soft driver (SDL 1.2)\n");
+
return 0;
}
@@ -220,6 +264,7 @@ static void drawsdl_exit(void)
// setup_texture for window
//============================================================
+#if (SDLMAME_SDL2)
void sdl_info::setup_texture(const osd_dim &size)
{
const sdl_scale_mode *sdl_sm = &scale_modes[video_config.scale_mode];
@@ -266,11 +311,64 @@ void sdl_info::setup_texture(const osd_dim &size)
size.width(), size.height());
}
}
+#endif
+
+//============================================================
+// yuv_overlay_init
+//============================================================
+
+#if (!SDLMAME_SDL2)
+void sdl_info::yuv_overlay_init()
+{
+ const sdl_scale_mode *sdl_sm = &scale_modes[video_config.scale_mode];
+ int minimum_width, minimum_height;
+
+ window().target()->compute_minimum_size(minimum_width, minimum_height);
+
+ if (window().prescale())
+ {
+ minimum_width *= window().prescale();
+ minimum_height *= window().prescale();
+ }
+
+ if (m_yuvsurf != NULL)
+ {
+ SDL_FreeYUVOverlay(m_yuvsurf);
+ m_yuvsurf = NULL;
+ }
+
+ if (m_yuv_bitmap != NULL)
+ {
+ global_free_array(m_yuv_bitmap);
+ }
+
+ osd_printf_verbose("SDL: Creating %d x %d YUV-Overlay ...\n", minimum_width, minimum_height);
+
+ m_yuv_bitmap = global_alloc_array(UINT16, minimum_width*minimum_height);
+
+ m_yuvsurf = SDL_CreateYUVOverlay(minimum_width * sdl_sm->mult_w, minimum_height * sdl_sm->mult_h,
+ sdl_sm->pixel_format, window().sdl_surface());
+
+ if ( m_yuvsurf == NULL ) {
+ osd_printf_error("SDL: Couldn't create SDL_yuv_overlay: %s\n", SDL_GetError());
+ //return 1;
+ }
+
+ if (!shown_video_info)
+ {
+ osd_printf_verbose("YUV Mode : %s\n", sdl_sm->name);
+ osd_printf_verbose("YUV Overlay Size : %d x %d\n", minimum_width, minimum_height);
+ osd_printf_verbose("YUV Acceleration : %s\n", m_yuvsurf->hw_overlay ? "Hardware" : "Software");
+ shown_video_info = 1;
+ }
+}
+#endif
//============================================================
// drawsdl_show_info
//============================================================
+#if (SDLMAME_SDL2)
static void drawsdl_show_info(struct SDL_RendererInfo *render_info)
{
#define RF_ENTRY(x) {x, #x }
@@ -297,14 +395,42 @@ static void drawsdl_show_info(struct SDL_RendererInfo *render_info)
if (render_info->flags & rflist[i].flag)
osd_printf_verbose("renderer: flag %s\n", rflist[i].name);
}
+#endif
//============================================================
// sdl_info::create
+// a
+// a
+// a
+// a
+// a
+// a
+// a
+// a
+// a
+// a
+// a
+// a
+// a
+// a
+// a
+// a
+// a
+// a
+// a
+// a
+// a
+// a
+// a
+// a
+// a
+// a
//============================================================
int sdl_info::create()
{
+#if (SDLMAME_SDL2)
const sdl_scale_mode *sm = &scale_modes[video_config.scale_mode];
// create renderer
@@ -360,6 +486,8 @@ int sdl_info::create()
window().get_size(w, h);
setup_texture(w, h);
#endif
+#else
+#endif
m_yuv_lookup = NULL;
m_blittimer = 0;
@@ -389,7 +517,9 @@ void sdl_info::destroy()
global_free_array(m_yuv_bitmap);
m_yuv_bitmap = NULL;
}
+#if (SDLMAME_SDL2)
SDL_DestroyRenderer(m_sdl_renderer);
+#endif
}
//============================================================
@@ -413,8 +543,16 @@ int sdl_info::xy_to_render_target(int x, int y, int *xt, int *yt)
void sdl_info::destroy_all_textures()
{
+#if (SDLMAME_SDL2)
SDL_DestroyTexture(m_texture_id);
m_texture_id = NULL;
+#else
+ if (m_yuvsurf != NULL)
+ {
+ SDL_FreeYUVOverlay(m_yuvsurf);
+ m_yuvsurf = NULL;
+ }
+#endif
}
@@ -428,7 +566,9 @@ int sdl_info::draw(int update)
UINT8 *surfptr;
INT32 pitch;
Uint32 rmask, gmask, bmask;
+#if (SDLMAME_SDL2)
Uint32 amask;
+#endif
INT32 vofs, hofs, blitwidth, blitheight, ch, cw;
int bpp;
@@ -444,14 +584,68 @@ int sdl_info::draw(int update)
clear_flags(FI_CHANGED);
m_blittimer = 3;
m_last_dim = wdim;
+#if (SDLMAME_SDL2)
SDL_RenderSetViewport(m_sdl_renderer, NULL);
if (m_texture_id != NULL)
SDL_DestroyTexture(m_texture_id);
setup_texture(m_blit_dim);
m_blittimer = 3;
+#else
+ const sdl_scale_mode *sdl_sm = &scale_modes[video_config.scale_mode];
+ if (sdl_sm->is_yuv)
+ {
+ yuv_overlay_init();
+ }
+#endif
}
// lock it if we need it
+#if (!SDLMAME_SDL2)
+
+ pitch = window().sdl_surface()->pitch;
+ bpp = window().sdl_surface()->format->BytesPerPixel;
+ rmask = window().sdl_surface()->format->Rmask;
+ gmask = window().sdl_surface()->format->Gmask;
+ bmask = window().sdl_surface()->format->Bmask;
+// amask = sdlsurf->format->Amask;
+#if 0
+ if (window().blitwidth() != m_old_blitwidth || window().blitheight() != m_old_blitheight)
+ {
+ if (sm->is_yuv)
+ yuv_overlay_init();
+ m_old_blitwidth = window().blitwidth();
+ m_old_blitheight = window().blitheight();
+ m_blittimer = 3;
+ }
+#endif
+ if (SDL_MUSTLOCK(window().sdl_surface()))
+ SDL_LockSurface(window().sdl_surface());
+
+ // Clear if necessary
+ if (m_blittimer > 0)
+ {
+ memset(window().sdl_surface()->pixels, 0, wdim.height() * window().sdl_surface()->pitch);
+ m_blittimer--;
+ }
+
+
+ if (sm->is_yuv)
+ {
+ SDL_LockYUVOverlay(m_yuvsurf);
+ surfptr = m_yuvsurf->pixels[0]; // (UINT8 *) m_yuv_bitmap;
+ pitch = m_yuvsurf->pitches[0]; // (UINT8 *) m_yuv_bitmap;
+#if 0
+ printf("abcd %d\n", m_yuvsurf->h);
+ printf("abcd %d %d %d\n", m_yuvsurf->pitches[0], m_yuvsurf->pitches[1], m_yuvsurf->pitches[2]);
+ printf("abcd %p %p %p\n", m_yuvsurf->pixels[0], m_yuvsurf->pixels[1], m_yuvsurf->pixels[2]);
+ printf("abcd %ld %ld\n", m_yuvsurf->pixels[1] - m_yuvsurf->pixels[0], m_yuvsurf->pixels[2] - m_yuvsurf->pixels[1]);
+#endif
+ }
+ else
+ surfptr = (UINT8 *)window().sdl_surface()->pixels;
+#else
+ //SDL_SelectRenderer(window().sdl_window);
+
{
Uint32 format;
@@ -474,6 +668,7 @@ int sdl_info::draw(int update)
SDL_LockTexture(m_texture_id, NULL, (void **) &surfptr, &pitch);
+#endif
// get ready to center the image
vofs = hofs = 0;
blitwidth = m_blit_dim.width();
@@ -508,11 +703,25 @@ int sdl_info::draw(int update)
int mamewidth, mameheight;
+#if !SDLMAME_SDL2
+ if (!sm->is_yuv)
+ {
+ surfptr += ((vofs * pitch) + (hofs * bpp));
+ mamewidth = blitwidth; //sdl_surface()->w;
+ mameheight = blitheight; //sdl_surface()->h;
+ }
+ else
+ {
+ mamewidth = m_yuvsurf->w / sm->mult_w;
+ mameheight = m_yuvsurf->h / sm->mult_h;
+ }
+#else
Uint32 fmt = 0;
int access = 0;
SDL_QueryTexture(m_texture_id, &fmt, &access, &mamewidth, &mameheight);
mamewidth /= sm->mult_w;
mameheight /= sm->mult_h;
+#endif
//printf("w h %d %d %d %d\n", mamewidth, mameheight, blitwidth, blitheight);
// rescale bounds
@@ -571,6 +780,24 @@ int sdl_info::draw(int update)
window().m_primlist->release_lock();
// unlock and flip
+#if (!SDLMAME_SDL2)
+ if (SDL_MUSTLOCK(window().sdl_surface())) SDL_UnlockSurface(window().sdl_surface());
+ if (!sm->is_yuv)
+ {
+ SDL_Flip(window().sdl_surface());
+ }
+ else
+ {
+ SDL_Rect r;
+
+ SDL_UnlockYUVOverlay(m_yuvsurf);
+ r.x = hofs;
+ r.y = vofs;
+ r.w = blitwidth;
+ r.h = blitheight;
+ SDL_DisplayYUVOverlay(m_yuvsurf, &r);
+ }
+#else
SDL_UnlockTexture(m_texture_id);
{
SDL_Rect r;
@@ -584,6 +811,7 @@ int sdl_info::draw(int update)
SDL_RenderCopy(m_sdl_renderer,m_texture_id, NULL, &r);
SDL_RenderPresent(m_sdl_renderer);
}
+#endif
return 0;
}
//============================================================
@@ -722,7 +950,12 @@ static void yuv_RGB_to_YV12X2(const UINT16 *bitmap, UINT8 *ptr, const int pitch,
pixels[0] = ptr;
pixels[1] = ptr + pitch * height * 2;
+#if (SDLMAME_SDL2)
int p2 = (pitch >> 1);
+#else
+ int p2 = (pitch + 7) & ~ 7;;
+ p2 = (p2 >> 1);
+#endif
pixels[2] = pixels[1] + p2 * height;
for(y=0;y<height;y++)
diff --git a/src/osd/modules/sound/direct_sound.cpp b/src/osd/modules/sound/direct_sound.cpp
index 0ec810578a3..78996093e77 100644
--- a/src/osd/modules/sound/direct_sound.cpp
+++ b/src/osd/modules/sound/direct_sound.cpp
@@ -28,7 +28,11 @@
#ifdef SDLMAME_WIN32
#include "../../sdl/osdsdl.h"
+#if (SDLMAME_SDL2)
#include <SDL2/SDL_syswm.h>
+#else
+#include <SDL/SDL_syswm.h>
+#endif
#include "../../sdl/window.h"
#else
#include "winmain.h"
@@ -404,8 +408,13 @@ HRESULT sound_direct_sound::dsound_init()
#ifdef SDLMAME_WIN32
SDL_SysWMinfo wminfo;
SDL_VERSION(&wminfo.version);
+#if SDLMAME_SDL2
SDL_GetWindowWMInfo(sdl_window_list->sdl_window(), &wminfo);
HWND const window = wminfo.info.win.window;
+#else // SDLMAME_SDL2
+ SDL_GetWMInfo(&wminfo);
+ HWND const window = wminfo.window;
+#endif // SDLMAME_SDL2
#else // SDLMAME_WIN32
HWND const window = win_window_list->m_hwnd;
#endif // SDLMAME_WIN32
diff --git a/src/osd/modules/sound/js_sound.cpp b/src/osd/modules/sound/js_sound.cpp
index 581de205d7b..bd95c79dd2e 100644
--- a/src/osd/modules/sound/js_sound.cpp
+++ b/src/osd/modules/sound/js_sound.cpp
@@ -6,7 +6,7 @@
Shim for native JavaScript sound interface implementations (Emscripten only).
-****************************************************************************/
+*******************************************************************c********/
#include "sound_module.h"
#include "modules/osdmodule.h"
@@ -34,14 +34,14 @@ public:
{
EM_ASM_ARGS({
// Forward audio stream update on to JS backend implementation.
- jsmame_update_audio_stream($0, $1);
+ jsmess_update_audio_stream($0, $1);
}, (unsigned int)buffer, samples_this_frame);
}
virtual void set_mastervolume(int attenuation)
{
EM_ASM_ARGS({
// Forward volume update on to JS backend implementation.
- jsmame_set_mastervolume($0);
+ jsmess_set_mastervolume($0);
}, attenuation);
}
diff --git a/src/osd/modules/sound/js_sound.js b/src/osd/modules/sound/js_sound.js
deleted file mode 100644
index b06cbb44365..00000000000
--- a/src/osd/modules/sound/js_sound.js
+++ /dev/null
@@ -1,213 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Grant Galitz, Katelyn Gadd
-/***************************************************************************
-
- JSMAME web audio backend v0.3
-
- Original by katelyn gadd - kg at luminance dot org ; @antumbral on twitter
- Substantial changes by taisel
-
-***************************************************************************/
-
-var jsmame_web_audio = (function () {
-
-var context = null;
-var gain_node = null;
-var eventNode = null;
-var sampleScale = 32766;
-var inputBuffer = new Float32Array(44100);
-var bufferSize = 44100;
-var start = 0;
-var rear = 0;
-var watchDogDateLast = null;
-var watchDogTimerEvent = null;
-
-function lazy_init () {
- //Make
- if (context) {
- //Return if already created:
- return;
- }
- if (typeof AudioContext != "undefined") {
- //Standard context creation:
- context = new AudioContext();
- }
- else if (typeof webkitAudioContext != "undefined") {
- //Older webkit context creation:
- context = new webkitAudioContext();
- }
- else {
- //API not found!
- return;
- }
- //Generate a volume control node:
- gain_node = context.createGain();
- //Set initial volume to 1:
- gain_node.gain.value = 1.0;
- //Connect volume node to output:
- gain_node.connect(context.destination);
- //Initialize the streaming event:
- init_event();
-};
-
-function init_event() {
- //Generate a streaming node point:
- if (typeof context.createScriptProcessor == "function") {
- //Current standard compliant way:
- eventNode = context.createScriptProcessor(4096, 0, 2);
- }
- else {
- //Deprecated way:
- eventNode = context.createJavaScriptNode(4096, 0, 2);
- }
- //Make our tick function the audio callback function:
- eventNode.onaudioprocess = tick;
- //Connect stream to volume control node:
- eventNode.connect(gain_node);
- //WORKAROUND FOR FIREFOX BUG:
- initializeWatchDogForFirefoxBug();
-};
-
-function initializeWatchDogForFirefoxBug() {
- //TODO: decide if we want to user agent sniff firefox here,
- //since Google Chrome doesn't need this:
- watchDogDateLast = (new Date()).getTime();
- if (watchDogTimerEvent === null) {
- watchDogTimerEvent = setInterval(function () {
- var timeDiff = (new Date()).getTime() - watchDogDateLast;
- if (timeDiff > 500) {
- disconnect_old_event();
- init_event();
- }
- }, 500);
- }
-};
-
-function disconnect_old_event() {
- //Disconnect from audio graph:
- eventNode.disconnect();
- //IIRC there was a firefox bug that did not GC this event when nulling the node itself:
- eventNode.onaudioprocess = null;
- //Null the glitched/unused node:
- eventNode = null;
-};
-
-function set_mastervolume (
- // even though it's 'attenuation' the value is negative, so...
- attenuation_in_decibels
-) {
- lazy_init();
- if (!context) return;
-
- // http://stackoverflow.com/questions/22604500/web-audio-api-working-with-decibels
- // seemingly incorrect/broken. figures. welcome to Web Audio
- // var gain_web_audio = 1.0 - Math.pow(10, 10 / attenuation_in_decibels);
-
- // HACK: Max attenuation in JSMESS appears to be 32.
- // Hit ' then left/right arrow to test.
- // FIXME: This is linear instead of log10 scale.
- var gain_web_audio = 1.0 + (+attenuation_in_decibels / +32);
- if (gain_web_audio < +0)
- gain_web_audio = +0;
- else if (gain_web_audio > +1)
- gain_web_audio = +1;
-
- gain_node.gain.value = gain_web_audio;
-};
-
-function update_audio_stream (
- pBuffer, // pointer into emscripten heap. int16 samples
- samples_this_frame // int. number of samples at pBuffer address.
-) {
- lazy_init();
- if (!context) return;
-
- for (
- var i = 0,
- l = samples_this_frame | 0;
- i < l;
- i++
- ) {
- var offset =
- // divide by sizeof(INT16) since pBuffer is offset
- // in bytes
- ((pBuffer / 2) | 0) +
- ((i * 2) | 0);
-
- var left_sample = HEAP16[offset];
- var right_sample = HEAP16[(offset + 1) | 0];
-
- // normalize from signed int16 to signed float
- var left_sample_float = left_sample / sampleScale;
- var right_sample_float = right_sample / sampleScale;
-
- inputBuffer[rear++] = left_sample_float;
- inputBuffer[rear++] = right_sample_float;
- if (rear == bufferSize) {
- rear = 0;
- }
- if (start == rear) {
- start += 2;
- if (start == bufferSize) {
- start = 0;
- }
- }
- }
-};
-function tick (event) {
- //Find all output channels:
- for (var bufferCount = 0, buffers = []; bufferCount < 2; ++bufferCount) {
- buffers[bufferCount] = event.outputBuffer.getChannelData(bufferCount);
- }
- //Copy samples from the input buffer to the Web Audio API:
- for (var index = 0; index < 4096 && start != rear; ++index) {
- buffers[0][index] = inputBuffer[start++];
- buffers[1][index] = inputBuffer[start++];
- if (start == bufferSize) {
- start = 0;
- }
- }
- //Pad with silence if we're underrunning:
- while (index < 4096) {
- buffers[0][index] = 0;
- buffers[1][index++] = 0;
- }
- //Deep inside the bowels of vendors bugs,
- //we're using watchdog for a firefox bug,
- //where the user agent decides to stop firing events
- //if the user agent lags out due to system load.
- //Don't even ask....
- watchDogDateLast = (new Date()).getTime();
-}
-
-function get_context() {
- return context;
-};
-
-function sample_count() {
- //TODO get someone to call this from the emulator,
- //so the emulator can do proper audio buffering by
- //knowing how many samples are left:
- if (!context) {
- //Use impossible value as an error code:
- return -1;
- }
- var count = rear - start;
- if (start > rear) {
- count += bufferSize;
- }
- return count;
-}
-
-return {
- set_mastervolume: set_mastervolume,
- update_audio_stream: update_audio_stream,
- get_context: get_context,
- sample_count: sample_count
-};
-
-})();
-
-window.jsmame_set_mastervolume = jsmame_web_audio.set_mastervolume;
-window.jsmame_update_audio_stream = jsmame_web_audio.update_audio_stream;
-window.jsmame_sample_count = jsmame_web_audio.sample_count;
diff --git a/src/osd/modules/sound/sdl_sound.cpp b/src/osd/modules/sound/sdl_sound.cpp
index c1e3e3dff2b..de8d57af11c 100644
--- a/src/osd/modules/sound/sdl_sound.cpp
+++ b/src/osd/modules/sound/sdl_sound.cpp
@@ -421,7 +421,11 @@ int sound_sdl::init(const osd_options &options)
}
osd_printf_verbose("Audio: Start initialization\n");
+ #if (SDLMAME_SDL2)
strncpy(audio_driver, SDL_GetCurrentAudioDriver(), sizeof(audio_driver));
+ #else
+ SDL_AudioDriverName(audio_driver, sizeof(audio_driver));
+ #endif
osd_printf_verbose("Audio: Driver is %s\n", audio_driver);
sdl_xfer_samples = SDL_XFER_SAMPLES;
diff --git a/src/osd/modules/sound/xaudio2_sound.cpp b/src/osd/modules/sound/xaudio2_sound.cpp
index 9dc3d0461be..7df854c0364 100644
--- a/src/osd/modules/sound/xaudio2_sound.cpp
+++ b/src/osd/modules/sound/xaudio2_sound.cpp
@@ -14,7 +14,6 @@
// standard windows headers
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
-#include <mutex>
#pragma warning( push )
#pragma warning( disable: 4068 )
@@ -125,12 +124,21 @@ public:
obj->DestroyVoice();
}
}
+
+ void operator()(osd_lock* obj) const
+ {
+ if (obj != nullptr)
+ {
+ osd_lock_free(obj);
+ }
+ }
};
// Typedefs for smart pointers used with customer deleters
typedef std::unique_ptr<IXAudio2, xaudio2_custom_deleter> xaudio2_ptr;
typedef std::unique_ptr<IXAudio2MasteringVoice, xaudio2_custom_deleter> mastering_voice_ptr;
typedef std::unique_ptr<IXAudio2SourceVoice, xaudio2_custom_deleter> src_voice_ptr;
+typedef std::unique_ptr<osd_lock, xaudio2_custom_deleter> osd_lock_ptr;
// Typedef for pointer to XAudio2Create
typedef HRESULT(__stdcall* PFN_XAUDIO2CREATE)(IXAudio2**, UINT32, XAUDIO2_PROCESSOR);
@@ -139,6 +147,27 @@ typedef HRESULT(__stdcall* PFN_XAUDIO2CREATE)(IXAudio2**, UINT32, XAUDIO2_PROCES
// Helper classes
//============================================================
+// Helper for locking within a particular scope without having to manually release
+class osd_scoped_lock
+{
+private:
+ osd_lock * m_lock;
+public:
+ osd_scoped_lock(osd_lock* lock)
+ {
+ m_lock = lock;
+ osd_lock_acquire(m_lock);
+ }
+
+ ~osd_scoped_lock()
+ {
+ if (m_lock != nullptr)
+ {
+ osd_lock_release(m_lock);
+ }
+ }
+};
+
// Provides a pool of buffers
class bufferpool
{
@@ -204,7 +233,7 @@ private:
DWORD m_buffer_size;
DWORD m_buffer_count;
DWORD m_writepos;
- std::mutex m_buffer_lock;
+ osd_lock_ptr m_buffer_lock;
HANDLE m_hEventBufferCompleted;
HANDLE m_hEventDataAvailable;
HANDLE m_hEventExiting;
@@ -229,6 +258,7 @@ public:
m_buffer_size(0),
m_buffer_count(0),
m_writepos(0),
+ m_buffer_lock(osd_lock_alloc()),
m_hEventBufferCompleted(NULL),
m_hEventDataAvailable(NULL),
m_hEventExiting(NULL),
@@ -359,7 +389,7 @@ void sound_xaudio2::update_audio_stream(
UINT32 const bytes_this_frame = samples_this_frame * m_sample_bytes;
- std::lock_guard<std::mutex> lock(m_buffer_lock);
+ osd_scoped_lock scope_lock(m_buffer_lock.get());
UINT32 bytes_left = bytes_this_frame;
@@ -416,7 +446,7 @@ void sound_xaudio2::OnBufferEnd(void *pBufferContext)
BYTE* completed_buffer = (BYTE*)pBufferContext;
if (completed_buffer != nullptr)
{
- std::lock_guard<std::mutex> lock(m_buffer_lock);
+ auto scoped_lock = osd_scoped_lock(m_buffer_lock.get());
m_buffer_pool->return_to_pool(completed_buffer);
}
@@ -595,7 +625,7 @@ void sound_xaudio2::submit_needed()
if (state.BuffersQueued >= 1)
return;
- std::lock_guard<std::mutex> lock(m_buffer_lock);
+ osd_scoped_lock lock_scope(m_buffer_lock.get());
// Roll the buffer
roll_buffer();
diff --git a/src/osd/modules/sync/osdsync.h b/src/osd/modules/sync/osdsync.h
index e6e5e2f99c9..46d32b09135 100644
--- a/src/osd/modules/sync/osdsync.h
+++ b/src/osd/modules/sync/osdsync.h
@@ -24,7 +24,7 @@ struct osd_event;
/*-----------------------------------------------------------------------------
- osd_event_alloc: allocate a new event
+ osd_lock_event_alloc: allocate a new event
Parameters:
@@ -174,4 +174,18 @@ int osd_thread_cpu_affinity(osd_thread *thread, UINT32 mask);
-----------------------------------------------------------------------------*/
void osd_thread_wait_free(osd_thread *thread);
+//============================================================
+// Scalable Locks
+//============================================================
+
+struct osd_scalable_lock;
+
+osd_scalable_lock *osd_scalable_lock_alloc(void);
+
+INT32 osd_scalable_lock_acquire(osd_scalable_lock *lock);
+
+void osd_scalable_lock_release(osd_scalable_lock *lock, INT32 myslot);
+
+void osd_scalable_lock_free(osd_scalable_lock *lock);
+
#endif /* __OSDSYNC__ */
diff --git a/src/osd/modules/sync/sync_mini.cpp b/src/osd/modules/sync/sync_mini.cpp
index 5829eb6d63c..f5e6accb0c7 100644
--- a/src/osd/modules/sync/sync_mini.cpp
+++ b/src/osd/modules/sync/sync_mini.cpp
@@ -20,6 +20,63 @@ struct _osd_thread {
//============================================================
+// osd_lock_alloc
+//============================================================
+
+osd_lock *osd_lock_alloc(void)
+{
+ // the minimal implementation does not support threading
+ // just return a dummy value here
+ return (osd_lock *)1;
+}
+
+
+//============================================================
+// osd_lock_acquire
+//============================================================
+
+void osd_lock_acquire(osd_lock *lock)
+{
+ // the minimal implementation does not support threading
+ // the acquire always "succeeds"
+}
+
+
+//============================================================
+// osd_lock_try
+//============================================================
+
+int osd_lock_try(osd_lock *lock)
+{
+ // the minimal implementation does not support threading
+ // the acquire always "succeeds"
+ return TRUE;
+}
+
+
+//============================================================
+// osd_lock_release
+//============================================================
+
+void osd_lock_release(osd_lock *lock)
+{
+ // the minimal implementation does not support threading
+ // do nothing here
+}
+
+
+//============================================================
+// osd_lock_free
+//============================================================
+
+void osd_lock_free(osd_lock *lock)
+{
+ // the minimal implementation does not support threading
+ // do nothing here
+}
+
+
+//============================================================
// osd_event_alloc
//============================================================
diff --git a/src/osd/modules/sync/sync_ntc.cpp b/src/osd/modules/sync/sync_ntc.cpp
index c78f67ce64a..462c56ee434 100644
--- a/src/osd/modules/sync/sync_ntc.cpp
+++ b/src/osd/modules/sync/sync_ntc.cpp
@@ -38,6 +38,16 @@
#include <errno.h>
#include <sys/time.h>
+struct osd_lock {
+ volatile pthread_t holder;
+ INT32 count;
+#ifdef PTR64
+ INT8 padding[52]; // Fill a 64-byte cache line
+#else
+ INT8 padding[56]; // A bit more padding
+#endif
+};
+
struct osd_event {
pthread_mutex_t mutex;
pthread_cond_t cond;
@@ -59,6 +69,275 @@ struct osd_thread {
pthread_t thread;
};
+struct osd_scalable_lock
+{
+ struct
+ {
+ volatile INT32 haslock; // do we have the lock?
+ INT32 filler[64/4-1]; // assumes a 64-byte cache line
+ } slot[WORK_MAX_THREADS]; // one slot per thread
+ volatile INT32 nextindex; // index of next slot to use
+};
+
+
+//============================================================
+// Scalable Locks
+//============================================================
+
+osd_scalable_lock *osd_scalable_lock_alloc(void)
+{
+ osd_scalable_lock *lock;
+
+ lock = (osd_scalable_lock *)calloc(1, sizeof(*lock));
+ if (lock == NULL)
+ return NULL;
+
+ memset(lock, 0, sizeof(*lock));
+ lock->slot[0].haslock = TRUE;
+ return lock;
+}
+
+
+INT32 osd_scalable_lock_acquire(osd_scalable_lock *lock)
+{
+ INT32 myslot = (atomic_increment32(&lock->nextindex) - 1) & (WORK_MAX_THREADS - 1);
+
+#if defined(__i386__) || defined(__x86_64__)
+ register INT32 tmp;
+ __asm__ __volatile__ (
+ "1: clr %[tmp] ;"
+ " xchg %[haslock], %[tmp] ;"
+ " test %[tmp], %[tmp] ;"
+ " jne 3f ;"
+ "2: mov %[haslock], %[tmp] ;"
+ " test %[tmp], %[tmp] ;"
+ " jne 1b ;"
+ " pause ;"
+ " jmp 2b ;"
+ "3: "
+ : [haslock] "+m" (lock->slot[myslot].haslock)
+ , [tmp] "=&r" (tmp)
+ :
+ : "cc"
+ );
+#elif defined(__ppc__) || defined (__PPC__) || defined(__ppc64__) || defined(__PPC64__)
+ register INT32 tmp;
+ __asm__ __volatile__ (
+ "1: lwarx %[tmp], 0, %[haslock] \n"
+ " cmpwi %[tmp], 0 \n"
+ " bne 3f \n"
+ "2: lwzx %[tmp], 0, %[haslock] \n"
+ " cmpwi %[tmp], 0 \n"
+ " bne 1b \n"
+ " nop \n"
+ " nop \n"
+ " b 2b \n"
+ "3: li %[tmp], 0 \n"
+ " stwcx. %[tmp], 0, %[haslock] \n"
+ " bne- 1b \n"
+ " lwsync \n"
+ : [tmp] "=&r" (tmp)
+ : [haslock] "r" (&lock->slot[myslot].haslock)
+ : "cr0"
+ );
+#else
+ INT32 backoff = 1;
+ while (!osd_compare_exchange32(&lock->slot[myslot].haslock, TRUE, FALSE))
+ {
+ INT32 backcount;
+ for (backcount = 0; backcount < backoff; backcount++)
+ osd_yield_processor();
+ backoff <<= 1;
+ }
+#endif
+ return myslot;
+}
+
+
+void osd_scalable_lock_release(osd_scalable_lock *lock, INT32 myslot)
+{
+#if defined(__i386__) || defined(__x86_64__)
+ register INT32 tmp = TRUE;
+ __asm__ __volatile__ (
+ " xchg %[haslock], %[tmp] ;"
+ : [haslock] "+m" (lock->slot[(myslot + 1) & (WORK_MAX_THREADS - 1)].haslock)
+ , [tmp] "+r" (tmp)
+ :
+ );
+#elif defined(__ppc__) || defined (__PPC__) || defined(__ppc64__) || defined(__PPC64__)
+ lock->slot[(myslot + 1) & (WORK_MAX_THREADS - 1)].haslock = TRUE;
+ __asm__ __volatile__ ( " lwsync " : : );
+#else
+ osd_exchange32(&lock->slot[(myslot + 1) & (WORK_MAX_THREADS - 1)].haslock, TRUE);
+#endif
+}
+
+void osd_scalable_lock_free(osd_scalable_lock *lock)
+{
+ free(lock);
+}
+
+static inline pthread_t osd_compare_exchange_pthread_t(pthread_t volatile *ptr, pthread_t compare, pthread_t exchange)
+{
+#ifdef PTR64
+ INT64 result = compare_exchange64((INT64 volatile *)ptr, (INT64)compare, (INT64)exchange);
+#else
+ INT32 result = compare_exchange32((INT32 volatile *)ptr, (INT32)compare, (INT32)exchange);
+#endif
+ return (pthread_t)result;
+}
+
+static inline pthread_t osd_exchange_pthread_t(pthread_t volatile *ptr, pthread_t exchange)
+{
+#ifdef PTR64
+ INT64 result = osd_exchange64((INT64 volatile *)ptr, (INT64)exchange);
+#else
+ INT32 result = atomic_exchange32((INT32 volatile *)ptr, (INT32)exchange);
+#endif
+ return (pthread_t)result;
+}
+
+
+//============================================================
+// osd_lock_alloc
+//============================================================
+
+osd_lock *osd_lock_alloc(void)
+{
+ osd_lock *lock;
+
+ lock = (osd_lock *)calloc(1, sizeof(osd_lock));
+ if (lock == NULL)
+ return NULL;
+
+ lock->holder = 0;
+ lock->count = 0;
+
+ return lock;
+}
+
+//============================================================
+// osd_lock_acquire
+//============================================================
+
+void osd_lock_acquire(osd_lock *lock)
+{
+ pthread_t current, prev;
+
+ current = pthread_self();
+ prev = osd_compare_exchange_pthread_t(&lock->holder, 0, current);
+ if (prev != nullptr && prev != current)
+ {
+ do {
+ register INT32 spin = 10000; // Convenient spin count
+ register pthread_t tmp;
+#if defined(__i386__) || defined(__x86_64__)
+ __asm__ __volatile__ (
+ "1: pause ;"
+ " mov %[holder], %[tmp] ;"
+ " test %[tmp], %[tmp] ;"
+ " loopne 1b ;"
+ : [spin] "+c" (spin)
+ , [tmp] "=&r" (tmp)
+ : [holder] "m" (lock->holder)
+ : "cc"
+ );
+#elif defined(__ppc__) || defined(__PPC__)
+ __asm__ __volatile__ (
+ "1: nop \n"
+ " nop \n"
+ " lwzx %[tmp], 0, %[holder] \n"
+ " cmpwi %[tmp], 0 \n"
+ " bdnzt eq, 1b \n"
+ : [spin] "+c" (spin)
+ , [tmp] "=&r" (tmp)
+ : [holder] "r" (&lock->holder)
+ : "cr0"
+ );
+#elif defined(__ppc64__) || defined(__PPC64__)
+ __asm__ __volatile__ (
+ "1: nop \n"
+ " nop \n"
+ " ldx %[tmp], 0, %[holder] \n"
+ " cmpdi %[tmp], 0 \n"
+ " bdnzt eq, 1b \n"
+ : [spin] "+c" (spin)
+ , [tmp] "=&r" (tmp)
+ : [holder] "r" (&lock->holder)
+ : "cr0"
+ );
+#else
+ while (--spin > 0 && lock->holder != NULL)
+ osd_yield_processor();
+#endif
+#if 0
+ /* If you mean to use locks as a blocking mechanism for extended
+ * periods of time, you should do something like this. However,
+ * it kills the performance of gaelco3d.
+ */
+ if (spin == 0)
+ {
+ struct timespec sleep = { 0, 100000 }, remaining;
+ nanosleep(&sleep, &remaining); // sleep for 100us
+ }
+#endif
+ } while (osd_compare_exchange_pthread_t(&lock->holder, 0, current) != nullptr);
+ }
+ lock->count++;
+}
+
+//============================================================
+// osd_lock_try
+//============================================================
+
+int osd_lock_try(osd_lock *lock)
+{
+ pthread_t current, prev;
+
+ current = pthread_self();
+ prev = osd_compare_exchange_pthread_t(&lock->holder, 0, current);
+ if (prev == nullptr || prev == current)
+ {
+ lock->count++;
+ return 1;
+ }
+ return 0;
+}
+
+//============================================================
+// osd_lock_release
+//============================================================
+
+void osd_lock_release(osd_lock *lock)
+{
+ pthread_t current;
+
+ current = pthread_self();
+ if (lock->holder == current)
+ {
+ if (--lock->count == 0)
+#if defined(__ppc__) || defined(__PPC__) || defined(__ppc64__) || defined(__PPC64__)
+ lock->holder = 0;
+ __asm__ __volatile__( " lwsync " : : );
+#else
+ osd_exchange_pthread_t(&lock->holder, 0);
+#endif
+ return;
+ }
+
+ // trying to release a lock you don't hold is bad!
+// assert(lock->holder == pthread_self());
+}
+
+//============================================================
+// osd_lock_free
+//============================================================
+
+void osd_lock_free(osd_lock *lock)
+{
+ free(lock);
+}
+
//============================================================
// osd_event_alloc
//============================================================
diff --git a/src/osd/modules/sync/sync_os2.cpp b/src/osd/modules/sync/sync_os2.cpp
index 6e3265bb198..dba34065610 100644
--- a/src/osd/modules/sync/sync_os2.cpp
+++ b/src/osd/modules/sync/sync_os2.cpp
@@ -31,6 +31,16 @@
#define pthread_t int
#define pthread_self _gettid
+struct osd_lock {
+ volatile pthread_t holder;
+ INT32 count;
+#ifdef PTR64
+ INT8 padding[52]; // Fill a 64-byte cache line
+#else
+ INT8 padding[56]; // A bit more padding
+#endif
+};
+
struct osd_event {
HMTX hmtx;
HEV hev;
@@ -48,6 +58,276 @@ struct osd_thread {
void *param;
};
+struct osd_scalable_lock
+{
+ struct
+ {
+ volatile INT32 haslock; // do we have the lock?
+ INT32 filler[64/4-1]; // assumes a 64-byte cache line
+ } slot[WORK_MAX_THREADS]; // one slot per thread
+ volatile INT32 nextindex; // index of next slot to use
+};
+
+
+//============================================================
+// Scalable Locks
+//============================================================
+
+osd_scalable_lock *osd_scalable_lock_alloc(void)
+{
+ osd_scalable_lock *lock;
+
+ lock = (osd_scalable_lock *)calloc(1, sizeof(*lock));
+ if (lock == NULL)
+ return NULL;
+
+ memset(lock, 0, sizeof(*lock));
+ lock->slot[0].haslock = TRUE;
+ return lock;
+}
+
+
+INT32 osd_scalable_lock_acquire(osd_scalable_lock *lock)
+{
+ INT32 myslot = (atomic_increment32(&lock->nextindex) - 1) & (WORK_MAX_THREADS - 1);
+
+#if defined(__i386__) || defined(__x86_64__)
+ register INT32 tmp;
+ __asm__ __volatile__ (
+ "1: clr %[tmp] ;"
+ " xchg %[haslock], %[tmp] ;"
+ " test %[tmp], %[tmp] ;"
+ " jne 3f ;"
+ "2: mov %[haslock], %[tmp] ;"
+ " test %[tmp], %[tmp] ;"
+ " jne 1b ;"
+ " pause ;"
+ " jmp 2b ;"
+ "3: "
+ : [haslock] "+m" (lock->slot[myslot].haslock)
+ , [tmp] "=&r" (tmp)
+ :
+ : "%cc"
+ );
+#elif defined(__ppc__) || defined (__PPC__) || defined(__ppc64__) || defined(__PPC64__)
+ register INT32 tmp;
+ __asm__ __volatile__ (
+ "1: lwarx %[tmp], 0, %[haslock] \n"
+ " cmpwi %[tmp], 0 \n"
+ " bne 3f \n"
+ "2: lwzx %[tmp], 0, %[haslock] \n"
+ " cmpwi %[tmp], 0 \n"
+ " bne 1b \n"
+ " nop \n"
+ " nop \n"
+ " b 2b \n"
+ "3: li %[tmp], 0 \n"
+ " sync \n"
+ " stwcx. %[tmp], 0, %[haslock] \n"
+ " bne- 1b \n"
+ " eieio \n"
+ : [tmp] "=&r" (tmp)
+ : [haslock] "r" (&lock->slot[myslot].haslock)
+ : "cr0"
+ );
+#else
+ INT32 backoff = 1;
+ while (!osd_compare_exchange32(&lock->slot[myslot].haslock, TRUE, FALSE))
+ {
+ INT32 backcount;
+ for (backcount = 0; backcount < backoff; backcount++)
+ osd_yield_processor();
+ backoff <<= 1;
+ }
+#endif
+ return myslot;
+}
+
+
+void osd_scalable_lock_release(osd_scalable_lock *lock, INT32 myslot)
+{
+#if defined(__i386__) || defined(__x86_64__)
+ register INT32 tmp = TRUE;
+ __asm__ __volatile__ (
+ " xchg %[haslock], %[tmp] ;"
+ : [haslock] "+m" (lock->slot[(myslot + 1) & (WORK_MAX_THREADS - 1)].haslock)
+ , [tmp] "+r" (tmp)
+ :
+ );
+#elif defined(__ppc__) || defined (__PPC__) || defined(__ppc64__) || defined(__PPC64__)
+ lock->slot[(myslot + 1) & (WORK_MAX_THREADS - 1)].haslock = TRUE;
+ __asm__ __volatile__ ( " eieio " : : );
+#else
+ osd_exchange32(&lock->slot[(myslot + 1) & (WORK_MAX_THREADS - 1)].haslock, TRUE);
+#endif
+}
+
+void osd_scalable_lock_free(osd_scalable_lock *lock)
+{
+ free(lock);
+}
+
+static inline pthread_t osd_compare_exchange_pthread_t(pthread_t volatile *ptr, pthread_t compare, pthread_t exchange)
+{
+#ifdef PTR64
+ INT64 result = compare_exchange64((INT64 volatile *)ptr, (INT64)compare, (INT64)exchange);
+#else
+ INT32 result = compare_exchange32((INT32 volatile *)ptr, (INT32)compare, (INT32)exchange);
+#endif
+ return (pthread_t)result;
+}
+
+static inline pthread_t osd_exchange_pthread_t(pthread_t volatile *ptr, pthread_t exchange)
+{
+#ifdef PTR64
+ INT64 result = osd_exchange64((INT64 volatile *)ptr, (INT64)exchange);
+#else
+ INT32 result = atomic_exchange32((INT32 volatile *)ptr, (INT32)exchange);
+#endif
+ return (pthread_t)result;
+}
+
+
+//============================================================
+// osd_lock_alloc
+//============================================================
+
+osd_lock *osd_lock_alloc(void)
+{
+ osd_lock *lock;
+
+ lock = (osd_lock *)calloc(1, sizeof(osd_lock));
+ if (lock == NULL)
+ return NULL;
+
+ lock->holder = 0;
+ lock->count = 0;
+
+ return lock;
+}
+
+//============================================================
+// osd_lock_acquire
+//============================================================
+
+void osd_lock_acquire(osd_lock *lock)
+{
+ pthread_t current, prev;
+
+ current = pthread_self();
+ prev = osd_compare_exchange_pthread_t(&lock->holder, 0, current);
+ if (prev != (size_t)NULL && prev != current)
+ {
+ do {
+ register INT32 spin = 10000; // Convenient spin count
+ register pthread_t tmp;
+#if defined(__i386__) || defined(__x86_64__)
+ __asm__ __volatile__ (
+ "1: pause ;"
+ " mov %[holder], %[tmp] ;"
+ " test %[tmp], %[tmp] ;"
+ " loopne 1b ;"
+ : [spin] "+c" (spin)
+ , [tmp] "=&r" (tmp)
+ : [holder] "m" (lock->holder)
+ : "%cc"
+ );
+#elif defined(__ppc__) || defined(__PPC__)
+ __asm__ __volatile__ (
+ "1: nop \n"
+ " nop \n"
+ " lwzx %[tmp], 0, %[holder] \n"
+ " cmpwi %[tmp], 0 \n"
+ " bdnzt eq, 1b \n"
+ : [spin] "+c" (spin)
+ , [tmp] "=&r" (tmp)
+ : [holder] "r" (&lock->holder)
+ : "cr0"
+ );
+#elif defined(__ppc64__) || defined(__PPC64__)
+ __asm__ __volatile__ (
+ "1: nop \n"
+ " nop \n"
+ " ldx %[tmp], 0, %[holder] \n"
+ " cmpdi %[tmp], 0 \n"
+ " bdnzt eq, 1b \n"
+ : [spin] "+c" (spin)
+ , [tmp] "=&r" (tmp)
+ : [holder] "r" (&lock->holder)
+ : "cr0"
+ );
+#else
+ while (--spin > 0 && lock->holder != NULL)
+ osd_yield_processor();
+#endif
+#if 0
+ /* If you mean to use locks as a blocking mechanism for extended
+ * periods of time, you should do something like this. However,
+ * it kills the performance of gaelco3d.
+ */
+ if (spin == 0)
+ {
+ struct timespec sleep = { 0, 100000 }, remaining;
+ nanosleep(&sleep, &remaining); // sleep for 100us
+ }
+#endif
+ } while (osd_compare_exchange_pthread_t(&lock->holder, 0, current) != (size_t)NULL);
+ }
+ lock->count++;
+}
+
+//============================================================
+// osd_lock_try
+//============================================================
+
+int osd_lock_try(osd_lock *lock)
+{
+ pthread_t current, prev;
+
+ current = pthread_self();
+ prev = osd_compare_exchange_pthread_t(&lock->holder, 0, current);
+ if (prev == (size_t)NULL || prev == current)
+ {
+ lock->count++;
+ return 1;
+ }
+ return 0;
+}
+
+//============================================================
+// osd_lock_release
+//============================================================
+
+void osd_lock_release(osd_lock *lock)
+{
+ pthread_t current;
+
+ current = pthread_self();
+ if (lock->holder == current)
+ {
+ if (--lock->count == 0)
+#if defined(__ppc__) || defined(__PPC__) || defined(__ppc64__) || defined(__PPC64__)
+ lock->holder = 0;
+ __asm__ __volatile__( " eieio " : : );
+#else
+ osd_exchange_pthread_t(&lock->holder, 0);
+#endif
+ return;
+ }
+
+ // trying to release a lock you don't hold is bad!
+// assert(lock->holder == pthread_self());
+}
+
+//============================================================
+// osd_lock_free
+//============================================================
+
+void osd_lock_free(osd_lock *lock)
+{
+ free(lock);
+}
+
//============================================================
// osd_event_alloc
//============================================================
diff --git a/src/osd/modules/sync/sync_sdl.cpp b/src/osd/modules/sync/sync_sdl.cpp
index 73b735fefb3..90969b2a068 100644
--- a/src/osd/modules/sync/sync_sdl.cpp
+++ b/src/osd/modules/sync/sync_sdl.cpp
@@ -51,6 +51,138 @@ struct osd_thread {
void *param;
};
+struct osd_scalable_lock
+{
+ SDL_mutex * mutex;
+};
+
+//============================================================
+// Scalable Locks
+//============================================================
+
+osd_scalable_lock *osd_scalable_lock_alloc(void)
+{
+ osd_scalable_lock *lock;
+
+ lock = (osd_scalable_lock *)calloc(1, sizeof(*lock));
+ if (lock == NULL)
+ return NULL;
+
+ lock->mutex = SDL_CreateMutex();
+ return lock;
+}
+
+
+INT32 osd_scalable_lock_acquire(osd_scalable_lock *lock)
+{
+ SDL_mutexP(lock->mutex);
+ return 0;
+}
+
+
+void osd_scalable_lock_release(osd_scalable_lock *lock, INT32 myslot)
+{
+ SDL_mutexV(lock->mutex);
+}
+
+void osd_scalable_lock_free(osd_scalable_lock *lock)
+{
+ SDL_DestroyMutex(lock->mutex);
+ free(lock);
+}
+
+//============================================================
+// osd_lock_alloc
+//============================================================
+
+osd_lock *osd_lock_alloc(void)
+{
+ hidden_mutex_t *mutex;
+
+ mutex = (hidden_mutex_t *)calloc(1, sizeof(hidden_mutex_t));
+ if (mutex == NULL)
+ return NULL;
+
+ mutex->id = SDL_CreateMutex();
+
+ return (osd_lock *)mutex;
+}
+
+//============================================================
+// osd_lock_acquire
+//============================================================
+
+void osd_lock_acquire(osd_lock *lock)
+{
+ hidden_mutex_t *mutex = (hidden_mutex_t *) lock;
+
+ LOG(("osd_lock_acquire"));
+ /* get the lock */
+ mutex->locked++; /* signal that we are *about* to lock - prevent osd_lock_try */
+ SDL_mutexP(mutex->id);
+ mutex->threadid = SDL_ThreadID();
+}
+
+//============================================================
+// osd_lock_try
+//============================================================
+
+int osd_lock_try(osd_lock *lock)
+{
+ hidden_mutex_t *mutex = (hidden_mutex_t *) lock;
+
+ LOG(("osd_lock_try"));
+ if (mutex->locked && mutex->threadid == SDL_ThreadID())
+ {
+ /* get the lock */
+ SDL_mutexP(mutex->id);
+ mutex->locked++;
+ mutex->threadid = SDL_ThreadID();
+ return 1;
+ }
+ else if ((mutex->locked == 0))
+ {
+ /* get the lock */
+ mutex->locked++;
+ SDL_mutexP(mutex->id);
+ mutex->threadid = SDL_ThreadID();
+ return 1;
+ }
+ else
+ {
+ /* fail */
+ return 0;
+ }
+}
+
+//============================================================
+// osd_lock_release
+//============================================================
+
+void osd_lock_release(osd_lock *lock)
+{
+ hidden_mutex_t *mutex = (hidden_mutex_t *) lock;
+
+ LOG(("osd_lock_release"));
+ mutex->locked--;
+ if (mutex->locked == 0)
+ mutex->threadid = -1;
+ SDL_mutexV(mutex->id);
+}
+
+//============================================================
+// osd_lock_free
+//============================================================
+
+void osd_lock_free(osd_lock *lock)
+{
+ hidden_mutex_t *mutex = (hidden_mutex_t *) lock;
+
+ LOG(("osd_lock_free"));
+ //osd_lock_release(lock);
+ SDL_DestroyMutex(mutex->id);
+ free(mutex);
+}
//============================================================
// osd_event_alloc
@@ -191,7 +323,11 @@ osd_thread *osd_thread_create(osd_thread_callback callback, void *cbparam)
return NULL;
thread->callback = callback;
thread->param = cbparam;
+#ifdef SDLMAME_SDL2
thread->thread = SDL_CreateThread(worker_thread_entry, "Thread", thread);
+#else
+ thread->thread = SDL_CreateThread(worker_thread_entry, thread);
+#endif
if ( thread->thread == NULL )
{
free(thread);
diff --git a/src/osd/modules/sync/sync_tc.cpp b/src/osd/modules/sync/sync_tc.cpp
index 64a6a760e96..06dc699edce 100644
--- a/src/osd/modules/sync/sync_tc.cpp
+++ b/src/osd/modules/sync/sync_tc.cpp
@@ -58,6 +58,123 @@ struct osd_thread {
pthread_t thread;
};
+struct osd_scalable_lock
+{
+ osd_lock *lock;
+};
+
+//============================================================
+// Scalable Locks
+//============================================================
+
+osd_scalable_lock *osd_scalable_lock_alloc(void)
+{
+ osd_scalable_lock *lock;
+
+ lock = (osd_scalable_lock *)calloc(1, sizeof(*lock));
+ if (lock == NULL)
+ return NULL;
+
+ lock->lock = osd_lock_alloc();
+ return lock;
+}
+
+
+INT32 osd_scalable_lock_acquire(osd_scalable_lock *lock)
+{
+ osd_lock_acquire(lock->lock);
+ return 0;
+}
+
+
+void osd_scalable_lock_release(osd_scalable_lock *lock, INT32 myslot)
+{
+ osd_lock_release(lock->lock);
+}
+
+void osd_scalable_lock_free(osd_scalable_lock *lock)
+{
+ osd_lock_free(lock->lock);
+ free(lock);
+}
+
+
+//============================================================
+// osd_lock_alloc
+//============================================================
+
+osd_lock *osd_lock_alloc(void)
+{
+ hidden_mutex_t *mutex;
+ pthread_mutexattr_t mtxattr;
+
+ mutex = (hidden_mutex_t *)calloc(1, sizeof(hidden_mutex_t));
+ if (mutex == NULL)
+ return NULL;
+
+ pthread_mutexattr_init(&mtxattr);
+ pthread_mutexattr_settype(&mtxattr, PTHREAD_MUTEX_RECURSIVE);
+ pthread_mutex_init(&mutex->id, &mtxattr);
+
+ return (osd_lock *)mutex;
+}
+
+//============================================================
+// osd_lock_acquire
+//============================================================
+
+void osd_lock_acquire(osd_lock *lock)
+{
+ hidden_mutex_t *mutex = (hidden_mutex_t *) lock;
+ int r;
+
+ r = pthread_mutex_lock(&mutex->id);
+ if (r==0)
+ return;
+ //osd_printf_error("Error on lock: %d: %s\n", r, strerror(r));
+}
+
+//============================================================
+// osd_lock_try
+//============================================================
+
+int osd_lock_try(osd_lock *lock)
+{
+ hidden_mutex_t *mutex = (hidden_mutex_t *) lock;
+ int r;
+
+ r = pthread_mutex_trylock(&mutex->id);
+ if (r==0)
+ return 1;
+ //if (r!=EBUSY)
+ // osd_printf_error("Error on trylock: %d: %s\n", r, strerror(r));
+ return 0;
+}
+
+//============================================================
+// osd_lock_release
+//============================================================
+
+void osd_lock_release(osd_lock *lock)
+{
+ hidden_mutex_t *mutex = (hidden_mutex_t *) lock;
+
+ pthread_mutex_unlock(&mutex->id);
+}
+
+//============================================================
+// osd_lock_free
+//============================================================
+
+void osd_lock_free(osd_lock *lock)
+{
+ hidden_mutex_t *mutex = (hidden_mutex_t *) lock;
+
+ //pthread_mutex_unlock(&mutex->id);
+ pthread_mutex_destroy(&mutex->id);
+ free(mutex);
+}
+
//============================================================
// osd_event_alloc
//============================================================
diff --git a/src/osd/modules/sync/sync_windows.cpp b/src/osd/modules/sync/sync_windows.cpp
index c744f345e6f..9439d68b72c 100644
--- a/src/osd/modules/sync/sync_windows.cpp
+++ b/src/osd/modules/sync/sync_windows.cpp
@@ -23,6 +23,8 @@
//============================================================
#define DEBUG_SLOW_LOCKS 0
+#define USE_SCALABLE_LOCKS (0)
+
//============================================================
@@ -31,6 +33,11 @@
typedef BOOL (WINAPI *try_enter_critical_section_ptr)(LPCRITICAL_SECTION lpCriticalSection);
+struct osd_lock
+{
+ CRITICAL_SECTION critsect;
+};
+
struct osd_event
{
void * ptr;
@@ -42,6 +49,113 @@ struct osd_thread {
void *param;
};
+struct osd_scalable_lock
+{
+#if USE_SCALABLE_LOCKS
+ struct
+ {
+ volatile INT32 haslock; // do we have the lock?
+ INT32 filler[64/4-1]; // assumes a 64-byte cache line
+ } slot[WORK_MAX_THREADS]; // one slot per thread
+ volatile INT32 nextindex; // index of next slot to use
+#else
+ CRITICAL_SECTION section;
+#endif
+};
+
+
+//============================================================
+// GLOBAL VARIABLES
+//============================================================
+
+static try_enter_critical_section_ptr try_enter_critical_section = nullptr;
+static int checked_for_try_enter = FALSE;
+
+
+
+//============================================================
+// osd_lock_alloc
+//============================================================
+
+osd_lock *osd_lock_alloc(void)
+{
+ osd_lock *lock = (osd_lock *)malloc(sizeof(*lock));
+ if (lock == nullptr)
+ return nullptr;
+ InitializeCriticalSection(&lock->critsect);
+ return lock;
+}
+
+
+//============================================================
+// osd_lock_acquire
+//============================================================
+
+void osd_lock_acquire(osd_lock *lock)
+{
+#if DEBUG_SLOW_LOCKS
+ osd_ticks_t ticks = osd_ticks();
+#endif
+
+ // block until we can acquire the lock
+ EnterCriticalSection(&lock->critsect);
+
+#if DEBUG_SLOW_LOCKS
+ // log any locks that take more than 1ms
+ ticks = osd_ticks() - ticks;
+ if (ticks > osd_ticks_per_second() / 1000) osd_printf_debug("Blocked %d ticks on lock acquire\n", (int)ticks);
+#endif
+}
+
+
+//============================================================
+// osd_lock_try
+//============================================================
+
+int osd_lock_try(osd_lock *lock)
+{
+ int result = TRUE;
+
+ // if we haven't yet checked for the TryEnter API, do it now
+ if (!checked_for_try_enter)
+ {
+ // see if we can use TryEnterCriticalSection
+ HMODULE library = LoadLibrary(TEXT("kernel32.dll"));
+ if (library != nullptr)
+ try_enter_critical_section = (try_enter_critical_section_ptr)GetProcAddress(library, "TryEnterCriticalSection");
+ checked_for_try_enter = TRUE;
+ }
+
+ // if we have it, use it, otherwise just block
+ if (try_enter_critical_section != nullptr)
+ result = (*try_enter_critical_section)(&lock->critsect);
+ else
+ EnterCriticalSection(&lock->critsect);
+ return result;
+}
+
+
+//============================================================
+// osd_lock_release
+//============================================================
+
+void osd_lock_release(osd_lock *lock)
+{
+ LeaveCriticalSection(&lock->critsect);
+}
+
+
+//============================================================
+// osd_lock_free
+//============================================================
+
+void osd_lock_free(osd_lock *lock)
+{
+ DeleteCriticalSection(&lock->critsect);
+ free(lock);
+}
+
+
//============================================================
// win_compare_exchange32
//============================================================
@@ -203,3 +317,66 @@ int osd_thread_cpu_affinity(osd_thread *thread, UINT32 mask)
{
return TRUE;
}
+
+//============================================================
+// Scalable Locks
+//============================================================
+
+osd_scalable_lock *osd_scalable_lock_alloc(void)
+{
+ osd_scalable_lock *lock;
+
+ lock = (osd_scalable_lock *)calloc(1, sizeof(*lock));
+ if (lock == nullptr)
+ return nullptr;
+
+ memset(lock, 0, sizeof(*lock));
+#if USE_SCALABLE_LOCKS
+ lock->slot[0].haslock = TRUE;
+#else
+ InitializeCriticalSection(&lock->section);
+#endif
+ return lock;
+}
+
+
+INT32 osd_scalable_lock_acquire(osd_scalable_lock *lock)
+{
+#if USE_SCALABLE_LOCKS
+ INT32 myslot = (atomic_increment32(&lock->nextindex) - 1) & (WORK_MAX_THREADS - 1);
+ INT32 backoff = 1;
+
+ while (!lock->slot[myslot].haslock)
+ {
+ INT32 backcount;
+ for (backcount = 0; backcount < backoff; backcount++)
+ osd_yield_processor();
+ backoff <<= 1;
+ }
+ lock->slot[myslot].haslock = FALSE;
+ return myslot;
+#else
+ EnterCriticalSection(&lock->section);
+ return 0;
+#endif
+}
+
+
+void osd_scalable_lock_release(osd_scalable_lock *lock, INT32 myslot)
+{
+#if USE_SCALABLE_LOCKS
+ atomic_exchange32(&lock->slot[(myslot + 1) & (WORK_MAX_THREADS - 1)].haslock, TRUE);
+#else
+ LeaveCriticalSection(&lock->section);
+#endif
+}
+
+
+void osd_scalable_lock_free(osd_scalable_lock *lock)
+{
+#if USE_SCALABLE_LOCKS
+#else
+ DeleteCriticalSection(&lock->section);
+#endif
+ free(lock);
+}
diff --git a/src/osd/modules/sync/work_osd.cpp b/src/osd/modules/sync/work_osd.cpp
index 3238fdfe792..e5582584666 100644
--- a/src/osd/modules/sync/work_osd.cpp
+++ b/src/osd/modules/sync/work_osd.cpp
@@ -18,7 +18,6 @@
#include <stdint.h>
#endif
#endif
-#include <mutex>
// MAME headers
#include "osdcore.h"
@@ -110,7 +109,7 @@ struct work_thread_info
struct osd_work_queue
{
- std::mutex *lock; // lock for protecting the queue
+ osd_scalable_lock * lock; // lock for protecting the queue
osd_work_item * volatile list; // list of items in the queue
osd_work_item ** volatile tailptr; // pointer to the tail pointer of work items in the queue
osd_work_item * volatile free; // free list of work items
@@ -189,7 +188,7 @@ osd_work_queue *osd_work_queue_alloc(int flags)
goto error;
// initialize the critical section
- queue->lock = new std::mutex();
+ queue->lock = osd_scalable_lock_alloc();
if (queue->lock == NULL)
goto error;
@@ -422,7 +421,7 @@ void osd_work_queue_free(osd_work_queue *queue)
printf("Spin loops = %9d\n", queue->spinloops);
#endif
- delete queue->lock;
+ osd_scalable_lock_free(queue->lock);
// free the queue itself
osd_free(queue);
}
@@ -436,6 +435,7 @@ osd_work_item *osd_work_item_queue_multiple(osd_work_queue *queue, osd_work_call
{
osd_work_item *itemlist = NULL, *lastitem = NULL;
osd_work_item **item_tailptr = &itemlist;
+ INT32 lockslot;
int itemnum;
// loop over items, building up a local list of work
@@ -444,14 +444,12 @@ osd_work_item *osd_work_item_queue_multiple(osd_work_queue *queue, osd_work_call
osd_work_item *item;
// first allocate a new work item; try the free list first
+ INT32 myslot = osd_scalable_lock_acquire(queue->lock);
+ do
{
- queue->lock->lock();
- do
- {
- item = (osd_work_item *)queue->free;
- } while (item != NULL && compare_exchange_ptr((PVOID volatile *)&queue->free, item, item->next) != item);
- queue->lock->unlock();
- }
+ item = (osd_work_item *)queue->free;
+ } while (item != NULL && compare_exchange_ptr((PVOID volatile *)&queue->free, item, item->next) != item);
+ osd_scalable_lock_release(queue->lock, myslot);
// if nothing, allocate something new
if (item == NULL)
@@ -484,12 +482,10 @@ osd_work_item *osd_work_item_queue_multiple(osd_work_queue *queue, osd_work_call
}
// enqueue the whole thing within the critical section
- {
- queue->lock->lock();
- *queue->tailptr = itemlist;
- queue->tailptr = item_tailptr;
- queue->lock->unlock();
- }
+ lockslot = osd_scalable_lock_acquire(queue->lock);
+ *queue->tailptr = itemlist;
+ queue->tailptr = item_tailptr;
+ osd_scalable_lock_release(queue->lock, lockslot);
// increment the number of items in the queue
atomic_add32(&queue->items, numitems);
@@ -543,9 +539,9 @@ int osd_work_item_wait(osd_work_item *item, osd_ticks_t timeout)
// if we don't have an event, create one
if (item->event == NULL)
{
- item->queue->lock->lock();
+ INT32 lockslot = osd_scalable_lock_acquire(item->queue->lock);
item->event = osd_event_alloc(TRUE, FALSE); // manual reset, not signalled
- item->queue->lock->unlock();
+ osd_scalable_lock_release(item->queue->lock, lockslot);
}
else
osd_event_reset(item->event);
@@ -588,13 +584,13 @@ void osd_work_item_release(osd_work_item *item)
osd_work_item_wait(item, 100 * osd_ticks_per_second());
// add us to the free list on our queue
- item->queue->lock->lock();
+ INT32 lockslot = osd_scalable_lock_acquire(item->queue->lock);
do
{
next = (osd_work_item *)item->queue->free;
item->next = next;
} while (compare_exchange_ptr((PVOID volatile *)&item->queue->free, next, item) != next);
- item->queue->lock->unlock();
+ osd_scalable_lock_release(item->queue->lock, lockslot);
}
@@ -715,7 +711,7 @@ static void worker_thread_process(osd_work_queue *queue, work_thread_info *threa
// use a critical section to synchronize the removal of items
{
- queue->lock->lock();
+ INT32 lockslot = osd_scalable_lock_acquire(queue->lock);
if (queue->list == NULL)
{
end_loop = true;
@@ -731,7 +727,7 @@ static void worker_thread_process(osd_work_queue *queue, work_thread_info *threa
queue->tailptr = (osd_work_item **)&queue->list;
}
}
- queue->lock->unlock();
+ osd_scalable_lock_release(queue->lock, lockslot);
}
if (end_loop)
@@ -757,13 +753,13 @@ static void worker_thread_process(osd_work_queue *queue, work_thread_info *threa
// set the result and signal the event
else
{
- queue->lock->lock();
+ INT32 lockslot = osd_scalable_lock_acquire(item->queue->lock);
if (item->event != NULL)
{
osd_event_set(item->event);
add_to_stat(&item->queue->setevents, 1);
}
- queue->lock->unlock();
+ osd_scalable_lock_release(item->queue->lock, lockslot);
}
// if we removed an item and there's still work to do, bump the stats
@@ -784,8 +780,8 @@ static void worker_thread_process(osd_work_queue *queue, work_thread_info *threa
bool queue_has_list_items(osd_work_queue *queue)
{
- queue->lock->lock();
+ INT32 lockslot = osd_scalable_lock_acquire(queue->lock);
bool has_list_items = (queue->list != NULL);
- queue->lock->unlock();
+ osd_scalable_lock_release(queue->lock, lockslot);
return has_list_items;
}
diff --git a/src/osd/osdcore.h b/src/osd/osdcore.h
index cd08fa8aa4e..0a4f351e5e9 100644
--- a/src/osd/osdcore.h
+++ b/src/osd/osdcore.h
@@ -440,6 +440,93 @@ osd_ticks_t osd_ticks_per_second(void);
-----------------------------------------------------------------------------*/
void osd_sleep(osd_ticks_t duration);
+
+
+/***************************************************************************
+ SYNCHRONIZATION INTERFACES
+***************************************************************************/
+
+/* osd_lock is an opaque type which represents a recursive lock/mutex */
+struct osd_lock;
+
+
+/*-----------------------------------------------------------------------------
+ osd_lock_alloc: allocate a new lock
+
+ Parameters:
+
+ None.
+
+ Return value:
+
+ A pointer to the allocated lock.
+-----------------------------------------------------------------------------*/
+osd_lock *osd_lock_alloc(void);
+
+
+/*-----------------------------------------------------------------------------
+ osd_lock_acquire: acquire a lock, blocking until it can be acquired
+
+ Parameters:
+
+ lock - a pointer to a previously allocated osd_lock.
+
+ Return value:
+
+ None.
+
+ Notes:
+
+ osd_locks are defined to be recursive. If the current thread already
+ owns the lock, this function should return immediately.
+-----------------------------------------------------------------------------*/
+void osd_lock_acquire(osd_lock *lock);
+
+
+/*-----------------------------------------------------------------------------
+ osd_lock_try: attempt to acquire a lock
+
+ Parameters:
+
+ lock - a pointer to a previously allocated osd_lock.
+
+ Return value:
+
+ TRUE if the lock was available and was acquired successfully.
+ FALSE if the lock was already in used by another thread.
+-----------------------------------------------------------------------------*/
+int osd_lock_try(osd_lock *lock);
+
+
+/*-----------------------------------------------------------------------------
+ osd_lock_release: release control of a lock that has been acquired
+
+ Parameters:
+
+ lock - a pointer to a previously allocated osd_lock.
+
+ Return value:
+
+ None.
+-----------------------------------------------------------------------------*/
+void osd_lock_release(osd_lock *lock);
+
+
+/*-----------------------------------------------------------------------------
+ osd_lock_free: free the memory and resources associated with an osd_lock
+
+ Parameters:
+
+ lock - a pointer to a previously allocated osd_lock.
+
+ Return value:
+
+ None.
+-----------------------------------------------------------------------------*/
+void osd_lock_free(osd_lock *lock);
+
+
+
/***************************************************************************
WORK ITEM INTERFACES
***************************************************************************/
diff --git a/src/osd/osdmini/minimisc.cpp b/src/osd/osdmini/minimisc.cpp
index 9891447359b..2bf613b0b7c 100644
--- a/src/osd/osdmini/minimisc.cpp
+++ b/src/osd/osdmini/minimisc.cpp
@@ -103,9 +103,11 @@ int osd_setenv(const char *name, const char *value, int overwrite)
//============================================================
// osd_subst_env
//============================================================
-void osd_subst_env(char **dst, const char *src)
+int osd_subst_env(char **dst, const char *src)
{
*dst = (char *)osd_malloc_array(strlen(src) + 1);
if (*dst != nullptr)
strcpy(*dst, src);
+
+ return 0;
}
diff --git a/src/osd/osdmini/minisync.cpp b/src/osd/osdmini/minisync.cpp
new file mode 100644
index 00000000000..a78765f29ed
--- /dev/null
+++ b/src/osd/osdmini/minisync.cpp
@@ -0,0 +1,66 @@
+// license:BSD-3-Clause
+// copyright-holders:Aaron Giles
+//============================================================
+//
+// minisync.c - Minimal core synchronization functions
+//
+//============================================================
+
+#include "osdcore.h"
+
+
+//============================================================
+// osd_lock_alloc
+//============================================================
+
+osd_lock *osd_lock_alloc(void)
+{
+ // the minimal implementation does not support threading
+ // just return a dummy value here
+ return (osd_lock *)1;
+}
+
+
+//============================================================
+// osd_lock_acquire
+//============================================================
+
+void osd_lock_acquire(osd_lock *lock)
+{
+ // the minimal implementation does not support threading
+ // the acquire always "succeeds"
+}
+
+
+//============================================================
+// osd_lock_try
+//============================================================
+
+int osd_lock_try(osd_lock *lock)
+{
+ // the minimal implementation does not support threading
+ // the acquire always "succeeds"
+ return TRUE;
+}
+
+
+//============================================================
+// osd_lock_release
+//============================================================
+
+void osd_lock_release(osd_lock *lock)
+{
+ // the minimal implementation does not support threading
+ // do nothing here
+}
+
+
+//============================================================
+// osd_lock_free
+//============================================================
+
+void osd_lock_free(osd_lock *lock)
+{
+ // the minimal implementation does not support threading
+ // do nothing here
+}
diff --git a/src/osd/sdl/SDLMain_tmpl.h b/src/osd/sdl/SDLMain_tmpl.h
new file mode 100644
index 00000000000..c5ad2a346dd
--- /dev/null
+++ b/src/osd/sdl/SDLMain_tmpl.h
@@ -0,0 +1,13 @@
+// license:Zlib|LGPL-2.1+
+// copyright-holders:http://libsdl.org/
+/* SDLMain.m - main entry point for our Cocoa-ized SDL app
+ Initial Version: Darrell Walisser <dwaliss1@purdue.edu>
+ Non-NIB-Code & other changes: Max Horn <max@quendi.de>
+
+ Feel free to customize this file to suit your needs
+*/
+
+#import <Cocoa/Cocoa.h>
+
+@interface SDLMain : NSObject
+@end
diff --git a/src/osd/sdl/SDLMain_tmpl.mm b/src/osd/sdl/SDLMain_tmpl.mm
new file mode 100644
index 00000000000..78b5d7f4937
--- /dev/null
+++ b/src/osd/sdl/SDLMain_tmpl.mm
@@ -0,0 +1,386 @@
+// license:Zlib|LGPL-2.1+
+// copyright-holders:http://libsdl.org/
+/* SDLMain.m - main entry point for our Cocoa-ized SDL app
+ Initial Version: Darrell Walisser <dwaliss1@purdue.edu>
+ Non-NIB-Code & other changes: Max Horn <max@quendi.de>
+
+ Feel free to customize this file to suit your needs
+*/
+
+#import "sdlinc.h"
+#import "SDLMain_tmpl.h"
+#import <sys/param.h> /* for MAXPATHLEN */
+#import <unistd.h>
+
+/* For some reason, Apple removed setAppleMenu from the headers in 10.4,
+ but the method still is there and works. To avoid warnings, we declare
+ it ourselves here. */
+@interface NSApplication(SDL_Missing_Methods)
+- (void)setAppleMenu:(NSMenu *)menu;
+@end
+
+/* Use this flag to determine whether we use SDLMain.nib or not */
+#define SDL_USE_NIB_FILE 0
+
+/* Use this flag to determine whether we use CPS (docking) or not */
+#define SDL_USE_CPS 0
+#ifdef SDL_USE_CPS
+/* Portions of CPS.h */
+typedef struct CPSProcessSerNum
+{
+ UInt32 lo;
+ UInt32 hi;
+} CPSProcessSerNum;
+
+extern "C" OSErr CPSGetCurrentProcess( CPSProcessSerNum *psn);
+extern "C" OSErr CPSEnableForegroundOperation( CPSProcessSerNum *psn, UInt32 _arg2, UInt32 _arg3, UInt32 _arg4, UInt32 _arg5);
+extern "C" OSErr CPSSetFrontProcess( CPSProcessSerNum *psn);
+
+#endif /* SDL_USE_CPS */
+
+static int gArgc;
+static char **gArgv;
+static BOOL gFinderLaunch;
+static BOOL gCalledAppMainline = FALSE;
+
+static NSString *getApplicationName(void)
+{
+ NSDictionary *dict;
+ NSString *appName = 0;
+
+ /* Determine the application name */
+ dict = (NSDictionary *)CFBundleGetInfoDictionary(CFBundleGetMainBundle());
+ if (dict)
+ appName = [dict objectForKey: @"CFBundleName"];
+
+ if (![appName length])
+ appName = [[NSProcessInfo processInfo] processName];
+
+ return appName;
+}
+
+#if SDL_USE_NIB_FILE
+/* A helper category for NSString */
+@interface NSString (ReplaceSubString)
+- (NSString *)stringByReplacingRange:(NSRange)aRange with:(NSString *)aString;
+@end
+#endif
+
+@interface SDLApplication : NSApplication
+@end
+
+@implementation SDLApplication
+/* Invoked from the Quit menu item */
+- (void)terminate:(id)sender
+{
+ /* Post a SDL_QUIT event */
+ SDL_Event event;
+ event.type = SDL_QUIT;
+ SDL_PushEvent(&event);
+}
+@end
+
+/* The main class of the application, the application's delegate */
+@implementation SDLMain
+
+/* Set the working directory to the .app's parent directory */
+- (void) setupWorkingDirectory:(BOOL)shouldChdir
+{
+ if (shouldChdir)
+ {
+ char parentdir[MAXPATHLEN];
+ CFURLRef url = CFBundleCopyBundleURL(CFBundleGetMainBundle());
+ CFURLRef url2 = CFURLCreateCopyDeletingLastPathComponent(0, url);
+ if (CFURLGetFileSystemRepresentation(url2, true, (UInt8 *)parentdir, MAXPATHLEN)) {
+ assert ( chdir (parentdir) == 0 ); /* chdir to the binary app's parent */
+ }
+ CFRelease(url);
+ CFRelease(url2);
+ }
+
+}
+
+#if SDL_USE_NIB_FILE
+
+/* Fix menu to contain the real app name instead of "SDL App" */
+- (void)fixMenu:(NSMenu *)aMenu withAppName:(NSString *)appName
+{
+ NSRange aRange;
+ NSEnumerator *enumerator;
+ NSMenuItem *menuItem;
+
+ aRange = [[aMenu title] rangeOfString:@"SDL App"];
+ if (aRange.length != 0)
+ [aMenu setTitle: [[aMenu title] stringByReplacingRange:aRange with:appName]];
+
+ enumerator = [[aMenu itemArray] objectEnumerator];
+ while ((menuItem = [enumerator nextObject]))
+ {
+ aRange = [[menuItem title] rangeOfString:@"SDL App"];
+ if (aRange.length != 0)
+ [menuItem setTitle: [[menuItem title] stringByReplacingRange:aRange with:appName]];
+ if ([menuItem hasSubmenu])
+ [self fixMenu:[menuItem submenu] withAppName:appName];
+ }
+ [ aMenu sizeToFit ];
+}
+
+#else
+
+static void setApplicationMenu(void)
+{
+ /* warning: this code is very odd */
+ NSMenu *appleMenu;
+ NSMenuItem *menuItem;
+ NSString *title;
+ NSString *appName;
+
+ appName = getApplicationName();
+ appleMenu = [[NSMenu alloc] initWithTitle:@""];
+
+ /* Add menu items */
+ title = [@"About " stringByAppendingString:appName];
+ [appleMenu addItemWithTitle:title action:@selector(orderFrontStandardAboutPanel:) keyEquivalent:@""];
+
+ [appleMenu addItem:[NSMenuItem separatorItem]];
+
+ title = [@"Hide " stringByAppendingString:appName];
+ [appleMenu addItemWithTitle:title action:@selector(hide:) keyEquivalent:@"h"];
+
+ menuItem = (NSMenuItem *)[appleMenu addItemWithTitle:@"Hide Others" action:@selector(hideOtherApplications:) keyEquivalent:@"h"];
+ [menuItem setKeyEquivalentModifierMask:(NSAlternateKeyMask|NSCommandKeyMask)];
+
+ [appleMenu addItemWithTitle:@"Show All" action:@selector(unhideAllApplications:) keyEquivalent:@""];
+
+ [appleMenu addItem:[NSMenuItem separatorItem]];
+
+ title = [@"Quit " stringByAppendingString:appName];
+ [appleMenu addItemWithTitle:title action:@selector(terminate:) keyEquivalent:@"q"];
+
+
+ /* Put menu into the menubar */
+ menuItem = [[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""];
+ [menuItem setSubmenu:appleMenu];
+ [[NSApp mainMenu] addItem:menuItem];
+
+ /* Tell the application object that this is now the application menu */
+ [NSApp setAppleMenu:appleMenu];
+
+ /* Finally give up our references to the objects */
+ [appleMenu release];
+ [menuItem release];
+}
+
+/* Create a window menu */
+static void setupWindowMenu(void)
+{
+ NSMenu *windowMenu;
+ NSMenuItem *windowMenuItem;
+ NSMenuItem *menuItem;
+
+ windowMenu = [[NSMenu alloc] initWithTitle:@"Window"];
+
+ /* "Minimize" item */
+ menuItem = [[NSMenuItem alloc] initWithTitle:@"Minimize" action:@selector(performMiniaturize:) keyEquivalent:@"m"];
+ [windowMenu addItem:menuItem];
+ [menuItem release];
+
+ /* Put menu into the menubar */
+ windowMenuItem = [[NSMenuItem alloc] initWithTitle:@"Window" action:nil keyEquivalent:@""];
+ [windowMenuItem setSubmenu:windowMenu];
+ [[NSApp mainMenu] addItem:windowMenuItem];
+
+ /* Tell the application object that this is now the window menu */
+ [NSApp setWindowsMenu:windowMenu];
+
+ /* Finally give up our references to the objects */
+ [windowMenu release];
+ [windowMenuItem release];
+}
+
+/* Replacement for NSApplicationMain */
+static void CustomApplicationMain (int argc, char **argv)
+{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ SDLMain *sdlMain;
+
+ /* Ensure the application object is initialised */
+ [SDLApplication sharedApplication];
+
+#ifdef SDL_USE_CPS
+ {
+ CPSProcessSerNum PSN;
+ /* Tell the dock about us */
+ if (!CPSGetCurrentProcess(&PSN))
+ if (!CPSEnableForegroundOperation(&PSN,0x03,0x3C,0x2C,0x1103))
+ if (!CPSSetFrontProcess(&PSN))
+ [SDLApplication sharedApplication];
+ }
+#endif /* SDL_USE_CPS */
+
+ /* Set up the menubar */
+ [NSApp setMainMenu:[[NSMenu alloc] init]];
+ setApplicationMenu();
+ setupWindowMenu();
+
+ /* Create SDLMain and make it the app delegate */
+ sdlMain = [[SDLMain alloc] init];
+ [NSApp setDelegate:sdlMain];
+
+ /* Start the main event loop */
+ [NSApp run];
+
+ [sdlMain release];
+ [pool release];
+}
+
+#endif
+
+
+/*
+ * Catch document open requests...this lets us notice files when the app
+ * was launched by double-clicking a document, or when a document was
+ * dragged/dropped on the app's icon. You need to have a
+ * CFBundleDocumentsType section in your Info.plist to get this message,
+ * apparently.
+ *
+ * Files are added to gArgv, so to the app, they'll look like command line
+ * arguments. Previously, apps launched from the finder had nothing but
+ * an argv[0].
+ *
+ * This message may be received multiple times to open several docs on launch.
+ *
+ * This message is ignored once the app's mainline has been called.
+ */
+- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename
+{
+ const char *temparg;
+ size_t arglen;
+ char *arg;
+ char **newargv;
+
+ if (!gFinderLaunch) /* MacOS is passing command line args. */
+ return FALSE;
+
+ if (gCalledAppMainline) /* app has started, ignore this document. */
+ return FALSE;
+
+ temparg = [filename UTF8String];
+ arglen = SDL_strlen(temparg) + 1;
+ arg = (char *) SDL_malloc(arglen);
+ if (arg == NULL)
+ return FALSE;
+
+ newargv = (char **) SDL_realloc(gArgv, sizeof (char *) * (gArgc + 2));
+ if (newargv == NULL)
+ {
+ SDL_free(arg);
+ return FALSE;
+ }
+ gArgv = newargv;
+
+ SDL_strlcpy(arg, temparg, arglen);
+ gArgv[gArgc++] = arg;
+ gArgv[gArgc] = NULL;
+ return TRUE;
+}
+
+
+/* Called when the internal event loop has just started running */
+- (void) applicationDidFinishLaunching: (NSNotification *) note
+{
+ int status;
+
+ /* Set the working directory to the .app's parent directory */
+ [self setupWorkingDirectory:gFinderLaunch];
+
+#if SDL_USE_NIB_FILE
+ /* Set the main menu to contain the real app name instead of "SDL App" */
+ [self fixMenu:[NSApp mainMenu] withAppName:getApplicationName()];
+#endif
+
+ /* Hand off to main application code */
+ gCalledAppMainline = TRUE;
+ status = SDL_main (gArgc, gArgv);
+
+ /* We're done, thank you for playing */
+ exit(status);
+}
+@end
+
+
+@implementation NSString (ReplaceSubString)
+
+- (NSString *)stringByReplacingRange:(NSRange)aRange with:(NSString *)aString
+{
+ unsigned int bufferSize;
+ unsigned int selfLen = [self length];
+ unsigned int aStringLen = [aString length];
+ unichar *buffer;
+ NSRange localRange;
+ NSString *result;
+
+ bufferSize = selfLen + aStringLen - aRange.length;
+ buffer = (unichar *)NSAllocateMemoryPages(bufferSize*sizeof(unichar));
+
+ /* Get first part into buffer */
+ localRange.location = 0;
+ localRange.length = aRange.location;
+ [self getCharacters:buffer range:localRange];
+
+ /* Get middle part into buffer */
+ localRange.location = 0;
+ localRange.length = aStringLen;
+ [aString getCharacters:(buffer+aRange.location) range:localRange];
+
+ /* Get last part into buffer */
+ localRange.location = aRange.location + aRange.length;
+ localRange.length = selfLen - localRange.location;
+ [self getCharacters:(buffer+aRange.location+aStringLen) range:localRange];
+
+ /* Build output string */
+ result = [NSString stringWithCharacters:buffer length:bufferSize];
+
+ NSDeallocateMemoryPages(buffer, bufferSize);
+
+ return result;
+}
+
+@end
+
+
+
+#ifdef main
+# undef main
+#endif
+
+
+/* Main entry point to executable - should *not* be SDL_main! */
+int main (int argc, char **argv)
+{
+ /* Copy the arguments into a global variable */
+ /* This is passed if we are launched by double-clicking */
+ if ( argc >= 2 && strncmp (argv[1], "-psn", 4) == 0 ) {
+ gArgv = (char **) SDL_malloc(sizeof (char *) * 2);
+ gArgv[0] = argv[0];
+ gArgv[1] = NULL;
+ gArgc = 1;
+ gFinderLaunch = YES;
+ } else {
+ int i;
+ gArgc = argc;
+ gArgv = (char **) SDL_malloc(sizeof (char *) * (argc+1));
+ for (i = 0; i <= argc; i++)
+ gArgv[i] = argv[i];
+ gFinderLaunch = NO;
+ }
+
+#if SDL_USE_NIB_FILE
+ [SDLApplication poseAsClass:[NSApplication class]];
+ NSApplicationMain (argc, argv);
+#else
+ CustomApplicationMain (argc, argv);
+#endif
+ return 0;
+}
+
diff --git a/src/osd/sdl/input.cpp b/src/osd/sdl/input.cpp
index 9cfcdb1cf16..4dfb5bd0ad0 100644
--- a/src/osd/sdl/input.cpp
+++ b/src/osd/sdl/input.cpp
@@ -15,7 +15,6 @@
#include "sdlinc.h"
#include <ctype.h>
#include <stddef.h>
-#include <mutex>
#if USE_XINPUT
// for xinput
@@ -155,7 +154,7 @@ struct device_info
//============================================================
// global states
-static std::mutex input_lock;
+static osd_lock * input_lock;
static UINT8 input_paused;
static sdl_window_info * focus_window = NULL;
@@ -235,6 +234,7 @@ struct kt_table {
char * ui_name;
};
+#if (SDLMAME_SDL2)
#define OSD_SDL_INDEX(x) (x)
#define OSD_SDL_INDEX_KEYSYM(keysym) ((keysym)->scancode)
@@ -364,6 +364,132 @@ static kt_table sdl_key_trans_table[] =
KTT_ENTRY0( BACKSLASH2, NONUSBACKSLASH, 0xdc, '\\', "BACKSLASH2" ),
{ ITEM_ID_INVALID }
};
+#else
+
+#define OSD_SDL_INDEX(x) (SDLK_INDEX(x)-SDLK_FIRST)
+#define OSD_SDL_INDEX_KEYSYM(keysym) (OSD_SDL_INDEX((keysym)->sym))
+#define GET_WINDOW(ev) sdl_window_list
+#define GET_FOCUS_WINDOW(ev) sdl_window_list
+
+#define KTT_ENTRY0(MAME, SDL, VK, AS, UI) { ITEM_ID_ ## MAME, SDLK_ ## SDL, "ITEM_ID_" #MAME, (char *) UI }
+#define KTT_ENTRY1(MAME, SDL) KTT_ENTRY0(MAME, SDL, MAME, MAME, #MAME)
+// only for reference ...
+#define KTT_ENTRY2(MAME, SDL) KTT_ENTRY0(MAME, SDL, 0, 0, #MAME)
+
+
+static kt_table sdl_key_trans_table[] =
+{
+ // MAME key SDL key vkey ascii
+ KTT_ENTRY0( ESC, ESCAPE, 0x1b, 0x1b, "ESC" ),
+ KTT_ENTRY1( 1, 1 ),
+ KTT_ENTRY1( 2, 2 ),
+ KTT_ENTRY1( 3, 3 ),
+ KTT_ENTRY1( 4, 4 ),
+ KTT_ENTRY1( 5, 5 ),
+ KTT_ENTRY1( 6, 6 ),
+ KTT_ENTRY1( 7, 7 ),
+ KTT_ENTRY1( 8, 8 ),
+ KTT_ENTRY1( 9, 9 ),
+ KTT_ENTRY1( 0, 0 ),
+ KTT_ENTRY0( MINUS, MINUS, 0xbd, '-', "MINUS" ),
+ KTT_ENTRY0( EQUALS, EQUALS, 0xbb, '=', "EQUALS" ),
+ KTT_ENTRY0( BACKSPACE, BACKSPACE, 0x08, 0x08, "BACKSPACE" ),
+ KTT_ENTRY0( TAB, TAB, 0x09, 0x09, "TAB" ),
+ KTT_ENTRY1( Q, q ),
+ KTT_ENTRY1( W, w ),
+ KTT_ENTRY1( E, e ),
+ KTT_ENTRY1( R, r ),
+ KTT_ENTRY1( T, t ),
+ KTT_ENTRY1( Y, y ),
+ KTT_ENTRY1( U, u ),
+ KTT_ENTRY1( I, i ),
+ KTT_ENTRY1( O, o ),
+ KTT_ENTRY1( P, p ),
+ KTT_ENTRY0( OPENBRACE, LEFTBRACKET, 0xdb, '[', "OPENBRACE" ),
+ KTT_ENTRY0( CLOSEBRACE,RIGHTBRACKET, 0xdd, ']', "CLOSEBRACE" ),
+ KTT_ENTRY0( ENTER, RETURN, 0x0d, 0x0d, "RETURN" ),
+ KTT_ENTRY2( LCONTROL, LCTRL ),
+ KTT_ENTRY1( A, a ),
+ KTT_ENTRY1( S, s ),
+ KTT_ENTRY1( D, d ),
+ KTT_ENTRY1( F, f ),
+ KTT_ENTRY1( G, g ),
+ KTT_ENTRY1( H, h ),
+ KTT_ENTRY1( J, j ),
+ KTT_ENTRY1( K, k ),
+ KTT_ENTRY1( L, l ),
+ KTT_ENTRY0( COLON, SEMICOLON, 0xba, ';', "COLON" ),
+ KTT_ENTRY0( QUOTE, QUOTE, 0xde, '\'', "QUOTE" ),
+ KTT_ENTRY2( LSHIFT, LSHIFT ),
+ KTT_ENTRY0( BACKSLASH, BACKSLASH, 0xdc, '\\', "BACKSLASH" ),
+ KTT_ENTRY1( Z, z ),
+ KTT_ENTRY1( X, x ),
+ KTT_ENTRY1( C, c ),
+ KTT_ENTRY1( V, v ),
+ KTT_ENTRY1( B, b ),
+ KTT_ENTRY1( N, n ),
+ KTT_ENTRY1( M, m ),
+ KTT_ENTRY0( COMMA, COMMA, 0xbc, ',', "COMMA" ),
+ KTT_ENTRY0( STOP, PERIOD, 0xbe, '.', "STOP" ),
+ KTT_ENTRY0( SLASH, SLASH, 0xbf, '/', "SLASH" ),
+ KTT_ENTRY2( RSHIFT, RSHIFT ),
+ KTT_ENTRY0( ASTERISK, KP_MULTIPLY, '*', '*', "ASTERIX" ),
+ KTT_ENTRY2( LALT, LALT ),
+ KTT_ENTRY0( SPACE, SPACE, ' ', ' ', "SPACE" ),
+ KTT_ENTRY2( CAPSLOCK, CAPSLOCK ),
+ KTT_ENTRY2( F1, F1 ),
+ KTT_ENTRY2( F2, F2 ),
+ KTT_ENTRY2( F3, F3 ),
+ KTT_ENTRY2( F4, F4 ),
+ KTT_ENTRY2( F5, F5 ),
+ KTT_ENTRY2( F6, F6 ),
+ KTT_ENTRY2( F7, F7 ),
+ KTT_ENTRY2( F8, F8 ),
+ KTT_ENTRY2( F9, F9 ),
+ KTT_ENTRY2( F10, F10 ),
+ KTT_ENTRY2( NUMLOCK, NUMLOCK ),
+ KTT_ENTRY2( SCRLOCK, SCROLLOCK ),
+ KTT_ENTRY2( 7_PAD, KP7 ),
+ KTT_ENTRY2( 8_PAD, KP8 ),
+ KTT_ENTRY2( 9_PAD, KP9 ),
+ KTT_ENTRY2( MINUS_PAD, KP_MINUS ),
+ KTT_ENTRY2( 4_PAD, KP4 ),
+ KTT_ENTRY2( 5_PAD, KP5 ),
+ KTT_ENTRY2( 6_PAD, KP6 ),
+ KTT_ENTRY2( PLUS_PAD, KP_PLUS ),
+ KTT_ENTRY2( 1_PAD, KP1 ),
+ KTT_ENTRY2( 2_PAD, KP2 ),
+ KTT_ENTRY2( 3_PAD, KP3 ),
+ KTT_ENTRY2( 0_PAD, KP0 ),
+ KTT_ENTRY2( DEL_PAD, KP_PERIOD ),
+ KTT_ENTRY2( F11, F11 ),
+ KTT_ENTRY2( F12, F12 ),
+ KTT_ENTRY2( F13, F13 ),
+ KTT_ENTRY2( F14, F14 ),
+ KTT_ENTRY2( F15, F15 ),
+ KTT_ENTRY2( ENTER_PAD, KP_ENTER ),
+ KTT_ENTRY2( RCONTROL, RCTRL ),
+ KTT_ENTRY2( SLASH_PAD, KP_DIVIDE ),
+ KTT_ENTRY2( PRTSCR, PRINT ),
+ KTT_ENTRY2( RALT, RALT ),
+ KTT_ENTRY2( HOME, HOME ),
+ KTT_ENTRY2( UP, UP ),
+ KTT_ENTRY2( PGUP, PAGEUP ),
+ KTT_ENTRY2( LEFT, LEFT ),
+ KTT_ENTRY2( RIGHT, RIGHT ),
+ KTT_ENTRY2( END, END ),
+ KTT_ENTRY2( DOWN, DOWN ),
+ KTT_ENTRY2( PGDN, PAGEDOWN ),
+ KTT_ENTRY2( INSERT, INSERT ),
+ { ITEM_ID_DEL, SDLK_DELETE, "ITEM_ID_DEL", (char *)"DELETE" },
+ KTT_ENTRY2( LWIN, LSUPER ),
+ KTT_ENTRY2( RWIN, RSUPER ),
+ KTT_ENTRY2( MENU, MENU ),
+ KTT_ENTRY0( TILDE, BACKQUOTE, 0xc0, '`', "TILDE" ),
+ KTT_ENTRY0( BACKSLASH2, HASH, 0xdc, '\\', "BACKSLASH2" ),
+ { ITEM_ID_INVALID }
+};
+#endif
struct key_lookup_table
{
@@ -371,6 +497,7 @@ struct key_lookup_table
const char *name;
};
+#if (SDLMAME_SDL2)
#define KE(x) { SDL_SCANCODE_ ## x, "SDL_SCANCODE_" #x },
#define KE8(A, B, C, D, E, F, G, H) KE(A) KE(B) KE(C) KE(D) KE(E) KE(F) KE(G) KE(H)
#define KE7(A, B, C, D, E, F, G) KE(A) KE(B) KE(C) KE(D) KE(E) KE(F) KE(G)
@@ -399,6 +526,46 @@ static key_lookup_table sdl_lookup_table[] =
KE(UNDO)
{-1, ""}
};
+#else
+#define KE(x) { SDLK_ ## x, "SDLK_" #x },
+#define KE8(A, B, C, D, E, F, G, H) KE(A) KE(B) KE(C) KE(D) KE(E) KE(F) KE(G) KE(H)
+
+static key_lookup_table sdl_lookup_table[] =
+{
+ KE8(UNKNOWN, FIRST, BACKSPACE, TAB, CLEAR, RETURN, PAUSE, ESCAPE )
+ KE8(SPACE, EXCLAIM, QUOTEDBL, HASH, DOLLAR, AMPERSAND, QUOTE, LEFTPAREN )
+ KE8(RIGHTPAREN, ASTERISK, PLUS, COMMA, MINUS, PERIOD, SLASH, 0 )
+ KE8(1, 2, 3, 4, 5, 6, 7, 8 )
+ KE8(9, COLON, SEMICOLON, LESS, EQUALS, GREATER, QUESTION, AT )
+ KE8(LEFTBRACKET,BACKSLASH, RIGHTBRACKET, CARET, UNDERSCORE, BACKQUOTE, a, b )
+ KE8(c, d, e, f, g, h, i, j )
+ KE8(k, l, m, n, o, p, q, r )
+ KE8(s, t, u, v, w, x, y, z )
+ KE8(DELETE, WORLD_0, WORLD_1, WORLD_2, WORLD_3, WORLD_4, WORLD_5, WORLD_6 )
+ KE8(WORLD_7, WORLD_8, WORLD_9, WORLD_10, WORLD_11, WORLD_12, WORLD_13, WORLD_14 )
+ KE8(WORLD_15, WORLD_16, WORLD_17, WORLD_18, WORLD_19, WORLD_20, WORLD_21, WORLD_22 )
+ KE8(WORLD_23, WORLD_24, WORLD_25, WORLD_26, WORLD_27, WORLD_28, WORLD_29, WORLD_30 )
+ KE8(WORLD_31, WORLD_32, WORLD_33, WORLD_34, WORLD_35, WORLD_36, WORLD_37, WORLD_38 )
+ KE8(WORLD_39, WORLD_40, WORLD_41, WORLD_42, WORLD_43, WORLD_44, WORLD_45, WORLD_46 )
+ KE8(WORLD_47, WORLD_48, WORLD_49, WORLD_50, WORLD_51, WORLD_52, WORLD_53, WORLD_54 )
+ KE8(WORLD_55, WORLD_56, WORLD_57, WORLD_58, WORLD_59, WORLD_60, WORLD_61, WORLD_62 )
+ KE8(WORLD_63, WORLD_64, WORLD_65, WORLD_66, WORLD_67, WORLD_68, WORLD_69, WORLD_70 )
+ KE8(WORLD_71, WORLD_72, WORLD_73, WORLD_74, WORLD_75, WORLD_76, WORLD_77, WORLD_78 )
+ KE8(WORLD_79, WORLD_80, WORLD_81, WORLD_82, WORLD_83, WORLD_84, WORLD_85, WORLD_86 )
+ KE8(WORLD_87, WORLD_88, WORLD_89, WORLD_90, WORLD_91, WORLD_92, WORLD_93, WORLD_94 )
+ KE8(WORLD_95, KP0, KP1, KP2, KP3, KP4, KP5, KP6 )
+ KE8(KP7, KP8, KP9, KP_PERIOD, KP_DIVIDE, KP_MULTIPLY,KP_MINUS, KP_PLUS )
+ KE8(KP_ENTER, KP_EQUALS, UP, DOWN, RIGHT, LEFT, INSERT, HOME )
+ KE8(END, PAGEUP, PAGEDOWN, F1, F2, F3, F4, F5 )
+ KE8(F6, F7, F8, F9, F10, F11, F12, F13 )
+ KE8(F14, F15, NUMLOCK, CAPSLOCK, SCROLLOCK, RSHIFT, LSHIFT, RCTRL )
+ KE8(LCTRL, RALT, LALT, RMETA, LMETA, LSUPER, RSUPER, MODE )
+ KE8(COMPOSE, HELP, PRINT, SYSREQ, BREAK, MENU, POWER, EURO )
+ KE(UNDO)
+ KE(LAST)
+ {-1, ""}
+};
+#endif
//============================================================
// INLINE FUNCTIONS
@@ -550,9 +717,14 @@ static void sdlinput_register_joysticks(running_machine &machine)
{
char *joy_name;
+#if (SDLMAME_SDL2)
joy = SDL_JoystickOpen(physical_stick);
joy_name = remove_spaces(machine, SDL_JoystickName(joy));
SDL_JoystickClose(joy);
+#else
+ joy_name = remove_spaces(machine, SDL_JoystickName(physical_stick));
+#endif
+
devmap_register(&joy_map, physical_stick, joy_name);
}
@@ -1068,7 +1240,7 @@ static kt_table * sdlinput_read_keymap(running_machine &machine)
{
sdl2section = 1;
}
- else if (((1) ^ sdl2section) == 0)
+ else if (((SDLMAME_SDL2) ^ sdl2section) == 0)
{
mks[0]=0;
sks[0]=0;
@@ -1208,6 +1380,10 @@ bool sdl_osd_interface::input_init()
app_has_mouse_focus = 1;
+ // allocate a lock for input synchronizations
+ input_lock = osd_lock_alloc();
+ assert_always(input_lock != NULL, "Failed to allocate input_lock");
+
// register the keyboards
sdlinput_register_keyboards(machine());
@@ -1265,6 +1441,9 @@ void sdl_osd_interface::input_resume()
void sdl_osd_interface::input_exit()
{
+ // free the lock
+ osd_lock_free(input_lock);
+
// deregister
sdlinput_deregister_joysticks(machine());
@@ -1345,6 +1524,7 @@ INT32 normalize_absolute_axis(INT32 raw, INT32 rawmin, INT32 rawmax)
// sdlinput_poll
//============================================================
+#if (SDLMAME_SDL2)
static inline sdl_window_info * window_from_id(Uint32 windowID)
{
sdl_window_info *w;
@@ -1380,15 +1560,19 @@ static inline void resize_all_windows(void)
}
}
+#endif
+
void sdlinput_process_events_buf()
{
SDL_Event event;
if (SDLMAME_EVENTS_IN_WORKER_THREAD)
{
- std::lock_guard<std::mutex> lock(input_lock);
+ osd_lock_acquire(input_lock);
+ #if (SDLMAME_SDL2)
/* Make sure we get all pending events */
SDL_PumpEvents();
+ #endif
while(SDL_PollEvent(&event))
{
if (event_buf_count < MAX_BUF_EVENTS)
@@ -1396,6 +1580,7 @@ void sdlinput_process_events_buf()
else
osd_printf_warning("Event Buffer Overflow!\n");
}
+ osd_lock_release(input_lock);
}
else
SDL_PumpEvents();
@@ -1524,10 +1709,11 @@ void sdlinput_poll(running_machine &machine)
if (SDLMAME_EVENTS_IN_WORKER_THREAD)
{
- std::lock_guard<std::mutex> lock(input_lock);
+ osd_lock_acquire(input_lock);
memcpy(loc_event_buf, event_buf, sizeof(event_buf));
loc_event_buf_count = event_buf_count;
event_buf_count = 0;
+ osd_lock_release(input_lock);
bufp = 0;
}
@@ -1553,8 +1739,12 @@ void sdlinput_poll(running_machine &machine)
devinfo = generic_device_find_index( keyboard_list, keyboard_map.logical[0]);
#endif
devinfo->keyboard.state[OSD_SDL_INDEX_KEYSYM(&event.key.keysym)] = 0x80;
+#if (SDLMAME_SDL2)
if (event.key.keysym.sym < 0x20)
machine.ui_input().push_char_event(sdl_window_list->target(), event.key.keysym.sym);
+#else
+ ui_input_push_char_event(machine, sdl_window_list->target(), (unicode_char) event.key.keysym.unicode);
+#endif
break;
case SDL_KEYUP:
#ifdef SDL2_MULTIAPI
@@ -1673,19 +1863,6 @@ void sdlinput_poll(running_machine &machine)
}
}
break;
- case SDL_MOUSEWHEEL:
-#ifdef SDL2_MULTIAPI
- devinfo = generic_device_find_index(mouse_list, mouse_map.logical[event.wheel.which]);
-#else
- devinfo = generic_device_find_index(mouse_list, mouse_map.logical[0]);
-#endif
- if (devinfo)
- {
- sdl_window_info *window = GET_FOCUS_WINDOW(&event.wheel);
- if (window != NULL)
- machine.ui_input().push_mouse_wheel_event(window->target(), 0, 0, event.wheel.y, 3);
- }
- break;
case SDL_MOUSEBUTTONUP:
#ifdef SDL2_MULTIAPI
devinfo = generic_device_find_index(mouse_list, mouse_map.logical[event.button.which]);
@@ -1712,10 +1889,15 @@ void sdlinput_poll(running_machine &machine)
#else
devinfo = generic_device_find_index(mouse_list, mouse_map.logical[0]);
#endif
+#if (SDLMAME_SDL2)
// FIXME: may apply to 1.2 as well ...
//printf("Motion %d %d %d %s\n", event.motion.which, event.motion.x, event.motion.y, devinfo->name.c_str());
devinfo->mouse.lX += event.motion.xrel * INPUT_RELATIVE_PER_PIXEL;
devinfo->mouse.lY += event.motion.yrel * INPUT_RELATIVE_PER_PIXEL;
+#else
+ devinfo->mouse.lX = event.motion.xrel * INPUT_RELATIVE_PER_PIXEL;
+ devinfo->mouse.lY = event.motion.yrel * INPUT_RELATIVE_PER_PIXEL;
+#endif
{
int cx=-1, cy=-1;
sdl_window_info *window = GET_FOCUS_WINDOW(&event.motion);
@@ -1730,6 +1912,22 @@ void sdlinput_poll(running_machine &machine)
devinfo->joystick.balls[event.jball.ball * 2] = event.jball.xrel * INPUT_RELATIVE_PER_PIXEL;
devinfo->joystick.balls[event.jball.ball * 2 + 1] = event.jball.yrel * INPUT_RELATIVE_PER_PIXEL;
break;
+#if (!SDLMAME_SDL2)
+ case SDL_APPMOUSEFOCUS:
+ app_has_mouse_focus = event.active.gain;
+ if (!event.active.gain)
+ {
+ sdl_window_info *window = GET_FOCUS_WINDOW(&event.motion);
+ ui_input_push_mouse_leave_event(machine, window->target());
+ }
+ break;
+ case SDL_QUIT:
+ machine.schedule_exit();
+ break;
+ case SDL_VIDEORESIZE:
+ sdl_window_list->resize(event.resize.w, event.resize.h);
+ break;
+#else
case SDL_TEXTINPUT:
if (*event.text.text)
{
@@ -1780,8 +1978,8 @@ void sdlinput_poll(running_machine &machine)
#endif
{
//printf("event data1,data2 %d x %d %ld\n", event.window.data1, event.window.data2, sizeof(SDL_Event));
- window->resize(event.window.data1, event.window.data2);
- }
+ window->resize(event.window.data1, event.window.data2);
+ }
}
focus_window = window;
break;
@@ -1797,9 +1995,12 @@ void sdlinput_poll(running_machine &machine)
}
break;
}
+#endif
}
}
+#if (SDLMAME_SDL2)
resize_all_windows();
+#endif
}
@@ -1810,6 +2011,10 @@ void sdlinput_poll(running_machine &machine)
void sdlinput_release_keys()
{
+ // FIXME: SDL >= 1.3 will nuke the window event buffer when
+ // a window is closed. This will leave keys in a pressed
+ // state when a window is destroyed and recreated.
+#if (SDLMAME_SDL2)
device_info *devinfo;
int index;
@@ -1820,6 +2025,7 @@ void sdlinput_release_keys()
break;
memset(&devinfo->keyboard.state, 0, sizeof(devinfo->keyboard.state));
}
+#endif
}
diff --git a/src/osd/sdl/osdsdl.h b/src/osd/sdl/osdsdl.h
index bca299eb49d..e82c75406cc 100644
--- a/src/osd/sdl/osdsdl.h
+++ b/src/osd/sdl/osdsdl.h
@@ -17,9 +17,15 @@
#if defined(SDLMAME_WIN32)
+ #if (SDLMAME_SDL2)
#define SDLMAME_EVENTS_IN_WORKER_THREAD (0)
#define SDLMAME_INIT_IN_WORKER_THREAD (0)
#define SDL13_COMBINE_RESIZE (0) //(1) no longer needed
+ #else
+ #define SDLMAME_EVENTS_IN_WORKER_THREAD (0)
+ #define SDLMAME_INIT_IN_WORKER_THREAD (1)
+ #define SDL13_COMBINE_RESIZE (0)
+ #endif
#else
#define SDLMAME_EVENTS_IN_WORKER_THREAD (0)
#define SDLMAME_INIT_IN_WORKER_THREAD (0)
@@ -116,8 +122,10 @@ public:
const char *joy_index(int index) const { return value(strformat("%s%d", SDLOPTION_JOYINDEX, index).c_str()); }
bool sixaxis() const { return bool_value(SDLOPTION_SIXAXIS); }
+#if (SDLMAME_SDL2)
const char *mouse_index(int index) const { return value(strformat("%s%d", SDLOPTION_MOUSEINDEX, index).c_str()); }
const char *keyboard_index(int index) const { return value(strformat("%s%d", SDLOPTION_KEYBINDEX, index).c_str()); }
+#endif
const char *video_driver() const { return value(SDLOPTION_VIDEODRIVER); }
const char *render_driver() const { return value(SDLOPTION_RENDERDRIVER); }
diff --git a/src/osd/sdl/sdlfile.cpp b/src/osd/sdl/sdlfile.cpp
index 1f6832b03dd..b6088c8aa54 100644
--- a/src/osd/sdl/sdlfile.cpp
+++ b/src/osd/sdl/sdlfile.cpp
@@ -134,8 +134,6 @@ file_error osd_open(const char *path, UINT32 openflags, osd_file **file, UINT64
{
(*file)->type = SDLFILE_SOCKET;
filerr = sdl_open_socket(path, openflags, file, filesize);
- if(filerr != FILERR_NONE && (*file)->socket != -1)
- close((*file)->socket);
goto error;
}
diff --git a/src/osd/sdl/sdlinc.h b/src/osd/sdl/sdlinc.h
index 47ead42c0cf..2bb5dfd0954 100644
--- a/src/osd/sdl/sdlinc.h
+++ b/src/osd/sdl/sdlinc.h
@@ -3,11 +3,20 @@
#ifndef _sdlinc_h_
#define _sdlinc_h_
+#if (SDLMAME_SDL2)
#include <SDL2/SDL.h>
#include <SDL2/SDL_version.h>
// on win32 this includes windows.h by itself and breaks us!
#ifndef SDLMAME_WIN32
#include <SDL2/SDL_syswm.h>
#endif
+#else
+#include <SDL/SDL.h>
+#include <SDL/SDL_version.h>
+// on win32 this includes windows.h by itself and breaks us!
+#if !defined(SDLMAME_WIN32) && !defined(SDLMAME_DARWIN) && !defined(SDLMAME_MACOSX)
+#include <SDL/SDL_syswm.h>
+#endif
+#endif
#endif
diff --git a/src/osd/sdl/sdlmain.cpp b/src/osd/sdl/sdlmain.cpp
index 530aa41c9d4..2f382605cbb 100644
--- a/src/osd/sdl/sdlmain.cpp
+++ b/src/osd/sdl/sdlmain.cpp
@@ -101,7 +101,11 @@ const options_entry sdl_options::s_option_entries[] =
// OS X can be trusted to have working hardware OpenGL, so default to it on for the best user experience
{ SDLOPTION_CENTERH, "1", OPTION_BOOLEAN, "center horizontally within the view area" },
{ SDLOPTION_CENTERV, "1", OPTION_BOOLEAN, "center vertically within the view area" },
+#if (SDLMAME_SDL2)
{ SDLOPTION_SCALEMODE ";sm", OSDOPTVAL_NONE, OPTION_STRING, "Scale mode: none, hwblit, hwbest, yv12, yuy2, yv12x2, yuy2x2 (-video soft only)" },
+#else
+ { SDLOPTION_SCALEMODE ";sm", OSDOPTVAL_NONE, OPTION_STRING, "Scale mode: none, async, yv12, yuy2, yv12x2, yuy2x2 (-video soft only)" },
+#endif
// full screen options
#ifdef SDLMAME_X11
@@ -139,6 +143,7 @@ const options_entry sdl_options::s_option_entries[] =
{ SDLOPTION_LIGHTGUNINDEX "8", OSDOPTVAL_AUTO, OPTION_STRING, "name of lightgun mapped to lightgun #8" },
#endif
+#if (SDLMAME_SDL2)
{ NULL, NULL, OPTION_HEADER, "SDL MOUSE MAPPING" },
{ SDLOPTION_MOUSEINDEX "1", OSDOPTVAL_AUTO, OPTION_STRING, "name of mouse mapped to mouse #1" },
{ SDLOPTION_MOUSEINDEX "2", OSDOPTVAL_AUTO, OPTION_STRING, "name of mouse mapped to mouse #2" },
@@ -158,11 +163,13 @@ const options_entry sdl_options::s_option_entries[] =
{ SDLOPTION_KEYBINDEX "6", OSDOPTVAL_AUTO, OPTION_STRING, "name of keyboard mapped to keyboard #6" },
{ SDLOPTION_KEYBINDEX "7", OSDOPTVAL_AUTO, OPTION_STRING, "name of keyboard mapped to keyboard #7" },
{ SDLOPTION_KEYBINDEX "8", OSDOPTVAL_AUTO, OPTION_STRING, "name of keyboard mapped to keyboard #8" },
-
+#endif
// SDL low level driver options
{ NULL, NULL, OPTION_HEADER, "SDL LOWLEVEL DRIVER OPTIONS" },
{ SDLOPTION_VIDEODRIVER ";vd", OSDOPTVAL_AUTO, OPTION_STRING, "sdl video driver to use ('x11', 'directfb', ... or 'auto' for SDL default" },
+#if (SDLMAME_SDL2)
{ SDLOPTION_RENDERDRIVER ";rd", OSDOPTVAL_AUTO, OPTION_STRING, "sdl render driver to use ('software', 'opengl', 'directfb' ... or 'auto' for SDL default" },
+#endif
{ SDLOPTION_AUDIODRIVER ";ad", OSDOPTVAL_AUTO, OPTION_STRING, "sdl audio driver to use ('alsa', 'arts', ... or 'auto' for SDL default" },
#if USE_OPENGL
{ SDLOPTION_GL_LIB, SDLOPTVAL_GLLIB, OPTION_STRING, "alternative libGL.so to use; 'auto' for system default" },
@@ -218,6 +225,21 @@ int main(int argc, char *argv[])
{
int res = 0;
+#if defined(SDLMAME_X11) && !(SDLMAME_SDL2)
+ XInitThreads();
+#endif
+
+#if defined(SDLMAME_WIN32)
+#if !(SDLMAME_SDL2)
+ /* Load SDL dynamic link library */
+ if ( SDL_Init(SDL_INIT_NOPARACHUTE) < 0 ) {
+ fprintf(stderr, "WinMain() error: %s", SDL_GetError());
+ return(FALSE);
+ }
+ SDL_SetModuleHandle(GetModuleHandle(NULL));
+#endif
+#endif
+
// disable I/O buffering
setvbuf(stdout, (char *) NULL, _IONBF, 0);
setvbuf(stderr, (char *) NULL, _IONBF, 0);
@@ -235,6 +257,25 @@ int main(int argc, char *argv[])
MorphToPM();
#endif
+#if defined(SDLMAME_X11) && (SDL_MAJOR_VERSION == 1) && (SDL_MINOR_VERSION == 2)
+ if (SDL_Linked_Version()->patch < 10)
+ /* workaround for SDL choosing a 32-bit ARGB visual */
+ {
+ Display *display;
+ if ((display = XOpenDisplay(NULL)) && (DefaultDepth(display, DefaultScreen(display)) >= 24))
+ {
+ XVisualInfo vi;
+ char buf[130];
+ if (XMatchVisualInfo(display, DefaultScreen(display), 24, TrueColor, &vi)) {
+ snprintf(buf, sizeof(buf), "0x%lx", vi.visualid);
+ osd_setenv(SDLENV_VISUALID, buf, 0);
+ }
+ }
+ if (display)
+ XCloseDisplay(display);
+ }
+#endif
+
{
sdl_options options;
sdl_osd_interface osd(options);
@@ -299,7 +340,11 @@ void sdl_osd_interface::osd_exit()
if (!SDLMAME_INIT_IN_WORKER_THREAD)
{
/* FixMe: Bug in SDL2.0, Quitting joystick will cause SIGSEGV */
+#if SDLMAME_SDL2
SDL_QuitSubSystem(SDL_INIT_TIMER| SDL_INIT_VIDEO /*| SDL_INIT_JOYSTICK */);
+#else
+ SDL_Quit();
+#endif
}
}
@@ -374,6 +419,7 @@ static void defines_verbose(void)
static void osd_sdl_info(void)
{
+#if SDLMAME_SDL2
int i, num = SDL_GetNumVideoDrivers();
osd_printf_verbose("Available videodrivers: ");
@@ -410,6 +456,8 @@ static void osd_sdl_info(void)
{
osd_printf_verbose("\t%-20s\n", SDL_GetAudioDriver(i));
}
+
+#endif
}
@@ -464,6 +512,7 @@ void sdl_osd_interface::init(running_machine &machine)
osd_setenv(SDLENV_VIDEODRIVER, stemp, 1);
}
+#if (SDLMAME_SDL2)
stemp = options().render_driver();
if (stemp != NULL)
{
@@ -483,6 +532,7 @@ void sdl_osd_interface::init(running_machine &machine)
#endif
}
}
+#endif
/* Set the SDL environment variable for drivers wanting to load the
* lib at startup.
@@ -517,12 +567,16 @@ void sdl_osd_interface::init(running_machine &machine)
if (!SDLMAME_INIT_IN_WORKER_THREAD)
{
+#if (SDLMAME_SDL2)
#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)) {
#else
if (SDL_InitSubSystem(SDL_INIT_TIMER| SDL_INIT_VIDEO| SDL_INIT_JOYSTICK|SDL_INIT_NOPARACHUTE)) {
#endif
+#else
+ if (SDL_Init(SDL_INIT_TIMER|SDL_INIT_VIDEO| SDL_INIT_JOYSTICK|SDL_INIT_NOPARACHUTE)) {
+#endif
osd_printf_error("Could not initialize SDL %s\n", SDL_GetError());
exit(-1);
}
@@ -546,9 +600,13 @@ void sdl_osd_interface::init(running_machine &machine)
m_watchdog->setTimeout(watchdog_timeout);
}
+#if (SDLMAME_SDL2)
#ifdef SDLMAME_EMSCRIPTEN
SDL_EventState(SDL_TEXTINPUT, SDL_FALSE);
#else
SDL_EventState(SDL_TEXTINPUT, SDL_TRUE);
#endif
+#else
+ SDL_EnableUNICODE(SDL_TRUE);
+#endif
}
diff --git a/src/osd/sdl/sdlos_unix.cpp b/src/osd/sdl/sdlos_unix.cpp
index 23080512e91..5811e0c7dc5 100644
--- a/src/osd/sdl/sdlos_unix.cpp
+++ b/src/osd/sdl/sdlos_unix.cpp
@@ -23,6 +23,11 @@
// MAME headers
#include "osdcore.h"
+
+
+
+#if (SDLMAME_SDL2)
+
//============================================================
// osd_get_clipboard_text
//============================================================
@@ -40,3 +45,104 @@ char *osd_get_clipboard_text(void)
}
return result;
}
+
+#elif defined(SDL_VIDEO_DRIVER_X11) && defined(SDLMAME_X11)
+
+//============================================================
+// osd_get_clipboard_text
+//============================================================
+
+char *osd_get_clipboard_text(void)
+{
+ SDL_SysWMinfo info;
+ Display* display;
+ Window our_win;
+ Window selection_win;
+ Atom data_type;
+ int data_format;
+ unsigned long nitems;
+ unsigned long bytes_remaining;
+ unsigned char* prop;
+ char* result;
+ XEvent event;
+ Uint32 t0, t1;
+ Atom types[2];
+ int i;
+
+ /* get & validate SDL sys-wm info */
+ SDL_VERSION(&info.version);
+ if ( ! SDL_GetWMInfo( &info ) )
+ return NULL;
+ if ( info.subsystem != SDL_SYSWM_X11 )
+ return NULL;
+ if ( (display = info.info.x11.display) == NULL )
+ return NULL;
+ if ( (our_win = info.info.x11.window) == None )
+ return NULL;
+
+ /* request data to owner */
+ selection_win = XGetSelectionOwner( display, XA_PRIMARY );
+ if ( selection_win == None )
+ return NULL;
+
+ /* first, try UTF-8, then latin-1 */
+ types[0] = XInternAtom( display, "UTF8_STRING", False );
+ types[1] = XA_STRING; /* latin-1 */
+
+ for ( i = 0; i < ARRAY_LENGTH(types); i++ )
+ {
+ XConvertSelection( display, XA_PRIMARY, types[i], types[i], our_win, CurrentTime );
+
+ /* wait for SelectionNotify, but no more than 100 ms */
+ t0 = t1 = SDL_GetTicks();
+ while ( 1 )
+ {
+ if ( XCheckTypedWindowEvent( display, our_win, SelectionNotify, &event ) ) break;
+ SDL_Delay( 1 );
+ t1 = SDL_GetTicks();
+ if ( t1 - t0 > 100 )
+ return NULL;
+ }
+ if ( event.xselection.property == None )
+ continue;
+
+ /* get property & check its type */
+ if ( XGetWindowProperty( display, our_win, types[i], 0, 65536, False, types[i],
+ &data_type, &data_format, &nitems, &bytes_remaining, &prop )
+ != Success )
+ continue;
+ if ( ! prop )
+ continue;
+ if ( (data_format != 8) || (data_type != types[i]) )
+ {
+ XFree( prop );
+ continue;
+ }
+
+ /* return a copy & free original */
+ if (prop != NULL)
+ {
+ result = (char *) osd_malloc_array(strlen((char *)prop)+1);
+ strcpy(result, (char *)prop);
+ }
+ else
+ result = NULL;
+ XFree( prop );
+ return result;
+ }
+
+ return NULL;
+}
+
+#else
+//============================================================
+// osd_get_clipboard_text
+//============================================================
+
+char *osd_get_clipboard_text(void)
+{
+ char *result = NULL;
+
+ return result;
+}
+#endif
diff --git a/src/osd/sdl/testkeys.cpp b/src/osd/sdl/testkeys.cpp
index 850ec1ad506..444c1b9eeb2 100644
--- a/src/osd/sdl/testkeys.cpp
+++ b/src/osd/sdl/testkeys.cpp
@@ -24,6 +24,7 @@ struct key_lookup_table
const char *name;
};
+#if (SDLMAME_SDL2)
#define KE(x) { SDL_SCANCODE_ ## x, "SDL_SCANCODE_" #x },
#define KE8(A, B, C, D, E, F, G, H) KE(A) KE(B) KE(C) KE(D) KE(E) KE(F) KE(G) KE(H)
#define KE7(A, B, C, D, E, F, G) KE(A) KE(B) KE(C) KE(D) KE(E) KE(F) KE(G)
@@ -52,6 +53,46 @@ static key_lookup_table sdl_lookup[] =
KE5(MENU, NONUSBACKSLASH, UNDO, APOSTROPHE, GRAVE )
{-1, ""}
};
+#else
+#define KE(x) { SDLK_ ## x, "SDLK_" #x },
+#define KE8(A, B, C, D, E, F, G, H) KE(A) KE(B) KE(C) KE(D) KE(E) KE(F) KE(G) KE(H)
+
+static key_lookup_table sdl_lookup[] =
+{
+ KE8(UNKNOWN, FIRST, BACKSPACE, TAB, CLEAR, RETURN, PAUSE, ESCAPE )
+ KE8(SPACE, EXCLAIM, QUOTEDBL, HASH, DOLLAR, AMPERSAND, QUOTE, LEFTPAREN )
+ KE8(RIGHTPAREN, ASTERISK, PLUS, COMMA, MINUS, PERIOD, SLASH, 0 )
+ KE8(1, 2, 3, 4, 5, 6, 7, 8 )
+ KE8(9, COLON, SEMICOLON, LESS, EQUALS, GREATER, QUESTION, AT )
+ KE8(LEFTBRACKET,BACKSLASH, RIGHTBRACKET, CARET, UNDERSCORE, BACKQUOTE, a, b )
+ KE8(c, d, e, f, g, h, i, j )
+ KE8(k, l, m, n, o, p, q, r )
+ KE8(s, t, u, v, w, x, y, z )
+ KE8(DELETE, WORLD_0, WORLD_1, WORLD_2, WORLD_3, WORLD_4, WORLD_5, WORLD_6 )
+ KE8(WORLD_7, WORLD_8, WORLD_9, WORLD_10, WORLD_11, WORLD_12, WORLD_13, WORLD_14 )
+ KE8(WORLD_15, WORLD_16, WORLD_17, WORLD_18, WORLD_19, WORLD_20, WORLD_21, WORLD_22 )
+ KE8(WORLD_23, WORLD_24, WORLD_25, WORLD_26, WORLD_27, WORLD_28, WORLD_29, WORLD_30 )
+ KE8(WORLD_31, WORLD_32, WORLD_33, WORLD_34, WORLD_35, WORLD_36, WORLD_37, WORLD_38 )
+ KE8(WORLD_39, WORLD_40, WORLD_41, WORLD_42, WORLD_43, WORLD_44, WORLD_45, WORLD_46 )
+ KE8(WORLD_47, WORLD_48, WORLD_49, WORLD_50, WORLD_51, WORLD_52, WORLD_53, WORLD_54 )
+ KE8(WORLD_55, WORLD_56, WORLD_57, WORLD_58, WORLD_59, WORLD_60, WORLD_61, WORLD_62 )
+ KE8(WORLD_63, WORLD_64, WORLD_65, WORLD_66, WORLD_67, WORLD_68, WORLD_69, WORLD_70 )
+ KE8(WORLD_71, WORLD_72, WORLD_73, WORLD_74, WORLD_75, WORLD_76, WORLD_77, WORLD_78 )
+ KE8(WORLD_79, WORLD_80, WORLD_81, WORLD_82, WORLD_83, WORLD_84, WORLD_85, WORLD_86 )
+ KE8(WORLD_87, WORLD_88, WORLD_89, WORLD_90, WORLD_91, WORLD_92, WORLD_93, WORLD_94 )
+ KE8(WORLD_95, KP0, KP1, KP2, KP3, KP4, KP5, KP6 )
+ KE8(KP7, KP8, KP9, KP_PERIOD, KP_DIVIDE, KP_MULTIPLY,KP_MINUS, KP_PLUS )
+ KE8(KP_ENTER, KP_EQUALS, UP, DOWN, RIGHT, LEFT, INSERT, HOME )
+ KE8(END, PAGEUP, PAGEDOWN, F1, F2, F3, F4, F5 )
+ KE8(F6, F7, F8, F9, F10, F11, F12, F13 )
+ KE8(F14, F15, NUMLOCK, CAPSLOCK, SCROLLOCK, RSHIFT, LSHIFT, RCTRL )
+ KE8(LCTRL, RALT, LALT, RMETA, LMETA, LSUPER, RSUPER, MODE )
+ KE8(COMPOSE, HELP, PRINT, SYSREQ, BREAK, MENU, POWER, EURO )
+ KE(UNDO)
+ KE(LAST)
+ {-1, ""}
+};
+#endif
static const char * lookup_key_name(const key_lookup_table *kt, int kc)
{
@@ -73,14 +114,23 @@ int main(int argc, char *argv[])
{
SDL_Event event;
int quit = 0;
+#if (SDLMAME_SDL2)
char lasttext[20] = "";
+#else
+ char buf[20];
+#endif
if ( SDL_Init(SDL_INIT_VIDEO) < 0 ) {
fprintf(stderr, "Couldn't initialize SDL: %s\n",
SDL_GetError());
exit(1);
}
+#if (SDLMAME_SDL2)
SDL_CreateWindow("Input Test", 0, 0, 100, 100,0 );
+#else
+ SDL_SetVideoMode(100, 50, 16, SDL_ANYFORMAT);
+ SDL_EnableUNICODE(1);
+#endif
while(SDL_PollEvent(&event) || !quit) {
switch(event.type) {
case SDL_QUIT:
@@ -91,24 +141,46 @@ int main(int argc, char *argv[])
quit=1;
else
{
+#if (SDLMAME_SDL2)
printf("ITEM_ID_XY %s 0x%x 0x%x %s\n",
lookup_key_name(sdl_lookup, event.key.keysym.scancode),
(int) event.key.keysym.scancode,
(int) event.key.keysym.sym,
"");
lasttext[0] = 0;
+#else
+ memset(buf, 0, 19);
+ utf8_from_uchar(buf, sizeof(buf), event.key.keysym.unicode);
+ printf("ITEM_ID_XY %s 0x%x 0x%x %s\n",
+ lookup_key_name(sdl_lookup, event.key.keysym.sym),
+ (int) event.key.keysym.scancode,
+ (int) event.key.keysym.unicode,
+ buf);
+#endif
}
break;
case SDL_KEYUP:
+#if (SDLMAME_SDL2)
printf("ITEM_ID_XY %s 0x%x 0x%x %s\n",
lookup_key_name(sdl_lookup, event.key.keysym.scancode),
(int) event.key.keysym.scancode,
(int) event.key.keysym.sym,
lasttext);
+#else
+ memset(buf, 0, 19);
+ utf8_from_uchar(buf, sizeof(buf), event.key.keysym.unicode);
+ printf("ITEM_ID_XY %s 0x%x 0x%x %s\n",
+ lookup_key_name(sdl_lookup, event.key.keysym.sym),
+ (int) event.key.keysym.scancode,
+ (int) event.key.keysym.unicode,
+ buf);
+#endif
break;
+#if (SDLMAME_SDL2)
case SDL_TEXTINPUT:
strcpy(lasttext, event.text.text);
break;
+#endif
}
event.type = 0;
diff --git a/src/osd/sdl/video.cpp b/src/osd/sdl/video.cpp
index ca7286d5696..c5de6be41d9 100644
--- a/src/osd/sdl/video.cpp
+++ b/src/osd/sdl/video.cpp
@@ -7,6 +7,33 @@
// SDLMAME by Olivier Galibert and R. Belmont
//
//============================================================
+
+#ifdef SDLMAME_X11
+#include <X11/extensions/Xinerama.h>
+#endif
+
+#ifdef SDLMAME_MACOSX
+#undef Status
+#include <Carbon/Carbon.h>
+#endif
+
+#ifdef SDLMAME_WIN32
+// for multimonitor
+#ifndef _WIN32_WINNT
+#define _WIN32_WINNT 0x501
+#endif
+
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+
+#include "strconv.h"
+#endif
+
+#ifdef SDLMAME_OS2
+#define INCL_WINSYS
+#include <os2.h>
+#endif
+
#include "sdlinc.h"
// MAME headers
@@ -107,9 +134,15 @@ void sdl_osd_interface::video_exit()
//============================================================
// sdlvideo_monitor_refresh
//============================================================
-
+#if defined(SDLMAME_WIN32) // Win32 version
+inline osd_rect RECT_to_osd_rect(const RECT &r)
+{
+ return osd_rect(r.left, r.top, r.right - r.left, r.bottom - r.top);
+}
+#endif
void sdl_monitor_info::refresh()
{
+ #if (SDLMAME_SDL2)
SDL_DisplayMode dmode;
#if defined(SDLMAME_WIN32)
@@ -123,8 +156,128 @@ void sdl_monitor_info::refresh()
m_pos_size = SDL_Rect_to_osd_rect(dimensions);
m_usuable_pos_size = SDL_Rect_to_osd_rect(dimensions);
m_is_primary = (m_handle == 0);
+
+ #else
+ #if defined(SDLMAME_WIN32) // Win32 version
+ MONITORINFOEX info;
+ info.cbSize = sizeof(info);
+ GetMonitorInfo((HMONITOR)m_handle, (LPMONITORINFO)&info);
+ m_pos_size = RECT_to_osd_rect(info.rcMonitor);
+ m_usuable_pos_size = RECT_to_osd_rect(info.rcWork);
+ m_is_primary = ((info.dwFlags & MONITORINFOF_PRIMARY) != 0);
+ char *temp = utf8_from_wstring(info.szDevice);
+ strncpy(m_name, temp, ARRAY_LENGTH(m_name) - 1);
+ osd_free(temp);
+ #elif defined(SDLMAME_MACOSX) // Mac OS X Core Imaging version
+ CGDirectDisplayID primary;
+ CGRect dbounds;
+
+ // get the main display
+ primary = CGMainDisplayID();
+ dbounds = CGDisplayBounds(primary);
+
+ m_is_primary = (m_handle == 0);
+ m_pos_size = osd_rect(0, 0, dbounds.size.width - dbounds.origin.x, dbounds.size.height - dbounds.origin.y);
+ m_usuable_pos_size = m_pos_size;
+ strncpy(m_name, "Mac OS X display", ARRAY_LENGTH(m_name) - 1);
+ #elif defined(SDLMAME_X11) || defined(SDLMAME_NO_X11) // X11 version
+ {
+ #if defined(SDLMAME_X11)
+ // X11 version
+ int screen;
+ SDL_SysWMinfo info;
+ SDL_VERSION(&info.version);
+
+ if ( SDL_GetWMInfo(&info) && (info.subsystem == SDL_SYSWM_X11) )
+ {
+ screen = DefaultScreen(info.info.x11.display);
+ SDL_VideoDriverName(m_name, ARRAY_LENGTH(m_name) - 1);
+ m_pos_size = osd_rect(0, 0,
+ DisplayWidth(info.info.x11.display, screen),
+ DisplayHeight(info.info.x11.display, screen));
+
+ /* FIXME: If Xinerame is used we should compile a list of monitors
+ * like we do for other targets and ignore SDL.
+ */
+ if ((XineramaIsActive(info.info.x11.display)) && video_config.restrictonemonitor)
+ {
+ XineramaScreenInfo *xineinfo;
+ int numscreens;
+
+ xineinfo = XineramaQueryScreens(info.info.x11.display, &numscreens);
+
+ m_pos_size = osd_rect(0, 0, xineinfo[0].width, xineinfo[0].height);
+
+ XFree(xineinfo);
+ }
+ m_usuable_pos_size = m_pos_size;
+ m_is_primary = (m_handle == 0);
+ }
+ else
+ #endif // defined(SDLMAME_X11)
+ {
+ static int first_call=0;
+ static int cw = 0, ch = 0;
+
+ SDL_VideoDriverName(m_name, ARRAY_LENGTH(m_name) - 1);
+ if (first_call==0)
+ {
+ const char *dimstr = osd_getenv(SDLENV_DESKTOPDIM);
+ const SDL_VideoInfo *sdl_vi;
+
+ sdl_vi = SDL_GetVideoInfo();
+ #if (SDL_VERSION_ATLEAST(1,2,10))
+ cw = sdl_vi->current_w;
+ ch = sdl_vi->current_h;
+ #endif
+ first_call=1;
+ if ((cw==0) || (ch==0))
+ {
+ if (dimstr != NULL)
+ {
+ sscanf(dimstr, "%dx%d", &cw, &ch);
+ }
+ if ((cw==0) || (ch==0))
+ {
+ osd_printf_warning("WARNING: SDL_GetVideoInfo() for driver <%s> is broken.\n", m_name);
+ osd_printf_warning(" You should set SDLMAME_DESKTOPDIM to your desktop size.\n");
+ osd_printf_warning(" e.g. export SDLMAME_DESKTOPDIM=800x600\n");
+ osd_printf_warning(" Assuming 1024x768 now!\n");
+ cw=1024;
+ ch=768;
+ }
+ }
+ }
+ m_pos_size = osd_rect(0, 0, cw, ch);
+ m_usuable_pos_size = m_pos_size;
+ m_is_primary = (m_handle == 0);
+ }
+ }
+ #elif defined(SDLMAME_OS2) // OS2 version
+ m_pos_size = osd_rect(0, 0,
+ WinQuerySysValue( HWND_DESKTOP, SV_CXSCREEN ),
+ WinQuerySysValue( HWND_DESKTOP, SV_CYSCREEN ) );
+ m_usuable_pos_size = m_pos_size;
+ m_is_primary = (m_handle == 0);
+ strncpy(m_name, "OS/2 display", ARRAY_LENGTH(m_name) - 1);
+ #else
+ #error Unknown SDLMAME_xx OS type!
+ #endif
+
+ {
+ static int info_shown=0;
+ if (!info_shown)
+ {
+ osd_printf_verbose("SDL Device Driver : %s\n", m_name);
+ osd_printf_verbose("SDL Monitor Dimensions: %d x %d\n", m_pos_size.width(), m_pos_size.height());
+ info_shown = 1;
+ }
+ }
+ #endif // (SDLMAME_SDL2)
}
+
+
//============================================================
// sdlvideo_monitor_get_aspect
//============================================================
@@ -172,6 +325,68 @@ void sdl_osd_interface::update(bool skip_redraw)
//============================================================
+// add_primary_monitor
+//============================================================
+
+#if !defined(SDLMAME_WIN32) && !(SDLMAME_SDL2)
+void sdl_monitor_info::add_primary_monitor(void *data)
+{
+ // make a list of monitors
+ osd_monitor_info::list = NULL;
+ osd_monitor_info **tailptr = &sdl_monitor_info::list;
+
+ // allocate a new monitor info
+ osd_monitor_info *monitor = global_alloc_clear<sdl_monitor_info>(0, "", 1.0f);
+
+ //monitor->refresh();
+ // guess the aspect ratio assuming square pixels
+ monitor->set_aspect((float)(monitor->position_size().width()) / (float)(monitor->position_size().height()));
+
+ // hook us into the list
+ *tailptr = monitor;
+ //tailptr = &monitor->m_next;
+}
+#endif
+
+
+//============================================================
+// monitor_enum_callback
+//============================================================
+
+#if defined(SDLMAME_WIN32) && !(SDLMAME_SDL2)
+BOOL CALLBACK sdl_monitor_info::monitor_enum_callback(HMONITOR handle, HDC dc, LPRECT rect, LPARAM data)
+{
+ osd_monitor_info ***tailptr = (osd_monitor_info ***)data;
+ osd_monitor_info *monitor;
+ MONITORINFOEX info;
+ BOOL result;
+
+ // get the monitor info
+ info.cbSize = sizeof(info);
+ result = GetMonitorInfo(handle, (LPMONITORINFO)&info);
+ assert(result);
+ (void)result; // to silence gcc 4.6
+
+ // guess the aspect ratio assuming square pixels
+ float aspect = (float)(info.rcMonitor.right - info.rcMonitor.left) / (float)(info.rcMonitor.bottom - info.rcMonitor.top);
+
+ // allocate a new monitor info
+ char *temp = utf8_from_wstring(info.szDevice);
+ // copy in the data
+ monitor = global_alloc(sdl_monitor_info((UINT64) handle, temp, aspect));
+ osd_free(temp);
+
+ // hook us into the list
+ **tailptr = monitor;
+ *tailptr = &monitor->m_next;
+
+ // enumerate all the available monitors so to list their names in verbose mode
+ return TRUE;
+}
+#endif
+
+
+//============================================================
// init_monitors
//============================================================
@@ -183,6 +398,7 @@ void sdl_monitor_info::init()
osd_monitor_info::list = NULL;
tailptr = &osd_monitor_info::list;
+ #if (SDLMAME_SDL2)
{
int i;
@@ -211,6 +427,11 @@ void sdl_monitor_info::init()
}
}
osd_printf_verbose("Leave init_monitors\n");
+ #elif defined(SDLMAME_WIN32)
+ EnumDisplayMonitors(NULL, NULL, monitor_enum_callback, (LPARAM)&tailptr);
+ #else
+ add_primary_monitor((void *)&tailptr);
+ #endif
}
void sdl_monitor_info::exit()
@@ -313,7 +534,7 @@ static void check_osd_inputs(running_machine &machine)
machine.ui().popup_time(1, "Keepaspect %s", video_config.keepaspect? "enabled":"disabled");
}
- #if (USE_OPENGL)
+ #if (USE_OPENGL || SDLMAME_SDL2)
//FIXME: on a per window basis
if (machine.ui_input().pressed(IPT_OSD_5))
{
@@ -379,14 +600,16 @@ void sdl_osd_interface::extract_video_config()
}
else if (USE_OPENGL && (strcmp(stemp, SDLOPTVAL_OPENGL) == 0))
video_config.mode = VIDEO_MODE_OPENGL;
- else if ((strcmp(stemp, SDLOPTVAL_SDL2ACCEL) == 0))
+ else if (SDLMAME_SDL2 && (strcmp(stemp, SDLOPTVAL_SDL2ACCEL) == 0))
{
video_config.mode = VIDEO_MODE_SDL2ACCEL;
}
+#ifdef USE_BGFX
else if (strcmp(stemp, SDLOPTVAL_BGFX) == 0)
{
video_config.mode = VIDEO_MODE_BGFX;
}
+#endif
else
{
osd_printf_warning("Invalid video value %s; reverting to software\n", stemp);
@@ -470,11 +693,19 @@ void sdl_osd_interface::extract_video_config()
// misc options: sanity check values
// global options: sanity check values
+#if (!SDLMAME_SDL2)
+ if (video_config.numscreens < 1 || video_config.numscreens > 1) //MAX_VIDEO_WINDOWS)
+ {
+ osd_printf_warning("Invalid numscreens value %d; reverting to 1\n", video_config.numscreens);
+ video_config.numscreens = 1;
+ }
+#else
if (video_config.numscreens < 1 || video_config.numscreens > MAX_VIDEO_WINDOWS)
{
osd_printf_warning("Invalid numscreens value %d; reverting to 1\n", video_config.numscreens);
video_config.numscreens = 1;
}
+#endif
// yuv settings ...
stemp = options().scale_mode();
video_config.scale_mode = drawsdl_scale_mode(stemp);
diff --git a/src/osd/sdl/video.h b/src/osd/sdl/video.h
index a811a417ef4..699f98512d1 100644
--- a/src/osd/sdl/video.h
+++ b/src/osd/sdl/video.h
@@ -11,6 +11,11 @@
#ifndef __SDLVIDEO__
#define __SDLVIDEO__
+#if defined(SDLMAME_WIN32) && !(SDLMAME_SDL2)
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#endif
+
#include "osdsdl.h"
//============================================================
@@ -159,6 +164,12 @@ public:
// STATIC
static void init();
static void exit();
+#if !defined(SDLMAME_WIN32) && !(SDLMAME_SDL2)
+ static void add_primary_monitor(void *data);
+#endif
+#if defined(SDLMAME_WIN32) && !(SDLMAME_SDL2)
+ static BOOL CALLBACK monitor_enum_callback(HMONITOR handle, HDC dc, LPRECT rect, LPARAM data);
+#endif
private:
void virtual refresh() override;
@@ -181,6 +192,9 @@ struct osd_video_config
int fullstretch; // FXIME: implement in windows!
+ // ddraw options
+ int hwstretch; // stretch using the hardware
+
// d3d, accel, opengl
int filter; // enable filtering
//int filter; // enable filtering, disabled if glsl_filter>0
diff --git a/src/osd/sdl/window.cpp b/src/osd/sdl/window.cpp
index 113a00b47bf..47ab3cdd162 100644
--- a/src/osd/sdl/window.cpp
+++ b/src/osd/sdl/window.cpp
@@ -16,7 +16,11 @@
// standard SDL headers
#include "sdlinc.h"
+#if (SDLMAME_SDL2)
#include <SDL2/SDL_thread.h>
+#else
+#include <SDL/SDL_thread.h>
+#endif
// standard C headers
#include <math.h>
@@ -88,6 +92,10 @@ static sdl_window_info **last_window_ptr;
static int multithreading_enabled;
static osd_work_queue *work_queue;
+#if !(SDLMAME_SDL2) && (!defined(SDLMAME_EMSCRIPTEN))
+typedef int SDL_threadID;
+#endif
+
static SDL_threadID main_threadid;
static SDL_threadID window_threadid;
@@ -181,7 +189,11 @@ static OSDWORK_CALLBACK(sdlwindow_thread_id)
if (SDLMAME_INIT_IN_WORKER_THREAD)
{
+#if (SDLMAME_SDL2)
if (SDL_InitSubSystem(SDL_INIT_TIMER|SDL_INIT_AUDIO| SDL_INIT_VIDEO| SDL_INIT_JOYSTICK|SDL_INIT_NOPARACHUTE))
+#else
+ if (SDL_Init(SDL_INIT_TIMER|SDL_INIT_AUDIO| SDL_INIT_VIDEO| SDL_INIT_JOYSTICK|SDL_INIT_NOPARACHUTE))
+#endif
{
osd_printf_error("Could not initialize SDL: %s.\n", SDL_GetError());
exit(-1);
@@ -230,22 +242,27 @@ bool sdl_osd_interface::window_init()
video_config.mode = VIDEO_MODE_SOFT;
}
#endif
+#if SDLMAME_SDL2
if (video_config.mode == VIDEO_MODE_SDL2ACCEL)
{
if (drawsdl2_init(machine(), &draw))
video_config.mode = VIDEO_MODE_SOFT;
}
+#endif
+#ifdef USE_BGFX
if (video_config.mode == VIDEO_MODE_BGFX)
{
if (drawbgfx_init(machine(), &draw))
video_config.mode = VIDEO_MODE_SOFT;
}
+#endif
if (video_config.mode == VIDEO_MODE_SOFT)
{
if (drawsdl_init(&draw))
return false;
}
+#if SDLMAME_SDL2
/* We may want to set a number of the hints SDL2 provides.
* The code below will document which hints were set.
*/
@@ -277,6 +294,7 @@ bool sdl_osd_interface::window_init()
osd_printf_verbose("\nHints:\n");
for (int i = 0; hints[i] != NULL; i++)
osd_printf_verbose("\t%-40s %s\n", hints[i], SDL_GetHint(hints[i]));
+#endif
// set up the window list
last_window_ptr = &sdl_window_list;
@@ -460,7 +478,14 @@ OSDWORK_CALLBACK( sdl_window_info::sdlwindow_resize_wt )
ASSERT_WINDOW_THREAD();
+#if (SDLMAME_SDL2)
SDL_SetWindowSize(window->sdl_window(), width, height);
+#else
+ SDL_FreeSurface(window->m_sdlsurf);
+
+ window->m_sdlsurf = SDL_SetVideoMode(width, height, 0,
+ SDL_SWSURFACE | SDL_ANYFORMAT | window->m_extra_flags);
+#endif
window->renderer().notify_changed();
osd_free(wp);
@@ -534,6 +559,7 @@ OSDWORK_CALLBACK( sdl_window_info::sdlwindow_toggle_full_screen_wt )
global_free(window->m_renderer);
window->m_renderer = NULL;
+#if (SDLMAME_SDL2)
bool is_osx = false;
#ifdef SDLMAME_MACOSX
// FIXME: This is weird behaviour and certainly a bug in SDL
@@ -546,6 +572,15 @@ OSDWORK_CALLBACK( sdl_window_info::sdlwindow_toggle_full_screen_wt )
SDL_SetWindowFullscreen(window->sdl_window(), SDL_WINDOW_FULLSCREEN); // Try to set mode
}
SDL_DestroyWindow(window->sdl_window());
+#else
+ if (window->m_sdlsurf)
+ {
+ SDL_FreeSurface(window->m_sdlsurf);
+ window->m_sdlsurf = NULL;
+ }
+#endif
+
+
sdlinput_release_keys();
window->set_renderer(draw.create(window));
@@ -612,6 +647,7 @@ void sdl_window_info::update_cursor_state()
c=SDL_CreateCursor(data, data, 8, 8, 0, 0);
SDL_SetCursor(c);
#else
+#if (SDLMAME_SDL2)
// do not do mouse capture if the debugger's enabled to avoid
// the possibility of losing control
if (!(machine().debug_flags & DEBUG_FLAG_OSD_ENABLED))
@@ -634,6 +670,30 @@ void sdl_window_info::update_cursor_state()
}
SDL_SetCursor(NULL); // Force an update in case the underlying driver has changed visibility
}
+
+#else
+ // do not do mouse capture if the debugger's enabled to avoid
+ // the possibility of losing control
+ if (!(machine().debug_flags & DEBUG_FLAG_OSD_ENABLED))
+ {
+ if ( fullscreen() || sdlinput_should_hide_mouse() )
+ {
+ SDL_ShowCursor(SDL_DISABLE);
+ if (!SDL_WM_GrabInput(SDL_GRAB_QUERY))
+ {
+ SDL_WM_GrabInput(SDL_GRAB_ON);
+ }
+ }
+ else
+ {
+ SDL_ShowCursor(SDL_ENABLE);
+ if (SDL_WM_GrabInput(SDL_GRAB_QUERY))
+ {
+ SDL_WM_GrabInput(SDL_GRAB_OFF);
+ }
+ }
+ }
+#endif
#endif
}
@@ -733,6 +793,7 @@ OSDWORK_CALLBACK( sdl_window_info::sdlwindow_video_window_destroy_wt )
// free the textures etc
window->renderer().destroy();
+#if (SDLMAME_SDL2)
if (window->fullscreen() && video_config.switchres)
{
SDL_SetWindowFullscreen(window->sdl_window(), 0); // Try to set mode
@@ -740,6 +801,14 @@ OSDWORK_CALLBACK( sdl_window_info::sdlwindow_video_window_destroy_wt )
SDL_SetWindowFullscreen(window->sdl_window(), SDL_WINDOW_FULLSCREEN); // Try to set mode
}
SDL_DestroyWindow(window->sdl_window());
+#else
+ if (window->m_sdlsurf)
+ {
+ SDL_FreeSurface(window->m_sdlsurf);
+ window->m_sdlsurf = NULL;
+ }
+#endif
+
// release all keys ...
sdlinput_release_keys();
@@ -784,6 +853,7 @@ void sdl_window_info::destroy()
// pick_best_mode
//============================================================
+#if SDLMAME_SDL2
osd_dim sdl_window_info::pick_best_mode()
{
int minimum_width, minimum_height, target_width, target_height;
@@ -852,6 +922,82 @@ osd_dim sdl_window_info::pick_best_mode()
}
return ret;
}
+#else
+osd_dim sdl_window_info::pick_best_mode()
+{
+ int minimum_width, minimum_height, target_width, target_height;
+ int i;
+ float size_score, best_score = 0.0f;
+ int best_width = 0, best_height = 0;
+ SDL_Rect **modes;
+
+ // determine the minimum width/height for the selected target
+ m_target->compute_minimum_size(minimum_width, minimum_height);
+
+ // use those as the target for now
+ target_width = minimum_width * MAX(1, prescale());
+ target_height = minimum_height * MAX(1, prescale());
+
+ // if we're not stretching, allow some slop on the minimum since we can handle it
+ {
+ minimum_width -= 4;
+ minimum_height -= 4;
+ }
+
+#if 1 // defined(SDLMAME_WIN32)
+ /*
+ * We need to do this here. If SDL_ListModes is
+ * called in init_monitors, the call will crash
+ * on win32
+ */
+ modes = SDL_ListModes(NULL, SDL_FULLSCREEN | SDL_DOUBLEBUF);
+#else
+ modes = window->m_monitor->modes;
+#endif
+
+ if (modes == (SDL_Rect **)0)
+ {
+ osd_printf_error("SDL: No modes available?!\n");
+ exit(-1);
+ }
+ else if (modes == (SDL_Rect **)-1) // all modes are possible
+ {
+ return osd_dim(m_win_config.width, m_win_config.height);
+ }
+ else
+ {
+ for (i = 0; modes[i]; ++i)
+ {
+ // compute initial score based on difference between target and current
+ size_score = 1.0f / (1.0f + fabsf((INT32)modes[i]->w - target_width) + fabsf((INT32)modes[i]->h - target_height));
+
+ // if the mode is too small, give a big penalty
+ if (modes[i]->w < minimum_width || modes[i]->h < minimum_height)
+ size_score *= 0.01f;
+
+ // if mode is smaller than we'd like, it only scores up to 0.1
+ if (modes[i]->w < target_width || modes[i]->h < target_height)
+ size_score *= 0.1f;
+
+ // if we're looking for a particular mode, that's a winner
+ if (modes[i]->w == m_win_config.width && modes[i]->h == m_win_config.height)
+ size_score = 2.0f;
+
+ osd_printf_verbose("%4dx%4d -> %f\n", (int)modes[i]->w, (int)modes[i]->h, size_score);
+
+ // best so far?
+ if (size_score > best_score)
+ {
+ best_score = size_score;
+ best_width = modes[i]->w;
+ best_height = modes[i]->h;
+ }
+
+ }
+ }
+ return osd_dim(best_width, best_height);
+}
+#endif
//============================================================
// sdlwindow_video_window_update
@@ -996,6 +1142,8 @@ OSDWORK_CALLBACK( sdl_window_info::complete_create_wt )
*/
osd_printf_verbose("Enter sdl_info::create\n");
+#if (SDLMAME_SDL2)
+
if (window->renderer().has_flags(osd_renderer::FLAG_NEEDS_OPENGL))
{
SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
@@ -1079,18 +1227,48 @@ OSDWORK_CALLBACK( sdl_window_info::complete_create_wt )
SDL_SetWindowGrab(window->sdl_window(), SDL_TRUE);
#endif
- // set main window
- if (window->m_index > 0)
+#else
+ window->m_extra_flags = (window->fullscreen() ? SDL_FULLSCREEN : SDL_RESIZABLE);
+
+ if (window->renderer().has_flags(osd_renderer::FLAG_NEEDS_DOUBLEBUF))
+ window->m_extra_flags |= SDL_DOUBLEBUF;
+ if (window->renderer().has_flags(osd_renderer::FLAG_NEEDS_ASYNCBLIT))
+ window->m_extra_flags |= SDL_ASYNCBLIT;
+
+ if (window->renderer().has_flags(osd_renderer::FLAG_NEEDS_OPENGL))
{
- for (auto w = sdl_window_list; w != NULL; w = w->m_next)
- {
- if (w->m_index == 0)
- {
- window->m_main = w;
- break;
- }
- }
+ window->m_extra_flags |= SDL_DOUBLEBUF | SDL_OPENGL;
+ SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
+ #if (SDL_VERSION_ATLEAST(1,2,10)) && (!defined(SDLMAME_EMSCRIPTEN))
+ SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, video_config.waitvsync ? 1 : 0);
+ #endif
+ // load_gl_lib(window->machine());
}
+
+ // create the SDL surface (which creates the window in windowed mode)
+#if 0
+ window->m_sdlsurf = SDL_SetVideoMode(tempwidth, tempheight,
+ 0, SDL_OPENGL | SDL_FULLSCREEN);// | window->m_extra_flags);
+ if (!window->m_sdlsurf)
+ printf("completely failed\n");
+#endif
+ window->m_sdlsurf = SDL_SetVideoMode(temp.width(), temp.height(),
+ 0, SDL_SWSURFACE | SDL_ANYFORMAT | window->m_extra_flags);
+
+ if (!window->m_sdlsurf)
+ {
+ osd_printf_error("SDL Error: %s\n", SDL_GetError());
+ return (void *) &result[1];
+ }
+ if ( (video_config.mode == VIDEO_MODE_OPENGL) && !(window->m_sdlsurf->flags & SDL_OPENGL) )
+ {
+ osd_printf_error("OpenGL not supported on this driver!\n");
+ return (void *) &result[1];
+ }
+ // set the window title
+ SDL_WM_SetCaption(window->m_title, "SDLMAME");
+#endif
+
window->monitor()->refresh();
// initialize the drawing backend
if (window->renderer().create())
diff --git a/src/osd/sdl/window.h b/src/osd/sdl/window.h
index bdaaa311330..3de110fe536 100644
--- a/src/osd/sdl/window.h
+++ b/src/osd/sdl/window.h
@@ -38,14 +38,21 @@ public:
const osd_window_config *config)
: osd_window(), m_next(NULL),
// Following three are used by input code to defer resizes
+#if (SDLMAME_SDL2)
m_resize_width(0),
m_resize_height(0),
m_last_resize(0),
+#endif
m_minimum_dim(0,0),
m_windowed_dim(0,0),
m_rendered_event(0), m_target(0),
+#if (SDLMAME_SDL2)
m_sdl_window(NULL),
- m_machine(a_machine), m_monitor(a_monitor), m_fullscreen(0)
+
+#else
+ m_sdlsurf(NULL),
+#endif
+ m_machine(a_machine), m_monitor(a_monitor), m_fullscreen(0), m_index(0)
{
m_win_config = *config;
m_index = index;
@@ -74,9 +81,13 @@ public:
osd_dim get_size() override
{
+#if (SDLMAME_SDL2)
int w=0; int h=0;
SDL_GetWindowSize(m_sdl_window, &w, &h);
return osd_dim(w,h);
+#else
+ return osd_dim(m_sdlsurf->w, m_sdlsurf->h);
+#endif
}
int xy_to_render_target(int x, int y, int *xt, int *yt);
@@ -86,7 +97,11 @@ public:
int fullscreen() const override { return m_fullscreen; }
render_target *target() override { return m_target; }
+#if (SDLMAME_SDL2)
SDL_Window *sdl_window() override { return m_sdl_window; }
+#else
+ SDL_Surface *sdl_surface() { return m_sdlsurf; }
+#endif
osd_dim blit_surface_size() override;
int prescale() const { return m_prescale; }
@@ -94,10 +109,12 @@ public:
// Pointer to next window
sdl_window_info * m_next;
+#if (SDLMAME_SDL2)
// These are used in combine resizing events ... #if SDL13_COMBINE_RESIZE
int m_resize_width;
int m_resize_height;
osd_ticks_t m_last_resize;
+#endif
private:
// window handle and info
@@ -112,10 +129,15 @@ private:
osd_event * m_rendered_event;
render_target * m_target;
+#if (SDLMAME_SDL2)
// Needs to be here as well so we can identify window
SDL_Window *m_sdl_window;
// Original display_mode
SDL_DisplayMode m_original_mode;
+#else
+ // SDL surface
+ SDL_Surface *m_sdlsurf;
+#endif
int m_extra_flags;
@@ -143,6 +165,7 @@ private:
// monitor info
osd_monitor_info * m_monitor;
int m_fullscreen;
+ int m_index;
osd_renderer * m_renderer;
// static callbacks ...
diff --git a/src/osd/windows/input.cpp b/src/osd/windows/input.cpp
index 6a9d534a2f6..0165e4820f0 100644
--- a/src/osd/windows/input.cpp
+++ b/src/osd/windows/input.cpp
@@ -39,7 +39,6 @@
#include "config.h"
#include "winutil.h"
-#include <mutex>
//============================================================
// PARAMETERS
@@ -167,7 +166,7 @@ typedef /*WINUSERAPI*/ BOOL (WINAPI *register_rawinput_devices_ptr)(IN PCRAWINPU
// global states
static bool input_enabled;
-static std::mutex input_lock;
+static osd_lock * input_lock;
static bool input_paused;
static DWORD last_poll;
@@ -470,6 +469,10 @@ static inline INT32 normalize_absolute_axis(INT32 raw, INT32 rawmin, INT32 rawma
bool windows_osd_interface::input_init()
{
+ // allocate a lock for input synchronizations, since messages sometimes come from another thread
+ input_lock = osd_lock_alloc();
+ assert_always(input_lock != NULL, "Failed to allocate input_lock");
+
// decode the options
lightgun_shared_axis_mode = downcast<windows_options &>(machine().options()).dual_lightgun();
@@ -509,8 +512,15 @@ void windows_osd_interface::input_resume()
void windows_osd_interface::input_exit()
{
// acquire the lock and turn off input (this ensures everyone is done)
- std::lock_guard<std::mutex> lock(input_lock);
- input_enabled = false;
+ if (input_lock != NULL)
+ {
+ osd_lock_acquire(input_lock);
+ input_enabled = false;
+ osd_lock_release(input_lock);
+
+ // free the lock
+ osd_lock_free(input_lock);
+ }
}
@@ -603,7 +613,7 @@ BOOL wininput_handle_mouse_button(int button, int down, int x, int y)
}
// take the lock
- std::lock_guard<std::mutex> lock(input_lock);
+ osd_lock_acquire(input_lock);
// set the button state
devinfo->mouse.state.rgbButtons[button] = down ? 0x80 : 0x00;
@@ -622,6 +632,9 @@ BOOL wininput_handle_mouse_button(int button, int down, int x, int y)
devinfo->mouse.state.lX = normalize_absolute_axis(mousepos.x, client_rect.left, client_rect.right);
devinfo->mouse.state.lY = normalize_absolute_axis(mousepos.y, client_rect.top, client_rect.bottom);
}
+
+ // release the lock
+ osd_lock_release(input_lock);
return TRUE;
}
@@ -648,7 +661,7 @@ BOOL wininput_handle_raw(HANDLE device)
// if necessary, allocate a temporary buffer and fetch the data
if (size > sizeof(small_buffer))
{
- data = global_alloc_array_nothrow(BYTE, size);
+ data = global_alloc_array(BYTE, size);
if (data == NULL)
return result;
}
@@ -662,16 +675,18 @@ BOOL wininput_handle_raw(HANDLE device)
// handle keyboard input
if (input->header.dwType == RIM_TYPEKEYBOARD)
{
- std::lock_guard<std::mutex> lock(input_lock);
+ osd_lock_acquire(input_lock);
rawinput_keyboard_update(input->header.hDevice, &input->data.keyboard);
+ osd_lock_release(input_lock);
result = TRUE;
}
// handle mouse input
else if (input->header.dwType == RIM_TYPEMOUSE)
{
- std::lock_guard<std::mutex> lock(input_lock);
+ osd_lock_acquire(input_lock);
rawinput_mouse_update(input->header.hDevice, &input->data.mouse);
+ osd_lock_release(input_lock);
result = TRUE;
}
}
@@ -789,11 +804,6 @@ void windows_osd_interface::customize_input_type_list(simple_list<input_type_ent
entry->defseq(SEQ_TYPE_STANDARD).set(KEYCODE_F12, KEYCODE_LSHIFT, input_seq::not_code, KEYCODE_LALT);
break;
- // add a NOT-lalt to write timecode file
- case IPT_UI_TIMECODE: // emu/input.c: input_seq(KEYCODE_F12, input_seq::not_code, KEYCODE_LSHIFT)
- entry->defseq(SEQ_TYPE_STANDARD).set(KEYCODE_F12, input_seq::not_code, KEYCODE_LSHIFT, input_seq::not_code, KEYCODE_LALT);
- break;
-
// lctrl-lalt-F5 to toggle post-processing
case IPT_OSD_4:
entry->configure_osd("POST_PROCESS", "Toggle Post-Processing");
@@ -2191,13 +2201,14 @@ static void rawinput_mouse_poll(device_info *devinfo)
poll_if_necessary(devinfo->machine());
// copy the accumulated raw state to the actual state
- std::lock_guard<std::mutex> lock(input_lock);
+ osd_lock_acquire(input_lock);
devinfo->mouse.state.lX = devinfo->mouse.raw_x;
devinfo->mouse.state.lY = devinfo->mouse.raw_y;
devinfo->mouse.state.lZ = devinfo->mouse.raw_z;
devinfo->mouse.raw_x = 0;
devinfo->mouse.raw_y = 0;
devinfo->mouse.raw_z = 0;
+ osd_lock_release(input_lock);
}
diff --git a/src/osd/windows/output.cpp b/src/osd/windows/output.cpp
index ef3c563e3ac..3b390b1f3a1 100644
--- a/src/osd/windows/output.cpp
+++ b/src/osd/windows/output.cpp
@@ -313,8 +313,8 @@ static void notifier_callback(const char *outname, INT32 value, void *param)
// loop over clients and notify them
for (client = clientlist; client != nullptr; client = client->next)
{
- if (param == nullptr || param == client->machine) {
+ printf("there are clients\n");
+ if (param == nullptr || param == client)
PostMessage(client->hwnd, om_mame_update_state, client->machine->output().name_to_id(outname), value);
- }
}
}
diff --git a/src/osd/windows/video.cpp b/src/osd/windows/video.cpp
index b441121f1ca..b4f665a2135 100644
--- a/src/osd/windows/video.cpp
+++ b/src/osd/windows/video.cpp
@@ -373,10 +373,14 @@ void windows_osd_interface::extract_video_config()
video_config.mode = VIDEO_MODE_D3D;
else if (strcmp(stemp, "auto") == 0)
video_config.mode = VIDEO_MODE_D3D;
+ else if (strcmp(stemp, "ddraw") == 0)
+ video_config.mode = VIDEO_MODE_DDRAW;
else if (strcmp(stemp, "gdi") == 0)
video_config.mode = VIDEO_MODE_GDI;
+#if defined (USE_BGFX)
else if (strcmp(stemp, "bgfx") == 0)
video_config.mode = VIDEO_MODE_BGFX;
+#endif
else if (strcmp(stemp, "none") == 0)
{
video_config.mode = VIDEO_MODE_NONE;
@@ -397,6 +401,9 @@ void windows_osd_interface::extract_video_config()
video_config.triplebuf = options().triple_buffer();
video_config.switchres = options().switch_res();
+ // ddraw options: extract the data
+ video_config.hwstretch = options().hwstretch();
+
if (video_config.prescale < 1 || video_config.prescale > 3)
{
osd_printf_warning("Invalid prescale option, reverting to '1'\n");
diff --git a/src/osd/windows/video.h b/src/osd/windows/video.h
index 87612fb51fe..9215dc189bf 100644
--- a/src/osd/windows/video.h
+++ b/src/osd/windows/video.h
@@ -21,7 +21,10 @@
enum {
VIDEO_MODE_NONE,
VIDEO_MODE_GDI,
+ VIDEO_MODE_DDRAW,
+#if defined (USE_BGFX)
VIDEO_MODE_BGFX,
+#endif
#if (USE_OPENGL)
VIDEO_MODE_OPENGL,
#endif
@@ -177,6 +180,9 @@ struct osd_video_config
int fullstretch; // FXIME: implement in windows!
+ // ddraw options
+ int hwstretch; // stretch using the hardware
+
// d3d, accel, opengl
int filter; // enable filtering
//int filter; // enable filtering, disabled if glsl_filter>0
diff --git a/src/osd/windows/window.cpp b/src/osd/windows/window.cpp
index 0fbfae9c481..6111859a255 100644
--- a/src/osd/windows/window.cpp
+++ b/src/osd/windows/window.cpp
@@ -36,8 +36,11 @@
extern int drawnone_init(running_machine &machine, osd_draw_callbacks *callbacks);
extern int drawgdi_init(running_machine &machine, osd_draw_callbacks *callbacks);
+extern int drawdd_init(running_machine &machine, osd_draw_callbacks *callbacks);
extern int drawd3d_init(running_machine &machine, osd_draw_callbacks *callbacks);
+#if defined(USE_BGFX)
extern int drawbgfx_init(running_machine &machine, osd_draw_callbacks *callbacks);
+#endif
#if (USE_OPENGL)
extern int drawogl_init(running_machine &machine, osd_draw_callbacks *callbacks);
#endif
@@ -130,11 +133,11 @@ struct mtlog
};
static mtlog mtlog[100000];
-static volatile INT32 mtlogindex;
+static volatile LONG mtlogindex;
void mtlog_add(const char *event)
{
- int index = atomic_increment32((INT32 *) &mtlogindex) - 1;
+ int index = atomic_increment32((LONG *) &mtlogindex) - 1;
if (index < ARRAY_LENGTH(mtlog))
{
mtlog[index].timestamp = osd_ticks();
@@ -218,10 +221,17 @@ bool windows_osd_interface::window_init()
if (drawd3d_init(machine(), &draw))
video_config.mode = VIDEO_MODE_GDI;
}
+ if (video_config.mode == VIDEO_MODE_DDRAW)
+ {
+ if (drawdd_init(machine(), &draw))
+ video_config.mode = VIDEO_MODE_GDI;
+ }
if (video_config.mode == VIDEO_MODE_GDI)
drawgdi_init(machine(), &draw);
+#if defined(USE_BGFX)
if (video_config.mode == VIDEO_MODE_BGFX)
drawbgfx_init(machine(), &draw);
+#endif
if (video_config.mode == VIDEO_MODE_NONE)
drawnone_init(machine(), &draw);
#if (USE_OPENGL)
@@ -252,6 +262,7 @@ void windows_osd_interface::window_exit()
win_window_list = temp->m_next;
temp->destroy();
global_free(temp);
+
}
// kill the drawers
@@ -289,6 +300,7 @@ win_window_info::win_window_info(running_machine &machine)
m_fullscreen(0),
m_fullscreen_safe(0),
m_aspect(0),
+ m_render_lock(NULL),
m_target(NULL),
m_targetview(0),
m_targetorient(0),
@@ -649,20 +661,7 @@ void win_window_info::create(running_machine &machine, int index, osd_monitor_in
window->m_win_config = *config;
window->m_monitor = monitor;
window->m_fullscreen = !video_config.windowed;
- window->m_index = index;
- // set main window
- if (index > 0)
- {
- for (auto w = win_window_list; w != NULL; w = w->m_next)
- {
- if (w->m_index == 0)
- {
- window->m_main = w;
- break;
- }
- }
- }
// see if we are safe for fullscreen
window->m_fullscreen_safe = TRUE;
for (win = win_window_list; win != NULL; win = win->m_next)
@@ -673,6 +672,9 @@ void win_window_info::create(running_machine &machine, int index, osd_monitor_in
*last_window_ptr = window;
last_window_ptr = &window->m_next;
+ // create a lock that we can use to skip blitting
+ window->m_render_lock = osd_lock_alloc();
+
// load the layout
window->m_target = machine.render().target_alloc();
@@ -744,6 +746,11 @@ void win_window_info::destroy()
// free the render target
machine().render().target_free(m_target);
+
+ // FIXME: move to destructor
+ // free the lock
+ osd_lock_free(m_render_lock);
+
}
@@ -785,15 +792,15 @@ void win_window_info::update()
// if we're visible and running and not in the middle of a resize, draw
if (m_hwnd != NULL && m_target != NULL && m_renderer != NULL)
{
- bool got_lock = true;
+ int got_lock = TRUE;
mtlog_add("winwindow_video_window_update: try lock");
// only block if we're throttled
if (machine().video().throttled() || timeGetTime() - last_update_time > 250)
- m_render_lock.lock();
+ osd_lock_acquire(m_render_lock);
else
- got_lock = m_render_lock.try_lock();
+ got_lock = osd_lock_try(m_render_lock);
// only render if we were able to get the lock
if (got_lock)
@@ -803,7 +810,7 @@ void win_window_info::update()
mtlog_add("winwindow_video_window_update: got lock");
// don't hold the lock; we just used it to see if rendering was still happening
- m_render_lock.unlock();
+ osd_lock_release(m_render_lock);
// ensure the target bounds are up-to-date, and then get the primitives
primlist = m_renderer->get_primitives();
@@ -1322,14 +1329,6 @@ LRESULT CALLBACK win_window_info::video_window_proc(HWND wnd, UINT message, WPAR
window->machine().ui_input().push_char_event(window->m_target, (unicode_char) wparam);
break;
- case WM_MOUSEWHEEL:
- {
- UINT ucNumLines = 3; // default
- SystemParametersInfo(SPI_GETWHEELSCROLLLINES, 0, &ucNumLines, 0);
- window->machine().ui_input().push_mouse_wheel_event(window->m_target, GET_X_LPARAM(lparam), GET_Y_LPARAM(lparam), GET_WHEEL_DELTA_WPARAM(wparam), ucNumLines);
- break;
- }
-
// pause the system when we start a menu or resize
case WM_ENTERSIZEMOVE:
window->m_resize_state = RESIZE_STATE_RESIZING;
@@ -1412,9 +1411,9 @@ LRESULT CALLBACK win_window_info::video_window_proc(HWND wnd, UINT message, WPAR
case WM_DESTROY:
if (!(window->m_renderer == NULL))
{
- window->m_renderer->destroy();
- global_free(window->m_renderer);
- window->m_renderer = NULL;
+ window->m_renderer->destroy();
+ global_free(window->m_renderer);
+ window->m_renderer = NULL;
}
window->m_hwnd = NULL;
return DefWindowProc(wnd, message, wparam, lparam);
@@ -1493,7 +1492,7 @@ void win_window_info::draw_video_contents(HDC dc, int update)
mtlog_add("draw_video_contents: begin");
mtlog_add("draw_video_contents: render lock acquire");
- std::lock_guard<std::mutex> lock(m_render_lock);
+ osd_lock_acquire(m_render_lock);
mtlog_add("draw_video_contents: render lock acquired");
// if we're iconic, don't bother
@@ -1517,6 +1516,7 @@ void win_window_info::draw_video_contents(HDC dc, int update)
}
}
+ osd_lock_release(m_render_lock);
mtlog_add("draw_video_contents: render lock released");
mtlog_add("draw_video_contents: end");
diff --git a/src/osd/windows/window.h b/src/osd/windows/window.h
index 6a925494f93..62d4f57db55 100644
--- a/src/osd/windows/window.h
+++ b/src/osd/windows/window.h
@@ -9,7 +9,6 @@
#ifndef __WIN_WINDOW__
#define __WIN_WINDOW__
-#include <mutex>
#include "video.h"
#include "render.h"
@@ -93,7 +92,7 @@ public:
float m_aspect;
// rendering info
- std::mutex m_render_lock;
+ osd_lock * m_render_lock;
render_target * m_target;
int m_targetview;
int m_targetorient;
diff --git a/src/osd/windows/winmain.cpp b/src/osd/windows/winmain.cpp
index cfa0a4fb0b7..08c988e2311 100644
--- a/src/osd/windows/winmain.cpp
+++ b/src/osd/windows/winmain.cpp
@@ -283,8 +283,6 @@ const options_entry windows_options::s_option_entries[] =
{ NULL, NULL, OPTION_HEADER, "DIRECT3D POST-PROCESSING OPTIONS" },
{ WINOPTION_HLSL_ENABLE";hlsl", "0", OPTION_BOOLEAN, "enables HLSL post-processing (PS3.0 required)" },
{ WINOPTION_HLSLPATH, "hlsl", OPTION_STRING, "path to hlsl files" },
- { WINOPTION_HLSL_PRESCALE_X, "0", OPTION_INTEGER, "HLSL pre-scale override factor for X (0 for auto)" },
- { WINOPTION_HLSL_PRESCALE_Y, "0", OPTION_INTEGER, "HLSL pre-scale override factor for Y (0 for auto)" },
{ WINOPTION_HLSL_WRITE, NULL, OPTION_STRING, "enables HLSL AVI writing (huge disk bandwidth suggested)" },
{ WINOPTION_HLSL_SNAP_WIDTH, "2048", OPTION_STRING, "HLSL upscaled-snapshot width" },
{ WINOPTION_HLSL_SNAP_HEIGHT, "1536", OPTION_STRING, "HLSL upscaled-snapshot height" },
@@ -526,6 +524,7 @@ windows_osd_interface::~windows_osd_interface()
void windows_osd_interface::video_register()
{
video_options_add("gdi", NULL);
+ video_options_add("ddraw", NULL);
video_options_add("d3d", NULL);
video_options_add("bgfx", NULL);
//video_options_add("auto", NULL); // making d3d video default one
diff --git a/src/osd/windows/winmain.h b/src/osd/windows/winmain.h
index 260919961f5..63dd907d3b3 100644
--- a/src/osd/windows/winmain.h
+++ b/src/osd/windows/winmain.h
@@ -31,8 +31,6 @@
// core post-processing options
#define WINOPTION_HLSL_ENABLE "hlsl_enable"
#define WINOPTION_HLSLPATH "hlslpath"
-#define WINOPTION_HLSL_PRESCALE_X "hlsl_prescale_x"
-#define WINOPTION_HLSL_PRESCALE_Y "hlsl_prescale_y"
#define WINOPTION_HLSL_WRITE "hlsl_write"
#define WINOPTION_HLSL_SNAP_WIDTH "hlsl_snap_width"
#define WINOPTION_HLSL_SNAP_HEIGHT "hlsl_snap_height"
@@ -112,6 +110,8 @@
#define WINOPTION_GLOBAL_INPUTS "global_inputs"
#define WINOPTION_DUAL_LIGHTGUN "dual_lightgun"
+
+
//============================================================
// TYPE DEFINITIONS
//============================================================
@@ -136,8 +136,6 @@ public:
const char *screen_post_fx_dir() const { return value(WINOPTION_HLSLPATH); }
bool d3d_hlsl_enable() const { return bool_value(WINOPTION_HLSL_ENABLE); }
const char *d3d_hlsl_write() const { return value(WINOPTION_HLSL_WRITE); }
- int d3d_hlsl_prescale_x() const { return int_value(WINOPTION_HLSL_PRESCALE_X); }
- int d3d_hlsl_prescale_y() const { return int_value(WINOPTION_HLSL_PRESCALE_Y); }
int d3d_snap_width() const { return int_value(WINOPTION_HLSL_SNAP_WIDTH); }
int d3d_snap_height() const { return int_value(WINOPTION_HLSL_SNAP_HEIGHT); }
int screen_shadow_mask_tile_mode() const { return int_value(WINOPTION_SHADOW_MASK_TILE_MODE); }
diff --git a/src/tools/jedutil.cpp b/src/tools/jedutil.cpp
index a6cfc279e2a..284b77ae217 100644
--- a/src/tools/jedutil.cpp
+++ b/src/tools/jedutil.cpp
@@ -57,13 +57,11 @@
18CV8 = QP20 QF2696
- AMPAL18P8 = QP20 QF2600
-
EPL10P8 = QP20
EPL12P6 = QP20
EPL14P4 = QP20
EPL16P2 = QP20
- EPL16P8 = QP20 QF2072
+ EPL16P8 = QP20
EPL16RP8 = QP20
EPL16RP6 = QP20
EPL16RP4 = QP20
@@ -274,7 +272,6 @@ static void print_pal16r8_product_terms(const pal_data* pal, const jed_data* jed
static void print_palce16v8_product_terms(const pal_data* pal, const jed_data* jed);
static void print_gal16v8_product_terms(const pal_data* pal, const jed_data* jed);
static void print_peel18cv8_product_terms(const pal_data* pal, const jed_data* jed);
-static void print_ampal18p8_product_terms(const pal_data* pal, const jed_data* jed);
static void print_gal18v10_product_terms(const pal_data* pal, const jed_data* jed);
static void print_pal20l8_product_terms(const pal_data* pal, const jed_data* jed);
static void print_pal20l10_product_terms(const pal_data* pal, const jed_data* jed);
@@ -335,7 +332,6 @@ static void config_pal16r8_pins(const pal_data* pal, const jed_data* jed);
static void config_palce16v8_pins(const pal_data* pal, const jed_data* jed);
static void config_gal16v8_pins(const pal_data* pal, const jed_data* jed);
static void config_peel18cv8_pins(const pal_data* pal, const jed_data* jed);
-static void config_ampal18p8_pins(const pal_data* pal, const jed_data* jed);
static void config_gal18v10_pins(const pal_data* pal, const jed_data* jed);
static void config_pal20l8_pins(const pal_data* pal, const jed_data* jed);
static void config_pal20l10_pins(const pal_data* pal, const jed_data* jed);
@@ -534,16 +530,6 @@ static pin_fuse_rows peel18cv8pinfuserows[] = {
{18, 2340, 288, 540},
{19, 2304, 0, 252}};
-static pin_fuse_rows ampal18p8pinfuserows[] = {
- {12, 2268, 2304, 2556},
- {13, 1944, 1980, 2232},
- {14, 1620, 1656, 1908},
- {15, 1296, 1332, 1584},
- {16, 972, 1008, 1260},
- {17, 648, 684, 936},
- {18, 324, 360, 612},
- {19, 0, 36, 288}};
-
static pin_fuse_rows gal18v10pinfuserows[] = {
{9, 3096, 3132, 3384},
{11, 2772, 2808, 3060},
@@ -1186,26 +1172,6 @@ static pin_fuse_columns peel18cv8pinfusecolumns[] = {
{18, 11, 10},
{19, 7, 6}};
-static pin_fuse_columns ampal18p8pinfusecolumns[] = {
- {1, 3, 2},
- {2, 1, 0},
- {3, 5, 4},
- {4, 9, 8},
- {5, 13, 12},
- {6, 17, 16},
- {7, 21, 20},
- {8, 25, 24},
- {9, 29, 28},
- {11, 31, 30},
- {12, 35, 34},
- {13, 27, 26},
- {14, 23, 22},
- {15, 19, 18},
- {16, 15, 14},
- {17, 11, 10},
- {18, 7, 6},
- {19, 33, 32}};
-
static pin_fuse_columns gal18v10pinfusecolumns[] = {
{1, 1, 0},
{2, 5, 4},
@@ -2019,13 +1985,6 @@ static pal_data paldata[] = {
config_peel18cv8_pins,
nullptr,
get_peel18cv8_pin_fuse_state},
- {"AMPAL18P8", 2600,
- ampal18p8pinfuserows, ARRAY_LENGTH(ampal18p8pinfuserows),
- ampal18p8pinfusecolumns, ARRAY_LENGTH(ampal18p8pinfusecolumns),
- print_ampal18p8_product_terms,
- config_ampal18p8_pins,
- nullptr,
- nullptr},
{"GAL18V10", 3540,
gal18v10pinfuserows, ARRAY_LENGTH(gal18v10pinfuserows),
gal18v10pinfusecolumns, ARRAY_LENGTH(gal18v10pinfusecolumns),
@@ -2120,57 +2079,57 @@ static pal_data paldata[] = {
epl10p8pinfusecolumns, ARRAY_LENGTH(epl10p8pinfusecolumns),
print_epl10p8_product_terms,
config_epl10p8_pins,
- nullptr,
- nullptr},
+ NULL,
+ NULL},
{"EPL12P6", 786,
epl12p6pinfuserows, ARRAY_LENGTH(epl12p6pinfuserows),
epl12p6pinfusecolumns, ARRAY_LENGTH(epl12p6pinfusecolumns),
print_epl12p6_product_terms,
config_epl12p6_pins,
- nullptr,
- nullptr},
+ NULL,
+ NULL},
{"EPL14P4", 908,
epl14p4pinfuserows, ARRAY_LENGTH(epl14p4pinfuserows),
epl14p4pinfusecolumns, ARRAY_LENGTH(epl14p4pinfusecolumns),
print_epl14p4_product_terms,
config_epl14p4_pins,
- nullptr,
- nullptr},
+ NULL,
+ NULL},
{"EPL16P2", 1030,
epl16p2pinfuserows, ARRAY_LENGTH(epl16p2pinfuserows),
epl16p2pinfusecolumns, ARRAY_LENGTH(epl16p2pinfusecolumns),
print_epl16p2_product_terms,
config_epl16p2_pins,
- nullptr,
- nullptr},
+ NULL,
+ NULL},
{"EPL16P8", 2072,
epl16p8pinfuserows, ARRAY_LENGTH(epl16p8pinfuserows),
epl16p8pinfusecolumns, ARRAY_LENGTH(epl16p8pinfusecolumns),
print_epl16p8_product_terms,
config_epl16p8_pins,
- nullptr,
- nullptr},
+ NULL,
+ NULL},
{"EPL16RP8", 2072,
epl16rp8pinfuserows, ARRAY_LENGTH(epl16rp8pinfuserows),
epl16rp8pinfusecolumns, ARRAY_LENGTH(epl16rp8pinfusecolumns),
print_epl16rp8_product_terms,
config_epl16rp8_pins,
- nullptr,
- nullptr},
+ NULL,
+ NULL},
{"EPL16RP6", 2072,
epl16rp6pinfuserows, ARRAY_LENGTH(epl16rp6pinfuserows),
epl16rp6pinfusecolumns, ARRAY_LENGTH(epl16rp6pinfusecolumns),
print_epl16rp6_product_terms,
config_epl16rp6_pins,
- nullptr,
- nullptr},
+ NULL,
+ NULL},
{"EPL16RP4", 2072,
epl16rp4pinfuserows, ARRAY_LENGTH(epl16rp4pinfuserows),
epl16rp4pinfusecolumns, ARRAY_LENGTH(epl16rp4pinfusecolumns),
print_epl16rp4_product_terms,
config_epl16rp4_pins,
- nullptr,
- nullptr},
+ NULL,
+ NULL},
#endif
{"PAL10P8", 328,
pal10p8pinfuserows, ARRAY_LENGTH(pal10p8pinfuserows),
@@ -3450,17 +3409,6 @@ static void print_peel18cv8_product_terms(const pal_data* pal, const jed_data* j
/*-------------------------------------------------
- print_ampal18p8_product_terms - prints the product
- terms for an AMPAL18P8
--------------------------------------------------*/
-
-static void print_ampal18p8_product_terms(const pal_data* pal, const jed_data* jed)
-{
- print_product_terms(pal, jed);
-}
-
-
-/*-------------------------------------------------
print_gal18v10_product_terms - prints the product
terms for a GAL18V10
-------------------------------------------------*/
@@ -5291,46 +5239,6 @@ static void config_peel18cv8_pins(const pal_data* pal, const jed_data* jed)
/*-------------------------------------------------
- config_ampal18p8_pins - configures the pins
- for an AMPAL18P8
--------------------------------------------------*/
-
-static void config_ampal18p8_pins(const pal_data* pal, const jed_data* jed)
-{
- static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19};
- pin_output_config output_pins[8];
- UINT16 index, output_pin_count;
-
- set_input_pins(input_pins, ARRAY_LENGTH(input_pins));
-
- output_pin_count = 0;
-
- for (index = 0; index < pal->pinfuserowscount; ++index)
- {
- if (does_output_enable_fuse_row_allow_output(pal, jed, pal->pinfuserows[index].fuserowoutputenable))
- {
- output_pins[output_pin_count].pin = pal->pinfuserows[index].pin;
- output_pins[output_pin_count].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT;
-
- if (jed_get_fuse(jed, 2591 + (8 - index)))
- {
- output_pins[output_pin_count].flags |= OUTPUT_ACTIVEHIGH;
- }
- else
- {
- output_pins[output_pin_count].flags |= OUTPUT_ACTIVELOW;
- }
-
- ++output_pin_count;
- }
- }
-
- set_output_pins(output_pins, output_pin_count);
-}
-
-
-
-/*-------------------------------------------------
config_gal18v10_pins - configures the pins
for a GAL18V10
-------------------------------------------------*/